remove some old experimental stuff
This commit is contained in:
@@ -33,10 +33,7 @@ void GhostArrowRow::Load( const PlayerState* pPlayerState, CString NoteSkin, flo
|
|||||||
{
|
{
|
||||||
// TODO: Remove indexing by PlayerNumber;
|
// TODO: Remove indexing by PlayerNumber;
|
||||||
PlayerNumber pn = pPlayerState->m_PlayerNumber;
|
PlayerNumber pn = pPlayerState->m_PlayerNumber;
|
||||||
NoteFieldMode &mode = g_NoteFieldMode[pn];
|
CString Button = GAMESTATE->GetCurrentGame()->ColToButtonName( c );
|
||||||
CString Button = mode.GhostButtonNames[c];
|
|
||||||
if( Button == "" )
|
|
||||||
Button = GAMESTATE->GetCurrentGame()->ColToButtonName( c );
|
|
||||||
|
|
||||||
m_GhostDim.push_back( new GhostArrow );
|
m_GhostDim.push_back( new GhostArrow );
|
||||||
m_GhostBright.push_back( new GhostArrow );
|
m_GhostBright.push_back( new GhostArrow );
|
||||||
|
|||||||
@@ -230,13 +230,7 @@ void NoteDisplay::Load( int iColNum, const PlayerState* pPlayerState, CString No
|
|||||||
m_pPlayerState = pPlayerState;
|
m_pPlayerState = pPlayerState;
|
||||||
m_fYReverseOffsetPixels = fYReverseOffsetPixels;
|
m_fYReverseOffsetPixels = fYReverseOffsetPixels;
|
||||||
|
|
||||||
/* Normally, this is empty and we use the style table entry via ColToButtonName. */
|
CString Button = GAMESTATE->GetCurrentGame()->ColToButtonName( iColNum );
|
||||||
// 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 );
|
|
||||||
|
|
||||||
cache->Load( NoteSkin, Button );
|
cache->Load( NoteSkin, Button );
|
||||||
|
|
||||||
|
|||||||
@@ -19,9 +19,6 @@ NoteFieldMode g_NoteFieldMode[NUM_PLAYERS];
|
|||||||
|
|
||||||
NoteFieldMode::NoteFieldMode()
|
NoteFieldMode::NoteFieldMode()
|
||||||
{
|
{
|
||||||
m_fFov = 0;
|
|
||||||
m_fNear = 5;
|
|
||||||
m_fFar = 1000;
|
|
||||||
m_fFirstPixelToDrawScale = m_fLastPixelToDrawScale = 1.0f;
|
m_fFirstPixelToDrawScale = m_fLastPixelToDrawScale = 1.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -29,12 +26,6 @@ void NoteFieldMode::BeginDrawTrack(int tn)
|
|||||||
{
|
{
|
||||||
DISPLAY->CameraPushMatrix();
|
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)
|
if(tn != -1)
|
||||||
{
|
{
|
||||||
DISPLAY->PushMatrix();
|
DISPLAY->PushMatrix();
|
||||||
@@ -69,32 +60,12 @@ void NoteFieldMode::Load(const XNode *pNode, int pn)
|
|||||||
if(pn == -1)
|
if(pn == -1)
|
||||||
return;
|
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, "PixelsDrawAheadScale", m_fFirstPixelToDrawScale );
|
||||||
GetValue( pNode, pn, "PixelsDrawBehindScale", m_fLastPixelToDrawScale );
|
GetValue( pNode, pn, "PixelsDrawBehindScale", m_fLastPixelToDrawScale );
|
||||||
|
|
||||||
CString s;
|
CString s;
|
||||||
if( GetValue( pNode, pn, "Judgment", s ) ) m_JudgmentCmd = ParseCommands(s);
|
if( GetValue( pNode, pn, "Judgment", s ) ) m_JudgmentCmd = ParseCommands(s);
|
||||||
if( GetValue( pNode, pn, "Combo", s ) ) m_ComboCmd = 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)
|
NoteFieldPositioning::NoteFieldPositioning(CString fn)
|
||||||
|
|||||||
@@ -23,19 +23,11 @@ struct NoteFieldMode
|
|||||||
/* Unique ID from the INI. */
|
/* Unique ID from the INI. */
|
||||||
CString m_Id;
|
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_fPositionTrackX[MAX_NOTE_TRACKS];
|
||||||
|
|
||||||
float m_fFirstPixelToDrawScale, m_fLastPixelToDrawScale;
|
float m_fFirstPixelToDrawScale, m_fLastPixelToDrawScale;
|
||||||
CString m_Backdrop;
|
|
||||||
|
|
||||||
Commands m_JudgmentCmd, m_ComboCmd, m_AttackDisplayCmd;
|
Commands m_JudgmentCmd, m_ComboCmd, m_AttackDisplayCmd;
|
||||||
Commands m_HoldJudgmentCmd[MAX_NOTE_TRACKS];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class NoteFieldPositioning
|
class NoteFieldPositioning
|
||||||
|
|||||||
@@ -76,7 +76,6 @@ Player::Player()
|
|||||||
|
|
||||||
m_iOffsetSample = 0;
|
m_iOffsetSample = 0;
|
||||||
|
|
||||||
this->AddChild( &m_ArrowBackdrop );
|
|
||||||
this->AddChild( &m_Judgment );
|
this->AddChild( &m_Judgment );
|
||||||
this->AddChild( &m_ProTimingDisplay );
|
this->AddChild( &m_ProTimingDisplay );
|
||||||
this->AddChild( &m_Combo );
|
this->AddChild( &m_Combo );
|
||||||
@@ -160,8 +159,6 @@ void Player::Load( const NoteData& noteData )
|
|||||||
/* Ensure that this is up-to-date. */
|
/* Ensure that this is up-to-date. */
|
||||||
GAMESTATE->m_pPosition->Load(pn);
|
GAMESTATE->m_pPosition->Load(pn);
|
||||||
|
|
||||||
const Style* pStyle = GAMESTATE->GetCurrentStyle();
|
|
||||||
|
|
||||||
// init steps
|
// init steps
|
||||||
m_NoteData.Init();
|
m_NoteData.Init();
|
||||||
bool bOniDead = GAMESTATE->m_SongOptions.m_LifeType == SongOptions::LIFE_BATTERY &&
|
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 iStartDrawingAtPixels = GAMESTATE->m_bEditing ? -100 : START_DRAWING_AT_PIXELS;
|
||||||
int iStopDrawingAtPixels = GAMESTATE->m_bEditing ? 400 : STOP_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;
|
float fNoteFieldMiddle = (GRAY_ARROWS_Y_STANDARD+GRAY_ARROWS_Y_REVERSE)/2;
|
||||||
|
|
||||||
if( m_pNoteField )
|
if( m_pNoteField )
|
||||||
@@ -232,7 +224,6 @@ void Player::Load( const NoteData& noteData )
|
|||||||
m_fNoteFieldHeight = GRAY_ARROWS_Y_REVERSE-GRAY_ARROWS_Y_STANDARD;
|
m_fNoteFieldHeight = GRAY_ARROWS_Y_REVERSE-GRAY_ARROWS_Y_STANDARD;
|
||||||
if( m_pNoteField )
|
if( m_pNoteField )
|
||||||
m_pNoteField->Load( &m_NoteData, m_pPlayerState, iStartDrawingAtPixels, iStopDrawingAtPixels, m_fNoteFieldHeight );
|
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;
|
const bool bReverse = GAMESTATE->m_pPlayerState[pn]->m_PlayerOptions.GetReversePercentForColumn(0) == 1;
|
||||||
bool bPlayerUsingBothSides = GAMESTATE->GetCurrentStyle()->m_StyleType==ONE_PLAYER_TWO_SIDES;
|
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_Combo.RunCommands( g_NoteFieldMode[pn].m_ComboCmd );
|
||||||
m_AttackDisplay.RunCommands( g_NoteFieldMode[pn].m_AttackDisplayCmd );
|
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
|
// Need to set Y positions of all these elements in Update since
|
||||||
// they change depending on PlayerOptions.
|
// 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.
|
// NoteField accounts for reverse on its own now.
|
||||||
//if( m_pNoteField )
|
//if( m_pNoteField )
|
||||||
// m_pNoteField->SetY( fGrayYPos );
|
// m_pNoteField->SetY( fGrayYPos );
|
||||||
@@ -563,7 +544,6 @@ void Player::DrawPrimitives()
|
|||||||
|
|
||||||
|
|
||||||
// Draw these below everything else.
|
// Draw these below everything else.
|
||||||
m_ArrowBackdrop.Draw();
|
|
||||||
if( m_pPlayerState->m_PlayerOptions.m_fBlind == 0 )
|
if( m_pPlayerState->m_PlayerOptions.m_fBlind == 0 )
|
||||||
m_Combo.Draw();
|
m_Combo.Draw();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user