Add new map setup script MAPSETUP_ENTERLEVEL (#4), and integrate overworld HUD setup in the corresponding setup scripts (#15)

This commit is contained in:
xCrystal
2023-08-31 19:27:39 +02:00
parent 7bd940aeac
commit 74f2a55332
8 changed files with 44 additions and 8 deletions

View File

@@ -49,3 +49,5 @@ MapSetupCommands:
add_mapsetup SuspendMapAnims ; 2a
add_mapsetup ApplyMapPalettes ; 2b
add_mapsetup EnableTextAcceleration ; 2c
add_mapsetup ConstructAndEnableOverworldHUD ; 2d
add_mapsetup EnableOverworldHUD ; 2e

View File

@@ -13,6 +13,7 @@ MapSetupScripts:
dw MapSetupScript_Submenu
dw MapSetupScript_BadWarp
dw MapSetupScript_Fly
dw MapSetupScript_EnterLevel
assert_table_length NUM_MAPSETUP_SCRIPTS
; valid commands are listed in MapSetupCommands (see data/maps/setup_script_pointers.asm)
@@ -20,6 +21,33 @@ MACRO mapsetup
db (\1_MapSetupCmd - MapSetupCommands) / 3
ENDM
MapSetupScript_EnterLevel:
; same as MapSetupScript_Warp, but includes ConstructAndEnableOverworldHUD
mapsetup DisableLCD
mapsetup InitSound
mapsetup EnterMapSpawnPoint
mapsetup LoadMapAttributes
mapsetup HandleNewMap
mapsetup SpawnPlayer
mapsetup RefreshPlayerCoords
mapsetup GetMapScreenCoords
mapsetup LoadBlockData
mapsetup BufferScreen
mapsetup LoadMapGraphics
mapsetup LoadMapTimeOfDay
mapsetup ConstructAndEnableOverworldHUD
mapsetup LoadMapObjects
mapsetup EnableLCD
mapsetup LoadMapPalettes
mapsetup SpawnInFacingDown
mapsetup RefreshMapSprites
mapsetup PlayMapMusicBike
mapsetup FadeInToMusic
mapsetup FadeInPalettesFromWhite
mapsetup ActivateMapAnims
mapsetup LoadWildMonData
db -1 ; end
MapSetupScript_Teleport:
mapsetup ResetPlayerObjectAction
MapSetupScript_Fly:
@@ -128,6 +156,7 @@ MapSetupScript_ReloadMap:
mapsetup LoadConnectionBlockData
mapsetup LoadMapGraphics
mapsetup LoadMapTimeOfDay
mapsetup EnableOverworldHUD
mapsetup EnableLCD
mapsetup LoadMapPalettes
mapsetup RefreshMapSprites
@@ -167,6 +196,7 @@ MapSetupScript_Continue:
mapsetup BufferScreen
mapsetup LoadMapGraphics
mapsetup LoadMapTimeOfDay
mapsetup ConstructAndEnableOverworldHUD
mapsetup EnableLCD
mapsetup LoadMapPalettes
mapsetup RefreshMapSprites