aboutsummaryrefslogtreecommitdiffstats
path: root/engine/battle
diff options
context:
space:
mode:
authorSylvie <35663410+Rangi42@users.noreply.github.com>2024-08-04 10:05:33 -0400
committerGitHub <noreply@github.com>2024-08-04 10:05:33 -0400
commit77d051479bd0ed96cc2efdba52f837afd1e119c3 (patch)
tree72a22aeb8dd6edc10323f0ee72fe9dbf73e5481a /engine/battle
parentIdentify wcd6d as wNameBuffer and others (#455) (diff)
downloadpokeyellow-77d051479bd0ed96cc2efdba52f837afd1e119c3.tar.gz
pokeyellow-77d051479bd0ed96cc2efdba52f837afd1e119c3.tar.xz
pokeyellow-77d051479bd0ed96cc2efdba52f837afd1e119c3.zip
Identify wcf91 as wCurPartySpecies, wCurItem, and wCurListMenuItem (#457)
Diffstat (limited to 'engine/battle')
-rw-r--r--engine/battle/animations.asm6
-rw-r--r--engine/battle/common_text.asm2
-rw-r--r--engine/battle/core.asm30
-rw-r--r--engine/battle/misc.asm2
-rw-r--r--engine/battle/read_trainer_party.asm4
-rw-r--r--engine/battle/wild_encounters.asm2
6 files changed, 23 insertions, 23 deletions
diff --git a/engine/battle/animations.asm b/engine/battle/animations.asm
index 41d6a2ef..31851a91 100644
--- a/engine/battle/animations.asm
+++ b/engine/battle/animations.asm
@@ -683,7 +683,7 @@ DoSpecialEffectByAnimationId:
INCLUDE "data/battle_anims/special_effects.asm"
DoBallTossSpecialEffects:
- ld a, [wcf91]
+ ld a, [wCurItem]
cp ULTRA_BALL + 1 ; is it a Master Ball or Ultra Ball?
jr nc, .skipFlashingEffect
.flashingEffect ; do a flashing effect if it's Master Ball or Ultra Ball
@@ -2031,7 +2031,7 @@ ChangeMonPic:
and a
jr z, .playerTurn
ld a, [wChangeMonPicEnemyTurnSpecies]
- ld [wcf91], a
+ ld [wCurPartySpecies], a
ld [wd0b5], a
xor a
ld [wSpriteFlipped], a
@@ -2599,7 +2599,7 @@ TossBallAnimation:
ld hl, .PokeBallAnimations
; choose which toss animation to use
- ld a, [wcf91]
+ ld a, [wCurItem]
cp POKE_BALL
ld b, TOSS_ANIM
jr z, .done
diff --git a/engine/battle/common_text.asm b/engine/battle/common_text.asm
index 0e270424..810d3fb9 100644
--- a/engine/battle/common_text.asm
+++ b/engine/battle/common_text.asm
@@ -32,7 +32,7 @@ PrintBeginningBattleText:
ld b, SILPH_SCOPE
call IsItemInBag
ld a, [wEnemyMonSpecies2]
- ld [wcf91], a
+ ld [wCurPartySpecies], a
cp RESTLESS_SOUL
jr z, .isMarowak
ld a, b
diff --git a/engine/battle/core.asm b/engine/battle/core.asm
index ae399a01..01faa890 100644
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -229,7 +229,7 @@ StartBattle:
ld b, 0
add hl, bc
ld a, [hl] ; species
- ld [wcf91], a
+ ld [wCurPartySpecies], a
ld [wBattleMonSpecies2], a
call LoadScreenTilesFromBuffer1
hlcoord 1, 5
@@ -1353,7 +1353,7 @@ EnemySendOutFirstMon:
add hl, bc
ld a, [hl]
ld [wEnemyMonSpecies2], a
- ld [wcf91], a
+ ld [wCurPartySpecies], a
call LoadEnemyMonData
ld hl, wEnemyMonHP
ld a, [hli]
@@ -1420,7 +1420,7 @@ EnemySendOutFirstMon:
ld hl, TrainerSentOutText
call PrintText
ld a, [wEnemyMonSpecies2]
- ld [wcf91], a
+ ld [wCurPartySpecies], a
ld [wd0b5], a
call GetMonHeader
ld de, vFrontPic
@@ -1759,7 +1759,7 @@ SendOutMon:
call PlayMoveAnimation
hlcoord 4, 11
predef AnimateSendingOutMon
- ld a, [wcf91]
+ ld a, [wCurPartySpecies]
call PlayCry
call PrintEmptyString
jp SaveScreenTilesToBuffer1
@@ -1841,7 +1841,7 @@ DrawPlayerHUDAndHPBar:
call PrintLevel
.doNotPrintLevel
ld a, [wLoadedMonSpecies]
- ld [wcf91], a
+ ld [wCurPartySpecies], a
hlcoord 10, 9
predef DrawHP
ld a, $1
@@ -2159,7 +2159,7 @@ DisplayBattleMenu::
jp LoadScreenTilesFromBuffer1 ; restore saved screen and return
.throwSafariBallWasSelected
ld a, SAFARI_BALL
- ld [wcf91], a
+ ld [wCurItem], a
jr UseBagItem
.upperLeftMenuItemWasNotSelected ; a menu item other than the upper left item was selected
@@ -2184,7 +2184,7 @@ DisplayBattleMenu::
; bait was selected
ld a, SAFARI_BAIT
- ld [wcf91], a
+ ld [wCurItem], a
jr UseBagItem
BagWasSelected:
@@ -2236,7 +2236,7 @@ DisplayBagMenu:
UseBagItem:
; either use an item from the bag or use a safari zone item
- ld a, [wcf91]
+ ld a, [wCurItem]
ld [wd11e], a
call GetItemName
call CopyToStringBuffer
@@ -2305,7 +2305,7 @@ PartyMenuOrRockOrRun:
jr nz, .partyMenuWasSelected
; safari battle
ld a, SAFARI_ROCK
- ld [wcf91], a
+ ld [wCurItem], a
jp UseBagItem
.partyMenuWasSelected
call LoadScreenTilesFromBuffer1
@@ -2379,7 +2379,7 @@ PartyMenuOrRockOrRun:
jr nz, .doEnemyMonAnimation
; enemy mon is not minimised
ld a, [wEnemyMonSpecies]
- ld [wcf91], a
+ ld [wCurPartySpecies], a
ld [wd0b5], a
call GetMonHeader
ld de, vFrontPic
@@ -6771,7 +6771,7 @@ InitBattle::
InitOpponent:
ld a, [wCurOpponent]
- ld [wcf91], a
+ ld [wCurPartySpecies], a
ld [wEnemyMonSpecies2], a
jr InitBattleCommon
@@ -6847,14 +6847,14 @@ InitWildBattle:
ld a, "T"
ld [hli], a
ld [hl], "@"
- ld a, [wcf91]
+ ld a, [wCurPartySpecies]
push af
ld a, MON_GHOST
- ld [wcf91], a
+ ld [wCurPartySpecies], a
ld de, vFrontPic
call LoadMonFrontSprite ; load ghost sprite
pop af
- ld [wcf91], a
+ ld [wCurPartySpecies], a
jr .spriteLoaded
.isNoGhost
ld de, vFrontPic
@@ -7030,7 +7030,7 @@ LoadMonBackPic:
; Assumes the monster's attributes have
; been loaded with GetMonHeader.
ld a, [wBattleMonSpecies2]
- ld [wcf91], a
+ ld [wCurPartySpecies], a
hlcoord 1, 5
ld b, 7
ld c, 8
diff --git a/engine/battle/misc.asm b/engine/battle/misc.asm
index fe784dd6..1fa84e15 100644
--- a/engine/battle/misc.asm
+++ b/engine/battle/misc.asm
@@ -118,5 +118,5 @@ GetMonSpecies:
ld d, 0
add hl, de
ld a, [hl]
- ld [wcf91], a
+ ld [wCurPartySpecies], a
ret
diff --git a/engine/battle/read_trainer_party.asm b/engine/battle/read_trainer_party.asm
index a88b0dfc..dda440f8 100644
--- a/engine/battle/read_trainer_party.asm
+++ b/engine/battle/read_trainer_party.asm
@@ -54,7 +54,7 @@ ReadTrainer:
ld a, [hli]
and a ; have we reached the end of the trainer data?
jr z, .FinishUp
- ld [wcf91], a ; write species somewhere (XXX why?)
+ ld [wCurPartySpecies], a
ld a, ENEMY_PARTY_DATA
ld [wMonDataLocation], a
push hl
@@ -71,7 +71,7 @@ ReadTrainer:
jr z, .AddLoneMove
ld [wCurEnemyLevel], a
ld a, [hli]
- ld [wcf91], a
+ ld [wCurPartySpecies], a
ld a, ENEMY_PARTY_DATA
ld [wMonDataLocation], a
push hl
diff --git a/engine/battle/wild_encounters.asm b/engine/battle/wild_encounters.asm
index eede46ed..ea451bcf 100644
--- a/engine/battle/wild_encounters.asm
+++ b/engine/battle/wild_encounters.asm
@@ -76,7 +76,7 @@ TryDoWildEncounter:
ld a, [hli]
ld [wCurEnemyLevel], a
ld a, [hl]
- ld [wcf91], a
+ ld [wCurPartySpecies], a
ld [wEnemyMonSpecies2], a
ld a, [wRepelRemainingSteps]
and a