diff --git a/stepmania/Themes/default/Graphics/ScreenEz2SelectMusic hiddenicon.redir b/stepmania/Themes/default/Graphics/ScreenEz2SelectMusic hiddenicon.redir new file mode 100644 index 0000000000..c17b8342d2 --- /dev/null +++ b/stepmania/Themes/default/Graphics/ScreenEz2SelectMusic hiddenicon.redir @@ -0,0 +1 @@ +ScreenSelectMusicEz2 hiddenicon.png \ No newline at end of file diff --git a/stepmania/Themes/default/Graphics/ScreenEz2SelectMusic vanishicon.redir b/stepmania/Themes/default/Graphics/ScreenEz2SelectMusic vanishicon.redir new file mode 100644 index 0000000000..91d625d37a --- /dev/null +++ b/stepmania/Themes/default/Graphics/ScreenEz2SelectMusic vanishicon.redir @@ -0,0 +1 @@ +ScreenSelectMusicEz2 vanishicon.png \ No newline at end of file diff --git a/stepmania/Themes/default/Graphics/ScreenSelectMusicEz2 hiddenicon.png b/stepmania/Themes/default/Graphics/ScreenSelectMusicEz2 hiddenicon.png new file mode 100644 index 0000000000..1822d7c837 Binary files /dev/null and b/stepmania/Themes/default/Graphics/ScreenSelectMusicEz2 hiddenicon.png differ diff --git a/stepmania/Themes/default/Graphics/ScreenSelectMusicEz2 vanishicon.png b/stepmania/Themes/default/Graphics/ScreenSelectMusicEz2 vanishicon.png new file mode 100644 index 0000000000..40f95a4a93 Binary files /dev/null and b/stepmania/Themes/default/Graphics/ScreenSelectMusicEz2 vanishicon.png differ diff --git a/stepmania/Themes/default/metrics.ini b/stepmania/Themes/default/metrics.ini index 6d15cf2851..7c09a8cd2a 100644 --- a/stepmania/Themes/default/metrics.ini +++ b/stepmania/Themes/default/metrics.ini @@ -592,6 +592,14 @@ ShuffleIconP1X=40 ShuffleIconP2X=600 ShuffleIconP1Y=320 ShuffleIconP2Y=320 +VanishIconP1X=40 +VanishIconP2X=600 +VanishIconP1Y=240 +VanishIconP2Y=240 +HiddenIconP1X=40 +HiddenIconP2X=600 +HiddenIconP1Y=240 +HiddenIconP2Y=240 InfoFrameX=999 InfoFrameY=999 DifficultyRatingX=999 @@ -1586,6 +1594,7 @@ Dark= CancelAll=Left,Right,Left,Right,Left,Right,Left,Right NextTheme=Left,Left,Left,Right,Right,Right,Left,Right NextAnnouncer=Left,Left,Right,Right,Left,Left,Right,Right +Hidden= [GrooveRadar] Label1OffsetX=0 // stream diff --git a/stepmania/src/ArrowEffects.cpp b/stepmania/src/ArrowEffects.cpp index 54db5136f8..f3a4900890 100644 --- a/stepmania/src/ArrowEffects.cpp +++ b/stepmania/src/ArrowEffects.cpp @@ -165,6 +165,30 @@ float ArrowGetPercentVisible( PlayerNumber pn, float fYPos ) f = froundf( f, 0.3333f ); fVisibleAdjust += SCALE( f, 0, 1, -1, 0 ); } + if( fAppearances[PlayerOptions::APPEARANCE_RANDOMVANISH] > 0) + { + + float adjustment = GAMESTATE->m_CurrentPlayerOptions[pn].m_fScrollSpeed; + if(adjustment == 0) + adjustment = 1; + + float fRealCenterLine = fCenterLine / adjustment; + const float fDistFromRealCenterLine = fYPos - fRealCenterLine; + float fRealFadeDist = (fFadeDist - 20) / adjustment; + + if(fYPos >= fRealCenterLine + (fRealFadeDist)) + { + fVisibleAdjust += fAppearances[PlayerOptions::APPEARANCE_RANDOMVANISH] * (SCALE( fDistFromRealCenterLine-fRealFadeDist, 0, (fRealFadeDist), -1, 0 )); // go hidden + } + else if(fYPos <= fRealCenterLine - (fRealFadeDist)) + { + fVisibleAdjust += fAppearances[PlayerOptions::APPEARANCE_RANDOMVANISH] * (SCALE( fDistFromRealCenterLine+fRealFadeDist, 0, -((fRealFadeDist)), -1, 0 )); // suddenly appear + } + else + { + fVisibleAdjust += fAppearances[PlayerOptions::APPEARANCE_RANDOMVANISH] * -1; // be invisible + } + } return clamp( 1+fVisibleAdjust, 0, 1 ); } diff --git a/stepmania/src/CodeDetector.cpp b/stepmania/src/CodeDetector.cpp index 3193f4e543..cd983285d8 100644 --- a/stepmania/src/CodeDetector.cpp +++ b/stepmania/src/CodeDetector.cpp @@ -11,6 +11,7 @@ */ #include "CodeDetector.h" +#include "PlayerOptions.h" #include "GameState.h" #include "InputQueue.h" #include "ThemeManager.h" @@ -41,6 +42,8 @@ const CString g_sCodeNames[CodeDetector::NUM_CODES] = { "Reverse", "HoldNotes", "Dark", + "Hidden", + "RandomVanish", "CancelAll", "NextTheme", "NextAnnouncer" @@ -136,6 +139,9 @@ bool CodeDetector::EnteredNextSort( GameController controller ) #define INCREMENT_SCROLL_SPEED(s) (s==0.5f) ? s=0.75f : (s==0.75f) ? s=1.0f : (s==1.0f) ? s=1.5f : (s==1.5f) ? s=2.0f : (s==2.0f) ? s=3.0f : (s==3.0f) ? s=4.0f : (s==4.0f) ? s=5.0f : (s==5.0f) ? s=8.0f : s=0.5f; #define DECREMENT_SCROLL_SPEED(s) (s==0.75f) ? s=0.5f : (s==1.0f) ? s=0.75f : (s==1.5f) ? s=1.0f : (s==2.0f) ? s=1.5f : (s==3.0f) ? s=2.0f : (s==4.0f) ? s=3.0f : (s==5.0f) ? s=4.0f : (s==8.0f) ? s=4.0f : s=8.0f; +#define TOGGLE_HIDDEN ZERO(GAMESTATE->m_PlayerOptions[pn].m_fAppearances); GAMESTATE->m_PlayerOptions[pn].m_fAppearances[PlayerOptions::APPEARANCE_HIDDEN] = 1; +#define TOGGLE_RANDOMVANISH ZERO(GAMESTATE->m_PlayerOptions[pn].m_fAppearances); GAMESTATE->m_PlayerOptions[pn].m_fAppearances[PlayerOptions::APPEARANCE_RANDOMVANISH] = 1; + bool CodeDetector::DetectAndAdjustMusicOptions( GameController controller ) { const StyleDef* pStyleDef = GAMESTATE->GetCurrentStyleDef(); @@ -159,12 +165,16 @@ bool CodeDetector::DetectAndAdjustMusicOptions( GameController controller ) case CODE_PREVIOUS_SCROLL_SPEED:DECREMENT_SCROLL_SPEED( GAMESTATE->m_PlayerOptions[pn].m_fScrollSpeed ); break; case CODE_NEXT_ACCEL: GAMESTATE->m_PlayerOptions[pn].NextAccel(); break; case CODE_NEXT_EFFECT: GAMESTATE->m_PlayerOptions[pn].NextEffect(); break; - case CODE_NEXT_APPEARANCE: GAMESTATE->m_PlayerOptions[pn].NextAppearance();; 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_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(); break; + case CODE_HIDDEN: TOGGLE_HIDDEN break; + case CODE_RANDOMVANISH: TOGGLE_RANDOMVANISH break; + + // GAMESTATE->m_PlayerOptions[pn].SetOneAppearance(GAMESTATE->m_PlayerOptions[pn].GetFirstAppearance()); break; } return true; // don't check any more } diff --git a/stepmania/src/CodeDetector.h b/stepmania/src/CodeDetector.h index c2fb52c838..9a44edc8db 100644 --- a/stepmania/src/CodeDetector.h +++ b/stepmania/src/CodeDetector.h @@ -38,6 +38,8 @@ public: CODE_REVERSE, CODE_HOLDS, CODE_DARK, + CODE_HIDDEN, + CODE_RANDOMVANISH, CODE_CANCEL_ALL, CODE_NEXT_THEME, CODE_NEXT_ANNOUNCER, diff --git a/stepmania/src/NoteField.cpp b/stepmania/src/NoteField.cpp index 98a4ac7eff..8ad2e02b9a 100644 --- a/stepmania/src/NoteField.cpp +++ b/stepmania/src/NoteField.cpp @@ -420,7 +420,6 @@ void NoteField::DrawPrimitives() float fBeat = NoteRowToBeat(i); bIsInSelectionRange = m_fBeginMarker<=fBeat && fBeat<=m_fEndMarker; } - m_NoteDisplay[c].DrawTap( c, NoteRowToBeat(i), bHoldNoteBeginsOnThisBeat, bIsInSelectionRange ? fSelectedRangeGlow : m_fPercentFadeToFail ); } @@ -429,7 +428,6 @@ void NoteField::DrawPrimitives() } - void NoteField::RemoveTapNoteRow( int iIndex ) { for( int c=0; cGetPathToB( BackdropName ) ); + m_NoteField.Load( (NoteData*)this, pn, iStartDrawingAtPixels, iStopDrawingAtPixels ); m_ArrowBackdrop.SetPlayer( pn ); @@ -572,6 +573,35 @@ void Player::CrossedRow( int iNoteRow ) Step( t ); } +void Player::RandomiseNotes( int iNoteRow ) +{ + int NewNoteRow = iNoteRow + 50 / GAMESTATE->m_PlayerOptions[m_PlayerNumber].m_fScrollSpeed; // change the row to look ahead from based upon their speed mod + // check to see if they're at the crossed row + int EmptyNoteCol = -1; + int WaitingForEmptyColumn = -1; + + bool b_updatenotedata = false; + int iNumOfTracks = GetNumTracks(); + for(int t=0; tGetMetricF("ScreenEz2SelectMusic",ssprintf("SpeedIconP%dY",p+1)) #define MIRRORICON_X( p ) THEME->GetMetricF("ScreenEz2SelectMusic",ssprintf("MirrorIconP%dX",p+1)) #define MIRRORICON_Y( p ) THEME->GetMetricF("ScreenEz2SelectMusic",ssprintf("MirrorIconP%dY",p+1)) +#define HIDDENICON_X( p ) THEME->GetMetricF("ScreenEz2SelectMusic",ssprintf("HiddenIconP%dX",p+1)) +#define HIDDENICON_Y( p ) THEME->GetMetricF("ScreenEz2SelectMusic",ssprintf("HiddenIconP%dY",p+1)) +#define VANISHICON_X( p ) THEME->GetMetricF("ScreenEz2SelectMusic",ssprintf("VanishIconP%dX",p+1)) +#define VANISHICON_Y( p ) THEME->GetMetricF("ScreenEz2SelectMusic",ssprintf("VanishIconP%dY",p+1)) #define SHUFFLEICON_X( p ) THEME->GetMetricF("ScreenEz2SelectMusic",ssprintf("ShuffleIconP%dX",p+1)) #define SHUFFLEICON_Y( p ) THEME->GetMetricF("ScreenEz2SelectMusic",ssprintf("ShuffleIconP%dY",p+1)) #define PREVIEWMUSICMODE THEME->GetMetricI("ScreenEz2SelectMusic","PreviewMusicMode") @@ -124,6 +128,16 @@ ScreenEz2SelectMusic::ScreenEz2SelectMusic() : Screen("ScreenEz2SelectMusic") m_ShuffleIcon[p].SetDiffuse( RageColor(0,0,0,0) ); this->AddChild(&m_ShuffleIcon[p] ); + m_HiddenIcon[p].Load( THEME->GetPathToG("ScreenEz2SelectMusic hiddenicon")); + m_HiddenIcon[p].SetXY( HIDDENICON_X(p), HIDDENICON_Y(p) ); + m_HiddenIcon[p].SetDiffuse( RageColor(0,0,0,0) ); + this->AddChild(&m_HiddenIcon[p] ); + + m_VanishIcon[p].Load( THEME->GetPathToG("ScreenEz2SelectMusic vanishicon")); + m_VanishIcon[p].SetXY( VANISHICON_X(p), VANISHICON_Y(p) ); + m_VanishIcon[p].SetDiffuse( RageColor(0,0,0,0) ); + this->AddChild(&m_VanishIcon[p] ); + UpdateOptions((PlayerNumber) p,0); m_iSelection[p] = 0; @@ -250,6 +264,14 @@ void ScreenEz2SelectMusic::UpdateOptions(PlayerNumber pn, int nosound) { m_ShuffleIcon[pn].SetDiffuse( RageColor(1,1,1,1) ); } + else if(asOptions[i] == "Hidden") + { + m_HiddenIcon[pn].SetDiffuse( RageColor(1,1,1,1) ); + } + else if(asOptions[i] == "RandomVanish") + { + m_VanishIcon[pn].SetDiffuse( RageColor(1,1,1,1) ); + } } } else @@ -257,6 +279,8 @@ void ScreenEz2SelectMusic::UpdateOptions(PlayerNumber pn, int nosound) m_SpeedIcon[pn].SetDiffuse( RageColor(0,0,0,0) ); m_MirrorIcon[pn].SetDiffuse( RageColor(0,0,0,0) ); m_ShuffleIcon[pn].SetDiffuse( RageColor(0,0,0,0) ); + m_HiddenIcon[pn].SetDiffuse( RageColor(0,0,0,0) ); + m_VanishIcon[pn].SetDiffuse( RageColor(0,0,0,0) ); } if(nosound !=0) m_soundOptionsChange.Play(); diff --git a/stepmania/src/ScreenEz2SelectMusic.h b/stepmania/src/ScreenEz2SelectMusic.h index 0d9503c5f7..c049e55225 100644 --- a/stepmania/src/ScreenEz2SelectMusic.h +++ b/stepmania/src/ScreenEz2SelectMusic.h @@ -60,6 +60,8 @@ protected: Sprite m_SpeedIcon[NUM_PLAYERS]; Sprite m_MirrorIcon[NUM_PLAYERS]; Sprite m_ShuffleIcon[NUM_PLAYERS]; + Sprite m_HiddenIcon[NUM_PLAYERS]; + Sprite m_VanishIcon[NUM_PLAYERS]; BitmapText m_PumpDifficultyRating; RageSound m_soundOptionsChange; diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index 5a8db07b1e..7c78f8df04 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -983,7 +983,13 @@ void ScreenGameplay::Update( float fDeltaTime ) for( ; m_iRowLastCrossed <= iRowNow; m_iRowLastCrossed++ ) // for each index we crossed since the last update for( pn=0; pnIsPlayerEnabled(pn) ) + { + if(GAMESTATE->m_CurrentPlayerOptions[pn].m_fAppearances[PlayerOptions::APPEARANCE_RANDOMVANISH]==1) // if we're doing random vanish + { + m_Player[pn].RandomiseNotes( m_iRowLastCrossed ); // randomise notes on the fly + } m_Player[pn].CrossedRow( m_iRowLastCrossed ); + } } if( GAMESTATE->m_SongOptions.m_bAssistTick && IsTimeToPlayTicks()) diff --git a/stepmania/src/ScreenPlayerOptions.cpp b/stepmania/src/ScreenPlayerOptions.cpp index 8ffb2bd190..81b2e70a73 100644 --- a/stepmania/src/ScreenPlayerOptions.cpp +++ b/stepmania/src/ScreenPlayerOptions.cpp @@ -42,7 +42,7 @@ OptionRow g_PlayerOptionsLines[NUM_PLAYER_OPTIONS_LINES] = { OptionRow( "Speed", "x0.25","x0.5","x0.75","x1","x1.5","x2","x3","x5","x8","C200","C300" ), OptionRow( "Acceler\n-ation", "OFF","BOOST","BRAKE","WAVE","EXPAND","BOOMERANG" ), OptionRow( "Effect", "OFF","DRUNK","DIZZY","MINI","FLIP","TORNADO" ), - OptionRow( "Appear\n-ance", "VISIBLE","HIDDEN","SUDDEN","STEALTH","BLINK" ), + OptionRow( "Appear\n-ance", "VISIBLE","HIDDEN","SUDDEN","STEALTH","BLINK", "R.VANISH" ), OptionRow( "Turn", "OFF","MIRROR","LEFT","RIGHT","SHUFFLE","SUPER SHUFFLE" ), OptionRow( "Trans\n-form", "OFF","LITTLE","WIDE","BIG","QUICK","SKIPPY" ), OptionRow( "Scroll", "STANDARD","REVERSE" ),