diff --git a/stepmania/NEWS b/stepmania/NEWS index 083d721fc6..bf65206deb 100644 --- a/stepmania/NEWS +++ b/stepmania/NEWS @@ -17,6 +17,7 @@ CHANGE: Reorganization of options screens. NEW FEATURE: Option for user-selectable extra stage 1 CHANGE: Documentation now in HTML format. CHANGE: Overhauled NoteSkin format. See README-FIRST.htm for details. +BUG FIX: Super-shuffle fixed (now doesn't add extra notes) ----------------------- Version 3.01 --------------------------- CHANGE: Simplified NoteSkin tap graphic format. Old NoteSkins will need to diff --git a/stepmania/Themes/default/metrics.ini b/stepmania/Themes/default/metrics.ini index 89e44e64a4..98e9195f72 100644 --- a/stepmania/Themes/default/metrics.ini +++ b/stepmania/Themes/default/metrics.ini @@ -744,11 +744,12 @@ MenuTimer=Turn this &oq;OFF&cq; to disable the time limit in menus. ArcadeStages=The number of songs a player can play in Arcade mode.::Set this to &oq;Unlimited&cq;, and you can continue playing forever.::Also, when this option is set to &oq;Unlimited&cq;, failing will take you::back to the the Select Music or Select Course screen. JudgeDifficulty=Increase this value to cause your steps to be judged more strictly::(i.e. shink the timing window). LifeDifficulty=Increate this value to cause your life meter to::drain faster and refill slower. +Fail=Choose the conditions for game over.::LIFE DRAINED will stop the music immediately when all players have 0 life.::END OF SONG will cause the game to end at the conclusion of the current song::if all players failed at some point during the song.::OFF disables game over entirely. ShowStats=Display Performance Statistics in the upper right corner::of the screen. FPS = frames per second.::TPF = triangles per frame. DPF = draws per frame. CoinMode=When set to HOME, options will be shown on the title screen.::When set to PAY the title menu choices are hidden and you must::insert coins before joining in. When set to FREE the title menu::choices are hidden and you can joining in without inserting coins. CoinsPerCredit=The number of coins that must be inserted before a player can join. JointPremium=When set to OFF, game styles that require both sides of the machine::will cost 2 credits. When set to ON game styles that require both sides::of the machine will cost only 1 credit. -SongOptions=Choose whether to display the song options menu after selecting a song. +SongOptions=Choose whether or not to display the Song Options screen::after the Player Options screen. [ScreenGraphicOptions] DisplayMode=Choose whether you would like StepMania to run full screen,::or to display in a window on your desktop. diff --git a/stepmania/src/ArrowEffects.cpp b/stepmania/src/ArrowEffects.cpp index 6200007eb6..392c02d196 100644 --- a/stepmania/src/ArrowEffects.cpp +++ b/stepmania/src/ArrowEffects.cpp @@ -181,3 +181,12 @@ float ArrowGetGlow( PlayerNumber pn, float fYPos, float fPercentFadeToFail ) const float fDistFromHalf = fabsf( fPercentVisible - 0.5f ); return SCALE( fDistFromHalf, 0, 0.5f, 1.3f, 0 ); } + +float ArrowGetBrightness( PlayerNumber pn, float fYPos ) +{ + float fBrightness = SCALE( fYPos, 0, -ARROW_SIZE, 1.f, 0.f ); + CLAMP( fBrightness, 0, 1 ); + printf( "fBrightness = %f\n", fBrightness ); + return fBrightness; +} + diff --git a/stepmania/src/ArrowEffects.h b/stepmania/src/ArrowEffects.h index b8bf40ff0e..85352447fb 100644 --- a/stepmania/src/ArrowEffects.h +++ b/stepmania/src/ArrowEffects.h @@ -46,12 +46,17 @@ float ArrowGetXPos( PlayerNumber pn, int iCol, float fYPos ); // fAlpha is the transparency of the arrow. It depends on fYPos and the -// ArrowAppearance. +// AppearanceType. float ArrowGetAlpha( PlayerNumber pn, float fYPos, float fPercentFadeToFail ); // fAlpha is the transparency of the arrow. It depends on fYPos and the -// ArrowAppearance. +// AppearanceType. float ArrowGetGlow( PlayerNumber pn, float fYPos, float fPercentFadeToFail ); + +// Depends on fYPos. +float ArrowGetBrightness( PlayerNumber pn, float fYPos ); + + #endif diff --git a/stepmania/src/NoteDisplay.cpp b/stepmania/src/NoteDisplay.cpp index 290acd3e3a..0a0cb91f93 100644 --- a/stepmania/src/NoteDisplay.cpp +++ b/stepmania/src/NoteDisplay.cpp @@ -644,28 +644,16 @@ void NoteDisplay::DrawHold( const HoldNote& hn, const bool bActive, const float void NoteDisplay::DrawTap( const int iCol, const float fBeat, const bool bOnSameRowAsHoldStart, const float fPercentFadeToFail, const float fLife ) { - const float fYOffset = ArrowGetYOffset( m_PlayerNumber, fBeat ); + const float fYOffset = ArrowGetYOffset( m_PlayerNumber, fBeat ); const float fYPos = ArrowGetYPos( m_PlayerNumber, fYOffset ); - const float fRotation = ArrowGetRotation( m_PlayerNumber, fBeat ); - const float fXPos = ArrowGetXPos( m_PlayerNumber, iCol, fYPos ); - const float fAlpha = ArrowGetAlpha( m_PlayerNumber, fYPos, fPercentFadeToFail ); - const float fGlow = ArrowGetGlow( m_PlayerNumber, fYPos, fPercentFadeToFail ); - const float fColorScale = SCALE(fLife,0,1,0.2f,1); + const float fRotation = ArrowGetRotation( m_PlayerNumber, fBeat ); + const float fXPos = ArrowGetXPos( m_PlayerNumber, iCol, fYPos ); + const float fAlpha = ArrowGetAlpha( m_PlayerNumber, fYPos, fPercentFadeToFail ); + const float fGlow = ArrowGetGlow( m_PlayerNumber, fYPos, fPercentFadeToFail ); + const float fColorScale = ArrowGetBrightness( m_PlayerNumber, fYPos ) * SCALE(fLife,0,1,0.2f,1); RageColor diffuse = RageColor(fColorScale,fColorScale,fColorScale,fAlpha); RageColor glow = RageColor(1,1,1,fGlow); - /* - if( GAMESTATE->m_PlayerOptions[m_PlayerNumber].m_ColorType == PlayerOptions::COLOR_NOTE ) - { - RageColor noteColor = GetNoteColorFromBeat(fBeat); - diffuse.r *= noteColor.r; - diffuse.g *= noteColor.g; - diffuse.b *= noteColor.b; - - glow = RageColor(1,1,1,1)*fGlow + noteColor*(1-fGlow)*0.7f*fAlpha; - } - */ - Sprite* pSprite; if( bOnSameRowAsHoldStart && cache->m_bDrawHoldHeadForTapsOnSameRow ) { diff --git a/stepmania/src/PrefsManager.cpp b/stepmania/src/PrefsManager.cpp index db89bfeb63..b581b158a0 100644 --- a/stepmania/src/PrefsManager.cpp +++ b/stepmania/src/PrefsManager.cpp @@ -83,7 +83,9 @@ PrefsManager::PrefsManager() m_bJointPremium = false; m_iBoostAppPriority = -1; m_iPolygonRadar = -1; - + m_bShowSongOptions = true; + m_FailType = FAIL_ARCADE; + /* DDR Extreme-style extra stage support. * * Default off so people used to the current behavior (or those with extra * * stage CRS files) don't get it changed around on them */ @@ -167,6 +169,8 @@ void PrefsManager::ReadGlobalPrefsFromDisk( bool bSwitchToLastPlayedGame ) ini.GetValueB( "Options", "PickExtraStage", m_bPickExtraStage ); ini.GetValueF( "Options", "LongVerSeconds", m_fLongVerSongSeconds ); ini.GetValueF( "Options", "MarathonVerSeconds", m_fMarathonVerSongSeconds ); + ini.GetValueB( "Options", "ShowSongOptions", m_bShowSongOptions ); + ini.GetValueI( "Options", "FailType", (int&)m_FailType ); m_asAdditionalSongFolders.clear(); @@ -238,7 +242,8 @@ void PrefsManager::SaveGlobalPrefsToDisk() ini.SetValueB( "Options", "PickExtraStage", m_bPickExtraStage ); ini.SetValueF( "Options", "LongVerSeconds", m_fLongVerSongSeconds ); ini.SetValueF( "Options", "MarathonVerSeconds", m_fMarathonVerSongSeconds ); - ini.SetValueB( "Options", "SongOptions", m_bShowSongOptions ); + ini.SetValueB( "Options", "ShowSongOptions", m_bShowSongOptions ); + ini.SetValueI( "Options", "FailType", (int&)m_FailType ); /* Only write these if they aren't the default. This ensures that we can change * the default and have it take effect for everyone (except people who diff --git a/stepmania/src/PrefsManager.h b/stepmania/src/PrefsManager.h index 88413ab71e..fa45836ad8 100644 --- a/stepmania/src/PrefsManager.h +++ b/stepmania/src/PrefsManager.h @@ -68,7 +68,7 @@ public: float m_fLongVerSongSeconds; float m_fMarathonVerSongSeconds; bool m_bShowSongOptions; - + enum { FAIL_ARCADE=0, FAIL_END_OF_SONG, FAIL_OFF } m_FailType; /* 0 = no; 1 = yes; -1 = auto (do whatever is appropriate for the arch). */ int m_iBoostAppPriority; diff --git a/stepmania/src/ScreenDemonstration.cpp b/stepmania/src/ScreenDemonstration.cpp index 6774d5ef8d..e67f338c2e 100644 --- a/stepmania/src/ScreenDemonstration.cpp +++ b/stepmania/src/ScreenDemonstration.cpp @@ -100,7 +100,7 @@ bool SetUpSongOptions() // always return true. GAMESTATE->m_PlayerOptions[p].m_bEffects[ PlayerOptions::EFFECT_MINI ] = true; } GAMESTATE->m_SongOptions.m_LifeType = SongOptions::LIFE_BATTERY; - GAMESTATE->m_SongOptions.m_FailType = SongOptions::FAIL_OFF; + PREFSMAN->m_FailType = PrefsManager::FAIL_OFF; } for( int p=0; pm_SongOptions = SongOptions(); GAMESTATE->m_SongOptions.m_LifeType = (randomf(0,1)>0.8f) ? SongOptions::LIFE_BATTERY : SongOptions::LIFE_BAR; - GAMESTATE->m_SongOptions.m_FailType = SongOptions::FAIL_OFF; + PREFSMAN->m_FailType = PrefsManager::FAIL_OFF; GAMESTATE->m_bDemonstration = true; diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index db6f892ea0..703aab7063 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -775,9 +775,9 @@ void ScreenGameplay::Update( float fDeltaTime ) // // check for fail // - switch( GAMESTATE->m_SongOptions.m_FailType ) + switch( PREFSMAN->m_FailType ) { - case SongOptions::FAIL_ARCADE: + case PrefsManager::FAIL_ARCADE: switch( GAMESTATE->m_SongOptions.m_LifeType ) { case SongOptions::LIFE_BAR: @@ -821,8 +821,8 @@ void ScreenGameplay::Update( float fDeltaTime ) break; } break; - case SongOptions::FAIL_END_OF_SONG: - case SongOptions::FAIL_OFF: + case PrefsManager::FAIL_END_OF_SONG: + case PrefsManager::FAIL_OFF: break; // don't check for fail default: ASSERT(0); @@ -1274,7 +1274,7 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM ) return; // ignore m_DancingState = STATE_OUTRO; - if( GAMESTATE->m_SongOptions.m_FailType == SongOptions::FAIL_END_OF_SONG && AllFailedEarlier() ) + if( PREFSMAN->m_FailType == PrefsManager::FAIL_END_OF_SONG && AllFailedEarlier() ) { this->SendScreenMessage( SM_BeginFailed, 0 ); return; diff --git a/stepmania/src/ScreenJukebox.cpp b/stepmania/src/ScreenJukebox.cpp index 2a4f4a9029..9d2f2ac993 100644 --- a/stepmania/src/ScreenJukebox.cpp +++ b/stepmania/src/ScreenJukebox.cpp @@ -93,7 +93,7 @@ bool PrepareForJukebox() // always return true. GAMESTATE->m_PlayerOptions[p].m_bEffects[ PlayerOptions::EFFECT_MINI ] = true; } GAMESTATE->m_SongOptions.m_LifeType = SongOptions::LIFE_BATTERY; - GAMESTATE->m_SongOptions.m_FailType = SongOptions::FAIL_OFF; + PREFSMAN->m_FailType = PrefsManager::FAIL_OFF; } for( int p=0; pm_SongOptions = SongOptions(); GAMESTATE->m_SongOptions.m_LifeType = (randomf(0,1)>0.8f) ? SongOptions::LIFE_BATTERY : SongOptions::LIFE_BAR; - GAMESTATE->m_SongOptions.m_FailType = SongOptions::FAIL_OFF; + PREFSMAN->m_FailType = PrefsManager::FAIL_OFF; GAMESTATE->m_bDemonstration = true; diff --git a/stepmania/src/ScreenMachineOptions.cpp b/stepmania/src/ScreenMachineOptions.cpp index 0f94b3435f..ffc35957b7 100644 --- a/stepmania/src/ScreenMachineOptions.cpp +++ b/stepmania/src/ScreenMachineOptions.cpp @@ -28,6 +28,7 @@ enum { MO_NUM_ARCADE_STAGES, MO_JUDGE_DIFFICULTY, MO_LIFE_DIFFICULTY, + MO_FAIL, MO_SHOWSTATS, MO_COIN_MODE, MO_COINS_PER_CREDIT, @@ -42,11 +43,12 @@ OptionRowData g_MachineOptionsLines[NUM_MACHINE_OPTIONS_LINES] = { { "Arcade\nStages", 8, {"1","2","3","4","5","6","7","UNLIMITED"} }, { "Judge\nDifficulty", 8, {"1","2","3","4","5","6","7","8"} }, { "Life\nDifficulty", 7, {"1","2","3","4","5","6","7"} }, + { "Fail", 3, {"LIFE DRAINED","END OF SONG","OFF"} }, { "Show\nStats", 2, {"OFF","ON"} }, { "Coin\nMode", 3, {"HOME","PAY","FREE PLAY"} }, { "Coins Per\nCredit", 8, {"1","2","3","4","5","6","7","8"} }, { "Joint\nPremium", 2, {"OFF","ON"} }, - { "Song\nOptions", 2, {"OFF","ON"} }, + { "Song\nOptions", 2, {"HIDE","SHOW"} }, }; ScreenMachineOptions::ScreenMachineOptions() : @@ -109,6 +111,7 @@ void ScreenMachineOptions::ImportOptions() else if( PREFSMAN->m_fLifeDifficultyScale == 0.40f ) m_iSelectedOption[0][MO_LIFE_DIFFICULTY] = 6; else m_iSelectedOption[0][MO_LIFE_DIFFICULTY] = 3; + m_iSelectedOption[0][MO_FAIL] = PREFSMAN->m_FailType; m_iSelectedOption[0][MO_SHOWSTATS] = PREFSMAN->m_bShowStats ? 1:0; m_iSelectedOption[0][MO_COIN_MODE] = PREFSMAN->m_CoinMode; m_iSelectedOption[0][MO_COINS_PER_CREDIT] = PREFSMAN->m_iCoinsPerCredit - 1; @@ -146,6 +149,7 @@ void ScreenMachineOptions::ExportOptions() default: ASSERT(0); } + (int&)PREFSMAN->m_FailType = m_iSelectedOption[0][MO_FAIL]; PREFSMAN->m_bShowStats = m_iSelectedOption[0][MO_SHOWSTATS] == 1; (int&)PREFSMAN->m_CoinMode = m_iSelectedOption[0][MO_COIN_MODE]; PREFSMAN->m_iCoinsPerCredit = m_iSelectedOption[0][MO_COINS_PER_CREDIT] + 1; diff --git a/stepmania/src/ScreenSelectMusic.cpp b/stepmania/src/ScreenSelectMusic.cpp index e605cdb78b..80fb658c22 100644 --- a/stepmania/src/ScreenSelectMusic.cpp +++ b/stepmania/src/ScreenSelectMusic.cpp @@ -559,21 +559,21 @@ void ScreenSelectMusic::AdjustOptions() /* In event mode, switch to fail-end-of-stage if either chose beginner or easy. */ if(PREFSMAN->m_bEventMode && dc <= DIFFICULTY_EASY) - GAMESTATE->m_SongOptions.m_FailType = SongOptions::FailType::FAIL_END_OF_SONG; - + PREFSMAN->m_FailType = PrefsManager::FAIL_END_OF_SONG; + /* Otherwise, if either chose beginner's steps, and this is the first stage, * turn off failure completely (always give a second shot). */ else if(dc == DIFFICULTY_BEGINNER) { /* Beginners get a freebie and then end-of-song. */ if(GAMESTATE->m_iCurrentStageIndex == 0) - GAMESTATE->m_SongOptions.m_FailType = SongOptions::FailType::FAIL_OFF; + PREFSMAN->m_FailType = PrefsManager::FAIL_OFF; else if(!GAMESTATE->IsExtraStage() && !GAMESTATE->IsExtraStage2()) - GAMESTATE->m_SongOptions.m_FailType = SongOptions::FailType::FAIL_END_OF_SONG; + PREFSMAN->m_FailType = PrefsManager::FAIL_END_OF_SONG; } /* Easy is always end-of-song. */ else if(dc == DIFFICULTY_EASY && !GAMESTATE->IsExtraStage() && !GAMESTATE->IsExtraStage2()) - GAMESTATE->m_SongOptions.m_FailType = SongOptions::FailType::FAIL_END_OF_SONG; + PREFSMAN->m_FailType = PrefsManager::FAIL_END_OF_SONG; } void ScreenSelectMusic::HandleScreenMessage( const ScreenMessage SM ) diff --git a/stepmania/src/ScreenSongOptions.cpp b/stepmania/src/ScreenSongOptions.cpp index 20d5db50d5..d137c46c26 100644 --- a/stepmania/src/ScreenSongOptions.cpp +++ b/stepmania/src/ScreenSongOptions.cpp @@ -24,7 +24,6 @@ enum { SO_LIFE = 0, SO_DRAIN, SO_BAT_LIVES, - SO_FAIL, SO_ASSIST, SO_RATE, SO_AUTOSYNC, @@ -35,7 +34,6 @@ OptionRowData g_SongOptionsLines[NUM_SONG_OPTIONS_LINES] = { { "Life\nType", 2, {"BAR","BATTERY"} }, { "Bar\nDrain", 3, {"NORMAL","NO RECOVER","SUDDEN DEATH"} }, { "Bat\nLives", 10, {"1","2","3","4","5","6","7","8","9","10"} }, - { "Fail", 3, {"ARCADE","END OF SONG","OFF"} }, { "Assist", 2, {"OFF","TICK"} }, { "Rate", 9, {"x0.7","x0.8","x0.9","x1.0","x1.1","x1.2","x1.3","x1.4","x1.5"} }, { "Auto\nAdjust", 2, {"OFF", "ON"} }, @@ -63,7 +61,6 @@ void ScreenSongOptions::ImportOptions() m_iSelectedOption[0][SO_LIFE] = so.m_LifeType; m_iSelectedOption[0][SO_BAT_LIVES] = so.m_iBatteryLives-1; - m_iSelectedOption[0][SO_FAIL] = so.m_FailType; m_iSelectedOption[0][SO_ASSIST] = so.m_AssistType; m_iSelectedOption[0][SO_AUTOSYNC] = so.m_bAutoSync; @@ -86,7 +83,6 @@ void ScreenSongOptions::ExportOptions() so.m_LifeType = (SongOptions::LifeType)m_iSelectedOption[0][SO_LIFE]; so.m_DrainType = (SongOptions::DrainType)m_iSelectedOption[0][SO_DRAIN]; so.m_iBatteryLives = m_iSelectedOption[0][SO_BAT_LIVES]+1; - so.m_FailType = (SongOptions::FailType)m_iSelectedOption[0][SO_FAIL]; so.m_AssistType = (SongOptions::AssistType)m_iSelectedOption[0][SO_ASSIST]; so.m_bAutoSync = m_iSelectedOption[0][SO_AUTOSYNC] != 0; diff --git a/stepmania/src/SongOptions.cpp b/stepmania/src/SongOptions.cpp index 754d7e0a2e..026c3edc97 100644 --- a/stepmania/src/SongOptions.cpp +++ b/stepmania/src/SongOptions.cpp @@ -33,14 +33,6 @@ CString SongOptions::GetString() break; } - - switch( m_FailType ) - { - case FAIL_ARCADE: break; - case FAIL_END_OF_SONG: sReturn += "FailEndOfSong, "; break; - case FAIL_OFF: sReturn += "FailOff, "; break; - } - if( m_fMusicRate != 1 ) { CString s = ssprintf( "%2.2f", m_fMusicRate ); diff --git a/stepmania/src/SongOptions.h b/stepmania/src/SongOptions.h index 1bde170a69..32535f2f96 100644 --- a/stepmania/src/SongOptions.h +++ b/stepmania/src/SongOptions.h @@ -20,8 +20,6 @@ struct SongOptions enum DrainType { DRAIN_NORMAL, DRAIN_NO_RECOVER, DRAIN_SUDDEN_DEATH }; DrainType m_DrainType; // only used with LifeBar int m_iBatteryLives; - enum FailType { FAIL_ARCADE=0, FAIL_END_OF_SONG, FAIL_OFF }; - FailType m_FailType; enum AssistType { ASSIST_NONE=0, ASSIST_TICK }; AssistType m_AssistType; float m_fMusicRate; @@ -33,7 +31,6 @@ struct SongOptions m_LifeType = LIFE_BAR; m_DrainType = DRAIN_NORMAL; m_iBatteryLives = 4; - m_FailType = FAIL_ARCADE; m_AssistType = ASSIST_NONE; m_fMusicRate = 1.0f; m_bAutoSync = false;