diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/code_8092334.h | 8 | ||||
-rw-r--r-- | include/item.h | 12 | ||||
-rw-r--r-- | include/pokemon.h | 97 |
3 files changed, 61 insertions, 56 deletions
diff --git a/include/code_8092334.h b/include/code_8092334.h index 6f7fcae..0548659 100644 --- a/include/code_8092334.h +++ b/include/code_8092334.h @@ -11,11 +11,11 @@ struct unkStruct_8094924 u32 unkC; }; -void sub_809486C(struct unkStruct_8094924 *r0, u8 *r1, s32 size); +void xxx_init_struct_8094924_save_809486C(struct unkStruct_8094924 *r0, u8 *r1, s32 size); void nullsub_102(struct unkStruct_8094924 *r0); -void sub_809488C(struct unkStruct_8094924 *r0, u8 *r1, s32 size); -void sub_809485C(struct unkStruct_8094924 *r0, u8 *r1, s32 size); +void SaveIntegerBits(struct unkStruct_8094924 *r0, void *r1, s32 size); +void xxx_init_struct_8094924_restore_809485C(struct unkStruct_8094924 *r0, u8 *r1, s32 size); void sub_80948E4(struct unkStruct_8094924 *r0, u8 *r1, s32 size); -void sub_8094924(struct unkStruct_8094924 *r0, u8 *r1, s32 size); +void RestoreIntegerBits(struct unkStruct_8094924 *r0, void *r1, s32 size); #endif
\ No newline at end of file diff --git a/include/item.h b/include/item.h index 421eb89..84f9de2 100644 --- a/include/item.h +++ b/include/item.h @@ -364,11 +364,11 @@ void sub_8091BB4(u8); void sub_8090F58(void*, u8 *, struct ItemSlot *, struct unkStruct_8090F58*); void SlotToHeldItem(struct HeldItem *held,struct ItemSlot *slot); -// some sort of weird memcpy's? -// not sure what the second argument should be typed as -void sub_8091DC0(struct unkStruct_8094924 *r0, u8*); -void sub_8091DE0(struct unkStruct_8094924 *a1, u8 *a2); -void sub_8091E00(struct unkStruct_8094924 *a1, u8 *a2); -void sub_8091E28(struct unkStruct_8094924 *a1, u8 *a2); +void RestoreHeldItem(struct unkStruct_8094924*, struct HeldItem*); +void SaveHeldItem(struct unkStruct_8094924*, struct HeldItem*); +void RestoreItemSlot(struct unkStruct_8094924 *a1, struct ItemSlot *a2); +void SaveItemSlot(struct unkStruct_8094924 *a1, struct ItemSlot *a2); +s32 RestoreTeamInventory(u8 *unk0, u32 size); +s32 SaveTeamInventory(u8 *unk0, u32 size); #endif diff --git a/include/pokemon.h b/include/pokemon.h index 9e3a667..874aa93 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -60,11 +60,44 @@ struct PokemonStruct /* 0x4C */ u8 name[0xA]; }; + +struct unkStruct_808E6F4 +{ + s16 unk0; + u8 unk2; +}; + +struct EvolveStage +{ + s16 speciesNum; + u8 unkHasNextStage; +}; + struct PokemonStruct2 { - // size 0x64 - u16 unk0; - u8 fill[0x62]; + // size 0x68 + u16 unk0; // corresponds to unk0 inPokemonStruct + u8 unk2; // unk2 + u8 unkHasNextStage; // unk3 + struct unkPokeSubStruct_4 unk4; // unk4 + u16 IQ; // IQ (other offset) + u16 unkA; + u16 unkC; + s16 speciesNum; // speciesNum (other offset) + u16 unk10; // pokeHP + u16 unk12; // pokeHP + struct Offense offense; // offense (other offset) + u32 unk18; // unk1C + struct unkPokeSubStruct_2C unk1C[4]; // unk2C + u8 fill3c[4]; + /* 40 */ struct ItemSlot itemSlot; // heldItem + u32 unk44; // some struct + u32 unk48; // some struct (same type as 44) + u32 unk4C; // unk20 + u8 unk50; // unk24 + u8 fill51[3]; + struct unkStruct_808E6F4 unk54; + u8 name[10]; // name (other offset) }; struct unkStruct_203B45C @@ -76,8 +109,8 @@ struct unkStruct_203B45C struct EvolveStruct1 { - /* 0x34 */ u16 evolve_from; - /* 0x36 */ u16 evolve_type; + /* 0x34 */ s16 evolve_from; + /* 0x36 */ s16 evolve_type; }; struct EvolveNeeds @@ -131,48 +164,17 @@ struct gPokemon }; -struct unkStruct_808E6F4 -{ - s16 unk0; - u8 unk2; -}; - -struct EvolveStage -{ - s16 speciesNum; - u8 unkHasNextStage; -}; - -struct unkStruct_808DE50 -{ - u16 unk0; // corresponds to unk0 inPokemonStruct - u8 unk2; // unk2 - u8 unkHasNextStage; // unk3 - struct unkPokeSubStruct_4 unk4; // unk4 - u16 IQ; // IQ (other offset) - u16 unkA; - u16 unkC; - s16 speciesNum; // speciesNum (other offset) - u16 unk10; // pokeHP - u16 unk12; // pokeHP - struct Offense offense; // offense (other offset) - u32 unk18; // unk1C - struct unkPokeSubStruct_2C unk1C[4]; // unk2C - u8 fill3c[4]; - /* 40 */ struct ItemSlot itemSlot; // heldItem - u32 unk44; // some struct - u32 unk48; // some struct (same type as 44) - u32 unk4C; // unk20 - u8 unk50; // unk24 - u8 fill51[3]; - struct unkStruct_808E6F4 unk54; - u8 name[10]; // name (other offset) -}; - +// https://www.pokecommunity.com/showthread.php?t=407371 struct LevelData { - // only size is known - u32 unk0[3]; + s32 expRequired; + u8 gainHP; + u8 gainUnused; + u8 gainAtt; + u8 gainSPAtt; + u8 gainDef; + u8 gainSPDef; + u16 fillA; }; struct unkStruct_808E218_arg @@ -230,6 +232,9 @@ struct OpenedFile *GetDialogueSpriteDataPtr(s16 index); s32 GetUnownIndex(s16 index); void sub_808E6F4(struct unkStruct_808E6F4* a1); s32 GetEvolutionSequence(struct PokemonStruct* pokemon, struct EvolveStage* a2); -void xxx_pokemonstruct_to_unk_808DE50(struct unkStruct_808DE50* r0, struct PokemonStruct *r1, s32 r2); +void xxx_pokemonstruct_to_pokemon2_808DE50(struct PokemonStruct2* r0, struct PokemonStruct *r1, s32 r2); +void SavePokemonStruct(struct unkStruct_8094924* a1, struct PokemonStruct* pokemon); +void RestorePokemonStruct(struct unkStruct_8094924*, struct PokemonStruct*); + #endif // GUARD_POKEMON_H |