diff options
-rw-r--r-- | common/bitstream.h | 10 | ||||
-rw-r--r-- | common/dct.h | 10 | ||||
-rw-r--r-- | common/fft.h | 10 | ||||
-rw-r--r-- | common/huffman.h | 10 | ||||
-rw-r--r-- | common/math.h | 10 | ||||
-rw-r--r-- | common/module.mk | 16 | ||||
-rw-r--r-- | common/rdft.h | 10 | ||||
-rwxr-xr-x | configure | 11 | ||||
-rw-r--r-- | engines/scumm/he/animation_he.cpp | 7 | ||||
-rw-r--r-- | engines/scumm/vars.cpp | 6 | ||||
-rw-r--r-- | video/bink_decoder.h | 8 | ||||
-rw-r--r-- | video/module.mk | 6 |
12 files changed, 104 insertions, 10 deletions
diff --git a/common/bitstream.h b/common/bitstream.h index 99aec252a3..f7ce17c3b5 100644 --- a/common/bitstream.h +++ b/common/bitstream.h @@ -22,6 +22,14 @@ // Based on eos' BitStream implementation +#include "common/scummsys.h" + +#ifndef USE_BINK + +#error "BitStream support disabled because Bink support is disabled" + +#else + #ifndef COMMON_BITSTREAM_H #define COMMON_BITSTREAM_H @@ -100,3 +108,5 @@ private: } // End of namespace Common #endif // COMMON_BITSTREAM_H + +#endif // USE_BINK
\ No newline at end of file diff --git a/common/dct.h b/common/dct.h index a0d625d55d..30eae8ca52 100644 --- a/common/dct.h +++ b/common/dct.h @@ -26,6 +26,14 @@ // Copyright (c) 2010 Alex Converse <alex.converse@gmail.com> // Copyright (c) 2010 Vitor Sessak +#include "common/scummsys.h" + +#ifndef USE_BINK + +#error "DCT support disabled because Bink support is disabled" + +#else + #ifndef COMMON_DCT_H #define COMMON_DCT_H @@ -69,3 +77,5 @@ private: } // End of namespace Common #endif // COMMON_DCT_H + +#endif // USE_BINK diff --git a/common/fft.h b/common/fft.h index 17d1ef0055..e32cd9d927 100644 --- a/common/fft.h +++ b/common/fft.h @@ -26,6 +26,14 @@ // Copyright (c) 2002 Fabrice Bellard // Partly based on libdjbfft by D. J. Bernstein +#include "common/scummsys.h" + +#ifndef USE_BINK + +#error "FFT support disabled because Bink support is disabled" + +#else + #ifndef COMMON_FFT_H #define COMMON_FFT_H @@ -71,3 +79,5 @@ private: } // End of namespace Common #endif // COMMON_FFT_H + +#endif // USE_BINK diff --git a/common/huffman.h b/common/huffman.h index 9c88a37541..5e4ad69325 100644 --- a/common/huffman.h +++ b/common/huffman.h @@ -22,6 +22,14 @@ // Based on eos' Huffman code +#include "common/scummsys.h" + +#ifndef USE_BINK + +#error "Huffman support disabled because Bink support is disabled" + +#else + #ifndef COMMON_HUFFMAN_H #define COMMON_HUFFMAN_H @@ -75,3 +83,5 @@ private: } // End of namespace Common #endif // COMMON_HUFFMAN_H + +#endif // USE_BINK diff --git a/common/math.h b/common/math.h index db803d9889..266dd72f2a 100644 --- a/common/math.h +++ b/common/math.h @@ -22,6 +22,14 @@ // Based on eos' math code +#include "common/scummsys.h" + +#ifndef USE_BINK + +#error "Math functions disabled because Bink support is disabled" + +#else + #ifndef COMMON_MATH_H #define COMMON_MATH_H @@ -109,3 +117,5 @@ inline float deg2rad(float deg) { } // End of namespace Common #endif // COMMON_MATHS_H + +#endif // USE_BINK diff --git a/common/module.mk b/common/module.mk index 31d91c8fe0..885a4f851a 100644 --- a/common/module.mk +++ b/common/module.mk @@ -2,30 +2,24 @@ MODULE := common MODULE_OBJS := \ archive.o \ - bitstream.o \ config-file.o \ config-manager.o \ dcl.o \ - dct.o \ debug.o \ error.o \ EventDispatcher.o \ EventRecorder.o \ - fft.o \ file.o \ fs.o \ hashmap.o \ - huffman.o \ iff_container.o \ macresman.o \ - math.o \ memorypool.o \ md5.o \ mutex.o \ quicktime.o \ random.o \ rational.o \ - rdft.o \ str.o \ stream.o \ system.o \ @@ -41,5 +35,15 @@ MODULE_OBJS := \ xmlparser.o \ zlib.o +ifdef USE_BINK +MODULE_OBJS += \ + bitstream.o \ + dct.o \ + fft.o \ + huffman.o \ + math.o \ + rdft.o +endif + # Include common rules include $(srcdir)/rules.mk diff --git a/common/rdft.h b/common/rdft.h index 33fcdd2b3b..0316f4fb17 100644 --- a/common/rdft.h +++ b/common/rdft.h @@ -24,6 +24,14 @@ // Based upon the (I)RDFT code in FFmpeg // Copyright (c) 2009 Alex Converse <alex dot converse at gmail dot com> +#include "common/scummsys.h" + +#ifndef USE_BINK + +#error "RDFT support disabled because Bink support is disabled" + +#else + #ifndef COMMON_RDFT_H #define COMMON_RDFT_H @@ -62,3 +70,5 @@ private: } // End of namespace Common #endif // COMMON_RDFT_H + +#endif // USE_BINK @@ -154,6 +154,7 @@ _build_scalers=yes _build_hq_scalers=yes _enable_prof=no _global_constructors=no +_bink=yes # Default vkeybd/keymapper options _vkeybd=no _keymapper=no @@ -775,6 +776,7 @@ Optional Features: --enable-text-console use text console instead of graphical console --enable-verbose-build enable regular echoing of commands during build process + --disable-bink don't build with Bink video support Optional Libraries: --with-alsa-prefix=DIR Prefix where alsa is installed (optional) @@ -877,6 +879,8 @@ for ac_option in $@; do --disable-libunity) _libunity=no ;; --enable-opengl) _opengl=yes ;; --disable-opengl) _opengl=no ;; + --enable-bink) _bink=yes ;; + --disable-bink) _bink=no ;; --enable-verbose-build) _verbose_build=yes ;; --enable-plugins) _dynamic_modules=yes ;; --default-dynamic) _plugins_default=dynamic ;; @@ -3265,6 +3269,13 @@ else fi # +# Check whether to build Bink video support +# +echo_n "Building Bink video support... " +define_in_config_if_yes $_bink 'USE_BINK' +echo "$_bink" + +# # Figure out installation directories # test "x$prefix" = xNONE && prefix=/usr/local diff --git a/engines/scumm/he/animation_he.cpp b/engines/scumm/he/animation_he.cpp index 7c1bbfc9a5..40e99c26a8 100644 --- a/engines/scumm/he/animation_he.cpp +++ b/engines/scumm/he/animation_he.cpp @@ -26,15 +26,20 @@ #include "scumm/he/intern_he.h" #include "audio/audiostream.h" -#include "video/bink_decoder.h" #include "video/smk_decoder.h" +#ifdef USE_BINK +#include "video/bink_decoder.h" +#endif + namespace Scumm { MoviePlayer::MoviePlayer(ScummEngine_v90he *vm, Audio::Mixer *mixer) : _vm(vm) { +#ifdef USE_BINK if (_vm->_game.heversion >= 100 && (_vm->_game.features & GF_16BIT_COLOR)) _video = new Video::BinkDecoder(); else +#endif _video = new Video::SmackerDecoder(mixer); _flags = 0; diff --git a/engines/scumm/vars.cpp b/engines/scumm/vars.cpp index 65d34a4f2e..4527d7a121 100644 --- a/engines/scumm/vars.cpp +++ b/engines/scumm/vars.cpp @@ -704,8 +704,12 @@ void ScummEngine_v99he::resetScummVars() { VAR(VAR_NUM_UNK) = _numUnk; if (_game.heversion >= 100 && (_game.features & GF_16BIT_COLOR)) { - // Enable Bink and Smacker video in 16bit color games + // Enable Bink video in 16bit color games +#ifdef USE_BINK VAR(140) = 1; +#else + VAR(140) = 0; +#endif } } #endif diff --git a/video/bink_decoder.h b/video/bink_decoder.h index 8cb447749d..ceb55391a9 100644 --- a/video/bink_decoder.h +++ b/video/bink_decoder.h @@ -24,6 +24,10 @@ // based quite heavily on the Bink decoder found in FFmpeg. // Many thanks to Kostya Shishkov for doing the hard work. +#include "common/scummsys.h" + +#ifdef USE_BINK + #ifndef VIDEO_BINK_DECODER_H #define VIDEO_BINK_DECODER_H @@ -325,4 +329,6 @@ private: } // End of namespace Video -#endif +#endif // VIDEO_BINK_DECODER_H + +#endif // USE_BINK diff --git a/video/module.mk b/video/module.mk index 98c84e3516..ceeac94384 100644 --- a/video/module.mk +++ b/video/module.mk @@ -2,7 +2,6 @@ MODULE := video MODULE_OBJS := \ avi_decoder.o \ - bink_decoder.o \ coktel_decoder.o \ dxa_decoder.o \ flic_decoder.o \ @@ -20,5 +19,10 @@ MODULE_OBJS := \ codecs/smc.o \ codecs/truemotion1.o +ifdef USE_BINK +MODULE_OBJS += \ + bink_decoder.o +endif + # Include common rules include $(srcdir)/rules.mk |