neuttower/state.jor

17 lines
489 B
Plaintext
Raw Normal View History

2020-02-18 01:43:11 +00:00
0 const PROG-VIEW userword
2020-02-02 23:33:07 +00:00
2020-02-18 01:43:11 +00:00
1 const FLAG-COUNT
2020-02-02 23:33:07 +00:00
array flags FLAG-COUNT 8 / 1 + allot
: flagstof ( f -- v f ) dup 8 / flags + swap 8 % 1 swap << ;
: flagsf! ( b f -- ) flagstof f! ;
: flag@ ( f -- b ) flagstof f@ ; userword
: setflag 1 swap flagsf! ; userword
: clearflag 0 swap flagsf! ; userword
2020-02-18 01:43:11 +00:00
: human-view s" tiles.gfx" loadtiles invalidate-map PROG-VIEW clearflag ; userword
: prog-view s" ntiles.gfx" loadtiles invalidate-map PROG-VIEW setflag ; userword
2020-02-02 23:33:07 +00:00