diff options
author | truelight <truelight@openttd.org> | 2007-06-13 18:52:06 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2007-06-13 18:52:06 +0000 |
commit | 063c4f7862693c6ea3c0698e049a88c3196e2d80 (patch) | |
tree | c999a44c328fb8a50db6f8f75b7e974b2fe332de /src | |
parent | a84e6b015d2715daa872f11f1f3893ce06e9f458 (diff) | |
download | openttd-063c4f7862693c6ea3c0698e049a88c3196e2d80.tar.xz |
(svn r10148) -Fix r10143: make --without-png to compile again
Diffstat (limited to 'src')
-rw-r--r-- | src/spritecache.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/spritecache.cpp b/src/spritecache.cpp index 1a2721946..3e9faef4a 100644 --- a/src/spritecache.cpp +++ b/src/spritecache.cpp @@ -14,7 +14,9 @@ #include "fileio.h" #include "helpers.hpp" #include "spriteloader/grf.hpp" +#ifdef WITH_PNG #include "spriteloader/png.hpp" +#endif /* WITH_PNG */ #include "blitter/blitter.hpp" /* Default of 4MB spritecache */ @@ -137,6 +139,7 @@ static void* ReadSprite(SpriteCache *sc, SpriteID id, bool real_sprite) file_pos = GetSpriteCache(SPR_IMG_QUERY)->file_pos; } +#ifdef WITH_PNG if (BlitterFactoryBase::GetCurrentBlitter()->GetScreenDepth() == 32) { /* Try loading 32bpp graphics in case we are 32bpp output */ SpriteLoaderPNG sprite_loader; @@ -150,6 +153,7 @@ static void* ReadSprite(SpriteCache *sc, SpriteID id, bool real_sprite) } /* If the PNG couldn't be loaded, fall back to 8bpp grfs */ } +#endif /* WITH_PNG */ FioSeekToFile(file_pos); |