remove some old experimental stuff

This commit is contained in:
Glenn Maynard
2005-01-15 01:35:58 +00:00
parent 3a9b2f7f4b
commit f4391c932b
5 changed files with 2 additions and 68 deletions
+1 -4
View File
@@ -33,10 +33,7 @@ void GhostArrowRow::Load( const PlayerState* pPlayerState, CString NoteSkin, flo
{
// TODO: Remove indexing by PlayerNumber;
PlayerNumber pn = pPlayerState->m_PlayerNumber;
NoteFieldMode &mode = g_NoteFieldMode[pn];
CString Button = mode.GhostButtonNames[c];
if( Button == "" )
Button = GAMESTATE->GetCurrentGame()->ColToButtonName( c );
CString Button = GAMESTATE->GetCurrentGame()->ColToButtonName( c );
m_GhostDim.push_back( new GhostArrow );
m_GhostBright.push_back( new GhostArrow );
+1 -7
View File
@@ -230,13 +230,7 @@ void NoteDisplay::Load( int iColNum, const PlayerState* pPlayerState, CString No
m_pPlayerState = pPlayerState;
m_fYReverseOffsetPixels = fYReverseOffsetPixels;
/* Normally, this is empty and we use the style table entry via ColToButtonName. */
// TODO: Remove indexing with PlayerNumber.
PlayerNumber pn = m_pPlayerState->m_PlayerNumber;
NoteFieldMode &mode = g_NoteFieldMode[pn];
CString Button = mode.NoteButtonNames[iColNum];
if( Button == "" )
Button = GAMESTATE->GetCurrentGame()->ColToButtonName( iColNum );
CString Button = GAMESTATE->GetCurrentGame()->ColToButtonName( iColNum );
cache->Load( NoteSkin, Button );
-29
View File
@@ -19,9 +19,6 @@ NoteFieldMode g_NoteFieldMode[NUM_PLAYERS];
NoteFieldMode::NoteFieldMode()
{
m_fFov = 0;
m_fNear = 5;
m_fFar = 1000;
m_fFirstPixelToDrawScale = m_fLastPixelToDrawScale = 1.0f;
}
@@ -29,12 +26,6 @@ void NoteFieldMode::BeginDrawTrack(int tn)
{
DISPLAY->CameraPushMatrix();
/* It's useful to be able to use Actors like this, functioning only
* for a transformation. However, this is a big waste of matrix
* stack space, as each of these will push. Profile this. XXX */
if(m_fFov)
DISPLAY->LoadMenuPerspective(m_fFov, SCREEN_CENTER_X, SCREEN_CENTER_Y);
if(tn != -1)
{
DISPLAY->PushMatrix();
@@ -69,32 +60,12 @@ void NoteFieldMode::Load(const XNode *pNode, int pn)
if(pn == -1)
return;
GetValue( pNode, pn, "Backdrop", m_Backdrop );
GetValue( pNode, pn, "FOV", m_fFov );
GetValue( pNode, pn, "NearClipDistance", m_fNear );
GetValue( pNode, pn, "FarClipDistance", m_fFar );
GetValue( pNode, pn, "PixelsDrawAheadScale", m_fFirstPixelToDrawScale );
GetValue( pNode, pn, "PixelsDrawBehindScale", m_fLastPixelToDrawScale );
CString s;
if( GetValue( pNode, pn, "Judgment", s ) ) m_JudgmentCmd = ParseCommands(s);
if( GetValue( pNode, pn, "Combo", s ) ) m_ComboCmd = ParseCommands(s);
/* Load per-track data: */
for( int t = 0; t < MAX_NOTE_TRACKS; ++t )
{
GetValue( pNode, pn, ssprintf("GrayButton"), GrayButtonNames[t] );
GetValue( pNode, pn, ssprintf("GrayButton%i", t+1), GrayButtonNames[t] );
GetValue( pNode, pn, ssprintf("NoteButton"), NoteButtonNames[t] );
GetValue( pNode, pn, ssprintf("NoteButton%i", t+1), NoteButtonNames[t] );
GetValue( pNode, pn, ssprintf("GhostButton"), GhostButtonNames[t] );
GetValue( pNode, pn, ssprintf("GhostButton%i", t+1), GhostButtonNames[t] );
if( GetValue( pNode, pn, ssprintf("HoldJudgment"), s ) ) m_HoldJudgmentCmd[t] = ParseCommands(s);
if( GetValue( pNode, pn, ssprintf("HoldJudgment%i",t+1), s ) ) m_HoldJudgmentCmd[t] = ParseCommands(s);
}
}
NoteFieldPositioning::NoteFieldPositioning(CString fn)
-8
View File
@@ -23,19 +23,11 @@ struct NoteFieldMode
/* Unique ID from the INI. */
CString m_Id;
CString GrayButtonNames[MAX_NOTE_TRACKS];
CString NoteButtonNames[MAX_NOTE_TRACKS];
CString GhostButtonNames[MAX_NOTE_TRACKS];
/* 0 = no perspective */
float m_fFov, m_fNear, m_fFar;
float m_fPositionTrackX[MAX_NOTE_TRACKS];
float m_fFirstPixelToDrawScale, m_fLastPixelToDrawScale;
CString m_Backdrop;
Commands m_JudgmentCmd, m_ComboCmd, m_AttackDisplayCmd;
Commands m_HoldJudgmentCmd[MAX_NOTE_TRACKS];
};
class NoteFieldPositioning
-20
View File
@@ -76,7 +76,6 @@ Player::Player()
m_iOffsetSample = 0;
this->AddChild( &m_ArrowBackdrop );
this->AddChild( &m_Judgment );
this->AddChild( &m_ProTimingDisplay );
this->AddChild( &m_Combo );
@@ -160,8 +159,6 @@ void Player::Load( const NoteData& noteData )
/* Ensure that this is up-to-date. */
GAMESTATE->m_pPosition->Load(pn);
const Style* pStyle = GAMESTATE->GetCurrentStyle();
// init steps
m_NoteData.Init();
bool bOniDead = GAMESTATE->m_SongOptions.m_LifeType == SongOptions::LIFE_BATTERY &&
@@ -220,11 +217,6 @@ void Player::Load( const NoteData& noteData )
int iStartDrawingAtPixels = GAMESTATE->m_bEditing ? -100 : START_DRAWING_AT_PIXELS;
int iStopDrawingAtPixels = GAMESTATE->m_bEditing ? 400 : STOP_DRAWING_AT_PIXELS;
m_ArrowBackdrop.Unload();
CString BackdropName = g_NoteFieldMode[pn].m_Backdrop;
if( !BackdropName.empty() )
m_ArrowBackdrop.LoadFromAniDir( THEME->GetPathToB( BackdropName ) );
float fNoteFieldMiddle = (GRAY_ARROWS_Y_STANDARD+GRAY_ARROWS_Y_REVERSE)/2;
if( m_pNoteField )
@@ -232,7 +224,6 @@ void Player::Load( const NoteData& noteData )
m_fNoteFieldHeight = GRAY_ARROWS_Y_REVERSE-GRAY_ARROWS_Y_STANDARD;
if( m_pNoteField )
m_pNoteField->Load( &m_NoteData, m_pPlayerState, iStartDrawingAtPixels, iStopDrawingAtPixels, m_fNoteFieldHeight );
m_ArrowBackdrop.SetPlayer( pn );
const bool bReverse = GAMESTATE->m_pPlayerState[pn]->m_PlayerOptions.GetReversePercentForColumn(0) == 1;
bool bPlayerUsingBothSides = GAMESTATE->GetCurrentStyle()->m_StyleType==ONE_PLAYER_TWO_SIDES;
@@ -251,12 +242,6 @@ void Player::Load( const NoteData& noteData )
m_Combo.RunCommands( g_NoteFieldMode[pn].m_ComboCmd );
m_AttackDisplay.RunCommands( g_NoteFieldMode[pn].m_AttackDisplayCmd );
for( int c=0; c<pStyle->m_iColsPerPlayer; c++ )
{
NoteFieldMode &mode = g_NoteFieldMode[pn];
m_HoldJudgment[c].RunCommands( mode.m_HoldJudgmentCmd[c] );
}
// Need to set Y positions of all these elements in Update since
// they change depending on PlayerOptions.
@@ -317,10 +302,6 @@ void Player::Update( float fDeltaTime )
}
}
float fPercentReverse = m_pPlayerState->m_CurrentPlayerOptions.GetReversePercentForColumn(0);
float fGrayYPos = SCALE( fPercentReverse, 0.f, 1.f, GRAY_ARROWS_Y_STANDARD, GRAY_ARROWS_Y_REVERSE );
m_ArrowBackdrop.SetY( fGrayYPos );
// NoteField accounts for reverse on its own now.
//if( m_pNoteField )
// m_pNoteField->SetY( fGrayYPos );
@@ -563,7 +544,6 @@ void Player::DrawPrimitives()
// Draw these below everything else.
m_ArrowBackdrop.Draw();
if( m_pPlayerState->m_PlayerOptions.m_fBlind == 0 )
m_Combo.Draw();