From 18382251923ac04007a59077f513184a3e66e5ec Mon Sep 17 00:00:00 2001 From: alberth Date: Sat, 28 May 2011 13:55:05 +0000 Subject: (svn r22511) -Add: Function to make heightmap file paths. --- src/fios.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/fios.cpp') 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 @@ -185,6 +186,21 @@ void FiosMakeSavegameName(char *buf, const char *name, size_t size) FiosMakeFilename(buf, _fios_path, name, extension, 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. -- cgit v1.2.3-54-g00ecf