24 lines
724 B
Plaintext
24 lines
724 B
Plaintext
|
0 const JEANNE-ANGRY userword
|
||
|
1 const CHUCK-GONE userword
|
||
|
2 const CHUCK-FOLLOW userword
|
||
|
3 const CHUCK-HOME userword
|
||
|
4 const CHUCK-STOLEN userword
|
||
|
5 const CHUCK-EXPLAINED userword
|
||
|
6 const NIGHT userword
|
||
|
|
||
|
7 const FLAG-COUNT
|
||
|
|
||
|
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
|
||
|
|
||
|
: day s" tiles.gfx" loadtiles invalidate-map NIGHT clearflag ; userword
|
||
|
: night s" ntiles.gfx" loadtiles invalidate-map NIGHT setflag ; userword
|
||
|
|
||
|
: {car-drive} NIGHT flag@ if {car-lit} else {car} then ;
|
||
|
|