From 2e6b14539a9e5674fbb91002b619aecbf2e664c8 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 3 Nov 2007 21:25:37 +0000 Subject: Cleanup. svn-id: r29389 --- engines/kyra/kyra_v1.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engines/kyra') 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); } -- cgit v1.2.3