From 2113d9044b9beb0fedca17f977f2bb571c50c302 Mon Sep 17 00:00:00 2001 From: Jcw87 Date: Fri, 20 Feb 2026 03:05:23 -0800 Subject: d_resorce debug (#3105) --- include/JSystem/JKernel/JKRArchive.h | 4 ++-- include/JSystem/JKernel/JKRHeap.h | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'include/JSystem/JKernel') diff --git a/include/JSystem/JKernel/JKRArchive.h b/include/JSystem/JKernel/JKRArchive.h index cf4b3ef045..7402f50b13 100644 --- a/include/JSystem/JKernel/JKRArchive.h +++ b/include/JSystem/JKernel/JKRArchive.h @@ -137,7 +137,7 @@ public: u32 readIdxResource(void*, u32, u32); u32 readResource(void*, u32, u16); u32 countResource(void) const; - u32 getFileAttribute(u32) const; + u8 getFileAttribute(u32) const; SDIFileEntry* findNameResource(const char*) const; bool isSameName(CArcName&, u32, u16) const; @@ -171,7 +171,7 @@ public: u32 countFile() const { return mArcInfoBlock->num_file_entries; } s32 countDirectory() const { return mArcInfoBlock->num_nodes; } u8 getMountMode() const { return mMountMode; } - bool isFileEntry(u32 param_0) { + bool isFileEntry(u32 param_0) const { return getFileAttribute(param_0) & 1; } diff --git a/include/JSystem/JKernel/JKRHeap.h b/include/JSystem/JKernel/JKRHeap.h index c23b72180f..b6675f41b7 100644 --- a/include/JSystem/JKernel/JKRHeap.h +++ b/include/JSystem/JKernel/JKRHeap.h @@ -259,6 +259,10 @@ inline s32 JKRResizeMemBlock(JKRHeap* heap, void* ptr, u32 size) { return JKRHeap::resize(ptr, size, heap); } +inline JKRHeap* JKRFindHeap(void* ptr) { + return JKRHeap::findFromRoot(ptr); +} + inline JKRHeap* JKRGetRootHeap() { return JKRHeap::getRootHeap(); } -- cgit v1.2.3