Mercurial > touhou
comparison pytouhou/game/sprite.py @ 31:55973a3f1222
Some more optimization!
author | Thibaut Girka <thib@sitedethib.com> |
---|---|
date | Sat, 13 Aug 2011 00:02:11 +0200 |
parents | e3ba2fa966f6 |
children | 4d93d45ecb62 |
comparison
equal
deleted
inserted
replaced
30:e3ba2fa966f6 | 31:55973a3f1222 |
---|---|
39 tx, ty, tw, th = self.texcoords | 39 tx, ty, tw, th = self.texcoords |
40 sx, sy = self.rescale | 40 sx, sy = self.rescale |
41 width = override_width or (tw * sx) | 41 width = override_width or (tw * sx) |
42 height = override_height or (th * sy) | 42 height = override_height or (th * sy) |
43 | 43 |
44 vertmat.scale(width, height, 1.) | 44 vertmat.scale2d(width, height) |
45 if self.mirrored: | 45 if self.mirrored: |
46 vertmat.flip() | 46 vertmat.flip() |
47 if self.rotations_3d != (0., 0., 0.): | 47 if self.rotations_3d != (0., 0., 0.): |
48 rx, ry, rz = self.rotations_3d | 48 rx, ry, rz = self.rotations_3d |
49 if rx: | 49 if rx: |