summaryrefslogtreecommitdiff
path: root/src/JSystem/J3DGraphLoader/J3DClusterLoader.cpp
diff options
context:
space:
mode:
authorkipcode66 <kipcode66@gmail.com>2025-12-21 20:48:09 -0500
committerGitHub <noreply@github.com>2025-12-21 17:48:09 -0800
commit4045f16667fe6903243801e1155d086ae8df27b1 (patch)
treebaa2a62646926e1f2d4c994c95931bcc4d66e5f0 /src/JSystem/J3DGraphLoader/J3DClusterLoader.cpp
parentb4f931f75f5d87fc7844e00eab7d7b99eceb3622 (diff)
next round of standard compiler fixes (#2969)
* next round of standard compiler fixes * Fix weak function order issue * fix missmatch with ShieldD version
Diffstat (limited to 'src/JSystem/J3DGraphLoader/J3DClusterLoader.cpp')
-rw-r--r--src/JSystem/J3DGraphLoader/J3DClusterLoader.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/JSystem/J3DGraphLoader/J3DClusterLoader.cpp b/src/JSystem/J3DGraphLoader/J3DClusterLoader.cpp
index 3abd6ea603..895652ef40 100644
--- a/src/JSystem/J3DGraphLoader/J3DClusterLoader.cpp
+++ b/src/JSystem/J3DGraphLoader/J3DClusterLoader.cpp
@@ -70,9 +70,9 @@ void J3DClusterLoader_v15::readCluster(const J3DClusterBlock* block) {
mpDeformData->mVtxNrm = JSUConvertOffsetToPtr<f32>(block, block->mVtxNrm);
void* clusterPointer = block->mClusterPointer;
- int clusterKeyPointerSize = (int)block->mClusterKeyPointer - (int)clusterPointer;
- int clusterVertexPointerSize = (int)block->mClusterVertex - (int)clusterPointer;
- int vtxPosSize = (int)block->mVtxPos - (int)clusterPointer;
+ int clusterKeyPointerSize = (intptr_t)block->mClusterKeyPointer - (intptr_t)clusterPointer;
+ int clusterVertexPointerSize = (intptr_t)block->mClusterVertex - (intptr_t)clusterPointer;
+ int vtxPosSize = (intptr_t)block->mVtxPos - (intptr_t)clusterPointer;
u8* arr = new (0x20) u8[vtxPosSize];
memcpy(arr, JSUConvertOffsetToPtr<J3DCluster>(block, clusterPointer), vtxPosSize);
mpDeformData->mClusterPointer = (J3DCluster*)arr;
@@ -81,10 +81,10 @@ void J3DClusterLoader_v15::readCluster(const J3DClusterBlock* block) {
for (int i = 0; i < mpDeformData->getClusterNum(); i++) {
J3DCluster* cluster = &mpDeformData->mClusterPointer[i];
- cluster->mClusterKey = JSUConvertOffsetToPtr<J3DClusterKey>(arr - (int)clusterPointer, cluster->mClusterKey);
+ cluster->mClusterKey = JSUConvertOffsetToPtr<J3DClusterKey>(arr - (intptr_t)clusterPointer, cluster->mClusterKey);
cluster->field_0x18 = JSUConvertOffsetToPtr<u16>(block, cluster->field_0x18);
cluster->mClusterVertex =
- JSUConvertOffsetToPtr<J3DClusterVertex>(arr - (int)clusterPointer, cluster->mClusterVertex);
+ JSUConvertOffsetToPtr<J3DClusterVertex>(arr - (intptr_t)clusterPointer, cluster->mClusterVertex);
J3DDeformer* deformer = new J3DDeformer(mpDeformData);
if (cluster->field_0x14 != 0) {
deformer->field_0xc = new f32[cluster->field_0x14 * 3];