diff options
author | Max Horn | 2011-06-02 14:11:38 +0200 |
---|---|---|
committer | Max Horn | 2011-06-02 18:31:59 +0200 |
commit | 477d6233c3672d9a60cceea3570bc775df3d9253 (patch) | |
tree | 741ffe9dcb35fd2c9de405b7da74e572451c8304 /engines/teenagent | |
parent | 86240bb0dc0103e5099d23770cc04cfd907d2c61 (diff) | |
download | scummvm-rg350-477d6233c3672d9a60cceea3570bc775df3d9253.tar.gz scummvm-rg350-477d6233c3672d9a60cceea3570bc775df3d9253.tar.bz2 scummvm-rg350-477d6233c3672d9a60cceea3570bc775df3d9253.zip |
ENGINES: Change 2nd param of Engine::saveGameState to Common::String
Diffstat (limited to 'engines/teenagent')
-rw-r--r-- | engines/teenagent/teenagent.cpp | 4 | ||||
-rw-r--r-- | engines/teenagent/teenagent.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/engines/teenagent/teenagent.cpp b/engines/teenagent/teenagent.cpp index f076dbc0a1..ce8862ffd0 100644 --- a/engines/teenagent/teenagent.cpp +++ b/engines/teenagent/teenagent.cpp @@ -240,7 +240,7 @@ Common::Error TeenAgentEngine::loadGameState(int slot) { return Common::kNoError; } -Common::Error TeenAgentEngine::saveGameState(int slot, const char *desc) { +Common::Error TeenAgentEngine::saveGameState(int slot, const Common::String &desc) { debug(0, "saving to slot %d", slot); Common::ScopedPtr<Common::OutSaveFile> out(_saveFileMan->openForSaving(Common::String::format("teenagent.%02d", slot))); if (!out) @@ -253,7 +253,7 @@ Common::Error TeenAgentEngine::saveGameState(int slot, const char *desc) { res->dseg.set_word(0x64B1, pos.y); assert(res->dseg.size() >= 0x6478 + 0x777a); - strncpy((char *)res->dseg.ptr(0x6478), desc, 0x16); + strncpy((char *)res->dseg.ptr(0x6478), desc.c_str(), 0x16); out->write(res->dseg.ptr(0x6478), 0x777a); if (!Graphics::saveThumbnail(*out)) warning("saveThumbnail failed"); diff --git a/engines/teenagent/teenagent.h b/engines/teenagent/teenagent.h index bc802da8bc..a054f72d25 100644 --- a/engines/teenagent/teenagent.h +++ b/engines/teenagent/teenagent.h @@ -56,7 +56,7 @@ public: virtual Common::Error run(); virtual Common::Error loadGameState(int slot); - virtual Common::Error saveGameState(int slot, const char *desc); + virtual Common::Error saveGameState(int slot, const Common::String &desc); virtual bool canLoadGameStateCurrently() { return true; } virtual bool canSaveGameStateCurrently() { return !scene_busy; } virtual bool hasFeature(EngineFeature f) const; |