Sync dbp - struct members

This commit is contained in:
GriffinR
2022-08-07 01:35:28 -04:00
parent 12fdf455ce
commit 76adc777bf
3 changed files with 1057 additions and 958 deletions
+20 -82
View File
@@ -1,105 +1,43 @@
#ifndef GUARD_DODRIO_BERRY_PICKING_H
#define GUARD_DODRIO_BERRY_PICKING_H
struct DodrioSubstruct_0160
{
/*0x0000 : 0x3000*/ u16 ALIGNED(4) tilemapBuffers[3][BG_SCREEN_SIZE];
/*0x3000 : 0x3160*/ bool32 finished;
/*0x3004 : 0x3164*/ u8 ALIGNED(4) unk3004;
/*0x3008 : 0x3168*/ u8 ALIGNED(4) unk3008[10];
/*0x3014 : 0x3174*/ u8 ALIGNED(4) state;
/*0x3018 : 0x3178*/ u8 ALIGNED(4) unk3018;
/*0x301C : 0x317C*/ u16 ALIGNED(4) unk301C;
/*0x3020 : 0x3180*/ u8 ALIGNED(4) unk3020;
/*0x3024 : 0x3184*/ u8 ALIGNED(4) unk3024;
/*0x3024 : 0x3184*/ void (*unk3028)(void);
}; // size = 0x302C
// Berries fall in predefined columns.
// A total of 10 are available, though fewer will be used with < 5 players
// The 11th column is a repeat of the 1st column wrapped around, so only
// the values 0-9 are unique 'valid' columns
#define NUM_BERRY_COLUMNS 11
struct DodrioSubstruct_318C
struct DodrioGame_Berries
{
bool8 isShiny;
u8 ids[NUM_BERRY_COLUMNS];
u8 fallDist[NUM_BERRY_COLUMNS];
};
struct DodrioSubstruct_31A0_14
struct DodrioGame_PlayerCommData
{
u8 unk0[11];
u8 unkB[11];
u8 pickState;
bool8 ALIGNED(4) ateBerry;
bool8 ALIGNED(4) missedBerry;
};
struct DodrioSubstruct_31A0_2C
struct DodrioGame_Player
{
u8 unk0;
u8 ALIGNED(4) unk4;
u8 ALIGNED(4) unk8;
};
struct DodrioSubstruct_31A0
{
u8 name[0x10];
u32 unk10;
struct DodrioSubstruct_31A0_14 unk14;
struct DodrioSubstruct_31A0_2C unk2C;
u8 filler_35[4];
u8 name[16];
bool32 receivedGameStatePacket; // Never read
struct DodrioGame_Berries berries;
struct DodrioGame_PlayerCommData comm;
u32 unused;
}; // size = 0x3C
struct DodrioSubstruct_3308
{
u8 unk0;
u32 unk4;
};
void StartDodrioBerryPicking(u16 species, MainCallback callback);
u32 sub_815A950(u32 unused, struct DodrioSubstruct_31A0 *arg0, struct DodrioSubstruct_31A0_2C *arg1, struct DodrioSubstruct_31A0_2C *arg2, struct DodrioSubstruct_31A0_2C *arg3, struct DodrioSubstruct_31A0_2C *arg4, struct DodrioSubstruct_31A0_2C *arg5, u8 *arg6, u32 *arg7, u32 *arg8);
u32 sub_815A950(u32 unused, struct DodrioGame_Player *arg0, struct DodrioGame_PlayerCommData *arg1, struct DodrioGame_PlayerCommData *arg2, struct DodrioGame_PlayerCommData *arg3, struct DodrioGame_PlayerCommData *arg4, struct DodrioGame_PlayerCommData *arg5, u8 *arg6, u32 *arg7, u32 *arg8);
u32 sub_815AB04(u32 arg0, u8 *arg1);
bool32 sub_815AB60(u32 a0);
void sub_815A61C(struct DodrioSubstruct_31A0 *arg0, struct DodrioSubstruct_31A0_2C *arg1, struct DodrioSubstruct_31A0_2C *arg2, struct DodrioSubstruct_31A0_2C *arg3, struct DodrioSubstruct_31A0_2C *arg4, struct DodrioSubstruct_31A0_2C *arg5, u8 arg6, u32 arg7, u32 arg8);
void sub_815A61C(struct DodrioGame_Player *arg0, struct DodrioGame_PlayerCommData *arg1, struct DodrioGame_PlayerCommData *arg2, struct DodrioGame_PlayerCommData *arg3, struct DodrioGame_PlayerCommData *arg4, struct DodrioGame_PlayerCommData *arg5, u8 arg6, u32 arg7, u32 arg8);
void sub_815A5BC(s32 a0);
void sub_815AAD8(u8 a0);
void sub_815AB3C(u32 a0);
u8 sub_815A5E8(s32 a0);
u32 IncrementWithLimit(u32, u32);
void sub_8153A9C(void);
void sub_8153AFC(struct DodrioSubstruct_318C * unk318C, u8 a1, u8 a2, u8 a3);
void sub_8153BC0(u8 a0);
void sub_8153BF8(u8 a0);
void sub_8153D08(u8 playerCount);
u8 sub_8155E8C(void);
u8 sub_81533B4(void);
void sub_8153DA8(u8 a0, u8 a1);
void sub_8153D80(bool8 a0, u8 a1);
void sub_8153FC8(u8 a0);
void sub_8153DD8(void);
void sub_8153E28(void);
void sub_8153ED8(void);
bool32 sub_8153F1C(void);
void sub_81540DC(bool8 a0);
void sub_8154128(void);
void sub_815417C(void);
void sub_8154274(void);
void sub_81542EC(u8 a0, u8 a1);
void sub_8154370(u8 a0, u8 a1);
void sub_8154398(u16 a0, u8 a1);
void sub_8154438(void);
void sub_81544F0(void);
void sub_8154540(void);
void sub_8154578(void);
void sub_81545BC(bool8 a0);
void sub_81546C0(void);
void sub_8154730(void);
void sub_8154968(struct DodrioSubstruct_0160 * unk0160);
void sub_81549D4(u8 a0);
u8 *sub_81533C4(u8 id);
u8 sub_81537AC(u8 id);
void sub_81536A0(struct DodrioSubstruct_3308 *dst, u8 id);
u32 sub_81534AC(void);
u32 Min(u32 x, u32 y);
u16 sub_8153404(u8 arg0, u8 arg1);
u32 sub_81534F0(u8 arg0);
u32 sub_81535B0(void);
u16 sub_8153390(void);
u8 sub_815372C(void);
bool32 sub_8155E68(void);
void ShowDodrioBerryPickingRecords(void);
void IsDodrioInParty(void);
+961 -800
View File
File diff suppressed because it is too large Load Diff
+76 -76
View File
@@ -65,51 +65,51 @@ struct UnkPacket2
u8 unkB_6:1;
};
void sub_815A61C(struct DodrioSubstruct_31A0 * arg0, struct DodrioSubstruct_31A0_2C * arg1, struct DodrioSubstruct_31A0_2C * arg2, struct DodrioSubstruct_31A0_2C * arg3, struct DodrioSubstruct_31A0_2C * arg4, struct DodrioSubstruct_31A0_2C * arg5, u8 arg6, u32 arg7, u32 arg8)
void sub_815A61C(struct DodrioGame_Player * arg0, struct DodrioGame_PlayerCommData * arg1, struct DodrioGame_PlayerCommData * arg2, struct DodrioGame_PlayerCommData * arg3, struct DodrioGame_PlayerCommData * arg4, struct DodrioGame_PlayerCommData * arg5, u8 arg6, u32 arg7, u32 arg8)
{
struct UnkPacket2 packet;
struct DodrioSubstruct_31A0_14 * ptr = &arg0->unk14;
struct DodrioGame_Berries * ptr = &arg0->berries;
packet.id = 2;
packet.unk1_0 = ptr->unkB[0];
packet.unk1_1 = ptr->unkB[1];
packet.unk2_0 = ptr->unkB[2];
packet.unk2_1 = ptr->unkB[3];
packet.unk3_0 = ptr->unkB[4];
packet.unk3_1 = ptr->unkB[5];
packet.unk4_0 = ptr->unkB[6];
packet.unk4_1 = ptr->unkB[7];
packet.unk5_0 = ptr->unkB[8];
packet.unk5_1 = ptr->unkB[9];
packet.unk1_0 = ptr->fallDist[0];
packet.unk1_1 = ptr->fallDist[1];
packet.unk2_0 = ptr->fallDist[2];
packet.unk2_1 = ptr->fallDist[3];
packet.unk3_0 = ptr->fallDist[4];
packet.unk3_1 = ptr->fallDist[5];
packet.unk4_0 = ptr->fallDist[6];
packet.unk4_1 = ptr->fallDist[7];
packet.unk5_0 = ptr->fallDist[8];
packet.unk5_1 = ptr->fallDist[9];
packet.unk6_0 = ptr->unk0[0];
packet.unk6_1 = ptr->unk0[1];
packet.unk6_2 = ptr->unk0[2];
packet.unk6_3 = ptr->unk0[3];
packet.unk7_0 = ptr->unk0[4];
packet.unk7_1 = ptr->unk0[5];
packet.unk7_2 = ptr->unk0[6];
packet.unk7_3 = ptr->unk0[7];
packet.unk8_0 = ptr->unk0[8];
packet.unk8_1 = ptr->unk0[9];
packet.unk6_0 = ptr->ids[0];
packet.unk6_1 = ptr->ids[1];
packet.unk6_2 = ptr->ids[2];
packet.unk6_3 = ptr->ids[3];
packet.unk7_0 = ptr->ids[4];
packet.unk7_1 = ptr->ids[5];
packet.unk7_2 = ptr->ids[6];
packet.unk7_3 = ptr->ids[7];
packet.unk8_0 = ptr->ids[8];
packet.unk8_1 = ptr->ids[9];
packet.unk8_2 = arg1->unk0;
packet.unk8_3 = arg2->unk0;
packet.unk9_0 = arg3->unk0;
packet.unk9_1 = arg4->unk0;
packet.unk9_2 = arg5->unk0;
packet.unk8_2 = arg1->pickState;
packet.unk8_3 = arg2->pickState;
packet.unk9_0 = arg3->pickState;
packet.unk9_1 = arg4->pickState;
packet.unk9_2 = arg5->pickState;
packet.unk9_3 = arg1->unk4;
packet.unk9_4 = arg2->unk4;
packet.unkA_0 = arg3->unk4;
packet.unkA_1 = arg4->unk4;
packet.unkA_2 = arg5->unk4;
packet.unk9_3 = arg1->ateBerry;
packet.unk9_4 = arg2->ateBerry;
packet.unkA_0 = arg3->ateBerry;
packet.unkA_1 = arg4->ateBerry;
packet.unkA_2 = arg5->ateBerry;
packet.unkB_2 = arg1->unk8;
packet.unkB_3 = arg2->unk8;
packet.unkB_4 = arg3->unk8;
packet.unkB_5 = arg4->unk8;
packet.unkB_6 = arg5->unk8;
packet.unkB_2 = arg1->missedBerry;
packet.unkB_3 = arg2->missedBerry;
packet.unkB_4 = arg3->missedBerry;
packet.unkB_5 = arg4->missedBerry;
packet.unkB_6 = arg5->missedBerry;
packet.unkA_3 = arg6;
packet.unkB_1 = arg7;
@@ -117,10 +117,10 @@ void sub_815A61C(struct DodrioSubstruct_31A0 * arg0, struct DodrioSubstruct_31A0
Rfu_SendPacket(&packet);
}
u32 sub_815A950(u32 unused, struct DodrioSubstruct_31A0 * arg0, struct DodrioSubstruct_31A0_2C * arg1, struct DodrioSubstruct_31A0_2C * arg2, struct DodrioSubstruct_31A0_2C * arg3, struct DodrioSubstruct_31A0_2C * arg4, struct DodrioSubstruct_31A0_2C * arg5, u8 *arg6, u32 *arg7, u32 *arg8)
u32 sub_815A950(u32 unused, struct DodrioGame_Player * arg0, struct DodrioGame_PlayerCommData * arg1, struct DodrioGame_PlayerCommData * arg2, struct DodrioGame_PlayerCommData * arg3, struct DodrioGame_PlayerCommData * arg4, struct DodrioGame_PlayerCommData * arg5, u8 *arg6, u32 *arg7, u32 *arg8)
{
struct UnkPacket2 * packet;
struct DodrioSubstruct_31A0_14 * ptr = &arg0->unk14;
struct DodrioGame_Berries * ptr = &arg0->berries;
if ((gRecvCmds[0][0] & 0xFF00) != 0x2F00)
return 0;
@@ -128,49 +128,49 @@ u32 sub_815A950(u32 unused, struct DodrioSubstruct_31A0 * arg0, struct DodrioSub
packet = (void *)&gRecvCmds[0][1];
if (packet->id == 2)
{
ptr->unkB[0] = packet->unk1_0;
ptr->unkB[1] = packet->unk1_1;
ptr->unkB[2] = packet->unk2_0;
ptr->unkB[3] = packet->unk2_1;
ptr->unkB[4] = packet->unk3_0;
ptr->unkB[5] = packet->unk3_1;
ptr->unkB[6] = packet->unk4_0;
ptr->unkB[7] = packet->unk4_1;
ptr->unkB[8] = packet->unk5_0;
ptr->unkB[9] = packet->unk5_1;
ptr->unkB[10] = packet->unk1_0;
ptr->fallDist[0] = packet->unk1_0;
ptr->fallDist[1] = packet->unk1_1;
ptr->fallDist[2] = packet->unk2_0;
ptr->fallDist[3] = packet->unk2_1;
ptr->fallDist[4] = packet->unk3_0;
ptr->fallDist[5] = packet->unk3_1;
ptr->fallDist[6] = packet->unk4_0;
ptr->fallDist[7] = packet->unk4_1;
ptr->fallDist[8] = packet->unk5_0;
ptr->fallDist[9] = packet->unk5_1;
ptr->fallDist[10] = packet->unk1_0;
ptr->unk0[0] = packet->unk6_0;
ptr->unk0[1] = packet->unk6_1;
ptr->unk0[2] = packet->unk6_2;
ptr->unk0[3] = packet->unk6_3;
ptr->unk0[4] = packet->unk7_0;
ptr->unk0[5] = packet->unk7_1;
ptr->unk0[6] = packet->unk7_2;
ptr->unk0[7] = packet->unk7_3;
ptr->unk0[8] = packet->unk8_0;
ptr->unk0[9] = packet->unk8_1;
ptr->unk0[10] = packet->unk6_0;
ptr->ids[0] = packet->unk6_0;
ptr->ids[1] = packet->unk6_1;
ptr->ids[2] = packet->unk6_2;
ptr->ids[3] = packet->unk6_3;
ptr->ids[4] = packet->unk7_0;
ptr->ids[5] = packet->unk7_1;
ptr->ids[6] = packet->unk7_2;
ptr->ids[7] = packet->unk7_3;
ptr->ids[8] = packet->unk8_0;
ptr->ids[9] = packet->unk8_1;
ptr->ids[10] = packet->unk6_0;
arg1->unk0 = packet->unk8_2;
arg1->unk4 = packet->unk9_3;
arg1->unk8 = packet->unkB_2;
arg1->pickState = packet->unk8_2;
arg1->ateBerry = packet->unk9_3;
arg1->missedBerry = packet->unkB_2;
arg2->unk0 = packet->unk8_3;
arg2->unk4 = packet->unk9_4;
arg2->unk8 = packet->unkB_3;
arg2->pickState = packet->unk8_3;
arg2->ateBerry = packet->unk9_4;
arg2->missedBerry = packet->unkB_3;
arg3->unk0 = packet->unk9_0;
arg3->unk4 = packet->unkA_0;
arg3->unk8 = packet->unkB_4;
arg3->pickState = packet->unk9_0;
arg3->ateBerry = packet->unkA_0;
arg3->missedBerry = packet->unkB_4;
arg4->unk0 = packet->unk9_1;
arg4->unk4 = packet->unkA_1;
arg4->unk8 = packet->unkB_5;
arg4->pickState = packet->unk9_1;
arg4->ateBerry = packet->unkA_1;
arg4->missedBerry = packet->unkB_5;
arg5->unk0 = packet->unk9_2;
arg5->unk4 = packet->unkA_2;
arg5->unk8 = packet->unkB_6;
arg5->pickState = packet->unk9_2;
arg5->ateBerry = packet->unkA_2;
arg5->missedBerry = packet->unkB_6;
*arg6 = packet->unkA_3;
*arg7 = packet->unkB_1;