summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorrobojumper <robojumper@gmail.com>2025-07-27 16:45:04 +0200
committerrobojumper <robojumper@gmail.com>2025-07-27 16:45:04 +0200
commite4e4be4fceb93720fd99d604759cf0e362cc2f12 (patch)
tree30572ef1df20e5521845ce1b2dc6e84e8a6b9518 /include
parent4ec5128eb4f6cdc8985f83f4c8b540115daf47fb (diff)
d_gfx mostly OK
Diffstat (limited to 'include')
-rw-r--r--include/d/d_d2d.h4
-rw-r--r--include/d/d_gfx.h23
-rw-r--r--include/d/d_sys.h16
-rw-r--r--include/d/lyt/d_lyt_cursor_stick.h2
-rw-r--r--include/egg/gfx/eggDrawGX.h3
-rw-r--r--include/egg/gfx/eggScreen.h3
-rw-r--r--include/egg/gfx/eggTextureBuffer.h2
-rw-r--r--include/m/m2d.h3
-rw-r--r--include/rvl/MTX/mtx44.h4
-rw-r--r--include/toBeSorted/d_d3d.h2
10 files changed, 53 insertions, 9 deletions
diff --git a/include/d/d_d2d.h b/include/d/d_d2d.h
index 801f79e1..95fefae5 100644
--- a/include/d/d_d2d.h
+++ b/include/d/d_d2d.h
@@ -1,9 +1,13 @@
#ifndef D_D2D_H
#define D_D2D_H
+#include "egg/core/eggHeap.h"
+
namespace d2d {
+void create(EGG::Heap *);
void defaultSet();
+void drawBefore();
void draw();
} // namespace d2d
diff --git a/include/d/d_gfx.h b/include/d/d_gfx.h
index 4a80203c..337d3d57 100644
--- a/include/d/d_gfx.h
+++ b/include/d/d_gfx.h
@@ -2,12 +2,28 @@
#define D_GFX_H
#include "common.h"
+#include "egg/core/eggHeap.h"
+#include "egg/gfx/eggTextureBuffer.h"
+#include "nw4r/ut/ut_Color.h"
// Made up name
class dGfx_c {
public:
typedef void (*DrawCallback)(void);
+ dGfx_c();
+
+ EGG::TextureBuffer *getTextureBuffer();
+ void releaseTextureBuffer();
+ void drawBefore();
+ void drawLetterbox();
+
+ static void create(EGG::Heap *heap);
+ static void drawCapTexture(EGG::TextureBuffer *, nw4r::ut::Color *clr);
+
+ static bool isTvMode4To3();
+ static bool isTvModeWidescreen();
+
void setDrawCallback(DrawCallback cb) {
mDrawCallback = cb;
}
@@ -65,6 +81,7 @@ public:
static f32 getWidth4x3RightF() { return g_Width4x3Right_f32; }
static f32 get16x9to4x3WidthScaleF() { return g_16x9to4x3WidthScale; }
+ static f32 getCurrentScreenTo4x3WidthScaleF() { return g_CurrentScreenTo4x3WidthScale; }
// clang-format on
public:
@@ -113,8 +130,12 @@ public:
static f32 g_Width4x3Right_f32;
static f32 g_16x9to4x3WidthScale;
+ static f32 g_CurrentScreenTo4x3WidthScale;
+
+private:
+ static void initGfxConstants();
- /* 0x00 */ u8 _0x00[0x04 - 0x00];
+ /* 0x00 */ EGG::TextureBuffer *mpTextureBuffer;
/* 0x04 */ DrawCallback mDrawCallback;
/* 0x08 */ u8 field_0x08;
/* 0x09 */ u8 field_0x09;
diff --git a/include/d/d_sys.h b/include/d/d_sys.h
index a9d6ff9c..0f58b410 100644
--- a/include/d/d_sys.h
+++ b/include/d/d_sys.h
@@ -2,14 +2,18 @@
#define D_SYS_H
#include "common.h"
-#include "m/m_color.h"
+#include "egg/core/eggHeap.h"
+#include "nw4r/ut/ut_Color.h"
-namespace dSys {
+class dSys_c {
+public:
+ static void setFrameRate(u8);
+ static u8 getFrameRate();
-void setFrameRate(u32);
-u8 getFrameRate();
-void setClearColor(mColor clr);
+ static void setClearColor(nw4r::ut::Color clr);
-} // namespace dSys_c
+ static EGG::Heap *ms_RootHeapMem1;
+ static EGG::Heap *ms_RootHeapMem2;
+};
#endif
diff --git a/include/d/lyt/d_lyt_cursor_stick.h b/include/d/lyt/d_lyt_cursor_stick.h
index cf5703ac..762ba7b6 100644
--- a/include/d/lyt/d_lyt_cursor_stick.h
+++ b/include/d/lyt/d_lyt_cursor_stick.h
@@ -22,7 +22,7 @@ public:
static bool draw();
static bool drawDirectly();
- bool setPriority(u8 priority);
+ void setPriority(u8 priority);
void setTargetPane(nw4r::lyt::Pane *pane);
private:
diff --git a/include/egg/gfx/eggDrawGX.h b/include/egg/gfx/eggDrawGX.h
index 33d5e37a..e7e944af 100644
--- a/include/egg/gfx/eggDrawGX.h
+++ b/include/egg/gfx/eggDrawGX.h
@@ -156,6 +156,9 @@ public:
static void DrawDL16(const nw4r::math::MTX34 &mtx, GXColor clr) {
DrawDL(DL_16, mtx, clr);
}
+ static void DrawDL17(const nw4r::math::MTX34 &mtx, GXColor clr) {
+ DrawDL(DL_17, mtx, clr);
+ }
// TODO MORE
static void SetTevColor(GXTevRegID regId, GXColor tevClr, GXTevKColorID colorId, GXColor tevkClr) {
diff --git a/include/egg/gfx/eggScreen.h b/include/egg/gfx/eggScreen.h
index e78ba7bf..ec0e8007 100644
--- a/include/egg/gfx/eggScreen.h
+++ b/include/egg/gfx/eggScreen.h
@@ -94,6 +94,9 @@ public:
const Screen *GetParent() const {
return mParent;
}
+ static Screen *GetRoot() {
+ return spRoot;
+ }
void SetParent(const Screen *parent);
void SetUnkFlag8();
diff --git a/include/egg/gfx/eggTextureBuffer.h b/include/egg/gfx/eggTextureBuffer.h
index 3328a4ad..f14ecaf8 100644
--- a/include/egg/gfx/eggTextureBuffer.h
+++ b/include/egg/gfx/eggTextureBuffer.h
@@ -34,10 +34,10 @@ public:
void alloc(u32 size);
static TextureBuffer *alloc(u16 w, u16 h, GXTexFmt fmt);
void free();
+ static void setIncludesHeader(bool);
private:
static bool includesHeader();
- static void setIncludesHeader(bool);
u32 mSize; // at 0x2C
EBufferState mState; // at 0x30
diff --git a/include/m/m2d.h b/include/m/m2d.h
index aad5f08d..eec17c94 100644
--- a/include/m/m2d.h
+++ b/include/m/m2d.h
@@ -14,6 +14,9 @@ namespace m2d {
extern nw4r::ut::List l_list;
extern mAllocator_c *l_allocator;
+void create(EGG::Heap *heap, u32 size);
+void reset();
+
class Layout_c : public nw4r::lyt::Layout {
public:
virtual ~Layout_c() {}
diff --git a/include/rvl/MTX/mtx44.h b/include/rvl/MTX/mtx44.h
index 65dfacc7..698bbd7e 100644
--- a/include/rvl/MTX/mtx44.h
+++ b/include/rvl/MTX/mtx44.h
@@ -12,6 +12,10 @@ void C_MTXFrustum(Mtx44, f32, f32, f32, f32, f32, f32);
void C_MTXPerspective(Mtx44, f32, f32, f32, f32);
void C_MTXOrtho(Mtx44, f32, f32, f32, f32, f32, f32);
+#define MTXFrustum C_MTXFrustum
+#define MTXPerspective C_MTXPerspective
+#define MTXOrtho C_MTXOrtho
+
#ifdef __cplusplus
}
#endif
diff --git a/include/toBeSorted/d_d3d.h b/include/toBeSorted/d_d3d.h
index 76cbd010..c609b45e 100644
--- a/include/toBeSorted/d_d3d.h
+++ b/include/toBeSorted/d_d3d.h
@@ -18,6 +18,8 @@
namespace d3d {
+bool create(EGG::Heap *);
+
f32 fn_80016960(mVec3_c &, const mVec3_c &pos);
bool fn_80016A90(const mVec3_c &pos);
void fn_80016B60(mVec3_c &, const mVec3_c &pos);