mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-05-24 11:13:03 +00:00
Remove WinAPI booleans from XUI scene helpers
This commit is contained in:
parent
20cd01a66d
commit
a76d416473
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -109,8 +109,8 @@ protected:
|
|||
CXuiControl m_selectedItemA[XUSER_MAX_COUNT];
|
||||
CXuiControl m_selectedItemSmallA[XUSER_MAX_COUNT];
|
||||
|
||||
BOOL m_visible[XUSER_MAX_COUNT][BUTTONS_TOOLTIP_MAX];
|
||||
BOOL m_bossHealthVisible[XUSER_MAX_COUNT];
|
||||
bool m_visible[XUSER_MAX_COUNT][BUTTONS_TOOLTIP_MAX];
|
||||
bool m_bossHealthVisible[XUSER_MAX_COUNT];
|
||||
int m_iWrongTexturePackTickC;
|
||||
|
||||
// Message map. Here we tie messages to message handlers.
|
||||
|
|
@ -337,23 +337,23 @@ public:
|
|||
private:
|
||||
void _TickAllBaseScenes();
|
||||
HRESULT _SetTooltipText( unsigned int iPad, unsigned int tooltip, int iTextID );
|
||||
HRESULT _SetEnableTooltips( unsigned int iPad, BOOL bVal );
|
||||
HRESULT _SetEnableTooltips( unsigned int iPad, bool enabled );
|
||||
HRESULT _ShowTooltip( unsigned int iPad, unsigned int tooltip, bool show );
|
||||
HRESULT _SetTooltipsEnabled( unsigned int iPad, bool bA = true, bool bB = true, bool bX = true, bool bY = true, bool bLT = true, bool bRT = true, bool bLB=true, bool bRB = true, bool bLS = true);
|
||||
HRESULT _RefreshTooltips( unsigned int iPad);
|
||||
HRESULT _EnableTooltip( unsigned int iPad, unsigned int tooltip, bool enable );
|
||||
HRESULT _ShowSavingMessage( unsigned int iPad, C4JStorage::ESavingMessage eVal );
|
||||
HRESULT _ShowBackground( unsigned int iPad, BOOL bShow );
|
||||
HRESULT _ShowDarkOverlay( unsigned int iPad, BOOL bShow );
|
||||
HRESULT _ShowLogo( unsigned int iPad, BOOL bShow );
|
||||
HRESULT _ShowBackground( unsigned int iPad, bool show );
|
||||
HRESULT _ShowDarkOverlay( unsigned int iPad, bool show );
|
||||
HRESULT _ShowLogo( unsigned int iPad, bool show );
|
||||
HRESULT _ShowPressStart(unsigned int iPad);
|
||||
HRESULT _UpdateAutosaveCountdownTimer(unsigned int uiSeconds);
|
||||
HRESULT _ShowAutosaveCountdownTimer(BOOL bVal);
|
||||
HRESULT _ShowAutosaveCountdownTimer(bool show);
|
||||
HRESULT _UpdateTrialTimer(unsigned int iPad);
|
||||
HRESULT _ShowTrialTimer(BOOL bVal);
|
||||
HRESULT _ShowTrialTimer(bool show);
|
||||
void _ReduceTrialTimerValue();
|
||||
HRESULT _HidePressStart();
|
||||
HRESULT _ShowSafeArea( BOOL bShow );
|
||||
HRESULT _ShowSafeArea( bool show );
|
||||
HRESULT _ShowOtherPlayersBaseScene(int iPad, bool show);
|
||||
bool _PressStartPlaying(unsigned int iPad);
|
||||
HRESULT _SetPlayerBaseScenePosition( unsigned int iPad, EBaseScenePosition position );
|
||||
|
|
@ -363,7 +363,7 @@ private:
|
|||
HXUIOBJ _GetPlayerBaseScene(int iPad) {return m_BasePlayerScene[iPad].m_hObj;}
|
||||
HRESULT _PlayUISFX(ESoundEffect eSound);
|
||||
void _SetEmptyQuadrantLogo(int iPad,EBaseScenePosition ePos);
|
||||
HRESULT _DisplayGamertag( unsigned int iPad, BOOL bDisplay );
|
||||
HRESULT _DisplayGamertag( unsigned int iPad, bool display );
|
||||
void _SetSelectedItem( unsigned int iPad, const std::wstring& name);
|
||||
void _HideAllGameUIElements();
|
||||
bool _GetBaseSceneSafeZone( unsigned int iPad, D3DXVECTOR2 &origin, float &width, float &height);
|
||||
|
|
@ -387,7 +387,7 @@ public:
|
|||
static CXuiSceneBase *GetInstance() { return Instance; }
|
||||
static void TickAllBaseScenes();
|
||||
static HRESULT SetTooltipText( unsigned int iPad, unsigned int tooltip, int iTextID );
|
||||
static HRESULT SetEnableTooltips( unsigned int iPad, BOOL bVal );
|
||||
static HRESULT SetEnableTooltips( unsigned int iPad, bool enabled );
|
||||
static HRESULT ShowTooltip( unsigned int iPad, unsigned int tooltip, bool show );
|
||||
static HRESULT SetTooltips( unsigned int iPad, int iA, int iB=-1, int iX=-1, int iY=-1 , int iLT=-1, int iRT=-1, int iLB=-1, int iRB=-1, int iLS=-1, bool forceUpdate = false);
|
||||
static HRESULT RefreshTooltips( unsigned int iPad);
|
||||
|
|
@ -395,16 +395,16 @@ public:
|
|||
static HRESULT SetTooltipsEnabled( unsigned int iPad, bool bA = true, bool bB = true, bool bX = true, bool bY = true, bool bLT = true, bool bRT = true, bool bLB = true, bool bRB=true, bool bLS=true);
|
||||
static HRESULT AnimateKeyPress(unsigned int userIndex, unsigned int keyCode);
|
||||
static HRESULT ShowSavingMessage( unsigned int iPad, C4JStorage::ESavingMessage eVal);
|
||||
static HRESULT ShowBackground( unsigned int iPad, BOOL bShow );
|
||||
static HRESULT ShowDarkOverlay( unsigned int iPad, BOOL bShow );
|
||||
static HRESULT ShowLogo( unsigned int iPad, BOOL bShow );
|
||||
static HRESULT ShowBackground( unsigned int iPad, bool show );
|
||||
static HRESULT ShowDarkOverlay( unsigned int iPad, bool show );
|
||||
static HRESULT ShowLogo( unsigned int iPad, bool show );
|
||||
static HRESULT UpdateAutosaveCountdownTimer(unsigned int uiSeconds);
|
||||
static HRESULT ShowAutosaveCountdownTimer(BOOL bVal);
|
||||
static HRESULT ShowAutosaveCountdownTimer(bool show);
|
||||
static HRESULT UpdateTrialTimer(unsigned int iPad);
|
||||
static HRESULT ShowTrialTimer(BOOL bVal);
|
||||
static HRESULT ShowTrialTimer(bool show);
|
||||
static void ReduceTrialTimerValue();
|
||||
static HRESULT HidePressStart();
|
||||
static HRESULT ShowSafeArea( BOOL bShow );
|
||||
static HRESULT ShowSafeArea( bool show );
|
||||
static HRESULT ShowOtherPlayersBaseScene(int iPad, bool show);
|
||||
|
||||
static HRESULT ShowPressStart(unsigned int iPad);
|
||||
|
|
@ -419,7 +419,7 @@ public:
|
|||
static HXUIOBJ GetPlayerBaseScene(int iPad);
|
||||
static HRESULT PlayUISFX(ESoundEffect eSound);
|
||||
static void SetEmptyQuadrantLogo(int iSection);
|
||||
static HRESULT DisplayGamertag( unsigned int iPad, BOOL bDisplay );
|
||||
static HRESULT DisplayGamertag( unsigned int iPad, bool display );
|
||||
static void SetSelectedItem( unsigned int iPad, const std::wstring &name);
|
||||
static void HideAllGameUIElements();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue