diff options
author | rubidium <rubidium@openttd.org> | 2009-01-02 22:49:43 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-01-02 22:49:43 +0000 |
commit | 3a0d966ae408aecc0bdad3325c1cc75927d58e89 (patch) | |
tree | 13fdf7e39e9d4d152f31d1a3441b07c4b8be91c5 /src/screenshot.cpp | |
parent | 1357b0a4c2c9cb2cf6d81a2cbc3e851d25c6c735 (diff) | |
download | openttd-3a0d966ae408aecc0bdad3325c1cc75927d58e89.tar.xz |
(svn r14790) -Codechange: unify generation of default savegame/screenshot names (PhilSophus)
Diffstat (limited to 'src/screenshot.cpp')
-rw-r--r-- | src/screenshot.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/screenshot.cpp b/src/screenshot.cpp index f667ecf2f..ced474d91 100644 --- a/src/screenshot.cpp +++ b/src/screenshot.cpp @@ -17,7 +17,7 @@ #include "core/alloc_func.hpp" #include "core/endian_func.hpp" #include "map_func.h" -#include "date_func.h" +#include "saveload.h" #include "company_func.h" #include "table/strings.h" @@ -550,13 +550,10 @@ static char *MakeScreenshotName(const char *ext) if (_game_mode == GM_EDITOR || _game_mode == GM_MENU || _local_company == COMPANY_SPECTATOR) { strecpy(_screenshot_name, "screenshot", lastof(_screenshot_name)); } else { - SetDParam(0, _local_company); - SetDParam(1, _date); - GetString(_screenshot_name, STR_4004, lastof(_screenshot_name)); + GenerateDefaultSaveName(_screenshot_name, lastof(_screenshot_name)); } /* Add extension to screenshot file */ - SanitizeFilename(_screenshot_name); len = strlen(_screenshot_name); snprintf(&_screenshot_name[len], lengthof(_screenshot_name) - len, ".%s", ext); @@ -619,6 +616,3 @@ bool MakeScreenshot() default: return false; } } - - - |