mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-05-31 09:52:57 +00:00
Remove WinAPI counts from XUI menu locals
This commit is contained in:
parent
e45dfbeee6
commit
7b39869e38
|
|
@ -847,7 +847,7 @@ int CScene_LoadGameSettings::LoadSaveDataReturned(void *pParam,bool bContinue)
|
|||
bool isClientSide = ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad()) && pClass->m_MoreOptionsParams.bOnlineGame;
|
||||
|
||||
// 4J Stu - If we only have one controller connected, then don't show the sign-in UI again
|
||||
DWORD connectedControllers = 0;
|
||||
int connectedControllers = 0;
|
||||
for(unsigned int i = 0; i < XUSER_MAX_COUNT; ++i)
|
||||
{
|
||||
if( InputManager.IsPadConnected(i) || ProfileManager.IsSignedIn(i) ) ++connectedControllers;
|
||||
|
|
@ -872,7 +872,7 @@ int CScene_LoadGameSettings::LoadSaveDataReturned(void *pParam,bool bContinue)
|
|||
}
|
||||
else
|
||||
{
|
||||
DWORD dwLocalUsersMask = CGameNetworkManager::GetLocalPlayerMask(ProfileManager.GetPrimaryPad());
|
||||
unsigned int dwLocalUsersMask = CGameNetworkManager::GetLocalPlayerMask(ProfileManager.GetPrimaryPad());
|
||||
|
||||
// No guest problems so we don't need to force a sign-in of players here
|
||||
StartGameFromSave(pClass, dwLocalUsersMask);
|
||||
|
|
@ -1007,7 +1007,7 @@ int CScene_LoadGameSettings::StartGame_SignInReturned(void *pParam,bool bContinu
|
|||
// It's possible that the player has not signed in - they can back out
|
||||
if(ProfileManager.IsSignedIn(iPad))
|
||||
{
|
||||
DWORD dwLocalUsersMask = 0;
|
||||
unsigned int dwLocalUsersMask = 0;
|
||||
|
||||
bool isClientSide = ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad()) && pClass->m_MoreOptionsParams.bOnlineGame;
|
||||
bool noPrivileges = false;
|
||||
|
|
@ -1397,7 +1397,7 @@ void CScene_LoadGameSettings::LoadLevelGen(LevelGenerationOptions *levelGen)
|
|||
bool isClientSide = ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad()) && m_MoreOptionsParams.bOnlineGame;
|
||||
|
||||
// 4J Stu - If we only have one controller connected, then don't show the sign-in UI again
|
||||
DWORD connectedControllers = 0;
|
||||
int connectedControllers = 0;
|
||||
for(unsigned int i = 0; i < XUSER_MAX_COUNT; ++i)
|
||||
{
|
||||
if( InputManager.IsPadConnected(i) || ProfileManager.IsSignedIn(i) ) ++connectedControllers;
|
||||
|
|
@ -1423,7 +1423,7 @@ void CScene_LoadGameSettings::LoadLevelGen(LevelGenerationOptions *levelGen)
|
|||
}
|
||||
}
|
||||
|
||||
DWORD dwLocalUsersMask = 0;
|
||||
unsigned int dwLocalUsersMask = 0;
|
||||
|
||||
dwLocalUsersMask |= CGameNetworkManager::GetLocalPlayerMask(ProfileManager.GetPrimaryPad());
|
||||
// Load data from disc
|
||||
|
|
|
|||
|
|
@ -459,7 +459,7 @@ HRESULT CScene_MultiGameCreate::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPr
|
|||
else
|
||||
{
|
||||
// 4J Stu - If we only have one controller connected, then don't show the sign-in UI again
|
||||
DWORD connectedControllers = 0;
|
||||
int connectedControllers = 0;
|
||||
for(unsigned int i = 0; i < XUSER_MAX_COUNT; ++i)
|
||||
{
|
||||
if( InputManager.IsPadConnected(i) || ProfileManager.IsSignedIn(i) ) ++connectedControllers;
|
||||
|
|
@ -565,7 +565,7 @@ int CScene_MultiGameCreate::WarningTrialTexturePackReturned(void *pParam,int iPa
|
|||
|
||||
|
||||
// 4J Stu - If we only have one controller connected, then don't show the sign-in UI again
|
||||
DWORD connectedControllers = 0;
|
||||
int connectedControllers = 0;
|
||||
for(unsigned int i = 0; i < XUSER_MAX_COUNT; ++i)
|
||||
{
|
||||
if( InputManager.IsPadConnected(i) || ProfileManager.IsSignedIn(i) ) ++connectedControllers;
|
||||
|
|
@ -628,7 +628,7 @@ HRESULT CScene_MultiGameCreate::OnNotifyValueChanged (HXUIOBJ hObjSource, XUINot
|
|||
{
|
||||
// Enable the done button when we have all of the necessary information
|
||||
std::wstring wWorldName = m_EditWorldName.GetText();
|
||||
BOOL bHasWorldName = ( wWorldName.length()!=0);
|
||||
bool bHasWorldName = ( wWorldName.length()!=0);
|
||||
m_NewWorld.SetEnable(bHasWorldName);
|
||||
}
|
||||
else if(hObjSource==m_SliderDifficulty.GetSlider() )
|
||||
|
|
@ -761,7 +761,7 @@ int CScene_MultiGameCreate::ConfirmCreateReturned(void *pParam,int iPad,C4JStora
|
|||
bool isClientSide = ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad()) && pClass->m_MoreOptionsParams.bOnlineGame;
|
||||
|
||||
// 4J Stu - If we only have one controller connected, then don't show the sign-in UI again
|
||||
DWORD connectedControllers = 0;
|
||||
int connectedControllers = 0;
|
||||
for(unsigned int i = 0; i < XUSER_MAX_COUNT; ++i)
|
||||
{
|
||||
if( InputManager.IsPadConnected(i) || ProfileManager.IsSignedIn(i) ) ++connectedControllers;
|
||||
|
|
@ -815,7 +815,7 @@ int CScene_MultiGameCreate::StartGame_SignInReturned(void *pParam,bool bContinue
|
|||
// It's possible that the player has not signed in - they can back out
|
||||
if(ProfileManager.IsSignedIn(iPad))
|
||||
{
|
||||
DWORD dwLocalUsersMask = 0;
|
||||
unsigned int dwLocalUsersMask = 0;
|
||||
|
||||
bool isClientSide = ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad()) && pClass->m_MoreOptionsParams.bOnlineGame;
|
||||
bool noPrivileges = false;
|
||||
|
|
@ -889,7 +889,7 @@ void CScene_MultiGameCreate::CreateGame(CScene_MultiGameCreate* pClass, DWORD dw
|
|||
// Make our next save default to the name of the level
|
||||
StorageManager.SetSaveTitle((wchar_t *)wWorldName.c_str());
|
||||
|
||||
BOOL bHasSeed = (pClass->m_EditSeed.GetText() != NULL);
|
||||
bool bHasSeed = (pClass->m_EditSeed.GetText() != NULL);
|
||||
|
||||
std::wstring wSeed;
|
||||
if(bHasSeed)
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ HRESULT CScene_MultiGameInfo::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPres
|
|||
m_bIgnoreInput=true;
|
||||
|
||||
// 4J Stu - If we only have one controller connected, then don't show the sign-in UI again
|
||||
DWORD connectedControllers = 0;
|
||||
int connectedControllers = 0;
|
||||
for(unsigned int i = 0; i < XUSER_MAX_COUNT; ++i)
|
||||
{
|
||||
if( InputManager.IsPadConnected(i) || ProfileManager.IsSignedIn(i) ) ++connectedControllers;
|
||||
|
|
@ -258,9 +258,9 @@ int CScene_MultiGameInfo::StartGame_SignInReturned(void *pParam,bool bContinue,
|
|||
// Shared function to join the game that is the same whether we used the sign-in UI or not
|
||||
void CScene_MultiGameInfo::JoinGame(CScene_MultiGameInfo* pClass)
|
||||
{
|
||||
DWORD dwLocalUsersMask = 0;
|
||||
unsigned int dwLocalUsersMask = 0;
|
||||
bool noPrivileges = false;
|
||||
DWORD dwSignedInUsers = 0;
|
||||
unsigned int dwSignedInUsers = 0;
|
||||
|
||||
// if we're in SD mode, then only the primary player gets to play
|
||||
if(RenderManager.IsHiDef())
|
||||
|
|
@ -389,4 +389,3 @@ HRESULT CScene_MultiGameInfo::OnTimer( XUIMessageTimer *pTimer, BOOL& bHandled )
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -455,7 +455,7 @@ HRESULT CScene_MultiGameJoinLoad::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotify
|
|||
{
|
||||
m_bIgnoreInput=true;
|
||||
|
||||
DWORD nIndex = m_pGamesList->GetCurSel();
|
||||
int nIndex = m_pGamesList->GetCurSel();
|
||||
|
||||
if( m_pGamesList->GetItemCount() > 0 && nIndex < currentSessions.size() )
|
||||
{
|
||||
|
|
@ -645,7 +645,7 @@ HRESULT CScene_MultiGameJoinLoad::OnKeyDown(XUIMessageInput* pInputData, BOOL& r
|
|||
case VK_PAD_Y:
|
||||
if(m_pGamesList->TreeHasFocus() && m_pGamesList->GetItemCount() > 0)
|
||||
{
|
||||
DWORD nIndex = m_pGamesList->GetCurSel();
|
||||
int nIndex = m_pGamesList->GetCurSel();
|
||||
FriendSessionInfo *pSelectedSession = currentSessions.at( nIndex );
|
||||
|
||||
PlayerUID xuid = pSelectedSession->data.hostPlayerUID;
|
||||
|
|
@ -659,7 +659,7 @@ HRESULT CScene_MultiGameJoinLoad::OnKeyDown(XUIMessageInput* pInputData, BOOL& r
|
|||
if(ProfileManager.IsSignedInLive( m_iPad ))
|
||||
{
|
||||
// 4J-PB - required for a delete of the save if it's found to be a corrupted save
|
||||
DWORD nIndex = m_pSavesList->GetCurSel();
|
||||
int nIndex = m_pSavesList->GetCurSel();
|
||||
m_iChangingSaveGameInfoIndex=m_pSavesList->GetData(nIndex).iIndex;
|
||||
|
||||
unsigned int uiIDA[2];
|
||||
|
|
@ -1133,7 +1133,7 @@ void CScene_MultiGameJoinLoad::UpdateGamesList()
|
|||
return;
|
||||
}
|
||||
|
||||
DWORD nIndex = -1;
|
||||
int nIndex = -1;
|
||||
FriendSessionInfo *pSelectedSession = NULL;
|
||||
if(m_pGamesList->TreeHasFocus() && m_pGamesList->GetItemCount() > 0)
|
||||
{
|
||||
|
|
@ -1216,7 +1216,7 @@ void CScene_MultiGameJoinLoad::UpdateGamesList()
|
|||
unsigned int xuiListSize = m_pGamesList->GetItemCount();
|
||||
unsigned int filteredListSize = (unsigned int)currentSessions.size();
|
||||
|
||||
BOOL gamesListHasFocus = m_pGamesList->TreeHasFocus();
|
||||
bool gamesListHasFocus = m_pGamesList->TreeHasFocus() != FALSE;
|
||||
|
||||
if(filteredListSize > 0)
|
||||
{
|
||||
|
|
@ -1790,7 +1790,7 @@ int CScene_MultiGameJoinLoad::LoadSaveDataReturned(void *pParam,bool bContinue)
|
|||
bool isClientSide = ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad());
|
||||
|
||||
// 4J Stu - If we only have one controller connected, then don't show the sign-in UI again
|
||||
DWORD connectedControllers = 0;
|
||||
int connectedControllers = 0;
|
||||
for(unsigned int i = 0; i < XUSER_MAX_COUNT; ++i)
|
||||
{
|
||||
if( InputManager.IsPadConnected(i) || ProfileManager.IsSignedIn(i) ) ++connectedControllers;
|
||||
|
|
@ -1798,7 +1798,7 @@ int CScene_MultiGameJoinLoad::LoadSaveDataReturned(void *pParam,bool bContinue)
|
|||
|
||||
if(!isClientSide || connectedControllers == 1 || !RenderManager.IsHiDef())
|
||||
{
|
||||
DWORD dwLocalUsersMask = CGameNetworkManager::GetLocalPlayerMask(ProfileManager.GetPrimaryPad());
|
||||
unsigned int dwLocalUsersMask = CGameNetworkManager::GetLocalPlayerMask(ProfileManager.GetPrimaryPad());
|
||||
|
||||
// No guest problems so we don't need to force a sign-in of players here
|
||||
StartGameFromSave(pClass, dwLocalUsersMask);
|
||||
|
|
@ -1825,7 +1825,7 @@ int CScene_MultiGameJoinLoad::StartGame_SignInReturned(void *pParam,bool bContin
|
|||
// It's possible that the player has not signed in - they can back out
|
||||
if(ProfileManager.IsSignedIn(iPad))
|
||||
{
|
||||
DWORD dwLocalUsersMask = 0;
|
||||
unsigned int dwLocalUsersMask = 0;
|
||||
|
||||
for(unsigned int index = 0; index < XUSER_MAX_COUNT; ++index)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue