mirror of
https://github.com/zeldaret/tmc
synced 2026-06-14 14:28:16 -04:00
Rename objects
This commit is contained in:
@@ -147,12 +147,12 @@ void AcroBandit_OnGrabbed(Entity* this) {
|
||||
}
|
||||
|
||||
void AcroBandit_Type0(Entity* this) {
|
||||
static void (*const actionFuncs[])(Entity*) = {
|
||||
static void (*const AcroBandit_Type0_Actions[])(Entity*) = {
|
||||
AcroBandit_Type0Action0, AcroBandit_Type0Action1, AcroBandit_Type0Action2,
|
||||
AcroBandit_Type0Action3, AcroBandit_Type0Action4, AcroBandit_Type0Action5,
|
||||
AcroBandit_Type0Action6, AcroBandit_Type0Action7, AcroBandit_Type0Action8,
|
||||
};
|
||||
actionFuncs[this->action](this);
|
||||
AcroBandit_Type0_Actions[this->action](this);
|
||||
}
|
||||
|
||||
void AcroBandit_Type0Action0(Entity* this) {
|
||||
@@ -350,12 +350,12 @@ static void sub_08031E48(Entity* this, Entity* child) {
|
||||
}
|
||||
|
||||
void AcroBandit_Type1(Entity* this) {
|
||||
static void (*const actionFuncs[])(Entity*) = {
|
||||
static void (*const AcroBandit_Type1_Actions[])(Entity*) = {
|
||||
AcroBandit_Type1Init, AcroBandit_Type1Action1, AcroBandit_Type1Action2, AcroBandit_Type1Action3,
|
||||
AcroBandit_Type1Action4, AcroBandit_Type1Action5, AcroBandit_Type1Action6, AcroBandit_Type1Action7,
|
||||
AcroBandit_Type1Action8, AcroBandit_Type1Action9,
|
||||
};
|
||||
actionFuncs[this->action](this);
|
||||
AcroBandit_Type1_Actions[this->action](this);
|
||||
}
|
||||
|
||||
void AcroBandit_Type1Init(Entity* this) {
|
||||
|
||||
+1
-1
@@ -289,7 +289,7 @@ void sub_0802CBC4(Entity* this) {
|
||||
}
|
||||
FreeCarryEntity(this);
|
||||
|
||||
ent = CreateObjectWithParent(this, OBJECT_20, 0, 0);
|
||||
ent = CreateObjectWithParent(this, SMOKE_PARTICLE, 0, 0);
|
||||
if (ent != NULL) {
|
||||
ent->collisionLayer = this->collisionLayer;
|
||||
}
|
||||
|
||||
@@ -588,7 +588,7 @@ void sub_0802B048(Entity* this) {
|
||||
if (this->parent->next != NULL) {
|
||||
this->parent->field_0x80.HALF.HI = 0;
|
||||
}
|
||||
ent = CreateObjectWithParent(this, OBJECT_20, 0, 0);
|
||||
ent = CreateObjectWithParent(this, SMOKE_PARTICLE, 0, 0);
|
||||
if (ent != NULL) {
|
||||
this->collisionLayer = 1;
|
||||
} else {
|
||||
|
||||
@@ -42,7 +42,7 @@ void Bombarossa_OnCollision(BombarossaEntity* this) {
|
||||
Entity* ent;
|
||||
switch (super->contactFlags & 0x7f) {
|
||||
default:
|
||||
ent = CreateObject(OBJECT_20, 0, 0);
|
||||
ent = CreateObject(SMOKE_PARTICLE, 0, 0);
|
||||
if (ent != NULL) {
|
||||
CopyPosition(super, ent);
|
||||
}
|
||||
|
||||
@@ -405,12 +405,12 @@ NONMATCH("asm/non_matching/chuchuBoss/sub_08025DD8.inc", void sub_08025DD8(Chuch
|
||||
if (tmp) {
|
||||
tmp->child = super;
|
||||
}
|
||||
tmp = CreateObjectWithParent(super, OBJECT_49, 1, 0);
|
||||
tmp = CreateObjectWithParent(super, CHUCHU_BOSS_START_PARTICLE, 1, 0);
|
||||
if (tmp) {
|
||||
tmp->child = super->child;
|
||||
}
|
||||
if (super->type != 0) {
|
||||
tmp = CreateObjectWithParent(super, OBJECT_49, 3, 0);
|
||||
tmp = CreateObjectWithParent(super, CHUCHU_BOSS_START_PARTICLE, 3, 0);
|
||||
if (tmp) {
|
||||
tmp->child = super->child;
|
||||
}
|
||||
@@ -603,7 +603,7 @@ void sub_080263B4(ChuchuBossEntity* this) {
|
||||
this->unk_7c = 0x78;
|
||||
this->unk_84->unk_03++;
|
||||
} else {
|
||||
CreateObjectWithParent(super, OBJECT_49, super->type2, 0);
|
||||
CreateObjectWithParent(super, CHUCHU_BOSS_START_PARTICLE, super->type2, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -926,7 +926,7 @@ void sub_080269CC(ChuchuBossEntity* this) {
|
||||
pEVar7->unk_74.HALF.HI += 3;
|
||||
InitScreenShake(0x20, 0);
|
||||
SoundReq(SFX_10B);
|
||||
entity = (GenericEntity*)CreateObjectWithParent(super, OBJECT_15, 0, 0);
|
||||
entity = (GenericEntity*)CreateObjectWithParent(super, CHUCHU_BOSS_PARTICLE, 0, 0);
|
||||
if (entity != NULL) {
|
||||
entity->base.spriteIndex = 0xc9;
|
||||
#ifdef EU
|
||||
@@ -962,7 +962,7 @@ void sub_080269CC(ChuchuBossEntity* this) {
|
||||
pEVar7->unk_78.HALF.HI = 0x98;
|
||||
this->unk_7c = gUnk_080CC278[Random() & 3];
|
||||
this->unk_84->unk_03++;
|
||||
entity = (GenericEntity*)CreateObjectWithParent(&pEVar7->base, OBJECT_49, 10, 0);
|
||||
entity = (GenericEntity*)CreateObjectWithParent(&pEVar7->base, CHUCHU_BOSS_START_PARTICLE, 10, 0);
|
||||
if (entity != NULL) {
|
||||
*(u32*)&entity->cutsceneBeh = this->unk_7c;
|
||||
}
|
||||
@@ -1702,7 +1702,7 @@ bool32 sub_08027AA4(ChuchuBossEntity* this) {
|
||||
switch (super->contactFlags & 0x7f) {
|
||||
case 19:
|
||||
SoundReq(SFX_WATER_SPLASH);
|
||||
CreateObjectWithParent(super, OBJECT_49, 9, super->type2);
|
||||
CreateObjectWithParent(super, CHUCHU_BOSS_START_PARTICLE, 9, super->type2);
|
||||
SoundReq(SFX_155);
|
||||
pHelper = this->unk_84;
|
||||
super->iframes = 3;
|
||||
@@ -1823,7 +1823,7 @@ void sub_08027C9C(ChuchuBossEntity* this, u32 param_2) {
|
||||
}
|
||||
|
||||
Entity* sub_08027D20(ChuchuBossEntity* this) {
|
||||
Entity* r4 = CreateObjectWithParent(super, OBJECT_15, 0, 0);
|
||||
Entity* r4 = CreateObjectWithParent(super, CHUCHU_BOSS_PARTICLE, 0, 0);
|
||||
if (r4 != NULL) {
|
||||
r4->spriteIndex = 0xc9;
|
||||
#ifdef EU
|
||||
|
||||
+2
-2
@@ -277,7 +277,7 @@ void sub_08044498(DustEntity* this) {
|
||||
u32 xdiff, ydiff;
|
||||
|
||||
uVar4 = COORD_TO_TILE(&gPlayerEntity);
|
||||
tmp = (gPlayerState.field_0x92 & 0xf00);
|
||||
tmp = (gPlayerState.playerInput.field_0x92 & 0xf00);
|
||||
if (tmp != this->unk_75 || uVar4 != this->unk_76) {
|
||||
this->unk_75 = tmp;
|
||||
this->unk_76 = uVar4;
|
||||
@@ -320,7 +320,7 @@ void sub_08044550(DustEntity* this) {
|
||||
void sub_080445C0(DustEntity* this) {
|
||||
Entity* pEVar1;
|
||||
|
||||
pEVar1 = CreateObject(OBJECT_21, 1, 1);
|
||||
pEVar1 = CreateObject(DIRT_PARTICLE, 1, 1);
|
||||
if (pEVar1 != NULL) {
|
||||
CopyPosition(super, pEVar1);
|
||||
}
|
||||
|
||||
+11
-11
@@ -17,9 +17,9 @@ void sub_08045178(Entity*, Entity*, int, int);
|
||||
void FireballGuy_OnTick(Entity*);
|
||||
void FireballGuy_OnCollision(Entity*);
|
||||
void FireballGuy_OnGrabbed(Entity*);
|
||||
void sub_080453E8(Entity*);
|
||||
void sub_08045430(Entity*);
|
||||
void sub_08045454(Entity*);
|
||||
void FireballGuy_Init(Entity*);
|
||||
void FireballGuy_Action1(Entity*);
|
||||
void FireballGuy_Action2(Entity*);
|
||||
|
||||
static void (*const FireballGuy_Functions[])(Entity*) = {
|
||||
FireballGuy_OnTick, FireballGuy_OnCollision, GenericKnockback, GenericDeath, GenericConfused, FireballGuy_OnGrabbed,
|
||||
@@ -30,12 +30,12 @@ void FireballGuy(Entity* this) {
|
||||
}
|
||||
|
||||
void FireballGuy_OnTick(Entity* this) {
|
||||
static void (*const actionFuncs[])(Entity*) = {
|
||||
sub_080453E8,
|
||||
sub_08045430,
|
||||
sub_08045454,
|
||||
static void (*const FireballGuy_Actions[])(Entity*) = {
|
||||
FireballGuy_Init,
|
||||
FireballGuy_Action1,
|
||||
FireballGuy_Action2,
|
||||
};
|
||||
actionFuncs[this->action](this);
|
||||
FireballGuy_Actions[this->action](this);
|
||||
}
|
||||
|
||||
void FireballGuy_OnCollision(Entity* this) {
|
||||
@@ -49,7 +49,7 @@ void FireballGuy_OnCollision(Entity* this) {
|
||||
void FireballGuy_OnGrabbed(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_080453E8(Entity* this) {
|
||||
void FireballGuy_Init(Entity* this) {
|
||||
this->action = 1;
|
||||
this->timer = 0;
|
||||
this->spriteSettings.draw = 1;
|
||||
@@ -61,7 +61,7 @@ void sub_080453E8(Entity* this) {
|
||||
sub_08045524(this);
|
||||
}
|
||||
|
||||
void sub_08045430(Entity* this) {
|
||||
void FireballGuy_Action1(Entity* this) {
|
||||
ProcessMovement2(this);
|
||||
GetNextFrame(this);
|
||||
if (GravityUpdate(this, Q_8_8(24.0)) == 0)
|
||||
@@ -69,7 +69,7 @@ void sub_08045430(Entity* this) {
|
||||
}
|
||||
|
||||
/* Split FireballGuy into new ones */
|
||||
void sub_08045454(Entity* this) {
|
||||
void FireballGuy_Action2(Entity* this) {
|
||||
// Entity count per form
|
||||
static const u8 typeEntityCount[4] = { 2, 3, 4, 5 };
|
||||
static const PosOffset gUnk_080D1810[4] = { { 6, 0 }, { -6, 0 }, { 0, 6 }, { 0, -6 } };
|
||||
|
||||
+3
-3
@@ -377,7 +377,7 @@ void sub_08037B10(GibdoEntity* this) {
|
||||
void Gibdo_CreateObjects(GibdoEntity* this) {
|
||||
Entity* object;
|
||||
|
||||
object = CreateObject(OBJECT_2A, 3, 0);
|
||||
object = CreateObject(FLAME, 3, 0);
|
||||
if (object != NULL) {
|
||||
object->type2 = super->timer;
|
||||
object->spritePriority.b0 = 3;
|
||||
@@ -387,7 +387,7 @@ void Gibdo_CreateObjects(GibdoEntity* this) {
|
||||
}
|
||||
this->field_0x80 = object;
|
||||
|
||||
object = CreateObject(OBJECT_2A, 3, 0);
|
||||
object = CreateObject(FLAME, 3, 0);
|
||||
if (object != NULL) {
|
||||
object->type2 = super->timer;
|
||||
object->spritePriority.b0 = 3;
|
||||
@@ -397,7 +397,7 @@ void Gibdo_CreateObjects(GibdoEntity* this) {
|
||||
}
|
||||
this->field_0x84 = object;
|
||||
|
||||
object = CreateObject(OBJECT_2A, 3, 0);
|
||||
object = CreateObject(FLAME, 3, 0);
|
||||
if (object != NULL) {
|
||||
object->type2 = super->timer;
|
||||
object->spritePriority.b0 = 3;
|
||||
|
||||
+2
-2
@@ -537,7 +537,7 @@ NONMATCH("asm/non_matching/gleerok/sub_0802D86C.inc", void sub_0802D86C(GleerokE
|
||||
super->timer = 0;
|
||||
|
||||
do {
|
||||
CreateObjectWithParent(super, OBJECT_67, 0, super->timer);
|
||||
CreateObjectWithParent(super, GLEEROK_PARTICLE, 0, super->timer);
|
||||
} while (++super->timer < 8);
|
||||
|
||||
SoundReq(SFX_150);
|
||||
@@ -1021,7 +1021,7 @@ void sub_0802E1D0(GleerokEntity* this) {
|
||||
InitScreenShake(240, 0);
|
||||
} else {
|
||||
for (this->unk_7c.HALF_U.LO = 0; this->unk_7c.HALF_U.LO < 4; this->unk_7c.HALF_U.LO++) {
|
||||
CreateObjectWithParent(super, OBJECT_67, 1, this->unk_7c.HALF_U.LO);
|
||||
CreateObjectWithParent(super, GLEEROK_PARTICLE, 1, this->unk_7c.HALF_U.LO);
|
||||
}
|
||||
this->unk_74 = 0;
|
||||
this->unk_75 = 0x10;
|
||||
|
||||
@@ -617,13 +617,13 @@ void sub_080473F0(GyorgMaleEntity* this) {
|
||||
if (tmp2 < -1) {
|
||||
super->direction -= 2;
|
||||
} else {
|
||||
super->direction -= 1;
|
||||
super->direction--;
|
||||
}
|
||||
} else {
|
||||
if (tmp2 > 1) {
|
||||
super->direction += 2;
|
||||
} else {
|
||||
super->direction += 1;
|
||||
super->direction++;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1105,9 +1105,9 @@ u32 sub_08047F68(GyorgMaleEntity* this) {
|
||||
approx += 2;
|
||||
}
|
||||
if (distSquared < gUnk_080D1C04[approx]) {
|
||||
approx -= 1;
|
||||
approx--;
|
||||
} else {
|
||||
approx += 1;
|
||||
approx++;
|
||||
}
|
||||
if (distSquared < gUnk_080D1C04[approx]) {
|
||||
s32 tmp = gUnk_080D1C04[approx - 1];
|
||||
|
||||
+15
-15
@@ -12,12 +12,12 @@ extern Entity* gUnk_020000B0;
|
||||
void Keaton_OnTick(Entity*);
|
||||
void Keaton_OnCollision(Entity*);
|
||||
void Keaton_OnGrabbed(Entity*);
|
||||
void sub_08032468(Entity*);
|
||||
void sub_0803248C(Entity*);
|
||||
void sub_080324CC(Entity*);
|
||||
void sub_080324FC(Entity*);
|
||||
void sub_08032574(Entity*);
|
||||
void sub_080325C4(Entity*);
|
||||
void Keaton_Init(Entity*);
|
||||
void Keaton_Action1(Entity*);
|
||||
void Keaton_Action2(Entity*);
|
||||
void Keaton_Action3(Entity*);
|
||||
void Keaton_Action4(Entity*);
|
||||
void Keaton_Action5(Entity*);
|
||||
|
||||
static void (*const Keaton_Functions[])(Entity*) = {
|
||||
Keaton_OnTick, Keaton_OnCollision, GenericKnockback, GenericDeath, GenericConfused, Keaton_OnGrabbed,
|
||||
@@ -41,10 +41,10 @@ void Keaton(Entity* this) {
|
||||
}
|
||||
|
||||
void Keaton_OnTick(Entity* this) {
|
||||
static void (*const actionFuncs[])(Entity*) = {
|
||||
sub_08032468, sub_0803248C, sub_080324CC, sub_080324FC, sub_08032574, sub_080325C4,
|
||||
static void (*const Keaton_Actions[])(Entity*) = {
|
||||
Keaton_Init, Keaton_Action1, Keaton_Action2, Keaton_Action3, Keaton_Action4, Keaton_Action5,
|
||||
};
|
||||
actionFuncs[this->action](this);
|
||||
Keaton_Actions[this->action](this);
|
||||
}
|
||||
|
||||
void Keaton_OnCollision(Entity* this) {
|
||||
@@ -69,7 +69,7 @@ void Keaton_OnCollision(Entity* this) {
|
||||
void Keaton_OnGrabbed(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_08032468(Entity* this) {
|
||||
void Keaton_Init(Entity* this) {
|
||||
sub_0804A720(this);
|
||||
this->animationState = 0;
|
||||
InitAnimationForceUpdate(this, 0);
|
||||
@@ -77,7 +77,7 @@ void sub_08032468(Entity* this) {
|
||||
sub_08032740(this);
|
||||
}
|
||||
|
||||
void sub_0803248C(Entity* this) {
|
||||
void Keaton_Action1(Entity* this) {
|
||||
if (!sub_080325E8(this) && !sub_0803271C(this)) {
|
||||
this->timer--;
|
||||
if (this->timer == 0) {
|
||||
@@ -90,7 +90,7 @@ void sub_0803248C(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080324CC(Entity* this) {
|
||||
void Keaton_Action2(Entity* this) {
|
||||
if (!sub_080325E8(this)) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if (this->frame & ANIM_DONE) {
|
||||
@@ -100,7 +100,7 @@ void sub_080324CC(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080324FC(Entity* this) {
|
||||
void Keaton_Action3(Entity* this) {
|
||||
if (this->timer != 0) {
|
||||
this->timer--;
|
||||
if (this->timer == 0) {
|
||||
@@ -128,7 +128,7 @@ void sub_080324FC(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08032574(Entity* this) {
|
||||
void Keaton_Action4(Entity* this) {
|
||||
if (this->child && (this->child->contactFlags & 0x80)) {
|
||||
sub_0803275C(this);
|
||||
return;
|
||||
@@ -145,7 +145,7 @@ void sub_08032574(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080325C4(Entity* this) {
|
||||
void Keaton_Action5(Entity* this) {
|
||||
this->timer--;
|
||||
if ((this->timer == 0) && !sub_080325E8(this)) {
|
||||
sub_08032784(this);
|
||||
|
||||
@@ -182,7 +182,7 @@ void sub_0803A274(Entity* this) {
|
||||
pEVar1 = CreateEnemy(MAZAAL_BRACELET, 2);
|
||||
pEVar1->parent = this;
|
||||
*(Entity**)&this->field_0x74 = pEVar1;
|
||||
pEVar1 = CreateObject(OBJECT_7E, 1, 0);
|
||||
pEVar1 = CreateObject(MAZAAL_OBJECT, 1, 0);
|
||||
pEVar1->parent = this;
|
||||
pEVar1->child = this->child;
|
||||
PositionRelative(this->parent, this, Q_16_16(16.0), Q_16_16(32.0));
|
||||
@@ -193,7 +193,7 @@ void sub_0803A274(Entity* this) {
|
||||
pEVar1 = CreateEnemy(MAZAAL_BRACELET, 3);
|
||||
pEVar1->parent = this;
|
||||
*(Entity**)&this->field_0x74 = pEVar1;
|
||||
pEVar1 = CreateObject(OBJECT_7E, 2, 0);
|
||||
pEVar1 = CreateObject(MAZAAL_OBJECT, 2, 0);
|
||||
pEVar1->parent = this;
|
||||
pEVar1->child = this->child;
|
||||
this->spriteSettings.flipX = 1;
|
||||
|
||||
@@ -138,7 +138,7 @@ void sub_08033F3C(Entity* this) {
|
||||
InitializeAnimation(this, 0);
|
||||
pEVar1 = CreateEnemy(MAZAAL_HEAD, 1);
|
||||
pEVar1->parent = this;
|
||||
pEVar2 = CreateObject(OBJECT_7E, 0, 0);
|
||||
pEVar2 = CreateObject(MAZAAL_OBJECT, 0, 0);
|
||||
pEVar2->parent = this;
|
||||
if (gRoomTransition.field_0x39 == 0) {
|
||||
this->action = 0xd;
|
||||
|
||||
@@ -1058,7 +1058,7 @@ void OctorokBoss_SetAttackTimer(OctorokBossEntity* this) {
|
||||
this->unk_80 = 0;
|
||||
attackPatterns = OctorokBoss_Phase4AttackPatterns[this->phase4AttackPattern];
|
||||
this->currentAttack = attackPatterns[this->nextAttackIndex];
|
||||
this->nextAttackIndex += 1;
|
||||
this->nextAttackIndex++;
|
||||
if (this->currentAttack != END_OF_ATTACK_PATTERN) {
|
||||
return;
|
||||
}
|
||||
|
||||
+5
-5
@@ -58,7 +58,7 @@ void Pesto_OnCollision(Entity* this) {
|
||||
this->z.HALF.HI = -0x10;
|
||||
this->field_0x82.HALF.LO = 0;
|
||||
this->field_0x78.HWORD = -0x10;
|
||||
this->field_0x80.HALF.LO += 1;
|
||||
this->field_0x80.HALF.LO++;
|
||||
/* fallthrough */
|
||||
case 2:
|
||||
this->field_0x82.HALF.HI &= ~0x80;
|
||||
@@ -337,8 +337,8 @@ void sub_080244E8(Entity* this) {
|
||||
case 0:
|
||||
if (--this->timer == 0) {
|
||||
if (sub_080B1B44(COORD_TO_TILE(this), 1) == 0) {
|
||||
this->field_0x80.HALF.LO += 1;
|
||||
this->field_0x82.HALF.LO += 1;
|
||||
this->field_0x80.HALF.LO++;
|
||||
this->field_0x82.HALF.LO++;
|
||||
this->subtimer = 0;
|
||||
this->speed = 0;
|
||||
} else {
|
||||
@@ -426,7 +426,7 @@ void sub_080244E8(Entity* this) {
|
||||
if (EntityInRectRadius(this, this->child, 6, 6)) {
|
||||
Entity* ent;
|
||||
|
||||
this->field_0x80.HALF.LO += 1;
|
||||
this->field_0x80.HALF.LO++;
|
||||
this->timer = 12;
|
||||
this->field_0x82.HALF.HI &= ~0x80;
|
||||
ent = this->child;
|
||||
@@ -480,7 +480,7 @@ void sub_080244E8(Entity* this) {
|
||||
}
|
||||
break;
|
||||
case 1 ... 2:
|
||||
this->field_0x80.HALF.LO += 1;
|
||||
this->field_0x80.HALF.LO++;
|
||||
this->timer = 192;
|
||||
this->subtimer = 8;
|
||||
this->speed = 0x80;
|
||||
|
||||
@@ -84,7 +84,7 @@ void Puffstool_OnCollide(Entity* this) {
|
||||
break;
|
||||
default:
|
||||
if (this->hitType == 0x82 && this->iframes < 0) {
|
||||
Entity* ent = CreateObject(OBJECT_21, 2, 0);
|
||||
Entity* ent = CreateObject(DIRT_PARTICLE, 2, 0);
|
||||
if (ent != NULL) {
|
||||
ent->spritePriority.b0 = 3;
|
||||
CopyPosition(this, ent);
|
||||
@@ -335,7 +335,7 @@ void sub_080255AC(Entity* this) {
|
||||
|
||||
tmp = Random() & 0xf;
|
||||
if (tmp < 8) {
|
||||
tmp -= 1;
|
||||
tmp--;
|
||||
}
|
||||
tmp -= 7;
|
||||
|
||||
@@ -551,7 +551,7 @@ void sub_08025B18(Entity* this) {
|
||||
for (; i < 9; i++, offset += 2) {
|
||||
sub_08025AB8((((x + offset[0]) >> 4) & 0x3fU) | ((((y + offset[1]) >> 4) & 0x3fU) << 6), layer);
|
||||
|
||||
ent = CreateObject(OBJECT_21, 2, 0);
|
||||
ent = CreateObject(DIRT_PARTICLE, 2, 0);
|
||||
if (ent != NULL) {
|
||||
PositionRelative(this, ent, Q_16_16(offset[0]), Q_16_16(offset[1]));
|
||||
ent->x.HALF.HI &= -0x10;
|
||||
@@ -565,7 +565,7 @@ void sub_08025B18(Entity* this) {
|
||||
|
||||
void sub_08025BD4(Entity* this) {
|
||||
if (this->field_0x82.HALF.LO && (this->frame & 1) == 0) {
|
||||
Entity* ent = CreateObject(OBJECT_21, 0, 0);
|
||||
Entity* ent = CreateObject(DIRT_PARTICLE, 0, 0);
|
||||
if (ent != NULL) {
|
||||
PositionRelative(this, ent, Q_16_16(gUnk_080CC0BA[this->animationState * 2 + 0]),
|
||||
Q_16_16(gUnk_080CC0BA[this->animationState * 2 + 1]));
|
||||
|
||||
@@ -235,7 +235,7 @@ void sub_08033B44(SpinyBeetleEntity* this) {
|
||||
this->tileIndex = GetTileIndex(this->tile, super->collisionLayer);
|
||||
|
||||
if (this->tileIndex != 0x4022) {
|
||||
stop += 1;
|
||||
stop++;
|
||||
} else {
|
||||
switch (DirectionRound(super->direction) >> 2) {
|
||||
case 0:
|
||||
|
||||
@@ -60,7 +60,7 @@ void TreeItem(Entity* this) {
|
||||
}
|
||||
break;
|
||||
case 0 ...(FAIRY_INDEX - 1):
|
||||
itemEntity = CreateObject(OBJECT_96, 0x7, gTreeItemDrops[this->field_0x68.HALF.LO]);
|
||||
itemEntity = CreateObject(GRAVEYARD_KEY, 0x7, gTreeItemDrops[this->field_0x68.HALF.LO]);
|
||||
if (itemEntity) {
|
||||
CopyPosition(this, itemEntity);
|
||||
itemEntity->y.HALF.HI += 16;
|
||||
|
||||
@@ -486,12 +486,12 @@ static void sub_08042B20(Entity* this) {
|
||||
entity = ((VaatiArm_HeapStruct*)this->myHeap)->entities[i];
|
||||
if ((-0xa <= entity->z.HALF.HI) && ((entity->spriteSettings.draw) == 1)) {
|
||||
if (i == 0) {
|
||||
object = CreateObject(OBJECT_AF, 0, 0);
|
||||
object = CreateObject(VAATI3_ARM, 0, 0);
|
||||
if (object != NULL) {
|
||||
object->parent = ((VaatiArm_HeapStruct*)this->myHeap)->entities[4];
|
||||
}
|
||||
*(Entity**)&((VaatiArm_HeapStruct*)this->myHeap)->entities[4]->field_0x68 = object;
|
||||
object = CreateObject(OBJECT_AF, 2, 0);
|
||||
object = CreateObject(VAATI3_ARM, 2, 0);
|
||||
if (object != NULL) {
|
||||
CopyPosition(((VaatiArm_HeapStruct*)this->myHeap)->entities[4], object);
|
||||
}
|
||||
@@ -582,7 +582,7 @@ static void sub_08042D24(Entity* this) {
|
||||
this->subAction = 2;
|
||||
this->hitType = 0x3d;
|
||||
((VaatiArm_HeapStruct*)this->myHeap)->entities[1]->hitType = 0x3d;
|
||||
entity = CreateObject(OBJECT_AF, 1, 0);
|
||||
entity = CreateObject(VAATI3_ARM, 1, 0);
|
||||
if (entity != NULL) {
|
||||
entity->parent = ((VaatiArm_HeapStruct*)this->myHeap)->entities[3];
|
||||
}
|
||||
@@ -602,7 +602,7 @@ static void sub_08042D6C(Entity* this) {
|
||||
if (i != 2) {
|
||||
entity->flags = entity->flags | ENT_COLLIDE;
|
||||
}
|
||||
if ((entity->spriteSettings.draw == 0u) && (object = CreateObject(OBJECT_AF, 2, 0), object != NULL)) {
|
||||
if ((entity->spriteSettings.draw == 0u) && (object = CreateObject(VAATI3_ARM, 2, 0), object != NULL)) {
|
||||
CopyPosition(entity, object);
|
||||
SoundReq(SFX_166);
|
||||
}
|
||||
@@ -796,7 +796,7 @@ static void sub_08043130(Entity* this) {
|
||||
for (i = 1; i < 4; i++) {
|
||||
ptr = &((VaatiArm_HeapStruct*)this->myHeap)->s1[i];
|
||||
if (ptr->unk04.HALF.HI != 0) {
|
||||
ptr->unk04.HALF.HI -= 1;
|
||||
ptr->unk04.HALF.HI--;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -1276,9 +1276,9 @@ static void sub_08043C40(Entity* this, VaatiArm_HeapStruct1* heapStruct) {
|
||||
iVar3 = (u8*)(int)((VaatiArm_HeapStruct*)this->myHeap) + offset;
|
||||
if (puVar6[i] != iVar3[0xc]) {
|
||||
if (puVar6[i] < iVar3[0xc]) {
|
||||
iVar3[0xc] -= 1;
|
||||
iVar3[0xc]--;
|
||||
} else {
|
||||
iVar3[0xc] += 1;
|
||||
iVar3[0xc]++;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1412,7 +1412,7 @@ static void sub_08043EB8(Entity* this) {
|
||||
pEVar4->collisionFlags = pEVar4->collisionFlags & 0xef;
|
||||
pEVar4->hitType = 0x3a;
|
||||
pEVar4->hitbox = (Hitbox*)&gUnk_080FD450;
|
||||
pEVar4 = CreateObject(OBJECT_AF, 0, 0);
|
||||
pEVar4 = CreateObject(VAATI3_ARM, 0, 0);
|
||||
if (pEVar4 != NULL) {
|
||||
pEVar4->parent = ((VaatiArm_HeapStruct*)this->myHeap)->entities[3];
|
||||
}
|
||||
|
||||
@@ -181,7 +181,7 @@ void VaatiEyesMacroFunction0Type2(Entity* this) {
|
||||
}
|
||||
}
|
||||
this->y.HALF.HI++;
|
||||
this->spriteOffsetY -= 1;
|
||||
this->spriteOffsetY--;
|
||||
}
|
||||
|
||||
void VaatiEyesMacroFunction0Type3(Entity* this) {
|
||||
|
||||
@@ -186,21 +186,21 @@ void VaatiTransfiguredType0Action1(Entity* this) {
|
||||
break;
|
||||
case 0:
|
||||
if (--this->timer == 0) {
|
||||
this->field_0x80.HALF.LO += 1;
|
||||
this->field_0x80.HALF.LO++;
|
||||
this->speed = 0x180;
|
||||
this->timer = 20;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (--this->timer == 0) {
|
||||
this->field_0x80.HALF.LO += 1;
|
||||
this->field_0x80.HALF.LO++;
|
||||
this->speed = 0xc0;
|
||||
this->timer = 12;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (--this->timer == 0) {
|
||||
this->field_0x80.HALF.LO += 1;
|
||||
this->field_0x80.HALF.LO++;
|
||||
this->speed = 0;
|
||||
if (this->animationState < 2) {
|
||||
this->timer = (Random() & 0x7f) + 64;
|
||||
@@ -240,7 +240,7 @@ void VaatiTransfiguredType0Action1(Entity* this) {
|
||||
|
||||
if (--this->field_0x82.HALF.LO == 0) {
|
||||
this->field_0x82.HALF.LO = 4;
|
||||
object = CreateObject(OBJECT_9B, 0, ((this->direction + 0x12) & 0x1c) >> 2);
|
||||
object = CreateObject(VAATI2_PARTICLE, 0, ((this->direction + 0x12) & 0x1c) >> 2);
|
||||
if (object != NULL) {
|
||||
object->parent = this;
|
||||
object->x.HALF.HI += (Random() & 0xf) - 7;
|
||||
@@ -347,7 +347,7 @@ void VaatiTransfiguredType0Action3(Entity* this) {
|
||||
this->field_0x86.HALF.LO = 0;
|
||||
sub_080408EC(this);
|
||||
} else {
|
||||
if (((this->timer & 1) != 0) && (pEVar3 = CreateObject(OBJECT_9B, 1, 0xff), pEVar3 != NULL)) {
|
||||
if (((this->timer & 1) != 0) && (pEVar3 = CreateObject(VAATI2_PARTICLE, 1, 0xff), pEVar3 != NULL)) {
|
||||
pEVar3->parent = this;
|
||||
CopyPosition(this, pEVar3);
|
||||
pEVar3->x.HALF.HI += (Random() & 0xf) - 7;
|
||||
@@ -376,7 +376,7 @@ void VaatiTransfiguredType0Action4(Entity* this) {
|
||||
switch (this->field_0x80.HALF.LO) {
|
||||
case 0:
|
||||
if (--this->timer == 0) {
|
||||
this->field_0x80.HALF.LO += 1;
|
||||
this->field_0x80.HALF.LO++;
|
||||
this->field_0x74.HALF.LO = 0;
|
||||
this->timer = 128;
|
||||
this->subtimer = 0;
|
||||
@@ -387,7 +387,7 @@ void VaatiTransfiguredType0Action4(Entity* this) {
|
||||
case 1:
|
||||
if (GravityUpdate(this, Q_8_8(40)) != 0)
|
||||
break;
|
||||
this->field_0x80.HALF.LO += 1;
|
||||
this->field_0x80.HALF.LO++;
|
||||
switch (this->cutsceneBeh.HALF.LO) {
|
||||
case 1:
|
||||
case 3:
|
||||
@@ -409,7 +409,7 @@ void VaatiTransfiguredType0Action4(Entity* this) {
|
||||
break;
|
||||
case 2:
|
||||
if (--this->timer == 0) {
|
||||
this->field_0x80.HALF.LO += 1;
|
||||
this->field_0x80.HALF.LO++;
|
||||
this->timer = gUnk_080D0ABF[((u32)this->animationState << 1 | 1)];
|
||||
} else {
|
||||
if ((this->timer & 7) == 0) {
|
||||
@@ -444,7 +444,7 @@ void VaatiTransfiguredType0Action5(Entity* this) {
|
||||
switch (this->field_0x80.HALF.LO) {
|
||||
case 0:
|
||||
if (--this->timer == 0) {
|
||||
this->field_0x80.HALF.LO += 1;
|
||||
this->field_0x80.HALF.LO++;
|
||||
this->timer = 64;
|
||||
if (1 < this->animationState) {
|
||||
this->timer = 128;
|
||||
@@ -454,7 +454,7 @@ void VaatiTransfiguredType0Action5(Entity* this) {
|
||||
break;
|
||||
case 1:
|
||||
if (--this->timer == 0) {
|
||||
this->field_0x80.HALF.LO += 1;
|
||||
this->field_0x80.HALF.LO++;
|
||||
this->timer = gUnk_080D0ABF[(this->animationState << 1 | 1)];
|
||||
} else {
|
||||
if (this->subtimer) {
|
||||
@@ -497,7 +497,7 @@ void VaatiTransfiguredType0Action6(Entity* this) {
|
||||
switch (this->field_0x80.HALF.LO) {
|
||||
case 0:
|
||||
if (--this->timer == 0) {
|
||||
this->field_0x80.HALF.LO += 1;
|
||||
this->field_0x80.HALF.LO++;
|
||||
this->timer = 128;
|
||||
if (1 < this->animationState) {
|
||||
this->subtimer = 1;
|
||||
@@ -506,7 +506,7 @@ void VaatiTransfiguredType0Action6(Entity* this) {
|
||||
break;
|
||||
case 1:
|
||||
if (--this->timer == 0) {
|
||||
this->field_0x80.HALF.LO += 1;
|
||||
this->field_0x80.HALF.LO++;
|
||||
this->timer = gUnk_080D0ABF[(this->animationState << 1) | 1];
|
||||
} else {
|
||||
if (this->subtimer) {
|
||||
@@ -746,7 +746,7 @@ void VaatiTransfiguredType4Action1(Entity* this) {
|
||||
}
|
||||
} else {
|
||||
if (this->field_0x80.HALF.LO == 0) {
|
||||
this->field_0x80.HALF.LO += 1;
|
||||
this->field_0x80.HALF.LO++;
|
||||
this->spriteSettings.draw = 1;
|
||||
}
|
||||
if (--this->timer == 0) {
|
||||
@@ -781,7 +781,7 @@ void VaatiTransfiguredType5Action1(Entity* this) {
|
||||
if (this->parent->action != 6) {
|
||||
return;
|
||||
}
|
||||
this->field_0x80.HALF.LO += 1;
|
||||
this->field_0x80.HALF.LO++;
|
||||
this->spriteSettings.draw = 1;
|
||||
InitializeAnimation(this, 1);
|
||||
break;
|
||||
@@ -815,7 +815,7 @@ void VaatiTransfiguredType5Action2(Entity* this) {
|
||||
if (this->field_0x80.HALF.LO == 0) {
|
||||
if (this->parent->parent->action != 6) {
|
||||
if ((this->frame & ANIM_DONE) != 0) {
|
||||
this->field_0x80.HALF.LO += 1;
|
||||
this->field_0x80.HALF.LO++;
|
||||
InitializeAnimation(this, 3);
|
||||
}
|
||||
}
|
||||
@@ -904,7 +904,7 @@ void sub_08040770(Entity* this) {
|
||||
if (EntityWithinDistance(this, tmp5, tmp6, 0x1c)) {
|
||||
if (this->animationState != 2) {
|
||||
if (tmp & 8) {
|
||||
tmp2 += 1;
|
||||
tmp2++;
|
||||
} else {
|
||||
tmp2 += 3;
|
||||
}
|
||||
@@ -936,7 +936,7 @@ void sub_08040770(Entity* this) {
|
||||
} else {
|
||||
if (this->field_0x86.HALF.HI & 0x7f) {
|
||||
if (this->field_0x86.HALF.HI & 0x80) {
|
||||
tmp2 += 1;
|
||||
tmp2++;
|
||||
} else {
|
||||
tmp2 += 3;
|
||||
}
|
||||
@@ -952,7 +952,7 @@ void sub_08040770(Entity* this) {
|
||||
}
|
||||
this->field_0x86.HALF.HI = tmp3;
|
||||
if (tmp3 & 0x80) {
|
||||
tmp2 += 1;
|
||||
tmp2++;
|
||||
} else {
|
||||
tmp2 += 3;
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ void VaatiTransfiguredEye_OnCollision(Entity* this) {
|
||||
|
||||
if (this->field_0x80.HALF.HI == 0) {
|
||||
this->action = 3;
|
||||
this->field_0x80.HALF.HI += 1;
|
||||
this->field_0x80.HALF.HI++;
|
||||
InitializeAnimation(this, (this->type << 3) | (this->timer + 2));
|
||||
InitializeAnimation(this->parent, (this->parent->type << 3) | (this->timer + 2));
|
||||
}
|
||||
@@ -80,7 +80,7 @@ void VaatiTransfiguredEye_OnCollision(Entity* this) {
|
||||
if (this->timer != 0 && (pEVar4->field_0x80.HALF.HI != 0)) {
|
||||
pEVar4->field_0x76.HALF.LO |= (1 << this->type2);
|
||||
if (this->cutsceneBeh.HALF.HI == 0) {
|
||||
this->cutsceneBeh.HALF.HI += 1;
|
||||
this->cutsceneBeh.HALF.HI++;
|
||||
InitializeAnimation(this, this->type << 3 | 6);
|
||||
InitializeAnimation(this->parent, this->parent->type << 3 | 6);
|
||||
}
|
||||
|
||||
@@ -327,7 +327,7 @@ void VaatiWrathType0Action5(Entity* this) {
|
||||
if (this->field_0x78.HALF.HI == 0) {
|
||||
if (this->subAction == 2) {
|
||||
if ((gRoomTransition.field_0x39 & 3) == 0) {
|
||||
object = CreateObject(OBJECT_B5, 0, 0);
|
||||
object = CreateObject(VAATI3_PLAYER_OBJECT, 0, 0);
|
||||
if (object != NULL) {
|
||||
object->parent = this;
|
||||
((VaatiWrathHeapStruct*)this->myHeap)->object5b = object;
|
||||
@@ -639,10 +639,10 @@ void sub_08041D14(Entity* this) {
|
||||
this->timer--;
|
||||
} else {
|
||||
if (gEntCount < 0x46) {
|
||||
pEVar1 = CreateObject(OBJECT_B6, 0, 0);
|
||||
pEVar1 = CreateObject(VAATI3_DEATH, 0, 0);
|
||||
pEVar1->parent = this;
|
||||
this->child = pEVar1;
|
||||
pEVar1 = CreateObject(OBJECT_B6, 1, 0);
|
||||
pEVar1 = CreateObject(VAATI3_DEATH, 1, 0);
|
||||
pEVar1->parent = this;
|
||||
this->subAction = 3;
|
||||
this->timer = 150;
|
||||
@@ -680,7 +680,7 @@ void sub_08041D84(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_08041E20(Entity* this) {
|
||||
this->subtimer += 1;
|
||||
this->subtimer++;
|
||||
sub_08041E78(this);
|
||||
GetNextFrame(((VaatiWrathHeapStruct*)this->myHeap)->type2);
|
||||
if (gFadeControl.active == 0) {
|
||||
@@ -1052,7 +1052,7 @@ void VaatiWrathType2(Entity* this) {
|
||||
InitializeAnimation(this, 0x12);
|
||||
}
|
||||
sub_0806FA90(((VaatiWrathHeapStruct*)this->myHeap)->type0, this, 0, -1);
|
||||
this->spriteOffsetY += 1;
|
||||
this->spriteOffsetY++;
|
||||
if (this->animIndex == 0x12) {
|
||||
uVar1 = GetFacingDirection(this, &gPlayerEntity);
|
||||
this->x.HALF.HI = gUnk_080D0EB0[uVar1] + this->x.HALF.HI;
|
||||
@@ -1069,6 +1069,6 @@ void VaatiWrathType3(Entity* this) {
|
||||
InitializeAnimation(this, 0x1c);
|
||||
}
|
||||
sub_0806FA90(((VaatiWrathHeapStruct*)this->myHeap)->type0, this, 0, -1);
|
||||
this->spriteOffsetY += 1;
|
||||
this->spriteOffsetY++;
|
||||
GetNextFrame(this);
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ void sub_0802A250(Entity* this) {
|
||||
InitializeAnimation(this, 0);
|
||||
UpdateSpriteForCollisionLayer(this);
|
||||
|
||||
ent = CreateObject(OBJECT_66, 0, 0);
|
||||
ent = CreateObject(WATER_DROP_OBJECT, 0, 0);
|
||||
if (ent != NULL) {
|
||||
ent->parent = this;
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ void WizzrobeIce_OnCollision(WizzrobeEntity* this) {
|
||||
}
|
||||
EnemyFunctionHandlerAfterCollision(super, WizzrobeIce_Functions);
|
||||
if (super->contactFlags == 0x87) {
|
||||
Entity* obj = CreateObject(OBJECT_2A, 3, 0);
|
||||
Entity* obj = CreateObject(FLAME, 3, 0);
|
||||
if (obj != NULL) {
|
||||
obj->spritePriority.b0 = 3;
|
||||
obj->spriteOffsetY = -4;
|
||||
@@ -99,7 +99,7 @@ void WizzrobeIce_Action2(WizzrobeEntity* this) {
|
||||
case 0:
|
||||
switch (--super->timer) {
|
||||
case 0:
|
||||
this->timer2 += 1;
|
||||
this->timer2++;
|
||||
super->timer = 56;
|
||||
super->subtimer = 0;
|
||||
super->child->spriteSettings.draw = 0;
|
||||
|
||||
@@ -37,7 +37,7 @@ void WizzrobeWind_OnCollision(WizzrobeEntity* this) {
|
||||
}
|
||||
EnemyFunctionHandlerAfterCollision(super, WizzrobeWind_Functions);
|
||||
if (super->contactFlags == 0x87) {
|
||||
Entity* obj = CreateObject(OBJECT_2A, 3, 0);
|
||||
Entity* obj = CreateObject(FLAME, 3, 0);
|
||||
if (obj != NULL) {
|
||||
obj->spritePriority.b0 = 3;
|
||||
obj->spriteOffsetY = -4;
|
||||
|
||||
Reference in New Issue
Block a user