[Scummvm-cvs-logs] scummvm master -> e3a487702abb7c6f09aae8b0bdf53d3089112af2

bluegr md5 at scummvm.org
Fri May 13 19:38:14 CEST 2011


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
9bbfa2846b COMMON: Added compilation safeguards for the png decoder
e3a487702a CONFIGURE: Don't enable the sword25 engine if Zlib is not enabled


Commit: 9bbfa2846b81fc8ed2f2872fa7fe818145ac8c69
    https://github.com/scummvm/scummvm/commit/9bbfa2846b81fc8ed2f2872fa7fe818145ac8c69
Author: md5 (md5 at scummvm.org)
Date: 2011-05-13T10:34:25-07:00

Commit Message:
COMMON: Added compilation safeguards for the png decoder

Changed paths:
    graphics/png.cpp
    graphics/png.h



diff --git a/graphics/png.cpp b/graphics/png.cpp
index 6fd3e2b..e6dceab 100644
--- a/graphics/png.cpp
+++ b/graphics/png.cpp
@@ -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
diff --git a/graphics/png.h b/graphics/png.h
index 50e7a17..3f8ea85 100644
--- a/graphics/png.h
+++ b/graphics/png.h
@@ -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


Commit: e3a487702abb7c6f09aae8b0bdf53d3089112af2
    https://github.com/scummvm/scummvm/commit/e3a487702abb7c6f09aae8b0bdf53d3089112af2
Author: md5 (md5 at scummvm.org)
Date: 2011-05-13T10:35:39-07:00

Commit Message:
CONFIGURE: Don't enable the sword25 engine if Zlib is not enabled

Changed paths:
    configure



diff --git a/configure b/configure
index 91461f3..46e6eb8 100755
--- a/configure
+++ b/configure
@@ -2654,6 +2654,11 @@ fi
 define_in_config_if_yes "$_zlib" 'USE_ZLIB'
 echo "$_zlib"
 
+if test `get_engine_build sword25` = yes && test ! "$_zlib" = yes ; then
+	echo "...disabling Broken Sword 2.5 engine. ZLib is required"
+	engine_disable sword25
+fi
+
 #
 # Check for LibMPEG2
 #






More information about the Scummvm-git-logs mailing list