Replace party struct relative values with EQUS constants

This commit is contained in:
PikalaxALT
2015-11-04 11:19:58 -05:00
parent 14e0da5116
commit 739bb3c136
40 changed files with 2824 additions and 2816 deletions

View File

@@ -302,7 +302,7 @@ VerifyUniqueness: ; 8b2e9
.nextmon: ; 8b31a
push bc
ld bc, PartyMon2 - PartyMon1
ld bc, PARTYMON_STRUCT_LENGTH
add hl, bc
inc de
pop bc

View File

@@ -12,7 +12,7 @@ SpecialDratini: ; 0x8b170
call GetNthPartyMon
ld a, [bc]
ld c, a
ld de, PartyMon2 - PartyMon1
ld de, PARTYMON_STRUCT_LENGTH
.CheckForDratini
; start at the end of the party and search backwards for a Dratini
ld a, [hl]
@@ -59,7 +59,7 @@ endr
call GetFarByte
; get the address of the move's PP and update the PP
ld hl, PartyMon1PP - PartyMon1Moves
ld hl, (MON_PP) - (MON_MOVES)
add hl, de
ld [hl], a
@@ -100,7 +100,7 @@ GetNthPartyMon: ; 0x8b1ce
jr z, .EmptyParty
dec a
ret z
ld de, PartyMon2 - PartyMon1
ld de, PARTYMON_STRUCT_LENGTH
.loop
add hl, de
dec a

View File

@@ -16,7 +16,7 @@ Special_CheckMagikarpLength: ; fbb32
; Now let's compute its length based on its DVs and ID.
ld a, [CurPartyMon]
ld hl, PartyMon1Species
ld bc, PartyMon2 - PartyMon1
ld bc, PARTYMON_STRUCT_LENGTH
call AddNTimes
push hl
ld bc, MON_DVS

View File

@@ -12,7 +12,7 @@ MoveDeletion:
jr z, .asm_2c5bc
ld a, [CurPartyMon]
ld hl, PartyMon1Moves + 1
ld bc, PartyMon2 - PartyMon1
ld bc, PARTYMON_STRUCT_LENGTH
call AddNTimes
ld a, [hl]
and a
@@ -116,7 +116,7 @@ Function2c5f9: ; 2c5f9
ld hl, PartyMon1Moves
add hl, bc
ld a, [CurPartyMon]
ld bc, PartyMon2 - PartyMon1
ld bc, PARTYMON_STRUCT_LENGTH
call AddNTimes
pop bc
push bc
@@ -145,7 +145,7 @@ Function2c5f9: ; 2c5f9
ld hl, PartyMon1PP
add hl, bc
ld a, [CurPartyMon]
ld bc, PartyMon2 - PartyMon1
ld bc, PARTYMON_STRUCT_LENGTH
call AddNTimes
pop bc
inc b

View File

@@ -91,7 +91,7 @@ CheckIfMonIsYourOT: ; fb78a
jr c, .nope
ld hl, PartyMon1ID
ld bc, PartyMon2 - PartyMon1
ld bc, PARTYMON_STRUCT_LENGTH
ld a, [CurPartyMon]
call AddNTimes
ld de, PlayerID

View File

@@ -97,7 +97,7 @@ SeerAction4: ; 4f12b
; 4f134
ReadCaughtData: ; 4f134
ld a, PartyMon1CaughtData - PartyMon1
ld a, MON_CAUGHTDATA
call GetPartyParamLocation
ld a, [hli]
ld [wd03b], a
@@ -109,7 +109,7 @@ ReadCaughtData: ; 4f134
ld a, 1
ld [wd002], a
ld a, PartyMon1ID - PartyMon1
ld a, MON_ID
call GetPartyParamLocation
ld a, [PlayerID]
cp [hl]
@@ -358,7 +358,7 @@ SeerCancelText: ; 0x4f2af
SeerAdvice: ; 4f2b4
ld a, PartyMon1Level - PartyMon1
ld a, MON_LEVEL
call GetPartyParamLocation
ld a, [wd038 + 2]
ld c, a
@@ -426,7 +426,7 @@ SeerAdvice5: ; 0x4f2fc
GetCaughtGender: ; 4f301
ld hl, PartyMon1CaughtGender - PartyMon1
ld hl, MON_CAUGHTGENDER
add hl, bc
ld a, [hl]

View File

@@ -38,7 +38,7 @@ SpecialOmanyteChamber: ; 8adef
dec a
ld [CurPartyMon], a
push bc
ld a, PartyMon1Item - PartyMon1
ld a, MON_ITEM
call GetPartyParamLocation
pop bc
ld a, [hl]