m_EffectType is now a bitfield, so we can have multiple effects on

at once.

There's no interface to this, but it works with courses.

drunk, dizzy, dark is amusing. "That arrow goes WHERE?"
This commit is contained in:
Glenn Maynard
2002-08-31 03:04:38 +00:00
parent 7ffc481c63
commit ad5f294ae4
7 changed files with 85 additions and 45 deletions
+13 -6
View File
@@ -140,10 +140,17 @@ void Player::Load( PlayerNumber pn, NoteData* pNoteData, LifeMeter* pLM, ScoreDi
int iPixelsToDrawBefore = 96;
int iPixelsToDrawAfter = 384;
switch( GAMESTATE->m_PlayerOptions[pn].m_EffectType )
// If both options are on, we *do* need to multiply it twice.
if( GAMESTATE->m_PlayerOptions[pn].m_EffectType & PlayerOptions::EFFECT_MINI)
{
case PlayerOptions::EFFECT_MINI: iPixelsToDrawBefore *= 2; iPixelsToDrawAfter *= 2; break;
case PlayerOptions::EFFECT_SPACE: iPixelsToDrawBefore *= 2; iPixelsToDrawAfter *= 2; break;
iPixelsToDrawBefore *= 2;
iPixelsToDrawAfter *= 2;
}
if( GAMESTATE->m_PlayerOptions[pn].m_EffectType & PlayerOptions::EFFECT_SPACE)
{
iPixelsToDrawBefore *= 2;
iPixelsToDrawAfter *= 2;
}
m_NoteField.Load( (NoteData*)this, pn, iPixelsToDrawBefore, iPixelsToDrawAfter );
@@ -165,7 +172,7 @@ void Player::Load( PlayerNumber pn, NoteData* pNoteData, LifeMeter* pLM, ScoreDi
m_GrayArrowRow.SetY( GAMESTATE->m_PlayerOptions[pn].m_bReverseScroll ? SCREEN_HEIGHT - ARROWS_Y : ARROWS_Y );
m_GhostArrowRow.SetY( GAMESTATE->m_PlayerOptions[pn].m_bReverseScroll ? SCREEN_HEIGHT - ARROWS_Y : ARROWS_Y );
if( GAMESTATE->m_PlayerOptions[pn].m_EffectType == PlayerOptions::EFFECT_MINI )
if( GAMESTATE->m_PlayerOptions[pn].m_EffectType & PlayerOptions::EFFECT_MINI )
{
m_NoteField.SetZoom( 0.5f );
m_GrayArrowRow.SetZoom( 0.5f );
@@ -271,7 +278,7 @@ void Player::DrawPrimitives()
D3DXMATRIX matOldView, matOldProj;
if( GAMESTATE->m_PlayerOptions[m_PlayerNumber].m_EffectType == PlayerOptions::EFFECT_SPACE )
if( GAMESTATE->m_PlayerOptions[m_PlayerNumber].m_EffectType & PlayerOptions::EFFECT_SPACE )
{
// save old view and projection
DISPLAY->GetViewTransform( &matOldView );
@@ -305,7 +312,7 @@ void Player::DrawPrimitives()
m_NoteField.Draw();
m_GhostArrowRow.Draw();
if( GAMESTATE->m_PlayerOptions[m_PlayerNumber].m_EffectType == PlayerOptions::EFFECT_SPACE )
if( GAMESTATE->m_PlayerOptions[m_PlayerNumber].m_EffectType & PlayerOptions::EFFECT_SPACE )
{
// restire old view and projection
DISPLAY->SetViewTransform( &matOldView );