working on Battle
This commit is contained in:
@@ -193,6 +193,7 @@ NextScreen=ScreenInstructions
|
|||||||
[ScreenInstructions]
|
[ScreenInstructions]
|
||||||
NextScreenArcade=ScreenSelectMusic
|
NextScreenArcade=ScreenSelectMusic
|
||||||
NextScreenOni=ScreenSelectCourse
|
NextScreenOni=ScreenSelectCourse
|
||||||
|
NextScreenBattle=ScreenSelectMusic
|
||||||
HelpText=Press START to continue
|
HelpText=Press START to continue
|
||||||
TimerSeconds=15
|
TimerSeconds=15
|
||||||
|
|
||||||
@@ -999,3 +1000,11 @@ ModifiersX=128
|
|||||||
ModifiersY=10
|
ModifiersY=10
|
||||||
ModifiersZoom=0.5
|
ModifiersZoom=0.5
|
||||||
ModifiersHorizAlign=2
|
ModifiersHorizAlign=2
|
||||||
|
|
||||||
|
[Inventory]
|
||||||
|
NumItemTypes=2
|
||||||
|
ItemDurationSeconds=10
|
||||||
|
Item1Combo=50
|
||||||
|
Item1Effect=boost
|
||||||
|
Item2Combo=100
|
||||||
|
Item2Effect=expand
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ void Banner::LoadFromGroup( CString sGroupName )
|
|||||||
{
|
{
|
||||||
CString sGroupBannerPath = SONGMAN->GetGroupBannerPath( sGroupName );
|
CString sGroupBannerPath = SONGMAN->GetGroupBannerPath( sGroupName );
|
||||||
|
|
||||||
if( sGroupName == "ALL MUSIC" )
|
if( sGroupName == GROUP_ALL_MUSIC )
|
||||||
Load( THEME->GetPathTo("Graphics","all music banner") );
|
Load( THEME->GetPathTo("Graphics","all music banner") );
|
||||||
else if( sGroupBannerPath != "" )
|
else if( sGroupBannerPath != "" )
|
||||||
Load( sGroupBannerPath );
|
Load( sGroupBannerPath );
|
||||||
|
|||||||
@@ -162,6 +162,8 @@ void Combo::SetScore( TapNoteScore score, int iNumNotesInThisRow )
|
|||||||
if( m_iCurCombo > 50 )
|
if( m_iCurCombo > 50 )
|
||||||
SCREENMAN->SendMessageToTopScreen( SM_ComboStopped, 0 );
|
SCREENMAN->SendMessageToTopScreen( SM_ComboStopped, 0 );
|
||||||
|
|
||||||
|
GAMESTATE->m_Inventory[m_PlayerNumber].OnComboBroken( m_iCurCombo );
|
||||||
|
|
||||||
m_iCurCombo = 0;
|
m_iCurCombo = 0;
|
||||||
|
|
||||||
m_textComboNumber.SetDiffuse( RageColor(1,1,1,0) ); // invisible
|
m_textComboNumber.SetDiffuse( RageColor(1,1,1,0) ); // invisible
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ class Combo : public ActorFrame
|
|||||||
public:
|
public:
|
||||||
Combo();
|
Combo();
|
||||||
|
|
||||||
|
void Init( PlayerNumber pn ) { m_PlayerNumber = pn; }
|
||||||
|
|
||||||
void SetScore( TapNoteScore score, int iNumNotesInThisRow );
|
void SetScore( TapNoteScore score, int iNumNotesInThisRow );
|
||||||
|
|
||||||
int GetCurrentCombo() const { return m_iCurCombo; }
|
int GetCurrentCombo() const { return m_iCurCombo; }
|
||||||
@@ -30,6 +32,8 @@ public:
|
|||||||
void Reset();
|
void Reset();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
PlayerNumber m_PlayerNumber;
|
||||||
|
|
||||||
int m_iCurCombo;
|
int m_iCurCombo;
|
||||||
int m_iMaxCombo;
|
int m_iMaxCombo;
|
||||||
int m_iCurComboOfPerfects;
|
int m_iCurComboOfPerfects;
|
||||||
|
|||||||
@@ -211,4 +211,11 @@ RankingCategory AverageMeterToRankingCategory( float fAverageMeter );
|
|||||||
const int NUM_RANKING_LINES = 5;
|
const int NUM_RANKING_LINES = 5;
|
||||||
const int MAX_RANKING_NAME_LENGTH = 4;
|
const int MAX_RANKING_NAME_LENGTH = 4;
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Group stuff
|
||||||
|
//
|
||||||
|
const CString GROUP_ALL_MUSIC = "";
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ void GameState::Reset()
|
|||||||
m_bSideIsJoined[p] = false;
|
m_bSideIsJoined[p] = false;
|
||||||
// m_iCoins = 0; // don't reset coin count!
|
// m_iCoins = 0; // don't reset coin count!
|
||||||
m_MasterPlayerNumber = PLAYER_INVALID;
|
m_MasterPlayerNumber = PLAYER_INVALID;
|
||||||
m_sPreferredGroup = "";
|
m_sPreferredGroup = GROUP_ALL_MUSIC;
|
||||||
for( p=0; p<NUM_PLAYERS; p++ )
|
for( p=0; p<NUM_PLAYERS; p++ )
|
||||||
m_PreferredDifficulty[p] = DIFFICULTY_INVALID;
|
m_PreferredDifficulty[p] = DIFFICULTY_INVALID;
|
||||||
m_SongSortOrder = SORT_GROUP;
|
m_SongSortOrder = SORT_GROUP;
|
||||||
@@ -113,6 +113,9 @@ void GameState::ResetMusicStatistics()
|
|||||||
m_fCurBPS = 10;
|
m_fCurBPS = 10;
|
||||||
m_bFreeze = false;
|
m_bFreeze = false;
|
||||||
m_bPastHereWeGo = false;
|
m_bPastHereWeGo = false;
|
||||||
|
|
||||||
|
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||||
|
m_Inventory[p].Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameState::UpdateSongPosition(float fPositionSeconds)
|
void GameState::UpdateSongPosition(float fPositionSeconds)
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
#include "Style.h"
|
#include "Style.h"
|
||||||
#include "Grade.h"
|
#include "Grade.h"
|
||||||
#include "StageStats.h"
|
#include "StageStats.h"
|
||||||
|
#include "Inventory.h"
|
||||||
|
|
||||||
|
|
||||||
class Song;
|
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
|
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_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];
|
Difficulty m_PreferredDifficulty[NUM_PLAYERS];
|
||||||
SongSortOrder m_SongSortOrder; // used by MusicWheel
|
SongSortOrder m_SongSortOrder; // used by MusicWheel
|
||||||
PlayMode m_PlayMode; // many screen display different info depending on this value
|
PlayMode m_PlayMode; // many screen display different info depending on this value
|
||||||
@@ -123,6 +124,7 @@ public:
|
|||||||
// courses separately from the active options.
|
// courses separately from the active options.
|
||||||
SongOptions m_SongOptions;
|
SongOptions m_SongOptions;
|
||||||
|
|
||||||
|
Inventory m_Inventory[NUM_PLAYERS];
|
||||||
|
|
||||||
bool HasEarnedExtraStage();
|
bool HasEarnedExtraStage();
|
||||||
bool m_bAllow2ndExtraStage; //only used when "Allow Selection of Extra Stage is on"
|
bool m_bAllow2ndExtraStage; //only used when "Allow Selection of Extra Stage is on"
|
||||||
|
|||||||
@@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -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
|
||||||
@@ -66,7 +66,7 @@ JukeboxMenu::JukeboxMenu()
|
|||||||
// fill in data structures
|
// fill in data structures
|
||||||
GAMEMAN->GetStylesForGame( GAMESTATE->m_CurGame, m_Styles );
|
GAMEMAN->GetStylesForGame( GAMESTATE->m_CurGame, m_Styles );
|
||||||
SONGMAN->GetGroupNames( m_sGroups );
|
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" );
|
m_sDifficulties.push_back( "all difficulties" );
|
||||||
for( int d=0; d<NUM_DIFFICULTIES; d++ )
|
for( int d=0; d<NUM_DIFFICULTIES; d++ )
|
||||||
m_sDifficulties.push_back( DifficultyToString( (Difficulty)d ) );
|
m_sDifficulties.push_back( DifficultyToString( (Difficulty)d ) );
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ MusicBannerWheel::MusicBannerWheel()
|
|||||||
m_ScrollingList.SetSpacing( BANNERSPACING );
|
m_ScrollingList.SetSpacing( BANNERSPACING );
|
||||||
this->AddChild( &m_ScrollingList );
|
this->AddChild( &m_ScrollingList );
|
||||||
|
|
||||||
if( 0 == stricmp(GAMESTATE->m_sPreferredGroup, "All Music") )
|
if( GAMESTATE->m_sPreferredGroup == GROUP_ALL_MUSIC )
|
||||||
SONGMAN->GetSongs( arraySongs, GAMESTATE->GetNumStagesLeft() );
|
SONGMAN->GetSongs( arraySongs, GAMESTATE->GetNumStagesLeft() );
|
||||||
else // Get the Group They Want
|
else // Get the Group They Want
|
||||||
SONGMAN->GetSongs( arraySongs, GAMESTATE->m_sPreferredGroup, GAMESTATE->GetNumStagesLeft() );
|
SONGMAN->GetSongs( arraySongs, GAMESTATE->m_sPreferredGroup, GAMESTATE->GetNumStagesLeft() );
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ MusicWheel::MusicWheel()
|
|||||||
if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() )
|
if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() )
|
||||||
{
|
{
|
||||||
// make the preferred group the group of the last song played.
|
// 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;
|
GAMESTATE->m_sPreferredGroup = GAMESTATE->m_pCurSong->m_sGroupName;
|
||||||
|
|
||||||
Song* pSong;
|
Song* pSong;
|
||||||
@@ -294,12 +294,23 @@ void MusicWheel::BuildWheelItemDatas( vector<WheelItemData> &arrayWheelItemDatas
|
|||||||
{
|
{
|
||||||
unsigned i;
|
unsigned i;
|
||||||
|
|
||||||
if(so == SongSortOrder(SORT_ROULETTE) && GAMESTATE->m_PlayMode != PLAY_MODE_ARCADE)
|
// Roulette is used only in arcade and battle
|
||||||
return; /* only used in arcade */
|
if( so == SongSortOrder(SORT_ROULETTE) )
|
||||||
|
{
|
||||||
|
switch( GAMESTATE->m_PlayMode )
|
||||||
|
{
|
||||||
|
case PLAY_MODE_ARCADE:
|
||||||
|
case PLAY_MODE_BATTLE:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
switch( GAMESTATE->m_PlayMode )
|
switch( GAMESTATE->m_PlayMode )
|
||||||
{
|
{
|
||||||
case PLAY_MODE_ARCADE:
|
case PLAY_MODE_ARCADE:
|
||||||
|
case PLAY_MODE_BATTLE:
|
||||||
{
|
{
|
||||||
///////////////////////////////////
|
///////////////////////////////////
|
||||||
// Make an array of Song*, then sort them
|
// 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_MOST_PLAYED: bUseSections = false; break;
|
||||||
case SORT_BPM: 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_TITLE: bUseSections = true; break;
|
||||||
case SORT_ROULETTE: bUseSections = false; break;
|
case SORT_ROULETTE: bUseSections = false; break;
|
||||||
default: ASSERT( false );
|
default: ASSERT( false );
|
||||||
@@ -370,7 +381,7 @@ void MusicWheel::BuildWheelItemDatas( vector<WheelItemData> &arrayWheelItemDatas
|
|||||||
CString sThisSection = GetSectionNameFromSongAndSort( pSong, so );
|
CString sThisSection = GetSectionNameFromSongAndSort( pSong, so );
|
||||||
int iSectionColorIndex = 0;
|
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;
|
continue;
|
||||||
|
|
||||||
if( sThisSection != sLastSection) // new section, make a section item
|
if( sThisSection != sLastSection) // new section, make a section item
|
||||||
@@ -389,13 +400,11 @@ void MusicWheel::BuildWheelItemDatas( vector<WheelItemData> &arrayWheelItemDatas
|
|||||||
for( unsigned i=0; i<arraySongs.size(); i++ )
|
for( unsigned i=0; i<arraySongs.size(); i++ )
|
||||||
{
|
{
|
||||||
Song* pSong = arraySongs[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
|
continue; // skip
|
||||||
arrayWheelItemDatas.push_back( WheelItemData(TYPE_SONG, pSong, "", NULL, SONGMAN->GetSongColor(pSong)) );
|
arrayWheelItemDatas.push_back( WheelItemData(TYPE_SONG, pSong, "", NULL, SONGMAN->GetSongColor(pSong)) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if( so != SORT_ROULETTE )
|
if( so != SORT_ROULETTE )
|
||||||
{
|
{
|
||||||
@@ -428,7 +437,7 @@ void MusicWheel::BuildWheelItemDatas( vector<WheelItemData> &arrayWheelItemDatas
|
|||||||
if( !bFoundExtraSong )
|
if( !bFoundExtraSong )
|
||||||
arrayWheelItemDatas.push_back( WheelItemData(TYPE_SONG, pSong, "", NULL, SONG_REAL_EXTRA_COLOR) );
|
arrayWheelItemDatas.push_back( WheelItemData(TYPE_SONG, pSong, "", NULL, SONG_REAL_EXTRA_COLOR) );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case PLAY_MODE_NONSTOP:
|
case PLAY_MODE_NONSTOP:
|
||||||
case PLAY_MODE_ONI:
|
case PLAY_MODE_ONI:
|
||||||
|
|||||||
@@ -91,6 +91,7 @@ void Player::Load( PlayerNumber pn, NoteData* pNoteData, LifeMeter* pLM, ScoreDi
|
|||||||
* then we could just this->StopTweening()? -glenn */
|
* then we could just this->StopTweening()? -glenn */
|
||||||
m_Judgment.StopTweening();
|
m_Judgment.StopTweening();
|
||||||
// m_Combo.Reset(); // don't reset combos between songs in a course!
|
// m_Combo.Reset(); // don't reset combos between songs in a course!
|
||||||
|
m_Combo.Init( pn );
|
||||||
m_Judgment.Reset();
|
m_Judgment.Reset();
|
||||||
|
|
||||||
if(m_ScoreKeeper) delete m_ScoreKeeper;
|
if(m_ScoreKeeper) delete m_ScoreKeeper;
|
||||||
|
|||||||
@@ -11,20 +11,15 @@
|
|||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "Sprite.h"
|
|
||||||
#include "GameConstantsAndTypes.h"
|
#include "GameConstantsAndTypes.h"
|
||||||
#include "ActorFrame.h"
|
#include "ActorFrame.h"
|
||||||
#include "BitmapText.h"
|
|
||||||
|
|
||||||
class ScoreDisplay : public BitmapText
|
class ScoreDisplay : public ActorFrame
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual void Init( PlayerNumber pn ) { m_PlayerNumber = pn; };
|
virtual void Init( PlayerNumber pn ) { m_PlayerNumber = pn; };
|
||||||
|
|
||||||
virtual void Update( float fDeltaTime ) = 0;
|
virtual void SetScore( float fNewScore ) {};
|
||||||
virtual void Draw() = 0;
|
|
||||||
|
|
||||||
virtual void SetScore( float fNewScore ) = 0;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
PlayerNumber m_PlayerNumber; // needed to look up statistics in GAMESTATE
|
PlayerNumber m_PlayerNumber; // needed to look up statistics in GAMESTATE
|
||||||
|
|||||||
@@ -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 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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
|
||||||
@@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
|
|
||||||
const float SCORE_TWEEN_TIME = 0.2f;
|
const float SCORE_TWEEN_TIME = 0.2f;
|
||||||
|
const int NUM_SCORE_DIGITS = 9;
|
||||||
|
|
||||||
|
|
||||||
ScoreDisplayNormal::ScoreDisplayNormal()
|
ScoreDisplayNormal::ScoreDisplayNormal()
|
||||||
@@ -27,8 +28,8 @@ ScoreDisplayNormal::ScoreDisplayNormal()
|
|||||||
LOG->Trace( "ScoreDisplayNormal::ScoreDisplayNormal()" );
|
LOG->Trace( "ScoreDisplayNormal::ScoreDisplayNormal()" );
|
||||||
|
|
||||||
// init the text
|
// init the text
|
||||||
BitmapText::LoadFromNumbers( THEME->GetPathTo("Numbers","gameplay score numbers") );
|
m_text.LoadFromNumbers( THEME->GetPathTo("Numbers","gameplay score numbers") );
|
||||||
TurnShadowOff();
|
m_text.TurnShadowOff();
|
||||||
|
|
||||||
m_fScore = 0;
|
m_fScore = 0;
|
||||||
m_fTrailingScore = 0;
|
m_fTrailingScore = 0;
|
||||||
@@ -37,13 +38,14 @@ ScoreDisplayNormal::ScoreDisplayNormal()
|
|||||||
CString s;
|
CString s;
|
||||||
for( int i=0; i<NUM_SCORE_DIGITS; i++ )
|
for( int i=0; i<NUM_SCORE_DIGITS; i++ )
|
||||||
s += ' ';
|
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 )
|
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
|
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 )
|
void ScoreDisplayNormal::Update( float fDeltaTime )
|
||||||
{
|
{
|
||||||
BitmapText::Update( fDeltaTime );
|
ScoreDisplay::Update( fDeltaTime );
|
||||||
|
|
||||||
if( m_fTrailingScore != m_fScore )
|
if( m_fTrailingScore != m_fScore )
|
||||||
{
|
{
|
||||||
@@ -71,11 +78,7 @@ void ScoreDisplayNormal::Update( float fDeltaTime )
|
|||||||
m_fScoreVelocity = 0;
|
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();
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -12,10 +12,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "ScoreDisplay.h"
|
#include "ScoreDisplay.h"
|
||||||
|
#include "BitmapText.h"
|
||||||
|
|
||||||
|
|
||||||
const int NUM_SCORE_DIGITS = 9;
|
|
||||||
|
|
||||||
|
|
||||||
class ScoreDisplayNormal : public ScoreDisplay
|
class ScoreDisplayNormal : public ScoreDisplay
|
||||||
{
|
{
|
||||||
@@ -25,11 +24,13 @@ public:
|
|||||||
virtual void Init( PlayerNumber pn );
|
virtual void Init( PlayerNumber pn );
|
||||||
|
|
||||||
virtual void Update( float fDeltaTime );
|
virtual void Update( float fDeltaTime );
|
||||||
virtual void Draw();
|
|
||||||
|
|
||||||
virtual void SetScore( float fNewScore );
|
virtual void SetScore( float fNewScore );
|
||||||
|
virtual void SetText( CString s );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
BitmapText m_text;
|
||||||
|
|
||||||
float m_fScore; // the actual score
|
float m_fScore; // the actual score
|
||||||
float m_fTrailingScore; // what is displayed temporarily
|
float m_fTrailingScore; // what is displayed temporarily
|
||||||
float m_fScoreVelocity; // how fast trailing approaches real score
|
float m_fScoreVelocity; // how fast trailing approaches real score
|
||||||
|
|||||||
@@ -19,42 +19,32 @@
|
|||||||
#include "ThemeManager.h"
|
#include "ThemeManager.h"
|
||||||
|
|
||||||
|
|
||||||
const float SCORE_TWEEN_TIME = 0.5f;
|
|
||||||
|
|
||||||
|
|
||||||
ScoreDisplayOni::ScoreDisplayOni()
|
ScoreDisplayOni::ScoreDisplayOni()
|
||||||
{
|
{
|
||||||
LOG->Trace( "ScoreDisplayOni::ScoreDisplayOni()" );
|
LOG->Trace( "ScoreDisplayOni::ScoreDisplayOni()" );
|
||||||
|
|
||||||
// init the text
|
// init the text
|
||||||
BitmapText::LoadFromNumbers( THEME->GetPathTo("Numbers","gameplay score numbers") );
|
m_text.LoadFromNumbers( THEME->GetPathTo("Numbers","gameplay score numbers") );
|
||||||
TurnShadowOff();
|
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;
|
float fSecsIntoPlay;
|
||||||
if( GAMESTATE->IsPlayerEnabled(m_PlayerNumber) )
|
if( GAMESTATE->IsPlayerEnabled(m_PlayerNumber) )
|
||||||
fSecsIntoPlay = GAMESTATE->m_CurStageStats.fAliveSeconds[m_PlayerNumber];
|
fSecsIntoPlay = GAMESTATE->m_CurStageStats.fAliveSeconds[m_PlayerNumber];
|
||||||
else
|
else
|
||||||
fSecsIntoPlay = 0;
|
fSecsIntoPlay = 0;
|
||||||
|
|
||||||
SetText( SecondsToTime(fSecsIntoPlay) );
|
m_text.SetText( SecondsToTime(fSecsIntoPlay) );
|
||||||
|
|
||||||
BitmapText::Draw();
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,9 +11,8 @@
|
|||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "song.h"
|
|
||||||
#include "ScoreDisplay.h"
|
#include "ScoreDisplay.h"
|
||||||
|
#include "BitmapText.h"
|
||||||
|
|
||||||
|
|
||||||
class ScoreDisplayOni : public ScoreDisplay
|
class ScoreDisplayOni : public ScoreDisplay
|
||||||
@@ -23,12 +22,10 @@ public:
|
|||||||
|
|
||||||
virtual void Init( PlayerNumber pn );
|
virtual void Init( PlayerNumber pn );
|
||||||
|
|
||||||
virtual void Update( float fDeltaTime );
|
virtual void Update( float fDelta );
|
||||||
virtual void Draw();
|
|
||||||
|
|
||||||
virtual void SetScore( float fNewScore );
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
BitmapText m_text;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -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 )
|
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 )
|
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
|
GAMESTATE->m_fSongBeat = m_NoteFieldEdit.m_fBeginMarker - 4; // give a 1 measure lead-in
|
||||||
float fStartSeconds = m_pSong->GetElapsedTimeFromBeat(GAMESTATE->m_fSongBeat) ;
|
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.SetPlaybackRate( GAMESTATE->m_SongOptions.m_fMusicRate );
|
||||||
|
m_soundMusic.SetPositionSeconds( fStartSeconds );
|
||||||
m_soundMusic.StartPlaying();
|
m_soundMusic.StartPlaying();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -1343,8 +1344,9 @@ void ScreenEdit::HandleAreaMenuChoice( AreaMenuChoice c, int* iAnswers )
|
|||||||
|
|
||||||
GAMESTATE->m_fSongBeat = m_NoteFieldEdit.m_fBeginMarker - 4; // give a 1 measure lead-in
|
GAMESTATE->m_fSongBeat = m_NoteFieldEdit.m_fBeginMarker - 4; // give a 1 measure lead-in
|
||||||
float fStartSeconds = m_pSong->GetElapsedTimeFromBeat(GAMESTATE->m_fSongBeat);
|
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.SetPlaybackRate( GAMESTATE->m_SongOptions.m_fMusicRate );
|
||||||
|
m_soundMusic.SetPositionSeconds( fStartSeconds );
|
||||||
m_soundMusic.StartPlaying();
|
m_soundMusic.StartPlaying();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -122,6 +122,7 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary )
|
|||||||
switch( GAMESTATE->m_PlayMode )
|
switch( GAMESTATE->m_PlayMode )
|
||||||
{
|
{
|
||||||
case PLAY_MODE_ARCADE:
|
case PLAY_MODE_ARCADE:
|
||||||
|
case PLAY_MODE_BATTLE:
|
||||||
m_ResultMode = bSummary ? RM_ARCADE_SUMMARY : RM_ARCADE_STAGE;
|
m_ResultMode = bSummary ? RM_ARCADE_SUMMARY : RM_ARCADE_STAGE;
|
||||||
break;
|
break;
|
||||||
case PLAY_MODE_NONSTOP:
|
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
|
if( !GAMESTATE->IsPlayerEnabled( (PlayerNumber)p ) ) // If EZ2 wants to hide this graphic, place it somewhere off screen using theme metrics
|
||||||
continue; // skip
|
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].SetXY( SCORE_NUMBERS_X(p), SCORE_Y );
|
||||||
|
m_ScoreDisplay[p].Init( (PlayerNumber)p );
|
||||||
m_ScoreDisplay[p].SetZoomY( 1.0 );
|
m_ScoreDisplay[p].SetZoomY( 1.0 );
|
||||||
m_ScoreDisplay[p].SetDiffuse( PlayerToColor(p) );
|
|
||||||
this->AddChild( &m_ScoreDisplay[p] );
|
this->AddChild( &m_ScoreDisplay[p] );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
#include "GameState.h"
|
#include "GameState.h"
|
||||||
#include "ScoreDisplayNormal.h"
|
#include "ScoreDisplayNormal.h"
|
||||||
#include "ScoreDisplayOni.h"
|
#include "ScoreDisplayOni.h"
|
||||||
|
#include "ScoreDisplayBattle.h"
|
||||||
#include "ScreenPrompt.h"
|
#include "ScreenPrompt.h"
|
||||||
#include "GrooveRadar.h"
|
#include "GrooveRadar.h"
|
||||||
#include "NotesLoaderSM.h"
|
#include "NotesLoaderSM.h"
|
||||||
@@ -127,6 +128,7 @@ ScreenGameplay::ScreenGameplay( bool bDemonstration )
|
|||||||
switch( GAMESTATE->m_PlayMode )
|
switch( GAMESTATE->m_PlayMode )
|
||||||
{
|
{
|
||||||
case PLAY_MODE_ARCADE:
|
case PLAY_MODE_ARCADE:
|
||||||
|
case PLAY_MODE_BATTLE:
|
||||||
{
|
{
|
||||||
GAMESTATE->m_CurStageStats.pSong = GAMESTATE->m_pCurSong;
|
GAMESTATE->m_CurStageStats.pSong = GAMESTATE->m_pCurSong;
|
||||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||||
@@ -265,6 +267,7 @@ ScreenGameplay::ScreenGameplay( bool bDemonstration )
|
|||||||
switch( GAMESTATE->m_PlayMode )
|
switch( GAMESTATE->m_PlayMode )
|
||||||
{
|
{
|
||||||
case PLAY_MODE_ARCADE:
|
case PLAY_MODE_ARCADE:
|
||||||
|
case PLAY_MODE_BATTLE:
|
||||||
this->AddChild( &m_textStageNumber );
|
this->AddChild( &m_textStageNumber );
|
||||||
break;
|
break;
|
||||||
case PLAY_MODE_NONSTOP:
|
case PLAY_MODE_NONSTOP:
|
||||||
@@ -320,14 +323,18 @@ ScreenGameplay::ScreenGameplay( bool bDemonstration )
|
|||||||
case PLAY_MODE_ENDLESS:
|
case PLAY_MODE_ENDLESS:
|
||||||
m_pScoreDisplay[p] = new ScoreDisplayOni;
|
m_pScoreDisplay[p] = new ScoreDisplayOni;
|
||||||
break;
|
break;
|
||||||
|
case PLAY_MODE_BATTLE:
|
||||||
|
m_pScoreDisplay[p] = new ScoreDisplayBattle;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
ASSERT(0);
|
ASSERT(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GAMESTATE->m_Inventory[p].RefreshPossibleItems();
|
||||||
|
|
||||||
m_pScoreDisplay[p]->Init( (PlayerNumber)p );
|
m_pScoreDisplay[p]->Init( (PlayerNumber)p );
|
||||||
m_pScoreDisplay[p]->SetXY( SCORE_X(p), SCORE_Y(p,bExtra) );
|
m_pScoreDisplay[p]->SetXY( SCORE_X(p), SCORE_Y(p,bExtra) );
|
||||||
m_pScoreDisplay[p]->SetZoom( SCORE_ZOOM );
|
m_pScoreDisplay[p]->SetZoom( SCORE_ZOOM );
|
||||||
m_pScoreDisplay[p]->SetDiffuse( PlayerToColor(p) );
|
|
||||||
this->AddChild( m_pScoreDisplay[p] );
|
this->AddChild( m_pScoreDisplay[p] );
|
||||||
|
|
||||||
m_textPlayerOptions[p].LoadFromFont( THEME->GetPathTo("Fonts","normal") );
|
m_textPlayerOptions[p].LoadFromFont( THEME->GetPathTo("Fonts","normal") );
|
||||||
@@ -492,6 +499,7 @@ bool ScreenGameplay::IsLastSong()
|
|||||||
switch( GAMESTATE->m_PlayMode )
|
switch( GAMESTATE->m_PlayMode )
|
||||||
{
|
{
|
||||||
case PLAY_MODE_ARCADE:
|
case PLAY_MODE_ARCADE:
|
||||||
|
case PLAY_MODE_BATTLE:
|
||||||
return true;
|
return true;
|
||||||
case PLAY_MODE_NONSTOP:
|
case PLAY_MODE_NONSTOP:
|
||||||
case PLAY_MODE_ONI:
|
case PLAY_MODE_ONI:
|
||||||
@@ -521,6 +529,7 @@ void ScreenGameplay::LoadNextSong()
|
|||||||
switch( GAMESTATE->m_PlayMode )
|
switch( GAMESTATE->m_PlayMode )
|
||||||
{
|
{
|
||||||
case PLAY_MODE_ARCADE:
|
case PLAY_MODE_ARCADE:
|
||||||
|
case PLAY_MODE_BATTLE:
|
||||||
break;
|
break;
|
||||||
case PLAY_MODE_NONSTOP:
|
case PLAY_MODE_NONSTOP:
|
||||||
case PLAY_MODE_ONI:
|
case PLAY_MODE_ONI:
|
||||||
@@ -807,6 +816,7 @@ void ScreenGameplay::Update( float fDeltaTime )
|
|||||||
switch( GAMESTATE->m_PlayMode )
|
switch( GAMESTATE->m_PlayMode )
|
||||||
{
|
{
|
||||||
case PLAY_MODE_ARCADE:
|
case PLAY_MODE_ARCADE:
|
||||||
|
case PLAY_MODE_BATTLE:
|
||||||
if( OneIsHot() ) m_announcerHot.PlayRandom();
|
if( OneIsHot() ) m_announcerHot.PlayRandom();
|
||||||
else if( AllAreInDanger() ) m_announcerDanger.PlayRandom();
|
else if( AllAreInDanger() ) m_announcerDanger.PlayRandom();
|
||||||
else m_announcerGood.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 &&
|
if( type==IET_FIRST_PRESS &&
|
||||||
!PREFSMAN->m_bAutoPlay &&
|
!PREFSMAN->m_bAutoPlay &&
|
||||||
StyleI.IsValid() &&
|
StyleI.IsValid() &&
|
||||||
GAMESTATE->IsPlayerEnabled( StyleI.player ) )
|
GAMESTATE->IsPlayerEnabled( StyleI.player ) )
|
||||||
m_Player[StyleI.player].Step( StyleI.col );
|
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()
|
void ScreenGameplay::PositionStatusIcons()
|
||||||
@@ -1045,6 +1073,7 @@ void SaveChanges()
|
|||||||
switch( GAMESTATE->m_PlayMode )
|
switch( GAMESTATE->m_PlayMode )
|
||||||
{
|
{
|
||||||
case PLAY_MODE_ARCADE:
|
case PLAY_MODE_ARCADE:
|
||||||
|
case PLAY_MODE_BATTLE:
|
||||||
GAMESTATE->m_pCurSong->Save();
|
GAMESTATE->m_pCurSong->Save();
|
||||||
break;
|
break;
|
||||||
case PLAY_MODE_NONSTOP:
|
case PLAY_MODE_NONSTOP:
|
||||||
@@ -1067,6 +1096,7 @@ void DontSaveChanges()
|
|||||||
switch( GAMESTATE->m_PlayMode )
|
switch( GAMESTATE->m_PlayMode )
|
||||||
{
|
{
|
||||||
case PLAY_MODE_ARCADE:
|
case PLAY_MODE_ARCADE:
|
||||||
|
case PLAY_MODE_BATTLE:
|
||||||
ld.LoadFromSMFile(GAMESTATE->m_pCurSong->GetCacheFilePath(),
|
ld.LoadFromSMFile(GAMESTATE->m_pCurSong->GetCacheFilePath(),
|
||||||
*GAMESTATE->m_pCurSong);
|
*GAMESTATE->m_pCurSong);
|
||||||
break;
|
break;
|
||||||
@@ -1075,10 +1105,10 @@ void DontSaveChanges()
|
|||||||
case PLAY_MODE_ENDLESS:
|
case PLAY_MODE_ENDLESS:
|
||||||
{
|
{
|
||||||
// FIXME
|
// 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);
|
// Song* pSong = m_apCourseSongs[i];
|
||||||
// ld.LoadFromSMFile( GAMESTATE->m_pCurSong->GetCacheFilePath(), *pSong );
|
// ld.LoadFromSMFile( pSong->GetCacheFilePath(), *pSong );
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -1093,6 +1123,7 @@ void ShowSavePrompt( ScreenMessage SM_SendWhenDone )
|
|||||||
switch( GAMESTATE->m_PlayMode )
|
switch( GAMESTATE->m_PlayMode )
|
||||||
{
|
{
|
||||||
case PLAY_MODE_ARCADE:
|
case PLAY_MODE_ARCADE:
|
||||||
|
case PLAY_MODE_BATTLE:
|
||||||
sMessage = ssprintf(
|
sMessage = ssprintf(
|
||||||
"You have changed the offset or BPM of\n"
|
"You have changed the offset or BPM of\n"
|
||||||
"%s.\n"
|
"%s.\n"
|
||||||
@@ -1436,6 +1467,7 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
switch( GAMESTATE->m_PlayMode )
|
switch( GAMESTATE->m_PlayMode )
|
||||||
{
|
{
|
||||||
case PLAY_MODE_ARCADE:
|
case PLAY_MODE_ARCADE:
|
||||||
|
case PLAY_MODE_BATTLE:
|
||||||
// SCREENMAN->SetNewScreen( "ScreenSelectMusic" );
|
// SCREENMAN->SetNewScreen( "ScreenSelectMusic" );
|
||||||
SCREENMAN->SetNewScreen( SONGSEL_SCREEN );
|
SCREENMAN->SetNewScreen( SONGSEL_SCREEN );
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
#define TIMER_SECONDS THEME->GetMetricI("ScreenInstructions","TimerSeconds")
|
#define TIMER_SECONDS THEME->GetMetricI("ScreenInstructions","TimerSeconds")
|
||||||
#define NEXT_SCREEN_ARCADE THEME->GetMetric("ScreenInstructions","NextScreenArcade")
|
#define NEXT_SCREEN_ARCADE THEME->GetMetric("ScreenInstructions","NextScreenArcade")
|
||||||
#define NEXT_SCREEN_ONI THEME->GetMetric("ScreenInstructions","NextScreenOni")
|
#define NEXT_SCREEN_ONI THEME->GetMetric("ScreenInstructions","NextScreenOni")
|
||||||
|
#define NEXT_SCREEN_BATTLE THEME->GetMetric("ScreenInstructions","NextScreenBattle")
|
||||||
|
|
||||||
|
|
||||||
ScreenInstructions::ScreenInstructions()
|
ScreenInstructions::ScreenInstructions()
|
||||||
@@ -52,7 +52,9 @@ ScreenInstructions::ScreenInstructions()
|
|||||||
//
|
//
|
||||||
// Skip this screen unless someone chose easy or beginner
|
// Skip this screen unless someone chose easy or beginner
|
||||||
//
|
//
|
||||||
Difficulty easiestDifficulty = DIFFICULTY_HARD;
|
if( GAMESTATE->m_PlayMode == PLAY_MODE_ARCADE )
|
||||||
|
{
|
||||||
|
Difficulty easiestDifficulty = (Difficulty)(NUM_DIFFICULTIES-1);
|
||||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||||
{
|
{
|
||||||
if( !GAMESTATE->IsPlayerEnabled(p) )
|
if( !GAMESTATE->IsPlayerEnabled(p) )
|
||||||
@@ -61,10 +63,12 @@ ScreenInstructions::ScreenInstructions()
|
|||||||
}
|
}
|
||||||
if( easiestDifficulty > DIFFICULTY_EASY )
|
if( easiestDifficulty > DIFFICULTY_EASY )
|
||||||
{
|
{
|
||||||
|
// skip this screen
|
||||||
this->SendScreenMessage( SM_GoToNextScreen, 0 );
|
this->SendScreenMessage( SM_GoToNextScreen, 0 );
|
||||||
m_Menu.ImmedOffScreenToMenu();
|
m_Menu.ImmedOffScreenToMenu();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
m_Menu.TweenOnScreenFromMenu( SM_None, true );
|
m_Menu.TweenOnScreenFromMenu( SM_None, true );
|
||||||
@@ -84,6 +88,9 @@ ScreenInstructions::ScreenInstructions()
|
|||||||
case PLAY_MODE_ENDLESS:
|
case PLAY_MODE_ENDLESS:
|
||||||
sHowToPlayPath = THEME->GetPathTo("Graphics","instructions endless");
|
sHowToPlayPath = THEME->GetPathTo("Graphics","instructions endless");
|
||||||
break;
|
break;
|
||||||
|
case PLAY_MODE_BATTLE:
|
||||||
|
sHowToPlayPath = THEME->GetPathTo("Graphics","instructions battle");
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
ASSERT(0);
|
ASSERT(0);
|
||||||
}
|
}
|
||||||
@@ -149,6 +156,9 @@ void ScreenInstructions::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
case PLAY_MODE_ENDLESS:
|
case PLAY_MODE_ENDLESS:
|
||||||
SCREENMAN->SetNewScreen( NEXT_SCREEN_ONI );
|
SCREENMAN->SetNewScreen( NEXT_SCREEN_ONI );
|
||||||
break;
|
break;
|
||||||
|
case PLAY_MODE_BATTLE:
|
||||||
|
SCREENMAN->SetNewScreen( NEXT_SCREEN_BATTLE );
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
ASSERT(0);
|
ASSERT(0);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ bool PrepareForJukebox() // always return true.
|
|||||||
GAMESTATE->m_PlayMode = PLAY_MODE_ARCADE;
|
GAMESTATE->m_PlayMode = PLAY_MODE_ARCADE;
|
||||||
|
|
||||||
vector<Song*> vSongs;
|
vector<Song*> vSongs;
|
||||||
if( GAMESTATE->m_sPreferredGroup.CompareNoCase("all music") == 0 )
|
if( GAMESTATE->m_sPreferredGroup == GROUP_ALL_MUSIC )
|
||||||
SONGMAN->GetSongs( vSongs );
|
SONGMAN->GetSongs( vSongs );
|
||||||
else
|
else
|
||||||
SONGMAN->GetSongs( vSongs, GAMESTATE->m_sPreferredGroup );
|
SONGMAN->GetSongs( vSongs, GAMESTATE->m_sPreferredGroup );
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ void ScreenJukeboxMenu::MenuStart( PlayerNumber pn )
|
|||||||
bool bModifiers = m_Selector.GetSelectedModifiers();
|
bool bModifiers = m_Selector.GetSelectedModifiers();
|
||||||
|
|
||||||
GAMESTATE->m_CurStyle = style;
|
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++ )
|
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||||
GAMESTATE->m_PreferredDifficulty[p] = dc;
|
GAMESTATE->m_PreferredDifficulty[p] = dc;
|
||||||
GAMESTATE->m_bJukeboxUsesModifiers = bModifiers;
|
GAMESTATE->m_bJukeboxUsesModifiers = bModifiers;
|
||||||
|
|||||||
@@ -193,6 +193,7 @@ ScreenNameEntry::ScreenNameEntry()
|
|||||||
switch( GAMESTATE->m_PlayMode )
|
switch( GAMESTATE->m_PlayMode )
|
||||||
{
|
{
|
||||||
case PLAY_MODE_ARCADE:
|
case PLAY_MODE_ARCADE:
|
||||||
|
case PLAY_MODE_BATTLE:
|
||||||
{
|
{
|
||||||
StageStats SS;
|
StageStats SS;
|
||||||
vector<Song*> vSongs;
|
vector<Song*> vSongs;
|
||||||
@@ -382,6 +383,7 @@ void ScreenNameEntry::MenuStart( PlayerNumber pn )
|
|||||||
switch( GAMESTATE->m_PlayMode )
|
switch( GAMESTATE->m_PlayMode )
|
||||||
{
|
{
|
||||||
case PLAY_MODE_ARCADE:
|
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];
|
SONGMAN->m_MachineScores[GAMESTATE->m_RankingNotesType][GAMESTATE->m_RankingCategory[pn]][GAMESTATE->m_iRankingIndex[pn]].sName = m_sSelectedName[pn];
|
||||||
break;
|
break;
|
||||||
case PLAY_MODE_NONSTOP:
|
case PLAY_MODE_NONSTOP:
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ ScreenSelectDifficulty::ScreenSelectDifficulty()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
m_iCurrentPage = PAGE_1;
|
m_CurrentPage = PAGE_1;
|
||||||
|
|
||||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||||
{
|
{
|
||||||
@@ -240,7 +240,9 @@ void ScreenSelectDifficulty::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
case SM_GoToNextScreen:
|
case SM_GoToNextScreen:
|
||||||
for( p=0; p<NUM_PLAYERS; p++ )
|
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_PlayMode = mc.pm;
|
||||||
GAMESTATE->m_PreferredDifficulty[p] = mc.dc;
|
GAMESTATE->m_PreferredDifficulty[p] = mc.dc;
|
||||||
}
|
}
|
||||||
@@ -271,8 +273,8 @@ void ScreenSelectDifficulty::MenuLeft( PlayerNumber pn )
|
|||||||
return;
|
return;
|
||||||
if( m_iChoiceOnPage[pn] == 0 ) // can't go left any more
|
if( m_iChoiceOnPage[pn] == 0 ) // can't go left any more
|
||||||
{
|
{
|
||||||
if( m_iCurrentPage > 0 )
|
if( m_CurrentPage > 0 )
|
||||||
ChangePage( m_iCurrentPage-1 );
|
ChangePage( (Page)(m_CurrentPage-1) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
ChangeWithinPage( pn, m_iChoiceOnPage[pn]-1, false );
|
ChangeWithinPage( pn, m_iChoiceOnPage[pn]-1, false );
|
||||||
@@ -283,16 +285,16 @@ void ScreenSelectDifficulty::MenuRight( PlayerNumber pn )
|
|||||||
{
|
{
|
||||||
if( m_bChosen[pn] )
|
if( m_bChosen[pn] )
|
||||||
return;
|
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 )
|
if( m_CurrentPage < NUM_PAGES-1 )
|
||||||
ChangePage( m_iCurrentPage+1 );
|
ChangePage( (Page)(m_CurrentPage+1) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
ChangeWithinPage( pn, m_iChoiceOnPage[pn]+1, false );
|
ChangeWithinPage( pn, m_iChoiceOnPage[pn]+1, false );
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenSelectDifficulty::ChangePage( int iNewPage )
|
void ScreenSelectDifficulty::ChangePage( Page newPage )
|
||||||
{
|
{
|
||||||
int p;
|
int p;
|
||||||
|
|
||||||
@@ -301,42 +303,51 @@ void ScreenSelectDifficulty::ChangePage( int iNewPage )
|
|||||||
if( GAMESTATE->IsPlayerEnabled(p) && m_bChosen[p] )
|
if( GAMESTATE->IsPlayerEnabled(p) && m_bChosen[p] )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
bool bPageIncreasing = iNewPage > m_iCurrentPage;
|
bool bPageIncreasing = newPage > m_CurrentPage;
|
||||||
m_iCurrentPage = iNewPage;
|
m_CurrentPage = newPage;
|
||||||
|
|
||||||
if( iNewPage == PAGE_2 )
|
if( newPage == PAGE_2 )
|
||||||
{
|
{
|
||||||
m_soundDifficult.Stop();
|
m_soundDifficult.Stop();
|
||||||
m_soundDifficult.PlayRandom();
|
m_soundDifficult.PlayRandom();
|
||||||
}
|
}
|
||||||
|
|
||||||
// change both players
|
// 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++ )
|
for( p=0; p<NUM_PLAYERS; p++ )
|
||||||
ChangeWithinPage( (PlayerNumber)p, iNewChoice, true );
|
ChangeWithinPage( (PlayerNumber)p, iNewChoice, true );
|
||||||
|
|
||||||
// move frame with choices
|
// move frame with choices
|
||||||
m_framePages.StopTweening();
|
m_framePages.StopTweening();
|
||||||
m_framePages.BeginTweening( 0.2f );
|
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 )
|
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);
|
if( p!=pn && m_CurrentPage==PAGE_1 )
|
||||||
float fCursorY = CURSOR_Y(m_iCurrentPage,m_iChoiceOnPage[pn],pn);
|
continue; // skip
|
||||||
|
|
||||||
m_sprCursor[pn].StopTweening();
|
m_iChoiceOnPage[p] = iNewChoice;
|
||||||
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_sprJoinMessagehadow[pn].StopTweening();
|
float fCursorX = CURSOR_X(m_CurrentPage,m_iChoiceOnPage[p],p);
|
||||||
m_sprJoinMessagehadow[pn].BeginTweening( 0.2f, bChangingPages ? TWEEN_LINEAR : TWEEN_BIAS_BEGIN );
|
float fCursorY = CURSOR_Y(m_CurrentPage,m_iChoiceOnPage[p],p);
|
||||||
m_sprJoinMessagehadow[pn].SetTweenX( fCursorX );
|
|
||||||
m_sprJoinMessagehadow[pn].SetTweenY( fCursorY );
|
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();
|
m_soundChange.Play();
|
||||||
}
|
}
|
||||||
@@ -350,12 +361,12 @@ void ScreenSelectDifficulty::MenuStart( PlayerNumber pn )
|
|||||||
for( unsigned page=0; page<NUM_PAGES; page++ )
|
for( unsigned page=0; page<NUM_PAGES; page++ )
|
||||||
m_sprMoreArrows[page].FadeOff( 0, "fade", 0.5f );
|
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)) );
|
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
|
/* XXX: This will play the same announcer twice at the same time; that'll probably
|
||||||
* result in an echo effect. */
|
* result in an echo effect. */
|
||||||
if( m_iCurrentPage == PAGE_2 )
|
if( m_CurrentPage == PAGE_2 )
|
||||||
{
|
{
|
||||||
// choose this for all the other players too
|
// choose this for all the other players too
|
||||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
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 fCursorX = CURSOR_X(m_CurrentPage,m_iChoiceOnPage[pn],pn);
|
||||||
float fCursorY = CURSOR_Y(m_iCurrentPage,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 );
|
||||||
m_sprCursor[pn].BeginTweening( 0.2f );
|
m_sprCursor[pn].BeginTweening( 0.2f );
|
||||||
@@ -413,7 +424,7 @@ void ScreenSelectDifficulty::TweenOffScreen()
|
|||||||
m_SubActors[p]->StopTweening();
|
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].SetXY( EXPLANATION_X(page), EXPLANATION_Y(page) );
|
||||||
m_sprExplanation[page].BeginTweening( 0.5, Actor::TWEEN_BOUNCE_BEGIN );
|
m_sprExplanation[page].BeginTweening( 0.5, Actor::TWEEN_BOUNCE_BEGIN );
|
||||||
@@ -467,8 +478,8 @@ void ScreenSelectDifficulty::TweenOnScreen()
|
|||||||
if( !GAMESTATE->IsPlayerEnabled((PlayerNumber)p) )
|
if( !GAMESTATE->IsPlayerEnabled((PlayerNumber)p) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
float fCursorX = CURSOR_X(m_iCurrentPage,m_iChoiceOnPage[p],p);
|
float fCursorX = CURSOR_X(m_CurrentPage,m_iChoiceOnPage[p],p);
|
||||||
float fCursorY = CURSOR_Y(m_iCurrentPage,m_iChoiceOnPage[p],p);
|
float fCursorY = CURSOR_Y(m_CurrentPage,m_iChoiceOnPage[p],p);
|
||||||
|
|
||||||
|
|
||||||
m_sprCursor[p].SetXY( fCursorX, fCursorY );
|
m_sprCursor[p].SetXY( fCursorX, fCursorY );
|
||||||
@@ -482,8 +493,8 @@ void ScreenSelectDifficulty::TweenOnScreen()
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
const int p = m_iCurrentPage;
|
const int p = m_CurrentPage;
|
||||||
for( unsigned c=0; c<m_ModeChoices[m_iCurrentPage].size(); c++ )
|
for( unsigned c=0; c<m_ModeChoices[m_CurrentPage].size(); c++ )
|
||||||
{
|
{
|
||||||
const float fPause = c*0.2f;
|
const float fPause = c*0.2f;
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
void ChangeWithinPage( PlayerNumber pn, int iNewChoice, bool bChangingPages );
|
void ChangeWithinPage( PlayerNumber pn, int iNewChoice, bool bChangingPages );
|
||||||
void ChangePage( int iNewPage );
|
void ChangePage( Page newPage );
|
||||||
|
|
||||||
MenuElements m_Menu;
|
MenuElements m_Menu;
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@ private:
|
|||||||
|
|
||||||
vector<ModeChoice> m_ModeChoices[NUM_PAGES];
|
vector<ModeChoice> m_ModeChoices[NUM_PAGES];
|
||||||
|
|
||||||
int m_iCurrentPage;
|
Page m_CurrentPage;
|
||||||
int m_iChoiceOnPage[NUM_PLAYERS];
|
int m_iChoiceOnPage[NUM_PLAYERS];
|
||||||
bool m_bChosen[NUM_PLAYERS];
|
bool m_bChosen[NUM_PLAYERS];
|
||||||
|
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ ScreenSelectGroup::ScreenSelectGroup()
|
|||||||
|
|
||||||
if(!PREFSMAN->m_bShowSelectGroup)
|
if(!PREFSMAN->m_bShowSelectGroup)
|
||||||
{
|
{
|
||||||
GAMESTATE->m_sPreferredGroup = "ALL MUSIC";
|
GAMESTATE->m_sPreferredGroup = GROUP_ALL_MUSIC;
|
||||||
m_Menu.ImmedOffScreenToMenu();
|
m_Menu.ImmedOffScreenToMenu();
|
||||||
m_bChosen = true;
|
m_bChosen = true;
|
||||||
this->SendScreenMessage( SM_GoToNextScreen, 0.f );
|
this->SendScreenMessage( SM_GoToNextScreen, 0.f );
|
||||||
@@ -105,7 +105,7 @@ ScreenSelectGroup::ScreenSelectGroup()
|
|||||||
|
|
||||||
// copy group names into a vector
|
// copy group names into a vector
|
||||||
std::vector<CString> asGroupNames;
|
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 )
|
for( std::map<CString, CString>::const_iterator iter = mapGroupNames.begin(); iter != mapGroupNames.end(); ++iter )
|
||||||
asGroupNames.push_back( iter->first );
|
asGroupNames.push_back( iter->first );
|
||||||
|
|
||||||
@@ -227,7 +227,7 @@ void ScreenSelectGroup::AfterChange()
|
|||||||
CString sSelectedGroupName = m_GroupList.GetSelectionName();
|
CString sSelectedGroupName = m_GroupList.GetSelectionName();
|
||||||
|
|
||||||
CString sGroupBannerPath;
|
CString sGroupBannerPath;
|
||||||
if( 0 == stricmp(sSelectedGroupName, "ALL MUSIC") )
|
if( sSelectedGroupName == GROUP_ALL_MUSIC )
|
||||||
sGroupBannerPath = THEME->GetPathTo("Graphics","all music banner");
|
sGroupBannerPath = THEME->GetPathTo("Graphics","all music banner");
|
||||||
else if( SONGMAN->GetGroupBannerPath(sSelectedGroupName) != "" )
|
else if( SONGMAN->GetGroupBannerPath(sSelectedGroupName) != "" )
|
||||||
sGroupBannerPath = SONGMAN->GetGroupBannerPath(sSelectedGroupName);
|
sGroupBannerPath = SONGMAN->GetGroupBannerPath(sSelectedGroupName);
|
||||||
@@ -282,9 +282,9 @@ void ScreenSelectGroup::MenuStart( PlayerNumber pn )
|
|||||||
m_bChosen = true;
|
m_bChosen = true;
|
||||||
|
|
||||||
GAMESTATE->m_pCurSong = NULL;
|
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") );
|
SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("select group comment all music") );
|
||||||
else
|
else
|
||||||
SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("select group comment general") );
|
SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("select group comment general") );
|
||||||
|
|||||||
@@ -206,7 +206,6 @@ ScreenSelectMusic::ScreenSelectMusic()
|
|||||||
m_sprMarathonBalloon.Load( THEME->GetPathTo("Graphics","select music marathon balloon") );
|
m_sprMarathonBalloon.Load( THEME->GetPathTo("Graphics","select music marathon balloon") );
|
||||||
m_sprMarathonBalloon.StopAnimating();
|
m_sprMarathonBalloon.StopAnimating();
|
||||||
m_sprMarathonBalloon.SetXY( BALLOON_X, BALLOON_Y );
|
m_sprMarathonBalloon.SetXY( BALLOON_X, BALLOON_Y );
|
||||||
m_sprMarathonBalloon.SetZoom( 1 );
|
|
||||||
m_sprMarathonBalloon.SetZoomY( 0 );
|
m_sprMarathonBalloon.SetZoomY( 0 );
|
||||||
m_sprMarathonBalloon.SetDiffuse( RageColor(1,1,1,1) );
|
m_sprMarathonBalloon.SetDiffuse( RageColor(1,1,1,1) );
|
||||||
m_sprMarathonBalloon.SetEffectBobbing( RageVector3(0,10,0), 2 );
|
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.Load( THEME->GetPathTo("Graphics","select music long balloon") );
|
||||||
m_sprLongBalloon.StopAnimating();
|
m_sprLongBalloon.StopAnimating();
|
||||||
m_sprLongBalloon.SetXY( BALLOON_X, BALLOON_Y );
|
m_sprLongBalloon.SetXY( BALLOON_X, BALLOON_Y );
|
||||||
m_sprLongBalloon.SetZoom( 1 );
|
|
||||||
m_sprLongBalloon.SetZoomY( 0 );
|
m_sprLongBalloon.SetZoomY( 0 );
|
||||||
m_sprLongBalloon.SetDiffuse( RageColor(1,1,1,1) );
|
m_sprLongBalloon.SetDiffuse( RageColor(1,1,1,1) );
|
||||||
m_sprLongBalloon.SetEffectBobbing( RageVector3(0,10,0), 2 );
|
m_sprLongBalloon.SetEffectBobbing( RageVector3(0,10,0), 2 );
|
||||||
@@ -309,11 +307,11 @@ void ScreenSelectMusic::TweenOnScreen()
|
|||||||
|
|
||||||
void ScreenSelectMusic::TweenOffScreen()
|
void ScreenSelectMusic::TweenOffScreen()
|
||||||
{
|
{
|
||||||
m_sprBannerFrame.FadeOff( 0, "bounce left", TWEEN_TIME*2 );
|
m_sprBannerFrame.FadeOff( 0, "bounce left", TWEEN_TIME );
|
||||||
m_Banner.FadeOff( 0, "bounce left", TWEEN_TIME*2 );
|
m_Banner.FadeOff( 0, "bounce left", TWEEN_TIME );
|
||||||
m_BPMDisplay.FadeOff( 0, "bounce left", TWEEN_TIME*2 );
|
m_BPMDisplay.FadeOff( 0, "bounce left", TWEEN_TIME );
|
||||||
m_StageDisplay.FadeOff( 0, "bounce left", TWEEN_TIME*2 );
|
m_StageDisplay.FadeOff( 0, "bounce left", TWEEN_TIME );
|
||||||
m_sprCDTitle.FadeOff( 0, "bounce left", TWEEN_TIME*2 );
|
m_sprCDTitle.FadeOff( 0, "bounce left", TWEEN_TIME );
|
||||||
|
|
||||||
int p;
|
int p;
|
||||||
for( p=0; p<NUM_PLAYERS; 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 )
|
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 )
|
if( DeviceI.device == DEVICE_KEYBOARD && DeviceI.button == SDLK_F9 )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -790,7 +790,7 @@ bool CompareNotesPointersForExtra(const Notes *n1, const Notes *n2)
|
|||||||
void SongManager::GetExtraStageInfo( bool bExtra2, CString sPreferredGroup, const StyleDef *sd,
|
void SongManager::GetExtraStageInfo( bool bExtra2, CString sPreferredGroup, const StyleDef *sd,
|
||||||
Song*& pSongOut, Notes*& pNotesOut, PlayerOptions& po_out, SongOptions& so_out )
|
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;
|
return;
|
||||||
|
|
||||||
// Choose a hard song for the extra stage
|
// Choose a hard song for the extra stage
|
||||||
@@ -800,7 +800,7 @@ void SongManager::GetExtraStageInfo( bool bExtra2, CString sPreferredGroup, cons
|
|||||||
Notes* pExtra2Notes = NULL;
|
Notes* pExtra2Notes = NULL;
|
||||||
|
|
||||||
vector<Song*> apSongs;
|
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 );
|
SONGMAN->GetSongs( apSongs, sGroup );
|
||||||
for( unsigned s=0; s<apSongs.size(); s++ ) // foreach song
|
for( unsigned s=0; s<apSongs.size(); s++ ) // foreach song
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -553,6 +553,12 @@ cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
|
|||||||
<File
|
<File
|
||||||
RelativePath=".\Grade.h">
|
RelativePath=".\Grade.h">
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="Inventory.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="Inventory.h">
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="MenuInput.h">
|
RelativePath="MenuInput.h">
|
||||||
</File>
|
</File>
|
||||||
@@ -625,12 +631,6 @@ cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
|
|||||||
<File
|
<File
|
||||||
RelativePath="NotesWriterSM.h">
|
RelativePath="NotesWriterSM.h">
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath=".\Player.cpp">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\Player.h">
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="PlayerOptions.cpp">
|
RelativePath="PlayerOptions.cpp">
|
||||||
</File>
|
</File>
|
||||||
@@ -1314,12 +1314,24 @@ cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
|
|||||||
<File
|
<File
|
||||||
RelativePath="NoteField.h">
|
RelativePath="NoteField.h">
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\Player.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\Player.h">
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="ScoreDisplay.cpp">
|
RelativePath="ScoreDisplay.cpp">
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="ScoreDisplay.h">
|
RelativePath="ScoreDisplay.h">
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ScoreDisplayBattle.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="ScoreDisplayBattle.h">
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="ScoreDisplayNormal.cpp">
|
RelativePath="ScoreDisplayNormal.cpp">
|
||||||
</File>
|
</File>
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
!define PRODUCT_NAME_VER "${PRODUCT_NAME} ${VERSION}"
|
!define PRODUCT_NAME_VER "${PRODUCT_NAME} ${VERSION}"
|
||||||
|
|
||||||
Name "${PRODUCT_NAME}"
|
Name "${PRODUCT_NAME}"
|
||||||
OutFile "StepMania-CVS-20030220.exe"
|
OutFile "StepMania-CVS-20030223.exe"
|
||||||
;OutFile "StepMania301.exe"
|
;OutFile "StepMania301.exe"
|
||||||
|
|
||||||
; Some default compiler settings (uncomment and change at will):
|
; Some default compiler settings (uncomment and change at will):
|
||||||
|
|||||||
Reference in New Issue
Block a user