.de map_flags_3, 1
.de map_flags_4, 1
.de map_bg_ptr, 2
+ ; ptr to mape state to be loaded
+.de map_state_ptr, 2
+ ; amount of entires in actor table
+.de map_actor_table_len, 1
+ ; ptr to actor table
+ ; actor table is a list of pointers to actor
+ ; templates
+.de map_actor_table_ptr, 2
+ ; pointers to tile banks to be loaded
+.de map_tile_bank0_ptr, 2
+.de map_tile_bank1_ptr, 2
+.de map_tile_bank2_ptr, 2
; special text commands
call_hl
ret
+unit_player_init:
+ ldnull bc
+ ret
+
unit_demo_1_init:
ldnull bc
ret
; inputs
; de: actor
-unit_demo_1_update:
+unit_player_update:
push de
ld hl, act_oam_flags
add hl, de
unit_get_equipment:
ret
-unit_demo_1:
- st_def 0x00, unit_demo_1_init, st_unit_idle
+unit_player:
+ st_def 0x00, unit_player_init, st_unit_idle
act_def ACT_T_DEMO_1, 0, 2, 2, 0
act_stat_def1 1, 1, 1, 1, 1, 1
act_stat_def2 1, 1, 1, 1, 1, 1, 1, 1
act_inventory_empty
act_equipment_empty
act_effects_empty
- act_st_def NULL, NULL, st_unit_demo_1_update, st_unit_idle
+ act_st_def NULL, NULL, st_unit_player_update, st_unit_idle
act_def_draw unit_draw, 0x84, 0
act_rt_def
act_def_draw unit_draw, 0x84, 0
act_rt_def
-st_unit_demo_1_update:
- st_def 0x00, unit_demo_1_update, st_unit_demo_1_update
+st_unit_player_update:
+ st_def 0x00, unit_player_update, st_unit_player_update
st_unit_demo_1_cpu_update:
st_def 0x00, unit_demo_1_cpu_update, st_unit_demo_1_cpu_update
scroll_y: .adv 1
scroll_x: .adv 1
-; units for p0 and p1
+; units
+; player_unit (unit 0) is reserved
+player_unit: .adv 0
p0_units: .adv act_size * UNITS_MAX
-
-state_cells: .adv c_size * MAP_SIZE
-state_cells_end:
+
+ ; map tiles and collision data
+map: .adv c_size * MAP_SIZE
+map_end:
+
+ ; mape state machine
+map_st: .adv st_size
state_end: