From b9ff56bd89ac11a9b40b34f834dcf7a5be4d90a6 Mon Sep 17 00:00:00 2001 From: Cameron Hall Date: Fri, 27 Jan 2017 13:06:20 -0500 Subject: define more data in C (#219) * define some graphics data in C * define wild pokemon in C * use less #ifdefs * define data in berry.c --- src/pokemon_2.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/pokemon_2.c') diff --git a/src/pokemon_2.c b/src/pokemon_2.c index 87d95e1fa..ecdd1af20 100644 --- a/src/pokemon_2.c +++ b/src/pokemon_2.c @@ -39,10 +39,11 @@ extern u32 gBitTable[]; extern struct BaseStats gBaseStats[]; extern u8 gSpeciesNames[][11]; extern struct BattleMove gBattleMoves[]; -extern struct SpriteTemplate gSpriteTemplate_8208288[]; -extern union AmimCmd *gSpriteAnimTable_81E7C64[]; -extern union AnimCmd **gUnknown_081EC2A4[]; -extern union AnimCmd **gUnknown_081ECACC[]; +extern const struct SpriteTemplate gSpriteTemplate_8208288[]; +extern const union AmimCmd *const gSpriteAnimTable_81E7C64[]; +//array of pointers to arrays of pointers to union AnimCmd (We probably need to typedef this.) +extern const union AnimCmd *const *const gUnknown_081EC2A4[]; +extern const union AnimCmd *const *const gUnknown_081ECACC[]; extern u8 gTrainerClassToPicIndex[]; extern u8 gTrainerClassToNameIndex[]; extern u8 gSecretBaseTrainerClasses[]; @@ -248,7 +249,8 @@ void GetMonSpriteTemplate_803C56C(u16 species, u8 a2) { gUnknown_02024E8C = gSpriteTemplate_8208288[a2]; gUnknown_02024E8C.paletteTag = species; - gUnknown_02024E8C.anims = (union AnimCmd **)gSpriteAnimTable_81E7C64; + //Don't know why the compiler says this is incompatible + gUnknown_02024E8C.anims = (const union AnimCmd *const *)gSpriteAnimTable_81E7C64; } void GetMonSpriteTemplate_803C5A0(u16 species, u8 a2) -- cgit v1.2.3