From 365ae68d80683deab0e2e721b8ff79dda4047513 Mon Sep 17 00:00:00 2001 From: yenatch Date: Fri, 22 Aug 2014 23:17:47 -0700 Subject: 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. --- main.asm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'main.asm') 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 -- cgit v1.3.1-sl0p