aboutsummaryrefslogtreecommitdiffstats
path: root/engine/battle
diff options
context:
space:
mode:
authorSylvie <35663410+Rangi42@users.noreply.github.com>2024-07-24 12:21:59 -0400
committerGitHub <noreply@github.com>2024-07-24 12:21:59 -0400
commit6e3ab0a9e97ff14123ac65f56cb4b4ddab45b695 (patch)
tree32feac5e86fbac9eec6f40c14a19c8bd89c1b52d /engine/battle
parentIdentify various flag labels and bit constants (#454) (diff)
downloadpokeyellow-6e3ab0a9e97ff14123ac65f56cb4b4ddab45b695.tar.gz
pokeyellow-6e3ab0a9e97ff14123ac65f56cb4b4ddab45b695.tar.xz
pokeyellow-6e3ab0a9e97ff14123ac65f56cb4b4ddab45b695.zip
Identify wcd6d as wNameBuffer and others (#455)
Diffstat (limited to 'engine/battle')
-rw-r--r--engine/battle/core.asm10
-rw-r--r--engine/battle/get_trainer_name.asm4
-rw-r--r--engine/battle/misc.asm8
-rw-r--r--engine/battle/move_effects/pay_day.asm6
-rw-r--r--engine/battle/save_trainer_name.asm2
5 files changed, 15 insertions, 15 deletions
diff --git a/engine/battle/core.asm b/engine/battle/core.asm
index ab4d1c56..ae399a01 100644
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -2878,7 +2878,7 @@ PrintMenuItem:
add hl, bc
ld a, [hl]
and $3f
- ld [wcd6d], a
+ ld [wBattleMenuCurrentPP], a
; print TYPE/<type> and <curPP>/<maxPP>
hlcoord 1, 9
ld de, TypeText
@@ -2888,7 +2888,7 @@ PrintMenuItem:
hlcoord 5, 9
ld [hl], "/"
hlcoord 5, 11
- ld de, wcd6d
+ ld de, wBattleMenuCurrentPP
lb bc, 1, 2
call PrintNumber
hlcoord 8, 11
@@ -5631,7 +5631,7 @@ EnemyCanExecuteChargingMove:
ld a, MOVE_NAME
ld [wNameListType], a
call GetName
- ld de, wcd6d
+ ld de, wNameBuffer
call CopyToStringBuffer
EnemyCanExecuteMove:
xor a
@@ -6111,7 +6111,7 @@ GetCurrentMove:
ld a, MOVE_NAME
ld [wNameListType], a
call GetName
- ld de, wcd6d
+ ld de, wNameBuffer
jp CopyToStringBuffer
LoadEnemyMonData:
@@ -6247,7 +6247,7 @@ LoadEnemyMonData:
ld a, [wEnemyMonSpecies2]
ld [wd11e], a
call GetMonName
- ld hl, wcd6d
+ ld hl, wNameBuffer
ld de, wEnemyMonNick
ld bc, NAME_LENGTH
call CopyData
diff --git a/engine/battle/get_trainer_name.asm b/engine/battle/get_trainer_name.asm
index b2daebfe..82be49e0 100644
--- a/engine/battle/get_trainer_name.asm
+++ b/engine/battle/get_trainer_name.asm
@@ -17,8 +17,8 @@ GetTrainerName_::
ld a, BANK(TrainerNames)
ld [wPredefBank], a
call GetName
- ld hl, wcd6d
+ ld hl, wNameBuffer
.foundName
ld de, wTrainerName
- ld bc, $d
+ ld bc, ITEM_NAME_LENGTH
jp CopyData
diff --git a/engine/battle/misc.asm b/engine/battle/misc.asm
index 4feef343..fe784dd6 100644
--- a/engine/battle/misc.asm
+++ b/engine/battle/misc.asm
@@ -14,10 +14,10 @@ FormatMovesString:
ld a, MOVE_NAME
ld [wNameListType], a
call GetName
- ld hl, wcd6d
+ ld hl, wNameBuffer
.copyNameLoop
ld a, [hli]
- cp $50
+ cp "@"
jr z, .doneCopyingName
ld [de], a
inc de
@@ -26,7 +26,7 @@ FormatMovesString:
ld a, b
ld [wNumMovesMinusOne], a
inc b
- ld a, $4e ; line break
+ ld a, "<NEXT>"
ld [de], a
inc de
pop hl
@@ -42,7 +42,7 @@ FormatMovesString:
ld a, b
cp NUM_MOVES
jr z, .done
- ld a, $4e ; line break
+ ld a, "<NEXT>"
ld [de], a
inc de
jr .printDashLoop
diff --git a/engine/battle/move_effects/pay_day.asm b/engine/battle/move_effects/pay_day.asm
index fa373038..9aab3feb 100644
--- a/engine/battle/move_effects/pay_day.asm
+++ b/engine/battle/move_effects/pay_day.asm
@@ -1,6 +1,6 @@
PayDayEffect_:
xor a
- ld hl, wcd6d
+ ld hl, wPayDayMoney
ld [hli], a
ldh a, [hWhoseTurn]
and a
@@ -21,7 +21,7 @@ PayDayEffect_:
ld b, $4
call Divide
ldh a, [hQuotient + 3]
- ld [hli], a
+ ld [hli], a ; wPayDayMoney + 1
ldh a, [hRemainder]
ldh [hDividend + 3], a
ld a, 10
@@ -33,7 +33,7 @@ PayDayEffect_:
ld b, a
ldh a, [hRemainder]
add b
- ld [hl], a
+ ld [hl], a ; wPayDayMoney + 2
ld de, wTotalPayDayMoney + 2
ld c, $3
predef AddBCDPredef
diff --git a/engine/battle/save_trainer_name.asm b/engine/battle/save_trainer_name.asm
index 4d40fd82..b25d5a11 100644
--- a/engine/battle/save_trainer_name.asm
+++ b/engine/battle/save_trainer_name.asm
@@ -9,7 +9,7 @@ SaveTrainerName::
ld a, [hli]
ld h, [hl]
ld l, a
- ld de, wcd6d
+ ld de, wNameBuffer
.CopyCharacter
ld a, [hli]
ld [de], a