diff options
author | Matthew Hoops | 2011-03-28 15:31:14 -0400 |
---|---|---|
committer | Matthew Hoops | 2011-03-28 22:26:23 -0400 |
commit | 4a7572d893fd50c25ff7576bdb7064bc3a85711d (patch) | |
tree | d8efc9149a304dcab9ebb656ff965f1265401681 /engines | |
parent | e5811cd6c39333cf7a51eb4943bf4ead0aff681c (diff) | |
download | scummvm-rg350-4a7572d893fd50c25ff7576bdb7064bc3a85711d.tar.gz scummvm-rg350-4a7572d893fd50c25ff7576bdb7064bc3a85711d.tar.bz2 scummvm-rg350-4a7572d893fd50c25ff7576bdb7064bc3a85711d.zip |
MOHAWK: Allow disabling compiling cstime
Diffstat (limited to 'engines')
-rw-r--r-- | engines/engines.mk | 4 | ||||
-rw-r--r-- | engines/mohawk/console.cpp | 9 | ||||
-rw-r--r-- | engines/mohawk/console.h | 9 | ||||
-rw-r--r-- | engines/mohawk/detection.cpp | 12 | ||||
-rw-r--r-- | engines/mohawk/graphics.cpp | 9 | ||||
-rw-r--r-- | engines/mohawk/graphics.h | 7 | ||||
-rw-r--r-- | engines/mohawk/module.mk | 16 |
7 files changed, 54 insertions, 12 deletions
diff --git a/engines/engines.mk b/engines/engines.mk index c5cbf3ad28..6e6c20dd41 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 e94ab7e092..445901d800 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 cefd0b1f4c..450802f508 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 724eb63f6a..f44f275057 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 656a6fad01..0df2c2605e 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 99baa4e339..08fb4531e8 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 eeba2589d8..de7b53e1b4 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 += \ |