HDB: Add _input subsytem and init it

This commit is contained in:
Nipun Garg 2019-06-27 04:21:48 +05:30 committed by Eugene Sandulenko
parent e3808675d2
commit 1b7034cd87
2 changed files with 7 additions and 0 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;
_input = new Input;
_window = new Window;
_rnd = new Common::RandomSource("hdb");
@ -61,6 +62,7 @@ HDBGame::~HDBGame() {
delete _lua;
delete _map;
delete _ai;
delete _input;
delete _window;
delete _rnd;
@ -80,6 +82,9 @@ bool HDBGame::init() {
if (!_drawMan->init()) {
error("DrawMan::init: Couldn't initialize DrawMan");
}
if (!_input->init()) {
error("Input::init: Couldn't initialize Input");
}
if (!_ai->init()) {
error("AI::init: Couldn't initialize AI");
}

View File

@ -41,6 +41,7 @@
#include "hdb/ai.h"
#include "hdb/ai-player.h"
#include "hdb/file-manager.h"
#include "hdb/input.h"
#include "hdb/lua-script.h"
#include "hdb/map-loader.h"
#include "hdb/window.h"
@ -126,6 +127,7 @@ public:
LuaScript *_lua;
Map *_map;
AI *_ai;
Input *_input;
Window *_window;
// Random Source