Skip to content

Commit

Permalink
Mobile jumptable exit bits
Browse files Browse the repository at this point in the history
  • Loading branch information
Rangi42 committed Dec 2, 2024
1 parent 41045d0 commit 03a1c6e
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions mobile/fixed_words.asm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -1686,7 +1686,7 @@ Function11cab3:

.asm_11caf3
ld hl, wJumptableIndex
set 7, [hl]
set JUMPTABLE_EXIT_F, [hl]
ret

.asm_11caf9
Expand Down
4 changes: 2 additions & 2 deletions mobile/mobile_41.asm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -1004,7 +1004,7 @@ Function106442:

Function106453:
ld a, [wMobileCommsJumptableIndex]
set 7, a
set JUMPTABLE_EXIT_F, a
ld [wMobileCommsJumptableIndex], a
nop
ld a, $4
Expand Down
4 changes: 2 additions & 2 deletions mobile/mobile_42.asm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -404,7 +404,7 @@ GetMobileTradeAnimByte:

EndMobileTradeAnim:
ld hl, wJumptableIndex
set 7, [hl]
set JUMPTABLE_EXIT_F, [hl]
ret

WaitMobileTradeSpriteAnims:
Expand Down
10 changes: 5 additions & 5 deletions mobile/mobile_45_stadium.asm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -640,7 +640,7 @@ Function117b4f:
call ExitMenu
call ExitMenu
farcall HDMATransferTilemapAndAttrmap_Overworld
ld a, $80
ld a, JUMPTABLE_EXIT
ld [wJumptableIndex], a
ret

Expand All @@ -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

Expand Down Expand Up @@ -749,7 +749,7 @@ Function117c4a:
call RotateThreePalettesRight
pop af
ldh [rSVBK], a
ld a, $80
ld a, JUMPTABLE_EXIT
ld [wJumptableIndex], a
ret

Expand Down
4 changes: 2 additions & 2 deletions mobile/mobile_46.asm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -5686,7 +5686,7 @@ MobileIncJumptableIndex:

Function11ad8f:
ld hl, wJumptableIndex
set 7, [hl]
set JUMPTABLE_EXIT_F, [hl]
ret

Function11ad95:
Expand Down
6 changes: 3 additions & 3 deletions mobile/mobile_5e.asm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -239,7 +239,7 @@ Function17a7f4:
dec [hl]
ret nz
ld hl, $d087
set 7, [hl]
set JUMPTABLE_EXIT_F, [hl]
ret

Function17a7ff:
Expand All @@ -253,7 +253,7 @@ Function17a7ff:
ld hl, $d088
set 5, [hl]
ld hl, $d087
set 7, [hl]
set JUMPTABLE_EXIT_F, [hl]
ret

Function17a81a:
Expand Down
4 changes: 2 additions & 2 deletions mobile/mobile_5f.asm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -5143,7 +5143,7 @@ Function17ff23:
xor a
ld [wMusicFadeID + 1], a
ld hl, wc303
set 7, [hl]
set JUMPTABLE_EXIT_F, [hl]
ret

Function17ff3c:
Expand Down

0 comments on commit 03a1c6e

Please sign in to comment.