1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-19 21:13:05 +01:00

add a CLI command for converting saved games <-> scenarios

This commit is contained in:
Ted John
2016-04-19 22:09:42 +01:00
parent f1b41bf51d
commit f3356caa39
12 changed files with 256 additions and 16 deletions

View File

@@ -79,6 +79,28 @@ namespace Path
return buffer;
}
const utf8 * GetExtension(const utf8 * path)
{
const utf8 * lastDot = nullptr;
const utf8 * ch = path;
for (; *ch != '\0'; ch++)
{
if (*ch == '.')
{
lastDot = ch;
}
}
if (lastDot == nullptr)
{
// Return the null terminator, i.e. a blank extension
return ch;
}
// Return the extension including the dot
return lastDot;
}
utf8 * GetAbsolute(utf8 *buffer, size_t bufferSize, const utf8 * relativePath)
{
#if __WINDOWS__