; to use as a template use the actors but move the position
; as needed and setting act_loot_table_dat.
+floor_1_actor_table:
map_c_actor_table:
.db 7 ; size
dw unit_demo_2
dw unit_demo_warrior
dw unit_demo_warrior
-
+; actor tables for each floor
+floor_actor_tables:
+dw floor_1_actor_table
ret
; places actors from a valid actor table
- ; in the current map's header. This will overwrite the
+ ; from the current floor value. This will overwrite the
; header loaded by map_load. Preserves player entry.
; the length of the actor table must be maskable
; inputs:
ld d, 0
call memset
- ; load map ptr
- ld a, [map_header]
- ld l, a
- ld a, [map_header+1]
- ld h, a
- ; now load the actor table template into hl
- ld de, map_actor_table_ptr
+ ; load floor actor tables
+ ld hl, floor_actor_tables
+ ld d, 0
+ ld a, [floor]
+ ld e, a
add hl, de
- ; hl = actor table ptr
+ ; hl = floor actor table ptr
; load actor table ptr
ld a, [hl+]