diff options
Diffstat (limited to 'macros/scripts')
| -rw-r--r-- | macros/scripts/maps.asm | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/macros/scripts/maps.asm b/macros/scripts/maps.asm index 5c1a8ad5..c5f0d1d0 100644 --- a/macros/scripts/maps.asm +++ b/macros/scripts/maps.asm @@ -29,6 +29,12 @@ MACRO object_event ELSE db \6 ENDC + ; items and trainers don't use a typical text id + IF _NARG > 6 + REDEF _OBJECT_EVENT_{d:{_NUM_OBJECT_EVENTS}}_TEXT_ID EQUS "0" + ELSE + REDEF _OBJECT_EVENT_{d:{_NUM_OBJECT_EVENTS}}_TEXT_ID EQUS "\6" + ENDC DEF {_NUM_OBJECT_EVENTS} += 1 ENDM @@ -60,12 +66,22 @@ ENDM ;\3 sign id MACRO bg_event db \2, \1, \3 + REDEF _BG_EVENT_{d:{_NUM_BG_EVENTS}}_TEXT_ID EQUS "\3" DEF {_NUM_BG_EVENTS} += 1 ENDM ;\1 source map MACRO def_warps_to - FOR n, _NUM_WARP_EVENTS + ; text ID values are significant (see DisplayTextID in home/text_scripts.asm) + FOR n, {_NUM_BG_EVENTS} + ASSERT {_BG_EVENT_{d:n}_TEXT_ID} > {_NUM_OBJECT_EVENTS}, \ + "A bg_event has text ID {_BG_EVENT_{d:n}_TEXT_ID} expected for an object_event ({d:{_NUM_OBJECT_EVENTS}} or below)" + ENDR + FOR n, {_NUM_OBJECT_EVENTS} + ASSERT {_OBJECT_EVENT_{d:n}_TEXT_ID} <= {_NUM_OBJECT_EVENTS}, \ + "An object_event has text ID {_OBJECT_EVENT_{d:n}_TEXT_ID} expected for a bg_event (above {d:{_NUM_OBJECT_EVENTS}})" + ENDR + FOR n, {_NUM_WARP_EVENTS} warp_to _WARP_{d:n}_X, _WARP_{d:n}_Y, \1_WIDTH ENDR ENDM @@ -208,3 +224,9 @@ MACRO connection db _y, _x dw wOverworldMap + _win ENDM + +DEF def_script_pointers EQUS "const_def" + +DEF def_text_pointers EQUS "const_def 1" + +DEF object_const_def EQUS "const_def 1" |
