mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-09-03 00:53:47 -04:00
JKRAram and JKRAramStream (#80)
* before __register_global_object * JKRThread::sThreadList, JKRHeap::sSystemHeap, etc. * cleanup and started on JKRDvdArchive * before changing JKRCompression * more JKRDvdArchive, abs, and memset * fixed JKRArchive::setExpandSize split * JKRArchive::sCurrentDirID, JKRDvdFile::sDvdList, and matching JKRDvdFile constructors * problems * merge fixes and formatting * updated clang version in clang-format-all to version 10 * Added OSPhysicalToCached and struct for global memory * remove useless __attribute__ * changed from defines and macros to const variable and function * changed FLAG_HAS to FLAG_ON * JKRAram, linking problems * fix JKRAram * remove nonmatching stuff * renamed static data * more static class members * JKRAramStream OK * formatting Co-authored-by: Julgodis <> Co-authored-by: Pheenoh <pheenoh@gmail.com>
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
#include "JSystem/JKernel/JKRDecomp/JKRDecomp.h"
|
||||
#include "global.h"
|
||||
|
||||
#include "JSystem/JKernel/JKRAramPiece/JKRAramPiece.h"
|
||||
#include "global.h"
|
||||
|
||||
JKRDecomp* JKRDecomp::create(long priority) {
|
||||
if (!lbl_804514B0) {
|
||||
@@ -114,9 +113,9 @@ void JKRDecomp::decodeSZP(u8* src, u8* dst, u32 srcLength, u32 dstLength) {
|
||||
s32 offset;
|
||||
s32 i;
|
||||
|
||||
decodedSize = READ_BIG_ENDIAN_U32(src + 4);
|
||||
linkTableOffset = READ_BIG_ENDIAN_U32(src + 8);
|
||||
srcDataOffset = READ_BIG_ENDIAN_U32(src + 12);
|
||||
decodedSize = read_big_endian_u32(src + 4);
|
||||
linkTableOffset = read_big_endian_u32(src + 8);
|
||||
srcDataOffset = read_big_endian_u32(src + 12);
|
||||
|
||||
dstOffset = 0;
|
||||
counter = 0;
|
||||
@@ -131,7 +130,7 @@ void JKRDecomp::decodeSZP(u8* src, u8* dst, u32 srcLength, u32 dstLength) {
|
||||
length = srcLength;
|
||||
do {
|
||||
if (counter == 0) {
|
||||
chunkBits = READ_BIG_ENDIAN_U32(src + srcChunkOffset);
|
||||
chunkBits = read_big_endian_u32(src + srcChunkOffset);
|
||||
srcChunkOffset += 4;
|
||||
counter = 32;
|
||||
}
|
||||
@@ -149,7 +148,7 @@ void JKRDecomp::decodeSZP(u8* src, u8* dst, u32 srcLength, u32 dstLength) {
|
||||
dstOffset++;
|
||||
srcDataOffset++;
|
||||
} else {
|
||||
u32 linkInfo = READ_BIG_ENDIAN_U16(src + linkTableOffset);
|
||||
u32 linkInfo = read_big_endian_u16(src + linkTableOffset);
|
||||
linkTableOffset += 2;
|
||||
|
||||
offset = dstOffset - (linkInfo & 0xFFF);
|
||||
|
||||
Reference in New Issue
Block a user