diff --git a/stepmania/Themes/default/Graphics/ScoreDisplayRave stream level1.png b/stepmania/Themes/default/Graphics/ScoreDisplayRave stream level1.png index 22802fed38..cd3ef9bcfc 100644 Binary files a/stepmania/Themes/default/Graphics/ScoreDisplayRave stream level1.png and b/stepmania/Themes/default/Graphics/ScoreDisplayRave stream level1.png differ diff --git a/stepmania/Themes/default/Graphics/ScoreDisplayRave stream level2.png b/stepmania/Themes/default/Graphics/ScoreDisplayRave stream level2.png index 37dd8d452b..7e182f266c 100644 Binary files a/stepmania/Themes/default/Graphics/ScoreDisplayRave stream level2.png and b/stepmania/Themes/default/Graphics/ScoreDisplayRave stream level2.png differ diff --git a/stepmania/Themes/default/Graphics/ScoreDisplayRave stream level3.png b/stepmania/Themes/default/Graphics/ScoreDisplayRave stream level3.png index 478b4cc3aa..24029f29c0 100644 Binary files a/stepmania/Themes/default/Graphics/ScoreDisplayRave stream level3.png and b/stepmania/Themes/default/Graphics/ScoreDisplayRave stream level3.png differ diff --git a/stepmania/Themes/default/Graphics/ScreenLogo techno.redir b/stepmania/Themes/default/Graphics/ScreenLogo techno.redir new file mode 100644 index 0000000000..fd07efb779 --- /dev/null +++ b/stepmania/Themes/default/Graphics/ScreenLogo techno.redir @@ -0,0 +1 @@ +ScreenLogo dance diff --git a/stepmania/Themes/default/metrics.ini b/stepmania/Themes/default/metrics.ini index 539ceaf2a3..695cdd2761 100644 --- a/stepmania/Themes/default/metrics.ini +++ b/stepmania/Themes/default/metrics.ini @@ -934,6 +934,22 @@ ScoreP2ExtraX=534 ScoreP2ExtraY=38 ScoreP2ExtraOnCommand=addy,-100;sleep,0.5;linear,1;addy,100 ScoreP2ExtraOffCommand=linear,1;addy,-100 +SecondaryScoreP1X=300 +SecondaryScoreP1Y=240 +SecondaryScoreP1OnCommand= +SecondaryScoreP1OffCommand= +SecondaryScoreP1ExtraX=300 +SecondaryScoreP1ExtraY=240 +SecondaryScoreP1ExtraOnCommand= +SecondaryScoreP1ExtraOffCommand= +SecondaryScoreP2X=340 +SecondaryScoreP2Y=240 +SecondaryScoreP2OnCommand= +SecondaryScoreP2OffCommand= +SecondaryScoreP2ExtraX=340 +SecondaryScoreP2ExtraY=240 +SecondaryScoreP2ExtraOnCommand= +SecondaryScoreP2ExtraOffCommand= PlayerOptionsP1X=320 PlayerOptionsP1Y=434 PlayerOptionsP1OnCommand=zoom,0.5;addy,100;sleep,0.5;linear,1;addy,-100 @@ -3318,3 +3334,9 @@ TipOnCommand=shadowlength,0;diffuseblink [CombinedLifeMeterTug] MeterWidth=550 + +[ScoreDisplayRave] +MeterP1OnCommand=rotationz,-90 +MeterP2OnCommand=rotationz,-90 +LevelP1OnCommand=addy,-140 +LevelP2OnCommand=addy,-140 diff --git a/stepmania/src/Player.cpp b/stepmania/src/Player.cpp index 6a9bbebdda..cdabfaf7aa 100644 --- a/stepmania/src/Player.cpp +++ b/stepmania/src/Player.cpp @@ -73,7 +73,8 @@ PlayerMinus::PlayerMinus() m_pLifeMeter = NULL; m_pCombinedLifeMeter = NULL; - m_pScore = NULL; + m_pScoreDisplay = NULL; + m_pSecondaryScoreDisplay = NULL; m_pPrimaryScoreKeeper = NULL; m_pSecondaryScoreKeeper = NULL; m_pInventory = NULL; @@ -95,7 +96,7 @@ PlayerMinus::~PlayerMinus() { } -void PlayerMinus::Load( PlayerNumber pn, const NoteData* pNoteData, LifeMeter* pLM, CombinedLifeMeter* pCombinedLM, ScoreDisplay* pScore, Inventory* pInventory, ScoreKeeper* pPrimaryScoreKeeper, ScoreKeeper* pSecondaryScoreKeeper, NoteFieldPlus* pNoteField ) +void PlayerMinus::Load( PlayerNumber pn, const NoteData* pNoteData, LifeMeter* pLM, CombinedLifeMeter* pCombinedLM, ScoreDisplay* pScoreDisplay, ScoreDisplay* pSecondaryScoreDisplay, Inventory* pInventory, ScoreKeeper* pPrimaryScoreKeeper, ScoreKeeper* pSecondaryScoreKeeper, NoteFieldPlus* pNoteField ) { m_iDCState = AS2D_IDLE; //LOG->Trace( "PlayerMinus::Load()", ); @@ -105,7 +106,8 @@ void PlayerMinus::Load( PlayerNumber pn, const NoteData* pNoteData, LifeMeter* p m_PlayerNumber = pn; m_pLifeMeter = pLM; m_pCombinedLifeMeter = pCombinedLM; - m_pScore = pScore; + m_pScoreDisplay = pScoreDisplay; + m_pSecondaryScoreDisplay = pSecondaryScoreDisplay; m_pInventory = pInventory; m_pPrimaryScoreKeeper = pPrimaryScoreKeeper; m_pSecondaryScoreKeeper = pSecondaryScoreKeeper; @@ -144,6 +146,7 @@ void PlayerMinus::Load( PlayerNumber pn, const NoteData* pNoteData, LifeMeter* p switch( GAMESTATE->m_PlayMode ) { + case PLAY_MODE_RAVE: case PLAY_MODE_BATTLE: { // ugly, ugly, ugly. Works only w/ dance. @@ -167,9 +170,6 @@ void PlayerMinus::Load( PlayerNumber pn, const NoteData* pNoteData, LifeMeter* p } count++; count %= 4; - - // HACK: Autogen in attacks for battle - NoteDataUtil::AddTapAttacks( *this, GAMESTATE->m_pCurSong ); } break; } @@ -1152,8 +1152,10 @@ void PlayerMinus::HandleTapRowScore( unsigned row ) if( life != -1 ) GAMESTATE->m_CurStageStats.SetLifeRecord( m_PlayerNumber, life, GAMESTATE->GetSongPercent(beat) ); - if (m_pScore) - m_pScore->SetScore(GAMESTATE->m_CurStageStats.iScore[m_PlayerNumber]); + if (m_pScoreDisplay) + m_pScoreDisplay->SetScore(GAMESTATE->m_CurStageStats.iScore[m_PlayerNumber]); + if (m_pSecondaryScoreDisplay) + m_pSecondaryScoreDisplay->SetScore(GAMESTATE->m_CurStageStats.iScore[m_PlayerNumber]); if( m_pLifeMeter ) { m_pLifeMeter->ChangeLife( scoreOfLastTap ); @@ -1184,8 +1186,10 @@ void PlayerMinus::HandleHoldScore( HoldNoteScore holdScore, TapNoteScore tapScor if(m_pSecondaryScoreKeeper) m_pSecondaryScoreKeeper->HandleHoldScore(holdScore, tapScore ); - if (m_pScore) - m_pScore->SetScore(GAMESTATE->m_CurStageStats.iScore[m_PlayerNumber]); + if (m_pScoreDisplay) + m_pScoreDisplay->SetScore(GAMESTATE->m_CurStageStats.iScore[m_PlayerNumber]); + if (m_pSecondaryScoreDisplay) + m_pSecondaryScoreDisplay->SetScore(GAMESTATE->m_CurStageStats.iScore[m_PlayerNumber]); if( m_pLifeMeter ) { m_pLifeMeter->ChangeLife( holdScore, tapScore ); @@ -1207,7 +1211,7 @@ void PlayerMinus::FadeToFail() m_pNoteField->FadeToFail(); } -void Player::Load( PlayerNumber player_no, const NoteData* pNoteData, LifeMeter* pLM, CombinedLifeMeter* pCombinedLM, ScoreDisplay* pScore, Inventory* pInventory, ScoreKeeper* pPrimaryScoreKeeper, ScoreKeeper* pSecondaryScoreKeeper ) +void Player::Load( PlayerNumber player_no, const NoteData* pNoteData, LifeMeter* pLM, CombinedLifeMeter* pCombinedLM, ScoreDisplay* pScoreDisplay, ScoreDisplay* pSecondaryScoreDisplay, Inventory* pInventory, ScoreKeeper* pPrimaryScoreKeeper, ScoreKeeper* pSecondaryScoreKeeper ) { - PlayerMinus::Load( player_no, pNoteData, pLM, pCombinedLM, pScore, pInventory, pPrimaryScoreKeeper, pSecondaryScoreKeeper, &m_NoteField ); + PlayerMinus::Load( player_no, pNoteData, pLM, pCombinedLM, pScoreDisplay, pSecondaryScoreDisplay, pInventory, pPrimaryScoreKeeper, pSecondaryScoreKeeper, &m_NoteField ); } diff --git a/stepmania/src/Player.h b/stepmania/src/Player.h index 15f340390f..225970abe9 100644 --- a/stepmania/src/Player.h +++ b/stepmania/src/Player.h @@ -47,7 +47,7 @@ public: virtual void Update( float fDeltaTime ); virtual void DrawPrimitives(); - void Load( PlayerNumber player_no, const NoteData* pNoteData, LifeMeter* pLM, CombinedLifeMeter* pCombinedLM, ScoreDisplay* pScore, Inventory* pInventory, ScoreKeeper* pPrimaryScoreKeeper, ScoreKeeper* pSecondaryScoreKeeper, NoteFieldPlus* pNoteField ); + void Load( PlayerNumber player_no, const NoteData* pNoteData, LifeMeter* pLM, CombinedLifeMeter* pCombinedLM, ScoreDisplay* pScoreDisplay, ScoreDisplay* pSecondaryScoreDisplay, Inventory* pInventory, ScoreKeeper* pPrimaryScoreKeeper, ScoreKeeper* pSecondaryScoreKeeper, NoteFieldPlus* pNoteField ); void CrossedRow( int iNoteRow ); void Step( int col, RageTimer tm ); void RandomiseNotes( int iNoteRow ); @@ -87,7 +87,8 @@ protected: // DancingCharacters* m_pDancingCharacters; // used to adjust the 2D anims dancing states LifeMeter* m_pLifeMeter; CombinedLifeMeter* m_pCombinedLifeMeter; - ScoreDisplay* m_pScore; + ScoreDisplay* m_pScoreDisplay; + ScoreDisplay* m_pSecondaryScoreDisplay; ScoreKeeper* m_pPrimaryScoreKeeper; ScoreKeeper* m_pSecondaryScoreKeeper; Inventory* m_pInventory; @@ -102,7 +103,7 @@ protected: class Player : public PlayerMinus { public: - void Load( PlayerNumber player_no, const NoteData* pNoteData, LifeMeter* pLM, CombinedLifeMeter* pCombinedLM, ScoreDisplay* pScore, Inventory* pInventory, ScoreKeeper* pPrimaryScoreKeeper, ScoreKeeper* pSecondaryScoreKeeper ); + void Load( PlayerNumber player_no, const NoteData* pNoteData, LifeMeter* pLM, CombinedLifeMeter* pCombinedLM, ScoreDisplay* pScoreDisplay, ScoreDisplay* pSecondaryScoreDisplay, Inventory* pInventory, ScoreKeeper* pPrimaryScoreKeeper, ScoreKeeper* pSecondaryScoreKeeper ); protected: NoteFieldPlus m_NoteField; diff --git a/stepmania/src/ScoreDisplayRave.cpp b/stepmania/src/ScoreDisplayRave.cpp index ecb95f3d14..5748e1cb48 100644 --- a/stepmania/src/ScoreDisplayRave.cpp +++ b/stepmania/src/ScoreDisplayRave.cpp @@ -17,11 +17,14 @@ #include "RageLog.h" #include "GameState.h" #include "ThemeManager.h" +#include "ActorUtil.h" ScoreDisplayRave::ScoreDisplayRave() { LOG->Trace( "ScoreDisplayRave::ScoreDisplayRave()" ); + + this->SetName( "ScoreDisplayRave" ); m_lastLevelSeen = ATTACK_LEVEL_1; @@ -43,11 +46,16 @@ void ScoreDisplayRave::Init( PlayerNumber pn ) { ScoreDisplay::Init( pn ); - if( pn == PLAYER_2 ) - for( int i=0; iGetPathToG(ssprintf("ScoreDisplayRave frame p%d",pn+1)) ); + + for( int i=0; im_PlayerOptions[PLAYER_1].m_sNoteSkin = "default"; // change noteskin back to default before loading player GAMESTATE->ResetNoteSkins(); - m_Player.Load( PLAYER_1, ¬eData, NULL, NULL, NULL, NULL, NULL, NULL ); + m_Player.Load( PLAYER_1, ¬eData, NULL, NULL, NULL, NULL, NULL, NULL, NULL ); GAMESTATE->m_PlayerController[PLAYER_1] = PC_HUMAN; m_Player.SetX( PLAYER_X ); /* Why was this here? Nothing ever sets Player Y values; this was causing @@ -1678,7 +1678,7 @@ void ScreenEdit::HandleAreaMenuChoice( AreaMenuChoice c, int* iAnswers ) * where we're starting. */ GAMESTATE->m_fSongBeat = m_NoteFieldEdit.m_fBeginMarker - 4; - m_Player.Load( PLAYER_1, &m_NoteFieldEdit, NULL, NULL, NULL, NULL, NULL, NULL ); + m_Player.Load( PLAYER_1, &m_NoteFieldEdit, NULL, NULL, NULL, NULL, NULL, NULL, NULL ); GAMESTATE->m_PlayerController[PLAYER_1] = PREFSMAN->m_bAutoPlay?PC_AUTOPLAY:PC_HUMAN; m_rectRecordBack.StopTweening(); diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index 408a346968..bcb43ad419 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -105,7 +105,8 @@ ScreenGameplay::ScreenGameplay( CString sName, bool bDemonstration ) : Screen("S for( p=0; pIsPlayerEnabled(p) ) continue; + // + // primary score display + // switch( GAMESTATE->m_PlayMode ) { case PLAY_MODE_ARCADE: case PLAY_MODE_NONSTOP: case PLAY_MODE_BATTLE: + case PLAY_MODE_RAVE: if( PREFSMAN->m_bPercentageScoring ) - m_pScoreDisplay[p] = new ScoreDisplayPercentage; + m_pPrimaryScoreDisplay[p] = new ScoreDisplayPercentage; else - m_pScoreDisplay[p] = new ScoreDisplayNormal; + m_pPrimaryScoreDisplay[p] = new ScoreDisplayNormal; break; case PLAY_MODE_ONI: case PLAY_MODE_ENDLESS: - m_pScoreDisplay[p] = new ScoreDisplayOni; - break; - case PLAY_MODE_RAVE: - m_pScoreDisplay[p] = new ScoreDisplayRave; + m_pPrimaryScoreDisplay[p] = new ScoreDisplayOni; break; default: ASSERT(0); } - m_pScoreDisplay[p]->Init( (PlayerNumber)p ); - m_pScoreDisplay[p]->SetName( ssprintf("ScoreP%d%s",p+1,bExtra?"Extra":"") ); - SET_XY( *m_pScoreDisplay[p] ); - this->AddChild( m_pScoreDisplay[p] ); + m_pPrimaryScoreDisplay[p]->Init( (PlayerNumber)p ); + m_pPrimaryScoreDisplay[p]->SetName( ssprintf("ScoreP%d%s",p+1,bExtra?"Extra":"") ); + SET_XY( *m_pPrimaryScoreDisplay[p] ); + this->AddChild( m_pPrimaryScoreDisplay[p] ); + + + // + // secondary score display + // + switch( GAMESTATE->m_PlayMode ) + { + case PLAY_MODE_RAVE: + m_pSecondaryScoreDisplay[p] = new ScoreDisplayRave; + break; + } + + if( m_pSecondaryScoreDisplay[p] ) + { + m_pSecondaryScoreDisplay[p]->Init( (PlayerNumber)p ); + m_pSecondaryScoreDisplay[p]->SetName( ssprintf("SecondaryScoreP%d%s",p+1,bExtra?"Extra":"") ); + SET_XY( *m_pSecondaryScoreDisplay[p] ); + this->AddChild( m_pSecondaryScoreDisplay[p] ); + } } for( p=0; pGetCurrentStyleDef(); NoteData pNewNoteData; pStyleDef->GetTransformedNoteDataForStyle( (PlayerNumber)p, &pOriginalNoteData, &pNewNoteData ); - m_Player[p].Load( (PlayerNumber)p, &pNewNoteData, m_pLifeMeter[p], m_pCombinedLifeMeter, m_pScoreDisplay[p], m_pInventory[p], m_pPrimaryScoreKeeper[p], m_pSecondaryScoreKeeper[p] ); + m_Player[p].Load( (PlayerNumber)p, &pNewNoteData, m_pLifeMeter[p], m_pCombinedLifeMeter, m_pPrimaryScoreDisplay[p], m_pSecondaryScoreDisplay[p], m_pInventory[p], m_pPrimaryScoreKeeper[p], m_pSecondaryScoreKeeper[p] ); /* The actual note data for scoring is the base class of Player. This includes * transforms, like Wide. Otherwise, the scoring will operate on the wrong data. */ @@ -2071,8 +2094,10 @@ void ScreenGameplay::TweenOnScreen() if( !GAMESTATE->IsPlayerEnabled(p) ) continue; ON_COMMAND( m_textCourseSongNumber[p] ); - if( m_pScoreDisplay[p] ) - ON_COMMAND( *m_pScoreDisplay[p] ); + if( m_pPrimaryScoreDisplay[p] ) + ON_COMMAND( *m_pPrimaryScoreDisplay[p] ); + if( m_pSecondaryScoreDisplay[p] ) + ON_COMMAND( *m_pSecondaryScoreDisplay[p] ); ON_COMMAND( m_textPlayerOptions[p] ); ON_COMMAND( m_DifficultyIcon[p] ); } @@ -2094,8 +2119,10 @@ void ScreenGameplay::TweenOffScreen() if( !GAMESTATE->IsPlayerEnabled(p) ) continue; OFF_COMMAND( m_textCourseSongNumber[p] ); - if( m_pScoreDisplay[p] ) - OFF_COMMAND( *m_pScoreDisplay[p] ); + if( m_pPrimaryScoreDisplay[p] ) + OFF_COMMAND( *m_pPrimaryScoreDisplay[p] ); + if( m_pSecondaryScoreDisplay[p] ) + OFF_COMMAND( *m_pSecondaryScoreDisplay[p] ); OFF_COMMAND( m_textPlayerOptions[p] ); OFF_COMMAND( m_DifficultyIcon[p] ); } diff --git a/stepmania/src/ScreenGameplay.h b/stepmania/src/ScreenGameplay.h index a025db1d5c..dac7d86ac6 100644 --- a/stepmania/src/ScreenGameplay.h +++ b/stepmania/src/ScreenGameplay.h @@ -116,7 +116,8 @@ protected: BPMDisplay m_BPMDisplay; Sprite m_sprScoreFrame; - ScoreDisplay* m_pScoreDisplay[NUM_PLAYERS]; + ScoreDisplay* m_pPrimaryScoreDisplay[NUM_PLAYERS]; + ScoreDisplay* m_pSecondaryScoreDisplay[NUM_PLAYERS]; ScoreKeeper* m_pPrimaryScoreKeeper[NUM_PLAYERS]; ScoreKeeper* m_pSecondaryScoreKeeper[NUM_PLAYERS]; BitmapText m_textPlayerOptions[NUM_PLAYERS]; diff --git a/stepmania/src/ScreenHowToPlay.cpp b/stepmania/src/ScreenHowToPlay.cpp index a6eb0c9752..50cf2fb2d7 100644 --- a/stepmania/src/ScreenHowToPlay.cpp +++ b/stepmania/src/ScreenHowToPlay.cpp @@ -173,7 +173,7 @@ ScreenHowToPlay::ScreenHowToPlay( CString sName ) : ScreenAttract( sName ) if( USEPLAYER ) { m_pPlayer = new Player; - m_pPlayer->Load( PLAYER_1, &m_NoteData, m_pLifeMeterBar, NULL, NULL, NULL, NULL, NULL ); + m_pPlayer->Load( PLAYER_1, &m_NoteData, m_pLifeMeterBar, NULL, NULL, NULL, NULL, NULL, NULL ); m_pPlayer->SetX( PLAYERX ); this->AddChild( m_pPlayer ); } diff --git a/stepmania/src/ScreenSelectStyle.cpp b/stepmania/src/ScreenSelectStyle.cpp index 800524e29a..3fba9539b8 100644 --- a/stepmania/src/ScreenSelectStyle.cpp +++ b/stepmania/src/ScreenSelectStyle.cpp @@ -250,13 +250,21 @@ void ScreenSelectStyle::UpdateSelectableChoices() int iSwitchToStyleIndex = -1; // -1 means none found for( i=0; iSystemMessage( "No Styles are selectable." ); + SCREENMAN->SetNewScreen( THEME->GetMetric("Common","InitialScreen") ); + return; + } + m_iSelection = iSwitchToStyleIndex; AfterChange(); diff --git a/stepmania/src/StepMania.cpp b/stepmania/src/StepMania.cpp index 07ff5f5bbb..da992a2237 100644 --- a/stepmania/src/StepMania.cpp +++ b/stepmania/src/StepMania.cpp @@ -1018,6 +1018,7 @@ bool HandleGlobalInputs( DeviceInput DeviceI, InputEventType type, GameInput Gam { THEME->ReloadMetrics(); TEXTUREMAN->ReloadAll(); + SCREENMAN->SystemMessage( "Reloaded metrics and textures" ); return true; } #ifndef DARWIN @@ -1071,7 +1072,7 @@ bool HandleGlobalInputs( DeviceInput DeviceI, InputEventType type, GameInput Gam break; } DISPLAY->SaveScreenshot( sPath ); - SCREENMAN->SystemMessage( "Saved screenshot: " + sPath ); + SOUND->PlayOnce( THEME->GetPathToS("ScreenEdit save") ); // FIXME return true; }