aboutsummaryrefslogtreecommitdiff
path: root/engines/sky
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/sky
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/sky')
-rw-r--r--engines/sky/control.cpp18
-rw-r--r--engines/sky/intro.cpp6
-rw-r--r--engines/sky/mouse.cpp4
-rw-r--r--engines/sky/screen.cpp4
-rw-r--r--engines/sky/sky.cpp16
5 files changed, 24 insertions, 24 deletions
diff --git a/engines/sky/control.cpp b/engines/sky/control.cpp
index 09e7b5a805..3d34ed9e36 100644
--- a/engines/sky/control.cpp
+++ b/engines/sky/control.cpp
@@ -1547,7 +1547,7 @@ void Control::restartGame(void) {
void Control::delay(unsigned int amount) {
- OSystem::Event event;
+ Common::Event event;
uint32 start = _system->getMillis();
uint32 cur = start;
@@ -1557,32 +1557,32 @@ void Control::delay(unsigned int amount) {
Common::EventManager *eventMan = _system->getEventManager();
while (eventMan->pollEvent(event)) {
switch (event.type) {
- case OSystem::EVENT_KEYDOWN:
+ case Common::EVENT_KEYDOWN:
// Make sure backspace works right (this fixes a small issue on OS X)
if (event.kbd.keycode == 8)
_keyPressed = 8;
else
_keyPressed = (byte)event.kbd.ascii;
break;
- case OSystem::EVENT_MOUSEMOVE:
+ case Common::EVENT_MOUSEMOVE:
if (!(SkyEngine::_systemVars.systemFlags & SF_MOUSE_LOCKED))
_skyMouse->mouseMoved(event.mouse.x, event.mouse.y);
break;
- case OSystem::EVENT_LBUTTONDOWN:
+ case Common::EVENT_LBUTTONDOWN:
_mouseClicked = true;
break;
- case OSystem::EVENT_LBUTTONUP:
+ case Common::EVENT_LBUTTONUP:
_mouseClicked = false;
break;
- case OSystem::EVENT_RBUTTONDOWN:
+ case Common::EVENT_RBUTTONDOWN:
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_QUIT:
+ case Common::EVENT_QUIT:
SkyEngine::_systemVars.quitGame = true;
break;
default:
diff --git a/engines/sky/intro.cpp b/engines/sky/intro.cpp
index 9528be1905..14613d0ff5 100644
--- a/engines/sky/intro.cpp
+++ b/engines/sky/intro.cpp
@@ -900,7 +900,7 @@ void Intro::restoreScreen(void) {
bool Intro::escDelay(uint32 msecs) {
Common::EventManager *eventMan = _system->getEventManager();
- OSystem::Event event;
+ Common::Event event;
if (_relDelay == 0) // first call, init with system time
_relDelay = (int32)_system->getMillis();
@@ -909,10 +909,10 @@ bool Intro::escDelay(uint32 msecs) {
int32 nDelay = 0;
do {
while (eventMan->pollEvent(event)) {
- if (event.type == OSystem::EVENT_KEYDOWN) {
+ if (event.type == Common::EVENT_KEYDOWN) {
if (event.kbd.keycode == 27)
return false;
- } else if (event.type == OSystem::EVENT_QUIT) {
+ } else if (event.type == Common::EVENT_QUIT) {
_quitProg = true;
return false;
}
diff --git a/engines/sky/mouse.cpp b/engines/sky/mouse.cpp
index 5a2006b8c9..bb31c6b542 100644
--- a/engines/sky/mouse.cpp
+++ b/engines/sky/mouse.cpp
@@ -172,7 +172,7 @@ void Mouse::waitMouseNotPressed(int minDelay) {
bool mousePressed = true;
uint32 now = _system->getMillis();
- OSystem::Event event;
+ Common::Event event;
Common::EventManager *eventMan = _system->getEventManager();
while (mousePressed || _system->getMillis() < now + minDelay) {
@@ -187,7 +187,7 @@ void Mouse::waitMouseNotPressed(int minDelay) {
while (eventMan->pollEvent(event)) {
switch (event.type) {
- case OSystem::EVENT_KEYDOWN:
+ case Common::EVENT_KEYDOWN:
if (event.kbd.ascii == 27) {
minDelay = 0;
mousePressed = false;
diff --git a/engines/sky/screen.cpp b/engines/sky/screen.cpp
index c3495ee067..071dab2585 100644
--- a/engines/sky/screen.cpp
+++ b/engines/sky/screen.cpp
@@ -394,7 +394,7 @@ void Screen::waitForTimer(void) {
Common::EventManager *eventMan = _system->getEventManager();
_gotTick = false;
while (!_gotTick) {
- OSystem::Event event;
+ Common::Event event;
_system->delayMillis(10);
while (eventMan->pollEvent(event));
@@ -404,7 +404,7 @@ void Screen::waitForTimer(void) {
void Screen::waitForSequence(void) {
Common::EventManager *eventMan = _system->getEventManager();
while (_seqInfo.running) {
- OSystem::Event event;
+ Common::Event event;
_system->delayMillis(20);
while (eventMan->pollEvent(event));
diff --git a/engines/sky/sky.cpp b/engines/sky/sky.cpp
index 8b12043f76..7cf1566f35 100644
--- a/engines/sky/sky.cpp
+++ b/engines/sky/sky.cpp
@@ -222,7 +222,7 @@ void SkyEngine::handleKey(void) {
return;
}
- if (_keyFlags == OSystem::KBD_CTRL) {
+ if (_keyFlags == Common::KBD_CTRL) {
if (_keyPressed == 'f')
_fastMode ^= 1;
else if (_keyPressed == 'g')
@@ -512,7 +512,7 @@ void SkyEngine::gotTimerTick(void) {
void SkyEngine::delay(int32 amount) {
Common::EventManager *eventMan = _system->getEventManager();
- OSystem::Event event;
+ Common::Event event;
uint32 start = _system->getMillis();
_keyFlags = _keyPressed = 0; //reset
@@ -523,28 +523,28 @@ void SkyEngine::delay(int32 amount) {
do {
while (eventMan->pollEvent(event)) {
switch (event.type) {
- case OSystem::EVENT_KEYDOWN:
+ case Common::EVENT_KEYDOWN:
_keyFlags = event.kbd.flags;
- if (_keyFlags == OSystem::KBD_CTRL)
+ if (_keyFlags == Common::KBD_CTRL)
_keyPressed = event.kbd.keycode;
else
_keyPressed = (byte)event.kbd.ascii;
break;
- case OSystem::EVENT_MOUSEMOVE:
+ case Common::EVENT_MOUSEMOVE:
if (!(_systemVars.systemFlags & SF_MOUSE_LOCKED))
_skyMouse->mouseMoved(event.mouse.x, event.mouse.y);
break;
- case OSystem::EVENT_LBUTTONDOWN:
+ case Common::EVENT_LBUTTONDOWN:
if (!(_systemVars.systemFlags & SF_MOUSE_LOCKED))
_skyMouse->mouseMoved(event.mouse.x, event.mouse.y);
_skyMouse->buttonPressed(2);
break;
- case OSystem::EVENT_RBUTTONDOWN:
+ case Common::EVENT_RBUTTONDOWN:
if (!(_systemVars.systemFlags & SF_MOUSE_LOCKED))
_skyMouse->mouseMoved(event.mouse.x, event.mouse.y);
_skyMouse->buttonPressed(1);
break;
- case OSystem::EVENT_QUIT:
+ case Common::EVENT_QUIT:
_systemVars.quitGame = true;
break;
default: