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

clone2727 clone2727 at gmail.com
Tue Mar 29 04:29:02 CEST 2011


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

Summary:
e5811cd6c3 MOHAWK: Allow disabling compilation of Myst
4a7572d893 MOHAWK: Allow disabling compiling cstime
b101fd6f03 MOHAWK: Allow disabling of Riven compilation


Commit: e5811cd6c39333cf7a51eb4943bf4ead0aff681c
    https://github.com/scummvm/scummvm/commit/e5811cd6c39333cf7a51eb4943bf4ead0aff681c
Author: Matthew Hoops (clone2727 at gmail.com)
Date: 2011-03-28T19:26:23-07:00

Commit Message:
MOHAWK: Allow disabling compilation of Myst

Changed paths:
    configure
    engines/engines.mk
    engines/mohawk/bitmap.cpp
    engines/mohawk/bitmap.h
    engines/mohawk/console.cpp
    engines/mohawk/console.h
    engines/mohawk/cursors.cpp
    engines/mohawk/cursors.h
    engines/mohawk/detection.cpp
    engines/mohawk/dialogs.cpp
    engines/mohawk/dialogs.h
    engines/mohawk/graphics.cpp
    engines/mohawk/graphics.h
    engines/mohawk/module.mk



diff --git a/configure b/configure
index 969f37c..3a3c5e6 100755
--- a/configure
+++ b/configure
@@ -95,7 +95,8 @@ add_engine lastexpress "The Last Express" no
 add_engine lure "Lure of the Temptress" yes
 add_engine m4 "M4/MADS" no
 add_engine made "MADE" yes
-add_engine mohawk "Mohawk" yes
+add_engine mohawk "Mohawk" yes "myst"
+add_engine myst "Myst" no
 add_engine parallaction "Parallaction" yes
 add_engine queen "Flight of the Amazon Queen" yes
 add_engine saga "SAGA" yes "ihnm saga2"
diff --git a/engines/engines.mk b/engines/engines.mk
index eea4ffc..c5cbf3a 100644
--- a/engines/engines.mk
+++ b/engines/engines.mk
@@ -97,6 +97,10 @@ endif
 ifdef ENABLE_MOHAWK
 DEFINES += -DENABLE_MOHAWK=$(ENABLE_MOHAWK)
 MODULES += engines/mohawk
+
+ifdef ENABLE_MYST
+DEFINES += -DENABLE_MYST
+endif
 endif
 
 ifdef ENABLE_PARALLACTION
diff --git a/engines/mohawk/bitmap.cpp b/engines/mohawk/bitmap.cpp
index 1a6024a..c8111fa 100644
--- a/engines/mohawk/bitmap.cpp
+++ b/engines/mohawk/bitmap.cpp
@@ -622,6 +622,8 @@ void MohawkBitmap::drawRLE8(Graphics::Surface *surface, bool isLE) {
 	}
 }
 
+#ifdef ENABLE_MYST
+
 //////////////////////////////////////////
 // Myst Bitmap Decoder
 //////////////////////////////////////////
@@ -721,6 +723,8 @@ MohawkSurface *MystBitmap::decodeImage(Common::SeekableReadStream* stream) {
 	return new MohawkSurface(surface, palData);
 }
 
+#endif
+
 MohawkSurface *LivingBooksBitmap_v1::decodeImage(Common::SeekableReadStream *stream) {
 	Common::SeekableSubReadStreamEndian *endianStream = (Common::SeekableSubReadStreamEndian *)stream;
 
diff --git a/engines/mohawk/bitmap.h b/engines/mohawk/bitmap.h
index 55b884a..ea8a130 100644
--- a/engines/mohawk/bitmap.h
+++ b/engines/mohawk/bitmap.h
@@ -144,6 +144,8 @@ private:
 	void handleRivenSubcommandStream(byte count, byte *&dst);
 };
 
+#ifdef ENABLE_MYST
+
 // Myst uses a different image format than that of other Mohawk games.
 // It essentially uses a Windows bitmap with the LZ encoding from the
 // Mohawk Bitmap format.
@@ -181,6 +183,8 @@ private:
 	} _info;
 };
 
+#endif
+
 class LivingBooksBitmap_v1 : public MohawkBitmap {
 public:
 	LivingBooksBitmap_v1() : MohawkBitmap() {}
diff --git a/engines/mohawk/console.cpp b/engines/mohawk/console.cpp
index 8aedbc7..e94ab7e 100644
--- a/engines/mohawk/console.cpp
+++ b/engines/mohawk/console.cpp
@@ -24,9 +24,6 @@
  */
 
 #include "mohawk/console.h"
-#include "mohawk/myst.h"
-#include "mohawk/myst_areas.h"
-#include "mohawk/myst_scripts.h"
 #include "mohawk/graphics.h"
 #include "mohawk/riven.h"
 #include "mohawk/riven_external.h"
@@ -35,8 +32,16 @@
 #include "mohawk/sound.h"
 #include "mohawk/video.h"
 
+#ifdef ENABLE_MYST
+#include "mohawk/myst.h"
+#include "mohawk/myst_areas.h"
+#include "mohawk/myst_scripts.h"
+#endif
+
 namespace Mohawk {
 
+#ifdef ENABLE_MYST
+
 MystConsole::MystConsole(MohawkEngine_Myst *vm) : GUI::Debugger(), _vm(vm) {
 	DCmd_Register("changeCard",			WRAP_METHOD(MystConsole, Cmd_ChangeCard));
 	DCmd_Register("curCard",			WRAP_METHOD(MystConsole, Cmd_CurCard));
@@ -307,6 +312,8 @@ bool MystConsole::Cmd_Resources(int argc, const char **argv) {
 	return true;
 }
 
+#endif // ENABLE_MYST
+
 RivenConsole::RivenConsole(MohawkEngine_Riven *vm) : GUI::Debugger(), _vm(vm) {
 	DCmd_Register("changeCard",		WRAP_METHOD(RivenConsole, Cmd_ChangeCard));
 	DCmd_Register("curCard",		WRAP_METHOD(RivenConsole, Cmd_CurCard));
diff --git a/engines/mohawk/console.h b/engines/mohawk/console.h
index b7b6b25..cefd0b1 100644
--- a/engines/mohawk/console.h
+++ b/engines/mohawk/console.h
@@ -30,11 +30,13 @@
 
 namespace Mohawk {
 
-class MohawkEngine_Myst;
 class MohawkEngine_Riven;
 class MohawkEngine_LivingBooks;
 class MohawkEngine_CSTime;
 
+#ifdef ENABLE_MYST
+class MohawkEngine_Myst;
+
 class MystConsole : public GUI::Debugger {
 public:
 	MystConsole(MohawkEngine_Myst *vm);
@@ -58,6 +60,7 @@ private:
 	bool Cmd_Cache(int argc, const char **argv);
 	bool Cmd_Resources(int argc, const char **argv);
 };
+#endif
 
 class RivenConsole : public GUI::Debugger {
 public:
diff --git a/engines/mohawk/cursors.cpp b/engines/mohawk/cursors.cpp
index 4a9fcb2..9233a84 100644
--- a/engines/mohawk/cursors.cpp
+++ b/engines/mohawk/cursors.cpp
@@ -23,11 +23,9 @@
  *
  */
 
-#include "mohawk/bitmap.h"
 #include "mohawk/cursors.h"
+#include "mohawk/mohawk.h"
 #include "mohawk/resource.h"
-#include "mohawk/graphics.h"
-#include "mohawk/myst.h"
 
 #include "common/macresman.h"
 #include "common/system.h"
@@ -36,6 +34,11 @@
 #include "graphics/cursorman.h"
 #include "graphics/wincursor.h"
 
+#ifdef ENABLE_MYST
+#include "mohawk/bitmap.h"
+#include "mohawk/myst.h"
+#endif
+
 namespace Mohawk {
 
 static const byte s_bwPalette[] = {
@@ -115,6 +118,8 @@ void DefaultCursorManager::setCursor(uint16 id) {
 	setMacXorCursor(_vm->getResource(_tag, id));
 }
 
+#ifdef ENABLE_MYST
+
 MystCursorManager::MystCursorManager(MohawkEngine_Myst *vm) : _vm(vm) {
 	_bmpDecoder = new MystBitmap();
 }
@@ -159,6 +164,8 @@ void MystCursorManager::setDefaultCursor() {
 	setCursor(kDefaultMystCursor);
 }
 
+#endif
+
 NECursorManager::NECursorManager(const Common::String &appName) {
 	_exe = new Common::NEResources();
 
diff --git a/engines/mohawk/cursors.h b/engines/mohawk/cursors.h
index e6c4179..f8a9429 100644
--- a/engines/mohawk/cursors.h
+++ b/engines/mohawk/cursors.h
@@ -40,25 +40,6 @@ namespace Common {
 
 namespace Mohawk {
 
-// 803-805 are animated, one large bmp which is in chunks - these are NEVER USED
-// Other cursors (200, 300, 400, 500, 600, 700) are not the same in each stack
-enum {
-	kDefaultMystCursor = 100,				// The default hand
-	kWhitePageCursor = 800,					// Holding a white page
-	kRedPageCursor = 801,					// Holding a red page
-	kBluePageCursor = 802,					// Holding a blue page
-	// kDroppingWhitePageAnimCursor = 803,
-	// kDroppingRedPageAnimCursor = 804,
-	// kDroppingBluePageAnimCursor = 805,
-	kNewMatchCursor = 900,					// Match that has not yet been lit
-	kLitMatchCursor = 901,					// Match that's burning
-	kDeadMatchCursor = 902,					// Match that's been extinguished
-	kKeyCursor = 903, 						// Key in Lighthouse in Stoneship
-	kRotateClockwiseCursor = 904, 			// Rotate gear clockwise (boiler on Myst)
-	kRotateCounterClockwiseCursor = 905,	// Rotate gear counter clockwise (boiler on Myst)
-	kMystZipModeCursor = 999				// Zip Mode cursor
-};
-
 enum {
 	kRivenOpenHandCursor = 2003,
 	kRivenClosedHandCursor = 2004,
@@ -69,8 +50,6 @@ enum {
 
 class MohawkArchive;
 class MohawkEngine;
-class MohawkEngine_Myst;
-class MystBitmap;
 
 class CursorManager {
 public:
@@ -103,6 +82,30 @@ private:
 	uint32 _tag;
 };
 
+#ifdef ENABLE_MYST
+
+// 803-805 are animated, one large bmp which is in chunks - these are NEVER USED
+// Other cursors (200, 300, 400, 500, 600, 700) are not the same in each stack
+enum {
+	kDefaultMystCursor = 100,				// The default hand
+	kWhitePageCursor = 800,					// Holding a white page
+	kRedPageCursor = 801,					// Holding a red page
+	kBluePageCursor = 802,					// Holding a blue page
+	// kDroppingWhitePageAnimCursor = 803,
+	// kDroppingRedPageAnimCursor = 804,
+	// kDroppingBluePageAnimCursor = 805,
+	kNewMatchCursor = 900,					// Match that has not yet been lit
+	kLitMatchCursor = 901,					// Match that's burning
+	kDeadMatchCursor = 902,					// Match that's been extinguished
+	kKeyCursor = 903, 						// Key in Lighthouse in Stoneship
+	kRotateClockwiseCursor = 904, 			// Rotate gear clockwise (boiler on Myst)
+	kRotateCounterClockwiseCursor = 905,	// Rotate gear counter clockwise (boiler on Myst)
+	kMystZipModeCursor = 999				// Zip Mode cursor
+};
+
+class MohawkEngine_Myst;
+class MystBitmap;
+
 // The cursor manager for Myst
 // Uses WDIB + CLRC resources
 class MystCursorManager : public CursorManager {
@@ -121,6 +124,8 @@ private:
 	MystBitmap *_bmpDecoder;
 };
 
+#endif // ENABLE_MYST
+
 // The cursor manager for NE EXE's
 class NECursorManager : public CursorManager {
 public:
diff --git a/engines/mohawk/detection.cpp b/engines/mohawk/detection.cpp
index 5bd904d..724eb63 100644
--- a/engines/mohawk/detection.cpp
+++ b/engines/mohawk/detection.cpp
@@ -30,11 +30,14 @@
 #include "common/file.h"
 #include "common/savefile.h"
 
-#include "mohawk/myst.h"
 #include "mohawk/riven.h"
 #include "mohawk/livingbooks.h"
 #include "mohawk/cstime.h"
 
+#ifdef ENABLE_MYST
+#include "mohawk/myst.h"
+#endif
+
 namespace Mohawk {
 
 struct MohawkGameDescription {
@@ -78,6 +81,8 @@ bool MohawkEngine::hasFeature(EngineFeature f) const {
 		(f == kSupportsRTL);
 }
 
+#ifdef ENABLE_MYST
+
 bool MohawkEngine_Myst::hasFeature(EngineFeature f) const {
 	return
 		MohawkEngine::hasFeature(f)
@@ -85,6 +90,8 @@ bool MohawkEngine_Myst::hasFeature(EngineFeature f) const {
 		|| (f == kSupportsSavingDuringRuntime);
 }
 
+#endif
+
 bool MohawkEngine_Riven::hasFeature(EngineFeature f) const {
 	return
 		MohawkEngine::hasFeature(f)
@@ -229,8 +236,13 @@ bool MohawkMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGa
 		switch (gd->gameType) {
 		case Mohawk::GType_MYST:
 		case Mohawk::GType_MAKINGOF:
+#ifdef ENABLE_MYST
 			*engine = new Mohawk::MohawkEngine_Myst(syst, gd);
 			break;
+#else
+			warning("Myst support not compiled in");
+			return false;
+#endif
 		case Mohawk::GType_RIVEN:
 			*engine = new Mohawk::MohawkEngine_Riven(syst, gd);
 			break;
@@ -251,10 +263,10 @@ bool MohawkMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGa
 		case Mohawk::GType_TREEHOUSE:
 		case Mohawk::GType_1STDEGREE:
 		case Mohawk::GType_CSUSA:
-			error ("Unsupported Mohawk Engine");
+			error("Unsupported Mohawk Engine");
 			break;
 		default:
-			error ("Unknown Mohawk Engine");
+			error("Unknown Mohawk Engine");
 		}
 	}
 
diff --git a/engines/mohawk/dialogs.cpp b/engines/mohawk/dialogs.cpp
index 797892a..3fe6435 100644
--- a/engines/mohawk/dialogs.cpp
+++ b/engines/mohawk/dialogs.cpp
@@ -24,7 +24,6 @@
  */
 
 #include "mohawk/mohawk.h"
-#include "mohawk/myst.h"
 #include "mohawk/riven.h"
 #include "mohawk/dialogs.h"
 
@@ -32,6 +31,10 @@
 #include "common/savefile.h"
 #include "common/translation.h"
 
+#ifdef ENABLE_MYST
+#include "mohawk/myst.h"
+#endif
+
 namespace Mohawk {
 
 // This used to have GUI::Dialog("MohawkDummyDialog"), but that doesn't work with the gui branch merge :P (Sorry, Tanoku!)
@@ -77,6 +80,8 @@ enum {
 	kWaterCmd = 'WATR'
 };
 
+#ifdef ENABLE_MYST
+
 MystOptionsDialog::MystOptionsDialog(MohawkEngine_Myst* vm) : GUI::OptionsDialog("", 120, 120, 360, 200), _vm(vm) {
 	_zipModeCheckbox = new GUI::CheckboxWidget(this, 15, 10, 300, 15, _("~Z~ip Mode Activated"), 0, kZipCmd);
 	_transitionsCheckbox = new GUI::CheckboxWidget(this, 15, 30, 300, 15, _("~T~ransitions Enabled"), 0, kTransCmd);
@@ -111,6 +116,8 @@ void MystOptionsDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, ui
 	}
 }
 
+#endif
+
 RivenOptionsDialog::RivenOptionsDialog(MohawkEngine_Riven* vm) : GUI::OptionsDialog("", 120, 120, 360, 200), _vm(vm) {
 	_zipModeCheckbox = new GUI::CheckboxWidget(this, 15, 10, 300, 15, _("~Z~ip Mode Activated"), 0, kZipCmd);
 	_waterEffectCheckbox = new GUI::CheckboxWidget(this, 15, 30, 300, 15, _("~W~ater Effect Enabled"), 0, kWaterCmd);
diff --git a/engines/mohawk/dialogs.h b/engines/mohawk/dialogs.h
index d4e3a33..3a1d194 100644
--- a/engines/mohawk/dialogs.h
+++ b/engines/mohawk/dialogs.h
@@ -38,7 +38,6 @@
 namespace Mohawk {
 
 class MohawkEngine;
-class MohawkEngine_Myst;
 class MohawkEngine_Riven;
 
 class InfoDialog : public GUI::Dialog {
@@ -71,6 +70,10 @@ public:
 	virtual void handleKeyDown(Common::KeyState state);
 };
 
+#ifdef ENABLE_MYST
+
+class MohawkEngine_Myst;
+
 class MystOptionsDialog : public GUI::OptionsDialog {
 public:
 	MystOptionsDialog(MohawkEngine_Myst *vm);
@@ -84,6 +87,8 @@ private:
 	GUI::CheckboxWidget *_transitionsCheckbox;
 };
 
+#endif
+
 class RivenOptionsDialog : public GUI::OptionsDialog {
 public:
 	RivenOptionsDialog(MohawkEngine_Riven *vm);
diff --git a/engines/mohawk/graphics.cpp b/engines/mohawk/graphics.cpp
index 3166b6c..656a6fa 100644
--- a/engines/mohawk/graphics.cpp
+++ b/engines/mohawk/graphics.cpp
@@ -25,17 +25,20 @@
 
 #include "mohawk/resource.h"
 #include "mohawk/graphics.h"
-#include "mohawk/myst.h"
 #include "mohawk/riven.h"
 #include "mohawk/livingbooks.h"
 #include "mohawk/cstime.h"
 
 #include "common/substream.h"
 #include "engines/util.h"
-#include "graphics/jpeg.h"
 #include "graphics/primitives.h"
 #include "gui/message.h"
 
+#ifdef ENABLE_MYST
+#include "mohawk/myst.h"
+#include "graphics/jpeg.h"
+#endif
+
 namespace Mohawk {
 
 MohawkSurface::MohawkSurface() : _surface(0), _palette(0) {
@@ -253,6 +256,8 @@ void GraphicsManager::addImageToCache(uint16 id, MohawkSurface *surface) {
 	_cache[id] = surface;
 }
 
+#ifdef ENABLE_MYST
+
 MystGraphics::MystGraphics(MohawkEngine_Myst* vm) : GraphicsManager(), _vm(vm) {
 	_bmpDecoder = new MystBitmap();
 
@@ -618,6 +623,8 @@ void MystGraphics::drawLine(const Common::Point &p1, const Common::Point &p2, ui
 	_backBuffer->drawLine(p1.x, p1.y, p2.x, p2.y, color);
 }
 
+#endif
+
 RivenGraphics::RivenGraphics(MohawkEngine_Riven* vm) : GraphicsManager(), _vm(vm) {
 	_bitmapDecoder = new MohawkBitmap();
 
diff --git a/engines/mohawk/graphics.h b/engines/mohawk/graphics.h
index fbac2f2..99baa4e 100644
--- a/engines/mohawk/graphics.h
+++ b/engines/mohawk/graphics.h
@@ -33,26 +33,16 @@
 #include "graphics/pict.h"
 
 namespace Graphics {
-
-class JPEG;
-
+	class JPEG;
 }
 
 namespace Mohawk {
 
 class MohawkEngine;
-class MohawkEngine_Myst;
 class MohawkEngine_Riven;
 class MohawkEngine_LivingBooks;
 class MohawkEngine_CSTime;
 class MohawkBitmap;
-class MystBitmap;
-
-enum RectState{
-	kRectEnabled,
-	kRectDisabled,
-	kRectUnreachable
-};
 
 class MohawkSurface {
 public:
@@ -118,6 +108,17 @@ private:
 	Common::HashMap<uint16, Common::Array<MohawkSurface*> > _subImageCache;
 };
 
+#ifdef ENABLE_MYST
+
+class MystBitmap;
+class MohawkEngine_Myst;
+
+enum RectState {
+	kRectEnabled,
+	kRectDisabled,
+	kRectUnreachable
+};
+
 class MystGraphics : public GraphicsManager {
 public:
 	MystGraphics(MohawkEngine_Myst*);
@@ -162,6 +163,8 @@ private:
 	Common::Rect _viewport;
 };
 
+#endif
+
 struct SFXERecord {
 	// Record values
 	uint16 frameCount;
diff --git a/engines/mohawk/module.mk b/engines/mohawk/module.mk
index 8c4453e..eeba258 100644
--- a/engines/mohawk/module.mk
+++ b/engines/mohawk/module.mk
@@ -16,12 +16,7 @@ MODULE_OBJS = \
 	livingbooks.o \
 	livingbooks_code.o \
 	mohawk.o \
-	myst.o \
-	myst_areas.o \
-	myst_scripts.o \
-	myst_state.o \
 	resource.o \
-	resource_cache.o \
 	riven.o \
 	riven_external.o \
 	riven_saveload.o \
@@ -30,6 +25,14 @@ MODULE_OBJS = \
 	sound.o \
 	video.o \
 	view.o \
+
+ifdef ENABLE_MYST
+MODULE_OBJS += \
+	myst.o \
+	myst_areas.o \
+	myst_scripts.o \
+	myst_state.o \
+	resource_cache.o \
 	myst_stacks/channelwood.o \
 	myst_stacks/credits.o \
 	myst_stacks/demo.o \
@@ -42,6 +45,7 @@ MODULE_OBJS = \
 	myst_stacks/selenitic.o \
 	myst_stacks/slides.o \
 	myst_stacks/stoneship.o
+endif
 
 # This module can be built as a plugin
 ifeq ($(ENABLE_MOHAWK), DYNAMIC_PLUGIN)


Commit: 4a7572d893fd50c25ff7576bdb7064bc3a85711d
    https://github.com/scummvm/scummvm/commit/4a7572d893fd50c25ff7576bdb7064bc3a85711d
Author: Matthew Hoops (clone2727 at gmail.com)
Date: 2011-03-28T19:26:23-07:00

Commit Message:
MOHAWK: Allow disabling compiling cstime

Changed paths:
    configure
    engines/engines.mk
    engines/mohawk/console.cpp
    engines/mohawk/console.h
    engines/mohawk/detection.cpp
    engines/mohawk/graphics.cpp
    engines/mohawk/graphics.h
    engines/mohawk/module.mk



diff --git a/configure b/configure
index 3a3c5e6..bed4845 100755
--- a/configure
+++ b/configure
@@ -95,7 +95,8 @@ add_engine lastexpress "The Last Express" no
 add_engine lure "Lure of the Temptress" yes
 add_engine m4 "M4/MADS" no
 add_engine made "MADE" yes
-add_engine mohawk "Mohawk" yes "myst"
+add_engine mohawk "Mohawk" yes "myst cstime"
+add_engine cstime "Where in Time is Carmen Sandiego?" no
 add_engine myst "Myst" no
 add_engine parallaction "Parallaction" yes
 add_engine queen "Flight of the Amazon Queen" yes
diff --git a/engines/engines.mk b/engines/engines.mk
index c5cbf3a..6e6c20d 100644
--- a/engines/engines.mk
+++ b/engines/engines.mk
@@ -98,6 +98,10 @@ ifdef ENABLE_MOHAWK
 DEFINES += -DENABLE_MOHAWK=$(ENABLE_MOHAWK)
 MODULES += engines/mohawk
 
+ifdef ENABLE_CSTIME
+DEFINES += -DENABLE_CSTIME
+endif
+
 ifdef ENABLE_MYST
 DEFINES += -DENABLE_MYST
 endif
diff --git a/engines/mohawk/console.cpp b/engines/mohawk/console.cpp
index e94ab7e..445901d 100644
--- a/engines/mohawk/console.cpp
+++ b/engines/mohawk/console.cpp
@@ -28,10 +28,13 @@
 #include "mohawk/riven.h"
 #include "mohawk/riven_external.h"
 #include "mohawk/livingbooks.h"
-#include "mohawk/cstime.h"
 #include "mohawk/sound.h"
 #include "mohawk/video.h"
 
+#ifdef ENABLE_CSTIME
+#include "mohawk/cstime.h"
+#endif
+
 #ifdef ENABLE_MYST
 #include "mohawk/myst.h"
 #include "mohawk/myst_areas.h"
@@ -701,6 +704,8 @@ bool LivingBooksConsole::Cmd_ChangePage(int argc, const char **argv) {
 	return true;
 }
 
+#ifdef ENABLE_CSTIME
+
 CSTimeConsole::CSTimeConsole(MohawkEngine_CSTime *vm) : GUI::Debugger(), _vm(vm) {
 	DCmd_Register("playSound",			WRAP_METHOD(CSTimeConsole, Cmd_PlaySound));
 	DCmd_Register("stopSound",			WRAP_METHOD(CSTimeConsole, Cmd_StopSound));
@@ -803,4 +808,6 @@ bool CSTimeConsole::Cmd_InvItem(int argc, const char **argv) {
 	return false;
 }
 
+#endif // ENABLE_CSTIME
+
 } // End of namespace Mohawk
diff --git a/engines/mohawk/console.h b/engines/mohawk/console.h
index cefd0b1..450802f 100644
--- a/engines/mohawk/console.h
+++ b/engines/mohawk/console.h
@@ -32,9 +32,9 @@ namespace Mohawk {
 
 class MohawkEngine_Riven;
 class MohawkEngine_LivingBooks;
-class MohawkEngine_CSTime;
 
 #ifdef ENABLE_MYST
+
 class MohawkEngine_Myst;
 
 class MystConsole : public GUI::Debugger {
@@ -60,6 +60,7 @@ private:
 	bool Cmd_Cache(int argc, const char **argv);
 	bool Cmd_Resources(int argc, const char **argv);
 };
+
 #endif
 
 class RivenConsole : public GUI::Debugger {
@@ -102,6 +103,10 @@ private:
 	bool Cmd_ChangePage(int argc, const char **argv);
 };
 
+#ifdef ENABLE_CSTIME
+
+class MohawkEngine_CSTime;
+
 class CSTimeConsole : public GUI::Debugger {
 public:
 	CSTimeConsole(MohawkEngine_CSTime *vm);
@@ -120,6 +125,8 @@ private:
 	bool Cmd_InvItem(int argc, const char **argv);
 };
 
+#endif
+
 } // End of namespace Mohawk
 
 #endif
diff --git a/engines/mohawk/detection.cpp b/engines/mohawk/detection.cpp
index 724eb63..f44f275 100644
--- a/engines/mohawk/detection.cpp
+++ b/engines/mohawk/detection.cpp
@@ -32,7 +32,10 @@
 
 #include "mohawk/riven.h"
 #include "mohawk/livingbooks.h"
+
+#ifdef ENABLE_CSTIME
 #include "mohawk/cstime.h"
+#endif
 
 #ifdef ENABLE_MYST
 #include "mohawk/myst.h"
@@ -254,8 +257,13 @@ bool MohawkMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGa
 			*engine = new Mohawk::MohawkEngine_LivingBooks(syst, gd);
 			break;
 		case Mohawk::GType_CSTIME:
+#ifdef ENABLE_CSTIME
 			*engine = new Mohawk::MohawkEngine_CSTime(syst, gd);
 			break;
+#else
+			warning("CSTime support not compiled in");
+			return false;
+#endif
 		case Mohawk::GType_ZOOMBINI:
 		case Mohawk::GType_CSWORLD:
 		case Mohawk::GType_CSAMTRAK:
@@ -263,8 +271,8 @@ bool MohawkMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGa
 		case Mohawk::GType_TREEHOUSE:
 		case Mohawk::GType_1STDEGREE:
 		case Mohawk::GType_CSUSA:
-			error("Unsupported Mohawk Engine");
-			break;
+			warning("Unsupported Mohawk Engine");
+			return false;
 		default:
 			error("Unknown Mohawk Engine");
 		}
diff --git a/engines/mohawk/graphics.cpp b/engines/mohawk/graphics.cpp
index 656a6fa..0df2c26 100644
--- a/engines/mohawk/graphics.cpp
+++ b/engines/mohawk/graphics.cpp
@@ -27,13 +27,16 @@
 #include "mohawk/graphics.h"
 #include "mohawk/riven.h"
 #include "mohawk/livingbooks.h"
-#include "mohawk/cstime.h"
 
 #include "common/substream.h"
 #include "engines/util.h"
 #include "graphics/primitives.h"
 #include "gui/message.h"
 
+#ifdef ENABLE_CSTIME
+#include "mohawk/cstime.h"
+#endif
+
 #ifdef ENABLE_MYST
 #include "mohawk/myst.h"
 #include "graphics/jpeg.h"
@@ -1105,6 +1108,8 @@ void LBGraphics::setPalette(uint16 id) {
 	}
 }
 
+#ifdef ENABLE_CSTIME
+
 CSTimeGraphics::CSTimeGraphics(MohawkEngine_CSTime *vm) : GraphicsManager(), _vm(vm) {
 	_bmpDecoder = new MohawkBitmap();
 
@@ -1137,4 +1142,6 @@ Common::Array<MohawkSurface *> CSTimeGraphics::decodeImages(uint16 id) {
 	return _bmpDecoder->decodeImages(_vm->getResource(ID_TBMH, id));
 }
 
+#endif
+
 } // End of namespace Mohawk
diff --git a/engines/mohawk/graphics.h b/engines/mohawk/graphics.h
index 99baa4e..08fb453 100644
--- a/engines/mohawk/graphics.h
+++ b/engines/mohawk/graphics.h
@@ -41,7 +41,6 @@ namespace Mohawk {
 class MohawkEngine;
 class MohawkEngine_Riven;
 class MohawkEngine_LivingBooks;
-class MohawkEngine_CSTime;
 class MohawkBitmap;
 
 class MohawkSurface {
@@ -258,6 +257,10 @@ private:
 	MohawkEngine_LivingBooks *_vm;
 };
 
+#ifdef ENABLE_CSTIME
+
+class MohawkEngine_CSTime;
+
 class CSTimeGraphics : public GraphicsManager {
 public:
 	CSTimeGraphics(MohawkEngine_CSTime *vm);
@@ -275,6 +278,8 @@ private:
 	MohawkEngine_CSTime *_vm;
 };
 
+#endif
+
 } // End of namespace Mohawk
 
 #endif
diff --git a/engines/mohawk/module.mk b/engines/mohawk/module.mk
index eeba258..de7b53e 100644
--- a/engines/mohawk/module.mk
+++ b/engines/mohawk/module.mk
@@ -3,11 +3,6 @@ MODULE := engines/mohawk
 MODULE_OBJS = \
 	bitmap.o \
 	console.o \
-	cstime.o \
-	cstime_cases.o \
-	cstime_game.o \
-	cstime_ui.o \
-	cstime_view.o \
 	cursors.o \
 	detection.o \
 	dialogs.o \
@@ -24,7 +19,16 @@ MODULE_OBJS = \
 	riven_vars.o \
 	sound.o \
 	video.o \
-	view.o \
+	view.o
+
+ifdef ENABLE_CSTIME
+MODULE_OBJS += \
+	cstime.o \
+	cstime_cases.o \
+	cstime_game.o \
+	cstime_ui.o \
+	cstime_view.o
+endif
 
 ifdef ENABLE_MYST
 MODULE_OBJS += \


Commit: b101fd6f0324a3775a5383d1768700141757af25
    https://github.com/scummvm/scummvm/commit/b101fd6f0324a3775a5383d1768700141757af25
Author: Matthew Hoops (clone2727 at gmail.com)
Date: 2011-03-28T19:26:23-07:00

Commit Message:
MOHAWK: Allow disabling of Riven compilation

Changed paths:
    configure
    engines/engines.mk
    engines/mohawk/console.cpp
    engines/mohawk/console.h
    engines/mohawk/detection.cpp
    engines/mohawk/graphics.cpp
    engines/mohawk/graphics.h
    engines/mohawk/module.mk



diff --git a/configure b/configure
index bed4845..be1220c 100755
--- a/configure
+++ b/configure
@@ -95,8 +95,9 @@ add_engine lastexpress "The Last Express" no
 add_engine lure "Lure of the Temptress" yes
 add_engine m4 "M4/MADS" no
 add_engine made "MADE" yes
-add_engine mohawk "Mohawk" yes "myst cstime"
+add_engine mohawk "Mohawk" yes "cstime myst riven"
 add_engine cstime "Where in Time is Carmen Sandiego?" no
+add_engine riven "Riven: The Sequel to Myst" no
 add_engine myst "Myst" no
 add_engine parallaction "Parallaction" yes
 add_engine queen "Flight of the Amazon Queen" yes
diff --git a/engines/engines.mk b/engines/engines.mk
index 6e6c20d..414edcf 100644
--- a/engines/engines.mk
+++ b/engines/engines.mk
@@ -105,6 +105,10 @@ endif
 ifdef ENABLE_MYST
 DEFINES += -DENABLE_MYST
 endif
+
+ifdef ENABLE_RIVEN
+DEFINES += -DENABLE_RIVEN
+endif
 endif
 
 ifdef ENABLE_PARALLACTION
diff --git a/engines/mohawk/console.cpp b/engines/mohawk/console.cpp
index 445901d..6dce147 100644
--- a/engines/mohawk/console.cpp
+++ b/engines/mohawk/console.cpp
@@ -25,8 +25,6 @@
 
 #include "mohawk/console.h"
 #include "mohawk/graphics.h"
-#include "mohawk/riven.h"
-#include "mohawk/riven_external.h"
 #include "mohawk/livingbooks.h"
 #include "mohawk/sound.h"
 #include "mohawk/video.h"
@@ -41,6 +39,11 @@
 #include "mohawk/myst_scripts.h"
 #endif
 
+#ifdef ENABLE_RIVEN
+#include "mohawk/riven.h"
+#include "mohawk/riven_external.h"
+#endif
+
 namespace Mohawk {
 
 #ifdef ENABLE_MYST
@@ -317,6 +320,8 @@ bool MystConsole::Cmd_Resources(int argc, const char **argv) {
 
 #endif // ENABLE_MYST
 
+#ifdef ENABLE_RIVEN
+
 RivenConsole::RivenConsole(MohawkEngine_Riven *vm) : GUI::Debugger(), _vm(vm) {
 	DCmd_Register("changeCard",		WRAP_METHOD(RivenConsole, Cmd_ChangeCard));
 	DCmd_Register("curCard",		WRAP_METHOD(RivenConsole, Cmd_CurCard));
@@ -653,6 +658,8 @@ bool RivenConsole::Cmd_SliderState(int argc, const char **argv) {
 	return true;
 }
 
+#endif // ENABLE_RIVEN
+
 LivingBooksConsole::LivingBooksConsole(MohawkEngine_LivingBooks *vm) : GUI::Debugger(), _vm(vm) {
 	DCmd_Register("playSound",			WRAP_METHOD(LivingBooksConsole, Cmd_PlaySound));
 	DCmd_Register("stopSound",			WRAP_METHOD(LivingBooksConsole, Cmd_StopSound));
diff --git a/engines/mohawk/console.h b/engines/mohawk/console.h
index 450802f..cb0e850 100644
--- a/engines/mohawk/console.h
+++ b/engines/mohawk/console.h
@@ -30,7 +30,6 @@
 
 namespace Mohawk {
 
-class MohawkEngine_Riven;
 class MohawkEngine_LivingBooks;
 
 #ifdef ENABLE_MYST
@@ -63,6 +62,10 @@ private:
 
 #endif
 
+#ifdef ENABLE_RIVEN
+
+class MohawkEngine_Riven;
+
 class RivenConsole : public GUI::Debugger {
 public:
 	RivenConsole(MohawkEngine_Riven *vm);
@@ -89,6 +92,8 @@ private:
 	bool Cmd_SliderState(int argc, const char **argv);
 };
 
+#endif
+
 class LivingBooksConsole : public GUI::Debugger {
 public:
 	LivingBooksConsole(MohawkEngine_LivingBooks *vm);
diff --git a/engines/mohawk/detection.cpp b/engines/mohawk/detection.cpp
index f44f275..7980328 100644
--- a/engines/mohawk/detection.cpp
+++ b/engines/mohawk/detection.cpp
@@ -30,7 +30,6 @@
 #include "common/file.h"
 #include "common/savefile.h"
 
-#include "mohawk/riven.h"
 #include "mohawk/livingbooks.h"
 
 #ifdef ENABLE_CSTIME
@@ -41,6 +40,10 @@
 #include "mohawk/myst.h"
 #endif
 
+#ifdef ENABLE_RIVEN
+#include "mohawk/riven.h"
+#endif
+
 namespace Mohawk {
 
 struct MohawkGameDescription {
@@ -95,6 +98,8 @@ bool MohawkEngine_Myst::hasFeature(EngineFeature f) const {
 
 #endif
 
+#ifdef ENABLE_RIVEN
+
 bool MohawkEngine_Riven::hasFeature(EngineFeature f) const {
 	return
 		MohawkEngine::hasFeature(f)
@@ -102,6 +107,8 @@ bool MohawkEngine_Riven::hasFeature(EngineFeature f) const {
 		|| (f == kSupportsSavingDuringRuntime);
 }
 
+#endif
+
 } // End of Namespace Mohawk
 
 static const PlainGameDescriptor mohawkGames[] = {
@@ -247,8 +254,13 @@ bool MohawkMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGa
 			return false;
 #endif
 		case Mohawk::GType_RIVEN:
+#ifdef ENABLE_RIVEN
 			*engine = new Mohawk::MohawkEngine_Riven(syst, gd);
 			break;
+#else
+			warning("Riven support not compiled in");
+			return false;
+#endif
 		case Mohawk::GType_LIVINGBOOKSV1:
 		case Mohawk::GType_LIVINGBOOKSV2:
 		case Mohawk::GType_LIVINGBOOKSV3:
diff --git a/engines/mohawk/graphics.cpp b/engines/mohawk/graphics.cpp
index 0df2c26..81d2b6f 100644
--- a/engines/mohawk/graphics.cpp
+++ b/engines/mohawk/graphics.cpp
@@ -25,7 +25,6 @@
 
 #include "mohawk/resource.h"
 #include "mohawk/graphics.h"
-#include "mohawk/riven.h"
 #include "mohawk/livingbooks.h"
 
 #include "common/substream.h"
@@ -42,6 +41,10 @@
 #include "graphics/jpeg.h"
 #endif
 
+#ifdef ENABLE_RIVEN
+#include "mohawk/riven.h"
+#endif
+
 namespace Mohawk {
 
 MohawkSurface::MohawkSurface() : _surface(0), _palette(0) {
@@ -626,7 +629,9 @@ void MystGraphics::drawLine(const Common::Point &p1, const Common::Point &p2, ui
 	_backBuffer->drawLine(p1.x, p1.y, p2.x, p2.y, color);
 }
 
-#endif
+#endif // ENABLE_MYST
+
+#ifdef ENABLE_RIVEN
 
 RivenGraphics::RivenGraphics(MohawkEngine_Riven* vm) : GraphicsManager(), _vm(vm) {
 	_bitmapDecoder = new MohawkBitmap();
@@ -1040,6 +1045,8 @@ void RivenGraphics::updateCredits() {
 	}
 }
 
+#endif // ENABLE_RIVEN
+
 LBGraphics::LBGraphics(MohawkEngine_LivingBooks *vm, uint16 width, uint16 height) : GraphicsManager(), _vm(vm) {
 	_bmpDecoder = _vm->isPreMohawk() ? new LivingBooksBitmap_v1() : new MohawkBitmap();
 
diff --git a/engines/mohawk/graphics.h b/engines/mohawk/graphics.h
index 08fb453..1331508 100644
--- a/engines/mohawk/graphics.h
+++ b/engines/mohawk/graphics.h
@@ -39,7 +39,6 @@ namespace Graphics {
 namespace Mohawk {
 
 class MohawkEngine;
-class MohawkEngine_Riven;
 class MohawkEngine_LivingBooks;
 class MohawkBitmap;
 
@@ -162,19 +161,11 @@ private:
 	Common::Rect _viewport;
 };
 
-#endif
+#endif // ENABLE_MYST
 
-struct SFXERecord {
-	// Record values
-	uint16 frameCount;
-	Common::Rect rect;
-	uint16 speed;
-	Common::Array<Common::SeekableReadStream*> frameScripts;
+#ifdef ENABLE_RIVEN
 
-	// Cur frame
-	uint16 curFrame;
-	uint32 lastFrameTime;
-};
+class MohawkEngine_Riven;
 
 class RivenGraphics : public GraphicsManager {
 public:
@@ -218,6 +209,17 @@ private:
 	MohawkBitmap *_bitmapDecoder;
 
 	// Water Effects
+	struct SFXERecord {
+		// Record values
+		uint16 frameCount;
+		Common::Rect rect;
+		uint16 speed;
+		Common::Array<Common::SeekableReadStream*> frameScripts;
+
+		// Cur frame
+		uint16 curFrame;
+		uint32 lastFrameTime;
+	};
 	Common::Array<SFXERecord> _waterEffects;
 
 	// Transitions
@@ -239,6 +241,8 @@ private:
 	uint _creditsImage, _creditsPos;
 };
 
+#endif ENABLE_RIVEN
+
 class LBGraphics : public GraphicsManager {
 public:
 	LBGraphics(MohawkEngine_LivingBooks *vm, uint16 width, uint16 height);
diff --git a/engines/mohawk/module.mk b/engines/mohawk/module.mk
index de7b53e..30f1d40 100644
--- a/engines/mohawk/module.mk
+++ b/engines/mohawk/module.mk
@@ -12,11 +12,6 @@ MODULE_OBJS = \
 	livingbooks_code.o \
 	mohawk.o \
 	resource.o \
-	riven.o \
-	riven_external.o \
-	riven_saveload.o \
-	riven_scripts.o \
-	riven_vars.o \
 	sound.o \
 	video.o \
 	view.o
@@ -51,6 +46,15 @@ MODULE_OBJS += \
 	myst_stacks/stoneship.o
 endif
 
+ifdef ENABLE_RIVEN
+MODULE_OBJS += \
+	riven.o \
+	riven_external.o \
+	riven_saveload.o \
+	riven_scripts.o \
+	riven_vars.o
+endif
+
 # This module can be built as a plugin
 ifeq ($(ENABLE_MOHAWK), DYNAMIC_PLUGIN)
 PLUGIN := 1






More information about the Scummvm-git-logs mailing list