Autogen group Nonstop courses in addition to group Endless courses
Add toggle for Autogen of missing NotesTypes Add toggle for Autogen Nonstop and Endless courses
This commit is contained in:
@@ -25,9 +25,12 @@ NEW FEATURE: Added SKIPPY transform
|
|||||||
BUG FIX: Fixed song seeking in editor at non 1x music rates
|
BUG FIX: Fixed song seeking in editor at non 1x music rates
|
||||||
NEW FEATURE: More complete controls for BackgroundChanges in editor
|
NEW FEATURE: More complete controls for BackgroundChanges in editor
|
||||||
NEW FEATURE: Shift+P in editor for "play current beat until end"
|
NEW FEATURE: Shift+P in editor for "play current beat until end"
|
||||||
|
NEW FEATURE: Select between Normal and Difficult in Nonstop and Endless mode
|
||||||
CHANGE: Nonstop and Oni scoring and combo counter behave exactly like DDREX
|
CHANGE: Nonstop and Oni scoring and combo counter behave exactly like DDREX
|
||||||
CHANGE: HoldNote life snaps to full when button is pressed (instead of
|
CHANGE: HoldNote life snaps to full when button is pressed (instead of
|
||||||
refilling slowly) ala DDR
|
refilling slowly) ala DDR
|
||||||
|
NEW FEATURE: Toggle for Autogen of missing steps
|
||||||
|
NEW FEATURE: Toggle for Autogen of group Nonstop and Endless Courses
|
||||||
|
|
||||||
----------------------- Version 3.01 ---------------------------
|
----------------------- Version 3.01 ---------------------------
|
||||||
CHANGE: Simplified NoteSkin tap graphic format. Old NoteSkins will need to
|
CHANGE: Simplified NoteSkin tap graphic format. Old NoteSkins will need to
|
||||||
|
|||||||
@@ -1075,6 +1075,11 @@ WheelSections=ALWAYS means sections in group + ABC; NEVER means no sections;::AB
|
|||||||
Translations=Choose whether to displays song titles in their native::language (日本語), or to transliterate when possible
|
Translations=Choose whether to displays song titles in their native::language (日本語), or to transliterate when possible
|
||||||
Lyrics=Choose whether to show lyrics if a song::has them available (LRC File)
|
Lyrics=Choose whether to show lyrics if a song::has them available (LRC File)
|
||||||
|
|
||||||
|
[ScreenAutogenOptions]
|
||||||
|
HelpText=&UP; &DOWN; to change line &LEFT; &RIGHT; to select between options::START to accept changes BACK to discard changes
|
||||||
|
AutogenMissingTypes=Show steps for songs that were created by Autogen.
|
||||||
|
AutogenGroupCourses=Show group Nonstop and Endless courses that::were created by Autogen.
|
||||||
|
|
||||||
[ScreenUnlock]
|
[ScreenUnlock]
|
||||||
NextScreen=ScreenRanking
|
NextScreen=ScreenRanking
|
||||||
|
|
||||||
@@ -1205,6 +1210,7 @@ GraphicOptions=
|
|||||||
GameplayOptions=
|
GameplayOptions=
|
||||||
AppearanceOptions=
|
AppearanceOptions=
|
||||||
SoundOptions=
|
SoundOptions=
|
||||||
|
AutogenOptions=
|
||||||
|
|
||||||
[TextBanner]
|
[TextBanner]
|
||||||
Width=180
|
Width=180
|
||||||
|
|||||||
+44
-25
@@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
Course::Course()
|
Course::Course()
|
||||||
{
|
{
|
||||||
m_bIsAutoGen = false;
|
m_bIsAutogen = false;
|
||||||
m_bRepeat = false;
|
m_bRepeat = false;
|
||||||
m_bRandomize = false;
|
m_bRandomize = false;
|
||||||
m_bDifficult = false;
|
m_bDifficult = false;
|
||||||
@@ -240,9 +240,9 @@ void Course::LoadFromCRSFile( CString sPath )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Course::AutoGenEndlessFromGroupAndDifficulty( CString sGroupName, Difficulty dc, vector<Song*> &apSongsInGroup )
|
void Course::AutogenEndlessFromGroup( CString sGroupName, vector<Song*> &apSongsInGroup )
|
||||||
{
|
{
|
||||||
m_bIsAutoGen = true;
|
m_bIsAutogen = true;
|
||||||
m_bRepeat = true;
|
m_bRepeat = true;
|
||||||
m_bRandomize = true;
|
m_bRandomize = true;
|
||||||
m_iLives = -1;
|
m_iLives = -1;
|
||||||
@@ -255,26 +255,15 @@ void Course::AutoGenEndlessFromGroupAndDifficulty( CString sGroupName, Difficult
|
|||||||
if( !asPossibleBannerPaths.empty() )
|
if( !asPossibleBannerPaths.empty() )
|
||||||
m_sBannerPath = asPossibleBannerPaths[0];
|
m_sBannerPath = asPossibleBannerPaths[0];
|
||||||
|
|
||||||
CString sShortGroupName = SONGMAN->ShortenGroupName( sGroupName );
|
m_sName = SONGMAN->ShortenGroupName( sGroupName );
|
||||||
|
|
||||||
m_sName = sShortGroupName + " ";
|
|
||||||
switch( dc )
|
|
||||||
{
|
|
||||||
case DIFFICULTY_EASY: m_sName += "Easy"; break;
|
|
||||||
case DIFFICULTY_MEDIUM: m_sName += "Medium"; break;
|
|
||||||
case DIFFICULTY_HARD: m_sName += "Hard"; break;
|
|
||||||
default:
|
|
||||||
ASSERT(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
// only need one song because it repeats
|
|
||||||
// We want multiple songs, so we can try to prevent repeats during
|
// We want multiple songs, so we can try to prevent repeats during
|
||||||
// gameplay. (We might still get a repeat at the repeat boundary,
|
// gameplay. (We might still get a repeat at the repeat boundary,
|
||||||
// but that'd be rare.) -glenn
|
// but that'd be rare.) -glenn
|
||||||
Entry e;
|
Entry e;
|
||||||
e.type = Entry::random_within_group;
|
e.type = Entry::random_within_group;
|
||||||
e.group_name = sGroupName;
|
e.group_name = sGroupName;
|
||||||
e.difficulty = dc;
|
e.difficulty = DIFFICULTY_MEDIUM;
|
||||||
|
|
||||||
vector<Song*> vSongs;
|
vector<Song*> vSongs;
|
||||||
SONGMAN->GetSongs( vSongs, e.group_name );
|
SONGMAN->GetSongs( vSongs, e.group_name );
|
||||||
@@ -282,6 +271,21 @@ void Course::AutoGenEndlessFromGroupAndDifficulty( CString sGroupName, Difficult
|
|||||||
m_entries.push_back( e );
|
m_entries.push_back( e );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Course::AutogenNonstopFromGroup( CString sGroupName, vector<Song*> &apSongsInGroup )
|
||||||
|
{
|
||||||
|
AutogenEndlessFromGroup( sGroupName, apSongsInGroup );
|
||||||
|
|
||||||
|
m_bRepeat = false;
|
||||||
|
|
||||||
|
m_sName += " Random";
|
||||||
|
|
||||||
|
// resize to 4
|
||||||
|
while( m_entries.size() < 4 )
|
||||||
|
m_entries.push_back( m_entries[0] );
|
||||||
|
while( m_entries.size() > 4 )
|
||||||
|
m_entries.pop_back();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Course::HasDifficult() const
|
bool Course::HasDifficult() const
|
||||||
{
|
{
|
||||||
@@ -644,15 +648,7 @@ bool Course::MakeDifficult()
|
|||||||
//
|
//
|
||||||
// Sorting stuff
|
// Sorting stuff
|
||||||
//
|
//
|
||||||
static bool CompareCoursePointersByDifficulty(const Course* pCourse1, const Course* pCourse2)
|
static bool CompareCoursePointersByName(const Course* pCourse1, const Course* pCourse2)
|
||||||
{
|
|
||||||
int iNum1 = pCourse1->GetEstimatedNumStages();
|
|
||||||
int iNum2 = pCourse2->GetEstimatedNumStages();
|
|
||||||
if( iNum1 < iNum2 )
|
|
||||||
return true;
|
|
||||||
else if( iNum1 > iNum2 )
|
|
||||||
return false;
|
|
||||||
else // iNum1 == iNum2
|
|
||||||
{
|
{
|
||||||
// HACK: strcmp and other string comparators appear to eat whitespace.
|
// HACK: strcmp and other string comparators appear to eat whitespace.
|
||||||
// For example, the string "Players Best 13-16" is sorted between
|
// For example, the string "Players Best 13-16" is sorted between
|
||||||
@@ -668,6 +664,29 @@ static bool CompareCoursePointersByDifficulty(const Course* pCourse1, const Cour
|
|||||||
sName2.Replace( " " , " 0" );
|
sName2.Replace( " " , " 0" );
|
||||||
return sName1.CompareNoCase( sName2 ) == -1;
|
return sName1.CompareNoCase( sName2 ) == -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool CompareCoursePointersByAutogen(const Course* pCourse1, const Course* pCourse2)
|
||||||
|
{
|
||||||
|
int b1 = pCourse1->m_bIsAutogen;
|
||||||
|
int b2 = pCourse2->m_bIsAutogen;
|
||||||
|
if( b1 < b2 )
|
||||||
|
return true;
|
||||||
|
else if( b1 > b2 )
|
||||||
|
return false;
|
||||||
|
else
|
||||||
|
return CompareCoursePointersByName(pCourse1,pCourse2);
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool CompareCoursePointersByDifficulty(const Course* pCourse1, const Course* pCourse2)
|
||||||
|
{
|
||||||
|
int iNum1 = pCourse1->GetEstimatedNumStages();
|
||||||
|
int iNum2 = pCourse2->GetEstimatedNumStages();
|
||||||
|
if( iNum1 < iNum2 )
|
||||||
|
return true;
|
||||||
|
else if( iNum1 > iNum2 )
|
||||||
|
return false;
|
||||||
|
else // iNum1 == iNum2
|
||||||
|
return CompareCoursePointersByAutogen( pCourse1, pCourse2 );
|
||||||
}
|
}
|
||||||
|
|
||||||
void SortCoursePointerArrayByDifficulty( vector<Course*> &apCourses )
|
void SortCoursePointerArrayByDifficulty( vector<Course*> &apCourses )
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ class Course
|
|||||||
public:
|
public:
|
||||||
Course();
|
Course();
|
||||||
|
|
||||||
bool m_bIsAutoGen; // was this created by AutoGen?
|
bool m_bIsAutogen; // was this created by AutoGen?
|
||||||
CString m_sPath;
|
CString m_sPath;
|
||||||
CString m_sName;
|
CString m_sName;
|
||||||
CString m_sBannerPath;
|
CString m_sBannerPath;
|
||||||
@@ -81,7 +81,8 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
void LoadFromCRSFile( CString sPath );
|
void LoadFromCRSFile( CString sPath );
|
||||||
void AutoGenEndlessFromGroupAndDifficulty( CString sGroupName, Difficulty dc, vector<Song*> &apSongsInGroup );
|
void AutogenEndlessFromGroup( CString sGroupName, vector<Song*> &apSongsInGroup );
|
||||||
|
void AutogenNonstopFromGroup( CString sGroupName, vector<Song*> &apSongsInGroup );
|
||||||
|
|
||||||
|
|
||||||
// Statistics
|
// Statistics
|
||||||
|
|||||||
@@ -265,7 +265,7 @@ void MusicWheel::GetSongList(vector<Song*> &arraySongs, bool bRoulette )
|
|||||||
}
|
}
|
||||||
|
|
||||||
vector<Notes*> arraySteps;
|
vector<Notes*> arraySteps;
|
||||||
pSong->GetNotes( arraySteps, GAMESTATE->GetCurrentStyleDef()->m_NotesType );
|
pSong->GetNotes( arraySteps, GAMESTATE->GetCurrentStyleDef()->m_NotesType, DIFFICULTY_INVALID, -1, -1, "", PREFSMAN->m_bAutogenMissingTypes );
|
||||||
|
|
||||||
if( !arraySteps.empty() )
|
if( !arraySteps.empty() )
|
||||||
arraySongs.push_back( pSong );
|
arraySongs.push_back( pSong );
|
||||||
@@ -453,9 +453,9 @@ void MusicWheel::BuildWheelItemDatas( vector<WheelItemData> &arrayWheelItemDatas
|
|||||||
vector<Course*> apCourses;
|
vector<Course*> apCourses;
|
||||||
switch( GAMESTATE->m_PlayMode )
|
switch( GAMESTATE->m_PlayMode )
|
||||||
{
|
{
|
||||||
case PLAY_MODE_NONSTOP: SONGMAN->GetNonstopCourses( apCourses ); break;
|
case PLAY_MODE_NONSTOP: SONGMAN->GetNonstopCourses( apCourses, PREFSMAN->m_bAutogenGroupCourses ); break;
|
||||||
case PLAY_MODE_ONI: SONGMAN->GetOniCourses( apCourses ); break;
|
case PLAY_MODE_ONI: SONGMAN->GetOniCourses( apCourses, PREFSMAN->m_bAutogenGroupCourses ); break;
|
||||||
case PLAY_MODE_ENDLESS: SONGMAN->GetEndlessCourses( apCourses ); break;
|
case PLAY_MODE_ENDLESS: SONGMAN->GetEndlessCourses( apCourses, PREFSMAN->m_bAutogenGroupCourses ); break;
|
||||||
default: ASSERT(0);
|
default: ASSERT(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -89,6 +89,8 @@ PrefsManager::PrefsManager()
|
|||||||
m_bDancePointsForOni = false; //DDR-Extreme style dance points instead of max2 percent
|
m_bDancePointsForOni = false; //DDR-Extreme style dance points instead of max2 percent
|
||||||
m_bTimestamping = false;
|
m_bTimestamping = false;
|
||||||
m_bShowLyrics = true;
|
m_bShowLyrics = true;
|
||||||
|
m_bAutogenMissingTypes = true;
|
||||||
|
m_bAutogenGroupCourses = true;
|
||||||
|
|
||||||
/* DDR Extreme-style extra stage support.
|
/* DDR Extreme-style extra stage support.
|
||||||
* Default off so people used to the current behavior (or those with extra
|
* Default off so people used to the current behavior (or those with extra
|
||||||
@@ -183,9 +185,10 @@ void PrefsManager::ReadGlobalPrefsFromDisk( bool bSwitchToLastPlayedGame )
|
|||||||
ini.GetValueB( "Options", "SoloSingle", m_bSoloSingle );
|
ini.GetValueB( "Options", "SoloSingle", m_bSoloSingle );
|
||||||
ini.GetValueB( "Options", "DancePointsForOni", m_bDancePointsForOni );
|
ini.GetValueB( "Options", "DancePointsForOni", m_bDancePointsForOni );
|
||||||
ini.GetValueB( "Options", "ShowLyrics", m_bShowLyrics );
|
ini.GetValueB( "Options", "ShowLyrics", m_bShowLyrics );
|
||||||
|
ini.GetValueB( "Options", "AutogenMissingTypes", m_bAutogenMissingTypes );
|
||||||
|
ini.GetValueB( "Options", "AutogenGroupCourses", m_bAutogenGroupCourses );
|
||||||
ini.GetValueB( "Options", "Timestamping", m_bTimestamping );
|
ini.GetValueB( "Options", "Timestamping", m_bTimestamping );
|
||||||
|
|
||||||
|
|
||||||
m_asAdditionalSongFolders.clear();
|
m_asAdditionalSongFolders.clear();
|
||||||
CString sAdditionalSongFolders;
|
CString sAdditionalSongFolders;
|
||||||
ini.GetValue( "Options", "AdditionalSongFolders", sAdditionalSongFolders );
|
ini.GetValue( "Options", "AdditionalSongFolders", sAdditionalSongFolders );
|
||||||
@@ -261,6 +264,8 @@ void PrefsManager::SaveGlobalPrefsToDisk()
|
|||||||
ini.SetValueB( "Options", "SoloSingle", m_bSoloSingle );
|
ini.SetValueB( "Options", "SoloSingle", m_bSoloSingle );
|
||||||
ini.SetValueB( "Options", "DancePointsForOni", m_bDancePointsForOni );
|
ini.SetValueB( "Options", "DancePointsForOni", m_bDancePointsForOni );
|
||||||
ini.SetValueB( "Options", "ShowLyrics", m_bShowLyrics );
|
ini.SetValueB( "Options", "ShowLyrics", m_bShowLyrics );
|
||||||
|
ini.SetValueB( "Options", "AutogenMissingTypes", m_bAutogenMissingTypes );
|
||||||
|
ini.SetValueB( "Options", "AutogenGroupCourses", m_bAutogenGroupCourses );
|
||||||
ini.SetValueB( "Options", "Timestamping", m_bTimestamping );
|
ini.SetValueB( "Options", "Timestamping", m_bTimestamping );
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -74,6 +74,8 @@ public:
|
|||||||
bool m_bDancePointsForOni;
|
bool m_bDancePointsForOni;
|
||||||
bool m_bTimestamping;
|
bool m_bTimestamping;
|
||||||
bool m_bShowLyrics;
|
bool m_bShowLyrics;
|
||||||
|
bool m_bAutogenMissingTypes;
|
||||||
|
bool m_bAutogenGroupCourses;
|
||||||
|
|
||||||
/* 0 = no; 1 = yes; -1 = auto (do whatever is appropriate for the arch). */
|
/* 0 = no; 1 = yes; -1 = auto (do whatever is appropriate for the arch). */
|
||||||
int m_iBoostAppPriority;
|
int m_iBoostAppPriority;
|
||||||
|
|||||||
@@ -270,6 +270,7 @@ void Screen::ClearMessageQueue( const ScreenMessage SM )
|
|||||||
#include "ScreenOptionsMenu.h"
|
#include "ScreenOptionsMenu.h"
|
||||||
#include "ScreenGameplayOptions.h"
|
#include "ScreenGameplayOptions.h"
|
||||||
#include "ScreenStyleSplash.h"
|
#include "ScreenStyleSplash.h"
|
||||||
|
#include "ScreenAutogenOptions.h"
|
||||||
|
|
||||||
Screen* Screen::Create( CString sClassName )
|
Screen* Screen::Create( CString sClassName )
|
||||||
{
|
{
|
||||||
@@ -326,6 +327,7 @@ Screen* Screen::Create( CString sClassName )
|
|||||||
else if( 0==stricmp(sClassName, "ScreenSoundOptions") ) ret = new ScreenSoundOptions;
|
else if( 0==stricmp(sClassName, "ScreenSoundOptions") ) ret = new ScreenSoundOptions;
|
||||||
else if( 0==stricmp(sClassName, "ScreenGameplayOptions") ) ret = new ScreenGameplayOptions;
|
else if( 0==stricmp(sClassName, "ScreenGameplayOptions") ) ret = new ScreenGameplayOptions;
|
||||||
else if( 0==stricmp(sClassName, "ScreenStyleSplash") ) ret = new ScreenStyleSplash;
|
else if( 0==stricmp(sClassName, "ScreenStyleSplash") ) ret = new ScreenStyleSplash;
|
||||||
|
else if( 0==stricmp(sClassName, "ScreenAutogenOptions") ) ret = new ScreenAutogenOptions;
|
||||||
else
|
else
|
||||||
RageException::Throw( "Invalid Screen class name '%s'", sClassName.GetString() );
|
RageException::Throw( "Invalid Screen class name '%s'", sClassName.GetString() );
|
||||||
return ret;
|
return ret;
|
||||||
|
|||||||
@@ -36,8 +36,7 @@ enum {
|
|||||||
MO_SHOW_SONG_OPTIONS,
|
MO_SHOW_SONG_OPTIONS,
|
||||||
NUM_MACHINE_OPTIONS_LINES
|
NUM_MACHINE_OPTIONS_LINES
|
||||||
};
|
};
|
||||||
/* Hmm. Ignore JoyAxes and Back Delayed probably belong in "input options",
|
|
||||||
* preferably alongside button configuration. */
|
|
||||||
OptionRow g_MachineOptionsLines[NUM_MACHINE_OPTIONS_LINES] = {
|
OptionRow g_MachineOptionsLines[NUM_MACHINE_OPTIONS_LINES] = {
|
||||||
OptionRow( "Menu\nTimer", "OFF","ON" ),
|
OptionRow( "Menu\nTimer", "OFF","ON" ),
|
||||||
OptionRow( "Arcade\nStages", "1","2","3","4","5","6","7","UNLIMITED" ),
|
OptionRow( "Arcade\nStages", "1","2","3","4","5","6","7","UNLIMITED" ),
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
#ifndef SCREENMACHINEOPTIONS_H
|
||||||
|
#define SCREENMACHINEOPTIONS_H
|
||||||
/*
|
/*
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
File: ScreenMachineOptions
|
File: ScreenMachineOptions
|
||||||
@@ -8,8 +10,6 @@
|
|||||||
Chris Danford
|
Chris Danford
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
#ifndef SCREEN_MACHINE_OPTIONS_H
|
|
||||||
#define SCREEN_MACHINE_OPTIONS_H
|
|
||||||
|
|
||||||
#include "ScreenOptions.h"
|
#include "ScreenOptions.h"
|
||||||
|
|
||||||
|
|||||||
@@ -24,11 +24,11 @@
|
|||||||
#include "GameManager.h"
|
#include "GameManager.h"
|
||||||
#include "GameState.h"
|
#include "GameState.h"
|
||||||
#include "ThemeManager.h"
|
#include "ThemeManager.h"
|
||||||
#include "ScreenMiniMenu.h"
|
|
||||||
|
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
OM_APPEARANCE = 0,
|
OM_APPEARANCE,
|
||||||
|
OM_AUTOGEN,
|
||||||
OM_CONFIG_KEY_JOY,
|
OM_CONFIG_KEY_JOY,
|
||||||
OM_INPUT,
|
OM_INPUT,
|
||||||
OM_GAMEPLAY,
|
OM_GAMEPLAY,
|
||||||
@@ -40,6 +40,7 @@ enum {
|
|||||||
|
|
||||||
OptionRow g_OptionsMenuLines[NUM_OPTIONS_MENU_LINES] = {
|
OptionRow g_OptionsMenuLines[NUM_OPTIONS_MENU_LINES] = {
|
||||||
OptionRow( "", "Appearance Options" ),
|
OptionRow( "", "Appearance Options" ),
|
||||||
|
OptionRow( "", "Autogen Options" ),
|
||||||
OptionRow( "", "Config Key/Joy Mappings" ),
|
OptionRow( "", "Config Key/Joy Mappings" ),
|
||||||
OptionRow( "", "Input Options" ),
|
OptionRow( "", "Input Options" ),
|
||||||
OptionRow( "", "Gameplay Options" ),
|
OptionRow( "", "Gameplay Options" ),
|
||||||
@@ -75,7 +76,6 @@ void ScreenOptionsMenu::ImportOptions()
|
|||||||
|
|
||||||
void ScreenOptionsMenu::ExportOptions()
|
void ScreenOptionsMenu::ExportOptions()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenOptionsMenu::GoToPrevState()
|
void ScreenOptionsMenu::GoToPrevState()
|
||||||
@@ -88,6 +88,7 @@ void ScreenOptionsMenu::GoToNextState()
|
|||||||
switch( this->m_iCurrentRow[0] )
|
switch( this->m_iCurrentRow[0] )
|
||||||
{
|
{
|
||||||
case OM_APPEARANCE: SCREENMAN->SetNewScreen("ScreenAppearanceOptions"); break;
|
case OM_APPEARANCE: SCREENMAN->SetNewScreen("ScreenAppearanceOptions"); break;
|
||||||
|
case OM_AUTOGEN: SCREENMAN->SetNewScreen("ScreenAutogenOptions"); break;
|
||||||
case OM_CONFIG_KEY_JOY: SCREENMAN->SetNewScreen("ScreenMapControllers"); break;
|
case OM_CONFIG_KEY_JOY: SCREENMAN->SetNewScreen("ScreenMapControllers"); break;
|
||||||
case OM_GAMEPLAY: SCREENMAN->SetNewScreen("ScreenGameplayOptions"); break;
|
case OM_GAMEPLAY: SCREENMAN->SetNewScreen("ScreenGameplayOptions"); break;
|
||||||
case OM_GRAPHIC: SCREENMAN->SetNewScreen("ScreenGraphicOptions"); break;
|
case OM_GRAPHIC: SCREENMAN->SetNewScreen("ScreenGraphicOptions"); break;
|
||||||
|
|||||||
@@ -64,9 +64,10 @@ SongManager::SongManager( LoadingWindow *ld )
|
|||||||
g_ExtraColor = EXTRA_COLOR;
|
g_ExtraColor = EXTRA_COLOR;
|
||||||
|
|
||||||
InitSongArrayFromDisk( ld );
|
InitSongArrayFromDisk( ld );
|
||||||
|
InitCoursesFromDisk();
|
||||||
|
InitAutogenCourses();
|
||||||
InitMachineScoresFromDisk();
|
InitMachineScoresFromDisk();
|
||||||
|
|
||||||
InitCoursesFromDisk();
|
|
||||||
} catch(...) {
|
} catch(...) {
|
||||||
SONGMAN = NULL;
|
SONGMAN = NULL;
|
||||||
throw;
|
throw;
|
||||||
@@ -418,7 +419,7 @@ void SongManager::SaveMachineScoresToDisk()
|
|||||||
Course* pCourse = m_pCourses[c];
|
Course* pCourse = m_pCourses[c];
|
||||||
ASSERT(pCourse);
|
ASSERT(pCourse);
|
||||||
|
|
||||||
if( pCourse->m_bIsAutoGen )
|
if( pCourse->m_bIsAutogen )
|
||||||
fprintf(fp, "%s\n", pCourse->m_sName.c_str());
|
fprintf(fp, "%s\n", pCourse->m_sName.c_str());
|
||||||
else
|
else
|
||||||
fprintf(fp, "%s\n", pCourse->m_sPath.c_str());
|
fprintf(fp, "%s\n", pCourse->m_sPath.c_str());
|
||||||
@@ -504,7 +505,7 @@ void SongManager::SaveMachineScoresToDisk()
|
|||||||
Course* pCourse = m_pCourses[i];
|
Course* pCourse = m_pCourses[i];
|
||||||
ASSERT(pCourse);
|
ASSERT(pCourse);
|
||||||
|
|
||||||
if( pCourse->m_bIsAutoGen )
|
if( pCourse->m_bIsAutogen )
|
||||||
fprintf(fp, "%s\n", pCourse->m_sName.c_str());
|
fprintf(fp, "%s\n", pCourse->m_sName.c_str());
|
||||||
else
|
else
|
||||||
fprintf(fp, "%s\n", pCourse->m_sPath.c_str());
|
fprintf(fp, "%s\n", pCourse->m_sPath.c_str());
|
||||||
@@ -654,7 +655,10 @@ void SongManager::InitCoursesFromDisk()
|
|||||||
pCourse->LoadFromCRSFile( saCourseFiles[i] );
|
pCourse->LoadFromCRSFile( saCourseFiles[i] );
|
||||||
m_pCourses.push_back( pCourse );
|
m_pCourses.push_back( pCourse );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void SongManager::InitAutogenCourses()
|
||||||
|
{
|
||||||
//
|
//
|
||||||
// Create group courses for Endless and Nonstop
|
// Create group courses for Endless and Nonstop
|
||||||
//
|
//
|
||||||
@@ -667,15 +671,18 @@ void SongManager::InitCoursesFromDisk()
|
|||||||
vector<Song*> apGroupSongs;
|
vector<Song*> apGroupSongs;
|
||||||
GetSongs( apGroupSongs, sGroupName );
|
GetSongs( apGroupSongs, sGroupName );
|
||||||
|
|
||||||
for( Difficulty dc=DIFFICULTY_EASY; dc<=DIFFICULTY_HARD; dc=Difficulty(dc+1) ) // foreach Difficulty
|
Course* pCourse;
|
||||||
{
|
|
||||||
Course* pCourse = new Course;
|
|
||||||
pCourse->AutoGenEndlessFromGroupAndDifficulty( sGroupName, dc, apGroupSongs );
|
|
||||||
|
|
||||||
|
pCourse = new Course;
|
||||||
|
pCourse->AutogenEndlessFromGroup( sGroupName, apGroupSongs );
|
||||||
|
m_pCourses.push_back( pCourse );
|
||||||
|
|
||||||
|
pCourse = new Course;
|
||||||
|
pCourse->AutogenNonstopFromGroup( sGroupName, apGroupSongs );
|
||||||
m_pCourses.push_back( pCourse );
|
m_pCourses.push_back( pCourse );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void SongManager::FreeCourses()
|
void SongManager::FreeCourses()
|
||||||
{
|
{
|
||||||
@@ -697,32 +704,29 @@ void SongManager::CleanData()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SongManager::GetNonstopCourses( vector<Course*> &AddTo )
|
void SongManager::GetNonstopCourses( vector<Course*> &AddTo, bool bIncludeAutogen )
|
||||||
{
|
{
|
||||||
for( unsigned i=0; i<m_pCourses.size(); i++ )
|
for( unsigned i=0; i<m_pCourses.size(); i++ )
|
||||||
{
|
|
||||||
if( !m_pCourses[i]->m_bRepeat && m_pCourses[i]->m_iLives <= 0 ) // use bar life meter
|
if( !m_pCourses[i]->m_bRepeat && m_pCourses[i]->m_iLives <= 0 ) // use bar life meter
|
||||||
|
if( bIncludeAutogen || !m_pCourses[i]->m_bIsAutogen )
|
||||||
AddTo.push_back( m_pCourses[i] );
|
AddTo.push_back( m_pCourses[i] );
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void SongManager::GetOniCourses( vector<Course*> &AddTo )
|
void SongManager::GetOniCourses( vector<Course*> &AddTo, bool bIncludeAutogen )
|
||||||
{
|
{
|
||||||
for( unsigned i=0; i<m_pCourses.size(); i++ )
|
for( unsigned i=0; i<m_pCourses.size(); i++ )
|
||||||
{
|
|
||||||
if( !m_pCourses[i]->m_bRepeat && m_pCourses[i]->m_iLives > 0 ) // use battery life meter
|
if( !m_pCourses[i]->m_bRepeat && m_pCourses[i]->m_iLives > 0 ) // use battery life meter
|
||||||
|
if( bIncludeAutogen || !m_pCourses[i]->m_bIsAutogen )
|
||||||
AddTo.push_back( m_pCourses[i] );
|
AddTo.push_back( m_pCourses[i] );
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void SongManager::GetEndlessCourses( vector<Course*> &AddTo )
|
void SongManager::GetEndlessCourses( vector<Course*> &AddTo, bool bIncludeAutogen )
|
||||||
{
|
{
|
||||||
for( unsigned i=0; i<m_pCourses.size(); i++ )
|
for( unsigned i=0; i<m_pCourses.size(); i++ )
|
||||||
{
|
|
||||||
if( m_pCourses[i]->m_bRepeat )
|
if( m_pCourses[i]->m_bRepeat )
|
||||||
|
if( bIncludeAutogen || !m_pCourses[i]->m_bIsAutogen )
|
||||||
AddTo.push_back( m_pCourses[i] );
|
AddTo.push_back( m_pCourses[i] );
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool SongManager::GetExtraStageInfoFromCourse( bool bExtra2, CString sPreferredGroup,
|
bool SongManager::GetExtraStageInfoFromCourse( bool bExtra2, CString sPreferredGroup,
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ public:
|
|||||||
vector<Course*> m_pCourses;
|
vector<Course*> m_pCourses;
|
||||||
|
|
||||||
void InitCoursesFromDisk();
|
void InitCoursesFromDisk();
|
||||||
|
void InitAutogenCourses();
|
||||||
void FreeCourses();
|
void FreeCourses();
|
||||||
void CleanData();
|
void CleanData();
|
||||||
|
|
||||||
@@ -65,9 +66,9 @@ public:
|
|||||||
Song* GetRandomSong();
|
Song* GetRandomSong();
|
||||||
|
|
||||||
|
|
||||||
void GetNonstopCourses( vector<Course*> &AddTo ); // add to if life meter type is BAR.
|
void GetNonstopCourses( vector<Course*> &AddTo, bool bIncludeAutogen ); // add to if life meter type is BAR.
|
||||||
void GetOniCourses( vector<Course*> &AddTo ); // add to if life meter type is BATTERY.
|
void GetOniCourses( vector<Course*> &AddTo, bool bIncludeAutogen ); // add to if life meter type is BATTERY.
|
||||||
void GetEndlessCourses( vector<Course*> &AddTo ); // add to if set to REPEAT.
|
void GetEndlessCourses( vector<Course*> &AddTo, bool bIncludeAutogen ); // add to if set to REPEAT.
|
||||||
|
|
||||||
void GetExtraStageInfo( bool bExtra2, CString sPreferredGroup, const StyleDef *s,
|
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 );
|
||||||
|
|||||||
Reference in New Issue
Block a user