prepare more for addition of garden
This commit is contained in:
parent
2bc2288a0e
commit
d7ccec8595
12
main.fs
12
main.fs
|
@ -293,8 +293,18 @@ S" you feel like throwing some stuff into the pool." set-message
|
|||
: draw-devices-screen any-change? if draw-message draw-devices draw-blank draw-actions clear-xy clear-all else clear-xy then ;
|
||||
\ : draw-screen clear-all ;
|
||||
|
||||
\ TODO draw the garden, this is a stub
|
||||
: draw-garden 2dup at-xy ." hello world! " ;
|
||||
|
||||
\ TODO apparently the forth-y way to do this is with a function table
|
||||
: draw-screen
|
||||
screen @ case
|
||||
0 of draw-devices-screen endof
|
||||
1 of draw-garden endof
|
||||
endcase ;
|
||||
|
||||
\ main game loop
|
||||
: game-loop begin wait-tick game-tick handle-input 1 1 draw-tab-bar draw-blank draw-devices-screen 0 until ;
|
||||
: game-loop begin wait-tick game-tick handle-input 1 1 draw-tab-bar draw-blank draw-screen 0 until ;
|
||||
|
||||
\ for use in the debugging shell
|
||||
: restart page game-loop ;
|
||||
|
|
Reference in New Issue