summaryrefslogtreecommitdiff
path: root/engine/pokemon/add_mon.asm
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2020-07-06 19:03:05 -0400
committerRangi <remy.oukaour+rangi42@gmail.com>2020-07-06 19:03:05 -0400
commit772fcc7588a4e1fbe146a02b429cf64282c81dcb (patch)
treef491fa1d38e37ab10534b3f18422e0149ad0deca /engine/pokemon/add_mon.asm
parentc480632d5494d04f7f5f0298a31877a2293b564e (diff)
Specify the ldh instruction, don't turn ld into ldh
Diffstat (limited to 'engine/pokemon/add_mon.asm')
-rw-r--r--engine/pokemon/add_mon.asm18
1 files changed, 9 insertions, 9 deletions
diff --git a/engine/pokemon/add_mon.asm b/engine/pokemon/add_mon.asm
index 8d0a6495..eeef40b0 100644
--- a/engine/pokemon/add_mon.asm
+++ b/engine/pokemon/add_mon.asm
@@ -15,7 +15,7 @@ _AddPartyMon::
ret nc ; return if the party is already full
ld [de], a
ld a, [de]
- ld [hNewPartyLength], a
+ ldh [hNewPartyLength], a
add e
ld e, a
jr nc, .noCarry
@@ -32,7 +32,7 @@ _AddPartyMon::
jr z, .next2
ld hl, wEnemyMonOT
.next2
- ld a, [hNewPartyLength]
+ ldh a, [hNewPartyLength]
dec a
call SkipFixedLengthTextEntries
ld d, h
@@ -44,7 +44,7 @@ _AddPartyMon::
and a
jr nz, .skipNaming
ld hl, wPartyMonNicks
- ld a, [hNewPartyLength]
+ ldh a, [hNewPartyLength]
dec a
call SkipFixedLengthTextEntries
ld a, NAME_MON_SCREEN
@@ -57,7 +57,7 @@ _AddPartyMon::
jr z, .next3
ld hl, wEnemyMons
.next3
- ld a, [hNewPartyLength]
+ ldh a, [hNewPartyLength]
dec a
ld bc, wPartyMon2 - wPartyMon1
call AddNTimes
@@ -129,10 +129,10 @@ _AddPartyMon::
xor a
ld b, a
call CalcStat ; calc HP stat (set cur Hp to max HP)
- ld a, [hMultiplicand+1]
+ ldh a, [hMultiplicand+1]
ld [de], a
inc de
- ld a, [hMultiplicand+2]
+ ldh a, [hMultiplicand+2]
ld [de], a
inc de
xor a
@@ -204,13 +204,13 @@ _AddPartyMon::
callab CalcExperience
pop de
inc de
- ld a, [hExperience] ; write experience
+ ldh a, [hExperience] ; write experience
ld [de], a
inc de
- ld a, [hExperience + 1]
+ ldh a, [hExperience + 1]
ld [de], a
inc de
- ld a, [hExperience + 2]
+ ldh a, [hExperience + 2]
ld [de], a
xor a
ld b, NUM_STATS * 2