diff options
| author | octorock <79596758+octorock@users.noreply.github.com> | 2022-08-05 21:04:33 +0200 |
|---|---|---|
| committer | octorock <79596758+octorock@users.noreply.github.com> | 2022-08-05 22:39:02 +0200 |
| commit | 167710b4d400e47d8be7e6d52dee65b2f3caee12 (patch) | |
| tree | d7b6b7c572730cb2ce0ecbecc5c25d897d6a68d4 /src/object | |
| parent | aa57b04756b7d8a175389075ee705c71a81963af (diff) | |
Decompile some functions
Diffstat (limited to 'src/object')
| -rw-r--r-- | src/object/lilypadLarge.c | 2 | ||||
| -rw-r--r-- | src/object/linkAnimation.c | 2 | ||||
| -rw-r--r-- | src/object/pushableFurniture.c | 92 |
3 files changed, 43 insertions, 53 deletions
diff --git a/src/object/lilypadLarge.c b/src/object/lilypadLarge.c index a36f8277..570ffb09 100644 --- a/src/object/lilypadLarge.c +++ b/src/object/lilypadLarge.c @@ -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 { diff --git a/src/object/linkAnimation.c b/src/object/linkAnimation.c index fa76b9dc..7d5d2cae 100644 --- a/src/object/linkAnimation.c +++ b/src/object/linkAnimation.c @@ -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; } diff --git a/src/object/pushableFurniture.c b/src/object/pushableFurniture.c index 22efed6f..ff6b627c 100644 --- a/src/object/pushableFurniture.c +++ b/src/object/pushableFurniture.c @@ -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++; + 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++; } - break; } - 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; + + 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 { - uVar5 = super->x.HALF.HI; + super->x.HALF.HI = this->unk_7e; } - 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; } } sub_0808FF50(this); } -END_NONMATCH void PushableFurniture_Action1(PushableFurnitureEntity* this) { if (this->unk_81 == 0) { |
