Revert "Project modernization (#630)"
This code was not tested and breaks in Release builds, reverting to restore
functionality of the nightly. All in-game menus do not work and generating
a world crashes.
This reverts commit a9be52c41a.
This commit is contained in:
@@ -11,7 +11,7 @@ bool MinecraftDynamicConfigurations::s_bUpdatedConfigs[MinecraftDynamicConfigura
|
||||
MinecraftDynamicConfigurations::EDynamic_Configs MinecraftDynamicConfigurations::s_eCurrentConfig = MinecraftDynamicConfigurations::eDynamic_Config_Max;
|
||||
size_t MinecraftDynamicConfigurations::s_currentConfigSize = 0;
|
||||
size_t MinecraftDynamicConfigurations::s_dataWrittenSize = 0;
|
||||
byte *MinecraftDynamicConfigurations::s_dataWritten = nullptr;
|
||||
byte *MinecraftDynamicConfigurations::s_dataWritten = NULL;
|
||||
|
||||
void MinecraftDynamicConfigurations::Tick()
|
||||
{
|
||||
@@ -43,7 +43,7 @@ void MinecraftDynamicConfigurations::UpdateNextConfiguration()
|
||||
{
|
||||
if(!s_bUpdatedConfigs[i])
|
||||
{
|
||||
update = static_cast<EDynamic_Configs>(i);
|
||||
update = (EDynamic_Configs)i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -57,7 +57,7 @@ void MinecraftDynamicConfigurations::UpdateConfiguration(EDynamic_Configs id)
|
||||
{
|
||||
app.DebugPrintf("DynamicConfig: Attempting to update dynamic configuration %d\n", id);
|
||||
|
||||
HRESULT hr = Sentient::SenDynamicConfigGetSize( id, &s_currentConfigSize, &MinecraftDynamicConfigurations::GetSizeCompletedCallback, nullptr);
|
||||
HRESULT hr = Sentient::SenDynamicConfigGetSize( id, &s_currentConfigSize, &MinecraftDynamicConfigurations::GetSizeCompletedCallback, NULL);
|
||||
|
||||
switch(hr)
|
||||
{
|
||||
@@ -76,7 +76,7 @@ void MinecraftDynamicConfigurations::UpdateConfiguration(EDynamic_Configs id)
|
||||
break;
|
||||
case E_POINTER:
|
||||
app.DebugPrintf("DynamicConfig: Failed to get size for config as pointer is invalid\n");
|
||||
//The out_size pointer is nullptr.
|
||||
//The out_size pointer is NULL.
|
||||
break;
|
||||
}
|
||||
if(FAILED(hr) )
|
||||
@@ -97,7 +97,7 @@ void MinecraftDynamicConfigurations::GetSizeCompletedCallback(HRESULT taskResult
|
||||
&s_dataWrittenSize,
|
||||
s_dataWritten,
|
||||
&MinecraftDynamicConfigurations::GetDataCompletedCallback,
|
||||
nullptr
|
||||
NULL
|
||||
);
|
||||
|
||||
switch(hr)
|
||||
@@ -115,8 +115,8 @@ void MinecraftDynamicConfigurations::GetSizeCompletedCallback(HRESULT taskResult
|
||||
//Sentient is not initialized. You must call SentientInitialize before you call this function.
|
||||
break;
|
||||
case E_POINTER:
|
||||
app.DebugPrintf("DynamicConfig: Failed to get bytes for config as pointer is nullptr\n");
|
||||
//The out_size pointer is nullptr.
|
||||
app.DebugPrintf("DynamicConfig: Failed to get bytes for config as pointer is NULL\n");
|
||||
//The out_size pointer is NULL.
|
||||
break;
|
||||
}
|
||||
if(FAILED(hr) )
|
||||
@@ -160,7 +160,7 @@ void MinecraftDynamicConfigurations::GetDataCompletedCallback(HRESULT taskResu
|
||||
}
|
||||
|
||||
delete [] s_dataWritten;
|
||||
s_dataWritten = nullptr;
|
||||
s_dataWritten = NULL;
|
||||
|
||||
s_bUpdatedConfigs[s_eCurrentConfig] = true;
|
||||
UpdateNextConfiguration();
|
||||
|
||||
Reference in New Issue
Block a user