Remove multiple notetypes per style. Not used, just clutter now.
This commit is contained in:
@@ -184,10 +184,8 @@ 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) &&
|
||||||
GAMESTATE->GetCurrentStyleDef()->MatchesNotesType(pNotes->m_NotesType, 0) )
|
GAMESTATE->GetCurrentStyleDef()->MatchesNotesType(pNotes->m_NotesType) )
|
||||||
return pNotes;
|
return pNotes;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -199,7 +197,7 @@ Notes* Course::GetNotesForStage( int iStage )
|
|||||||
{
|
{
|
||||||
Notes* pNotes = pSong->m_apNotes[i];
|
Notes* pNotes = pSong->m_apNotes[i];
|
||||||
if( pNotes->m_Difficulty == dc &&
|
if( pNotes->m_Difficulty == dc &&
|
||||||
GAMESTATE->GetCurrentStyleDef()->MatchesNotesType(pNotes->m_NotesType, 0) )
|
GAMESTATE->GetCurrentStyleDef()->MatchesNotesType(pNotes->m_NotesType) )
|
||||||
return pNotes;
|
return pNotes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -382,7 +382,7 @@ StyleDef g_StyleDefs[NUM_STYLES] =
|
|||||||
true, // m_bUsedForGameplay
|
true, // m_bUsedForGameplay
|
||||||
true, // m_bUsedForEdit
|
true, // m_bUsedForEdit
|
||||||
"single", // m_szName
|
"single", // m_szName
|
||||||
{ NOTES_TYPE_DANCE_SINGLE,NOTES_TYPE_DANCE_SINGLE }, // m_NotesTypes
|
NOTES_TYPE_DANCE_SINGLE, // m_NotesType
|
||||||
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
|
||||||
@@ -409,7 +409,7 @@ StyleDef g_StyleDefs[NUM_STYLES] =
|
|||||||
true, // m_bUsedForGameplay
|
true, // m_bUsedForGameplay
|
||||||
false, // m_bUsedForEdit
|
false, // m_bUsedForEdit
|
||||||
"versus", // m_szName
|
"versus", // m_szName
|
||||||
{ NOTES_TYPE_DANCE_SINGLE,NOTES_TYPE_DANCE_SINGLE }, // m_NotesTypes
|
NOTES_TYPE_DANCE_SINGLE, // m_NotesType
|
||||||
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
|
||||||
@@ -436,7 +436,7 @@ StyleDef g_StyleDefs[NUM_STYLES] =
|
|||||||
true, // m_bUsedForGameplay
|
true, // m_bUsedForGameplay
|
||||||
true, // m_bUsedForEdit
|
true, // m_bUsedForEdit
|
||||||
"double", // m_szName
|
"double", // m_szName
|
||||||
{ NOTES_TYPE_DANCE_DOUBLE,NOTES_TYPE_DANCE_DOUBLE }, // m_NotesTypes
|
NOTES_TYPE_DANCE_DOUBLE, // m_NotesType
|
||||||
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
|
||||||
@@ -471,7 +471,7 @@ StyleDef g_StyleDefs[NUM_STYLES] =
|
|||||||
true, // m_bUsedForGameplay
|
true, // m_bUsedForGameplay
|
||||||
false, // m_bUsedForEdit
|
false, // m_bUsedForEdit
|
||||||
"couple", // m_szName
|
"couple", // m_szName
|
||||||
{ NOTES_TYPE_DANCE_COUPLE, NOTES_TYPE_DANCE_COUPLE }, // m_NotesTypes
|
NOTES_TYPE_DANCE_COUPLE, // m_NotesType
|
||||||
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
|
||||||
@@ -498,7 +498,7 @@ StyleDef g_StyleDefs[NUM_STYLES] =
|
|||||||
true, // m_bUsedForGameplay
|
true, // m_bUsedForGameplay
|
||||||
true, // m_bUsedForEdit
|
true, // m_bUsedForEdit
|
||||||
"solo", // m_szName
|
"solo", // m_szName
|
||||||
{ NOTES_TYPE_DANCE_SOLO,NOTES_TYPE_DANCE_SOLO }, // m_NotesTypes
|
NOTES_TYPE_DANCE_SOLO, // m_NotesType
|
||||||
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
|
||||||
@@ -528,8 +528,8 @@ StyleDef g_StyleDefs[NUM_STYLES] =
|
|||||||
GAME_DANCE, // m_Game
|
GAME_DANCE, // m_Game
|
||||||
false, // m_bUsedForGameplay
|
false, // m_bUsedForGameplay
|
||||||
true, // m_bUsedForEdit
|
true, // m_bUsedForEdit
|
||||||
"couple (edit)", // m_szName
|
"couple (edit)", // m_szName
|
||||||
{ NOTES_TYPE_DANCE_COUPLE, NOTES_TYPE_DANCE_COUPLE }, // m_NotesTypes
|
NOTES_TYPE_DANCE_COUPLE, // m_NotesType
|
||||||
StyleDef::ONE_PLAYER_ONE_CREDIT, // m_StyleType
|
StyleDef::ONE_PLAYER_ONE_CREDIT, // m_StyleType
|
||||||
{ 160, 480 }, // m_iCenterX
|
{ 160, 480 }, // m_iCenterX
|
||||||
8, // m_iColsPerPlayer
|
8, // m_iColsPerPlayer
|
||||||
@@ -592,7 +592,7 @@ StyleDef g_StyleDefs[NUM_STYLES] =
|
|||||||
true, // m_bUsedForGameplay
|
true, // m_bUsedForGameplay
|
||||||
true, // m_bUsedForEdit
|
true, // m_bUsedForEdit
|
||||||
"single", // m_szName
|
"single", // m_szName
|
||||||
{ NOTES_TYPE_PUMP_SINGLE,NOTES_TYPE_PUMP_SINGLE }, // m_NotesTypes
|
NOTES_TYPE_PUMP_SINGLE, // m_NotesType
|
||||||
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
|
||||||
@@ -621,7 +621,7 @@ StyleDef g_StyleDefs[NUM_STYLES] =
|
|||||||
true, // m_bUsedForGameplay
|
true, // m_bUsedForGameplay
|
||||||
false, // m_bUsedForEdit
|
false, // m_bUsedForEdit
|
||||||
"versus", // m_szName
|
"versus", // m_szName
|
||||||
{ NOTES_TYPE_PUMP_SINGLE,NOTES_TYPE_PUMP_SINGLE }, // m_NotesTypes
|
NOTES_TYPE_PUMP_SINGLE, // m_NotesType
|
||||||
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
|
||||||
@@ -650,7 +650,7 @@ StyleDef g_StyleDefs[NUM_STYLES] =
|
|||||||
true, // m_bUsedForGameplay
|
true, // m_bUsedForGameplay
|
||||||
true, // m_bUsedForEdit
|
true, // m_bUsedForEdit
|
||||||
"double", // m_szName
|
"double", // m_szName
|
||||||
{ NOTES_TYPE_PUMP_DOUBLE,NOTES_TYPE_PUMP_DOUBLE }, // m_NotesTypes
|
NOTES_TYPE_PUMP_DOUBLE, // m_NotesType
|
||||||
StyleDef::ONE_PLAYER_TWO_CREDITS, // m_StyleType
|
StyleDef::ONE_PLAYER_TWO_CREDITS, // m_StyleType
|
||||||
{ 320, 320 }, // m_iCenterX
|
{ 320, 320 }, // m_iCenterX
|
||||||
10, // m_iColsPerPlayer
|
10, // m_iColsPerPlayer
|
||||||
@@ -689,7 +689,7 @@ StyleDef g_StyleDefs[NUM_STYLES] =
|
|||||||
true, // m_bUsedForGameplay
|
true, // m_bUsedForGameplay
|
||||||
false, // m_bUsedForEdit
|
false, // m_bUsedForEdit
|
||||||
"couple", // m_szName
|
"couple", // m_szName
|
||||||
{ NOTES_TYPE_PUMP_COUPLE,NOTES_TYPE_PUMP_COUPLE}, // m_NotesTypes
|
NOTES_TYPE_PUMP_COUPLE, // m_NotesType
|
||||||
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
|
||||||
@@ -718,7 +718,7 @@ StyleDef g_StyleDefs[NUM_STYLES] =
|
|||||||
false, // m_bUsedForGameplay
|
false, // m_bUsedForGameplay
|
||||||
true, // m_bUsedForEdit
|
true, // m_bUsedForEdit
|
||||||
"couple (edit)", // m_szName
|
"couple (edit)", // m_szName
|
||||||
{ NOTES_TYPE_PUMP_COUPLE,NOTES_TYPE_PUMP_COUPLE}, // m_NotesTypes
|
NOTES_TYPE_PUMP_COUPLE, // m_NotesType
|
||||||
StyleDef::ONE_PLAYER_ONE_CREDIT, // m_StyleType
|
StyleDef::ONE_PLAYER_ONE_CREDIT, // m_StyleType
|
||||||
{ 160, 480 }, // m_iCenterX
|
{ 160, 480 }, // m_iCenterX
|
||||||
10, // m_iColsPerPlayer
|
10, // m_iColsPerPlayer
|
||||||
@@ -752,7 +752,7 @@ StyleDef g_StyleDefs[NUM_STYLES] =
|
|||||||
true, // m_bUsedForGameplay
|
true, // m_bUsedForGameplay
|
||||||
true, // m_bUsedForEdit
|
true, // m_bUsedForEdit
|
||||||
"single", // m_szName
|
"single", // m_szName
|
||||||
{ NOTES_TYPE_EZ2_SINGLE,NOTES_TYPE_EZ2_SINGLE }, // m_NotesTypes
|
NOTES_TYPE_EZ2_SINGLE, // m_NotesType
|
||||||
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
|
||||||
@@ -781,7 +781,7 @@ StyleDef g_StyleDefs[NUM_STYLES] =
|
|||||||
true, // m_bUsedForGameplay
|
true, // m_bUsedForGameplay
|
||||||
true, // m_bUsedForEdit
|
true, // m_bUsedForEdit
|
||||||
"real", // m_szName
|
"real", // m_szName
|
||||||
{ NOTES_TYPE_EZ2_REAL,NOTES_TYPE_EZ2_REAL }, // m_NotesTypes
|
NOTES_TYPE_EZ2_REAL, // m_NotesType
|
||||||
StyleDef::ONE_PLAYER_ONE_CREDIT, // m_StyleType
|
StyleDef::ONE_PLAYER_ONE_CREDIT, // m_StyleType
|
||||||
{ 160, 480 }, // m_iCenterX
|
{ 160, 480 }, // m_iCenterX
|
||||||
7, // m_iColsPerPlayer
|
7, // m_iColsPerPlayer
|
||||||
@@ -814,7 +814,7 @@ StyleDef g_StyleDefs[NUM_STYLES] =
|
|||||||
true, // m_bUsedForGameplay
|
true, // m_bUsedForGameplay
|
||||||
true, // m_bUsedForEdit
|
true, // m_bUsedForEdit
|
||||||
"versus", // m_szName
|
"versus", // m_szName
|
||||||
{ NOTES_TYPE_EZ2_SINGLE,NOTES_TYPE_EZ2_SINGLE }, // m_NotesTypes
|
NOTES_TYPE_EZ2_SINGLE, // m_NotesType
|
||||||
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
|
||||||
@@ -843,7 +843,7 @@ StyleDef g_StyleDefs[NUM_STYLES] =
|
|||||||
true, // m_bUsedForGameplay
|
true, // m_bUsedForGameplay
|
||||||
true, // m_bUsedForEdit
|
true, // m_bUsedForEdit
|
||||||
"versusReal", // m_szName
|
"versusReal", // m_szName
|
||||||
{ NOTES_TYPE_EZ2_REAL,NOTES_TYPE_EZ2_REAL }, // m_NotesTypes
|
NOTES_TYPE_EZ2_REAL, // m_NotesType
|
||||||
StyleDef::TWO_PLAYERS_TWO_CREDITS, // m_StyleType
|
StyleDef::TWO_PLAYERS_TWO_CREDITS, // m_StyleType
|
||||||
{ 160, 480 }, // m_iCenterX
|
{ 160, 480 }, // m_iCenterX
|
||||||
7, // m_iColsPerPlayer
|
7, // m_iColsPerPlayer
|
||||||
@@ -876,7 +876,7 @@ StyleDef g_StyleDefs[NUM_STYLES] =
|
|||||||
true, // m_bUsedForGameplay
|
true, // m_bUsedForGameplay
|
||||||
true, // m_bUsedForEdit
|
true, // m_bUsedForEdit
|
||||||
"double", // m_szName
|
"double", // m_szName
|
||||||
{ NOTES_TYPE_EZ2_DOUBLE,NOTES_TYPE_EZ2_DOUBLE }, // m_NotesTypes
|
NOTES_TYPE_EZ2_DOUBLE, // m_NotesType
|
||||||
StyleDef::ONE_PLAYER_ONE_CREDIT, // m_StyleType
|
StyleDef::ONE_PLAYER_ONE_CREDIT, // m_StyleType
|
||||||
{ 320, 320 }, // m_iCenterX
|
{ 320, 320 }, // m_iCenterX
|
||||||
10, // m_iColsPerPlayer
|
10, // m_iColsPerPlayer
|
||||||
@@ -915,7 +915,7 @@ StyleDef g_StyleDefs[NUM_STYLES] =
|
|||||||
true, // m_bUsedForGameplay
|
true, // m_bUsedForGameplay
|
||||||
true, // m_bUsedForEdit
|
true, // m_bUsedForEdit
|
||||||
"single", // m_szName
|
"single", // m_szName
|
||||||
{ NOTES_TYPE_PARA,NOTES_TYPE_PARA}, // m_NotesTypes
|
NOTES_TYPE_PARA, // m_NotesType
|
||||||
StyleDef::ONE_PLAYER_ONE_CREDIT, // m_StyleType
|
StyleDef::ONE_PLAYER_ONE_CREDIT, // m_StyleType
|
||||||
{ 320, 320 }, // m_iCenterX
|
{ 320, 320 }, // m_iCenterX
|
||||||
5, // m_iColsPerPlayer
|
5, // m_iColsPerPlayer
|
||||||
@@ -1210,7 +1210,7 @@ void GameManager::GetNotesTypesForGame( Game game, CArray<NotesType,NotesType>&
|
|||||||
continue;
|
continue;
|
||||||
for( int pl = 0; !found && pl < NUM_PLAYERS; ++pl)
|
for( int pl = 0; !found && pl < NUM_PLAYERS; ++pl)
|
||||||
{
|
{
|
||||||
if( g_StyleDefs[s].m_NotesTypes[pl] != nt )
|
if( g_StyleDefs[s].m_NotesType != nt )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
found=true;
|
found=true;
|
||||||
|
|||||||
@@ -348,7 +348,6 @@ 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -448,7 +447,7 @@ void MusicWheel::BuildWheelItemDatas( CArray<WheelItemData, WheelItemData&> &arr
|
|||||||
}
|
}
|
||||||
|
|
||||||
CArray<Notes*, Notes*> arraySteps;
|
CArray<Notes*, Notes*> arraySteps;
|
||||||
pSong->GetNotesThatMatch( GAMESTATE->GetCurrentStyleDef(), 0, arraySteps );
|
pSong->GetNotesThatMatch( GAMESTATE->GetCurrentStyleDef()->m_NotesType, arraySteps );
|
||||||
|
|
||||||
if( arraySteps.GetSize() > 0 )
|
if( arraySteps.GetSize() > 0 )
|
||||||
arraySongs.Add( pSong );
|
arraySongs.Add( pSong );
|
||||||
@@ -611,7 +610,7 @@ void MusicWheel::BuildWheelItemDatas( CArray<WheelItemData, WheelItemData&> &arr
|
|||||||
if( pSong == NULL )
|
if( pSong == NULL )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
bool bIsEasy = pSong->IsEasy( GAMESTATE->GetCurrentStyleDef()->m_NotesTypes[0] );
|
bool bIsEasy = pSong->IsEasy( GAMESTATE->GetCurrentStyleDef()->m_NotesType );
|
||||||
WheelItemData& WID = arrayWheelItemDatas[i];
|
WheelItemData& WID = arrayWheelItemDatas[i];
|
||||||
WID.m_IconType = bIsEasy ? MusicStatusDisplay::easy : MusicStatusDisplay::none;
|
WID.m_IconType = bIsEasy ? MusicStatusDisplay::easy : MusicStatusDisplay::none;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -206,7 +206,8 @@ void NoteData::AddHoldNote( HoldNote add )
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
// look for other hold notes that overlap and merge them
|
// look for other hold notes that overlap and merge them
|
||||||
// XXX: this is done implicitly with 4s
|
// XXX: this is done implicitly with 4s, but 4s uses this function.
|
||||||
|
// Rework this later.
|
||||||
for( i=0; i<m_iNumHoldNotes; i++ ) // for each HoldNote
|
for( i=0; i<m_iNumHoldNotes; i++ ) // for each HoldNote
|
||||||
{
|
{
|
||||||
HoldNote &other = m_HoldNotes[i];
|
HoldNote &other = m_HoldNotes[i];
|
||||||
@@ -509,8 +510,7 @@ 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...
|
||||||
/* XXX: This assumes each NotesType in a style turns the same. */
|
switch( GAMESTATE->GetCurrentStyleDef()->m_NotesType )
|
||||||
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:
|
||||||
|
|||||||
@@ -188,7 +188,7 @@ ScreenEdit::ScreenEdit()
|
|||||||
{
|
{
|
||||||
m_pNotes = new Notes;
|
m_pNotes = new Notes;
|
||||||
m_pNotes->m_Difficulty = DIFFICULTY_MEDIUM;
|
m_pNotes->m_Difficulty = DIFFICULTY_MEDIUM;
|
||||||
m_pNotes->m_NotesType = GAMESTATE->GetCurrentStyleDef()->m_NotesTypes[0];
|
m_pNotes->m_NotesType = GAMESTATE->GetCurrentStyleDef()->m_NotesType;
|
||||||
m_pNotes->m_sDescription = "Untitled";
|
m_pNotes->m_sDescription = "Untitled";
|
||||||
|
|
||||||
// In ScreenEditMenu, the screen preceding this one,
|
// In ScreenEditMenu, the screen preceding this one,
|
||||||
|
|||||||
@@ -726,7 +726,7 @@ void ScreenSelectMusic::AfterMusicChange()
|
|||||||
m_fPlaySampleCountdown = SAMPLE_MUSIC_DELAY;
|
m_fPlaySampleCountdown = SAMPLE_MUSIC_DELAY;
|
||||||
|
|
||||||
for( int pn = 0; pn < NUM_PLAYERS; ++pn) {
|
for( int pn = 0; pn < NUM_PLAYERS; ++pn) {
|
||||||
pSong->GetNotesThatMatch( GAMESTATE->GetCurrentStyleDef(), pn, m_arrayNotes[pn] );
|
pSong->GetNotesThatMatch( GAMESTATE->GetCurrentStyleDef()->m_NotesType, m_arrayNotes[pn] );
|
||||||
SortNotesArrayByDifficulty( m_arrayNotes[pn] );
|
SortNotesArrayByDifficulty( m_arrayNotes[pn] );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+5
-15
@@ -574,12 +574,6 @@ void Song::TidyUpData()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get Notes that match a given style and player. */
|
|
||||||
void Song::GetNotesThatMatch( const StyleDef *s, int p, CArray<Notes*, Notes*>& arrayAddTo ) const
|
|
||||||
{
|
|
||||||
GetNotesThatMatch( s->m_NotesTypes[p], arrayAddTo );
|
|
||||||
}
|
|
||||||
|
|
||||||
void Song::GetNotesThatMatch( NotesType nt, CArray<Notes*, Notes*>& arrayAddTo ) const
|
void Song::GetNotesThatMatch( NotesType nt, 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
|
||||||
@@ -592,12 +586,8 @@ void Song::GetNotesThatMatch( NotesType nt, CArray<Notes*, Notes*>& arrayAddTo )
|
|||||||
/* Return whether the song is playable in the given style. */
|
/* Return whether the song is playable in the given style. */
|
||||||
bool Song::SongCompleteForStyle( const StyleDef *st ) const
|
bool Song::SongCompleteForStyle( const StyleDef *st ) const
|
||||||
{
|
{
|
||||||
for( int pn = 0; pn < NUM_PLAYERS; ++pn )
|
if(!SongHasNotesType(st->m_NotesType))
|
||||||
{
|
return false;
|
||||||
if(st->m_NotesTypes[pn] == NOTES_TYPE_INVALID) continue; /* unused */
|
|
||||||
if(!SongHasNotesType(st->m_NotesTypes[pn]))
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -802,7 +792,7 @@ Grade Song::GetGradeForDifficulty( const StyleDef *st, int p, Difficulty dc ) co
|
|||||||
{
|
{
|
||||||
// return max grade of notes in difficulty class
|
// return max grade of notes in difficulty class
|
||||||
CArray<Notes*, Notes*> aNotes;
|
CArray<Notes*, Notes*> aNotes;
|
||||||
this->GetNotesThatMatch( st, p, aNotes );
|
this->GetNotesThatMatch( st->m_NotesType, aNotes );
|
||||||
SortNotesArrayByDifficulty( aNotes );
|
SortNotesArrayByDifficulty( aNotes );
|
||||||
|
|
||||||
Grade grade = GRADE_NO_DATA;
|
Grade grade = GRADE_NO_DATA;
|
||||||
@@ -869,8 +859,8 @@ int CompareSongPointersByDifficulty(const void *arg1, const void *arg2)
|
|||||||
CArray<Notes*,Notes*> aNotes1;
|
CArray<Notes*,Notes*> aNotes1;
|
||||||
CArray<Notes*,Notes*> aNotes2;
|
CArray<Notes*,Notes*> aNotes2;
|
||||||
|
|
||||||
pSong1->GetNotesThatMatch( GAMESTATE->GetCurrentStyleDef(), PLAYER_1, aNotes1 );
|
pSong1->GetNotesThatMatch( GAMESTATE->GetCurrentStyleDef()->m_NotesType, aNotes1 );
|
||||||
pSong2->GetNotesThatMatch( GAMESTATE->GetCurrentStyleDef(), PLAYER_1, aNotes2 );
|
pSong2->GetNotesThatMatch( GAMESTATE->GetCurrentStyleDef()->m_NotesType, aNotes2 );
|
||||||
|
|
||||||
int iEasiestMeter1 = 1000; // infinity
|
int iEasiestMeter1 = 1000; // infinity
|
||||||
int iEasiestMeter2 = 1000; // infinity
|
int iEasiestMeter2 = 1000; // infinity
|
||||||
|
|||||||
@@ -543,7 +543,7 @@ void SongManager::GetExtraStageInfo( bool bExtra2, CString sPreferredGroup, cons
|
|||||||
Song* pSong = apSongs[s];
|
Song* pSong = apSongs[s];
|
||||||
|
|
||||||
CArray<Notes*,Notes*> apNotes;
|
CArray<Notes*,Notes*> apNotes;
|
||||||
pSong->GetNotesThatMatch( sd, 0, apNotes );
|
pSong->GetNotesThatMatch( sd->m_NotesType, 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];
|
||||||
@@ -619,10 +619,8 @@ bool SongManager::ChooseRandomSong()
|
|||||||
|
|
||||||
for( int j=0; j<3; j++ ) // try 3 times
|
for( int j=0; j<3; j++ ) // try 3 times
|
||||||
{
|
{
|
||||||
/* 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_NotesTypes[0] )
|
if( pNotes->m_NotesType != GAMESTATE->GetCurrentStyleDef()->m_NotesType )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// found something we can use!
|
// found something we can use!
|
||||||
|
|||||||
@@ -265,7 +265,7 @@ void SongSelector::OnNotesTypeChange()
|
|||||||
m_textStyle.SetText( GAMEMAN->GetStyleDefForStyle(GetSelectedStyle())->m_szName );
|
m_textStyle.SetText( GAMEMAN->GetStyleDefForStyle(GetSelectedStyle())->m_szName );
|
||||||
|
|
||||||
m_pNotess.RemoveAll();
|
m_pNotess.RemoveAll();
|
||||||
GetSelectedSong()->GetNotesThatMatch( GAMEMAN->GetStyleDefForStyle(GetSelectedStyle()), 0, m_pNotess );
|
GetSelectedSong()->GetNotesThatMatch( GAMEMAN->GetStyleDefForStyle(GetSelectedStyle())->m_NotesType, 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;
|
||||||
|
|||||||
@@ -81,9 +81,9 @@ PlayerNumber StyleDef::ControllerToPlayerNumber( GameController controller ) con
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool StyleDef::MatchesNotesType( NotesType type, int pn ) const
|
bool StyleDef::MatchesNotesType( NotesType type ) const
|
||||||
{
|
{
|
||||||
if(type == m_NotesTypes[pn]) return true;
|
if(type == m_NotesType) return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,11 +40,9 @@ 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];
|
||||||
|
|
||||||
/* m_NotesTypes[] defines the notes format used for each player. For
|
/* Notes format used for each player. For example, "dance versus" reads
|
||||||
* example, the "dance versus" reads the Notes with the tag "dance-single".
|
* the Notes with the tag "dance-single". */
|
||||||
* For most modes, this will be the same for all styles; it's different
|
NotesType m_NotesType;
|
||||||
* for each player in couples. */
|
|
||||||
NotesType m_NotesTypes[NUM_PLAYERS];
|
|
||||||
|
|
||||||
enum StyleType
|
enum StyleType
|
||||||
{
|
{
|
||||||
@@ -74,6 +72,6 @@ public:
|
|||||||
|
|
||||||
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;
|
bool MatchesNotesType( NotesType type ) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -186,7 +186,6 @@ public:
|
|||||||
bool SongCompleteForStyle( const StyleDef *st ) const;
|
bool SongCompleteForStyle( const StyleDef *st ) const;
|
||||||
bool SongHasNotesType( NotesType nt ) const;
|
bool SongHasNotesType( NotesType nt ) const;
|
||||||
bool SongHasNotesTypeAndDifficulty( NotesType nt, Difficulty dc ) const;
|
bool SongHasNotesTypeAndDifficulty( NotesType nt, Difficulty dc ) const;
|
||||||
void GetNotesThatMatch( const StyleDef *s, int p, CArray<Notes*, Notes*>& arrayAddTo ) const;
|
|
||||||
void GetNotesThatMatch( NotesType nt, CArray<Notes*, Notes*>& arrayAddTo ) const;
|
void GetNotesThatMatch( NotesType nt, CArray<Notes*, Notes*>& arrayAddTo ) const;
|
||||||
int GetNumTimesPlayed() const;
|
int GetNumTimesPlayed() const;
|
||||||
bool IsNew() const;
|
bool IsNew() const;
|
||||||
|
|||||||
Reference in New Issue
Block a user