diff options
author | ennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-08-18 13:53:14 +0000 |
---|---|---|
committer | ennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-08-18 13:53:14 +0000 |
commit | dc5faea665d76f5b51fa6437a73602084cb4008a (patch) | |
tree | 5ea04233dc4cfd8de1dc65d4e50ba35fd63bd0e3 | |
parent | 1f0b02a561dc32e9d8781e7503cc6258bad2cd02 (diff) | |
download | crawl-ref-dc5faea665d76f5b51fa6437a73602084cb4008a.tar.gz crawl-ref-dc5faea665d76f5b51fa6437a73602084cb4008a.zip |
Fixing blurriness on some tiles textures. This may fix the related issue on SF.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10569 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r-- | crawl-ref/source/tilereg.cc | 5 | ||||
-rw-r--r-- | crawl-ref/source/tilereg.h | 2 | ||||
-rw-r--r-- | crawl-ref/source/tilesdl.cc | 6 |
3 files changed, 9 insertions, 4 deletions
diff --git a/crawl-ref/source/tilereg.cc b/crawl-ref/source/tilereg.cc index 7e559d1b79..aa4bed5b7c 100644 --- a/crawl-ref/source/tilereg.cc +++ b/crawl-ref/source/tilereg.cc @@ -3618,9 +3618,10 @@ ImageManager::~ImageManager() unload_textures(); } -bool ImageManager::load_textures() +bool ImageManager::load_textures(bool need_mips) { - GenericTexture::MipMapOptions mip = GenericTexture::MIPMAP_CREATE; + GenericTexture::MipMapOptions mip = need_mips ? + GenericTexture::MIPMAP_CREATE : GenericTexture::MIPMAP_NONE; if (!m_textures[TEX_DUNGEON].load_texture("dngn.png", mip)) return (false); diff --git a/crawl-ref/source/tilereg.h b/crawl-ref/source/tilereg.h index 3ea855a493..92eacc40eb 100644 --- a/crawl-ref/source/tilereg.h +++ b/crawl-ref/source/tilereg.h @@ -25,7 +25,7 @@ public: ImageManager(); virtual ~ImageManager(); - bool load_textures(); + bool load_textures(bool need_mips); bool load_item_texture(); void unload_textures(); diff --git a/crawl-ref/source/tilesdl.cc b/crawl-ref/source/tilesdl.cc index f49bc3e48a..6f12ddb31b 100644 --- a/crawl-ref/source/tilesdl.cc +++ b/crawl-ref/source/tilesdl.cc @@ -313,7 +313,11 @@ bool TilesFramework::initialise() return (false); } - if (!m_image.load_textures()) + // If the window size is less than the view height, the textures will + // have to be shrunk. If this isn't the case, then don't create mipmaps, + // as this appears to make things blurry on some users machines. + bool need_mips = (m_windowsz.y < 32 * VIEW_MIN_HEIGHT); + if (!m_image.load_textures(need_mips)) return (false); calculate_default_options(); |