diff options
author | PikalaxALT <PikalaxALT@gmail.com> | 2016-01-06 07:44:50 -0500 |
---|---|---|
committer | PikalaxALT <PikalaxALT@gmail.com> | 2016-01-06 07:44:50 -0500 |
commit | ce019e6347435a89fe53037db993049958fc837e (patch) | |
tree | 2a79c77f2b9b5b4e2dac11b222d62bd7cbe9a956 | |
parent | 80aba7fc13c89d8799776ed479aa13ca69c718fe (diff) |
Map callback constants
100 files changed, 191 insertions, 193 deletions
diff --git a/constants/map_setup_constants.asm b/constants/map_setup_constants.asm index f739830f0..60d8ecacb 100644 --- a/constants/map_setup_constants.asm +++ b/constants/map_setup_constants.asm @@ -12,6 +12,13 @@ const_value SET $f1 const MAPSETUP_BADWARP const MAPSETUP_FLY +const_value SET 1 + const MAPCALLBACK_TILES + const MAPCALLBACK_OBJECTS + const MAPCALLBACK_PALETTES + const MAPCALLBACK_SPRITES + const MAPCALLBACK_NEWMAP + ; Command descriptions from Condensation water's scripting compendium. const_def const_def diff --git a/engine/events.asm b/engine/events.asm index 120154f24..9b4062aea 100644 --- a/engine/events.asm +++ b/engine/events.asm @@ -350,7 +350,7 @@ CheckTileEvent: ; 96874 call CheckCoordEventScriptFlag jr z, .coord_events_disabled - call CheckCurrentNextMapXYTriggers + call CheckCurrentMapXYTriggers jr c, .coord_event .coord_events_disabled @@ -391,7 +391,7 @@ CheckTileEvent: ; 96874 ret .coord_event - ld hl, EngineBuffer5 + ld hl, wCurCoordEventScriptAddr ld a, [hli] ld h, [hl] ld l, a diff --git a/engine/map_setup.asm b/engine/map_setup.asm index c2900665f..50ab18335 100644 --- a/engine/map_setup.asm +++ b/engine/map_setup.asm @@ -306,7 +306,7 @@ SuspendMapAnims: ; 154d3 ; 154d7 LoadObjectsRunCallback_02: ; 154d7 - ld a, 2 + ld a, MAPCALLBACK_OBJECTS call RunMapCallback callba LoadObjectMasks callba InitializeVisibleSprites diff --git a/engine/overworld.asm b/engine/overworld.asm index 748ab4649..e1d50d0b8 100755 --- a/engine/overworld.asm +++ b/engine/overworld.asm @@ -166,7 +166,7 @@ endr RunCallback_04: ; 14209 - ld a, $4 + ld a, MAPCALLBACK_SPRITES call RunMapCallback call GetUsedSprites call .LoadMiscTiles diff --git a/engine/startmenu.asm b/engine/startmenu.asm index 58b7ca5ec..6ba60af36 100755 --- a/engine/startmenu.asm +++ b/engine/startmenu.asm @@ -146,7 +146,7 @@ StartMenu:: ; 125cd call .DrawBugContestStatus call UpdateSprites call ret_d90 - call Function2b5c + call FinishExitMenu ret ; 126d3 diff --git a/engine/warp_connection.asm b/engine/warp_connection.asm index 28d7b0e46..633877101 100755 --- a/engine/warp_connection.asm +++ b/engine/warp_connection.asm @@ -5,11 +5,11 @@ RunCallback_05_03: ; 1045b0 call ResetFlashIfOutOfCave call GetCurrentMapTrigger call ResetBikeFlags - ld a, $5 + ld a, MAPCALLBACK_NEWMAP call RunMapCallback RunCallback_03: ; 1045c4 callba ClearCmdQueue - ld a, $3 + ld a, MAPCALLBACK_PALETTES call RunMapCallback call GetMapHeaderTimeOfDayNybble ld [wMapTimeOfDay], a diff --git a/home/map.asm b/home/map.asm index 370c6ac12..7b70c02b5 100644 --- a/home/map.asm +++ b/home/map.asm @@ -2,7 +2,7 @@ Clearwc7e8:: ; 210f ld hl, wc7e8 - ld bc, $0018 + ld bc, 24 ld a, $0 call ByteFill ret @@ -308,9 +308,8 @@ GetDestinationWarpNumber:: ; 2252 ret .IncreaseHLTwice -rept 2 inc hl -endr + inc hl scf ret ; 22a7 @@ -424,9 +423,8 @@ ReadMapEventHeader:: ; 2336 ld a, [hli] ld h, [hl] ld l, a -rept 2 inc hl -endr + inc hl call ReadWarps call ReadCoordEvents call ReadSignposts @@ -563,11 +561,11 @@ ReadWarps:: ; 23da ReadCoordEvents:: ; 23f1 ld a, [hli] ld c, a - ld [wCurrentNextMapXYTriggerCount], a + ld [wCurrentMapXYTriggerCount], a ld a, l - ld [wCurrentNextMapXYTriggerHeaderPointer], a + ld [wCurrentMapXYTriggerHeaderPointer], a ld a, h - ld [wCurrentNextMapXYTriggerHeaderPointer + 1], a + ld [wCurrentMapXYTriggerHeaderPointer + 1], a ld a, c and a @@ -737,7 +735,7 @@ LoadBlockData:: ; 24cd call ByteFill call ChangeMap call FillMapConnections - ld a, $1 + ld a, MAPCALLBACK_TILES call RunMapCallback ret ; 24e4 @@ -1198,7 +1196,7 @@ MaskObject:: ; 2712 ld d, $0 ld hl, wObjectMasks add hl, de - ld [hl], -1 ; ,masked + ld [hl], -1 ; , masked ret ; 271e @@ -1340,9 +1338,8 @@ UpdateBGMapRow:: ; 27d3 ld a, d ld [hli], a ld a, e -rept 2 inc a -endr + inc a and $1f ld b, a ld a, e @@ -1568,8 +1565,8 @@ SaveScreen_LoadNeighbor:: ; 28f7 GetMovementPermissions:: ; 2914 xor a ld [TilePermissions], a - call GetLeftRightCollision - call GetUpDownCollision + call .LeftRight + call .UpDown ; get coords of current tile ld a, [PlayerNextMapX] ld d, a @@ -1577,12 +1574,12 @@ GetMovementPermissions:: ; 2914 ld e, a call GetCoordTile ld [PlayerNextTile], a - call Function29ff + call .CheckHiNybble ret nz ld a, [PlayerNextTile] and 7 - ld hl, .data_2945 + ld hl, .MovementPermissionsData add l ld l, a ld a, 0 @@ -1595,11 +1592,11 @@ GetMovementPermissions:: ; 2914 ret ; 2945 -.data_2945 ; 2945 +.MovementPermissionsData ; 2945 db 1, 2, 4, 8, 9, 10, 5, 6 ; 294d -GetUpDownCollision:: ; 294d +.UpDown ld a, [PlayerNextMapX] ld d, a ld a, [PlayerNextMapY] @@ -1609,17 +1606,17 @@ GetUpDownCollision:: ; 294d inc e call GetCoordTile ld [TileDown], a - call Function298b + call .Down pop de dec e call GetCoordTile ld [TileUp], a - call Function29a8 + call .Up ret ; 296c -GetLeftRightCollision:: ; 296c +.LeftRight ld a, [PlayerNextMapX] ld d, a ld a, [PlayerNextMapY] @@ -1629,93 +1626,93 @@ GetLeftRightCollision:: ; 296c dec d call GetCoordTile ld [TileLeft], a - call Function29e2 + call .Left pop de inc d call GetCoordTile ld [TileRight], a - call Function29c5 + call .Right ret ; 298b -Function298b:: ; 298b - call Function29ff +.Down + call .CheckHiNybble ret nz ld a, [TileDown] and 7 cp $2 - jr z, .ok + jr z, .ok_down cp $6 - jr z, .ok + jr z, .ok_down cp $7 ret nz -.ok +.ok_down ld a, [TilePermissions] or FACE_DOWN ld [TilePermissions], a ret ; 29a8 -Function29a8:: ; 29a8 - call Function29ff +.Up + call .CheckHiNybble ret nz ld a, [TileUp] and 7 cp $3 - jr z, .ok + jr z, .ok_up cp $4 - jr z, .ok + jr z, .ok_up cp $5 ret nz -.ok +.ok_up ld a, [TilePermissions] or FACE_UP ld [TilePermissions], a ret ; 29c5 -Function29c5:: ; 29c5 - call Function29ff +.Right + call .CheckHiNybble ret nz ld a, [TileRight] and 7 cp $1 - jr z, .ok + jr z, .ok_right cp $5 - jr z, .ok + jr z, .ok_right cp $7 ret nz -.ok +.ok_right ld a, [TilePermissions] or FACE_RIGHT ld [TilePermissions], a ret ; 29e2 -Function29e2:: ; 29e2 - call Function29ff +.Left + call .CheckHiNybble ret nz ld a, [TileLeft] and 7 cp $0 - jr z, .ok + jr z, .ok_left cp $4 - jr z, .ok + jr z, .ok_left cp $6 ret nz -.ok +.ok_left ld a, [TilePermissions] or FACE_LEFT ld [TilePermissions], a ret ; 29ff -Function29ff:: ; 29ff +.CheckHiNybble and $f0 cp $b0 ret z @@ -1733,9 +1730,8 @@ GetFacingTileCoord:: ; 2a07 srl a ld l, a ld h, 0 -rept 2 - add hl,hl -endr + add hl, hl + add hl, hl ld de, .Directions add hl, de @@ -1777,9 +1773,8 @@ GetCoordTile:: ; 2a3c jr z, .nope ld l, a ld h, $0 -rept 2 - add hl,hl -endr + add hl, hl + add hl, hl ld a, [TilesetCollisionAddress] ld c, a ld a, [TilesetCollisionAddress + 1] @@ -1792,9 +1787,8 @@ endr .nocarry rr e jr nc, .nocarry2 -rept 2 inc hl -endr + inc hl .nocarry2 ld a, [TilesetCollisionBank] @@ -1895,16 +1889,16 @@ CheckIfFacingTileCoordIsSign:: ; 2aaa .copysign pop hl - ld de, EngineBuffer1 + ld de, wCurSignpostYCoord ld bc, 5 ; signpost event length call CopyBytes scf ret ; 2ad4 -CheckCurrentNextMapXYTriggers:: ; 2ad4 +CheckCurrentMapXYTriggers:: ; 2ad4 ; If there are no xy triggers, we don't need to be here. - ld a, [wCurrentNextMapXYTriggerCount] + ld a, [wCurrentMapXYTriggerCount] and a ret z ; Copy the trigger count into c. @@ -1912,16 +1906,15 @@ CheckCurrentNextMapXYTriggers:: ; 2ad4 ld a, [hROMBank] push af call SwitchToMapScriptHeaderBank - call CheckStandingOnXYTrigger + call .TriggerCheck pop hl ld a, h rst Bankswitch ret -; 2ae7 -CheckStandingOnXYTrigger:: ; 2ae7 +.TriggerCheck ; Checks to see if you are standing on an xy-trigger. If yes, copies the trigger to EngineBuffer1 and sets carry. - ld hl, wCurrentNextMapXYTriggerHeaderPointer + ld hl, wCurrentMapXYTriggerHeaderPointer ld a, [hli] ld h, [hl] ld l, a @@ -1969,7 +1962,7 @@ CheckStandingOnXYTrigger:: ; 2ae7 .copytrigger pop hl - ld de, EngineBuffer1 + ld de, wCurCoordEventTriggerID ld bc, 8 ; xy-trigger size call CopyBytes scf @@ -1992,7 +1985,7 @@ CloseSubmenu:: ; 2b3c call UpdateSprites call Call_ExitMenu call ret_d90 - jr Function2b5c + jr FinishExitMenu ; 2b4d ExitAllMenus:: ; 2b4d @@ -2001,7 +1994,7 @@ ExitAllMenus:: ; 2b4d call ReloadTilesetAndPalettes call UpdateSprites call ret_d90 -Function2b5c:: ; 2b5c +FinishExitMenu:: ; 2b5c ld b, SCGB_MAPPALS call GetSGBLayout callba LoadOW_BGPal7 @@ -2066,8 +2059,6 @@ GetMapHeaderPointer:: ; 2be5 ld b, a ld a, [MapNumber] ld c, a -; 2bed - GetAnyMapHeaderPointer:: ; 0x2bed ; Prior to calling this function, you must have switched banks so that ; MapGroupPointers is visible. @@ -2085,9 +2076,8 @@ GetAnyMapHeaderPointer:: ; 0x2bed ld c, b ld b, 0 ld hl, MapGroupPointers -rept 2 add hl, bc -endr + add hl, bc ld a, [hli] ld h, [hl] @@ -2116,8 +2106,6 @@ GetMapHeaderMember:: ; 0x2c04 ld b, a ld a, [MapNumber] ld c, a - ; fallthrough - GetAnyMapHeaderMember:: ; 0x2c0c ; bankswitch ld a, [hROMBank] @@ -2142,8 +2130,6 @@ SwitchToMapBank:: ; 2c1c ld b, a ld a, [MapNumber] ld c, a -; 2c24 - SwitchToAnyMapBank:: ; 2c24 call GetAnyMapBank rst Bankswitch @@ -2155,8 +2141,6 @@ GetMapBank:: ; 2c29 ld b, a ld a, [MapNumber] ld c, a -; 2c31 - GetAnyMapBank:: ; 2c31 push hl push de @@ -2253,8 +2237,7 @@ GetMapPermission:: ; 2c8a ret ; 2c98 -Function2c98:: ; 2c98 - ret + ret ; XXX ; 2c99 GetAnyMapPermission:: ; 2c99 diff --git a/maps/AzaleaTown.asm b/maps/AzaleaTown.asm index 019c1f3fa..7f4c16bea 100644 --- a/maps/AzaleaTown.asm +++ b/maps/AzaleaTown.asm @@ -25,7 +25,7 @@ AzaleaTown_MapScriptHeader: db 1 ; callbacks - dbw 5, .Flypoint + dbw MAPCALLBACK_NEWMAP, .Flypoint .Trigger0 end diff --git a/maps/BattleTowerOutside.asm b/maps/BattleTowerOutside.asm index eab3a5bba..6c04dffe4 100644 --- a/maps/BattleTowerOutside.asm +++ b/maps/BattleTowerOutside.asm @@ -12,8 +12,8 @@ BattleTowerOutside_MapScriptHeader: db 2 ; callbacks - dbw 1, .Callback1 - dbw 2, .Callback2 + dbw MAPCALLBACK_TILES, .Callback1 + dbw MAPCALLBACK_OBJECTS, .Callback2 .Callback1 return diff --git a/maps/BlackthornCity.asm b/maps/BlackthornCity.asm index e4595c181..ea322d168 100644 --- a/maps/BlackthornCity.asm +++ b/maps/BlackthornCity.asm @@ -17,8 +17,8 @@ BlackthornCity_MapScriptHeader: db 2 ; callbacks - dbw 5, .FlyPoint - dbw 2, .Santos + dbw MAPCALLBACK_NEWMAP, .FlyPoint + dbw MAPCALLBACK_OBJECTS, .Santos .FlyPoint setflag ENGINE_FLYPOINT_BLACKTHORN diff --git a/maps/BlackthornGym1F.asm b/maps/BlackthornGym1F.asm index f51805859..7f5b88c4a 100644 --- a/maps/BlackthornGym1F.asm +++ b/maps/BlackthornGym1F.asm @@ -13,7 +13,7 @@ BlackthornGym1F_MapScriptHeader: db 1 ; callbacks - dbw 1, .Boulders + dbw MAPCALLBACK_TILES, .Boulders .Boulders checkevent EVENT_BOULDER_IN_BLACKTHORN_GYM_1 diff --git a/maps/BlackthornGym2F.asm b/maps/BlackthornGym2F.asm index 7d3176c31..14e3b86de 100644 --- a/maps/BlackthornGym2F.asm +++ b/maps/BlackthornGym2F.asm @@ -16,14 +16,14 @@ BlackthornGym2F_MapScriptHeader: db 1 ; callbacks - dbw 3, .Boulders + dbw MAPCALLBACK_PALETTES, .Boulders .Boulders writecmdqueue .BoulderCmdQueue return .BoulderCmdQueue - dbw 2, .BoulderTable ; check if any stones are sitting on a warp + dbw MAPCALLBACK_OBJECTS, .BoulderTable ; check if any stones are sitting on a warp db 0, 0 ; filler .BoulderTable diff --git a/maps/BrunosRoom.asm b/maps/BrunosRoom.asm index 6fe8772ff..a8e06b491 100644 --- a/maps/BrunosRoom.asm +++ b/maps/BrunosRoom.asm @@ -14,7 +14,7 @@ BrunosRoom_MapScriptHeader: ; callbacks - dbw 1, UnknownScript_0x180998 + dbw MAPCALLBACK_TILES, UnknownScript_0x180998 UnknownScript_0x180993: priorityjump UnknownScript_0x1809ad diff --git a/maps/BurnedTower1F.asm b/maps/BurnedTower1F.asm index 56df56768..e892bb68c 100644 --- a/maps/BurnedTower1F.asm +++ b/maps/BurnedTower1F.asm @@ -19,7 +19,7 @@ BurnedTower1F_MapScriptHeader: ; callbacks - dbw 1, .HoleAndLadder + dbw MAPCALLBACK_TILES, .HoleAndLadder .Trigger0: priorityjump .EusineTrigger diff --git a/maps/BurnedTowerB1F.asm b/maps/BurnedTowerB1F.asm index 623f38dcb..3ab89533c 100644 --- a/maps/BurnedTowerB1F.asm +++ b/maps/BurnedTowerB1F.asm @@ -22,7 +22,7 @@ BurnedTowerB1F_MapScriptHeader: ; callbacks - dbw 1, UnknownScript_0x186160 + dbw MAPCALLBACK_TILES, UnknownScript_0x186160 UnknownScript_0x18615e: end diff --git a/maps/CeladonCity.asm b/maps/CeladonCity.asm index 0dde68efd..fc521d650 100644 --- a/maps/CeladonCity.asm +++ b/maps/CeladonCity.asm @@ -17,7 +17,7 @@ CeladonCity_MapScriptHeader: db 1 ; callbacks - dbw 5, .FlyPoint + dbw MAPCALLBACK_NEWMAP, .FlyPoint .FlyPoint setflag ENGINE_FLYPOINT_CELADON diff --git a/maps/CeladonDeptStore6F.asm b/maps/CeladonDeptStore6F.asm index 3abeda346..a673a2e11 100644 --- a/maps/CeladonDeptStore6F.asm +++ b/maps/CeladonDeptStore6F.asm @@ -11,7 +11,7 @@ CeladonDeptStore6F_MapScriptHeader: ; callbacks - dbw 1, .Callback + dbw MAPCALLBACK_TILES, .Callback .Callback: changeblock $c, $0, $3 diff --git a/maps/CeruleanCity.asm b/maps/CeruleanCity.asm index b841f3f78..6d2720cbc 100644 --- a/maps/CeruleanCity.asm +++ b/maps/CeruleanCity.asm @@ -14,7 +14,7 @@ CeruleanCity_MapScriptHeader: db 1 ; callbacks - dbw 5, .FlyPoint + dbw MAPCALLBACK_NEWMAP, .FlyPoint .FlyPoint setflag ENGINE_FLYPOINT_CERULEAN diff --git a/maps/CherrygroveCity.asm b/maps/CherrygroveCity.asm index 20ae78fc1..c123b74bf 100644 --- a/maps/CherrygroveCity.asm +++ b/maps/CherrygroveCity.asm @@ -17,7 +17,7 @@ CherrygroveCity_MapScriptHeader: db 1 ; callbacks - dbw 5, .FlyPoint + dbw MAPCALLBACK_NEWMAP, .FlyPoint .Trigger0 end diff --git a/maps/CianwoodCity.asm b/maps/CianwoodCity.asm index aa5ff3a02..657e30bc7 100644 --- a/maps/CianwoodCity.asm +++ b/maps/CianwoodCity.asm @@ -24,7 +24,7 @@ CianwoodCity_MapScriptHeader: db 1 ; callbacks - dbw 5, .FlyPointAndSuicune + dbw MAPCALLBACK_NEWMAP, .FlyPointAndSuicune .Trigger0 end diff --git a/maps/CinnabarIsland.asm b/maps/CinnabarIsland.asm index 6823bc8a7..cc73856d2 100644 --- a/maps/CinnabarIsland.asm +++ b/maps/CinnabarIsland.asm @@ -9,7 +9,7 @@ CinnabarIsland_MapScriptHeader: db 1 ; callbacks - dbw 5, .FlyPoint + dbw MAPCALLBACK_NEWMAP, .FlyPoint .FlyPoint setflag ENGINE_FLYPOINT_CINNABAR diff --git a/maps/Colosseum.asm b/maps/Colosseum.asm index ef2e6c2b7..25794f5c0 100644 --- a/maps/Colosseum.asm +++ b/maps/Colosseum.asm @@ -16,9 +16,9 @@ Colosseum_MapScriptHeader: ; callbacks - dbw 2, ColosseumScript_SetWhichChris + dbw MAPCALLBACK_OBJECTS, ColosseumScript_SetWhichChris - dbw 5, ColosseumScript_InitializeCB + dbw MAPCALLBACK_NEWMAP, ColosseumScript_InitializeCB .Trigger0: priorityjump ColosseumScript_Initialize diff --git a/maps/CopycatsHouse2F.asm b/maps/CopycatsHouse2F.asm index b25ba93be..aabfc0eb3 100644 --- a/maps/CopycatsHouse2F.asm +++ b/maps/CopycatsHouse2F.asm @@ -15,7 +15,7 @@ CopycatsHouse2F_MapScriptHeader: ; callbacks - dbw 2, CopycatsHouse2FCallback + dbw MAPCALLBACK_OBJECTS, CopycatsHouse2FCallback CopycatsHouse2FCallback: checkflag ENGINE_PLAYER_IS_FEMALE diff --git a/maps/DayCare.asm b/maps/DayCare.asm index d6fbd8853..1eb84e034 100644 --- a/maps/DayCare.asm +++ b/maps/DayCare.asm @@ -11,7 +11,7 @@ DayCare_MapScriptHeader: ; callbacks - dbw 2, .EggCheckCallback + dbw MAPCALLBACK_OBJECTS, .EggCheckCallback .EggCheckCallback: checkflag ENGINE_DAYCARE_MAN_HAS_EGG diff --git a/maps/DragonsDenB1F.asm b/maps/DragonsDenB1F.asm index fbde11df1..c6b94ca74 100644 --- a/maps/DragonsDenB1F.asm +++ b/maps/DragonsDenB1F.asm @@ -22,7 +22,7 @@ DragonsDenB1F_MapScriptHeader: ; callbacks - dbw 5, .CheckSilver + dbw MAPCALLBACK_NEWMAP, .CheckSilver .Trigger0: end diff --git a/maps/EcruteakCity.asm b/maps/EcruteakCity.asm index 0b5fd1192..b0b3c8ab8 100644 --- a/maps/EcruteakCity.asm +++ b/maps/EcruteakCity.asm @@ -15,7 +15,7 @@ EcruteakCity_MapScriptHeader: db 1 ; callbacks - dbw 5, .FlyPoint + dbw MAPCALLBACK_NEWMAP, .FlyPoint .FlyPoint setflag ENGINE_FLYPOINT_ECRUTEAK diff --git a/maps/EcruteakHouse.asm b/maps/EcruteakHouse.asm index 39649cd41..a11746e9a 100644 --- a/maps/EcruteakHouse.asm +++ b/maps/EcruteakHouse.asm @@ -17,7 +17,7 @@ EcruteakHouse_MapScriptHeader: ; callbacks - dbw 2, .InitializeSages + dbw MAPCALLBACK_OBJECTS, .InitializeSages .Trigger0: end diff --git a/maps/ElmsLab.asm b/maps/ElmsLab.asm index 02869d85b..4dbffe754 100644 --- a/maps/ElmsLab.asm +++ b/maps/ElmsLab.asm @@ -23,7 +23,7 @@ ElmsLab_MapScriptHeader: ; callbacks - dbw 2, .Callback_MoveElm + dbw MAPCALLBACK_OBJECTS, .Callback_MoveElm .Trigger0: priorityjump ElmsLab_AutowalkUpToElm diff --git a/maps/FuchsiaCity.asm b/maps/FuchsiaCity.asm index 50f7664fd..898fd20a0 100644 --- a/maps/FuchsiaCity.asm +++ b/maps/FuchsiaCity.asm @@ -12,7 +12,7 @@ FuchsiaCity_MapScriptHeader: db 1 ; callbacks - dbw 5, .FlyPoint + dbw MAPCALLBACK_NEWMAP, .FlyPoint .FlyPoint setflag ENGINE_FLYPOINT_FUCHSIA diff --git a/maps/GoldenrodCity.asm b/maps/GoldenrodCity.asm index e50f6e223..598e7405f 100644 --- a/maps/GoldenrodCity.asm +++ b/maps/GoldenrodCity.asm @@ -23,8 +23,8 @@ GoldenrodCity_MapScriptHeader: db 2 ; callbacks - dbw 5, .FlyPointAndFloria - dbw 2, .MoveTutor + dbw MAPCALLBACK_NEWMAP, .FlyPointAndFloria + dbw MAPCALLBACK_OBJECTS, .MoveTutor .FlyPointAndFloria setflag ENGINE_FLYPOINT_GOLDENROD diff --git a/maps/GoldenrodDeptStore5F.asm b/maps/GoldenrodDeptStore5F.asm index 72d299472..32a6691fe 100644 --- a/maps/GoldenrodDeptStore5F.asm +++ b/maps/GoldenrodDeptStore5F.asm @@ -15,7 +15,7 @@ GoldenrodDeptStore5F_MapScriptHeader: ; callbacks - dbw 2, .CheckIfSunday + dbw MAPCALLBACK_OBJECTS, .CheckIfSunday .CheckIfSunday: checkcode VAR_WEEKDAY diff --git a/maps/GoldenrodDeptStoreB1F.asm b/maps/GoldenrodDeptStoreB1F.asm index 3fd4b6e97..e8489bbb5 100644 --- a/maps/GoldenrodDeptStoreB1F.asm +++ b/maps/GoldenrodDeptStoreB1F.asm @@ -17,9 +17,9 @@ GoldenrodDeptStoreB1F_MapScriptHeader: ; callbacks - dbw 1, UnknownScript_0x7d781 + dbw MAPCALLBACK_TILES, UnknownScript_0x7d781 - dbw 5, UnknownScript_0x7d7ac + dbw MAPCALLBACK_NEWMAP, UnknownScript_0x7d7ac UnknownScript_0x7d781: checkevent EVENT_RECEIVED_CARD_KEY diff --git a/maps/GoldenrodDeptStoreRoof.asm b/maps/GoldenrodDeptStoreRoof.asm index 6a95af206..34829c3fa 100644 --- a/maps/GoldenrodDeptStoreRoof.asm +++ b/maps/GoldenrodDeptStoreRoof.asm @@ -17,9 +17,9 @@ GoldenrodDeptStoreRoof_MapScriptHeader: ; callbacks - dbw 1, .CheckSaleChangeBlock + dbw MAPCALLBACK_TILES, .CheckSaleChangeBlock - dbw 2, .CheckSaleChangeClerk + dbw MAPCALLBACK_OBJECTS, .CheckSaleChangeClerk .CheckSaleChangeBlock: checkflag ENGINE_GOLDENROD_DEPT_STORE_SALE_IS_ON diff --git a/maps/GoldenrodGameCorner.asm b/maps/GoldenrodGameCorner.asm index d1fa4bc43..ec85ea6eb 100644 --- a/maps/GoldenrodGameCorner.asm +++ b/maps/GoldenrodGameCorner.asm @@ -21,7 +21,7 @@ GoldenrodGameCorner_MapScriptHeader: ; callbacks - dbw 2, .Callback + dbw MAPCALLBACK_OBJECTS, .Callback .Callback checkevent EVENT_BEAT_ELITE_FOUR diff --git a/maps/IcePathB1F.asm b/maps/IcePathB1F.asm index 510e4e458..346b545b9 100644 --- a/maps/IcePathB1F.asm +++ b/maps/IcePathB1F.asm @@ -14,14 +14,14 @@ IcePathB1F_MapScriptHeader: ; callbacks - dbw 3, .SetUpStoneTable + dbw MAPCALLBACK_PALETTES, .SetUpStoneTable .SetUpStoneTable: writecmdqueue .CommandQueue return .CommandQueue: - dbw 2, .StoneTable ; check if any stones are sitting on a warp + dbw MAPCALLBACK_OBJECTS, .StoneTable ; check if any stones are sitting on a warp db 0, 0 ; filler .StoneTable: diff --git a/maps/IlexForest.asm b/maps/IlexForest.asm index 5e6ad9f2e..c3dba4ac7 100644 --- a/maps/IlexForest.asm +++ b/maps/IlexForest.asm @@ -20,7 +20,7 @@ IlexForest_MapScriptHeader: ; callbacks - dbw 2, .FarfetchdCallback + dbw MAPCALLBACK_OBJECTS, .FarfetchdCallback .FarfetchdCallback: checkevent EVENT_GOT_HM01_CUT diff --git a/maps/IndigoPlateauPokeCenter1F.asm b/maps/IndigoPlateauPokeCenter1F.asm index 620008472..49678a955 100644 --- a/maps/IndigoPlateauPokeCenter1F.asm +++ b/maps/IndigoPlateauPokeCenter1F.asm @@ -18,7 +18,7 @@ IndigoPlateauPokeCenter1F_MapScriptHeader: ; callbacks - dbw 5, UnknownScript_0x18000a + dbw MAPCALLBACK_NEWMAP, UnknownScript_0x18000a UnknownScript_0x180009: end diff --git a/maps/KarensRoom.asm b/maps/KarensRoom.asm index 035346da9..c1e8a93cf 100644 --- a/maps/KarensRoom.asm +++ b/maps/KarensRoom.asm @@ -14,7 +14,7 @@ KarensRoom_MapScriptHeader: ; callbacks - dbw 1, UnknownScript_0x180bc1 + dbw MAPCALLBACK_TILES, UnknownScript_0x180bc1 UnknownScript_0x180bbc: priorityjump UnknownScript_0x180bd6 diff --git a/maps/KogasRoom.asm b/maps/KogasRoom.asm index 47ab0ba7c..2ed66f1bd 100644 --- a/maps/KogasRoom.asm +++ b/maps/KogasRoom.asm @@ -14,7 +14,7 @@ KogasRoom_MapScriptHeader: ; callbacks - dbw 1, UnknownScript_0x18072d + dbw MAPCALLBACK_TILES, UnknownScript_0x18072d UnknownScript_0x180728: priorityjump UnknownScript_0x180742 diff --git a/maps/KrissHouse2F.asm b/maps/KrissHouse2F.asm index c6dc28738..a66ed5948 100644 --- a/maps/KrissHouse2F.asm +++ b/maps/KrissHouse2F.asm @@ -13,9 +13,9 @@ KrissHouse2F_MapScriptHeader: ; callbacks - dbw 5, .InitializeRoom + dbw MAPCALLBACK_NEWMAP, .InitializeRoom - dbw 1, .SetSpawn + dbw MAPCALLBACK_TILES, .SetSpawn .Null: end diff --git a/maps/KurtsHouse.asm b/maps/KurtsHouse.asm index e0f4555c9..f3dd687bd 100644 --- a/maps/KurtsHouse.asm +++ b/maps/KurtsHouse.asm @@ -14,7 +14,7 @@ KurtsHouse_MapScriptHeader: ; callbacks - dbw 2, UnknownScript_0x18e154 + dbw MAPCALLBACK_OBJECTS, UnknownScript_0x18e154 UnknownScript_0x18e154: checkevent EVENT_CLEARED_SLOWPOKE_WELL diff --git a/maps/LakeofRage.asm b/maps/LakeofRage.asm index fa54e6afe..1b44fc7eb 100644 --- a/maps/LakeofRage.asm +++ b/maps/LakeofRage.asm @@ -25,8 +25,8 @@ LakeofRage_MapScriptHeader: ; callbacks - dbw 5, .FlyPoint - dbw 2, .Wesley + dbw MAPCALLBACK_NEWMAP, .FlyPoint + dbw MAPCALLBACK_OBJECTS, .Wesley .Trigger0 end diff --git a/maps/LancesRoom.asm b/maps/LancesRoom.asm index db050db6d..6188ac56d 100644 --- a/maps/LancesRoom.asm +++ b/maps/LancesRoom.asm @@ -16,7 +16,7 @@ LancesRoom_MapScriptHeader: ; callbacks - dbw 1, UnknownScript_0x180e3e + dbw MAPCALLBACK_TILES, UnknownScript_0x180e3e UnknownScript_0x180e39: priorityjump UnknownScript_0x180e53 diff --git a/maps/LavenderTown.asm b/maps/LavenderTown.asm index d10cce8d0..fe5e393bd 100644 --- a/maps/LavenderTown.asm +++ b/maps/LavenderTown.asm @@ -12,7 +12,7 @@ LavenderTown_MapScriptHeader: db 1 ; callbacks - dbw 5, .FlyPoint + dbw MAPCALLBACK_NEWMAP, .FlyPoint .FlyPoint setflag ENGINE_FLYPOINT_LAVENDER diff --git a/maps/MahoganyMart1F.asm b/maps/MahoganyMart1F.asm index 3bb527c2c..77d5cdc85 100644 --- a/maps/MahoganyMart1F.asm +++ b/maps/MahoganyMart1F.asm @@ -18,7 +18,7 @@ MahoganyMart1F_MapScriptHeader: ; callbacks - dbw 1, UnknownScript_0x6c35b + dbw MAPCALLBACK_TILES, UnknownScript_0x6c35b UnknownScript_0x6c356: end diff --git a/maps/MahoganyTown.asm b/maps/MahoganyTown.asm index 7420f4bfc..5b282e0b3 100644 --- a/maps/MahoganyTown.asm +++ b/maps/MahoganyTown.asm @@ -16,7 +16,7 @@ MahoganyTown_MapScriptHeader: db 1 ; callbacks - dbw 5, .FlyPoint + dbw MAPCALLBACK_NEWMAP, .FlyPoint .Trigger0 end diff --git a/maps/MountMoonSquare.asm b/maps/MountMoonSquare.asm index c897757cb..96a3c7c1c 100644 --- a/maps/MountMoonSquare.asm +++ b/maps/MountMoonSquare.asm @@ -15,9 +15,9 @@ MountMoonSquare_MapScriptHeader: ; callbacks - dbw 5, UnknownScript_0x77093 + dbw MAPCALLBACK_NEWMAP, UnknownScript_0x77093 - dbw 2, UnknownScript_0x77097 + dbw MAPCALLBACK_OBJECTS, UnknownScript_0x77097 UnknownScript_0x77092: end diff --git a/maps/NewBarkTown.asm b/maps/NewBarkTown.asm index 11f582af5..e2d7155f7 100644 --- a/maps/NewBarkTown.asm +++ b/maps/NewBarkTown.asm @@ -15,7 +15,7 @@ NewBarkTown_MapScriptHeader: db 1 ; callbacks - dbw 5, .FlyPoint + dbw MAPCALLBACK_NEWMAP, .FlyPoint .Trigger0 end diff --git a/maps/OlivineCity.asm b/maps/OlivineCity.asm index c93a32374..03ca03fbe 100644 --- a/maps/OlivineCity.asm +++ b/maps/OlivineCity.asm @@ -16,7 +16,7 @@ OlivineCity_MapScriptHeader: db 1 ; callbacks - dbw 5, .FlyPoint + dbw MAPCALLBACK_NEWMAP, .FlyPoint .Trigger0 end diff --git a/maps/PalletTown.asm b/maps/PalletTown.asm index 3b63dada5..900a4bf20 100644 --- a/maps/PalletTown.asm +++ b/maps/PalletTown.asm @@ -10,7 +10,7 @@ PalletTown_MapScriptHeader: db 1 ; callbacks - dbw 5, .FlyPoint + dbw MAPCALLBACK_NEWMAP, .FlyPoint .FlyPoint setflag ENGINE_FLYPOINT_PALLET diff --git a/maps/PewterCity.asm b/maps/PewterCity.asm index 5baaf418d..9d60b3a2e 100644 --- a/maps/PewterCity.asm +++ b/maps/PewterCity.asm @@ -13,7 +13,7 @@ PewterCity_MapScriptHeader: db 1 ; callbacks - dbw 5, .FlyPoint + dbw MAPCALLBACK_NEWMAP, .FlyPoint .FlyPoint setflag ENGINE_FLYPOINT_PEWTER diff --git a/maps/RadioTower3F.asm b/maps/RadioTower3F.asm index d848ddd09..13c953d8d 100644 --- a/maps/RadioTower3F.asm +++ b/maps/RadioTower3F.asm @@ -16,7 +16,7 @@ RadioTower3F_MapScriptHeader: ; callbacks - dbw 1, UnknownScript_0x5e543 + dbw MAPCALLBACK_TILES, UnknownScript_0x5e543 UnknownScript_0x5e543: checkevent EVENT_USED_THE_CARD_KEY_IN_THE_RADIO_TOWER diff --git a/maps/Route16.asm b/maps/Route16.asm index d5c1454d0..46b49f3be 100644 --- a/maps/Route16.asm +++ b/maps/Route16.asm @@ -8,7 +8,7 @@ Route16_MapScriptHeader: ; callbacks - dbw 5, UnknownScript_0x1ad318 + dbw MAPCALLBACK_NEWMAP, UnknownScript_0x1ad318 UnknownScript_0x1ad318: checkcode VAR_YCOORD diff --git a/maps/Route17.asm b/maps/Route17.asm index 1520d3eeb..7969259cc 100644 --- a/maps/Route17.asm +++ b/maps/Route17.asm @@ -13,7 +13,7 @@ Route17_MapScriptHeader: ; callbacks - dbw 5, UnknownScript_0x1ad0ab + dbw MAPCALLBACK_NEWMAP, UnknownScript_0x1ad0ab UnknownScript_0x1ad0ab: setflag ENGINE_ALWAYS_ON_BIKE diff --git a/maps/Route19.asm b/maps/Route19.asm index bf1fc5dcb..7bbec34e3 100644 --- a/maps/Route19.asm +++ b/maps/Route19.asm @@ -15,7 +15,7 @@ Route19_MapScriptHeader: ; callbacks - dbw 1, .ClearRocks + dbw MAPCALLBACK_TILES, .ClearRocks .ClearRocks checkevent EVENT_CINNABAR_ROCKS_CLEARED diff --git a/maps/Route20.asm b/maps/Route20.asm index 69cfea8eb..309713b57 100644 --- a/maps/Route20.asm +++ b/maps/Route20.asm @@ -12,7 +12,7 @@ Route20_MapScriptHeader: ; callbacks - dbw 5, .ClearRocks + dbw MAPCALLBACK_NEWMAP, .ClearRocks .ClearRocks setevent EVENT_CINNABAR_ROCKS_CLEARED diff --git a/maps/Route23.asm b/maps/Route23.asm index 8f4fc6a56..07362658d 100644 --- a/maps/Route23.asm +++ b/maps/Route23.asm @@ -7,7 +7,7 @@ Route23_MapScriptHeader: db 1 ; callbacks - dbw 5, .FlyPoint + dbw MAPCALLBACK_NEWMAP, .FlyPoint .FlyPoint setflag ENGINE_FLYPOINT_INDIGO_PLATEAU diff --git a/maps/Route29.asm b/maps/Route29.asm index b0cefef44..0d4a5c2ab 100644 --- a/maps/Route29.asm +++ b/maps/Route29.asm @@ -21,7 +21,7 @@ Route29_MapScriptHeader: ; callbacks - dbw 2, .Tuscany + dbw MAPCALLBACK_OBJECTS, .Tuscany .Trigger0: end diff --git a/maps/Route31.asm b/maps/Route31.asm index 3309e292a..a9f9591de 100644 --- a/maps/Route31.asm +++ b/maps/Route31.asm @@ -16,7 +16,7 @@ Route31_MapScriptHeader: ; callbacks - dbw 5, .CheckMomCall + dbw MAPCALLBACK_NEWMAP, .CheckMomCall .CheckMomCall: checkevent EVENT_TALKED_TO_MOM_AFTER_MYSTERY_EGG_QUEST diff --git a/maps/Route32.asm b/maps/Route32.asm index 3081e9e26..48011ae9d 100644 --- a/maps/Route32.asm +++ b/maps/Route32.asm @@ -28,7 +28,7 @@ Route32_MapScriptHeader: ; callbacks - dbw 2, .Frieda + dbw MAPCALLBACK_OBJECTS, .Frieda .Trigger0: end diff --git a/maps/Route34.asm b/maps/Route34.asm index d17dea61c..39304cc56 100644 --- a/maps/Route34.asm +++ b/maps/Route34.asm @@ -22,7 +22,7 @@ Route34_MapScriptHeader: ; callbacks - dbw 2, .EggCheckCallback + dbw MAPCALLBACK_OBJECTS, .EggCheckCallback .EggCheckCallback: checkflag ENGINE_DAYCARE_MAN_HAS_EGG diff --git a/maps/Route34IlexForestGate.asm b/maps/Route34IlexForestGate.asm index ad3e5c5e0..4f66cb6ed 100644 --- a/maps/Route34IlexForestGate.asm +++ b/maps/Route34IlexForestGate.asm @@ -13,7 +13,7 @@ Route34IlexForestGate_MapScriptHeader: ; callbacks - dbw 2, UnknownScript_0x62d2d + dbw MAPCALLBACK_OBJECTS, UnknownScript_0x62d2d UnknownScript_0x62d2d: checkevent EVENT_FOREST_IS_RESTLESS diff --git a/maps/Route35NationalParkgate.asm b/maps/Route35NationalParkgate.asm index d0a770bbe..f20bf7be0 100644 --- a/maps/Route35NationalParkgate.asm +++ b/maps/Route35NationalParkgate.asm @@ -17,9 +17,9 @@ Route35NationalParkgate_MapScriptHeader: ; callbacks - dbw 5, Route35NationalParkgate_CheckIfStillInContest + dbw MAPCALLBACK_NEWMAP, Route35NationalParkgate_CheckIfStillInContest - dbw 2, Route35NationalParkgate_CheckIfContestDay + dbw MAPCALLBACK_OBJECTS, Route35NationalParkgate_CheckIfContestDay Route35NationalParkgate_Trigger1: end diff --git a/maps/Route36.asm b/maps/Route36.asm index 87e44c101..7e3af11d7 100644 --- a/maps/Route36.asm +++ b/maps/Route36.asm @@ -22,7 +22,7 @@ Route36_MapScriptHeader: ; callbacks - dbw 2, ArthurCallback + dbw MAPCALLBACK_OBJECTS, ArthurCallback UnknownScript_0x19400d: end diff --git a/maps/Route36NationalParkgate.asm b/maps/Route36NationalParkgate.asm index 6d4ecd450..3c4527813 100644 --- a/maps/Route36NationalParkgate.asm +++ b/maps/Route36NationalParkgate.asm @@ -26,9 +26,9 @@ Route36NationalParkgate_MapScriptHeader: ; callbacks - dbw 5, .CheckIfContestRunning + dbw MAPCALLBACK_NEWMAP, .CheckIfContestRunning - dbw 2, .CheckIfContestAvailable + dbw MAPCALLBACK_OBJECTS, .CheckIfContestAvailable .Trigger0: end diff --git a/maps/Route37.asm b/maps/Route37.asm index 54081e849..58e730ac0 100644 --- a/maps/Route37.asm +++ b/maps/Route37.asm @@ -16,7 +16,7 @@ Route37_MapScriptHeader: ; callbacks - dbw 2, SunnyCallback + dbw MAPCALLBACK_OBJECTS, SunnyCallback SunnyCallback: checkcode VAR_WEEKDAY diff --git a/maps/Route40.asm b/maps/Route40.asm index 65e040604..7ed17cdaf 100644 --- a/maps/Route40.asm +++ b/maps/Route40.asm @@ -21,7 +21,7 @@ Route40_MapScriptHeader: ; callbacks - dbw 2, MonicaCallback + dbw MAPCALLBACK_OBJECTS, MonicaCallback MonicaCallback: clearevent EVENT_BATTLE_TOWER_OUTSIDE_SAILOR diff --git a/maps/Route40BattleTowerGate.asm b/maps/Route40BattleTowerGate.asm index ad98bb81e..4e6cfa8cb 100644 --- a/maps/Route40BattleTowerGate.asm +++ b/maps/Route40BattleTowerGate.asm @@ -11,7 +11,7 @@ Route40BattleTowerGate_MapScriptHeader: ; callbacks - dbw 2, UnknownScript_0x9f665 + dbw MAPCALLBACK_OBJECTS, UnknownScript_0x9f665 UnknownScript_0x9f665: clearevent EVENT_BATTLE_TOWER_OUTSIDE_SAILOR diff --git a/maps/Route43.asm b/maps/Route43.asm index ddc2bfa1c..5396f4545 100644 --- a/maps/Route43.asm +++ b/maps/Route43.asm @@ -17,7 +17,7 @@ Route43_MapScriptHeader: ; callbacks - dbw 5, UnknownScript_0x19d051 + dbw MAPCALLBACK_NEWMAP, UnknownScript_0x19d051 UnknownScript_0x19d051: checkevent EVENT_CLEARED_ROCKET_HIDEOUT diff --git a/maps/Route43Gate.asm b/maps/Route43Gate.asm index 602f016ac..42801472b 100644 --- a/maps/Route43Gate.asm +++ b/maps/Route43Gate.asm @@ -16,7 +16,7 @@ Route43Gate_MapScriptHeader: ; callbacks - dbw 5, UnknownScript_0x19abca + dbw MAPCALLBACK_NEWMAP, UnknownScript_0x19abca UnknownScript_0x19abc5: priorityjump UnknownScript_0x19abda diff --git a/maps/RuinsofAlphAerodactylChamber.asm b/maps/RuinsofAlphAerodactylChamber.asm index 31a5a373f..3550ee2a2 100644 --- a/maps/RuinsofAlphAerodactylChamber.asm +++ b/maps/RuinsofAlphAerodactylChamber.asm @@ -12,7 +12,7 @@ RuinsofAlphAerodactylChamber_MapScriptHeader: ; callbacks - dbw 1, UnknownScript_0x58db9 + dbw MAPCALLBACK_TILES, UnknownScript_0x58db9 UnknownScript_0x58dad: checkevent EVENT_WALL_OPENED_IN_AERODACTYL_CHAMBER diff --git a/maps/RuinsofAlphHoOhChamber.asm b/maps/RuinsofAlphHoOhChamber.asm index e27439fdc..1c3fff442 100644 --- a/maps/RuinsofAlphHoOhChamber.asm +++ b/maps/RuinsofAlphHoOhChamber.asm @@ -12,7 +12,7 @@ RuinsofAlphHoOhChamber_MapScriptHeader: ; callbacks - dbw 1, UnknownScript_0x5857c + dbw MAPCALLBACK_TILES, UnknownScript_0x5857c UnknownScript_0x5856d: special SpecialHoOhChamber diff --git a/maps/RuinsofAlphKabutoChamber.asm b/maps/RuinsofAlphKabutoChamber.asm index c27f000c3..c46daa6f3 100644 --- a/maps/RuinsofAlphKabutoChamber.asm +++ b/maps/RuinsofAlphKabutoChamber.asm @@ -15,7 +15,7 @@ RuinsofAlphKabutoChamber_MapScriptHeader: ; callbacks - dbw 1, UnknownScript_0x58737 + dbw MAPCALLBACK_TILES, UnknownScript_0x58737 UnknownScript_0x5872b: checkevent EVENT_WALL_OPENED_IN_KABUTO_CHAMBER diff --git a/maps/RuinsofAlphOmanyteChamber.asm b/maps/RuinsofAlphOmanyteChamber.asm index 701eca02d..89e7deae2 100644 --- a/maps/RuinsofAlphOmanyteChamber.asm +++ b/maps/RuinsofAlphOmanyteChamber.asm @@ -12,7 +12,7 @@ RuinsofAlphOmanyteChamber_MapScriptHeader: ; callbacks - dbw 1, UnknownScript_0x58bf8 + dbw MAPCALLBACK_TILES, UnknownScript_0x58bf8 UnknownScript_0x58be9: special SpecialOmanyteChamber diff --git a/maps/RuinsofAlphOutside.asm b/maps/RuinsofAlphOutside.asm index 6464b409e..e9d479850 100644 --- a/maps/RuinsofAlphOutside.asm +++ b/maps/RuinsofAlphOutside.asm @@ -18,7 +18,7 @@ RuinsofAlphOutside_MapScriptHeader: ; callbacks - dbw 2, UnknownScript_0x5800f + dbw MAPCALLBACK_OBJECTS, UnknownScript_0x5800f UnknownScript_0x5800d: end diff --git a/maps/RuinsofAlphResearchCenter.asm b/maps/RuinsofAlphResearchCenter.asm index 44e67ff83..988198340 100644 --- a/maps/RuinsofAlphResearchCenter.asm +++ b/maps/RuinsofAlphResearchCenter.asm @@ -16,7 +16,7 @@ RuinsofAlphResearchCenter_MapScriptHeader: ; callbacks - dbw 2, UnknownScript_0x59185 + dbw MAPCALLBACK_OBJECTS, UnknownScript_0x59185 UnknownScript_0x59180: end diff --git a/maps/SaffronCity.asm b/maps/SaffronCity.asm index c3bf50008..114e79ad7 100644 --- a/maps/SaffronCity.asm +++ b/maps/SaffronCity.asm @@ -16,7 +16,7 @@ SaffronCity_MapScriptHeader: db 1 ; callbacks - dbw 5, .FlyPoint + dbw MAPCALLBACK_NEWMAP, .FlyPoint .FlyPoint setflag ENGINE_FLYPOINT_SAFFRON diff --git a/maps/SilverCaveOutside.asm b/maps/SilverCaveOutside.asm index 9e050cf72..1354eeeb7 100644 --- a/maps/SilverCaveOutside.asm +++ b/maps/SilverCaveOutside.asm @@ -7,7 +7,7 @@ SilverCaveOutside_MapScriptHeader: db 1 ; callbacks - dbw 5, .FlyPoint + dbw MAPCALLBACK_NEWMAP, .FlyPoint .FlyPoint setflag ENGINE_FLYPOINT_SILVER_CAVE diff --git a/maps/TeamRocketBaseB1F.asm b/maps/TeamRocketBaseB1F.asm index ce4e59931..d535c925b 100644 --- a/maps/TeamRocketBaseB1F.asm +++ b/maps/TeamRocketBaseB1F.asm @@ -18,7 +18,7 @@ TeamRocketBaseB1F_MapScriptHeader: ; callbacks - dbw 2, .Callback1 + dbw MAPCALLBACK_OBJECTS, .Callback1 .Trigger0: end diff --git a/maps/TeamRocketBaseB2F.asm b/maps/TeamRocketBaseB2F.asm index 3a675f92e..4df43d739 100644 --- a/maps/TeamRocketBaseB2F.asm +++ b/maps/TeamRocketBaseB2F.asm @@ -29,7 +29,7 @@ TeamRocketBaseB2F_MapScriptHeader: ; callbacks - dbw 1, UnknownScript_0x6cf89 + dbw MAPCALLBACK_TILES, UnknownScript_0x6cf89 UnknownScript_0x6cf85: end diff --git a/maps/TeamRocketBaseB3F.asm b/maps/TeamRocketBaseB3F.asm index 591a2b411..e49a2b39a 100644 --- a/maps/TeamRocketBaseB3F.asm +++ b/maps/TeamRocketBaseB3F.asm @@ -29,7 +29,7 @@ TeamRocketBaseB3F_MapScriptHeader: ; callbacks - dbw 1, .CheckGiovanniDoor + dbw MAPCALLBACK_TILES, .CheckGiovanniDoor .Trigger0: priorityjump LanceScript_0x6dffc diff --git a/maps/TimeCapsule.asm b/maps/TimeCapsule.asm index 6a5f4d0ae..014e0d26b 100644 --- a/maps/TimeCapsule.asm +++ b/maps/TimeCapsule.asm @@ -15,7 +15,7 @@ TimeCapsule_MapScriptHeader: ; callbacks - dbw 2, TimeCapsule_SetWhichChris + dbw MAPCALLBACK_OBJECTS, TimeCapsule_SetWhichChris .Trigger0: priorityjump TimeCapsule_Initialize diff --git a/maps/TinTower1F.asm b/maps/TinTower1F.asm index b0164dc88..4d23f2ce1 100644 --- a/maps/TinTower1F.asm +++ b/maps/TinTower1F.asm @@ -23,9 +23,9 @@ TinTower1F_MapScriptHeader: ; callbacks - dbw 2, UnknownScript_0x18502f + dbw MAPCALLBACK_OBJECTS, UnknownScript_0x18502f - dbw 1, UnknownScript_0x185084 + dbw MAPCALLBACK_TILES, UnknownScript_0x185084 UnknownScript_0x18502a: priorityjump UnknownScript_0x18508f diff --git a/maps/TinTowerRoof.asm b/maps/TinTowerRoof.asm index 61698aeae..bdfc8bb33 100644 --- a/maps/TinTowerRoof.asm +++ b/maps/TinTowerRoof.asm @@ -10,7 +10,7 @@ TinTowerRoof_MapScriptHeader: ; callbacks - dbw 2, UnknownScript_0x77230 + dbw MAPCALLBACK_OBJECTS, UnknownScript_0x77230 UnknownScript_0x77230: checkevent EVENT_FOUGHT_HO_OH diff --git a/maps/TradeCenter.asm b/maps/TradeCenter.asm index 0da64c429..36f476de4 100644 --- a/maps/TradeCenter.asm +++ b/maps/TradeCenter.asm @@ -15,7 +15,7 @@ TradeCenter_MapScriptHeader: ; callbacks - dbw 2, TradeCenter_SetWhichChris + dbw MAPCALLBACK_OBJECTS, TradeCenter_SetWhichChris .Trigger0: priorityjump TradeCenter_Initialize diff --git a/maps/UndergroundPathSwitchRoomEntrances.asm b/maps/UndergroundPathSwitchRoomEntrances.asm index 3cfd5363e..078242827 100644 --- a/maps/UndergroundPathSwitchRoomEntrances.asm +++ b/maps/UndergroundPathSwitchRoomEntrances.asm @@ -56,7 +56,7 @@ UndergroundPathSwitchRoomEntrances_MapScriptHeader: ; callbacks - dbw 1, .UpdateDoorPositions + dbw MAPCALLBACK_TILES, .UpdateDoorPositions .Trigger0: end diff --git a/maps/UndergroundWarehouse.asm b/maps/UndergroundWarehouse.asm index 84db4ed32..32454451c 100644 --- a/maps/UndergroundWarehouse.asm +++ b/maps/UndergroundWarehouse.asm @@ -16,7 +16,7 @@ UndergroundWarehouse_MapScriptHeader: ; callbacks - dbw 5, .ResetSwitches + dbw MAPCALLBACK_NEWMAP, .ResetSwitches .ResetSwitches: clearevent EVENT_SWITCH_1 diff --git a/maps/UnionCaveB2F.asm b/maps/UnionCaveB2F.asm index 0425c1d67..354771bb9 100644 --- a/maps/UnionCaveB2F.asm +++ b/maps/UnionCaveB2F.asm @@ -15,7 +15,7 @@ UnionCaveB2F_MapScriptHeader: ; callbacks - dbw 2, UnknownScript_0x5a30d + dbw MAPCALLBACK_OBJECTS, UnknownScript_0x5a30d UnknownScript_0x5a30d: checkflag ENGINE_UNION_CAVE_LAPRAS diff --git a/maps/VermilionCity.asm b/maps/VermilionCity.asm index 90b18c6b7..fb5e4e2e5 100644 --- a/maps/VermilionCity.asm +++ b/maps/VermilionCity.asm @@ -14,7 +14,7 @@ VermilionCity_MapScriptHeader: db 1 ; callbacks - dbw 5, .FlyPoint + dbw MAPCALLBACK_NEWMAP, .FlyPoint .FlyPoint setflag ENGINE_FLYPOINT_VERMILION diff --git a/maps/VermilionPort.asm b/maps/VermilionPort.asm index e22774810..d45df660b 100644 --- a/maps/VermilionPort.asm +++ b/maps/VermilionPort.asm @@ -15,7 +15,7 @@ VermilionPort_MapScriptHeader: db 1 ; callbacks - dbw 5, .FlyPoint + dbw MAPCALLBACK_NEWMAP, .FlyPoint .Trigger0 end diff --git a/maps/VioletCity.asm b/maps/VioletCity.asm index c142602ba..f707345f8 100644 --- a/maps/VioletCity.asm +++ b/maps/VioletCity.asm @@ -16,7 +16,7 @@ VioletCity_MapScriptHeader: db 1 ; callbacks - dbw 5, .FlyPoint + dbw MAPCALLBACK_NEWMAP, .FlyPoint .FlyPoint setflag ENGINE_FLYPOINT_VIOLET diff --git a/maps/ViridianCity.asm b/maps/ViridianCity.asm index 7d725a3aa..875c53e89 100644 --- a/maps/ViridianCity.asm +++ b/maps/ViridianCity.asm @@ -12,7 +12,7 @@ ViridianCity_MapScriptHeader: db 1 ; callbacks - dbw 5, .FlyPoint + dbw MAPCALLBACK_NEWMAP, .FlyPoint .FlyPoint setflag ENGINE_FLYPOINT_VIRIDIAN diff --git a/maps/WarehouseEntrance.asm b/maps/WarehouseEntrance.asm index 78523ae8e..05e662ace 100644 --- a/maps/WarehouseEntrance.asm +++ b/maps/WarehouseEntrance.asm @@ -18,11 +18,11 @@ WarehouseEntrance_MapScriptHeader: ; callbacks - dbw 5, .ResetSwitches + dbw MAPCALLBACK_NEWMAP, .ResetSwitches - dbw 1, .CheckBasementKey + dbw MAPCALLBACK_TILES, .CheckBasementKey - dbw 2, .CheckDayOfWeek + dbw MAPCALLBACK_OBJECTS, .CheckDayOfWeek .ResetSwitches: clearevent EVENT_SWITCH_1 diff --git a/maps/WhirlIslandLugiaChamber.asm b/maps/WhirlIslandLugiaChamber.asm index be55b8345..eb42831fd 100644 --- a/maps/WhirlIslandLugiaChamber.asm +++ b/maps/WhirlIslandLugiaChamber.asm @@ -10,7 +10,7 @@ WhirlIslandLugiaChamber_MapScriptHeader: ; callbacks - dbw 2, UnknownScript_0x18c504 + dbw MAPCALLBACK_OBJECTS, UnknownScript_0x18c504 UnknownScript_0x18c504: checkevent EVENT_FOUGHT_LUGIA diff --git a/maps/WillsRoom.asm b/maps/WillsRoom.asm index 1ff5d3c40..a63f6b478 100644 --- a/maps/WillsRoom.asm +++ b/maps/WillsRoom.asm @@ -14,7 +14,7 @@ WillsRoom_MapScriptHeader: ; callbacks - dbw 1, UnknownScript_0x1804cb + dbw MAPCALLBACK_TILES, UnknownScript_0x1804cb UnknownScript_0x1804c6: priorityjump UnknownScript_0x1804e0 diff --git a/maps/WiseTriosRoom.asm b/maps/WiseTriosRoom.asm index b906acc31..8bdb0f700 100644 --- a/maps/WiseTriosRoom.asm +++ b/maps/WiseTriosRoom.asm @@ -19,7 +19,7 @@ WiseTriosRoom_MapScriptHeader: ; callbacks - dbw 2, UnknownScript_0x98574 + dbw MAPCALLBACK_OBJECTS, UnknownScript_0x98574 UnknownScript_0x98572: end diff --git a/misc/mobile_40.asm b/misc/mobile_40.asm index 6f25b5b0b..70b069881 100644 --- a/misc/mobile_40.asm +++ b/misc/mobile_40.asm @@ -3061,7 +3061,7 @@ Function1013aa: ; 1013aa call ReloadTilesetAndPalettes callba Function106464 call UpdateSprites - call Function2b5c + call FinishExitMenu ret ; 1013c0 @@ -3069,7 +3069,7 @@ Function1013c0: ; 1013c0 callba BlankScreen callba MobileFunc_106462 callba Function106464 - call Function2b5c + call FinishExitMenu ret ; 1013d6 diff --git a/misc/mobile_46.asm b/misc/mobile_46.asm index fb1519908..e49138df6 100755 --- a/misc/mobile_46.asm +++ b/misc/mobile_46.asm @@ -5573,7 +5573,7 @@ Function11a9ce: ; 11a9ce callba MobileFunc_106462 callba Function106464 call ret_d90 - callba Function2b5c + callba FinishExitMenu call UpdateSprites ret ; 11a9f0 diff --git a/misc/mobile_5f.asm b/misc/mobile_5f.asm index a83c7a925..044038e38 100644 --- a/misc/mobile_5f.asm +++ b/misc/mobile_5f.asm @@ -4708,7 +4708,7 @@ Function17f555: ; 17f555 Function17f5c3: ; 17f5c3 call Function17f5e4 - callba Function2b5c + callba FinishExitMenu ld a, $1 ld [wc303], a ret @@ -1905,6 +1905,8 @@ MenuItemsList:: CurFruitTree:: CurInput:: wElevatorPointerBank:: +wCurCoordEventTriggerID:: +wCurSignpostYCoord:: EngineBuffer1:: ; d03e ds 1 @@ -1913,24 +1915,30 @@ wJumpStdScriptBuffer:: CurFruit:: ; d03f MartPointerBank:: wElevatorPointerLo:: +wCurCoordEventMapY:: +wCurSignpostXCoord:: EngineBuffer2:: ds 1 wd040:: wElevatorPointerHi:: MartPointer:: ; d040 +wCurCoordEventMapX:: +wCurSignpostType:: EngineBuffer3:: ds 1 wd041:: wElevatorOriginFloor:: -EngineBuffer4:: wTempTrainerHeader:: wTempTrainerEventFlagLo:: +wCurSignpostScriptAddr:: +EngineBuffer4:: ds 1 wTempTrainerEventFlagHi:: MovementAnimation:: ; d042 +wCurCoordEventScriptAddr:: EngineBuffer5:: ds 1 @@ -2963,8 +2971,8 @@ wCurrentCaller:: ds 2 wCurrMapWarpCount:: ds 1 wCurrMapWarpHeaderPointer:: ds 1 wdbfd:: ds 1 -wCurrentNextMapXYTriggerCount:: ds 1 -wCurrentNextMapXYTriggerHeaderPointer:: ds 1 +wCurrentMapXYTriggerCount:: ds 1 +wCurrentMapXYTriggerHeaderPointer:: ds 1 wdc00:: ds 1 wCurrentMapSignpostCount:: ds 1 wCurrentMapSignpostHeaderPointer:: |