From d7970f749ac23786728926109be430ab732f19e6 Mon Sep 17 00:00:00 2001 From: xCrystal Date: Tue, 2 Jan 2018 18:49:25 +0100 Subject: [PATCH] Consistent predef function names --- data/items/descriptions.asm | 2 +- engine/battle/ai/items.asm | 4 +- engine/battle/ai/move.asm | 2 +- engine/battle/ai/scoring.asm | 2 +- engine/battle/ai/switch.asm | 16 +- engine/battle/anim_hp_bar.asm | 10 +- engine/battle/battle_transition.asm | 2 +- engine/battle/core.asm | 146 +++++++++--------- engine/battle/effect_commands.asm | 42 ++--- engine/battle/effect_commands/attract.asm | 4 +- engine/battle/misc.asm | 2 +- engine/battle/read_trainer_party.asm | 8 +- engine/battle/returntobattle_useball.asm | 4 +- engine/battle/start_battle.asm | 2 +- engine/battle_anims/anim_commands.asm | 20 +-- engine/billspc.asm | 14 +- engine/breeding.asm | 26 ++-- engine/color.asm | 2 +- engine/debug.asm | 12 +- engine/events/catch_tutorial.asm | 2 +- engine/events/daycare.asm | 10 +- engine/events/halloffame.asm | 18 +-- engine/events/itemfinder.asm | 4 +- engine/events/magnet_train.asm | 2 +- engine/events/move_tutor.asm | 4 +- engine/events/overworld.asm | 30 ++-- engine/events/poisonstep.asm | 4 +- engine/events/poisonstep_pals.asm | 6 +- engine/events/pokecenter_pc.asm | 6 +- engine/events/pokepic.asm | 4 +- engine/events/print_unown.asm | 6 +- engine/events/special.asm | 2 +- engine/events/squirtbottle.asm | 2 +- engine/events/sweet_scent.asm | 2 +- engine/evolution_animation.asm | 4 +- engine/evolve.asm | 18 +-- engine/health.asm | 4 +- engine/intro_menu.asm | 10 +- engine/item_effects.asm | 30 ++-- engine/learn.asm | 4 +- engine/link.asm | 44 +++--- engine/link_2.asm | 2 +- engine/link_trade.asm | 2 +- engine/map_setup.asm | 2 +- engine/mart.asm | 4 +- engine/mon_stats.asm | 24 +-- engine/move_mon.asm | 60 +++---- engine/mystery_gift.asm | 6 +- engine/namingscreen.asm | 2 +- engine/npctrade.asm | 10 +- engine/party_menu.asm | 8 +- engine/pic_animation.asm | 28 ++-- engine/player_gfx.asm | 6 +- engine/pokedex.asm | 8 +- engine/pokegear.asm | 4 +- engine/predef.asm | 128 +++++++-------- engine/print_party.asm | 8 +- engine/printer.asm | 2 +- .../routines/correcterrorsinplayerparty.asm | 2 +- engine/routines/flagpredef.asm | 2 +- engine/routines/newpokedexentry.asm | 2 +- engine/routines/placegraphic.asm | 2 +- engine/routines/placewaitingtext.asm | 2 +- engine/routines/trademonfrontpic.asm | 6 +- engine/scripting.asm | 4 +- engine/sgb_layouts.asm | 2 +- engine/specials.asm | 6 +- engine/start_menu.asm | 28 ++-- engine/stats_screen.asm | 36 ++--- engine/tempmon.asm | 4 +- engine/time_capsule_2.asm | 2 +- engine/timeofdaypals.asm | 4 +- engine/tmhm.asm | 6 +- engine/tmhm2.asm | 16 +- engine/trade_animation.asm | 10 +- engine/trainer_card.asm | 2 +- engine/types.asm | 10 +- gfx/load_pics.asm | 12 +- home.asm | 9 +- home/battle.asm | 4 +- home/init.asm | 2 +- home/map.asm | 2 +- home/palettes.asm | 2 +- home/pokedex_flags.asm | 2 +- home/rtc.asm | 4 +- maps/FastShipCabins_SE_SSE_CaptainsCabin.asm | 2 +- maps/FastShipCabins_SW_SSW_NW.asm | 2 +- maps/MrPokemonsHouse.asm | 2 +- maps/RadioTower5F.asm | 2 +- maps/Route24.asm | 2 +- maps/Route26HealSpeechHouse.asm | 2 +- maps/Route36NationalParkGate.asm | 2 +- maps/SilverCaveRoom3.asm | 2 +- maps/SlowpokeWellB1F.asm | 2 +- maps/SproutTower3F.asm | 2 +- maps/TeamRocketBaseB2F.asm | 2 +- mobile/battle_tower_5c.asm | 4 +- mobile/mobile_22.asm | 4 +- mobile/mobile_40.asm | 4 +- mobile/mobile_42.asm | 16 +- mobile/mobile_46.asm | 6 +- mobile/mobile_5f.asm | 18 +-- 102 files changed, 549 insertions(+), 548 deletions(-) diff --git a/data/items/descriptions.asm b/data/items/descriptions.asm index e5b01e8fd..042736288 100644 --- a/data/items/descriptions.asm +++ b/data/items/descriptions.asm @@ -11,7 +11,7 @@ PrintItemDescription: ; 0x1c8955 pop hl ld a, [wd265] ld [CurSpecies], a - predef PrintMoveDesc + predef Predef_PrintMoveDesc ret .not_a_tm diff --git a/engine/battle/ai/items.asm b/engine/battle/ai/items.asm index 09595077a..b9f3fa93c 100644 --- a/engine/battle/ai/items.asm +++ b/engine/battle/ai/items.asm @@ -545,7 +545,7 @@ AI_Items: ; 39196 AIUpdateHUD: ; 38387 call UpdateEnemyMonInParty - farcall UpdateEnemyHUD + farcall Predef_UpdateEnemyHUD ld a, $1 ld [hBGMapMode], a ld hl, wEnemyItemState @@ -664,7 +664,7 @@ EnemyPotionFinish: ; 38436 xor a ld [wWhichHPBar], a call AIUsedItemSound - predef AnimateHPBar + predef Predef_AnimateHPBar jp AIUpdateHUD diff --git a/engine/battle/ai/move.asm b/engine/battle/ai/move.asm index 11586c0da..d91ac437d 100755 --- a/engine/battle/ai/move.asm +++ b/engine/battle/ai/move.asm @@ -92,7 +92,7 @@ AIChooseMove: ; 440ce push bc ld d, BANK(TrainerClassAttributes) - predef FlagPredef + predef Predef_Flag ld d, c pop bc diff --git a/engine/battle/ai/scoring.asm b/engine/battle/ai/scoring.asm index 44194d6f7..d7dfdb630 100644 --- a/engine/battle/ai/scoring.asm +++ b/engine/battle/ai/scoring.asm @@ -1488,7 +1488,7 @@ AI_Smart_Encore: ; 38c3b push hl ld a, [wEnemyMoveStruct + MOVE_TYPE] ld hl, EnemyMonType1 - predef CheckTypeMatchup + predef Predef_CheckTypeMatchup pop hl ld a, [wd265] diff --git a/engine/battle/ai/switch.asm b/engine/battle/ai/switch.asm index c2f83fa1f..cb278676e 100755 --- a/engine/battle/ai/switch.asm +++ b/engine/battle/ai/switch.asm @@ -28,7 +28,7 @@ CheckPlayerMoveTypeMatchups: ; 3484e inc hl call GetMoveByte ld hl, EnemyMonType - call CheckTypeMatchup + call Predef_CheckTypeMatchup ld a, [wTypeMatchup] cp 10 + 1 ; 1.0 + 0.1 jr nc, .super_effective @@ -73,7 +73,7 @@ CheckPlayerMoveTypeMatchups: ; 3484e ld a, [BattleMonType1] ld b, a ld hl, EnemyMonType1 - call CheckTypeMatchup + call Predef_CheckTypeMatchup ld a, [wTypeMatchup] cp 10 + 1 ; 1.0 + 0.1 jr c, .ok @@ -82,7 +82,7 @@ CheckPlayerMoveTypeMatchups: ; 3484e ld a, [BattleMonType2] cp b jr z, .ok2 - call CheckTypeMatchup + call Predef_CheckTypeMatchup ld a, [wTypeMatchup] cp 10 + 1 ; 1.0 + 0.1 jr c, .ok2 @@ -123,7 +123,7 @@ CheckPlayerMoveTypeMatchups: ; 3484e inc hl call GetMoveByte ld hl, BattleMonType1 - call CheckTypeMatchup + call Predef_CheckTypeMatchup ld a, [wTypeMatchup] ; immune @@ -390,7 +390,7 @@ FindEnemyMonsImmuneToLastCounterMove: ; 34a2a inc hl call GetMoveByte ld hl, BaseType - call CheckTypeMatchup + call Predef_CheckTypeMatchup ld a, [wTypeMatchup] and a jr nz, .next @@ -481,7 +481,7 @@ FindEnemyMonsWithASuperEffectiveMove: ; 34aa7 inc hl call GetMoveByte ld hl, BattleMonType1 - call CheckTypeMatchup + call Predef_CheckTypeMatchup ; if immune or not very effective: continue ld a, [wTypeMatchup] @@ -585,7 +585,7 @@ FindEnemyMonsThatResistPlayer: ; 34b20 .skip_move ld a, [BattleMonType1] ld hl, BaseType - call CheckTypeMatchup + call Predef_CheckTypeMatchup ld a, [wTypeMatchup] cp 10 + 1 jr nc, .dont_choose_mon @@ -593,7 +593,7 @@ FindEnemyMonsThatResistPlayer: ; 34b20 .check_type ld hl, BaseType - call CheckTypeMatchup + call Predef_CheckTypeMatchup ld a, [wTypeMatchup] cp 10 + 1 jr nc, .dont_choose_mon diff --git a/engine/battle/anim_hp_bar.asm b/engine/battle/anim_hp_bar.asm index 71276d27e..d67a46a70 100755 --- a/engine/battle/anim_hp_bar.asm +++ b/engine/battle/anim_hp_bar.asm @@ -67,7 +67,7 @@ _AnimateHPBar: ; d627 ld a, [hli] ld b, a pop hl - call ComputeHPBarPixels + call Predef_ComputeHPBarPixels ld a, e ld [wCurHPBarPixels], a @@ -79,7 +79,7 @@ _AnimateHPBar: ; d627 ld e, a ld a, [wCurHPAnimMaxHP + 1] ld d, a - call ComputeHPBarPixels + call Predef_ComputeHPBarPixels ld a, e ld [wNewHPBarPixels], a @@ -183,11 +183,11 @@ LongAnim_UpdateVariables: ; d6f5 ld c, a ld a, [hli] 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 ; used. The game then proceeds as though it never deleted that output. ; To fix, uncomment the line below. - call ComputeHPBarPixels + call Predef_ComputeHPBarPixels ; ld a, e pop bc pop de @@ -227,7 +227,7 @@ LongHPBarAnim_UpdateTiles: ; d749 ld e, a ld a, [wCurHPAnimMaxHP + 1] ld d, a - call ComputeHPBarPixels + call Predef_ComputeHPBarPixels ld c, e ld d, HP_BAR_LENGTH ld a, [wWhichHPBar] diff --git a/engine/battle/battle_transition.asm b/engine/battle/battle_transition.asm index 2b3f5510e..ba4f9e227 100644 --- a/engine/battle/battle_transition.asm +++ b/engine/battle/battle_transition.asm @@ -1,4 +1,4 @@ -DoBattleTransition: ; 8c20f +Predef_DoBattleTransition: ; 8c20f call .InitGFX ld a, [rBGP] ld [wBGP], a diff --git a/engine/battle/core.asm b/engine/battle/core.asm index c82ae93c5..9b00ba161 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -47,7 +47,7 @@ DoBattle: ; 3c000 .player_2 call LoadTileMapToTempTileMap - call CheckPlayerPartyForFitPkmn + call Predef_CheckPlayerPartyForFitPkmn ld a, d and a jp z, LostBattle @@ -1285,7 +1285,7 @@ HandleWrap: ; 3c874 xor a ld [wNumHits], a ld [FXAnimID + 1], a - predef PlayBattleAnim + predef Predef_PlayBattleAnim call SwitchTurnCore .skip_anim @@ -2047,7 +2047,7 @@ UpdateHPBar: ; 3cd3c .ok push bc ld [wWhichHPBar], a - predef AnimateHPBar + predef Predef_AnimateHPBar pop bc ret ; 3cd55 @@ -2061,7 +2061,7 @@ HandleEnemyMonFaint: ; 3cd55 xor a ld [wWhichMonFaintedFirst], a call UpdateBattleStateAndExperienceAfterEnemyFaint - call CheckPlayerPartyForFitPkmn + call Predef_CheckPlayerPartyForFitPkmn ld a, d and a jp z, LostBattle @@ -2069,7 +2069,7 @@ HandleEnemyMonFaint: ; 3cd55 ld hl, BattleMonHP ld a, [hli] or [hl] - call nz, UpdatePlayerHUD + call nz, Predef_UpdatePlayerHUD ld a, $1 ld [hBGMapMode], a @@ -2193,7 +2193,7 @@ UpdateBattleStateAndExperienceAfterEnemyFaint: ; 3ce01 call PlayerMonFaintHappinessMod .player_mon_did_not_faint - call CheckPlayerPartyForFitPkmn + call Predef_CheckPlayerPartyForFitPkmn ld a, d and a ret z @@ -2713,7 +2713,7 @@ HandlePlayerMonFaint: ; 3d14e ld a, $1 ld [wWhichMonFaintedFirst], a call PlayerMonFaintHappinessMod - call CheckPlayerPartyForFitPkmn + call Predef_CheckPlayerPartyForFitPkmn ld a, d and a jp z, LostBattle @@ -2759,7 +2759,7 @@ PlayerMonFaintHappinessMod: ; 3d1aa ld c, a ld hl, wBattleParticipantsNotFainted ld b, RESET_FLAG - predef FlagPredef + predef Predef_Flag ld hl, EnemySubStatus3 res SUBSTATUS_IN_LOOP, [hl] xor a @@ -3356,10 +3356,10 @@ AddBattleParticipant: ; 3d581 ld hl, wBattleParticipantsNotFainted ld b, SET_FLAG push bc - predef FlagPredef + predef Predef_Flag pop bc ld hl, wBattleParticipantsIncludingFainted - predef_jump FlagPredef + predef_jump Predef_Flag ; 3d599 FindPkmnInOTPartyToSwitchIntoBattle: ; 3d599 @@ -3577,7 +3577,7 @@ LoadEnemyPkmnToSwitchTo: ; 3d6ca and a jr nz, .skip_unown ld hl, EnemyMonDVs - predef GetUnownLetter + predef Predef_GetUnownLetter ld a, [UnownLetter] ld [wFirstUnownSeen], a .skip_unown @@ -3687,8 +3687,8 @@ Function_SetEnemyPkmnAndSendOutAnimation: ; 3d7c7 call GetBaseData ld a, OTPARTYMON ld [MonType], a - predef CopyPkmnToTempMon - call GetEnemyMonFrontpic + predef Predef_CopyPkmnToTempMon + call Predef_GetEnemyMonFrontpic xor a ld [wNumHits], a @@ -3713,7 +3713,7 @@ Function_SetEnemyPkmnAndSendOutAnimation: ; 3d7c7 hlcoord 12, 0 ld d, $0 ld e, ANIM_MON_SLOW - predef AnimateFrontpic + predef Predef_AnimateFrontpic jr .skip_cry .cry_no_anim @@ -3723,7 +3723,7 @@ Function_SetEnemyPkmnAndSendOutAnimation: ; 3d7c7 call PlayStereoCry .skip_cry - call UpdateEnemyHUD + call Predef_UpdateEnemyHUD ld a, $1 ld [hBGMapMode], a ret @@ -3764,7 +3764,7 @@ ResetEnemyStatLevels: ; 3d867 ret ; 3d873 -CheckPlayerPartyForFitPkmn: ; 3d873 +Predef_CheckPlayerPartyForFitPkmn: ; 3d873 ; Has the player any Pkmn in his Party that can fight? ld a, [PartyCount] ld e, a @@ -4167,7 +4167,7 @@ SwitchPlayerMon: ; 3db32 SendOutPlayerMon: ; 3db5f ld hl, BattleMonDVs - predef GetUnownLetter + predef Predef_GetUnownLetter hlcoord 1, 5 ld b, 7 ld c, 8 @@ -4175,7 +4175,7 @@ SendOutPlayerMon: ; 3db5f call WaitBGMap xor a ld [hBGMapMode], a - call GetBattleMonBackpic + call Predef_GetBattleMonBackpic xor a ld [hGraphicStartTile], a ld [wBattleMenuCursorBuffer], a @@ -4215,7 +4215,7 @@ SendOutPlayerMon: ; 3db5f call PlayStereoCry .statused - call UpdatePlayerHUD + call Predef_UpdatePlayerHUD ld a, $1 ld [hBGMapMode], a ret @@ -4261,13 +4261,13 @@ BreakAttraction: ; 3dc18 SpikesDamage: ; 3dc23 ld hl, PlayerScreens ld de, BattleMonType - ld bc, UpdatePlayerHUD + ld bc, Predef_UpdatePlayerHUD ld a, [hBattleTurn] and a jr z, .ok ld hl, EnemyScreens ld de, EnemyMonType - ld bc, UpdateEnemyHUD + ld bc, Predef_UpdateEnemyHUD .ok bit SCREENS_SPIKES, [hl] @@ -4349,7 +4349,7 @@ PursuitSwitch: ; 3dc5b ld c, a ld hl, wBattleParticipantsNotFainted ld b, RESET_FLAG - predef FlagPredef + predef Predef_Flag call PlayerMonFaintedAnimation ld hl, BattleText_PkmnFainted jr .done_fainted @@ -4498,7 +4498,7 @@ HandleHPHealingItem: ; 3dd2f .got_hp_bar_coords ld [wWhichHPBar], a - predef AnimateHPBar + predef Predef_AnimateHPBar UseOpponentItem: call RefreshBattleHuds callfar GetOpponentItem @@ -4521,7 +4521,7 @@ ItemRecoveryAnim: ; 3ddc8 xor a ld [wNumHits], a ld [FXAnimID + 1], a - predef PlayBattleAnim + predef Predef_PlayBattleAnim call SwitchTurnCore pop bc pop de @@ -4751,7 +4751,7 @@ UpdateBattleHUDs: ; 3df2c ret ; 3df48 -UpdatePlayerHUD:: ; 3df48 +Predef_UpdatePlayerHUD:: ; 3df48 push hl push de push bc @@ -4784,7 +4784,7 @@ DrawPlayerHUD: ; 3df58 ld b, 1 xor a ; PARTYMON ld [MonType], a - predef DrawPlayerHP + predef Predef_DrawPlayerHP ; Exp bar push de @@ -4797,7 +4797,7 @@ DrawPlayerHUD: ; 3df58 hlcoord 10, 11 ld a, [TempMonLevel] ld b, a - call FillInExpBar + call Predef_FillInExpBar pop de ret ; 3df98 @@ -4866,7 +4866,7 @@ PrintPlayerHUD: ; 3dfbf ld a, TEMPMON ld [MonType], a - callfar GetGender + callfar Predef_GetGender ld a, " " jr c, .got_gender_char ld a, "♂" @@ -4880,7 +4880,7 @@ PrintPlayerHUD: ; 3dfbf push af ; back up gender push hl ld de, BattleMonStatus - predef PlaceNonFaintStatus + predef Predef_PlaceNonFaintStatus pop hl pop bc ret nz @@ -4895,7 +4895,7 @@ PrintPlayerHUD: ; 3dfbf jp PrintLevel ; 3e036 -UpdateEnemyHUD:: ; 3e036 +Predef_UpdateEnemyHUD:: ; 3e036 push hl push de push bc @@ -4944,7 +4944,7 @@ DrawEnemyHUD: ; 3e043 ld a, TEMPMON ld [MonType], a - callfar GetGender + callfar Predef_GetGender ld a, " " jr c, .got_gender ld a, "♂" @@ -4959,7 +4959,7 @@ DrawEnemyHUD: ; 3e043 push af push hl ld de, EnemyMonStatus - predef PlaceNonFaintStatus + predef Predef_PlaceNonFaintStatus pop hl pop bc jr nz, .skip_level @@ -5184,8 +5184,8 @@ BattleMenu_Pack: ; 3e1c7 call ClearPalettes call DelayFrame call _LoadBattleFontsHPBar - call GetBattleMonBackpic - call GetEnemyMonFrontpic + call Predef_GetBattleMonBackpic + call Predef_GetEnemyMonFrontpic call ExitMenu call WaitBGMap call FinishBattleAnim @@ -5217,10 +5217,10 @@ BattleMenu_Pack: ; 3e1c7 ld a, [BattleType] cp BATTLETYPE_TUTORIAL jr z, .tutorial2 - call GetBattleMonBackpic + call Predef_GetBattleMonBackpic .tutorial2 - call GetEnemyMonFrontpic + call Predef_GetEnemyMonFrontpic ld a, $1 ld [wMenuCursorY], a call ExitMenu @@ -5574,7 +5574,7 @@ MoveSelectionScreen: ; 3e4bc .got_start_coord ld a, SCREEN_WIDTH ld [Buffer1], a - predef ListMoves + predef Predef_ListMoves ld b, 5 ld a, [wMoveSelectionMenuType] @@ -5907,7 +5907,7 @@ MoveInfoBox: ; 3e6c8 ld a, [wPlayerMoveStruct + MOVE_ANIM] ld b, a hlcoord 2, 10 - predef PrintMoveType + predef Predef_PrintMoveType .done ret @@ -6363,7 +6363,7 @@ LoadEnemyMon: ; 3e8eb ; Get letter based on DVs ld hl, EnemyMonDVs - predef GetUnownLetter + predef Predef_GetUnownLetter ; Can't use any letters that haven't been unlocked ; If combined with forced shiny battletype, causes an infinite loop call CheckUnownLetter @@ -6451,7 +6451,7 @@ LoadEnemyMon: ; 3e8eb ld de, EnemyMonMaxHP ld b, FALSE ld hl, EnemyMonDVs - (MON_DVS - MON_STAT_EXP + 1) ; LinkBattleRNs + 7 ; ? - predef CalcPkmnStats + predef Predef_CalcPkmnStats ; If we're in a trainer battle, ; get the rest of the parameters from the party struct @@ -6566,7 +6566,7 @@ LoadEnemyMon: ; 3e8eb ; Make sure the predef knows this isn't a partymon ld [wEvolutionOldSpecies], a ; Fill moves based on level - predef FillMoves + predef Predef_FillMoves .PP: ; Trainer battle? @@ -6577,7 +6577,7 @@ LoadEnemyMon: ; 3e8eb ; Fill wild PP ld hl, EnemyMonMoves ld de, EnemyMonPP - predef FillPP + predef Predef_FillPP jr .Finish .TrainerPP: @@ -6630,7 +6630,7 @@ LoadEnemyMon: ; 3e8eb ld c, a ld b, SET_FLAG ld hl, PokedexSeen - predef FlagPredef + predef Predef_Flag ld hl, EnemyMonStats ld de, EnemyStats @@ -6787,7 +6787,7 @@ BattleWinSlideInEnemyTrainerFrontpic: ; 3ebd8 ld a, [OtherTrainerClass] ld [TrainerClass], a ld de, vTiles2 - callfar GetTrainerPic + callfar Predef_GetTrainerPic hlcoord 19, 0 ld c, 0 @@ -7264,7 +7264,7 @@ Call_PlayBattleAnim: ; 3ee17 ld a, d ld [FXAnimID + 1], a call WaitBGMap - predef_jump PlayBattleAnim + predef_jump Predef_PlayBattleAnim ; 3ee27 FinishBattleAnim: ; 3ee27 @@ -7312,7 +7312,7 @@ GiveExperiencePoints: ; 3ee3b ld c, a ld b, CHECK_FLAG ld d, $0 - predef FlagPredef + predef Predef_Flag ld a, c and a pop bc @@ -7490,7 +7490,7 @@ GiveExperiencePoints: ; 3ee3b .not_max_exp xor a ; PARTYMON ld [MonType], a - predef CopyPkmnToTempMon + predef Predef_CopyPkmnToTempMon callfar CalcLevel pop bc ld hl, MON_LEVEL @@ -7527,7 +7527,7 @@ GiveExperiencePoints: ; 3ee3b add hl, bc push bc ld b, TRUE - predef CalcPkmnStats + predef Predef_CalcPkmnStats pop bc pop de ld hl, MON_MAXHP + 1 @@ -7580,7 +7580,7 @@ GiveExperiencePoints: ; 3ee3b call ApplyStatLevelMultiplierOnAllStats callfar ApplyStatusEffectOnPlayerStats callfar BadgeStatBoosts - callfar UpdatePlayerHUD + callfar Predef_UpdatePlayerHUD call EmptyBattleTextBox call LoadTileMapToTempTileMap ld a, $1 @@ -7603,14 +7603,14 @@ GiveExperiencePoints: ; 3ee3b .skip_animation2 xor a ; PARTYMON ld [MonType], a - predef CopyPkmnToTempMon + predef Predef_CopyPkmnToTempMon hlcoord 9, 0 ld b, $a ld c, $9 call TextBox hlcoord 11, 1 ld bc, 4 - predef PrintTempMonStats + predef Predef_PrintTempMonStats ld c, $1e call DelayFrames call WaitPressAorB_BlinkCursor @@ -7630,7 +7630,7 @@ GiveExperiencePoints: ; 3ee3b ld a, b ld [CurPartyLevel], a push bc - predef LearnLevelMoves + predef Predef_LearnLevelMoves pop bc ld a, b cp c @@ -7641,7 +7641,7 @@ GiveExperiencePoints: ; 3ee3b ld a, [CurPartyMon] ld c, a ld b, SET_FLAG - predef FlagPredef + predef Predef_Flag pop af ld [CurPartyLevel], a @@ -7763,7 +7763,7 @@ AnimateExpBar: ; 3f136 ld [wd002], a xor a ; PARTYMON ld [MonType], a - predef CopyPkmnToTempMon + predef Predef_CopyPkmnToTempMon ld a, [TempMonLevel] ld b, a ld e, a @@ -8134,7 +8134,7 @@ Unreferenced_HandleSafariAngerEatingStatus: jp StdBattleTextBox ; 3f390 -FillInExpBar: ; 3f390 +Predef_FillInExpBar: ; 3f390 push hl call CalcExpBar pop hl @@ -8276,7 +8276,7 @@ PlaceExpBar: ; 3f41c ret ; 3f43d -GetBattleMonBackpic: ; 3f43d +Predef_GetBattleMonBackpic: ; 3f43d ld a, [PlayerSubStatus4] bit SUBSTATUS_SUBSTITUTE, a ld hl, BattleAnimCmd_RaiseSub @@ -8292,9 +8292,9 @@ DropPlayerSub: ; 3f447 ld a, [BattleMonSpecies] ld [CurPartySpecies], a ld hl, BattleMonDVs - predef GetUnownLetter + predef Predef_GetUnownLetter ld de, vTiles2 tile $31 - predef GetMonBackpic + predef Predef_GetMonBackpic pop af ld [CurPartySpecies], a ret @@ -8312,7 +8312,7 @@ GetBattleMonBackpic_DoAnim: ; 3f46f ret ; 3f47c -GetEnemyMonFrontpic: ; 3f47c +Predef_GetEnemyMonFrontpic: ; 3f47c ld a, [EnemySubStatus4] bit SUBSTATUS_SUBSTITUTE, a ld hl, BattleAnimCmd_RaiseSub @@ -8331,9 +8331,9 @@ DropEnemySub: ; 3f486 ld [CurPartySpecies], a call GetBaseData ld hl, EnemyMonDVs - predef GetUnownLetter + predef Predef_GetUnownLetter ld de, vTiles2 - predef GetAnimatedFrontpicPredef + predef Predef_GetAnimatedFrontpic pop af ld [CurPartySpecies], a ret @@ -8350,7 +8350,7 @@ GetEnemyMonFrontpic_DoAnim: ; 3f4b4 ret ; 3f4c1 -StartBattle: ; 3f4c1 +Predef_StartBattle: ; 3f4c1 ; This check prevents you from entering a battle without any Pokemon. ; Those using walk-through-walls to bypass getting a Pokemon experience ; the effects of this check. @@ -8409,7 +8409,7 @@ BattleIntro: ; 3f4dd call ClearSprites ld a, [wBattleMode] cp WILD_BATTLE - call z, UpdateEnemyHUD + call z, Predef_UpdateEnemyHUD ld a, $1 ld [hBGMapMode], a ret @@ -8474,14 +8474,14 @@ InitEnemyTrainer: ; 3f594 .ok ld de, vTiles2 - callfar GetTrainerPic + callfar Predef_GetTrainerPic xor a ld [hGraphicStartTile], a dec a ld [wEnemyItemState], a hlcoord 12, 0 lb bc, 7, 7 - predef PlaceGraphic + predef Predef_PlaceGraphic ld a, -1 ld [CurOTMon], a ld a, TRAINER_BATTLE @@ -8527,7 +8527,7 @@ InitEnemyWildmon: ; 3f607 ld bc, NUM_MOVES call CopyBytes ld hl, EnemyMonDVs - predef GetUnownLetter + predef Predef_GetUnownLetter ld a, [CurPartySpecies] cp UNOWN jr nz, .skip_unown @@ -8538,13 +8538,13 @@ InitEnemyWildmon: ; 3f607 ld [wFirstUnownSeen], a .skip_unown ld de, vTiles2 - predef GetAnimatedFrontpicPredef + predef Predef_GetAnimatedFrontpic xor a ld [TrainerClass], a ld [hGraphicStartTile], a hlcoord 12, 0 lb bc, 7, 7 - predef PlaceGraphic + predef Predef_PlaceGraphic ret ; 3f662 @@ -8623,7 +8623,7 @@ ExitBattle: ; 3f69e call CheckPayDay xor a ld [wForceEvolution], a - predef EvolveAfterBattle + predef Predef_EvolveAfterBattle farcall GivePokerusAndConvertBerries ret ; 3f6d0 @@ -9297,7 +9297,7 @@ InitBattleDisplay: ; 3fb6c ld [hGraphicStartTile], a hlcoord 2, 6 lb bc, 6, 6 - predef PlaceGraphic + predef Predef_PlaceGraphic xor a ld [hWY], a ld [rWY], a @@ -9370,7 +9370,7 @@ GetTrainerBackpic: ; 3fbff .Decompress: ld de, vTiles2 tile $31 ld c, $31 - predef DecompressPredef + predef Predef_Decompress ret ; 3fc30 @@ -9392,7 +9392,7 @@ CopyBackpic: ; 3fc30 ld [hGraphicStartTile], a hlcoord 2, 6 lb bc, 6, 6 - predef PlaceGraphic + predef Predef_PlaceGraphic ret ; 3fc5b @@ -9472,7 +9472,7 @@ BattleStartMessage: ; 3fc8b hlcoord 12, 0 ld d, $0 ld e, ANIM_MON_NORMAL - predef AnimateFrontpic + predef Predef_AnimateFrontpic jr .skip_cry ; cry is played during the animation .cry_no_anim diff --git a/engine/battle/effect_commands.asm b/engine/battle/effect_commands.asm index f86f90479..d0a126b98 100644 --- a/engine/battle/effect_commands.asm +++ b/engine/battle/effect_commands.asm @@ -182,7 +182,7 @@ CheckPlayerTurn: call StdBattleTextBox call CantMove call UpdateBattleMonInParty - ld hl, UpdatePlayerHUD + ld hl, Predef_UpdatePlayerHUD call CallBattleCore ld a, $1 ld [hBGMapMode], a @@ -433,7 +433,7 @@ CheckEnemyTurn: ; 3421f call StdBattleTextBox call CantMove call UpdateEnemyMonInParty - ld hl, UpdateEnemyHUD + ld hl, Predef_UpdateEnemyHUD call CallBattleCore ld a, $1 ld [hBGMapMode], a @@ -670,7 +670,7 @@ HitConfusion: ; 343a5 and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND call z, PlayFXAnimID - ld hl, UpdatePlayerHUD + ld hl, Predef_UpdatePlayerHUD call CallBattleCore ld a, $1 ld [hBGMapMode], a @@ -1539,12 +1539,12 @@ BattleCheckTypeMatchup: ; 347c8 ld hl, EnemyMonType1 ld a, [hBattleTurn] and a - jr z, CheckTypeMatchup + jr z, Predef_CheckTypeMatchup ld hl, BattleMonType1 -CheckTypeMatchup: ; 347d3 +Predef_CheckTypeMatchup: ; 347d3 ; 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 -; offensive type in a will make this function do the right thing. Since a is overwritten, +; the AI calls Predef_CheckTypeMatchup (not BattleCheckTypeMatchup), it assumes that placing +; 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 ; current move into a in BattleCheckTypeMatchup, before falling through, which is ; consistent with how the rest of the code assumes this code works like. @@ -2636,7 +2636,7 @@ BattleCommand_CheckDestinyBond: ; 351c0 ld [Buffer6], a ld h, b ld l, c - predef AnimateHPBar + predef Predef_AnimateHPBar call RefreshBattleHuds call BattleCommand_SwitchTurn @@ -4049,7 +4049,7 @@ BattleCommand_PainSplit: ; 35926 ld a, $1 ld [wWhichHPBar], a hlcoord 10, 9 - predef AnimateHPBar + predef Predef_AnimateHPBar ld hl, EnemyMonHP ld a, [hli] ld [Buffer4], a @@ -4064,7 +4064,7 @@ BattleCommand_PainSplit: ; 35926 ld [wWhichHPBar], a call ResetDamage hlcoord 2, 2 - predef AnimateHPBar + predef Predef_AnimateHPBar farcall _UpdateBattleHUDs ld hl, SharedPainText @@ -4206,7 +4206,7 @@ BattleCommand_Conversion2: ; 359e6 ld a, [hl] ld [wNamedObjectIndexBuffer], a - predef GetTypeName + predef Predef_GetTypeName ld hl, TransformedTypeText jp StdBattleTextBox @@ -4744,7 +4744,7 @@ PlayFXAnimID: ; 35d08 ld c, 3 call DelayFrames - callfar PlayBattleAnim + callfar Predef_PlayBattleAnim ret @@ -4806,7 +4806,7 @@ EnemyHurtItself: ; 35d1c hlcoord 2, 2 xor a ld [wWhichHPBar], a - predef AnimateHPBar + predef Predef_AnimateHPBar .did_no_damage jp RefreshBattleHuds @@ -4866,7 +4866,7 @@ PlayerHurtItself: ; 35d7e hlcoord 10, 9 ld a, $1 ld [wWhichHPBar], a - predef AnimateHPBar + predef Predef_AnimateHPBar .did_no_damage jp RefreshBattleHuds @@ -5334,7 +5334,7 @@ SapHealth: ; 36011 xor a .hp_bar ld [wWhichHPBar], a - predef AnimateHPBar + predef Predef_AnimateHPBar call RefreshBattleHuds jp UpdateBattleMonInParty @@ -6296,11 +6296,11 @@ BattleCommand_Curl: ; 365a7 BattleCommand_RaiseSubNoAnim: ; 365af - ld hl, GetBattleMonBackpic + ld hl, Predef_GetBattleMonBackpic ld a, [hBattleTurn] and a jr z, .PlayerTurn - ld hl, GetEnemyMonFrontpic + ld hl, Predef_GetEnemyMonFrontpic .PlayerTurn: xor a ld [hBGMapMode], a @@ -7581,7 +7581,7 @@ BattleCommand_Recoil: ; 36cb2 xor a .animate_hp_bar ld [wWhichHPBar], a - predef AnimateHPBar + predef Predef_AnimateHPBar call RefreshBattleHuds ld hl, RecoilText jp StdBattleTextBox @@ -8282,7 +8282,7 @@ BattleCommand_Conversion: ; 3707f inc de ld [de], a ld [wNamedObjectIndexBuffer], a - farcall GetTypeName + farcall Predef_GetTypeName call AnimateCurrentMove ld hl, TransformedTypeText jp StdBattleTextBox @@ -9911,7 +9911,7 @@ PlayUserBattleAnim: ; 37e47 push hl push de push bc - callfar PlayBattleAnim + callfar Predef_PlayBattleAnim pop bc pop de pop hl @@ -9933,7 +9933,7 @@ PlayOpponentBattleAnim: ; 37e54 push bc call BattleCommand_SwitchTurn - callfar PlayBattleAnim + callfar Predef_PlayBattleAnim call BattleCommand_SwitchTurn pop bc diff --git a/engine/battle/effect_commands/attract.asm b/engine/battle/effect_commands/attract.asm index 0a6d7c975..fc73d234c 100755 --- a/engine/battle/effect_commands/attract.asm +++ b/engine/battle/effect_commands/attract.asm @@ -35,7 +35,7 @@ CheckOppositeGender: ; 377f5 xor a ld [MonType], a - farcall GetGender + farcall Predef_GetGender jr c, .genderless_samegender ld b, 1 @@ -58,7 +58,7 @@ CheckOppositeGender: ; 377f5 ld [TempMonDVs + 1], a ld a, 3 ld [MonType], a - farcall GetGender + farcall Predef_GetGender pop bc jr c, .genderless_samegender diff --git a/engine/battle/misc.asm b/engine/battle/misc.asm index c78e9fd84..46aad0c00 100644 --- a/engine/battle/misc.asm +++ b/engine/battle/misc.asm @@ -33,7 +33,7 @@ AppearUser: ; fbd77 (3e:7d77) ld a, $31 .okay ld [hGraphicStartTile], a - predef PlaceGraphic + predef Predef_PlaceGraphic FinishAppearDisappearUser: ; fbd91 (3e:7d91) ld a, $1 ld [hBGMapMode], a diff --git a/engine/battle/read_trainer_party.asm b/engine/battle/read_trainer_party.asm index a09c6dd08..4f3dc8e55 100755 --- a/engine/battle/read_trainer_party.asm +++ b/engine/battle/read_trainer_party.asm @@ -103,7 +103,7 @@ TrainerType1: ; 397eb ld a, OTPARTYMON ld [MonType], a push hl - predef TryAddMonToParty + predef Predef_TryAddMonToParty pop hl jr .loop ; 39806 @@ -124,7 +124,7 @@ TrainerType2: ; 39806 ld [MonType], a push hl - predef TryAddMonToParty + predef Predef_TryAddMonToParty ld a, [OTPartyCount] dec a ld hl, OTPartyMon1Moves @@ -200,7 +200,7 @@ TrainerType3: ; 39871 ld a, OTPARTYMON ld [MonType], a push hl - predef TryAddMonToParty + predef Predef_TryAddMonToParty ld a, [OTPartyCount] dec a ld hl, OTPartyMon1Item @@ -231,7 +231,7 @@ TrainerType4: ; 3989d ld [MonType], a push hl - predef TryAddMonToParty + predef Predef_TryAddMonToParty ld a, [OTPartyCount] dec a ld hl, OTPartyMon1Item diff --git a/engine/battle/returntobattle_useball.asm b/engine/battle/returntobattle_useball.asm index e6e33f900..4254d24f4 100644 --- a/engine/battle/returntobattle_useball.asm +++ b/engine/battle/returntobattle_useball.asm @@ -4,13 +4,13 @@ _ReturnToBattle_UseBall: ; 2715c ld a, [BattleType] cp BATTLETYPE_TUTORIAL jr z, .gettutorialbackpic - farcall GetBattleMonBackpic + farcall Predef_GetBattleMonBackpic jr .continue .gettutorialbackpic farcall GetTrainerBackpic .continue - farcall GetEnemyMonFrontpic + farcall Predef_GetEnemyMonFrontpic farcall _LoadBattleFontsHPBar call GetMemSGBLayout call CloseWindow diff --git a/engine/battle/start_battle.asm b/engine/battle/start_battle.asm index 18ca2df8d..7121f5385 100644 --- a/engine/battle/start_battle.asm +++ b/engine/battle/start_battle.asm @@ -33,7 +33,7 @@ FindFirstAliveMonAndStartBattle: ; 2ee2f add hl, de ld a, [hl] ld [BattleMonLevel], a - predef DoBattleTransition + predef Predef_DoBattleTransition farcall _LoadBattleFontsHPBar ld a, 1 ld [hBGMapMode], a diff --git a/engine/battle_anims/anim_commands.asm b/engine/battle_anims/anim_commands.asm index 27d57e68f..29bb3c215 100644 --- a/engine/battle_anims/anim_commands.asm +++ b/engine/battle_anims/anim_commands.asm @@ -1,6 +1,6 @@ ; Battle animation command interpreter. -PlayBattleAnim: ; cc0d6 +Predef_PlayBattleAnim: ; cc0d6 ld a, [rSVBK] push af @@ -167,7 +167,7 @@ BattleAnimRestoreHuds: ; cc1bb ld [rSVBK], a ld hl, UpdateBattleHuds - ld a, BANK(UpdatePlayerHUD) + ld a, BANK(Predef_UpdatePlayerHUD) rst FarCall ; Why not "call UpdateBattleHuds"? pop af @@ -929,18 +929,18 @@ BattleAnimCmd_Transform: ; cc5dc (33:45dc) ld a, [TempBattleMonSpecies] ; TempBattleMonSpecies ld [CurPartySpecies], a ; CurPartySpecies ld hl, BattleMonDVs ; BattleMonDVs - predef GetUnownLetter + predef Predef_GetUnownLetter ld de, vTiles0 tile $00 - predef GetMonFrontpic + predef Predef_GetMonFrontpic jr .done .player ld a, [TempEnemyMonSpecies] ; TempEnemyMonSpecies ld [CurPartySpecies], a ; CurPartySpecies ld hl, EnemyMonDVs ; EnemyMonDVs - predef GetUnownLetter + predef Predef_GetUnownLetter ld de, vTiles0 tile $00 - predef GetMonBackpic + predef Predef_GetMonBackpic .done pop af @@ -1156,16 +1156,16 @@ BattleAnimCmd_BeatUp: ; cc776 (33:4776) jr z, .player ld hl, BattleMonDVs - predef GetUnownLetter + predef Predef_GetUnownLetter ld de, vTiles2 tile $00 - predef GetMonFrontpic + predef Predef_GetMonFrontpic jr .done .player ld hl, EnemyMonDVs - predef GetUnownLetter + predef Predef_GetUnownLetter ld de, vTiles2 tile $31 - predef GetMonBackpic + predef Predef_GetMonBackpic .done pop af diff --git a/engine/billspc.asm b/engine/billspc.asm index 07bdf884a..8bb2056ca 100755 --- a/engine/billspc.asm +++ b/engine/billspc.asm @@ -1099,10 +1099,10 @@ PCMonInfo: ; e2ac6 (38:6ac6) ld [CurPartySpecies], a ld [CurSpecies], a ld hl, TempMonDVs - predef GetUnownLetter + predef Predef_GetUnownLetter call GetBaseData ld de, vTiles2 tile $00 - predef GetMonFrontpic + predef Predef_GetMonFrontpic xor a ld [wBillsPC_MonHasMail], a ld a, [CurPartySpecies] @@ -1119,7 +1119,7 @@ PCMonInfo: ; e2ac6 (38:6ac6) ld a, $3 ld [MonType], a - farcall GetGender + farcall Predef_GetGender jr c, .skip_gender ld a, "♂" jr nz, .printgender @@ -1702,7 +1702,7 @@ BillsPC_StatsScreen: ; e2f7e (38:6f7e) call BillsPC_CopyMon ld a, $3 ld [MonType], a - predef StatsScreenInit + predef Predef_StatsScreenInit call BillsPC_InitGFX call MaxVolume ret @@ -1730,7 +1730,7 @@ StatsScreenDPad: ; e2f95 (38:6f95) ld [CurPartySpecies], a ld [CurSpecies], a ld hl, TempMonDVs - predef GetUnownLetter + predef Predef_GetUnownLetter call GetBaseData call BillsPC_CopyMon .pressed_a_b_right_left @@ -1823,7 +1823,7 @@ DepositPokemon: ; e307c (38:707c) call GetNick ld a, PC_DEPOSIT ld [wPokemonWithdrawDepositParameter], a - predef SentGetPkmnIntoFromBox + predef Predef_SendGetPkmnIntoFromBox jr c, .asm_boxisfull xor a ld [wPokemonWithdrawDepositParameter], a @@ -1878,7 +1878,7 @@ TryWithdrawPokemon: ; e30fa (38:70fa) call CloseSRAM xor a ld [wPokemonWithdrawDepositParameter], a - predef SentGetPkmnIntoFromBox + predef Predef_SendGetPkmnIntoFromBox jr c, .PartyFull ld a, PC_DEPOSIT ld [wPokemonWithdrawDepositParameter], a diff --git a/engine/breeding.asm b/engine/breeding.asm index 7d2209de9..1d075ee81 100755 --- a/engine/breeding.asm +++ b/engine/breeding.asm @@ -10,7 +10,7 @@ CheckBreedmonCompatibility: ; 16e1d ld [TempMonDVs + 1], a ld a, TEMPMON ld [MonType], a - predef GetGender + predef Predef_GetGender jr c, .genderless ld b, $1 jr nz, .breedmon2 @@ -26,7 +26,7 @@ CheckBreedmonCompatibility: ; 16e1d ld [TempMonDVs + 1], a ld a, $3 ld [MonType], a - predef GetGender + predef Predef_GetGender pop bc jr c, .genderless ld a, $1 @@ -289,7 +289,7 @@ HatchEggs: ; 16f70 (5:6f70) ld bc, MON_STAT_EXP - 1 add hl, bc ld b, $0 - predef CalcPkmnStats + predef Predef_CalcPkmnStats pop bc ld hl, MON_MAXHP add hl, bc @@ -514,7 +514,7 @@ GLOBAL EggMoves cp b jr nz, .loop5 ld [wPutativeTMHMMove], a - predef CanLearnTMHMMove + predef Predef_CanLearnTMHMMove ld a, c and a jr z, .done @@ -559,7 +559,7 @@ LoadEggMove: ; 17169 ld [hl], b ld hl, wEggMonMoves ld de, wEggMonPP - predef FillPP + predef Predef_FillPP pop bc pop de ret @@ -590,7 +590,7 @@ GetHeritableMoves: ; 17197 ld [TempMonDVs + 1], a ld a, TEMPMON ld [MonType], a - predef GetGender + predef Predef_GetGender jr c, .inherit_mon2_moves jr nz, .inherit_mon2_moves jr .inherit_mon1_moves @@ -606,7 +606,7 @@ GetHeritableMoves: ; 17197 ld [TempMonDVs + 1], a ld a, TEMPMON ld [MonType], a - predef GetGender + predef Predef_GetGender jr c, .inherit_mon1_moves jr nz, .inherit_mon1_moves @@ -647,9 +647,9 @@ GetEggFrontpic: ; 17224 (5:7224) ld [CurSpecies], a call GetBaseData ld hl, BattleMonDVs - predef GetUnownLetter + predef Predef_GetUnownLetter pop de - predef_jump GetMonFrontpic + predef_jump Predef_GetMonFrontpic GetHatchlingFrontpic: ; 1723c (5:723c) push de @@ -657,9 +657,9 @@ GetHatchlingFrontpic: ; 1723c (5:723c) ld [CurSpecies], a call GetBaseData ld hl, BattleMonDVs - predef GetUnownLetter + predef Predef_GetUnownLetter pop de - predef_jump GetAnimatedFrontpicPredef + predef_jump Predef_GetAnimatedFrontpic Hatch_UpdateFrontpicBGMapCenter: ; 17254 (5:7254) push af @@ -677,7 +677,7 @@ Hatch_UpdateFrontpicBGMapCenter: ; 17254 (5:7254) ld a, c ld [hGraphicStartTile], a lb bc, 7, 7 - predef PlaceGraphic + predef Predef_PlaceGraphic pop af call Hatch_LoadFrontpicPal call SetPalettes @@ -779,7 +779,7 @@ EggHatch_AnimationSequence: ; 1728f (5:728f) hlcoord 6, 3 ld d, $0 ld e, ANIM_MON_HATCH - predef AnimateFrontpic + predef Predef_AnimateFrontpic pop af ld [CurSpecies], a ret diff --git a/engine/color.asm b/engine/color.asm index f2bfefac4..73427f843 100644 --- a/engine/color.asm +++ b/engine/color.asm @@ -854,7 +854,7 @@ PushSGBPals: jr nz, .loop ret -InitSGBBorder: +Predef_InitSGBBorder: call CheckCGB ret nz ; SGB/DMG only diff --git a/engine/debug.asm b/engine/debug.asm index 1e0d042e0..b9031ded8 100755 --- a/engine/debug.asm +++ b/engine/debug.asm @@ -315,12 +315,12 @@ Function81adb: ; 81adb hlcoord 12, 3 call _PrepMonFrontpic ld de, vTiles2 tile $31 - predef GetMonBackpic + predef Predef_GetMonBackpic ld a, $31 ld [hGraphicStartTile], a hlcoord 2, 4 lb bc, 6, 6 - predef PlaceGraphic + predef Predef_PlaceGraphic ld a, [wd003] and a jr z, .asm_81b66 @@ -346,13 +346,13 @@ Function81adb: ; 81adb hlcoord 4, 1 call PlaceString ld de, vTiles2 - callfar GetTrainerPic + callfar Predef_GetTrainerPic xor a ld [TempEnemyMonSpecies], a ld [hGraphicStartTile], a hlcoord 2, 3 lb bc, 7, 7 - predef PlaceGraphic + predef Predef_PlaceGraphic .asm_81ba9 ld a, $1 @@ -739,7 +739,7 @@ Function81df4: ; 81df4 ld a, [wd004] inc a ld [wd265], a - predef GetTMHMMove + predef Predef_GetTMHMMove ld a, [wd265] ld [wPutativeTMHMMove], a call GetMoveName @@ -748,7 +748,7 @@ Function81df4: ; 81df4 ld a, [wd004] call Function81e55 ld [CurItem], a - predef CanLearnTMHMMove + predef Predef_CanLearnTMHMMove ld a, c and a ld de, String_81e46 diff --git a/engine/events/catch_tutorial.asm b/engine/events/catch_tutorial.asm index b9352ccd6..d91af65fe 100644 --- a/engine/events/catch_tutorial.asm +++ b/engine/events/catch_tutorial.asm @@ -41,7 +41,7 @@ CatchTutorial:: ; 4e554 ld hl, .AutoInput ld a, BANK(.AutoInput) call StartAutoInput - callfar StartBattle + callfar Predef_StartBattle call StopAutoInput pop af diff --git a/engine/events/daycare.asm b/engine/events/daycare.asm index 6395a40fb..019aa058e 100755 --- a/engine/events/daycare.asm +++ b/engine/events/daycare.asm @@ -565,7 +565,7 @@ DayCare_GiveEgg: ; 169ac pop hl push bc ld b, $0 - predef CalcPkmnStats + predef Predef_CalcPkmnStats pop bc ld hl, MON_HP add hl, bc @@ -639,7 +639,7 @@ DayCare_InitBreeding: ; 16a3b cp DITTO ld a, $0 jr z, .LoadWhichBreedmonIsTheMother - farcall GetGender + farcall Predef_GetGender ld a, $0 jr z, .LoadWhichBreedmonIsTheMother inc a @@ -684,7 +684,7 @@ DayCare_InitBreeding: ; 16a3b ld de, wEggMonMoves xor a ld [Buffer1], a - predef FillMoves + predef Predef_FillMoves farcall InitEggMoves ld hl, wEggMonID ld a, [PlayerID] @@ -726,7 +726,7 @@ DayCare_InitBreeding: ; 16a3b ld a, TEMPMON ld [MonType], a push hl - farcall GetGender + farcall Predef_GetGender pop hl ld de, wBreedMon1DVs ld bc, wBreedMon2DVs @@ -770,7 +770,7 @@ DayCare_InitBreeding: ; 16a3b call CopyBytes ld hl, wEggMonMoves ld de, wEggMonPP - predef FillPP + predef Predef_FillPP ld hl, wMonOrItemNameBuffer ld de, StringBuffer1 ld bc, NAME_LENGTH diff --git a/engine/events/halloffame.asm b/engine/events/halloffame.asm index 1f818b471..0054d3ebe 100755 --- a/engine/events/halloffame.asm +++ b/engine/events/halloffame.asm @@ -130,7 +130,7 @@ AnimateHallOfFame: ; 864c3 call WaitBGMap decoord 6, 5 ld c, $6 - predef HOF_AnimateFrontpic + predef HOF_Predef_AnimateFrontpic ld c, 60 call DelayFrames and a @@ -244,18 +244,18 @@ AnimateHOFMonEntrance: ; 865b5 ld a, [hli] ld [TempMonDVs + 1], a ld hl, TempMonDVs - predef GetUnownLetter + predef Predef_GetUnownLetter hlcoord 0, 0 ld bc, SCREEN_WIDTH * SCREEN_HEIGHT ld a, " " call ByteFill ld de, vTiles2 tile $31 - predef GetMonBackpic + predef Predef_GetMonBackpic ld a, $31 ld [hGraphicStartTile], a hlcoord 6, 6 lb bc, 6, 6 - predef PlaceGraphic + predef Predef_PlaceGraphic ld a, $d0 ld [hSCY], a ld a, $90 @@ -403,7 +403,7 @@ _HallOfFamePC: ; 86650 call SetPalettes decoord 6, 5 ld c, $6 - predef HOF_AnimateFrontpic + predef HOF_Predef_AnimateFrontpic and a ret @@ -478,7 +478,7 @@ DisplayHOFMon: ; 86748 ld [CurPartySpecies], a ld [wd265], a ld hl, TempMonDVs - predef GetUnownLetter + predef Predef_GetUnownLetter xor a ld [wBoxAlignment], a hlcoord 6, 5 @@ -499,7 +499,7 @@ DisplayHOFMon: ; 86748 call PlaceString ld a, TEMPMON ld [MonType], a - farcall GetGender + farcall Predef_GetGender ld a, " " jr c, .got_gender ld a, "♂" @@ -546,7 +546,7 @@ HOF_AnimatePlayerPic: ; 86810 ld [hGraphicStartTile], a hlcoord 6, 6 lb bc, 6, 6 - predef PlaceGraphic + predef Predef_PlaceGraphic ld a, $d0 ld [hSCY], a ld a, $90 @@ -570,7 +570,7 @@ HOF_AnimatePlayerPic: ; 86810 ld [hGraphicStartTile], a hlcoord 12, 5 lb bc, 7, 7 - predef PlaceGraphic + predef Predef_PlaceGraphic ld a, $c0 ld [hSCX], a call WaitBGMap diff --git a/engine/events/itemfinder.asm b/engine/events/itemfinder.asm index 19e40ea4b..71aaa5b69 100755 --- a/engine/events/itemfinder.asm +++ b/engine/events/itemfinder.asm @@ -30,7 +30,7 @@ ItemFinder: ; 12580 .Script_FoundSomething: ; 0x125ad reloadmappart - special Special_UpdateTimePals + special UpdateTimePals callasm .ItemfinderSound writetext .Text_FoundSomething closetext @@ -39,7 +39,7 @@ ItemFinder: ; 12580 .Script_FoundNothing: ; 0x125ba reloadmappart - special Special_UpdateTimePals + special UpdateTimePals writetext .Text_FoundNothing closetext end diff --git a/engine/events/magnet_train.asm b/engine/events/magnet_train.asm index b250741d0..c85642ab8 100755 --- a/engine/events/magnet_train.asm +++ b/engine/events/magnet_train.asm @@ -442,7 +442,7 @@ MagnetTrain_Jumptable_FirstRunThrough: ; 8ceae ld [wEnvironment], a ld b, SCGB_MAPPALS call GetSGBLayout - call Special_UpdateTimePals + call UpdateTimePals ld a, [rBGP] ld [wBGP], a ld a, [rOBP0] diff --git a/engine/events/move_tutor.asm b/engine/events/move_tutor.asm index a15ecaf93..9630b07a8 100644 --- a/engine/events/move_tutor.asm +++ b/engine/events/move_tutor.asm @@ -54,7 +54,7 @@ CheckCanLearnMoveTutorMove: ; 492b9 ld hl, .MenuDataHeader call LoadMenuDataHeader - predef CanLearnTMHMMove + predef Predef_CanLearnTMHMMove push bc ld a, [CurPartyMon] @@ -78,7 +78,7 @@ CheckCanLearnMoveTutorMove: ; 492b9 callfar KnowsMove jr c, .didnt_learn - predef LearnMove + predef Predef_LearnMove ld a, b and a jr z, .didnt_learn diff --git a/engine/events/overworld.asm b/engine/events/overworld.asm index 35554cef3..27f3fd595 100755 --- a/engine/events/overworld.asm +++ b/engine/events/overworld.asm @@ -208,7 +208,7 @@ CheckMapForSomethingToCut: ; c7ce Script_CutFromMenu: ; c7fe reloadmappart - special Special_UpdateTimePals + special UpdateTimePals Script_Cut: ; 0xc802 callasm GetPartyNick @@ -318,7 +318,7 @@ UseFlash: ; c8e0 Script_UseFlash: ; 0xc8e6 reloadmappart - special Special_UpdateTimePals + special UpdateTimePals writetext UnknownText_0xc8f3 callasm BlindingFlash closetext @@ -407,7 +407,7 @@ SurfFunction: ; c909 ret SurfFromMenuScript: ; c983 - special Special_UpdateTimePals + special UpdateTimePals UsedSurfScript: ; c986 writetext UsedSurfText ; "used SURF!" @@ -620,7 +620,7 @@ FlyFunction: ; ca3b .FlyScript: ; 0xcaa3 reloadmappart callasm HideSprites - special Special_UpdateTimePals + special UpdateTimePals callasm FlyFromAnim farscall Script_AbortBugContest special Special_WarpToSpawnPoint @@ -680,7 +680,7 @@ CheckMapCanWaterfall: ; cb07 Script_WaterfallFromMenu: ; 0xcb1c reloadmappart - special Special_UpdateTimePals + special UpdateTimePals Script_UsedWaterfall: ; 0xcb20 callasm GetPartyNick @@ -856,13 +856,13 @@ dig_incave .UsedEscapeRopeScript: ; 0xcc2b reloadmappart - special Special_UpdateTimePals + special UpdateTimePals writetext .Text_UsedEscapeRope jump .UsedDigOrEscapeRopeScript .UsedDigScript: ; 0xcc35 reloadmappart - special Special_UpdateTimePals + special UpdateTimePals writetext .Text_UsedDig .UsedDigOrEscapeRopeScript: ; 0xcc3c @@ -950,7 +950,7 @@ TeleportFunction: ; cc61 .TeleportScript: ; 0xccbb reloadmappart - special Special_UpdateTimePals + special UpdateTimePals writetext .Text_ReturnToLastMonCenter pause 60 reloadmappart @@ -1021,7 +1021,7 @@ SetStrengthFlag: ; cd12 Script_StrengthFromMenu: ; 0xcd29 reloadmappart - special Special_UpdateTimePals + special UpdateTimePals Script_UsedStrength: ; 0xcd2d callasm SetStrengthFlag @@ -1183,7 +1183,7 @@ TryWhirlpoolMenu: ; cdde Script_WhirlpoolFromMenu: ; 0xce0b reloadmappart - special Special_UpdateTimePals + special UpdateTimePals Script_UsedWhirlpool: ; 0xce0f callasm GetPartyNick @@ -1284,7 +1284,7 @@ UnknownText_0xcea2: ; 0xcea2 HeadbuttFromMenuScript: ; 0xcea7 reloadmappart - special Special_UpdateTimePals + special UpdateTimePals HeadbuttScript: ; 0xceab callasm GetPartyNick @@ -1382,7 +1382,7 @@ GetFacingObject: ; cf0d RockSmashFromMenuScript: ; 0xcf2e reloadmappart - special Special_UpdateTimePals + special UpdateTimePals RockSmashScript: ; cf32 callasm GetPartyNick @@ -1611,7 +1611,7 @@ Fishing_CheckFacingUp: ; d06c Script_FishCastRod: ; 0xd07c reloadmappart loadvar hBGMapMode, $0 - special Special_UpdateTimePals + special UpdateTimePals loademote EMOTE_ROD callasm LoadFishingGFX loademote EMOTE_SHOCK @@ -1735,7 +1735,7 @@ BikeFunction: ; d0b3 Script_GetOnBike: ; 0xd13e reloadmappart - special Special_UpdateTimePals + special UpdateTimePals writecode VAR_MOVEMENT, PLAYER_BIKE writetext GotOnTheBikeText waitbutton @@ -1755,7 +1755,7 @@ Script_GetOnBike_Register: ; 0xd14e Script_GetOffBike: ; 0xd158 reloadmappart - special Special_UpdateTimePals + special UpdateTimePals writecode VAR_MOVEMENT, PLAYER_NORMAL writetext GotOffTheBikeText waitbutton diff --git a/engine/events/poisonstep.asm b/engine/events/poisonstep.asm index 00c7477bc..366ad1c03 100755 --- a/engine/events/poisonstep.asm +++ b/engine/events/poisonstep.asm @@ -104,7 +104,7 @@ DoPoisonStep:: ; 505da ld de, SFX_POISON call PlaySFX ld b, $2 - predef LoadPoisonBGPals + predef Predef_LoadPoisonBGPals call DelayFrame ret ; 50669 @@ -145,7 +145,7 @@ DoPoisonStep:: ; 505da ld a, [PartyCount] cp [hl] jr nz, .party_loop - predef CheckPlayerPartyForFitPkmn + predef Predef_CheckPlayerPartyForFitPkmn ld a, d ld [ScriptVar], a ret diff --git a/engine/events/poisonstep_pals.asm b/engine/events/poisonstep_pals.asm index 8eb8734f6..2cca433e5 100644 --- a/engine/events/poisonstep_pals.asm +++ b/engine/events/poisonstep_pals.asm @@ -1,4 +1,4 @@ -LoadPoisonBGPals: ; cbcdd +Predef_LoadPoisonBGPals: ; cbcdd call .LoadPals ld a, [hCGB] and a @@ -20,7 +20,7 @@ LoadPoisonBGPals: ; cbcdd call DmgToCgbBGPals ld c, 4 call DelayFrames - farcall _Special_UpdateTimePals + farcall _UpdateTimePals ret .cgb @@ -44,5 +44,5 @@ LoadPoisonBGPals: ; cbcdd ld [hCGBPalUpdate], a ld c, 4 call DelayFrames - farcall _Special_UpdateTimePals + farcall _UpdateTimePals ret diff --git a/engine/events/pokecenter_pc.asm b/engine/events/pokecenter_pc.asm index fcc35dd28..1d655024f 100755 --- a/engine/events/pokecenter_pc.asm +++ b/engine/events/pokecenter_pc.asm @@ -216,7 +216,7 @@ Function15715: ; 15715 ld hl, KrissPCMenuData call LoadMenuDataHeader .asm_15722 - call Special_UpdateTimePals + call UpdateTimePals call DoNthMenu jr c, .asm_15731 call MenuJumptable @@ -354,7 +354,7 @@ KrisWithdrawItemMenu: ; 0x157d1 ld [CurItemQuantity], a ld hl, PCItems call TossItem - predef PartyMonItemName + predef Predef_PartyMonItemName ld hl, .WithdrewText call MenuTextBox xor a @@ -518,7 +518,7 @@ KrisDepositItemMenu: ; 0x1588b ld [CurItemQuantity], a ld hl, NumItems call TossItem - predef PartyMonItemName + predef Predef_PartyMonItemName ld hl, .DepositText call PrintText ret diff --git a/engine/events/pokepic.asm b/engine/events/pokepic.asm index 82016403b..95eddd7f6 100755 --- a/engine/events/pokepic.asm +++ b/engine/events/pokepic.asm @@ -12,7 +12,7 @@ Pokepic:: ; 244e3 ld [CurSpecies], a call GetBaseData ld de, vTiles1 - predef GetMonFrontpic + predef Predef_GetMonFrontpic ld a, [wMenuBorderTopCoord] inc a ld b, a @@ -23,7 +23,7 @@ Pokepic:: ; 244e3 ld a, $80 ld [hGraphicStartTile], a lb bc, 7, 7 - predef PlaceGraphic + predef Predef_PlaceGraphic call WaitBGMap ret diff --git a/engine/events/print_unown.asm b/engine/events/print_unown.asm index 72248a67b..948af5937 100644 --- a/engine/events/print_unown.asm +++ b/engine/events/print_unown.asm @@ -140,13 +140,13 @@ UnownPrinter: ; 16be4 xor a ld [wBoxAlignment], a ld de, vTiles2 - predef GetMonFrontpic + predef Predef_GetMonFrontpic call .Load2bppToSRAM hlcoord 1, 6 xor a ld [hGraphicStartTile], a lb bc, 7, 7 - predef PlaceGraphic + predef Predef_PlaceGraphic ld de, vTiles2 tile $31 farcall RotateUnownFrontpic ret @@ -228,6 +228,6 @@ PlaceUnownPrinterFrontpic: ; 16dac ld a, $31 ld [hGraphicStartTile], a lb bc, 7, 7 - predef PlaceGraphic + predef Predef_PlaceGraphic ret ; 16dc7 diff --git a/engine/events/special.asm b/engine/events/special.asm index d2f9673c2..b2e1af3dc 100755 --- a/engine/events/special.asm +++ b/engine/events/special.asm @@ -10,7 +10,7 @@ Special_GiveShuckle: ; 7305 ld a, 15 ld [CurPartyLevel], a - predef TryAddMonToParty + predef Predef_TryAddMonToParty jr nc, .NotGiven ; Caught data. diff --git a/engine/events/squirtbottle.asm b/engine/events/squirtbottle.asm index 4926f30c1..1134f1bb0 100755 --- a/engine/events/squirtbottle.asm +++ b/engine/events/squirtbottle.asm @@ -7,7 +7,7 @@ _Squirtbottle: ; 50730 .SquirtbottleScript: reloadmappart - special Special_UpdateTimePals + special UpdateTimePals callasm .CheckCanUseSquirtbottle iffalse .NothingHappenedScript farjump WateredWeirdTreeScript diff --git a/engine/events/sweet_scent.asm b/engine/events/sweet_scent.asm index e4bc2197c..9b75eb9b8 100755 --- a/engine/events/sweet_scent.asm +++ b/engine/events/sweet_scent.asm @@ -8,7 +8,7 @@ SweetScentFromMenu: ; 506bc .SweetScent: ; 0x506c8 reloadmappart - special Special_UpdateTimePals + special UpdateTimePals callasm GetPartyNick writetext UnknownText_0x50726 waitbutton diff --git a/engine/evolution_animation.asm b/engine/evolution_animation.asm index 1fa55c10a..049e1677b 100755 --- a/engine/evolution_animation.asm +++ b/engine/evolution_animation.asm @@ -122,7 +122,7 @@ EvolutionAnimation: ; 4e5e1 hlcoord 7, 2 ld d, $0 ld e, ANIM_MON_EVOLVE - predef AnimateFrontpic + predef Predef_AnimateFrontpic pop af ld [CurPartySpecies], a @@ -168,7 +168,7 @@ EvolutionAnimation: ; 4e5e1 ld a, $1 ld [wBoxAlignment], a ld de, vTiles2 - predef GetAnimatedFrontpicPredef + predef Predef_GetAnimatedFrontpic xor a ld [wBoxAlignment], a ret diff --git a/engine/evolve.asm b/engine/evolve.asm index d910ddca6..c1328e34f 100755 --- a/engine/evolve.asm +++ b/engine/evolve.asm @@ -6,7 +6,7 @@ EvolvePokemon: ; 421d8 ld c, a ld b, SET_FLAG call EvoFlagAction -EvolveAfterBattle: ; 421e6 +Predef_EvolveAfterBattle: ; 421e6 xor a ld [wMonTriedToEvolve], a dec a @@ -55,7 +55,7 @@ EvolveAfterBattle_MasterLoop push hl xor a ld [MonType], a - predef CopyPkmnToTempMon + predef Predef_CopyPkmnToTempMon pop hl .loop @@ -265,7 +265,7 @@ EvolveAfterBattle_MasterLoop ld hl, TempMonExp + 2 ld de, TempMonMaxHP ld b, $1 - predef CalcPkmnStats + predef Predef_CalcPkmnStats ld a, [CurPartyMon] ld hl, PartyMons @@ -301,7 +301,7 @@ EvolveAfterBattle_MasterLoop ld [wd265], a xor a ld [MonType], a - call LearnLevelMoves + call Predef_LearnLevelMoves ld a, [wd265] dec a call SetSeenAndCaughtMon @@ -311,7 +311,7 @@ EvolveAfterBattle_MasterLoop jr nz, .skip_unown ld hl, TempMonDVs - predef GetUnownLetter + predef Predef_GetUnownLetter callfar UpdateUnownDex .skip_unown @@ -429,7 +429,7 @@ Text_WhatEvolving: ; 0x42482 ; 0x42487 -LearnLevelMoves: ; 42487 +Predef_LearnLevelMoves: ; 42487 ld a, [wd265] ld [CurPartySpecies], a dec a @@ -484,7 +484,7 @@ LearnLevelMoves: ; 42487 ld [wd265], a call GetMoveName call CopyName1 - predef LearnMove + predef Predef_LearnMove pop hl jr .find_move @@ -495,7 +495,7 @@ LearnLevelMoves: ; 42487 ; 424e1 -FillMoves: ; 424e1 +Predef_FillMoves: ; 424e1 ; Fill in moves at de for CurPartySpecies at CurPartyLevel push hl @@ -621,7 +621,7 @@ ShiftMoves: ; 4256e EvoFlagAction: ; 42577 push de ld d, $0 - predef FlagPredef + predef Predef_Flag pop de ret ; 42581 diff --git a/engine/health.asm b/engine/health.asm index 0f7ba156d..eba75ddf4 100755 --- a/engine/health.asm +++ b/engine/health.asm @@ -52,7 +52,7 @@ HealPartyMon: ; c677 farcall RestoreAllPP ret -ComputeHPBarPixels: ; c699 +Predef_ComputeHPBarPixels: ; c699 ; e = bc * (6 * 8) / de ld a, b or c @@ -103,7 +103,7 @@ ComputeHPBarPixels: ; c699 ld e, 0 ret -AnimateHPBar: ; c6e0 +Predef_AnimateHPBar: ; c6e0 call WaitBGMap call _AnimateHPBar call WaitBGMap diff --git a/engine/intro_menu.asm b/engine/intro_menu.asm index a3efd8afe..da2d4b800 100755 --- a/engine/intro_menu.asm +++ b/engine/intro_menu.asm @@ -943,24 +943,24 @@ Intro_WipeInFrontpic: ; 6182 Intro_PrepTrainerPic: ; 619c ld de, vTiles2 - farcall GetTrainerPic + farcall Predef_GetTrainerPic xor a ld [hGraphicStartTile], a hlcoord 6, 4 lb bc, 7, 7 - predef PlaceGraphic + predef Predef_PlaceGraphic ret ; 61b4 ShrinkFrame: ; 61b4 ld de, vTiles2 ld c, $31 - predef DecompressPredef + predef Predef_Decompress xor a ld [hGraphicStartTile], a hlcoord 6, 4 lb bc, 7, 7 - predef PlaceGraphic + predef Predef_PlaceGraphic ret ; 61cd @@ -1048,7 +1048,7 @@ StartTitleScreen: ; 6219 ld [hWY], a ld b, SCGB_DIPLOMA call GetSGBLayout - call Special_UpdateTimePals + call UpdateTimePals ld a, [wIntroSceneFrameCounter] cp $5 jr c, .ok diff --git a/engine/item_effects.asm b/engine/item_effects.asm index 90dfdc7e0..78506604d 100644 --- a/engine/item_effects.asm +++ b/engine/item_effects.asm @@ -415,7 +415,7 @@ ParkBall: ; e8a2 ld [hBattleTurn], a ld [Buffer2], a ld [wNumHits], a - predef PlayBattleAnim + predef Predef_PlayBattleAnim ld a, [wWildMon] and a @@ -547,7 +547,7 @@ ParkBall: ; e8a2 ld a, [EnemyMonSpecies] ld [wd265], a - predef NewPokedexEntry + predef Predef_NewPokedexEntry .skip_pokedex ld a, [BattleType] @@ -567,7 +567,7 @@ ParkBall: ; e8a2 ld [MonType], a call ClearSprites - predef TryAddMonToParty + predef Predef_TryAddMonToParty farcall SetCaughtData @@ -623,7 +623,7 @@ ParkBall: ; e8a2 .SendToPC: call ClearSprites - predef SentPkmnIntoBox + predef Predef_SendPkmnIntoBox farcall SetBoxMonCaughtData @@ -985,7 +985,7 @@ LoveBallMultiplier: ld [MonType], a ld a, [CurBattleMon] ld [CurPartyMon], a - farcall GetGender + farcall Predef_GetGender jr c, .done1 ; no effect on genderless ld d, 0 ; male @@ -999,7 +999,7 @@ LoveBallMultiplier: ld [CurPartySpecies], a ld a, WILDMON ld [MonType], a - farcall GetGender + farcall Predef_GetGender jr c, .done2 ; no effect on genderless ld d, 0 ; male @@ -1289,7 +1289,7 @@ UpdateStatsAfterItem: ; ee8c ld a, MON_STAT_EXP - 1 call GetPartyParamLocation ld b, $1 - predef_jump CalcPkmnStats + predef_jump Predef_CalcPkmnStats ; ee9f RareCandy_StatBooster_ExitMenu: ; ee9f @@ -1428,7 +1428,7 @@ RareCandy: ; ef14 xor a ; PARTYMON ld [MonType], a - predef CopyPkmnToTempMon + predef Predef_CopyPkmnToTempMon hlcoord 9, 0 ld b, 10 @@ -1437,7 +1437,7 @@ RareCandy: ; ef14 hlcoord 11, 1 ld bc, $0004 - predef PrintTempMonStats + predef Predef_PrintTempMonStats call WaitPressAorB_BlinkCursor @@ -1445,7 +1445,7 @@ RareCandy: ; ef14 ld [MonType], a ld a, [CurPartySpecies] ld [wd265], a - predef LearnLevelMoves + predef Predef_LearnLevelMoves xor a ld [wForceEvolution], a @@ -1668,7 +1668,7 @@ RevivePokemon: ; f0d6 ld d, 0 ld hl, wBattleParticipantsIncludingFainted ld b, CHECK_FLAG - predef FlagPredef + predef Predef_Flag ld a, c and a jr z, .skip_to_revive @@ -1677,7 +1677,7 @@ RevivePokemon: ; f0d6 ld c, a ld hl, wBattleParticipantsNotFainted ld b, SET_FLAG - predef FlagPredef + predef Predef_Flag .skip_to_revive xor a @@ -1844,7 +1844,7 @@ HealHP_SFX_GFX: ; f1db (3:71db) call AddNTimes ld a, $2 ld [wWhichHPBar], a - predef_jump AnimateHPBar + predef_jump Predef_AnimateHPBar UseItem_SelectMon: ; f1f9 (3:71f9) call .SelectMon @@ -2957,7 +2957,7 @@ UseBallInTrainerBattle: ; f7a0 ld [wBattleAnimParam], a ld [hBattleTurn], a ld [wNumHits], a - predef PlayBattleAnim + predef Predef_PlayBattleAnim ld hl, BlockedTheBallText call PrintText ld hl, DontBeAThiefText @@ -3104,7 +3104,7 @@ ApplyPPUp: ; f84c call GetPartyParamLocation push hl ld de, Buffer1 - predef FillPP + predef Predef_FillPP pop hl ld bc, MON_PP - MON_MOVES add hl, bc diff --git a/engine/learn.asm b/engine/learn.asm index d2751235f..ceb814650 100755 --- a/engine/learn.asm +++ b/engine/learn.asm @@ -1,4 +1,4 @@ -LearnMove: ; 6508 +Predef_LearnMove: ; 6508 call LoadTileMapToTempTileMap ld a, [CurPartyMon] ld hl, PartyMonNicknames @@ -144,7 +144,7 @@ ForgetMove: ; 65d3 hlcoord 5 + 2, 2 + 2 ld a, SCREEN_WIDTH * 2 ld [Buffer1], a - predef ListMoves + predef Predef_ListMoves ; wMenuData3 ld a, $4 ld [w2DMenuCursorInitY], a diff --git a/engine/link.asm b/engine/link.asm index de914c492..3d1fd0da4 100755 --- a/engine/link.asm +++ b/engine/link.asm @@ -150,7 +150,7 @@ TimeCapsule: ; 2805d ld [wd265], a push hl push de - callfar ConvertMon_1to2 + callfar Predef_ConvertMon_1to2 pop de pop hl ld a, [wd265] @@ -449,7 +449,7 @@ Gen2ToGen2LinkComms: ; 28177 pop af ld [rIF], a - predef StartBattle + predef Predef_StartBattle ld a, [rIF] ld h, a @@ -786,7 +786,7 @@ Link_PrepPartyData_Gen1: ; 28499 add hl, bc ld c, STAT_SATK ld b, TRUE - predef CalcPkmnStatC + predef Predef_CalcPkmnStatC pop bc pop de @@ -993,7 +993,7 @@ Function2868a: ; 2868a push bc push de ld [wd265], a - callfar ConvertMon_1to2 + callfar Predef_ConvertMon_1to2 pop de pop bc ld a, [wd265] @@ -1072,7 +1072,7 @@ Function2868a: ; 2868a add hl, bc ld c, STAT_SATK ld b, TRUE - predef CalcPkmnStatC + predef Predef_CalcPkmnStatC pop bc pop hl ld a, [hQuotient + 1] @@ -1085,7 +1085,7 @@ Function2868a: ; 2868a add hl, bc ld c, STAT_SDEF ld b, TRUE - predef CalcPkmnStatC + predef Predef_CalcPkmnStatC pop bc pop hl ld a, [hQuotient + 1] @@ -1362,7 +1362,7 @@ Function28926: ; 28926 hlcoord 0, 15 ld b, 1 ld c, 18 - call LinkTextboxPredef + call Predef_LinkTextbox hlcoord 2, 16 ld de, .String_Stats_Trade call PlaceString @@ -1471,7 +1471,7 @@ Function28926: ; 28926 hlcoord 0, 12 ld b, 4 ld c, 18 - call LinkTextboxPredef + call Predef_LinkTextbox farcall Link_WaitBGMap ld hl, .Text_CantTradeLastMon bccoord 1, 14 @@ -1493,7 +1493,7 @@ Function28926: ; 28926 hlcoord 0, 12 ld b, 4 ld c, 18 - call LinkTextboxPredef + call Predef_LinkTextbox farcall Link_WaitBGMap ld hl, .Text_Abnormal bccoord 1, 14 @@ -1503,7 +1503,7 @@ Function28926: ; 28926 hlcoord 0, 12 ld b, 4 ld c, 18 - call LinkTextboxPredef + call Predef_LinkTextbox hlcoord 1, 14 ld de, String_TooBadTheTradeWasCanceled call PlaceString @@ -1648,7 +1648,7 @@ LinkTrade: ; 28b87 hlcoord 0, 12 ld b, $4 ld c, $12 - call LinkTextboxPredef + call Predef_LinkTextbox farcall Link_WaitBGMap ld a, [wd002] ld hl, PartySpecies @@ -1677,7 +1677,7 @@ LinkTrade: ; 28b87 hlcoord 10, 7 ld b, 3 ld c, 7 - call LinkTextboxPredef + call Predef_LinkTextbox ld de, String28eab hlcoord 12, 8 call PlaceString @@ -1717,7 +1717,7 @@ LinkTrade: ; 28b87 hlcoord 0, 12 ld b, 4 ld c, 18 - call LinkTextboxPredef + call Predef_LinkTextbox hlcoord 1, 14 ld de, String_TooBadTheTradeWasCanceled call PlaceString @@ -1734,7 +1734,7 @@ LinkTrade: ; 28b87 hlcoord 0, 12 ld b, 4 ld c, 18 - call LinkTextboxPredef + call Predef_LinkTextbox hlcoord 1, 14 ld de, String_TooBadTheTradeWasCanceled call PlaceString @@ -1891,11 +1891,11 @@ LinkTrade: ; 28b87 ld a, [hLinkPlayerNumber] cp $1 jr z, .player_2 - predef TradeAnimation + predef Predef_TradeAnimation jr .done_animation .player_2 - predef TradeAnimationPlayer2 + predef Predef_TradeAnimationPlayer2 .done_animation pop af @@ -1913,7 +1913,7 @@ LinkTrade: ; 28b87 ld de, TempMonSpecies ld bc, PARTYMON_STRUCT_LENGTH call CopyBytes - predef AddTempmonToParty + predef Predef_AddTempmonToParty ld a, [PartyCount] dec a ld [CurPartyMon], a @@ -1964,7 +1964,7 @@ LinkTrade: ; 28b87 hlcoord 0, 12 ld b, 4 ld c, 18 - call LinkTextboxPredef + call Predef_LinkTextbox hlcoord 1, 14 ld de, String28ebd call PlaceString @@ -2001,7 +2001,7 @@ String_TooBadTheTradeWasCanceled: ; 28ece next "was canceled!@" -LinkTextboxPredef: ; 28eef +Predef_LinkTextbox: ; 28eef ld d, h ld e, l farcall LinkTextbox @@ -2023,11 +2023,11 @@ Unreferenced_Function28f09: ; 28f09 hlcoord 0, 0 ld b, 6 ld c, 18 - call LinkTextboxPredef + call Predef_LinkTextbox hlcoord 0, 8 ld b, 6 ld c, 18 - call LinkTextboxPredef + call Predef_LinkTextbox farcall PlaceTradePartnerNamesAndParty ret ; 28f24 @@ -2584,7 +2584,7 @@ Unreferenced_Function29fe4: call GetSRAMBank ld d, $0 ld b, CHECK_FLAG - predef FlagPredef + predef Predef_Flag call CloseSRAM ld a, c and a diff --git a/engine/link_2.asm b/engine/link_2.asm index 72e5262b3..03b95b39a 100644 --- a/engine/link_2.asm +++ b/engine/link_2.asm @@ -3,7 +3,7 @@ LinkMonStatsScreen: ; 4d319 dec a ld [CurPartyMon], a call LowVolume - predef StatsScreenInit + predef Predef_StatsScreenInit ld a, [CurPartyMon] inc a ld [wMenuCursorY], a diff --git a/engine/link_trade.asm b/engine/link_trade.asm index 07b471640..f85403a29 100755 --- a/engine/link_trade.asm +++ b/engine/link_trade.asm @@ -181,7 +181,7 @@ Function16d6e1: ; 16d6e1 hlcoord 4, 10 ld b, 1 ld c, 10 - predef LinkTextboxPredef + predef Predef_LinkTextbox hlcoord 5, 11 ld de, .Waiting call PlaceString diff --git a/engine/map_setup.asm b/engine/map_setup.asm index 7e935c0ce..b3905b71e 100644 --- a/engine/map_setup.asm +++ b/engine/map_setup.asm @@ -233,7 +233,7 @@ FadeOldMapMusic: ; 15567 ; 1556d RetainOldPalettes: ; 1556d - farcall _Special_UpdateTimePals + farcall _UpdateTimePals ret RotatePalettesRightMapAndMusic: ; 15574 diff --git a/engine/mart.asm b/engine/mart.asm index dc47ba029..4eff21fa3 100755 --- a/engine/mart.asm +++ b/engine/mart.asm @@ -525,7 +525,7 @@ StandardMartAskPurchaseQuantity: ; 15d97 MartConfirmPurchase: ; 15d97 - predef PartyMonItemName + predef Predef_PartyMonItemName ld a, MARTTEXT_COSTS_THIS_MUCH call LoadBuyMenuText call YesNoBox @@ -864,7 +864,7 @@ SellMenu: ; 15eb3 ld a, [wMartItemID] ld hl, NumItems call TossItem - predef PartyMonItemName + predef Predef_PartyMonItemName hlcoord 1, 14 lb bc, 3, 18 call ClearBox diff --git a/engine/mon_stats.asm b/engine/mon_stats.asm index fce5fbcac..1a08b2be5 100644 --- a/engine/mon_stats.asm +++ b/engine/mon_stats.asm @@ -1,8 +1,8 @@ -DrawPlayerHP: ; 50b0a +Predef_DrawPlayerHP: ; 50b0a ld a, $1 jr DrawHP -DrawEnemyHP: ; 50b0e +Predef_DrawEnemyHP: ; 50b0e ld a, $2 DrawHP: ; 50b10 @@ -43,7 +43,7 @@ DrawHP: ; 50b10 ld c, e .not_boxmon - predef ComputeHPBarPixels + predef Predef_ComputeHPBarPixels ld a, 6 ld d, a ld c, a @@ -82,7 +82,7 @@ DrawHP: ; 50b10 pop de ret -PrintTempMonStats: ; 50b7b +Predef_PrintTempMonStats: ; 50b7b ; Print TempMon's stats at hl, with spacing bc. push bc push hl @@ -121,7 +121,7 @@ PrintTempMonStats: ; 50b7b next "SPEED" next "@" -GetGender: ; 50bdd +Predef_GetGender: ; 50bdd ; Return the gender of a given monster (CurPartyMon/CurOTMon/CurWildMon). ; When calling this function, a should be set to an appropriate MonType value. @@ -235,7 +235,7 @@ GetGender: ; 50bdd scf ret -ListMovePP: ; 50c50 +Predef_ListMovePP: ; 50c50 ld a, [wNumMoves] inc a ld c, a @@ -343,7 +343,7 @@ UnusedPredef22: call GetNick pop hl call PlaceString - call CopyPkmnToTempMon + call Predef_CopyPkmnToTempMon pop hl ld a, [CurPartySpecies] cp EGG @@ -352,7 +352,7 @@ UnusedPredef22: ld bc, -12 add hl, bc ld b, $0 - call DrawEnemyHP + call Predef_DrawEnemyHP pop hl ld bc, 5 add hl, bc @@ -363,7 +363,7 @@ UnusedPredef22: .egg ret -PlaceStatusString: ; 50d0a +Predef_PlaceStatusString: ; 50d0a push de inc de inc de @@ -373,7 +373,7 @@ PlaceStatusString: ; 50d0a ld a, [de] or b pop de - jr nz, PlaceNonFaintStatus + jr nz, Predef_PlaceNonFaintStatus push de ld de, FntString call CopyStatusString @@ -396,7 +396,7 @@ CopyStatusString: ; 50d25 ld [hl], a ret -PlaceNonFaintStatus: ; 50d2e +Predef_PlaceNonFaintStatus: ; 50d2e push de ld a, [de] ld de, PsnString @@ -430,7 +430,7 @@ BrnString: db "BRN@" FrzString: db "FRZ@" ParString: db "PAR@" -ListMoves: ; 50d6f +Predef_ListMoves: ; 50d6f ; List moves at hl, spaced every [Buffer1] tiles. ld de, wListMoves_MoveIndicesBuffer ld b, $0 diff --git a/engine/move_mon.asm b/engine/move_mon.asm index 90abe2903..9128eabdd 100755 --- a/engine/move_mon.asm +++ b/engine/move_mon.asm @@ -1,4 +1,4 @@ -TryAddMonToParty: ; d88c +Predef_TryAddMonToParty: ; d88c ; Check if to copy wild Pkmn or generate new Pkmn ; Whose is it? ld de, PartyCount @@ -120,7 +120,7 @@ GeneratePartyMonStats: ; d906 endr ld [hl], a ld [Buffer1], a - predef FillMoves + predef Predef_FillMoves .next pop de @@ -195,7 +195,7 @@ endr push de inc hl inc hl - call FillPP + call Predef_FillPP pop de pop hl rept 4 @@ -224,7 +224,7 @@ endr ld a, $1 ld c, a ld b, FALSE - call CalcPkmnStatC + call Predef_CalcPkmnStatC ld a, [hProduct + 2] ld [de], a inc de @@ -297,7 +297,7 @@ endr ld bc, MON_STAT_EXP - 1 add hl, bc ld b, $0 ; if b = 1, then stat calculation takes stat exp into account. - call CalcPkmnStats + call Predef_CalcPkmnStats .next3 ld a, [MonType] @@ -311,7 +311,7 @@ endr dec a ld bc, PARTYMON_STRUCT_LENGTH call AddNTimes - predef GetUnownLetter + predef Predef_GetUnownLetter callfar UpdateUnownDex .done @@ -319,7 +319,7 @@ endr ret ; da6d -FillPP: ; da6d +Predef_FillPP: ; da6d push bc ld b, NUM_MOVES .loop @@ -350,7 +350,7 @@ FillPP: ; da6d ret ; da96 -AddTempmonToParty: ; da96 +Predef_AddTempmonToParty: ; da96 ld hl, PartyCount ld a, [hl] cp PARTY_LENGTH @@ -422,7 +422,7 @@ AddTempmonToParty: ; da96 dec a ld bc, PARTYMON_STRUCT_LENGTH call AddNTimes - predef GetUnownLetter + predef Predef_GetUnownLetter callfar UpdateUnownDex ld a, [wFirstUnownSeen] and a @@ -434,7 +434,7 @@ AddTempmonToParty: ; da96 and a ret -SentGetPkmnIntoFromBox: ; db3f +Predef_SendGetPkmnIntoFromBox: ; db3f ; Sents/Gets Pkmn into/from Box depending on Parameter ; wPokemonWithdrawDepositParameter == 0: get Pkmn into Party ; wPokemonWithdrawDepositParameter == 1: sent Pkmn into Box @@ -597,7 +597,7 @@ SentGetPkmnIntoFromBox: ; db3f srl a add $2 ld [MonType], a - predef CopyPkmnToTempMon + predef Predef_CopyPkmnToTempMon callfar CalcLevel ld a, d ld [CurPartyLevel], a @@ -617,7 +617,7 @@ SentGetPkmnIntoFromBox: ; db3f push bc ld b, $1 - call CalcPkmnStats + call Predef_CalcPkmnStats pop bc ld a, [wPokemonWithdrawDepositParameter] @@ -830,7 +830,7 @@ Functiondd64: ; dd64 add hl, bc push bc ld b, $1 - call CalcPkmnStats + call Predef_CalcPkmnStats ld hl, PartyMon1Moves ld a, [PartyCount] dec a @@ -840,7 +840,7 @@ Functiondd64: ; dd64 ld e, l ld a, $1 ld [Buffer1], a - predef FillMoves + predef Predef_FillMoves ld a, [PartyCount] dec a ld [CurPartyMon], a @@ -904,8 +904,8 @@ DepositBreedmon: ; de44 ld bc, BOXMON_STRUCT_LENGTH jp CopyBytes -SentPkmnIntoBox: ; de6e -; Sents the Pkmn into one of Bills Boxes +Predef_SendPkmnIntoBox: ; de6e +; Sends the Pkmn into one of Bills Boxes ; the data comes mainly from 'EnemyMon:' ld a, BANK(sBoxCount) call GetSRAMBank @@ -1010,7 +1010,7 @@ SentPkmnIntoBox: ; de6e cp UNOWN jr nz, .not_unown ld hl, sBoxMon1DVs - predef GetUnownLetter + predef Predef_GetUnownLetter callfar UpdateUnownDex .not_unown @@ -1086,7 +1086,7 @@ ShiftBoxMon: ; df47 ret ; df8c -GiveEgg:: ; df8c +Predef_GiveEgg:: ; df8c ld a, [CurPartySpecies] push af callfar GetPreEvolution @@ -1094,7 +1094,7 @@ GiveEgg:: ; df8c ld a, [CurPartySpecies] dec a -; TryAddMonToParty sets Seen and Caught flags +; Predef_TryAddMonToParty sets Seen and Caught flags ; when it is successful. This routine will make ; sure that we aren't newly setting flags. push af @@ -1104,11 +1104,11 @@ GiveEgg:: ; df8c call CheckSeenMon push bc - call TryAddMonToParty + call Predef_TryAddMonToParty ; If we haven't caught this Pokemon before receiving ; the Egg, reset the flag that was just set by -; TryAddMonToParty. +; Predef_TryAddMonToParty. pop bc ld a, c and a @@ -1119,12 +1119,12 @@ GiveEgg:: ; df8c ld d, $0 ld hl, PokedexCaught ld b, RESET_FLAG - predef FlagPredef + predef Predef_Flag .skip_caught_flag ; If we haven't seen this Pokemon before receiving ; the Egg, reset the flag that was just set by -; TryAddMonToParty. +; Predef_TryAddMonToParty. pop bc ld a, c and a @@ -1135,7 +1135,7 @@ GiveEgg:: ; df8c ld d, $0 ld hl, PokedexSeen ld b, RESET_FLAG - predef FlagPredef + predef Predef_Flag .skip_seen_flag pop af @@ -1360,7 +1360,7 @@ ComputeNPCTrademonStats: ; e134 ld a, MON_STAT_EXP - 1 call GetPartyParamLocation ld b, $1 - call CalcPkmnStats + call Predef_CalcPkmnStats pop de ld a, MON_HP call GetPartyParamLocation @@ -1372,7 +1372,7 @@ ComputeNPCTrademonStats: ; e134 ret ; e167 -CalcPkmnStats: ; e167 +Predef_CalcPkmnStats: ; e167 ; Calculates all 6 Stats of a Pkmn ; b: Take into account stat EXP if TRUE ; 'c' counts from 1-6 and points with 'BaseStats' to the base value @@ -1382,7 +1382,7 @@ CalcPkmnStats: ; e167 ld c, $0 .loop inc c - call CalcPkmnStatC + call Predef_CalcPkmnStatC ld a, [hMultiplicand + 1] ld [de], a inc de @@ -1395,7 +1395,7 @@ CalcPkmnStats: ; e167 ret ; e17b -CalcPkmnStatC: ; e17b +Predef_CalcPkmnStatC: ; e17b ; 'c' is 1-6 and points to the BaseStat ; 1: HP ; 2: Attack @@ -1596,7 +1596,7 @@ GivePoke:: ; e277 push bc xor a ; PARTYMON ld [MonType], a - call TryAddMonToParty + call Predef_TryAddMonToParty jr nc, .failed ld hl, PartyMonNicknames ld a, [PartyCount] @@ -1626,7 +1626,7 @@ GivePoke:: ; e277 ld a, [CurPartySpecies] ld [TempEnemyMonSpecies], a callfar LoadEnemyMon - call SentPkmnIntoBox + call Predef_SendPkmnIntoBox jp nc, .FailedToGiveMon ld a, BOXMON ld [MonType], a diff --git a/engine/mystery_gift.asm b/engine/mystery_gift.asm index c4a047e7e..e7cb4ea91 100755 --- a/engine/mystery_gift.asm +++ b/engine/mystery_gift.asm @@ -1117,7 +1117,7 @@ MysteryGift_CheckAndSetDecorationAlreadyReceived: ; 105069 (41:5069) ld d, $0 ld b, CHECK_FLAG ld hl, sMysteryGiftDecorationsReceived - predef_id FlagPredef + predef_id Predef_Flag push hl push bc call Predef @@ -1129,7 +1129,7 @@ MysteryGift_CheckAndSetDecorationAlreadyReceived: ; 105069 (41:5069) ret nz call GetMysteryGiftBank ld b, SET_FLAG - predef FlagPredef + predef Predef_Flag call CloseSRAM xor a ret @@ -1142,7 +1142,7 @@ MysteryGift_CopyReceivedDecosToPC: ; 105091 (41:5091) ld d, $0 ld b, CHECK_FLAG ld hl, sMysteryGiftDecorationsReceived - predef FlagPredef + predef Predef_Flag ld a, c and a pop bc diff --git a/engine/namingscreen.asm b/engine/namingscreen.asm index f34ca520e..6f9a0f557 100755 --- a/engine/namingscreen.asm +++ b/engine/namingscreen.asm @@ -103,7 +103,7 @@ NamingScreen: ; 116c1 inc de hlcoord 5, 4 call PlaceString - farcall GetGender + farcall Predef_GetGender jr c, .genderless ld a, "♂" jr nz, .place_gender diff --git a/engine/npctrade.asm b/engine/npctrade.asm index 49c22829e..c1726ed04 100755 --- a/engine/npctrade.asm +++ b/engine/npctrade.asm @@ -67,7 +67,7 @@ NPCTrade:: ; fcba8 push af ld a, [wcf64] push af - predef TradeAnimation + predef Predef_TradeAnimation pop af ld [wcf64], a pop af @@ -88,12 +88,12 @@ CheckTradeGender: ; fcc23 cp 1 jr z, .check_male - farcall GetGender + farcall Predef_GetGender jr nz, .not_matching jr .matching .check_male - farcall GetGender + farcall Predef_GetGender jr z, .not_matching .matching @@ -109,7 +109,7 @@ TradeFlagAction: ; fcc4a ld hl, wTradeFlags ld a, [wJumptableIndex] ld c, a - predef FlagPredef + predef Predef_Flag ld a, c and a ret @@ -196,7 +196,7 @@ DoNPCTrade: ; fcc63 ld [MonType], a ld [wPokemonWithdrawDepositParameter], a callfar RemoveMonFromPartyOrBox - predef TryAddMonToParty + predef Predef_TryAddMonToParty ld e, TRADE_DIALOG call GetTradeAttribute diff --git a/engine/party_menu.asm b/engine/party_menu.asm index 0415e29e4..59a9904aa 100644 --- a/engine/party_menu.asm +++ b/engine/party_menu.asm @@ -188,7 +188,7 @@ PlacePartymonHPBar: ; 50117 ld d, a ld a, [hli] ld e, a - predef ComputeHPBarPixels + predef Predef_ComputeHPBarPixels ret ; 50138 @@ -297,7 +297,7 @@ PlacePartyMonStatus: ; 501b2 ld e, l ld d, h pop hl - call PlaceStatusString + call Predef_PlaceStatusString .next pop hl @@ -329,7 +329,7 @@ PlacePartyMonTMHMCompatibility: ; 501e0 add hl, de ld a, [hl] ld [CurPartySpecies], a - predef CanLearnTMHMMove + predef Predef_CanLearnTMHMMove pop hl call .PlaceAbleNotAble call PlaceString @@ -468,7 +468,7 @@ PlacePartyMonGender: ; 502b1 ld [CurPartyMon], a xor a ld [MonType], a - call GetGender + call Predef_GetGender ld de, .unknown jr c, .got_gender ld de, .male diff --git a/engine/pic_animation.asm b/engine/pic_animation.asm index 09c800c60..0356f9922 100644 --- a/engine/pic_animation.asm +++ b/engine/pic_animation.asm @@ -1,54 +1,54 @@ ; Pic animation arrangement. -AnimateMon_Slow_Normal: ; d0000 +UnusedPredef_AnimateMon_Slow_Normal: ; d0000 hlcoord 12, 0 ld a, [wBattleMode] cp WILD_BATTLE jr z, .wild ld e, ANIM_MON_SLOW ld d, $0 - call AnimateFrontpic + call Predef_AnimateFrontpic ret .wild ld e, ANIM_MON_NORMAL ld d, $0 - call AnimateFrontpic + call Predef_AnimateFrontpic ret ; d001a AnimateMon_Menu: ; d001a ld e, ANIM_MON_MENU ld d, $0 - call AnimateFrontpic + call Predef_AnimateFrontpic ret ; d0022 AnimateMon_Trade: ; d0022 ld e, ANIM_MON_TRADE ld d, $0 - call AnimateFrontpic + call Predef_AnimateFrontpic ret ; d002a AnimateMon_Evolve: ; d002a ld e, ANIM_MON_EVOLVE ld d, $0 - call AnimateFrontpic + call Predef_AnimateFrontpic ret ; d0032 AnimateMon_Hatch: ; d0032 ld e, ANIM_MON_HATCH ld d, $0 - call AnimateFrontpic + call Predef_AnimateFrontpic ret ; d003a AnimateMon_Unused: ; d003a ld e, ANIM_MON_UNUSED ld d, $0 - call AnimateFrontpic + call Predef_AnimateFrontpic ret ; d0042 @@ -86,10 +86,10 @@ PokeAnims: ; d0042 .Egg2: pokeanim Idle, Play -AnimateFrontpic: ; d008e +Predef_AnimateFrontpic: ; d008e call AnimateMon_CheckIfPokemon ret c - call LoadMonAnimation + call Predef_LoadMonAnimation .loop call SetUpPokeAnim push af @@ -99,7 +99,7 @@ AnimateFrontpic: ; d008e ret ; d00a3 -LoadMonAnimation: ; d00a3 +Predef_LoadMonAnimation: ; d00a3 push hl ld c, e ld b, 0 @@ -1114,7 +1114,7 @@ UnusedPredef48: ; d0669 Predef 48 ld a, $1 ld [wBoxAlignment], a -HOF_AnimateFrontpic: ; d066e Predef 49 +HOF_Predef_AnimateFrontpic: ; d066e Predef 49 call AnimateMon_CheckIfPokemon jr c, .fail ld h, d @@ -1122,12 +1122,12 @@ HOF_AnimateFrontpic: ; d066e Predef 49 push bc push hl ld de, vTiles2 - predef GetAnimatedFrontpicPredef + predef Predef_GetAnimatedFrontpic pop hl pop bc ld d, 0 ld e, c - call AnimateFrontpic + call Predef_AnimateFrontpic xor a ld [wBoxAlignment], a ret diff --git a/engine/player_gfx.asm b/engine/player_gfx.asm index cc1d56ae2..15c5756f2 100644 --- a/engine/player_gfx.asm +++ b/engine/player_gfx.asm @@ -30,7 +30,7 @@ MovePlayerPic: ; 88266 xor a ld [hBGMapMode], a lb bc, 7, 7 - predef PlaceGraphic + predef Predef_PlaceGraphic xor a ld [hBGMapThird], a call WaitBGMap @@ -141,7 +141,7 @@ GetChrisBackpic: ; 88830 ld b, BANK(ChrisBackpic) ld de, vTiles2 tile $31 ld c, 7 * 7 - predef DecompressPredef + predef Predef_Decompress ret HOF_LoadTrainerFrontpic: ; 88840 @@ -203,7 +203,7 @@ DrawIntroPlayerPic: ; 88874 ld [hGraphicStartTile], a hlcoord 6, 4 lb bc, 7, 7 - predef PlaceGraphic + predef Predef_PlaceGraphic ret ChrisPic: ; 888a9 diff --git a/engine/pokedex.asm b/engine/pokedex.asm index 9e5f0c411..2f5ade38b 100644 --- a/engine/pokedex.asm +++ b/engine/pokedex.asm @@ -441,7 +441,7 @@ DexEntryScreen_MenuActionJumptable: ; 402f2 call Pokedex_GetSelectedMon ld a, [wDexCurrentLocation] ld e, a - predef Pokedex_GetArea + predef Predef_Pokedex_GetArea call Pokedex_BlackOutBG call DelayFrame xor a @@ -2399,7 +2399,7 @@ Pokedex_LoadSelectedMonTiles: ; 4143b ld [CurPartySpecies], a call GetBaseData ld de, vTiles2 - predef GetMonFrontpic + predef Predef_GetMonFrontpic ret .QuestionMark: @@ -2552,7 +2552,7 @@ Pokedex_LoadUnownFrontpicTiles: ; 41a58 (10:5a58) ld [CurPartySpecies], a call GetBaseData ld de, vTiles2 tile $00 - predef GetMonFrontpic + predef Predef_GetMonFrontpic pop af ld [UnownLetter], a ret @@ -2582,7 +2582,7 @@ _NewPokedexEntry: ; 41a7f call WaitBGMap call GetBaseData ld de, vTiles2 - predef GetMonFrontpic + predef Predef_GetMonFrontpic ld a, SCGB_POKEDEX call Pokedex_GetSGBLayout ld a, [CurPartySpecies] diff --git a/engine/pokegear.asm b/engine/pokegear.asm index 2d9dfdbb6..6fe2b0aa5 100755 --- a/engine/pokegear.asm +++ b/engine/pokegear.asm @@ -2331,7 +2331,7 @@ HasVisitedSpawn: ; 91c50 ld hl, wVisitedSpawns ld b, CHECK_FLAG ld d, 0 - predef FlagPredef + predef Predef_Flag ld a, c ret @@ -2440,7 +2440,7 @@ FlyMap: ; 91c90 ; 91d11 -Pokedex_GetArea: ; 91d11 +Predef_Pokedex_GetArea: ; 91d11 ; e: Current landmark ld a, [wTownMapPlayerIconLandmark] push af diff --git a/engine/predef.asm b/engine/predef.asm index 0c8a55d90..a8eccfd21 100644 --- a/engine/predef.asm +++ b/engine/predef.asm @@ -30,79 +30,79 @@ PredefPointers:: ; 856b ; $4b Predef pointers ; address, bank - add_predef LearnMove ; $0 + add_predef Predef_LearnMove ; $0 add_predef DummyPredef1 - add_predef HealParty - add_predef FlagPredef - add_predef ComputeHPBarPixels - add_predef FillPP - add_predef TryAddMonToParty - add_predef AddTempmonToParty - add_predef SentGetPkmnIntoFromBox - add_predef SentPkmnIntoBox - add_predef GiveEgg - add_predef AnimateHPBar - add_predef CalcPkmnStats - add_predef CalcPkmnStatC - add_predef CanLearnTMHMMove - add_predef GetTMHMMove - add_predef LinkTextboxPredef ; $ 10 - add_predef PrintMoveDesc - add_predef UpdatePlayerHUD - add_predef PlaceGraphic - add_predef CheckPlayerPartyForFitPkmn - add_predef UpdateEnemyHUD - add_predef StartBattle - add_predef FillInExpBar - add_predef GetBattleMonBackpic ; $18 - add_predef GetEnemyMonFrontpic - add_predef LearnLevelMoves - add_predef FillMoves - add_predef EvolveAfterBattle - add_predef TradeAnimationPlayer2 - add_predef TradeAnimation - add_predef CopyPkmnToTempMon - add_predef ListMoves ; $20 - add_predef PlaceNonFaintStatus + add_predef HealParty ; this is both a special and a predef + add_predef Predef_Flag + add_predef Predef_ComputeHPBarPixels + add_predef Predef_FillPP + add_predef Predef_TryAddMonToParty + add_predef Predef_AddTempmonToParty + add_predef Predef_SendGetPkmnIntoFromBox + add_predef Predef_SendPkmnIntoBox + add_predef Predef_GiveEgg + add_predef Predef_AnimateHPBar + add_predef Predef_CalcPkmnStats + add_predef Predef_CalcPkmnStatC + add_predef Predef_CanLearnTMHMMove + add_predef Predef_GetTMHMMove + add_predef Predef_LinkTextbox ; $ 10 + add_predef Predef_PrintMoveDesc + add_predef Predef_UpdatePlayerHUD + add_predef Predef_PlaceGraphic + add_predef Predef_CheckPlayerPartyForFitPkmn + add_predef Predef_UpdateEnemyHUD + add_predef Predef_StartBattle + add_predef Predef_FillInExpBar + add_predef Predef_GetBattleMonBackpic ; $18 + add_predef Predef_GetEnemyMonFrontpic + add_predef Predef_LearnLevelMoves + add_predef Predef_FillMoves + add_predef Predef_EvolveAfterBattle + add_predef Predef_TradeAnimationPlayer2 + add_predef Predef_TradeAnimation + add_predef Predef_CopyPkmnToTempMon + add_predef Predef_ListMoves ; $20 + add_predef Predef_PlaceNonFaintStatus add_predef UnusedPredef22 - add_predef ListMovePP - add_predef GetGender - add_predef StatsScreenInit - add_predef DrawPlayerHP - add_predef DrawEnemyHP - add_predef PrintTempMonStats ; $28 - add_predef GetTypeName - add_predef PrintMoveType - add_predef PrintType - add_predef PrintMonTypes - add_predef GetUnownLetter - add_predef LoadPoisonBGPals + add_predef Predef_ListMovePP + add_predef Predef_GetGender + add_predef Predef_StatsScreenInit + add_predef Predef_DrawPlayerHP + add_predef Predef_DrawEnemyHP + add_predef Predef_PrintTempMonStats ; $28 + add_predef Predef_GetTypeName + add_predef Predef_PrintMoveType + add_predef Predef_PrintType + add_predef Predef_PrintMonTypes + add_predef Predef_GetUnownLetter + add_predef Predef_LoadPoisonBGPals add_predef DummyPredef2F - add_predef InitSGBBorder ; $30 - add_predef LoadSGBLayout - add_predef Pokedex_GetArea + add_predef Predef_InitSGBBorder ; $30 + add_predef Predef_LoadSGBLayout + add_predef Predef_Pokedex_GetArea add_predef UnusedPredef_CheckContestMon - add_predef DoBattleTransition + add_predef Predef_DoBattleTransition add_predef DummyPredef35 add_predef DummyPredef36 - add_predef PlayBattleAnim + add_predef Predef_PlayBattleAnim add_predef DummyPredef38 ; $38 add_predef DummyPredef39 add_predef DummyPredef3A - add_predef PartyMonItemName - add_predef GetMonFrontpic - add_predef GetMonBackpic - add_predef GetAnimatedFrontpicPredef - add_predef GetTrainerPic - add_predef DecompressPredef ; $40 - add_predef CheckTypeMatchup - add_predef ConvertMon_1to2 - add_predef NewPokedexEntry - add_predef AnimateMon_Slow_Normal - add_predef PlaceStatusString - add_predef LoadMonAnimation - add_predef AnimateFrontpic + add_predef Predef_PartyMonItemName + add_predef Predef_GetMonFrontpic + add_predef Predef_GetMonBackpic + add_predef Predef_GetAnimatedFrontpic + add_predef Predef_GetTrainerPic + add_predef Predef_Decompress ; $40 + add_predef Predef_CheckTypeMatchup + add_predef Predef_ConvertMon_1to2 + add_predef Predef_NewPokedexEntry + add_predef UnusedPredef_AnimateMon_Slow_Normal + add_predef Predef_PlaceStatusString + add_predef Predef_LoadMonAnimation + add_predef Predef_AnimateFrontpic add_predef UnusedPredef48 ; $48 - add_predef HOF_AnimateFrontpic + add_predef HOF_Predef_AnimateFrontpic dbw $ff, InexplicablyEmptyFunction ; ??? ; 864c diff --git a/engine/print_party.asm b/engine/print_party.asm index f2420dfe8..1902ca656 100755 --- a/engine/print_party.asm +++ b/engine/print_party.asm @@ -157,7 +157,7 @@ PrintPartyMonPage1: ; 1dc381 xor a ld [MonType], a - farcall CopyPkmnToTempMon + farcall Predef_CopyPkmnToTempMon hlcoord 0, 7 ld b, 9 ld c, 18 @@ -213,7 +213,7 @@ PrintPartyMonPage1: ; 1dc381 call Function1dc51a call Function1dc52c ld hl, TempMonDVs - predef GetUnownLetter + predef Predef_GetUnownLetter ld hl, wBoxAlignment xor a ld [hl], a @@ -241,7 +241,7 @@ PrintPartyMonPage2: ; 1dc47b call LoadFontsBattleExtra xor a ld [MonType], a - farcall CopyPkmnToTempMon + farcall Predef_CopyPkmnToTempMon hlcoord 0, 0 ld b, 15 ld c, 18 @@ -316,7 +316,7 @@ Function1dc51a: ; 1dc51a ; 1dc52c Function1dc52c: ; 1dc52c - farcall GetGender + farcall Predef_GetGender ld a, " " jr c, .got_gender ld a, "♂" diff --git a/engine/printer.asm b/engine/printer.asm index 002620606..0e0696e2b 100755 --- a/engine/printer.asm +++ b/engine/printer.asm @@ -860,7 +860,7 @@ Printer_GetMonGender: ; 8498a (21:498a) ld [CurPartyMon], a ld a, TEMPMON ld [MonType], a - farcall GetGender + farcall Predef_GetGender ld a, " " jr c, .got_gender ld a, "♂" diff --git a/engine/routines/correcterrorsinplayerparty.asm b/engine/routines/correcterrorsinplayerparty.asm index 639e5c544..fcc2f36af 100644 --- a/engine/routines/correcterrorsinplayerparty.asm +++ b/engine/routines/correcterrorsinplayerparty.asm @@ -90,7 +90,7 @@ Unreferenced_CorrectErrorsInPlayerParty: ld hl, MON_STAT_EXP - 1 add hl, bc ld b, $1 - predef CalcPkmnStats + predef Predef_CalcPkmnStats pop hl ld bc, PARTYMON_STRUCT_LENGTH add hl, bc diff --git a/engine/routines/flagpredef.asm b/engine/routines/flagpredef.asm index bd4f37882..8074e9dbe 100644 --- a/engine/routines/flagpredef.asm +++ b/engine/routines/flagpredef.asm @@ -1,4 +1,4 @@ -FlagPredef: ; 4d7c1 +Predef_Flag: ; 4d7c1 ; Perform action b on flag c in flag array hl. ; If checking a flag, check flag array d:hl unless d is 0. diff --git a/engine/routines/newpokedexentry.asm b/engine/routines/newpokedexentry.asm index acf9fca7b..c52188f6e 100644 --- a/engine/routines/newpokedexentry.asm +++ b/engine/routines/newpokedexentry.asm @@ -1,4 +1,4 @@ -NewPokedexEntry: ; fb877 +Predef_NewPokedexEntry: ; fb877 ld a, [hMapAnims] push af xor a diff --git a/engine/routines/placegraphic.asm b/engine/routines/placegraphic.asm index d72364776..28b69fc23 100644 --- a/engine/routines/placegraphic.asm +++ b/engine/routines/placegraphic.asm @@ -1,4 +1,4 @@ -PlaceGraphic: ; 2ef6e +Predef_PlaceGraphic: ; 2ef6e ; Fill wBoxAlignment-aligned box width b height c ; with iterating tile starting from hGraphicStartTile at hl. ; Predef $13 diff --git a/engine/routines/placewaitingtext.asm b/engine/routines/placewaitingtext.asm index 11b747ec5..37fc2a056 100644 --- a/engine/routines/placewaitingtext.asm +++ b/engine/routines/placewaitingtext.asm @@ -11,7 +11,7 @@ PlaceWaitingText:: ; 4000 jr .proceed .notinbattle - predef LinkTextboxPredef + predef Predef_LinkTextbox .proceed hlcoord 4, 11 diff --git a/engine/routines/trademonfrontpic.asm b/engine/routines/trademonfrontpic.asm index e312042ff..2d05a1c04 100644 --- a/engine/routines/trademonfrontpic.asm +++ b/engine/routines/trademonfrontpic.asm @@ -4,13 +4,13 @@ GetTrademonFrontpic: ; 4d7fd ld de, vTiles2 push de push af - predef GetUnownLetter + predef Predef_GetUnownLetter pop af ld [CurPartySpecies], a ld [CurSpecies], a call GetBaseData pop de - predef GetAnimatedFrontpicPredef + predef Predef_GetAnimatedFrontpic ret AnimateTrademonFrontpic: ; 4d81e @@ -34,5 +34,5 @@ AnimateTrademonFrontpic: ; 4d81e hlcoord 7, 2 ld d, $0 ld e, ANIM_MON_TRADE - predef AnimateFrontpic + predef Predef_AnimateFrontpic ret diff --git a/engine/scripting.asm b/engine/scripting.asm index 5965e372e..d8f35bdc6 100644 --- a/engine/scripting.asm +++ b/engine/scripting.asm @@ -1437,7 +1437,7 @@ Script_startbattle: ; script command 0x5f call BufferScreen - predef StartBattle + predef Predef_StartBattle ld a, [wBattleResult] and $3f ld [ScriptVar], a @@ -2506,7 +2506,7 @@ Script_giveegg: ld [CurPartySpecies], a call GetScriptByte ld [CurPartyLevel], a - farcall GiveEgg + farcall Predef_GiveEgg ret nc ld a, 2 ld [ScriptVar], a diff --git a/engine/sgb_layouts.asm b/engine/sgb_layouts.asm index b6bbe582f..bd0fdbb3b 100644 --- a/engine/sgb_layouts.asm +++ b/engine/sgb_layouts.asm @@ -1,4 +1,4 @@ -LoadSGBLayout: ; 864c +Predef_LoadSGBLayout: ; 864c call CheckCGB jp nz, LoadSGBLayoutCGB diff --git a/engine/specials.asm b/engine/specials.asm index e208c14d4..0291a6d3c 100644 --- a/engine/specials.asm +++ b/engine/specials.asm @@ -70,9 +70,9 @@ SpecialsPointers:: ; c029 add_special Special_FadeBlackQuickly add_special Special_FadeInPalettes add_special Special_FadeInQuickly - add_special Special_ReloadSpritesNoPalettes + add_special ReloadSpritesNoPalettes ; bank 0 add_special ClearBGPalettes ; bank 0 - add_special Special_UpdateTimePals + add_special UpdateTimePals ; bank 0 add_special ClearTileMap ; bank 0 add_special UpdateSprites ; bank 0 add_special ReplaceKrisSprite ; bank 0 @@ -214,7 +214,7 @@ Special_GameCornerPrizeMonCheckDex: ; c230 call FadeToMenu ld a, [ScriptVar] ld [wd265], a - farcall NewPokedexEntry + farcall Predef_NewPokedexEntry call ExitAllMenus ret ; c252 diff --git a/engine/start_menu.asm b/engine/start_menu.asm index 64a740d2a..7a2274b08 100755 --- a/engine/start_menu.asm +++ b/engine/start_menu.asm @@ -25,12 +25,12 @@ StartMenu:: ; 125cd call _OpenAndCloseMenu_HDMATransferTileMapAndAttrMap farcall LoadFonts_NoOAMUpdate call .DrawBugContestStatus - call Special_UpdateTimePals + call UpdateTimePals jr .Select .Reopen: call UpdateSprites - call Special_UpdateTimePals + call UpdateTimePals call .SetUpMenuItems ld a, [wBattleMenuCursorBuffer] ld [wMenuCursorBuffer], a @@ -78,7 +78,7 @@ StartMenu:: ; 125cd call ExitMenu .ReturnEnd2: call CloseText - call Special_UpdateTimePals + call UpdateTimePals ret .GetInput: @@ -593,7 +593,7 @@ HasNoItems: ; 129d5 TossItemFromPC: ; 129f4 push de - call PartyMonItemName + call Predef_PartyMonItemName farcall _CheckTossableItem ld a, [wItemAttributeParamBuffer] and a @@ -616,7 +616,7 @@ TossItemFromPC: ; 129f4 pop hl ld a, [CurItemQuantity] call TossItem - call PartyMonItemName + call Predef_PartyMonItemName ld hl, .TossedThisMany call MenuTextBox call ExitMenu @@ -668,7 +668,7 @@ CantUseItemText: ; 12a67 ; 12a6c -PartyMonItemName: ; 12a6c +Predef_PartyMonItemName: ; 12a6c ld a, [CurItem] ld [wd265], a call GetItemName @@ -862,7 +862,7 @@ GiveTakePartyMonItem: ; 12b60 TryGiveItemToPartymon: ; 12bd9 call SpeechTextBox - call PartyMonItemName + call Predef_PartyMonItemName call GetPartyItemLocation ld a, [hl] and a @@ -1225,7 +1225,7 @@ OpenPartyStats: ; 12e00 xor a ld [MonType], a call LowVolume - predef StatsScreenInit + predef Predef_StatsScreenInit call MaxVolume call Call_ExitMenu ld a, 0 @@ -1792,7 +1792,7 @@ SetUpMoveScreenBG: ; 13172 hlcoord 5, 1 call PlaceString push bc - farcall CopyPkmnToTempMon + farcall Predef_CopyPkmnToTempMon pop hl call PrintLevel ld hl, PlayerHPPal @@ -1809,7 +1809,7 @@ SetUpMoveList: ; 131ef ld [hBGMapMode], a ld [wMoveSwapBuffer], a ld [MonType], a - predef CopyPkmnToTempMon + predef Predef_CopyPkmnToTempMon ld hl, TempMonMoves ld de, wListMoves_MoveIndicesBuffer ld bc, NUM_MOVES @@ -1817,9 +1817,9 @@ SetUpMoveList: ; 131ef ld a, SCREEN_WIDTH * 2 ld [Buffer1], a hlcoord 2, 3 - predef ListMoves + predef Predef_ListMoves hlcoord 10, 4 - predef ListMovePP + predef Predef_ListMovePP call WaitBGMap call SetPalettes ld a, [wNumMoves] @@ -1863,7 +1863,7 @@ PlaceMoveData: ; 13256 ld a, [CurMove] ld b, a hlcoord 2, 12 - predef PrintMoveType + predef Predef_PrintMoveType ld a, [CurMove] dec a ld hl, Moves + MOVE_POWER @@ -1886,7 +1886,7 @@ PlaceMoveData: ; 13256 .description hlcoord 1, 14 - predef PrintMoveDesc + predef Predef_PrintMoveDesc ld a, $1 ld [hBGMapMode], a ret diff --git a/engine/stats_screen.asm b/engine/stats_screen.asm index a8f831408..5fce4607a 100755 --- a/engine/stats_screen.asm +++ b/engine/stats_screen.asm @@ -1,14 +1,14 @@ BattleStatsScreenInit: ; 4dc7b (13:5c7b) ld a, [wLinkMode] cp LINK_MOBILE - jr nz, StatsScreenInit + jr nz, Predef_StatsScreenInit ld a, [wBattleMode] and a - jr z, StatsScreenInit + jr z, Predef_StatsScreenInit jr _MobileStatsScreenInit -StatsScreenInit: ; 4dc8a +Predef_StatsScreenInit: ; 4dc8a ld hl, StatsScreenMain jr StatsScreenInit_gotaddress @@ -234,7 +234,7 @@ StatsScreen_CopyToTempMon: ; 4ddf2 (13:5df2) jr .done .breedmon - farcall CopyPkmnToTempMon + farcall Predef_CopyPkmnToTempMon ld a, [CurPartySpecies] cp EGG jr z, .done @@ -419,7 +419,7 @@ StatsScreen_InitUpperHalf: ; 4deea (13:5eea) ld a, [hli] ld d, a ld e, [hl] - farcall ComputeHPBarPixels + farcall Predef_ComputeHPBarPixels ld hl, wCurHPPal call SetHPPal ld b, SCGB_STATS_SCREEN_HP_PALS @@ -429,7 +429,7 @@ StatsScreen_InitUpperHalf: ; 4deea (13:5eea) .PlaceGenderChar: ; 4df66 (13:5f66) push hl - farcall GetGender + farcall Predef_GetGender pop hl ret c ld a, "♂" @@ -540,7 +540,7 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6) .PinkPage: ; 4e013 (13:6013) hlcoord 0, 9 ld b, $0 - predef DrawPlayerHP + predef Predef_DrawPlayerHP hlcoord 8, 9 ld [hl], $41 ld de, .Status_Type @@ -562,7 +562,7 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6) hlcoord 6, 13 push hl ld de, TempMonStatus - predef PlaceStatusString + predef Predef_PlaceStatusString pop hl jr nz, .done_status jr .StatusOK @@ -576,7 +576,7 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6) call PlaceString .done_status hlcoord 1, 15 - predef PrintMonTypes + predef Predef_PrintMonTypes hlcoord 9, 8 ld de, SCREEN_WIDTH ld b, 10 @@ -610,7 +610,7 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6) ld a, [TempMonLevel] ld b, a ld de, TempMonExp + 2 - predef FillInExpBar + predef Predef_FillInExpBar hlcoord 10, 16 ld [hl], $40 hlcoord 19, 16 @@ -703,11 +703,11 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6) hlcoord 8, 10 ld a, SCREEN_WIDTH * 2 ld [Buffer1], a - predef ListMoves + predef Predef_ListMoves hlcoord 12, 11 ld a, SCREEN_WIDTH * 2 ld [Buffer1], a - predef ListMovePP + predef Predef_ListMovePP ret .GetItemName: ; 4e189 (13:6189) @@ -748,7 +748,7 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6) jr nz, .BluePageVerticalDivider hlcoord 11, 8 ld bc, 6 - predef PrintTempMonStats + predef Predef_PrintTempMonStats ret .PlaceOTInfo: ; 4e1cc (13:61cc) @@ -801,7 +801,7 @@ OTString: ; 4e222 StatsScreen_PlaceFrontpic: ; 4e226 (13:6226) ld hl, TempMonDVs - predef GetUnownLetter + predef Predef_GetUnownLetter call StatsScreen_GetAnimationParam jr c, .egg and a @@ -863,11 +863,11 @@ StatsScreen_PlaceFrontpic: ; 4e226 (13:6226) ret c call StatsScreen_LoadTextBoxSpaceGFX ld de, vTiles2 tile $00 - predef GetAnimatedFrontpicPredef + predef Predef_GetAnimatedFrontpic hlcoord 0, 0 ld d, $0 ld e, ANIM_MON_MENU - predef LoadMonAnimation + predef Predef_LoadMonAnimation ld hl, wcf64 set 6, [hl] ret @@ -1067,11 +1067,11 @@ StatsScreen_AnimateEgg: ; 4e497 (13:6497) ld [wBoxAlignment], a call StatsScreen_LoadTextBoxSpaceGFX ld de, vTiles2 tile $00 - predef GetAnimatedFrontpicPredef + predef Predef_GetAnimatedFrontpic pop de hlcoord 0, 0 ld d, $0 - predef LoadMonAnimation + predef Predef_LoadMonAnimation ld hl, wcf64 set 6, [hl] ret diff --git a/engine/tempmon.asm b/engine/tempmon.asm index be989d14b..abd85a9ec 100644 --- a/engine/tempmon.asm +++ b/engine/tempmon.asm @@ -1,4 +1,4 @@ -CopyPkmnToTempMon: ; 5084a +Predef_CopyPkmnToTempMon: ; 5084a ; gets the BaseData of a Pkmn ; and copys the PkmnStructure to TempMon @@ -51,7 +51,7 @@ _TempMonStatsCalculation: ; 50893 add hl, bc push bc ld b, $1 - predef CalcPkmnStats + predef Predef_CalcPkmnStats pop bc ld hl, MON_HP add hl, bc diff --git a/engine/time_capsule_2.asm b/engine/time_capsule_2.asm index 5da72e7c8..d50bffd3f 100644 --- a/engine/time_capsule_2.asm +++ b/engine/time_capsule_2.asm @@ -18,7 +18,7 @@ ConvertMon_2to1: ; fb8f1 ret ; fb908 -ConvertMon_1to2: ; fb908 +Predef_ConvertMon_1to2: ; fb908 ; Takes the Gen-1 Pokemon number stored in wd265 and returns the corresponding value from Pokered_MonIndices in wd265. push bc push hl diff --git a/engine/timeofdaypals.asm b/engine/timeofdaypals.asm index 31a55a7d8..3679f2d23 100644 --- a/engine/timeofdaypals.asm +++ b/engine/timeofdaypals.asm @@ -98,7 +98,7 @@ _TimeOfDayPals:: ; 8c011 ld [rSVBK], a ; update palettes - call _Special_UpdateTimePals + call _UpdateTimePals call DelayFrame ; successful change @@ -112,7 +112,7 @@ _TimeOfDayPals:: ; 8c011 ; 8c070 -_Special_UpdateTimePals:: ; 8c070 +_UpdateTimePals:: ; 8c070 ld c, $9 ; normal call GetTimePalFade call DmgToCgbTimePals diff --git a/engine/tmhm.asm b/engine/tmhm.asm index 6a9c76f00..d149e02d6 100755 --- a/engine/tmhm.asm +++ b/engine/tmhm.asm @@ -1,4 +1,4 @@ -CanLearnTMHMMove: ; 11639 +Predef_CanLearnTMHMMove: ; 11639 ld a, [CurPartySpecies] ld [CurSpecies], a call GetBaseData @@ -23,7 +23,7 @@ CanLearnTMHMMove: ; 11639 ld b, CHECK_FLAG push de ld d, 0 - predef FlagPredef + predef Predef_Flag pop de ret @@ -33,7 +33,7 @@ CanLearnTMHMMove: ; 11639 ret ; 1166a -GetTMHMMove: ; 1166a +Predef_GetTMHMMove: ; 1166a ld a, [wd265] dec a ld hl, TMHMMoves diff --git a/engine/tmhm2.asm b/engine/tmhm2.asm index 90e993a8b..fc5923238 100755 --- a/engine/tmhm2.asm +++ b/engine/tmhm2.asm @@ -38,7 +38,7 @@ ConvertCurItemIntoCurTMHM: ; 2c7a7 (b:47a7) GetTMHMItemMove: ; 2c7b6 (b:47b6) call ConvertCurItemIntoCurTMHM - predef GetTMHMMove + predef Predef_GetTMHMMove ret AskTeachTMHM: ; 2c7bf (b:47bf) @@ -118,7 +118,7 @@ ChooseMonToLearnTMHM_NoRefresh: ; 2c80a ; 2c867 TeachTMHM: ; 2c867 - predef CanLearnTMHMMove + predef Predef_CanLearnTMHMMove push bc ld a, [CurPartyMon] @@ -141,7 +141,7 @@ TeachTMHM: ; 2c867 callfar KnowsMove jr c, .nope - predef LearnMove + predef Predef_LearnMove ld a, b and a jr z, .nope @@ -258,11 +258,11 @@ TMHM_ShowTMMoveDescription: ; 2c946 (b:4946) cp NUM_TMS + NUM_HMS + 1 jr nc, TMHM_JoypadLoop ld [wd265], a - predef GetTMHMMove + predef Predef_GetTMHMMove ld a, [wd265] ld [CurSpecies], a hlcoord 1, 14 - call PrintMoveDesc + call Predef_PrintMoveDesc jp TMHM_JoypadLoop TMHM_ChooseTMorHM: ; 2c974 (b:4974) @@ -386,7 +386,7 @@ TMHM_DisplayPocketItems: ; 2c9e2 (b:49e2) pop af ld [wd265], a .okay - predef GetTMHMMove + predef Predef_GetTMHMMove ld a, [wd265] ld [wPutativeTMHMMove], a call GetMoveName @@ -451,7 +451,7 @@ Unreferenced_Function2ca95: ; 2ca95 pop hl ld bc, 3 add hl, bc - predef GetTMHMMove + predef Predef_GetTMHMMove ld a, [wd265] ld [wPutativeTMHMMove], a call GetMoveName @@ -572,7 +572,7 @@ CountTMsHMs: ; 2cb2a (b:4b2a) ld [wd265], a ret -PrintMoveDesc: ; 2cb3e +Predef_PrintMoveDesc: ; 2cb3e push hl ld hl, MoveDescriptions ld a, [CurSpecies] diff --git a/engine/trade_animation.asm b/engine/trade_animation.asm index d5b97d563..10e657819 100755 --- a/engine/trade_animation.asm +++ b/engine/trade_animation.asm @@ -1,4 +1,4 @@ -TradeAnimation: ; 28f24 +Predef_TradeAnimation: ; 28f24 xor a ld [wcf66], a ld hl, wPlayerTrademonSenderName @@ -49,7 +49,7 @@ TradeAnimation: ; 28f24 tradeanim_scroll_out_right tradeanim_end -TradeAnimationPlayer2: ; 28f63 +Predef_TradeAnimationPlayer2: ; 28f63 xor a ld [wcf66], a ld hl, wOTTrademonSenderName @@ -871,13 +871,13 @@ TradeAnim_AnimateFrontpic: ; 29487 TradeAnim_GetFrontpic: ; 29491 push de push af - predef GetUnownLetter + predef Predef_GetUnownLetter pop af ld [CurPartySpecies], a ld [CurSpecies], a call GetBaseData pop de - predef GetMonFrontpic + predef Predef_GetMonFrontpic ret ; 294a9 @@ -911,7 +911,7 @@ TradeAnim_ShowFrontpic: ; 294c3 xor a ld [hGraphicStartTile], a lb bc, 7, 7 - predef PlaceGraphic + predef Predef_PlaceGraphic call WaitBGMap ret diff --git a/engine/trainer_card.asm b/engine/trainer_card.asm index 67bc05533..6be9af166 100755 --- a/engine/trainer_card.asm +++ b/engine/trainer_card.asm @@ -243,7 +243,7 @@ TrainerCard_PrintTopHalfOfCard: ; 25299 (9:5299) lb bc, 5, 7 xor a ld [hGraphicStartTile], a - predef PlaceGraphic + predef Predef_PlaceGraphic ret ; 252ec (9:52ec) diff --git a/engine/types.asm b/engine/types.asm index 375bfe434..7808abcb1 100644 --- a/engine/types.asm +++ b/engine/types.asm @@ -1,4 +1,4 @@ -PrintMonTypes: ; 5090d +Predef_PrintMonTypes: ; 5090d ; Print one or both types of [CurSpecies] ; on the stats screen at hl. @@ -24,7 +24,7 @@ PrintMonTypes: ; 5090d .Print: ld b, a - jr PrintType + jr Predef_PrintType .hide_type_2 ; Erase any type name that was here before. @@ -40,7 +40,7 @@ PrintMonTypes: ; 5090d ; 5093a -PrintMoveType: ; 5093a +Predef_PrintMoveType: ; 5093a ; Print the type of move b at hl. push hl @@ -58,7 +58,7 @@ PrintMoveType: ; 5093a ld b, a -PrintType: ; 50953 +Predef_PrintType: ; 50953 ; Print type b at hl. ld a, b @@ -78,7 +78,7 @@ PrintType: ; 50953 ; 50964 -GetTypeName: ; 50964 +Predef_GetTypeName: ; 50964 ; Copy the name of type [wd265] to StringBuffer1. ld a, [wd265] diff --git a/gfx/load_pics.asm b/gfx/load_pics.asm index 1d685f1dd..b60dab5c3 100755 --- a/gfx/load_pics.asm +++ b/gfx/load_pics.asm @@ -1,4 +1,4 @@ -GetUnownLetter: ; 51040 +Predef_GetUnownLetter: ; 51040 ; Return Unown letter in UnownLetter based on DVs at hl ; Take the middle 2 bits of each DV and place them in order: @@ -48,7 +48,7 @@ GetUnownLetter: ; 51040 ld [UnownLetter], a ret -GetMonFrontpic: ; 51077 +Predef_GetMonFrontpic: ; 51077 ld a, [CurPartySpecies] ld [CurSpecies], a call IsAPokemon @@ -60,7 +60,7 @@ GetMonFrontpic: ; 51077 ld [rSVBK], a ret -GetAnimatedFrontpicPredef: ; 5108b +Predef_GetAnimatedFrontpic: ; 5108b ld a, [CurPartySpecies] ld [CurSpecies], a call IsAPokemon @@ -195,7 +195,7 @@ LoadFrontpicTiles: ; 5114f jr nz, .loop ret -GetMonBackpic: ; 5116c +Predef_GetMonBackpic: ; 5116c ld a, [CurPartySpecies] call IsAPokemon ret c @@ -311,7 +311,7 @@ Function511ec: ; 511ec call FarDecompress ret -GetTrainerPic: ; 5120d +Predef_GetTrainerPic: ; 5120d ld a, [TrainerClass] and a ret z @@ -353,7 +353,7 @@ GetTrainerPic: ; 5120d ld [hBGMapMode], a ret -DecompressPredef: ; 5125d +Predef_Decompress: ; 5125d ; Decompress lz data from b:hl to scratch space at 6:d000, then copy it to address de. ld a, [rSVBK] diff --git a/home.asm b/home.asm index 1ecdf1cf4..488527ae0 100644 --- a/home.asm +++ b/home.asm @@ -44,6 +44,7 @@ INCLUDE "home/game_time.asm" INCLUDE "home/map.asm" InexplicablyEmptyFunction:: ; 2d43 +; unused ; Inexplicably empty. ; Seen in PredefPointers. rept 16 @@ -710,7 +711,7 @@ GetSGBLayout:: ; 3340 ret z .sgb - predef_jump LoadSGBLayout + predef_jump Predef_LoadSGBLayout ; 334e SetHPPal:: ; 334e @@ -793,7 +794,7 @@ ScrollingMenu:: ; 350c .UpdatePalettes: ; 3524 ld hl, VramState bit 0, [hl] - jp nz, Special_UpdateTimePals + jp nz, UpdateTimePals jp SetPalettes ; 352f @@ -1073,12 +1074,12 @@ _PrepMonFrontpic:: ; 378b push hl ld de, vTiles2 - predef GetMonFrontpic + predef Predef_GetMonFrontpic pop hl xor a ld [hGraphicStartTile], a lb bc, 7, 7 - predef PlaceGraphic + predef Predef_PlaceGraphic xor a ld [wBoxAlignment], a ret diff --git a/home/battle.asm b/home/battle.asm index 30096fd4a..b44fa5d97 100644 --- a/home/battle.asm +++ b/home/battle.asm @@ -130,8 +130,8 @@ RefreshBattleHuds:: ; 39c9 ; 39d4 UpdateBattleHuds:: ; 39d4 - farcall UpdatePlayerHUD - farcall UpdateEnemyHUD + farcall Predef_UpdatePlayerHUD + farcall Predef_UpdateEnemyHUD ret ; 39e1 diff --git a/home/init.asm b/home/init.asm index 8895da0f9..f9c8ef485 100644 --- a/home/init.asm +++ b/home/init.asm @@ -166,7 +166,7 @@ Init:: ; 17d call DelayFrame - predef InitSGBBorder ; SGB init + predef Predef_InitSGBBorder ; SGB init call MapSetup_Sound_Off xor a diff --git a/home/map.asm b/home/map.asm index e0d926539..2e04a34a3 100644 --- a/home/map.asm +++ b/home/map.asm @@ -2031,7 +2031,7 @@ ReturnToMapWithSpeechTextbox:: ; 0x2b74 ld b, SCGB_MAPPALS call GetSGBLayout farcall LoadOW_BGPal7 - call Special_UpdateTimePals + call UpdateTimePals call DelayFrame ld a, $1 ld [hMapAnims], a diff --git a/home/palettes.asm b/home/palettes.asm index 79ff71887..9f10da118 100644 --- a/home/palettes.asm +++ b/home/palettes.asm @@ -319,7 +319,7 @@ ret_d90:: ; d90 ; d91 -Special_ReloadSpritesNoPalettes:: ; d91 +ReloadSpritesNoPalettes:: ; d91 ld a, [hCGB] and a ret z diff --git a/home/pokedex_flags.asm b/home/pokedex_flags.asm index 7aacd4981..f4f1ac312 100644 --- a/home/pokedex_flags.asm +++ b/home/pokedex_flags.asm @@ -31,7 +31,7 @@ CheckSeenMon:: ; 339b PokedexFlagAction:: ; 33a1 ld d, 0 - predef FlagPredef + predef Predef_Flag ld a, c and a ret diff --git a/home/rtc.asm b/home/rtc.asm index aeb22d277..5b83f1079 100644 --- a/home/rtc.asm +++ b/home/rtc.asm @@ -18,7 +18,7 @@ TimeOfDayPals:: ; 47e ret ; 485 -Special_UpdateTimePals:: ; 485 - callfar _Special_UpdateTimePals +UpdateTimePals:: ; 485 + callfar _UpdateTimePals ret ; 48c diff --git a/maps/FastShipCabins_SE_SSE_CaptainsCabin.asm b/maps/FastShipCabins_SE_SSE_CaptainsCabin.asm index efccd7d92..1a95553d5 100644 --- a/maps/FastShipCabins_SE_SSE_CaptainsCabin.asm +++ b/maps/FastShipCabins_SE_SSE_CaptainsCabin.asm @@ -49,7 +49,7 @@ SSAquaGranddaughterBefore: waitbutton closetext special Special_FadeBlackQuickly - special Special_ReloadSpritesNoPalettes + special ReloadSpritesNoPalettes disappear FASTSHIPCABINS_SE_SSE_CAPTAINSCABIN_TWIN2 applymovement PLAYER, MovementData_0x76004 moveobject FASTSHIPCABINS_SE_SSE_CAPTAINSCABIN_TWIN1, $3, $13 diff --git a/maps/FastShipCabins_SW_SSW_NW.asm b/maps/FastShipCabins_SW_SSW_NW.asm index 6dafb77d6..b8468203b 100644 --- a/maps/FastShipCabins_SW_SSW_NW.asm +++ b/maps/FastShipCabins_SW_SSW_NW.asm @@ -70,7 +70,7 @@ FastShipBed: waitbutton closetext special Special_FadeBlackQuickly - special Special_ReloadSpritesNoPalettes + special ReloadSpritesNoPalettes special Special_TrainerRankings_Healings special HealParty playmusic MUSIC_HEAL diff --git a/maps/MrPokemonsHouse.asm b/maps/MrPokemonsHouse.asm index 27779aac6..baae65af2 100644 --- a/maps/MrPokemonsHouse.asm +++ b/maps/MrPokemonsHouse.asm @@ -111,7 +111,7 @@ MrPokemonsHouse_OakScript: waitbutton closetext special Special_FadeBlackQuickly - special Special_ReloadSpritesNoPalettes + special ReloadSpritesNoPalettes playmusic MUSIC_HEAL special Special_TrainerRankings_Healings special HealParty diff --git a/maps/RadioTower5F.asm b/maps/RadioTower5F.asm index c73d53de2..c19a0d1ae 100644 --- a/maps/RadioTower5F.asm +++ b/maps/RadioTower5F.asm @@ -96,7 +96,7 @@ RadioTower5FRocketBossScene: waitbutton closetext special Special_FadeBlackQuickly - special Special_ReloadSpritesNoPalettes + special ReloadSpritesNoPalettes disappear RADIOTOWER5F_ROCKET disappear RADIOTOWER5F_ROCKET_GIRL pause 15 diff --git a/maps/Route24.asm b/maps/Route24.asm index 07740a467..e598c01a1 100644 --- a/maps/Route24.asm +++ b/maps/Route24.asm @@ -29,7 +29,7 @@ RocketScript_0x1adbfa: waitbutton closetext special Special_FadeBlackQuickly - special Special_ReloadSpritesNoPalettes + special ReloadSpritesNoPalettes disappear ROUTE24_ROCKET pause 25 special Special_FadeInQuickly diff --git a/maps/Route26HealSpeechHouse.asm b/maps/Route26HealSpeechHouse.asm index 111d6fd65..ea761a6fc 100644 --- a/maps/Route26HealSpeechHouse.asm +++ b/maps/Route26HealSpeechHouse.asm @@ -15,7 +15,7 @@ TeacherScript_0x7b125: waitbutton closetext special Special_FadeBlackQuickly - special Special_ReloadSpritesNoPalettes + special ReloadSpritesNoPalettes special Special_TrainerRankings_Healings playmusic MUSIC_HEAL special HealParty diff --git a/maps/Route36NationalParkGate.asm b/maps/Route36NationalParkGate.asm index 05bba8674..a3425a82b 100644 --- a/maps/Route36NationalParkGate.asm +++ b/maps/Route36NationalParkGate.asm @@ -76,7 +76,7 @@ Route36NationalParkGate_MapScriptHeader: waitbutton closetext special Special_FadeBlackQuickly - special Special_ReloadSpritesNoPalettes + special ReloadSpritesNoPalettes scall .CopyContestants disappear ROUTE36NATIONALPARKGATE_OFFICER1 appear ROUTE36NATIONALPARKGATE_OFFICER2 diff --git a/maps/SilverCaveRoom3.asm b/maps/SilverCaveRoom3.asm index 7daab6ba8..92b7041bd 100644 --- a/maps/SilverCaveRoom3.asm +++ b/maps/SilverCaveRoom3.asm @@ -26,7 +26,7 @@ Red: waitbutton closetext special Special_FadeBlackQuickly - special Special_ReloadSpritesNoPalettes + special ReloadSpritesNoPalettes disappear SILVERCAVEROOM3_RED pause 15 special Special_FadeInQuickly diff --git a/maps/SlowpokeWellB1F.asm b/maps/SlowpokeWellB1F.asm index 4a63f1816..f9a15d4d7 100644 --- a/maps/SlowpokeWellB1F.asm +++ b/maps/SlowpokeWellB1F.asm @@ -39,7 +39,7 @@ TrainerGruntM1: waitbutton closetext special Special_FadeBlackQuickly - special Special_ReloadSpritesNoPalettes + special ReloadSpritesNoPalettes disappear SLOWPOKEWELLB1F_ROCKET1 disappear SLOWPOKEWELLB1F_ROCKET2 disappear SLOWPOKEWELLB1F_ROCKET3 diff --git a/maps/SproutTower3F.asm b/maps/SproutTower3F.asm index 33dd4dcd8..0d038b06e 100644 --- a/maps/SproutTower3F.asm +++ b/maps/SproutTower3F.asm @@ -55,7 +55,7 @@ UnknownScript_0x184947: closetext playsound SFX_WARP_TO special Special_FadeBlackQuickly - special Special_ReloadSpritesNoPalettes + special ReloadSpritesNoPalettes disappear SPROUTTOWER3F_SILVER waitsfx special Special_FadeInQuickly diff --git a/maps/TeamRocketBaseB2F.asm b/maps/TeamRocketBaseB2F.asm index 0967e2f0f..3d95ac9f8 100644 --- a/maps/TeamRocketBaseB2F.asm +++ b/maps/TeamRocketBaseB2F.asm @@ -110,7 +110,7 @@ UnknownScript_0x6cfac: waitbutton closetext special Special_FadeBlackQuickly - special Special_ReloadSpritesNoPalettes + special ReloadSpritesNoPalettes disappear TEAMROCKETBASEB2F_ROCKET1 disappear TEAMROCKETBASEB2F_ROCKET_GIRL disappear TEAMROCKETBASEB2F_ROCKET2 diff --git a/mobile/battle_tower_5c.asm b/mobile/battle_tower_5c.asm index 9a1634ca0..ebb6e2bcf 100755 --- a/mobile/battle_tower_5c.asm +++ b/mobile/battle_tower_5c.asm @@ -248,7 +248,7 @@ RunBattleTowerTrainer: ; 17024d call ReadBTTrainerParty call Clears5_a89a - predef StartBattle + predef Predef_StartBattle farcall LoadPokemonData farcall HealParty @@ -484,7 +484,7 @@ endr ld hl, MON_STAT_EXP - 1 add hl, bc ld b, $1 - predef CalcPkmnStats + predef Predef_CalcPkmnStats pop de pop hl dec de diff --git a/mobile/mobile_22.asm b/mobile/mobile_22.asm index 9180c29e0..41d30de51 100644 --- a/mobile/mobile_22.asm +++ b/mobile/mobile_22.asm @@ -1228,7 +1228,7 @@ Function897af: ; 897af xor a ld [CurPartySpecies], a ld de, vTiles2 tile $37 - farcall GetTrainerPic + farcall Predef_GetTrainerPic pop bc ret ; 897d5 @@ -1260,7 +1260,7 @@ Function897d5: ; 897d5 ld [hGraphicStartTile], a hlcoord 12, 3 lb bc, 7, 7 - predef PlaceGraphic + predef Predef_PlaceGraphic call Function8963d pop bc ret diff --git a/mobile/mobile_40.asm b/mobile/mobile_40.asm index 7ff964a67..4723b6660 100644 --- a/mobile/mobile_40.asm +++ b/mobile/mobile_40.asm @@ -1985,7 +1985,7 @@ Function100c74: ; 100c74 ld a, SCREEN_WIDTH * 2 ld [Buffer1], a hlcoord 2, 10 - predef ListMoves + predef Predef_ListMoves ret ; 100c98 @@ -6796,7 +6796,7 @@ Function102d48: ; 102d48 ld bc, PARTYMON_STRUCT_LENGTH ld hl, PartyMon1DVs call AddNTimes - predef GetUnownLetter + predef Predef_GetUnownLetter farcall UpdateUnownDex ld a, [wFirstUnownSeen] and a diff --git a/mobile/mobile_42.asm b/mobile/mobile_42.asm index 01ae90133..e39051862 100644 --- a/mobile/mobile_42.asm +++ b/mobile/mobile_42.asm @@ -290,26 +290,26 @@ MobileTradeAnim_ClearBGMap: ; 1081ca MobileTradeAnim_GetFrontpic: ; 1081e9 push de push af - predef GetUnownLetter + predef Predef_GetUnownLetter pop af ld [CurPartySpecies], a ld [CurSpecies], a call GetBaseData pop de - predef GetMonFrontpic + predef Predef_GetMonFrontpic ret ; 108201 Function108201: ; 108201 push de push af - predef GetUnownLetter + predef Predef_GetUnownLetter pop af ld [CurPartySpecies], a ld [CurSpecies], a call GetBaseData pop de - predef GetAnimatedFrontpicPredef + predef Predef_GetAnimatedFrontpic ret ; 108219 @@ -318,7 +318,7 @@ Function108219: ; 108219 hlcoord 7, 2 ld d, $0 ld e, ANIM_MON_TRADE - predef AnimateFrontpic + predef Predef_AnimateFrontpic ret ; 108229 @@ -327,7 +327,7 @@ Function108229: ; 108229 hlcoord 7, 2 ld d, $0 ld e, ANIM_MON_TRADE - predef LoadMonAnimation + predef Predef_LoadMonAnimation ret ; 108239 @@ -1238,7 +1238,7 @@ asm_108966 xor a ld [hGraphicStartTile], a lb bc, 7, 7 - predef PlaceGraphic + predef Predef_PlaceGraphic call WaitBGMap ret ; 10898a @@ -1252,7 +1252,7 @@ Function10898a: ; 10898a xor a ld [hGraphicStartTile], a lb bc, 7, 7 - predef PlaceGraphic + predef Predef_PlaceGraphic call WaitBGMap ret ; 1089a8 diff --git a/mobile/mobile_46.asm b/mobile/mobile_46.asm index cc4518435..78784051a 100755 --- a/mobile/mobile_46.asm +++ b/mobile/mobile_46.asm @@ -6696,7 +6696,7 @@ Function11b242: ; 11b242 call PlaceString xor a ld [MonType], a - farcall GetGender + farcall Predef_GetGender hlcoord 1, 4 ld a, [CurPartySpecies] ld bc, wcd2f @@ -7154,7 +7154,7 @@ Function11b483: ; 11b483 pop de push de ld b, OTPARTYMON - predef CalcPkmnStats + predef Predef_CalcPkmnStats pop de ld h, d ld l, e @@ -7573,7 +7573,7 @@ Function11b6b4: ; 11b6b4 ld hl, $c60d + MON_STAT_EXP - 1 ld de, $c60d + MON_MAXHP ld b, $1 - predef CalcPkmnStats + predef Predef_CalcPkmnStats ld de, $c60d + MON_MAXHP ld hl, $c60d + MON_HP ld a, [de] diff --git a/mobile/mobile_5f.asm b/mobile/mobile_5f.asm index 603d30af0..4a28d2c55 100644 --- a/mobile/mobile_5f.asm +++ b/mobile/mobile_5f.asm @@ -412,7 +412,7 @@ Function17d1f1: ; 17d1f1 dec a ld bc, PARTYMON_STRUCT_LENGTH call AddNTimes - predef GetUnownLetter + predef Predef_GetUnownLetter callfar UpdateUnownDex ld a, [wFirstUnownSeen] and a @@ -1500,7 +1500,7 @@ Function17d93a: ; 17d93a add hl, de ld e, l ld d, h - farcall HOF_AnimateFrontpic + farcall HOF_Predef_AnimateFrontpic pop af ld [rSVBK], a call Function17e349 @@ -1532,12 +1532,12 @@ Function17d98b: ; 17d98b ld d, a push de ld de, vTiles2 - farcall GetTrainerPic + farcall Predef_GetTrainerPic pop hl decoord 0, 0 add hl, de ld bc, $707 - predef PlaceGraphic + predef Predef_PlaceGraphic pop af ld [rSVBK], a call Function17e349 @@ -2339,7 +2339,7 @@ Function17ded9: ; 17ded9 ld [MonType], a push hl push bc - predef TryAddMonToParty + predef Predef_TryAddMonToParty farcall SetCaughtData pop bc pop hl @@ -2444,7 +2444,7 @@ Function17ded9: ; 17ded9 ld e, l push hl ld b, $0 - farcall CalcPkmnStats + farcall Predef_CalcPkmnStats ld a, [PartyCount] dec a ld hl, PartyMon1HP @@ -2510,7 +2510,7 @@ Function17ded9: ; 17ded9 ld d, h ld e, l pop hl - predef FillPP + predef Predef_FillPP pop hl pop bc jp asm_17e0ee @@ -2533,7 +2533,7 @@ Function17e026: ; 17e026 push bc push hl farcall LoadEnemyMon - farcall SentPkmnIntoBox + farcall Predef_SendPkmnIntoBox farcall SetBoxMonCaughtData pop hl pop bc @@ -2624,7 +2624,7 @@ Function17e026: ; 17e026 push hl ld hl, sBoxMon1Moves ld de, sBoxMon1PP - predef FillPP + predef Predef_FillPP call CloseSRAM pop hl pop bc