mirror of
https://github.com/zeldaret/tmc
synced 2026-06-21 16:37:05 -04:00
decompile madderpillar
This commit is contained in:
@@ -23,7 +23,7 @@ void sub_08098D1C(Entity* this) {
|
||||
this->action = 1;
|
||||
this->height.HALF.HI = -0x10;
|
||||
|
||||
temp = this->field_0x86;
|
||||
temp = this->field_0x86.HWORD;
|
||||
|
||||
if ((temp != 0) && !CheckFlags(temp)) {
|
||||
this->action = 1;
|
||||
@@ -39,7 +39,7 @@ void sub_08098D1C(Entity* this) {
|
||||
void sub_08098D6C(Entity* this) {
|
||||
Entity* ent;
|
||||
|
||||
if (CheckFlags(this->field_0x86)) {
|
||||
if (CheckFlags(this->field_0x86.HWORD)) {
|
||||
this->action = 2;
|
||||
this->actionDelay = 0x2d;
|
||||
ent = CreateFx(this, 0x43, 0);
|
||||
|
||||
+3
-3
@@ -22,7 +22,7 @@ void sub_08081AE0(Entity* this) {
|
||||
this->field_0x74.HWORD = (((this->x.HALF.HI - gRoomControls.roomOriginX)>>4) & 0x3F) |
|
||||
((((this->y.HALF.HI - gRoomControls.roomOriginY)>>4) & 0x3F) << 6);
|
||||
this->field_0x70.HALF.HI = GetTileType(this->field_0x74.HWORD, this->collisionLayer);
|
||||
if (this->entityType.form == 0 && CheckFlags(this->field_0x86)) {
|
||||
if (this->entityType.form == 0 && CheckFlags(this->field_0x86.HWORD)) {
|
||||
this->action = 5;
|
||||
SetTileType(0x7A, this->field_0x74.HWORD, this->collisionLayer);
|
||||
} else {
|
||||
@@ -92,7 +92,7 @@ void sub_08081C30(Entity* this) {
|
||||
}
|
||||
} else {
|
||||
this->action = 2;
|
||||
ClearFlag(this->field_0x86);
|
||||
ClearFlag(this->field_0x86.HWORD);
|
||||
SetTileType(0x77, this->field_0x74.HWORD, this->collisionLayer);
|
||||
PlaySFX(0x10C);
|
||||
}
|
||||
@@ -257,7 +257,7 @@ u32 sub_08081F7C(Entity* this, u32 r7) {
|
||||
this->attachedEntity->spriteOffsetY = 0xfc;
|
||||
} else {
|
||||
if (this->actionDelay == 6) {
|
||||
SetFlag(this->field_0x86);
|
||||
SetFlag(this->field_0x86.HWORD);
|
||||
SetTileType(r7, this->field_0x74.HWORD, this->collisionLayer);
|
||||
sub_08081F24(this);
|
||||
PlaySFX(0x10C);
|
||||
|
||||
+2
-2
@@ -40,8 +40,8 @@ void sub_0809ED88(Entity *this)
|
||||
{
|
||||
sub_0809F08C();
|
||||
sub_0809EE44(this);
|
||||
if (this->field_0x86 != 0) {
|
||||
if (this->cutsceneBeh.HWORD == this->field_0x86) {
|
||||
if (this->field_0x86.HWORD != 0) {
|
||||
if (this->cutsceneBeh.HWORD == this->field_0x86.HWORD) {
|
||||
if (CheckFlags(this->cutsceneBeh.HWORD)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ static void sub_0808E6A0(Entity* this) {
|
||||
}
|
||||
|
||||
static void sub_0808E6E4(Entity* this) {
|
||||
if (CheckFlags(this->field_0x86)) {
|
||||
if (CheckFlags(this->field_0x86.HWORD)) {
|
||||
this->action = 2;
|
||||
this->spriteSettings.b.draw = 1;
|
||||
this->spriteRendering.b0 = 3;
|
||||
|
||||
@@ -20,7 +20,7 @@ void sub_08091F14(Entity* this) {
|
||||
this->animIndex = 0;
|
||||
this->field_0x70.HALF.LO = COORD_TO_TILE(this);
|
||||
puVar3 = &this->field_0x70.HALF.LO;
|
||||
if (CheckFlags(this->field_0x86) != 0) {
|
||||
if (CheckFlags(this->field_0x86.HWORD) != 0) {
|
||||
this->action = 2;
|
||||
this->spriteSettings.b.draw = TRUE;
|
||||
SetTileType(0x1a2, *puVar3 - 0x41, this->collisionLayer);
|
||||
@@ -39,6 +39,6 @@ void sub_08092000(Entity* this) {
|
||||
if (GetTileType(*(u16*)&this->field_0x70.HALF.LO, this->collisionLayer) == 0x1a6) {
|
||||
this->action = 2;
|
||||
this->spriteSettings.b.draw = TRUE;
|
||||
SetFlag(this->field_0x86);
|
||||
SetFlag(this->field_0x86.HWORD);
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,7 @@ void JailBars(Entity *this)
|
||||
|
||||
void sub_080A08C4(Entity *this)
|
||||
{
|
||||
if (CheckFlags(this->field_0x86) == 0) {
|
||||
if (CheckFlags(this->field_0x86.HWORD) == 0) {
|
||||
this->action = 1;
|
||||
sub_080A0960(this, 0);
|
||||
}
|
||||
@@ -34,7 +34,7 @@ void sub_080A08C4(Entity *this)
|
||||
|
||||
void sub_080A0910(Entity *this)
|
||||
{
|
||||
if (CheckFlags(this->field_0x86) != 0) {
|
||||
if (CheckFlags(this->field_0x86.HWORD) != 0) {
|
||||
this->action = 2;
|
||||
sub_080A0960(this, 1);
|
||||
PlaySFX(0x10b);
|
||||
|
||||
@@ -45,10 +45,10 @@ void sub_0809EA34(Entity* this) {
|
||||
void sub_0809EA80(Entity* this) {
|
||||
|
||||
if ((this->bitfield & 0x80) != 0) {
|
||||
if (CheckFlags(this->field_0x86) != 0) {
|
||||
ClearFlag(this->field_0x86);
|
||||
if (CheckFlags(this->field_0x86.HWORD) != 0) {
|
||||
ClearFlag(this->field_0x86.HWORD);
|
||||
} else {
|
||||
SetFlag(this->field_0x86);
|
||||
SetFlag(this->field_0x86.HWORD);
|
||||
}
|
||||
EnqueueSFX(0x110);
|
||||
}
|
||||
@@ -59,7 +59,7 @@ void sub_0809EABC(Entity* this) {
|
||||
bool32 anySet;
|
||||
u32 f;
|
||||
|
||||
f = CheckFlags(this->field_0x86);
|
||||
f = CheckFlags(this->field_0x86.HWORD);
|
||||
anySet = (-f | f) >> 0x1F;
|
||||
if (this->frameIndex != anySet) {
|
||||
this->frameIndex = anySet;
|
||||
@@ -122,7 +122,7 @@ void sub_0809EBD8(Entity* this) {
|
||||
this->action = 2;
|
||||
this->actionDelay = 0x10;
|
||||
this->frameIndex = 2;
|
||||
SetFlag(this->field_0x86);
|
||||
SetFlag(this->field_0x86.HWORD);
|
||||
EnqueueSFX(0x110);
|
||||
}
|
||||
}
|
||||
@@ -136,7 +136,7 @@ void sub_0809EC08(Entity* this) {
|
||||
if (--this->actionDelay == 0) {
|
||||
this->action = 1;
|
||||
this->frameIndex = 3;
|
||||
ClearFlag(this->field_0x86);
|
||||
ClearFlag(this->field_0x86.HWORD);
|
||||
EnqueueSFX(0x110);
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -31,7 +31,7 @@ void Mask(Entity *this) {
|
||||
|
||||
void sub_080929A4(Entity *this) {
|
||||
if (this->entityType.parameter & 0xC0) {
|
||||
if (CheckFlags(this->field_0x86)) {
|
||||
if (CheckFlags(this->field_0x86.HWORD)) {
|
||||
s32 field_0x0a;
|
||||
|
||||
switch (this->entityType.parameter & 0xC0) {
|
||||
@@ -45,7 +45,7 @@ void sub_080929A4(Entity *this) {
|
||||
goto switchEnd;
|
||||
}
|
||||
|
||||
ClearFlag(this->field_0x86);
|
||||
ClearFlag(this->field_0x86.HWORD);
|
||||
break;
|
||||
case 0x80:
|
||||
DeleteThisEntity();
|
||||
@@ -117,7 +117,7 @@ void sub_08092B0C(Entity *this) {
|
||||
case 0x80:
|
||||
EnqueueSFX(0x72);
|
||||
case 0x40:
|
||||
SetFlag(this->field_0x86);
|
||||
SetFlag(this->field_0x86.HWORD);
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ void sub_080A074C(Entity *this)
|
||||
|
||||
void sub_080A07BC(Entity *this)
|
||||
{
|
||||
if (CheckFlags(this->field_0x86)) {
|
||||
if (CheckFlags(this->field_0x86.HWORD)) {
|
||||
this->action = 4;
|
||||
this->actionDelay = 0xc;
|
||||
this->direction = 0x10;
|
||||
|
||||
@@ -30,7 +30,7 @@ void sub_08089B18(Entity *this)
|
||||
CopyPosition(this->parent, this);
|
||||
break;
|
||||
case 4:
|
||||
if (!CheckFlags(this->field_0x86)) {
|
||||
if (!CheckFlags(this->field_0x86.HWORD)) {
|
||||
this->spriteSettings.b.draw = FALSE;
|
||||
this->previousActionFlag = 1;
|
||||
return;
|
||||
|
||||
@@ -20,7 +20,7 @@ void ObjectA(Entity *this) {
|
||||
uVar2 = 0x34;
|
||||
}
|
||||
this->field_0x70.HALF.LO = uVar2;
|
||||
if (CheckFlags(this->field_0x86) != 0) {
|
||||
if (CheckFlags(this->field_0x86.HWORD) != 0) {
|
||||
SetTileType(*(u16*)&this->field_0x70.HALF.LO, COORD_TO_TILE(this), this->collisionLayer);
|
||||
if ((gRoomControls.unk2 & 1) != 0) {
|
||||
gUnk_02000070 = 0;
|
||||
@@ -31,7 +31,7 @@ void ObjectA(Entity *this) {
|
||||
}
|
||||
} else if (this->interactType != 0) {
|
||||
SetTileType(*(u16*)&this->field_0x70.HALF.LO, COORD_TO_TILE(this), this->collisionLayer);
|
||||
SetFlag(this->field_0x86);
|
||||
SetFlag(this->field_0x86.HWORD);
|
||||
CreateDust(this);
|
||||
sub_080526F8(-1);
|
||||
DeleteThisEntity();
|
||||
|
||||
+3
-3
@@ -30,7 +30,7 @@ void Pot(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_0808222C(Entity* this) {
|
||||
if (this->entityType.parameter == 1 && CheckFlags(this->field_0x86)) {
|
||||
if (this->entityType.parameter == 1 && CheckFlags(this->field_0x86.HWORD)) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
|
||||
@@ -271,7 +271,7 @@ static void sub_08082850(Entity* this, Entity* parent) {
|
||||
}
|
||||
|
||||
if (this->entityType.parameter == 1) {
|
||||
SetFlag(this->field_0x86);
|
||||
SetFlag(this->field_0x86.HWORD);
|
||||
}
|
||||
|
||||
DeleteThisEntity();
|
||||
@@ -292,7 +292,7 @@ u32 sub_0808288C(Entity* this, u32 form, u32 arg2, u32 arg3) {
|
||||
if (entity) {
|
||||
if (arg3 == 2) {
|
||||
entity->actionDelay = 5;
|
||||
entity->field_0x86 = this->field_0x86;
|
||||
entity->field_0x86.HWORD = this->field_0x86.HWORD;
|
||||
} else {
|
||||
entity->actionDelay = 0;
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ void sub_080851AC(Entity* this) {
|
||||
}
|
||||
this->animationState = this->entityType.parameter & 2;
|
||||
if ((this->entityType).form == 3) {
|
||||
uVar1 = CheckFlags(this->field_0x86);
|
||||
uVar1 = CheckFlags(this->field_0x86.HWORD);
|
||||
this->field_0x7a.HWORD = uVar1;
|
||||
if ((u16)(uVar1 & -1) != 0) {
|
||||
this->animationState = (this->animationState + 2) & 3;
|
||||
@@ -45,11 +45,11 @@ void sub_080851AC(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_08085264(Entity* this) {
|
||||
if (CheckFlags(this->field_0x86)) {
|
||||
if (CheckFlags(this->field_0x86.HWORD)) {
|
||||
this->action = 2;
|
||||
this->field_0xf = 8;
|
||||
if (this->entityType.form == 1) {
|
||||
ClearFlag(this->field_0x86);
|
||||
ClearFlag(this->field_0x86.HWORD);
|
||||
}
|
||||
this->animationState = (this->animationState + *(u8*)&this->field_0x7c) & 3;
|
||||
InitializeAnimation(this, this->animationState);
|
||||
@@ -62,7 +62,7 @@ void sub_080852B4(Entity* this) {
|
||||
if (--this->field_0xf == 0) {
|
||||
this->action = 3;
|
||||
this->field_0xf = this->actionDelay;
|
||||
this->field_0x7a.HWORD = CheckFlags(this->field_0x86);
|
||||
this->field_0x7a.HWORD = CheckFlags(this->field_0x86.HWORD);
|
||||
this->animationState = (this->animationState + *(u8*)&this->field_0x7c) & 3;
|
||||
InitializeAnimation(this, this->animationState);
|
||||
sub_08085394(this);
|
||||
@@ -77,13 +77,13 @@ void sub_08085308(Entity* this) {
|
||||
case 1:
|
||||
break;
|
||||
case 2:
|
||||
if (CheckFlags(this->field_0x86) == 0) {
|
||||
if (CheckFlags(this->field_0x86.HWORD) == 0) {
|
||||
this->action = 1;
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (CheckFlags(this->field_0x86) == *(u16*)&this->field_0x7a) {
|
||||
if (CheckFlags(this->field_0x86.HWORD) == *(u16*)&this->field_0x7a) {
|
||||
this->field_0xf = 0xff;
|
||||
} else {
|
||||
this->field_0xf = 1;
|
||||
|
||||
@@ -23,7 +23,7 @@ void TreeHidingPortal(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_0809E83C(Entity* this) {
|
||||
if (CheckFlags(this->field_0x86)) {
|
||||
if (CheckFlags(this->field_0x86.HWORD)) {
|
||||
sub_0809E96C(this);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
@@ -60,7 +60,7 @@ void sub_0809E8BC(Entity* this) {
|
||||
|
||||
void sub_0809E8EC(Entity* this) {
|
||||
if (--this->actionDelay == 0) {
|
||||
SetFlag(this->field_0x86);
|
||||
SetFlag(this->field_0x86.HWORD);
|
||||
sub_08078A90(0);
|
||||
PlaySFX(0x73);
|
||||
DeleteThisEntity();
|
||||
|
||||
Reference in New Issue
Block a user