diff options
author | Walter Bender <walter@walter-laptop.(none)> | 2010-01-30 15:01:48 (GMT) |
---|---|---|
committer | Walter Bender <walter@walter-laptop.(none)> | 2010-01-30 15:01:48 (GMT) |
commit | 12fedd22a5e9bc0b9941d0e73f748f75972c7c0c (patch) | |
tree | 22fd50ec3f5cebcf6988e20ac26e356e53a92524 /taproject.py | |
parent | 03636bc856f48252abc50c85458770f3a2d3bef7 (diff) |
adding multimedia support
Diffstat (limited to 'taproject.py')
-rw-r--r-- | taproject.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/taproject.py b/taproject.py index 298f281..58eee81 100644 --- a/taproject.py +++ b/taproject.py @@ -160,11 +160,14 @@ def read_data(tw, data): for i, c in enumerate(b.connections): if c is not None: bdock = b.docks[i] - for j in range(len(c.docks)): - if c.connections[j] == b: - cdock = c.docks[j] - nx, ny = sx+bdock[2]-cdock[2], sy+bdock[3]-cdock[3] - c.spr.move((nx, ny)) + if len(c.docks) != len(c.connections): + print "dock-connection mismatch %s %s" % (b.name, c.name) + else: + for j in range(len(c.docks)): + if c.connections[j] == b: + cdock = c.docks[j] + nx, ny = sx+bdock[2]-cdock[2], sy+bdock[3]-cdock[3] + c.spr.move((nx, ny)) def load_block(tw, b): # TODO: optionally read blocks without x, y |