From 7cb0fe4f06a92612315385e59464290a5a0186ca Mon Sep 17 00:00:00 2001 From: sireus Date: Wed, 11 May 2011 09:57:25 +0000 Subject: [PATCH] fix scaling if scale is < 1.0 git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6418 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- docs/reference.xml | 2 +- source/src/rendercubes.cpp | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/reference.xml b/docs/reference.xml index 5c78aef0..0beee14a 100644 --- a/docs/reference.xml +++ b/docs/reference.xml @@ -6319,7 +6319,7 @@ Output: - controls whether textures with a non-default scale will be scaled down while loading to increase performance (0) or stay at higher resolution (1). + controls whether textures with a scale higher than 1.0 will be scaled down while loading to increase performance (0) or stay at higher resolution (1). diff --git a/source/src/rendercubes.cpp b/source/src/rendercubes.cpp index 6821fb5e..9bffb40d 100644 --- a/source/src/rendercubes.cpp +++ b/source/src/rendercubes.cpp @@ -107,7 +107,7 @@ void addstrip(int type, int tex, int start, int n) #define vert(v1, v2, v3, ls, t1, t2) \ { \ - vertex &v = verts.add(); \ + vertex &v = verts.add(); \ v.u = t1; v.v = t2; \ v.x = (float)(v1); v.y = (float)(v2); v.z = (float)(v3); \ v.r = ls->r; v.g = ls->g; v.b = ls->b; v.a = 255; \ @@ -123,9 +123,10 @@ enum int nquads; // for testing purpose. UNDOME on release. -//const float TEXTURESCALE = 32.0f; +//const float texturescale = 32.0f; VARP(texturescale, 16, 32, 64); -#define TEXTURESCALE (float(texturescale) * (uniformtexres ? 1.0f : t->scale)) + +#define TEXTURESCALE (float(texturescale) * ((uniformtexres && t->scale>1.0f) ? 1.0f : t->scale)) int striptype = 0, striptex, oh, oy, ox, odir; // the o* vars are used by the stripification int ol1r, ol1g, ol1b, ol2r, ol2g, ol2b;