3.0 b1?
This commit is contained in:
@@ -17,7 +17,6 @@
|
||||
AnnouncerManager* ANNOUNCER = NULL; // global object accessable from anywhere in the program
|
||||
|
||||
|
||||
const CString DEFAULT_ANNOUNCER_NAME = "default";
|
||||
const CString EZ2_ANNOUNCER_NAME = "ez2";
|
||||
const CString ANNOUNER_BASE_DIR = "Announcers\\";
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ void Course::LoadFromCRSFile( CString sPath, CArray<Song*,Song*> &apSongs )
|
||||
{
|
||||
CStdioFile file;
|
||||
if( !file.Open( sPath, CFile::modeRead|CFile::shareDenyNone ) )
|
||||
throw RageException( "Error opening SM file '%s'.", sPath );
|
||||
throw RageException( "Error opening CRS file '%s'.", sPath );
|
||||
|
||||
|
||||
// read the whole file into a sFileText
|
||||
@@ -89,15 +89,9 @@ void Course::LoadFromCRSFile( CString sPath, CArray<Song*,Song*> &apSongs )
|
||||
if( pSong == NULL ) // we didn't find the Song
|
||||
continue; // skip this song
|
||||
|
||||
Notes* pNotes = NULL;
|
||||
for( i=0; i<pSong->m_arrayNotes.GetSize(); i++ )
|
||||
if( 0 == stricmp(pSong->m_arrayNotes[i]->m_sDescription, sNotesDescription) )
|
||||
pNotes = pSong->m_arrayNotes[i];
|
||||
DifficultyClass dc = Notes::DifficultyClassFromDescriptionAndMeter( sNotesDescription, 6 );
|
||||
|
||||
if( pNotes == NULL ) // we didn't find the Notes
|
||||
continue; // skip this song
|
||||
|
||||
AddStage( pSong, pNotes );
|
||||
AddStage( pSong, dc );
|
||||
}
|
||||
|
||||
else
|
||||
|
||||
@@ -21,33 +21,28 @@ class Course
|
||||
public:
|
||||
Course()
|
||||
{
|
||||
m_NotesType = NOTES_TYPE_INVALID;
|
||||
m_iStages = 0;
|
||||
m_bRepeat = false;
|
||||
for( int i=0; i<MAX_COURSE_STAGES; i++ )
|
||||
{
|
||||
m_apSongs[i] = NULL;
|
||||
m_apNotes[i] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
CString m_sName;
|
||||
CString m_sBannerPath;
|
||||
CString m_sCDTitlePath;
|
||||
NotesType m_NotesType;
|
||||
int m_iStages;
|
||||
Song* m_apSongs[MAX_COURSE_STAGES];
|
||||
Notes* m_apNotes[MAX_COURSE_STAGES];
|
||||
DifficultyClass m_aDifficultyClasses[MAX_COURSE_STAGES];
|
||||
bool m_bRepeat; // repeat after last song?
|
||||
PlayerOptions m_PlayerOptions;
|
||||
PlayerOptions m_PlayerOptions;
|
||||
|
||||
void LoadFromCRSFile( CString sPath, CArray<Song*,Song*> &apSongs );
|
||||
|
||||
void AddStage( Song* pSong, Notes* pNotes )
|
||||
void AddStage( Song* pSong, DifficultyClass dc )
|
||||
{
|
||||
ASSERT( m_iStages <= MAX_COURSE_STAGES );
|
||||
m_apSongs[m_iStages] = pSong;
|
||||
m_apNotes[m_iStages] = pNotes;
|
||||
m_aDifficultyClasses[m_iStages] = dc;
|
||||
m_iStages++;
|
||||
}
|
||||
|
||||
|
||||
@@ -58,14 +58,29 @@ void CourseContentsFrame::SetFromCourse( Course* pCourse )
|
||||
m_Meters[i].SetFromNotes( NULL );
|
||||
}
|
||||
|
||||
for( i=0; i<pCourse->m_iStages-1; i++ )
|
||||
for( i=0; i<min(pCourse->m_iStages, MAX_COURSE_CONTENTS); i++ )
|
||||
{
|
||||
m_textContents[i].SetText( pCourse->m_apSongs[i]->GetFullTitle() );
|
||||
m_textContents[i].SetDiffuseColor( DifficultyClassToColor(pCourse->m_apNotes[i]->m_DifficultyClass) );
|
||||
m_textContents[i].SetDiffuseColor( DifficultyClassToColor(pCourse->m_aDifficultyClasses[i]) );
|
||||
|
||||
m_Meters[i].SetFromNotes( NULL );
|
||||
|
||||
Song* pSong = pCourse->m_apSongs[i];
|
||||
for( int j=0; j<pSong->m_arrayNotes.GetSize(); j++ )
|
||||
{
|
||||
Notes* pNotes = pSong->m_arrayNotes[j];
|
||||
if( pSong->m_arrayNotes[j]->m_DifficultyClass == pCourse->m_aDifficultyClasses[i] )
|
||||
{
|
||||
m_Meters[i].SetFromNotes( pNotes );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
m_Meters[i].SetFromNotes( pCourse->m_apNotes[i] );
|
||||
}
|
||||
|
||||
if( pCourse->m_iStages >= MAX_COURSE_CONTENTS )
|
||||
{
|
||||
m_textContents[MAX_COURSE_CONTENTS-1].SetText( ssprintf("%d more...", pCourse->m_iStages-(MAX_COURSE_CONTENTS-1)) );
|
||||
m_Meters[MAX_COURSE_CONTENTS-1].SetFromNotes( NULL );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -532,12 +532,9 @@ void MusicWheel::BuildWheelItemDatas( CArray<WheelItemData, WheelItemData&> &arr
|
||||
for( int c=0; c<SONGMAN->m_aCourses.GetSize(); c++ ) // foreach course
|
||||
{
|
||||
Course* pCourse = &SONGMAN->m_aCourses[c];
|
||||
if( GAMEMAN->GetCurrentStyleDef()->m_NotesType == pCourse->m_NotesType )
|
||||
{
|
||||
arrayWheelItemDatas.Add( WheelItemData() );
|
||||
WheelItemData &WID = arrayWheelItemDatas[arrayWheelItemDatas.GetSize()-1];
|
||||
WID.Load( TYPE_COURSE, NULL, "", pCourse, D3DXCOLOR(1,1,1,1) );
|
||||
}
|
||||
arrayWheelItemDatas.Add( WheelItemData() );
|
||||
WheelItemData &WID = arrayWheelItemDatas[arrayWheelItemDatas.GetSize()-1];
|
||||
WID.Load( TYPE_COURSE, NULL, "", pCourse, D3DXCOLOR(1,1,1,1) );
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -758,7 +758,7 @@ float NoteData::GetChaosRadarValue( float fSongSeconds )
|
||||
iNumChaosNotes++;
|
||||
}
|
||||
|
||||
float fReturn = iNumChaosNotes / fSongSeconds * 0.5;
|
||||
float fReturn = iNumChaosNotes / fSongSeconds * 0.5f;
|
||||
return min( fReturn, 1.0f );
|
||||
}
|
||||
|
||||
|
||||
+22
-21
@@ -268,7 +268,7 @@ bool Notes::LoadFromBMSFile( const CString &sPath )
|
||||
case NOTES_TYPE_DANCE_DOUBLE:
|
||||
case NOTES_TYPE_DANCE_COUPLE:
|
||||
iTransformNewToOld[0] = DANCE_NOTE_PAD1_LEFT;
|
||||
iTransformNewToOld[1] = DANCE_NOTE_PAD1_UP;
|
||||
iTransformNewToOld[1] = DANCE_NOTE_PAD1_DOWN;
|
||||
iTransformNewToOld[2] = DANCE_NOTE_PAD1_UP;
|
||||
iTransformNewToOld[3] = DANCE_NOTE_PAD1_RIGHT;
|
||||
iTransformNewToOld[4] = DANCE_NOTE_PAD2_LEFT;
|
||||
@@ -337,9 +337,10 @@ void DWIcharToNote( char c, InstrumentNumber i, DanceNote ¬e1Out, DanceNote &
|
||||
case INSTRUMENT_1:
|
||||
break;
|
||||
case INSTRUMENT_2:
|
||||
note1Out <<= 6;
|
||||
if( note1Out != DANCE_NOTE_NONE )
|
||||
note1Out += 6;
|
||||
if( note2Out != DANCE_NOTE_NONE )
|
||||
note2Out <<= 6;
|
||||
note2Out += 6;
|
||||
break;
|
||||
default:
|
||||
ASSERT( false );
|
||||
@@ -367,6 +368,7 @@ bool Notes::LoadFromDWITokens(
|
||||
else throw RageException( "Unrecognized DWI mode '%s'", sMode );
|
||||
|
||||
|
||||
|
||||
CMap<int, int, int, int> mapDanceNoteToNoteDataColumn;
|
||||
if( m_NotesType == NOTES_TYPE_DANCE_SINGLE )
|
||||
{
|
||||
@@ -459,26 +461,25 @@ bool Notes::LoadFromDWITokens(
|
||||
|
||||
case '!': // hold start
|
||||
{
|
||||
// rewind and get the last step we inserted
|
||||
double fLastStepBeat = fCurrentBeat - fCurrentIncrementer;
|
||||
int iIndex = BeatToNoteRow( (float)fLastStepBeat );
|
||||
// rewind and get the last step we inserted
|
||||
double fLastStepBeat = fCurrentBeat - fCurrentIncrementer;
|
||||
int iIndex = BeatToNoteRow( (float)fLastStepBeat );
|
||||
|
||||
char holdChar = sStepData[i++];
|
||||
|
||||
DanceNote note1, note2;
|
||||
DWIcharToNote( holdChar, (InstrumentNumber)pad, note1, note2 );
|
||||
|
||||
if( note1 != DANCE_NOTE_NONE )
|
||||
{
|
||||
int iCol1 = mapDanceNoteToNoteDataColumn[note1];
|
||||
tempNoteData.m_TapNotes[iCol1][iIndex] = '2';
|
||||
}
|
||||
if( note2 != DANCE_NOTE_NONE )
|
||||
{
|
||||
int iCol2 = mapDanceNoteToNoteDataColumn[note2];
|
||||
tempNoteData.m_TapNotes[iCol2][iIndex] = '2';
|
||||
}
|
||||
char holdChar = sStepData[i++];
|
||||
|
||||
DanceNote note1, note2;
|
||||
DWIcharToNote( holdChar, (InstrumentNumber)pad, note1, note2 );
|
||||
|
||||
if( note1 != DANCE_NOTE_NONE )
|
||||
{
|
||||
int iCol1 = mapDanceNoteToNoteDataColumn[note1];
|
||||
tempNoteData.m_TapNotes[iCol1][iIndex] = '2';
|
||||
}
|
||||
if( note2 != DANCE_NOTE_NONE )
|
||||
{
|
||||
int iCol2 = mapDanceNoteToNoteDataColumn[note2];
|
||||
tempNoteData.m_TapNotes[iCol2][iIndex] = '2';
|
||||
}
|
||||
}
|
||||
break;
|
||||
default: // this is a note character
|
||||
|
||||
@@ -75,9 +75,10 @@ public:
|
||||
int m_iMaxCombo;
|
||||
int m_iNumTimesPlayed;
|
||||
|
||||
static DifficultyClass DifficultyClassFromDescriptionAndMeter( CString sDescription, int iMeter );
|
||||
|
||||
protected:
|
||||
void TidyUpData();
|
||||
static DifficultyClass DifficultyClassFromDescriptionAndMeter( CString sDescription, int iMeter );
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ Player::Player()
|
||||
}
|
||||
|
||||
|
||||
void Player::Load( PlayerNumber player_no, StyleDef* pStyleDef, NoteData* pNoteData, const PlayerOptions& po, LifeMeterBar* pLM, ScoreDisplayRolling* pScore, int iOriginalNumNotes )
|
||||
void Player::Load( PlayerNumber player_no, StyleDef* pStyleDef, NoteData* pNoteData, const PlayerOptions& po, LifeMeterBar* pLM, ScoreDisplayRolling* pScore, int iOriginalNumNotes, int iNotesMeter )
|
||||
{
|
||||
//LOG->WriteLine( "Player::Load()", );
|
||||
this->CopyAll( pNoteData );
|
||||
@@ -69,7 +69,7 @@ void Player::Load( PlayerNumber player_no, StyleDef* pStyleDef, NoteData* pNoteD
|
||||
m_pLifeMeter = pLM;
|
||||
m_pScore = pScore;
|
||||
if( m_pScore )
|
||||
m_pScore->Init( player_no, m_PlayerOptions, iOriginalNumNotes, SONGMAN->GetCurrentNotes(player_no)->m_iMeter );
|
||||
m_pScore->Init( player_no, m_PlayerOptions, iOriginalNumNotes, iNotesMeter );
|
||||
|
||||
if( !po.m_bHoldNotes )
|
||||
this->RemoveHoldNotes();
|
||||
@@ -438,12 +438,12 @@ void Player::CrossedRow( int iNoteRow, float fSongBeat, float fMaxBeatDiff )
|
||||
|
||||
|
||||
|
||||
GameplayStatistics Player::GetGameplayStatistics()
|
||||
GameplayStatistics Player::GetGameplayStatistics( Song* pS, Notes* pN )
|
||||
{
|
||||
GameplayStatistics GSreturn;
|
||||
|
||||
GSreturn.pSong = SONGMAN->GetCurrentSong();
|
||||
Notes* pNotes = SONGMAN->GetCurrentNotes(m_PlayerNumber);
|
||||
GSreturn.pSong = pS;
|
||||
Notes* pNotes = pN;
|
||||
GSreturn.dc = pNotes->m_DifficultyClass;
|
||||
GSreturn.meter = pNotes->m_iMeter;
|
||||
GSreturn.iPossibleDancePoints = ((NoteData*)this)->GetPossibleDancePoints();
|
||||
@@ -487,8 +487,8 @@ GameplayStatistics Player::GetGameplayStatistics()
|
||||
|
||||
for( int r=0; r<NUM_RADAR_VALUES; r++ )
|
||||
{
|
||||
GSreturn.fRadarPossible[r] = this->GetRadarValue( (RadarCategory)r, SONGMAN->GetCurrentSong()->m_fMusicLengthSeconds );
|
||||
GSreturn.fRadarActual[r] = this->GetActualRadarValue( (RadarCategory)r, SONGMAN->GetCurrentSong()->m_fMusicLengthSeconds );
|
||||
GSreturn.fRadarPossible[r] = this->GetRadarValue( (RadarCategory)r, pS->m_fMusicLengthSeconds );
|
||||
GSreturn.fRadarActual[r] = this->GetActualRadarValue( (RadarCategory)r, pS->m_fMusicLengthSeconds );
|
||||
|
||||
GSreturn.fRadarPossible[r] = clamp( GSreturn.fRadarPossible[r], 0, 1 );
|
||||
GSreturn.fRadarActual[r] = clamp( GSreturn.fRadarActual[r], 0, 1 );
|
||||
|
||||
@@ -44,12 +44,12 @@ public:
|
||||
void Update( float fDeltaTime, float fSongBeat, float fMaxBeatDifference );
|
||||
void DrawPrimitives();
|
||||
|
||||
void Load( PlayerNumber player_no, StyleDef *pStyleDef, NoteData* pNoteData, const PlayerOptions& po, LifeMeterBar* pLM, ScoreDisplayRolling* pScore, int iOriginalNumNotes );
|
||||
void Load( PlayerNumber player_no, StyleDef *pStyleDef, NoteData* pNoteData, const PlayerOptions& po, LifeMeterBar* pLM, ScoreDisplayRolling* pScore, int iOriginalNumNotes, int iNotesMeter );
|
||||
void CrossedRow( int iNoteRow, float fSongBeat, float fMaxBeatDiff );
|
||||
void HandlePlayerStep( float fSongBeat, int col, float fMaxBeatDiff );
|
||||
int UpdateTapNotesMissedOlderThan( float fMissIfOlderThanThisBeat );
|
||||
|
||||
GameplayStatistics GetGameplayStatistics();
|
||||
GameplayStatistics GetGameplayStatistics( Song* pS, Notes* pN );
|
||||
|
||||
void SetOverrideAdd( float fAdd ) { m_NoteField.m_fOverrideAdd = fAdd; };
|
||||
float GetOverrideAdd() { return m_NoteField.m_fOverrideAdd; };
|
||||
|
||||
@@ -138,7 +138,7 @@ ScreenEdit::ScreenEdit()
|
||||
|
||||
m_Clipboard.m_iNumTracks = m_NoteFieldEdit.m_iNumTracks;
|
||||
|
||||
m_Player.Load( PLAYER_1, GAMEMAN->GetCurrentStyleDef(), ¬eData, PlayerOptions(), NULL, NULL, 1 );
|
||||
m_Player.Load( PLAYER_1, GAMEMAN->GetCurrentStyleDef(), ¬eData, PlayerOptions(), NULL, NULL, 1, 1 );
|
||||
m_Player.SetXY( PLAYER_X, PLAYER_Y );
|
||||
|
||||
m_Fade.SetClosed();
|
||||
@@ -552,7 +552,7 @@ void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType typ
|
||||
|
||||
m_Mode = MODE_PLAY;
|
||||
|
||||
m_Player.Load( PLAYER_1, GAMEMAN->GetCurrentStyleDef(), (NoteData*)&m_NoteFieldEdit, PlayerOptions(), NULL, NULL, 1 );
|
||||
m_Player.Load( PLAYER_1, GAMEMAN->GetCurrentStyleDef(), (NoteData*)&m_NoteFieldEdit, PlayerOptions(), NULL, NULL, 1, 1 );
|
||||
|
||||
m_rectRecordBack.BeginTweening( 0.5f );
|
||||
m_rectRecordBack.SetTweenDiffuseColor( D3DXCOLOR(0,0,0,0.5f) );
|
||||
|
||||
@@ -282,18 +282,6 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary )
|
||||
m_ScoreDisplay[p].SetScore( (float)GS[p].max_combo * 1000 );
|
||||
m_ScoreDisplay[p].SetScore( (float)GS[p].score );
|
||||
|
||||
switch( m_ResultMode )
|
||||
{
|
||||
case RM_ARCADE_STAGE:
|
||||
case RM_ARCADE_SUMMARY:
|
||||
m_Grades[p].SpinAndSettleOn( grade[p] );
|
||||
break;
|
||||
case RM_ONI:
|
||||
m_textOniPercent[p].SetText( "100.0%" );
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
m_BonusInfoFrame[p].SetBonusInfo( (PlayerNumber)p, GS[p].fRadarPossible, GS[p].fRadarActual, GS[p].max_combo );
|
||||
|
||||
|
||||
@@ -363,8 +351,10 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary )
|
||||
m_textOniPercent[p].Load( THEME->GetPathTo(FONT_HEADER1) );
|
||||
m_textOniPercent[p].SetXY( GRADE_X[p], GRADE_Y );
|
||||
m_textOniPercent[p].SetShadowLength( 2 );
|
||||
m_textOniPercent[p].SetZoom( 3 );
|
||||
m_textOniPercent[p].SetZoomX( 1.5f );
|
||||
m_textOniPercent[p].SetZoomY( 3 );
|
||||
m_textOniPercent[p].SetEffectGlowing( 1.0f );
|
||||
m_textOniPercent[p].SetText( "100.0%" );
|
||||
this->AddActor( &m_textOniPercent[p] );
|
||||
break;
|
||||
case RM_ARCADE_STAGE:
|
||||
@@ -373,6 +363,7 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary )
|
||||
m_Grades[p].SetZ( -2 );
|
||||
m_Grades[p].SetZoom( 1.0f );
|
||||
m_Grades[p].SetEffectGlowing( 1.0f );
|
||||
m_Grades[p].SpinAndSettleOn( grade[p] );
|
||||
this->AddActor( &m_Grades[p] );
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -88,9 +88,20 @@ ScreenGameplay::ScreenGameplay()
|
||||
ASSERT( pCourse != NULL );
|
||||
for( int i=0; i<pCourse->m_iStages; i++ )
|
||||
{
|
||||
m_apSongQueue.Add( pCourse->m_apSongs[i] );
|
||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||
m_apNotesQueue[p].Add( pCourse->m_apNotes[i] );
|
||||
Song* pSong = pCourse->m_apSongs[i];
|
||||
DifficultyClass dc = pCourse->m_aDifficultyClasses[i];
|
||||
|
||||
for( int j=0; j<pSong->m_arrayNotes.GetSize(); j++ )
|
||||
{
|
||||
Notes* pNotes = pSong->m_arrayNotes[j];
|
||||
if( pSong->m_arrayNotes[j]->m_DifficultyClass == dc )
|
||||
{
|
||||
m_apSongQueue.Add( pSong );
|
||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||
m_apNotesQueue[p].Add( pNotes );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -275,10 +286,12 @@ void ScreenGameplay::SaveSummary()
|
||||
if( !GAMEMAN->IsPlayerEnabled((PlayerNumber)p) )
|
||||
continue; // skip
|
||||
|
||||
SONGMAN->m_aGameplayStatistics[p].Add( m_Player[p].GetGameplayStatistics() );
|
||||
SONGMAN->m_aGameplayStatistics[p].Add( m_Player[p].GetGameplayStatistics( m_pCurSong, m_pCurNotes[p]) );
|
||||
}
|
||||
|
||||
m_pCurSong = NULL;
|
||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||
m_pCurNotes[p] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -293,10 +306,9 @@ void ScreenGameplay::LoadNextSong()
|
||||
m_pCurSong = m_apSongQueue[m_apSongQueue.GetSize()-1];
|
||||
m_apSongQueue.RemoveAt(m_apSongQueue.GetSize()-1);
|
||||
|
||||
Notes* pNotes[NUM_PLAYERS];
|
||||
for( p=0; p<NUM_PLAYERS; p++ )
|
||||
{
|
||||
pNotes[p] = m_apNotesQueue[p][m_apNotesQueue[p].GetSize()-1];
|
||||
m_pCurNotes[p] = m_apNotesQueue[p][m_apNotesQueue[p].GetSize()-1];
|
||||
m_apNotesQueue[p].RemoveAt(m_apNotesQueue[p].GetSize()-1);
|
||||
}
|
||||
|
||||
@@ -309,11 +321,11 @@ void ScreenGameplay::LoadNextSong()
|
||||
if( !GAMEMAN->IsPlayerEnabled(PlayerNumber(p)) )
|
||||
continue;
|
||||
|
||||
m_DifficultyBanner[p].SetFromNotes( PlayerNumber(p), pNotes[p] );
|
||||
m_DifficultyBanner[p].SetFromNotes( PlayerNumber(p), m_pCurNotes[p] );
|
||||
|
||||
|
||||
NoteData originalNoteData;
|
||||
pNotes[p]->GetNoteData( &originalNoteData );
|
||||
m_pCurNotes[p]->GetNoteData( &originalNoteData );
|
||||
|
||||
NoteData newNoteData;
|
||||
pStyleDef->GetTransformedNoteDataForStyle( (PlayerNumber)p, &originalNoteData, &newNoteData );
|
||||
@@ -325,7 +337,8 @@ void ScreenGameplay::LoadNextSong()
|
||||
PREFSMAN->m_PlayerOptions[p],
|
||||
&m_LifeMeter[p],
|
||||
&m_ScoreDisplay[p],
|
||||
originalNoteData.GetNumTapNotes()
|
||||
originalNoteData.GetNumTapNotes(),
|
||||
m_pCurNotes[p]->m_iMeter
|
||||
);
|
||||
}
|
||||
|
||||
@@ -668,7 +681,6 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
|
||||
break;
|
||||
case SM_GoToResults:
|
||||
SaveSummary();
|
||||
m_pCurSong->SaveToSMFile(); // save offset changes
|
||||
SCREENMAN->SetNewScreen( new ScreenEvaluation(false) );
|
||||
break;
|
||||
|
||||
|
||||
@@ -53,7 +53,8 @@ private:
|
||||
|
||||
DancingState m_DancingState;
|
||||
|
||||
Song* m_pCurSong; // nearest songs are on back of queue
|
||||
Song* m_pCurSong;
|
||||
Notes* m_pCurNotes[NUM_PLAYERS];
|
||||
CArray<Song*,Song*> m_apSongQueue; // nearest songs are on back of queue
|
||||
CArray<Notes*,Notes*> m_apNotesQueue[NUM_PLAYERS]; // nearest notes are on back of queue
|
||||
bool m_bBothHaveFailed;
|
||||
|
||||
@@ -221,6 +221,8 @@ void ScreenSelectCourse::MenuStart( const PlayerNumber p )
|
||||
|
||||
m_Menu.TweenOffScreenToBlack( SM_None, false );
|
||||
|
||||
SONGMAN->m_pCurCourse = m_MusicWheel.GetSelectedCourse();
|
||||
|
||||
this->SendScreenMessage( SM_GoToNextState, 2.5f );
|
||||
|
||||
break;
|
||||
|
||||
@@ -65,6 +65,13 @@ ScreenTitleMenu::ScreenTitleMenu()
|
||||
{
|
||||
LOG->WriteLine( "ScreenTitleMenu::ScreenTitleMenu()" );
|
||||
|
||||
|
||||
// reset game info
|
||||
// GAMEMAN->m_sMasterPlayerNumber = PLAYER_INVALID;
|
||||
// GAMEMAN->m_CurGame = GAME_INVALID;
|
||||
// GAMEMAN->m_CurGame = GAME_INVALID;
|
||||
|
||||
|
||||
int i;
|
||||
|
||||
m_sprBG.Load( THEME->GetPathTo(GRAPHIC_TITLE_MENU_BACKGROUND) );
|
||||
@@ -123,12 +130,6 @@ ScreenTitleMenu::ScreenTitleMenu()
|
||||
m_Fade.OpenWipingRight( SM_DoneOpening );
|
||||
this->AddActor( &m_Fade );
|
||||
|
||||
/* ENSURE that the correct announcer is in place for GAME_DANCE (the default game) */
|
||||
if (GAME_DANCE == GAMEMAN->m_CurGame)
|
||||
{
|
||||
ANNOUNCER->SwitchAnnouncer( "default" );
|
||||
}
|
||||
|
||||
SOUND->PlayOnceStreamedFromDir( ANNOUNCER->GetPathTo(ANNOUNCER_TITLE_MENU_GAME_NAME) );
|
||||
|
||||
m_soundChange.Load( THEME->GetPathTo(SOUND_TITLE_MENU_CHANGE) );
|
||||
@@ -281,8 +282,15 @@ void ScreenTitleMenu::MenuStart( const PlayerNumber p )
|
||||
m_Fade.CloseWipingRight( SM_GoToGameOptions );
|
||||
return;
|
||||
case CHOICE_EDIT:
|
||||
m_soundSelect.PlayRandom();
|
||||
m_Fade.CloseWipingRight( SM_GoToEdit );
|
||||
if( SONGMAN->m_pSongs.GetSize() == 0 )
|
||||
{
|
||||
m_soundInvalid.PlayRandom();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_soundSelect.PlayRandom();
|
||||
m_Fade.CloseWipingRight( SM_GoToEdit );
|
||||
}
|
||||
return;
|
||||
/* case CHOICE_HELP:
|
||||
m_soundSelect.PlayRandom();
|
||||
|
||||
@@ -432,45 +432,26 @@ void SongManager::InitCoursesFromDisk()
|
||||
CArray<Song*, Song*> apSongs;
|
||||
this->GetSongsInGroup( sGroupName, apSongs );
|
||||
|
||||
for( NotesType nt=NotesType(0); nt<NUM_NOTES_TYPES; nt=NotesType(nt+1) ) // foreach NotesType
|
||||
|
||||
for( DifficultyClass dc=CLASS_MEDIUM; dc<=CLASS_HARD; dc=DifficultyClass(dc+1) ) // foreach DifficultyClass
|
||||
{
|
||||
|
||||
for( DifficultyClass dc=CLASS_MEDIUM; dc<=CLASS_HARD; dc=DifficultyClass(dc+1) ) // foreach DifficultyClass
|
||||
Course course;
|
||||
course.m_sName = sShortGroupName + " ";
|
||||
switch( dc )
|
||||
{
|
||||
Course course;
|
||||
course.m_sName = sShortGroupName + " ";
|
||||
switch( dc )
|
||||
{
|
||||
case CLASS_EASY: course.m_sName += "Easy"; break;
|
||||
case CLASS_MEDIUM: course.m_sName += "Medium"; break;
|
||||
case CLASS_HARD: course.m_sName += "Hard"; break;
|
||||
}
|
||||
course.m_NotesType = nt;
|
||||
|
||||
|
||||
for( int s=0; s<apSongs.GetSize(); s++ )
|
||||
{
|
||||
Song* pSong = apSongs[s];
|
||||
|
||||
CArray<Notes*, Notes*> apNotes;
|
||||
pSong->GetNotesThatMatch( course.m_NotesType, apNotes );
|
||||
|
||||
// search for first Notes matching this DifficultyClass
|
||||
for( int n=0; n<apNotes.GetSize(); n++ )
|
||||
{
|
||||
Notes* pNotes = apNotes[n];
|
||||
|
||||
if( pNotes->m_DifficultyClass == dc )
|
||||
{
|
||||
course.AddStage( pSong, pNotes );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( course.m_iStages > 0 )
|
||||
m_aCourses.Add( course );
|
||||
case CLASS_EASY: course.m_sName += "Easy"; break;
|
||||
case CLASS_MEDIUM: course.m_sName += "Medium"; break;
|
||||
case CLASS_HARD: course.m_sName += "Hard"; break;
|
||||
}
|
||||
|
||||
for( int s=0; s<apSongs.GetSize(); s++ )
|
||||
{
|
||||
Song* pSong = apSongs[s];
|
||||
course.AddStage( pSong, dc );
|
||||
}
|
||||
|
||||
if( course.m_iStages > 0 )
|
||||
m_aCourses.Add( course );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,7 +144,8 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE, LPSTR, int nCmdShow )
|
||||
g_hMutex = CreateMutex( NULL, TRUE, g_sAppName );
|
||||
if( GetLastError() == ERROR_ALREADY_EXISTS )
|
||||
{
|
||||
CloseHandle( g_hMutex );
|
||||
MessageBox( NULL, "StepMania is already running.", "FatalError", MB_OK );
|
||||
exit( 1 );
|
||||
}
|
||||
|
||||
|
||||
@@ -687,9 +688,9 @@ void Update()
|
||||
|
||||
INPUTMAPPER->DeviceToGame( DeviceI, GameI );
|
||||
|
||||
MenuI = INPUTMAPPER->DeviceToMenu( DeviceI );
|
||||
INPUTMAPPER->GameToMenu( GameI, MenuI );
|
||||
if( !MenuI.IsValid() ) // try again
|
||||
INPUTMAPPER->GameToMenu( GameI, MenuI );
|
||||
MenuI = INPUTMAPPER->DeviceToMenu( DeviceI );
|
||||
|
||||
if( MenuI.IsValid() && type == IET_FIRST_PRESS )
|
||||
INPUTQUEUE->HandleInput( MenuI.player, MenuI.button );
|
||||
|
||||
@@ -186,17 +186,17 @@ CString ThemeManager::GetPathTo( ThemeElement te )
|
||||
case GRAPHIC_SELECT_STYLE_INFO_GAME_0_STYLE_2: sAssetPrefix = "Graphics\\select style info game 0 style 2"; break;
|
||||
case GRAPHIC_SELECT_STYLE_INFO_GAME_0_STYLE_3: sAssetPrefix = "Graphics\\select style info game 0 style 3"; break;
|
||||
case GRAPHIC_SELECT_STYLE_INFO_GAME_0_STYLE_4: sAssetPrefix = "Graphics\\select style info game 0 style 4"; break;
|
||||
case GRAPHIC_SELECT_STYLE_INFO_GAME_1_STYLE_0: sAssetPrefix = "Graphics\\select style info game 1 style 0"; break;
|
||||
case GRAPHIC_SELECT_STYLE_INFO_GAME_1_STYLE_1: sAssetPrefix = "Graphics\\select style info game 1 style 1"; break;
|
||||
case GRAPHIC_SELECT_STYLE_INFO_GAME_1_STYLE_2: sAssetPrefix = "Graphics\\select style info game 1 style 2"; break;
|
||||
// case GRAPHIC_SELECT_STYLE_INFO_GAME_1_STYLE_0: sAssetPrefix = "Graphics\\select style info game 1 style 0"; break;
|
||||
// case GRAPHIC_SELECT_STYLE_INFO_GAME_1_STYLE_1: sAssetPrefix = "Graphics\\select style info game 1 style 1"; break;
|
||||
// case GRAPHIC_SELECT_STYLE_INFO_GAME_1_STYLE_2: sAssetPrefix = "Graphics\\select style info game 1 style 2"; break;
|
||||
case GRAPHIC_SELECT_STYLE_PREVIEW_GAME_0_STYLE_0: sAssetPrefix = "Graphics\\select style preview game 0 style 0"; break;
|
||||
case GRAPHIC_SELECT_STYLE_PREVIEW_GAME_0_STYLE_1: sAssetPrefix = "Graphics\\select style preview game 0 style 1"; break;
|
||||
case GRAPHIC_SELECT_STYLE_PREVIEW_GAME_0_STYLE_2: sAssetPrefix = "Graphics\\select style preview game 0 style 2"; break;
|
||||
case GRAPHIC_SELECT_STYLE_PREVIEW_GAME_0_STYLE_3: sAssetPrefix = "Graphics\\select style preview game 0 style 3"; break;
|
||||
case GRAPHIC_SELECT_STYLE_PREVIEW_GAME_0_STYLE_4: sAssetPrefix = "Graphics\\select style preview game 0 style 4"; break;
|
||||
case GRAPHIC_SELECT_STYLE_PREVIEW_GAME_1_STYLE_0: sAssetPrefix = "Graphics\\select style preview game 1 style 0"; break;
|
||||
case GRAPHIC_SELECT_STYLE_PREVIEW_GAME_1_STYLE_1: sAssetPrefix = "Graphics\\select style preview game 1 style 1"; break;
|
||||
case GRAPHIC_SELECT_STYLE_PREVIEW_GAME_1_STYLE_2: sAssetPrefix = "Graphics\\select style preview game 1 style 2"; break;
|
||||
// case GRAPHIC_SELECT_STYLE_PREVIEW_GAME_1_STYLE_0: sAssetPrefix = "Graphics\\select style preview game 1 style 0"; break;
|
||||
// case GRAPHIC_SELECT_STYLE_PREVIEW_GAME_1_STYLE_1: sAssetPrefix = "Graphics\\select style preview game 1 style 1"; break;
|
||||
// case GRAPHIC_SELECT_STYLE_PREVIEW_GAME_1_STYLE_2: sAssetPrefix = "Graphics\\select style preview game 1 style 2"; break;
|
||||
case GRAPHIC_SONG_OPTIONS_BACKGROUND: sAssetPrefix = "Graphics\\song options background"; break;
|
||||
case GRAPHIC_SONG_OPTIONS_TOP_EDGE: sAssetPrefix = "Graphics\\song options top edge"; break;
|
||||
case GRAPHIC_STAGE_UNDERSCORE: sAssetPrefix = "Graphics\\stage underscore"; break;
|
||||
@@ -262,11 +262,7 @@ CString ThemeManager::GetPathTo( ThemeElement te )
|
||||
GetDirListing( sCurrentThemeDir + sAssetPrefix + "*.png", asPossibleElementFilePaths, false, true );
|
||||
GetDirListing( sCurrentThemeDir + sAssetPrefix + "*.jpg", asPossibleElementFilePaths, false, true );
|
||||
GetDirListing( sCurrentThemeDir + sAssetPrefix + "*.bmp", asPossibleElementFilePaths, false, true );
|
||||
|
||||
GetDirListing( sDefaultThemeDir + sAssetPrefix + "*.sprite", asPossibleElementFilePaths, false, true );
|
||||
GetDirListing( sDefaultThemeDir + sAssetPrefix + "*.png", asPossibleElementFilePaths, false, true );
|
||||
GetDirListing( sDefaultThemeDir + sAssetPrefix + "*.jpg", asPossibleElementFilePaths, false, true );
|
||||
GetDirListing( sDefaultThemeDir + sAssetPrefix + "*.bmp", asPossibleElementFilePaths, false, true );
|
||||
GetDirListing( sCurrentThemeDir + sAssetPrefix + "*.gif", asPossibleElementFilePaths, false, true );
|
||||
}
|
||||
else if( -1 != sAssetPrefix.Find("Sounds\\") )
|
||||
{
|
||||
@@ -274,17 +270,10 @@ CString ThemeManager::GetPathTo( ThemeElement te )
|
||||
GetDirListing( sCurrentThemeDir + sAssetPrefix + ".mp3", asPossibleElementFilePaths, false, true );
|
||||
GetDirListing( sCurrentThemeDir + sAssetPrefix + ".ogg", asPossibleElementFilePaths, false, true );
|
||||
GetDirListing( sCurrentThemeDir + sAssetPrefix + ".wav", asPossibleElementFilePaths, false, true );
|
||||
|
||||
GetDirListing( sDefaultThemeDir + sAssetPrefix + ".set", asPossibleElementFilePaths, false, true );
|
||||
GetDirListing( sDefaultThemeDir + sAssetPrefix + ".mp3", asPossibleElementFilePaths, false, true );
|
||||
GetDirListing( sDefaultThemeDir + sAssetPrefix + ".ogg", asPossibleElementFilePaths, false, true );
|
||||
GetDirListing( sDefaultThemeDir + sAssetPrefix + ".wav", asPossibleElementFilePaths, false, true );
|
||||
}
|
||||
else if( -1 != sAssetPrefix.Find("Fonts\\") )
|
||||
{
|
||||
GetDirListing( sCurrentThemeDir + sAssetPrefix + ".font", asPossibleElementFilePaths, false, true );
|
||||
|
||||
GetDirListing( sDefaultThemeDir + sAssetPrefix + ".font", asPossibleElementFilePaths, false, true );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -119,17 +119,17 @@ enum ThemeElement {
|
||||
GRAPHIC_SELECT_STYLE_INFO_GAME_0_STYLE_2,
|
||||
GRAPHIC_SELECT_STYLE_INFO_GAME_0_STYLE_3,
|
||||
GRAPHIC_SELECT_STYLE_INFO_GAME_0_STYLE_4,
|
||||
GRAPHIC_SELECT_STYLE_INFO_GAME_1_STYLE_0,
|
||||
GRAPHIC_SELECT_STYLE_INFO_GAME_1_STYLE_1,
|
||||
GRAPHIC_SELECT_STYLE_INFO_GAME_1_STYLE_2,
|
||||
// GRAPHIC_SELECT_STYLE_INFO_GAME_1_STYLE_0,
|
||||
// GRAPHIC_SELECT_STYLE_INFO_GAME_1_STYLE_1,
|
||||
// GRAPHIC_SELECT_STYLE_INFO_GAME_1_STYLE_2,
|
||||
GRAPHIC_SELECT_STYLE_PREVIEW_GAME_0_STYLE_0,
|
||||
GRAPHIC_SELECT_STYLE_PREVIEW_GAME_0_STYLE_1,
|
||||
GRAPHIC_SELECT_STYLE_PREVIEW_GAME_0_STYLE_2,
|
||||
GRAPHIC_SELECT_STYLE_PREVIEW_GAME_0_STYLE_3,
|
||||
GRAPHIC_SELECT_STYLE_PREVIEW_GAME_0_STYLE_4,
|
||||
GRAPHIC_SELECT_STYLE_PREVIEW_GAME_1_STYLE_0,
|
||||
GRAPHIC_SELECT_STYLE_PREVIEW_GAME_1_STYLE_1,
|
||||
GRAPHIC_SELECT_STYLE_PREVIEW_GAME_1_STYLE_2,
|
||||
// GRAPHIC_SELECT_STYLE_PREVIEW_GAME_1_STYLE_0,
|
||||
// GRAPHIC_SELECT_STYLE_PREVIEW_GAME_1_STYLE_1,
|
||||
// GRAPHIC_SELECT_STYLE_PREVIEW_GAME_1_STYLE_2,
|
||||
GRAPHIC_SONG_OPTIONS_BACKGROUND,
|
||||
GRAPHIC_SONG_OPTIONS_TOP_EDGE,
|
||||
GRAPHIC_STAGE_UNDERSCORE,
|
||||
|
||||
Reference in New Issue
Block a user