diff options
| author | robojumper <robojumper@gmail.com> | 2025-07-27 16:45:04 +0200 |
|---|---|---|
| committer | robojumper <robojumper@gmail.com> | 2025-07-27 16:45:04 +0200 |
| commit | e4e4be4fceb93720fd99d604759cf0e362cc2f12 (patch) | |
| tree | 30572ef1df20e5521845ce1b2dc6e84e8a6b9518 /include/d/d_gfx.h | |
| parent | 4ec5128eb4f6cdc8985f83f4c8b540115daf47fb (diff) | |
d_gfx mostly OK
Diffstat (limited to 'include/d/d_gfx.h')
| -rw-r--r-- | include/d/d_gfx.h | 23 |
1 files changed, 22 insertions, 1 deletions
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; |
