diff options
author | Max Horn | 2007-03-17 19:02:05 +0000 |
---|---|---|
committer | Max Horn | 2007-03-17 19:02:05 +0000 |
commit | ed54ea9155961d8ca5d5fb3c7777fc57a29f2751 (patch) | |
tree | 467b926af11cd4129ba003d04ba01de044c7a6df /engines/kyra | |
parent | f272d1957084098c5b53975ad3501074f6971af8 (diff) | |
download | scummvm-rg350-ed54ea9155961d8ca5d5fb3c7777fc57a29f2751.tar.gz scummvm-rg350-ed54ea9155961d8ca5d5fb3c7777fc57a29f2751.tar.bz2 scummvm-rg350-ed54ea9155961d8ca5d5fb3c7777fc57a29f2751.zip |
Moved Event/EventType/keyboard enum from common/system.h (part of class OSystem) to common/events.h (part of namespace Common). Porters may have to make minor changes to their backends to get them to compile again
svn-id: r26180
Diffstat (limited to 'engines/kyra')
-rw-r--r-- | engines/kyra/gui.cpp | 24 | ||||
-rw-r--r-- | engines/kyra/kyra.cpp | 28 | ||||
-rw-r--r-- | engines/kyra/sequences_v1.cpp | 6 | ||||
-rw-r--r-- | engines/kyra/text.cpp | 8 | ||||
-rw-r--r-- | engines/kyra/vqa.cpp | 6 |
5 files changed, 36 insertions, 36 deletions
diff --git a/engines/kyra/gui.cpp b/engines/kyra/gui.cpp index f68b38eec1..fedd21704f 100644 --- a/engines/kyra/gui.cpp +++ b/engines/kyra/gui.cpp @@ -800,7 +800,7 @@ void KyraEngine::calcCoords(Menu &menu) { } void KyraEngine::gui_getInput() { - OSystem::Event event; + Common::Event event; static uint32 lastScreenUpdate = 0; uint32 now = _system->getMillis(); @@ -808,16 +808,16 @@ void KyraEngine::gui_getInput() { Common::EventManager *eventMan = _system->getEventManager(); while (eventMan->pollEvent(event)) { switch (event.type) { - case OSystem::EVENT_QUIT: + case Common::EVENT_QUIT: quitGame(); break; - case OSystem::EVENT_LBUTTONDOWN: + case Common::EVENT_LBUTTONDOWN: _mousePressFlag = true; break; - case OSystem::EVENT_LBUTTONUP: + case Common::EVENT_LBUTTONUP: _mousePressFlag = false; break; - case OSystem::EVENT_MOUSEMOVE: + case Common::EVENT_MOUSEMOVE: _mouseX = event.mouse.x; _mouseY = event.mouse.y; if (_flags.useHiResOverlay) { @@ -827,13 +827,13 @@ void KyraEngine::gui_getInput() { _system->updateScreen(); lastScreenUpdate = now; break; - case OSystem::EVENT_WHEELUP: + case Common::EVENT_WHEELUP: _mouseWheel = -1; break; - case OSystem::EVENT_WHEELDOWN: + case Common::EVENT_WHEELDOWN: _mouseWheel = 1; break; - case OSystem::EVENT_KEYDOWN: + case Common::EVENT_KEYDOWN: _keyPressed = event.kbd.ascii; break; default: @@ -1471,15 +1471,15 @@ void KyraEngine::gui_updateMainMenuAnimation() { } bool KyraEngine::gui_mainMenuGetInput() { - OSystem::Event event; + Common::Event event; Common::EventManager *eventMan = _system->getEventManager(); while (eventMan->pollEvent(event)) { switch (event.type) { - case OSystem::EVENT_QUIT: + case Common::EVENT_QUIT: quitGame(); break; - case OSystem::EVENT_MOUSEMOVE: + case Common::EVENT_MOUSEMOVE: _mouseX = event.mouse.x; _mouseY = event.mouse.y; if (_flags.useHiResOverlay) { @@ -1487,7 +1487,7 @@ bool KyraEngine::gui_mainMenuGetInput() { _mouseY >>= 1; } break; - case OSystem::EVENT_LBUTTONUP: + case Common::EVENT_LBUTTONUP: return true; default: break; diff --git a/engines/kyra/kyra.cpp b/engines/kyra/kyra.cpp index 887daa7d92..de953faffd 100644 --- a/engines/kyra/kyra.cpp +++ b/engines/kyra/kyra.cpp @@ -603,7 +603,7 @@ void KyraEngine::delayUntil(uint32 timestamp, bool updateTimers, bool update, bo } void KyraEngine::delay(uint32 amount, bool update, bool isMainLoop) { - OSystem::Event event; + Common::Event event; char saveLoadSlot[20]; char savegameName[14]; @@ -612,17 +612,17 @@ void KyraEngine::delay(uint32 amount, bool update, bool isMainLoop) { Common::EventManager *eventMan = _system->getEventManager(); while (eventMan->pollEvent(event)) { switch (event.type) { - case OSystem::EVENT_KEYDOWN: + case Common::EVENT_KEYDOWN: if (event.kbd.keycode >= '1' && event.kbd.keycode <= '9' && - (event.kbd.flags == OSystem::KBD_CTRL || event.kbd.flags == OSystem::KBD_ALT) && isMainLoop) { + (event.kbd.flags == Common::KBD_CTRL || event.kbd.flags == Common::KBD_ALT) && isMainLoop) { sprintf(saveLoadSlot, "%s.00%d", _targetName.c_str(), event.kbd.keycode - '0'); - if (event.kbd.flags == OSystem::KBD_CTRL) + if (event.kbd.flags == Common::KBD_CTRL) loadGame(saveLoadSlot); else { sprintf(savegameName, "Quicksave %d", event.kbd.keycode - '0'); saveGame(saveLoadSlot, savegameName); } - } else if (event.kbd.flags == OSystem::KBD_CTRL) { + } else if (event.kbd.flags == Common::KBD_CTRL) { if (event.kbd.keycode == 'd') _debugger->attach(); else if (event.kbd.keycode == 'q') @@ -635,7 +635,7 @@ void KyraEngine::delay(uint32 amount, bool update, bool isMainLoop) { } break; - case OSystem::EVENT_MOUSEMOVE: + case Common::EVENT_MOUSEMOVE: _mouseX = event.mouse.x; _mouseY = event.mouse.y; if (_flags.useHiResOverlay) { @@ -644,13 +644,13 @@ void KyraEngine::delay(uint32 amount, bool update, bool isMainLoop) { } _animator->_updateScreen = true; break; - case OSystem::EVENT_QUIT: + case Common::EVENT_QUIT: quitGame(); break; - case OSystem::EVENT_LBUTTONDOWN: + case Common::EVENT_LBUTTONDOWN: _mousePressFlag = true; break; - case OSystem::EVENT_LBUTTONUP: + case Common::EVENT_LBUTTONUP: _mousePressFlag = false; _mouseX = event.mouse.x; @@ -705,22 +705,22 @@ void KyraEngine::delay(uint32 amount, bool update, bool isMainLoop) { void KyraEngine::waitForEvent() { bool finished = false; - OSystem::Event event; + Common::Event event; while (!finished && !_quitFlag) { Common::EventManager *eventMan = _system->getEventManager(); while (eventMan->pollEvent(event)) { switch (event.type) { - case OSystem::EVENT_KEYDOWN: + case Common::EVENT_KEYDOWN: finished = true; break; - case OSystem::EVENT_MOUSEMOVE: + case Common::EVENT_MOUSEMOVE: _mouseX = event.mouse.x; _mouseY = event.mouse.y; break; - case OSystem::EVENT_QUIT: + case Common::EVENT_QUIT: quitGame(); break; - case OSystem::EVENT_LBUTTONDOWN: + case Common::EVENT_LBUTTONDOWN: finished = true; _skipFlag = true; break; diff --git a/engines/kyra/sequences_v1.cpp b/engines/kyra/sequences_v1.cpp index 955ca3dd98..7503462dd2 100644 --- a/engines/kyra/sequences_v1.cpp +++ b/engines/kyra/sequences_v1.cpp @@ -1148,7 +1148,7 @@ void KyraEngine::seq_playCredits() { _screen->copyRegion(8, 32, 8, 32, 312, 128, 4, 0, Screen::CR_NO_P_CHECK); _screen->fadePalette(_screen->_currentPalette, 0x5A); - OSystem::Event event; + Common::Event event; bool finished = false; int bottom = 201; while (!finished) { @@ -1174,10 +1174,10 @@ void KyraEngine::seq_playCredits() { Common::EventManager *eventMan = _system->getEventManager(); while (eventMan->pollEvent(event)) { switch (event.type) { - case OSystem::EVENT_KEYDOWN: + case Common::EVENT_KEYDOWN: finished = true; break; - case OSystem::EVENT_QUIT: + case Common::EVENT_QUIT: quitGame(); finished = true; break; diff --git a/engines/kyra/text.cpp b/engines/kyra/text.cpp index 4b2caa39d3..4bc9bfc629 100644 --- a/engines/kyra/text.cpp +++ b/engines/kyra/text.cpp @@ -40,7 +40,7 @@ void KyraEngine::waitForChatToFinish(int vocFile, int16 chatDuration, const char bool runLoop = true; bool drawText = textEnabled(); uint8 currPage; - OSystem::Event event; + Common::Event event; //while (towns_isEscKeyPressed() ) //towns_getKey(); @@ -121,15 +121,15 @@ void KyraEngine::waitForChatToFinish(int vocFile, int16 chatDuration, const char Common::EventManager *eventMan = _system->getEventManager(); while (eventMan->pollEvent(event)) { switch (event.type) { - case OSystem::EVENT_KEYDOWN: + case Common::EVENT_KEYDOWN: if (event.kbd.keycode == '.') _skipFlag = true; break; - case OSystem::EVENT_QUIT: + case Common::EVENT_QUIT: quitGame(); runLoop = false; break; - case OSystem::EVENT_LBUTTONDOWN: + case Common::EVENT_LBUTTONDOWN: runLoop = false; break; default: diff --git a/engines/kyra/vqa.cpp b/engines/kyra/vqa.cpp index ddeaa4beb1..f60a7296c8 100644 --- a/engines/kyra/vqa.cpp +++ b/engines/kyra/vqa.cpp @@ -661,16 +661,16 @@ void VQAMovie::play() { if (elapsedTime >= (i * 1000) / _header.frameRate) break; - OSystem::Event event; + Common::Event event; Common::EventManager *eventMan = _system->getEventManager(); while (eventMan->pollEvent(event)) { switch (event.type) { - case OSystem::EVENT_KEYDOWN: + case Common::EVENT_KEYDOWN: if (event.kbd.ascii == 27) return; break; - case OSystem::EVENT_QUIT: + case Common::EVENT_QUIT: _vm->quitGame(); return; default: |