diff options
| author | LagoLunatic <LagoLunatic@users.noreply.github.com> | 2023-12-18 23:24:02 -0500 |
|---|---|---|
| committer | LagoLunatic <LagoLunatic@users.noreply.github.com> | 2023-12-18 23:24:02 -0500 |
| commit | 0a5559c9a55b241c1e7cfd6550148c9bf0cdbb1b (patch) | |
| tree | 4c20502e233e3dc16cf5c0366f3468dcb8862f85 /src/JSystem/J3DGraphLoader/J3DModelLoader.cpp | |
| parent | 2498d687ebdca4e035887054fe6fd3b1a4ca09dd (diff) | |
J3DModelLoader OK
Diffstat (limited to 'src/JSystem/J3DGraphLoader/J3DModelLoader.cpp')
| -rw-r--r-- | src/JSystem/J3DGraphLoader/J3DModelLoader.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/JSystem/J3DGraphLoader/J3DModelLoader.cpp b/src/JSystem/J3DGraphLoader/J3DModelLoader.cpp index b057137d..5fee05ec 100644 --- a/src/JSystem/J3DGraphLoader/J3DModelLoader.cpp +++ b/src/JSystem/J3DGraphLoader/J3DModelLoader.cpp @@ -147,7 +147,6 @@ J3DMaterialTable* J3DModelLoader::loadMaterialTable(const void* i_data) { /* 802FBE24-802FC0CC .text loadBinaryDisplayList__14J3DModelLoaderFPCvUl */ J3DModelData* J3DModelLoader::loadBinaryDisplayList(const void* i_data, u32 i_flags) { - /* Nonmatching - strange loop optimization of (i_flags & 0x03000000) | 0x50100000 */ mpModelData = new J3DModelData(); mpModelData->clear(); mpModelData->mpRawData = i_data; @@ -183,12 +182,14 @@ J3DModelData* J3DModelLoader::loadBinaryDisplayList(const void* i_data, u32 i_fl modifyMaterial(i_flags); break; case 'MAT3': + u32 flags = 0x50100000; + flags |= i_flags & 0x03000000; mpMaterialBlock = (J3DMaterialBlock*)block; u32 matType = getBdlFlag_MaterialType(i_flags); if (matType == 0) { - readMaterial((J3DMaterialBlock*)block, (i_flags & 0x03000000) | 0x50100000); + readMaterial((J3DMaterialBlock*)block, flags); } else if (matType == 0x2000) { - readPatchedMaterial((J3DMaterialBlock*)block, (i_flags & 0x03000000) | 0x50100000); + readPatchedMaterial((J3DMaterialBlock*)block, flags); } break; default: @@ -211,9 +212,9 @@ void J3DModelLoader::setupBBoardInfo() { J3DMaterial* mesh = mpModelData->getJointNodePointer(i)->getMesh(); if (mesh != NULL) { u16 shape_index = mesh->getShape()->getIndex(); - u16* index_table = JSUConvertOffsetToPtr<u16>(mpShapeBlock, mpShapeBlock->mpIndexTable); + u16* index_table = JSUConvertOffsetToPtr<u16>(mpShapeBlock, (u32)mpShapeBlock->mpIndexTable); J3DShapeInitData* shape_init_data = - JSUConvertOffsetToPtr<J3DShapeInitData>(mpShapeBlock, mpShapeBlock->mpShapeInitData); + JSUConvertOffsetToPtr<J3DShapeInitData>(mpShapeBlock, (u32)mpShapeBlock->mpShapeInitData); J3DJoint* joint; switch (shape_init_data[index_table[shape_index]].mShapeMtxType) { case 0: |
