aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra
diff options
context:
space:
mode:
authorJohannes Schickel2007-11-03 21:25:37 +0000
committerJohannes Schickel2007-11-03 21:25:37 +0000
commit2e6b14539a9e5674fbb91002b619aecbf2e664c8 (patch)
tree11eb63c3767dac7d1ebcb60d3a16978108dff06c /engines/kyra
parentb3f331668f1c5f90ffdfc5e4fe9b07d2a5e063e9 (diff)
downloadscummvm-rg350-2e6b14539a9e5674fbb91002b619aecbf2e664c8.tar.gz
scummvm-rg350-2e6b14539a9e5674fbb91002b619aecbf2e664c8.tar.bz2
scummvm-rg350-2e6b14539a9e5674fbb91002b619aecbf2e664c8.zip
Cleanup.
svn-id: r29389
Diffstat (limited to 'engines/kyra')
-rw-r--r--engines/kyra/kyra_v1.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/kyra/kyra_v1.cpp b/engines/kyra/kyra_v1.cpp
index 947cbb86b7..ecc1faa873 100644
--- a/engines/kyra/kyra_v1.cpp
+++ b/engines/kyra/kyra_v1.cpp
@@ -474,8 +474,6 @@ void KyraEngine_v1::delayUntil(uint32 timestamp, bool updateTimers, bool update,
void KyraEngine_v1::delay(uint32 amount, bool update, bool isMainLoop) {
Common::Event event;
- char saveLoadSlot[20];
- char savegameName[14];
uint32 start = _system->getMillis();
do {
@@ -484,10 +482,12 @@ void KyraEngine_v1::delay(uint32 amount, bool update, bool isMainLoop) {
case Common::EVENT_KEYDOWN:
if (event.kbd.keycode >= '1' && event.kbd.keycode <= '9' &&
(event.kbd.flags == Common::KBD_CTRL || event.kbd.flags == Common::KBD_ALT) && isMainLoop) {
- sprintf(saveLoadSlot, "%s.00%d", _targetName.c_str(), event.kbd.keycode - '0');
+ const char *saveLoadSlot = getSavegameFilename(event.kbd.keycode - '0');
+
if (event.kbd.flags == Common::KBD_CTRL)
loadGame(saveLoadSlot);
else {
+ char savegameName[14];
sprintf(savegameName, "Quicksave %d", event.kbd.keycode - '0');
saveGame(saveLoadSlot, savegameName);
}