Mercurial > mplayer.hg
changeset 36249:93f1111ab78b
Simplify texture coordinate calculation.
author | reimar |
---|---|
date | Wed, 12 Jun 2013 18:54:25 +0000 |
parents | 15de38d9f726 |
children | 7e4a8748cf9a |
files | libvo/matrixview.c |
diffstat | 1 files changed, 2 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/libvo/matrixview.c Wed Jun 12 18:54:23 2013 +0000 +++ b/libvo/matrixview.c Wed Jun 12 18:54:25 2013 +0000 @@ -57,7 +57,6 @@ { int light2 = 0; float tx, ty; - int num2, num3; num %= 55; if (light < 10) light = 0; @@ -69,10 +68,8 @@ if (light > 255) light = 255; light2 = 128; } - num2 = num / 10; - num3 = num - (num2 * 10); - ty = (float)num2 / 6; - tx = (float)num3 / 10; + ty = (float)(num / 10) / 6; + tx = (float)(num % 10) / 10; mpglColor4ub(light2, light, light2, 255); // Basic polygon color mpglTexCoord2f(tx, ty);