mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
enum macros/move_anim.asm, resolve battle/anims.asm function labels
This commit is contained in:
parent
ba05bfeafe
commit
d13fb46d40
@ -2859,7 +2859,7 @@ endr
|
|||||||
AI_Smart_Stomp: ; 39200
|
AI_Smart_Stomp: ; 39200
|
||||||
; 80% chance to encourage this move if the player has used Minimize.
|
; 80% chance to encourage this move if the player has used Minimize.
|
||||||
|
|
||||||
ld a, [wc6fe]
|
ld a, [wPlayerMinimized]
|
||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
|
|
||||||
|
@ -353,54 +353,54 @@ endr
|
|||||||
|
|
||||||
|
|
||||||
BattleAnimCommands:: ; cc2a4 (33:42a4)
|
BattleAnimCommands:: ; cc2a4 (33:42a4)
|
||||||
dw BattleAnimCmd_D0
|
dw BattleAnimCmd_Obj
|
||||||
dw BattleAnimCmd_D1
|
dw BattleAnimCmd_1GFX
|
||||||
dw BattleAnimCmd_D2
|
dw BattleAnimCmd_2GFX
|
||||||
dw BattleAnimCmd_D3
|
dw BattleAnimCmd_3GFX
|
||||||
dw BattleAnimCmd_D4
|
dw BattleAnimCmd_4GFX
|
||||||
dw BattleAnimCmd_D5
|
dw BattleAnimCmd_5GFX
|
||||||
dw BattleAnimCmd_D6
|
dw BattleAnimCmd_IncObj
|
||||||
dw BattleAnimCmd_D7
|
dw BattleAnimCmd_SetObj
|
||||||
dw BattleAnimCmd_D8
|
dw BattleAnimCmd_IncBGEffect
|
||||||
dw BattleAnimCmd_D9
|
dw BattleAnimCmd_EnemyFeetObj
|
||||||
dw BattleAnimCmd_DA
|
dw BattleAnimCmd_PlayerHeadObj
|
||||||
dw BattleAnimCmd_DB
|
dw BattleAnimCmd_CheckPokeball
|
||||||
dw BattleAnimCmd_DC
|
dw BattleAnimCmd_Transform
|
||||||
dw BattleAnimCmd_DD
|
dw BattleAnimCmd_RaiseSub
|
||||||
dw BattleAnimCmd_DE
|
dw BattleAnimCmd_DropSub
|
||||||
dw BattleAnimCmd_DF
|
dw BattleAnimCmd_ResetObp0
|
||||||
dw BattleAnimCmd_E0
|
dw BattleAnimCmd_Sound
|
||||||
dw BattleAnimCmd_E1
|
dw BattleAnimCmd_Cry
|
||||||
dw BattleAnimCmd_E2
|
dw BattleAnimCmd_MinimizeOpp
|
||||||
dw BattleAnimCmd_E3
|
dw BattleAnimCmd_OAMOn
|
||||||
dw BattleAnimCmd_E4
|
dw BattleAnimCmd_OAMOff
|
||||||
dw BattleAnimCmd_E5
|
dw BattleAnimCmd_ClearObjs
|
||||||
dw BattleAnimCmd_E6
|
dw BattleAnimCmd_BeatUp
|
||||||
dw BattleAnimCmd_E7
|
dw BattleAnimCmd_E7
|
||||||
dw BattleAnimCmd_E8
|
dw BattleAnimCmd_UpdateActorPic
|
||||||
dw BattleAnimCmd_E9
|
dw BattleAnimCmd_Minimize
|
||||||
dw BattleAnimCmd_EA
|
dw BattleAnimCmd_EA ; dummy
|
||||||
dw BattleAnimCmd_EB
|
dw BattleAnimCmd_EB ; dummy
|
||||||
dw BattleAnimCmd_EC
|
dw BattleAnimCmd_EC ; dummy
|
||||||
dw BattleAnimCmd_ED
|
dw BattleAnimCmd_ED ; dummy
|
||||||
dw BattleAnimCmd_EE
|
dw BattleAnimCmd_JumpAnd
|
||||||
dw BattleAnimCmd_EF
|
dw BattleAnimCmd_JumpUntil
|
||||||
dw BattleAnimCmd_F0
|
dw BattleAnimCmd_BGEffect
|
||||||
dw BattleAnimCmd_F1
|
dw BattleAnimCmd_BGP
|
||||||
dw BattleAnimCmd_F2
|
dw BattleAnimCmd_OBP0
|
||||||
dw BattleAnimCmd_F3
|
dw BattleAnimCmd_OBP1
|
||||||
dw BattleAnimCmd_F4
|
dw BattleAnimCmd_ClearSprites
|
||||||
dw BattleAnimCmd_F5
|
dw BattleAnimCmd_F5
|
||||||
dw BattleAnimCmd_F6
|
dw BattleAnimCmd_F6
|
||||||
dw BattleAnimCmd_F7
|
dw BattleAnimCmd_F7
|
||||||
dw BattleAnimCmd_F8
|
dw BattleAnimCmd_JumpIf
|
||||||
dw BattleAnimCmd_F9
|
dw BattleAnimCmd_SetVar
|
||||||
dw BattleAnimCmd_FA
|
dw BattleAnimCmd_IncVar
|
||||||
dw BattleAnimCmd_FB
|
dw BattleAnimCmd_JumpVar
|
||||||
dw BattleAnimCmd_FC
|
dw BattleAnimCmd_Jump
|
||||||
dw BattleAnimCmd_FD
|
dw BattleAnimCmd_Loop
|
||||||
dw BattleAnimCmd_FE
|
dw BattleAnimCmd_Call
|
||||||
dw BattleAnimCmd_FF
|
dw BattleAnimCmd_Ret
|
||||||
|
|
||||||
|
|
||||||
BattleAnimCmd_EA:
|
BattleAnimCmd_EA:
|
||||||
@ -409,7 +409,7 @@ BattleAnimCmd_EC:
|
|||||||
BattleAnimCmd_ED: ; cc304 (33:4304)
|
BattleAnimCmd_ED: ; cc304 (33:4304)
|
||||||
ret
|
ret
|
||||||
|
|
||||||
BattleAnimCmd_FF: ; cc305 (33:4305)
|
BattleAnimCmd_Ret: ; cc305 (33:4305)
|
||||||
ld hl, BattleAnimFlags
|
ld hl, BattleAnimFlags
|
||||||
res 1, [hl]
|
res 1, [hl]
|
||||||
ld hl, BattleAnimParent
|
ld hl, BattleAnimParent
|
||||||
@ -422,7 +422,7 @@ BattleAnimCmd_FF: ; cc305 (33:4305)
|
|||||||
ld [hl], d
|
ld [hl], d
|
||||||
ret
|
ret
|
||||||
|
|
||||||
BattleAnimCmd_FE: ; cc317 (33:4317)
|
BattleAnimCmd_Call: ; cc317 (33:4317)
|
||||||
call GetBattleAnimByte
|
call GetBattleAnimByte
|
||||||
ld e, a
|
ld e, a
|
||||||
call GetBattleAnimByte
|
call GetBattleAnimByte
|
||||||
@ -445,7 +445,7 @@ BattleAnimCmd_FE: ; cc317 (33:4317)
|
|||||||
set 1, [hl]
|
set 1, [hl]
|
||||||
ret
|
ret
|
||||||
|
|
||||||
BattleAnimCmd_FC: ; cc339 (33:4339)
|
BattleAnimCmd_Jump: ; cc339 (33:4339)
|
||||||
call GetBattleAnimByte
|
call GetBattleAnimByte
|
||||||
ld e, a
|
ld e, a
|
||||||
call GetBattleAnimByte
|
call GetBattleAnimByte
|
||||||
@ -456,7 +456,7 @@ BattleAnimCmd_FC: ; cc339 (33:4339)
|
|||||||
ld [hl], d
|
ld [hl], d
|
||||||
ret
|
ret
|
||||||
|
|
||||||
BattleAnimCmd_FD: ; cc348 (33:4348)
|
BattleAnimCmd_Loop: ; cc348 (33:4348)
|
||||||
call GetBattleAnimByte
|
call GetBattleAnimByte
|
||||||
ld hl, BattleAnimFlags
|
ld hl, BattleAnimFlags
|
||||||
bit 2, [hl]
|
bit 2, [hl]
|
||||||
@ -497,7 +497,7 @@ endr
|
|||||||
ld [hl], e
|
ld [hl], e
|
||||||
ret
|
ret
|
||||||
|
|
||||||
BattleAnimCmd_EF: ; cc383 (33:4383)
|
BattleAnimCmd_JumpUntil: ; cc383 (33:4383)
|
||||||
ld hl, wKickCounter
|
ld hl, wKickCounter
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and a
|
and a
|
||||||
@ -527,17 +527,17 @@ endr
|
|||||||
ld [hl], e
|
ld [hl], e
|
||||||
ret
|
ret
|
||||||
|
|
||||||
BattleAnimCmd_F9: ; cc3a6 (33:43a6)
|
BattleAnimCmd_SetVar: ; cc3a6 (33:43a6)
|
||||||
call GetBattleAnimByte
|
call GetBattleAnimByte
|
||||||
ld [BattleAnimVar], a
|
ld [BattleAnimVar], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
BattleAnimCmd_FA: ; cc3ad (33:43ad)
|
BattleAnimCmd_IncVar: ; cc3ad (33:43ad)
|
||||||
ld hl, BattleAnimVar
|
ld hl, BattleAnimVar
|
||||||
inc [hl]
|
inc [hl]
|
||||||
ret
|
ret
|
||||||
|
|
||||||
BattleAnimCmd_FB: ; cc3b2 (33:43b2)
|
BattleAnimCmd_JumpVar: ; cc3b2 (33:43b2)
|
||||||
call GetBattleAnimByte
|
call GetBattleAnimByte
|
||||||
ld hl, BattleAnimVar
|
ld hl, BattleAnimVar
|
||||||
cp [hl]
|
cp [hl]
|
||||||
@ -566,7 +566,7 @@ endr
|
|||||||
ld [hl], d
|
ld [hl], d
|
||||||
ret
|
ret
|
||||||
|
|
||||||
BattleAnimCmd_F8: ; cc3d6 (33:43d6)
|
BattleAnimCmd_JumpIf: ; cc3d6 (33:43d6)
|
||||||
call GetBattleAnimByte
|
call GetBattleAnimByte
|
||||||
ld hl, wKickCounter
|
ld hl, wKickCounter
|
||||||
cp [hl]
|
cp [hl]
|
||||||
@ -595,7 +595,7 @@ endr
|
|||||||
ld [hl], d
|
ld [hl], d
|
||||||
ret
|
ret
|
||||||
|
|
||||||
BattleAnimCmd_EE: ; cc3fa (33:43fa)
|
BattleAnimCmd_JumpAnd: ; cc3fa (33:43fa)
|
||||||
call GetBattleAnimByte
|
call GetBattleAnimByte
|
||||||
ld e, a
|
ld e, a
|
||||||
ld a, [wKickCounter]
|
ld a, [wKickCounter]
|
||||||
@ -624,7 +624,7 @@ endr
|
|||||||
ld [hl], d
|
ld [hl], d
|
||||||
ret
|
ret
|
||||||
|
|
||||||
BattleAnimCmd_D0: ; cc41f (33:441f)
|
BattleAnimCmd_Obj: ; cc41f (33:441f)
|
||||||
call GetBattleAnimByte
|
call GetBattleAnimByte
|
||||||
ld [BattleAnimTemps], a
|
ld [BattleAnimTemps], a
|
||||||
call GetBattleAnimByte
|
call GetBattleAnimByte
|
||||||
@ -636,7 +636,7 @@ BattleAnimCmd_D0: ; cc41f (33:441f)
|
|||||||
call Functioncc9a1
|
call Functioncc9a1
|
||||||
ret
|
ret
|
||||||
|
|
||||||
BattleAnimCmd_F0: ; cc43b (33:443b)
|
BattleAnimCmd_BGEffect: ; cc43b (33:443b)
|
||||||
call GetBattleAnimByte
|
call GetBattleAnimByte
|
||||||
ld [BattleAnimTemps], a
|
ld [BattleAnimTemps], a
|
||||||
call GetBattleAnimByte
|
call GetBattleAnimByte
|
||||||
@ -648,23 +648,23 @@ BattleAnimCmd_F0: ; cc43b (33:443b)
|
|||||||
call Functionccb4f
|
call Functionccb4f
|
||||||
ret
|
ret
|
||||||
|
|
||||||
BattleAnimCmd_F1: ; cc457 (33:4457)
|
BattleAnimCmd_BGP: ; cc457 (33:4457)
|
||||||
call GetBattleAnimByte
|
call GetBattleAnimByte
|
||||||
ld [wcfc7], a
|
ld [wcfc7], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
BattleAnimCmd_F2: ; cc45e (33:445e)
|
BattleAnimCmd_OBP0: ; cc45e (33:445e)
|
||||||
call GetBattleAnimByte
|
call GetBattleAnimByte
|
||||||
ld [wcfc8], a
|
ld [wcfc8], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
BattleAnimCmd_F3: ; cc465 (33:4465)
|
BattleAnimCmd_OBP1: ; cc465 (33:4465)
|
||||||
call GetBattleAnimByte
|
call GetBattleAnimByte
|
||||||
ld [wcfc9], a
|
ld [wcfc9], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
BattleAnimCmd_DF: ; cc46c (33:446c)
|
BattleAnimCmd_ResetObp0: ; cc46c (33:446c)
|
||||||
ld a, [hSGB] ; $ff00+$e7
|
ld a, [hSGB]
|
||||||
and a
|
and a
|
||||||
ld a, $e0
|
ld a, $e0
|
||||||
jr z, .asm_cc475
|
jr z, .asm_cc475
|
||||||
@ -673,7 +673,7 @@ BattleAnimCmd_DF: ; cc46c (33:446c)
|
|||||||
ld [wcfc8], a
|
ld [wcfc8], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
BattleAnimCmd_E5: ; cc479 (33:4479)
|
BattleAnimCmd_ClearObjs: ; cc479 (33:4479)
|
||||||
ld hl, OTPartyMon3HP
|
ld hl, OTPartyMon3HP
|
||||||
ld a, $a0
|
ld a, $a0
|
||||||
.asm_cc47e
|
.asm_cc47e
|
||||||
@ -683,11 +683,11 @@ BattleAnimCmd_E5: ; cc479 (33:4479)
|
|||||||
jr nz, .asm_cc47e
|
jr nz, .asm_cc47e
|
||||||
ret
|
ret
|
||||||
|
|
||||||
BattleAnimCmd_D1:
|
BattleAnimCmd_1GFX:
|
||||||
BattleAnimCmd_D2:
|
BattleAnimCmd_2GFX:
|
||||||
BattleAnimCmd_D3:
|
BattleAnimCmd_3GFX:
|
||||||
BattleAnimCmd_D4:
|
BattleAnimCmd_4GFX:
|
||||||
BattleAnimCmd_D5: ; cc485 (33:4485)
|
BattleAnimCmd_5GFX: ; cc485 (33:4485)
|
||||||
ld a, [BattleAnimByte]
|
ld a, [BattleAnimByte]
|
||||||
and $f
|
and $f
|
||||||
ld c, a
|
ld c, a
|
||||||
@ -722,7 +722,7 @@ endr
|
|||||||
jr nz, .asm_cc492
|
jr nz, .asm_cc492
|
||||||
ret
|
ret
|
||||||
|
|
||||||
BattleAnimCmd_D6: ; cc4c0 (33:44c0)
|
BattleAnimCmd_IncObj: ; cc4c0 (33:44c0)
|
||||||
call GetBattleAnimByte
|
call GetBattleAnimByte
|
||||||
ld e, $a
|
ld e, $a
|
||||||
ld bc, OTPartyMon3HP
|
ld bc, OTPartyMon3HP
|
||||||
@ -746,7 +746,7 @@ BattleAnimCmd_D6: ; cc4c0 (33:44c0)
|
|||||||
inc [hl]
|
inc [hl]
|
||||||
ret
|
ret
|
||||||
|
|
||||||
BattleAnimCmd_D8: ; cc4e3 (33:44e3)
|
BattleAnimCmd_IncBGEffect: ; cc4e3 (33:44e3)
|
||||||
call GetBattleAnimByte
|
call GetBattleAnimByte
|
||||||
ld e, $5
|
ld e, $5
|
||||||
ld bc, ActiveBGEffects
|
ld bc, ActiveBGEffects
|
||||||
@ -770,7 +770,7 @@ BattleAnimCmd_D8: ; cc4e3 (33:44e3)
|
|||||||
inc [hl]
|
inc [hl]
|
||||||
ret
|
ret
|
||||||
|
|
||||||
BattleAnimCmd_D7: ; cc506 (33:4506)
|
BattleAnimCmd_SetObj: ; cc506 (33:4506)
|
||||||
call GetBattleAnimByte
|
call GetBattleAnimByte
|
||||||
ld e, $a
|
ld e, $a
|
||||||
ld bc, OTPartyMon3HP
|
ld bc, OTPartyMon3HP
|
||||||
@ -795,7 +795,7 @@ BattleAnimCmd_D7: ; cc506 (33:4506)
|
|||||||
ld [hl], a
|
ld [hl], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
BattleAnimCmd_D9: ; cc52c (33:452c)
|
BattleAnimCmd_EnemyFeetObj: ; cc52c (33:452c)
|
||||||
|
|
||||||
ld hl, w5_d300
|
ld hl, w5_d300
|
||||||
.asm_cc52f
|
.asm_cc52f
|
||||||
@ -851,7 +851,7 @@ Functioncc561: ; cc561 (33:4561)
|
|||||||
jr nz, Functioncc561
|
jr nz, Functioncc561
|
||||||
ret
|
ret
|
||||||
|
|
||||||
BattleAnimCmd_DA: ; cc57e (33:457e)
|
BattleAnimCmd_PlayerHeadObj: ; cc57e (33:457e)
|
||||||
|
|
||||||
ld hl, w5_d300
|
ld hl, w5_d300
|
||||||
.asm_cc581
|
.asm_cc581
|
||||||
@ -907,7 +907,7 @@ Functioncc5b3: ; cc5b3 (33:45b3)
|
|||||||
jr nz, Functioncc5b3
|
jr nz, Functioncc5b3
|
||||||
ret
|
ret
|
||||||
|
|
||||||
BattleAnimCmd_DB: ; cc5d0 (33:45d0)
|
BattleAnimCmd_CheckPokeball: ; cc5d0 (33:45d0)
|
||||||
callab GetPokeBallWobble
|
callab GetPokeBallWobble
|
||||||
ld a, c
|
ld a, c
|
||||||
ld [BattleAnimVar], a
|
ld [BattleAnimVar], a
|
||||||
@ -916,15 +916,15 @@ BattleAnimCmd_DB: ; cc5d0 (33:45d0)
|
|||||||
BattleAnimCmd_E7: ; cc5db (33:45db)
|
BattleAnimCmd_E7: ; cc5db (33:45db)
|
||||||
ret
|
ret
|
||||||
|
|
||||||
BattleAnimCmd_DC: ; cc5dc (33:45dc)
|
BattleAnimCmd_Transform: ; cc5dc (33:45dc)
|
||||||
ld a, [rSVBK] ; $ff00+$70
|
ld a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
ld a, [CurPartySpecies] ; CurPartySpecies
|
ld a, [CurPartySpecies] ; CurPartySpecies
|
||||||
push af
|
push af
|
||||||
|
|
||||||
ld a, [hBattleTurn] ; $ff00+$e4
|
ld a, [hBattleTurn]
|
||||||
and a
|
and a
|
||||||
jr z, .player
|
jr z, .player
|
||||||
|
|
||||||
@ -948,13 +948,13 @@ BattleAnimCmd_DC: ; cc5dc (33:45dc)
|
|||||||
pop af
|
pop af
|
||||||
ld [CurPartySpecies], a ; CurPartySpecies
|
ld [CurPartySpecies], a ; CurPartySpecies
|
||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
BattleAnimCmd_E8: ; cc622 (33:4622)
|
BattleAnimCmd_UpdateActorPic: ; cc622 (33:4622)
|
||||||
|
|
||||||
ld de, VTiles0 tile $00
|
ld de, VTiles0 tile $00
|
||||||
ld a, [hBattleTurn] ; $ff00+$e4
|
ld a, [hBattleTurn]
|
||||||
and a
|
and a
|
||||||
jr z, .player
|
jr z, .player
|
||||||
|
|
||||||
@ -971,12 +971,12 @@ BattleAnimCmd_E8: ; cc622 (33:4622)
|
|||||||
call Request2bpp
|
call Request2bpp
|
||||||
ret
|
ret
|
||||||
|
|
||||||
BattleAnimCmd_DD: ; cc640 (33:4640)
|
BattleAnimCmd_RaiseSub: ; cc640 (33:4640)
|
||||||
|
|
||||||
ld a, [rSVBK] ; $ff00+$70
|
ld a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
xor a
|
xor a
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
|
|
||||||
@ -992,7 +992,7 @@ GetSubstitutePic: ; cc64c
|
|||||||
or b
|
or b
|
||||||
jr nz, .loop
|
jr nz, .loop
|
||||||
|
|
||||||
ld a, [hBattleTurn] ; $ff00+$e4
|
ld a, [hBattleTurn]
|
||||||
and a
|
and a
|
||||||
jr z, .player
|
jr z, .player
|
||||||
|
|
||||||
@ -1037,7 +1037,7 @@ GetSubstitutePic: ; cc64c
|
|||||||
.done
|
.done
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
CopyMonsterSpriteTile: ; cc6c6 (33:46c6)
|
CopyMonsterSpriteTile: ; cc6c6 (33:46c6)
|
||||||
@ -1046,18 +1046,18 @@ CopyMonsterSpriteTile: ; cc6c6 (33:46c6)
|
|||||||
call FarCopyBytes
|
call FarCopyBytes
|
||||||
ret
|
ret
|
||||||
|
|
||||||
BattleAnimCmd_E2: ; cc6cf (33:46cf)
|
BattleAnimCmd_MinimizeOpp: ; cc6cf (33:46cf)
|
||||||
ld a, [rSVBK] ; $ff00+$70
|
ld a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
xor a
|
xor a
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
call GetMinimizePic
|
call GetMinimizePic
|
||||||
call Request2bpp
|
call Request2bpp
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
GetMinimizePic: ; cc6e7 (33:46e7)
|
GetMinimizePic: ; cc6e7 (33:46e7)
|
||||||
@ -1071,7 +1071,7 @@ GetMinimizePic: ; cc6e7 (33:46e7)
|
|||||||
or b
|
or b
|
||||||
jr nz, .loop
|
jr nz, .loop
|
||||||
|
|
||||||
ld a, [hBattleTurn] ; $ff00+$e4
|
ld a, [hBattleTurn]
|
||||||
and a
|
and a
|
||||||
jr z, .player
|
jr z, .player
|
||||||
|
|
||||||
@ -1102,11 +1102,11 @@ MinimizePic: ; cc725
|
|||||||
INCBIN "gfx/battle/minimize.2bpp"
|
INCBIN "gfx/battle/minimize.2bpp"
|
||||||
; cc735
|
; cc735
|
||||||
|
|
||||||
BattleAnimCmd_E9: ; cc735 (33:4735)
|
BattleAnimCmd_Minimize: ; cc735 (33:4735)
|
||||||
ld a, [rSVBK] ; $ff00+$70
|
ld a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
xor a
|
xor a
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
call GetMinimizePic
|
call GetMinimizePic
|
||||||
@ -1114,18 +1114,18 @@ BattleAnimCmd_E9: ; cc735 (33:4735)
|
|||||||
call Request2bpp
|
call Request2bpp
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
BattleAnimCmd_DE: ; cc750 (33:4750)
|
BattleAnimCmd_DropSub: ; cc750 (33:4750)
|
||||||
ld a, [rSVBK] ; $ff00+$70
|
ld a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
|
|
||||||
ld a, [CurPartySpecies] ; CurPartySpecies
|
ld a, [CurPartySpecies] ; CurPartySpecies
|
||||||
push af
|
push af
|
||||||
ld a, [hBattleTurn] ; $ff00+$e4
|
ld a, [hBattleTurn]
|
||||||
and a
|
and a
|
||||||
jr z, .player
|
jr z, .player
|
||||||
|
|
||||||
@ -1139,21 +1139,21 @@ BattleAnimCmd_DE: ; cc750 (33:4750)
|
|||||||
pop af
|
pop af
|
||||||
ld [CurPartySpecies], a ; CurPartySpecies
|
ld [CurPartySpecies], a ; CurPartySpecies
|
||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
BattleAnimCmd_E6: ; cc776 (33:4776)
|
BattleAnimCmd_BeatUp: ; cc776 (33:4776)
|
||||||
ld a, [rSVBK] ; $ff00+$70
|
ld a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
ld a, [CurPartySpecies] ; CurPartySpecies
|
ld a, [CurPartySpecies] ; CurPartySpecies
|
||||||
push af
|
push af
|
||||||
|
|
||||||
ld a, [wKickCounter]
|
ld a, [wKickCounter]
|
||||||
ld [CurPartySpecies], a ; CurPartySpecies
|
ld [CurPartySpecies], a ; CurPartySpecies
|
||||||
|
|
||||||
ld a, [hBattleTurn] ; $ff00+$e4
|
ld a, [hBattleTurn]
|
||||||
and a
|
and a
|
||||||
jr z, .player
|
jr z, .player
|
||||||
|
|
||||||
@ -1175,20 +1175,20 @@ BattleAnimCmd_E6: ; cc776 (33:4776)
|
|||||||
ld b, $1
|
ld b, $1
|
||||||
call GetSGBLayout
|
call GetSGBLayout
|
||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
BattleAnimCmd_E3: ; cc7bb (33:47bb)
|
BattleAnimCmd_OAMOn: ; cc7bb (33:47bb)
|
||||||
xor a
|
xor a
|
||||||
ld [hOAMUpdate], a ; $ff00+$d8
|
ld [hOAMUpdate], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
BattleAnimCmd_E4: ; cc7bf (33:47bf)
|
BattleAnimCmd_OAMOff: ; cc7bf (33:47bf)
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hOAMUpdate], a ; $ff00+$d8
|
ld [hOAMUpdate], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
BattleAnimCmd_F4: ; cc7c4 (33:47c4)
|
BattleAnimCmd_ClearSprites: ; cc7c4 (33:47c4)
|
||||||
ld hl, BattleAnimFlags
|
ld hl, BattleAnimFlags
|
||||||
set 3, [hl]
|
set 3, [hl]
|
||||||
ret
|
ret
|
||||||
@ -1202,7 +1202,7 @@ BattleAnimCmd_F6: ; cc7cb (33:47cb)
|
|||||||
BattleAnimCmd_F7: ; cc7cc (33:47cc)
|
BattleAnimCmd_F7: ; cc7cc (33:47cc)
|
||||||
ret
|
ret
|
||||||
|
|
||||||
BattleAnimCmd_E0: ; cc7cd (33:47cd)
|
BattleAnimCmd_Sound: ; cc7cd (33:47cd)
|
||||||
call GetBattleAnimByte
|
call GetBattleAnimByte
|
||||||
ld e, a
|
ld e, a
|
||||||
srl a
|
srl a
|
||||||
@ -1232,7 +1232,7 @@ Datacc7f8: ; cc7f8
|
|||||||
; cc7fc
|
; cc7fc
|
||||||
|
|
||||||
Functioncc7fc: ; cc7fc (33:47fc)
|
Functioncc7fc: ; cc7fc (33:47fc)
|
||||||
ld a, [hBattleTurn] ; $ff00+$e4
|
ld a, [hBattleTurn]
|
||||||
and a
|
and a
|
||||||
jr nz, .enemy
|
jr nz, .enemy
|
||||||
|
|
||||||
@ -1244,7 +1244,7 @@ Functioncc7fc: ; cc7fc (33:47fc)
|
|||||||
xor 1
|
xor 1
|
||||||
ret
|
ret
|
||||||
|
|
||||||
BattleAnimCmd_E1: ; cc807 (33:4807)
|
BattleAnimCmd_Cry: ; cc807 (33:4807)
|
||||||
call GetBattleAnimByte
|
call GetBattleAnimByte
|
||||||
and 3
|
and 3
|
||||||
ld e, a
|
ld e, a
|
||||||
@ -1254,12 +1254,12 @@ rept 4
|
|||||||
add hl, de
|
add hl, de
|
||||||
endr
|
endr
|
||||||
|
|
||||||
ld a, [rSVBK] ; $ff00+$70
|
ld a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
|
|
||||||
ld a, [hBattleTurn] ; $ff00+$e4
|
ld a, [hBattleTurn]
|
||||||
and a
|
and a
|
||||||
jr nz, .enemy
|
jr nz, .enemy
|
||||||
|
|
||||||
@ -1316,7 +1316,7 @@ endr
|
|||||||
|
|
||||||
.done
|
.done
|
||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
ret
|
ret
|
||||||
; cc871 (33:4871)
|
; cc871 (33:4871)
|
||||||
|
|
||||||
|
@ -946,14 +946,14 @@ endr
|
|||||||
|
|
||||||
Functioncd249: ; cd249 (33:5249)
|
Functioncd249: ; cd249 (33:5249)
|
||||||
ld hl, Unknown_cd26c
|
ld hl, Unknown_cd26c
|
||||||
ld a, [rSVBK] ; $ff00+$70
|
ld a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
ld a, [CurItem] ; CurItem
|
ld a, [CurItem] ; CurItem
|
||||||
ld e, a
|
ld e, a
|
||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
.asm_cd25a
|
.asm_cd25a
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
cp $ff
|
cp $ff
|
||||||
@ -1694,7 +1694,7 @@ Jumptable_cd66d: ; cd66d (33:566d)
|
|||||||
Functioncd677: ; cd677 (33:5677)
|
Functioncd677: ; cd677 (33:5677)
|
||||||
call Functionce72c
|
call Functionce72c
|
||||||
ld a, $42
|
ld a, $42
|
||||||
ld [hLCDStatCustom], a ; $ff00+$c6
|
ld [hLCDStatCustom], a
|
||||||
ld a, $58
|
ld a, $58
|
||||||
ld [hLCDStatCustom + 1], a
|
ld [hLCDStatCustom + 1], a
|
||||||
ld a, $5e
|
ld a, $5e
|
||||||
@ -1753,7 +1753,7 @@ Functioncd6c6: ; cd6c6 (33:56c6)
|
|||||||
cp $70
|
cp $70
|
||||||
jr c, asm_cd6da
|
jr c, asm_cd6da
|
||||||
xor a
|
xor a
|
||||||
ld [hLCDStatCustom], a ; $ff00+$c6
|
ld [hLCDStatCustom], a
|
||||||
ld [hLCDStatCustom + 1], a
|
ld [hLCDStatCustom + 1], a
|
||||||
ld [hLCDStatCustom + 2], a
|
ld [hLCDStatCustom + 2], a
|
||||||
|
|
||||||
@ -2839,7 +2839,7 @@ Jumptable_cdcc6: ; cdcc6 (33:5cc6)
|
|||||||
|
|
||||||
|
|
||||||
Functioncdcca: ; cdcca (33:5cca)
|
Functioncdcca: ; cdcca (33:5cca)
|
||||||
ld a, [hBattleTurn] ; $ff00+$e4
|
ld a, [hBattleTurn]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_cdcd9
|
jr z, .asm_cdcd9
|
||||||
ld hl, $b
|
ld hl, $b
|
||||||
@ -3842,7 +3842,7 @@ Jumptable_ce258: ; ce258 (33:6258)
|
|||||||
|
|
||||||
Functionce260: ; ce260 (33:6260)
|
Functionce260: ; ce260 (33:6260)
|
||||||
call Functionce72c
|
call Functionce72c
|
||||||
ld a, [hBattleTurn] ; $ff00+$e4
|
ld a, [hBattleTurn]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_ce26c
|
jr nz, .asm_ce26c
|
||||||
ld a, $f0
|
ld a, $f0
|
||||||
@ -3893,7 +3893,7 @@ Functionce29f: ; ce29f (33:629f)
|
|||||||
srl a
|
srl a
|
||||||
ld e, a
|
ld e, a
|
||||||
ld d, $0
|
ld d, $0
|
||||||
ld a, [hSGB] ; $ff00+$e7
|
ld a, [hSGB]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_ce2b6
|
jr nz, .asm_ce2b6
|
||||||
ld hl, Unknown_ce2c4
|
ld hl, Unknown_ce2c4
|
||||||
|
@ -303,10 +303,11 @@ BattleAnim_SweetScent2: ; c929c
|
|||||||
; c92c1
|
; c92c1
|
||||||
|
|
||||||
BattleAnim_ThrowPokeBall: ; c92c1
|
BattleAnim_ThrowPokeBall: ; c92c1
|
||||||
anim_jumpif $0, BattleAnim_ThrowPokeBall_branch_c92f2
|
anim_jumpif NO_ITEM, .TheTrainerBlockedTheBall
|
||||||
anim_jumpif $1, BattleAnim_ThrowPokeBall_branch_c9347
|
anim_jumpif MASTER_BALL, .MasterBall
|
||||||
anim_jumpif $2, BattleAnim_ThrowPokeBall_branch_c9305
|
anim_jumpif ULTRA_BALL, .UltraBall
|
||||||
anim_jumpif $4, BattleAnim_ThrowPokeBall_branch_c9326
|
anim_jumpif GREAT_BALL, .GreatBall
|
||||||
|
; any other ball
|
||||||
anim_2gfx ANIM_GFX_POKE_BALL, ANIM_GFX_SMOKE
|
anim_2gfx ANIM_GFX_POKE_BALL, ANIM_GFX_SMOKE
|
||||||
anim_sound $1a, SFX_THROW_BALL
|
anim_sound $1a, SFX_THROW_BALL
|
||||||
anim_obj $15, 68, 92, $40
|
anim_obj $15, 68, 92, $40
|
||||||
@ -317,10 +318,10 @@ BattleAnim_ThrowPokeBall: ; c92c1
|
|||||||
anim_sound $1, SFX_BALL_POOF
|
anim_sound $1, SFX_BALL_POOF
|
||||||
anim_obj $1c, 136, 64, $10
|
anim_obj $1c, 136, 64, $10
|
||||||
anim_wait 16
|
anim_wait 16
|
||||||
anim_jump BattleAnim_ThrowPokeBall_branch_c9392
|
anim_jump .Shake
|
||||||
; c92f2
|
; c92f2
|
||||||
|
|
||||||
BattleAnim_ThrowPokeBall_branch_c92f2: ; c92f2
|
.TheTrainerBlockedTheBall: ; c92f2
|
||||||
anim_2gfx ANIM_GFX_POKE_BALL, ANIM_GFX_HIT
|
anim_2gfx ANIM_GFX_POKE_BALL, ANIM_GFX_HIT
|
||||||
anim_sound $1a, SFX_THROW_BALL
|
anim_sound $1a, SFX_THROW_BALL
|
||||||
anim_obj $16, 64, 92, $20
|
anim_obj $16, 64, 92, $20
|
||||||
@ -330,7 +331,7 @@ BattleAnim_ThrowPokeBall_branch_c92f2: ; c92f2
|
|||||||
anim_ret
|
anim_ret
|
||||||
; c9305
|
; c9305
|
||||||
|
|
||||||
BattleAnim_ThrowPokeBall_branch_c9305: ; c9305
|
.UltraBall: ; c9305
|
||||||
anim_2gfx ANIM_GFX_POKE_BALL, ANIM_GFX_SMOKE
|
anim_2gfx ANIM_GFX_POKE_BALL, ANIM_GFX_SMOKE
|
||||||
anim_sound $1a, SFX_THROW_BALL
|
anim_sound $1a, SFX_THROW_BALL
|
||||||
anim_obj $15, 68, 92, $40
|
anim_obj $15, 68, 92, $40
|
||||||
@ -341,10 +342,10 @@ BattleAnim_ThrowPokeBall_branch_c9305: ; c9305
|
|||||||
anim_sound $1, SFX_BALL_POOF
|
anim_sound $1, SFX_BALL_POOF
|
||||||
anim_obj $1c, 136, 64, $10
|
anim_obj $1c, 136, 64, $10
|
||||||
anim_wait 16
|
anim_wait 16
|
||||||
anim_jump BattleAnim_ThrowPokeBall_branch_c9392
|
anim_jump .Shake
|
||||||
; c9326
|
; c9326
|
||||||
|
|
||||||
BattleAnim_ThrowPokeBall_branch_c9326: ; c9326
|
.GreatBall: ; c9326
|
||||||
anim_2gfx ANIM_GFX_POKE_BALL, ANIM_GFX_SMOKE
|
anim_2gfx ANIM_GFX_POKE_BALL, ANIM_GFX_SMOKE
|
||||||
anim_sound $1a, SFX_THROW_BALL
|
anim_sound $1a, SFX_THROW_BALL
|
||||||
anim_obj $15, 68, 92, $40
|
anim_obj $15, 68, 92, $40
|
||||||
@ -355,10 +356,10 @@ BattleAnim_ThrowPokeBall_branch_c9326: ; c9326
|
|||||||
anim_sound $1, SFX_BALL_POOF
|
anim_sound $1, SFX_BALL_POOF
|
||||||
anim_obj $1c, 136, 64, $10
|
anim_obj $1c, 136, 64, $10
|
||||||
anim_wait 16
|
anim_wait 16
|
||||||
anim_jump BattleAnim_ThrowPokeBall_branch_c9392
|
anim_jump .Shake
|
||||||
; c9347
|
; c9347
|
||||||
|
|
||||||
BattleAnim_ThrowPokeBall_branch_c9347: ; c9347
|
.MasterBall: ; c9347
|
||||||
anim_3gfx ANIM_GFX_POKE_BALL, ANIM_GFX_SMOKE, ANIM_GFX_SPEED
|
anim_3gfx ANIM_GFX_POKE_BALL, ANIM_GFX_SMOKE, ANIM_GFX_SPEED
|
||||||
anim_sound $1a, SFX_THROW_BALL
|
anim_sound $1a, SFX_THROW_BALL
|
||||||
anim_obj $15, 64, 92, $20
|
anim_obj $15, 64, 92, $20
|
||||||
@ -379,7 +380,7 @@ BattleAnim_ThrowPokeBall_branch_c9347: ; c9347
|
|||||||
anim_obj $2b, 136, 56, $36
|
anim_obj $2b, 136, 56, $36
|
||||||
anim_obj $2b, 136, 56, $37
|
anim_obj $2b, 136, 56, $37
|
||||||
anim_wait 64
|
anim_wait 64
|
||||||
BattleAnim_ThrowPokeBall_branch_c9392: ; c9392
|
.Shake: ; c9392
|
||||||
anim_bgeffect ANIM_BG_RETURN_MON, $0, $0, $0
|
anim_bgeffect ANIM_BG_RETURN_MON, $0, $0, $0
|
||||||
anim_wait 8
|
anim_wait 8
|
||||||
anim_incobj $2
|
anim_incobj $2
|
||||||
@ -393,22 +394,22 @@ BattleAnim_ThrowPokeBall_branch_c9392: ; c9392
|
|||||||
anim_wait 32
|
anim_wait 32
|
||||||
anim_wait 8
|
anim_wait 8
|
||||||
anim_setvar $0
|
anim_setvar $0
|
||||||
BattleAnim_ThrowPokeBall_branch_c93aa: ; c93aa
|
.Loop: ; c93aa
|
||||||
anim_wait 48
|
anim_wait 48
|
||||||
anim_checkpokeball
|
anim_checkpokeball
|
||||||
anim_jumpvar $1, BattleAnim_ThrowPokeBall_branch_c93bc
|
anim_jumpvar $1, .Click
|
||||||
anim_jumpvar $2, BattleAnim_ThrowPokeBall_branch_c93be
|
anim_jumpvar $2, .BreakFree
|
||||||
anim_incobj $1
|
anim_incobj $1
|
||||||
anim_sound $1, SFX_BALL_WIGGLE
|
anim_sound $1, SFX_BALL_WIGGLE
|
||||||
anim_jump BattleAnim_ThrowPokeBall_branch_c93aa
|
anim_jump .Loop
|
||||||
; c93bc
|
; c93bc
|
||||||
|
|
||||||
BattleAnim_ThrowPokeBall_branch_c93bc: ; c93bc
|
.Click: ; c93bc
|
||||||
anim_clearsprites
|
anim_clearsprites
|
||||||
anim_ret
|
anim_ret
|
||||||
; c93be
|
; c93be
|
||||||
|
|
||||||
BattleAnim_ThrowPokeBall_branch_c93be: ; c93be
|
.BreakFree: ; c93be
|
||||||
anim_setobj $1, $b
|
anim_setobj $1, $b
|
||||||
anim_sound $1, SFX_BALL_POOF
|
anim_sound $1, SFX_BALL_POOF
|
||||||
anim_obj $1c, 136, 64, $10
|
anim_obj $1c, 136, 64, $10
|
||||||
|
@ -343,14 +343,14 @@ Functionc81c0: ; c81c0 (32:41c0)
|
|||||||
call ClearBox
|
call ClearBox
|
||||||
pop bc
|
pop bc
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapThird], a ; $ff00+$d5
|
ld [hBGMapThird], a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Functionc81e3: ; c81e3 (32:41e3)
|
Functionc81e3: ; c81e3 (32:41e3)
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
call EndBattleBGEffect
|
call EndBattleBGEffect
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -441,13 +441,13 @@ Functionc825a: ; c825a (32:425a)
|
|||||||
.asm_c8271
|
.asm_c8271
|
||||||
call ClearBox
|
call ClearBox
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
pop bc
|
pop bc
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Functionc827a: ; c827a (32:427a)
|
Functionc827a: ; c827a (32:427a)
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
call EndBattleBGEffect
|
call EndBattleBGEffect
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -507,13 +507,13 @@ Functionc82c7: ; c82c7 (32:42c7)
|
|||||||
.asm_c82de
|
.asm_c82de
|
||||||
call ClearBox
|
call ClearBox
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
pop bc
|
pop bc
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Functionc82e7: ; c82e7 (32:42e7)
|
Functionc82e7: ; c82e7 (32:42e7)
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
call EndBattleBGEffect
|
call EndBattleBGEffect
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -595,9 +595,9 @@ Functionc831d: ; c831d (32:431d)
|
|||||||
jr nz, .asm_c8344
|
jr nz, .asm_c8344
|
||||||
.asm_c8355
|
.asm_c8355
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapThird], a ; $ff00+$d5
|
ld [hBGMapThird], a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
call Functionc80e5
|
call Functionc80e5
|
||||||
ld hl, $3
|
ld hl, $3
|
||||||
add hl, bc
|
add hl, bc
|
||||||
@ -606,7 +606,7 @@ Functionc831d: ; c831d (32:431d)
|
|||||||
|
|
||||||
Functionc8365: ; c8365 (32:4365)
|
Functionc8365: ; c8365 (32:4365)
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
ld hl, $3
|
ld hl, $3
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
@ -723,7 +723,7 @@ endr
|
|||||||
.asm_c841d
|
.asm_c841d
|
||||||
call Functionc80e5
|
call Functionc80e5
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
ret
|
ret
|
||||||
.asm_c8425
|
.asm_c8425
|
||||||
call Functionc843b
|
call Functionc843b
|
||||||
@ -731,7 +731,7 @@ endr
|
|||||||
|
|
||||||
Functionc842a: ; c842a (32:442a)
|
Functionc842a: ; c842a (32:442a)
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
ld hl, $1
|
ld hl, $1
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], $0
|
ld [hl], $0
|
||||||
@ -739,7 +739,7 @@ Functionc842a: ; c842a (32:442a)
|
|||||||
|
|
||||||
Functionc8434: ; c8434 (32:4434)
|
Functionc8434: ; c8434 (32:4434)
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
call EndBattleBGEffect
|
call EndBattleBGEffect
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -902,7 +902,7 @@ Functionc854e: ; c854e (32:454e)
|
|||||||
call Functionc8f69
|
call Functionc8f69
|
||||||
|
|
||||||
Functionc8557: ; c8557 (32:4557)
|
Functionc8557: ; c8557 (32:4557)
|
||||||
ld a, [hLCDStatCustom] ; $ff00+$c6
|
ld a, [hLCDStatCustom]
|
||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
push bc
|
push bc
|
||||||
@ -967,7 +967,7 @@ Functionc85a2: ; c85a2 (32:45a2)
|
|||||||
call Functionc80e5
|
call Functionc80e5
|
||||||
call Functionc8eca
|
call Functionc8eca
|
||||||
ld a, $42
|
ld a, $42
|
||||||
ld [hLCDStatCustom], a ; $ff00+$c6
|
ld [hLCDStatCustom], a
|
||||||
xor a
|
xor a
|
||||||
ld [hLCDStatCustom + 1], a
|
ld [hLCDStatCustom + 1], a
|
||||||
ld a, $5e
|
ld a, $5e
|
||||||
@ -1042,7 +1042,7 @@ Functionc8610: ; c8610 (32:4610)
|
|||||||
call Functionc80e5
|
call Functionc80e5
|
||||||
call Functionc8eca
|
call Functionc8eca
|
||||||
ld a, $43
|
ld a, $43
|
||||||
ld [hLCDStatCustom], a ; $ff00+$c6
|
ld [hLCDStatCustom], a
|
||||||
xor a
|
xor a
|
||||||
ld [hLCDStatCustom + 1], a
|
ld [hLCDStatCustom + 1], a
|
||||||
ld a, $5f
|
ld a, $5f
|
||||||
@ -1530,7 +1530,7 @@ Functionc88a5: ; c88a5 (32:48a5)
|
|||||||
sub d
|
sub d
|
||||||
ld d, a
|
ld d, a
|
||||||
ld h, LYOverridesBackup / $100
|
ld h, LYOverridesBackup / $100
|
||||||
ld a, [hSCY] ; $ff00+$d0
|
ld a, [hSCY]
|
||||||
or a
|
or a
|
||||||
jr nz, .asm_c88d0
|
jr nz, .asm_c88d0
|
||||||
ld a, [hLCDStatCustom + 1]
|
ld a, [hLCDStatCustom + 1]
|
||||||
@ -1546,7 +1546,7 @@ Functionc88a5: ; c88a5 (32:48a5)
|
|||||||
ld l, a
|
ld l, a
|
||||||
ld [hl], $0
|
ld [hl], $0
|
||||||
.asm_c88d6
|
.asm_c88d6
|
||||||
ld a, [hSCY] ; $ff00+$d0
|
ld a, [hSCY]
|
||||||
ld l, a
|
ld l, a
|
||||||
ld a, [hLCDStatCustom + 1]
|
ld a, [hLCDStatCustom + 1]
|
||||||
sub l
|
sub l
|
||||||
@ -1953,7 +1953,7 @@ Functionc8ae5: ; c8ae5 (32:4ae5)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
Functionc8b00: ; c8b00 (32:4b00)
|
Functionc8b00: ; c8b00 (32:4b00)
|
||||||
ld a, [hCGB] ; $ff00+$e6
|
ld a, [hCGB]
|
||||||
and a
|
and a
|
||||||
jr nz, asm_c8b7a
|
jr nz, asm_c8b7a
|
||||||
call Functionc80d7 ; ; ; call does not return
|
call Functionc80d7 ; ; ; call does not return
|
||||||
@ -1969,7 +1969,7 @@ Functionc8b0e: ; c8b0e (32:4b0e)
|
|||||||
ld a, $e4
|
ld a, $e4
|
||||||
call Functionc8ecb
|
call Functionc8ecb
|
||||||
ld a, $47
|
ld a, $47
|
||||||
ld [hLCDStatCustom], a ; $ff00+$c6
|
ld [hLCDStatCustom], a
|
||||||
xor a
|
xor a
|
||||||
ld [hLCDStatCustom + 1], a
|
ld [hLCDStatCustom + 1], a
|
||||||
ld a, $60
|
ld a, $60
|
||||||
@ -2266,7 +2266,7 @@ Functionc8cab: ; c8cab (32:4cab)
|
|||||||
call Functionc80e5
|
call Functionc80e5
|
||||||
call Functionc8eca
|
call Functionc8eca
|
||||||
ld a, $43
|
ld a, $43
|
||||||
ld [hLCDStatCustom], a ; $ff00+$c6
|
ld [hLCDStatCustom], a
|
||||||
xor a
|
xor a
|
||||||
ld [hLCDStatCustom + 1], a
|
ld [hLCDStatCustom + 1], a
|
||||||
ld a, $37
|
ld a, $37
|
||||||
@ -2307,7 +2307,7 @@ Functionc8ce1: ; c8ce1 (32:4ce1)
|
|||||||
push af
|
push af
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
pop af
|
pop af
|
||||||
ld [hSCY], a ; $ff00+$d0
|
ld [hSCY], a
|
||||||
xor $ff
|
xor $ff
|
||||||
inc a
|
inc a
|
||||||
ld [OTPartyMon3SpclAtk], a
|
ld [OTPartyMon3SpclAtk], a
|
||||||
@ -2318,7 +2318,7 @@ Functionc8cf9: ; c8cf9 (32:4cf9)
|
|||||||
jr nc, .asm_c8cff
|
jr nc, .asm_c8cff
|
||||||
xor a
|
xor a
|
||||||
.asm_c8cff
|
.asm_c8cff
|
||||||
ld [hSCX], a ; $ff00+$cf
|
ld [hSCX], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Functionc8d02: ; c8d02 (32:4d02)
|
Functionc8d02: ; c8d02 (32:4d02)
|
||||||
@ -2326,7 +2326,7 @@ Functionc8d02: ; c8d02 (32:4d02)
|
|||||||
jr nc, .asm_c8d08
|
jr nc, .asm_c8d08
|
||||||
xor a
|
xor a
|
||||||
.asm_c8d08
|
.asm_c8d08
|
||||||
ld [hSCY], a ; $ff00+$d0
|
ld [hSCY], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Functionc8d0b: ; c8d0b (32:4d0b)
|
Functionc8d0b: ; c8d0b (32:4d0b)
|
||||||
@ -2373,7 +2373,7 @@ Functionc8d3a: ; c8d3a (32:4d3a)
|
|||||||
jr nc, .asm_c8d53
|
jr nc, .asm_c8d53
|
||||||
ld d, $6
|
ld d, $6
|
||||||
call Functionc905d
|
call Functionc905d
|
||||||
ld [hSCX], a ; $ff00+$cf
|
ld [hSCX], a
|
||||||
ld hl, $3
|
ld hl, $3
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
@ -2382,7 +2382,7 @@ Functionc8d3a: ; c8d3a (32:4d3a)
|
|||||||
ret
|
ret
|
||||||
.asm_c8d53
|
.asm_c8d53
|
||||||
xor a
|
xor a
|
||||||
ld [hSCX], a ; $ff00+$cf
|
ld [hSCX], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Functionc8d57: ; c8d57 (32:4d57)
|
Functionc8d57: ; c8d57 (32:4d57)
|
||||||
@ -2410,7 +2410,7 @@ Functionc8d57: ; c8d57 (32:4d57)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
Functionc8d77: ; c8d77 (32:4d77)
|
Functionc8d77: ; c8d77 (32:4d77)
|
||||||
ld a, [hCGB] ; $ff00+$e6
|
ld a, [hCGB]
|
||||||
and a
|
and a
|
||||||
jr nz, asm_c8dd4
|
jr nz, asm_c8dd4
|
||||||
push de
|
push de
|
||||||
@ -2469,7 +2469,7 @@ Functionc8daa: ; c8daa (32:4daa)
|
|||||||
Functionc8dc9: ; c8dc9 (32:4dc9)
|
Functionc8dc9: ; c8dc9 (32:4dc9)
|
||||||
call Functionc8f19
|
call Functionc8f19
|
||||||
ld a, $e4
|
ld a, $e4
|
||||||
ld [rBGP], a ; $ff00+$47
|
ld [rBGP], a
|
||||||
call EndBattleBGEffect
|
call EndBattleBGEffect
|
||||||
ret
|
ret
|
||||||
asm_c8dd4: ; c8dd4 (32:4dd4)
|
asm_c8dd4: ; c8dd4 (32:4dd4)
|
||||||
@ -2563,10 +2563,10 @@ Functionc8e49: ; c8e49 (32:4e49)
|
|||||||
|
|
||||||
Functionc8e52: ; c8e52 (32:4e52)
|
Functionc8e52: ; c8e52 (32:4e52)
|
||||||
ld h, a
|
ld h, a
|
||||||
ld a, [rSVBK] ; $ff00+$70
|
ld a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
ld a, $5
|
ld a, $5
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
ld a, h
|
ld a, h
|
||||||
push bc
|
push bc
|
||||||
push af
|
push af
|
||||||
@ -2583,17 +2583,17 @@ Functionc8e52: ; c8e52 (32:4e52)
|
|||||||
call CopyPals
|
call CopyPals
|
||||||
pop bc
|
pop bc
|
||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hCGBPalUpdate], a ; $ff00+$e5
|
ld [hCGBPalUpdate], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Functionc8e7f: ; c8e7f (32:4e7f)
|
Functionc8e7f: ; c8e7f (32:4e7f)
|
||||||
ld h, a
|
ld h, a
|
||||||
ld a, [rSVBK] ; $ff00+$70
|
ld a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
ld a, $5
|
ld a, $5
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
ld a, h
|
ld a, h
|
||||||
push bc
|
push bc
|
||||||
push af
|
push af
|
||||||
@ -2610,9 +2610,9 @@ Functionc8e7f: ; c8e7f (32:4e7f)
|
|||||||
call CopyPals
|
call CopyPals
|
||||||
pop bc
|
pop bc
|
||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hCGBPalUpdate], a ; $ff00+$e5
|
ld [hCGBPalUpdate], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Functionc8eac: ; c8eac (32:4eac)
|
Functionc8eac: ; c8eac (32:4eac)
|
||||||
@ -2660,7 +2660,7 @@ Functionc8ecb: ; c8ecb (32:4ecb)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
Functionc8ede: ; c8ede (32:4ede)
|
Functionc8ede: ; c8ede (32:4ede)
|
||||||
ld [hLCDStatCustom], a ; $ff00+$c6
|
ld [hLCDStatCustom], a
|
||||||
call Functionc9038
|
call Functionc9038
|
||||||
jr nz, .asm_c8eea
|
jr nz, .asm_c8eea
|
||||||
ld de, $36
|
ld de, $36
|
||||||
@ -2675,7 +2675,7 @@ Functionc8ede: ; c8ede (32:4ede)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
Functionc8ef4: ; c8ef4 (32:4ef4)
|
Functionc8ef4: ; c8ef4 (32:4ef4)
|
||||||
ld [hLCDStatCustom], a ; $ff00+$c6
|
ld [hLCDStatCustom], a
|
||||||
call Functionc9038
|
call Functionc9038
|
||||||
jr nz, .asm_c8f00
|
jr nz, .asm_c8f00
|
||||||
ld de, $36
|
ld de, $36
|
||||||
@ -2695,15 +2695,15 @@ Functionc8f0a: ; c8f0a (32:4f0a)
|
|||||||
ld [hLCDStatCustom + 2], a
|
ld [hLCDStatCustom + 2], a
|
||||||
call Functionc8eca
|
call Functionc8eca
|
||||||
xor a
|
xor a
|
||||||
ld [hLCDStatCustom], a ; $ff00+$c6
|
ld [hLCDStatCustom], a
|
||||||
call EndBattleBGEffect
|
call EndBattleBGEffect
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Functionc8f19: ; c8f19 (32:4f19)
|
Functionc8f19: ; c8f19 (32:4f19)
|
||||||
xor a
|
xor a
|
||||||
ld [hLCDStatCustom], a ; $ff00+$c6
|
ld [hLCDStatCustom], a
|
||||||
ld a, $e4
|
ld a, $e4
|
||||||
ld [rBGP], a ; $ff00+$47
|
ld [rBGP], a
|
||||||
ld [wcfc7], a
|
ld [wcfc7], a
|
||||||
ld [wcfc9], a
|
ld [wcfc9], a
|
||||||
ld [hLCDStatCustom + 1], a
|
ld [hLCDStatCustom + 1], a
|
||||||
@ -2902,7 +2902,7 @@ Functionc901b: ; c901b (32:501b)
|
|||||||
Functionc9038: ; c9038 (32:5038)
|
Functionc9038: ; c9038 (32:5038)
|
||||||
ld hl, $2
|
ld hl, $2
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hBattleTurn] ; $ff00+$e4
|
ld a, [hBattleTurn]
|
||||||
and $1
|
and $1
|
||||||
xor [hl]
|
xor [hl]
|
||||||
ret
|
ret
|
||||||
@ -2910,7 +2910,7 @@ Functionc9038: ; c9038 (32:5038)
|
|||||||
Functionc9042: ; c9042 (32:5042)
|
Functionc9042: ; c9042 (32:5042)
|
||||||
ld hl, $2
|
ld hl, $2
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hBattleTurn] ; $ff00+$e4
|
ld a, [hBattleTurn]
|
||||||
and $1
|
and $1
|
||||||
xor [hl]
|
xor [hl]
|
||||||
jr nz, .asm_c9053
|
jr nz, .asm_c9053
|
||||||
@ -2923,7 +2923,7 @@ Functionc9042: ; c9042 (32:5042)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
Functionc9059: ; c9059 (32:5059)
|
Functionc9059: ; c9059 (32:5059)
|
||||||
ld a, [hSGB] ; $ff00+$e7
|
ld a, [hSGB]
|
||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
221
battle/core.asm
221
battle/core.asm
@ -174,8 +174,8 @@ Function3c12f: ; 3c12f
|
|||||||
ld [wPlayerIsSwitching], a
|
ld [wPlayerIsSwitching], a
|
||||||
ld [wEnemyIsSwitching], a
|
ld [wEnemyIsSwitching], a
|
||||||
ld [wd264], a
|
ld [wd264], a
|
||||||
ld [wc73f], a
|
ld [wPlayerJustGotFrozen], a
|
||||||
ld [wc740], a
|
ld [wEnemyJustGotFrozen], a
|
||||||
ld [CurDamage], a
|
ld [CurDamage], a
|
||||||
ld [CurDamage + 1], a
|
ld [CurDamage + 1], a
|
||||||
|
|
||||||
@ -1604,19 +1604,21 @@ HandleFutureSight: ; 3ca26
|
|||||||
HanleDefrost: ; 3ca8f
|
HanleDefrost: ; 3ca8f
|
||||||
ld a, [hLinkPlayerNumber]
|
ld a, [hLinkPlayerNumber]
|
||||||
cp $1
|
cp $1
|
||||||
jr z, .asm_3ca9a
|
jr z, .enemy_first
|
||||||
call .asm_3ca9d
|
call .do_player_turn
|
||||||
jr .asm_3cac9
|
jr .do_enemy_turn
|
||||||
|
|
||||||
.asm_3ca9a
|
.enemy_first
|
||||||
call .asm_3cac9
|
call .do_enemy_turn
|
||||||
.asm_3ca9d
|
.do_player_turn
|
||||||
ld a, [BattleMonStatus]
|
ld a, [BattleMonStatus]
|
||||||
bit FRZ, a
|
bit FRZ, a
|
||||||
ret z
|
ret z
|
||||||
ld a, [wc73f]
|
|
||||||
|
ld a, [wPlayerJustGotFrozen]
|
||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
call BattleRandom
|
call BattleRandom
|
||||||
cp 10 percent
|
cp 10 percent
|
||||||
ret nc
|
ret nc
|
||||||
@ -1631,11 +1633,11 @@ HanleDefrost: ; 3ca8f
|
|||||||
ld hl, DefrostedOpponentText
|
ld hl, DefrostedOpponentText
|
||||||
jp StdBattleTextBox
|
jp StdBattleTextBox
|
||||||
|
|
||||||
.asm_3cac9
|
.do_enemy_turn
|
||||||
ld a, [EnemyMonStatus]
|
ld a, [EnemyMonStatus]
|
||||||
bit FRZ, a
|
bit FRZ, a
|
||||||
ret z
|
ret z
|
||||||
ld a, [wc740]
|
ld a, [wEnemyJustGotFrozen]
|
||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
call BattleRandom
|
call BattleRandom
|
||||||
@ -3654,9 +3656,9 @@ LoadEnemyPkmnToSwitchTo: ; 3d6ca
|
|||||||
|
|
||||||
ld hl, EnemyMonHP
|
ld hl, EnemyMonHP
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [wc6ea], a
|
ld [wEnemyHPAtTimeOfPlayerSwitch], a
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wc6eb], a
|
ld [wEnemyHPAtTimeOfPlayerSwitch + 1], a
|
||||||
ret
|
ret
|
||||||
; 3d714
|
; 3d714
|
||||||
|
|
||||||
@ -3814,7 +3816,7 @@ endr
|
|||||||
ld [EnemyProtectCount], a
|
ld [EnemyProtectCount], a
|
||||||
ld [wEnemyRageCounter], a
|
ld [wEnemyRageCounter], a
|
||||||
ld [EnemyDisabledMove], a
|
ld [EnemyDisabledMove], a
|
||||||
ld [wc6fa], a
|
ld [wEnemyMinimized], a
|
||||||
ld [wPlayerWrapCount], a
|
ld [wPlayerWrapCount], a
|
||||||
ld [wEnemyWrapCount], a
|
ld [wEnemyWrapCount], a
|
||||||
ld [EnemyTurnsTaken], a
|
ld [EnemyTurnsTaken], a
|
||||||
@ -4317,7 +4319,7 @@ endr
|
|||||||
ld [PlayerProtectCount], a
|
ld [PlayerProtectCount], a
|
||||||
ld [wPlayerRageCounter], a
|
ld [wPlayerRageCounter], a
|
||||||
ld [DisabledMove], a
|
ld [DisabledMove], a
|
||||||
ld [wc6fe], a
|
ld [wPlayerMinimized], a
|
||||||
ld [wEnemyWrapCount], a
|
ld [wEnemyWrapCount], a
|
||||||
ld [wPlayerWrapCount], a
|
ld [wPlayerWrapCount], a
|
||||||
ld [PlayerTurnsTaken], a
|
ld [PlayerTurnsTaken], a
|
||||||
@ -5166,9 +5168,9 @@ BattleMenu: ; 3e139
|
|||||||
; Auto input: choose "ITEM"
|
; Auto input: choose "ITEM"
|
||||||
ld a, [InputType]
|
ld a, [InputType]
|
||||||
or a
|
or a
|
||||||
jr z, .asm_3e171
|
jr z, .skip_dude_pack_select
|
||||||
callba _DudeAutoInput_DownA
|
callba _DudeAutoInput_DownA
|
||||||
.asm_3e171
|
.skip_dude_pack_select
|
||||||
|
|
||||||
call LoadBattleMenu2
|
call LoadBattleMenu2
|
||||||
ret c
|
ret c
|
||||||
@ -5242,26 +5244,26 @@ BattleMenu_Pack: ; 3e1c7
|
|||||||
callba BattlePack
|
callba BattlePack
|
||||||
ld a, [wd0ec]
|
ld a, [wd0ec]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_3e20d
|
jr z, .didnt_use_item
|
||||||
jr .asm_3e209
|
jr .got_item
|
||||||
|
|
||||||
.tutorial
|
.tutorial
|
||||||
callba Function107bb
|
callba Function107bb
|
||||||
ld a, POKE_BALL
|
ld a, POKE_BALL
|
||||||
ld [CurItem], a
|
ld [CurItem], a
|
||||||
call DoItemEffect
|
call DoItemEffect
|
||||||
jr .asm_3e209
|
jr .got_item
|
||||||
|
|
||||||
.contest
|
.contest
|
||||||
ld a, PARK_BALL
|
ld a, PARK_BALL
|
||||||
ld [CurItem], a
|
ld [CurItem], a
|
||||||
call DoItemEffect
|
call DoItemEffect
|
||||||
|
|
||||||
.asm_3e209
|
.got_item
|
||||||
call Function3e234
|
call Function3e234
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_3e20d
|
.didnt_use_item
|
||||||
call ClearPalettes
|
call ClearPalettes
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
call Function3ed9f
|
call Function3ed9f
|
||||||
@ -7862,7 +7864,7 @@ Function3f136: ; 3f136
|
|||||||
ld e, a
|
ld e, a
|
||||||
push de
|
push de
|
||||||
ld de, TempMonExp + 2
|
ld de, TempMonExp + 2
|
||||||
call Function3f39c
|
call CalcExpBar
|
||||||
push bc
|
push bc
|
||||||
ld hl, TempMonExp + 2
|
ld hl, TempMonExp + 2
|
||||||
ld a, [wd004]
|
ld a, [wd004]
|
||||||
@ -7950,7 +7952,7 @@ endr
|
|||||||
push bc
|
push bc
|
||||||
ld b, d
|
ld b, d
|
||||||
ld de, TempMonExp + 2
|
ld de, TempMonExp + 2
|
||||||
call Function3f39c
|
call CalcExpBar
|
||||||
ld a, b
|
ld a, b
|
||||||
pop bc
|
pop bc
|
||||||
ld c, a
|
ld c, a
|
||||||
@ -7986,7 +7988,7 @@ Function3f22c: ; 3f22c
|
|||||||
push bc
|
push bc
|
||||||
push de
|
push de
|
||||||
hlcoord 17, 11
|
hlcoord 17, 11
|
||||||
call Function3f41c
|
call PlaceExpBar
|
||||||
pop de
|
pop de
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
@ -8002,7 +8004,7 @@ Function3f22c: ; 3f22c
|
|||||||
push bc
|
push bc
|
||||||
push de
|
push de
|
||||||
hlcoord 17, 11
|
hlcoord 17, 11
|
||||||
call Function3f41c
|
call PlaceExpBar
|
||||||
pop de
|
pop de
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
@ -8030,32 +8032,33 @@ Function3f22c: ; 3f22c
|
|||||||
SendOutPkmnText: ; 3f26d
|
SendOutPkmnText: ; 3f26d
|
||||||
ld a, [wLinkMode]
|
ld a, [wLinkMode]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_3f27c
|
jr z, .not_linked
|
||||||
|
|
||||||
ld hl, JumpText_GoPkmn ; If we're in a LinkBattle print just "Go <PlayerMon>"
|
ld hl, JumpText_GoPkmn ; If we're in a LinkBattle print just "Go <PlayerMon>"
|
||||||
|
|
||||||
ld a, [wd264] ; besides this variable is set. which stands for ???
|
ld a, [wd264] ; unless this (unidentified) variable is set
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_3f2ce
|
jr nz, .skip_to_textbox
|
||||||
|
|
||||||
.asm_3f27c
|
.not_linked
|
||||||
; Depending on the HP of the enemy Pkmn, the game prints a different text
|
; Depending on the HP of the enemy Pkmn, the game prints a different text
|
||||||
ld hl, EnemyMonHP
|
ld hl, EnemyMonHP
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
or [hl]
|
or [hl]
|
||||||
ld hl, JumpText_GoPkmn
|
ld hl, JumpText_GoPkmn
|
||||||
jr z, .asm_3f2ce
|
jr z, .skip_to_textbox
|
||||||
|
|
||||||
|
; compute enemy helth remaining as a percentage
|
||||||
xor a
|
xor a
|
||||||
ld [hMultiplicand + 0], a
|
ld [hMultiplicand + 0], a
|
||||||
ld hl, EnemyMonHP
|
ld hl, EnemyMonHP
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [wc6ea], a
|
ld [wEnemyHPAtTimeOfPlayerSwitch], a
|
||||||
ld [hMultiplicand + 1], a
|
ld [hMultiplicand + 1], a
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wc6eb], a
|
ld [wEnemyHPAtTimeOfPlayerSwitch + 1], a
|
||||||
ld [hMultiplicand + 2], a
|
ld [hMultiplicand + 2], a
|
||||||
ld a, $19
|
ld a, 25
|
||||||
ld [hMultiplier], a
|
ld [hMultiplier], a
|
||||||
call Multiply
|
call Multiply
|
||||||
ld hl, EnemyMonMaxHP
|
ld hl, EnemyMonMaxHP
|
||||||
@ -8066,22 +8069,25 @@ SendOutPkmnText: ; 3f26d
|
|||||||
srl a
|
srl a
|
||||||
rr b
|
rr b
|
||||||
ld a, b
|
ld a, b
|
||||||
ld b, $4
|
ld b, 4
|
||||||
ld [hDivisor], a
|
ld [hDivisor], a
|
||||||
call Divide
|
call Divide
|
||||||
|
|
||||||
ld a, [hQuotient + 2]
|
ld a, [hQuotient + 2]
|
||||||
ld hl, JumpText_GoPkmn
|
ld hl, JumpText_GoPkmn
|
||||||
cp $46
|
cp 70
|
||||||
jr nc, .asm_3f2ce
|
jr nc, .skip_to_textbox
|
||||||
ld hl, JumpText_DoItPkmn
|
|
||||||
cp $28
|
|
||||||
jr nc, .asm_3f2ce
|
|
||||||
ld hl, JumpText_GoForItPkmn
|
|
||||||
cp $a
|
|
||||||
jr nc, .asm_3f2ce
|
|
||||||
ld hl, JumpText_YourFoesWeakGetmPkmn
|
|
||||||
|
|
||||||
.asm_3f2ce
|
ld hl, JumpText_DoItPkmn
|
||||||
|
cp 40
|
||||||
|
jr nc, .skip_to_textbox
|
||||||
|
|
||||||
|
ld hl, JumpText_GoForItPkmn
|
||||||
|
cp 10
|
||||||
|
jr nc, .skip_to_textbox
|
||||||
|
|
||||||
|
ld hl, JumpText_YourFoesWeakGetmPkmn
|
||||||
|
.skip_to_textbox
|
||||||
jp BattleTextBox
|
jp BattleTextBox
|
||||||
; 3f2d1
|
; 3f2d1
|
||||||
|
|
||||||
@ -8130,13 +8136,13 @@ TextJump_BattleMonNickComma: ; 3f2fa
|
|||||||
start_asm
|
start_asm
|
||||||
; 3f2ff
|
; 3f2ff
|
||||||
|
|
||||||
Function3f2ff: ; 3f2ff
|
WithdrawPkmnText: ; 3f2ff
|
||||||
; Print text to withdraw Pkmn
|
; Print text to withdraw Pkmn
|
||||||
; depending on HP the message is different
|
; depending on HP the message is different
|
||||||
push de
|
push de
|
||||||
push bc
|
push bc
|
||||||
ld hl, EnemyMonHP + 1
|
ld hl, EnemyMonHP + 1
|
||||||
ld de, wc6eb
|
ld de, wEnemyHPAtTimeOfPlayerSwitch + 1
|
||||||
ld b, [hl]
|
ld b, [hl]
|
||||||
dec hl
|
dec hl
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
@ -8147,7 +8153,7 @@ Function3f2ff: ; 3f2ff
|
|||||||
ld a, [de]
|
ld a, [de]
|
||||||
sbc b
|
sbc b
|
||||||
ld [hMultiplicand + 1], a
|
ld [hMultiplicand + 1], a
|
||||||
ld a, $19
|
ld a, 25
|
||||||
ld [hMultiplier], a
|
ld [hMultiplier], a
|
||||||
call Multiply
|
call Multiply
|
||||||
ld hl, EnemyMonMaxHP
|
ld hl, EnemyMonMaxHP
|
||||||
@ -8158,7 +8164,7 @@ Function3f2ff: ; 3f2ff
|
|||||||
srl a
|
srl a
|
||||||
rr b
|
rr b
|
||||||
ld a, b
|
ld a, b
|
||||||
ld b, $4
|
ld b, 4
|
||||||
ld [hDivisor], a
|
ld [hDivisor], a
|
||||||
call Divide
|
call Divide
|
||||||
pop bc
|
pop bc
|
||||||
@ -8169,11 +8175,11 @@ Function3f2ff: ; 3f2ff
|
|||||||
ret z
|
ret z
|
||||||
|
|
||||||
ld hl, TextJump_ComeBack
|
ld hl, TextJump_ComeBack
|
||||||
cp $1e
|
cp 30
|
||||||
ret c
|
ret c
|
||||||
|
|
||||||
ld hl, TextJump_OKComeBack
|
ld hl, TextJump_OKComeBack
|
||||||
cp $46
|
cp 70
|
||||||
ret c
|
ret c
|
||||||
|
|
||||||
ld hl, TextJump_GoodComeBack
|
ld hl, TextJump_GoodComeBack
|
||||||
@ -8207,23 +8213,23 @@ TextJump_ComeBack: ; 3f35b
|
|||||||
; 3f360
|
; 3f360
|
||||||
|
|
||||||
|
|
||||||
Function3f360: ; 3f360
|
HandleSafariAngerEatingStatus: ; unreferenced
|
||||||
ld hl, wc6f0
|
ld hl, wSafariMonEating
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_3f36d
|
jr z, .angry
|
||||||
dec [hl]
|
dec [hl]
|
||||||
ld hl, BattleText_WildPkmnIsEating
|
ld hl, BattleText_WildPkmnIsEating
|
||||||
jr .asm_3f388
|
jr .finish
|
||||||
|
|
||||||
.asm_3f36d
|
.angry
|
||||||
dec hl
|
dec hl ; wSafariMonAngerCount
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
dec [hl]
|
dec [hl]
|
||||||
ld hl, BattleText_WildPkmnIsAngry
|
ld hl, BattleText_WildPkmnIsAngry
|
||||||
jr nz, .asm_3f388
|
jr nz, .finish
|
||||||
push hl
|
push hl
|
||||||
ld a, [EnemyMonSpecies]
|
ld a, [EnemyMonSpecies]
|
||||||
ld [CurSpecies], a
|
ld [CurSpecies], a
|
||||||
@ -8232,7 +8238,7 @@ Function3f360: ; 3f360
|
|||||||
ld [EnemyMonCatchRate], a
|
ld [EnemyMonCatchRate], a
|
||||||
pop hl
|
pop hl
|
||||||
|
|
||||||
.asm_3f388
|
.finish
|
||||||
push hl
|
push hl
|
||||||
call Call_LoadTempTileMapToTileMap
|
call Call_LoadTempTileMapToTileMap
|
||||||
pop hl
|
pop hl
|
||||||
@ -8242,19 +8248,22 @@ Function3f360: ; 3f360
|
|||||||
|
|
||||||
FillInExpBar: ; 3f390
|
FillInExpBar: ; 3f390
|
||||||
push hl
|
push hl
|
||||||
call Function3f39c
|
call CalcExpBar
|
||||||
pop hl
|
pop hl
|
||||||
ld de, $0007
|
ld de, 7
|
||||||
add hl, de
|
add hl, de
|
||||||
jp Function3f41c
|
jp PlaceExpBar
|
||||||
; 3f39c
|
; 3f39c
|
||||||
|
|
||||||
Function3f39c: ; 3f39c
|
CalcExpBar: ; 3f39c
|
||||||
|
; Calculate the percent exp between this level and the next
|
||||||
|
; Level in b
|
||||||
push de
|
push de
|
||||||
ld d, b
|
ld d, b
|
||||||
push de
|
push de
|
||||||
callab CalcExpAtLevel
|
callab CalcExpAtLevel
|
||||||
pop de
|
pop de
|
||||||
|
; exp at current level gets pushed to the stack
|
||||||
ld hl, hMultiplicand
|
ld hl, hMultiplicand
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
push af
|
push af
|
||||||
@ -8262,16 +8271,18 @@ Function3f39c: ; 3f39c
|
|||||||
push af
|
push af
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
push af
|
push af
|
||||||
|
; next level
|
||||||
inc d
|
inc d
|
||||||
callab CalcExpAtLevel
|
callab CalcExpAtLevel
|
||||||
ld hl, hProduct + 3
|
; back up the next level exp, and subtract the two levels
|
||||||
|
ld hl, hMultiplicand + 2
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [hPrintNum8], a
|
ld [hMathBuffer + 2], a
|
||||||
pop bc
|
pop bc
|
||||||
sub b
|
sub b
|
||||||
ld [hld], a
|
ld [hld], a
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [hPrintNum7], a
|
ld [hMathBuffer + 1], a
|
||||||
pop bc
|
pop bc
|
||||||
sbc b
|
sbc b
|
||||||
ld [hld], a
|
ld [hld], a
|
||||||
@ -8281,21 +8292,24 @@ Function3f39c: ; 3f39c
|
|||||||
sbc b
|
sbc b
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
pop de
|
pop de
|
||||||
ld hl, hProduct + 2
|
|
||||||
|
ld hl, hMultiplicand + 1
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
push af
|
push af
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
push af
|
push af
|
||||||
|
|
||||||
|
; get the amount of exp remaining to the next level
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
dec de
|
dec de
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, [hPrintNum8]
|
ld a, [hMathBuffer + 2]
|
||||||
sub c
|
sub c
|
||||||
ld [hld], a
|
ld [hld], a
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
dec de
|
dec de
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [hPrintNum7]
|
ld a, [hMathBuffer + 1]
|
||||||
sbc b
|
sbc b
|
||||||
ld [hld], a
|
ld [hld], a
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
@ -8305,6 +8319,7 @@ Function3f39c: ; 3f39c
|
|||||||
ld [hld], a
|
ld [hld], a
|
||||||
xor a
|
xor a
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
|
; multiply by 64
|
||||||
ld a, $40
|
ld a, $40
|
||||||
ld [hMultiplier], a
|
ld [hMultiplier], a
|
||||||
call Multiply
|
call Multiply
|
||||||
@ -8312,10 +8327,10 @@ Function3f39c: ; 3f39c
|
|||||||
ld c, a
|
ld c, a
|
||||||
pop af
|
pop af
|
||||||
ld b, a
|
ld b, a
|
||||||
.asm_3f3f4
|
.loop
|
||||||
ld a, b
|
ld a, b
|
||||||
and a
|
and a
|
||||||
jr z, .asm_3f40c
|
jr z, .done
|
||||||
srl b
|
srl b
|
||||||
rr c
|
rr c
|
||||||
ld hl, hProduct
|
ld hl, hProduct
|
||||||
@ -8326,12 +8341,12 @@ Function3f39c: ; 3f39c
|
|||||||
rr [hl]
|
rr [hl]
|
||||||
inc hl
|
inc hl
|
||||||
rr [hl]
|
rr [hl]
|
||||||
jr .asm_3f3f4
|
jr .loop
|
||||||
|
|
||||||
.asm_3f40c
|
.done
|
||||||
ld a, c
|
ld a, c
|
||||||
ld [hDivisor], a
|
ld [hDivisor], a
|
||||||
ld b, $4
|
ld b, 4
|
||||||
call Divide
|
call Divide
|
||||||
ld a, [hQuotient + 2]
|
ld a, [hQuotient + 2]
|
||||||
ld b, a
|
ld b, a
|
||||||
@ -8341,49 +8356,49 @@ Function3f39c: ; 3f39c
|
|||||||
ret
|
ret
|
||||||
; 3f41c
|
; 3f41c
|
||||||
|
|
||||||
Function3f41c: ; 3f41c
|
PlaceExpBar: ; 3f41c
|
||||||
ld c, $8
|
ld c, $8 ; number of tiles
|
||||||
.asm_3f41e
|
.loop1
|
||||||
ld a, b
|
ld a, b
|
||||||
sub $8
|
sub $8
|
||||||
jr c, .asm_3f42c
|
jr c, .next
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, $6a
|
ld a, $6a ; full bar
|
||||||
ld [hld], a
|
ld [hld], a
|
||||||
dec c
|
dec c
|
||||||
jr z, .asm_3f43c
|
jr z, .finish
|
||||||
jr .asm_3f41e
|
jr .loop1
|
||||||
|
|
||||||
.asm_3f42c
|
.next
|
||||||
add $8
|
add $8
|
||||||
jr z, .asm_3f434
|
jr z, .loop2
|
||||||
add $54
|
add $54 ; tile to the left of small exp bar tile
|
||||||
jr .asm_3f436
|
jr .skip
|
||||||
|
|
||||||
.asm_3f434
|
.loop2
|
||||||
ld a, $62
|
ld a, $62 ; empty bar
|
||||||
|
|
||||||
.asm_3f436
|
.skip
|
||||||
ld [hld], a
|
ld [hld], a
|
||||||
ld a, $62
|
ld a, $62 ; empty bar
|
||||||
dec c
|
dec c
|
||||||
jr nz, .asm_3f434
|
jr nz, .loop2
|
||||||
|
|
||||||
.asm_3f43c
|
.finish
|
||||||
ret
|
ret
|
||||||
; 3f43d
|
; 3f43d
|
||||||
|
|
||||||
GetMonBackpic: ; 3f43d
|
GetMonBackpic: ; 3f43d
|
||||||
ld a, [PlayerSubStatus4]
|
ld a, [PlayerSubStatus4]
|
||||||
bit SUBSTATUS_SUBSTITUTE, a
|
bit SUBSTATUS_SUBSTITUTE, a
|
||||||
ld hl, BattleAnimCmd_DD
|
ld hl, BattleAnimCmd_RaiseSub
|
||||||
jr nz, Function3f46f ; substitute
|
jr nz, GetBackpic_DoAnim ; substitute
|
||||||
|
|
||||||
Function3f447: ; 3f447
|
Function3f447: ; 3f447
|
||||||
ld a, [wc6fe]
|
ld a, [wPlayerMinimized]
|
||||||
and a
|
and a
|
||||||
ld hl, BattleAnimCmd_E2
|
ld hl, BattleAnimCmd_MinimizeOpp
|
||||||
jr nz, Function3f46f
|
jr nz, GetBackpic_DoAnim
|
||||||
ld a, [CurPartySpecies]
|
ld a, [CurPartySpecies]
|
||||||
push af
|
push af
|
||||||
ld a, [BattleMonSpecies]
|
ld a, [BattleMonSpecies]
|
||||||
@ -8397,7 +8412,7 @@ Function3f447: ; 3f447
|
|||||||
ret
|
ret
|
||||||
; 3f46f
|
; 3f46f
|
||||||
|
|
||||||
Function3f46f: ; 3f46f
|
GetBackpic_DoAnim: ; 3f46f
|
||||||
ld a, [hBattleTurn]
|
ld a, [hBattleTurn]
|
||||||
push af
|
push af
|
||||||
xor a
|
xor a
|
||||||
@ -8412,14 +8427,14 @@ Function3f46f: ; 3f46f
|
|||||||
GetMonFrontpic: ; 3f47c
|
GetMonFrontpic: ; 3f47c
|
||||||
ld a, [EnemySubStatus4]
|
ld a, [EnemySubStatus4]
|
||||||
bit SUBSTATUS_SUBSTITUTE, a
|
bit SUBSTATUS_SUBSTITUTE, a
|
||||||
ld hl, BattleAnimCmd_DD
|
ld hl, BattleAnimCmd_RaiseSub
|
||||||
jr nz, Function3f4b4
|
jr nz, GetFrontpic_DoAnim
|
||||||
|
|
||||||
Function3f486: ; 3f486
|
Function3f486: ; 3f486
|
||||||
ld a, [wc6fa]
|
ld a, [wEnemyMinimized]
|
||||||
and a
|
and a
|
||||||
ld hl, BattleAnimCmd_E2
|
ld hl, BattleAnimCmd_MinimizeOpp
|
||||||
jr nz, Function3f4b4
|
jr nz, GetFrontpic_DoAnim
|
||||||
|
|
||||||
ld a, [CurPartySpecies]
|
ld a, [CurPartySpecies]
|
||||||
push af
|
push af
|
||||||
@ -8436,7 +8451,7 @@ Function3f486: ; 3f486
|
|||||||
ret
|
ret
|
||||||
; 3f4b4
|
; 3f4b4
|
||||||
|
|
||||||
Function3f4b4: ; 3f4b4
|
GetFrontpic_DoAnim: ; 3f4b4
|
||||||
ld a, [hBattleTurn]
|
ld a, [hBattleTurn]
|
||||||
push af
|
push af
|
||||||
call SetEnemyTurn
|
call SetEnemyTurn
|
||||||
|
@ -5361,13 +5361,14 @@ BattleCommand_FreezeTarget: ; 36102
|
|||||||
|
|
||||||
callba UseHeldStatusHealingItem
|
callba UseHeldStatusHealingItem
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
call OpponentCantMove
|
call OpponentCantMove
|
||||||
call EndRechargeOpp
|
call EndRechargeOpp
|
||||||
ld hl, wc740
|
ld hl, wEnemyJustGotFrozen
|
||||||
ld a, [hBattleTurn]
|
ld a, [hBattleTurn]
|
||||||
and a
|
and a
|
||||||
jr z, .finish
|
jr z, .finish
|
||||||
ld hl, wc73f
|
ld hl, wPlayerJustGotFrozen
|
||||||
.finish
|
.finish
|
||||||
ld [hl], $1
|
ld [hl], $1
|
||||||
ret
|
ret
|
||||||
@ -5582,12 +5583,12 @@ CheckIfStatCanBeRaised: ; 361ef
|
|||||||
|
|
||||||
|
|
||||||
StatUpAnimation: ; 36281
|
StatUpAnimation: ; 36281
|
||||||
ld bc, wc6fe
|
ld bc, wPlayerMinimized
|
||||||
ld hl, Function3f447
|
ld hl, Function3f447
|
||||||
ld a, [hBattleTurn]
|
ld a, [hBattleTurn]
|
||||||
and a
|
and a
|
||||||
jr z, .do_player ; 0x3628a $6
|
jr z, .do_player ; 0x3628a $6
|
||||||
ld bc, wc6fa
|
ld bc, wEnemyMinimized
|
||||||
ld hl, Function3f486
|
ld hl, Function3f486
|
||||||
.do_player
|
.do_player
|
||||||
ld a, BATTLE_VARS_MOVE_ANIM
|
ld a, BATTLE_VARS_MOVE_ANIM
|
||||||
@ -8338,9 +8339,9 @@ endr
|
|||||||
jr c, .mimic_anims
|
jr c, .mimic_anims
|
||||||
ld a, [hBattleTurn]
|
ld a, [hBattleTurn]
|
||||||
and a
|
and a
|
||||||
ld a, [wc6fe]
|
ld a, [wPlayerMinimized]
|
||||||
jr z, .got_byte
|
jr z, .got_byte
|
||||||
ld a, [wc6fa]
|
ld a, [wEnemyMinimized]
|
||||||
.got_byte
|
.got_byte
|
||||||
and a
|
and a
|
||||||
jr nz, .mimic_anims
|
jr nz, .mimic_anims
|
||||||
@ -9528,11 +9529,11 @@ BattleCommand_MirrorCoat: ; 37c95
|
|||||||
BattleCommand_DoubleMinimizeDamage: ; 37ce6
|
BattleCommand_DoubleMinimizeDamage: ; 37ce6
|
||||||
; doubleminimizedamage
|
; doubleminimizedamage
|
||||||
|
|
||||||
ld hl, wc6fa
|
ld hl, wEnemyMinimized
|
||||||
ld a, [hBattleTurn]
|
ld a, [hBattleTurn]
|
||||||
and a
|
and a
|
||||||
jr z, .ok
|
jr z, .ok
|
||||||
ld hl, wc6fe
|
ld hl, wPlayerMinimized
|
||||||
.ok
|
.ok
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and a
|
and a
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
_DisappearUser: ; fbd54
|
_DisappearUser: ; fbd54
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
ld a, [hBattleTurn] ; $ff00+$e4
|
ld a, [hBattleTurn]
|
||||||
and a
|
and a
|
||||||
jr z, .player
|
jr z, .player
|
||||||
call GetEnemyFrontpicCoords
|
call GetEnemyFrontpicCoords
|
||||||
@ -21,8 +21,8 @@ _AppearUserLowerSub: ; fbd71 (3e:7d71)
|
|||||||
|
|
||||||
AppearUser: ; fbd77 (3e:7d77)
|
AppearUser: ; fbd77 (3e:7d77)
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
ld a, [hBattleTurn] ; $ff00+$e4
|
ld a, [hBattleTurn]
|
||||||
and a
|
and a
|
||||||
jr z, .player
|
jr z, .player
|
||||||
call GetEnemyFrontpicCoords
|
call GetEnemyFrontpicCoords
|
||||||
@ -36,7 +36,7 @@ AppearUser: ; fbd77 (3e:7d77)
|
|||||||
predef FillBox
|
predef FillBox
|
||||||
FinishAppearDisappearUser: ; fbd91 (3e:7d91)
|
FinishAppearDisappearUser: ; fbd91 (3e:7d91)
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
GetEnemyFrontpicCoords: ; fbd96 (3e:7d96)
|
GetEnemyFrontpicCoords: ; fbd96 (3e:7d96)
|
||||||
|
@ -48,53 +48,3 @@ ANIM_BG_WOBBLE_MON EQU $34
|
|||||||
const ANIM_MON_UNUSED ; 6
|
const ANIM_MON_UNUSED ; 6
|
||||||
const ANIM_MON_EGG1 ; 7
|
const ANIM_MON_EGG1 ; 7
|
||||||
const ANIM_MON_EGG2 ; 8
|
const ANIM_MON_EGG2 ; 8
|
||||||
|
|
||||||
const_value SET $d0
|
|
||||||
const BATTLEANIM_D0
|
|
||||||
const BATTLEANIM_D1
|
|
||||||
const BATTLEANIM_D2
|
|
||||||
const BATTLEANIM_D3
|
|
||||||
const BATTLEANIM_D4
|
|
||||||
const BATTLEANIM_D5
|
|
||||||
const BATTLEANIM_D6
|
|
||||||
const BATTLEANIM_D7
|
|
||||||
const BATTLEANIM_D8
|
|
||||||
const BATTLEANIM_D9
|
|
||||||
const BATTLEANIM_DA
|
|
||||||
const BATTLEANIM_DB
|
|
||||||
const BATTLEANIM_DC
|
|
||||||
const BATTLEANIM_DD
|
|
||||||
const BATTLEANIM_DE
|
|
||||||
const BATTLEANIM_DF
|
|
||||||
const BATTLEANIM_E0
|
|
||||||
const BATTLEANIM_E1
|
|
||||||
const BATTLEANIM_E2
|
|
||||||
const BATTLEANIM_E3
|
|
||||||
const BATTLEANIM_E4
|
|
||||||
const BATTLEANIM_E5
|
|
||||||
const BATTLEANIM_E6
|
|
||||||
const BATTLEANIM_E7
|
|
||||||
const BATTLEANIM_E8
|
|
||||||
const BATTLEANIM_E9
|
|
||||||
const BATTLEANIM_EA
|
|
||||||
const BATTLEANIM_EB
|
|
||||||
const BATTLEANIM_EC
|
|
||||||
const BATTLEANIM_ED
|
|
||||||
const BATTLEANIM_EE
|
|
||||||
const BATTLEANIM_EF
|
|
||||||
const BATTLEANIM_F0
|
|
||||||
const BATTLEANIM_F1
|
|
||||||
const BATTLEANIM_F2
|
|
||||||
const BATTLEANIM_F3
|
|
||||||
const BATTLEANIM_F4
|
|
||||||
const BATTLEANIM_F5
|
|
||||||
const BATTLEANIM_F6
|
|
||||||
const BATTLEANIM_F7
|
|
||||||
const BATTLEANIM_F8
|
|
||||||
const BATTLEANIM_F9
|
|
||||||
const BATTLEANIM_FA
|
|
||||||
const BATTLEANIM_FB
|
|
||||||
const BATTLEANIM_FC
|
|
||||||
const BATTLEANIM_FD
|
|
||||||
const BATTLEANIM_FE
|
|
||||||
const BATTLEANIM_FF
|
|
||||||
|
@ -254,7 +254,7 @@ StartTrainerBattle_SetUpBGMap: ; 8c3a1 (23:43a1)
|
|||||||
call StartTrainerBattle_NextScene
|
call StartTrainerBattle_NextScene
|
||||||
xor a
|
xor a
|
||||||
ld [wcf64], a
|
ld [wcf64], a
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
StartTrainerBattle_Flash: ; 8c3ab (23:43ab)
|
StartTrainerBattle_Flash: ; 8c3ab (23:43ab)
|
||||||
@ -309,10 +309,10 @@ StartTrainerBattle_Flash: ; 8c3ab (23:43ab)
|
|||||||
StartTrainerBattle_SetUpForWavyOutro: ; 8c3e8 (23:43e8)
|
StartTrainerBattle_SetUpForWavyOutro: ; 8c3e8 (23:43e8)
|
||||||
callba Function5602
|
callba Function5602
|
||||||
ld a, $5
|
ld a, $5
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
call StartTrainerBattle_NextScene
|
call StartTrainerBattle_NextScene
|
||||||
ld a, $43
|
ld a, $43
|
||||||
ld [hLCDStatCustom], a ; $ff00+$c6
|
ld [hLCDStatCustom], a
|
||||||
xor a
|
xor a
|
||||||
ld [hLCDStatCustom + 1], a
|
ld [hLCDStatCustom + 1], a
|
||||||
ld a, $90
|
ld a, $90
|
||||||
@ -365,7 +365,7 @@ StartTrainerBattle_SineWave: ; 8c408 (23:4408)
|
|||||||
StartTrainerBattle_SetUpForSpinOutro: ; 8c43d (23:443d)
|
StartTrainerBattle_SetUpForSpinOutro: ; 8c43d (23:443d)
|
||||||
callba Function5602
|
callba Function5602
|
||||||
ld a, $5
|
ld a, $5
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
call StartTrainerBattle_NextScene
|
call StartTrainerBattle_NextScene
|
||||||
xor a
|
xor a
|
||||||
ld [wcf64], a
|
ld [wcf64], a
|
||||||
@ -386,7 +386,7 @@ ENDM
|
|||||||
|
|
||||||
StartTrainerBattle_SpinToBlack: ; 8c44f (23:444f)
|
StartTrainerBattle_SpinToBlack: ; 8c44f (23:444f)
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
ld a, [wcf64]
|
ld a, [wcf64]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld d, 0
|
ld d, 0
|
||||||
@ -400,7 +400,7 @@ endr
|
|||||||
ld [wcf65], a
|
ld [wcf65], a
|
||||||
call .load
|
call .load
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
ld hl, wcf64
|
ld hl, wcf64
|
||||||
@ -409,12 +409,12 @@ endr
|
|||||||
|
|
||||||
.end
|
.end
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
ld a, $20
|
ld a, $20
|
||||||
ld [wJumptableIndex], a
|
ld [wJumptableIndex], a
|
||||||
ret
|
ret
|
||||||
@ -508,12 +508,12 @@ endr
|
|||||||
StartTrainerBattle_SetUpForRandomScatterOutro: ; 8c578 (23:4578)
|
StartTrainerBattle_SetUpForRandomScatterOutro: ; 8c578 (23:4578)
|
||||||
callba Function5602
|
callba Function5602
|
||||||
ld a, $5
|
ld a, $5
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
call StartTrainerBattle_NextScene
|
call StartTrainerBattle_NextScene
|
||||||
ld a, $10
|
ld a, $10
|
||||||
ld [wcf64], a
|
ld [wcf64], a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
StartTrainerBattle_SpeckleToBlack: ; 8c58f (23:458f)
|
StartTrainerBattle_SpeckleToBlack: ; 8c58f (23:458f)
|
||||||
@ -533,12 +533,12 @@ StartTrainerBattle_SpeckleToBlack: ; 8c58f (23:458f)
|
|||||||
|
|
||||||
.done
|
.done
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
ld a, $20
|
ld a, $20
|
||||||
ld [wJumptableIndex], a
|
ld [wJumptableIndex], a
|
||||||
ret
|
ret
|
||||||
@ -580,7 +580,7 @@ StartTrainerBattle_LoadPokeBallGraphics: ; 8c5dc (23:45dc)
|
|||||||
jp z, .nextscene
|
jp z, .nextscene
|
||||||
|
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
hlcoord 0, 0, AttrMap
|
hlcoord 0, 0, AttrMap
|
||||||
ld bc, SCREEN_HEIGHT * SCREEN_WIDTH
|
ld bc, SCREEN_HEIGHT * SCREEN_WIDTH
|
||||||
inc b
|
inc b
|
||||||
@ -636,11 +636,11 @@ StartTrainerBattle_LoadPokeBallGraphics: ; 8c5dc (23:45dc)
|
|||||||
dec b
|
dec b
|
||||||
jr nz, .loop2
|
jr nz, .loop2
|
||||||
|
|
||||||
ld a, [hCGB] ; $ff00+$e6
|
ld a, [hCGB]
|
||||||
and a
|
and a
|
||||||
jr nz, .cgb
|
jr nz, .cgb
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
jr .nextscene
|
jr .nextscene
|
||||||
@ -653,10 +653,10 @@ StartTrainerBattle_LoadPokeBallGraphics: ; 8c5dc (23:45dc)
|
|||||||
jr nz, .daytime
|
jr nz, .daytime
|
||||||
ld hl, .nightpals
|
ld hl, .nightpals
|
||||||
.daytime
|
.daytime
|
||||||
ld a, [rSVBK] ; $ff00+$70
|
ld a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
ld a, $5 ; WRAM5 = palettes
|
ld a, $5 ; WRAM5 = palettes
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
call .copypals
|
call .copypals
|
||||||
push hl
|
push hl
|
||||||
ld de, Unkn1Pals + 8 * 7
|
ld de, Unkn1Pals + 8 * 7
|
||||||
@ -667,9 +667,9 @@ StartTrainerBattle_LoadPokeBallGraphics: ; 8c5dc (23:45dc)
|
|||||||
ld bc, $8
|
ld bc, $8
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hCGBPalUpdate], a ; $ff00+$e5
|
ld [hCGBPalUpdate], a
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
call Function8cf4f
|
call Function8cf4f
|
||||||
|
|
||||||
@ -829,7 +829,7 @@ StartTrainerBattle_ZoomToBlack: ; 8c768 (23:4768)
|
|||||||
inc de
|
inc de
|
||||||
ld h, a
|
ld h, a
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
call .Copy
|
call .Copy
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
jr .loop
|
jr .loop
|
||||||
|
976
engine/breeding/egg.asm
Executable file
976
engine/breeding/egg.asm
Executable file
@ -0,0 +1,976 @@
|
|||||||
|
Function16e1d: ; 16e1d
|
||||||
|
call Function16ed6
|
||||||
|
ld c, $0
|
||||||
|
jp nc, .asm_16eb7
|
||||||
|
ld a, [wBreedMon1Species]
|
||||||
|
ld [CurPartySpecies], a
|
||||||
|
ld a, [wBreedMon1DVs]
|
||||||
|
ld [TempMonDVs], a
|
||||||
|
ld a, [wBreedMon1DVs + 1]
|
||||||
|
ld [TempMonDVs + 1], a
|
||||||
|
ld a, $3
|
||||||
|
ld [MonType], a
|
||||||
|
predef GetGender
|
||||||
|
jr c, .asm_16e70
|
||||||
|
ld b, $1
|
||||||
|
jr nz, .asm_16e48
|
||||||
|
inc b
|
||||||
|
|
||||||
|
.asm_16e48
|
||||||
|
push bc
|
||||||
|
ld a, [wBreedMon2Species]
|
||||||
|
ld [CurPartySpecies], a
|
||||||
|
ld a, [wBreedMon2DVs]
|
||||||
|
ld [TempMonDVs], a
|
||||||
|
ld a, [wBreedMon2DVs + 1]
|
||||||
|
ld [TempMonDVs + 1], a
|
||||||
|
ld a, $3
|
||||||
|
ld [MonType], a
|
||||||
|
predef GetGender
|
||||||
|
pop bc
|
||||||
|
jr c, .asm_16e70
|
||||||
|
ld a, $1
|
||||||
|
jr nz, .asm_16e6d
|
||||||
|
inc a
|
||||||
|
|
||||||
|
.asm_16e6d
|
||||||
|
cp b
|
||||||
|
jr nz, .asm_16e89
|
||||||
|
|
||||||
|
.asm_16e70
|
||||||
|
ld c, $0
|
||||||
|
ld a, [wBreedMon1Species]
|
||||||
|
cp DITTO
|
||||||
|
jr z, .asm_16e82
|
||||||
|
ld a, [wBreedMon2Species]
|
||||||
|
cp DITTO
|
||||||
|
jr nz, .asm_16eb7
|
||||||
|
jr .asm_16e89
|
||||||
|
|
||||||
|
.asm_16e82
|
||||||
|
ld a, [wBreedMon2Species]
|
||||||
|
cp DITTO
|
||||||
|
jr z, .asm_16eb7
|
||||||
|
|
||||||
|
.asm_16e89
|
||||||
|
call Function16ebc
|
||||||
|
ld c, $ff
|
||||||
|
jp z, .asm_16eb7
|
||||||
|
ld a, [wBreedMon2Species]
|
||||||
|
ld b, a
|
||||||
|
ld a, [wBreedMon1Species]
|
||||||
|
cp b
|
||||||
|
ld c, $fe
|
||||||
|
jr z, .asm_16e9f
|
||||||
|
ld c, $80
|
||||||
|
.asm_16e9f
|
||||||
|
ld a, [wBreedMon1ID]
|
||||||
|
ld b, a
|
||||||
|
ld a, [wBreedMon2ID]
|
||||||
|
cp b
|
||||||
|
jr nz, .asm_16eb7
|
||||||
|
ld a, [wBreedMon1ID + 1]
|
||||||
|
ld b, a
|
||||||
|
ld a, [wBreedMon2ID + 1]
|
||||||
|
cp b
|
||||||
|
jr nz, .asm_16eb7
|
||||||
|
ld a, c
|
||||||
|
sub $4d
|
||||||
|
ld c, a
|
||||||
|
|
||||||
|
.asm_16eb7
|
||||||
|
ld a, c
|
||||||
|
ld [wd265], a
|
||||||
|
ret
|
||||||
|
; 16ebc
|
||||||
|
|
||||||
|
|
||||||
|
Function16ebc: ; 16ebc (5:6ebc)
|
||||||
|
ld a, [wBreedMon1DVs]
|
||||||
|
and $f
|
||||||
|
ld b, a
|
||||||
|
ld a, [wBreedMon2DVs]
|
||||||
|
and $f
|
||||||
|
cp b
|
||||||
|
ret nz
|
||||||
|
ld a, [wBreedMon1DVs + 1]
|
||||||
|
and $7
|
||||||
|
ld b, a
|
||||||
|
ld a, [wBreedMon2DVs + 1]
|
||||||
|
and $7
|
||||||
|
cp b
|
||||||
|
ret
|
||||||
|
; 16ed6
|
||||||
|
|
||||||
|
Function16ed6: ; 16ed6
|
||||||
|
ld a, [wBreedMon2Species]
|
||||||
|
ld [CurSpecies], a
|
||||||
|
call GetBaseData
|
||||||
|
ld a, [BaseEggGroups]
|
||||||
|
cp $ff
|
||||||
|
jr z, .asm_16f3a
|
||||||
|
ld a, [wBreedMon1Species]
|
||||||
|
ld [CurSpecies], a
|
||||||
|
call GetBaseData
|
||||||
|
ld a, [BaseEggGroups]
|
||||||
|
cp $ff
|
||||||
|
jr z, .asm_16f3a
|
||||||
|
ld a, [wBreedMon2Species]
|
||||||
|
cp DITTO
|
||||||
|
jr z, .asm_16f3c
|
||||||
|
ld [CurSpecies], a
|
||||||
|
call GetBaseData
|
||||||
|
ld a, [BaseEggGroups]
|
||||||
|
push af
|
||||||
|
and $f
|
||||||
|
ld b, a
|
||||||
|
pop af
|
||||||
|
and $f0
|
||||||
|
swap a
|
||||||
|
ld c, a
|
||||||
|
ld a, [wBreedMon1Species]
|
||||||
|
cp DITTO
|
||||||
|
jr z, .asm_16f3c
|
||||||
|
ld [CurSpecies], a
|
||||||
|
push bc
|
||||||
|
call GetBaseData
|
||||||
|
pop bc
|
||||||
|
ld a, [BaseEggGroups]
|
||||||
|
push af
|
||||||
|
and $f
|
||||||
|
ld d, a
|
||||||
|
pop af
|
||||||
|
and $f0
|
||||||
|
swap a
|
||||||
|
ld e, a
|
||||||
|
ld a, d
|
||||||
|
cp b
|
||||||
|
jr z, .asm_16f3c
|
||||||
|
cp c
|
||||||
|
jr z, .asm_16f3c
|
||||||
|
ld a, e
|
||||||
|
cp b
|
||||||
|
jr z, .asm_16f3c
|
||||||
|
cp c
|
||||||
|
jr z, .asm_16f3c
|
||||||
|
|
||||||
|
.asm_16f3a
|
||||||
|
and a
|
||||||
|
ret
|
||||||
|
|
||||||
|
.asm_16f3c
|
||||||
|
scf
|
||||||
|
ret
|
||||||
|
; 16f3e
|
||||||
|
|
||||||
|
DoEggStep:: ; 16f3e
|
||||||
|
ld de, PartySpecies
|
||||||
|
ld hl, PartyMon1Happiness
|
||||||
|
ld c, 0
|
||||||
|
.loop
|
||||||
|
ld a, [de]
|
||||||
|
inc de
|
||||||
|
cp -1
|
||||||
|
ret z
|
||||||
|
cp EGG
|
||||||
|
jr nz, .next
|
||||||
|
dec [hl]
|
||||||
|
jr nz, .next
|
||||||
|
ld a, 1
|
||||||
|
and a
|
||||||
|
ret
|
||||||
|
|
||||||
|
.next
|
||||||
|
push de
|
||||||
|
ld de, PARTYMON_STRUCT_LENGTH
|
||||||
|
add hl, de
|
||||||
|
pop de
|
||||||
|
jr .loop
|
||||||
|
; 16f5e
|
||||||
|
|
||||||
|
OverworldHatchEgg:: ; 16f5e
|
||||||
|
call ResetWindow
|
||||||
|
call LoadPartyMenuDataHeader
|
||||||
|
call Function16f70
|
||||||
|
call Function2b4d
|
||||||
|
call RestartMapMusic
|
||||||
|
jp LoadMoveSprites
|
||||||
|
; 16f70
|
||||||
|
|
||||||
|
Function16f70: ; 16f70 (5:6f70)
|
||||||
|
ld de, PartySpecies
|
||||||
|
ld hl, PartyMon1Happiness
|
||||||
|
xor a
|
||||||
|
ld [CurPartyMon], a
|
||||||
|
|
||||||
|
Function16f7a: ; 16f7a (5:6f7a)
|
||||||
|
ld a, [de]
|
||||||
|
inc de
|
||||||
|
cp -1
|
||||||
|
jp z, Function1708a
|
||||||
|
push de
|
||||||
|
push hl
|
||||||
|
cp EGG
|
||||||
|
jp nz, Function1707d
|
||||||
|
ld a, [hl]
|
||||||
|
and a
|
||||||
|
jp nz, Function1707d
|
||||||
|
ld [hl], $78
|
||||||
|
|
||||||
|
push de
|
||||||
|
|
||||||
|
callba Function4dbb8
|
||||||
|
callba MobileFn_10608d
|
||||||
|
ld a, [CurPartyMon]
|
||||||
|
ld hl, PartyMons ; wdcdf (aliases: PartyMon1, PartyMon1Species)
|
||||||
|
ld bc, PARTYMON_STRUCT_LENGTH
|
||||||
|
call AddNTimes
|
||||||
|
ld a, [hl]
|
||||||
|
ld [CurPartySpecies], a
|
||||||
|
dec a
|
||||||
|
call SetSeenAndCaughtMon
|
||||||
|
|
||||||
|
ld a, [CurPartySpecies]
|
||||||
|
cp TOGEPI
|
||||||
|
jr nz, .nottogepi
|
||||||
|
; set the event flag for hatching togepi
|
||||||
|
ld de, EVENT_TOGEPI_HATCHED
|
||||||
|
ld b, SET_FLAG
|
||||||
|
call EventFlagAction
|
||||||
|
.nottogepi
|
||||||
|
|
||||||
|
pop de
|
||||||
|
|
||||||
|
ld a, [CurPartySpecies]
|
||||||
|
dec de
|
||||||
|
ld [de], a
|
||||||
|
ld [wd265], a
|
||||||
|
ld [CurSpecies], a
|
||||||
|
call GetPokemonName
|
||||||
|
xor a
|
||||||
|
ld [wd26b], a
|
||||||
|
call GetBaseData
|
||||||
|
ld a, [CurPartyMon]
|
||||||
|
ld hl, PartyMons ; wdcdf (aliases: PartyMon1, PartyMon1Species)
|
||||||
|
ld bc, PARTYMON_STRUCT_LENGTH
|
||||||
|
call AddNTimes
|
||||||
|
push hl
|
||||||
|
ld bc, MON_MAXHP
|
||||||
|
add hl, bc
|
||||||
|
ld d, h
|
||||||
|
ld e, l
|
||||||
|
pop hl
|
||||||
|
push hl
|
||||||
|
ld bc, MON_LEVEL
|
||||||
|
add hl, bc
|
||||||
|
ld a, [hl]
|
||||||
|
ld [CurPartyLevel], a
|
||||||
|
pop hl
|
||||||
|
push hl
|
||||||
|
ld bc, MON_STATUS
|
||||||
|
add hl, bc
|
||||||
|
xor a
|
||||||
|
ld [hli], a
|
||||||
|
ld [hl], a
|
||||||
|
pop hl
|
||||||
|
push hl
|
||||||
|
ld bc, MON_EXP + 2
|
||||||
|
add hl, bc
|
||||||
|
ld b, $0
|
||||||
|
predef CalcPkmnStats
|
||||||
|
pop bc
|
||||||
|
ld hl, MON_MAXHP
|
||||||
|
add hl, bc
|
||||||
|
ld d, h
|
||||||
|
ld e, l
|
||||||
|
ld hl, MON_HP
|
||||||
|
add hl, bc
|
||||||
|
ld a, [de]
|
||||||
|
inc de
|
||||||
|
ld [hli], a
|
||||||
|
ld a, [de]
|
||||||
|
ld [hl], a
|
||||||
|
ld hl, MON_ID
|
||||||
|
add hl, bc
|
||||||
|
ld a, [PlayerID]
|
||||||
|
ld [hli], a
|
||||||
|
ld a, [PlayerID + 1]
|
||||||
|
ld [hl], a
|
||||||
|
ld a, [CurPartyMon]
|
||||||
|
ld hl, PartyMonOT ; wddff (aliases: PartyMonOT)
|
||||||
|
ld bc, NAME_LENGTH
|
||||||
|
call AddNTimes
|
||||||
|
ld d, h
|
||||||
|
ld e, l
|
||||||
|
ld hl, PlayerName
|
||||||
|
call CopyBytes
|
||||||
|
ld hl, UnknownText_0x1708b
|
||||||
|
call PrintText
|
||||||
|
ld a, [CurPartyMon]
|
||||||
|
ld hl, PartyMonNicknames
|
||||||
|
ld bc, PKMN_NAME_LENGTH
|
||||||
|
call AddNTimes
|
||||||
|
ld d, h
|
||||||
|
ld e, l
|
||||||
|
push de
|
||||||
|
ld hl, UnknownText_0x170ba
|
||||||
|
call PrintText
|
||||||
|
call YesNoBox
|
||||||
|
pop de
|
||||||
|
jr c, .nonickname
|
||||||
|
ld a, $1
|
||||||
|
ld [wd26b], a
|
||||||
|
xor a
|
||||||
|
ld [MonType], a
|
||||||
|
push de
|
||||||
|
ld b, $0
|
||||||
|
callba Function116c1
|
||||||
|
pop hl
|
||||||
|
ld de, StringBuffer1
|
||||||
|
call InitName
|
||||||
|
jr Function1707d
|
||||||
|
.nonickname
|
||||||
|
ld hl, StringBuffer1
|
||||||
|
ld bc, PKMN_NAME_LENGTH
|
||||||
|
call CopyBytes
|
||||||
|
|
||||||
|
Function1707d: ; 1707d (5:707d)
|
||||||
|
ld hl, CurPartyMon
|
||||||
|
inc [hl]
|
||||||
|
pop hl
|
||||||
|
ld de, PARTYMON_STRUCT_LENGTH
|
||||||
|
add hl, de
|
||||||
|
pop de
|
||||||
|
jp Function16f7a
|
||||||
|
|
||||||
|
Function1708a: ; 1708a (5:708a)
|
||||||
|
ret
|
||||||
|
; 1708b (5:708b)
|
||||||
|
|
||||||
|
UnknownText_0x1708b: ; 0x1708b
|
||||||
|
; Huh? @ @
|
||||||
|
text_jump UnknownText_0x1c0db0
|
||||||
|
start_asm
|
||||||
|
; 0x17090
|
||||||
|
|
||||||
|
Function17090: ; 17090
|
||||||
|
ld hl, VramState
|
||||||
|
res 0, [hl]
|
||||||
|
push hl
|
||||||
|
push de
|
||||||
|
push bc
|
||||||
|
ld a, [CurPartySpecies]
|
||||||
|
push af
|
||||||
|
call Function1728f
|
||||||
|
ld hl, UnknownText_0x170b0
|
||||||
|
call PrintText
|
||||||
|
pop af
|
||||||
|
ld [CurPartySpecies], a
|
||||||
|
pop bc
|
||||||
|
pop de
|
||||||
|
pop hl
|
||||||
|
ld hl, UnknownText_0x170b5
|
||||||
|
ret
|
||||||
|
; 170b0 (5:70b0)
|
||||||
|
|
||||||
|
UnknownText_0x170b0: ; 0x170b0
|
||||||
|
;
|
||||||
|
text_jump UnknownText_0x1c0db8
|
||||||
|
db "@"
|
||||||
|
; 0x170b5
|
||||||
|
|
||||||
|
UnknownText_0x170b5: ; 0x170b5
|
||||||
|
; came out of its EGG!@ @
|
||||||
|
text_jump UnknownText_0x1c0dba
|
||||||
|
db "@"
|
||||||
|
; 0x170ba
|
||||||
|
|
||||||
|
UnknownText_0x170ba: ; 0x170ba
|
||||||
|
; Give a nickname to @ ?
|
||||||
|
text_jump UnknownText_0x1c0dd8
|
||||||
|
db "@"
|
||||||
|
; 0x170bf
|
||||||
|
|
||||||
|
Function170bf: ; 170bf
|
||||||
|
call Function17197
|
||||||
|
ld d, h
|
||||||
|
ld e, l
|
||||||
|
ld b, NUM_MOVES
|
||||||
|
.loop
|
||||||
|
ld a, [de]
|
||||||
|
and a
|
||||||
|
jr z, .done
|
||||||
|
ld hl, wEggMonMoves
|
||||||
|
ld c, NUM_MOVES
|
||||||
|
.next
|
||||||
|
ld a, [de]
|
||||||
|
cp [hl]
|
||||||
|
jr z, .skip
|
||||||
|
inc hl
|
||||||
|
dec c
|
||||||
|
jr nz, .next
|
||||||
|
call Function170e4
|
||||||
|
jr nc, .skip
|
||||||
|
call Function17169
|
||||||
|
|
||||||
|
.skip
|
||||||
|
inc de
|
||||||
|
dec b
|
||||||
|
jr nz, .loop
|
||||||
|
|
||||||
|
.done
|
||||||
|
ret
|
||||||
|
; 170e4
|
||||||
|
|
||||||
|
Function170e4: ; 170e4
|
||||||
|
GLOBAL EggMoves
|
||||||
|
|
||||||
|
push bc
|
||||||
|
ld a, [wEggMonSpecies]
|
||||||
|
dec a
|
||||||
|
ld c, a
|
||||||
|
ld b, 0
|
||||||
|
ld hl, EggMovePointers
|
||||||
|
rept 2
|
||||||
|
add hl, bc
|
||||||
|
endr
|
||||||
|
ld a, BANK(EggMovePointers)
|
||||||
|
call GetFarHalfword
|
||||||
|
.loop
|
||||||
|
ld a, BANK(EggMoves)
|
||||||
|
call GetFarByte
|
||||||
|
cp -1
|
||||||
|
jr z, .found_mon
|
||||||
|
ld b, a
|
||||||
|
ld a, [de]
|
||||||
|
cp b
|
||||||
|
jr z, .done_carry
|
||||||
|
inc hl
|
||||||
|
jr .loop
|
||||||
|
|
||||||
|
.found_mon
|
||||||
|
call Function1720b
|
||||||
|
ld b, NUM_MOVES
|
||||||
|
.loop2
|
||||||
|
ld a, [de]
|
||||||
|
cp [hl]
|
||||||
|
jr z, .found_eggmove
|
||||||
|
inc hl
|
||||||
|
dec b
|
||||||
|
jr z, .inherit_tmhm
|
||||||
|
jr .loop2
|
||||||
|
|
||||||
|
.found_eggmove
|
||||||
|
ld a, [wEggMonSpecies]
|
||||||
|
dec a
|
||||||
|
ld c, a
|
||||||
|
ld b, 0
|
||||||
|
ld hl, EvosAttacksPointers
|
||||||
|
rept 2
|
||||||
|
add hl, bc
|
||||||
|
endr
|
||||||
|
ld a, BANK(EvosAttacksPointers)
|
||||||
|
call GetFarHalfword
|
||||||
|
.loop3
|
||||||
|
ld a, BANK(EvosAttacks)
|
||||||
|
call GetFarByte
|
||||||
|
inc hl
|
||||||
|
and a
|
||||||
|
jr nz, .loop3
|
||||||
|
.loop4
|
||||||
|
ld a, BANK(EvosAttacks)
|
||||||
|
call GetFarByte
|
||||||
|
and a
|
||||||
|
jr z, .inherit_tmhm
|
||||||
|
inc hl
|
||||||
|
ld a, BANK(EvosAttacks)
|
||||||
|
call GetFarByte
|
||||||
|
ld b, a
|
||||||
|
ld a, [de]
|
||||||
|
cp b
|
||||||
|
jr z, .done_carry
|
||||||
|
inc hl
|
||||||
|
jr .loop4
|
||||||
|
|
||||||
|
.inherit_tmhm
|
||||||
|
ld hl, TMHMMoves
|
||||||
|
.loop5
|
||||||
|
ld a, BANK(TMHMMoves)
|
||||||
|
call GetFarByte
|
||||||
|
inc hl
|
||||||
|
and a
|
||||||
|
jr z, .done
|
||||||
|
ld b, a
|
||||||
|
ld a, [de]
|
||||||
|
cp b
|
||||||
|
jr nz, .loop5
|
||||||
|
ld [wd262], a
|
||||||
|
predef CanLearnTMHMMove
|
||||||
|
ld a, c
|
||||||
|
and a
|
||||||
|
jr z, .done
|
||||||
|
|
||||||
|
.done_carry
|
||||||
|
pop bc
|
||||||
|
scf
|
||||||
|
ret
|
||||||
|
|
||||||
|
.done
|
||||||
|
pop bc
|
||||||
|
and a
|
||||||
|
ret
|
||||||
|
; 17169
|
||||||
|
|
||||||
|
Function17169: ; 17169
|
||||||
|
push de
|
||||||
|
push bc
|
||||||
|
ld a, [de]
|
||||||
|
ld b, a
|
||||||
|
ld hl, wEggMonMoves
|
||||||
|
ld c, NUM_MOVES
|
||||||
|
.loop
|
||||||
|
ld a, [hli]
|
||||||
|
and a
|
||||||
|
jr z, .done
|
||||||
|
dec c
|
||||||
|
jr nz, .loop
|
||||||
|
ld de, wEggMonMoves
|
||||||
|
ld hl, wEggMonMoves + 1
|
||||||
|
ld a, [hli]
|
||||||
|
ld [de], a
|
||||||
|
inc de
|
||||||
|
ld a, [hli]
|
||||||
|
ld [de], a
|
||||||
|
inc de
|
||||||
|
ld a, [hli]
|
||||||
|
ld [de], a
|
||||||
|
|
||||||
|
.done
|
||||||
|
dec hl
|
||||||
|
ld [hl], b
|
||||||
|
ld hl, wEggMonMoves
|
||||||
|
ld de, wEggMonPP
|
||||||
|
predef FillPP
|
||||||
|
pop bc
|
||||||
|
pop de
|
||||||
|
ret
|
||||||
|
; 17197
|
||||||
|
|
||||||
|
Function17197: ; 17197
|
||||||
|
ld hl, wBreedMon2Moves
|
||||||
|
ld a, [wBreedMon1Species]
|
||||||
|
cp DITTO
|
||||||
|
jr z, .ditto1
|
||||||
|
ld a, [wBreedMon2Species]
|
||||||
|
cp DITTO
|
||||||
|
jr z, .ditto2
|
||||||
|
ld a, [wDittoInDaycare]
|
||||||
|
and a
|
||||||
|
ret z
|
||||||
|
ld hl, wBreedMon1Moves
|
||||||
|
ret
|
||||||
|
|
||||||
|
.ditto1
|
||||||
|
ld a, [CurPartySpecies]
|
||||||
|
push af
|
||||||
|
ld a, [wBreedMon2Species]
|
||||||
|
ld [CurPartySpecies], a
|
||||||
|
ld a, [wBreedMon2DVs]
|
||||||
|
ld [TempMonDVs], a
|
||||||
|
ld a, [wBreedMon2DVs + 1]
|
||||||
|
ld [TempMonDVs + 1], a
|
||||||
|
ld a, $3
|
||||||
|
ld [MonType], a
|
||||||
|
predef GetGender
|
||||||
|
jr c, .inherit_mon2_moves
|
||||||
|
jr nz, .inherit_mon2_moves
|
||||||
|
jr .inherit_mon1_moves
|
||||||
|
|
||||||
|
.ditto2
|
||||||
|
ld a, [CurPartySpecies]
|
||||||
|
push af
|
||||||
|
ld a, [wBreedMon1Species]
|
||||||
|
ld [CurPartySpecies], a
|
||||||
|
ld a, [wBreedMon1DVs]
|
||||||
|
ld [TempMonDVs], a
|
||||||
|
ld a, [wBreedMon1DVs + 1]
|
||||||
|
ld [TempMonDVs + 1], a
|
||||||
|
ld a, $3
|
||||||
|
ld [MonType], a
|
||||||
|
predef GetGender
|
||||||
|
jr c, .inherit_mon1_moves
|
||||||
|
jr nz, .inherit_mon1_moves
|
||||||
|
|
||||||
|
.inherit_mon2_moves
|
||||||
|
ld hl, wBreedMon2Moves
|
||||||
|
pop af
|
||||||
|
ld [CurPartySpecies], a
|
||||||
|
ret
|
||||||
|
|
||||||
|
.inherit_mon1_moves
|
||||||
|
ld hl, wBreedMon1Moves
|
||||||
|
pop af
|
||||||
|
ld [CurPartySpecies], a
|
||||||
|
ret
|
||||||
|
; 1720b
|
||||||
|
|
||||||
|
Function1720b: ; 1720b
|
||||||
|
ld hl, wBreedMon1Moves
|
||||||
|
ld a, [wBreedMon1Species]
|
||||||
|
cp DITTO
|
||||||
|
ret z
|
||||||
|
ld a, [wBreedMon2Species]
|
||||||
|
cp DITTO
|
||||||
|
jr z, .ditto
|
||||||
|
ld a, [wDittoInDaycare]
|
||||||
|
and a
|
||||||
|
ret z
|
||||||
|
|
||||||
|
.ditto
|
||||||
|
ld hl, wBreedMon2Moves
|
||||||
|
ret
|
||||||
|
; 17224
|
||||||
|
|
||||||
|
|
||||||
|
Function17224: ; 17224 (5:7224)
|
||||||
|
push de
|
||||||
|
ld [CurPartySpecies], a
|
||||||
|
ld [CurSpecies], a
|
||||||
|
call GetBaseData
|
||||||
|
ld hl, BattleMonDVs
|
||||||
|
predef GetUnownLetter
|
||||||
|
pop de
|
||||||
|
predef_jump GetFrontpic
|
||||||
|
|
||||||
|
Function1723c: ; 1723c (5:723c)
|
||||||
|
push de
|
||||||
|
ld [CurPartySpecies], a
|
||||||
|
ld [CurSpecies], a
|
||||||
|
call GetBaseData
|
||||||
|
ld hl, BattleMonDVs
|
||||||
|
predef GetUnownLetter
|
||||||
|
pop de
|
||||||
|
predef_jump Function5108b
|
||||||
|
|
||||||
|
Function17254: ; 17254 (5:7254)
|
||||||
|
push af
|
||||||
|
call WaitTop
|
||||||
|
push hl
|
||||||
|
push bc
|
||||||
|
hlcoord 0, 0
|
||||||
|
ld bc, SCREEN_HEIGHT * SCREEN_WIDTH
|
||||||
|
ld a, " "
|
||||||
|
call ByteFill
|
||||||
|
pop bc
|
||||||
|
pop hl
|
||||||
|
ld a, b
|
||||||
|
ld [hBGMapAddress + 1], a
|
||||||
|
ld a, c
|
||||||
|
ld [hFillBox], a
|
||||||
|
lb bc, 7, 7
|
||||||
|
predef FillBox
|
||||||
|
pop af
|
||||||
|
call Function17363
|
||||||
|
call SetPalettes
|
||||||
|
jp WaitBGMap
|
||||||
|
|
||||||
|
Function1727f: ; 1727f (5:727f)
|
||||||
|
push hl
|
||||||
|
push de
|
||||||
|
push bc
|
||||||
|
callab Function8cf69
|
||||||
|
call DelayFrame
|
||||||
|
pop bc
|
||||||
|
pop de
|
||||||
|
pop hl
|
||||||
|
ret
|
||||||
|
|
||||||
|
Function1728f: ; 1728f (5:728f)
|
||||||
|
ld a, [wd265]
|
||||||
|
ld [wJumptableIndex], a
|
||||||
|
ld a, [CurSpecies]
|
||||||
|
push af
|
||||||
|
ld de, MUSIC_NONE
|
||||||
|
call PlayMusic
|
||||||
|
callba Function8000
|
||||||
|
call DisableLCD
|
||||||
|
ld hl, EggHatchGFX
|
||||||
|
ld de, VTiles0 tile $00
|
||||||
|
ld bc, $20
|
||||||
|
ld a, BANK(EggHatchGFX)
|
||||||
|
call FarCopyBytes
|
||||||
|
callba Function8cf53
|
||||||
|
ld de, VTiles2 tile $00
|
||||||
|
ld a, [wJumptableIndex]
|
||||||
|
call Function1723c
|
||||||
|
ld de, VTiles2 tile $31
|
||||||
|
ld a, EGG
|
||||||
|
call Function17224
|
||||||
|
ld de, MUSIC_EVOLUTION
|
||||||
|
call PlayMusic
|
||||||
|
call EnableLCD
|
||||||
|
hlcoord 7, 4
|
||||||
|
ld b, $98
|
||||||
|
ld c, $31
|
||||||
|
ld a, EGG
|
||||||
|
call Function17254
|
||||||
|
ld c, $50
|
||||||
|
call DelayFrames
|
||||||
|
xor a
|
||||||
|
ld [wcf64], a
|
||||||
|
ld a, [hSCX]
|
||||||
|
ld b, a
|
||||||
|
.asm_172ee
|
||||||
|
ld hl, wcf64
|
||||||
|
ld a, [hl]
|
||||||
|
inc [hl]
|
||||||
|
cp $8
|
||||||
|
jr nc, .asm_17327
|
||||||
|
ld e, [hl]
|
||||||
|
.asm_172f8
|
||||||
|
ld a, $2
|
||||||
|
ld [hSCX], a
|
||||||
|
ld a, $fe
|
||||||
|
ld [wc3c0], a
|
||||||
|
call Function1727f
|
||||||
|
ld c, $2
|
||||||
|
call DelayFrames
|
||||||
|
ld a, $fe
|
||||||
|
ld [hSCX], a
|
||||||
|
ld a, $2
|
||||||
|
ld [wc3c0], a
|
||||||
|
call Function1727f
|
||||||
|
ld c, $2
|
||||||
|
call DelayFrames
|
||||||
|
dec e
|
||||||
|
jr nz, .asm_172f8
|
||||||
|
ld c, $10
|
||||||
|
call DelayFrames
|
||||||
|
call Function1736d
|
||||||
|
jr .asm_172ee
|
||||||
|
.asm_17327
|
||||||
|
ld de, SFX_EGG_HATCH
|
||||||
|
call PlaySFX
|
||||||
|
xor a
|
||||||
|
ld [hSCX], a
|
||||||
|
ld [wc3c0], a
|
||||||
|
call ClearSprites
|
||||||
|
call Function173b3
|
||||||
|
hlcoord 6, 3
|
||||||
|
ld b, $98
|
||||||
|
ld c, $0
|
||||||
|
ld a, [wJumptableIndex]
|
||||||
|
call Function17254
|
||||||
|
call Function17418
|
||||||
|
call WaitSFX
|
||||||
|
ld a, [wJumptableIndex]
|
||||||
|
ld [CurPartySpecies], a
|
||||||
|
hlcoord 6, 3
|
||||||
|
ld d, $0
|
||||||
|
ld e, ANIM_MON_HATCH
|
||||||
|
predef AnimateFrontpic
|
||||||
|
pop af
|
||||||
|
ld [CurSpecies], a
|
||||||
|
ret
|
||||||
|
|
||||||
|
Function17363: ; 17363 (5:7363)
|
||||||
|
ld [PlayerHPPal], a
|
||||||
|
ld b, $b
|
||||||
|
ld c, $0
|
||||||
|
jp GetSGBLayout
|
||||||
|
|
||||||
|
Function1736d: ; 1736d (5:736d)
|
||||||
|
ld a, [wcf64]
|
||||||
|
dec a
|
||||||
|
and $7
|
||||||
|
cp $7
|
||||||
|
ret z
|
||||||
|
srl a
|
||||||
|
ret nc
|
||||||
|
swap a
|
||||||
|
srl a
|
||||||
|
add $4c
|
||||||
|
ld d, a
|
||||||
|
ld e, $58
|
||||||
|
ld a, $19
|
||||||
|
call Function3b2a
|
||||||
|
ld hl, $3
|
||||||
|
add hl, bc
|
||||||
|
ld [hl], $0
|
||||||
|
ld de, SFX_EGG_CRACK
|
||||||
|
jp PlaySFX
|
||||||
|
; 17393 (5:7393)
|
||||||
|
|
||||||
|
EggHatchGFX: ; 17393
|
||||||
|
INCBIN "gfx/unknown/017393.2bpp"
|
||||||
|
; 173b3
|
||||||
|
|
||||||
|
Function173b3: ; 173b3 (5:73b3)
|
||||||
|
callba Function8cf53
|
||||||
|
ld hl, Unknown_173ef
|
||||||
|
.loop
|
||||||
|
ld a, [hli]
|
||||||
|
cp $ff
|
||||||
|
jr z, .done
|
||||||
|
ld e, a
|
||||||
|
ld a, [hli]
|
||||||
|
ld d, a
|
||||||
|
ld a, [hli]
|
||||||
|
ld c, a
|
||||||
|
ld a, [hli]
|
||||||
|
ld b, a
|
||||||
|
push hl
|
||||||
|
push bc
|
||||||
|
ld a, $1c
|
||||||
|
call Function3b2a
|
||||||
|
ld hl, $3
|
||||||
|
add hl, bc
|
||||||
|
ld [hl], $0
|
||||||
|
pop de
|
||||||
|
ld a, e
|
||||||
|
ld hl, $1
|
||||||
|
add hl, bc
|
||||||
|
add [hl]
|
||||||
|
ld [hl], a
|
||||||
|
ld hl, $b
|
||||||
|
add hl, bc
|
||||||
|
ld [hl], d
|
||||||
|
pop hl
|
||||||
|
jr .loop
|
||||||
|
.done
|
||||||
|
ld de, SFX_EGG_HATCH
|
||||||
|
call PlaySFX
|
||||||
|
call Function1727f
|
||||||
|
ret
|
||||||
|
; 173ef (5:73ef)
|
||||||
|
|
||||||
|
Unknown_173ef: ; 173ef
|
||||||
|
; Probably OAM.
|
||||||
|
db $54, $48, $00, $3c
|
||||||
|
db $5c, $48, $01, $04
|
||||||
|
db $54, $50, $00, $30
|
||||||
|
db $5c, $50, $01, $10
|
||||||
|
db $54, $58, $02, $24
|
||||||
|
db $5c, $58, $03, $1c
|
||||||
|
db $50, $4c, $00, $36
|
||||||
|
db $60, $4c, $01, $0a
|
||||||
|
db $50, $54, $02, $2a
|
||||||
|
db $60, $54, $03, $16
|
||||||
|
db $ff
|
||||||
|
; 17418
|
||||||
|
|
||||||
|
Function17418: ; 17418 (5:7418)
|
||||||
|
ld c, $81
|
||||||
|
.asm_1741a
|
||||||
|
call Function1727f
|
||||||
|
dec c
|
||||||
|
jr nz, .asm_1741a
|
||||||
|
ret
|
||||||
|
|
||||||
|
Special_DayCareMon1: ; 17421
|
||||||
|
ld hl, UnknownText_0x17467
|
||||||
|
call PrintText
|
||||||
|
ld a, [wBreedMon1Species]
|
||||||
|
call PlayCry
|
||||||
|
ld a, [wDaycareLady]
|
||||||
|
bit 0, a
|
||||||
|
jr z, Function1745f
|
||||||
|
call KeepTextOpen
|
||||||
|
ld hl, wBreedMon2Nick
|
||||||
|
call Function1746c
|
||||||
|
jp PrintText
|
||||||
|
|
||||||
|
Special_DayCareMon2: ; 17440
|
||||||
|
ld hl, UnknownText_0x17462
|
||||||
|
call PrintText
|
||||||
|
ld a, [wBreedMon2Species]
|
||||||
|
call PlayCry
|
||||||
|
ld a, [wDaycareMan]
|
||||||
|
bit 0, a
|
||||||
|
jr z, Function1745f
|
||||||
|
call KeepTextOpen
|
||||||
|
ld hl, wBreedMon1Nick
|
||||||
|
call Function1746c
|
||||||
|
jp PrintText
|
||||||
|
|
||||||
|
Function1745f: ; 1745f
|
||||||
|
jp Functiona80
|
||||||
|
; 17462
|
||||||
|
|
||||||
|
UnknownText_0x17462: ; 0x17462
|
||||||
|
; It's @ that was left with the DAY-CARE LADY.
|
||||||
|
text_jump UnknownText_0x1c0df3
|
||||||
|
db "@"
|
||||||
|
; 0x17467
|
||||||
|
|
||||||
|
UnknownText_0x17467: ; 0x17467
|
||||||
|
; It's @ that was left with the DAY-CARE MAN.
|
||||||
|
text_jump UnknownText_0x1c0e24
|
||||||
|
db "@"
|
||||||
|
; 0x1746c
|
||||||
|
|
||||||
|
Function1746c: ; 1746c
|
||||||
|
push bc
|
||||||
|
ld de, StringBuffer1
|
||||||
|
ld bc, NAME_LENGTH
|
||||||
|
call CopyBytes
|
||||||
|
call Function16e1d
|
||||||
|
pop bc
|
||||||
|
ld a, [wd265]
|
||||||
|
ld hl, UnknownText_0x1749c
|
||||||
|
cp $ff
|
||||||
|
jr z, .asm_1749b
|
||||||
|
ld hl, UnknownText_0x174a1
|
||||||
|
and a
|
||||||
|
jr z, .asm_1749b
|
||||||
|
ld hl, UnknownText_0x174a6
|
||||||
|
cp 230
|
||||||
|
jr nc, .asm_1749b
|
||||||
|
cp 70
|
||||||
|
ld hl, UnknownText_0x174ab
|
||||||
|
jr nc, .asm_1749b
|
||||||
|
ld hl, UnknownText_0x174b0
|
||||||
|
|
||||||
|
.asm_1749b
|
||||||
|
ret
|
||||||
|
; 1749c
|
||||||
|
|
||||||
|
UnknownText_0x1749c: ; 0x1749c
|
||||||
|
; It's brimming with energy.
|
||||||
|
text_jump UnknownText_0x1c0e54
|
||||||
|
db "@"
|
||||||
|
; 0x174a1
|
||||||
|
|
||||||
|
UnknownText_0x174a1: ; 0x174a1
|
||||||
|
; It has no interest in @ .
|
||||||
|
text_jump UnknownText_0x1c0e6f
|
||||||
|
db "@"
|
||||||
|
; 0x174a6
|
||||||
|
|
||||||
|
UnknownText_0x174a6: ; 0x174a6
|
||||||
|
; It appears to care for @ .
|
||||||
|
text_jump UnknownText_0x1c0e8d
|
||||||
|
db "@"
|
||||||
|
; 0x174ab
|
||||||
|
|
||||||
|
UnknownText_0x174ab: ; 0x174ab
|
||||||
|
; It's friendly with @ .
|
||||||
|
text_jump UnknownText_0x1c0eac
|
||||||
|
db "@"
|
||||||
|
; 0x174b0
|
||||||
|
|
||||||
|
UnknownText_0x174b0: ; 0x174b0
|
||||||
|
; It shows interest in @ .
|
||||||
|
text_jump UnknownText_0x1c0ec6
|
||||||
|
db "@"
|
||||||
|
; 0x174b5
|
||||||
|
|
||||||
|
Function_174b5: ; 174b5
|
||||||
|
ld hl, String_174b9
|
||||||
|
ret
|
||||||
|
; 174b9
|
||||||
|
|
||||||
|
String_174b9: ; 174b9
|
||||||
|
db "@"
|
||||||
|
; 174ba
|
||||||
|
|
@ -72,9 +72,9 @@ RestartClock: ; 20021 (8:4021)
|
|||||||
call UpdateTime
|
call UpdateTime
|
||||||
call GetWeekday
|
call GetWeekday
|
||||||
ld [Buffer4], a
|
ld [Buffer4], a
|
||||||
ld a, [hHours] ; $ff00+$94
|
ld a, [hHours]
|
||||||
ld [Buffer5], a
|
ld [Buffer5], a
|
||||||
ld a, [hMinutes] ; $ff00+$96
|
ld a, [hMinutes]
|
||||||
ld [Buffer6], a
|
ld [Buffer6], a
|
||||||
|
|
||||||
.loop
|
.loop
|
||||||
@ -223,7 +223,7 @@ RestartClock: ; 20021 (8:4021)
|
|||||||
.unreferenced: ; 20160
|
.unreferenced: ; 20160
|
||||||
ld a, [Buffer3]
|
ld a, [Buffer3]
|
||||||
ld b, a
|
ld b, a
|
||||||
call GetTileCoord
|
call Coord2Tile
|
||||||
ret
|
ret
|
||||||
; 20168
|
; 20168
|
||||||
|
|
||||||
@ -233,7 +233,7 @@ RestartClock: ; 20021 (8:4021)
|
|||||||
ld a, [Buffer3]
|
ld a, [Buffer3]
|
||||||
dec a
|
dec a
|
||||||
ld b, a
|
ld b, a
|
||||||
call GetTileCoord
|
call Coord2Tile
|
||||||
pop de
|
pop de
|
||||||
ld [hl], d
|
ld [hl], d
|
||||||
ld bc, 2 * SCREEN_WIDTH
|
ld bc, 2 * SCREEN_WIDTH
|
||||||
|
@ -300,7 +300,7 @@ Function109956: ; 109956 (42:5956)
|
|||||||
|
|
||||||
Function10995e: ; 10995e (42:595e)
|
Function10995e: ; 10995e (42:595e)
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
jp Function109951
|
jp Function109951
|
||||||
|
|
||||||
Function109964: ; 109964 (42:5964)
|
Function109964: ; 109964 (42:5964)
|
||||||
@ -317,13 +317,13 @@ Function109964: ; 109964 (42:5964)
|
|||||||
|
|
||||||
Function10997b: ; 10997b (42:597b)
|
Function10997b: ; 10997b (42:597b)
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
ld a, $8
|
ld a, $8
|
||||||
ld [Requested2bpp], a
|
ld [Requested2bpp], a
|
||||||
jp Function109951
|
jp Function109951
|
||||||
|
|
||||||
Function109986: ; 109986 (42:5986)
|
Function109986: ; 109986 (42:5986)
|
||||||
ld a, [rLY] ; $ff00+$44
|
ld a, [rLY]
|
||||||
cp $30
|
cp $30
|
||||||
jr c, Function109986
|
jr c, Function109986
|
||||||
ld a, [wcf66]
|
ld a, [wcf66]
|
||||||
@ -523,9 +523,9 @@ endr
|
|||||||
|
|
||||||
Function109a95: ; 109a95 (42:5a95)
|
Function109a95: ; 109a95 (42:5a95)
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
ld a, $c
|
ld a, $c
|
||||||
ld [hBGMapAddress], a ; $ff00+$d6
|
ld [hBGMapAddress], a
|
||||||
ld a, $28
|
ld a, $28
|
||||||
hlcoord 0, 0
|
hlcoord 0, 0
|
||||||
ld bc, $168
|
ld bc, $168
|
||||||
@ -558,8 +558,8 @@ Function109a95: ; 109a95 (42:5a95)
|
|||||||
call ByteFill
|
call ByteFill
|
||||||
call Function3200
|
call Function3200
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
ld [hBGMapAddress], a ; $ff00+$d6
|
ld [hBGMapAddress], a
|
||||||
hlcoord 0, 0
|
hlcoord 0, 0
|
||||||
call Function109aff
|
call Function109aff
|
||||||
call Function3200
|
call Function3200
|
||||||
|
@ -1813,7 +1813,7 @@ Function28b87: ; 28b87
|
|||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [wc6fd], a
|
ld [wc6fd], a
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wc6fe], a
|
ld [wPlayerMinimized], a
|
||||||
ld a, [DefaultFlypoint]
|
ld a, [DefaultFlypoint]
|
||||||
ld hl, PartyMon1Species
|
ld hl, PartyMon1Species
|
||||||
call GetPartyLocation
|
call GetPartyLocation
|
||||||
@ -2810,7 +2810,7 @@ Function2942e: ; 2942e
|
|||||||
ld [CurPartySpecies], a
|
ld [CurPartySpecies], a
|
||||||
ld a, [wc6fd]
|
ld a, [wc6fd]
|
||||||
ld [TempMonDVs], a
|
ld [TempMonDVs], a
|
||||||
ld a, [wc6fe]
|
ld a, [wPlayerMinimized]
|
||||||
ld [TempMonDVs + 1], a
|
ld [TempMonDVs + 1], a
|
||||||
ld b, $1a
|
ld b, $1a
|
||||||
call GetSGBLayout
|
call GetSGBLayout
|
||||||
|
@ -2995,7 +2995,7 @@ Function56cd: ; 56cd
|
|||||||
jr nc, .ok8
|
jr nc, .ok8
|
||||||
ld c, a
|
ld c, a
|
||||||
push bc
|
push bc
|
||||||
call GetTileCoord
|
call Coord2Tile
|
||||||
pop bc
|
pop bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
cp $60
|
cp $60
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
Function2400e:: ; 2400e
|
Function2400e:: ; 2400e
|
||||||
ld hl, Function1c66
|
ld hl, CopyMenuData2
|
||||||
ld a, [wcf94]
|
ld a, [wcf94]
|
||||||
rst FarCall
|
rst FarCall
|
||||||
call Function24085
|
call Function24085
|
||||||
@ -10,7 +10,7 @@ Function2400e:: ; 2400e
|
|||||||
; 24022
|
; 24022
|
||||||
|
|
||||||
Function24022:: ; 24022
|
Function24022:: ; 24022
|
||||||
ld hl, Function1c66
|
ld hl, CopyMenuData2
|
||||||
ld a, [wcf94]
|
ld a, [wcf94]
|
||||||
rst FarCall
|
rst FarCall
|
||||||
call Function24085
|
call Function24085
|
||||||
@ -22,7 +22,7 @@ Function24022:: ; 24022
|
|||||||
; 2403c
|
; 2403c
|
||||||
|
|
||||||
Function2403c:: ; 2403c
|
Function2403c:: ; 2403c
|
||||||
ld hl, Function1c66
|
ld hl, CopyMenuData2
|
||||||
ld a, [wcf94]
|
ld a, [wcf94]
|
||||||
rst FarCall
|
rst FarCall
|
||||||
call Function24085
|
call Function24085
|
||||||
@ -126,8 +126,8 @@ Function240db: ; 240db
|
|||||||
ld e, [hl]
|
ld e, [hl]
|
||||||
inc hl
|
inc hl
|
||||||
ld d, [hl]
|
ld d, [hl]
|
||||||
call Function1cc6
|
call GetMenuTextStartCoord
|
||||||
call GetTileCoord
|
call Coord2Tile
|
||||||
call Function240d3
|
call Function240d3
|
||||||
ld b, a
|
ld b, a
|
||||||
.asm_240eb
|
.asm_240eb
|
||||||
@ -166,7 +166,7 @@ Function240db: ; 240db
|
|||||||
|
|
||||||
|
|
||||||
Function2411a: ; 2411a (9:411a)
|
Function2411a: ; 2411a (9:411a)
|
||||||
call Function1cc6
|
call GetMenuTextStartCoord
|
||||||
ld a, b
|
ld a, b
|
||||||
ld [wcfa1], a
|
ld [wcfa1], a
|
||||||
dec c
|
dec c
|
||||||
@ -538,7 +538,7 @@ Function24329: ; 24329
|
|||||||
ld b, a
|
ld b, a
|
||||||
ld a, [wcfa2]
|
ld a, [wcfa2]
|
||||||
ld c, a
|
ld c, a
|
||||||
call GetTileCoord
|
call Coord2Tile
|
||||||
ld a, [wcfa7]
|
ld a, [wcfa7]
|
||||||
swap a
|
swap a
|
||||||
and $f
|
and $f
|
||||||
|
@ -44,7 +44,7 @@ Jumptable_10030: ; 10030 (4:4030)
|
|||||||
|
|
||||||
Function10046: ; 10046 (4:4046)
|
Function10046: ; 10046 (4:4046)
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
call Function10955
|
call Function10955
|
||||||
ld a, [wcf64]
|
ld a, [wcf64]
|
||||||
ld [wJumptableIndex], a
|
ld [wJumptableIndex], a
|
||||||
@ -113,7 +113,7 @@ Function100d3: ; 100d3 (4:40d3)
|
|||||||
call ClearPocketList
|
call ClearPocketList
|
||||||
call DrawPocketName
|
call DrawPocketName
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
call WaitBGMap_DrawPackGFX
|
call WaitBGMap_DrawPackGFX
|
||||||
call Function10866
|
call Function10866
|
||||||
ret
|
ret
|
||||||
@ -203,7 +203,7 @@ Function10159: ; 10159
|
|||||||
ld [Options], a
|
ld [Options], a
|
||||||
.asm_10179
|
.asm_10179
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
call Function10955
|
call Function10955
|
||||||
call WaitBGMap_DrawPackGFX
|
call WaitBGMap_DrawPackGFX
|
||||||
call Function10a40
|
call Function10a40
|
||||||
@ -478,7 +478,7 @@ Function10311: ; 10311
|
|||||||
jr z, .NoPokemon
|
jr z, .NoPokemon
|
||||||
call DoItemEffect
|
call DoItemEffect
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
call Function10955
|
call Function10955
|
||||||
call WaitBGMap_DrawPackGFX
|
call WaitBGMap_DrawPackGFX
|
||||||
call Function10a40
|
call Function10a40
|
||||||
@ -634,7 +634,7 @@ Function103fd: ; 103fd
|
|||||||
pop af
|
pop af
|
||||||
ld [Options], a
|
ld [Options], a
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
call Function10955
|
call Function10955
|
||||||
call WaitBGMap_DrawPackGFX
|
call WaitBGMap_DrawPackGFX
|
||||||
call Function10a40
|
call Function10a40
|
||||||
@ -702,7 +702,7 @@ Jumptable_104c3: ; 104c3 (4:44c3)
|
|||||||
|
|
||||||
Function104d9: ; 104d9 (4:44d9)
|
Function104d9: ; 104d9 (4:44d9)
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
call Function10955
|
call Function10955
|
||||||
ld a, [wcf64]
|
ld a, [wcf64]
|
||||||
ld [wJumptableIndex], a
|
ld [wJumptableIndex], a
|
||||||
@ -771,7 +771,7 @@ Function10566: ; 10566 (4:4566)
|
|||||||
call ClearPocketList
|
call ClearPocketList
|
||||||
call DrawPocketName
|
call DrawPocketName
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
call WaitBGMap_DrawPackGFX
|
call WaitBGMap_DrawPackGFX
|
||||||
ld hl, UnknownText_0x10b0c
|
ld hl, UnknownText_0x10b0c
|
||||||
call Function10889
|
call Function10889
|
||||||
@ -915,7 +915,7 @@ Function105dc: ; 105dc (4:45dc)
|
|||||||
and a
|
and a
|
||||||
jr nz, .asm_1067e
|
jr nz, .asm_1067e
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
call Function10955
|
call Function10955
|
||||||
call WaitBGMap_DrawPackGFX
|
call WaitBGMap_DrawPackGFX
|
||||||
call Function10a40
|
call Function10a40
|
||||||
|
@ -182,7 +182,7 @@ ChooseRandomCaller: ; 900bf (24:40bf)
|
|||||||
; Sample a random number between 0 and 31.
|
; Sample a random number between 0 and 31.
|
||||||
ld c, a
|
ld c, a
|
||||||
call Random
|
call Random
|
||||||
ld a, [hRandomAdd] ; $ff00+$e1
|
ld a, [hRandomAdd]
|
||||||
swap a
|
swap a
|
||||||
and $1f
|
and $1f
|
||||||
; Compute that number modulo the number of available callers.
|
; Compute that number modulo the number of available callers.
|
||||||
|
@ -209,7 +209,7 @@ Function40136: ; 40136 (10:4136)
|
|||||||
|
|
||||||
Function4013c: ; 4013c (10:413c)
|
Function4013c: ; 4013c (10:413c)
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
call ClearSprites
|
call ClearSprites
|
||||||
xor a
|
xor a
|
||||||
hlcoord 0, 0, AttrMap
|
hlcoord 0, 0, AttrMap
|
||||||
@ -226,7 +226,7 @@ Function4013c: ; 4013c (10:413c)
|
|||||||
call Function41af7
|
call Function41af7
|
||||||
call Function4074c
|
call Function4074c
|
||||||
ld a, $5
|
ld a, $5
|
||||||
ld [hSCX], a ; $ff00+$cf
|
ld [hSCX], a
|
||||||
ld a, [wc7d4]
|
ld a, [wc7d4]
|
||||||
cp $1
|
cp $1
|
||||||
ld a, $4a
|
ld a, $4a
|
||||||
@ -234,9 +234,9 @@ Function4013c: ; 4013c (10:413c)
|
|||||||
ld a, $47
|
ld a, $47
|
||||||
|
|
||||||
.asm_4017b
|
.asm_4017b
|
||||||
ld [hWX], a ; $ff00+$d1
|
ld [hWX], a
|
||||||
xor a
|
xor a
|
||||||
ld [hWY], a ; $ff00+$d2
|
ld [hWY], a
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
call Function41af7
|
call Function41af7
|
||||||
ld a, $ff
|
ld a, $ff
|
||||||
@ -272,7 +272,7 @@ Function401ae: ; 401ae (10:41ae)
|
|||||||
ret nc
|
ret nc
|
||||||
call Function41148
|
call Function41148
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
call Function40b0f
|
call Function40b0f
|
||||||
call Function41ad7
|
call Function41ad7
|
||||||
call Function41af7
|
call Function41af7
|
||||||
@ -293,9 +293,9 @@ Function401ae: ; 401ae (10:41ae)
|
|||||||
ld a, $7
|
ld a, $7
|
||||||
ld [wJumptableIndex], a
|
ld [wJumptableIndex], a
|
||||||
xor a
|
xor a
|
||||||
ld [hSCX], a ; $ff00+$cf
|
ld [hSCX], a
|
||||||
ld a, $a7
|
ld a, $a7
|
||||||
ld [hWX], a ; $ff00+$d1
|
ld [hWX], a
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -304,9 +304,9 @@ Function401ae: ; 401ae (10:41ae)
|
|||||||
ld a, $5
|
ld a, $5
|
||||||
ld [wJumptableIndex], a
|
ld [wJumptableIndex], a
|
||||||
xor a
|
xor a
|
||||||
ld [hSCX], a ; $ff00+$cf
|
ld [hSCX], a
|
||||||
ld a, $a7
|
ld a, $a7
|
||||||
ld [hWX], a ; $ff00+$d1
|
ld [hWX], a
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -320,7 +320,7 @@ Function40217: ; 40217 (10:4217)
|
|||||||
xor a
|
xor a
|
||||||
ld [wPokedexStatus], a
|
ld [wPokedexStatus], a
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
call ClearSprites
|
call ClearSprites
|
||||||
call Function41478
|
call Function41478
|
||||||
call Function407fd
|
call Function407fd
|
||||||
@ -331,7 +331,7 @@ Function40217: ; 40217 (10:4217)
|
|||||||
call Function40ba0
|
call Function40ba0
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
ld a, $a7
|
ld a, $a7
|
||||||
ld [hWX], a ; $ff00+$d1
|
ld [hWX], a
|
||||||
call Function40bb1
|
call Function40bb1
|
||||||
ld [CurPartySpecies], a
|
ld [CurPartySpecies], a
|
||||||
ld a, $4
|
ld a, $4
|
||||||
@ -392,7 +392,7 @@ Function402aa: ; 402aa (10:42aa)
|
|||||||
xor a
|
xor a
|
||||||
ld [wPokedexStatus], a
|
ld [wPokedexStatus], a
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
call Function407fd
|
call Function407fd
|
||||||
call Function4134f
|
call Function4134f
|
||||||
call Function41478
|
call Function41478
|
||||||
@ -509,7 +509,7 @@ Function4038d: ; 4038d
|
|||||||
|
|
||||||
Function4039d: ; 4039d (10:439d)
|
Function4039d: ; 4039d (10:439d)
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
call ClearSprites
|
call ClearSprites
|
||||||
call Function4087c
|
call Function4087c
|
||||||
call Function4134f
|
call Function4134f
|
||||||
@ -615,7 +615,7 @@ Function4043a: ; 4043a (10:443a)
|
|||||||
|
|
||||||
Function40443: ; 40443 (10:4443)
|
Function40443: ; 40443 (10:4443)
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
call ClearSprites
|
call ClearSprites
|
||||||
call Function408f0
|
call Function408f0
|
||||||
call Function4134f
|
call Function4134f
|
||||||
@ -723,7 +723,7 @@ Function40501: ; 40501
|
|||||||
|
|
||||||
Function4050a: ; 4050a (10:450a)
|
Function4050a: ; 4050a (10:450a)
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
xor a
|
xor a
|
||||||
hlcoord 0, 0, AttrMap
|
hlcoord 0, 0, AttrMap
|
||||||
ld bc, $168
|
ld bc, $168
|
||||||
@ -739,11 +739,11 @@ Function4050a: ; 4050a (10:450a)
|
|||||||
call Function41af7
|
call Function41af7
|
||||||
call Function40962
|
call Function40962
|
||||||
ld a, $5
|
ld a, $5
|
||||||
ld [hSCX], a ; $ff00+$cf
|
ld [hSCX], a
|
||||||
ld a, $4a
|
ld a, $4a
|
||||||
ld [hWX], a ; $ff00+$d1
|
ld [hWX], a
|
||||||
xor a
|
xor a
|
||||||
ld [hWY], a ; $ff00+$d2
|
ld [hWY], a
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
call Function41af7
|
call Function41af7
|
||||||
callba Function1de1d1
|
callba Function1de1d1
|
||||||
@ -768,7 +768,7 @@ Function40562: ; 40562 (10:4562)
|
|||||||
ret nc
|
ret nc
|
||||||
call Function41281
|
call Function41281
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
call Function40b0f
|
call Function40b0f
|
||||||
call Function41ad7
|
call Function41ad7
|
||||||
call Function41af7
|
call Function41af7
|
||||||
@ -797,9 +797,9 @@ Function40562: ; 40562 (10:4562)
|
|||||||
ld a, $5
|
ld a, $5
|
||||||
ld [wJumptableIndex], a
|
ld [wJumptableIndex], a
|
||||||
xor a
|
xor a
|
||||||
ld [hSCX], a ; $ff00+$cf
|
ld [hSCX], a
|
||||||
ld a, $a7
|
ld a, $a7
|
||||||
ld [hWX], a ; $ff00+$d1
|
ld [hWX], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function405bd: ; 405bd (10:45bd)
|
Function405bd: ; 405bd (10:45bd)
|
||||||
@ -876,14 +876,14 @@ Function40610: ; 40610 (10:4610)
|
|||||||
.asm_40635
|
.asm_40635
|
||||||
push af
|
push af
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
pop af
|
pop af
|
||||||
call Function40654
|
call Function40654
|
||||||
call Function41a58
|
call Function41a58
|
||||||
call Function40658
|
call Function40658
|
||||||
callba Functionfba2e
|
callba Functionfba2e
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
ret
|
ret
|
||||||
@ -1773,7 +1773,7 @@ String_40ee4: ; 40ee4
|
|||||||
|
|
||||||
Function40f08: ; 40f08 (10:4f08)
|
Function40f08: ; 40f08 (10:4f08)
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
hlcoord 0, 12
|
hlcoord 0, 12
|
||||||
ld bc, $412
|
ld bc, $412
|
||||||
call Function40ad5
|
call Function40ad5
|
||||||
@ -1781,7 +1781,7 @@ Function40f08: ; 40f08 (10:4f08)
|
|||||||
hlcoord 1, 14
|
hlcoord 1, 14
|
||||||
call PlaceString
|
call PlaceString
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
ld c, $40
|
ld c, $40
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
ld de, SFX_CHANGE_DEX_MODE
|
ld de, SFX_CHANGE_DEX_MODE
|
||||||
@ -1861,7 +1861,7 @@ Function40f84: ; 40f84
|
|||||||
|
|
||||||
Function40fa8: ; 40fa8 (10:4fa8)
|
Function40fa8: ; 40fa8 (10:4fa8)
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
hlcoord 9, 3
|
hlcoord 9, 3
|
||||||
ld bc, $408
|
ld bc, $408
|
||||||
ld a, $7f
|
ld a, $7f
|
||||||
@ -1873,7 +1873,7 @@ Function40fa8: ; 40fa8 (10:4fa8)
|
|||||||
hlcoord 9, 6
|
hlcoord 9, 6
|
||||||
call Function40fcd
|
call Function40fcd
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function40fcd: ; 40fcd (10:4fcd)
|
Function40fcd: ; 40fcd (10:4fcd)
|
||||||
@ -2363,16 +2363,16 @@ Function413fe: ; 413fe (10:53fe)
|
|||||||
jp FillBoxWithByte
|
jp FillBoxWithByte
|
||||||
|
|
||||||
Function41401: ; 41401 (10:5401)
|
Function41401: ; 41401 (10:5401)
|
||||||
ld a, [rSVBK] ; $ff00+$70
|
ld a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
ld a, $5
|
ld a, $5
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
ld hl, Unkn1Pals
|
ld hl, Unkn1Pals
|
||||||
ld bc, $40
|
ld bc, $40
|
||||||
xor a
|
xor a
|
||||||
call ByteFill
|
call ByteFill
|
||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
|
|
||||||
Function41415: ; 41415
|
Function41415: ; 41415
|
||||||
ld a, $ff
|
ld a, $ff
|
||||||
|
@ -1679,15 +1679,15 @@ BuenasPassword1: ; b8f12 (2e:4f12)
|
|||||||
|
|
||||||
.PlayPassword: ; b8f22 (2e:4f22)
|
.PlayPassword: ; b8f22 (2e:4f22)
|
||||||
call StartRadioStation
|
call StartRadioStation
|
||||||
ld a, [hBGMapMode] ; $ff00+$d4
|
ld a, [hBGMapMode]
|
||||||
push af
|
push af
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
ld de, String_b9171
|
ld de, String_b9171
|
||||||
hlcoord 2, 9
|
hlcoord 2, 9
|
||||||
call PlaceString
|
call PlaceString
|
||||||
pop af
|
pop af
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
ld hl, UnknownText_0xb9182
|
ld hl, UnknownText_0xb9182
|
||||||
ld a, BUENAS_PASSWORD_2
|
ld a, BUENAS_PASSWORD_2
|
||||||
jp NextRadioLine
|
jp NextRadioLine
|
||||||
@ -1951,12 +1951,12 @@ BuenasPassword19: ; b9122 (2e:5122)
|
|||||||
jp NextRadioLine
|
jp NextRadioLine
|
||||||
|
|
||||||
BuenasPassword20: ; b912a (2e:512a)
|
BuenasPassword20: ; b912a (2e:512a)
|
||||||
ld a, [hBGMapMode] ; $ff00+$d4
|
ld a, [hBGMapMode]
|
||||||
push af
|
push af
|
||||||
callba NoRadioMusic
|
callba NoRadioMusic
|
||||||
callba NoRadioName
|
callba NoRadioName
|
||||||
pop af
|
pop af
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
ld hl, WeeklyFlags
|
ld hl, WeeklyFlags
|
||||||
res 7, [hl]
|
res 7, [hl]
|
||||||
ld a, BUENAS_PASSWORD
|
ld a, BUENAS_PASSWORD
|
||||||
@ -1980,7 +1980,7 @@ BuenasPassword21: ; b9152 (2e:5152)
|
|||||||
|
|
||||||
BuenasPasswordCheckTime: ; b9169 (2e:5169)
|
BuenasPasswordCheckTime: ; b9169 (2e:5169)
|
||||||
call UpdateTime
|
call UpdateTime
|
||||||
ld a, [hHours] ; $ff00+$94
|
ld a, [hHours]
|
||||||
cp 18 ; 6 PM
|
cp 18 ; 6 PM
|
||||||
ret
|
ret
|
||||||
; b9171 (2e:5171)
|
; b9171 (2e:5171)
|
||||||
|
@ -371,7 +371,7 @@ NoRadioStation: ; 91888 (24:5888)
|
|||||||
ld [wc6da], a
|
ld [wc6da], a
|
||||||
ld [wc6db], a
|
ld [wc6db], a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
NoRadioMusic: ; 9189d (24:589d)
|
NoRadioMusic: ; 9189d (24:589d)
|
||||||
@ -383,7 +383,7 @@ NoRadioMusic: ; 9189d (24:589d)
|
|||||||
|
|
||||||
NoRadioName: ; 918a9 (24:58a9)
|
NoRadioName: ; 918a9 (24:58a9)
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
hlcoord 1, 8
|
hlcoord 1, 8
|
||||||
lb bc, 3, 18
|
lb bc, 3, 18
|
||||||
call ClearBox
|
call ClearBox
|
||||||
|
@ -203,7 +203,7 @@ Function8b09e: ; 8b09e
|
|||||||
call CopyMenuDataHeader
|
call CopyMenuDataHeader
|
||||||
call MenuBox
|
call MenuBox
|
||||||
call UpdateSprites
|
call UpdateSprites
|
||||||
call GetMemTileCoord
|
call MenuBoxCoord2Tile
|
||||||
ld bc, $0015
|
ld bc, $0015
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld de, .Points_string
|
ld de, .Points_string
|
||||||
|
@ -166,7 +166,7 @@ Kurt_SelectQuantity: ; 880c2
|
|||||||
db 0, 0, -1, 0 ; XXX
|
db 0, 0, -1, 0 ; XXX
|
||||||
|
|
||||||
.PlaceApricornName: ; 88116
|
.PlaceApricornName: ; 88116
|
||||||
call GetMemTileCoord
|
call MenuBoxCoord2Tile
|
||||||
ld de, $0015
|
ld de, $0015
|
||||||
add hl, de
|
add hl, de
|
||||||
ld d, h
|
ld d, h
|
||||||
@ -176,7 +176,7 @@ Kurt_SelectQuantity: ; 880c2
|
|||||||
; 88126
|
; 88126
|
||||||
|
|
||||||
PlaceApricornQuantity: ; 88126
|
PlaceApricornQuantity: ; 88126
|
||||||
call GetMemTileCoord
|
call MenuBoxCoord2Tile
|
||||||
ld de, $0032
|
ld de, $0032
|
||||||
add hl, de
|
add hl, de
|
||||||
ld [hl], "×"
|
ld [hl], "×"
|
||||||
|
@ -125,7 +125,7 @@ Special_DisplayUnownWords: ; 8ae68
|
|||||||
call MenuBox
|
call MenuBox
|
||||||
call UpdateSprites
|
call UpdateSprites
|
||||||
call Function321c
|
call Function321c
|
||||||
call GetMemTileCoord
|
call MenuBoxCoord2Tile
|
||||||
inc hl
|
inc hl
|
||||||
ld d, $0
|
ld d, $0
|
||||||
ld e, $14
|
ld e, $14
|
||||||
|
6
home.asm
6
home.asm
@ -1147,7 +1147,7 @@ GetMoveName:: ; 34f8
|
|||||||
|
|
||||||
|
|
||||||
Function350c:: ; 350c
|
Function350c:: ; 350c
|
||||||
call Function1c66
|
call CopyMenuData2
|
||||||
ld a, [hROMBank]
|
ld a, [hROMBank]
|
||||||
push af
|
push af
|
||||||
|
|
||||||
@ -1186,7 +1186,7 @@ Function352f:: ; 352f
|
|||||||
sub c
|
sub c
|
||||||
ld e, a
|
ld e, a
|
||||||
push de
|
push de
|
||||||
call GetTileCoord
|
call Coord2Tile
|
||||||
pop bc
|
pop bc
|
||||||
jp TextBox
|
jp TextBox
|
||||||
; 354b
|
; 354b
|
||||||
@ -2180,7 +2180,7 @@ Function3f6e:: ; 3f6e
|
|||||||
; 3f7c
|
; 3f7c
|
||||||
|
|
||||||
Function3f7c:: ; 3f7c
|
Function3f7c:: ; 3f7c
|
||||||
call GetMemTileCoord
|
call MenuBoxCoord2Tile
|
||||||
call GetMenuBoxDims
|
call GetMenuBoxDims
|
||||||
dec b
|
dec b
|
||||||
dec c
|
dec c
|
||||||
|
@ -7,11 +7,11 @@ LoadMenuDataHeader::
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
CopyMenuDataHeader::
|
CopyMenuDataHeader::
|
||||||
ld de, wcf81
|
ld de, wMenuDataHeader
|
||||||
ld bc, 16
|
ld bc, wMenuDataHeaderEnd - wMenuDataHeader
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
ld a, [hROMBank]
|
ld a, [hROMBank]
|
||||||
ld [wcf8a], a
|
ld [wMenuDataBank], a
|
||||||
ret
|
ret
|
||||||
; 0x1d4b
|
; 0x1d4b
|
||||||
|
|
||||||
@ -78,7 +78,7 @@ InterpretMenu2::
|
|||||||
call UpdateSprites
|
call UpdateSprites
|
||||||
call Function1c89
|
call Function1c89
|
||||||
call Function321c
|
call Function321c
|
||||||
call Function1c66
|
call CopyMenuData2
|
||||||
ld a, [wMenuData2Flags]
|
ld a, [wMenuData2Flags]
|
||||||
bit 7, a
|
bit 7, a
|
||||||
jr z, .cancel
|
jr z, .cancel
|
||||||
@ -103,11 +103,11 @@ GetMenu2:: ; 1dab
|
|||||||
ret
|
ret
|
||||||
; 1db8
|
; 1db8
|
||||||
|
|
||||||
Function1db8::
|
CopyNameFromMenu::
|
||||||
push hl
|
push hl
|
||||||
push bc
|
push bc
|
||||||
push af
|
push af
|
||||||
ld hl, wcf86
|
ld hl, wMenuData2Pointer
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld h, [hl]
|
ld h, [hl]
|
||||||
ld l, a
|
ld l, a
|
||||||
@ -126,7 +126,7 @@ endr
|
|||||||
|
|
||||||
|
|
||||||
YesNoBox:: ; 1dcf
|
YesNoBox:: ; 1dcf
|
||||||
lb bc, 14, 7
|
lb bc, SCREEN_WIDTH - 6, 7
|
||||||
|
|
||||||
PlaceYesNoBox:: ; 1dd2
|
PlaceYesNoBox:: ; 1dd2
|
||||||
jr _YesNoBox
|
jr _YesNoBox
|
||||||
@ -152,11 +152,11 @@ _YesNoBox:: ; 1dd9
|
|||||||
.okay
|
.okay
|
||||||
ld a, b
|
ld a, b
|
||||||
ld [wMenuBorderLeftCoord], a
|
ld [wMenuBorderLeftCoord], a
|
||||||
add $5
|
add 5
|
||||||
ld [wMenuBorderRightCoord], a
|
ld [wMenuBorderRightCoord], a
|
||||||
ld a, c
|
ld a, c
|
||||||
ld [wMenuBorderTopCoord], a
|
ld [wMenuBorderTopCoord], a
|
||||||
add $4
|
add 4
|
||||||
ld [wMenuBorderBottomCoord], a
|
ld [wMenuBorderBottomCoord], a
|
||||||
call BackUpTiles
|
call BackUpTiles
|
||||||
|
|
||||||
@ -246,7 +246,7 @@ SetUpMenu:: ; 1e70
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
MenuFunc_1e7f::
|
MenuFunc_1e7f::
|
||||||
call Function1c66
|
call CopyMenuData2
|
||||||
call Function1ebd
|
call Function1ebd
|
||||||
call Function1ea6
|
call Function1ea6
|
||||||
call MenuBox
|
call MenuBox
|
||||||
@ -310,7 +310,7 @@ Function1ebd:: ; 1ebd
|
|||||||
; 1eda
|
; 1eda
|
||||||
|
|
||||||
Function1eda:: ; 1eda
|
Function1eda:: ; 1eda
|
||||||
call GetMemTileCoord
|
call MenuBoxCoord2Tile
|
||||||
ld bc, $002a
|
ld bc, $002a
|
||||||
add hl, bc
|
add hl, bc
|
||||||
.asm_1ee1
|
.asm_1ee1
|
||||||
@ -489,7 +489,7 @@ endr
|
|||||||
ResetTextRelatedRAM:: ; 1fbf
|
ResetTextRelatedRAM:: ; 1fbf
|
||||||
ld hl, wcf71
|
ld hl, wcf71
|
||||||
call .bytefill
|
call .bytefill
|
||||||
ld hl, wcf81
|
ld hl, wMenuDataHeader
|
||||||
call .bytefill
|
call .bytefill
|
||||||
ld hl, wMenuData2Flags
|
ld hl, wMenuData2Flags
|
||||||
call .bytefill
|
call .bytefill
|
||||||
@ -527,7 +527,7 @@ Function1ff8:: ; 1ff8
|
|||||||
push af
|
push af
|
||||||
and $3
|
and $3
|
||||||
jr z, .nosound
|
jr z, .nosound
|
||||||
ld hl, wcf81
|
ld hl, wMenuFlags
|
||||||
bit 3, [hl]
|
bit 3, [hl]
|
||||||
jr nz, .nosound
|
jr nz, .nosound
|
||||||
call PlayClickSFX
|
call PlayClickSFX
|
||||||
|
@ -22,9 +22,9 @@ WriteBackup:: ; 0x1c17
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
RestoreTileBackup:: ; 0x1c23
|
RestoreTileBackup:: ; 0x1c23
|
||||||
call GetMemTileCoord
|
call MenuBoxCoord2Tile
|
||||||
call .copy
|
call .copy
|
||||||
call GetMemAttrCoord
|
call MenuBoxCoord2Attr
|
||||||
call .copy
|
call .copy
|
||||||
ret
|
ret
|
||||||
; 0x1c30
|
; 0x1c30
|
||||||
@ -56,7 +56,7 @@ RestoreTileBackup:: ; 0x1c23
|
|||||||
|
|
||||||
Function1c47:: ; 0x1c47
|
Function1c47:: ; 0x1c47
|
||||||
ld b, $10
|
ld b, $10
|
||||||
ld de, wcf81
|
ld de, wMenuFlags
|
||||||
.loop
|
.loop
|
||||||
ld a, [hld]
|
ld a, [hld]
|
||||||
ld [de], a
|
ld [de], a
|
||||||
@ -79,17 +79,17 @@ GetMenuBoxDims:: ; 0x1c53
|
|||||||
ret
|
ret
|
||||||
; 0x1c66
|
; 0x1c66
|
||||||
|
|
||||||
Function1c66:: ; 1c66
|
CopyMenuData2:: ; 1c66
|
||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
push bc
|
push bc
|
||||||
push af
|
push af
|
||||||
ld hl, wcf86
|
ld hl, wMenuData2Pointer
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld h, [hl]
|
ld h, [hl]
|
||||||
ld l, a
|
ld l, a
|
||||||
ld de, wMenuData2Flags
|
ld de, wMenuData2Flags
|
||||||
ld bc, $0010
|
ld bc, wMenuData2End - wMenuData2Flags
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
pop af
|
pop af
|
||||||
pop bc
|
pop bc
|
||||||
@ -111,30 +111,31 @@ Function1c7e:: ; 1c7e
|
|||||||
; 1c89
|
; 1c89
|
||||||
|
|
||||||
Function1c89:: ; 1c89
|
Function1c89:: ; 1c89
|
||||||
call Function1c66
|
call CopyMenuData2
|
||||||
ld hl, wcf86
|
ld hl, wMenuData2Pointer
|
||||||
ld e, [hl]
|
ld e, [hl]
|
||||||
inc hl
|
inc hl
|
||||||
ld d, [hl]
|
ld d, [hl]
|
||||||
call Function1cc6
|
call GetMenuTextStartCoord
|
||||||
call GetTileCoord
|
call Coord2Tile ; hl now contains the TileMap address where we will start printing text.
|
||||||
inc de
|
inc de
|
||||||
ld a, [de]
|
ld a, [de] ; Number of items
|
||||||
inc de
|
inc de
|
||||||
ld b, a
|
ld b, a
|
||||||
.asm_1c9c
|
.loop
|
||||||
push bc
|
push bc
|
||||||
call PlaceString
|
call PlaceString
|
||||||
inc de
|
inc de
|
||||||
ld bc, $0028
|
ld bc, 2 * SCREEN_WIDTH
|
||||||
add hl, bc
|
add hl, bc
|
||||||
pop bc
|
pop bc
|
||||||
dec b
|
dec b
|
||||||
jr nz, .asm_1c9c
|
jr nz, .loop
|
||||||
ld a, [wMenuData2Flags]
|
ld a, [wMenuData2Flags]
|
||||||
bit 4, a
|
bit 4, a
|
||||||
ret z
|
ret z
|
||||||
call GetMemTileCoord
|
|
||||||
|
call MenuBoxCoord2Tile
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
ld c, a
|
ld c, a
|
||||||
inc de
|
inc de
|
||||||
@ -144,38 +145,40 @@ Function1c89:: ; 1c89
|
|||||||
; 1cbb
|
; 1cbb
|
||||||
|
|
||||||
MenuBox:: ; 1cbb
|
MenuBox:: ; 1cbb
|
||||||
call GetMemTileCoord
|
call MenuBoxCoord2Tile
|
||||||
call GetMenuBoxDims
|
call GetMenuBoxDims
|
||||||
dec b
|
dec b
|
||||||
dec c
|
dec c
|
||||||
jp TextBox
|
jp TextBox
|
||||||
; 1cc6
|
; 1cc6
|
||||||
|
|
||||||
Function1cc6:: ; 1cc6
|
GetMenuTextStartCoord:: ; 1cc6
|
||||||
ld a, [wMenuBorderTopCoord]
|
ld a, [wMenuBorderTopCoord]
|
||||||
ld b, a
|
ld b, a
|
||||||
inc b
|
inc b
|
||||||
ld a, [wMenuBorderLeftCoord]
|
ld a, [wMenuBorderLeftCoord]
|
||||||
ld c, a
|
ld c, a
|
||||||
inc c
|
inc c
|
||||||
|
; bit 6: if not set, leave extra room on top
|
||||||
ld a, [wMenuData2Flags]
|
ld a, [wMenuData2Flags]
|
||||||
bit 6, a
|
bit 6, a
|
||||||
jr nz, .asm_1cd8
|
jr nz, .bit_6_set
|
||||||
inc b
|
inc b
|
||||||
|
|
||||||
.asm_1cd8
|
.bit_6_set
|
||||||
|
; bit 7: if set, leave extra room on the left
|
||||||
ld a, [wMenuData2Flags]
|
ld a, [wMenuData2Flags]
|
||||||
bit 7, a
|
bit 7, a
|
||||||
jr z, .asm_1ce0
|
jr z, .bit_7_clear
|
||||||
inc c
|
inc c
|
||||||
|
|
||||||
.asm_1ce0
|
.bit_7_clear
|
||||||
ret
|
ret
|
||||||
; 1ce1
|
; 1ce1
|
||||||
|
|
||||||
Function1ce1:: ; 1ce1
|
ClearMenuBoxInterior:: ; 1ce1
|
||||||
call GetMemTileCoord
|
call MenuBoxCoord2Tile
|
||||||
lb bc, 0, 21
|
ld bc, SCREEN_WIDTH + 1
|
||||||
add hl, bc
|
add hl, bc
|
||||||
call GetMenuBoxDims
|
call GetMenuBoxDims
|
||||||
dec b
|
dec b
|
||||||
@ -184,8 +187,8 @@ Function1ce1:: ; 1ce1
|
|||||||
ret
|
ret
|
||||||
; 1cf1
|
; 1cf1
|
||||||
|
|
||||||
Function1cf1:: ; 1cf1
|
ClearWholeMenuBox:: ; 1cf1
|
||||||
call GetMemTileCoord
|
call MenuBoxCoord2Tile
|
||||||
call GetMenuBoxDims
|
call GetMenuBoxDims
|
||||||
inc c
|
inc c
|
||||||
inc b
|
inc b
|
||||||
@ -194,7 +197,7 @@ Function1cf1:: ; 1cf1
|
|||||||
; 1cfd
|
; 1cfd
|
||||||
|
|
||||||
|
|
||||||
GetMemTileCoord:: ; 1cfd
|
MenuBoxCoord2Tile:: ; 1cfd
|
||||||
ld a, [wMenuBorderLeftCoord]
|
ld a, [wMenuBorderLeftCoord]
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, [wMenuBorderTopCoord]
|
ld a, [wMenuBorderTopCoord]
|
||||||
@ -202,7 +205,7 @@ GetMemTileCoord:: ; 1cfd
|
|||||||
; 1d05
|
; 1d05
|
||||||
|
|
||||||
|
|
||||||
GetTileCoord:: ; 1d05
|
Coord2Tile:: ; 1d05
|
||||||
; Return the address of TileMap(c, b) in hl.
|
; Return the address of TileMap(c, b) in hl.
|
||||||
xor a
|
xor a
|
||||||
ld h, a
|
ld h, a
|
||||||
@ -226,13 +229,13 @@ endr
|
|||||||
ret
|
ret
|
||||||
; 1d19
|
; 1d19
|
||||||
|
|
||||||
GetMemAttrCoord:: ; 1d19
|
MenuBoxCoord2Attr:: ; 1d19
|
||||||
ld a, [wMenuBorderLeftCoord]
|
ld a, [wMenuBorderLeftCoord]
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, [wMenuBorderTopCoord]
|
ld a, [wMenuBorderTopCoord]
|
||||||
ld b, a
|
ld b, a
|
||||||
|
|
||||||
GetAttrCoord:: ; 1d21
|
Coord2Attr:: ; 1d21
|
||||||
; Return the address of AttrMap(c, b) in hl.
|
; Return the address of AttrMap(c, b) in hl.
|
||||||
xor a
|
xor a
|
||||||
ld h, a
|
ld h, a
|
||||||
|
@ -3487,7 +3487,7 @@ Function111664: ; 111664 (44:5664)
|
|||||||
|
|
||||||
Function111686: ; 111686 (44:5686)
|
Function111686: ; 111686 (44:5686)
|
||||||
xor a
|
xor a
|
||||||
ld [rTAC], a ; $ff00+$7
|
ld [rTAC], a
|
||||||
ld c, $ff
|
ld c, $ff
|
||||||
ld a, [$ff00+c]
|
ld a, [$ff00+c]
|
||||||
and $f3
|
and $f3
|
||||||
@ -3552,7 +3552,7 @@ Function1116c5:: ; 1116c5 (44:56c5)
|
|||||||
jp nz, Function1118bc
|
jp nz, Function1118bc
|
||||||
ld hl, $c808
|
ld hl, $c808
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, [rSB] ; $ff00+$1
|
ld a, [rSB]
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ld a, $8
|
ld a, $8
|
||||||
cp l
|
cp l
|
||||||
@ -3724,7 +3724,7 @@ Function1117e7: ; 1117e7 (44:57e7)
|
|||||||
.asm_111803
|
.asm_111803
|
||||||
ld b, $66
|
ld b, $66
|
||||||
.asm_111805
|
.asm_111805
|
||||||
ld a, [rSB] ; $ff00+$1
|
ld a, [rSB]
|
||||||
cp b
|
cp b
|
||||||
jr z, .asm_111840
|
jr z, .asm_111840
|
||||||
cp $d2
|
cp $d2
|
||||||
@ -3791,7 +3791,7 @@ Function11186e: ; 11186e (44:586e)
|
|||||||
jr nz, Function1118bc
|
jr nz, Function1118bc
|
||||||
xor a
|
xor a
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, [rSB] ; $ff00+$1
|
ld a, [rSB]
|
||||||
ld [$c80c], a
|
ld [$c80c], a
|
||||||
inc [hl]
|
inc [hl]
|
||||||
or a
|
or a
|
||||||
@ -3810,7 +3810,7 @@ Function111884: ; 111884 (44:5884)
|
|||||||
jr Function1118bc
|
jr Function1118bc
|
||||||
|
|
||||||
Function111892: ; 111892 (44:5892)
|
Function111892: ; 111892 (44:5892)
|
||||||
ld a, [rSB] ; $ff00+$1
|
ld a, [rSB]
|
||||||
ld c, a
|
ld c, a
|
||||||
call Function111664
|
call Function111664
|
||||||
ld hl, $c80a
|
ld hl, $c80a
|
||||||
@ -3842,7 +3842,7 @@ Function1118bc: ; 1118bc (44:58bc)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
Function1118c2: ; 1118c2 (44:58c2)
|
Function1118c2: ; 1118c2 (44:58c2)
|
||||||
ld a, [rSB] ; $ff00+$1
|
ld a, [rSB]
|
||||||
ld c, a
|
ld c, a
|
||||||
ld b, $0
|
ld b, $0
|
||||||
ld hl, $c812
|
ld hl, $c812
|
||||||
@ -4042,7 +4042,7 @@ asm_111a40: ; 111a40 (44:5a40)
|
|||||||
ld a, $4b
|
ld a, $4b
|
||||||
|
|
||||||
Function111a42: ; 111a42 (44:5a42)
|
Function111a42: ; 111a42 (44:5a42)
|
||||||
ld [rSB], a ; $ff00+$1
|
ld [rSB], a
|
||||||
jp Function111b2e
|
jp Function111b2e
|
||||||
asm_111a47: ; 111a47 (44:5a47)
|
asm_111a47: ; 111a47 (44:5a47)
|
||||||
ld hl, $c815
|
ld hl, $c815
|
||||||
@ -4170,7 +4170,7 @@ Function111b21: ; 111b21 (44:5b21)
|
|||||||
ld e, a
|
ld e, a
|
||||||
ld d, [hl]
|
ld d, [hl]
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
ld [rSB], a ; $ff00+$1
|
ld [rSB], a
|
||||||
inc de
|
inc de
|
||||||
ld a, d
|
ld a, d
|
||||||
ld [hld], a
|
ld [hld], a
|
||||||
@ -4180,9 +4180,9 @@ Function111b2e: ; 111b2e (44:5b2e)
|
|||||||
ld hl, $c822
|
ld hl, $c822
|
||||||
set 1, [hl]
|
set 1, [hl]
|
||||||
ld a, $3
|
ld a, $3
|
||||||
ld [rSC], a ; $ff00+$2
|
ld [rSC], a
|
||||||
ld a, $83
|
ld a, $83
|
||||||
ld [rSC], a ; $ff00+$2
|
ld [rSC], a
|
||||||
|
|
||||||
Function111b3b: ; 111b3b (44:5b3b)
|
Function111b3b: ; 111b3b (44:5b3b)
|
||||||
ret
|
ret
|
||||||
@ -4765,7 +4765,7 @@ Function111f07: ; 111f07 (44:5f07)
|
|||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
.asm_111f17
|
.asm_111f17
|
||||||
ld a, [rSC] ; $ff00+$2
|
ld a, [rSC]
|
||||||
and $80
|
and $80
|
||||||
jr nz, .asm_111f17
|
jr nz, .asm_111f17
|
||||||
di
|
di
|
||||||
|
@ -130,6 +130,7 @@
|
|||||||
charmap "'t", $d5
|
charmap "'t", $d5
|
||||||
charmap "'v", $d6
|
charmap "'v", $d6
|
||||||
|
|
||||||
|
charmap "←", $df
|
||||||
charmap "'", $e0
|
charmap "'", $e0
|
||||||
charmap "<PK>", $e1
|
charmap "<PK>", $e1
|
||||||
charmap "<MN>", $e2
|
charmap "<MN>", $e2
|
||||||
|
@ -5,42 +5,50 @@ endc
|
|||||||
db \1
|
db \1
|
||||||
endm
|
endm
|
||||||
|
|
||||||
|
enum_start $d0
|
||||||
|
|
||||||
|
enum anim_obj_command ; d0
|
||||||
anim_obj: macro
|
anim_obj: macro
|
||||||
db $d0
|
db anim_obj_command
|
||||||
db \1 ; obj
|
db \1 ; obj
|
||||||
db \2 ; x
|
db \2 ; x
|
||||||
db \3 ; y
|
db \3 ; y
|
||||||
db \4 ; param
|
db \4 ; param
|
||||||
endm
|
endm
|
||||||
|
|
||||||
|
enum anim_1gfx_command ; d1
|
||||||
anim_1gfx: macro
|
anim_1gfx: macro
|
||||||
db $d1
|
db anim_1gfx_command
|
||||||
db \1 ; gfx1
|
db \1 ; gfx1
|
||||||
endm
|
endm
|
||||||
|
|
||||||
|
enum anim_2gfx_command ; d2
|
||||||
anim_2gfx: macro
|
anim_2gfx: macro
|
||||||
db $d2
|
db anim_2gfx_command
|
||||||
db \1 ; gfx1
|
db \1 ; gfx1
|
||||||
db \2 ; gfx2
|
db \2 ; gfx2
|
||||||
endm
|
endm
|
||||||
|
|
||||||
|
enum anim_3gfx_command ; d3
|
||||||
anim_3gfx: macro
|
anim_3gfx: macro
|
||||||
db $d3
|
db anim_3gfx_command
|
||||||
db \1 ; gfx1
|
db \1 ; gfx1
|
||||||
db \2 ; gfx2
|
db \2 ; gfx2
|
||||||
db \3 ; gfx3
|
db \3 ; gfx3
|
||||||
endm
|
endm
|
||||||
|
|
||||||
|
enum anim_4gfx_command ; d4
|
||||||
anim_4gfx: macro
|
anim_4gfx: macro
|
||||||
db $d4
|
db anim_4gfx_command
|
||||||
db \1 ; gfx1
|
db \1 ; gfx1
|
||||||
db \2 ; gfx2
|
db \2 ; gfx2
|
||||||
db \3 ; gfx3
|
db \3 ; gfx3
|
||||||
db \4 ; gfx4
|
db \4 ; gfx4
|
||||||
endm
|
endm
|
||||||
|
|
||||||
|
enum anim_5gfx_command ; d5
|
||||||
anim_5gfx: macro
|
anim_5gfx: macro
|
||||||
db $d5
|
db anim_5gfx_command
|
||||||
db \1 ; gfx1
|
db \1 ; gfx1
|
||||||
db \2 ; gfx2
|
db \2 ; gfx2
|
||||||
db \3 ; gfx3
|
db \3 ; gfx3
|
||||||
@ -48,196 +56,238 @@ anim_5gfx: macro
|
|||||||
db \5 ; gfx5
|
db \5 ; gfx5
|
||||||
endm
|
endm
|
||||||
|
|
||||||
|
enum anim_incobj_command ; d6
|
||||||
anim_incobj: macro
|
anim_incobj: macro
|
||||||
db $d6
|
db anim_incobj_command
|
||||||
db \1 ; id
|
db \1 ; id
|
||||||
endm
|
endm
|
||||||
|
|
||||||
|
enum anim_setobj_command ; d7
|
||||||
anim_setobj: macro
|
anim_setobj: macro
|
||||||
db $d7
|
db anim_setobj_command
|
||||||
db \1 ; id
|
db \1 ; id
|
||||||
db \2 ; obj
|
db \2 ; obj
|
||||||
endm
|
endm
|
||||||
|
|
||||||
|
enum anim_incbgeffect_command ; d8
|
||||||
anim_incbgeffect: macro
|
anim_incbgeffect: macro
|
||||||
db $d8
|
db anim_incbgeffect_command
|
||||||
db \1 ; effect
|
db \1 ; effect
|
||||||
endm
|
endm
|
||||||
|
|
||||||
|
enum anim_enemyfeetobj_command ; d9
|
||||||
anim_enemyfeetobj: macro
|
anim_enemyfeetobj: macro
|
||||||
db $d9
|
db anim_enemyfeetobj_command
|
||||||
endm
|
endm
|
||||||
|
|
||||||
|
enum anim_playerheadobj_command ; da
|
||||||
anim_playerheadobj: macro
|
anim_playerheadobj: macro
|
||||||
db $da
|
db anim_playerheadobj_command
|
||||||
endm
|
endm
|
||||||
|
|
||||||
|
enum anim_checkpokeball_command ; db
|
||||||
anim_checkpokeball: macro
|
anim_checkpokeball: macro
|
||||||
db $db
|
db anim_checkpokeball_command
|
||||||
endm
|
endm
|
||||||
|
|
||||||
|
enum anim_transform_command ; dc
|
||||||
anim_transform: macro
|
anim_transform: macro
|
||||||
db $dc
|
db anim_transform_command
|
||||||
endm
|
endm
|
||||||
|
|
||||||
|
enum anim_raisesub_command ; dd
|
||||||
anim_raisesub: macro
|
anim_raisesub: macro
|
||||||
db $dd
|
db anim_raisesub_command
|
||||||
endm
|
endm
|
||||||
|
|
||||||
|
enum anim_dropsub_command ; de
|
||||||
anim_dropsub: macro
|
anim_dropsub: macro
|
||||||
db $de
|
db anim_dropsub_command
|
||||||
endm
|
endm
|
||||||
|
|
||||||
|
enum anim_resetobp0_command ; df
|
||||||
anim_resetobp0: macro
|
anim_resetobp0: macro
|
||||||
db $df
|
db anim_resetobp0_command
|
||||||
endm
|
endm
|
||||||
|
|
||||||
|
enum anim_sound_command ; e0
|
||||||
anim_sound: macro
|
anim_sound: macro
|
||||||
db $e0
|
db anim_sound_command
|
||||||
db \1 ; tracks
|
db \1 ; tracks
|
||||||
db \2 ; id
|
db \2 ; id
|
||||||
endm
|
endm
|
||||||
|
|
||||||
|
enum anim_cry_command ; e1
|
||||||
anim_cry: macro
|
anim_cry: macro
|
||||||
db $e1
|
db anim_cry_command
|
||||||
db \1 ; pitch
|
db \1 ; pitch
|
||||||
endm
|
endm
|
||||||
|
|
||||||
|
enum anim_minimizeopp_command ; e2
|
||||||
anim_minimizeopp: macro
|
anim_minimizeopp: macro
|
||||||
db $e2
|
db anim_minimizeopp_command
|
||||||
endm
|
endm
|
||||||
|
|
||||||
|
enum anim_oamon_command ; e3
|
||||||
anim_oamon: macro
|
anim_oamon: macro
|
||||||
db $e3
|
db anim_oamon_command
|
||||||
endm
|
endm
|
||||||
|
|
||||||
|
enum anim_oamoff_command ; e4
|
||||||
anim_oamoff: macro
|
anim_oamoff: macro
|
||||||
db $e4
|
db anim_oamoff_command
|
||||||
endm
|
endm
|
||||||
|
|
||||||
|
enum anim_clearobjs_command ; e5
|
||||||
anim_clearobjs: macro
|
anim_clearobjs: macro
|
||||||
db $e5
|
db anim_clearobjs_command
|
||||||
endm
|
endm
|
||||||
|
|
||||||
|
enum anim_beatup_command ; e6
|
||||||
anim_beatup: macro
|
anim_beatup: macro
|
||||||
db $e6
|
db anim_beatup_command
|
||||||
endm
|
endm
|
||||||
|
|
||||||
|
enum anim_0xe7_command ; e7
|
||||||
anim_0xe7: macro
|
anim_0xe7: macro
|
||||||
db $e7
|
db anim_0xe7_command
|
||||||
endm
|
endm
|
||||||
|
|
||||||
|
enum anim_updateactorpic_command ; e8
|
||||||
anim_updateactorpic: macro
|
anim_updateactorpic: macro
|
||||||
db $e8
|
db anim_updateactorpic_command
|
||||||
endm
|
endm
|
||||||
|
|
||||||
|
enum anim_minimize_command ; e9
|
||||||
anim_minimize: macro
|
anim_minimize: macro
|
||||||
db $e9
|
db anim_minimize_command
|
||||||
endm
|
endm
|
||||||
|
|
||||||
|
enum anim_0xea_command ; ea
|
||||||
anim_0xea: macro
|
anim_0xea: macro
|
||||||
db $ea
|
db anim_0xea_command
|
||||||
endm
|
endm
|
||||||
|
|
||||||
|
enum anim_0xeb_command ; eb
|
||||||
anim_0xeb: macro
|
anim_0xeb: macro
|
||||||
db $eb
|
db anim_0xeb_command
|
||||||
endm
|
endm
|
||||||
|
|
||||||
|
enum anim_0xec_command ; ec
|
||||||
anim_0xec: macro
|
anim_0xec: macro
|
||||||
db $ec
|
db anim_0xec_command
|
||||||
endm
|
endm
|
||||||
|
|
||||||
|
enum anim_0xed_command ; ed
|
||||||
anim_0xed: macro
|
anim_0xed: macro
|
||||||
db $ed
|
db anim_0xed_command
|
||||||
endm
|
endm
|
||||||
|
|
||||||
|
enum anim_jumpand_command ; ee
|
||||||
anim_jumpand: macro
|
anim_jumpand: macro
|
||||||
db $ee
|
db anim_jumpand_command
|
||||||
db \1 ; value
|
db \1 ; value
|
||||||
dw \2 ; address
|
dw \2 ; address
|
||||||
endm
|
endm
|
||||||
|
|
||||||
|
enum anim_jumpuntil_command ; ef
|
||||||
anim_jumpuntil: macro
|
anim_jumpuntil: macro
|
||||||
db $ef
|
db anim_jumpuntil_command
|
||||||
dw \1 ; address
|
dw \1 ; address
|
||||||
endm
|
endm
|
||||||
|
|
||||||
|
enum anim_bgeffect_command ; f0
|
||||||
anim_bgeffect: macro
|
anim_bgeffect: macro
|
||||||
db $f0
|
db anim_bgeffect_command
|
||||||
db \1 ; effect
|
db \1 ; effect
|
||||||
db \2 ; unknown
|
db \2 ; unknown
|
||||||
db \3 ; unknown
|
db \3 ; unknown
|
||||||
db \4 ; unknown
|
db \4 ; unknown
|
||||||
endm
|
endm
|
||||||
|
|
||||||
|
enum anim_bgp_command ; f1
|
||||||
anim_bgp: macro
|
anim_bgp: macro
|
||||||
db $f1
|
db anim_bgp_command
|
||||||
db \1 ; colors
|
db \1 ; colors
|
||||||
endm
|
endm
|
||||||
|
|
||||||
|
enum anim_obp0_command ; f2
|
||||||
anim_obp0: macro
|
anim_obp0: macro
|
||||||
db $f2
|
db anim_obp0_command
|
||||||
db \1 ; colors
|
db \1 ; colors
|
||||||
endm
|
endm
|
||||||
|
|
||||||
|
enum anim_obp1_command ; f3
|
||||||
anim_obp1: macro
|
anim_obp1: macro
|
||||||
db $f3
|
db anim_obp1_command
|
||||||
db \1 ; colors
|
db \1 ; colors
|
||||||
endm
|
endm
|
||||||
|
|
||||||
|
enum anim_clearsprites_command ; f4
|
||||||
anim_clearsprites: macro
|
anim_clearsprites: macro
|
||||||
db $f4
|
db anim_clearsprites_command
|
||||||
endm
|
endm
|
||||||
|
|
||||||
|
enum anim_0xf5_command ; f5
|
||||||
anim_0xf5: macro
|
anim_0xf5: macro
|
||||||
db $f5
|
db anim_0xf5_command
|
||||||
endm
|
endm
|
||||||
|
|
||||||
|
enum anim_0xf6_command ; f6
|
||||||
anim_0xf6: macro
|
anim_0xf6: macro
|
||||||
db $f6
|
db anim_0xf6_command
|
||||||
endm
|
endm
|
||||||
|
|
||||||
|
enum anim_0xf7_command ; f7
|
||||||
anim_0xf7: macro
|
anim_0xf7: macro
|
||||||
db $f7
|
db anim_0xf7_command
|
||||||
endm
|
endm
|
||||||
|
|
||||||
|
enum anim_jumpif_command ; f8
|
||||||
anim_jumpif: macro
|
anim_jumpif: macro
|
||||||
db $f8
|
db anim_jumpif_command
|
||||||
db \1 ; value
|
db \1 ; value
|
||||||
dw \2 ; address
|
dw \2 ; address
|
||||||
endm
|
endm
|
||||||
|
|
||||||
|
enum anim_setvar_command ; f9
|
||||||
anim_setvar: macro
|
anim_setvar: macro
|
||||||
db $f9
|
db anim_setvar_command
|
||||||
db \1 ; value
|
db \1 ; value
|
||||||
endm
|
endm
|
||||||
|
|
||||||
|
enum anim_incvar_command ; fa
|
||||||
anim_incvar: macro
|
anim_incvar: macro
|
||||||
db $fa
|
db anim_incvar_command
|
||||||
endm
|
endm
|
||||||
|
|
||||||
|
enum anim_jumpvar_command ; fb
|
||||||
anim_jumpvar: macro
|
anim_jumpvar: macro
|
||||||
db $fb
|
db anim_jumpvar_command
|
||||||
db \1 ; value
|
db \1 ; value
|
||||||
dw \2 ; address
|
dw \2 ; address
|
||||||
endm
|
endm
|
||||||
|
|
||||||
|
enum anim_jump_command ; fc
|
||||||
anim_jump: macro
|
anim_jump: macro
|
||||||
db $fc
|
db anim_jump_command
|
||||||
dw \1 ; address
|
dw \1 ; address
|
||||||
endm
|
endm
|
||||||
|
|
||||||
|
enum anim_loop_command ; fd
|
||||||
anim_loop: macro
|
anim_loop: macro
|
||||||
db $fd
|
db anim_loop_command
|
||||||
db \1 ; count
|
db \1 ; count
|
||||||
dw \2 ; address
|
dw \2 ; address
|
||||||
endm
|
endm
|
||||||
|
|
||||||
|
enum anim_call_command ; fe
|
||||||
anim_call: macro
|
anim_call: macro
|
||||||
db $fe
|
db anim_call_command
|
||||||
dw \1 ; address
|
dw \1 ; address
|
||||||
endm
|
endm
|
||||||
|
|
||||||
|
enum anim_ret_command ; ff
|
||||||
anim_ret: macro
|
anim_ret: macro
|
||||||
db $ff
|
db anim_ret_command
|
||||||
endm
|
endm
|
||||||
|
@ -11,7 +11,6 @@ prompt EQUS "db $58" ; Prompt the player to end a text box (initiating some oth
|
|||||||
page EQUS "db $50," ; Start a new Pokedex page.
|
page EQUS "db $50," ; Start a new Pokedex page.
|
||||||
dex EQUS "db $e8, $50" ; End a Pokedex entry.
|
dex EQUS "db $e8, $50" ; End a Pokedex entry.
|
||||||
|
|
||||||
|
|
||||||
; TX_RAM EQU $01
|
; TX_RAM EQU $01
|
||||||
; TX_FAR EQU $16
|
; TX_FAR EQU $16
|
||||||
enum_start 1
|
enum_start 1
|
||||||
|
@ -144,14 +144,14 @@ Function17a751: ; 17a751 (5e:6751)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
Function17a770: ; 17a770 (5e:6770)
|
Function17a770: ; 17a770 (5e:6770)
|
||||||
ld a, [hOAMUpdate] ; $ff00+$d8
|
ld a, [hOAMUpdate]
|
||||||
push af
|
push af
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hOAMUpdate], a ; $ff00+$d8
|
ld [hOAMUpdate], a
|
||||||
call HideSprites
|
call HideSprites
|
||||||
call Function17a9cb
|
call Function17a9cb
|
||||||
pop af
|
pop af
|
||||||
ld [hOAMUpdate], a ; $ff00+$d8
|
ld [hOAMUpdate], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function17a781: ; 17a781 (5e:6781)
|
Function17a781: ; 17a781 (5e:6781)
|
||||||
@ -251,7 +251,7 @@ Function17a7ff: ; 17a7ff (5e:67ff)
|
|||||||
Function17a81a: ; 17a81a (5e:681a)
|
Function17a81a: ; 17a81a (5e:681a)
|
||||||
call IsSFXPlaying
|
call IsSFXPlaying
|
||||||
ret nc
|
ret nc
|
||||||
ld a, [hJoyPressed] ; $ff00+$a7
|
ld a, [hJoyPressed]
|
||||||
and $3
|
and $3
|
||||||
ret z
|
ret z
|
||||||
call ExitMenu
|
call ExitMenu
|
||||||
@ -269,7 +269,7 @@ Function17a83c: ; 17a83c (5e:683c)
|
|||||||
ld a, [hJoyLast]
|
ld a, [hJoyLast]
|
||||||
and $f0
|
and $f0
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, [hJoyPressed] ; $ff00+$a7
|
ld a, [hJoyPressed]
|
||||||
and $b
|
and $b
|
||||||
or c
|
or c
|
||||||
ld c, a
|
ld c, a
|
||||||
@ -741,10 +741,10 @@ Unknown_17aaf7: ; 17aaf7
|
|||||||
; 17aba0
|
; 17aba0
|
||||||
|
|
||||||
Function17aba0: ; 17aba0 (5e:6ba0)
|
Function17aba0: ; 17aba0 (5e:6ba0)
|
||||||
ld a, [rVBK] ; $ff00+$4f
|
ld a, [rVBK]
|
||||||
push af
|
push af
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [rVBK], a ; $ff00+$4f
|
ld [rVBK], a
|
||||||
|
|
||||||
ld hl, VTiles5 tile $00
|
ld hl, VTiles5 tile $00
|
||||||
ld de, GFX_17afa5
|
ld de, GFX_17afa5
|
||||||
@ -752,7 +752,7 @@ Function17aba0: ; 17aba0 (5e:6ba0)
|
|||||||
call Get2bpp
|
call Get2bpp
|
||||||
|
|
||||||
pop af
|
pop af
|
||||||
ld [rVBK], a ; $ff00+$4f
|
ld [rVBK], a
|
||||||
|
|
||||||
ld hl, VTiles0 tile $00
|
ld hl, VTiles0 tile $00
|
||||||
ld de, GFX_17afa5 + $4c0
|
ld de, GFX_17afa5 + $4c0
|
||||||
@ -766,10 +766,10 @@ Function17aba0: ; 17aba0 (5e:6ba0)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
Function17abcf: ; 17abcf (5e:6bcf)
|
Function17abcf: ; 17abcf (5e:6bcf)
|
||||||
ld a, [rSVBK] ; $ff00+$70
|
ld a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
ld a, BANK(Unkn1Pals)
|
ld a, BANK(Unkn1Pals)
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
|
|
||||||
ld hl, Palette_17ac55
|
ld hl, Palette_17ac55
|
||||||
ld de, Unkn1Pals ; $d000
|
ld de, Unkn1Pals ; $d000
|
||||||
@ -793,7 +793,7 @@ Function17abcf: ; 17abcf (5e:6bcf)
|
|||||||
call FarCopyBytes
|
call FarCopyBytes
|
||||||
|
|
||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function17ac0c: ; 17ac0c (5e:6c0c)
|
Function17ac0c: ; 17ac0c (5e:6c0c)
|
||||||
|
@ -816,16 +816,16 @@ endr
|
|||||||
|
|
||||||
|
|
||||||
Function895c7: ; 895c7 (22:55c7)
|
Function895c7: ; 895c7 (22:55c7)
|
||||||
ld a, [rSVBK] ; $ff00+$70
|
ld a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
ld a, 5
|
ld a, 5
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
ld hl, Palette_895de
|
ld hl, Palette_895de
|
||||||
ld de, wd030
|
ld de, wd030
|
||||||
ld bc, 8
|
ld bc, 8
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
ret
|
ret
|
||||||
; 895de (22:55de)
|
; 895de (22:55de)
|
||||||
|
|
||||||
@ -2147,10 +2147,10 @@ Function89cdf: ; 89cdf (22:5cdf)
|
|||||||
|
|
||||||
Function89d0d: ; 89d0d (22:5d0d)
|
Function89d0d: ; 89d0d (22:5d0d)
|
||||||
call Function8923c
|
call Function8923c
|
||||||
ld a, [rSVBK] ; $ff00+$70
|
ld a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
ld a, $5
|
ld a, $5
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
ld c, $8
|
ld c, $8
|
||||||
ld de, Unkn1Pals
|
ld de, Unkn1Pals
|
||||||
.asm_89d1c
|
.asm_89d1c
|
||||||
@ -2166,7 +2166,7 @@ Function89d0d: ; 89d0d (22:5d0d)
|
|||||||
ld bc, $8
|
ld bc, $8
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
call SetPalettes
|
call SetPalettes
|
||||||
callba Function845db
|
callba Function845db
|
||||||
call Function89240
|
call Function89240
|
||||||
@ -2377,16 +2377,16 @@ Function89e6f: ; 89e6f (22:5e6f)
|
|||||||
jp Function89e36
|
jp Function89e36
|
||||||
|
|
||||||
Function89e9a: ; 89e9a (22:5e9a)
|
Function89e9a: ; 89e9a (22:5e9a)
|
||||||
ld a, [rSVBK] ; $ff00+$70
|
ld a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
ld a, $5
|
ld a, $5
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
ld hl, Palette_89eb1
|
ld hl, Palette_89eb1
|
||||||
ld de, wd028
|
ld de, wd028
|
||||||
ld bc, $8
|
ld bc, $8
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
ret
|
ret
|
||||||
; 89eb1 (22:5eb1)
|
; 89eb1 (22:5eb1)
|
||||||
|
|
||||||
@ -3383,10 +3383,10 @@ Function8a5a3: ; 8a5a3 (22:65a3)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
Function8a5b6: ; 8a5b6 (22:65b6)
|
Function8a5b6: ; 8a5b6 (22:65b6)
|
||||||
ld a, [rSVBK] ; $ff00+$70
|
ld a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
ld a, $5
|
ld a, $5
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
ld hl, Palette_8a5e5
|
ld hl, Palette_8a5e5
|
||||||
ld de, wd020
|
ld de, wd020
|
||||||
ld bc, $18
|
ld bc, $18
|
||||||
@ -3400,7 +3400,7 @@ Function8a5b6: ; 8a5b6 (22:65b6)
|
|||||||
ld bc, $8
|
ld bc, $8
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
ret
|
ret
|
||||||
; 8a5e5 (22:65e5)
|
; 8a5e5 (22:65e5)
|
||||||
|
|
||||||
|
@ -252,7 +252,7 @@ Function8b45c: ; 8b45c (22:745c)
|
|||||||
call Function8b4fd
|
call Function8b4fd
|
||||||
call Function89c44
|
call Function89c44
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
pop bc
|
pop bc
|
||||||
call Function8b3dd
|
call Function8b3dd
|
||||||
jr nc, .asm_8b46e
|
jr nc, .asm_8b46e
|
||||||
@ -809,9 +809,9 @@ Function8b7bd: ; 8b7bd
|
|||||||
ld a, [wd032]
|
ld a, [wd032]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_8b7e0
|
jr z, .asm_8b7e0
|
||||||
ld a, [wcf81]
|
ld a, [wMenuFlags]
|
||||||
set 3, a
|
set 3, a
|
||||||
ld [wcf81], a
|
ld [wMenuFlags], a
|
||||||
|
|
||||||
.asm_8b7e0
|
.asm_8b7e0
|
||||||
ld a, [wd0e3]
|
ld a, [wd0e3]
|
||||||
|
@ -1825,7 +1825,7 @@ Function100b45: ; 100b45
|
|||||||
; 100b7a
|
; 100b7a
|
||||||
|
|
||||||
Function100b7a: ; 100b7a
|
Function100b7a: ; 100b7a
|
||||||
ld hl, Function1c66
|
ld hl, CopyMenuData2
|
||||||
ld a, [wcf94]
|
ld a, [wcf94]
|
||||||
rst FarCall
|
rst FarCall
|
||||||
callba Function24085
|
callba Function24085
|
||||||
@ -2088,7 +2088,7 @@ Function100d67: ; 100d67
|
|||||||
call UpdateSprites
|
call UpdateSprites
|
||||||
call Function1c89
|
call Function1c89
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
call Function1c66
|
call CopyMenuData2
|
||||||
call Function1c10
|
call Function1c10
|
||||||
ld hl, wcfa5
|
ld hl, wcfa5
|
||||||
set 6, [hl]
|
set 6, [hl]
|
||||||
|
@ -7667,10 +7667,10 @@ Function11765d: ; 11765d (45:765d)
|
|||||||
|
|
||||||
Function11766b: ; 11766b (45:766b)
|
Function11766b: ; 11766b (45:766b)
|
||||||
call Function117699
|
call Function117699
|
||||||
ld a, [rSVBK] ; $ff00+$70
|
ld a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
ld a, $5
|
ld a, $5
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
call Function1176ee
|
call Function1176ee
|
||||||
ld a, $5
|
ld a, $5
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
@ -7683,7 +7683,7 @@ Function11766b: ; 11766b (45:766b)
|
|||||||
call CopyBytes
|
call CopyBytes
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function117699: ; 117699 (45:7699)
|
Function117699: ; 117699 (45:7699)
|
||||||
@ -7973,11 +7973,11 @@ Function1178aa: ; 1178aa (45:78aa)
|
|||||||
ld hl, MenuDataHeader_1179b5
|
ld hl, MenuDataHeader_1179b5
|
||||||
call LoadMenuDataHeader
|
call LoadMenuDataHeader
|
||||||
call MenuBox
|
call MenuBox
|
||||||
call GetMemTileCoord
|
call MenuBoxCoord2Tile
|
||||||
ld hl, MenuDataHeader_1179bd
|
ld hl, MenuDataHeader_1179bd
|
||||||
call LoadMenuDataHeader
|
call LoadMenuDataHeader
|
||||||
call MenuBox
|
call MenuBox
|
||||||
call GetMemTileCoord
|
call MenuBoxCoord2Tile
|
||||||
callba Function104061
|
callba Function104061
|
||||||
hlcoord 16, 8
|
hlcoord 16, 8
|
||||||
ld de, String_1179c5
|
ld de, String_1179c5
|
||||||
@ -7993,7 +7993,7 @@ Function1178aa: ; 1178aa (45:78aa)
|
|||||||
jp Function117a0a
|
jp Function117a0a
|
||||||
|
|
||||||
Function1178e8: ; 1178e8 (45:78e8)
|
Function1178e8: ; 1178e8 (45:78e8)
|
||||||
ld a, [hJoyPressed] ; $ff00+$a7
|
ld a, [hJoyPressed]
|
||||||
cp $2
|
cp $2
|
||||||
jr z, .asm_117939
|
jr z, .asm_117939
|
||||||
cp $1
|
cp $1
|
||||||
@ -8076,7 +8076,7 @@ Function117984: ; 117984 (45:7984)
|
|||||||
ld hl, MenuDataHeader_1179b5
|
ld hl, MenuDataHeader_1179b5
|
||||||
call LoadMenuDataHeader
|
call LoadMenuDataHeader
|
||||||
call MenuBox
|
call MenuBox
|
||||||
call GetMemTileCoord
|
call MenuBoxCoord2Tile
|
||||||
callba Function104061
|
callba Function104061
|
||||||
hlcoord 1, 14
|
hlcoord 1, 14
|
||||||
ld de, String_1179e1
|
ld de, String_1179e1
|
||||||
@ -8236,7 +8236,7 @@ Function117b14:
|
|||||||
ld hl, Data117cbc
|
ld hl, Data117cbc
|
||||||
call LoadMenuDataHeader
|
call LoadMenuDataHeader
|
||||||
call MenuBox
|
call MenuBox
|
||||||
call GetMemTileCoord
|
call MenuBoxCoord2Tile
|
||||||
jp Function117cdd
|
jp Function117cdd
|
||||||
|
|
||||||
Function117b28:
|
Function117b28:
|
||||||
@ -8248,7 +8248,7 @@ Function117b31:
|
|||||||
ld hl, Data117cc4
|
ld hl, Data117cc4
|
||||||
call LoadMenuDataHeader
|
call LoadMenuDataHeader
|
||||||
call MenuBox
|
call MenuBox
|
||||||
call GetMemTileCoord
|
call MenuBoxCoord2Tile
|
||||||
hlcoord 16, 8
|
hlcoord 16, 8
|
||||||
ld de, YesNo117ccc
|
ld de, YesNo117ccc
|
||||||
call PlaceString
|
call PlaceString
|
||||||
@ -8386,7 +8386,7 @@ Function117c4a:
|
|||||||
ld hl, Data117cbc
|
ld hl, Data117cbc
|
||||||
call LoadMenuDataHeader
|
call LoadMenuDataHeader
|
||||||
call MenuBox
|
call MenuBox
|
||||||
call GetMemTileCoord
|
call MenuBoxCoord2Tile
|
||||||
callba Function104061
|
callba Function104061
|
||||||
ld hl, MobileStadiumSuccessText
|
ld hl, MobileStadiumSuccessText
|
||||||
call PrintText
|
call PrintText
|
||||||
|
@ -311,10 +311,10 @@ Function118284: ; 118284
|
|||||||
ld [wcd34], a
|
ld [wcd34], a
|
||||||
ld a, $5
|
ld a, $5
|
||||||
ld [wc3f0], a
|
ld [wc3f0], a
|
||||||
ld a, [rSVBK] ; $ff00+$70
|
ld a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
ld a, $3
|
ld a, $3
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
.asm_11829d
|
.asm_11829d
|
||||||
call JoyTextDelay
|
call JoyTextDelay
|
||||||
call Function118473
|
call Function118473
|
||||||
@ -334,7 +334,7 @@ Function118284: ; 118284
|
|||||||
cp [hl]
|
cp [hl]
|
||||||
jr nz, .asm_11829d
|
jr nz, .asm_11829d
|
||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
call Function118452
|
call Function118452
|
||||||
ret
|
ret
|
||||||
; 1182d5 (46:42d5)
|
; 1182d5 (46:42d5)
|
||||||
@ -1038,7 +1038,7 @@ Function11878d: ; 11878d (46:478d)
|
|||||||
and $1
|
and $1
|
||||||
jr z, .asm_1187a7
|
jr z, .asm_1187a7
|
||||||
ld a, $3
|
ld a, $3
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
.asm_1187a7
|
.asm_1187a7
|
||||||
jp Function119e2e
|
jp Function119e2e
|
||||||
.asm_1187aa
|
.asm_1187aa
|
||||||
@ -1066,7 +1066,7 @@ Function11878d: ; 11878d (46:478d)
|
|||||||
jr nz, .asm_118803
|
jr nz, .asm_118803
|
||||||
set 0, [hl]
|
set 0, [hl]
|
||||||
ld a, $6
|
ld a, $6
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
ld de, Unkn1Pals
|
ld de, Unkn1Pals
|
||||||
ld bc, $1000
|
ld bc, $1000
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
@ -1111,7 +1111,7 @@ Function118821: ; 118821 (46:4821)
|
|||||||
jr c, .asm_11884a
|
jr c, .asm_11884a
|
||||||
cp $4
|
cp $4
|
||||||
jr z, .asm_11884a
|
jr z, .asm_11884a
|
||||||
ld a, [hJoyDown] ; $ff00+$a8
|
ld a, [hJoyDown]
|
||||||
cp $5
|
cp $5
|
||||||
jr nz, .asm_11884a
|
jr nz, .asm_11884a
|
||||||
ld a, $a
|
ld a, $a
|
||||||
@ -1285,7 +1285,7 @@ Function118936:
|
|||||||
ld hl, MenuDataHeader_119cf7
|
ld hl, MenuDataHeader_119cf7
|
||||||
call LoadMenuDataHeader
|
call LoadMenuDataHeader
|
||||||
call MenuBox
|
call MenuBox
|
||||||
call GetMemTileCoord
|
call MenuBoxCoord2Tile
|
||||||
call Function321c
|
call Function321c
|
||||||
hlcoord 16, 8, AttrMap
|
hlcoord 16, 8, AttrMap
|
||||||
ld a, $40
|
ld a, $40
|
||||||
@ -4092,10 +4092,10 @@ String_119d8c:
|
|||||||
; 119d93
|
; 119d93
|
||||||
|
|
||||||
Function119d93: ; 119d93 (46:5d93)
|
Function119d93: ; 119d93 (46:5d93)
|
||||||
ld a, [rSVBK] ; $ff00+$70
|
ld a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
ld a, [wcd4f]
|
ld a, [wcd4f]
|
||||||
ld c, 10
|
ld c, 10
|
||||||
call SimpleMultiply
|
call SimpleMultiply
|
||||||
@ -4122,7 +4122,7 @@ Function119d93: ; 119d93 (46:5d93)
|
|||||||
dec a
|
dec a
|
||||||
jr nz, .asm_119daf
|
jr nz, .asm_119daf
|
||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
.asm_119dc6
|
.asm_119dc6
|
||||||
@ -4130,18 +4130,18 @@ Function119d93: ; 119d93 (46:5d93)
|
|||||||
ld a, $4
|
ld a, $4
|
||||||
ld [wcf66], a
|
ld [wcf66], a
|
||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function119dd1: ; 119dd1 (46:5dd1)
|
Function119dd1: ; 119dd1 (46:5dd1)
|
||||||
ld a, [rSVBK] ; $ff00+$70
|
ld a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
ld a, [wcd4f]
|
ld a, [wcd4f]
|
||||||
cp 70 / 10
|
cp 70 / 10
|
||||||
jr nc, .asm_119e08
|
jr nc, .asm_119e08
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
ld hl, PartyMon1Level
|
ld hl, PartyMon1Level
|
||||||
ld bc, PARTYMON_STRUCT_LENGTH
|
ld bc, PARTYMON_STRUCT_LENGTH
|
||||||
ld de, PartySpecies
|
ld de, PartySpecies
|
||||||
@ -4169,7 +4169,7 @@ Function119dd1: ; 119dd1 (46:5dd1)
|
|||||||
jr nz, .asm_119deb
|
jr nz, .asm_119deb
|
||||||
.asm_119e08
|
.asm_119e08
|
||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
.asm_119e0d
|
.asm_119e0d
|
||||||
@ -4184,7 +4184,7 @@ Function119dd1: ; 119dd1 (46:5dd1)
|
|||||||
ld a, $a
|
ld a, $a
|
||||||
ld [wcf66], a
|
ld [wcf66], a
|
||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
; 119e2b (46:5e2b)
|
; 119e2b (46:5e2b)
|
||||||
@ -4333,15 +4333,15 @@ Function119ec2: ; 119ec2 (46:5ec2)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
Function119ed8: ; 119ed8 (46:5ed8)
|
Function119ed8: ; 119ed8 (46:5ed8)
|
||||||
ld a, [rSVBK] ; $ff00+$70
|
ld a, [rSVBK]
|
||||||
ld [wcd8c], a
|
ld [wcd8c], a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
call Function119eee
|
call Function119eee
|
||||||
ld a, [wcd8c]
|
ld a, [wcd8c]
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function119eee: ; 119eee (46:5eee)
|
Function119eee: ; 119eee (46:5eee)
|
||||||
@ -4740,7 +4740,7 @@ Function11a207: ; 11a207
|
|||||||
ld hl, MenuDataHeader_11a2de
|
ld hl, MenuDataHeader_11a2de
|
||||||
call LoadMenuDataHeader
|
call LoadMenuDataHeader
|
||||||
call MenuBox
|
call MenuBox
|
||||||
call GetMemTileCoord
|
call MenuBoxCoord2Tile
|
||||||
call Function321c
|
call Function321c
|
||||||
hlcoord 16, 8
|
hlcoord 16, 8
|
||||||
ld de, String_11a2cf
|
ld de, String_11a2cf
|
||||||
|
@ -1163,7 +1163,7 @@ Function16d77a: ; 16d77a
|
|||||||
ld b, a
|
ld b, a
|
||||||
ld a, [wcfa2]
|
ld a, [wcfa2]
|
||||||
ld c, a
|
ld c, a
|
||||||
call GetTileCoord
|
call Coord2Tile
|
||||||
ld a, [wcfa7]
|
ld a, [wcfa7]
|
||||||
swap a
|
swap a
|
||||||
and $f
|
and $f
|
||||||
|
@ -673,7 +673,7 @@ Function170737: ; 170737 (5c:4737)
|
|||||||
|
|
||||||
Function17073e: ; 17073e (5c:473e)
|
Function17073e: ; 17073e (5c:473e)
|
||||||
call Random
|
call Random
|
||||||
ld a, [hRandomAdd] ; $ff00+$e1
|
ld a, [hRandomAdd]
|
||||||
and $7
|
and $7
|
||||||
cp $6
|
cp $6
|
||||||
jr c, .asm_17074b
|
jr c, .asm_17074b
|
||||||
@ -842,28 +842,28 @@ Function17081d: ; 17081d (5c:481d)
|
|||||||
Function170868: ; 170868 (5c:4868)
|
Function170868: ; 170868 (5c:4868)
|
||||||
ld a, BANK(sbe47)
|
ld a, BANK(sbe47)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld a, [rSVBK] ; $ff00+$70
|
ld a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
ld a, $3
|
ld a, $3
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
ld a, [wd000 + $800]
|
ld a, [wd000 + $800]
|
||||||
ld [sbe47], a
|
ld [sbe47], a
|
||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function170881: ; 170881 (5c:4881)
|
Function170881: ; 170881 (5c:4881)
|
||||||
ld a, BANK(sbe47)
|
ld a, BANK(sbe47)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld a, [rSVBK] ; $ff00+$70
|
ld a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
ld a, $3
|
ld a, $3
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
ld a, [sbe47]
|
ld a, [sbe47]
|
||||||
ld [wd000 + $800], a
|
ld [wd000 + $800], a
|
||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -1032,14 +1032,14 @@ String_1709a4: ; 1709a4
|
|||||||
db "なぞナゾ@@"
|
db "なぞナゾ@@"
|
||||||
|
|
||||||
Function1709aa: ; 1709aa (5c:49aa)
|
Function1709aa: ; 1709aa (5c:49aa)
|
||||||
ld a, [rSVBK] ; $ff00+$70
|
ld a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
ld a, BANK(w3_d090)
|
ld a, BANK(w3_d090)
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
ld a, [w3_d090]
|
ld a, [w3_d090]
|
||||||
ld [ScriptVar], a
|
ld [ScriptVar], a
|
||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function1709bb: ; 1709bb (5c:49bb)
|
Function1709bb: ; 1709bb (5c:49bb)
|
||||||
@ -1575,13 +1575,13 @@ Function1719c8: ; 1719c8 (5c:59c8)
|
|||||||
Function1719d6: ; 1719d6 (5c:59d6)
|
Function1719d6: ; 1719d6 (5c:59d6)
|
||||||
callba Function1183cb
|
callba Function1183cb
|
||||||
call Function1719ed
|
call Function1719ed
|
||||||
ld a, [rSVBK] ; $ff00+$70
|
ld a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
ld a, $5
|
ld a, $5
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
call Function171a11
|
call Function171a11
|
||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function1719ed: ; 1719ed (5c:59ed)
|
Function1719ed: ; 1719ed (5c:59ed)
|
||||||
@ -1656,13 +1656,13 @@ Function171a5d: ; 171a5d (5c:5a5d)
|
|||||||
ld [wc302], a
|
ld [wc302], a
|
||||||
ld a, $a
|
ld a, $a
|
||||||
call Function3e32
|
call Function3e32
|
||||||
ld a, [rSVBK] ; $ff00+$70
|
ld a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
callba Function118452
|
callba Function118452
|
||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
ld a, $a
|
ld a, $a
|
||||||
ld [wcd49], a
|
ld [wcd49], a
|
||||||
ret
|
ret
|
||||||
@ -1700,13 +1700,13 @@ Function171ad7: ; 171ad7 (5c:5ad7)
|
|||||||
jp Function171c66
|
jp Function171c66
|
||||||
|
|
||||||
Function171aec: ; 171aec (5c:5aec)
|
Function171aec: ; 171aec (5c:5aec)
|
||||||
ld a, [rSVBK] ; $ff00+$70
|
ld a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
callba Function118452
|
callba Function118452
|
||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
hlcoord 2, 6
|
hlcoord 2, 6
|
||||||
ld a, $8
|
ld a, $8
|
||||||
.asm_171b01
|
.asm_171b01
|
||||||
@ -1860,7 +1860,7 @@ Function171beb: ; 171beb (5c:5beb)
|
|||||||
ld hl, MenuDataHeader_171c6b
|
ld hl, MenuDataHeader_171c6b
|
||||||
call LoadMenuDataHeader
|
call LoadMenuDataHeader
|
||||||
call MenuBox
|
call MenuBox
|
||||||
call GetMemTileCoord
|
call MenuBoxCoord2Tile
|
||||||
callba Function104061
|
callba Function104061
|
||||||
hlcoord 1, 14
|
hlcoord 1, 14
|
||||||
ld de, String_171c73
|
ld de, String_171c73
|
||||||
@ -1952,10 +1952,10 @@ Function171c87: ; 171c87 (5c:5c87)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
Function171ccd: ; 171ccd (5c:5ccd)
|
Function171ccd: ; 171ccd (5c:5ccd)
|
||||||
ld a, [rSVBK] ; $ff00+$70
|
ld a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
ld a, $5
|
ld a, $5
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
ld hl, Palette_171d71
|
ld hl, Palette_171d71
|
||||||
ld de, Unkn1Pals
|
ld de, Unkn1Pals
|
||||||
ld bc, $40
|
ld bc, $40
|
||||||
@ -1967,7 +1967,7 @@ Function171ccd: ; 171ccd (5c:5ccd)
|
|||||||
ld [hl], a
|
ld [hl], a
|
||||||
call SetPalettes
|
call SetPalettes
|
||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function171cf0: ; 171cf0 (5c:5cf0)
|
Function171cf0: ; 171cf0 (5c:5cf0)
|
||||||
@ -2115,10 +2115,10 @@ Function172e78: ; 172e78 (5c:6e78)
|
|||||||
; 172eb9 (5c:6eb9)
|
; 172eb9 (5c:6eb9)
|
||||||
|
|
||||||
Function172eb9:
|
Function172eb9:
|
||||||
ld a, [rSVBK] ; $ff00+$70
|
ld a, [rSVBK]
|
||||||
push af
|
push af
|
||||||
ld a, $5
|
ld a, $5
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
ld hl, Palette_172edf
|
ld hl, Palette_172edf
|
||||||
ld de, Unkn1Pals
|
ld de, Unkn1Pals
|
||||||
ld bc, $40
|
ld bc, $40
|
||||||
@ -2129,7 +2129,7 @@ Function172eb9:
|
|||||||
call CopyBytes
|
call CopyBytes
|
||||||
call SetPalettes
|
call SetPalettes
|
||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a ; $ff00+$70
|
ld [rSVBK], a
|
||||||
ret
|
ret
|
||||||
; 172edf (5c:6edf)
|
; 172edf (5c:6edf)
|
||||||
|
|
||||||
|
49
wram.asm
49
wram.asm
@ -724,12 +724,13 @@ wc6e9::
|
|||||||
CurEnemyMoveNum:: ; c6e9
|
CurEnemyMoveNum:: ; c6e9
|
||||||
ds 1
|
ds 1
|
||||||
|
|
||||||
|
wEnemyHPAtTimeOfPlayerSwitch::
|
||||||
wc6ea:: ds 1
|
wc6ea:: ds 1
|
||||||
wc6eb:: ds 1
|
wc6eb:: ds 1
|
||||||
wPayDayMoney:: ds 3 ; c6ec
|
wPayDayMoney:: ds 3 ; c6ec
|
||||||
|
|
||||||
ds 1
|
wSafariMonAngerCount:: ds 1
|
||||||
|
wSafariMonEating::
|
||||||
wc6f0:: ds 2
|
wc6f0:: ds 2
|
||||||
wEnemyBackupDVs:: ; used when enemy is transformed
|
wEnemyBackupDVs:: ; used when enemy is transformed
|
||||||
wc6f2:: ds 2
|
wc6f2:: ds 2
|
||||||
@ -749,14 +750,14 @@ wc6f9::
|
|||||||
LastPlayerCounterMove:: ; c6f9
|
LastPlayerCounterMove:: ; c6f9
|
||||||
ds 1
|
ds 1
|
||||||
|
|
||||||
wc6fa:: ds 1
|
wEnemyMinimized:: ds 1 ; c6fa
|
||||||
|
|
||||||
AlreadyFailed:: ; c6fb
|
AlreadyFailed:: ; c6fb
|
||||||
ds 1
|
ds 1
|
||||||
|
|
||||||
wc6fc:: ds 1
|
wc6fc:: ds 1
|
||||||
wc6fd:: ds 1
|
wc6fd:: ds 1
|
||||||
wc6fe:: ds 1
|
wPlayerMinimized:: ds 1 ; c6fe
|
||||||
wc6ff::
|
wc6ff::
|
||||||
PlayerScreens:: ; c6ff
|
PlayerScreens:: ; c6ff
|
||||||
; bit
|
; bit
|
||||||
@ -870,8 +871,8 @@ wWildMonPP::
|
|||||||
wc739:: ds 4
|
wc739:: ds 4
|
||||||
wc73d:: ds 1
|
wc73d:: ds 1
|
||||||
wc73e:: ds 1
|
wc73e:: ds 1
|
||||||
wc73f:: ds 1
|
wPlayerJustGotFrozen:: ds 1
|
||||||
wc740:: ds 1
|
wEnemyJustGotFrozen:: ds 1
|
||||||
wc741::
|
wc741::
|
||||||
wBattleEnd::
|
wBattleEnd::
|
||||||
; c741
|
; c741
|
||||||
@ -1241,6 +1242,7 @@ Requested1bppSource:: ; cf6d
|
|||||||
Requested1bppDest:: ; cf6f
|
Requested1bppDest:: ; cf6f
|
||||||
ds 2
|
ds 2
|
||||||
|
|
||||||
|
; something to do with menu
|
||||||
wcf71:: ds 1
|
wcf71:: ds 1
|
||||||
wcf72:: ds 1
|
wcf72:: ds 1
|
||||||
wcf73:: ds 1
|
wcf73:: ds 1
|
||||||
@ -1252,21 +1254,31 @@ wcf76:: ds 1
|
|||||||
wcf77:: ds 1
|
wcf77:: ds 1
|
||||||
wcf78:: ds 9
|
wcf78:: ds 9
|
||||||
|
|
||||||
; menu data header buffer (ds 16)
|
; menu data header
|
||||||
wcf81:: ds 1
|
wMenuDataHeader:: ; cf81
|
||||||
|
wMenuFlags:: ds 1
|
||||||
; dw related to tilemap
|
|
||||||
wMenuBorderTopCoord:: ds 1
|
wMenuBorderTopCoord:: ds 1
|
||||||
wMenuBorderLeftCoord:: ds 1
|
wMenuBorderLeftCoord:: ds 1
|
||||||
wMenuBorderBottomCoord:: ds 1
|
wMenuBorderBottomCoord:: ds 1
|
||||||
wMenuBorderRightCoord:: ds 1
|
wMenuBorderRightCoord:: ds 1
|
||||||
|
wMenuData2Pointer:: ds 2
|
||||||
wcf86:: ds 1
|
|
||||||
wcf87:: ds 1
|
|
||||||
wMenuCursorBuffer:: ds 2
|
wMenuCursorBuffer:: ds 2
|
||||||
wcf8a:: ds 7 ; menu data 2 bank?
|
; end menu data header
|
||||||
|
wMenuDataBank:: ds 1 ; menu data bank?
|
||||||
|
ds 6
|
||||||
|
wMenuDataHeaderEnd::
|
||||||
|
|
||||||
|
wMenuData2::
|
||||||
|
wMenuData2Flags:: ds 1 ; cf91
|
||||||
|
; bit 7: When set, start printing text one tile to the right of the border
|
||||||
|
; bit 6: When set, start printing text one tile below the border
|
||||||
|
; bit 5: ????
|
||||||
|
; bit 4: ????
|
||||||
|
; bit 3: ????
|
||||||
|
; bit 2: ????
|
||||||
|
; bit 1: ????
|
||||||
|
; bit 0: ????
|
||||||
|
|
||||||
wMenuData2Flags:: ds 1
|
|
||||||
wMenuData2Items:: ds 1
|
wMenuData2Items:: ds 1
|
||||||
wcf93:: ds 1
|
wcf93:: ds 1
|
||||||
wcf94:: ds 1
|
wcf94:: ds 1
|
||||||
@ -1276,12 +1288,14 @@ wcf97:: ds 1 ; addr hi
|
|||||||
wcf98:: ds 3
|
wcf98:: ds 3
|
||||||
wcf9b:: ds 3
|
wcf9b:: ds 3
|
||||||
wcf9e:: ds 3
|
wcf9e:: ds 3
|
||||||
|
wMenuData2End::
|
||||||
wcfa1:: ds 1
|
wcfa1:: ds 1
|
||||||
|
|
||||||
wcfa2:: ds 1
|
wcfa2:: ds 1
|
||||||
wcfa3:: ds 1
|
wcfa3:: ds 1
|
||||||
wcfa4:: ds 1
|
wcfa4:: ds 1
|
||||||
wcfa5:: ds 1
|
wcfa5:: ds 1 ; dynamic menu flags?
|
||||||
wcfa6:: ds 1
|
wcfa6:: ds 1 ; dynamic menu flags?
|
||||||
wcfa7:: ds 1
|
wcfa7:: ds 1
|
||||||
wcfa8:: ds 1
|
wcfa8:: ds 1
|
||||||
MenuSelection2:: ds 1
|
MenuSelection2:: ds 1
|
||||||
@ -1389,6 +1403,7 @@ SECTION "WRAM 1", WRAMX, BANK [1]
|
|||||||
MiscBuffer0::
|
MiscBuffer0::
|
||||||
wd000:: ds 1
|
wd000:: ds 1
|
||||||
MiscBuffer1::
|
MiscBuffer1::
|
||||||
|
DefaultSpawnpoint::
|
||||||
wd001:: ds 1
|
wd001:: ds 1
|
||||||
wd002::
|
wd002::
|
||||||
MiscBuffer2::
|
MiscBuffer2::
|
||||||
|
Loading…
Reference in New Issue
Block a user