make Rave a separate PlayMode
This commit is contained in:
@@ -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
|
||||
@@ -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<NUM_INVENTORY_SLOTS; s++ )
|
||||
{
|
||||
GameState::ActiveAttack& aa = sActiveAttacks[s];
|
||||
|
||||
@@ -59,6 +59,7 @@ CString PlayModeToString( PlayMode pm )
|
||||
case PLAY_MODE_NONSTOP: return "nonstop";
|
||||
case PLAY_MODE_ENDLESS: return "endless";
|
||||
case PLAY_MODE_BATTLE: return "battle";
|
||||
case PLAY_MODE_RAVE: return "rave";
|
||||
default: ASSERT(0); return "";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,7 +88,8 @@ enum PlayMode
|
||||
PLAY_MODE_NONSTOP, // DDR EX Nonstop
|
||||
PLAY_MODE_ONI, // DDR EX Challenge
|
||||
PLAY_MODE_ENDLESS, // DDR PlayStation Endless
|
||||
PLAY_MODE_BATTLE,
|
||||
PLAY_MODE_BATTLE, // inventory battle
|
||||
PLAY_MODE_RAVE, // DDR Disney Rave "Dance Magic"
|
||||
NUM_PLAY_MODES,
|
||||
PLAY_MODE_INVALID
|
||||
};
|
||||
|
||||
+14
-12
@@ -104,13 +104,13 @@ void GameState::Update( float fDelta )
|
||||
|
||||
for( unsigned s=0; s<NUM_INVENTORY_SLOTS; s++ )
|
||||
{
|
||||
if( m_sActiveAttacks[p][s].fSecsRemaining > 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; s<NUM_INVENTORY_SLOTS; s++ )
|
||||
if( m_sActiveAttacks[target][s].fSecsRemaining <= 0 )
|
||||
if( m_ActiveAttacks[target][s].fSecsRemaining <= 0 )
|
||||
{
|
||||
m_sActiveAttacks[target][s] = aa;
|
||||
m_ActiveAttacks[target][s] = aa;
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -388,8 +390,8 @@ void GameState::RemoveAllActiveAttacks()
|
||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||
for( unsigned s=0; s<NUM_INVENTORY_SLOTS; s++ )
|
||||
{
|
||||
m_sActiveAttacks[p][s].fSecsRemaining = 0;
|
||||
m_sActiveAttacks[p][s].sModifier = "";
|
||||
m_ActiveAttacks[p][s].fSecsRemaining = 0;
|
||||
m_ActiveAttacks[p][s].sModifier = "";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -399,7 +401,7 @@ void GameState::RebuildPlayerOptionsFromActiveAttacks( PlayerNumber pn )
|
||||
PlayerOptions po = GAMESTATE->m_StoredPlayerOptions[pn];
|
||||
for( int s=0; s<NUM_INVENTORY_SLOTS; s++ )
|
||||
{
|
||||
po.FromString( m_sActiveAttacks[pn][s].sModifier );
|
||||
po.FromString( m_ActiveAttacks[pn][s].sModifier );
|
||||
}
|
||||
GAMESTATE->m_PlayerOptions[pn] = po;
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
+43
-27
@@ -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<Item> g_Items;
|
||||
|
||||
void ReloadItems()
|
||||
{
|
||||
g_Items.clear();
|
||||
for( int i=0; i<NUM_ITEM_TYPES; i++ )
|
||||
{
|
||||
Item item;
|
||||
item.iCombo = ITEM_COMBO(i);
|
||||
item.sModifier = ITEM_EFFECT(i);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Inventory::Inventory()
|
||||
{
|
||||
ATTACK_DURATION_SECONDS.Refresh();
|
||||
COMBO_PER_ATTACK_LEVEL.Refresh();
|
||||
ReloadItems();
|
||||
}
|
||||
|
||||
void Inventory::Load( PlayerNumber pn )
|
||||
@@ -33,23 +52,22 @@ void Inventory::Load( PlayerNumber pn )
|
||||
m_iLastSeenCombo = 0;
|
||||
|
||||
// don't load battle sounds if they're not going to be used
|
||||
switch( GAMESTATE->m_PlayMode )
|
||||
if( GAMESTATE->m_PlayMode == PLAY_MODE_BATTLE )
|
||||
{
|
||||
case PLAY_MODE_BATTLE:
|
||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||
{
|
||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||
{
|
||||
m_soundAcquireItem.Load( THEME->GetPathTo("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)&&(iNewCombo>=i)
|
||||
|
||||
if( iLevelOfOldCombo < iLevelOfNewCombo && // combo increasing
|
||||
iLevelOfNewCombo >= ATTACK_LEVEL_1 ) // attack level not negative
|
||||
for( unsigned i=0; i<g_Items.size(); i++ )
|
||||
{
|
||||
// they deserve a new item
|
||||
CLAMP( iLevelOfNewCombo, 0, GAMESTATE->m_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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -320,6 +320,7 @@ void MusicWheel::BuildWheelItemDatas( vector<WheelItemData> &arrayWheelItemDatas
|
||||
{
|
||||
case PLAY_MODE_ARCADE:
|
||||
case PLAY_MODE_BATTLE:
|
||||
case PLAY_MODE_RAVE:
|
||||
{
|
||||
///////////////////////////////////
|
||||
// Make an array of Song*, then sort them
|
||||
|
||||
@@ -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; p<NUM_PLAYERS; p++ )
|
||||
{
|
||||
m_soundLaunchAttack.Load( THEME->GetPathTo("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();
|
||||
}
|
||||
@@ -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
|
||||
@@ -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;" );
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
@@ -31,6 +31,7 @@ ScoreKeeperMAX2::ScoreKeeperMAX2( const vector<Notes*>& 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 )
|
||||
|
||||
@@ -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() )
|
||||
|
||||
@@ -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];
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -194,6 +194,7 @@ ScreenNameEntry::ScreenNameEntry()
|
||||
{
|
||||
case PLAY_MODE_ARCADE:
|
||||
case PLAY_MODE_BATTLE:
|
||||
case PLAY_MODE_RAVE:
|
||||
{
|
||||
StageStats SS;
|
||||
vector<Song*> 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:
|
||||
|
||||
@@ -1379,6 +1379,12 @@ cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
|
||||
<File
|
||||
RelativePath="ScoreDisplayOni.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="ScoreDisplayRave.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="ScoreDisplayRave.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="ScoreKeeper.cpp">
|
||||
</File>
|
||||
|
||||
Reference in New Issue
Block a user