Fix cmb full modes

This commit is contained in:
KillzXGaming 2019-08-03 17:12:09 -04:00
parent 61cd136c41
commit 602594aa3a
4 changed files with 10 additions and 3 deletions

Binary file not shown.

View file

@ -838,7 +838,7 @@ namespace FirstPlugin
for (int i = 0; i < meshCount; i++)
{
if (header.Version == CMBVersion.OOT3DS)
reader.SeekBegin(meshPos + (i * 0x04));
reader.SeekBegin(meshPos + (i * 4));
else if (header.Version == CMBVersion.MM3DS)
reader.SeekBegin(meshPos + (i * 0x0C));
else if (header.Version >= CMBVersion.LM3DS)
@ -848,6 +848,9 @@ namespace FirstPlugin
mesh.SepdIndex = reader.ReadUInt16();
mesh.MaterialIndex = reader.ReadByte();
Meshes.Add(mesh);
Console.WriteLine($"SepdIndex {mesh.SepdIndex}");
Console.WriteLine($"MaterialIndex { mesh.MaterialIndex}");
}
}
@ -934,6 +937,8 @@ namespace FirstPlugin
else
reader.SeekBegin(pos + 0x24);
Console.WriteLine("sepd count " + count);
Position = ReadVertexAttrib(reader);
Normal = ReadVertexAttrib(reader);
if (header.Version >= CMBVersion.MM3DS)

View file

@ -37,10 +37,10 @@ namespace Grezzo.CmbEnums
public enum CullMode : byte
{
FRONT_AND_BACK,
NONE,
BACK,
FRONT,
NONE,
FRONT_AND_BACK,
}
public enum SkinningMode : ushort

View file

@ -86,6 +86,8 @@ namespace FirstPlugin
string CodeName = reader.ReadString(0x0C);
Console.WriteLine("Version " + Version);
var Rooms = ReadRoomHeaders(reader, Version);
foreach (var room in Rooms)
LoadRooms(room, this);