From fad29cf071a081cf448e1eaa926e8fd4a3712aaf Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Mon, 4 Jul 2016 06:52:37 +0200 Subject: BBVS: Remove some uses of g_system --- engines/bbvs/dialogs.cpp | 4 ++-- engines/bbvs/saveload.cpp | 6 +++--- engines/bbvs/videoplayer.cpp | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'engines') diff --git a/engines/bbvs/dialogs.cpp b/engines/bbvs/dialogs.cpp index 1609794c73..64fa86e1ee 100644 --- a/engines/bbvs/dialogs.cpp +++ b/engines/bbvs/dialogs.cpp @@ -95,8 +95,8 @@ void MainMenu::init() { } void MainMenu::reflowLayout() { - const int screenW = g_system->getOverlayWidth(); - const int screenH = g_system->getOverlayHeight(); + const int screenW = _vm->_system->getOverlayWidth(); + const int screenH = _vm->_system->getOverlayHeight(); const int buttonWidth = screenW * 70 / 320; const int buttonHeight = screenH * 14 / 240; diff --git a/engines/bbvs/saveload.cpp b/engines/bbvs/saveload.cpp index e7725713fd..79afd112be 100644 --- a/engines/bbvs/saveload.cpp +++ b/engines/bbvs/saveload.cpp @@ -59,13 +59,13 @@ BbvsEngine::kReadSaveHeaderError BbvsEngine::readSaveHeader(Common::SeekableRead void BbvsEngine::savegame(const char *filename, const char *description) { Common::OutSaveFile *out; - if (!(out = g_system->getSavefileManager()->openForSaving(filename))) { + if (!(out = _system->getSavefileManager()->openForSaving(filename))) { warning("Can't create file '%s', game not saved", filename); return; } TimeDate curTime; - g_system->getTimeAndDate(curTime); + _system->getTimeAndDate(curTime); // Header start out->writeUint32LE(BBVS_SAVEGAME_VERSION); @@ -95,7 +95,7 @@ void BbvsEngine::savegame(const char *filename, const char *description) { void BbvsEngine::loadgame(const char *filename) { Common::InSaveFile *in; - if (!(in = g_system->getSavefileManager()->openForLoading(filename))) { + if (!(in = _system->getSavefileManager()->openForLoading(filename))) { warning("Can't open file '%s', game not loaded", filename); return; } diff --git a/engines/bbvs/videoplayer.cpp b/engines/bbvs/videoplayer.cpp index 1b721c434f..9bef02a3cc 100644 --- a/engines/bbvs/videoplayer.cpp +++ b/engines/bbvs/videoplayer.cpp @@ -73,7 +73,7 @@ void BbvsEngine::playVideo(int videoNum) { } Common::Event event; - while (g_system->getEventManager()->pollEvent(event)) { + while (_system->getEventManager()->pollEvent(event)) { if ((event.type == Common::EVENT_KEYDOWN && event.kbd.keycode == Common::KEYCODE_ESCAPE) || event.type == Common::EVENT_LBUTTONUP) skipVideo = true; -- cgit v1.2.3