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

@@ -327,7 +327,7 @@ Continue:
call DelayFrames
farcall JumpRoamMons
ld a, [wSpawnAfterChampion]
cp SPAWN_LEVEL_1
cp SPAWN_N_A
jr z, .SpawnAfterE4
ld a, MAPSETUP_CONTINUE
ldh [hMapEntryMethod], a
@@ -378,7 +378,7 @@ FinishContinueFunction:
res GAME_TIMER_MOBILE_F, [hl]
farcall OverworldLoop
ld a, [wSpawnAfterChampion]
cp SPAWN_LEVEL_1
cp SPAWN_N_A
jr z, .AfterRed
jp Reset

View File

@@ -141,7 +141,7 @@ LevelSelectionMenu::
ld a, [wLevelSelectionMenuCurrentLandmark]
call LevelSelectionMenu_GetLandmarkSpawnPoint
ld [wDefaultSpawnpoint], a
ld a, MAPSETUP_WARP
ld a, MAPSETUP_ENTERLEVEL
ld [hMapEntryMethod], a
xor a
ld [wDontPlayMapMusicOnReload], a ; play map music

View File

@@ -110,8 +110,6 @@ EnterMap:
ld [wXYComparePointer], a
ld [wXYComparePointer + 1], a
call SetUpFiveStepWildEncounterCooldown
ld hl, wTextboxFlags
set TEXT_2BPP_F, [hl]
farcall RunMapSetupScript
call DisableEvents
@@ -128,9 +126,6 @@ EnterMap:
ld [wPoisonStepCount], a
.dontresetpoison
call ConstructOverworldHUDTilemap
call EnableOverworldHUD
xor a ; end map entry
ldh [hMapEntryMethod], a
ld a, MAPSTATUS_HANDLE