aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
authorMax Horn2011-06-03 18:21:58 +0200
committerMax Horn2011-06-03 18:21:58 +0200
commitaec2ea966183950189d0f5db4c447aa332fc4ae3 (patch)
tree546c1241b710b158182c081df579752cbd1f06ad /engines/sci/engine
parente364072091b41285fcca8a3ec403917181a41118 (diff)
downloadscummvm-rg350-aec2ea966183950189d0f5db4c447aa332fc4ae3.tar.gz
scummvm-rg350-aec2ea966183950189d0f5db4c447aa332fc4ae3.tar.bz2
scummvm-rg350-aec2ea966183950189d0f5db4c447aa332fc4ae3.zip
ENGINES: Remove some uses of g_engine
Diffstat (limited to 'engines/sci/engine')
-rw-r--r--engines/sci/engine/kfile.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp
index 8dc7836068..e1e52215d2 100644
--- a/engines/sci/engine/kfile.cpp
+++ b/engines/sci/engine/kfile.cpp
@@ -105,7 +105,7 @@ reg_t file_open(EngineState *s, const Common::String &filename, int mode, bool u
Common::String wrappedName = unwrapFilename ? g_sci->wrapFilename(englishName) : englishName;
Common::SeekableReadStream *inFile = 0;
Common::WriteStream *outFile = 0;
- Common::SaveFileManager *saveFileMan = g_engine->getSaveFileManager();
+ Common::SaveFileManager *saveFileMan = g_sci->getSaveFileManager();
if (mode == _K_FILE_MODE_OPEN_OR_FAIL) {
// Try to open file, abort if not possible
@@ -349,7 +349,7 @@ reg_t kDeviceInfo(EngineState *s, int argc, reg_t *argv) {
if (findSavegame(saves, savegameId) != -1) {
// Confirmed that this id still lives...
Common::String filename = g_sci->getSavegameName(savegameId);
- Common::SaveFileManager *saveFileMan = g_engine->getSaveFileManager();
+ Common::SaveFileManager *saveFileMan = g_sci->getSaveFileManager();
saveFileMan->removeSavefile(filename);
}
break;
@@ -410,7 +410,7 @@ static bool _savegame_sort_byDate(const SavegameDesc &l, const SavegameDesc &r)
// Create a sorted array containing all found savedgames
static void listSavegames(Common::Array<SavegameDesc> &saves) {
- Common::SaveFileManager *saveFileMan = g_engine->getSaveFileManager();
+ Common::SaveFileManager *saveFileMan = g_sci->getSaveFileManager();
// Load all saves
Common::StringArray saveNames = saveFileMan->listSavefiles(g_sci->getSavegamePattern());
@@ -637,7 +637,7 @@ reg_t kSaveGame(EngineState *s, int argc, reg_t *argv) {
s->r_acc = NULL_REG;
Common::String filename = g_sci->getSavegameName(savegameId);
- Common::SaveFileManager *saveFileMan = g_engine->getSaveFileManager();
+ Common::SaveFileManager *saveFileMan = g_sci->getSaveFileManager();
Common::OutSaveFile *out;
out = saveFileMan->openForSaving(filename);
@@ -705,7 +705,7 @@ reg_t kRestoreGame(EngineState *s, int argc, reg_t *argv) {
s->r_acc = TRUE_REG;
warning("Savegame ID %d not found", savegameId);
} else {
- Common::SaveFileManager *saveFileMan = g_engine->getSaveFileManager();
+ Common::SaveFileManager *saveFileMan = g_sci->getSaveFileManager();
Common::String filename = g_sci->getSavegameName(savegameId);
Common::SeekableReadStream *in;
@@ -845,7 +845,7 @@ reg_t kFileIOWriteRaw(EngineState *s, int argc, reg_t *argv) {
reg_t kFileIOUnlink(EngineState *s, int argc, reg_t *argv) {
Common::String name = s->_segMan->getString(argv[0]);
- Common::SaveFileManager *saveFileMan = g_engine->getSaveFileManager();
+ Common::SaveFileManager *saveFileMan = g_sci->getSaveFileManager();
bool result;
// SQ4 floppy prepends /\ to the filenames
@@ -920,7 +920,7 @@ reg_t kFileIOSeek(EngineState *s, int argc, reg_t *argv) {
}
void DirSeeker::addAsVirtualFiles(Common::String title, Common::String fileMask) {
- Common::SaveFileManager *saveFileMan = g_engine->getSaveFileManager();
+ Common::SaveFileManager *saveFileMan = g_sci->getSaveFileManager();
Common::StringArray foundFiles = saveFileMan->listSavefiles(fileMask);
if (!foundFiles.empty()) {
_files.push_back(title);
@@ -984,7 +984,7 @@ reg_t DirSeeker::firstFile(const Common::String &mask, reg_t buffer, SegManager
const Common::String wrappedMask = g_sci->wrapFilename(mask);
// Obtain a list of all files matching the given mask
- Common::SaveFileManager *saveFileMan = g_engine->getSaveFileManager();
+ Common::SaveFileManager *saveFileMan = g_sci->getSaveFileManager();
_files = saveFileMan->listSavefiles(wrappedMask);
}
@@ -1043,7 +1043,7 @@ reg_t kFileIOExists(EngineState *s, int argc, reg_t *argv) {
exists = Common::File::exists(name);
// Check for a savegame with the name
- Common::SaveFileManager *saveFileMan = g_engine->getSaveFileManager();
+ Common::SaveFileManager *saveFileMan = g_sci->getSaveFileManager();
if (!exists)
exists = !saveFileMan->listSavefiles(name).empty();
@@ -1083,7 +1083,7 @@ reg_t kFileIORename(EngineState *s, int argc, reg_t *argv) {
// SCI1.1 returns 0 on success and a DOS error code on fail. SCI32
// returns -1 on fail. We just return -1 for all versions.
- if (g_engine->getSaveFileManager()->renameSavefile(oldName, newName))
+ if (g_sci->getSaveFileManager()->renameSavefile(oldName, newName))
return NULL_REG;
else
return SIGNAL_REG;