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/object | |
| parent | 3f5449c1a1aed612e5b2c1190699bafef2603241 (diff) | |
add effects.h
Diffstat (limited to 'src/object')
| -rw-r--r-- | src/object/bigVortex.c | 3 | ||||
| -rw-r--r-- | src/object/bird.c | 3 | ||||
| -rw-r--r-- | src/object/book.c | 3 | ||||
| -rw-r--r-- | src/object/button.c | 5 | ||||
| -rw-r--r-- | src/object/lockedDoor.c | 5 | ||||
| -rw-r--r-- | src/object/mask.c | 3 | ||||
| -rw-r--r-- | src/object/metalDoor.c | 5 | ||||
| -rw-r--r-- | src/object/objectA2.c | 3 | ||||
| -rw-r--r-- | src/object/pot.c | 11 | ||||
| -rw-r--r-- | src/object/treeHidingPortal.c | 3 | ||||
| -rw-r--r-- | src/object/windcrest.c | 3 |
11 files changed, 29 insertions, 18 deletions
diff --git a/src/object/bigVortex.c b/src/object/bigVortex.c index 866309ae..9a06d4ff 100644 --- a/src/object/bigVortex.c +++ b/src/object/bigVortex.c @@ -3,6 +3,7 @@ #include "flags.h" #include "object.h" #include "functions.h" +#include "effects.h" extern void sub_08098E3C(Entity*); extern void sub_08098E88(Entity*); @@ -43,7 +44,7 @@ void sub_08098D6C(Entity* this) { if (CheckFlags(this->field_0x86.HWORD)) { this->action = 2; this->actionDelay = 0x2d; - ent = CreateFx(this, 0x43, 0); + ent = CreateFx(this, FX_BIG_EXPLOSION2, 0); if (ent != NULL) { ent->y.HALF.HI += 8; } diff --git a/src/object/bird.c b/src/object/bird.c index 3d1558e3..0dad159f 100644 --- a/src/object/bird.c +++ b/src/object/bird.c @@ -6,6 +6,7 @@ #include "random.h" #include "object.h" #include "functions.h" +#include "effects.h" extern void (*const gUnk_08123EC0[])(Entity*); extern void (*const gUnk_08123EEC[])(Entity*); @@ -99,7 +100,7 @@ void sub_0809D0AC(Entity* this) { this->collisionLayer = 1; SetLocalFlag(0x45); SoundReq(SFX_SECRET); - fx = CreateFx(this, 0x11, 0); + fx = CreateFx(this, FX_DASH, 0); if (fx != NULL) { sub_0806FAD8(this, fx); } diff --git a/src/object/book.c b/src/object/book.c index b51c4716..356b85d9 100644 --- a/src/object/book.c +++ b/src/object/book.c @@ -5,6 +5,7 @@ #include "flags.h" #include "room.h" #include "textbox.h" +#include "effects.h" extern void (*const BookActionFuncs[])(Entity*); extern s8 const gUnk_08123D94[]; @@ -135,7 +136,7 @@ void sub_0809B56C(Entity* this) { SetFlag(this->field_0x86.HWORD); - fx = CreateFx(this, 2, 0); + fx = CreateFx(this, FX_DEATH, 0); if (fx) { ResolveEntityOnTop(this, fx); } diff --git a/src/object/button.c b/src/object/button.c index 5111575e..52876a45 100644 --- a/src/object/button.c +++ b/src/object/button.c @@ -4,6 +4,7 @@ #include "room.h" #include "audio.h" #include "functions.h" +#include "effects.h" extern void (*const gUnk_0811EE38[])(Entity*); @@ -231,13 +232,13 @@ u32 sub_08081F00(u32* unk1, u32* unk2) { } void sub_08081F24(Entity* this) { - Entity* fx = CreateFx(this, 0x11, 0x40); + Entity* fx = CreateFx(this, FX_DASH, 0x40); if (fx) { fx->scriptedScene = 3; fx->x.HALF.HI += 7; fx->y.HALF.HI += 5; } - fx = CreateFx(this, 0x11, 0x40); + fx = CreateFx(this, FX_DASH, 0x40); if (fx) { fx->scriptedScene = 3; fx->x.HALF.HI -= 7; diff --git a/src/object/lockedDoor.c b/src/object/lockedDoor.c index f7918284..d82a3e3d 100644 --- a/src/object/lockedDoor.c +++ b/src/object/lockedDoor.c @@ -4,6 +4,7 @@ #include "game.h" #include "audio.h" #include "functions.h" +#include "effects.h" void sub_08083338(Entity*); void sub_080834B4(Entity*); @@ -315,12 +316,12 @@ u32 sub_080837B0(Entity* this) { void sub_08083814(Entity* this, u32 unk0) { Entity* fx; const struct_0811F730* tmp = &gUnk_0811F730[unk0]; - fx = CreateFx(this, 0x11, 0x40); + fx = CreateFx(this, FX_DASH, 0x40); if (fx) { fx->x.HALF.HI += tmp->unk_00.x; fx->y.HALF.HI += tmp->unk_00.y; } - fx = CreateFx(this, 0x11, 0x40); + fx = CreateFx(this, FX_DASH, 0x40); if (fx) { fx->x.HALF.HI += tmp->unk_02.x; fx->y.HALF.HI += tmp->unk_02.y; diff --git a/src/object/mask.c b/src/object/mask.c index b6d06206..05a49fb7 100644 --- a/src/object/mask.c +++ b/src/object/mask.c @@ -6,6 +6,7 @@ #include "player.h" #include "flags.h" #include "functions.h" +#include "effects.h" extern void (*MaskActionFuncs[])(Entity*); @@ -111,7 +112,7 @@ void sub_08092B0C(Entity* this) { break; } - CreateFx(this, 5, 0); + CreateFx(this, FX_POT_SHATTER, 0); sub_0805457C(this, 3); } else { diff --git a/src/object/metalDoor.c b/src/object/metalDoor.c index 475a35ac..a65cf709 100644 --- a/src/object/metalDoor.c +++ b/src/object/metalDoor.c @@ -4,6 +4,7 @@ #include "flags.h" #include "audio.h" #include "functions.h" +#include "effects.h" extern u32 sub_08083734(Entity*, u32); extern void sub_080A080C(Entity*); @@ -56,12 +57,12 @@ void sub_080A074C(Entity* this) { this->height.HALF.HI = 0; this->x.HALF.HI = this->field_0x70.HALF.LO; this->y.HALF.HI = this->field_0x70.HALF.HI; - ent = CreateFx(this, 0x11, 0x40); + ent = CreateFx(this, FX_DASH, 0x40); if (ent != NULL) { ent->x.HALF.HI += 0xc; ent->y.HALF.HI -= 0xc; } - ent = CreateFx(this, 0x11, 0x40); + ent = CreateFx(this, FX_DASH, 0x40); if (ent != NULL) { ent->x.HALF.HI -= 0xc; ent->y.HALF.HI -= 0xc; diff --git a/src/object/objectA2.c b/src/object/objectA2.c index 2cc132fe..73cb101f 100644 --- a/src/object/objectA2.c +++ b/src/object/objectA2.c @@ -5,6 +5,7 @@ #include "audio.h" #include "structures.h" #include "functions.h" +#include "effects.h" void sub_0809F318(Entity*); void sub_0809F374(Entity*); @@ -85,7 +86,7 @@ void sub_0809F408(Entity* this) { switch (this->frames.all) { case 9: this->frames.all = 0; - CreateFx(this, 0x43, 0); + CreateFx(this, FX_BIG_EXPLOSION2, 0); gMenu.field_0x0 = 1; break; case 0x80: diff --git a/src/object/pot.c b/src/object/pot.c index 7aff3672..f3423433 100644 --- a/src/object/pot.c +++ b/src/object/pot.c @@ -5,6 +5,7 @@ #include "room.h" #include "object.h" #include "functions.h" +#include "effects.h" void sub_08082824(Entity*); static void sub_08082850(Entity*, Entity*); @@ -97,7 +98,7 @@ void sub_08082310(Entity* this) { break; default: if (sub_080002B8(this) == 13) { - CreateFx(this, 0, 0); + CreateFx(this, FX_FALL_DOWN, 0); } else if (tileType == 0x4005) { gPlayerState.field_0xab = 4; SetTile((u16)this->field_0x70.HALF.LO, COORD_TO_TILE(this), this->collisionLayer); @@ -137,13 +138,13 @@ void sub_08082588(Entity* this) { void sub_0808259C(Entity* this) { switch (sub_080043E8(this)) { case 2: - CreateFx(this, 11, 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, 12, 0); + CreateFx(this, FX_LAVA_SPLASH, 0); break; default: sub_08082850(this, &gPlayerEntity); @@ -261,7 +262,7 @@ void sub_08082824(Entity* this) { static void sub_08082850(Entity* this, Entity* parent) { u32 parameter = sub_0808288C(this, this->type, this->field_0x7c.BYTES.byte1, this->type2); - Entity* fxEntity = CreateFx(this, 5, parameter); + Entity* fxEntity = CreateFx(this, FX_POT_SHATTER, parameter); if (fxEntity) { fxEntity->parent = parent; } diff --git a/src/object/treeHidingPortal.c b/src/object/treeHidingPortal.c index 53f593bb..dcaf3ebc 100644 --- a/src/object/treeHidingPortal.c +++ b/src/object/treeHidingPortal.c @@ -6,6 +6,7 @@ #include "room.h" #include "structures.h" #include "functions.h" +#include "effects.h" extern void sub_0809E96C(Entity*); extern void CreateSparkle(Entity*); @@ -70,7 +71,7 @@ void sub_0809E918(Entity* this) { Entity* fx; s16* i = gUnk_08124364; while (*i != -1000) { - fx = CreateFx(this, 3, 0); + fx = CreateFx(this, FX_BUSH, 0); if (fx != NULL) { fx->x.HALF.HI += i[0]; fx->y.HALF.HI += i[1]; diff --git a/src/object/windcrest.c b/src/object/windcrest.c index 91bdb37a..3ebaef24 100644 --- a/src/object/windcrest.c +++ b/src/object/windcrest.c @@ -4,6 +4,7 @@ #include "save.h" #include "script.h" #include "functions.h" +#include "effects.h" extern void sub_08078850(Entity*, u32, u32, u8*); @@ -26,5 +27,5 @@ void sub_080A2124(Entity* this) { void Windcrest_Unlock(Entity* this) { SoundReq(SFX_SECRET); gSave.windcrests = gSave.windcrests | 1 << (this->type2 + 0x18); - CreateFx(this, 0x46, 0); + CreateFx(this, FX_GIANT_EXPLOSION, 0); } |
