diff options
author | Seth Barberee <seth.barberee@gmail.com> | 2021-03-12 15:39:07 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-12 15:39:07 -0600 |
commit | 7b142311a7294c4c7a943870fa5f24f0fbea604a (patch) | |
tree | a1a9513c2f997cc8274af093803dd7d936e65ad0 /src/exclusive_pokemon.c | |
parent | d72e17b5f5d795bebda2f6dc78dccb5e80c432b5 (diff) |
Miscellaneous Work (Again) (#30)
* work on debug menu and document that and main menu
* split, decomp, label more funcs
* split exclusive pokemon data out into C
* macro-ize exlusive pokemon data
* decomp 2 more funcs
* decomp a few more
* finally match PromptNewQuestion
* woot 7% aka more debug menu stuff
Diffstat (limited to 'src/exclusive_pokemon.c')
-rw-r--r-- | src/exclusive_pokemon.c | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/src/exclusive_pokemon.c b/src/exclusive_pokemon.c new file mode 100644 index 0000000..cf64724 --- /dev/null +++ b/src/exclusive_pokemon.c @@ -0,0 +1,80 @@ +#include "global.h" +#include "constants/species.h" +#define NUM_EXCLUSIVE_POKEMON 12 + +#define RED_EXCLUSIVE(species) \ +{ \ + .poke_id = species, \ + .in_rrt = TRUE, \ + .in_brt = FALSE, \ +} + +#define BLUE_EXCLUSIVE(species) \ +{ \ + .poke_id = species, \ + .in_rrt = FALSE, \ + .in_brt = TRUE, \ +} + + +struct ExclusivePokemon +{ + u16 poke_id; + bool8 in_rrt; // red rescue team + bool8 in_brt; // blue rescue team +}; + +const struct ExclusivePokemon gExclusivePokemon[NUM_EXCLUSIVE_POKEMON] = { + + RED_EXCLUSIVE(SPECIES_PORYGON), + BLUE_EXCLUSIVE(SPECIES_PORYGON2), + BLUE_EXCLUSIVE(SPECIES_MAGIKARP), + BLUE_EXCLUSIVE(SPECIES_GYARADOS), + RED_EXCLUSIVE(SPECIES_FEEBAS), + RED_EXCLUSIVE(SPECIES_MILOTIC), + RED_EXCLUSIVE(SPECIES_PLUSLE), + BLUE_EXCLUSIVE(SPECIES_MINUN), + BLUE_EXCLUSIVE(SPECIES_LAPRAS), + RED_EXCLUSIVE(SPECIES_MANTINE), + RED_EXCLUSIVE(SPECIES_ROSELIA), + BLUE_EXCLUSIVE(SPECIES_AIPOM), +}; + +const u8 filler_ex0[8] = +{ + 'p', 'k', 's', 'd', 'i', 'r', '0', 0 +}; +const u8 filler_ex1[8] = +{ + 'p', 'k', 's', 'd', 'i', 'r', '0', 0 +}; + + +struct unkStruct_203B498 +{ + u8 fill0[0x58]; + bool8 Exclusives[NUM_EXCLUSIVE_POKEMON]; +}; +extern struct unkStruct_203B498 *gUnknown_203B498; +extern struct unkStruct_203B498 gUnknown_2039840; + + +void LoadExclusivePokemon(void) +{ + gUnknown_203B498 = &gUnknown_2039840; +} + +struct unkStruct_203B498 *GetExclusivePokemon(void) +{ + return &gUnknown_2039840; +} + +void InitializeExclusivePokemon(void) +{ + s32 counter; + memset(gUnknown_203B498, 0, sizeof(struct unkStruct_203B498)); + for(counter = 0; counter < NUM_EXCLUSIVE_POKEMON; counter++) + { + gUnknown_203B498->Exclusives[counter] = gExclusivePokemon[counter].in_rrt; + } +} |