[Scummvm-cvs-logs] scummvm master -> fad29cf071a081cf448e1eaa926e8fd4a3712aaf

eriktorbjorn eriktorbjorn at telia.com
Mon Jul 4 06:52:58 CEST 2016


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
fad29cf071 BBVS: Remove some uses of g_system


Commit: fad29cf071a081cf448e1eaa926e8fd4a3712aaf
    https://github.com/scummvm/scummvm/commit/fad29cf071a081cf448e1eaa926e8fd4a3712aaf
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2016-07-04T06:52:37+02:00

Commit Message:
BBVS: Remove some uses of g_system

Changed paths:
    engines/bbvs/dialogs.cpp
    engines/bbvs/saveload.cpp
    engines/bbvs/videoplayer.cpp



diff --git a/engines/bbvs/dialogs.cpp b/engines/bbvs/dialogs.cpp
index 1609794..64fa86e 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 e772571..79afd11 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 1b721c4..9bef02a 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;






More information about the Scummvm-git-logs mailing list