unify unkStruct_802C39C

This commit is contained in:
Seth Barberee 2023-01-20 11:23:31 -08:00
parent 24d4a92a08
commit 9291137a68
7 changed files with 45 additions and 101 deletions

25
include/code_802C39C.h Normal file
View File

@ -0,0 +1,25 @@
struct unkStruct_802C39C
{
/* 0x0 */ u32 unk0[2];
/* 0x8 */ struct DungeonLocation *dungeon;
/* 0xC */ u8 *playerName;
/* 0x10 */ s16 clientSpecies;
/* 0x12 */ s16 targetSpecies;
/* 0x14 */ u8 unk14;
/* 0x15 */ u8 fill15[0x2E - 0x15];
u8 unk2E;
u8 fill2F[0x34 - 0x2F];
u8 unk34;
u8 fill35[0x38 - 0x35];
/* 0x38 */ u8 unk38[0x40 - 0x38];
u8 unk40;
u8 unk41;
u8 unk42;
u8 unk43;
u8 unk44;
u8 unk45;
u8 fill46[0x48 - 0x46];
/* 0x48 */ u32 y;
/* 0x4C */ u8 *unk4C;
/* 0x50 */ u8 *unk50[2];
};

View File

@ -12,21 +12,6 @@ struct unkStruct_203B2F4
};
extern struct unkStruct_203B2F4 *gUnknown_203B2F4;
struct unkStruct_802C39C
{
/* 0x0 */ u32 unk0[2];
/* 0x8 */ struct DungeonLocation *dungeon;
/* 0xC */ u8 *playerName;
/* 0x10 */ s16 clientSpecies;
/* 0x12 */ s16 targetSpecies;
/* 0x14 */ u8 unk14;
/* 0x15 */ u8 fill15[0x38 - 0x15];
/* 0x38 */ u8 unk38[0x48 - 0x38];
/* 0x48 */ u32 y;
/* 0x4C */ u8 *unk4C;
/* 0x50 */ u8 *unk50[2];
};
struct unkStruct_803B344
{
// size: 0xB4

View File

@ -4,21 +4,7 @@
#include "memory.h"
#include "text.h"
#include "menu.h"
struct unkStruct_802C39C
{
/* 0x0 */ u32 unk0[2];
/* 0x8 */ struct DungeonLocation *dungeon;
/* 0xC */ u8 *playerName;
/* 0x10 */ s16 clientSpecies;
/* 0x12 */ s16 targetSpecies;
/* 0x14 */ u8 unk14;
/* 0x15 */ u8 fill15[0x38 - 0x15];
/* 0x38 */ u8 unk38[0x48 - 0x38];
/* 0x48 */ u32 y;
/* 0x4C */ u8 *unk4C;
/* 0x50 */ u32 unk50[2];
};
#include "code_802C39C.h"
struct unkStruct_203B2E8
{

View File

@ -6,6 +6,7 @@
#include "text.h"
#include "pokemon_mail.h"
#include "wonder_mail.h"
#include "code_802C39C.h"
bool8 IsMailSlotEmpty(u8);
extern void sub_8013984(void *);
@ -76,21 +77,6 @@ struct unkStruct_203B2E0
};
extern struct unkStruct_203B2E0 *gUnknown_203B2E0;
struct unkStruct_802C39C
{
/* 0x0 */ u32 unk0[2];
/* 0x8 */ struct DungeonLocation *dungeon;
/* 0xC */ u8 *playerName;
/* 0x10 */ s16 clientSpecies;
/* 0x12 */ s16 targetSpecies;
/* 0x14 */ u8 unk14;
/* 0x15 */ u8 fill15[0x38 - 0x15];
/* 0x38 */ u8 unk38[0x48 - 0x38];
/* 0x48 */ u32 y;
/* 0x4C */ u8 *unk4C;
/* 0x50 */ u8 *unk50[2];
};
extern struct UnkTextStruct2 gUnknown_80DFCB4;
extern struct UnkTextStruct2 gUnknown_80DFC9C;
@ -131,7 +117,7 @@ void CreateMailMenu(void)
else {
sub_803B35C(mail,local.unk0);
if (IsMailinJobSlot(mail)) {
local.unk38[11] = 2;
local.unk43 = 2;
}
CreateRescueTitle(&local);
}
@ -351,7 +337,7 @@ void sub_802C39C(void)
local.y = sub_8013800(&gUnknown_203B2E0->unk8,index);
sub_803B35C(mail,local.unk0);
if (IsMailinJobSlot(GetPelipperBoardSlotInfo(slotIndex))) {
local.unk38[11] = 2;
local.unk43 = 2;
}
CreateRescueTitle(&local);
index++;

View File

@ -7,6 +7,7 @@
#include "constants/dungeon.h"
#include "wonder_mail.h"
#include "wonder_mail_3.h"
#include "code_802C39C.h"
const struct UnkTextStruct2 gUnknown_80DFDD4 =
{
@ -181,7 +182,7 @@ void sub_802CFD0(void)
local.unk0[0] = gUnknown_203B2F4->unk34;
local.y = sub_8013800(gUnknown_203B2F4,r5);
sub_803B35C(iVar1,local.unk0);
local.unk38[11] = 1;
local.unk43 = 1;
local.unk4C = iVar1->unk14;
CreateRescueTitle(&local);
r5++;

View File

@ -6,6 +6,7 @@
#include "pokemon.h"
#include "code_8094F88.h"
#include "constants/wonder_mail.h"
#include "code_802C39C.h"
struct unkStruct_203B320
{
@ -30,22 +31,6 @@ extern struct unkStruct_203B320 *gUnknown_203B320;
extern struct unkStruct_203B480 *gUnknown_203B480;
struct unkStruct_802C39C
{
/* 0x0 */ u32 unk0[2];
/* 0x8 */ struct DungeonLocation *dungeon;
/* 0xC */ u8 *playerName;
/* 0x10 */ s16 clientSpecies;
/* 0x12 */ s16 targetSpecies;
/* 0x14 */ u8 unk14;
/* 0x15 */ u8 fill15[0x38 - 0x15];
/* 0x38 */ u8 unk38[0x48 - 0x38];
/* 0x48 */ u32 y;
/* 0x4C */ u8 *unk4C;
/* 0x50 */ u8 *unk50[2];
};
const struct UnkTextStruct2 gUnknown_80E083C = {
0x00, 0x00, 0x00, 0x00,
0x03, 0x00, 0x00, 0x00,
@ -303,9 +288,9 @@ void sub_803092C(void)
mail = sub_8095228(gUnknown_203B320->unk0[(gUnknown_203B320->unk42 * gUnknown_203B320->unk40) + index]);
local.unk0[0] = gUnknown_203B320->unk58;
local.y = sub_8013800(&gUnknown_203B320->unk24,index);
local.unk38[8] = 7;
local.unk38[10] = 0;
local.unk38[12] = 0;
local.unk40 = 7;
local.unk42 = 0;
local.unk44 = 0;
local.dungeon = &mail->dungeon;
local.playerName = mail->playerName;
@ -313,22 +298,22 @@ void sub_803092C(void)
local.clientSpecies = (mail->clientSpecies);
local.targetSpecies = (mail->clientSpecies);
local.unk14 = 0;
local.fill15[0x19] = 5;
local.unk2E = 5;
switch(mail->mailType)
{
case WONDER_MAIL_TYPE_AOK:
local.unk38[11] = 3;
local.unk43 = 3;
break;
case WONDER_MAIL_TYPE_THANK_YOU:
local.unk38[11] = 4;
local.unk43 = 4;
break;
case 1:
case 2:
local.unk38[11]= 1;
local.unk43 = 1;
break;
default:
local.unk38[11]= 0;
local.unk43 = 0;
break;
}
CreateRescueTitle(&local);

View File

@ -1,4 +1,5 @@
#include "global.h"
#include "constants/wonder_mail.h"
#include "memory.h"
#include "text.h"
#include "input.h"
@ -6,6 +7,7 @@
#include "pokemon.h"
#include "code_8094F88.h"
#include "code_800D090.h"
#include "code_802C39C.h"
struct unkStruct_203B324
{
@ -20,32 +22,6 @@ extern struct unkStruct_203B324 *gUnknown_203B324;
extern struct unkStruct_203B480 *gUnknown_203B480;
struct unkStruct_802C39C
{
/* 0x0 */ u32 unk0[2];
/* 0x8 */ struct DungeonLocation *dungeon;
/* 0xC */ u8 *playerName;
/* 0x10 */ s16 clientSpecies;
/* 0x12 */ s16 targetSpecies;
/* 0x14 */ u8 unk14;
/* 0x15 */ u8 fill15[0x2E - 0x15];
u8 unk2E;
u8 fill2F[0x34 - 0x2F];
u8 unk34;
u8 fill35[0x38 - 0x35];
/* 0x38 */ u8 unk38[0x40 - 0x38];
u8 unk40;
u8 unk41;
u8 unk42;
u8 unk43;
u8 unk44;
u8 unk45;
u8 fill46[0x48 - 0x46];
/* 0x48 */ u32 y;
/* 0x4C */ u8 *unk4C;
/* 0x50 */ u8 *unk50[2];
};
const struct UnkTextStruct2 gUnknown_80E0900 = {
0x00, 0x00, 0x00, 0x00,
0x03, 0x00, 0x00, 0x00,
@ -162,13 +138,13 @@ void sub_8030E48(void)
switch(mail->mailType)
{
case 2:
case 4:
case WONDER_MAIL_TYPE_AOK:
stack.unk41 = 10;
break;
case 5:
stack.unk41 = 0xb;
stack.unk41 = 11;
break;
case 0:
case WONDER_MAIL_TYPE_NONE:
default:
stack.unk41 = 9;
break;