[SongManager] Added GetCoursesInGroup(sCourseGroup,bIncludeAutogen), GetSongGroupBannerPath(songGroup), GetCourseGroupBannerPath(courseGroup), DoesSongGroupExist(songGroup), DoesCourseGroupExist(courseGroup), GetPopularSongs() Lua bindings.
This commit is contained in:
@@ -8,6 +8,13 @@ ________________________________________________________________________________
|
|||||||
StepMania 5.0 $next | 2011????
|
StepMania 5.0 $next | 2011????
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
2011/08/27
|
||||||
|
----------
|
||||||
|
* [SongManager] Added GetCoursesInGroup(sCourseGroup,bIncludeAutogen),
|
||||||
|
GetSongGroupBannerPath(songGroup), GetCourseGroupBannerPath(courseGroup),
|
||||||
|
DoesSongGroupExist(songGroup), DoesCourseGroupExist(courseGroup) and
|
||||||
|
GetPopularSongs() Lua bindings. [AJ]
|
||||||
|
|
||||||
2011/08/23
|
2011/08/23
|
||||||
----------
|
----------
|
||||||
* [Makefile.am] Fixed version date and time handling. [AJ]
|
* [Makefile.am] Fixed version date and time handling. [AJ]
|
||||||
|
|||||||
@@ -1934,6 +1934,14 @@ public:
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int GetCoursesInGroup( T* p, lua_State *L )
|
||||||
|
{
|
||||||
|
vector<Course*> v;
|
||||||
|
p->GetCoursesInGroup(v,SArg(1),BArg(2));
|
||||||
|
LuaHelpers::CreateTableFromArray<Course*>( v, L );
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
DEFINE_METHOD( ShortenGroupName, ShortenGroupName( SArg(1) ) )
|
DEFINE_METHOD( ShortenGroupName, ShortenGroupName( SArg(1) ) )
|
||||||
|
|
||||||
static int GetCourseGroupNames( T* p, lua_State *L )
|
static int GetCourseGroupNames( T* p, lua_State *L )
|
||||||
@@ -1944,6 +1952,18 @@ public:
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DEFINE_METHOD( GetSongGroupBannerPath, GetSongGroupBannerPath(SArg(1)) );
|
||||||
|
DEFINE_METHOD( GetCourseGroupBannerPath, GetCourseGroupBannerPath(SArg(1)) );
|
||||||
|
DEFINE_METHOD( DoesSongGroupExist, DoesSongGroupExist(SArg(1)) );
|
||||||
|
DEFINE_METHOD( DoesCourseGroupExist, DoesCourseGroupExist(SArg(1)) );
|
||||||
|
|
||||||
|
static int GetPopularSongs( T* p, lua_State *L )
|
||||||
|
{
|
||||||
|
const vector<Song*> &v = p->GetPopularSongs();
|
||||||
|
LuaHelpers::CreateTableFromArray<Song*>( v, L );
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
LunaSongManager()
|
LunaSongManager()
|
||||||
{
|
{
|
||||||
ADD_METHOD( GetAllSongs );
|
ADD_METHOD( GetAllSongs );
|
||||||
@@ -1969,9 +1989,23 @@ public:
|
|||||||
ADD_METHOD( GetSongRank );
|
ADD_METHOD( GetSongRank );
|
||||||
ADD_METHOD( GetSongGroupNames );
|
ADD_METHOD( GetSongGroupNames );
|
||||||
ADD_METHOD( GetSongsInGroup );
|
ADD_METHOD( GetSongsInGroup );
|
||||||
|
ADD_METHOD( GetCoursesInGroup );
|
||||||
ADD_METHOD( ShortenGroupName );
|
ADD_METHOD( ShortenGroupName );
|
||||||
ADD_METHOD( SetPreferredSongs );
|
ADD_METHOD( SetPreferredSongs );
|
||||||
ADD_METHOD( SetPreferredCourses );
|
ADD_METHOD( SetPreferredCourses );
|
||||||
|
//ADD_METHOD( GetPreferredSortCourses );
|
||||||
|
ADD_METHOD( GetSongGroupBannerPath );
|
||||||
|
ADD_METHOD( GetCourseGroupBannerPath );
|
||||||
|
ADD_METHOD( DoesSongGroupExist );
|
||||||
|
ADD_METHOD( DoesCourseGroupExist );
|
||||||
|
//ADD_METHOD( GetSongsFromGroup );
|
||||||
|
ADD_METHOD( GetPopularSongs );
|
||||||
|
//ADD_METHOD( GetPopularCourses );
|
||||||
|
//ADD_METHOD( GetSongsOfCurrentGame );
|
||||||
|
//ADD_METHOD( GetAllSongsOfCurrentGame );
|
||||||
|
//ADD_METHOD( SongToPreferredSortSectionName );
|
||||||
|
//ADD_METHOD( WasLoadedFromAdditionalSongs );
|
||||||
|
//ADD_METHOD( WasLoadedFromAdditionalCourses );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -81,7 +81,7 @@ public:
|
|||||||
RageColor GetCourseGroupColor( const RString &sCourseGroupName ) const;
|
RageColor GetCourseGroupColor( const RString &sCourseGroupName ) const;
|
||||||
RageColor GetCourseColor( const Course* pCourse ) const;
|
RageColor GetCourseColor( const Course* pCourse ) const;
|
||||||
|
|
||||||
void ResetGroupColors(); // sm-ssc add
|
void ResetGroupColors();
|
||||||
|
|
||||||
static RString ShortenGroupName( RString sLongGroupName );
|
static RString ShortenGroupName( RString sLongGroupName );
|
||||||
|
|
||||||
@@ -108,12 +108,12 @@ public:
|
|||||||
* valid step for the current gametype.
|
* valid step for the current gametype.
|
||||||
* @param sGroupName the name of the group.
|
* @param sGroupName the name of the group.
|
||||||
* @return the songs within the group that have at least one valid Step. */
|
* @return the songs within the group that have at least one valid Step. */
|
||||||
const vector<Song *> & GetSongsOfCurrentGame( const RString &sGroupName ) const;
|
const vector<Song *> &GetSongsOfCurrentGame( const RString &sGroupName ) const;
|
||||||
/**
|
/**
|
||||||
* @brief Retrieve all of the songs in the game that have at least one
|
* @brief Retrieve all of the songs in the game that have at least one
|
||||||
* valid step for the current gametype.
|
* valid step for the current gametype.
|
||||||
* @return the songs within the game that have at least one valid Step. */
|
* @return the songs within the game that have at least one valid Step. */
|
||||||
const vector<Song *> & GetAllSongsOfCurrentGame() const;
|
const vector<Song *> &GetAllSongsOfCurrentGame() const;
|
||||||
|
|
||||||
void GetPreferredSortSongs( vector<Song*> &AddTo ) const;
|
void GetPreferredSortSongs( vector<Song*> &AddTo ) const;
|
||||||
RString SongToPreferredSortSectionName( const Song *pSong ) const;
|
RString SongToPreferredSortSectionName( const Song *pSong ) const;
|
||||||
|
|||||||
Reference in New Issue
Block a user