CINE: Get rid of g_saveFileMan
svn-id: r50944
This commit is contained in:
parent
e75eee21e3
commit
587f3cf958
5 changed files with 7 additions and 11 deletions
|
@ -48,10 +48,9 @@
|
|||
|
||||
namespace Cine {
|
||||
|
||||
Sound *g_sound;
|
||||
Common::SaveFileManager *g_saveFileMan;
|
||||
Sound *g_sound = 0;
|
||||
|
||||
CineEngine *g_cine;
|
||||
CineEngine *g_cine = 0;
|
||||
|
||||
CineEngine::CineEngine(OSystem *syst, const CINEGameDescription *gameDesc) : Engine(syst), _gameDescription(gameDesc) {
|
||||
DebugMan.addDebugChannel(kCineDebugScript, "Script", "Script debug level");
|
||||
|
@ -88,7 +87,6 @@ Common::Error CineEngine::run() {
|
|||
// Paula chipset for Amiga and Atari versions
|
||||
g_sound = new PaulaSound(_mixer, this);
|
||||
}
|
||||
g_saveFileMan = _saveFileMan;
|
||||
|
||||
_restartRequested = false;
|
||||
|
||||
|
|
|
@ -190,8 +190,6 @@ enum {
|
|||
};
|
||||
|
||||
|
||||
extern Common::SaveFileManager *g_saveFileMan; // TEMP
|
||||
|
||||
} // End of namespace Cine
|
||||
|
||||
#endif
|
||||
|
|
|
@ -251,7 +251,7 @@ Common::Error CineEngine::saveGameState(int slot, const char *desc) {
|
|||
char indexFile[80];
|
||||
snprintf(indexFile, 80, "%s.dir", _targetName.c_str());
|
||||
|
||||
Common::OutSaveFile *fHandle = g_saveFileMan->openForSaving(indexFile);
|
||||
Common::OutSaveFile *fHandle = _saveFileMan->openForSaving(indexFile);
|
||||
if (!fHandle) {
|
||||
warning("Unable to open file %s for saving", indexFile);
|
||||
return Common::kUnknownError;
|
||||
|
|
|
@ -465,7 +465,7 @@ bool CineEngine::loadSaveDirectory() {
|
|||
char tmp[80];
|
||||
|
||||
snprintf(tmp, 80, "%s.dir", _targetName.c_str());
|
||||
fHandle = g_saveFileMan->openForLoading(tmp);
|
||||
fHandle = _saveFileMan->openForLoading(tmp);
|
||||
|
||||
if (!fHandle) {
|
||||
return false;
|
||||
|
@ -771,7 +771,7 @@ bool CineEngine::loadPlainSaveFW(Common::SeekableReadStream &in, CineSaveGameFor
|
|||
}
|
||||
|
||||
bool CineEngine::makeLoad(char *saveName) {
|
||||
Common::SharedPtr<Common::InSaveFile> saveFile(g_saveFileMan->openForLoading(saveName));
|
||||
Common::SharedPtr<Common::InSaveFile> saveFile(_saveFileMan->openForLoading(saveName));
|
||||
|
||||
if (!saveFile) {
|
||||
renderer->drawString(otherMessages[0], 0);
|
||||
|
@ -966,7 +966,7 @@ void CineEngine::makeSaveOS(Common::OutSaveFile &out) {
|
|||
}
|
||||
|
||||
void CineEngine::makeSave(char *saveFileName) {
|
||||
Common::SharedPtr<Common::OutSaveFile> fHandle(g_saveFileMan->openForSaving(saveFileName));
|
||||
Common::SharedPtr<Common::OutSaveFile> fHandle(_saveFileMan->openForSaving(saveFileName));
|
||||
|
||||
setMouseCursor(MOUSE_CURSOR_DISK);
|
||||
|
||||
|
|
|
@ -450,7 +450,7 @@ void CineEngine::makeSystemMenu() {
|
|||
|
||||
snprintf(tmp, 80, "%s.dir", _targetName.c_str());
|
||||
|
||||
Common::OutSaveFile *fHandle = g_saveFileMan->openForSaving(tmp);
|
||||
Common::OutSaveFile *fHandle = _saveFileMan->openForSaving(tmp);
|
||||
if (!fHandle) {
|
||||
warning("Unable to open file %s for saving", tmp);
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue