aboutsummaryrefslogtreecommitdiff
path: root/engines/touche
diff options
context:
space:
mode:
authorMax Horn2007-03-17 19:02:05 +0000
committerMax Horn2007-03-17 19:02:05 +0000
commited54ea9155961d8ca5d5fb3c7777fc57a29f2751 (patch)
tree467b926af11cd4129ba003d04ba01de044c7a6df /engines/touche
parentf272d1957084098c5b53975ad3501074f6971af8 (diff)
downloadscummvm-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/touche')
-rw-r--r--engines/touche/touche.cpp18
-rw-r--r--engines/touche/ui.cpp18
2 files changed, 18 insertions, 18 deletions
diff --git a/engines/touche/touche.cpp b/engines/touche/touche.cpp
index 650fc8f9f2..e248579814 100644
--- a/engines/touche/touche.cpp
+++ b/engines/touche/touche.cpp
@@ -275,14 +275,14 @@ void ToucheEngine::mainLoop() {
}
void ToucheEngine::processEvents(bool handleKeyEvents) {
- 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:
_flagsTable[611] = 1;
break;
- case OSystem::EVENT_KEYDOWN:
+ case Common::EVENT_KEYDOWN:
if (!handleKeyEvents) {
break;
}
@@ -300,7 +300,7 @@ void ToucheEngine::processEvents(bool handleKeyEvents) {
} else if (event.kbd.keycode == 291) { // F10
_fastWalkMode = false;
}
- if (event.kbd.flags == OSystem::KBD_CTRL) {
+ if (event.kbd.flags == Common::KBD_CTRL) {
if (event.kbd.keycode == 'd') {
// enable debugging stuff ?
_flagsTable[777] = 1;
@@ -319,25 +319,25 @@ void ToucheEngine::processEvents(bool handleKeyEvents) {
}
}
break;
- case OSystem::EVENT_MOUSEMOVE:
+ case Common::EVENT_MOUSEMOVE:
_inp_mousePos.x = event.mouse.x;
_inp_mousePos.y = event.mouse.y;
break;
- case OSystem::EVENT_LBUTTONDOWN:
+ case Common::EVENT_LBUTTONDOWN:
_inp_mousePos.x = event.mouse.x;
_inp_mousePos.y = event.mouse.y;
_inp_leftMouseButtonPressed = true;
break;
- case OSystem::EVENT_LBUTTONUP:
+ case Common::EVENT_LBUTTONUP:
_inp_mousePos.x = event.mouse.x;
_inp_mousePos.y = event.mouse.y;
break;
- case OSystem::EVENT_RBUTTONDOWN:
+ case Common::EVENT_RBUTTONDOWN:
_inp_mousePos.x = event.mouse.x;
_inp_mousePos.y = event.mouse.y;
_inp_rightMouseButtonPressed = true;
break;
- case OSystem::EVENT_RBUTTONUP:
+ case Common::EVENT_RBUTTONUP:
_inp_mousePos.x = event.mouse.x;
_inp_mousePos.y = event.mouse.y;
_inp_rightMouseButtonPressed = false;
diff --git a/engines/touche/ui.cpp b/engines/touche/ui.cpp
index 2113640b4b..a679b83ac7 100644
--- a/engines/touche/ui.cpp
+++ b/engines/touche/ui.cpp
@@ -377,23 +377,23 @@ void ToucheEngine::handleOptions(int forceDisplay) {
}
}
redrawMenu(&menuData);
- OSystem::Event event;
+ Common::Event event;
Common::EventManager *eventMan = _system->getEventManager();
while (eventMan->pollEvent(event)) {
const Button *button = 0;
switch (event.type) {
- case OSystem::EVENT_QUIT:
+ case Common::EVENT_QUIT:
menuData.quit = true;
menuData.exit = true;
_flagsTable[611] = 1;
break;
- case OSystem::EVENT_LBUTTONDOWN:
+ case Common::EVENT_LBUTTONDOWN:
button = menuData.findButtonUnderCursor(event.mouse.x, event.mouse.y);
if (button) {
handleMenuAction(&menuData, button->action);
}
break;
- case OSystem::EVENT_KEYDOWN:
+ case Common::EVENT_KEYDOWN:
if (menuData.mode == kMenuSaveStateMode) {
if (event.kbd.keycode == 8) {
menuData.removeLastCharFromDescription(_saveLoadCurrentSlot);
@@ -402,10 +402,10 @@ void ToucheEngine::handleOptions(int forceDisplay) {
}
}
break;
- case OSystem::EVENT_WHEELUP:
+ case Common::EVENT_WHEELUP:
handleMenuAction(&menuData, kActionScrollUpSaves);
break;
- case OSystem::EVENT_WHEELDOWN:
+ case Common::EVENT_WHEELDOWN:
handleMenuAction(&menuData, kActionScrollDownSaves);
break;
default:
@@ -536,15 +536,15 @@ int ToucheEngine::displayQuitDialog() {
int ret = 0;
bool quitLoop = false;
while (!quitLoop) {
- 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:
quitLoop = true;
ret = 1;
break;
- case OSystem::EVENT_KEYDOWN:
+ case Common::EVENT_KEYDOWN:
quitLoop = true;
switch (_language) {
case Common::FR_FRA: