2018-06-24 07:09:41 -07:00
|
|
|
MapSetupScripts:
|
2017-12-26 14:47:05 -08:00
|
|
|
; entries correspond to MAPSETUP_* constants (see constants/map_setup_constants.asm)
|
2021-03-16 14:53:42 -07:00
|
|
|
table_width 2, MapSetupScripts
|
2017-12-26 14:47:05 -08:00
|
|
|
dw MapSetupScript_Warp
|
|
|
|
dw MapSetupScript_Continue
|
|
|
|
dw MapSetupScript_ReloadMap
|
|
|
|
dw MapSetupScript_Teleport
|
|
|
|
dw MapSetupScript_Door
|
|
|
|
dw MapSetupScript_Fall
|
|
|
|
dw MapSetupScript_Connection
|
|
|
|
dw MapSetupScript_LinkReturn
|
|
|
|
dw MapSetupScript_Train
|
|
|
|
dw MapSetupScript_Submenu
|
|
|
|
dw MapSetupScript_Fly
|
2023-08-31 10:27:39 -07:00
|
|
|
dw MapSetupScript_EnterLevel
|
2023-10-31 12:25:56 -07:00
|
|
|
dw MapSetupScript_ExitViewMap
|
2021-03-16 14:53:42 -07:00
|
|
|
assert_table_length NUM_MAPSETUP_SCRIPTS
|
2017-12-26 14:47:05 -08:00
|
|
|
|
2020-07-22 10:37:43 -07:00
|
|
|
; valid commands are listed in MapSetupCommands (see data/maps/setup_script_pointers.asm)
|
2022-06-06 14:25:42 -07:00
|
|
|
MACRO mapsetup
|
2020-07-22 10:37:43 -07:00
|
|
|
db (\1_MapSetupCmd - MapSetupCommands) / 3
|
|
|
|
ENDM
|
|
|
|
|
2023-08-31 10:27:39 -07:00
|
|
|
MapSetupScript_EnterLevel:
|
2023-11-28 00:44:10 -08:00
|
|
|
; same as MapSetupScript_Warp, but includes ResetLevelScopedEventFlags and ConstructAndEnableOverworldHUD
|
2023-08-31 10:27:39 -07:00
|
|
|
mapsetup DisableLCD
|
|
|
|
mapsetup InitSound
|
|
|
|
mapsetup EnterMapSpawnPoint
|
|
|
|
mapsetup LoadMapAttributes
|
|
|
|
mapsetup HandleNewMap
|
2023-11-28 00:44:10 -08:00
|
|
|
mapsetup ResetLevelScopedEventFlags
|
2023-08-31 10:27:39 -07:00
|
|
|
mapsetup SpawnPlayer
|
|
|
|
mapsetup RefreshPlayerCoords
|
|
|
|
mapsetup GetMapScreenCoords
|
|
|
|
mapsetup LoadBlockData
|
|
|
|
mapsetup BufferScreen
|
|
|
|
mapsetup LoadMapGraphics
|
|
|
|
mapsetup LoadMapTimeOfDay
|
|
|
|
mapsetup LoadMapObjects
|
|
|
|
mapsetup EnableLCD
|
|
|
|
mapsetup LoadMapPalettes
|
|
|
|
mapsetup SpawnInFacingDown
|
|
|
|
mapsetup RefreshMapSprites
|
|
|
|
mapsetup PlayMapMusicBike
|
2024-02-10 15:16:00 -08:00
|
|
|
mapsetup FadeInFromWhite
|
2024-02-10 14:39:21 -08:00
|
|
|
mapsetup ConstructAndEnableOverworldHUD
|
2023-08-31 10:27:39 -07:00
|
|
|
mapsetup ActivateMapAnims
|
|
|
|
mapsetup LoadWildMonData
|
2023-12-31 06:05:07 -08:00
|
|
|
mapsetup MapCallbackAtEndMapSetup
|
2023-08-31 10:27:39 -07:00
|
|
|
db -1 ; end
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
MapSetupScript_Teleport:
|
2020-07-22 10:37:43 -07:00
|
|
|
mapsetup ResetPlayerObjectAction
|
2018-06-24 07:09:41 -07:00
|
|
|
MapSetupScript_Fly:
|
2024-02-10 15:16:00 -08:00
|
|
|
mapsetup FadeOutToWhite
|
2020-07-22 10:37:43 -07:00
|
|
|
mapsetup JumpRoamMons
|
2018-06-24 07:09:41 -07:00
|
|
|
MapSetupScript_Warp:
|
2020-07-22 10:37:43 -07:00
|
|
|
mapsetup DisableLCD
|
|
|
|
mapsetup InitSound
|
2023-12-15 10:10:47 -08:00
|
|
|
mapsetup BackupMapObjects
|
2020-07-22 10:37:43 -07:00
|
|
|
mapsetup EnterMapSpawnPoint
|
|
|
|
mapsetup LoadMapAttributes
|
|
|
|
mapsetup HandleNewMap
|
|
|
|
mapsetup SpawnPlayer
|
|
|
|
mapsetup RefreshPlayerCoords
|
|
|
|
mapsetup GetMapScreenCoords
|
|
|
|
mapsetup LoadBlockData
|
2023-12-20 10:14:28 -08:00
|
|
|
mapsetup LoadDisabledSpaces
|
2020-07-22 10:37:43 -07:00
|
|
|
mapsetup BufferScreen
|
|
|
|
mapsetup LoadMapGraphics
|
|
|
|
mapsetup LoadMapTimeOfDay
|
|
|
|
mapsetup LoadMapObjects
|
|
|
|
mapsetup EnableLCD
|
|
|
|
mapsetup LoadMapPalettes
|
|
|
|
mapsetup SpawnInFacingDown
|
|
|
|
mapsetup RefreshMapSprites
|
|
|
|
mapsetup PlayMapMusicBike
|
|
|
|
mapsetup FadeInToMusic
|
2024-02-10 15:16:00 -08:00
|
|
|
mapsetup FadeInFromWhite
|
2020-07-22 10:37:43 -07:00
|
|
|
mapsetup ActivateMapAnims
|
|
|
|
mapsetup LoadWildMonData
|
2023-12-14 08:11:15 -08:00
|
|
|
mapsetup AnchorPointAfterWarp
|
2023-12-31 06:05:07 -08:00
|
|
|
mapsetup MapCallbackAtEndMapSetup
|
2020-07-22 10:37:43 -07:00
|
|
|
db -1 ; end
|
2017-12-26 14:47:05 -08:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
MapSetupScript_Connection:
|
2020-07-22 10:37:43 -07:00
|
|
|
mapsetup SuspendMapAnims
|
2023-12-15 10:10:47 -08:00
|
|
|
mapsetup BackupMapObjects
|
2020-07-22 10:37:43 -07:00
|
|
|
mapsetup EnterMapConnection
|
|
|
|
mapsetup LoadMapAttributes
|
|
|
|
mapsetup HandleNewMap
|
|
|
|
mapsetup RefreshPlayerCoords
|
|
|
|
mapsetup LoadBlockData
|
2023-12-20 10:14:28 -08:00
|
|
|
mapsetup LoadDisabledSpaces
|
2024-01-05 11:57:35 -08:00
|
|
|
mapsetup RepositionMockedPlayerObject
|
2020-07-22 10:37:43 -07:00
|
|
|
mapsetup LoadMapTileset
|
|
|
|
mapsetup SaveScreen
|
|
|
|
mapsetup LoadMapObjects
|
|
|
|
mapsetup FadeToMapMusic
|
|
|
|
mapsetup LoadMapPalettes
|
|
|
|
mapsetup ApplyMapPalettes
|
|
|
|
mapsetup LoadWildMonData
|
|
|
|
mapsetup UpdateRoamMons
|
|
|
|
mapsetup ActivateMapAnims
|
2023-12-31 06:05:07 -08:00
|
|
|
mapsetup MapCallbackAtEndMapSetup
|
2020-07-22 10:37:43 -07:00
|
|
|
db -1 ; end
|
2017-12-26 14:47:05 -08:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
MapSetupScript_Fall:
|
2020-07-22 10:37:43 -07:00
|
|
|
mapsetup ResetPlayerObjectAction
|
2018-06-24 07:09:41 -07:00
|
|
|
MapSetupScript_Door:
|
2024-02-10 15:16:00 -08:00
|
|
|
mapsetup FadeOutToWhite
|
2018-06-24 07:09:41 -07:00
|
|
|
MapSetupScript_Train:
|
2023-12-15 10:10:47 -08:00
|
|
|
mapsetup BackupMapObjects
|
2020-07-22 10:37:43 -07:00
|
|
|
mapsetup EnterMapWarp
|
|
|
|
mapsetup LoadMapAttributes
|
|
|
|
mapsetup GetWarpDestCoords
|
|
|
|
mapsetup HandleNewMap
|
|
|
|
mapsetup RefreshPlayerCoords
|
|
|
|
mapsetup LoadBlockData
|
2023-12-20 10:14:28 -08:00
|
|
|
mapsetup LoadDisabledSpaces
|
2020-07-22 10:37:43 -07:00
|
|
|
mapsetup BufferScreen
|
|
|
|
mapsetup DisableLCD
|
|
|
|
mapsetup LoadMapGraphics
|
|
|
|
mapsetup LoadMapTimeOfDay
|
|
|
|
mapsetup FadeOutMapMusic
|
|
|
|
mapsetup EnableLCD
|
|
|
|
mapsetup LoadMapObjects
|
|
|
|
mapsetup LoadMapPalettes
|
|
|
|
mapsetup RefreshMapSprites
|
|
|
|
mapsetup FadeToMapMusic
|
2024-02-10 15:16:00 -08:00
|
|
|
mapsetup FadeInFromWhite
|
2020-07-22 10:37:43 -07:00
|
|
|
mapsetup ActivateMapAnims
|
|
|
|
mapsetup LoadWildMonData
|
|
|
|
mapsetup UpdateRoamMons
|
2023-12-14 08:11:15 -08:00
|
|
|
mapsetup AnchorPointAfterWarp
|
2023-12-31 06:05:07 -08:00
|
|
|
mapsetup MapCallbackAtEndMapSetup
|
2020-07-22 10:37:43 -07:00
|
|
|
db -1 ; end
|
2017-12-26 14:47:05 -08:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
MapSetupScript_ReloadMap:
|
2020-07-22 10:37:43 -07:00
|
|
|
mapsetup FadeMapMusicAndPalettes
|
|
|
|
mapsetup ClearBGPalettes
|
|
|
|
mapsetup DisableLCD
|
|
|
|
mapsetup InitSound
|
|
|
|
mapsetup LoadBlockData
|
|
|
|
mapsetup LoadConnectionBlockData
|
2023-12-20 10:14:28 -08:00
|
|
|
mapsetup LoadDisabledSpaces
|
2020-07-22 10:37:43 -07:00
|
|
|
mapsetup LoadMapGraphics
|
|
|
|
mapsetup LoadMapTimeOfDay
|
|
|
|
mapsetup EnableLCD
|
|
|
|
mapsetup LoadMapPalettes
|
|
|
|
mapsetup RefreshMapSprites
|
|
|
|
mapsetup ForceMapMusic
|
2024-02-10 15:16:00 -08:00
|
|
|
mapsetup FadeInFromWhite
|
2024-02-10 14:39:21 -08:00
|
|
|
mapsetup EnableOverworldHUD
|
2020-07-22 10:37:43 -07:00
|
|
|
mapsetup ActivateMapAnims
|
|
|
|
mapsetup LoadWildMonData
|
2023-12-31 06:05:07 -08:00
|
|
|
mapsetup MapCallbackAtEndMapSetup
|
2020-07-22 10:37:43 -07:00
|
|
|
db -1 ; end
|
2017-12-26 14:47:05 -08:00
|
|
|
|
2023-10-31 12:25:56 -07:00
|
|
|
MapSetupScript_ExitViewMap:
|
|
|
|
mapsetup ClearBGPalettes
|
|
|
|
mapsetup DisableLCD
|
|
|
|
mapsetup EnterMapSpawnPoint
|
|
|
|
mapsetup LoadMapAttributes
|
|
|
|
mapsetup SpawnPlayer
|
|
|
|
mapsetup RefreshPlayerCoords
|
|
|
|
mapsetup GetMapScreenCoords
|
|
|
|
mapsetup LoadBlockData
|
2023-12-20 10:14:28 -08:00
|
|
|
mapsetup LoadDisabledSpaces
|
2023-10-31 12:25:56 -07:00
|
|
|
mapsetup BufferScreen
|
|
|
|
mapsetup LoadMapGraphics
|
|
|
|
mapsetup LoadMapTimeOfDay
|
|
|
|
mapsetup LoadMapObjects
|
|
|
|
mapsetup EnableLCD
|
|
|
|
mapsetup LoadMapPalettes
|
2023-11-04 09:17:08 -07:00
|
|
|
mapsetup SpawnInCustomFacing ; restore player's facing if in branch space
|
2023-10-31 12:25:56 -07:00
|
|
|
mapsetup RefreshMapSprites
|
2024-02-10 15:16:00 -08:00
|
|
|
mapsetup FadeInFromWhite
|
2024-02-10 14:39:21 -08:00
|
|
|
mapsetup EnableOverworldHUD
|
2023-10-31 12:25:56 -07:00
|
|
|
mapsetup ActivateMapAnims
|
|
|
|
mapsetup LoadWildMonData
|
2023-12-31 06:05:07 -08:00
|
|
|
mapsetup MapCallbackAtEndMapSetup
|
2023-10-31 12:25:56 -07:00
|
|
|
db -1 ; end
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
MapSetupScript_LinkReturn:
|
2020-07-22 10:37:43 -07:00
|
|
|
mapsetup FadeMapMusicAndPalettes
|
|
|
|
mapsetup DisableLCD
|
|
|
|
mapsetup InitSound
|
|
|
|
mapsetup HandleNewMap
|
|
|
|
mapsetup LoadBlockData
|
2023-12-20 10:14:28 -08:00
|
|
|
mapsetup LoadDisabledSpaces
|
2020-07-22 10:37:43 -07:00
|
|
|
mapsetup BufferScreen
|
|
|
|
mapsetup LoadMapGraphics
|
|
|
|
mapsetup LoadMapTimeOfDay
|
|
|
|
mapsetup EnableLCD
|
|
|
|
mapsetup LoadMapPalettes
|
|
|
|
mapsetup RefreshMapSprites
|
|
|
|
mapsetup PlayMapMusicBike
|
2024-02-10 15:16:00 -08:00
|
|
|
mapsetup FadeInFromWhite
|
2020-07-22 10:37:43 -07:00
|
|
|
mapsetup ActivateMapAnims
|
|
|
|
mapsetup LoadWildMonData
|
|
|
|
mapsetup EnableTextAcceleration
|
2023-12-31 06:05:07 -08:00
|
|
|
mapsetup MapCallbackAtEndMapSetup
|
2020-07-22 10:37:43 -07:00
|
|
|
db -1 ; end
|
2017-12-26 14:47:05 -08:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
MapSetupScript_Continue:
|
2020-07-22 10:37:43 -07:00
|
|
|
mapsetup DisableLCD
|
|
|
|
mapsetup InitSound
|
|
|
|
mapsetup LoadMapAttributes_SkipObjects
|
|
|
|
mapsetup GetMapScreenCoords
|
|
|
|
mapsetup HandleContinueMap
|
|
|
|
mapsetup LoadBlockData
|
|
|
|
mapsetup LoadConnectionBlockData
|
2023-12-20 10:14:28 -08:00
|
|
|
mapsetup LoadDisabledSpaces
|
2020-07-22 10:37:43 -07:00
|
|
|
mapsetup BufferScreen
|
|
|
|
mapsetup LoadMapGraphics
|
|
|
|
mapsetup LoadMapTimeOfDay
|
|
|
|
mapsetup EnableLCD
|
|
|
|
mapsetup LoadMapPalettes
|
|
|
|
mapsetup RefreshMapSprites
|
|
|
|
mapsetup PlayMapMusicBike
|
2024-02-10 15:16:00 -08:00
|
|
|
mapsetup FadeInFromWhite
|
2024-02-10 14:39:21 -08:00
|
|
|
mapsetup ConstructAndEnableOverworldHUD
|
2020-07-22 10:37:43 -07:00
|
|
|
mapsetup ActivateMapAnims
|
|
|
|
mapsetup LoadWildMonData
|
2023-12-31 06:05:07 -08:00
|
|
|
mapsetup MapCallbackAtEndMapSetup
|
2020-07-22 10:37:43 -07:00
|
|
|
db -1 ; end
|
2017-12-26 14:47:05 -08:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
MapSetupScript_Submenu:
|
2020-07-22 10:37:43 -07:00
|
|
|
mapsetup LoadBlockData
|
|
|
|
mapsetup LoadConnectionBlockData
|
2023-12-20 10:14:28 -08:00
|
|
|
mapsetup LoadDisabledSpaces
|
2020-07-22 10:37:43 -07:00
|
|
|
db -1 ; end
|