diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/code_8094F88.h | 35 | ||||
-rw-r--r-- | include/constants/dungeon.h | 3 | ||||
-rw-r--r-- | include/friend_area_action_menu.h | 2 | ||||
-rw-r--r-- | include/global.h | 5 | ||||
-rw-r--r-- | include/item.h | 4 | ||||
-rw-r--r-- | include/kecleon_items.h | 2 | ||||
-rw-r--r-- | include/pokemon.h | 32 | ||||
-rw-r--r-- | include/sub_8095228.h | 17 |
8 files changed, 71 insertions, 29 deletions
diff --git a/include/code_8094F88.h b/include/code_8094F88.h new file mode 100644 index 0000000..9af6c7a --- /dev/null +++ b/include/code_8094F88.h @@ -0,0 +1,35 @@ +#ifndef GUARD_CODE_8094F88_H +#define GUARD_CODE_8094F88_H + +struct unkStruct_203B480 +{ + u8 unk0; + struct DungeonLocation unk4; + u32 unk8; + u32 unkC; + u32 unk10; + u32 unk14; + u32 unk18; + u32 unk1C; + u8 unk20; + u8 unk21; + u8 unk22; + u32 unk24; + u32 unk28; + u8 unk2C; + u8 unk2D; +}; + +struct unkStruct_203B484 +{ + u32 unk0; + struct PokemonStruct unk4; +}; + +struct unkStruct_203B48C +{ + s32 unk0; + s32 unk4[0x20]; +}; + +#endif diff --git a/include/constants/dungeon.h b/include/constants/dungeon.h index 19f5340..6987c61 100644 --- a/include/constants/dungeon.h +++ b/include/constants/dungeon.h @@ -1,6 +1,8 @@ #ifndef GUARD_CONSTANTS_DUNGEON_H #define GUARD_CONSTANTS_DUNGEON_H +#define NUM_DUNGEON_MAZE (NUM_DUNGEONS - DUNGEON_NORMAL_MAZE_2) + enum Dungeon { DUNGEON_TINY_WOODS = 0, @@ -101,6 +103,7 @@ enum Dungeon DUNGEON_TEAM_RUMBLEROCK = 95, DUNGEON_RESCUE_TEAM_2 = 96, DUNGEON_RESCUE_TEAM_MAZE = 97, + NUM_DUNGEONS }; #endif diff --git a/include/friend_area_action_menu.h b/include/friend_area_action_menu.h index dfddc22..1080679 100644 --- a/include/friend_area_action_menu.h +++ b/include/friend_area_action_menu.h @@ -12,7 +12,7 @@ struct unkStruct_203B2BC struct HeldItem itemToGive; struct HeldItem unk14; struct PokemonStruct *unk18; - u32 unk1C; + u8 unk1C; u32 unk20; u16 unk24; struct PokemonMove unk28[8]; diff --git a/include/global.h b/include/global.h index 81388a8..5c71009 100644 --- a/include/global.h +++ b/include/global.h @@ -32,4 +32,9 @@ #define ARRAY_COUNT(array) (sizeof(array) / sizeof((array)[0])) +struct DungeonLocation { + u8 dungeonIndex; + u8 dungeonFloor; +}; + #endif // GUARD_GLOBAL_H diff --git a/include/item.h b/include/item.h index 5da4c67..6ac6847 100644 --- a/include/item.h +++ b/include/item.h @@ -104,15 +104,17 @@ bool8 IsGummiItem(u8); void xxx_init_unk230_substruct(u8); bool8 xxx_insert_unk230_80919FC(u8); struct HeldItem *xxx_get_inv_unk230_at_809185C(u8); +void xxx_fill_unk230_gaps(); struct HeldItem* xxx_get_unk250_at_8091A90(u8); s32 xxx_count_inv_unk230(); u32 xxx_count_non_empty_inv_unk250_8091A48(); void sub_8091BB4(u8); void sub_8090F58(void*, u8 *, struct ItemSlot *, struct unkStruct_8090F58*); void ShiftItemsDownFrom(s32 start); +void ClearItemSlotAt(u32 index); void MoveToStorage(struct ItemSlot* slot); void FillInventoryGaps(); -bool8 sub_8091274(struct HeldItem* slot); +bool8 AddHeldItemToInventory(struct HeldItem* slot); bool8 IsNotMoneyOrUsedTMItem(u8 id); s32 FindItemInInventory(u8 itemIndex); diff --git a/include/kecleon_items.h b/include/kecleon_items.h index 11cb0a7..0719804 100644 --- a/include/kecleon_items.h +++ b/include/kecleon_items.h @@ -15,7 +15,7 @@ struct unkStruct_203B210 u32 unkC; s32 itemSellPrice; u32 unk14; - u32 unk18; + s32 unk18; struct ItemSlot unk1C; u8 unk20; u8 unk21; diff --git a/include/pokemon.h b/include/pokemon.h index 912df49..6b514c8 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -19,12 +19,6 @@ struct Offense { u8 def[2]; }; -struct unkPokeSubStruct_4 { - u8 unk4; - u8 unk5; - u16 fill6; -}; - struct unkPokeSubStruct_C { u8 unk0; @@ -34,21 +28,21 @@ struct unkPokeSubStruct_C struct PokemonStruct { // size: 0x58 - u16 unk0; // recruited?? - u8 unk2; - u8 unkHasNextStage; // set to a random value? - struct unkPokeSubStruct_4 unk4; + /* 0x0 */ u16 unk0; // recruited?? + /* 0x1 */ bool8 isLeader; + /* 0x3 */ u8 unkHasNextStage; // set to a random value? + /* 0x4 */ struct DungeonLocation unk4; /* 0x8 */ s16 speciesNum; // species # - struct unkPokeSubStruct_C unkC[2]; + /* 0xC */ struct unkPokeSubStruct_C unkC[2]; /* 0x14 */ s16 IQ; /* 0x16 */ u16 pokeHP; // HP /* 0x18 */ struct Offense offense; - u32 unk1C; - u32 IQSkills; - u8 unk24; - u8 fill25[3]; - struct HeldItem heldItem; - struct PokemonMove moves[MAX_MON_MOVES]; + /* 0x1C */ u32 unk1C; + /* 0x20 */ u32 IQSkills; + /* 0x24 */ u8 unk24; + /* 0x25 */ u8 fill25[3]; + /* 0x28 */ struct HeldItem heldItem; + /* 0x2C */ struct PokemonMove moves[MAX_MON_MOVES]; /* 0x4C */ u8 name[POKEMON_NAME_LENGTH]; }; @@ -76,9 +70,9 @@ struct PokemonStruct2 { // size 0x68 u16 unk0; // corresponds to unk0 inPokemonStruct - u8 unk2; // unk2 + bool8 isLeader; // unk2 u8 unkHasNextStage; // unk3 - struct unkPokeSubStruct_4 unk4; // unk4 + struct DungeonLocation unk4; // unk4 u16 IQ; // IQ (other offset) u16 unkA; u16 unkC; diff --git a/include/sub_8095228.h b/include/sub_8095228.h index 3fd5993..9541d20 100644 --- a/include/sub_8095228.h +++ b/include/sub_8095228.h @@ -3,13 +3,16 @@ struct unkStruct_8095228 { - u8 unk0; - u8 unk1; - u8 unk2; - u8 unk3; - u8 unk4; - u8 padding[0x10 - 0x5]; - u32 unk10; + /* 0x0 */ u8 mailType; // mail type + /* 0x1 */ u8 missionType; // mission type + /* 0x2 */ u8 unk2; + /* 0x3 */ u8 unk3; + /* 0x4 */ u8 dungeon; // dungeon + /* 0x5 */ u8 floor; // floor + /* 0x8 */ u32 unk8; + /* 0xC */ s16 clientSpecies; // client pokemon + /* 0xE */ s16 targetSpecies; // target + u32 unk10; // TODO: verify that this is just a union of the 4 bytes in Wonder Mail u8 padding2[0x20 - 0x14]; struct ItemSlot unk20; u8 padding3[0x28 - 0x24]; |