mirror of
https://github.com/zeldaret/tp
synced 2026-07-07 22:22:05 -04:00
Merge branch 'master' of https://github.com/zeldaret/tp into d_menu_skill
This commit is contained in:
@@ -40,9 +40,8 @@ inline u16 read_big_endian_u16(void* ptr) {
|
||||
return ((u16)uptr[0] << 8) | ((u16)uptr[1]);
|
||||
}
|
||||
|
||||
inline u32 JKRDecompExpandSize(SArcHeader* header) {
|
||||
u8* fileLength = (u8*)&header->file_length;
|
||||
return read_big_endian_u32(fileLength);
|
||||
inline u32 JKRDecompExpandSize(u8 * pBuf) {
|
||||
return (pBuf[4] << 0x18) | (pBuf[5] << 0x10) | (pBuf[6] << 8) | pBuf[7];
|
||||
}
|
||||
|
||||
extern u32 sCurrentDirID__10JKRArchive; // JKRArchive::sCurrentDirID
|
||||
|
||||
@@ -63,4 +63,11 @@ inline JKRDecomp* JKRCreateDecompManager(long priority) {
|
||||
return JKRDecomp::create(priority);
|
||||
}
|
||||
|
||||
inline JKRCompression JKRCheckCompressed_noASR(u8 *pBuf) {
|
||||
JKRCompression compression = JKRDecomp::checkCompressed(pBuf);
|
||||
if (compression == COMPRESSION_ASR) // ternary i had before was either incorrect, or was not a ternary at all
|
||||
compression = COMPRESSION_NONE;
|
||||
return compression;
|
||||
}
|
||||
|
||||
#endif /* JKRDECOMP_H */
|
||||
|
||||
@@ -50,4 +50,8 @@ public:
|
||||
static u32 sSZSBufferSize;
|
||||
};
|
||||
|
||||
inline JKRAramBlock *JKRDvdToAram(s32 entrynum, u32 p2, JKRExpandSwitch expSwitch, u32 p4, u32 p5, u32 *p6) {
|
||||
return JKRDvdAramRipper::loadToAram(entrynum, p2, expSwitch, p4, p5, p6);
|
||||
}
|
||||
|
||||
#endif /* JKRDVDARAMRIPPER_H */
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define JKRDVDRIPPER_H
|
||||
|
||||
#include "JSystem/JKernel/JKRCompression.h"
|
||||
#include "JSystem/JSupport/JSUList.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
enum JKRExpandSwitch {
|
||||
@@ -15,12 +16,16 @@ struct SYaz0Header {
|
||||
u32 length;
|
||||
};
|
||||
|
||||
class JKRDMCommand {
|
||||
JKRDMCommand();
|
||||
~JKRDMCommand();
|
||||
};
|
||||
|
||||
class JKRHeap;
|
||||
class JKRDvdFile;
|
||||
class JKRDvdRipper {
|
||||
public:
|
||||
// TODO: fix type
|
||||
static u8 sDvdAsyncList[12];
|
||||
static JSUList<JKRDMCommand> sDvdAsyncList;
|
||||
static u32 sSZSBufferSize;
|
||||
|
||||
enum EAllocDirection {
|
||||
@@ -39,6 +44,7 @@ public:
|
||||
u32, JKRCompression*, u32*);
|
||||
|
||||
static u8 isErrorRetry(void);
|
||||
inline static u32 getSZSBufferSize() { return sSZSBufferSize; }
|
||||
};
|
||||
|
||||
// void JKRDecompressFromDVD(JKRDvdFile*, void*, u32, u32, u32, u32, u32*);
|
||||
|
||||
@@ -29,6 +29,9 @@ typedef int BOOL;
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
|
||||
#define READU32_BE(ptr, offset) \
|
||||
(((u32)ptr[offset] << 24) | ((u32)ptr[offset + 1] << 16) | ((u32)ptr[offset + 2] << 8) | (u32)ptr[offset + 3]);
|
||||
|
||||
#include "MSL_C/MSL_Common/Src/stddef.h"
|
||||
|
||||
#define INT32_MAX (0x7fffffff)
|
||||
|
||||
Reference in New Issue
Block a user