diff options
Diffstat (limited to 'include')
-rwxr-xr-x | include/asm.inc.h | 2 | ||||
-rw-r--r-- | include/battle.h | 72 | ||||
-rw-r--r-- | include/battle_interface.h | 2 | ||||
-rw-r--r-- | include/data2.h | 4 | ||||
-rw-r--r-- | include/songs.h | 2 |
5 files changed, 62 insertions, 20 deletions
diff --git a/include/asm.inc.h b/include/asm.inc.h index 3837af64b..1a5e9447f 100755 --- a/include/asm.inc.h +++ b/include/asm.inc.h @@ -24,7 +24,7 @@ void sub_802E3E4(u8, int); void nullsub_8(u8); // asm/battle_7.o -void sub_8032AA8(u8 index, int i); +void sub_8032AA8(u8, u8); // src/pokemon_3.o u16 SpeciesToNationalPokedexNum(u16); diff --git a/include/battle.h b/include/battle.h index 47ddef71d..4d222834e 100644 --- a/include/battle.h +++ b/include/battle.h @@ -29,16 +29,6 @@ #define MAX_TRAINER_ITEMS 4 #define MAX_MON_MOVES 4 -// needed to match the hack that is get_item, thanks cam, someone else clean this up later. -extern u8 unk_2000000[]; - -// to do: maybe try to reduce the defines needed to match? -#define BATTLE_STRUCT ((struct BattleStruct *)(unk_2000000)) -#define AI_THINKING_STRUCT ((struct AI_ThinkingStruct *)(unk_2000000 + 0x16800)) -#define UNK_2016A00_STRUCT ((struct UnkBattleStruct1 *)(unk_2000000 + 0x16A00)) -#define AI_STACK ((struct AI_Stack *)(unk_2000000 + 0x16C00)) -#define AI_ARRAY_160CC ((struct SmallItemStruct *)(unk_2000000 + 0x160CC)) - enum { WEATHER_SUN, @@ -142,11 +132,7 @@ struct UnkBattleStruct4 /*0x17*/ u8 filler17[0x4]; }; -extern struct UnknownStruct1 unk_2016A00; -extern struct UnkBattleStruct4 gUnknown_02024CA8[]; -extern struct AI_ThinkingStruct gAIThinkingSpace; - -struct UnknownStruct11 +struct Struct30042E0 { u8 unk0; u8 unk1; @@ -171,4 +157,60 @@ struct UnknownStruct11 u8 unk36[10]; }; +struct Struct2017800 +{ + u8 unk0_0:1; + u8 unk0_1:1; + u8 unk0_2:1; + u8 unk0_3:1; + u8 unk0_4:1; + u16 unk2; +}; + +struct Struct2017810 +{ + u8 unk0_0:1; + u8 unk0_1:1; + u8 unk0_2:1; + u8 unk0_3:1; + u8 unk0_4:1; + u8 unk0_5:1; + u8 unk0_6:1; + u8 unk0_7:1; + u8 unk1_0:1; + u8 unk2; + u8 unk3; + //u8 filler2[2]; + u8 unk4; + u8 unk5; + u8 unk6; + u8 unk7; + u8 unk8; + u8 unk9; + u8 fillerA[2]; +}; + +struct Struct2017840 +{ + u16 unk0; + u8 filler2[7]; + u8 unk9_0:1; +}; + +extern struct UnknownStruct1 unk_2016A00; +extern struct UnkBattleStruct4 gUnknown_02024CA8[]; +extern struct AI_ThinkingStruct gAIThinkingSpace; + +// TODO: move ewram to global.h +extern u8 ewram[]; + +#define BATTLE_STRUCT ((struct BattleStruct *) (ewram + 0x00000)) +#define AI_THINKING_STRUCT ((struct AI_ThinkingStruct *)(ewram + 0x16800)) +#define UNK_2016A00_STRUCT ((struct UnkBattleStruct1 *) (ewram + 0x16A00)) +#define AI_STACK ((struct AI_Stack *) (ewram + 0x16C00)) +#define AI_ARRAY_160CC ((struct SmallItemStruct *) (ewram + 0x160CC)) +#define ewram17800 ((struct Struct2017800 *) (ewram + 0x17800)) +#define ewram17810 ((struct Struct2017810 *) (ewram + 0x17810)) +#define ewram17840 (*(struct Struct2017840 *) (ewram + 0x17840)) + #endif // GUARD_BATTLE_H diff --git a/include/battle_interface.h b/include/battle_interface.h index e85f87a30..70434f9a9 100644 --- a/include/battle_interface.h +++ b/include/battle_interface.h @@ -31,6 +31,6 @@ void sub_8045A5C(u8, struct Pokemon *, u8); s32 sub_8045C78(u8, u8, u8, u8); s16 sub_80460C8(struct BattleInterfaceStruct1 *, int *, void *, int); u8 GetScaledHPFraction(s16, s16, u8); -int GetHPBarLevel(s16, s16); +u8 GetHPBarLevel(s16, s16); #endif // GUARD_BATTLE_INTERFACE_H diff --git a/include/data2.h b/include/data2.h index 987c7cb2e..759efe3d3 100644 --- a/include/data2.h +++ b/include/data2.h @@ -29,7 +29,7 @@ extern const union AnimCmd *const *const gUnknown_081EC2A4[]; extern const union AnimCmd *const *const gUnknown_081ECACC[]; extern struct MonCoords gTrainerBackPicCoords[]; extern struct SpriteSheet gTrainerBackPicTable[]; -extern struct SpritePalette gTrainerBackPicPaletteTable[]; +extern const struct SpritePalette gTrainerBackPicPaletteTable[]; extern u8 gEnemyMonElevation[]; extern const u8 gTrainerClassNames[][13]; extern const struct Trainer gTrainers[]; @@ -40,7 +40,7 @@ extern const u8 gUnknown_081F96C8[]; extern struct SpriteSheet gUnknown_081FAEA4; extern struct SpritePalette gUnknown_081FAEAC; extern const struct SpriteTemplate gSpriteTemplate_81FAF0C; -extern void *gUnknown_081FAF4C[]; +extern void *const gUnknown_081FAF4C[]; extern struct BattleMove gBattleMoves[]; #endif // GUARD_DATA2_H diff --git a/include/songs.h b/include/songs.h index d7829479f..51948fba8 100644 --- a/include/songs.h +++ b/include/songs.h @@ -93,7 +93,7 @@ enum SE_T_KAMI, SE_T_KAMI2, SE_ELEBETA, - SE_HINSI, + /*0x5A*/ SE_HINSI, SE_EXPMAX, SE_TAMAKORO, SE_TAMAKORO_E, |