Add NoteFieldPositioning to GameState.

This commit is contained in:
Glenn Maynard
2003-04-02 21:57:05 +00:00
parent 6192f3da1d
commit 58c80f3177
2 changed files with 17 additions and 1 deletions
+11 -1
View File
@@ -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);
}
+6
View File
@@ -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];
};