Skip to content

Commit 77523c8

Browse files
ccawley2011bluegr
authored andcommitted
CONFIGURE: Make SVQ1 and QDM2 optional components
1 parent c7a8dfa commit 77523c8

File tree

9 files changed

+32
-9
lines changed

9 files changed

+32
-9
lines changed

audio/decoders/qdm2.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
// Based off ffmpeg's QDM2 decoder
2323

2424
#include "common/scummsys.h"
25-
#include "audio/decoders/qdm2.h"
2625

27-
#ifdef AUDIO_QDM2_H
26+
#ifdef USE_QDM2
2827

28+
#include "audio/decoders/qdm2.h"
2929
#include "audio/audiostream.h"
3030
#include "audio/decoders/codec.h"
3131
#include "audio/decoders/qdm2data.h"

audio/decoders/qdm2.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,14 @@
1919
*
2020
*/
2121

22-
// Only compile if Mohawk is enabled or if we're building dynamic modules
23-
#if defined(ENABLE_MOHAWK) || defined(DYNAMIC_MODULES)
2422

2523
#ifndef AUDIO_QDM2_H
2624
#define AUDIO_QDM2_H
2725

26+
#include "common/scummsys.h"
27+
28+
#ifdef USE_QDM2
29+
2830
#include "common/types.h"
2931

3032
namespace Common {
@@ -47,5 +49,5 @@ Codec *makeQDM2Decoder(Common::SeekableReadStream *extraData,
4749

4850
} // End of namespace Audio
4951

52+
#endif // USE_QDM2
5053
#endif // AUDIO_QDM2_H
51-
#endif // Mohawk/Plugins guard

audio/decoders/quicktime.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ bool QuickTimeAudioDecoder::AudioSampleDesc::isAudioCodecSupported() const {
570570
if (_codecTag == MKTAG('t', 'w', 'o', 's') || _codecTag == MKTAG('r', 'a', 'w', ' ') || _codecTag == MKTAG('i', 'm', 'a', '4'))
571571
return true;
572572

573-
#ifdef AUDIO_QDM2_H
573+
#ifdef USE_QDM2
574574
if (_codecTag == MKTAG('Q', 'D', 'M', '2'))
575575
return true;
576576
#endif
@@ -634,7 +634,7 @@ void QuickTimeAudioDecoder::AudioSampleDesc::initCodec() {
634634

635635
switch (_codecTag) {
636636
case MKTAG('Q', 'D', 'M', '2'):
637-
#ifdef AUDIO_QDM2_H
637+
#ifdef USE_QDM2
638638
_codec = makeQDM2Decoder(_extraData);
639639
#endif
640640
break;

configure

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,8 +293,10 @@ _imgui=yes
293293
_indeo3=auto
294294
_indeo45=auto
295295
_hnm=auto
296+
_qdm2=auto
296297
_fmtowns_pc98_audio=auto
297298
_sid_audio=auto
299+
_svq1=auto
298300
_vgmtrans_audio=auto
299301
_midi=auto
300302
_universaltracker=auto
@@ -332,7 +334,9 @@ add_component theoradec "libtheoradec" "_theoradec" "USE_THEORADEC"
332334
add_component midi "MIDI synthesis" "_midi" "USE_MIDI"
333335
add_component mpc "MPC" "_libmpcdec" "USE_MPCDEC"
334336
add_component mpeg2 "mpeg2" "_mpeg2" "USE_MPEG2"
337+
add_component qdm2 "QDM2" "_qdm2" "USE_QDM2"
335338
add_component sid_audio "SID audio" "_sid_audio" "USE_SID_AUDIO"
339+
add_component svq1 "Sorenson Video 1" "_svq1" "USE_SVQ1"
336340
add_component tinygl "TinyGL" "_tinygl" "USE_TINYGL"
337341
add_component universaltracker "External Tracker Libraries" "_universaltracker" "USE_UNIVERSALTRACKER"
338342
add_component vgmtrans_audio "VGMTrans Soundfont audio" "_vgmtrans_audio" "USE_VGMTRANS_AUDIO"

engines/mohawk/configure.engine

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ add_engine mohawk "Mohawk" yes "cstime myst mystme riven" "Living Books" "highre
44
add_engine cstime "Where in Time is Carmen Sandiego?" no
55
add_engine riven "Riven: The Sequel to Myst" yes "" "" "16bit"
66
add_engine myst "Myst" yes
7-
add_engine mystme "Myst ME" yes "" "" "jpeg"
7+
add_engine mystme "Myst ME" yes "" "" "16bit jpeg" "qdm2 svq1"

engines/testbed/configure.engine

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# This file is included from the main "configure" script
22
# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps] [components]
3-
add_engine testbed "TestBed: the Testing framework" no "" "" "" "imgui midi universaltracker indeo3 indeo45 vpx mpc hnm mpeg2"
3+
add_engine testbed "TestBed: the Testing framework" no "" "" "" "imgui midi universaltracker indeo3 indeo45 vpx mpc hnm mpeg2 qdm2 svq1"

image/codecs/codec.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,13 @@ Codec *createQuickTimeCodec(uint32 tag, int width, int height, int bitsPerPixel)
288288
// Apple SMC: Used by some Myst videos.
289289
return new SMCDecoder(width, height);
290290
case MKTAG('S','V','Q','1'):
291+
#ifdef USE_SVQ1
291292
// Sorenson Video 1: Used by some Myst ME videos.
292293
return new SVQ1Decoder(width, height);
294+
#else
295+
warning("createQuickTimeCodec(): Sorenson Video 1 codec is not compiled");
296+
return 0;
297+
#endif
293298
case MKTAG('S','V','Q','3'):
294299
// Sorenson Video 3: Used by some Myst ME videos.
295300
warning("Sorenson Video 3 not yet supported");

image/codecs/svq1.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
// Sorenson Video 1 Codec
2323
// Based off FFmpeg's SVQ1 decoder (written by Arpi and Nick Kurshev)
2424

25+
#include "common/scummsys.h"
26+
27+
#ifdef USE_SVQ1
28+
2529
#include "image/codecs/svq1.h"
2630
#include "image/codecs/svq1_cb.h"
2731
#include "image/codecs/svq1_vlc.h"
@@ -806,3 +810,5 @@ bool SVQ1Decoder::svq1DecodeDeltaBlock(Common::BitStream32BEMSB *ss, byte *curre
806810
}
807811

808812
} // End of namespace Image
813+
814+
#endif

image/codecs/svq1.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
#ifndef IMAGE_CODECS_SVQ1_H
2323
#define IMAGE_CODECS_SVQ1_H
2424

25+
#include "common/scummsys.h"
26+
27+
#ifdef USE_SVQ1
28+
2529
#include "common/bitstream.h"
2630
#include "image/codecs/codec.h"
2731

@@ -94,3 +98,5 @@ class SVQ1Decoder : public Codec {
9498
} // End of namespace Image
9599

96100
#endif
101+
102+
#endif

0 commit comments

Comments
 (0)