[Scummvm-cvs-logs] SF.net SVN: scummvm:[53169] scummvm/trunk

sev at users.sourceforge.net sev at users.sourceforge.net
Tue Oct 12 23:12:51 CEST 2010


Revision: 53169
          http://scummvm.svn.sourceforge.net/scummvm/?rev=53169&view=rev
Author:   sev
Date:     2010-10-12 21:12:50 +0000 (Tue, 12 Oct 2010)

Log Message:
-----------
SWORD25: Added detection of libtheora, png an dplugged in the engine

Modified Paths:
--------------
    scummvm/trunk/base/plugins.cpp
    scummvm/trunk/configure
    scummvm/trunk/engines/engines.mk

Modified: scummvm/trunk/base/plugins.cpp
===================================================================
--- scummvm/trunk/base/plugins.cpp	2010-10-12 21:02:41 UTC (rev 53168)
+++ scummvm/trunk/base/plugins.cpp	2010-10-12 21:12:50 UTC (rev 53169)
@@ -154,6 +154,9 @@
 		#if PLUGIN_ENABLED_STATIC(SWORD2)
 		LINK_PLUGIN(SWORD2)
 		#endif
+		#if PLUGIN_ENABLED_STATIC(SWORD25)
+		LINK_PLUGIN(SWORD25)
+		#endif
 		#if PLUGIN_ENABLED_STATIC(TEENAGENT)
 		LINK_PLUGIN(TEENAGENT)
 		#endif

Modified: scummvm/trunk/configure
===================================================================
--- scummvm/trunk/configure	2010-10-12 21:02:41 UTC (rev 53168)
+++ scummvm/trunk/configure	2010-10-12 21:12:50 UTC (rev 53169)
@@ -105,6 +105,7 @@
 add_engine sky "Beneath a Steel Sky" yes
 add_engine sword1 "Broken Sword" yes
 add_engine sword2 "Broken Sword II" yes
+add_engine sword25 "Broken Sword 2.5" no
 add_engine teenagent "Teen Agent" yes
 add_engine testbed "TestBed: the Testing framework" no
 add_engine tinsel "Tinsel" yes
@@ -125,6 +126,8 @@
 _seq_midi=auto
 _zlib=auto
 _mpeg2=no
+_png=auto
+_theoradec=auto
 _fluidsynth=auto
 _16bit=auto
 _readline=auto
@@ -736,6 +739,12 @@
 
   --disable-indeo3         disable Indeo3 decoder [autodetect]
 
+  --with-png-prefix=DIR    Prefix where libpng is installed (optional)
+  --disable-png            disable PNG decoder [autodetect]
+
+  --with-theoradec-prefix=DIR Prefix where libtheoraec is installed (optional)
+  --disable-theoradec      disable Theora decoder [autodetect]
+
   --with-fluidsynth-prefix=DIR  Prefix where libfluidsynth is
                            installed (optional)
   --disable-fluidsynth     disable fluidsynth MIDI driver [autodetect]
@@ -788,6 +797,10 @@
 	--enable-mpeg2)           _mpeg2=yes      ;;
 	--disable-indeo3)         _indeo3=no      ;;
 	--enable-indeo3)          _indeo3=yes     ;;
+	--disable-png)            _png=no         ;;
+	--enable-png)             _png=yes        ;;
+	--disable-theoradec)      _png=no         ;;
+	--enable-theoradec)       _theoradec=yes        ;;
 	--disable-fluidsynth)     _fluidsynth=no  ;;
 	--enable-readline)        _readline=yes   ;;
 	--disable-readline)       _readline=no    ;;
@@ -844,6 +857,16 @@
 		MAD_CFLAGS="-I$arg/include"
 		MAD_LIBS="-L$arg/lib"
 		;;
+	--with-png-prefix=*)
+		arg=`echo $ac_option | cut -d '=' -f 2`
+		PNG_CFLAGS="-I$arg/include"
+		PNG_LIBS="-L$arg/lib"
+		;;
+	--with-theoradec-prefix=*)
+		arg=`echo $ac_option | cut -d '=' -f 2`
+		THEORADEC_CFLAGS="-I$arg/include"
+		THEORADEC_LIBS="-L$arg/lib"
+		;;
 	--with-zlib-prefix=*)
 		arg=`echo $ac_option | cut -d '=' -f 2`
 		ZLIB_CFLAGS="-I$arg/include"
@@ -2339,6 +2362,62 @@
 echo "$_alsa"
 
 #
+# Check for PNG
+#
+echocheck "PNG >= 1.2.8"
+if test "$_png" = auto ; then
+	_png=no
+	cat > $TMPC << EOF
+#include <png.h>
+int main(void) { if (PNG_LIBPNG_VER >= 10208) { return 0; } return 1; }
+EOF
+	cc_check_no_clean $PNG_CFLAGS $PNG_LIBS -lpng && $TMPO$HOSTEXEEXT && _png=yes
+	cc_check_clean
+fi
+if test "$_png" = yes ; then
+	LIBS="$LIBS $PNG_LIBS -lpng"
+	INCLUDES="$INCLUDES $PNG_CFLAGS"
+fi
+define_in_config_h_if_yes "$_png" 'USE_PNG'
+echo "$_png"
+
+if test `get_engine_build sword25` = yes && test ! "$_png" = yes ; then
+	echo "...disabling Broken Sword 2.5 engine. PNG is required"
+	engine_disable sword25
+fi
+
+#
+# Check for Theora Decoder
+#
+echocheck "libtheoradec >= 1.0"
+if test "$_vorbis" = no ; then
+	echo "skipping. no vorbis"
+	_theoradec=notsupported
+fi
+if test "$_theoradec" = auto ; then
+	_theoradec=no
+	cat > $TMPC << EOF
+#include <theora/theoradec.h>
+#include <vorbis/codec.h>
+int main(void) { th_ycbcr_buffer yuv; th_decode_ycbcr_out(NULL, yuv);  }
+EOF
+	cc_check $THEORADEC_CFLAGS $THEORADEC_LIBS -ltheoradec && _theoradec=yes
+fi
+if test "$_theoradec" = yes ; then
+	LIBS="$LIBS $THEORADEC_LIBS -ltheoradec"
+	INCLUDES="$INCLUDES $THEORADEC_CFLAGS"
+fi
+define_in_config_h_if_yes "$_theoradec" 'USE_THEORADEC'
+if test ! "$_theoradec" = notsupported ; then
+	echo "$_theoradec"
+fi
+
+if test `get_engine_build sword25` = yes && test ! "$_theoradec" = yes ; then
+	echo "...disabling Broken Sword 2.5 engine. libtheoradec is required"
+	engine_disable sword25
+fi
+
+#
 # Check for SEQ MIDI
 #
 echocheck "SEQ MIDI"

Modified: scummvm/trunk/engines/engines.mk
===================================================================
--- scummvm/trunk/engines/engines.mk	2010-10-12 21:02:41 UTC (rev 53168)
+++ scummvm/trunk/engines/engines.mk	2010-10-12 21:12:50 UTC (rev 53169)
@@ -141,6 +141,11 @@
 MODULES += engines/sword2
 endif
 
+ifdef ENABLE_SWORD25
+DEFINES += -DENABLE_SWORD25=$(ENABLE_SWORD25)
+MODULES += engines/sword25
+endif
+
 ifdef ENABLE_TESTBED
 DEFINES += -DENABLE_TESTBED=$(ENABLE_TESTBED)
 MODULES += engines/testbed


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list