diff options
Diffstat (limited to 'src/JSystem/J3DGraphLoader/J3DClusterLoader.cpp')
| -rw-r--r-- | src/JSystem/J3DGraphLoader/J3DClusterLoader.cpp | 10 |
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]; |
