You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-12-11 05:02:16 -08:00
Replace party struct relative values with EQUS constants
This commit is contained in:
@@ -6527,7 +6527,7 @@ Function102bdc: ; 102bdc
|
||||
jr nz, .asm_102c05
|
||||
|
||||
.asm_102bfa
|
||||
ld bc, OTPartyMon1Level - OTPartyMon1
|
||||
ld bc, MON_LEVEL
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
cp MAX_LEVEL + 1
|
||||
@@ -6718,7 +6718,7 @@ Function102d48: ; 102d48
|
||||
call SetSeenAndCaughtMon
|
||||
ld a, [wcd4c]
|
||||
dec a
|
||||
ld bc, PartyMon2 - PartyMon1
|
||||
ld bc, PARTYMON_STRUCT_LENGTH
|
||||
ld hl, PartyMon1Happiness
|
||||
call AddNTimes
|
||||
ld [hl], BASE_HAPPINESS
|
||||
@@ -6729,7 +6729,7 @@ Function102d48: ; 102d48
|
||||
jr nz, .asm_102d98
|
||||
ld a, [wcd4c]
|
||||
dec a
|
||||
ld bc, PartyMon2 - PartyMon1
|
||||
ld bc, PARTYMON_STRUCT_LENGTH
|
||||
ld hl, PartyMon1DVs
|
||||
call AddNTimes
|
||||
predef GetUnownLetter
|
||||
|
||||
@@ -4101,7 +4101,7 @@ Function119d93: ; 119d93 (46:5d93)
|
||||
call SimpleMultiply
|
||||
ld hl, wcd50
|
||||
ld [hl], a
|
||||
ld bc, PartyMon2 - PartyMon1
|
||||
ld bc, PARTYMON_STRUCT_LENGTH
|
||||
ld de, PartyMon1Level
|
||||
ld a, [PartyCount]
|
||||
.asm_119daf
|
||||
@@ -4143,7 +4143,7 @@ Function119dd1: ; 119dd1 (46:5dd1)
|
||||
ld a, $1
|
||||
ld [rSVBK], a ; $ff00+$70
|
||||
ld hl, PartyMon1Level
|
||||
ld bc, PartyMon2 - PartyMon1
|
||||
ld bc, PARTYMON_STRUCT_LENGTH
|
||||
ld de, PartySpecies
|
||||
ld a, [PartyCount]
|
||||
.asm_119deb
|
||||
@@ -7867,7 +7867,7 @@ Function11b98f: ; 11b98f
|
||||
ld a, $ff
|
||||
ld [bc], a
|
||||
ld hl, PartyMon1Species
|
||||
ld bc, PartyMon2 - PartyMon1
|
||||
ld bc, PARTYMON_STRUCT_LENGTH
|
||||
ld a, e
|
||||
ld [wcd2a], a
|
||||
.loop2
|
||||
@@ -7881,7 +7881,7 @@ Function11b98f: ; 11b98f
|
||||
ld l, a
|
||||
ld a, [wcd23]
|
||||
ld h, a
|
||||
ld bc, PartyMon2 - PartyMon1
|
||||
ld bc, PARTYMON_STRUCT_LENGTH
|
||||
call CopyBytes
|
||||
ld hl, PartyMonOT
|
||||
ld bc, NAME_LENGTH
|
||||
@@ -7920,7 +7920,7 @@ Function11b98f: ; 11b98f
|
||||
ld a, "@"
|
||||
ld [de], a
|
||||
ld hl, s0_a600
|
||||
ld bc, party_struct_length - 1
|
||||
ld bc, PARTYMON_STRUCT_LENGTH - 1
|
||||
ld a, [wcd2a]
|
||||
.loop5
|
||||
add hl, bc
|
||||
@@ -7935,7 +7935,7 @@ Function11b98f: ; 11b98f
|
||||
ld l, a
|
||||
ld a, [wcd29]
|
||||
ld h, a
|
||||
ld bc, party_struct_length - 1
|
||||
ld bc, PARTYMON_STRUCT_LENGTH - 1
|
||||
call CopyBytes
|
||||
call CloseSRAM
|
||||
ret
|
||||
|
||||
@@ -431,7 +431,7 @@ Function1702b7: ; 1702b7
|
||||
ld [bc], a
|
||||
inc bc
|
||||
push bc
|
||||
ld bc, party_struct_length
|
||||
ld bc, PARTYMON_STRUCT_LENGTH
|
||||
call CopyBytes
|
||||
push de
|
||||
ld a, [BGMapBuffer]
|
||||
@@ -648,7 +648,7 @@ CopyBTTrainer_FromBT_OTrainer_TowBT_OTTempCopy: ; 1704a2
|
||||
ld hl, BT_OTrainer ; $d100
|
||||
ld de, wBT_OTTempCopy ; $c608
|
||||
ld bc, BT_OTrainerEnd - BT_OTrainer ; $e0 = $a + $1 + 3*$3b + $24
|
||||
; = $a + $1 + BATTLETOWER_NROFPKMNS * (party_struct_length + PKMN_NAME_LENGTH) + BATTLETOWER_TRAINERDATALENGTH
|
||||
; = $a + $1 + BATTLETOWER_NROFPKMNS * (PARTYMON_STRUCT_LENGTH + PKMN_NAME_LENGTH) + BATTLETOWER_TRAINERDATALENGTH
|
||||
call CopyBytes
|
||||
pop af
|
||||
ld [rSVBK], a
|
||||
|
||||
@@ -410,7 +410,7 @@ Function17d1f1: ; 17d1f1
|
||||
ld hl, PartyMon1DVs
|
||||
ld a, [PartyCount]
|
||||
dec a
|
||||
ld bc, PartyMon2 - PartyMon1
|
||||
ld bc, PARTYMON_STRUCT_LENGTH
|
||||
call AddNTimes
|
||||
predef GetUnownLetter
|
||||
callab Functionfba18
|
||||
@@ -2398,7 +2398,7 @@ Function17ded9: ; 17ded9
|
||||
ld a, [hli]
|
||||
ld b, a
|
||||
push hl
|
||||
callba SetPkmnCaughtData
|
||||
callba SetPartymonCaughtData
|
||||
pop hl
|
||||
pop bc
|
||||
jr .asm_17df5e
|
||||
@@ -2585,7 +2585,7 @@ Function17e026: ; 17e026
|
||||
ld b, a
|
||||
push hl
|
||||
call CloseSRAM
|
||||
callba Function4db92
|
||||
callba SetBoxMonCaughtData
|
||||
ld a, $1
|
||||
call GetSRAMBank
|
||||
pop hl
|
||||
|
||||
Reference in New Issue
Block a user