diff --git a/stepmania/Themes/default/metrics.ini b/stepmania/Themes/default/metrics.ini index 6b33a3d44c..7a67e95447 100644 --- a/stepmania/Themes/default/metrics.ini +++ b/stepmania/Themes/default/metrics.ini @@ -193,6 +193,7 @@ NextScreen=ScreenInstructions [ScreenInstructions] NextScreenArcade=ScreenSelectMusic NextScreenOni=ScreenSelectCourse +NextScreenBattle=ScreenSelectMusic HelpText=Press START to continue TimerSeconds=15 @@ -998,4 +999,12 @@ DifficultyZoom=0.7 ModifiersX=128 ModifiersY=10 ModifiersZoom=0.5 -ModifiersHorizAlign=2 \ No newline at end of file +ModifiersHorizAlign=2 + +[Inventory] +NumItemTypes=2 +ItemDurationSeconds=10 +Item1Combo=50 +Item1Effect=boost +Item2Combo=100 +Item2Effect=expand diff --git a/stepmania/src/Banner.cpp b/stepmania/src/Banner.cpp index 339e350947..23e5667eb8 100644 --- a/stepmania/src/Banner.cpp +++ b/stepmania/src/Banner.cpp @@ -80,7 +80,7 @@ void Banner::LoadFromGroup( CString sGroupName ) { CString sGroupBannerPath = SONGMAN->GetGroupBannerPath( sGroupName ); - if( sGroupName == "ALL MUSIC" ) + if( sGroupName == GROUP_ALL_MUSIC ) Load( THEME->GetPathTo("Graphics","all music banner") ); else if( sGroupBannerPath != "" ) Load( sGroupBannerPath ); diff --git a/stepmania/src/Combo.cpp b/stepmania/src/Combo.cpp index dbd677feb3..2b2a6bdb39 100644 --- a/stepmania/src/Combo.cpp +++ b/stepmania/src/Combo.cpp @@ -162,6 +162,8 @@ void Combo::SetScore( TapNoteScore score, int iNumNotesInThisRow ) if( m_iCurCombo > 50 ) SCREENMAN->SendMessageToTopScreen( SM_ComboStopped, 0 ); + GAMESTATE->m_Inventory[m_PlayerNumber].OnComboBroken( m_iCurCombo ); + m_iCurCombo = 0; m_textComboNumber.SetDiffuse( RageColor(1,1,1,0) ); // invisible diff --git a/stepmania/src/Combo.h b/stepmania/src/Combo.h index 68c062d78d..0ae328591f 100644 --- a/stepmania/src/Combo.h +++ b/stepmania/src/Combo.h @@ -23,6 +23,8 @@ class Combo : public ActorFrame public: Combo(); + void Init( PlayerNumber pn ) { m_PlayerNumber = pn; } + void SetScore( TapNoteScore score, int iNumNotesInThisRow ); int GetCurrentCombo() const { return m_iCurCombo; } @@ -30,6 +32,8 @@ public: void Reset(); protected: + PlayerNumber m_PlayerNumber; + int m_iCurCombo; int m_iMaxCombo; int m_iCurComboOfPerfects; diff --git a/stepmania/src/GameConstantsAndTypes.h b/stepmania/src/GameConstantsAndTypes.h index 624a9f9bd4..4c5e5cc619 100644 --- a/stepmania/src/GameConstantsAndTypes.h +++ b/stepmania/src/GameConstantsAndTypes.h @@ -211,4 +211,11 @@ RankingCategory AverageMeterToRankingCategory( float fAverageMeter ); const int NUM_RANKING_LINES = 5; const int MAX_RANKING_NAME_LENGTH = 4; + +// +// Group stuff +// +const CString GROUP_ALL_MUSIC = ""; + + #endif diff --git a/stepmania/src/GameState.cpp b/stepmania/src/GameState.cpp index f5c5074860..1d4b21b3dc 100644 --- a/stepmania/src/GameState.cpp +++ b/stepmania/src/GameState.cpp @@ -67,7 +67,7 @@ void GameState::Reset() m_bSideIsJoined[p] = false; // m_iCoins = 0; // don't reset coin count! m_MasterPlayerNumber = PLAYER_INVALID; - m_sPreferredGroup = ""; + m_sPreferredGroup = GROUP_ALL_MUSIC; for( p=0; pGetMetricF("Inventory","NumItemTypes") +#define ITEM_DURATION_SECONDS THEME->GetMetricF("Inventory","ItemDuration") +#define ITEM_COMBO( i ) THEME->GetMetricI("Inventory",ssprintf("Item%dCombo",i+1)) +#define ITEM_EFFECT( i ) THEME->GetMetric ("Inventory",ssprintf("Item%dEffect",i+1)) + + +bool ItemDef::operator<( const ItemDef& other ) +{ + return comboLevel < other.comboLevel; +} + +void ItemDef::Sort( vector& items ) +{ + sort( items.begin(), items.end() ); +} + + +Inventory::Inventory() +{ + Reset(); +} + +void Inventory::Reset() +{ + for( int i=0; i iCombo ) + break; + + item--; // back up because we went one too far + + if( item == -1 ) // no item acquired + return; + else + { + // give them an item + + // search for the first open slot + int iOpenSlot = -1; + + if( m_iItems[NUM_ITEM_SLOTS/2] == ITEM_NONE ) + iOpenSlot = NUM_ITEM_SLOTS/2; + else + { + for( int s=0; sm_PlayerOptions[pnToAttack].FromString( def.effect ); + + // remove the item + m_iItems[iSlot] = ITEM_NONE; +} + diff --git a/stepmania/src/Inventory.h b/stepmania/src/Inventory.h new file mode 100644 index 0000000000..a6e3424973 --- /dev/null +++ b/stepmania/src/Inventory.h @@ -0,0 +1,43 @@ +#ifndef Inventory_H +#define Inventory_H +/* +----------------------------------------------------------------------------- + Class: Inventory + + Desc: This a mark the player receives after clearing a song. + + Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved. + Chris Danford +----------------------------------------------------------------------------- +*/ + +#include "GameConstantsAndTypes.h" + +const int ITEM_NONE = -1; +const int NUM_ITEM_SLOTS = 3; +const int MAX_ITEM_TYPES = 20; + +struct ItemDef +{ + int comboLevel; + CString effect; + + bool operator<( const ItemDef& other ); + void Sort( vector& items ); +}; + +class Inventory +{ +public: + Inventory(); + void Reset(); + void RefreshPossibleItems(); + + void OnComboBroken( int iCombo ); + void UseItem( PlayerNumber pn, int iSlot ); + + vector m_ItemDefs; + int m_iItems[NUM_ITEM_SLOTS]; +}; + +#endif diff --git a/stepmania/src/JukeboxMenu.cpp b/stepmania/src/JukeboxMenu.cpp index 0729ded01c..2e32006405 100644 --- a/stepmania/src/JukeboxMenu.cpp +++ b/stepmania/src/JukeboxMenu.cpp @@ -66,7 +66,7 @@ JukeboxMenu::JukeboxMenu() // fill in data structures GAMEMAN->GetStylesForGame( GAMESTATE->m_CurGame, m_Styles ); SONGMAN->GetGroupNames( m_sGroups ); - m_sGroups.insert( m_sGroups.begin(), "All Music" ); + m_sGroups.insert( m_sGroups.begin(), "ALL MUSIC" ); m_sDifficulties.push_back( "all difficulties" ); for( int d=0; dAddChild( &m_ScrollingList ); - if( 0 == stricmp(GAMESTATE->m_sPreferredGroup, "All Music") ) + if( GAMESTATE->m_sPreferredGroup == GROUP_ALL_MUSIC ) SONGMAN->GetSongs( arraySongs, GAMESTATE->GetNumStagesLeft() ); else // Get the Group They Want SONGMAN->GetSongs( arraySongs, GAMESTATE->m_sPreferredGroup, GAMESTATE->GetNumStagesLeft() ); diff --git a/stepmania/src/MusicWheel.cpp b/stepmania/src/MusicWheel.cpp index 7225b54535..cd6f0cdbb3 100644 --- a/stepmania/src/MusicWheel.cpp +++ b/stepmania/src/MusicWheel.cpp @@ -112,7 +112,7 @@ MusicWheel::MusicWheel() if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() ) { // make the preferred group the group of the last song played. - if( GAMESTATE->m_sPreferredGroup == "ALL MUSIC" && !PREFSMAN->m_bPickExtraStage ) + if( GAMESTATE->m_sPreferredGroup==GROUP_ALL_MUSIC && !PREFSMAN->m_bPickExtraStage ) GAMESTATE->m_sPreferredGroup = GAMESTATE->m_pCurSong->m_sGroupName; Song* pSong; @@ -294,12 +294,23 @@ void MusicWheel::BuildWheelItemDatas( vector &arrayWheelItemDatas { unsigned i; - if(so == SongSortOrder(SORT_ROULETTE) && GAMESTATE->m_PlayMode != PLAY_MODE_ARCADE) - return; /* only used in arcade */ + // Roulette is used only in arcade and battle + if( so == SongSortOrder(SORT_ROULETTE) ) + { + switch( GAMESTATE->m_PlayMode ) + { + case PLAY_MODE_ARCADE: + case PLAY_MODE_BATTLE: + break; + default: + return; + } + } switch( GAMESTATE->m_PlayMode ) { case PLAY_MODE_ARCADE: + case PLAY_MODE_BATTLE: { /////////////////////////////////// // Make an array of Song*, then sort them @@ -345,7 +356,7 @@ void MusicWheel::BuildWheelItemDatas( vector &arrayWheelItemDatas { case SORT_MOST_PLAYED: bUseSections = false; break; case SORT_BPM: bUseSections = false; break; - case SORT_GROUP: bUseSections = GAMESTATE->m_sPreferredGroup == "ALL MUSIC"; break; + case SORT_GROUP: bUseSections = GAMESTATE->m_sPreferredGroup == GROUP_ALL_MUSIC; break; case SORT_TITLE: bUseSections = true; break; case SORT_ROULETTE: bUseSections = false; break; default: ASSERT( false ); @@ -370,7 +381,7 @@ void MusicWheel::BuildWheelItemDatas( vector &arrayWheelItemDatas CString sThisSection = GetSectionNameFromSongAndSort( pSong, so ); int iSectionColorIndex = 0; - if( GAMESTATE->m_sPreferredGroup != "ALL MUSIC" && pSong->m_sGroupName != GAMESTATE->m_sPreferredGroup ) + if( GAMESTATE->m_sPreferredGroup != GROUP_ALL_MUSIC && pSong->m_sGroupName != GAMESTATE->m_sPreferredGroup ) continue; if( sThisSection != sLastSection) // new section, make a section item @@ -389,46 +400,44 @@ void MusicWheel::BuildWheelItemDatas( vector &arrayWheelItemDatas for( unsigned i=0; im_sPreferredGroup != "ALL MUSIC" && pSong->m_sGroupName != GAMESTATE->m_sPreferredGroup ) + if( GAMESTATE->m_sPreferredGroup != GROUP_ALL_MUSIC && pSong->m_sGroupName != GAMESTATE->m_sPreferredGroup ) continue; // skip arrayWheelItemDatas.push_back( WheelItemData(TYPE_SONG, pSong, "", NULL, SONGMAN->GetSongColor(pSong)) ); } } - } - - if( so != SORT_ROULETTE ) - { - arrayWheelItemDatas.push_back( WheelItemData(TYPE_ROULETTE, NULL, "", NULL, RageColor(1,0,0,1)) ); - arrayWheelItemDatas.push_back( WheelItemData(TYPE_RANDOM, NULL, "", NULL, RageColor(1,0,0,1)) ); - } - - // HACK: Add extra stage item if it isn't already present on the music wheel - if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() ) - { - Song* pSong; - Notes* pNotes; - PlayerOptions po; - SongOptions so; - SONGMAN->GetExtraStageInfo( GAMESTATE->IsExtraStage2(), GAMESTATE->m_pCurSong->m_sGroupName, GAMESTATE->GetCurrentStyleDef(), pSong, pNotes, po, so ); - - bool bFoundExtraSong = false; - - for( unsigned i=0; iIsExtraStage() || GAMESTATE->IsExtraStage2() ) + { + Song* pSong; + Notes* pNotes; + PlayerOptions po; + SongOptions so; + SONGMAN->GetExtraStageInfo( GAMESTATE->IsExtraStage2(), GAMESTATE->m_pCurSong->m_sGroupName, GAMESTATE->GetCurrentStyleDef(), pSong, pNotes, po, so ); + + bool bFoundExtraSong = false; + for( unsigned i=0; iStopTweening()? -glenn */ m_Judgment.StopTweening(); // m_Combo.Reset(); // don't reset combos between songs in a course! + m_Combo.Init( pn ); m_Judgment.Reset(); if(m_ScoreKeeper) delete m_ScoreKeeper; diff --git a/stepmania/src/ScoreDisplay.h b/stepmania/src/ScoreDisplay.h index 72eb755b52..44d818f0c0 100644 --- a/stepmania/src/ScoreDisplay.h +++ b/stepmania/src/ScoreDisplay.h @@ -11,20 +11,15 @@ ----------------------------------------------------------------------------- */ -#include "Sprite.h" #include "GameConstantsAndTypes.h" #include "ActorFrame.h" -#include "BitmapText.h" -class ScoreDisplay : public BitmapText +class ScoreDisplay : public ActorFrame { public: virtual void Init( PlayerNumber pn ) { m_PlayerNumber = pn; }; - virtual void Update( float fDeltaTime ) = 0; - virtual void Draw() = 0; - - virtual void SetScore( float fNewScore ) = 0; + virtual void SetScore( float fNewScore ) {}; protected: PlayerNumber m_PlayerNumber; // needed to look up statistics in GAMESTATE diff --git a/stepmania/src/ScoreDisplayBattle.cpp b/stepmania/src/ScoreDisplayBattle.cpp new file mode 100644 index 0000000000..50c2bdf75d --- /dev/null +++ b/stepmania/src/ScoreDisplayBattle.cpp @@ -0,0 +1,59 @@ +#include "global.h" +/* +----------------------------------------------------------------------------- + Class: ScoreDisplayBattle.h + + Desc: A graphic displayed in the ScoreDisplayBattle during Dancing. + + Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved. + Chris Danford +----------------------------------------------------------------------------- +*/ + +#include "ScoreDisplayBattle.h" +#include "RageUtil.h" +#include "RageLog.h" +#include "PrefsManager.h" +#include "RageLog.h" +#include "GameState.h" +#include "ThemeManager.h" + + + +ScoreDisplayBattle::ScoreDisplayBattle() +{ + LOG->Trace( "ScoreDisplayBattle::ScoreDisplayBattle()" ); + + for( int i=0; iGetPathTo("Graphics","gameplay battle item frames 3x1") ); + m_sprFrames[i].SetX( fX ); + m_sprFrames[i].StopAnimating(); + m_sprFrames[i].SetState( i ); + this->AddChild( &m_sprFrames[i] ); + + m_sprItems[i].SetX( fX ); + m_sprItems[i].Load( THEME->GetPathTo("Graphics","gameplay battle item icons") ); + m_sprItems[i].StopAnimating(); + this->AddChild( &m_sprItems[i] ); + } +} + +void ScoreDisplayBattle::Update( float fDelta ) +{ + ScoreDisplay::Update( fDelta ); + + for( int i=0; im_Inventory[m_PlayerNumber].m_iItems[i]; + if( item == ITEM_NONE ) + m_sprItems[i].SetDiffuse( RageColor(1,1,1,0) ); + else + { + m_sprItems[i].SetDiffuse( RageColor(1,1,1,1) ); + m_sprItems[i].SetState( item ); + } + } +} diff --git a/stepmania/src/ScoreDisplayBattle.h b/stepmania/src/ScoreDisplayBattle.h new file mode 100644 index 0000000000..d3524c6bf5 --- /dev/null +++ b/stepmania/src/ScoreDisplayBattle.h @@ -0,0 +1,32 @@ +#ifndef ScoreDisplayBattle_H +#define ScoreDisplayBattle_H +/* +----------------------------------------------------------------------------- + Class: ScoreDisplayBattle + + Desc: Shows point score during gameplay and used in some menus. + + Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved. + Chris Danford +----------------------------------------------------------------------------- +*/ + +#include "ScoreDisplay.h" +#include "Sprite.h" +#include "Inventory.h" + + + +class ScoreDisplayBattle : public ScoreDisplay +{ +public: + ScoreDisplayBattle(); + + virtual void Update( float fDelta ); + +protected: + Sprite m_sprFrames[NUM_ITEM_SLOTS]; + Sprite m_sprItems[NUM_ITEM_SLOTS]; +}; + +#endif diff --git a/stepmania/src/ScoreDisplayNormal.cpp b/stepmania/src/ScoreDisplayNormal.cpp index 7bab321b02..e8a072704b 100644 --- a/stepmania/src/ScoreDisplayNormal.cpp +++ b/stepmania/src/ScoreDisplayNormal.cpp @@ -20,6 +20,7 @@ const float SCORE_TWEEN_TIME = 0.2f; +const int NUM_SCORE_DIGITS = 9; ScoreDisplayNormal::ScoreDisplayNormal() @@ -27,8 +28,8 @@ ScoreDisplayNormal::ScoreDisplayNormal() LOG->Trace( "ScoreDisplayNormal::ScoreDisplayNormal()" ); // init the text - BitmapText::LoadFromNumbers( THEME->GetPathTo("Numbers","gameplay score numbers") ); - TurnShadowOff(); + m_text.LoadFromNumbers( THEME->GetPathTo("Numbers","gameplay score numbers") ); + m_text.TurnShadowOff(); m_fScore = 0; m_fTrailingScore = 0; @@ -37,13 +38,14 @@ ScoreDisplayNormal::ScoreDisplayNormal() CString s; for( int i=0; iAddChild( &m_text ); } - -void ScoreDisplayNormal::Init( PlayerNumber pn ) +void ScoreDisplayNormal::Init( PlayerNumber pn ) { - m_PlayerNumber = pn; + ScoreDisplay::Init( pn ); + m_text.SetDiffuse( PlayerToColor(pn) ); } void ScoreDisplayNormal::SetScore( float fNewScore ) @@ -55,9 +57,14 @@ void ScoreDisplayNormal::SetScore( float fNewScore ) m_fScoreVelocity = fDelta / SCORE_TWEEN_TIME; // in score units per second } +void ScoreDisplayNormal::SetText( CString s ) +{ + m_text.SetText( s ); +} + void ScoreDisplayNormal::Update( float fDeltaTime ) { - BitmapText::Update( fDeltaTime ); + ScoreDisplay::Update( fDeltaTime ); if( m_fTrailingScore != m_fScore ) { @@ -71,11 +78,7 @@ void ScoreDisplayNormal::Update( float fDeltaTime ) m_fScoreVelocity = 0; } - SetText( ssprintf("%*.0f", NUM_SCORE_DIGITS, m_fTrailingScore) ); + m_text.SetText( ssprintf("%*.0f", NUM_SCORE_DIGITS, m_fTrailingScore) ); } } -void ScoreDisplayNormal::Draw() -{ - BitmapText::Draw(); -} diff --git a/stepmania/src/ScoreDisplayNormal.h b/stepmania/src/ScoreDisplayNormal.h index c3fc036e4d..d8cbd75c8a 100644 --- a/stepmania/src/ScoreDisplayNormal.h +++ b/stepmania/src/ScoreDisplayNormal.h @@ -12,10 +12,9 @@ */ #include "ScoreDisplay.h" +#include "BitmapText.h" -const int NUM_SCORE_DIGITS = 9; - class ScoreDisplayNormal : public ScoreDisplay { @@ -25,11 +24,13 @@ public: virtual void Init( PlayerNumber pn ); virtual void Update( float fDeltaTime ); - virtual void Draw(); virtual void SetScore( float fNewScore ); + virtual void SetText( CString s ); protected: + BitmapText m_text; + float m_fScore; // the actual score float m_fTrailingScore; // what is displayed temporarily float m_fScoreVelocity; // how fast trailing approaches real score diff --git a/stepmania/src/ScoreDisplayOni.cpp b/stepmania/src/ScoreDisplayOni.cpp index 1864fabcff..a7d42c8c71 100644 --- a/stepmania/src/ScoreDisplayOni.cpp +++ b/stepmania/src/ScoreDisplayOni.cpp @@ -19,42 +19,32 @@ #include "ThemeManager.h" -const float SCORE_TWEEN_TIME = 0.5f; - - ScoreDisplayOni::ScoreDisplayOni() { LOG->Trace( "ScoreDisplayOni::ScoreDisplayOni()" ); // init the text - BitmapText::LoadFromNumbers( THEME->GetPathTo("Numbers","gameplay score numbers") ); - TurnShadowOff(); + m_text.LoadFromNumbers( THEME->GetPathTo("Numbers","gameplay score numbers") ); + m_text.TurnShadowOff(); + this->AddChild( &m_text ); } - -void ScoreDisplayOni::Init( PlayerNumber pn ) +void ScoreDisplayOni::Init( PlayerNumber pn ) { - m_PlayerNumber = pn; + ScoreDisplay::Init( pn ); + m_text.SetDiffuse( PlayerToColor(pn) ); } -void ScoreDisplayOni::SetScore( float fNewScore ) -{ -} -void ScoreDisplayOni::Update( float fDeltaTime ) +void ScoreDisplayOni::Update( float fDelta ) { - BitmapText::Update( fDeltaTime ); -} + ScoreDisplay::Update( fDelta ); -void ScoreDisplayOni::Draw() -{ float fSecsIntoPlay; if( GAMESTATE->IsPlayerEnabled(m_PlayerNumber) ) fSecsIntoPlay = GAMESTATE->m_CurStageStats.fAliveSeconds[m_PlayerNumber]; else fSecsIntoPlay = 0; - SetText( SecondsToTime(fSecsIntoPlay) ); - - BitmapText::Draw(); + m_text.SetText( SecondsToTime(fSecsIntoPlay) ); } diff --git a/stepmania/src/ScoreDisplayOni.h b/stepmania/src/ScoreDisplayOni.h index 28424c22f7..13854aa5ff 100644 --- a/stepmania/src/ScoreDisplayOni.h +++ b/stepmania/src/ScoreDisplayOni.h @@ -11,9 +11,8 @@ ----------------------------------------------------------------------------- */ -#include "song.h" #include "ScoreDisplay.h" - +#include "BitmapText.h" class ScoreDisplayOni : public ScoreDisplay @@ -23,12 +22,10 @@ public: virtual void Init( PlayerNumber pn ); - virtual void Update( float fDeltaTime ); - virtual void Draw(); - - virtual void SetScore( float fNewScore ); + virtual void Update( float fDelta ); protected: + BitmapText m_text; }; #endif diff --git a/stepmania/src/ScreenEdit.cpp b/stepmania/src/ScreenEdit.cpp index 7369710780..7ad9af0c1d 100644 --- a/stepmania/src/ScreenEdit.cpp +++ b/stepmania/src/ScreenEdit.cpp @@ -527,7 +527,7 @@ void ScreenEdit::DrawPrimitives() void ScreenEdit::Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI ) { - LOG->Trace( "ScreenEdit::Input()" ); +// LOG->Trace( "ScreenEdit::Input()" ); switch( m_EditMode ) { @@ -1320,8 +1320,9 @@ void ScreenEdit::HandleAreaMenuChoice( AreaMenuChoice c, int* iAnswers ) GAMESTATE->m_fSongBeat = m_NoteFieldEdit.m_fBeginMarker - 4; // give a 1 measure lead-in float fStartSeconds = m_pSong->GetElapsedTimeFromBeat(GAMESTATE->m_fSongBeat) ; - m_soundMusic.SetPositionSeconds( fStartSeconds ); + LOG->Trace( "Starting playback at %f", fStartSeconds ); m_soundMusic.SetPlaybackRate( GAMESTATE->m_SongOptions.m_fMusicRate ); + m_soundMusic.SetPositionSeconds( fStartSeconds ); m_soundMusic.StartPlaying(); } break; @@ -1342,9 +1343,10 @@ void ScreenEdit::HandleAreaMenuChoice( AreaMenuChoice c, int* iAnswers ) m_rectRecordBack.SetTweenDiffuse( RageColor(0,0,0,0.8f) ); GAMESTATE->m_fSongBeat = m_NoteFieldEdit.m_fBeginMarker - 4; // give a 1 measure lead-in - float fStartSeconds = m_pSong->GetElapsedTimeFromBeat(GAMESTATE->m_fSongBeat) ; - m_soundMusic.SetPositionSeconds( fStartSeconds ); + float fStartSeconds = m_pSong->GetElapsedTimeFromBeat(GAMESTATE->m_fSongBeat); + LOG->Trace( "Starting playback at %f", fStartSeconds ); m_soundMusic.SetPlaybackRate( GAMESTATE->m_SongOptions.m_fMusicRate ); + m_soundMusic.SetPositionSeconds( fStartSeconds ); m_soundMusic.StartPlaying(); } break; diff --git a/stepmania/src/ScreenEvaluation.cpp b/stepmania/src/ScreenEvaluation.cpp index 3f26146de8..b3dfbaa4d0 100644 --- a/stepmania/src/ScreenEvaluation.cpp +++ b/stepmania/src/ScreenEvaluation.cpp @@ -122,6 +122,7 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary ) switch( GAMESTATE->m_PlayMode ) { case PLAY_MODE_ARCADE: + case PLAY_MODE_BATTLE: m_ResultMode = bSummary ? RM_ARCADE_SUMMARY : RM_ARCADE_STAGE; break; case PLAY_MODE_NONSTOP: @@ -219,10 +220,9 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary ) if( !GAMESTATE->IsPlayerEnabled( (PlayerNumber)p ) ) // If EZ2 wants to hide this graphic, place it somewhere off screen using theme metrics continue; // skip - m_ScoreDisplay[p].LoadFromNumbers( THEME->GetPathTo("Numbers","evaluation score numbers") ); m_ScoreDisplay[p].SetXY( SCORE_NUMBERS_X(p), SCORE_Y ); + m_ScoreDisplay[p].Init( (PlayerNumber)p ); m_ScoreDisplay[p].SetZoomY( 1.0 ); - m_ScoreDisplay[p].SetDiffuse( PlayerToColor(p) ); this->AddChild( &m_ScoreDisplay[p] ); } diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index f0f0f2b479..a11ab524db 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -24,6 +24,7 @@ #include "GameState.h" #include "ScoreDisplayNormal.h" #include "ScoreDisplayOni.h" +#include "ScoreDisplayBattle.h" #include "ScreenPrompt.h" #include "GrooveRadar.h" #include "NotesLoaderSM.h" @@ -127,6 +128,7 @@ ScreenGameplay::ScreenGameplay( bool bDemonstration ) switch( GAMESTATE->m_PlayMode ) { case PLAY_MODE_ARCADE: + case PLAY_MODE_BATTLE: { GAMESTATE->m_CurStageStats.pSong = GAMESTATE->m_pCurSong; for( int p=0; pm_PlayMode ) { case PLAY_MODE_ARCADE: + case PLAY_MODE_BATTLE: this->AddChild( &m_textStageNumber ); break; case PLAY_MODE_NONSTOP: @@ -320,14 +323,18 @@ ScreenGameplay::ScreenGameplay( bool bDemonstration ) case PLAY_MODE_ENDLESS: m_pScoreDisplay[p] = new ScoreDisplayOni; break; + case PLAY_MODE_BATTLE: + m_pScoreDisplay[p] = new ScoreDisplayBattle; + break; default: ASSERT(0); } + GAMESTATE->m_Inventory[p].RefreshPossibleItems(); + m_pScoreDisplay[p]->Init( (PlayerNumber)p ); m_pScoreDisplay[p]->SetXY( SCORE_X(p), SCORE_Y(p,bExtra) ); m_pScoreDisplay[p]->SetZoom( SCORE_ZOOM ); - m_pScoreDisplay[p]->SetDiffuse( PlayerToColor(p) ); this->AddChild( m_pScoreDisplay[p] ); m_textPlayerOptions[p].LoadFromFont( THEME->GetPathTo("Fonts","normal") ); @@ -492,6 +499,7 @@ bool ScreenGameplay::IsLastSong() switch( GAMESTATE->m_PlayMode ) { case PLAY_MODE_ARCADE: + case PLAY_MODE_BATTLE: return true; case PLAY_MODE_NONSTOP: case PLAY_MODE_ONI: @@ -521,6 +529,7 @@ void ScreenGameplay::LoadNextSong() switch( GAMESTATE->m_PlayMode ) { case PLAY_MODE_ARCADE: + case PLAY_MODE_BATTLE: break; case PLAY_MODE_NONSTOP: case PLAY_MODE_ONI: @@ -807,6 +816,7 @@ void ScreenGameplay::Update( float fDeltaTime ) switch( GAMESTATE->m_PlayMode ) { case PLAY_MODE_ARCADE: + case PLAY_MODE_BATTLE: if( OneIsHot() ) m_announcerHot.PlayRandom(); else if( AllAreInDanger() ) m_announcerDanger.PlayRandom(); else m_announcerGood.PlayRandom(); @@ -995,13 +1005,31 @@ void ScreenGameplay::Input( const DeviceInput& DeviceI, const InputEventType typ } // - // handle a step + // handle a step or battle item activate // if( type==IET_FIRST_PRESS && !PREFSMAN->m_bAutoPlay && StyleI.IsValid() && GAMESTATE->IsPlayerEnabled( StyleI.player ) ) m_Player[StyleI.player].Step( StyleI.col ); + else if( type==IET_FIRST_PRESS && + !PREFSMAN->m_bAutoPlay && + MenuI.IsValid() && + GAMESTATE->IsPlayerEnabled( MenuI.player ) ) + { + int iItemSlot; + switch( MenuI.button ) + { + case MENU_BUTTON_LEFT: iItemSlot = 0; break; + case MENU_BUTTON_START: iItemSlot = 1; break; + case MENU_BUTTON_RIGHT: iItemSlot = 2; break; + default: iItemSlot = -1; break; + } + + if( iItemSlot != -1 ) + GAMESTATE->m_Inventory[MenuI.player].UseItem( MenuI.player, iItemSlot ); + } + } void ScreenGameplay::PositionStatusIcons() @@ -1045,6 +1073,7 @@ void SaveChanges() switch( GAMESTATE->m_PlayMode ) { case PLAY_MODE_ARCADE: + case PLAY_MODE_BATTLE: GAMESTATE->m_pCurSong->Save(); break; case PLAY_MODE_NONSTOP: @@ -1067,6 +1096,7 @@ void DontSaveChanges() switch( GAMESTATE->m_PlayMode ) { case PLAY_MODE_ARCADE: + case PLAY_MODE_BATTLE: ld.LoadFromSMFile(GAMESTATE->m_pCurSong->GetCacheFilePath(), *GAMESTATE->m_pCurSong); break; @@ -1075,10 +1105,10 @@ void DontSaveChanges() case PLAY_MODE_ENDLESS: { // FIXME -// for( int i=0; im_pCurCourse->GetNumStages(); i++ ) +// for( unsigned i=0; im_pCurCourse->GetSong(i); -// ld.LoadFromSMFile( GAMESTATE->m_pCurSong->GetCacheFilePath(), *pSong ); +// Song* pSong = m_apCourseSongs[i]; +// ld.LoadFromSMFile( pSong->GetCacheFilePath(), *pSong ); // } } break; @@ -1093,6 +1123,7 @@ void ShowSavePrompt( ScreenMessage SM_SendWhenDone ) switch( GAMESTATE->m_PlayMode ) { case PLAY_MODE_ARCADE: + case PLAY_MODE_BATTLE: sMessage = ssprintf( "You have changed the offset or BPM of\n" "%s.\n" @@ -1436,6 +1467,7 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM ) switch( GAMESTATE->m_PlayMode ) { case PLAY_MODE_ARCADE: + case PLAY_MODE_BATTLE: // SCREENMAN->SetNewScreen( "ScreenSelectMusic" ); SCREENMAN->SetNewScreen( SONGSEL_SCREEN ); break; diff --git a/stepmania/src/ScreenInstructions.cpp b/stepmania/src/ScreenInstructions.cpp index e0763eadca..d012d05910 100644 --- a/stepmania/src/ScreenInstructions.cpp +++ b/stepmania/src/ScreenInstructions.cpp @@ -26,7 +26,7 @@ #define TIMER_SECONDS THEME->GetMetricI("ScreenInstructions","TimerSeconds") #define NEXT_SCREEN_ARCADE THEME->GetMetric("ScreenInstructions","NextScreenArcade") #define NEXT_SCREEN_ONI THEME->GetMetric("ScreenInstructions","NextScreenOni") - +#define NEXT_SCREEN_BATTLE THEME->GetMetric("ScreenInstructions","NextScreenBattle") ScreenInstructions::ScreenInstructions() @@ -52,18 +52,22 @@ ScreenInstructions::ScreenInstructions() // // Skip this screen unless someone chose easy or beginner // - Difficulty easiestDifficulty = DIFFICULTY_HARD; - for( int p=0; pm_PlayMode == PLAY_MODE_ARCADE ) { - if( !GAMESTATE->IsPlayerEnabled(p) ) - continue; - easiestDifficulty = min( easiestDifficulty, GAMESTATE->m_PreferredDifficulty[p] ); - } - if( easiestDifficulty > DIFFICULTY_EASY ) - { - this->SendScreenMessage( SM_GoToNextScreen, 0 ); - m_Menu.ImmedOffScreenToMenu(); - return; + Difficulty easiestDifficulty = (Difficulty)(NUM_DIFFICULTIES-1); + for( int p=0; pIsPlayerEnabled(p) ) + continue; + easiestDifficulty = min( easiestDifficulty, GAMESTATE->m_PreferredDifficulty[p] ); + } + if( easiestDifficulty > DIFFICULTY_EASY ) + { + // skip this screen + this->SendScreenMessage( SM_GoToNextScreen, 0 ); + m_Menu.ImmedOffScreenToMenu(); + return; + } } @@ -84,6 +88,9 @@ ScreenInstructions::ScreenInstructions() case PLAY_MODE_ENDLESS: sHowToPlayPath = THEME->GetPathTo("Graphics","instructions endless"); break; + case PLAY_MODE_BATTLE: + sHowToPlayPath = THEME->GetPathTo("Graphics","instructions battle"); + break; default: ASSERT(0); } @@ -149,6 +156,9 @@ void ScreenInstructions::HandleScreenMessage( const ScreenMessage SM ) case PLAY_MODE_ENDLESS: SCREENMAN->SetNewScreen( NEXT_SCREEN_ONI ); break; + case PLAY_MODE_BATTLE: + SCREENMAN->SetNewScreen( NEXT_SCREEN_BATTLE ); + break; default: ASSERT(0); } diff --git a/stepmania/src/ScreenJukebox.cpp b/stepmania/src/ScreenJukebox.cpp index ec30cf8094..ae70f9605a 100644 --- a/stepmania/src/ScreenJukebox.cpp +++ b/stepmania/src/ScreenJukebox.cpp @@ -30,7 +30,7 @@ bool PrepareForJukebox() // always return true. GAMESTATE->m_PlayMode = PLAY_MODE_ARCADE; vector vSongs; - if( GAMESTATE->m_sPreferredGroup.CompareNoCase("all music") == 0 ) + if( GAMESTATE->m_sPreferredGroup == GROUP_ALL_MUSIC ) SONGMAN->GetSongs( vSongs ); else SONGMAN->GetSongs( vSongs, GAMESTATE->m_sPreferredGroup ); diff --git a/stepmania/src/ScreenJukeboxMenu.cpp b/stepmania/src/ScreenJukeboxMenu.cpp index 1ceb49d6a3..9dc609d95c 100644 --- a/stepmania/src/ScreenJukeboxMenu.cpp +++ b/stepmania/src/ScreenJukeboxMenu.cpp @@ -130,7 +130,7 @@ void ScreenJukeboxMenu::MenuStart( PlayerNumber pn ) bool bModifiers = m_Selector.GetSelectedModifiers(); GAMESTATE->m_CurStyle = style; - GAMESTATE->m_sPreferredGroup = sGroup; + GAMESTATE->m_sPreferredGroup = (sGroup=="ALL MUSIC") ? GROUP_ALL_MUSIC : sGroup; for( int p=0; pm_PreferredDifficulty[p] = dc; GAMESTATE->m_bJukeboxUsesModifiers = bModifiers; diff --git a/stepmania/src/ScreenNameEntry.cpp b/stepmania/src/ScreenNameEntry.cpp index 52571cd8e1..694a1f77fc 100644 --- a/stepmania/src/ScreenNameEntry.cpp +++ b/stepmania/src/ScreenNameEntry.cpp @@ -193,6 +193,7 @@ ScreenNameEntry::ScreenNameEntry() switch( GAMESTATE->m_PlayMode ) { case PLAY_MODE_ARCADE: + case PLAY_MODE_BATTLE: { StageStats SS; vector vSongs; @@ -382,6 +383,7 @@ void ScreenNameEntry::MenuStart( PlayerNumber pn ) switch( GAMESTATE->m_PlayMode ) { case PLAY_MODE_ARCADE: + case PLAY_MODE_BATTLE: SONGMAN->m_MachineScores[GAMESTATE->m_RankingNotesType][GAMESTATE->m_RankingCategory[pn]][GAMESTATE->m_iRankingIndex[pn]].sName = m_sSelectedName[pn]; break; case PLAY_MODE_NONSTOP: diff --git a/stepmania/src/ScreenSelectDifficulty.cpp b/stepmania/src/ScreenSelectDifficulty.cpp index 012aaf153f..1928e5ce68 100644 --- a/stepmania/src/ScreenSelectDifficulty.cpp +++ b/stepmania/src/ScreenSelectDifficulty.cpp @@ -141,7 +141,7 @@ ScreenSelectDifficulty::ScreenSelectDifficulty() } - m_iCurrentPage = PAGE_1; + m_CurrentPage = PAGE_1; for( int p=0; pIsPlayerEnabled(p) ) + continue; // skip + const ModeChoice& mc = m_ModeChoices[m_CurrentPage][m_iChoiceOnPage[p]]; GAMESTATE->m_PlayMode = mc.pm; GAMESTATE->m_PreferredDifficulty[p] = mc.dc; } @@ -271,8 +273,8 @@ void ScreenSelectDifficulty::MenuLeft( PlayerNumber pn ) return; if( m_iChoiceOnPage[pn] == 0 ) // can't go left any more { - if( m_iCurrentPage > 0 ) - ChangePage( m_iCurrentPage-1 ); + if( m_CurrentPage > 0 ) + ChangePage( (Page)(m_CurrentPage-1) ); } else ChangeWithinPage( pn, m_iChoiceOnPage[pn]-1, false ); @@ -283,16 +285,16 @@ void ScreenSelectDifficulty::MenuRight( PlayerNumber pn ) { if( m_bChosen[pn] ) return; - if( m_iChoiceOnPage[pn] == (int)m_ModeChoices[m_iCurrentPage].size()-1 ) // can't go left any more + if( m_iChoiceOnPage[pn] == (int)m_ModeChoices[m_CurrentPage].size()-1 ) // can't go left any more { - if( m_iCurrentPage < NUM_PAGES-1 ) - ChangePage( m_iCurrentPage+1 ); + if( m_CurrentPage < NUM_PAGES-1 ) + ChangePage( (Page)(m_CurrentPage+1) ); } else ChangeWithinPage( pn, m_iChoiceOnPage[pn]+1, false ); } -void ScreenSelectDifficulty::ChangePage( int iNewPage ) +void ScreenSelectDifficulty::ChangePage( Page newPage ) { int p; @@ -301,42 +303,51 @@ void ScreenSelectDifficulty::ChangePage( int iNewPage ) if( GAMESTATE->IsPlayerEnabled(p) && m_bChosen[p] ) return; - bool bPageIncreasing = iNewPage > m_iCurrentPage; - m_iCurrentPage = iNewPage; + bool bPageIncreasing = newPage > m_CurrentPage; + m_CurrentPage = newPage; - if( iNewPage == PAGE_2 ) + if( newPage == PAGE_2 ) { m_soundDifficult.Stop(); m_soundDifficult.PlayRandom(); } // change both players - int iNewChoice = bPageIncreasing ? 0 : m_ModeChoices[m_iCurrentPage].size()-1; + int iNewChoice = bPageIncreasing ? 0 : m_ModeChoices[m_CurrentPage].size()-1; for( p=0; pIsPlayerEnabled(p) ) + continue; // skip - float fCursorX = CURSOR_X(m_iCurrentPage,m_iChoiceOnPage[pn],pn); - float fCursorY = CURSOR_Y(m_iCurrentPage,m_iChoiceOnPage[pn],pn); + if( p!=pn && m_CurrentPage==PAGE_1 ) + continue; // skip - m_sprCursor[pn].StopTweening(); - m_sprCursor[pn].BeginTweening( 0.2f, bChangingPages ? TWEEN_LINEAR : TWEEN_BIAS_BEGIN ); - m_sprCursor[pn].SetTweenX( fCursorX - CURSOR_SHADOW_LENGTH_X ); - m_sprCursor[pn].SetTweenY( fCursorY - CURSOR_SHADOW_LENGTH_Y ); + m_iChoiceOnPage[p] = iNewChoice; - m_sprJoinMessagehadow[pn].StopTweening(); - m_sprJoinMessagehadow[pn].BeginTweening( 0.2f, bChangingPages ? TWEEN_LINEAR : TWEEN_BIAS_BEGIN ); - m_sprJoinMessagehadow[pn].SetTweenX( fCursorX ); - m_sprJoinMessagehadow[pn].SetTweenY( fCursorY ); + float fCursorX = CURSOR_X(m_CurrentPage,m_iChoiceOnPage[p],p); + float fCursorY = CURSOR_Y(m_CurrentPage,m_iChoiceOnPage[p],p); + + m_sprCursor[p].StopTweening(); + m_sprCursor[p].BeginTweening( 0.2f, bChangingPages ? TWEEN_LINEAR : TWEEN_BIAS_BEGIN ); + m_sprCursor[p].SetTweenX( fCursorX - CURSOR_SHADOW_LENGTH_X ); + m_sprCursor[p].SetTweenY( fCursorY - CURSOR_SHADOW_LENGTH_Y ); + + m_sprJoinMessagehadow[p].StopTweening(); + m_sprJoinMessagehadow[p].BeginTweening( 0.2f, bChangingPages ? TWEEN_LINEAR : TWEEN_BIAS_BEGIN ); + m_sprJoinMessagehadow[p].SetTweenX( fCursorX ); + m_sprJoinMessagehadow[p].SetTweenY( fCursorY ); + } m_soundChange.Play(); } @@ -350,12 +361,12 @@ void ScreenSelectDifficulty::MenuStart( PlayerNumber pn ) for( unsigned page=0; pagePlayOnceFromDir( ANNOUNCER->GetPathTo(ssprintf("select difficulty comment %s",mc.name)) ); /* XXX: This will play the same announcer twice at the same time; that'll probably * result in an echo effect. */ - if( m_iCurrentPage == PAGE_2 ) + if( m_CurrentPage == PAGE_2 ) { // choose this for all the other players too for( int p=0; pStopTweening(); - const int page = m_iCurrentPage; + const int page = m_CurrentPage; m_sprExplanation[page].SetXY( EXPLANATION_X(page), EXPLANATION_Y(page) ); m_sprExplanation[page].BeginTweening( 0.5, Actor::TWEEN_BOUNCE_BEGIN ); @@ -467,8 +478,8 @@ void ScreenSelectDifficulty::TweenOnScreen() if( !GAMESTATE->IsPlayerEnabled((PlayerNumber)p) ) continue; - float fCursorX = CURSOR_X(m_iCurrentPage,m_iChoiceOnPage[p],p); - float fCursorY = CURSOR_Y(m_iCurrentPage,m_iChoiceOnPage[p],p); + float fCursorX = CURSOR_X(m_CurrentPage,m_iChoiceOnPage[p],p); + float fCursorY = CURSOR_Y(m_CurrentPage,m_iChoiceOnPage[p],p); m_sprCursor[p].SetXY( fCursorX, fCursorY ); @@ -482,8 +493,8 @@ void ScreenSelectDifficulty::TweenOnScreen() } { - const int p = m_iCurrentPage; - for( unsigned c=0; c m_ModeChoices[NUM_PAGES]; - int m_iCurrentPage; + Page m_CurrentPage; int m_iChoiceOnPage[NUM_PLAYERS]; bool m_bChosen[NUM_PLAYERS]; diff --git a/stepmania/src/ScreenSelectGroup.cpp b/stepmania/src/ScreenSelectGroup.cpp index 3f801f06ef..481326ed47 100644 --- a/stepmania/src/ScreenSelectGroup.cpp +++ b/stepmania/src/ScreenSelectGroup.cpp @@ -59,7 +59,7 @@ ScreenSelectGroup::ScreenSelectGroup() if(!PREFSMAN->m_bShowSelectGroup) { - GAMESTATE->m_sPreferredGroup = "ALL MUSIC"; + GAMESTATE->m_sPreferredGroup = GROUP_ALL_MUSIC; m_Menu.ImmedOffScreenToMenu(); m_bChosen = true; this->SendScreenMessage( SM_GoToNextScreen, 0.f ); @@ -105,7 +105,7 @@ ScreenSelectGroup::ScreenSelectGroup() // copy group names into a vector std::vector asGroupNames; - asGroupNames.push_back( "ALL MUSIC" ); // "ALL MUSIC" is a special group + asGroupNames.push_back( "ALL MUSIC" ); // special group for( std::map::const_iterator iter = mapGroupNames.begin(); iter != mapGroupNames.end(); ++iter ) asGroupNames.push_back( iter->first ); @@ -227,7 +227,7 @@ void ScreenSelectGroup::AfterChange() CString sSelectedGroupName = m_GroupList.GetSelectionName(); CString sGroupBannerPath; - if( 0 == stricmp(sSelectedGroupName, "ALL MUSIC") ) + if( sSelectedGroupName == GROUP_ALL_MUSIC ) sGroupBannerPath = THEME->GetPathTo("Graphics","all music banner"); else if( SONGMAN->GetGroupBannerPath(sSelectedGroupName) != "" ) sGroupBannerPath = SONGMAN->GetGroupBannerPath(sSelectedGroupName); @@ -282,9 +282,9 @@ void ScreenSelectGroup::MenuStart( PlayerNumber pn ) m_bChosen = true; GAMESTATE->m_pCurSong = NULL; - GAMESTATE->m_sPreferredGroup = m_GroupList.GetSelectionName(); + GAMESTATE->m_sPreferredGroup = (m_GroupList.GetSelectionName()=="ALL MUSIC" ? GROUP_ALL_MUSIC : m_GroupList.GetSelectionName() ); - if( 0 == stricmp(GAMESTATE->m_sPreferredGroup, "All Music") ) + if( GAMESTATE->m_sPreferredGroup == GROUP_ALL_MUSIC ) SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("select group comment all music") ); else SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("select group comment general") ); diff --git a/stepmania/src/ScreenSelectMusic.cpp b/stepmania/src/ScreenSelectMusic.cpp index f22e8e6f1b..1808327b0d 100644 --- a/stepmania/src/ScreenSelectMusic.cpp +++ b/stepmania/src/ScreenSelectMusic.cpp @@ -206,7 +206,6 @@ ScreenSelectMusic::ScreenSelectMusic() m_sprMarathonBalloon.Load( THEME->GetPathTo("Graphics","select music marathon balloon") ); m_sprMarathonBalloon.StopAnimating(); m_sprMarathonBalloon.SetXY( BALLOON_X, BALLOON_Y ); - m_sprMarathonBalloon.SetZoom( 1 ); m_sprMarathonBalloon.SetZoomY( 0 ); m_sprMarathonBalloon.SetDiffuse( RageColor(1,1,1,1) ); m_sprMarathonBalloon.SetEffectBobbing( RageVector3(0,10,0), 2 ); @@ -215,7 +214,6 @@ ScreenSelectMusic::ScreenSelectMusic() m_sprLongBalloon.Load( THEME->GetPathTo("Graphics","select music long balloon") ); m_sprLongBalloon.StopAnimating(); m_sprLongBalloon.SetXY( BALLOON_X, BALLOON_Y ); - m_sprLongBalloon.SetZoom( 1 ); m_sprLongBalloon.SetZoomY( 0 ); m_sprLongBalloon.SetDiffuse( RageColor(1,1,1,1) ); m_sprLongBalloon.SetEffectBobbing( RageVector3(0,10,0), 2 ); @@ -309,11 +307,11 @@ void ScreenSelectMusic::TweenOnScreen() void ScreenSelectMusic::TweenOffScreen() { - m_sprBannerFrame.FadeOff( 0, "bounce left", TWEEN_TIME*2 ); - m_Banner.FadeOff( 0, "bounce left", TWEEN_TIME*2 ); - m_BPMDisplay.FadeOff( 0, "bounce left", TWEEN_TIME*2 ); - m_StageDisplay.FadeOff( 0, "bounce left", TWEEN_TIME*2 ); - m_sprCDTitle.FadeOff( 0, "bounce left", TWEEN_TIME*2 ); + m_sprBannerFrame.FadeOff( 0, "bounce left", TWEEN_TIME ); + m_Banner.FadeOff( 0, "bounce left", TWEEN_TIME ); + m_BPMDisplay.FadeOff( 0, "bounce left", TWEEN_TIME ); + m_StageDisplay.FadeOff( 0, "bounce left", TWEEN_TIME ); + m_sprCDTitle.FadeOff( 0, "bounce left", TWEEN_TIME ); int p; for( p=0; pTrace( "ScreenSelectMusic::Input()" ); +// LOG->Trace( "ScreenSelectMusic::Input()" ); if( DeviceI.device == DEVICE_KEYBOARD && DeviceI.button == SDLK_F9 ) { diff --git a/stepmania/src/SongManager.cpp b/stepmania/src/SongManager.cpp index 4c17eed93c..792ec2600c 100644 --- a/stepmania/src/SongManager.cpp +++ b/stepmania/src/SongManager.cpp @@ -790,7 +790,7 @@ bool CompareNotesPointersForExtra(const Notes *n1, const Notes *n2) void SongManager::GetExtraStageInfo( bool bExtra2, CString sPreferredGroup, const StyleDef *sd, Song*& pSongOut, Notes*& pNotesOut, PlayerOptions& po_out, SongOptions& so_out ) { - if(GetExtraStageInfoFromCourse(bExtra2, (GAMESTATE->m_sPreferredGroup == "ALL MUSIC" ? GAMESTATE->m_pCurSong->m_sGroupName : GAMESTATE->m_sPreferredGroup), pSongOut, pNotesOut, po_out, so_out)) + if(GetExtraStageInfoFromCourse(bExtra2, (GAMESTATE->m_sPreferredGroup == GROUP_ALL_MUSIC ? GAMESTATE->m_pCurSong->m_sGroupName : GAMESTATE->m_sPreferredGroup), pSongOut, pNotesOut, po_out, so_out)) return; // Choose a hard song for the extra stage @@ -800,7 +800,7 @@ void SongManager::GetExtraStageInfo( bool bExtra2, CString sPreferredGroup, cons Notes* pExtra2Notes = NULL; vector apSongs; - CString sGroup = GAMESTATE->m_sPreferredGroup=="ALL MUSIC" ? GAMESTATE->m_pCurSong->m_sGroupName : GAMESTATE->m_sPreferredGroup; + CString sGroup = GAMESTATE->m_sPreferredGroup==GROUP_ALL_MUSIC ? GAMESTATE->m_pCurSong->m_sGroupName : GAMESTATE->m_sPreferredGroup; SONGMAN->GetSongs( apSongs, sGroup ); for( unsigned s=0; s + + + + @@ -625,12 +631,6 @@ cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ - - - - @@ -1314,12 +1314,24 @@ cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ + + + + + + + + diff --git a/stepmania/stepmania.nsi b/stepmania/stepmania.nsi index b694844e1b..42ab35bc55 100644 --- a/stepmania/stepmania.nsi +++ b/stepmania/stepmania.nsi @@ -19,7 +19,7 @@ !define PRODUCT_NAME_VER "${PRODUCT_NAME} ${VERSION}" Name "${PRODUCT_NAME}" -OutFile "StepMania-CVS-20030220.exe" +OutFile "StepMania-CVS-20030223.exe" ;OutFile "StepMania301.exe" ; Some default compiler settings (uncomment and change at will):