HDB: Add and init the _window subsystem

This commit is contained in:
Nipun Garg 2019-06-23 02:37:14 +05:30 committed by Eugene Sandulenko
parent 3ffbcec87e
commit 28ab1f9549
2 changed files with 10 additions and 3 deletions

View File

@ -47,6 +47,7 @@ HDBGame::HDBGame(OSystem *syst, const ADGameDescription *gameDesc) : Engine(syst
_lua = new LuaScript;
_map = new Map;
_ai = new AI;
_window = new Window;
_rnd = new Common::RandomSource("hdb");
DebugMan.addDebugChannel(kDebugExample1, "Example1", "This is just an example to test");
@ -60,6 +61,7 @@ HDBGame::~HDBGame() {
delete _lua;
delete _map;
delete _ai;
delete _window;
delete _rnd;
DebugMan.clearAllDebugChannels();
@ -84,6 +86,9 @@ bool HDBGame::init() {
if (!_lua->init()) {
error("LuaScript::init: Couldn't load the GLOBAL_LUA code.");
}
if (!_window->init()) {
error("Window::init: Couldn't initialize Window");
}
// REMOVE: Putting this here since Menu hasn't been implemented yet.
// Defaults the game into Action Mode

View File

@ -37,12 +37,13 @@
#include "engines/util.h"
#include "console.h"
#include "hdb/file-manager.h"
#include "hdb/draw-manager.h"
#include "hdb/lua-script.h"
#include "hdb/map-loader.h"
#include "hdb/ai.h"
#include "hdb/ai-player.h"
#include "hdb/file-manager.h"
#include "hdb/lua-script.h"
#include "hdb/map-loader.h"
#include "hdb/window.h"
#define MAX_SNDCACHE_MEM 0x400000 // 4Mb of sounds in memory
#define MAX_TILES_CACHED 3500 // Max no of tiles in memory at once
@ -119,6 +120,7 @@ public:
LuaScript *_lua;
Map *_map;
AI *_ai;
Window *_window;
// Random Source
Common::RandomSource *_rnd;