Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
JKRDecomp.h
Go to the documentation of this file.
1#ifndef JKRDECOMP_H
2#define JKRDECOMP_H
3
6
7class JKRAMCommand;
8
14public:
15 typedef void (*AsyncCallback)(u32);
16
19
20public:
21 /* 0x00 */ u32 field_0x0;
22 /* 0x04 */ u8* mSrcBuffer;
23 /* 0x08 */ u8* mDstBuffer;
24 /* 0x0C */ u32 mSrcLength;
25 /* 0x10 */ u32 mDstLength;
29 /* 0x20 */ s32 field_0x20;
32 /* 0x48 */ OSMessage mMessage;
33};
34
35#define JKRDECOMP_SYNC_BLOCKING 0
36#define JKRDECOMP_SYNC_NON_BLOCKING 1
37
42class JKRDecomp : public JKRThread {
43private:
45 virtual ~JKRDecomp();
46
47 /* vt[03] */ virtual void* run(); /* override */
48
49public:
50 static JKRDecomp* create(s32);
52 static void sendCommand(JKRDecompCommand*);
53 static bool sync(JKRDecompCommand*, int);
55 static bool orderSync(u8*, u8*, u32, u32);
56 static void decode(u8*, u8*, u32, u32);
57 static void decodeSZP(u8*, u8*, u32, u32);
58 static void decodeSZS(u8*, u8*, u32, u32);
60
62 static OSMessage sMessageBuffer[8];
64};
65
69
71 return JKRDecomp::create(priority);
72}
73
76 if (compression == COMPRESSION_ASR) // ternary i had before was either incorrect, or was not a ternary at all
78 return compression;
79}
80
82 return (pBuf[4] << 0x18) | (pBuf[5] << 0x10) | (pBuf[6] << 8) | pBuf[7];
83}
84
85#endif /* JKRDECOMP_H */
const JKRCompression COMPRESSION_ASR
Definition JKRCompression.h:8
int JKRCompression
Definition JKRCompression.h:4
const JKRCompression COMPRESSION_NONE
Definition JKRCompression.h:5
JKRCompression JKRCheckCompressed_noASR(u8 *pBuf)
Definition JKRDecomp.h:74
u32 JKRDecompExpandSize(u8 *pBuf)
Definition JKRDecomp.h:81
JKRDecomp * JKRCreateDecompManager(s32 priority)
Definition JKRDecomp.h:70
void JKRDecompress(u8 *srcBuffer, u8 *dstBuffer, u32 srcLength, u32 dstLength)
Definition JKRDecomp.h:66
void * OSMessage
Definition OSMessage.h:10
T cLib_calcTimer(T *value)
Definition c_lib.h:74
Definition JKRAramPiece.h:16
Definition JKRDecomp.h:13
u32 field_0x0
Definition JKRDecomp.h:21
OSMessageQueue * field_0x1c
Definition JKRDecomp.h:28
~JKRDecompCommand()
Definition JKRDecomp.cpp:302
void(* AsyncCallback)(u32)
Definition JKRDecomp.h:15
OSMessageQueue mMessageQueue
Definition JKRDecomp.h:31
s32 field_0x20
Definition JKRDecomp.h:29
u32 mDstLength
Definition JKRDecomp.h:25
OSMessage mMessage
Definition JKRDecomp.h:32
u8 * mSrcBuffer
Definition JKRDecomp.h:22
u8 * mDstBuffer
Definition JKRDecomp.h:23
JKRDecompCommand()
Definition JKRDecomp.cpp:293
AsyncCallback mCallback
Definition JKRDecomp.h:26
JKRAMCommand * mAMCommand
Definition JKRDecomp.h:30
u32 mSrcLength
Definition JKRDecomp.h:24
JKRDecompCommand * mThis
Definition JKRDecomp.h:27
Definition JKRDecomp.h:42
static void decodeSZP(u8 *, u8 *, u32, u32)
Definition JKRDecomp.cpp:124
static void decode(u8 *, u8 *, u32, u32)
Definition JKRDecomp.cpp:114
static JKRDecompCommand * orderAsync(u8 *, u8 *, u32, u32, JKRDecompCommand::AsyncCallback)
Definition JKRDecomp.cpp:82
static JKRCompression checkCompressed(u8 *)
Definition JKRDecomp.cpp:274
static void decodeSZS(u8 *, u8 *, u32, u32)
Definition JKRDecomp.cpp:209
static void sendCommand(JKRDecompCommand *)
Definition JKRDecomp.cpp:77
static JKRDecomp * sDecompObject
Definition JKRDecomp.h:61
static OSMessageQueue sMessageQueue
Definition JKRDecomp.h:21
static bool sync(JKRDecompCommand *, int)
Definition JKRDecomp.cpp:91
static JKRDecompCommand * prepareCommand(u8 *, u8 *, u32, u32, JKRDecompCommand::AsyncCallback)
Definition JKRDecomp.cpp:63
static JKRDecomp * create(s32)
Definition JKRDecomp.cpp:8
static bool orderSync(u8 *, u8 *, u32, u32)
Definition JKRDecomp.cpp:106
virtual void * run()
Definition JKRDecomp.cpp:32
virtual ~JKRDecomp()
Definition JKRDecomp.cpp:29
static OSMessage sMessageBuffer[8]
Definition JKRDecomp.h:18
Definition JKRThread.h:23
Definition OSMessage.h:12
unsigned long u32
Definition types.h:10
signed long s32
Definition types.h:6
unsigned char u8
Definition types.h:8