Simplify.

This commit is contained in:
Steve Checkoway
2006-10-11 11:12:09 +00:00
parent 35a20193ef
commit 6fd4694b79
5 changed files with 6 additions and 27 deletions
+1 -5
View File
@@ -426,11 +426,7 @@ void LightsManager::ChangeTestCabinetLight( int iDir )
m_iControllerTestManualCycleCurrent = -1; m_iControllerTestManualCycleCurrent = -1;
m_clTestManualCycleCurrent = (CabinetLight)(m_clTestManualCycleCurrent+iDir); m_clTestManualCycleCurrent = (CabinetLight)(m_clTestManualCycleCurrent+iDir);
{ wrap( UnionCast(m_clTestManualCycleCurrent), NUM_CabinetLight );
int temp = m_clTestManualCycleCurrent;
wrap( temp, NUM_CabinetLight );
m_clTestManualCycleCurrent = CabinetLight( temp );
}
} }
void LightsManager::ChangeTestGameButtonLight( int iDir ) void LightsManager::ChangeTestGameButtonLight( int iDir )
+1 -5
View File
@@ -1161,11 +1161,7 @@ void Profile::LoadGeneralDataFromNode( const XNode* pNode )
pNode->GetChildValue( "TotalGameplaySeconds", m_iTotalGameplaySeconds ); pNode->GetChildValue( "TotalGameplaySeconds", m_iTotalGameplaySeconds );
pNode->GetChildValue( "CurrentCombo", m_iCurrentCombo ); pNode->GetChildValue( "CurrentCombo", m_iCurrentCombo );
pNode->GetChildValue( "TotalCaloriesBurned", m_fTotalCaloriesBurned ); pNode->GetChildValue( "TotalCaloriesBurned", m_fTotalCaloriesBurned );
{ pNode->GetChildValue( "GoalType", UnionCast(m_GoalType) );
int temp;
pNode->GetChildValue( "GoalType", temp );
m_GoalType = GoalType( temp );
}
pNode->GetChildValue( "GoalCalories", m_iGoalCalories ); pNode->GetChildValue( "GoalCalories", m_iGoalCalories );
pNode->GetChildValue( "GoalSeconds", m_iGoalSeconds ); pNode->GetChildValue( "GoalSeconds", m_iGoalSeconds );
pNode->GetChildValue( "LastPlayedMachineGuid", m_sLastPlayedMachineGuid ); pNode->GetChildValue( "LastPlayedMachineGuid", m_sLastPlayedMachineGuid );
+1 -5
View File
@@ -406,11 +406,7 @@ void ScreenTextEntryVisual::MoveY( int iDir )
do do
{ {
m_iFocusY = enum_add2( m_iFocusY, +iDir ); m_iFocusY = enum_add2( m_iFocusY, +iDir );
{ wrap( UnionCast(m_iFocusY), NUM_KeyboardRow );
int temp = m_iFocusY;
wrap( temp, NUM_KeyboardRow );
m_iFocusY = KeyboardRow( temp );
}
// HACK: Round to nearest option so that we always stop // HACK: Round to nearest option so that we always stop
// on KEYBOARD_ROW_SPECIAL. // on KEYBOARD_ROW_SPECIAL.
@@ -589,10 +589,7 @@ void MovieDecoder_FFMpeg::Close()
RageSurface *MovieDecoder_FFMpeg::CreateCompatibleSurface( int iTextureWidth, int iTextureHeight, bool bPreferHighColor ) RageSurface *MovieDecoder_FFMpeg::CreateCompatibleSurface( int iTextureWidth, int iTextureHeight, bool bPreferHighColor )
{ {
int temp = m_AVTexfmt; return MovieTexture_FFMpeg::AVCodecCreateCompatibleSurface( iTextureWidth, iTextureHeight, bPreferHighColor, UnionCast(m_AVTexfmt) );
RageSurface *surface = MovieTexture_FFMpeg::AVCodecCreateCompatibleSurface( iTextureWidth, iTextureHeight, bPreferHighColor, temp );
m_AVTexfmt = avcodec::PixelFormat( temp );
return surface;
} }
MovieTexture_FFMpeg::MovieTexture_FFMpeg( RageTextureID ID ): MovieTexture_FFMpeg::MovieTexture_FFMpeg( RageTextureID ID ):
@@ -267,10 +267,7 @@ int MovieDecoder_Theora::GetFrame( RageSurface *pOut, float fTargetTime )
RageSurface *MovieDecoder_Theora::CreateCompatibleSurface( int iTextureWidth, int iTextureHeight, bool bPreferHighColor ) RageSurface *MovieDecoder_Theora::CreateCompatibleSurface( int iTextureWidth, int iTextureHeight, bool bPreferHighColor )
{ {
int temp = m_OutputPixFmt; return MovieTexture_FFMpeg::AVCodecCreateCompatibleSurface( iTextureWidth, iTextureHeight, bPreferHighColor, UnionCast(m_OutputPixFmt) );
RageSurface *surface = MovieTexture_FFMpeg::AVCodecCreateCompatibleSurface( iTextureWidth, iTextureHeight, bPreferHighColor, temp );
m_OutputPixFmt = avcodec::PixelFormat( temp );
return surface;
} }
void MovieDecoder_Theora::ConvertToSurface( RageSurface *pSurface ) const void MovieDecoder_Theora::ConvertToSurface( RageSurface *pSurface ) const
@@ -607,10 +604,7 @@ int MovieDecoder_Theora::GetFrame( RageSurface *pOut, float fTargetTime )
RageSurface *MovieDecoder_Theora::CreateCompatibleSurface( int iTextureWidth, int iTextureHeight, bool bPreferHighColor ) RageSurface *MovieDecoder_Theora::CreateCompatibleSurface( int iTextureWidth, int iTextureHeight, bool bPreferHighColor )
{ {
int temp = m_OutputPixFmt; return MovieTexture_FFMpeg::AVCodecCreateCompatibleSurface( iTextureWidth, iTextureHeight, bPreferHighColor, UnionCast(m_OutputPixFmt) );
RageSurface *surface = MovieTexture_FFMpeg::AVCodecCreateCompatibleSurface( iTextureWidth, iTextureHeight, bPreferHighColor, temp );
m_OutputPixFmt = avcodec::PixelFormat( temp );
return surface;
} }
void MovieDecoder_Theora::DecodeStripeStub( void *pCtx, theora_ycbcr_buffer yuv, int yfrag0, int yfrag_end ) void MovieDecoder_Theora::DecodeStripeStub( void *pCtx, theora_ycbcr_buffer yuv, int yfrag0, int yfrag_end )