Minecraft Consoles latest changes + Better shadow for water in Extra mode

Culling for water need more work in extra graphics mode.
This commit is contained in:
GabsPuNs
2026-04-08 23:47:27 -04:00
parent 23102c65b6
commit 4dfedbffd1
12 changed files with 453 additions and 102 deletions

View File

@@ -117,7 +117,7 @@ static int ClampInt(int value, int minValue, int maxValue)
static bool TryParseBool(const std::string &value, bool *outValue)
{
if (outValue == NULL)
if (outValue == nullptr)
{
return false;
}
@@ -138,7 +138,7 @@ static bool TryParseBool(const std::string &value, bool *outValue)
static bool TryParseInt(const std::string &value, int *outValue)
{
if (outValue == NULL)
if (outValue == nullptr)
{
return false;
}
@@ -149,7 +149,7 @@ static bool TryParseInt(const std::string &value, int *outValue)
return false;
}
char *end = NULL;
char *end = nullptr;
long parsed = strtol(trimmed.c_str(), &end, 10);
if (end == trimmed.c_str() || *end != 0)
{
@@ -162,7 +162,7 @@ static bool TryParseInt(const std::string &value, int *outValue)
static bool TryParseInt64(const std::string &value, __int64 *outValue)
{
if (outValue == NULL)
if (outValue == nullptr)
{
return false;
}
@@ -173,7 +173,7 @@ static bool TryParseInt64(const std::string &value, __int64 *outValue)
return false;
}
char *end = NULL;
char *end = nullptr;
__int64 parsed = _strtoi64(trimmed.c_str(), &end, 10);
if (end == trimmed.c_str() || *end != 0)
{
@@ -265,7 +265,7 @@ static std::string NormalizeSaveId(const std::string &source)
static void ApplyDefaultServerProperties(std::unordered_map<std::string, std::string> *properties)
{
if (properties == NULL)
if (properties == nullptr)
{
return;
}
@@ -288,13 +288,13 @@ static void ApplyDefaultServerProperties(std::unordered_map<std::string, std::st
*/
static bool ReadServerPropertiesFile(const char *filePath, std::unordered_map<std::string, std::string> *properties, int *outParsedCount)
{
if (properties == NULL)
if (properties == nullptr)
{
return false;
}
std::string text;
if (filePath == NULL || !FileUtils::ReadTextFile(filePath, &text))
if (filePath == nullptr || !FileUtils::ReadTextFile(filePath, &text))
{
return false;
}
@@ -373,7 +373,7 @@ static bool ReadServerPropertiesFile(const char *filePath, std::unordered_map<st
start = nextStart;
}
if (outParsedCount != NULL)
if (outParsedCount != nullptr)
{
*outParsedCount = parsedCount;
}
@@ -390,7 +390,7 @@ static bool ReadServerPropertiesFile(const char *filePath, std::unordered_map<st
*/
static bool WriteServerPropertiesFile(const char *filePath, const std::unordered_map<std::string, std::string> &properties)
{
if (filePath == NULL)
if (filePath == nullptr)
{
return false;
}
@@ -428,7 +428,7 @@ static bool ReadNormalizedBoolProperty(
if (raw != normalized)
{
(*properties)[key] = normalized;
if (shouldWrite != NULL)
if (shouldWrite != nullptr)
{
*shouldWrite = true;
}
@@ -457,7 +457,7 @@ static int ReadNormalizedIntProperty(
if (raw != normalized)
{
(*properties)[key] = normalized;
if (shouldWrite != NULL)
if (shouldWrite != nullptr)
{
*shouldWrite = true;
}
@@ -486,7 +486,7 @@ static std::string ReadNormalizedStringProperty(
if (value != (*properties)[key])
{
(*properties)[key] = value;
if (shouldWrite != NULL)
if (shouldWrite != nullptr)
{
*shouldWrite = true;
}
@@ -507,7 +507,7 @@ static bool ReadNormalizedOptionalInt64Property(
if ((*properties)[key] != "")
{
(*properties)[key] = "";
if (shouldWrite != NULL)
if (shouldWrite != nullptr)
{
*shouldWrite = true;
}
@@ -519,7 +519,7 @@ static bool ReadNormalizedOptionalInt64Property(
if (!TryParseInt64(raw, &parsed))
{
(*properties)[key] = "";
if (shouldWrite != NULL)
if (shouldWrite != nullptr)
{
*shouldWrite = true;
}
@@ -530,13 +530,13 @@ static bool ReadNormalizedOptionalInt64Property(
if (raw != normalized)
{
(*properties)[key] = normalized;
if (shouldWrite != NULL)
if (shouldWrite != nullptr)
{
*shouldWrite = true;
}
}
if (outValue != NULL)
if (outValue != nullptr)
{
*outValue = parsed;
}
@@ -560,7 +560,7 @@ static EServerLogLevel ReadNormalizedLogLevelProperty(
if (raw != normalized)
{
(*properties)[key] = normalized;
if (shouldWrite != NULL)
if (shouldWrite != nullptr)
{
*shouldWrite = true;
}
@@ -594,13 +594,13 @@ static std::string ReadNormalizedLevelTypeProperty(
if (raw != normalized)
{
(*properties)[key] = normalized;
if (shouldWrite != NULL)
if (shouldWrite != nullptr)
{
*shouldWrite = true;
}
}
if (outIsFlat != NULL)
if (outIsFlat != nullptr)
{
*outIsFlat = isFlat;
}
@@ -658,7 +658,7 @@ static int WorldSizeToHellScale(int worldSize)
static bool TryParseWorldSize(const std::string &lowered, int *outWorldSize)
{
if (outWorldSize == NULL)
if (outWorldSize == nullptr)
{
return false;
}
@@ -712,17 +712,17 @@ static int ReadNormalizedWorldSizeProperty(
if (raw != normalized)
{
(*properties)[key] = normalized;
if (shouldWrite != NULL)
if (shouldWrite != nullptr)
{
*shouldWrite = true;
}
}
if (outXzChunks != NULL)
if (outXzChunks != nullptr)
{
*outXzChunks = WorldSizeToXzChunks(worldSize);
}
if (outHellScale != NULL)
if (outHellScale != nullptr)
{
*outHellScale = WorldSizeToHellScale(worldSize);
}