Files
tp/include/m_Do/m_Do_graphic.h
T

117 lines
4.5 KiB
C++
Raw Normal View History

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"
2023-05-12 12:10:14 -07:00
#include "dolphin/mtx/mtx.h"
2021-03-28 22:49:05 +02:00
#include "dolphin/types.h"
2023-05-12 12:10:14 -07:00
class JUTFader;
2022-01-25 12:24:14 -08:00
int mDoGph_Create();
extern u8 mBlureFlag__13mDoGph_gInf_c; // Blure
extern u8 mFade__13mDoGph_gInf_c; // Fade
2022-04-28 13:58:43 -07:00
extern bool data_80450BE7; // AutoForcus
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:
2022-01-25 12:24:14 -08:00
// bloom_c() { m_buffer = NULL; } matches sinit
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
u8 getEnable() { return mEnable; }
GXColor* getMonoColor() { return &mMonoColor; }
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&);
2022-10-04 17:29:53 -07:00
/* 807DFAB4 */ static void fadeIn(f32, _GXColor&);
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; }
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); }
static void setFadeColor(JUtility::TColor color) { mFader->mColor.set(color); }
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(); }
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; }
static u8 getBlureRate() { return mBlureRate; }
static MtxP getBlureMtx() { return mBlureMtx; }
2022-04-28 13:58:43 -07:00
static void offAutoForcus() { data_80450BE7 = 0; }
2023-07-07 18:06:12 +03: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); }
2022-04-28 13:58:43 -07:00
static f32 getWidthF() { return 608.0f; }
static f32 getHeightF() { return 448.0f; }
static f32 getWidth() { return 608.0f; }
static f32 getHeight() { return 448.0f; }
static f32 getMinYF() { return 0.0f; }
static f32 getMinXF() { return 0.0f; }
static f32 getMaxYF() { return 448.0f; }
static f32 getMaxXF() { return 608.0f; }
2023-06-26 03:12:47 -07:00
static f32 getAspect() { return 1.3571428f; }
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; }
static ResTIMG* getZbufferTimg() { return mZbufferTimg; }
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; }
static bloom_c* getBloom() { return &m_bloom; }
static GXColor& getFadeColor() { return mFadeColor; }
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; }
2022-01-04 04:53:20 -08: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;
static bool mBlureFlag;
2023-07-07 18:06:12 +03:00
static u8 mBlureRate;
static u8 mFade;
2022-01-04 04:53:20 -08:00
};
2021-03-28 22:49:05 +02:00
#endif /* M_DO_M_DO_GRAPHIC_H */