fix: player list count, leaderboard stubs
This commit is contained in:
@@ -9,7 +9,9 @@ const wstring LeaderboardManager::filterNames[eNumFilterModes] =
|
||||
L"Friends", L"MyScore", L"TopRank"
|
||||
};
|
||||
|
||||
#if !defined(_WINDOWS64) && !defined(_DURANGO) && !defined(__ORBIS__) && !defined(__PS3__) && !defined(__PSVITA__) && !defined(_XBOX)
|
||||
LeaderboardManager *LeaderboardManager::m_instance = NULL;
|
||||
#endif
|
||||
|
||||
void LeaderboardManager::DeleteInstance()
|
||||
{
|
||||
|
||||
@@ -165,6 +165,6 @@ private:
|
||||
void NotifyPlayerJoined( IQNetPlayer *pQNetPlayer );
|
||||
|
||||
#ifndef _XBOX
|
||||
void FakeLocalPlayerJoined() { NotifyPlayerJoined(m_pIQNet->GetLocalPlayerByUserIndex(0)); }
|
||||
void FakeLocalPlayerJoined() { AddLocalPlayerByUserIndex(0); }
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -93,7 +93,9 @@ void UIScene_InGameInfoMenu::updateTooltips()
|
||||
if(CGameNetworkManager::usingAdhocMode()) keyX = -1;
|
||||
#endif
|
||||
|
||||
INetworkPlayer *selectedPlayer = g_NetworkManager.GetPlayerBySmallId(m_players[m_playerList.getCurrentSelection()]->m_smallId);
|
||||
INetworkPlayer *selectedPlayer = NULL;
|
||||
if(m_playerList.getCurrentSelection() < m_players.size())
|
||||
selectedPlayer = g_NetworkManager.GetPlayerBySmallId(m_players[m_playerList.getCurrentSelection()]->m_smallId);
|
||||
|
||||
int keyA = -1;
|
||||
Minecraft *pMinecraft = Minecraft::GetInstance();
|
||||
@@ -335,7 +337,9 @@ void UIScene_InGameInfoMenu::handlePress(F64 controlId, F64 childId)
|
||||
break;
|
||||
case eControl_GamePlayers:
|
||||
int currentSelection = (int)childId;
|
||||
INetworkPlayer *selectedPlayer = g_NetworkManager.GetPlayerBySmallId(m_players[currentSelection]->m_smallId);
|
||||
INetworkPlayer *selectedPlayer = NULL;
|
||||
if(currentSelection < m_players.size())
|
||||
selectedPlayer = g_NetworkManager.GetPlayerBySmallId(m_players[currentSelection]->m_smallId);
|
||||
|
||||
Minecraft *pMinecraft = Minecraft::GetInstance();
|
||||
shared_ptr<MultiplayerLocalPlayer> localPlayer = pMinecraft->localplayers[m_iPad];
|
||||
@@ -387,6 +391,8 @@ void UIScene_InGameInfoMenu::handleFocusChange(F64 controlId, F64 childId)
|
||||
|
||||
void UIScene_InGameInfoMenu::OnPlayerChanged(void *callbackParam, INetworkPlayer *pPlayer, bool leaving)
|
||||
{
|
||||
if(pPlayer == NULL) return;
|
||||
|
||||
app.DebugPrintf("<UIScene_InGameInfoMenu::OnPlayerChanged> Player \"%ls\" %s (smallId: %d)\n", pPlayer->GetOnlineName(), leaving ? "leaving" : "joining", pPlayer->GetSmallId());
|
||||
|
||||
UIScene_InGameInfoMenu *scene = (UIScene_InGameInfoMenu *)callbackParam;
|
||||
|
||||
@@ -231,8 +231,8 @@ DWORD IQNet::GetPlayerCount() { return s_playerCount; }
|
||||
QNET_STATE IQNet::GetState() { return _bQNetStubGameRunning ? QNET_STATE_GAME_PLAY : QNET_STATE_IDLE; }
|
||||
bool IQNet::IsHost() { return s_isHosting; }
|
||||
HRESULT IQNet::JoinGameFromInviteInfo(DWORD dwUserIndex, DWORD dwUserMask, const INVITE_INFO *pInviteInfo) { return S_OK; }
|
||||
void IQNet::HostGame() { _bQNetStubGameRunning = true; s_isHosting = true; }
|
||||
void IQNet::ClientJoinGame() { _bQNetStubGameRunning = true; s_isHosting = false; }
|
||||
void IQNet::HostGame() { _bQNetStubGameRunning = true; s_isHosting = true; if(s_playerCount == 0) s_playerCount = 1; }
|
||||
void IQNet::ClientJoinGame() { _bQNetStubGameRunning = true; s_isHosting = false; if(s_playerCount == 0) s_playerCount = 1; }
|
||||
void IQNet::EndGame() { _bQNetStubGameRunning = false; s_isHosting = false; }
|
||||
|
||||
DWORD MinecraftDynamicConfigurations::GetTrialTime() { return DYNAMIC_CONFIG_DEFAULT_TRIAL_TIME; }
|
||||
|
||||
@@ -34044,7 +34044,7 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU</Comman
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseForArt|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_NO_TU|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ContentPackage_Vita|Win32'">false</ExcludedFromBuild>
|
||||
|
||||
@@ -1858,7 +1858,7 @@ void Minecraft::run_middle()
|
||||
achievementPopup->render();
|
||||
|
||||
PIXBeginNamedEvent(0,"Sleeping");
|
||||
Sleep(0); // 4J - was Thread.yield()
|
||||
//Sleep(0); // 4J - was Thread.yield()
|
||||
PIXEndNamedEvent();
|
||||
|
||||
// if (Keyboard::isKeyDown(Keyboard::KEY_F7)) Display.update(); // 4J - removed condition
|
||||
|
||||
@@ -116,7 +116,7 @@ void Options::init()
|
||||
bobView = true;
|
||||
anaglyph3d = false;
|
||||
advancedOpengl = false;
|
||||
framerateLimit = 2;
|
||||
framerateLimit = 0;
|
||||
fancyGraphics = true;
|
||||
ambientOcclusion = true;
|
||||
renderClouds = true;
|
||||
|
||||
@@ -17,13 +17,23 @@ public:
|
||||
virtual void DeleteSession() {}
|
||||
|
||||
//Write the given stats
|
||||
//This is called synchronously and will not free any memory allocated for views when it is done
|
||||
virtual bool WriteStats(unsigned int viewCount, ViewIn views) { return true; }
|
||||
|
||||
virtual bool WriteStats(unsigned int viewCount, ViewIn views) { return false; }
|
||||
|
||||
virtual bool ReadStats_Friends(LeaderboardReadListener *callback, int difficulty, EStatsType type, PlayerUID myUID) { return false; }
|
||||
virtual bool ReadStats_MyScore(LeaderboardReadListener *callback, int difficulty, EStatsType type, PlayerUID myUID, unsigned int readCount) { return false; }
|
||||
virtual bool ReadStats_TopRank(LeaderboardReadListener *callback, int difficulty, EStatsType type, unsigned int startIndex, unsigned int readCount) { return false; }
|
||||
virtual bool ReadStats_Friends(LeaderboardReadListener *callback, int difficulty, EStatsType type, PlayerUID myUID, unsigned int startIndex, unsigned int readCount) {
|
||||
ReadView view = { 0, NULL };
|
||||
callback->OnStatsReadComplete(eStatsReturn_Success, 0, view);
|
||||
return true;
|
||||
}
|
||||
virtual bool ReadStats_MyScore(LeaderboardReadListener *callback, int difficulty, EStatsType type, PlayerUID myUID, unsigned int readCount) {
|
||||
ReadView view = { 0, NULL };
|
||||
callback->OnStatsReadComplete(eStatsReturn_Success, 0, view);
|
||||
return true;
|
||||
}
|
||||
virtual bool ReadStats_TopRank(LeaderboardReadListener *callback, int difficulty, EStatsType type, unsigned int startIndex, unsigned int readCount) {
|
||||
ReadView view = { 0, NULL };
|
||||
callback->OnStatsReadComplete(eStatsReturn_Success, 0, view);
|
||||
return true;
|
||||
}
|
||||
|
||||
//Perform a flush of the stats
|
||||
virtual void FlushStats() {}
|
||||
|
||||
@@ -498,7 +498,7 @@ app.DebugPrintf("width: %d, height: %d\n", width, height);
|
||||
|
||||
DXGI_SWAP_CHAIN_DESC sd;
|
||||
ZeroMemory( &sd, sizeof( sd ) );
|
||||
sd.BufferCount = 1;
|
||||
sd.BufferCount = 2;
|
||||
sd.BufferDesc.Width = width;
|
||||
sd.BufferDesc.Height = height;
|
||||
sd.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
|
||||
|
||||
@@ -1124,7 +1124,7 @@
|
||||
<ExceptionHandling>Sync</ExceptionHandling>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<PrecompiledHeaderOutputFile>$(OutDir)$(ProjectName).pch</PrecompiledHeaderOutputFile>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PreprocessorDefinitions>_LARGE_WORLDS;_DEBUG_MENUS_ENABLED;_DEBUG;_LIB;_CRT_NON_CONFORMING_SWPRINTFS;_CRT_SECURE_NO_WARNINGS;_WINDOWS64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<CallAttributedProfiling>Disabled</CallAttributedProfiling>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
|
||||
Reference in New Issue
Block a user