Add NoteFieldPositioning to GameState.
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include "Notes.h"
|
||||
#include "NoteSkinManager.h"
|
||||
#include "ModeChoice.h"
|
||||
#include "NoteFieldPositioning.h"
|
||||
|
||||
|
||||
GameState* GAMESTATE = NULL; // global and accessable from anywhere in our program
|
||||
@@ -41,6 +42,8 @@ GameState::GameState()
|
||||
|
||||
GameState::~GameState()
|
||||
{
|
||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||
delete m_Position[p];
|
||||
}
|
||||
|
||||
void GameState::Reset()
|
||||
@@ -84,12 +87,19 @@ void GameState::Reset()
|
||||
m_SongOptions.Init();
|
||||
for( p=0; p<NUM_PLAYERS; p++ )
|
||||
NOTESKIN->SwitchNoteSkin( PlayerNumber(p), PREFSMAN->m_sDefaultNoteSkin );
|
||||
|
||||
for( p=0; p<NUM_PLAYERS; p++ )
|
||||
m_Position[p] = new NoteFieldPositioning;
|
||||
}
|
||||
|
||||
void GameState::Update( float fDelta )
|
||||
{
|
||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||
int p;
|
||||
for( p=0; p<NUM_PLAYERS; p++ )
|
||||
m_CurrentPlayerOptions[p].Approach( m_PlayerOptions[p], fDelta );
|
||||
|
||||
for( p=0; p<NUM_PLAYERS; p++ )
|
||||
if(m_Position[p]) m_Position[p]->Update(fDelta);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ class Course;
|
||||
class GameDef;
|
||||
class StyleDef;
|
||||
struct ModeChoice;
|
||||
class NoteFieldPositioning;
|
||||
|
||||
|
||||
class GameState
|
||||
@@ -150,6 +151,11 @@ public:
|
||||
RankingCategory m_RankingCategory[NUM_PLAYERS]; // meaningless if a course was played
|
||||
Course* m_pRankingCourse; // meaningless unless Course was played
|
||||
int m_iRankingIndex[NUM_PLAYERS]; // -1 if no new high score
|
||||
|
||||
//
|
||||
// Arrow positioning
|
||||
//
|
||||
NoteFieldPositioning *m_Position[NUM_PLAYERS];
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user