aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure36
-rw-r--r--engines/dialogs.cpp8
-rw-r--r--engines/sci/engine/kfile.cpp6
3 files changed, 49 insertions, 1 deletions
diff --git a/configure b/configure
index d23ee745c2..ba2113152e 100755
--- a/configure
+++ b/configure
@@ -166,6 +166,7 @@ _translation=yes
# Default platform settings
_backend=sdl
_16bit=auto
+_savegame_timestamp=auto
_dynamic_modules=no
_elf_loader=no
_plugins_default=static
@@ -773,6 +774,7 @@ Optional Features:
--default-dynamic make plugins dynamic by default
--disable-mt32emu don't enable the integrated MT-32 emulator
--disable-16bit don't enable 16bit color support
+ --disable-savegame-timestamp don't use timestamps for blank savegame descriptions
--disable-scalers exclude scalers
--disable-hq-scalers exclude HQ2x and HQ3x scalers
--disable-translation don't build support for translated messages
@@ -852,6 +854,7 @@ done # for parm in ...
for ac_option in $@; do
case "$ac_option" in
--disable-16bit) _16bit=no ;;
+ --disable-savegame-timestamp) _savegame_timestamp=no ;;
--disable-scalers) _build_scalers=no ;;
--disable-hq-scalers) _build_hq_scalers=no ;;
--enable-alsa) _alsa=yes ;;
@@ -2105,6 +2108,7 @@ if test -n "$_host"; then
ASFLAGS="$ASFLAGS"
_backend="gph"
_build_hq_scalers=no
+ _savegame_timestamp=no
_vkeybd=yes
_seq_midi=no
_mt32emu=no
@@ -2195,6 +2199,7 @@ if test -n "$_host"; then
LDFLAGS="$LDFLAGS -static"
_backend="gph"
_build_hq_scalers=no
+ _savegame_timestamp=no
_vkeybd=yes
_seq_midi=no
_mt32emu=no
@@ -2214,6 +2219,7 @@ if test -n "$_host"; then
ASFLAGS="$ASFLAGS -mfloat-abi=soft"
_backend="gph"
_build_hq_scalers=no
+ _savegame_timestamp=no
_vkeybd=yes
_seq_midi=no
_mt32emu=no
@@ -2297,6 +2303,7 @@ if test -n "$_host"; then
_backend="n64"
_mt32emu=no
_build_scalers=no
+ _savegame_timestamp=no
_translation=no
_keymapper=no
_text_console=no
@@ -2619,6 +2626,26 @@ case $_backend in
;;
esac
+#
+# Disable savegame timestamp support for backends which don't have a reliable real time clock
+#
+case $_backend in
+ gph | n64)
+ if test "$_savegame_timestamp" = auto ; then
+ _savegame_timestamp=no
+ else
+ _savegame_timestamp=yes
+ fi
+ ;;
+ *)
+ if test "$_savegame_timestamp" = auto ; then
+ _savegame_timestamp=yes
+ else
+ _savegame_timestamp=no
+ fi
+ ;;
+esac
+
#
# Determine whether host is POSIX compliant, or at least POSIX
@@ -2875,6 +2902,11 @@ define_in_config_if_yes "$_mt32emu" 'USE_MT32EMU'
define_in_config_if_yes "$_16bit" 'USE_RGB_COLOR'
#
+# Check whether 16bit color support is requested
+#
+define_in_config_if_yes "$_savegame_timestamp" 'USE_SAVEGAME_TIMESTAMP'
+
+#
# Check whether to enable the (hq) scalers
#
if test "$_build_scalers" = no ; then
@@ -3537,6 +3569,10 @@ if test "$_16bit" = yes ; then
echo_n ", 16bit color"
fi
+if test "$_savegame_timestamp" = yes ; then
+ echo_n ", savegame timestamp"
+fi
+
if test "$_build_scalers" = yes ; then
if test "$_build_hq_scalers" = yes ; then
echo_n ", HQ scalers"
diff --git a/engines/dialogs.cpp b/engines/dialogs.cpp
index 58bf629dc4..435576e9e4 100644
--- a/engines/dialogs.cpp
+++ b/engines/dialogs.cpp
@@ -228,7 +228,15 @@ void MainMenuDialog::save() {
if (result.empty()) {
// If the user was lazy and entered no save name, come up with a default name.
Common::String buf;
+ #if defined(USE_SAVEGAME_TIMESTAMP)
+ TimeDate curTime;
+ g_system->getTimeAndDate(curTime);
+ curTime.tm_year += 1900; // fixup year
+ curTime.tm_mon++; // fixup month
+ buf = Common::String::format("%04d.%02d.%02d / %02d:%02d:%02d", curTime.tm_year, curTime.tm_mon, curTime.tm_mday, curTime.tm_hour, curTime.tm_min, curTime.tm_sec);
+ #else
buf = Common::String::format("Save %d", slot + 1);
+ #endif
_engine->saveGameState(slot, buf);
} else {
_engine->saveGameState(slot, result);
diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp
index 1bd6754ca5..0c73125bdb 100644
--- a/engines/sci/engine/kfile.cpp
+++ b/engines/sci/engine/kfile.cpp
@@ -578,11 +578,15 @@ reg_t kSaveGame(EngineState *s, int argc, reg_t *argv) {
game_description = dialog->getResultString();
if (game_description.empty()) {
// create our own description for the saved game, the user didnt enter it
+ #if defined(USE_SAVEGAME_TIMESTAMP)
TimeDate curTime;
g_system->getTimeAndDate(curTime);
curTime.tm_year += 1900; // fixup year
curTime.tm_mon++; // fixup month
- game_description = Common::String::format("%02d.%02d.%04d / %02d:%02d:%02d", curTime.tm_mday, curTime.tm_mon, curTime.tm_year, curTime.tm_hour, curTime.tm_min, curTime.tm_sec);
+ game_description = Common::String::format("%04d.%02d.%02d / %02d:%02d:%02d", curTime.tm_year, curTime.tm_mon, curTime.tm_mday, curTime.tm_hour, curTime.tm_min, curTime.tm_sec);
+ #else
+ game_description = Common::String::format("Save %d", savegameId + 1);
+ #endif
}
delete dialog;
g_sci->_soundCmd->pauseAll(false); // unpause music ( we can't have it paused during save)