comment/cleanup

This commit is contained in:
AJ Kelly
2010-06-30 00:04:52 -05:00
parent 4eda22a57b
commit acb9099c75
8 changed files with 81 additions and 104 deletions
+10 -17
View File
@@ -287,11 +287,9 @@ void Actor::BeginDraw() // set the world matrix and calculate actor properties
// Somthing below may set m_pTempState to tempState // Somthing below may set m_pTempState to tempState
m_pTempState = &m_current; m_pTempState = &m_current;
//
// set temporary drawing properties based on Effects // set temporary drawing properties based on Effects
//
static TweenState tempState; static TweenState tempState;
// todo: account for SSC_FUTURES -aj // todo: account for SSC_FUTURES -aj
if( m_Effect == no_effect ) if( m_Effect == no_effect )
{ {
@@ -305,7 +303,6 @@ void Actor::BeginDraw() // set the world matrix and calculate actor properties
ASSERT( fTotalPeriod > 0 ); ASSERT( fTotalPeriod > 0 );
const float fTimeIntoEffect = fmodfp( m_fSecsIntoEffect+m_fEffectOffset, fTotalPeriod ); const float fTimeIntoEffect = fmodfp( m_fSecsIntoEffect+m_fEffectOffset, fTotalPeriod );
float fPercentThroughEffect; float fPercentThroughEffect;
if( fTimeIntoEffect < m_fEffectRampUp ) if( fTimeIntoEffect < m_fEffectRampUp )
{ {
@@ -336,7 +333,6 @@ void Actor::BeginDraw() // set the world matrix and calculate actor properties
ASSERT_M( fPercentThroughEffect >= 0 && fPercentThroughEffect <= 1, ASSERT_M( fPercentThroughEffect >= 0 && fPercentThroughEffect <= 1,
ssprintf("PercentThroughEffect: %f", fPercentThroughEffect) ); ssprintf("PercentThroughEffect: %f", fPercentThroughEffect) );
bool bBlinkOn = fPercentThroughEffect > 0.5f; bool bBlinkOn = fPercentThroughEffect > 0.5f;
float fPercentBetweenColors = RageFastSin( (fPercentThroughEffect + 0.25f) * 2 * PI ) / 2 + 0.5f; float fPercentBetweenColors = RageFastSin( (fPercentThroughEffect + 0.25f) * 2 * PI ) / 2 + 0.5f;
ASSERT_M( fPercentBetweenColors >= 0 && fPercentBetweenColors <= 1, ASSERT_M( fPercentBetweenColors >= 0 && fPercentBetweenColors <= 1,
@@ -440,7 +436,6 @@ void Actor::BeginDraw() // set the world matrix and calculate actor properties
} }
} }
if( m_fBaseAlpha != 1 ) if( m_fBaseAlpha != 1 )
{ {
if( m_pTempState != &tempState ) if( m_pTempState != &tempState )
@@ -453,7 +448,6 @@ void Actor::BeginDraw() // set the world matrix and calculate actor properties
tempState.diffuse[i].a *= m_fBaseAlpha; tempState.diffuse[i].a *= m_fBaseAlpha;
} }
if( m_pTempState->pos.x != 0 || m_pTempState->pos.y != 0 || m_pTempState->pos.z != 0 ) if( m_pTempState->pos.x != 0 || m_pTempState->pos.y != 0 || m_pTempState->pos.z != 0 )
{ {
RageMatrix m; RageMatrix m;
@@ -612,8 +606,8 @@ void Actor::UpdateTweening( float fDeltaTime )
if( bBeginning ) if( bBeginning )
{ {
// Execute the command in this tween (if any). Do this last, and don't access // Execute the command in this tween (if any). Do this last, and don't
// TI or TS after, since this may modify the tweening queue. // access TI or TS after, since this may modify the tweening queue.
if( !sCommand.empty() ) if( !sCommand.empty() )
{ {
if( sCommand.Left(1) == "!" ) if( sCommand.Left(1) == "!" )
@@ -641,7 +635,7 @@ void Actor::Update( float fDeltaTime )
if( m_fHibernateSecondsLeft > 0 ) if( m_fHibernateSecondsLeft > 0 )
return; return;
/* Grab the leftover time. */ // Grab the leftover time.
fDeltaTime = -m_fHibernateSecondsLeft; fDeltaTime = -m_fHibernateSecondsLeft;
m_fHibernateSecondsLeft = 0; m_fHibernateSecondsLeft = 0;
} }
@@ -660,8 +654,8 @@ void Actor::UpdateInternal( float fDeltaTime )
m_fSecsIntoEffect += fDeltaTime; m_fSecsIntoEffect += fDeltaTime;
m_fEffectDelta = fDeltaTime; m_fEffectDelta = fDeltaTime;
/* Wrap the counter, so it doesn't increase indefinitely (causing loss of /* Wrap the counter, so it doesn't increase indefinitely (causing loss
* precision if a screen is left to sit for a day). */ * of precision if a screen is left to sit for a day). */
if( m_fSecsIntoEffect >= GetEffectPeriod() ) if( m_fSecsIntoEffect >= GetEffectPeriod() )
m_fSecsIntoEffect -= GetEffectPeriod(); m_fSecsIntoEffect -= GetEffectPeriod();
break; break;
@@ -1094,18 +1088,16 @@ float Actor::GetTweenTimeLeft() const
return tot; return tot;
} }
/* /* This is a hack to change all tween states while leaving existing tweens alone.
* This is a hack to change all tween states while leaving existing tweens alone.
* *
* Hmm. Most commands actually act on a TweenStateAndInfo, not the Actor itself. * Hmm. Most commands actually act on a TweenStateAndInfo, not the Actor itself.
* Conceptually, it wouldn't be hard to give TweenState a presence in Lua, so * Conceptually, it wouldn't be hard to give TweenState a presence in Lua, so
* we can simply say eg. "for x in states(Actor) do x.SetDiffuseColor(c) end". * we can simply say eg. "for x in states(Actor) do x.SetDiffuseColor(c) end".
* However, we'd then have to give every TweenState a userdata in Lua while it's * However, we'd then have to give every TweenState a userdata in Lua while it's
* being manipulated, which would add overhead ... * being manipulated, which would add overhead ... */
*/
void Actor::SetGlobalDiffuseColor( RageColor c ) void Actor::SetGlobalDiffuseColor( RageColor c )
{ {
for( int i=0; i<4; i++ ) /* color, not alpha */ for( int i=0; i<4; i++ ) // color, not alpha
{ {
for( unsigned ts = 0; ts < m_Tweens.size(); ++ts ) for( unsigned ts = 0; ts < m_Tweens.size(); ++ts )
{ {
@@ -1189,6 +1181,7 @@ void Actor::TweenState::MakeWeightedAverage( TweenState& average_out, const Twee
for( int i=0; i<4; ++i ) for( int i=0; i<4; ++i )
average_out.diffuse[i] = lerp( fPercentBetween, ts1.diffuse[i], ts2.diffuse[i] ); average_out.diffuse[i] = lerp( fPercentBetween, ts1.diffuse[i], ts2.diffuse[i] );
average_out.glow = lerp( fPercentBetween, ts1.glow, ts2.glow ); average_out.glow = lerp( fPercentBetween, ts1.glow, ts2.glow );
average_out.aux = lerp( fPercentBetween, ts1.aux, ts2.aux ); average_out.aux = lerp( fPercentBetween, ts1.aux, ts2.aux );
} }
+1 -1
View File
@@ -541,7 +541,7 @@ void BGAnimationLayer::UpdateInternal( float fDeltaTime )
{ {
for( unsigned i=0; i<m_SubActors.size(); i++ ) for( unsigned i=0; i<m_SubActors.size(); i++ )
{ {
/* XXX: there's no longer any guarantee that this is a Sprite */ // XXX: there's no longer any guarantee that this is a Sprite
Sprite *pSprite = (Sprite*)m_SubActors[i]; Sprite *pSprite = (Sprite*)m_SubActors[i];
pSprite->StretchTexCoords( pSprite->StretchTexCoords(
fDeltaTime*m_fTexCoordVelocityX, fDeltaTime*m_fTexCoordVelocityX,
+5 -7
View File
@@ -13,19 +13,17 @@
REGISTER_ACTOR_CLASS( BitmapText ) REGISTER_ACTOR_CLASS( BitmapText )
/* /* XXX: Changing a whole array of diffuse colors every frame (several times) is
* XXX: Changing a whole array of diffuse colors every frame (several times) is a waste, * a waste, when we're usually setting them all to the same value. Rainbow and
* when we're usually setting them all to the same value. Rainbow and fading are annoying * fading are annoying to optimize, but rarely used. Iterating over every
* to optimize, but rarely used. Iterating over every character in Draw() is dumb. * character in Draw() is dumb. */
*/
/* XXX: /* XXX:
* We need some kind of font modifier string for metrics. For example, * We need some kind of font modifier string for metrics. For example,
* "valign=top;spacing = x+5,y+2" * "valign=top;spacing = x+5,y+2"
* *
* Better, we could go all the way, drop all of the actor-specific font aliases, * Better, we could go all the way, drop all of the actor-specific font aliases,
* and do "font=header2;valign=top;...". * and do "font=header2;valign=top;...". */
*/
#define NUM_RAINBOW_COLORS THEME->GetMetricI("BitmapText","NumRainbowColors") #define NUM_RAINBOW_COLORS THEME->GetMetricI("BitmapText","NumRainbowColors")
#define RAINBOW_COLOR(n) THEME->GetMetricC("BitmapText",ssprintf("RainbowColor%i", n+1)) #define RAINBOW_COLOR(n) THEME->GetMetricC("BitmapText",ssprintf("RainbowColor%i", n+1))
+7 -9
View File
@@ -13,14 +13,12 @@
REGISTER_ACTOR_CLASS( FadingBanner ) REGISTER_ACTOR_CLASS( FadingBanner )
/* /* Allow fading from one banner to another. We can handle two fades at once;
* Allow fading from one banner to another. We can handle two fades at once;
* this is used to fade from an old banner to a low-quality banner to a high- * this is used to fade from an old banner to a low-quality banner to a high-
* quality banner smoothly. * quality banner smoothly.
* *
* m_iIndexLatest is the latest banner loaded, and the one that we'll end up * m_iIndexLatest is the latest banner loaded, and the one that we'll end up
* displaying when the fades stop. * displaying when the fades stop. */
*/
FadingBanner::FadingBanner() FadingBanner::FadingBanner()
{ {
m_bMovingFast = false; m_bMovingFast = false;
@@ -60,7 +58,7 @@ void FadingBanner::DrawPrimitives()
// draw manually // draw manually
// ActorFrame::DrawPrimitives(); // ActorFrame::DrawPrimitives();
/* Render the latest banner first. */ // Render the latest banner first.
for( int i = 0; i < NUM_BANNERS; ++i ) for( int i = 0; i < NUM_BANNERS; ++i )
{ {
int index = m_iIndexLatest - i; int index = m_iIndexLatest - i;
@@ -108,8 +106,8 @@ void FadingBanner::BeforeChange( bool bLowResToHighRes )
m_Banner[m_iIndexLatest].PlayCommand( "ResetFade" ); m_Banner[m_iIndexLatest].PlayCommand( "ResetFade" );
/* We're about to load a banner. It'll probably cause a frame skip or /* We're about to load a banner. It'll probably cause a frame skip or two.
* two. Skip an update, so the fade-in doesn't skip. */ * Skip an update, so the fade-in doesn't skip. */
m_bSkipNextBannerUpdate = true; m_bSkipNextBannerUpdate = true;
} }
@@ -117,7 +115,7 @@ void FadingBanner::BeforeChange( bool bLowResToHighRes )
* banner should be loaded later. */ * banner should be loaded later. */
bool FadingBanner::LoadFromCachedBanner( const RString &path ) bool FadingBanner::LoadFromCachedBanner( const RString &path )
{ {
/* If we're already on the given banner, don't fade again. */ // If we're already on the given banner, don't fade again.
if( path != "" && m_Banner[m_iIndexLatest].GetTexturePath() == path ) if( path != "" && m_Banner[m_iIndexLatest].GetTexturePath() == path )
return false; return false;
@@ -138,7 +136,7 @@ bool FadingBanner::LoadFromCachedBanner( const RString &path )
} }
else else
{ {
/* Try to load the low quality version. */ // Try to load the low quality version.
ID = BANNERCACHE->LoadCachedBanner( path ); ID = BANNERCACHE->LoadCachedBanner( path );
} }
+26 -28
View File
@@ -160,8 +160,7 @@ GameState::GameState() :
m_Environment = new LuaTable; m_Environment = new LuaTable;
/* Don't reset yet; let the first screen do it, so we can // Don't reset yet; let the first screen do it, so we can use PREFSMAN and THEME.
* use PREFSMAN and THEME. */
// Reset(); // Reset();
// Register with Lua. // Register with Lua.
@@ -296,8 +295,8 @@ void GameState::Reset()
SONGMAN->UpdatePopular(); SONGMAN->UpdatePopular();
SONGMAN->UpdateShuffled(); SONGMAN->UpdateShuffled();
/* We may have cached trails from before everything was loaded (eg. from before /* We may have cached trails from before everything was loaded (eg. from
* SongManager::UpdatePopular could be called). Erase the cache. */ * before SongManager::UpdatePopular could be called). Erase the cache. */
SONGMAN->RegenerateNonFixedCourses(); SONGMAN->RegenerateNonFixedCourses();
STATSMAN->Reset(); STATSMAN->Reset();
@@ -391,7 +390,7 @@ void GameState::UnjoinPlayer( PlayerNumber pn )
msg.SetParam( "Player", pn ); msg.SetParam( "Player", pn );
MESSAGEMAN->Broadcast( msg ); MESSAGEMAN->Broadcast( msg );
/* If there are no players left, reset some non-player-specific stuff, too. */ // If there are no players left, reset some non-player-specific stuff, too.
if( m_MasterPlayerNumber == PLAYER_INVALID ) if( m_MasterPlayerNumber == PLAYER_INVALID )
{ {
SongOptions so; SongOptions so;
@@ -401,7 +400,7 @@ void GameState::UnjoinPlayer( PlayerNumber pn )
} }
} }
/* multiplayer join? */ /* handle multiplayer join? */
namespace namespace
{ {
@@ -410,11 +409,11 @@ namespace
if( !GAMESTATE->PlayersCanJoin() ) if( !GAMESTATE->PlayersCanJoin() )
return false; return false;
/* If this side is already in, don't re-join. */ // If this side is already in, don't re-join.
if( GAMESTATE->m_bSideIsJoined[pn] ) if( GAMESTATE->m_bSideIsJoined[pn] )
return false; return false;
/* subtract coins */ // subtract coins
int iCoinsNeededToJoin = GAMESTATE->GetCoinsNeededToJoin(); int iCoinsNeededToJoin = GAMESTATE->GetCoinsNeededToJoin();
if( GAMESTATE->m_iCoins < iCoinsNeededToJoin ) if( GAMESTATE->m_iCoins < iCoinsNeededToJoin )
@@ -428,17 +427,17 @@ namespace
} }
}; };
/* Handle an input that can join a player. Return true if the player joined. */ // Handle an input that can join a player. Return true if the player joined
bool GameState::JoinInput( PlayerNumber pn ) bool GameState::JoinInput( PlayerNumber pn )
{ {
/* When AutoJoin is enabled, join all players on a single start press. */ // When AutoJoin is enabled, join all players on a single start press.
if( GAMESTATE->m_bAutoJoin.Get() ) if( GAMESTATE->m_bAutoJoin.Get() )
return JoinPlayers(); return JoinPlayers();
else else
return JoinInputInternal( pn ); return JoinInputInternal( pn );
} }
/* Attempt to join all players, as if each player pressed Start. */ // Attempt to join all players, as if each player pressed Start.
bool GameState::JoinPlayers() bool GameState::JoinPlayers()
{ {
bool bJoined = false; bool bJoined = false;
@@ -465,8 +464,7 @@ int GameState::GetCoinsNeededToJoin() const
return iCoinsToCharge; return iCoinsToCharge;
} }
/* /* Game flow:
* Game flow:
* *
* BeginGame() - the first player has joined; the game is starting. * BeginGame() - the first player has joined; the game is starting.
* *
@@ -481,8 +479,7 @@ int GameState::GetCoinsNeededToJoin() const
* is up-to-date for Evaluation. * is up-to-date for Evaluation.
* *
* FinishStage() - gameplay and evaluation is finished * FinishStage() - gameplay and evaluation is finished
* Clears data which was stored by CommitStageStats. * Clears data which was stored by CommitStageStats. */
*/
void GameState::BeginGame() void GameState::BeginGame()
{ {
m_timeGameStarted.Touch(); m_timeGameStarted.Touch();
@@ -499,7 +496,7 @@ void GameState::BeginGame()
void GameState::LoadProfiles( bool bLoadEdits ) void GameState::LoadProfiles( bool bLoadEdits )
{ {
/* Unlock any cards that we might want to load. */ // Unlock any cards that we might want to load.
FOREACH_HumanPlayer( pn ) FOREACH_HumanPlayer( pn )
if( !PROFILEMAN->IsPersistentProfile(pn) ) if( !PROFILEMAN->IsPersistentProfile(pn) )
MEMCARDMAN->UnlockCard( pn ); MEMCARDMAN->UnlockCard( pn );
@@ -519,7 +516,7 @@ void GameState::LoadProfiles( bool bLoadEdits )
if( !bSuccess ) if( !bSuccess )
continue; continue;
/* Lock the card on successful load, so we won't allow it to be changed. */ // Lock the card on successful load, so we won't allow it to be changed.
MEMCARDMAN->LockCard( pn ); MEMCARDMAN->LockCard( pn );
LoadCurrentSettingsFromProfile( pn ); LoadCurrentSettingsFromProfile( pn );
@@ -540,6 +537,7 @@ void GameState::SavePlayerProfile( PlayerNumber pn )
{ {
if( !PROFILEMAN->IsPersistentProfile(pn) ) if( !PROFILEMAN->IsPersistentProfile(pn) )
return; return;
// AutoplayCPU should not save scores. -aj // AutoplayCPU should not save scores. -aj
// xxx: this MAY cause issues with Multiplayer. However, without a working // xxx: this MAY cause issues with Multiplayer. However, without a working
// Multiplayer build, we'll never know. -aj // Multiplayer build, we'll never know. -aj
@@ -558,11 +556,11 @@ bool GameState::HaveProfileToLoad()
{ {
FOREACH_HumanPlayer( pn ) FOREACH_HumanPlayer( pn )
{ {
/* We won't load this profile if it's already loaded. */ // We won't load this profile if it's already loaded.
if( PROFILEMAN->IsPersistentProfile(pn) ) if( PROFILEMAN->IsPersistentProfile(pn) )
continue; continue;
/* If a memory card is inserted, we'l try to load it. */ // If a memory card is inserted, we'l try to load it.
if( MEMCARDMAN->CardInserted(pn) ) if( MEMCARDMAN->CardInserted(pn) )
return true; return true;
if( !PROFILEMAN->m_sDefaultLocalProfileID[pn].Get().empty() ) if( !PROFILEMAN->m_sDefaultLocalProfileID[pn].Get().empty() )
@@ -637,7 +635,7 @@ int GameState::GetNumStagesForCurrentSongAndStepsOrCourse() const
// pCurSteps will still be set while no players are joined. -Chris // pCurSteps will still be set while no players are joined. -Chris
if( pSteps && numSidesJoined > 0 ) if( pSteps && numSidesJoined > 0 )
{ {
/* If a style isn't set, use the style of the selected steps. */ // If a style isn't set, use the style of the selected steps.
StepsType st = pSteps->m_StepsType; StepsType st = pSteps->m_StepsType;
pStyle = GAMEMAN->GetFirstCompatibleStyle( m_pCurGame, numSidesJoined, st ); pStyle = GAMEMAN->GetFirstCompatibleStyle( m_pCurGame, numSidesJoined, st );
} }
@@ -652,7 +650,8 @@ int GameState::GetNumStagesForCurrentSongAndStepsOrCourse() const
pStyle = vpStyles[0]; pStyle = vpStyles[0];
} }
} }
/* Extra stages need to only count as one stage in case a multistage song is chosen. */ /* Extra stages need to only count as one stage in case a multi-stage
* song is chosen. */
if( IsAnExtraStage() ) if( IsAnExtraStage() )
iNumStagesOfThisSong = 1; iNumStagesOfThisSong = 1;
else else
@@ -668,13 +667,13 @@ int GameState::GetNumStagesForCurrentSongAndStepsOrCourse() const
return iNumStagesOfThisSong; return iNumStagesOfThisSong;
} }
/* Called by ScreenGameplay. Set the length of the current song. */ // Called by ScreenGameplay. Set the length of the current song.
void GameState::BeginStage() void GameState::BeginStage()
{ {
if( m_bDemonstrationOrJukebox ) if( m_bDemonstrationOrJukebox )
return; return;
/* This should only be called once per stage. */ // This should only be called once per stage.
if( m_iNumStagesOfThisSong != 0 ) if( m_iNumStagesOfThisSong != 0 )
LOG->Warn( "XXX: m_iNumStagesOfThisSong == %i?", m_iNumStagesOfThisSong ); LOG->Warn( "XXX: m_iNumStagesOfThisSong == %i?", m_iNumStagesOfThisSong );
@@ -746,8 +745,8 @@ void GameState::CommitStageStats()
} }
} }
/* Called by ScreenSelectMusic (etc). Increment the stage counter if we just played a /* Called by ScreenSelectMusic (etc). Increment the stage counter if we just
* song. Might be called more than once. */ * played a song. Might be called more than once. */
void GameState::FinishStage() void GameState::FinishStage()
{ {
// Increment the stage counter. // Increment the stage counter.
@@ -966,7 +965,7 @@ void GameState::UpdateSongPosition( float fPositionSeconds, const TimingData &ti
{ {
// we got a warp in this section. // we got a warp in this section.
LOG->Trace("warp at %i jumps to %i",m_iWarpBeginRow,m_iWarpEndRow); LOG->Trace("warp at %i jumps to %i",m_iWarpBeginRow,m_iWarpEndRow);
// i hate this part because how the shit do i convert rows to seconds? // i hate this part because how the hell do i convert rows to seconds?
} }
/* /*
// xxx testing: only do this on monotune survivor // xxx testing: only do this on monotune survivor
@@ -1083,7 +1082,6 @@ Stage GameState::GetCurrentStage() const
// above function behaves weirdly, it will always return final stage if any player is // above function behaves weirdly, it will always return final stage if any player is
// on final stage, rather than the last remaining player. The below method seems to make a bit more sense. // on final stage, rather than the last remaining player. The below method seems to make a bit more sense.
else if(m_iPlayerStageTokens[PLAYER_1] == 0 && m_iPlayerStageTokens[PLAYER_2] == 0) return Stage_Final; else if(m_iPlayerStageTokens[PLAYER_1] == 0 && m_iPlayerStageTokens[PLAYER_2] == 0) return Stage_Final;
// who gives a shit about stages -aj
else else
{ {
switch( this->m_iCurrentStageIndex ) switch( this->m_iCurrentStageIndex )
@@ -1101,7 +1099,7 @@ Stage GameState::GetCurrentStage() const
int GameState::GetCourseSongIndex() const int GameState::GetCourseSongIndex() const
{ {
/* iSongsPlayed includes the current song, so it's 1-based; subtract one. */ // iSongsPlayed includes the current song, so it's 1-based; subtract one.
if( GAMESTATE->m_bMultiplayer ) if( GAMESTATE->m_bMultiplayer )
{ {
FOREACH_EnabledMultiPlayer(mp) FOREACH_EnabledMultiPlayer(mp)
+3 -13
View File
@@ -136,16 +136,14 @@ float LightsManager::GetActorLightLatencySeconds() const
void LightsManager::Update( float fDeltaTime ) void LightsManager::Update( float fDeltaTime )
{ {
//
// Update actor effect lights. // Update actor effect lights.
//
FOREACH_CabinetLight( cl ) FOREACH_CabinetLight( cl )
{ {
float fTime = fDeltaTime; float fTime = fDeltaTime;
float &fDuration = m_fSecsLeftInActorLightBlink[cl]; float &fDuration = m_fSecsLeftInActorLightBlink[cl];
if( fDuration > 0 ) if( fDuration > 0 )
{ {
/* The light has power left. Brighten it. */ // The light has power left. Brighten it.
float fSeconds = min( fDuration, fTime ); float fSeconds = min( fDuration, fTime );
fDuration -= fSeconds; fDuration -= fSeconds;
fTime -= fSeconds; fTime -= fSeconds;
@@ -154,7 +152,7 @@ void LightsManager::Update( float fDeltaTime )
if( fTime > 0 ) if( fTime > 0 )
{ {
/* The light is out of power. Dim it. */ // The light is out of power. Dim it.
fapproach( m_fActorLights[cl], 0, fTime / g_fLightEffectFalloffSeconds ); fapproach( m_fActorLights[cl], 0, fTime / g_fLightEffectFalloffSeconds );
} }
@@ -173,9 +171,7 @@ void LightsManager::Update( float fDeltaTime )
fapproach( m_fSecsLeftInGameButtonBlink[gc][gb], 0, fDeltaTime ); fapproach( m_fSecsLeftInGameButtonBlink[gc][gb], 0, fDeltaTime );
} }
//
// Set new lights state cabinet lights // Set new lights state cabinet lights
//
{ {
ZERO( m_LightsState.m_bCabinetLights ); ZERO( m_LightsState.m_bCabinetLights );
ZERO( m_LightsState.m_bGameButtonLights ); ZERO( m_LightsState.m_bGameButtonLights );
@@ -249,7 +245,7 @@ void LightsManager::Update( float fDeltaTime )
default: ASSERT(0); default: ASSERT(0);
} }
/* Light the menu buttons. */ // Light the menu buttons.
switch( m_LightsMode ) switch( m_LightsMode )
{ {
DEFAULT_FAIL(m_LightsMode); DEFAULT_FAIL(m_LightsMode);
@@ -324,9 +320,7 @@ void LightsManager::Update( float fDeltaTime )
} }
//
// Update game controller lights // Update game controller lights
//
switch( m_LightsMode ) switch( m_LightsMode )
{ {
case LIGHTSMODE_ATTRACT: case LIGHTSMODE_ATTRACT:
@@ -351,9 +345,7 @@ void LightsManager::Update( float fDeltaTime )
{ {
if( m_LightsMode == LIGHTSMODE_GAMEPLAY && g_bBlinkGameplayButtonLightsOnNote ) if( m_LightsMode == LIGHTSMODE_GAMEPLAY && g_bBlinkGameplayButtonLightsOnNote )
{ {
//
// Blink on notes. // Blink on notes.
//
FOREACH_ENUM( GameController, gc ) FOREACH_ENUM( GameController, gc )
{ {
FOREACH_ENUM( GameButton, gb ) FOREACH_ENUM( GameButton, gb )
@@ -364,9 +356,7 @@ void LightsManager::Update( float fDeltaTime )
} }
else else
{ {
//
// Blink on button presses. // Blink on button presses.
//
FOREACH_ENUM( GameController, gc ) FOREACH_ENUM( GameController, gc )
{ {
FOREACH_GameButton_Custom( gb ) FOREACH_GameButton_Custom( gb )