fixes and cleanups for j3d material

This commit is contained in:
Jasper St. Pierre
2026-04-12 20:14:24 -07:00
parent 4f958793ba
commit 9f22f27909
9 changed files with 66 additions and 49 deletions
@@ -11,7 +11,7 @@ void J3DMaterialTable::clear() {
mUniqueMatNum = 0;
mMaterialNodePointer = NULL;
mMaterialName = NULL;
field_0x10 = 0;
mMaterial = NULL;
mTexture = NULL;
mTextureName = NULL;
field_0x1c = 0;
@@ -22,7 +22,7 @@ J3DMaterialTable::J3DMaterialTable() {
mUniqueMatNum = 0;
mMaterialNodePointer = NULL;
mMaterialName = NULL;
field_0x10 = 0;
mMaterial = NULL;
mTexture = NULL;
mTextureName = NULL;
field_0x1c = 0;
@@ -138,7 +138,7 @@ s32 J3DModel::createMatPacket(J3DModelData* pModelData, u32 mdlFlags) {
matPacket->setInitShapePacket(shapePacket);
matPacket->addShapePacket(shapePacket);
matPacket->setTexture(pModelData->getTexture());
matPacket->setMaterialID(materialNode->mDiffFlag);
matPacket->setMaterialID(materialNode->mMaterialID);
if (pModelData->getModelDataType() == 1) {
matPacket->lock();