summaryrefslogtreecommitdiff
path: root/engine/battle/read_trainer_attributes.asm
diff options
context:
space:
mode:
Diffstat (limited to 'engine/battle/read_trainer_attributes.asm')
-rw-r--r--engine/battle/read_trainer_attributes.asm22
1 files changed, 11 insertions, 11 deletions
diff --git a/engine/battle/read_trainer_attributes.asm b/engine/battle/read_trainer_attributes.asm
index dfb8d3682..0b9507e0d 100644
--- a/engine/battle/read_trainer_attributes.asm
+++ b/engine/battle/read_trainer_attributes.asm
@@ -1,18 +1,18 @@
GetTrainerClassName: ; 3952d
- ld hl, RivalName
+ ld hl, wRivalName
ld a, c
cp RIVAL1
jr z, .rival
- ld [CurSpecies], a
+ ld [wCurSpecies], a
ld a, TRAINER_NAME
ld [wNamedObjectTypeBuffer], a
call GetName
- ld de, StringBuffer1
+ ld de, wStringBuffer1
ret
.rival
- ld de, StringBuffer1
+ ld de, wStringBuffer1
push de
ld bc, NAME_LENGTH
call CopyBytes
@@ -20,35 +20,35 @@ GetTrainerClassName: ; 3952d
ret
GetOTName: ; 39550
- ld hl, OTPlayerName
+ ld hl, wOTPlayerName
ld a, [wLinkMode]
and a
jr nz, .ok
- ld hl, RivalName
+ ld hl, wRivalName
ld a, c
cp RIVAL1
jr z, .ok
- ld [CurSpecies], a
+ ld [wCurSpecies], a
ld a, TRAINER_NAME
ld [wNamedObjectTypeBuffer], a
call GetName
- ld hl, StringBuffer1
+ ld hl, wStringBuffer1
.ok
ld bc, TRAINER_CLASS_NAME_LENGTH
- ld de, OTClassName
+ ld de, wOTClassName
push de
call CopyBytes
pop de
ret
GetTrainerAttributes: ; 3957b
- ld a, [TrainerClass]
+ ld a, [wTrainerClass]
ld c, a
call GetOTName
- ld a, [TrainerClass]
+ ld a, [wTrainerClass]
dec a
ld hl, TrainerClassAttributes + TRNATTR_ITEM1
ld bc, NUM_TRAINER_ATTRIBUTES