[ ] industry demand (0-3)
[ ] total population (24 bit)
[ ] money (24 bit)
+[ ] debt (24 bit)
### per tile
#define TILE_SIZE 8
#define MAP_W 32
#define MAP_H 28
+#define MAP_SIZE (MAP_W * MAP_H)
; seed for the rng
; 8 bit signed int
#define SRAND_INITIAL 0x19
- ; engine flags
-.se 1
- ; if set to 1, call room_goto_player_pos in next blank
-.de EG_FLOAD_ROOM, 1
-
; game modes
; this is a direct index
; into a pointer array
.de GM_GAME, 1
.de GM_PAUSE, 1
+ ; game state cell struct
+ ; this holds all the information
+ ; a cell on the map has
+.se 0
+.de c_type, 1
+.de c_tile, 1
+.de c_flags, 2
+
+ ; power that this tile can pass on
+ ; to adjacent tiles
+.de c_power, 1
+.de c_crime, 1
+.de c_fire, 1
+.de c_occupation, 1
+.de c_other, 2
+.de c_size, 0
prev_inputs: .adv 1
-ui_flags: .adv 1
-draw_flags: .adv 1
-
-cursor_x: .adv 1
-cursor_y: .adv 1
-
-engine_flags: .adv 1
-
- ; tmp can be used by routines as
- ; they see fit
-tmp: .adv 16
- ; itmp is the same as tmp but
- ; for use during an interrupt
-itmp: .adv 16
-
- ; timer for game over. when
- ; it reaches 0 re-start game
-game_over_timer: .adv 1
game_mode: .adv 1
; seed must never be 0
srand: .adv 2
+ ; game state
+ ; this region holds the entire game state
+ ; everything thats needed for a savme game should be
+ ; contained here
+state:
+
+cursor_x: .adv 1
+cursor_y: .adv 1
+
+money: .adv 3
+debt: .adv 3
+demand_house: .adv 1
+demand_shop: .adv 1
+demand_factory: .adv 1
+population: .adv 3
+
+state_map: .adv c_size * MAP_SIZE
+state_end: