From 3189320922277dcec0a284a191dd05e823297b1a Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 28 Aug 2020 14:50:05 -0400 Subject: nuts_data to json --- include/constants/items.h | 2 +- include/itemtool.h | 2 +- include/nutdata.h | 26 ++++++++++++++++---------- 3 files changed, 18 insertions(+), 12 deletions(-) (limited to 'include') diff --git a/include/constants/items.h b/include/constants/items.h index 5844c001..34b71487 100644 --- a/include/constants/items.h +++ b/include/constants/items.h @@ -31,7 +31,7 @@ #define ITEMATTR_UNK5 9 #define ITEMATTR_UNK6 10 #define ITEMATTR_NATURAL_GIFT_POWER 11 -#define ITEMATTR_UNK8_0 12 +#define ITEMATTR_NATURAL_GIFT_TYPE 12 #define ITEMATTR_UNK8_B 13 #define ITEMATTR_PARTY_USE 14 #define ITEMATTR_SLP_HEAL 15 diff --git a/include/itemtool.h b/include/itemtool.h index 4dca94bc..971d91aa 100644 --- a/include/itemtool.h +++ b/include/itemtool.h @@ -77,7 +77,7 @@ struct ItemData u8 unk5; u8 unk6; u8 naturalGiftPower; - u16 unk8_0:5; + u16 naturalGiftType:5; u16 prevent_toss:1; u16 selectable:1; u16 pocket:4; diff --git a/include/nutdata.h b/include/nutdata.h index 74470f37..3fb8124e 100644 --- a/include/nutdata.h +++ b/include/nutdata.h @@ -3,19 +3,25 @@ #include "filesystem.h" +#define FIRMNESS_VERY_SOFT 1 +#define FIRMNESS_SOFT 2 +#define FIRMNESS_HARD 3 +#define FIRMNESS_VERY_HARD 4 +#define FIRMNESS_SUPER_HARD 5 + struct NutData { - u16 unk0; - u8 unk2; - u8 unk3; - u8 unk4; + u16 size; + u8 firmness; + u8 yieldCategory; + u8 stageDuration; u8 unk5; - u8 unk6; - u8 unk7; - u8 unk8; - u8 unk9; - u8 unkA; - u8 unkB; + u8 spicy; + u8 dry; + u8 sweet; + u8 bitter; + u8 sour; + u8 smoothness; }; NARC * OpenNutsDataNarc(u32 heap_id); -- cgit v1.2.3 From 224021d5e5b78163738c51944517de34f80c85c0 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 29 Aug 2020 11:42:22 -0400 Subject: Decompile pokedex.c --- include/pokedex.h | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++ include/pokemon.h | 2 +- include/unk_02087A1C.h | 7 ++++ 3 files changed, 94 insertions(+), 1 deletion(-) create mode 100644 include/pokedex.h create mode 100644 include/unk_02087A1C.h (limited to 'include') diff --git a/include/pokedex.h b/include/pokedex.h new file mode 100644 index 00000000..61c051da --- /dev/null +++ b/include/pokedex.h @@ -0,0 +1,86 @@ +#ifndef POKEDIAMOND_POKEDEX_H +#define POKEDIAMOND_POKEDEX_H + +#include "global.h" + +struct Pokedex +{ + /* 0x0000 */ u32 magic; // BEEFCAFE + /* 0x0004 */ u8 field_0004[0x3C]; + /* 0x0040 */ u32 field_0040; // Deoxys forme plus top 13 dex flags + /* 0x0044 */ u8 field_0044[0x3C]; + /* 0x0080 */ u32 field_0080; // Deoxys forme plus top 13 dex flags + /* 0x0084 */ u8 field_0084[0x40]; // Genders + /* 0x00C4 */ u8 field_00C4[0x40]; // Genders + /* 0x0104 */ u32 field_0104; // spinda personality + /* 0x0108 */ u8 field_0108[2]; // Shellos/Gastrodon + /* 0x0108 */ u8 field_010A[2]; // Burmy/Wormadam + /* 0x010C */ u8 field_010C[28]; // Unown + /* 0x0128 */ u8 field_0128; + /* 0x0129 */ u8 field_0129[14]; // Meister? + /* 0x0137 */ u8 field_0137; + /* 0x0138 */ u8 field_0138; + /* 0x0139 */ u8 field_0139; + /* 0x013A */ u8 padding_013A[2]; +}; + +u32 Sav2_Pokedex_sizeof(void); +struct Pokedex * Sav2_Pokedex_new(u32 heap_id); +void Sav2_Pokedex_Copy(const struct Pokedex * src, struct Pokedex * dest); +s32 FUN_02023D8C(struct Pokedex * pokedex, u32 species); +BOOL FUN_02023DEC(struct Pokedex * pokedex, u32 species, u8 state); +void FUN_02023E70(struct Pokedex * pokedex, u32 species, u32 state); +s32 FUN_02023F2C(struct Pokedex * pokedex, u32 species); +BOOL FUN_02023F88(struct Pokedex * pokedex, u32 species, u8 state); +void FUN_02023FEC(struct Pokedex * pokedex, u32 species, s32 state); +void FUN_02024068(struct Pokedex * pokedex, u8 r4, u8 r6); +s32 FUN_020240D0(struct Pokedex * pokedex); +BOOL FUN_02024114(struct Pokedex * pokedex, u32 state); +void FUN_0202415C(struct Pokedex * pokedex, u16 species, struct Pokemon * pokemon); +void FUN_0202419C(struct Pokedex * pokedex); +void FUN_020241B8(struct Pokedex * pokedex, u16 species, struct Pokemon * pokemon); +void FUN_02024294(struct Pokedex * pokedex, u32 species, u32 language); +s32 FUN_020242C8(struct Pokedex * pokedex, u16 species, s32 r4); +BOOL FUN_02024340(u16 species); +BOOL FUN_02024364(u16 a0); +void Sav2_Pokedex_init(struct Pokedex * pokedex); +u16 FUN_020243C8(struct Pokedex * pokedex); +u16 FUN_02024404(struct Pokedex * pokedex); +u16 FUN_02024440(struct Pokedex * pokedex); +u16 FUN_0202445C(struct Pokedex * pokedex); +u16 FUN_020244A4(struct Pokedex * pokedex); +BOOL FUN_020244EC(struct Pokedex * pokedex); +BOOL FUN_02024504(struct Pokedex * pokedex); +u16 FUN_02024518(struct Pokedex * pokedex); +u16 FUN_02024550(struct Pokedex * pokedex); +BOOL FUN_02024594(struct Pokedex * pokedex, u16 species); +BOOL FUN_020245F0(struct Pokedex * pokedex, u16 species); +u32 FUN_02024648(struct Pokedex * pokedex, u32 a1); +s32 FUN_02024674(struct Pokedex * pokedex, u16 species, s32 r6); +s32 FUN_020246DC(struct Pokedex * pokedex, s32 a1); +s32 FUN_0202471C(struct Pokedex * pokedex); +BOOL FUN_02024748(struct Pokedex * pokedex, s32 a1); +s32 FUN_020247A4(struct Pokedex * pokedex); +BOOL FUN_020247C8(struct Pokedex * pokedex, s32 a1); +s32 FUN_02024828(struct Pokedex * pokedex); +s32 FUN_0202484C(struct Pokedex * pokedex, s32 a1); +s32 FUN_0202489C(struct Pokedex * pokedex); +s32 FUN_020248BC(struct Pokedex * pokedex, s32 a1); +s32 FUN_0202490C(struct Pokedex * pokedex); +s32 FUN_02024930(struct Pokedex * pokedex, s32 a1); +s32 FUN_02024970(struct Pokedex * pokedex); +void FUN_0202498C(struct Pokedex * pokedex, struct Pokemon * pokemon); +void FUN_02024AF0(struct Pokedex * pokedex, struct Pokemon * pokemon); +void Pokedex_SetNatDexFlag(struct Pokedex * pokedex); +BOOL Pokedex_GetNatDexFlag(struct Pokedex * pokedex); +BOOL FUN_02024CC4(struct Pokedex * pokedex); +void FUN_02024CE0(struct Pokedex * pokedex); +s32 FUN_02024D00(struct Pokedex * pokedex, u32 species, u32 language); +void FUN_02024D4C(struct Pokedex * pokedex); +BOOL FUN_02024D58(struct Pokedex * pokedex); +BOOL FUN_02024D64(struct Pokedex * pokedex); +void FUN_02024D80(struct Pokedex * pokedex); +struct Pokedex * FUN_02024DA0(struct SaveBlock2 * sav2); +s32 FUN_02024DAC(struct Pokedex * pokedex, s32 a1, u32 a2); + +#endif //POKEDIAMOND_POKEDEX_H diff --git a/include/pokemon.h b/include/pokemon.h index 591da2f4..196343de 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -280,7 +280,7 @@ 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 SpeciesToSinnohDexNo(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); diff --git a/include/unk_02087A1C.h b/include/unk_02087A1C.h new file mode 100644 index 00000000..28155209 --- /dev/null +++ b/include/unk_02087A1C.h @@ -0,0 +1,7 @@ +#ifndef POKEDIAMOND_UNK_02087A1C_H +#define POKEDIAMOND_UNK_02087A1C_H + +s32 FUN_02087A50(u32 species); +s32 FUN_02087A1C(u32 language); + +#endif //POKEDIAMOND_UNK_02087A1C_H -- cgit v1.2.3