mirror of
https://github.com/zeldaret/tmc
synced 2026-08-16 13:17:13 -04:00
Use projectile enum when possible
This commit is contained in:
@@ -41,7 +41,7 @@ void sub_080AB074(Entity* this) {
|
||||
|
||||
this->z.HALF.HI += (s8)parent->field_0x7c.BYTES.byte3;
|
||||
if (parent->field_0x7a.HALF.HI != 0) {
|
||||
parent = CreateProjectile(0x19);
|
||||
parent = CreateProjectile(BALL_AND_CHAIN);
|
||||
if (parent != NULL) {
|
||||
parent->type = 4;
|
||||
CopyPositionAndSpriteOffset(this, parent);
|
||||
@@ -55,13 +55,13 @@ bool32 sub_080AB12C(Entity* this) {
|
||||
if (gEntCount > 0x44) {
|
||||
return FALSE;
|
||||
}
|
||||
entity = CreateProjectile(0x19);
|
||||
entity = CreateProjectile(BALL_AND_CHAIN);
|
||||
entity->type = 1;
|
||||
entity->parent = this;
|
||||
entity = CreateProjectile(0x19);
|
||||
entity = CreateProjectile(BALL_AND_CHAIN);
|
||||
entity->type = 2;
|
||||
entity->parent = this;
|
||||
entity = CreateProjectile(0x19);
|
||||
entity = CreateProjectile(BALL_AND_CHAIN);
|
||||
entity->type = 3;
|
||||
entity->parent = this;
|
||||
return TRUE;
|
||||
|
||||
@@ -33,7 +33,7 @@ void GuardLineOfSight(Entity* this) {
|
||||
} else {
|
||||
if (sub_080644C8(this) != 0) {
|
||||
if (((this->actionDelay++) & 3) == 0) {
|
||||
entity = CreateProjectile(0xc);
|
||||
entity = CreateProjectile(GUARD_LINE_OF_SIGHT);
|
||||
if (entity != NULL) {
|
||||
entity->type = 1;
|
||||
tmp = this->parent->knockbackDirection;
|
||||
|
||||
@@ -138,20 +138,20 @@ NONMATCH("asm/non_matching/gyorgTail/sub_080AC5E4.inc", bool32 sub_080AC5E4(Enti
|
||||
return 0;
|
||||
}
|
||||
this->field_0x78.HALF.HI = 0x11;
|
||||
entity = CreateProjectile(0x22);
|
||||
entity = CreateProjectile(GYORG_TAIL);
|
||||
entity->type = this->type;
|
||||
entity->type2 = 1;
|
||||
entity->parent = this->parent;
|
||||
entity->field_0x78.HALF.HI = 0x12;
|
||||
this->child = entity;
|
||||
entity2 = CreateProjectile(0x22);
|
||||
entity2 = CreateProjectile(GYORG_TAIL);
|
||||
entity2->type = this->type;
|
||||
entity2->type2 = 2;
|
||||
entity2->parent = this->parent;
|
||||
entity2->field_0x78.HALF.HI = 0x14;
|
||||
uVar3 = entity2->field_0x78.HALF.HI;
|
||||
entity->child = entity2;
|
||||
entity3 = CreateProjectile(0x22);
|
||||
entity3 = CreateProjectile(GYORG_TAIL);
|
||||
entity3->type = this->type;
|
||||
entity3->type2 = 3;
|
||||
entity3->parent = this->parent;
|
||||
@@ -163,14 +163,14 @@ NONMATCH("asm/non_matching/gyorgTail/sub_080AC5E4.inc", bool32 sub_080AC5E4(Enti
|
||||
return 0;
|
||||
}
|
||||
this->field_0x78.HALF.HI = 0xf;
|
||||
entity = CreateProjectile(0x22);
|
||||
entity = CreateProjectile(GYORG_TAIL);
|
||||
entity->type = this->type;
|
||||
entity->type2 = 1;
|
||||
entity->parent = this->parent;
|
||||
entity->field_0x78.HALF.HI = 0x10;
|
||||
uVar3 = entity->field_0x78.HALF.HI;
|
||||
this->child = entity;
|
||||
entity2 = CreateProjectile(0x22);
|
||||
entity2 = CreateProjectile(GYORG_TAIL);
|
||||
entity2->type = this->type;
|
||||
entity2->type2 = 2;
|
||||
entity2->parent = this->parent;
|
||||
@@ -178,7 +178,7 @@ NONMATCH("asm/non_matching/gyorgTail/sub_080AC5E4.inc", bool32 sub_080AC5E4(Enti
|
||||
entity2->field_0x78.HALF.HI = 0x20;
|
||||
entity->child = entity2;
|
||||
}
|
||||
entity4 = CreateProjectile(0x22);
|
||||
entity4 = CreateProjectile(GYORG_TAIL);
|
||||
entity4->type = this->type;
|
||||
entity4->type2 = 4;
|
||||
entity4->parent = this->parent;
|
||||
|
||||
@@ -129,7 +129,7 @@ void V1DarkMagicProjectile_Init(Entity* this) {
|
||||
this->direction = GetFacingDirection(this, &gPlayerEntity);
|
||||
this->field_0x86.HALF.LO = 0;
|
||||
this->cutsceneBeh.HWORD = 300;
|
||||
entity = CreateProjectile(0x18);
|
||||
entity = CreateProjectile(V1_DARK_MAGIC_PROJECTILE);
|
||||
if (entity != NULL) {
|
||||
entity->type = 1;
|
||||
entity->type2 = this->type2;
|
||||
|
||||
@@ -94,7 +94,7 @@ END_NONMATCH
|
||||
void sub_080AB844(Entity* this, s32 param_1, s32 param_2) {
|
||||
Entity* entity;
|
||||
|
||||
entity = CreateProjectile(0x1c);
|
||||
entity = CreateProjectile(V1_EYE_LASER);
|
||||
if (entity != NULL) {
|
||||
entity->type = 1;
|
||||
entity->actionDelay = param_1;
|
||||
|
||||
@@ -149,7 +149,7 @@ void sub_080AC200(Entity* this) {
|
||||
return;
|
||||
|
||||
this->actionDelay = 0x10;
|
||||
proj = CreateProjectile(0x21);
|
||||
proj = CreateProjectile(V3_ELECTRIC_PROJECTILE);
|
||||
|
||||
if (proj) {
|
||||
proj->type = 2;
|
||||
|
||||
@@ -32,7 +32,7 @@ void Winder_Init(Entity* this) {
|
||||
}
|
||||
InitializeAnimation(this, 0);
|
||||
if (this->type < 4) {
|
||||
entity = CreateProjectile(0x1d);
|
||||
entity = CreateProjectile(WINDER);
|
||||
entity->type = this->type + 1;
|
||||
entity->parent = this->parent;
|
||||
entity->child = this;
|
||||
|
||||
Reference in New Issue
Block a user