diff --git a/stepmania/Themes/default/metrics.ini b/stepmania/Themes/default/metrics.ini index e1ca01718f..d54a681431 100644 --- a/stepmania/Themes/default/metrics.ini +++ b/stepmania/Themes/default/metrics.ini @@ -122,7 +122,7 @@ NextScreen=ScreenSelectGroup HelpText= [ScreenSelectDifficulty] -Choices=arcade-beginner,arcade-easy,arcade-medium,arcade-hard,nonstop,oni,endless,battle +Choices=arcade-beginner,arcade-easy,arcade-medium,arcade-hard,nonstop,oni,endless,rave NumChoicesOnPage1=4 HelpText=Use &LEFT; &RIGHT; to select, then press START TimerSeconds=40 @@ -209,6 +209,7 @@ TimerSeconds=60 NextScreenArcade=ScreenSelectGroup NextScreenOni=ScreenInstructions NextScreenBattle=ScreenInstructions +NextScreenRave=ScreenInstructions [ScreenSelectGroup] FrameOnCommand=x,180;y,160;xoffset,-400;bounceend,0.5;xoffset,400 @@ -252,7 +253,8 @@ InitCommand=horizalign,left;vertalign,top;shadowlength,2;zoom,0.5; [ScreenInstructions] NextScreenArcade=ScreenSelectMusic NextScreenOni=ScreenSelectCourse -NextScreenBattle=ScreenSelectCharacter +NextScreenBattle=ScreenSelectMusic +NextScreenRave=ScreenSelectCharacter HelpText=Press START to continue TimerSeconds=15 @@ -1003,6 +1005,10 @@ BannerHeight=184 InCommand=diffusealpha,0;zoomy,0;spring,0.20;zoomy,1;diffusealpha,1 OutCommand=linear,0.20;zoomy,0;diffusealpha,1 +[RaveHelper] +NumItemTypes=0 +AttackDurationSeconds=0 + [ScreenInputOptions] HelpText=&UP; &DOWN; to change line &LEFT; &RIGHT; to select between options::START to accept changes BACK to discard changes IgnoreJoyAxes=&oq;ON&cq; will cause StepMania to ignore all input from::joystick directional pads. This is useful for the DirectPad Pro driver::and some brands of USB convertors. @@ -1234,16 +1240,6 @@ ModifiersY=10 ModifiersZoom=0.5 ModifiersHorizAlign=2 -[Inventory] -NumItemTypes=0 -ItemDurationSeconds=0 - -[ActiveItemList] -TextHorizAlignP1=0 -TextHorizAlignP2=0 -TextZoom=0 -SpacingY=0 - [ScreenSelectGame] HelpText=&UP; &DOWN; to change line &LEFT; &RIGHT; to select between options::START to accept changes BACK to discard changes Game=Change the current game type with this option. @@ -1309,7 +1305,3 @@ IconsSpacingY=32 HelpText=Use &LEFT; &RIGHT; to select, then press START TimerSeconds=40 NextScreen=ScreenSelectMusic - -[Inventory] -AttackDurationSeconds=10 -ComboPerAttackLevel=50 \ No newline at end of file diff --git a/stepmania/src/ActiveItemList.cpp b/stepmania/src/ActiveItemList.cpp index 042e4eb2a1..81d38221bc 100644 --- a/stepmania/src/ActiveItemList.cpp +++ b/stepmania/src/ActiveItemList.cpp @@ -61,7 +61,7 @@ void ActiveItemList::Update( float fDelta ) if( (int)fNowSeconds != (int)fLastSeconds ) { - GameState::ActiveAttack* sActiveAttacks = GAMESTATE->m_sActiveAttacks[m_PlayerNumber]; // NUM_INVENTORY_SLOTS + GameState::ActiveAttack* sActiveAttacks = GAMESTATE->m_ActiveAttacks[m_PlayerNumber]; // NUM_INVENTORY_SLOTS for( int s=0; s 0 ) + if( m_ActiveAttacks[p][s].fSecsRemaining > 0 ) { - m_sActiveAttacks[p][s].fSecsRemaining -= fDelta; - if( m_sActiveAttacks[p][s].fSecsRemaining <= 0 ) + m_ActiveAttacks[p][s].fSecsRemaining -= fDelta; + if( m_ActiveAttacks[p][s].fSecsRemaining <= 0 ) { - m_sActiveAttacks[p][s].fSecsRemaining = 0; - m_sActiveAttacks[p][s].sModifier = ""; + m_ActiveAttacks[p][s].fSecsRemaining = 0; + m_ActiveAttacks[p][s].sModifier = ""; m_bActiveAttackEndedThisUpdate[p] = true; } } @@ -243,9 +243,11 @@ bool GameState::IsPlayable( const ModeChoice& mc ) bool GameState::IsPlayerEnabled( PlayerNumber pn ) { - // In battle, all players are present. Non-human players are CPU controlled. + // In battle and rave, all players are present. Non-human players are CPU controlled. if( m_PlayMode == PLAY_MODE_BATTLE ) return true; + if( m_PlayMode == PLAY_MODE_RAVE ) + return true; return IsHumanPlayer( pn ); } @@ -372,13 +374,13 @@ void GameState::RestoreSelectedOptions() } -void GameState::ActivateAttack( PlayerNumber target, ActiveAttack aa ) +void GameState::LaunchAttack( PlayerNumber target, ActiveAttack aa ) { // search for an open slot for( unsigned s=0; sm_StoredPlayerOptions[pn]; for( int s=0; sm_PlayerOptions[pn] = po; } diff --git a/stepmania/src/GameState.h b/stepmania/src/GameState.h index 60c8e70355..a5e1cc848e 100644 --- a/stepmania/src/GameState.h +++ b/stepmania/src/GameState.h @@ -148,21 +148,28 @@ public: void RestoreSelectedOptions(); + // used in PLAY_MODE_RAVE CString m_sCharacterName[NUM_PLAYERS]; AttackLevel m_MaxAttackLevel[NUM_PLAYERS]; CString m_sAttacks[NUM_PLAYERS][NUM_ATTACK_LEVELS][NUM_ATTACKS_PER_LEVEL]; + + // used in PLAY_MODE_BATTLE CString m_sInventory[NUM_PLAYERS][NUM_INVENTORY_SLOTS]; + + // used in PLAY_MODE_RAVE and PLAY_MODE_BATTLE struct ActiveAttack { float fSecsRemaining; CString sModifier; }; - ActiveAttack m_sActiveAttacks[NUM_PLAYERS][NUM_INVENTORY_SLOTS]; + ActiveAttack m_ActiveAttacks[NUM_PLAYERS][NUM_INVENTORY_SLOTS]; bool m_bActiveAttackEndedThisUpdate[NUM_PLAYERS]; // flag so we can play sounds - void ActivateAttack( PlayerNumber target, ActiveAttack aa ); + void LaunchAttack( PlayerNumber target, ActiveAttack aa ); void RebuildPlayerOptionsFromActiveAttacks( PlayerNumber pn ); void RemoveAllActiveAttacks(); // called on end of song + + bool HasEarnedExtraStage(); bool m_bAllow2ndExtraStage; //only used when "Allow Selection of Extra Stage is on" diff --git a/stepmania/src/Inventory.cpp b/stepmania/src/Inventory.cpp index 399b867d38..e9172d86ba 100644 --- a/stepmania/src/Inventory.cpp +++ b/stepmania/src/Inventory.cpp @@ -15,16 +15,35 @@ #include "RageUtil.h" #include "GameState.h" -CachedThemeMetricF ATTACK_DURATION_SECONDS ("Inventory","AttackDurationSeconds"); -CachedThemeMetricI COMBO_PER_ATTACK_LEVEL ("Inventory","ComboPerAttackLevel"); +#define NUM_ITEM_TYPES THEME->GetMetricF("Inventory","NumItemTypes") +#define ITEM_DURATION_SECONDS THEME->GetMetricF("Inventory","ItemDurationSeconds") +#define ITEM_COMBO( i ) THEME->GetMetricI("Inventory",ssprintf("Item%dCombo",i+1)) +#define ITEM_EFFECT( i ) THEME->GetMetric ("Inventory",ssprintf("Item%dEffect",i+1)) const PlayerNumber OPPOSITE_PLAYER[NUM_PLAYERS] = { PLAYER_2, PLAYER_1 }; +struct Item +{ + int iCombo; + CString sModifier; +}; +vector g_Items; + +void ReloadItems() +{ + g_Items.clear(); + for( int i=0; im_PlayMode ) + if( GAMESTATE->m_PlayMode == PLAY_MODE_BATTLE ) { - case PLAY_MODE_BATTLE: + for( int p=0; pGetPathTo("Sounds",ssprintf("Inventory aquire p%d",p+1)) ); - m_soundUseItem.Load( THEME->GetPathTo("Sounds",ssprintf("Inventory use p%d",p+1)) ); - m_soundItemEnding.Load( THEME->GetPathTo("Sounds",ssprintf("Inventory finished p%d",p+1)) ); - } + m_soundAcquireItem.Load( THEME->GetPathTo("Sounds",ssprintf("Inventory aquire item p%d",p+1)) ); + m_soundUseItem.Load( THEME->GetPathTo("Sounds",ssprintf("Inventory use item p%d",p+1)) ); + m_soundItemEnding.Load( THEME->GetPathTo("Sounds",ssprintf("Inventory item ending p%d",p+1)) ); } - break; } } void Inventory::Update( float fDelta ) { + if( GAMESTATE->m_PlayMode != PLAY_MODE_BATTLE ) + return; + if( GAMESTATE->m_bActiveAttackEndedThisUpdate[m_PlayerNumber] ) m_soundItemEnding.Play(); @@ -62,27 +80,25 @@ void Inventory::Update( float fDelta ) m_iLastSeenCombo = GAMESTATE->m_CurStageStats.iCurCombo[pn]; int iNewCombo = m_iLastSeenCombo; - int iLevelOfOldCombo = (iOldCombo/COMBO_PER_ATTACK_LEVEL) - 1; - int iLevelOfNewCombo = (iNewCombo/COMBO_PER_ATTACK_LEVEL) - 1; +#define CROSSED(i) (iOldCombo=i) - if( iLevelOfOldCombo < iLevelOfNewCombo && // combo increasing - iLevelOfNewCombo >= ATTACK_LEVEL_1 ) // attack level not negative + for( unsigned i=0; im_MaxAttackLevel[pn] ); - AttackLevel al = (AttackLevel)iLevelOfNewCombo; - AwardItem( al ); + if( CROSSED(g_Items[i].iCombo) ) + { + AwardItem( i ); + break; + } } } } -void Inventory::AwardItem( AttackLevel al ) +void Inventory::AwardItem( int iItemIndex ) { // search for the first open slot int iOpenSlot = -1; CString* asInventory = GAMESTATE->m_sInventory[m_PlayerNumber]; //[NUM_INVENTORY_SLOTS] - CString* asAttacks = GAMESTATE->m_sAttacks[m_PlayerNumber][al]; //[NUM_ATTACKS_PER_LEVEL] if( asInventory[NUM_INVENTORY_SLOTS/2] == "" ) iOpenSlot = NUM_INVENTORY_SLOTS/2; @@ -98,14 +114,14 @@ void Inventory::AwardItem( AttackLevel al ) if( iOpenSlot != -1 ) { - CString sAttackToGive = asAttacks[ rand()%NUM_ATTACKS_PER_LEVEL ]; + CString sAttackToGive = g_Items[iItemIndex].sModifier; asInventory[iOpenSlot] = sAttackToGive; m_soundAcquireItem.Play(); } // else not enough room to insert item } -void Inventory::UseAttack( int iSlot ) +void Inventory::UseItem( int iSlot ) { CString* asInventory = GAMESTATE->m_sInventory[m_PlayerNumber]; //[NUM_INVENTORY_SLOTS] @@ -115,10 +131,10 @@ void Inventory::UseAttack( int iSlot ) PlayerNumber pnToAttack = OPPOSITE_PLAYER[m_PlayerNumber]; GameState::ActiveAttack aa; - aa.fSecsRemaining = ATTACK_DURATION_SECONDS; + aa.fSecsRemaining = ITEM_DURATION_SECONDS; aa.sModifier = asInventory[iSlot]; - GAMESTATE->ActivateAttack( pnToAttack, aa ); + GAMESTATE->LaunchAttack( pnToAttack, aa ); GAMESTATE->RebuildPlayerOptionsFromActiveAttacks( pnToAttack ); // remove the item diff --git a/stepmania/src/Inventory.h b/stepmania/src/Inventory.h index 1bcaa48354..7255358a6f 100644 --- a/stepmania/src/Inventory.h +++ b/stepmania/src/Inventory.h @@ -4,7 +4,7 @@ ----------------------------------------------------------------------------- Class: Inventory - Desc: This a mark the player receives after clearing a song. + Desc: Inventory management for PLAY_MODE_BATTLE. Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved. Chris Danford @@ -14,7 +14,6 @@ #include "Actor.h" #include "PlayerNumber.h" #include "RageSound.h" -#include "GameConstantsAndTypes.h" class Inventory : public Actor @@ -26,10 +25,10 @@ public: virtual void Update( float fDelta ); virtual void DrawPrimitives() {}; - void UseAttack( int iSlot ); + void UseItem( int iSlot ); protected: - void AwardItem( AttackLevel al ); + void AwardItem( int iItemIndex ); PlayerNumber m_PlayerNumber; int m_iLastSeenCombo; diff --git a/stepmania/src/MusicWheel.cpp b/stepmania/src/MusicWheel.cpp index 302dc58808..bee10d9cc6 100644 --- a/stepmania/src/MusicWheel.cpp +++ b/stepmania/src/MusicWheel.cpp @@ -320,6 +320,7 @@ void MusicWheel::BuildWheelItemDatas( vector &arrayWheelItemDatas { case PLAY_MODE_ARCADE: case PLAY_MODE_BATTLE: + case PLAY_MODE_RAVE: { /////////////////////////////////// // Make an array of Song*, then sort them diff --git a/stepmania/src/RaveHelper.cpp b/stepmania/src/RaveHelper.cpp new file mode 100644 index 0000000000..162d4f3aba --- /dev/null +++ b/stepmania/src/RaveHelper.cpp @@ -0,0 +1,91 @@ +#include "global.h" +/* +----------------------------------------------------------------------------- + Class: RaveHelper + + Desc: See header. + + Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved. + Chris Danford +----------------------------------------------------------------------------- +*/ + +#include "RaveHelper.h" +#include "ThemeManager.h" +#include "RageUtil.h" +#include "GameState.h" + +CachedThemeMetricF ATTACK_DURATION_SECONDS ("RaveHelper","AttackDurationSeconds"); + +const PlayerNumber OPPOSITE_PLAYER[NUM_PLAYERS] = { PLAYER_2, PLAYER_1 }; + + +RaveHelper::RaveHelper() +{ + ATTACK_DURATION_SECONDS.Refresh(); +} + +void RaveHelper::Load( PlayerNumber pn ) +{ + m_PlayerNumber = pn; + + // don't load sounds if they're not going to be used + if( GAMESTATE->m_PlayMode == PLAY_MODE_RAVE ) + { + for( int p=0; pGetPathTo("Sounds",ssprintf("RaveHelper launch attack p%d",p+1)) ); + m_soundAttackEnding.Load( THEME->GetPathTo("Sounds",ssprintf("RaveHelper attack end p%d",p+1)) ); + } + } +} + +void RaveHelper::Update( float fDelta ) +{ + if( GAMESTATE->m_PlayMode != PLAY_MODE_RAVE ) + return; + + if( GAMESTATE->m_bActiveAttackEndedThisUpdate[m_PlayerNumber] ) + m_soundAttackEnding.Play(); + + PlayerNumber pn = m_PlayerNumber; + + // TODO: Award item based on Super meter +/* + // check to see if they deserve a new item + if( GAMESTATE->m_CurStageStats.iCurCombo[pn] != m_iLastSeenCombo ) + { + int iOldCombo = m_iLastSeenCombo; + m_iLastSeenCombo = GAMESTATE->m_CurStageStats.iCurCombo[pn]; + int iNewCombo = m_iLastSeenCombo; + + int iLevelOfOldCombo = (iOldCombo/COMBO_PER_ATTACK_LEVEL) - 1; + int iLevelOfNewCombo = (iNewCombo/COMBO_PER_ATTACK_LEVEL) - 1; + + if( iLevelOfOldCombo < iLevelOfNewCombo && // combo increasing + iLevelOfNewCombo >= ATTACK_LEVEL_1 ) // attack level not negative + { + // they deserve a new item + CLAMP( iLevelOfNewCombo, 0, GAMESTATE->m_MaxAttackLevel[pn] ); + AttackLevel al = (AttackLevel)iLevelOfNewCombo; + AwardItem( al ); + } + } + */ +} + +void RaveHelper::LaunchAttack( AttackLevel al ) +{ + CString* asAttacks = GAMESTATE->m_sAttacks[m_PlayerNumber][al]; // [NUM_ATTACKS_PER_LEVEL] + CString sAttackToGive = asAttacks[ rand()%NUM_ATTACKS_PER_LEVEL ]; + PlayerNumber pnToAttack = OPPOSITE_PLAYER[m_PlayerNumber]; + + GameState::ActiveAttack aa; + aa.fSecsRemaining = ATTACK_DURATION_SECONDS; + aa.sModifier = sAttackToGive; + + GAMESTATE->LaunchAttack( pnToAttack, aa ); + GAMESTATE->RebuildPlayerOptionsFromActiveAttacks( pnToAttack ); + + m_soundLaunchAttack.Play(); +} diff --git a/stepmania/src/RaveHelper.h b/stepmania/src/RaveHelper.h new file mode 100644 index 0000000000..d971f448ef --- /dev/null +++ b/stepmania/src/RaveHelper.h @@ -0,0 +1,38 @@ +#ifndef RaveHelper_H +#define RaveHelper_H +/* +----------------------------------------------------------------------------- + Class: RaveHelper + + Desc: Launches attacks in PLAY_MODE_RAVE. + + Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved. + Chris Danford +----------------------------------------------------------------------------- +*/ + +#include "Actor.h" +#include "PlayerNumber.h" +#include "RageSound.h" +#include "GameConstantsAndTypes.h" + + +class RaveHelper : public Actor +{ +public: + RaveHelper(); + void Load( PlayerNumber pn ); + + virtual void Update( float fDelta ); + virtual void DrawPrimitives() {}; + +protected: + void LaunchAttack( AttackLevel al ); + + PlayerNumber m_PlayerNumber; + + RageSound m_soundLaunchAttack; + RageSound m_soundAttackEnding; +}; + +#endif diff --git a/stepmania/src/ScoreDisplayRave.cpp b/stepmania/src/ScoreDisplayRave.cpp new file mode 100644 index 0000000000..448390c31c --- /dev/null +++ b/stepmania/src/ScoreDisplayRave.cpp @@ -0,0 +1,52 @@ +#include "global.h" +/* +----------------------------------------------------------------------------- + Class: ScoreDisplayRave.h + + Desc: A graphic displayed in the ScoreDisplayRave during Dancing. + + Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved. + Chris Danford +----------------------------------------------------------------------------- +*/ + +#include "ScoreDisplayRave.h" +#include "RageUtil.h" +#include "RageLog.h" +#include "PrefsManager.h" +#include "RageLog.h" +#include "GameState.h" +#include "ThemeManager.h" + +ScoreDisplayRave::ScoreDisplayRave() +{ + LOG->Trace( "ScoreDisplayRave::ScoreDisplayRave()" ); + + m_textCurrentAttack.LoadFromFont( THEME->GetPathTo("Fonts","Common normal") ); + this->AddChild( &m_textCurrentAttack ); +} + +void ScoreDisplayRave::Init( PlayerNumber pn ) +{ + ScoreDisplay::Init( pn ); +} + +void ScoreDisplayRave::Update( float fDelta ) +{ + ScoreDisplay::Update( fDelta ); + + CString sNewAttack = GAMESTATE->m_ActiveAttacks[m_PlayerNumber][0].sModifier; + + if( sNewAttack != m_sLastSeenAttack ) + { + m_textCurrentAttack.SetText( sNewAttack ); + m_textCurrentAttack.StopTweening(); + m_textCurrentAttack.Command( "diffuse,1,1,1,1;zoom,1;" + "sleep,0.1;linear,0;diffusealpha,0;" + "sleep,0.1;linear,0;diffusealpha,1;" + "sleep,0.1;linear,0;diffusealpha,0;" + "sleep,0.1;linear,0;diffusealpha,1;" + "sleep,0.1;linear,0;diffusealpha,0;" + "sleep,0.1;linear,0;diffusealpha,1;" ); + } +} diff --git a/stepmania/src/ScoreDisplayRave.h b/stepmania/src/ScoreDisplayRave.h new file mode 100644 index 0000000000..100981ca0e --- /dev/null +++ b/stepmania/src/ScoreDisplayRave.h @@ -0,0 +1,33 @@ +#ifndef ScoreDisplayRave_H +#define ScoreDisplayRave_H +/* +----------------------------------------------------------------------------- + Class: ScoreDisplayRave + + 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 "GameConstantsAndTypes.h" +#include "OptionIcon.h" + + +class ScoreDisplayRave : public ScoreDisplay +{ +public: + ScoreDisplayRave(); + virtual void Init( PlayerNumber pn ); + + virtual void Update( float fDelta ); + +protected: + BitmapText m_textCurrentAttack; + + CString m_sLastSeenAttack; +}; + +#endif diff --git a/stepmania/src/ScoreKeeperMAX2.cpp b/stepmania/src/ScoreKeeperMAX2.cpp index 65cdb4aa9f..1ea9f93802 100644 --- a/stepmania/src/ScoreKeeperMAX2.cpp +++ b/stepmania/src/ScoreKeeperMAX2.cpp @@ -31,6 +31,7 @@ ScoreKeeperMAX2::ScoreKeeperMAX2( const vector& apNotes, PlayerNumber pn { case PLAY_MODE_ARCADE: case PLAY_MODE_BATTLE: + case PLAY_MODE_RAVE: { ASSERT( !apNotes.empty() ); Notes* pNotes = apNotes[0]; @@ -126,6 +127,7 @@ void ScoreKeeperMAX2::AddScore( TapNoteScore score ) { case PLAY_MODE_ARCADE: case PLAY_MODE_BATTLE: + case PLAY_MODE_RAVE: switch( score ) { case TNS_MARVELOUS: p = 10; break; @@ -261,6 +263,7 @@ void ScoreKeeperMAX2::HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTa { case PLAY_MODE_ARCADE: case PLAY_MODE_BATTLE: + case PLAY_MODE_RAVE: case PLAY_MODE_NONSTOP: case PLAY_MODE_ENDLESS: switch( scoreOfLastTap ) @@ -381,6 +384,7 @@ int ScoreKeeperMAX2::TapNoteScoreToDancePoints( TapNoteScore tns ) { case PLAY_MODE_ARCADE: case PLAY_MODE_BATTLE: + case PLAY_MODE_RAVE: case PLAY_MODE_ENDLESS: case PLAY_MODE_NONSTOP: switch( tns ) @@ -416,6 +420,7 @@ int ScoreKeeperMAX2::HoldNoteScoreToDancePoints( HoldNoteScore hns ) { case PLAY_MODE_ARCADE: case PLAY_MODE_BATTLE: + case PLAY_MODE_RAVE: case PLAY_MODE_ENDLESS: case PLAY_MODE_NONSTOP: switch( hns ) diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index 99be63eaa7..e036279dc3 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -25,6 +25,7 @@ #include "ScoreDisplayNormal.h" #include "ScoreDisplayOni.h" #include "ScoreDisplayBattle.h" +#include "ScoreDisplayRave.h" #include "ScreenPrompt.h" #include "GrooveRadar.h" #include "NotesLoaderSM.h" @@ -286,6 +287,7 @@ ScreenGameplay::ScreenGameplay( bool bDemonstration ) { case PLAY_MODE_ARCADE: case PLAY_MODE_BATTLE: + case PLAY_MODE_RAVE: m_sprStage.Load( THEME->GetPathTo("Graphics","ScreenGameplay stage "+GAMESTATE->GetStageText()) ); m_sprStage.SetXY( STAGE_X, STAGE_Y(bExtra) ); this->AddChild( &m_sprStage ); @@ -346,6 +348,9 @@ ScreenGameplay::ScreenGameplay( bool bDemonstration ) case PLAY_MODE_BATTLE: m_pScoreDisplay[p] = new ScoreDisplayBattle; break; + case PLAY_MODE_RAVE: + m_pScoreDisplay[p] = new ScoreDisplayRave; + break; default: ASSERT(0); } @@ -402,6 +407,9 @@ ScreenGameplay::ScreenGameplay( bool bDemonstration ) { m_Inventory[p].Load( (PlayerNumber)p ); this->AddChild( &m_Inventory[p] ); + + m_RaveHelper[p].Load( (PlayerNumber)p ); + this->AddChild( &m_RaveHelper[p] ); } @@ -869,6 +877,7 @@ void ScreenGameplay::Update( float fDeltaTime ) { case PLAY_MODE_ARCADE: case PLAY_MODE_BATTLE: + case PLAY_MODE_RAVE: if( OneIsHot() ) m_announcerHot.PlayRandom(); else if( AllAreInDanger() ) m_announcerDanger.PlayRandom(); else m_announcerGood.PlayRandom(); @@ -1077,7 +1086,7 @@ void ScreenGameplay::Input( const DeviceInput& DeviceI, const InputEventType typ } if( iItemSlot != -1 ) - m_Inventory[MenuI.player].UseAttack( iItemSlot ); + m_Inventory[MenuI.player].UseItem( iItemSlot ); } } @@ -1107,6 +1116,7 @@ void SaveChanges() { case PLAY_MODE_ARCADE: case PLAY_MODE_BATTLE: + case PLAY_MODE_RAVE: GAMESTATE->m_pCurSong->Save(); break; case PLAY_MODE_NONSTOP: @@ -1130,6 +1140,7 @@ void DontSaveChanges() { case PLAY_MODE_ARCADE: case PLAY_MODE_BATTLE: + case PLAY_MODE_RAVE: ld.LoadFromSMFile(GAMESTATE->m_pCurSong->GetCacheFilePath(), *GAMESTATE->m_pCurSong); break; @@ -1157,6 +1168,7 @@ void ShowSavePrompt( ScreenMessage SM_SendWhenDone ) { case PLAY_MODE_ARCADE: case PLAY_MODE_BATTLE: + case PLAY_MODE_RAVE: sMessage = ssprintf( "You have changed the offset or BPM of\n" "%s.\n" @@ -1418,6 +1430,7 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM ) { case PLAY_MODE_ARCADE: case PLAY_MODE_BATTLE: + case PLAY_MODE_RAVE: // SCREENMAN->SetNewScreen( "ScreenSelectMusic" ); SCREENMAN->SetNewScreen( SONGSEL_SCREEN ); break; @@ -1445,6 +1458,7 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM ) { case PLAY_MODE_ARCADE: case PLAY_MODE_BATTLE: + case PLAY_MODE_RAVE: SCREENMAN->SetNewScreen( "ScreenEvaluationStage" ); break; case PLAY_MODE_NONSTOP: @@ -1506,6 +1520,7 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM ) { case PLAY_MODE_ARCADE: case PLAY_MODE_BATTLE: + case PLAY_MODE_RAVE: if( PREFSMAN->m_bEventMode ) HandleScreenMessage( SM_GoToScreenAfterBack ); else if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() ) diff --git a/stepmania/src/ScreenGameplay.h b/stepmania/src/ScreenGameplay.h index d5e316539c..2a4ff73152 100644 --- a/stepmania/src/ScreenGameplay.h +++ b/stepmania/src/ScreenGameplay.h @@ -27,6 +27,7 @@ #include "DifficultyIcon.h" #include "BPMDisplay.h" #include "Inventory.h" +#include "RaveHelper.h" #include "ActiveItemList.h" //#include "BeginnerHelper.h" // uncomment once it's checked in #include "LyricDisplay.h" @@ -134,8 +135,12 @@ protected: Player m_Player[NUM_PLAYERS]; + // used in PLAY_MODE_BATTLE Inventory m_Inventory[NUM_PLAYERS]; ActiveItemList m_ActiveItemList[NUM_PLAYERS]; + + // used in PLAY_MODE_RAVE + RaveHelper m_RaveHelper[NUM_PLAYERS]; DifficultyIcon m_DifficultyIcon[NUM_PLAYERS]; diff --git a/stepmania/src/ScreenInstructions.cpp b/stepmania/src/ScreenInstructions.cpp index 835af81358..1539fb98cc 100644 --- a/stepmania/src/ScreenInstructions.cpp +++ b/stepmania/src/ScreenInstructions.cpp @@ -27,6 +27,7 @@ #define NEXT_SCREEN_ARCADE THEME->GetMetric("ScreenInstructions","NextScreenArcade") #define NEXT_SCREEN_ONI THEME->GetMetric("ScreenInstructions","NextScreenOni") #define NEXT_SCREEN_BATTLE THEME->GetMetric("ScreenInstructions","NextScreenBattle") +#define NEXT_SCREEN_RAVE THEME->GetMetric("ScreenInstructions","NextScreenRave") ScreenInstructions::ScreenInstructions() @@ -130,6 +131,9 @@ void ScreenInstructions::HandleScreenMessage( const ScreenMessage SM ) case PLAY_MODE_BATTLE: SCREENMAN->SetNewScreen( NEXT_SCREEN_BATTLE ); break; + case PLAY_MODE_RAVE: + SCREENMAN->SetNewScreen( NEXT_SCREEN_RAVE ); + break; default: ASSERT(0); } diff --git a/stepmania/src/ScreenNameEntry.cpp b/stepmania/src/ScreenNameEntry.cpp index 7967a80b6d..f72bf5920a 100644 --- a/stepmania/src/ScreenNameEntry.cpp +++ b/stepmania/src/ScreenNameEntry.cpp @@ -194,6 +194,7 @@ ScreenNameEntry::ScreenNameEntry() { case PLAY_MODE_ARCADE: case PLAY_MODE_BATTLE: + case PLAY_MODE_RAVE: { StageStats SS; vector vSongs; @@ -392,6 +393,7 @@ void ScreenNameEntry::MenuStart( PlayerNumber pn ) { case PLAY_MODE_ARCADE: case PLAY_MODE_BATTLE: + case PLAY_MODE_RAVE: 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/StepMania.vcproj b/stepmania/src/StepMania.vcproj index 099664888f..d8aea618de 100644 --- a/stepmania/src/StepMania.vcproj +++ b/stepmania/src/StepMania.vcproj @@ -1379,6 +1379,12 @@ cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ + + + +