mirror of
https://github.com/libretro/scummvm.git
synced 2024-11-27 03:10:37 +00:00
MOHAWK: Allow disabling compilation of Myst
This commit is contained in:
parent
344369c294
commit
e5811cd6c3
3
configure
vendored
3
configure
vendored
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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() {}
|
||||
|
@ -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));
|
||||
|
@ -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:
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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:
|
||||
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user