summaryrefslogtreecommitdiff
path: root/main.asm
diff options
context:
space:
mode:
authoryenatch <yenatch@gmail.com>2014-08-22 23:17:47 -0700
committeryenatch <yenatch@gmail.com>2014-08-22 23:17:47 -0700
commit365ae68d80683deab0e2e721b8ff79dda4047513 (patch)
treebed09a02cacafd88af9f11e354cc17ea5e06784a /main.asm
parentcf399a8c86a7340a8c3162400657dca1c5d3ba0a (diff)
Use PARTY_LENGTH and related constants in menu and hud code.
This should allow reducing PARTY_LENGTH to work as intended. Increasing it also works provided space is provided in wram, but breaks pc/saving.
Diffstat (limited to 'main.asm')
-rwxr-xr-xmain.asm10
1 files changed, 5 insertions, 5 deletions
diff --git a/main.asm b/main.asm
index 32a3db2c..96a1df8e 100755
--- a/main.asm
+++ b/main.asm
@@ -3419,7 +3419,7 @@ _AddPartyMon: ; f2e5 (3:72e5)
.asm_f2f2
ld a, [de]
inc a
- cp $7
+ cp PARTY_LENGTH + 1
ret nc
ld [de], a
ld a, [de]
@@ -3681,7 +3681,7 @@ AddPartyMon_WriteMovePP: ; f476 (3:7476)
_AddEnemyMonToPlayerParty: ; f49d (3:749d)
ld hl, wPartyCount
ld a, [hl]
- cp $6
+ cp PARTY_LENGTH
scf
ret z ; party full, return failure
inc a
@@ -3750,13 +3750,13 @@ Func_f51e: ; f51e (3:751e)
jr z, .asm_f575
ld hl, W_NUMINBOX ; wda80
ld a, [hl]
- cp $14
+ cp MONS_PER_BOX
jr nz, .partyOrBoxNotFull
jr .boxFull
.checkPartyMonSlots
ld hl, wPartyCount ; wPartyCount
ld a, [hl]
- cp $6
+ cp PARTY_LENGTH
jr nz, .partyOrBoxNotFull
.boxFull
scf
@@ -3899,7 +3899,7 @@ Func_f51e: ; f51e (3:751e)
ld a, d
ld [W_CURENEMYLVL], a ; W_CURENEMYLVL
pop hl
- ld bc, $21
+ ld bc, wBoxMon2 - wBoxMon1
add hl, bc
ld [hli], a
ld d, h