summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorelijah-thomas774 <elijahthomas774@gmail.com>2025-03-22 20:47:19 -0400
committerelijah-thomas774 <elijahthomas774@gmail.com>2025-03-22 20:47:19 -0400
commitda9155aa5fdbabcf0d6dcf41fdf690b8b201fb78 (patch)
tree4151c7e66117c5c798df2684f30abc78c2d0cd61 /include
parentf66c22cf63529120697765e05b796d401c16555f (diff)
parentfb8a02193562bf57d35c4c70d168c6ae226084a6 (diff)
Merge branch '🥚' of https://github.com/robojumper/ss into pr/142
Diffstat (limited to 'include')
-rw-r--r--include/egg/gfx/eggLight.h38
-rw-r--r--include/egg/gfx/eggLightManager.h73
-rw-r--r--include/egg/gfx/eggLightObject.h12
-rw-r--r--include/m/m3d/m3d.h4
4 files changed, 86 insertions, 41 deletions
diff --git a/include/egg/gfx/eggLight.h b/include/egg/gfx/eggLight.h
deleted file mode 100644
index 67692962..00000000
--- a/include/egg/gfx/eggLight.h
+++ /dev/null
@@ -1,38 +0,0 @@
-#ifndef EGG_LIGHT_H
-#define EGG_LIGHT_H
-
-#include "egg/prim/eggBinary.h"
-#include "nw4r/types_nw4r.h"
-
-namespace EGG {
-
-class LightTextureManager;
-
-// TODO: Fill out more
-class LightManager : public IBinary<LightManager> {
-public:
- struct BinData {};
- // vt at 0x00
- LightManager(u32, u32, u8);
- virtual ~LightManager();
- virtual void SetBinaryInner(const Bin &) override;
- virtual void GetBinaryInner(Bin *) const override;
- virtual size_t GetBinarySize() const override;
- virtual void SetBinaryInner(const Bin &, const Bin &, f32) override;
- virtual void Reset();
- virtual void Calc(nw4r::g3d::ScnRoot *);
- virtual void CalcView(const nw4r::math::MTX34 &, u8, nw4r::g3d::ScnRoot *);
- virtual void DoneDraw();
-
- LightTextureManager *GetTextureMgr() const {
- return mTextureMgr;
- }
-
- u8 TODO_0x04[0x14 - 0x04];
- LightTextureManager *mTextureMgr;
- u8 TODO_0x18[0x28 - 0x18];
-};
-
-} // namespace EGG
-
-#endif
diff --git a/include/egg/gfx/eggLightManager.h b/include/egg/gfx/eggLightManager.h
new file mode 100644
index 00000000..d1ed1cb8
--- /dev/null
+++ b/include/egg/gfx/eggLightManager.h
@@ -0,0 +1,73 @@
+#ifndef EGG_LIGHT_MANAGER_H
+#define EGG_LIGHT_MANAGER_H
+
+#include "egg/egg_types.h"
+#include "egg/gfx/eggLightObject.h"
+#include "egg/prim/eggBinary.h"
+#include "nw4r/types_nw4r.h"
+#include "rvl/GX/GXLight.h"
+#include "rvl/GX/GXTypes.h"
+
+namespace EGG {
+
+// TODO: Fill out more
+class LightManager : public IBinary<LightManager> {
+ struct LightData {
+ /* 0x00 */ LightObject mLightObject;
+ };
+
+ // ???
+ union Counts {
+ struct {
+ /* 0x00 */ u8 mNumEggLightObjects;
+ /* 0x01 */ u8 mNumUnks;
+ };
+ };
+
+ struct Unk1 {
+ /* 0x00 */ GXColor mColor;
+ /* 0x04 */ const char *mStr;
+ /* 0x08 */ u8 field_0x08;
+ };
+
+public:
+ struct BinData {};
+ // vt at 0x00
+ LightManager(u32, u32, u8);
+ virtual ~LightManager();
+ virtual void SetBinaryInner(const Bin &) override;
+ virtual void GetBinaryInner(Bin *) const override;
+ virtual size_t GetBinarySize() const override;
+ virtual void SetBinaryInner(const Bin &, const Bin &, f32) override;
+ virtual void Reset();
+ virtual void Calc(nw4r::g3d::ScnRoot *);
+ virtual void CalcView(const nw4r::math::MTX34 &, u8, nw4r::g3d::ScnRoot *);
+ virtual void DoneDraw();
+
+ void BecomeInvalidLight(int);
+
+ LightTextureManager *GetTextureMgr() const {
+ return mpTextureMgr;
+ }
+
+ LightObject *GetLightObject(int i) {
+ return &mpLightData[i].mLightObject;
+ }
+
+ /* 0x04 */ Counts mCounts0x04;
+ /* 0x06 */ Counts mCounts0x06;
+ /* 0x08 */ LightData *mpLightData;
+ /* 0x0C */ Unk1 *mpUnk1;
+ /* 0x10 */ GXLightObj *mpLightObjs;
+ /* 0x14 */ LightTextureManager *mpTextureMgr;
+ /* 0x18 */ GXColor mColor;
+ /* 0x1C */ u8 field_0x1C;
+ /* 0x1D */ u8 field_0x1D;
+ /* 0x1E */ u16 mFlags;
+ /* 0x20 */ u32 field_0x20;
+ /* 0x24 */ s16 field_0x24;
+};
+
+} // namespace EGG
+
+#endif
diff --git a/include/egg/gfx/eggLightObject.h b/include/egg/gfx/eggLightObject.h
index d9ff2455..ac7f8ceb 100644
--- a/include/egg/gfx/eggLightObject.h
+++ b/include/egg/gfx/eggLightObject.h
@@ -58,6 +58,18 @@ public:
return mDist;
}
+ void SetIndex(u16 index) {
+ mIndex = index;
+ }
+
+ void ClearField0xA0() {
+ field_0xA0 = 0;
+ }
+
+ void ClearFlag4() {
+ mFlags = mFlags & 0xFFFE;
+ }
+
private:
/* 0x04 */ u16 mIndex;
/* 0x06 */ u16 field_0x06;
diff --git a/include/m/m3d/m3d.h b/include/m/m3d/m3d.h
index e1503ecf..db977ea8 100644
--- a/include/m/m3d/m3d.h
+++ b/include/m/m3d/m3d.h
@@ -1,9 +1,7 @@
#ifndef M3D_H
#define M3D_H
-#include "egg/core/eggHeap.h"
-#include "egg/gfx/eggFogManager.h"
-#include "egg/gfx/eggLight.h"
+#include "egg/egg_types.h"
#include "m/m_allocator.h"
#include "nw4r/g3d/g3d_scnroot.h"