mirror of
https://github.com/zeldaret/tmc
synced 2026-06-30 11:51:43 -04:00
Decompile some functions
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user