Add Lua bindings for RankingCategory
(Sourced from shakesoda/stepmania.)
This commit is contained in:
@@ -8,6 +8,12 @@ ________________________________________________________________________________
|
|||||||
StepMania current development
|
StepMania current development
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
2013/10/03
|
||||||
|
----------
|
||||||
|
* [GameConstantsAndTypes] Declared RankingCategory as a type. [SSC]
|
||||||
|
* [Profile] Added GetCategoryHighScoreList(StepsType,RankingCategory) Lua
|
||||||
|
binding. [SSC]
|
||||||
|
|
||||||
2013/09/23
|
2013/09/23
|
||||||
----------
|
----------
|
||||||
* PIUIO: Fix default mapping for lights on five-panel setups.
|
* PIUIO: Fix default mapping for lights on five-panel setups.
|
||||||
|
|||||||
@@ -101,6 +101,7 @@ static const char *RankingCategoryNames[] = {
|
|||||||
};
|
};
|
||||||
XToString( RankingCategory );
|
XToString( RankingCategory );
|
||||||
StringToX( RankingCategory );
|
StringToX( RankingCategory );
|
||||||
|
LuaXType( RankingCategory );
|
||||||
|
|
||||||
|
|
||||||
static const char *PlayerControllerNames[] = {
|
static const char *PlayerControllerNames[] = {
|
||||||
|
|||||||
@@ -367,6 +367,7 @@ enum RankingCategory
|
|||||||
};
|
};
|
||||||
const RString& RankingCategoryToString( RankingCategory rc );
|
const RString& RankingCategoryToString( RankingCategory rc );
|
||||||
RankingCategory StringToRankingCategory( const RString& rc );
|
RankingCategory StringToRankingCategory( const RString& rc );
|
||||||
|
LuaDeclareType( RankingCategory );
|
||||||
|
|
||||||
extern const vector<RString> RANKING_TO_FILL_IN_MARKER;
|
extern const vector<RString> RANKING_TO_FILL_IN_MARKER;
|
||||||
inline bool IsRankingToFillIn( const RString& sName ) { return !sName.empty() && sName[0]=='#'; }
|
inline bool IsRankingToFillIn( const RString& sName ) { return !sName.empty() && sName[0]=='#'; }
|
||||||
|
|||||||
@@ -2007,6 +2007,14 @@ public:
|
|||||||
luaL_typerror( L, 1, "Song or Course" );
|
luaL_typerror( L, 1, "Song or Course" );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
static int GetCategoryHighScoreList( T* p, lua_State *L )
|
||||||
|
{
|
||||||
|
StepsType pStepsType = Enum::Check<StepsType>(L, 1);
|
||||||
|
RankingCategory pRankCat = Enum::Check<RankingCategory>(L, 2);
|
||||||
|
HighScoreList &hsl = p->GetCategoryHighScoreList(pStepsType, pRankCat);
|
||||||
|
hsl.PushSelf( L );
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
static int GetCharacter( T* p, lua_State *L ) { p->GetCharacter()->PushSelf(L); return 1; }
|
static int GetCharacter( T* p, lua_State *L ) { p->GetCharacter()->PushSelf(L); return 1; }
|
||||||
static int SetCharacter( T* p, lua_State *L ) { p->SetCharacter(SArg(1)); return 0; }
|
static int SetCharacter( T* p, lua_State *L ) { p->SetCharacter(SArg(1)); return 0; }
|
||||||
@@ -2102,6 +2110,7 @@ public:
|
|||||||
ADD_METHOD( GetDisplayName );
|
ADD_METHOD( GetDisplayName );
|
||||||
ADD_METHOD( GetLastUsedHighScoreName );
|
ADD_METHOD( GetLastUsedHighScoreName );
|
||||||
ADD_METHOD( GetHighScoreList );
|
ADD_METHOD( GetHighScoreList );
|
||||||
|
ADD_METHOD( GetCategoryHighScoreList );
|
||||||
ADD_METHOD( GetCharacter );
|
ADD_METHOD( GetCharacter );
|
||||||
ADD_METHOD( SetCharacter );
|
ADD_METHOD( SetCharacter );
|
||||||
ADD_METHOD( GetWeightPounds );
|
ADD_METHOD( GetWeightPounds );
|
||||||
|
|||||||
Reference in New Issue
Block a user