aboutsummaryrefslogtreecommitdiff
path: root/engines/neverhood
diff options
context:
space:
mode:
Diffstat (limited to 'engines/neverhood')
-rw-r--r--engines/neverhood/neverhood.cpp11
-rw-r--r--engines/neverhood/neverhood.h1
2 files changed, 3 insertions, 9 deletions
diff --git a/engines/neverhood/neverhood.cpp b/engines/neverhood/neverhood.cpp
index ae181ff952..4ee801bff4 100644
--- a/engines/neverhood/neverhood.cpp
+++ b/engines/neverhood/neverhood.cpp
@@ -70,11 +70,8 @@ Common::Error NeverhoodEngine::run() {
_staticData = new StaticData();
_staticData->load("neverhood.dat");
-
_gameVars = new GameVars();
-
_screen = new Screen(this);
-
_res = new ResourceMan();
if (isDemo()) {
@@ -98,13 +95,11 @@ Common::Error NeverhoodEngine::run() {
_collisionMan = new CollisionMan(this);
_gameModule = new GameModule(this);
- _gameModule->startup();
-
// TODO Check if this can actually be false...
_isSaveAllowed = true;
if (isDemo()) {
- // Adjust some navigation lists for the demo version...
+ // Adjust this navigation list for the demo version
NavigationList *navigationList = _staticData->getNavigationList(0x004B67E8);
(*navigationList)[0].middleSmackerFileHash = 0;
(*navigationList)[0].middleFlag = 1;
@@ -116,6 +111,8 @@ Common::Error NeverhoodEngine::run() {
(*navigationList)[5].middleFlag = 1;
}
+ _gameModule->startup();
+
mainLoop();
delete _gameModule;
@@ -142,12 +139,10 @@ void NeverhoodEngine::mainLoop() {
while (eventMan->pollEvent(event)) {
switch (event.type) {
case Common::EVENT_KEYDOWN:
- _keyState = event.kbd.keycode;
_gameModule->handleKeyDown(event.kbd.keycode);
_gameModule->handleAsciiKey(event.kbd.ascii);
break;
case Common::EVENT_KEYUP:
- _keyState = Common::KEYCODE_INVALID;
break;
case Common::EVENT_MOUSEMOVE:
_mouseX = event.mouse.x;
diff --git a/engines/neverhood/neverhood.h b/engines/neverhood/neverhood.h
index b0f9abb2e2..ef0f16c41a 100644
--- a/engines/neverhood/neverhood.h
+++ b/engines/neverhood/neverhood.h
@@ -77,7 +77,6 @@ public:
Common::RandomSource *_rnd;
int16 _mouseX, _mouseY;
- Common::KeyCode _keyState;
uint16 _buttonState;
GameState _gameState;