diff options
| author | Narishma-gb <194818981+Narishma-gb@users.noreply.github.com> | 2026-01-17 22:42:34 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-17 16:42:34 -0500 |
| commit | 70f654bda79619bb7c1262f3fd111eeefd4c2645 (patch) | |
| tree | a4daa282c649542ef18894c0c6d7ce4ebfdef82a /data | |
| parent | Replace hard-coded numbers with constants in haze.asm (#564) (diff) | |
| download | pokeyellow-70f654bda79619bb7c1262f3fd111eeefd4c2645.tar.gz pokeyellow-70f654bda79619bb7c1262f3fd111eeefd4c2645.tar.xz pokeyellow-70f654bda79619bb7c1262f3fd111eeefd4c2645.zip | |
Use map names with `ToggleData*` symbols (#563)
Diffstat (limited to 'data')
| -rw-r--r-- | data/maps/toggleable_objects.asm | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/data/maps/toggleable_objects.asm b/data/maps/toggleable_objects.asm index d94002d9..90f9e689 100644 --- a/data/maps/toggleable_objects.asm +++ b/data/maps/toggleable_objects.asm @@ -4,8 +4,8 @@ ToggleableObjectMapPointers: ; entries correspond to map ids table_width 2 FOR n, NUM_MAPS - IF DEF(TOGGLEMAP{n}) ; defined by `toggle_consts_for` - dw ToggleData{n} + IF DEF(TOGGLEMAP{n}_NAME) ; defined by `toggle_consts_for` + dw ToggleData_{TOGGLEMAP{n}_NAME} ELSE dw NoToggleData ENDC @@ -20,14 +20,14 @@ 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}), \ + ASSERT DEF(TOGGLEMAP{toggle_map_id}_ID), \ "`toggleable_objects_for \1` is not defined" - DEF toggles_ok &= DEF(TOGGLEMAP{toggle_map_id}) + DEF toggles_ok &= DEF(TOGGLEMAP{toggle_map_id}_ID) IF toggles_ok - assert_table_length TOGGLEMAP{toggle_map_id} - DEF toggles_ok &= TOGGLEMAP{toggle_map_id} * 3 == @ - ToggleableObjectStates + assert_table_length TOGGLEMAP{toggle_map_id}_ID + DEF toggles_ok &= TOGGLEMAP{toggle_map_id}_ID * 3 == @ - ToggleableObjectStates ENDC ENDC ENDM |
