diff --git a/stepmania/src/ArrowEffects.cpp b/stepmania/src/ArrowEffects.cpp index cacd53ac56..a451937d9f 100644 --- a/stepmania/src/ArrowEffects.cpp +++ b/stepmania/src/ArrowEffects.cpp @@ -99,6 +99,11 @@ float ArrowGetYPos( const PlayerOptions& po, float fYOffset ) float ArrowGetAlpha( const PlayerOptions& po, float fYPos ) { float fAlpha; + static float blinktimer=0; + if (blinktimer == 0) + blinktimer = TIMER->GetTimeSinceStart(); + + static int blinkstate=2; switch( po.m_AppearanceType ) { case PlayerOptions::APPEARANCE_VISIBLE: @@ -112,6 +117,42 @@ float ArrowGetAlpha( const PlayerOptions& po, float fYPos ) break; case PlayerOptions::APPEARANCE_STEALTH: fAlpha = 0; + break; + case PlayerOptions::APPEARANCE_BLINK: // this is an Ez2dancer Appearance Mode + if (TIMER->GetTimeSinceStart() > blinktimer + 0.20f) + { + blinktimer = TIMER->GetTimeSinceStart(); + if (blinkstate == 1) + { + blinkstate = 2; + } + else if (blinkstate == 0) + { + blinkstate = 3; + } + else if (blinkstate == 2) + { + blinkstate = 0; + } + else + { + blinkstate = 1; + } + } + + if (blinkstate == 1) + { + fAlpha = 1; + } + else if (blinkstate == 0) + { + fAlpha = 0; + } + else + { + fAlpha = ((fYPos-200)/200) + (((SCREEN_HEIGHT-fYPos)-260)/200); + } + break; default: ASSERT( false ); diff --git a/stepmania/src/PlayerOptions.cpp b/stepmania/src/PlayerOptions.cpp index 46d2059b4c..0bada2a74e 100644 --- a/stepmania/src/PlayerOptions.cpp +++ b/stepmania/src/PlayerOptions.cpp @@ -36,6 +36,7 @@ CString PlayerOptions::GetString() case APPEARANCE_HIDDEN: sReturn += "Hidden, "; break; case APPEARANCE_SUDDEN: sReturn += "Sudden, "; break; case APPEARANCE_STEALTH: sReturn += "Stealth, "; break; + case APPEARANCE_BLINK: sReturn += "Blink, "; break; default: ASSERT(0); // invalid EFFECT } switch( m_TurnType ) diff --git a/stepmania/src/PlayerOptions.h b/stepmania/src/PlayerOptions.h index 93c09c051f..1d1d34925d 100644 --- a/stepmania/src/PlayerOptions.h +++ b/stepmania/src/PlayerOptions.h @@ -15,7 +15,7 @@ struct PlayerOptions float m_fArrowScrollSpeed; enum EffectType { EFFECT_NONE=0, EFFECT_BOOST, EFFECT_WAVE, EFFECT_DRUNK, EFFECT_DIZZY, EFFECT_SPACE, EFFECT_MINI }; EffectType m_EffectType; - enum AppearanceType { APPEARANCE_VISIBLE=0, APPEARANCE_HIDDEN, APPEARANCE_SUDDEN, APPEARANCE_STEALTH }; + enum AppearanceType { APPEARANCE_VISIBLE=0, APPEARANCE_HIDDEN, APPEARANCE_SUDDEN, APPEARANCE_STEALTH, APPEARANCE_BLINK }; AppearanceType m_AppearanceType; enum TurnType { TURN_NONE=0, TURN_MIRROR, TURN_LEFT, TURN_RIGHT, TURN_SHUFFLE }; TurnType m_TurnType; diff --git a/stepmania/src/ScreenPlayerOptions.cpp b/stepmania/src/ScreenPlayerOptions.cpp index e2c5423c67..39bf65782f 100644 --- a/stepmania/src/ScreenPlayerOptions.cpp +++ b/stepmania/src/ScreenPlayerOptions.cpp @@ -40,7 +40,7 @@ enum { OptionLineData g_PlayerOptionsLines[NUM_PLAYER_OPTIONS_LINES] = { { "Speed", 8, {"x0.5","x0.75","x1","x1.5","x2","x3","x5","x8"} }, { "Effect", 7, {"OFF","BOOST","WAVE", "DRUNK", "DIZZY","SPACE","MINI"} }, - { "Appear", 4, {"VISIBLE","HIDDEN","SUDDEN","STEALTH"} }, + { "Appear", 5, {"VISIBLE","HIDDEN","SUDDEN","STEALTH", "BLINK"} }, { "Turn", 5, {"OFF","MIRROR","LEFT","RIGHT","SHUFFLE"} }, { "Little", 2, {"OFF","ON"} }, { "Scroll", 2, {"STANDARD","REVERSE"} },