Rename prioritysjump to sdefer

This commit is contained in:
Rangi 2021-06-08 20:35:04 -04:00
parent 1f9e688b76
commit e4d82e92d0
45 changed files with 61 additions and 60 deletions

View File

@ -470,7 +470,7 @@ If <code><i>item_id</i></code> = `USE_SCRIPT_VAR`, then it uses `[wScriptVar]` i
## `$8C`: <code>deactivatefacing <i>length</i></code>
## `$8D`: <code>prioritysjump <i>script</i></code>
## `$8D`: <code>sdefer <i>script</i></code>
## `$8E`: `warpcheck`

View File

@ -436,11 +436,11 @@ endr
bit 3, [hl]
jr z, .nope
ld hl, wPriorityScriptAddr
ld hl, wDeferredScriptAddr
ld a, [hli]
ld h, [hl]
ld l, a
ld a, [wPriorityScriptBank]
ld a, [wDeferredScriptBank]
call CallScript
scf
ret

View File

@ -205,7 +205,7 @@ ScriptCommandTable:
dw Script_newloadmap ; 8a
dw Script_pause ; 8b
dw Script_deactivatefacing ; 8c
dw Script_prioritysjump ; 8d
dw Script_sdefer ; 8d
dw Script_warpcheck ; 8e
dw Script_stopandsjump ; 8f
dw Script_endcallback ; 90
@ -1388,13 +1388,13 @@ ScriptJump:
ld [wScriptPos + 1], a
ret
Script_prioritysjump:
Script_sdefer:
ld a, [wScriptBank]
ld [wPriorityScriptBank], a
ld [wDeferredScriptBank], a
call GetScriptByte
ld [wPriorityScriptAddr], a
ld [wDeferredScriptAddr], a
call GetScriptByte
ld [wPriorityScriptAddr + 1], a
ld [wDeferredScriptAddr + 1], a
ld hl, wScriptFlags
set 3, [hl]
ret

View File

@ -119,7 +119,8 @@ checknite EQUS "checktime NITE"
jump EQUS "sjump"
farjump EQUS "farsjump"
priorityjump EQUS "prioritysjump"
priorityjump EQUS "sdefer"
prioritysjump EQUS "sdefer"
ptcall EQUS "memcall"
ptjump EQUS "memjump"
ptpriorityjump EQUS "stopandsjump"

View File

@ -883,9 +883,9 @@ deactivatefacing: MACRO
db \1 ; time
ENDM
const prioritysjump_command ; $8d
prioritysjump: MACRO
db prioritysjump_command
const sdefer_command ; $8d
sdefer: MACRO
db sdefer_command
dw \1 ; pointer
ENDM

View File

@ -26,11 +26,11 @@ BattleTower1F_MapScripts:
writetext Text_WeveBeenWaitingForYou
waitbutton
closetext
prioritysjump Script_ResumeBattleTowerChallenge
sdefer Script_ResumeBattleTowerChallenge
end
.LeftWithoutSaving
prioritysjump BattleTower_LeftWithoutSaving
sdefer BattleTower_LeftWithoutSaving
setval BATTLETOWERACTION_CHALLENGECANCELED
special BattleTowerAction
setval BATTLETOWERACTION_06

View File

@ -11,7 +11,7 @@ BattleTowerBattleRoom_MapScripts:
.EnterBattleRoom:
disappear BATTLETOWERBATTLEROOM_YOUNGSTER
prioritysjump Script_BattleRoom
sdefer Script_BattleRoom
setscene SCENE_FINISHED
.DummyScene:
end

View File

@ -9,7 +9,7 @@ BattleTowerElevator_MapScripts:
def_callbacks
.Scene0:
prioritysjump .RideElevator
sdefer .RideElevator
setscene SCENE_FINISHED
.Scene1:
end

View File

@ -9,7 +9,7 @@ BattleTowerHallway_MapScripts:
def_callbacks
.Scene0:
prioritysjump .ChooseBattleRoom
sdefer .ChooseBattleRoom
setscene SCENE_FINISHED
.Scene1:
end

View File

@ -10,7 +10,7 @@ BrunosRoom_MapScripts:
callback MAPCALLBACK_TILES, .BrunosRoomDoors
.LockDoor:
prioritysjump .BrunosDoorLocksBehindYou
sdefer .BrunosDoorLocksBehindYou
end
.DummyScene:

View File

@ -15,7 +15,7 @@ BurnedTower1F_MapScripts:
callback MAPCALLBACK_TILES, .HoleAndLadder
.EusineScene:
prioritysjump .MeetEusine
sdefer .MeetEusine
end
.DummyScene1:

View File

@ -17,7 +17,7 @@ CeruleanGym_MapScripts:
end
.GruntRunsOut:
prioritysjump .GruntRunsOutScript
sdefer .GruntRunsOutScript
end
.GruntRunsOutScript:

View File

@ -13,7 +13,7 @@ Colosseum_MapScripts:
callback MAPCALLBACK_NEWMAP, .PreparePokecenter2F
.InitializeColosseum:
prioritysjump .InitializeAndPreparePokecenter2F
sdefer .InitializeAndPreparePokecenter2F
end
.DummyScene1:

View File

@ -12,7 +12,7 @@ DragonShrine_MapScripts:
def_callbacks
.DragonShrineTest:
prioritysjump .DragonShrineTestScript
sdefer .DragonShrineTestScript
end
.DummyScene:

View File

@ -15,7 +15,7 @@ EcruteakGym_MapScripts:
def_callbacks
.ForcedToLeave:
prioritysjump EcruteakGymClosed
sdefer EcruteakGymClosed
end
.DummyScene:

View File

@ -13,7 +13,7 @@ EcruteakPokecenter1F_MapScripts:
def_callbacks
.MeetBill:
prioritysjump .BillActivatesTimeCapsule
sdefer .BillActivatesTimeCapsule
end
.DummyScene:

View File

@ -19,7 +19,7 @@ ElmsLab_MapScripts:
callback MAPCALLBACK_OBJECTS, .MoveElmCallback
.MeetElm:
prioritysjump .WalkUpToElm
sdefer .WalkUpToElm
end
.DummyScene1:

View File

@ -16,7 +16,7 @@ FastShip1F_MapScripts:
end
.EnterFastShip:
prioritysjump .EnterFastShipScript
sdefer .EnterFastShipScript
end
.DummyScene2:

View File

@ -9,7 +9,7 @@ HallOfFame_MapScripts:
def_callbacks
.EnterHallOfFame:
prioritysjump .EnterHallOfFameScript
sdefer .EnterHallOfFameScript
end
.DummyScene:

View File

@ -10,7 +10,7 @@ KarensRoom_MapScripts:
callback MAPCALLBACK_TILES, .KarensRoomDoors
.LockDoor:
prioritysjump .KarensDoorLocksBehindYou
sdefer .KarensDoorLocksBehindYou
end
.DummyScene:

View File

@ -10,7 +10,7 @@ KogasRoom_MapScripts:
callback MAPCALLBACK_TILES, .KogasRoomDoors
.LockDoor:
prioritysjump .KogasDoorLocksBehindYou
sdefer .KogasDoorLocksBehindYou
end
.DummyScene:

View File

@ -12,7 +12,7 @@ LancesRoom_MapScripts:
callback MAPCALLBACK_TILES, .LancesRoomDoors
.LockDoor:
prioritysjump .LancesDoorLocksBehindYou
sdefer .LancesDoorLocksBehindYou
end
.DummyScene:

View File

@ -17,7 +17,7 @@ MahoganyMart1F_MapScripts:
end
.LanceUncoversStaircase:
prioritysjump MahoganyMart1FLanceUncoversStaircaseScript
sdefer MahoganyMart1FLanceUncoversStaircaseScript
end
.MahoganyMart1FStaircase:

View File

@ -6,7 +6,7 @@ MobileBattleRoom_MapScripts:
def_callbacks
.InitializeMobileBattleRoom:
prioritysjump .InitializeAndPreparePokecenter2F
sdefer .InitializeAndPreparePokecenter2F
end
.DummyScene:

View File

@ -6,7 +6,7 @@ MobileTradeRoom_MapScripts:
def_callbacks
.InitializeMobileTradeRoom:
prioritysjump .InitializeAndPreparePokecenter2F
sdefer .InitializeAndPreparePokecenter2F
end
.DummyScene:

View File

@ -9,7 +9,7 @@ MountMoon_MapScripts:
def_callbacks
.RivalEncounter:
prioritysjump .RivalBattle
sdefer .RivalBattle
end
.DummyScene:

View File

@ -10,7 +10,7 @@ MrPokemonsHouse_MapScripts:
def_callbacks
.MeetMrPokemon:
prioritysjump .MrPokemonEvent
sdefer .MrPokemonEvent
end
.DummyScene:

View File

@ -18,7 +18,7 @@ OlivinePort_MapScripts:
end
.LeaveFastShip:
prioritysjump .LeaveFastShipScript
sdefer .LeaveFastShipScript
end
.LeaveFastShipScript:

View File

@ -21,29 +21,29 @@ Pokecenter2F_MapScripts:
clearevent EVENT_MYSTERY_GIFT_DELIVERY_GUY
checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_2
iftrue .Scene0Done
prioritysjump Pokecenter2F_AppearMysteryGiftDeliveryGuy
sdefer Pokecenter2F_AppearMysteryGiftDeliveryGuy
.Scene0Done:
end
.Scene1:
prioritysjump Script_LeftCableTradeCenter
sdefer Script_LeftCableTradeCenter
end
.Scene2:
prioritysjump Script_LeftCableColosseum
sdefer Script_LeftCableColosseum
end
.Scene3:
prioritysjump Script_LeftTimeCapsule
sdefer Script_LeftTimeCapsule
end
.Scene4:
prioritysjump Script_LeftMobileTradeRoom
sdefer Script_LeftMobileTradeRoom
end
.Scene5:
prioritysjump Script_LeftMobileBattleRoom
sdefer Script_LeftMobileBattleRoom
end
Pokecenter2F_AppearMysteryGiftDeliveryGuy:

View File

@ -20,7 +20,7 @@ Route35NationalParkGate_MapScripts:
end
.LeaveContestEarly:
prioritysjump .LeavingContestEarly
sdefer .LeavingContestEarly
end
.CheckIfContestRunning:

View File

@ -29,7 +29,7 @@ Route36NationalParkGate_MapScripts:
end
.LeaveContestEarly:
prioritysjump .LeavingContestEarly
sdefer .LeavingContestEarly
end
.CheckIfContestRunning:

View File

@ -14,7 +14,7 @@ Route43Gate_MapScripts:
callback MAPCALLBACK_NEWMAP, .CheckIfRockets
.RocketShakedown:
prioritysjump .RocketTakeover
sdefer .RocketTakeover
end
.DummyScene:

View File

@ -12,7 +12,7 @@ RuinsOfAlphAerodactylChamber_MapScripts:
end
.OpenWall:
prioritysjump .WallOpenScript
sdefer .WallOpenScript
end
.DummyScene:

View File

@ -13,7 +13,7 @@ RuinsOfAlphHoOhChamber_MapScripts:
end
.OpenWall:
prioritysjump .WallOpenScript
sdefer .WallOpenScript
end
.DummyScene:

View File

@ -14,7 +14,7 @@ RuinsOfAlphInnerChamber_MapScripts:
end
.UnownAppear:
prioritysjump .StrangePresenceScript
sdefer .StrangePresenceScript
end
.StrangePresenceScript:

View File

@ -16,7 +16,7 @@ RuinsOfAlphKabutoChamber_MapScripts:
end
.OpenWall:
prioritysjump .WallOpenScript
sdefer .WallOpenScript
end
.DummyScene:

View File

@ -13,7 +13,7 @@ RuinsOfAlphOmanyteChamber_MapScripts:
end
.OpenWall:
prioritysjump .WallOpenScript
sdefer .WallOpenScript
end
.DummyScene:

View File

@ -15,7 +15,7 @@ RuinsOfAlphResearchCenter_MapScripts:
end
.GetUnownDex:
prioritysjump .GetUnownDexScript
sdefer .GetUnownDexScript
end
.ScientistCallback:

View File

@ -25,7 +25,7 @@ TeamRocketBaseB3F_MapScripts:
callback MAPCALLBACK_TILES, .CheckGiovanniDoor
.LanceGetsPassword:
prioritysjump LanceGetPasswordScript
sdefer LanceGetPasswordScript
end
.DummyScene1:

View File

@ -11,7 +11,7 @@ TimeCapsule_MapScripts:
callback MAPCALLBACK_OBJECTS, .SetWhichChris
.InitializeTimeCapsule:
prioritysjump .InitializeAndPreparePokecenter2F
sdefer .InitializeAndPreparePokecenter2F
end
.DummyScene:

View File

@ -20,7 +20,7 @@ TinTower1F_MapScripts:
callback MAPCALLBACK_TILES, .StairsCallback
.FaceSuicune:
prioritysjump .SuicuneBattle
sdefer .SuicuneBattle
end
.DummyScene:

View File

@ -11,7 +11,7 @@ TradeCenter_MapScripts:
callback MAPCALLBACK_OBJECTS, .SetWhichChris
.InitializeTradeCenter:
prioritysjump .InitializeAndPreparePokecenter2F
sdefer .InitializeAndPreparePokecenter2F
end
.DummyScene:

View File

@ -15,7 +15,7 @@ VermilionPort_MapScripts:
end
.LeaveFastShip:
prioritysjump .LeaveFastShipScript
sdefer .LeaveFastShipScript
end
.FlyPoint:

View File

@ -10,7 +10,7 @@ WillsRoom_MapScripts:
callback MAPCALLBACK_TILES, .WillsRoomDoors
.LockDoor:
prioritysjump .WillsDoorLocksBehindYou
sdefer .WillsDoorLocksBehindYou
end
.DummyScene:

View File

@ -2659,7 +2659,7 @@ wMapStatus:: db
wMapEventStatus:: db
wScriptFlags::
; bit 3: priority jump
; bit 3: run deferred script
db
ds 1
wScriptFlags2::
@ -2680,10 +2680,10 @@ wScriptStack:: ds 3 * 5
ds 1
wScriptDelay:: db
wPriorityScriptBank::
wDeferredScriptBank::
wScriptTextBank::
db
wPriorityScriptAddr::
wDeferredScriptAddr::
wScriptTextAddr::
dw
ds 1