Merge branch 'master' of https://github.com/xCrystal/pokecrystal (resolve PR #459)

# Conflicts:
#	data/items/descriptions.asm
#	data/sprite_anims/framesets.asm
#	engine/crystal_colors.asm
#	engine/events/kurt.asm
#	engine/events/special.asm
#	engine/events/std_scripts.asm
#	engine/events_3.asm
#	engine/item_effects.asm
#	engine/namingscreen.asm
#	engine/scripting.asm
#	engine/stats_screen.asm
#	engine/trade_animation.asm
#	home/audio.asm
#	main.asm
#	maps/BattleTower1F.asm
#	maps/BattleTowerBattleRoom.asm
#	maps/BurnedTowerB1F.asm
#	maps/ElmsLab.asm
#	maps/GoldenrodDeptStore5F.asm
#	maps/GoldenrodUnderground.asm
#	maps/HallOfFame.asm
#	maps/MahoganyTown.asm
#	maps/ManiasHouse.asm
#	maps/MobileBattleRoom.asm
#	maps/MobileTradeRoomMobile.asm
#	maps/RadioTower2F.asm
#	maps/Route35NationalParkGate.asm
#	maps/Route36NationalParkGate.asm
#	maps/Route39Farmhouse.asm
#	tilesets/palette_maps.asm
This commit is contained in:
Remy Oukaour 2018-01-14 22:56:36 -05:00
commit 5c28d05bb4
249 changed files with 1382 additions and 1408 deletions

13
data/unknown_table.asm Executable file
View File

@ -0,0 +1,13 @@
Unreferenced_53d84:
db $1a, $15
db $33, $16
db $4b, $17
db $62, $18
db $79, $19
db $90, $1a
db $a8, $1b
db $c4, $1c
db $e0, $1d
db $f6, $1e
db $ff, $1f
db $ff, $20

View File

@ -1,4 +1,4 @@
Dakutens: ; dummied out Dakutens: ; unused
db "かが", "きぎ", "くぐ", "けげ", "こご" db "かが", "きぎ", "くぐ", "けげ", "こご"
db "さざ", "しじ", "すず", "せぜ", "そぞ" db "さざ", "しじ", "すず", "せぜ", "そぞ"
db "ただ", "ちぢ", "つづ", "てで", "とど" db "ただ", "ちぢ", "つづ", "てで", "とど"
@ -9,7 +9,7 @@ Dakutens: ; dummied out
db "ハバ", "ヒビ", "フブ", "へべ", "ホボ" db "ハバ", "ヒビ", "フブ", "へべ", "ホボ"
db -1 ; end db -1 ; end
Handakutens: ; dummied out Handakutens: ; unused
db "はぱ", "ひぴ", "ふぷ", "へぺ", "ほぽ" db "はぱ", "ひぴ", "ふぷ", "へぺ", "ほぽ"
db "ハパ", "ヒピ", "フプ", "へぺ", "ホポ" db "ハパ", "ヒピ", "フプ", "へぺ", "ホポ"
db -1 ; end db -1 ; end

View File

@ -1,5 +1,4 @@
GetGen1TrainerClassName: ; 50a28 Unreferenced_GetGen1TrainerClassName: ; 50a28
; XXX
ld hl, .Strings ld hl, .Strings
ld a, [TrainerClass] ld a, [TrainerClass]
dec a dec a

View File

@ -545,7 +545,7 @@ AI_Items: ; 39196
AIUpdateHUD: ; 38387 AIUpdateHUD: ; 38387
call UpdateEnemyMonInParty call UpdateEnemyMonInParty
farcall UpdateEnemyHUD farcall Predef_UpdateEnemyHUD
ld a, $1 ld a, $1
ld [hBGMapMode], a ld [hBGMapMode], a
ld hl, wEnemyItemState ld hl, wEnemyItemState
@ -664,7 +664,7 @@ EnemyPotionFinish: ; 38436
xor a xor a
ld [wWhichHPBar], a ld [wWhichHPBar], a
call AIUsedItemSound call AIUsedItemSound
predef AnimateHPBar predef Predef_AnimateHPBar
jp AIUpdateHUD jp AIUpdateHUD

View File

@ -92,7 +92,7 @@ AIChooseMove: ; 440ce
push bc push bc
ld d, BANK(TrainerClassAttributes) ld d, BANK(TrainerClassAttributes)
predef FlagPredef predef Predef_SmallFarFlagAction
ld d, c ld d, c
pop bc pop bc

View File

@ -1488,7 +1488,7 @@ AI_Smart_Encore: ; 38c3b
push hl push hl
ld a, [wEnemyMoveStruct + MOVE_TYPE] ld a, [wEnemyMoveStruct + MOVE_TYPE]
ld hl, EnemyMonType1 ld hl, EnemyMonType1
predef CheckTypeMatchup predef Predef_CheckTypeMatchup
pop hl pop hl
ld a, [wd265] ld a, [wd265]

View File

@ -28,7 +28,7 @@ CheckPlayerMoveTypeMatchups: ; 3484e
inc hl inc hl
call GetMoveByte call GetMoveByte
ld hl, EnemyMonType ld hl, EnemyMonType
call CheckTypeMatchup call Predef_CheckTypeMatchup
ld a, [wTypeMatchup] ld a, [wTypeMatchup]
cp 10 + 1 ; 1.0 + 0.1 cp 10 + 1 ; 1.0 + 0.1
jr nc, .super_effective jr nc, .super_effective
@ -73,7 +73,7 @@ CheckPlayerMoveTypeMatchups: ; 3484e
ld a, [BattleMonType1] ld a, [BattleMonType1]
ld b, a ld b, a
ld hl, EnemyMonType1 ld hl, EnemyMonType1
call CheckTypeMatchup call Predef_CheckTypeMatchup
ld a, [wTypeMatchup] ld a, [wTypeMatchup]
cp 10 + 1 ; 1.0 + 0.1 cp 10 + 1 ; 1.0 + 0.1
jr c, .ok jr c, .ok
@ -82,7 +82,7 @@ CheckPlayerMoveTypeMatchups: ; 3484e
ld a, [BattleMonType2] ld a, [BattleMonType2]
cp b cp b
jr z, .ok2 jr z, .ok2
call CheckTypeMatchup call Predef_CheckTypeMatchup
ld a, [wTypeMatchup] ld a, [wTypeMatchup]
cp 10 + 1 ; 1.0 + 0.1 cp 10 + 1 ; 1.0 + 0.1
jr c, .ok2 jr c, .ok2
@ -123,7 +123,7 @@ CheckPlayerMoveTypeMatchups: ; 3484e
inc hl inc hl
call GetMoveByte call GetMoveByte
ld hl, BattleMonType1 ld hl, BattleMonType1
call CheckTypeMatchup call Predef_CheckTypeMatchup
ld a, [wTypeMatchup] ld a, [wTypeMatchup]
; immune ; immune
@ -390,7 +390,7 @@ FindEnemyMonsImmuneToLastCounterMove: ; 34a2a
inc hl inc hl
call GetMoveByte call GetMoveByte
ld hl, BaseType ld hl, BaseType
call CheckTypeMatchup call Predef_CheckTypeMatchup
ld a, [wTypeMatchup] ld a, [wTypeMatchup]
and a and a
jr nz, .next jr nz, .next
@ -481,7 +481,7 @@ FindEnemyMonsWithASuperEffectiveMove: ; 34aa7
inc hl inc hl
call GetMoveByte call GetMoveByte
ld hl, BattleMonType1 ld hl, BattleMonType1
call CheckTypeMatchup call Predef_CheckTypeMatchup
; if immune or not very effective: continue ; if immune or not very effective: continue
ld a, [wTypeMatchup] ld a, [wTypeMatchup]
@ -585,7 +585,7 @@ FindEnemyMonsThatResistPlayer: ; 34b20
.skip_move .skip_move
ld a, [BattleMonType1] ld a, [BattleMonType1]
ld hl, BaseType ld hl, BaseType
call CheckTypeMatchup call Predef_CheckTypeMatchup
ld a, [wTypeMatchup] ld a, [wTypeMatchup]
cp 10 + 1 cp 10 + 1
jr nc, .dont_choose_mon jr nc, .dont_choose_mon
@ -593,7 +593,7 @@ FindEnemyMonsThatResistPlayer: ; 34b20
.check_type .check_type
ld hl, BaseType ld hl, BaseType
call CheckTypeMatchup call Predef_CheckTypeMatchup
ld a, [wTypeMatchup] ld a, [wTypeMatchup]
cp 10 + 1 cp 10 + 1
jr nc, .dont_choose_mon jr nc, .dont_choose_mon

View File

@ -67,7 +67,7 @@ _AnimateHPBar: ; d627
ld a, [hli] ld a, [hli]
ld b, a ld b, a
pop hl pop hl
call ComputeHPBarPixels call Predef_ComputeHPBarPixels
ld a, e ld a, e
ld [wCurHPBarPixels], a ld [wCurHPBarPixels], a
@ -79,7 +79,7 @@ _AnimateHPBar: ; d627
ld e, a ld e, a
ld a, [wCurHPAnimMaxHP + 1] ld a, [wCurHPAnimMaxHP + 1]
ld d, a ld d, a
call ComputeHPBarPixels call Predef_ComputeHPBarPixels
ld a, e ld a, e
ld [wNewHPBarPixels], a ld [wNewHPBarPixels], a
@ -183,11 +183,11 @@ LongAnim_UpdateVariables: ; d6f5
ld c, a ld c, a
ld a, [hli] ld a, [hli]
ld b, a ld b, a
; This routine is buggy. The result from ComputeHPBarPixels is stored ; This routine is buggy. The result from Predef_ComputeHPBarPixels is stored
; in e. However, the pop de opcode deletes this result before it is even ; in e. However, the pop de opcode deletes this result before it is even
; used. The game then proceeds as though it never deleted that output. ; used. The game then proceeds as though it never deleted that output.
; To fix, uncomment the line below. ; To fix, uncomment the line below.
call ComputeHPBarPixels call Predef_ComputeHPBarPixels
; ld a, e ; ld a, e
pop bc pop bc
pop de pop de
@ -227,7 +227,7 @@ LongHPBarAnim_UpdateTiles: ; d749
ld e, a ld e, a
ld a, [wCurHPAnimMaxHP + 1] ld a, [wCurHPAnimMaxHP + 1]
ld d, a ld d, a
call ComputeHPBarPixels call Predef_ComputeHPBarPixels
ld c, e ld c, e
ld d, HP_BAR_LENGTH ld d, HP_BAR_LENGTH
ld a, [wWhichHPBar] ld a, [wWhichHPBar]

View File

@ -1,4 +1,4 @@
Predef_StartBattle: ; 8c20f Predef_DoBattleTransition: ; 8c20f
call .InitGFX call .InitGFX
ld a, [rBGP] ld a, [rBGP]
ld [wBGP], a ld [wBGP], a
@ -16,7 +16,7 @@ Predef_StartBattle: ; 8c20f
ld a, [wJumptableIndex] ld a, [wJumptableIndex]
bit 7, a bit 7, a
jr nz, .done jr nz, .done
call FlashyTransitionToBattle call BattleTransitionJumptable
call DelayFrame call DelayFrame
jr .loop jr .loop
@ -144,7 +144,7 @@ TrainerBattlePokeballTiles: ; 8c2f4
INCBIN "gfx/overworld/trainer_battle_pokeball_tiles.2bpp" INCBIN "gfx/overworld/trainer_battle_pokeball_tiles.2bpp"
FlashyTransitionToBattle: ; 8c314 BattleTransitionJumptable: ; 8c314
jumptable .dw, wJumptableIndex jumptable .dw, wJumptableIndex
; 8c323 ; 8c323
@ -859,8 +859,7 @@ ENDM
ret ret
; 8c7c9 (23:47c9) ; 8c7c9 (23:47c9)
Function8c7c9: Unreferenced_Function8c7c9:
; XXX
ld a, $1 ld a, $1
ld [hBGMapMode], a ld [hBGMapMode], a
call WaitBGMap call WaitBGMap

View File

@ -47,7 +47,7 @@ DoBattle: ; 3c000
.player_2 .player_2
call LoadTileMapToTempTileMap call LoadTileMapToTempTileMap
call CheckPlayerPartyForFitPkmn call Predef_CheckPlayerPartyForFitPkmn
ld a, d ld a, d
and a and a
jp z, LostBattle jp z, LostBattle
@ -160,7 +160,7 @@ WildFled_EnemyFled_LinkBattleCanceled: ; 3c0e5
BattleTurn: ; 3c12f BattleTurn: ; 3c12f
.loop .loop
call MobileFn_3c1bf call Stubbed_Function3c1bf
call CheckContestBattleOver call CheckContestBattleOver
jp c, .quit jp c, .quit
@ -231,7 +231,8 @@ BattleTurn: ; 3c12f
ret ret
; 3c1bf ; 3c1bf
MobileFn_3c1bf: mobile Stubbed_Function3c1bf:
ret
ld a, $5 ld a, $5
call GetSRAMBank call GetSRAMBank
ld hl, $a89b ; s5_a89b ld hl, $a89b ; s5_a89b
@ -1277,7 +1278,7 @@ HandleWrap: ; 3c874
xor a xor a
ld [wNumHits], a ld [wNumHits], a
ld [FXAnimID + 1], a ld [FXAnimID + 1], a
predef PlayBattleAnim predef Predef_PlayBattleAnim
call SwitchTurnCore call SwitchTurnCore
.skip_anim .skip_anim
@ -1943,8 +1944,7 @@ GetMaxHP: ; 3ccac
ret ret
; 3ccc2 ; 3ccc2
GetHalfHP: ; 3ccc2 Unreferenced_GetHalfHP: ; 3ccc2
; unreferenced
ld hl, BattleMonHP ld hl, BattleMonHP
ld a, [hBattleTurn] ld a, [hBattleTurn]
and a and a
@ -2040,7 +2040,7 @@ UpdateHPBar: ; 3cd3c
.ok .ok
push bc push bc
ld [wWhichHPBar], a ld [wWhichHPBar], a
predef AnimateHPBar predef Predef_AnimateHPBar
pop bc pop bc
ret ret
; 3cd55 ; 3cd55
@ -2054,7 +2054,7 @@ HandleEnemyMonFaint: ; 3cd55
xor a xor a
ld [wWhichMonFaintedFirst], a ld [wWhichMonFaintedFirst], a
call UpdateBattleStateAndExperienceAfterEnemyFaint call UpdateBattleStateAndExperienceAfterEnemyFaint
call CheckPlayerPartyForFitPkmn call Predef_CheckPlayerPartyForFitPkmn
ld a, d ld a, d
and a and a
jp z, LostBattle jp z, LostBattle
@ -2062,7 +2062,7 @@ HandleEnemyMonFaint: ; 3cd55
ld hl, BattleMonHP ld hl, BattleMonHP
ld a, [hli] ld a, [hli]
or [hl] or [hl]
call nz, UpdatePlayerHUD call nz, Predef_UpdatePlayerHUD
ld a, $1 ld a, $1
ld [hBGMapMode], a ld [hBGMapMode], a
@ -2186,7 +2186,7 @@ UpdateBattleStateAndExperienceAfterEnemyFaint: ; 3ce01
call PlayerMonFaintHappinessMod call PlayerMonFaintHappinessMod
.player_mon_did_not_faint .player_mon_did_not_faint
call CheckPlayerPartyForFitPkmn call Predef_CheckPlayerPartyForFitPkmn
ld a, d ld a, d
and a and a
ret z ret z
@ -2581,7 +2581,7 @@ AddBattleMoneyToAccount: ; 3d0be
push bc push bc
ld b, h ld b, h
ld c, l ld c, l
farcall TrainerRankings_AddToBattlePayouts farcall StubbedTrainerRankings_AddToBattlePayouts
pop bc pop bc
pop hl pop hl
.loop .loop
@ -2670,7 +2670,7 @@ HandlePlayerMonFaint: ; 3d14e
ld a, $1 ld a, $1
ld [wWhichMonFaintedFirst], a ld [wWhichMonFaintedFirst], a
call PlayerMonFaintHappinessMod call PlayerMonFaintHappinessMod
call CheckPlayerPartyForFitPkmn call Predef_CheckPlayerPartyForFitPkmn
ld a, d ld a, d
and a and a
jp z, LostBattle jp z, LostBattle
@ -2716,7 +2716,7 @@ PlayerMonFaintHappinessMod: ; 3d1aa
ld c, a ld c, a
ld hl, wBattleParticipantsNotFainted ld hl, wBattleParticipantsNotFainted
ld b, RESET_FLAG ld b, RESET_FLAG
predef FlagPredef predef Predef_SmallFarFlagAction
ld hl, EnemySubStatus3 ld hl, EnemySubStatus3
res SUBSTATUS_IN_LOOP, [hl] res SUBSTATUS_IN_LOOP, [hl]
xor a xor a
@ -3313,10 +3313,10 @@ AddBattleParticipant: ; 3d581
ld hl, wBattleParticipantsNotFainted ld hl, wBattleParticipantsNotFainted
ld b, SET_FLAG ld b, SET_FLAG
push bc push bc
predef FlagPredef predef Predef_SmallFarFlagAction
pop bc pop bc
ld hl, wBattleParticipantsIncludingFainted ld hl, wBattleParticipantsIncludingFainted
predef_jump FlagPredef predef_jump Predef_SmallFarFlagAction
; 3d599 ; 3d599
FindPkmnInOTPartyToSwitchIntoBattle: ; 3d599 FindPkmnInOTPartyToSwitchIntoBattle: ; 3d599
@ -3534,7 +3534,7 @@ LoadEnemyPkmnToSwitchTo: ; 3d6ca
and a and a
jr nz, .skip_unown jr nz, .skip_unown
ld hl, EnemyMonDVs ld hl, EnemyMonDVs
predef GetUnownLetter predef Predef_GetUnownLetter
ld a, [UnownLetter] ld a, [UnownLetter]
ld [wFirstUnownSeen], a ld [wFirstUnownSeen], a
.skip_unown .skip_unown
@ -3644,8 +3644,8 @@ Function_SetEnemyPkmnAndSendOutAnimation: ; 3d7c7
call GetBaseData call GetBaseData
ld a, OTPARTYMON ld a, OTPARTYMON
ld [MonType], a ld [MonType], a
predef CopyPkmnToTempMon predef Predef_CopyPkmnToTempMon
call GetEnemyMonFrontpic call Predef_GetEnemyMonFrontpic
xor a xor a
ld [wNumHits], a ld [wNumHits], a
@ -3670,7 +3670,7 @@ Function_SetEnemyPkmnAndSendOutAnimation: ; 3d7c7
hlcoord 12, 0 hlcoord 12, 0
ld d, $0 ld d, $0
ld e, ANIM_MON_SLOW ld e, ANIM_MON_SLOW
predef AnimateFrontpic predef Predef_AnimateFrontpic
jr .skip_cry jr .skip_cry
.cry_no_anim .cry_no_anim
@ -3680,7 +3680,7 @@ Function_SetEnemyPkmnAndSendOutAnimation: ; 3d7c7
call PlayStereoCry call PlayStereoCry
.skip_cry .skip_cry
call UpdateEnemyHUD call Predef_UpdateEnemyHUD
ld a, $1 ld a, $1
ld [hBGMapMode], a ld [hBGMapMode], a
ret ret
@ -3721,7 +3721,7 @@ ResetEnemyStatLevels: ; 3d867
ret ret
; 3d873 ; 3d873
CheckPlayerPartyForFitPkmn: ; 3d873 Predef_CheckPlayerPartyForFitPkmn: ; 3d873
; Has the player any Pkmn in his Party that can fight? ; Has the player any Pkmn in his Party that can fight?
ld a, [PartyCount] ld a, [PartyCount]
ld e, a ld e, a
@ -4124,7 +4124,7 @@ SwitchPlayerMon: ; 3db32
SendOutPlayerMon: ; 3db5f SendOutPlayerMon: ; 3db5f
ld hl, BattleMonDVs ld hl, BattleMonDVs
predef GetUnownLetter predef Predef_GetUnownLetter
hlcoord 1, 5 hlcoord 1, 5
ld b, 7 ld b, 7
ld c, 8 ld c, 8
@ -4132,7 +4132,7 @@ SendOutPlayerMon: ; 3db5f
call WaitBGMap call WaitBGMap
xor a xor a
ld [hBGMapMode], a ld [hBGMapMode], a
call GetBattleMonBackpic call Predef_GetBattleMonBackpic
xor a xor a
ld [hGraphicStartTile], a ld [hGraphicStartTile], a
ld [wBattleMenuCursorBuffer], a ld [wBattleMenuCursorBuffer], a
@ -4172,7 +4172,7 @@ SendOutPlayerMon: ; 3db5f
call PlayStereoCry call PlayStereoCry
.statused .statused
call UpdatePlayerHUD call Predef_UpdatePlayerHUD
ld a, $1 ld a, $1
ld [hBGMapMode], a ld [hBGMapMode], a
ret ret
@ -4218,13 +4218,13 @@ BreakAttraction: ; 3dc18
SpikesDamage: ; 3dc23 SpikesDamage: ; 3dc23
ld hl, PlayerScreens ld hl, PlayerScreens
ld de, BattleMonType ld de, BattleMonType
ld bc, UpdatePlayerHUD ld bc, Predef_UpdatePlayerHUD
ld a, [hBattleTurn] ld a, [hBattleTurn]
and a and a
jr z, .ok jr z, .ok
ld hl, EnemyScreens ld hl, EnemyScreens
ld de, EnemyMonType ld de, EnemyMonType
ld bc, UpdateEnemyHUD ld bc, Predef_UpdateEnemyHUD
.ok .ok
bit SCREENS_SPIKES, [hl] bit SCREENS_SPIKES, [hl]
@ -4306,7 +4306,7 @@ PursuitSwitch: ; 3dc5b
ld c, a ld c, a
ld hl, wBattleParticipantsNotFainted ld hl, wBattleParticipantsNotFainted
ld b, RESET_FLAG ld b, RESET_FLAG
predef FlagPredef predef Predef_SmallFarFlagAction
call PlayerMonFaintedAnimation call PlayerMonFaintedAnimation
ld hl, BattleText_PkmnFainted ld hl, BattleText_PkmnFainted
jr .done_fainted jr .done_fainted
@ -4455,7 +4455,7 @@ HandleHPHealingItem: ; 3dd2f
.got_hp_bar_coords .got_hp_bar_coords
ld [wWhichHPBar], a ld [wWhichHPBar], a
predef AnimateHPBar predef Predef_AnimateHPBar
UseOpponentItem: UseOpponentItem:
call RefreshBattleHuds call RefreshBattleHuds
callfar GetOpponentItem callfar GetOpponentItem
@ -4478,7 +4478,7 @@ ItemRecoveryAnim: ; 3ddc8
xor a xor a
ld [wNumHits], a ld [wNumHits], a
ld [FXAnimID + 1], a ld [FXAnimID + 1], a
predef PlayBattleAnim predef Predef_PlayBattleAnim
call SwitchTurnCore call SwitchTurnCore
pop bc pop bc
pop de pop de
@ -4708,7 +4708,7 @@ UpdateBattleHUDs: ; 3df2c
ret ret
; 3df48 ; 3df48
UpdatePlayerHUD:: ; 3df48 Predef_UpdatePlayerHUD:: ; 3df48
push hl push hl
push de push de
push bc push bc
@ -4741,7 +4741,7 @@ DrawPlayerHUD: ; 3df58
ld b, 1 ld b, 1
xor a ; PARTYMON xor a ; PARTYMON
ld [MonType], a ld [MonType], a
predef DrawPlayerHP predef Predef_DrawPlayerHP
; Exp bar ; Exp bar
push de push de
@ -4754,7 +4754,7 @@ DrawPlayerHUD: ; 3df58
hlcoord 10, 11 hlcoord 10, 11
ld a, [TempMonLevel] ld a, [TempMonLevel]
ld b, a ld b, a
call FillInExpBar call Predef_FillInExpBar
pop de pop de
ret ret
; 3df98 ; 3df98
@ -4823,7 +4823,7 @@ PrintPlayerHUD: ; 3dfbf
ld a, TEMPMON ld a, TEMPMON
ld [MonType], a ld [MonType], a
callfar GetGender callfar Predef_GetGender
ld a, " " ld a, " "
jr c, .got_gender_char jr c, .got_gender_char
ld a, "♂" ld a, "♂"
@ -4837,7 +4837,7 @@ PrintPlayerHUD: ; 3dfbf
push af ; back up gender push af ; back up gender
push hl push hl
ld de, BattleMonStatus ld de, BattleMonStatus
predef PlaceNonFaintStatus predef Predef_PlaceNonFaintStatus
pop hl pop hl
pop bc pop bc
ret nz ret nz
@ -4852,7 +4852,7 @@ PrintPlayerHUD: ; 3dfbf
jp PrintLevel jp PrintLevel
; 3e036 ; 3e036
UpdateEnemyHUD:: ; 3e036 Predef_UpdateEnemyHUD:: ; 3e036
push hl push hl
push de push de
push bc push bc
@ -4901,7 +4901,7 @@ DrawEnemyHUD: ; 3e043
ld a, TEMPMON ld a, TEMPMON
ld [MonType], a ld [MonType], a
callfar GetGender callfar Predef_GetGender
ld a, " " ld a, " "
jr c, .got_gender jr c, .got_gender
ld a, "♂" ld a, "♂"
@ -4916,7 +4916,7 @@ DrawEnemyHUD: ; 3e043
push af push af
push hl push hl
ld de, EnemyMonStatus ld de, EnemyMonStatus
predef PlaceNonFaintStatus predef Predef_PlaceNonFaintStatus
pop hl pop hl
pop bc pop bc
jr nz, .skip_level jr nz, .skip_level
@ -5141,8 +5141,8 @@ BattleMenu_Pack: ; 3e1c7
call ClearPalettes call ClearPalettes
call DelayFrame call DelayFrame
call _LoadBattleFontsHPBar call _LoadBattleFontsHPBar
call GetBattleMonBackpic call Predef_GetBattleMonBackpic
call GetEnemyMonFrontpic call Predef_GetEnemyMonFrontpic
call ExitMenu call ExitMenu
call WaitBGMap call WaitBGMap
call FinishBattleAnim call FinishBattleAnim
@ -5174,10 +5174,10 @@ BattleMenu_Pack: ; 3e1c7
ld a, [BattleType] ld a, [BattleType]
cp BATTLETYPE_TUTORIAL cp BATTLETYPE_TUTORIAL
jr z, .tutorial2 jr z, .tutorial2
call GetBattleMonBackpic call Predef_GetBattleMonBackpic
.tutorial2 .tutorial2
call GetEnemyMonFrontpic call Predef_GetEnemyMonFrontpic
ld a, $1 ld a, $1
ld [wMenuCursorY], a ld [wMenuCursorY], a
call ExitMenu call ExitMenu
@ -5531,7 +5531,7 @@ MoveSelectionScreen: ; 3e4bc
.got_start_coord .got_start_coord
ld a, SCREEN_WIDTH ld a, SCREEN_WIDTH
ld [Buffer1], a ld [Buffer1], a
predef ListMoves predef Predef_ListMoves
ld b, 5 ld b, 5
ld a, [wMoveSelectionMenuType] ld a, [wMoveSelectionMenuType]
@ -5864,7 +5864,7 @@ MoveInfoBox: ; 3e6c8
ld a, [wPlayerMoveStruct + MOVE_ANIM] ld a, [wPlayerMoveStruct + MOVE_ANIM]
ld b, a ld b, a
hlcoord 2, 10 hlcoord 2, 10
predef PrintMoveType predef Predef_PrintMoveType
.done .done
ret ret
@ -6319,7 +6319,7 @@ LoadEnemyMon: ; 3e8eb
; Get letter based on DVs ; Get letter based on DVs
ld hl, EnemyMonDVs ld hl, EnemyMonDVs
predef GetUnownLetter predef Predef_GetUnownLetter
; Can't use any letters that haven't been unlocked ; Can't use any letters that haven't been unlocked
; If combined with forced shiny battletype, causes an infinite loop ; If combined with forced shiny battletype, causes an infinite loop
call CheckUnownLetter call CheckUnownLetter
@ -6408,7 +6408,7 @@ LoadEnemyMon: ; 3e8eb
ld de, EnemyMonMaxHP ld de, EnemyMonMaxHP
ld b, FALSE ld b, FALSE
ld hl, EnemyMonDVs - (MON_DVS - MON_STAT_EXP + 1) ; LinkBattleRNs + 7 ; ? ld hl, EnemyMonDVs - (MON_DVS - MON_STAT_EXP + 1) ; LinkBattleRNs + 7 ; ?
predef CalcPkmnStats predef Predef_CalcPkmnStats
; If we're in a trainer battle, ; If we're in a trainer battle,
; get the rest of the parameters from the party struct ; get the rest of the parameters from the party struct
@ -6523,7 +6523,7 @@ LoadEnemyMon: ; 3e8eb
; Make sure the predef knows this isn't a partymon ; Make sure the predef knows this isn't a partymon
ld [wEvolutionOldSpecies], a ld [wEvolutionOldSpecies], a
; Fill moves based on level ; Fill moves based on level
predef FillMoves predef Predef_FillMoves
.PP: .PP:
; Trainer battle? ; Trainer battle?
@ -6534,7 +6534,7 @@ LoadEnemyMon: ; 3e8eb
; Fill wild PP ; Fill wild PP
ld hl, EnemyMonMoves ld hl, EnemyMonMoves
ld de, EnemyMonPP ld de, EnemyMonPP
predef FillPP predef Predef_FillPP
jr .Finish jr .Finish
.TrainerPP: .TrainerPP:
@ -6587,7 +6587,7 @@ LoadEnemyMon: ; 3e8eb
ld c, a ld c, a
ld b, SET_FLAG ld b, SET_FLAG
ld hl, PokedexSeen ld hl, PokedexSeen
predef FlagPredef predef Predef_SmallFarFlagAction
ld hl, EnemyMonStats ld hl, EnemyMonStats
ld de, EnemyStats ld de, EnemyStats
@ -6696,8 +6696,7 @@ CheckUnownLetter: ; 3eb75
; 3ebc7 ; 3ebc7
SwapBattlerLevels: ; 3ebc7 Unreferenced_SwapBattlerLevels: ; 3ebc7
; unreferenced
push bc push bc
ld a, [BattleMonLevel] ld a, [BattleMonLevel]
ld b, a ld b, a
@ -6716,7 +6715,7 @@ BattleWinSlideInEnemyTrainerFrontpic: ; 3ebd8
ld a, [OtherTrainerClass] ld a, [OtherTrainerClass]
ld [TrainerClass], a ld [TrainerClass], a
ld de, vTiles2 ld de, vTiles2
callfar GetTrainerPic callfar Predef_GetTrainerPic
hlcoord 19, 0 hlcoord 19, 0
ld c, 0 ld c, 0
@ -7089,7 +7088,7 @@ _LoadHPBar: ; 3eda6
ret ret
; 3edad ; 3edad
LoadHPExpBarGFX: ; unreferenced Unreferenced_LoadHPExpBarGFX:
ld de, EnemyHPBarBorderGFX ld de, EnemyHPBarBorderGFX
ld hl, vTiles2 tile $6c ld hl, vTiles2 tile $6c
lb bc, BANK(EnemyHPBarBorderGFX), 4 lb bc, BANK(EnemyHPBarBorderGFX), 4
@ -7193,7 +7192,7 @@ Call_PlayBattleAnim: ; 3ee17
ld a, d ld a, d
ld [FXAnimID + 1], a ld [FXAnimID + 1], a
call WaitBGMap call WaitBGMap
predef_jump PlayBattleAnim predef_jump Predef_PlayBattleAnim
; 3ee27 ; 3ee27
FinishBattleAnim: ; 3ee27 FinishBattleAnim: ; 3ee27
@ -7241,7 +7240,7 @@ GiveExperiencePoints: ; 3ee3b
ld c, a ld c, a
ld b, CHECK_FLAG ld b, CHECK_FLAG
ld d, $0 ld d, $0
predef FlagPredef predef Predef_SmallFarFlagAction
ld a, c ld a, c
and a and a
pop bc pop bc
@ -7419,7 +7418,7 @@ GiveExperiencePoints: ; 3ee3b
.not_max_exp .not_max_exp
xor a ; PARTYMON xor a ; PARTYMON
ld [MonType], a ld [MonType], a
predef CopyPkmnToTempMon predef Predef_CopyPkmnToTempMon
callfar CalcLevel callfar CalcLevel
pop bc pop bc
ld hl, MON_LEVEL ld hl, MON_LEVEL
@ -7456,7 +7455,7 @@ GiveExperiencePoints: ; 3ee3b
add hl, bc add hl, bc
push bc push bc
ld b, TRUE ld b, TRUE
predef CalcPkmnStats predef Predef_CalcPkmnStats
pop bc pop bc
pop de pop de
ld hl, MON_MAXHP + 1 ld hl, MON_MAXHP + 1
@ -7509,7 +7508,7 @@ GiveExperiencePoints: ; 3ee3b
call ApplyStatLevelMultiplierOnAllStats call ApplyStatLevelMultiplierOnAllStats
callfar ApplyStatusEffectOnPlayerStats callfar ApplyStatusEffectOnPlayerStats
callfar BadgeStatBoosts callfar BadgeStatBoosts
callfar UpdatePlayerHUD callfar Predef_UpdatePlayerHUD
call EmptyBattleTextBox call EmptyBattleTextBox
call LoadTileMapToTempTileMap call LoadTileMapToTempTileMap
ld a, $1 ld a, $1
@ -7532,14 +7531,14 @@ GiveExperiencePoints: ; 3ee3b
.skip_animation2 .skip_animation2
xor a ; PARTYMON xor a ; PARTYMON
ld [MonType], a ld [MonType], a
predef CopyPkmnToTempMon predef Predef_CopyPkmnToTempMon
hlcoord 9, 0 hlcoord 9, 0
ld b, $a ld b, $a
ld c, $9 ld c, $9
call TextBox call TextBox
hlcoord 11, 1 hlcoord 11, 1
ld bc, 4 ld bc, 4
predef PrintTempMonStats predef Predef_PrintTempMonStats
ld c, $1e ld c, $1e
call DelayFrames call DelayFrames
call WaitPressAorB_BlinkCursor call WaitPressAorB_BlinkCursor
@ -7559,7 +7558,7 @@ GiveExperiencePoints: ; 3ee3b
ld a, b ld a, b
ld [CurPartyLevel], a ld [CurPartyLevel], a
push bc push bc
predef LearnLevelMoves predef Predef_LearnLevelMoves
pop bc pop bc
ld a, b ld a, b
cp c cp c
@ -7570,7 +7569,7 @@ GiveExperiencePoints: ; 3ee3b
ld a, [CurPartyMon] ld a, [CurPartyMon]
ld c, a ld c, a
ld b, SET_FLAG ld b, SET_FLAG
predef FlagPredef predef Predef_SmallFarFlagAction
pop af pop af
ld [CurPartyLevel], a ld [CurPartyLevel], a
@ -7692,7 +7691,7 @@ AnimateExpBar: ; 3f136
ld [wd002], a ld [wd002], a
xor a ; PARTYMON xor a ; PARTYMON
ld [MonType], a ld [MonType], a
predef CopyPkmnToTempMon predef Predef_CopyPkmnToTempMon
ld a, [TempMonLevel] ld a, [TempMonLevel]
ld b, a ld b, a
ld e, a ld e, a
@ -8020,7 +8019,7 @@ TextJump_GoodComeBack: ; 3f352
db "@" db "@"
; 3f357 ; 3f357
UnusedFunction_TextJump_ComeBack: ; 3f357 Unreferenced_TextJump_ComeBack: ; 3f357
; this function doesn't seem to be used ; this function doesn't seem to be used
ld hl, TextJump_ComeBack ld hl, TextJump_ComeBack
ret ret
@ -8031,7 +8030,7 @@ TextJump_ComeBack: ; 3f35b
db "@" db "@"
; 3f360 ; 3f360
HandleSafariAngerEatingStatus: ; unreferenced Unreferenced_HandleSafariAngerEatingStatus:
ld hl, wSafariMonEating ld hl, wSafariMonEating
ld a, [hl] ld a, [hl]
and a and a
@ -8063,7 +8062,7 @@ HandleSafariAngerEatingStatus: ; unreferenced
jp StdBattleTextBox jp StdBattleTextBox
; 3f390 ; 3f390
FillInExpBar: ; 3f390 Predef_FillInExpBar: ; 3f390
push hl push hl
call CalcExpBar call CalcExpBar
pop hl pop hl
@ -8205,7 +8204,7 @@ PlaceExpBar: ; 3f41c
ret ret
; 3f43d ; 3f43d
GetBattleMonBackpic: ; 3f43d Predef_GetBattleMonBackpic: ; 3f43d
ld a, [PlayerSubStatus4] ld a, [PlayerSubStatus4]
bit SUBSTATUS_SUBSTITUTE, a bit SUBSTATUS_SUBSTITUTE, a
ld hl, BattleAnimCmd_RaiseSub ld hl, BattleAnimCmd_RaiseSub
@ -8221,9 +8220,9 @@ DropPlayerSub: ; 3f447
ld a, [BattleMonSpecies] ld a, [BattleMonSpecies]
ld [CurPartySpecies], a ld [CurPartySpecies], a
ld hl, BattleMonDVs ld hl, BattleMonDVs
predef GetUnownLetter predef Predef_GetUnownLetter
ld de, vTiles2 tile $31 ld de, vTiles2 tile $31
predef GetMonBackpic predef Predef_GetMonBackpic
pop af pop af
ld [CurPartySpecies], a ld [CurPartySpecies], a
ret ret
@ -8241,7 +8240,7 @@ GetBattleMonBackpic_DoAnim: ; 3f46f
ret ret
; 3f47c ; 3f47c
GetEnemyMonFrontpic: ; 3f47c Predef_GetEnemyMonFrontpic: ; 3f47c
ld a, [EnemySubStatus4] ld a, [EnemySubStatus4]
bit SUBSTATUS_SUBSTITUTE, a bit SUBSTATUS_SUBSTITUTE, a
ld hl, BattleAnimCmd_RaiseSub ld hl, BattleAnimCmd_RaiseSub
@ -8260,9 +8259,9 @@ DropEnemySub: ; 3f486
ld [CurPartySpecies], a ld [CurPartySpecies], a
call GetBaseData call GetBaseData
ld hl, EnemyMonDVs ld hl, EnemyMonDVs
predef GetUnownLetter predef Predef_GetUnownLetter
ld de, vTiles2 ld de, vTiles2
predef GetAnimatedFrontpicPredef predef Predef_GetAnimatedFrontpic
pop af pop af
ld [CurPartySpecies], a ld [CurPartySpecies], a
ret ret
@ -8279,7 +8278,7 @@ GetEnemyMonFrontpic_DoAnim: ; 3f4b4
ret ret
; 3f4c1 ; 3f4c1
StartBattle: ; 3f4c1 Predef_StartBattle: ; 3f4c1
; This check prevents you from entering a battle without any Pokemon. ; This check prevents you from entering a battle without any Pokemon.
; Those using walk-through-walls to bypass getting a Pokemon experience ; Those using walk-through-walls to bypass getting a Pokemon experience
; the effects of this check. ; the effects of this check.
@ -8298,14 +8297,13 @@ StartBattle: ; 3f4c1
ret ret
; 3f4d9 ; 3f4d9
_DoBattle: ; 3f4d9 Unreferenced_DoBattle: ; 3f4d9
; unreferenced
call DoBattle call DoBattle
ret ret
; 3f4dd ; 3f4dd
BattleIntro: ; 3f4dd BattleIntro: ; 3f4dd
farcall TrainerRankings_Battles ; mobile farcall StubbedTrainerRankings_Battles ; mobile
call LoadTrainerOrWildMonPic call LoadTrainerOrWildMonPic
xor a xor a
ld [TempBattleMonSpecies], a ld [TempBattleMonSpecies], a
@ -8339,7 +8337,7 @@ BattleIntro: ; 3f4dd
call ClearSprites call ClearSprites
ld a, [wBattleMode] ld a, [wBattleMode]
cp WILD_BATTLE cp WILD_BATTLE
call z, UpdateEnemyHUD call z, Predef_UpdateEnemyHUD
ld a, $1 ld a, $1
ld [hBGMapMode], a ld [hBGMapMode], a
ret ret
@ -8390,7 +8388,7 @@ BackUpBGMap2: ; 3f568
InitEnemyTrainer: ; 3f594 InitEnemyTrainer: ; 3f594
ld [TrainerClass], a ld [TrainerClass], a
farcall TrainerRankings_TrainerBattles farcall StubbedTrainerRankings_TrainerBattles
xor a xor a
ld [TempEnemyMonSpecies], a ld [TempEnemyMonSpecies], a
callfar GetTrainerAttributes callfar GetTrainerAttributes
@ -8404,14 +8402,14 @@ InitEnemyTrainer: ; 3f594
.ok .ok
ld de, vTiles2 ld de, vTiles2
callfar GetTrainerPic callfar Predef_GetTrainerPic
xor a xor a
ld [hGraphicStartTile], a ld [hGraphicStartTile], a
dec a dec a
ld [wEnemyItemState], a ld [wEnemyItemState], a
hlcoord 12, 0 hlcoord 12, 0
lb bc, 7, 7 lb bc, 7, 7
predef PlaceGraphic predef Predef_PlaceGraphic
ld a, -1 ld a, -1
ld [CurOTMon], a ld [CurOTMon], a
ld a, TRAINER_BATTLE ld a, TRAINER_BATTLE
@ -8446,7 +8444,7 @@ InitEnemyTrainer: ; 3f594
InitEnemyWildmon: ; 3f607 InitEnemyWildmon: ; 3f607
ld a, WILD_BATTLE ld a, WILD_BATTLE
ld [wBattleMode], a ld [wBattleMode], a
farcall TrainerRankings_WildBattles farcall StubbedTrainerRankings_WildBattles
call LoadEnemyMon call LoadEnemyMon
ld hl, EnemyMonMoves ld hl, EnemyMonMoves
ld de, wWildMonMoves ld de, wWildMonMoves
@ -8457,7 +8455,7 @@ InitEnemyWildmon: ; 3f607
ld bc, NUM_MOVES ld bc, NUM_MOVES
call CopyBytes call CopyBytes
ld hl, EnemyMonDVs ld hl, EnemyMonDVs
predef GetUnownLetter predef Predef_GetUnownLetter
ld a, [CurPartySpecies] ld a, [CurPartySpecies]
cp UNOWN cp UNOWN
jr nz, .skip_unown jr nz, .skip_unown
@ -8468,18 +8466,17 @@ InitEnemyWildmon: ; 3f607
ld [wFirstUnownSeen], a ld [wFirstUnownSeen], a
.skip_unown .skip_unown
ld de, vTiles2 ld de, vTiles2
predef GetAnimatedFrontpicPredef predef Predef_GetAnimatedFrontpic
xor a xor a
ld [TrainerClass], a ld [TrainerClass], a
ld [hGraphicStartTile], a ld [hGraphicStartTile], a
hlcoord 12, 0 hlcoord 12, 0
lb bc, 7, 7 lb bc, 7, 7
predef PlaceGraphic predef Predef_PlaceGraphic
ret ret
; 3f662 ; 3f662
Function3f662: ; 3f662 Unreferenced_Function3f662: ; 3f662
; XXX
ld hl, EnemyMonMoves ld hl, EnemyMonMoves
ld de, wListMoves_MoveIndicesBuffer ld de, wListMoves_MoveIndicesBuffer
ld b, NUM_MOVES ld b, NUM_MOVES
@ -8554,7 +8551,7 @@ ExitBattle: ; 3f69e
call CheckPayDay call CheckPayDay
xor a xor a
ld [wForceEvolution], a ld [wForceEvolution], a
predef EvolveAfterBattle predef Predef_EvolveAfterBattle
farcall GivePokerusAndConvertBerries farcall GivePokerusAndConvertBerries
ret ret
; 3f6d0 ; 3f6d0
@ -8629,7 +8626,7 @@ CheckPayDay: ; 3f71d
; 3f759 ; 3f759
ShowLinkBattleParticipantsAfterEnd: ; 3f759 ShowLinkBattleParticipantsAfterEnd: ; 3f759
farcall TrainerRankings_LinkBattles farcall StubbedTrainerRankings_LinkBattles
farcall BackupMobileEventIndex farcall BackupMobileEventIndex
ld a, [CurOTMon] ld a, [CurOTMon]
ld hl, OTPartyMon1Status ld hl, OTPartyMon1Status
@ -8659,17 +8656,17 @@ DisplayLinkBattleResult: ; 3f77c
cp $1 cp $1
jr c, .victory jr c, .victory
jr z, .loss jr z, .loss
farcall TrainerRankings_ColosseumDraws farcall StubbedTrainerRankings_ColosseumDraws
ld de, .Draw ld de, .Draw
jr .store_result jr .store_result
.victory .victory
farcall TrainerRankings_ColosseumWins farcall StubbedTrainerRankings_ColosseumWins
ld de, .Win ld de, .Win
jr .store_result jr .store_result
.loss .loss
farcall TrainerRankings_ColosseumLosses farcall StubbedTrainerRankings_ColosseumLosses
ld de, .Lose ld de, .Lose
jr .store_result jr .store_result
@ -9228,7 +9225,7 @@ InitBattleDisplay: ; 3fb6c
ld [hGraphicStartTile], a ld [hGraphicStartTile], a
hlcoord 2, 6 hlcoord 2, 6
lb bc, 6, 6 lb bc, 6, 6
predef PlaceGraphic predef Predef_PlaceGraphic
xor a xor a
ld [hWY], a ld [hWY], a
ld [rWY], a ld [rWY], a
@ -9301,7 +9298,7 @@ GetTrainerBackpic: ; 3fbff
.Decompress: .Decompress:
ld de, vTiles2 tile $31 ld de, vTiles2 tile $31
ld c, $31 ld c, $31
predef DecompressPredef predef Predef_Decompress
ret ret
; 3fc30 ; 3fc30
@ -9323,7 +9320,7 @@ CopyBackpic: ; 3fc30
ld [hGraphicStartTile], a ld [hGraphicStartTile], a
hlcoord 2, 6 hlcoord 2, 6
lb bc, 6, 6 lb bc, 6, 6
predef PlaceGraphic predef Predef_PlaceGraphic
ret ret
; 3fc5b ; 3fc5b
@ -9403,7 +9400,7 @@ BattleStartMessage: ; 3fc8b
hlcoord 12, 0 hlcoord 12, 0
ld d, $0 ld d, $0
ld e, ANIM_MON_NORMAL ld e, ANIM_MON_NORMAL
predef AnimateFrontpic predef Predef_AnimateFrontpic
jr .skip_cry ; cry is played during the animation jr .skip_cry ; cry is played during the animation
.cry_no_anim .cry_no_anim
@ -9417,7 +9414,7 @@ BattleStartMessage: ; 3fc8b
cp BATTLETYPE_FISH cp BATTLETYPE_FISH
jr nz, .NotFishing jr nz, .NotFishing
farcall TrainerRankings_HookedEncounters farcall StubbedTrainerRankings_HookedEncounters
ld hl, HookedPokemonAttackedText ld hl, HookedPokemonAttackedText
jr .PlaceBattleStartText jr .PlaceBattleStartText

View File

@ -182,7 +182,7 @@ CheckPlayerTurn:
call StdBattleTextBox call StdBattleTextBox
call CantMove call CantMove
call UpdateBattleMonInParty call UpdateBattleMonInParty
ld hl, UpdatePlayerHUD ld hl, Predef_UpdatePlayerHUD
call CallBattleCore call CallBattleCore
ld a, $1 ld a, $1
ld [hBGMapMode], a ld [hBGMapMode], a
@ -433,7 +433,7 @@ CheckEnemyTurn: ; 3421f
call StdBattleTextBox call StdBattleTextBox
call CantMove call CantMove
call UpdateEnemyMonInParty call UpdateEnemyMonInParty
ld hl, UpdateEnemyHUD ld hl, Predef_UpdateEnemyHUD
call CallBattleCore call CallBattleCore
ld a, $1 ld a, $1
ld [hBGMapMode], a ld [hBGMapMode], a
@ -672,7 +672,7 @@ HitConfusion: ; 343a5
and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND
call z, PlayFXAnimID call z, PlayFXAnimID
ld hl, UpdatePlayerHUD ld hl, Predef_UpdatePlayerHUD
call CallBattleCore call CallBattleCore
ld a, $1 ld a, $1
ld [hBGMapMode], a ld [hBGMapMode], a
@ -1538,12 +1538,12 @@ BattleCheckTypeMatchup: ; 347c8
ld hl, EnemyMonType1 ld hl, EnemyMonType1
ld a, [hBattleTurn] ld a, [hBattleTurn]
and a and a
jr z, CheckTypeMatchup jr z, Predef_CheckTypeMatchup
ld hl, BattleMonType1 ld hl, BattleMonType1
CheckTypeMatchup: ; 347d3 Predef_CheckTypeMatchup: ; 347d3
; There is an incorrect assumption about this function made in the AI related code: when ; There is an incorrect assumption about this function made in the AI related code: when
; the AI calls CheckTypeMatchup (not BattleCheckTypeMatchup), it assumes that placing the ; the AI calls Predef_CheckTypeMatchup (not BattleCheckTypeMatchup), it assumes that placing
; offensive type in a will make this function do the right thing. Since a is overwritten, ; the offensive type in a will make this function do the right thing. Since a is overwritten,
; this assumption is incorrect. A simple fix would be to load the move type for the ; this assumption is incorrect. A simple fix would be to load the move type for the
; current move into a in BattleCheckTypeMatchup, before falling through, which is ; current move into a in BattleCheckTypeMatchup, before falling through, which is
; consistent with how the rest of the code assumes this code works like. ; consistent with how the rest of the code assumes this code works like.
@ -2621,7 +2621,7 @@ BattleCommand_CheckDestinyBond: ; 351c0
ld [Buffer6], a ld [Buffer6], a
ld h, b ld h, b
ld l, c ld l, c
predef AnimateHPBar predef Predef_AnimateHPBar
call RefreshBattleHuds call RefreshBattleHuds
call BattleCommand_SwitchTurn call BattleCommand_SwitchTurn
@ -4015,7 +4015,7 @@ BattleCommand_PainSplit: ; 35926
ld a, $1 ld a, $1
ld [wWhichHPBar], a ld [wWhichHPBar], a
hlcoord 10, 9 hlcoord 10, 9
predef AnimateHPBar predef Predef_AnimateHPBar
ld hl, EnemyMonHP ld hl, EnemyMonHP
ld a, [hli] ld a, [hli]
ld [Buffer4], a ld [Buffer4], a
@ -4030,7 +4030,7 @@ BattleCommand_PainSplit: ; 35926
ld [wWhichHPBar], a ld [wWhichHPBar], a
call ResetDamage call ResetDamage
hlcoord 2, 2 hlcoord 2, 2
predef AnimateHPBar predef Predef_AnimateHPBar
farcall _UpdateBattleHUDs farcall _UpdateBattleHUDs
ld hl, SharedPainText ld hl, SharedPainText
@ -4172,7 +4172,7 @@ BattleCommand_Conversion2: ; 359e6
ld a, [hl] ld a, [hl]
ld [wNamedObjectIndexBuffer], a ld [wNamedObjectIndexBuffer], a
predef GetTypeName predef Predef_GetTypeName
ld hl, TransformedTypeText ld hl, TransformedTypeText
jp StdBattleTextBox jp StdBattleTextBox
@ -4711,7 +4711,7 @@ PlayFXAnimID: ; 35d08
ld c, 3 ld c, 3
call DelayFrames call DelayFrames
callfar PlayBattleAnim callfar Predef_PlayBattleAnim
ret ret
@ -4773,7 +4773,7 @@ EnemyHurtItself: ; 35d1c
hlcoord 2, 2 hlcoord 2, 2
xor a xor a
ld [wWhichHPBar], a ld [wWhichHPBar], a
predef AnimateHPBar predef Predef_AnimateHPBar
.did_no_damage .did_no_damage
jp RefreshBattleHuds jp RefreshBattleHuds
@ -4833,7 +4833,7 @@ PlayerHurtItself: ; 35d7e
hlcoord 10, 9 hlcoord 10, 9
ld a, $1 ld a, $1
ld [wWhichHPBar], a ld [wWhichHPBar], a
predef AnimateHPBar predef Predef_AnimateHPBar
.did_no_damage .did_no_damage
jp RefreshBattleHuds jp RefreshBattleHuds
@ -5301,7 +5301,7 @@ SapHealth: ; 36011
xor a xor a
.hp_bar .hp_bar
ld [wWhichHPBar], a ld [wWhichHPBar], a
predef AnimateHPBar predef Predef_AnimateHPBar
call RefreshBattleHuds call RefreshBattleHuds
jp UpdateBattleMonInParty jp UpdateBattleMonInParty
@ -6239,11 +6239,11 @@ BattleCommand_Curl: ; 365a7
BattleCommand_RaiseSubNoAnim: ; 365af BattleCommand_RaiseSubNoAnim: ; 365af
ld hl, GetBattleMonBackpic ld hl, Predef_GetBattleMonBackpic
ld a, [hBattleTurn] ld a, [hBattleTurn]
and a and a
jr z, .PlayerTurn jr z, .PlayerTurn
ld hl, GetEnemyMonFrontpic ld hl, Predef_GetEnemyMonFrontpic
.PlayerTurn: .PlayerTurn:
xor a xor a
ld [hBGMapMode], a ld [hBGMapMode], a
@ -7525,7 +7525,7 @@ BattleCommand_Recoil: ; 36cb2
xor a xor a
.animate_hp_bar .animate_hp_bar
ld [wWhichHPBar], a ld [wWhichHPBar], a
predef AnimateHPBar predef Predef_AnimateHPBar
call RefreshBattleHuds call RefreshBattleHuds
ld hl, RecoilText ld hl, RecoilText
jp StdBattleTextBox jp StdBattleTextBox
@ -8023,7 +8023,7 @@ BattleCommand_LeechSeed: ; 36f9d
BattleCommand_Splash: ; 36fe1 BattleCommand_Splash: ; 36fe1
call AnimateCurrentMove call AnimateCurrentMove
farcall TrainerRankings_Splash farcall StubbedTrainerRankings_Splash
jp PrintNothingHappened jp PrintNothingHappened
; 36fed ; 36fed
@ -8227,7 +8227,7 @@ BattleCommand_Conversion: ; 3707f
inc de inc de
ld [de], a ld [de], a
ld [wNamedObjectIndexBuffer], a ld [wNamedObjectIndexBuffer], a
farcall GetTypeName farcall Predef_GetTypeName
call AnimateCurrentMove call AnimateCurrentMove
ld hl, TransformedTypeText ld hl, TransformedTypeText
jp StdBattleTextBox jp StdBattleTextBox
@ -8550,7 +8550,7 @@ CheckSubstituteOpp: ; 37378
BattleCommand_Selfdestruct: ; 37380 BattleCommand_Selfdestruct: ; 37380
farcall TrainerRankings_Selfdestruct farcall StubbedTrainerRankings_Selfdestruct
ld a, BATTLEANIM_PLAYER_DAMAGE ld a, BATTLEANIM_PLAYER_DAMAGE
ld [wNumHits], a ld [wNumHits], a
ld c, 3 ld c, 3
@ -9856,7 +9856,7 @@ PlayUserBattleAnim: ; 37e47
push hl push hl
push de push de
push bc push bc
callfar PlayBattleAnim callfar Predef_PlayBattleAnim
pop bc pop bc
pop de pop de
pop hl pop hl
@ -9878,7 +9878,7 @@ PlayOpponentBattleAnim: ; 37e54
push bc push bc
call BattleCommand_SwitchTurn call BattleCommand_SwitchTurn
callfar PlayBattleAnim callfar Predef_PlayBattleAnim
call BattleCommand_SwitchTurn call BattleCommand_SwitchTurn
pop bc pop bc

View File

@ -35,7 +35,7 @@ CheckOppositeGender: ; 377f5
xor a xor a
ld [MonType], a ld [MonType], a
farcall GetGender farcall Predef_GetGender
jr c, .genderless_samegender jr c, .genderless_samegender
ld b, 1 ld b, 1
@ -58,7 +58,7 @@ CheckOppositeGender: ; 377f5
ld [TempMonDVs + 1], a ld [TempMonDVs + 1], a
ld a, 3 ld a, 3
ld [MonType], a ld [MonType], a
farcall GetGender farcall Predef_GetGender
pop bc pop bc
jr c, .genderless_samegender jr c, .genderless_samegender

View File

@ -33,7 +33,7 @@ AppearUser: ; fbd77 (3e:7d77)
ld a, $31 ld a, $31
.okay .okay
ld [hGraphicStartTile], a ld [hGraphicStartTile], a
predef PlaceGraphic predef Predef_PlaceGraphic
FinishAppearDisappearUser: ; fbd91 (3e:7d91) FinishAppearDisappearUser: ; fbd91 (3e:7d91)
ld a, $1 ld a, $1
ld [hBGMapMode], a ld [hBGMapMode], a

View File

@ -103,7 +103,7 @@ TrainerType1: ; 397eb
ld a, OTPARTYMON ld a, OTPARTYMON
ld [MonType], a ld [MonType], a
push hl push hl
predef TryAddMonToParty predef Predef_TryAddMonToParty
pop hl pop hl
jr .loop jr .loop
; 39806 ; 39806
@ -124,7 +124,7 @@ TrainerType2: ; 39806
ld [MonType], a ld [MonType], a
push hl push hl
predef TryAddMonToParty predef Predef_TryAddMonToParty
ld a, [OTPartyCount] ld a, [OTPartyCount]
dec a dec a
ld hl, OTPartyMon1Moves ld hl, OTPartyMon1Moves
@ -200,7 +200,7 @@ TrainerType3: ; 39871
ld a, OTPARTYMON ld a, OTPARTYMON
ld [MonType], a ld [MonType], a
push hl push hl
predef TryAddMonToParty predef Predef_TryAddMonToParty
ld a, [OTPartyCount] ld a, [OTPartyCount]
dec a dec a
ld hl, OTPartyMon1Item ld hl, OTPartyMon1Item
@ -231,7 +231,7 @@ TrainerType4: ; 3989d
ld [MonType], a ld [MonType], a
push hl push hl
predef TryAddMonToParty predef Predef_TryAddMonToParty
ld a, [OTPartyCount] ld a, [OTPartyCount]
dec a dec a
ld hl, OTPartyMon1Item ld hl, OTPartyMon1Item

View File

@ -4,13 +4,13 @@ _ReturnToBattle_UseBall: ; 2715c
ld a, [BattleType] ld a, [BattleType]
cp BATTLETYPE_TUTORIAL cp BATTLETYPE_TUTORIAL
jr z, .gettutorialbackpic jr z, .gettutorialbackpic
farcall GetBattleMonBackpic farcall Predef_GetBattleMonBackpic
jr .continue jr .continue
.gettutorialbackpic .gettutorialbackpic
farcall GetTrainerBackpic farcall GetTrainerBackpic
.continue .continue
farcall GetEnemyMonFrontpic farcall Predef_GetEnemyMonFrontpic
farcall _LoadBattleFontsHPBar farcall _LoadBattleFontsHPBar
call GetMemSGBLayout call GetMemSGBLayout
call CloseWindow call CloseWindow

View File

@ -33,7 +33,7 @@ FindFirstAliveMonAndStartBattle: ; 2ee2f
add hl, de add hl, de
ld a, [hl] ld a, [hl]
ld [BattleMonLevel], a ld [BattleMonLevel], a
predef Predef_StartBattle predef Predef_DoBattleTransition
farcall _LoadBattleFontsHPBar farcall _LoadBattleFontsHPBar
ld a, 1 ld a, 1
ld [hBGMapMode], a ld [hBGMapMode], a

View File

@ -1,6 +1,6 @@
; Battle animation command interpreter. ; Battle animation command interpreter.
PlayBattleAnim: ; cc0d6 Predef_PlayBattleAnim: ; cc0d6
ld a, [rSVBK] ld a, [rSVBK]
push af push af
@ -167,7 +167,7 @@ BattleAnimRestoreHuds: ; cc1bb
ld [rSVBK], a ld [rSVBK], a
ld hl, UpdateBattleHuds ld hl, UpdateBattleHuds
ld a, BANK(UpdatePlayerHUD) ld a, BANK(Predef_UpdatePlayerHUD)
rst FarCall ; Why not "call UpdateBattleHuds"? rst FarCall ; Why not "call UpdateBattleHuds"?
pop af pop af
@ -232,8 +232,7 @@ ClearActorHud: ; cc207
ret ret
; cc220 ; cc220
Functioncc220: ; cc220 Unreferenced_Functioncc220: ; cc220
; Appears to be unused.
xor a xor a
ld [hBGMapMode], a ld [hBGMapMode], a
ld a, LOW(vBGMap0 tile $28) ld a, LOW(vBGMap0 tile $28)
@ -929,18 +928,18 @@ BattleAnimCmd_Transform: ; cc5dc (33:45dc)
ld a, [TempBattleMonSpecies] ; TempBattleMonSpecies ld a, [TempBattleMonSpecies] ; TempBattleMonSpecies
ld [CurPartySpecies], a ; CurPartySpecies ld [CurPartySpecies], a ; CurPartySpecies
ld hl, BattleMonDVs ; BattleMonDVs ld hl, BattleMonDVs ; BattleMonDVs
predef GetUnownLetter predef Predef_GetUnownLetter
ld de, vTiles0 tile $00 ld de, vTiles0 tile $00
predef GetMonFrontpic predef Predef_GetMonFrontpic
jr .done jr .done
.player .player
ld a, [TempEnemyMonSpecies] ; TempEnemyMonSpecies ld a, [TempEnemyMonSpecies] ; TempEnemyMonSpecies
ld [CurPartySpecies], a ; CurPartySpecies ld [CurPartySpecies], a ; CurPartySpecies
ld hl, EnemyMonDVs ; EnemyMonDVs ld hl, EnemyMonDVs ; EnemyMonDVs
predef GetUnownLetter predef Predef_GetUnownLetter
ld de, vTiles0 tile $00 ld de, vTiles0 tile $00
predef GetMonBackpic predef Predef_GetMonBackpic
.done .done
pop af pop af
@ -1156,16 +1155,16 @@ BattleAnimCmd_BeatUp: ; cc776 (33:4776)
jr z, .player jr z, .player
ld hl, BattleMonDVs ld hl, BattleMonDVs
predef GetUnownLetter predef Predef_GetUnownLetter
ld de, vTiles2 tile $00 ld de, vTiles2 tile $00
predef GetMonFrontpic predef Predef_GetMonFrontpic
jr .done jr .done
.player .player
ld hl, EnemyMonDVs ld hl, EnemyMonDVs
predef GetUnownLetter predef Predef_GetUnownLetter
ld de, vTiles2 tile $31 ld de, vTiles2 tile $31
predef GetMonBackpic predef Predef_GetMonBackpic
.done .done
pop af pop af

View File

@ -244,8 +244,7 @@ BillsPCDepositMenuDataHeader: ; 0xe253d (38:653d)
db "CANCEL@" db "CANCEL@"
; 0xe2564 (38:6564) ; 0xe2564 (38:6564)
BillsPC_ClearThreeBoxes: ; e2564 Unreferenced_BillsPCClearThreeBoxes: ; e2564
; unreferenced
hlcoord 0, 0 hlcoord 0, 0
ld b, 4 ld b, 4
ld c, 8 ld c, 8
@ -1096,10 +1095,10 @@ PCMonInfo: ; e2ac6 (38:6ac6)
ld [CurPartySpecies], a ld [CurPartySpecies], a
ld [CurSpecies], a ld [CurSpecies], a
ld hl, TempMonDVs ld hl, TempMonDVs
predef GetUnownLetter predef Predef_GetUnownLetter
call GetBaseData call GetBaseData
ld de, vTiles2 tile $00 ld de, vTiles2 tile $00
predef GetMonFrontpic predef Predef_GetMonFrontpic
xor a xor a
ld [wBillsPC_MonHasMail], a ld [wBillsPC_MonHasMail], a
ld a, [CurPartySpecies] ld a, [CurPartySpecies]
@ -1116,7 +1115,7 @@ PCMonInfo: ; e2ac6 (38:6ac6)
ld a, $3 ld a, $3
ld [MonType], a ld [MonType], a
farcall GetGender farcall Predef_GetGender
jr c, .skip_gender jr c, .skip_gender
ld a, "♂" ld a, "♂"
jr nz, .printgender jr nz, .printgender
@ -1583,7 +1582,7 @@ endr
db -1 db -1
; e2ed5 ; e2ed5
BillsPC_UnusedFillBox: ; e2ed5 Unreferenced_BillsPC_FillBox: ; e2ed5
.row .row
push bc push bc
push hl push hl
@ -1699,7 +1698,7 @@ BillsPC_StatsScreen: ; e2f7e (38:6f7e)
call BillsPC_CopyMon call BillsPC_CopyMon
ld a, $3 ld a, $3
ld [MonType], a ld [MonType], a
predef StatsScreenInit predef Predef_StatsScreenInit
call BillsPC_InitGFX call BillsPC_InitGFX
call MaxVolume call MaxVolume
ret ret
@ -1727,7 +1726,7 @@ StatsScreenDPad: ; e2f95 (38:6f95)
ld [CurPartySpecies], a ld [CurPartySpecies], a
ld [CurSpecies], a ld [CurSpecies], a
ld hl, TempMonDVs ld hl, TempMonDVs
predef GetUnownLetter predef Predef_GetUnownLetter
call GetBaseData call GetBaseData
call BillsPC_CopyMon call BillsPC_CopyMon
.pressed_a_b_right_left .pressed_a_b_right_left
@ -1820,7 +1819,7 @@ DepositPokemon: ; e307c (38:707c)
call GetNick call GetNick
ld a, PC_DEPOSIT ld a, PC_DEPOSIT
ld [wPokemonWithdrawDepositParameter], a ld [wPokemonWithdrawDepositParameter], a
predef SentGetPkmnIntoFromBox predef Predef_SendGetPkmnIntoFromBox
jr c, .asm_boxisfull jr c, .asm_boxisfull
xor a xor a
ld [wPokemonWithdrawDepositParameter], a ld [wPokemonWithdrawDepositParameter], a
@ -1875,7 +1874,7 @@ TryWithdrawPokemon: ; e30fa (38:70fa)
call CloseSRAM call CloseSRAM
xor a xor a
ld [wPokemonWithdrawDepositParameter], a ld [wPokemonWithdrawDepositParameter], a
predef SentGetPkmnIntoFromBox predef Predef_SendGetPkmnIntoFromBox
jr c, .PartyFull jr c, .PartyFull
ld a, PC_DEPOSIT ld a, PC_DEPOSIT
ld [wPokemonWithdrawDepositParameter], a ld [wPokemonWithdrawDepositParameter], a
@ -2555,7 +2554,7 @@ BillsPC_ChangeBoxSubmenu: ; e36f9 (38:76f9)
ret ret
; e3778 (38:7778) ; e3778 (38:7778)
hlcoord 11, 7 ; XXX hlcoord 11, 7 ; unused
.MenuDataHeader: ; 0xe377b .MenuDataHeader: ; 0xe377b
db $40 ; flags db $40 ; flags

View File

@ -142,7 +142,7 @@ BillsPC_DepositMenu: ; e4fe (3:64fe)
and a and a
ret ret
Functione512: ; unused Unreferenced_Functione512:
ld a, [PartyCount] ld a, [PartyCount]
and a and a
jr z, .no_pkmn jr z, .no_pkmn
@ -211,7 +211,7 @@ BillsPC_WithdrawMenu: ; e559 (3:6559)
and a and a
ret ret
Functione56d: ; unused Unreferenced_Functione56d:
ld a, [PartyCount] ld a, [PartyCount]
cp PARTY_LENGTH cp PARTY_LENGTH
jr nc, .asm_e576 jr nc, .asm_e576
@ -267,7 +267,7 @@ CopyBoxmonToTempMon: ; e5bb
call CloseSRAM call CloseSRAM
ret ret
Functione5d9: ; unreferenced Unreferenced_Functione5d9:
ld a, [wCurBox] ld a, [wCurBox]
cp b cp b
jr z, .same_box jr z, .same_box

View File

@ -10,7 +10,7 @@ CheckBreedmonCompatibility: ; 16e1d
ld [TempMonDVs + 1], a ld [TempMonDVs + 1], a
ld a, TEMPMON ld a, TEMPMON
ld [MonType], a ld [MonType], a
predef GetGender predef Predef_GetGender
jr c, .genderless jr c, .genderless
ld b, $1 ld b, $1
jr nz, .breedmon2 jr nz, .breedmon2
@ -26,7 +26,7 @@ CheckBreedmonCompatibility: ; 16e1d
ld [TempMonDVs + 1], a ld [TempMonDVs + 1], a
ld a, $3 ld a, $3
ld [MonType], a ld [MonType], a
predef GetGender predef Predef_GetGender
pop bc pop bc
jr c, .genderless jr c, .genderless
ld a, $1 ld a, $1
@ -232,7 +232,7 @@ HatchEggs: ; 16f70 (5:6f70)
push de push de
farcall SetEggMonCaughtData farcall SetEggMonCaughtData
farcall TrainerRankings_EggsHatched farcall StubbedTrainerRankings_EggsHatched
ld a, [CurPartyMon] ld a, [CurPartyMon]
ld hl, PartyMon1Species ld hl, PartyMon1Species
ld bc, PARTYMON_STRUCT_LENGTH ld bc, PARTYMON_STRUCT_LENGTH
@ -289,7 +289,7 @@ HatchEggs: ; 16f70 (5:6f70)
ld bc, MON_STAT_EXP - 1 ld bc, MON_STAT_EXP - 1
add hl, bc add hl, bc
ld b, $0 ld b, $0
predef CalcPkmnStats predef Predef_CalcPkmnStats
pop bc pop bc
ld hl, MON_MAXHP ld hl, MON_MAXHP
add hl, bc add hl, bc
@ -514,7 +514,7 @@ GLOBAL EggMoves
cp b cp b
jr nz, .loop5 jr nz, .loop5
ld [wPutativeTMHMMove], a ld [wPutativeTMHMMove], a
predef CanLearnTMHMMove predef Predef_CanLearnTMHMMove
ld a, c ld a, c
and a and a
jr z, .done jr z, .done
@ -559,7 +559,7 @@ LoadEggMove: ; 17169
ld [hl], b ld [hl], b
ld hl, wEggMonMoves ld hl, wEggMonMoves
ld de, wEggMonPP ld de, wEggMonPP
predef FillPP predef Predef_FillPP
pop bc pop bc
pop de pop de
ret ret
@ -590,7 +590,7 @@ GetHeritableMoves: ; 17197
ld [TempMonDVs + 1], a ld [TempMonDVs + 1], a
ld a, TEMPMON ld a, TEMPMON
ld [MonType], a ld [MonType], a
predef GetGender predef Predef_GetGender
jr c, .inherit_mon2_moves jr c, .inherit_mon2_moves
jr nz, .inherit_mon2_moves jr nz, .inherit_mon2_moves
jr .inherit_mon1_moves jr .inherit_mon1_moves
@ -606,7 +606,7 @@ GetHeritableMoves: ; 17197
ld [TempMonDVs + 1], a ld [TempMonDVs + 1], a
ld a, TEMPMON ld a, TEMPMON
ld [MonType], a ld [MonType], a
predef GetGender predef Predef_GetGender
jr c, .inherit_mon1_moves jr c, .inherit_mon1_moves
jr nz, .inherit_mon1_moves jr nz, .inherit_mon1_moves
@ -647,9 +647,9 @@ GetEggFrontpic: ; 17224 (5:7224)
ld [CurSpecies], a ld [CurSpecies], a
call GetBaseData call GetBaseData
ld hl, BattleMonDVs ld hl, BattleMonDVs
predef GetUnownLetter predef Predef_GetUnownLetter
pop de pop de
predef_jump GetMonFrontpic predef_jump Predef_GetMonFrontpic
GetHatchlingFrontpic: ; 1723c (5:723c) GetHatchlingFrontpic: ; 1723c (5:723c)
push de push de
@ -657,9 +657,9 @@ GetHatchlingFrontpic: ; 1723c (5:723c)
ld [CurSpecies], a ld [CurSpecies], a
call GetBaseData call GetBaseData
ld hl, BattleMonDVs ld hl, BattleMonDVs
predef GetUnownLetter predef Predef_GetUnownLetter
pop de pop de
predef_jump GetAnimatedFrontpicPredef predef_jump Predef_GetAnimatedFrontpic
Hatch_UpdateFrontpicBGMapCenter: ; 17254 (5:7254) Hatch_UpdateFrontpicBGMapCenter: ; 17254 (5:7254)
push af push af
@ -677,7 +677,7 @@ Hatch_UpdateFrontpicBGMapCenter: ; 17254 (5:7254)
ld a, c ld a, c
ld [hGraphicStartTile], a ld [hGraphicStartTile], a
lb bc, 7, 7 lb bc, 7, 7
predef PlaceGraphic predef Predef_PlaceGraphic
pop af pop af
call Hatch_LoadFrontpicPal call Hatch_LoadFrontpicPal
call SetPalettes call SetPalettes
@ -779,7 +779,7 @@ EggHatch_AnimationSequence: ; 1728f (5:728f)
hlcoord 6, 3 hlcoord 6, 3
ld d, $0 ld d, $0
ld e, ANIM_MON_HATCH ld e, ANIM_MON_HATCH
predef AnimateFrontpic predef Predef_AnimateFrontpic
pop af pop af
ld [CurSpecies], a ld [CurSpecies], a
ret ret
@ -985,8 +985,7 @@ DayCareMonCompatibilityText: ; 1746c
db "@" db "@"
; 0x174b5 ; 0x174b5
DayCareMonPrintEmptyString: ; 174b5 Unreferenced_DayCareMonPrintEmptyString: ; 174b5
; unreferenced
ld hl, .string ld hl, .string
ret ret
; 174b9 ; 174b9

View File

@ -3,6 +3,13 @@ CARDFLIP_LIGHT_ON EQU $f5
CARDFLIP_DECK_SIZE EQU 4 * 6 CARDFLIP_DECK_SIZE EQU 4 * 6
; two labels below called from inside ./dummy_game.asm
Unknown_e00ed: ; e00ed (38:40ed)
; Graphics for an unused Game Corner
; game were meant to be here.
ret_e00ed: ; e00ed (38:40ed)
ret
_CardFlip: ; e00ee (38:40ee) _CardFlip: ; e00ee (38:40ee)
ld hl, Options ld hl, Options
set 4, [hl] set 4, [hl]

View File

@ -1,4 +1,4 @@
CheckPartyFullAfterContest: ; 4d9e5 Special_CheckPartyFullAfterContest: ; 4d9e5
ld a, [wContestMon] ld a, [wContestMon]
and a and a
jp z, .DidntCatchAnything jp z, .DidntCatchAnything

View File

@ -6,7 +6,7 @@ CheckCGB: ; 8d55
ret ret
; 8d59 ; 8d59
Predef_LoadSGBLayoutCGB: ; 8d59 LoadSGBLayoutCGB: ; 8d59
ld a, b ld a, b
cp SCGB_RAM cp SCGB_RAM
jr nz, .not_ram jr nz, .not_ram

View File

@ -220,6 +220,7 @@ RestartClock: ; 20021 (8:4021)
ret ret
; 20160 (8:4160) ; 20160 (8:4160)
; unused
.unreferenced ; 20160 .unreferenced ; 20160
ld a, [Buffer3] ld a, [Buffer3]
ld b, a ld b, a

View File

@ -43,8 +43,7 @@ CheckShininess:
and a and a
ret ret
; unreferenced UnusedPredef_CheckContestMon:
CheckContestMon:
; Check a mon's DVs at hl in the bug catching contest. ; Check a mon's DVs at hl in the bug catching contest.
; Return carry if its DVs are good enough to place in the contest. ; Return carry if its DVs are good enough to place in the contest.
@ -78,8 +77,7 @@ CheckContestMon:
and a and a
ret ret
Function8aa4: Unreferenced_Function8aa4:
; XXX
push de push de
push bc push bc
ld hl, PalPacket_9ce6 ld hl, PalPacket_9ce6
@ -136,8 +134,7 @@ SGB_ApplyPartyMenuHPPals: ; 8ade
ld [hl], e ld [hl], e
ret ret
Function8b07: Unreferenced_Function8b07:
; Unreferenced
call CheckCGB call CheckCGB
ret z ret z
; CGB only ; CGB only
@ -170,8 +167,7 @@ Function8b07:
RGB 08, 16, 28 RGB 08, 16, 28
RGB 00, 00, 00 RGB 00, 00, 00
Function8b3f: Unreferenced_Function8b3f:
; Unreferenced
call CheckCGB call CheckCGB
ret nz ret nz
ld a, [hSGB] ld a, [hSGB]
@ -180,8 +176,7 @@ Function8b3f:
ld hl, BlkPacket_9a86 ld hl, BlkPacket_9a86
jp PushSGBPals_ jp PushSGBPals_
Function8b4d: Unreferenced_Function8b4d:
; XXX
call CheckCGB call CheckCGB
jr nz, .cgb jr nz, .cgb
ld a, [hSGB] ld a, [hSGB]
@ -196,8 +191,7 @@ Function8b4d:
call GetPredefPal call GetPredefPal
jp LoadHLPaletteIntoDE jp LoadHLPaletteIntoDE
Function8b67: Unreferenced_Function8b67:
; XXX
call CheckCGB call CheckCGB
jr nz, .cgb jr nz, .cgb
ld a, [hSGB] ld a, [hSGB]
@ -212,8 +206,7 @@ Function8b67:
call GetPredefPal call GetPredefPal
jp LoadHLPaletteIntoDE jp LoadHLPaletteIntoDE
Function8b81: Unreferenced_Function8b81:
; XXX
call CheckCGB call CheckCGB
jr nz, .cgb jr nz, .cgb
ld a, [hSGB] ld a, [hSGB]
@ -281,8 +274,7 @@ got_palette_pointer_8bd7
call LoadPalette_White_Col1_Col2_Black call LoadPalette_White_Col1_Col2_Black
ret ret
Function8bec: Unreferenced_Function8bec:
; XXX
ld a, [hCGB] ld a, [hCGB]
and a and a
jr nz, .cgb jr nz, .cgb
@ -455,8 +447,7 @@ INCLUDE "gfx/mail/mail.pal"
INCLUDE "engine/cgb_layouts.asm" INCLUDE "engine/cgb_layouts.asm"
Function95f0: Unreferenced_Function95f0:
; XXX
ld hl, .Palette ld hl, .Palette
ld de, wBGPals1 ld de, wBGPals1
ld bc, 1 palettes ld bc, 1 palettes
@ -746,7 +737,8 @@ GetMonPalettePointer_:
call GetMonPalettePointer call GetMonPalettePointer
ret ret
Function9779: mobile Unreferenced_Function9779:
ret
call CheckCGB call CheckCGB
ret z ret z
ld hl, BattleObjectPals ld hl, BattleObjectPals
@ -768,8 +760,7 @@ Function9779: mobile
BattleObjectPals: BattleObjectPals:
INCLUDE "gfx/battle_anims/battle_anims.pal" INCLUDE "gfx/battle_anims/battle_anims.pal"
Function97cc: Unreferenced_Function97cc:
; XXX
call CheckCGB call CheckCGB
ret z ret z
ld a, $90 ld a, $90
@ -864,7 +855,7 @@ PushSGBPals:
jr nz, .loop jr nz, .loop
ret ret
InitSGBBorder: Predef_InitSGBBorder:
call CheckCGB call CheckCGB
ret nz ret nz
; SGB/DMG only ; SGB/DMG only
@ -979,8 +970,7 @@ _InitSGBBorderPals:
dw PalPacket_9dd6 dw PalPacket_9dd6
dw PalPacket_9de6 dw PalPacket_9de6
Function9911: Unreferenced_Function9911:
; XXX
di di
xor a xor a
ld [rJOYP], a ld [rJOYP], a

View File

@ -322,5 +322,5 @@ InitMG_Mobile_LinkTradePalMap: ; 49856
ret ret
; 4985a ; 4985a
Unknown_4985a: ; unreferenced ; unused
INCLUDE "gfx/unknown/4985a.asm" INCLUDE "gfx/unknown/4985a.asm"

View File

@ -315,12 +315,12 @@ Function81adb: ; 81adb
hlcoord 12, 3 hlcoord 12, 3
call _PrepMonFrontpic call _PrepMonFrontpic
ld de, vTiles2 tile $31 ld de, vTiles2 tile $31
predef GetMonBackpic predef Predef_GetMonBackpic
ld a, $31 ld a, $31
ld [hGraphicStartTile], a ld [hGraphicStartTile], a
hlcoord 2, 4 hlcoord 2, 4
lb bc, 6, 6 lb bc, 6, 6
predef PlaceGraphic predef Predef_PlaceGraphic
ld a, [wd003] ld a, [wd003]
and a and a
jr z, .asm_81b66 jr z, .asm_81b66
@ -346,13 +346,13 @@ Function81adb: ; 81adb
hlcoord 4, 1 hlcoord 4, 1
call PlaceString call PlaceString
ld de, vTiles2 ld de, vTiles2
callfar GetTrainerPic callfar Predef_GetTrainerPic
xor a xor a
ld [TempEnemyMonSpecies], a ld [TempEnemyMonSpecies], a
ld [hGraphicStartTile], a ld [hGraphicStartTile], a
hlcoord 2, 3 hlcoord 2, 3
lb bc, 7, 7 lb bc, 7, 7
predef PlaceGraphic predef Predef_PlaceGraphic
.asm_81ba9 .asm_81ba9
ld a, $1 ld a, $1
@ -739,7 +739,7 @@ Function81df4: ; 81df4
ld a, [wd004] ld a, [wd004]
inc a inc a
ld [wd265], a ld [wd265], a
predef GetTMHMMove predef Predef_GetTMHMMove
ld a, [wd265] ld a, [wd265]
ld [wPutativeTMHMMove], a ld [wPutativeTMHMMove], a
call GetMoveName call GetMoveName
@ -748,7 +748,7 @@ Function81df4: ; 81df4
ld a, [wd004] ld a, [wd004]
call Function81e55 call Function81e55
ld [CurItem], a ld [CurItem], a
predef CanLearnTMHMMove predef Predef_CanLearnTMHMMove
ld a, c ld a, c
and a and a
ld de, String_81e46 ld de, String_81e46

View File

@ -1194,7 +1194,7 @@ DecorationDesc_GiantOrnament: ; 26fdd
db "@" db "@"
; 0x26feb ; 0x26feb
ToggleMaptileDecorations: ; 26feb Special_ToggleMaptileDecorations: ; 26feb
lb de, 0, 4 lb de, 0, 4
ld a, [Bed] ld a, [Bed]
call SetDecorationTile call SetDecorationTile
@ -1248,7 +1248,7 @@ SetDecorationTile: ; 27037
ret ret
; 27043 ; 27043
ToggleDecorationsVisibility: ; 27043 Special_ToggleDecorationsVisibility: ; 27043
ld de, EVENT_KRISS_HOUSE_2F_CONSOLE ld de, EVENT_KRISS_HOUSE_2F_CONSOLE
ld hl, VariableSprites + SPRITE_CONSOLE - SPRITE_VARS ld hl, VariableSprites + SPRITE_CONSOLE - SPRITE_VARS
ld a, [Console] ld a, [Console]

View File

@ -112,7 +112,7 @@ Mobile_ReloadMapPart: ; 104099
ret ret
; 1040d4 ; 1040d4
; XXX ; unused
ld hl, .unreferenced_1040da ld hl, .unreferenced_1040da
jp CallInSafeGFXMode jp CallInSafeGFXMode
@ -136,7 +136,7 @@ Mobile_ReloadMapPart: ; 104099
ret ret
; 1040fb ; 1040fb
; XXX ; unused
ld hl, .unreferenced_104101 ld hl, .unreferenced_104101
jp CallInSafeGFXMode jp CallInSafeGFXMode

View File

@ -995,6 +995,7 @@ CountStep: ; 96b79
ret ret
; 96bd3 ; 96bd3
; unused
.unreferenced ; 96bd3 .unreferenced ; 96bd3
ld a, 7 ld a, 7
scf scf
@ -1061,7 +1062,7 @@ Invalid_0x96c2d: ; 96c2d
end end
; 96c2e ; 96c2e
; unreferenced ; unused
end end
; 96c2f ; 96c2f

View File

@ -1,11 +1,11 @@
BattleTowerRoomMenu: ; 1700b0 Special_BattleTowerRoomMenu: ; 1700b0
; special ; special
call InitBattleTowerChallengeRAM call InitBattleTowerChallengeRAM
farcall _BattleTowerRoomMenu farcall _BattleTowerRoomMenu
ret ret
; 1700ba ; 1700ba
Function1700ba: ; 1700ba Special_Function1700ba: ; 1700ba
call InitBattleTowerChallengeRAM call InitBattleTowerChallengeRAM
farcall Function11811a farcall Function11811a
ret ret
@ -53,7 +53,7 @@ Function1700c4: ; 1700c4
ret ret
; 170114 ; 170114
Function170114: ; 170114 Special_Function170114: ; 170114
call InitBattleTowerChallengeRAM call InitBattleTowerChallengeRAM
call .Function170121 call .Function170121
farcall Function11805f farcall Function11805f
@ -182,14 +182,14 @@ Function170139: ; 170139
ret ret
; 170215 ; 170215
BattleTowerBattle: ; 170215 Special_BattleTowerBattle: ; 170215
xor a xor a
ld [wBattleTowerBattleEnded], a ld [wBattleTowerBattleEnded], a
call _BattleTowerBattle call _BattleTowerBattle
ret ret
; 17021d ; 17021d
EmptySpecial_17021d: ; 17021d DummySpecial_17021d: ; 17021d
ret ret
; 17021e ; 17021e
@ -243,12 +243,12 @@ RunBattleTowerTrainer: ; 17024d
xor a xor a
ld [wLinkMode], a ld [wLinkMode], a
farcall TrainerRankings_Healings farcall Special_StubbedTrainerRankings_Healings
farcall HealParty farcall HealParty
call ReadBTTrainerParty call ReadBTTrainerParty
call Clears5_a89a call Clears5_a89a
predef StartBattle predef Predef_StartBattle
farcall LoadPokemonData farcall LoadPokemonData
farcall HealParty farcall HealParty
@ -484,7 +484,7 @@ endr
ld hl, MON_STAT_EXP - 1 ld hl, MON_STAT_EXP - 1
add hl, bc add hl, bc
ld b, $1 ld b, $1
predef CalcPkmnStats predef Predef_CalcPkmnStats
pop de pop de
pop hl pop hl
dec de dec de
@ -599,8 +599,7 @@ SkipBattleTowerTrainer: ; 1704c9
ret ret
; 1704ca ; 1704ca
Function1704ca: ; 1704ca Unreferenced_Function1704ca: ; 1704ca
; unreferenced mobile function
ld a, [$be46] ld a, [$be46]
cp $7 cp $7
jr c, .asm_1704d3 jr c, .asm_1704d3
@ -620,8 +619,7 @@ Function1704ca: ; 1704ca
ret ret
; 1704e1 ; 1704e1
Function1704e1: ; 1704e1 UnusedSpecial_Function1704e1: ; 1704e1
; unreferenced special
call SpeechTextBox call SpeechTextBox
call FadeToMenu call FadeToMenu
call InitBattleTowerChallengeRAM call InitBattleTowerChallengeRAM
@ -902,7 +900,7 @@ Function1704e1: ; 1704e1
db "れきだいりーダーいちらん@" db "れきだいりーダーいちらん@"
; 170687 ; 170687
BattleTowerAction: ; 170687 Special_BattleTowerAction: ; 170687
ld a, [ScriptVar] ld a, [ScriptVar]
ld e, a ld e, a
ld d, 0 ld d, 0
@ -1605,7 +1603,7 @@ BattleTowerAction_UbersCheck: ; 170b16 (5c:4b16) BattleTowerAction $19
ld [ScriptVar], a ld [ScriptVar], a
ret ret
Function_LoadOpponentTrainerAndPokemonsWithOTSprite: ; 0x170b44 Special_LoadOpponentTrainerAndPokemonWithOTSprite: ; 0x170b44
farcall Function_LoadOpponentTrainerAndPokemons farcall Function_LoadOpponentTrainerAndPokemons
ld a, [rSVBK] ld a, [rSVBK]
push af push af
@ -1652,11 +1650,11 @@ Function_LoadOpponentTrainerAndPokemonsWithOTSprite: ; 0x170b44
INCLUDE "data/trainers/sprites.asm" INCLUDE "data/trainers/sprites.asm"
ret_170bd2: ; 170bd2 DummySpecial_170bd2: ; 170bd2
ret ret
; 170bd3 ; 170bd3
SpecialCheckForBattleTowerRules: ; 170bd3 Special_CheckForBattleTowerRules: ; 170bd3
farcall CheckForBattleTowerRules farcall CheckForBattleTowerRules
jr c, .asm_170bde jr c, .asm_170bde
xor a ; FALSE xor a ; FALSE

View File

@ -1,4 +1,4 @@
SpecialBuenasPassword: ; 8af6b Special_BuenasPassword: ; 8af6b
xor a xor a
ld [wWhichIndexSet], a ld [wWhichIndexSet], a
ld hl, .MenuDataHeader ld hl, .MenuDataHeader
@ -63,7 +63,7 @@ SpecialBuenasPassword: ; 8af6b
ret ret
; 8afd4 ; 8afd4
SpecialBuenaPrize: ; 8afd4 Special_BuenaPrize: ; 8afd4
xor a xor a
ld [wMenuScrollPosition], a ld [wMenuScrollPosition], a
ld a, $1 ld a, $1

View File

@ -1,4 +1,4 @@
AskRememberPassword: ; 4ae12 Special_AskRememberPassword: ; 4ae12
call .DoMenu call .DoMenu
ld a, $0 ld a, $0
jr c, .okay jr c, .okay

View File

@ -76,7 +76,7 @@ Special_CheckBugContestContestantFlag: ; 139ed
INCLUDE "data/bug_contest_flags.asm" INCLUDE "data/bug_contest_flags.asm"
ContestDropOffMons: ; 13a12 Special_ContestDropOffMons: ; 13a12
ld hl, PartyMon1HP ld hl, PartyMon1HP
ld a, [hli] ld a, [hli]
or [hl] or [hl]
@ -101,7 +101,7 @@ ContestDropOffMons: ; 13a12
ret ret
; 13a31 ; 13a31
ContestReturnMons: ; 13a31 Special_ContestReturnMons: ; 13a31
; Restore the species of the second mon. ; Restore the species of the second mon.
ld hl, PartySpecies + 1 ld hl, PartySpecies + 1
ld a, [wBugContestSecondPartySpecies] ld a, [wBugContestSecondPartySpecies]

View File

@ -101,7 +101,7 @@ DisplayAlreadyCaughtText: ; cc0c7
text_jump UnknownText_0x1c10dd text_jump UnknownText_0x1c10dd
db "@" db "@"
Predef2F: DummyPredef2F:
Predef38: DummyPredef38:
Predef39: ; cc0d5 DummyPredef39: ; cc0d5
ret ret

View File

@ -1,6 +1,6 @@
_BugContestJudging: ; 1369d _Special_BugContestJudging: ; 1369d
call ContestScore call ContestScore
farcall TrainerRankings_BugContestScore farcall StubbedTrainerRankings_BugContestScore
call BugContest_JudgeContestants call BugContest_JudgeContestants
ld a, [wBugContestThirdPlaceWinnerID] ld a, [wBugContestThirdPlaceWinnerID]
call LoadContestantName call LoadContestantName

View File

@ -41,7 +41,7 @@ CatchTutorial:: ; 4e554
ld hl, .AutoInput ld hl, .AutoInput
ld a, BANK(.AutoInput) ld a, BANK(.AutoInput)
call StartAutoInput call StartAutoInput
callfar StartBattle callfar Predef_StartBattle
call StopAutoInput call StopAutoInput
pop af pop af

View File

@ -362,7 +362,7 @@ CelebiEvent_SetBattleType: ; 49bf3
; 49bf9 ; 49bf9
CheckCaughtCelebi: ; 49bf9 Special_CheckCaughtCelebi: ; 49bf9
ld a, [wBattleResult] ld a, [wBattleResult]
bit 6, a bit 6, a
jr z, .false jr z, .false

View File

@ -565,7 +565,7 @@ DayCare_GiveEgg: ; 169ac
pop hl pop hl
push bc push bc
ld b, $0 ld b, $0
predef CalcPkmnStats predef Predef_CalcPkmnStats
pop bc pop bc
ld hl, MON_HP ld hl, MON_HP
add hl, bc add hl, bc
@ -639,7 +639,7 @@ DayCare_InitBreeding: ; 16a3b
cp DITTO cp DITTO
ld a, $0 ld a, $0
jr z, .LoadWhichBreedmonIsTheMother jr z, .LoadWhichBreedmonIsTheMother
farcall GetGender farcall Predef_GetGender
ld a, $0 ld a, $0
jr z, .LoadWhichBreedmonIsTheMother jr z, .LoadWhichBreedmonIsTheMother
inc a inc a
@ -684,7 +684,7 @@ DayCare_InitBreeding: ; 16a3b
ld de, wEggMonMoves ld de, wEggMonMoves
xor a xor a
ld [Buffer1], a ld [Buffer1], a
predef FillMoves predef Predef_FillMoves
farcall InitEggMoves farcall InitEggMoves
ld hl, wEggMonID ld hl, wEggMonID
ld a, [PlayerID] ld a, [PlayerID]
@ -726,7 +726,7 @@ DayCare_InitBreeding: ; 16a3b
ld a, TEMPMON ld a, TEMPMON
ld [MonType], a ld [MonType], a
push hl push hl
farcall GetGender farcall Predef_GetGender
pop hl pop hl
ld de, wBreedMon1DVs ld de, wBreedMon1DVs
ld bc, wBreedMon2DVs ld bc, wBreedMon2DVs
@ -770,7 +770,7 @@ DayCare_InitBreeding: ; 16a3b
call CopyBytes call CopyBytes
ld hl, wEggMonMoves ld hl, wEggMonMoves
ld de, wEggMonPP ld de, wEggMonPP
predef FillPP predef Predef_FillPP
ld hl, wMonOrItemNameBuffer ld hl, wMonOrItemNameBuffer
ld de, StringBuffer1 ld de, StringBuffer1
ld bc, NAME_LENGTH ld bc, NAME_LENGTH

View File

@ -1,4 +1,4 @@
SpecialDratini: ; 0x8b170 Special_Dratini: ; 0x8b170
; if ScriptVar is 0 or 1, change the moveset of the last Dratini in the party. ; if ScriptVar is 0 or 1, change the moveset of the last Dratini in the party.
; 0: give it a special moveset with Extremespeed. ; 0: give it a special moveset with Extremespeed.
; 1: give it the normal moveset of a level 15 Dratini. ; 1: give it the normal moveset of a level 15 Dratini.

View File

@ -7,7 +7,7 @@ PlayWhirlpoolSound: ; 8c7d4
; 8c7e1 ; 8c7e1
BlindingFlash: ; 8c7e1 BlindingFlash: ; 8c7e1
farcall FadeOutPalettes farcall Special_FadeOutPalettes
ld hl, wStatusFlags ld hl, wStatusFlags
set 2, [hl] ; Flash set 2, [hl] ; Flash
farcall ReplaceTimeOfDayPals farcall ReplaceTimeOfDayPals
@ -15,7 +15,7 @@ BlindingFlash: ; 8c7e1
ld b, SCGB_MAPPALS ld b, SCGB_MAPPALS
call GetSGBLayout call GetSGBLayout
farcall LoadOW_BGPal7 farcall LoadOW_BGPal7
farcall FadeInPalettes farcall Special_FadeInPalettes
ret ret
; 8c80a ; 8c80a

View File

@ -58,7 +58,7 @@ CheckFruitTree: ; 44055
; 4405f ; 4405f
PickedFruitTree: ; 4405f PickedFruitTree: ; 4405f
farcall TrainerRankings_FruitPicked farcall StubbedTrainerRankings_FruitPicked
ld b, 1 ld b, 1
jp GetFruitTreeFlag jp GetFruitTreeFlag
; 4406a ; 4406a

View File

@ -42,7 +42,7 @@ RedCredits:: ; 86455
ld [MusicFadeID + 1], a ld [MusicFadeID + 1], a
ld a, 10 ld a, 10
ld [MusicFade], a ld [MusicFade], a
farcall FadeOutPalettes farcall Special_FadeOutPalettes
xor a xor a
ld [VramState], a ld [VramState], a
ld [hMapAnims], a ld [hMapAnims], a
@ -65,7 +65,7 @@ HallOfFame_FadeOutMusic: ; 8648e
ld [MusicFadeID + 1], a ld [MusicFadeID + 1], a
ld a, 10 ld a, 10
ld [MusicFade], a ld [MusicFade], a
farcall FadeOutPalettes farcall Special_FadeOutPalettes
xor a xor a
ld [VramState], a ld [VramState], a
ld [hMapAnims], a ld [hMapAnims], a
@ -130,7 +130,7 @@ AnimateHallOfFame: ; 864c3
call WaitBGMap call WaitBGMap
decoord 6, 5 decoord 6, 5
ld c, $6 ld c, $6
predef HOF_AnimateFrontpic predef HOF_Predef_AnimateFrontpic
ld c, 60 ld c, 60
call DelayFrames call DelayFrames
and a and a
@ -244,18 +244,18 @@ AnimateHOFMonEntrance: ; 865b5
ld a, [hli] ld a, [hli]
ld [TempMonDVs + 1], a ld [TempMonDVs + 1], a
ld hl, TempMonDVs ld hl, TempMonDVs
predef GetUnownLetter predef Predef_GetUnownLetter
hlcoord 0, 0 hlcoord 0, 0
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
ld a, " " ld a, " "
call ByteFill call ByteFill
ld de, vTiles2 tile $31 ld de, vTiles2 tile $31
predef GetMonBackpic predef Predef_GetMonBackpic
ld a, $31 ld a, $31
ld [hGraphicStartTile], a ld [hGraphicStartTile], a
hlcoord 6, 6 hlcoord 6, 6
lb bc, 6, 6 lb bc, 6, 6
predef PlaceGraphic predef Predef_PlaceGraphic
ld a, $d0 ld a, $d0
ld [hSCY], a ld [hSCY], a
ld a, $90 ld a, $90
@ -403,7 +403,7 @@ _HallOfFamePC: ; 86650
call SetPalettes call SetPalettes
decoord 6, 5 decoord 6, 5
ld c, $6 ld c, $6
predef HOF_AnimateFrontpic predef HOF_Predef_AnimateFrontpic
and a and a
ret ret
@ -478,7 +478,7 @@ DisplayHOFMon: ; 86748
ld [CurPartySpecies], a ld [CurPartySpecies], a
ld [wd265], a ld [wd265], a
ld hl, TempMonDVs ld hl, TempMonDVs
predef GetUnownLetter predef Predef_GetUnownLetter
xor a xor a
ld [wBoxAlignment], a ld [wBoxAlignment], a
hlcoord 6, 5 hlcoord 6, 5
@ -499,7 +499,7 @@ DisplayHOFMon: ; 86748
call PlaceString call PlaceString
ld a, TEMPMON ld a, TEMPMON
ld [MonType], a ld [MonType], a
farcall GetGender farcall Predef_GetGender
ld a, " " ld a, " "
jr c, .got_gender jr c, .got_gender
ld a, "♂" ld a, "♂"
@ -546,7 +546,7 @@ HOF_AnimatePlayerPic: ; 86810
ld [hGraphicStartTile], a ld [hGraphicStartTile], a
hlcoord 6, 6 hlcoord 6, 6
lb bc, 6, 6 lb bc, 6, 6
predef PlaceGraphic predef Predef_PlaceGraphic
ld a, $d0 ld a, $d0
ld [hSCY], a ld [hSCY], a
ld a, $90 ld a, $90
@ -570,7 +570,7 @@ HOF_AnimatePlayerPic: ; 86810
ld [hGraphicStartTile], a ld [hGraphicStartTile], a
hlcoord 12, 5 hlcoord 12, 5
lb bc, 7, 7 lb bc, 7, 7
predef PlaceGraphic predef Predef_PlaceGraphic
ld a, $c0 ld a, $c0
ld [hSCX], a ld [hSCX], a
call WaitBGMap call WaitBGMap

View File

@ -1,4 +1,4 @@
GetFirstPokemonHappiness: ; 718d Special_GetFirstPokemonHappiness: ; 718d
ld hl, PartyMon1Happiness ld hl, PartyMon1Happiness
ld bc, PARTYMON_STRUCT_LENGTH ld bc, PARTYMON_STRUCT_LENGTH
ld de, PartySpecies ld de, PartySpecies
@ -17,7 +17,7 @@ GetFirstPokemonHappiness: ; 718d
call GetPokemonName call GetPokemonName
jp CopyPokemonName_Buffer1_Buffer3 jp CopyPokemonName_Buffer1_Buffer3
CheckFirstMonIsEgg: ; 71ac Special_CheckFirstMonIsEgg: ; 71ac
ld a, [PartySpecies] ld a, [PartySpecies]
ld [wd265], a ld [wd265], a
cp EGG cp EGG

View File

@ -1,4 +1,4 @@
HealMachineAnim: ; 12324 Special_HealMachineAnim: ; 12324
; If you have no Pokemon, don't change the buffer. This can lead to some glitchy effects if you have no Pokemon. ; If you have no Pokemon, don't change the buffer. This can lead to some glitchy effects if you have no Pokemon.
ld a, [PartyCount] ld a, [PartyCount]
and a and a

View File

@ -161,7 +161,7 @@ Kurt_SelectQuantity: ; 880c2
db $40 ; flags db $40 ; flags
menu_coords 6, 9, SCREEN_WIDTH - 1, 12 menu_coords 6, 9, SCREEN_WIDTH - 1, 12
; XXX ; unused
dw 0 dw 0
db -1 db -1
db 0 db 0

View File

@ -103,7 +103,7 @@ Special_CheckForLuckyNumberWinners: ; 4d87a
ld a, [ScriptVar] ld a, [ScriptVar]
and a and a
ret z ; found nothing ret z ; found nothing
farcall TrainerRankings_LuckyNumberShow farcall StubbedTrainerRankings_LuckyNumberShow
ld a, [wFoundMatchingIDInParty] ld a, [wFoundMatchingIDInParty]
and a and a
push af push af

View File

@ -28,7 +28,7 @@ Special_CheckMagikarpLength: ; fbb32
ld c, l ld c, l
call CalcMagikarpLength call CalcMagikarpLength
call PrintMagikarpLength call PrintMagikarpLength
farcall TrainerRankings_MagikarpLength farcall StubbedTrainerRankings_MagikarpLength
ld hl, .MeasureItText ld hl, .MeasureItText
call PrintText call PrintText

View File

@ -2,7 +2,7 @@ Script_AbortBugContest: ; 0x122c1
checkflag ENGINE_BUG_CONTEST_TIMER checkflag ENGINE_BUG_CONTEST_TIMER
iffalse .finish iffalse .finish
setflag ENGINE_DAILY_BUG_CONTEST setflag ENGINE_DAILY_BUG_CONTEST
special ContestReturnMons special Special_ContestReturnMons
.finish .finish
end end

View File

@ -217,7 +217,7 @@ endr
INCLUDE "data/items/mom_phone.asm" INCLUDE "data/items/mom_phone.asm"
db 0, 0, 0 ; XXX db 0, 0, 0 ; unused
_MomText_HiHowAreYou: ; 0xfd1b1 _MomText_HiHowAreYou: ; 0xfd1b1
; Hi, ! How are you? ; Hi, ! How are you?
@ -255,10 +255,10 @@ _MomText_ItsInRoom: ; 0xfd1ca
db "@" db "@"
; 0xfd1cf ; 0xfd1cf
db 0 ; XXX db 0 ; unused
Predef3A: ; fd1d0 DummyPredef3A: ; fd1d0
ret ret
; fd1d1 ; fd1d1
ret ; XXX ret ; unused

View File

@ -1,4 +1,4 @@
MoveDeletion: Special_MoveDeletion:
ld hl, .IntroText ld hl, .IntroText
call PrintText call PrintText
call YesNoBox call YesNoBox

View File

@ -55,7 +55,7 @@ CheckCanLearnMoveTutorMove: ; 492b9
ld hl, .MenuDataHeader ld hl, .MenuDataHeader
call LoadMenuDataHeader call LoadMenuDataHeader
predef CanLearnTMHMMove predef Predef_CanLearnTMHMMove
push bc push bc
ld a, [CurPartyMon] ld a, [CurPartyMon]
@ -79,7 +79,7 @@ CheckCanLearnMoveTutorMove: ; 492b9
callfar KnowsMove callfar KnowsMove
jr c, .didnt_learn jr c, .didnt_learn
predef LearnMove predef Predef_LearnMove
ld a, b ld a, b
and a and a
jr z, .didnt_learn jr z, .didnt_learn

View File

@ -427,7 +427,7 @@ UsedSurfScript: ; c986
end end
.empty_fn ; c9a2 .empty_fn ; c9a2
farcall TrainerRankings_Surf farcall StubbedTrainerRankings_Surf
ret ret
UsedSurfText: ; c9a9 UsedSurfText: ; c9a9
@ -623,7 +623,7 @@ FlyFunction: ; ca3b
special UpdateTimePals special UpdateTimePals
callasm FlyFromAnim callasm FlyFromAnim
farscall Script_AbortBugContest farscall Script_AbortBugContest
special WarpToSpawnPoint special Special_WarpToSpawnPoint
callasm DelayLoadingNewSprites callasm DelayLoadingNewSprites
writecode VAR_MOVEMENT, PLAYER_NORMAL writecode VAR_MOVEMENT, PLAYER_NORMAL
newloadmap MAPSETUP_FLY newloadmap MAPSETUP_FLY
@ -700,7 +700,7 @@ Script_UsedWaterfall: ; 0xcb20
ld a, [PlayerStandingTile] ld a, [PlayerStandingTile]
call CheckWaterfallTile call CheckWaterfallTile
ret z ret z
farcall TrainerRankings_Waterfall farcall StubbedTrainerRankings_Waterfall
ld a, $1 ld a, $1
ld [ScriptVar], a ld [ScriptVar], a
ret ret
@ -871,7 +871,7 @@ dig_incave
playsound SFX_WARP_TO playsound SFX_WARP_TO
applymovement PLAYER, .DigOut applymovement PLAYER, .DigOut
farscall Script_AbortBugContest farscall Script_AbortBugContest
special WarpToSpawnPoint special Special_WarpToSpawnPoint
writecode VAR_MOVEMENT, PLAYER_NORMAL writecode VAR_MOVEMENT, PLAYER_NORMAL
newloadmap MAPSETUP_DOOR newloadmap MAPSETUP_DOOR
playsound SFX_WARP_FROM playsound SFX_WARP_FROM
@ -958,7 +958,7 @@ TeleportFunction: ; cc61
playsound SFX_WARP_TO playsound SFX_WARP_TO
applymovement PLAYER, .TeleportFrom applymovement PLAYER, .TeleportFrom
farscall Script_AbortBugContest farscall Script_AbortBugContest
special WarpToSpawnPoint special Special_WarpToSpawnPoint
writecode VAR_MOVEMENT, PLAYER_NORMAL writecode VAR_MOVEMENT, PLAYER_NORMAL
newloadmap MAPSETUP_TELEPORT newloadmap MAPSETUP_TELEPORT
playsound SFX_WARP_FROM playsound SFX_WARP_FROM
@ -986,7 +986,7 @@ StrengthFunction: ; cce5
jr c, .Failed jr c, .Failed
jr .UseStrength jr .UseStrength
.AlreadyUsing: ; unreferenced .Unreferenced_AlreadyUsing:
ld hl, .JumpText ld hl, .JumpText
call MenuTextBoxBackup call MenuTextBoxBackup
ld a, $80 ld a, $80
@ -1749,7 +1749,7 @@ Script_GetOnBike_Register: ; 0xd14e
special ReplaceKrisSprite special ReplaceKrisSprite
end end
; XXX ; unused
nop nop
ret ret

View File

@ -104,7 +104,7 @@ DoPoisonStep:: ; 505da
ld de, SFX_POISON ld de, SFX_POISON
call PlaySFX call PlaySFX
ld b, $2 ld b, $2
predef LoadPoisonBGPals predef Predef_LoadPoisonBGPals
call DelayFrame call DelayFrame
ret ret
; 50669 ; 50669
@ -145,7 +145,7 @@ DoPoisonStep:: ; 505da
ld a, [PartyCount] ld a, [PartyCount]
cp [hl] cp [hl]
jr nz, .party_loop jr nz, .party_loop
predef CheckPlayerPartyForFitPkmn predef Predef_CheckPlayerPartyForFitPkmn
ld a, d ld a, d
ld [ScriptVar], a ld [ScriptVar], a
ret ret

View File

@ -1,4 +1,4 @@
LoadPoisonBGPals: ; cbcdd Predef_LoadPoisonBGPals: ; cbcdd
call .LoadPals call .LoadPals
ld a, [hCGB] ld a, [hCGB]
and a and a

View File

@ -15,7 +15,7 @@
const SEERACTION_CANT_TELL_2 const SEERACTION_CANT_TELL_2
const SEERACTION_LEVEL_ONLY const SEERACTION_LEVEL_ONLY
SpecialPokeSeer: ; 4f0bc Special_PokeSeer: ; 4f0bc
ld a, SEER_INTRO ld a, SEER_INTRO
call PrintSeerText call PrintSeerText
call JoyWaitAorB call JoyWaitAorB

View File

@ -1,4 +1,4 @@
PokemonCenterPC: ; 1559a Special_PokemonCenterPC: ; 1559a
call PC_CheckPartyForPokemon call PC_CheckPartyForPokemon
ret c ret c
call PC_PlayBootSound call PC_PlayBootSound
@ -353,7 +353,7 @@ KrisWithdrawItemMenu: ; 0x157d1
ld [CurItemQuantity], a ld [CurItemQuantity], a
ld hl, PCItems ld hl, PCItems
call TossItem call TossItem
predef PartyMonItemName predef Predef_PartyMonItemName
ld hl, .WithdrewText ld hl, .WithdrewText
call MenuTextBox call MenuTextBox
xor a xor a
@ -517,7 +517,7 @@ KrisDepositItemMenu: ; 0x1588b
ld [CurItemQuantity], a ld [CurItemQuantity], a
ld hl, NumItems ld hl, NumItems
call TossItem call TossItem
predef PartyMonItemName predef Predef_PartyMonItemName
ld hl, .DepositText ld hl, .DepositText
call PrintText call PrintText
ret ret

View File

@ -12,7 +12,7 @@ Pokepic:: ; 244e3
ld [CurSpecies], a ld [CurSpecies], a
call GetBaseData call GetBaseData
ld de, vTiles1 ld de, vTiles1
predef GetMonFrontpic predef Predef_GetMonFrontpic
ld a, [wMenuBorderTopCoord] ld a, [wMenuBorderTopCoord]
inc a inc a
ld b, a ld b, a
@ -23,7 +23,7 @@ Pokepic:: ; 244e3
ld a, $80 ld a, $80
ld [hGraphicStartTile], a ld [hGraphicStartTile], a
lb bc, 7, 7 lb bc, 7, 7
predef PlaceGraphic predef Predef_PlaceGraphic
call WaitBGMap call WaitBGMap
ret ret

View File

@ -1,4 +1,4 @@
PhotoStudio: ; 16dc7 Special_PhotoStudio: ; 16dc7
ld hl, .Text_AskWhichMon ld hl, .Text_AskWhichMon
call PrintText call PrintText
farcall SelectMonFromParty farcall SelectMonFromParty

View File

@ -140,13 +140,13 @@ UnownPrinter: ; 16be4
xor a xor a
ld [wBoxAlignment], a ld [wBoxAlignment], a
ld de, vTiles2 ld de, vTiles2
predef GetMonFrontpic predef Predef_GetMonFrontpic
call .Load2bppToSRAM call .Load2bppToSRAM
hlcoord 1, 6 hlcoord 1, 6
xor a xor a
ld [hGraphicStartTile], a ld [hGraphicStartTile], a
lb bc, 7, 7 lb bc, 7, 7
predef PlaceGraphic predef Predef_PlaceGraphic
ld de, vTiles2 tile $31 ld de, vTiles2 tile $31
farcall RotateUnownFrontpic farcall RotateUnownFrontpic
ret ret
@ -228,6 +228,6 @@ PlaceUnownPrinterFrontpic: ; 16dac
ld a, $31 ld a, $31
ld [hGraphicStartTile], a ld [hGraphicStartTile], a
lb bc, 7, 7 lb bc, 7, 7
predef PlaceGraphic predef Predef_PlaceGraphic
ret ret
; 16dc7 ; 16dc7

View File

@ -3,7 +3,7 @@ ProfOaksPC: ; 0x265d3
call MenuTextBox call MenuTextBox
call YesNoBox call YesNoBox
jr c, .shutdown jr c, .shutdown
call ProfOaksPCBoot ; player chose "yes"? call Special_ProfOaksPCBoot ; player chose "yes"?
.shutdown .shutdown
ld hl, OakPCText4 ld hl, OakPCText4
call PrintText call PrintText
@ -11,7 +11,7 @@ ProfOaksPC: ; 0x265d3
call ExitMenu call ExitMenu
ret ret
ProfOaksPCBoot ; 0x265ee Special_ProfOaksPCBoot ; 0x265ee
ld hl, OakPCText2 ld hl, OakPCText2
call PrintText call PrintText
call Rate call Rate

View File

@ -52,12 +52,12 @@ SacredAshScript: ; 0x50821
special HealParty special HealParty
reloadmappart reloadmappart
playsound SFX_WARP_TO playsound SFX_WARP_TO
special FadeOutPalettes special Special_FadeOutPalettes
special FadeInPalettes special Special_FadeInPalettes
special FadeOutPalettes special Special_FadeOutPalettes
special FadeInPalettes special Special_FadeInPalettes
special FadeOutPalettes special Special_FadeOutPalettes
special FadeInPalettes special Special_FadeInPalettes
waitsfx waitsfx
writetext UnknownText_0x50845 writetext UnknownText_0x50845
playsound SFX_CAUGHT_MON playsound SFX_CAUGHT_MON

View File

@ -1,6 +1,6 @@
MANIA_OT_ID EQU 00518 MANIA_OT_ID EQU 00518
SpecialGiveShuckle: ; 7305 Special_GiveShuckle: ; 7305
; Adding to the party. ; Adding to the party.
xor a xor a
@ -12,7 +12,7 @@ SpecialGiveShuckle: ; 7305
ld a, 15 ld a, 15
ld [CurPartyLevel], a ld [CurPartyLevel], a
predef TryAddMonToParty predef Predef_TryAddMonToParty
jr nc, .NotGiven jr nc, .NotGiven
; Caught data. ; Caught data.
@ -71,7 +71,7 @@ SpecialShuckleOT:
SpecialShuckleNick: SpecialShuckleNick:
db "SHUCKIE@" db "SHUCKIE@"
SpecialReturnShuckle: ; 737e Special_ReturnShuckle: ; 737e
farcall SelectMonFromParty farcall SelectMonFromParty
jr c, .refused jr c, .refused
@ -231,6 +231,5 @@ CopyPokemonName_Buffer1_Buffer3: ; 746e
ld bc, PKMN_NAME_LENGTH ld bc, PKMN_NAME_LENGTH
jp CopyBytes jp CopyBytes
Predef1: ; 747a DummyPredef1: ; 747a
; not used
ret ret

View File

@ -108,13 +108,13 @@ PokecenterNurseScript:
farwritetext NurseTakePokemonText farwritetext NurseTakePokemonText
pause 20 pause 20
special TrainerRankings_Healings special Special_StubbedTrainerRankings_Healings
spriteface LAST_TALKED, LEFT spriteface LAST_TALKED, LEFT
pause 10 pause 10
special HealParty special HealParty
playmusic MUSIC_NONE playmusic MUSIC_NONE
writebyte HEALMACHINE_POKECENTER writebyte HEALMACHINE_POKECENTER
special HealMachineAnim special Special_HealMachineAnim
pause 30 pause 30
special RestartMapMusic special RestartMapMusic
spriteface LAST_TALKED, DOWN spriteface LAST_TALKED, DOWN
@ -124,7 +124,7 @@ PokecenterNurseScript:
iftrue .no iftrue .no
checkflag ENGINE_POKERUS ; nurse already talked about pokerus checkflag ENGINE_POKERUS ; nurse already talked about pokerus
iftrue .no iftrue .no
special SpecialCheckPokerus special Special_CheckPokerus
iftrue .pokerus iftrue .pokerus
.no .no
@ -204,7 +204,7 @@ HomepageScript:
Radio1Script: Radio1Script:
opentext opentext
writebyte MAPRADIO_POKEMON_CHANNEL writebyte MAPRADIO_POKEMON_CHANNEL
special MapRadio special Special_MapRadio
closetext closetext
end end
@ -212,7 +212,7 @@ Radio2Script:
; Lucky Channel ; Lucky Channel
opentext opentext
writebyte MAPRADIO_LUCKY_CHANNEL writebyte MAPRADIO_LUCKY_CHANNEL
special MapRadio special Special_MapRadio
closetext closetext
end end
@ -221,7 +221,7 @@ TrashCanScript: ; 0xbc1a5
PCScript: PCScript:
opentext opentext
special PokemonCenterPC special Special_PokemonCenterPC
closetext closetext
end end
@ -320,7 +320,7 @@ BugContestResultsScript:
opentext opentext
farwritetext ContestResults_ReadyToJudgeText farwritetext ContestResults_ReadyToJudgeText
waitbutton waitbutton
special BugContestJudging special Special_BugContestJudging
vartomem MEM_BUFFER_0 vartomem MEM_BUFFER_0
if_equal 1, BugContestResults_FirstPlace if_equal 1, BugContestResults_FirstPlace
if_equal 2, BugContestResults_SecondPlace if_equal 2, BugContestResults_SecondPlace
@ -346,9 +346,9 @@ BugContestResults_FinishUp
iffalse BugContestResults_DidNotLeaveMons iffalse BugContestResults_DidNotLeaveMons
farwritetext ContestResults_ReturnPartyText farwritetext ContestResults_ReturnPartyText
waitbutton waitbutton
special ContestReturnMons special Special_ContestReturnMons
BugContestResults_DidNotLeaveMons BugContestResults_DidNotLeaveMons
special CheckPartyFullAfterContest special Special_CheckPartyFullAfterContest
if_equal BUGCONTEST_CAUGHT_MON, BugContestResults_CleanUp if_equal BUGCONTEST_CAUGHT_MON, BugContestResults_CleanUp
if_equal BUGCONTEST_NO_CATCH, BugContestResults_CleanUp if_equal BUGCONTEST_NO_CATCH, BugContestResults_CleanUp
; BUGCONTEST_BOXED_MON ; BUGCONTEST_BOXED_MON
@ -622,7 +622,7 @@ InitializeEventsScript:
return return
AskNumber1MScript: AskNumber1MScript:
special RandomPhoneMon special Special_RandomPhoneMon
checkcode VAR_CALLERID checkcode VAR_CALLERID
if_equal PHONE_SCHOOLBOY_JACK, .Jack if_equal PHONE_SCHOOLBOY_JACK, .Jack
if_equal PHONE_SAILOR_HUEY, .Huey if_equal PHONE_SAILOR_HUEY, .Huey
@ -707,7 +707,7 @@ AskNumber1MScript:
end end
AskNumber2MScript: AskNumber2MScript:
special RandomPhoneMon special Special_RandomPhoneMon
checkcode VAR_CALLERID checkcode VAR_CALLERID
if_equal PHONE_SCHOOLBOY_JACK, .Jack if_equal PHONE_SCHOOLBOY_JACK, .Jack
if_equal PHONE_SAILOR_HUEY, .Huey if_equal PHONE_SAILOR_HUEY, .Huey
@ -1887,7 +1887,7 @@ CoinVendor_IntroScript: ; 0xbcde0
HappinessCheckScript: HappinessCheckScript:
faceplayer faceplayer
opentext opentext
special GetFirstPokemonHappiness special Special_GetFirstPokemonHappiness
if_less_than 50, .Unhappy if_less_than 50, .Unhappy
if_less_than 150, .KindaHappy if_less_than 150, .KindaHappy
farwritetext HappinessText3 farwritetext HappinessText3

View File

@ -1,5 +1,5 @@
TreeMonEncounter: ; b81ea TreeMonEncounter: ; b81ea
farcall TrainerRankings_TreeEncounters farcall StubbedTrainerRankings_TreeEncounters
xor a xor a
ld [TempWildMonSpecies], a ld [TempWildMonSpecies], a

View File

@ -1,4 +1,4 @@
SpecialHoOhChamber: ; 0x8addb Special_HoOhChamber: ; 0x8addb
ld hl, PartySpecies ld hl, PartySpecies
ld a, [hl] ld a, [hl]
cp HO_OH ; is Ho-oh the first Pokémon in the party? cp HO_OH ; is Ho-oh the first Pokémon in the party?
@ -11,7 +11,7 @@ SpecialHoOhChamber: ; 0x8addb
ret ret
; 0x8adef ; 0x8adef
SpecialOmanyteChamber: ; 8adef Special_OmanyteChamber: ; 8adef
call GetSecondaryMapHeaderPointer call GetSecondaryMapHeaderPointer
ld de, EVENT_WALL_OPENED_IN_OMANYTE_CHAMBER ld de, EVENT_WALL_OPENED_IN_OMANYTE_CHAMBER
ld b, CHECK_FLAG ld b, CHECK_FLAG

View File

@ -10,7 +10,7 @@ Script_OverworldWhiteout:: ; 0x124c8
Script_Whiteout: ; 0x124ce Script_Whiteout: ; 0x124ce
writetext .WhitedOutText writetext .WhitedOutText
waitbutton waitbutton
special FadeOutPalettes special Special_FadeOutPalettes
pause 40 pause 40
special HealParty special HealParty
checkflag ENGINE_BUG_CONTEST_TIMER checkflag ENGINE_BUG_CONTEST_TIMER
@ -18,7 +18,7 @@ Script_Whiteout: ; 0x124ce
callasm HalveMoney callasm HalveMoney
callasm GetWhiteoutSpawn callasm GetWhiteoutSpawn
farscall Script_AbortBugContest farscall Script_AbortBugContest
special WarpToSpawnPoint special Special_WarpToSpawnPoint
newloadmap MAPSETUP_WARP newloadmap MAPSETUP_WARP
end_all end_all
@ -49,7 +49,7 @@ BattleBGMap: ; 1250a
; 12513 ; 12513
HalveMoney: ; 12513 HalveMoney: ; 12513
farcall TrainerRankings_WhiteOuts farcall StubbedTrainerRankings_WhiteOuts
; Halve the player's money. ; Halve the player's money.
ld hl, Money ld hl, Money

View File

@ -1,7 +1,7 @@
; More overworld event handling. ; More overworld event handling.
WarpToSpawnPoint:: ; 97c28 Special_WarpToSpawnPoint:: ; 97c28
ld hl, wStatusFlags2 ld hl, wStatusFlags2
res 1, [hl] ; safari zone? res 1, [hl] ; safari zone?
res 2, [hl] ; bug contest res 2, [hl] ; bug contest
@ -361,7 +361,7 @@ HandleCmdQueue:: ; 97e08
ret ret
; 97e25 ; 97e25
GetNthCmdQueueEntry: ; 97e25 unreferenced Unreferenced_GetNthCmdQueueEntry: ; 97e25
ld hl, wCmdQueue ld hl, wCmdQueue
ld bc, CMDQUEUE_ENTRY_SIZE ld bc, CMDQUEUE_ENTRY_SIZE
call AddNTimes call AddNTimes

View File

@ -122,7 +122,7 @@ EvolutionAnimation: ; 4e5e1
hlcoord 7, 2 hlcoord 7, 2
ld d, $0 ld d, $0
ld e, ANIM_MON_EVOLVE ld e, ANIM_MON_EVOLVE
predef AnimateFrontpic predef Predef_AnimateFrontpic
pop af pop af
ld [CurPartySpecies], a ld [CurPartySpecies], a
@ -168,7 +168,7 @@ EvolutionAnimation: ; 4e5e1
ld a, $1 ld a, $1
ld [wBoxAlignment], a ld [wBoxAlignment], a
ld de, vTiles2 ld de, vTiles2
predef GetAnimatedFrontpicPredef predef Predef_GetAnimatedFrontpic
xor a xor a
ld [wBoxAlignment], a ld [wBoxAlignment], a
ret ret

View File

@ -6,7 +6,7 @@ EvolvePokemon: ; 421d8
ld c, a ld c, a
ld b, SET_FLAG ld b, SET_FLAG
call EvoFlagAction call EvoFlagAction
EvolveAfterBattle: ; 421e6 Predef_EvolveAfterBattle: ; 421e6
xor a xor a
ld [wMonTriedToEvolve], a ld [wMonTriedToEvolve], a
dec a dec a
@ -55,7 +55,7 @@ EvolveAfterBattle_MasterLoop
push hl push hl
xor a xor a
ld [MonType], a ld [MonType], a
predef CopyPkmnToTempMon predef Predef_CopyPkmnToTempMon
pop hl pop hl
.loop .loop
@ -247,7 +247,7 @@ EvolveAfterBattle_MasterLoop
push hl push hl
ld hl, Text_EvolvedIntoPKMN ld hl, Text_EvolvedIntoPKMN
call PrintTextBoxText call PrintTextBoxText
farcall TrainerRankings_MonsEvolved farcall StubbedTrainerRankings_MonsEvolved
ld de, MUSIC_NONE ld de, MUSIC_NONE
call PlayMusic call PlayMusic
@ -265,7 +265,7 @@ EvolveAfterBattle_MasterLoop
ld hl, TempMonExp + 2 ld hl, TempMonExp + 2
ld de, TempMonMaxHP ld de, TempMonMaxHP
ld b, $1 ld b, $1
predef CalcPkmnStats predef Predef_CalcPkmnStats
ld a, [CurPartyMon] ld a, [CurPartyMon]
ld hl, PartyMons ld hl, PartyMons
@ -301,7 +301,7 @@ EvolveAfterBattle_MasterLoop
ld [wd265], a ld [wd265], a
xor a xor a
ld [MonType], a ld [MonType], a
call LearnLevelMoves call Predef_LearnLevelMoves
ld a, [wd265] ld a, [wd265]
dec a dec a
call SetSeenAndCaughtMon call SetSeenAndCaughtMon
@ -311,7 +311,7 @@ EvolveAfterBattle_MasterLoop
jr nz, .skip_unown jr nz, .skip_unown
ld hl, TempMonDVs ld hl, TempMonDVs
predef GetUnownLetter predef Predef_GetUnownLetter
callfar UpdateUnownDex callfar UpdateUnownDex
.skip_unown .skip_unown
@ -333,7 +333,7 @@ EvolveAfterBattle_MasterLoop
inc hl inc hl
jp .loop jp .loop
; XXX ; unused
pop hl pop hl
.ReturnToMap: .ReturnToMap:
pop de pop de
@ -429,7 +429,7 @@ Text_WhatEvolving: ; 0x42482
; 0x42487 ; 0x42487
LearnLevelMoves: ; 42487 Predef_LearnLevelMoves: ; 42487
ld a, [wd265] ld a, [wd265]
ld [CurPartySpecies], a ld [CurPartySpecies], a
dec a dec a
@ -484,7 +484,7 @@ LearnLevelMoves: ; 42487
ld [wd265], a ld [wd265], a
call GetMoveName call GetMoveName
call CopyName1 call CopyName1
predef LearnMove predef Predef_LearnMove
pop hl pop hl
jr .find_move jr .find_move
@ -495,7 +495,7 @@ LearnLevelMoves: ; 42487
; 424e1 ; 424e1
FillMoves: ; 424e1 Predef_FillMoves: ; 424e1
; Fill in moves at de for CurPartySpecies at CurPartyLevel ; Fill in moves at de for CurPartySpecies at CurPartyLevel
push hl push hl
@ -621,7 +621,7 @@ ShiftMoves: ; 4256e
EvoFlagAction: ; 42577 EvoFlagAction: ; 42577
push de push de
ld d, $0 ld d, $0
predef FlagPredef predef Predef_SmallFarFlagAction
pop de pop de
ret ret
; 42581 ; 42581

View File

@ -52,7 +52,7 @@ HealPartyMon: ; c677
farcall RestoreAllPP farcall RestoreAllPP
ret ret
ComputeHPBarPixels: ; c699 Predef_ComputeHPBarPixels: ; c699
; e = bc * (6 * 8) / de ; e = bc * (6 * 8) / de
ld a, b ld a, b
or c or c
@ -103,7 +103,7 @@ ComputeHPBarPixels: ; c699
ld e, 0 ld e, 0
ret ret
AnimateHPBar: ; c6e0 Predef_AnimateHPBar: ; c6e0
call WaitBGMap call WaitBGMap
call _AnimateHPBar call _AnimateHPBar
call WaitBGMap call WaitBGMap

View File

@ -10,7 +10,7 @@ _MainMenu: ; 5ae8
jp StartTitleScreen jp StartTitleScreen
; 5b04 ; 5b04
; unreferenced ; unused
ret ret
; 5b05 ; 5b05
@ -825,7 +825,7 @@ NamePlayer: ; 0x6074
db "KRIS@@@@@@@" db "KRIS@@@@@@@"
; 60e9 ; 60e9
Function60e9: ; Unreferenced Unreferenced_Function60e9:
call LoadMenuDataHeader call LoadMenuDataHeader
call VerticalMenu call VerticalMenu
ld a, [wMenuCursorY] ld a, [wMenuCursorY]
@ -941,24 +941,24 @@ Intro_WipeInFrontpic: ; 6182
Intro_PrepTrainerPic: ; 619c Intro_PrepTrainerPic: ; 619c
ld de, vTiles2 ld de, vTiles2
farcall GetTrainerPic farcall Predef_GetTrainerPic
xor a xor a
ld [hGraphicStartTile], a ld [hGraphicStartTile], a
hlcoord 6, 4 hlcoord 6, 4
lb bc, 7, 7 lb bc, 7, 7
predef PlaceGraphic predef Predef_PlaceGraphic
ret ret
; 61b4 ; 61b4
ShrinkFrame: ; 61b4 ShrinkFrame: ; 61b4
ld de, vTiles2 ld de, vTiles2
ld c, $31 ld c, $31
predef DecompressPredef predef Predef_Decompress
xor a xor a
ld [hGraphicStartTile], a ld [hGraphicStartTile], a
hlcoord 6, 4 hlcoord 6, 4
lb bc, 7, 7 lb bc, 7, 7
predef PlaceGraphic predef Predef_PlaceGraphic
ret ret
; 61cd ; 61cd
@ -1093,7 +1093,7 @@ RunTitleScreen: ; 627b
ret ret
; 6292 ; 6292
Function6292: ; 6292 ; unreferenced Unreferenced_Function6292: ; 6292
ld a, [hVBlankCounter] ld a, [hVBlankCounter]
and $7 and $7
ret nz ret nz
@ -1124,7 +1124,7 @@ TitleScreenScene: ; 62a3
dw TitleScreenEnd dw TitleScreenEnd
; 62b7 ; 62b7
.NextScene: ; Unreferenced .Unreferenced_NextScene:
ld hl, wJumptableIndex ld hl, wJumptableIndex
inc [hl] inc [hl]
ret ret
@ -1328,7 +1328,7 @@ ResetClock: ; 6392
jp Init jp Init
; 639b ; 639b
Function639b: ; unreferenced Unreferenced_Function639b:
; If bit 0 or 1 of [wTitleScreenTimer] is set, we don't need to be here. ; If bit 0 or 1 of [wTitleScreenTimer] is set, we don't need to be here.
ld a, [wTitleScreenTimer] ld a, [wTitleScreenTimer]
and %00000011 and %00000011

View File

@ -415,7 +415,7 @@ ParkBall: ; e8a2
ld [hBattleTurn], a ld [hBattleTurn], a
ld [Buffer2], a ld [Buffer2], a
ld [wNumHits], a ld [wNumHits], a
predef PlayBattleAnim predef Predef_PlayBattleAnim
ld a, [wWildMon] ld a, [wWildMon]
and a and a
@ -517,7 +517,7 @@ ParkBall: ; e8a2
cp BATTLETYPE_TUTORIAL cp BATTLETYPE_TUTORIAL
jp z, .FinishTutorial jp z, .FinishTutorial
farcall TrainerRankings_WildMonsCaught farcall StubbedTrainerRankings_WildMonsCaught
ld hl, Text_GotchaMonWasCaught ld hl, Text_GotchaMonWasCaught
call PrintText call PrintText
@ -547,7 +547,7 @@ ParkBall: ; e8a2
ld a, [EnemyMonSpecies] ld a, [EnemyMonSpecies]
ld [wd265], a ld [wd265], a
predef NewPokedexEntry predef Predef_NewPokedexEntry
.skip_pokedex .skip_pokedex
ld a, [BattleType] ld a, [BattleType]
@ -567,7 +567,7 @@ ParkBall: ; e8a2
ld [MonType], a ld [MonType], a
call ClearSprites call ClearSprites
predef TryAddMonToParty predef Predef_TryAddMonToParty
farcall SetCaughtData farcall SetCaughtData
@ -623,7 +623,7 @@ ParkBall: ; e8a2
.SendToPC: .SendToPC:
call ClearSprites call ClearSprites
predef SentPkmnIntoBox predef Predef_SendPkmnIntoBox
farcall SetBoxMonCaughtData farcall SetBoxMonCaughtData
@ -979,7 +979,7 @@ LoveBallMultiplier:
ld [MonType], a ld [MonType], a
ld a, [CurBattleMon] ld a, [CurBattleMon]
ld [CurPartyMon], a ld [CurPartyMon], a
farcall GetGender farcall Predef_GetGender
jr c, .done1 ; no effect on genderless jr c, .done1 ; no effect on genderless
ld d, 0 ; male ld d, 0 ; male
@ -993,7 +993,7 @@ LoveBallMultiplier:
ld [CurPartySpecies], a ld [CurPartySpecies], a
ld a, WILDMON ld a, WILDMON
ld [MonType], a ld [MonType], a
farcall GetGender farcall Predef_GetGender
jr c, .done2 ; no effect on genderless jr c, .done2 ; no effect on genderless
ld d, 0 ; male ld d, 0 ; male
@ -1283,7 +1283,7 @@ UpdateStatsAfterItem: ; ee8c
ld a, MON_STAT_EXP - 1 ld a, MON_STAT_EXP - 1
call GetPartyParamLocation call GetPartyParamLocation
ld b, $1 ld b, $1
predef_jump CalcPkmnStats predef_jump Predef_CalcPkmnStats
; ee9f ; ee9f
RareCandy_StatBooster_ExitMenu: ; ee9f RareCandy_StatBooster_ExitMenu: ; ee9f
@ -1422,7 +1422,7 @@ RareCandy: ; ef14
xor a ; PARTYMON xor a ; PARTYMON
ld [MonType], a ld [MonType], a
predef CopyPkmnToTempMon predef Predef_CopyPkmnToTempMon
hlcoord 9, 0 hlcoord 9, 0
ld b, 10 ld b, 10
@ -1431,7 +1431,7 @@ RareCandy: ; ef14
hlcoord 11, 1 hlcoord 11, 1
ld bc, 4 ld bc, 4
predef PrintTempMonStats predef Predef_PrintTempMonStats
call WaitPressAorB_BlinkCursor call WaitPressAorB_BlinkCursor
@ -1439,7 +1439,7 @@ RareCandy: ; ef14
ld [MonType], a ld [MonType], a
ld a, [CurPartySpecies] ld a, [CurPartySpecies]
ld [wd265], a ld [wd265], a
predef LearnLevelMoves predef Predef_LearnLevelMoves
xor a xor a
ld [wForceEvolution], a ld [wForceEvolution], a
@ -1645,7 +1645,7 @@ RevivePokemon: ; f0d6
ld d, 0 ld d, 0
ld hl, wBattleParticipantsIncludingFainted ld hl, wBattleParticipantsIncludingFainted
ld b, CHECK_FLAG ld b, CHECK_FLAG
predef FlagPredef predef Predef_SmallFarFlagAction
ld a, c ld a, c
and a and a
jr z, .skip_to_revive jr z, .skip_to_revive
@ -1654,7 +1654,7 @@ RevivePokemon: ; f0d6
ld c, a ld c, a
ld hl, wBattleParticipantsNotFainted ld hl, wBattleParticipantsNotFainted
ld b, SET_FLAG ld b, SET_FLAG
predef FlagPredef predef Predef_SmallFarFlagAction
.skip_to_revive .skip_to_revive
xor a xor a
@ -1821,7 +1821,7 @@ HealHP_SFX_GFX: ; f1db (3:71db)
call AddNTimes call AddNTimes
ld a, $2 ld a, $2
ld [wWhichHPBar], a ld [wWhichHPBar], a
predef_jump AnimateHPBar predef_jump Predef_AnimateHPBar
UseItem_SelectMon: ; f1f9 (3:71f9) UseItem_SelectMon: ; f1f9 (3:71f9)
call .SelectMon call .SelectMon
@ -2912,7 +2912,7 @@ UseBallInTrainerBattle: ; f7a0
ld [wBattleAnimParam], a ld [wBattleAnimParam], a
ld [hBattleTurn], a ld [hBattleTurn], a
ld [wNumHits], a ld [wNumHits], a
predef PlayBattleAnim predef Predef_PlayBattleAnim
ld hl, BlockedTheBallText ld hl, BlockedTheBallText
call PrintText call PrintText
ld hl, DontBeAThiefText ld hl, DontBeAThiefText
@ -3059,7 +3059,7 @@ ApplyPPUp: ; f84c
call GetPartyParamLocation call GetPartyParamLocation
push hl push hl
ld de, Buffer1 ld de, Buffer1
predef FillPP predef Predef_FillPP
pop hl pop hl
ld bc, MON_PP - MON_MOVES ld bc, MON_PP - MON_MOVES
add hl, bc add hl, bc

View File

@ -1,4 +1,4 @@
LearnMove: ; 6508 Predef_LearnMove: ; 6508
call LoadTileMapToTempTileMap call LoadTileMapToTempTileMap
ld a, [CurPartyMon] ld a, [CurPartyMon]
ld hl, PartyMonNicknames ld hl, PartyMonNicknames
@ -144,7 +144,7 @@ ForgetMove: ; 65d3
hlcoord 5 + 2, 2 + 2 hlcoord 5 + 2, 2 + 2
ld a, SCREEN_WIDTH * 2 ld a, SCREEN_WIDTH * 2
ld [Buffer1], a ld [Buffer1], a
predef ListMoves predef Predef_ListMoves
; wMenuData3 ; wMenuData3
ld a, $4 ld a, $4
ld [w2DMenuCursorInitY], a ld [w2DMenuCursorInitY], a

View File

@ -150,7 +150,7 @@ TimeCapsule: ; 2805d
ld [wd265], a ld [wd265], a
push hl push hl
push de push de
callfar ConvertMon_1to2 callfar Predef_ConvertMon_1to2
pop de pop de
pop hl pop hl
ld a, [wd265] ld a, [wd265]
@ -449,7 +449,7 @@ Gen2ToGen2LinkComms: ; 28177
pop af pop af
ld [rIF], a ld [rIF], a
predef StartBattle predef Predef_StartBattle
ld a, [rIF] ld a, [rIF]
ld h, a ld h, a
@ -786,7 +786,7 @@ Link_PrepPartyData_Gen1: ; 28499
add hl, bc add hl, bc
ld c, STAT_SATK ld c, STAT_SATK
ld b, TRUE ld b, TRUE
predef CalcPkmnStatC predef Predef_CalcPkmnStatC
pop bc pop bc
pop de pop de
@ -993,7 +993,7 @@ Function2868a: ; 2868a
push bc push bc
push de push de
ld [wd265], a ld [wd265], a
callfar ConvertMon_1to2 callfar Predef_ConvertMon_1to2
pop de pop de
pop bc pop bc
ld a, [wd265] ld a, [wd265]
@ -1072,7 +1072,7 @@ Function2868a: ; 2868a
add hl, bc add hl, bc
ld c, STAT_SATK ld c, STAT_SATK
ld b, TRUE ld b, TRUE
predef CalcPkmnStatC predef Predef_CalcPkmnStatC
pop bc pop bc
pop hl pop hl
ld a, [hQuotient + 1] ld a, [hQuotient + 1]
@ -1085,7 +1085,7 @@ Function2868a: ; 2868a
add hl, bc add hl, bc
ld c, STAT_SDEF ld c, STAT_SDEF
ld b, TRUE ld b, TRUE
predef CalcPkmnStatC predef Predef_CalcPkmnStatC
pop bc pop bc
pop hl pop hl
ld a, [hQuotient + 1] ld a, [hQuotient + 1]
@ -1597,8 +1597,7 @@ Function28b22: ; 28b22
ret ret
; 28b42 ; 28b42
Function28b42: ; 28b42 Unreferenced_Function28b42: ; 28b42
; unreferenced
hlcoord 0, 16 hlcoord 0, 16
ld a, "┘" ld a, "┘"
ld bc, 2 * SCREEN_WIDTH ld bc, 2 * SCREEN_WIDTH
@ -1892,11 +1891,11 @@ LinkTrade: ; 28b87
ld a, [hLinkPlayerNumber] ld a, [hLinkPlayerNumber]
cp $1 cp $1
jr z, .player_2 jr z, .player_2
predef TradeAnimation predef Predef_TradeAnimation
jr .done_animation jr .done_animation
.player_2 .player_2
predef TradeAnimationPlayer2 predef Predef_TradeAnimationPlayer2
.done_animation .done_animation
pop af pop af
@ -1914,7 +1913,7 @@ LinkTrade: ; 28b87
ld de, TempMonSpecies ld de, TempMonSpecies
ld bc, PARTYMON_STRUCT_LENGTH ld bc, PARTYMON_STRUCT_LENGTH
call CopyBytes call CopyBytes
predef AddTempmonToParty predef Predef_AddTempmonToParty
ld a, [PartyCount] ld a, [PartyCount]
dec a dec a
ld [CurPartyMon], a ld [CurPartyMon], a
@ -1958,7 +1957,7 @@ LinkTrade: ; 28b87
.save .save
farcall SaveAfterLinkTrade farcall SaveAfterLinkTrade
farcall TrainerRankings_Trades farcall StubbedTrainerRankings_Trades
farcall BackupMobileEventIndex farcall BackupMobileEventIndex
ld c, 40 ld c, 40
call DelayFrames call DelayFrames
@ -2020,8 +2019,7 @@ SetTradeRoomBGPals: ; 28eff
ret ret
; 28f09 ; 28f09
Function28f09: ; 28f09 Unreferenced_Function28f09: ; 28f09
; unreferenced
hlcoord 0, 0 hlcoord 0, 0
ld b, 6 ld b, 6
ld c, 18 ld c, 18
@ -2145,7 +2143,7 @@ Special_EnterTimeCapsule: ; 29c7b
ret ret
; 29c92 ; 29c92
WaitForOtherPlayerToExit: ; 29c92 Special_WaitForOtherPlayerToExit: ; 29c92
ld c, 3 ld c, 3
call DelayFrames call DelayFrames
ld a, -1 ld a, -1
@ -2577,17 +2575,16 @@ Special_CableClubCheckWhichChris: ; 29f47
ret ret
; 29f54 ; 29f54
UnusedGen1LinkCommsBorderGFX: ; 29f54 Unreferenced_Gen1LinkCommsBorderGFX: ; 29f54
; unreferenced
INCBIN "gfx/trade/unused_gen_1_border_tiles.2bpp" INCBIN "gfx/trade/unused_gen_1_border_tiles.2bpp"
; 29fe4 ; 29fe4
Function29fe4: ; unreferenced Unreferenced_Function29fe4:
ld a, BANK(sPartyMail) ld a, BANK(sPartyMail)
call GetSRAMBank call GetSRAMBank
ld d, $0 ld d, $0
ld b, CHECK_FLAG ld b, CHECK_FLAG
predef FlagPredef predef Predef_SmallFarFlagAction
call CloseSRAM call CloseSRAM
ld a, c ld a, c
and a and a

View File

@ -3,7 +3,7 @@ LinkMonStatsScreen: ; 4d319
dec a dec a
ld [CurPartyMon], a ld [CurPartyMon], a
call LowVolume call LowVolume
predef StatsScreenInit predef Predef_StatsScreenInit
ld a, [CurPartyMon] ld a, [CurPartyMon]
inc a inc a
ld [wMenuCursorY], a ld [wMenuCursorY], a

View File

@ -725,8 +725,7 @@ MailGFX_PlaceMessage: ; b9803
jp PlaceString jp PlaceString
; b984e ; b984e
Functionb984e: ; b984e Unreferenced_Functionb984e: ; b984e
; XXX
.loop .loop
ld a, [hl] ld a, [hl]
xor $ff xor $ff

View File

@ -278,7 +278,7 @@ MainMenu_PrintCurrentTimeAndDay: ; 49e09
ret ret
.min .min
; unreferenced ; unused
db "min.@" db "min.@"
; 49e75 ; 49e75

View File

@ -420,8 +420,7 @@ UpdatePlayerStep: ; 4738
ret ret
; 4759 ; 4759
Function4759: ; 4759 Unreferenced_Function4759: ; 4759
; unreferenced
push bc push bc
ld e, a ld e, a
ld d, 0 ld d, 0
@ -1573,7 +1572,7 @@ StepType05: ; 4e0c
ld [hl], a ld [hl], a
call IncrementObjectStructField1c call IncrementObjectStructField1c
StepType04: ; 4e21 StepType04: ; 4e21
call MobileFn_4fb2 call Stubbed_Function4fb2
ld hl, OBJECT_DIRECTION_WALKING ld hl, OBJECT_DIRECTION_WALKING
add hl, bc add hl, bc
ld [hl], STANDING ld [hl], STANDING
@ -1581,7 +1580,7 @@ StepType04: ; 4e21
; 4e2b ; 4e2b
NPCStep: ; 4e2b NPCStep: ; 4e2b
call MobileFn_4fb2 call Stubbed_Function4fb2
call AddStepVector call AddStepVector
ld hl, OBJECT_STEP_DURATION ld hl, OBJECT_STEP_DURATION
add hl, bc add hl, bc
@ -1844,7 +1843,8 @@ SkyfallTop: ; 4f83
ret ret
; 4fb2 ; 4fb2
MobileFn_4fb2: mobile Stubbed_Function4fb2:
ret
ld hl, OBJECT_1D ld hl, OBJECT_1D
add hl, bc add hl, bc
inc [hl] inc [hl]

View File

@ -79,7 +79,7 @@ MapSetupCommands: ; 15440
dba LoadGraphics ; 0e dba LoadGraphics ; 0e
dba LoadTileset ; 0f dba LoadTileset ; 0f
dba LoadMapTimeOfDay ; 10 dba LoadMapTimeOfDay ; 10
dba LoadMapPalettes ; 11 dba Special_LoadMapPalettes ; 11
dba LoadWildMonData ; 12 dba LoadWildMonData ; 12
dba RefreshMapSprites ; 13 dba RefreshMapSprites ; 13
dba HandleNewMap ; 14 dba HandleNewMap ; 14
@ -91,8 +91,8 @@ MapSetupCommands: ; 15440
dba LoadMapAttributes ; 1a dba LoadMapAttributes ; 1a
dba LoadMapAttributes_SkipPeople ; 1b dba LoadMapAttributes_SkipPeople ; 1b
dba ClearBGPalettes ; 1c dba ClearBGPalettes ; 1c
dba FadeOutPalettes ; 1d dba Special_FadeOutPalettes ; 1d
dba FadeInPalettes ; 1e dba Special_FadeInPalettes ; 1e
dba GetCoordOfUpperLeftCorner ; 1f dba GetCoordOfUpperLeftCorner ; 1f
dba RestoreFacingAfterWarp ; 20 dba RestoreFacingAfterWarp ; 20
dba SpawnInFacingDown ; 21 dba SpawnInFacingDown ; 21
@ -137,7 +137,7 @@ LoadObjectsRunCallback_02: ; 154d7
ret ret
; 154ea (5:54ea) ; 154ea (5:54ea)
; unreferenced ; unused
ret ret
; 154eb ; 154eb

View File

@ -443,7 +443,7 @@ GetMartDialogGroup: ; 15ca3
BuyMenuLoop: ; 15cef BuyMenuLoop: ; 15cef
farcall PlaceMoneyTopRight farcall Special_PlaceMoneyTopRight
call UpdateSprites call UpdateSprites
ld hl, MenuDataHeader_Buy ld hl, MenuDataHeader_Buy
call CopyMenuDataHeader call CopyMenuDataHeader
@ -525,7 +525,7 @@ StandardMartAskPurchaseQuantity:
; 15d97 ; 15d97
MartConfirmPurchase: ; 15d97 MartConfirmPurchase: ; 15d97
predef PartyMonItemName predef Predef_PartyMonItemName
ld a, MARTTEXT_COSTS_THIS_MUCH ld a, MARTTEXT_COSTS_THIS_MUCH
call LoadBuyMenuText call LoadBuyMenuText
call YesNoBox call YesNoBox
@ -796,7 +796,7 @@ SellMenu: ; 15eb3
ret ret
; 15ed3 ; 15ed3
.NothingToSell: ; unreferenced .Unreferenced_NothingToSell:
ld hl, .NothingToSellText ld hl, .NothingToSellText
call MenuTextBoxBackup call MenuTextBoxBackup
and a and a
@ -863,7 +863,7 @@ SellMenu: ; 15eb3
ld a, [wMartItemID] ld a, [wMartItemID]
ld hl, NumItems ld hl, NumItems
call TossItem call TossItem
predef PartyMonItemName predef Predef_PartyMonItemName
hlcoord 1, 14 hlcoord 1, 14
lb bc, 3, 18 lb bc, 3, 18
call ClearBox call ClearBox
@ -891,7 +891,7 @@ Text_Mart_ICanPayThisMuch: ; 0x15f78
db "@" db "@"
; 0x15f7d ; 0x15f7d
DummyString ; 15f7d .UnusedString15f7d: ; 15f7d
db "!ダミー!@" db "!ダミー!@"
Text_Mart_HowMayIHelpYou: ; 0x15f83 Text_Mart_HowMayIHelpYou: ; 0x15f83

View File

@ -291,8 +291,7 @@ MobileMenuJoypad: ; 241ba
; 241d5 ; 241d5
Function241d5: ; 241d5 Unreferenced_Function241d5: ; 241d5
; Unreferenced
call Place2DMenuCursor call Place2DMenuCursor
.loop .loop
call Move2DMenuCursor call Move2DMenuCursor
@ -725,8 +724,7 @@ _ExitMenu:: ; 243e8
ret ret
; 24423 ; 24423
Function24423: ; 24423 Unreferenced_Function24423: ; 24423
; Unreferenced
ld a, [VramState] ld a, [VramState]
bit 0, a bit 0, a
ret z ret z

View File

@ -27,7 +27,7 @@ PlaceMenuItemQuantity: ; 0x24ac3
.done .done
ret ret
PlaceMoneyTopRight: ; 24ae8 Special_PlaceMoneyTopRight: ; 24ae8
ld hl, MenuDataHeader_0x24b15 ld hl, MenuDataHeader_0x24b15
call CopyMenuDataHeader call CopyMenuDataHeader
jr PlaceMoneyDataHeader jr PlaceMoneyDataHeader
@ -110,8 +110,8 @@ CoinString: ; 24b89
ShowMoney_TerminatorString: ; 24b8e ShowMoney_TerminatorString: ; 24b8e
db "@" db "@"
Function24b8f: ; 24b8f Unreferenced_Function24b8f: ; 24b8f
; unreferenced, related to safari? ; related to safari?
ld hl, Options ld hl, Options
ld a, [hl] ld a, [hl]
push af push af

View File

@ -281,8 +281,7 @@ FlyFunction_GetMonIcon: ; 8e9bc (23:69bc)
ret ret
; 8e9cc (23:69cc) ; 8e9cc (23:69cc)
GetMonIcon2: ; 8e9cc Unreferenced_GetMonIcon2: ; 8e9cc
; unreferenced
push de push de
ld a, [wd265] ld a, [wd265]
call ReadMonMenuIcon call ReadMonMenuIcon

View File

@ -1,8 +1,8 @@
DrawPlayerHP: ; 50b0a Predef_DrawPlayerHP: ; 50b0a
ld a, $1 ld a, $1
jr DrawHP jr DrawHP
DrawEnemyHP: ; 50b0e Predef_DrawEnemyHP: ; 50b0e
ld a, $2 ld a, $2
DrawHP: ; 50b10 DrawHP: ; 50b10
@ -43,7 +43,7 @@ DrawHP: ; 50b10
ld c, e ld c, e
.not_boxmon .not_boxmon
predef ComputeHPBarPixels predef Predef_ComputeHPBarPixels
ld a, 6 ld a, 6
ld d, a ld d, a
ld c, a ld c, a
@ -82,7 +82,7 @@ DrawHP: ; 50b10
pop de pop de
ret ret
PrintTempMonStats: ; 50b7b Predef_PrintTempMonStats: ; 50b7b
; Print TempMon's stats at hl, with spacing bc. ; Print TempMon's stats at hl, with spacing bc.
push bc push bc
push hl push hl
@ -121,7 +121,7 @@ PrintTempMonStats: ; 50b7b
next "SPEED" next "SPEED"
next "@" next "@"
GetGender: ; 50bdd Predef_GetGender: ; 50bdd
; Return the gender of a given monster (CurPartyMon/CurOTMon/CurWildMon). ; Return the gender of a given monster (CurPartyMon/CurOTMon/CurWildMon).
; When calling this function, a should be set to an appropriate MonType value. ; When calling this function, a should be set to an appropriate MonType value.
@ -235,7 +235,7 @@ GetGender: ; 50bdd
scf scf
ret ret
ListMovePP: ; 50c50 Predef_ListMovePP: ; 50c50
ld a, [wNumMoves] ld a, [wNumMoves]
inc a inc a
ld c, a ld c, a
@ -324,8 +324,7 @@ ListMovePP: ; 50c50
jr nz, .load_loop jr nz, .load_loop
ret ret
Function50cd0: ; 50cd0 Unreferenced_Function50cd0: ; 50cd0
; XXX
.loop .loop
ld [hl], $32 ld [hl], $32
inc hl inc hl
@ -336,7 +335,7 @@ Function50cd0: ; 50cd0
jr nz, .loop jr nz, .loop
ret ret
Predef22: ; unreferenced predef UnusedPredef22:
push hl push hl
push hl push hl
ld hl, PartyMonNicknames ld hl, PartyMonNicknames
@ -344,7 +343,7 @@ Predef22: ; unreferenced predef
call GetNick call GetNick
pop hl pop hl
call PlaceString call PlaceString
call CopyPkmnToTempMon call Predef_CopyPkmnToTempMon
pop hl pop hl
ld a, [CurPartySpecies] ld a, [CurPartySpecies]
cp EGG cp EGG
@ -353,7 +352,7 @@ Predef22: ; unreferenced predef
ld bc, -12 ld bc, -12
add hl, bc add hl, bc
ld b, $0 ld b, $0
call DrawEnemyHP call Predef_DrawEnemyHP
pop hl pop hl
ld bc, 5 ld bc, 5
add hl, bc add hl, bc
@ -364,7 +363,7 @@ Predef22: ; unreferenced predef
.egg .egg
ret ret
PlaceStatusString: ; 50d0a Predef_PlaceStatusString: ; 50d0a
push de push de
inc de inc de
inc de inc de
@ -374,7 +373,7 @@ PlaceStatusString: ; 50d0a
ld a, [de] ld a, [de]
or b or b
pop de pop de
jr nz, PlaceNonFaintStatus jr nz, Predef_PlaceNonFaintStatus
push de push de
ld de, FntString ld de, FntString
call CopyStatusString call CopyStatusString
@ -397,7 +396,7 @@ CopyStatusString: ; 50d25
ld [hl], a ld [hl], a
ret ret
PlaceNonFaintStatus: ; 50d2e Predef_PlaceNonFaintStatus: ; 50d2e
push de push de
ld a, [de] ld a, [de]
ld de, PsnString ld de, PsnString
@ -431,7 +430,7 @@ BrnString: db "BRN@"
FrzString: db "FRZ@" FrzString: db "FRZ@"
ParString: db "PAR@" ParString: db "PAR@"
ListMoves: ; 50d6f Predef_ListMoves: ; 50d6f
; List moves at hl, spaced every [Buffer1] tiles. ; List moves at hl, spaced every [Buffer1] tiles.
ld de, wListMoves_MoveIndicesBuffer ld de, wListMoves_MoveIndicesBuffer
ld b, $0 ld b, $0

View File

@ -1,4 +1,4 @@
TryAddMonToParty: ; d88c Predef_TryAddMonToParty: ; d88c
; Check if to copy wild Pkmn or generate new Pkmn ; Check if to copy wild Pkmn or generate new Pkmn
; Whose is it? ; Whose is it?
ld de, PartyCount ld de, PartyCount
@ -120,7 +120,7 @@ GeneratePartyMonStats: ; d906
endr endr
ld [hl], a ld [hl], a
ld [Buffer1], a ld [Buffer1], a
predef FillMoves predef Predef_FillMoves
.next .next
pop de pop de
@ -195,7 +195,7 @@ endr
push de push de
inc hl inc hl
inc hl inc hl
call FillPP call Predef_FillPP
pop de pop de
pop hl pop hl
rept 4 rept 4
@ -224,7 +224,7 @@ endr
ld a, $1 ld a, $1
ld c, a ld c, a
ld b, FALSE ld b, FALSE
call CalcPkmnStatC call Predef_CalcPkmnStatC
ld a, [hProduct + 2] ld a, [hProduct + 2]
ld [de], a ld [de], a
inc de inc de
@ -297,7 +297,7 @@ endr
ld bc, MON_STAT_EXP - 1 ld bc, MON_STAT_EXP - 1
add hl, bc add hl, bc
ld b, $0 ; if b = 1, then stat calculation takes stat exp into account. ld b, $0 ; if b = 1, then stat calculation takes stat exp into account.
call CalcPkmnStats call Predef_CalcPkmnStats
.next3 .next3
ld a, [MonType] ld a, [MonType]
@ -311,7 +311,7 @@ endr
dec a dec a
ld bc, PARTYMON_STRUCT_LENGTH ld bc, PARTYMON_STRUCT_LENGTH
call AddNTimes call AddNTimes
predef GetUnownLetter predef Predef_GetUnownLetter
callfar UpdateUnownDex callfar UpdateUnownDex
.done .done
@ -319,7 +319,7 @@ endr
ret ret
; da6d ; da6d
FillPP: ; da6d Predef_FillPP: ; da6d
push bc push bc
ld b, NUM_MOVES ld b, NUM_MOVES
.loop .loop
@ -350,7 +350,7 @@ FillPP: ; da6d
ret ret
; da96 ; da96
AddTempmonToParty: ; da96 Predef_AddTempmonToParty: ; da96
ld hl, PartyCount ld hl, PartyCount
ld a, [hl] ld a, [hl]
cp PARTY_LENGTH cp PARTY_LENGTH
@ -422,7 +422,7 @@ AddTempmonToParty: ; da96
dec a dec a
ld bc, PARTYMON_STRUCT_LENGTH ld bc, PARTYMON_STRUCT_LENGTH
call AddNTimes call AddNTimes
predef GetUnownLetter predef Predef_GetUnownLetter
callfar UpdateUnownDex callfar UpdateUnownDex
ld a, [wFirstUnownSeen] ld a, [wFirstUnownSeen]
and a and a
@ -434,7 +434,7 @@ AddTempmonToParty: ; da96
and a and a
ret ret
SentGetPkmnIntoFromBox: ; db3f Predef_SendGetPkmnIntoFromBox: ; db3f
; Sents/Gets Pkmn into/from Box depending on Parameter ; Sents/Gets Pkmn into/from Box depending on Parameter
; wPokemonWithdrawDepositParameter == 0: get Pkmn into Party ; wPokemonWithdrawDepositParameter == 0: get Pkmn into Party
; wPokemonWithdrawDepositParameter == 1: sent Pkmn into Box ; wPokemonWithdrawDepositParameter == 1: sent Pkmn into Box
@ -597,7 +597,7 @@ SentGetPkmnIntoFromBox: ; db3f
srl a srl a
add $2 add $2
ld [MonType], a ld [MonType], a
predef CopyPkmnToTempMon predef Predef_CopyPkmnToTempMon
callfar CalcLevel callfar CalcLevel
ld a, d ld a, d
ld [CurPartyLevel], a ld [CurPartyLevel], a
@ -617,7 +617,7 @@ SentGetPkmnIntoFromBox: ; db3f
push bc push bc
ld b, $1 ld b, $1
call CalcPkmnStats call Predef_CalcPkmnStats
pop bc pop bc
ld a, [wPokemonWithdrawDepositParameter] ld a, [wPokemonWithdrawDepositParameter]
@ -830,7 +830,7 @@ Functiondd64: ; dd64
add hl, bc add hl, bc
push bc push bc
ld b, $1 ld b, $1
call CalcPkmnStats call Predef_CalcPkmnStats
ld hl, PartyMon1Moves ld hl, PartyMon1Moves
ld a, [PartyCount] ld a, [PartyCount]
dec a dec a
@ -840,7 +840,7 @@ Functiondd64: ; dd64
ld e, l ld e, l
ld a, $1 ld a, $1
ld [Buffer1], a ld [Buffer1], a
predef FillMoves predef Predef_FillMoves
ld a, [PartyCount] ld a, [PartyCount]
dec a dec a
ld [CurPartyMon], a ld [CurPartyMon], a
@ -904,8 +904,8 @@ DepositBreedmon: ; de44
ld bc, BOXMON_STRUCT_LENGTH ld bc, BOXMON_STRUCT_LENGTH
jp CopyBytes jp CopyBytes
SentPkmnIntoBox: ; de6e Predef_SendPkmnIntoBox: ; de6e
; Sents the Pkmn into one of Bills Boxes ; Sends the Pkmn into one of Bills Boxes
; the data comes mainly from 'EnemyMon:' ; the data comes mainly from 'EnemyMon:'
ld a, BANK(sBoxCount) ld a, BANK(sBoxCount)
call GetSRAMBank call GetSRAMBank
@ -1010,7 +1010,7 @@ SentPkmnIntoBox: ; de6e
cp UNOWN cp UNOWN
jr nz, .not_unown jr nz, .not_unown
ld hl, sBoxMon1DVs ld hl, sBoxMon1DVs
predef GetUnownLetter predef Predef_GetUnownLetter
callfar UpdateUnownDex callfar UpdateUnownDex
.not_unown .not_unown
@ -1086,7 +1086,7 @@ ShiftBoxMon: ; df47
ret ret
; df8c ; df8c
GiveEgg:: ; df8c Predef_GiveEgg:: ; df8c
ld a, [CurPartySpecies] ld a, [CurPartySpecies]
push af push af
callfar GetPreEvolution callfar GetPreEvolution
@ -1094,7 +1094,7 @@ GiveEgg:: ; df8c
ld a, [CurPartySpecies] ld a, [CurPartySpecies]
dec a dec a
; TryAddMonToParty sets Seen and Caught flags ; Predef_TryAddMonToParty sets Seen and Caught flags
; when it is successful. This routine will make ; when it is successful. This routine will make
; sure that we aren't newly setting flags. ; sure that we aren't newly setting flags.
push af push af
@ -1104,11 +1104,11 @@ GiveEgg:: ; df8c
call CheckSeenMon call CheckSeenMon
push bc push bc
call TryAddMonToParty call Predef_TryAddMonToParty
; If we haven't caught this Pokemon before receiving ; If we haven't caught this Pokemon before receiving
; the Egg, reset the flag that was just set by ; the Egg, reset the flag that was just set by
; TryAddMonToParty. ; Predef_TryAddMonToParty.
pop bc pop bc
ld a, c ld a, c
and a and a
@ -1119,12 +1119,12 @@ GiveEgg:: ; df8c
ld d, $0 ld d, $0
ld hl, PokedexCaught ld hl, PokedexCaught
ld b, RESET_FLAG ld b, RESET_FLAG
predef FlagPredef predef Predef_SmallFarFlagAction
.skip_caught_flag .skip_caught_flag
; If we haven't seen this Pokemon before receiving ; If we haven't seen this Pokemon before receiving
; the Egg, reset the flag that was just set by ; the Egg, reset the flag that was just set by
; TryAddMonToParty. ; Predef_TryAddMonToParty.
pop bc pop bc
ld a, c ld a, c
and a and a
@ -1135,7 +1135,7 @@ GiveEgg:: ; df8c
ld d, $0 ld d, $0
ld hl, PokedexSeen ld hl, PokedexSeen
ld b, RESET_FLAG ld b, RESET_FLAG
predef FlagPredef predef Predef_SmallFarFlagAction
.skip_seen_flag .skip_seen_flag
pop af pop af
@ -1360,7 +1360,7 @@ ComputeNPCTrademonStats: ; e134
ld a, MON_STAT_EXP - 1 ld a, MON_STAT_EXP - 1
call GetPartyParamLocation call GetPartyParamLocation
ld b, $1 ld b, $1
call CalcPkmnStats call Predef_CalcPkmnStats
pop de pop de
ld a, MON_HP ld a, MON_HP
call GetPartyParamLocation call GetPartyParamLocation
@ -1372,7 +1372,7 @@ ComputeNPCTrademonStats: ; e134
ret ret
; e167 ; e167
CalcPkmnStats: ; e167 Predef_CalcPkmnStats: ; e167
; Calculates all 6 Stats of a Pkmn ; Calculates all 6 Stats of a Pkmn
; b: Take into account stat EXP if TRUE ; b: Take into account stat EXP if TRUE
; 'c' counts from 1-6 and points with 'BaseStats' to the base value ; 'c' counts from 1-6 and points with 'BaseStats' to the base value
@ -1382,7 +1382,7 @@ CalcPkmnStats: ; e167
ld c, $0 ld c, $0
.loop .loop
inc c inc c
call CalcPkmnStatC call Predef_CalcPkmnStatC
ld a, [hMultiplicand + 1] ld a, [hMultiplicand + 1]
ld [de], a ld [de], a
inc de inc de
@ -1395,7 +1395,7 @@ CalcPkmnStats: ; e167
ret ret
; e17b ; e17b
CalcPkmnStatC: ; e17b Predef_CalcPkmnStatC: ; e17b
; 'c' is 1-6 and points to the BaseStat ; 'c' is 1-6 and points to the BaseStat
; 1: HP ; 1: HP
; 2: Attack ; 2: Attack
@ -1596,7 +1596,7 @@ GivePoke:: ; e277
push bc push bc
xor a ; PARTYMON xor a ; PARTYMON
ld [MonType], a ld [MonType], a
call TryAddMonToParty call Predef_TryAddMonToParty
jr nc, .failed jr nc, .failed
ld hl, PartyMonNicknames ld hl, PartyMonNicknames
ld a, [PartyCount] ld a, [PartyCount]
@ -1626,7 +1626,7 @@ GivePoke:: ; e277
ld a, [CurPartySpecies] ld a, [CurPartySpecies]
ld [TempEnemyMonSpecies], a ld [TempEnemyMonSpecies], a
callfar LoadEnemyMon callfar LoadEnemyMon
call SentPkmnIntoBox call Predef_SendPkmnIntoBox
jp nc, .FailedToGiveMon jp nc, .FailedToGiveMon
ld a, BOXMON ld a, BOXMON
ld [MonType], a ld [MonType], a
@ -1795,7 +1795,7 @@ InitNickname: ; e3de
pop hl pop hl
ld de, StringBuffer1 ld de, StringBuffer1
call InitName call InitName
ld a, $4 ; XXX could this be in bank 4 in pokered? ld a, $4 ; ExitAllMenus is in bank 0, XXX could this be in bank 4 in pokered?
ld hl, ExitAllMenus ld hl, ExitAllMenus
rst FarCall rst FarCall
ret ret

View File

@ -63,7 +63,7 @@ DoMysteryGift: ; 1048ba (41:48ba)
jr z, .skip_append_save jr z, .skip_append_save
call .SaveMysteryGiftTrainerName call .SaveMysteryGiftTrainerName
farcall RestoreMobileEventIndex farcall RestoreMobileEventIndex
farcall TrainerRankings_MysteryGift farcall StubbedTrainerRankings_MysteryGift
farcall BackupMobileEventIndex farcall BackupMobileEventIndex
.skip_append_save .skip_append_save
ld a, [wMysteryGiftPartnerSentDeco] ld a, [wMysteryGiftPartnerSentDeco]
@ -1117,7 +1117,7 @@ MysteryGift_CheckAndSetDecorationAlreadyReceived: ; 105069 (41:5069)
ld d, $0 ld d, $0
ld b, CHECK_FLAG ld b, CHECK_FLAG
ld hl, sMysteryGiftDecorationsReceived ld hl, sMysteryGiftDecorationsReceived
predef_id FlagPredef predef_id Predef_SmallFarFlagAction
push hl push hl
push bc push bc
call Predef call Predef
@ -1129,7 +1129,7 @@ MysteryGift_CheckAndSetDecorationAlreadyReceived: ; 105069 (41:5069)
ret nz ret nz
call GetMysteryGiftBank call GetMysteryGiftBank
ld b, SET_FLAG ld b, SET_FLAG
predef FlagPredef predef Predef_SmallFarFlagAction
call CloseSRAM call CloseSRAM
xor a xor a
ret ret
@ -1142,7 +1142,7 @@ MysteryGift_CopyReceivedDecosToPC: ; 105091 (41:5091)
ld d, $0 ld d, $0
ld b, CHECK_FLAG ld b, CHECK_FLAG
ld hl, sMysteryGiftDecorationsReceived ld hl, sMysteryGiftDecorationsReceived
predef FlagPredef predef Predef_SmallFarFlagAction
ld a, c ld a, c
and a and a
pop bc pop bc
@ -1369,7 +1369,7 @@ InitMysteryGiftLayout: ; 105153 (41:5153)
jr .gfx_loop jr .gfx_loop
; 105232 (41:5232) ; 105232 (41:5232)
.Load6GFX: ; unreferenced .Unreferenced_Load6GFX:
ld b, 6 ld b, 6
jr .gfx_loop jr .gfx_loop

View File

@ -109,7 +109,7 @@ NamingScreen: ; 116c1
inc de inc de
hlcoord 5, 4 hlcoord 5, 4
call PlaceString call PlaceString
farcall GetGender farcall Predef_GetGender
jr c, .genderless jr c, .genderless
ld a, "♂" ld a, "♂"
jr nz, .place_gender jr nz, .place_gender
@ -745,7 +745,7 @@ NamingScreen_AdvanceCursor_CheckEndOfString: ; 11b27
; 11b39 (4:5b39) ; 11b39 (4:5b39)
; XXX ; unused
ld a, [wNamingScreenCurrNameLength] ld a, [wNamingScreenCurrNameLength]
and a and a
ret z ret z
@ -1043,7 +1043,7 @@ INCBIN "gfx/icons/mail2.2bpp"
; 11f7a (4:5f7a) ; 11f7a (4:5f7a)
.Dummy: ; dummied out .UnusedString11f7a:
db "メールを かいてね@" db "メールを かいてね@"
; 11f84 ; 11f84
@ -1426,7 +1426,7 @@ MailComposition_TryAddLastCharacter: ; 121ac (4:61ac)
; 121b2 (4:61b2) ; 121b2 (4:61b2)
; XXX ; unused
ld a, [wNamingScreenCurrNameLength] ld a, [wNamingScreenCurrNameLength]
and a and a
ret z ret z

View File

@ -279,7 +279,7 @@ WillObjectBumpIntoSomeoneElse: ; 7009
jr IsNPCAtCoord jr IsNPCAtCoord
; 7015 ; 7015
Function7015: ; unreferenced Unreferenced_Function7015:
ld a, [hMapObjectIndexBuffer] ld a, [hMapObjectIndexBuffer]
call GetObjectStruct call GetObjectStruct
call .CheckWillBeFacingNPC call .CheckWillBeFacingNPC
@ -482,7 +482,7 @@ IsObjectMovingOffEdgeOfScreen: ; 70ed
ret ret
; 7113 ; 7113
Function7113: ; unreferenced Unreferenced_Function7113:
ld a, [PlayerStandingMapX] ld a, [PlayerStandingMapX]
ld d, a ld d, a
ld a, [PlayerStandingMapY] ld a, [PlayerStandingMapY]

View File

@ -59,7 +59,7 @@ NPCTrade:: ; fcba8
push af push af
ld a, [wcf64] ld a, [wcf64]
push af push af
predef TradeAnimation predef Predef_TradeAnimation
pop af pop af
ld [wcf64], a ld [wcf64], a
pop af pop af
@ -80,12 +80,12 @@ CheckTradeGender: ; fcc23
cp TRADE_MALE_ONLY cp TRADE_MALE_ONLY
jr z, .check_male jr z, .check_male
farcall GetGender farcall Predef_GetGender
jr nz, .not_matching jr nz, .not_matching
jr .matching jr .matching
.check_male .check_male
farcall GetGender farcall Predef_GetGender
jr z, .not_matching jr z, .not_matching
.matching .matching
@ -101,7 +101,7 @@ TradeFlagAction: ; fcc4a
ld hl, wTradeFlags ld hl, wTradeFlags
ld a, [wJumptableIndex] ld a, [wJumptableIndex]
ld c, a ld c, a
predef FlagPredef predef Predef_SmallFarFlagAction
ld a, c ld a, c
and a and a
ret ret
@ -188,7 +188,7 @@ DoNPCTrade: ; fcc63
ld [MonType], a ld [MonType], a
ld [wPokemonWithdrawDepositParameter], a ld [wPokemonWithdrawDepositParameter], a
callfar RemoveMonFromPartyOrBox callfar RemoveMonFromPartyOrBox
predef TryAddMonToParty predef Predef_TryAddMonToParty
ld e, TRADE_DIALOG ld e, TRADE_DIALOG
call GetTradeAttribute call GetTradeAttribute
@ -324,8 +324,7 @@ CopyTradeName: ; fcdf4
ret ret
; fcdfb ; fcdfb
Functionfcdfb: ; fcdfb Unreferenced_Functionfcdfb: ; fcdfb
; unreferenced
ld bc, 4 ld bc, 4
call CopyBytes call CopyBytes
ld a, "@" ld a, "@"
@ -333,8 +332,7 @@ Functionfcdfb: ; fcdfb
ret ret
; fce05 ; fce05
Functionfce05: ; fce05 Unreferenced_Functionfce05: ; fce05
; unreferenced
ld bc, 3 ld bc, 3
call CopyBytes call CopyBytes
ld a, "@" ld a, "@"

View File

@ -23,7 +23,7 @@ Function14146: ; mobile
push af push af
res 7, [hl] res 7, [hl]
set 6, [hl] set 6, [hl]
call MapCallbackSprites_LoadUsedSpritesGFX call Special_LoadUsedSpritesGFX
pop af pop af
ld [wSpriteFlags], a ld [wSpriteFlags], a
ret ret
@ -35,15 +35,15 @@ Function14157: ; mobile
push af push af
set 7, [hl] set 7, [hl]
res 6, [hl] res 6, [hl]
call MapCallbackSprites_LoadUsedSpritesGFX call Special_LoadUsedSpritesGFX
pop af pop af
ld [wSpriteFlags], a ld [wSpriteFlags], a
ret ret
; 14168 ; 14168
RefreshSprites:: ; 14168 Special_RefreshSprites:: ; 14168
call .Refresh call .Refresh
call MapCallbackSprites_LoadUsedSpritesGFX call Special_LoadUsedSpritesGFX
ret ret
; 1416f ; 1416f
@ -164,7 +164,7 @@ AddOutdoorSprites: ; 141ee
; 14209 ; 14209
MapCallbackSprites_LoadUsedSpritesGFX: ; 14209 Special_LoadUsedSpritesGFX: ; 14209
ld a, MAPCALLBACK_SPRITES ld a, MAPCALLBACK_SPRITES
call RunMapCallback call RunMapCallback
call GetUsedSprites call GetUsedSprites

View File

@ -534,8 +534,7 @@ TossMenu: ; 10364
ret ret
; 1039d ; 1039d
ResetPocketCursorPositions: ; 1039d Unreferenced_ResetPocketCursorPositions: ; 1039d
; unreferenced
ld a, [wCurrPocket] ld a, [wCurrPocket]
and a ; ITEM_POCKET and a ; ITEM_POCKET
jr z, .items jr z, .items
@ -1514,8 +1513,7 @@ Pack_GetItemName: ; 10a1d
ret ret
; 10a2a ; 10a2a
Pack_ClearTilemap: ; 10a2a Unreferenced_Pack_ClearTilemap: ; 10a2a
; unreferenced
hlcoord 0, 0 hlcoord 0, 0
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
ld a, " " ld a, " "

View File

@ -189,7 +189,7 @@ PlacePartymonHPBar: ; 50117
ld d, a ld d, a
ld a, [hli] ld a, [hli]
ld e, a ld e, a
predef ComputeHPBarPixels predef Predef_ComputeHPBarPixels
ret ret
; 50138 ; 50138
@ -298,7 +298,7 @@ PlacePartyMonStatus: ; 501b2
ld e, l ld e, l
ld d, h ld d, h
pop hl pop hl
call PlaceStatusString call Predef_PlaceStatusString
.next .next
pop hl pop hl
@ -330,7 +330,7 @@ PlacePartyMonTMHMCompatibility: ; 501e0
add hl, de add hl, de
ld a, [hl] ld a, [hl]
ld [CurPartySpecies], a ld [CurPartySpecies], a
predef CanLearnTMHMMove predef Predef_CanLearnTMHMMove
pop hl pop hl
call .PlaceAbleNotAble call .PlaceAbleNotAble
call PlaceString call PlaceString
@ -469,7 +469,7 @@ PlacePartyMonGender: ; 502b1
ld [CurPartyMon], a ld [CurPartyMon], a
xor a xor a
ld [MonType], a ld [MonType], a
call GetGender call Predef_GetGender
ld de, .unknown ld de, .unknown
jr c, .got_gender jr c, .got_gender
ld de, .male ld de, .male
@ -800,25 +800,33 @@ PartyMenuStrings: ; 0x504d2
ChooseAMonString: ; 0x504e4 ChooseAMonString: ; 0x504e4
db "Choose a #MON.@" db "Choose a #MON.@"
UseOnWhichPKMNString: ; 0x504f3 UseOnWhichPKMNString: ; 0x504f3
db "Use on which <PK><MN>?@" db "Use on which <PK><MN>?@"
WhichPKMNString: ; 0x50504 WhichPKMNString: ; 0x50504
db "Which <PK><MN>?@" db "Which <PK><MN>?@"
TeachWhichPKMNString: ; 0x5050e TeachWhichPKMNString: ; 0x5050e
db "Teach which <PK><MN>?@" db "Teach which <PK><MN>?@"
MoveToWhereString: ; 0x5051e MoveToWhereString: ; 0x5051e
db "Move to where?@" db "Move to where?@"
ChooseAFemalePKMNString: ; 0x5052d ; UNUSED
ChooseAFemalePKMNString: ; 0x5052d
; unused
db "Choose a ♀<PK><MN>.@" db "Choose a ♀<PK><MN>.@"
ChooseAMalePKMNString: ; 0x5053b ; UNUSED
ChooseAMalePKMNString: ; 0x5053b
; unused
db "Choose a ♂<PK><MN>.@" db "Choose a ♂<PK><MN>.@"
ToWhichPKMNString: ; 0x50549 ToWhichPKMNString: ; 0x50549
db "To which <PK><MN>?@" db "To which <PK><MN>?@"
YouHaveNoPKMNString: ; 0x50556 YouHaveNoPKMNString: ; 0x50556
db "You have no <PK><MN>!@" db "You have no <PK><MN>!@"
PrintPartyMenuActionText: ; 50566 PrintPartyMenuActionText: ; 50566
ld a, [CurPartyMon] ld a, [CurPartyMon]
ld hl, PartyMonNicknames ld hl, PartyMonNicknames

View File

@ -1240,7 +1240,7 @@ PhoneScript_Generic_Female:
end end
PhoneScript_MonFlavorText: PhoneScript_MonFlavorText:
special RandomPhoneMon special Special_RandomPhoneMon
farscall PhoneScript_Random2 farscall PhoneScript_Random2
if_equal $0, .TooEnergetic if_equal $0, .TooEnergetic
farwritetext UnknownText_0x1b518b farwritetext UnknownText_0x1b518b

View File

@ -469,7 +469,7 @@ UnknownScript_0x90261: ; 0x90261
RingTwice_StartCall: ; 9026f RingTwice_StartCall: ; 9026f
call .Ring call .Ring
call .Ring call .Ring
farcall TrainerRankings_PhoneCalls farcall StubbedTrainerRankings_PhoneCalls
ret ret
; 9027c ; 9027c
@ -498,7 +498,7 @@ PhoneCall:: ; 9029a
ld [PhoneCaller + 1], a ld [PhoneCaller + 1], a
call Phone_FirstOfTwoRings call Phone_FirstOfTwoRings
call Phone_FirstOfTwoRings call Phone_FirstOfTwoRings
farcall TrainerRankings_PhoneCalls farcall StubbedTrainerRankings_PhoneCalls
ret ret
; 902b3 ; 902b3

View File

@ -1,5 +1,5 @@
Phone_GenericCall_Male: Phone_GenericCall_Male:
special RandomPhoneMon special Special_RandomPhoneMon
farscall PhoneScript_Random2 farscall PhoneScript_Random2
if_equal 0, .Bragging if_equal 0, .Bragging
farscall PhoneScript_Generic_Male farscall PhoneScript_Generic_Male
@ -9,7 +9,7 @@ Phone_GenericCall_Male:
farjump Phone_BraggingCall_Male farjump Phone_BraggingCall_Male
Phone_GenericCall_Female: Phone_GenericCall_Female:
special RandomPhoneMon special Special_RandomPhoneMon
farscall PhoneScript_Random2 farscall PhoneScript_Random2
if_equal 0, .Bragging if_equal 0, .Bragging
farscall PhoneScript_Generic_Female farscall PhoneScript_Generic_Female
@ -27,7 +27,7 @@ Phone_BraggingCall_Female:
farjump Phone_FoundAMon_Female farjump Phone_FoundAMon_Female
Phone_FoundAMon_Male: Phone_FoundAMon_Male:
special RandomPhoneWildMon special Special_RandomPhoneWildMon
farscall PhoneScript_Random2 farscall PhoneScript_Random2
if_equal 0, .GotAway if_equal 0, .GotAway
farscall Phone_WhoDefeatedMon_Male farscall Phone_WhoDefeatedMon_Male
@ -37,7 +37,7 @@ Phone_FoundAMon_Male:
farjump Phone_GotAwayCall_Male farjump Phone_GotAwayCall_Male
Phone_FoundAMon_Female: Phone_FoundAMon_Female:
special RandomPhoneWildMon special Special_RandomPhoneWildMon
farscall PhoneScript_Random2 farscall PhoneScript_Random2
if_equal 0, .GotAway if_equal 0, .GotAway
farscall Phone_WhoDefeatedMon_Female farscall Phone_WhoDefeatedMon_Female
@ -851,7 +851,7 @@ Phone_CheckIfUnseenRare_Female:
farjump PhoneScript_HangupText_Female farjump PhoneScript_HangupText_Female
PhoneScriptRareWildMon: PhoneScriptRareWildMon:
special RandomUnseenWildMon special Special_RandomUnseenWildMon
end end
PhoneScript_BugCatchingContest: PhoneScript_BugCatchingContest:

View File

@ -392,7 +392,7 @@ HueyPhoneScript1:
iftrue HueyWednesdayNight iftrue HueyWednesdayNight
.NotWednesday: .NotWednesday:
special RandomPhoneMon special Special_RandomPhoneMon
farjump UnknownScript_0xa0908 farjump UnknownScript_0xa0908
.WantsBattle: .WantsBattle:
@ -629,7 +629,7 @@ JoeyPhoneScript1:
iftrue JoeyMondayAfternoon iftrue JoeyMondayAfternoon
.NotMonday: .NotMonday:
special RandomPhoneMon special Special_RandomPhoneMon
farjump UnknownScript_0xa0930 farjump UnknownScript_0xa0930
.WantsBattle: .WantsBattle:
@ -851,7 +851,7 @@ LizPhoneScript1:
iftrue LizThursdayAfternoon iftrue LizThursdayAfternoon
.NotThursday: .NotThursday:
special RandomPhoneMon special Special_RandomPhoneMon
farjump UnknownScript_0xa0948 farjump UnknownScript_0xa0948
.WantsBattle: .WantsBattle:

View File

@ -1,54 +1,54 @@
; Pic animation arrangement. ; Pic animation arrangement.
AnimateMon_Slow_Normal: ; d0000 UnusedPredef_AnimateMon_Slow_Normal: ; d0000
hlcoord 12, 0 hlcoord 12, 0
ld a, [wBattleMode] ld a, [wBattleMode]
cp WILD_BATTLE cp WILD_BATTLE
jr z, .wild jr z, .wild
ld e, ANIM_MON_SLOW ld e, ANIM_MON_SLOW
ld d, $0 ld d, $0
call AnimateFrontpic call Predef_AnimateFrontpic
ret ret
.wild .wild
ld e, ANIM_MON_NORMAL ld e, ANIM_MON_NORMAL
ld d, $0 ld d, $0
call AnimateFrontpic call Predef_AnimateFrontpic
ret ret
; d001a ; d001a
AnimateMon_Menu: ; d001a AnimateMon_Menu: ; d001a
ld e, ANIM_MON_MENU ld e, ANIM_MON_MENU
ld d, $0 ld d, $0
call AnimateFrontpic call Predef_AnimateFrontpic
ret ret
; d0022 ; d0022
AnimateMon_Trade: ; d0022 AnimateMon_Trade: ; d0022
ld e, ANIM_MON_TRADE ld e, ANIM_MON_TRADE
ld d, $0 ld d, $0
call AnimateFrontpic call Predef_AnimateFrontpic
ret ret
; d002a ; d002a
AnimateMon_Evolve: ; d002a AnimateMon_Evolve: ; d002a
ld e, ANIM_MON_EVOLVE ld e, ANIM_MON_EVOLVE
ld d, $0 ld d, $0
call AnimateFrontpic call Predef_AnimateFrontpic
ret ret
; d0032 ; d0032
AnimateMon_Hatch: ; d0032 AnimateMon_Hatch: ; d0032
ld e, ANIM_MON_HATCH ld e, ANIM_MON_HATCH
ld d, $0 ld d, $0
call AnimateFrontpic call Predef_AnimateFrontpic
ret ret
; d003a ; d003a
AnimateMon_Unused: ; d003a AnimateMon_Unused: ; d003a
ld e, ANIM_MON_UNUSED ld e, ANIM_MON_UNUSED
ld d, $0 ld d, $0
call AnimateFrontpic call Predef_AnimateFrontpic
ret ret
; d0042 ; d0042
@ -86,10 +86,10 @@ PokeAnims: ; d0042
.Egg2: pokeanim Idle, Play .Egg2: pokeanim Idle, Play
AnimateFrontpic: ; d008e Predef_AnimateFrontpic: ; d008e
call AnimateMon_CheckIfPokemon call AnimateMon_CheckIfPokemon
ret c ret c
call LoadMonAnimation call Predef_LoadMonAnimation
.loop .loop
call SetUpPokeAnim call SetUpPokeAnim
push af push af
@ -99,7 +99,7 @@ AnimateFrontpic: ; d008e
ret ret
; d00a3 ; d00a3
LoadMonAnimation: ; d00a3 Predef_LoadMonAnimation: ; d00a3
push hl push hl
ld c, e ld c, e
ld b, 0 ld b, 0
@ -695,7 +695,7 @@ PokeAnim_ConvertAndApplyBitmask: ; d036b
ret ret
; d03f4 ; d03f4
; XXX ; unused
db 6, 5, 4 db 6, 5, 4
.GetTilemap: ; d03f7 .GetTilemap: ; d03f7
@ -1110,10 +1110,11 @@ PokeAnim_GetSpeciesOrUnown: ; d065c
ret ret
; d0669 ; d0669
Predef48: ; d0669 Predef 48 UnusedPredef48: ; d0669 Predef 48
ld a, $1 ld a, $1
ld [wBoxAlignment], a ld [wBoxAlignment], a
HOF_AnimateFrontpic: ; d066e Predef 49
HOF_Predef_AnimateFrontpic: ; d066e Predef 49
call AnimateMon_CheckIfPokemon call AnimateMon_CheckIfPokemon
jr c, .fail jr c, .fail
ld h, d ld h, d
@ -1121,12 +1122,12 @@ HOF_AnimateFrontpic: ; d066e Predef 49
push bc push bc
push hl push hl
ld de, vTiles2 ld de, vTiles2
predef GetAnimatedFrontpicPredef predef Predef_GetAnimatedFrontpic
pop hl pop hl
pop bc pop bc
ld d, 0 ld d, 0
ld e, c ld e, c
call AnimateFrontpic call Predef_AnimateFrontpic
xor a xor a
ld [wBoxAlignment], a ld [wBoxAlignment], a
ret ret

View File

@ -1,5 +1,4 @@
Function88248: ; 88248 Unreferenced_Function88248: ; 88248
; XXX
ld c, CAL ld c, CAL
ld a, [wPlayerGender] ld a, [wPlayerGender]
bit 0, a bit 0, a
@ -31,7 +30,7 @@ MovePlayerPic: ; 88266
xor a xor a
ld [hBGMapMode], a ld [hBGMapMode], a
lb bc, 7, 7 lb bc, 7, 7
predef PlaceGraphic predef Predef_PlaceGraphic
xor a xor a
ld [hBGMapThird], a ld [hBGMapThird], a
call WaitBGMap call WaitBGMap
@ -142,7 +141,7 @@ GetChrisBackpic: ; 88830
ld b, BANK(ChrisBackpic) ld b, BANK(ChrisBackpic)
ld de, vTiles2 tile $31 ld de, vTiles2 tile $31
ld c, 7 * 7 ld c, 7 * 7
predef DecompressPredef predef Predef_Decompress
ret ret
HOF_LoadTrainerFrontpic: ; 88840 HOF_LoadTrainerFrontpic: ; 88840
@ -204,7 +203,7 @@ DrawIntroPlayerPic: ; 88874
ld [hGraphicStartTile], a ld [hGraphicStartTile], a
hlcoord 6, 4 hlcoord 6, 4
lb bc, 7, 7 lb bc, 7, 7
predef PlaceGraphic predef Predef_PlaceGraphic
ret ret
ChrisPic: ; 888a9 ChrisPic: ; 888a9

View File

@ -316,7 +316,7 @@ DoPlayerMovement:: ; 80000
scf scf
ret ret
; unused? ; unused
xor a xor a
ret ret

Some files were not shown because too many files have changed in this diff Show More