Mercurial > touhou
changeset 9:668b808b73ef
Fix texture coords handling
author | Thibaut Girka <thib@sitedethib.com> |
---|---|
date | Tue, 02 Aug 2011 14:26:19 +0200 |
parents | f3ff96192476 |
children | 059ea0ea8d38 |
files | stageviewer.py |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/stageviewer.py +++ b/stageviewer.py @@ -109,10 +109,10 @@ def build_objects_faces(stage, anim): transform = Matrix.get_translation_matrix(x, y, z).mult(transform) vertmat = transform.mult(vertmat) - uvs = [(tx / 256., 1. - (ty / 256.)), - ((tx + tw) / 256., 1. - (ty / 256.)), - ((tx + tw) / 256., 1. - ((ty + th) / 256.)), - (tx / 256., 1. - ((ty + th) / 256.))] + uvs = [(tx / anim.size[0], 1. - (ty / anim.size[1])), + ((tx + tw) / anim.size[0], 1. - (ty / anim.size[1])), + ((tx + tw) / anim.size[0], 1. - ((ty + th) / anim.size[1])), + (tx / anim.size[0], 1. - ((ty + th) / anim.size[1]))] for i in xrange(4): w = vertmat.data[3][i]