mirror of
https://github.com/zeldaret/tww.git
synced 2026-08-13 20:15:02 -04:00
d_a_movie_player fixes
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#ifndef JSYSTEM_PCH
|
||||
#define JSYSTEM_PCH
|
||||
|
||||
#include "JSystem/JSupport/JSUList.h"
|
||||
#include "JSystem/J3DGraphBase/J3DShape.h"
|
||||
#include "JSystem/JSupport/JSUList.h" // IWYU pragma: export
|
||||
#include "JSystem/J3DGraphBase/J3DShape.h" // IWYU pragma: export
|
||||
|
||||
#endif /* JSYSTEM_PCH */
|
||||
|
||||
@@ -6,9 +6,11 @@
|
||||
#include "d/d_drawlist.h"
|
||||
#include "dolphin/dvd/dvd.h"
|
||||
|
||||
#if VERSION > VERSION_DEMO
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
typedef u8 THPSample;
|
||||
typedef s16 THPCoeff;
|
||||
@@ -45,8 +47,10 @@ static void __THPInverseDCTY8(THPCoeff* in, u32 xPos);
|
||||
static void __THPGQRSetup();
|
||||
static s32 __THPHuffDecodeTab(THPFileInfo* info, THPHuffmanTab* h);
|
||||
|
||||
#if VERSION > VERSION_DEMO
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
} // extern "C"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
class daMP_c : public fopAc_ac_c {
|
||||
@@ -63,7 +67,7 @@ public:
|
||||
|
||||
public:
|
||||
/* 0x290 */ u32 (*mpGetMovieRestFrame)();
|
||||
/* 0x294 */ u32 (*mpSetPercentMovieVol)(f32);
|
||||
/* 0x294 */ void (*mpSetPercentMovieVol)(f32);
|
||||
#if VERSION == VERSION_PAL
|
||||
/* 0x29C */ u32 (*mpTHPGetTotalFrame)(void);
|
||||
#endif
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "d/d_drawlist.h"
|
||||
#include "d/d_event.h"
|
||||
#include "d/d_event_manager.h"
|
||||
#include "d/d_item_data.h"
|
||||
#include "d/d_map.h"
|
||||
#include "d/d_particle.h"
|
||||
#include "d/d_resorce.h"
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "JSystem/JKernel/JKRFileFinder.h" // IWYU pragma: export
|
||||
#include "d/d_bg_s_lin_chk.h" // IWYU pragma: export
|
||||
#include "m_Do/m_Do_hostIO.h" // IWYU pragma: export
|
||||
#include "m_Do/m_Do_graphic.h" // IWYU pragma: export
|
||||
#include "d/d_cc_uty.h" // IWYU pragma: export
|
||||
#include "d/d_magma.h" // IWYU pragma: export
|
||||
#include "d/d_mesg.h" // IWYU pragma: export
|
||||
|
||||
+1
-32
@@ -28,7 +28,7 @@ typedef struct _THPComponent {
|
||||
THPCoeff predDC;
|
||||
} THPComponent;
|
||||
|
||||
typedef struct _THPFileInfo {
|
||||
typedef struct _local_THPFileInfo {
|
||||
THPQuantTab quantTabs[3];
|
||||
THPHuffmanTab huffmanTabs[4];
|
||||
THPComponent components[3];
|
||||
@@ -116,37 +116,6 @@ typedef struct THPHeader {
|
||||
#define THP_READ_BUFFER_COUNT 10
|
||||
#define THP_TEXTURE_SET_COUNT 3
|
||||
|
||||
static u32 THPAudioDecode(s16* audioBuffer, u8* audioFrame, s32 flag);
|
||||
static s32 __THPAudioGetNewSample(THPAudioDecodeInfo* info);
|
||||
static void __THPAudioInitialize(THPAudioDecodeInfo* info, u8* ptr);
|
||||
|
||||
s32 __THPAudioGetNewSample(THPAudioDecodeInfo*);
|
||||
void __THPAudioInitialize(THPAudioDecodeInfo*, u8*);
|
||||
|
||||
static void __THPSetupBuffers(void);
|
||||
static u8 __THPReadFrameHeader(void);
|
||||
static u8 __THPReadScaneHeader(void);
|
||||
static u8 __THPReadQuantizationTable(void);
|
||||
static u8 __THPReadHuffmanTableSpecification(void);
|
||||
static void __THPHuffGenerateSizeTable(void);
|
||||
static void __THPHuffGenerateCodeTable(void);
|
||||
static void __THPHuffGenerateDecoderTables(u8 tabIndex);
|
||||
static void __THPRestartDefinition(void);
|
||||
static void __THPPrepBitStream(void);
|
||||
static void __THPDecompressYUV(void* tileY, void* tileU, void* tileV);
|
||||
static void __THPGQRRestore(void);
|
||||
static void __THPDecompressiMCURow512x448(void);
|
||||
static void __THPDecompressiMCURow640x480(void);
|
||||
static void __THPDecompressiMCURowNxN(void);
|
||||
static void __THPInverseDCTNoYPos(THPCoeff* in, u32 xPos);
|
||||
static void __THPHuffDecodeDCTCompY(THPFileInfo* info, THPCoeff* block);
|
||||
static void __THPHuffDecodeDCTCompU(THPFileInfo* info, THPCoeff* block);
|
||||
static void __THPHuffDecodeDCTCompV(THPFileInfo* info, THPCoeff* block);
|
||||
|
||||
static void __THPInverseDCTY8(THPCoeff* in, u32 xPos);
|
||||
static void __THPGQRSetup();
|
||||
static s32 __THPHuffDecodeTab(THPFileInfo* info, THPHuffmanTab* h);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -62,68 +62,72 @@ static const f64 __THPAANScaleFactor[8] = {
|
||||
|
||||
#define THPROUNDUP(a, b) ((((s32)(a)) + ((s32)(b)-1L)) / ((s32)(b)))
|
||||
|
||||
daMP_Player_c daMP_ActivePlayer;
|
||||
static daMP_Player_c daMP_ActivePlayer;
|
||||
|
||||
BOOL daMP_ReadThreadCreated;
|
||||
OSMessageQueue daMP_FreeReadBufferQueue;
|
||||
OSMessageQueue daMP_ReadedBufferQueue;
|
||||
OSMessageQueue daMP_ReadedBufferQueue2;
|
||||
OSMessage daMP_FreeReadBufferMessage[10];
|
||||
OSMessage daMP_ReadedBufferMessage[10];
|
||||
OSMessage daMP_ReadedBufferMessage2[10];
|
||||
OSThread daMP_ReadThread;
|
||||
u8 daMP_ReadThreadStack[0x1000];
|
||||
static BOOL daMP_ReadThreadCreated;
|
||||
static OSMessageQueue daMP_FreeReadBufferQueue;
|
||||
static OSMessageQueue daMP_ReadedBufferQueue;
|
||||
static OSMessageQueue daMP_ReadedBufferQueue2;
|
||||
static OSMessage daMP_FreeReadBufferMessage[10];
|
||||
static OSMessage daMP_ReadedBufferMessage[10];
|
||||
static OSMessage daMP_ReadedBufferMessage2[10];
|
||||
static OSThread daMP_ReadThread;
|
||||
static u8 daMP_ReadThreadStack[0x1000];
|
||||
|
||||
BOOL daMP_VideoDecodeThreadCreated;
|
||||
OSThread daMP_VideoDecodeThread;
|
||||
u8 daMP_VideoDecodeThreadStack[0x64000];
|
||||
static BOOL daMP_VideoDecodeThreadCreated;
|
||||
static OSThread daMP_VideoDecodeThread;
|
||||
static u8 daMP_VideoDecodeThreadStack[0x64000];
|
||||
|
||||
OSMessageQueue daMP_FreeTextureSetQueue;
|
||||
OSMessageQueue daMP_DecodedTextureSetQueue;
|
||||
OSMessage daMP_FreeTextureSetMessage[3];
|
||||
OSMessage daMP_DecodedTextureSetMessage[3];
|
||||
static OSMessageQueue daMP_FreeTextureSetQueue;
|
||||
static OSMessageQueue daMP_DecodedTextureSetQueue;
|
||||
static OSMessage daMP_FreeTextureSetMessage[3];
|
||||
static OSMessage daMP_DecodedTextureSetMessage[3];
|
||||
|
||||
BOOL daMP_First;
|
||||
static BOOL daMP_First;
|
||||
|
||||
BOOL daMP_AudioDecodeThreadCreated;
|
||||
OSThread daMP_AudioDecodeThread;
|
||||
u8 daMP_AudioDecodeThreadStack[0x64000];
|
||||
OSMessageQueue daMP_FreeAudioBufferQueue;
|
||||
OSMessageQueue daMP_DecodedAudioBufferQueue;
|
||||
OSMessage daMP_FreeAudioBufferMessage[3];
|
||||
OSMessage daMP_DecodedAudioBufferMessage[3];
|
||||
static BOOL daMP_AudioDecodeThreadCreated;
|
||||
static OSThread daMP_AudioDecodeThread;
|
||||
static u8 daMP_AudioDecodeThreadStack[0x64000];
|
||||
static OSMessageQueue daMP_FreeAudioBufferQueue;
|
||||
static OSMessageQueue daMP_DecodedAudioBufferQueue;
|
||||
static OSMessage daMP_FreeAudioBufferMessage[3];
|
||||
static OSMessage daMP_DecodedAudioBufferMessage[3];
|
||||
|
||||
BOOL daMP_Initialized;
|
||||
u32 daMP_WorkBuffer[16] ALIGN_DECL(32);
|
||||
OSMessageQueue daMP_PrepareReadyQueue;
|
||||
OSMessageQueue daMP_UsedTextureSetQueue;
|
||||
OSMessage daMP_PrepareReadyMessage;
|
||||
OSMessage daMP_UsedTextureSetMessage[3];
|
||||
VIRetraceCallback daMP_OldVIPostCallback;
|
||||
static BOOL daMP_Initialized;
|
||||
static u32 daMP_WorkBuffer[16] ALIGN_DECL(32);
|
||||
static OSMessageQueue daMP_PrepareReadyQueue;
|
||||
static OSMessageQueue daMP_UsedTextureSetQueue;
|
||||
static OSMessage daMP_PrepareReadyMessage;
|
||||
static OSMessage daMP_UsedTextureSetMessage[3];
|
||||
static VIRetraceCallback daMP_OldVIPostCallback;
|
||||
|
||||
u32 daMP_SoundBufferIndex;
|
||||
u32 daMP_OldAIDCallback;
|
||||
static u32 daMP_SoundBufferIndex;
|
||||
static u32 daMP_OldAIDCallback;
|
||||
|
||||
void* daMP_LastAudioBuffer;
|
||||
void* daMP_CurAudioBuffer;
|
||||
s32 daMP_AudioSystem;
|
||||
s16 daMP_SoundBuffer[2][0x460] ALIGN_DECL(32);
|
||||
static void* daMP_LastAudioBuffer;
|
||||
static void* daMP_CurAudioBuffer;
|
||||
static s32 daMP_AudioSystem;
|
||||
static s16 daMP_SoundBuffer[2][0x460] ALIGN_DECL(32);
|
||||
|
||||
THPVideoInfo daMP_videoInfo;
|
||||
THPAudioInfo daMP_audioInfo;
|
||||
u32 daMP_DrawPosX;
|
||||
u32 daMP_DrawPosY;
|
||||
void* daMP_buffer;
|
||||
static THPVideoInfo daMP_videoInfo;
|
||||
static THPAudioInfo daMP_audioInfo;
|
||||
static u32 daMP_DrawPosX;
|
||||
static u32 daMP_DrawPosY;
|
||||
static void* daMP_buffer;
|
||||
|
||||
#if VERSION > VERSION_DEMO
|
||||
BOOL daMP_Fail_alloc;
|
||||
u16 daMP_backup_FrameRate;
|
||||
u8 daMP_backup_vfilter[7];
|
||||
#endif
|
||||
|
||||
daMP_Dlst_base_c daMP_c_Dlst_base;
|
||||
|
||||
#if VERSION > VERSION_DEMO
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* 000000EC-00000584 .text THPAudioDecode */
|
||||
static u32 THPAudioDecode(s16* audioBuffer, u8* audioFrame, s32 flag) {
|
||||
@@ -2618,8 +2622,10 @@ static BOOL THPInit() {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#if VERSION > VERSION_DEMO
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
} // extern "C"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* 00003208-0000323C .text daMP_PopReadedBuffer__Fv */
|
||||
@@ -4150,8 +4156,7 @@ static u32 daMP_Get_MovieRestFrame() {
|
||||
}
|
||||
|
||||
/* 000062F0-00006370 .text daMP_Set_PercentMovieVolume__Ff */
|
||||
static u32 daMP_Set_PercentMovieVolume(f32 volume) {
|
||||
/* Nonmatching - regalloc */
|
||||
static void daMP_Set_PercentMovieVolume(f32 volume) {
|
||||
#if VERSION > VERSION_DEMO
|
||||
if (!daMP_Fail_alloc)
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user