From 03a1c6efadfc33b13404d2e9cf447732c72f7422 Mon Sep 17 00:00:00 2001 From: Rangi42 Date: Mon, 2 Dec 2024 12:13:43 -0500 Subject: [PATCH] Mobile jumptable exit bits --- mobile/fixed_words.asm | 4 ++-- mobile/mobile_41.asm | 4 ++-- mobile/mobile_42.asm | 4 ++-- mobile/mobile_45_stadium.asm | 10 +++++----- mobile/mobile_46.asm | 4 ++-- mobile/mobile_5e.asm | 6 +++--- mobile/mobile_5f.asm | 4 ++-- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/mobile/fixed_words.asm b/mobile/fixed_words.asm index 192d2b264..644d48103 100644 --- a/mobile/fixed_words.asm +++ b/mobile/fixed_words.asm @@ -370,7 +370,7 @@ EZChat_MasterLoop: ldh a, [hJoyPressed] ldh [hJoypadPressed], a ld a, [wJumptableIndex] - bit 7, a + bit JUMPTABLE_EXIT_F, a jr nz, .exit call .DoJumptableFunction farcall PlaySpriteAnimations @@ -1686,7 +1686,7 @@ Function11cab3: .asm_11caf3 ld hl, wJumptableIndex - set 7, [hl] + set JUMPTABLE_EXIT_F, [hl] ret .asm_11caf9 diff --git a/mobile/mobile_41.asm b/mobile/mobile_41.asm index a09b97fbb..0e236d659 100644 --- a/mobile/mobile_41.asm +++ b/mobile/mobile_41.asm @@ -853,7 +853,7 @@ CheckMobileAdapterStatus: ; unused Function10635c: ld a, [wMobileCommsJumptableIndex] - bit 7, a + bit JUMPTABLE_EXIT_F, a ret nz ld a, [wMobileCommsJumptableIndex] ld hl, .Jumptable @@ -1004,7 +1004,7 @@ Function106442: Function106453: ld a, [wMobileCommsJumptableIndex] - set 7, a + set JUMPTABLE_EXIT_F, a ld [wMobileCommsJumptableIndex], a nop ld a, $4 diff --git a/mobile/mobile_42.asm b/mobile/mobile_42.asm index 0685b2de7..5a6ac5f51 100644 --- a/mobile/mobile_42.asm +++ b/mobile/mobile_42.asm @@ -337,7 +337,7 @@ MobileTradeAnim_InitSpeciesName: MobileTradeAnim_JumptableLoop: ld a, [wJumptableIndex] - bit 7, a + bit JUMPTABLE_EXIT_F, a jr nz, .StopAnim call .ExecuteMobileTradeAnimCommand call DelayFrame @@ -404,7 +404,7 @@ GetMobileTradeAnimByte: EndMobileTradeAnim: ld hl, wJumptableIndex - set 7, [hl] + set JUMPTABLE_EXIT_F, [hl] ret WaitMobileTradeSpriteAnims: diff --git a/mobile/mobile_45_stadium.asm b/mobile/mobile_45_stadium.asm index bf97e3314..143a0c38f 100644 --- a/mobile/mobile_45_stadium.asm +++ b/mobile/mobile_45_stadium.asm @@ -532,7 +532,7 @@ Function117ab4: Function117acd: call JoyTextDelay ld a, [wJumptableIndex] - bit 7, a + bit JUMPTABLE_EXIT_F, a jr nz, .asm_117ae2 call Function117ae9 farcall HDMATransferAttrmapAndTilemapToWRAMBank3 @@ -640,7 +640,7 @@ Function117b4f: call ExitMenu call ExitMenu farcall HDMATransferTilemapAndAttrmap_Overworld - ld a, $80 + ld a, JUMPTABLE_EXIT ld [wJumptableIndex], a ret @@ -659,12 +659,12 @@ Function117bb6: ld a, $2 ld [wc303], a farcall DisplayMobileError - ld a, $80 + ld a, JUMPTABLE_EXIT ld [wJumptableIndex], a ret .asm_117be1 - ld a, $80 + ld a, JUMPTABLE_EXIT ld [wJumptableIndex], a ret @@ -749,7 +749,7 @@ Function117c4a: call RotateThreePalettesRight pop af ldh [rSVBK], a - ld a, $80 + ld a, JUMPTABLE_EXIT ld [wJumptableIndex], a ret diff --git a/mobile/mobile_46.asm b/mobile/mobile_46.asm index 7ad215744..ad44ea82a 100644 --- a/mobile/mobile_46.asm +++ b/mobile/mobile_46.asm @@ -5555,7 +5555,7 @@ Function11ac51: .loop call JoyTextDelay ld a, [wJumptableIndex] - bit 7, a + bit JUMPTABLE_EXIT_F, a jr nz, .asm_11aca8 call Function11b314 call Function11acb7 @@ -5686,7 +5686,7 @@ MobileIncJumptableIndex: Function11ad8f: ld hl, wJumptableIndex - set 7, [hl] + set JUMPTABLE_EXIT_F, [hl] ret Function11ad95: diff --git a/mobile/mobile_5e.asm b/mobile/mobile_5e.asm index 5477b4c97..3d2980b9d 100644 --- a/mobile/mobile_5e.asm +++ b/mobile/mobile_5e.asm @@ -149,7 +149,7 @@ Function17a751: ld hl, $d08f inc [hl] ld a, [$d087] - bit 7, a + bit JUMPTABLE_EXIT_F, a jr z, .asm_17a755 ret @@ -239,7 +239,7 @@ Function17a7f4: dec [hl] ret nz ld hl, $d087 - set 7, [hl] + set JUMPTABLE_EXIT_F, [hl] ret Function17a7ff: @@ -253,7 +253,7 @@ Function17a7ff: ld hl, $d088 set 5, [hl] ld hl, $d087 - set 7, [hl] + set JUMPTABLE_EXIT_F, [hl] ret Function17a81a: diff --git a/mobile/mobile_5f.asm b/mobile/mobile_5f.asm index 16dfd320a..51544e056 100644 --- a/mobile/mobile_5f.asm +++ b/mobile/mobile_5f.asm @@ -4444,7 +4444,7 @@ DisplayMobileError: call JoyTextDelay call .RunJumptable ld a, [wc303] - bit 7, a + bit JUMPTABLE_EXIT_F, a jr nz, .quit farcall HDMATransferAttrmapAndTilemapToWRAMBank3 jr .loop @@ -5143,7 +5143,7 @@ Function17ff23: xor a ld [wMusicFadeID + 1], a ld hl, wc303 - set 7, [hl] + set JUMPTABLE_EXIT_F, [hl] ret Function17ff3c: