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/sword2 | |
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/sword2')
-rw-r--r-- | engines/sword2/animation.cpp | 8 | ||||
-rw-r--r-- | engines/sword2/sword2.cpp | 26 |
2 files changed, 17 insertions, 17 deletions
diff --git a/engines/sword2/animation.cpp b/engines/sword2/animation.cpp index b56d122509..3afd8b8748 100644 --- a/engines/sword2/animation.cpp +++ b/engines/sword2/animation.cpp @@ -407,19 +407,19 @@ void MoviePlayer::play(SequenceTextInfo *textList, uint32 numLines, int32 leadIn drawFrame(); updateScreen(); - OSystem::Event event; + Common::Event event; Common::EventManager *eventMan = _system->getEventManager(); while (eventMan->pollEvent(event)) { switch (event.type) { - case OSystem::EVENT_SCREEN_CHANGED: + case Common::EVENT_SCREEN_CHANGED: handleScreenChanged(); break; - case OSystem::EVENT_QUIT: + case Common::EVENT_QUIT: _vm->closeGame(); terminate = true; break; - case OSystem::EVENT_KEYDOWN: + case Common::EVENT_KEYDOWN: if (event.kbd.keycode == 27) terminate = true; break; diff --git a/engines/sword2/sword2.cpp b/engines/sword2/sword2.cpp index 3e313fcdcc..e399307f72 100644 --- a/engines/sword2/sword2.cpp +++ b/engines/sword2/sword2.cpp @@ -375,9 +375,9 @@ int Sword2Engine::go() { KeyboardEvent *ke = keyboardEvent(); if (ke) { - if ((ke->modifiers == OSystem::KBD_CTRL && ke->keycode == 'd') || ke->ascii == '#' || ke->ascii == '~') { + if ((ke->modifiers == Common::KBD_CTRL && ke->keycode == 'd') || ke->ascii == '#' || ke->ascii == '~') { _debugger->attach(); - } else if (ke->modifiers == 0 || ke->modifiers == OSystem::KBD_SHIFT) { + } else if (ke->modifiers == 0 || ke->modifiers == Common::KBD_SHIFT) { switch (ke->keycode) { case 'p': if (_gamePaused) @@ -532,13 +532,13 @@ uint32 Sword2Engine::setInputEventFilter(uint32 filter) { */ void Sword2Engine::parseInputEvents() { - OSystem::Event event; + Common::Event event; Common::EventManager *eventMan = _system->getEventManager(); while (eventMan->pollEvent(event)) { switch (event.type) { - case OSystem::EVENT_KEYDOWN: - if (event.kbd.flags == OSystem::KBD_CTRL) { + case Common::EVENT_KEYDOWN: + if (event.kbd.flags == Common::KBD_CTRL) { if (event.kbd.keycode == 'f') { if (_gameSpeed == 1) _gameSpeed = 2; @@ -553,48 +553,48 @@ void Sword2Engine::parseInputEvents() { _keyboardEvent.modifiers = event.kbd.flags; } break; - case OSystem::EVENT_MOUSEMOVE: + case Common::EVENT_MOUSEMOVE: if (!(_inputEventFilter & RD_KEYDOWN)) { _mouse->setPos(event.mouse.x, event.mouse.y - MENUDEEP); } break; - case OSystem::EVENT_LBUTTONDOWN: + case Common::EVENT_LBUTTONDOWN: if (!(_inputEventFilter & RD_LEFTBUTTONDOWN)) { _mouseEvent.pending = true; _mouseEvent.buttons = RD_LEFTBUTTONDOWN; } break; - case OSystem::EVENT_RBUTTONDOWN: + case Common::EVENT_RBUTTONDOWN: if (!(_inputEventFilter & RD_RIGHTBUTTONDOWN)) { _mouseEvent.pending = true; _mouseEvent.buttons = RD_RIGHTBUTTONDOWN; } break; - case OSystem::EVENT_LBUTTONUP: + case Common::EVENT_LBUTTONUP: if (!(_inputEventFilter & RD_LEFTBUTTONUP)) { _mouseEvent.pending = true; _mouseEvent.buttons = RD_LEFTBUTTONUP; } break; - case OSystem::EVENT_RBUTTONUP: + case Common::EVENT_RBUTTONUP: if (!(_inputEventFilter & RD_RIGHTBUTTONUP)) { _mouseEvent.pending = true; _mouseEvent.buttons = RD_RIGHTBUTTONUP; } break; - case OSystem::EVENT_WHEELUP: + case Common::EVENT_WHEELUP: if (!(_inputEventFilter & RD_WHEELUP)) { _mouseEvent.pending = true; _mouseEvent.buttons = RD_WHEELUP; } break; - case OSystem::EVENT_WHEELDOWN: + case Common::EVENT_WHEELDOWN: if (!(_inputEventFilter & RD_WHEELDOWN)) { _mouseEvent.pending = true; _mouseEvent.buttons = RD_WHEELDOWN; } break; - case OSystem::EVENT_QUIT: + case Common::EVENT_QUIT: closeGame(); break; default: |