update bindings
This commit is contained in:
@@ -166,19 +166,10 @@ TapNoteScore StringToTapNoteScore( const RString &s )
|
|||||||
else if( s == "Perfect" ) return TNS_W2;
|
else if( s == "Perfect" ) return TNS_W2;
|
||||||
else if( s == "Marvelous" ) return TNS_W1;
|
else if( s == "Marvelous" ) return TNS_W1;
|
||||||
|
|
||||||
return TNS_INVALID;
|
return TNS_Invalid;
|
||||||
}
|
}
|
||||||
XToLocalizedString( TapNoteScore );
|
XToLocalizedString( TapNoteScore );
|
||||||
LuaFunction( TapNoteScoreToLocalizedString, TapNoteScoreToLocalizedString((TapNoteScore) IArg(1)) );
|
LuaFunction( TapNoteScoreToLocalizedString, TapNoteScoreToLocalizedString(Enum::Check<TapNoteScore>(L, 1)) );
|
||||||
static void LuaTapNoteScores( lua_State* L )
|
|
||||||
{
|
|
||||||
FOREACH_TapNoteScore( i )
|
|
||||||
{
|
|
||||||
RString s = TapNoteScoreNames[i];
|
|
||||||
LUA->SetGlobal( "TNS_"+s, i );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
REGISTER_WITH_LUA_FUNCTION( LuaTapNoteScores );
|
|
||||||
|
|
||||||
|
|
||||||
static const char *HoldNoteScoreNames[] = {
|
static const char *HoldNoteScoreNames[] = {
|
||||||
@@ -187,6 +178,7 @@ static const char *HoldNoteScoreNames[] = {
|
|||||||
"Held",
|
"Held",
|
||||||
};
|
};
|
||||||
XToString( HoldNoteScore, NUM_HoldNoteScore );
|
XToString( HoldNoteScore, NUM_HoldNoteScore );
|
||||||
|
LuaXType( HoldNoteScore );
|
||||||
HoldNoteScore StringToHoldNoteScore( const RString &s )
|
HoldNoteScore StringToHoldNoteScore( const RString &s )
|
||||||
{
|
{
|
||||||
// for backward compatibility
|
// for backward compatibility
|
||||||
@@ -198,18 +190,9 @@ HoldNoteScore StringToHoldNoteScore( const RString &s )
|
|||||||
else if( s == "LetGo" ) return HNS_LetGo;
|
else if( s == "LetGo" ) return HNS_LetGo;
|
||||||
else if( s == "Held" ) return HNS_Held;
|
else if( s == "Held" ) return HNS_Held;
|
||||||
|
|
||||||
return HNS_INVALID;
|
return HNS_Invalid;
|
||||||
}
|
}
|
||||||
XToLocalizedString( HoldNoteScore );
|
XToLocalizedString( HoldNoteScore );
|
||||||
static void LuaHoldNoteScores( lua_State* L )
|
|
||||||
{
|
|
||||||
FOREACH_HoldNoteScore( i )
|
|
||||||
{
|
|
||||||
RString s = HoldNoteScoreNames[i];
|
|
||||||
LUA->SetGlobal( "HNS_"+s, i );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
REGISTER_WITH_LUA_FUNCTION( LuaHoldNoteScores );
|
|
||||||
|
|
||||||
|
|
||||||
static const char *MemoryCardStateNames[] = {
|
static const char *MemoryCardStateNames[] = {
|
||||||
@@ -326,16 +309,7 @@ static const char *GoalTypeNames[] = {
|
|||||||
};
|
};
|
||||||
XToString( GoalType, NUM_GoalType );
|
XToString( GoalType, NUM_GoalType );
|
||||||
StringToX( GoalType );
|
StringToX( GoalType );
|
||||||
static void LuaGoalType(lua_State* L)
|
LuaXType( GoalType );
|
||||||
{
|
|
||||||
FOREACH_GoalType( gt )
|
|
||||||
{
|
|
||||||
RString s = GoalTypeNames[gt];
|
|
||||||
s.MakeUpper();
|
|
||||||
LUA->SetGlobal( "GOAL_"+s, gt );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
REGISTER_WITH_LUA_FUNCTION( LuaGoalType );
|
|
||||||
|
|
||||||
static const char *EditModeNames[] = {
|
static const char *EditModeNames[] = {
|
||||||
"Practice",
|
"Practice",
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ enum TapNoteScore {
|
|||||||
TNS_W2,
|
TNS_W2,
|
||||||
TNS_W1,
|
TNS_W1,
|
||||||
NUM_TapNoteScore,
|
NUM_TapNoteScore,
|
||||||
TNS_INVALID,
|
TNS_Invalid,
|
||||||
};
|
};
|
||||||
#define FOREACH_TapNoteScore( tns ) FOREACH_ENUM( TapNoteScore, NUM_TapNoteScore, tns )
|
#define FOREACH_TapNoteScore( tns ) FOREACH_ENUM( TapNoteScore, NUM_TapNoteScore, tns )
|
||||||
const RString& TapNoteScoreToString( TapNoteScore tns );
|
const RString& TapNoteScoreToString( TapNoteScore tns );
|
||||||
@@ -158,7 +158,7 @@ enum HoldNoteScore
|
|||||||
HNS_LetGo, // the HoldNote has passed and they missed it
|
HNS_LetGo, // the HoldNote has passed and they missed it
|
||||||
HNS_Held, // the HoldNote has passed and was successfully held all the way through
|
HNS_Held, // the HoldNote has passed and was successfully held all the way through
|
||||||
NUM_HoldNoteScore,
|
NUM_HoldNoteScore,
|
||||||
HNS_INVALID,
|
HNS_Invalid,
|
||||||
};
|
};
|
||||||
#define FOREACH_HoldNoteScore( hns ) FOREACH_ENUM( HoldNoteScore, NUM_HoldNoteScore, hns )
|
#define FOREACH_HoldNoteScore( hns ) FOREACH_ENUM( HoldNoteScore, NUM_HoldNoteScore, hns )
|
||||||
const RString& HoldNoteScoreToString( HoldNoteScore hns );
|
const RString& HoldNoteScoreToString( HoldNoteScore hns );
|
||||||
@@ -320,7 +320,7 @@ enum Premium
|
|||||||
PREMIUM_DOUBLE,
|
PREMIUM_DOUBLE,
|
||||||
PREMIUM_JOINT,
|
PREMIUM_JOINT,
|
||||||
NUM_Premium,
|
NUM_Premium,
|
||||||
Premium_Invalidz
|
Premium_Invalid
|
||||||
};
|
};
|
||||||
#define FOREACH_Premium( i ) FOREACH_ENUM( Premium, NUM_Premium, i )
|
#define FOREACH_Premium( i ) FOREACH_ENUM( Premium, NUM_Premium, i )
|
||||||
const RString& PremiumToString( Premium p );
|
const RString& PremiumToString( Premium p );
|
||||||
@@ -409,6 +409,7 @@ enum GoalType
|
|||||||
#define FOREACH_GoalType( gt ) FOREACH_ENUM( GoalType, NUM_GoalType, gt )
|
#define FOREACH_GoalType( gt ) FOREACH_ENUM( GoalType, NUM_GoalType, gt )
|
||||||
const RString& GoalTypeToString( GoalType gt );
|
const RString& GoalTypeToString( GoalType gt );
|
||||||
GoalType StringToGoalType( const RString& s );
|
GoalType StringToGoalType( const RString& s );
|
||||||
|
LuaDeclareType( GoalType );
|
||||||
|
|
||||||
|
|
||||||
enum EditMode
|
enum EditMode
|
||||||
|
|||||||
@@ -32,8 +32,8 @@ void PlayerStageStats::Init()
|
|||||||
iSongsPassed = iSongsPlayed = 0;
|
iSongsPassed = iSongsPlayed = 0;
|
||||||
fLifeRemainingSeconds = 0;
|
fLifeRemainingSeconds = 0;
|
||||||
fCaloriesBurned = 0;
|
fCaloriesBurned = 0;
|
||||||
tnsLast = TNS_INVALID;
|
tnsLast = TNS_Invalid;
|
||||||
hnsLast = HNS_INVALID;
|
hnsLast = HNS_Invalid;
|
||||||
|
|
||||||
ZERO( iTapNoteScores );
|
ZERO( iTapNoteScores );
|
||||||
ZERO( iHoldNoteScores );
|
ZERO( iHoldNoteScores );
|
||||||
|
|||||||
@@ -1915,7 +1915,7 @@ public:
|
|||||||
static int GetWeightPounds( T* p, lua_State *L ) { lua_pushnumber(L, p->m_iWeightPounds ); return 1; }
|
static int GetWeightPounds( T* p, lua_State *L ) { lua_pushnumber(L, p->m_iWeightPounds ); return 1; }
|
||||||
static int SetWeightPounds( T* p, lua_State *L ) { p->m_iWeightPounds = IArg(1); return 0; }
|
static int SetWeightPounds( T* p, lua_State *L ) { p->m_iWeightPounds = IArg(1); return 0; }
|
||||||
static int GetGoalType( T* p, lua_State *L ) { lua_pushnumber(L, p->m_GoalType ); return 1; }
|
static int GetGoalType( T* p, lua_State *L ) { lua_pushnumber(L, p->m_GoalType ); return 1; }
|
||||||
static int SetGoalType( T* p, lua_State *L ) { p->m_GoalType = (GoalType)IArg(1); return 0; }
|
static int SetGoalType( T* p, lua_State *L ) { p->m_GoalType = Enum::Check<GoalType>(L, 1); return 0; }
|
||||||
static int GetGoalCalories( T* p, lua_State *L ) { lua_pushnumber(L, p->m_iGoalCalories ); return 1; }
|
static int GetGoalCalories( T* p, lua_State *L ) { lua_pushnumber(L, p->m_iGoalCalories ); return 1; }
|
||||||
static int SetGoalCalories( T* p, lua_State *L ) { p->m_iGoalCalories = IArg(1); return 0; }
|
static int SetGoalCalories( T* p, lua_State *L ) { p->m_iGoalCalories = IArg(1); return 0; }
|
||||||
static int GetGoalSeconds( T* p, lua_State *L ) { lua_pushnumber(L, p->m_iGoalSeconds ); return 1; }
|
static int GetGoalSeconds( T* p, lua_State *L ) { lua_pushnumber(L, p->m_iGoalSeconds ); return 1; }
|
||||||
|
|||||||
@@ -36,8 +36,8 @@ void ScoreKeeperNormal::Load(
|
|||||||
|
|
||||||
/* True if a jump is one to combo, false if combo is purely based on tap count. */
|
/* True if a jump is one to combo, false if combo is purely based on tap count. */
|
||||||
m_bComboIsPerRow = THEME->GetMetricB( "Gameplay", "ComboIsPerRow" );
|
m_bComboIsPerRow = THEME->GetMetricB( "Gameplay", "ComboIsPerRow" );
|
||||||
m_MinScoreToContinueCombo = (TapNoteScore) THEME->GetMetricI( "Gameplay", "MinScoreToContinueCombo" );
|
m_MinScoreToContinueCombo.Load( "Gameplay", "MinScoreToContinueCombo" );
|
||||||
m_MinScoreToMaintainCombo = (TapNoteScore) THEME->GetMetricI( "Gameplay", "MinScoreToMaintainCombo" );
|
m_MinScoreToMaintainCombo.Load( "Gameplay", "MinScoreToMaintainCombo" );
|
||||||
|
|
||||||
//
|
//
|
||||||
// Fill in STATSMAN->m_CurStageStats, calculate multiplier
|
// Fill in STATSMAN->m_CurStageStats, calculate multiplier
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
#include "ScoreKeeper.h"
|
#include "ScoreKeeper.h"
|
||||||
#include "Attack.h"
|
#include "Attack.h"
|
||||||
#include "ScreenMessage.h"
|
#include "ScreenMessage.h"
|
||||||
|
#include "ThemeMetric.h"
|
||||||
class Steps;
|
class Steps;
|
||||||
class Song;
|
class Song;
|
||||||
struct RadarValues;
|
struct RadarValues;
|
||||||
@@ -26,8 +27,8 @@ class ScoreKeeperNormal: public ScoreKeeper
|
|||||||
bool m_bIsBeginner;
|
bool m_bIsBeginner;
|
||||||
|
|
||||||
bool m_bComboIsPerRow;
|
bool m_bComboIsPerRow;
|
||||||
TapNoteScore m_MinScoreToContinueCombo;
|
ThemeMetric<TapNoteScore> m_MinScoreToContinueCombo;
|
||||||
TapNoteScore m_MinScoreToMaintainCombo;
|
ThemeMetric<TapNoteScore> m_MinScoreToMaintainCombo;
|
||||||
|
|
||||||
vector<Steps*> m_apSteps;
|
vector<Steps*> m_apSteps;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user