aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/Xbox/Sentient
diff options
context:
space:
mode:
authorModMaker101 <119018978+ModMaker101@users.noreply.github.com>2026-03-08 19:08:36 -0400
committerGitHub <noreply@github.com>2026-03-08 18:08:36 -0500
commit28614b922fb77149a54da1a87bebfbc98736f296 (patch)
tree7f828ba86a4ee18d0a80d29de64f6199a5412512 /Minecraft.Client/Xbox/Sentient
parent88798b501d0cf6287b6f87acb2592676e3cec58d (diff)
Modernize project codebase (#906)
* Fixed boats falling and a TP glitch #266 * Replaced every C-style cast with C++ ones * Replaced every C-style cast with C++ ones * Fixed boats falling and a TP glitch #266 * Updated NULL to nullptr and fixing some type issues * Modernized and fixed a few bugs - Replaced most instances of `NULL` with `nullptr`. - Replaced most `shared_ptr(new ...)` with `make_shared`. - Removed the `nullptr` macro as it was interfering with the actual nullptr keyword in some instances. * Fixing more conflicts * Replace int loops with size_t and start work on overrides * Add safety checks and fix a issue with vector going OOR
Diffstat (limited to 'Minecraft.Client/Xbox/Sentient')
-rw-r--r--Minecraft.Client/Xbox/Sentient/DynamicConfigurations.cpp16
-rw-r--r--Minecraft.Client/Xbox/Sentient/Include/SenClientAvatar.h18
-rw-r--r--Minecraft.Client/Xbox/Sentient/Include/SenClientBoxArt.h38
-rw-r--r--Minecraft.Client/Xbox/Sentient/Include/SenClientConfig.h4
-rw-r--r--Minecraft.Client/Xbox/Sentient/Include/SenClientCore.h2
-rw-r--r--Minecraft.Client/Xbox/Sentient/Include/SenClientCultureBackCompat_SenClientUGC.h4
-rw-r--r--Minecraft.Client/Xbox/Sentient/Include/SenClientDynamicConfig.h8
-rw-r--r--Minecraft.Client/Xbox/Sentient/Include/SenClientFame.h24
-rw-r--r--Minecraft.Client/Xbox/Sentient/Include/SenClientResource.h10
-rw-r--r--Minecraft.Client/Xbox/Sentient/Include/SenClientUGC.h10
-rw-r--r--Minecraft.Client/Xbox/Sentient/Include/SenClientUser.h4
-rw-r--r--Minecraft.Client/Xbox/Sentient/SentientManager.cpp64
-rw-r--r--Minecraft.Client/Xbox/Sentient/SentientStats.cpp72
13 files changed, 137 insertions, 137 deletions
diff --git a/Minecraft.Client/Xbox/Sentient/DynamicConfigurations.cpp b/Minecraft.Client/Xbox/Sentient/DynamicConfigurations.cpp
index 5d2b9763..086b141e 100644
--- a/Minecraft.Client/Xbox/Sentient/DynamicConfigurations.cpp
+++ b/Minecraft.Client/Xbox/Sentient/DynamicConfigurations.cpp
@@ -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 = NULL;
+byte *MinecraftDynamicConfigurations::s_dataWritten = nullptr;
void MinecraftDynamicConfigurations::Tick()
{
@@ -43,7 +43,7 @@ void MinecraftDynamicConfigurations::UpdateNextConfiguration()
{
if(!s_bUpdatedConfigs[i])
{
- update = (EDynamic_Configs)i;
+ update = static_cast<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, NULL);
+ HRESULT hr = Sentient::SenDynamicConfigGetSize( id, &s_currentConfigSize, &MinecraftDynamicConfigurations::GetSizeCompletedCallback, nullptr);
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 NULL.
+ //The out_size pointer is nullptr.
break;
}
if(FAILED(hr) )
@@ -97,7 +97,7 @@ void MinecraftDynamicConfigurations::GetSizeCompletedCallback(HRESULT taskResult
&s_dataWrittenSize,
s_dataWritten,
&MinecraftDynamicConfigurations::GetDataCompletedCallback,
- NULL
+ nullptr
);
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 NULL\n");
- //The out_size pointer is NULL.
+ app.DebugPrintf("DynamicConfig: Failed to get bytes for config as pointer is nullptr\n");
+ //The out_size pointer is nullptr.
break;
}
if(FAILED(hr) )
@@ -160,7 +160,7 @@ void MinecraftDynamicConfigurations::GetDataCompletedCallback(HRESULT taskResu
}
delete [] s_dataWritten;
- s_dataWritten = NULL;
+ s_dataWritten = nullptr;
s_bUpdatedConfigs[s_eCurrentConfig] = true;
UpdateNextConfiguration();
diff --git a/Minecraft.Client/Xbox/Sentient/Include/SenClientAvatar.h b/Minecraft.Client/Xbox/Sentient/Include/SenClientAvatar.h
index dfccfd3b..524c1bdc 100644
--- a/Minecraft.Client/Xbox/Sentient/Include/SenClientAvatar.h
+++ b/Minecraft.Client/Xbox/Sentient/Include/SenClientAvatar.h
@@ -108,7 +108,7 @@ namespace Sentient
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
/// SENTIENT_E_GUEST_ACCESS_VIOLATION: A guest may not spawn this call.
- /// E_POINTER: out_avatarInfoList is NULL.
+ /// E_POINTER: out_avatarInfoList is nullptr.
/// E_FAIL: Failed to spawn server call.
/// S_OK: Server call spawned successfully.
///
@@ -149,7 +149,7 @@ namespace Sentient
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
/// SENTIENT_E_GUEST_ACCESS_VIOLATION: A guest may not spawn this call.
- /// E_POINTER: out_avatarInfo is NULL.
+ /// E_POINTER: out_avatarInfo is nullptr.
/// E_FAIL: Failed to spawn server call.
/// S_OK: Server call spawned successfully.
///
@@ -192,7 +192,7 @@ namespace Sentient
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
/// E_INVALIDARG: avatarInfo.resourceID or avatarInfo.[fe]male.metadata is invalid.
- /// E_POINTER: out_data is NULL.
+ /// E_POINTER: out_data is nullptr.
/// E_FAIL: Failed to spawn server call.
/// S_OK: Server call spawned successfully.
///
@@ -235,7 +235,7 @@ namespace Sentient
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
/// E_INVALIDARG: avatarInfo.resourceID or avatarInfo.[fe]male.assets is invalid.
- /// E_POINTER: out_data is NULL.
+ /// E_POINTER: out_data is nullptr.
/// E_FAIL: Failed to spawn server call.
/// S_OK: Server call spawned successfully.
///
@@ -278,7 +278,7 @@ namespace Sentient
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
/// E_INVALIDARG: avatarInfo.resourceID or avatarInfo.[fe]male.icon is invalid.
- /// E_POINTER: out_data is NULL.
+ /// E_POINTER: out_data is nullptr.
/// E_FAIL: Failed to spawn server call.
/// S_OK: Server call spawned successfully.
///
@@ -316,7 +316,7 @@ namespace Sentient
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
/// E_INVALIDARG: avatarInfo.resourceID or avatarInfo.xml is invalid.
- /// E_POINTER: out_avatarExtraInfo is NULL.
+ /// E_POINTER: out_avatarExtraInfo is nullptr.
/// E_FAIL: Failed to spawn server call.
/// S_OK: Server call spawned successfully.
///
@@ -352,14 +352,14 @@ namespace Sentient
// First method, filling a fixed-size buffer:
//
// wchar_t buffer[1234];
- // SenAvatarXMLGetTitle( xml, loc, _countof(buffer), NULL, buffer );
+ // SenAvatarXMLGetTitle( xml, loc, _countof(buffer), nullptr, buffer );
//
// Second method, filling a dynamically-allocated buffer:
//
// size_t bufferLength;
- // SenAvatarXMLGetTitle( xml, loc, 0, &bufferLength, NULL );
+ // SenAvatarXMLGetTitle( xml, loc, 0, &bufferLength, nullptr );
// wchar_t buffer = new wchar_t[bufferLength];
- // SenAvatarXMLGetTitle( xml, loc, bufferLength, NULL, buffer );
+ // SenAvatarXMLGetTitle( xml, loc, bufferLength, nullptr, buffer );
//
// Note that bufferLength is in wchars, and includes the terminating nul.
// The actual length of the _string_ is (*out_bufferLength - 1).
diff --git a/Minecraft.Client/Xbox/Sentient/Include/SenClientBoxArt.h b/Minecraft.Client/Xbox/Sentient/Include/SenClientBoxArt.h
index 09662243..95a8c188 100644
--- a/Minecraft.Client/Xbox/Sentient/Include/SenClientBoxArt.h
+++ b/Minecraft.Client/Xbox/Sentient/Include/SenClientBoxArt.h
@@ -116,7 +116,7 @@ namespace Sentient
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
/// SENTIENT_E_GUEST_ACCESS_VIOLATION: A guest may not spawn this call.
- /// E_POINTER: out_boxArtInfoList is NULL.
+ /// E_POINTER: out_boxArtInfoList is nullptr.
/// E_FAIL: Failed to spawn server call.
/// S_OK: Server call spawned successfully.
///
@@ -160,7 +160,7 @@ namespace Sentient
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
/// E_INVALIDARG: boxArtInfo.resourceID or boxArtInfo.image is invalid.
- /// E_POINTER: out_data is NULL.
+ /// E_POINTER: out_data is nullptr.
/// E_FAIL: Failed to spawn server call.
/// S_OK: Server call spawned successfully.
///
@@ -198,7 +198,7 @@ namespace Sentient
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
/// E_INVALIDARG: boxArtInfo.resourceID or boxArtInfo.xml is invalid.
- /// E_POINTER: out_boxArtExtraInfo is NULL.
+ /// E_POINTER: out_boxArtExtraInfo is nullptr.
/// E_FAIL: Failed to spawn server call.
/// S_OK: Server call spawned successfully.
///
@@ -236,7 +236,7 @@ namespace Sentient
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
/// E_INVALIDARG: boxArtInfo.resourceID or boxArtInfo.xml is invalid.
- /// E_POINTER: out_data is NULL.
+ /// E_POINTER: out_data is nullptr.
/// E_FAIL: Failed to spawn server call.
/// S_OK: Server call spawned successfully.
///
@@ -263,7 +263,7 @@ namespace Sentient
///
/// @param[in] culture
/// This is the result of a call to SenCultureFind() or SenCultureGet*().
- /// You may also pass NULL to use the culture set with SenCultureSetCurrent().
+ /// You may also pass nullptr to use the culture set with SenCultureSetCurrent().
///
/// @param[in] bufferLength
/// Note that bufferLength is in wchars, and needs to _include_ space for the terminating nul.
@@ -271,16 +271,16 @@ namespace Sentient
/// @param[out] out_bufferLength
/// Used to return the actual number of wchars written to the buffer, including the terminating nul.
/// The actual length of the _string_ is (*out_bufferLength - 1).
- /// Pass @a out_bufferLength = NULL if you don't care about the actual size.
+ /// Pass @a out_bufferLength = nullptr if you don't care about the actual size.
///
/// @param[out] out_buffer
/// The buffer to fill in with the string.
/// It is assumed that this is preallocated to at least @a bufferLength wchars.
- /// Pass @a out_buffer = NULL if you are only interested in finding out the necessary buffer size.
+ /// Pass @a out_buffer = nullptr if you are only interested in finding out the necessary buffer size.
///
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
- /// E_UNEXPECTED: passed a NULL culture without a default culture being set first.
+ /// E_UNEXPECTED: passed a nullptr culture without a default culture being set first.
/// E_INVALIDARG: senXML does not contain parsed XML data.
/// E_FAIL: Failed to locate text.
/// S_OK: Server call spawned successfully.
@@ -291,14 +291,14 @@ namespace Sentient
/// First method, filling a fixed-size buffer:
///
/// wchar_t buffer[1234];
- /// SenBoxArtXMLGetTitle( xml, culture, _countof(buffer), NULL, buffer );
+ /// SenBoxArtXMLGetTitle( xml, culture, _countof(buffer), nullptr, buffer );
///
/// Second method, filling a dynamically-allocated buffer:
///
/// size_t bufferLength;
- /// SenBoxArtXMLGetTitle( xml, culture, 0, &bufferLength, NULL );
+ /// SenBoxArtXMLGetTitle( xml, culture, 0, &bufferLength, nullptr );
/// wchar_t buffer = new wchar_t[bufferLength];
- /// SenBoxArtXMLGetTitle( xml, culture, bufferLength, NULL, buffer );
+ /// SenBoxArtXMLGetTitle( xml, culture, bufferLength, nullptr, buffer );
///
/// @related SenBoxArtDownloadXML()
/// @related SenXMLParse()
@@ -319,7 +319,7 @@ namespace Sentient
///
/// @param[in] culture
/// This is the result of a call to SenCultureFind() or SenCultureGet*().
- /// You may also pass NULL to use the culture set with SenCultureSetCurrent().
+ /// You may also pass nullptr to use the culture set with SenCultureSetCurrent().
///
/// @param[in] bufferLength
/// Note that bufferLength is in wchars, and needs to _include_ space for the terminating nul.
@@ -327,16 +327,16 @@ namespace Sentient
/// @param[out] out_bufferLength
/// Used to return the actual number of wchars written to the buffer, including the terminating nul.
/// The actual length of the _string_ is (*out_bufferLength - 1).
- /// Pass @a out_bufferLength = NULL if you don't care about the actual size.
+ /// Pass @a out_bufferLength = nullptr if you don't care about the actual size.
///
/// @param[out] out_buffer
/// The buffer to fill in with the string.
/// It is assumed that this is preallocated to at least @a bufferLength wchars.
- /// Pass @a out_buffer = NULL if you are only interested in finding out the necessary buffer size.
+ /// Pass @a out_buffer = nullptr if you are only interested in finding out the necessary buffer size.
///
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
- /// E_UNEXPECTED: passed a NULL culture without a default culture being set first.
+ /// E_UNEXPECTED: passed a nullptr culture without a default culture being set first.
/// E_INVALIDARG: senXML does not contain parsed XML data.
/// E_FAIL: Failed to locate text.
/// S_OK: Server call spawned successfully.
@@ -347,14 +347,14 @@ namespace Sentient
/// First method, filling a fixed-size buffer:
///
/// wchar_t buffer[1234];
- /// SenBoxArtXMLGetDescription( xml, culture, _countof(buffer), NULL, buffer );
+ /// SenBoxArtXMLGetDescription( xml, culture, _countof(buffer), nullptr, buffer );
///
/// Second method, filling a dynamically-allocated buffer:
///
/// size_t bufferLength;
- /// SenBoxArtXMLGetDescription( xml, culture, 0, &bufferLength, NULL );
+ /// SenBoxArtXMLGetDescription( xml, culture, 0, &bufferLength, nullptr );
/// wchar_t buffer = new wchar_t[bufferLength];
- /// SenBoxArtXMLGetDescription( xml, culture, bufferLength, NULL, buffer );
+ /// SenBoxArtXMLGetDescription( xml, culture, bufferLength, nullptr, buffer );
///
/// @related SenBoxArtDownloadXML()
/// @related SenXMLParse()
@@ -390,7 +390,7 @@ namespace Sentient
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
/// E_INVALIDARG: boxArtInfo.resourceID or boxArtInfo.image is invalid.
- /// E_POINTER: out_data is NULL.
+ /// E_POINTER: out_data is nullptr.
/// E_FAIL: Failed to spawn server call.
/// S_OK: Server call spawned successfully.
///
diff --git a/Minecraft.Client/Xbox/Sentient/Include/SenClientConfig.h b/Minecraft.Client/Xbox/Sentient/Include/SenClientConfig.h
index 81c2f3cc..0aca08ef 100644
--- a/Minecraft.Client/Xbox/Sentient/Include/SenClientConfig.h
+++ b/Minecraft.Client/Xbox/Sentient/Include/SenClientConfig.h
@@ -55,7 +55,7 @@ namespace Sentient
///
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
- /// E_POINTER: out_configInfo is NULL.
+ /// E_POINTER: out_configInfo is nullptr.
/// E_FAIL: Failed to spawn server call.
/// S_OK: Server call spawned successfully.
///
@@ -95,7 +95,7 @@ namespace Sentient
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
/// E_INVALIDARG: configInfo.resourceID or configInfo.config is invalid.
- /// E_POINTER: out_data is NULL.
+ /// E_POINTER: out_data is nullptr.
/// E_FAIL: Failed to spawn server call.
/// S_OK: Server call spawned successfully.
///
diff --git a/Minecraft.Client/Xbox/Sentient/Include/SenClientCore.h b/Minecraft.Client/Xbox/Sentient/Include/SenClientCore.h
index f86eb92a..4d3815d2 100644
--- a/Minecraft.Client/Xbox/Sentient/Include/SenClientCore.h
+++ b/Minecraft.Client/Xbox/Sentient/Include/SenClientCore.h
@@ -42,7 +42,7 @@
3. Many functions are designed for asynchronous use, and will internally create a task that
will only finish after feedback from the server.
- a. These functions can be either blocking or asynchronous. If the callback pointer is NULL
+ a. These functions can be either blocking or asynchronous. If the callback pointer is nullptr
then it is a blocking call.
b. If the call is asynchronous, then it will always return instantly, and will return S_OK
if a task has been created.
diff --git a/Minecraft.Client/Xbox/Sentient/Include/SenClientCultureBackCompat_SenClientUGC.h b/Minecraft.Client/Xbox/Sentient/Include/SenClientCultureBackCompat_SenClientUGC.h
index b36fd6e5..02e255e8 100644
--- a/Minecraft.Client/Xbox/Sentient/Include/SenClientCultureBackCompat_SenClientUGC.h
+++ b/Minecraft.Client/Xbox/Sentient/Include/SenClientCultureBackCompat_SenClientUGC.h
@@ -25,8 +25,8 @@ namespace Sentient
///
/// @param[in] culture
/// This is the result of a call to SenCultureFind() or SenCultureGet*().
- /// You may also pass NULL to use the culture set with SenCultureSetCurrent().
- /// May be NULL for default culture.
+ /// You may also pass nullptr to use the culture set with SenCultureSetCurrent().
+ /// May be nullptr for default culture.
///
/// @param[in] maxResults
/// Used to indicate the number of items to be returned by @a out_feedInfo.
diff --git a/Minecraft.Client/Xbox/Sentient/Include/SenClientDynamicConfig.h b/Minecraft.Client/Xbox/Sentient/Include/SenClientDynamicConfig.h
index d6c5cb64..7b652aae 100644
--- a/Minecraft.Client/Xbox/Sentient/Include/SenClientDynamicConfig.h
+++ b/Minecraft.Client/Xbox/Sentient/Include/SenClientDynamicConfig.h
@@ -34,7 +34,7 @@ namespace Sentient
///
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
- /// E_POINTER: size is NULL.
+ /// E_POINTER: size is nullptr.
/// E_FAIL: Failed to spawn server call.
/// S_OK: Server call spawned successfully.
///
@@ -66,7 +66,7 @@ namespace Sentient
///
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
- /// E_POINTER: size is NULL.
+ /// E_POINTER: size is nullptr.
/// E_FAIL: Failed to spawn server call.
/// S_OK: Server call spawned successfully.
///
@@ -109,7 +109,7 @@ namespace Sentient
///
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
- /// E_POINTER: out_data is NULL.
+ /// E_POINTER: out_data is nullptr.
/// E_FAIL: Failed to spawn server call.
/// S_OK: Server call spawned successfully.
///
@@ -149,7 +149,7 @@ namespace Sentient
///
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
- /// E_POINTER: out_data is NULL.
+ /// E_POINTER: out_data is nullptr.
/// E_FAIL: Failed to spawn server call.
/// S_OK: Server call spawned successfully.
///
diff --git a/Minecraft.Client/Xbox/Sentient/Include/SenClientFame.h b/Minecraft.Client/Xbox/Sentient/Include/SenClientFame.h
index 1e823075..8f07b1ce 100644
--- a/Minecraft.Client/Xbox/Sentient/Include/SenClientFame.h
+++ b/Minecraft.Client/Xbox/Sentient/Include/SenClientFame.h
@@ -215,7 +215,7 @@ namespace Sentient
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
/// SENTIENT_E_GUEST_ACCESS_VIOLATION: A guest may not spawn this call.
- /// E_POINTER: out_userFameVIPArray is NULL.
+ /// E_POINTER: out_userFameVIPArray is nullptr.
/// SENTIENT_E_TOO_MANY_CALLS: This call has been rejected to avoid excessive server load. Try again later.
/// E_FAIL: Failed to spawn server call.
/// S_OK: Server call spawned successfully.
@@ -243,7 +243,7 @@ namespace Sentient
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
/// SENTIENT_E_GUEST_ACCESS_VIOLATION: A guest may not spawn this call.
- /// E_POINTER: out_fameVIPData is NULL.
+ /// E_POINTER: out_fameVIPData is nullptr.
/// SENTIENT_S_OPERATION_IN_PROGRESS: The call could not be completed immediately and out_fameVIPData has not been filled in.
/// S_OK: The operation completed successfully.
///
@@ -304,8 +304,8 @@ namespace Sentient
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
/// SENTIENT_E_GUEST_ACCESS_VIOLATION: A guest may not spawn this call.
- /// E_POINTER: out_entryArray or out_leaderboardResults is NULL.
- /// E_INVALIDARG: userCallback is NULL and out_senHandle is non-NULL. Task handles are not supported for synchronous requests.
+ /// E_POINTER: out_entryArray or out_leaderboardResults is nullptr.
+ /// E_INVALIDARG: userCallback is nullptr and out_senHandle is non-nullptr. Task handles are not supported for synchronous requests.
/// SENTIENT_E_TOO_MANY_CALLS: This call has been rejected to avoid excessive server load. Try again later.
/// E_FAIL: Failed to spawn server call.
/// S_OK: Server call spawned successfully.
@@ -331,7 +331,7 @@ namespace Sentient
///
/// @return SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
/// SENTIENT_E_GUEST_ACCESS_VIOLATION: A guest may not spawn this call.
- /// E_POINTER: out_awardData is NULL.
+ /// E_POINTER: out_awardData is nullptr.
/// SENTIENT_S_OPERATION_IN_PROGRESS: The call could not be completed immediately and out_awardData has not been filled in.
/// S_FALSE: The operation completed successfully but there were no awards to report. out_awardData has not been filled in.
/// S_OK: The operation completed successfully and there was a valid award to report. out_awardData contains information about the award.
@@ -351,7 +351,7 @@ namespace Sentient
///
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
- /// E_POINTER: out_timeRemaining is NULL.
+ /// E_POINTER: out_timeRemaining is nullptr.
/// SENTIENT_S_OPERATION_IN_PROGRESS: The call could not be completed immediately and out_timeRemaining has not been filled in.
/// E_FAIL: Internal failure. Check log for output.
/// S_OK: Call completed successfully and out_timeRemaining has been filled in.
@@ -373,7 +373,7 @@ namespace Sentient
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
/// SENTIENT_E_GUEST_ACCESS_VIOLATION: A guest may not spawn this call.
- /// E_POINTER: out_timeRemaining is NULL.
+ /// E_POINTER: out_timeRemaining is nullptr.
/// SENTIENT_S_OPERATION_IN_PROGRESS: The call could not be completed immediately and out_timeRemaining has not been filled in.
/// S_FALSE: The VIP level of the supplied user does not expire. out_timeRemaining has not been filled in.
/// E_FAIL: Internal failure. Check log for output.
@@ -400,7 +400,7 @@ namespace Sentient
///
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
- /// E_POINTER: out_name is NULL.
+ /// E_POINTER: out_name is nullptr.
/// E_INVALIDARG: vipLevel is outside the range of known VIP levels.
/// SENTIENT_S_OPERATION_IN_PROGRESS: The call could not be completed immediately and out_name has not been filled in.
/// S_OK: The operation completed successfully.
@@ -423,7 +423,7 @@ namespace Sentient
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
/// SENTIENT_E_GUEST_ACCESS_VIOLATION: A guest may not spawn this call.
- /// E_POINTER: out_count is NULL.
+ /// E_POINTER: out_count is nullptr.
/// SENTIENT_S_OPERATION_IN_PROGRESS: The call could not be completed immediately and out_count has not been filled in.
/// E_FAIL: Internal failure. Check log for output.
/// S_OK: The operation completed successfully.
@@ -456,7 +456,7 @@ namespace Sentient
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
/// SENTIENT_E_GUEST_ACCESS_VIOLATION: A guest may not spawn this call.
- /// E_POINTER: out_dataCount or out_displayData is NULL.
+ /// E_POINTER: out_dataCount or out_displayData is nullptr.
/// E_INVALIDARG: startIndex is greater than the total number of items available.
/// SENTIENT_S_OPERATION_IN_PROGRESS: The call could not be completed immediately and output parameters have not been filled in.
/// E_FAIL: Internal failure. Check log for output.
@@ -553,8 +553,8 @@ namespace Sentient
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
/// SENTIENT_E_GUEST_ACCESS_VIOLATION: A guest may not spawn this call.
- /// E_INVALIDARG: Either userCallback is NULL and out_senHandle is non-NULL, or participantCount is less than 2.
- /// E_POINTER: participants is NULL.
+ /// E_INVALIDARG: Either userCallback is nullptr and out_senHandle is non-nullptr, or participantCount is less than 2.
+ /// E_POINTER: participants is nullptr.
/// E_FAIL: Failed to spawn server call.
/// S_OK: Server call spawned successfully.
///
diff --git a/Minecraft.Client/Xbox/Sentient/Include/SenClientResource.h b/Minecraft.Client/Xbox/Sentient/Include/SenClientResource.h
index e8405d5e..b749a164 100644
--- a/Minecraft.Client/Xbox/Sentient/Include/SenClientResource.h
+++ b/Minecraft.Client/Xbox/Sentient/Include/SenClientResource.h
@@ -45,10 +45,10 @@ namespace Sentient
enum SenResourceID : INT32
{
/// This is used to indicate a failed search, an invalid resource structure, or sometimes to substitute for a default.
- SenResourceID_Invalid = (INT32)SenResourceType_Invalid << 24,
+ SenResourceID_Invalid = static_cast<INT32>(SenResourceType_Invalid) << 24,
/// This is the first VIP reward costume and there is one for each title.
- SenResourceID_Superstar_0 = (INT32)SenResourceType_Avatar << 24,
+ SenResourceID_Superstar_0 = static_cast<INT32>(SenResourceType_Avatar) << 24,
/// This is the second VIP reward costume and there is one for each title.
SenResourceID_Superstar_1,
/// This is the third VIP reward costume and there is one for each title.
@@ -59,15 +59,15 @@ namespace Sentient
SenResourceID_Superstar_4,
/// This is used for the cross-sell screen and contains things such as an image, offerID, strings, etc.
- SenResourceID_BoxArt_0 = (INT32)SenResourceType_BoxArt << 24,
+ SenResourceID_BoxArt_0 = static_cast<INT32>(SenResourceType_BoxArt) << 24,
/// This is used for game-private config files, and is only the base of the range.
/// Titles may use the entire 24-bit space for various custom config files.
- SenResourceID_Config_0 = (INT32)SenResourceType_Config << 24,
+ SenResourceID_Config_0 = static_cast<INT32>(SenResourceType_Config) << 24,
/// This is used for server-supplied help files/text.
/// At the moment, this is not supported.
- SenResourceID_Help_0 = (INT32)SenResourceType_Help << 24,
+ SenResourceID_Help_0 = static_cast<INT32>(SenResourceType_Help) << 24,
};
diff --git a/Minecraft.Client/Xbox/Sentient/Include/SenClientUGC.h b/Minecraft.Client/Xbox/Sentient/Include/SenClientUGC.h
index da1b1f65..b4024571 100644
--- a/Minecraft.Client/Xbox/Sentient/Include/SenClientUGC.h
+++ b/Minecraft.Client/Xbox/Sentient/Include/SenClientUGC.h
@@ -97,7 +97,7 @@ namespace Sentient
// metadata for a lot of UGCs at once.
// Note: if a level has been uploaded with main data before, and the creator
// wants to just modify the metadata, they can upload the metadata with the
- // maindatablobs being NULL.
+ // maindatablobs being nullptr.
// NOTE: for large items, use the SenUGCUploadMainData method with the SenUGCProgressInfo
// signature so you can get the running progress and a cancellation token
// to abort the upload (allowing UI for the user, etc)
@@ -159,7 +159,7 @@ namespace Sentient
// be used to abort the upload. This is useful for large uploads where
// you may want to allow the user to cancel.
// NOTE: This call is asynchronous ONLY and will error for synchronous
- // attempts with a NULL param for userCallback.
+ // attempts with a nullptr param for userCallback.
// There are multiple data blobs supported (the exact number is defined in
// SenUGCMainData_NrBlobs) on subsequent calls. Slot zero is to be used by a
// game to store a preview thumbnail, which can then be downloaded without
@@ -172,7 +172,7 @@ namespace Sentient
// metadata for a lot of UGCs at once.
// NOTE: if a level has been uploaded with main data before, and the creator
// wants to just modify the metadata, they can upload the metadata with the
- // main data blob being NULL.
+ // main data blob being nullptr.
// NOTE: If a creator uploads a data blob again, it will overwrite the previous
// stored blob with the new one.
//************************************
@@ -848,8 +848,8 @@ namespace Sentient
///
/// @param[in] culture
/// This is the result of a call to SenCultureFind() or SenCultureGet*().
- /// You may also pass NULL to use the culture set with SenCultureSetCurrent().
- /// May be NULL for default culture.
+ /// You may also pass nullptr to use the culture set with SenCultureSetCurrent().
+ /// May be nullptr for default culture.
///
/// @param[in] maxResults
/// Used to indicate the number of items to be returned by @a out_feedInfo.
diff --git a/Minecraft.Client/Xbox/Sentient/Include/SenClientUser.h b/Minecraft.Client/Xbox/Sentient/Include/SenClientUser.h
index cf3ef0b3..4c48ee50 100644
--- a/Minecraft.Client/Xbox/Sentient/Include/SenClientUser.h
+++ b/Minecraft.Client/Xbox/Sentient/Include/SenClientUser.h
@@ -61,7 +61,7 @@ namespace Sentient
///
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
- /// E_POINTER: out_isInRole is NULL.
+ /// E_POINTER: out_isInRole is nullptr.
/// E_FAIL: Failed to spawn server call.
/// S_OK: Server call spawned successfully.
///
@@ -91,7 +91,7 @@ namespace Sentient
///
/// @return Check SUCCEEDED( hresult ) or FAILED( hresult ) to determine success. Specific values include:
/// SENTIENT_E_NOT_INITIALIZED: You did not call SentientInitialize() first.
- /// E_POINTER: out_isInRole is NULL.
+ /// E_POINTER: out_isInRole is nullptr.
/// E_FAIL: Failed to spawn server call.
/// S_OK: Server call spawned successfully.
///
diff --git a/Minecraft.Client/Xbox/Sentient/SentientManager.cpp b/Minecraft.Client/Xbox/Sentient/SentientManager.cpp
index aade06bc..49b0c26a 100644
--- a/Minecraft.Client/Xbox/Sentient/SentientManager.cpp
+++ b/Minecraft.Client/Xbox/Sentient/SentientManager.cpp
@@ -20,7 +20,7 @@ CTelemetryManager *TelemetryManager = new CSentientManager();
HRESULT CSentientManager::Init()
{
Sentient::SenSysTitleID sentitleID;
- sentitleID = (Sentient::SenSysTitleID)TITLEID_MINECRAFT;
+ sentitleID = static_cast<Sentient::SenSysTitleID>(TITLEID_MINECRAFT);
HRESULT hr = SentientInitialize( sentitleID );
@@ -52,7 +52,7 @@ HRESULT CSentientManager::Tick()
m_lastHeartbeat = currentTime;
for(DWORD i = 0; i < XUSER_MAX_COUNT; ++i)
{
- if(Minecraft::GetInstance()->localplayers[i] != NULL)
+ if(Minecraft::GetInstance()->localplayers[i] != nullptr)
{
SenStatHeartBeat(i, m_lastHeartbeat - m_initialiseTime);
}
@@ -63,7 +63,7 @@ HRESULT CSentientManager::Tick()
{
for(DWORD i = 0; i < XUSER_MAX_COUNT; ++i)
{
- if(Minecraft::GetInstance()->localplayers[i] != NULL && m_fLevelStartTime[i] - currentTime > 60)
+ if(Minecraft::GetInstance()->localplayers[i] != nullptr && m_fLevelStartTime[i] - currentTime > 60)
{
Flush();
}
@@ -123,7 +123,7 @@ HRESULT CSentientManager::Flush()
BOOL CSentientManager::RecordPlayerSessionStart(DWORD dwUserId)
{
- return SenStatPlayerSessionStart( dwUserId, GetSecondsSinceInitialize(), GetMode(dwUserId), GetSubMode(dwUserId), GetLevelId(dwUserId), GetSubLevelId(dwUserId), GetTitleBuildId(), 0, 0, 0, (INT)app.getDeploymentType() );
+ return SenStatPlayerSessionStart( dwUserId, GetSecondsSinceInitialize(), GetMode(dwUserId), GetSubMode(dwUserId), GetLevelId(dwUserId), GetSubLevelId(dwUserId), GetTitleBuildId(), 0, 0, 0, static_cast<INT>(app.getDeploymentType()) );
}
BOOL CSentientManager::RecordPlayerSessionExit(DWORD dwUserId, int _)
@@ -149,13 +149,13 @@ BOOL CSentientManager::RecordLevelStart(DWORD dwUserId, ESen_FriendOrMatch frien
BOOL CSentientManager::RecordLevelExit(DWORD dwUserId, ESen_LevelExitStatus levelExitStatus)
{
float levelDuration = app.getAppTime() - m_fLevelStartTime[dwUserId];
- return SenStatLevelExit( dwUserId, GetSecondsSinceInitialize(), GetMode(dwUserId), GetSubMode(dwUserId), GetLevelId(dwUserId), GetSubLevelId(dwUserId), GetLevelInstanceID(), GetMultiplayerInstanceID(), levelExitStatus, GetLevelExitProgressStat1(), GetLevelExitProgressStat2(), (INT)levelDuration );
+ return SenStatLevelExit( dwUserId, GetSecondsSinceInitialize(), GetMode(dwUserId), GetSubMode(dwUserId), GetLevelId(dwUserId), GetSubLevelId(dwUserId), GetLevelInstanceID(), GetMultiplayerInstanceID(), levelExitStatus, GetLevelExitProgressStat1(), GetLevelExitProgressStat2(), static_cast<INT>(levelDuration) );
}
BOOL CSentientManager::RecordLevelSaveOrCheckpoint(DWORD dwUserId, INT saveOrCheckPointID, INT saveSizeInBytes)
{
float levelDuration = app.getAppTime() - m_fLevelStartTime[dwUserId];
- return SenStatLevelSaveOrCheckpoint( dwUserId, GetSecondsSinceInitialize(), GetMode(dwUserId), GetSubMode(dwUserId), GetLevelId(dwUserId), GetSubLevelId(dwUserId), GetLevelInstanceID(), GetMultiplayerInstanceID(), GetLevelExitProgressStat1(), GetLevelExitProgressStat2(), (INT)levelDuration, saveOrCheckPointID, saveSizeInBytes );
+ return SenStatLevelSaveOrCheckpoint( dwUserId, GetSecondsSinceInitialize(), GetMode(dwUserId), GetSubMode(dwUserId), GetLevelId(dwUserId), GetSubLevelId(dwUserId), GetLevelInstanceID(), GetMultiplayerInstanceID(), GetLevelExitProgressStat1(), GetLevelExitProgressStat2(), static_cast<INT>(levelDuration), saveOrCheckPointID, saveSizeInBytes );
}
BOOL CSentientManager::RecordLevelResume(DWORD dwUserId, ESen_FriendOrMatch friendsOrMatch, ESen_CompeteOrCoop competeOrCoop, int difficulty, DWORD numberOfLocalPlayers, DWORD numberOfOnlinePlayers, INT saveOrCheckPointID)
@@ -240,7 +240,7 @@ This should be tracked independently of saved games (restoring a save should not
*/
INT CSentientManager::GetSecondsSinceInitialize()
{
- return (INT)(app.getAppTime() - m_initialiseTime);
+ return static_cast<INT>(app.getAppTime() - m_initialiseTime);
}
/*
@@ -257,21 +257,21 @@ INT CSentientManager::GetMode(DWORD dwUserId)
Minecraft *pMinecraft = Minecraft::GetInstance();
- if( pMinecraft->localplayers[dwUserId] != NULL && pMinecraft->localplayers[dwUserId]->level != NULL && pMinecraft->localplayers[dwUserId]->level->getLevelData() != NULL )
+ if( pMinecraft->localplayers[dwUserId] != nullptr && pMinecraft->localplayers[dwUserId]->level != nullptr && pMinecraft->localplayers[dwUserId]->level->getLevelData() != nullptr )
{
GameType *gameType = pMinecraft->localplayers[dwUserId]->level->getLevelData()->getGameType();
if (gameType->isSurvival())
{
- mode = (INT)eTelem_ModeId_Survival;
+ mode = static_cast<INT>(eTelem_ModeId_Survival);
}
else if (gameType->isCreative())
{
- mode = (INT)eTelem_ModeId_Creative;
+ mode = static_cast<INT>(eTelem_ModeId_Creative);
}
else
{
- mode = (INT)eTelem_ModeId_Undefined;
+ mode = static_cast<INT>(eTelem_ModeId_Undefined);
}
}
return mode;
@@ -290,11 +290,11 @@ INT CSentientManager::GetSubMode(DWORD dwUserId)
if(Minecraft::GetInstance()->isTutorial())
{
- subMode = (INT)eTelem_SubModeId_Tutorial;
+ subMode = static_cast<INT>(eTelem_SubModeId_Tutorial);
}
else
{
- subMode = (INT)eTelem_SubModeId_Normal;
+ subMode = static_cast<INT>(eTelem_SubModeId_Normal);
}
return subMode;
@@ -312,7 +312,7 @@ INT CSentientManager::GetLevelId(DWORD dwUserId)
{
INT levelId = (INT)eTelem_LevelId_Undefined;
- levelId = (INT)eTelem_LevelId_PlayerGeneratedLevel;
+ levelId = static_cast<INT>(eTelem_LevelId_PlayerGeneratedLevel);
return levelId;
}
@@ -329,18 +329,18 @@ INT CSentientManager::GetSubLevelId(DWORD dwUserId)
Minecraft *pMinecraft = Minecraft::GetInstance();
- if(pMinecraft->localplayers[dwUserId] != NULL)
+ if(pMinecraft->localplayers[dwUserId] != nullptr)
{
switch(pMinecraft->localplayers[dwUserId]->dimension)
{
case 0:
- subLevelId = (INT)eTelem_SubLevelId_Overworld;
+ subLevelId = static_cast<INT>(eTelem_SubLevelId_Overworld);
break;
case -1:
- subLevelId = (INT)eTelem_SubLevelId_Nether;
+ subLevelId = static_cast<INT>(eTelem_SubLevelId_Nether);
break;
case 1:
- subLevelId = (INT)eTelem_SubLevelId_End;
+ subLevelId = static_cast<INT>(eTelem_SubLevelId_End);
break;
};
}
@@ -364,7 +364,7 @@ Helps differentiate level attempts when a play plays the same mode/level - espec
*/
INT CSentientManager::GetLevelInstanceID()
{
- return (INT)m_levelInstanceID;
+ return static_cast<INT>(m_levelInstanceID);
}
/*
@@ -403,19 +403,19 @@ INT CSentientManager::GetSingleOrMultiplayer()
if(app.GetLocalPlayerCount() == 1 && g_NetworkManager.GetOnlinePlayerCount() == 0)
{
- singleOrMultiplayer = (INT)eSen_SingleOrMultiplayer_Single_Player;
+ singleOrMultiplayer = static_cast<INT>(eSen_SingleOrMultiplayer_Single_Player);
}
else if(app.GetLocalPlayerCount() > 1 && g_NetworkManager.GetOnlinePlayerCount() == 0)
{
- singleOrMultiplayer = (INT)eSen_SingleOrMultiplayer_Multiplayer_Local;
+ singleOrMultiplayer = static_cast<INT>(eSen_SingleOrMultiplayer_Multiplayer_Local);
}
else if(app.GetLocalPlayerCount() == 1 && g_NetworkManager.GetOnlinePlayerCount() > 0)
{
- singleOrMultiplayer = (INT)eSen_SingleOrMultiplayer_Multiplayer_Live;
+ singleOrMultiplayer = static_cast<INT>(eSen_SingleOrMultiplayer_Multiplayer_Live);
}
else if(app.GetLocalPlayerCount() > 1 && g_NetworkManager.GetOnlinePlayerCount() > 0)
{
- singleOrMultiplayer = (INT)eSen_SingleOrMultiplayer_Multiplayer_Both_Local_and_Live;
+ singleOrMultiplayer = static_cast<INT>(eSen_SingleOrMultiplayer_Multiplayer_Both_Local_and_Live);
}
return singleOrMultiplayer;
@@ -432,16 +432,16 @@ INT CSentientManager::GetDifficultyLevel(INT diff)
switch(diff)
{
case 0:
- difficultyLevel = (INT)eSen_DifficultyLevel_Easiest;
+ difficultyLevel = static_cast<INT>(eSen_DifficultyLevel_Easiest);
break;
case 1:
- difficultyLevel = (INT)eSen_DifficultyLevel_Easier;
+ difficultyLevel = static_cast<INT>(eSen_DifficultyLevel_Easier);
break;
case 2:
- difficultyLevel = (INT)eSen_DifficultyLevel_Normal;
+ difficultyLevel = static_cast<INT>(eSen_DifficultyLevel_Normal);
break;
case 3:
- difficultyLevel = (INT)eSen_DifficultyLevel_Harder;
+ difficultyLevel = static_cast<INT>(eSen_DifficultyLevel_Harder);
break;
}
@@ -461,11 +461,11 @@ INT CSentientManager::GetLicense()
if(ProfileManager.IsFullVersion())
{
- license = (INT)eSen_License_Full_Purchased_Title;
+ license = static_cast<INT>(eSen_License_Full_Purchased_Title);
}
else
{
- license = (INT)eSen_License_Trial_or_Demo;
+ license = static_cast<INT>(eSen_License_Trial_or_Demo);
}
return license;
}
@@ -500,15 +500,15 @@ INT CSentientManager::GetAudioSettings(DWORD dwUserId)
if(volume == 0)
{
- audioSettings = (INT)eSen_AudioSettings_Off;
+ audioSettings = static_cast<INT>(eSen_AudioSettings_Off);
}
else if(volume == DEFAULT_VOLUME_LEVEL)
{
- audioSettings = (INT)eSen_AudioSettings_On_Default;
+ audioSettings = static_cast<INT>(eSen_AudioSettings_On_Default);
}
else
{
- audioSettings = (INT)eSen_AudioSettings_On_CustomSetting;
+ audioSettings = static_cast<INT>(eSen_AudioSettings_On_CustomSetting);
}
}
return audioSettings;
diff --git a/Minecraft.Client/Xbox/Sentient/SentientStats.cpp b/Minecraft.Client/Xbox/Sentient/SentientStats.cpp
index 361d18ee..ffa9392d 100644
--- a/Minecraft.Client/Xbox/Sentient/SentientStats.cpp
+++ b/Minecraft.Client/Xbox/Sentient/SentientStats.cpp
@@ -37,8 +37,8 @@ BOOL SenStatPlayerSessionStart ( DWORD dwUserID, INT SecondsSinceI
st.dwNumProperties = 10;
st.arrProperties = (CHAR*)&LocalStruct;
st.dwNumValues = 0;
- st.arrValues = NULL;
- st.arrValueFlags = NULL;
+ st.arrValues = nullptr;
+ st.arrValueFlags = nullptr;
#ifdef SEN_LOGTELEMETRY
// if we're in debug build with logging then log the stat to a file for testing
@@ -67,8 +67,8 @@ BOOL SenStatPlayerSessionExit ( DWORD dwUserID, INT SecondsSinceI
st.dwNumProperties = 5;
st.arrProperties = (CHAR*)&LocalStruct;
st.dwNumValues = 0;
- st.arrValues = NULL;
- st.arrValueFlags = NULL;
+ st.arrValues = nullptr;
+ st.arrValueFlags = nullptr;
#ifdef SEN_LOGTELEMETRY
// if we're in debug build with logging then log the stat to a file for testing
@@ -93,8 +93,8 @@ BOOL SenStatHeartBeat ( DWORD dwUserID, INT SecondsSinceI
st.dwNumProperties = 1;
st.arrProperties = (CHAR*)&LocalStruct;
st.dwNumValues = 0;
- st.arrValues = NULL;
- st.arrValueFlags = NULL;
+ st.arrValues = nullptr;
+ st.arrValueFlags = nullptr;
#ifdef SEN_LOGTELEMETRY
// if we're in debug build with logging then log the stat to a file for testing
@@ -136,8 +136,8 @@ BOOL SenStatLevelStart ( DWORD dwUserID, INT SecondsSinceI
st.dwNumProperties = 18;
st.arrProperties = (CHAR*)&LocalStruct;
st.dwNumValues = 0;
- st.arrValues = NULL;
- st.arrValueFlags = NULL;
+ st.arrValues = nullptr;
+ st.arrValueFlags = nullptr;
#ifdef SEN_LOGTELEMETRY
// if we're in debug build with logging then log the stat to a file for testing
@@ -172,8 +172,8 @@ BOOL SenStatLevelExit ( DWORD dwUserID, INT SecondsSinceI
st.dwNumProperties = 11;
st.arrProperties = (CHAR*)&LocalStruct;
st.dwNumValues = 0;
- st.arrValues = NULL;
- st.arrValueFlags = NULL;
+ st.arrValues = nullptr;
+ st.arrValueFlags = nullptr;
#ifdef SEN_LOGTELEMETRY
// if we're in debug build with logging then log the stat to a file for testing
@@ -209,8 +209,8 @@ BOOL SenStatLevelSaveOrCheckpoint ( DWORD dwUserID, INT SecondsSinceI
st.dwNumProperties = 12;
st.arrProperties = (CHAR*)&LocalStruct;
st.dwNumValues = 0;
- st.arrValues = NULL;
- st.arrValueFlags = NULL;
+ st.arrValues = nullptr;
+ st.arrValueFlags = nullptr;
#ifdef SEN_LOGTELEMETRY
// if we're in debug build with logging then log the stat to a file for testing
@@ -253,8 +253,8 @@ BOOL SenStatLevelResume ( DWORD dwUserID, INT SecondsSinceI
st.dwNumProperties = 19;
st.arrProperties = (CHAR*)&LocalStruct;
st.dwNumValues = 0;
- st.arrValues = NULL;
- st.arrValueFlags = NULL;
+ st.arrValues = nullptr;
+ st.arrValueFlags = nullptr;
#ifdef SEN_LOGTELEMETRY
// if we're in debug build with logging then log the stat to a file for testing
@@ -285,8 +285,8 @@ BOOL SenStatPauseOrInactive ( DWORD dwUserID, INT SecondsSinceI
st.dwNumProperties = 7;
st.arrProperties = (CHAR*)&LocalStruct;
st.dwNumValues = 0;
- st.arrValues = NULL;
- st.arrValueFlags = NULL;
+ st.arrValues = nullptr;
+ st.arrValueFlags = nullptr;
#ifdef SEN_LOGTELEMETRY
// if we're in debug build with logging then log the stat to a file for testing
@@ -317,8 +317,8 @@ BOOL SenStatUnpauseOrActive ( DWORD dwUserID, INT SecondsSinceI
st.dwNumProperties = 7;
st.arrProperties = (CHAR*)&LocalStruct;
st.dwNumValues = 0;
- st.arrValues = NULL;
- st.arrValueFlags = NULL;
+ st.arrValues = nullptr;
+ st.arrValueFlags = nullptr;
#ifdef SEN_LOGTELEMETRY
// if we're in debug build with logging then log the stat to a file for testing
@@ -351,8 +351,8 @@ BOOL SenStatMenuShown ( DWORD dwUserID, INT SecondsSinceI
st.dwNumProperties = 9;
st.arrProperties = (CHAR*)&LocalStruct;
st.dwNumValues = 0;
- st.arrValues = NULL;
- st.arrValueFlags = NULL;
+ st.arrValues = nullptr;
+ st.arrValueFlags = nullptr;
#ifdef SEN_LOGTELEMETRY
// if we're in debug build with logging then log the stat to a file for testing
@@ -385,8 +385,8 @@ BOOL SenStatAchievementUnlocked ( DWORD dwUserID, INT SecondsSinceI
st.dwNumProperties = 9;
st.arrProperties = (CHAR*)&LocalStruct;
st.dwNumValues = 0;
- st.arrValues = NULL;
- st.arrValueFlags = NULL;
+ st.arrValues = nullptr;
+ st.arrValueFlags = nullptr;
#ifdef SEN_LOGTELEMETRY
// if we're in debug build with logging then log the stat to a file for testing
@@ -419,8 +419,8 @@ BOOL SenStatMediaShareUpload ( DWORD dwUserID, INT SecondsSinceI
st.dwNumProperties = 9;
st.arrProperties = (CHAR*)&LocalStruct;
st.dwNumValues = 0;
- st.arrValues = NULL;
- st.arrValueFlags = NULL;
+ st.arrValues = nullptr;
+ st.arrValueFlags = nullptr;
#ifdef SEN_LOGTELEMETRY
// if we're in debug build with logging then log the stat to a file for testing
@@ -453,8 +453,8 @@ BOOL SenStatUpsellPresented ( DWORD dwUserID, INT SecondsSinceI
st.dwNumProperties = 9;
st.arrProperties = (CHAR*)&LocalStruct;
st.dwNumValues = 0;
- st.arrValues = NULL;
- st.arrValueFlags = NULL;
+ st.arrValues = nullptr;
+ st.arrValueFlags = nullptr;
#ifdef SEN_LOGTELEMETRY
// if we're in debug build with logging then log the stat to a file for testing
@@ -488,8 +488,8 @@ BOOL SenStatUpsellResponded ( DWORD dwUserID, INT SecondsSinceI
st.dwNumProperties = 10;
st.arrProperties = (CHAR*)&LocalStruct;
st.dwNumValues = 0;
- st.arrValues = NULL;
- st.arrValueFlags = NULL;
+ st.arrValues = nullptr;
+ st.arrValueFlags = nullptr;
#ifdef SEN_LOGTELEMETRY
// if we're in debug build with logging then log the stat to a file for testing
@@ -607,8 +607,8 @@ BOOL SenStatSkinChanged ( DWORD dwUserID, INT SecondsSinceI
st.dwNumProperties = 8;
st.arrProperties = (CHAR*)&LocalStruct;
st.dwNumValues = 0;
- st.arrValues = NULL;
- st.arrValueFlags = NULL;
+ st.arrValues = nullptr;
+ st.arrValueFlags = nullptr;
#ifdef SEN_LOGTELEMETRY
// if we're in debug build with logging then log the stat to a file for testing
@@ -639,8 +639,8 @@ BOOL SenStatBanLevel ( DWORD dwUserID, INT SecondsSinceI
st.dwNumProperties = 7;
st.arrProperties = (CHAR*)&LocalStruct;
st.dwNumValues = 0;
- st.arrValues = NULL;
- st.arrValueFlags = NULL;
+ st.arrValues = nullptr;
+ st.arrValueFlags = nullptr;
#ifdef SEN_LOGTELEMETRY
// if we're in debug build with logging then log the stat to a file for testing
@@ -671,8 +671,8 @@ BOOL SenStatUnBanLevel ( DWORD dwUserID, INT SecondsSinceI
st.dwNumProperties = 7;
st.arrProperties = (CHAR*)&LocalStruct;
st.dwNumValues = 0;
- st.arrValues = NULL;
- st.arrValueFlags = NULL;
+ st.arrValues = nullptr;
+ st.arrValueFlags = nullptr;
#ifdef SEN_LOGTELEMETRY
// if we're in debug build with logging then log the stat to a file for testing
@@ -705,8 +705,8 @@ BOOL SenStatTexturePackChanged ( DWORD dwUserID, INT SecondsSinceI
st.dwNumProperties = 9;
st.arrProperties = (CHAR*)&LocalStruct;
st.dwNumValues = 0;
- st.arrValues = NULL;
- st.arrValueFlags = NULL;
+ st.arrValues = nullptr;
+ st.arrValueFlags = nullptr;
#ifdef SEN_LOGTELEMETRY
// if we're in debug build with logging then log the stat to a file for testing