From 4bf52adcfdb15f80b10e26dc82e58f58b96262c6 Mon Sep 17 00:00:00 2001 From: Lee Salzman Date: Wed, 25 Mar 2009 15:18:57 +0000 Subject: [PATCH] added texreduce to 1.0 branch upped scopefov limit to 60 git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4296 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/rendergl.cpp | 2 +- source/src/texture.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/src/rendergl.cpp b/source/src/rendergl.cpp index 3cb23e36..4e3deec9 100644 --- a/source/src/rendergl.cpp +++ b/source/src/rendergl.cpp @@ -425,7 +425,7 @@ void fixresizedscreen() } FVARP(fov, 75, 90, 120); -VARP(scopefov, 5, 50, 50); +VARP(scopefov, 5, 50, 60); VARP(spectfov, 5, 110, 120); diff --git a/source/src/texture.cpp b/source/src/texture.cpp index eb370167..e2f16c49 100644 --- a/source/src/texture.cpp +++ b/source/src/texture.cpp @@ -88,10 +88,10 @@ void resizetexture(int w, int h, bool mipmap, bool canreduce, GLenum target, int { int hwlimit = hwtexsize, sizelimit = mipmap && maxtexsize ? min(maxtexsize, hwlimit) : hwlimit; - if(canreduce) loopi(texreduce) + if(canreduce && texreduce) { - if(w > 1) w /= 2; - if(h > 1) h /= 2; + w = max(w>>texreduce, 1); + h = max(h>>texreduce, 1); } w = min(w, sizelimit); h = min(h, sizelimit);