aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2004-09-28 20:19:37 +0000
committerMax Horn2004-09-28 20:19:37 +0000
commitce8c99bf62838099142aa79f2935e64639aa5571 (patch)
tree5a2ea91139133878cdffab8ed86033fbf5448ea9
parent6a50ba2308c6a9fc3eb733f310c87ed279b565ed (diff)
downloadscummvm-rg350-ce8c99bf62838099142aa79f2935e64639aa5571.tar.gz
scummvm-rg350-ce8c99bf62838099142aa79f2935e64639aa5571.tar.bz2
scummvm-rg350-ce8c99bf62838099142aa79f2935e64639aa5571.zip
Rename remaining OSystem methods to match our coding guidelines
svn-id: r15332
-rw-r--r--backends/PalmOS/Src/cd_default.cpp14
-rw-r--r--backends/PalmOS/Src/cd_msa.cpp6
-rw-r--r--backends/PalmOS/Src/cd_pockettunes.cpp8
-rw-r--r--backends/PalmOS/Src/palm.cpp10
-rw-r--r--backends/PalmOS/Src/palm.h20
-rw-r--r--backends/PalmOS/Src/palmevt.cpp114
-rw-r--r--backends/PalmOS/Src/palmrdr.cpp2
-rw-r--r--backends/PalmOS/Src/palmsave.cpp2
-rw-r--r--backends/PalmOS/Src/palmsnd.cpp8
-rw-r--r--backends/dc/dc.h18
-rw-r--r--backends/dc/dcmain.cpp8
-rw-r--r--backends/dc/display.cpp2
-rw-r--r--backends/dc/input.cpp26
-rw-r--r--backends/dc/time.cpp8
-rw-r--r--backends/dc/vmsave.cpp2
-rw-r--r--backends/gp32/gp32.cpp44
-rw-r--r--backends/gp32/gp32.h16
-rw-r--r--backends/morphos/morphos.cpp60
-rw-r--r--backends/morphos/morphos.h16
-rw-r--r--backends/null/null.cpp36
-rw-r--r--backends/sdl/events.cpp146
-rw-r--r--backends/sdl/graphics.cpp2
-rw-r--r--backends/sdl/sdl-common.h16
-rw-r--r--backends/sdl/sdl.cpp12
-rw-r--r--backends/wince/wince-sdl.cpp2
-rw-r--r--backends/wince/wince-sdl.h2
-rw-r--r--backends/x11/x11.cpp80
-rw-r--r--base/engine.cpp2
-rw-r--r--common/system.cpp2
-rw-r--r--common/system.h20
-rw-r--r--common/timer.cpp4
-rw-r--r--graphics/animation.cpp8
-rw-r--r--gui/EditTextWidget.cpp2
-rw-r--r--gui/ListWidget.cpp4
-rw-r--r--gui/PopUpWidget.cpp4
-rw-r--r--gui/console.cpp2
-rw-r--r--gui/message.cpp4
-rw-r--r--gui/newgui.cpp8
-rw-r--r--queen/display.cpp2
-rw-r--r--queen/input.cpp8
-rw-r--r--queen/journal.cpp4
-rw-r--r--saga/input.cpp2
-rw-r--r--saga/saga.cpp10
-rw-r--r--scumm/gfx.cpp6
-rw-r--r--scumm/imuse.cpp8
-rw-r--r--scumm/imuse_digi/dimuse_script.cpp2
-rw-r--r--scumm/input.cpp2
-rw-r--r--scumm/script_v72he.cpp4
-rw-r--r--scumm/scumm.cpp18
-rw-r--r--scumm/smush/smush_player.cpp14
-rw-r--r--scumm/sound.cpp2
-rw-r--r--simon/simon.cpp8
-rw-r--r--sky/control.cpp8
-rw-r--r--sky/intro.cpp8
-rw-r--r--sky/mouse.cpp4
-rw-r--r--sky/music/mt32music.cpp4
-rw-r--r--sky/screen.cpp12
-rw-r--r--sky/sky.cpp14
-rw-r--r--sound/audiocd.cpp8
-rw-r--r--sound/mixer.cpp4
-rw-r--r--sword1/animation.cpp2
-rw-r--r--sword1/control.cpp8
-rw-r--r--sword1/sword1.cpp18
-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
74 files changed, 491 insertions, 491 deletions
diff --git a/backends/PalmOS/Src/cd_default.cpp b/backends/PalmOS/Src/cd_default.cpp
index f630850de3..9185a0b880 100644
--- a/backends/PalmOS/Src/cd_default.cpp
+++ b/backends/PalmOS/Src/cd_default.cpp
@@ -38,13 +38,13 @@ void DefaultCDPlayer::release() {
}
bool DefaultCDPlayer::poll() {
- return (_defLoops != 0 && _sys->get_msecs() < _defTrackEndFrame);
+ return (_defLoops != 0 && _sys->getMillis() < _defTrackEndFrame);
}
void DefaultCDPlayer::update() {
- // stop replay upon request of stop_cdrom()
- if (_defStopTime != 0 && _sys->get_msecs() >= _defStopTime) {
+ // stop replay upon request of stopCD()
+ if (_defStopTime != 0 && _sys->getMillis() >= _defStopTime) {
_defLoops = 0;
_defStopTime = 0;
_defTrackEndFrame = 0;
@@ -52,7 +52,7 @@ void DefaultCDPlayer::update() {
}
// not fully played
- if (_sys->get_msecs() < _defTrackEndFrame)
+ if (_sys->getMillis() < _defTrackEndFrame)
return;
if (_defLoops == 0)
@@ -64,12 +64,12 @@ void DefaultCDPlayer::update() {
// loop if needed
if (_defLoops != 0) {
- _defTrackEndFrame = _sys->get_msecs() + _defTrackLength;
+ _defTrackEndFrame = _sys->getMillis() + _defTrackLength;
}
}
void DefaultCDPlayer::stop() { /* Stop CD Audio in 1/10th of a second */
- _defStopTime = _sys->get_msecs() + 100;
+ _defStopTime = _sys->getMillis() + 100;
_defLoops = 0;
return;
}
@@ -98,5 +98,5 @@ void DefaultCDPlayer::play(int track, int num_loops, int start_frame, int durati
}
// try to play the track
- _defTrackEndFrame = _sys->get_msecs() + _defTrackLength;
+ _defTrackEndFrame = _sys->getMillis() + _defTrackLength;
}
diff --git a/backends/PalmOS/Src/cd_msa.cpp b/backends/PalmOS/Src/cd_msa.cpp
index 8879ce8cf1..478d5f9e21 100644
--- a/backends/PalmOS/Src/cd_msa.cpp
+++ b/backends/PalmOS/Src/cd_msa.cpp
@@ -127,8 +127,8 @@ void MsaCDPlayer::update() {
MsaPBStatus pb;
MsaGetPBStatus(_msaRefNum, &pb);
- // stop replay upon request of stop_cdrom()
- if (_msaStopTime != 0 && _sys->get_msecs() >= _msaStopTime) {
+ // stop replay upon request of stopCD()
+ if (_msaStopTime != 0 && _sys->getMillis() >= _msaStopTime) {
MsaStop(_msaRefNum, true);
_msaLoops = 0;
_msaStopTime = 0;
@@ -174,7 +174,7 @@ void MsaCDPlayer::stop() { /* Stop CD Audio in 1/10th of a second */
if (!_isInitialized)
return;
- _msaStopTime = _sys->get_msecs() + 100;
+ _msaStopTime = _sys->getMillis() + 100;
_msaLoops = 0;
return;
}
diff --git a/backends/PalmOS/Src/cd_pockettunes.cpp b/backends/PalmOS/Src/cd_pockettunes.cpp
index eca7624622..5993312b12 100644
--- a/backends/PalmOS/Src/cd_pockettunes.cpp
+++ b/backends/PalmOS/Src/cd_pockettunes.cpp
@@ -136,8 +136,8 @@ bool PckTunesCDPlayer::poll() {
void PckTunesCDPlayer::update() {
- // stop replay upon request of stop_cdrom()
- if (_pckStopTime != 0 && _sys->get_msecs() >= _pckStopTime) {
+ // stop replay upon request of stopCD()
+ if (_pckStopTime != 0 && _sys->getMillis() >= _pckStopTime) {
PocketTunesStop();
_pckLoops = 0;
_pckStopTime = 0;
@@ -146,7 +146,7 @@ void PckTunesCDPlayer::update() {
}
// not fully played
-// if (_sys->get_msecs() < _pckTrackEndFrame)
+// if (_sys->getMillis() < _pckTrackEndFrame)
// return;
if (getPosition(_pckTrackEndFrame) < _pckTrackEndFrame)
return;
@@ -174,7 +174,7 @@ void PckTunesCDPlayer::update() {
}
void PckTunesCDPlayer::stop() { /* Stop CD Audio in 1/10th of a second */
- _pckStopTime = _sys->get_msecs() + 100;
+ _pckStopTime = _sys->getMillis() + 100;
_pckLoops = 0;
return;
}
diff --git a/backends/PalmOS/Src/palm.cpp b/backends/PalmOS/Src/palm.cpp
index 704d887d9d..5c3209a745 100644
--- a/backends/PalmOS/Src/palm.cpp
+++ b/backends/PalmOS/Src/palm.cpp
@@ -42,21 +42,21 @@ OSystem *OSystem_PALMOS::create() {
return new OSystem_PALMOS();
}
-uint32 OSystem_PALMOS::get_msecs() {
+uint32 OSystem_PALMOS::getMillis() {
uint32 ticks = TimGetTicks();
ticks *= (1000/SysTicksPerSecond());
return ticks;
}
-void OSystem_PALMOS::delay_msecs(uint msecs) {
- UInt32 current = get_msecs();
+void OSystem_PALMOS::delayMillis(uint msecs) {
+ UInt32 current = getMillis();
UInt32 last = current + msecs;
do {
timer_handler(current);
sound_handler();
- current = get_msecs();
+ current = getMillis();
} while (current < last);
}
@@ -100,7 +100,7 @@ void OSystem_PALMOS::timer_handler(UInt32 current_msecs) {
void OSystem_PALMOS::setTimerCallback(TimerProc callback, int timer) {
if (callback != NULL) {
_timer.duration = timer;
- _timer.nextExpiry = get_msecs() + timer;
+ _timer.nextExpiry = getMillis() + timer;
_timer.callback = callback;
_timer.active = true;
} else {
diff --git a/backends/PalmOS/Src/palm.h b/backends/PalmOS/Src/palm.h
index e2ff05f4e9..88c7d2a2a3 100644
--- a/backends/PalmOS/Src/palm.h
+++ b/backends/PalmOS/Src/palm.h
@@ -92,19 +92,19 @@ public:
void setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, byte keycolor);
// Shaking is used in SCUMM. Set current shake position.
- void set_shake_pos(int shake_pos);
+ void setShakePos(int shake_pos);
// Get the number of milliseconds since the program was started.
- uint32 get_msecs();
+ uint32 getMillis();
// Delay for a specified amount of milliseconds
- void delay_msecs(uint msecs);
+ void delayMillis(uint msecs);
// Get the next event.
// Returns true if an event was retrieved.
- bool poll_event(Event *event);
+ bool pollEvent(Event &event);
- void SimulateArrowKeys(Event *event, Int8 iHoriz, Int8 iVert);
+ void SimulateArrowKeys(Event &event, Int8 iHoriz, Int8 iVert);
/** @name Sound */
//@{
@@ -126,16 +126,16 @@ public:
// Poll cdrom status
// Returns true if cd audio is playing
- bool poll_cdrom();
+ bool pollCD();
// Play cdrom audio track
- void play_cdrom(int track, int num_loops, int start_frame, int duration);
+ void playCD(int track, int num_loops, int start_frame, int duration);
// Stop cdrom audio track
- void stop_cdrom();
+ void stopCD();
// Update cdrom audio status
- void update_cdrom();
+ void updateCD();
// Add a callback timer
void setTimerCallback(TimerProc callback, int timer);
@@ -162,7 +162,7 @@ public:
void ColorToRGB(byte color, uint8 &r, uint8 &g, uint8 &b);
// Savefile management
- SaveFileManager *get_savefile_manager();
+ SaveFileManager *getSavefileManager();
static OSystem *create();
diff --git a/backends/PalmOS/Src/palmevt.cpp b/backends/PalmOS/Src/palmevt.cpp
index 80a6c33701..c8eee736f6 100644
--- a/backends/PalmOS/Src/palmevt.cpp
+++ b/backends/PalmOS/Src/palmevt.cpp
@@ -32,7 +32,7 @@
#define EXITDELAY (500) // delay to exit : calc button : double tap 1/500 sec
-void OSystem_PALMOS::SimulateArrowKeys(Event *event, Int8 iHoriz, Int8 iVert) {
+void OSystem_PALMOS::SimulateArrowKeys(Event &event, Int8 iHoriz, Int8 iVert) {
Int16 x = _mouseCurState.x;
Int16 y = _mouseCurState.y;
Int16 slow;
@@ -56,9 +56,9 @@ void OSystem_PALMOS::SimulateArrowKeys(Event *event, Int8 iHoriz, Int8 iVert) {
y = (y < 0 ) ? 0 : y;
y = (y >= _screenHeight ) ? _screenHeight - 1 : y;
- event->event_code = EVENT_MOUSEMOVE;
- event->mouse.x = x;
- event->mouse.y = y;
+ event.event_code = EVENT_MOUSEMOVE;
+ event.mouse.x = x;
+ event.mouse.y = y;
set_mouse_pos(x, y);
}
@@ -104,7 +104,7 @@ void OSystem_PALMOS::getCoordinates(EventPtr event, Coord *x, Coord *y) {
}
}
-bool OSystem_PALMOS::poll_event(Event *event) {
+bool OSystem_PALMOS::pollEvent(Event &event) {
EventType ev;
Boolean handled;
UInt32 keyCurrentState;
@@ -112,7 +112,7 @@ bool OSystem_PALMOS::poll_event(Event *event) {
battery_handler();
sound_handler();
- timer_handler(get_msecs());
+ timer_handler(getMillis());
for(;;) {
EvtGetEvent(&ev, evtNoWait);
@@ -126,9 +126,9 @@ bool OSystem_PALMOS::poll_event(Event *event) {
Int8 sy = 0;
if (keyCurrentState & _keyMouse.bitButLeft) {
- event->event_code = EVENT_LBUTTONDOWN;
- event->mouse.x = _mouseCurState.x;
- event->mouse.y = _mouseCurState.y;
+ event.event_code = EVENT_LBUTTONDOWN;
+ event.mouse.x = _mouseCurState.x;
+ event.mouse.y = _mouseCurState.y;
_lastKeyPressed = kLastKeyNone;
return true;
}
@@ -145,7 +145,7 @@ bool OSystem_PALMOS::poll_event(Event *event) {
SimulateArrowKeys(event, sx, sy);
updateScreen();
- update_cdrom();
+ updateCD();
_lastKeyPressed = kLastKeyMouse;
return true;
@@ -155,7 +155,7 @@ bool OSystem_PALMOS::poll_event(Event *event) {
if (ev.eType == nilEvent) {
// force CD update, useful when the game is paused in some cases
- update_cdrom();
+ updateCD();
return false;
}
@@ -165,10 +165,10 @@ bool OSystem_PALMOS::poll_event(Event *event) {
// ESC key
case vchrLaunch:
_lastKeyPressed = kLastKeyNone;
- event->event_code = EVENT_KEYDOWN;
- event->kbd.keycode = 27;
- event->kbd.ascii = 27;
- event->kbd.flags = 0;
+ event.event_code = EVENT_KEYDOWN;
+ event.kbd.keycode = 27;
+ event.kbd.ascii = 27;
+ event.kbd.flags = 0;
return true;
// F5 = menu
@@ -176,18 +176,18 @@ bool OSystem_PALMOS::poll_event(Event *event) {
case vchrMenu:
case vchrThumbWheelBack: // Tapwave back button
_lastKeyPressed = kLastKeyNone;
- event->event_code = EVENT_KEYDOWN;
- event->kbd.keycode = 319;
- event->kbd.ascii = 319;
- event->kbd.flags = 0;
+ event.event_code = EVENT_KEYDOWN;
+ event.kbd.keycode = 319;
+ event.kbd.ascii = 319;
+ event.kbd.flags = 0;
return true;
case vchrCalc:
if (_lastKeyPressed & kLastKeyCalc)
- if ((get_msecs() - _exit_delay) <= (EXITDELAY))
- event->event_code = EVENT_QUIT;
+ if ((getMillis() - _exit_delay) <= (EXITDELAY))
+ event.event_code = EVENT_QUIT;
- _exit_delay = get_msecs();
+ _exit_delay = getMillis();
_lastKeyPressed = kLastKeyCalc;
return true;
@@ -197,9 +197,9 @@ bool OSystem_PALMOS::poll_event(Event *event) {
#ifndef DISABLE_TAPWAVE
case vchrActionRight:
#endif
- event->event_code = EVENT_RBUTTONDOWN;
- event->mouse.x = _mouseCurState.x;
- event->mouse.y = _mouseCurState.y;
+ event.event_code = EVENT_RBUTTONDOWN;
+ event.mouse.x = _mouseCurState.x;
+ event.mouse.y = _mouseCurState.y;
_lastKeyPressed = kLastKeyNone;
return true;
@@ -213,11 +213,11 @@ bool OSystem_PALMOS::poll_event(Event *event) {
// wheel
case vchrJogUp:
- event->event_code = EVENT_WHEELUP;
+ event.event_code = EVENT_WHEELUP;
return true;
case vchrJogDown:
- event->event_code = EVENT_WHEELDOWN;
+ event.event_code = EVENT_WHEELDOWN;
return true;
@@ -260,19 +260,19 @@ bool OSystem_PALMOS::poll_event(Event *event) {
// ESC key
case vchrHard2:
_lastKeyPressed = kLastKeyNone;
- event->event_code = EVENT_KEYDOWN;
- event->kbd.keycode = 27;
- event->kbd.ascii = 27;
- event->kbd.flags = 0;
+ event.event_code = EVENT_KEYDOWN;
+ event.kbd.keycode = 27;
+ event.kbd.ascii = 27;
+ event.kbd.flags = 0;
return true;
// F5 = menu
case vchrHard3:
_lastKeyPressed = kLastKeyNone;
- event->event_code = EVENT_KEYDOWN;
- event->kbd.keycode = 319;
- event->kbd.ascii = 319;
- event->kbd.flags = 0;
+ event.event_code = EVENT_KEYDOWN;
+ event.kbd.keycode = 319;
+ event.kbd.ascii = 319;
+ event.kbd.flags = 0;
return true;
}
}
@@ -321,7 +321,7 @@ bool OSystem_PALMOS::poll_event(Event *event) {
b = 0;
} else if ((keycode == 'z' && b == KBD_CTRL) || (b == KBD_ALT && keycode == 'x')) {
- event->event_code = EVENT_QUIT;
+ event.event_code = EVENT_QUIT;
return true;
} else if (keycode == 'n' && b == KBD_CTRL) {
@@ -344,10 +344,10 @@ bool OSystem_PALMOS::poll_event(Event *event) {
#endif
}
- event->event_code = EVENT_KEYDOWN;
- event->kbd.keycode = keycode;
- event->kbd.ascii = keycode; //(keycode>='a' && keycode<='z' && (event->kbd.flags & KBD_SHIFT) ? keycode &~ 0x20 : keycode);
- event->kbd.flags = b;
+ event.event_code = EVENT_KEYDOWN;
+ event.kbd.keycode = keycode;
+ event.kbd.ascii = keycode; //(keycode>='a' && keycode<='z' && (event.kbd.flags & KBD_SHIFT) ? keycode &~ 0x20 : keycode);
+ event.kbd.flags = b;
if (_lastKeyModifier) {
_lastKeyModifier = MD_NONE;
@@ -363,14 +363,14 @@ bool OSystem_PALMOS::poll_event(Event *event) {
if (y > _screenHeight || y < 0 || x > _screenWidth || x < 0)
return true;
- if (_lastEvent != penMoveEvent && (abs(y - event->mouse.y) <= 2 || abs(x - event->mouse.x) <= 2)) // move only if
+ if (_lastEvent != penMoveEvent && (abs(y - event.mouse.y) <= 2 || abs(x - event.mouse.x) <= 2)) // move only if
return true;
_lastEvent = penMoveEvent;
- event->event_code = EVENT_MOUSEMOVE;
- event->mouse.x = x;
- event->mouse.y = y;
- set_mouse_pos(event->mouse.x, event->mouse.y);
+ event.event_code = EVENT_MOUSEMOVE;
+ event.mouse.x = x;
+ event.mouse.y = y;
+ set_mouse_pos(event.mouse.x, event.mouse.y);
return true;
case penDownEvent:
@@ -387,10 +387,10 @@ bool OSystem_PALMOS::poll_event(Event *event) {
_lastEvent = keyDownEvent;
_lastKeyPressed = kLastKeyNone;
- event->event_code = EVENT_KEYDOWN;
- event->kbd.keycode = key;
- event->kbd.ascii = key;
- event->kbd.flags = 0;
+ event.event_code = EVENT_KEYDOWN;
+ event.kbd.keycode = key;
+ event.kbd.ascii = key;
+ event.kbd.flags = 0;
return true;
}
}
@@ -399,22 +399,22 @@ bool OSystem_PALMOS::poll_event(Event *event) {
if (y > _screenHeight || y < 0 || x > _screenWidth || x < 0)
return true;
- event->event_code = EVENT_LBUTTONDOWN;
- event->mouse.x = x;
- event->mouse.y = y;
- set_mouse_pos(event->mouse.x, event->mouse.y);
+ event.event_code = EVENT_LBUTTONDOWN;
+ event.mouse.x = x;
+ event.mouse.y = y;
+ set_mouse_pos(event.mouse.x, event.mouse.y);
return true;
case penUpEvent:
getCoordinates(&ev, &x, &y);
- event->event_code = EVENT_LBUTTONUP;
+ event.event_code = EVENT_LBUTTONUP;
if (y > _screenHeight || y < 0 || x > _screenWidth || x < 0)
return true;
- event->mouse.x = x;
- event->mouse.y = y;
- set_mouse_pos(event->mouse.x, event->mouse.y);
+ event.mouse.x = x;
+ event.mouse.y = y;
+ set_mouse_pos(event.mouse.x, event.mouse.y);
return true;
default:
diff --git a/backends/PalmOS/Src/palmrdr.cpp b/backends/PalmOS/Src/palmrdr.cpp
index c8a002c1ce..41a86524f7 100644
--- a/backends/PalmOS/Src/palmrdr.cpp
+++ b/backends/PalmOS/Src/palmrdr.cpp
@@ -41,7 +41,7 @@ void OSystem_PALMOS::rumblePack(Boolean active) {
}
-void OSystem_PALMOS::set_shake_pos(int shake_pos) {
+void OSystem_PALMOS::setShakePos(int shake_pos) {
_new_shake_pos = shake_pos;
if (shake_pos == 0)
diff --git a/backends/PalmOS/Src/palmsave.cpp b/backends/PalmOS/Src/palmsave.cpp
index c3e2825f29..291b4d9204 100644
--- a/backends/PalmOS/Src/palmsave.cpp
+++ b/backends/PalmOS/Src/palmsave.cpp
@@ -192,6 +192,6 @@ SaveFile *PalmSaveFileManager::makeSaveFile(const char *filename, bool saveOrLoa
}
// OSystem
-SaveFileManager *OSystem_PALMOS::get_savefile_manager() {
+SaveFileManager *OSystem_PALMOS::getSavefileManager() {
return new PalmSaveFileManager();
}
diff --git a/backends/PalmOS/Src/palmsnd.cpp b/backends/PalmOS/Src/palmsnd.cpp
index e05203cdd6..fd433fe5b0 100644
--- a/backends/PalmOS/Src/palmsnd.cpp
+++ b/backends/PalmOS/Src/palmsnd.cpp
@@ -157,28 +157,28 @@ bool OSystem_PALMOS::openCD(int drive) {
return false;
}
-void OSystem_PALMOS::stop_cdrom() {
+void OSystem_PALMOS::stopCD() {
if (!_cdPlayer)
return;
_cdPlayer->stop();
}
-void OSystem_PALMOS::play_cdrom(int track, int num_loops, int start_frame, int duration) {
+void OSystem_PALMOS::playCD(int track, int num_loops, int start_frame, int duration) {
if (!_cdPlayer)
return;
_cdPlayer->play(track, num_loops, start_frame, duration);
}
-bool OSystem_PALMOS::poll_cdrom() {
+bool OSystem_PALMOS::pollCD() {
if (!_cdPlayer)
return false;
return _cdPlayer->poll();
}
-void OSystem_PALMOS::update_cdrom() {
+void OSystem_PALMOS::updateCD() {
if (!_cdPlayer)
return;
diff --git a/backends/dc/dc.h b/backends/dc/dc.h
index 3f40f8667d..5d580d4318 100644
--- a/backends/dc/dc.h
+++ b/backends/dc/dc.h
@@ -87,17 +87,17 @@ class OSystem_Dreamcast : public OSystem {
void setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, byte keycolor);
// Shaking is used in SCUMM. Set current shake position.
- void set_shake_pos(int shake_pos);
+ void setShakePos(int shake_pos);
// Get the number of milliseconds since the program was started.
- uint32 get_msecs();
+ uint32 getMillis();
// Delay for a specified amount of milliseconds
- void delay_msecs(uint msecs);
+ void delayMillis(uint msecs);
// Get the next event.
// Returns true if an event was retrieved.
- bool poll_event(Event *event);
+ bool pollEvent(Event &event);
// Set function that generates samples
bool setSoundCallback(SoundProc proc, void *param);
@@ -112,16 +112,16 @@ class OSystem_Dreamcast : public OSystem {
// Poll cdrom status
// Returns true if cd audio is playing
- bool poll_cdrom();
+ bool pollCD();
// Play cdrom audio track
- void play_cdrom(int track, int num_loops, int start_frame, int duration);
+ void playCD(int track, int num_loops, int start_frame, int duration);
// Stop cdrom audio track
- void stop_cdrom();
+ void stopCD();
// Update cdrom audio status
- void update_cdrom();
+ void updateCD();
// Quit
void quit();
@@ -147,7 +147,7 @@ class OSystem_Dreamcast : public OSystem {
void setWindowCaption(const char *caption);
// Savefile handling
- SaveFileManager *get_savefile_manager();
+ SaveFileManager *getSavefileManager();
static OSystem *create();
diff --git a/backends/dc/dcmain.cpp b/backends/dc/dcmain.cpp
index 73d71a29f9..6700bdeb68 100644
--- a/backends/dc/dcmain.cpp
+++ b/backends/dc/dcmain.cpp
@@ -78,7 +78,7 @@ static bool find_track(int track, int &first_sec, int &last_sec)
return false;
}
-void OSystem_Dreamcast::play_cdrom(int track, int num_loops, int start_frame, int duration)
+void OSystem_Dreamcast::playCD(int track, int num_loops, int start_frame, int duration)
{
int first_sec, last_sec;
#if 1
@@ -95,18 +95,18 @@ void OSystem_Dreamcast::play_cdrom(int track, int num_loops, int start_frame, in
play_cdda_sectors(first_sec, last_sec, num_loops);
}
-void OSystem_Dreamcast::stop_cdrom()
+void OSystem_Dreamcast::stopCD()
{
stop_cdda();
}
-bool OSystem_Dreamcast::poll_cdrom()
+bool OSystem_Dreamcast::pollCD()
{
extern int getCdState();
return getCdState() == 3;
}
-void OSystem_Dreamcast::update_cdrom()
+void OSystem_Dreamcast::updateCD()
{
// Dummy. The CD drive takes care of itself.
}
diff --git a/backends/dc/display.cpp b/backends/dc/display.cpp
index 2e46967dea..6e221941dc 100644
--- a/backends/dc/display.cpp
+++ b/backends/dc/display.cpp
@@ -238,7 +238,7 @@ void OSystem_Dreamcast::setMouseCursor(const byte *buf, uint w, uint h,
memcpy(_ms_buf, buf, w * h);
}
-void OSystem_Dreamcast::set_shake_pos(int shake_pos)
+void OSystem_Dreamcast::setShakePos(int shake_pos)
{
_current_shake_pos = shake_pos;
}
diff --git a/backends/dc/input.cpp b/backends/dc/input.cpp
index ad0164991b..a202411f51 100644
--- a/backends/dc/input.cpp
+++ b/backends/dc/input.cpp
@@ -170,7 +170,7 @@ int handleInput(struct mapledev *pad, int &mouse_x, int &mouse_y,
return 0;
}
-bool OSystem_Dreamcast::poll_event(Event *event)
+bool OSystem_Dreamcast::pollEvent(Event &event)
{
unsigned int t = Timer();
@@ -189,29 +189,29 @@ bool OSystem_Dreamcast::poll_event(Event *event)
setimask(15);
checkSound();
int e = handleInput(locked_get_pads(), _ms_cur_x, _ms_cur_y,
- event->kbd.flags, (_softkbd_on? &_softkbd : NULL));
+ event.kbd.flags, (_softkbd_on? &_softkbd : NULL));
setimask(mask);
if (_ms_cur_x<0) _ms_cur_x=0;
if (_ms_cur_x>=_screen_w) _ms_cur_x=_screen_w-1;
if (_ms_cur_y<0) _ms_cur_y=0;
if (_ms_cur_y>=_screen_h) _ms_cur_y=_screen_h-1;
- event->mouse.x = _ms_cur_x;
- event->mouse.y = _ms_cur_y;
+ event.mouse.x = _ms_cur_x;
+ event.mouse.y = _ms_cur_y;
if (_overlay_visible) {
- event->mouse.x -= _overlay_x;
- event->mouse.y -= _overlay_y;
+ event.mouse.x -= _overlay_x;
+ event.mouse.y -= _overlay_y;
}
- event->kbd.ascii = event->kbd.keycode = 0;
+ event.kbd.ascii = event.kbd.keycode = 0;
if(e<0) {
- event->event_code = (EventCode)-e;
+ event.event_code = (EventCode)-e;
return true;
} else if(e>0) {
bool processed = false, down = !(e&(1<<30));
e &= ~(1<<30);
if(e < 1000) {
- event->event_code = (down? EVENT_KEYDOWN : EVENT_KEYUP);
- event->kbd.keycode = e;
- event->kbd.ascii = (e>='a' && e<='z' && (event->kbd.flags & KBD_SHIFT)?
+ event.event_code = (down? EVENT_KEYDOWN : EVENT_KEYUP);
+ event.kbd.keycode = e;
+ event.kbd.ascii = (e>='a' && e<='z' && (event.kbd.flags & KBD_SHIFT)?
e &~ 0x20 : e);
processed = true;
} else if(down) {
@@ -221,12 +221,12 @@ bool OSystem_Dreamcast::poll_event(Event *event)
}
return processed;
} else if(_ms_cur_x != _ms_old_x || _ms_cur_y != _ms_old_y) {
- event->event_code = EVENT_MOUSEMOVE;
+ event.event_code = EVENT_MOUSEMOVE;
_ms_old_x = _ms_cur_x;
_ms_old_y = _ms_cur_y;
return true;
} else {
- event->event_code = (EventCode)0;
+ event.event_code = (EventCode)0;
return false;
}
}
diff --git a/backends/dc/time.cpp b/backends/dc/time.cpp
index 2771fc33c2..fd1ceaedd0 100644
--- a/backends/dc/time.cpp
+++ b/backends/dc/time.cpp
@@ -27,7 +27,7 @@
#include "dc.h"
-uint32 OSystem_Dreamcast::get_msecs()
+uint32 OSystem_Dreamcast::getMillis()
{
static uint32 msecs=0;
static unsigned int t0=0;
@@ -43,14 +43,14 @@ uint32 OSystem_Dreamcast::get_msecs()
return msecs += dm;
}
-void OSystem_Dreamcast::delay_msecs(uint msecs)
+void OSystem_Dreamcast::delayMillis(uint msecs)
{
- get_msecs();
+ getMillis();
unsigned int t, start = Timer();
int time = (((unsigned int)msecs)*100000U)>>11;
while(((int)((t = Timer())-start))<time)
checkSound();
- get_msecs();
+ getMillis();
}
void OSystem_Dreamcast::setTimerCallback(TimerProc callback, int timer)
diff --git a/backends/dc/vmsave.cpp b/backends/dc/vmsave.cpp
index 210177730f..0e9d87c18d 100644
--- a/backends/dc/vmsave.cpp
+++ b/backends/dc/vmsave.cpp
@@ -341,7 +341,7 @@ void VMSaveManager::list_savefiles(const char *prefix, const char *directory,
tryList(prefix, marks, num, i);
}
-SaveFileManager *OSystem_Dreamcast::get_savefile_manager()
+SaveFileManager *OSystem_Dreamcast::getSavefileManager()
{
return new VMSaveManager();
}
diff --git a/backends/gp32/gp32.cpp b/backends/gp32/gp32.cpp
index 3451aa69e0..b7b6770ad1 100644
--- a/backends/gp32/gp32.cpp
+++ b/backends/gp32/gp32.cpp
@@ -812,17 +812,17 @@ void OSystem_GP32::setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x
}
// Shaking is used in SCUMM. Set current shake position.
-void OSystem_GP32::set_shake_pos(int shake_pos) {
+void OSystem_GP32::setShakePos(int shake_pos) {
_newShakePos = shake_pos;
}
// Get the number of milliseconds since the program was started.
-uint32 OSystem_GP32::get_msecs() {
+uint32 OSystem_GP32::getMillis() {
return GpTickCountGet();
}
// Delay for a specified amount of milliseconds
-void OSystem_GP32::delay_msecs(uint msecs) {
+void OSystem_GP32::delayMillis(uint msecs) {
int n = GpTickCountGet();
while ( ( GpTickCountGet() - n ) < msecs) ;
}
@@ -830,7 +830,7 @@ void OSystem_GP32::delay_msecs(uint msecs) {
// Get the next event.
// Returns true if an event was retrieved.
-bool OSystem_GP32::poll_event(Event *event) { // fixme: make more user-friendly :)
+bool OSystem_GP32::pollEvent(Event &event) { // fixme: make more user-friendly :)
#define EVENT_COUNT 2 // >=1
#define MOUSE_MIPS 1 // bg updates wrong if >1 ??
@@ -842,7 +842,7 @@ bool OSystem_GP32::poll_event(Event *event) { // fixme: make more user-friendly
if (key == GPC_VK_NONE) {
if (lastevent==EVENT_LBUTTONDOWN) {
lastevent=0;
- event->event_code = EVENT_LBUTTONUP;
+ event.event_code = EVENT_LBUTTONUP;
return true;
}
return false;
@@ -855,7 +855,7 @@ bool OSystem_GP32::poll_event(Event *event) { // fixme: make more user-friendly
oldkey=key;
eventcount=EVENT_COUNT;
- event->event_code = EVENT_KEYDOWN;
+ event.event_code = EVENT_KEYDOWN;
if (key & GPC_VK_FL && key & GPC_VK_FR) { // L+R = save state
printf("Saving game, please wait...");
@@ -888,27 +888,27 @@ bool OSystem_GP32::poll_event(Event *event) { // fixme: make more user-friendly
}
if (key & GPC_VK_START) { // START = menu
- event->kbd.keycode = 319;
- event->kbd.ascii = 319;
+ event.kbd.keycode = 319;
+ event.kbd.ascii = 319;
return true;
}
if (key & GPC_VK_SELECT) { // SELECT == escape/skip
if (_overlay_visible)
do key=GpKeyGet(); while (key != GPC_VK_NONE) ; // prevent 2xESC
- event->kbd.keycode = 27;
- event->kbd.ascii = 27;
+ event.kbd.keycode = 27;
+ event.kbd.ascii = 27;
return true;
}
if (key & GPC_VK_FA) {
lastevent=EVENT_LBUTTONDOWN;
- event->event_code = EVENT_LBUTTONDOWN;
+ event.event_code = EVENT_LBUTTONDOWN;
return true;
}
if (key & GPC_VK_FB) {
lastevent=EVENT_RBUTTONDOWN;
- event->event_code = EVENT_RBUTTONDOWN;
+ event.event_code = EVENT_RBUTTONDOWN;
return true;
}
@@ -932,14 +932,14 @@ bool OSystem_GP32::poll_event(Event *event) { // fixme: make more user-friendly
if (my>199) my=199;
}
- event->event_code = EVENT_MOUSEMOVE;
- km.x = event->mouse.x = mx;
- km.y = event->mouse.y = my;
+ event.event_code = EVENT_MOUSEMOVE;
+ km.x = event.mouse.x = mx;
+ km.y = event.mouse.y = my;
- event->mouse.x /= _scaleFactor;
- event->mouse.y /= _scaleFactor;
+ event.mouse.x /= _scaleFactor;
+ event.mouse.y /= _scaleFactor;
- set_mouse_pos(event->mouse.x, event->mouse.y);
+ set_mouse_pos(event.mouse.x, event.mouse.y);
}
// Set the function to be invoked whenever samples need to be generated
@@ -1026,16 +1026,16 @@ uint32 OSystem_GP32::property(int param, Property *value) {
// Poll cdrom status
// Returns true if cd audio is playing
-bool OSystem_GP32::poll_cdrom() { return false; }
+bool OSystem_GP32::pollCD() { return false; }
// Play cdrom audio track
-void OSystem_GP32::play_cdrom(int track, int num_loops, int start_frame, int duration) { }
+void OSystem_GP32::playCD(int track, int num_loops, int start_frame, int duration) { }
// Stop cdrom audio track
-void OSystem_GP32::stop_cdrom() { }
+void OSystem_GP32::stopCD() { }
// Update cdrom audio status
-void OSystem_GP32::update_cdrom() { }
+void OSystem_GP32::updateCD() { }
// Add a new callback timer
void OSystem_GP32::setTimerCallback(TimerProc callback, int timer) { }
diff --git a/backends/gp32/gp32.h b/backends/gp32/gp32.h
index fbb0253773..1e8ff60ee8 100644
--- a/backends/gp32/gp32.h
+++ b/backends/gp32/gp32.h
@@ -61,17 +61,17 @@ public:
void setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, byte keycolor);
// Shaking is used in SCUMM. Set current shake position.
- void set_shake_pos(int shake_pos);
+ void setShakePos(int shake_pos);
// Get the number of milliseconds since the program was started.
- uint32 get_msecs();
+ uint32 getMillis();
// Delay for a specified amount of milliseconds
- void delay_msecs(uint msecs);
+ void delayMillis(uint msecs);
// Get the next event.
// Returns true if an event was retrieved.
- bool poll_event(Event *event);
+ bool pollEvent(Event &event);
// Set the function to be invoked whenever samples need to be generated
// Format is the sample type format.
@@ -84,16 +84,16 @@ public:
// Poll cdrom status
// Returns true if cd audio is playing
- bool poll_cdrom();
+ bool pollCD();
// Play cdrom audio track
- void play_cdrom(int track, int num_loops, int start_frame, int duration);
+ void playCD(int track, int num_loops, int start_frame, int duration);
// Stop cdrom audio track
- void stop_cdrom();
+ void stopCD();
// Update cdrom audio status
- void update_cdrom();
+ void updateCD();
// Add a new callback timer
void setTimerCallback(TimerProc callback, int timer);
diff --git a/backends/morphos/morphos.cpp b/backends/morphos/morphos.cpp
index 0691963468..1b4e16be5a 100644
--- a/backends/morphos/morphos.cpp
+++ b/backends/morphos/morphos.cpp
@@ -307,14 +307,14 @@ bool OSystem_MorphOS::OpenATimer(MsgPort **port, IORequest **req, ULONG unit, bo
return *req != NULL;
}
-uint32 OSystem_MorphOS::get_msecs()
+uint32 OSystem_MorphOS::getMillis()
{
int ticks = clock();
ticks *= (1000/CLOCKS_PER_SEC);
return ticks;
}
-void OSystem_MorphOS::delay_msecs(uint msecs)
+void OSystem_MorphOS::delayMillis(uint msecs)
{
/* TimerIORequest->tr_node.io_Command = TR_ADDREQUEST;
TimerIORequest->tr_time.tv_secs = 0;
@@ -456,7 +456,7 @@ uint32 OSystem_MorphOS::property(int param, Property *value)
return 0;
}
-void OSystem_MorphOS::play_cdrom(int track, int num_loops, int start_frame, int duration)
+void OSystem_MorphOS::playCD(int track, int num_loops, int start_frame, int duration)
{
if (CDrive && start_frame >= 0)
{
@@ -472,13 +472,13 @@ void OSystem_MorphOS::play_cdrom(int track, int num_loops, int start_frame, int
}
}
-void OSystem_MorphOS::stop_cdrom()
+void OSystem_MorphOS::stopCD()
{
if (CDrive)
CDDA_Stop(CDrive);
}
-bool OSystem_MorphOS::poll_cdrom()
+bool OSystem_MorphOS::pollCD()
{
ULONG status;
@@ -489,7 +489,7 @@ bool OSystem_MorphOS::poll_cdrom()
return status == CDDA_Status_Busy;
}
-void OSystem_MorphOS::update_cdrom()
+void OSystem_MorphOS::updateCD()
{
}
@@ -798,7 +798,7 @@ void OSystem_MorphOS::SwitchScalerTo(SCALERTYPE newScaler)
}
}
-bool OSystem_MorphOS::poll_event(Event *event)
+bool OSystem_MorphOS::pollEvent(Event &event)
{
IntuiMessage *ScummMsg;
@@ -823,9 +823,9 @@ bool OSystem_MorphOS::poll_event(Event *event)
qual |= KBD_SHIFT;
if (ScummMsg->Qualifier & IEQUALIFIER_CONTROL)
qual |= KBD_CTRL;
- event->kbd.flags = qual;
+ event.kbd.flags = qual;
- event->event_code = (ScummMsg->Code & IECODE_UP_PREFIX) ? EVENT_KEYUP : EVENT_KEYDOWN;
+ event.event_code = (ScummMsg->Code & IECODE_UP_PREFIX) ? EVENT_KEYUP : EVENT_KEYDOWN;
ScummMsg->Code &= ~IECODE_UP_PREFIX;
if (ScummMsg->Code >= RAWKEY_F1 && ScummMsg->Code <= RAWKEY_F10)
@@ -833,29 +833,29 @@ bool OSystem_MorphOS::poll_event(Event *event)
/*
* Function key
*/
- event->kbd.ascii = (ScummMsg->Code-RAWKEY_F1)+315;
- event->kbd.keycode = 0;
+ event.kbd.ascii = (ScummMsg->Code-RAWKEY_F1)+315;
+ event.kbd.keycode = 0;
}
else if (ScummMsg->Code == RAWKEY_F11 || ScummMsg->Code == RAWKEY_F12)
{
/*
* Function key on PC keyboard
*/
- event->kbd.ascii = (ScummMsg->Code == RAWKEY_F11) ? 325 : 326;
- event->kbd.keycode = 0;
+ event.kbd.ascii = (ScummMsg->Code == RAWKEY_F11) ? 325 : 326;
+ event.kbd.keycode = 0;
}
else if (ScummMsg->Code == NM_WHEEL_UP || ScummMsg->Code == NM_WHEEL_DOWN)
{
/*
* Wheelmouse event
*/
- event->event_code = (ScummMsg->Code == NM_WHEEL_UP) ? EVENT_WHEELUP : EVENT_WHEELDOWN;
+ event.event_code = (ScummMsg->Code == NM_WHEEL_UP) ? EVENT_WHEELUP : EVENT_WHEELDOWN;
}
else if (MapRawKey(&FakedIEvent, &charbuf, 1, NULL) == 1)
{
if (qual == KBD_CTRL && charbuf == 'z')
{
- event->event_code = EVENT_QUIT;
+ event.event_code = EVENT_QUIT;
break;
}
else if (qual == KBD_ALT)
@@ -870,7 +870,7 @@ bool OSystem_MorphOS::poll_event(Event *event)
}
else if (charbuf == 'x')
{
- event->event_code = EVENT_QUIT;
+ event.event_code = EVENT_QUIT;
break;
}
else if (charbuf == 0x0d)
@@ -881,8 +881,8 @@ bool OSystem_MorphOS::poll_event(Event *event)
}
}
- event->kbd.ascii = charbuf;
- event->kbd.keycode = charbuf;
+ event.kbd.ascii = charbuf;
+ event.kbd.keycode = charbuf;
}
break;
}
@@ -915,10 +915,10 @@ bool OSystem_MorphOS::poll_event(Event *event)
else if (FullScreenMode)
newy = newy <? (ScummScrHeight >> ScummScale)-2;
- event->event_code = EVENT_MOUSEMOVE;
- event->mouse.x = newx;
- event->mouse.y = newy;
- set_mouse_pos(event->mouse.x, event->mouse.y);
+ event.event_code = EVENT_MOUSEMOVE;
+ event.mouse.x = newx;
+ event.mouse.y = newy;
+ set_mouse_pos(event.mouse.x, event.mouse.y);
break;
}
@@ -932,32 +932,32 @@ bool OSystem_MorphOS::poll_event(Event *event)
switch (ScummMsg->Code)
{
case SELECTDOWN:
- event->event_code = EVENT_LBUTTONDOWN;
+ event.event_code = EVENT_LBUTTONDOWN;
break;
case SELECTUP:
- event->event_code = EVENT_LBUTTONUP;
+ event.event_code = EVENT_LBUTTONUP;
break;
case MENUDOWN:
- event->event_code = EVENT_RBUTTONDOWN;
+ event.event_code = EVENT_RBUTTONDOWN;
break;
case MENUUP:
- event->event_code = EVENT_RBUTTONUP;
+ event.event_code = EVENT_RBUTTONUP;
break;
default:
ReplyMsg((Message *)ScummMsg);
return false;
}
- event->mouse.x = newx;
- event->mouse.y = newy;
+ event.mouse.x = newx;
+ event.mouse.y = newy;
break;
}
case IDCMP_CLOSEWINDOW:
- event->event_code = EVENT_QUIT;
+ event.event_code = EVENT_QUIT;
break;
}
@@ -1007,7 +1007,7 @@ void OSystem_MorphOS::warpMouse(int x, int y)
}
}
-void OSystem_MorphOS::set_shake_pos(int shake_pos)
+void OSystem_MorphOS::setShakePos(int shake_pos)
{
ScummShakePos = shake_pos;
AddUpdateRect(0, 0, ScummBufferWidth, ScummBufferHeight);
diff --git a/backends/morphos/morphos.h b/backends/morphos/morphos.h
index 0279bc3517..30c7c04edf 100644
--- a/backends/morphos/morphos.h
+++ b/backends/morphos/morphos.h
@@ -66,7 +66,7 @@ class OSystem_MorphOS : public OSystem
virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, byte keycolor);
// Shaking is used in SCUMM. Set current shake position.
- virtual void set_shake_pos(int shake_pos);
+ virtual void setShakePos(int shake_pos);
// Overlay
virtual void showOverlay();
@@ -78,10 +78,10 @@ class OSystem_MorphOS : public OSystem
virtual int16 getWidth();
// Get the number of milliseconds since the program was started.
- virtual uint32 get_msecs();
+ virtual uint32 getMillis();
// Delay for a specified amount of milliseconds
- virtual void delay_msecs(uint msecs);
+ virtual void delayMillis(uint msecs);
// Add a new callback timer
virtual void setTimerCallback(TimerProc callback, int timer);
@@ -94,7 +94,7 @@ class OSystem_MorphOS : public OSystem
// Get the next event.
// Returns true if an event was retrieved.
- virtual bool poll_event(Event *event);
+ virtual bool pollEvent(Event &event);
// Moves mouse pointer to specified position
virtual void warpMouse(int x, int y);
@@ -108,16 +108,16 @@ class OSystem_MorphOS : public OSystem
// Poll cdrom status
// Returns true if cd audio is playing
- virtual bool poll_cdrom();
+ virtual bool pollCD();
// Play cdrom audio track
- virtual void play_cdrom(int track, int num_loops, int start_frame, int duration);
+ virtual void playCD(int track, int num_loops, int start_frame, int duration);
// Stop cdrom audio track
- virtual void stop_cdrom();
+ virtual void stopCD();
// Update cdrom audio status
- virtual void update_cdrom();
+ virtual void updateCD();
// Quit
virtual void quit();
diff --git a/backends/null/null.cpp b/backends/null/null.cpp
index ff23217483..5e9e3290d4 100644
--- a/backends/null/null.cpp
+++ b/backends/null/null.cpp
@@ -52,7 +52,7 @@ public:
virtual void setPalette(const byte *colors, uint start, uint num);
virtual void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h);
virtual void updateScreen();
- virtual void set_shake_pos(int shakeOffset);
+ virtual void setShakePos(int shakeOffset);
virtual void showOverlay();
virtual void hideOverlay();
@@ -70,9 +70,9 @@ public:
virtual void warpMouse(int x, int y);
virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, byte keycolor = 255);
- virtual bool poll_event(Event *event);
- virtual uint32 get_msecs();
- virtual void delay_msecs(uint msecs);
+ virtual bool pollEvent(Event &event);
+ virtual uint32 getMillis();
+ virtual void delayMillis(uint msecs);
virtual void setTimerCallback(TimerProc callback, int interval);
@@ -86,11 +86,11 @@ public:
virtual int getOutputSampleRate() const;
virtual bool openCD(int drive);
- virtual bool poll_cdrom();
+ virtual bool pollCD();
- virtual void play_cdrom(int track, int num_loops, int start_frame, int duration);
- virtual void stop_cdrom();
- virtual void update_cdrom();
+ virtual void playCD(int track, int num_loops, int start_frame, int duration);
+ virtual void stopCD();
+ virtual void updateCD();
virtual void quit();
@@ -98,7 +98,7 @@ public:
virtual void displayMessageOnOSD(const char *msg);
- virtual SaveFileManager *get_savefile_manager();
+ virtual SaveFileManager *getSavefileManager();
};
@@ -180,7 +180,7 @@ void OSystem_NULL::updateScreen()
{
}
-void OSystem_NULL::set_shake_pos(int shakeOffset)
+void OSystem_NULL::setShakePos(int shakeOffset)
{
}
@@ -236,17 +236,17 @@ void OSystem_NULL::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX,
{
}
-bool OSystem_NULL::poll_event(Event *event)
+bool OSystem_NULL::pollEvent(Event &event)
{
return false;
}
-uint32 OSystem_NULL::get_msecs()
+uint32 OSystem_NULL::getMillis()
{
return 0;
}
-void OSystem_NULL::delay_msecs(uint msecs)
+void OSystem_NULL::delayMillis(uint msecs)
{
}
@@ -290,20 +290,20 @@ bool OSystem_NULL::openCD(int drive)
return true;
}
-bool OSystem_NULL::poll_cdrom()
+bool OSystem_NULL::pollCD()
{
return true;
}
-void OSystem_NULL::play_cdrom(int track, int num_loops, int start_frame, int duration)
+void OSystem_NULL::playCD(int track, int num_loops, int start_frame, int duration)
{
}
-void OSystem_NULL::stop_cdrom()
+void OSystem_NULL::stopCD()
{
}
-void OSystem_NULL::update_cdrom()
+void OSystem_NULL::updateCD()
{
}
@@ -319,7 +319,7 @@ void OSystem_NULL::displayMessageOnOSD(const char *msg)
{
}
-SaveFileManager* OSystem_NULL::get_savefile_manager()
+SaveFileManager* OSystem_NULL::getSavefileManager()
{
return NULL;
}
diff --git a/backends/sdl/events.cpp b/backends/sdl/events.cpp
index e017b2dc77..48686908a7 100644
--- a/backends/sdl/events.cpp
+++ b/backends/sdl/events.cpp
@@ -88,7 +88,7 @@ void OSystem_SDL::fillMouseEvent(Event &event, int x, int y) {
}
void OSystem_SDL::kbd_mouse() {
- uint32 curTime = get_msecs();
+ uint32 curTime = getMillis();
if (curTime >= km.last_time + km.delay_time) {
km.last_time = curTime;
if (km.x_down_count == 1) {
@@ -156,7 +156,7 @@ void OSystem_SDL::kbd_mouse() {
}
}
-bool OSystem_SDL::poll_event(Event *event) {
+bool OSystem_SDL::pollEvent(Event &event) {
SDL_Event ev;
int axis;
byte b = 0;
@@ -166,7 +166,7 @@ bool OSystem_SDL::poll_event(Event *event) {
// If the screen mode changed, send an EVENT_SCREEN_CHANGED
if (_modeChanged) {
_modeChanged = false;
- event->event_code = EVENT_SCREEN_CHANGED;
+ event.event_code = EVENT_SCREEN_CHANGED;
return true;
}
@@ -188,7 +188,7 @@ bool OSystem_SDL::poll_event(Event *event) {
if (ev.key.keysym.mod & KMOD_ALT)
b |= KBD_ALT;
#endif
- event->kbd.flags = b;
+ event.kbd.flags = b;
// Alt-Return and Alt-Enter toggle full screen mode
if (b == KBD_ALT && (ev.key.keysym.sym == SDLK_RETURN
@@ -233,19 +233,19 @@ bool OSystem_SDL::poll_event(Event *event) {
#ifdef MACOSX
// On Macintosh', Cmd-Q quits
if ((ev.key.keysym.mod & KMOD_META) && ev.key.keysym.sym == 'q') {
- event->event_code = EVENT_QUIT;
+ event.event_code = EVENT_QUIT;
return true;
}
#elif defined(UNIX)
// On other unices, Control-Q quits
if ((ev.key.keysym.mod & KMOD_CTRL) && ev.key.keysym.sym == 'q') {
- event->event_code = EVENT_QUIT;
+ event.event_code = EVENT_QUIT;
return true;
}
#else
// Ctrl-z and Alt-X quit
if ((b == KBD_CTRL && ev.key.keysym.sym == 'z') || (b == KBD_ALT && ev.key.keysym.sym == 'x')) {
- event->event_code = EVENT_QUIT;
+ event.event_code = EVENT_QUIT;
return true;
}
#endif
@@ -351,28 +351,28 @@ bool OSystem_SDL::poll_event(Event *event) {
#ifdef LINUPY
// On Yopy map the End button to quit
if ((ev.key.keysym.sym==293)) {
- event->event_code = EVENT_QUIT;
+ event.event_code = EVENT_QUIT;
return true;
}
// Map menu key to f5 (scumm menu)
if (ev.key.keysym.sym==306) {
- event->event_code = EVENT_KEYDOWN;
- event->kbd.keycode = SDLK_F5;
- event->kbd.ascii = mapKey(SDLK_F5, ev.key.keysym.mod, 0);
+ event.event_code = EVENT_KEYDOWN;
+ event.kbd.keycode = SDLK_F5;
+ event.kbd.ascii = mapKey(SDLK_F5, ev.key.keysym.mod, 0);
return true;
}
// Map action key to action
if (ev.key.keysym.sym==291) {
- event->event_code = EVENT_KEYDOWN;
- event->kbd.keycode = SDLK_TAB;
- event->kbd.ascii = mapKey(SDLK_TAB, ev.key.keysym.mod, 0);
+ event.event_code = EVENT_KEYDOWN;
+ event.kbd.keycode = SDLK_TAB;
+ event.kbd.ascii = mapKey(SDLK_TAB, ev.key.keysym.mod, 0);
return true;
}
// Map OK key to skip cinematic
if (ev.key.keysym.sym==292) {
- event->event_code = EVENT_KEYDOWN;
- event->kbd.keycode = SDLK_ESCAPE;
- event->kbd.ascii = mapKey(SDLK_ESCAPE, ev.key.keysym.mod, 0);
+ event.event_code = EVENT_KEYDOWN;
+ event.kbd.keycode = SDLK_ESCAPE;
+ event.kbd.ascii = mapKey(SDLK_ESCAPE, ev.key.keysym.mod, 0);
return true;
}
#endif
@@ -380,41 +380,41 @@ bool OSystem_SDL::poll_event(Event *event) {
#ifdef QTOPIA
// quit on fn+backspace on zaurus
if (ev.key.keysym.sym == 127) {
- event->event_code = EVENT_QUIT;
+ event.event_code = EVENT_QUIT;
return true;
}
// map menu key (f11) to f5 (scumm menu)
if (ev.key.keysym.sym == SDLK_F11) {
- event->event_code = EVENT_KEYDOWN;
- event->kbd.keycode = SDLK_F5;
- event->kbd.ascii = mapKey(SDLK_F5, ev.key.keysym.mod, 0);
+ event.event_code = EVENT_KEYDOWN;
+ event.kbd.keycode = SDLK_F5;
+ event.kbd.ascii = mapKey(SDLK_F5, ev.key.keysym.mod, 0);
}
// map center (space) to tab (default action )
// I wanted to map the calendar button but the calendar comes up
//
else if (ev.key.keysym.sym == SDLK_SPACE) {
- event->event_code = EVENT_KEYDOWN;
- event->kbd.keycode = SDLK_TAB;
- event->kbd.ascii = mapKey(SDLK_TAB, ev.key.keysym.mod, 0);
+ event.event_code = EVENT_KEYDOWN;
+ event.kbd.keycode = SDLK_TAB;
+ event.kbd.ascii = mapKey(SDLK_TAB, ev.key.keysym.mod, 0);
}
// since we stole space (pause) above we'll rebind it to the tab key on the keyboard
else if (ev.key.keysym.sym == SDLK_TAB) {
- event->event_code = EVENT_KEYDOWN;
- event->kbd.keycode = SDLK_SPACE;
- event->kbd.ascii = mapKey(SDLK_SPACE, ev.key.keysym.mod, 0);
+ event.event_code = EVENT_KEYDOWN;
+ event.kbd.keycode = SDLK_SPACE;
+ event.kbd.ascii = mapKey(SDLK_SPACE, ev.key.keysym.mod, 0);
} else {
// let the events fall through if we didn't change them, this may not be the best way to
// set it up, but i'm not sure how sdl would like it if we let if fall through then redid it though.
// and yes i have an huge terminal size so i dont wrap soon enough.
- event->event_code = EVENT_KEYDOWN;
- event->kbd.keycode = ev.key.keysym.sym;
- event->kbd.ascii = mapKey(ev.key.keysym.sym, ev.key.keysym.mod, ev.key.keysym.unicode);
+ event.event_code = EVENT_KEYDOWN;
+ event.kbd.keycode = ev.key.keysym.sym;
+ event.kbd.ascii = mapKey(ev.key.keysym.sym, ev.key.keysym.mod, ev.key.keysym.unicode);
}
#else
- event->event_code = EVENT_KEYDOWN;
- event->kbd.keycode = ev.key.keysym.sym;
- event->kbd.ascii = mapKey(ev.key.keysym.sym, ev.key.keysym.mod, ev.key.keysym.unicode);
+ event.event_code = EVENT_KEYDOWN;
+ event.kbd.keycode = ev.key.keysym.sym;
+ event.kbd.ascii = mapKey(ev.key.keysym.sym, ev.key.keysym.mod, ev.key.keysym.unicode);
#endif
switch(ev.key.keysym.sym) {
@@ -441,9 +441,9 @@ bool OSystem_SDL::poll_event(Event *event) {
return true;
case SDL_KEYUP:
- event->event_code = EVENT_KEYUP;
- event->kbd.keycode = ev.key.keysym.sym;
- event->kbd.ascii = mapKey(ev.key.keysym.sym, ev.key.keysym.mod, ev.key.keysym.unicode);
+ event.event_code = EVENT_KEYUP;
+ event.kbd.keycode = ev.key.keysym.sym;
+ event.kbd.ascii = mapKey(ev.key.keysym.sym, ev.key.keysym.mod, ev.key.keysym.unicode);
switch(ev.key.keysym.sym) {
case SDLK_LEFT:
@@ -476,64 +476,64 @@ bool OSystem_SDL::poll_event(Event *event) {
return true;
case SDL_MOUSEMOTION:
- event->event_code = EVENT_MOUSEMOVE;
- fillMouseEvent(*event, ev.motion.x, ev.motion.y);
+ event.event_code = EVENT_MOUSEMOVE;
+ fillMouseEvent(event, ev.motion.x, ev.motion.y);
- set_mouse_pos(event->mouse.x, event->mouse.y);
+ set_mouse_pos(event.mouse.x, event.mouse.y);
return true;
case SDL_MOUSEBUTTONDOWN:
if (ev.button.button == SDL_BUTTON_LEFT)
- event->event_code = EVENT_LBUTTONDOWN;
+ event.event_code = EVENT_LBUTTONDOWN;
else if (ev.button.button == SDL_BUTTON_RIGHT)
- event->event_code = EVENT_RBUTTONDOWN;
+ event.event_code = EVENT_RBUTTONDOWN;
#if defined(SDL_BUTTON_WHEELUP) && defined(SDL_BUTTON_WHEELDOWN)
else if (ev.button.button == SDL_BUTTON_WHEELUP)
- event->event_code = EVENT_WHEELUP;
+ event.event_code = EVENT_WHEELUP;
else if (ev.button.button == SDL_BUTTON_WHEELDOWN)
- event->event_code = EVENT_WHEELDOWN;
+ event.event_code = EVENT_WHEELDOWN;
#endif
else
break;
- fillMouseEvent(*event, ev.button.x, ev.button.y);
+ fillMouseEvent(event, ev.button.x, ev.button.y);
return true;
case SDL_MOUSEBUTTONUP:
if (ev.button.button == SDL_BUTTON_LEFT)
- event->event_code = EVENT_LBUTTONUP;
+ event.event_code = EVENT_LBUTTONUP;
else if (ev.button.button == SDL_BUTTON_RIGHT)
- event->event_code = EVENT_RBUTTONUP;
+ event.event_code = EVENT_RBUTTONUP;
else
break;
- fillMouseEvent(*event, ev.button.x, ev.button.y);
+ fillMouseEvent(event, ev.button.x, ev.button.y);
return true;
case SDL_JOYBUTTONDOWN:
if (ev.jbutton.button == JOY_BUT_LMOUSE) {
- event->event_code = EVENT_LBUTTONDOWN;
+ event.event_code = EVENT_LBUTTONDOWN;
} else if (ev.jbutton.button == JOY_BUT_RMOUSE) {
- event->event_code = EVENT_RBUTTONDOWN;
+ event.event_code = EVENT_RBUTTONDOWN;
} else {
- event->event_code = EVENT_KEYDOWN;
+ event.event_code = EVENT_KEYDOWN;
switch (ev.jbutton.button) {
case JOY_BUT_ESCAPE:
- event->kbd.keycode = SDLK_ESCAPE;
- event->kbd.ascii = mapKey(SDLK_ESCAPE, ev.key.keysym.mod, 0);
+ event.kbd.keycode = SDLK_ESCAPE;
+ event.kbd.ascii = mapKey(SDLK_ESCAPE, ev.key.keysym.mod, 0);
break;
case JOY_BUT_PERIOD:
- event->kbd.keycode = SDLK_PERIOD;
- event->kbd.ascii = mapKey(SDLK_PERIOD, ev.key.keysym.mod, 0);
+ event.kbd.keycode = SDLK_PERIOD;
+ event.kbd.ascii = mapKey(SDLK_PERIOD, ev.key.keysym.mod, 0);
break;
case JOY_BUT_SPACE:
- event->kbd.keycode = SDLK_SPACE;
- event->kbd.ascii = mapKey(SDLK_SPACE, ev.key.keysym.mod, 0);
+ event.kbd.keycode = SDLK_SPACE;
+ event.kbd.ascii = mapKey(SDLK_SPACE, ev.key.keysym.mod, 0);
break;
case JOY_BUT_F5:
- event->kbd.keycode = SDLK_F5;
- event->kbd.ascii = mapKey(SDLK_F5, ev.key.keysym.mod, 0);
+ event.kbd.keycode = SDLK_F5;
+ event.kbd.ascii = mapKey(SDLK_F5, ev.key.keysym.mod, 0);
break;
}
}
@@ -541,27 +541,27 @@ bool OSystem_SDL::poll_event(Event *event) {
case SDL_JOYBUTTONUP:
if (ev.jbutton.button == JOY_BUT_LMOUSE) {
- event->event_code = EVENT_LBUTTONUP;
+ event.event_code = EVENT_LBUTTONUP;
} else if (ev.jbutton.button == JOY_BUT_RMOUSE) {
- event->event_code = EVENT_RBUTTONUP;
+ event.event_code = EVENT_RBUTTONUP;
} else {
- event->event_code = EVENT_KEYUP;
+ event.event_code = EVENT_KEYUP;
switch (ev.jbutton.button) {
case JOY_BUT_ESCAPE:
- event->kbd.keycode = SDLK_ESCAPE;
- event->kbd.ascii = mapKey(SDLK_ESCAPE, ev.key.keysym.mod, 0);
+ event.kbd.keycode = SDLK_ESCAPE;
+ event.kbd.ascii = mapKey(SDLK_ESCAPE, ev.key.keysym.mod, 0);
break;
case JOY_BUT_PERIOD:
- event->kbd.keycode = SDLK_PERIOD;
- event->kbd.ascii = mapKey(SDLK_PERIOD, ev.key.keysym.mod, 0);
+ event.kbd.keycode = SDLK_PERIOD;
+ event.kbd.ascii = mapKey(SDLK_PERIOD, ev.key.keysym.mod, 0);
break;
case JOY_BUT_SPACE:
- event->kbd.keycode = SDLK_SPACE;
- event->kbd.ascii = mapKey(SDLK_SPACE, ev.key.keysym.mod, 0);
+ event.kbd.keycode = SDLK_SPACE;
+ event.kbd.ascii = mapKey(SDLK_SPACE, ev.key.keysym.mod, 0);
break;
case JOY_BUT_F5:
- event->kbd.keycode = SDLK_F5;
- event->kbd.ascii = mapKey(SDLK_F5, ev.key.keysym.mod, 0);
+ event.kbd.keycode = SDLK_F5;
+ event.kbd.ascii = mapKey(SDLK_F5, ev.key.keysym.mod, 0);
break;
}
}
@@ -571,10 +571,10 @@ bool OSystem_SDL::poll_event(Event *event) {
axis = ev.jaxis.value;
if ( axis > JOY_DEADZONE) {
axis -= JOY_DEADZONE;
- event->event_code = EVENT_MOUSEMOVE;
+ event.event_code = EVENT_MOUSEMOVE;
} else if ( axis < -JOY_DEADZONE ) {
axis += JOY_DEADZONE;
- event->event_code = EVENT_MOUSEMOVE;
+ event.event_code = EVENT_MOUSEMOVE;
} else
axis = 0;
@@ -610,7 +610,7 @@ bool OSystem_SDL::poll_event(Event *event) {
#endif
}
- fillMouseEvent(*event, km.x, km.y);
+ fillMouseEvent(event, km.x, km.y);
return true;
@@ -619,7 +619,7 @@ bool OSystem_SDL::poll_event(Event *event) {
break;
case SDL_QUIT:
- event->event_code = EVENT_QUIT;
+ event.event_code = EVENT_QUIT;
return true;
}
}
diff --git a/backends/sdl/graphics.cpp b/backends/sdl/graphics.cpp
index 89958d6440..af817ddd78 100644
--- a/backends/sdl/graphics.cpp
+++ b/backends/sdl/graphics.cpp
@@ -720,7 +720,7 @@ void OSystem_SDL::setPalette(const byte *colors, uint start, uint num) {
_paletteDirtyEnd = start + num;
}
-void OSystem_SDL::set_shake_pos(int shake_pos) {
+void OSystem_SDL::setShakePos(int shake_pos) {
_newShakePos = shake_pos;
}
diff --git a/backends/sdl/sdl-common.h b/backends/sdl/sdl-common.h
index 3c1e600eaa..6ccaf26a07 100644
--- a/backends/sdl/sdl-common.h
+++ b/backends/sdl/sdl-common.h
@@ -67,17 +67,17 @@ public:
void setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, byte keycolor);
// Shaking is used in SCUMM. Set current shake position.
- void set_shake_pos(int shake_pos);
+ void setShakePos(int shake_pos);
// Get the number of milliseconds since the program was started.
- uint32 get_msecs();
+ uint32 getMillis();
// Delay for a specified amount of milliseconds
- void delay_msecs(uint msecs);
+ void delayMillis(uint msecs);
// Get the next event.
// Returns true if an event was retrieved.
- bool poll_event(Event *event);
+ bool pollEvent(Event &event);
// Set function that generates samples
bool setSoundCallback(SoundProc proc, void *param);
@@ -86,16 +86,16 @@ public:
// Poll CD status
// Returns true if cd audio is playing
- bool poll_cdrom();
+ bool pollCD();
// Play CD audio track
- void play_cdrom(int track, int num_loops, int start_frame, int duration);
+ void playCD(int track, int num_loops, int start_frame, int duration);
// Stop CD audio track
- void stop_cdrom();
+ void stopCD();
// Update CD audio status
- void update_cdrom();
+ void updateCD();
// Quit
void quit();
diff --git a/backends/sdl/sdl.cpp b/backends/sdl/sdl.cpp
index c7292ad554..f6ad91b452 100644
--- a/backends/sdl/sdl.cpp
+++ b/backends/sdl/sdl.cpp
@@ -128,11 +128,11 @@ OSystem_SDL::~OSystem_SDL() {
SDL_Quit();
}
-uint32 OSystem_SDL::get_msecs() {
+uint32 OSystem_SDL::getMillis() {
return SDL_GetTicks();
}
-void OSystem_SDL::delay_msecs(uint msecs) {
+void OSystem_SDL::delayMillis(uint msecs) {
SDL_Delay(msecs);
}
@@ -343,12 +343,12 @@ bool OSystem_SDL::openCD(int drive) {
return (_cdrom != NULL);
}
-void OSystem_SDL::stop_cdrom() { /* Stop CD Audio in 1/10th of a second */
+void OSystem_SDL::stopCD() { /* Stop CD Audio in 1/10th of a second */
cd_stop_time = SDL_GetTicks() + 100;
cd_num_loops = 0;
}
-void OSystem_SDL::play_cdrom(int track, int num_loops, int start_frame, int duration) {
+void OSystem_SDL::playCD(int track, int num_loops, int start_frame, int duration) {
if (!num_loops && !start_frame)
return;
@@ -372,14 +372,14 @@ void OSystem_SDL::play_cdrom(int track, int num_loops, int start_frame, int dura
cd_end_time = SDL_GetTicks() + _cdrom->track[track].length * 1000 / CD_FPS;
}
-bool OSystem_SDL::poll_cdrom() {
+bool OSystem_SDL::pollCD() {
if (!_cdrom)
return false;
return (cd_num_loops != 0 && (SDL_GetTicks() < cd_end_time || SDL_CDStatus(_cdrom) != CD_STOPPED));
}
-void OSystem_SDL::update_cdrom() {
+void OSystem_SDL::updateCD() {
if (!_cdrom)
return;
diff --git a/backends/wince/wince-sdl.cpp b/backends/wince/wince-sdl.cpp
index f2c2e3a4ca..b6fa512773 100644
--- a/backends/wince/wince-sdl.cpp
+++ b/backends/wince/wince-sdl.cpp
@@ -1290,7 +1290,7 @@ void OSystem_WINCE3::add_dirty_rect(int x, int y, int w, int h) {
// FIXME
// See if some SDL mapping can be useful for HPCs
-bool OSystem_WINCE3::poll_event(Event *event) {
+bool OSystem_WINCE3::pollEvent(Event &event) {
SDL_Event ev;
byte b = 0;
Event temp_event;
diff --git a/backends/wince/wince-sdl.h b/backends/wince/wince-sdl.h
index 53b546a708..5f2813295e 100644
--- a/backends/wince/wince-sdl.h
+++ b/backends/wince/wince-sdl.h
@@ -46,7 +46,7 @@ public:
void initSize(uint w, uint h);
// Overloaded from SDL_Common (toolbar handling)
- bool poll_event(Event *event);
+ bool pollEvent(Event &event);
// Overloaded from SDL_Common (toolbar handling)
void draw_mouse();
// Overloaded from SDL_Common (mouse and new scaler handling)
diff --git a/backends/x11/x11.cpp b/backends/x11/x11.cpp
index cbf4e90555..2fa8398e29 100644
--- a/backends/x11/x11.cpp
+++ b/backends/x11/x11.cpp
@@ -108,17 +108,17 @@ public:
void setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y, byte keycolor);
// Shaking is used in SCUMM. Set current shake position.
- void set_shake_pos(int shake_pos);
+ void setShakePos(int shake_pos);
// Get the number of milliseconds since the program was started.
- uint32 get_msecs();
+ uint32 getMillis();
// Delay for a specified amount of milliseconds
- void delay_msecs(uint msecs);
+ void delayMillis(uint msecs);
// Get the next event.
// Returns true if an event was retrieved.
- bool poll_event(Event *event);
+ bool pollEvent(Event &event);
// Set function that generates samples
bool setSoundCallback(SoundProc proc, void *param);
@@ -133,16 +133,16 @@ public:
// Poll cdrom status
// Returns true if cd audio is playing
- bool poll_cdrom();
+ bool pollCD();
// Play cdrom audio track
- void play_cdrom(int track, int num_loops, int start_frame, int duration);
+ void playCD(int track, int num_loops, int start_frame, int duration);
// Stop cdrom audio track
- void stop_cdrom();
+ void stopCD();
// Update cdrom audio status
- void update_cdrom();
+ void updateCD();
// Quit
void quit();
@@ -462,7 +462,7 @@ int OSystem_X11::getGraphicsMode() const {
}
-uint32 OSystem_X11::get_msecs() {
+uint32 OSystem_X11::getMillis() {
struct timeval current_time;
gettimeofday(&current_time, NULL);
return (uint32)(((current_time.tv_sec - start_time.tv_sec) * 1000) +
@@ -789,7 +789,7 @@ void OSystem_X11::setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x,
_mouse_state_changed = true;
}
-void OSystem_X11::set_shake_pos(int shake_pos) {
+void OSystem_X11::setShakePos(int shake_pos) {
if (new_shake_pos != shake_pos) {
if (_mouse_state_changed == false) {
undraw_mouse();
@@ -807,26 +807,26 @@ bool OSystem_X11::openCD(int drive) {
return false;
}
-bool OSystem_X11::poll_cdrom() {
+bool OSystem_X11::pollCD() {
return false;
}
-void OSystem_X11::play_cdrom(int track, int num_loops, int start_frame, int duration) {
+void OSystem_X11::playCD(int track, int num_loops, int start_frame, int duration) {
}
-void OSystem_X11::stop_cdrom() {
+void OSystem_X11::stopCD() {
}
-void OSystem_X11::update_cdrom() {
+void OSystem_X11::updateCD() {
}
-void OSystem_X11::delay_msecs(uint msecs) {
+void OSystem_X11::delayMillis(uint msecs) {
usleep(msecs * 1000);
}
-bool OSystem_X11::poll_event(Event *scumm_event) {
+bool OSystem_X11::pollEvent(Event &scumm_event) {
/* First, handle timers */
- uint32 current_msecs = get_msecs();
+ uint32 current_msecs = getMillis();
if (_timer_active && (current_msecs >= _timer_next_expiry)) {
_timer_duration = _timer_callback(_timer_duration);
@@ -923,10 +923,10 @@ bool OSystem_X11::poll_event(Event *scumm_event) {
}
}
if (keycode != -1) {
- scumm_event->event_code = EVENT_KEYDOWN;
- scumm_event->kbd.keycode = keycode;
- scumm_event->kbd.ascii = (ascii != -1 ? ascii : keycode);
- scumm_event->kbd.flags = mode;
+ scumm_event.event_code = EVENT_KEYDOWN;
+ scumm_event.kbd.keycode = keycode;
+ scumm_event.kbd.ascii = (ascii != -1 ? ascii : keycode);
+ scumm_event.kbd.flags = mode;
return true;
}
}
@@ -965,10 +965,10 @@ bool OSystem_X11::poll_event(Event *scumm_event) {
}
}
if (keycode != -1) {
- scumm_event->event_code = EVENT_KEYUP;
- scumm_event->kbd.keycode = keycode;
- scumm_event->kbd.ascii = (ascii != -1 ? ascii : keycode);
- scumm_event->kbd.flags = mode;
+ scumm_event.event_code = EVENT_KEYUP;
+ scumm_event.kbd.keycode = keycode;
+ scumm_event.kbd.ascii = (ascii != -1 ? ascii : keycode);
+ scumm_event.kbd.flags = mode;
return true;
}
}
@@ -978,14 +978,14 @@ bool OSystem_X11::poll_event(Event *scumm_event) {
if (report_presses != 0) {
if (event.xbutton.button == 1) {
if (fake_right_mouse == 0) {
- scumm_event->event_code = EVENT_LBUTTONDOWN;
+ scumm_event.event_code = EVENT_LBUTTONDOWN;
} else {
- scumm_event->event_code = EVENT_RBUTTONDOWN;
+ scumm_event.event_code = EVENT_RBUTTONDOWN;
}
} else if (event.xbutton.button == 3)
- scumm_event->event_code = EVENT_RBUTTONDOWN;
- scumm_event->mouse.x = event.xbutton.x - scumm_x;
- scumm_event->mouse.y = event.xbutton.y - scumm_y;
+ scumm_event.event_code = EVENT_RBUTTONDOWN;
+ scumm_event.mouse.x = event.xbutton.x - scumm_x;
+ scumm_event.mouse.y = event.xbutton.y - scumm_y;
return true;
}
break;
@@ -994,23 +994,23 @@ bool OSystem_X11::poll_event(Event *scumm_event) {
if (report_presses != 0) {
if (event.xbutton.button == 1) {
if (fake_right_mouse == 0) {
- scumm_event->event_code = EVENT_LBUTTONUP;
+ scumm_event.event_code = EVENT_LBUTTONUP;
} else {
- scumm_event->event_code = EVENT_RBUTTONUP;
+ scumm_event.event_code = EVENT_RBUTTONUP;
}
} else if (event.xbutton.button == 3)
- scumm_event->event_code = EVENT_RBUTTONUP;
- scumm_event->mouse.x = event.xbutton.x - scumm_x;
- scumm_event->mouse.y = event.xbutton.y - scumm_y;
+ scumm_event.event_code = EVENT_RBUTTONUP;
+ scumm_event.mouse.x = event.xbutton.x - scumm_x;
+ scumm_event.mouse.y = event.xbutton.y - scumm_y;
return true;
}
break;
case MotionNotify:
- scumm_event->event_code = EVENT_MOUSEMOVE;
- scumm_event->mouse.x = event.xmotion.x - scumm_x;
- scumm_event->mouse.y = event.xmotion.y - scumm_y;
- set_mouse_pos(scumm_event->mouse.x, scumm_event->mouse.y);
+ scumm_event.event_code = EVENT_MOUSEMOVE;
+ scumm_event.mouse.x = event.xmotion.x - scumm_x;
+ scumm_event.mouse.y = event.xmotion.y - scumm_y;
+ set_mouse_pos(scumm_event.mouse.x, scumm_event.mouse.y);
return true;
case ConfigureNotify:{
@@ -1036,7 +1036,7 @@ bool OSystem_X11::poll_event(Event *scumm_event) {
void OSystem_X11::setTimerCallback(TimerProc callback, int interval) {
if (callback != NULL) {
_timer_duration = interval;
- _timer_next_expiry = get_msecs() + interval;
+ _timer_next_expiry = getMillis() + interval;
_timer_callback = callback;
_timer_active = true;
} else {
diff --git a/base/engine.cpp b/base/engine.cpp
index abec0afe2c..dd066385f3 100644
--- a/base/engine.cpp
+++ b/base/engine.cpp
@@ -46,7 +46,7 @@ Engine::Engine(OSystem *syst)
g_debugLevel = ConfMan.getInt("debuglevel");
- _saveFileMan = _system->get_savefile_manager();
+ _saveFileMan = _system->getSavefileManager();
}
Engine::~Engine() {
diff --git a/common/system.cpp b/common/system.cpp
index bc65a5f21e..be85659eda 100644
--- a/common/system.cpp
+++ b/common/system.cpp
@@ -92,7 +92,7 @@ void OSystem::displayMessageOnOSD(const char *msg) {
dialog.runModal();
}
-SaveFileManager *OSystem::get_savefile_manager() {
+SaveFileManager *OSystem::getSavefileManager() {
return new DefaultSaveFileManager();
}
diff --git a/common/system.h b/common/system.h
index f3cad4f9b6..f962b9efe9 100644
--- a/common/system.h
+++ b/common/system.h
@@ -277,7 +277,7 @@ public:
* frontend - we should consider removing it from the backend API
* and instead implement the functionality in the frontend.
*/
- virtual void set_shake_pos(int shakeOffset) = 0;
+ virtual void setShakePos(int shakeOffset) = 0;
//@}
@@ -383,7 +383,7 @@ public:
/**
* Data structure for an event. A pointer to an instance of Event
- * can be passed to poll_event.
+ * can be passed to pollEvent.
*/
struct Event {
/** The type of the event. */
@@ -433,13 +433,13 @@ public:
* @param event point to an Event struct, which will be filled with the event data.
* @return true if an event was retrieved.
*/
- virtual bool poll_event(Event *event) = 0;
+ virtual bool pollEvent(Event &event) = 0;
/** Get the number of milliseconds since the program was started. */
- virtual uint32 get_msecs() = 0;
+ virtual uint32 getMillis() = 0;
/** Delay/sleep for the specified amount of milliseconds. */
- virtual void delay_msecs(uint msecs) = 0;
+ virtual void delayMillis(uint msecs) = 0;
/**
* Set the timer callback, a function which is periodically invoked by the
@@ -558,7 +558,7 @@ public:
* Poll CD status.
* @return true if CD audio is playing
*/
- virtual bool poll_cdrom() = 0;
+ virtual bool pollCD() = 0;
/**
* Start audio CD playback.
@@ -567,17 +567,17 @@ public:
* @param start_frame the frame at which playback should start (75 frames = 1 second).
* @param duration the number of frames to play.
*/
- virtual void play_cdrom(int track, int num_loops, int start_frame, int duration) = 0;
+ virtual void playCD(int track, int num_loops, int start_frame, int duration) = 0;
/**
* Stop audio CD playback.
*/
- virtual void stop_cdrom() = 0;
+ virtual void stopCD() = 0;
/**
* Update cdrom audio status.
*/
- virtual void update_cdrom() = 0;
+ virtual void updateCD() = 0;
//@}
@@ -609,7 +609,7 @@ public:
virtual void displayMessageOnOSD(const char *msg);
/** Savefile management. */
- virtual SaveFileManager *get_savefile_manager();
+ virtual SaveFileManager *getSavefileManager();
//@}
};
diff --git a/common/timer.cpp b/common/timer.cpp
index f1e09a9ff0..d46d975dd3 100644
--- a/common/timer.cpp
+++ b/common/timer.cpp
@@ -43,7 +43,7 @@ Timer::Timer(OSystem *system) :
_timerSlots[i].counter = 0;
}
- _thisTime = _system->get_msecs();
+ _thisTime = _system->getMillis();
// Set the timer last, after everything has been initialised
_system->setTimerCallback(&timer_handler, 10);
@@ -79,7 +79,7 @@ int Timer::handler(int t) {
uint32 interval, l;
_lastTime = _thisTime;
- _thisTime = _system->get_msecs();
+ _thisTime = _system->getMillis();
interval = 1000 * (_thisTime - _lastTime);
for (l = 0; l < MAX_TIMERS; l++) {
diff --git a/graphics/animation.cpp b/graphics/animation.cpp
index 63f1a2fb67..42ac082ab9 100644
--- a/graphics/animation.cpp
+++ b/graphics/animation.cpp
@@ -127,7 +127,7 @@ bool BaseAnimationState::init(const char *name) {
info = mpeg2_info(decoder);
framenum = 0;
frameskipped = 0;
- ticks = _sys->get_msecs();
+ ticks = _sys->getMillis();
// Play audio
bgSoundStream = AudioStream::openStreamFile(name);
@@ -184,11 +184,11 @@ bool BaseAnimationState::decodeFrame() {
if (bgSoundStream) {
while ((_snd->getChannelElapsedTime(bgSound) * 12) / 1000 < framenum)
- _sys->delay_msecs(10);
+ _sys->delayMillis(10);
} else {
ticks += 83;
- while (_sys->get_msecs() < ticks)
- _sys->delay_msecs(10);
+ while (_sys->getMillis() < ticks)
+ _sys->delayMillis(10);
// FIXME: This used to be used for the Sword2 version of this
// method. I do not see any compelling reason why it should be
// used, but maybe I am wrong; so if you know more, either
diff --git a/gui/EditTextWidget.cpp b/gui/EditTextWidget.cpp
index daa0bfd5b0..ea24035b11 100644
--- a/gui/EditTextWidget.cpp
+++ b/gui/EditTextWidget.cpp
@@ -42,7 +42,7 @@ EditTextWidget::EditTextWidget(GuiObject *boss, int x, int y, int w, int h, cons
}
void EditTextWidget::handleTickle() {
- uint32 time = g_system->get_msecs();
+ uint32 time = g_system->getMillis();
if (_caretTime < time) {
_caretTime = time + kCaretBlinkTime;
drawCaret(_caretVisible);
diff --git a/gui/ListWidget.cpp b/gui/ListWidget.cpp
index 4ef2d6f56b..506785e332 100644
--- a/gui/ListWidget.cpp
+++ b/gui/ListWidget.cpp
@@ -88,7 +88,7 @@ void ListWidget::scrollBarRecalc() {
}
void ListWidget::handleTickle() {
- uint32 time = g_system->get_msecs();
+ uint32 time = g_system->getMillis();
if (_editMode && _caretTime < time) {
_caretTime = time + kCaretBlinkTime;
drawCaret(_caretVisible);
@@ -150,7 +150,7 @@ bool ListWidget::handleKeyDown(uint16 ascii, int keycode, int modifiers) {
// Only works in a useful fashion if the list entries are sorted.
// TODO: Maybe this should be off by default, and instead we add a
// method "enableQuickSelect()" or so ?
- uint32 time = g_system->get_msecs();
+ uint32 time = g_system->getMillis();
if (_quickSelectTime < time) {
_quickSelectStr = (char)ascii;
} else {
diff --git a/gui/PopUpWidget.cpp b/gui/PopUpWidget.cpp
index 98fbdfcfde..11524d316f 100644
--- a/gui/PopUpWidget.cpp
+++ b/gui/PopUpWidget.cpp
@@ -102,7 +102,7 @@ PopUpDialog::PopUpDialog(PopUpWidget *boss, int clickX, int clickY)
_clickY = clickY - _y;
// Time the popup was opened
- _openTime = g_system->get_msecs();
+ _openTime = g_system->getMillis();
}
void PopUpDialog::drawDialog() {
@@ -125,7 +125,7 @@ void PopUpDialog::handleMouseUp(int x, int y, int button, int clickCount) {
// Mouse was released. If it wasn't moved much since the original mouse down,
// let the popup stay open. If it did move, assume the user made his selection.
int dist = (_clickX - x) * (_clickX - x) + (_clickY - y) * (_clickY - y);
- if (dist > 3 * 3 || g_system->get_msecs() - _openTime > 300) {
+ if (dist > 3 * 3 || g_system->getMillis() - _openTime > 300) {
setResult(_selection);
close();
}
diff --git a/gui/console.cpp b/gui/console.cpp
index 325b00691d..43a6d5ca04 100644
--- a/gui/console.cpp
+++ b/gui/console.cpp
@@ -139,7 +139,7 @@ void ConsoleDialog::drawDialog() {
}
void ConsoleDialog::handleTickle() {
- uint32 time = g_system->get_msecs();
+ uint32 time = g_system->getMillis();
if (_caretTime < time) {
_caretTime = time + kCaretBlinkTime;
drawCaret(_caretVisible);
diff --git a/gui/message.cpp b/gui/message.cpp
index 95b6ecfaf4..8adb7fca4e 100644
--- a/gui/message.cpp
+++ b/gui/message.cpp
@@ -156,12 +156,12 @@ void MessageDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data
TimedMessageDialog::TimedMessageDialog(const Common::String &message, uint32 duration)
: MessageDialog(message, 0, 0) {
- _timer = g_system->get_msecs() + duration;
+ _timer = g_system->getMillis() + duration;
}
void TimedMessageDialog::handleTickle() {
MessageDialog::handleTickle();
- if (g_system->get_msecs() > _timer)
+ if (g_system->getMillis() > _timer)
close();
}
diff --git a/gui/newgui.cpp b/gui/newgui.cpp
index 767c5776c9..ab9d91c8f1 100644
--- a/gui/newgui.cpp
+++ b/gui/newgui.cpp
@@ -107,9 +107,9 @@ void NewGui::runLoop() {
_system->updateScreen();
OSystem::Event event;
- uint32 time = _system->get_msecs();
+ uint32 time = _system->getMillis();
- while (_system->poll_event(&event)) {
+ while (_system->pollEvent(event)) {
switch (event.event_code) {
case OSystem::EVENT_KEYDOWN:
#if !defined(__PALM_OS__)
@@ -177,7 +177,7 @@ void NewGui::runLoop() {
}
// Delay for a moment
- _system->delay_msecs(10);
+ _system->delayMillis(10);
}
if (didSaveState)
@@ -413,7 +413,7 @@ void NewGui::drawBitmap(uint32 *bitmap, int x, int y, OverlayColor color, int h)
// We could plug in a different cursor here if we like to.
//
void NewGui::animateCursor() {
- int time = _system->get_msecs();
+ int time = _system->getMillis();
if (time > _cursorAnimateTimer + kCursorAnimateDelay) {
const byte colors[4] = { 15, 15, 7, 8 };
const byte color = colors[_cursorAnimateCounter];
diff --git a/queen/display.cpp b/queen/display.cpp
index 00f101d40c..77ec75bec2 100644
--- a/queen/display.cpp
+++ b/queen/display.cpp
@@ -930,7 +930,7 @@ void Display::drawBox(int16 x1, int16 y1, int16 x2, int16 y2, uint8 col) {
}
void Display::shake(bool reset) {
- _system->set_shake_pos(reset ? 0 : 3);
+ _system->setShakePos(reset ? 0 : 3);
}
void Display::blankScreen() {
diff --git a/queen/input.cpp b/queen/input.cpp
index 1b6c2bdd73..4f2fee40fa 100644
--- a/queen/input.cpp
+++ b/queen/input.cpp
@@ -74,7 +74,7 @@ void Input::delay(uint amount) {
OSystem::Event event;
- uint32 start = _system->get_msecs();
+ uint32 start = _system->getMillis();
uint32 cur = start;
if (_idleTime < DELAY_SCREEN_BLANKER) {
@@ -82,7 +82,7 @@ void Input::delay(uint amount) {
}
do {
- while (_system->poll_event(&event)) {
+ while (_system->pollEvent(event)) {
_idleTime = 0;
switch (event.event_code) {
case OSystem::EVENT_KEYDOWN:
@@ -131,8 +131,8 @@ void Input::delay(uint amount) {
uint this_delay = 20; // 1?
if (this_delay > amount)
this_delay = amount;
- _system->delay_msecs(this_delay);
- cur = _system->get_msecs();
+ _system->delayMillis(this_delay);
+ cur = _system->getMillis();
} while (cur < start + amount);
}
diff --git a/queen/journal.cpp b/queen/journal.cpp
index 16bd854726..b42d858352 100644
--- a/queen/journal.cpp
+++ b/queen/journal.cpp
@@ -62,7 +62,7 @@ void Journal::use() {
OSystem *system = OSystem::instance();
while (!_quit) {
OSystem::Event event;
- while (system->poll_event(&event)) {
+ while (system->pollEvent(event)) {
switch (event.event_code) {
case OSystem::EVENT_KEYDOWN:
handleKeyDown(event.kbd.ascii, event.kbd.keycode);
@@ -83,7 +83,7 @@ void Journal::use() {
break;
}
}
- system->delay_msecs(20);
+ system->delayMillis(20);
system->updateScreen();
}
diff --git a/saga/input.cpp b/saga/input.cpp
index cc1db9bd45..62ce7e4103 100644
--- a/saga/input.cpp
+++ b/saga/input.cpp
@@ -37,7 +37,7 @@ int SagaEngine::processInput() {
R_POINT imouse_pt;
- while (g_system->poll_event(&event)) {
+ while (g_system->pollEvent(event)) {
int in_char;
switch (event.event_code) {
diff --git a/saga/saga.cpp b/saga/saga.cpp
index 62950d937d..b1868abb4a 100644
--- a/saga/saga.cpp
+++ b/saga/saga.cpp
@@ -153,7 +153,7 @@ void SagaEngine::go() {
// System initialization
- _previousTicks = _system->get_msecs();
+ _previousTicks = _system->getMillis();
// On some platforms, graphics initialization also initializes sound
// ( Win32 DirectX )... Music must be initialized before sound for
@@ -202,7 +202,7 @@ void SagaEngine::go() {
_actionMap->reg();
_objectMap->reg();
- _previousTicks = _system->get_msecs();
+ _previousTicks = _system->getMillis();
// Begin Main Engine Loop
@@ -212,9 +212,9 @@ void SagaEngine::go() {
for (;;) {
if (_render->getFlags() & RF_RENDERPAUSE) {
// Freeze time while paused
- _previousTicks = _system->get_msecs();
+ _previousTicks = _system->getMillis();
} else {
- currentTicks = _system->get_msecs();
+ currentTicks = _system->getMillis();
// Timer has rolled over after 49 days
if (currentTicks < _previousTicks)
msec = 0;
@@ -231,7 +231,7 @@ void SagaEngine::go() {
}
// Per frame processing
_render->drawScene();
- _system->delay_msecs(10);
+ _system->delayMillis(10);
}
}
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp
index 82ab0ad71c..f4bbe69e2c 100644
--- a/scumm/gfx.cpp
+++ b/scumm/gfx.cpp
@@ -393,10 +393,10 @@ void ScummEngine::drawDirtyScreenParts() {
// Handle shaking
if (_shakeEnabled) {
_shakeFrame = (_shakeFrame + 1) % NUM_SHAKE_POSITIONS;
- _system->set_shake_pos(shake_positions[_shakeFrame]);
+ _system->setShakePos(shake_positions[_shakeFrame]);
} else if (!_shakeEnabled &&_shakeFrame != 0) {
_shakeFrame = 0;
- _system->set_shake_pos(0);
+ _system->setShakePos(0);
}
}
@@ -971,7 +971,7 @@ void ScummEngine::setShake(int mode) {
_shakeEnabled = mode != 0;
_shakeFrame = 0;
- _system->set_shake_pos(0);
+ _system->setShakePos(0);
}
#pragma mark -
diff --git a/scumm/imuse.cpp b/scumm/imuse.cpp
index 69a2f127f2..00c96bb19d 100644
--- a/scumm/imuse.cpp
+++ b/scumm/imuse.cpp
@@ -1176,7 +1176,7 @@ void IMuseInternal::initMT32(MidiDriver *midi) {
// Reset the MT-32
memcpy(&buffer[0], "\x41\x10\x16\x12\x7f\x00\x00\x01\x00", 9);
midi->sysEx(buffer, 9);
- g_system->delay_msecs (100);
+ g_system->delayMillis (100);
// Compute version string (truncated to 20 chars max.)
strcat(info, gScummVMVersion);
@@ -1193,18 +1193,18 @@ void IMuseInternal::initMT32(MidiDriver *midi) {
checksum -= buffer[i];
buffer[27] = checksum & 0x7F;
midi->sysEx(buffer, 28);
- g_system->delay_msecs (500);
+ g_system->delayMillis (500);
// Setup master tune, reverb mode, reverb time, reverb level,
// channel mapping, partial reserve and master volume
memcpy(&buffer[4], "\x10\x00\x00\x40\x00\x04\x04\x04\x04\x04\x04\x04\x04\x04\x04\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x64\x77", 27);
midi->sysEx(buffer, 31);
- g_system->delay_msecs (250);
+ g_system->delayMillis (250);
// Setup rythm part
memcpy(&buffer[4], "\x03\x01\x10\x40\x64\x07\x00\x4a\x64\x06\x00\x41\x64\x07\x00\x4b\x64\x08\x00\x45\x64\x06\x00\x44\x64\x0b\x00\x51\x64\x05\x00\x43\x64\x08\x00\x50\x64\x07\x00\x42\x64\x03\x00\x4c\x64\x07\x00\x44", 48);
midi->sysEx(buffer, 52);
- g_system->delay_msecs (250);
+ g_system->delayMillis (250);
}
void IMuseInternal::init_queue() {
diff --git a/scumm/imuse_digi/dimuse_script.cpp b/scumm/imuse_digi/dimuse_script.cpp
index 2129b267e3..22a44ea8de 100644
--- a/scumm/imuse_digi/dimuse_script.cpp
+++ b/scumm/imuse_digi/dimuse_script.cpp
@@ -383,7 +383,7 @@ void IMuseDigital::stopAllSounds() {
if (!foundNotRemoved)
break;
flushTracks();
- _vm->_system->delay_msecs(50);
+ _vm->_system->delayMillis(50);
#if defined(_WIN32_WCE) || defined (__PALM_OS__)
_vm->parseEvents(); // timers are events, we need to consume them
#endif
diff --git a/scumm/input.cpp b/scumm/input.cpp
index 7cde2903c2..b8b10b975f 100644
--- a/scumm/input.cpp
+++ b/scumm/input.cpp
@@ -40,7 +40,7 @@ enum MouseButtonStatus {
void ScummEngine::parseEvents() {
OSystem::Event event;
- while (_system->poll_event(&event)) {
+ while (_system->pollEvent(event)) {
switch(event.event_code) {
case OSystem::EVENT_KEYDOWN:
diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp
index 7b77e5286c..df82e0e7b2 100644
--- a/scumm/script_v72he.cpp
+++ b/scumm/script_v72he.cpp
@@ -770,7 +770,7 @@ void ScummEngine_v72he::o72_getTimer() {
if (cmd == 10) {
checkRange(3, 1, timer, "o72_getTimer: Timer %d out of range(%d)");
- int diff = _system->get_msecs() - _timers[timer];
+ int diff = _system->getMillis() - _timers[timer];
push(diff);
} else {
push(0);
@@ -783,7 +783,7 @@ void ScummEngine_v72he::o72_setTimer() {
if (cmd == 158) {
checkRange(3, 1, timer, "o72_setTimer: Timer %d out of range(%d)");
- _timers[timer] = _system->get_msecs();
+ _timers[timer] = _system->getMillis();
} else {
error("TIMER command %d?", cmd);
}
diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp
index 5578769dab..b1b13d2a3a 100644
--- a/scumm/scumm.cpp
+++ b/scumm/scumm.cpp
@@ -1272,7 +1272,7 @@ void ScummEngine::scummInit() {
for (i = 0; i < 512; i++)
_keyDownMap[i] = false;
- _lastSaveTime = _system->get_msecs();
+ _lastSaveTime = _system->getMillis();
}
void ScummEngine_v2::scummInit() {
@@ -1382,16 +1382,16 @@ void ScummEngine::setupMusic(int midi) {
void ScummEngine::mainRun() {
int delta = 0;
- int diff = _system->get_msecs();
+ int diff = _system->getMillis();
while (!_quit) {
updatePalette();
_system->updateScreen();
- diff -= _system->get_msecs();
+ diff -= _system->getMillis();
waitForTimer(delta * 15 + diff);
- diff = _system->get_msecs();
+ diff = _system->getMillis();
delta = scummLoop(delta);
if (delta < 1) // Ensure we don't get into a loop
@@ -1411,15 +1411,15 @@ void ScummEngine::waitForTimer(int msec_delay) {
else if (_fastMode & 1)
msec_delay = 10;
- start_time = _system->get_msecs();
+ start_time = _system->getMillis();
while (!_quit) {
parseEvents();
_sound->updateCD(); // Loop CD Audio if needed
- if (_system->get_msecs() >= start_time + msec_delay)
+ if (_system->getMillis() >= start_time + msec_delay)
break;
- _system->delay_msecs(10);
+ _system->delayMillis(10);
}
}
@@ -1511,7 +1511,7 @@ int ScummEngine::scummLoop(int delta) {
}
// Trigger autosave all 5 minutes.
- if (!_saveLoadFlag && _system->get_msecs() > _lastSaveTime + 5 * 60 * 1000) {
+ if (!_saveLoadFlag && _system->getMillis() > _lastSaveTime + 5 * 60 * 1000) {
_saveLoadSlot = 0;
sprintf(_saveLoadName, "Autosave %d", _saveLoadSlot);
_saveLoadFlag = 1;
@@ -1562,7 +1562,7 @@ load_game:
clearClickedStatus();
_saveLoadFlag = 0;
- _lastSaveTime = _system->get_msecs();
+ _lastSaveTime = _system->getMillis();
}
if (_completeScreenRedraw) {
diff --git a/scumm/smush/smush_player.cpp b/scumm/smush/smush_player.cpp
index e919859954..88323adaf0 100644
--- a/scumm/smush/smush_player.cpp
+++ b/scumm/smush/smush_player.cpp
@@ -833,7 +833,7 @@ void SmushPlayer::handleFrame(Chunk &b) {
_skipNext = false;
uint32 start_time, end_time;
- start_time = _vm->_system->get_msecs();
+ start_time = _vm->_system->getMillis();
if (_insanity) {
_vm->_insane->procPreRendering();
@@ -898,7 +898,7 @@ void SmushPlayer::handleFrame(Chunk &b) {
_vm->_insane->procPostRendering(_dst, 0, 0, 0, _frame, _nbframes-1);
}
- end_time = _vm->_system->get_msecs();
+ end_time = _vm->_system->getMillis();
updateScreen();
_smixer->handleFrame();
@@ -1074,10 +1074,10 @@ void SmushPlayer::updateScreen() {
png_destroy_write_struct(&png_ptr, &info_ptr);
#endif
- uint32 end_time, start_time = _vm->_system->get_msecs();
+ uint32 end_time, start_time = _vm->_system->getMillis();
_vm->_system->copyRectToScreen(_dst, _width, 0, 0, _width, _height);
_updateNeeded = true;
- end_time = _vm->_system->get_msecs();
+ end_time = _vm->_system->getMillis();
debugC(DEBUG_SMUSH, "Smush stats: updateScreen( %03d )", end_time - start_time);
}
@@ -1175,18 +1175,18 @@ void SmushPlayer::play(const char *filename, int32 offset, int32 startFrame) {
uint32 end_time, start_time;
- start_time = _vm->_system->get_msecs();
+ start_time = _vm->_system->getMillis();
_vm->_system->updateScreen();
_updateNeeded = false;
- end_time = _vm->_system->get_msecs();
+ end_time = _vm->_system->getMillis();
debugC(DEBUG_SMUSH, "Smush stats: BackendUpdateScreen( %03d )", end_time - start_time);
}
if (_vm->_smushVideoShouldFinish || _vm->_quit || _vm->_saveLoadFlag)
break;
- _vm->_system->delay_msecs(10);
+ _vm->_system->delayMillis(10);
};
release();
diff --git a/scumm/sound.cpp b/scumm/sound.cpp
index bca0153dd8..96f01833fa 100644
--- a/scumm/sound.cpp
+++ b/scumm/sound.cpp
@@ -1150,7 +1150,7 @@ void Sound::playCDTrack(int track, int numLoops, int startFrame, int duration) {
// Start the timer after starting the track. Starting an MP3 track is
// almost instantaneous, but a CD player may take some time. Hopefully
- // play_cdrom() will block during that delay.
+ // playCD() will block during that delay.
startCDTimer();
}
diff --git a/simon/simon.cpp b/simon/simon.cpp
index c7939a6b25..c56f4fe958 100644
--- a/simon/simon.cpp
+++ b/simon/simon.cpp
@@ -4791,7 +4791,7 @@ void SimonEngine::quick_load_or_save() {
void SimonEngine::delay(uint amount) {
OSystem::Event event;
- uint32 start = _system->get_msecs();
+ uint32 start = _system->getMillis();
uint32 cur = start;
uint this_delay, vga_period;
@@ -4820,7 +4820,7 @@ void SimonEngine::delay(uint amount) {
_in_callback = false;
}
- while (_system->poll_event(&event)) {
+ while (_system->pollEvent(event)) {
switch (event.event_code) {
case OSystem::EVENT_KEYDOWN:
if (event.kbd.keycode >= '0' && event.kbd.keycode <='9'
@@ -4888,9 +4888,9 @@ void SimonEngine::delay(uint amount) {
this_delay = _fast_mode ? 1 : 20 * _speed;
if (this_delay > amount)
this_delay = amount;
- _system->delay_msecs(this_delay);
+ _system->delayMillis(this_delay);
}
- cur = _system->get_msecs();
+ cur = _system->getMillis();
} while (cur < start + amount);
}
diff --git a/sky/control.cpp b/sky/control.cpp
index 11992a1114..e1909c079c 100644
--- a/sky/control.cpp
+++ b/sky/control.cpp
@@ -1679,12 +1679,12 @@ void Control::delay(unsigned int amount) {
OSystem::Event event;
- uint32 start = _system->get_msecs();
+ uint32 start = _system->getMillis();
uint32 cur = start;
_keyPressed = 0; //reset
do {
- while (_system->poll_event(&event)) {
+ while (_system->pollEvent(event)) {
switch (event.event_code) {
case OSystem::EVENT_KEYDOWN:
// Make sure backspace works right (this fixes a small issue on OS X)
@@ -1721,9 +1721,9 @@ void Control::delay(unsigned int amount) {
if (this_delay > amount)
this_delay = amount;
- if (this_delay > 0) _system->delay_msecs(this_delay);
+ if (this_delay > 0) _system->delayMillis(this_delay);
- cur = _system->get_msecs();
+ cur = _system->getMillis();
} while (cur < start + amount);
}
diff --git a/sky/intro.cpp b/sky/intro.cpp
index 2850663755..e2e338d1bf 100644
--- a/sky/intro.cpp
+++ b/sky/intro.cpp
@@ -892,10 +892,10 @@ bool Intro::escDelay(uint32 msecs) {
OSystem::Event event;
do {
#ifdef _WIN32_WCE
- uint32 startTimeLoop = _system->get_msecs();
+ uint32 startTimeLoop = _system->getMillis();
uint32 delta;
#endif
- while (_system->poll_event(&event)) {
+ while (_system->pollEvent(event)) {
if (event.event_code == OSystem::EVENT_KEYDOWN) {
if (event.kbd.keycode == 27)
return false;
@@ -909,9 +909,9 @@ bool Intro::escDelay(uint32 msecs) {
#else
uint8 nDelay = (msecs > 50) ? (50) : ((uint8)msecs);
#endif
- _system->delay_msecs(nDelay);
+ _system->delayMillis(nDelay);
#ifdef _WIN32_WCE
- delta = _system->get_msecs() - startTimeLoop;
+ delta = _system->getMillis() - startTimeLoop;
if (delta > msecs)
break;
else
diff --git a/sky/mouse.cpp b/sky/mouse.cpp
index 2bb23dd759..bc84bcc5b3 100644
--- a/sky/mouse.cpp
+++ b/sky/mouse.cpp
@@ -167,8 +167,8 @@ void Mouse::waitMouseNotPressed(void) {
bool mousePressed = true;
OSystem::Event event;
while (mousePressed) {
- _system->delay_msecs(20);
- while (_system->poll_event(&event)) {
+ _system->delayMillis(20);
+ while (_system->pollEvent(event)) {
if ((event.event_code == OSystem::EVENT_LBUTTONUP) ||
(event.event_code == OSystem::EVENT_QUIT))
mousePressed = false;
diff --git a/sky/music/mt32music.cpp b/sky/music/mt32music.cpp
index 7dd568a291..a9ed8b693a 100644
--- a/sky/music/mt32music.cpp
+++ b/sky/music/mt32music.cpp
@@ -113,7 +113,7 @@ bool MT32Music::processPatchSysEx(uint8 *sysExData) {
crc -= sysExBuf[cnt];
sysExBuf[14] = crc & 0x7F; // crc
_midiDrv->sysEx(sysExBuf, 15);
- g_system->delay_msecs (5);
+ g_system->delayMillis (5);
return true;
}
@@ -160,7 +160,7 @@ void MT32Music::startDriver(void) {
sendBuf[len] = crc & 0x7F;
len++;
_midiDrv->sysEx(sendBuf, len);
- g_system->delay_msecs (5);
+ g_system->delayMillis (5);
}
while (processPatchSysEx(sysExData))
diff --git a/sky/screen.cpp b/sky/screen.cpp
index 2623f21dbb..6863fb16e2 100644
--- a/sky/screen.cpp
+++ b/sky/screen.cpp
@@ -249,7 +249,7 @@ void Screen::fnFadeDown(uint32 scroll) {
palette_fadedown_helper((uint32 *)_palette, GAME_COLOURS);
_system->setPalette(_palette, 0, GAME_COLOURS);
_system->updateScreen();
- _system->delay_msecs(20);
+ _system->delayMillis(20);
}
}
}
@@ -297,7 +297,7 @@ void Screen::paletteFadeUp(uint8 *pal) {
}
_system->setPalette(_palette, 0, GAME_COLOURS);
_system->updateScreen();
- _system->delay_msecs(20);
+ _system->delayMillis(20);
}
}
@@ -368,8 +368,8 @@ void Screen::waitForTimer(void) {
while (!_gotTick) {
OSystem::Event event;
- _system->delay_msecs(10);
- while (_system->poll_event(&event));
+ _system->delayMillis(10);
+ while (_system->pollEvent(event));
}
}
@@ -377,8 +377,8 @@ void Screen::waitForSequence(void) {
while (_seqInfo.running) {
OSystem::Event event;
- _system->delay_msecs(20);
- while (_system->poll_event(&event));
+ _system->delayMillis(20);
+ while (_system->pollEvent(event));
}
}
diff --git a/sky/sky.cpp b/sky/sky.cpp
index 5c1199dca6..ca5d2f1ec4 100644
--- a/sky/sky.cpp
+++ b/sky/sky.cpp
@@ -218,7 +218,7 @@ void SkyEngine::go() {
if (introSkipped)
_skyControl->restartGame();
- _lastSaveTime = _system->get_msecs();
+ _lastSaveTime = _system->getMillis();
while (1) {
if (_debugger->isAttached()) {
@@ -232,9 +232,9 @@ void SkyEngine::go() {
else
delay(_systemVars.gameSpeed);
- if (_system->get_msecs() - _lastSaveTime > 5 * 60 * 1000) {
+ if (_system->getMillis() - _lastSaveTime > 5 * 60 * 1000) {
if (_skyControl->loadSaveAllowed()) {
- _lastSaveTime = _system->get_msecs();
+ _lastSaveTime = _system->getMillis();
_skyControl->doAutoSave();
} else
_lastSaveTime += 30 * 1000; // try again in 30 secs
@@ -442,12 +442,12 @@ void SkyEngine::delay(uint amount) {
OSystem::Event event;
- uint32 start = _system->get_msecs();
+ uint32 start = _system->getMillis();
uint32 cur = start;
_key_pressed = 0; //reset
do {
- while (_system->poll_event(&event)) {
+ while (_system->pollEvent(event)) {
switch (event.event_code) {
case OSystem::EVENT_KEYDOWN:
if (event.kbd.flags == OSystem::KBD_CTRL) {
@@ -501,9 +501,9 @@ void SkyEngine::delay(uint amount) {
#endif
if (this_delay > amount)
this_delay = amount;
- _system->delay_msecs(this_delay);
+ _system->delayMillis(this_delay);
}
- cur = _system->get_msecs();
+ cur = _system->getMillis();
} while (cur < start + amount);
}
diff --git a/sound/audiocd.cpp b/sound/audiocd.cpp
index e2f479e03b..1084b98fb8 100644
--- a/sound/audiocd.cpp
+++ b/sound/audiocd.cpp
@@ -81,7 +81,7 @@ void AudioCDManager::play(int track, int numLoops, int startFrame, int duration)
_cd.playing = true;
_track_info[index]->play(g_engine->_mixer, &_cd.handle, _cd.start, _cd.duration);
} else {
- g_system->play_cdrom(track, numLoops, startFrame, duration);
+ g_system->playCD(track, numLoops, startFrame, duration);
}
}
}
@@ -91,12 +91,12 @@ void AudioCDManager::stop() {
g_engine->_mixer->stopHandle(_cd.handle);
_cd.playing = false;
} else {
- g_system->stop_cdrom();
+ g_system->stopCD();
}
}
bool AudioCDManager::isPlaying() const {
- return _cd.playing || g_system->poll_cdrom();
+ return _cd.playing || g_system->pollCD();
}
void AudioCDManager::updateCD() {
@@ -116,7 +116,7 @@ void AudioCDManager::updateCD() {
}
}
} else {
- g_system->update_cdrom();
+ g_system->updateCD();
}
}
diff --git a/sound/mixer.cpp b/sound/mixer.cpp
index 1ddcd86b03..954e7e15b4 100644
--- a/sound/mixer.cpp
+++ b/sound/mixer.cpp
@@ -568,7 +568,7 @@ void Channel::mix(int16 *data, uint len) {
}
_samplesConsumed = _samplesDecoded;
- _mixerTimeStamp = g_system->get_msecs();
+ _mixerTimeStamp = g_system->getMillis();
_converter->flow(*_input, data, len, vol_l, vol_r);
@@ -588,7 +588,7 @@ uint32 Channel::getElapsedTime() {
uint32 seconds = _samplesConsumed / rate;
uint32 milliseconds = (1000 * (_samplesConsumed % rate)) / rate;
- uint32 delta = g_system->get_msecs() - _mixerTimeStamp;
+ uint32 delta = g_system->getMillis() - _mixerTimeStamp;
// In theory it would seem like a good idea to limit the approximation
// so that it never exceeds the theoretical upper bound set by
diff --git a/sword1/animation.cpp b/sword1/animation.cpp
index 6dee00941a..0e4531bdd6 100644
--- a/sword1/animation.cpp
+++ b/sword1/animation.cpp
@@ -73,7 +73,7 @@ void MoviePlayer::play(const char *filename) {
_sys->updateScreen();
#endif
OSystem::Event event;
- while (_sys->poll_event(&event)) {
+ while (_sys->pollEvent(event)) {
switch (event.event_code) {
#ifndef BACKEND_8BIT
case OSystem::EVENT_SCREEN_CHANGED:
diff --git a/sword1/control.cpp b/sword1/control.cpp
index d04e6abc47..5b427f4956 100644
--- a/sword1/control.cpp
+++ b/sword1/control.cpp
@@ -987,12 +987,12 @@ void Control::doRestore(void) {
void Control::delay(uint32 msecs) {
OSystem::Event event;
- uint32 endTime = _system->get_msecs() + msecs;
+ uint32 endTime = _system->getMillis() + msecs;
_keyPressed = 0; //reset
_mouseState = 0;
do {
- while (_system->poll_event(&event)) {
+ while (_system->pollEvent(event)) {
switch (event.event_code) {
case OSystem::EVENT_KEYDOWN:
@@ -1033,8 +1033,8 @@ void Control::delay(uint32 msecs) {
break;
}
}
- _system->delay_msecs(10);
- } while (_system->get_msecs() < endTime);
+ _system->delayMillis(10);
+ } while (_system->getMillis() < endTime);
}
const ButtonInfo Control::_deathButtons[3] = {
diff --git a/sword1/sword1.cpp b/sword1/sword1.cpp
index 659c4177e8..80f1e71e92 100644
--- a/sword1/sword1.cpp
+++ b/sword1/sword1.cpp
@@ -1174,7 +1174,7 @@ uint8 SwordEngine::mainLoop(void) {
uint32 newTime;
bool scrollFrameShown = false;
- uint32 frameTime = _system->get_msecs();
+ uint32 frameTime = _system->getMillis();
_logic->engine();
_logic->updateScreenParams(); // sets scrolling
@@ -1185,19 +1185,19 @@ uint8 SwordEngine::mainLoop(void) {
_menu->refresh(MENU_TOP);
_menu->refresh(MENU_BOT);
- newTime = _system->get_msecs();
+ newTime = _system->getMillis();
if (newTime - frameTime < 1000 / FRAME_RATE) {
scrollFrameShown = _screen->showScrollFrame();
- int32 restDelay = (1000 / (FRAME_RATE * 2)) - (_system->get_msecs() - frameTime);
+ int32 restDelay = (1000 / (FRAME_RATE * 2)) - (_system->getMillis() - frameTime);
if (restDelay > 0)
delay((uint)restDelay);
}
- newTime = _system->get_msecs();
+ newTime = _system->getMillis();
if ((newTime - frameTime < 1000 / FRAME_RATE) || (!scrollFrameShown))
_screen->updateScreen();
- int32 frameDelay = (1000 / FRAME_RATE) - (_system->get_msecs() - frameTime);
+ int32 frameDelay = (1000 / FRAME_RATE) - (_system->getMillis() - frameTime);
if (frameDelay > 0)
delay((uint)frameDelay);
else
@@ -1240,11 +1240,11 @@ void SwordEngine::delay(uint amount) { //copied and mutilated from sky.cpp
OSystem::Event event;
- uint32 start = _system->get_msecs();
+ uint32 start = _system->getMillis();
uint32 cur = start;
do {
- while (_system->poll_event(&event)) {
+ while (_system->pollEvent(event)) {
switch (event.event_code) {
case OSystem::EVENT_KEYDOWN:
@@ -1296,9 +1296,9 @@ void SwordEngine::delay(uint amount) { //copied and mutilated from sky.cpp
#endif
if (this_delay > amount)
this_delay = amount;
- _system->delay_msecs(this_delay);
+ _system->delayMillis(this_delay);
}
- cur = _system->get_msecs();
+ cur = _system->getMillis();
} while (cur < start + amount);
}
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);
}
}