diff options
| author | theo3 <arisstephenson2@gmail.com> | 2021-10-26 20:33:33 -0700 |
|---|---|---|
| committer | theo3 <arisstephenson2@gmail.com> | 2021-10-26 20:33:33 -0700 |
| commit | d29468c30bcf5d786e4d97446d8d3512063c71bc (patch) | |
| tree | c2b34a84ba0a7e9ccbabf03eaf66092d8695b604 /src/projectile | |
| parent | 3f5449c1a1aed612e5b2c1190699bafef2603241 (diff) | |
add effects.h
Diffstat (limited to 'src/projectile')
| -rw-r--r-- | src/projectile/cannonballProjectile.c | 7 | ||||
| -rw-r--r-- | src/projectile/dirtBallProjectile.c | 9 | ||||
| -rw-r--r-- | src/projectile/gleerokProjectile.c | 3 | ||||
| -rw-r--r-- | src/projectile/lakituCloudProjectile.c | 5 | ||||
| -rw-r--r-- | src/projectile/lakituLightning.c | 3 | ||||
| -rw-r--r-- | src/projectile/octorokBossProjectile.c | 5 | ||||
| -rw-r--r-- | src/projectile/stalfosProjectile.c | 5 | ||||
| -rw-r--r-- | src/projectile/v2Projectile.c | 7 | ||||
| -rw-r--r-- | src/projectile/v3TennisBallProjectile.c | 3 |
9 files changed, 28 insertions, 19 deletions
diff --git a/src/projectile/cannonballProjectile.c b/src/projectile/cannonballProjectile.c index 8c6e7da4..150d5fe3 100644 --- a/src/projectile/cannonballProjectile.c +++ b/src/projectile/cannonballProjectile.c @@ -1,6 +1,7 @@ #include "entity.h" #include "enemy.h" #include "functions.h" +#include "effects.h" extern void CreateItemOnGround(Entity*); extern s32 sub_080AF090(Entity*); @@ -46,7 +47,7 @@ void CannonballProjectile_Init(Entity* this) { void CannonballProjectile_Action1(Entity* this) { GetNextFrame(this); if (sub_080AF090(this) == 0) { - CreateFx(this, 2, 0); + CreateFx(this, FX_DEATH, 0); DeleteThisEntity(); } sub_080AB5F4(this); @@ -56,7 +57,7 @@ void CannonballProjectile_Action2(Entity* this) { GetNextFrame(this); sub_080AF090(this); if ((sub_080AB634(this) == 0) && (this->collisions != 0)) { - CreateFx(this, 2, 0); + CreateFx(this, FX_DEATH, 0); DeleteThisEntity(); } } @@ -85,7 +86,7 @@ bool32 sub_080AB634(Entity* this) { entities[i]->action = 3; entities[i]->actionDelay = 0x1e; entities[i]->spriteSettings.b.draw = 0; - CreateFx(entities[i], 0x45, 0); + CreateFx(entities[i], FX_WHITE_ROCK, 0); } DeleteEntity(this); return TRUE; diff --git a/src/projectile/dirtBallProjectile.c b/src/projectile/dirtBallProjectile.c index fd2765e7..371473da 100644 --- a/src/projectile/dirtBallProjectile.c +++ b/src/projectile/dirtBallProjectile.c @@ -3,6 +3,7 @@ #include "player.h" #include "coord.h" #include "functions.h" +#include "effects.h" extern void sub_08078954(Entity*); @@ -129,13 +130,13 @@ void DirtBallProjectile_Action2(Entity* this) { if (tmp != 0) { switch (tmp) { case 2: - CreateFx(this, 0xb, 0); + CreateFx(this, FX_WATER_SPLASH, 0); break; case 1: - CreateFx(this, 0, 0); + CreateFx(this, FX_FALL_DOWN, 0); break; case 3: - CreateFx(this, 0xc, 0); + CreateFx(this, FX_LAVA_SPLASH, 0); break; } DeleteThisEntity(); @@ -148,7 +149,7 @@ void DirtBallProjectile_Action2(Entity* this) { this->action = 3; return; case 2: - entity = CreateFx(this, 5, 0x80); + entity = CreateFx(this, FX_POT_SHATTER, 0x80); if (entity != NULL) { entity->parent = NULL; } diff --git a/src/projectile/gleerokProjectile.c b/src/projectile/gleerokProjectile.c index 287b0013..d8eeff71 100644 --- a/src/projectile/gleerokProjectile.c +++ b/src/projectile/gleerokProjectile.c @@ -5,6 +5,7 @@ #include "functions.h" #include "random.h" #include "audio.h" +#include "effects.h" extern void sub_0806F5BC(Entity*, u32, u32); extern u32 sub_080041DC(Entity*, u32, u32); @@ -90,7 +91,7 @@ void GleerokProjectile_Action1(Entity* this) { if (this->type == 3) { if (sub_08003FC4(this, 0x1800) == 0) { sub_08008790(this, 7); - CreateFx(this, 4, 0); + CreateFx(this, FX_ROCK, 0); DeleteThisEntity(); } } else { diff --git a/src/projectile/lakituCloudProjectile.c b/src/projectile/lakituCloudProjectile.c index 76ac9ea5..25599826 100644 --- a/src/projectile/lakituCloudProjectile.c +++ b/src/projectile/lakituCloudProjectile.c @@ -2,6 +2,7 @@ #include "enemy.h" #include "functions.h" #include "player.h" +#include "effects.h" extern void sub_0800449C(Entity*, u32); extern void sub_08079D84(void); @@ -26,7 +27,7 @@ void nullsub_539(Entity* this) { void sub_080A9CF0(Entity* this) { if (sub_0806F520() == 0) { - CreateFx(this, 2, 0); + CreateFx(this, FX_DEATH, 0); DeleteThisEntity(); } LakituCloudProjectile_SubActions[this->subAction](this); @@ -46,7 +47,7 @@ void LakituCloudProjectile_SubAction2(Entity* this) { sub_0800449C(&gPlayerEntity, 0x7a); sub_08079D84(); } - CreateFx(this, 2, 0); + CreateFx(this, FX_DEATH, 0); DeleteThisEntity(); } } diff --git a/src/projectile/lakituLightning.c b/src/projectile/lakituLightning.c index 8d055ba6..975491c2 100644 --- a/src/projectile/lakituLightning.c +++ b/src/projectile/lakituLightning.c @@ -1,5 +1,6 @@ #include "entity.h" #include "enemy.h" +#include "effects.h" extern s32 sub_080AF090(Entity*); extern s32 sub_080A7EB0(Entity*); @@ -35,7 +36,7 @@ void LakituLightning_Action1(Entity* this) { GetNextFrame(this); sub_080AF090(this); if ((this->collisions != 0) || (--this->actionDelay == 0)) { - CreateFx(this, 0x4f, 0); + CreateFx(this, FX_BLUE_EFC, 0); DeleteThisEntity(); } if (sub_080A7EB0(this) != 0) { diff --git a/src/projectile/octorokBossProjectile.c b/src/projectile/octorokBossProjectile.c index 5d41b4f1..6f677525 100644 --- a/src/projectile/octorokBossProjectile.c +++ b/src/projectile/octorokBossProjectile.c @@ -3,6 +3,7 @@ #include "random.h" #include "functions.h" #include "audio.h" +#include "effects.h" void OctorokBossProjectile_Action2(Entity*); extern void sub_080AE58C(Entity*, u32, u32); @@ -183,14 +184,14 @@ void OctorokBossProjectile_Action1(Entity* this) { if (sub_08003FC4(this, 0x1800) != 0) { return; } - CreateFx(this, 4, 0); + CreateFx(this, FX_ROCK, 0); DeleteThisEntity(); break; } } void OctorokBossProjectile_Action2(Entity* this) { - CreateFx(this, 4, 0); + CreateFx(this, FX_ROCK, 0); DeleteThisEntity(); } diff --git a/src/projectile/stalfosProjectile.c b/src/projectile/stalfosProjectile.c index c743fcbc..0c48006f 100644 --- a/src/projectile/stalfosProjectile.c +++ b/src/projectile/stalfosProjectile.c @@ -1,6 +1,7 @@ #include "entity.h" #include "enemy.h" #include "functions.h" +#include "effects.h" extern void (*const StalfosProjectile_Functions[])(Entity*); extern void (*const StalfosProjectile_Actions[])(Entity*); @@ -126,9 +127,9 @@ void StalfosProjectile_Action3(Entity* this) { void sub_080A9BA8(Entity* this) { if (this->type == 0) { - CreateFx(this, 5, 0); + CreateFx(this, FX_POT_SHATTER, 0); } else { - CreateFx(this, 0x3c, 0); + CreateFx(this, FX_BONE, 0); } DeleteThisEntity(); } diff --git a/src/projectile/v2Projectile.c b/src/projectile/v2Projectile.c index 0420790b..ffb558a1 100644 --- a/src/projectile/v2Projectile.c +++ b/src/projectile/v2Projectile.c @@ -4,6 +4,7 @@ #include "functions.h" #include "random.h" #include "audio.h" +#include "effects.h" extern void (*const V2Projectile_Functions[])(Entity*); extern void (*const gUnk_0812A7EC[])(Entity*); @@ -26,7 +27,7 @@ ASM_FUNC("asm/non_matching/v2Projectile/sub_080ABBF4.inc", void sub_080ABBF4(Ent void sub_080ABC54(Entity* this) { if (sub_0806F520() == 0) { - CreateFx(this, 2, 0); + CreateFx(this, FX_DEATH, 0); DeleteThisEntity(); } gUnk_0812A808[this->subAction](this); @@ -44,7 +45,7 @@ void sub_080ABC90(Entity* this) { ModHealth(-2); sub_0800449C(&gPlayerEntity, 0x7a); sub_08079D84(); - CreateFx(this, 2, 0); + CreateFx(this, FX_DEATH, 0); DeleteThisEntity(); } } @@ -96,7 +97,7 @@ ASM_FUNC("asm/non_matching/v2Projectile/sub_080ABE04.inc", void sub_080ABE04(Ent void sub_080ABE88(Entity* this) { if (sub_08003FC4(this, 0x1800) == 0) { - CreateFx(this, 4, 0); + CreateFx(this, FX_ROCK, 0); DeleteThisEntity(); } } diff --git a/src/projectile/v3TennisBallProjectile.c b/src/projectile/v3TennisBallProjectile.c index 82d64a3c..d2c4ef74 100644 --- a/src/projectile/v3TennisBallProjectile.c +++ b/src/projectile/v3TennisBallProjectile.c @@ -2,6 +2,7 @@ #include "enemy.h" #include "audio.h" #include "functions.h" +#include "effects.h" extern s32 sub_080AF090(Entity*); extern s32 sub_080A7EB0(Entity*); @@ -56,7 +57,7 @@ void sub_080ACB90(Entity* this) { Entity* parent = this->parent; if ((this->x.HALF.HI == parent->x.HALF.HI) && (this->y.HALF.HI <= parent->y.HALF.HI)) { parent->field_0xf = 1; - CreateFx(this, 0x1f, 0x40); + CreateFx(this, FX_REFLECT2, 0x40); EnqueueSFX(SFX_ITEM_GLOVES_KNOCKBACK); DeleteThisEntity(); } |
