Add StepsTypeInfo and return the structure rather than having GameManager methods for each piece of data
This commit is contained in:
@@ -83,7 +83,7 @@ void CatalogXml::Save( LoadingWindow *loading_window )
|
||||
FOREACH_CONST( StepsType, vStepsTypesToShow, st )
|
||||
{
|
||||
XNode* p3 = p2->AppendChild( "StepsType" );
|
||||
p3->AppendAttr( "StepsType", GAMEMAN->StepsTypeToString(*st) );
|
||||
p3->AppendAttr( "StepsType", GAMEMAN->GetStepsTypeInfo(*st).szName );
|
||||
|
||||
int iNumStepsInGroupAndStepsType[NUM_Difficulty];
|
||||
ZERO( iNumStepsInGroupAndStepsType );
|
||||
@@ -297,8 +297,8 @@ void CatalogXml::Save( LoadingWindow *loading_window )
|
||||
XNode* pNode2 = pNode->AppendChild( "StepsType" );
|
||||
FOREACH_CONST( StepsType, vStepsTypesToShow, iter )
|
||||
{
|
||||
XNode* pNode3 = pNode2->AppendChild( "StepsType", GAMEMAN->StepsTypeToString(*iter) );
|
||||
pNode3->AppendAttr( "DisplayAs", GAMEMAN->StepsTypeToLocalizedString(*iter) );
|
||||
XNode* pNode3 = pNode2->AppendChild( "StepsType", GAMEMAN->GetStepsTypeInfo(*iter).szName );
|
||||
pNode3->AppendAttr( "DisplayAs", GAMEMAN->GetStepsTypeInfo(*iter).GetLocalizedString() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -387,7 +387,7 @@ void EditMenu::OnRowValueChanged( EditMenuRow row )
|
||||
|
||||
// fall through
|
||||
case ROW_STEPS_TYPE:
|
||||
m_textValue[ROW_STEPS_TYPE].SetText( GAMEMAN->StepsTypeToLocalizedString(GetSelectedStepsType()) );
|
||||
m_textValue[ROW_STEPS_TYPE].SetText( GAMEMAN->GetStepsTypeInfo(GetSelectedStepsType()).GetLocalizedString() );
|
||||
|
||||
{
|
||||
Difficulty dcOld = Difficulty_Invalid;
|
||||
@@ -476,7 +476,7 @@ void EditMenu::OnRowValueChanged( EditMenuRow row )
|
||||
// fall through
|
||||
case ROW_STEPS:
|
||||
{
|
||||
RString s = DifficultyToLocalizedString(GetSelectedDifficulty());
|
||||
RString s = DifficultyToLocalizedString( GetSelectedDifficulty() );
|
||||
|
||||
// UGLY. "Edit" -> "New Edit"
|
||||
switch( EDIT_MODE.GetValue() )
|
||||
@@ -501,7 +501,7 @@ void EditMenu::OnRowValueChanged( EditMenuRow row )
|
||||
case ROW_SOURCE_STEPS_TYPE:
|
||||
m_textLabel[ROW_SOURCE_STEPS_TYPE].SetVisible( GetSelectedSteps() ? false : true );
|
||||
m_textValue[ROW_SOURCE_STEPS_TYPE].SetVisible( GetSelectedSteps() ? false : true );
|
||||
m_textValue[ROW_SOURCE_STEPS_TYPE].SetText( GAMEMAN->StepsTypeToLocalizedString(GetSelectedSourceStepsType()) );
|
||||
m_textValue[ROW_SOURCE_STEPS_TYPE].SetText( GAMEMAN->GetStepsTypeInfo(GetSelectedSourceStepsType()).GetLocalizedString() );
|
||||
|
||||
m_vpSourceSteps.clear();
|
||||
m_vpSourceSteps.push_back( StepsAndDifficulty(NULL,Difficulty_Invalid) ); // "blank"
|
||||
|
||||
@@ -45,7 +45,7 @@ LuaXType( RadarCategory );
|
||||
|
||||
RString StepsTypeToString( StepsType st )
|
||||
{
|
||||
RString s = GAMEMAN->StepsTypeToString( st );
|
||||
RString s = GAMEMAN->GetStepsTypeInfo( st ).szName;
|
||||
/* foo-bar -> Foo_Bar */
|
||||
s.Replace('-','_');
|
||||
for( size_t i = 0; i < s.size(); ++i )
|
||||
|
||||
@@ -43,6 +43,15 @@ const RString& RadarCategoryToLocalizedString( RadarCategory cat );
|
||||
LuaDeclareType( RadarCategory );
|
||||
|
||||
|
||||
enum StepsTypeCategory
|
||||
{
|
||||
StepsTypeCategory_Single,
|
||||
StepsTypeCategory_Double,
|
||||
StepsTypeCategory_Couple,
|
||||
StepsTypeCategory_Routine,
|
||||
};
|
||||
|
||||
|
||||
enum StepsType
|
||||
{
|
||||
STEPS_TYPE_DANCE_SINGLE = 0,
|
||||
|
||||
@@ -35,44 +35,44 @@ enum
|
||||
// BMS reader needs 16 tracks for beat-double7
|
||||
};
|
||||
|
||||
|
||||
static struct
|
||||
RString StepsTypeInfo::GetLocalizedString() const
|
||||
{
|
||||
const char *szName;
|
||||
int iNumTracks;
|
||||
bool bAllowAutogen;
|
||||
} const g_StepsTypes[NUM_StepsType] = {
|
||||
{ "dance-single", 4, true },
|
||||
{ "dance-double", 8, true },
|
||||
{ "dance-couple", 8, true },
|
||||
{ "dance-solo", 6, true },
|
||||
{ "dance-routine", 8, false },
|
||||
{ "pump-single", 5, true },
|
||||
{ "pump-halfdouble", 6, true },
|
||||
{ "pump-double", 10, true },
|
||||
{ "pump-couple", 10, true },
|
||||
{ "ez2-single", 5, true }, // Single: TL,LHH,D,RHH,TR
|
||||
{ "ez2-double", 10, true }, // Double: Single x2
|
||||
{ "ez2-real", 7, true }, // Real: TL,LHH,LHL,D,RHL,RHH,TR
|
||||
{ "para-single", 5, true },
|
||||
{ "para-versus", 10, true },
|
||||
{ "ds3ddx-single", 8, true },
|
||||
{ "bm-single5", 6, true }, // called "bm" for backward compat
|
||||
{ "bm-double5", 12, true }, // called "bm" for backward compat
|
||||
{ "bm-single7", 8, true }, // called "bm" for backward compat
|
||||
{ "bm-double7", 16, true }, // called "bm" for backward compat
|
||||
{ "maniax-single", 4, true },
|
||||
{ "maniax-double", 8, true },
|
||||
{ "techno-single4", 4, true },
|
||||
{ "techno-single5", 5, true },
|
||||
{ "techno-single8", 8, true },
|
||||
{ "techno-double4", 8, true },
|
||||
{ "techno-double5", 10, true },
|
||||
{ "pnm-five", 5, true }, // called "pnm" for backward compat
|
||||
{ "pnm-nine", 9, true }, // called "pnm" for backward compat
|
||||
{ "guitar-five", 5, true },
|
||||
{ "karaoke", 1, false },
|
||||
{ "lights-cabinet", NUM_CabinetLight, false }, // XXX disable lights autogen for now
|
||||
if( THEME->HasString( "StepsType", szName ) )
|
||||
return THEME->GetString( "StepsType", szName );
|
||||
return szName;
|
||||
}
|
||||
|
||||
static const StepsTypeInfo g_StepsTypeInfos[NUM_StepsType] = {
|
||||
{ "dance-single", 4, true, StepsTypeCategory_Single },
|
||||
{ "dance-double", 8, true, StepsTypeCategory_Double },
|
||||
{ "dance-couple", 8, true, StepsTypeCategory_Couple },
|
||||
{ "dance-solo", 6, true, StepsTypeCategory_Single },
|
||||
{ "dance-routine", 8, false, StepsTypeCategory_Routine },
|
||||
{ "pump-single", 5, true, StepsTypeCategory_Single },
|
||||
{ "pump-halfdouble", 6, true, StepsTypeCategory_Double },
|
||||
{ "pump-double", 10, true, StepsTypeCategory_Double },
|
||||
{ "pump-couple", 10, true, StepsTypeCategory_Couple },
|
||||
{ "ez2-single", 5, true, StepsTypeCategory_Single }, // Single: TL,LHH,D,RHH,TR
|
||||
{ "ez2-double", 10, true, StepsTypeCategory_Double }, // Double: Single x2
|
||||
{ "ez2-real", 7, true, StepsTypeCategory_Single }, // Real: TL,LHH,LHL,D,RHL,RHH,TR
|
||||
{ "para-single", 5, true, StepsTypeCategory_Single },
|
||||
{ "ds3ddx-single", 8, true, StepsTypeCategory_Single },
|
||||
{ "bm-single5", 6, true, StepsTypeCategory_Single }, // called "bm" for backward compat
|
||||
{ "bm-double5", 12, true, StepsTypeCategory_Double }, // called "bm" for backward compat
|
||||
{ "bm-single7", 8, true, StepsTypeCategory_Single }, // called "bm" for backward compat
|
||||
{ "bm-double7", 16, true, StepsTypeCategory_Double }, // called "bm" for backward compat
|
||||
{ "maniax-single", 4, true, StepsTypeCategory_Single },
|
||||
{ "maniax-double", 8, true, StepsTypeCategory_Double },
|
||||
{ "techno-single4", 4, true, StepsTypeCategory_Single },
|
||||
{ "techno-single5", 5, true, StepsTypeCategory_Single },
|
||||
{ "techno-single8", 8, true, StepsTypeCategory_Single },
|
||||
{ "techno-double4", 8, true, StepsTypeCategory_Double },
|
||||
{ "techno-double5", 10, true, StepsTypeCategory_Double },
|
||||
{ "pnm-five", 5, true, StepsTypeCategory_Single }, // called "pnm" for backward compat
|
||||
{ "pnm-nine", 9, true, StepsTypeCategory_Single }, // called "pnm" for backward compat
|
||||
{ "guitar-five", 5, true, StepsTypeCategory_Single }, // 5 frets, no wail
|
||||
{ "karaoke", 1, false, StepsTypeCategory_Single },
|
||||
{ "lights-cabinet", NUM_CabinetLight, false, StepsTypeCategory_Single }, // XXX disable lights autogen for now
|
||||
};
|
||||
|
||||
|
||||
@@ -2596,7 +2596,7 @@ const Style *GameManager::GetFirstCompatibleStyle( const Game *pGame, int iNumPl
|
||||
if( (*s)->m_StepsType == st )
|
||||
return *s;
|
||||
FAIL_M( ssprintf("No compatible styles for %s - %s with %d player%s.", pGame->m_szName,
|
||||
StepsTypeToString(st).c_str(), iNumPlayers, iNumPlayers==1?"":"s") );
|
||||
GetStepsTypeInfo(st).szName, iNumPlayers, iNumPlayers==1?"":"s") );
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -2652,16 +2652,10 @@ bool GameManager::IsGameEnabled( const Game *pGame ) const
|
||||
return NOTESKIN->DoNoteSkinsExistForGame( pGame );
|
||||
}
|
||||
|
||||
int GameManager::StepsTypeToNumTracks( StepsType st )
|
||||
const StepsTypeInfo &GameManager::GetStepsTypeInfo( StepsType st ) const
|
||||
{
|
||||
ASSERT_M( st < NUM_StepsType, ssprintf("%i", st) );
|
||||
return g_StepsTypes[st].iNumTracks;
|
||||
}
|
||||
|
||||
bool GameManager::CanAutoGenStepsType( StepsType st )
|
||||
{
|
||||
ASSERT_M( st < NUM_StepsType, ssprintf("%d", st) );
|
||||
return g_StepsTypes[st].bAllowAutogen;
|
||||
return g_StepsTypeInfos[st];
|
||||
}
|
||||
|
||||
StepsType GameManager::StringToStepsType( RString sStepsType )
|
||||
@@ -2679,27 +2673,12 @@ StepsType GameManager::StringToStepsType( RString sStepsType )
|
||||
sStepsType = "para-single";
|
||||
|
||||
for( int i=0; i<NUM_StepsType; i++ )
|
||||
if( g_StepsTypes[i].szName == sStepsType )
|
||||
if( g_StepsTypeInfos[i].szName == sStepsType )
|
||||
return StepsType(i);
|
||||
|
||||
return StepsType_Invalid;
|
||||
}
|
||||
|
||||
RString GameManager::StepsTypeToString( StepsType st )
|
||||
{
|
||||
ASSERT_M( st < NUM_StepsType, ssprintf("%i", st) );
|
||||
return g_StepsTypes[st].szName;
|
||||
}
|
||||
|
||||
RString GameManager::StepsTypeToLocalizedString( StepsType st )
|
||||
{
|
||||
RString s = StepsTypeToString( st );
|
||||
if( THEME->HasString( "StepsType", s ) )
|
||||
return THEME->GetString( "StepsType", s );
|
||||
else
|
||||
return s;
|
||||
}
|
||||
|
||||
RString GameManager::StyleToLocalizedString( const Style* style )
|
||||
{
|
||||
RString s = style->m_szName;
|
||||
@@ -2738,7 +2717,7 @@ const Style* GameManager::GameAndStringToStyle( const Game *game, RString sStyle
|
||||
class LunaGameManager: public Luna<GameManager>
|
||||
{
|
||||
public:
|
||||
static int StepsTypeToLocalizedString( T* p, lua_State *L ) { lua_pushstring(L, p->StepsTypeToLocalizedString(Enum::Check<StepsType>(L, 1)) ); return 1; }
|
||||
static int StepsTypeToLocalizedString( T* p, lua_State *L ) { lua_pushstring(L, p->GetStepsTypeInfo(Enum::Check<StepsType>(L, 1)).GetLocalizedString() ); return 1; }
|
||||
static int GetFirstStepsTypeForGame( T* p, lua_State *L )
|
||||
{
|
||||
Game *pGame = Luna<Game>::check( L, 1 );
|
||||
|
||||
@@ -10,6 +10,15 @@ struct lua_State;
|
||||
#include "GameConstantsAndTypes.h"
|
||||
#include "GameInput.h"
|
||||
|
||||
struct StepsTypeInfo
|
||||
{
|
||||
const char *szName;
|
||||
int iNumTracks;
|
||||
bool bAllowAutogen; // allow this type to be autogen'd to other types
|
||||
StepsTypeCategory m_StepsTypeCategory; // what is the most basic StyleType this is used with?
|
||||
RString GetLocalizedString() const;
|
||||
};
|
||||
|
||||
class GameManager
|
||||
{
|
||||
public:
|
||||
@@ -31,11 +40,8 @@ public:
|
||||
int GetIndexFromGame( const Game* pGame ) const;
|
||||
const Game* GetGameFromIndex( int index ) const;
|
||||
|
||||
static int StepsTypeToNumTracks( StepsType st );
|
||||
static bool CanAutoGenStepsType( StepsType st );
|
||||
const StepsTypeInfo &GetStepsTypeInfo( StepsType st ) const;
|
||||
static StepsType StringToStepsType( RString sStepsType );
|
||||
static RString StepsTypeToString( StepsType st );
|
||||
static RString StepsTypeToLocalizedString( StepsType st );
|
||||
static const Game* StringToGameType( RString sGameType );
|
||||
const Style* GameAndStringToStyle( const Game* pGame, RString sStyle );
|
||||
static RString StyleToLocalizedString( const Style* s );
|
||||
|
||||
@@ -613,7 +613,7 @@ static bool LoadFromBMSFile( const RString &sPath, const NameToData_t &mapNameTo
|
||||
}
|
||||
|
||||
|
||||
int iNumNewTracks = GameManager::StepsTypeToNumTracks( out.m_StepsType );
|
||||
int iNumNewTracks = GAMEMAN->GetStepsTypeInfo( out.m_StepsType ).iNumTracks;
|
||||
vector<int> iTransformNewToOld;
|
||||
iTransformNewToOld.resize( iNumNewTracks, -1 );
|
||||
|
||||
|
||||
@@ -190,9 +190,9 @@ static RString GetSMNotesTag( const Song &song, const Steps &in, bool bSavingCac
|
||||
lines.push_back( "" );
|
||||
// Escape to prevent some clown from making a comment of "\r\n;"
|
||||
lines.push_back( ssprintf("//---------------%s - %s----------------",
|
||||
GameManager::StepsTypeToString(in.m_StepsType).c_str(), SmEscape(in.GetDescription()).c_str()) );
|
||||
GAMEMAN->GetStepsTypeInfo(in.m_StepsType).szName, SmEscape(in.GetDescription()).c_str()) );
|
||||
lines.push_back( song.m_vsKeysoundFile.empty() ? "#NOTES:" : "#NOTES2:" );
|
||||
lines.push_back( ssprintf( " %s:", GameManager::StepsTypeToString(in.m_StepsType).c_str() ) );
|
||||
lines.push_back( ssprintf( " %s:", GAMEMAN->GetStepsTypeInfo(in.m_StepsType).szName ) );
|
||||
lines.push_back( ssprintf( " %s:", SmEscape(in.GetDescription()).c_str() ) );
|
||||
lines.push_back( ssprintf( " %s:", DifficultyToString(in.GetDifficulty()).c_str() ) );
|
||||
lines.push_back( ssprintf( " %d:", in.GetMeter() ) );
|
||||
|
||||
@@ -1197,7 +1197,7 @@ public:
|
||||
m_Def.m_vsChoices.clear();
|
||||
FOREACH_CONST( StepsType, m_vStepsTypesToShow, st )
|
||||
{
|
||||
RString s = GAMEMAN->StepsTypeToLocalizedString( *st );
|
||||
RString s = GAMEMAN->GetStepsTypeInfo( *st ).GetLocalizedString();
|
||||
m_Def.m_vsChoices.push_back( s );
|
||||
}
|
||||
|
||||
|
||||
@@ -1066,7 +1066,7 @@ XNode* Profile::SaveGeneralDataCreateNode() const
|
||||
pGeneralDataNode->AppendChild( "LastDifficulty", DifficultyToString(m_LastDifficulty) );
|
||||
pGeneralDataNode->AppendChild( "LastCourseDifficulty", DifficultyToString(m_LastCourseDifficulty) );
|
||||
if( m_LastStepsType != StepsType_Invalid )
|
||||
pGeneralDataNode->AppendChild( "LastStepsType", GAMEMAN->StepsTypeToString(m_LastStepsType) );
|
||||
pGeneralDataNode->AppendChild( "LastStepsType", GAMEMAN->GetStepsTypeInfo(m_LastStepsType).szName );
|
||||
pGeneralDataNode->AppendChild( m_lastSong.CreateNode() );
|
||||
pGeneralDataNode->AppendChild( m_lastCourse.CreateNode() );
|
||||
pGeneralDataNode->AppendChild( "TotalPlays", m_iTotalPlays );
|
||||
@@ -1577,7 +1577,7 @@ XNode* Profile::SaveCategoryScoresCreateNode() const
|
||||
continue;
|
||||
|
||||
XNode* pStepsTypeNode = pNode->AppendChild( "StepsType" );
|
||||
pStepsTypeNode->AppendAttr( "Type", GameManager::StepsTypeToString(st) );
|
||||
pStepsTypeNode->AppendAttr( "Type", GAMEMAN->GetStepsTypeInfo(st).szName );
|
||||
|
||||
FOREACH_ENUM( RankingCategory,rc )
|
||||
{
|
||||
|
||||
@@ -1494,7 +1494,7 @@ void ScreenEdit::InputEdit( const InputEventPlus &input, EditButton EditB )
|
||||
|
||||
RString s = ssprintf(
|
||||
SWITCHED_TO.GetValue() + " %s %s '%s' (%d of %d)",
|
||||
GAMEMAN->StepsTypeToString( pSteps->m_StepsType ).c_str(),
|
||||
GAMEMAN->GetStepsTypeInfo( pSteps->m_StepsType ).szName,
|
||||
DifficultyToString( pSteps->GetDifficulty() ).c_str(),
|
||||
pSteps->GetDescription().c_str(),
|
||||
it - vSteps.begin() + 1,
|
||||
|
||||
@@ -60,8 +60,7 @@ static void SetNextCombination()
|
||||
GAMESTATE->m_stEdit.Set( curVal.st );
|
||||
GAMESTATE->m_cdEdit.Set( curVal.cd );
|
||||
// XXX Testing.
|
||||
SCREENMAN->SystemMessage( ssprintf("%s, %s", GAMEMAN->StepsTypeToString(curVal.st).c_str(),
|
||||
DifficultyToString(curVal.cd).c_str()) );
|
||||
SCREENMAN->SystemMessage( ssprintf("%s, %s", GAMEMAN->GetStepsTypeInfo(curVal.st).szName, DifficultyToString(curVal.cd).c_str()) );
|
||||
|
||||
RefreshTrail();
|
||||
}
|
||||
|
||||
@@ -92,7 +92,8 @@ void ScreenOptionsManageEditSteps::BeginScreen()
|
||||
def.m_bAllowThemeTitle = false; // not themable
|
||||
def.m_sExplanationName = "Select Edit Steps";
|
||||
def.m_vsChoices.clear();
|
||||
RString sType = GAMEMAN->StepsTypeToLocalizedString( (*s)->m_StepsType );
|
||||
StepsType st = (*s)->m_StepsType;
|
||||
RString sType = GAMEMAN->GetStepsTypeInfo(st).GetLocalizedString();
|
||||
def.m_vsChoices.push_back( sType );
|
||||
def.m_bAllowThemeItems = false; // already themed
|
||||
iIndex++;
|
||||
|
||||
@@ -185,7 +185,8 @@ float ScreenRanking::SetPage( const PageToShow &pts )
|
||||
//
|
||||
// init page
|
||||
//
|
||||
m_textStepsType.SetText( GameManager::StepsTypeToLocalizedString(pts.aTypes.front().second) );
|
||||
StepsType st = pts.aTypes.front().second;
|
||||
m_textStepsType.SetText( GAMEMAN->GetStepsTypeInfo(st).GetLocalizedString() );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -917,11 +917,11 @@ void Song::AddAutoGenNotes()
|
||||
/* If m_bAutogenSteps is disabled, only autogen lights. */
|
||||
if( !PREFSMAN->m_bAutogenSteps && stMissing != STEPS_TYPE_LIGHTS_CABINET )
|
||||
continue;
|
||||
if( !GameManager::CanAutoGenStepsType(stMissing) )
|
||||
if( !GAMEMAN->GetStepsTypeInfo(stMissing).bAllowAutogen )
|
||||
continue;
|
||||
|
||||
// missing Steps of this type
|
||||
int iNumTracksOfMissing = GAMEMAN->StepsTypeToNumTracks(stMissing);
|
||||
int iNumTracksOfMissing = GAMEMAN->GetStepsTypeInfo(stMissing).iNumTracks;
|
||||
|
||||
// look for closest match
|
||||
StepsType stBestMatch = StepsType_Invalid;
|
||||
@@ -933,7 +933,7 @@ void Song::AddAutoGenNotes()
|
||||
continue;
|
||||
|
||||
/* has (non-autogen) Steps of this type */
|
||||
const int iNumTracks = GAMEMAN->StepsTypeToNumTracks(st);
|
||||
const int iNumTracks = GAMEMAN->GetStepsTypeInfo(st).iNumTracks;
|
||||
const int iTrackDifference = abs(iNumTracks-iNumTracksOfMissing);
|
||||
if( iTrackDifference < iBestTrackDifference )
|
||||
{
|
||||
|
||||
@@ -63,7 +63,7 @@ unsigned Steps::GetHash() const
|
||||
|
||||
void Steps::SetNoteData( const NoteData& noteDataNew )
|
||||
{
|
||||
ASSERT( noteDataNew.GetNumTracks() == GameManager::StepsTypeToNumTracks(m_StepsType) );
|
||||
ASSERT( noteDataNew.GetNumTracks() == GAMEMAN->GetStepsTypeInfo(m_StepsType).iNumTracks );
|
||||
|
||||
DeAutogen( false );
|
||||
|
||||
@@ -86,7 +86,7 @@ void Steps::GetNoteData( NoteData& noteDataOut ) const
|
||||
else
|
||||
{
|
||||
noteDataOut.ClearAll();
|
||||
noteDataOut.SetNumTracks( GameManager::StepsTypeToNumTracks(m_StepsType) );
|
||||
noteDataOut.SetNumTracks( GAMEMAN->GetStepsTypeInfo(m_StepsType).iNumTracks );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -214,7 +214,7 @@ void Steps::Decompress() const
|
||||
|
||||
m_bNoteDataIsFilled = true;
|
||||
|
||||
int iNewTracks = GameManager::StepsTypeToNumTracks( m_StepsType );
|
||||
int iNewTracks = GAMEMAN->GetStepsTypeInfo(m_StepsType).iNumTracks;
|
||||
|
||||
if( this->m_StepsType == STEPS_TYPE_LIGHTS_CABINET )
|
||||
{
|
||||
@@ -267,7 +267,7 @@ void Steps::Decompress() const
|
||||
// load from compressed
|
||||
bool bComposite = m_StepsType == STEPS_TYPE_DANCE_ROUTINE;
|
||||
m_bNoteDataIsFilled = true;
|
||||
m_pNoteData->SetNumTracks( GameManager::StepsTypeToNumTracks(m_StepsType) );
|
||||
m_pNoteData->SetNumTracks( GAMEMAN->GetStepsTypeInfo(m_StepsType).iNumTracks );
|
||||
|
||||
NoteDataUtil::LoadFromSMNoteDataString( *m_pNoteData, m_sNoteDataCompressed, bComposite );
|
||||
}
|
||||
@@ -352,7 +352,7 @@ void Steps::CopyFrom( Steps* pSource, StepsType ntTo, float fMusicLengthSeconds
|
||||
m_StepsType = ntTo;
|
||||
NoteData noteData;
|
||||
pSource->GetNoteData( noteData );
|
||||
noteData.SetNumTracks( GameManager::StepsTypeToNumTracks(ntTo) );
|
||||
noteData.SetNumTracks( GAMEMAN->GetStepsTypeInfo(ntTo).iNumTracks );
|
||||
parent = NULL;
|
||||
this->SetNoteData( noteData );
|
||||
this->SetDescription( pSource->GetDescription() );
|
||||
@@ -365,7 +365,7 @@ void Steps::CreateBlank( StepsType ntTo )
|
||||
{
|
||||
m_StepsType = ntTo;
|
||||
NoteData noteData;
|
||||
noteData.SetNumTracks( GameManager::StepsTypeToNumTracks(ntTo) );
|
||||
noteData.SetNumTracks( GAMEMAN->GetStepsTypeInfo(ntTo).iNumTracks );
|
||||
this->SetNoteData( noteData );
|
||||
}
|
||||
|
||||
|
||||
@@ -280,7 +280,7 @@ XNode* StepsID::CreateNode() const
|
||||
{
|
||||
XNode* pNode = new XNode( "Steps" );
|
||||
|
||||
pNode->AppendAttr( "StepsType", GameManager::StepsTypeToString(st) );
|
||||
pNode->AppendAttr( "StepsType", GAMEMAN->GetStepsTypeInfo(st).szName );
|
||||
pNode->AppendAttr( "Difficulty", DifficultyToString(dc) );
|
||||
if( dc == Difficulty_Edit )
|
||||
{
|
||||
@@ -319,7 +319,7 @@ void StepsID::LoadFromNode( const XNode* pNode )
|
||||
|
||||
RString StepsID::ToString() const
|
||||
{
|
||||
RString s = GameManager::StepsTypeToString( st );
|
||||
RString s = GAMEMAN->GetStepsTypeInfo( st ).szName;
|
||||
s += " " + DifficultyToString( dc );
|
||||
if( dc == Difficulty_Edit )
|
||||
{
|
||||
|
||||
@@ -43,7 +43,7 @@ XNode* TrailID::CreateNode() const
|
||||
{
|
||||
XNode* pNode = new XNode( "Trail" );
|
||||
|
||||
pNode->AppendAttr( "StepsType", GameManager::StepsTypeToString(st) );
|
||||
pNode->AppendAttr( "StepsType", GAMEMAN->GetStepsTypeInfo(st).szName );
|
||||
pNode->AppendAttr( "CourseDifficulty", DifficultyToString(cd) );
|
||||
|
||||
return pNode;
|
||||
@@ -65,7 +65,7 @@ void TrailID::LoadFromNode( const XNode* pNode )
|
||||
|
||||
RString TrailID::ToString() const
|
||||
{
|
||||
RString s = GameManager::StepsTypeToString( st );
|
||||
RString s = GAMEMAN->GetStepsTypeInfo(st).szName;
|
||||
s += " " + DifficultyToString( cd );
|
||||
return s;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user