Project modernization (#630)

* 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
This commit is contained in:
ModMaker101
2026-03-07 21:56:03 -05:00
committed by GitHub
parent 1be5faaea7
commit a9be52c41a
1373 changed files with 19903 additions and 19449 deletions

View File

@@ -49,7 +49,7 @@ bool DQRNetworkManager::FriendPartyManagerSearch()
m_sessionResultCount = 0;
delete [] m_sessionSearchResults;
m_sessionSearchResults = NULL;
m_sessionSearchResults = nullptr;
m_GetFriendPartyThread = new C4JThread(&_GetFriendsThreadProc,this,"GetFriendsThreadProc");
m_GetFriendPartyThread->Run();
@@ -61,7 +61,7 @@ bool DQRNetworkManager::FriendPartyManagerSearch()
void DQRNetworkManager::FriendPartyManagerGetSessionInfo(int idx, SessionSearchResult *searchResult)
{
assert( idx < m_sessionResultCount );
assert( ( m_GetFriendPartyThread == NULL ) || ( !m_GetFriendPartyThread->isRunning()) );
assert( ( m_GetFriendPartyThread == nullptr ) || ( !m_GetFriendPartyThread->isRunning()) );
// Need to make sure that copied data has independently allocated m_extData, so both copies can be freed
*searchResult = m_sessionSearchResults[idx];
@@ -71,7 +71,7 @@ void DQRNetworkManager::FriendPartyManagerGetSessionInfo(int idx, SessionSearchR
int DQRNetworkManager::_GetFriendsThreadProc(void* lpParameter)
{
DQRNetworkManager *pDQR = (DQRNetworkManager *)lpParameter;
DQRNetworkManager *pDQR = static_cast<DQRNetworkManager *>(lpParameter);
return pDQR->GetFriendsThreadProc();
}
@@ -410,7 +410,7 @@ int DQRNetworkManager::GetFriendsThreadProc()
for( int j = 0; j < nameResolveVector[i]->Size; j++ )
{
m_sessionSearchResults[i].m_playerNames[j] = nameResolveVector[i]->GetAt(j)->GameDisplayName->Data();
m_sessionSearchResults[i].m_playerXuids[j] = PlayerUID(nameResolveVector[i]->GetAt(j)->XboxUserId->Data());
m_sessionSearchResults[i].m_playerXuids[j] = static_cast<PlayerUID>(nameResolveVector[i]->GetAt(j)->XboxUserId->Data());
}
m_sessionSearchResults[i].m_playerCount = nameResolveVector[i]->Size;
m_sessionSearchResults[i].m_usedSlotCount = newSessionVector[i]->Members->Size;
@@ -556,7 +556,7 @@ bool DQRNetworkManager::IsSessionFriendsOfFriends(MXSM::MultiplayerSession^ sess
if (result)
{
friendsOfFriends = app.GetGameHostOption(((GameSessionData *)gameSessionData)->m_uiGameHostSettings, eGameHostOption_FriendsOfFriends);
friendsOfFriends = app.GetGameHostOption(static_cast<GameSessionData *>(gameSessionData)->m_uiGameHostSettings, eGameHostOption_FriendsOfFriends);
}
free(gameSessionData);
@@ -577,7 +577,7 @@ bool DQRNetworkManager::GetGameSessionData(MXSM::MultiplayerSession^ session, vo
Platform::String ^customValueString = customValue->GetString();
if( customValueString )
{
base64_decode( customValueString, (unsigned char *)gameSessionData, sizeof(GameSessionData) );
base64_decode( customValueString, static_cast<unsigned char *>(gameSessionData), sizeof(GameSessionData) );
return true;
}
}