From f4391c932b5928b22da8aec59a8518332a018b48 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 15 Jan 2005 01:35:58 +0000 Subject: [PATCH] remove some old experimental stuff --- stepmania/src/GhostArrowRow.cpp | 5 +---- stepmania/src/NoteDisplay.cpp | 8 +------ stepmania/src/NoteFieldPositioning.cpp | 29 -------------------------- stepmania/src/NoteFieldPositioning.h | 8 ------- stepmania/src/Player.cpp | 20 ------------------ 5 files changed, 2 insertions(+), 68 deletions(-) diff --git a/stepmania/src/GhostArrowRow.cpp b/stepmania/src/GhostArrowRow.cpp index bb6847ca69..56bd7adce5 100644 --- a/stepmania/src/GhostArrowRow.cpp +++ b/stepmania/src/GhostArrowRow.cpp @@ -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 ); diff --git a/stepmania/src/NoteDisplay.cpp b/stepmania/src/NoteDisplay.cpp index 0c87441134..38710ff185 100644 --- a/stepmania/src/NoteDisplay.cpp +++ b/stepmania/src/NoteDisplay.cpp @@ -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 ); diff --git a/stepmania/src/NoteFieldPositioning.cpp b/stepmania/src/NoteFieldPositioning.cpp index da6b61810e..7a36e211c9 100644 --- a/stepmania/src/NoteFieldPositioning.cpp +++ b/stepmania/src/NoteFieldPositioning.cpp @@ -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) diff --git a/stepmania/src/NoteFieldPositioning.h b/stepmania/src/NoteFieldPositioning.h index eb52187b7e..7067b1797f 100644 --- a/stepmania/src/NoteFieldPositioning.h +++ b/stepmania/src/NoteFieldPositioning.h @@ -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 diff --git a/stepmania/src/Player.cpp b/stepmania/src/Player.cpp index f5436b2253..ce866c1f50 100644 --- a/stepmania/src/Player.cpp +++ b/stepmania/src/Player.cpp @@ -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; cm_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();