Decompile some functions

This commit is contained in:
octorock
2022-08-05 21:04:33 +02:00
parent aa57b04756
commit 167710b4d4
17 changed files with 291 additions and 932 deletions
+1 -1
View File
@@ -123,7 +123,7 @@ void sub_080855E8(LilypadLargeEntity* this) {
gPlayerEntity.collisionFlags &= 0xfb;
gPlayerState.swim_state = 0;
}
*(u32*)&gPlayerState.field_0x82[2] = (u32)this; // TODO
gPlayerState.lilypad = super;
if (super->collisionLayer == 1) {
ResetCollisionLayer(&gPlayerEntity);
} else {
+1 -1
View File
@@ -113,7 +113,7 @@ void LinkAnimation_Action8(LinkAnimationEntity* this) {
gPlayerState.field_0x27[0] = this->unk_6e;
gPlayerState.mobility = this->unk_6f;
gPlayerState.flags = this->unk_70;
gPlayerState.field_0x82[8] = this->unk_74;
gPlayerState.field_0x8a = this->unk_74;
}
break;
}
+43 -53
View File
@@ -58,14 +58,8 @@ void PushableFurniture(PushableFurnitureEntity* this) {
}
}
NONMATCH("asm/non_matching/pushableFurniture/sub_0808F990.inc", void sub_0808F990(PushableFurnitureEntity* this)) {
s32 uVar1;
bool32 bVar2;
u32 uVar3;
u32 sVar4;
u16 uVar5;
SpritePriority* pSVar6;
Entity* pEVar7;
void sub_0808F990(PushableFurnitureEntity* this) {
bool32 condition;
super->action = 1;
super->speed = 0x80;
@@ -88,58 +82,54 @@ NONMATCH("asm/non_matching/pushableFurniture/sub_0808F990.inc", void sub_0808F99
super->frameIndex = 0;
}
}
switch (super->subtimer) {
default:
bVar2 = FALSE;
if (*(u16*)&super->type == 0x101) {
uVar1 = (s8)super->subtimer;
sVar4 = super->y.HALF_U.HI;
} else {
uVar1 = (s8)super->subtimer;
sVar4 = super->x.HALF_U.HI;
}
this->unk_7e = sVar4 + (u32)uVar1;
if (super->parent == NULL) {
uVar3 = CheckFlags((u32)this->unk_86);
} else {
if ((this->unk_82 & 0x80) != 0) {
if (super->parent->action == 2) {
bVar2++;
}
break;
if (super->subtimer != 0) {
condition = FALSE;
switch (super->subtimer) {
default:
if (super->type == 1 && super->type2 == 1) {
this->unk_7e = (s8)super->subtimer + super->y.HALF_U.HI;
} else {
this->unk_7e = (s8)super->subtimer + super->x.HALF_U.HI;
}
if (super->parent == NULL) {
if (CheckFlags(this->unk_86)) {
condition++;
}
} else {
if ((this->unk_82 & 0x80) != 0) {
if (super->parent->action == 2) {
condition++;
}
break;
}
if (CheckLocalFlag((u32)this->unk_82)) {
condition++;
}
}
uVar3 = CheckLocalFlag((u32)this->unk_82);
}
if (uVar3 != 0) {
bVar2++;
}
break;
case 0:
bVar2 = FALSE;
break;
case 0x80:
bVar2 = TRUE;
if (*(u16*)&super->type == 0x101) {
uVar5 = super->y.HALF.HI;
} else {
uVar5 = super->x.HALF.HI;
}
this->unk_7e = uVar5;
break;
}
if (bVar2) {
this->unk_81 = 1;
if (*(u16*)&super->type == 0x101) {
super->y.HALF.HI = this->unk_7e;
} else {
super->x.HALF.HI = this->unk_7e;
break;
case 0x80:
condition = TRUE;
if (super->type == 1 && super->type2 == 1) {
this->unk_7e = super->y.HALF.HI;
} else {
this->unk_7e = super->x.HALF.HI;
}
break;
}
if (condition) {
this->unk_81 = 1;
if (super->type == 1 && super->type2 == 1) {
super->y.HALF.HI = this->unk_7e;
} else {
super->x.HALF.HI = this->unk_7e;
}
}
}
sub_0808FF50(this);
}
END_NONMATCH
void PushableFurniture_Action1(PushableFurnitureEntity* this) {
if (this->unk_81 == 0) {