diff options
author | Loïc Guilloux <glx22@users.noreply.github.com> | 2021-07-17 12:48:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-17 12:48:35 +0200 |
commit | 460991ecf4fbeca2c0f8c39874b39a0885d6f67d (patch) | |
tree | bb4df8e1fba39293c8db4772c9b553a88a6fa58c /src/fios.h | |
parent | 16abdd52546eb3cfa9d51d674c41711c2c170029 (diff) | |
download | openttd-460991ecf4fbeca2c0f8c39874b39a0885d6f67d.tar.xz |
Feature: Persistant rotation of numbered auto/netsave after restart (#9397)
It was always starting from 0 on openttd restart.
Now the most recent auto/netsave number will be used as a base to generate the next filename.
Diffstat (limited to 'src/fios.h')
-rw-r--r-- | src/fios.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/fios.h b/src/fios.h index 34504d5e0..c0e516297 100644 --- a/src/fios.h +++ b/src/fios.h @@ -125,4 +125,16 @@ std::string FiosMakeSavegameName(const char *name); FiosType FiosGetSavegameListCallback(SaveLoadOperation fop, const std::string &file, const char *ext, char *title, const char *last); +/** + * A savegame name automatically numbered. + */ +struct FiosNumberedSaveName { + FiosNumberedSaveName(const std::string &prefix); + std::string Filename(); + std::string Extension(); +private: + std::string prefix; + int number; +}; + #endif /* FIOS_H */ |