2021-03-28 22:49:05 +02:00
|
|
|
#ifndef M_DO_M_DO_GRAPHIC_H
|
|
|
|
|
#define M_DO_M_DO_GRAPHIC_H
|
|
|
|
|
|
2022-01-04 04:53:20 -08:00
|
|
|
#include "JSystem/JFramework/JFWDisplay.h"
|
2024-01-19 16:22:19 -08:00
|
|
|
#include "dolphin/mtx.h"
|
2025-06-30 15:17:50 -07:00
|
|
|
#include "global.h"
|
2021-03-28 22:49:05 +02:00
|
|
|
|
2022-01-25 12:24:14 -08:00
|
|
|
int mDoGph_Create();
|
2024-11-12 02:41:55 -08:00
|
|
|
void mDoGph_drawFilterQuad(s8 param_0, s8 param_1);
|
2021-09-24 08:11:10 -07:00
|
|
|
|
2022-04-28 13:58:43 -07:00
|
|
|
extern bool data_80450BE7; // AutoForcus
|
2022-02-06 06:23:54 -08:00
|
|
|
|
2022-01-25 12:24:14 -08:00
|
|
|
struct ResTIMG;
|
2022-01-04 04:53:20 -08:00
|
|
|
class mDoGph_gInf_c {
|
|
|
|
|
public:
|
|
|
|
|
class bloom_c {
|
|
|
|
|
public:
|
2024-10-31 20:36:11 -04:00
|
|
|
bloom_c() { m_buffer = NULL; }
|
2022-01-04 04:53:20 -08:00
|
|
|
/* 80009544 */ void create();
|
|
|
|
|
/* 800095F8 */ void remove();
|
|
|
|
|
/* 80009650 */ void draw();
|
2022-01-25 12:24:14 -08:00
|
|
|
|
2023-03-14 15:27:46 -07:00
|
|
|
u8 getEnable() { return mEnable; }
|
2023-09-30 20:53:18 -07:00
|
|
|
void setEnable(u8 i_enable) { mEnable = i_enable; }
|
2023-03-14 15:27:46 -07:00
|
|
|
GXColor* getMonoColor() { return &mMonoColor; }
|
2023-09-30 20:53:18 -07:00
|
|
|
void setPoint(u8 i_point) { mPoint = i_point; }
|
|
|
|
|
void setBlureSize(u8 i_size) { mBlureSize = i_size; }
|
|
|
|
|
void setBlureRatio(u8 i_ratio) { mBlureRatio = i_ratio; }
|
|
|
|
|
void setBlendColor(GXColor i_color) { mBlendColor = i_color; }
|
|
|
|
|
void setMonoColor(GXColor i_color) { mMonoColor = i_color; }
|
|
|
|
|
void setMode(u8 i_mode) { mMode = i_mode; }
|
2023-03-14 15:27:46 -07:00
|
|
|
|
2022-01-25 12:24:14 -08:00
|
|
|
/* 0x00 */ GXColor mBlendColor;
|
|
|
|
|
/* 0x04 */ GXColor mMonoColor;
|
|
|
|
|
/* 0x08 */ u8 mEnable;
|
|
|
|
|
/* 0x09 */ u8 mMode;
|
|
|
|
|
/* 0x0A */ u8 mPoint;
|
|
|
|
|
/* 0x0B */ u8 mBlureSize;
|
|
|
|
|
/* 0x0C */ u8 mBlureRatio;
|
|
|
|
|
/* 0x10 */ void* m_buffer;
|
2022-01-04 04:53:20 -08:00
|
|
|
};
|
|
|
|
|
|
2022-01-25 12:24:14 -08:00
|
|
|
/* 80007E44 */ static void create();
|
|
|
|
|
/* 80007F90 */ static void beginRender();
|
|
|
|
|
/* 800080D0 */ static void fadeOut(f32);
|
|
|
|
|
/* 80007FD8 */ static void fadeOut(f32, _GXColor&);
|
2025-03-12 19:02:03 -04:00
|
|
|
/* 807DFAB4 */ static void fadeIn(f32 fadeSpeed, _GXColor& fadeColor) {
|
|
|
|
|
fadeOut(-fadeSpeed, fadeColor);
|
|
|
|
|
}
|
2022-01-25 12:24:14 -08:00
|
|
|
/* 80008028 */ static void fadeOut_f(f32, _GXColor&);
|
|
|
|
|
/* 800080A0 */ static void onBlure(const Mtx);
|
|
|
|
|
/* 80008078 */ static void onBlure();
|
|
|
|
|
/* 80008330 */ static void calcFade();
|
2022-01-04 04:53:20 -08:00
|
|
|
|
|
|
|
|
static JUTFader* getFader() { return mFader; }
|
2023-03-14 15:27:46 -07:00
|
|
|
static void setFader(JUTFader* fader) {
|
|
|
|
|
JFWDisplay::getManager()->setFader(fader);
|
|
|
|
|
mFader = fader;
|
|
|
|
|
}
|
|
|
|
|
|
2022-01-04 04:53:20 -08:00
|
|
|
static int startFadeOut(int param_0) { return JFWDisplay::getManager()->startFadeOut(param_0); }
|
|
|
|
|
static int startFadeIn(int param_0) { return JFWDisplay::getManager()->startFadeIn(param_0); }
|
2025-06-18 01:11:53 -04:00
|
|
|
static void setFadeColor(JUtility::TColor& color) { mFader->setColor(color); }
|
2023-03-14 15:27:46 -07:00
|
|
|
static void setClearColor(JUtility::TColor color) { JFWDisplay::getManager()->setClearColor(color); }
|
|
|
|
|
static void setBackColor(GXColor& color) { mBackColor = color; }
|
2022-01-25 12:24:14 -08:00
|
|
|
static void endFrame() { JFWDisplay::getManager()->endFrame(); }
|
2022-07-04 12:21:57 -07:00
|
|
|
static void offFade() { mFade = 0; }
|
|
|
|
|
static u8 isFade() { return mFade; }
|
|
|
|
|
static void offBlure() { mBlureFlag = false; }
|
2023-07-07 18:06:12 +03:00
|
|
|
static bool isBlure() { return mBlureFlag; }
|
2024-03-27 23:49:59 -07:00
|
|
|
static void setBlureRate(u8 i_rate) { mBlureRate = i_rate; }
|
2023-07-07 18:06:12 +03:00
|
|
|
static u8 getBlureRate() { return mBlureRate; }
|
|
|
|
|
static MtxP getBlureMtx() { return mBlureMtx; }
|
2022-04-28 13:58:43 -07:00
|
|
|
static void offAutoForcus() { data_80450BE7 = 0; }
|
2024-01-29 07:39:51 -08:00
|
|
|
static BOOL isAutoForcus() { return data_80450BE7; }
|
2022-04-10 15:29:28 -07:00
|
|
|
static void setTickRate(u32 rate) { JFWDisplay::getManager()->setTickRate(rate); }
|
|
|
|
|
static void waitBlanking(int wait) { JFWDisplay::getManager()->waitBlanking(wait); }
|
2025-06-30 15:17:50 -07:00
|
|
|
|
|
|
|
|
static f32 getWidthF() {
|
|
|
|
|
#if PLATFORM_WII || PLATFORM_SHIELD
|
|
|
|
|
return m_widthF;
|
|
|
|
|
#else
|
|
|
|
|
return 608.0f;
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static f32 getHeightF() {
|
|
|
|
|
#if PLATFORM_WII || PLATFORM_SHIELD
|
|
|
|
|
return m_heightF;
|
|
|
|
|
#else
|
|
|
|
|
return 448.0f;
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
|
2023-01-27 15:12:42 -08:00
|
|
|
static f32 getWidth() { return 608.0f; }
|
|
|
|
|
static f32 getHeight() { return 448.0f; }
|
2025-06-30 15:17:50 -07:00
|
|
|
|
|
|
|
|
static f32 getMinYF() {
|
|
|
|
|
#if PLATFORM_WII || PLATFORM_SHIELD
|
|
|
|
|
return m_minYF;
|
|
|
|
|
#else
|
|
|
|
|
return 0.0f;
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static f32 getMinXF() {
|
|
|
|
|
#if PLATFORM_WII || PLATFORM_SHIELD
|
|
|
|
|
return m_minXF;
|
|
|
|
|
#else
|
|
|
|
|
return 0.0f;
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static f32 getMaxYF() {
|
|
|
|
|
#if PLATFORM_WII || PLATFORM_SHIELD
|
|
|
|
|
return m_maxYF;
|
|
|
|
|
#else
|
|
|
|
|
return 448.0f;
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static f32 getMaxXF() {
|
|
|
|
|
#if PLATFORM_WII || PLATFORM_SHIELD
|
|
|
|
|
return m_maxXF;
|
|
|
|
|
#else
|
|
|
|
|
return 608.0f;
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
|
2023-06-26 03:12:47 -07:00
|
|
|
static f32 getAspect() { return 1.3571428f; }
|
2022-06-29 13:19:09 -07:00
|
|
|
static int getMinY() { return 0; }
|
|
|
|
|
static int getMinX() { return 0; }
|
|
|
|
|
static int getMaxY() { return 448; }
|
|
|
|
|
static int getMaxX() { return 608; }
|
|
|
|
|
static ResTIMG* getFrameBufferTimg() { return mFrameBufferTimg; }
|
2023-06-19 23:39:09 +03:00
|
|
|
static ResTIMG* getZbufferTimg() { return mZbufferTimg; }
|
2022-06-29 13:19:09 -07:00
|
|
|
static void* getFrameBufferTex() { return mFrameBufferTex; }
|
2023-07-07 18:06:12 +03:00
|
|
|
static void* getZbufferTex() { return mZbufferTex; }
|
2022-06-26 22:33:09 +02:00
|
|
|
static void setFadeRate(f32 rate) { mFadeRate = rate; }
|
|
|
|
|
static f32 getFadeRate() { return mFadeRate; }
|
2022-07-04 12:21:57 -07:00
|
|
|
static bloom_c* getBloom() { return &m_bloom; }
|
2023-01-27 15:12:42 -08:00
|
|
|
static GXColor& getFadeColor() { return mFadeColor; }
|
2023-03-14 15:27:46 -07:00
|
|
|
static GXColor& getBackColor() { return mBackColor; }
|
|
|
|
|
static void endRender() { JFWDisplay::getManager()->endRender(); }
|
2023-07-07 18:06:12 +03:00
|
|
|
static GXTexObj* getZbufferTexObj() { return &mZbufferTexObj; }
|
|
|
|
|
static GXTexObj* getFrameBufferTexObj() { return &mFrameBufferTexObj; }
|
|
|
|
|
static f32 getInvScale() { return 1.0f; }
|
2023-12-28 22:45:53 +02:00
|
|
|
static f32 getScale() { return 1.0f; }
|
2024-10-19 12:01:46 +03:00
|
|
|
static void setWideZoomLightProjection(Mtx m) {}
|
2024-11-11 07:53:04 -08:00
|
|
|
static void setFrameRate(u16 i_rate) { JFWDisplay::getManager()->setFrameRate(i_rate); }
|
2022-01-04 04:53:20 -08:00
|
|
|
|
2025-04-12 00:54:08 +03:00
|
|
|
// NONMATCHING - Need to define all mDoGph_gInf_c shieldD members
|
2025-06-30 15:17:50 -07:00
|
|
|
static u8 isWide() {
|
|
|
|
|
#if PLATFORM_WII || PLATFORM_SHIELD
|
|
|
|
|
return mWide == TRUE;
|
|
|
|
|
#else
|
|
|
|
|
return false;
|
|
|
|
|
#endif
|
|
|
|
|
}
|
2025-04-12 00:54:08 +03:00
|
|
|
|
2022-01-25 12:24:14 -08:00
|
|
|
static GXTexObj mFrameBufferTexObj;
|
|
|
|
|
static GXTexObj mZbufferTexObj;
|
|
|
|
|
static bloom_c m_bloom;
|
|
|
|
|
static Mtx mBlureMtx;
|
|
|
|
|
static GXColor mBackColor;
|
|
|
|
|
static GXColor mFadeColor;
|
2022-01-04 04:53:20 -08:00
|
|
|
static JUTFader* mFader;
|
2022-01-25 12:24:14 -08:00
|
|
|
static ResTIMG* mFrameBufferTimg;
|
|
|
|
|
static void* mFrameBufferTex;
|
|
|
|
|
static ResTIMG* mZbufferTimg;
|
|
|
|
|
static void* mZbufferTex;
|
2022-01-04 04:53:20 -08:00
|
|
|
static f32 mFadeRate;
|
|
|
|
|
static f32 mFadeSpeed;
|
2022-07-04 12:21:57 -07:00
|
|
|
static bool mBlureFlag;
|
2023-07-07 18:06:12 +03:00
|
|
|
static u8 mBlureRate;
|
2022-07-04 12:21:57 -07:00
|
|
|
static u8 mFade;
|
2025-06-30 15:17:50 -07:00
|
|
|
|
|
|
|
|
#if PLATFORM_WII || PLATFORM_SHIELD
|
2025-08-11 02:22:28 -04:00
|
|
|
static cXyz m_nowEffPos;
|
|
|
|
|
static cXyz m_oldEffPos;
|
|
|
|
|
static cXyz m_oldOldEffPos;
|
2025-06-30 15:17:50 -07:00
|
|
|
static u8 mWide;
|
|
|
|
|
static ResTIMG* m_fullFrameBufferTimg;
|
|
|
|
|
static void* m_fullFrameBufferTex;
|
|
|
|
|
static GXTexObj m_fullFrameBufferTexObj;
|
|
|
|
|
static f32 m_minXF;
|
|
|
|
|
static f32 m_minYF;
|
|
|
|
|
static f32 m_maxXF;
|
|
|
|
|
static f32 m_maxYF;
|
|
|
|
|
static f32 m_heightF;
|
|
|
|
|
static f32 m_widthF;
|
|
|
|
|
#endif
|
2022-01-04 04:53:20 -08:00
|
|
|
};
|
|
|
|
|
|
2021-03-28 22:49:05 +02:00
|
|
|
#endif /* M_DO_M_DO_GRAPHIC_H */
|