This allows updating cells
build_lumber:
ldnull bc
ret
+
--- /dev/null
+
+ ; default road update state
+cell_road_head:
+ ldnull bc
+ ret
+
+cell_template_road:
+ c_def C_ROAD, cell_road_head, 0, 0
; a warehouse is always connected
.de CF_CONNECTED, 1
+ ; cell types
+.se 0
+.de C_ROAD, 1
+
; game state cell struct
; this holds all the information
; a cell on the map has
dw $3
#endmacro
+ ; defines a new cell template
+ ; inputs:
+ ; $1: c_type
+ ; $2: c_st_routine
+ ; $3: c_flags
+ ; $4: c_head_offset
+#macro c_def
+ .db $1
+ dw $2
+ .db $3
+ .db $4
+#endmacro
+
; loads NULL into a 16 bit register
; inputs:
; $1: register
#include "map.s"
#include "simulation.s"
#include "state.s"
+#include "cells.s"
#include "buildings.s"
#include "tiles.inc"