diff --git a/constants/ram_constants.asm b/constants/ram_constants.asm index 3e020cc3434..cf7b5107ce1 100644 --- a/constants/ram_constants.asm +++ b/constants/ram_constants.asm @@ -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 diff --git a/engine/battle/battle_transition.asm b/engine/battle/battle_transition.asm index 7ce6d71279e..24e9ccee324 100644 --- a/engine/battle/battle_transition.asm +++ b/engine/battle/battle_transition.asm @@ -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 diff --git a/engine/debug/color_picker.asm b/engine/debug/color_picker.asm index 99473c1b601..9ccdd52b066 100644 --- a/engine/debug/color_picker.asm +++ b/engine/debug/color_picker.asm @@ -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: diff --git a/engine/events/field_moves.asm b/engine/events/field_moves.asm index 78d5774f0a0..8a24c0a743b 100644 --- a/engine/events/field_moves.asm +++ b/engine/events/field_moves.asm @@ -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: diff --git a/engine/events/magnet_train.asm b/engine/events/magnet_train.asm index fa453c6e2e6..0dcdc4584c4 100644 --- a/engine/events/magnet_train.asm +++ b/engine/events/magnet_train.asm @@ -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 diff --git a/engine/events/mom.asm b/engine/events/mom.asm index e0c53935766..e1647034c83 100644 --- a/engine/events/mom.asm +++ b/engine/events/mom.asm @@ -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: diff --git a/engine/events/overworld.asm b/engine/events/overworld.asm index 98b415b6a79..6d698e2b840 100644 --- a/engine/events/overworld.asm +++ b/engine/events/overworld.asm @@ -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 diff --git a/engine/games/card_flip.asm b/engine/games/card_flip.asm index c193349db99..e503f11bd09 100644 --- a/engine/games/card_flip.asm +++ b/engine/games/card_flip.asm @@ -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: diff --git a/engine/games/memory_game.asm b/engine/games/memory_game.asm index ee0653c9659..2652c32c58d 100644 --- a/engine/games/memory_game.asm +++ b/engine/games/memory_game.asm @@ -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 diff --git a/engine/games/unown_puzzle.asm b/engine/games/unown_puzzle.asm index 5d422a81faa..56af8bb7c16 100644 --- a/engine/games/unown_puzzle.asm +++ b/engine/games/unown_puzzle.asm @@ -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: diff --git a/engine/items/pack.asm b/engine/items/pack.asm index afa59839eef..9d81c6af85c 100644 --- a/engine/items/pack.asm +++ b/engine/items/pack.asm @@ -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 diff --git a/engine/menus/intro_menu.asm b/engine/menus/intro_menu.asm index e1d23fd2bda..22544aea24f 100644 --- a/engine/menus/intro_menu.asm +++ b/engine/menus/intro_menu.asm @@ -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: diff --git a/engine/menus/naming_screen.asm b/engine/menus/naming_screen.asm index 48a8d456c96..e3aa4332c81 100644 --- a/engine/menus/naming_screen.asm +++ b/engine/menus/naming_screen.asm @@ -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 diff --git a/engine/menus/trainer_card.asm b/engine/menus/trainer_card.asm index 06ad656a0fe..2c7d0e5e361 100644 --- a/engine/menus/trainer_card.asm +++ b/engine/menus/trainer_card.asm @@ -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: diff --git a/engine/movie/credits.asm b/engine/movie/credits.asm index ab5af136460..1784cffc25e 100644 --- a/engine/movie/credits.asm +++ b/engine/movie/credits.asm @@ -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) diff --git a/engine/movie/intro.asm b/engine/movie/intro.asm index 28a200c7783..1f37c0fd305 100644 --- a/engine/movie/intro.asm +++ b/engine/movie/intro.asm @@ -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: diff --git a/engine/movie/splash.asm b/engine/movie/splash.asm index af3b911f72a..016a60f33aa 100644 --- a/engine/movie/splash.asm +++ b/engine/movie/splash.asm @@ -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: diff --git a/engine/movie/trade_animation.asm b/engine/movie/trade_animation.asm index 6e1a82a2fa6..bb9ae2e639a 100644 --- a/engine/movie/trade_animation.asm +++ b/engine/movie/trade_animation.asm @@ -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: diff --git a/engine/pokedex/pokedex.asm b/engine/pokedex/pokedex.asm index 3295fbfe48e..e3529e00cf1 100644 --- a/engine/pokedex/pokedex.asm +++ b/engine/pokedex/pokedex.asm @@ -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: diff --git a/engine/pokegear/pokegear.asm b/engine/pokegear/pokegear.asm index ac8bac49713..1749a371f79 100644 --- a/engine/pokegear/pokegear.asm +++ b/engine/pokegear/pokegear.asm @@ -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 diff --git a/engine/pokemon/bills_pc.asm b/engine/pokemon/bills_pc.asm index c9d12432701..9617a14a126 100644 --- a/engine/pokemon/bills_pc.asm +++ b/engine/pokemon/bills_pc.asm @@ -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: diff --git a/engine/printer/printer.asm b/engine/printer/printer.asm index e4cd871ed30..d5ae405c6d4 100644 --- a/engine/printer/printer.asm +++ b/engine/printer/printer.asm @@ -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] diff --git a/engine/printer/printer_serial.asm b/engine/printer/printer_serial.asm index a0c8d1e465f..c086df001bc 100644 --- a/engine/printer/printer_serial.asm +++ b/engine/printer/printer_serial.asm @@ -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: diff --git a/home/decompress.asm b/home/decompress.asm index 15e31f5c212..b135150677c 100644 --- a/home/decompress.asm +++ b/home/decompress.asm @@ -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