NEVERHOOD: Remove obsolete _keyState

This commit is contained in:
johndoe123 2013-01-08 00:47:47 +00:00 committed by Willem Jan Palenstijn
parent 0f1aa64fd0
commit a35cd088e5
2 changed files with 3 additions and 9 deletions

View File

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

View File

@ -77,7 +77,6 @@ public:
Common::RandomSource *_rnd;
int16 _mouseX, _mouseY;
Common::KeyCode _keyState;
uint16 _buttonState;
GameState _gameState;