some J3D/misc cleanup (#2628)

* some j3d cleanup

* begin using uintptr_t

* j3dgraphbase cleanup

* j3dgraphanimator cleanup
This commit is contained in:
TakaRikka
2025-09-04 07:56:59 -07:00
committed by GitHub
parent ee8b843996
commit b45a089e15
290 changed files with 4221 additions and 3605 deletions
+4 -3
View File
@@ -2,17 +2,18 @@
#define JSUPPORT_H
#include <dolphin.h>
#include <stdint.h>
/**
* @ingroup jsystem-jsupport
*
*/
template <typename T>
T* JSUConvertOffsetToPtr(const void* ptr, u32 offset) {
T* JSUConvertOffsetToPtr(const void* ptr, uintptr_t offset) {
if (offset == 0) {
return NULL;
} else {
return (T*)((s32)ptr + (s32)offset);
return (T*)((intptr_t)ptr + (intptr_t)offset);
}
}
@@ -25,7 +26,7 @@ T* JSUConvertOffsetToPtr(const void* ptr, const void* offset) {
if (offset == NULL) {
return NULL;
} else {
return (T*)((s32)ptr + (s32)offset);
return (T*)((intptr_t)ptr + (intptr_t)offset);
}
}