[GameCommand] Don't allow battle/rave with Routine (StyleType_TwoPlayersSharedSides). also cleanup
[RageTypes] remove glowmode stub stuff [RageDisplayOGL] update comments slightly
This commit is contained in:
+19
-20
@@ -391,7 +391,7 @@ void GameCommand::LoadOne( const Command& cmd )
|
|||||||
m_bApplyDefaultOptions = true;
|
m_bApplyDefaultOptions = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* sm-ssc additions begin: */
|
// sm-ssc additions begin:
|
||||||
else if( sName == "urlnoexit" )
|
else if( sName == "urlnoexit" )
|
||||||
{
|
{
|
||||||
m_sUrl = sValue;
|
m_sUrl = sValue;
|
||||||
@@ -420,7 +420,7 @@ void GameCommand::LoadOne( const Command& cmd )
|
|||||||
|
|
||||||
else if( sName == "fademusic" )
|
else if( sName == "fademusic" )
|
||||||
{
|
{
|
||||||
// todo: parse for shit.
|
// todo: parse things correctly. -aj
|
||||||
if( cmd.m_vsArgs.size() == 3 )
|
if( cmd.m_vsArgs.size() == 3 )
|
||||||
{
|
{
|
||||||
m_bFadeMusic = true;
|
m_bFadeMusic = true;
|
||||||
@@ -483,8 +483,9 @@ static bool AreStyleAndPlayModeCompatible( const Style *style, PlayMode pm )
|
|||||||
if( style->m_iColsPerPlayer >= 6 && RString(GAMESTATE->m_pCurGame->m_szName) != "techno" )
|
if( style->m_iColsPerPlayer >= 6 && RString(GAMESTATE->m_pCurGame->m_szName) != "techno" )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
/* Don't allow battle modes if the style takes both sides. */
|
// Don't allow battle modes if the style takes both sides.
|
||||||
if( style->m_StyleType==StyleType_OnePlayerTwoSides )
|
if( style->m_StyleType==StyleType_OnePlayerTwoSides ||
|
||||||
|
style->m_StyleType==StyleType_TwoPlayersSharedSides )
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -510,13 +511,13 @@ bool GameCommand::IsPlayable( RString *why ) const
|
|||||||
{
|
{
|
||||||
case CoinMode_Home:
|
case CoinMode_Home:
|
||||||
case CoinMode_Free:
|
case CoinMode_Free:
|
||||||
iCredits = NUM_PLAYERS; /* not iNumCreditsPaid */
|
iCredits = NUM_PLAYERS; // not iNumCreditsPaid
|
||||||
}
|
}
|
||||||
|
|
||||||
/* With PREFSMAN->m_bDelayedCreditsReconcile disabled, enough credits must be
|
/* With PREFSMAN->m_bDelayedCreditsReconcile disabled, enough credits must
|
||||||
* paid. (This means that enough sides must be joined.) Enabled, simply having
|
* be paid. (This means that enough sides must be joined.) Enabled, simply
|
||||||
* enough credits lying in the machine is sufficient; we'll deduct the extra in
|
* having enough credits lying in the machine is sufficient; we'll deduct the
|
||||||
* Apply(). */
|
* extra in Apply(). */
|
||||||
int iNumCreditsAvailable = iNumCreditsPaid;
|
int iNumCreditsAvailable = iNumCreditsPaid;
|
||||||
if( PREFSMAN->m_bDelayedCreditsReconcile )
|
if( PREFSMAN->m_bDelayedCreditsReconcile )
|
||||||
iNumCreditsAvailable += iCredits;
|
iNumCreditsAvailable += iCredits;
|
||||||
@@ -545,8 +546,8 @@ bool GameCommand::IsPlayable( RString *why ) const
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* If both sides are joined, disallow singles modes, since easy to select them
|
/* If both sides are joined, disallow singles modes, since easy to select
|
||||||
* accidentally, instead of versus mode. */
|
* them accidentally, instead of versus mode. */
|
||||||
if( m_pStyle->m_StyleType == StyleType_OnePlayerOneSide &&
|
if( m_pStyle->m_StyleType == StyleType_OnePlayerOneSide &&
|
||||||
GAMESTATE->GetNumSidesJoined() > 1 )
|
GAMESTATE->GetNumSidesJoined() > 1 )
|
||||||
{
|
{
|
||||||
@@ -671,10 +672,9 @@ void GameCommand::ApplySelf( const vector<PlayerNumber> &vpns ) const
|
|||||||
{
|
{
|
||||||
GAMESTATE->SetCurrentStyle( m_pStyle );
|
GAMESTATE->SetCurrentStyle( m_pStyle );
|
||||||
|
|
||||||
// It's possible to choose a style that didn't have enough
|
// It's possible to choose a style that didn't have enough players joined.
|
||||||
// players joined. If enough players aren't joined, then
|
// If enough players aren't joined, then we need to subtract credits
|
||||||
// we need to subtract credits for the sides that will be
|
// for the sides that will be joined as a result of applying this option.
|
||||||
// joined as a result of applying this option.
|
|
||||||
if( GAMESTATE->GetCoinMode() == CoinMode_Pay )
|
if( GAMESTATE->GetCoinMode() == CoinMode_Pay )
|
||||||
{
|
{
|
||||||
int iNumCreditsRequired = GetCreditsRequiredToPlayStyle(m_pStyle);
|
int iNumCreditsRequired = GetCreditsRequiredToPlayStyle(m_pStyle);
|
||||||
@@ -685,9 +685,8 @@ void GameCommand::ApplySelf( const vector<PlayerNumber> &vpns ) const
|
|||||||
iNumCreditsOwed * PREFSMAN->m_iCoinsPerCredit, GAMESTATE->m_iCoins.Get() );
|
iNumCreditsOwed * PREFSMAN->m_iCoinsPerCredit, GAMESTATE->m_iCoins.Get() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If only one side is joined and we picked a style that requires both
|
||||||
// If only one side is joined and we picked a style
|
// sides, join the other side.
|
||||||
// that requires both sides, join the other side.
|
|
||||||
switch( m_pStyle->m_StyleType )
|
switch( m_pStyle->m_StyleType )
|
||||||
{
|
{
|
||||||
case StyleType_OnePlayerOneSide:
|
case StyleType_OnePlayerOneSide:
|
||||||
@@ -791,8 +790,8 @@ void GameCommand::ApplySelf( const vector<PlayerNumber> &vpns ) const
|
|||||||
ScreenPrompt::Prompt( SM_None, COULD_NOT_LAUNCH_BROWSER );
|
ScreenPrompt::Prompt( SM_None, COULD_NOT_LAUNCH_BROWSER );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If we're going to stop music, do so before preparing new screens, so we don't
|
/* If we're going to stop music, do so before preparing new screens, so we
|
||||||
* stop music between preparing screens and loading screens. */
|
* don't stop music between preparing screens and loading screens. */
|
||||||
if( m_bStopMusic )
|
if( m_bStopMusic )
|
||||||
SOUND->StopMusic();
|
SOUND->StopMusic();
|
||||||
if( m_bFadeMusic )
|
if( m_bFadeMusic )
|
||||||
|
|||||||
@@ -1593,22 +1593,22 @@ void RageDisplay_OGL::SetTextureMode( TextureUnit tu, TextureMode tm )
|
|||||||
glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_ADD );
|
glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_ADD );
|
||||||
break;
|
break;
|
||||||
case TextureMode_Glow:
|
case TextureMode_Glow:
|
||||||
// the below function is brighten:
|
// the below function is glowmode,brighten:
|
||||||
if( !GLExt.m_bARB_texture_env_combine && !GLExt.m_bEXT_texture_env_combine )
|
if( !GLExt.m_bARB_texture_env_combine && !GLExt.m_bEXT_texture_env_combine )
|
||||||
{
|
{
|
||||||
/* This is changing blend state, instead of texture state, which isn't
|
/* This is changing blend state, instead of texture state, which
|
||||||
* great, but it's better than doing nothing. */
|
* isn't great, but it's better than doing nothing. */
|
||||||
glBlendFunc( GL_SRC_ALPHA, GL_ONE );
|
glBlendFunc( GL_SRC_ALPHA, GL_ONE );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// and this is whiten:
|
// and this is glowmode,whiten:
|
||||||
/* Source color is the diffuse color only: */
|
// Source color is the diffuse color only:
|
||||||
glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_EXT );
|
glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_EXT );
|
||||||
glTexEnvi( GL_TEXTURE_ENV, GLenum(GL_COMBINE_RGB_EXT), GL_REPLACE );
|
glTexEnvi( GL_TEXTURE_ENV, GLenum(GL_COMBINE_RGB_EXT), GL_REPLACE );
|
||||||
glTexEnvi( GL_TEXTURE_ENV, GLenum(GL_SOURCE0_RGB_EXT), GL_PRIMARY_COLOR_EXT );
|
glTexEnvi( GL_TEXTURE_ENV, GLenum(GL_SOURCE0_RGB_EXT), GL_PRIMARY_COLOR_EXT );
|
||||||
|
|
||||||
/* Source alpha is texture alpha * diffuse alpha: */
|
// Source alpha is texture alpha * diffuse alpha:
|
||||||
glTexEnvi( GL_TEXTURE_ENV, GLenum(GL_COMBINE_ALPHA_EXT), GL_MODULATE );
|
glTexEnvi( GL_TEXTURE_ENV, GLenum(GL_COMBINE_ALPHA_EXT), GL_MODULATE );
|
||||||
glTexEnvi( GL_TEXTURE_ENV, GLenum(GL_OPERAND0_ALPHA_EXT), GL_SRC_ALPHA );
|
glTexEnvi( GL_TEXTURE_ENV, GLenum(GL_OPERAND0_ALPHA_EXT), GL_SRC_ALPHA );
|
||||||
glTexEnvi( GL_TEXTURE_ENV, GLenum(GL_SOURCE0_ALPHA_EXT), GL_PRIMARY_COLOR_EXT );
|
glTexEnvi( GL_TEXTURE_ENV, GLenum(GL_SOURCE0_ALPHA_EXT), GL_PRIMARY_COLOR_EXT );
|
||||||
|
|||||||
@@ -155,14 +155,6 @@ static const char *ZTestModeNames[] =
|
|||||||
XToString( ZTestMode );
|
XToString( ZTestMode );
|
||||||
LuaXType( ZTestMode );
|
LuaXType( ZTestMode );
|
||||||
|
|
||||||
static const char *GlowModeNames[] =
|
|
||||||
{
|
|
||||||
"Brighten",
|
|
||||||
"Whiten",
|
|
||||||
};
|
|
||||||
XToString( GlowMode );
|
|
||||||
LuaXType( GlowMode );
|
|
||||||
|
|
||||||
static const char *TextGlowModeNames[] =
|
static const char *TextGlowModeNames[] =
|
||||||
{
|
{
|
||||||
"Inner",
|
"Inner",
|
||||||
|
|||||||
+4
-13
@@ -25,14 +25,14 @@ LuaDeclareType( BlendMode );
|
|||||||
|
|
||||||
enum TextureMode
|
enum TextureMode
|
||||||
{
|
{
|
||||||
/* Affects one texture stage. Texture is modulated with the diffuse color. */
|
// Affects one texture stage. Texture is modulated with the diffuse color.
|
||||||
TextureMode_Modulate,
|
TextureMode_Modulate,
|
||||||
|
|
||||||
/* Affects one texture stage. Color is replaced with white, leaving alpha. Used
|
/* Affects one texture stage. Color is replaced with white, leaving alpha.
|
||||||
* with BLEND_ADD to add glow. */
|
* Used with BLEND_ADD to add glow. */
|
||||||
TextureMode_Glow,
|
TextureMode_Glow,
|
||||||
|
|
||||||
/* Affects one texture stage. Color is added to the previous texture stage. */
|
// Affects one texture stage. Color is added to the previous texture stage.
|
||||||
TextureMode_Add,
|
TextureMode_Add,
|
||||||
|
|
||||||
NUM_TextureMode,
|
NUM_TextureMode,
|
||||||
@@ -85,15 +85,6 @@ enum PolygonMode
|
|||||||
};
|
};
|
||||||
LuaDeclareType( PolygonMode );
|
LuaDeclareType( PolygonMode );
|
||||||
|
|
||||||
enum GlowMode
|
|
||||||
{
|
|
||||||
GlowMode_Brighten,
|
|
||||||
GlowMode_Whiten,
|
|
||||||
NUM_GlowMode,
|
|
||||||
GlowMode_Invalid
|
|
||||||
};
|
|
||||||
LuaDeclareType( GlowMode );
|
|
||||||
|
|
||||||
enum TextGlowMode
|
enum TextGlowMode
|
||||||
{
|
{
|
||||||
TextGlowMode_Inner,
|
TextGlowMode_Inner,
|
||||||
|
|||||||
Reference in New Issue
Block a user