Add scrolls: split and alternate
This commit is contained in:
@@ -182,8 +182,8 @@ float ArrowGetYPosWithoutReverse( PlayerNumber pn, int iCol, float fYOffset )
|
||||
float ArrowGetYPos( PlayerNumber pn, int iCol, float fYOffset, float fYReverseOffsetPixels )
|
||||
{
|
||||
float f = ArrowGetYPosWithoutReverse(pn,iCol,fYOffset);
|
||||
f *= SCALE( GAMESTATE->m_CurrentPlayerOptions[pn].m_fReverseScroll, 0.f, 1.f, 1.f, -1.f );
|
||||
f += SCALE( GAMESTATE->m_CurrentPlayerOptions[pn].m_fReverseScroll, 0.f, 1.f, 0.f, fYReverseOffsetPixels );
|
||||
f *= SCALE( GAMESTATE->m_CurrentPlayerOptions[pn].GetReversePercentForColumn(iCol), 0.f, 1.f, 1.f, -1.f );
|
||||
f += SCALE( GAMESTATE->m_CurrentPlayerOptions[pn].GetReversePercentForColumn(iCol), 0.f, 1.f, 0.f, fYReverseOffsetPixels );
|
||||
|
||||
const float* fEffects = GAMESTATE->m_CurrentPlayerOptions[pn].m_fEffects;
|
||||
|
||||
@@ -197,9 +197,9 @@ const float fCenterLine = 160; // from fYPos == 0
|
||||
const float fFadeDist = 100;
|
||||
|
||||
// used by ArrowGetAlpha and ArrowGetGlow below
|
||||
float ArrowGetPercentVisible( PlayerNumber pn, float fYPos )
|
||||
float ArrowGetPercentVisible( PlayerNumber pn, int iCol, float fYPos )
|
||||
{
|
||||
if( GAMESTATE->m_CurrentPlayerOptions[pn].m_fReverseScroll > 0.5f )
|
||||
if( GAMESTATE->m_CurrentPlayerOptions[pn].GetReversePercentForColumn(iCol) > 0.5f )
|
||||
fYPos *= -1;
|
||||
|
||||
const float fDistFromCenterLine = fYPos - fCenterLine;
|
||||
@@ -252,10 +252,10 @@ float ArrowGetPercentVisible( PlayerNumber pn, float fYPos )
|
||||
return clamp( 1+fVisibleAdjust, 0, 1 );
|
||||
}
|
||||
|
||||
float ArrowGetAlpha( PlayerNumber pn, float fYPos, float fPercentFadeToFail )
|
||||
float ArrowGetAlpha( PlayerNumber pn, int iCol, float fYPos, float fPercentFadeToFail )
|
||||
{
|
||||
// fYPos /= GAMESTATE->m_CurrentPlayerOptions[pn].m_fScrollSpeed;
|
||||
float fPercentVisible = ArrowGetPercentVisible(pn,fYPos);
|
||||
float fPercentVisible = ArrowGetPercentVisible(pn,iCol,fYPos);
|
||||
|
||||
if( fPercentFadeToFail != -1 )
|
||||
fPercentVisible = 1 - fPercentFadeToFail;
|
||||
@@ -263,10 +263,10 @@ float ArrowGetAlpha( PlayerNumber pn, float fYPos, float fPercentFadeToFail )
|
||||
return (fPercentVisible>0.5f) ? 1.0f : 0.0f;
|
||||
}
|
||||
|
||||
float ArrowGetGlow( PlayerNumber pn, float fYPos, float fPercentFadeToFail )
|
||||
float ArrowGetGlow( PlayerNumber pn, int iCol, float fYPos, float fPercentFadeToFail )
|
||||
{
|
||||
// fYPos /= GAMESTATE->m_CurrentPlayerOptions[pn].m_fScrollSpeed;
|
||||
float fPercentVisible = ArrowGetPercentVisible(pn,fYPos);
|
||||
float fPercentVisible = ArrowGetPercentVisible(pn,iCol,fYPos);
|
||||
|
||||
if( fPercentFadeToFail != -1 )
|
||||
fPercentVisible = 1 - fPercentFadeToFail;
|
||||
|
||||
@@ -52,12 +52,12 @@ bool ArrowsNeedZBuffer( PlayerNumber pn );
|
||||
|
||||
// fAlpha is the transparency of the arrow. It depends on fYPos and the
|
||||
// AppearanceType.
|
||||
float ArrowGetAlpha( PlayerNumber pn, float fYPos, float fPercentFadeToFail );
|
||||
float ArrowGetAlpha( PlayerNumber pn, int iCol, float fYPos, float fPercentFadeToFail );
|
||||
|
||||
|
||||
// fAlpha is the transparency of the arrow. It depends on fYPos and the
|
||||
// AppearanceType.
|
||||
float ArrowGetGlow( PlayerNumber pn, float fYPos, float fPercentFadeToFail );
|
||||
float ArrowGetGlow( PlayerNumber pn, int iCol, float fYPos, float fPercentFadeToFail );
|
||||
|
||||
|
||||
// Depends on fYOffset.
|
||||
|
||||
@@ -168,7 +168,7 @@ bool CodeDetector::DetectAndAdjustMusicOptions( GameController controller )
|
||||
case CODE_NEXT_EFFECT: GAMESTATE->m_PlayerOptions[pn].NextEffect(); break;
|
||||
case CODE_NEXT_APPEARANCE: GAMESTATE->m_PlayerOptions[pn].NextAppearance(); break;
|
||||
case CODE_NEXT_TURN: GAMESTATE->m_PlayerOptions[pn].NextTurn(); break;
|
||||
case CODE_REVERSE: FLOAT_TOGGLE( GAMESTATE->m_PlayerOptions[pn].m_fReverseScroll ); break;
|
||||
case CODE_REVERSE: GAMESTATE->m_PlayerOptions[pn].NextScroll(); break;
|
||||
case CODE_HOLDS: TOGGLE( GAMESTATE->m_PlayerOptions[pn].m_bHoldNotes, true, false ); break;
|
||||
case CODE_DARK: FLOAT_TOGGLE( GAMESTATE->m_PlayerOptions[pn].m_fDark ); break;
|
||||
case CODE_CANCEL_ALL: GAMESTATE->m_PlayerOptions[pn].Init();
|
||||
|
||||
@@ -40,7 +40,7 @@ enum
|
||||
GOINGRIGHT
|
||||
};
|
||||
|
||||
#define DEFAULT_SCROLL_DIRECTION THEME->GetMetricI("Steps","DefaultScrollDirection")
|
||||
|
||||
#define PREVIEWMUSICMODE THEME->GetMetricI("ScreenEz2SelectMusic","PreviewMusicMode")
|
||||
|
||||
MusicBannerWheel::MusicBannerWheel()
|
||||
@@ -51,11 +51,12 @@ MusicBannerWheel::MusicBannerWheel()
|
||||
SingleLoad=0;
|
||||
bScanning = false;
|
||||
|
||||
if(DEFAULT_SCROLL_DIRECTION && GAMESTATE->m_pCurSong == NULL) /* check the song is null... incase they have just come back from a song and changed their PlayerOptions */
|
||||
{
|
||||
for(int i=0; i<NUM_PLAYERS; i++)
|
||||
GAMESTATE->m_PlayerOptions[i].m_fReverseScroll = 1;
|
||||
}
|
||||
// Use pref DefaultModifiers to acomplish this
|
||||
// if(DEFAULT_SCROLL_DIRECTION && GAMESTATE->m_pCurSong == NULL) /* check the song is null... incase they have just come back from a song and changed their PlayerOptions */
|
||||
// {
|
||||
// for(int i=0; i<NUM_PLAYERS; i++)
|
||||
// GAMESTATE->m_PlayerOptions[i].m_fReverseScroll = 1;
|
||||
// }
|
||||
|
||||
m_ScrollingList.UseSpriteType(BANNERTYPE);
|
||||
m_ScrollingList.SetXY( 0, 0 );
|
||||
|
||||
@@ -479,10 +479,10 @@ void NoteDisplay::DrawHoldTopCap( const HoldNote& hn, const bool bActive, float
|
||||
ASSERT( fTexCoordTop>=-0.0001 && fTexCoordBottom<=1.0001 ); /* allow for rounding error */
|
||||
const float fTexCoordLeft = pRect->left;
|
||||
const float fTexCoordRight = pRect->right;
|
||||
const float fAlphaTop = ArrowGetAlpha( m_PlayerNumber, fYTop, fPercentFadeToFail );
|
||||
const float fAlphaBottom = ArrowGetAlpha( m_PlayerNumber, fYBottom, fPercentFadeToFail );
|
||||
const float fGlowTop = ArrowGetGlow( m_PlayerNumber, fYTop, fPercentFadeToFail );
|
||||
const float fGlowBottom = ArrowGetGlow( m_PlayerNumber, fYBottom, fPercentFadeToFail );
|
||||
const float fAlphaTop = ArrowGetAlpha( m_PlayerNumber, iCol, fYTop, fPercentFadeToFail );
|
||||
const float fAlphaBottom = ArrowGetAlpha( m_PlayerNumber, iCol, fYBottom, fPercentFadeToFail );
|
||||
const float fGlowTop = ArrowGetGlow( m_PlayerNumber, iCol, fYTop, fPercentFadeToFail );
|
||||
const float fGlowBottom = ArrowGetGlow( m_PlayerNumber, iCol, fYBottom, fPercentFadeToFail );
|
||||
const RageColor colorDiffuseTop = RageColor(fColorScale,fColorScale,fColorScale,fAlphaTop);
|
||||
const RageColor colorDiffuseBottom = RageColor(fColorScale,fColorScale,fColorScale,fAlphaBottom);
|
||||
const RageColor colorGlowTop = RageColor(1,1,1,fGlowTop);
|
||||
@@ -562,10 +562,10 @@ void NoteDisplay::DrawHoldBody( const HoldNote& hn, const bool bActive, float fY
|
||||
ASSERT( fTexCoordTop<=2 && fTexCoordBottom<=2 );
|
||||
const float fTexCoordLeft = pRect->left;
|
||||
const float fTexCoordRight = pRect->right;
|
||||
const float fAlphaTop = ArrowGetAlpha( m_PlayerNumber, fYTop, fPercentFadeToFail );
|
||||
const float fAlphaBottom = ArrowGetAlpha( m_PlayerNumber, fYBottom, fPercentFadeToFail );
|
||||
const float fGlowTop = ArrowGetGlow( m_PlayerNumber, fYTop, fPercentFadeToFail );
|
||||
const float fGlowBottom = ArrowGetGlow( m_PlayerNumber, fYBottom, fPercentFadeToFail );
|
||||
const float fAlphaTop = ArrowGetAlpha( m_PlayerNumber, iCol, fYTop, fPercentFadeToFail );
|
||||
const float fAlphaBottom = ArrowGetAlpha( m_PlayerNumber, iCol, fYBottom, fPercentFadeToFail );
|
||||
const float fGlowTop = ArrowGetGlow( m_PlayerNumber, iCol, fYTop, fPercentFadeToFail );
|
||||
const float fGlowBottom = ArrowGetGlow( m_PlayerNumber, iCol, fYBottom, fPercentFadeToFail );
|
||||
const RageColor colorDiffuseTop = RageColor(fColorScale,fColorScale,fColorScale,fAlphaTop);
|
||||
const RageColor colorDiffuseBottom = RageColor(fColorScale,fColorScale,fColorScale,fAlphaBottom);
|
||||
const RageColor colorGlowTop = RageColor(1,1,1,fGlowTop);
|
||||
@@ -632,10 +632,10 @@ void NoteDisplay::DrawHoldBottomCap( const HoldNote& hn, const bool bActive, flo
|
||||
const float fTexCoordBottom = SCALE( fBottomDistFromTailTop, 0, fFrameHeight, pRect->top, pRect->bottom );
|
||||
const float fTexCoordLeft = pRect->left;
|
||||
const float fTexCoordRight = pRect->right;
|
||||
const float fAlphaTop = ArrowGetAlpha( m_PlayerNumber, fYTop, fPercentFadeToFail );
|
||||
const float fAlphaBottom = ArrowGetAlpha( m_PlayerNumber, fYBottom, fPercentFadeToFail );
|
||||
const float fGlowTop = ArrowGetGlow( m_PlayerNumber, fYTop, fPercentFadeToFail );
|
||||
const float fGlowBottom = ArrowGetGlow( m_PlayerNumber, fYBottom, fPercentFadeToFail );
|
||||
const float fAlphaTop = ArrowGetAlpha( m_PlayerNumber, iCol, fYTop, fPercentFadeToFail );
|
||||
const float fAlphaBottom = ArrowGetAlpha( m_PlayerNumber, iCol, fYBottom, fPercentFadeToFail );
|
||||
const float fGlowTop = ArrowGetGlow( m_PlayerNumber, iCol, fYTop, fPercentFadeToFail );
|
||||
const float fGlowBottom = ArrowGetGlow( m_PlayerNumber, iCol, fYBottom, fPercentFadeToFail );
|
||||
const RageColor colorDiffuseTop = RageColor(fColorScale,fColorScale,fColorScale,fAlphaTop);
|
||||
const RageColor colorDiffuseBottom = RageColor(fColorScale,fColorScale,fColorScale,fAlphaBottom);
|
||||
const RageColor colorGlowTop = RageColor(1,1,1,fGlowTop);
|
||||
@@ -667,8 +667,8 @@ void NoteDisplay::DrawHoldTail( const HoldNote& hn, bool bActive, float fYTail,
|
||||
const float fY = fYTail;
|
||||
const float fX = ArrowGetXPos( m_PlayerNumber, iCol, fY );
|
||||
const float fZ = ArrowGetZPos( m_PlayerNumber, iCol, fY );
|
||||
const float fAlpha = ArrowGetAlpha( m_PlayerNumber, fY, fPercentFadeToFail );
|
||||
const float fGlow = ArrowGetGlow( m_PlayerNumber, fY, fPercentFadeToFail );
|
||||
const float fAlpha = ArrowGetAlpha( m_PlayerNumber, iCol, fY, fPercentFadeToFail );
|
||||
const float fGlow = ArrowGetGlow( m_PlayerNumber, iCol, fY, fPercentFadeToFail );
|
||||
const RageColor colorDiffuse= RageColor(fColorScale,fColorScale,fColorScale,fAlpha);
|
||||
const RageColor colorGlow = RageColor(1,1,1,fGlow);
|
||||
|
||||
@@ -717,8 +717,8 @@ void NoteDisplay::DrawHoldHead( const HoldNote& hn, bool bActive, float fYHead,
|
||||
const float fY = fYHead;
|
||||
const float fX = ArrowGetXPos( m_PlayerNumber, iCol, fY );
|
||||
const float fZ = ArrowGetZPos( m_PlayerNumber, iCol, fY );
|
||||
const float fAlpha = ArrowGetAlpha( m_PlayerNumber, fY, fPercentFadeToFail );
|
||||
const float fGlow = ArrowGetGlow( m_PlayerNumber, fY, fPercentFadeToFail );
|
||||
const float fAlpha = ArrowGetAlpha( m_PlayerNumber, iCol, fY, fPercentFadeToFail );
|
||||
const float fGlow = ArrowGetGlow( m_PlayerNumber, iCol, fY, fPercentFadeToFail );
|
||||
const RageColor colorDiffuse= RageColor(fColorScale,fColorScale,fColorScale,fAlpha);
|
||||
const RageColor colorGlow = RageColor(1,1,1,fGlow);
|
||||
|
||||
@@ -760,9 +760,8 @@ void NoteDisplay::DrawHold( const HoldNote& hn, const bool bActive, const float
|
||||
{
|
||||
// bDrawGlowOnly is a little hacky. We need to draw the diffuse part and the glow part one pass at a time to minimize state changes
|
||||
|
||||
const bool bReverse = GAMESTATE->m_CurrentPlayerOptions[m_PlayerNumber].m_fReverseScroll > 0.5;
|
||||
|
||||
const int iCol = hn.iTrack;
|
||||
const bool bReverse = GAMESTATE->m_CurrentPlayerOptions[m_PlayerNumber].GetReversePercentForColumn(iCol) > 0.5;
|
||||
const float fStartYOffset = ArrowGetYOffset( m_PlayerNumber, iCol, hn.fStartBeat );
|
||||
const float fStartYPos = ArrowGetYPos( m_PlayerNumber, iCol, fStartYOffset, fReverseOffsetPixels );
|
||||
const float fEndYOffset = ArrowGetYOffset( m_PlayerNumber, iCol, hn.fEndBeat );
|
||||
@@ -812,8 +811,8 @@ void NoteDisplay::DrawTap( int iCol, float fBeat, bool bOnSameRowAsHoldStart, bo
|
||||
const float fRotation = ArrowGetRotation( m_PlayerNumber, fBeat );
|
||||
const float fXPos = ArrowGetXPos( m_PlayerNumber, iCol, fYPos );
|
||||
const float fZPos = ArrowGetZPos( m_PlayerNumber, iCol, fYPos );
|
||||
const float fAlpha = ArrowGetAlpha( m_PlayerNumber, fYPos, fPercentFadeToFail );
|
||||
const float fGlow = ArrowGetGlow( m_PlayerNumber, fYPos, fPercentFadeToFail );
|
||||
const float fAlpha = ArrowGetAlpha( m_PlayerNumber, iCol, fYPos, fPercentFadeToFail );
|
||||
const float fGlow = ArrowGetGlow( m_PlayerNumber, iCol, fYPos, fPercentFadeToFail );
|
||||
const float fColorScale = ArrowGetBrightness( m_PlayerNumber, fBeat ) * SCALE(fLife,0,1,0.2f,1);
|
||||
RageColor diffuse = RageColor(fColorScale,fColorScale,fColorScale,fAlpha);
|
||||
RageColor glow = RageColor(1,1,1,fGlow);
|
||||
|
||||
@@ -141,7 +141,7 @@ void Player::Load( PlayerNumber pn, NoteData* pNoteData, LifeMeter* pLM, Combine
|
||||
m_NoteField.Load( (NoteData*)this, pn, iStartDrawingAtPixels, iStopDrawingAtPixels, GRAY_ARROWS_Y_REVERSE-GRAY_ARROWS_Y_STANDARD );
|
||||
m_ArrowBackdrop.SetPlayer( pn );
|
||||
|
||||
const bool bReverse = GAMESTATE->m_PlayerOptions[pn].m_fReverseScroll == 1;
|
||||
const bool bReverse = GAMESTATE->m_PlayerOptions[pn].GetReversePercentForColumn(0) == 1;
|
||||
bool bPlayerUsingBothSides = GAMESTATE->GetCurrentStyleDef()->m_StyleType==StyleDef::ONE_PLAYER_TWO_CREDITS;
|
||||
m_Combo.SetX( COMBO_X(m_PlayerNumber,bPlayerUsingBothSides) );
|
||||
m_Combo.SetY( bReverse ? SCREEN_BOTTOM-COMBO_Y : SCREEN_TOP+COMBO_Y );
|
||||
@@ -183,7 +183,7 @@ void Player::Update( float fDeltaTime )
|
||||
//
|
||||
// Update Y positions
|
||||
//
|
||||
float fPercentReverse = GAMESTATE->m_CurrentPlayerOptions[m_PlayerNumber].m_fReverseScroll;
|
||||
float fPercentReverse = GAMESTATE->m_CurrentPlayerOptions[m_PlayerNumber].GetReversePercentForColumn(0);
|
||||
float fHoldJudgeYPos = SCALE( fPercentReverse, 0.f, 1.f, HOLD_JUDGMENT_Y_STANDARD, HOLD_JUDGMENT_Y_REVERSE );
|
||||
float fGrayYPos = SCALE( fPercentReverse, 0.f, 1.f, GRAY_ARROWS_Y_STANDARD, GRAY_ARROWS_Y_REVERSE );
|
||||
int c;
|
||||
@@ -332,7 +332,7 @@ void Player::DrawPrimitives()
|
||||
m_Combo.Draw();
|
||||
|
||||
float fTilt = GAMESTATE->m_CurrentPlayerOptions[m_PlayerNumber].m_fPerspectiveTilt;
|
||||
bool bReverse = GAMESTATE->m_CurrentPlayerOptions[m_PlayerNumber].m_fReverseScroll==1;
|
||||
bool bReverse = GAMESTATE->m_CurrentPlayerOptions[m_PlayerNumber].GetReversePercentForColumn(0)>0.5;
|
||||
float fReverseScale = bReverse ? -1.0f : 1.0f;
|
||||
|
||||
if( fTilt != 0 )
|
||||
|
||||
@@ -27,7 +27,7 @@ void PlayerOptions::Init()
|
||||
ZERO( m_fAccels );
|
||||
ZERO( m_fEffects );
|
||||
ZERO( m_fAppearances );
|
||||
m_fReverseScroll = 0;
|
||||
ZERO( m_fScrolls );
|
||||
m_fDark = 0;
|
||||
m_Turn = TURN_NONE;
|
||||
m_Transform = TRANSFORM_NONE;
|
||||
@@ -50,7 +50,8 @@ void PlayerOptions::Approach( const PlayerOptions& other, float fDeltaSeconds )
|
||||
fapproach( m_fEffects[i], other.m_fEffects[i], fDeltaSeconds );
|
||||
for( i=0; i<NUM_APPEARANCES; i++ )
|
||||
fapproach( m_fAppearances[i], other.m_fAppearances[i], fDeltaSeconds );
|
||||
fapproach( m_fReverseScroll, other.m_fReverseScroll, fDeltaSeconds );
|
||||
for( i=0; i<NUM_SCROLLS; i++ )
|
||||
fapproach( m_fScrolls[i], other.m_fScrolls[i], fDeltaSeconds );
|
||||
fapproach( m_fDark, other.m_fDark, fDeltaSeconds );
|
||||
fapproach( m_fPerspectiveTilt, other.m_fPerspectiveTilt, fDeltaSeconds );
|
||||
}
|
||||
@@ -103,7 +104,9 @@ CString PlayerOptions::GetString()
|
||||
if( m_fAppearances[APPEARANCE_BLINK]==1 ) sReturn += "Blink, ";
|
||||
if( m_fAppearances[APPEARANCE_RANDOMVANISH]==1) sReturn += "RandomVanish, ";
|
||||
|
||||
if( m_fReverseScroll == 1 ) sReturn += "Reverse, ";
|
||||
if( m_fScrolls[SCROLL_REVERSE]==1 ) sReturn += "Reverse, ";
|
||||
if( m_fScrolls[SCROLL_SPLIT]==1 ) sReturn += "Split, ";
|
||||
if( m_fScrolls[SCROLL_ALTERNATE]==1 ) sReturn += "Alternate, ";
|
||||
|
||||
if( m_fDark == 1) sReturn += "Dark, ";
|
||||
|
||||
@@ -212,7 +215,9 @@ void PlayerOptions::FromString( CString sOptions )
|
||||
else if( sBit == "quick" ) m_Transform = TRANSFORM_QUICK;
|
||||
else if( sBit == "skippy" ) m_Transform = TRANSFORM_SKIPPY;
|
||||
else if( sBit == "mines" ) m_Transform = TRANSFORM_MINES;
|
||||
else if( sBit == "reverse" ) m_fReverseScroll = 1;
|
||||
else if( sBit == "reverse" ) m_fScrolls[SCROLL_REVERSE] = 1;
|
||||
else if( sBit == "split" ) m_fScrolls[SCROLL_SPLIT] = 1;
|
||||
else if( sBit == "alternate" ) m_fScrolls[SCROLL_ALTERNATE] = 1;
|
||||
else if( sBit == "noholds" ) m_bHoldNotes = false;
|
||||
else if( sBit == "nofreeze" ) m_bHoldNotes = false;
|
||||
else if( sBit == "dark" ) m_fDark = 1;
|
||||
@@ -278,6 +283,11 @@ void PlayerOptions::NextTransform()
|
||||
m_Transform = (Transform) ((m_Transform+1)%NUM_TRANSFORMS);
|
||||
}
|
||||
|
||||
void PlayerOptions::NextScroll()
|
||||
{
|
||||
NextFloat( m_fScrolls, NUM_SCROLLS );
|
||||
}
|
||||
|
||||
void PlayerOptions::NextPerspective()
|
||||
{
|
||||
switch( (int)m_fPerspectiveTilt )
|
||||
@@ -293,7 +303,7 @@ void PlayerOptions::ChooseRandomMofifiers()
|
||||
if( RandomFloat(0,1)>0.8f )
|
||||
m_fScrollSpeed = 1.5f;
|
||||
if( RandomFloat(0,1)>0.8f )
|
||||
m_fReverseScroll = 1;
|
||||
m_fScrolls[SCROLL_REVERSE] = 1;
|
||||
if( RandomFloat(0,1)>0.9f )
|
||||
m_fDark = 1;
|
||||
float f;
|
||||
@@ -333,6 +343,14 @@ PlayerOptions::Appearance PlayerOptions::GetFirstAppearance()
|
||||
return (Appearance)-1;
|
||||
}
|
||||
|
||||
PlayerOptions::Scroll PlayerOptions::GetFirstScroll()
|
||||
{
|
||||
for( int i=0; i<NUM_SCROLLS; i++ )
|
||||
if( m_fScrolls[i] == 1.f )
|
||||
return (Scroll)i;
|
||||
return (Scroll)-1;
|
||||
}
|
||||
|
||||
void PlayerOptions::SetOneAccel( Accel a )
|
||||
{
|
||||
ZERO( m_fAccels );
|
||||
@@ -350,3 +368,24 @@ void PlayerOptions::SetOneAppearance( Appearance a )
|
||||
ZERO( m_fAppearances );
|
||||
m_fAppearances[a] = 1;
|
||||
}
|
||||
|
||||
void PlayerOptions::SetOneScroll( Scroll s )
|
||||
{
|
||||
ZERO( m_fScrolls );
|
||||
m_fScrolls[s] = 1;
|
||||
}
|
||||
|
||||
float PlayerOptions::GetReversePercentForColumn( int iCol )
|
||||
{
|
||||
float f = 0;
|
||||
f += m_fScrolls[SCROLL_REVERSE];
|
||||
if( iCol >= GAMESTATE->GetCurrentStyleDef()->m_iColsPerPlayer/2 )
|
||||
f += m_fScrolls[SCROLL_SPLIT];
|
||||
if( (iCol%2)==1 )
|
||||
f += m_fScrolls[SCROLL_ALTERNATE];
|
||||
if( f > 2 )
|
||||
f = fmodf( f, 2 );
|
||||
if( f > 1 )
|
||||
f -= 1;
|
||||
return f;
|
||||
}
|
||||
|
||||
@@ -67,6 +67,14 @@ struct PlayerOptions
|
||||
TRANSFORM_MINES,
|
||||
NUM_TRANSFORMS
|
||||
};
|
||||
enum Scroll {
|
||||
SCROLL_REVERSE=0,
|
||||
SCROLL_SPLIT,
|
||||
SCROLL_ALTERNATE,
|
||||
NUM_SCROLLS
|
||||
};
|
||||
float GetReversePercentForColumn( int iCol ); // accounts for all Directions
|
||||
|
||||
|
||||
bool m_bTimeSpacing; // instead of Beat spacing
|
||||
float m_fScrollSpeed; // used if !m_bTimeSpacing
|
||||
@@ -74,7 +82,7 @@ struct PlayerOptions
|
||||
float m_fAccels[NUM_ACCELS];
|
||||
float m_fEffects[NUM_EFFECTS];
|
||||
float m_fAppearances[NUM_APPEARANCES];
|
||||
float m_fReverseScroll;
|
||||
float m_fScrolls[NUM_SCROLLS];
|
||||
float m_fDark;
|
||||
Turn m_Turn;
|
||||
Transform m_Transform;
|
||||
@@ -91,14 +99,17 @@ struct PlayerOptions
|
||||
void NextTurn();
|
||||
void NextTransform();
|
||||
void NextPerspective();
|
||||
void NextScroll();
|
||||
|
||||
Accel GetFirstAccel();
|
||||
Effect GetFirstEffect();
|
||||
Appearance GetFirstAppearance();
|
||||
Scroll GetFirstScroll();
|
||||
|
||||
void SetOneAccel( Accel a );
|
||||
void SetOneEffect( Effect e );
|
||||
void SetOneAppearance( Appearance a );
|
||||
void SetOneScroll( Scroll s );
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -790,8 +790,8 @@ void ScreenGameplay::LoadNextSong()
|
||||
|
||||
const bool bExtra = GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2();
|
||||
const bool bReverse[NUM_PLAYERS] = {
|
||||
GAMESTATE->m_PlayerOptions[0].m_fReverseScroll == 1,
|
||||
GAMESTATE->m_PlayerOptions[1].m_fReverseScroll == 1
|
||||
GAMESTATE->m_PlayerOptions[0].m_fScrolls[PlayerOptions::SCROLL_REVERSE] == 1,
|
||||
GAMESTATE->m_PlayerOptions[1].m_fScrolls[PlayerOptions::SCROLL_REVERSE] == 1
|
||||
};
|
||||
|
||||
for( p=0; p<NUM_PLAYERS; p++ )
|
||||
|
||||
@@ -51,7 +51,7 @@ OptionRow g_PlayerOptionsLines[NUM_PLAYER_OPTIONS_LINES] = {
|
||||
OptionRow( "Appear\n-ance", "VISIBLE","HIDDEN","SUDDEN","STEALTH","BLINK", "R.VANISH" ),
|
||||
OptionRow( "Turn", "OFF","MIRROR","LEFT","RIGHT","SHUFFLE","S.SHUFFLE" ),
|
||||
OptionRow( "Trans\n-form", "OFF","LITTLE","WIDE","BIG","QUICK","SKIPPY","MINES" ),
|
||||
OptionRow( "Scroll", "STANDARD","REVERSE" ),
|
||||
OptionRow( "Scroll", "STANDARD","REVERSE","SPLIT","ALTERNATE" ),
|
||||
OptionRow( "Note\nSkin", "" ),
|
||||
OptionRow( "Holds", "OFF","ON" ),
|
||||
OptionRow( "Dark", "OFF","ON" ),
|
||||
@@ -204,7 +204,7 @@ void ScreenPlayerOptions::ImportOptions()
|
||||
m_iSelectedOption[p][PO_APPEAR] = po.GetFirstAppearance()+1;
|
||||
m_iSelectedOption[p][PO_TURN] = po.m_Turn;
|
||||
m_iSelectedOption[p][PO_TRANSFORM] = po.m_Transform;
|
||||
m_iSelectedOption[p][PO_SCROLL] = po.m_fReverseScroll==1 ? 1 : 0 ;
|
||||
m_iSelectedOption[p][PO_SCROLL] = po.GetFirstScroll()+1;
|
||||
|
||||
|
||||
// highlight currently selected skin
|
||||
@@ -321,7 +321,10 @@ void ScreenPlayerOptions::ExportOptions()
|
||||
|
||||
po.m_Turn = (PlayerOptions::Turn)m_iSelectedOption[p][PO_TURN];
|
||||
po.m_Transform = (PlayerOptions::Transform)m_iSelectedOption[p][PO_TRANSFORM];
|
||||
po.m_fReverseScroll = (m_iSelectedOption[p][PO_SCROLL] == 1) ? 1.f : 0.f;
|
||||
|
||||
ZERO( po.m_fScrolls );
|
||||
if( m_iSelectedOption[p][PO_SCROLL] != 0 )
|
||||
po.SetOneScroll( (PlayerOptions::Scroll)(m_iSelectedOption[p][PO_SCROLL]-1) );
|
||||
|
||||
|
||||
int iSelectedSkin = m_iSelectedOption[p][PO_NOTE_SKIN];
|
||||
|
||||
@@ -1029,7 +1029,7 @@ void SongManager::GetExtraStageInfo( bool bExtra2, const StyleDef *sd,
|
||||
|
||||
po_out.Init();
|
||||
so_out.Init();
|
||||
po_out.m_fReverseScroll = 1;
|
||||
po_out.m_fScrolls[PlayerOptions::SCROLL_REVERSE] = 1;
|
||||
po_out.m_fScrollSpeed = 1.5f;
|
||||
so_out.m_DrainType = (bExtra2 ? SongOptions::DRAIN_SUDDEN_DEATH : SongOptions::DRAIN_NO_RECOVER);
|
||||
po_out.m_fDark = 1;
|
||||
|
||||
Reference in New Issue
Block a user