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