make devices screen move properly around the display
This commit is contained in:
parent
2fbf00ce3e
commit
80f8b9bdd1
10
main.fs
10
main.fs
|
@ -247,20 +247,20 @@ S" you feel like throwing some stuff into the pool." set-message
|
||||||
inc-y ;
|
inc-y ;
|
||||||
|
|
||||||
\ draw-actions draws a list of the actions you've unlocked.
|
\ draw-actions draws a list of the actions you've unlocked.
|
||||||
: draw-actions
|
: draw-actions ( x y -- x y )
|
||||||
2dup at-xy
|
2dup at-xy
|
||||||
draw-members cr 1 move-right
|
draw-members cr over move-right
|
||||||
draw-constructs cr 1 move-right
|
draw-constructs cr over move-right
|
||||||
." (q)uit (without saving)"
|
." (q)uit (without saving)"
|
||||||
\ add 1 to y
|
\ add 1 to y
|
||||||
inc-y ;
|
inc-y ;
|
||||||
|
|
||||||
\ clear-xy clears the x and y positions from the stack
|
\ clear-xy clears the x and y positions from the stack
|
||||||
: clear-xy ( x y -- ) drop drop ;
|
: clear-xy ( x y -- ) 2drop ;
|
||||||
|
|
||||||
\ draw-screen redraws the devices screen, but only if there's been a change.
|
\ draw-screen redraws the devices screen, but only if there's been a change.
|
||||||
\ ( x y -- )
|
\ ( x y -- )
|
||||||
: draw-devices-screen any-change? if draw-message draw-devices draw-blank draw-actions clear-xy clear-all else 2drop then ;
|
: 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 ;
|
\ : draw-screen clear-all ;
|
||||||
|
|
||||||
\ main game loop
|
\ main game loop
|
||||||
|
|
Reference in New Issue