Prepare to support drawing rotated tiles
This commit is contained in:
parent
d68b5d0491
commit
1e91411687
5 changed files with 54 additions and 40 deletions
8
game.scm
8
game.scm
|
@ -359,7 +359,7 @@
|
|||
(define (draw-gate pos open?)
|
||||
(draw-tile context tileset (if open? 46 45) (vec2-x pos) (vec2-y pos)))
|
||||
|
||||
(define (draw-logic-gate pos state id)
|
||||
(define (draw-logic-gate pos direction state id)
|
||||
(let ((x (vec2-x pos))
|
||||
(y (vec2-y pos)))
|
||||
(draw-tile context tileset 2 x y)
|
||||
|
@ -386,9 +386,9 @@
|
|||
(('gem pos) (draw-gem pos))
|
||||
(('ghost-gem pos) (draw-ghost-gem pos))
|
||||
(('gate pos open?) (draw-gate pos open?))
|
||||
(('and-gate pos state) (draw-logic-gate pos state 42))
|
||||
(('or-gate pos state) (draw-logic-gate pos state 43))
|
||||
(('xor-gate pos state) (draw-logic-gate pos state 44))
|
||||
(('and-gate pos direction state) (draw-logic-gate pos direction state 42))
|
||||
(('or-gate pos direction state) (draw-logic-gate pos direction state 43))
|
||||
(('xor-gate pos direction state) (draw-logic-gate pos direction state 44))
|
||||
(('electric-switch pos on?) (draw-electric-switch pos on?))
|
||||
(('electron-warp pos state) (draw-electron-warp pos state))))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue