portx64: and more s32 -> uintptr_t

This commit is contained in:
Raf committed 2024-07-30 16:46:02 +08:00
1 parent 315a5642da
commit 8a94af6a1c
20 files changed
+107 -107

No files matched your search

+7 -7
View File
@@ -1237,7 +1237,7 @@ void setupLoadBriefing(s32 stagenum, u8 *buffer, s32 bufferlen, struct briefing
langLoadToAddr(briefing->langbank, langbuffer, langbufferlen);
start = (struct defaultobj *)((uintptr_t)setup + (u32)setup->props);
start = (struct defaultobj *)((uintptr_t)setup + (uintptr_t)setup->props);
if (start != NULL) {
struct defaultobj *obj;
@@ -1323,10 +1323,10 @@ void setupLoadFiles(s32 stagenum)
setup = (struct stagesetup *)g_GeCreditsData;
langLoad(langGetLangBankIndexFromStagenum(stagenum));
g_StageSetup.intro = (s32 *)((uintptr_t)setup + (u32)setup->intro);
g_StageSetup.props = (u32 *)((uintptr_t)setup + (u32)setup->props);
g_StageSetup.paths = (struct path *)((uintptr_t)setup + (u32)setup->paths);
g_StageSetup.ailists = (struct ailist *)((uintptr_t)setup + (u32)setup->ailists);
g_StageSetup.intro = (s32 *)((uintptr_t)setup + (uintptr_t)setup->intro);
g_StageSetup.props = (u32 *)((uintptr_t)setup + (uintptr_t)setup->props);
g_StageSetup.paths = (struct path *)((uintptr_t)setup + (uintptr_t)setup->paths);
g_StageSetup.ailists = (struct ailist *)((uintptr_t)setup + (uintptr_t)setup->ailists);
g_LoadType = LOADTYPE_PADS;
@@ -1339,7 +1339,7 @@ void setupLoadFiles(s32 stagenum)
// Convert ailist pointers from file-local to proper pointers
if (g_StageSetup.ailists) {
for (i = 0; g_StageSetup.ailists[i].list != NULL; i++) {
g_StageSetup.ailists[i].list = (u8 *)((uintptr_t)setup + (u32)g_StageSetup.ailists[i].list);
g_StageSetup.ailists[i].list = (u8 *)((uintptr_t)setup + (uintptr_t)g_StageSetup.ailists[i].list);
}
}
@@ -1383,7 +1383,7 @@ void setupLoadFiles(s32 stagenum)
// and calculate the path lengths
if (g_StageSetup.paths) {
for (i = 0; g_StageSetup.paths[i].pads != NULL; i++) {
g_StageSetup.paths[i].pads = (s32 *)((uintptr_t)g_StageSetup.paths[i].pads + (u32)setup);
g_StageSetup.paths[i].pads = (s32 *)((uintptr_t)g_StageSetup.paths[i].pads + (uintptr_t)setup);
for (j = 0; g_StageSetup.paths[i].pads[j] >= 0; j++);