diff options
| author | octorock <79596758+octorock@users.noreply.github.com> | 2022-04-10 23:42:14 +0200 |
|---|---|---|
| committer | octorock <79596758+octorock@users.noreply.github.com> | 2022-04-11 18:55:07 +0200 |
| commit | 4fd8048c3cc36065e15faee67e50365dead51784 (patch) | |
| tree | 87fcf28ac319e2df885df618f81843790daccffa /src/object | |
| parent | 02cec8ca8d9b8f7373286fcd1c4c88c42beeeeb1 (diff) | |
Decompile some functions
Diffstat (limited to 'src/object')
| -rw-r--r-- | src/object/beanstalk.c | 4 | ||||
| -rw-r--r-- | src/object/ladderUp.c | 2 | ||||
| -rw-r--r-- | src/object/object42.c | 7 | ||||
| -rw-r--r-- | src/object/object70.c | 2 | ||||
| -rw-r--r-- | src/object/object96.c | 2 | ||||
| -rw-r--r-- | src/object/pushableFurniture.c | 8 |
6 files changed, 13 insertions, 12 deletions
diff --git a/src/object/beanstalk.c b/src/object/beanstalk.c index ee4a6ab0..8328945a 100644 --- a/src/object/beanstalk.c +++ b/src/object/beanstalk.c @@ -277,7 +277,7 @@ void Beanstalk_Action1Type7(BeanstalkEntity* this) { case 2: case 3: case 4: - if (gPlayerState.floor_type == 0x1e) { + if (gPlayerState.floor_type == SURFACE_LADDER) { if (EntityInRectRadius(super, &gPlayerEntity, 0, 8)) { if ((super->animIndex == (super->type2 - 1) * 3 + 1) && (super->timer == 0)) { super->timer = 1; @@ -339,7 +339,7 @@ void Beanstalk_Action1Type9(BeanstalkEntity* this) { } super->spriteOrientation.flipY = gPlayerEntity.spriteOrientation.flipY; super->spriteRendering.b3 = gPlayerEntity.spriteRendering.b3; - if (gPlayerState.floor_type == 0x1e) { + if (gPlayerState.floor_type == SURFACE_LADDER) { super->spritePriority.b0 = 0; if (sub_080B1A0C(super, 0, -0x18) != 0x4014) { SetTile(0x4014, COORD_TO_TILE_OFFSET(super, 0, 0x18), 1); diff --git a/src/object/ladderUp.c b/src/object/ladderUp.c index b173b5f6..99f459ed 100644 --- a/src/object/ladderUp.c +++ b/src/object/ladderUp.c @@ -59,7 +59,7 @@ void LadderUp(Entity* this) { default: if (this->type2 == 0) { if (gPlayerEntity.y.HALF.HI < this->y.HALF.HI) { - if (gPlayerState.floor_type != 0x1e && (GetTileTypeByEntity(this) == 0x4017)) { + if (gPlayerState.floor_type != SURFACE_LADDER && (GetTileTypeByEntity(this) == 0x4017)) { SetTile(0x4023, COORD_TO_TILE(this), this->collisionLayer); RestorePrevTileEntity(COORD_TO_TILE_OFFSET(this, 0, 0x10), this->collisionLayer); } diff --git a/src/object/object42.c b/src/object/object42.c index 5fa85943..9f32164e 100644 --- a/src/object/object42.c +++ b/src/object/object42.c @@ -57,8 +57,9 @@ void sub_0808DDE8(Object42Entity* this) { if (sub_0807953C()) { super->subtimer++; } - if (((0x1e < super->subtimer) || ((gPlayerState.flags & 0x1810) != 0)) || (this->unk_6c == 0)) { - gPlayerState.flags &= 0xfffffbff; + if (((0x1e < super->subtimer) || ((gPlayerState.flags & (PL_CAPTURED | PL_FROZEN | PL_IN_MINECART)) != 0)) || + (this->unk_6c == 0)) { + gPlayerState.flags &= ~PL_BURNING; DeleteThisEntity(); } player = &gPlayerEntity; @@ -68,7 +69,7 @@ void sub_0808DDE8(Object42Entity* this) { super->collisionLayer = gPlayerEntity.collisionLayer; super->spriteRendering.b3 = gPlayerEntity.spriteRendering.b3; super->spriteOrientation.flipY = gPlayerEntity.spriteOrientation.flipY; - if ((gPlayerState.flags & 0x400) != 0) { + if ((gPlayerState.flags & PL_BURNING) != 0) { GetNextFrame(super); } else { DeleteThisEntity(); diff --git a/src/object/object70.c b/src/object/object70.c index fa0a4bb4..7cc2664f 100644 --- a/src/object/object70.c +++ b/src/object/object70.c @@ -41,7 +41,7 @@ void Object70_Action1(Entity* this) { if (this->type == 0) { if (gPlayerEntity.z.WORD == 0) { - if ((((gPlayerState.dash_state & 0x40) == 0) && (gPlayerState.floor_type == 0x11)) && + if ((((gPlayerState.dash_state & 0x40) == 0) && (gPlayerState.floor_type == SURFACE_SWAMP)) && ((gPlayerEntity.action == 1 || ((gPlayerEntity.action == 0x18 || (gPlayerEntity.action == 4)))))) { goto _080974FA; } else { diff --git a/src/object/object96.c b/src/object/object96.c index 114b748e..0a7f96d7 100644 --- a/src/object/object96.c +++ b/src/object/object96.c @@ -137,7 +137,7 @@ void Object96_Action2(Entity* this, const struct_gUnk_08123FB0* param_2) { void Object96_Action3(Entity* this, const struct_gUnk_08123FB0* param_2) { u8 type; - if (gPlayerState.flags & 0x80) { + if (gPlayerState.flags & PL_MINISH) { sub_0800445C(this); } else { if (IsCollidingPlayer(this)) { diff --git a/src/object/pushableFurniture.c b/src/object/pushableFurniture.c index 4b9c269c..c7f05ffe 100644 --- a/src/object/pushableFurniture.c +++ b/src/object/pushableFurniture.c @@ -191,7 +191,7 @@ bool32 sub_0808FC5C(PushableFurnitureEntity* this) { } else { super->timer = 0x18; } - if ((gPlayerState.flags & 0x80) == 0) { + if ((gPlayerState.flags & PL_MINISH) == 0) { super->timer += 0x10; } sub_0808FF50(this); @@ -213,7 +213,7 @@ void sub_0808FD44(PushableFurnitureEntity* this, u32 param_2) { } else { tmp = this->unk_70; } - if ((gPlayerState.flags & 0x80) != 0) { + if ((gPlayerState.flags & PL_MINISH) != 0) { super->speed = 0x40; super->timer = 0x20; } else { @@ -222,7 +222,7 @@ void sub_0808FD44(PushableFurnitureEntity* this, u32 param_2) { } } else { tmp = this->unk_7c; - if ((gPlayerState.flags & 0x80) != 0) { + if ((gPlayerState.flags & PL_MINISH) != 0) { super->speed = 0x40; super->timer = 0x40; } else { @@ -271,7 +271,7 @@ void sub_0808FDE8(PushableFurnitureEntity* this) { bool32 sub_0808FECC(PushableFurnitureEntity* this) { bool32 result = TRUE; - if (!((gPlayerState.flags & 0x80) == 0 && (gPlayerEntity.action == 6) && (gPlayerEntity.animationState == 0) && + if (!((gPlayerState.flags & PL_MINISH) == 0 && (gPlayerEntity.action == 6) && (gPlayerEntity.animationState == 0) && (gPlayerEntity.y.HALF.HI - super->y.HALF.HI < 0x14) && (super->x.HALF.HI + 0xc > gPlayerEntity.x.HALF.HI) && (super->x.HALF.HI - 12 < gPlayerEntity.x.HALF.HI))) { result = FALSE; |
