-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
m3d matching + some EGG declarations
- Loading branch information
1 parent
37da66e
commit 6fed118
Showing
19 changed files
with
523 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#ifndef EGG_DRAWGX_H | ||
#define EGG_DRAWGX_H | ||
|
||
#include <common.h> | ||
#include <egg/core/eggHeap.h> | ||
#include <egg/math/eggMatrix.h> | ||
#include <rvl/GX.h> | ||
|
||
namespace EGG { | ||
|
||
class DrawGX { | ||
public: | ||
static void Initialize(Heap *); | ||
|
||
static GXTexMapID GetTexMapDefault(); | ||
|
||
// TODO MORE | ||
|
||
/* static ?? s_DL */ | ||
|
||
static Matrix34f s_cameraMtx; | ||
|
||
/* static ?? s_flag */ | ||
|
||
static GXColor BLACK; | ||
static GXColor WHITE; | ||
static GXColor GREEN; | ||
static GXColor RED; | ||
static GXColor BLUE; | ||
}; | ||
|
||
} // namespace EGG | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#ifndef EGG_FOG_H | ||
#define EGG_FOG_H | ||
|
||
#include <egg/prim/eggBinary.h> | ||
#include <nw4r/types_nw4r.h> | ||
|
||
namespace EGG { | ||
|
||
// TODO: Add members | ||
class FogManager : IBinary<FogManager> { | ||
public: | ||
FogManager(u16); | ||
virtual ~FogManager(); | ||
virtual void SetBinaryInner(Bin &) override; | ||
virtual void GetBinaryInner(Bin *) const override; | ||
virtual size_t GetBinarySize() override; | ||
virtual void SetBinaryInner(const Bin &, const Bin &, f32) override; | ||
|
||
void Calc(); | ||
void CopyToG3D(nw4r::g3d::ScnRoot *) const; | ||
|
||
/* 0x04 */ u8 mFlag; | ||
/* 0x05 */ u8 TODO[0x10 - 0x05]; | ||
}; | ||
|
||
} // namespace EGG | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#ifndef EGG_FRUSTUM_H | ||
#define EGG_FRUSTUM_H | ||
|
||
#include <common.h> | ||
#include <nw4r/g3d/g3d_camera.h> | ||
|
||
namespace EGG { | ||
|
||
// TODO: Fill out more | ||
class Frustum { | ||
public: | ||
enum CanvasMode {}; | ||
enum ProjectionType {}; | ||
|
||
u8 TODO_0x00[0x38]; | ||
// vt at 0x38 | ||
virtual ~Frustum(); | ||
virtual void SetProjectionGX() const; | ||
virtual void CopyToG3D(nw4r::g3d::Camera) const; | ||
}; | ||
|
||
} // namespace EGG | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#ifndef EGG_GFXENGINE_H | ||
#define EGG_GFXENGINE_H | ||
|
||
#include <common.h> | ||
#include <rvl/GX.h> | ||
|
||
namespace EGG { | ||
|
||
namespace GfxEngine { | ||
|
||
struct Configuration { | ||
/* 0x00 */ u16 efbWidth; | ||
/* 0x02 */ u16 efbHeight; | ||
/* 0x04 */ GXColor clearColor; | ||
/* 0x08 */ u32 field_0x08; | ||
/* 0x0C */ u16 field_0x0C; | ||
/* 0x0E */ u16 field_0x0E; | ||
/* 0x10 */ u32 bufferSize; | ||
/* 0x14 */ u16 field_0x14; | ||
/* 0x16 */ u16 field_0x16; | ||
/* 0x18 */ u8 UNK_0x18[4]; | ||
Configuration(); | ||
virtual ~Configuration() {} | ||
}; | ||
|
||
} // namespace GfxEngine | ||
|
||
} // namespace EGG | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#ifndef EGG_LIGHT_H | ||
#define EGG_LIGHT_H | ||
|
||
#include <egg/prim/eggBinary.h> | ||
#include <nw4r/types_nw4r.h> | ||
|
||
namespace EGG { | ||
|
||
// TODO: Fill out more | ||
class LightTexture { | ||
public: | ||
static void initialize(u16 textureSize, Heap *pHeap); | ||
}; | ||
|
||
// TODO: Fill out more | ||
class LightTextureManager : public IBinary<LightTextureManager> { | ||
public: | ||
virtual ~LightTextureManager(); | ||
virtual void SetBinaryInner(Bin &) override; | ||
virtual void GetBinaryInner(Bin *) const override; | ||
virtual size_t GetBinarySize() override; | ||
virtual void SetBinaryInner(const Bin &, const Bin &, f32) override; | ||
|
||
void drawAndCaptureTexture(f32, f32, f32, f32); | ||
}; | ||
|
||
// TODO: Fill out more | ||
class LightManager : public IBinary<LightManager> { | ||
public: | ||
// vt at 0x00 | ||
LightManager(u32, u32, u8); | ||
virtual ~LightManager(); | ||
virtual void SetBinaryInner(Bin &) override; | ||
virtual void GetBinaryInner(Bin *) const override; | ||
virtual size_t GetBinarySize() 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#ifndef EGG_SCREEN_H | ||
#define EGG_SCREEN_H | ||
|
||
#include <common.h> | ||
#include <egg/gfx/eggFrustum.h> | ||
|
||
namespace EGG { | ||
|
||
// TODO: Fill out more | ||
class Screen : public Frustum { | ||
public: | ||
Screen(); | ||
Screen(f32, f32, f32, f32, Screen *, CanvasMode); | ||
|
||
virtual ~Screen(); | ||
virtual void SetProjectionGX() const override; | ||
virtual void CopyToG3D(nw4r::g3d::Camera) const override; | ||
|
||
static void Initialize(const u16 *, const u16 *, Screen *); | ||
static void SetTVModeDefault(); | ||
|
||
u8 TODO_0x3C[0x88 - 0x3C]; | ||
}; | ||
|
||
} // namespace EGG | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#ifndef EGG_STATE_GX_H | ||
#define EGG_STATE_GX_H | ||
|
||
#include <common.h> | ||
#include <rvl/GX.h> | ||
|
||
namespace EGG { | ||
|
||
class StateGX { | ||
public: | ||
static void initialize(u16, u16, GXColor, GXPixelFmt); | ||
static void frameInit(); | ||
static void textureInit(); // Guess for 804b4810 | ||
|
||
static void resetGX(); | ||
static void resetVtx(); | ||
static void resetColorChannel(); | ||
static void resetIndirect(); | ||
static void resetTexture(); | ||
static void resetTexGen(); | ||
static void resetTev(); | ||
static void resetPE(); | ||
|
||
static void resetGXCache(); | ||
|
||
static void GXSetPixelFmt(GXPixelFmt pixelFmt, GXZFmt16 zFmt); | ||
|
||
static void invalidateTexAllGX(); | ||
|
||
static bool GXSetColorUpdate(bool); | ||
static bool GXSetAlphaUpdate(bool); | ||
static bool GXSetDither(); | ||
static void GXCopyTex(); | ||
static bool GXSetDstAlpha(); | ||
// Unk func here | ||
static void GXSetProjection(Mtx44, int); | ||
static void GXSetProjectionv(const f32 *); | ||
static void GXSetViewport(f32, f32, f32, f32, f32, f32); | ||
static void GZSetScissor(u32, u32, u32, u32); | ||
static void GZSetScissorBoxOffset(s32, s32); | ||
}; | ||
|
||
} // namespace EGG | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#ifndef EGG_BINARY_H | ||
#define EGG_BINARY_H | ||
|
||
template <class T> | ||
class IBinary { | ||
public: | ||
class Bin {}; | ||
virtual void SetBinaryInner(Bin &) = 0; | ||
virtual void GetBinaryInner(Bin *) const = 0; | ||
virtual size_t GetBinarySize() = 0; | ||
virtual void SetBinaryInner(const Bin &, const Bin &, f32) = 0; | ||
|
||
static const char *GetBinaryType(); | ||
int GetVersion(); | ||
|
||
void GetBinary(void *) const; | ||
|
||
void SetBinary(const void *); | ||
|
||
void SetBinaryBlend(const void *, const void *, f32); | ||
}; | ||
|
||
#endif |
Oops, something went wrong.