More typedef + clean ground_map files

This commit is contained in:
Kermalis
2023-09-02 07:36:59 -04:00
parent 72430d1072
commit a324d39b9d
55 changed files with 737 additions and 700 deletions

View File

@@ -4,38 +4,38 @@
#include "file_system.h"
// size: 0x4
struct RGB
typedef struct RGB
{
// IDK which is R G B
u8 unk0;
u8 unk1;
u8 unk2;
};
} RGB;
// size: 0x18
struct unkStruct_202EE8C
typedef struct unkStruct_202EE8C
{
u32 unk0;
u16 unk4;
s16 unk6;
struct RGB *unk8;
struct RGB *unkC;
struct RGB *unk10;
struct RGB unk14;
};
RGB *unk8;
RGB *unkC;
RGB *unk10;
RGB unk14;
} unkStruct_202EE8C;
// size: Variable
struct unkDataFor8004AA4
typedef struct unkDataFor8004AA4
{
/* 0x0 */ s16 colorCount;
s16 unk2;
/* 0x4 */ struct RGB colors[0];
};
/* 0x4 */ RGB colors[0];
} unkDataFor8004AA4;
void nullsub_6(void);
void sub_8004AA4(struct unkStruct_202EE8C *, OpenedFile *, s32);
bool8 sub_8004AF0(bool8, struct unkStruct_202EE8C *, s32, s32, s32, u8 *);
bool8 sub_8004D14(struct unkStruct_202EE8C *, s32);
bool8 sub_8004D40(struct unkStruct_202EE8C *, s32);
void sub_8004AA4(unkStruct_202EE8C *, OpenedFile *, s32);
bool8 sub_8004AF0(bool8, unkStruct_202EE8C *, s32, s32, s32, u8 *);
bool8 sub_8004D14(unkStruct_202EE8C *, s32);
bool8 sub_8004D40(unkStruct_202EE8C *, s32);
#endif // GUARD_CODE_8004AA0_H

View File

@@ -1,7 +1,14 @@
struct unkStruct_802C39C
#ifndef GUARD_CODE_802C39C_H
#define GUARD_CODE_802C39C_H
#include "code_8094F88.h"
#include "wonder_mail.h"
// size: 0x58
typedef struct unkStruct_802C39C
{
/* 0x0 */ u32 unk0[2];
/* 0x8 */ struct WonderMailSub *unk8;
/* 0x8 */ WonderMailSub *unk8;
/* 0xC */ u8 *playerName;
/* 0x10 */ s16 clientSpecies;
/* 0x12 */ s16 targetSpecies;
@@ -20,5 +27,7 @@ struct unkStruct_802C39C
/* 0x48 */ u32 y;
/* 0x4C */ u8 *unk4C;
u8 *unk50;
/* 0x54 */ struct WonderMail *mail;
};
/* 0x54 */ WonderMail *mail;
} unkStruct_802C39C;
#endif // GUARD_CODE_802C39C_H

View File

@@ -6,18 +6,19 @@
#include "items.h"
#include "pokemon.h"
struct WonderMailSub
// size: 0x8
typedef struct WonderMailSub
{
/* 0x4 */ DungeonLocation dungeon;
u32 seed;
};
/* 0x0 */ DungeonLocation dungeon;
/* 0x4 */ u32 seed;
} WonderMailSub;
// size: 0x30
struct unkStruct_203B480
typedef struct unkStruct_203B480
{
/* 0x0 */ u8 mailType;
/* 0x1 */ u8 missionType;
struct WonderMailSub unk4;
WonderMailSub unk4;
/* 0xC */ s16 clientSpecies;
/* 0xE */ s16 targetSpecies;
union unk10_temp
@@ -31,48 +32,48 @@ struct unkStruct_203B480
u32 unk28;
/* 0x2C */ s8 rescuesAllowed;
u8 unk2D;
};
} unkStruct_203B480;
// size: 0x5C
struct unkStruct_203B484
typedef struct unkStruct_203B484
{
/* 0x0 */ u32 unk0;
/* 0x4 */ PokemonStruct1 unk4;
};
} unkStruct_203B484;
// size: 0x84
struct unkStruct_203B48C
typedef struct unkStruct_203B48C
{
/* 0x0 */ s32 unk0;
/* 0x4 */ s32 unk4[0x20];
};
} unkStruct_203B48C;
extern struct unkStruct_203B480 *gUnknown_203B480;
extern struct unkStruct_203B484 *gUnknown_203B484;
extern unkStruct_203B480 *gUnknown_203B480;
extern unkStruct_203B484 *gUnknown_203B484;
extern u32 *gUnknown_203B488;
extern struct unkStruct_203B48C *gUnknown_203B48C;
extern unkStruct_203B48C *gUnknown_203B48C;
void sub_80950BC(void);
struct unkStruct_203B480 *sub_80950F8(void);
struct unkStruct_203B484 *sub_8095100(void);
unkStruct_203B480 *sub_80950F8(void);
unkStruct_203B484 *sub_8095100(void);
u32 *sub_8095108(void);
struct unkStruct_203B48C *sub_8095110(void);
unkStruct_203B48C *sub_8095110(void);
void sub_8095118(void);
s32 FindOpenMailSlot(void);
bool8 sub_80951BC(struct unkStruct_203B480 *mail);
bool8 sub_80951FC(struct unkStruct_203B480 *param_1);
struct unkStruct_203B480 * GetMailatIndex(u8 index);
void DeleteMailAtIndex(u8 index);
void sub_8095274(u32 param_1);
bool8 sub_8095298(s32 param_1);
bool8 sub_80951BC(unkStruct_203B480 *);
bool8 sub_80951FC(unkStruct_203B480 *);
unkStruct_203B480 * GetMailatIndex(u8);
void DeleteMailAtIndex(u8);
void sub_8095274(u32);
bool8 sub_8095298(s32);
void sub_80952C4(void);
bool8 HasMail(u8 mailType, u32 param_2);
s32 CountMailType(u8 mailType);
bool8 HasMail(u8, u32);
s32 CountMailType(u8);
u32 CountAllMail(void);
s32 sub_8095374(void);
s32 GetMailIndex(u8 mailType, u32 param_2);
s32 GetFirstIndexofMailType(u8 mailType);
void sub_8095824(struct unkStruct_8094924 * a, struct unkStruct_203B480 *b);
void sub_8095774(struct unkStruct_8094924 * a, struct unkStruct_203B480 *b);
s32 GetMailIndex(u8, u32);
s32 GetFirstIndexofMailType(u8);
void sub_8095824(struct unkStruct_8094924 *, unkStruct_203B480 *);
void sub_8095774(struct unkStruct_8094924 *, unkStruct_203B480 *);
#endif

View File

@@ -13,9 +13,9 @@ struct subStruct_203B490
struct unkStruct_203B490
{
// size: 0x330?
/* 0x0 */ struct WonderMail mailboxSlots[NUM_MAILBOX_SLOTS];
/* 0x50 */ struct WonderMail pelipperBoardJobs[MAX_ACCEPTED_JOBS];
/* 0xF0 */ struct WonderMail jobSlots[MAX_ACCEPTED_JOBS];
/* 0x0 */ WonderMail mailboxSlots[NUM_MAILBOX_SLOTS];
/* 0x50 */ WonderMail pelipperBoardJobs[MAX_ACCEPTED_JOBS];
/* 0xF0 */ WonderMail jobSlots[MAX_ACCEPTED_JOBS];
u8 unk190[0x28];
u8 unk1B8[0x78];
struct subStruct_203B490 unk230[16];

View File

@@ -8,19 +8,19 @@
#include "menu.h"
// size: 0x568
struct WonderMailStruct_203B33C
typedef struct WonderMailStruct_203B33C
{
/* 0x0 */ u32 state;
/* 0x4 */ u32 fallbackState;
/* 0x8 */ u8 passwordBuffer[0x36];
u32 unk40;
/* 0x44 */ u32 status;
struct unkStruct_203B480 unk48;
struct unkStruct_203B480 unk78;
struct WonderMailStruct_203B2C0_sub unkA8;
struct WonderMailStruct_203B2C0_sub unk130;
struct unkStruct_203B480 unk1B8;
struct unkStruct_203B480 unk1E8;
unkStruct_203B480 unk48;
unkStruct_203B480 unk78;
WonderMailStruct_203B2C0_sub unkA8;
WonderMailStruct_203B2C0_sub unk130;
unkStruct_203B480 unk1B8;
unkStruct_203B480 unk1E8;
u8 unk218;
MenuStruct unk21C[4];
UnkTextStruct2 unk35C[4];
@@ -36,9 +36,9 @@ struct WonderMailStruct_203B33C
u32 unk530;
u32 unk534;
/* 0x538 */ s16 speciesNum; // A7 << 3
struct unkStruct_802F204 unk53C;
unkStruct_802F204 unk53C;
s32 unk564;
};
} WonderMailStruct_203B33C;
u32 CreateFriendRescueMenu(void);
u32 UpdateFriendRescueMenu(void);

19
include/ground_map.h Normal file
View File

@@ -0,0 +1,19 @@
#ifndef GUARD_GROUND_MAP_H
#define GUARD_GROUND_MAP_H
// size: 0x55C
typedef struct unkStruct_3001B70
{
u8 fill0[0x55C - 0x0];
} unkStruct_3001B70;
extern unkStruct_3001B70 *gUnknown_3001B70;
void GroundMap_Reset(void);
void sub_80A4A7C(void);
void sub_80A4AC4(void);
void sub_80A4B38(void);
void sub_80A4B54(void);
#endif // GUARD_GROUND_MAP_H

View File

@@ -10,6 +10,11 @@ typedef struct unkStruct_811BAF4
u8 *text;
} unkStruct_811BAF4;
void GroundMap_ExecuteEnter(s16);
void GroundMap_ExecuteEvent(s16, u32);
void GroundMap_ExecuteStation(s16, s16, s8, u32);
bool8 sub_80A4D2C(s16);
bool8 sub_80A4D48(s16);
#endif // GUARD_GROUND_MAP_1_H

30
include/ground_map_2.h Normal file
View File

@@ -0,0 +1,30 @@
#ifndef GUARD_GROUND_MAP_2_H
#define GUARD_GROUND_MAP_2_H
// size: 0x24
typedef struct unkStruct_3001B74
{
s16 unk0;
u8 unk2;
u32 unk4;
u32 unk8;
s32 unkC;
u32 unk10;
u32 unk14;
u32 unk18;
u32 unk1C;
u32 unk20;
} unkStruct_3001B74;
void GroundWeather_Select(s16);
void nullsub_121(void);
void nullsub_122(void);
void nullsub_123(void);
void sub_80A5E70(void);
void sub_80A5E8C(u8);
void sub_80A5EBC(void);
void sub_80A5EDC(u8);
void sub_80A60D8(void);
#endif // GUARD_GROUND_MAP_2_H

View File

@@ -51,4 +51,6 @@ typedef struct GroundScript_ExecutePP_1
u8 fillE8[0x110 - 0xE8];
} GroundScript_ExecutePP_1;
bool8 GroundScript_ExecutePP(GroundScript_ExecutePP_1 *, s32 *, GroundScript_ExecutePP_3 *, const DebugLocation *);
#endif // GUARD_GROUND_SCRIPT_H

View File

@@ -13,7 +13,7 @@ struct unkStruct_203B304
u32 fallbackState;
u8 mailboxIndex;
u8 mailIndex;
struct unkStruct_802C39C unkC;
unkStruct_802C39C unkC;
u32 menuAction1;
u32 menuAction2;
MenuStruct unk6C;

View File

@@ -6,7 +6,7 @@ struct unkStruct_203B308
u32 state;
u32 unk4;
u8 jobIndex;
struct unkStruct_802C39C unkC;
unkStruct_802C39C unkC;
u32 menuAction1;
u32 menuAction2;
MenuStruct unk6C;

View File

@@ -49,10 +49,10 @@ struct UnkStruct_sub_8011DAC {
struct UnkStruct_203B184 {
/* 0x0 */ TeamInventory *MoneyItems;
/* 0x4 */ unkStruct_203B45C *recruitedPokemon;
/* 0x8 */ struct unkStruct_203B480 *unk8;
/* 0xC */ struct unkStruct_203B484 *unkC;
/* 0x8 */ unkStruct_203B480 *unk8;
/* 0xC */ unkStruct_203B484 *unkC;
/* 0x10 */ u32 *unk10;
/* 0x14 */ struct unkStruct_203B48C *unk14;
/* 0x14 */ unkStruct_203B48C *unk14;
/* 0x18 */ struct unkStruct_203B490 *mailInfo;
/* 0x1C */ struct RescueTeamData *RescueTeamInfo;
/* 0x20 */ struct unkStruct_203B494 *unk20;

View File

@@ -1,17 +1,16 @@
#ifndef GUARD_WONDER_MAIL_H
#define GUARD_WONDER_MAIL_H
#include "code_8094F88.h"
#include "constants/wonder_mail.h"
#include "file_system.h"
#include "text.h"
#include "items.h"
#include "menu.h"
#include "pokemon.h"
#include "code_8094F88.h"
#include "constants/wonder_mail.h"
#include "text.h"
// size: 0x28
struct unkStruct_802F204
typedef struct unkStruct_802F204
{
/* 0x0 */ u8 clientName[POKEMON_NAME_LENGTH];
/* 0xA */ u8 name2[POKEMON_NAME_LENGTH]; // target name?
@@ -22,34 +21,32 @@ struct unkStruct_802F204
/* 0x1F */ u8 quantity;
/* 0x20 */ u8 friendAreaReward;
/* 0x24 */ u32 teamRankPtsReward;
};
} unkStruct_802F204;
// size: 0x14
struct WonderMail
typedef struct WonderMail
{
/* 0x0 */ u8 mailType; // mail type
/* 0x1 */ u8 missionType; // mission type
u8 unk2;
/* 0x4 */ struct WonderMailSub unk4;
/* 0x4 */ WonderMailSub unk4;
/* 0xC */ s16 clientSpecies; // client pokemon
/* 0xE */ s16 targetSpecies; // target
/* 0x10 */ u8 targetItem; // item to find/deliver
/* 0x11 */ u8 rewardType; // reward type
/* 0x12 */ u8 itemReward; // item reward
/* 0x13 */ u8 friendAreaReward; // friend area
};
} WonderMail;
// size: 0x88
struct WonderMailStruct_203B2C0_sub
typedef struct WonderMailStruct_203B2C0_sub
{
/* 0x0 */ struct unkStruct_203B480 mail;
/* 0x0 */ unkStruct_203B480 mail;
/* 0x30 */ PokemonStruct1 pokemon;
};
} WonderMailStruct_203B2C0_sub;
// size: 0x548
struct WonderMailStruct_203B2C0
typedef struct WonderMailStruct_203B2C0
{
/* 0x0 */ u32 fallbackState;
/* 0x4 */ u32 state;
@@ -57,10 +54,10 @@ struct WonderMailStruct_203B2C0
u8 unk3E;
u32 unk40;
/* 0x44 */ u32 linkError;
struct unkStruct_203B480 unk48;
struct unkStruct_203B480 unk78;
struct WonderMailStruct_203B2C0_sub unkA8;
struct WonderMailStruct_203B2C0_sub unk130;
unkStruct_203B480 unk48;
unkStruct_203B480 unk78;
WonderMailStruct_203B2C0_sub unkA8;
WonderMailStruct_203B2C0_sub unk130;
u8 fill16A[0x218 - 0x1B8];
/* 0x218 */ u8 mailIndex;
MenuStruct unk21C[4];
@@ -80,10 +77,10 @@ struct WonderMailStruct_203B2C0
u32 unk53C;
/* 0x540 */ u32 mailCount; // A8 << 4
/* 0x544 */ s16 speciesNum;
};
} WonderMailStruct_203B2C0;
// size: 0x564
struct WonderMailStruct_203B2C4
typedef struct WonderMailStruct_203B2C4
{
/* 0x0 */ u8 state;
/* 0x4 */ u32 fallbackState; // wonder mail link status??
@@ -92,8 +89,8 @@ struct WonderMailStruct_203B2C4
u32 unk40;
/* 0x44 */ u32 linkError; // another link status
u8 filler48[0x1B8 - 0x48];
struct unkStruct_203B480 unk1B8;
struct unkStruct_203B480 unk1E8;
unkStruct_203B480 unk1B8;
unkStruct_203B480 unk1E8;
/* 0x218 */ s8 mailIndex;
MenuStruct unk21C[4];
UnkTextStruct2 unk35C[4];
@@ -110,9 +107,9 @@ struct WonderMailStruct_203B2C4
/* 0x434 */ u8 formattedString[0x100];
/* 0x534 */ s32 wonderMailMethod;
/* 0x538 */ u32 wonderMailMode;
struct unkStruct_802F204 unk53C;
};
unkStruct_802F204 unk53C;
} WonderMailStruct_203B2C4;
void SetFriendRescueCounterState(u32 r0);
#endif
#endif // GUARD_WONDER_MAIL_H

View File

@@ -16,7 +16,7 @@ struct unkStruct_203B2F0
u32 state;
u8 unk8[0xC - 0x8];
u8 unkC;
struct unkStruct_802C39C unk10;
unkStruct_802C39C unk10;
u32 menuAction;
MenuStruct unk6C;
MenuStruct unkBC;

View File

@@ -1,73 +1,87 @@
#ifndef GUARD_WONDER_MAIL_3_H
#define GUARD_WONDER_MAIL_3_H
#include "code_802C39C.h"
#include "input.h"
#include "menu.h"
struct unkStruct_203B2F4
#include "text.h"
#include "wonder_mail.h"
// size: 0xB4
typedef struct unkStruct_803B344
{
/* 0x0 */ WonderMail mail;
u8 *unk14;
u8 *unk18;
u8 fill1C[0x3C - 0x1C];
u8 unk3C[0xB4 - 0x3C];
} unkStruct_803B344;
// size: 0xA0
typedef struct unkStruct_203B2F4
{
MenuInputStruct input;
u32 unk34;
UnkTextStruct2 *unk38;
UnkTextStruct2 unk3C[4];
u8 unk9C[4];
};
extern struct unkStruct_203B2F4 *gUnknown_203B2F4;
} unkStruct_203B2F4;
struct unkStruct_803B344
// size: 0x1C
typedef struct unkSubStruct_203B2F8
{
// size: 0xB4
struct WonderMail mail;
u8* unk14;
u8* unk18;
u8 fill1C[0x3C - 0x1C];
u8 unk3C[0x78];
};
/* 0x0 */ WonderMail wonderMail;
/* 0x14 */ u8 *unk14;
/* 0x18 */ u8 *unk18;
} unkSubStruct_203B2F8;
struct unkSubStruct_203B2F8
// size: 0x208
typedef struct unkStruct_203B2F8
{
struct WonderMail wonderMail;
u8 *unk14;
u8 *unk18;
};
struct unkStruct_203B2F8
{
// size: 0x208
s32 state; // state
s32 fallbackState;
u8 wonderMailAccepted;
bool8 unk9;
u8 dungeonID;
/* 0x0 */ s32 state;
/* 0x4 */ s32 fallbackState;
/* 0x8 */ u8 wonderMailAccepted;
/* 0x9 */ bool8 unk9;
/* 0xA */ u8 dungeonID;
u8 unkB;
struct unkSubStruct_203B2F8 *mail;
u8 jobSlotIndex;
struct unkStruct_802C39C unk14;
u32 menuAction1;
u32 menuAction2;
u32 menuAction3;
MenuStruct unk78;
MenuStruct unkC8;
/* 0xC */ unkSubStruct_203B2F8 *mail;
/* 0x10 */ u8 jobSlotIndex;
unkStruct_802C39C unk14;
/* 0x6C */ u32 menuAction1;
/* 0x70 */ u32 menuAction2;
/* 0x74 */ u32 menuAction3;
/* 0x78 */ MenuStruct unk78;
/* 0xC8 */ MenuStruct unkC8;
MenuItem unk118[8];
MenuItem unk158[8];
u16 unk198[8];
UnkTextStruct2 unk1A8[4];
u32 unk1E4;
};
extern struct unkStruct_203B2F8 *gUnknown_203B2F8;
} unkStruct_203B2F8;
enum WonderMailRescueStates
{
INITIAL_WONDER_MAIL_CHECK,
INITIAL_WONDER_MAIL_CHECK = 0,
// 1 is ??
WONDER_MAIL_EXIT = 2,
DUPLICATE_WONDER_MAIL = 3,
DUPLICATE_WONDER_MAIL_1,
DUPLICATE_WONDER_MAIL_1 = 4,
// 5 is ??
// 6 is ??
// 7 is ??
RECEIVE_WONDER_MAIL = 8,
// 9 is ??
JOB_LIST_FULL = 0xA,
DRAW_JOB_LIST = 0xB,
DRAW_JOB_LIST_1 = 0xC,
// 0xD is ??
// 0xE is ??
// 0xF is ??
// 0x10 is ??
JOB_LIST_FULL = 10,
DRAW_JOB_LIST = 11,
DRAW_JOB_LIST_1 = 12,
// 13 is ??
// 14 is ??
// 15 is ??
// 16 is ??
};
extern unkStruct_203B2F4 *gUnknown_203B2F4;
extern unkStruct_203B2F8 *gUnknown_203B2F8;
u32 sub_802D098(unkSubStruct_203B2F8 *);
#endif // GUARD_WONDER_MAIL_3_H