Skip to content

Commit

Permalink
QoL aaaaaa123456789#10: better structuring of trainer data (allowing …
Browse files Browse the repository at this point in the history
…splitting it into banks)

Co-Authored-By: aaaaaa123456789 <[email protected]>
  • Loading branch information
aaaaaa123456789 authored and vulcandth committed Oct 16, 2022
1 parent a99d3bb commit 3055aa9
Show file tree
Hide file tree
Showing 8 changed files with 157 additions and 255 deletions.
14 changes: 9 additions & 5 deletions constants/trainer_data_constants.asm
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,13 @@ DEF ALWAYS_USE EQU 1 << ALWAYS_USE_F
DEF UNKNOWN_USE EQU 1 << UNKNOWN_USE_F
DEF CONTEXT_USE EQU 1 << CONTEXT_USE_F

; TrainerTypes indexes (see engine/battle/read_trainer_party.asm)
; TrainerTypes bits (see engine/battle/read_trainer_party.asm)
const_def
const TRAINERTYPE_NORMAL
const TRAINERTYPE_MOVES
const TRAINERTYPE_ITEM
const TRAINERTYPE_ITEM_MOVES
const TRAINERTYPE_MOVES_F
const TRAINERTYPE_ITEM_F

; Trainer party types (see data/trainers/parties.asm)
TRAINERTYPE_NORMAL EQU 0
TRAINERTYPE_MOVES EQU 1 << TRAINERTYPE_MOVES_F
TRAINERTYPE_ITEM EQU 1 << TRAINERTYPE_ITEM_F
TRAINERTYPE_ITEM_MOVES EQU TRAINERTYPE_MOVES | TRAINERTYPE_ITEM ;backwards compatibility
5 changes: 2 additions & 3 deletions data/trainers/parties.asm
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
INCLUDE "data/trainers/party_pointers.asm"

Trainers:
; Trainer data structure:
; - db "NAME@", TRAINERTYPE_* constant
; - 1 to 6 Pokémon:
Expand All @@ -10,6 +7,8 @@ Trainers:
; * for TRAINERTYPE_ITEM_MOVES: db level, species, item, 4 moves
; - db -1 ; end

SECTION "Enemy Trainer Parties", ROMX

FalknerGroup:
; FALKNER (1)
db "FALKNER@", TRAINERTYPE_MOVES
Expand Down
136 changes: 68 additions & 68 deletions data/trainers/party_pointers.asm
Original file line number Diff line number Diff line change
Expand Up @@ -2,72 +2,72 @@

TrainerGroups:
; entries correspond to trainer classes (see constants/trainer_constants.asm)
table_width 2, TrainerGroups
dw FalknerGroup
dw WhitneyGroup
dw BugsyGroup
dw MortyGroup
dw PryceGroup
dw JasmineGroup
dw ChuckGroup
dw ClairGroup
dw Rival1Group
dw PokemonProfGroup
dw WillGroup
dw PKMNTrainerGroup
dw BrunoGroup
dw KarenGroup
dw KogaGroup
dw ChampionGroup
dw BrockGroup
dw MistyGroup
dw LtSurgeGroup
dw ScientistGroup
dw ErikaGroup
dw YoungsterGroup
dw SchoolboyGroup
dw BirdKeeperGroup
dw LassGroup
dw JanineGroup
dw CooltrainerMGroup
dw CooltrainerFGroup
dw BeautyGroup
dw PokemaniacGroup
dw GruntMGroup
dw GentlemanGroup
dw SkierGroup
dw TeacherGroup
dw SabrinaGroup
dw BugCatcherGroup
dw FisherGroup
dw SwimmerMGroup
dw SwimmerFGroup
dw SailorGroup
dw SuperNerdGroup
dw Rival2Group
dw GuitaristGroup
dw HikerGroup
dw BikerGroup
dw BlaineGroup
dw BurglarGroup
dw FirebreatherGroup
dw JugglerGroup
dw BlackbeltGroup
dw ExecutiveMGroup
dw PsychicGroup
dw PicnickerGroup
dw CamperGroup
dw ExecutiveFGroup
dw SageGroup
dw MediumGroup
dw BoarderGroup
dw PokefanMGroup
dw KimonoGirlGroup
dw TwinsGroup
dw PokefanFGroup
dw RedGroup
dw BlueGroup
dw OfficerGroup
dw GruntFGroup
dw MysticalmanGroup
table_width 3, TrainerGroups
dba FalknerGroup
dba WhitneyGroup
dba BugsyGroup
dba MortyGroup
dba PryceGroup
dba JasmineGroup
dba ChuckGroup
dba ClairGroup
dba Rival1Group
dba PokemonProfGroup
dba WillGroup
dba PKMNTrainerGroup
dba BrunoGroup
dba KarenGroup
dba KogaGroup
dba ChampionGroup
dba BrockGroup
dba MistyGroup
dba LtSurgeGroup
dba ScientistGroup
dba ErikaGroup
dba YoungsterGroup
dba SchoolboyGroup
dba BirdKeeperGroup
dba LassGroup
dba JanineGroup
dba CooltrainerMGroup
dba CooltrainerFGroup
dba BeautyGroup
dba PokemaniacGroup
dba GruntMGroup
dba GentlemanGroup
dba SkierGroup
dba TeacherGroup
dba SabrinaGroup
dba BugCatcherGroup
dba FisherGroup
dba SwimmerMGroup
dba SwimmerFGroup
dba SailorGroup
dba SuperNerdGroup
dba Rival2Group
dba GuitaristGroup
dba HikerGroup
dba BikerGroup
dba BlaineGroup
dba BurglarGroup
dba FirebreatherGroup
dba JugglerGroup
dba BlackbeltGroup
dba ExecutiveMGroup
dba PsychicGroup
dba PicnickerGroup
dba CamperGroup
dba ExecutiveFGroup
dba SageGroup
dba MediumGroup
dba BoarderGroup
dba PokefanMGroup
dba KimonoGirlGroup
dba TwinsGroup
dba PokefanFGroup
dba RedGroup
dba BlueGroup
dba OfficerGroup
dba GruntFGroup
dba MysticalmanGroup
assert_table_length NUM_TRAINER_CLASSES
Loading

0 comments on commit 3055aa9

Please sign in to comment.