Name and comment the trainer party reader.

Reads the contents of trainers/trainers.asm.
This commit is contained in:
yenatch
2014-06-14 22:33:23 -07:00
parent e6271ca450
commit db27602679
4 changed files with 181 additions and 141 deletions

View File

@@ -8485,14 +8485,15 @@ Function3f594: ; 3f594
xor a xor a
ld [TempEnemyMonSpecies], a ld [TempEnemyMonSpecies], a
callab Function3957b callab Function3957b
callab Function39771 callab ReadTrainerParty
ld a, [TrainerClass] ld a, [TrainerClass]
cp $9 cp RIVAL1
jr nz, .asm_3f5b8 jr nz, .ok
xor a xor a
ld [OTPartyMon1Item], a ld [OTPartyMon1Item], a
.ok
.asm_3f5b8
ld de, VTiles2 ld de, VTiles2
callab Function5120d callab Function5120d
xor a xor a
@@ -8500,13 +8501,14 @@ Function3f594: ; 3f594
dec a dec a
ld [$c6e6], a ld [$c6e6], a
hlcoord 12, 0 hlcoord 12, 0
ld bc, $0707 lb bc, 7, 7
ld a, $13 ld a, PREDEF_FILL_BOX
call Predef call Predef
ld a, $ff ld a, $ff
ld [CurOTMon], a ld [CurOTMon], a
ld a, $2 ld a, TRAINER_BATTLE
ld [IsInBattle], a ld [IsInBattle], a
call IsJohtoGymLeader call IsJohtoGymLeader
jr nc, .asm_3f606 jr nc, .asm_3f606
xor a xor a
@@ -8515,14 +8517,13 @@ Function3f594: ; 3f594
ld b, a ld b, a
.asm_3f5ea .asm_3f5ea
push bc push bc
ld a, $22 ld a, PartyMon1HP - PartyMon1
call GetPartyParamLocation call GetPartyParamLocation
ld a, [hli] ld a, [hli]
or [hl] or [hl]
jr z, .asm_3f5fc jr z, .asm_3f5fc
ld c, $4 ld c, $4
callab ChangeHappiness callab ChangeHappiness
.asm_3f5fc .asm_3f5fc
pop bc pop bc
dec b dec b
@@ -8530,7 +8531,6 @@ Function3f594: ; 3f594
ld hl, CurPartyMon ld hl, CurPartyMon
inc [hl] inc [hl]
jr .asm_3f5ea jr .asm_3f5ea
.asm_3f606 .asm_3f606
ret ret
; 3f607 ; 3f607
@@ -8568,8 +8568,8 @@ Function3f607: ; 3f607
ld [TrainerClass], a ld [TrainerClass], a
ld [$ffad], a ld [$ffad], a
hlcoord 12, 0 hlcoord 12, 0
ld bc, $0707 lb bc, 7, 7
ld a, $13 ld a, PREDEF_FILL_BOX
call Predef call Predef
ret ret
; 3f662 ; 3f662

294
main.asm

File diff suppressed because it is too large Load Diff

View File

@@ -5,7 +5,7 @@
; Type ; Type
; 0: Level, species ; 0: Level, species
; 1: Level, species, moves ; 1: Level, species, moves
; 2: Level, sepcies, item ; 2: Level, species, item
; 3: Level, species, item, moves ; 3: Level, species, item, moves
; Party ; Party
; Up to six monsters following the data type ; Up to six monsters following the data type

View File

@@ -1170,12 +1170,14 @@ OTPartyCount:: ds 1 ; d280
OTPartySpecies:: ds PARTY_LENGTH ; d281 OTPartySpecies:: ds PARTY_LENGTH ; d281
OTPartyEnd:: ds 1 OTPartyEnd:: ds 1
OTPartyMons::
OTPartyMon1:: party_struct OTPartyMon1 ; d288 OTPartyMon1:: party_struct OTPartyMon1 ; d288
OTPartyMon2:: party_struct OTPartyMon2 ; d2b8 OTPartyMon2:: party_struct OTPartyMon2 ; d2b8
OTPartyMon3:: party_struct OTPartyMon3 ; d2e8 OTPartyMon3:: party_struct OTPartyMon3 ; d2e8
OTPartyMon4:: party_struct OTPartyMon4 ; d318 OTPartyMon4:: party_struct OTPartyMon4 ; d318
OTPartyMon5:: party_struct OTPartyMon5 ; d348 OTPartyMon5:: party_struct OTPartyMon5 ; d348
OTPartyMon6:: party_struct OTPartyMon6 ; d378 OTPartyMon6:: party_struct OTPartyMon6 ; d378
OTPartyMonsEnd::
OTPartyMonOT:: ds NAME_LENGTH * PARTY_LENGTH ; d3a8 OTPartyMonOT:: ds NAME_LENGTH * PARTY_LENGTH ; d3a8
OTPartyMonNicknames:: ds PKMN_NAME_LENGTH * PARTY_LENGTH ; d3ea OTPartyMonNicknames:: ds PKMN_NAME_LENGTH * PARTY_LENGTH ; d3ea