add effects.h

This commit is contained in:
theo3
2021-10-26 20:33:33 -07:00
parent 3f5449c1a1
commit d29468c30b
67 changed files with 297 additions and 113 deletions
+2 -1
View File
@@ -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;
}
+2 -1
View File
@@ -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);
}
+2 -1
View File
@@ -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);
}
+3 -2
View File
@@ -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;
+3 -2
View File
@@ -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;
+2 -1
View File
@@ -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 {
+3 -2
View File
@@ -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;
+2 -1
View File
@@ -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:
+6 -5
View File
@@ -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;
}
+2 -1
View File
@@ -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];
+2 -1
View File
@@ -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);
}