added windows fixes
This commit is contained in:
parent
bbe9b1551e
commit
66dbdd9277
1 changed files with 12 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
|||
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
; hex groworld game : fluxus version
|
||||
; hex ornament/groworld game : fluxus version
|
||||
|
||||
(require scheme/class)
|
||||
|
||||
|
@ -9,12 +9,16 @@
|
|||
(define num-insects 20)
|
||||
(define pickup-drop-probability 10)
|
||||
|
||||
(define (vec3->vec4 v a)
|
||||
(vector (vx v) (vy v) (vz v) a))
|
||||
|
||||
(define (bg-colour) (vector 0.5 0.2 0.1))
|
||||
(define (worm-colour) (hsv->rgb (vector 0.1 (rndf) 0.5)))
|
||||
(define (root-colour) (vector 0.6 0.5 0.5))
|
||||
(define (pickup-colour) (hsv->rgb (vector 0.1 (rndf) 1)))
|
||||
(define (absorb-colour) (hsv->rgb (vector 0.1 (rndf) 1)))
|
||||
(define (absorb-colour) (vec3->vec4 (hsv->rgb (vector 0.1 (rndf) 1)) 0.2))
|
||||
|
||||
;(define texpath "")
|
||||
(define texpath "textures/")
|
||||
|
||||
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
@ -444,7 +448,7 @@
|
|||
(set! root2 (build-prim code)))
|
||||
|
||||
(define (update-texture code)
|
||||
(texture (load-texture (append texpath "roots-ornate.png")))
|
||||
(texture (load-texture (string-append texpath "roots-ornate.png")))
|
||||
(pdata-map!
|
||||
(lambda (t tref)
|
||||
(let ((size (/ 1 8)))
|
||||
|
@ -560,7 +564,7 @@
|
|||
(hint-unlit)
|
||||
(set! hidden #t)
|
||||
(colour (worm-colour))
|
||||
(texture (load-texture (append texpath "worm.png")))
|
||||
(texture (load-texture (string-append texpath "worm.png")))
|
||||
(let ((width (+ 0.05 (* 0.1 (rndf)))))
|
||||
(pdata-index-map!
|
||||
(lambda (i w)
|
||||
|
@ -617,13 +621,14 @@
|
|||
|
||||
(define/public (build p)
|
||||
(set! root (with-state
|
||||
(texture (load-texture (append texpath "particle.png")))
|
||||
(texture (load-texture (string-append texpath "particle.png")))
|
||||
(parent p)
|
||||
(build-particles 20)))
|
||||
|
||||
(let ((pos (with-primitive (send cell get-root)
|
||||
(vtransform (vector 0 0 0) (get-transform)))))
|
||||
(with-primitive root
|
||||
(translate (vector 0 0 0.2))
|
||||
(hint-depth-sort)
|
||||
(pdata-map!
|
||||
(lambda (p)
|
||||
|
@ -635,8 +640,8 @@
|
|||
"c")
|
||||
(pdata-map!
|
||||
(lambda (s)
|
||||
(let ((s (* 0.75 (+ 1 (rndf)))))
|
||||
(vector s s 1 0.3)))
|
||||
(let ((s (* 0.2 (+ 0.1 (rndf)))))
|
||||
(vector s s 1)))
|
||||
"s"))))
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue