pete286/state.jor

24 lines
593 B
Plaintext
Raw Normal View History

2019-05-18 19:30:58 +00:00
0 const JEANNE-ANGRY
1 const CHUCK-GONE
2 const CHUCK-FOLLOW
3 const CHUCK-HOME
4 const CHUCK-STOLEN
5 const CHUCK-EXPLAINED
2019-06-26 01:58:52 +00:00
6 const NIGHT
2019-05-18 19:30:58 +00:00
2019-06-26 01:58:52 +00:00
7 const FLAG-COUNT
2019-05-18 19:30:58 +00:00
array flags FLAG-COUNT 8 / 1 + allot
: flagstof ( f -- v f ) dup 8 / flags + swap 8 % 1 swap << ;
2019-05-19 17:34:27 +00:00
: flagsf! ( b f -- ) flagstof f! ;
: flag@ ( f -- b ) flagstof f@ ;
: setflag 1 swap flagsf! ;
: clearflag 0 swap flagsf! ;
2019-05-01 01:15:25 +00:00
2019-06-26 01:58:52 +00:00
: day s" TILES.TIF" loadtiles invalidate-map NIGHT clearflag ;
: night s" NTILES.TIF" loadtiles invalidate-map NIGHT setflag ;
: {car-drive} NIGHT flag@ if {car-lit} else {car} then ;