hi ho, const safety
This commit is contained in:
@@ -124,7 +124,7 @@ void GameDef::GetHoldTweenColors( const CString sSkinName, const CString sButton
|
||||
return;
|
||||
}
|
||||
|
||||
void GameDef::GetSkinNames( CStringArray &AddTo )
|
||||
void GameDef::GetSkinNames( CStringArray &AddTo ) const
|
||||
{
|
||||
CString sBaseSkinFolder = "Skins\\" + CString(m_szName) + "\\";
|
||||
GetDirListing( sBaseSkinFolder + "*.*", AddTo, true );
|
||||
@@ -138,7 +138,7 @@ void GameDef::GetSkinNames( CStringArray &AddTo )
|
||||
throw RageException( "The folder '%s' must contain at least one skin.", sBaseSkinFolder );
|
||||
}
|
||||
|
||||
bool GameDef::HasASkinNamed( CString sSkin )
|
||||
bool GameDef::HasASkinNamed( CString sSkin ) const
|
||||
{
|
||||
CStringArray asSkinNames;
|
||||
GetSkinNames( asSkinNames );
|
||||
@@ -150,7 +150,7 @@ bool GameDef::HasASkinNamed( CString sSkin )
|
||||
return false;
|
||||
}
|
||||
|
||||
void GameDef::AssertSkinsAreComplete()
|
||||
void GameDef::AssertSkinsAreComplete() const
|
||||
{
|
||||
CStringArray asSkinNames;
|
||||
GetSkinNames( asSkinNames );
|
||||
@@ -159,7 +159,7 @@ void GameDef::AssertSkinsAreComplete()
|
||||
AssertSkinIsComplete( asSkinNames[i] );
|
||||
}
|
||||
|
||||
void GameDef::AssertSkinIsComplete( CString sSkin )
|
||||
void GameDef::AssertSkinIsComplete( CString sSkin ) const
|
||||
{
|
||||
CString sGameSkinFolder = "Skins\\" + sSkin + "\\";
|
||||
|
||||
@@ -173,7 +173,7 @@ void GameDef::AssertSkinIsComplete( CString sSkin )
|
||||
}
|
||||
}
|
||||
|
||||
MenuInput GameDef::GameInputToMenuInput( GameInput GameI )
|
||||
MenuInput GameDef::GameInputToMenuInput( GameInput GameI ) const
|
||||
{
|
||||
PlayerNumber pn;
|
||||
|
||||
@@ -207,7 +207,7 @@ MenuInput GameDef::GameInputToMenuInput( GameInput GameI )
|
||||
return MenuInput(); // invalid GameInput
|
||||
}
|
||||
|
||||
void GameDef::MenuInputToGameInput( MenuInput MenuI, GameInput GameIout[4] )
|
||||
void GameDef::MenuInputToGameInput( MenuInput MenuI, GameInput GameIout[4] ) const
|
||||
{
|
||||
ASSERT( MenuI.IsValid() );
|
||||
|
||||
|
||||
@@ -73,14 +73,14 @@ public:
|
||||
return GAME_BUTTON_INVALID;
|
||||
}
|
||||
|
||||
MenuInput GameInputToMenuInput( GameInput GameI );
|
||||
void MenuInputToGameInput( MenuInput MenuI, GameInput GameIout[4] );
|
||||
MenuInput GameInputToMenuInput( GameInput GameI ) const;
|
||||
void MenuInputToGameInput( MenuInput MenuI, GameInput GameIout[4] ) const;
|
||||
|
||||
// note skin stuff
|
||||
void GetSkinNames( CStringArray &asSkinNames );
|
||||
bool HasASkinNamed( CString sSkin );
|
||||
void AssertSkinsAreComplete();
|
||||
void AssertSkinIsComplete( CString sSkin );
|
||||
void GetSkinNames( CStringArray &asSkinNames ) const;
|
||||
bool HasASkinNamed( CString sSkin ) const;
|
||||
void AssertSkinsAreComplete() const;
|
||||
void AssertSkinIsComplete( CString sSkin ) const;
|
||||
|
||||
CString GetPathToGraphic( const CString sSkinName, const CString sButtonName, const SkinElement gbg ) const;
|
||||
void GetTapTweenColors( const CString sSkinName, const CString sButtonName, CArray<D3DXCOLOR,D3DXCOLOR> &aTapTweenColorsAddTo ) const;
|
||||
|
||||
@@ -234,19 +234,19 @@ void InputMapper::GameToStyle( GameInput GameI, StyleInput &StyleI )
|
||||
return;
|
||||
}
|
||||
|
||||
StyleDef* pStyleDef = GAMESTATE->GetCurrentStyleDef();
|
||||
const StyleDef* pStyleDef = GAMESTATE->GetCurrentStyleDef();
|
||||
StyleI = pStyleDef->GameInputToStyleInput( GameI );
|
||||
}
|
||||
|
||||
void InputMapper::GameToMenu( GameInput GameI, MenuInput &MenuI )
|
||||
{
|
||||
GameDef* pGameDef = GAMESTATE->GetCurrentGameDef();
|
||||
const GameDef* pGameDef = GAMESTATE->GetCurrentGameDef();
|
||||
MenuI = pGameDef->GameInputToMenuInput( GameI );
|
||||
}
|
||||
|
||||
void InputMapper::StyleToGame( StyleInput StyleI, GameInput &GameI )
|
||||
{
|
||||
StyleDef* pStyleDef = GAMESTATE->GetCurrentStyleDef();
|
||||
const StyleDef* pStyleDef = GAMESTATE->GetCurrentStyleDef();
|
||||
GameI = pStyleDef->StyleInputToGameInput( StyleI );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user