From c6070c0d99215d2e0207feeffd8fdb9013af6bed Mon Sep 17 00:00:00 2001 From: Borja Lorente Date: Sun, 5 Jun 2016 20:45:14 +0200 Subject: MACVENTURE: Add empty engine --- engines/macventure/configure.engine | 2 +- engines/macventure/macventure.cpp | 37 +++++++++++++++++++++++++++++++++++-- engines/macventure/macventure.h | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+), 3 deletions(-) (limited to 'engines') diff --git a/engines/macventure/configure.engine b/engines/macventure/configure.engine index bb4eb6ceb5..dc7cf7912c 100644 --- a/engines/macventure/configure.engine +++ b/engines/macventure/configure.engine @@ -1,3 +1,3 @@ # This file is included from the main "configure" script # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps] -add_engine macventure "MACVENTURE" no +add_engine macventure "MacVenture" no diff --git a/engines/macventure/macventure.cpp b/engines/macventure/macventure.cpp index 06325f5eba..a031513f3d 100644 --- a/engines/macventure/macventure.cpp +++ b/engines/macventure/macventure.cpp @@ -20,9 +20,13 @@ * */ +#include "common/scummsys.h" + +#include "common/debug-channels.h" +#include "common/debug.h" #include "common/error.h" -#include "engines/engine.h" +#include "engines/util.h" #include "macventure/macventure.h" @@ -30,13 +34,42 @@ namespace MacVenture { MacVentureEngine::MacVentureEngine(OSystem *syst, const ADGameDescription *gameDesc) : Engine(syst) { _gameDescription = gameDesc; + _rnd = new Common::RandomSource("macventure"); + + _debugger= NULL; + + debug("MacVenture::MacVentureEngine()"); } MacVentureEngine::~MacVentureEngine() { + debug("MacVenture::~MacVentureEngine()"); + + DebugMan.clearAllDebugChannels(); + delete _rnd; + delete _debugger; } Common::Error MacVentureEngine::run() { - return Common::Error(); + debug("MacVenture::MacVentureEngine::init()"); + + initGraphics(kScreenWidth, kScreenHeight, true); + + //_screen.create(kScreenWidth, kScreenHeight, Graphics::PixelFormat::createFormatCLUT8()); + + //_wm = new Graphics::MacWindowManager(); + //_wm->setScreen(&_screen); + + // Create debugger console. It requires GFX to be initialized + _debugger = new Console(this); + + // Additional setup. + debug("MacVentureEngine::init"); + + // Your main even loop should be (invoked from) here. + debug("MacVentureEngine::go: Hello, World!"); + + + return Common::kNoError; } } // End of namespace MacVenture diff --git a/engines/macventure/macventure.h b/engines/macventure/macventure.h index d4ead54457..39574943c7 100644 --- a/engines/macventure/macventure.h +++ b/engines/macventure/macventure.h @@ -23,12 +23,34 @@ #ifndef MACVENTURE_H #define MACVENTURE_H +#include "common/debug.h" +#include "common/random.h" + #include "engines/engine.h" +#include "graphics/managed_surface.h" +#include "graphics/macgui/macwindowmanager.h" + +#include "gui/debugger.h" + struct ADGameDescription; namespace MacVenture { +class Console; + +enum { + kScreenWidth = 512, + kScreenHeight = 342 +}; + +enum { + kMacVentureDebugExample = 1 << 0, + kMacVentureDebugExample2 = 1 << 1 + // next new level must be 1 << 2 (4) + // the current limitation is 32 debug levels (1 << 31 is the last one) +}; + class MacVentureEngine : public Engine { public: @@ -39,7 +61,20 @@ public: private: const ADGameDescription *_gameDescription; + Common::RandomSource *_rnd; + + Console *_debugger; + + Graphics::MacWindowManager *_wm; + + Graphics::ManagedSurface _screen; +}; + +class Console : public GUI::Debugger { +public: + Console(MacVentureEngine *vm) {} + virtual ~Console(void) {} }; } // End of namespace MacVenture -- cgit v1.2.3