diff options
Diffstat (limited to 'src/pokemon/pokemon_2.c')
-rw-r--r-- | src/pokemon/pokemon_2.c | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/src/pokemon/pokemon_2.c b/src/pokemon/pokemon_2.c index eb56974cd..b941ed2ab 100644 --- a/src/pokemon/pokemon_2.c +++ b/src/pokemon/pokemon_2.c @@ -1,4 +1,5 @@ #include "global.h" +#include "constants/hold_effects.h" #include "battle.h" #include "battle_util.h" #include "data2.h" @@ -12,6 +13,7 @@ #include "string_util.h" #include "strings2.h" #include "text.h" +#include "trainer.h" #include "util.h" #include "ewram.h" @@ -40,11 +42,12 @@ extern const struct SpriteTemplate gSpriteTemplate_8208288[]; //array of pointers to arrays of pointers to union AnimCmd (We probably need to typedef this.) extern u8 gTrainerClassToPicIndex[]; extern u8 gTrainerClassToNameIndex[]; -extern u8 gSecretBaseTrainerClasses[][5]; -extern u8 gUnknown_08208238[]; -extern u8 gUnknown_0820823C[]; -extern u8 gStatStageRatios[][2]; -extern u8 gHoldEffectToType[][2]; + +extern const u8 gUnknown_08208238[]; +extern const u8 gUnknown_0820823C[]; + +extern void sub_80105A0(struct Sprite *); +extern void oac_poke_opponent(struct Sprite *); u8 CountAliveMons(u8 a1) { @@ -145,6 +148,14 @@ u8 GetGenderFromSpeciesAndPersonality(u16 species, u32 personality) return MON_MALE; } +const struct SpriteTemplate gSpriteTemplate_8208288[] = +{ + {0xFFFF, 0, &gOamData_81F96F0, NULL, gSpriteImageTable_81E7A10, gSpriteAffineAnimTable_81E7B70, sub_80105A0}, + {0xFFFF, 0, &gOamData_81F96E8, NULL, gSpriteImageTable_81E7A30, gSpriteAffineAnimTable_81E7BEC, oac_poke_opponent}, + {0xFFFF, 0, &gOamData_81F96F0, NULL, gSpriteImageTable_81E7A50, gSpriteAffineAnimTable_81E7B70, sub_80105A0}, + {0xFFFF, 0, &gOamData_81F96E8, NULL, gSpriteImageTable_81E7A70, gSpriteAffineAnimTable_81E7BEC, oac_poke_opponent}, +}; + void GetMonSpriteTemplate_803C56C(u16 species, u8 a2) { gUnknown_02024E8C = gSpriteTemplate_8208288[a2]; @@ -1094,6 +1105,13 @@ void CreateSecretBaseEnemyParty(struct SecretBaseRecord *secretBaseRecord) gTrainerBattleOpponent = 1024; } +const u8 gSecretBaseTrainerClasses[][5] = { + // male + {FACILITY_CLASS_YOUNGSTER, FACILITY_CLASS_BUG_CATCHER, FACILITY_CLASS_RICH_BOY, FACILITY_CLASS_CAMPER, FACILITY_CLASS_COOL_TRAINER_M}, + // female + {FACILITY_CLASS_LASS, FACILITY_CLASS_SCHOOL_KID_F, FACILITY_CLASS_LADY, FACILITY_CLASS_PICNICKER, FACILITY_CLASS_COOL_TRAINER_F} +}; + u8 GetSecretBaseTrainerPicIndex(void) { u8 trainerClass = gSecretBaseTrainerClasses[eSecretBaseRecord->gender][eSecretBaseRecord->trainerId[0] % 5]; |