mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-07-07 21:58:10 +00:00
Remove WinAPI booleans from XUI scene helpers
This commit is contained in:
@@ -49,7 +49,7 @@ HRESULT CXuiSceneBase::OnInit( XUIMessageInit* pInitData, BOOL& bHandled )
|
||||
{
|
||||
for( unsigned int i = 0; i < BUTTONS_TOOLTIP_MAX; ++i )
|
||||
{
|
||||
m_visible[idx][ i ] = FALSE;
|
||||
m_visible[idx][ i ] = false;
|
||||
m_iCurrentTooltipTextID[idx][i]=-1;
|
||||
hTooltipText[idx][i]=NULL;
|
||||
hTooltipTextSmall[idx][i]=NULL;
|
||||
@@ -63,7 +63,7 @@ HRESULT CXuiSceneBase::OnInit( XUIMessageInit* pInitData, BOOL& bHandled )
|
||||
|
||||
m_bCrouching[idx]=false;
|
||||
m_uiSelectedItemOpacityCountDown[idx] =0;
|
||||
m_bossHealthVisible[idx] = FALSE;
|
||||
m_bossHealthVisible[idx] = false;
|
||||
|
||||
switch(idx)
|
||||
{
|
||||
@@ -368,14 +368,14 @@ void CXuiSceneBase::_TickAllBaseScenes()
|
||||
|
||||
m_pBossHealthProgress[i].SetRange(0, boss->getMaxHealth() );
|
||||
m_pBossHealthProgress[i].SetValue( boss->getSynchedHealth() );
|
||||
m_bossHealthVisible[i] = TRUE;
|
||||
m_bossHealthVisible[i] = true;
|
||||
|
||||
_UpdateSelectedItemPos(i);
|
||||
}
|
||||
else if( m_bossHealthVisible[i] == TRUE)
|
||||
else if(m_bossHealthVisible[i])
|
||||
{
|
||||
m_BossHealthGroup[i].SetShow(FALSE);
|
||||
m_bossHealthVisible[i] = FALSE;
|
||||
m_bossHealthVisible[i] = false;
|
||||
|
||||
_UpdateSelectedItemPos(i);
|
||||
}
|
||||
@@ -388,7 +388,7 @@ void CXuiSceneBase::_TickAllBaseScenes()
|
||||
if( m_ticksWithNoBoss > 20 )
|
||||
{
|
||||
m_BossHealthGroup[i].SetShow(FALSE);
|
||||
m_bossHealthVisible[i] = FALSE;
|
||||
m_bossHealthVisible[i] = false;
|
||||
|
||||
_UpdateSelectedItemPos(i);
|
||||
}
|
||||
@@ -481,12 +481,12 @@ void CXuiSceneBase::_TickAllBaseScenes()
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CXuiSceneBase::_SetEnableTooltips( unsigned int iPad, BOOL bVal )
|
||||
HRESULT CXuiSceneBase::_SetEnableTooltips( unsigned int iPad, bool enabled )
|
||||
{
|
||||
for(int i=0;i<BUTTONS_TOOLTIP_MAX;i++)
|
||||
{
|
||||
//XuiElementSetShow(m_Buttons[iPad][i].m_hObj,bVal);
|
||||
XuiControlSetEnable(m_Buttons[iPad][i].m_hObj,bVal);
|
||||
//XuiElementSetShow(m_Buttons[iPad][i].m_hObj,enabled);
|
||||
XuiControlSetEnable(m_Buttons[iPad][i].m_hObj,enabled);
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
@@ -711,9 +711,9 @@ HRESULT CXuiSceneBase::_ShowTooltip( unsigned int iPad, unsigned int tooltip, bo
|
||||
return hr;
|
||||
}
|
||||
|
||||
HRESULT CXuiSceneBase::_ShowSafeArea( BOOL bShow )
|
||||
HRESULT CXuiSceneBase::_ShowSafeArea(bool show)
|
||||
{
|
||||
return m_SafeArea.SetShow(bShow);
|
||||
return m_SafeArea.SetShow(show);
|
||||
}
|
||||
|
||||
HRESULT CXuiSceneBase::_ShowOtherPlayersBaseScene(int iPad, bool show)
|
||||
@@ -845,7 +845,7 @@ HRESULT CXuiSceneBase::_ShowSavingMessage( unsigned int iPad, C4JStorage::ESavin
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CXuiSceneBase::_ShowBackground( unsigned int iPad, BOOL bShow )
|
||||
HRESULT CXuiSceneBase::_ShowBackground( unsigned int iPad, bool show )
|
||||
{
|
||||
HRESULT hr;
|
||||
Minecraft *pMinecraft=Minecraft::GetInstance();
|
||||
@@ -858,7 +858,7 @@ HRESULT CXuiSceneBase::_ShowBackground( unsigned int iPad, BOOL bShow )
|
||||
hr=XuiElementGetChildById(hVisual,L"NightGroup",&hNight);
|
||||
hr=XuiElementGetChildById(hVisual,L"DayGroup",&hDay);
|
||||
|
||||
if(bShow && pMinecraft->level!=NULL)
|
||||
if(show && pMinecraft->level!=NULL)
|
||||
{
|
||||
__int64 i64TimeOfDay =0;
|
||||
// are we in the Nether? - Leave the time as 0 if we are, so we show daylight
|
||||
@@ -884,19 +884,19 @@ HRESULT CXuiSceneBase::_ShowBackground( unsigned int iPad, BOOL bShow )
|
||||
hr=XuiElementSetShow(hDay,TRUE);
|
||||
}
|
||||
}
|
||||
hr=XuiElementSetShow(m_Background[iPad],bShow);
|
||||
hr=XuiElementSetShow(m_Background[iPad],show);
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
HRESULT CXuiSceneBase::_ShowDarkOverlay( unsigned int iPad, BOOL bShow )
|
||||
HRESULT CXuiSceneBase::_ShowDarkOverlay( unsigned int iPad, bool show )
|
||||
{
|
||||
return XuiElementSetShow(m_DarkOverlay[iPad],bShow);
|
||||
return XuiElementSetShow(m_DarkOverlay[iPad],show);
|
||||
}
|
||||
|
||||
HRESULT CXuiSceneBase::_ShowLogo( unsigned int iPad, BOOL bShow )
|
||||
HRESULT CXuiSceneBase::_ShowLogo( unsigned int iPad, bool show )
|
||||
{
|
||||
return XuiElementSetShow(m_Logo[iPad],bShow);
|
||||
return XuiElementSetShow(m_Logo[iPad],show);
|
||||
}
|
||||
|
||||
HRESULT CXuiSceneBase::_ShowPressStart(unsigned int iPad)
|
||||
@@ -966,9 +966,9 @@ HRESULT CXuiSceneBase::_UpdateAutosaveCountdownTimer(unsigned int uiSeconds)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CXuiSceneBase::_ShowAutosaveCountdownTimer(BOOL bVal)
|
||||
HRESULT CXuiSceneBase::_ShowAutosaveCountdownTimer(bool show)
|
||||
{
|
||||
m_TrialTimer.SetShow(bVal);
|
||||
m_TrialTimer.SetShow(show);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -1024,9 +1024,9 @@ void CXuiSceneBase::_ReduceTrialTimerValue()
|
||||
m_trialTimerLimitSecs -= trialTimeTicks;
|
||||
}
|
||||
|
||||
HRESULT CXuiSceneBase::_ShowTrialTimer(BOOL bVal)
|
||||
HRESULT CXuiSceneBase::_ShowTrialTimer(bool show)
|
||||
{
|
||||
m_TrialTimer.SetShow(bVal);
|
||||
m_TrialTimer.SetShow(show);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -1595,7 +1595,7 @@ HRESULT CXuiSceneBase::_PlayUISFX(ESoundEffect eSound)
|
||||
}
|
||||
|
||||
|
||||
HRESULT CXuiSceneBase::_DisplayGamertag( unsigned int iPad, BOOL bDisplay )
|
||||
HRESULT CXuiSceneBase::_DisplayGamertag( unsigned int iPad, bool display )
|
||||
{
|
||||
|
||||
if(app.DebugSettingsOn() && (app.GetGameSettingsDebugMask()&(1L<<eDebugSetting_DebugLeaderboards)))
|
||||
@@ -1622,10 +1622,10 @@ HRESULT CXuiSceneBase::_DisplayGamertag( unsigned int iPad, BOOL bDisplay )
|
||||
// The host decides whether these are on or off
|
||||
if(app.GetGameSettings(ProfileManager.GetPrimaryPad(),eGameSetting_DisplaySplitscreenGamertags)!=0)
|
||||
{
|
||||
XuiElementSetShow(m_hGamerTagA[iPad],bDisplay);
|
||||
XuiElementSetShow(m_hGamerTagA[iPad],display);
|
||||
|
||||
// set the opacity of the gamertag
|
||||
if((bDisplay==TRUE) &&(ProfileManager.GetLockedProfile()!=-1))
|
||||
if(display && (ProfileManager.GetLockedProfile()!=-1))
|
||||
{
|
||||
unsigned char ucAlpha=app.GetGameSettings(ProfileManager.GetPrimaryPad(),eGameSetting_InterfaceOpacity);
|
||||
float fVal;
|
||||
@@ -1870,11 +1870,11 @@ void CXuiSceneBase::TickAllBaseScenes()
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CXuiSceneBase::SetEnableTooltips( unsigned int iPad, BOOL bVal )
|
||||
HRESULT CXuiSceneBase::SetEnableTooltips( unsigned int iPad, bool enabled )
|
||||
{
|
||||
if( CXuiSceneBase::Instance != NULL )
|
||||
{
|
||||
return CXuiSceneBase::Instance->_SetEnableTooltips(iPad, bVal );
|
||||
return CXuiSceneBase::Instance->_SetEnableTooltips(iPad, enabled);
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
@@ -1906,11 +1906,11 @@ HRESULT CXuiSceneBase::ShowTooltip( unsigned int iPad, unsigned int tooltip, boo
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CXuiSceneBase::ShowSafeArea( BOOL bShow )
|
||||
HRESULT CXuiSceneBase::ShowSafeArea(bool show)
|
||||
{
|
||||
if( CXuiSceneBase::Instance != NULL )
|
||||
{
|
||||
return CXuiSceneBase::Instance->_ShowSafeArea(bShow );
|
||||
return CXuiSceneBase::Instance->_ShowSafeArea(show);
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
@@ -1986,19 +1986,19 @@ HRESULT CXuiSceneBase::ShowSavingMessage( unsigned int iPad, C4JStorage::ESaving
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CXuiSceneBase::ShowBackground( unsigned int iPad, BOOL bShow )
|
||||
HRESULT CXuiSceneBase::ShowBackground( unsigned int iPad, bool show )
|
||||
{
|
||||
return CXuiSceneBase::Instance->_ShowBackground(iPad, bShow );
|
||||
return CXuiSceneBase::Instance->_ShowBackground(iPad, show);
|
||||
}
|
||||
|
||||
HRESULT CXuiSceneBase::ShowDarkOverlay( unsigned int iPad, BOOL bShow )
|
||||
HRESULT CXuiSceneBase::ShowDarkOverlay( unsigned int iPad, bool show )
|
||||
{
|
||||
return CXuiSceneBase::Instance->_ShowDarkOverlay(iPad, bShow );
|
||||
return CXuiSceneBase::Instance->_ShowDarkOverlay(iPad, show);
|
||||
}
|
||||
|
||||
HRESULT CXuiSceneBase::ShowLogo( unsigned int iPad, BOOL bShow )
|
||||
HRESULT CXuiSceneBase::ShowLogo( unsigned int iPad, bool show )
|
||||
{
|
||||
return CXuiSceneBase::Instance->_ShowLogo(iPad, bShow );
|
||||
return CXuiSceneBase::Instance->_ShowLogo(iPad, show);
|
||||
}
|
||||
|
||||
HRESULT CXuiSceneBase::ShowPressStart(unsigned int iPad)
|
||||
@@ -2019,9 +2019,9 @@ HRESULT CXuiSceneBase::UpdateAutosaveCountdownTimer(unsigned int uiSeconds)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CXuiSceneBase::ShowAutosaveCountdownTimer(BOOL bVal)
|
||||
HRESULT CXuiSceneBase::ShowAutosaveCountdownTimer(bool show)
|
||||
{
|
||||
CXuiSceneBase::Instance->_ShowAutosaveCountdownTimer(bVal);
|
||||
CXuiSceneBase::Instance->_ShowAutosaveCountdownTimer(show);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -2030,9 +2030,9 @@ HRESULT CXuiSceneBase::UpdateTrialTimer(unsigned int iPad)
|
||||
CXuiSceneBase::Instance->_UpdateTrialTimer(iPad);
|
||||
return S_OK;
|
||||
}
|
||||
HRESULT CXuiSceneBase::ShowTrialTimer(BOOL bVal)
|
||||
HRESULT CXuiSceneBase::ShowTrialTimer(bool show)
|
||||
{
|
||||
CXuiSceneBase::Instance->_ShowTrialTimer(bVal);
|
||||
CXuiSceneBase::Instance->_ShowTrialTimer(show);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -2210,10 +2210,10 @@ void CXuiSceneBase::SetEmptyQuadrantLogo(int iScreenSection)
|
||||
CXuiSceneBase::Instance->_SetEmptyQuadrantLogo(iPad,ePos);
|
||||
}
|
||||
|
||||
HRESULT CXuiSceneBase::DisplayGamertag( unsigned int iPad, BOOL bDisplay )
|
||||
HRESULT CXuiSceneBase::DisplayGamertag( unsigned int iPad, bool display )
|
||||
{
|
||||
|
||||
CXuiSceneBase::Instance->_DisplayGamertag(iPad,bDisplay);
|
||||
CXuiSceneBase::Instance->_DisplayGamertag(iPad, display);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user