NoteSkinManager::ColToButtonName -> Game::ColToButtonName

This commit is contained in:
Glenn Maynard
2004-09-06 02:49:36 +00:00
parent 0780dc3c6a
commit 3e1bc2ef26
7 changed files with 19 additions and 17 deletions
+10
View File
@@ -104,6 +104,16 @@ void Game::MenuInputToGameInput( MenuInput MenuI, GameInput GameIout[4] ) const
}
}
CString Game::ColToButtonName( int col ) const
{
const Style* pStyle = GAMESTATE->GetCurrentStyle();
StyleInput SI( PLAYER_1, col );
GameInput GI = pStyle->StyleInputToGameInput( SI );
return m_szButtonNames[GI.button];
}
/*
* (c) 2001-2002 Chris Danford
* All rights reserved.
+1
View File
@@ -53,6 +53,7 @@ public:
GameButton ButtonNameToIndex( const CString &sButtonName ) const;
MenuInput GameInputToMenuInput( GameInput GameI ) const;
void MenuInputToGameInput( MenuInput MenuI, GameInput GameIout[4] ) const;
CString ColToButtonName( int col ) const;
TapNoteScore m_mapMarvelousTo;
TapNoteScore m_mapPerfectTo;
+3 -2
View File
@@ -8,6 +8,7 @@
#include "GameState.h"
#include "PrefsManager.h"
#include "NoteFieldPositioning.h"
#include "Game.h"
GhostArrowRow::GhostArrowRow()
@@ -31,8 +32,8 @@ void GhostArrowRow::Load( PlayerNumber pn, CString NoteSkin, float fYReverseOffs
{
NoteFieldMode &mode = g_NoteFieldMode[pn];
CString Button = mode.GhostButtonNames[c];
if(Button == "")
Button = NoteSkinManager::ColToButtonName(c);
if( Button == "" )
Button = GAMESTATE->GetCurrentGame()->ColToButtonName( c );
m_GhostDim.push_back( new GhostArrow );
m_GhostBright.push_back( new GhostArrow );
+3 -2
View File
@@ -12,6 +12,7 @@
#include "NoteFieldPositioning.h"
#include "ActorUtil.h"
#include "NoteDataWithScoring.h"
#include "Game.h"
enum part
{
@@ -231,8 +232,8 @@ void NoteDisplay::Load( int iColNum, PlayerNumber pn, CString NoteSkin, float fY
/* Normally, this is empty and we use the style table entry via ColToButtonName. */
NoteFieldMode &mode = g_NoteFieldMode[pn];
CString Button = mode.NoteButtonNames[iColNum];
if(Button == "")
Button = NoteSkinManager::ColToButtonName(iColNum);
if( Button == "" )
Button = GAMESTATE->GetCurrentGame()->ColToButtonName( iColNum );
cache->Load( NoteSkin, Button );
-10
View File
@@ -206,16 +206,6 @@ RageColor NoteSkinManager::GetMetricC( CString sNoteSkinName, CString sButtonNam
}
CString NoteSkinManager::ColToButtonName(int col)
{
const Style* pStyle = GAMESTATE->GetCurrentStyle();
const Game* pGame = GAMESTATE->GetCurrentGame();
StyleInput SI( PLAYER_1, col );
GameInput GI = pStyle->StyleInputToGameInput( SI );
return pGame->m_szButtonNames[GI.button];
}
CString NoteSkinManager::GetPathToFromNoteSkinAndButton( CString NoteSkin, CString sButtonName, CString sElement, bool bOptional )
{
try_again:
-2
View File
@@ -28,8 +28,6 @@ public:
bool GetMetricB( CString sNoteSkinName, CString sButtonName, CString sValueName );
RageColor GetMetricC( CString sNoteSkinName, CString sButtonName, CString sValueName );
static CString ColToButtonName(int col);
CString GetNoteSkinDir( const CString &sSkinName );
protected:
+2 -1
View File
@@ -7,6 +7,7 @@
#include "NoteSkinManager.h"
#include "RageLog.h"
#include "RageUtil.h"
#include "Game.h"
ReceptorArrow::ReceptorArrow()
@@ -23,7 +24,7 @@ bool ReceptorArrow::Load( CString NoteSkin, PlayerNumber pn, int iColNo )
NoteFieldMode &mode = g_NoteFieldMode[pn];
CString sButton = mode.GrayButtonNames[iColNo];
if( sButton == "" )
sButton = NoteSkinManager::ColToButtonName( iColNo );
sButton = GAMESTATE->GetCurrentGame()->ColToButtonName( iColNo );
CString sPath;
m_pReceptorWaiting.Load( NOTESKIN->GetPathToFromNoteSkinAndButton(NoteSkin,sButton,"receptor waiting") );