Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
d_a_movie_player.h
Go to the documentation of this file.
1#ifndef D_A_MOVIE_PLAYER_H
2#define D_A_MOVIE_PLAYER_H
3
4#include "f_op/f_op_actor.h"
5#include "d/d_drawlist.h"
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10
11typedef u8 THPSample;
12typedef s16 THPCoeff;
13typedef f32 THPQuantTab[64];
14
24
31
49
60
69
73
76
77static void __THPSetupBuffers(void);
85static void __THPRestartDefinition(void);
86static void __THPPrepBitStream(void);
87static void __THPDecompressYUV(void* tileY, void* tileU, void* tileV);
88static void __THPGQRRestore(void);
91static void __THPDecompressiMCURowNxN(void);
96
98static void __THPGQRSetup();
100
101#ifdef __cplusplus
102}
103#endif
104
113class daMP_c : public fopAc_ac_c {
114public:
115 /* 80031AD0 */ static int daMP_c_THPPlayerPlay();
116 /* 80031B24 */ static void daMP_c_THPPlayerPause();
117 /* 80031A78 */ static u32 daMP_c_Get_MovieRestFrame();
118 /* 80031AA4 */ static void daMP_c_Set_PercentMovieVolume(f32);
119 /* 80878BB8 */ int daMP_c_Get_arg_demoNo();
120 /* 80878C04 */ int daMP_c_Get_arg_movieNo();
121 /* 80878C28 */ int daMP_c_Init();
122 /* 80878D64 */ int daMP_c_Finish();
123 /* 80878D94 */ int daMP_c_Main();
124 /* 80878DD8 */ int daMP_c_Draw();
125 /* 80878ED4 */ daMP_c() {}
126
127 /* 80878E60 */ static int daMP_c_Callback_Init(fopAc_ac_c*);
128 /* 80878F18 */ static int daMP_c_Callback_Finish(daMP_c*);
129 /* 80878F38 */ static int daMP_c_Callback_Main(daMP_c*);
130 /* 80878F70 */ static int daMP_c_Callback_Draw(daMP_c*);
131
133
134private:
135 /* 0x568 */ u32 (*mpGetMovieRestFrame)(void);
137 /* 0x570 */ u32 (*mpTHPGetTotalFrame)(void);
138 /* 0x574 */ int (*mpTHPPlay)(void);
139 /* 0x578 */ void (*mpTHPStop)(void);
140 /* 0x57C */ int (*mpTHPPause)(void);
141};
142
143STATIC_ASSERT(sizeof(daMP_c) == 0x580);
144
146 /* 0x00 */ void* m00;
147 /* 0x04 */ s32 m04;
148};
149
151public:
152 /* 80878FD8 */ daMP_Dlst_base_c() {}
153
154 /* 80878DB8 */ virtual void draw();
155};
156
158 /* 0x00 */ u32 field_0x0;
159 /* 0x04 */ u32 field_0x4;
160 /* 0x08 */ u8 field_0x8[0x0C - 0x08];
161};
162
164 /* 0x00 */ u8 field_0x0[0xC - 0x0];
165 /* 0x0C */ u32 field_0xc;
166};
167
168// made up
171 /* 0x03C */ char* field_0x3c;
172 /* 0x040 */ int field_0x40;
173 /* 0x044 */ int field_0x44;
174 /* 0x048 */ int field_0x48;
175 /* 0x04C */ f32 field_0x4c;
176 /* 0x050 */ u32 mTotalFrames;
177 /* 0x054 */ int field_0x54;
178 /* 0x058 */ int field_0x58;
179 /* 0x05C */ int field_0x5c;
180 /* 0x060 */ int field_0x60;
181 /* 0x064 */ int field_0x64;
182 /* 0x068 */ u8 field_0x68[0x06C - 0x068];
183 struct {
186 u8 _5[0x14 - 0x5];
187 } /* 0x06C */ field_0x6c; // not sure if this is right
190 /* 0x09C */ int field_0x9c;
191 /* 0x0A0 */ int field_0xa0;
192 /* 0x0A4 */ u8 mState;
193 /* 0x0A5 */ u8 field_0xa5;
194 /* 0x0A6 */ u8 field_0xa6;
195 /* 0x0A7 */ u8 field_0xa7;
196 /* 0x0A8 */ int field_0xa8;
197 /* 0x0AC */ int field_0xac;
198 /* 0x0B0 */ int field_0xb0;
199 /* 0x0B4 */ int field_0xb4;
200 /* 0x0B8 */ int field_0xb8;
201 /* 0x0BC */ int field_0xbc;
202 /* 0x0C0 */ int field_0xc0;
203 /* 0x0C4 */ u8 field_0xC4[0x0C8 - 0x0C4];
204 /* 0x0C8 */ s64 field_0xc8;
205 /* 0x0D0 */ int field_0xd0;
206 /* 0x0D4 */ int field_0xd4;
207 /* 0x0D8 */ int field_0xd8;
208 /* 0x0DC */ f32 field_0xdc;
209 /* 0x0E0 */ f32 field_0xe0;
210 /* 0x0E4 */ f32 field_0xe4;
211 /* 0x0E8 */ int field_0xe8;
212 /* 0x0EC */ int field_0xec;
213 /* 0x0F0 */ int field_0xf0;
214 /* 0x0F4 */ int field_0xf4;
215 /* 0x0F8 */ int field_0xf8;
216 /* 0x0FC */ int field_0xfc;
217 /* 0x100 */ int field_0x100;
218 /* 0x104 */ u8 field_0x104[0x10C - 0x104];
219 /* 0x10C */ int field_0x10c;
220 /* 0x110 */ u8 field_0x110[0x118 - 0x110];
221 /* 0x118 */ int field_0x118;
222 /* 0x11C */ u8 field_0x11C[0x124 - 0x11C];
223 /* 0x124 */ int field_0x124;
224 /* 0x128 */ u8 field_0x128[0x130 - 0x128];
225 /* 0x130 */ int field_0x130;
226 /* 0x134 */ u8 field_0x134[0x13C - 0x134];
227 /* 0x13C */ int field_0x13c;
228 /* 0x140 */ u8 field_0x140[0x148 - 0x140];
229 /* 0x148 */ int field_0x148;
230 /* 0x14C */ u8 field_0x14C[0x154 - 0x14C];
231 /* 0x154 */ int field_0x154;
232 /* 0x158 */ u8 field_0x158[0x160 - 0x158];
233 /* 0x160 */ int field_0x160;
234 /* 0x164 */ u8 field_0x164[0x16C - 0x164];
235 /* 0x16C */ int field_0x16c;
236 /* 0x170 */ u8 field_0x170[0x178 - 0x170];
237 /* 0x178 */ int field_0x178;
238 /* 0x17C */ int field_0x17c;
239 /* 0x180 */ int field_0x180;
240 /* 0x184 */ u8 field_0x184[0x1A8 - 0x184];
241 /* 0x1A8 */ int field_0x1a8;
242 /* 0x1AC */ int field_0x1ac;
243 /* 0x1B0 */ int field_0x1b0;
244 /* 0x1B4 */ int field_0x1b4;
245 /* 0x1B8 */ int field_0x1b8;
246 /* 0x1BC */ int field_0x1bc;
247 /* 0x1C0 */ int field_0x1c0;
248 /* 0x1C4 */ int field_0x1c4;
249 /* 0x1C8 */ int field_0x1c8;
250};
251
253 return *(s32*)readBuf->m00;
254}
255
256void daMP_PrepareReady(int);
257
258#endif /* D_A_MOVIE_PLAYER_H */
T cLib_calcTimer(T *value)
Definition c_lib.h:74
Definition d_drawlist.h:31
Definition d_a_movie_player.h:150
daMP_Dlst_base_c()
Definition d_a_movie_player.h:152
virtual void draw()
Definition d_a_movie_player.cpp:3704
Movie Player.
Definition d_a_movie_player.h:113
int(* mpTHPPlay)(void)
Definition d_a_movie_player.h:138
static int daMP_c_THPPlayerPlay()
Definition d_com_static.cpp:433
u32(* mpGetMovieRestFrame)(void)
Definition d_a_movie_player.h:135
int daMP_c_Get_arg_demoNo()
Definition d_a_movie_player.cpp:3649
static int daMP_c_Callback_Init(fopAc_ac_c *)
Definition d_a_movie_player.cpp:3719
u32(* mpTHPGetTotalFrame)(void)
Definition d_a_movie_player.h:137
static int daMP_c_Callback_Finish(daMP_c *)
Definition d_a_movie_player.cpp:3725
static daMP_c * m_myObj
Definition d_a_movie_player.h:132
int daMP_c_Finish()
Definition d_a_movie_player.cpp:3691
static void daMP_c_Set_PercentMovieVolume(f32)
Definition d_com_static.cpp:428
int daMP_c_Main()
Definition d_a_movie_player.cpp:3698
void(* mpSetPercentMovieVol)(f32)
Definition d_a_movie_player.h:136
static int daMP_c_Callback_Draw(daMP_c *)
Definition d_a_movie_player.cpp:3739
static u32 daMP_c_Get_MovieRestFrame()
Definition d_com_static.cpp:423
void(* mpTHPStop)(void)
Definition d_a_movie_player.h:139
int daMP_c_Init()
Definition d_a_movie_player.cpp:3660
static void daMP_c_THPPlayerPause()
Definition d_com_static.cpp:444
daMP_c()
Definition d_a_movie_player.h:125
int daMP_c_Draw()
Definition d_a_movie_player.cpp:3712
static int daMP_c_Callback_Main(daMP_c *)
Definition d_a_movie_player.cpp:3730
int daMP_c_Get_arg_movieNo()
Definition d_a_movie_player.cpp:3655
int(* mpTHPPause)(void)
Definition d_a_movie_player.h:140
static void __THPInverseDCTY8(THPCoeff *in, u32 xPos)
static s32 __THPHuffDecodeTab(THPFileInfo *info, THPHuffmanTab *h)
static void __THPSetupBuffers(void)
static void __THPAudioInitialize(THPAudioDecodeInfo *info, u8 *ptr)
static void __THPHuffDecodeDCTCompU(THPFileInfo *info, THPCoeff *block)
static u8 __THPReadScaneHeader(void)
static void __THPDecompressYUV(void *tileY, void *tileU, void *tileV)
f32 THPQuantTab[64]
Definition d_a_movie_player.h:13
static void __THPPrepBitStream(void)
static u8 __THPReadQuantizationTable(void)
static u32 THPAudioDecode(s16 *audioBuffer, u8 *audioFrame, s32 flag)
static void __THPHuffDecodeDCTCompY(THPFileInfo *info, THPCoeff *block)
static void __THPHuffGenerateDecoderTables(u8 tabIndex)
static void __THPInverseDCTNoYPos(THPCoeff *in, u32 xPos)
static void __THPDecompressiMCURow512x448(void)
static void __THPHuffGenerateCodeTable(void)
void daMP_PrepareReady(int)
Definition d_a_movie_player.cpp:3392
struct _THPComponent THPComponent
static u8 __THPReadHuffmanTableSpecification(void)
s16 THPCoeff
Definition d_a_movie_player.h:12
static void __THPRestartDefinition(void)
static s32 __THPAudioGetNewSample(THPAudioDecodeInfo *info)
u8 THPSample
Definition d_a_movie_player.h:11
STATIC_ASSERT(sizeof(daMP_c)==0x580)
static void __THPDecompressiMCURowNxN(void)
static void __THPGQRRestore(void)
static void __THPHuffDecodeDCTCompV(THPFileInfo *info, THPCoeff *block)
static void __THPHuffGenerateSizeTable(void)
static void __THPDecompressiMCURow640x480(void)
static void __THPGQRSetup()
s32 daMP_NEXT_READ_SIZE(daMP_THPReadBuffer *readBuf)
Definition d_a_movie_player.h:252
static u8 __THPReadFrameHeader(void)
struct _THPHuffmanTab THPHuffmanTab
struct _THPFileInfo THPFileInfo
static volatile BOOL flag
Definition dspproc.cpp:20
static u8 block[48]
Definition fstload.c:39
Definition dvd.h:75
Definition d_a_movie_player.h:61
s16 yn1
Definition d_a_movie_player.h:66
s16 yn2
Definition d_a_movie_player.h:67
u8 predictor
Definition d_a_movie_player.h:64
u8 * encodeData
Definition d_a_movie_player.h:62
u32 offsetNibbles
Definition d_a_movie_player.h:63
u8 scale
Definition d_a_movie_player.h:65
Definition d_a_movie_player.h:163
u8 field_0x0[0xC - 0x0]
Definition d_a_movie_player.h:164
u32 field_0xc
Definition d_a_movie_player.h:165
Definition d_a_movie_player.h:50
s16 lCoef[8][2]
Definition d_a_movie_player.h:53
s16 rYn2
Definition d_a_movie_player.h:58
u32 offsetNextChannel
Definition d_a_movie_player.h:51
u32 sampleSize
Definition d_a_movie_player.h:52
s16 rCoef[8][2]
Definition d_a_movie_player.h:54
s16 lYn1
Definition d_a_movie_player.h:55
s16 lYn2
Definition d_a_movie_player.h:56
s16 rYn1
Definition d_a_movie_player.h:57
Definition d_a_movie_player.h:157
u8 field_0x8[0x0C - 0x08]
Definition d_a_movie_player.h:160
u32 field_0x0
Definition d_a_movie_player.h:158
u32 field_0x4
Definition d_a_movie_player.h:159
Definition d_a_movie_player.h:25
THPCoeff predDC
Definition d_a_movie_player.h:29
u8 DCTableSelector
Definition d_a_movie_player.h:27
u8 ACTableSelector
Definition d_a_movie_player.h:28
u8 quantizationTableSelector
Definition d_a_movie_player.h:26
Definition d_a_movie_player.h:32
u16 xPixelSize
Definition d_a_movie_player.h:36
u16 MCUsPerRow
Definition d_a_movie_player.h:38
THPHuffmanTab huffmanTabs[4]
Definition d_a_movie_player.h:34
THPQuantTab quantTabs[3]
Definition d_a_movie_player.h:33
u32 currByte
Definition d_a_movie_player.h:41
u8 RST
Definition d_a_movie_player.h:44
u8 * dLC[3]
Definition d_a_movie_player.h:47
u8 validHuffmanTabs
Definition d_a_movie_player.h:43
u16 decompressedY
Definition d_a_movie_player.h:39
THPComponent components[3]
Definition d_a_movie_player.h:35
u16 currMCU
Definition d_a_movie_player.h:46
u16 nMCU
Definition d_a_movie_player.h:45
u16 yPixelSize
Definition d_a_movie_player.h:37
u8 * c
Definition d_a_movie_player.h:40
u32 cnt
Definition d_a_movie_player.h:42
Definition d_a_movie_player.h:15
s32 maxCode[18]
Definition d_a_movie_player.h:19
u8 pad[11]
Definition d_a_movie_player.h:22
s32 valPtr[18]
Definition d_a_movie_player.h:20
u8 quick[32]
Definition d_a_movie_player.h:16
u8 Vij1
Definition d_a_movie_player.h:21
u8 increment[32]
Definition d_a_movie_player.h:17
u8 * Vij
Definition d_a_movie_player.h:18
Definition d_a_movie_player.h:169
int field_0xc0
Definition d_a_movie_player.h:202
int field_0x124
Definition d_a_movie_player.h:223
int field_0xa8
Definition d_a_movie_player.h:196
f32 field_0xe0
Definition d_a_movie_player.h:209
u8 field_0x158[0x160 - 0x158]
Definition d_a_movie_player.h:232
int field_0x13c
Definition d_a_movie_player.h:227
int field_0x64
Definition d_a_movie_player.h:181
int field_0xa0
Definition d_a_movie_player.h:191
int field_0xb8
Definition d_a_movie_player.h:200
u8 field_0x140[0x148 - 0x140]
Definition d_a_movie_player.h:228
THPAudioInfo mAudioInfo
Definition d_a_movie_player.h:189
f32 field_0x4c
Definition d_a_movie_player.h:175
int field_0xe8
Definition d_a_movie_player.h:211
int field_0x5c
Definition d_a_movie_player.h:179
int field_0x9c
Definition d_a_movie_player.h:190
int field_0x16c
Definition d_a_movie_player.h:235
char * field_0x3c
Definition d_a_movie_player.h:171
int field_0x1c0
Definition d_a_movie_player.h:247
s64 field_0xc8
Definition d_a_movie_player.h:204
struct daMP_Player_c::@21 field_0x6c
int field_0x54
Definition d_a_movie_player.h:177
int field_0x17c
Definition d_a_movie_player.h:238
int field_0x1b0
Definition d_a_movie_player.h:243
int field_0xac
Definition d_a_movie_player.h:197
int field_0x1a8
Definition d_a_movie_player.h:241
int field_0xf4
Definition d_a_movie_player.h:214
int field_0x160
Definition d_a_movie_player.h:233
u8 field_0x184[0x1A8 - 0x184]
Definition d_a_movie_player.h:240
int field_0x1c8
Definition d_a_movie_player.h:249
int field_0x10c
Definition d_a_movie_player.h:219
int field_0xd0
Definition d_a_movie_player.h:205
u8 field_0xa5
Definition d_a_movie_player.h:193
int field_0x1b8
Definition d_a_movie_player.h:245
int field_0xf0
Definition d_a_movie_player.h:213
int field_0x60
Definition d_a_movie_player.h:180
int field_0x48
Definition d_a_movie_player.h:174
int field_0x154
Definition d_a_movie_player.h:231
u8 field_0x134[0x13C - 0x134]
Definition d_a_movie_player.h:226
int field_0x148
Definition d_a_movie_player.h:229
int field_0x178
Definition d_a_movie_player.h:237
int field_0x180
Definition d_a_movie_player.h:239
u8 field_0x68[0x06C - 0x068]
Definition d_a_movie_player.h:182
u8 field_0x11C[0x124 - 0x11C]
Definition d_a_movie_player.h:222
int field_0x130
Definition d_a_movie_player.h:225
int field_0x118
Definition d_a_movie_player.h:221
int field_0x40
Definition d_a_movie_player.h:172
DVDFileInfo mFileInfo
Definition d_a_movie_player.h:170
int field_0xf8
Definition d_a_movie_player.h:215
int field_0x1c4
Definition d_a_movie_player.h:248
int field_0x58
Definition d_a_movie_player.h:178
u8 field_0x104[0x10C - 0x104]
Definition d_a_movie_player.h:218
u8 field_0x128[0x130 - 0x128]
Definition d_a_movie_player.h:224
f32 field_0xdc
Definition d_a_movie_player.h:208
u8 field_0xC4[0x0C8 - 0x0C4]
Definition d_a_movie_player.h:203
u32 mTotalFrames
Definition d_a_movie_player.h:176
u8 field_0xa6
Definition d_a_movie_player.h:194
u8 field_0xa7
Definition d_a_movie_player.h:195
THPVideoInfo mVideoInfo
Definition d_a_movie_player.h:188
int field_0xd8
Definition d_a_movie_player.h:207
int field_0x44
Definition d_a_movie_player.h:173
int field_0xec
Definition d_a_movie_player.h:212
int field_0xb4
Definition d_a_movie_player.h:199
u8 field_0x14C[0x154 - 0x14C]
Definition d_a_movie_player.h:230
f32 field_0xe4
Definition d_a_movie_player.h:210
int field_0xbc
Definition d_a_movie_player.h:201
u8 field_0x164[0x16C - 0x164]
Definition d_a_movie_player.h:234
int field_0xd4
Definition d_a_movie_player.h:206
u8 field_0x170[0x178 - 0x170]
Definition d_a_movie_player.h:236
int field_0xfc
Definition d_a_movie_player.h:216
int field_0xb0
Definition d_a_movie_player.h:198
int field_0x100
Definition d_a_movie_player.h:217
u8 _5[0x14 - 0x5]
Definition d_a_movie_player.h:186
u32 _0
Definition d_a_movie_player.h:184
int field_0x1bc
Definition d_a_movie_player.h:246
u8 field_0x110[0x118 - 0x110]
Definition d_a_movie_player.h:220
int field_0x1ac
Definition d_a_movie_player.h:242
u8 mState
Definition d_a_movie_player.h:192
u8 _4
Definition d_a_movie_player.h:185
int field_0x1b4
Definition d_a_movie_player.h:244
Definition d_a_movie_player.h:145
s32 m04
Definition d_a_movie_player.h:147
void * m00
Definition d_a_movie_player.h:146
Definition d_a_ep.cpp:19
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
signed long s32
Definition types.h:6
unsigned char u8
Definition types.h:8