doubles -> double

add Lua Premium constants
This commit is contained in:
Chris Danford
2005-05-20 08:03:01 +00:00
parent b6af8a9816
commit 6d49da50ee
5 changed files with 16 additions and 6 deletions
+1 -1
View File
@@ -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;
+11 -1
View File
@@ -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[] = {
+2 -2
View File
@@ -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 );
+1 -1
View File
@@ -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) );
}
+1 -1
View File
@@ -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;