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