mirror of
https://github.com/pret/pokered.git
synced 2026-04-24 15:08:51 -05:00
Use map names with ToggleData* symbols
This commit is contained in:
parent
7e6fdbbda7
commit
f050efc507
|
|
@ -3,6 +3,7 @@ DEF ON EQU $15
|
|||
|
||||
MACRO toggle_consts_for
|
||||
DEF TOGGLEMAP{\1} EQU const_value
|
||||
DEF TOGGLEMAP{\1}_NAME EQUS "\1"
|
||||
ENDM
|
||||
|
||||
; ToggleableObjectStates indexes (see data/maps/toggleable_objects.asm)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ ToggleableObjectMapPointers:
|
|||
table_width 2
|
||||
FOR n, NUM_MAPS
|
||||
IF DEF(TOGGLEMAP{n}) ; defined by `toggle_consts_for`
|
||||
dw ToggleData{n}
|
||||
dw ToggleData_{TOGGLEMAP{n}_NAME}
|
||||
ELSE
|
||||
dw NoToggleData
|
||||
ENDC
|
||||
|
|
@ -20,7 +20,7 @@ DEF toggles_ok = 1
|
|||
|
||||
MACRO? toggleable_objects_for
|
||||
DEF toggle_map_id = \1 ; map id
|
||||
ToggleData{toggle_map_id}:
|
||||
ToggleData_\1:
|
||||
IF toggles_ok
|
||||
ASSERT DEF(TOGGLEMAP{toggle_map_id}), \
|
||||
"`toggleable_objects_for \1` is not defined"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user