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 | 741f0a86fe358585ec8841ed9bf704f3a777341a (patch) | |
tree | 13fdf7e39e9d4d152f31d1a3441b07c4b8be91c5 /src/screenshot.cpp | |
parent | d3144b6f04213319bd76db387ba43c6dd7ce6967 (diff) | |
download | openttd-741f0a86fe358585ec8841ed9bf704f3a777341a.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; } } - - - |