MACVENTURE: Add empty engine

This commit is contained in:
Borja Lorente 2016-06-05 20:45:14 +02:00
parent 6815b05467
commit c6070c0d99
3 changed files with 71 additions and 3 deletions

View File

@ -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

View File

@ -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

View File

@ -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