Identify wCurrentMapScriptFlags bits (#467)

This commit is contained in:
Sylvie 2024-09-24 11:39:44 -04:00 committed by GitHub
parent 6ae63a8cea
commit 635b9c4cab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
48 changed files with 124 additions and 115 deletions

View file

@ -23,6 +23,12 @@ DEF BIT_TEXT_PREDEF EQU 0
; wFontLoaded
DEF BIT_FONT_LOADED EQU 0
; wCurrentMapScriptFlags
const_def 5
const BIT_CUR_MAP_LOADED_1 ; 5
const BIT_CUR_MAP_LOADED_2 ; 6
const BIT_CUR_MAP_USED_ELEVATOR ; 7
; wOptions
DEF TEXT_DELAY_MASK EQU %111
const_def 6

View file

@ -50,7 +50,7 @@ PrintCardKeyText:
ld [wNewTileBlockID], a
predef ReplaceTileBlock
ld hl, wCurrentMapScriptFlags
set 5, [hl]
set BIT_CUR_MAP_LOADED_1, [hl]
ld a, SFX_GO_INSIDE
jp PlaySound
.noCardKey

View file

@ -20,7 +20,7 @@ DisplayElevatorFloorMenu:
ld [wListScrollOffset], a
ret c
ld hl, wCurrentMapScriptFlags
set 7, [hl]
set BIT_CUR_MAP_USED_ELEVATOR, [hl]
ld hl, wElevatorWarpMaps
ld a, [wWhichPokemon]
add a

View file

@ -83,7 +83,7 @@ CinnabarGymQuiz_AskQuestion:
cp c
jr nz, .wrongAnswer
ld hl, wCurrentMapScriptFlags
set 5, [hl]
set BIT_CUR_MAP_LOADED_1, [hl]
ldh a, [hGymGateIndex]
ldh [hBackupGymGateIndex], a
ld hl, CinnabarGymQuizCorrectText

View file

@ -97,7 +97,7 @@ GymTrashScript:
; Completed the trash can puzzle.
SetEvent EVENT_2ND_LOCK_OPENED
ld hl, wCurrentMapScriptFlags
set 6, [hl]
set BIT_CUR_MAP_LOADED_2, [hl]
tx_pre_id VermilionGymTrashSuccessText3

View file

@ -91,7 +91,7 @@ MainMenu:
.choseContinue
call DisplayContinueGameInfo
ld hl, wCurrentMapScriptFlags
set 5, [hl]
set BIT_CUR_MAP_LOADED_1, [hl]
.inputLoop
xor a
ldh [hJoyPressed], a

View file

@ -33,8 +33,8 @@ EnterMap::
res BIT_NO_NPC_FACE_PLAYER, [hl]
call UpdateSprites
ld hl, wCurrentMapScriptFlags
set 5, [hl]
set 6, [hl]
set BIT_CUR_MAP_LOADED_1, [hl]
set BIT_CUR_MAP_LOADED_2, [hl]
xor a
ld [wJoyIgnore], a
@ -329,8 +329,8 @@ OverworldLoopLessDelay::
ld hl, wStatusFlags7
res BIT_TRAINER_BATTLE, [hl]
ld hl, wCurrentMapScriptFlags
set 5, [hl]
set 6, [hl]
set BIT_CUR_MAP_LOADED_1, [hl]
set BIT_CUR_MAP_LOADED_2, [hl]
xor a
ldh [hJoyHeld], a
ld a, [wCurMap]

View file

@ -184,8 +184,8 @@ StartTrainerBattle::
EndTrainerBattle::
ld hl, wCurrentMapScriptFlags
set 5, [hl]
set 6, [hl]
set BIT_CUR_MAP_LOADED_1, [hl]
set BIT_CUR_MAP_LOADED_2, [hl]
ld hl, wStatusFlags3
res BIT_PRINT_END_BATTLE_TEXT, [hl]
ld hl, wMiscFlags

View file

@ -1593,7 +1593,10 @@ wIsKeyItem:: db
wTextBoxID:: db
wCurrentMapScriptFlags:: db ; not exactly sure what this is used for, but it seems to be used as a multipurpose temp flag value
; bit 5: set when maps first load; can be reset to re-run a script
; bit 6: set when maps first load; can be reset to re-run a script (used less often than bit 5)
; bit 7: set when using an elevator map's menu; triggers the shaking animation
wCurrentMapScriptFlags:: db
wCurEnemyLevel:: db

View file

@ -11,8 +11,8 @@ AgathasRoom_Script:
AgathaShowOrHideExitBlock:
; Blocks or clears the exit to the next room.
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
bit BIT_CUR_MAP_LOADED_1, [hl]
res BIT_CUR_MAP_LOADED_1, [hl]
ret z
CheckEvent EVENT_BEAT_AGATHAS_ROOM_TRAINER_0
jr z, .blockExitToNextRoom

View file

@ -11,8 +11,8 @@ BrunosRoom_Script:
BrunoShowOrHideExitBlock:
; Blocks or clears the exit to the next room.
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
bit BIT_CUR_MAP_LOADED_1, [hl]
res BIT_CUR_MAP_LOADED_1, [hl]
ret z
CheckEvent EVENT_BEAT_BRUNOS_ROOM_TRAINER_0
jr z, .blockExitToNextRoom

View file

@ -1,7 +1,7 @@
CeladonGym_Script:
ld hl, wCurrentMapScriptFlags
bit 6, [hl]
res 6, [hl]
bit BIT_CUR_MAP_LOADED_2, [hl]
res BIT_CUR_MAP_LOADED_2, [hl]
call nz, .LoadNames
call EnableAutoTextBoxDrawing
ld hl, CeladonGymTrainerHeaders

View file

@ -1,12 +1,12 @@
CeladonMartElevator_Script:
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
bit BIT_CUR_MAP_LOADED_1, [hl]
res BIT_CUR_MAP_LOADED_1, [hl]
push hl
call nz, CeladonMartElevatorStoreWarpEntriesScript
pop hl
bit 7, [hl]
res 7, [hl]
bit BIT_CUR_MAP_USED_ELEVATOR, [hl]
res BIT_CUR_MAP_USED_ELEVATOR, [hl]
call nz, CeladonMartElevatorShakeScript
xor a
ld [wAutoTextBoxDrawingControl], a

View file

@ -1,7 +1,7 @@
CeruleanGym_Script:
ld hl, wCurrentMapScriptFlags
bit 6, [hl]
res 6, [hl]
bit BIT_CUR_MAP_LOADED_2, [hl]
res BIT_CUR_MAP_LOADED_2, [hl]
call nz, .LoadNames
call EnableAutoTextBoxDrawing
ld hl, CeruleanGymTrainerHeaders

View file

@ -7,13 +7,13 @@ CinnabarGym_Script:
CinnabarGymSetMapAndTiles:
ld hl, wCurrentMapScriptFlags
bit 6, [hl]
res 6, [hl]
bit BIT_CUR_MAP_LOADED_2, [hl]
res BIT_CUR_MAP_LOADED_2, [hl]
push hl
call nz, .LoadNames
pop hl
bit 5, [hl]
res 5, [hl]
bit BIT_CUR_MAP_LOADED_1, [hl]
res BIT_CUR_MAP_LOADED_1, [hl]
call nz, UpdateCinnabarGymGateTileBlocks
ResetEvent EVENT_2A7
ret
@ -170,7 +170,7 @@ CinnabarGymReceiveTM38:
SetEventRange EVENT_BEAT_CINNABAR_GYM_TRAINER_0, EVENT_BEAT_CINNABAR_GYM_TRAINER_6
ld hl, wCurrentMapScriptFlags
set 5, [hl]
set BIT_CUR_MAP_LOADED_1, [hl]
jp CinnabarGymResetScripts

View file

@ -1,7 +1,7 @@
CinnabarIsland_Script:
call EnableAutoTextBoxDrawing
ld hl, wCurrentMapScriptFlags
set 5, [hl]
set BIT_CUR_MAP_LOADED_1, [hl]
ResetEvent EVENT_MANSION_SWITCH_ON
ResetEvent EVENT_LAB_STILL_REVIVING_FOSSIL
ld hl, CinnabarIsland_ScriptPointers

View file

@ -10,8 +10,8 @@ FuchsiaGym_Script:
.LoadNames:
ld hl, wCurrentMapScriptFlags
bit 6, [hl]
res 6, [hl]
bit BIT_CUR_MAP_LOADED_2, [hl]
res BIT_CUR_MAP_LOADED_2, [hl]
ret z
ld hl, .CityName
ld de, .LeaderName

View file

@ -8,8 +8,8 @@ GameCorner_Script:
GameCornerSelectLuckySlotMachine:
ld hl, wCurrentMapScriptFlags
bit 6, [hl]
res 6, [hl]
bit BIT_CUR_MAP_LOADED_2, [hl]
res BIT_CUR_MAP_LOADED_2, [hl]
ret z
call Random
ldh a, [hRandomAdd]
@ -25,8 +25,8 @@ GameCornerSelectLuckySlotMachine:
GameCornerSetRocketHideoutDoorTile:
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
bit BIT_CUR_MAP_LOADED_1, [hl]
res BIT_CUR_MAP_LOADED_1, [hl]
ret z
CheckEvent EVENT_FOUND_ROCKET_HIDEOUT
ret nz
@ -111,8 +111,8 @@ GameCornerRocketExitScript:
ld [wMissableObjectIndex], a
predef HideObject
ld hl, wCurrentMapScriptFlags
set 5, [hl]
set 6, [hl]
set BIT_CUR_MAP_LOADED_1, [hl]
set BIT_CUR_MAP_LOADED_2, [hl]
ld a, SCRIPT_GAMECORNER_DEFAULT
ld [wGameCornerCurScript], a
ret

View file

@ -2,8 +2,8 @@ IndigoPlateauLobby_Script:
call Serial_TryEstablishingExternallyClockedConnection
call EnableAutoTextBoxDrawing
ld hl, wCurrentMapScriptFlags
bit 6, [hl]
res 6, [hl]
bit BIT_CUR_MAP_LOADED_2, [hl]
res BIT_CUR_MAP_LOADED_2, [hl]
ret z
ResetEvent EVENT_VICTORY_ROAD_1_BOULDER_ON_SWITCH
; Reset Elite Four events if the player started challenging them before

View file

@ -10,8 +10,8 @@ LancesRoom_Script:
LanceShowOrHideEntranceBlocks:
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
bit BIT_CUR_MAP_LOADED_1, [hl]
res BIT_CUR_MAP_LOADED_1, [hl]
ret z
CheckEvent EVENT_LANCES_ROOM_LOCK_DOOR
jr nz, .closeEntrance
@ -71,7 +71,7 @@ LancesRoomDefaultScript:
CheckAndSetEvent EVENT_LANCES_ROOM_LOCK_DOOR
ret nz
ld hl, wCurrentMapScriptFlags
set 5, [hl]
set BIT_CUR_MAP_LOADED_1, [hl]
ld a, SFX_GO_INSIDE
call PlaySound
jp LanceShowOrHideEntranceBlocks

View file

@ -11,8 +11,8 @@ LoreleisRoom_Script:
LoreleiShowOrHideExitBlock:
; Blocks or clears the exit to the next room.
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
bit BIT_CUR_MAP_LOADED_1, [hl]
res BIT_CUR_MAP_LOADED_1, [hl]
ret z
ld hl, wElite4Flags
set BIT_STARTED_ELITE_4, [hl]

View file

@ -1,7 +1,7 @@
PewterGym_Script:
ld hl, wCurrentMapScriptFlags
bit 6, [hl]
res 6, [hl]
bit BIT_CUR_MAP_LOADED_2, [hl]
res BIT_CUR_MAP_LOADED_2, [hl]
call nz, .LoadNames
call EnableAutoTextBoxDrawing
ld hl, PewterGymTrainerHeaders

View file

@ -10,8 +10,8 @@ PokemonMansion1F_Script:
Mansion1CheckReplaceSwitchDoorBlocks:
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
bit BIT_CUR_MAP_LOADED_1, [hl]
res BIT_CUR_MAP_LOADED_1, [hl]
ret z
CheckEvent EVENT_MANSION_SWITCH_ON
jr nz, .switchTurnedOn
@ -103,7 +103,7 @@ PokemonMansion1FSwitchText:
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld hl, wCurrentMapScriptFlags
set 5, [hl]
set BIT_CUR_MAP_LOADED_1, [hl]
ld hl, .PressedText
call PrintText
ld a, SFX_GO_INSIDE

View file

@ -10,8 +10,8 @@ PokemonMansion2F_Script:
Mansion2CheckReplaceSwitchDoorBlocks:
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
bit BIT_CUR_MAP_LOADED_1, [hl]
res BIT_CUR_MAP_LOADED_1, [hl]
ret z
CheckEvent EVENT_MANSION_SWITCH_ON
jr nz, .switchTurnedOn
@ -108,7 +108,7 @@ PokemonMansion2FSwitchText:
ld a, $1
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld hl, wCurrentMapScriptFlags
set 5, [hl]
set BIT_CUR_MAP_LOADED_1, [hl]
ld hl, .PressedText
call PrintText
ld a, SFX_GO_INSIDE

View file

@ -10,8 +10,8 @@ PokemonMansion3F_Script:
Mansion3CheckReplaceSwitchDoorBlocks:
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
bit BIT_CUR_MAP_LOADED_1, [hl]
res BIT_CUR_MAP_LOADED_1, [hl]
ret z
CheckEvent EVENT_MANSION_SWITCH_ON
jr nz, .switchTurnedOn

View file

@ -10,8 +10,8 @@ PokemonMansionB1F_Script:
MansionB1FCheckReplaceSwitchDoorBlocks:
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
bit BIT_CUR_MAP_LOADED_1, [hl]
res BIT_CUR_MAP_LOADED_1, [hl]
ret z
CheckEvent EVENT_MANSION_SWITCH_ON
jr nz, .switchTurnedOn

View file

@ -10,8 +10,8 @@ RocketHideoutB1F_Script:
RocketHideoutB1FDoorCallbackScript:
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
bit BIT_CUR_MAP_LOADED_1, [hl]
res BIT_CUR_MAP_LOADED_1, [hl]
ret z
CheckEvent EVENT_677
jr nz, .door_open

View file

@ -10,8 +10,8 @@ RocketHideoutB4F_Script:
RocketHideoutB4FDoorCallbackScript:
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
bit BIT_CUR_MAP_LOADED_1, [hl]
res BIT_CUR_MAP_LOADED_1, [hl]
ret z
CheckEvent EVENT_ROCKET_HIDEOUT_4_DOOR_UNLOCKED
jr nz, .door_already_unlocked
@ -67,7 +67,7 @@ RocketHideoutB4FBeatGiovanniScript:
xor a
ld [wJoyIgnore], a
ld hl, wCurrentMapScriptFlags
set 5, [hl]
set BIT_CUR_MAP_LOADED_1, [hl]
ld a, SCRIPT_ROCKETHIDEOUTB4F_DEFAULT
ld [wRocketHideoutB4FCurScript], a
ld [wCurMapScript], a

View file

@ -1,12 +1,12 @@
RocketHideoutElevator_Script:
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
bit BIT_CUR_MAP_LOADED_1, [hl]
res BIT_CUR_MAP_LOADED_1, [hl]
push hl
call nz, RocketHideoutElevatorStoreWarpEntriesScript
pop hl
bit 7, [hl]
res 7, [hl]
bit BIT_CUR_MAP_USED_ELEVATOR, [hl]
res BIT_CUR_MAP_USED_ELEVATOR, [hl]
call nz, RocketHideoutElevatorShakeScript
xor a
ld [wAutoTextBoxDrawingControl], a

View file

@ -7,8 +7,8 @@ Route23_Script:
Route23SetVictoryRoadBoulders:
ld hl, wCurrentMapScriptFlags
bit 6, [hl]
res 6, [hl]
bit BIT_CUR_MAP_LOADED_2, [hl]
res BIT_CUR_MAP_LOADED_2, [hl]
ret z
ResetEvents EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH1, EVENT_VICTORY_ROAD_2_BOULDER_ON_SWITCH2
ResetEvents EVENT_VICTORY_ROAD_3_BOULDER_ON_SWITCH1, EVENT_VICTORY_ROAD_3_BOULDER_ON_SWITCH2

View file

@ -10,8 +10,8 @@ Route25_Script:
Route25ShowHideBillScript:
ld hl, wCurrentMapScriptFlags
bit 6, [hl]
res 6, [hl]
bit BIT_CUR_MAP_LOADED_2, [hl]
res BIT_CUR_MAP_LOADED_2, [hl]
ret z
CheckEventHL EVENT_LEFT_BILLS_HOUSE_AFTER_HELPING
ret nz

View file

@ -1,7 +1,7 @@
SaffronGym_Script:
ld hl, wCurrentMapScriptFlags
bit 6, [hl]
res 6, [hl]
bit BIT_CUR_MAP_LOADED_2, [hl]
res BIT_CUR_MAP_LOADED_2, [hl]
call nz, .LoadNames
call EnableAutoTextBoxDrawing
ld hl, SaffronGymTrainerHeaders

View file

@ -10,8 +10,8 @@ SilphCo10F_Script:
SilphCo10FGateCallbackScript:
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
bit BIT_CUR_MAP_LOADED_1, [hl]
res BIT_CUR_MAP_LOADED_1, [hl]
ret z
ld hl, .GateCoordinates
call SilphCo2F_SetCardKeyDoorYScript

View file

@ -10,8 +10,8 @@ SilphCo11F_Script:
SilphCo11FGateCallbackScript:
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
bit BIT_CUR_MAP_LOADED_1, [hl]
res BIT_CUR_MAP_LOADED_1, [hl]
ret z
ld hl, SilphCo11GateCoords
call SilphCo11F_SetCardKeyDoorYScript

View file

@ -10,8 +10,8 @@ SilphCo2F_Script:
SilphCo2FGateCallbackScript:
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
bit BIT_CUR_MAP_LOADED_1, [hl]
res BIT_CUR_MAP_LOADED_1, [hl]
ret z
ld hl, .GateCoordinates
call SilphCo2F_SetCardKeyDoorYScript

View file

@ -10,8 +10,8 @@ SilphCo3F_Script:
SilphCo3FGateCallbackScript:
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
bit BIT_CUR_MAP_LOADED_1, [hl]
res BIT_CUR_MAP_LOADED_1, [hl]
ret z
ld hl, .GateCoordinates
call SilphCo2F_SetCardKeyDoorYScript

View file

@ -10,8 +10,8 @@ SilphCo4F_Script:
SilphCo4FGateCallbackScript:
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
bit BIT_CUR_MAP_LOADED_1, [hl]
res BIT_CUR_MAP_LOADED_1, [hl]
ret z
ld hl, .GateCoordinates
call SilphCo4F_SetCardKeyDoorYScript

View file

@ -10,8 +10,8 @@ SilphCo5F_Script:
SilphCo5FGateCallbackScript:
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
bit BIT_CUR_MAP_LOADED_1, [hl]
res BIT_CUR_MAP_LOADED_1, [hl]
ret z
ld hl, .GateCoordinates
call SilphCo4F_SetCardKeyDoorYScript

View file

@ -10,8 +10,8 @@ SilphCo6F_Script:
SilphCo6F_GateCallbackScript:
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
bit BIT_CUR_MAP_LOADED_1, [hl]
res BIT_CUR_MAP_LOADED_1, [hl]
ret z
ld hl, .GateCoordinates
call SilphCo4F_SetCardKeyDoorYScript

View file

@ -10,8 +10,8 @@ SilphCo7F_Script:
SilphCo7F_GateCallbackScript:
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
bit BIT_CUR_MAP_LOADED_1, [hl]
res BIT_CUR_MAP_LOADED_1, [hl]
ret z
ld hl, .GateCoordinates
call SilphCo7F_SetCardKeyDoorYScript

View file

@ -10,8 +10,8 @@ SilphCo8F_Script:
SilphCo8FGateCallbackScript:
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
bit BIT_CUR_MAP_LOADED_1, [hl]
res BIT_CUR_MAP_LOADED_1, [hl]
ret z
ld hl, .GateCoordinates
call SilphCo8F_SetCardKeyDoorYScript

View file

@ -10,8 +10,8 @@ SilphCo9F_Script:
SilphCo9FGateCallbackScript:
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
bit BIT_CUR_MAP_LOADED_1, [hl]
res BIT_CUR_MAP_LOADED_1, [hl]
ret z
ld hl, .GateCoordinates
call SilphCo9F_SetCardKeyDoorYScript

View file

@ -1,12 +1,12 @@
SilphCoElevator_Script:
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
bit BIT_CUR_MAP_LOADED_1, [hl]
res BIT_CUR_MAP_LOADED_1, [hl]
push hl
call nz, SilphCoElevatorStoreWarpEntriesScript
pop hl
bit 7, [hl]
res 7, [hl]
bit BIT_CUR_MAP_USED_ELEVATOR, [hl]
res BIT_CUR_MAP_USED_ELEVATOR, [hl]
call nz, SilphCoElevatorShakeScript
xor a
ld [wAutoTextBoxDrawingControl], a

View file

@ -1,13 +1,13 @@
VermilionCity_Script:
call EnableAutoTextBoxDrawing
ld hl, wCurrentMapScriptFlags
bit 6, [hl]
res 6, [hl]
bit BIT_CUR_MAP_LOADED_2, [hl]
res BIT_CUR_MAP_LOADED_2, [hl]
push hl
call nz, VermilionCityLeftSSAnneCallbackScript
pop hl
bit 5, [hl]
res 5, [hl]
bit BIT_CUR_MAP_LOADED_1, [hl]
res BIT_CUR_MAP_LOADED_1, [hl]
call nz, .setFirstLockTrashCanIndex
ld hl, VermilionCity_ScriptPointers
ld a, [wVermilionCityCurScript]

View file

@ -1,12 +1,12 @@
VermilionGym_Script:
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
bit BIT_CUR_MAP_LOADED_1, [hl]
res BIT_CUR_MAP_LOADED_1, [hl]
push hl
call nz, .LoadNames
pop hl
bit 6, [hl]
res 6, [hl]
bit BIT_CUR_MAP_LOADED_2, [hl]
res BIT_CUR_MAP_LOADED_2, [hl]
call nz, VermilionGymSetDoorTile
call EnableAutoTextBoxDrawing
ld hl, VermilionGymTrainerHeaders

View file

@ -1,7 +1,7 @@
VictoryRoad1F_Script:
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
bit BIT_CUR_MAP_LOADED_1, [hl]
res BIT_CUR_MAP_LOADED_1, [hl]
call nz, .next
call EnableAutoTextBoxDrawing
ld hl, VictoryRoad1TrainerHeaders
@ -31,7 +31,7 @@ VictoryRoad1FDefaultScript:
call CheckBoulderCoords
jp nc, CheckFightingMapTrainers
ld hl, wCurrentMapScriptFlags
set 5, [hl]
set BIT_CUR_MAP_LOADED_1, [hl]
SetEvent EVENT_VICTORY_ROAD_1_BOULDER_ON_SWITCH
ret

View file

@ -1,11 +1,11 @@
VictoryRoad2F_Script:
ld hl, wCurrentMapScriptFlags
bit 6, [hl]
res 6, [hl]
bit BIT_CUR_MAP_LOADED_2, [hl]
res BIT_CUR_MAP_LOADED_2, [hl]
call nz, VictoryRoad2FResetBoulderEventScript
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
bit BIT_CUR_MAP_LOADED_1, [hl]
res BIT_CUR_MAP_LOADED_1, [hl]
call nz, VictoryRoad2FCheckBoulderEventScript
call EnableAutoTextBoxDrawing
ld hl, VictoryRoad2TrainerHeaders
@ -60,7 +60,7 @@ VictoryRoad2FDefaultScript:
ret nz
.set_script_flag
ld hl, wCurrentMapScriptFlags
set 5, [hl]
set BIT_CUR_MAP_LOADED_1, [hl]
ret
.SwitchCoords:

View file

@ -10,8 +10,8 @@ VictoryRoad3F_Script:
VictoryRoad3FCheckBoulderEventScript:
ld hl, wCurrentMapScriptFlags
bit 5, [hl]
res 5, [hl]
bit BIT_CUR_MAP_LOADED_1, [hl]
res BIT_CUR_MAP_LOADED_1, [hl]
ret z
CheckEventHL EVENT_VICTORY_ROAD_3_BOULDER_ON_SWITCH1
ret z
@ -38,7 +38,7 @@ VictoryRoad3FDefaultScript:
cp $1
jr nz, .handle_hole
ld hl, wCurrentMapScriptFlags
set 5, [hl]
set BIT_CUR_MAP_LOADED_1, [hl]
SetEvent EVENT_VICTORY_ROAD_3_BOULDER_ON_SWITCH1
ret
.handle_hole