BUILD: Allow for disabling Bink support
This commit is contained in:
parent
7dc7271316
commit
a50abde1b1
12 changed files with 104 additions and 10 deletions
|
@ -22,6 +22,14 @@
|
||||||
|
|
||||||
// Based on eos' BitStream implementation
|
// 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
|
#ifndef COMMON_BITSTREAM_H
|
||||||
#define COMMON_BITSTREAM_H
|
#define COMMON_BITSTREAM_H
|
||||||
|
|
||||||
|
@ -100,3 +108,5 @@ private:
|
||||||
} // End of namespace Common
|
} // End of namespace Common
|
||||||
|
|
||||||
#endif // COMMON_BITSTREAM_H
|
#endif // COMMON_BITSTREAM_H
|
||||||
|
|
||||||
|
#endif // USE_BINK
|
10
common/dct.h
10
common/dct.h
|
@ -26,6 +26,14 @@
|
||||||
// Copyright (c) 2010 Alex Converse <alex.converse@gmail.com>
|
// Copyright (c) 2010 Alex Converse <alex.converse@gmail.com>
|
||||||
// Copyright (c) 2010 Vitor Sessak
|
// 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
|
#ifndef COMMON_DCT_H
|
||||||
#define COMMON_DCT_H
|
#define COMMON_DCT_H
|
||||||
|
|
||||||
|
@ -69,3 +77,5 @@ private:
|
||||||
} // End of namespace Common
|
} // End of namespace Common
|
||||||
|
|
||||||
#endif // COMMON_DCT_H
|
#endif // COMMON_DCT_H
|
||||||
|
|
||||||
|
#endif // USE_BINK
|
||||||
|
|
10
common/fft.h
10
common/fft.h
|
@ -26,6 +26,14 @@
|
||||||
// Copyright (c) 2002 Fabrice Bellard
|
// Copyright (c) 2002 Fabrice Bellard
|
||||||
// Partly based on libdjbfft by D. J. Bernstein
|
// 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
|
#ifndef COMMON_FFT_H
|
||||||
#define COMMON_FFT_H
|
#define COMMON_FFT_H
|
||||||
|
|
||||||
|
@ -71,3 +79,5 @@ private:
|
||||||
} // End of namespace Common
|
} // End of namespace Common
|
||||||
|
|
||||||
#endif // COMMON_FFT_H
|
#endif // COMMON_FFT_H
|
||||||
|
|
||||||
|
#endif // USE_BINK
|
||||||
|
|
|
@ -22,6 +22,14 @@
|
||||||
|
|
||||||
// Based on eos' Huffman code
|
// 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
|
#ifndef COMMON_HUFFMAN_H
|
||||||
#define COMMON_HUFFMAN_H
|
#define COMMON_HUFFMAN_H
|
||||||
|
|
||||||
|
@ -75,3 +83,5 @@ private:
|
||||||
} // End of namespace Common
|
} // End of namespace Common
|
||||||
|
|
||||||
#endif // COMMON_HUFFMAN_H
|
#endif // COMMON_HUFFMAN_H
|
||||||
|
|
||||||
|
#endif // USE_BINK
|
||||||
|
|
|
@ -22,6 +22,14 @@
|
||||||
|
|
||||||
// Based on eos' math code
|
// 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
|
#ifndef COMMON_MATH_H
|
||||||
#define COMMON_MATH_H
|
#define COMMON_MATH_H
|
||||||
|
|
||||||
|
@ -109,3 +117,5 @@ inline float deg2rad(float deg) {
|
||||||
} // End of namespace Common
|
} // End of namespace Common
|
||||||
|
|
||||||
#endif // COMMON_MATHS_H
|
#endif // COMMON_MATHS_H
|
||||||
|
|
||||||
|
#endif // USE_BINK
|
||||||
|
|
|
@ -2,30 +2,24 @@ MODULE := common
|
||||||
|
|
||||||
MODULE_OBJS := \
|
MODULE_OBJS := \
|
||||||
archive.o \
|
archive.o \
|
||||||
bitstream.o \
|
|
||||||
config-file.o \
|
config-file.o \
|
||||||
config-manager.o \
|
config-manager.o \
|
||||||
dcl.o \
|
dcl.o \
|
||||||
dct.o \
|
|
||||||
debug.o \
|
debug.o \
|
||||||
error.o \
|
error.o \
|
||||||
EventDispatcher.o \
|
EventDispatcher.o \
|
||||||
EventRecorder.o \
|
EventRecorder.o \
|
||||||
fft.o \
|
|
||||||
file.o \
|
file.o \
|
||||||
fs.o \
|
fs.o \
|
||||||
hashmap.o \
|
hashmap.o \
|
||||||
huffman.o \
|
|
||||||
iff_container.o \
|
iff_container.o \
|
||||||
macresman.o \
|
macresman.o \
|
||||||
math.o \
|
|
||||||
memorypool.o \
|
memorypool.o \
|
||||||
md5.o \
|
md5.o \
|
||||||
mutex.o \
|
mutex.o \
|
||||||
quicktime.o \
|
quicktime.o \
|
||||||
random.o \
|
random.o \
|
||||||
rational.o \
|
rational.o \
|
||||||
rdft.o \
|
|
||||||
str.o \
|
str.o \
|
||||||
stream.o \
|
stream.o \
|
||||||
system.o \
|
system.o \
|
||||||
|
@ -41,5 +35,15 @@ MODULE_OBJS := \
|
||||||
xmlparser.o \
|
xmlparser.o \
|
||||||
zlib.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 common rules
|
||||||
include $(srcdir)/rules.mk
|
include $(srcdir)/rules.mk
|
||||||
|
|
|
@ -24,6 +24,14 @@
|
||||||
// Based upon the (I)RDFT code in FFmpeg
|
// Based upon the (I)RDFT code in FFmpeg
|
||||||
// Copyright (c) 2009 Alex Converse <alex dot converse at gmail dot com>
|
// 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
|
#ifndef COMMON_RDFT_H
|
||||||
#define COMMON_RDFT_H
|
#define COMMON_RDFT_H
|
||||||
|
|
||||||
|
@ -62,3 +70,5 @@ private:
|
||||||
} // End of namespace Common
|
} // End of namespace Common
|
||||||
|
|
||||||
#endif // COMMON_RDFT_H
|
#endif // COMMON_RDFT_H
|
||||||
|
|
||||||
|
#endif // USE_BINK
|
||||||
|
|
11
configure
vendored
11
configure
vendored
|
@ -154,6 +154,7 @@ _build_scalers=yes
|
||||||
_build_hq_scalers=yes
|
_build_hq_scalers=yes
|
||||||
_enable_prof=no
|
_enable_prof=no
|
||||||
_global_constructors=no
|
_global_constructors=no
|
||||||
|
_bink=yes
|
||||||
# Default vkeybd/keymapper options
|
# Default vkeybd/keymapper options
|
||||||
_vkeybd=no
|
_vkeybd=no
|
||||||
_keymapper=no
|
_keymapper=no
|
||||||
|
@ -775,6 +776,7 @@ Optional Features:
|
||||||
--enable-text-console use text console instead of graphical console
|
--enable-text-console use text console instead of graphical console
|
||||||
--enable-verbose-build enable regular echoing of commands during build
|
--enable-verbose-build enable regular echoing of commands during build
|
||||||
process
|
process
|
||||||
|
--disable-bink don't build with Bink video support
|
||||||
|
|
||||||
Optional Libraries:
|
Optional Libraries:
|
||||||
--with-alsa-prefix=DIR Prefix where alsa is installed (optional)
|
--with-alsa-prefix=DIR Prefix where alsa is installed (optional)
|
||||||
|
@ -877,6 +879,8 @@ for ac_option in $@; do
|
||||||
--disable-libunity) _libunity=no ;;
|
--disable-libunity) _libunity=no ;;
|
||||||
--enable-opengl) _opengl=yes ;;
|
--enable-opengl) _opengl=yes ;;
|
||||||
--disable-opengl) _opengl=no ;;
|
--disable-opengl) _opengl=no ;;
|
||||||
|
--enable-bink) _bink=yes ;;
|
||||||
|
--disable-bink) _bink=no ;;
|
||||||
--enable-verbose-build) _verbose_build=yes ;;
|
--enable-verbose-build) _verbose_build=yes ;;
|
||||||
--enable-plugins) _dynamic_modules=yes ;;
|
--enable-plugins) _dynamic_modules=yes ;;
|
||||||
--default-dynamic) _plugins_default=dynamic ;;
|
--default-dynamic) _plugins_default=dynamic ;;
|
||||||
|
@ -3264,6 +3268,13 @@ else
|
||||||
echo "$_taskbar"
|
echo "$_taskbar"
|
||||||
fi
|
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
|
# Figure out installation directories
|
||||||
#
|
#
|
||||||
|
|
|
@ -26,15 +26,20 @@
|
||||||
#include "scumm/he/intern_he.h"
|
#include "scumm/he/intern_he.h"
|
||||||
|
|
||||||
#include "audio/audiostream.h"
|
#include "audio/audiostream.h"
|
||||||
#include "video/bink_decoder.h"
|
|
||||||
#include "video/smk_decoder.h"
|
#include "video/smk_decoder.h"
|
||||||
|
|
||||||
|
#ifdef USE_BINK
|
||||||
|
#include "video/bink_decoder.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace Scumm {
|
namespace Scumm {
|
||||||
|
|
||||||
MoviePlayer::MoviePlayer(ScummEngine_v90he *vm, Audio::Mixer *mixer) : _vm(vm) {
|
MoviePlayer::MoviePlayer(ScummEngine_v90he *vm, Audio::Mixer *mixer) : _vm(vm) {
|
||||||
|
#ifdef USE_BINK
|
||||||
if (_vm->_game.heversion >= 100 && (_vm->_game.features & GF_16BIT_COLOR))
|
if (_vm->_game.heversion >= 100 && (_vm->_game.features & GF_16BIT_COLOR))
|
||||||
_video = new Video::BinkDecoder();
|
_video = new Video::BinkDecoder();
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
_video = new Video::SmackerDecoder(mixer);
|
_video = new Video::SmackerDecoder(mixer);
|
||||||
|
|
||||||
_flags = 0;
|
_flags = 0;
|
||||||
|
|
|
@ -704,8 +704,12 @@ void ScummEngine_v99he::resetScummVars() {
|
||||||
VAR(VAR_NUM_UNK) = _numUnk;
|
VAR(VAR_NUM_UNK) = _numUnk;
|
||||||
|
|
||||||
if (_game.heversion >= 100 && (_game.features & GF_16BIT_COLOR)) {
|
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;
|
VAR(140) = 1;
|
||||||
|
#else
|
||||||
|
VAR(140) = 0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -24,6 +24,10 @@
|
||||||
// based quite heavily on the Bink decoder found in FFmpeg.
|
// based quite heavily on the Bink decoder found in FFmpeg.
|
||||||
// Many thanks to Kostya Shishkov for doing the hard work.
|
// Many thanks to Kostya Shishkov for doing the hard work.
|
||||||
|
|
||||||
|
#include "common/scummsys.h"
|
||||||
|
|
||||||
|
#ifdef USE_BINK
|
||||||
|
|
||||||
#ifndef VIDEO_BINK_DECODER_H
|
#ifndef VIDEO_BINK_DECODER_H
|
||||||
#define VIDEO_BINK_DECODER_H
|
#define VIDEO_BINK_DECODER_H
|
||||||
|
|
||||||
|
@ -325,4 +329,6 @@ private:
|
||||||
|
|
||||||
} // End of namespace Video
|
} // End of namespace Video
|
||||||
|
|
||||||
#endif
|
#endif // VIDEO_BINK_DECODER_H
|
||||||
|
|
||||||
|
#endif // USE_BINK
|
||||||
|
|
|
@ -2,7 +2,6 @@ MODULE := video
|
||||||
|
|
||||||
MODULE_OBJS := \
|
MODULE_OBJS := \
|
||||||
avi_decoder.o \
|
avi_decoder.o \
|
||||||
bink_decoder.o \
|
|
||||||
coktel_decoder.o \
|
coktel_decoder.o \
|
||||||
dxa_decoder.o \
|
dxa_decoder.o \
|
||||||
flic_decoder.o \
|
flic_decoder.o \
|
||||||
|
@ -20,5 +19,10 @@ MODULE_OBJS := \
|
||||||
codecs/smc.o \
|
codecs/smc.o \
|
||||||
codecs/truemotion1.o
|
codecs/truemotion1.o
|
||||||
|
|
||||||
|
ifdef USE_BINK
|
||||||
|
MODULE_OBJS += \
|
||||||
|
bink_decoder.o
|
||||||
|
endif
|
||||||
|
|
||||||
# Include common rules
|
# Include common rules
|
||||||
include $(srcdir)/rules.mk
|
include $(srcdir)/rules.mk
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue