Remove Predef_ prefix from routines listed in PredefPointers

This commit is contained in:
Remy Oukaour
2018-01-16 14:30:10 -05:00
parent 2b82338920
commit 8048082114
81 changed files with 530 additions and 527 deletions

View File

@@ -7,79 +7,79 @@ add_predef: MACRO
ENDM ENDM
PredefPointers:: ; 856b PredefPointers:: ; 856b
add_predef Predef_LearnMove ; $0 add_predef LearnMove ; $0
add_predef DummyPredef1 add_predef DummyPredef1
add_predef HealParty ; this is both a special and a predef add_predef HealParty ; this is both a special and a predef
add_predef Predef_SmallFarFlagAction add_predef SmallFarFlagAction
add_predef Predef_ComputeHPBarPixels add_predef ComputeHPBarPixels
add_predef Predef_FillPP add_predef FillPP
add_predef Predef_TryAddMonToParty add_predef TryAddMonToParty
add_predef Predef_AddTempmonToParty add_predef AddTempmonToParty
add_predef Predef_SendGetPkmnIntoFromBox add_predef SendGetPkmnIntoFromBox
add_predef Predef_SendPkmnIntoBox add_predef SendPkmnIntoBox
add_predef Predef_GiveEgg add_predef GiveEgg
add_predef Predef_AnimateHPBar add_predef AnimateHPBar
add_predef Predef_CalcPkmnStats add_predef CalcPkmnStats
add_predef Predef_CalcPkmnStatC add_predef CalcPkmnStatC
add_predef Predef_CanLearnTMHMMove add_predef CanLearnTMHMMove
add_predef Predef_GetTMHMMove add_predef GetTMHMMove
add_predef Predef_LinkTextbox ; $ 10 add_predef LinkTextboxAtHL ; $ 10
add_predef Predef_PrintMoveDesc add_predef PrintMoveDesc
add_predef Predef_UpdatePlayerHUD add_predef UpdatePlayerHUD
add_predef Predef_PlaceGraphic add_predef PlaceGraphic
add_predef Predef_CheckPlayerPartyForFitPkmn add_predef CheckPlayerPartyForFitPkmn
add_predef Predef_UpdateEnemyHUD add_predef UpdateEnemyHUD
add_predef Predef_StartBattle add_predef StartBattle
add_predef Predef_FillInExpBar add_predef FillInExpBar
add_predef Predef_GetBattleMonBackpic ; $18 add_predef GetBattleMonBackpic ; $18
add_predef Predef_GetEnemyMonFrontpic add_predef GetEnemyMonFrontpic
add_predef Predef_LearnLevelMoves add_predef LearnLevelMoves
add_predef Predef_FillMoves add_predef FillMoves
add_predef Predef_EvolveAfterBattle add_predef EvolveAfterBattle
add_predef Predef_TradeAnimationPlayer2 add_predef TradeAnimationPlayer2
add_predef Predef_TradeAnimation add_predef TradeAnimation
add_predef Predef_CopyPkmnToTempMon add_predef CopyPkmnToTempMon
add_predef Predef_ListMoves ; $20 add_predef ListMoves ; $20
add_predef Predef_PlaceNonFaintStatus add_predef PlaceNonFaintStatus
add_predef UnusedPredef22 add_predef Unused_PlaceEnemyHPLevel
add_predef Predef_ListMovePP add_predef ListMovePP
add_predef Predef_GetGender add_predef GetGender
add_predef Predef_StatsScreenInit add_predef StatsScreenInit
add_predef Predef_DrawPlayerHP add_predef DrawPlayerHP
add_predef Predef_DrawEnemyHP add_predef DrawEnemyHP
add_predef Predef_PrintTempMonStats ; $28 add_predef PrintTempMonStats ; $28
add_predef Predef_GetTypeName add_predef GetTypeName
add_predef Predef_PrintMoveType add_predef PrintMoveType
add_predef Predef_PrintType add_predef PrintType
add_predef Predef_PrintMonTypes add_predef PrintMonTypes
add_predef Predef_GetUnownLetter add_predef GetUnownLetter
add_predef Predef_LoadPoisonBGPals add_predef LoadPoisonBGPals
add_predef DummyPredef2F add_predef DummyPredef2F
add_predef Predef_InitSGBBorder ; $30 add_predef InitSGBBorder ; $30
add_predef Predef_LoadSGBLayout add_predef LoadSGBLayout
add_predef Predef_Pokedex_GetArea add_predef Pokedex_GetArea
add_predef UnusedPredef_CheckContestMon add_predef Unused_CheckContestMon
add_predef Predef_DoBattleTransition add_predef DoBattleTransition
add_predef DummyPredef35 add_predef DummyPredef35
add_predef DummyPredef36 add_predef DummyPredef36
add_predef Predef_PlayBattleAnim add_predef PlayBattleAnim
add_predef DummyPredef38 ; $38 add_predef DummyPredef38 ; $38
add_predef DummyPredef39 add_predef DummyPredef39
add_predef DummyPredef3A add_predef DummyPredef3A
add_predef Predef_PartyMonItemName add_predef PartyMonItemName
add_predef Predef_GetMonFrontpic add_predef GetMonFrontpic
add_predef Predef_GetMonBackpic add_predef GetMonBackpic
add_predef Predef_GetAnimatedFrontpic add_predef GetAnimatedFrontpic
add_predef Predef_GetTrainerPic add_predef GetTrainerPic
add_predef Predef_Decompress ; $40 add_predef DecompressGet2bpp ; $40
add_predef Predef_CheckTypeMatchup add_predef CheckTypeMatchup
add_predef Predef_ConvertMon_1to2 add_predef ConvertMon_1to2
add_predef Predef_NewPokedexEntry add_predef NewPokedexEntry
add_predef UnusedPredef_AnimateMon_Slow_Normal add_predef Unused_AnimateMon_Slow_Normal
add_predef Predef_PlaceStatusString add_predef PlaceStatusString
add_predef Predef_LoadMonAnimation add_predef LoadMonAnimation
add_predef Predef_AnimateFrontpic add_predef AnimateFrontpic
add_predef UnusedPredef48 ; $48 add_predef Unused_HOF_AnimateAlignedFrontpic ; $48
add_predef Predef_HOF_AnimateFrontpic add_predef HOF_AnimateFrontpic
dbw -1, InexplicablyEmptyFunction ; ??? dbw -1, InexplicablyEmptyFunction ; ???
; 864c ; 864c

View File

@@ -545,7 +545,7 @@ AI_Items: ; 39196
AIUpdateHUD: ; 38387 AIUpdateHUD: ; 38387
call UpdateEnemyMonInParty call UpdateEnemyMonInParty
farcall Predef_UpdateEnemyHUD farcall 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 Predef_AnimateHPBar 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 Predef_SmallFarFlagAction 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 Predef_CheckTypeMatchup 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 Predef_CheckTypeMatchup call 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 Predef_CheckTypeMatchup call 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 Predef_CheckTypeMatchup call 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 Predef_CheckTypeMatchup call 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 Predef_CheckTypeMatchup call 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 Predef_CheckTypeMatchup call 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 Predef_CheckTypeMatchup call 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 Predef_CheckTypeMatchup call 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 Predef_ComputeHPBarPixels call 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 Predef_ComputeHPBarPixels call 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 Predef_ComputeHPBarPixels is stored ; This routine is buggy. The result from 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 Predef_ComputeHPBarPixels call 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 Predef_ComputeHPBarPixels call 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_DoBattleTransition: ; 8c20f DoBattleTransition: ; 8c20f
call .InitGFX call .InitGFX
ld a, [rBGP] ld a, [rBGP]
ld [wBGP], a ld [wBGP], a

File diff suppressed because it is too large Load Diff

View File

@@ -182,7 +182,7 @@ CheckPlayerTurn:
call StdBattleTextBox call StdBattleTextBox
call CantMove call CantMove
call UpdateBattleMonInParty call UpdateBattleMonInParty
ld hl, Predef_UpdatePlayerHUD ld hl, 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, Predef_UpdateEnemyHUD ld hl, 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, Predef_UpdatePlayerHUD ld hl, UpdatePlayerHUD
call CallBattleCore call CallBattleCore
ld a, $1 ld a, $1
ld [hBGMapMode], a ld [hBGMapMode], a
@@ -1538,11 +1538,11 @@ BattleCheckTypeMatchup: ; 347c8
ld hl, EnemyMonType1 ld hl, EnemyMonType1
ld a, [hBattleTurn] ld a, [hBattleTurn]
and a and a
jr z, Predef_CheckTypeMatchup jr z, CheckTypeMatchup
ld hl, BattleMonType1 ld hl, BattleMonType1
Predef_CheckTypeMatchup: ; 347d3 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 Predef_CheckTypeMatchup (not BattleCheckTypeMatchup), it assumes that placing ; the AI calls CheckTypeMatchup (not BattleCheckTypeMatchup), it assumes that placing
; the 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
@@ -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 Predef_AnimateHPBar 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 Predef_AnimateHPBar 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 Predef_AnimateHPBar 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 Predef_GetTypeName 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 Predef_PlayBattleAnim callfar 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 Predef_AnimateHPBar 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 Predef_AnimateHPBar 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 Predef_AnimateHPBar 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, Predef_GetBattleMonBackpic ld hl, GetBattleMonBackpic
ld a, [hBattleTurn] ld a, [hBattleTurn]
and a and a
jr z, .PlayerTurn jr z, .PlayerTurn
ld hl, Predef_GetEnemyMonFrontpic ld hl, 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 Predef_AnimateHPBar predef AnimateHPBar
call RefreshBattleHuds call RefreshBattleHuds
ld hl, RecoilText ld hl, RecoilText
jp StdBattleTextBox jp StdBattleTextBox
@@ -8227,7 +8227,7 @@ BattleCommand_Conversion: ; 3707f
inc de inc de
ld [de], a ld [de], a
ld [wNamedObjectIndexBuffer], a ld [wNamedObjectIndexBuffer], a
farcall Predef_GetTypeName farcall GetTypeName
call AnimateCurrentMove call AnimateCurrentMove
ld hl, TransformedTypeText ld hl, TransformedTypeText
jp StdBattleTextBox jp StdBattleTextBox
@@ -9856,7 +9856,7 @@ PlayUserBattleAnim: ; 37e47
push hl push hl
push de push de
push bc push bc
callfar Predef_PlayBattleAnim callfar 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 Predef_PlayBattleAnim callfar 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 Predef_GetGender farcall 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 Predef_GetGender farcall 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 Predef_PlaceGraphic 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 Predef_TryAddMonToParty 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 Predef_TryAddMonToParty 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 Predef_TryAddMonToParty 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 Predef_TryAddMonToParty 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 Predef_GetBattleMonBackpic farcall GetBattleMonBackpic
jr .continue jr .continue
.gettutorialbackpic .gettutorialbackpic
farcall GetTrainerBackpic farcall GetTrainerBackpic
.continue .continue
farcall Predef_GetEnemyMonFrontpic farcall 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_DoBattleTransition 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.
Predef_PlayBattleAnim: ; cc0d6 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(Predef_UpdatePlayerHUD) ld a, BANK(UpdatePlayerHUD)
rst FarCall ; Why not "call UpdateBattleHuds"? rst FarCall ; Why not "call UpdateBattleHuds"?
pop af pop af
@@ -928,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 Predef_GetUnownLetter predef GetUnownLetter
ld de, vTiles0 tile $00 ld de, vTiles0 tile $00
predef Predef_GetMonFrontpic 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 Predef_GetUnownLetter predef GetUnownLetter
ld de, vTiles0 tile $00 ld de, vTiles0 tile $00
predef Predef_GetMonBackpic predef GetMonBackpic
.done .done
pop af pop af
@@ -1155,16 +1155,16 @@ BattleAnimCmd_BeatUp: ; cc776 (33:4776)
jr z, .player jr z, .player
ld hl, BattleMonDVs ld hl, BattleMonDVs
predef Predef_GetUnownLetter predef GetUnownLetter
ld de, vTiles2 tile $00 ld de, vTiles2 tile $00
predef Predef_GetMonFrontpic predef GetMonFrontpic
jr .done jr .done
.player .player
ld hl, EnemyMonDVs ld hl, EnemyMonDVs
predef Predef_GetUnownLetter predef GetUnownLetter
ld de, vTiles2 tile $31 ld de, vTiles2 tile $31
predef Predef_GetMonBackpic predef GetMonBackpic
.done .done
pop af pop af

View File

@@ -1095,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 Predef_GetUnownLetter predef GetUnownLetter
call GetBaseData call GetBaseData
ld de, vTiles2 tile $00 ld de, vTiles2 tile $00
predef Predef_GetMonFrontpic predef GetMonFrontpic
xor a xor a
ld [wBillsPC_MonHasMail], a ld [wBillsPC_MonHasMail], a
ld a, [CurPartySpecies] ld a, [CurPartySpecies]
@@ -1115,7 +1115,7 @@ PCMonInfo: ; e2ac6 (38:6ac6)
ld a, $3 ld a, $3
ld [MonType], a ld [MonType], a
farcall Predef_GetGender farcall GetGender
jr c, .skip_gender jr c, .skip_gender
ld a, "♂" ld a, "♂"
jr nz, .printgender jr nz, .printgender
@@ -1698,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 Predef_StatsScreenInit predef StatsScreenInit
call BillsPC_InitGFX call BillsPC_InitGFX
call MaxVolume call MaxVolume
ret ret
@@ -1726,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 Predef_GetUnownLetter predef GetUnownLetter
call GetBaseData call GetBaseData
call BillsPC_CopyMon call BillsPC_CopyMon
.pressed_a_b_right_left .pressed_a_b_right_left
@@ -1819,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 Predef_SendGetPkmnIntoFromBox predef SendGetPkmnIntoFromBox
jr c, .asm_boxisfull jr c, .asm_boxisfull
xor a xor a
ld [wPokemonWithdrawDepositParameter], a ld [wPokemonWithdrawDepositParameter], a
@@ -1874,7 +1874,7 @@ TryWithdrawPokemon: ; e30fa (38:70fa)
call CloseSRAM call CloseSRAM
xor a xor a
ld [wPokemonWithdrawDepositParameter], a ld [wPokemonWithdrawDepositParameter], a
predef Predef_SendGetPkmnIntoFromBox predef SendGetPkmnIntoFromBox
jr c, .PartyFull jr c, .PartyFull
ld a, PC_DEPOSIT ld a, PC_DEPOSIT
ld [wPokemonWithdrawDepositParameter], a ld [wPokemonWithdrawDepositParameter], a

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 Predef_GetGender 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 Predef_GetGender predef GetGender
pop bc pop bc
jr c, .genderless jr c, .genderless
ld a, $1 ld a, $1
@@ -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 Predef_CalcPkmnStats 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 Predef_CanLearnTMHMMove 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 Predef_FillPP 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 Predef_GetGender 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 Predef_GetGender 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 Predef_GetUnownLetter predef GetUnownLetter
pop de pop de
predef_jump Predef_GetMonFrontpic predef_jump 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 Predef_GetUnownLetter predef GetUnownLetter
pop de pop de
predef_jump Predef_GetAnimatedFrontpic predef_jump 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 Predef_PlaceGraphic 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 Predef_AnimateFrontpic predef AnimateFrontpic
pop af pop af
ld [CurSpecies], a ld [CurSpecies], a
ret ret

View File

@@ -43,7 +43,7 @@ CheckShininess:
and a and a
ret ret
UnusedPredef_CheckContestMon: Unused_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.
@@ -855,7 +855,7 @@ PushSGBPals:
jr nz, .loop jr nz, .loop
ret ret
Predef_InitSGBBorder: InitSGBBorder:
call CheckCGB call CheckCGB
ret nz ret nz
; SGB/DMG only ; SGB/DMG only

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 Predef_GetMonBackpic 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 Predef_PlaceGraphic 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 Predef_GetTrainerPic callfar 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 Predef_PlaceGraphic 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 Predef_GetTMHMMove 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 Predef_CanLearnTMHMMove predef CanLearnTMHMMove
ld a, c ld a, c
and a and a
ld de, String_81e46 ld de, String_81e46

View File

@@ -248,7 +248,7 @@ RunBattleTowerTrainer: ; 17024d
call ReadBTTrainerParty call ReadBTTrainerParty
call Clears5_a89a call Clears5_a89a
predef Predef_StartBattle 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 Predef_CalcPkmnStats predef CalcPkmnStats
pop de pop de
pop hl pop hl
dec de dec de

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