aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorAndre Heider2009-02-21 22:00:24 +0000
committerAndre Heider2009-02-21 22:00:24 +0000
commit9ce5092be436f7b729772c66846369e60b5225f3 (patch)
treecaa0dd831ca705a796932466f0d78f583a9ebc09 /engines
parentdbafa5c45674dfc80e57448d8e75e17a65ac4509 (diff)
downloadscummvm-rg350-9ce5092be436f7b729772c66846369e60b5225f3.tar.gz
scummvm-rg350-9ce5092be436f7b729772c66846369e60b5225f3.tar.bz2
scummvm-rg350-9ce5092be436f7b729772c66846369e60b5225f3.zip
substituted some more sci_gettime
svn-id: r38749
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/gfx/operations.cpp18
1 files changed, 6 insertions, 12 deletions
diff --git a/engines/sci/gfx/operations.cpp b/engines/sci/gfx/operations.cpp
index 4be7009c33..0da172e096 100644
--- a/engines/sci/gfx/operations.cpp
+++ b/engines/sci/gfx/operations.cpp
@@ -28,6 +28,8 @@
#include "sci/include/sci_memory.h"
#include "sci/gfx/gfx_operations.h"
+#include "common/system.h"
+
#include <ctype.h>
namespace Sci {
@@ -1365,24 +1367,17 @@ static int _gfxop_full_pointer_refresh(gfx_state_t *state) {
}
int gfxop_usleep(gfx_state_t *state, long usecs) {
- long time, utime;
- long wakeup_time, wakeup_utime;
- long add_seconds;
+ uint32 time, wakeup_time;
int retval = GFX_OK;
BASIC_CHECKS(GFX_FATAL);
- sci_gettime(&wakeup_time, &wakeup_utime);
- wakeup_utime += usecs;
-
- add_seconds = (wakeup_utime / MILLION);
- wakeup_time += add_seconds;
- wakeup_utime -= (MILLION * add_seconds);
+ wakeup_time = g_system->getMillis() + usecs / 1000;
do {
GFXOP_FULL_POINTER_REFRESH;
- sci_gettime(&time, &utime);
- usecs = (wakeup_time - time) * MILLION + wakeup_utime - utime;
+ time = g_system->getMillis();
+ usecs = 1000l * (wakeup_time - time);
} while ((usecs > 0) && !(retval = state->driver->usec_sleep(state->driver, usecs)));
if (retval) {
@@ -1392,7 +1387,6 @@ int gfxop_usleep(gfx_state_t *state, long usecs) {
return retval;
}
-
int _gfxop_set_pointer(gfx_state_t *state, gfx_pixmap_t *pxm) {
rect_t old_pointer_bounds = {0, 0, 0, 0};
rect_t pointer_bounds = {0, 0, 0, 0};