struct_03003DF0 seems to use struct_03003DF8

This commit is contained in:
Catobat 2023-04-27 16:14:29 +02:00
parent aa477e7ad0
commit b25f36e736
4 changed files with 23 additions and 22 deletions

View File

@ -272,7 +272,7 @@ typedef struct {
/*0x01*/ u8 unk_1;
/*0x02*/ u8 unk_2; // TODO kinstoneId, sub_0801DFB4
/*0x03*/ u8 unk_3;
/*0x04*/ u8* unk_4;
/*0x04*/ struct_03003DF8* unk_4;
/*0x08*/ struct_03003DF8 array[0x20];
} struct_03003DF0;

View File

@ -607,7 +607,7 @@ u32 sub_080A4418(u32 param_1, u32 param_2) {
void KinstoneMenu_080A4468(void) {
gUnk_03003DF0.unk_2 = 0;
gUnk_03003DF0.unk_4[3] = 0;
gUnk_03003DF0.unk_4->unk_3 = 0;
NotifyFusersOnFusionDone(gFuseInfo.kinstoneId);
RemoveKinstoneFromBag(gKinstoneMenu.unk2a);
}

View File

@ -53,16 +53,17 @@ void CameraTarget(Entity* this) {
case 0:
case 1:
case 2:
if ((gMessage.doTextBox & 0x7f) != 0) {
default:
if (gUnk_03003DF0.unk_4[3] == 50) {
if (CheckKinstoneFused(KINSTONE_32) == 0) {
uVar2 = 0;
break;
}
}
uVar2 = 1;
if ((gMessage.doTextBox & 0x7f) == 0) {
break;
}
default:
if (gUnk_03003DF0.unk_4->unk_3 == KINSTONE_32) {
if (CheckKinstoneFused(KINSTONE_32) == 0) {
uVar2 = 0;
break;
}
}
uVar2 = 1;
break;
}
@ -102,8 +103,8 @@ void CameraTarget_Action1(Entity* this) {
if (this->timer) {
this->timer--;
} else {
if ((*(Entity**)(gUnk_03003DF0.unk_4 + 8) != NULL) && ((u8)(gUnk_03003DF0.unk_4[3] - 1) < 100)) {
this->child = *(Entity**)(gUnk_03003DF0.unk_4 + 8);
if ((gUnk_03003DF0.unk_4->entity != NULL) && ((u8)(gUnk_03003DF0.unk_4->unk_3 - 1) < 100)) {
this->child = gUnk_03003DF0.unk_4->entity;
this->interactType = gUnk_03003DF0.unk_3;
sub_08083A40(this);
}
@ -119,7 +120,7 @@ void CameraTarget_Action2(Entity* this) {
const KinstoneWorldEvent* ptr;
if ((this->type != 1) &&
(((u8)(gUnk_03003DF0.unk_4[3] - 1) >= 100 || (this->child != *(Entity**)(gUnk_03003DF0.unk_4 + 8))))) {
(((u8)(gUnk_03003DF0.unk_4->unk_3 - 1) >= 100 || (this->child != gUnk_03003DF0.unk_4->entity)))) {
sub_080838DC(this);
} else {
this->x = this->child->x;
@ -128,7 +129,7 @@ void CameraTarget_Action2(Entity* this) {
if (this->frame == 1) {
this->frame = 0;
if (this->type == 0) {
bVar2 = gUnk_03003DF0.unk_4[3];
bVar2 = gUnk_03003DF0.unk_4->unk_3;
} else {
bVar2 = this->type2;
}

View File

@ -658,8 +658,8 @@ bool32 (*const gPlayerChargeActions[])(ChargeState*) = {
sub_08078008, sub_08078124, sub_08078140, sub_08078070, sub_080780E0, sub_08078108,
};
const u8 gUnk_0811C000[] = {
0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
const struct_03003DF8 gUnk_0811C000 = {
0, 255, 0, 0, 0, 0,
};
const u8 gUnk_0811C00C[] = {
0, 238, 14, 255, 0, 10, 241, 255,
@ -1088,11 +1088,11 @@ bool32 sub_080782C0(void) {
return FALSE;
}
}
if (((gPlayerState.playerInput.newInput & PLAYER_INPUT_1000) != 0) && ((u8)(gUnk_03003DF0.unk_4[3] - 1) < 100)) {
if (((gPlayerState.playerInput.newInput & PLAYER_INPUT_1000) != 0) && ((u8)(gUnk_03003DF0.unk_4->unk_3 - 1) < 100)) {
AddKinstoneToBag(0);
if (gSave.kinstoneAmounts[0] != 0) {
gUnk_03003DF0.unk_2 = gUnk_03003DF0.unk_4[3];
*(u8*)(*(int*)(gUnk_03003DF0.unk_4 + 8) + 0x39) = 2;
gUnk_03003DF0.unk_2 = gUnk_03003DF0.unk_4->unk_3;
gUnk_03003DF0.unk_4->entity->interactType = 2;
gPlayerState.queued_action = PLAYER_08070E9C;
} else {
CreateEzloHint(TEXT_INDEX(TEXT_EZLO, 0x65), 0);
@ -1103,7 +1103,7 @@ bool32 sub_080782C0(void) {
if ((gPlayerState.playerInput.newInput & (PLAYER_INPUT_80 | PLAYER_INPUT_8)) == 0) {
return FALSE;
}
switch (gUnk_03003DF0.unk_4[1]) {
switch (gUnk_03003DF0.unk_4->unk_1) {
default:
case 0:
return TRUE;
@ -1133,7 +1133,7 @@ bool32 sub_080782C0(void) {
void sub_080784C8(void) {
MemClear(&gUnk_03003DF0, sizeof(gUnk_03003DF0));
gUnk_03003DF0.unk_4 = (u8*)gUnk_0811C000;
gUnk_03003DF0.unk_4 = (struct_03003DF8*)&gUnk_0811C000;
}
ASM_FUNC("asm/non_matching/playerUtils/sub_080784E4.inc", struct_03003DF8* sub_080784E4(void))