aboutsummaryrefslogtreecommitdiff
path: root/engines/cine
diff options
context:
space:
mode:
authorEugene Sandulenko2006-03-23 03:40:23 +0000
committerEugene Sandulenko2006-03-23 03:40:23 +0000
commit6faa76d28758e9bea6e2cbfb8c7fa985c4bed1d5 (patch)
tree5c94e5ef4e7fbc5444bc6b7872f58818b6239fd8 /engines/cine
parentfced8df1621a44c2cfd94073db684e01d0ed1a2e (diff)
downloadscummvm-rg350-6faa76d28758e9bea6e2cbfb8c7fa985c4bed1d5.tar.gz
scummvm-rg350-6faa76d28758e9bea6e2cbfb8c7fa985c4bed1d5.tar.bz2
scummvm-rg350-6faa76d28758e9bea6e2cbfb8c7fa985c4bed1d5.zip
Made mouse more responsive
svn-id: r21413
Diffstat (limited to 'engines/cine')
-rw-r--r--engines/cine/gfx.cpp2
-rw-r--r--engines/cine/main_loop.cpp19
-rw-r--r--engines/cine/main_loop.h2
3 files changed, 15 insertions, 8 deletions
diff --git a/engines/cine/gfx.cpp b/engines/cine/gfx.cpp
index ea078aafe3..7e29e8ca0b 100644
--- a/engines/cine/gfx.cpp
+++ b/engines/cine/gfx.cpp
@@ -316,8 +316,6 @@ void gfxFlipRawPage(uint8 *frontBuffer) {
}
g_system->copyRectToScreen(screenBuffer, 320, 0, 0, 320, 200);
- g_system->updateScreen();
- g_system->delayMillis(100);
}
void drawSpriteRaw(uint8 *spritePtr, uint8 *maskPtr, int16 width, int16 height,
diff --git a/engines/cine/main_loop.cpp b/engines/cine/main_loop.cpp
index 1a90a1af9f..24227f169c 100644
--- a/engines/cine/main_loop.cpp
+++ b/engines/cine/main_loop.cpp
@@ -41,7 +41,7 @@ uint16 mouseLeft = 0;
uint16 mouseUpdateStatus;
uint16 dummyU16;
-void manageEvents(void) {
+void manageEvents(int count) {
OSystem::Event event;
while (g_system->pollEvent(event)) {
@@ -64,11 +64,20 @@ void manageEvents(void) {
}
}
- mouseData.left = mouseLeft;
- mouseData.right = mouseRight;
+ if (count) {
+ mouseData.left = mouseLeft;
+ mouseData.right = mouseRight;
+ mouseLeft = 0;
+ mouseRight = 0;
+ }
+
+ int i;
- mouseLeft = 0;
- mouseRight = 0;
+ for (i = 0; i < count; i++) {
+ g_system->updateScreen();
+ g_system->delayMillis(10);
+ manageEvents(0);
+ }
}
void getMouseData(uint16 param, uint16 *pButton, uint16 *pX, uint16 *pY) {
diff --git a/engines/cine/main_loop.h b/engines/cine/main_loop.h
index 0091808ea6..5cad29870c 100644
--- a/engines/cine/main_loop.h
+++ b/engines/cine/main_loop.h
@@ -28,7 +28,7 @@
namespace Cine {
void mainLoop(int bootScriptIdx);
-void manageEvents(void);
+void manageEvents(int count = 10);
} // End of namespace Cine