Split+data wonder_mail_3 and wonder_mail_2_1

This commit is contained in:
Kermalis
2023-09-29 23:46:27 -04:00
committed by Roshan Padaki
parent 3695335707
commit ccbc0ea647
138 changed files with 1900 additions and 1883 deletions

View File

@@ -1,7 +1,7 @@
#ifndef GUARD_ADVENTURE_LOG_H
#define GUARD_ADVENTURE_LOG_H
#include "input.h"
#include "structs/menu.h"
#include "structs/str_text.h"
// size: 0xA0

View File

@@ -1,8 +1,8 @@
#ifndef GUARD_CODE_801B3C0_H
#define GUARD_CODE_801B3C0_H
#include "input.h"
#include "items.h"
#include "structs/menu.h"
#include "structs/subStruct_203B240.h"
#include "structs/str_text.h"

View File

@@ -2,9 +2,8 @@
#define CODE_801EE10_H
#include "constants/move.h"
#include "input.h"
#include "pokemon.h"
#include "structs/menu.h"
#include "structs/str_text.h"
// size 0xBC

View File

@@ -1,7 +1,7 @@
#ifndef GUARD_CODE_8023144_H
#define GUARD_CODE_8023144_H
#include "input.h"
#include "structs/menu.h"
#include "structs/str_text.h"
// size: 0x3FC

View File

@@ -1,7 +1,7 @@
#ifndef GUARD_CODE_8024458_H
#define GUARD_CODE_8024458_H
#include "input.h"
#include "structs/menu.h"
#include "structs/str_text.h"
struct unkStruct_203B2AC

View File

@@ -2,8 +2,8 @@
#define GUARD_CODE_802DB28_H
#include "file_system.h"
#include "wonder_mail.h"
#include "structs/str_text.h"
#include "structs/str_wonder_mail.h"
// size: 0xA8
struct unkStruct_203B2FC

View File

@@ -1,8 +1,8 @@
#ifndef GUARD_CODE_802DE84_H
#define GUARD_CODE_802DE84_H
#include "code_802C39C.h"
#include "input.h"
#include "structs/str_802C39C.h"
#include "structs/menu.h"
#include "structs/str_text.h"
// size: 0x7C

View File

@@ -1,7 +1,7 @@
#ifndef GUARD_CODE_802F204_H
#define GUARD_CODE_802F204_H
#include "wonder_mail.h"
#include "structs/str_wonder_mail.h"
u32 sub_802F204(unkStruct_802F204 *, bool8 displayClientSprite);
u32 sub_802F298(void);

View File

@@ -1,7 +1,7 @@
#ifndef GUARD_CODE_803B050_H
#define GUARD_CODE_803B050_H
#include "code_802C39C.h"
#include "structs/str_802C39C.h"
// size: 0x8
typedef struct unkStruct_80E9920
@@ -26,6 +26,7 @@ void CreateRescueTitle(unkStruct_802C39C *);
void sub_803B6B0(s32 x, s32 y, u8 index, u32);
// code_803B050.s
extern unkStruct_803B344 *sub_803B344(u8);
extern void sub_803B35C(WonderMail *, unkStruct_802C39C *);
#endif // GUARD_CODE_803B050_H

View File

@@ -1,9 +1,9 @@
#ifndef GUARD_CODE_803C1D0_H
#define GUARD_CODE_803C1D0_H
#include "wonder_mail.h"
#include "structs/str_wonder_mail.h"
// code_803C1D0.s
extern void sub_803C21C(WonderMail *, unkStruct_802F204*);
extern void sub_803C21C(WonderMail *, unkStruct_802F204 *);
#endif // GUARD_CODE_803C1D0_H

View File

@@ -5,34 +5,7 @@
#include "structs/str_dungeon.h"
#include "items.h"
#include "pokemon.h"
// size: 0x8
typedef struct WonderMailSub
{
/* 0x0 */ DungeonLocation dungeon;
/* 0x4 */ u32 seed;
} WonderMailSub;
// size: 0x30
typedef struct unkStruct_203B480
{
/* 0x0 */ u8 mailType;
/* 0x1 */ u8 missionType;
WonderMailSub unk4;
/* 0xC */ s16 clientSpecies;
/* 0xE */ s16 targetSpecies;
union unk10_temp
{
u32 unk10;
u16 unk10_u16;
} unk10;
/* 0x14 */ u8 playerName[0x20 - 0x14];
Item item;
u32 unk24;
u32 unk28;
/* 0x2C */ s8 rescuesAllowed;
u8 unk2D;
} unkStruct_203B480;
#include "structs/str_wonder_mail.h"
// size: 0x5C
typedef struct unkStruct_203B484

View File

@@ -1,8 +1,8 @@
#ifndef GUARD_CODE_80958E8_H
#define GUARD_CODE_80958E8_H
#include "wonder_mail.h"
#include "constants/mailbox.h"
#include "structs/str_wonder_mail.h"
// size: 0xC
typedef struct subStruct_203B490
@@ -18,8 +18,8 @@ typedef struct unkStruct_203B490
/* 0x0 */ WonderMail mailboxSlots[NUM_MAILBOX_SLOTS];
/* 0x50 */ WonderMail pelipperBoardJobs[MAX_ACCEPTED_JOBS];
/* 0xF0 */ WonderMail jobSlots[MAX_ACCEPTED_JOBS];
u8 unk190[0x28];
u8 unk1B8[0x78];
u8 unk190[40];
u8 unk1B8[120];
subStruct_203B490 unk230[16];
/* 0x2F0 */ u8 PKMNNewsReceived[NUM_POKEMON_NEWS];
bool8 unk328;

View File

@@ -1,7 +1,7 @@
#ifndef GUARD_CODE_80958E8_1_H
#define GUARD_CODE_80958E8_1_H
#include "wonder_mail.h"
#include "structs/str_wonder_mail.h"
// size: 0x8
struct unkStruct_8096AF8
@@ -11,11 +11,17 @@ struct unkStruct_8096AF8
/* 0x4 */ u16 targetSpecies;
};
bool8 AcceptJob(WonderMail *mail);
s32 CountJobsinDungeon(u8 dungeon);
WonderMail *GetJobSlotInfo(u8 index);
s32 GetNumAcceptedJobs(void);
bool8 IsJobSlotEmpty(u8 index);
bool8 IsMailinJobSlot(WonderMail *mail);
void ResetJobSlot(u8 index);
bool8 sub_809693C(WonderMail *mail);
void sub_8096AF8(struct unkStruct_8096AF8 *, u8 slotIndex, u8 dungeon);
bool8 sub_8096C08(u8 *jobIndex);
// code_80958E8_1.s
extern WonderMail *GetPelipperBoardSlotInfo(u8);

View File

@@ -3,6 +3,10 @@
// code_8096AF8.s
extern u8 CheckPKMNNewsSlot(u8);
extern void sub_8096C80(void);
extern void sub_8096D24(void);
extern u8 *sub_8096DD8(void);
extern u8 *sub_8096DE8(void);
extern bool8 sub_8096E2C(void);
extern void sub_8096EEC(void);

View File

@@ -1,6 +1,8 @@
#ifndef GUARD_CODE_80972F4_H
#define GUARD_CODE_80972F4_H
#include "structs/str_wonder_mail.h"
// size: 0x8
typedef struct MissionText
{
@@ -15,6 +17,8 @@ const u8 *GetCurrentMissionText(s16 index);
// TODO: this should probably be bool8 but can't get a match just yet
bool32 IsMazeCompleted(s16 mazeIndex);
bool8 sub_8096F50(WonderMail *mail);
void sub_8097418(s16 index, bool32);
bool8 sub_8097504(s16 mazeIndex);
const u8 *sub_80975DC(u32);

View File

@@ -3,6 +3,7 @@
// code_8098DBC.s
extern void nullsub_104(void);
extern u8 sub_8099328(u8 *);
extern void sub_80993D8(void);
extern void sub_80993E4(void);
extern void sub_8099690(u32);

View File

@@ -4,8 +4,8 @@
#include "code_8094F88.h"
#include "items.h"
#include "pokemon.h"
#include "wonder_mail.h"
#include "structs/menu.h"
#include "structs/str_wonder_mail.h"
// size: 0x568
typedef struct WonderMailStruct_203B33C
@@ -53,4 +53,4 @@ enum FriendRescueMenuStates {
FRIEND_RESCUE_MENU_DEFAULT_FALLBACK = 0x7e,
};
#endif
#endif

View File

@@ -1,7 +1,7 @@
#ifndef GUARD_HINTS_MENU1_H
#define GUARD_HINTS_MENU1_H
#include "input.h"
#include "structs/menu.h"
#include "structs/str_text.h"
// size: 0x9C

View File

@@ -1,7 +1,7 @@
#ifndef GUARD_HINTS_MENU2_H
#define GUARD_HINTS_MENU2_H
#include "input.h"
#include "structs/menu.h"
#include "structs/str_text.h"
// size: 0xA0

View File

@@ -47,43 +47,6 @@ typedef struct UnusedInputStruct
u8 unk29;
} UnusedInputStruct;
// size: 0xC
typedef struct MenuInputStructSub
{
u8 unk0;
/* 0x1 */ u8 a_button;
/* 0x2 */ u8 b_button;
/* 0x3 */ u8 dpad_right;
/* 0x4 */ u8 dpad_left;
u8 fill5[3];
u16 unk8;
s16 unkA;
} MenuInputStructSub;
// size: 0x34
typedef struct MenuInputStruct
{
s32 unk0;
u16 unk4;
s16 unk6;
s16 unk8; // Maybe Position
s16 unkA;
s16 unkC; // Maybe Position
s16 unkE;
u32 unk10;
s16 unk14; // Maybe Position
s16 unk16;
/* 0x18 */ s16 menuIndex;
s16 unk1A;
s16 unk1C;
s16 unk1E;
s16 unk20;
s16 unk22;
u16 unk24;
u16 unk26;
MenuInputStructSub unk28;
} MenuInputStruct;
extern Inputs gRealInputs;
void InitInput(void);

View File

@@ -2,8 +2,8 @@
#define GUARD_KANGASKHAN_STORAGE1_H
#include "file_system.h"
#include "items.h"
#include "structs/menu.h"
#include "structs/str_items.h"
#include "structs/str_text.h"
enum KangaskhanStorageStates

View File

@@ -1,7 +1,7 @@
#ifndef GUARD_KECLEON_BROS2_H
#define GUARD_KECLEON_BROS2_H
#include "input.h"
#include "structs/menu.h"
#include "structs/str_text.h"
// size: 0xA0

View File

@@ -1,7 +1,7 @@
#ifndef GUARD_KECLEON_BROS3_H
#define GUARD_KECLEON_BROS3_H
#include "input.h"
#include "structs/menu.h"
#include "structs/str_text.h"
// size: 0xA0

View File

@@ -2,7 +2,7 @@
#define GUARD_KECLEON_BROS4_H
#include "constants/item.h"
#include "input.h"
#include "structs/menu.h"
#include "structs/str_text.h"
// size: 0xF4

View File

@@ -4,7 +4,7 @@
#include "structs/menu.h"
#include "structs/str_text.h"
#include "constants/mailbox.h"
#include "code_802C39C.h"
#include "structs/str_802C39C.h"
struct unkStruct_203B304
{
@@ -23,7 +23,6 @@ struct unkStruct_203B304
};
extern void SetMailboxState(u32);
extern s32 GetNumAcceptedJobs(void);
enum MailBoxStates
{

View File

@@ -1,7 +1,7 @@
#ifndef GUARD_MAILBOX_8095F8C_H
#define GUARD_MAILBOX_8095F8C_H
#include "wonder_mail.h"
#include "structs/str_wonder_mail.h"
WonderMail *GetMailboxSlotInfo(u8 index);
bool8 IsMailSlotEmpty(u8 index);

View File

@@ -2,7 +2,7 @@
#define GUARD_MAKUHITA_DOJO2_H
#include "constants/dungeon.h"
#include "input.h"
#include "structs/menu.h"
#include "structs/str_text.h"
// size: 0xD0

102
include/math.h Normal file
View File

@@ -0,0 +1,102 @@
#ifndef GUARD_MATH_H
#define GUARD_MATH_H
#include "global.h"
/**
* This type represents a signed 24.8 fixed-point number, where the 24 most
* significant bits are the integer part and the 8 least significant bits are
* the fractional part.
*/
typedef s32 s24_8;
/**
* This type represents an unsigned 24.8 fixed-point number, where the 24 most
* significant bits are the integer part and the 8 least significant bits are
* the fractional part.
*/
typedef u32 u24_8;
/**
* This function computes a value modulo 3, using a lookup table for values less
* than 0x100.
*
* @warning This function performs an invalid memory access if x < 0.
* Hopefully it's never actually used.
*
* @param[in] x The value to get modulo 3. Must be non-negative.
*
* @return The value of x modulo 3.
*/
u32 fast_mod_3(s32 x);
/**
* This function computes the sine of the absolute value of `x` using a lookup
* table. The period of the function is `4096`, and the range is `[-256, 256]`.
*
* @param[in] x The value to get the sine of.
*
* @return `floor(256 * sin(pi * abs(x) / 2048))` as a signed 32-bit integer.
*/
s32 sin_abs_4096(s32 x);
/**
* This function computes the cosine of of `x` using a lookup table. The period of
* the function is `4096`, and the range is `[-256, 256]`.
*
* @note Mathematically, `cos(abs(t)) = cos(t)`, unlike the case in `sin_abs_4096()` above.
*
* @param[in] x The value to get the cosine of.
*
* @return `floor(256 * cos(pi * x / 2048))` as a signed 32-bit integer.
*/
s32 cos_4096(s32 x);
/**
* This function lexicographically compares two pairs of u32s.
*
* @note The call signature of this might change if it makes sense to pack the
* inputs into a struct representing, say, a 64-bit unsigned integer. Doing
* so does affect the generated assembly; the current approach is the simplest
* match.
*
* @param[in] x_hi The high 32 bits of the first pair.
* @param[in] x_lo The low 32 bits of the first pair.
* @param[in] y_hi The high 32 bits of the second pair.
* @param[in] y_lo The low 32 bits of the second pair.
*
* @return `TRUE` if `x < y`, `FALSE` otherwise.
*/
bool8 u32_pair_less_than(u32 x_hi, u32 x_lo, u32 y_hi, u32 y_lo);
/**
* This function multiplies two signed 24.8 fixed-point numbers.
*
* @param[in] x The first factor.
* @param[in] y The second factor.
*
* @return The product `x*y` as a signed 24.8 fixed-point number.
*/
s24_8 s24_8_mul(s24_8 x, s24_8 y);
/**
* This function divides two signed 24.8 fixed-point numbers.
*
* @param[in] x The dividend.
* @param[in] y The divisor.
*
* @returns The quotient `x/y` as a signed 24.8 fixed-point number.
*/
s32 s24_8_div(s32 r0, s32 r1);
/**
* This function multiplies two unsigned 24.8 fixed-point numbers.
*
* @param[in] x The first factor.
* @param[in] y The second factor.
*
* @return The product `x*y` as an unsigned 24.8 fixed-point number.
*/
u24_8 u24_8_mul(u24_8 x, u24_8 y);
#endif // GUARD_MATH_H

View File

@@ -2,7 +2,7 @@
#define GUARD_PERSONALITY_TEST_H
#include "constants/personality_test.h"
#include "input.h"
#include "structs/menu.h"
#include "structs/str_text.h"
// Definitely wrong but need to figure out better structure later

View File

@@ -2,7 +2,7 @@
#define GUARD_POKEMON_NEWS1_H
#include "constants/wonder_mail.h"
#include "input.h"
#include "structs/menu.h"
#include "structs/str_text.h"
// size: 0xD4;

View File

@@ -1,7 +1,7 @@
#ifndef GUARD_POKEMON_NEWS2_H
#define GUARD_POKEMON_NEWS2_H
#include "input.h"
#include "structs/menu.h"
#include "structs/str_text.h"
// size: 0x94

View File

@@ -1,7 +1,7 @@
#ifndef GUARD_POKEMON_NEWS3_H
#define GUARD_POKEMON_NEWS3_H
#include "input.h"
#include "structs/menu.h"
#include "structs/str_text.h"
// size: 0xA4

View File

@@ -1,7 +1,7 @@
#ifndef GUARD_POST_OFFICE_GUIDE2_H
#define GUARD_POST_OFFICE_GUIDE2_H
#include "input.h"
#include "structs/menu.h"
#include "structs/str_text.h"
// size: 0x78

View File

@@ -7,6 +7,7 @@
#include "rescue_team_info.h"
#include "pokemon.h"
#include "items.h"
#include "code_8094F88.h"
#include "code_80958E8.h"
enum

View File

@@ -1,10 +1,46 @@
#ifndef GUARD_MENU_H
#define GUARD_MENU_H
#include "input.h"
#include "sprite_oam.h"
#include "structs/str_text.h"
// size: 0xC
typedef struct MenuInputStructSub
{
u8 unk0;
/* 0x1 */ u8 a_button;
/* 0x2 */ u8 b_button;
/* 0x3 */ u8 dpad_right;
/* 0x4 */ u8 dpad_left;
u8 fill5[3];
u16 unk8;
s16 unkA;
} MenuInputStructSub;
// size: 0x34
typedef struct MenuInputStruct
{
s32 unk0;
u16 unk4;
s16 unk6;
s16 unk8; // Maybe Position
s16 unkA;
s16 unkC; // Maybe Position
s16 unkE;
u32 unk10;
s16 unk14; // Maybe Position
s16 unk16;
/* 0x18 */ s16 menuIndex;
s16 unk1A;
s16 unk1C;
s16 unk1E;
s16 unk20;
s16 unk22;
u16 unk24;
u16 unk26;
MenuInputStructSub unk28;
} MenuInputStruct;
// size: 0x8
typedef struct MenuItem
{

View File

@@ -1,8 +1,7 @@
#ifndef GUARD_CODE_802C39C_H
#define GUARD_CODE_802C39C_H
#ifndef GUARD_CODE_STR_802C39C_H
#define GUARD_CODE_STR_802C39C_H
#include "code_8094F88.h"
#include "wonder_mail.h"
#include "structs/str_wonder_mail.h"
// size: 0x58
typedef struct unkStruct_802C39C
@@ -30,4 +29,4 @@ typedef struct unkStruct_802C39C
/* 0x54 */ WonderMail *mail;
} unkStruct_802C39C;
#endif // GUARD_CODE_802C39C_H
#endif // GUARD_CODE_STR_802C39C_H

View File

@@ -0,0 +1,82 @@
#ifndef GUARD_STR_WONDER_MAIL_H
#define GUARD_STR_WONDER_MAIL_H
#include "constants/wonder_mail.h"
#include "structs/str_dungeon.h"
#include "structs/str_pokemon.h"
// size: 0x8
typedef struct WonderMailSub
{
/* 0x0 */ DungeonLocation dungeon;
/* 0x4 */ u32 seed;
} WonderMailSub;
// size: 0x14
typedef struct WonderMail
{
/* 0x0 */ u8 mailType;
/* 0x1 */ u8 missionType;
u8 unk2;
/* 0x4 */ WonderMailSub unk4;
/* 0xC */ s16 clientSpecies;
/* 0xE */ s16 targetSpecies;
/* 0x10 */ u8 targetItem;
/* 0x11 */ u8 rewardType;
/* 0x12 */ u8 itemReward;
/* 0x13 */ u8 friendAreaReward;
} WonderMail;
// size: 0x28
typedef struct unkStruct_802F204
{
/* 0x0 */ u8 clientName[POKEMON_NAME_LENGTH];
/* 0xA */ u8 name2[POKEMON_NAME_LENGTH]; // target name?
/* 0x14 */ s16 clientSpecies;
u8 unk16;
/* 0x18 */ s32 moneyReward;
/* 0x1C */ u8 itemRewards[MAX_ITEM_REWARDS];
/* 0x1F */ u8 quantity;
/* 0x20 */ u8 friendAreaReward;
/* 0x24 */ u32 teamRankPtsReward;
} unkStruct_802F204;
// size: 0xB4
typedef struct unkStruct_803B344
{
/* 0x0 */ WonderMail mail;
u8 *unk14;
u8 *unk18;
u8 fill1C[0x3C - 0x1C];
u8 unk3C[0xB4 - 0x3C];
} unkStruct_803B344;
// size: 0x30
typedef struct unkStruct_203B480
{
/* 0x0 */ u8 mailType;
/* 0x1 */ u8 missionType;
WonderMailSub unk4;
/* 0xC */ s16 clientSpecies;
/* 0xE */ s16 targetSpecies;
union unk10_temp
{
u32 unk10;
u16 unk10_u16;
} unk10;
/* 0x14 */ u8 playerName[0x20 - 0x14];
Item item;
u32 unk24;
u32 unk28;
/* 0x2C */ s8 rescuesAllowed;
u8 unk2D;
} unkStruct_203B480;
// size: 0x88
typedef struct WonderMailStruct_203B2C0_sub
{
/* 0x0 */ unkStruct_203B480 mail;
/* 0x30 */ PokemonStruct1 pokemon;
} WonderMailStruct_203B2C0_sub;
#endif // GUARD_STR_WONDER_MAIL_H

View File

@@ -0,0 +1,42 @@
#ifndef GUARD_THANK_YOU_WONDER_MAIL_H
#define GUARD_THANK_YOU_WONDER_MAIL_H
#include "constants/wonder_mail.h"
#include "file_system.h"
#include "structs/menu.h"
#include "structs/str_items.h"
#include "structs/str_text.h"
#include "structs/str_wonder_mail.h"
// size: 0x564
typedef struct WonderMailStruct_203B2C4
{
/* 0x0 */ u8 state;
/* 0x4 */ u32 fallbackState; // wonder mail link status??
/* 0x8 */ u8 passwordBuffer[PASSWORD_BUFFER_SIZE]; // Probably a buffer for entry
u8 unk3E;
u32 unk40;
/* 0x44 */ u32 linkError; // another link status
u8 filler48[0x1B8 - 0x48];
unkStruct_203B480 unk1B8;
unkStruct_203B480 unk1E8;
/* 0x218 */ s8 mailIndex;
MenuStruct unk21C[4];
UnkTextStruct2 unk35C[4];
UnkTextStruct2 unk3BC[4];
Item unk41C;
/* 0x420 */ OpenedFile *faceFile;
/* 0x424 */ u8 *faceData;
u16 unk428;
u16 unk42A;
u8 unk42C;
u8 unk42D;
u8 unk42E;
u32 unk430;
/* 0x434 */ u8 formattedString[0x100];
/* 0x534 */ s32 wonderMailMethod;
/* 0x538 */ u32 wonderMailMode;
unkStruct_802F204 unk53C;
} WonderMailStruct_203B2C4;
#endif // GUARD_THANK_YOU_WONDER_MAIL_H

View File

@@ -1,7 +1,7 @@
#ifndef GUARD_WIGGLYTUFF_SHOP2_H
#define GUARD_WIGGLYTUFF_SHOP2_H
#include "input.h"
#include "structs/menu.h"
#include "structs/str_text.h"
typedef struct WigglytuffShop2Work

View File

@@ -1,49 +1,10 @@
#ifndef GUARD_WONDER_MAIL_H
#define GUARD_WONDER_MAIL_H
#include "code_8094F88.h"
#include "constants/wonder_mail.h"
#include "file_system.h"
#include "items.h"
#include "structs/menu.h"
#include "pokemon.h"
#include "structs/str_text.h"
// size: 0x28
typedef struct unkStruct_802F204
{
/* 0x0 */ u8 clientName[POKEMON_NAME_LENGTH];
/* 0xA */ u8 name2[POKEMON_NAME_LENGTH]; // target name?
/* 0x14 */ s16 clientSpecies;
u8 unk16;
/* 0x18 */ s32 moneyReward;
/* 0x1C */ u8 itemRewards[MAX_ITEM_REWARDS];
/* 0x1F */ u8 quantity;
/* 0x20 */ u8 friendAreaReward;
/* 0x24 */ u32 teamRankPtsReward;
} unkStruct_802F204;
// size: 0x14
typedef struct WonderMail
{
/* 0x0 */ u8 mailType; // mail type
/* 0x1 */ u8 missionType; // mission type
u8 unk2;
/* 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
typedef struct WonderMailStruct_203B2C0_sub
{
/* 0x0 */ unkStruct_203B480 mail;
/* 0x30 */ PokemonStruct1 pokemon;
} WonderMailStruct_203B2C0_sub;
#include "structs/str_wonder_mail.h"
// size: 0x548
typedef struct WonderMailStruct_203B2C0
@@ -79,37 +40,4 @@ typedef struct WonderMailStruct_203B2C0
/* 0x544 */ s16 speciesNum;
} WonderMailStruct_203B2C0;
// size: 0x564
typedef struct WonderMailStruct_203B2C4
{
/* 0x0 */ u8 state;
/* 0x4 */ u32 fallbackState; // wonder mail link status??
/* 0x8 */ u8 passwordBuffer[PASSWORD_BUFFER_SIZE]; // Probably a buffer for entry
u8 unk3E;
u32 unk40;
/* 0x44 */ u32 linkError; // another link status
u8 filler48[0x1B8 - 0x48];
unkStruct_203B480 unk1B8;
unkStruct_203B480 unk1E8;
/* 0x218 */ s8 mailIndex;
MenuStruct unk21C[4];
UnkTextStruct2 unk35C[4];
UnkTextStruct2 unk3BC[4];
Item unk41C;
/* 0x420 */ OpenedFile *faceFile;
/* 0x424 */ u8 *faceData;
u16 unk428;
u16 unk42A;
u8 unk42C;
u8 unk42D;
u8 unk42E;
u32 unk430;
/* 0x434 */ u8 formattedString[0x100];
/* 0x534 */ s32 wonderMailMethod;
/* 0x538 */ u32 wonderMailMode;
unkStruct_802F204 unk53C;
} WonderMailStruct_203B2C4;
void SetFriendRescueCounterState(u32 r0);
#endif // GUARD_WONDER_MAIL_H

View File

@@ -1,44 +0,0 @@
#ifndef GUARD_WONDER_MAIL_2_1_H
#define GUARD_WONDER_MAIL_2_1_H
#include "code_802C39C.h"
#include "constants/mailbox.h"
#include "input.h"
#include "structs/menu.h"
#include "structs/str_text.h"
// size: 0xA8
struct unkStruct_203B2E8
{
u8 pelipperBoardSlots[MAX_ACCEPTED_JOBS];
MenuInputStruct input;
u32 unk3C;
UnkTextStruct2 *unk40;
UnkTextStruct2 unk44[4];
u8 unkA4[4];
};
// size: 0x1FC
struct unkStruct_203B2F0
{
u32 unk0;
u32 state;
u8 unk8[0xC - 0x8];
u8 unkC;
unkStruct_802C39C unk10;
u32 menuAction;
MenuStruct unk6C;
MenuStruct unkBC;
MenuItem unk10C[8];
MenuItem unk14C[8];
u8 fill18C[0x19C - 0x18C];
UnkTextStruct2 unk19C[4];
};
bool8 HasNoAcceptedJobs(void);
bool8 InitializeJobListMenu(u32);
u32 sub_802C898(void);
void sub_802C8F4(void);
#endif // GUARD_WONDER_MAIL_2_1_H

View File

@@ -1,79 +0,0 @@
#ifndef GUARD_WONDER_MAIL_3_H
#define GUARD_WONDER_MAIL_3_H
#include "code_802C39C.h"
#include "input.h"
#include "structs/menu.h"
#include "structs/str_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];
} unkStruct_203B2F4;
// size: 0x1C
typedef struct unkSubStruct_203B2F8
{
/* 0x0 */ WonderMail wonderMail;
/* 0x14 */ u8 *unk14;
/* 0x18 */ u8 *unk18;
} unkSubStruct_203B2F8;
// size: 0x208
typedef struct unkStruct_203B2F8
{
/* 0x0 */ s32 state;
/* 0x4 */ s32 fallbackState;
/* 0x8 */ u8 wonderMailAccepted;
/* 0x9 */ bool8 unk9;
/* 0xA */ u8 dungeonID;
u8 unkB;
/* 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];
} unkStruct_203B2F8;
enum WonderMailRescueStates
{
INITIAL_WONDER_MAIL_CHECK = 0,
// 1
WONDER_MAIL_EXIT = 2,
DUPLICATE_WONDER_MAIL,
DUPLICATE_WONDER_MAIL_1,
// 5 - 7
RECEIVE_WONDER_MAIL = 8,
// 9
JOB_LIST_FULL = 10,
DRAW_JOB_LIST,
DRAW_JOB_LIST_1,
// 13 - 16
};
u32 sub_802D098(unkSubStruct_203B2F8 *mail);
#endif // GUARD_WONDER_MAIL_3_H

View File

@@ -2,7 +2,7 @@
#define GUARD_WONDER_MAIL_802C10C_H
#include "constants/mailbox.h"
#include "input.h"
#include "structs/menu.h"
#include "structs/str_text.h"
// size: 0xA8

View File

@@ -0,0 +1,28 @@
#ifndef GUARD_WONDER_MAIL_802C4C8_H
#define GUARD_WONDER_MAIL_802C4C8_H
#include "constants/mailbox.h"
#include "structs/menu.h"
#include "structs/str_text.h"
// size: 0xA8
struct unkStruct_203B2E8
{
/* 0x0 */ u8 pelipperBoardSlots[MAX_ACCEPTED_JOBS];
/* 0x8 */ MenuInputStruct input;
u32 unk3C;
UnkTextStruct2 *unk40;
UnkTextStruct2 unk44[4];
u8 unkA4[4];
};
void DrawJobListMenu(void);
bool8 HasNoAcceptedJobs(void);
u8 GetPelipperBoardSlotIndex(void);
bool8 sub_802C4C8(s32, UnkTextStruct2_sub *, u32);
u32 sub_802C598(bool8);
void sub_802C640(bool8 cursorSprite);
void sub_802C688(void);
#endif // GUARD_WONDER_MAIL_802C4C8_H

View File

@@ -0,0 +1,30 @@
#ifndef GUARD_WONDER_MAIL_802C860_H
#define GUARD_WONDER_MAIL_802C860_H
#include "structs/str_802C39C.h"
#include "structs/menu.h"
#include "structs/str_text.h"
// size: 0x1FC
struct unkStruct_203B2F0
{
u32 unk0;
/* 0x4 */ u32 state;
u8 unk8[0xC - 0x8];
u8 unkC;
unkStruct_802C39C unk10;
/* 0x68 */ u32 menuAction;
MenuStruct unk6C;
MenuStruct unkBC;
MenuItem unk10C[8];
MenuItem unk14C[8];
u8 fill18C[0x19C - 0x18C];
UnkTextStruct2 unk19C[4];
};
bool8 InitializeJobListMenu(u32);
u32 sub_802C898(void);
void sub_802C8F4(void);
#endif // GUARD_WONDER_MAIL_802C860_H

View File

@@ -0,0 +1,24 @@
#ifndef GUARD_WONDER_MAIL_802CDD4_H
#define GUARD_WONDER_MAIL_802CDD4_H
#include "structs/menu.h"
#include "structs/str_text.h"
// size: 0xA0
typedef struct unkStruct_203B2F4
{
MenuInputStruct input;
u32 unk34;
UnkTextStruct2 *unk38;
UnkTextStruct2 unk3C[4];
u8 unk9C[4];
} unkStruct_203B2F4;
bool8 sub_802CDD4(u32);
u32 sub_802CE5C(bool8);
u8 sub_802CEBC(void);
void sub_802CED8(bool8 cursorSprite);
void sub_802CF14(void);
void sub_802CFD0(void);
#endif // GUARD_WONDER_MAIL_802CDD4_H

View File

@@ -0,0 +1,46 @@
#ifndef GUARD_WONDER_MAIL_802D098_H
#define GUARD_WONDER_MAIL_802D098_H
#include "structs/str_802C39C.h"
#include "structs/menu.h"
#include "structs/str_text.h"
#include "structs/str_wonder_mail.h"
// size: 0x1C
typedef struct unkSubStruct_203B2F8
{
/* 0x0 */ WonderMail wonderMail;
u8 *unk14;
u8 *unk18;
} unkSubStruct_203B2F8;
// size: 0x208
typedef struct unkStruct_203B2F8
{
/* 0x0 */ s32 state;
/* 0x4 */ s32 fallbackState;
/* 0x8 */ u8 wonderMailAccepted;
bool8 unk9;
/* 0xA */ u8 dungeonID;
u8 unkB;
/* 0xC */ unkSubStruct_203B2F8 *mail;
/* 0x10 */ u8 jobSlotIndex;
unkStruct_802C39C unk14;
/* 0x6C */ u32 menuAction1;
/* 0x70 */ u32 menuAction2;
/* 0x74 */ u32 menuAction3;
MenuStruct unk78;
MenuStruct unkC8;
MenuItem unk118[8];
MenuItem unk158[8];
u16 unk198[8];
UnkTextStruct2 unk1A8[4];
} unkStruct_203B2F8;
bool8 GetWonderMailAccepted(void);
bool8 sub_802D098(unkSubStruct_203B2F8 *mail);
u32 sub_802D0E0(void);
void sub_802D184(void);
#endif // GUARD_WONDER_MAIL_802D098_H