[Game] Added CountNotesSeparately, GetMapJudgmentTo(TapNoteScore) Lua bindings.
This commit is contained in:
@@ -11,6 +11,8 @@ StepMania 5.0 $next | 20111xxx
|
|||||||
2011/12/23
|
2011/12/23
|
||||||
----------
|
----------
|
||||||
* [Song] Fixed a bug where a sample start of 0 wouldn't work. [AJ]
|
* [Song] Fixed a bug where a sample start of 0 wouldn't work. [AJ]
|
||||||
|
* [Game] Added CountNotesSeparately and GetMapJudgmentTo(TapNoteScore)
|
||||||
|
Lua bindings. [AJ]
|
||||||
|
|
||||||
2011/12/22
|
2011/12/22
|
||||||
----------
|
----------
|
||||||
|
|||||||
@@ -39,6 +39,19 @@ const Game::PerButtonInfo *Game::GetPerButtonInfo( GameButton gb ) const
|
|||||||
return &m_PerButtonInfo[gb-GAME_BUTTON_NEXT];
|
return &m_PerButtonInfo[gb-GAME_BUTTON_NEXT];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TapNoteScore Game::GetMapJudgmentTo( TapNoteScore tns ) const
|
||||||
|
{
|
||||||
|
switch(tns)
|
||||||
|
{
|
||||||
|
case TNS_W1: return m_mapW1To;
|
||||||
|
case TNS_W2: return m_mapW2To;
|
||||||
|
case TNS_W3: return m_mapW3To;
|
||||||
|
case TNS_W4: return m_mapW4To;
|
||||||
|
case TNS_W5: return m_mapW5To;
|
||||||
|
default: return TapNoteScore_Invalid;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// lua start
|
// lua start
|
||||||
#include "LuaBinding.h"
|
#include "LuaBinding.h"
|
||||||
|
|
||||||
@@ -47,10 +60,14 @@ class LunaGame: public Luna<Game>
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static int GetName( T* p, lua_State *L ) { lua_pushstring( L, p->m_szName ); return 1; }
|
static int GetName( T* p, lua_State *L ) { lua_pushstring( L, p->m_szName ); return 1; }
|
||||||
|
static int CountNotesSeparately( T* p, lua_State *L ) { lua_pushboolean( L, p->m_bCountNotesSeparately ); return 1; }
|
||||||
|
DEFINE_METHOD( GetMapJudgmentTo, GetMapJudgmentTo(Enum::Check<TapNoteScore>(L, 1)) )
|
||||||
|
|
||||||
LunaGame()
|
LunaGame()
|
||||||
{
|
{
|
||||||
ADD_METHOD( GetName );
|
ADD_METHOD( GetName );
|
||||||
|
ADD_METHOD( CountNotesSeparately );
|
||||||
|
ADD_METHOD( GetMapJudgmentTo );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ public:
|
|||||||
TapNoteScore m_mapW3To;
|
TapNoteScore m_mapW3To;
|
||||||
TapNoteScore m_mapW4To;
|
TapNoteScore m_mapW4To;
|
||||||
TapNoteScore m_mapW5To;
|
TapNoteScore m_mapW5To;
|
||||||
|
TapNoteScore GetMapJudgmentTo( TapNoteScore tns ) const;
|
||||||
|
|
||||||
// Lua
|
// Lua
|
||||||
void PushSelf( lua_State *L );
|
void PushSelf( lua_State *L );
|
||||||
|
|||||||
Reference in New Issue
Block a user