COMMON: Added compilation safeguards for the png decoder

This commit is contained in:
md5 2011-05-13 20:34:25 +03:00
parent b3bc35c62a
commit 9bbfa2846b
2 changed files with 19 additions and 0 deletions

View file

@ -21,6 +21,9 @@
*/
#include "graphics/png.h"
#ifdef GRAPHICS_PNG_H
#include "graphics/pixelformat.h"
#include "graphics/surface.h"
@ -489,3 +492,5 @@ void PNG::readTransparencyChunk(uint32 chunkLength) {
}
} // End of Graphics namespace
#endif // GRAPHICS_PNG_H

View file

@ -23,8 +23,20 @@
/*
* PNG decoder used in engines:
* - sword25
* Dependencies:
* - zlib
*/
// Currently, only the sword25 engine uses the PNG decoder, so skip compiling
// it if sword25 is not enabled, or if zlib (a required dependency) is not
// enabled.
#if !(defined(ENABLE_SWORD25) || defined(USE_ZLIB))
// Do not compile the PNG decoder code
#else
#ifndef GRAPHICS_PNG_H
#define GRAPHICS_PNG_H
@ -164,3 +176,5 @@ private:
} // End of Graphics namespace
#endif // GRAPHICS_PNG_H
#endif // Engine and zlib guard