mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/GabsPuNs-MinecraftConsoles.git
synced 2026-05-30 19:25:38 +00:00
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:
@@ -31,7 +31,7 @@ struct SaveInfoQueryContext
|
||||
SaveInfoQueryContext()
|
||||
: done(false)
|
||||
, success(false)
|
||||
, details(NULL)
|
||||
, details(nullptr)
|
||||
{
|
||||
}
|
||||
};
|
||||
@@ -75,7 +75,7 @@ static void SetStorageSaveUniqueFilename(const std::string &saveFilename)
|
||||
|
||||
static void LogSaveFilename(const char *prefix, const std::string &saveFilename)
|
||||
{
|
||||
LogInfof("world-io", "%s: %s", (prefix != NULL) ? prefix : "save-filename", saveFilename.c_str());
|
||||
LogInfof("world-io", "%s: %s", (prefix != nullptr) ? prefix : "save-filename", saveFilename.c_str());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -86,7 +86,7 @@ static void LogSaveFilename(const char *prefix, const std::string &saveFilename)
|
||||
*/
|
||||
static bool EnsureDirectoryExists(const std::wstring &directoryPath, bool *outCreated)
|
||||
{
|
||||
if (outCreated != NULL)
|
||||
if (outCreated != nullptr)
|
||||
{
|
||||
*outCreated = false;
|
||||
}
|
||||
@@ -107,9 +107,9 @@ static bool EnsureDirectoryExists(const std::wstring &directoryPath, bool *outCr
|
||||
return false;
|
||||
}
|
||||
|
||||
if (CreateDirectoryW(directoryPath.c_str(), NULL))
|
||||
if (CreateDirectoryW(directoryPath.c_str(), nullptr))
|
||||
{
|
||||
if (outCreated != NULL)
|
||||
if (outCreated != nullptr)
|
||||
{
|
||||
*outCreated = true;
|
||||
}
|
||||
@@ -189,7 +189,7 @@ static void LogEnumeratedSaveInfo(int index, const SAVE_INFO &saveInfo)
|
||||
static int GetSavesInfoCallbackProc(LPVOID lpParam, SAVE_DETAILS *pSaveDetails, const bool bRes)
|
||||
{
|
||||
SaveInfoQueryContext *context = (SaveInfoQueryContext *)lpParam;
|
||||
if (context != NULL)
|
||||
if (context != nullptr)
|
||||
{
|
||||
context->details = pSaveDetails;
|
||||
context->success = bRes;
|
||||
@@ -207,7 +207,7 @@ static int GetSavesInfoCallbackProc(LPVOID lpParam, SAVE_DETAILS *pSaveDetails,
|
||||
static int LoadSaveDataCallbackProc(LPVOID lpParam, const bool bIsCorrupt, const bool bIsOwner)
|
||||
{
|
||||
SaveDataLoadContext *context = (SaveDataLoadContext *)lpParam;
|
||||
if (context != NULL)
|
||||
if (context != nullptr)
|
||||
{
|
||||
context->isCorrupt = bIsCorrupt;
|
||||
context->isOwner = bIsOwner;
|
||||
@@ -236,12 +236,12 @@ static bool WaitForSaveInfoResult(SaveInfoQueryContext *context, DWORD timeoutMs
|
||||
return true;
|
||||
}
|
||||
|
||||
if (context->details == NULL)
|
||||
if (context->details == nullptr)
|
||||
{
|
||||
// Some implementations fill ReturnSavesInfo before the callback
|
||||
// Keep polling as a fallback instead of relying only on callback completion
|
||||
SAVE_DETAILS *details = StorageManager.ReturnSavesInfo();
|
||||
if (details != NULL)
|
||||
if (details != nullptr)
|
||||
{
|
||||
context->details = details;
|
||||
context->success = true;
|
||||
@@ -250,7 +250,7 @@ static bool WaitForSaveInfoResult(SaveInfoQueryContext *context, DWORD timeoutMs
|
||||
}
|
||||
}
|
||||
|
||||
if (tickProc != NULL)
|
||||
if (tickProc != nullptr)
|
||||
{
|
||||
tickProc();
|
||||
}
|
||||
@@ -278,7 +278,7 @@ static bool WaitForSaveLoadResult(SaveDataLoadContext *context, DWORD timeoutMs,
|
||||
return true;
|
||||
}
|
||||
|
||||
if (tickProc != NULL)
|
||||
if (tickProc != nullptr)
|
||||
{
|
||||
tickProc();
|
||||
}
|
||||
@@ -370,12 +370,12 @@ static EWorldSaveLoadResult PrepareWorldSaveData(
|
||||
LoadSaveDataThreadParam **outSaveData,
|
||||
std::string *outResolvedSaveFilename)
|
||||
{
|
||||
if (outSaveData == NULL)
|
||||
if (outSaveData == nullptr)
|
||||
{
|
||||
return eWorldSaveLoad_Failed;
|
||||
}
|
||||
*outSaveData = NULL;
|
||||
if (outResolvedSaveFilename != NULL)
|
||||
*outSaveData = nullptr;
|
||||
if (outResolvedSaveFilename != nullptr)
|
||||
{
|
||||
outResolvedSaveFilename->clear();
|
||||
}
|
||||
@@ -404,11 +404,11 @@ static EWorldSaveLoadResult PrepareWorldSaveData(
|
||||
return eWorldSaveLoad_Failed;
|
||||
}
|
||||
|
||||
if (infoContext.details == NULL)
|
||||
if (infoContext.details == nullptr)
|
||||
{
|
||||
infoContext.details = StorageManager.ReturnSavesInfo();
|
||||
}
|
||||
if (infoContext.details == NULL)
|
||||
if (infoContext.details == nullptr)
|
||||
{
|
||||
LogWorldIO("failed to retrieve save list");
|
||||
return eWorldSaveLoad_Failed;
|
||||
@@ -486,7 +486,7 @@ static EWorldSaveLoadResult PrepareWorldSaveData(
|
||||
resolvedSaveFilename = targetSaveFilename;
|
||||
}
|
||||
|
||||
if (outResolvedSaveFilename != NULL)
|
||||
if (outResolvedSaveFilename != nullptr)
|
||||
{
|
||||
*outResolvedSaveFilename = resolvedSaveFilename;
|
||||
}
|
||||
@@ -621,11 +621,11 @@ bool WaitForWorldActionIdle(
|
||||
{
|
||||
// Keep network and storage progressing while waiting
|
||||
// If this stops, save action itself may stall and time out
|
||||
if (tickProc != NULL)
|
||||
if (tickProc != nullptr)
|
||||
{
|
||||
tickProc();
|
||||
}
|
||||
if (handleActionsProc != NULL)
|
||||
if (handleActionsProc != nullptr)
|
||||
{
|
||||
handleActionsProc();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user