diff --git a/include/JSystem/JKernel/JKRAram.h b/include/JSystem/JKernel/JKRAram.h index e66c696a6..a9f2564e4 100644 --- a/include/JSystem/JKernel/JKRAram.h +++ b/include/JSystem/JKernel/JKRAram.h @@ -33,7 +33,7 @@ public: /* 0x84 */ u32 mStackArray[3]; public: - static JKRAram* create(u32, u32, long, long, long); + static JKRAram* create(u32, u32, s32, s32, s32); static bool checkOkAddress(u8*, u32, JKRAramBlock*, u32); static void changeGroupIdIfNeed(u8*, int); static JKRAramBlock* mainRamToAram(u8*, u32, u32, JKRExpandSwitch, u32, JKRHeap*, int); diff --git a/include/JSystem/JKernel/JKRAramArchive.h b/include/JSystem/JKernel/JKRAramArchive.h index 5f8d28413..392be1be5 100644 --- a/include/JSystem/JKernel/JKRAramArchive.h +++ b/include/JSystem/JKernel/JKRAramArchive.h @@ -9,10 +9,10 @@ class JKRDvdFile; class JKRAramArchive : public JKRArchive { public: - JKRAramArchive(long, JKRArchive::EMountDirection); + JKRAramArchive(s32, JKRArchive::EMountDirection); virtual ~JKRAramArchive(); - bool open(long); + bool open(s32); u32 getAramAddress_Entry(SDIFileEntry*); u32 getAramAddress(char const*); diff --git a/include/JSystem/JKernel/JKRAramStream.h b/include/JSystem/JKernel/JKRAramStream.h index cdbfbd5ca..ee36d5fcf 100644 --- a/include/JSystem/JKernel/JKRAramStream.h +++ b/include/JSystem/JKernel/JKRAramStream.h @@ -42,7 +42,7 @@ private: /* vt[03] */ void* run(void); /* override */ public: - static JKRAramStream* create(long); + static JKRAramStream* create(s32); static s32 readFromAram(void); static s32 writeToAram(JKRAramStreamCommand*); @@ -60,7 +60,7 @@ private: static JKRHeap* transHeap; }; -inline JKRAramStream* JKRCreateAramStreamManager(long priority) { +inline JKRAramStream* JKRCreateAramStreamManager(s32 priority) { return JKRAramStream::create(priority); } diff --git a/include/JSystem/JKernel/JKRArchive.h b/include/JSystem/JKernel/JKRArchive.h index f3bb0f5bd..46ebcd0c4 100644 --- a/include/JSystem/JKernel/JKRArchive.h +++ b/include/JSystem/JKernel/JKRArchive.h @@ -115,7 +115,7 @@ public: protected: JKRArchive(); - JKRArchive(long, EMountMode); + JKRArchive(s32, EMountMode); public: bool getDirEntry(SDirEntry*, u32) const; diff --git a/include/JSystem/JKernel/JKRAssertHeap.h b/include/JSystem/JKernel/JKRAssertHeap.h index 48a79d95e..d0e8d876c 100644 --- a/include/JSystem/JKernel/JKRAssertHeap.h +++ b/include/JSystem/JKernel/JKRAssertHeap.h @@ -5,7 +5,7 @@ class JKRAssertHeap : public JKRHeap { protected: - JKRAssertHeap(void*, unsigned long, JKRHeap*, bool); + JKRAssertHeap(void*, u32, JKRHeap*, bool); virtual ~JKRAssertHeap(); public: diff --git a/include/JSystem/JKernel/JKRCompArchive.h b/include/JSystem/JKernel/JKRCompArchive.h index 4fb13152a..14d24b7eb 100644 --- a/include/JSystem/JKernel/JKRCompArchive.h +++ b/include/JSystem/JKernel/JKRCompArchive.h @@ -8,10 +8,10 @@ class JKRDvdFile; class JKRCompArchive : public JKRArchive { public: - JKRCompArchive(long, JKRArchive::EMountDirection); + JKRCompArchive(s32, JKRArchive::EMountDirection); virtual ~JKRCompArchive(); - bool open(long); + bool open(s32); /* vt[09] */ void removeResourceAll(void); /* override */ /* vt[10] */ bool removeResource(void*); /* override */ diff --git a/include/JSystem/JKernel/JKRDecomp.h b/include/JSystem/JKernel/JKRDecomp.h index e7ef48c68..f69425713 100644 --- a/include/JSystem/JKernel/JKRDecomp.h +++ b/include/JSystem/JKernel/JKRDecomp.h @@ -58,7 +58,7 @@ inline void JKRDecompress(u8* srcBuffer, u8* dstBuffer, u32 srcLength, u32 dstLe JKRDecomp::orderSync(srcBuffer, dstBuffer, srcLength, dstLength); } -inline JKRDecomp* JKRCreateDecompManager(long priority) { +inline JKRDecomp* JKRCreateDecompManager(s32 priority) { return JKRDecomp::create(priority); } diff --git a/include/JSystem/JKernel/JKRDvdAramRipper.h b/include/JSystem/JKernel/JKRDvdAramRipper.h index 6c3ba1de7..50957d4e0 100644 --- a/include/JSystem/JKernel/JKRDvdAramRipper.h +++ b/include/JSystem/JKernel/JKRDvdAramRipper.h @@ -34,7 +34,7 @@ public: class JKRDvdFile; class JKRDvdAramRipper { public: - static JKRAramBlock* loadToAram(long, u32, JKRExpandSwitch, u32, u32); + static JKRAramBlock* loadToAram(s32, u32, JKRExpandSwitch, u32, u32); static JKRAramBlock* loadToAram(JKRDvdFile*, u32, JKRExpandSwitch, u32, u32); static JKRADCommand* loadToAram_Async(JKRDvdFile*, u32, JKRExpandSwitch, void (*)(u32), u32, u32); diff --git a/include/JSystem/JKernel/JKRDvdFile.h b/include/JSystem/JKernel/JKRDvdFile.h index 1ea018241..c0c1ea3e2 100644 --- a/include/JSystem/JKernel/JKRDvdFile.h +++ b/include/JSystem/JKernel/JKRDvdFile.h @@ -52,7 +52,7 @@ public: /* 0xF4 */ OSThread* mOSThread; public: - static void doneProcess(long, DVDFileInfo*); + static void doneProcess(s32, DVDFileInfo*); static JSUList& getDvdList() { return sDvdList; } diff --git a/include/JSystem/JKernel/JKRDvdRipper.h b/include/JSystem/JKernel/JKRDvdRipper.h index 7534f9ee9..83fabe2a4 100644 --- a/include/JSystem/JKernel/JKRDvdRipper.h +++ b/include/JSystem/JKernel/JKRDvdRipper.h @@ -38,7 +38,7 @@ public: static void* loadToMainRAM(char const*, u8*, JKRExpandSwitch, u32, JKRHeap*, EAllocDirection, u32, int*); - static void* loadToMainRAM(long, u8*, JKRExpandSwitch, u32, JKRHeap*, EAllocDirection, u32, + static void* loadToMainRAM(s32, u8*, JKRExpandSwitch, u32, JKRHeap*, EAllocDirection, u32, int*); static void* loadToMainRAM(JKRDvdFile*, u8*, JKRExpandSwitch, u32, JKRHeap*, EAllocDirection, u32, int*); diff --git a/include/JSystem/JKernel/JKRFile.h b/include/JSystem/JKernel/JKRFile.h index 4e1be4db8..ed9d35a2c 100644 --- a/include/JSystem/JKernel/JKRFile.h +++ b/include/JSystem/JKernel/JKRFile.h @@ -8,7 +8,7 @@ public: JKRFile() : mIsAvailable(false) {} virtual ~JKRFile() {} - s32 read(void*, long, long); + s32 read(void*, s32, s32); bool isAvailable() const { return mIsAvailable; } diff --git a/include/JSystem/JKernel/JKRFileLoader.h b/include/JSystem/JKernel/JKRFileLoader.h index c02dedc10..9e05be16a 100644 --- a/include/JSystem/JKernel/JKRFileLoader.h +++ b/include/JSystem/JKernel/JKRFileLoader.h @@ -43,7 +43,7 @@ public: static bool removeResource(void*, JKRFileLoader*); static bool detachResource(void*, JKRFileLoader*); static JKRFileLoader* findVolume(const char**); - static const char* fetchVolumeName(char*, long, const char*); + static const char* fetchVolumeName(char*, s32, const char*); static JKRFileLoader* getCurrentVolume() { return sCurrentVolume; } static void setCurrentVolume(JKRFileLoader* fileLoader) { sCurrentVolume = fileLoader; } diff --git a/include/JSystem/JKernel/JKRMemArchive.h b/include/JSystem/JKernel/JKRMemArchive.h index 54fc72459..93c051920 100644 --- a/include/JSystem/JKernel/JKRMemArchive.h +++ b/include/JSystem/JKernel/JKRMemArchive.h @@ -11,13 +11,13 @@ enum JKRMemBreakFlag { class JKRMemArchive : public JKRArchive { public: JKRMemArchive(); - JKRMemArchive(long, JKRArchive::EMountDirection); + JKRMemArchive(s32, JKRArchive::EMountDirection); virtual ~JKRMemArchive(); void fixedInit(s32); bool mountFixed(void*, JKRMemBreakFlag); void unmountFixed(); - bool open(long, JKRArchive::EMountDirection); + bool open(s32, JKRArchive::EMountDirection); bool open(void*, u32, JKRMemBreakFlag); /* vt[09] */ void removeResourceAll(void); /* override */ diff --git a/src/JSystem/JKernel/JKRAram.cpp b/src/JSystem/JKernel/JKRAram.cpp index e20e34068..1aad48247 100644 --- a/src/JSystem/JKernel/JKRAram.cpp +++ b/src/JSystem/JKernel/JKRAram.cpp @@ -24,7 +24,7 @@ static u8* nextSrcData(u8*); JKRAram* JKRAram::sAramObject; /* 802B42C4-802B4360 .text create__7JKRAramFUlUllll */ -JKRAram* JKRAram::create(u32 aram_audio_buffer_size, u32 aram_audio_graph_size, long stream_priority, long decomp_priority, long piece_priority) { +JKRAram* JKRAram::create(u32 aram_audio_buffer_size, u32 aram_audio_graph_size, s32 stream_priority, s32 decomp_priority, s32 piece_priority) { if (!sAramObject) { sAramObject = new (JKRHeap::getSystemHeap(), 0) JKRAram(aram_audio_buffer_size, aram_audio_graph_size, piece_priority); @@ -40,7 +40,7 @@ OSMessage JKRAram::sMessageBuffer[4] = { NULL, NULL, NULL, NULL }; OSMessageQueue JKRAram::sMessageQueue = {0}; /* 802B4360-802B44D8 .text __ct__7JKRAramFUlUll */ -JKRAram::JKRAram(u32 audio_buffer_size, u32 audio_graph_size, long priority) : JKRThread(0x4000, 0x10, priority) { +JKRAram::JKRAram(u32 audio_buffer_size, u32 audio_graph_size, s32 priority) : JKRThread(0x4000, 0x10, priority) { u32 aramBase = ARInit(mStackArray, ARRAY_SIZE(mStackArray)); ARQInit(); @@ -323,14 +323,14 @@ static u32 srcAddress; static u32 fileOffset; static u32 readCount; static u32 maxDest; -static bool sIsInitMutex; +static bool isInitMutex; /* 802B4D4C-802B4F20 .text JKRDecompressFromAramToMainRam__FUlPvUlUlUl */ static int JKRDecompressFromAramToMainRam(u32 src, void* dst, u32 srcLength, u32 dstLength, u32 offset) { BOOL interrupts = OSDisableInterrupts(); - if (sIsInitMutex == false) { + if (isInitMutex == false) { OSInitMutex(&decompMutex); - sIsInitMutex = true; + isInitMutex = true; } OSRestoreInterrupts(interrupts); OSLockMutex(&decompMutex); diff --git a/src/JSystem/JKernel/JKRFile.cpp b/src/JSystem/JKernel/JKRFile.cpp index 04cb11a6c..8d6654b1f 100644 --- a/src/JSystem/JKernel/JKRFile.cpp +++ b/src/JSystem/JKernel/JKRFile.cpp @@ -8,7 +8,7 @@ #include "dolphin/vi/vi.h" /* 802BC610-802BC6B4 .text read__7JKRFileFPvll */ -s32 JKRFile::read(void* data, s32 length, long offset) { +s32 JKRFile::read(void* data, s32 length, s32 offset) { JUT_ASSERT(34, ( length & 0x1f ) == 0); while (true) { s32 result = readData(data, length, offset); diff --git a/src/JSystem/JKernel/JKRFileCache.cpp b/src/JSystem/JKernel/JKRFileCache.cpp index 89f60a249..7f91ceff4 100644 --- a/src/JSystem/JKernel/JKRFileCache.cpp +++ b/src/JSystem/JKernel/JKRFileCache.cpp @@ -149,7 +149,7 @@ void* JKRFileCache::getResource(const char* path) { } /* 802B7564-802B7630 .text getResource__12JKRFileCacheFUlPCc */ -void* JKRFileCache::getResource(unsigned long, const char* path) { +void* JKRFileCache::getResource(u32, const char* path) { JUT_ASSERT(303, isMounted()); char finalPath[256]; diff --git a/src/JSystem/JKernel/JKRFileLoader.cpp b/src/JSystem/JKernel/JKRFileLoader.cpp index 397d3e3fc..3c28189a3 100644 --- a/src/JSystem/JKernel/JKRFileLoader.cpp +++ b/src/JSystem/JKernel/JKRFileLoader.cpp @@ -127,7 +127,7 @@ JKRFileLoader* JKRFileLoader::findVolume(const char** volumeName) { static char rootPath[2] = "/"; /* 802B6B44-802B6C20 .text fetchVolumeName__13JKRFileLoaderFPclPCc */ -const char* JKRFileLoader::fetchVolumeName(char* buffer, long bufferSize, const char* path) { +const char* JKRFileLoader::fetchVolumeName(char* buffer, s32 bufferSize, const char* path) { if (strcmp(path, "/") == 0) { strcpy(buffer, rootPath); return rootPath; diff --git a/src/JSystem/JKernel/JKRMemArchive.cpp b/src/JSystem/JKernel/JKRMemArchive.cpp index 3216b6c56..25501e5ba 100644 --- a/src/JSystem/JKernel/JKRMemArchive.cpp +++ b/src/JSystem/JKernel/JKRMemArchive.cpp @@ -56,10 +56,10 @@ void JKRMemArchive::fixedInit(s32 param_1) { /* 802B9740-802B9810 .text mountFixed__13JKRMemArchiveFPv15JKRMemBreakFlag */ bool JKRMemArchive::mountFixed(void* param_1, JKRMemBreakFlag param_2) { - if (check_mount_already((long)param_1)) { + if (check_mount_already((s32)param_1)) { return false; } - fixedInit((long)param_1); + fixedInit((s32)param_1); if (!open(param_1, 0xffff, param_2)) { return false; }