Some u32/s32 -> uintptr_t/intptr_t

This commit is contained in:
Luke Street
2026-02-28 20:29:24 -07:00
parent b807bedd35
commit acdf6ad70f
20 changed files with 31 additions and 29 deletions
+1 -1
View File
@@ -143,7 +143,7 @@ bool JASAramStream::start() {
}
bool JASAramStream::stop(u16 param_0) {
if (!OSSendMessage(&field_0x000, (OSMessage)(param_0 << 0x10 | 1), OS_MESSAGE_NOBLOCK)) {
if (!OSSendMessage(&field_0x000, (OSMessage)(uintptr_t)(param_0 << 0x10 | 1), OS_MESSAGE_NOBLOCK)) {
JUT_WARN(290, "%s", "OSSendMessage Failed");
return false;
}
+1 -1
View File
@@ -472,7 +472,7 @@ int JASDsp::setFXLine(u8 param_0, s16* buffer, JASDsp::FxlineConfig_* param_2) {
return 1;
}
BOOL JASDsp::changeFXLineParam(u8 param_0, u8 param_1, u32 param_2) {
BOOL JASDsp::changeFXLineParam(u8 param_0, u8 param_1, uintptr_t param_2) {
JUT_ASSERT(450, dspMutex);
FxBuf* buf = &FX_BUF[param_0];
switch (param_1) {
+2 -2
View File
@@ -285,7 +285,7 @@ void JASGenericMemPool::free(void* ptr, u32 param_1) {
freeMemCount++;
}
u32 JASKernel::sAramBase;
uintptr_t JASKernel::sAramBase;
JKRHeap* JASKernel::sSystemHeap;
@@ -310,7 +310,7 @@ JASMemChunkPool<1024, JASThreadingModel::ObjectLevelLockable>* JASKernel::getCom
JASHeap JASKernel::audioAramHeap;
void JASKernel::setupAramHeap(u32 param_0, u32 param_1) {
void JASKernel::setupAramHeap(uintptr_t param_0, u32 param_1) {
#if !PLATFORM_GCN
OSReport("setupAramHeap %x, %x, %x\n", param_0, ARGetBaseAddress(), param_1);
param_0 = ARGetBaseAddress();
+1 -1
View File
@@ -55,7 +55,7 @@ static void JASResArcLoader::loadResourceCallback(void* args) {
}
int JASResArcLoader::loadResourceAsync(JKRArchive* archive, u16 id, u8* buffer, u32 size, LoadCallback callback, u32 cbArg)
int JASResArcLoader::loadResourceAsync(JKRArchive* archive, u16 id, u8* buffer, u32 size, LoadCallback callback, uintptr_t cbArg)
{
TLoadResInfo args(archive, id, buffer, size);
args.mCallback = callback;
+1 -1
View File
@@ -111,7 +111,7 @@ bool JAUDynamicSeqDataBlocks::appendDynamicSeqDataBlock(JAUSeqDataBlock* seqData
return 1;
}
static void JAUDynamicSeqDataBlocks_receiveLoaded_(u32 param_0, u32 param_1) {
static void JAUDynamicSeqDataBlocks_receiveLoaded_(u32 param_0, uintptr_t param_1) {
JSULink<JAUSeqDataBlock>* link = (JSULink<JAUSeqDataBlock>*)param_1;
JAUSeqDataBlock* seqDataBlock = link->getObject();
if (param_0 != 0) {
+1 -1
View File
@@ -125,7 +125,7 @@ s32 JKRDvdFile::sync(void) {
void JKRDvdFile::doneProcess(s32 id, DVDFileInfo* fileInfo) {
// fileInfo->field_0x3c looks like some kind of user pointer?
JKRDvdFile* dvdFile = *(JKRDvdFile**)((u8*)fileInfo + (offsetof(JKRDvdFile, mDvdFile) - offsetof(JKRDvdFile, mFileInfo)));
OSSendMessage(&dvdFile->mMessageQueue2, (OSMessage)id, OS_MESSAGE_NOBLOCK);
OSSendMessage(&dvdFile->mMessageQueue2, (OSMessage)(intptr_t)id, OS_MESSAGE_NOBLOCK);
}
s32 JKRDvdFile::getFileSize(void) const {
+1 -1
View File
@@ -386,7 +386,7 @@ JKRHeap* JKRHeap::findAllHeap(void* ptr) const {
return NULL;
}
void JKRHeap::dispose_subroutine(u32 begin, u32 end) {
void JKRHeap::dispose_subroutine(uintptr_t begin, uintptr_t end) {
JSUListIterator<JKRDisposer> next_iterator((JSULink<JKRDisposer>*)NULL);
JSUListIterator<JKRDisposer> it = mDisposerList.getFirst();
while (it != mDisposerList.getEnd()) {
+1 -1
View File
@@ -178,7 +178,7 @@ void JUTVideo::postRetraceProc(u32 retrace_count) {
sManager->mPostCallback(retrace_count);
}
OSSendMessage(&sManager->mMessageQueue, (OSMessage)VIGetRetraceCount(), OS_MESSAGE_NOBLOCK);
OSSendMessage(&sManager->mMessageQueue, (OSMessage)(uintptr_t)VIGetRetraceCount(), OS_MESSAGE_NOBLOCK);
}
void JUTVideo::setRenderMode(GXRenderModeObj const* pObj) {
+1 -1
View File
@@ -3719,7 +3719,7 @@ BOOL daMP_WaitUntilPrepare() {
}
void daMP_PrepareReady(BOOL msg) {
OSSendMessage(&daMP_PrepareReadyQueue, (OSMessage)msg, 1);
OSSendMessage(&daMP_PrepareReadyQueue, (OSMessage)(uintptr_t)msg, 1);
}
static BOOL daMP_THPPlayerPrepare(s32 frame, s32 flag, s32 audioTrack) {
+1 -1
View File
@@ -2270,7 +2270,7 @@ bool dMenu_Fmap_c::readFieldMapData(void** o_data, char const* i_path, bool para
}
void dMenu_Fmap_c::decodeFieldMapData() {
int field_data = (intptr_t)mpFieldDat;
intptr_t field_data = (intptr_t)mpFieldDat;
dMenu_Fmap_field_region_data_c* region_data
= (dMenu_Fmap_field_region_data_c*)(field_data + mpFieldDat->mRegionDataOffset);
dMenuMapCommon_c::Stage_c* stage_data
+2 -2
View File
@@ -29,14 +29,14 @@ fpc_ProcID fopScnM_DeleteReq(scene_class* i_scene) {
return fopScnRq_Request(1, i_scene, 0x7FFF, NULL, 0x7FFF, 0) != fpcM_ERROR_PROCESS_ID_e;
}
int fopScnM_CreateReq(s16 i_procName, s16 param_2, u16 param_3, u32 i_data) {
int fopScnM_CreateReq(s16 i_procName, s16 param_2, u16 param_3, uintptr_t i_data) {
printf("[DIAG] fopScnM_CreateReq: procName=%d fade=%d\n", i_procName, param_2); fflush(stdout);
fpc_ProcID result = fopScnRq_Request(0, 0, i_procName, (void*)i_data, param_2, param_3);
printf("[DIAG] fopScnM_CreateReq: result=%d (error=%d)\n", result, fpcM_ERROR_PROCESS_ID_e); fflush(stdout);
return result != fpcM_ERROR_PROCESS_ID_e;
}
u32 fopScnM_ReRequest(s16 i_procName, u32 i_data) {
u32 fopScnM_ReRequest(s16 i_procName, uintptr_t i_data) {
if (l_scnRqID == fpcM_ERROR_PROCESS_ID_e) {
return 0;
}
+3 -2
View File
@@ -6,6 +6,7 @@
#include "f_pc/f_pc_pause.h"
#include "f_pc/f_pc_node.h"
#include "f_pc/f_pc_layer_iter.h"
#include <cstdint>
int fpcPause_IsEnable(void* i_proc, u8 i_flag) {
if ((((base_process_class*)i_proc)->pause_flag & i_flag) == i_flag) {
@@ -20,7 +21,7 @@ int fpcPause_Enable(void* i_proc, u8 i_flag) {
if (fpcBs_Is_JustOfType(g_fpcNd_type, ((base_process_class*)i_proc)->subtype)) {
fpcLyIt_OnlyHere(&((process_node_class*)i_proc)->layer, (fpcLyIt_OnlyHereFunc)fpcPause_Enable,
(void*)i_flag);
(void*)(uintptr_t)i_flag);
}
return 1;
}
@@ -30,7 +31,7 @@ int fpcPause_Disable(void* i_proc, u8 i_flag) {
((base_process_class*)i_proc)->pause_flag &= var_r31;
if (fpcBs_Is_JustOfType(g_fpcNd_type, ((base_process_class*)i_proc)->subtype)) {
fpcLyIt_OnlyHere(&((process_node_class*)i_proc)->layer, (fpcLyIt_OnlyHereFunc)fpcPause_Disable, (void*)i_flag);
fpcLyIt_OnlyHere(&((process_node_class*)i_proc)->layer, (fpcLyIt_OnlyHereFunc)fpcPause_Disable, (void*)(uintptr_t)i_flag);
}
return 1;
+1 -1
View File
@@ -99,7 +99,7 @@ void mDoRst_reset(int reset, u32 resetCode, int forceMenu) {
}
void checkDiskCallback(s32 result, DVDCommandBlock* block) {
block->userData = (void*)result;
block->userData = (void*)(intptr_t)result;
}
void mDoRst_resetCallBack(int port, void*) {
+1 -1
View File
@@ -586,7 +586,7 @@ static void fault_callback_scroll(u16, OSContext* p_context, u32, u32) {
JUTException* manager = JUTException::getManager();
JUTConsole* exConsole = manager->getConsole();
u32 srr0 = p_context->srr0 & -4;
uintptr_t srr0 = p_context->srr0 & -4;
if (srr0 >= 0x8000000C && srr0 < 0x82FFFFFF) {
exConsole->print_f("(SRR0-3):%08X %08X %08X %08X\n", *(u32*)(srr0 - 0xC),
*(u32*)(srr0 - 0x8), *(u32*)(srr0 - 0x4), *(u32*)srr0);