summaryrefslogtreecommitdiff
path: root/include/egg
diff options
context:
space:
mode:
authorrobojumper <robojumper@gmail.com>2025-03-22 12:34:18 +0100
committerrobojumper <robojumper@gmail.com>2025-03-22 12:34:18 +0100
commit510df58ea4d587d3aeff295b4d05708fffd52d00 (patch)
tree2d7dd0c643b233e1bcc5d5dd678e06c9d0e85031 /include/egg
parent818e818b56af7584c2f9b8274f68a2ff664605e3 (diff)
eggLightObject good enough
Diffstat (limited to 'include/egg')
-rw-r--r--include/egg/gfx/eggLightObject.h23
-rw-r--r--include/egg/gfx/eggLightTexture.h5
2 files changed, 20 insertions, 8 deletions
diff --git a/include/egg/gfx/eggLightObject.h b/include/egg/gfx/eggLightObject.h
index 84fbdcf3..d9ff2455 100644
--- a/include/egg/gfx/eggLightObject.h
+++ b/include/egg/gfx/eggLightObject.h
@@ -1,8 +1,9 @@
#ifndef EGG_LIGHT_OBJ_H
#define EGG_LIGHT_OBJ_H
-#include "egg/math/eggVector.h"
+#include "egg/egg_types.h"
#include "egg/prim/eggBinary.h"
+#include "nw4r/g3d/res/g3d_resanmlight.h"
#include "nw4r/math/math_types.h"
#include "rvl/GX/GXLight.h"
#include "rvl/GX/GXTypes.h"
@@ -23,7 +24,17 @@ public:
void Reset();
void Calc();
void CalcView(nw4r::math::MTX34 const &);
+
+ void fn_804A9C30(const LightTexture *, nw4r::math::VEC3 *, GXColor *) const;
+
void InitGX(GXLightObj *obj) const;
+ void CopyToG3D_World(nw4r::g3d::LightObj &) const;
+ void CopyToG3D_View(nw4r::g3d::LightObj &, const nw4r::math::MTX34 &) const;
+ void CopyFromG3D(const nw4r::g3d::ResAnmLight &, f32, EGG::LightObject *, bool);
+
+ void ApplyAnmResultInner(const nw4r::g3d::LightAnmResult &);
+ void ApplyAnmResultA(const nw4r::g3d::LightAnmResult &);
+ bool ApplyAnmResultB(const nw4r::g3d::LightAnmResult &);
void CalcAt();
void SetPos(const nw4r::math::VEC3 &);
@@ -66,12 +77,12 @@ private:
/* 0x48 */ f32 field_0x48;
/* 0x4C */ nw4r::math::VEC3 field_0x4C;
/* 0x58 */ nw4r::math::VEC3 field_0x58;
- /* 0x64 */ f32 field_0x64;
- /* 0x68 */ u16 field_0x68;
+ /* 0x64 */ f32 mShininess;
+ /* 0x68 */ u16 mFlags;
/* 0x6C */ nw4r::math::VEC3 field_0x6C;
- /* 0x78 */ GXColor field_0x78;
- /* 0x7C */ nw4r::math::VEC3 field_0x7C;
- /* 0x88 */ nw4r::math::VEC3 field_0x88;
+ /* 0x78 */ GXColor mLightColor;
+ /* 0x7C */ nw4r::math::VEC3 mViewPos;
+ /* 0x88 */ nw4r::math::VEC3 mViewAt;
/* 0x94 */ nw4r::math::VEC3 field_0x94;
/* 0xA0 */ u16 field_0xA0;
};
diff --git a/include/egg/gfx/eggLightTexture.h b/include/egg/gfx/eggLightTexture.h
index c278e227..59bf0907 100644
--- a/include/egg/gfx/eggLightTexture.h
+++ b/include/egg/gfx/eggLightTexture.h
@@ -53,12 +53,13 @@ public:
const char *getName() const {
return mName1;
}
-
-private:
+
f32 getFloat(u16 idx) const {
return mpFloatData[idx];
}
+private:
+
u8 getByte1(u16 idx) const {
return mpByteData1[idx];
}