From 4a5f33a970aa7f5512c078e6aa405b8d84460a98 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Sat, 12 Sep 2009 10:19:10 +0100 Subject: [PATCH] Dump D3DMATRIX's contents. --- base.py | 2 +- d3d8types.py | 2 +- d3d9types.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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", [ -- 2.45.2