summaryrefslogtreecommitdiff
path: root/include/d
diff options
context:
space:
mode:
Diffstat (limited to 'include/d')
-rw-r--r--include/d/d_d2d.h4
-rw-r--r--include/d/d_gfx.h23
-rw-r--r--include/d/d_sys.h17
-rw-r--r--include/d/lyt/d_lyt_cursor_stick.h2
4 files changed, 38 insertions, 8 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..7557307d 100644
--- a/include/d/d_sys.h
+++ b/include/d/d_sys.h
@@ -2,14 +2,19 @@
#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:
+ /* Frame rate values: 1 - 60fps, 2 - 30fps */
+ 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 73a5ff1f..1d24cd50 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);
void setShouldBeOn(bool value) {