diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/constants/global.h | 7 | ||||
-rw-r--r-- | include/constants/pokemon.h | 3 | ||||
-rw-r--r-- | include/global.h | 1 | ||||
-rw-r--r-- | include/pokemon.h | 53 | ||||
-rw-r--r-- | include/proto.h | 21 | ||||
-rw-r--r-- | include/save_block_2.h | 18 | ||||
-rw-r--r-- | include/string16.h | 17 |
7 files changed, 97 insertions, 23 deletions
diff --git a/include/constants/global.h b/include/constants/global.h new file mode 100644 index 00000000..28d4b206 --- /dev/null +++ b/include/constants/global.h @@ -0,0 +1,7 @@ +#ifndef POKEDIAMOND_CONSTANTS_GLOBAL_H +#define POKEDIAMOND_CONSTANTS_GLOBAL_H + +#define POKEMON_NAME_LENGTH 10 +#define OT_NAME_LENGTH 7 + +#endif //POKEDIAMOND_CONSTANTS_GLOBAL_H diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index 41ae10fe..9accbad1 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -272,9 +272,6 @@ #define MON_RATIO_FEMALE 254 #define MON_RATIO_UNKNOWN 255 -#define POKEMON_NAME_LENGTH 10 -#define OT_NAME_LENGTH 7 - enum MonGender { MON_MALE = 0, diff --git a/include/global.h b/include/global.h index 67744d42..2574c437 100644 --- a/include/global.h +++ b/include/global.h @@ -4,6 +4,7 @@ #include "config.h" #include "function_target.h" #include "nitro.h" +#include "constants/global.h" #define NELEMS(a) (sizeof(a) / sizeof(*(a))) diff --git a/include/pokemon.h b/include/pokemon.h index 7b990263..8e2eec3d 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -8,6 +8,8 @@ #include "constants/species.h" #include "seals.h" #include "constants/pokemon.h" +#include "string16.h" +#include "save_block_2.h" struct BaseStats { /* 0x00 */ u8 hp; @@ -180,6 +182,8 @@ struct Pokemon { /* 0x088 */ struct PartyPokemon party; }; // size: 0xEC +#include "party.h" + struct SomeDrawPokemonStruct { u16 unk0; @@ -276,5 +280,54 @@ u8 FUN_02068E1C(struct BoxPokemon * boxmon, u32 a1); u8 FUN_02068E88(int species, u8 gender, u32 a2, u8 forme, u32 pid); u32 GetArceusTypeByHeldItemEffect(u16 plate); int FUN_0206AA30(int a0); +void FUN_02068B68(struct SomeDrawPokemonStruct * spC, struct Pokemon * pokemon, u8 sp10); +void FUN_02068FE0(struct SomeDrawPokemonStruct * a0, u16 a1, int a2); +void FUN_02069010(void * dest, int a1); +void FUN_02069038(u32 a0, u32 a1, u32 a2, s32 a3, u32 a4, u32 a5, u32 a6); +void FUN_020690AC(struct SomeDrawPokemonStruct * a0, u32 a1); +u32 FUN_020690C4(void); +u32 FUN_020690C8(void); +u8 FUN_020690CC(struct Pokemon * pokemon); +struct BoxPokemon * FUN_020690E4(struct Pokemon * pokemon); +u16 GetMonEvolution(struct PlayerParty * party, struct Pokemon * pokemon, u32 context, u32 usedItem, u32 * method_ret); +u16 ReadFromPersonalPmsNarc(u16 species); +u16 GetEggSpecies(u16 species); +BOOL FUN_020690E8(struct Pokemon * pokemon); +u32 FUN_02069698(struct Pokemon * pokemon, u16 move); +void FUN_02069708(struct Pokemon * pokemon, u16 move); +void FUN_02069718(struct BoxPokemon * boxmon, u16 move); +void FUN_020697CC(struct Pokemon * pokemon, u16 move, u8 slot); +u32 FUN_02069818(struct Pokemon * pokemon, u32 * r5, u16 * sp0); +void FUN_020698E0(struct Pokemon * pokemon, int slot1, int slot2); +void FUN_020698E8(struct BoxPokemon * boxmon, int slot1, int slot2); +void FUN_020699A4(struct Pokemon * pokemon, u32 slot); +void FUN_02069A64(struct BoxPokemon * src, struct Pokemon * dest); +u8 FUN_02069AEC(struct PlayerParty * party); +u16 FUN_02069B40(u16 species); +u16 FUN_02069B60(u16 sinnoh_dex); +void FUN_02069B88(struct Pokemon * src, struct Pokemon * dest); +void FUN_02069BA0(struct Pokemon * src, struct BoxPokemon * dest); +void FUN_02069BB4(struct BoxPokemon * src, struct BoxPokemon * dest); +s8 FUN_02069BC8(struct Pokemon * pokemon, int flavor); +int FUN_02069BFC(u16 species, u32 forme, u16 * dest); +void FUN_02069C4C(struct PlayerParty * party); +void FUN_02069D50(struct PlayerParty * party, int r5); +void FUN_02069DC8(struct PlayerParty * party); +BOOL FUN_02069E74(struct Pokemon * pokemon); +BOOL FUN_02069E94(struct Pokemon * pokemon); +void FUN_02069EC4(struct Pokemon * pokemon); +void FUN_02069FB0(u32 r7, u32 r5, u32 r4, u32 r6, u32 sp18, u32 sp1C, u32 sp20); +void FUN_0206A014(struct Pokemon * pokemon, u32 a1, u32 pokeball, u32 a3, u32 encounterType, u32 a5); +void FUN_0206A094(struct Pokemon * pokemon, u32 a1, u32 a2); +BOOL FUN_0206A13C(struct Pokemon * pokemon, u32 a1); +void FUN_0206A1C4(struct Pokemon * pokemon); +void FUN_0206A23C(struct Pokemon * r5, u32 personality); +int LowestFlagNo(u32 mask); +BOOL IsPokemonLegendaryOrMythical(u16 species); +u16 GetLegendaryMon(u32 idx); +BOOL FUN_0206A998(struct Pokemon * pokemon); +BOOL FUN_0206A9AC(struct BoxPokemon * boxmon, struct SaveBlock2 * sb2, u32 heap_id); +void FUN_0206AA84(struct Pokemon * pokemon); +void FUN_0206AAB4(struct BoxPokemon * boxmon); #endif //POKEDIAMOND_POKEMON_H diff --git a/include/proto.h b/include/proto.h index 24ddff07..6f022d90 100644 --- a/include/proto.h +++ b/include/proto.h @@ -3,19 +3,7 @@ // For homeless function declarations -// Declare these here so that we don't have to include pokemon.h -struct UnkStruct_02069038; -struct PlayerParty; -struct BoxPokemon; -struct SaveBlock2; -struct String -{ - u16 len; - u16 pos; - u32 magic; - u16 unk8; - u16 data[0]; -}; +#include "pokemon.h" // for struct definitions u16 * FUN_0200AA50(u16 species, u32 heap_id); void FUN_02021A74(u16 * dest, u16 * src); @@ -32,11 +20,4 @@ void FUN_02005E90(int, int, int, int); void FUN_020056AC(int, int, int, int, int); void FUN_020808AC(struct BoxPokemon *, int, int, int, int); -struct String * FUN_020239A0(struct SaveBlock2 *, u32 heap_id); -u32 FUN_020239BC(struct SaveBlock2 *); -u32 FUN_020239CC(struct SaveBlock2 *); -struct String * FUN_020219F4(u32 count, u32 heap_id); -int FUN_02021CE0(struct String *, struct String *); -int FUN_0206AE00(int x); - #endif //POKEDIAMOND_PROTO_H diff --git a/include/save_block_2.h b/include/save_block_2.h new file mode 100644 index 00000000..38e11de4 --- /dev/null +++ b/include/save_block_2.h @@ -0,0 +1,18 @@ +#ifndef POKEDIAMOND_SAVE_BLOCK_2_H +#define POKEDIAMOND_SAVE_BLOCK_2_H + +struct SaveBlock2 +{ + u16 playerName[OT_NAME_LENGTH + 1]; + u32 playerId; + u8 filler_14[4]; + u8 gender; + u8 padding[3]; + // TODO: finish this struct +}; + +struct String * FUN_020239A0(struct SaveBlock2 *, u32 heap_id); +u32 FUN_020239BC(struct SaveBlock2 *); +u32 FUN_020239CC(struct SaveBlock2 *); + +#endif //POKEDIAMOND_SAVE_BLOCK_2_H diff --git a/include/string16.h b/include/string16.h new file mode 100644 index 00000000..7092c641 --- /dev/null +++ b/include/string16.h @@ -0,0 +1,17 @@ +#ifndef POKEDIAMOND_STRING16_H +#define POKEDIAMOND_STRING16_H + +struct String +{ + u16 len; + u16 pos; + u32 magic; + u16 unk8; + u16 data[1]; +}; + +struct String * FUN_020219F4(u32 count, u32 heap_id); +int FUN_02021CE0(struct String *, struct String *); +int FUN_0206AE00(int x); + +#endif //POKEDIAMOND_STRING16_H |