working on Battle

This commit is contained in:
Chris Danford
2003-02-25 00:33:42 +00:00
parent 32d2cd8cc1
commit 5f15c92404
34 changed files with 512 additions and 171 deletions
+10 -1
View File
@@ -193,6 +193,7 @@ NextScreen=ScreenInstructions
[ScreenInstructions]
NextScreenArcade=ScreenSelectMusic
NextScreenOni=ScreenSelectCourse
NextScreenBattle=ScreenSelectMusic
HelpText=Press START to continue
TimerSeconds=15
@@ -998,4 +999,12 @@ DifficultyZoom=0.7
ModifiersX=128
ModifiersY=10
ModifiersZoom=0.5
ModifiersHorizAlign=2
ModifiersHorizAlign=2
[Inventory]
NumItemTypes=2
ItemDurationSeconds=10
Item1Combo=50
Item1Effect=boost
Item2Combo=100
Item2Effect=expand
+1 -1
View File
@@ -80,7 +80,7 @@ void Banner::LoadFromGroup( CString sGroupName )
{
CString sGroupBannerPath = SONGMAN->GetGroupBannerPath( sGroupName );
if( sGroupName == "ALL MUSIC" )
if( sGroupName == GROUP_ALL_MUSIC )
Load( THEME->GetPathTo("Graphics","all music banner") );
else if( sGroupBannerPath != "" )
Load( sGroupBannerPath );
+2
View File
@@ -162,6 +162,8 @@ void Combo::SetScore( TapNoteScore score, int iNumNotesInThisRow )
if( m_iCurCombo > 50 )
SCREENMAN->SendMessageToTopScreen( SM_ComboStopped, 0 );
GAMESTATE->m_Inventory[m_PlayerNumber].OnComboBroken( m_iCurCombo );
m_iCurCombo = 0;
m_textComboNumber.SetDiffuse( RageColor(1,1,1,0) ); // invisible
+4
View File
@@ -23,6 +23,8 @@ class Combo : public ActorFrame
public:
Combo();
void Init( PlayerNumber pn ) { m_PlayerNumber = pn; }
void SetScore( TapNoteScore score, int iNumNotesInThisRow );
int GetCurrentCombo() const { return m_iCurCombo; }
@@ -30,6 +32,8 @@ public:
void Reset();
protected:
PlayerNumber m_PlayerNumber;
int m_iCurCombo;
int m_iMaxCombo;
int m_iCurComboOfPerfects;
+7
View File
@@ -211,4 +211,11 @@ RankingCategory AverageMeterToRankingCategory( float fAverageMeter );
const int NUM_RANKING_LINES = 5;
const int MAX_RANKING_NAME_LENGTH = 4;
//
// Group stuff
//
const CString GROUP_ALL_MUSIC = "";
#endif
+4 -1
View File
@@ -67,7 +67,7 @@ void GameState::Reset()
m_bSideIsJoined[p] = false;
// m_iCoins = 0; // don't reset coin count!
m_MasterPlayerNumber = PLAYER_INVALID;
m_sPreferredGroup = "";
m_sPreferredGroup = GROUP_ALL_MUSIC;
for( p=0; p<NUM_PLAYERS; p++ )
m_PreferredDifficulty[p] = DIFFICULTY_INVALID;
m_SongSortOrder = SORT_GROUP;
@@ -113,6 +113,9 @@ void GameState::ResetMusicStatistics()
m_fCurBPS = 10;
m_bFreeze = false;
m_bPastHereWeGo = false;
for( int p=0; p<NUM_PLAYERS; p++ )
m_Inventory[p].Reset();
}
void GameState::UpdateSongPosition(float fPositionSeconds)
+3 -1
View File
@@ -18,6 +18,7 @@
#include "Style.h"
#include "Grade.h"
#include "StageStats.h"
#include "Inventory.h"
class Song;
@@ -62,7 +63,7 @@ public:
bool IsPlayerEnabled( int p ) { return IsPlayerEnabled( (PlayerNumber)p ); }; // for those too lasy to cast all those p's to a PlayerNumber
CString m_sLoadingMessage; // used in loading screen
CString m_sPreferredGroup; // "ALL MUSIC" denotes no preferred group
CString m_sPreferredGroup; // GROUP_ALL_MUSIC denotes no preferred group
Difficulty m_PreferredDifficulty[NUM_PLAYERS];
SongSortOrder m_SongSortOrder; // used by MusicWheel
PlayMode m_PlayMode; // many screen display different info depending on this value
@@ -123,6 +124,7 @@ public:
// courses separately from the active options.
SongOptions m_SongOptions;
Inventory m_Inventory[NUM_PLAYERS];
bool HasEarnedExtraStage();
bool m_bAllow2ndExtraStage; //only used when "Allow Selection of Extra Stage is on"
+117
View File
@@ -0,0 +1,117 @@
#include "global.h"
/*
-----------------------------------------------------------------------------
Class: Inventory
Desc: See header.
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Chris Danford
-----------------------------------------------------------------------------
*/
#include "Inventory.h"
#include "ThemeManager.h"
#include "RageUtil.h"
#include "GameState.h"
#define NUM_ITEM_TYPES THEME->GetMetricF("Inventory","NumItemTypes")
#define ITEM_DURATION_SECONDS THEME->GetMetricF("Inventory","ItemDuration")
#define ITEM_COMBO( i ) THEME->GetMetricI("Inventory",ssprintf("Item%dCombo",i+1))
#define ITEM_EFFECT( i ) THEME->GetMetric ("Inventory",ssprintf("Item%dEffect",i+1))
bool ItemDef::operator<( const ItemDef& other )
{
return comboLevel < other.comboLevel;
}
void ItemDef::Sort( vector<ItemDef>& items )
{
sort( items.begin(), items.end() );
}
Inventory::Inventory()
{
Reset();
}
void Inventory::Reset()
{
for( int i=0; i<NUM_ITEM_SLOTS; i++ )
m_iItems[i] = ITEM_NONE;
}
void Inventory::RefreshPossibleItems()
{
m_ItemDefs.clear();
for( int i=0; i<NUM_ITEM_TYPES; i++ )
{
ItemDef def;
def.comboLevel = ITEM_COMBO(i);
def.effect = ITEM_EFFECT(i);
m_ItemDefs.push_back( def );
}
}
void Inventory::OnComboBroken( int iCombo )
{
// search for the item acquired
for( int item=0; item<(int)m_ItemDefs.size(); item++ )
if( m_ItemDefs[item].comboLevel > iCombo )
break;
item--; // back up because we went one too far
if( item == -1 ) // no item acquired
return;
else
{
// give them an item
// search for the first open slot
int iOpenSlot = -1;
if( m_iItems[NUM_ITEM_SLOTS/2] == ITEM_NONE )
iOpenSlot = NUM_ITEM_SLOTS/2;
else
{
for( int s=0; s<NUM_ITEM_SLOTS; s++ )
if( m_iItems[s] == ITEM_NONE )
{
iOpenSlot = s;
break;
}
}
if( iOpenSlot != -1 )
m_iItems[iOpenSlot] = item;
else
; // not enough room to insert item
}
}
void Inventory::UseItem( PlayerNumber pn, int iSlot )
{
if( m_iItems[iSlot] == ITEM_NONE )
return;
const ItemDef& def = m_ItemDefs[iSlot];
PlayerNumber pnToAttack;
switch( pn )
{
case PLAYER_1: pnToAttack = PLAYER_2; break;
case PLAYER_2: pnToAttack = PLAYER_1; break;
default: ASSERT(0); pnToAttack = PLAYER_INVALID; break;
}
GAMESTATE->m_PlayerOptions[pnToAttack].FromString( def.effect );
// remove the item
m_iItems[iSlot] = ITEM_NONE;
}
+43
View File
@@ -0,0 +1,43 @@
#ifndef Inventory_H
#define Inventory_H
/*
-----------------------------------------------------------------------------
Class: Inventory
Desc: This a mark the player receives after clearing a song.
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Chris Danford
-----------------------------------------------------------------------------
*/
#include "GameConstantsAndTypes.h"
const int ITEM_NONE = -1;
const int NUM_ITEM_SLOTS = 3;
const int MAX_ITEM_TYPES = 20;
struct ItemDef
{
int comboLevel;
CString effect;
bool operator<( const ItemDef& other );
void Sort( vector<ItemDef>& items );
};
class Inventory
{
public:
Inventory();
void Reset();
void RefreshPossibleItems();
void OnComboBroken( int iCombo );
void UseItem( PlayerNumber pn, int iSlot );
vector<ItemDef> m_ItemDefs;
int m_iItems[NUM_ITEM_SLOTS];
};
#endif
+1 -1
View File
@@ -66,7 +66,7 @@ JukeboxMenu::JukeboxMenu()
// fill in data structures
GAMEMAN->GetStylesForGame( GAMESTATE->m_CurGame, m_Styles );
SONGMAN->GetGroupNames( m_sGroups );
m_sGroups.insert( m_sGroups.begin(), "All Music" );
m_sGroups.insert( m_sGroups.begin(), "ALL MUSIC" );
m_sDifficulties.push_back( "all difficulties" );
for( int d=0; d<NUM_DIFFICULTIES; d++ )
m_sDifficulties.push_back( DifficultyToString( (Difficulty)d ) );
+1 -1
View File
@@ -50,7 +50,7 @@ MusicBannerWheel::MusicBannerWheel()
m_ScrollingList.SetSpacing( BANNERSPACING );
this->AddChild( &m_ScrollingList );
if( 0 == stricmp(GAMESTATE->m_sPreferredGroup, "All Music") )
if( GAMESTATE->m_sPreferredGroup == GROUP_ALL_MUSIC )
SONGMAN->GetSongs( arraySongs, GAMESTATE->GetNumStagesLeft() );
else // Get the Group They Want
SONGMAN->GetSongs( arraySongs, GAMESTATE->m_sPreferredGroup, GAMESTATE->GetNumStagesLeft() );
+45 -36
View File
@@ -112,7 +112,7 @@ MusicWheel::MusicWheel()
if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() )
{
// make the preferred group the group of the last song played.
if( GAMESTATE->m_sPreferredGroup == "ALL MUSIC" && !PREFSMAN->m_bPickExtraStage )
if( GAMESTATE->m_sPreferredGroup==GROUP_ALL_MUSIC && !PREFSMAN->m_bPickExtraStage )
GAMESTATE->m_sPreferredGroup = GAMESTATE->m_pCurSong->m_sGroupName;
Song* pSong;
@@ -294,12 +294,23 @@ void MusicWheel::BuildWheelItemDatas( vector<WheelItemData> &arrayWheelItemDatas
{
unsigned i;
if(so == SongSortOrder(SORT_ROULETTE) && GAMESTATE->m_PlayMode != PLAY_MODE_ARCADE)
return; /* only used in arcade */
// Roulette is used only in arcade and battle
if( so == SongSortOrder(SORT_ROULETTE) )
{
switch( GAMESTATE->m_PlayMode )
{
case PLAY_MODE_ARCADE:
case PLAY_MODE_BATTLE:
break;
default:
return;
}
}
switch( GAMESTATE->m_PlayMode )
{
case PLAY_MODE_ARCADE:
case PLAY_MODE_BATTLE:
{
///////////////////////////////////
// Make an array of Song*, then sort them
@@ -345,7 +356,7 @@ void MusicWheel::BuildWheelItemDatas( vector<WheelItemData> &arrayWheelItemDatas
{
case SORT_MOST_PLAYED: bUseSections = false; break;
case SORT_BPM: bUseSections = false; break;
case SORT_GROUP: bUseSections = GAMESTATE->m_sPreferredGroup == "ALL MUSIC"; break;
case SORT_GROUP: bUseSections = GAMESTATE->m_sPreferredGroup == GROUP_ALL_MUSIC; break;
case SORT_TITLE: bUseSections = true; break;
case SORT_ROULETTE: bUseSections = false; break;
default: ASSERT( false );
@@ -370,7 +381,7 @@ void MusicWheel::BuildWheelItemDatas( vector<WheelItemData> &arrayWheelItemDatas
CString sThisSection = GetSectionNameFromSongAndSort( pSong, so );
int iSectionColorIndex = 0;
if( GAMESTATE->m_sPreferredGroup != "ALL MUSIC" && pSong->m_sGroupName != GAMESTATE->m_sPreferredGroup )
if( GAMESTATE->m_sPreferredGroup != GROUP_ALL_MUSIC && pSong->m_sGroupName != GAMESTATE->m_sPreferredGroup )
continue;
if( sThisSection != sLastSection) // new section, make a section item
@@ -389,46 +400,44 @@ void MusicWheel::BuildWheelItemDatas( vector<WheelItemData> &arrayWheelItemDatas
for( unsigned i=0; i<arraySongs.size(); i++ )
{
Song* pSong = arraySongs[i];
if( GAMESTATE->m_sPreferredGroup != "ALL MUSIC" && pSong->m_sGroupName != GAMESTATE->m_sPreferredGroup )
if( GAMESTATE->m_sPreferredGroup != GROUP_ALL_MUSIC && pSong->m_sGroupName != GAMESTATE->m_sPreferredGroup )
continue; // skip
arrayWheelItemDatas.push_back( WheelItemData(TYPE_SONG, pSong, "", NULL, SONGMAN->GetSongColor(pSong)) );
}
}
}
if( so != SORT_ROULETTE )
{
arrayWheelItemDatas.push_back( WheelItemData(TYPE_ROULETTE, NULL, "", NULL, RageColor(1,0,0,1)) );
arrayWheelItemDatas.push_back( WheelItemData(TYPE_RANDOM, NULL, "", NULL, RageColor(1,0,0,1)) );
}
// HACK: Add extra stage item if it isn't already present on the music wheel
if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() )
{
Song* pSong;
Notes* pNotes;
PlayerOptions po;
SongOptions so;
SONGMAN->GetExtraStageInfo( GAMESTATE->IsExtraStage2(), GAMESTATE->m_pCurSong->m_sGroupName, GAMESTATE->GetCurrentStyleDef(), pSong, pNotes, po, so );
bool bFoundExtraSong = false;
for( unsigned i=0; i<arrayWheelItemDatas.size(); i++ )
if( so != SORT_ROULETTE )
{
if( arrayWheelItemDatas[i].m_pSong == pSong )
{
/* Change the song color. */
arrayWheelItemDatas[i].m_color = SONG_REAL_EXTRA_COLOR;
bFoundExtraSong = true;
break;
}
arrayWheelItemDatas.push_back( WheelItemData(TYPE_ROULETTE, NULL, "", NULL, RageColor(1,0,0,1)) );
arrayWheelItemDatas.push_back( WheelItemData(TYPE_RANDOM, NULL, "", NULL, RageColor(1,0,0,1)) );
}
if( !bFoundExtraSong )
arrayWheelItemDatas.push_back( WheelItemData(TYPE_SONG, pSong, "", NULL, SONG_REAL_EXTRA_COLOR) );
}
// HACK: Add extra stage item if it isn't already present on the music wheel
if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() )
{
Song* pSong;
Notes* pNotes;
PlayerOptions po;
SongOptions so;
SONGMAN->GetExtraStageInfo( GAMESTATE->IsExtraStage2(), GAMESTATE->m_pCurSong->m_sGroupName, GAMESTATE->GetCurrentStyleDef(), pSong, pNotes, po, so );
bool bFoundExtraSong = false;
for( unsigned i=0; i<arrayWheelItemDatas.size(); i++ )
{
if( arrayWheelItemDatas[i].m_pSong == pSong )
{
/* Change the song color. */
arrayWheelItemDatas[i].m_color = SONG_REAL_EXTRA_COLOR;
bFoundExtraSong = true;
break;
}
}
if( !bFoundExtraSong )
arrayWheelItemDatas.push_back( WheelItemData(TYPE_SONG, pSong, "", NULL, SONG_REAL_EXTRA_COLOR) );
}
}
break;
case PLAY_MODE_NONSTOP:
case PLAY_MODE_ONI:
+1
View File
@@ -91,6 +91,7 @@ void Player::Load( PlayerNumber pn, NoteData* pNoteData, LifeMeter* pLM, ScoreDi
* then we could just this->StopTweening()? -glenn */
m_Judgment.StopTweening();
// m_Combo.Reset(); // don't reset combos between songs in a course!
m_Combo.Init( pn );
m_Judgment.Reset();
if(m_ScoreKeeper) delete m_ScoreKeeper;
+2 -7
View File
@@ -11,20 +11,15 @@
-----------------------------------------------------------------------------
*/
#include "Sprite.h"
#include "GameConstantsAndTypes.h"
#include "ActorFrame.h"
#include "BitmapText.h"
class ScoreDisplay : public BitmapText
class ScoreDisplay : public ActorFrame
{
public:
virtual void Init( PlayerNumber pn ) { m_PlayerNumber = pn; };
virtual void Update( float fDeltaTime ) = 0;
virtual void Draw() = 0;
virtual void SetScore( float fNewScore ) = 0;
virtual void SetScore( float fNewScore ) {};
protected:
PlayerNumber m_PlayerNumber; // needed to look up statistics in GAMESTATE
+59
View File
@@ -0,0 +1,59 @@
#include "global.h"
/*
-----------------------------------------------------------------------------
Class: ScoreDisplayBattle.h
Desc: A graphic displayed in the ScoreDisplayBattle during Dancing.
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Chris Danford
-----------------------------------------------------------------------------
*/
#include "ScoreDisplayBattle.h"
#include "RageUtil.h"
#include "RageLog.h"
#include "PrefsManager.h"
#include "RageLog.h"
#include "GameState.h"
#include "ThemeManager.h"
ScoreDisplayBattle::ScoreDisplayBattle()
{
LOG->Trace( "ScoreDisplayBattle::ScoreDisplayBattle()" );
for( int i=0; i<NUM_ITEM_SLOTS; i++ )
{
float fX = (float)SCALE(i,0.f,2.f,-60.f,60.f);
m_sprFrames[i].Load( THEME->GetPathTo("Graphics","gameplay battle item frames 3x1") );
m_sprFrames[i].SetX( fX );
m_sprFrames[i].StopAnimating();
m_sprFrames[i].SetState( i );
this->AddChild( &m_sprFrames[i] );
m_sprItems[i].SetX( fX );
m_sprItems[i].Load( THEME->GetPathTo("Graphics","gameplay battle item icons") );
m_sprItems[i].StopAnimating();
this->AddChild( &m_sprItems[i] );
}
}
void ScoreDisplayBattle::Update( float fDelta )
{
ScoreDisplay::Update( fDelta );
for( int i=0; i<NUM_ITEM_SLOTS; i++ )
{
int item = GAMESTATE->m_Inventory[m_PlayerNumber].m_iItems[i];
if( item == ITEM_NONE )
m_sprItems[i].SetDiffuse( RageColor(1,1,1,0) );
else
{
m_sprItems[i].SetDiffuse( RageColor(1,1,1,1) );
m_sprItems[i].SetState( item );
}
}
}
+32
View File
@@ -0,0 +1,32 @@
#ifndef ScoreDisplayBattle_H
#define ScoreDisplayBattle_H
/*
-----------------------------------------------------------------------------
Class: ScoreDisplayBattle
Desc: Shows point score during gameplay and used in some menus.
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Chris Danford
-----------------------------------------------------------------------------
*/
#include "ScoreDisplay.h"
#include "Sprite.h"
#include "Inventory.h"
class ScoreDisplayBattle : public ScoreDisplay
{
public:
ScoreDisplayBattle();
virtual void Update( float fDelta );
protected:
Sprite m_sprFrames[NUM_ITEM_SLOTS];
Sprite m_sprItems[NUM_ITEM_SLOTS];
};
#endif
+15 -12
View File
@@ -20,6 +20,7 @@
const float SCORE_TWEEN_TIME = 0.2f;
const int NUM_SCORE_DIGITS = 9;
ScoreDisplayNormal::ScoreDisplayNormal()
@@ -27,8 +28,8 @@ ScoreDisplayNormal::ScoreDisplayNormal()
LOG->Trace( "ScoreDisplayNormal::ScoreDisplayNormal()" );
// init the text
BitmapText::LoadFromNumbers( THEME->GetPathTo("Numbers","gameplay score numbers") );
TurnShadowOff();
m_text.LoadFromNumbers( THEME->GetPathTo("Numbers","gameplay score numbers") );
m_text.TurnShadowOff();
m_fScore = 0;
m_fTrailingScore = 0;
@@ -37,13 +38,14 @@ ScoreDisplayNormal::ScoreDisplayNormal()
CString s;
for( int i=0; i<NUM_SCORE_DIGITS; i++ )
s += ' ';
SetText( s );
m_text.SetText( s );
this->AddChild( &m_text );
}
void ScoreDisplayNormal::Init( PlayerNumber pn )
void ScoreDisplayNormal::Init( PlayerNumber pn )
{
m_PlayerNumber = pn;
ScoreDisplay::Init( pn );
m_text.SetDiffuse( PlayerToColor(pn) );
}
void ScoreDisplayNormal::SetScore( float fNewScore )
@@ -55,9 +57,14 @@ void ScoreDisplayNormal::SetScore( float fNewScore )
m_fScoreVelocity = fDelta / SCORE_TWEEN_TIME; // in score units per second
}
void ScoreDisplayNormal::SetText( CString s )
{
m_text.SetText( s );
}
void ScoreDisplayNormal::Update( float fDeltaTime )
{
BitmapText::Update( fDeltaTime );
ScoreDisplay::Update( fDeltaTime );
if( m_fTrailingScore != m_fScore )
{
@@ -71,11 +78,7 @@ void ScoreDisplayNormal::Update( float fDeltaTime )
m_fScoreVelocity = 0;
}
SetText( ssprintf("%*.0f", NUM_SCORE_DIGITS, m_fTrailingScore) );
m_text.SetText( ssprintf("%*.0f", NUM_SCORE_DIGITS, m_fTrailingScore) );
}
}
void ScoreDisplayNormal::Draw()
{
BitmapText::Draw();
}
+4 -3
View File
@@ -12,10 +12,9 @@
*/
#include "ScoreDisplay.h"
#include "BitmapText.h"
const int NUM_SCORE_DIGITS = 9;
class ScoreDisplayNormal : public ScoreDisplay
{
@@ -25,11 +24,13 @@ public:
virtual void Init( PlayerNumber pn );
virtual void Update( float fDeltaTime );
virtual void Draw();
virtual void SetScore( float fNewScore );
virtual void SetText( CString s );
protected:
BitmapText m_text;
float m_fScore; // the actual score
float m_fTrailingScore; // what is displayed temporarily
float m_fScoreVelocity; // how fast trailing approaches real score
+9 -19
View File
@@ -19,42 +19,32 @@
#include "ThemeManager.h"
const float SCORE_TWEEN_TIME = 0.5f;
ScoreDisplayOni::ScoreDisplayOni()
{
LOG->Trace( "ScoreDisplayOni::ScoreDisplayOni()" );
// init the text
BitmapText::LoadFromNumbers( THEME->GetPathTo("Numbers","gameplay score numbers") );
TurnShadowOff();
m_text.LoadFromNumbers( THEME->GetPathTo("Numbers","gameplay score numbers") );
m_text.TurnShadowOff();
this->AddChild( &m_text );
}
void ScoreDisplayOni::Init( PlayerNumber pn )
void ScoreDisplayOni::Init( PlayerNumber pn )
{
m_PlayerNumber = pn;
ScoreDisplay::Init( pn );
m_text.SetDiffuse( PlayerToColor(pn) );
}
void ScoreDisplayOni::SetScore( float fNewScore )
{
}
void ScoreDisplayOni::Update( float fDeltaTime )
void ScoreDisplayOni::Update( float fDelta )
{
BitmapText::Update( fDeltaTime );
}
ScoreDisplay::Update( fDelta );
void ScoreDisplayOni::Draw()
{
float fSecsIntoPlay;
if( GAMESTATE->IsPlayerEnabled(m_PlayerNumber) )
fSecsIntoPlay = GAMESTATE->m_CurStageStats.fAliveSeconds[m_PlayerNumber];
else
fSecsIntoPlay = 0;
SetText( SecondsToTime(fSecsIntoPlay) );
BitmapText::Draw();
m_text.SetText( SecondsToTime(fSecsIntoPlay) );
}
+3 -6
View File
@@ -11,9 +11,8 @@
-----------------------------------------------------------------------------
*/
#include "song.h"
#include "ScoreDisplay.h"
#include "BitmapText.h"
class ScoreDisplayOni : public ScoreDisplay
@@ -23,12 +22,10 @@ public:
virtual void Init( PlayerNumber pn );
virtual void Update( float fDeltaTime );
virtual void Draw();
virtual void SetScore( float fNewScore );
virtual void Update( float fDelta );
protected:
BitmapText m_text;
};
#endif
+6 -4
View File
@@ -527,7 +527,7 @@ void ScreenEdit::DrawPrimitives()
void ScreenEdit::Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI )
{
LOG->Trace( "ScreenEdit::Input()" );
// LOG->Trace( "ScreenEdit::Input()" );
switch( m_EditMode )
{
@@ -1320,8 +1320,9 @@ void ScreenEdit::HandleAreaMenuChoice( AreaMenuChoice c, int* iAnswers )
GAMESTATE->m_fSongBeat = m_NoteFieldEdit.m_fBeginMarker - 4; // give a 1 measure lead-in
float fStartSeconds = m_pSong->GetElapsedTimeFromBeat(GAMESTATE->m_fSongBeat) ;
m_soundMusic.SetPositionSeconds( fStartSeconds );
LOG->Trace( "Starting playback at %f", fStartSeconds );
m_soundMusic.SetPlaybackRate( GAMESTATE->m_SongOptions.m_fMusicRate );
m_soundMusic.SetPositionSeconds( fStartSeconds );
m_soundMusic.StartPlaying();
}
break;
@@ -1342,9 +1343,10 @@ void ScreenEdit::HandleAreaMenuChoice( AreaMenuChoice c, int* iAnswers )
m_rectRecordBack.SetTweenDiffuse( RageColor(0,0,0,0.8f) );
GAMESTATE->m_fSongBeat = m_NoteFieldEdit.m_fBeginMarker - 4; // give a 1 measure lead-in
float fStartSeconds = m_pSong->GetElapsedTimeFromBeat(GAMESTATE->m_fSongBeat) ;
m_soundMusic.SetPositionSeconds( fStartSeconds );
float fStartSeconds = m_pSong->GetElapsedTimeFromBeat(GAMESTATE->m_fSongBeat);
LOG->Trace( "Starting playback at %f", fStartSeconds );
m_soundMusic.SetPlaybackRate( GAMESTATE->m_SongOptions.m_fMusicRate );
m_soundMusic.SetPositionSeconds( fStartSeconds );
m_soundMusic.StartPlaying();
}
break;
+2 -2
View File
@@ -122,6 +122,7 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary )
switch( GAMESTATE->m_PlayMode )
{
case PLAY_MODE_ARCADE:
case PLAY_MODE_BATTLE:
m_ResultMode = bSummary ? RM_ARCADE_SUMMARY : RM_ARCADE_STAGE;
break;
case PLAY_MODE_NONSTOP:
@@ -219,10 +220,9 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary )
if( !GAMESTATE->IsPlayerEnabled( (PlayerNumber)p ) ) // If EZ2 wants to hide this graphic, place it somewhere off screen using theme metrics
continue; // skip
m_ScoreDisplay[p].LoadFromNumbers( THEME->GetPathTo("Numbers","evaluation score numbers") );
m_ScoreDisplay[p].SetXY( SCORE_NUMBERS_X(p), SCORE_Y );
m_ScoreDisplay[p].Init( (PlayerNumber)p );
m_ScoreDisplay[p].SetZoomY( 1.0 );
m_ScoreDisplay[p].SetDiffuse( PlayerToColor(p) );
this->AddChild( &m_ScoreDisplay[p] );
}
+37 -5
View File
@@ -24,6 +24,7 @@
#include "GameState.h"
#include "ScoreDisplayNormal.h"
#include "ScoreDisplayOni.h"
#include "ScoreDisplayBattle.h"
#include "ScreenPrompt.h"
#include "GrooveRadar.h"
#include "NotesLoaderSM.h"
@@ -127,6 +128,7 @@ ScreenGameplay::ScreenGameplay( bool bDemonstration )
switch( GAMESTATE->m_PlayMode )
{
case PLAY_MODE_ARCADE:
case PLAY_MODE_BATTLE:
{
GAMESTATE->m_CurStageStats.pSong = GAMESTATE->m_pCurSong;
for( int p=0; p<NUM_PLAYERS; p++ )
@@ -265,6 +267,7 @@ ScreenGameplay::ScreenGameplay( bool bDemonstration )
switch( GAMESTATE->m_PlayMode )
{
case PLAY_MODE_ARCADE:
case PLAY_MODE_BATTLE:
this->AddChild( &m_textStageNumber );
break;
case PLAY_MODE_NONSTOP:
@@ -320,14 +323,18 @@ ScreenGameplay::ScreenGameplay( bool bDemonstration )
case PLAY_MODE_ENDLESS:
m_pScoreDisplay[p] = new ScoreDisplayOni;
break;
case PLAY_MODE_BATTLE:
m_pScoreDisplay[p] = new ScoreDisplayBattle;
break;
default:
ASSERT(0);
}
GAMESTATE->m_Inventory[p].RefreshPossibleItems();
m_pScoreDisplay[p]->Init( (PlayerNumber)p );
m_pScoreDisplay[p]->SetXY( SCORE_X(p), SCORE_Y(p,bExtra) );
m_pScoreDisplay[p]->SetZoom( SCORE_ZOOM );
m_pScoreDisplay[p]->SetDiffuse( PlayerToColor(p) );
this->AddChild( m_pScoreDisplay[p] );
m_textPlayerOptions[p].LoadFromFont( THEME->GetPathTo("Fonts","normal") );
@@ -492,6 +499,7 @@ bool ScreenGameplay::IsLastSong()
switch( GAMESTATE->m_PlayMode )
{
case PLAY_MODE_ARCADE:
case PLAY_MODE_BATTLE:
return true;
case PLAY_MODE_NONSTOP:
case PLAY_MODE_ONI:
@@ -521,6 +529,7 @@ void ScreenGameplay::LoadNextSong()
switch( GAMESTATE->m_PlayMode )
{
case PLAY_MODE_ARCADE:
case PLAY_MODE_BATTLE:
break;
case PLAY_MODE_NONSTOP:
case PLAY_MODE_ONI:
@@ -807,6 +816,7 @@ void ScreenGameplay::Update( float fDeltaTime )
switch( GAMESTATE->m_PlayMode )
{
case PLAY_MODE_ARCADE:
case PLAY_MODE_BATTLE:
if( OneIsHot() ) m_announcerHot.PlayRandom();
else if( AllAreInDanger() ) m_announcerDanger.PlayRandom();
else m_announcerGood.PlayRandom();
@@ -995,13 +1005,31 @@ void ScreenGameplay::Input( const DeviceInput& DeviceI, const InputEventType typ
}
//
// handle a step
// handle a step or battle item activate
//
if( type==IET_FIRST_PRESS &&
!PREFSMAN->m_bAutoPlay &&
StyleI.IsValid() &&
GAMESTATE->IsPlayerEnabled( StyleI.player ) )
m_Player[StyleI.player].Step( StyleI.col );
else if( type==IET_FIRST_PRESS &&
!PREFSMAN->m_bAutoPlay &&
MenuI.IsValid() &&
GAMESTATE->IsPlayerEnabled( MenuI.player ) )
{
int iItemSlot;
switch( MenuI.button )
{
case MENU_BUTTON_LEFT: iItemSlot = 0; break;
case MENU_BUTTON_START: iItemSlot = 1; break;
case MENU_BUTTON_RIGHT: iItemSlot = 2; break;
default: iItemSlot = -1; break;
}
if( iItemSlot != -1 )
GAMESTATE->m_Inventory[MenuI.player].UseItem( MenuI.player, iItemSlot );
}
}
void ScreenGameplay::PositionStatusIcons()
@@ -1045,6 +1073,7 @@ void SaveChanges()
switch( GAMESTATE->m_PlayMode )
{
case PLAY_MODE_ARCADE:
case PLAY_MODE_BATTLE:
GAMESTATE->m_pCurSong->Save();
break;
case PLAY_MODE_NONSTOP:
@@ -1067,6 +1096,7 @@ void DontSaveChanges()
switch( GAMESTATE->m_PlayMode )
{
case PLAY_MODE_ARCADE:
case PLAY_MODE_BATTLE:
ld.LoadFromSMFile(GAMESTATE->m_pCurSong->GetCacheFilePath(),
*GAMESTATE->m_pCurSong);
break;
@@ -1075,10 +1105,10 @@ void DontSaveChanges()
case PLAY_MODE_ENDLESS:
{
// FIXME
// for( int i=0; i<GAMESTATE->m_pCurCourse->GetNumStages(); i++ )
// for( unsigned i=0; i<m_apCourseSongs.size(); i++ )
// {
// Song* pSong = GAMESTATE->m_pCurCourse->GetSong(i);
// ld.LoadFromSMFile( GAMESTATE->m_pCurSong->GetCacheFilePath(), *pSong );
// Song* pSong = m_apCourseSongs[i];
// ld.LoadFromSMFile( pSong->GetCacheFilePath(), *pSong );
// }
}
break;
@@ -1093,6 +1123,7 @@ void ShowSavePrompt( ScreenMessage SM_SendWhenDone )
switch( GAMESTATE->m_PlayMode )
{
case PLAY_MODE_ARCADE:
case PLAY_MODE_BATTLE:
sMessage = ssprintf(
"You have changed the offset or BPM of\n"
"%s.\n"
@@ -1436,6 +1467,7 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
switch( GAMESTATE->m_PlayMode )
{
case PLAY_MODE_ARCADE:
case PLAY_MODE_BATTLE:
// SCREENMAN->SetNewScreen( "ScreenSelectMusic" );
SCREENMAN->SetNewScreen( SONGSEL_SCREEN );
break;
+22 -12
View File
@@ -26,7 +26,7 @@
#define TIMER_SECONDS THEME->GetMetricI("ScreenInstructions","TimerSeconds")
#define NEXT_SCREEN_ARCADE THEME->GetMetric("ScreenInstructions","NextScreenArcade")
#define NEXT_SCREEN_ONI THEME->GetMetric("ScreenInstructions","NextScreenOni")
#define NEXT_SCREEN_BATTLE THEME->GetMetric("ScreenInstructions","NextScreenBattle")
ScreenInstructions::ScreenInstructions()
@@ -52,18 +52,22 @@ ScreenInstructions::ScreenInstructions()
//
// Skip this screen unless someone chose easy or beginner
//
Difficulty easiestDifficulty = DIFFICULTY_HARD;
for( int p=0; p<NUM_PLAYERS; p++ )
if( GAMESTATE->m_PlayMode == PLAY_MODE_ARCADE )
{
if( !GAMESTATE->IsPlayerEnabled(p) )
continue;
easiestDifficulty = min( easiestDifficulty, GAMESTATE->m_PreferredDifficulty[p] );
}
if( easiestDifficulty > DIFFICULTY_EASY )
{
this->SendScreenMessage( SM_GoToNextScreen, 0 );
m_Menu.ImmedOffScreenToMenu();
return;
Difficulty easiestDifficulty = (Difficulty)(NUM_DIFFICULTIES-1);
for( int p=0; p<NUM_PLAYERS; p++ )
{
if( !GAMESTATE->IsPlayerEnabled(p) )
continue;
easiestDifficulty = min( easiestDifficulty, GAMESTATE->m_PreferredDifficulty[p] );
}
if( easiestDifficulty > DIFFICULTY_EASY )
{
// skip this screen
this->SendScreenMessage( SM_GoToNextScreen, 0 );
m_Menu.ImmedOffScreenToMenu();
return;
}
}
@@ -84,6 +88,9 @@ ScreenInstructions::ScreenInstructions()
case PLAY_MODE_ENDLESS:
sHowToPlayPath = THEME->GetPathTo("Graphics","instructions endless");
break;
case PLAY_MODE_BATTLE:
sHowToPlayPath = THEME->GetPathTo("Graphics","instructions battle");
break;
default:
ASSERT(0);
}
@@ -149,6 +156,9 @@ void ScreenInstructions::HandleScreenMessage( const ScreenMessage SM )
case PLAY_MODE_ENDLESS:
SCREENMAN->SetNewScreen( NEXT_SCREEN_ONI );
break;
case PLAY_MODE_BATTLE:
SCREENMAN->SetNewScreen( NEXT_SCREEN_BATTLE );
break;
default:
ASSERT(0);
}
+1 -1
View File
@@ -30,7 +30,7 @@ bool PrepareForJukebox() // always return true.
GAMESTATE->m_PlayMode = PLAY_MODE_ARCADE;
vector<Song*> vSongs;
if( GAMESTATE->m_sPreferredGroup.CompareNoCase("all music") == 0 )
if( GAMESTATE->m_sPreferredGroup == GROUP_ALL_MUSIC )
SONGMAN->GetSongs( vSongs );
else
SONGMAN->GetSongs( vSongs, GAMESTATE->m_sPreferredGroup );
+1 -1
View File
@@ -130,7 +130,7 @@ void ScreenJukeboxMenu::MenuStart( PlayerNumber pn )
bool bModifiers = m_Selector.GetSelectedModifiers();
GAMESTATE->m_CurStyle = style;
GAMESTATE->m_sPreferredGroup = sGroup;
GAMESTATE->m_sPreferredGroup = (sGroup=="ALL MUSIC") ? GROUP_ALL_MUSIC : sGroup;
for( int p=0; p<NUM_PLAYERS; p++ )
GAMESTATE->m_PreferredDifficulty[p] = dc;
GAMESTATE->m_bJukeboxUsesModifiers = bModifiers;
+2
View File
@@ -193,6 +193,7 @@ ScreenNameEntry::ScreenNameEntry()
switch( GAMESTATE->m_PlayMode )
{
case PLAY_MODE_ARCADE:
case PLAY_MODE_BATTLE:
{
StageStats SS;
vector<Song*> vSongs;
@@ -382,6 +383,7 @@ void ScreenNameEntry::MenuStart( PlayerNumber pn )
switch( GAMESTATE->m_PlayMode )
{
case PLAY_MODE_ARCADE:
case PLAY_MODE_BATTLE:
SONGMAN->m_MachineScores[GAMESTATE->m_RankingNotesType][GAMESTATE->m_RankingCategory[pn]][GAMESTATE->m_iRankingIndex[pn]].sName = m_sSelectedName[pn];
break;
case PLAY_MODE_NONSTOP:
+44 -33
View File
@@ -141,7 +141,7 @@ ScreenSelectDifficulty::ScreenSelectDifficulty()
}
m_iCurrentPage = PAGE_1;
m_CurrentPage = PAGE_1;
for( int p=0; p<NUM_PLAYERS; p++ )
{
@@ -240,7 +240,9 @@ void ScreenSelectDifficulty::HandleScreenMessage( const ScreenMessage SM )
case SM_GoToNextScreen:
for( p=0; p<NUM_PLAYERS; p++ )
{
const ModeChoice& mc = m_ModeChoices[m_iCurrentPage][m_iChoiceOnPage[p]];
if( !GAMESTATE->IsPlayerEnabled(p) )
continue; // skip
const ModeChoice& mc = m_ModeChoices[m_CurrentPage][m_iChoiceOnPage[p]];
GAMESTATE->m_PlayMode = mc.pm;
GAMESTATE->m_PreferredDifficulty[p] = mc.dc;
}
@@ -271,8 +273,8 @@ void ScreenSelectDifficulty::MenuLeft( PlayerNumber pn )
return;
if( m_iChoiceOnPage[pn] == 0 ) // can't go left any more
{
if( m_iCurrentPage > 0 )
ChangePage( m_iCurrentPage-1 );
if( m_CurrentPage > 0 )
ChangePage( (Page)(m_CurrentPage-1) );
}
else
ChangeWithinPage( pn, m_iChoiceOnPage[pn]-1, false );
@@ -283,16 +285,16 @@ void ScreenSelectDifficulty::MenuRight( PlayerNumber pn )
{
if( m_bChosen[pn] )
return;
if( m_iChoiceOnPage[pn] == (int)m_ModeChoices[m_iCurrentPage].size()-1 ) // can't go left any more
if( m_iChoiceOnPage[pn] == (int)m_ModeChoices[m_CurrentPage].size()-1 ) // can't go left any more
{
if( m_iCurrentPage < NUM_PAGES-1 )
ChangePage( m_iCurrentPage+1 );
if( m_CurrentPage < NUM_PAGES-1 )
ChangePage( (Page)(m_CurrentPage+1) );
}
else
ChangeWithinPage( pn, m_iChoiceOnPage[pn]+1, false );
}
void ScreenSelectDifficulty::ChangePage( int iNewPage )
void ScreenSelectDifficulty::ChangePage( Page newPage )
{
int p;
@@ -301,42 +303,51 @@ void ScreenSelectDifficulty::ChangePage( int iNewPage )
if( GAMESTATE->IsPlayerEnabled(p) && m_bChosen[p] )
return;
bool bPageIncreasing = iNewPage > m_iCurrentPage;
m_iCurrentPage = iNewPage;
bool bPageIncreasing = newPage > m_CurrentPage;
m_CurrentPage = newPage;
if( iNewPage == PAGE_2 )
if( newPage == PAGE_2 )
{
m_soundDifficult.Stop();
m_soundDifficult.PlayRandom();
}
// change both players
int iNewChoice = bPageIncreasing ? 0 : m_ModeChoices[m_iCurrentPage].size()-1;
int iNewChoice = bPageIncreasing ? 0 : m_ModeChoices[m_CurrentPage].size()-1;
for( p=0; p<NUM_PLAYERS; p++ )
ChangeWithinPage( (PlayerNumber)p, iNewChoice, true );
// move frame with choices
m_framePages.StopTweening();
m_framePages.BeginTweening( 0.2f );
m_framePages.SetTweenX( (float)iNewPage*-SCREEN_WIDTH );
m_framePages.SetTweenX( (float)newPage*-SCREEN_WIDTH );
}
void ScreenSelectDifficulty::ChangeWithinPage( PlayerNumber pn, int iNewChoice, bool bChangingPages )
{
m_iChoiceOnPage[pn] = iNewChoice;
for( int p=0; p<NUM_PLAYERS; p++ )
{
if( !GAMESTATE->IsPlayerEnabled(p) )
continue; // skip
float fCursorX = CURSOR_X(m_iCurrentPage,m_iChoiceOnPage[pn],pn);
float fCursorY = CURSOR_Y(m_iCurrentPage,m_iChoiceOnPage[pn],pn);
if( p!=pn && m_CurrentPage==PAGE_1 )
continue; // skip
m_sprCursor[pn].StopTweening();
m_sprCursor[pn].BeginTweening( 0.2f, bChangingPages ? TWEEN_LINEAR : TWEEN_BIAS_BEGIN );
m_sprCursor[pn].SetTweenX( fCursorX - CURSOR_SHADOW_LENGTH_X );
m_sprCursor[pn].SetTweenY( fCursorY - CURSOR_SHADOW_LENGTH_Y );
m_iChoiceOnPage[p] = iNewChoice;
m_sprJoinMessagehadow[pn].StopTweening();
m_sprJoinMessagehadow[pn].BeginTweening( 0.2f, bChangingPages ? TWEEN_LINEAR : TWEEN_BIAS_BEGIN );
m_sprJoinMessagehadow[pn].SetTweenX( fCursorX );
m_sprJoinMessagehadow[pn].SetTweenY( fCursorY );
float fCursorX = CURSOR_X(m_CurrentPage,m_iChoiceOnPage[p],p);
float fCursorY = CURSOR_Y(m_CurrentPage,m_iChoiceOnPage[p],p);
m_sprCursor[p].StopTweening();
m_sprCursor[p].BeginTweening( 0.2f, bChangingPages ? TWEEN_LINEAR : TWEEN_BIAS_BEGIN );
m_sprCursor[p].SetTweenX( fCursorX - CURSOR_SHADOW_LENGTH_X );
m_sprCursor[p].SetTweenY( fCursorY - CURSOR_SHADOW_LENGTH_Y );
m_sprJoinMessagehadow[p].StopTweening();
m_sprJoinMessagehadow[p].BeginTweening( 0.2f, bChangingPages ? TWEEN_LINEAR : TWEEN_BIAS_BEGIN );
m_sprJoinMessagehadow[p].SetTweenX( fCursorX );
m_sprJoinMessagehadow[p].SetTweenY( fCursorY );
}
m_soundChange.Play();
}
@@ -350,12 +361,12 @@ void ScreenSelectDifficulty::MenuStart( PlayerNumber pn )
for( unsigned page=0; page<NUM_PAGES; page++ )
m_sprMoreArrows[page].FadeOff( 0, "fade", 0.5f );
const ModeChoice& mc = m_ModeChoices[m_iCurrentPage][m_iChoiceOnPage[pn]];
const ModeChoice& mc = m_ModeChoices[m_CurrentPage][m_iChoiceOnPage[pn]];
SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo(ssprintf("select difficulty comment %s",mc.name)) );
/* XXX: This will play the same announcer twice at the same time; that'll probably
* result in an echo effect. */
if( m_iCurrentPage == PAGE_2 )
if( m_CurrentPage == PAGE_2 )
{
// choose this for all the other players too
for( int p=0; p<NUM_PLAYERS; p++ )
@@ -367,8 +378,8 @@ void ScreenSelectDifficulty::MenuStart( PlayerNumber pn )
}
}
float fCursorX = CURSOR_X(m_iCurrentPage,m_iChoiceOnPage[pn],pn);
float fCursorY = CURSOR_Y(m_iCurrentPage,m_iChoiceOnPage[pn],pn);
float fCursorX = CURSOR_X(m_CurrentPage,m_iChoiceOnPage[pn],pn);
float fCursorY = CURSOR_Y(m_CurrentPage,m_iChoiceOnPage[pn],pn);
m_sprCursor[pn].BeginTweening( 0.2f );
m_sprCursor[pn].BeginTweening( 0.2f );
@@ -413,7 +424,7 @@ void ScreenSelectDifficulty::TweenOffScreen()
m_SubActors[p]->StopTweening();
const int page = m_iCurrentPage;
const int page = m_CurrentPage;
m_sprExplanation[page].SetXY( EXPLANATION_X(page), EXPLANATION_Y(page) );
m_sprExplanation[page].BeginTweening( 0.5, Actor::TWEEN_BOUNCE_BEGIN );
@@ -467,8 +478,8 @@ void ScreenSelectDifficulty::TweenOnScreen()
if( !GAMESTATE->IsPlayerEnabled((PlayerNumber)p) )
continue;
float fCursorX = CURSOR_X(m_iCurrentPage,m_iChoiceOnPage[p],p);
float fCursorY = CURSOR_Y(m_iCurrentPage,m_iChoiceOnPage[p],p);
float fCursorX = CURSOR_X(m_CurrentPage,m_iChoiceOnPage[p],p);
float fCursorY = CURSOR_Y(m_CurrentPage,m_iChoiceOnPage[p],p);
m_sprCursor[p].SetXY( fCursorX, fCursorY );
@@ -482,8 +493,8 @@ void ScreenSelectDifficulty::TweenOnScreen()
}
{
const int p = m_iCurrentPage;
for( unsigned c=0; c<m_ModeChoices[m_iCurrentPage].size(); c++ )
const int p = m_CurrentPage;
for( unsigned c=0; c<m_ModeChoices[m_CurrentPage].size(); c++ )
{
const float fPause = c*0.2f;
+2 -2
View File
@@ -44,7 +44,7 @@ public:
private:
void ChangeWithinPage( PlayerNumber pn, int iNewChoice, bool bChangingPages );
void ChangePage( int iNewPage );
void ChangePage( Page newPage );
MenuElements m_Menu;
@@ -65,7 +65,7 @@ private:
vector<ModeChoice> m_ModeChoices[NUM_PAGES];
int m_iCurrentPage;
Page m_CurrentPage;
int m_iChoiceOnPage[NUM_PLAYERS];
bool m_bChosen[NUM_PLAYERS];
+5 -5
View File
@@ -59,7 +59,7 @@ ScreenSelectGroup::ScreenSelectGroup()
if(!PREFSMAN->m_bShowSelectGroup)
{
GAMESTATE->m_sPreferredGroup = "ALL MUSIC";
GAMESTATE->m_sPreferredGroup = GROUP_ALL_MUSIC;
m_Menu.ImmedOffScreenToMenu();
m_bChosen = true;
this->SendScreenMessage( SM_GoToNextScreen, 0.f );
@@ -105,7 +105,7 @@ ScreenSelectGroup::ScreenSelectGroup()
// copy group names into a vector
std::vector<CString> asGroupNames;
asGroupNames.push_back( "ALL MUSIC" ); // "ALL MUSIC" is a special group
asGroupNames.push_back( "ALL MUSIC" ); // special group
for( std::map<CString, CString>::const_iterator iter = mapGroupNames.begin(); iter != mapGroupNames.end(); ++iter )
asGroupNames.push_back( iter->first );
@@ -227,7 +227,7 @@ void ScreenSelectGroup::AfterChange()
CString sSelectedGroupName = m_GroupList.GetSelectionName();
CString sGroupBannerPath;
if( 0 == stricmp(sSelectedGroupName, "ALL MUSIC") )
if( sSelectedGroupName == GROUP_ALL_MUSIC )
sGroupBannerPath = THEME->GetPathTo("Graphics","all music banner");
else if( SONGMAN->GetGroupBannerPath(sSelectedGroupName) != "" )
sGroupBannerPath = SONGMAN->GetGroupBannerPath(sSelectedGroupName);
@@ -282,9 +282,9 @@ void ScreenSelectGroup::MenuStart( PlayerNumber pn )
m_bChosen = true;
GAMESTATE->m_pCurSong = NULL;
GAMESTATE->m_sPreferredGroup = m_GroupList.GetSelectionName();
GAMESTATE->m_sPreferredGroup = (m_GroupList.GetSelectionName()=="ALL MUSIC" ? GROUP_ALL_MUSIC : m_GroupList.GetSelectionName() );
if( 0 == stricmp(GAMESTATE->m_sPreferredGroup, "All Music") )
if( GAMESTATE->m_sPreferredGroup == GROUP_ALL_MUSIC )
SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("select group comment all music") );
else
SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("select group comment general") );
+6 -8
View File
@@ -206,7 +206,6 @@ ScreenSelectMusic::ScreenSelectMusic()
m_sprMarathonBalloon.Load( THEME->GetPathTo("Graphics","select music marathon balloon") );
m_sprMarathonBalloon.StopAnimating();
m_sprMarathonBalloon.SetXY( BALLOON_X, BALLOON_Y );
m_sprMarathonBalloon.SetZoom( 1 );
m_sprMarathonBalloon.SetZoomY( 0 );
m_sprMarathonBalloon.SetDiffuse( RageColor(1,1,1,1) );
m_sprMarathonBalloon.SetEffectBobbing( RageVector3(0,10,0), 2 );
@@ -215,7 +214,6 @@ ScreenSelectMusic::ScreenSelectMusic()
m_sprLongBalloon.Load( THEME->GetPathTo("Graphics","select music long balloon") );
m_sprLongBalloon.StopAnimating();
m_sprLongBalloon.SetXY( BALLOON_X, BALLOON_Y );
m_sprLongBalloon.SetZoom( 1 );
m_sprLongBalloon.SetZoomY( 0 );
m_sprLongBalloon.SetDiffuse( RageColor(1,1,1,1) );
m_sprLongBalloon.SetEffectBobbing( RageVector3(0,10,0), 2 );
@@ -309,11 +307,11 @@ void ScreenSelectMusic::TweenOnScreen()
void ScreenSelectMusic::TweenOffScreen()
{
m_sprBannerFrame.FadeOff( 0, "bounce left", TWEEN_TIME*2 );
m_Banner.FadeOff( 0, "bounce left", TWEEN_TIME*2 );
m_BPMDisplay.FadeOff( 0, "bounce left", TWEEN_TIME*2 );
m_StageDisplay.FadeOff( 0, "bounce left", TWEEN_TIME*2 );
m_sprCDTitle.FadeOff( 0, "bounce left", TWEEN_TIME*2 );
m_sprBannerFrame.FadeOff( 0, "bounce left", TWEEN_TIME );
m_Banner.FadeOff( 0, "bounce left", TWEEN_TIME );
m_BPMDisplay.FadeOff( 0, "bounce left", TWEEN_TIME );
m_StageDisplay.FadeOff( 0, "bounce left", TWEEN_TIME );
m_sprCDTitle.FadeOff( 0, "bounce left", TWEEN_TIME );
int p;
for( p=0; p<NUM_PLAYERS; p++ )
@@ -420,7 +418,7 @@ void ScreenSelectMusic::Update( float fDeltaTime )
void ScreenSelectMusic::Input( const DeviceInput& DeviceI, InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI )
{
LOG->Trace( "ScreenSelectMusic::Input()" );
// LOG->Trace( "ScreenSelectMusic::Input()" );
if( DeviceI.device == DEVICE_KEYBOARD && DeviceI.button == SDLK_F9 )
{
+2 -2
View File
@@ -790,7 +790,7 @@ bool CompareNotesPointersForExtra(const Notes *n1, const Notes *n2)
void SongManager::GetExtraStageInfo( bool bExtra2, CString sPreferredGroup, const StyleDef *sd,
Song*& pSongOut, Notes*& pNotesOut, PlayerOptions& po_out, SongOptions& so_out )
{
if(GetExtraStageInfoFromCourse(bExtra2, (GAMESTATE->m_sPreferredGroup == "ALL MUSIC" ? GAMESTATE->m_pCurSong->m_sGroupName : GAMESTATE->m_sPreferredGroup), pSongOut, pNotesOut, po_out, so_out))
if(GetExtraStageInfoFromCourse(bExtra2, (GAMESTATE->m_sPreferredGroup == GROUP_ALL_MUSIC ? GAMESTATE->m_pCurSong->m_sGroupName : GAMESTATE->m_sPreferredGroup), pSongOut, pNotesOut, po_out, so_out))
return;
// Choose a hard song for the extra stage
@@ -800,7 +800,7 @@ void SongManager::GetExtraStageInfo( bool bExtra2, CString sPreferredGroup, cons
Notes* pExtra2Notes = NULL;
vector<Song*> apSongs;
CString sGroup = GAMESTATE->m_sPreferredGroup=="ALL MUSIC" ? GAMESTATE->m_pCurSong->m_sGroupName : GAMESTATE->m_sPreferredGroup;
CString sGroup = GAMESTATE->m_sPreferredGroup==GROUP_ALL_MUSIC ? GAMESTATE->m_pCurSong->m_sGroupName : GAMESTATE->m_sPreferredGroup;
SONGMAN->GetSongs( apSongs, sGroup );
for( unsigned s=0; s<apSongs.size(); s++ ) // foreach song
{
+18 -6
View File
@@ -553,6 +553,12 @@ cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
<File
RelativePath=".\Grade.h">
</File>
<File
RelativePath="Inventory.cpp">
</File>
<File
RelativePath="Inventory.h">
</File>
<File
RelativePath="MenuInput.h">
</File>
@@ -625,12 +631,6 @@ cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
<File
RelativePath="NotesWriterSM.h">
</File>
<File
RelativePath=".\Player.cpp">
</File>
<File
RelativePath=".\Player.h">
</File>
<File
RelativePath="PlayerOptions.cpp">
</File>
@@ -1314,12 +1314,24 @@ cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
<File
RelativePath="NoteField.h">
</File>
<File
RelativePath=".\Player.cpp">
</File>
<File
RelativePath=".\Player.h">
</File>
<File
RelativePath="ScoreDisplay.cpp">
</File>
<File
RelativePath="ScoreDisplay.h">
</File>
<File
RelativePath="ScoreDisplayBattle.cpp">
</File>
<File
RelativePath="ScoreDisplayBattle.h">
</File>
<File
RelativePath="ScoreDisplayNormal.cpp">
</File>
+1 -1
View File
@@ -19,7 +19,7 @@
!define PRODUCT_NAME_VER "${PRODUCT_NAME} ${VERSION}"
Name "${PRODUCT_NAME}"
OutFile "StepMania-CVS-20030220.exe"
OutFile "StepMania-CVS-20030223.exe"
;OutFile "StepMania301.exe"
; Some default compiler settings (uncomment and change at will):