remove unused stuff
This commit is contained in:
@@ -30,27 +30,20 @@ void NoteFieldMode::BeginDrawTrack(int tn)
|
|||||||
/* It's useful to be able to use Actors like this, functioning only
|
/* It's useful to be able to use Actors like this, functioning only
|
||||||
* for a transformation. However, this is a big waste of matrix
|
* for a transformation. However, this is a big waste of matrix
|
||||||
* stack space, as each of these will push. Profile this. XXX */
|
* stack space, as each of these will push. Profile this. XXX */
|
||||||
m_Center.BeginDraw();
|
|
||||||
if(tn != -1)
|
|
||||||
m_CenterTrack[tn].BeginDraw();
|
|
||||||
|
|
||||||
if(m_fFov)
|
if(m_fFov)
|
||||||
DISPLAY->LoadMenuPerspective(m_fFov, CENTER_X, CENTER_Y);
|
DISPLAY->LoadMenuPerspective(m_fFov, CENTER_X, CENTER_Y);
|
||||||
|
|
||||||
m_Position.BeginDraw();
|
|
||||||
if(tn != -1)
|
if(tn != -1)
|
||||||
m_PositionTrack[tn].BeginDraw();
|
{
|
||||||
|
DISPLAY->PushMatrix();
|
||||||
|
DISPLAY->Translate( m_fPositionTrackX[tn], 0, 0 );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void NoteFieldMode::EndDrawTrack(int tn)
|
void NoteFieldMode::EndDrawTrack(int tn)
|
||||||
{
|
{
|
||||||
if(tn != -1)
|
if(tn != -1)
|
||||||
m_PositionTrack[tn].EndDraw();
|
DISPLAY->PopMatrix();
|
||||||
m_Position.EndDraw();
|
|
||||||
|
|
||||||
if(tn != -1)
|
|
||||||
m_CenterTrack[tn].EndDraw();
|
|
||||||
m_Center.EndDraw();
|
|
||||||
|
|
||||||
DISPLAY->CameraPopMatrix();
|
DISPLAY->CameraPopMatrix();
|
||||||
}
|
}
|
||||||
@@ -64,17 +57,6 @@ static bool GetValue(IniFile &ini, int pn,
|
|||||||
return ini.GetValue(key, valuename, value);
|
return ini.GetValue(key, valuename, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool GetValue(IniFile &ini, int pn,
|
|
||||||
const CString &key, const CString &valuename, Actor &value )
|
|
||||||
{
|
|
||||||
CString str;
|
|
||||||
if(!GetValue(ini, pn, key, valuename, str))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
value.Command(str);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void NoteFieldMode::Load(IniFile &ini, CString id, int pn)
|
void NoteFieldMode::Load(IniFile &ini, CString id, int pn)
|
||||||
{
|
{
|
||||||
m_Id = id;
|
m_Id = id;
|
||||||
@@ -82,27 +64,6 @@ void NoteFieldMode::Load(IniFile &ini, CString id, int pn)
|
|||||||
/* Required: */
|
/* Required: */
|
||||||
ASSERT( ini.GetValue ( id, "Name", m_Name ) );
|
ASSERT( ini.GetValue ( id, "Name", m_Name ) );
|
||||||
|
|
||||||
/* Grab this directly; don't try to set game specs per-player. */
|
|
||||||
CString sGames;
|
|
||||||
if(ini.GetValue( id, "Games", sGames ))
|
|
||||||
{
|
|
||||||
vector<CString> games;
|
|
||||||
split(sGames, ",", games);
|
|
||||||
for(unsigned n = 0; n < games.size(); ++n)
|
|
||||||
{
|
|
||||||
vector<CString> bits;
|
|
||||||
split(games[n], "-", bits);
|
|
||||||
ASSERT(bits.size() == 2);
|
|
||||||
|
|
||||||
const Game* pGame = GAMEMAN->StringToGameType( bits[0] );
|
|
||||||
ASSERT(pGame != NULL);
|
|
||||||
|
|
||||||
const Style *style = GAMEMAN->GameAndStringToStyle( pGame, bits[1] );
|
|
||||||
ASSERT(style != NULL);
|
|
||||||
Styles.insert(style);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// if we aren't loading a player, we can bail here.
|
// if we aren't loading a player, we can bail here.
|
||||||
if(pn == -1)
|
if(pn == -1)
|
||||||
return;
|
return;
|
||||||
@@ -114,8 +75,6 @@ void NoteFieldMode::Load(IniFile &ini, CString id, int pn)
|
|||||||
GetValue( ini, pn, id, "PixelsDrawAheadScale", m_fFirstPixelToDrawScale );
|
GetValue( ini, pn, id, "PixelsDrawAheadScale", m_fFirstPixelToDrawScale );
|
||||||
GetValue( ini, pn, id, "PixelsDrawBehindScale", m_fLastPixelToDrawScale );
|
GetValue( ini, pn, id, "PixelsDrawBehindScale", m_fLastPixelToDrawScale );
|
||||||
|
|
||||||
GetValue( ini, pn, id, "Center", m_Center );
|
|
||||||
GetValue( ini, pn, id, "Position", m_Position );
|
|
||||||
GetValue( ini, pn, id, "Judgment", m_JudgmentCmd );
|
GetValue( ini, pn, id, "Judgment", m_JudgmentCmd );
|
||||||
GetValue( ini, pn, id, "Combo", m_ComboCmd );
|
GetValue( ini, pn, id, "Combo", m_ComboCmd );
|
||||||
|
|
||||||
@@ -123,9 +82,6 @@ void NoteFieldMode::Load(IniFile &ini, CString id, int pn)
|
|||||||
int t;
|
int t;
|
||||||
for(t = 0; t < MAX_NOTE_TRACKS; ++t)
|
for(t = 0; t < MAX_NOTE_TRACKS; ++t)
|
||||||
{
|
{
|
||||||
GetValue( ini, pn, id, ssprintf("Center%i", t+1), m_CenterTrack[t] );
|
|
||||||
GetValue( ini, pn, id, ssprintf("Position%i", t+1), m_PositionTrack[t] );
|
|
||||||
|
|
||||||
GetValue( ini, pn, id, ssprintf("GrayButton"), GrayButtonNames[t] );
|
GetValue( ini, pn, id, ssprintf("GrayButton"), GrayButtonNames[t] );
|
||||||
GetValue( ini, pn, id, ssprintf("GrayButton%i", t+1), GrayButtonNames[t] );
|
GetValue( ini, pn, id, ssprintf("GrayButton%i", t+1), GrayButtonNames[t] );
|
||||||
|
|
||||||
@@ -158,12 +114,6 @@ NoteFieldPositioning::NoteFieldPositioning(CString fn)
|
|||||||
|
|
||||||
bool NoteFieldMode::MatchesCurrentGame() const
|
bool NoteFieldMode::MatchesCurrentGame() const
|
||||||
{
|
{
|
||||||
if(Styles.empty())
|
|
||||||
return true;
|
|
||||||
|
|
||||||
if(Styles.find(GAMESTATE->m_pCurStyle) == Styles.end())
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -179,7 +129,7 @@ void NoteFieldPositioning::Load(PlayerNumber pn)
|
|||||||
for(int tn = 0; tn < MAX_NOTE_TRACKS; ++tn)
|
for(int tn = 0; tn < MAX_NOTE_TRACKS; ++tn)
|
||||||
{
|
{
|
||||||
const float fPixelXOffsetFromCenter = s->m_ColumnInfo[pn][tn].fXOffset;
|
const float fPixelXOffsetFromCenter = s->m_ColumnInfo[pn][tn].fXOffset;
|
||||||
mode.m_PositionTrack[tn].SetX(fPixelXOffsetFromCenter);
|
mode.m_fPositionTrackX[tn] = fPixelXOffsetFromCenter;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Is there a custom mode with the current name that fits the current game? */
|
/* Is there a custom mode with the current name that fits the current game? */
|
||||||
|
|||||||
@@ -3,10 +3,6 @@
|
|||||||
|
|
||||||
#include "PlayerNumber.h"
|
#include "PlayerNumber.h"
|
||||||
#include "Style.h"
|
#include "Style.h"
|
||||||
#include "PlayerNumber.h"
|
|
||||||
#include "Actor.h"
|
|
||||||
|
|
||||||
#include <set>
|
|
||||||
|
|
||||||
class IniFile;
|
class IniFile;
|
||||||
|
|
||||||
@@ -25,20 +21,13 @@ struct NoteFieldMode
|
|||||||
/* Unique ID from the INI. */
|
/* Unique ID from the INI. */
|
||||||
CString m_Id;
|
CString m_Id;
|
||||||
|
|
||||||
/* Styles that this is valid for; empty means all. */
|
|
||||||
set<const Style*> Styles;
|
|
||||||
|
|
||||||
Actor m_Center;
|
|
||||||
Actor m_CenterTrack[MAX_NOTE_TRACKS];
|
|
||||||
|
|
||||||
CString GrayButtonNames[MAX_NOTE_TRACKS];
|
CString GrayButtonNames[MAX_NOTE_TRACKS];
|
||||||
CString NoteButtonNames[MAX_NOTE_TRACKS];
|
CString NoteButtonNames[MAX_NOTE_TRACKS];
|
||||||
CString GhostButtonNames[MAX_NOTE_TRACKS];
|
CString GhostButtonNames[MAX_NOTE_TRACKS];
|
||||||
|
|
||||||
/* 0 = no perspective */
|
/* 0 = no perspective */
|
||||||
float m_fFov, m_fNear, m_fFar;
|
float m_fFov, m_fNear, m_fFar;
|
||||||
Actor m_Position;
|
float m_fPositionTrackX[MAX_NOTE_TRACKS];
|
||||||
Actor m_PositionTrack[MAX_NOTE_TRACKS];
|
|
||||||
|
|
||||||
float m_fFirstPixelToDrawScale, m_fLastPixelToDrawScale;
|
float m_fFirstPixelToDrawScale, m_fLastPixelToDrawScale;
|
||||||
CString m_Backdrop;
|
CString m_Backdrop;
|
||||||
|
|||||||
Reference in New Issue
Block a user