mirror of
https://github.com/zeldaret/tmc
synced 2026-08-20 14:15:10 -04:00
Decompile OctorokBoss
This commit is contained in:
@@ -57,7 +57,7 @@ void sub_080298A4(Entity* this) {
|
||||
this->actionDelay = 0;
|
||||
this->hitType = 0x6b;
|
||||
this->field_0x76.HALF.HI = 0;
|
||||
sub_0801D2B4(this, 0x7f);
|
||||
ChangeObjPalette(this, 0x7f);
|
||||
EnqueueSFX(0xfe);
|
||||
this->child->action = 2;
|
||||
break;
|
||||
@@ -155,7 +155,7 @@ void sub_08029AE0(Entity* this) {
|
||||
this->speed = 0xa0;
|
||||
this->field_0x74.HALF.HI = 0;
|
||||
sub_08029EEC(this);
|
||||
sub_0801D2B4(this, 0x77);
|
||||
ChangeObjPalette(this, 0x77);
|
||||
EnqueueSFX(0x182);
|
||||
}
|
||||
}
|
||||
@@ -217,7 +217,7 @@ void sub_08029C08(Entity* this) {
|
||||
void sub_08029C2C(Entity* this) {
|
||||
if (--this->actionDelay == 0) {
|
||||
this->action = 4;
|
||||
sub_0801D2B4(this, 0x7f);
|
||||
ChangeObjPalette(this, 0x7f);
|
||||
EnqueueSFX(0x6c);
|
||||
}
|
||||
}
|
||||
@@ -234,7 +234,7 @@ void sub_08029C6C(Entity* this) {
|
||||
sub_08029BC4(this);
|
||||
if (this->parent->action != 3) {
|
||||
this->action = 1;
|
||||
sub_0801D2B4(this, 0x77);
|
||||
ChangeObjPalette(this, 0x77);
|
||||
} else {
|
||||
sub_0802A16C(this);
|
||||
}
|
||||
@@ -271,7 +271,7 @@ void sub_08029D14(Entity* this) {
|
||||
if (this->actionDelay) {
|
||||
if (--this->actionDelay == 0) {
|
||||
InitializeAnimation(this, this->animationState + 0xc);
|
||||
sub_0801D2B4(this, 0x7f);
|
||||
ChangeObjPalette(this, 0x7f);
|
||||
EnqueueSFX(0x6c);
|
||||
}
|
||||
} else {
|
||||
@@ -313,7 +313,7 @@ void sub_08029DE4(Entity* this) {
|
||||
sub_08029CF0(this);
|
||||
if (this->parent->action != 3) {
|
||||
this->action = 1;
|
||||
sub_0801D2B4(this, 0x77);
|
||||
ChangeObjPalette(this, 0x77);
|
||||
} else {
|
||||
sub_0802A16C(this);
|
||||
}
|
||||
@@ -486,7 +486,7 @@ bool32 sub_0802A14C(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_0802A16C(Entity* this) {
|
||||
sub_0801D2B4(this, gUnk_080CCDD4[this->parent->field_0x7a.HWORD >> 2 & 3]);
|
||||
ChangeObjPalette(this, gUnk_080CCDD4[this->parent->field_0x7a.HWORD >> 2 & 3]);
|
||||
}
|
||||
|
||||
void sub_0802A18C(Entity* this) {
|
||||
|
||||
@@ -1390,7 +1390,7 @@ void sub_0803BA8C(Entity* this, u32 unk) {
|
||||
}
|
||||
}
|
||||
if (sVar2 != 0) {
|
||||
sub_0801D2B4(this, sVar2);
|
||||
ChangeObjPalette(this, sVar2);
|
||||
(*(Entity**)&this->parent->field_0x78)->palette.b.b0 = this->palette.raw << 0x1c >> 0x1c;
|
||||
(*(Entity**)&this->parent->field_0x78)->palette.b.b4 = this->palette.b.b0;
|
||||
this->parent->child->palette.b.b0 = this->palette.raw << 0x1c >> 0x1c;
|
||||
|
||||
@@ -483,13 +483,13 @@ bool32 sub_08023A38(u32 unk) {
|
||||
}
|
||||
|
||||
void sub_08023A68(Entity* this) {
|
||||
sub_0801D2B4(this, 5);
|
||||
ChangeObjPalette(this, 5);
|
||||
this->spritePriority.b0 = 7;
|
||||
InitializeAnimation(this, 0x17);
|
||||
}
|
||||
|
||||
void sub_08023A88(Entity* this, u32 unk) {
|
||||
sub_0801D2B4(this, 0x22);
|
||||
ChangeObjPalette(this, 0x22);
|
||||
this->spritePriority.b0 = 4;
|
||||
InitializeAnimation(this, unk);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -68,7 +68,7 @@ void sub_08025020(Entity* this) {
|
||||
this->cutsceneBeh.HWORD = 0x294;
|
||||
this->hitType = 0x83;
|
||||
this->field_0x82.HALF.LO = 0;
|
||||
sub_0801D2B4(this, 0x7c);
|
||||
ChangeObjPalette(this, 0x7c);
|
||||
}
|
||||
this->action = 7;
|
||||
this->actionDelay = 0x3c;
|
||||
@@ -133,7 +133,7 @@ void sub_080251AC(Entity* this) {
|
||||
this->cutsceneBeh.HWORD = 0x294;
|
||||
this->hitType = 0x83;
|
||||
this->field_0x82.HALF.LO = 0;
|
||||
sub_0801D2B4(this, 0x7c);
|
||||
ChangeObjPalette(this, 0x7c);
|
||||
}
|
||||
GetNextFrame(this);
|
||||
}
|
||||
@@ -360,7 +360,7 @@ void sub_0802563C(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
|
||||
if (--this->cutsceneBeh.HWORD == 0) {
|
||||
sub_0801D2B4(this, 0x28);
|
||||
ChangeObjPalette(this, 0x28);
|
||||
this->hitType = 0x82;
|
||||
this->field_0x82.HALF.LO = 240;
|
||||
sub_080256B4(this);
|
||||
@@ -369,9 +369,9 @@ void sub_0802563C(Entity* this) {
|
||||
u32 tmp3 = gUnk_080CBFF8[this->cutsceneBeh.HWORD >> 4];
|
||||
if ((this->cutsceneBeh.HWORD & tmp3) == 0) {
|
||||
if (this->cutsceneBeh.HWORD & (tmp3 + 1)) {
|
||||
sub_0801D2B4(this, 124);
|
||||
ChangeObjPalette(this, 124);
|
||||
} else {
|
||||
sub_0801D2B4(this, 40);
|
||||
ChangeObjPalette(this, 40);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
static bool32 ShouldSpawnTreeItem(Entity*);
|
||||
|
||||
extern u32 sub_080028F4(const u8*);
|
||||
extern u32 GetRandomByWeight(const u8*);
|
||||
extern void sub_08049CF4(Entity*);
|
||||
|
||||
const u8 gTreeItemDropTables[][16] = {
|
||||
@@ -33,7 +33,7 @@ void TreeItem(Entity* this) {
|
||||
|
||||
if (this->action == 0) {
|
||||
this->action++;
|
||||
this->field_0x68.HALF.LO = sub_080028F4(gTreeItemDropTables[this->type]);
|
||||
this->field_0x68.HALF.LO = GetRandomByWeight(gTreeItemDropTables[this->type]);
|
||||
if (this->field_0x68.HALF.LO > FAIRY_INDEX) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
|
||||
@@ -228,12 +228,12 @@ void sub_08045A28(Entity* this) {
|
||||
switch (frames) {
|
||||
case 0x20:
|
||||
this->field_0x82.HALF.HI = 1;
|
||||
sub_0801D2B4(this, 0x13e);
|
||||
ChangeObjPalette(this, 0x13e);
|
||||
break;
|
||||
case 0x00:
|
||||
case 0x40:
|
||||
this->field_0x82.HALF.HI = 2;
|
||||
sub_0801D2B4(this, 0x13f);
|
||||
ChangeObjPalette(this, 0x13f);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -243,11 +243,11 @@ void sub_08045A28(Entity* this) {
|
||||
switch (frames) {
|
||||
case 0x10:
|
||||
this->field_0x82.HALF.HI = type;
|
||||
sub_0801D2B4(this, 0x13b);
|
||||
ChangeObjPalette(this, 0x13b);
|
||||
break;
|
||||
case 0:
|
||||
this->field_0x82.HALF.HI = 2;
|
||||
sub_0801D2B4(this, 0x13f);
|
||||
ChangeObjPalette(this, 0x13f);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -257,15 +257,15 @@ void sub_08045A28(Entity* this) {
|
||||
switch (frames) {
|
||||
case 0x20:
|
||||
this->field_0x82.HALF.HI = 1;
|
||||
sub_0801D2B4(this, 0x13e);
|
||||
ChangeObjPalette(this, 0x13e);
|
||||
break;
|
||||
case 0x10:
|
||||
this->field_0x82.HALF.HI = 0;
|
||||
sub_0801D2B4(this, 0x13b);
|
||||
ChangeObjPalette(this, 0x13b);
|
||||
break;
|
||||
case 0x40:
|
||||
this->field_0x82.HALF.HI = 2;
|
||||
sub_0801D2B4(this, 0x13f);
|
||||
ChangeObjPalette(this, 0x13f);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -275,7 +275,7 @@ void sub_08045A28(Entity* this) {
|
||||
switch (frames) {
|
||||
case 0:
|
||||
this->field_0x82.HALF.HI = 2;
|
||||
sub_0801D2B4(this, 0x13f);
|
||||
ChangeObjPalette(this, 0x13f);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -291,11 +291,11 @@ void sub_08045A28(Entity* this) {
|
||||
switch (this->frame & 0x70) {
|
||||
case 0x10:
|
||||
this->field_0x82.HALF.HI = 2;
|
||||
sub_0801D2B4(this, 0x13b);
|
||||
ChangeObjPalette(this, 0x13b);
|
||||
break;
|
||||
case 0x20:
|
||||
this->field_0x82.HALF.HI = 1;
|
||||
sub_0801D2B4(this, 0x13e);
|
||||
ChangeObjPalette(this, 0x13e);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -306,11 +306,11 @@ void sub_08045A28(Entity* this) {
|
||||
switch (temp) {
|
||||
case 0:
|
||||
this->field_0x82.HALF.HI = temp;
|
||||
sub_0801D2B4(this, 0x13f);
|
||||
ChangeObjPalette(this, 0x13f);
|
||||
break;
|
||||
case 0x10:
|
||||
this->field_0x82.HALF.HI = 2;
|
||||
sub_0801D2B4(this, 0x13b);
|
||||
ChangeObjPalette(this, 0x13b);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -320,7 +320,7 @@ void sub_08045A28(Entity* this) {
|
||||
switch (this->frame & 0x70) {
|
||||
case 0:
|
||||
this->field_0x82.HALF.HI = this->frame & 0x70;
|
||||
sub_0801D2B4(this, 0x13f);
|
||||
ChangeObjPalette(this, 0x13f);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -457,7 +457,7 @@ void VaatiWrathType0ActionA(Entity* this) {
|
||||
this->direction = 0;
|
||||
this->speed = 0x100;
|
||||
this->zVelocity = 0x12000;
|
||||
sub_0801D2B4(this, 0x16b);
|
||||
ChangeObjPalette(this, 0x16b);
|
||||
InitAnimationForceUpdate(this, 5);
|
||||
type1 = ((VaatiWrathHeapStruct*)this->myHeap)->type1;
|
||||
type1->subAction = 1;
|
||||
@@ -501,7 +501,7 @@ void VaatiWrathType0ActionB(Entity* this) {
|
||||
if (this->actionDelay == 0) {
|
||||
this->action = 0xc;
|
||||
this->subAction = 0;
|
||||
sub_0801D2B4(this, 0x140);
|
||||
ChangeObjPalette(this, 0x140);
|
||||
InitAnimationForceUpdate(this, 8);
|
||||
InitializeAnimation(((VaatiWrathHeapStruct*)this->myHeap)->type1, 0x10);
|
||||
InitializeAnimation(((VaatiWrathHeapStruct*)this->myHeap)->type2, 0x18);
|
||||
@@ -579,7 +579,7 @@ void sub_08041BE8(Entity* this) {
|
||||
entity->updatePriority = 3;
|
||||
sub_080AE068(entity);
|
||||
LoadFixedGFX(entity, 0x1f5);
|
||||
sub_0801D2B4(entity, 0x16b);
|
||||
ChangeObjPalette(entity, 0x16b);
|
||||
InitializeAnimation(entity, 0x1a);
|
||||
|
||||
entity = ((VaatiWrathHeapStruct*)this->myHeap)->type3;
|
||||
@@ -664,9 +664,9 @@ void sub_08041D84(Entity* this) {
|
||||
} else {
|
||||
if (this->field_0xf < 0xf0) {
|
||||
if ((0xb7 < this->field_0xf) && ((this->field_0xf & 7) == 0)) {
|
||||
sub_0801D2B4(((VaatiWrathHeapStruct*)this->myHeap)->type2,
|
||||
gUnk_080D0E80[(this->field_0xf - 0xb8) >> 3]);
|
||||
sub_0801D2B4(this->child, gUnk_080D0E80[(this->field_0xf - 0xb8) >> 3]);
|
||||
ChangeObjPalette(((VaatiWrathHeapStruct*)this->myHeap)->type2,
|
||||
gUnk_080D0E80[(this->field_0xf - 0xb8) >> 3]);
|
||||
ChangeObjPalette(this->child, gUnk_080D0E80[(this->field_0xf - 0xb8) >> 3]);
|
||||
}
|
||||
if (this->field_0xf == 0xe6) {
|
||||
DoFade(7, 4);
|
||||
@@ -674,7 +674,7 @@ void sub_08041D84(Entity* this) {
|
||||
} else {
|
||||
this->subAction = 4;
|
||||
this->spriteSettings.draw = 1;
|
||||
sub_0801D2B4(this, 0x173);
|
||||
ChangeObjPalette(this, 0x173);
|
||||
InitAnimationForceUpdate(this, 0xb);
|
||||
}
|
||||
this->field_0xf++;
|
||||
|
||||
Reference in New Issue
Block a user