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)
|
(require scheme/class)
|
||||||
|
|
||||||
|
@ -9,12 +9,16 @@
|
||||||
(define num-insects 20)
|
(define num-insects 20)
|
||||||
(define pickup-drop-probability 10)
|
(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 (bg-colour) (vector 0.5 0.2 0.1))
|
||||||
(define (worm-colour) (hsv->rgb (vector 0.1 (rndf) 0.5)))
|
(define (worm-colour) (hsv->rgb (vector 0.1 (rndf) 0.5)))
|
||||||
(define (root-colour) (vector 0.6 0.5 0.5))
|
(define (root-colour) (vector 0.6 0.5 0.5))
|
||||||
(define (pickup-colour) (hsv->rgb (vector 0.1 (rndf) 1)))
|
(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/")
|
(define texpath "textures/")
|
||||||
|
|
||||||
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
@ -444,7 +448,7 @@
|
||||||
(set! root2 (build-prim code)))
|
(set! root2 (build-prim code)))
|
||||||
|
|
||||||
(define (update-texture code)
|
(define (update-texture code)
|
||||||
(texture (load-texture (append texpath "roots-ornate.png")))
|
(texture (load-texture (string-append texpath "roots-ornate.png")))
|
||||||
(pdata-map!
|
(pdata-map!
|
||||||
(lambda (t tref)
|
(lambda (t tref)
|
||||||
(let ((size (/ 1 8)))
|
(let ((size (/ 1 8)))
|
||||||
|
@ -560,7 +564,7 @@
|
||||||
(hint-unlit)
|
(hint-unlit)
|
||||||
(set! hidden #t)
|
(set! hidden #t)
|
||||||
(colour (worm-colour))
|
(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)))))
|
(let ((width (+ 0.05 (* 0.1 (rndf)))))
|
||||||
(pdata-index-map!
|
(pdata-index-map!
|
||||||
(lambda (i w)
|
(lambda (i w)
|
||||||
|
@ -617,13 +621,14 @@
|
||||||
|
|
||||||
(define/public (build p)
|
(define/public (build p)
|
||||||
(set! root (with-state
|
(set! root (with-state
|
||||||
(texture (load-texture (append texpath "particle.png")))
|
(texture (load-texture (string-append texpath "particle.png")))
|
||||||
(parent p)
|
(parent p)
|
||||||
(build-particles 20)))
|
(build-particles 20)))
|
||||||
|
|
||||||
(let ((pos (with-primitive (send cell get-root)
|
(let ((pos (with-primitive (send cell get-root)
|
||||||
(vtransform (vector 0 0 0) (get-transform)))))
|
(vtransform (vector 0 0 0) (get-transform)))))
|
||||||
(with-primitive root
|
(with-primitive root
|
||||||
|
(translate (vector 0 0 0.2))
|
||||||
(hint-depth-sort)
|
(hint-depth-sort)
|
||||||
(pdata-map!
|
(pdata-map!
|
||||||
(lambda (p)
|
(lambda (p)
|
||||||
|
@ -635,8 +640,8 @@
|
||||||
"c")
|
"c")
|
||||||
(pdata-map!
|
(pdata-map!
|
||||||
(lambda (s)
|
(lambda (s)
|
||||||
(let ((s (* 0.75 (+ 1 (rndf)))))
|
(let ((s (* 0.2 (+ 0.1 (rndf)))))
|
||||||
(vector s s 1 0.3)))
|
(vector s s 1)))
|
||||||
"s"))))
|
"s"))))
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue