Bit 7 of wJumptableIndex is often JUMPTABLE_EXIT_F

This commit is contained in:
Rangi42
2024-12-02 11:12:58 -05:00
committed by Sylvie
parent 644bd42fb0
commit e1e7cbd838
24 changed files with 114 additions and 110 deletions

View File

@@ -21,6 +21,11 @@ DEF AUTO_INPUT EQU $ff
const TEMPMON ; 3
const WILDMON ; 4
; wJumptableIndex::
DEF JUMPTABLE_INDEX_MASK EQU %01111111
const_def 7
shift_const JUMPTABLE_EXIT
; wGameTimerPaused::
DEF GAME_TIMER_COUNTING_F EQU 0
DEF GAME_TIMER_MOBILE_F EQU 7

View File

@@ -4,7 +4,6 @@ DEF BATTLETRANSITION_CAVE_STRONGER EQU $09
DEF BATTLETRANSITION_NO_CAVE EQU $10
DEF BATTLETRANSITION_NO_CAVE_STRONGER EQU $18
DEF BATTLETRANSITION_FINISH EQU $20
DEF BATTLETRANSITION_END EQU $80
DEF BATTLETRANSITION_SQUARE EQU "8" ; $fe
DEF BATTLETRANSITION_BLACK EQU "9" ; $ff
@@ -26,7 +25,7 @@ DoBattleTransition:
.loop
ld a, [wJumptableIndex]
bit 7, a ; BATTLETRANSITION_END?
bit JUMPTABLE_EXIT_F, a
jr nz, .done
call BattleTransitionJumptable
call DelayFrame
@@ -247,7 +246,7 @@ StartTrainerBattle_DetermineWhichAnimation:
StartTrainerBattle_Finish:
call ClearSprites
ld a, BATTLETRANSITION_END
ld a, JUMPTABLE_EXIT
ld [wJumptableIndex], a
ret

View File

@@ -62,7 +62,7 @@ DebugColorPicker: ; unreferenced
ld [wDebugColorIsShiny], a
.loop
ld a, [wJumptableIndex]
bit 7, a
bit JUMPTABLE_EXIT_F, a
jr nz, .exit
call DebugColorMain
call DebugColor_PlaceCursor
@@ -720,7 +720,7 @@ DebugColor_TMHMJoypad:
.exit ; unreferenced
ld hl, wJumptableIndex
set 7, [hl]
set JUMPTABLE_EXIT_F, [hl]
ret
.scroll:

View File

@@ -125,7 +125,7 @@ OWCutAnimation:
call PlaySFX
.loop
ld a, [wJumptableIndex]
bit 7, a
bit JUMPTABLE_EXIT_F, a
jr nz, .finish
ld a, 36 * SPRITEOAMSTRUCT_LENGTH
ld [wCurSpriteOAMAddr], a
@@ -213,7 +213,7 @@ Cut_WaitAnimSFX:
.finished
ld hl, wJumptableIndex
set 7, [hl]
set JUMPTABLE_EXIT_F, [hl]
ret
Cut_SpawnLeaf:
@@ -322,7 +322,7 @@ FlyFromAnim:
ld [wFrameCounter], a
.loop
ld a, [wJumptableIndex]
bit 7, a
bit JUMPTABLE_EXIT_F, a
jr nz, .exit
ld a, 0 * SPRITEOAMSTRUCT_LENGTH
ld [wCurSpriteOAMAddr], a
@@ -359,7 +359,7 @@ FlyToAnim:
ld [wFrameCounter], a
.loop
ld a, [wJumptableIndex]
bit 7, a
bit JUMPTABLE_EXIT_F, a
jr nz, .exit
ld a, 0 * SPRITEOAMSTRUCT_LENGTH
ld [wCurSpriteOAMAddr], a
@@ -428,7 +428,7 @@ FlyFunction_FrameTimer:
.exit
ld hl, wJumptableIndex
set 7, [hl]
set JUMPTABLE_EXIT_F, [hl]
ret
.SpawnLeaf:

View File

@@ -43,7 +43,7 @@ MagnetTrain:
ld a, [wJumptableIndex]
and a
jr z, .initialize
bit 7, a
bit JUMPTABLE_EXIT_F, a
jr nz, .done
callfar PlaySpriteAnimations
call MagnetTrain_Jumptable
@@ -379,7 +379,7 @@ MagnetTrain_Jumptable:
ret
.TrainArrived:
ld a, $80
ld a, JUMPTABLE_EXIT
ld [wJumptableIndex], a
ld de, SFX_TRAIN_ARRIVED
call PlaySFX

View File

@@ -7,7 +7,7 @@ BankOfMom:
ld [wJumptableIndex], a
.loop
ld a, [wJumptableIndex]
bit 7, a
bit JUMPTABLE_EXIT_F, a
jr nz, .done
call .RunJumptable
jr .loop
@@ -278,7 +278,7 @@ BankOfMom:
.AskDST:
ld hl, wJumptableIndex
set 7, [hl]
set JUMPTABLE_EXIT_F, [hl]
ret
DSTChecks:

View File

@@ -9,13 +9,13 @@ FieldMoveJumptable:
ld a, [wFieldMoveJumptableIndex]
rst JumpTable
ld [wFieldMoveJumptableIndex], a
bit 7, a
bit JUMPTABLE_EXIT_F, a
jr nz, .okay
and a
ret
.okay
and $7f
and JUMPTABLE_INDEX_MASK
scf
ret
@@ -120,7 +120,7 @@ CutFunction:
ld hl, .Jumptable
call FieldMoveJumptable
jr nc, .loop
and $7f
and JUMPTABLE_INDEX_MASK
ld [wFieldMoveSucceeded], a
ret
@@ -139,7 +139,7 @@ CutFunction:
ret
.nohivebadge
ld a, $80
ld a, JUMPTABLE_EXIT
ret
.nothingtocut
@@ -149,13 +149,13 @@ CutFunction:
.DoCut:
ld hl, Script_CutFromMenu
call QueueScript
ld a, $81
ld a, JUMPTABLE_EXIT | $1
ret
.FailCut:
ld hl, CutNothingText
call MenuTextboxBackup
ld a, $80
ld a, JUMPTABLE_EXIT
ret
UseCutText:
@@ -273,7 +273,7 @@ INCLUDE "data/collision/field_move_blocks.asm"
FlashFunction:
call .CheckUseFlash
and $7f
and JUMPTABLE_INDEX_MASK
ld [wFieldMoveSucceeded], a
ret
@@ -290,16 +290,16 @@ FlashFunction:
jr nz, .notadarkcave
.useflash
call UseFlash
ld a, $81
ld a, JUMPTABLE_EXIT | $1
ret
.notadarkcave
call FieldMoveFailed
ld a, $80
ld a, JUMPTABLE_EXIT
ret
.nozephyrbadge
ld a, $80
ld a, JUMPTABLE_EXIT
ret
UseFlash:
@@ -333,7 +333,7 @@ SurfFunction:
ld hl, .Jumptable
call FieldMoveJumptable
jr nc, .loop
and $7f
and JUMPTABLE_INDEX_MASK
ld [wFieldMoveSucceeded], a
ret
@@ -366,7 +366,7 @@ SurfFunction:
ld a, $1
ret
.nofogbadge
ld a, $80
ld a, JUMPTABLE_EXIT
ret
.alreadyfail
ld a, $3
@@ -381,19 +381,19 @@ SurfFunction:
call GetPartyNickname
ld hl, SurfFromMenuScript
call QueueScript
ld a, $81
ld a, JUMPTABLE_EXIT | $1
ret
.FailSurf:
ld hl, CantSurfText
call MenuTextboxBackup
ld a, $80
ld a, JUMPTABLE_EXIT
ret
.AlreadySurfing:
ld hl, AlreadySurfingText
call MenuTextboxBackup
ld a, $80
ld a, JUMPTABLE_EXIT
ret
SurfFromMenuScript:
@@ -547,7 +547,7 @@ FlyFunction:
ld hl, .Jumptable
call FieldMoveJumptable
jr nc, .loop
and $7f
and JUMPTABLE_INDEX_MASK
ld [wFieldMoveSucceeded], a
ret
@@ -583,7 +583,7 @@ FlyFunction:
ret
.nostormbadge
ld a, $82
ld a, JUMPTABLE_EXIT | $2
ret
.indoors
@@ -593,18 +593,18 @@ FlyFunction:
.illegal
call CloseWindow
call WaitBGMap
ld a, $80
ld a, JUMPTABLE_EXIT
ret
.DoFly:
ld hl, .FlyScript
call QueueScript
ld a, $81
ld a, JUMPTABLE_EXIT | $1
ret
.FailFly:
call FieldMoveFailed
ld a, $82
ld a, JUMPTABLE_EXIT | $2
ret
.FlyScript:
@@ -631,25 +631,25 @@ FlyFunction:
WaterfallFunction:
call .TryWaterfall
and $7f
and JUMPTABLE_INDEX_MASK
ld [wFieldMoveSucceeded], a
ret
.TryWaterfall:
ld de, ENGINE_RISINGBADGE
farcall CheckBadge
ld a, $80
ld a, JUMPTABLE_EXIT
ret c
call CheckMapCanWaterfall
jr c, .failed
ld hl, Script_WaterfallFromMenu
call QueueScript
ld a, $81
ld a, JUMPTABLE_EXIT | $1
ret
.failed
call FieldMoveFailed
ld a, $80
ld a, JUMPTABLE_EXIT
ret
CheckMapCanWaterfall:
@@ -758,7 +758,7 @@ EscapeRopeOrDig:
ld hl, .DigTable
call FieldMoveJumptable
jr nc, .loop
and $7f
and JUMPTABLE_INDEX_MASK
ld [wFieldMoveSucceeded], a
ret
@@ -802,14 +802,14 @@ EscapeRopeOrDig:
jr nz, .escaperope
ld hl, .UsedDigScript
call QueueScript
ld a, $81
ld a, JUMPTABLE_EXIT | $1
ret
.escaperope
farcall SpecialKabutoChamber
ld hl, .UsedEscapeRopeScript
call QueueScript
ld a, $81
ld a, JUMPTABLE_EXIT | $1
ret
.FailDig:
@@ -822,7 +822,7 @@ EscapeRopeOrDig:
call CloseWindow
.failescaperope
ld a, $80
ld a, JUMPTABLE_EXIT
ret
.UseDigText:
@@ -877,7 +877,7 @@ TeleportFunction:
ld hl, .Jumptable
call FieldMoveJumptable
jr nc, .loop
and $7f
and JUMPTABLE_INDEX_MASK
ld [wFieldMoveSucceeded], a
ret
@@ -912,13 +912,13 @@ TeleportFunction:
call GetPartyNickname
ld hl, .TeleportScript
call QueueScript
ld a, $81
ld a, JUMPTABLE_EXIT | $1
ret
.FailTeleport:
ld hl, .CantUseTeleportText
call MenuTextboxBackup
ld a, $80
ld a, JUMPTABLE_EXIT
ret
.TeleportReturnText:
@@ -956,7 +956,7 @@ TeleportFunction:
StrengthFunction:
call .TryStrength
and $7f
and JUMPTABLE_INDEX_MASK
ld [wFieldMoveSucceeded], a
ret
@@ -969,7 +969,7 @@ StrengthFunction:
.AlreadyUsingStrength: ; unreferenced
ld hl, .AlreadyUsingStrengthText
call MenuTextboxBackup
ld a, $80
ld a, JUMPTABLE_EXIT
ret
.AlreadyUsingStrengthText:
@@ -977,13 +977,13 @@ StrengthFunction:
text_end
.Failed:
ld a, $80
ld a, JUMPTABLE_EXIT
ret
.UseStrength:
ld hl, Script_StrengthFromMenu
call QueueScript
ld a, $81
ld a, JUMPTABLE_EXIT | $1
ret
SetStrengthFlag:
@@ -1087,7 +1087,7 @@ WhirlpoolFunction:
ld hl, .Jumptable
call FieldMoveJumptable
jr nc, .loop
and $7f
and JUMPTABLE_INDEX_MASK
ld [wFieldMoveSucceeded], a
ret
@@ -1110,18 +1110,18 @@ WhirlpoolFunction:
ret
.noglacierbadge
ld a, $80
ld a, JUMPTABLE_EXIT
ret
.DoWhirlpool:
ld hl, Script_WhirlpoolFromMenu
call QueueScript
ld a, $81
ld a, JUMPTABLE_EXIT | $1
ret
.FailWhirlpool:
call FieldMoveFailed
ld a, $80
ld a, JUMPTABLE_EXIT
ret
UseWhirlpoolText:
@@ -1230,7 +1230,7 @@ AskWhirlpoolText:
HeadbuttFunction:
call TryHeadbuttFromMenu
and $7f
and JUMPTABLE_INDEX_MASK
ld [wFieldMoveSucceeded], a
ret
@@ -1241,12 +1241,12 @@ TryHeadbuttFromMenu:
ld hl, HeadbuttFromMenuScript
call QueueScript
ld a, $81
ld a, JUMPTABLE_EXIT | $1
ret
.no_tree
call FieldMoveFailed
ld a, $80
ld a, JUMPTABLE_EXIT
ret
UseHeadbuttText:
@@ -1311,7 +1311,7 @@ AskHeadbuttText:
RockSmashFunction:
call TryRockSmashFromMenu
and $7f
and JUMPTABLE_INDEX_MASK
ld [wFieldMoveSucceeded], a
ret
@@ -1324,12 +1324,12 @@ TryRockSmashFromMenu:
ld hl, RockSmashFromMenuScript
call QueueScript
ld a, $81
ld a, JUMPTABLE_EXIT | $1
ret
.no_rock
call FieldMoveFailed
ld a, $80
ld a, JUMPTABLE_EXIT
ret
GetFacingObject:
@@ -1430,7 +1430,7 @@ FishFunction:
ld hl, .FishTable
call FieldMoveJumptable
jr nc, .loop
and $7f
and JUMPTABLE_INDEX_MASK
ld [wFieldMoveSucceeded], a
ret
@@ -1484,7 +1484,7 @@ FishFunction:
ret
.FailFish:
ld a, $80
ld a, JUMPTABLE_EXIT
ret
.FishGotSomething:
@@ -1492,7 +1492,7 @@ FishFunction:
ld [wFishingResult], a
ld hl, Script_GotABite
call QueueScript
ld a, $81
ld a, JUMPTABLE_EXIT | $1
ret
.FishNoBite:
@@ -1500,7 +1500,7 @@ FishFunction:
ld [wFishingResult], a
ld hl, Script_NotEvenANibble
call QueueScript
ld a, $81
ld a, JUMPTABLE_EXIT | $1
ret
.FishNoFish:
@@ -1508,7 +1508,7 @@ FishFunction:
ld [wFishingResult], a
ld hl, Script_NotEvenANibble2
call QueueScript
ld a, $81
ld a, JUMPTABLE_EXIT | $1
ret
Script_NotEvenANibble:
@@ -1619,7 +1619,7 @@ UnusedNothingHereText: ; unreferenced
BikeFunction:
call .TryBike
and $7f
and JUMPTABLE_INDEX_MASK
ld [wFieldMoveSucceeded], a
ret

View File

@@ -61,7 +61,7 @@ _CardFlip:
call PlayMusic
.MasterLoop:
ld a, [wJumptableIndex]
bit 7, a
bit JUMPTABLE_EXIT_F, a
jr nz, .leavethegame
call .CardFlip
jr .MasterLoop
@@ -323,7 +323,7 @@ _CardFlip:
.Quit:
ld hl, wJumptableIndex
set 7, [hl]
set JUMPTABLE_EXIT_F, [hl]
ret
CardFlip_ShuffleDeck:

View File

@@ -44,7 +44,7 @@ _MemoryGame:
.JumptableLoop:
ld a, [wJumptableIndex]
bit 7, a
bit JUMPTABLE_EXIT_F, a
jr nz, .quit
call .ExecuteJumptable
callfar PlaySpriteAnimations
@@ -80,7 +80,7 @@ _MemoryGame:
call UnusedCursor_InterpretJoypad_AnimateCursor
jr nc, .proceed
ld hl, wJumptableIndex
set 7, [hl]
set JUMPTABLE_EXIT_F, [hl]
ret
.proceed
@@ -235,7 +235,7 @@ endr
call UnusedCursor_InterpretJoypad_AnimateCursor
jr nc, .restart
ld hl, wJumptableIndex
set 7, [hl]
set JUMPTABLE_EXIT_F, [hl]
ret
.restart

View File

@@ -60,7 +60,7 @@ _UnownPuzzle:
.loop
call JoyTextDelay
ld a, [wJumptableIndex]
bit 7, a
bit JUMPTABLE_EXIT_F, a
jr nz, .quit
call UnownPuzzleJumptable
ld a, [wHoldingUnownPuzzlePiece]
@@ -332,7 +332,7 @@ UnownPuzzle_A:
ld [wSolvedUnownPuzzle], a
UnownPuzzle_Quit:
ld hl, wJumptableIndex
set 7, [hl]
set JUMPTABLE_EXIT_F, [hl]
ret
UnownPuzzle_InvalidAction:

View File

@@ -19,7 +19,7 @@ Pack:
.loop
call JoyTextDelay
ld a, [wJumptableIndex]
bit 7, a
bit JUMPTABLE_EXIT_F, a
jr nz, .done
call .RunJumptable
call DelayFrame
@@ -631,7 +631,7 @@ BattlePack:
.loop
call JoyTextDelay
ld a, [wJumptableIndex]
bit 7, a
bit JUMPTABLE_EXIT_F, a
jr nz, .end
call .RunJumptable
call DelayFrame
@@ -1186,14 +1186,14 @@ Pack_GetJumptablePointer:
Pack_QuitNoScript:
ld hl, wJumptableIndex
set 7, [hl]
set JUMPTABLE_EXIT_F, [hl]
xor a ; FALSE
ld [wPackUsedItem], a
ret
Pack_QuitRunScript:
ld hl, wJumptableIndex
set 7, [hl]
set JUMPTABLE_EXIT_F, [hl]
ld a, TRUE
ld [wPackUsedItem], a
ret

View File

@@ -1033,7 +1033,7 @@ StartTitleScreen:
RunTitleScreen:
ld a, [wJumptableIndex]
bit 7, a
bit JUMPTABLE_EXIT_F, a
jr nz, .done_title
call TitleScreenScene
farcall SuicuneFrameIterator
@@ -1211,7 +1211,7 @@ TitleScreenMain:
; Return to the intro sequence.
ld hl, wJumptableIndex
set 7, [hl]
set JUMPTABLE_EXIT_F, [hl]
ret
.end
@@ -1236,7 +1236,7 @@ TitleScreenMain:
; Return to the intro sequence.
ld hl, wJumptableIndex
set 7, [hl]
set JUMPTABLE_EXIT_F, [hl]
ret
TitleScreenEnd:
@@ -1254,7 +1254,7 @@ TitleScreenEnd:
; Back to the intro.
ld hl, wJumptableIndex
set 7, [hl]
set JUMPTABLE_EXIT_F, [hl]
ret
DeleteSaveData:

View File

@@ -322,7 +322,7 @@ NamingScreen_ApplyTextInputMode:
NamingScreenJoypadLoop:
call JoyTextDelay
ld a, [wJumptableIndex]
bit 7, a
bit JUMPTABLE_EXIT_F, a
jr nz, .quit
call .RunJumptable
farcall PlaySpriteAnimationsAndDelayFrame
@@ -444,7 +444,7 @@ NamingScreenJoypadLoop:
.end
call NamingScreen_StoreEntry
ld hl, wJumptableIndex
set 7, [hl]
set JUMPTABLE_EXIT_F, [hl]
ret
.select
@@ -1008,7 +1008,7 @@ INCBIN "gfx/naming_screen/mail.2bpp"
.DoMailEntry:
call JoyTextDelay
ld a, [wJumptableIndex]
bit 7, a
bit JUMPTABLE_EXIT_F, a
jr nz, .exit_mail
call .DoJumptable
farcall PlaySpriteAnimationsAndDelayFrame
@@ -1134,7 +1134,7 @@ INCBIN "gfx/naming_screen/mail.2bpp"
.finished
call NamingScreen_StoreEntry
ld hl, wJumptableIndex
set 7, [hl]
set JUMPTABLE_EXIT_F, [hl]
ret
.select

View File

@@ -22,7 +22,7 @@ TrainerCard:
call UpdateTime
call JoyTextDelay
ld a, [wJumptableIndex]
bit 7, a
bit JUMPTABLE_EXIT_F, a
jr nz, .quit
ldh a, [hJoyLast]
and B_BUTTON
@@ -98,7 +98,7 @@ TrainerCard_IncrementJumptable:
TrainerCard_Quit:
ld hl, wJumptableIndex
set 7, [hl]
set JUMPTABLE_EXIT_F, [hl]
ret
TrainerCard_Page1_LoadGFX:

View File

@@ -115,7 +115,7 @@ Credits_HandleAButton:
and A_BUTTON
ret z
ld a, [wJumptableIndex]
bit 7, a
bit JUMPTABLE_EXIT_F, a
ret
Credits_HandleBButton:
@@ -228,7 +228,7 @@ Credits_LYOverride:
ParseCredits:
ld hl, wJumptableIndex
bit 7, [hl]
bit JUMPTABLE_EXIT_F, [hl]
jp nz, .done
; Wait until the timer has run out to parse the next command.
@@ -367,7 +367,7 @@ ParseCredits:
.end
; Stop execution.
ld hl, wJumptableIndex
set 7, [hl]
set JUMPTABLE_EXIT_F, [hl]
ld a, 32
ld [wMusicFade], a
ld a, LOW(MUSIC_POST_CREDITS)

View File

@@ -14,7 +14,7 @@ CrystalIntro:
and BUTTONS
jr nz, .ShutOffMusic
ld a, [wJumptableIndex]
bit 7, a
bit JUMPTABLE_EXIT_F, a
jr nz, .done
call IntroSceneJumper
farcall PlaySpriteAnimations
@@ -1149,7 +1149,7 @@ IntroScene28:
.done
ld hl, wJumptableIndex
set 7, [hl]
set JUMPTABLE_EXIT_F, [hl]
ret
Intro_Scene24_ApplyPaletteFade:

View File

@@ -41,7 +41,7 @@ SplashScreen:
and BUTTONS
jr nz, .pressed_button
ld a, [wJumptableIndex]
bit 7, a
bit JUMPTABLE_EXIT_F, a
jr nz, .finish
call GameFreakPresentsScene
farcall PlaySpriteAnimations
@@ -195,7 +195,7 @@ GameFreakPresents_WaitForTimer:
.finish
ld hl, wJumptableIndex
set 7, [hl]
set JUMPTABLE_EXIT_F, [hl]
ret
GameFreakLogoSpriteAnim:

View File

@@ -221,7 +221,7 @@ RunTradeAnimScript:
DoTradeAnimation:
ld a, [wJumptableIndex]
bit 7, a
bit JUMPTABLE_EXIT_F, a
jr nz, .finished
call .DoTradeAnimCommand
callfar PlaySpriteAnimations
@@ -309,7 +309,7 @@ TradeAnim_AdvanceScriptPointer:
TradeAnim_End:
ld hl, wJumptableIndex
set 7, [hl]
set JUMPTABLE_EXIT_F, [hl]
ret
TradeAnim_TubeToOT1:

View File

@@ -47,7 +47,7 @@ Pokedex:
.main
call JoyTextDelay
ld a, [wJumptableIndex]
bit 7, a
bit JUMPTABLE_EXIT_F, a
jr nz, .exit
call Pokedex_RunJumptable
call DelayFrame
@@ -211,7 +211,7 @@ Pokedex_IncrementDexPointer:
Pokedex_Exit:
ld hl, wJumptableIndex
set 7, [hl]
set JUMPTABLE_EXIT_F, [hl]
ret
Pokedex_InitMainScreen:

View File

@@ -43,7 +43,7 @@ PokeGear:
call UpdateTime
call JoyTextDelay
ld a, [wJumptableIndex]
bit 7, a
bit JUMPTABLE_EXIT_F, a
jr nz, .done
call PokegearJumptable
farcall PlaySpriteAnimations
@@ -495,7 +495,7 @@ PokegearClock_Joypad:
.quit
ld hl, wJumptableIndex
set 7, [hl]
set JUMPTABLE_EXIT_F, [hl]
ret
.UpdateClock:
@@ -606,7 +606,7 @@ PokegearMap_ContinueMap:
.cancel
ld hl, wJumptableIndex
set 7, [hl]
set JUMPTABLE_EXIT_F, [hl]
ret
.DPad:
@@ -793,7 +793,7 @@ PokegearRadio_Joypad:
.cancel
ld hl, wJumptableIndex
set 7, [hl]
set JUMPTABLE_EXIT_F, [hl]
ret
PokegearPhone_Init:
@@ -852,7 +852,7 @@ PokegearPhone_Joypad:
.b
ld hl, wJumptableIndex
set 7, [hl]
set JUMPTABLE_EXIT_F, [hl]
ret
.a

View File

@@ -20,7 +20,7 @@ _DepositPKMN:
.loop
call JoyTextDelay
ld a, [wJumptableIndex]
bit 7, a
bit JUMPTABLE_EXIT_F, a
jr nz, .done
call .RunJumptable
call DelayFrame
@@ -276,7 +276,7 @@ _WithdrawPKMN:
.loop
call JoyTextDelay
ld a, [wJumptableIndex]
bit 7, a
bit JUMPTABLE_EXIT_F, a
jr nz, .done
call .RunJumptable
call DelayFrame
@@ -516,7 +516,7 @@ _MovePKMNWithoutMail:
.loop
call JoyTextDelay
ld a, [wJumptableIndex]
bit 7, a
bit JUMPTABLE_EXIT_F, a
jr nz, .done
call .RunJumptable
call DelayFrame
@@ -796,7 +796,7 @@ BillsPC_IncrementJumptableIndex:
BillsPC_EndJumptableLoop:
ld hl, wJumptableIndex
set 7, [hl]
set JUMPTABLE_EXIT_F, [hl]
ret
_StatsScreenDPad:

View File

@@ -4,7 +4,7 @@ SendScreenToPrinter:
call CheckCancelPrint
jr c, .cancel
ld a, [wJumptableIndex]
bit 7, a
bit JUMPTABLE_EXIT_F, a
jr nz, .finished
call PrinterJumptableIteration
call CheckPrinterStatus
@@ -245,7 +245,7 @@ PrintUnownStamp:
call CheckCancelPrint
jr c, .done
ld a, [wJumptableIndex]
bit 7, a
bit JUMPTABLE_EXIT_F, a
jr nz, .done
call PrinterJumptableIteration
ld a, [wJumptableIndex]

View File

@@ -56,7 +56,7 @@ Printer_Quit:
xor a
ld [wPrinterStatusFlags], a
ld hl, wJumptableIndex
set 7, [hl]
set JUMPTABLE_EXIT_F, [hl]
ret
Printer_NextSection:

View File

@@ -309,7 +309,7 @@ DEF LZ_LONG_HI EQU %00000011
.donerw
pop hl
bit 7, [hl]
bit 7, [hl] ; sign
jr nz, .next
inc hl ; positive offset is two bytes
.next