Couples stuff. Not complete, but functional; more coming and this
stuff needs testing.
This commit is contained in:
@@ -140,8 +140,10 @@ Notes* Course::GetNotesForStage( int iStage )
|
|||||||
for( int i=0; i<pSong->m_apNotes.GetSize(); i++ )
|
for( int i=0; i<pSong->m_apNotes.GetSize(); i++ )
|
||||||
{
|
{
|
||||||
Notes* pNotes = pSong->m_apNotes[i];
|
Notes* pNotes = pSong->m_apNotes[i];
|
||||||
|
/* XXX: hmm. We need to match the first player, then set up other players
|
||||||
|
* later ... */
|
||||||
if( 0==stricmp(pNotes->m_sDescription, sDescription) &&
|
if( 0==stricmp(pNotes->m_sDescription, sDescription) &&
|
||||||
pNotes->m_NotesType == GAMESTATE->GetCurrentStyleDef()->m_NotesType )
|
GAMESTATE->GetCurrentStyleDef()->MatchesNotesType(pNotes->m_NotesType, 0) )
|
||||||
return pNotes;
|
return pNotes;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -152,7 +154,8 @@ Notes* Course::GetNotesForStage( int iStage )
|
|||||||
for( i=0; i<pSong->m_apNotes.GetSize(); i++ )
|
for( i=0; i<pSong->m_apNotes.GetSize(); i++ )
|
||||||
{
|
{
|
||||||
Notes* pNotes = pSong->m_apNotes[i];
|
Notes* pNotes = pSong->m_apNotes[i];
|
||||||
if( pNotes->m_DifficultyClass == dc && pNotes->m_NotesType == GAMESTATE->GetCurrentStyleDef()->m_NotesType )
|
if( pNotes->m_DifficultyClass == dc &&
|
||||||
|
GAMESTATE->GetCurrentStyleDef()->MatchesNotesType(pNotes->m_NotesType, 0) )
|
||||||
return pNotes;
|
return pNotes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -298,8 +298,9 @@ StyleDef g_StyleDefs[NUM_STYLES] =
|
|||||||
GAME_DANCE, // m_Game
|
GAME_DANCE, // m_Game
|
||||||
true, // m_bUsedForGameplay
|
true, // m_bUsedForGameplay
|
||||||
true, // m_bUsedForEdit
|
true, // m_bUsedForEdit
|
||||||
"Single", // m_szName
|
"DDR Single", // m_szName
|
||||||
NOTES_TYPE_DANCE_SINGLE, // m_NotesType
|
{ NOTES_TYPE_DANCE_SINGLE,NOTES_TYPE_DANCE_SINGLE }, // m_NotesTypes
|
||||||
|
NOTES_TYPE_INVALID, // m_FallbackNotesType
|
||||||
StyleDef::ONE_PLAYER_ONE_CREDIT, // m_StyleType
|
StyleDef::ONE_PLAYER_ONE_CREDIT, // m_StyleType
|
||||||
{ 160, 480 }, // m_iCenterX
|
{ 160, 480 }, // m_iCenterX
|
||||||
4, // m_iColsPerPlayer
|
4, // m_iColsPerPlayer
|
||||||
@@ -325,8 +326,9 @@ StyleDef g_StyleDefs[NUM_STYLES] =
|
|||||||
GAME_DANCE, // m_Game
|
GAME_DANCE, // m_Game
|
||||||
true, // m_bUsedForGameplay
|
true, // m_bUsedForGameplay
|
||||||
false, // m_bUsedForEdit
|
false, // m_bUsedForEdit
|
||||||
"Versus", // m_szName
|
"DDR Versus", // m_szName
|
||||||
NOTES_TYPE_DANCE_SINGLE, // m_NotesType
|
{ NOTES_TYPE_DANCE_SINGLE,NOTES_TYPE_DANCE_SINGLE }, // m_NotesTypes
|
||||||
|
NOTES_TYPE_INVALID, // m_FallbackNotesType
|
||||||
StyleDef::TWO_PLAYERS_TWO_CREDITS, // m_StyleType
|
StyleDef::TWO_PLAYERS_TWO_CREDITS, // m_StyleType
|
||||||
{ 160, 480 }, // m_iCenterX
|
{ 160, 480 }, // m_iCenterX
|
||||||
4, // m_iColsPerPlayer
|
4, // m_iColsPerPlayer
|
||||||
@@ -352,8 +354,9 @@ StyleDef g_StyleDefs[NUM_STYLES] =
|
|||||||
GAME_DANCE, // m_Game
|
GAME_DANCE, // m_Game
|
||||||
true, // m_bUsedForGameplay
|
true, // m_bUsedForGameplay
|
||||||
true, // m_bUsedForEdit
|
true, // m_bUsedForEdit
|
||||||
"Double", // m_szName
|
"DDR Double", // m_szName
|
||||||
NOTES_TYPE_DANCE_DOUBLE, // m_NotesType
|
{ NOTES_TYPE_DANCE_DOUBLE,NOTES_TYPE_DANCE_DOUBLE }, // m_NotesTypes
|
||||||
|
NOTES_TYPE_INVALID,
|
||||||
StyleDef::ONE_PLAYER_TWO_CREDITS, // m_StyleType
|
StyleDef::ONE_PLAYER_TWO_CREDITS, // m_StyleType
|
||||||
{ 320, 320 }, // m_iCenterX
|
{ 320, 320 }, // m_iCenterX
|
||||||
8, // m_iColsPerPlayer
|
8, // m_iColsPerPlayer
|
||||||
@@ -387,8 +390,9 @@ StyleDef g_StyleDefs[NUM_STYLES] =
|
|||||||
GAME_DANCE, // m_Game
|
GAME_DANCE, // m_Game
|
||||||
true, // m_bUsedForGameplay
|
true, // m_bUsedForGameplay
|
||||||
false, // m_bUsedForEdit
|
false, // m_bUsedForEdit
|
||||||
"Couple", // m_szName
|
"DDR Couple", // m_szName
|
||||||
NOTES_TYPE_DANCE_COUPLE, // m_NotesType
|
{ NOTES_TYPE_DANCE_COUPLE, NOTES_TYPE_DANCE_COUPLE }, // m_NotesTypes
|
||||||
|
NOTES_TYPE_INVALID, // m_FallbackNotesType
|
||||||
StyleDef::TWO_PLAYERS_TWO_CREDITS, // m_StyleType
|
StyleDef::TWO_PLAYERS_TWO_CREDITS, // m_StyleType
|
||||||
{ 160, 480 }, // m_iCenterX
|
{ 160, 480 }, // m_iCenterX
|
||||||
4, // m_iColsPerPlayer
|
4, // m_iColsPerPlayer
|
||||||
@@ -414,8 +418,9 @@ StyleDef g_StyleDefs[NUM_STYLES] =
|
|||||||
GAME_DANCE, // m_Game
|
GAME_DANCE, // m_Game
|
||||||
true, // m_bUsedForGameplay
|
true, // m_bUsedForGameplay
|
||||||
true, // m_bUsedForEdit
|
true, // m_bUsedForEdit
|
||||||
"Solo", // m_szName
|
"DDR Solo", // m_szName
|
||||||
NOTES_TYPE_DANCE_SOLO, // m_NotesType
|
{ NOTES_TYPE_DANCE_SOLO,NOTES_TYPE_DANCE_SOLO }, // m_NotesTypes
|
||||||
|
NOTES_TYPE_INVALID, // m_FallbackNotesType
|
||||||
StyleDef::ONE_PLAYER_ONE_CREDIT, // m_StyleType
|
StyleDef::ONE_PLAYER_ONE_CREDIT, // m_StyleType
|
||||||
{ 320, 320 }, // m_iCenterX
|
{ 320, 320 }, // m_iCenterX
|
||||||
6, // m_iColsPerPlayer
|
6, // m_iColsPerPlayer
|
||||||
@@ -441,12 +446,13 @@ StyleDef g_StyleDefs[NUM_STYLES] =
|
|||||||
0,1,2,3,4,5
|
0,1,2,3,4,5
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{ // STYLE_DANCE_DOUBLE
|
{ // STYLE_DANCE_COUPLE
|
||||||
GAME_DANCE, // m_Game
|
GAME_DANCE, // m_Game
|
||||||
false, // m_bUsedForGameplay
|
false, // m_bUsedForGameplay
|
||||||
true, // m_bUsedForEdit
|
true, // m_bUsedForEdit
|
||||||
"EditCouple", // m_szName
|
"DDR Couple", // m_szName
|
||||||
NOTES_TYPE_DANCE_COUPLE, // m_NotesType
|
{ NOTES_TYPE_DANCE_COUPLE, NOTES_TYPE_DANCE_COUPLE }, // m_NotesTypes
|
||||||
|
NOTES_TYPE_INVALID, // m_FallbackNotesType
|
||||||
StyleDef::ONE_PLAYER_TWO_CREDITS, // m_StyleType
|
StyleDef::ONE_PLAYER_TWO_CREDITS, // m_StyleType
|
||||||
{ 320, 320 }, // m_iCenterX
|
{ 320, 320 }, // m_iCenterX
|
||||||
8, // m_iColsPerPlayer
|
8, // m_iColsPerPlayer
|
||||||
@@ -508,8 +514,9 @@ StyleDef g_StyleDefs[NUM_STYLES] =
|
|||||||
GAME_PUMP, // m_Game
|
GAME_PUMP, // m_Game
|
||||||
true, // m_bUsedForGameplay
|
true, // m_bUsedForGameplay
|
||||||
true, // m_bUsedForEdit
|
true, // m_bUsedForEdit
|
||||||
"Single", // m_szName
|
"Pump Single", // m_szName
|
||||||
NOTES_TYPE_PUMP_SINGLE, // m_NotesType
|
{ NOTES_TYPE_PUMP_SINGLE,NOTES_TYPE_PUMP_SINGLE }, // m_NotesTypes
|
||||||
|
NOTES_TYPE_INVALID, // m_FallbackNotesType
|
||||||
StyleDef::ONE_PLAYER_ONE_CREDIT, // m_StyleType
|
StyleDef::ONE_PLAYER_ONE_CREDIT, // m_StyleType
|
||||||
{ 160, 480 }, // m_iCenterX
|
{ 160, 480 }, // m_iCenterX
|
||||||
5, // m_iColsPerPlayer
|
5, // m_iColsPerPlayer
|
||||||
@@ -537,9 +544,10 @@ StyleDef g_StyleDefs[NUM_STYLES] =
|
|||||||
GAME_PUMP, // m_Game
|
GAME_PUMP, // m_Game
|
||||||
true, // m_bUsedForGameplay
|
true, // m_bUsedForGameplay
|
||||||
false, // m_bUsedForEdit
|
false, // m_bUsedForEdit
|
||||||
"Versus", // m_szName
|
"Pump Versus", // m_szName
|
||||||
NOTES_TYPE_PUMP_SINGLE, // m_NotesType
|
{ NOTES_TYPE_PUMP_SINGLE,NOTES_TYPE_PUMP_SINGLE }, // m_NotesTypes
|
||||||
StyleDef::TWO_PLAYERS_TWO_CREDITS, // m_StyleType
|
NOTES_TYPE_INVALID, // m_FallbackNotesType
|
||||||
|
StyleDef::TWO_PLAYERS_TWO_CREDITS, // m_StyleType
|
||||||
{ 160, 480 }, // m_iCenterX
|
{ 160, 480 }, // m_iCenterX
|
||||||
5, // m_iColsPerPlayer
|
5, // m_iColsPerPlayer
|
||||||
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
|
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
|
||||||
@@ -566,9 +574,10 @@ StyleDef g_StyleDefs[NUM_STYLES] =
|
|||||||
GAME_PUMP, // m_Game
|
GAME_PUMP, // m_Game
|
||||||
true, // m_bUsedForGameplay
|
true, // m_bUsedForGameplay
|
||||||
true, // m_bUsedForEdit
|
true, // m_bUsedForEdit
|
||||||
"Double", // m_szName
|
"Pump Double", // m_szName
|
||||||
NOTES_TYPE_PUMP_DOUBLE, // m_NotesType
|
{ NOTES_TYPE_PUMP_DOUBLE,NOTES_TYPE_PUMP_DOUBLE }, // m_NotesTypes
|
||||||
StyleDef::ONE_PLAYER_TWO_CREDITS, // m_StyleType
|
NOTES_TYPE_INVALID, // m_FallbackNotesType
|
||||||
|
StyleDef::ONE_PLAYER_TWO_CREDITS, // m_StyleType
|
||||||
{ 320, 480 }, // m_iCenterX
|
{ 320, 480 }, // m_iCenterX
|
||||||
10, // m_iColsPerPlayer
|
10, // m_iColsPerPlayer
|
||||||
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
|
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
|
||||||
@@ -606,8 +615,8 @@ StyleDef g_StyleDefs[NUM_STYLES] =
|
|||||||
true, // m_bUsedForGameplay
|
true, // m_bUsedForGameplay
|
||||||
false, // m_bUsedForEdit
|
false, // m_bUsedForEdit
|
||||||
"pump-couple", // m_szName
|
"pump-couple", // m_szName
|
||||||
NOTES_TYPE_PUMP_COUPLE, // m_NotesType
|
NOTES_TYPE_PUMP_COUPLE, // m_NotesTypes
|
||||||
StyleDef::TWO_PLAYERS_TWO_CREDITS, // m_StyleType
|
StyleDef::TWO_PLAYERS_TWO_CREDITS, // m_StyleType
|
||||||
{ 160, 480 }, // m_iCenterX
|
{ 160, 480 }, // m_iCenterX
|
||||||
5, // m_iColsPerPlayer
|
5, // m_iColsPerPlayer
|
||||||
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
|
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
|
||||||
@@ -636,9 +645,10 @@ StyleDef g_StyleDefs[NUM_STYLES] =
|
|||||||
GAME_EZ2, // m_Game
|
GAME_EZ2, // m_Game
|
||||||
true, // m_bUsedForGameplay
|
true, // m_bUsedForGameplay
|
||||||
true, // m_bUsedForEdit
|
true, // m_bUsedForEdit
|
||||||
"Single", // m_szName
|
"EZ2 Single", // m_szName
|
||||||
NOTES_TYPE_EZ2_SINGLE, // m_NotesType
|
{ NOTES_TYPE_EZ2_SINGLE,NOTES_TYPE_EZ2_SINGLE }, // m_NotesTypes
|
||||||
StyleDef::ONE_PLAYER_ONE_CREDIT, // m_StyleType
|
NOTES_TYPE_INVALID, // m_FallbackNotesType
|
||||||
|
StyleDef::ONE_PLAYER_ONE_CREDIT, // m_StyleType
|
||||||
{ 160, 480 }, // m_iCenterX
|
{ 160, 480 }, // m_iCenterX
|
||||||
5, // m_iColsPerPlayer
|
5, // m_iColsPerPlayer
|
||||||
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
|
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
|
||||||
@@ -665,9 +675,10 @@ StyleDef g_StyleDefs[NUM_STYLES] =
|
|||||||
GAME_EZ2, // m_Game
|
GAME_EZ2, // m_Game
|
||||||
true, // m_bUsedForGameplay
|
true, // m_bUsedForGameplay
|
||||||
true, // m_bUsedForEdit
|
true, // m_bUsedForEdit
|
||||||
"SingleHard", // m_szName
|
"EZ2 SingleHard", // m_szName
|
||||||
NOTES_TYPE_EZ2_SINGLE_HARD, // m_NotesType
|
{ NOTES_TYPE_EZ2_SINGLE_HARD,NOTES_TYPE_EZ2_SINGLE_HARD}, // m_NotesTypes
|
||||||
StyleDef::ONE_PLAYER_ONE_CREDIT, // m_StyleType
|
NOTES_TYPE_INVALID, // m_FallbackNotesType
|
||||||
|
StyleDef::ONE_PLAYER_ONE_CREDIT, // m_StyleType
|
||||||
{ 160, 480 }, // m_iCenterX
|
{ 160, 480 }, // m_iCenterX
|
||||||
5, // m_iColsPerPlayer
|
5, // m_iColsPerPlayer
|
||||||
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
|
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
|
||||||
@@ -694,9 +705,10 @@ StyleDef g_StyleDefs[NUM_STYLES] =
|
|||||||
GAME_EZ2, // m_Game
|
GAME_EZ2, // m_Game
|
||||||
true, // m_bUsedForGameplay
|
true, // m_bUsedForGameplay
|
||||||
true, // m_bUsedForEdit
|
true, // m_bUsedForEdit
|
||||||
"Double", // m_szName
|
"EZ2Double", // m_szName
|
||||||
NOTES_TYPE_EZ2_DOUBLE, // m_NotesType
|
{ NOTES_TYPE_EZ2_DOUBLE,NOTES_TYPE_EZ2_DOUBLE }, // m_NotesTypes
|
||||||
StyleDef::ONE_PLAYER_TWO_CREDITS, // m_StyleType
|
NOTES_TYPE_INVALID, // m_FallbackNotesType
|
||||||
|
StyleDef::ONE_PLAYER_TWO_CREDITS, // m_StyleType
|
||||||
{ 160, 480 }, // m_iCenterX
|
{ 160, 480 }, // m_iCenterX
|
||||||
10, // m_iColsPerPlayer
|
10, // m_iColsPerPlayer
|
||||||
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
|
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
|
||||||
@@ -733,9 +745,10 @@ StyleDef g_StyleDefs[NUM_STYLES] =
|
|||||||
GAME_EZ2, // m_Game
|
GAME_EZ2, // m_Game
|
||||||
true, // m_bUsedForGameplay
|
true, // m_bUsedForGameplay
|
||||||
true, // m_bUsedForEdit
|
true, // m_bUsedForEdit
|
||||||
"Real", // m_szName
|
"EZ2 Real", // m_szName
|
||||||
NOTES_TYPE_EZ2_REAL, // m_NotesType
|
{ NOTES_TYPE_EZ2_REAL,NOTES_TYPE_EZ2_REAL }, // m_NotesTypes
|
||||||
StyleDef::ONE_PLAYER_ONE_CREDIT, // m_StyleType
|
NOTES_TYPE_INVALID, // m_FallbackNotesType
|
||||||
|
StyleDef::ONE_PLAYER_ONE_CREDIT, // m_StyleType
|
||||||
{ 160, 480 }, // m_iCenterX
|
{ 160, 480 }, // m_iCenterX
|
||||||
7, // m_iColsPerPlayer
|
7, // m_iColsPerPlayer
|
||||||
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
|
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
|
||||||
@@ -766,9 +779,10 @@ StyleDef g_StyleDefs[NUM_STYLES] =
|
|||||||
GAME_EZ2, // m_Game
|
GAME_EZ2, // m_Game
|
||||||
true, // m_bUsedForGameplay
|
true, // m_bUsedForGameplay
|
||||||
true, // m_bUsedForEdit
|
true, // m_bUsedForEdit
|
||||||
"Versus", // m_szName
|
"EZ2 Versus", // m_szName
|
||||||
NOTES_TYPE_EZ2_SINGLE, // m_NotesType
|
{ NOTES_TYPE_EZ2_SINGLE,NOTES_TYPE_EZ2_SINGLE }, // m_NotesTypes
|
||||||
StyleDef::TWO_PLAYERS_TWO_CREDITS, // m_StyleType
|
NOTES_TYPE_INVALID, // m_FallbackNotesType
|
||||||
|
StyleDef::TWO_PLAYERS_TWO_CREDITS, // m_StyleType
|
||||||
{ 160, 480 }, // m_iCenterX
|
{ 160, 480 }, // m_iCenterX
|
||||||
5, // m_iColsPerPlayer
|
5, // m_iColsPerPlayer
|
||||||
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
|
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
|
||||||
@@ -795,9 +809,10 @@ StyleDef g_StyleDefs[NUM_STYLES] =
|
|||||||
GAME_EZ2, // m_Game
|
GAME_EZ2, // m_Game
|
||||||
true, // m_bUsedForGameplay
|
true, // m_bUsedForGameplay
|
||||||
true, // m_bUsedForEdit
|
true, // m_bUsedForEdit
|
||||||
"VersusHard", // m_szName
|
"EZ2 VersusHard", // m_szName
|
||||||
NOTES_TYPE_EZ2_SINGLE_HARD, // m_NotesType
|
{ NOTES_TYPE_EZ2_SINGLE_HARD,NOTES_TYPE_EZ2_SINGLE_HARD }, // m_NotesTypes
|
||||||
StyleDef::TWO_PLAYERS_TWO_CREDITS, // m_StyleType
|
NOTES_TYPE_INVALID, // m_FallbackNotesType
|
||||||
|
StyleDef::TWO_PLAYERS_TWO_CREDITS, // m_StyleType
|
||||||
{ 160, 480 }, // m_iCenterX
|
{ 160, 480 }, // m_iCenterX
|
||||||
5, // m_iColsPerPlayer
|
5, // m_iColsPerPlayer
|
||||||
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
|
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
|
||||||
@@ -824,9 +839,10 @@ StyleDef g_StyleDefs[NUM_STYLES] =
|
|||||||
GAME_EZ2, // m_Game
|
GAME_EZ2, // m_Game
|
||||||
true, // m_bUsedForGameplay
|
true, // m_bUsedForGameplay
|
||||||
true, // m_bUsedForEdit
|
true, // m_bUsedForEdit
|
||||||
"VersusReal", // m_szName
|
"EZ2 VersusReal", // m_szName
|
||||||
NOTES_TYPE_EZ2_REAL, // m_NotesType
|
{ NOTES_TYPE_EZ2_REAL,NOTES_TYPE_EZ2_REAL }, // m_NotesTypes
|
||||||
StyleDef::TWO_PLAYERS_TWO_CREDITS, // m_StyleType
|
NOTES_TYPE_INVALID, // m_FallbackNotesType
|
||||||
|
StyleDef::TWO_PLAYERS_TWO_CREDITS, // m_StyleType
|
||||||
{ 160, 480 }, // m_iCenterX
|
{ 160, 480 }, // m_iCenterX
|
||||||
7, // m_iColsPerPlayer
|
7, // m_iColsPerPlayer
|
||||||
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
|
{ // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER];
|
||||||
@@ -873,34 +889,39 @@ const StyleDef* GameManager::GetStyleDefForStyle( Style s )
|
|||||||
return &g_StyleDefs[ s ];
|
return &g_StyleDefs[ s ];
|
||||||
}
|
}
|
||||||
|
|
||||||
Style GameManager::GetEditStyleThatPlaysNotesType( NotesType nt )
|
void GameManager::GetGameplayStylesForGame( Game game, CArray<Style,Style>& aStylesAddTo, bool editor )
|
||||||
{
|
{
|
||||||
for( int i=0; i<NUM_STYLES; i++ )
|
for( int s=0; s<NUM_STYLES; s++ ) {
|
||||||
if( g_StyleDefs[i].m_NotesType == nt && g_StyleDefs[i].m_bUsedForEdit )
|
if( g_StyleDefs[s].m_Game != game)
|
||||||
return (Style)i;
|
continue;
|
||||||
|
if( !editor && g_StyleDefs[s].m_bUsedForGameplay )
|
||||||
|
continue;
|
||||||
|
if( editor && !g_StyleDefs[s].m_bUsedForEdit )
|
||||||
|
continue;
|
||||||
|
|
||||||
return STYLE_NONE;
|
aStylesAddTo.Add( (Style)s );
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameManager::GetGameplayStylesForGame( Game game, CArray<Style,Style>& aStylesAddTo )
|
|
||||||
{
|
|
||||||
for( int s=0; s<NUM_STYLES; s++ )
|
|
||||||
if( g_StyleDefs[s].m_Game == game && g_StyleDefs[s].m_bUsedForGameplay )
|
|
||||||
aStylesAddTo.Add( (Style)s );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameManager::GetNotesTypesForGame( Game game, CArray<NotesType,NotesType>& aNotesTypeAddTo )
|
void GameManager::GetNotesTypesForGame( Game game, CArray<NotesType,NotesType>& aNotesTypeAddTo )
|
||||||
{
|
{
|
||||||
for( int nt=0; nt<NUM_NOTES_TYPES; nt++ )
|
for( int nt=0; nt<NUM_NOTES_TYPES; nt++ )
|
||||||
{
|
{
|
||||||
for( int s=0; s<NUM_STYLES; s++ )
|
bool found = false;
|
||||||
|
for( int s=0; !found && s<NUM_STYLES; s++ )
|
||||||
{
|
{
|
||||||
if( g_StyleDefs[s].m_Game == game && g_StyleDefs[s].m_NotesType == nt )
|
if( g_StyleDefs[s].m_Game != game )
|
||||||
|
continue;
|
||||||
|
for( int pl = 0; !found && pl < NUM_PLAYERS; ++pl)
|
||||||
{
|
{
|
||||||
aNotesTypeAddTo.Add( (NotesType)nt );
|
if( g_StyleDefs[s].m_NotesTypes[pl] != nt )
|
||||||
break; // next NotesType
|
continue;
|
||||||
|
|
||||||
|
found=true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(found)
|
||||||
|
aNotesTypeAddTo.Add( (NotesType)nt );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,9 +24,8 @@ public:
|
|||||||
GameDef* GetGameDefForGame( Game g );
|
GameDef* GetGameDefForGame( Game g );
|
||||||
const StyleDef* GetStyleDefForStyle( Style s );
|
const StyleDef* GetStyleDefForStyle( Style s );
|
||||||
|
|
||||||
void GetGameplayStylesForGame( Game game, CArray<Style,Style>& aStylesAddTo ); // do not include edit-specific
|
void GetGameplayStylesForGame( Game game, CArray<Style,Style>& aStylesAddTo, bool editor=false );
|
||||||
void GetNotesTypesForGame( Game game, CArray<NotesType,NotesType>& aNotesTypeAddTo ); // only look at edit-specific styles
|
void GetNotesTypesForGame( Game game, CArray<NotesType,NotesType>& aNotesTypeAddTo ); // only look at edit-specific styles
|
||||||
Style GetEditStyleThatPlaysNotesType( NotesType nt );
|
|
||||||
|
|
||||||
// void GetGameNames( CStringArray &AddTo );
|
// void GetGameNames( CStringArray &AddTo );
|
||||||
// bool DoesGameExist( CString sGameName );
|
// bool DoesGameExist( CString sGameName );
|
||||||
|
|||||||
@@ -184,10 +184,11 @@ void WheelItemDisplay::RefreshGrades()
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* XXX: Don't really want separate grades for each player in couples. */
|
||||||
if( m_pSong ) // this is a song display
|
if( m_pSong ) // this is a song display
|
||||||
{
|
{
|
||||||
const DifficultyClass dc = GAMESTATE->m_PreferredDifficultyClass[p];
|
const DifficultyClass dc = GAMESTATE->m_PreferredDifficultyClass[p];
|
||||||
const Grade grade = m_pSong->GetGradeForDifficultyClass( GAMESTATE->GetCurrentStyleDef()->m_NotesType, dc );
|
const Grade grade = m_pSong->GetGradeForDifficultyClass( GAMESTATE->GetCurrentStyleDef(), p, dc );
|
||||||
m_GradeDisplay[p].SetGrade( (PlayerNumber)p, grade );
|
m_GradeDisplay[p].SetGrade( (PlayerNumber)p, grade );
|
||||||
//m_GradeDisplay[p].SetDiffuse( PlayerToColor((PlayerNumber)p) );
|
//m_GradeDisplay[p].SetDiffuse( PlayerToColor((PlayerNumber)p) );
|
||||||
}
|
}
|
||||||
@@ -330,7 +331,7 @@ MusicWheel::MusicWheel()
|
|||||||
SONGMAN->GetExtraStageInfo(
|
SONGMAN->GetExtraStageInfo(
|
||||||
GAMESTATE->IsExtraStage2(),
|
GAMESTATE->IsExtraStage2(),
|
||||||
GAMESTATE->m_sPreferredGroup,
|
GAMESTATE->m_sPreferredGroup,
|
||||||
GAMESTATE->GetCurrentStyleDef()->m_NotesType,
|
GAMESTATE->GetCurrentStyleDef(),
|
||||||
pSong,
|
pSong,
|
||||||
pNotes,
|
pNotes,
|
||||||
po,
|
po,
|
||||||
@@ -344,6 +345,7 @@ MusicWheel::MusicWheel()
|
|||||||
GAMESTATE->m_PlayerOptions[p] = po;
|
GAMESTATE->m_PlayerOptions[p] = po;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/* XXX: Set up couples correctly */
|
||||||
GAMESTATE->m_SongOptions = so;
|
GAMESTATE->m_SongOptions = so;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -443,7 +445,7 @@ void MusicWheel::BuildWheelItemDatas( CArray<WheelItemData, WheelItemData&> &arr
|
|||||||
}
|
}
|
||||||
|
|
||||||
CArray<Notes*, Notes*> arraySteps;
|
CArray<Notes*, Notes*> arraySteps;
|
||||||
pSong->GetNotesThatMatch( GAMESTATE->GetCurrentStyleDef()->m_NotesType, arraySteps );
|
pSong->GetNotesThatMatch( GAMESTATE->GetCurrentStyleDef(), 0, arraySteps );
|
||||||
|
|
||||||
if( arraySteps.GetSize() > 0 )
|
if( arraySteps.GetSize() > 0 )
|
||||||
arraySongs.Add( pSong );
|
arraySongs.Add( pSong );
|
||||||
@@ -577,7 +579,7 @@ void MusicWheel::BuildWheelItemDatas( CArray<WheelItemData, WheelItemData&> &arr
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
WheelItemData& WID = arrayWheelItemDatas[i];
|
WheelItemData& WID = arrayWheelItemDatas[i];
|
||||||
bool bIsEasy = pSong->IsEasy( GAMESTATE->GetCurrentStyleDef()->m_NotesType );
|
bool bIsEasy = pSong->IsEasy( GAMESTATE->GetCurrentStyleDef()->m_NotesTypes[0] );
|
||||||
WID.m_IconType = bIsEasy ? MusicStatusDisplay::easy : MusicStatusDisplay::none;
|
WID.m_IconType = bIsEasy ? MusicStatusDisplay::easy : MusicStatusDisplay::none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -476,7 +476,8 @@ void NoteData::Turn( PlayerOptions::TurnType tt )
|
|||||||
case PlayerOptions::TURN_LEFT:
|
case PlayerOptions::TURN_LEFT:
|
||||||
case PlayerOptions::TURN_RIGHT: // HACK: TurnRight does the same thing as TurnLeft. I'll fix this later...
|
case PlayerOptions::TURN_RIGHT: // HACK: TurnRight does the same thing as TurnLeft. I'll fix this later...
|
||||||
// Chris: Handling each NotesType case is a terrible way to do this, but oh well...
|
// Chris: Handling each NotesType case is a terrible way to do this, but oh well...
|
||||||
switch( GAMESTATE->GetCurrentStyleDef()->m_NotesType )
|
/* XXX: This assumes each NotesType in a style turns the same. */
|
||||||
|
switch( GAMESTATE->GetCurrentStyleDef()->m_NotesTypes[0] )
|
||||||
{
|
{
|
||||||
case NOTES_TYPE_DANCE_SINGLE:
|
case NOTES_TYPE_DANCE_SINGLE:
|
||||||
case NOTES_TYPE_DANCE_DOUBLE:
|
case NOTES_TYPE_DANCE_DOUBLE:
|
||||||
|
|||||||
@@ -168,7 +168,8 @@ ScreenEdit::ScreenEdit()
|
|||||||
{
|
{
|
||||||
m_pNotes = new Notes;
|
m_pNotes = new Notes;
|
||||||
m_pNotes->m_DifficultyClass = CLASS_MEDIUM;
|
m_pNotes->m_DifficultyClass = CLASS_MEDIUM;
|
||||||
m_pNotes->m_NotesType = GAMESTATE->GetCurrentStyleDef()->m_NotesType;
|
/* XXX: figure out how to handle second player couples in the editor */
|
||||||
|
m_pNotes->m_NotesType = GAMESTATE->GetCurrentStyleDef()->m_NotesTypes[0];
|
||||||
m_pNotes->m_sDescription = "Untitled";
|
m_pNotes->m_sDescription = "Untitled";
|
||||||
// Dro Kulix: If m_pNotes->m_NotesType is not changed here,
|
// Dro Kulix: If m_pNotes->m_NotesType is not changed here,
|
||||||
// the edit mode is somehow stuck only being able to edit
|
// the edit mode is somehow stuck only being able to edit
|
||||||
|
|||||||
@@ -106,8 +106,7 @@ void ScreenEditMenu::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
// Find the first Style that will play the selected notes type.
|
// Find the first Style that will play the selected notes type.
|
||||||
// Set the current Style, then let ScreenEdit infer the desired
|
// Set the current Style, then let ScreenEdit infer the desired
|
||||||
// NotesType from that Style.
|
// NotesType from that Style.
|
||||||
NotesType nt = Selector.GetSelectedNotesType();
|
Style style = Selector.GetSelectedStyle();
|
||||||
Style style = GAMEMAN->GetEditStyleThatPlaysNotesType( nt );
|
|
||||||
GAMESTATE->m_CurStyle = style;
|
GAMESTATE->m_CurStyle = style;
|
||||||
GAMESTATE->m_CurGame = GAMEMAN->GetStyleDefForStyle(style)->m_Game;
|
GAMESTATE->m_CurGame = GAMEMAN->GetStyleDefForStyle(style)->m_Game;
|
||||||
|
|
||||||
@@ -144,7 +143,7 @@ void ScreenEditMenu::MenuStart( PlayerNumber pn )
|
|||||||
|
|
||||||
// find the first style that matches this notes type
|
// find the first style that matches this notes type
|
||||||
GameDef* pGameDef = GAMESTATE->GetCurrentGameDef();
|
GameDef* pGameDef = GAMESTATE->GetCurrentGameDef();
|
||||||
GAMESTATE->m_CurStyle = GAMEMAN->GetEditStyleThatPlaysNotesType( Selector.GetSelectedNotesType() );
|
GAMESTATE->m_CurStyle = Selector.GetSelectedStyle();
|
||||||
GAMESTATE->m_pCurNotes[PLAYER_1] = Selector.GetSelectedNotes();
|
GAMESTATE->m_pCurNotes[PLAYER_1] = Selector.GetSelectedNotes();
|
||||||
|
|
||||||
m_soundSelect.PlayRandom();
|
m_soundSelect.PlayRandom();
|
||||||
|
|||||||
@@ -70,16 +70,13 @@ ScreenSelectGroup::ScreenSelectGroup()
|
|||||||
aAllSongs.Copy( SONGMAN->m_pSongs );
|
aAllSongs.Copy( SONGMAN->m_pSongs );
|
||||||
|
|
||||||
// Filter out Songs that can't be played by the current Style
|
// Filter out Songs that can't be played by the current Style
|
||||||
|
for( i=aAllSongs.GetSize()-1; i>=0; i-- ) // foreach Song, back to front
|
||||||
{
|
{
|
||||||
NotesType nt = GAMESTATE->GetCurrentStyleDef()->m_NotesType;
|
if( aAllSongs[i]->SongCompleteForStyle(GAMESTATE->GetCurrentStyleDef()) &&
|
||||||
for( i=aAllSongs.GetSize()-1; i>=0; i-- ) // foreach Song, back to front
|
aAllSongs[i]->NormallyDisplayed() )
|
||||||
{
|
continue;
|
||||||
if( aAllSongs[i]->SongHasNotesType(nt) &&
|
|
||||||
aAllSongs[i]->NormallyDisplayed() )
|
|
||||||
continue;
|
|
||||||
|
|
||||||
aAllSongs.RemoveAt( i );
|
aAllSongs.RemoveAt( i );
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get group names by thowing them into a hash
|
// Get group names by thowing them into a hash
|
||||||
|
|||||||
@@ -458,14 +458,14 @@ void ScreenSelectMusic::EasierDifficulty( PlayerNumber pn )
|
|||||||
|
|
||||||
if( !GAMESTATE->IsPlayerEnabled(pn) )
|
if( !GAMESTATE->IsPlayerEnabled(pn) )
|
||||||
return;
|
return;
|
||||||
if( m_arrayNotes.GetSize() == 0 )
|
if( m_arrayNotes[pn].GetSize() == 0 )
|
||||||
return;
|
return;
|
||||||
if( m_iSelection[pn] == 0 )
|
if( m_iSelection[pn] == 0 )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_iSelection[pn]--;
|
m_iSelection[pn]--;
|
||||||
// the user explicity switched difficulties. Update the preferred difficulty
|
// the user explicity switched difficulties. Update the preferred difficulty
|
||||||
GAMESTATE->m_PreferredDifficultyClass[pn] = m_arrayNotes[ m_iSelection[pn] ]->m_DifficultyClass;
|
GAMESTATE->m_PreferredDifficultyClass[pn] = m_arrayNotes[pn][ m_iSelection[pn] ]->m_DifficultyClass;
|
||||||
|
|
||||||
m_soundChangeNotes.Play();
|
m_soundChangeNotes.Play();
|
||||||
|
|
||||||
@@ -478,14 +478,14 @@ void ScreenSelectMusic::HarderDifficulty( PlayerNumber pn )
|
|||||||
|
|
||||||
if( !GAMESTATE->IsPlayerEnabled(pn) )
|
if( !GAMESTATE->IsPlayerEnabled(pn) )
|
||||||
return;
|
return;
|
||||||
if( m_arrayNotes.GetSize() == 0 )
|
if( m_arrayNotes[pn].GetSize() == 0 )
|
||||||
return;
|
return;
|
||||||
if( m_iSelection[pn] == m_arrayNotes.GetSize()-1 )
|
if( m_iSelection[pn] == m_arrayNotes[pn].GetSize()-1 )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_iSelection[pn]++;
|
m_iSelection[pn]++;
|
||||||
// the user explicity switched difficulties. Update the preferred difficulty
|
// the user explicity switched difficulties. Update the preferred difficulty
|
||||||
GAMESTATE->m_PreferredDifficultyClass[pn] = m_arrayNotes[ m_iSelection[pn] ]->m_DifficultyClass;
|
GAMESTATE->m_PreferredDifficultyClass[pn] = m_arrayNotes[pn][ m_iSelection[pn] ]->m_DifficultyClass;
|
||||||
|
|
||||||
m_soundChangeNotes.Play();
|
m_soundChangeNotes.Play();
|
||||||
|
|
||||||
@@ -681,9 +681,9 @@ void ScreenSelectMusic::AfterNotesChange( PlayerNumber pn )
|
|||||||
if( !GAMESTATE->IsPlayerEnabled(pn) )
|
if( !GAMESTATE->IsPlayerEnabled(pn) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_iSelection[pn] = clamp( m_iSelection[pn], 0, m_arrayNotes.GetSize()-1 ); // bounds clamping
|
m_iSelection[pn] = clamp( m_iSelection[pn], 0, m_arrayNotes[pn].GetSize()-1 ); // bounds clamping
|
||||||
|
|
||||||
Notes* pNotes = m_arrayNotes.GetSize()>0 ? m_arrayNotes[m_iSelection[pn]] : NULL;
|
Notes* pNotes = m_arrayNotes[pn].GetSize()>0 ? m_arrayNotes[pn][m_iSelection[pn]] : NULL;
|
||||||
|
|
||||||
GAMESTATE->m_pCurNotes[pn] = pNotes;
|
GAMESTATE->m_pCurNotes[pn] = pNotes;
|
||||||
|
|
||||||
@@ -711,7 +711,9 @@ void ScreenSelectMusic::AfterMusicChange()
|
|||||||
Song* pSong = m_MusicWheel.GetSelectedSong();
|
Song* pSong = m_MusicWheel.GetSelectedSong();
|
||||||
GAMESTATE->m_pCurSong = pSong;
|
GAMESTATE->m_pCurSong = pSong;
|
||||||
|
|
||||||
m_arrayNotes.RemoveAll();
|
int pn;
|
||||||
|
for( pn = 0; pn < NUM_PLAYERS; ++pn)
|
||||||
|
m_arrayNotes[pn].RemoveAll();
|
||||||
|
|
||||||
switch( m_MusicWheel.GetSelectedType() )
|
switch( m_MusicWheel.GetSelectedType() )
|
||||||
{
|
{
|
||||||
@@ -730,8 +732,10 @@ void ScreenSelectMusic::AfterMusicChange()
|
|||||||
break;
|
break;
|
||||||
case TYPE_SONG:
|
case TYPE_SONG:
|
||||||
{
|
{
|
||||||
pSong->GetNotesThatMatch( GAMESTATE->GetCurrentStyleDef()->m_NotesType, m_arrayNotes );
|
for( int pn = 0; pn < NUM_PLAYERS; ++pn) {
|
||||||
SortNotesArrayByDifficulty( m_arrayNotes );
|
pSong->GetNotesThatMatch( GAMESTATE->GetCurrentStyleDef(), pn, m_arrayNotes[pn] );
|
||||||
|
SortNotesArrayByDifficulty( m_arrayNotes[pn] );
|
||||||
|
}
|
||||||
|
|
||||||
m_Banner.SetFromSong( pSong );
|
m_Banner.SetFromSong( pSong );
|
||||||
|
|
||||||
@@ -747,11 +751,11 @@ void ScreenSelectMusic::AfterMusicChange()
|
|||||||
{
|
{
|
||||||
if( !GAMESTATE->IsPlayerEnabled( PlayerNumber(p) ) )
|
if( !GAMESTATE->IsPlayerEnabled( PlayerNumber(p) ) )
|
||||||
continue;
|
continue;
|
||||||
for( int i=0; i<m_arrayNotes.GetSize(); i++ )
|
for( int i=0; i<m_arrayNotes[p].GetSize(); i++ )
|
||||||
if( m_arrayNotes[i]->m_DifficultyClass == GAMESTATE->m_PreferredDifficultyClass[p] )
|
if( m_arrayNotes[p][i]->m_DifficultyClass == GAMESTATE->m_PreferredDifficultyClass[p] )
|
||||||
m_iSelection[p] = i;
|
m_iSelection[p] = i;
|
||||||
|
|
||||||
m_iSelection[p] = clamp( m_iSelection[p], 0, m_arrayNotes.GetSize() ) ;
|
m_iSelection[p] = clamp( m_iSelection[p], 0, m_arrayNotes[p].GetSize() ) ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ protected:
|
|||||||
|
|
||||||
void UpdateOptionsDisplays();
|
void UpdateOptionsDisplays();
|
||||||
|
|
||||||
CArray<Notes*, Notes*> m_arrayNotes;
|
CArray<Notes*, Notes*> m_arrayNotes[NUM_PLAYERS];
|
||||||
int m_iSelection[NUM_PLAYERS];
|
int m_iSelection[NUM_PLAYERS];
|
||||||
|
|
||||||
MenuElements m_Menu;
|
MenuElements m_Menu;
|
||||||
|
|||||||
+16
-5
@@ -1232,14 +1232,25 @@ void Song::TidyUpData()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Get Notes that match a given style and player. */
|
||||||
void Song::GetNotesThatMatch( NotesType nt, CArray<Notes*, Notes*>& arrayAddTo ) const
|
void Song::GetNotesThatMatch( const StyleDef *s, int p, CArray<Notes*, Notes*>& arrayAddTo ) const
|
||||||
{
|
{
|
||||||
for( int i=0; i<m_apNotes.GetSize(); i++ ) // for each of the Song's Notes
|
for( int i=0; i<m_apNotes.GetSize(); i++ ) // for each of the Song's Notes
|
||||||
if( m_apNotes[i]->m_NotesType == nt )
|
if( m_apNotes[i]->m_NotesType == s->m_NotesTypes[p] )
|
||||||
arrayAddTo.Add( m_apNotes[i] );
|
arrayAddTo.Add( m_apNotes[i] );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Return whether the song is playable in the given style. */
|
||||||
|
bool Song::SongCompleteForStyle( const StyleDef *st ) const
|
||||||
|
{
|
||||||
|
for( int pn = 0; pn < NUM_PLAYERS; ++pn )
|
||||||
|
{
|
||||||
|
if(st->m_NotesTypes[pn] == NOTES_TYPE_INVALID) continue; /* unused */
|
||||||
|
if(!SongHasNotesType(st->m_NotesTypes[pn])) return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool Song::SongHasNotesType( NotesType nt ) const
|
bool Song::SongHasNotesType( NotesType nt ) const
|
||||||
{
|
{
|
||||||
for( int i=0; i < m_apNotes.GetSize(); i++ ) // foreach Notes
|
for( int i=0; i < m_apNotes.GetSize(); i++ ) // foreach Notes
|
||||||
@@ -1464,10 +1475,10 @@ void Song::AddAutoGenNotes()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Grade Song::GetGradeForDifficultyClass( NotesType nt, DifficultyClass dc ) const
|
Grade Song::GetGradeForDifficultyClass( const StyleDef *st, int p, DifficultyClass dc ) const
|
||||||
{
|
{
|
||||||
CArray<Notes*, Notes*> aNotes;
|
CArray<Notes*, Notes*> aNotes;
|
||||||
this->GetNotesThatMatch( nt, aNotes );
|
this->GetNotesThatMatch( st, p, aNotes );
|
||||||
SortNotesArrayByDifficulty( aNotes );
|
SortNotesArrayByDifficulty( aNotes );
|
||||||
|
|
||||||
for( int i=0; i<aNotes.GetSize(); i++ )
|
for( int i=0; i<aNotes.GetSize(); i++ )
|
||||||
|
|||||||
@@ -479,7 +479,7 @@ bool SongManager::GetExtraStageInfoFromCourse( bool bExtra2, CString sPreferredG
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SongManager::GetExtraStageInfo( bool bExtra2, CString sPreferredGroup, NotesType nt,
|
void SongManager::GetExtraStageInfo( bool bExtra2, CString sPreferredGroup, const StyleDef *sd,
|
||||||
Song*& pSongOut, Notes*& pNotesOut, PlayerOptions& po_out, SongOptions& so_out )
|
Song*& pSongOut, Notes*& pNotesOut, PlayerOptions& po_out, SongOptions& so_out )
|
||||||
{
|
{
|
||||||
if(GetExtraStageInfoFromCourse(bExtra2, sPreferredGroup,
|
if(GetExtraStageInfoFromCourse(bExtra2, sPreferredGroup,
|
||||||
@@ -499,7 +499,7 @@ void SongManager::GetExtraStageInfo( bool bExtra2, CString sPreferredGroup, Note
|
|||||||
Song* pSong = apSongs[s];
|
Song* pSong = apSongs[s];
|
||||||
|
|
||||||
CArray<Notes*,Notes*> apNotes;
|
CArray<Notes*,Notes*> apNotes;
|
||||||
pSong->GetNotesThatMatch( nt, apNotes );
|
pSong->GetNotesThatMatch( sd, 0, apNotes );
|
||||||
for( int n=0; n<apNotes.GetSize(); n++ ) // foreach Notes
|
for( int n=0; n<apNotes.GetSize(); n++ ) // foreach Notes
|
||||||
{
|
{
|
||||||
Notes* pNotes = apNotes[n];
|
Notes* pNotes = apNotes[n];
|
||||||
@@ -571,8 +571,10 @@ bool SongManager::ChooseRandomSong()
|
|||||||
if( pSong->m_apNotes.GetSize() == 0 )
|
if( pSong->m_apNotes.GetSize() == 0 )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
/* XXX: This assumes we're set to a style that doesn't use separate
|
||||||
|
* notes for each player, such as VERSUS. */
|
||||||
Notes* pNotes = pSong->m_apNotes[ rand()%pSong->m_apNotes.GetSize() ];
|
Notes* pNotes = pSong->m_apNotes[ rand()%pSong->m_apNotes.GetSize() ];
|
||||||
if( pNotes->m_NotesType != GAMESTATE->GetCurrentStyleDef()->m_NotesType )
|
if( pNotes->m_NotesType != GAMESTATE->GetCurrentStyleDef()->m_NotesTypes[0] )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// found something we can use!
|
// found something we can use!
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ public:
|
|||||||
void InitCoursesFromDisk();
|
void InitCoursesFromDisk();
|
||||||
void ReloadCourses();
|
void ReloadCourses();
|
||||||
|
|
||||||
void GetExtraStageInfo( bool bExtra2, CString sPreferredGroup, NotesType nt,
|
void GetExtraStageInfo( bool bExtra2, CString sPreferredGroup, const StyleDef *s,
|
||||||
Song*& pSongOut, Notes*& pNotesOut, PlayerOptions& po_out, SongOptions& so_out );
|
Song*& pSongOut, Notes*& pNotesOut, PlayerOptions& po_out, SongOptions& so_out );
|
||||||
|
|
||||||
/* Choose a random song from the current style. Return true
|
/* Choose a random song from the current style. Return true
|
||||||
|
|||||||
@@ -68,11 +68,11 @@ SongSelector::SongSelector()
|
|||||||
m_sprArrowRight.SetDiffuse( D3DXCOLOR(1,1,1,0) );
|
m_sprArrowRight.SetDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||||
this->AddChild( &m_sprArrowRight );
|
this->AddChild( &m_sprArrowRight );
|
||||||
|
|
||||||
m_textNotesType.LoadFromFont( THEME->GetPathTo("Fonts","header1") );
|
m_textStyle.LoadFromFont( THEME->GetPathTo("Fonts","header1") );
|
||||||
m_textNotesType.SetXY( GAME_STYLE_X, GAME_STYLE_Y );
|
m_textStyle.SetXY( GAME_STYLE_X, GAME_STYLE_Y );
|
||||||
m_textNotesType.SetDiffuse( D3DXCOLOR(0.7f,0.7f,0.7f,1) );
|
m_textStyle.SetDiffuse( D3DXCOLOR(0.7f,0.7f,0.7f,1) );
|
||||||
m_textNotesType.SetText( "blah" );
|
m_textStyle.SetText( "blah" );
|
||||||
this->AddChild( &m_textNotesType );
|
this->AddChild( &m_textStyle );
|
||||||
|
|
||||||
m_textNotes.LoadFromFont( THEME->GetPathTo("Fonts","header1") );
|
m_textNotes.LoadFromFont( THEME->GetPathTo("Fonts","header1") );
|
||||||
m_textNotes.SetXY( STEPS_X, STEPS_Y );
|
m_textNotes.SetXY( STEPS_X, STEPS_Y );
|
||||||
@@ -84,8 +84,8 @@ SongSelector::SongSelector()
|
|||||||
ChangeSelectedRow(ROW_GROUP);
|
ChangeSelectedRow(ROW_GROUP);
|
||||||
|
|
||||||
SONGMAN->GetGroupNames( m_sGroups );
|
SONGMAN->GetGroupNames( m_sGroups );
|
||||||
GAMEMAN->GetNotesTypesForGame( GAMESTATE->m_CurGame, m_NotesTypes );
|
GAMEMAN->GetGameplayStylesForGame( GAMESTATE->m_CurGame, m_Styles, true );
|
||||||
m_iSelectedGroup = m_iSelectedSong = m_iSelectedNotesType = m_iSelectedNotes = 0;
|
m_iSelectedGroup = m_iSelectedSong = m_iSelectedStyle = m_iSelectedNotes = 0;
|
||||||
|
|
||||||
if( GAMESTATE->m_pCurSong )
|
if( GAMESTATE->m_pCurSong )
|
||||||
{
|
{
|
||||||
@@ -101,9 +101,11 @@ SongSelector::SongSelector()
|
|||||||
m_iSelectedSong = i;
|
m_iSelectedSong = i;
|
||||||
OnSongChange();
|
OnSongChange();
|
||||||
|
|
||||||
for( i=0; i<m_NotesTypes.GetSize(); i++ )
|
for( i=0; i<m_Styles.GetSize(); i++ )
|
||||||
if( GAMESTATE->GetCurrentStyleDef()->m_NotesType == m_NotesTypes[i] )
|
{
|
||||||
m_iSelectedNotesType = i;
|
if( GAMESTATE->GetCurrentStyleDef() == GAMEMAN->GetStyleDefForStyle(m_Styles[i]) )
|
||||||
|
m_iSelectedStyle = i;
|
||||||
|
}
|
||||||
OnNotesTypeChange();
|
OnNotesTypeChange();
|
||||||
|
|
||||||
for( i=0; i<m_pNotess.GetSize(); i++ )
|
for( i=0; i<m_pNotess.GetSize(); i++ )
|
||||||
@@ -160,10 +162,10 @@ void SongSelector::Left()
|
|||||||
m_iSelectedSong--;
|
m_iSelectedSong--;
|
||||||
OnSongChange();
|
OnSongChange();
|
||||||
break;
|
break;
|
||||||
case ROW_NOTES_TYPE:
|
case ROW_STYLE:
|
||||||
if( m_iSelectedNotesType == 0 ) // can't go left any further
|
if( m_iSelectedStyle == 0 ) // can't go left any further
|
||||||
return;
|
return;
|
||||||
m_iSelectedNotesType--;
|
m_iSelectedStyle--;
|
||||||
OnNotesTypeChange();
|
OnNotesTypeChange();
|
||||||
break;
|
break;
|
||||||
case ROW_STEPS:
|
case ROW_STEPS:
|
||||||
@@ -193,10 +195,10 @@ void SongSelector::Right()
|
|||||||
m_iSelectedSong++;
|
m_iSelectedSong++;
|
||||||
OnSongChange();
|
OnSongChange();
|
||||||
break;
|
break;
|
||||||
case ROW_NOTES_TYPE:
|
case ROW_STYLE:
|
||||||
if( m_iSelectedNotesType == m_NotesTypes.GetSize()-1 ) // can't go right any further
|
if( m_iSelectedStyle == m_Styles.GetSize()-1 ) // can't go right any further
|
||||||
return;
|
return;
|
||||||
m_iSelectedNotesType++;
|
m_iSelectedStyle++;
|
||||||
OnNotesTypeChange();
|
OnNotesTypeChange();
|
||||||
break;
|
break;
|
||||||
case ROW_STEPS:
|
case ROW_STEPS:
|
||||||
@@ -216,9 +218,8 @@ void SongSelector::ChangeSelectedRow( SelectedRow row )
|
|||||||
m_textGroup.SetEffectNone();
|
m_textGroup.SetEffectNone();
|
||||||
m_sprArrowLeft.SetDiffuse( D3DXCOLOR(1,1,1,0) );
|
m_sprArrowLeft.SetDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||||
m_sprArrowRight.SetDiffuse( D3DXCOLOR(1,1,1,0) );
|
m_sprArrowRight.SetDiffuse( D3DXCOLOR(1,1,1,0) );
|
||||||
m_textNotesType.SetEffectNone();
|
m_textStyle.SetEffectNone();
|
||||||
m_textNotes.SetEffectNone();
|
m_textNotes.SetEffectNone();
|
||||||
|
|
||||||
m_SelectedRow = row;
|
m_SelectedRow = row;
|
||||||
|
|
||||||
switch( m_SelectedRow )
|
switch( m_SelectedRow )
|
||||||
@@ -228,7 +229,7 @@ void SongSelector::ChangeSelectedRow( SelectedRow row )
|
|||||||
m_sprArrowLeft.SetDiffuse( D3DXCOLOR(1,1,1,1) );
|
m_sprArrowLeft.SetDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||||
m_sprArrowRight.SetDiffuse( D3DXCOLOR(1,1,1,1) );
|
m_sprArrowRight.SetDiffuse( D3DXCOLOR(1,1,1,1) );
|
||||||
break;
|
break;
|
||||||
case ROW_NOTES_TYPE: m_textNotesType.SetEffectGlowing(); break;
|
case ROW_STYLE: m_textStyle.SetEffectGlowing(); break;
|
||||||
case ROW_STEPS: m_textNotes.SetEffectGlowing(); break;
|
case ROW_STEPS: m_textNotes.SetEffectGlowing(); break;
|
||||||
default: ASSERT(false);
|
default: ASSERT(false);
|
||||||
}
|
}
|
||||||
@@ -259,12 +260,13 @@ void SongSelector::OnSongChange()
|
|||||||
|
|
||||||
void SongSelector::OnNotesTypeChange()
|
void SongSelector::OnNotesTypeChange()
|
||||||
{
|
{
|
||||||
m_iSelectedNotesType = clamp( m_iSelectedNotesType, 0, m_NotesTypes.GetSize()-1 );
|
m_iSelectedStyle = clamp( m_iSelectedStyle, 0, m_Styles.GetSize()-1 );
|
||||||
|
|
||||||
m_textNotesType.SetText( GameManager::NotesTypeToString( GetSelectedNotesType() ) );
|
m_textStyle.SetText( GAMEMAN->GetStyleDefForStyle(GetSelectedStyle())->m_szName );
|
||||||
|
|
||||||
m_pNotess.RemoveAll();
|
m_pNotess.RemoveAll();
|
||||||
GetSelectedSong()->GetNotesThatMatch( GetSelectedNotesType(), m_pNotess );
|
/* XXX. We should display couples if either side exists ... */
|
||||||
|
GetSelectedSong()->GetNotesThatMatch( GAMEMAN->GetStyleDefForStyle(GetSelectedStyle()), 0, m_pNotess );
|
||||||
SortNotesArrayByDifficulty( m_pNotess );
|
SortNotesArrayByDifficulty( m_pNotess );
|
||||||
m_pNotess.Add( NULL ); // marker for "(NEW)"
|
m_pNotess.Add( NULL ); // marker for "(NEW)"
|
||||||
m_iSelectedNotes = 0;
|
m_iSelectedNotes = 0;
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ public:
|
|||||||
|
|
||||||
CString GetSelectedGroup() { return m_sGroups[m_iSelectedGroup]; };
|
CString GetSelectedGroup() { return m_sGroups[m_iSelectedGroup]; };
|
||||||
Song* GetSelectedSong() { return m_pSongs[m_iSelectedSong]; };
|
Song* GetSelectedSong() { return m_pSongs[m_iSelectedSong]; };
|
||||||
NotesType GetSelectedNotesType() { return m_NotesTypes[m_iSelectedNotesType]; };
|
Style GetSelectedStyle() { return m_Styles[m_iSelectedStyle]; };
|
||||||
Notes* GetSelectedNotes() { return m_pNotess[m_iSelectedNotes]; };
|
Notes* GetSelectedNotes() { return m_pNotess[m_iSelectedNotes]; };
|
||||||
|
|
||||||
/* not used yet */
|
/* not used yet */
|
||||||
@@ -40,7 +40,7 @@ public:
|
|||||||
void AllowNewNotes(bool NewNotes_=true) { NewNotes = NewNotes; }
|
void AllowNewNotes(bool NewNotes_=true) { NewNotes = NewNotes; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum SelectedRow { ROW_GROUP, ROW_SONG, ROW_NOTES_TYPE, ROW_STEPS, NUM_ROWS };
|
enum SelectedRow { ROW_GROUP, ROW_SONG, ROW_STYLE, ROW_STEPS, NUM_ROWS };
|
||||||
SelectedRow m_SelectedRow;
|
SelectedRow m_SelectedRow;
|
||||||
|
|
||||||
CStringArray m_sGroups;
|
CStringArray m_sGroups;
|
||||||
@@ -54,9 +54,10 @@ private:
|
|||||||
|
|
||||||
Sprite m_sprArrowLeft;
|
Sprite m_sprArrowLeft;
|
||||||
Sprite m_sprArrowRight;
|
Sprite m_sprArrowRight;
|
||||||
CArray<NotesType, NotesType> m_NotesTypes;
|
|
||||||
int m_iSelectedNotesType; // index into m_NotesTypes
|
CArray<Style, Style> m_Styles;
|
||||||
BitmapText m_textNotesType;
|
int m_iSelectedStyle; // index into m_Styles
|
||||||
|
BitmapText m_textStyle;
|
||||||
|
|
||||||
CArray<Notes*, Notes*> m_pNotess;
|
CArray<Notes*, Notes*> m_pNotess;
|
||||||
int m_iSelectedNotes; // index into m_pNotess
|
int m_iSelectedNotes; // index into m_pNotess
|
||||||
|
|||||||
@@ -80,3 +80,13 @@ PlayerNumber StyleDef::ControllerToPlayerNumber( GameController controller ) con
|
|||||||
return PLAYER_INVALID;
|
return PLAYER_INVALID;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool StyleDef::MatchesNotesType( NotesType type, int pn ) const
|
||||||
|
{
|
||||||
|
if(type == m_NotesTypes[pn]) return true;
|
||||||
|
if(type == m_FallbackNotesType) return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -41,15 +41,25 @@ public:
|
|||||||
|
|
||||||
/* The name of the style. (This is currently unused.) */
|
/* The name of the style. (This is currently unused.) */
|
||||||
char m_szName[60];
|
char m_szName[60];
|
||||||
NotesType m_NotesType; // the notes format that this style reads.
|
|
||||||
// For example, the "dance versus" reads the Notes with the tag "dance-single".
|
/* m_NotesTypes[] defines the notes format used for each player. For
|
||||||
|
* example, the "dance versus" reads the Notes with the tag "dance-single".
|
||||||
|
* For most modes, this will be the same for all styles; it's different
|
||||||
|
* for each player in couples. */
|
||||||
|
NotesType m_NotesTypes[NUM_PLAYERS];
|
||||||
|
|
||||||
|
/* This type is used as a fallback; if, for any player, m_StyleType[p] isn't
|
||||||
|
* available, this type will be used. Use NOTES_TYPE_INVALID for no fallback. */
|
||||||
|
NotesType m_FallbackNotesType;
|
||||||
enum StyleType
|
enum StyleType
|
||||||
{
|
{
|
||||||
ONE_PLAYER_ONE_CREDIT, // e.g. single
|
ONE_PLAYER_ONE_CREDIT, // e.g. single
|
||||||
TWO_PLAYERS_TWO_CREDITS, // e.g. versus
|
TWO_PLAYERS_TWO_CREDITS, // e.g. versus
|
||||||
ONE_PLAYER_TWO_CREDITS, // e.g. double
|
ONE_PLAYER_TWO_CREDITS, // e.g. double
|
||||||
};
|
};
|
||||||
StyleType m_StyleType; // Defines how many players are allowed to play this Style.
|
|
||||||
|
|
||||||
|
StyleType m_StyleType;
|
||||||
int m_iCenterX[NUM_PLAYERS]; // center of the player
|
int m_iCenterX[NUM_PLAYERS]; // center of the player
|
||||||
int m_iColsPerPlayer; // number of total tracks this style expects (e.g. 4 for versus, but 8 for double)
|
int m_iColsPerPlayer; // number of total tracks this style expects (e.g. 4 for versus, but 8 for double)
|
||||||
struct ColumnInfo
|
struct ColumnInfo
|
||||||
@@ -68,5 +78,7 @@ public:
|
|||||||
PlayerNumber ControllerToPlayerNumber( GameController controller ) const;
|
PlayerNumber ControllerToPlayerNumber( GameController controller ) const;
|
||||||
|
|
||||||
void GetTransformedNoteDataForStyle( PlayerNumber pn, NoteData* pOriginal, NoteData* pNoteDataOut ) const;
|
void GetTransformedNoteDataForStyle( PlayerNumber pn, NoteData* pOriginal, NoteData* pNoteDataOut ) const;
|
||||||
|
|
||||||
|
bool MatchesNotesType( NotesType type, int pn ) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
#include "GameConstantsAndTypes.h"
|
#include "GameConstantsAndTypes.h"
|
||||||
#include "RageUtil.h"
|
#include "RageUtil.h"
|
||||||
|
#include "StyleDef.h"
|
||||||
|
|
||||||
extern const int FILE_CACHE_VERSION;
|
extern const int FILE_CACHE_VERSION;
|
||||||
|
|
||||||
@@ -174,9 +175,10 @@ public:
|
|||||||
|
|
||||||
CArray<Notes*, Notes*> m_apNotes;
|
CArray<Notes*, Notes*> m_apNotes;
|
||||||
|
|
||||||
|
bool SongCompleteForStyle( const StyleDef *st ) const;
|
||||||
bool SongHasNotesType( NotesType nt ) const;
|
bool SongHasNotesType( NotesType nt ) const;
|
||||||
bool SongHasNotesTypeAndDifficulty( NotesType nt, DifficultyClass dc ) const;
|
bool SongHasNotesTypeAndDifficulty( NotesType nt, DifficultyClass dc ) const;
|
||||||
void GetNotesThatMatch( NotesType nt, CArray<Notes*, Notes*>& arrayAddTo ) const;
|
void GetNotesThatMatch( const StyleDef *s, int p, CArray<Notes*, Notes*>& arrayAddTo ) const;
|
||||||
int GetNumTimesPlayed() const
|
int GetNumTimesPlayed() const
|
||||||
{
|
{
|
||||||
int iTotalNumTimesPlayed = 0;
|
int iTotalNumTimesPlayed = 0;
|
||||||
@@ -188,7 +190,7 @@ public:
|
|||||||
}
|
}
|
||||||
bool IsNew() const;
|
bool IsNew() const;
|
||||||
bool IsEasy( NotesType nt ) const;
|
bool IsEasy( NotesType nt ) const;
|
||||||
Grade GetGradeForDifficultyClass( NotesType nt, DifficultyClass dc ) const;
|
Grade GetGradeForDifficultyClass( const StyleDef *s, int p, DifficultyClass dc ) const;
|
||||||
bool NormallyDisplayed() const;
|
bool NormallyDisplayed() const;
|
||||||
bool RouletteDisplayed() const;
|
bool RouletteDisplayed() const;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user