mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
So very jumb
This commit is contained in:
parent
0a244e043c
commit
6c25592b8c
@ -237,16 +237,16 @@ Functioncc220: ; cc220
|
|||||||
; Appears to be unused.
|
; Appears to be unused.
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
ld a, $80
|
ld a, (VBGMap0 tile $28) % $100
|
||||||
ld [hBGMapAddress], a
|
ld [hBGMapAddress], a
|
||||||
ld a, $9a
|
ld a, (VBGMap0 tile $28) / $100
|
||||||
ld [hBGMapAddress + 1], a
|
ld [hBGMapAddress + 1], a
|
||||||
call Function3200
|
call Function3200
|
||||||
ld a, $60
|
ld a, $60
|
||||||
ld [hWY], a
|
ld [hWY], a
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapAddress], a
|
ld [hBGMapAddress], a
|
||||||
ld a, $98
|
ld a, VBGMap0 / $100
|
||||||
ld [hBGMapAddress + 1], a
|
ld [hBGMapAddress + 1], a
|
||||||
call BattleAnimDelayFrame
|
call BattleAnimDelayFrame
|
||||||
ret
|
ret
|
||||||
|
217
battle/core.asm
217
battle/core.asm
@ -149,7 +149,7 @@ WildFled_EnemyFled_LinkBattleCanceled: ; 3c0e5
|
|||||||
call StdBattleTextBox
|
call StdBattleTextBox
|
||||||
|
|
||||||
.asm_3c118
|
.asm_3c118
|
||||||
call Function3ceec
|
call StopDangerSound
|
||||||
call Function3d2e0
|
call Function3d2e0
|
||||||
jr c, .asm_3c126
|
jr c, .asm_3c126
|
||||||
|
|
||||||
@ -264,40 +264,40 @@ Function3c1c0: ; 3c1c0
|
|||||||
Function3c1d6: ; 3c1d6
|
Function3c1d6: ; 3c1d6
|
||||||
ld a, [$ffcb]
|
ld a, [$ffcb]
|
||||||
cp $1
|
cp $1
|
||||||
jr z, .asm_3c1fe
|
jr z, .CheckEnemyFirst
|
||||||
call Function3c23c
|
call CheckFaint_PlayerThenEnemy
|
||||||
ret c
|
ret c
|
||||||
call Function3ca26
|
call Function3ca26
|
||||||
call Function3c23c
|
call CheckFaint_PlayerThenEnemy
|
||||||
ret c
|
ret c
|
||||||
call HandleWeather
|
call HandleWeather
|
||||||
call Function3c23c
|
call CheckFaint_PlayerThenEnemy
|
||||||
ret c
|
ret c
|
||||||
call Function3c874
|
call Function3c874
|
||||||
call Function3c23c
|
call CheckFaint_PlayerThenEnemy
|
||||||
ret c
|
ret c
|
||||||
call Function3c801
|
call Function3c801
|
||||||
call Function3c23c
|
call CheckFaint_PlayerThenEnemy
|
||||||
ret c
|
ret c
|
||||||
jr .asm_3c21e
|
jr .NoMoreFaintingConditions
|
||||||
|
|
||||||
.asm_3c1fe
|
.CheckEnemyFirst
|
||||||
call Function3c25c
|
call CheckFaint_EnemyThenPlayer
|
||||||
ret c
|
ret c
|
||||||
call Function3ca26
|
call Function3ca26
|
||||||
call Function3c25c
|
call CheckFaint_EnemyThenPlayer
|
||||||
ret c
|
ret c
|
||||||
call HandleWeather
|
call HandleWeather
|
||||||
call Function3c25c
|
call CheckFaint_EnemyThenPlayer
|
||||||
ret c
|
ret c
|
||||||
call Function3c874
|
call Function3c874
|
||||||
call Function3c25c
|
call CheckFaint_EnemyThenPlayer
|
||||||
ret c
|
ret c
|
||||||
call Function3c801
|
call Function3c801
|
||||||
call Function3c25c
|
call CheckFaint_EnemyThenPlayer
|
||||||
ret c
|
ret c
|
||||||
|
|
||||||
.asm_3c21e
|
.NoMoreFaintingConditions
|
||||||
call Function3c8eb
|
call Function3c8eb
|
||||||
call Function3c93c
|
call Function3c93c
|
||||||
call HanleDefrost
|
call HanleDefrost
|
||||||
@ -310,52 +310,52 @@ Function3c1d6: ; 3c1d6
|
|||||||
jp Function3c4df
|
jp Function3c4df
|
||||||
; 3c23c
|
; 3c23c
|
||||||
|
|
||||||
Function3c23c: ; 3c23c
|
CheckFaint_PlayerThenEnemy: ; 3c23c
|
||||||
call HasPlayerFainted
|
call HasPlayerFainted
|
||||||
jr nz, .asm_3c24a
|
jr nz, .PlayerNotFainted
|
||||||
call Function3d14e
|
call HandlePlayerMonFaint
|
||||||
ld a, [BattleEnded]
|
ld a, [BattleEnded]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_3c25a
|
jr nz, .BattleIsOver
|
||||||
|
|
||||||
.asm_3c24a
|
.PlayerNotFainted
|
||||||
call HasEnemyFainted
|
call HasEnemyFainted
|
||||||
jr nz, .asm_3c258
|
jr nz, .BattleContinues
|
||||||
call Function3cd55
|
call HandleEnemyMonFaint
|
||||||
ld a, [BattleEnded]
|
ld a, [BattleEnded]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_3c25a
|
jr nz, .BattleIsOver
|
||||||
|
|
||||||
.asm_3c258
|
.BattleContinues
|
||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_3c25a
|
.BattleIsOver
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
; 3c25c
|
; 3c25c
|
||||||
|
|
||||||
Function3c25c: ; 3c25c
|
CheckFaint_EnemyThenPlayer: ; 3c25c
|
||||||
call HasEnemyFainted
|
call HasEnemyFainted
|
||||||
jr nz, .asm_3c26a
|
jr nz, .EnemyNotFainted
|
||||||
call Function3cd55
|
call HandleEnemyMonFaint
|
||||||
ld a, [BattleEnded]
|
ld a, [BattleEnded]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_3c27a
|
jr nz, .BattleIsOver
|
||||||
|
|
||||||
.asm_3c26a
|
.EnemyNotFainted
|
||||||
call HasPlayerFainted
|
call HasPlayerFainted
|
||||||
jr nz, .asm_3c278
|
jr nz, .BattleContinues
|
||||||
call Function3d14e
|
call HandlePlayerMonFaint
|
||||||
ld a, [BattleEnded]
|
ld a, [BattleEnded]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_3c27a
|
jr nz, .BattleIsOver
|
||||||
|
|
||||||
.asm_3c278
|
.BattleContinues
|
||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_3c27a
|
.BattleIsOver
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
; 3c27c
|
; 3c27c
|
||||||
@ -952,14 +952,14 @@ Function3c5fe: ; 3c5fe
|
|||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
call HasPlayerFainted
|
call HasPlayerFainted
|
||||||
jp z, Function3d14e
|
jp z, HandlePlayerMonFaint
|
||||||
call HasEnemyFainted
|
call HasEnemyFainted
|
||||||
jp z, Function3cd55
|
jp z, HandleEnemyMonFaint
|
||||||
|
|
||||||
.asm_3c62f
|
.asm_3c62f
|
||||||
call SetEnemyTurn
|
call SetEnemyTurn
|
||||||
call ResidualDamage
|
call ResidualDamage
|
||||||
jp z, Function3cd55
|
jp z, HandleEnemyMonFaint
|
||||||
call RefreshBattleHuds
|
call RefreshBattleHuds
|
||||||
call Function3c6cf
|
call Function3c6cf
|
||||||
call Function3d2e0
|
call Function3d2e0
|
||||||
@ -968,12 +968,12 @@ Function3c5fe: ; 3c5fe
|
|||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
call HasEnemyFainted
|
call HasEnemyFainted
|
||||||
jp z, Function3cd55
|
jp z, HandleEnemyMonFaint
|
||||||
call HasPlayerFainted
|
call HasPlayerFainted
|
||||||
jp z, Function3d14e
|
jp z, HandlePlayerMonFaint
|
||||||
call SetPlayerTurn
|
call SetPlayerTurn
|
||||||
call ResidualDamage
|
call ResidualDamage
|
||||||
jp z, Function3d14e
|
jp z, HandlePlayerMonFaint
|
||||||
call RefreshBattleHuds
|
call RefreshBattleHuds
|
||||||
xor a
|
xor a
|
||||||
ld [wd0ec], a
|
ld [wd0ec], a
|
||||||
@ -994,14 +994,14 @@ Function3c664: ; 3c664
|
|||||||
call Function3d2e0
|
call Function3d2e0
|
||||||
ret c
|
ret c
|
||||||
call HasEnemyFainted
|
call HasEnemyFainted
|
||||||
jp z, Function3cd55
|
jp z, HandleEnemyMonFaint
|
||||||
call HasPlayerFainted
|
call HasPlayerFainted
|
||||||
jp z, Function3d14e
|
jp z, HandlePlayerMonFaint
|
||||||
push bc
|
push bc
|
||||||
call SetPlayerTurn
|
call SetPlayerTurn
|
||||||
call ResidualDamage
|
call ResidualDamage
|
||||||
pop bc
|
pop bc
|
||||||
jp z, Function3d14e
|
jp z, HandlePlayerMonFaint
|
||||||
push bc
|
push bc
|
||||||
call RefreshBattleHuds
|
call RefreshBattleHuds
|
||||||
pop af
|
pop af
|
||||||
@ -1016,14 +1016,14 @@ Function3c664: ; 3c664
|
|||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
call HasPlayerFainted
|
call HasPlayerFainted
|
||||||
jp z, Function3d14e
|
jp z, HandlePlayerMonFaint
|
||||||
call HasEnemyFainted
|
call HasEnemyFainted
|
||||||
jp z, Function3cd55
|
jp z, HandleEnemyMonFaint
|
||||||
|
|
||||||
.asm_3c6be
|
.asm_3c6be
|
||||||
call SetEnemyTurn
|
call SetEnemyTurn
|
||||||
call ResidualDamage
|
call ResidualDamage
|
||||||
jp z, Function3cd55
|
jp z, HandleEnemyMonFaint
|
||||||
call RefreshBattleHuds
|
call RefreshBattleHuds
|
||||||
xor a
|
xor a
|
||||||
ld [wd0ec], a
|
ld [wd0ec], a
|
||||||
@ -2095,12 +2095,12 @@ Function3cd3c: ; 3cd3c
|
|||||||
ret
|
ret
|
||||||
; 3cd55
|
; 3cd55
|
||||||
|
|
||||||
Function3cd55: ; 3cd55
|
HandleEnemyMonFaint: ; 3cd55
|
||||||
call Function3cf14
|
call FaintEnemyPokemon
|
||||||
ld hl, BattleMonHP
|
ld hl, BattleMonHP
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
or [hl]
|
or [hl]
|
||||||
call z, Function3cef1
|
call z, FaintYourPokemon
|
||||||
xor a
|
xor a
|
||||||
ld [wc6f7], a
|
ld [wc6f7], a
|
||||||
call Function3ce01
|
call Function3ce01
|
||||||
@ -2121,15 +2121,15 @@ Function3cd55: ; 3cd55
|
|||||||
|
|
||||||
ld a, [wBattleMode]
|
ld a, [wBattleMode]
|
||||||
dec a
|
dec a
|
||||||
jr nz, .asm_3cd8c
|
jr nz, .trainer
|
||||||
|
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [BattleEnded], a
|
ld [BattleEnded], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_3cd8c
|
.trainer
|
||||||
call Function3cf35
|
call CheckEnemyTrainerDefeated
|
||||||
jp z, Function3cfa4
|
jp z, WinTrainerBattle
|
||||||
|
|
||||||
ld hl, BattleMonHP
|
ld hl, BattleMonHP
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
@ -2221,7 +2221,7 @@ Function3ce01: ; 3ce01
|
|||||||
jr .asm_3ce37
|
jr .asm_3ce37
|
||||||
|
|
||||||
.asm_3ce2f
|
.asm_3ce2f
|
||||||
call Function3ceec
|
call StopDangerSound
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wc6fd], a
|
ld [wc6fd], a
|
||||||
|
|
||||||
@ -2342,20 +2342,20 @@ Function3ceaa: ; 3ceaa
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Function3ceec: ; 3ceec
|
StopDangerSound: ; 3ceec
|
||||||
xor a
|
xor a
|
||||||
ld [Danger], a
|
ld [Danger], a
|
||||||
ret
|
ret
|
||||||
; 3cef1
|
; 3cef1
|
||||||
|
|
||||||
Function3cef1: ; 3cef1
|
FaintYourPokemon: ; 3cef1
|
||||||
call Function3ceec
|
call StopDangerSound
|
||||||
call WaitSFX
|
call WaitSFX
|
||||||
ld a, $f0
|
ld a, $f0
|
||||||
ld [CryTracks], a
|
ld [CryTracks], a
|
||||||
ld a, [BattleMonSpecies]
|
ld a, [BattleMonSpecies]
|
||||||
call PlayStereoCry
|
call PlayStereoCry
|
||||||
call Function3d43b
|
call PlayerMonFaintedAnimation
|
||||||
hlcoord 9, 7
|
hlcoord 9, 7
|
||||||
lb bc, 5, 11
|
lb bc, 5, 11
|
||||||
call ClearBox
|
call ClearBox
|
||||||
@ -2363,11 +2363,11 @@ Function3cef1: ; 3cef1
|
|||||||
jp StdBattleTextBox
|
jp StdBattleTextBox
|
||||||
; 3cf14
|
; 3cf14
|
||||||
|
|
||||||
Function3cf14: ; 3cf14
|
FaintEnemyPokemon: ; 3cf14
|
||||||
call WaitSFX
|
call WaitSFX
|
||||||
ld de, SFX_KINESIS
|
ld de, SFX_KINESIS
|
||||||
call PlaySFX
|
call PlaySFX
|
||||||
call Function3d432
|
call EnemyMonFaintedAnimation
|
||||||
ld de, SFX_FAINT
|
ld de, SFX_FAINT
|
||||||
call PlaySFX
|
call PlaySFX
|
||||||
hlcoord 1, 0
|
hlcoord 1, 0
|
||||||
@ -2377,20 +2377,22 @@ Function3cf14: ; 3cf14
|
|||||||
jp StdBattleTextBox
|
jp StdBattleTextBox
|
||||||
; 3cf35
|
; 3cf35
|
||||||
|
|
||||||
Function3cf35: ; 3cf35
|
CheckEnemyTrainerDefeated: ; 3cf35
|
||||||
ld a, [OTPartyCount]
|
ld a, [OTPartyCount]
|
||||||
ld b, a
|
ld b, a
|
||||||
xor a
|
xor a
|
||||||
ld hl, OTPartyMon1HP
|
ld hl, OTPartyMon1HP
|
||||||
ld de, PartyMon2 - PartyMon1
|
ld de, PartyMon2 - PartyMon1
|
||||||
.asm_3cf40
|
|
||||||
|
.loop
|
||||||
or [hl]
|
or [hl]
|
||||||
inc hl
|
inc hl
|
||||||
or [hl]
|
or [hl]
|
||||||
dec hl
|
dec hl
|
||||||
add hl, de
|
add hl, de
|
||||||
dec b
|
dec b
|
||||||
jr nz, .asm_3cf40
|
jr nz, .loop
|
||||||
|
|
||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
; 3cf4a
|
; 3cf4a
|
||||||
@ -2447,8 +2449,8 @@ EnemyPartyMonEntrance: ; 3cf78
|
|||||||
ret
|
ret
|
||||||
; 3cfa4
|
; 3cfa4
|
||||||
|
|
||||||
Function3cfa4: ; 3cfa4
|
WinTrainerBattle: ; 3cfa4
|
||||||
call Function3ceec
|
call StopDangerSound
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wc6fd], a
|
ld [wc6fd], a
|
||||||
ld [BattleEnded], a
|
ld [BattleEnded], a
|
||||||
@ -2750,12 +2752,12 @@ KantoGymLeaders:
|
|||||||
db -1
|
db -1
|
||||||
|
|
||||||
|
|
||||||
Function3d14e: ; 3d14e
|
HandlePlayerMonFaint: ; 3d14e
|
||||||
call Function3cef1
|
call FaintYourPokemon
|
||||||
ld hl, EnemyMonHP
|
ld hl, EnemyMonHP
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
or [hl]
|
or [hl]
|
||||||
call z, Function3cf14
|
call z, FaintEnemyPokemon
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wc6f7], a
|
ld [wc6f7], a
|
||||||
call Function3d1aa
|
call Function3d1aa
|
||||||
@ -2766,20 +2768,20 @@ Function3d14e: ; 3d14e
|
|||||||
ld hl, EnemyMonHP
|
ld hl, EnemyMonHP
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
or [hl]
|
or [hl]
|
||||||
jr nz, .asm_3d185
|
jr nz, .notfainted
|
||||||
call Function3ce01
|
call Function3ce01
|
||||||
ld a, [wBattleMode]
|
ld a, [wBattleMode]
|
||||||
dec a
|
dec a
|
||||||
jr nz, .asm_3d17f
|
jr nz, .trainer
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [BattleEnded], a
|
ld [BattleEnded], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_3d17f
|
.trainer
|
||||||
call Function3cf35
|
call CheckEnemyTrainerDefeated
|
||||||
jp z, Function3cfa4
|
jp z, WinTrainerBattle
|
||||||
|
|
||||||
.asm_3d185
|
.notfainted
|
||||||
call Function3d1f8
|
call Function3d1f8
|
||||||
jr nc, .asm_3d190
|
jr nc, .asm_3d190
|
||||||
ld a, $1
|
ld a, $1
|
||||||
@ -3086,7 +3088,7 @@ LostBattle: ; 3d38e
|
|||||||
|
|
||||||
; Remove the enemy from the screen.
|
; Remove the enemy from the screen.
|
||||||
hlcoord 0, 0
|
hlcoord 0, 0
|
||||||
ld bc, $0815
|
lb bc, 8, 21
|
||||||
call ClearBox
|
call ClearBox
|
||||||
call Function3ebd8
|
call Function3ebd8
|
||||||
|
|
||||||
@ -3103,7 +3105,7 @@ LostBattle: ; 3d38e
|
|||||||
.asm_3d3bd
|
.asm_3d3bd
|
||||||
; Remove the enemy from the screen.
|
; Remove the enemy from the screen.
|
||||||
hlcoord 0, 0
|
hlcoord 0, 0
|
||||||
ld bc, $0815
|
lb bc, 8, 21
|
||||||
call ClearBox
|
call ClearBox
|
||||||
call Function3ebd8
|
call Function3ebd8
|
||||||
|
|
||||||
@ -3131,7 +3133,7 @@ LostBattle: ; 3d38e
|
|||||||
|
|
||||||
.LostLinkBattle
|
.LostLinkBattle
|
||||||
call UpdateEnemyMonInParty
|
call UpdateEnemyMonInParty
|
||||||
call Function3cf35
|
call CheckEnemyTrainerDefeated
|
||||||
jr nz, .asm_3d40a
|
jr nz, .asm_3d40a
|
||||||
ld hl, TiedAgainstText
|
ld hl, TiedAgainstText
|
||||||
ld a, [wd0ee]
|
ld a, [wd0ee]
|
||||||
@ -3155,7 +3157,7 @@ LostBattle: ; 3d38e
|
|||||||
.asm_3d417
|
.asm_3d417
|
||||||
; Remove the enemy from the screen.
|
; Remove the enemy from the screen.
|
||||||
hlcoord 0, 0
|
hlcoord 0, 0
|
||||||
ld bc, $0815
|
lb bc, 8, 21
|
||||||
call ClearBox
|
call ClearBox
|
||||||
call Function3ebd8
|
call Function3ebd8
|
||||||
|
|
||||||
@ -3169,38 +3171,40 @@ LostBattle: ; 3d38e
|
|||||||
; 3d432
|
; 3d432
|
||||||
|
|
||||||
|
|
||||||
Function3d432: ; 3d432
|
EnemyMonFaintedAnimation: ; 3d432
|
||||||
hlcoord 12, 5
|
hlcoord 12, 5
|
||||||
decoord 12, 6
|
decoord 12, 6
|
||||||
jp Function3d444
|
jp MonFaintedAnimation
|
||||||
; 3d43b
|
; 3d43b
|
||||||
|
|
||||||
Function3d43b: ; 3d43b
|
PlayerMonFaintedAnimation: ; 3d43b
|
||||||
hlcoord 1, 10
|
hlcoord 1, 10
|
||||||
decoord 1, 11
|
decoord 1, 11
|
||||||
jp Function3d444
|
jp MonFaintedAnimation
|
||||||
; 3d444
|
; 3d444
|
||||||
|
|
||||||
Function3d444: ; 3d444
|
MonFaintedAnimation: ; 3d444
|
||||||
ld a, [wcfbe]
|
ld a, [wcfbe]
|
||||||
push af
|
push af
|
||||||
set 6, a
|
set 6, a
|
||||||
ld [wcfbe], a
|
ld [wcfbe], a
|
||||||
ld b, $7
|
ld b, 7
|
||||||
.asm_3d44f
|
|
||||||
|
.OuterLoop
|
||||||
push bc
|
push bc
|
||||||
push de
|
push de
|
||||||
push hl
|
push hl
|
||||||
ld b, $6
|
ld b, 6
|
||||||
.asm_3d454
|
|
||||||
|
.InnerLoop
|
||||||
push bc
|
push bc
|
||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
ld bc, $0007
|
ld bc, 7
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
pop de
|
pop de
|
||||||
pop hl
|
pop hl
|
||||||
ld bc, -20
|
ld bc, -SCREEN_WIDTH
|
||||||
add hl, bc
|
add hl, bc
|
||||||
push hl
|
push hl
|
||||||
ld h, d
|
ld h, d
|
||||||
@ -3211,7 +3215,8 @@ Function3d444: ; 3d444
|
|||||||
pop hl
|
pop hl
|
||||||
pop bc
|
pop bc
|
||||||
dec b
|
dec b
|
||||||
jr nz, .asm_3d454
|
jr nz, .InnerLoop
|
||||||
|
|
||||||
ld bc, 20
|
ld bc, 20
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld de, .Spaces
|
ld de, .Spaces
|
||||||
@ -3222,7 +3227,8 @@ Function3d444: ; 3d444
|
|||||||
pop de
|
pop de
|
||||||
pop bc
|
pop bc
|
||||||
dec b
|
dec b
|
||||||
jr nz, .asm_3d44f
|
jr nz, .OuterLoop
|
||||||
|
|
||||||
pop af
|
pop af
|
||||||
ld [wcfbe], a
|
ld [wcfbe], a
|
||||||
ret
|
ret
|
||||||
@ -4007,7 +4013,7 @@ Function3d8b3: ; 3d8b3
|
|||||||
and $c0
|
and $c0
|
||||||
add b
|
add b
|
||||||
ld [wd0ee], a
|
ld [wd0ee], a
|
||||||
call Function3ceec
|
call StopDangerSound
|
||||||
push de
|
push de
|
||||||
ld de, SFX_RUN
|
ld de, SFX_RUN
|
||||||
call WaitPlaySFX
|
call WaitPlaySFX
|
||||||
@ -4021,7 +4027,7 @@ Function3d8b3: ; 3d8b3
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_3d9f5
|
.asm_3d9f5
|
||||||
call Function3ceec
|
call StopDangerSound
|
||||||
ld hl, wcd2a
|
ld hl, wcd2a
|
||||||
bit 4, [hl]
|
bit 4, [hl]
|
||||||
jr nz, .asm_3da05
|
jr nz, .asm_3da05
|
||||||
@ -4387,7 +4393,7 @@ Function3dc5b: ; 3dc5b
|
|||||||
ld hl, wc664
|
ld hl, wc664
|
||||||
ld b, $0
|
ld b, $0
|
||||||
predef FlagPredef
|
predef FlagPredef
|
||||||
call Function3d43b
|
call PlayerMonFaintedAnimation
|
||||||
ld hl, BattleText_PkmnFainted
|
ld hl, BattleText_PkmnFainted
|
||||||
jr .asm_3dcdf
|
jr .asm_3dcdf
|
||||||
|
|
||||||
@ -4403,7 +4409,7 @@ Function3dc5b: ; 3dc5b
|
|||||||
ld de, SFX_FAINT
|
ld de, SFX_FAINT
|
||||||
call PlaySFX
|
call PlaySFX
|
||||||
call WaitSFX
|
call WaitSFX
|
||||||
call Function3d432
|
call EnemyMonFaintedAnimation
|
||||||
ld hl, BattleText_EnemyPkmnFainted
|
ld hl, BattleText_EnemyPkmnFainted
|
||||||
|
|
||||||
.asm_3dcdf
|
.asm_3dcdf
|
||||||
@ -6837,7 +6843,8 @@ Function3ebd8: ; 3ebd8
|
|||||||
callab GetTrainerPic
|
callab GetTrainerPic
|
||||||
hlcoord 19, 0
|
hlcoord 19, 0
|
||||||
ld c, $0
|
ld c, $0
|
||||||
.asm_3ebf3
|
|
||||||
|
.outer_loop
|
||||||
inc c
|
inc c
|
||||||
ld a, c
|
ld a, c
|
||||||
cp $7
|
cp $7
|
||||||
@ -6848,14 +6855,16 @@ Function3ebd8: ; 3ebd8
|
|||||||
ld d, $0
|
ld d, $0
|
||||||
push bc
|
push bc
|
||||||
push hl
|
push hl
|
||||||
.asm_3ec01
|
|
||||||
|
.inner_loop
|
||||||
call Function3ec1a
|
call Function3ec1a
|
||||||
inc hl
|
inc hl
|
||||||
ld a, $7
|
ld a, $7
|
||||||
add d
|
add d
|
||||||
ld d, a
|
ld d, a
|
||||||
dec c
|
dec c
|
||||||
jr nz, .asm_3ec01
|
jr nz, .inner_loop
|
||||||
|
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
ld c, $4
|
ld c, $4
|
||||||
@ -6863,7 +6872,7 @@ Function3ebd8: ; 3ebd8
|
|||||||
pop hl
|
pop hl
|
||||||
pop bc
|
pop bc
|
||||||
dec hl
|
dec hl
|
||||||
jr .asm_3ebf3
|
jr .outer_loop
|
||||||
; 3ec1a
|
; 3ec1a
|
||||||
|
|
||||||
Function3ec1a: ; 3ec1a
|
Function3ec1a: ; 3ec1a
|
||||||
@ -6871,13 +6880,15 @@ Function3ec1a: ; 3ec1a
|
|||||||
push de
|
push de
|
||||||
push bc
|
push bc
|
||||||
ld e, $7
|
ld e, $7
|
||||||
.asm_3ec1f
|
|
||||||
|
.loop
|
||||||
ld [hl], d
|
ld [hl], d
|
||||||
ld bc, $0014
|
ld bc, SCREEN_WIDTH
|
||||||
add hl, bc
|
add hl, bc
|
||||||
inc d
|
inc d
|
||||||
dec e
|
dec e
|
||||||
jr nz, .asm_3ec1f
|
jr nz, .loop
|
||||||
|
|
||||||
pop bc
|
pop bc
|
||||||
pop de
|
pop de
|
||||||
pop hl
|
pop hl
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
; trainer groups
|
; trainer groups
|
||||||
enum_start 1
|
enum_start
|
||||||
|
trainerclass PHONE ; 0
|
||||||
|
|
||||||
trainerclass FALKNER ; 1
|
trainerclass FALKNER ; 1
|
||||||
|
|
||||||
trainerclass WHITNEY ; 2
|
trainerclass WHITNEY ; 2
|
||||||
|
@ -13,7 +13,7 @@ Predef_StartBattle: ; 8c20f
|
|||||||
ld [hl], $1
|
ld [hl], $1
|
||||||
|
|
||||||
.loop
|
.loop
|
||||||
ld a, [wcf63]
|
ld a, [wJumptableEntryIndexBuffer]
|
||||||
bit 7, a
|
bit 7, a
|
||||||
jr nz, .done
|
jr nz, .done
|
||||||
call FlashyTransitionToBattle
|
call FlashyTransitionToBattle
|
||||||
@ -72,7 +72,7 @@ Function8c26d: ; 8c26d
|
|||||||
call DelayFrame
|
call DelayFrame
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
ld hl, wcf63
|
ld hl, wJumptableEntryIndexBuffer
|
||||||
xor a
|
xor a
|
||||||
rept 2
|
rept 2
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
@ -146,7 +146,7 @@ INCBIN "gfx/overworld/trainer_battle_pokeball_tiles.2bpp"
|
|||||||
|
|
||||||
|
|
||||||
FlashyTransitionToBattle: ; 8c314
|
FlashyTransitionToBattle: ; 8c314
|
||||||
ld a, [wcf63]
|
ld a, [wJumptableEntryIndexBuffer]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld d, 0
|
ld d, 0
|
||||||
ld hl, .jumptable
|
ld hl, .jumptable
|
||||||
@ -230,7 +230,7 @@ StartTrainerBattle_DetermineWhichAnimation: ; 8c365 (23:4365)
|
|||||||
ld hl, .StartingPoints
|
ld hl, .StartingPoints
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ret
|
ret
|
||||||
; 8c38f (23:438f)
|
; 8c38f (23:438f)
|
||||||
|
|
||||||
@ -242,11 +242,11 @@ StartTrainerBattle_DetermineWhichAnimation: ; 8c365 (23:4365)
|
|||||||
StartTrainerBattle_Finish: ; 8c393 (23:4393)
|
StartTrainerBattle_Finish: ; 8c393 (23:4393)
|
||||||
call ClearSprites
|
call ClearSprites
|
||||||
ld a, $80
|
ld a, $80
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
StartTrainerBattle_NextScene: ; 8c39c (23:439c)
|
StartTrainerBattle_NextScene: ; 8c39c (23:439c)
|
||||||
ld hl, wcf63
|
ld hl, wJumptableEntryIndexBuffer
|
||||||
inc [hl]
|
inc [hl]
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -331,7 +331,7 @@ StartTrainerBattle_SineWave: ; 8c408 (23:4408)
|
|||||||
|
|
||||||
.end
|
.end
|
||||||
ld a, $20
|
ld a, $20
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.DoSineWave: ; 8c419 (23:4419)
|
.DoSineWave: ; 8c419 (23:4419)
|
||||||
@ -416,7 +416,7 @@ endr
|
|||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a ; $ff00+$d4
|
||||||
ld a, $20
|
ld a, $20
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ret
|
ret
|
||||||
; 8c490 (23:4490)
|
; 8c490 (23:4490)
|
||||||
|
|
||||||
@ -540,7 +540,7 @@ StartTrainerBattle_SpeckleToBlack: ; 8c58f (23:458f)
|
|||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a ; $ff00+$d4
|
||||||
ld a, $20
|
ld a, $20
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.BlackOutRandomTile: ; 8c5b8 (23:45b8)
|
.BlackOutRandomTile: ; 8c5b8 (23:45b8)
|
||||||
@ -836,7 +836,7 @@ StartTrainerBattle_ZoomToBlack: ; 8c768 (23:4768)
|
|||||||
|
|
||||||
.done
|
.done
|
||||||
ld a, $20
|
ld a, $20
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ret
|
ret
|
||||||
; 8c792 (23:4792)
|
; 8c792 (23:4792)
|
||||||
|
|
||||||
|
@ -124,7 +124,7 @@ Function109847:: ; 109847
|
|||||||
jr z, .asm_10984f
|
jr z, .asm_10984f
|
||||||
ld a, $40
|
ld a, $40
|
||||||
.asm_10984f
|
.asm_10984f
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
|
|
||||||
ld a, [rSVBK]
|
ld a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
@ -225,7 +225,7 @@ Function1098fd: ; 1098fd
|
|||||||
ld a, [hJoypadDown]
|
ld a, [hJoypadDown]
|
||||||
and $1
|
and $1
|
||||||
ret z
|
ret z
|
||||||
ld a, [wcf63]
|
ld a, [wJumptableEntryIndexBuffer]
|
||||||
bit 7, a
|
bit 7, a
|
||||||
ret
|
ret
|
||||||
; 109908
|
; 109908
|
||||||
@ -234,7 +234,7 @@ Function109908: ; 109908
|
|||||||
ld a, [hJoypadDown]
|
ld a, [hJoypadDown]
|
||||||
and $2
|
and $2
|
||||||
ret z
|
ret z
|
||||||
ld a, [wcf63]
|
ld a, [wJumptableEntryIndexBuffer]
|
||||||
bit 6, a
|
bit 6, a
|
||||||
ret z
|
ret z
|
||||||
ld hl, CreditsPos
|
ld hl, CreditsPos
|
||||||
@ -255,7 +255,7 @@ Function109908: ; 109908
|
|||||||
; 109926
|
; 109926
|
||||||
|
|
||||||
Function109926: ; 109926
|
Function109926: ; 109926
|
||||||
ld a, [wcf63]
|
ld a, [wJumptableEntryIndexBuffer]
|
||||||
and $f
|
and $f
|
||||||
ld e, a
|
ld e, a
|
||||||
ld d, 0
|
ld d, 0
|
||||||
@ -287,12 +287,12 @@ Jumptable_109937: ; 109937 (42:5937)
|
|||||||
|
|
||||||
|
|
||||||
Function109951: ; 109951 (42:5951)
|
Function109951: ; 109951 (42:5951)
|
||||||
ld hl, wcf63
|
ld hl, wJumptableEntryIndexBuffer
|
||||||
inc [hl]
|
inc [hl]
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function109956: ; 109956 (42:5956)
|
Function109956: ; 109956 (42:5956)
|
||||||
ld hl, wcf63
|
ld hl, wJumptableEntryIndexBuffer
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and $f0
|
and $f0
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
@ -348,7 +348,7 @@ Function1099a3: ; 1099a3 (42:59a3)
|
|||||||
|
|
||||||
|
|
||||||
ParseCredits: ; 1099aa
|
ParseCredits: ; 1099aa
|
||||||
ld hl, wcf63
|
ld hl, wJumptableEntryIndexBuffer
|
||||||
bit 7, [hl]
|
bit 7, [hl]
|
||||||
jp nz, .done
|
jp nz, .done
|
||||||
|
|
||||||
@ -488,7 +488,7 @@ endr
|
|||||||
|
|
||||||
.end
|
.end
|
||||||
; Stop execution.
|
; Stop execution.
|
||||||
ld hl, wcf63
|
ld hl, wJumptableEntryIndexBuffer
|
||||||
set 7, [hl]
|
set 7, [hl]
|
||||||
ld a, $20
|
ld a, $20
|
||||||
ld [MusicFade], a
|
ld [MusicFade], a
|
||||||
|
@ -5,7 +5,7 @@ Pack: ; 10000
|
|||||||
call Function1068a
|
call Function1068a
|
||||||
.loop
|
.loop
|
||||||
call JoyTextDelay
|
call JoyTextDelay
|
||||||
ld a, [wcf63]
|
ld a, [wJumptableEntryIndexBuffer]
|
||||||
bit 7, a
|
bit 7, a
|
||||||
jr nz, .done
|
jr nz, .done
|
||||||
call Function10026
|
call Function10026
|
||||||
@ -21,7 +21,7 @@ Pack: ; 10000
|
|||||||
; 10026
|
; 10026
|
||||||
|
|
||||||
Function10026: ; 10026
|
Function10026: ; 10026
|
||||||
ld a, [wcf63]
|
ld a, [wJumptableEntryIndexBuffer]
|
||||||
ld hl, Jumptable_10030
|
ld hl, Jumptable_10030
|
||||||
call Function1086b
|
call Function1086b
|
||||||
jp [hl]
|
jp [hl]
|
||||||
@ -47,7 +47,7 @@ Function10046: ; 10046 (4:4046)
|
|||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a ; $ff00+$d4
|
||||||
call Function10955
|
call Function10955
|
||||||
ld a, [wcf64]
|
ld a, [wcf64]
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
call Function10a40
|
call Function10a40
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -486,7 +486,7 @@ Function10355: ; 10355 (4:4355)
|
|||||||
and a
|
and a
|
||||||
jr z, Function1032d
|
jr z, Function1032d
|
||||||
ld a, $a
|
ld a, $a
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ret
|
ret
|
||||||
; 10364 (4:4364)
|
; 10364 (4:4364)
|
||||||
|
|
||||||
@ -605,7 +605,7 @@ Function103fd: ; 103fd
|
|||||||
call PrintText
|
call PrintText
|
||||||
jr .asm_10427
|
jr .asm_10427
|
||||||
.asm_10453
|
.asm_10453
|
||||||
ld a, [wcf63]
|
ld a, [wJumptableEntryIndexBuffer]
|
||||||
push af
|
push af
|
||||||
ld a, [wcf64]
|
ld a, [wcf64]
|
||||||
push af
|
push af
|
||||||
@ -618,7 +618,7 @@ Function103fd: ; 103fd
|
|||||||
pop af
|
pop af
|
||||||
ld [wcf64], a
|
ld [wcf64], a
|
||||||
pop af
|
pop af
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
.asm_10475
|
.asm_10475
|
||||||
pop af
|
pop af
|
||||||
ld [Options], a
|
ld [Options], a
|
||||||
@ -652,7 +652,7 @@ BattlePack: ; 10493
|
|||||||
call Function1068a
|
call Function1068a
|
||||||
.asm_1049b
|
.asm_1049b
|
||||||
call JoyTextDelay
|
call JoyTextDelay
|
||||||
ld a, [wcf63]
|
ld a, [wJumptableEntryIndexBuffer]
|
||||||
bit 7, a
|
bit 7, a
|
||||||
jr nz, .asm_104ad
|
jr nz, .asm_104ad
|
||||||
call Function104b9
|
call Function104b9
|
||||||
@ -668,7 +668,7 @@ BattlePack: ; 10493
|
|||||||
; 104b9
|
; 104b9
|
||||||
|
|
||||||
Function104b9: ; 104b9
|
Function104b9: ; 104b9
|
||||||
ld a, [wcf63]
|
ld a, [wJumptableEntryIndexBuffer]
|
||||||
ld hl, Jumptable_104c3
|
ld hl, Jumptable_104c3
|
||||||
call Function1086b
|
call Function1086b
|
||||||
jp [hl]
|
jp [hl]
|
||||||
@ -694,7 +694,7 @@ Function104d9: ; 104d9 (4:44d9)
|
|||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a ; $ff00+$d4
|
||||||
call Function10955
|
call Function10955
|
||||||
ld a, [wcf64]
|
ld a, [wcf64]
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
call Function10a40
|
call Function10a40
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -922,7 +922,7 @@ Function10671: ; 10671 (4:4671)
|
|||||||
jr z, asm_10684
|
jr z, asm_10684
|
||||||
asm_1067e: ; 1067e (4:467e)
|
asm_1067e: ; 1067e (4:467e)
|
||||||
ld a, $a
|
ld a, $a
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ret
|
ret
|
||||||
asm_10684: ; 10684 (4:4684)
|
asm_10684: ; 10684 (4:4684)
|
||||||
xor a
|
xor a
|
||||||
@ -937,7 +937,7 @@ Function10689: ; 10689
|
|||||||
|
|
||||||
Function1068a: ; 1068a
|
Function1068a: ; 1068a
|
||||||
xor a
|
xor a
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ld a, [wd0d6]
|
ld a, [wd0d6]
|
||||||
and $3
|
and $3
|
||||||
ld [wcf65], a
|
ld [wcf65], a
|
||||||
@ -955,7 +955,7 @@ Function1068a: ; 1068a
|
|||||||
Function106a5: ; 106a5
|
Function106a5: ; 106a5
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ld [wcf64], a
|
ld [wcf64], a
|
||||||
ld [wcf65], a
|
ld [wcf65], a
|
||||||
ld [wcf66], a
|
ld [wcf66], a
|
||||||
@ -974,7 +974,7 @@ Function106be: ; 106be
|
|||||||
; 106c7
|
; 106c7
|
||||||
|
|
||||||
Function106c7: ; 106c7
|
Function106c7: ; 106c7
|
||||||
ld a, [wcf63]
|
ld a, [wJumptableEntryIndexBuffer]
|
||||||
ld hl, Jumptable_106d1
|
ld hl, Jumptable_106d1
|
||||||
call Function1086b
|
call Function1086b
|
||||||
jp [hl]
|
jp [hl]
|
||||||
@ -1083,10 +1083,10 @@ Function1076f: ; 1076f
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_10795
|
.asm_10795
|
||||||
ld a, [wcf63]
|
ld a, [wJumptableEntryIndexBuffer]
|
||||||
dec a
|
dec a
|
||||||
and $3
|
and $3
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
push de
|
push de
|
||||||
ld de, SFX_UNKNOWN_62
|
ld de, SFX_UNKNOWN_62
|
||||||
call PlaySFX
|
call PlaySFX
|
||||||
@ -1095,10 +1095,10 @@ Function1076f: ; 1076f
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_107a8
|
.asm_107a8
|
||||||
ld a, [wcf63]
|
ld a, [wJumptableEntryIndexBuffer]
|
||||||
inc a
|
inc a
|
||||||
and $3
|
and $3
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
push de
|
push de
|
||||||
ld de, SFX_UNKNOWN_62
|
ld de, SFX_UNKNOWN_62
|
||||||
call PlaySFX
|
call PlaySFX
|
||||||
@ -1124,7 +1124,7 @@ Function107bb: ; 107bb
|
|||||||
; 107d7
|
; 107d7
|
||||||
|
|
||||||
Function107d7: ; 107d7
|
Function107d7: ; 107d7
|
||||||
ld a, [wcf63]
|
ld a, [wJumptableEntryIndexBuffer]
|
||||||
ld hl, Jumptable_107e1
|
ld hl, Jumptable_107e1
|
||||||
call Function1086b
|
call Function1086b
|
||||||
jp [hl]
|
jp [hl]
|
||||||
@ -1228,7 +1228,7 @@ Function1085a: ; 1085a (4:485a)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
Function10866: ; 10866 (4:4866)
|
Function10866: ; 10866 (4:4866)
|
||||||
ld hl, wcf63
|
ld hl, wJumptableEntryIndexBuffer
|
||||||
inc [hl]
|
inc [hl]
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -1245,14 +1245,14 @@ endr
|
|||||||
; 10874
|
; 10874
|
||||||
|
|
||||||
Function10874: ; 10874 (4:4874)
|
Function10874: ; 10874 (4:4874)
|
||||||
ld hl, wcf63
|
ld hl, wJumptableEntryIndexBuffer
|
||||||
set 7, [hl]
|
set 7, [hl]
|
||||||
xor a
|
xor a
|
||||||
ld [wcf66], a
|
ld [wcf66], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function1087e: ; 1087e (4:487e)
|
Function1087e: ; 1087e (4:487e)
|
||||||
ld hl, wcf63
|
ld hl, wJumptableEntryIndexBuffer
|
||||||
set 7, [hl]
|
set 7, [hl]
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wcf66], a
|
ld [wcf66], a
|
||||||
@ -1336,12 +1336,12 @@ Function108d4: ; 108d4 (4:48d4)
|
|||||||
ret
|
ret
|
||||||
.asm_108fa
|
.asm_108fa
|
||||||
ld a, $9
|
ld a, $9
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
.asm_10901
|
.asm_10901
|
||||||
ld a, b
|
ld a, b
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ld [wcf64], a
|
ld [wcf64], a
|
||||||
push de
|
push de
|
||||||
ld de, SFX_UNKNOWN_62
|
ld de, SFX_UNKNOWN_62
|
||||||
@ -1351,7 +1351,7 @@ Function108d4: ; 108d4 (4:48d4)
|
|||||||
ret
|
ret
|
||||||
.asm_10912
|
.asm_10912
|
||||||
ld a, c
|
ld a, c
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ld [wcf64], a
|
ld [wcf64], a
|
||||||
push de
|
push de
|
||||||
ld de, SFX_UNKNOWN_62
|
ld de, SFX_UNKNOWN_62
|
||||||
|
@ -28,7 +28,7 @@ Pokedex: ; 40000
|
|||||||
|
|
||||||
.main
|
.main
|
||||||
call JoyTextDelay
|
call JoyTextDelay
|
||||||
ld a, [wcf63]
|
ld a, [wJumptableEntryIndexBuffer]
|
||||||
bit 7, a
|
bit 7, a
|
||||||
jr nz, .exit
|
jr nz, .exit
|
||||||
call Function4010b
|
call Function4010b
|
||||||
@ -75,7 +75,7 @@ ENDC
|
|||||||
call ByteFill
|
call ByteFill
|
||||||
|
|
||||||
xor a
|
xor a
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ld [wcf64], a
|
ld [wcf64], a
|
||||||
ld [wcf65], a
|
ld [wcf65], a
|
||||||
ld [wcf66], a
|
ld [wcf66], a
|
||||||
@ -173,7 +173,7 @@ Function400ed: ; 400ed
|
|||||||
; 4010b
|
; 4010b
|
||||||
|
|
||||||
Function4010b: ; 4010b
|
Function4010b: ; 4010b
|
||||||
ld a, [wcf63]
|
ld a, [wJumptableEntryIndexBuffer]
|
||||||
ld hl, Jumptable_40115
|
ld hl, Jumptable_40115
|
||||||
call Function41432
|
call Function41432
|
||||||
jp [hl]
|
jp [hl]
|
||||||
@ -198,12 +198,12 @@ Jumptable_40115: ; 40115 (10:4115)
|
|||||||
|
|
||||||
|
|
||||||
Function40131: ; 40131 (10:4131)
|
Function40131: ; 40131 (10:4131)
|
||||||
ld hl, wcf63
|
ld hl, wJumptableEntryIndexBuffer
|
||||||
inc [hl]
|
inc [hl]
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function40136: ; 40136 (10:4136)
|
Function40136: ; 40136 (10:4136)
|
||||||
ld hl, wcf63
|
ld hl, wJumptableEntryIndexBuffer
|
||||||
set 7, [hl]
|
set 7, [hl]
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -283,7 +283,7 @@ Function401ae: ; 401ae (10:41ae)
|
|||||||
call Function40bd0
|
call Function40bd0
|
||||||
ret z
|
ret z
|
||||||
ld a, $2
|
ld a, $2
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ld a, $0
|
ld a, $0
|
||||||
ld [wcf64], a
|
ld [wcf64], a
|
||||||
ret
|
ret
|
||||||
@ -291,7 +291,7 @@ Function401ae: ; 401ae (10:41ae)
|
|||||||
.select
|
.select
|
||||||
call Function41401
|
call Function41401
|
||||||
ld a, $7
|
ld a, $7
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
xor a
|
xor a
|
||||||
ld [hSCX], a ; $ff00+$cf
|
ld [hSCX], a ; $ff00+$cf
|
||||||
ld a, $a7
|
ld a, $a7
|
||||||
@ -302,7 +302,7 @@ Function401ae: ; 401ae (10:41ae)
|
|||||||
.start
|
.start
|
||||||
call Function41401
|
call Function41401
|
||||||
ld a, $5
|
ld a, $5
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
xor a
|
xor a
|
||||||
ld [hSCX], a ; $ff00+$cf
|
ld [hSCX], a ; $ff00+$cf
|
||||||
ld a, $a7
|
ld a, $a7
|
||||||
@ -312,7 +312,7 @@ Function401ae: ; 401ae (10:41ae)
|
|||||||
|
|
||||||
.b
|
.b
|
||||||
ld a, $d
|
ld a, $d
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function40217: ; 40217 (10:4217)
|
Function40217: ; 40217 (10:4217)
|
||||||
@ -372,7 +372,7 @@ Function40258: ; 40258 (10:4258)
|
|||||||
.asm_40288
|
.asm_40288
|
||||||
call MaxVolume
|
call MaxVolume
|
||||||
ld a, [wcf64]
|
ld a, [wcf64]
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ret
|
ret
|
||||||
; 40292 (10:4292)
|
; 40292 (10:4292)
|
||||||
|
|
||||||
@ -408,7 +408,7 @@ Function402aa: ; 402aa (10:42aa)
|
|||||||
call Function41423
|
call Function41423
|
||||||
ld a, [CurPartySpecies]
|
ld a, [CurPartySpecies]
|
||||||
call PlayCry
|
call PlayCry
|
||||||
ld hl, wcf63
|
ld hl, wJumptableEntryIndexBuffer
|
||||||
dec [hl]
|
dec [hl]
|
||||||
ret
|
ret
|
||||||
; 402e8 (10:42e8)
|
; 402e8 (10:42e8)
|
||||||
@ -478,11 +478,11 @@ Function4034f: ; 4034f
|
|||||||
push af
|
push af
|
||||||
ld a, [wcf64]
|
ld a, [wcf64]
|
||||||
push af
|
push af
|
||||||
ld a, [wcf63]
|
ld a, [wJumptableEntryIndexBuffer]
|
||||||
push af
|
push af
|
||||||
callba Function8442c
|
callba Function8442c
|
||||||
pop af
|
pop af
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
pop af
|
pop af
|
||||||
ld [wcf64], a
|
ld [wcf64], a
|
||||||
pop af
|
pop af
|
||||||
@ -552,7 +552,7 @@ Function403be: ; 403be (10:43be)
|
|||||||
.asm_403ea
|
.asm_403ea
|
||||||
call Function41401
|
call Function41401
|
||||||
ld a, $0
|
ld a, $0
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ret
|
ret
|
||||||
; 403f3 (10:43f3)
|
; 403f3 (10:43f3)
|
||||||
|
|
||||||
@ -604,13 +604,13 @@ Function40417: ; 40417 (10:4417)
|
|||||||
.asm_40431
|
.asm_40431
|
||||||
call Function41401
|
call Function41401
|
||||||
ld a, $0
|
ld a, $0
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function4043a: ; 4043a (10:443a)
|
Function4043a: ; 4043a (10:443a)
|
||||||
call Function41401
|
call Function41401
|
||||||
ld a, $b
|
ld a, $b
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function40443: ; 40443 (10:4443)
|
Function40443: ; 40443 (10:4443)
|
||||||
@ -656,7 +656,7 @@ Function40471: ; 40471 (10:4471)
|
|||||||
.asm_40495
|
.asm_40495
|
||||||
call Function41401
|
call Function41401
|
||||||
ld a, $0
|
ld a, $0
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ret
|
ret
|
||||||
; 4049e (10:449e)
|
; 4049e (10:449e)
|
||||||
|
|
||||||
@ -710,14 +710,14 @@ Function404b7: ; 404b7
|
|||||||
ld [wc7d1], a
|
ld [wc7d1], a
|
||||||
call Function41401
|
call Function41401
|
||||||
ld a, $9
|
ld a, $9
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ret
|
ret
|
||||||
; 40501
|
; 40501
|
||||||
|
|
||||||
Function40501: ; 40501
|
Function40501: ; 40501
|
||||||
call Function41401
|
call Function41401
|
||||||
ld a, $0
|
ld a, $0
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ret
|
ret
|
||||||
; 4050a
|
; 4050a
|
||||||
|
|
||||||
@ -779,7 +779,7 @@ Function40562: ; 40562 (10:4562)
|
|||||||
call Function40bd0
|
call Function40bd0
|
||||||
ret z
|
ret z
|
||||||
ld a, $2
|
ld a, $2
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ld a, $9
|
ld a, $9
|
||||||
ld [wcf64], a
|
ld [wcf64], a
|
||||||
ret
|
ret
|
||||||
@ -795,7 +795,7 @@ Function40562: ; 40562 (10:4562)
|
|||||||
call ClearSprites
|
call ClearSprites
|
||||||
call Function40bdc
|
call Function40bdc
|
||||||
ld a, $5
|
ld a, $5
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
xor a
|
xor a
|
||||||
ld [hSCX], a ; $ff00+$cf
|
ld [hSCX], a ; $ff00+$cf
|
||||||
ld a, $a7
|
ld a, $a7
|
||||||
@ -827,7 +827,7 @@ Function405df: ; 405df (10:45df)
|
|||||||
.asm_405eb
|
.asm_405eb
|
||||||
call Function41401
|
call Function41401
|
||||||
ld a, $7
|
ld a, $7
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
call Function41a24
|
call Function41a24
|
||||||
jr nz, .asm_40603
|
jr nz, .asm_40603
|
||||||
|
@ -1558,23 +1558,25 @@ Script_returnafterbattle: ; 0x97459
|
|||||||
ld a, [wd0ee]
|
ld a, [wd0ee]
|
||||||
and $3f
|
and $3f
|
||||||
cp $1
|
cp $1
|
||||||
jr nz, .asm_97470 ; 0x97466 $8
|
jr nz, .notblackedout ; 0x97466 $8
|
||||||
ld b, BANK(UnknownScript_0x124c1)
|
ld b, BANK(UnknownScript_0x124c1)
|
||||||
ld hl, UnknownScript_0x124c1
|
ld hl, UnknownScript_0x124c1
|
||||||
jp ScriptJump
|
jp ScriptJump
|
||||||
.asm_97470
|
|
||||||
|
.notblackedout
|
||||||
bit 0, d
|
bit 0, d
|
||||||
jr z, .asm_9747c ; 0x97472 $8
|
jr z, .asm_9747c ; 0x97472 $8
|
||||||
callba Functionfcfec
|
callba MomTriesToBuySomething
|
||||||
jr .asm_9748e ; 0x9747a $12
|
jr .done ; 0x9747a $12
|
||||||
|
|
||||||
.asm_9747c
|
.asm_9747c
|
||||||
ld a, [wd0ee]
|
ld a, [wd0ee]
|
||||||
bit 7, a
|
bit 7, a
|
||||||
jr z, .asm_9748e ; 0x97481 $b
|
jr z, .done ; 0x97481 $b
|
||||||
ld b, BANK(UnknownScript_0x90255)
|
ld b, BANK(Script_SpecialBillCall)
|
||||||
ld de, UnknownScript_0x90255
|
ld de, Script_SpecialBillCall
|
||||||
callba Function97c4f
|
callba Function97c4f
|
||||||
.asm_9748e
|
.done
|
||||||
jp Script_reloadmap
|
jp Script_reloadmap
|
||||||
; 0x97491
|
; 0x97491
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ _TitleScreen: ; 10ed67
|
|||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
|
|
||||||
; Reset timing variables
|
; Reset timing variables
|
||||||
ld hl, wcf63
|
ld hl, wJumptableEntryIndexBuffer
|
||||||
ld [hli], a ; cf63 ; Scene?
|
ld [hli], a ; cf63 ; Scene?
|
||||||
ld [hli], a ; cf64
|
ld [hli], a ; cf64
|
||||||
ld [hli], a ; cf65 ; Timer lo
|
ld [hli], a ; cf65 ; Timer lo
|
||||||
@ -130,10 +130,10 @@ _TitleScreen: ; 10ed67
|
|||||||
|
|
||||||
; Initialize running Suicune?
|
; Initialize running Suicune?
|
||||||
ld d, $0
|
ld d, $0
|
||||||
call Function10eed2
|
call LoadSuicuneFrame
|
||||||
|
|
||||||
; Initialize background crystal
|
; Initialize background crystal
|
||||||
call Function10ef06
|
call InitializeBackground
|
||||||
|
|
||||||
; Save WRAM bank
|
; Save WRAM bank
|
||||||
ld a, [rSVBK]
|
ld a, [rSVBK]
|
||||||
@ -145,12 +145,12 @@ _TitleScreen: ; 10ed67
|
|||||||
; Update palette colors
|
; Update palette colors
|
||||||
ld hl, TitleScreenPalettes
|
ld hl, TitleScreenPalettes
|
||||||
ld de, Unkn1Pals
|
ld de, Unkn1Pals
|
||||||
ld bc, $0080
|
ld bc, 4 * 32
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
|
|
||||||
ld hl, TitleScreenPalettes
|
ld hl, TitleScreenPalettes
|
||||||
ld de, BGPals
|
ld de, BGPals
|
||||||
ld bc, $0080
|
ld bc, 4 * 32
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
|
|
||||||
; Restore WRAM bank
|
; Restore WRAM bank
|
||||||
@ -220,7 +220,7 @@ _TitleScreen: ; 10ed67
|
|||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
|
|
||||||
xor a
|
xor a
|
||||||
ld [DefaultFlypoint], a
|
ld [UnknPals1 + 2], a
|
||||||
|
|
||||||
; Play starting sound effect
|
; Play starting sound effect
|
||||||
call SFXChannelsOff
|
call SFXChannelsOff
|
||||||
@ -230,25 +230,28 @@ _TitleScreen: ; 10ed67
|
|||||||
ret
|
ret
|
||||||
; 10eea7
|
; 10eea7
|
||||||
|
|
||||||
Function10eea7: ; 10eea7
|
SuicuneFrameIterator: ; 10eea7
|
||||||
ld hl, DefaultFlypoint
|
ld hl, UnknPals1 + 2
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld c, a
|
ld c, a
|
||||||
inc [hl]
|
inc [hl]
|
||||||
and $7
|
|
||||||
|
; Only do this once every eight frames
|
||||||
|
and (1 << 3) - 1
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
ld a, c
|
ld a, c
|
||||||
and $18
|
and 3 << 3
|
||||||
sla a
|
sla a
|
||||||
swap a
|
swap a
|
||||||
ld e, a
|
ld e, a
|
||||||
ld d, $0
|
ld d, $0
|
||||||
ld hl, Unknown_10eece
|
ld hl, .Frames
|
||||||
add hl, de
|
add hl, de
|
||||||
ld d, [hl]
|
ld d, [hl]
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
call Function10eed2
|
call LoadSuicuneFrame
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
ld a, $3
|
ld a, $3
|
||||||
@ -256,33 +259,36 @@ Function10eea7: ; 10eea7
|
|||||||
ret
|
ret
|
||||||
; 10eece
|
; 10eece
|
||||||
|
|
||||||
Unknown_10eece: ; 10eece
|
.Frames: ; 10eece
|
||||||
db $80, $88, $00, $08
|
db $80 ; VTiles4 tile $00
|
||||||
|
db $88 ; VTiles4 tile $08
|
||||||
|
db $00 ; VTiles5 tile $00
|
||||||
|
db $08 ; VTiles5 tile $08
|
||||||
; 10eed2
|
; 10eed2
|
||||||
|
|
||||||
|
|
||||||
Function10eed2: ; 10eed2
|
LoadSuicuneFrame: ; 10eed2
|
||||||
hlcoord 6, 12
|
hlcoord 6, 12
|
||||||
ld b, $6
|
ld b, 6
|
||||||
.asm_10eed7
|
.row
|
||||||
ld c, $8
|
ld c, 8
|
||||||
.asm_10eed9
|
.col
|
||||||
ld a, d
|
ld a, d
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
inc d
|
inc d
|
||||||
dec c
|
dec c
|
||||||
jr nz, .asm_10eed9
|
jr nz, .col
|
||||||
ld a, $c
|
ld a, SCREEN_WIDTH - 8
|
||||||
add l
|
add l
|
||||||
ld l, a
|
ld l, a
|
||||||
ld a, $0
|
ld a, 0
|
||||||
adc h
|
adc h
|
||||||
ld h, a
|
ld h, a
|
||||||
ld a, $8
|
ld a, 8
|
||||||
add d
|
add d
|
||||||
ld d, a
|
ld d, a
|
||||||
dec b
|
dec b
|
||||||
jr nz, .asm_10eed7
|
jr nz, .row
|
||||||
ret
|
ret
|
||||||
; 10eeef
|
; 10eeef
|
||||||
|
|
||||||
@ -293,18 +299,18 @@ DrawTitleGraphic: ; 10eeef
|
|||||||
; c: width
|
; c: width
|
||||||
; d: tile to start drawing from
|
; d: tile to start drawing from
|
||||||
; e: number of tiles to advance for each row
|
; e: number of tiles to advance for each row
|
||||||
.asm_10eeef
|
.row
|
||||||
push de
|
push de
|
||||||
push bc
|
push bc
|
||||||
push hl
|
push hl
|
||||||
.asm_10eef2
|
.col
|
||||||
ld a, d
|
ld a, d
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
inc d
|
inc d
|
||||||
dec c
|
dec c
|
||||||
jr nz, .asm_10eef2
|
jr nz, .col
|
||||||
pop hl
|
pop hl
|
||||||
ld bc, $0014
|
ld bc, SCREEN_WIDTH
|
||||||
add hl, bc
|
add hl, bc
|
||||||
pop bc
|
pop bc
|
||||||
pop de
|
pop de
|
||||||
@ -312,31 +318,31 @@ DrawTitleGraphic: ; 10eeef
|
|||||||
add d
|
add d
|
||||||
ld d, a
|
ld d, a
|
||||||
dec b
|
dec b
|
||||||
jr nz, .asm_10eeef
|
jr nz, .row
|
||||||
ret
|
ret
|
||||||
; 10ef06
|
; 10ef06
|
||||||
|
|
||||||
Function10ef06: ; 10ef06
|
InitializeBackground: ; 10ef06
|
||||||
ld hl, Sprites
|
ld hl, Sprites
|
||||||
ld d, $de
|
ld d, -$22
|
||||||
ld e, $0
|
ld e, $0
|
||||||
ld c, $5
|
ld c, 5
|
||||||
.asm_10ef0f
|
.loop
|
||||||
push bc
|
push bc
|
||||||
call Function10ef1c
|
call .InitColumn
|
||||||
pop bc
|
pop bc
|
||||||
ld a, $10
|
ld a, $10
|
||||||
add d
|
add d
|
||||||
ld d, a
|
ld d, a
|
||||||
dec c
|
dec c
|
||||||
jr nz, .asm_10ef0f
|
jr nz, .loop
|
||||||
ret
|
ret
|
||||||
; 10ef1c
|
; 10ef1c
|
||||||
|
|
||||||
Function10ef1c: ; 10ef1c
|
.InitColumn: ; 10ef1c
|
||||||
ld c, $6
|
ld c, $6
|
||||||
ld b, $40
|
ld b, $40
|
||||||
.asm_10ef20
|
.loop
|
||||||
ld a, d
|
ld a, d
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, b
|
ld a, b
|
||||||
@ -351,7 +357,7 @@ endr
|
|||||||
ld a, $80
|
ld a, $80
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
dec c
|
dec c
|
||||||
jr nz, .asm_10ef20
|
jr nz, .loop
|
||||||
ret
|
ret
|
||||||
; 10ef32
|
; 10ef32
|
||||||
|
|
||||||
@ -363,7 +369,7 @@ AnimateTitleCrystal: ; 10ef32
|
|||||||
; y is really from the bottom of the sprite, which is two tiles high
|
; y is really from the bottom of the sprite, which is two tiles high
|
||||||
ld hl, Sprites
|
ld hl, Sprites
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
cp 6 + 16
|
cp 6 + $10
|
||||||
ret z
|
ret z
|
||||||
|
|
||||||
; Move all 30 parts of the crystal down by 2
|
; Move all 30 parts of the crystal down by 2
|
||||||
|
172
event/mom.asm
172
event/mom.asm
@ -4,9 +4,9 @@ Special_BankOfMom: ; 16218
|
|||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hInMenu], a
|
ld [hInMenu], a
|
||||||
xor a
|
xor a
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
.asm_16223
|
.asm_16223
|
||||||
ld a, [wcf63]
|
ld a, [wJumptableEntryIndexBuffer]
|
||||||
bit 7, a
|
bit 7, a
|
||||||
jr nz, .asm_1622f
|
jr nz, .asm_1622f
|
||||||
call Function16233
|
call Function16233
|
||||||
@ -19,10 +19,10 @@ Special_BankOfMom: ; 16218
|
|||||||
; 16233
|
; 16233
|
||||||
|
|
||||||
Function16233: ; 16233
|
Function16233: ; 16233
|
||||||
ld a, [wcf63]
|
ld a, [wJumptableEntryIndexBuffer]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld d, 0
|
ld d, 0
|
||||||
ld hl, Jumptable_16242
|
ld hl, .jumptable
|
||||||
rept 2
|
rept 2
|
||||||
add hl, de
|
add hl, de
|
||||||
endr
|
endr
|
||||||
@ -32,75 +32,75 @@ endr
|
|||||||
jp [hl]
|
jp [hl]
|
||||||
; 16242
|
; 16242
|
||||||
|
|
||||||
Jumptable_16242: ; 16242
|
.jumptable: ; 16242
|
||||||
dw Function16254
|
dw .CheckIfBankInitialized
|
||||||
dw Function1626a
|
dw .InitializeBank
|
||||||
dw Function16290
|
dw .IsThisAboutYourMoney
|
||||||
dw Function162a8
|
dw .AccessBankOfMom
|
||||||
dw Function162e0
|
dw .StoreMoney
|
||||||
dw Function16373
|
dw .TakeMoney
|
||||||
dw Function16406
|
dw .StopOrStartSavingMoney
|
||||||
dw Function1642d
|
dw .AskDST
|
||||||
dw Function16433
|
dw .JustDoWhatYouCan
|
||||||
; 16254
|
; 16254
|
||||||
|
|
||||||
Function16254: ; 16254
|
.CheckIfBankInitialized: ; 16254
|
||||||
ld a, [wd854]
|
ld a, [wBankOfMomMode]
|
||||||
bit 7, a
|
bit 7, a
|
||||||
jr nz, .asm_16264
|
jr nz, .savingmoneyalready
|
||||||
set 7, a
|
set 7, a
|
||||||
ld [wd854], a
|
ld [wBankOfMomMode], a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
jr .asm_16266
|
jr .done_0
|
||||||
|
|
||||||
.asm_16264
|
.savingmoneyalready
|
||||||
ld a, $2
|
ld a, $2
|
||||||
|
|
||||||
.asm_16266
|
.done_0
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ret
|
ret
|
||||||
; 1626a
|
; 1626a
|
||||||
|
|
||||||
Function1626a: ; 1626a
|
.InitializeBank: ; 1626a
|
||||||
ld hl, UnknownText_0x16649
|
ld hl, UnknownText_0x16649
|
||||||
call PrintText
|
call PrintText
|
||||||
call YesNoBox
|
call YesNoBox
|
||||||
jr c, .asm_1627f
|
jr c, .DontSaveMoney
|
||||||
ld hl, UnknownText_0x1664e
|
ld hl, UnknownText_0x1664e
|
||||||
call PrintText
|
call PrintText
|
||||||
ld a, $81
|
ld a, %10000001
|
||||||
jr .asm_16281
|
jr .done_1
|
||||||
|
|
||||||
.asm_1627f
|
.DontSaveMoney
|
||||||
ld a, $80
|
ld a, %10000000
|
||||||
|
|
||||||
.asm_16281
|
.done_1
|
||||||
ld [wd854], a
|
ld [wBankOfMomMode], a
|
||||||
ld hl, UnknownText_0x16653
|
ld hl, UnknownText_0x16653
|
||||||
call PrintText
|
call PrintText
|
||||||
ld a, $8
|
ld a, $8
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ret
|
ret
|
||||||
; 16290
|
; 16290
|
||||||
|
|
||||||
Function16290: ; 16290
|
.IsThisAboutYourMoney: ; 16290
|
||||||
ld hl, UnknownText_0x16658
|
ld hl, UnknownText_0x16658
|
||||||
call PrintText
|
call PrintText
|
||||||
call YesNoBox
|
call YesNoBox
|
||||||
jr c, .asm_1629f
|
jr c, .nope
|
||||||
ld a, $3
|
ld a, $3
|
||||||
jr .asm_162a4
|
jr .done_2
|
||||||
|
|
||||||
.asm_1629f
|
.nope
|
||||||
call DSTChecks
|
call DSTChecks
|
||||||
ld a, $7
|
ld a, $7
|
||||||
|
|
||||||
.asm_162a4
|
.done_2
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ret
|
ret
|
||||||
; 162a8
|
; 162a8
|
||||||
|
|
||||||
Function162a8: ; 162a8
|
.AccessBankOfMom: ; 162a8
|
||||||
ld hl, UnknownText_0x1665d
|
ld hl, UnknownText_0x1665d
|
||||||
call PrintText
|
call PrintText
|
||||||
call Function1d6e
|
call Function1d6e
|
||||||
@ -108,36 +108,36 @@ Function162a8: ; 162a8
|
|||||||
call CopyMenuDataHeader
|
call CopyMenuDataHeader
|
||||||
call InterpretMenu2
|
call InterpretMenu2
|
||||||
call WriteBackup
|
call WriteBackup
|
||||||
jr c, .asm_162ce
|
jr c, .cancel
|
||||||
ld a, [wcfa9]
|
ld a, [wcfa9]
|
||||||
cp $1
|
cp $1
|
||||||
jr z, .asm_162d2
|
jr z, .withdraw
|
||||||
cp $2
|
cp $2
|
||||||
jr z, .asm_162d6
|
jr z, .deposit
|
||||||
cp $3
|
cp $3
|
||||||
jr z, .asm_162da
|
jr z, .stopsaving
|
||||||
|
|
||||||
.asm_162ce
|
.cancel
|
||||||
ld a, $7
|
ld a, $7
|
||||||
jr .asm_162dc
|
jr .done_3
|
||||||
|
|
||||||
.asm_162d2
|
.withdraw
|
||||||
ld a, $5
|
ld a, $5
|
||||||
jr .asm_162dc
|
jr .done_3
|
||||||
|
|
||||||
.asm_162d6
|
.deposit
|
||||||
ld a, $4
|
ld a, $4
|
||||||
jr .asm_162dc
|
jr .done_3
|
||||||
|
|
||||||
.asm_162da
|
.stopsaving
|
||||||
ld a, $6
|
ld a, $6
|
||||||
|
|
||||||
.asm_162dc
|
.done_3
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ret
|
ret
|
||||||
; 162e0
|
; 162e0
|
||||||
|
|
||||||
Function162e0: ; 162e0
|
.StoreMoney: ; 162e0
|
||||||
ld hl, UnknownText_0x16662
|
ld hl, UnknownText_0x16662
|
||||||
call PrintText
|
call PrintText
|
||||||
xor a
|
xor a
|
||||||
@ -153,31 +153,31 @@ endr
|
|||||||
call Function1656b
|
call Function1656b
|
||||||
call Function16571
|
call Function16571
|
||||||
call WriteBackup
|
call WriteBackup
|
||||||
jr c, .asm_1636d
|
jr c, .CancelDeposit
|
||||||
ld hl, StringBuffer2
|
ld hl, StringBuffer2
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
or [hl]
|
or [hl]
|
||||||
inc hl
|
inc hl
|
||||||
or [hl]
|
or [hl]
|
||||||
jr z, .asm_1636d
|
jr z, .CancelDeposit
|
||||||
ld de, Money
|
ld de, Money
|
||||||
ld bc, StringBuffer2
|
ld bc, StringBuffer2
|
||||||
callba CheckMoney
|
callba CheckMoney
|
||||||
jr c, .asm_1635f
|
jr c, .DontHaveThatMuchToDeposit
|
||||||
ld hl, StringBuffer2
|
ld hl, StringBuffer2
|
||||||
ld de, StringBuffer2 + 3
|
ld de, StringBuffer2 + 3
|
||||||
ld bc, $0003
|
ld bc, 3
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
ld bc, wd851
|
ld bc, wd851
|
||||||
ld de, StringBuffer2
|
ld de, StringBuffer2
|
||||||
callba GiveMoney
|
callba GiveMoney
|
||||||
jr c, .asm_16366
|
jr c, .CantDepositThatMuch
|
||||||
ld bc, StringBuffer2 + 3
|
ld bc, StringBuffer2 + 3
|
||||||
ld de, Money
|
ld de, Money
|
||||||
callba TakeMoney
|
callba TakeMoney
|
||||||
ld hl, StringBuffer2
|
ld hl, StringBuffer2
|
||||||
ld de, wd851
|
ld de, wd851
|
||||||
ld bc, $0003
|
ld bc, 3
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
ld de, SFX_TRANSACTION
|
ld de, SFX_TRANSACTION
|
||||||
call PlaySFX
|
call PlaySFX
|
||||||
@ -185,27 +185,27 @@ endr
|
|||||||
ld hl, UnknownText_0x1668a
|
ld hl, UnknownText_0x1668a
|
||||||
call PrintText
|
call PrintText
|
||||||
ld a, $8
|
ld a, $8
|
||||||
jr .asm_1636f
|
jr .done_4
|
||||||
|
|
||||||
.asm_1635f
|
.DontHaveThatMuchToDeposit
|
||||||
ld hl, UnknownText_0x1667b
|
ld hl, UnknownText_0x1667b
|
||||||
call PrintText
|
call PrintText
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_16366
|
.CantDepositThatMuch
|
||||||
ld hl, UnknownText_0x16680
|
ld hl, UnknownText_0x16680
|
||||||
call PrintText
|
call PrintText
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_1636d
|
.CancelDeposit
|
||||||
ld a, $7
|
ld a, $7
|
||||||
|
|
||||||
.asm_1636f
|
.done_4
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ret
|
ret
|
||||||
; 16373
|
; 16373
|
||||||
|
|
||||||
Function16373: ; 16373
|
.TakeMoney: ; 16373
|
||||||
ld hl, UnknownText_0x16667
|
ld hl, UnknownText_0x16667
|
||||||
call PrintText
|
call PrintText
|
||||||
xor a
|
xor a
|
||||||
@ -221,13 +221,13 @@ endr
|
|||||||
call Function1656b
|
call Function1656b
|
||||||
call Function16571
|
call Function16571
|
||||||
call WriteBackup
|
call WriteBackup
|
||||||
jr c, .asm_16400
|
jr c, .CancelWithdraw
|
||||||
ld hl, StringBuffer2
|
ld hl, StringBuffer2
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
or [hl]
|
or [hl]
|
||||||
inc hl
|
inc hl
|
||||||
or [hl]
|
or [hl]
|
||||||
jr z, .asm_16400
|
jr z, .CancelWithdraw
|
||||||
ld hl, StringBuffer2
|
ld hl, StringBuffer2
|
||||||
ld de, StringBuffer2 + 3
|
ld de, StringBuffer2 + 3
|
||||||
ld bc, 3
|
ld bc, 3
|
||||||
@ -235,11 +235,11 @@ endr
|
|||||||
ld de, wd851
|
ld de, wd851
|
||||||
ld bc, StringBuffer2
|
ld bc, StringBuffer2
|
||||||
callba CheckMoney
|
callba CheckMoney
|
||||||
jr c, .asm_163f2
|
jr c, .InsufficientFundsInBank
|
||||||
ld bc, Money
|
ld bc, Money
|
||||||
ld de, StringBuffer2
|
ld de, StringBuffer2
|
||||||
callba GiveMoney
|
callba GiveMoney
|
||||||
jr c, .asm_163f9
|
jr c, .NotEnoughRoomInWallet
|
||||||
ld bc, StringBuffer2 + 3
|
ld bc, StringBuffer2 + 3
|
||||||
ld de, wd851
|
ld de, wd851
|
||||||
callba TakeMoney
|
callba TakeMoney
|
||||||
@ -253,53 +253,53 @@ endr
|
|||||||
ld hl, UnknownText_0x1668f
|
ld hl, UnknownText_0x1668f
|
||||||
call PrintText
|
call PrintText
|
||||||
ld a, $8
|
ld a, $8
|
||||||
jr .asm_16402
|
jr .done_5
|
||||||
|
|
||||||
.asm_163f2
|
.InsufficientFundsInBank
|
||||||
ld hl, UnknownText_0x16671
|
ld hl, UnknownText_0x16671
|
||||||
call PrintText
|
call PrintText
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_163f9
|
.NotEnoughRoomInWallet
|
||||||
ld hl, UnknownText_0x16676
|
ld hl, UnknownText_0x16676
|
||||||
call PrintText
|
call PrintText
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_16400
|
.CancelWithdraw
|
||||||
ld a, 7
|
ld a, $7
|
||||||
|
|
||||||
.asm_16402
|
.done_5
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ret
|
ret
|
||||||
; 16406
|
; 16406
|
||||||
|
|
||||||
Function16406: ; 16406
|
.StopOrStartSavingMoney: ; 16406
|
||||||
ld hl, UnknownText_0x1666c
|
ld hl, UnknownText_0x1666c
|
||||||
call PrintText
|
call PrintText
|
||||||
call YesNoBox
|
call YesNoBox
|
||||||
jr c, .asm_16422
|
jr c, .StopSavingMoney
|
||||||
ld a, $81
|
ld a, $81
|
||||||
ld [wd854], a
|
ld [wBankOfMomMode], a
|
||||||
ld hl, UnknownText_0x16685
|
ld hl, UnknownText_0x16685
|
||||||
call PrintText
|
call PrintText
|
||||||
ld a, $8
|
ld a, $8
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_16422
|
.StopSavingMoney
|
||||||
ld a, $80
|
ld a, $80
|
||||||
ld [wd854], a
|
ld [wBankOfMomMode], a
|
||||||
ld a, $7
|
ld a, $7
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ret
|
ret
|
||||||
; 1642d
|
; 1642d
|
||||||
|
|
||||||
Function1642d: ; 1642d
|
.AskDST: ; 1642d
|
||||||
ld hl, UnknownText_0x16694
|
ld hl, UnknownText_0x16694
|
||||||
call PrintText
|
call PrintText
|
||||||
|
|
||||||
Function16433: ; 16433
|
.JustDoWhatYouCan: ; 16433
|
||||||
ld hl, wcf63
|
ld hl, wJumptableEntryIndexBuffer
|
||||||
set 7, [hl]
|
set 7, [hl]
|
||||||
ret
|
ret
|
||||||
; 16439
|
; 16439
|
||||||
|
@ -136,15 +136,14 @@ Init:: ; 17d
|
|||||||
; BG on
|
; BG on
|
||||||
ld [rLCDC], a
|
ld [rLCDC], a
|
||||||
|
|
||||||
ld a, $ff
|
ld a, -1
|
||||||
ld [$ffcb], a
|
ld [$ffcb], a
|
||||||
|
|
||||||
callba Function9890
|
callba Function9890
|
||||||
|
|
||||||
ld a, $9c
|
ld a, VBGMap1 / $100
|
||||||
ld [$ffd7], a
|
ld [hBGMapAddress + 1], a
|
||||||
|
xor a ; VBGMap1 % $100
|
||||||
xor a
|
|
||||||
ld [hBGMapAddress], a
|
ld [hBGMapAddress], a
|
||||||
|
|
||||||
callba StartClock
|
callba StartClock
|
||||||
|
@ -15,7 +15,7 @@ Serial:: ; 6ef
|
|||||||
jr nz, .asm_721
|
jr nz, .asm_721
|
||||||
|
|
||||||
ld a, [$ffcb]
|
ld a, [$ffcb]
|
||||||
inc a
|
inc a ; is it equal to -1?
|
||||||
jr z, .asm_726
|
jr z, .asm_726
|
||||||
|
|
||||||
ld a, [rSB]
|
ld a, [rSB]
|
||||||
|
@ -6612,12 +6612,12 @@ Function102c71: ; 102c71
|
|||||||
; 102c87
|
; 102c87
|
||||||
|
|
||||||
Function102c87: ; 102c87
|
Function102c87: ; 102c87
|
||||||
ld a, [wcf63]
|
ld a, [wJumptableEntryIndexBuffer]
|
||||||
push af
|
push af
|
||||||
ld a, [wcf64]
|
ld a, [wcf64]
|
||||||
push af
|
push af
|
||||||
ld a, [wcd4c]
|
ld a, [wcd4c]
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ld a, [PartyCount]
|
ld a, [PartyCount]
|
||||||
ld [wcf64], a
|
ld [wcf64], a
|
||||||
ld a, $0
|
ld a, $0
|
||||||
@ -6632,7 +6632,7 @@ Function102c87: ; 102c87
|
|||||||
ld bc, $011a
|
ld bc, $011a
|
||||||
call Function102d3e
|
call Function102d3e
|
||||||
ld a, [wcd4d]
|
ld a, [wcd4d]
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ld a, [OTPartyCount]
|
ld a, [OTPartyCount]
|
||||||
ld [wcf64], a
|
ld [wcf64], a
|
||||||
ld a, $5
|
ld a, $5
|
||||||
@ -6649,18 +6649,18 @@ Function102c87: ; 102c87
|
|||||||
pop af
|
pop af
|
||||||
ld [wcf64], a
|
ld [wcf64], a
|
||||||
pop af
|
pop af
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ret
|
ret
|
||||||
; 102cee
|
; 102cee
|
||||||
|
|
||||||
Function102cee: ; 102cee
|
Function102cee: ; 102cee
|
||||||
ld a, [wcf63]
|
ld a, [wJumptableEntryIndexBuffer]
|
||||||
dec a
|
dec a
|
||||||
call Function102d34
|
call Function102d34
|
||||||
ld de, DefaultFlypoint
|
ld de, DefaultFlypoint
|
||||||
ld bc, $002f
|
ld bc, $002f
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
ld a, [wcf63]
|
ld a, [wJumptableEntryIndexBuffer]
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, $6
|
ld a, $6
|
||||||
sub c
|
sub c
|
||||||
@ -6669,7 +6669,7 @@ Function102cee: ; 102cee
|
|||||||
ld hl, $0000
|
ld hl, $0000
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
push hl
|
push hl
|
||||||
ld a, [wcf63]
|
ld a, [wJumptableEntryIndexBuffer]
|
||||||
dec a
|
dec a
|
||||||
call Function102d34
|
call Function102d34
|
||||||
ld d, h
|
ld d, h
|
||||||
|
@ -124,7 +124,7 @@ Function108089: ; 108089
|
|||||||
|
|
||||||
Function1080b7: ; 1080b7
|
Function1080b7: ; 1080b7
|
||||||
xor a
|
xor a
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
call WhiteBGMap
|
call WhiteBGMap
|
||||||
call ClearSprites
|
call ClearSprites
|
||||||
call ClearTileMap
|
call ClearTileMap
|
||||||
@ -187,7 +187,7 @@ Function1080b7: ; 1080b7
|
|||||||
|
|
||||||
Function108157: ; 108157
|
Function108157: ; 108157
|
||||||
xor a
|
xor a
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
call WhiteBGMap
|
call WhiteBGMap
|
||||||
call ClearSprites
|
call ClearSprites
|
||||||
call ClearTileMap
|
call ClearTileMap
|
||||||
@ -310,7 +310,7 @@ Function108239: ; 108239
|
|||||||
; 10824b
|
; 10824b
|
||||||
|
|
||||||
Function10824b: ; 10824b
|
Function10824b: ; 10824b
|
||||||
ld a, [wcf63]
|
ld a, [wJumptableEntryIndexBuffer]
|
||||||
bit 7, a
|
bit 7, a
|
||||||
jr nz, .asm_10825a
|
jr nz, .asm_10825a
|
||||||
call Function10827b
|
call Function10827b
|
||||||
@ -335,7 +335,7 @@ Function10824b: ; 10824b
|
|||||||
; 10827b
|
; 10827b
|
||||||
|
|
||||||
Function10827b: ; 10827b
|
Function10827b: ; 10827b
|
||||||
ld a, [wcf63]
|
ld a, [wJumptableEntryIndexBuffer]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld d, 0
|
ld d, 0
|
||||||
ld hl, Jumptable_10828a
|
ld hl, Jumptable_10828a
|
||||||
@ -372,7 +372,7 @@ Jumptable_10828a: ; 10828a
|
|||||||
; 1082b2
|
; 1082b2
|
||||||
|
|
||||||
Function1082b2: ; 1082b2
|
Function1082b2: ; 1082b2
|
||||||
ld hl, wcf63
|
ld hl, wJumptableEntryIndexBuffer
|
||||||
inc [hl]
|
inc [hl]
|
||||||
ret
|
ret
|
||||||
; 1082b7
|
; 1082b7
|
||||||
@ -383,7 +383,7 @@ Function1082b7: ; 1082b7
|
|||||||
inc hl
|
inc hl
|
||||||
ld d, [hl]
|
ld d, [hl]
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
inc de
|
inc de
|
||||||
ld [hl], d
|
ld [hl], d
|
||||||
dec hl
|
dec hl
|
||||||
@ -392,7 +392,7 @@ Function1082b7: ; 1082b7
|
|||||||
; 1082c6
|
; 1082c6
|
||||||
|
|
||||||
Function1082c6: ; 1082c6
|
Function1082c6: ; 1082c6
|
||||||
ld hl, wcf63
|
ld hl, wJumptableEntryIndexBuffer
|
||||||
set 7, [hl]
|
set 7, [hl]
|
||||||
ret
|
ret
|
||||||
; 1082cc
|
; 1082cc
|
||||||
@ -1270,8 +1270,8 @@ Function1089d2:
|
|||||||
asm_1089fc
|
asm_1089fc
|
||||||
call WaitTop
|
call WaitTop
|
||||||
call Function108ac8
|
call Function108ac8
|
||||||
ld a, $9c
|
ld a, VBGMap1 / $100
|
||||||
ld [$ffd7], a
|
ld [hBGMapAddress + 1], a
|
||||||
hlcoord 5, 0
|
hlcoord 5, 0
|
||||||
ld b, $6
|
ld b, $6
|
||||||
ld c, $9
|
ld c, $9
|
||||||
@ -1293,8 +1293,8 @@ String_108a1d: ; 108a1d
|
|||||||
Function108a33: ; 108a33
|
Function108a33: ; 108a33
|
||||||
call WaitTop
|
call WaitTop
|
||||||
call Function108ac8
|
call Function108ac8
|
||||||
ld a, $9c
|
ld a, VBGMap1 / $100
|
||||||
ld [$ffd7], a
|
ld [hBGMapAddress + 1], a
|
||||||
hlcoord 5, 0
|
hlcoord 5, 0
|
||||||
ld b, $6
|
ld b, $6
|
||||||
ld c, $9
|
ld c, $9
|
||||||
@ -1313,8 +1313,8 @@ String_108a54: ; 108a54
|
|||||||
Function108a5b: ; 108a5b
|
Function108a5b: ; 108a5b
|
||||||
call WaitTop
|
call WaitTop
|
||||||
call Function108ac8
|
call Function108ac8
|
||||||
ld a, $9c
|
ld a, VBGMap1 / $100
|
||||||
ld [$ffd7], a
|
ld [hBGMapAddress + 1], a
|
||||||
hlcoord 4, 0
|
hlcoord 4, 0
|
||||||
ld b, $6
|
ld b, $6
|
||||||
ld c, $a
|
ld c, $a
|
||||||
@ -1336,8 +1336,8 @@ String_108a79: ; 108a79
|
|||||||
Function108a87: ; 108a87
|
Function108a87: ; 108a87
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
call WaitTop
|
call WaitTop
|
||||||
ld a, $98
|
ld a, VBGMap0 / $100
|
||||||
ld [$ffd7], a
|
ld [hBGMapAddress + 1], a
|
||||||
ret
|
ret
|
||||||
; 108a92
|
; 108a92
|
||||||
|
|
||||||
|
@ -8168,7 +8168,7 @@ Function117a8d: ; 0x117a8d
|
|||||||
|
|
||||||
Function117a94: ; 0x117a94
|
Function117a94: ; 0x117a94
|
||||||
xor a
|
xor a
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ld [wcf64], a
|
ld [wcf64], a
|
||||||
ld [wcf65], a
|
ld [wcf65], a
|
||||||
ld [wcf66], a
|
ld [wcf66], a
|
||||||
@ -8190,7 +8190,7 @@ Function117ab4: ; 0x117ab4
|
|||||||
|
|
||||||
Function117acd: ; 0x117acd
|
Function117acd: ; 0x117acd
|
||||||
call JoyTextDelay
|
call JoyTextDelay
|
||||||
ld a, [wcf63]
|
ld a, [wJumptableEntryIndexBuffer]
|
||||||
bit 7, a
|
bit 7, a
|
||||||
jr nz, .asm_117ae2 ; 0x117ad5 $b
|
jr nz, .asm_117ae2 ; 0x117ad5 $b
|
||||||
call Function117ae9
|
call Function117ae9
|
||||||
@ -8202,7 +8202,7 @@ Function117acd: ; 0x117acd
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
Function117ae9: ; 0x117ae9
|
Function117ae9: ; 0x117ae9
|
||||||
ld a, [wcf63]
|
ld a, [wJumptableEntryIndexBuffer]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld d, $0
|
ld d, $0
|
||||||
ld hl, Pointers117af8
|
ld hl, Pointers117af8
|
||||||
@ -8306,7 +8306,7 @@ Function117b4f:
|
|||||||
call ExitMenu
|
call ExitMenu
|
||||||
callba Function104061
|
callba Function104061
|
||||||
ld a, $80
|
ld a, $80
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function117bb6:
|
Function117bb6:
|
||||||
@ -8325,11 +8325,11 @@ Function117bb6:
|
|||||||
ld [wc303], a
|
ld [wc303], a
|
||||||
callba Function17f555
|
callba Function17f555
|
||||||
ld a, $80
|
ld a, $80
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ret
|
ret
|
||||||
.asm_117be1
|
.asm_117be1
|
||||||
ld a, $80
|
ld a, $80
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ret
|
ret
|
||||||
.asm_117be7
|
.asm_117be7
|
||||||
ld a, [rSVBK]
|
ld a, [rSVBK]
|
||||||
@ -8411,7 +8411,7 @@ Function117c4a:
|
|||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
ld a, $80
|
ld a, $80
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function117c89:
|
Function117c89:
|
||||||
@ -8464,7 +8464,7 @@ MobileStadiumSuccessText: ; 0x117cd8
|
|||||||
db "@"
|
db "@"
|
||||||
|
|
||||||
Function117cdd: ; 0x117cdd
|
Function117cdd: ; 0x117cdd
|
||||||
ld hl, wcf63
|
ld hl, wJumptableEntryIndexBuffer
|
||||||
inc [hl]
|
inc [hl]
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -11817,7 +11817,7 @@ Function119800: ; 119800
|
|||||||
ld [wc702], a
|
ld [wc702], a
|
||||||
ld a, [wcd81]
|
ld a, [wcd81]
|
||||||
ld [wc74e], a
|
ld [wc74e], a
|
||||||
ld a, [wcf63]
|
ld a, [wJumptableEntryIndexBuffer]
|
||||||
push af
|
push af
|
||||||
ld a, [wcf64]
|
ld a, [wcf64]
|
||||||
push af
|
push af
|
||||||
@ -11840,7 +11840,7 @@ Function119800: ; 119800
|
|||||||
pop af
|
pop af
|
||||||
ld [wcf64], a
|
ld [wcf64], a
|
||||||
pop af
|
pop af
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
callba Function115dc3
|
callba Function115dc3
|
||||||
jp Function119e2e
|
jp Function119e2e
|
||||||
; 11984e
|
; 11984e
|
||||||
@ -11853,7 +11853,7 @@ Function11984e: ; 11984e
|
|||||||
and a
|
and a
|
||||||
jr nz, .asm_1198a8
|
jr nz, .asm_1198a8
|
||||||
callba Function170000
|
callba Function170000
|
||||||
ld a, [wcf63]
|
ld a, [wJumptableEntryIndexBuffer]
|
||||||
push af
|
push af
|
||||||
ld a, [wcf64]
|
ld a, [wcf64]
|
||||||
push af
|
push af
|
||||||
@ -11876,7 +11876,7 @@ Function11984e: ; 11984e
|
|||||||
pop af
|
pop af
|
||||||
ld [wcf64], a
|
ld [wcf64], a
|
||||||
pop af
|
pop af
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
callba Function115dc3
|
callba Function115dc3
|
||||||
jp Function119e2e
|
jp Function119e2e
|
||||||
|
|
||||||
@ -11887,7 +11887,7 @@ Function11984e: ; 11984e
|
|||||||
|
|
||||||
.asm_1198a8
|
.asm_1198a8
|
||||||
callba Function17005a
|
callba Function17005a
|
||||||
ld a, [wcf63]
|
ld a, [wJumptableEntryIndexBuffer]
|
||||||
push af
|
push af
|
||||||
ld a, [wcf64]
|
ld a, [wcf64]
|
||||||
push af
|
push af
|
||||||
@ -11910,7 +11910,7 @@ Function11984e: ; 11984e
|
|||||||
pop af
|
pop af
|
||||||
ld [wcf64], a
|
ld [wcf64], a
|
||||||
pop af
|
pop af
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
callba Function115dc3
|
callba Function115dc3
|
||||||
jp Function119e2e
|
jp Function119e2e
|
||||||
; 1198ee
|
; 1198ee
|
||||||
@ -14343,7 +14343,7 @@ Function11ac51: ; 11ac51
|
|||||||
call DelayFrame
|
call DelayFrame
|
||||||
.asm_11ac82
|
.asm_11ac82
|
||||||
call JoyTextDelay
|
call JoyTextDelay
|
||||||
ld a, [wcf63]
|
ld a, [wJumptableEntryIndexBuffer]
|
||||||
bit 7, a
|
bit 7, a
|
||||||
jr nz, .asm_11aca8
|
jr nz, .asm_11aca8
|
||||||
call Function11b314
|
call Function11b314
|
||||||
@ -14444,7 +14444,7 @@ Function11ad1b: ; 11ad1b
|
|||||||
xor a
|
xor a
|
||||||
call ByteFill
|
call ByteFill
|
||||||
xor a
|
xor a
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ld [wcf64], a
|
ld [wcf64], a
|
||||||
ld [wcf65], a
|
ld [wcf65], a
|
||||||
ld [wcf66], a
|
ld [wcf66], a
|
||||||
@ -14456,7 +14456,7 @@ Function11ad1b: ; 11ad1b
|
|||||||
; 11ad6e
|
; 11ad6e
|
||||||
|
|
||||||
Function11ad6e: ; 11ad6e
|
Function11ad6e: ; 11ad6e
|
||||||
ld a, [wcf63]
|
ld a, [wJumptableEntryIndexBuffer]
|
||||||
ld hl, Jumptable_11ad78
|
ld hl, Jumptable_11ad78
|
||||||
call Function11b239
|
call Function11b239
|
||||||
jp [hl]
|
jp [hl]
|
||||||
@ -14475,13 +14475,13 @@ Jumptable_11ad78: ; 11ad78
|
|||||||
; 11ad8a
|
; 11ad8a
|
||||||
|
|
||||||
Function11ad8a: ; 11ad8a
|
Function11ad8a: ; 11ad8a
|
||||||
ld hl, wcf63
|
ld hl, wJumptableEntryIndexBuffer
|
||||||
inc [hl]
|
inc [hl]
|
||||||
ret
|
ret
|
||||||
; 11ad8f
|
; 11ad8f
|
||||||
|
|
||||||
Function11ad8f: ; 11ad8f
|
Function11ad8f: ; 11ad8f
|
||||||
ld hl, wcf63
|
ld hl, wJumptableEntryIndexBuffer
|
||||||
set 7, [hl]
|
set 7, [hl]
|
||||||
ret
|
ret
|
||||||
; 11ad95
|
; 11ad95
|
||||||
@ -14522,7 +14522,7 @@ Function11adc4:
|
|||||||
ret z
|
ret z
|
||||||
call PlayClickSFX
|
call PlayClickSFX
|
||||||
xor a
|
xor a
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
jr .asm_11ae2e
|
jr .asm_11ae2e
|
||||||
|
|
||||||
.asm_11ade6
|
.asm_11ade6
|
||||||
@ -14643,7 +14643,7 @@ Function11ae98:
|
|||||||
ld a, $7f
|
ld a, $7f
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
jr .asm_11aef7
|
jr .asm_11aef7
|
||||||
|
|
||||||
.asm_11aec1
|
.asm_11aec1
|
||||||
@ -14734,7 +14734,7 @@ Function11af4e:
|
|||||||
ld a, $7f
|
ld a, $7f
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
jr .asm_11afaa
|
jr .asm_11afaa
|
||||||
|
|
||||||
.asm_11af77
|
.asm_11af77
|
||||||
@ -14765,7 +14765,7 @@ Function11af4e:
|
|||||||
cp $2
|
cp $2
|
||||||
jr z, .asm_11af6a
|
jr z, .asm_11af6a
|
||||||
ld a, $6
|
ld a, $6
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
xor a
|
xor a
|
||||||
ld [ScriptVar], a
|
ld [ScriptVar], a
|
||||||
|
|
||||||
@ -15057,7 +15057,7 @@ Function11b0ff: ; 11b0ff
|
|||||||
jr .asm_11b148
|
jr .asm_11b148
|
||||||
|
|
||||||
.asm_11b141
|
.asm_11b141
|
||||||
ld hl, wcf63
|
ld hl, wJumptableEntryIndexBuffer
|
||||||
ld a, $7
|
ld a, $7
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ret
|
ret
|
||||||
@ -15090,7 +15090,7 @@ Function11b0ff: ; 11b0ff
|
|||||||
.asm_11b16c
|
.asm_11b16c
|
||||||
ld [wcd30], a
|
ld [wcd30], a
|
||||||
ld a, $4
|
ld a, $4
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ret
|
ret
|
||||||
; 11b175
|
; 11b175
|
||||||
|
|
||||||
@ -15411,7 +15411,7 @@ Function11b314: ; 11b314
|
|||||||
|
|
||||||
Function11b31b: ; 11b31b
|
Function11b31b: ; 11b31b
|
||||||
ld hl, Unknown_11b350
|
ld hl, Unknown_11b350
|
||||||
ld a, [wcf63]
|
ld a, [wJumptableEntryIndexBuffer]
|
||||||
cp $2
|
cp $2
|
||||||
jr c, .asm_11b349
|
jr c, .asm_11b349
|
||||||
ld a, [wc7d1]
|
ld a, [wc7d1]
|
||||||
@ -15419,7 +15419,7 @@ Function11b31b: ; 11b31b
|
|||||||
jr nc, .asm_11b344
|
jr nc, .asm_11b344
|
||||||
cp $3
|
cp $3
|
||||||
jr c, .asm_11b349
|
jr c, .asm_11b349
|
||||||
ld a, [wcf63]
|
ld a, [wJumptableEntryIndexBuffer]
|
||||||
cp $2
|
cp $2
|
||||||
jr z, .asm_11b349
|
jr z, .asm_11b349
|
||||||
cp $3
|
cp $3
|
||||||
@ -15553,7 +15553,7 @@ Function11b3d9: ; 11b3d9
|
|||||||
ld [hli], a
|
ld [hli], a
|
||||||
cp $41
|
cp $41
|
||||||
jr c, .asm_11b42b
|
jr c, .asm_11b42b
|
||||||
ld a, [wcf63]
|
ld a, [wJumptableEntryIndexBuffer]
|
||||||
cp $4
|
cp $4
|
||||||
jr z, .asm_11b43b
|
jr z, .asm_11b43b
|
||||||
cp $5
|
cp $5
|
||||||
@ -15592,7 +15592,7 @@ Function11b444: ; 11b444
|
|||||||
|
|
||||||
Function11b44b: ; 11b44b
|
Function11b44b: ; 11b44b
|
||||||
xor a
|
xor a
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ld [wcf64], a
|
ld [wcf64], a
|
||||||
ld [wcf65], a
|
ld [wcf65], a
|
||||||
ld [wcf66], a
|
ld [wcf66], a
|
||||||
@ -15604,14 +15604,14 @@ Function11b45c: ; 11b45c
|
|||||||
.asm_11b45c
|
.asm_11b45c
|
||||||
call Function11b46a
|
call Function11b46a
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
ld a, [wcf63]
|
ld a, [wJumptableEntryIndexBuffer]
|
||||||
cp $4
|
cp $4
|
||||||
jr nz, .asm_11b45c
|
jr nz, .asm_11b45c
|
||||||
ret
|
ret
|
||||||
; 11b46a
|
; 11b46a
|
||||||
|
|
||||||
Function11b46a: ; 11b46a
|
Function11b46a: ; 11b46a
|
||||||
ld a, [wcf63]
|
ld a, [wJumptableEntryIndexBuffer]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld d, 0
|
ld d, 0
|
||||||
ld hl, Jumptable_11b479
|
ld hl, Jumptable_11b479
|
||||||
@ -15813,7 +15813,7 @@ Function11b570: ; 11b570
|
|||||||
|
|
||||||
.asm_11b57f
|
.asm_11b57f
|
||||||
ld a, $4
|
ld a, $4
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ret
|
ret
|
||||||
; 11b585
|
; 11b585
|
||||||
|
|
||||||
@ -15913,14 +15913,14 @@ Function11b64c: ; 11b64c
|
|||||||
.asm_11b64c
|
.asm_11b64c
|
||||||
call Function11b65a
|
call Function11b65a
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
ld a, [wcf63]
|
ld a, [wJumptableEntryIndexBuffer]
|
||||||
cp $1
|
cp $1
|
||||||
jr nz, .asm_11b64c
|
jr nz, .asm_11b64c
|
||||||
ret
|
ret
|
||||||
; 11b65a
|
; 11b65a
|
||||||
|
|
||||||
Function11b65a: ; 11b65a
|
Function11b65a: ; 11b65a
|
||||||
ld a, [wcf63]
|
ld a, [wJumptableEntryIndexBuffer]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld d, 0
|
ld d, 0
|
||||||
ld hl, Jumptable_11b669
|
ld hl, Jumptable_11b669
|
||||||
@ -16677,7 +16677,7 @@ Function11c08f: ; 11c08f
|
|||||||
|
|
||||||
|
|
||||||
Function11c0c6: ; 11c0c6
|
Function11c0c6: ; 11c0c6
|
||||||
ld a, [wcf63]
|
ld a, [wJumptableEntryIndexBuffer]
|
||||||
ld l, a
|
ld l, a
|
||||||
ld a, [wcf64]
|
ld a, [wcf64]
|
||||||
ld h, a
|
ld h, a
|
||||||
@ -16687,7 +16687,7 @@ Function11c0c6: ; 11c0c6
|
|||||||
ld [hli], a
|
ld [hli], a
|
||||||
push de
|
push de
|
||||||
xor a
|
xor a
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ld a, $12
|
ld a, $12
|
||||||
ld [wcf64], a
|
ld [wcf64], a
|
||||||
ld a, $6
|
ld a, $6
|
||||||
@ -16720,9 +16720,9 @@ Function11c0c6: ; 11c0c6
|
|||||||
.asm_11c102
|
.asm_11c102
|
||||||
cp e
|
cp e
|
||||||
jr nc, .asm_11c11c
|
jr nc, .asm_11c11c
|
||||||
ld a, [wcf63]
|
ld a, [wJumptableEntryIndexBuffer]
|
||||||
inc a
|
inc a
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ld [hl], $4e
|
ld [hl], $4e
|
||||||
rra
|
rra
|
||||||
jr c, .asm_11c113
|
jr c, .asm_11c113
|
||||||
@ -16763,7 +16763,7 @@ Function11c0c6: ; 11c0c6
|
|||||||
call PlaceWholeStringInBoxAtOnce
|
call PlaceWholeStringInBoxAtOnce
|
||||||
pop hl
|
pop hl
|
||||||
ld a, l
|
ld a, l
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ld a, h
|
ld a, h
|
||||||
ld [wcf64], a
|
ld [wcf64], a
|
||||||
ret
|
ret
|
||||||
@ -16856,7 +16856,7 @@ Function11c1b9: ; 11c1b9
|
|||||||
|
|
||||||
Function11c1ca: ; 11c1ca
|
Function11c1ca: ; 11c1ca
|
||||||
xor a
|
xor a
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ld [wcf64], a
|
ld [wcf64], a
|
||||||
ld [wcf65], a
|
ld [wcf65], a
|
||||||
ld [wcf66], a
|
ld [wcf66], a
|
||||||
@ -16938,7 +16938,7 @@ Function11c283: ; 11c283
|
|||||||
call JoyTextDelay
|
call JoyTextDelay
|
||||||
ld a, [hJoyPressed]
|
ld a, [hJoyPressed]
|
||||||
ld [hJoypadPressed], a
|
ld [hJoypadPressed], a
|
||||||
ld a, [wcf63]
|
ld a, [wJumptableEntryIndexBuffer]
|
||||||
bit 7, a
|
bit 7, a
|
||||||
jr nz, .asm_11c2a2
|
jr nz, .asm_11c2a2
|
||||||
call Function11c2ac
|
call Function11c2ac
|
||||||
@ -16953,7 +16953,7 @@ Function11c283: ; 11c283
|
|||||||
; 11c2ac
|
; 11c2ac
|
||||||
|
|
||||||
Function11c2ac: ; 11c2ac
|
Function11c2ac: ; 11c2ac
|
||||||
ld a, [wcf63]
|
ld a, [wJumptableEntryIndexBuffer]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld d, 0
|
ld d, 0
|
||||||
ld hl, Jumptable_11c2bb
|
ld hl, Jumptable_11c2bb
|
||||||
@ -17219,7 +17219,7 @@ Function11c3ed: ; 11c3ed (47:43ed)
|
|||||||
.asm_11c472
|
.asm_11c472
|
||||||
call Function11c4a5
|
call Function11c4a5
|
||||||
.asm_11c475
|
.asm_11c475
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
call PlayClickSFX
|
call PlayClickSFX
|
||||||
ret
|
ret
|
||||||
.asm_11c47c
|
.asm_11c47c
|
||||||
@ -17383,7 +17383,7 @@ Function11c53d: ; 11c53d (47:453d)
|
|||||||
.asm_11c59f
|
.asm_11c59f
|
||||||
ld hl, wcd24
|
ld hl, wcd24
|
||||||
set 1, [hl]
|
set 1, [hl]
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
call PlayClickSFX
|
call PlayClickSFX
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -17599,7 +17599,7 @@ Function11c675: ; 11c675 (47:4675)
|
|||||||
.asm_11c6fa
|
.asm_11c6fa
|
||||||
ld a, $15
|
ld a, $15
|
||||||
.asm_11c6fc
|
.asm_11c6fc
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ld hl, wcd24
|
ld hl, wcd24
|
||||||
set 3, [hl]
|
set 3, [hl]
|
||||||
call PlayClickSFX
|
call PlayClickSFX
|
||||||
@ -18119,7 +18119,7 @@ Function11c9c3: ; 11c9c3 (47:49c3)
|
|||||||
ld hl, wcd24
|
ld hl, wcd24
|
||||||
set 4, [hl]
|
set 4, [hl]
|
||||||
ld a, $4
|
ld a, $4
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
call PlayClickSFX
|
call PlayClickSFX
|
||||||
ret
|
ret
|
||||||
.asm_11c9f7
|
.asm_11c9f7
|
||||||
@ -18271,7 +18271,7 @@ Function11cab3: ; 11cab3 (47:4ab3)
|
|||||||
ld [wcd2a], a
|
ld [wcd2a], a
|
||||||
ret
|
ret
|
||||||
.asm_11caf3
|
.asm_11caf3
|
||||||
ld hl, wcf63
|
ld hl, wJumptableEntryIndexBuffer
|
||||||
set 7, [hl]
|
set 7, [hl]
|
||||||
ret
|
ret
|
||||||
.asm_11caf9
|
.asm_11caf9
|
||||||
@ -18280,7 +18280,7 @@ Function11cab3: ; 11cab3 (47:4ab3)
|
|||||||
ld hl, wcd24
|
ld hl, wcd24
|
||||||
set 4, [hl]
|
set 4, [hl]
|
||||||
ld a, $4
|
ld a, $4
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ld a, [wcd35]
|
ld a, [wcd35]
|
||||||
cp $ff
|
cp $ff
|
||||||
ret nz
|
ret nz
|
||||||
@ -18389,7 +18389,7 @@ endr
|
|||||||
ld d, a
|
ld d, a
|
||||||
hlcoord 1, 14
|
hlcoord 1, 14
|
||||||
call PlaceString
|
call PlaceString
|
||||||
ld hl, wcf63
|
ld hl, wJumptableEntryIndexBuffer
|
||||||
inc [hl]
|
inc [hl]
|
||||||
inc hl
|
inc hl
|
||||||
ld a, $10
|
ld a, $10
|
||||||
@ -18404,7 +18404,7 @@ endr
|
|||||||
ld hl, wcd24
|
ld hl, wcd24
|
||||||
set 4, [hl]
|
set 4, [hl]
|
||||||
ld a, $4
|
ld a, $4
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ret
|
ret
|
||||||
.asm_11cbeb
|
.asm_11cbeb
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
@ -18490,7 +18490,7 @@ Function11cd04: ; 11cd04 (47:4d04)
|
|||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
ld a, $4
|
ld a, $4
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ret
|
ret
|
||||||
; 11cd10 (47:4d10)
|
; 11cd10 (47:4d10)
|
||||||
|
|
||||||
@ -18551,7 +18551,7 @@ Function11cd54: ; 11cd54 (47:4d54)
|
|||||||
.asm_11cd7d
|
.asm_11cd7d
|
||||||
ld a, $15
|
ld a, $15
|
||||||
.asm_11cd7f
|
.asm_11cd7f
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ld hl, wcd24
|
ld hl, wcd24
|
||||||
set 5, [hl]
|
set 5, [hl]
|
||||||
call PlayClickSFX
|
call PlayClickSFX
|
||||||
@ -18692,7 +18692,7 @@ Function11ce2b: ; 11ce2b (47:4e2b)
|
|||||||
.asm_11ce96
|
.asm_11ce96
|
||||||
ld a, $13
|
ld a, $13
|
||||||
.asm_11ce98
|
.asm_11ce98
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ld hl, wcd24
|
ld hl, wcd24
|
||||||
set 2, [hl]
|
set 2, [hl]
|
||||||
call PlayClickSFX
|
call PlayClickSFX
|
||||||
@ -18778,7 +18778,7 @@ String_11cf79: ; 11cf79
|
|||||||
; 11cfb5
|
; 11cfb5
|
||||||
|
|
||||||
Function11cfb5: ; 11cfb5 (47:4fb5)
|
Function11cfb5: ; 11cfb5 (47:4fb5)
|
||||||
ld hl, wcf63
|
ld hl, wJumptableEntryIndexBuffer
|
||||||
inc [hl]
|
inc [hl]
|
||||||
ret
|
ret
|
||||||
; 11cfba (47:4fba)
|
; 11cfba (47:4fba)
|
||||||
@ -21327,7 +21327,7 @@ Function16c000: ; 16c000
|
|||||||
|
|
||||||
Function16c031: ; 16c031
|
Function16c031: ; 16c031
|
||||||
xor a
|
xor a
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ld [wcf64], a
|
ld [wcf64], a
|
||||||
ld [DefaultFlypoint], a
|
ld [DefaultFlypoint], a
|
||||||
ld [wd003], a
|
ld [wd003], a
|
||||||
@ -22784,7 +22784,7 @@ Function17020c: ; 17020c
|
|||||||
|
|
||||||
Function170215: ; 170215
|
Function170215: ; 170215
|
||||||
xor a
|
xor a
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
call Function17022c
|
call Function17022c
|
||||||
ret
|
ret
|
||||||
; 17021d
|
; 17021d
|
||||||
@ -22795,7 +22795,7 @@ Function17021d: ; 17021d
|
|||||||
|
|
||||||
Function17021e: ; 17021e
|
Function17021e: ; 17021e
|
||||||
xor a
|
xor a
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ld [wcf64], a
|
ld [wcf64], a
|
||||||
ld [wcf65], a
|
ld [wcf65], a
|
||||||
ld [wcf66], a
|
ld [wcf66], a
|
||||||
@ -22806,14 +22806,14 @@ Function17022c: ; 17022c
|
|||||||
.asm_17022c
|
.asm_17022c
|
||||||
call Jumpto_BattleTowerBattleFunction
|
call Jumpto_BattleTowerBattleFunction
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
ld a, [wcf63]
|
ld a, [wJumptableEntryIndexBuffer]
|
||||||
cp $1
|
cp $1
|
||||||
jr nz, .asm_17022c
|
jr nz, .asm_17022c
|
||||||
ret
|
ret
|
||||||
; 17023a
|
; 17023a
|
||||||
|
|
||||||
Jumpto_BattleTowerBattleFunction: ; 17023a
|
Jumpto_BattleTowerBattleFunction: ; 17023a
|
||||||
ld a, [wcf63]
|
ld a, [wJumptableEntryIndexBuffer]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld d, 0
|
ld d, 0
|
||||||
ld hl, Jumptable_BattleTowerBattleFunctions
|
ld hl, Jumptable_BattleTowerBattleFunctions
|
||||||
@ -22871,7 +22871,7 @@ RunBattleTowerBattle: ; 17024d
|
|||||||
pop af
|
pop af
|
||||||
ld [Options], a
|
ld [Options], a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
||||||
@ -23229,7 +23229,7 @@ Function1704f1: ; 1704f1
|
|||||||
call ClearScreen
|
call ClearScreen
|
||||||
.asm_1704fa
|
.asm_1704fa
|
||||||
call JoyTextDelay
|
call JoyTextDelay
|
||||||
ld a, [wcf63]
|
ld a, [wJumptableEntryIndexBuffer]
|
||||||
bit 7, a
|
bit 7, a
|
||||||
jr nz, .asm_17050f
|
jr nz, .asm_17050f
|
||||||
call Function170510
|
call Function170510
|
||||||
@ -23241,7 +23241,7 @@ Function1704f1: ; 1704f1
|
|||||||
; 170510
|
; 170510
|
||||||
|
|
||||||
Function170510: ; 170510
|
Function170510: ; 170510
|
||||||
ld a, [wcf63]
|
ld a, [wJumptableEntryIndexBuffer]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld d, 0
|
ld d, 0
|
||||||
ld hl, Jumptable_17051f
|
ld hl, Jumptable_17051f
|
||||||
@ -23332,12 +23332,12 @@ Function170577:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_1705ac
|
.asm_1705ac
|
||||||
ld hl, wcf63
|
ld hl, wJumptableEntryIndexBuffer
|
||||||
set 7, [hl]
|
set 7, [hl]
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function1705b2:
|
Function1705b2:
|
||||||
ld hl, wcf63
|
ld hl, wJumptableEntryIndexBuffer
|
||||||
inc [hl]
|
inc [hl]
|
||||||
ret
|
ret
|
||||||
; 1705b7
|
; 1705b7
|
||||||
|
@ -521,7 +521,7 @@ Function17d2b6: ; 17d2b6
|
|||||||
|
|
||||||
Function17d2c0: ; 17d2c0
|
Function17d2c0: ; 17d2c0
|
||||||
xor a
|
xor a
|
||||||
ld [wcf63], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ld [wcf64], a
|
ld [wcf64], a
|
||||||
ld [wcf65], a
|
ld [wcf65], a
|
||||||
ld [wcf66], a
|
ld [wcf66], a
|
||||||
|
@ -9,7 +9,7 @@ UnusedTitleScreen: ; 10c000
|
|||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
|
|
||||||
ld hl, wcf63
|
ld hl, wJumptableEntryIndexBuffer
|
||||||
rept 3
|
rept 3
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
endr
|
endr
|
||||||
|
12
wram.asm
12
wram.asm
@ -135,7 +135,7 @@ INCLUDE "vram.asm"
|
|||||||
SECTION "Stack", WRAM0
|
SECTION "Stack", WRAM0
|
||||||
wc000::
|
wc000::
|
||||||
StackBottom::
|
StackBottom::
|
||||||
ds $ff
|
ds $100 - 1
|
||||||
Stack::
|
Stack::
|
||||||
StackTop::
|
StackTop::
|
||||||
ds 1
|
ds 1
|
||||||
@ -441,6 +441,8 @@ wc60f::
|
|||||||
wPlayerMoveStruct:: ds MOVE_LENGTH ; c60f
|
wPlayerMoveStruct:: ds MOVE_LENGTH ; c60f
|
||||||
wc616::
|
wc616::
|
||||||
EnemyMonNick:: ds PKMN_NAME_LENGTH ; c616
|
EnemyMonNick:: ds PKMN_NAME_LENGTH ; c616
|
||||||
|
ds -5
|
||||||
|
wInitHourBuffer:: ds 5
|
||||||
BattleMonNick:: ds PKMN_NAME_LENGTH ; c621
|
BattleMonNick:: ds PKMN_NAME_LENGTH ; c621
|
||||||
|
|
||||||
BattleMon:: battle_struct BattleMon ; c62c
|
BattleMon:: battle_struct BattleMon ; c62c
|
||||||
@ -1179,9 +1181,9 @@ MonType:: ; cf5f
|
|||||||
CurSpecies:: ; cf60
|
CurSpecies:: ; cf60
|
||||||
ds 1
|
ds 1
|
||||||
|
|
||||||
wNamedObjectTypeBuffer:: ds 2
|
wNamedObjectTypeBuffer:: ds 1
|
||||||
wIntroSceneIndex::
|
ds 1
|
||||||
wcf63:: ds 1
|
wJumptableEntryIndexBuffer:: ds 1
|
||||||
wNrOfBeatenBattleTowerTrainers::
|
wNrOfBeatenBattleTowerTrainers::
|
||||||
wMomBankDigitCursorPosition::
|
wMomBankDigitCursorPosition::
|
||||||
wIntroSceneFrameCounter::
|
wIntroSceneFrameCounter::
|
||||||
@ -2126,7 +2128,7 @@ Money:: ; d84e
|
|||||||
wd851::
|
wd851::
|
||||||
wMomsMoney:: ; d851
|
wMomsMoney:: ; d851
|
||||||
ds 3
|
ds 3
|
||||||
wd854::
|
wBankOfMomMode::
|
||||||
wMomSavingMoney:: ; d854
|
wMomSavingMoney:: ; d854
|
||||||
ds 1
|
ds 1
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user