builds on mac again

revert some useless ifdefs

rm TARGET_PC in the wrong place

remove stubbed version of functions
This commit is contained in:
Jeffrey Crowell
2026-02-24 16:22:58 -08:00
parent 913d19ed52
commit 9c7f55d1ac
54 changed files with 115 additions and 99 deletions
+2 -2
View File
@@ -315,7 +315,7 @@ u32 JKRAramArchive::fetchResource_subroutine(u32 entryNum, u32 length, JKRHeap*
case COMPRESSION_YAZ0:
{
u8 headerBuf[0x40];
u8* alignHeader = (u8*)ALIGN_NEXT((s32)&headerBuf[0], sizeof(SArcHeader));
u8* alignHeader = (u8*)ALIGN_NEXT((intptr_t)&headerBuf[0], sizeof(SArcHeader));
JKRAramToMainRam(entryNum, alignHeader, sizeof(SArcHeader), EXPAND_SWITCH_UNKNOWN0, 0, NULL, -1, NULL);
u32 decompressedLen = ALIGN_NEXT(JKRDecompExpandSize(alignHeader), sizeof(SArcHeader));
buffer = (u8*)(JKRAllocFromHeap(pHeap, decompressedLen, sizeof(SArcHeader)));
@@ -352,7 +352,7 @@ u32 JKRAramArchive::getExpandedResSize(const void* ptr) const {
}
u8 tmpBuf[0x40];
u8* buf = (u8*)ALIGN_PREV((s32)&tmpBuf[0x1F], 0x20);
u8* buf = (u8*)ALIGN_PREV((intptr_t)&tmpBuf[0x1F], 0x20);
JKRAramToMainRam(entry->data_offset + mBlock->getAddress(), buf, 0x20, EXPAND_SWITCH_UNKNOWN0,
0, NULL, -1, NULL);
u32 expandSize2 = JKRDecompExpandSize(buf);
+1 -1
View File
@@ -38,7 +38,7 @@ JKRArchive* JKRArchive::mount(const char* path, EMountMode mountMode, JKRHeap* h
JKRArchive* JKRArchive::mount(void* ptr, JKRHeap* heap,
EMountDirection mountDirection) {
JKRArchive* archive = check_mount_already((s32)ptr, heap);
JKRArchive* archive = check_mount_already((intptr_t)ptr, heap);
if (archive) {
return archive;
}
+1 -1
View File
@@ -47,7 +47,7 @@ void* JKRDecomp::run() {
}
if (command->mCallback) {
(*command->mCallback)((u32)command);
(*command->mCallback)((uintptr_t)command);
continue;
}
+1 -1
View File
@@ -182,7 +182,7 @@ JKRADCommand* JKRDvdAramRipper::callCommand_Async(JKRADCommand* command) {
if (!command->mCallback) {
(*((JSUList<JKRADCommand>*)&sDvdAramAsyncList)).append(&command->mLink);
} else {
command->mCallback((u32)command);
command->mCallback((uintptr_t)command);
}
}
+16
View File
@@ -523,11 +523,19 @@ void* operator new(size_t size, int alignment) {
#else
void* operator new(size_t size, int alignment) {
if (sCurrentHeap == nullptr)
#if TARGET_PC
return aligned_alloc(alignment, size);
#else
return _aligned_malloc(size, alignment);
#endif
void* mem = JKRHeap::alloc(size, alignment, nullptr);
if (mem == nullptr) {
OSReport("[NEW] JKRHeap FULL! Fallback to aligned_malloc size %u\n", (unsigned)size);
#if TARGET_PC
return aligned_alloc(alignment, size);
#else
return _aligned_malloc(size, alignment);
#endif
}
return mem;
}
@@ -560,10 +568,18 @@ void* operator new[](size_t size, int alignment) {
#else
void* operator new[](size_t size, int alignment) {
if (sCurrentHeap == nullptr)
#if TARGET_PC
return aligned_alloc(alignment, size);
#else
return _aligned_malloc(size, alignment);
#endif
void* mem = JKRHeap::alloc(size, alignment, nullptr);
if (mem == nullptr)
#if TARGET_PC
return aligned_alloc(alignment, size);
#else
return _aligned_malloc(size, alignment);
#endif
return mem;
}
#endif
+1 -1
View File
@@ -25,7 +25,7 @@ JKRMemArchive::JKRMemArchive(s32 entryNum, JKRArchive::EMountDirection mountDire
}
JKRMemArchive::JKRMemArchive(void* buffer, u32 bufferSize, JKRMemBreakFlag param_3)
: JKRArchive((s32)buffer, MOUNT_MEM) {
: JKRArchive((intptr_t)buffer, MOUNT_MEM) {
mIsMounted = false;
if (!open(buffer, bufferSize, param_3)) {
return;