remove some more old experimental stuff
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
#include "CommonMetrics.h"
|
||||
#include "Actor.h"
|
||||
#include "PlayerState.h"
|
||||
#include "Style.h"
|
||||
|
||||
#include <ctime>
|
||||
#include <set>
|
||||
@@ -41,7 +42,6 @@ GameState* GAMESTATE = NULL; // global and accessable from anywhere in our progr
|
||||
|
||||
GameState::GameState()
|
||||
{
|
||||
m_pPosition = NULL;
|
||||
m_pCurStyle = NULL;
|
||||
|
||||
m_pCurGame = NULL;
|
||||
@@ -71,7 +71,6 @@ GameState::GameState()
|
||||
|
||||
GameState::~GameState()
|
||||
{
|
||||
SAFE_DELETE( m_pPosition );
|
||||
for( unsigned i=0; i<m_pCharacters.size(); i++ )
|
||||
SAFE_DELETE( m_pCharacters[i] );
|
||||
|
||||
@@ -152,9 +151,6 @@ void GameState::Reset()
|
||||
FOREACH_PlayerNumber( p )
|
||||
m_pCurTrail[p] = NULL;
|
||||
|
||||
SAFE_DELETE( m_pPosition );
|
||||
m_pPosition = new NoteFieldPositioning("Positioning.ini");
|
||||
|
||||
FOREACH_PlayerNumber( p )
|
||||
m_pPlayerState[p]->Reset();
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ class Course;
|
||||
class Trail;
|
||||
class Game;
|
||||
class Style;
|
||||
class NoteFieldPositioning;
|
||||
class Character;
|
||||
class TimingData;
|
||||
struct StageStats;
|
||||
@@ -249,11 +248,6 @@ public:
|
||||
deque<PeakComboAward> m_vLastPeakComboAwards[NUM_PLAYERS];
|
||||
|
||||
|
||||
//
|
||||
// Arrow positioning
|
||||
//
|
||||
NoteFieldPositioning *m_pPosition;
|
||||
|
||||
//
|
||||
// Attract stuff
|
||||
//
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "NoteFieldPositioning.h"
|
||||
#include "Game.h"
|
||||
#include "PlayerState.h"
|
||||
#include "Style.h"
|
||||
|
||||
|
||||
GhostArrowRow::GhostArrowRow()
|
||||
@@ -108,13 +109,13 @@ void GhostArrowRow::DrawPrimitives()
|
||||
// TODO: Remove indexing by PlayerNumber.
|
||||
PlayerNumber pn = m_pPlayerState->m_PlayerNumber;
|
||||
|
||||
g_NoteFieldMode[pn].BeginDrawTrack(c);
|
||||
NoteFieldMode::BeginDrawTrack( pn, c );
|
||||
|
||||
m_GhostDim[c]->Draw();
|
||||
m_GhostBright[c]->Draw();
|
||||
m_HoldGhost[c]->Draw();
|
||||
|
||||
g_NoteFieldMode[pn].EndDrawTrack(c);
|
||||
NoteFieldMode::EndDrawTrack( c );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "song.h"
|
||||
#include "ScreenDimensions.h"
|
||||
#include "PlayerState.h"
|
||||
#include "Style.h"
|
||||
|
||||
NoteField::NoteField()
|
||||
{
|
||||
@@ -527,7 +528,7 @@ void NoteField::DrawPrimitives()
|
||||
{
|
||||
// TODO: Remove use of PlayerNumber.
|
||||
PlayerNumber pn = m_pPlayerState->m_PlayerNumber;
|
||||
g_NoteFieldMode[pn].BeginDrawTrack(c);
|
||||
NoteFieldMode::BeginDrawTrack( pn, c );
|
||||
|
||||
//
|
||||
// Draw all HoldNotes in this column (so that they appear under the tap notes)
|
||||
@@ -642,7 +643,7 @@ void NoteField::DrawPrimitives()
|
||||
}
|
||||
|
||||
|
||||
g_NoteFieldMode[pn].EndDrawTrack(c);
|
||||
NoteFieldMode::EndDrawTrack( c );
|
||||
}
|
||||
|
||||
cur->m_GhostArrowRow.Draw();
|
||||
|
||||
@@ -2,67 +2,29 @@
|
||||
#include "NoteFieldPositioning.h"
|
||||
|
||||
#include "RageDisplay.h"
|
||||
#include "RageUtil.h"
|
||||
#include "RageLog.h"
|
||||
#include "RageMath.h"
|
||||
|
||||
#include "GameState.h"
|
||||
#include "GameManager.h"
|
||||
#include "IniFile.h"
|
||||
#include "Game.h"
|
||||
#include "ScreenDimensions.h"
|
||||
#include "PlayerState.h"
|
||||
#include "XmlFile.h"
|
||||
#include "Style.h"
|
||||
|
||||
/* Copies of the current mode. Update this by calling Load. */
|
||||
NoteFieldMode g_NoteFieldMode[NUM_PLAYERS];
|
||||
|
||||
NoteFieldMode::NoteFieldMode()
|
||||
{
|
||||
}
|
||||
|
||||
void NoteFieldMode::BeginDrawTrack(int tn)
|
||||
void NoteFieldMode::BeginDrawTrack( PlayerNumber pn, int iTrack )
|
||||
{
|
||||
DISPLAY->CameraPushMatrix();
|
||||
|
||||
if(tn != -1)
|
||||
{
|
||||
DISPLAY->PushMatrix();
|
||||
DISPLAY->Translate( m_fPositionTrackX[tn], 0, 0 );
|
||||
}
|
||||
}
|
||||
ASSERT( iTrack != -1 );
|
||||
|
||||
void NoteFieldMode::EndDrawTrack(int tn)
|
||||
{
|
||||
if(tn != -1)
|
||||
DISPLAY->PopMatrix();
|
||||
|
||||
DISPLAY->CameraPopMatrix();
|
||||
}
|
||||
|
||||
NoteFieldPositioning::NoteFieldPositioning(CString fn)
|
||||
{
|
||||
}
|
||||
|
||||
bool NoteFieldMode::MatchesCurrentGame() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void NoteFieldPositioning::Load(PlayerNumber pn)
|
||||
{
|
||||
NoteFieldMode &mode = g_NoteFieldMode[pn];
|
||||
|
||||
mode = NoteFieldMode(); /* reset */
|
||||
DISPLAY->PushMatrix();
|
||||
|
||||
const Style *s = GAMESTATE->GetCurrentStyle();
|
||||
const float fPixelXOffsetFromCenter = s->m_ColumnInfo[pn][iTrack].fXOffset;
|
||||
DISPLAY->Translate( fPixelXOffsetFromCenter, 0, 0 );
|
||||
}
|
||||
|
||||
/* Load the settings in the style table by default. */
|
||||
for(int tn = 0; tn < MAX_NOTE_TRACKS; ++tn)
|
||||
{
|
||||
const float fPixelXOffsetFromCenter = s->m_ColumnInfo[pn][tn].fXOffset;
|
||||
mode.m_fPositionTrackX[tn] = fPixelXOffsetFromCenter;
|
||||
}
|
||||
void NoteFieldMode::EndDrawTrack( int iTrack )
|
||||
{
|
||||
ASSERT( iTrack != -1 );
|
||||
|
||||
DISPLAY->PopMatrix();
|
||||
DISPLAY->CameraPopMatrix();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -2,35 +2,13 @@
|
||||
#define NOTEFIELD_POSITIONING_H
|
||||
|
||||
#include "PlayerNumber.h"
|
||||
#include "Style.h"
|
||||
#include "Command.h"
|
||||
|
||||
class IniFile;
|
||||
struct XNode;
|
||||
|
||||
struct NoteFieldMode
|
||||
namespace NoteFieldMode
|
||||
{
|
||||
NoteFieldMode();
|
||||
bool MatchesCurrentGame() const;
|
||||
|
||||
void BeginDrawTrack(int tn);
|
||||
void EndDrawTrack(int tn);
|
||||
|
||||
float m_fPositionTrackX[MAX_NOTE_TRACKS];
|
||||
void BeginDrawTrack( PlayerNumber pn, int iTrack );
|
||||
void EndDrawTrack( int iTrack );
|
||||
};
|
||||
|
||||
class NoteFieldPositioning
|
||||
{
|
||||
public:
|
||||
NoteFieldPositioning(CString fn);
|
||||
void Load(PlayerNumber pn);
|
||||
|
||||
private:
|
||||
vector<NoteFieldMode> Modes;
|
||||
};
|
||||
|
||||
extern NoteFieldMode g_NoteFieldMode[NUM_PLAYERS];
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include "PlayerState.h"
|
||||
#include "GameplayMessages.h"
|
||||
#include "GameSoundManager.h"
|
||||
#include "Style.h"
|
||||
|
||||
ThemeMetric<float> GRAY_ARROWS_Y_STANDARD ("Player","ReceptorArrowsYStandard");
|
||||
ThemeMetric<float> GRAY_ARROWS_Y_REVERSE ("Player","ReceptorArrowsYReverse");
|
||||
@@ -156,9 +157,6 @@ void Player::Load( const NoteData& noteData )
|
||||
|
||||
GAMESTATE->ResetNoteSkinsForPlayer( pn );
|
||||
|
||||
/* Ensure that this is up-to-date. */
|
||||
GAMESTATE->m_pPosition->Load(pn);
|
||||
|
||||
// init steps
|
||||
m_NoteData.Init();
|
||||
bool bOniDead = GAMESTATE->m_SongOptions.m_LifeType == SongOptions::LIFE_BATTERY &&
|
||||
@@ -617,11 +615,11 @@ void Player::DrawHoldJudgments()
|
||||
|
||||
for( int c=0; c<m_NoteData.GetNumTracks(); c++ )
|
||||
{
|
||||
g_NoteFieldMode[pn].BeginDrawTrack(c);
|
||||
NoteFieldMode::BeginDrawTrack( pn, c );
|
||||
|
||||
m_HoldJudgment[c].Draw();
|
||||
|
||||
g_NoteFieldMode[pn].EndDrawTrack(c);
|
||||
NoteFieldMode::EndDrawTrack(c);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,13 +22,7 @@ bool ReceptorArrow::Load( CString NoteSkin, const PlayerState* pPlayerState, int
|
||||
m_pPlayerState = pPlayerState;
|
||||
m_iColNo = iColNo;
|
||||
|
||||
// TODO: Remove use of PlayerNumber.
|
||||
PlayerNumber pn = m_pPlayerState->m_PlayerNumber;
|
||||
|
||||
NoteFieldMode &mode = g_NoteFieldMode[pn];
|
||||
CString sButton = mode.GrayButtonNames[iColNo];
|
||||
if( sButton == "" )
|
||||
sButton = GAMESTATE->GetCurrentGame()->ColToButtonName( iColNo );
|
||||
CString sButton = GAMESTATE->GetCurrentGame()->ColToButtonName( iColNo );
|
||||
|
||||
CString sPath;
|
||||
m_pReceptorWaiting.Load( NOTESKIN->GetPathToFromNoteSkinAndButton(NoteSkin,sButton,"receptor waiting") );
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "PrefsManager.h"
|
||||
#include "NoteFieldPositioning.h"
|
||||
#include "PlayerState.h"
|
||||
#include "Style.h"
|
||||
|
||||
|
||||
ReceptorArrowRow::ReceptorArrowRow()
|
||||
@@ -58,9 +59,9 @@ void ReceptorArrowRow::DrawPrimitives()
|
||||
|
||||
for( int c=0; c<m_iNumCols; c++ )
|
||||
{
|
||||
g_NoteFieldMode[pn].BeginDrawTrack(c);
|
||||
NoteFieldMode::BeginDrawTrack( pn, c );
|
||||
m_ReceptorArrow[c].Draw();
|
||||
g_NoteFieldMode[pn].EndDrawTrack(c);
|
||||
NoteFieldMode::EndDrawTrack(c);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "ThemeMetric.h"
|
||||
#include "PlayerState.h"
|
||||
#include "ScreenTextEntry.h"
|
||||
#include "Style.h"
|
||||
|
||||
const float RECORD_HOLD_SECONDS = 0.3f;
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
#include "ThemeMetric.h"
|
||||
#include "PlayerState.h"
|
||||
#include "GameplayMessages.h"
|
||||
#include "Style.h"
|
||||
|
||||
//
|
||||
// Defines
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "Model.h"
|
||||
#include "ThemeMetric.h"
|
||||
#include "PlayerState.h"
|
||||
#include "Style.h"
|
||||
|
||||
static const ThemeMetric<float> SECONDS_TO_SHOW ("ScreenHowToPlay","SecondsToShow");
|
||||
static const ThemeMetric<CString> STEPFILE ("ScreenHowToPlay","Stepfile");
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "Game.h"
|
||||
#include "ScreenDimensions.h"
|
||||
#include "PlayerState.h"
|
||||
#include "Style.h"
|
||||
|
||||
|
||||
//
|
||||
@@ -178,9 +179,6 @@ ScreenNameEntry::ScreenNameEntry( CString sClassName ) : Screen( sClassName )
|
||||
|
||||
ASSERT( GAMESTATE->IsHumanPlayer(p) ); // they better be enabled if they made a high score!
|
||||
|
||||
/* Ensure that this is up-to-date. */
|
||||
GAMESTATE->m_pPosition->Load( (PlayerNumber)p );
|
||||
|
||||
float fPlayerX = PLAYER_X(p,GAMESTATE->GetCurrentStyle()->m_StyleType);
|
||||
|
||||
m_ReceptorArrowRow[p].Load( GAMESTATE->m_pPlayerState[p], GAMESTATE->m_pPlayerState[p]->m_PlayerOptions.m_sNoteSkin, 0 );
|
||||
|
||||
Reference in New Issue
Block a user