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/agos | |
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/agos')
-rw-r--r-- | engines/agos/animation.cpp | 14 | ||||
-rw-r--r-- | engines/agos/event.cpp | 24 |
2 files changed, 19 insertions, 19 deletions
diff --git a/engines/agos/animation.cpp b/engines/agos/animation.cpp index 3d37972e46..3d8ec156ce 100644 --- a/engines/agos/animation.cpp +++ b/engines/agos/animation.cpp @@ -233,29 +233,29 @@ void MoviePlayer::handleNextFrame() { _vm->_system->updateScreen(); _frameNum++; - OSystem::Event event; + Common::Event event; Common::EventManager *eventMan = _vm->_system->getEventManager(); while (eventMan->pollEvent(event)) { switch (event.type) { - case OSystem::EVENT_KEYDOWN: + case Common::EVENT_KEYDOWN: if (event.kbd.ascii == 27) { _leftButtonDown = true; _rightButtonDown = true; } break; - case OSystem::EVENT_LBUTTONDOWN: + case Common::EVENT_LBUTTONDOWN: _leftButtonDown = true; break; - case OSystem::EVENT_RBUTTONDOWN: + case Common::EVENT_RBUTTONDOWN: _rightButtonDown = true; break; - case OSystem::EVENT_LBUTTONUP: + case Common::EVENT_LBUTTONUP: _leftButtonDown = false; break; - case OSystem::EVENT_RBUTTONUP: + case Common::EVENT_RBUTTONUP: _rightButtonDown = false; break; - case OSystem::EVENT_QUIT: + case Common::EVENT_QUIT: _vm->_system->quit(); break; default: diff --git a/engines/agos/event.cpp b/engines/agos/event.cpp index 4d8f8189ed..1987f4d080 100644 --- a/engines/agos/event.cpp +++ b/engines/agos/event.cpp @@ -299,7 +299,7 @@ void AGOSEngine::scrollEvent() { } void AGOSEngine::delay(uint amount) { - OSystem::Event event; + Common::Event event; uint32 start = _system->getMillis(); uint32 cur = start; @@ -335,10 +335,10 @@ void AGOSEngine::delay(uint amount) { Common::EventManager *eventMan = _system->getEventManager(); while (eventMan->pollEvent(event)) { switch (event.type) { - case OSystem::EVENT_KEYDOWN: + case Common::EVENT_KEYDOWN: if (event.kbd.keycode >= '0' && event.kbd.keycode <='9' - && (event.kbd.flags == OSystem::KBD_ALT || - event.kbd.flags == OSystem::KBD_CTRL)) { + && (event.kbd.flags == Common::KBD_ALT || + event.kbd.flags == Common::KBD_CTRL)) { _saveLoadSlot = event.kbd.keycode - '0'; // There is no save slot 0 @@ -346,13 +346,13 @@ void AGOSEngine::delay(uint amount) { _saveLoadSlot = 10; sprintf(_saveLoadName, "Quicksave %d", _saveLoadSlot); - _saveLoadType = (event.kbd.flags == OSystem::KBD_ALT) ? 1 : 2; + _saveLoadType = (event.kbd.flags == Common::KBD_ALT) ? 1 : 2; // We should only allow a load or save when it was possible in original // This stops load/save during copy protection, conversations and cut scenes if (!_mouseHideCount && !_showPreposition) quickLoadOrSave(); - } else if (event.kbd.flags == OSystem::KBD_CTRL) { + } else if (event.kbd.flags == Common::KBD_CTRL) { if (event.kbd.keycode == 'a') { GUI::Dialog *_aboutDialog; _aboutDialog = new GUI::AboutDialog(); @@ -364,7 +364,7 @@ void AGOSEngine::delay(uint amount) { } if (getGameType() == GType_PP) { - if (event.kbd.flags == OSystem::KBD_SHIFT) + if (event.kbd.flags == Common::KBD_SHIFT) _variableArray[41] = 0; else _variableArray[41] = 1; @@ -376,11 +376,11 @@ void AGOSEngine::delay(uint amount) { else _keyPressed = (byte)event.kbd.ascii; break; - case OSystem::EVENT_MOUSEMOVE: + case Common::EVENT_MOUSEMOVE: _sdlMouseX = event.mouse.x; _sdlMouseY = event.mouse.y; break; - case OSystem::EVENT_LBUTTONDOWN: + case Common::EVENT_LBUTTONDOWN: if (getGameType() == GType_FF) setBitFlag(89, true); _leftButtonDown++; @@ -391,19 +391,19 @@ void AGOSEngine::delay(uint amount) { _sdlMouseY = event.mouse.y; #endif break; - case OSystem::EVENT_LBUTTONUP: + case Common::EVENT_LBUTTONUP: if (getGameType() == GType_FF) setBitFlag(89, false); _leftButton = 0; _leftButtonCount = 0; break; - case OSystem::EVENT_RBUTTONDOWN: + case Common::EVENT_RBUTTONDOWN: if (getGameType() == GType_FF) setBitFlag(92, false); _rightButtonDown++; break; - case OSystem::EVENT_QUIT: + case Common::EVENT_QUIT: shutdown(); return; default: |