diff --git a/stepmania/TODO.andy b/stepmania/TODO.andy index 86a08ff7d1..a2b19b7be2 100644 --- a/stepmania/TODO.andy +++ b/stepmania/TODO.andy @@ -3,13 +3,24 @@ X denotes task complete or no longer required to do. - denotes task to do, but also being worked upon by other dev. H denotes task on hold. +TODO As of: 04:46:PM 27/11/02 +* Systems Programming Assignment +* Integrating Assignment 2 +* Add Scoreboard Initials Entry Frontend + +TODO As of: 01:30:PM 13/11/02 +* Work on 3DDX Support +* Software Engineering Assignment +X Operating Systems Assignment +* Object Oriented Design Assignment + TODO As of: 07:30:PM 28/10/02 -* Networking Assignment -* Integrating Assignment 1 (nearly finished!) +X Networking Assignment +X Integrating Assignment 1 * Update Menu Graphics for Para -* Update Menu Graphics for Ez2 -* Finish The PUMP Graphics +H Update Menu Graphics for Ez2 +H Finish The PUMP Graphics * Work on Beatmania Support TODO As of: 07:47:PM 12/09/02 @@ -30,7 +41,7 @@ X Fix Ez2dancer SelectPlayer Theme Metrics X Try to fix ez2dancer select style. H Create Ez2dancer style Gameover by making some Gameover Metrics. H Create Ez2dancer style End Scroll, possibly new class, possibly just metric changes. -H Create Ez2dancer style song select. +* Create Ez2dancer style song select. H Add Scoreboard System (longterm project) H Create some kind of metrics so that Ez2dancer may have extra stage the way it should X Fix Ez2dancer type stage screens diff --git a/stepmania/src/BGAnimationLayer.cpp b/stepmania/src/BGAnimationLayer.cpp index 4ad31bfa75..bb752fdf6c 100644 --- a/stepmania/src/BGAnimationLayer.cpp +++ b/stepmania/src/BGAnimationLayer.cpp @@ -97,7 +97,7 @@ void BGAnimationLayer::LoadFromAniLayerFile( CString sPath, CString sSongBGPath const CString EFFECT_STRING[NUM_EFFECTS] = { "center", "stretchstill", - "scretchscrollleft", + "stretchscrollleft", "stretchscrollright", "stretchscrollup", "stretchscrolldown", diff --git a/stepmania/src/MusicBannerWheel.cpp b/stepmania/src/MusicBannerWheel.cpp new file mode 100644 index 0000000000..07ae4105fe --- /dev/null +++ b/stepmania/src/MusicBannerWheel.cpp @@ -0,0 +1,89 @@ +#include "stdafx.h" +/* +----------------------------------------------------------------------------- + Class: MusicBannerWheel + + Desc: See header. + + Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved. + Andrew Livy +----------------------------------------------------------------------------- +*/ + +#include "MusicBannerWheel.h" +#include "RageUtil.h" +#include "GameState.h" +#include "PrefsManager.h" +#include "SongManager.h" +#include "ThemeManager.h" +#include "RageMusic.h" + +#define MAXBANNERS 5 +#define BANNERSPACING 200 + + +MusicBannerWheel::MusicBannerWheel() +{ + currentPos=0; + + m_ScrollingList.SetXY( 0, 0 ); + m_ScrollingList.SetSpacing( BANNERSPACING ); + this->AddChild( &m_ScrollingList ); + + SetNewPos(currentPos); + PlayMusicSample(); +} + +void MusicBannerWheel::SetNewPos(int NewPos) +{ + CArray arraySongs = SONGMAN->m_pSongs; + Song* pSong; + + // TODO: OPTIMIZE THIS. (SO IT LOADS THE ENTIRE SONG LIST) + CStringArray asGraphicPaths; + for( unsigned j=0; jGetPathTo("Graphics","fallback banner")); + else if (pSong->HasBanner()) asGraphicPaths.push_back(pSong->GetBannerPath()); + else if (PREFSMAN->m_bUseBGIfNoBanner && pSong->HasBackground() ) asGraphicPaths.push_back(pSong->GetBannerPath()); + else asGraphicPaths.push_back(THEME->GetPathTo("Graphics","fallback banner")); + } + m_ScrollingList.Load( asGraphicPaths ); +} + +Song* MusicBannerWheel::GetSelectedSong() +{ + CArray arraySongs = SONGMAN->m_pSongs; + Song* pSong; + pSong=arraySongs[m_ScrollingList.GetSelection()]; + return(pSong); +} + +void MusicBannerWheel::PlayMusicSample() +{ + Song* pSong = GetSelectedSong(); + if( pSong && pSong->HasMusic() ) + { + MUSIC->Stop(); + MUSIC->Load( pSong->GetMusicPath() ); + MUSIC->Play( true, pSong->m_fMusicSampleStartSeconds, pSong->m_fMusicSampleLengthSeconds ); + } +} + +void MusicBannerWheel::BannersLeft() +{ + m_ScrollingList.Left(); + PlayMusicSample(); +} + +void MusicBannerWheel::BannersRight() +{ + m_ScrollingList.Right(); + PlayMusicSample(); +} + +MusicBannerWheel::~MusicBannerWheel() +{ +} diff --git a/stepmania/src/MusicBannerWheel.h b/stepmania/src/MusicBannerWheel.h new file mode 100644 index 0000000000..0d6f154a23 --- /dev/null +++ b/stepmania/src/MusicBannerWheel.h @@ -0,0 +1,35 @@ +#ifndef MUSICBANNERWHEEL_H +#define MUSICBANNERWHEEL_H +/* +----------------------------------------------------------------------------- + Class: MusicBannerWheel + + Desc: A wheel with song banners used in the Select Music screen. + + Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved. + Andrew Livy +----------------------------------------------------------------------------- +*/ + +#include "ActorFrame.h" +#include "Banner.h" +#include "Sprite.h" +#include "ScrollingList.h" + +class MusicBannerWheel : public ActorFrame +{ +public: + MusicBannerWheel(); + ~MusicBannerWheel(); + void BannersLeft(); + void BannersRight(); + Song* GetSelectedSong(); +private: + void SetNewPos(int NewPos); + void PlayMusicSample(); + + ScrollingList m_ScrollingList; + int currentPos; +}; + +#endif diff --git a/stepmania/src/ScreenEz2SelectMusic.cpp b/stepmania/src/ScreenEz2SelectMusic.cpp index c8c53c2f78..348d8350bc 100644 --- a/stepmania/src/ScreenEz2SelectMusic.cpp +++ b/stepmania/src/ScreenEz2SelectMusic.cpp @@ -1,302 +1,79 @@ #include "stdafx.h" /* ----------------------------------------------------------------------------- - Class: ScreenEz2SelectMusic + File: ScreenSandbox.h - Desc: See header. + Desc: Area for testing. Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved. Chris Danford - Andrew Livy + Glenn Maynard (OpenGL Code) + Lance Gilbert (OpenGL/Usability Modifications) ----------------------------------------------------------------------------- */ -/* OKAY!!! -Sod it! -I'll do this when you guys feel that it's OKAY to do it!!! +#include "stdafx.h" - - ANDY - -*/ - - -/* #include "ScreenEz2SelectMusic.h" + +#include "RageDisplay.h" +#include + +#include "SDL.h" +#include "SDL_opengl.h" +#include "ScreenSandbox.h" #include "ScreenManager.h" -#include "PrefsManager.h" -#include "SongManager.h" -#include "GameManager.h" #include "RageMusic.h" #include "GameConstantsAndTypes.h" #include "PrefsManager.h" -#include "RageLog.h" -#include "InputMapper.h" -#include "InputQueue.h" -#include "AnnouncerManager.h" -#include "InputMapper.h" -#include "GameState.h" -#include "CodeDetector.h" - - -#define BANNER_X THEME->GetMetricF("ScreenEz2SelectMusic","BannerX") -#define BANNER_Y THEME->GetMetricF("ScreenEz2SelectMusic","BannerY") -#define BANNER_WIDTH THEME->GetMetricF("ScreenEz2SelectMusic","BannerWidth") -#define BANNER_HEIGHT THEME->GetMetricF("ScreenEz2SelectMusic","BannerHeight") -#define STAGE_X THEME->GetMetricF("ScreenEz2SelectMusic","StageX") -#define STAGE_Y THEME->GetMetricF("ScreenEz2SelectMusic","StageY") -#define STAGE_ZOOM THEME->GetMetricF("ScreenEz2SelectMusic","StageZoom") -#define SCORE_FRAME_X( p ) THEME->GetMetricF("ScreenEz2SelectMusic",ssprintf("ScoreFrameP%dX",p+1)) -#define SCORE_FRAME_Y( p ) THEME->GetMetricF("ScreenEz2SelectMusic",ssprintf("ScoreFrameP%dY",p+1)) -#define SCORE_X( p ) THEME->GetMetricF("ScreenEz2SelectMusic",ssprintf("ScoreP%dX",p+1)) -#define SCORE_Y( p ) THEME->GetMetricF("ScreenEz2SelectMusic",ssprintf("ScoreP%dY",p+1)) -#define METER_FRAME_X( p ) THEME->GetMetricF("ScreenEz2SelectMusic",ssprintf("MeterFrameP%dX",p+1)) -#define METER_FRAME_Y( p ) THEME->GetMetricF("ScreenEz2SelectMusic",ssprintf("MeterFrameP%dY",p+1)) -#define METER_X( p ) THEME->GetMetricF("ScreenEz2SelectMusic",ssprintf("MeterP%dX",p+1)) -#define METER_Y( p ) THEME->GetMetricF("ScreenEz2SelectMusic",ssprintf("MeterP%dY",p+1)) -#define WHEEL_X THEME->GetMetricF("ScreenEz2SelectMusic","WheelX") -#define WHEEL_Y THEME->GetMetricF("ScreenEz2SelectMusic","WheelY") -#define HELP_TEXT THEME->GetMetric("ScreenEz2SelectMusic","HelpText") -#define TIMER_SECONDS THEME->GetMetricI("ScreenEz2SelectMusic","TimerSeconds") -#define SCORE_CONNECTED_TO_MUSIC_WHEEL THEME->GetMetricB("ScreenEz2SelectMusic","ScoreConnectedToMusicWheel") - -const float TWEEN_TIME = 0.5f; - -const float SIDE_BANNER_ANGLE = 600.0f; -const float SIDE_BANNER_ZOOM = 340.0f; -const float SIDE_BANNER_SPACING = 150.0f; - -const ScreenMessage SM_GoToPrevScreen = ScreenMessage(SM_User+1); -const ScreenMessage SM_GoToNextScreen = ScreenMessage(SM_User+2); - +#include "ThemeManager.h" ScreenEz2SelectMusic::ScreenEz2SelectMusic() -{ - LOG->Trace( "ScreenEz2SelectMusic::ScreenEz2SelectMusic()" ); - - - CodeDetector::RefreshCacheItems(); - - - int p; - - m_Menu.Load( - THEME->GetPathTo("Graphics","select music background"), - THEME->GetPathTo("Graphics","select music top edge"), - HELP_TEXT, true, true, TIMER_SECONDS - ); - this->AddChild( &m_Menu ); - - // these guys get loaded SetSong and TweenToSong - m_Banner.SetXY( BANNER_X, BANNER_Y ); - m_Banner.SetCroppedSize( BANNER_WIDTH, BANNER_HEIGHT ); - this->AddChild( &m_Banner ); - - // these guys get loaded SetSong and TweenToSong - m_BannerNext.SetXY( BANNER_X+220, BANNER_Y ); - m_BannerNext.SetCroppedSize( BANNER_WIDTH, BANNER_HEIGHT ); -// this->AddChild( &m_BannerNext ); - - // these guys get loaded SetSong and TweenToSong - m_BannerPrevious.SetXY( BANNER_X-220, BANNER_Y ); - m_BannerPrevious.SetCroppedSize( BANNER_WIDTH, BANNER_HEIGHT ); -// this->AddChild( &m_BannerPrevious ); - - m_MusicWheel.SetXY( WHEEL_X, WHEEL_Y ); - this->AddChild( &m_MusicWheel ); - - for( p=0; pIsPlayerEnabled((PlayerNumber)p) ) - continue; // skip - - m_sprHighScoreFrame[p].Load( THEME->GetPathTo("Graphics","select music score frame") ); - m_sprHighScoreFrame[p].StopAnimating(); - m_sprHighScoreFrame[p].SetState( p ); - m_sprHighScoreFrame[p].SetXY( SCORE_X(p), SCORE_Y(p) ); - this->AddChild( &m_sprHighScoreFrame[p] ); - - m_HighScore[p].SetXY( SCORE_X(p), SCORE_Y(p) ); - m_HighScore[p].SetZoom( 0.6f ); - m_HighScore[p].SetDiffuse( PlayerToColor(p) ); - this->AddChild( &m_HighScore[p] ); - } - - - m_textHoldForOptions.LoadFromFont( THEME->GetPathTo("Fonts","select music hold") ); - m_textHoldForOptions.SetXY( CENTER_X, CENTER_Y ); - m_textHoldForOptions.SetText( "press START again for options" ); - m_textHoldForOptions.SetZoom( 1 ); - m_textHoldForOptions.SetZoomY( 0 ); - m_textHoldForOptions.SetDiffuse( RageColor(1,1,1,0) ); - m_textHoldForOptions.SetZ( 2 ); - this->AddChild( &m_textHoldForOptions ); - - - m_soundSelect.Load( THEME->GetPathTo("Sounds","menu start") ); - m_soundChangeNotes.Load( THEME->GetPathTo("Sounds","select music change notes") ); - m_soundOptionsChange.Load( THEME->GetPathTo("Sounds","select music change options") ); - m_soundLocked.Load( THEME->GetPathTo("Sounds","select music wheel locked") ); - - SOUND->PlayOnceStreamedFromDir( ANNOUNCER->GetPathTo("select music intro") ); - - m_bMadeChoice = false; - m_bGoToOptions = false; - - UpdateOptionsDisplays(); - - AfterMusicChange(); - TweenOnScreen(); - m_Menu.TweenOnScreenFromMenu( SM_None ); +{ + MUSIC->Stop(); + m_MusicBannerWheel.SetX(CENTER_X); + m_MusicBannerWheel.SetY(CENTER_Y); + this->AddChild( &m_MusicBannerWheel ); } - -ScreenEz2SelectMusic::~ScreenEz2SelectMusic() +void ScreenEz2SelectMusic::Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI ) { - LOG->Trace( "ScreenEz2SelectMusic::~ScreenEz2SelectMusic()" ); + if( type != IET_FIRST_PRESS ) + return; // ignore -} - -void ScreenEz2SelectMusic::DrawPrimitives() -{ - - m_Menu.DrawBottomLayer(); - Screen::DrawPrimitives(); - m_Menu.DrawTopLayer(); - - RageMatrix matOldView, matOldProj; - - // save old view and projection - DISPLAY->GetViewTransform( &matOldView ); - DISPLAY->GetProjectionTransform( &matOldProj ); - - // construct view and project matrix - - - RageMatrix matNewView; - - RageMatrixLookAtLH( - &matNewView, - &RageVector3( CENTER_X+SIDE_BANNER_ANGLE, CENTER_Y, SIDE_BANNER_ZOOM ), - &RageVector3( CENTER_X-SIDE_BANNER_SPACING, CENTER_Y, 0.0f ), - &RageVector3( 0.0f, -1.0f, 0.0f ) - ); - - DISPLAY->SetViewTransform( &matNewView ); - - RageMatrix matNewProj; - RageMatrixPerspectiveFovLH( &matNewProj, D3DX_PI/4.0f, SCREEN_WIDTH/(float)SCREEN_HEIGHT, 0.0f, 1000.0f ); - DISPLAY->SetProjectionTransform( &matNewProj ); -// } - - m_BannerNext.Draw(); - - RageMatrixLookAtLH( - &matNewView, - &RageVector3( CENTER_X-SIDE_BANNER_ANGLE, CENTER_Y, SIDE_BANNER_ZOOM ), - &RageVector3( CENTER_X+SIDE_BANNER_SPACING, CENTER_Y, 0.0f ), - &RageVector3( 0.0f, -1.0f, 0.0f ) - ); - - DISPLAY->SetViewTransform( &matNewView ); - - RageMatrixPerspectiveFovLH( &matNewProj, D3DX_PI/4.0f, SCREEN_WIDTH/(float)SCREEN_HEIGHT, 0.0f, 1000.0f ); - DISPLAY->SetProjectionTransform( &matNewProj ); - - m_BannerPrevious.Draw(); - - // restore old view and projection - DISPLAY->SetViewTransform( &matOldView ); - DISPLAY->SetProjectionTransform( &matOldProj ); - - -} - -void ScreenEz2SelectMusic::TweenOnScreen() -{ - int p; - - for( p=0; ptype = SDL_QUIT; + SDL_PushEvent(event); + } + case SDLK_ESCAPE: + { + SCREENMAN->SetNewScreen( "ScreenTitleMenu" ); + } + } + } - m_MusicWheel.TweenOnScreen(); -} - -void ScreenEz2SelectMusic::TweenOffScreen() -{ - int i; - - 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_textStage.FadeOff( 0, "bounce left", TWEEN_TIME ); - m_sprCDTitle.FadeOff( 0, "bounce left", TWEEN_TIME ); - - for( int p=0; p apActorsInScore; - for( p=0; pBeginTweening( TWEEN_TIME, TWEEN_BIAS_END ); - apActorsInScore[i]->SetTweenX( SCORE_CONNECTED_TO_MUSIC_WHEEL ? apActorsInScore[i]->GetX()+400 : apActorsInScore[i]->GetX()-400 ); - } - - m_MusicWheel.TweenOffScreen(); -} - -void ScreenEz2SelectMusic::TweenScoreOnAndOffAfterChangeSort() -{ - if( !SCORE_CONNECTED_TO_MUSIC_WHEEL ) - return; // do nothing - - CArray apActorsInScore; - for( int p=0; pStopTweening(); - - float fOriginalX = apActorsInScore[i]->GetX(); - apActorsInScore[i]->BeginTweening( TWEEN_TIME, TWEEN_BIAS_END ); // tween off screen - apActorsInScore[i]->SetTweenX( fOriginalX+400 ); - - apActorsInScore[i]->BeginTweening( 0.5f ); // sleep - - apActorsInScore[i]->BeginTweening( 1, TWEEN_BIAS_BEGIN ); // tween back on screen - apActorsInScore[i]->SetTweenX( fOriginalX ); - } } void ScreenEz2SelectMusic::Update( float fDeltaTime ) @@ -304,442 +81,26 @@ void ScreenEz2SelectMusic::Update( float fDeltaTime ) Screen::Update( fDeltaTime ); } -void ScreenEz2SelectMusic::Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI ) +void ScreenEz2SelectMusic::DrawPrimitives() { - LOG->Trace( "ScreenEz2SelectMusic::Input()" ); - - if( type == IET_RELEASE ) return; // don't care - - if( m_Menu.IsClosing() ) return; // ignore - - if( !GameI.IsValid() ) return; // don't care - - if( m_bMadeChoice && !m_bGoToOptions && MenuI.IsValid() && MenuI.button == MENU_BUTTON_START && !GAMESTATE->IsExtraStage() && !GAMESTATE->IsExtraStage2() ) - { - m_bGoToOptions = true; - m_textHoldForOptions.SetText( "Entering Options..." ); - SOUND->PlayOnceStreamed( THEME->GetPathTo("Sounds","menu start") ); - return; - } - - if( m_bMadeChoice ) - return; - - PlayerNumber pn = GAMESTATE->GetCurrentStyleDef()->ControllerToPlayerNumber( GameI.controller ); - - if( CodeDetector::EnteredEasierDifficulty(GameI.controller) ) - { - if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() ) - m_soundLocked.Play(); - else - EasierDifficulty( pn ); - return; - } - if( CodeDetector::EnteredHarderDifficulty(GameI.controller) ) - { - if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() ) - m_soundLocked.Play(); - else - HarderDifficulty( pn ); - return; - } - if( CodeDetector::EnteredNextSort(GameI.controller) ) - { - if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() ) - m_soundLocked.Play(); - else - if( m_MusicWheel.NextSort() ) - { - MUSIC->Stop(); - - m_MusicSortDisplay.BeginTweening( 0.3f ); - m_MusicSortDisplay.SetTweenDiffuse( RageColor(1,1,1,0) ); - - TweenScoreOnAndOffAfterChangeSort(); - } - return; - } - if( CodeDetector::DetectAndAdjustOptions(GameI.controller) ) - { - m_soundOptionsChange.Play(); - UpdateOptionsDisplays(); - return; - } - - Screen::Input( DeviceI, type, GameI, MenuI, StyleI ); // default input handler -} - - -void ScreenEz2SelectMusic::EasierDifficulty( PlayerNumber pn ) -{ - LOG->Trace( "ScreenEz2SelectMusic::EasierDifficulty( %d )", pn ); - - if( !GAMESTATE->IsPlayerEnabled(pn) ) - return; - if( m_arrayNotes.empty() ) - return; - if( m_iSelection[pn] == 0 ) - return; - - m_iSelection[pn]--; - // the user explicity switched difficulties. Update the preferred difficulty - GAMESTATE->m_PreferredDifficultyClass[pn] = m_arrayNotes[ m_iSelection[pn] ]->m_DifficultyClass; - - m_soundChangeNotes.Play(); - - AfterNotesChange( pn ); -} - -void ScreenEz2SelectMusic::HarderDifficulty( PlayerNumber pn ) -{ - LOG->Trace( "ScreenEz2SelectMusic::HarderDifficulty( %d )", pn ); - - if( !GAMESTATE->IsPlayerEnabled(pn) ) - return; - if( m_arrayNotes.empty() ) - return; - if( m_iSelection[pn] == m_arrayNotes.size()-1 ) - return; - - m_iSelection[pn]++; - // the user explicity switched difficulties. Update the preferred difficulty - GAMESTATE->m_PreferredDifficultyClass[pn] = m_arrayNotes[ m_iSelection[pn] ]->m_DifficultyClass; - - m_soundChangeNotes.Play(); - - AfterNotesChange( pn ); +// m_Menu.DrawBottomLayer(); + Screen::DrawPrimitives(); +// m_Menu.DrawTopLayer(); } void ScreenEz2SelectMusic::HandleScreenMessage( const ScreenMessage SM ) { Screen::HandleScreenMessage( SM ); - switch( SM ) { - case SM_MenuTimer: - if( m_MusicWheel.IsRouletting() ) - { - MenuStart(PLAYER_INVALID); - m_Menu.SetTimer( 15 ); - } - else if( m_MusicWheel.GetSelectedType() != TYPE_SONG ) - { - m_MusicWheel.StartRoulette(); - m_Menu.SetTimer( 15 ); - } - else - { - MenuStart(PLAYER_INVALID); - } + case SM_DoneClosingWipingLeft: break; - case SM_GoToPrevScreen: - SCREENMAN->SetNewScreen( "ScreenTitleMenu" ); + case SM_DoneClosingWipingRight: break; - case SM_GoToNextScreen: - if( m_bGoToOptions ) - { - SCREENMAN->SetNewScreen( "ScreenPlayerOptions" ); - } - else - { - MUSIC->Stop(); - SCREENMAN->SetNewScreen( "ScreenStage" ); - } + case SM_DoneOpeningWipingLeft: break; - case SM_PlaySongSample: - PlayMusicSample(); - break; - case SM_SongChanged: - AfterMusicChange(); - break; - case SM_SortOrderChanged: - SortOrderChanged(); + case SM_DoneOpeningWipingRight: break; } } - -void ScreenEz2SelectMusic::MenuLeft( PlayerNumber pn, const InputEventType type ) -{ - if( type >= IET_SLOW_REPEAT && INPUTMAPPER->IsButtonDown( MenuInput(pn, MENU_BUTTON_RIGHT) ) ) - return; // ignore - - if( ! m_MusicWheel.WheelIsLocked() ) - MUSIC->Stop(); - - m_MusicWheel.PrevMusic(); -} - - -void ScreenEz2SelectMusic::MenuRight( PlayerNumber pn, const InputEventType type ) -{ - if( type >= IET_SLOW_REPEAT && INPUTMAPPER->IsButtonDown( MenuInput(pn, MENU_BUTTON_LEFT) ) ) - return; // ignore - - if( ! m_MusicWheel.WheelIsLocked() ) - MUSIC->Stop(); - - m_MusicWheel.NextMusic(); -} - -void ScreenEz2SelectMusic::MenuStart( PlayerNumber pn ) -{ - if( pn != PLAYER_INVALID && - INPUTMAPPER->IsButtonDown( MenuInput(pn, MENU_BUTTON_LEFT) ) && - INPUTMAPPER->IsButtonDown( MenuInput(pn, MENU_BUTTON_RIGHT) ) ) - { - if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() ) - m_soundLocked.Play(); - else - { - if( m_MusicWheel.NextSort() ) - { - MUSIC->Stop(); - - m_MusicSortDisplay.BeginTweening( 0.3f ); - m_MusicSortDisplay.SetTweenDiffuse( RageColor(1,1,1,0) ); - - TweenScoreOnAndOffAfterChangeSort(); - } - } - return; - } - - - // this needs to check whether valid Notes are selected! - bool bResult = m_MusicWheel.Select(); - - if( !bResult ) - { - /* why do this? breaks tabs and roulette -glenn */ -// if( pn != PLAYER_INVALID ) -// this->SendScreenMessage( SM_MenuTimer, 1 ); // re-throw a timer message -/* } - else // if !bResult - { - // a song was selected - switch( m_MusicWheel.GetSelectedType() ) - { - case TYPE_SONG: - { - if( !m_MusicWheel.GetSelectedSong()->HasMusic() ) - { - /* TODO: gray these out. - * - * XXX: also, make sure they're not selected by roulette */ -/* SCREENMAN->Prompt( SM_None, "ERROR:\n \nThis song does not have a music file\n and cannot be played." ); - return; - } - - bool bIsNew = m_MusicWheel.GetSelectedSong()->IsNew(); - bool bIsHard = false; - for( int p=0; pIsPlayerEnabled( (PlayerNumber)p ) ) - continue; // skip - if( GAMESTATE->m_pCurNotes[p] && GAMESTATE->m_pCurNotes[p]->m_iMeter >= 9 ) - bIsHard = true; - } - - if( bIsNew ) - SOUND->PlayOnceStreamedFromDir( ANNOUNCER->GetPathTo("select music comment new") ); - else if( bIsHard ) - SOUND->PlayOnceStreamedFromDir( ANNOUNCER->GetPathTo("select music comment hard") ); - else - SOUND->PlayOnceStreamedFromDir( ANNOUNCER->GetPathTo("select music comment general") ); - - - TweenOffScreen(); - - m_bMadeChoice = true; - - m_soundSelect.Play(); - - if( !GAMESTATE->IsExtraStage() && !GAMESTATE->IsExtraStage2() ) - { - // show "hold START for options" - m_textHoldForOptions.SetDiffuse( RageColor(1,1,1,0) ); - m_textHoldForOptions.BeginTweening( 0.25f ); // fade in - m_textHoldForOptions.SetTweenZoomY( 1 ); - m_textHoldForOptions.SetTweenDiffuse( RageColor(1,1,1,1) ); - m_textHoldForOptions.BeginTweening( 2.0f ); // sleep - m_textHoldForOptions.BeginTweening( 0.25f ); // fade out - m_textHoldForOptions.SetTweenDiffuse( RageColor(1,1,1,0) ); - m_textHoldForOptions.SetTweenZoomY( 0 ); - } - - m_Menu.TweenOffScreenToBlack( SM_None, false ); - - m_Menu.StopTimer(); - - this->SendScreenMessage( SM_GoToNextScreen, 2.5f ); - } - break; - case TYPE_SECTION: - - break; - case TYPE_ROULETTE: - - break; - } - } - -} - - -void ScreenEz2SelectMusic::MenuBack( PlayerNumber pn ) -{ - MUSIC->Stop(); - - m_Menu.TweenOffScreenToBlack( SM_GoToPrevScreen, true ); -} - -void ScreenEz2SelectMusic::AfterNotesChange( PlayerNumber pn ) -{ - if( !GAMESTATE->IsPlayerEnabled(pn) ) - return; - - m_iSelection[pn] = clamp( m_iSelection[pn], 0, m_arrayNotes.size()-1 ); // bounds clamping - - Notes* pNotes = m_arrayNotes.empty()? NULL:m_arrayNotes[m_iSelection[pn]]; - - GAMESTATE->m_pCurNotes[pn] = pNotes; - -// m_BPMDisplay.SetZoomY( 0 ); -// m_BPMDisplay.BeginTweening( 0.2f ); -// m_BPMDisplay.SetTweenZoomY( 1.2f ); - - DifficultyClass dc = GAMESTATE->m_PreferredDifficultyClass[pn]; - Song* pSong = GAMESTATE->m_pCurSong; - Notes* m_pNotes = GAMESTATE->m_pCurNotes[pn]; - - if( m_pNotes ) - m_HighScore[pn].SetScore( (float)m_pNotes->m_iTopScore ); - - m_DifficultyIcon[pn].SetFromNotes( pNotes ); - m_FootMeter[pn].SetFromNotes( pNotes ); - m_GrooveRadar.SetFromNotes( pn, pNotes ); - m_MusicWheel.NotesChanged( pn ); -} - -void ScreenEz2SelectMusic::AfterMusicChange() -{ - m_Menu.StallTimer(); - - Song* pSong = m_MusicWheel.GetSelectedSong(); - - GAMESTATE->m_pCurSong = pSong; - - m_arrayNotes.clear(); - - switch( m_MusicWheel.GetSelectedType() ) - { - case TYPE_SECTION: - { - CString sGroup = m_MusicWheel.GetSelectedSection(); - for( int p=0; pGetNotesThatMatch( GAMESTATE->GetCurrentStyleDef(), PLAYER_1, m_arrayNotes ); - SortNotesArrayByDifficulty( m_arrayNotes ); - - m_Banner.SetFromSong( pSong ); - m_BannerNext.SetFromSong( pSong ); - m_BannerPrevious.SetFromSong( pSong ); - - float fMinBPM, fMaxBPM; - pSong->GetMinMaxBPM( fMinBPM, fMaxBPM ); - m_BPMDisplay.SetBPMRange( fMinBPM, fMaxBPM ); - - if( pSong->HasCDTitle() ) - m_sprCDTitle.Load( pSong->GetCDTitlePath() ); - else - m_sprCDTitle.Load( THEME->GetPathTo("Graphics","fallback cd title") ); - for( int p=0; pIsPlayerEnabled( PlayerNumber(p) ) ) - continue; - for( int i=0; im_DifficultyClass == GAMESTATE->m_PreferredDifficultyClass[p] ) - m_iSelection[p] = i; - - m_iSelection[p] = clamp( m_iSelection[p], 0, m_arrayNotes.size() ) ; - } - } - break; - case TYPE_ROULETTE: - m_Banner.SetRoulette(); - m_BannerNext.SetRoulette(); - m_BannerPrevious.SetRoulette(); - m_BPMDisplay.SetBPMRange( 0, 0 ); - m_sprCDTitle.UnloadTexture(); - break; - } - - for( int p=0; pTrace( "ScreenSelectSong::PlaySONGample()" ); - - Song* pSong = m_MusicWheel.GetSelectedSong(); - if( pSong ) - { - MUSIC->Stop(); - MUSIC->Load( pSong->GetMusicPath() ); - MUSIC->Play( true, pSong->m_fMusicSampleStartSeconds, pSong->m_fMusicSampleLengthSeconds ); - } - else - MUSIC->LoadAndPlayIfNotAlready( THEME->GetPathTo("Sounds","select music music") ); -} - -void ScreenEz2SelectMusic::UpdateOptionsDisplays() -{ -// m_OptionIcons.Load( GAMESTATE->m_PlayerOptions, &GAMESTATE->m_SongOptions ); - -// m_PlayerOptionIcons.Refresh(); - -// for( int p=0; pIsPlayerEnabled(p) ) -// { -// CString s = GAMESTATE->m_PlayerOptions[p].GetString(); -// s.Replace( ", ", "\n" ); -// m_textPlayerOptions[p].SetText( s ); -// } -// } - -// CString s = GAMESTATE->m_SongOptions.GetString(); -// s.Replace( ", ", "\n" ); -// m_textSongOptions.SetText( s ); -} - -void ScreenEz2SelectMusic::SortOrderChanged() -{ - m_MusicSortDisplay.SetState( GAMESTATE->m_SongSortOrder ); - - // tween music sort on screen -// m_MusicSortDisplay.SetEffectGlowing(); - m_MusicSortDisplay.BeginTweening( 0.3f ); - m_MusicSortDisplay.SetTweenDiffuse( RageColor(1,1,1,1) ); -} - -*/ \ No newline at end of file diff --git a/stepmania/src/ScreenEz2SelectMusic.h b/stepmania/src/ScreenEz2SelectMusic.h index c6c95909e5..c95b2847f0 100644 --- a/stepmania/src/ScreenEz2SelectMusic.h +++ b/stepmania/src/ScreenEz2SelectMusic.h @@ -1,98 +1,39 @@ +#ifndef SCREENEZ2SELECTMUSIC_H +#define SCREENEZ2SELECTMUSIC_H /* ----------------------------------------------------------------------------- - Class: ScreenEz2SelectMusic + Class: ScreenSandbox - Desc: The screen in PLAY_MODE_ARCADE where you choose a Song and Notes. + Desc: Area for testing. Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved. Chris Danford - Andrew Livy ----------------------------------------------------------------------------- */ -/* + #include "Screen.h" #include "Sprite.h" #include "BitmapText.h" -#include "RandomStream.h" -#include "GameConstantsAndTypes.h" -#include "MusicWheel.h" -#include "Banner.h" -#include "FadingBanner.h" -#include "BPMDisplay.h" +#include "TransitionStarWipe.h" #include "MenuElements.h" -#include "GrooveRadar.h" -#include "DifficultyIcon.h" -#include "FootMeter.h" -#include "OptionIconRow.h" +#include "TipDisplay.h" +#include "RageSoundStream.h" +#include "MusicBannerWheel.h" class ScreenEz2SelectMusic : public Screen { public: ScreenEz2SelectMusic(); - virtual ~ScreenEz2SelectMusic(); - virtual void DrawPrimitives(); virtual void Update( float fDeltaTime ); virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI ); virtual void HandleScreenMessage( const ScreenMessage SM ); - - virtual void MenuLeft( PlayerNumber pn, const InputEventType type ); - virtual void MenuRight( PlayerNumber pn, const InputEventType type ); - virtual void MenuStart( PlayerNumber pn ); - virtual void MenuBack( PlayerNumber pn ); - protected: - void TweenOnScreen(); - void TweenOffScreen(); - void TweenScoreOnAndOffAfterChangeSort(); + MusicBannerWheel m_MusicBannerWheel; - void EasierDifficulty( PlayerNumber pn ); - void HarderDifficulty( PlayerNumber pn ); - - void AfterNotesChange( PlayerNumber pn ); - void AfterMusicChange(); - void PlayMusicSample(); - void SortOrderChanged(); - - void UpdateOptionsDisplays(); - - CArray m_arrayNotes; - int m_iSelection[NUM_PLAYERS]; - - MenuElements m_Menu; - - Sprite m_sprBannerFrame; - - FadingBanner m_Banner; - FadingBanner m_BannerNext; - FadingBanner m_BannerPrevious; - - BPMDisplay m_BPMDisplay; - BitmapText m_textStage; - Sprite m_sprCDTitle; - Sprite m_sprDifficultyFrame[NUM_PLAYERS]; - DifficultyIcon m_DifficultyIcon[NUM_PLAYERS]; - GrooveRadar m_GrooveRadar; -// BitmapText m_textPlayerOptions[NUM_PLAYERS]; - BitmapText m_textSongOptions; - OptionIconRow m_OptionIconRow[NUM_PLAYERS]; - Sprite m_sprMeterFrame[NUM_PLAYERS]; - FootMeter m_FootMeter[NUM_PLAYERS]; - MusicSortDisplay m_MusicSortDisplay; - Sprite m_sprHighScoreFrame[NUM_PLAYERS]; - ScoreDisplayNormal m_HighScore[NUM_PLAYERS]; - MusicWheel m_MusicWheel; - - bool m_bMadeChoice; - bool m_bGoToOptions; - BitmapText m_textHoldForOptions; - - RageSoundSample m_soundSelect; - RageSoundSample m_soundChangeNotes; - RageSoundSample m_soundOptionsChange; - RageSoundSample m_soundLocked; }; - */ \ No newline at end of file + +#endif diff --git a/stepmania/src/ScreenManager.cpp b/stepmania/src/ScreenManager.cpp index e8c6c80f8e..14cc938025 100644 --- a/stepmania/src/ScreenManager.cpp +++ b/stepmania/src/ScreenManager.cpp @@ -222,7 +222,7 @@ Screen* ScreenManager::MakeNewScreen( CString sClassName ) else if( 0==stricmp(sClassName, "ScreenSongOptions") ) return new ScreenSongOptions; else if( 0==stricmp(sClassName, "ScreenStage") ) return new ScreenStage; else if( 0==stricmp(sClassName, "ScreenTitleMenu") ) return new ScreenTitleMenu; -// else if( 0==stricmp(sClassName, "ScreenEz2SelectMusic") ) return new ScreenEz2SelectMusic; + else if( 0==stricmp(sClassName, "ScreenEz2SelectMusic") ) return new ScreenEz2SelectMusic; else throw RageException( "Invalid Screen class name '%s'", sClassName.GetString() ); } diff --git a/stepmania/src/ScreenMusicScroll.cpp b/stepmania/src/ScreenMusicScroll.cpp index 32d4783164..1a2a518df0 100644 --- a/stepmania/src/ScreenMusicScroll.cpp +++ b/stepmania/src/ScreenMusicScroll.cpp @@ -46,10 +46,10 @@ const CString CREDIT_LINES[] = "GRAPHICS:", "v1ral (Lucas Tang)", "SPiGuMuS", + "Visage", "DJ McFox (Ryan McKanna)", "Cloud34 (Lamden Travis)", "Redcrusher (Michael Curry)", - "spds (James Sanders)", "", "", "", @@ -71,7 +71,7 @@ const CString CREDIT_LINES[] = "", "PROGRAMMING:", "Chris Danford", - "Lord Frieza (Andrew Livy)", + "Andrew 'Frieza' Livy", "Glenn Maynard", "Bruno Figueiredo", "Dro Kulix (Peter S. May)", @@ -114,6 +114,7 @@ const CString CREDIT_LINES[] = "Garett Sakamoto", "SailorBob", "AngelTK (Kenny Lai)", + "spds (James Sanders)", "Illusionz - Issaquah, WA", "Quarters - Kirkland, WA", "Segapark - Bournemouth, UK", diff --git a/stepmania/src/StepMania.dsp b/stepmania/src/StepMania.dsp index e5f2f8ee4b..ea6ead6f3e 100644 --- a/stepmania/src/StepMania.dsp +++ b/stepmania/src/StepMania.dsp @@ -57,10 +57,10 @@ LINK32=link.exe # SUBTRACT LINK32 /verbose /pdb:none # Begin Special Build Tool IntDir=.\../Release6 -TargetDir=\temp\stepmania +TargetDir=\Stepmania\stepmania TargetName=StepMania SOURCE="$(InputPath)" -PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ +PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi ia32.vdi # End Special Build Tool @@ -92,10 +92,10 @@ LINK32=link.exe # SUBTRACT LINK32 /verbose /profile /pdb:none /incremental:no /nodefaultlib # Begin Special Build Tool IntDir=.\../Debug6 -TargetDir=\temp\stepmania +TargetDir=\Stepmania\stepmania TargetName=StepMania-debug SOURCE="$(InputPath)" -PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ +PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi ia32.vdi # End Special Build Tool @@ -832,6 +832,14 @@ SOURCE=.\MenuTimer.h # End Source File # Begin Source File +SOURCE=.\MusicBannerWheel.cpp +# End Source File +# Begin Source File + +SOURCE=.\MusicBannerWheel.h +# End Source File +# Begin Source File + SOURCE=.\MusicList.cpp # End Source File # Begin Source File diff --git a/stepmania/src/plib-1.6.0/sg.lib b/stepmania/src/plib-1.6.0/sg.lib index 49484750b6..d36ac97196 100644 Binary files a/stepmania/src/plib-1.6.0/sg.lib and b/stepmania/src/plib-1.6.0/sg.lib differ diff --git a/stepmania/src/plib-1.6.0/sg_d.lib b/stepmania/src/plib-1.6.0/sg_d.lib index 87116a1f31..e36d17722b 100644 Binary files a/stepmania/src/plib-1.6.0/sg_d.lib and b/stepmania/src/plib-1.6.0/sg_d.lib differ diff --git a/stepmania/src/plib-1.6.0/ul.lib b/stepmania/src/plib-1.6.0/ul.lib index b66738d73a..85eeff8311 100644 Binary files a/stepmania/src/plib-1.6.0/ul.lib and b/stepmania/src/plib-1.6.0/ul.lib differ