doubles -> double
add Lua Premium constants
This commit is contained in:
@@ -434,7 +434,7 @@ int GetCreditsRequiredToPlayStyle( const Style *style )
|
||||
case TWO_PLAYERS_TWO_SIDES:
|
||||
return 2;
|
||||
case ONE_PLAYER_TWO_SIDES:
|
||||
return (GAMESTATE->GetPremium() == PREMIUM_DOUBLES) ? 1 : 2;
|
||||
return (GAMESTATE->GetPremium() == PREMIUM_DOUBLE) ? 1 : 2;
|
||||
default:
|
||||
ASSERT(0);
|
||||
return 1;
|
||||
|
||||
@@ -112,10 +112,20 @@ REGISTER_WITH_LUA_FUNCTION( LuaCoinMode );
|
||||
|
||||
static const CString PremiumNames[] = {
|
||||
"none",
|
||||
"doubles",
|
||||
"double",
|
||||
"joint",
|
||||
};
|
||||
XToString( Premium, NUM_PREMIUMS );
|
||||
static void LuaPremium(lua_State* L)
|
||||
{
|
||||
FOREACH_Premium( i )
|
||||
{
|
||||
CString s = PremiumNames[i];
|
||||
s.MakeUpper();
|
||||
LUA->SetGlobal( "PREMIUM_"+s, i );
|
||||
}
|
||||
}
|
||||
REGISTER_WITH_LUA_FUNCTION( LuaPremium );
|
||||
|
||||
|
||||
static const CString SortOrderNames[] = {
|
||||
|
||||
@@ -275,8 +275,8 @@ const CString& CoinModeToString( CoinMode cm );
|
||||
//
|
||||
// Premium
|
||||
//
|
||||
enum Premium { PREMIUM_NONE, PREMIUM_DOUBLES, PREMIUM_JOINT, NUM_PREMIUMS };
|
||||
|
||||
enum Premium { PREMIUM_NONE, PREMIUM_DOUBLE, PREMIUM_JOINT, NUM_PREMIUMS };
|
||||
#define FOREACH_Premium( i ) FOREACH_ENUM( Premium, NUM_PREMIUMS, i )
|
||||
const CString& PremiumToString( Premium p );
|
||||
|
||||
|
||||
|
||||
@@ -340,7 +340,7 @@ static void CoinsPerCredit( int &sel, bool ToSel, const ConfOption *pConfOption
|
||||
|
||||
static void PremiumM( int &sel, bool ToSel, const ConfOption *pConfOption )
|
||||
{
|
||||
const Premium mapping[] = { PREMIUM_NONE, PREMIUM_DOUBLES, PREMIUM_JOINT };
|
||||
const Premium mapping[] = { PREMIUM_NONE, PREMIUM_DOUBLE, PREMIUM_JOINT };
|
||||
MoveMap( sel, PREFSMAN->m_Premium, ToSel, mapping, ARRAYSIZE(mapping) );
|
||||
}
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ void ScreenSelectStyle::Init()
|
||||
|
||||
switch( GAMESTATE->GetPremium() )
|
||||
{
|
||||
case PREMIUM_DOUBLES:
|
||||
case PREMIUM_DOUBLE:
|
||||
m_sprPremium.Load( THEME->GetPathG(m_sName,"doubles premium") );
|
||||
this->AddChild( &m_sprPremium );
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user