summaryrefslogtreecommitdiff
path: root/src/saveload/saveload.cpp
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2016-09-04 12:58:04 +0000
committeralberth <alberth@openttd.org>2016-09-04 12:58:04 +0000
commit6f201ce4a8db0143ba0664aabdd04dc733adc243 (patch)
treea368495e00682bf58a0270ab1fe63d79e934a530 /src/saveload/saveload.cpp
parent597380e099688652e31fd1f406b53dee6b65da90 (diff)
downloadopenttd-6f201ce4a8db0143ba0664aabdd04dc733adc243.tar.xz
(svn r27651) -Codechange: Introduce methods for setting the name and title of _file_to_saveload.
Diffstat (limited to 'src/saveload/saveload.cpp')
-rw-r--r--src/saveload/saveload.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp
index 4dd8a4c7b..b78171e60 100644
--- a/src/saveload/saveload.cpp
+++ b/src/saveload/saveload.cpp
@@ -2932,6 +2932,24 @@ void FileToSaveLoad::SetMode(FileOperation fop, AbstractFileType aft, DetailedFi
this->abstract_ftype = aft;
}
+/**
+ * Set the name of the file.
+ * @param name Name of the file.
+ */
+void FileToSaveLoad::SetName(const char *name)
+{
+ strecpy(this->name, name, lastof(this->name));
+}
+
+/**
+ * Set the title of the file.
+ * @param title Title of the file.
+ */
+void FileToSaveLoad::SetTitle(const char *title)
+{
+ strecpy(this->title, title, lastof(this->title));
+}
+
#if 0
/**
* Function to get the type of the savegame by looking at the file header.