Remove AUTO_VAR macro and _toString function (#592)

This commit is contained in:
void_17
2026-03-06 02:11:18 +07:00
committed by GitHub
parent 7d6658fe5b
commit 55231bb8d3
294 changed files with 5067 additions and 5773 deletions

View File

@@ -171,7 +171,7 @@ int CConsoleMinecraftApp::LoadLocalDLCImages()
{
unordered_map<wstring,DLC_INFO * > *pDLCInfoA=app.GetDLCInfo();
// 4J-PB - Any local graphic files for the Minecraft Store?
for( AUTO_VAR(it, pDLCInfoA->begin()); it != pDLCInfoA->end(); it++ )
for (auto it = pDLCInfoA->begin(); it != pDLCInfoA->end(); it++)
{
DLC_INFO * pDLCInfo=(*it).second;
@@ -185,7 +185,7 @@ void CConsoleMinecraftApp::FreeLocalDLCImages()
// 4J-PB - Any local graphic files for the Minecraft Store?
unordered_map<wstring,DLC_INFO * > *pDLCInfoA=app.GetDLCInfo();
for( AUTO_VAR(it, pDLCInfoA->begin()); it != pDLCInfoA->end(); it++ )
for (auto it = pDLCInfoA->begin(); it != pDLCInfoA->end(); it++)
{
DLC_INFO * pDLCInfo=(*it).second;
@@ -567,8 +567,8 @@ int CConsoleMinecraftApp::Callback_TMSPPRetrieveFileList(void *pParam,int iPad,
// dump out the file list
app.DebugPrintf("TMSPP filecount - %d\nFiles - \n",pvTmsFileDetails->size());
int iCount=0;
AUTO_VAR(itEnd, pvTmsFileDetails->end());
for( AUTO_VAR(it, pvTmsFileDetails->begin()); it != itEnd; it++ )
auto itEnd = pvTmsFileDetails->end();
for (auto it = pvTmsFileDetails->begin(); it != itEnd; it++)
{
C4JStorage::PTMSPP_FILE_DETAILS fd = *it;
app.DebugPrintf("%2d. %ls (size - %d)\n",iCount++,fd->wchFilename,fd->ulFileSize);

View File

@@ -1102,12 +1102,12 @@ SIZE_T WINAPI XMemSize(
void DumpMem()
{
int totalLeak = 0;
for(AUTO_VAR(it, allocCounts.begin()); it != allocCounts.end(); it++ )
for( auto& it : allocCounts )
{
if(it->second > 0 )
if(it.second > 0 )
{
app.DebugPrintf("%d %d %d %d\n",( it->first >> 26 ) & 0x3f,it->first & 0x03ffffff, it->second, (it->first & 0x03ffffff) * it->second);
totalLeak += ( it->first & 0x03ffffff ) * it->second;
app.DebugPrintf("%d %d %d %d\n",( it.first >> 26 ) & 0x3f,it.first & 0x03ffffff, it.second, (it.first & 0x03ffffff) * it.second);
totalLeak += ( it.first & 0x03ffffff ) * it.second;
}
}
app.DebugPrintf("Total %d\n",totalLeak);
@@ -1150,13 +1150,13 @@ void MemPixStuff()
int totals[MAX_SECT] = {0};
for(AUTO_VAR(it, allocCounts.begin()); it != allocCounts.end(); it++ )
for ( auto& it : allocCounts )
{
if(it->second > 0 )
if ( it.second > 0 )
{
int sect = ( it->first >> 26 ) & 0x3f;
int bytes = it->first & 0x03ffffff;
totals[sect] += bytes * it->second;
int sect = ( it.first >> 26 ) & 0x3f;
int bytes = it.first & 0x03ffffff;
totals[sect] += bytes * it.second;
}
}

View File

@@ -21,52 +21,52 @@ DurangoLeaderboardManager::DurangoLeaderboardManager()
m_difficulty = 0;
m_type = eStatsType_UNDEFINED;
m_statNames = ref new PC::Vector<P::String^>();
m_statNames = ref new PC::Vector<P::String^>();
m_xboxUserIds = ref new PC::Vector<P::String^>();
m_leaderboardAsyncOp = nullptr;
m_statsAsyncOp = nullptr;
for(unsigned int difficulty = 0; difficulty < 4; ++difficulty)
{
m_leaderboardNames[difficulty][eStatsType_Travelling] = L"LeaderboardTravelling" + _toString(difficulty);
m_leaderboardNames[difficulty][eStatsType_Mining] = L"LeaderboardMining" + _toString(difficulty);
m_leaderboardNames[difficulty][eStatsType_Farming] = L"LeaderboardFarming" + _toString(difficulty);
m_leaderboardNames[difficulty][eStatsType_Kills] = L"LeaderboardKills" + _toString(difficulty);
m_leaderboardNames[difficulty][eStatsType_Travelling] = L"LeaderboardTravelling" + std::to_wstring(difficulty);
m_leaderboardNames[difficulty][eStatsType_Mining] = L"LeaderboardMining" + std::to_wstring(difficulty);
m_leaderboardNames[difficulty][eStatsType_Farming] = L"LeaderboardFarming" + std::to_wstring(difficulty);
m_leaderboardNames[difficulty][eStatsType_Kills] = L"LeaderboardKills" + std::to_wstring(difficulty);
m_socialLeaderboardNames[difficulty][eStatsType_Travelling] = L"Leaderboard.LeaderboardId.0.DifficultyLevelId." + _toString(difficulty);
m_socialLeaderboardNames[difficulty][eStatsType_Mining] = L"Leaderboard.LeaderboardId.1.DifficultyLevelId." + _toString(difficulty);
m_socialLeaderboardNames[difficulty][eStatsType_Farming] = L"Leaderboard.LeaderboardId.2.DifficultyLevelId." + _toString(difficulty);
m_socialLeaderboardNames[difficulty][eStatsType_Kills] = L"Leaderboard.LeaderboardId.3.DifficultyLevelId." + _toString(difficulty);
m_socialLeaderboardNames[difficulty][eStatsType_Travelling] = L"Leaderboard.LeaderboardId.0.DifficultyLevelId." + std::to_wstring(difficulty);
m_socialLeaderboardNames[difficulty][eStatsType_Mining] = L"Leaderboard.LeaderboardId.1.DifficultyLevelId." + std::to_wstring(difficulty);
m_socialLeaderboardNames[difficulty][eStatsType_Farming] = L"Leaderboard.LeaderboardId.2.DifficultyLevelId." + std::to_wstring(difficulty);
m_socialLeaderboardNames[difficulty][eStatsType_Kills] = L"Leaderboard.LeaderboardId.3.DifficultyLevelId." + std::to_wstring(difficulty);
m_leaderboardStatNames[difficulty][eStatsType_Travelling].push_back( L"DistanceTravelled.DifficultyLevelId." + _toString(difficulty) + L".TravelMethodId.0"); // Walked
m_leaderboardStatNames[difficulty][eStatsType_Travelling].push_back( L"DistanceTravelled.DifficultyLevelId." + _toString(difficulty) + L".TravelMethodId.2"); // Fallen
m_leaderboardStatNames[difficulty][eStatsType_Travelling].push_back( L"DistanceTravelled.DifficultyLevelId." + _toString(difficulty) + L".TravelMethodId.4"); // Minecart
m_leaderboardStatNames[difficulty][eStatsType_Travelling].push_back( L"DistanceTravelled.DifficultyLevelId." + _toString(difficulty) + L".TravelMethodId.5"); // Boat
m_leaderboardStatNames[difficulty][eStatsType_Travelling].push_back( L"DistanceTravelled.DifficultyLevelId." + std::to_wstring(difficulty) + L".TravelMethodId.0"); // Walked
m_leaderboardStatNames[difficulty][eStatsType_Travelling].push_back( L"DistanceTravelled.DifficultyLevelId." + std::to_wstring(difficulty) + L".TravelMethodId.2"); // Fallen
m_leaderboardStatNames[difficulty][eStatsType_Travelling].push_back( L"DistanceTravelled.DifficultyLevelId." + std::to_wstring(difficulty) + L".TravelMethodId.4"); // Minecart
m_leaderboardStatNames[difficulty][eStatsType_Travelling].push_back( L"DistanceTravelled.DifficultyLevelId." + std::to_wstring(difficulty) + L".TravelMethodId.5"); // Boat
m_leaderboardStatNames[difficulty][eStatsType_Mining].push_back( L"BlockBroken.DifficultyLevelId." + _toString(difficulty) + L".BlockId.3"); // Dirt
m_leaderboardStatNames[difficulty][eStatsType_Mining].push_back( L"BlockBroken.DifficultyLevelId." + _toString(difficulty) + L".BlockId.4"); // Cobblestone
m_leaderboardStatNames[difficulty][eStatsType_Mining].push_back( L"BlockBroken.DifficultyLevelId." + _toString(difficulty) + L".BlockId.12"); // Sand
m_leaderboardStatNames[difficulty][eStatsType_Mining].push_back( L"BlockBroken.DifficultyLevelId." + _toString(difficulty) + L".BlockId.1"); // Stone
m_leaderboardStatNames[difficulty][eStatsType_Mining].push_back( L"BlockBroken.DifficultyLevelId." + _toString(difficulty) + L".BlockId.13"); // Gravel
m_leaderboardStatNames[difficulty][eStatsType_Mining].push_back( L"BlockBroken.DifficultyLevelId." + _toString(difficulty) + L".BlockId.82"); // Clay
m_leaderboardStatNames[difficulty][eStatsType_Mining].push_back( L"BlockBroken.DifficultyLevelId." + _toString(difficulty) + L".BlockId.49"); // Obsidian
m_leaderboardStatNames[difficulty][eStatsType_Mining].push_back( L"BlockBroken.DifficultyLevelId." + std::to_wstring(difficulty) + L".BlockId.3"); // Dirt
m_leaderboardStatNames[difficulty][eStatsType_Mining].push_back( L"BlockBroken.DifficultyLevelId." + std::to_wstring(difficulty) + L".BlockId.4"); // Cobblestone
m_leaderboardStatNames[difficulty][eStatsType_Mining].push_back( L"BlockBroken.DifficultyLevelId." + std::to_wstring(difficulty) + L".BlockId.12"); // Sand
m_leaderboardStatNames[difficulty][eStatsType_Mining].push_back( L"BlockBroken.DifficultyLevelId." + std::to_wstring(difficulty) + L".BlockId.1"); // Stone
m_leaderboardStatNames[difficulty][eStatsType_Mining].push_back( L"BlockBroken.DifficultyLevelId." + std::to_wstring(difficulty) + L".BlockId.13"); // Gravel
m_leaderboardStatNames[difficulty][eStatsType_Mining].push_back( L"BlockBroken.DifficultyLevelId." + std::to_wstring(difficulty) + L".BlockId.82"); // Clay
m_leaderboardStatNames[difficulty][eStatsType_Mining].push_back( L"BlockBroken.DifficultyLevelId." + std::to_wstring(difficulty) + L".BlockId.49"); // Obsidian
m_leaderboardStatNames[difficulty][eStatsType_Farming].push_back( L"McItemAcquired.DifficultyLevelId." + _toString(difficulty) + L".AcquisitionMethodId.1.ItemId.344"); // Eggs
m_leaderboardStatNames[difficulty][eStatsType_Farming].push_back( L"BlockBroken.DifficultyLevelId." + _toString(difficulty) + L".BlockId.59"); // Wheat
m_leaderboardStatNames[difficulty][eStatsType_Farming].push_back( L"BlockBroken.DifficultyLevelId." + _toString(difficulty) + L".BlockId.39"); // Mushroom
m_leaderboardStatNames[difficulty][eStatsType_Farming].push_back( L"BlockBroken.DifficultyLevelId." + _toString(difficulty) + L".BlockId.83"); // Sugarcane
m_leaderboardStatNames[difficulty][eStatsType_Farming].push_back( L"McItemAcquired.DifficultyLevelId." + _toString(difficulty) + L".AcquisitionMethodId.2.ItemId.335"); // Milk
m_leaderboardStatNames[difficulty][eStatsType_Farming].push_back( L"McItemAcquired.DifficultyLevelId." + _toString(difficulty) + L".AcquisitionMethodId.1.ItemId.86"); // Pumpkin
m_leaderboardStatNames[difficulty][eStatsType_Farming].push_back( L"McItemAcquired.DifficultyLevelId." + std::to_wstring(difficulty) + L".AcquisitionMethodId.1.ItemId.344"); // Eggs
m_leaderboardStatNames[difficulty][eStatsType_Farming].push_back( L"BlockBroken.DifficultyLevelId." + std::to_wstring(difficulty) + L".BlockId.59"); // Wheat
m_leaderboardStatNames[difficulty][eStatsType_Farming].push_back( L"BlockBroken.DifficultyLevelId." + std::to_wstring(difficulty) + L".BlockId.39"); // Mushroom
m_leaderboardStatNames[difficulty][eStatsType_Farming].push_back( L"BlockBroken.DifficultyLevelId." + std::to_wstring(difficulty) + L".BlockId.83"); // Sugarcane
m_leaderboardStatNames[difficulty][eStatsType_Farming].push_back( L"McItemAcquired.DifficultyLevelId." + std::to_wstring(difficulty) + L".AcquisitionMethodId.2.ItemId.335"); // Milk
m_leaderboardStatNames[difficulty][eStatsType_Farming].push_back( L"McItemAcquired.DifficultyLevelId." + std::to_wstring(difficulty) + L".AcquisitionMethodId.1.ItemId.86"); // Pumpkin
m_leaderboardStatNames[difficulty][eStatsType_Kills].push_back( L"MobKilledTotal.DifficultyLevelId." + _toString(difficulty) + L".EnemyRoleId.54"); // Zombie
m_leaderboardStatNames[difficulty][eStatsType_Kills].push_back( L"MobKilledTotal.DifficultyLevelId." + _toString(difficulty) + L".EnemyRoleId.51"); // Skeleton
m_leaderboardStatNames[difficulty][eStatsType_Kills].push_back( L"MobKilledTotal.DifficultyLevelId." + _toString(difficulty) + L".EnemyRoleId.50"); // Creeper
m_leaderboardStatNames[difficulty][eStatsType_Kills].push_back( L"MobKilledTotal.DifficultyLevelId." + _toString(difficulty) + L".EnemyRoleId.52"); // Spider
m_leaderboardStatNames[difficulty][eStatsType_Kills].push_back( L"MobKilledTotal.DifficultyLevelId." + _toString(difficulty) + L".EnemyRoleId.49"); // Spider Jockey
m_leaderboardStatNames[difficulty][eStatsType_Kills].push_back( L"MobKilledTotal.DifficultyLevelId." + _toString(difficulty) + L".EnemyRoleId.57"); // Zombie Pigman
m_leaderboardStatNames[difficulty][eStatsType_Kills].push_back( L"MobKilledTotal.DifficultyLevelId." + _toString(difficulty) + L".EnemyRoleId.55"); // Slime
m_leaderboardStatNames[difficulty][eStatsType_Kills].push_back( L"MobKilledTotal.DifficultyLevelId." + std::to_wstring(difficulty) + L".EnemyRoleId.54"); // Zombie
m_leaderboardStatNames[difficulty][eStatsType_Kills].push_back( L"MobKilledTotal.DifficultyLevelId." + std::to_wstring(difficulty) + L".EnemyRoleId.51"); // Skeleton
m_leaderboardStatNames[difficulty][eStatsType_Kills].push_back( L"MobKilledTotal.DifficultyLevelId." + std::to_wstring(difficulty) + L".EnemyRoleId.50"); // Creeper
m_leaderboardStatNames[difficulty][eStatsType_Kills].push_back( L"MobKilledTotal.DifficultyLevelId." + std::to_wstring(difficulty) + L".EnemyRoleId.52"); // Spider
m_leaderboardStatNames[difficulty][eStatsType_Kills].push_back( L"MobKilledTotal.DifficultyLevelId." + std::to_wstring(difficulty) + L".EnemyRoleId.49"); // Spider Jockey
m_leaderboardStatNames[difficulty][eStatsType_Kills].push_back( L"MobKilledTotal.DifficultyLevelId." + std::to_wstring(difficulty) + L".EnemyRoleId.57"); // Zombie Pigman
m_leaderboardStatNames[difficulty][eStatsType_Kills].push_back( L"MobKilledTotal.DifficultyLevelId." + std::to_wstring(difficulty) + L".EnemyRoleId.55"); // Slime
}
}
}
void DurangoLeaderboardManager::Tick()
{
@@ -93,7 +93,7 @@ void DurangoLeaderboardManager::Tick()
{
app.DebugPrintf("[LeaderboardManager] Second continuation\n");
m_statsAsyncOp = nullptr;
WFC::IVectorView<MXS::UserStatistics::UserStatisticsResult^>^ resultList = resultListTask.get();
if (m_xboxLiveContext == nullptr) throw(ref new P::Exception(-1));
@@ -170,7 +170,7 @@ void DurangoLeaderboardManager::Tick()
eStatsReturn ret = view.m_numQueries > 0 ? eStatsReturn_Success : eStatsReturn_NoResults;
if (m_readListener != NULL)
if (m_readListener != NULL)
{
app.DebugPrintf("[LeaderboardManager] OnStatsReadComplete(%i, %i, _)\n", ret, m_readCount);
m_readListener->OnStatsReadComplete(ret, m_maxRank, view);
@@ -380,10 +380,10 @@ void DurangoLeaderboardManager::CancelOperation()
//if (m_transactionCtx != 0)
//{
// int ret = sceNpScoreAbortTransaction(m_transactionCtx);
//
//
// if (ret < 0)
// {
// app.DebugPrintf("[LeaderboardManager] CancelOperation(): Problem encountered aborting current operation, 0x%X.\n", ret);
// app.DebugPrintf("[LeaderboardManager] CancelOperation(): Problem encountered aborting current operation, 0x%X.\n", ret);
// }
// else
// {
@@ -415,20 +415,20 @@ void DurangoLeaderboardManager::runLeaderboardRequest(WF::IAsyncOperation<MXSL::
app.DebugPrintf("[LeaderboardManager] Running request\n");
CC::create_task(asyncOp)
.then( [this, readCount, difficulty, type, filter] (CC::task<MXSL::LeaderboardResult^> resultTask)
.then( [this, readCount, difficulty, type, filter] (CC::task<MXSL::LeaderboardResult^> resultTask)
{
try
{
app.DebugPrintf("[LeaderboardManager] First continuation.\n");
m_leaderboardAsyncOp = nullptr;
MXSL::LeaderboardResult^ lastResult = resultTask.get();
app.DebugPrintf(
"Name: %ls - Filter: %ls - Rows: Retrieved=%d Total=%d Requested=%d.\n",
lastResult->DisplayName->Data(),
LeaderboardManager::filterNames[ (int) filter ].c_str(),
app.DebugPrintf(
"Name: %ls - Filter: %ls - Rows: Retrieved=%d Total=%d Requested=%d.\n",
lastResult->DisplayName->Data(),
LeaderboardManager::filterNames[ (int) filter ].c_str(),
lastResult->Rows->Size, lastResult->TotalRowCount, readCount
);
@@ -459,21 +459,21 @@ void DurangoLeaderboardManager::runLeaderboardRequest(WF::IAsyncOperation<MXSL::
m_readCount = lastResult->Rows->Size;
if (m_scores != NULL) delete [] m_scores;
m_scores = new ReadScore[m_readCount];
m_scores = new ReadScore[m_readCount];
ZeroMemory(m_scores, sizeof(ReadScore) * m_readCount);
m_xboxUserIds->Clear();
app.DebugPrintf("[LeaderboardManager] Retrieved Scores:\n");
for( UINT index = 0; index < lastResult->Rows->Size; index++ )
{
MXSL::LeaderboardRow^ row = lastResult->Rows->GetAt(index);
app.DebugPrintf(
"\tIndex: %d\tRank: %d\tPercentile: %.1f%%\tXboxUserId: %ls\tValue: %ls.\n",
"\tIndex: %d\tRank: %d\tPercentile: %.1f%%\tXboxUserId: %ls\tValue: %ls.\n",
index,
row->Rank,
row->Percentile * 100,
row->Percentile * 100,
row->XboxUserId->Data(),
row->Values->GetAt(0)->Data()
);
@@ -484,7 +484,7 @@ void DurangoLeaderboardManager::runLeaderboardRequest(WF::IAsyncOperation<MXSL::
// 4J-JEV: Added to help determine if this player's score is hidden due to their privacy settings.
m_scores[index].m_totalScore = (unsigned long) _fromString<long long>(row->Values->GetAt(0)->Data());
m_xboxUserIds->Append(row->XboxUserId);
}
@@ -681,12 +681,12 @@ void DurangoLeaderboardManager::setState(EStatsState newState)
};
break;
};
#ifndef _CONTENT_PACKAGE
app.DebugPrintf(
"[LeaderboardManager] %s state transition:\t%ls(%d) -> %ls(%d).\n",
"[LeaderboardManager] %s state transition:\t%ls(%d) -> %ls(%d).\n",
(validTransition ? "Valid" : "INVALID"),
stateToString(m_eStatsState).c_str(), m_eStatsState,
stateToString(m_eStatsState).c_str(), m_eStatsState,
stateToString(newState).c_str(), newState
);
#endif

View File

@@ -1460,7 +1460,7 @@ void DQRNetworkManager::UpdateRoomSyncPlayers(RoomSyncData *pNewSyncData)
{
PlayerSyncData *pNewPlayer = &pNewSyncData->players[i];
bool bAlreadyExisted = false;
for( AUTO_VAR(it, tempPlayers.begin()); it != tempPlayers.end(); it++ )
for (auto it = tempPlayers.begin(); it != tempPlayers.end(); it++)
{
if( pNewPlayer->m_smallId == (*it)->GetSmallId() )
{

View File

@@ -1,4 +1,4 @@
#include "stdafx.h"
#include "stdafx.h"
#include "..\..\..\Minecraft.World\Socket.h"
#include "..\..\..\Minecraft.World\StringHelpers.h"
#include "PlatformNetworkManagerDurango.h"
@@ -131,9 +131,8 @@ void CPlatformNetworkManagerDurango::HandlePlayerJoined(DQRNetworkPlayer *pDQRPl
{
// Do we already have a primary player for this system?
bool systemHasPrimaryPlayer = false;
for(AUTO_VAR(it, m_machineDQRPrimaryPlayers.begin()); it < m_machineDQRPrimaryPlayers.end(); ++it)
{
DQRNetworkPlayer *pQNetPrimaryPlayer = *it;
for ( DQRNetworkPlayer *pQNetPrimaryPlayer : m_machineDQRPrimaryPlayers )
{
if( pDQRPlayer->IsSameSystem(pQNetPrimaryPlayer) )
{
systemHasPrimaryPlayer = true;
@@ -145,7 +144,7 @@ void CPlatformNetworkManagerDurango::HandlePlayerJoined(DQRNetworkPlayer *pDQRPl
}
}
g_NetworkManager.PlayerJoining( networkPlayer );
if( createFakeSocket == true && !m_bHostChanged )
{
g_NetworkManager.CreateSocket( networkPlayer, localPlayer );
@@ -164,7 +163,7 @@ void CPlatformNetworkManagerDurango::HandlePlayerJoined(DQRNetworkPlayer *pDQRPl
g_NetworkManager.UpdateAndSetGameSessionData();
SystemFlagAddPlayer( networkPlayer );
}
for( int idx = 0; idx < XUSER_MAX_COUNT; ++idx)
{
if(playerChangedCallback[idx] != NULL)
@@ -233,8 +232,8 @@ void CPlatformNetworkManagerDurango::HandlePlayerLeaving(DQRNetworkPlayer *pDQRP
break;
}
}
AUTO_VAR(it, find( m_machineDQRPrimaryPlayers.begin(), m_machineDQRPrimaryPlayers.end(), pDQRPlayer));
if( it != m_machineDQRPrimaryPlayers.end() )
auto it = find(m_machineDQRPrimaryPlayers.begin(), m_machineDQRPrimaryPlayers.end(), pDQRPlayer);
if( it != m_machineDQRPrimaryPlayers.end() )
{
m_machineDQRPrimaryPlayers.erase( it );
}
@@ -249,7 +248,7 @@ void CPlatformNetworkManagerDurango::HandlePlayerLeaving(DQRNetworkPlayer *pDQRP
}
g_NetworkManager.PlayerLeaving( networkPlayer );
for( int idx = 0; idx < XUSER_MAX_COUNT; ++idx)
{
if(playerChangedCallback[idx] != NULL)
@@ -322,7 +321,7 @@ bool CPlatformNetworkManagerDurango::Initialise(CGameNetworkManager *pGameNetwor
{
playerChangedCallback[ i ] = NULL;
}
m_bLeavingGame = false;
m_bLeaveGameOnTick = false;
m_bHostChanged = false;
@@ -593,7 +592,7 @@ void CPlatformNetworkManagerDurango::UnRegisterPlayerChangedCallback(int iPad, v
void CPlatformNetworkManagerDurango::HandleSignInChange()
{
return;
return;
}
void CPlatformNetworkManagerDurango::HandleAddLocalPlayerFailed(int idx, bool serverFull)
@@ -618,10 +617,10 @@ void CPlatformNetworkManagerDurango::UpdateAndSetGameSessionData(INetworkPlayer
{
if( this->m_bLeavingGame )
return;
if( GetHostPlayer() == NULL )
return;
m_hostGameSessionData.m_uiGameHostSettings = app.GetGameHostOption(eGameHostOption_All);
m_pDQRNet->UpdateCustomSessionData();
@@ -847,8 +846,8 @@ INetworkPlayer *CPlatformNetworkManagerDurango::addNetworkPlayer(DQRNetworkPlaye
void CPlatformNetworkManagerDurango::removeNetworkPlayer(DQRNetworkPlayer *pDQRPlayer)
{
INetworkPlayer *pNetworkPlayer = getNetworkPlayer(pDQRPlayer);
for( AUTO_VAR(it, currentNetworkPlayers.begin()); it != currentNetworkPlayers.end(); it++ )
{
for (auto it = currentNetworkPlayers.begin(); it != currentNetworkPlayers.end(); ++it)
{
if( *it == pNetworkPlayer )
{
currentNetworkPlayers.erase(it);
@@ -865,7 +864,7 @@ INetworkPlayer *CPlatformNetworkManagerDurango::getNetworkPlayer(DQRNetworkPlaye
INetworkPlayer *CPlatformNetworkManagerDurango::GetLocalPlayerByUserIndex(int userIndex )
{
return getNetworkPlayer(m_pDQRNet->GetLocalPlayerByUserIndex(userIndex));
return getNetworkPlayer(m_pDQRNet->GetLocalPlayerByUserIndex(userIndex));
}
INetworkPlayer *CPlatformNetworkManagerDurango::GetPlayerByIndex(int playerIndex)

View File

@@ -51,7 +51,7 @@ HRESULT CDurangoTelemetryManager::Flush()
bool CDurangoTelemetryManager::RecordPlayerSessionStart(int iPad)
{
durangoStats()->generatePlayerSession();
return true;
}
@@ -123,7 +123,7 @@ bool CDurangoTelemetryManager::RecordPlayerSessionExit(int iPad, int exitStatus)
bool CDurangoTelemetryManager::RecordLevelStart(int iPad, ESen_FriendOrMatch friendsOrMatch, ESen_CompeteOrCoop competeOrCoop, int difficulty, int numberOfLocalPlayers, int numberOfOnlinePlayers)
{
CTelemetryManager::RecordLevelStart(iPad, friendsOrMatch, competeOrCoop, difficulty, numberOfLocalPlayers, numberOfOnlinePlayers);
ULONG hr = 0;
// Grab player info.
@@ -191,10 +191,10 @@ bool CDurangoTelemetryManager::RecordLevelStart(int iPad, ESen_FriendOrMatch fri
GetSubLevelId(iPad),
GetLevelInstanceID(),
&ZERO_GUID,
friendsOrMatch,
competeOrCoop,
difficulty,
numberOfLocalPlayers,
friendsOrMatch,
competeOrCoop,
difficulty,
numberOfLocalPlayers,
numberOfOnlinePlayers,
&ZERO_GUID
);
@@ -219,10 +219,10 @@ bool CDurangoTelemetryManager::RecordLevelStart(int iPad, ESen_FriendOrMatch fri
// Durango //
/* GUID */ guid2str(DurangoStats::getPlayerSession()).c_str(),
/* WSTR */ DurangoStats::getMultiplayerCorrelationId(),
/* int */ friendsOrMatch,
/* int */ competeOrCoop,
/* int */ difficulty,
/* int */ numberOfLocalPlayers,
/* int */ friendsOrMatch,
/* int */ competeOrCoop,
/* int */ difficulty,
/* int */ numberOfLocalPlayers,
/* int */ numberOfOnlinePlayers
);
@@ -577,7 +577,7 @@ bool CDurangoTelemetryManager::RecordMediaShareUpload(int iPad, ESen_MediaDestin
mediaDestination,
mediaType
);
#else
#else
ULONG hr = -1;
#endif
@@ -974,11 +974,11 @@ DurangoStats *CDurangoTelemetryManager::durangoStats()
wstring CDurangoTelemetryManager::guid2str(LPCGUID guid)
{
wstring out = L"GUID<";
out += _toString<unsigned long>(guid->Data1);
out += std::to_wstring(guid->Data1);
out += L":";
out += _toString<unsigned short>(guid->Data2);
out += std::to_wstring(guid->Data2);
out += L":";
out += _toString<unsigned short>(guid->Data3);
out += std::to_wstring(guid->Data3);
//out += L":";
//out += convStringToWstring(string((char*)&guid->Data4,8));
out += L">";