Permalink
Comparing changes
Open a pull request
- 4 commits
- 4 files changed
- 0 commit comments
- 2 contributors
Commits on Dec 22, 2014
Unified
Split
Showing
with
9 additions
and 13 deletions.
- +2 −4 engines/agi/detection.cpp
- +4 −4 engines/agi/loader_v2.cpp
- +2 −3 engines/agi/loader_v3.cpp
- +1 −2 engines/drascula/detection.cpp
| @@ -276,15 +276,13 @@ SaveStateList AgiMetaEngine::listSaves(const char *target) const { | ||
| int AgiMetaEngine::getMaximumSaveSlot() const { return 999; } | ||
|
|
||
| void AgiMetaEngine::removeSaveState(const char *target, int slot) const { | ||
| char fileName[MAXPATHLEN]; | ||
| sprintf(fileName, "%s.%03d", target, slot); | ||
| Common::String fileName = Common::String::format("%s.%03d", target, slot); | ||
| g_system->getSavefileManager()->removeSavefile(fileName); | ||
| } | ||
|
|
||
| SaveStateDescriptor AgiMetaEngine::querySaveMetaInfos(const char *target, int slot) const { | ||
| const uint32 AGIflag = MKTAG('A','G','I',':'); | ||
| char fileName[MAXPATHLEN]; | ||
| sprintf(fileName, "%s.%03d", target, slot); | ||
| Common::String fileName = Common::String::format("%s.%03d", target, slot); | ||
|
|
||
| Common::InSaveFile *in = g_system->getSavefileManager()->openForLoading(fileName); | ||
|
|
||
| @@ -135,13 +135,13 @@ int AgiLoader_v2::unloadResource(int t, int n) { | ||
| */ | ||
| uint8 *AgiLoader_v2::loadVolRes(struct AgiDir *agid) { | ||
| uint8 *data = NULL; | ||
| char x[MAXPATHLEN], *path; | ||
| char x[6]; | ||
| Common::File fp; | ||
| unsigned int sig; | ||
| Common::String path; | ||
|
|
||
| sprintf(x, "vol.%i", agid->volume); | ||
| path = x; | ||
| debugC(3, kDebugLevelResources, "Vol res: path = %s", path); | ||
| path = Common::String::format("vol.%i", agid->volume); | ||
| debugC(3, kDebugLevelResources, "Vol res: path = %s", path.c_str()); | ||
|
|
||
| if (agid->offset != _EMPTY && fp.open(path)) { | ||
| debugC(3, kDebugLevelResources, "loading resource at offset %d", agid->offset); | ||
| @@ -198,14 +198,13 @@ int AgiLoader_v3::unloadResource(int t, int n) { | ||
| * NULL is returned if unsucsessful. | ||
| */ | ||
| uint8 *AgiLoader_v3::loadVolRes(AgiDir *agid) { | ||
| char x[MAXPATHLEN]; | ||
| char x[8]; | ||
| uint8 *data = NULL, *compBuffer; | ||
| Common::File fp; | ||
| Common::String path; | ||
|
|
||
| debugC(3, kDebugLevelResources, "(%p)", (void *)agid); | ||
| sprintf(x, "vol.%i", agid->volume); | ||
| path = Common::String(_vm->_game.name) + x; | ||
| path = Common::String::format("%svol.%i", _vm->_game.name, agid->volume); | ||
|
|
||
| if (agid->offset != _EMPTY && fp.open(path)) { | ||
| fp.seek(agid->offset, SEEK_SET); | ||
| @@ -382,8 +382,7 @@ SaveStateList DrasculaMetaEngine::listSaves(const char *target) const { | ||
| } | ||
|
|
||
| SaveStateDescriptor DrasculaMetaEngine::querySaveMetaInfos(const char *target, int slot) const { | ||
| char fileName[MAXPATHLEN]; | ||
| sprintf(fileName, "%s.%03d", target, slot); | ||
| Common::String fileName = Common::String::format("%s.%03d", target, slot); | ||
|
|
||
| Common::InSaveFile *in = g_system->getSavefileManager()->openForLoading(fileName); | ||
|
|
||