* Start work on ExternalFileLevelStorage

This commit is contained in:
iProgramInCpp
2023-08-02 09:07:20 +03:00
parent 858315ce54
commit 865d688212
9 changed files with 378 additions and 1 deletions

View File

@@ -11,17 +11,40 @@
#include "Utils.hpp"
#ifdef _WIN32
#include <Windows.h>
#include <io.h>
#include <direct.h>
// XPL means "Cross PLatform"
#define XPL_ACCESS _access
#define XPL_MKDIR(path, mode) _mkdir(path)
// Why are we not using GetTickCount64()? It's simple -- getTimeMs has the exact same problem as using regular old GetTickCount.
#pragma warning(disable : 28159)
#else
#include <sys/time.h>
#include <unistd.h>
#include <sys/stat.h>
#define XPL_ACCESS access
#define XPL_MKDIR(path, mode) mkdir(path, mode)
#endif
#include "compat/GL.hpp"
int g_TimeSecondsOnInit = 0;
bool createFolderIfNotExists(const char* pDir)
{
if (!XPL_ACCESS(pDir, 0))
return true;
return XPL_MKDIR(pDir, 0755) == 0;
}
const char* GetTerrainName()
{
return "terrain.png";