diff options
Diffstat (limited to '')
-rw-r--r-- | NW4RTools/ObjExporter.cs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/NW4RTools/ObjExporter.cs b/NW4RTools/ObjExporter.cs index 7b1afef..8cb9088 100644 --- a/NW4RTools/ObjExporter.cs +++ b/NW4RTools/ObjExporter.cs @@ -138,6 +138,25 @@ namespace NW4RTools { if (cmd == 0) break; + // These can contain other stuff. Who knew.
+
+ if ((cmd & 0x80) == 0) {
+ GXCommand castCmd = (GXCommand)cmd;
+
+ switch (castCmd) {
+ case GXCommand.LoadPosMtxFromArray:
+ case GXCommand.LoadNrmMtxFromArray:
+ case GXCommand.LoadTexCoordMtxFromArray:
+ case GXCommand.LoadLightFromArray:
+ dl.Skip(4);
+ break;
+ default:
+ Console.WriteLine("UNIMPLEMENTED GX COMMAND: {0}", castCmd);
+ break;
+ }
+ continue; // don't process it as a primitive + }
+
PrimitiveType prim = (PrimitiveType)((cmd >> 3) & 7); int vtxCount = dl.ReadUInt16(); Output.WriteLine("# Primitive: {0} ({1} vertices)", prim, vtxCount); |