mirror of
https://github.com/zeldaret/tp
synced 2026-07-10 23:22:01 -04:00
some J3D/misc cleanup (#2628)
* some j3d cleanup * begin using uintptr_t * j3dgraphbase cleanup * j3dgraphanimator cleanup
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user