From: José Fonseca <jfonseca@vmware.com>
Date: Sat, 12 Sep 2009 09:19:10 +0000 (+0100)
Subject: Dump D3DMATRIX's contents.
X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=4a5f33a970aa7f5512c078e6aa405b8d84460a98;p=apitrace

Dump D3DMATRIX's contents.
---

diff --git a/base.py b/base.py
index 0d94daa..6fba4b3 100644
--- a/base.py
+++ b/base.py
@@ -215,7 +215,7 @@ class Array(Type):
 
     def dump(self, instance):
         index = '__i' + self.type.id
-        print '    for (int %s; %s < %s; ++%s) {' % (index, index, self.length, index)
+        print '    for (int %s = 0; %s < %s; ++%s) {' % (index, index, self.length, index)
         print '        Log::BeginElement("%s");' % (self.type,)
         self.type.dump('(%s)[%s]' % (instance, index))
         print '        Log::EndElement();'
diff --git a/d3d8types.py b/d3d8types.py
index 23bbe27..53083db 100644
--- a/d3d8types.py
+++ b/d3d8types.py
@@ -44,7 +44,7 @@ D3DRECT = Struct("D3DRECT", [
 ])
 
 D3DMATRIX = Struct("D3DMATRIX", [
-    (Float, "m[4][4]"),
+    (Array(Array(Float, "4"), "4"), "m"),
 ])
 
 D3DVIEWPORT8 = Struct("D3DVIEWPORT8", [
diff --git a/d3d9types.py b/d3d9types.py
index 558c933..c4f1bd2 100644
--- a/d3d9types.py
+++ b/d3d9types.py
@@ -44,7 +44,7 @@ D3DRECT = Struct("D3DRECT", [
 ])
 
 D3DMATRIX = Struct("D3DMATRIX", [
-    (Float, "m[4][4]"),
+    (Array(Array(Float, "4"), "4"), "m"),
 ])
 
 D3DVIEWPORT9 = Struct("D3DVIEWPORT9", [