iOS Support (#113)

undefined
This commit is contained in:
Brent
2024-01-22 09:22:41 -06:00
committed by GitHub
parent 90a15340b1
commit afe875e4fa
109 changed files with 6523 additions and 1105 deletions

View File

@@ -168,4 +168,3 @@ float Mth::random()
{
return g_Random.nextFloat();
}

View File

@@ -37,5 +37,11 @@ public:
static float sin(float);
static float sqrt(float);
static unsigned fastRandom();
// @NOTE: This is inlined.
static constexpr float Lerp(float a, float b, float progress)
{
return a + progress * (b - a);
}
};

View File

@@ -9,6 +9,7 @@
// note: not an official file name
#include "common/Utils.hpp"
#include "compat/PlatformDefinitions.h"
#if defined(_WIN32) && !defined(_XBOX)
@@ -36,7 +37,7 @@
int g_TimeSecondsOnInit = 0;
#if (!defined(USE_SDL) || defined(_WIN32)) && !defined(ANDROID)
#if (!defined(USE_SDL) || defined(_WIN32)) && !defined(ANDROID) && !MC_TARGET_OS_MAC
DIR* opendir(const char* name)
{

View File

@@ -26,17 +26,7 @@
#include <string>
#include <sstream>
#ifdef USE_OLD_CPP
#ifndef constexpr
#define constexpr const
#endif
#ifndef nullptr
#define nullptr NULL
#endif
#ifndef override
#define override
#endif
#endif
#include "../../compat/LegacyCPPCompatibility.hpp"
#ifdef _MSC_VER
#pragma warning (disable : 4068)
@@ -44,6 +34,7 @@
#if defined(_WIN32)
// Do we even need all this WinSock stuff anymore?
#ifndef _XBOX // assume we're on a normal Windows device
#define WIN32_LEAN_AND_MEAN
#include <WinSock2.h>
@@ -186,7 +177,7 @@ enum eTileID
TILE_NOTE_BLOCK,
TILE_BED,
TILE_RAIL_POWERED,
TYPE_RAIL_ACTIVATOR,
TILE_RAIL_ACTIVATOR,
TILE_PISTON_STICKY,
TILE_COBWEB,
TILE_TALLGRASS,
@@ -635,12 +626,6 @@ float Max(float a, float b);
void sleepMs(int ms);
// @NOTE: This is inlined.
static constexpr float Lerp(float a, float b, float progress)
{
return a + progress * (b - a);
}
bool createFolderIfNotExists(const char* pDir);
bool DeleteDirectory(const std::string& name, bool unused);