diff --git a/Docs/Changelog_sm5.txt b/Docs/Changelog_sm5.txt index 0de12ab4fa..63a8649366 100644 --- a/Docs/Changelog_sm5.txt +++ b/Docs/Changelog_sm5.txt @@ -11,7 +11,10 @@ StepMania 5.0 ????????? | 20110??? 2011/07/21 ---------- * [BeginnerHelper] Removed DancePadAngle metric in favor of DancePadOnCommand. - The same goes for PlayerAngle, rotation is now handled in PlayerP1/2OnCommand. [AJ] + The same goes for PlayerAngle, dancer rotation is now handled in + PlayerP1/2OnCommand. [AJ] +* [Course] Bumped up max edit course title length to 16 (still feels too short). + Also added #DESCRIPTION tag and Course:GetDescription() Lua binding. [AJ] 2011/07/20 ---------- diff --git a/src/Course.cpp b/src/Course.cpp index bfe93c1e70..d786c700af 100644 --- a/src/Course.cpp +++ b/src/Course.cpp @@ -90,7 +90,7 @@ int CourseEntry::GetNumModChanges() const Course::Course(): m_bIsAutogen(false), m_sPath(""), m_sMainTitle(""), m_sMainTitleTranslit(""), m_sSubTitle(""), m_sSubTitleTranslit(""), - m_sScripter(""), m_sBannerPath(""), m_sBackgroundPath(""), + m_sScripter(""), m_sDescription(""), m_sBannerPath(""), m_sBackgroundPath(""), m_sCDTitlePath(""), m_sGroupName(""), m_bRepeat(false), m_fGoalSeconds(0), m_bShuffle(false), m_iLives(-1), m_bSortByMeter(false), m_bIncomplete(false), m_vEntries(), m_SortOrder_TotalDifficulty(0), @@ -176,6 +176,7 @@ void Course::Init() m_sSubTitle = ""; m_sSubTitleTranslit = ""; m_sScripter = ""; + m_sDescription = ""; m_sBannerPath = ""; m_sBackgroundPath = ""; @@ -1095,6 +1096,7 @@ public: static int IsAutogen( T* p, lua_State *L ) { lua_pushboolean(L, p->m_bIsAutogen ); return 1; } static int GetEstimatedNumStages( T* p, lua_State *L ) { lua_pushnumber(L, p->GetEstimatedNumStages() ); return 1; } static int GetScripter( T* p, lua_State *L ) { lua_pushstring(L, p->m_sScripter ); return 1; } + static int GetDescription( T* p, lua_State *L ) { lua_pushstring(L, p->m_sDescription ); return 1; } static int GetTotalSeconds( T* p, lua_State *L ) { StepsType st = Enum::Check(L, 1); @@ -1131,6 +1133,7 @@ public: ADD_METHOD( IsAutogen ); ADD_METHOD( GetEstimatedNumStages ); ADD_METHOD( GetScripter ); + ADD_METHOD( GetDescription ); ADD_METHOD( GetTotalSeconds ); ADD_METHOD( IsEndless ); ADD_METHOD( IsNonstop ); diff --git a/src/Course.h b/src/Course.h index b6326833f2..031169a076 100644 --- a/src/Course.h +++ b/src/Course.h @@ -16,12 +16,11 @@ struct lua_State; class Style; class Game; -const int MAX_EDIT_COURSE_TITLE_LENGTH = 12; +const int MAX_EDIT_COURSE_TITLE_LENGTH = 16; inline PlayMode CourseTypeToPlayMode( CourseType ct ) { return (PlayMode)(PLAY_MODE_NONSTOP+ct); } inline CourseType PlayModeToCourseType( PlayMode pm ) { return (CourseType)(pm-PLAY_MODE_NONSTOP); } - enum SongSort { SongSort_Randomize, @@ -162,6 +161,7 @@ public: RString m_sMainTitle, m_sMainTitleTranslit; RString m_sSubTitle, m_sSubTitleTranslit; RString m_sScripter; + RString m_sDescription; RString m_sBannerPath; RString m_sBackgroundPath; diff --git a/src/CourseLoaderCRS.cpp b/src/CourseLoaderCRS.cpp index d4ae2a026e..f8b3fc3ba9 100644 --- a/src/CourseLoaderCRS.cpp +++ b/src/CourseLoaderCRS.cpp @@ -67,6 +67,8 @@ bool CourseLoaderCRS::LoadFromMsd( const RString &sPath, const MsdFile &msd, Cou out.m_sMainTitleTranslit = sParams[1]; else if( sValueName.EqualsNoCase("SCRIPTER") ) out.m_sScripter = sParams[1]; + else if( sValueName.EqualsNoCase("DESCRIPTION") ) + out.m_sDescription = sParams[1]; else if( sValueName.EqualsNoCase("REPEAT") ) { RString str = sParams[1];