[Scummvm-cvs-logs] SF.net SVN: scummvm: [26156] scummvm/trunk
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Sat Mar 17 01:53:22 CET 2007
Revision: 26156
http://scummvm.svn.sourceforge.net/scummvm/?rev=26156&view=rev
Author: fingolfin
Date: 2007-03-16 17:53:21 -0700 (Fri, 16 Mar 2007)
Log Message:
-----------
Force all code to use EventManager::pollEvent instead of OSystem::pollEvent
Modified Paths:
--------------
scummvm/trunk/common/system.h
scummvm/trunk/engines/agi/agi.cpp
scummvm/trunk/engines/agos/animation.cpp
scummvm/trunk/engines/agos/event.cpp
scummvm/trunk/engines/cine/main_loop.cpp
scummvm/trunk/engines/gob/util.cpp
scummvm/trunk/engines/kyra/gui.cpp
scummvm/trunk/engines/kyra/kyra.cpp
scummvm/trunk/engines/kyra/sequences_v1.cpp
scummvm/trunk/engines/kyra/text.cpp
scummvm/trunk/engines/kyra/vqa.cpp
scummvm/trunk/engines/lure/events.cpp
scummvm/trunk/engines/parallaction/dialogue.cpp
scummvm/trunk/engines/parallaction/parallaction.cpp
scummvm/trunk/engines/queen/input.cpp
scummvm/trunk/engines/queen/journal.cpp
scummvm/trunk/engines/saga/input.cpp
scummvm/trunk/engines/scumm/input.cpp
scummvm/trunk/engines/scumm/scumm.cpp
scummvm/trunk/engines/sky/control.cpp
scummvm/trunk/engines/sky/intro.cpp
scummvm/trunk/engines/sky/mouse.cpp
scummvm/trunk/engines/sky/screen.cpp
scummvm/trunk/engines/sky/sky.cpp
scummvm/trunk/engines/sword1/animation.cpp
scummvm/trunk/engines/sword1/control.cpp
scummvm/trunk/engines/sword1/credits.cpp
scummvm/trunk/engines/sword1/sword1.cpp
scummvm/trunk/engines/sword2/animation.cpp
scummvm/trunk/engines/sword2/sword2.cpp
scummvm/trunk/engines/touche/touche.cpp
scummvm/trunk/engines/touche/ui.cpp
scummvm/trunk/gui/newgui.cpp
scummvm/trunk/sound/softsynth/mt32.cpp
Modified: scummvm/trunk/common/system.h
===================================================================
--- scummvm/trunk/common/system.h 2007-03-17 00:39:18 UTC (rev 26155)
+++ scummvm/trunk/common/system.h 2007-03-17 00:53:21 UTC (rev 26156)
@@ -680,9 +680,6 @@
/** @name Events and Time */
//@{
-//protected:
- friend class Common::EventManager;
-
/**
* The types of events backends may generate.
* @see Event
@@ -790,6 +787,9 @@
Common::Point mouse;
};
+protected:
+ friend class DefaultEventManager;
+
/**
* Get the next event in the event queue.
* @param event point to an Event struct, which will be filled with the event data.
Modified: scummvm/trunk/engines/agi/agi.cpp
===================================================================
--- scummvm/trunk/engines/agi/agi.cpp 2007-03-17 00:39:18 UTC (rev 26155)
+++ scummvm/trunk/engines/agi/agi.cpp 2007-03-17 00:53:21 UTC (rev 26156)
@@ -24,6 +24,7 @@
#include "common/stdafx.h"
+#include "common/events.h"
#include "common/file.h"
#include "common/fs.h"
#include "common/savefile.h"
@@ -56,12 +57,13 @@
OSystem::Event event;
int key = 0;
- while (g_system->pollEvent(event)) {
+ Common::EventManager *eventMan = _system->getEventManager();
+ while (eventMan->pollEvent(event)) {
switch (event.type) {
case OSystem::EVENT_QUIT:
_gfx->deinitVideo();
_gfx->deinitMachine();
- g_system->quit();
+ _system->quit();
break;
case OSystem::EVENT_LBUTTONDOWN:
key = BUTTON_LEFT;
@@ -236,8 +238,8 @@
processEvents();
if (_console->isAttached())
_console->onFrame();
- g_system->delayMillis(10);
- g_system->updateScreen();
+ _system->delayMillis(10);
+ _system->updateScreen();
}
m = g_tickTimer;
}
Modified: scummvm/trunk/engines/agos/animation.cpp
===================================================================
--- scummvm/trunk/engines/agos/animation.cpp 2007-03-17 00:39:18 UTC (rev 26155)
+++ scummvm/trunk/engines/agos/animation.cpp 2007-03-17 00:53:21 UTC (rev 26156)
@@ -24,6 +24,7 @@
#include "common/stdafx.h"
#include "common/endian.h"
+#include "common/events.h"
#include "common/system.h"
#include "graphics/cursorman.h"
@@ -233,7 +234,8 @@
_frameNum++;
OSystem::Event event;
- while (_vm->_system->pollEvent(event)) {
+ Common::EventManager *eventMan = _vm->_system->getEventManager();
+ while (eventMan->pollEvent(event)) {
switch (event.type) {
case OSystem::EVENT_KEYDOWN:
if (event.kbd.ascii == 27) {
Modified: scummvm/trunk/engines/agos/event.cpp
===================================================================
--- scummvm/trunk/engines/agos/event.cpp 2007-03-17 00:39:18 UTC (rev 26155)
+++ scummvm/trunk/engines/agos/event.cpp 2007-03-17 00:53:21 UTC (rev 26156)
@@ -27,6 +27,7 @@
#include "agos/debugger.h"
#include "agos/intern.h"
+#include "common/events.h"
#include "common/system.h"
#include "gui/about.h"
@@ -331,7 +332,8 @@
_inCallBack = false;
}
- while (_system->pollEvent(event)) {
+ Common::EventManager *eventMan = _system->getEventManager();
+ while (eventMan->pollEvent(event)) {
switch (event.type) {
case OSystem::EVENT_KEYDOWN:
if (event.kbd.keycode >= '0' && event.kbd.keycode <='9'
Modified: scummvm/trunk/engines/cine/main_loop.cpp
===================================================================
--- scummvm/trunk/engines/cine/main_loop.cpp 2007-03-17 00:39:18 UTC (rev 26155)
+++ scummvm/trunk/engines/cine/main_loop.cpp 2007-03-17 00:53:21 UTC (rev 26156)
@@ -24,6 +24,7 @@
#include "common/stdafx.h"
#include "common/scummsys.h"
+#include "common/events.h"
#include "common/system.h"
#include "cine/main_loop.h"
@@ -47,7 +48,8 @@
void manageEvents(int count) {
OSystem::Event event;
- while (g_system->pollEvent(event)) {
+ Common::EventManager *eventMan = g_system->getEventManager();
+ while (eventMan->pollEvent(event)) {
switch (event.type) {
case OSystem::EVENT_LBUTTONDOWN:
mouseLeft = 1;
Modified: scummvm/trunk/engines/gob/util.cpp
===================================================================
--- scummvm/trunk/engines/gob/util.cpp 2007-03-17 00:39:18 UTC (rev 26155)
+++ scummvm/trunk/engines/gob/util.cpp 2007-03-17 00:53:21 UTC (rev 26156)
@@ -28,6 +28,8 @@
#include "gob/game.h"
#include "gob/inter.h"
+#include "common/events.h"
+
namespace Gob {
Util::Util(GobEngine *vm) : _vm(vm) {
@@ -139,7 +141,8 @@
void Util::processInput() {
OSystem::Event event;
- while (g_system->pollEvent(event)) {
+ Common::EventManager *eventMan = g_system->getEventManager();
+ while (eventMan->pollEvent(event)) {
switch (event.type) {
case OSystem::EVENT_MOUSEMOVE:
_mouseX = event.mouse.x;
Modified: scummvm/trunk/engines/kyra/gui.cpp
===================================================================
--- scummvm/trunk/engines/kyra/gui.cpp 2007-03-17 00:39:18 UTC (rev 26155)
+++ scummvm/trunk/engines/kyra/gui.cpp 2007-03-17 00:53:21 UTC (rev 26156)
@@ -29,6 +29,7 @@
#include "common/config-manager.h"
#include "common/savefile.h"
+#include "common/events.h"
#include "common/system.h"
namespace Kyra {
@@ -805,7 +806,8 @@
uint32 now = _system->getMillis();
_mouseWheel = 0;
- while (_system->pollEvent(event)) {
+ Common::EventManager *eventMan = _system->getEventManager();
+ while (eventMan->pollEvent(event)) {
switch (event.type) {
case OSystem::EVENT_QUIT:
quitGame();
@@ -1481,7 +1483,8 @@
bool KyraEngine::gui_mainMenuGetInput() {
OSystem::Event event;
- while (_system->pollEvent(event)) {
+ Common::EventManager *eventMan = _system->getEventManager();
+ while (eventMan->pollEvent(event)) {
switch (event.type) {
case OSystem::EVENT_QUIT:
quitGame();
Modified: scummvm/trunk/engines/kyra/kyra.cpp
===================================================================
--- scummvm/trunk/engines/kyra/kyra.cpp 2007-03-17 00:39:18 UTC (rev 26155)
+++ scummvm/trunk/engines/kyra/kyra.cpp 2007-03-17 00:53:21 UTC (rev 26156)
@@ -24,6 +24,7 @@
#include "common/config-manager.h"
#include "common/file.h"
+#include "common/events.h"
#include "common/system.h"
#include "common/savefile.h"
@@ -608,7 +609,8 @@
uint32 start = _system->getMillis();
do {
- while (_system->pollEvent(event)) {
+ Common::EventManager *eventMan = _system->getEventManager();
+ while (eventMan->pollEvent(event)) {
switch (event.type) {
case OSystem::EVENT_KEYDOWN:
if (event.kbd.keycode >= '1' && event.kbd.keycode <= '9' &&
@@ -705,7 +707,8 @@
bool finished = false;
OSystem::Event event;
while (!finished && !_quitFlag) {
- while (_system->pollEvent(event)) {
+ Common::EventManager *eventMan = _system->getEventManager();
+ while (eventMan->pollEvent(event)) {
switch (event.type) {
case OSystem::EVENT_KEYDOWN:
finished = true;
Modified: scummvm/trunk/engines/kyra/sequences_v1.cpp
===================================================================
--- scummvm/trunk/engines/kyra/sequences_v1.cpp 2007-03-17 00:39:18 UTC (rev 26155)
+++ scummvm/trunk/engines/kyra/sequences_v1.cpp 2007-03-17 00:53:21 UTC (rev 26156)
@@ -30,6 +30,7 @@
#include "kyra/animator.h"
#include "kyra/text.h"
+#include "common/events.h"
#include "common/system.h"
#include "common/savefile.h"
@@ -1170,7 +1171,8 @@
_screen->updateScreen();
}
- while (_system->pollEvent(event)) {
+ Common::EventManager *eventMan = _system->getEventManager();
+ while (eventMan->pollEvent(event)) {
switch (event.type) {
case OSystem::EVENT_KEYDOWN:
finished = true;
Modified: scummvm/trunk/engines/kyra/text.cpp
===================================================================
--- scummvm/trunk/engines/kyra/text.cpp 2007-03-17 00:39:18 UTC (rev 26155)
+++ scummvm/trunk/engines/kyra/text.cpp 2007-03-17 00:53:21 UTC (rev 26156)
@@ -28,6 +28,7 @@
#include "kyra/animator.h"
#include "kyra/sprites.h"
+#include "common/events.h"
#include "common/system.h"
#include "common/endian.h"
@@ -117,7 +118,8 @@
uint32 nextTime = loopStart + _tickLength;
while (_system->getMillis() < nextTime) {
- while (_system->pollEvent(event)) {
+ Common::EventManager *eventMan = _system->getEventManager();
+ while (eventMan->pollEvent(event)) {
switch (event.type) {
case OSystem::EVENT_KEYDOWN:
if (event.kbd.keycode == '.')
Modified: scummvm/trunk/engines/kyra/vqa.cpp
===================================================================
--- scummvm/trunk/engines/kyra/vqa.cpp 2007-03-17 00:39:18 UTC (rev 26155)
+++ scummvm/trunk/engines/kyra/vqa.cpp 2007-03-17 00:53:21 UTC (rev 26156)
@@ -29,6 +29,7 @@
// The jung2.vqa movie does work, but only thanks to a grotesque hack.
#include "common/stdafx.h"
+#include "common/events.h"
#include "common/system.h"
#include "sound/audiostream.h"
#include "sound/mixer.h"
@@ -662,7 +663,8 @@
OSystem::Event event;
- while (_system->pollEvent(event)) {
+ Common::EventManager *eventMan = _system->getEventManager();
+ while (eventMan->pollEvent(event)) {
switch (event.type) {
case OSystem::EVENT_KEYDOWN:
if (event.kbd.ascii == 27)
Modified: scummvm/trunk/engines/lure/events.cpp
===================================================================
--- scummvm/trunk/engines/lure/events.cpp 2007-03-17 00:39:18 UTC (rev 26155)
+++ scummvm/trunk/engines/lure/events.cpp 2007-03-17 00:53:21 UTC (rev 26156)
@@ -20,6 +20,9 @@
*
*/
+#include "common/stdafx.h"
+#include "common/events.h"
+
#include "graphics/cursorman.h"
#include "lure/events.h"
@@ -146,7 +149,7 @@
bool Events::pollEvent() {
- if (!g_system->pollEvent(_event)) return false;
+ if (!g_system->getEventManager()->pollEvent(_event)) return false;
// Handle keypress
switch (_event.type) {
Modified: scummvm/trunk/engines/parallaction/dialogue.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/dialogue.cpp 2007-03-17 00:39:18 UTC (rev 26155)
+++ scummvm/trunk/engines/parallaction/dialogue.cpp 2007-03-17 00:53:21 UTC (rev 26156)
@@ -28,6 +28,8 @@
#include "parallaction/parser.h"
#include "parallaction/zone.h"
+#include "common/events.h"
+
namespace Parallaction {
#define SKIPPED_ANSWER 1000
@@ -433,7 +435,7 @@
while (e.kbd.ascii != 0xD && passwordLen < MAX_PASSWORD_LENGTH) {
// FIXME: see comment for updateInput()
- if (!g_system->pollEvent(e)) continue;
+ if (!g_system->getEventManager()->pollEvent(e)) continue;
if (e.type != OSystem::EVENT_KEYDOWN) continue;
if (e.type != OSystem::EVENT_QUIT) g_system->quit();
if (!isdigit(e.kbd.ascii)) continue;
Modified: scummvm/trunk/engines/parallaction/parallaction.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/parallaction.cpp 2007-03-17 00:39:18 UTC (rev 26155)
+++ scummvm/trunk/engines/parallaction/parallaction.cpp 2007-03-17 00:53:21 UTC (rev 26156)
@@ -22,9 +22,10 @@
#include "common/stdafx.h"
+#include "common/config-manager.h"
+#include "common/events.h"
+#include "common/file.h"
#include "common/util.h"
-#include "common/file.h"
-#include "common/config-manager.h"
#include "sound/mididrv.h"
#include "sound/mixer.h"
@@ -326,7 +327,8 @@
_mouseButtons = kMouseNone;
- while (g_system->pollEvent(e)) {
+ Common::EventManager *eventMan = _system->getEventManager();
+ while (eventMan->pollEvent(e)) {
switch (e.type) {
case OSystem::EVENT_KEYDOWN:
@@ -375,8 +377,9 @@
OSystem::Event e;
+ Common::EventManager *eventMan = g_system->getEventManager();
for (;;) {
- g_system->pollEvent(e);
+ eventMan->pollEvent(e);
if (e.type == OSystem::EVENT_LBUTTONUP)
break;
Modified: scummvm/trunk/engines/queen/input.cpp
===================================================================
--- scummvm/trunk/engines/queen/input.cpp 2007-03-17 00:39:18 UTC (rev 26155)
+++ scummvm/trunk/engines/queen/input.cpp 2007-03-17 00:53:21 UTC (rev 26156)
@@ -21,6 +21,7 @@
*/
#include "common/stdafx.h"
+#include "common/events.h"
#include "common/system.h"
#include "queen/input.h"
@@ -91,7 +92,8 @@
uint32 end = _system->getMillis() + amount;
do {
OSystem::Event event;
- while (_system->pollEvent(event)) {
+ Common::EventManager *eventMan = _system->getEventManager();
+ while (eventMan->pollEvent(event)) {
_idleTime = 0;
switch (event.type) {
case OSystem::EVENT_KEYDOWN:
Modified: scummvm/trunk/engines/queen/journal.cpp
===================================================================
--- scummvm/trunk/engines/queen/journal.cpp 2007-03-17 00:39:18 UTC (rev 26155)
+++ scummvm/trunk/engines/queen/journal.cpp 2007-03-17 00:53:21 UTC (rev 26156)
@@ -21,6 +21,7 @@
*/
#include "common/stdafx.h"
+#include "common/events.h"
#include "common/system.h"
#include "queen/journal.h"
@@ -65,7 +66,8 @@
_quitMode = QM_LOOP;
while (_quitMode == QM_LOOP) {
OSystem::Event event;
- while (_system->pollEvent(event)) {
+ Common::EventManager *eventMan = _system->getEventManager();
+ while (eventMan->pollEvent(event)) {
switch (event.type) {
case OSystem::EVENT_KEYDOWN:
handleKeyDown(event.kbd.ascii, event.kbd.keycode);
Modified: scummvm/trunk/engines/saga/input.cpp
===================================================================
--- scummvm/trunk/engines/saga/input.cpp 2007-03-17 00:39:18 UTC (rev 26155)
+++ scummvm/trunk/engines/saga/input.cpp 2007-03-17 00:53:21 UTC (rev 26156)
@@ -32,6 +32,7 @@
#include "saga/script.h"
#include "saga/isomap.h"
+#include "common/events.h"
#include "common/system.h"
namespace Saga {
@@ -41,7 +42,8 @@
// Point imousePt;
- while (g_system->pollEvent(event)) {
+ Common::EventManager *eventMan = _system->getEventManager();
+ while (eventMan->pollEvent(event)) {
switch (event.type) {
case OSystem::EVENT_KEYDOWN:
if (event.kbd.flags == OSystem::KBD_CTRL) {
Modified: scummvm/trunk/engines/scumm/input.cpp
===================================================================
--- scummvm/trunk/engines/scumm/input.cpp 2007-03-17 00:39:18 UTC (rev 26155)
+++ scummvm/trunk/engines/scumm/input.cpp 2007-03-17 00:53:21 UTC (rev 26156)
@@ -24,6 +24,7 @@
#include "common/stdafx.h"
#include "common/config-manager.h"
+#include "common/events.h"
#include "common/system.h"
#include "gui/message.h"
@@ -56,7 +57,8 @@
void ScummEngine::parseEvents() {
OSystem::Event event;
- while (_system->pollEvent(event)) {
+ Common::EventManager *eventMan = _system->getEventManager();
+ while (eventMan->pollEvent(event)) {
switch (event.type) {
case OSystem::EVENT_KEYDOWN:
Modified: scummvm/trunk/engines/scumm/scumm.cpp
===================================================================
--- scummvm/trunk/engines/scumm/scumm.cpp 2007-03-17 00:39:18 UTC (rev 26155)
+++ scummvm/trunk/engines/scumm/scumm.cpp 2007-03-17 00:53:21 UTC (rev 26156)
@@ -26,6 +26,7 @@
#include "common/config-manager.h"
#include "common/fs.h"
#include "common/md5.h"
+#include "common/events.h"
#include "common/system.h"
#include "gui/message.h"
@@ -850,7 +851,8 @@
void ScummEngine_vCUPhe::parseEvents() {
OSystem::Event event;
- while (_system->pollEvent(event)) {
+ Common::EventManager *eventMan = _system->getEventManager();
+ while (eventMan->pollEvent(event)) {
switch (event.type) {
case OSystem::EVENT_QUIT:
_quit = true;
Modified: scummvm/trunk/engines/sky/control.cpp
===================================================================
--- scummvm/trunk/engines/sky/control.cpp 2007-03-17 00:39:18 UTC (rev 26155)
+++ scummvm/trunk/engines/sky/control.cpp 2007-03-17 00:53:21 UTC (rev 26156)
@@ -24,6 +24,7 @@
#include "common/endian.h"
#include "common/config-manager.h"
#include "common/file.h"
+#include "common/events.h"
#include "common/system.h"
#include "common/savefile.h"
#include "common/util.h"
@@ -1550,7 +1551,8 @@
_keyPressed = 0; //reset
do {
- while (_system->pollEvent(event)) {
+ Common::EventManager *eventMan = _system->getEventManager();
+ while (eventMan->pollEvent(event)) {
switch (event.type) {
case OSystem::EVENT_KEYDOWN:
// Make sure backspace works right (this fixes a small issue on OS X)
Modified: scummvm/trunk/engines/sky/intro.cpp
===================================================================
--- scummvm/trunk/engines/sky/intro.cpp 2007-03-17 00:39:18 UTC (rev 26155)
+++ scummvm/trunk/engines/sky/intro.cpp 2007-03-17 00:53:21 UTC (rev 26156)
@@ -23,6 +23,7 @@
#include "common/stdafx.h"
#include "common/endian.h"
#include "common/util.h"
+#include "common/events.h"
#include "common/system.h"
#include "sky/disk.h"
@@ -906,7 +907,8 @@
int32 nDelay = 0;
do {
- while (_system->pollEvent(event)) {
+ Common::EventManager *eventMan = _system->getEventManager();
+ while (eventMan->pollEvent(event)) {
if (event.type == OSystem::EVENT_KEYDOWN) {
if (event.kbd.keycode == 27)
return false;
Modified: scummvm/trunk/engines/sky/mouse.cpp
===================================================================
--- scummvm/trunk/engines/sky/mouse.cpp 2007-03-17 00:39:18 UTC (rev 26155)
+++ scummvm/trunk/engines/sky/mouse.cpp 2007-03-17 00:53:21 UTC (rev 26156)
@@ -21,6 +21,7 @@
*/
#include "common/stdafx.h"
+#include "common/events.h"
#include "common/system.h"
#include "graphics/cursorman.h"
#include "sky/disk.h"
@@ -173,7 +174,8 @@
uint32 now = _system->getMillis();
OSystem::Event event;
while (mousePressed || _system->getMillis() < now + minDelay) {
- while (_system->pollEvent(event)) {
+ Common::EventManager *eventMan = _system->getEventManager();
+ while (eventMan->pollEvent(event)) {
switch (event.type) {
case OSystem::EVENT_LBUTTONUP:
mousePressed = false;
Modified: scummvm/trunk/engines/sky/screen.cpp
===================================================================
--- scummvm/trunk/engines/sky/screen.cpp 2007-03-17 00:39:18 UTC (rev 26155)
+++ scummvm/trunk/engines/sky/screen.cpp 2007-03-17 00:53:21 UTC (rev 26156)
@@ -22,6 +22,7 @@
#include "common/stdafx.h"
#include "common/endian.h"
+#include "common/events.h"
#include "common/system.h"
#include "sky/disk.h"
@@ -395,7 +396,8 @@
OSystem::Event event;
_system->delayMillis(10);
- while (_system->pollEvent(event));
+ Common::EventManager *eventMan = _system->getEventManager();
+ while (eventMan->pollEvent(event));
}
}
@@ -404,7 +406,8 @@
OSystem::Event event;
_system->delayMillis(20);
- while (_system->pollEvent(event));
+ Common::EventManager *eventMan = _system->getEventManager();
+ while (eventMan->pollEvent(event));
}
}
Modified: scummvm/trunk/engines/sky/sky.cpp
===================================================================
--- scummvm/trunk/engines/sky/sky.cpp 2007-03-17 00:39:18 UTC (rev 26155)
+++ scummvm/trunk/engines/sky/sky.cpp 2007-03-17 00:53:21 UTC (rev 26156)
@@ -27,6 +27,7 @@
#include "common/config-manager.h"
#include "common/file.h"
#include "common/fs.h"
+#include "common/events.h"
#include "common/system.h"
#include "common/timer.h"
@@ -519,7 +520,8 @@
amount = 0;
do {
- while (_system->pollEvent(event)) {
+ Common::EventManager *eventMan = _system->getEventManager();
+ while (eventMan->pollEvent(event)) {
switch (event.type) {
case OSystem::EVENT_KEYDOWN:
_keyFlags = event.kbd.flags;
Modified: scummvm/trunk/engines/sword1/animation.cpp
===================================================================
--- scummvm/trunk/engines/sword1/animation.cpp 2007-03-17 00:39:18 UTC (rev 26155)
+++ scummvm/trunk/engines/sword1/animation.cpp 2007-03-17 00:53:21 UTC (rev 26156)
@@ -30,6 +30,7 @@
#include "common/config-manager.h"
#include "common/endian.h"
#include "common/str.h"
+#include "common/events.h"
#include "common/system.h"
namespace Sword1 {
@@ -193,13 +194,14 @@
}
_currentFrame = 0;
bool terminated = false;
+ Common::EventManager *eventMan = _sys->getEventManager();
while (!terminated && decodeFrame()) {
processFrame();
syncFrame();
updateScreen();
_currentFrame++;
OSystem::Event event;
- while (_sys->pollEvent(event)) {
+ while (eventMan->pollEvent(event)) {
switch (event.type) {
case OSystem::EVENT_SCREEN_CHANGED:
handleScreenChanged();
Modified: scummvm/trunk/engines/sword1/control.cpp
===================================================================
--- scummvm/trunk/engines/sword1/control.cpp 2007-03-17 00:39:18 UTC (rev 26155)
+++ scummvm/trunk/engines/sword1/control.cpp 2007-03-17 00:53:21 UTC (rev 26156)
@@ -24,6 +24,7 @@
#include "common/file.h"
#include "common/util.h"
#include "common/savefile.h"
+#include "common/events.h"
#include "common/system.h"
#include "gui/message.h"
@@ -1042,7 +1043,8 @@
_mouseState = 0;
do {
- while (_system->pollEvent(event)) {
+ Common::EventManager *eventMan = _system->getEventManager();
+ while (eventMan->pollEvent(event)) {
switch (event.type) {
case OSystem::EVENT_KEYDOWN:
Modified: scummvm/trunk/engines/sword1/credits.cpp
===================================================================
--- scummvm/trunk/engines/sword1/credits.cpp 2007-03-17 00:39:18 UTC (rev 26155)
+++ scummvm/trunk/engines/sword1/credits.cpp 2007-03-17 00:53:21 UTC (rev 26156)
@@ -32,6 +32,7 @@
#include "common/file.h"
#include "common/util.h"
+#include "common/events.h"
#include "common/system.h"
@@ -274,7 +275,8 @@
OSystem::Event event;
uint32 start = _system->getMillis();
do {
- while (_system->pollEvent(event)) {
+ Common::EventManager *eventMan = _system->getEventManager();
+ while (eventMan->pollEvent(event)) {
switch (event.type) {
case OSystem::EVENT_QUIT:
SwordEngine::_systemVars.engineQuit = true;
Modified: scummvm/trunk/engines/sword1/sword1.cpp
===================================================================
--- scummvm/trunk/engines/sword1/sword1.cpp 2007-03-17 00:39:18 UTC (rev 26155)
+++ scummvm/trunk/engines/sword1/sword1.cpp 2007-03-17 00:53:21 UTC (rev 26156)
@@ -28,6 +28,7 @@
#include "common/file.h"
#include "common/fs.h"
#include "common/timer.h"
+#include "common/events.h"
#include "common/system.h"
#include "sword1/resman.h"
@@ -705,7 +706,8 @@
uint32 start = _system->getMillis();
do {
- while (_system->pollEvent(event)) {
+ Common::EventManager *eventMan = _system->getEventManager();
+ while (eventMan->pollEvent(event)) {
switch (event.type) {
case OSystem::EVENT_KEYDOWN:
// Make sure backspace works right (this fixes a small issue on OS X)
Modified: scummvm/trunk/engines/sword2/animation.cpp
===================================================================
--- scummvm/trunk/engines/sword2/animation.cpp 2007-03-17 00:39:18 UTC (rev 26155)
+++ scummvm/trunk/engines/sword2/animation.cpp 2007-03-17 00:53:21 UTC (rev 26156)
@@ -22,6 +22,7 @@
#include "common/stdafx.h"
#include "common/config-manager.h"
#include "common/file.h"
+#include "common/events.h"
#include "common/system.h"
#include "sword2/sword2.h"
@@ -408,7 +409,8 @@
OSystem::Event event;
- while (_system->pollEvent(event)) {
+ Common::EventManager *eventMan = _system->getEventManager();
+ while (eventMan->pollEvent(event)) {
switch (event.type) {
case OSystem::EVENT_SCREEN_CHANGED:
handleScreenChanged();
Modified: scummvm/trunk/engines/sword2/sword2.cpp
===================================================================
--- scummvm/trunk/engines/sword2/sword2.cpp 2007-03-17 00:39:18 UTC (rev 26155)
+++ scummvm/trunk/engines/sword2/sword2.cpp 2007-03-17 00:53:21 UTC (rev 26156)
@@ -26,6 +26,7 @@
#include "common/config-manager.h"
#include "common/file.h"
#include "common/fs.h"
+#include "common/events.h"
#include "common/system.h"
#include "sword2/sword2.h"
@@ -540,7 +541,8 @@
uint32 now = _system->getMillis();
- while (_system->pollEvent(event)) {
+ Common::EventManager *eventMan = _system->getEventManager();
+ while (eventMan->pollEvent(event)) {
switch (event.type) {
case OSystem::EVENT_KEYDOWN:
if (event.kbd.flags == OSystem::KBD_CTRL) {
Modified: scummvm/trunk/engines/touche/touche.cpp
===================================================================
--- scummvm/trunk/engines/touche/touche.cpp 2007-03-17 00:39:18 UTC (rev 26155)
+++ scummvm/trunk/engines/touche/touche.cpp 2007-03-17 00:53:21 UTC (rev 26156)
@@ -22,6 +22,7 @@
#include "common/stdafx.h"
#include "common/config-manager.h"
+#include "common/events.h"
#include "common/system.h"
#include "sound/mididrv.h"
@@ -275,7 +276,8 @@
void ToucheEngine::processEvents(bool handleKeyEvents) {
OSystem::Event event;
- while (_system->pollEvent(event)) {
+ Common::EventManager *eventMan = _system->getEventManager();
+ while (eventMan->pollEvent(event)) {
switch (event.type) {
case OSystem::EVENT_QUIT:
_flagsTable[611] = 1;
Modified: scummvm/trunk/engines/touche/ui.cpp
===================================================================
--- scummvm/trunk/engines/touche/ui.cpp 2007-03-17 00:39:18 UTC (rev 26155)
+++ scummvm/trunk/engines/touche/ui.cpp 2007-03-17 00:53:21 UTC (rev 26156)
@@ -21,6 +21,7 @@
*/
#include "common/stdafx.h"
+#include "common/events.h"
#include "common/system.h"
#include "common/savefile.h"
@@ -377,7 +378,8 @@
}
redrawMenu(&menuData);
OSystem::Event event;
- while (_system->pollEvent(event)) {
+ Common::EventManager *eventMan = _system->getEventManager();
+ while (eventMan->pollEvent(event)) {
const Button *button = 0;
switch (event.type) {
case OSystem::EVENT_QUIT:
@@ -535,7 +537,8 @@
bool quitLoop = false;
while (!quitLoop) {
OSystem::Event event;
- while (_system->pollEvent(event)) {
+ Common::EventManager *eventMan = _system->getEventManager();
+ while (eventMan->pollEvent(event)) {
switch (event.type) {
case OSystem::EVENT_QUIT:
quitLoop = true;
Modified: scummvm/trunk/gui/newgui.cpp
===================================================================
--- scummvm/trunk/gui/newgui.cpp 2007-03-17 00:39:18 UTC (rev 26155)
+++ scummvm/trunk/gui/newgui.cpp 2007-03-17 00:53:21 UTC (rev 26156)
@@ -20,6 +20,7 @@
*/
#include "common/stdafx.h"
+#include "common/events.h"
#include "common/system.h"
#include "common/util.h"
#include "graphics/cursorman.h"
@@ -227,6 +228,8 @@
if (_useStdCursor)
setupCursor();
}
+
+ Common::EventManager *eventMan = _system->getEventManager();
while (!_dialogStack.empty() && activeDialog == getTopDialog()) {
if (_needRedraw) {
@@ -247,7 +250,7 @@
OSystem::Event event;
uint32 time = _system->getMillis();
- while (_system->pollEvent(event)) {
+ while (eventMan->pollEvent(event)) {
if (activeDialog != getTopDialog() && event.type != OSystem::EVENT_QUIT && event.type != OSystem::EVENT_SCREEN_CHANGED)
continue;
Modified: scummvm/trunk/sound/softsynth/mt32.cpp
===================================================================
--- scummvm/trunk/sound/softsynth/mt32.cpp 2007-03-17 00:39:18 UTC (rev 26155)
+++ scummvm/trunk/sound/softsynth/mt32.cpp 2007-03-17 00:53:21 UTC (rev 26156)
@@ -29,10 +29,11 @@
#include "sound/softsynth/emumidi.h"
#include "sound/mpu401.h"
-#include "common/util.h"
+#include "common/config-manager.h"
+#include "common/events.h"
#include "common/file.h"
-#include "common/config-manager.h"
#include "common/system.h"
+#include "common/util.h"
#include "graphics/fontman.h"
#include "graphics/surface.h"
@@ -112,7 +113,8 @@
static int eatSystemEvents() {
OSystem::Event event;
- while (g_system->pollEvent(event)) {
+ Common::EventManager *eventMan = g_system->getEventManager();
+ while (eventMan->pollEvent(event)) {
switch (event.type) {
case OSystem::EVENT_QUIT:
return 1;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list