Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
JFWDisplay.h
Go to the documentation of this file.
1#ifndef JFWDISPLAY_H
2#define JFWDISPLAY_H
3
9
10typedef struct _GXColor GXColor;
12class JKRHeap;
13
15
20class JFWAlarm : public OSAlarm {
21public:
24 void createAlarm() { OSCreateAlarm(this); }
25 void cancelAlarm() { OSCancelAlarm(this); }
28 OSThread* getThread() const { return mThread; }
29 void setThread(OSThread* thread) { mThread = thread; }
30
32
33public:
34 /* 0x28 */ OSThread* mThread;
36};
37
43public:
44 enum EDrawDone {
45 /* 0x0 */ UNK_METHOD_0 = 0,
46 /* 0x1 */ UNK_METHOD_1 = 1
47 };
48
49 /* 80272040 */ void ctor_subroutine(bool);
50 /* 802720F8 */ JFWDisplay(JKRHeap*, JUTXfb::EXfbNumber, bool);
51 /* 802721DC */ static JFWDisplay* createManager(_GXRenderModeObj const*, JKRHeap*,
52 JUTXfb::EXfbNumber, bool);
53 /* 802722B8 */ void prepareCopyDisp();
54 /* 802723AC */ void drawendXfb_single();
55 /* 802723F4 */ void exchangeXfb_double();
56 /* 802724FC */ void exchangeXfb_triple();
57 /* 80272574 */ void copyXfb_triple();
58 /* 802725F8 */ void preGX();
59 /* 8027268C */ void endGX();
60 /* 80272C60 */ void waitBlanking(int);
61 /* 80272E10 */ void threadSleep(s64);
62 /* 80272EB8 */ void clearEfb_init();
63 /* 80272F9C */ void clearEfb(int, int, int, int, _GXColor);
64 /* 80272F2C */ void clearEfb();
65 /* 80272F58 */ void clearEfb(_GXColor);
66 /* 8027331C */ void calcCombinationRatio();
67
68 /* 80272798 */ virtual void beginRender();
69 /* 80272A04 */ virtual void endRender();
70 /* 80272AB0 */ virtual void endFrame();
71 /* 80272160 */ virtual ~JFWDisplay();
72
73 static JFWDisplay* getManager() { return sManager; }
74
76 if (mFader != NULL) {
78 }
79 return 1;
80 }
81
83 if (mFader != NULL) {
84 return mFader->startFadeIn(param_0);
85 }
86 return 1;
87 }
88
91 mFrameRate = 0;
92 }
93
96 mTickRate = 0;
97 }
98
100 void setFader(JUTFader* fader) { mFader = fader; }
102 JUTFader* getFader() const { return mFader; }
104
106
107private:
108 /* 0x04 */ JUTFader* mFader;
110 /* 0x0C */ u32 mZClear;
111 /* 0x10 */ JUTXfb* mXfbManager;
112 /* 0x14 */ u16 mGamma;
114 /* 0x1C */ u16 mFrameRate;
115 /* 0x20 */ u32 mTickRate;
116 /* 0x24 */ bool mEnableAlpha;
117 /* 0x26 */ u16 mClamp;
119 /* 0x2C */ u32 field_0x2c;
120 /* 0x30 */ u32 field_0x30;
121 /* 0x34 */ u32 field_0x34;
122 /* 0x38 */ int field_0x38;
123 /* 0x3C */ int field_0x3c;
124 /* 0x40 */ bool field_0x40;
126 /* 0x48 */ s16 field_0x48;
127 /* 0x4A */ u8 field_0x4a;
128};
129
130inline void JUTChangeFrameBuffer(void* buffer, u16 height, u16 width) {
132}
133
134static void JFWDrawDoneAlarm();
137static void waitForTick(u32, u16);
138static void diagnoseGpHang();
139
140#endif /* JFWDISPLAY_H */
void(* JFWDisplayUnkFunc)(void)
Definition JFWDisplay.h:14
static void diagnoseGpHang()
void JUTChangeFrameBuffer(void *buffer, u16 height, u16 width)
Definition JFWDisplay.h:130
static void JFWDrawDoneAlarm()
static void JFWThreadAlarmHandler(OSAlarm *, OSContext *)
static void JFWGXAbortAlarmHandler(OSAlarm *, OSContext *)
static void waitForTick(u32, u16)
void OSCreateAlarm(OSAlarm *alarm)
Definition OSAlarm.c:26
void OSCancelAlarm(OSAlarm *alarm)
Definition OSAlarm.c:112
static OSTime buffer
Definition ai.c:202
T cLib_calcTimer(T *value)
Definition c_lib.h:74
Definition JFWDisplay.h:20
static JSUList< JFWAlarm > sList
Definition JFWDisplay.h:31
void appendLink()
Definition JFWDisplay.h:27
JFWAlarm()
Definition JFWDisplay.h:22
void removeLink()
Definition JFWDisplay.h:26
OSThread * mThread
Definition JFWDisplay.h:34
void createAlarm()
Definition JFWDisplay.h:24
JSULink< JFWAlarm > mLink
Definition JFWDisplay.h:35
void cancelAlarm()
Definition JFWDisplay.h:25
OSThread * getThread() const
Definition JFWDisplay.h:28
~JFWAlarm()
Definition JFWDisplay.h:23
void setThread(OSThread *thread)
Definition JFWDisplay.h:29
Definition JFWDisplay.h:42
int field_0x38
Definition JFWDisplay.h:122
u16 mGamma
Definition JFWDisplay.h:112
void drawendXfb_single()
Definition JFWDisplay.cpp:120
u16 mClamp
Definition JFWDisplay.h:117
int startFadeIn(int param_0)
Definition JFWDisplay.h:82
static JFWDisplay * createManager(_GXRenderModeObj const *, JKRHeap *, JUTXfb::EXfbNumber, bool)
Definition JFWDisplay.cpp:74
bool field_0x40
Definition JFWDisplay.h:124
JUTFader * getFader() const
Definition JFWDisplay.h:102
void calcCombinationRatio()
Definition JFWDisplay.cpp:532
void clearEfb()
Definition JFWDisplay.cpp:452
virtual void endFrame()
Definition JFWDisplay.cpp:337
EDrawDone mDrawDoneMethod
Definition JFWDisplay.h:113
virtual void beginRender()
Definition JFWDisplay.cpp:248
void preGX()
Definition JFWDisplay.cpp:201
void setFader(JUTFader *fader)
Definition JFWDisplay.h:100
void prepareCopyDisp()
Definition JFWDisplay.cpp:96
void threadSleep(s64)
Definition JFWDisplay.cpp:428
u32 mZClear
Definition JFWDisplay.h:110
JUTFader * mFader
Definition JFWDisplay.h:108
f32 mCombinationRatio
Definition JFWDisplay.h:118
void setFrameRate(u16 rate)
Definition JFWDisplay.h:94
JUtility::TColor mClearColor
Definition JFWDisplay.h:109
void clearEfb_init()
Definition JFWDisplay.cpp:445
bool mEnableAlpha
Definition JFWDisplay.h:116
u32 field_0x30
Definition JFWDisplay.h:120
u32 field_0x34
Definition JFWDisplay.h:121
void resetFader()
Definition JFWDisplay.h:101
void setClearColor(JUtility::TColor color)
Definition JFWDisplay.h:103
u32 field_0x2c
Definition JFWDisplay.h:119
void waitBlanking(int)
Definition JFWDisplay.cpp:373
void copyXfb_triple()
Definition JFWDisplay.cpp:187
static JFWDisplay * getManager()
Definition JFWDisplay.h:73
u8 field_0x4a
Definition JFWDisplay.h:127
s16 field_0x48
Definition JFWDisplay.h:126
JUTXfb * mXfbManager
Definition JFWDisplay.h:111
virtual void endRender()
Definition JFWDisplay.cpp:309
void ctor_subroutine(bool)
Definition JFWDisplay.cpp:10
void exchangeXfb_double()
Definition JFWDisplay.cpp:132
void setDrawDoneMethod(EDrawDone drawDone)
Definition JFWDisplay.h:99
void exchangeXfb_triple()
Definition JFWDisplay.cpp:168
JFWDisplayUnkFunc field_0x44
Definition JFWDisplay.h:125
u32 mTickRate
Definition JFWDisplay.h:115
u16 mFrameRate
Definition JFWDisplay.h:114
virtual ~JFWDisplay()
Definition JFWDisplay.cpp:59
int field_0x3c
Definition JFWDisplay.h:123
bool startFadeOut(int param_0)
Definition JFWDisplay.h:75
static JFWDisplay * sManager
Definition JFWDisplay.h:105
void setTickRate(u32 rate)
Definition JFWDisplay.h:89
EDrawDone
Definition JFWDisplay.h:44
@ UNK_METHOD_0
Definition JFWDisplay.h:45
@ UNK_METHOD_1
Definition JFWDisplay.h:46
void endGX()
Definition JFWDisplay.cpp:220
Definition JKRHeap.h:16
Definition JSUList.h:96
bool remove(JSULink< T > *link)
Definition JSUList.h:111
bool append(JSULink< T > *link)
Definition JSUList.h:103
static JUTDirectPrint * getManager()
Definition JUTDirectPrint.h:33
void changeFrameBuffer(void *, u16, u16)
Definition JUTDirectPrint.cpp:174
Definition JUTFader.h:11
virtual bool startFadeIn(int)
Definition JUTFader.cpp:65
virtual bool startFadeOut(int)
Definition JUTFader.cpp:78
Definition JUTXfb.h:13
EXfbNumber
Definition JUTXfb.h:15
static SECTION_DATA u8 color[4]
Definition d_a_obj_crope.cpp:225
Definition TColor.h:12
Definition OSAlarm.h:19
Definition OSContext.h:137
Definition OSThread.h:56
Definition d_a_ep.cpp:68
Definition GXStruct.h:22
unsigned long u32
Definition types.h:10
signed long long s64
Definition types.h:7
float f32
Definition types.h:22
signed short s16
Definition types.h:5
unsigned short u16
Definition types.h:9
unsigned char u8
Definition types.h:8