Mercurial > touhou
comparison stageviewer.py @ 6:9159fa222923
Fix sprite size/scale thing \o/
author | Thibaut Girka <thib@sitedethib.com> |
---|---|
date | Tue, 02 Aug 2011 00:45:30 +0200 |
parents | aa201d8cfc19 |
children | 02a5f5314a19 |
comparison
equal
deleted
inserted
replaced
5:aa201d8cfc19 | 6:9159fa222923 |
---|---|
91 if 1 in properties: | 91 if 1 in properties: |
92 tx, ty, tw, th = anim.sprites[struct.unpack('<I', properties[1])[0]] | 92 tx, ty, tw, th = anim.sprites[struct.unpack('<I', properties[1])[0]] |
93 width, height = 1., 1. | 93 width, height = 1., 1. |
94 if 2 in properties: | 94 if 2 in properties: |
95 width, height = struct.unpack('<ff', properties[2]) | 95 width, height = struct.unpack('<ff', properties[2]) |
96 width = width_override or width * 16. #TODO: something is wrong here | 96 width = width_override or width * tw |
97 height = height_override or height * 16. #TODO: something is wrong here | 97 height = height_override or height * th |
98 transform = Matrix.get_scaling_matrix(width, height, 1.) | 98 transform = Matrix.get_scaling_matrix(width, height, 1.) |
99 if 7 in properties: | 99 if 7 in properties: |
100 transform = Matrix.get_scaling_matrix(-1., 1., 1.).mult(transform) | 100 transform = Matrix.get_scaling_matrix(-1., 1., 1.).mult(transform) |
101 if 9 in properties: | 101 if 9 in properties: |
102 rx, ry, rz = struct.unpack('<fff', properties[9]) | 102 rx, ry, rz = struct.unpack('<fff', properties[9]) |