aboutsummaryrefslogtreecommitdiff
path: root/engines/lab
diff options
context:
space:
mode:
authorStrangerke2015-12-23 18:56:35 +0100
committerWillem Jan Palenstijn2015-12-23 21:43:16 +0100
commit34b59256fcddc116eb4ffd6069e1d034462168fc (patch)
tree3a0d0aefa2946a6f61143578a922b87d739b90d6 /engines/lab
parente8edff85f395d8c812f154c230300fd70b127171 (diff)
downloadscummvm-rg350-34b59256fcddc116eb4ffd6069e1d034462168fc.tar.gz
scummvm-rg350-34b59256fcddc116eb4ffd6069e1d034462168fc.tar.bz2
scummvm-rg350-34b59256fcddc116eb4ffd6069e1d034462168fc.zip
LAB: Replace g_system by _system
Diffstat (limited to 'engines/lab')
-rw-r--r--engines/lab/anim.cpp8
-rw-r--r--engines/lab/dispman.cpp10
-rw-r--r--engines/lab/engine.cpp12
-rw-r--r--engines/lab/eventman.cpp18
-rw-r--r--engines/lab/interface.cpp2
-rw-r--r--engines/lab/intro.cpp6
-rw-r--r--engines/lab/lab.cpp8
-rw-r--r--engines/lab/processroom.cpp4
-rw-r--r--engines/lab/savegame.cpp6
9 files changed, 37 insertions, 37 deletions
diff --git a/engines/lab/anim.cpp b/engines/lab/anim.cpp
index b3a5a8f85c..b15e71a888 100644
--- a/engines/lab/anim.cpp
+++ b/engines/lab/anim.cpp
@@ -95,9 +95,9 @@ void Anim::diffNextFrame(bool onlyDiffData) {
if (!onlyDiffData) {
if (_headerdata._fps) {
- uint32 targetMillis = g_system->getMillis() + _delayMicros;
- while (g_system->getMillis() < targetMillis)
- g_system->delayMillis(10);
+ uint32 targetMillis = _vm->_system->getMillis() + _delayMicros;
+ while (_vm->_system->getMillis() < targetMillis)
+ _vm->_system->delayMillis(10);
}
if (_isPal && !_noPalChange) {
@@ -302,7 +302,7 @@ void Anim::readDiff(Common::File *diffFile, bool playOnce, bool onlyDiffData) {
// as it was possible to see that something was displayed, without being able to tell
// what it was. A shorter delay (150ms) makes it acceptable during gameplay and
// readable. The big question is: do we need that message?
- g_system->delayMillis(150);
+ _vm->_system->delayMillis(150);
if (_headerdata._fps == 1)
_headerdata._fps = 0;
diff --git a/engines/lab/dispman.cpp b/engines/lab/dispman.cpp
index f6705ff0a3..2e133500e8 100644
--- a/engines/lab/dispman.cpp
+++ b/engines/lab/dispman.cpp
@@ -447,8 +447,8 @@ void DisplayMan::drawHLine(uint16 x1, uint16 y, uint16 x2) {
}
void DisplayMan::screenUpdate() {
- g_system->copyRectToScreen(_displayBuffer, _screenWidth, 0, 0, _screenWidth, _screenHeight);
- g_system->updateScreen();
+ _vm->_system->copyRectToScreen(_displayBuffer, _screenWidth, 0, 0, _screenWidth, _screenHeight);
+ _vm->_system->updateScreen();
_vm->_event->processInput();
}
@@ -491,7 +491,7 @@ void DisplayMan::writeColorRegs(byte *buf, uint16 first, uint16 numReg) {
for (int i = 0; i < 256 * 3; i++)
tmp[i] = buf[i] * 4;
- g_system->getPaletteManager()->setPalette(tmp, first, numReg);
+ _vm->_system->getPaletteManager()->setPalette(tmp, first, numReg);
memcpy(&(_curvgapal[first * 3]), buf, numReg * 3);
}
@@ -905,7 +905,7 @@ void DisplayMan::blackScreen() {
memset(pal, 0, 248 * 3);
writeColorRegs(pal, 8, 248);
- g_system->delayMillis(32);
+ _vm->_system->delayMillis(32);
}
void DisplayMan::whiteScreen() {
@@ -919,7 +919,7 @@ void DisplayMan::blackAllScreen() {
memset(pal, 0, 256 * 3);
writeColorRegs(pal, 0, 256);
- g_system->delayMillis(32);
+ _vm->_system->delayMillis(32);
}
void DisplayMan::scrollDisplayX(int16 dx, uint16 x1, uint16 y1, uint16 x2, uint16 y2, byte *buffer) {
diff --git a/engines/lab/engine.cpp b/engines/lab/engine.cpp
index 501ca08ee6..f50a3b7c77 100644
--- a/engines/lab/engine.cpp
+++ b/engines/lab/engine.cpp
@@ -423,7 +423,7 @@ void LabEngine::mainGameLoop() {
// Set up initial picture.
while (1) {
_event->processInput();
- g_system->delayMillis(10);
+ _system->delayMillis(10);
if (gotMessage) {
if (_quitLab || g_engine->shouldQuit()) {
@@ -693,7 +693,7 @@ bool LabEngine::processKey(IntuiMessage *curMsg, uint32 &msgClass, uint16 &quali
_followCrumbsFast = (code == Common::KEYCODE_r);
_isCrumbTurning = false;
_isCrumbWaiting = false;
- _crumbTimestamp = g_system->getMillis();
+ _crumbTimestamp = _system->getMillis();
if (_alternate) {
eatMessages();
@@ -929,7 +929,7 @@ void LabEngine::processAltButton(uint16 &curInv, uint16 &lastInv, uint16 buttonI
if (doit) {
_graphics->drawMessage("Disk operation failed.", false);
_graphics->setPalette(initcolors, 8);
- g_system->delayMillis(1000);
+ _system->delayMillis(1000);
}
break;
@@ -988,7 +988,7 @@ void LabEngine::processAltButton(uint16 &curInv, uint16 &lastInv, uint16 buttonI
_followCrumbsFast = false;
_isCrumbTurning = false;
_isCrumbWaiting = false;
- _crumbTimestamp = g_system->getMillis();
+ _crumbTimestamp = _system->getMillis();
eatMessages();
_alternate = false;
@@ -1114,7 +1114,7 @@ int LabEngine::followCrumbs() {
};
if (_isCrumbWaiting) {
- if (g_system->getMillis() <= _crumbTimestamp)
+ if (_system->getMillis() <= _crumbTimestamp)
return 0;
_isCrumbWaiting = false;
@@ -1155,7 +1155,7 @@ int LabEngine::followCrumbs() {
_isCrumbWaiting = true;
int theDelay = (_followCrumbsFast ? 1000 / 4 : 1000);
- _crumbTimestamp = theDelay + g_system->getMillis();
+ _crumbTimestamp = theDelay + _system->getMillis();
}
return moveDir;
diff --git a/engines/lab/eventman.cpp b/engines/lab/eventman.cpp
index 2e6561c8c7..6e8b08e39f 100644
--- a/engines/lab/eventman.cpp
+++ b/engines/lab/eventman.cpp
@@ -148,8 +148,8 @@ void EventManager::updateMouse() {
}
void EventManager::initMouse() {
- g_system->setMouseCursor(mouseData, MOUSE_WIDTH, MOUSE_HEIGHT, 0, 0, 0);
- g_system->showMouse(false);
+ _vm->_system->setMouseCursor(mouseData, MOUSE_WIDTH, MOUSE_HEIGHT, 0, 0, 0);
+ _vm->_system->showMouse(false);
setMousePos(Common::Point(0, 0));
}
@@ -160,14 +160,14 @@ void EventManager::mouseShow() {
_mouseHidden = false;
}
- g_system->showMouse(true);
+ _vm->_system->showMouse(true);
}
void EventManager::mouseHide() {
if (!_mouseHidden) {
_mouseHidden = true;
- g_system->showMouse(false);
+ _vm->_system->showMouse(false);
}
}
@@ -180,9 +180,9 @@ Common::Point EventManager::getMousePos() {
void EventManager::setMousePos(Common::Point pos) {
if (_vm->_isHiRes)
- g_system->warpMouse(pos.x, pos.y);
+ _vm->_system->warpMouse(pos.x, pos.y);
else
- g_system->warpMouse(pos.x * 2, pos.y);
+ _vm->_system->warpMouse(pos.x * 2, pos.y);
if (!_mouseHidden)
processInput();
@@ -206,7 +206,7 @@ void EventManager::processInput() {
Common::Event event;
Button *curButton = nullptr;
- while (g_system->getEventManager()->pollEvent(event)) {
+ while (_vm->_system->getEventManager()->pollEvent(event)) {
switch (event.type) {
case Common::EVENT_LBUTTONDOWN:
if (_screenButtonList)
@@ -257,9 +257,9 @@ void EventManager::processInput() {
}
}
- g_system->copyRectToScreen(_vm->_graphics->_displayBuffer, _vm->_graphics->_screenWidth, 0, 0, _vm->_graphics->_screenWidth, _vm->_graphics->_screenHeight);
+ _vm->_system->copyRectToScreen(_vm->_graphics->_displayBuffer, _vm->_graphics->_screenWidth, 0, 0, _vm->_graphics->_screenWidth, _vm->_graphics->_screenHeight);
_vm->_console->onFrame();
- g_system->updateScreen();
+ _vm->_system->updateScreen();
}
Common::KeyCode EventManager::getNextChar() {
diff --git a/engines/lab/interface.cpp b/engines/lab/interface.cpp
index 7fb3ba2af1..bdf30c6c49 100644
--- a/engines/lab/interface.cpp
+++ b/engines/lab/interface.cpp
@@ -104,7 +104,7 @@ Button *EventManager::checkNumButtonHit(ButtonList *buttonList, uint16 key) {
|| ((button->_keyEquiv != 0) && (makeButtonKeyEquiv(key) == button->_keyEquiv)))
&& button->_isEnabled) {
button->_altImage->drawImage(button->_x, button->_y);
- g_system->delayMillis(80);
+ _vm->_system->delayMillis(80);
button->_image->drawImage(button->_x, button->_y);
return button;
}
diff --git a/engines/lab/intro.cpp b/engines/lab/intro.cpp
index 8e580f1250..de76c0cbb5 100644
--- a/engines/lab/intro.cpp
+++ b/engines/lab/intro.cpp
@@ -114,7 +114,7 @@ void Intro::doPictText(const Common::String filename, TextFont *msgFont, bool is
return;
}
- lastMillis = g_system->getMillis();
+ lastMillis = _vm->_system->getMillis();
}
IntuiMessage *msg = _vm->_event->getMsg();
@@ -127,7 +127,7 @@ void Intro::doPictText(const Common::String filename, TextFont *msgFont, bool is
_vm->updateMusicAndEvents();
_vm->_anim->diffNextFrame();
- uint32 elapsedSeconds = (g_system->getMillis() - lastMillis) / 1000;
+ uint32 elapsedSeconds = (_vm->_system->getMillis() - lastMillis) / 1000;
if (elapsedSeconds > timeDelay) {
if (doneFl) {
@@ -239,7 +239,7 @@ void Intro::introSequence() {
introEatMessages();
if (_quitIntro)
break;
- g_system->delayMillis(10);
+ _vm->_system->delayMillis(10);
}
}
diff --git a/engines/lab/lab.cpp b/engines/lab/lab.cpp
index 01300ae442..5d545d93c0 100644
--- a/engines/lab/lab.cpp
+++ b/engines/lab/lab.cpp
@@ -230,15 +230,15 @@ void LabEngine::changeVolume(int delta) {
}
void LabEngine::waitTOF() {
- g_system->copyRectToScreen(_graphics->_displayBuffer, _graphics->_screenWidth, 0, 0, _graphics->_screenWidth, _graphics->_screenHeight);
- g_system->updateScreen();
+ _system->copyRectToScreen(_graphics->_displayBuffer, _graphics->_screenWidth, 0, 0, _graphics->_screenWidth, _graphics->_screenHeight);
+ _system->updateScreen();
_event->processInput();
uint32 now;
- for (now = g_system->getMillis(); now - _lastWaitTOFTicks <= 0xF; now = g_system->getMillis() )
- g_system->delayMillis(_lastWaitTOFTicks - now + 17);
+ for (now = _system->getMillis(); now - _lastWaitTOFTicks <= 0xF; now = _system->getMillis() )
+ _system->delayMillis(_lastWaitTOFTicks - now + 17);
_lastWaitTOFTicks = now;
}
diff --git a/engines/lab/processroom.cpp b/engines/lab/processroom.cpp
index 743f408f7e..0d60724e27 100644
--- a/engines/lab/processroom.cpp
+++ b/engines/lab/processroom.cpp
@@ -364,11 +364,11 @@ void LabEngine::doActions(Action *actionList, CloseDataPtr *closePtrList) {
break;
case kActionWaitSecs: {
- uint32 targetMillis = g_system->getMillis() + actionList->_param1 * 1000;
+ uint32 targetMillis = _system->getMillis() + actionList->_param1 * 1000;
_graphics->screenUpdate();
- while (g_system->getMillis() < targetMillis) {
+ while (_system->getMillis() < targetMillis) {
updateMusicAndEvents();
_anim->diffNextFrame();
}
diff --git a/engines/lab/savegame.cpp b/engines/lab/savegame.cpp
index 70330a00d2..8ee8b1a689 100644
--- a/engines/lab/savegame.cpp
+++ b/engines/lab/savegame.cpp
@@ -65,7 +65,7 @@ void LabEngine::writeSaveGameHeader(Common::OutSaveFile *out, const Common::Stri
// Creation date/time
TimeDate curTime;
- g_system->getTimeAndDate(curTime);
+ _system->getTimeAndDate(curTime);
uint32 saveDate = ((curTime.tm_mday & 0xFF) << 24) | (((curTime.tm_mon + 1) & 0xFF) << 16) | ((curTime.tm_year + 1900) & 0xFFFF);
uint16 saveTime = ((curTime.tm_hour & 0xFF) << 8) | ((curTime.tm_min) & 0xFF);
@@ -121,7 +121,7 @@ bool readSaveGameHeader(Common::InSaveFile *in, SaveGameHeader &header) {
bool LabEngine::saveGame(int slot, const Common::String desc) {
Common::String fileName = generateSaveFileName(slot);
- Common::SaveFileManager *saveFileManager = g_system->getSavefileManager();
+ Common::SaveFileManager *saveFileManager = _system->getSavefileManager();
Common::OutSaveFile *file = saveFileManager->openForSaving(fileName);
if (!file)
@@ -161,7 +161,7 @@ bool LabEngine::saveGame(int slot, const Common::String desc) {
bool LabEngine::loadGame(int slot) {
Common::String fileName = generateSaveFileName(slot);
- Common::SaveFileManager *saveFileManager = g_system->getSavefileManager();
+ Common::SaveFileManager *saveFileManager = _system->getSavefileManager();
Common::InSaveFile *file = saveFileManager->openForLoading(fileName);
if (!file)