(svn r22511) -Add: Function to make heightmap file paths.

This commit is contained in:
alberth
2011-05-28 13:55:05 +00:00
parent b04d69df7a
commit 4b295664ad
4 changed files with 24 additions and 0 deletions

View File

@@ -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>
@@ -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.