From 6bc7b349fb16d39ff5aad3dfc95816a0af8f94d3 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Wed, 9 Oct 2002 06:57:37 +0000 Subject: [PATCH] Songs not in same group as extra stage can now be used as an extra stage --- stepmania/Themes/default/metrics.ini | 4 +++ stepmania/src/GameManager.cpp | 41 ++++++++++++++-------------- stepmania/src/MusicWheel.cpp | 22 ++++++++++++--- stepmania/src/NoteDisplay.cpp | 2 +- stepmania/src/NoteTypes.h | 7 ++--- stepmania/src/ScreenGameplay.cpp | 10 +++---- stepmania/src/TransitionOniFade.cpp | 15 ++++++++-- stepmania/src/TransitionOniFade.h | 2 ++ 8 files changed, 65 insertions(+), 38 deletions(-) diff --git a/stepmania/Themes/default/metrics.ini b/stepmania/Themes/default/metrics.ini index 65262ad05e..1824925c15 100644 --- a/stepmania/Themes/default/metrics.ini +++ b/stepmania/Themes/default/metrics.ini @@ -678,6 +678,10 @@ Uppercase=1 SpacingX=38 SpacingY=0 +[TransitionOniFade] +BannerWidth=564 +BannerHeight=184 + [ScreenInputOptions] IgnoreJoyAxes="ON" will cause StepMania to ignore all input from::joystick directional pads. This is useful for people using::the DirectPad Pro driver. MenuButtons=The default setting allows the dance pad's panels to navigate::the menus. Changing this to "dedicated only" will restrict::menu navigation to only the Menu* set of buttons. Be sure to map::the Menu* set of buttons before setting this to "dedicated"! diff --git a/stepmania/src/GameManager.cpp b/stepmania/src/GameManager.cpp index 3d375e9e83..d0f8a029ab 100644 --- a/stepmania/src/GameManager.cpp +++ b/stepmania/src/GameManager.cpp @@ -33,7 +33,6 @@ const int DANCE_COL_SPACING = 64; const int DANCE_6PANEL_VERSUS_COL_SPACING = 54; const int PUMP_COL_SPACING = 50; const int EZ2_COL_SPACING = 46; -const int EZ2_DOUBLE_ADJUST = 150; const int PARA_COL_SPACING = 54; struct { @@ -821,28 +820,28 @@ StyleDef g_StyleDefs[NUM_STYLES] = 10, // m_iColsPerPlayer { // m_ColumnInfo[NUM_PLAYERS][MAX_COLS_PER_PLAYER]; { // PLAYER_1 - { TRACK_1, GAME_CONTROLLER_1, EZ2_BUTTON_FOOTUPLEFT, -EZ2_COL_SPACING*4.5f+EZ2_DOUBLE_ADJUST }, - { TRACK_2, GAME_CONTROLLER_1, EZ2_BUTTON_HANDUPLEFT, -EZ2_COL_SPACING*3.5f+EZ2_DOUBLE_ADJUST }, - { TRACK_3, GAME_CONTROLLER_1, EZ2_BUTTON_FOOTDOWN, -EZ2_COL_SPACING*2.5f+EZ2_DOUBLE_ADJUST }, - { TRACK_4, GAME_CONTROLLER_1, EZ2_BUTTON_HANDUPRIGHT, -EZ2_COL_SPACING*1.5f+EZ2_DOUBLE_ADJUST }, - { TRACK_5, GAME_CONTROLLER_1, EZ2_BUTTON_FOOTUPRIGHT, -EZ2_COL_SPACING*0.5f+EZ2_DOUBLE_ADJUST }, - { TRACK_6, GAME_CONTROLLER_2, EZ2_BUTTON_FOOTUPLEFT, +EZ2_COL_SPACING*0.5f+EZ2_DOUBLE_ADJUST }, - { TRACK_7, GAME_CONTROLLER_2, EZ2_BUTTON_HANDUPLEFT, +EZ2_COL_SPACING*1.5f+EZ2_DOUBLE_ADJUST }, - { TRACK_8, GAME_CONTROLLER_2, EZ2_BUTTON_FOOTDOWN, +EZ2_COL_SPACING*2.5f+EZ2_DOUBLE_ADJUST }, - { TRACK_9, GAME_CONTROLLER_2, EZ2_BUTTON_HANDUPRIGHT, +EZ2_COL_SPACING*3.5f+EZ2_DOUBLE_ADJUST }, - { TRACK_10, GAME_CONTROLLER_2, EZ2_BUTTON_FOOTUPRIGHT, +EZ2_COL_SPACING*4.5f+EZ2_DOUBLE_ADJUST }, + { TRACK_1, GAME_CONTROLLER_1, EZ2_BUTTON_FOOTUPLEFT, -EZ2_COL_SPACING*4.5f }, + { TRACK_2, GAME_CONTROLLER_1, EZ2_BUTTON_HANDUPLEFT, -EZ2_COL_SPACING*3.5f }, + { TRACK_3, GAME_CONTROLLER_1, EZ2_BUTTON_FOOTDOWN, -EZ2_COL_SPACING*2.5f }, + { TRACK_4, GAME_CONTROLLER_1, EZ2_BUTTON_HANDUPRIGHT, -EZ2_COL_SPACING*1.5f }, + { TRACK_5, GAME_CONTROLLER_1, EZ2_BUTTON_FOOTUPRIGHT, -EZ2_COL_SPACING*0.5f }, + { TRACK_6, GAME_CONTROLLER_2, EZ2_BUTTON_FOOTUPLEFT, +EZ2_COL_SPACING*0.5f }, + { TRACK_7, GAME_CONTROLLER_2, EZ2_BUTTON_HANDUPLEFT, +EZ2_COL_SPACING*1.5f }, + { TRACK_8, GAME_CONTROLLER_2, EZ2_BUTTON_FOOTDOWN, +EZ2_COL_SPACING*2.5f }, + { TRACK_9, GAME_CONTROLLER_2, EZ2_BUTTON_HANDUPRIGHT, +EZ2_COL_SPACING*3.5f }, + { TRACK_10, GAME_CONTROLLER_2, EZ2_BUTTON_FOOTUPRIGHT, +EZ2_COL_SPACING*4.5f }, }, { // PLAYER_2 - { TRACK_1, GAME_CONTROLLER_1, EZ2_BUTTON_FOOTUPLEFT, -EZ2_COL_SPACING*4.5f+EZ2_DOUBLE_ADJUST }, - { TRACK_2, GAME_CONTROLLER_1, EZ2_BUTTON_HANDUPLEFT, -EZ2_COL_SPACING*3.5f+EZ2_DOUBLE_ADJUST }, - { TRACK_3, GAME_CONTROLLER_1, EZ2_BUTTON_FOOTDOWN, -EZ2_COL_SPACING*2.5f+EZ2_DOUBLE_ADJUST }, - { TRACK_4, GAME_CONTROLLER_1, EZ2_BUTTON_HANDUPRIGHT, -EZ2_COL_SPACING*1.5f+EZ2_DOUBLE_ADJUST }, - { TRACK_5, GAME_CONTROLLER_1, EZ2_BUTTON_FOOTUPRIGHT, -EZ2_COL_SPACING*0.5f+EZ2_DOUBLE_ADJUST }, - { TRACK_6, GAME_CONTROLLER_2, EZ2_BUTTON_FOOTUPLEFT, +EZ2_COL_SPACING*0.5f+EZ2_DOUBLE_ADJUST }, - { TRACK_7, GAME_CONTROLLER_2, EZ2_BUTTON_HANDUPLEFT, +EZ2_COL_SPACING*1.5f+EZ2_DOUBLE_ADJUST }, - { TRACK_8, GAME_CONTROLLER_2, EZ2_BUTTON_FOOTDOWN, +EZ2_COL_SPACING*2.5f+EZ2_DOUBLE_ADJUST }, - { TRACK_9, GAME_CONTROLLER_2, EZ2_BUTTON_HANDUPRIGHT, +EZ2_COL_SPACING*3.5f+EZ2_DOUBLE_ADJUST }, - { TRACK_10, GAME_CONTROLLER_2, EZ2_BUTTON_FOOTUPRIGHT, +EZ2_COL_SPACING*4.5f+EZ2_DOUBLE_ADJUST }, + { TRACK_1, GAME_CONTROLLER_1, EZ2_BUTTON_FOOTUPLEFT, -EZ2_COL_SPACING*4.5f }, + { TRACK_2, GAME_CONTROLLER_1, EZ2_BUTTON_HANDUPLEFT, -EZ2_COL_SPACING*3.5f }, + { TRACK_3, GAME_CONTROLLER_1, EZ2_BUTTON_FOOTDOWN, -EZ2_COL_SPACING*2.5f }, + { TRACK_4, GAME_CONTROLLER_1, EZ2_BUTTON_HANDUPRIGHT, -EZ2_COL_SPACING*1.5f }, + { TRACK_5, GAME_CONTROLLER_1, EZ2_BUTTON_FOOTUPRIGHT, -EZ2_COL_SPACING*0.5f }, + { TRACK_6, GAME_CONTROLLER_2, EZ2_BUTTON_FOOTUPLEFT, +EZ2_COL_SPACING*0.5f }, + { TRACK_7, GAME_CONTROLLER_2, EZ2_BUTTON_HANDUPLEFT, +EZ2_COL_SPACING*1.5f }, + { TRACK_8, GAME_CONTROLLER_2, EZ2_BUTTON_FOOTDOWN, +EZ2_COL_SPACING*2.5f }, + { TRACK_9, GAME_CONTROLLER_2, EZ2_BUTTON_HANDUPRIGHT, +EZ2_COL_SPACING*3.5f }, + { TRACK_10, GAME_CONTROLLER_2, EZ2_BUTTON_FOOTUPRIGHT, +EZ2_COL_SPACING*4.5f }, }, }, { // m_iColumnDrawOrder[MAX_COLS_PER_PLAYER]; diff --git a/stepmania/src/MusicWheel.cpp b/stepmania/src/MusicWheel.cpp index 8f896050c3..2b77182b89 100644 --- a/stepmania/src/MusicWheel.cpp +++ b/stepmania/src/MusicWheel.cpp @@ -534,6 +534,24 @@ void MusicWheel::BuildWheelItemDatas( CArray &arr } } } + + + if( !bRoulette ) + { + arrayWheelItemDatas.Add( WheelItemData(TYPE_ROULETTE, NULL, "", NULL, D3DXCOLOR(1,0,0,1)) ); + } + + // HACK: Add extra stage item since it's not necessarily in the same group + 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 ); + arrayWheelItemDatas.Add( WheelItemData(TYPE_SONG, pSong, "", NULL, GAMESTATE->GetStageColor()) ); + } + break; case PLAY_MODE_ONI: case PLAY_MODE_ENDLESS: @@ -601,10 +619,6 @@ void MusicWheel::BuildWheelItemDatas( CArray &arr { arrayWheelItemDatas.Add( WheelItemData(TYPE_SECTION, NULL, "- EMPTY -", NULL, D3DXCOLOR(1,0,0,1)) ); } - else if( GAMESTATE->m_PlayMode == PLAY_MODE_ARCADE && !bRoulette ) - { - arrayWheelItemDatas.Add( WheelItemData(TYPE_ROULETTE, NULL, "", NULL, D3DXCOLOR(1,0,0,1)) ); - } } void MusicWheel::SwitchSortOrder() diff --git a/stepmania/src/NoteDisplay.cpp b/stepmania/src/NoteDisplay.cpp index 68ec30f24b..543d712c5d 100644 --- a/stepmania/src/NoteDisplay.cpp +++ b/stepmania/src/NoteDisplay.cpp @@ -247,7 +247,7 @@ void NoteDisplay::DrawHold( const HoldNote& hn, const bool bActive, const float const float fBottomDistFromTailTop = fYBottom - fYTailTop; const float fTexCoordTop = SCALE( fTopDistFromTailTop, 0, fFrameHeight, 0.5f, 1.0f ); const float fTexCoordBottom = SCALE( fBottomDistFromTailTop, 0, fFrameHeight, 0.5f, 1.0f ); - ASSERT( fBottomDistFromTailTop-0.0001 <= fFrameHeight ); + ASSERT( fBottomDistFromTailTop-0.001 <= fFrameHeight ); const float fTexCoordLeft = bActive ? 0.25f : 0.00f; const float fTexCoordRight = bActive ? 0.50f : 0.25f; const float fAlphaTop = ArrowGetAlpha( m_PlayerNumber, fYTop, fPercentFadeToFail ); diff --git a/stepmania/src/NoteTypes.h b/stepmania/src/NoteTypes.h index a9b5686c0c..4b051ab5f9 100644 --- a/stepmania/src/NoteTypes.h +++ b/stepmania/src/NoteTypes.h @@ -33,13 +33,10 @@ enum TRACK_8, TRACK_9, TRACK_10, - TRACK_11, - TRACK_12, - TRACK_13, MAX_NOTE_TRACKS // leave this at the end }; -const int MAX_BEATS = 1500; // BMR's Pulse has about 1300 +const int MAX_BEATS = 3000; // J-Paradise has about 2120 const int BEATS_PER_MEASURE = 4; const int MAX_MEASURES = MAX_BEATS / BEATS_PER_MEASURE; @@ -47,7 +44,7 @@ const int ROWS_PER_BEAT = 12; // It is important that this number is evenly divi const int ROWS_PER_MEASURE = ROWS_PER_BEAT * BEATS_PER_MEASURE; const int MAX_TAP_NOTE_ROWS = MAX_BEATS*ROWS_PER_BEAT; -const int MAX_HOLD_NOTES = 400; // BMR's Connected has about 300 +const int MAX_HOLD_NOTES = 800; // BMR's Connected has about 300 enum NoteType { diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index 68b0684c78..194e5736a6 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -543,14 +543,14 @@ void ScreenGameplay::LoadNextSong( bool bFirstLoad ) m_DifficultyIcon[p].SetFromNotes( PlayerNumber(p), GAMESTATE->m_pCurNotes[p] ); - NoteData originalNoteData; - GAMESTATE->m_pCurNotes[p]->GetNoteData( &originalNoteData ); + NoteData* pOriginalNoteData = new NoteData; + GAMESTATE->m_pCurNotes[p]->GetNoteData( pOriginalNoteData ); const StyleDef* pStyleDef = GAMESTATE->GetCurrentStyleDef(); - NoteData newNoteData; - pStyleDef->GetTransformedNoteDataForStyle( (PlayerNumber)p, &originalNoteData, &newNoteData ); + NoteData* pNewNoteData = new NoteData; + pStyleDef->GetTransformedNoteDataForStyle( (PlayerNumber)p, pOriginalNoteData, pNewNoteData ); - m_Player[p].Load( (PlayerNumber)p, &newNoteData, m_pLifeMeter[p], m_pScoreDisplay[p] ); + m_Player[p].Load( (PlayerNumber)p, pNewNoteData, m_pLifeMeter[p], m_pScoreDisplay[p] ); } m_Background.LoadFromSong( GAMESTATE->m_pCurSong ); diff --git a/stepmania/src/TransitionOniFade.cpp b/stepmania/src/TransitionOniFade.cpp index e8669165f8..b59c093157 100644 --- a/stepmania/src/TransitionOniFade.cpp +++ b/stepmania/src/TransitionOniFade.cpp @@ -18,6 +18,10 @@ #include "GameState.h" +#define BANNER_WIDTH THEME->GetMetricF("TransitionOniFade","BannerWidth") +#define BANNER_HEIGHT THEME->GetMetricF("TransitionOniFade","BannerHeight") + + TransitionOniFade::TransitionOniFade() { SetDiffuse( D3DXCOLOR(1,1,1,1) ); // white @@ -30,6 +34,9 @@ TransitionOniFade::TransitionOniFade() m_textSongInfo.TurnShadowOff(); m_textSongInfo.SetZoom( 0.5f ); m_textSongInfo.SetXY( CENTER_X, CENTER_Y ); + + m_Banner.SetCroppedSize( BANNER_WIDTH, BANNER_HEIGHT ); + m_Banner.SetXY( CENTER_X, CENTER_Y ); } TransitionOniFade::~TransitionOniFade() @@ -53,10 +60,13 @@ void TransitionOniFade::DrawPrimitives() if( m_TransitionState == closed || m_TransitionState == opening_right ) { m_quadStrip.SetDiffuse( D3DXCOLOR(0,0,0,SCALE(GetPercentageClosed(),0,1,0,2)) ); - m_quadStrip.Draw(); +// m_quadStrip.Draw(); m_textSongInfo.SetDiffuse( D3DXCOLOR(1,1,1,SCALE(GetPercentageClosed(),0,1,0,2)) ); - m_textSongInfo.Draw(); +// m_textSongInfo.Draw(); + + m_Banner.SetDiffuse( D3DXCOLOR(1,1,1,SCALE(GetPercentageClosed(),0,1,0,2)) ); + m_Banner.Draw(); } } @@ -94,4 +104,5 @@ void TransitionOniFade::UpdateSongText() Song* pSong = GAMESTATE->m_pCurSong; ASSERT( pSong ); m_textSongInfo.SetText( pSong->GetFullTitle() + "\n" + pSong->m_sArtist + "\n"); + m_Banner.LoadFromSong( pSong ); } diff --git a/stepmania/src/TransitionOniFade.h b/stepmania/src/TransitionOniFade.h index 42b7690c71..99676af513 100644 --- a/stepmania/src/TransitionOniFade.h +++ b/stepmania/src/TransitionOniFade.h @@ -17,6 +17,7 @@ #include "Sprite.h" #include "Quad.h" #include "TransitionFade.h" +#include "Banner.h" class TransitionOniFade : public Transition @@ -39,6 +40,7 @@ protected: Quad m_quadBackground; Quad m_quadStrip; // background for song text BitmapText m_textSongInfo; + Banner m_Banner; };