summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/d/a/d_a_item.h2
-rw-r--r--include/d/a/obj/d_a_obj_arrow.h2
-rw-r--r--include/d/a/obj/d_a_obj_bomb.h2
-rw-r--r--include/d/a/obj/d_a_obj_dungeon_ship.h2
-rw-r--r--include/d/a/obj/d_a_obj_seat_sword.h2
-rw-r--r--include/d/a/obj/d_a_obj_tower_gearD101.h2
-rw-r--r--include/d/a/obj/d_a_obj_tower_hand_D101.h2
-rw-r--r--include/d/a/obj/d_a_obj_triforce.h2
-rw-r--r--include/d/a/obj/d_a_obj_tubo.h2
-rw-r--r--include/d/d_cs_game.h2
-rw-r--r--include/d/lyt/meter/d_lyt_meter_item_select.h2
-rw-r--r--include/d/lyt/meter/d_lyt_meter_minus_btn.h2
-rw-r--r--include/toBeSorted/attention.h2
-rw-r--r--include/toBeSorted/d_emitter.h (renamed from include/toBeSorted/effects_struct.h)67
14 files changed, 67 insertions, 26 deletions
diff --git a/include/d/a/d_a_item.h b/include/d/a/d_a_item.h
index 983b701f..b897bdf1 100644
--- a/include/d/a/d_a_item.h
+++ b/include/d/a/d_a_item.h
@@ -17,7 +17,7 @@
#include "s/s_State.hpp"
#include "toBeSorted/actor_event.h"
#include "toBeSorted/dowsing_target.h"
-#include "toBeSorted/effects_struct.h"
+#include "toBeSorted/d_emitter.h"
class dAcItem_0xB34 {
public:
diff --git a/include/d/a/obj/d_a_obj_arrow.h b/include/d/a/obj/d_a_obj_arrow.h
index 8bedda03..6e2d1a17 100644
--- a/include/d/a/obj/d_a_obj_arrow.h
+++ b/include/d/a/obj/d_a_obj_arrow.h
@@ -9,7 +9,7 @@
#include "nw4r/g3d/res/g3d_resfile.h"
#include "s/s_State.hpp"
#include "s/s_StateID.hpp"
-#include "toBeSorted/effects_struct.h"
+#include "toBeSorted/d_emitter.h"
class dAcArrow_c : public dAcObjBase_c {
public:
diff --git a/include/d/a/obj/d_a_obj_bomb.h b/include/d/a/obj/d_a_obj_bomb.h
index e82b3743..c5cd71d2 100644
--- a/include/d/a/obj/d_a_obj_bomb.h
+++ b/include/d/a/obj/d_a_obj_bomb.h
@@ -13,7 +13,7 @@
#include "nw4r/g3d/res/g3d_resfile.h"
#include "s/s_State.hpp"
#include "s/s_StateID.hpp"
-#include "toBeSorted/effects_struct.h"
+#include "toBeSorted/d_emitter.h"
// This may need its own file and could be independent of a bomb
class UnkBombColInfo : public cBgS_PolyInfo {
diff --git a/include/d/a/obj/d_a_obj_dungeon_ship.h b/include/d/a/obj/d_a_obj_dungeon_ship.h
index 18fbdb31..d8106eb8 100644
--- a/include/d/a/obj/d_a_obj_dungeon_ship.h
+++ b/include/d/a/obj/d_a_obj_dungeon_ship.h
@@ -13,7 +13,7 @@
#include "toBeSorted/actor_event.h"
#include "toBeSorted/actor_on_rail.h"
#include "toBeSorted/dowsing_target.h"
-#include "toBeSorted/effects_struct.h"
+#include "toBeSorted/d_emitter.h"
#include "toBeSorted/time_proc.h"
class dAcODungeonShip_c : public dAcObjBase_c {
diff --git a/include/d/a/obj/d_a_obj_seat_sword.h b/include/d/a/obj/d_a_obj_seat_sword.h
index ec74ab45..cedbf9db 100644
--- a/include/d/a/obj/d_a_obj_seat_sword.h
+++ b/include/d/a/obj/d_a_obj_seat_sword.h
@@ -17,7 +17,7 @@
#include "s/s_StateMgr.hpp"
#include "toBeSorted/actor_event.h"
#include "toBeSorted/attention.h"
-#include "toBeSorted/effects_struct.h"
+#include "toBeSorted/d_emitter.h"
class dAcOSeatSword_c : public dAcObjBase_c {
public:
diff --git a/include/d/a/obj/d_a_obj_tower_gearD101.h b/include/d/a/obj/d_a_obj_tower_gearD101.h
index d77b665a..bcc98e7d 100644
--- a/include/d/a/obj/d_a_obj_tower_gearD101.h
+++ b/include/d/a/obj/d_a_obj_tower_gearD101.h
@@ -9,7 +9,7 @@
#include "m/m_vec.h"
#include "nw4r/g3d/res/g3d_resfile.h"
#include "s/s_State.hpp"
-#include "toBeSorted/effects_struct.h"
+#include "toBeSorted/d_emitter.h"
/**
* A callback implementation that controls the button node in the switch model.
diff --git a/include/d/a/obj/d_a_obj_tower_hand_D101.h b/include/d/a/obj/d_a_obj_tower_hand_D101.h
index 3dcca5fc..ae945915 100644
--- a/include/d/a/obj/d_a_obj_tower_hand_D101.h
+++ b/include/d/a/obj/d_a_obj_tower_hand_D101.h
@@ -13,7 +13,7 @@
#include "s/s_State.hpp"
#include "s/s_StateMgr.hpp"
#include "toBeSorted/actor_event.h"
-#include "toBeSorted/effects_struct.h"
+#include "toBeSorted/d_emitter.h"
class dAcOTowerHandD101_c : public dAcObjBase_c {
diff --git a/include/d/a/obj/d_a_obj_triforce.h b/include/d/a/obj/d_a_obj_triforce.h
index ac134bef..eefc90fe 100644
--- a/include/d/a/obj/d_a_obj_triforce.h
+++ b/include/d/a/obj/d_a_obj_triforce.h
@@ -8,7 +8,7 @@
#include "m/m3d/m_smdl.h"
#include "m/m_angle.h"
#include "nw4r/g3d/res/g3d_resfile.h"
-#include "toBeSorted/effects_struct.h"
+#include "toBeSorted/d_emitter.h"
class dAcOtriforce_c : public dAcObjBase_c {
public:
diff --git a/include/d/a/obj/d_a_obj_tubo.h b/include/d/a/obj/d_a_obj_tubo.h
index 4e8e8c27..fe8fed49 100644
--- a/include/d/a/obj/d_a_obj_tubo.h
+++ b/include/d/a/obj/d_a_obj_tubo.h
@@ -15,7 +15,7 @@
#include "m/m_vec.h"
#include "nw4r/g3d/res/g3d_resfile.h"
#include "s/s_State.hpp"
-#include "toBeSorted/effects_struct.h"
+#include "toBeSorted/d_emitter.h"
class dAcOtubo_c : public dAcObjBase_c {
public:
diff --git a/include/d/d_cs_game.h b/include/d/d_cs_game.h
index a090bf97..4050fddf 100644
--- a/include/d/d_cs_game.h
+++ b/include/d/d_cs_game.h
@@ -9,7 +9,7 @@
#include "s/s_FStateID.hpp"
#include "s/s_State.hpp"
#include "s/s_StateID.hpp"
-#include "toBeSorted/effects_struct.h"
+#include "toBeSorted/d_emitter.h"
struct CsGameConfigMaybe {
CsGameConfigMaybe();
diff --git a/include/d/lyt/meter/d_lyt_meter_item_select.h b/include/d/lyt/meter/d_lyt_meter_item_select.h
index ae097d41..d64e7eae 100644
--- a/include/d/lyt/meter/d_lyt_meter_item_select.h
+++ b/include/d/lyt/meter/d_lyt_meter_item_select.h
@@ -8,7 +8,7 @@
#include "d/lyt/d_window.h"
#include "nw4r/lyt/lyt_pane.h"
#include "s/s_State.hpp"
-#include "toBeSorted/effects_struct.h"
+#include "toBeSorted/d_emitter.h"
class dLytMeterItemSelectIcon_c {
public:
diff --git a/include/d/lyt/meter/d_lyt_meter_minus_btn.h b/include/d/lyt/meter/d_lyt_meter_minus_btn.h
index 7478aea3..30fb1830 100644
--- a/include/d/lyt/meter/d_lyt_meter_minus_btn.h
+++ b/include/d/lyt/meter/d_lyt_meter_minus_btn.h
@@ -7,7 +7,7 @@
#include "d/lyt/d_window.h"
#include "nw4r/lyt/lyt_pane.h"
#include "s/s_State.hpp"
-#include "toBeSorted/effects_struct.h"
+#include "toBeSorted/d_emitter.h"
// At 0x8, [8], size 0x48
class dLytMeterMinusBtnMenuIcon_c {
diff --git a/include/toBeSorted/attention.h b/include/toBeSorted/attention.h
index 69a9044b..96a8ed3e 100644
--- a/include/toBeSorted/attention.h
+++ b/include/toBeSorted/attention.h
@@ -8,7 +8,7 @@
#include "m/m3d/m_anmtexpat.h"
#include "m/m3d/m_smdl.h"
#include "m/m_allocator.h"
-#include "toBeSorted/effects_struct.h"
+#include "toBeSorted/d_emitter.h"
#include "toBeSorted/raii_ptr.h"
static const u32 OFF = 'off ';
diff --git a/include/toBeSorted/effects_struct.h b/include/toBeSorted/d_emitter.h
index d9c8365b..56026645 100644
--- a/include/toBeSorted/effects_struct.h
+++ b/include/toBeSorted/d_emitter.h
@@ -13,6 +13,7 @@
#include "m/m_color.h"
#include "m/m_mtx.h"
#include "m/m_vec.h"
+#include "rvl/GX/GXTypes.h"
#include "toBeSorted/d_d3d.h"
#include "toBeSorted/d_unk_mdl_stuff_2.h"
#include "toBeSorted/tlist.h"
@@ -43,7 +44,6 @@ protected:
void deactivateEmitters();
void stopCalcEmitters();
void playCalcEmitters();
- static s32 getGroupId(u16);
static void loadColors(JPABaseEmitter *emitter, const GXColor *c1, const GXColor *c2, s32 idx1, s32 idx2);
void setEmitterCallback(dEmitterCallback_c *cb);
@@ -114,12 +114,24 @@ public:
// TODO maybe reconsider the naming here - the observation here is that a "continous" effect
// is typically called every frame, while the others are one-shot calls
- bool createContinuousEffect(u16 resourceId, const mVec3_c &pos, const mAng3_c *rot, const mVec3_c *scale, const GXColor *c1, const GXColor *c2);
- bool createContinuousUIEffect(u16 resourceId, const mVec3_c &pos, const mAng3_c *rot, const mVec3_c *scale, const GXColor *c1, const GXColor *c2);
+ bool createContinuousEffect(
+ u16 resourceId, const mVec3_c &pos, const mAng3_c *rot, const mVec3_c *scale, const GXColor *c1,
+ const GXColor *c2
+ );
+ bool createContinuousUIEffect(
+ u16 resourceId, const mVec3_c &pos, const mAng3_c *rot, const mVec3_c *scale, const GXColor *c1,
+ const GXColor *c2
+ );
bool createContinuousEffect(u16 resourceId, const mMtx_c &transform, const GXColor *c1, const GXColor *c2);
- bool createEffect(u16 resourceId, const mVec3_c &pos, const mAng3_c *rot, const mVec3_c *scale, const GXColor *c1, const GXColor *c2);
- bool createUIEffect(u16 resourceId, const mVec3_c &pos, const mAng3_c *rot, const mVec3_c *scale, const GXColor *c1, const GXColor *c2);
+ bool createEffect(
+ u16 resourceId, const mVec3_c &pos, const mAng3_c *rot, const mVec3_c *scale, const GXColor *c1,
+ const GXColor *c2
+ );
+ bool createUIEffect(
+ u16 resourceId, const mVec3_c &pos, const mAng3_c *rot, const mVec3_c *scale, const GXColor *c1,
+ const GXColor *c2
+ );
bool createEffect(u16 resourceId, const mMtx_c &transform, const GXColor *c1, const GXColor *c2);
bool hasEmitters() const {
@@ -155,8 +167,6 @@ protected:
const GXColor *c2
);
bool createEffect(bool bFlags, u16 resourceId, const mMtx_c &transform, const GXColor *c1, const GXColor *c2);
-
- static bool shouldBePaused(dBase_c *owner);
bool getOwnerPolyAttrs(s32 *pOut1, s32 *pOut2);
public:
@@ -335,10 +345,17 @@ public:
virtual void executeAfter(JPABaseEmitter *) override;
void execute();
+ void clear();
+ bool start(const mVec3_c &v1, dAcObjBase_c *owner);
- /* 0x010 */ mVec3_c field_0x010[0x32];
- /* 0x268 */ mVec3_c field_0x268[0x32];
- /* 0x4C0 */ u8 _0x4C0[0x650 - 0x4C0];
+private:
+ /* 0x010 */ mVec3_c field_0x010[50];
+ /* 0x268 */ mVec3_c field_0x268[50];
+ /* 0x4C0 */ dAcObjBase_c *field_0x4C0[50];
+ /* 0x588 */ dAcObjBase_c *field_0x588[50];
+ /* 0x650 */ mColor field_0x650;
+ /* 0x654 */ u32 field_0x654;
+ /* 0x658 */ u32 field_0x658;
// TODO unclear structure boundary
};
@@ -350,20 +367,36 @@ public:
}
void create(u16 resourceId);
+ bool start(const mVec3_c &v1, dAcObjBase_c *owner) {
+ return mCallback.start(v1, owner);
+ }
void remove();
mColor getField_0x67C() const {
return field_0x67C;
}
+ void setField_0x67C(GXColor clr) {
+ field_0x67C.r = clr.r;
+ field_0x67C.g = clr.g;
+ field_0x67C.b = clr.b;
+ field_0x67C.a = clr.a;
+ }
+
+
+ void setField_0x67C(mColor clr) {
+ field_0x67C.r = clr.r;
+ field_0x67C.g = clr.g;
+ field_0x67C.b = clr.b;
+ field_0x67C.a = clr.a;
+ }
+
void execute() {
mCallback.execute();
}
private:
/* 0x020 */ dMassObjEmitterCallback_c mCallback;
- /* 0x670 */ mColor field_0x670;
- /* 0x674 */ u8 _0x674[0x67C - 0x674];
/* 0x67C */ mColor field_0x67C;
};
@@ -388,6 +421,12 @@ public:
u16 effectResourceId, const mMtx_c &transform, const GXColor *c1, const GXColor *c2, s32 idx1, s32 idx2
);
+ // "mass obj" = grass, fire
+ static bool createMassObjEffect(u16 effectResourceId, const mVec3_c &v1, dAcObjBase_c *owner, const mColor *color);
+
+ static s32 getGroupId(u16);
+ static bool shouldBePaused(dBase_c *owner);
+
enum Fx_e {
TsuboA,
TsuboB,
@@ -456,7 +495,9 @@ private:
);
static mHeapAllocator_c *ms_allocator;
- static dMassObjEmitter_c *sManagers;
+ static dMassObjEmitter_c *sMassObjEmitters;
+ static u32 sInts[];
+ static u32 sInts2[];
};
#endif