aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorjohndoe1232013-01-08 00:47:47 +0000
committerWillem Jan Palenstijn2013-05-08 20:47:39 +0200
commita35cd088e52eced55d5c0f8253773e9d940b8373 (patch)
tree0c79ad64a70cfbbde91270f877db32e6e869842f /engines
parent0f1aa64fd0172c374c491bcfba4ac7baa2394d2e (diff)
downloadscummvm-rg350-a35cd088e52eced55d5c0f8253773e9d940b8373.tar.gz
scummvm-rg350-a35cd088e52eced55d5c0f8253773e9d940b8373.tar.bz2
scummvm-rg350-a35cd088e52eced55d5c0f8253773e9d940b8373.zip
NEVERHOOD: Remove obsolete _keyState
Diffstat (limited to 'engines')
-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;