diff options
| author | Rangi <remy.oukaour+rangi42@gmail.com> | 2018-07-28 19:27:34 -0400 |
|---|---|---|
| committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2018-07-29 00:25:52 -0400 |
| commit | 9dec80b07e3638c722b9768a1ca0184edea20392 (patch) | |
| tree | fdd5e227f20540b838ec45d282e40b083ae56c72 /engine/pokemon | |
| parent | 2ec900d96c3b6020be0816151b9ad606c04114b5 (diff) | |
Add meaningful aliases for wd265
Introduce MONICON_* constants
Introduce BATTLEPLAYERACTION_* constants
Diffstat (limited to 'engine/pokemon')
| -rw-r--r-- | engine/pokemon/bills_pc.asm | 16 | ||||
| -rw-r--r-- | engine/pokemon/breeding.asm | 8 | ||||
| -rw-r--r-- | engine/pokemon/caught_data.asm | 4 | ||||
| -rw-r--r-- | engine/pokemon/correct_party_errors.asm | 2 | ||||
| -rw-r--r-- | engine/pokemon/evolve.asm | 18 | ||||
| -rw-r--r-- | engine/pokemon/learn.asm | 2 | ||||
| -rw-r--r-- | engine/pokemon/mail.asm | 6 | ||||
| -rw-r--r-- | engine/pokemon/mon_menu.asm | 2 | ||||
| -rw-r--r-- | engine/pokemon/mon_stats.asm | 2 | ||||
| -rw-r--r-- | engine/pokemon/move_mon.asm | 12 | ||||
| -rw-r--r-- | engine/pokemon/move_mon_wo_mail.asm | 20 | ||||
| -rw-r--r-- | engine/pokemon/party_menu.asm | 2 | ||||
| -rw-r--r-- | engine/pokemon/stats_screen.asm | 10 | ||||
| -rw-r--r-- | engine/pokemon/types.asm | 4 |
14 files changed, 54 insertions, 54 deletions
diff --git a/engine/pokemon/bills_pc.asm b/engine/pokemon/bills_pc.asm index 65621192d..f0ddc0ba8 100644 --- a/engine/pokemon/bills_pc.asm +++ b/engine/pokemon/bills_pc.asm @@ -1035,7 +1035,7 @@ PCMonInfo: cp -1 ret z - ld [wd265], a + ld [wTempSpecies], a hlcoord 1, 4 xor a ld b, 7 @@ -1057,7 +1057,7 @@ PCMonInfo: jr nz, .row call BillsPC_LoadMonStats - ld a, [wd265] + ld a, [wTempSpecies] ld [wCurPartySpecies], a ld [wCurSpecies], a ld hl, wTempMonDVs @@ -1068,7 +1068,7 @@ PCMonInfo: xor a ld [wBillsPC_MonHasMail], a ld a, [wCurPartySpecies] - ld [wd265], a + ld [wTempSpecies], a cp EGG ret z @@ -1676,9 +1676,9 @@ StatsScreenDPad: and a jr z, .did_nothing call BillsPC_GetSelectedPokemonSpecies - ld [wd265], a + ld [wTempSpecies], a call BillsPC_LoadMonStats - ld a, [wd265] + ld a, [wTempSpecies] ld [wCurPartySpecies], a ld [wCurSpecies], a ld hl, wTempMonDVs @@ -1893,7 +1893,7 @@ ReleasePKMN_ByePKMN: .skip_cry ld a, [wCurPartySpecies] - ld [wd265], a + ld [wTempSpecies], a call GetPokemonName hlcoord 1, 16 ld de, PCString_ReleasedPKMN @@ -2314,9 +2314,9 @@ BillsPC_PrintBoxCountAndCapacity: ld de, .Pokemon call PlaceString call GetBoxCount - ld [wd265], a + ld [wDeciramBuffer], a hlcoord 13, 11 - ld de, wd265 + ld de, wDeciramBuffer lb bc, 1, 2 call PrintNum ld de, .out_of_20 diff --git a/engine/pokemon/breeding.asm b/engine/pokemon/breeding.asm index 7e7f0e097..dfebcd9f9 100644 --- a/engine/pokemon/breeding.asm +++ b/engine/pokemon/breeding.asm @@ -81,7 +81,7 @@ CheckBreedmonCompatibility: .done ld a, c - ld [wd265], a + ld [wBreedingCompatibility], a ret .CheckDVs: @@ -250,7 +250,7 @@ HatchEggs: ld a, [wCurPartySpecies] dec de ld [de], a - ld [wd265], a + ld [wNamedObjectIndexBuffer], a ld [wCurSpecies], a call GetPokemonName xor a @@ -676,7 +676,7 @@ EggHatch_DoAnimFrame: ret EggHatch_AnimationSequence: - ld a, [wd265] + ld a, [wNamedObjectIndexBuffer] ld [wJumptableIndex], a ld a, [wCurSpecies] push af @@ -910,7 +910,7 @@ DayCareMonCompatibilityText: call CopyBytes call CheckBreedmonCompatibility pop bc - ld a, [wd265] + ld a, [wBreedingCompatibility] ld hl, .AllAlone cp -1 jr z, .done diff --git a/engine/pokemon/caught_data.asm b/engine/pokemon/caught_data.asm index 89d22fdf6..31cfe7e75 100644 --- a/engine/pokemon/caught_data.asm +++ b/engine/pokemon/caught_data.asm @@ -38,7 +38,7 @@ CheckPartyFullAfterContest: ld hl, wPlayerName call CopyBytes ld a, [wCurPartySpecies] - ld [wd265], a + ld [wNamedObjectIndexBuffer], a call GetPokemonName ld hl, wStringBuffer1 ld de, wMonOrItemNameBuffer @@ -105,7 +105,7 @@ CheckPartyFullAfterContest: call CopyBytes callfar InsertPokemonIntoBox ld a, [wCurPartySpecies] - ld [wd265], a + ld [wNamedObjectIndexBuffer], a call GetPokemonName call GiveANickname_YesNo ld hl, wStringBuffer1 diff --git a/engine/pokemon/correct_party_errors.asm b/engine/pokemon/correct_party_errors.asm index 50a9f3562..717893b36 100644 --- a/engine/pokemon/correct_party_errors.asm +++ b/engine/pokemon/correct_party_errors.asm @@ -123,7 +123,7 @@ Unreferenced_CorrectPartyErrors: cp EGG ld hl, .TAMAGO jr z, .got_nickname - ld [wd265], a + ld [wNamedObjectIndexBuffer], a call GetPokemonName ld hl, wStringBuffer1 .got_nickname diff --git a/engine/pokemon/evolve.asm b/engine/pokemon/evolve.asm index f2006bcf6..eb2645e00 100644 --- a/engine/pokemon/evolve.asm +++ b/engine/pokemon/evolve.asm @@ -236,7 +236,7 @@ EvolveAfterBattle_MasterLoop: ld [wCurSpecies], a ld [wTempMonSpecies], a ld [wEvolutionNewSpecies], a - ld [wd265], a + ld [wNamedObjectIndexBuffer], a call GetPokemonName push hl @@ -293,15 +293,15 @@ EvolveAfterBattle_MasterLoop: call CopyBytes ld a, [wCurSpecies] - ld [wd265], a + ld [wTempSpecies], a xor a ld [wMonType], a call LearnLevelMoves - ld a, [wd265] + ld a, [wTempSpecies] dec a call SetSeenAndCaughtMon - ld a, [wd265] + ld a, [wTempSpecies] cp UNOWN jr nz, .skip_unown @@ -348,7 +348,7 @@ UpdateSpeciesNameIfNotNicknamed: ld a, [wCurSpecies] push af ld a, [wBaseDexNo] - ld [wd265], a + ld [wNamedObjectIndexBuffer], a call GetPokemonName pop af ld [wCurSpecies], a @@ -369,7 +369,7 @@ UpdateSpeciesNameIfNotNicknamed: call AddNTimes push hl ld a, [wCurSpecies] - ld [wd265], a + ld [wNamedObjectIndexBuffer], a call GetPokemonName ld hl, wStringBuffer1 pop de @@ -415,7 +415,7 @@ Text_WhatEvolving: db "@" LearnLevelMoves: - ld a, [wd265] + ld a, [wTempSpecies] ld [wCurPartySpecies], a dec a ld b, 0 @@ -466,7 +466,7 @@ LearnLevelMoves: .learn ld a, d ld [wPutativeTMHMMove], a - ld [wd265], a + ld [wNamedObjectIndexBuffer], a call GetMoveName call CopyName1 predef LearnMove @@ -475,7 +475,7 @@ LearnLevelMoves: .done ld a, [wCurPartySpecies] - ld [wd265], a + ld [wTempSpecies], a ret FillMoves: diff --git a/engine/pokemon/learn.asm b/engine/pokemon/learn.asm index 20294c878..9031c6857 100644 --- a/engine/pokemon/learn.asm +++ b/engine/pokemon/learn.asm @@ -36,7 +36,7 @@ LearnMove: push hl push de - ld [wd265], a + ld [wNamedObjectIndexBuffer], a ld b, a ld a, [wBattleMode] diff --git a/engine/pokemon/mail.asm b/engine/pokemon/mail.asm index 359d2ac8e..2c66ab72a 100644 --- a/engine/pokemon/mail.asm +++ b/engine/pokemon/mail.asm @@ -149,7 +149,7 @@ CheckPokeMail:: ; Compare the mail message, byte for byte, with the expected message. ld a, MAIL_MSG_LENGTH - ld [wd265], a + ld [wTempByteValue], a .loop ld a, [de] ld c, a @@ -162,9 +162,9 @@ CheckPokeMail:: jr nz, .close_sram_return inc hl inc de - ld a, [wd265] + ld a, [wTempByteValue] dec a - ld [wd265], a + ld [wTempByteValue], a jr nz, .loop .done diff --git a/engine/pokemon/mon_menu.asm b/engine/pokemon/mon_menu.asm index 2d14bd603..926c35f5d 100644 --- a/engine/pokemon/mon_menu.asm +++ b/engine/pokemon/mon_menu.asm @@ -100,7 +100,7 @@ GetMonMenuString: jr z, .NotMove inc hl ld a, [hl] - ld [wd265], a + ld [wNamedObjectIndexBuffer], a call GetMoveName ret diff --git a/engine/pokemon/mon_stats.asm b/engine/pokemon/mon_stats.asm index 76f09b461..74e3d2a95 100644 --- a/engine/pokemon/mon_stats.asm +++ b/engine/pokemon/mon_stats.asm @@ -295,7 +295,7 @@ ListMovePP: call PrintNum ld a, "/" ld [hli], a - ld de, wd265 + ld de, wTempPP lb bc, 1, 2 call PrintNum pop hl diff --git a/engine/pokemon/move_mon.asm b/engine/pokemon/move_mon.asm index 128bbf200..377268ecb 100644 --- a/engine/pokemon/move_mon.asm +++ b/engine/pokemon/move_mon.asm @@ -52,7 +52,7 @@ TryAddMonToParty: and a jr nz, .skipnickname ld a, [wCurPartySpecies] - ld [wd265], a + ld [wNamedObjectIndexBuffer], a call GetPokemonName ld hl, wPartyMonNicknames ld a, [hMoveMon] @@ -185,11 +185,11 @@ endr .registerpokedex ld a, [wCurPartySpecies] - ld [wd265], a + ld [wTempSpecies], a dec a push de call CheckCaughtMon - ld a, [wd265] + ld a, [wTempSpecies] dec a call SetSeenAndCaughtMon pop de @@ -750,7 +750,7 @@ RestorePPofDepositedPokemon: farcall GetMaxPPOfMove pop de pop hl - ld a, [wd265] + ld a, [wTempPP] ld b, a ld a, [de] and %11000000 @@ -970,7 +970,7 @@ SendMonIntoBox: call CopyBytes ld a, [wCurPartySpecies] - ld [wd265], a + ld [wNamedObjectIndexBuffer], a call GetPokemonName ld de, sBoxMonNicknames @@ -1669,7 +1669,7 @@ GivePoke:: .done ld a, [wCurPartySpecies] - ld [wd265], a + ld [wNamedObjectIndexBuffer], a ld [wTempEnemyMonSpecies], a call GetPokemonName ld hl, wStringBuffer1 diff --git a/engine/pokemon/move_mon_wo_mail.asm b/engine/pokemon/move_mon_wo_mail.asm index 1dab879c7..c76b43763 100644 --- a/engine/pokemon/move_mon_wo_mail.asm +++ b/engine/pokemon/move_mon_wo_mail.asm @@ -5,21 +5,21 @@ InsertPokemonIntoBox: call InsertSpeciesIntoBoxOrParty ld a, [sBoxCount] dec a - ld [wd265], a + ld [wNextBoxOrPartyIndex], a ld hl, sBoxMonNicknames ld bc, MON_NAME_LENGTH ld de, wBufferMonNick call InsertDataIntoBoxOrParty ld a, [sBoxCount] dec a - ld [wd265], a + ld [wNextBoxOrPartyIndex], a ld hl, sBoxMonOT ld bc, NAME_LENGTH ld de, wBufferMonOT call InsertDataIntoBoxOrParty ld a, [sBoxCount] dec a - ld [wd265], a + ld [wNextBoxOrPartyIndex], a ld hl, sBoxMons ld bc, BOXMON_STRUCT_LENGTH ld de, wBufferMon @@ -42,21 +42,21 @@ InsertPokemonIntoParty: call InsertSpeciesIntoBoxOrParty ld a, [wPartyCount] dec a - ld [wd265], a + ld [wNextBoxOrPartyIndex], a ld hl, wPartyMonNicknames ld bc, MON_NAME_LENGTH ld de, wBufferMonNick call InsertDataIntoBoxOrParty ld a, [wPartyCount] dec a - ld [wd265], a + ld [wNextBoxOrPartyIndex], a ld hl, wPartyMonOT ld bc, NAME_LENGTH ld de, wBufferMonOT call InsertDataIntoBoxOrParty ld a, [wPartyCount] dec a - ld [wd265], a + ld [wNextBoxOrPartyIndex], a ld hl, wPartyMons ld bc, PARTYMON_STRUCT_LENGTH ld de, wBufferMon @@ -85,7 +85,7 @@ InsertDataIntoBoxOrParty: push de push hl push bc - ld a, [wd265] + ld a, [wNextBoxOrPartyIndex] dec a call AddNTimes push hl @@ -95,7 +95,7 @@ InsertDataIntoBoxOrParty: pop hl .loop push bc - ld a, [wd265] + ld a, [wNextBoxOrPartyIndex] ld b, a ld a, [wCurPartyMon] cp b @@ -116,9 +116,9 @@ InsertDataIntoBoxOrParty: sbc b ld h, a pop de - ld a, [wd265] + ld a, [wNextBoxOrPartyIndex] dec a - ld [wd265], a + ld [wNextBoxOrPartyIndex], a jr .loop .insert diff --git a/engine/pokemon/party_menu.asm b/engine/pokemon/party_menu.asm index c3a70dbdc..814e6be55 100644 --- a/engine/pokemon/party_menu.asm +++ b/engine/pokemon/party_menu.asm @@ -596,7 +596,7 @@ InitPartyMenuGFX: push hl ld hl, LoadMenuMonIcon ld a, BANK(LoadMenuMonIcon) - ld e, $0 + ld e, MONICON_PARTYMENU rst FarCall ld a, [hObjectStructIndexBuffer] inc a diff --git a/engine/pokemon/stats_screen.asm b/engine/pokemon/stats_screen.asm index dfc704f1a..72f895269 100644 --- a/engine/pokemon/stats_screen.asm +++ b/engine/pokemon/stats_screen.asm @@ -377,7 +377,7 @@ StatsScreen_InitUpperHalf: xor a ld [hBGMapMode], a ld a, [wBaseDexNo] - ld [wd265], a + ld [wDeciramBuffer], a ld [wCurSpecies], a hlcoord 8, 0 ld [hl], "№" @@ -386,7 +386,7 @@ StatsScreen_InitUpperHalf: inc hl hlcoord 10, 0 lb bc, PRINTNUM_LEADINGZEROS | 1, 3 - ld de, wd265 + ld de, wDeciramBuffer call PrintNum hlcoord 14, 0 call PrintLevel @@ -401,7 +401,7 @@ StatsScreen_InitUpperHalf: ld a, "/" ld [hli], a ld a, [wBaseDexNo] - ld [wd265], a + ld [wNamedObjectIndexBuffer], a call GetPokemonName call PlaceString call StatsScreen_PlaceHorizontalDivider @@ -483,7 +483,7 @@ StatsScreen_PlaceShinyIcon: StatsScreen_LoadGFX: ld a, [wBaseDexNo] - ld [wd265], a + ld [wTempSpecies], a ld [wCurSpecies], a xor a ld [hBGMapMode], a @@ -708,7 +708,7 @@ StatsScreen_LoadGFX: ld b, a farcall TimeCapsule_ReplaceTeruSama ld a, b - ld [wd265], a + ld [wNamedObjectIndexBuffer], a call GetItemName ret diff --git a/engine/pokemon/types.asm b/engine/pokemon/types.asm index 4e2ca3e45..abeeda840 100644 --- a/engine/pokemon/types.asm +++ b/engine/pokemon/types.asm @@ -74,9 +74,9 @@ PrintType: jp PlaceString GetTypeName: -; Copy the name of type [wd265] to wStringBuffer1. +; Copy the name of type [wNamedObjectIndexBuffer] to wStringBuffer1. - ld a, [wd265] + ld a, [wNamedObjectIndexBuffer] ld hl, TypeNames ld e, a ld d, 0 |
