summaryrefslogtreecommitdiff
path: root/trainers/read_attributes.asm
diff options
context:
space:
mode:
authorRemy Oukaour <remy.oukaour@gmail.com>2017-12-14 23:00:54 -0500
committerRemy Oukaour <remy.oukaour@gmail.com>2017-12-14 23:00:54 -0500
commit6ab1d028bbb94ba35c16d715341444453e895716 (patch)
tree1e513fa52251d73eef5ec8e9115f7b793cb6be69 /trainers/read_attributes.asm
parent9ba224e2e68d066d0a82369a403da28d84656787 (diff)
Split items/ and trainers/ into their data/ and engine/ components
Move some data into a pokemon/ subdirectory
Diffstat (limited to 'trainers/read_attributes.asm')
-rw-r--r--trainers/read_attributes.asm64
1 files changed, 0 insertions, 64 deletions
diff --git a/trainers/read_attributes.asm b/trainers/read_attributes.asm
deleted file mode 100644
index dfb8d3682..000000000
--- a/trainers/read_attributes.asm
+++ /dev/null
@@ -1,64 +0,0 @@
-GetTrainerClassName: ; 3952d
- ld hl, RivalName
- ld a, c
- cp RIVAL1
- jr z, .rival
-
- ld [CurSpecies], a
- ld a, TRAINER_NAME
- ld [wNamedObjectTypeBuffer], a
- call GetName
- ld de, StringBuffer1
- ret
-
-.rival
- ld de, StringBuffer1
- push de
- ld bc, NAME_LENGTH
- call CopyBytes
- pop de
- ret
-
-GetOTName: ; 39550
- ld hl, OTPlayerName
- ld a, [wLinkMode]
- and a
- jr nz, .ok
-
- ld hl, RivalName
- ld a, c
- cp RIVAL1
- jr z, .ok
-
- ld [CurSpecies], a
- ld a, TRAINER_NAME
- ld [wNamedObjectTypeBuffer], a
- call GetName
- ld hl, StringBuffer1
-
-.ok
- ld bc, TRAINER_CLASS_NAME_LENGTH
- ld de, OTClassName
- push de
- call CopyBytes
- pop de
- ret
-
-GetTrainerAttributes: ; 3957b
- ld a, [TrainerClass]
- ld c, a
- call GetOTName
- ld a, [TrainerClass]
- dec a
- ld hl, TrainerClassAttributes + TRNATTR_ITEM1
- ld bc, NUM_TRAINER_ATTRIBUTES
- call AddNTimes
- ld de, wEnemyTrainerItem1
- ld a, [hli]
- ld [de], a
- inc de
- ld a, [hli]
- ld [de], a
- ld a, [hl]
- ld [wEnemyTrainerBaseReward], a
- ret