aboutsummaryrefslogtreecommitdiff
path: root/sword2
diff options
context:
space:
mode:
Diffstat (limited to 'sword2')
-rw-r--r--sword2/build_display.cpp8
-rw-r--r--sword2/console.cpp4
-rw-r--r--sword2/controls.cpp2
-rw-r--r--sword2/debug.cpp2
-rw-r--r--sword2/driver/animation.cpp10
-rw-r--r--sword2/driver/d_sound.cpp2
-rw-r--r--sword2/driver/menu.cpp4
-rw-r--r--sword2/driver/palette.cpp8
-rw-r--r--sword2/driver/render.cpp10
-rw-r--r--sword2/function.cpp6
-rw-r--r--sword2/sword2.cpp6
11 files changed, 31 insertions, 31 deletions
diff --git a/sword2/build_display.cpp b/sword2/build_display.cpp
index 758a60d3fc..dd000590e0 100644
--- a/sword2/build_display.cpp
+++ b/sword2/build_display.cpp
@@ -102,10 +102,10 @@ void Sword2Engine::buildDisplay(void) {
_graphics->updateDisplay();
_frameCount++;
- if (_system->get_msecs() > _cycleTime) {
+ if (_system->getMillis() > _cycleTime) {
_fps = _frameCount;
_frameCount = 0;
- _cycleTime = _system->get_msecs() + 1000;
+ _cycleTime = _system->getMillis() + 1000;
}
} while (!_graphics->endRenderCycle());
@@ -173,7 +173,7 @@ void Sword2Engine::displayMsg(byte *text, int time) {
_graphics->waitForFade();
if (time > 0) {
- uint32 targetTime = _system->get_msecs() + (time * 1000);
+ uint32 targetTime = _system->getMillis() + (time * 1000);
sleepUntil(targetTime);
} else {
while (!_quit) {
@@ -185,7 +185,7 @@ void Sword2Engine::displayMsg(byte *text, int time) {
break;
_graphics->updateDisplay();
- _system->delay_msecs(50);
+ _system->delayMillis(50);
}
}
diff --git a/sword2/console.cpp b/sword2/console.cpp
index 990807712c..efedb92490 100644
--- a/sword2/console.cpp
+++ b/sword2/console.cpp
@@ -368,9 +368,9 @@ bool Debugger::Cmd_SaveRest(int argc, const char **argv) {
bool Debugger::Cmd_TimeOn(int argc, const char **argv) {
if (argc == 2)
- _startTime = _vm->_system->get_msecs() - atoi(argv[1]) * 1000;
+ _startTime = _vm->_system->getMillis() - atoi(argv[1]) * 1000;
else if (_startTime == 0)
- _startTime = _vm->_system->get_msecs();
+ _startTime = _vm->_system->getMillis();
_displayTime = true;
DebugPrintf("Timer display on\n");
return true;
diff --git a/sword2/controls.cpp b/sword2/controls.cpp
index 452dff64f4..77700f6129 100644
--- a/sword2/controls.cpp
+++ b/sword2/controls.cpp
@@ -401,7 +401,7 @@ int Dialog::run() {
oldMouseX = newMouseX;
oldMouseY = newMouseY;
- _gui->_vm->_system->delay_msecs(20);
+ _gui->_vm->_system->delayMillis(20);
if (_gui->_vm->_quit)
setResult(0);
diff --git a/sword2/debug.cpp b/sword2/debug.cpp
index 97b5d5f6ba..347f14630a 100644
--- a/sword2/debug.cpp
+++ b/sword2/debug.cpp
@@ -112,7 +112,7 @@ void Debugger::buildDebugText(void) {
// debug info at top of screen - enabled/disabled as one complete unit
if (_displayTime) {
- int32 time = _vm->_system->get_msecs();
+ int32 time = _vm->_system->getMillis();
if ((time - _startTime) / 1000 >= 10000)
_startTime = time;
diff --git a/sword2/driver/animation.cpp b/sword2/driver/animation.cpp
index bc68b2e0f0..69dbc0289a 100644
--- a/sword2/driver/animation.cpp
+++ b/sword2/driver/animation.cpp
@@ -254,7 +254,7 @@ int32 MoviePlayer::play(const char *filename, MovieTextObject *text[], byte *mus
_vm->_sound->playFx(0, musicOut, 0, 0, RDSE_FXLEADOUT);
OSystem::Event event;
- while (_sys->poll_event(&event)) {
+ while (_sys->pollEvent(event)) {
switch (event.event_code) {
#ifndef BACKEND_8BIT
case OSystem::EVENT_SCREEN_CHANGED:
@@ -277,7 +277,7 @@ int32 MoviePlayer::play(const char *filename, MovieTextObject *text[], byte *mus
if (!skipCutscene) {
// Sleep for one frame so that the last frame is displayed.
- _sys->delay_msecs(1000 / 12);
+ _sys->delayMillis(1000 / 12);
}
// Most movies fade to black on their own, but not all of them. Since
@@ -307,7 +307,7 @@ int32 MoviePlayer::play(const char *filename, MovieTextObject *text[], byte *mus
while (handle.isActive()) {
_vm->_graphics->updateDisplay(false);
- _sys->delay_msecs(100);
+ _sys->delayMillis(100);
}
// Clear the screen again
@@ -436,7 +436,7 @@ int32 MoviePlayer::playDummy(const char *filename, MovieTextObject *text[], byte
// frame rate the original movies had, or even if it
// was constant, but this seems to work reasonably.
- _sys->delay_msecs(90);
+ _sys->delayMillis(90);
}
// Wait for the voice to stop playing. This is to make sure
@@ -446,7 +446,7 @@ int32 MoviePlayer::playDummy(const char *filename, MovieTextObject *text[], byte
while (handle.isActive()) {
_vm->_graphics->updateDisplay(false);
- _sys->delay_msecs(100);
+ _sys->delayMillis(100);
}
closeTextObject(text[textCounter]);
diff --git a/sword2/driver/d_sound.cpp b/sword2/driver/d_sound.cpp
index 35fc9a076c..4c38326b2e 100644
--- a/sword2/driver/d_sound.cpp
+++ b/sword2/driver/d_sound.cpp
@@ -663,7 +663,7 @@ void Sound::waitForLeadOut(void) {
while (_fx[i]._handle.isActive()) {
_vm->_graphics->updateDisplay();
- _vm->_system->delay_msecs(30);
+ _vm->_system->delayMillis(30);
}
}
diff --git a/sword2/driver/menu.cpp b/sword2/driver/menu.cpp
index 8fa68791db..a58f84540e 100644
--- a/sword2/driver/menu.cpp
+++ b/sword2/driver/menu.cpp
@@ -55,10 +55,10 @@ void Graphics::processMenu(void) {
static int32 lastTime = 0;
if (lastTime == 0) {
- lastTime = _vm->_system->get_msecs();
+ lastTime = _vm->_system->getMillis();
frameCount = 1;
} else {
- int32 delta = _vm->_system->get_msecs() - lastTime;
+ int32 delta = _vm->_system->getMillis() - lastTime;
if (delta > 250) {
lastTime += delta;
diff --git a/sword2/driver/palette.cpp b/sword2/driver/palette.cpp
index 621ac1a7a1..9425cb7dee 100644
--- a/sword2/driver/palette.cpp
+++ b/sword2/driver/palette.cpp
@@ -92,7 +92,7 @@ int32 Graphics::fadeUp(float time) {
_fadeTotalTime = (int32) (time * 1000);
_fadeStatus = RDFADE_UP;
- _fadeStartTime = _vm->_system->get_msecs();
+ _fadeStartTime = _vm->_system->getMillis();
return RD_OK;
}
@@ -108,7 +108,7 @@ int32 Graphics::fadeDown(float time) {
_fadeTotalTime = (int32) (time * 1000);
_fadeStatus = RDFADE_DOWN;
- _fadeStartTime = _vm->_system->get_msecs();
+ _fadeStartTime = _vm->_system->getMillis();
return RD_OK;
}
@@ -126,7 +126,7 @@ uint8 Graphics::getFadeStatus(void) {
void Graphics::waitForFade(void) {
while (getFadeStatus() != RDFADE_NONE && getFadeStatus() != RDFADE_BLACK) {
updateDisplay();
- _vm->_system->delay_msecs(20);
+ _vm->_system->delayMillis(20);
}
}
@@ -144,7 +144,7 @@ void Graphics::fadeServer(void) {
// I don't know if this is necessary, but let's limit how often the
// palette is updated, just to be safe.
- currentTime = _vm->_system->get_msecs();
+ currentTime = _vm->_system->getMillis();
if (currentTime - previousTime <= 25)
return;
diff --git a/sword2/driver/render.cpp b/sword2/driver/render.cpp
index b3d73df142..bd9fba2c64 100644
--- a/sword2/driver/render.cpp
+++ b/sword2/driver/render.cpp
@@ -419,7 +419,7 @@ void Graphics::renderParallax(Parallax *p, int16 l) {
*/
void Graphics::initialiseRenderCycle(void) {
- _initialTime = _vm->_system->get_msecs();
+ _initialTime = _vm->_system->getMillis();
_totalTime = _initialTime + MILLISECSPERCYCLE;
}
@@ -432,7 +432,7 @@ void Graphics::startRenderCycle(void) {
_scrollXOld = _scrollX;
_scrollYOld = _scrollY;
- _startTime = _vm->_system->get_msecs();
+ _startTime = _vm->_system->getMillis();
if (_startTime + _renderAverageTime >= _totalTime) {
_scrollX = _scrollXTarget;
@@ -461,7 +461,7 @@ bool Graphics::endRenderCycle(void) {
static int32 renderCountIndex = 0;
int32 time;
- time = _vm->_system->get_msecs();
+ time = _vm->_system->getMillis();
renderTimeLog[renderCountIndex] = time - _startTime;
_startTime = time;
_renderAverageTime = (renderTimeLog[0] + renderTimeLog[1] + renderTimeLog[2] + renderTimeLog[3]) >> 2;
@@ -487,7 +487,7 @@ bool Graphics::endRenderCycle(void) {
// If we have already reached the scroll target sleep for the
// rest of the render cycle.
_vm->sleepUntil(_totalTime);
- _initialTime = _vm->_system->get_msecs();
+ _initialTime = _vm->_system->getMillis();
_totalTime += MILLISECSPERCYCLE;
return true;
}
@@ -512,7 +512,7 @@ bool Graphics::endRenderCycle(void) {
// Give the other threads some breathing space. This apparently helps
// against bug #875683, though I was never able to reproduce it for
// myself.
- _vm->_system->delay_msecs(10);
+ _vm->_system->delayMillis(10);
#endif
return false;
diff --git a/sword2/function.cpp b/sword2/function.cpp
index b42f904173..27a924feaf 100644
--- a/sword2/function.cpp
+++ b/sword2/function.cpp
@@ -250,7 +250,7 @@ int32 Logic::fnFlash(int32 *params) {
// the delay was meant to be. Probably doesn't matter much.
_vm->_graphics->updateDisplay();
- _vm->_system->delay_msecs(250);
+ _vm->_system->delayMillis(250);
_vm->_graphics->setPalette(0, 1, black, RDPAL_INSTANT);
#endif
@@ -607,7 +607,7 @@ int32 Logic::fnPlayCredits(int32 *params) {
bool abortCredits = false;
int scrollSteps = lineTop + CREDITS_FONT_HEIGHT;
- uint32 musicStart = _vm->_system->get_msecs();
+ uint32 musicStart = _vm->_system->getMillis();
// Ideally the music should last just a tiny bit longer than the
// credits. Note that musicTimeRemaining() will return 0 if the music
@@ -712,7 +712,7 @@ int32 Logic::fnPlayCredits(int32 *params) {
while (_vm->_sound->musicTimeRemaining() && !_vm->_quit) {
_vm->_graphics->updateDisplay(false);
- _vm->_system->delay_msecs(100);
+ _vm->_system->delayMillis(100);
}
}
diff --git a/sword2/sword2.cpp b/sword2/sword2.cpp
index 45a0f75edc..c78f1492f7 100644
--- a/sword2/sword2.cpp
+++ b/sword2/sword2.cpp
@@ -307,7 +307,7 @@ uint32 Sword2Engine::setEventFilter(uint32 filter) {
void Sword2Engine::parseEvents(void) {
OSystem::Event event;
- while (_system->poll_event(&event)) {
+ while (_system->pollEvent(event)) {
switch (event.event_code) {
case OSystem::EVENT_KEYDOWN:
if (!(_eventFilter & RD_KEYDOWN)) {
@@ -576,12 +576,12 @@ void Sword2Engine::startGame(void) {
// FIXME: Move this to some better place?
void Sword2Engine::sleepUntil(uint32 time) {
- while (_system->get_msecs() < time) {
+ while (_system->getMillis() < time) {
// Make sure menu animations and fades don't suffer, but don't
// redraw the entire scene.
_graphics->processMenu();
_graphics->updateDisplay(false);
- _system->delay_msecs(10);
+ _system->delayMillis(10);
}
}