summaryrefslogtreecommitdiff
path: root/src/fios.cpp
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2011-05-28 13:55:05 +0000
committeralberth <alberth@openttd.org>2011-05-28 13:55:05 +0000
commit18382251923ac04007a59077f513184a3e66e5ec (patch)
tree3b664b527da28d64aef2c82548b1cb0ecf6652c6 /src/fios.cpp
parent84f7fc32fa5b9dd6d195d45fe67c55c80037a955 (diff)
downloadopenttd-18382251923ac04007a59077f513184a3e66e5ec.tar.xz
(svn r22511) -Add: Function to make heightmap file paths.
Diffstat (limited to 'src/fios.cpp')
-rw-r--r--src/fios.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/fios.cpp b/src/fios.cpp
index b51b7c919..ba2f84ded 100644
--- a/src/fios.cpp
+++ b/src/fios.cpp
@@ -16,6 +16,7 @@
#include "fios.h"
#include "fileio_func.h"
#include "tar_type.h"
+#include "screenshot.h"
#include "string_func.h"
#include <sys/stat.h>
@@ -186,6 +187,21 @@ void FiosMakeSavegameName(char *buf, const char *name, size_t size)
}
/**
+ * Construct a filename for a height map.
+ * @param buf Destination buffer.
+ * @param name Filename.
+ * @param size Size of \a buf.
+ */
+void FiosMakeHeightmapName(char *buf, const char *name, size_t size)
+{
+ char ext[5];
+ ext[0] = '.';
+ strecpy(ext + 1, GetCurrentScreenshotExtension(), lastof(ext));
+
+ FiosMakeFilename(buf, _fios_path, name, ext, size);
+}
+
+/**
* Delete a file.
* @param name Filename to delete.
*/