more bug fixes
This commit is contained in:
@@ -1172,6 +1172,26 @@ CHANGE: Last edited song is selected upon entering Edit Menu.
|
|||||||
BUG FIX: "Indirect BPM changes" (track 08) work again. This was causing
|
BUG FIX: "Indirect BPM changes" (track 08) work again. This was causing
|
||||||
"0 BPM" segments to be added to songs like MAX300.
|
"0 BPM" segments to be added to songs like MAX300.
|
||||||
BUG FIX: Fixed life meter stream alignment (I hope!)
|
BUG FIX: Fixed life meter stream alignment (I hope!)
|
||||||
|
NEW FEATURE: Graphic option "UseBGIfNoBanner" causes the song background to be
|
||||||
|
used if the banner is missing. Turning this option ON may results in short
|
||||||
|
freezes when switching music on the SelectMusic screen.
|
||||||
|
BUG FIX: Music no longer cuts off if notes end before music.
|
||||||
|
BUG FIX: "100 Combo" no longer repeats if combo breaks on 100.
|
||||||
|
BUG FIX: "Japanese driver in training sign" next to song title now only shown
|
||||||
|
if song has notes with meter <= 2.
|
||||||
|
BUG FIX: Sort order icon on Select Music screen now accurately displays the
|
||||||
|
sort.
|
||||||
|
BUG FIX: "Best" sort now correctly sorts the songs in decending order by the
|
||||||
|
number of times played.
|
||||||
|
CHANGE: Music sort change can now be done with L+R+Start, or U,D,U,D (for
|
||||||
|
people with soft pads that find L+R+Start to be difficult)
|
||||||
|
BUG FIX: Player2 can now navigate menus when playing Double.
|
||||||
|
BUG FIX: Fixed glitches caused by timer expiring after selection was made.
|
||||||
|
BUG FIX: Timer expiration while group is in focus will start roulette.
|
||||||
|
BUG FIX: Timer expiration while in Roulette spinning now resets the timer to
|
||||||
|
force a selection.
|
||||||
|
BUG FIX: OnlyDedicatedMenuButtons option now correctly saves on exit.
|
||||||
|
BUG FIX: Announcer now says "danger comments" at the appropriate time.
|
||||||
|
|
||||||
------------------------CVS after 3.00 beta 5----------------
|
------------------------CVS after 3.00 beta 5----------------
|
||||||
OPTIMIZATION: Much faster song loading.
|
OPTIMIZATION: Much faster song loading.
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ ColorSelected=0.5,1,0.5,1
|
|||||||
GoToCautionOrSelectPlayer=0
|
GoToCautionOrSelectPlayer=0
|
||||||
SecondsBeforeDemonstration=30
|
SecondsBeforeDemonstration=30
|
||||||
SecondsBetweenAttract=12
|
SecondsBetweenAttract=12
|
||||||
|
HelpText=Use # $ to select, then press START
|
||||||
|
|
||||||
[SelectStyle]
|
[SelectStyle]
|
||||||
IconsStartX=60
|
IconsStartX=60
|
||||||
@@ -33,6 +34,8 @@ InfoX=480
|
|||||||
InfoY=280
|
InfoY=280
|
||||||
PreviewX=160
|
PreviewX=160
|
||||||
PreviewY=240
|
PreviewY=240
|
||||||
|
HelpText=Use ! " to select, then press START
|
||||||
|
TimerSeconds=40
|
||||||
|
|
||||||
[SelectDifficulty]
|
[SelectDifficulty]
|
||||||
MorePage1X=580
|
MorePage1X=580
|
||||||
@@ -59,6 +62,8 @@ ArrowOffsetP2X=+40
|
|||||||
ArrowOffsetP2Y=200
|
ArrowOffsetP2Y=200
|
||||||
ArrowShadowLengthX=10
|
ArrowShadowLengthX=10
|
||||||
ArrowShadowLengthY=10
|
ArrowShadowLengthY=10
|
||||||
|
HelpText=Use ! " to select, then press START
|
||||||
|
TimerSeconds=40
|
||||||
|
|
||||||
[SelectGroup]
|
[SelectGroup]
|
||||||
FrameX=180
|
FrameX=180
|
||||||
@@ -82,6 +87,8 @@ TitlesStartY=280
|
|||||||
TitlesSpacingX=200
|
TitlesSpacingX=200
|
||||||
TitlesColumns=3
|
TitlesColumns=3
|
||||||
TitlesRows=10
|
TitlesRows=10
|
||||||
|
HelpText=Use ! " to select, then press START
|
||||||
|
TimerSeconds=40
|
||||||
|
|
||||||
[SelectMusic]
|
[SelectMusic]
|
||||||
BannerFrameX=160
|
BannerFrameX=160
|
||||||
@@ -109,7 +116,7 @@ SortIconY=70
|
|||||||
ScoreP1X=520
|
ScoreP1X=520
|
||||||
ScoreP1Y=210
|
ScoreP1Y=210
|
||||||
ScoreP2X=520
|
ScoreP2X=520
|
||||||
ScoreP2Y=282
|
ScoreP2Y=286
|
||||||
MeterFrameX=160
|
MeterFrameX=160
|
||||||
MeterFrameY=416
|
MeterFrameY=416
|
||||||
MeterP1X=94
|
MeterP1X=94
|
||||||
@@ -124,6 +131,8 @@ PlayerOptionsP2X=304
|
|||||||
PlayerOptionsP2Y=330
|
PlayerOptionsP2Y=330
|
||||||
SongOptionsX=160
|
SongOptionsX=160
|
||||||
SongOptionsY=298
|
SongOptionsY=298
|
||||||
|
HelpText=! or " change music Hold ! and " then press START to change sort::## easier difficulty $$ harder difficulty::#$#$ to change sort
|
||||||
|
TimerSeconds=60
|
||||||
|
|
||||||
[Gameplay]
|
[Gameplay]
|
||||||
TopFrameX=320
|
TopFrameX=320
|
||||||
@@ -206,6 +215,7 @@ NewRecordP2X=490
|
|||||||
NewRecordY=120
|
NewRecordY=120
|
||||||
TryExtraStageX=320
|
TryExtraStageX=320
|
||||||
TryExtraStageY=420
|
TryExtraStageY=420
|
||||||
|
HelpText=Press START to continue
|
||||||
TimerSeconds=40
|
TimerSeconds=40
|
||||||
|
|
||||||
[Other]
|
[Other]
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ bool Banner::LoadFromSong( Song* pSong ) // NULL means no song
|
|||||||
|
|
||||||
if( pSong == NULL ) Banner::Load( THEME->GetPathTo("Graphics","fallback banner") );
|
if( pSong == NULL ) Banner::Load( THEME->GetPathTo("Graphics","fallback banner") );
|
||||||
else if( pSong->HasBanner() ) Banner::Load( pSong->GetBannerPath() );
|
else if( pSong->HasBanner() ) Banner::Load( pSong->GetBannerPath() );
|
||||||
// else if( pSong->HasBackground() ) Banner::Load( pSong->GetBackgroundPath() );
|
else if( PREFSMAN->m_bUseBGIfNoBanner && pSong->HasBackground() ) Banner::Load( pSong->GetBackgroundPath() );
|
||||||
else Banner::Load( THEME->GetPathTo("Graphics","fallback banner") );
|
else Banner::Load( THEME->GetPathTo("Graphics","fallback banner") );
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ void Combo::ContinueCombo()
|
|||||||
if( m_iCurCombo > m_iMaxCombo )
|
if( m_iCurCombo > m_iMaxCombo )
|
||||||
m_iMaxCombo = m_iCurCombo;
|
m_iMaxCombo = m_iCurCombo;
|
||||||
|
|
||||||
switch( m_iMaxCombo )
|
switch( m_iCurCombo )
|
||||||
{
|
{
|
||||||
case 100: SCREENMAN->SendMessageToTopScreen( SM_100Combo, 0 ); break;
|
case 100: SCREENMAN->SendMessageToTopScreen( SM_100Combo, 0 ); break;
|
||||||
case 200: SCREENMAN->SendMessageToTopScreen( SM_200Combo, 0 ); break;
|
case 200: SCREENMAN->SendMessageToTopScreen( SM_200Combo, 0 ); break;
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ MenuInput GameDef::GameInputToMenuInput( GameInput GameI )
|
|||||||
pn = (PlayerNumber)GameI.controller;
|
pn = (PlayerNumber)GameI.controller;
|
||||||
break;
|
break;
|
||||||
case StyleDef::ONE_PLAYER_TWO_CREDITS:
|
case StyleDef::ONE_PLAYER_TWO_CREDITS:
|
||||||
pn = GAMESTATE->m_bIsJoined[PLAYER_1] ? PLAYER_1 : PLAYER_2;
|
pn = GAMESTATE->m_MasterPlayerNumber;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ASSERT(0); // invalid m_StyleType
|
ASSERT(0); // invalid m_StyleType
|
||||||
@@ -197,9 +197,12 @@ MenuInput GameDef::GameInputToMenuInput( GameInput GameI )
|
|||||||
if( m_DedicatedMenuButton[i] == GameI.button )
|
if( m_DedicatedMenuButton[i] == GameI.button )
|
||||||
return MenuInput( pn, (MenuButton)i );
|
return MenuInput( pn, (MenuButton)i );
|
||||||
|
|
||||||
|
if( !PREFSMAN->m_bOnlyDedicatedMenuButtons )
|
||||||
|
{
|
||||||
for( i=0; i<NUM_MENU_BUTTONS; i++ )
|
for( i=0; i<NUM_MENU_BUTTONS; i++ )
|
||||||
if( m_SecondaryMenuButton[i] == GameI.button )
|
if( m_SecondaryMenuButton[i] == GameI.button )
|
||||||
return MenuInput( pn, (MenuButton)i );
|
return MenuInput( pn, (MenuButton)i );
|
||||||
|
}
|
||||||
|
|
||||||
return MenuInput(); // invalid GameInput
|
return MenuInput(); // invalid GameInput
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,7 +38,8 @@ void GameState::Reset()
|
|||||||
m_CurStyle = STYLE_NONE;
|
m_CurStyle = STYLE_NONE;
|
||||||
m_bPlayersCanJoin = false;
|
m_bPlayersCanJoin = false;
|
||||||
for( int i=0; i<2; i++ )
|
for( int i=0; i<2; i++ )
|
||||||
m_bIsJoined[i] = false;
|
m_bSideIsJoined[i] = false;
|
||||||
|
m_MasterPlayerNumber = PLAYER_INVALID;
|
||||||
m_sPreferredGroup = "";
|
m_sPreferredGroup = "";
|
||||||
for( p=0; p<NUM_PLAYERS; p++ )
|
for( p=0; p<NUM_PLAYERS; p++ )
|
||||||
m_PreferredDifficultyClass[p] = CLASS_INVALID;
|
m_PreferredDifficultyClass[p] = CLASS_INVALID;
|
||||||
@@ -272,9 +273,9 @@ bool GameState::IsPlayerEnabled( PlayerNumber pn )
|
|||||||
return true;
|
return true;
|
||||||
case StyleDef::ONE_PLAYER_ONE_CREDIT:
|
case StyleDef::ONE_PLAYER_ONE_CREDIT:
|
||||||
case StyleDef::ONE_PLAYER_TWO_CREDITS:
|
case StyleDef::ONE_PLAYER_TWO_CREDITS:
|
||||||
return m_bIsJoined[pn];
|
return pn == m_MasterPlayerNumber;
|
||||||
default:
|
default:
|
||||||
ASSERT(0);
|
ASSERT(0); // invalid style type
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,7 +37,8 @@ public:
|
|||||||
Game m_CurGame;
|
Game m_CurGame;
|
||||||
Style m_CurStyle;
|
Style m_CurStyle;
|
||||||
bool m_bPlayersCanJoin; // true if it's not too late for a player to join
|
bool m_bPlayersCanJoin; // true if it's not too late for a player to join
|
||||||
bool m_bIsJoined[2]; // left side, and right side
|
bool m_bSideIsJoined[2]; // left side, right side
|
||||||
|
PlayerNumber m_MasterPlayerNumber;
|
||||||
|
|
||||||
GameDef* GetCurrentGameDef();
|
GameDef* GetCurrentGameDef();
|
||||||
StyleDef* GetCurrentStyleDef();
|
StyleDef* GetCurrentStyleDef();
|
||||||
|
|||||||
@@ -62,9 +62,6 @@ void GradeDisplay::Update( float fDeltaTime )
|
|||||||
|
|
||||||
void GradeDisplay::DrawPrimitives()
|
void GradeDisplay::DrawPrimitives()
|
||||||
{
|
{
|
||||||
if( m_Grade == GRADE_NO_DATA )
|
|
||||||
return;
|
|
||||||
|
|
||||||
Sprite::DrawPrimitives();
|
Sprite::DrawPrimitives();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -75,6 +72,8 @@ void GradeDisplay::SetGrade( Grade g )
|
|||||||
m_bDoScrolling = false;
|
m_bDoScrolling = false;
|
||||||
StopUsingCustomCoords();
|
StopUsingCustomCoords();
|
||||||
|
|
||||||
|
SetDiffuseColor( D3DXCOLOR(1,1,1,1) );
|
||||||
|
|
||||||
switch( g )
|
switch( g )
|
||||||
{
|
{
|
||||||
case GRADE_AAA: SetState(0); break;
|
case GRADE_AAA: SetState(0); break;
|
||||||
@@ -84,7 +83,12 @@ void GradeDisplay::SetGrade( Grade g )
|
|||||||
case GRADE_C: SetState(4); break;
|
case GRADE_C: SetState(4); break;
|
||||||
case GRADE_D: SetState(5); break;
|
case GRADE_D: SetState(5); break;
|
||||||
case GRADE_E: SetState(6); break;
|
case GRADE_E: SetState(6); break;
|
||||||
case GRADE_NO_DATA: break; // don't draw at all if grade = GRADE_NO_DATA
|
case GRADE_NO_DATA:
|
||||||
|
if( this->GetNumStates() == 8 )
|
||||||
|
SetState(7);
|
||||||
|
else
|
||||||
|
SetDiffuseColor( D3DXCOLOR(1,1,1,0) ); // don't show anything
|
||||||
|
break;
|
||||||
default: ASSERT( false );
|
default: ASSERT( false );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -99,11 +99,9 @@ void MenuElements::Load( CString sBackgroundPath, CString sTopEdgePath, CString
|
|||||||
m_sprBottomEdge.TurnShadowOff();
|
m_sprBottomEdge.TurnShadowOff();
|
||||||
|
|
||||||
m_textHelp.SetXY( HELP_X, HELP_Y );
|
m_textHelp.SetXY( HELP_X, HELP_Y );
|
||||||
// m_textHelp.SetZ( -1 );
|
|
||||||
CStringArray asHelpTips;
|
CStringArray asHelpTips;
|
||||||
split( sHelpText, "\n", asHelpTips );
|
split( sHelpText, "::", asHelpTips );
|
||||||
m_textHelp.SetTips( asHelpTips );
|
m_textHelp.SetTips( asHelpTips );
|
||||||
//m_textHelp.SetText( sHelpText );
|
|
||||||
m_textHelp.SetZoom( 0.5f );
|
m_textHelp.SetZoom( 0.5f );
|
||||||
|
|
||||||
|
|
||||||
@@ -228,3 +226,13 @@ void MenuElements::StopTimer()
|
|||||||
m_MenuTimer.StopTimer();
|
m_MenuTimer.StopTimer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MenuElements::SetTimer( int iTimerSeconds )
|
||||||
|
{
|
||||||
|
m_MenuTimer.SetTimer( iTimerSeconds );
|
||||||
|
}
|
||||||
|
|
||||||
|
void MenuElements::StallTimer()
|
||||||
|
{
|
||||||
|
m_MenuTimer.StallTimer();
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -108,11 +108,16 @@ void MenuTimer::StopTimer()
|
|||||||
|
|
||||||
void MenuTimer::StallTimer()
|
void MenuTimer::StallTimer()
|
||||||
{
|
{
|
||||||
m_fStallSeconds = 1;
|
m_fStallSeconds = 0.5f;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MenuTimer::SetTimer( int iSeconds )
|
void MenuTimer::SetTimer( int iSeconds )
|
||||||
{
|
{
|
||||||
m_fSecondsLeft = (float)iSeconds;
|
m_fSecondsLeft = (float)iSeconds;
|
||||||
CLAMP( m_fSecondsLeft, 0, 99 );
|
CLAMP( m_fSecondsLeft, 0, 99 );
|
||||||
|
|
||||||
|
m_textDigit1.SetZoomX( 1 );
|
||||||
|
m_textDigit2.SetZoomX( 1 );
|
||||||
|
m_textDigit1.SetEffectNone();
|
||||||
|
m_textDigit2.SetEffectNone();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
/*
|
/*
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
File: MusicSortDisplay.h
|
Class: MusicSortDisplay
|
||||||
|
|
||||||
Desc: A graphic displayed in the MusicSortDisplay during Dancing.
|
Desc: A graphic displayed in the MusicSortDisplay during Dancing.
|
||||||
|
|
||||||
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
||||||
|
Chris Danford
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -16,37 +17,23 @@
|
|||||||
#include "MusicSortDisplay.h"
|
#include "MusicSortDisplay.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
MusicSortDisplay::MusicSortDisplay()
|
MusicSortDisplay::MusicSortDisplay()
|
||||||
{
|
{
|
||||||
Load( THEME->GetPathTo("Graphics","music sort icons") );
|
Load( THEME->GetPathTo("Graphics","music sort icons 1x4") );
|
||||||
StopAnimating();
|
StopAnimating();
|
||||||
TurnShadowOff();
|
|
||||||
//SetXY( ON_SCREEN_X, ON_SCREEN_Y );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MusicSortDisplay::Set( SongSortOrder so )
|
void MusicSortDisplay::Set( SongSortOrder so )
|
||||||
{
|
{
|
||||||
|
|
||||||
switch( so )
|
switch( so )
|
||||||
{
|
{
|
||||||
case SORT_GROUP:
|
case SORT_GROUP:
|
||||||
SetState( 0 );
|
|
||||||
break;
|
|
||||||
case SORT_TITLE:
|
case SORT_TITLE:
|
||||||
SetState( 1 );
|
|
||||||
break;
|
|
||||||
case SORT_BPM:
|
case SORT_BPM:
|
||||||
SetState( 2 );
|
|
||||||
break;
|
|
||||||
case SORT_MOST_PLAYED:
|
case SORT_MOST_PLAYED:
|
||||||
SetState( 3 );
|
SetState( so );
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ASSERT( false ); // unimplemented MusicSortOrder
|
ASSERT(0); // unimplemented MusicSortOrder
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,20 +1,18 @@
|
|||||||
|
#pragma once
|
||||||
/*
|
/*
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
File: MusicSortDisplay.h
|
Class: MusicSortDisplay
|
||||||
|
|
||||||
Desc: A graphic displayed in the MusicSortDisplay during Dancing.
|
Desc: A graphic displayed in the MusicSortDisplay during Dancing.
|
||||||
|
|
||||||
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
||||||
|
Chris Danford
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class MusicSortDisplay;
|
class MusicSortDisplay;
|
||||||
|
|
||||||
|
|
||||||
#ifndef _MusicSortDisplay_H_
|
|
||||||
#define _MusicSortDisplay_H_
|
|
||||||
|
|
||||||
|
|
||||||
#include "Sprite.h"
|
#include "Sprite.h"
|
||||||
#include "GameConstantsAndTypes.h"
|
#include "GameConstantsAndTypes.h"
|
||||||
|
|
||||||
@@ -29,6 +27,3 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -21,67 +21,62 @@
|
|||||||
|
|
||||||
MusicStatusDisplay::MusicStatusDisplay()
|
MusicStatusDisplay::MusicStatusDisplay()
|
||||||
{
|
{
|
||||||
Load( THEME->GetPathTo("Graphics","music status icons") );
|
Load( THEME->GetPathTo("Graphics","music status icons 1x4") );
|
||||||
StopAnimating();
|
StopAnimating();
|
||||||
|
|
||||||
SetType( TYPE_NONE );
|
SetType( none );
|
||||||
};
|
}
|
||||||
|
|
||||||
void MusicStatusDisplay::SetType( MusicStatusDisplayType msdt )
|
void MusicStatusDisplay::SetType( IconType type )
|
||||||
{
|
{
|
||||||
m_MusicStatusDisplayType = msdt;
|
m_type = type;
|
||||||
|
|
||||||
switch( m_MusicStatusDisplayType )
|
SetDiffuseColor( D3DXCOLOR(1,1,1,1) );
|
||||||
|
|
||||||
|
switch( type )
|
||||||
{
|
{
|
||||||
case TYPE_NEW:
|
case none:
|
||||||
m_MusicStatusDisplayType = TYPE_NEW;
|
SetEffectNone();
|
||||||
|
SetDiffuseColor( D3DXCOLOR(1,1,1,0) );
|
||||||
|
break;
|
||||||
|
case easy:
|
||||||
|
SetEffectNone();
|
||||||
SetState( 0 );
|
SetState( 0 );
|
||||||
SetDiffuseColor( D3DXCOLOR(1,1,1,1) );
|
|
||||||
break;
|
break;
|
||||||
case TYPE_CROWN1:
|
case crown1:
|
||||||
m_MusicStatusDisplayType = TYPE_CROWN1;
|
|
||||||
SetState( 1 );
|
SetState( 1 );
|
||||||
SetDiffuseColor( D3DXCOLOR(1,1,1,1) );
|
|
||||||
break;
|
break;
|
||||||
case TYPE_CROWN2:
|
case crown2:
|
||||||
m_MusicStatusDisplayType = TYPE_CROWN2;
|
|
||||||
SetState( 2 );
|
SetState( 2 );
|
||||||
SetDiffuseColor( D3DXCOLOR(1,1,1,1) );
|
|
||||||
break;
|
break;
|
||||||
case TYPE_CROWN3:
|
case crown3:
|
||||||
m_MusicStatusDisplayType = TYPE_CROWN3;
|
|
||||||
SetState( 3 );
|
SetState( 3 );
|
||||||
SetDiffuseColor( D3DXCOLOR(1,1,1,1) );
|
|
||||||
break;
|
break;
|
||||||
case TYPE_NONE:
|
|
||||||
default:
|
default:
|
||||||
m_MusicStatusDisplayType = TYPE_NONE;
|
ASSERT(0);
|
||||||
SetDiffuseColor( D3DXCOLOR(0,0,0,0) );
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
void MusicStatusDisplay::Update( float fDeltaTime )
|
void MusicStatusDisplay::Update( float fDeltaTime )
|
||||||
{
|
{
|
||||||
Sprite::Update( fDeltaTime );
|
Sprite::Update( fDeltaTime );
|
||||||
|
}
|
||||||
};
|
|
||||||
|
|
||||||
void MusicStatusDisplay::DrawPrimitives()
|
void MusicStatusDisplay::DrawPrimitives()
|
||||||
{
|
{
|
||||||
switch( m_MusicStatusDisplayType )
|
switch( m_type )
|
||||||
{
|
{
|
||||||
case TYPE_CROWN1:
|
case none:
|
||||||
case TYPE_CROWN2:
|
case easy:
|
||||||
case TYPE_CROWN3:
|
|
||||||
// blink
|
|
||||||
if( (TIMER->GetTimeSinceStart() - (int)TIMER->GetTimeSinceStart()) > 0.5f ) // show the new icon
|
|
||||||
return;
|
|
||||||
break;
|
break;
|
||||||
case TYPE_NONE:
|
case crown1:
|
||||||
return;
|
case crown2:
|
||||||
|
case crown3:
|
||||||
|
if( fmodf(TIMER->GetTimeSinceStart(), 1) > 0.5f )
|
||||||
|
return; // blink
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
ASSERT(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
Sprite::DrawPrimitives();
|
Sprite::DrawPrimitives();
|
||||||
}
|
}
|
||||||
@@ -14,19 +14,18 @@
|
|||||||
#include "Sprite.h"
|
#include "Sprite.h"
|
||||||
|
|
||||||
|
|
||||||
enum MusicStatusDisplayType { TYPE_NEW, TYPE_NONE, TYPE_CROWN1, TYPE_CROWN2, TYPE_CROWN3 };
|
|
||||||
|
|
||||||
class MusicStatusDisplay : public Sprite
|
class MusicStatusDisplay : public Sprite
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MusicStatusDisplay();
|
MusicStatusDisplay();
|
||||||
|
|
||||||
void SetType( MusicStatusDisplayType msdt );
|
enum IconType { none, easy, crown1, crown2, crown3 };
|
||||||
|
void SetType( IconType type );
|
||||||
|
|
||||||
virtual void Update( float fDeltaTime );
|
virtual void Update( float fDeltaTime );
|
||||||
virtual void DrawPrimitives();
|
virtual void DrawPrimitives();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
IconType m_type;
|
||||||
enum MusicStatusDisplayType m_MusicStatusDisplayType;
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -77,6 +77,7 @@ WheelItemData::WheelItemData( WheelItemType wit, Song* pSong, const CString &sSe
|
|||||||
m_sSectionName = sSectionName;
|
m_sSectionName = sSectionName;
|
||||||
m_pCourse = pCourse;
|
m_pCourse = pCourse;
|
||||||
m_color = color;
|
m_color = color;
|
||||||
|
m_IconType = MusicStatusDisplay::none;
|
||||||
}
|
}
|
||||||
|
|
||||||
WheelItemDisplay::WheelItemDisplay()
|
WheelItemDisplay::WheelItemDisplay()
|
||||||
@@ -110,7 +111,7 @@ WheelItemDisplay::WheelItemDisplay()
|
|||||||
|
|
||||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||||
{
|
{
|
||||||
m_GradeDisplay[p].Load( THEME->GetPathTo("Graphics","select music small grades 1x7") );
|
m_GradeDisplay[p].Load( THEME->GetPathTo("Graphics","select music small grades 1x8") );
|
||||||
m_GradeDisplay[p].SetZoom( 1.0f );
|
m_GradeDisplay[p].SetZoom( 1.0f );
|
||||||
m_GradeDisplay[p].SetXY( p==PLAYER_1 ? GRADE_P1_X : GRADE_P2_X, 0 );
|
m_GradeDisplay[p].SetXY( p==PLAYER_1 ? GRADE_P1_X : GRADE_P2_X, 0 );
|
||||||
}
|
}
|
||||||
@@ -134,6 +135,7 @@ void WheelItemDisplay::LoadFromWheelItemData( WheelItemData* pWID )
|
|||||||
this->m_pCourse = pWID->m_pCourse;
|
this->m_pCourse = pWID->m_pCourse;
|
||||||
this->m_pSong = pWID->m_pSong;
|
this->m_pSong = pWID->m_pSong;
|
||||||
this->m_color = pWID->m_color;
|
this->m_color = pWID->m_color;
|
||||||
|
this->m_IconType = pWID->m_IconType;
|
||||||
|
|
||||||
|
|
||||||
// init type specific stuff
|
// init type specific stuff
|
||||||
@@ -162,7 +164,7 @@ void WheelItemDisplay::LoadFromWheelItemData( WheelItemData* pWID )
|
|||||||
color.g += 0.15f;
|
color.g += 0.15f;
|
||||||
color.b += 0.15f;
|
color.b += 0.15f;
|
||||||
m_TextBanner.SetDiffuseColor( color );
|
m_TextBanner.SetDiffuseColor( color );
|
||||||
m_MusicStatusDisplay.SetType( m_MusicStatusDisplayType );
|
m_MusicStatusDisplay.SetType( m_IconType );
|
||||||
RefreshGrades();
|
RefreshGrades();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -253,90 +255,35 @@ void WheelItemDisplay::DrawPrimitives()
|
|||||||
{
|
{
|
||||||
case TYPE_SECTION:
|
case TYPE_SECTION:
|
||||||
m_sprSectionBar.Draw();
|
m_sprSectionBar.Draw();
|
||||||
break;
|
|
||||||
case TYPE_ROULETTE:
|
|
||||||
m_sprSectionBar.Draw();
|
|
||||||
break;
|
|
||||||
case TYPE_SONG:
|
|
||||||
m_sprSongBar.Draw();
|
|
||||||
break;
|
|
||||||
case TYPE_COURSE:
|
|
||||||
m_sprSongBar.Draw();
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
ASSERT(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
switch( m_WheelItemType )
|
|
||||||
{
|
|
||||||
case TYPE_SECTION:
|
|
||||||
m_textSectionName.Draw();
|
m_textSectionName.Draw();
|
||||||
break;
|
break;
|
||||||
case TYPE_ROULETTE:
|
case TYPE_ROULETTE:
|
||||||
|
m_sprSectionBar.Draw();
|
||||||
m_textRoulette.Draw();
|
m_textRoulette.Draw();
|
||||||
break;
|
break;
|
||||||
case TYPE_SONG:
|
case TYPE_SONG:
|
||||||
|
m_sprSongBar.Draw();
|
||||||
m_TextBanner.Draw();
|
m_TextBanner.Draw();
|
||||||
|
m_MusicStatusDisplay.Draw();
|
||||||
|
int p;
|
||||||
|
for( p=0; p<NUM_PLAYERS; p++ )
|
||||||
|
m_GradeDisplay[p].Draw();
|
||||||
|
if( m_fPercentGray > 0 )
|
||||||
|
{
|
||||||
|
m_sprSongBar.SetGlowColor( D3DXCOLOR(0,0,0,m_fPercentGray) );
|
||||||
|
m_sprSongBar.SetDiffuseColor( D3DXCOLOR(0,0,0,0) );
|
||||||
|
m_sprSongBar.Draw();
|
||||||
|
m_sprSongBar.SetDiffuseColor( D3DXCOLOR(0,0,0,1) );
|
||||||
|
m_sprSongBar.SetGlowColor( D3DXCOLOR(0,0,0,0) );
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case TYPE_COURSE:
|
case TYPE_COURSE:
|
||||||
|
m_sprSongBar.Draw();
|
||||||
m_textCourse.Draw();
|
m_textCourse.Draw();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ASSERT(0);
|
ASSERT(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch( m_WheelItemType )
|
|
||||||
{
|
|
||||||
case TYPE_SECTION:
|
|
||||||
break;
|
|
||||||
case TYPE_ROULETTE:
|
|
||||||
break;
|
|
||||||
case TYPE_SONG:
|
|
||||||
m_MusicStatusDisplay.Draw();
|
|
||||||
break;
|
|
||||||
case TYPE_COURSE:
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
ASSERT(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
switch( m_WheelItemType )
|
|
||||||
{
|
|
||||||
case TYPE_SECTION:
|
|
||||||
break;
|
|
||||||
case TYPE_ROULETTE:
|
|
||||||
break;
|
|
||||||
case TYPE_SONG:
|
|
||||||
int p;
|
|
||||||
for( p=0; p<NUM_PLAYERS; p++ )
|
|
||||||
m_GradeDisplay[p].Draw();
|
|
||||||
break;
|
|
||||||
case TYPE_COURSE:
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
ASSERT(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
switch( m_WheelItemType )
|
|
||||||
{
|
|
||||||
case TYPE_SECTION:
|
|
||||||
break;
|
|
||||||
case TYPE_ROULETTE:
|
|
||||||
break;
|
|
||||||
case TYPE_SONG:
|
|
||||||
if( m_fPercentGray > 0 )
|
|
||||||
{
|
|
||||||
m_sprSongBar.SetGlowColor( D3DXCOLOR(0,0,0,m_fPercentGray) );
|
|
||||||
m_sprSongBar.Draw();
|
|
||||||
m_sprSongBar.SetGlowColor( D3DXCOLOR(0,0,0,0) );
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case TYPE_COURSE:
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
ASSERT(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MusicWheel::MusicWheel()
|
MusicWheel::MusicWheel()
|
||||||
@@ -517,7 +464,7 @@ void MusicWheel::BuildWheelItemDatas( CArray<WheelItemData, WheelItemData&> &arr
|
|||||||
SortSongPointerArrayByMostPlayed( arraySongs );
|
SortSongPointerArrayByMostPlayed( arraySongs );
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ASSERT( false ); // unhandled SORT_ORDER
|
ASSERT(0); // unhandled SortOrder
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -619,18 +566,21 @@ void MusicWheel::BuildWheelItemDatas( CArray<WheelItemData, WheelItemData&> &arr
|
|||||||
for( i=0; i<arrayWheelItemDatas.GetSize(); i++ )
|
for( i=0; i<arrayWheelItemDatas.GetSize(); i++ )
|
||||||
{
|
{
|
||||||
Song* pSong = arrayWheelItemDatas[i].m_pSong;
|
Song* pSong = arrayWheelItemDatas[i].m_pSong;
|
||||||
if( pSong != NULL )
|
if( pSong == NULL )
|
||||||
{
|
continue;
|
||||||
arrayWheelItemDatas[i].m_MusicStatusDisplayType = (pSong->GetNumTimesPlayed()==0) ? TYPE_NEW : TYPE_NONE;
|
|
||||||
}
|
WheelItemData& WID = arrayWheelItemDatas[i];
|
||||||
|
bool bIsEasy = pSong->IsEasy( GAMESTATE->GetCurrentStyleDef()->m_NotesType );
|
||||||
|
WID.m_IconType = bIsEasy ? MusicStatusDisplay::easy : MusicStatusDisplay::none;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( so == SORT_MOST_PLAYED )
|
if( so == SORT_MOST_PLAYED )
|
||||||
{
|
{
|
||||||
// init crown icons
|
// init crown icons
|
||||||
for( int i=0; i<arrayWheelItemDatas.GetSize() && i<3; i++ )
|
for( int i=0; i< min(3,arrayWheelItemDatas.GetSize()); i++ )
|
||||||
{
|
{
|
||||||
arrayWheelItemDatas[i].m_MusicStatusDisplayType = MusicStatusDisplayType(TYPE_CROWN1 + i);
|
WheelItemData& WID = arrayWheelItemDatas[i];
|
||||||
|
WID.m_IconType = MusicStatusDisplay::IconType(MusicStatusDisplay::crown1 + i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -830,6 +780,7 @@ void MusicWheel::Update( float fDeltaTime )
|
|||||||
|
|
||||||
// change the sort order
|
// change the sort order
|
||||||
GAMESTATE->m_SongSortOrder = SongSortOrder( (GAMESTATE->m_SongSortOrder+1) % NUM_SORT_ORDERS );
|
GAMESTATE->m_SongSortOrder = SongSortOrder( (GAMESTATE->m_SongSortOrder+1) % NUM_SORT_ORDERS );
|
||||||
|
SCREENMAN->SendMessageToTopScreen( SM_SortOrderChanged, 0 );
|
||||||
m_sExpandedSectionName = GetSectionNameFromSongAndSort( pPrevSelectedSong, GAMESTATE->m_SongSortOrder );
|
m_sExpandedSectionName = GetSectionNameFromSongAndSort( pPrevSelectedSong, GAMESTATE->m_SongSortOrder );
|
||||||
//RebuildWheelItems();
|
//RebuildWheelItems();
|
||||||
|
|
||||||
@@ -1087,12 +1038,12 @@ void MusicWheel::NextMusic( bool bSendSongChangedMessage )
|
|||||||
SCREENMAN->SendMessageToTopScreen( SM_SongChanged, 0 );
|
SCREENMAN->SendMessageToTopScreen( SM_SongChanged, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
void MusicWheel::PrevSort()
|
bool MusicWheel::PrevSort()
|
||||||
{
|
{
|
||||||
NextSort();
|
return NextSort();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MusicWheel::NextSort()
|
bool MusicWheel::NextSort()
|
||||||
{
|
{
|
||||||
switch( m_WheelState )
|
switch( m_WheelState )
|
||||||
{
|
{
|
||||||
@@ -1100,7 +1051,7 @@ void MusicWheel::NextSort()
|
|||||||
case STATE_FLYING_ON_AFTER_NEXT_SORT:
|
case STATE_FLYING_ON_AFTER_NEXT_SORT:
|
||||||
break; // fall through
|
break; // fall through
|
||||||
default:
|
default:
|
||||||
return; // don't continue
|
return false; // don't continue
|
||||||
}
|
}
|
||||||
|
|
||||||
m_soundChangeSort.Play();
|
m_soundChangeSort.Play();
|
||||||
@@ -1109,6 +1060,7 @@ void MusicWheel::NextSort()
|
|||||||
|
|
||||||
m_WheelState = STATE_FLYING_OFF_BEFORE_NEXT_SORT;
|
m_WheelState = STATE_FLYING_OFF_BEFORE_NEXT_SORT;
|
||||||
m_fTimeLeftInState = FADE_SECONDS;
|
m_fTimeLeftInState = FADE_SECONDS;
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MusicWheel::Select() // return true of a playable item was chosen
|
bool MusicWheel::Select() // return true of a playable item was chosen
|
||||||
@@ -1155,10 +1107,7 @@ bool MusicWheel::Select() // return true of a playable item was chosen
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
case TYPE_ROULETTE:
|
case TYPE_ROULETTE:
|
||||||
m_soundExpand.Play();
|
StartRoulette();
|
||||||
m_WheelState = STATE_ROULETTE_SPINNING;
|
|
||||||
GAMESTATE->m_SongSortOrder = SORT_GROUP;
|
|
||||||
BuildWheelItemDatas( m_WheelItemDatas[SORT_GROUP], SORT_GROUP, true );
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
case TYPE_SONG:
|
case TYPE_SONG:
|
||||||
@@ -1168,6 +1117,18 @@ bool MusicWheel::Select() // return true of a playable item was chosen
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MusicWheel::StartRoulette()
|
||||||
|
{
|
||||||
|
m_WheelState = STATE_ROULETTE_SPINNING;
|
||||||
|
GAMESTATE->m_SongSortOrder = SORT_GROUP;
|
||||||
|
BuildWheelItemDatas( m_WheelItemDatas[SORT_GROUP], SORT_GROUP, true );
|
||||||
|
}
|
||||||
|
|
||||||
|
bool MusicWheel::IsRouletting()
|
||||||
|
{
|
||||||
|
return m_WheelState == STATE_ROULETTE_SPINNING;
|
||||||
|
}
|
||||||
|
|
||||||
void MusicWheel::TweenOnScreen()
|
void MusicWheel::TweenOnScreen()
|
||||||
{
|
{
|
||||||
m_WheelState = STATE_TWEENING_ON_SCREEN;
|
m_WheelState = STATE_TWEENING_ON_SCREEN;
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ const int NUM_WHEEL_ITEMS_TO_DRAW = 13;
|
|||||||
|
|
||||||
const ScreenMessage SM_SongChanged = ScreenMessage(SM_User+47); // this should be unique!
|
const ScreenMessage SM_SongChanged = ScreenMessage(SM_User+47); // this should be unique!
|
||||||
const ScreenMessage SM_PlaySongSample = ScreenMessage(SM_User+48);
|
const ScreenMessage SM_PlaySongSample = ScreenMessage(SM_User+48);
|
||||||
|
const ScreenMessage SM_SortOrderChanged = ScreenMessage(SM_User+49);
|
||||||
|
|
||||||
|
|
||||||
enum WheelItemType { TYPE_SECTION, TYPE_SONG, TYPE_ROULETTE, TYPE_COURSE };
|
enum WheelItemType { TYPE_SECTION, TYPE_SONG, TYPE_ROULETTE, TYPE_COURSE };
|
||||||
@@ -49,7 +50,7 @@ public:
|
|||||||
Course* m_pCourse;
|
Course* m_pCourse;
|
||||||
Song* m_pSong;
|
Song* m_pSong;
|
||||||
D3DXCOLOR m_color; // either text color or section background color
|
D3DXCOLOR m_color; // either text color or section background color
|
||||||
MusicStatusDisplayType m_MusicStatusDisplayType;
|
MusicStatusDisplay::IconType m_IconType;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -103,8 +104,10 @@ public:
|
|||||||
|
|
||||||
void PrevMusic( bool bSendSongChangedMessage = true );
|
void PrevMusic( bool bSendSongChangedMessage = true );
|
||||||
void NextMusic( bool bSendSongChangedMessage = true );
|
void NextMusic( bool bSendSongChangedMessage = true );
|
||||||
void PrevSort();
|
bool PrevSort();
|
||||||
void NextSort();
|
bool NextSort();
|
||||||
|
void StartRoulette();
|
||||||
|
bool IsRouletting();
|
||||||
void NotesChanged( PlayerNumber pn ); // update grade graphics and top score
|
void NotesChanged( PlayerNumber pn ); // update grade graphics and top score
|
||||||
|
|
||||||
float GetBannerX( float fPosOffsetsFromMiddle );
|
float GetBannerX( float fPosOffsetsFromMiddle );
|
||||||
|
|||||||
@@ -206,7 +206,7 @@ void Player::Update( float fDeltaTime )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// check for OK
|
// check for OK
|
||||||
if( fSongBeat > hn.m_fEndBeat ) // if this HoldNote is in the past
|
if( fSongBeat >= hn.m_fEndBeat ) // if this HoldNote is in the past
|
||||||
{
|
{
|
||||||
// At this point fLife > 0, or else we would have marked it NG above
|
// At this point fLife > 0, or else we would have marked it NG above
|
||||||
fLife = 1;
|
fLife = 1;
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ PrefsManager::PrefsManager()
|
|||||||
m_fJudgeWindow = 0.18f;
|
m_fJudgeWindow = 0.18f;
|
||||||
m_fLifeDifficultyScale = 1.0f;
|
m_fLifeDifficultyScale = 1.0f;
|
||||||
m_iMovieDecodeMS = 2;
|
m_iMovieDecodeMS = 2;
|
||||||
|
m_bUseBGIfNoBanner = false;
|
||||||
|
|
||||||
ReadGlobalPrefsFromDisk( true );
|
ReadGlobalPrefsFromDisk( true );
|
||||||
}
|
}
|
||||||
@@ -81,6 +82,7 @@ void PrefsManager::ReadGlobalPrefsFromDisk( bool bSwitchToLastPlayedGame )
|
|||||||
ini.GetValueF( "Options", "JudgeWindow", m_fJudgeWindow );
|
ini.GetValueF( "Options", "JudgeWindow", m_fJudgeWindow );
|
||||||
ini.GetValueF( "Options", "LifeDifficultyScale", m_fLifeDifficultyScale );
|
ini.GetValueF( "Options", "LifeDifficultyScale", m_fLifeDifficultyScale );
|
||||||
ini.GetValueI( "Options", "MovieDecodeMS", m_iMovieDecodeMS );
|
ini.GetValueI( "Options", "MovieDecodeMS", m_iMovieDecodeMS );
|
||||||
|
ini.GetValueB( "Options", "UseBGIfNoBanner", m_bUseBGIfNoBanner );
|
||||||
|
|
||||||
m_asAdditionalSongFolders.RemoveAll();
|
m_asAdditionalSongFolders.RemoveAll();
|
||||||
CString sAdditionalSongFolders;
|
CString sAdditionalSongFolders;
|
||||||
@@ -106,7 +108,7 @@ void PrefsManager::SaveGlobalPrefsToDisk()
|
|||||||
ini.SetValueI( "Options", "TextureResolution", m_iTextureResolution );
|
ini.SetValueI( "Options", "TextureResolution", m_iTextureResolution );
|
||||||
ini.SetValueI( "Options", "RefreshRate", m_iRefreshRate );
|
ini.SetValueI( "Options", "RefreshRate", m_iRefreshRate );
|
||||||
ini.SetValueB( "Options", "IgnoreJoyAxes", m_bIgnoreJoyAxes );
|
ini.SetValueB( "Options", "IgnoreJoyAxes", m_bIgnoreJoyAxes );
|
||||||
ini.GetValueB( "Options", "UseDedicatedMenuButtons",m_bOnlyDedicatedMenuButtons );
|
ini.SetValueB( "Options", "UseDedicatedMenuButtons",m_bOnlyDedicatedMenuButtons );
|
||||||
ini.SetValueB( "Options", "ShowStats", m_bShowStats );
|
ini.SetValueB( "Options", "ShowStats", m_bShowStats );
|
||||||
ini.SetValueI( "Options", "BackgroundMode", m_BackgroundMode);
|
ini.SetValueI( "Options", "BackgroundMode", m_BackgroundMode);
|
||||||
ini.SetValueB( "Options", "ShowDanger", m_bShowDanger );
|
ini.SetValueB( "Options", "ShowDanger", m_bShowDanger );
|
||||||
@@ -118,6 +120,7 @@ void PrefsManager::SaveGlobalPrefsToDisk()
|
|||||||
ini.SetValueF( "Options", "JudgeWindow", m_fJudgeWindow );
|
ini.SetValueF( "Options", "JudgeWindow", m_fJudgeWindow );
|
||||||
ini.SetValueF( "Options", "LifeDifficultyScale", m_fLifeDifficultyScale );
|
ini.SetValueF( "Options", "LifeDifficultyScale", m_fLifeDifficultyScale );
|
||||||
ini.SetValueI( "Options", "MovieDecodeMS", m_iMovieDecodeMS );
|
ini.SetValueI( "Options", "MovieDecodeMS", m_iMovieDecodeMS );
|
||||||
|
ini.SetValueB( "Options", "UseBGIfNoBanner", m_bUseBGIfNoBanner );
|
||||||
|
|
||||||
ini.SetValue( "Options", "AdditionalSongFolders", join(",", m_asAdditionalSongFolders) );
|
ini.SetValue( "Options", "AdditionalSongFolders", join(",", m_asAdditionalSongFolders) );
|
||||||
|
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ public:
|
|||||||
float m_fJudgeWindow;
|
float m_fJudgeWindow;
|
||||||
float m_fLifeDifficultyScale;
|
float m_fLifeDifficultyScale;
|
||||||
int m_iMovieDecodeMS;
|
int m_iMovieDecodeMS;
|
||||||
|
bool m_bUseBGIfNoBanner;
|
||||||
|
|
||||||
CStringArray m_asAdditionalSongFolders;
|
CStringArray m_asAdditionalSongFolders;
|
||||||
|
|
||||||
|
|||||||
@@ -301,7 +301,7 @@ void GetDirListing( CString sPath, CStringArray &AddTo, bool bOnlyDirs, bool bRe
|
|||||||
// characters in the CString are recast as unsigned char and that the
|
// characters in the CString are recast as unsigned char and that the
|
||||||
// unsigned int result from the hash is recast as a signed int).
|
// unsigned int result from the hash is recast as a signed int).
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
int GetHashForString ( CString string )
|
unsigned int GetHashForString ( CString string )
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* RageCRC32.cpp
|
* RageCRC32.cpp
|
||||||
@@ -436,9 +436,9 @@ static const unsigned int crc32_tab[] = {
|
|||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
int GetHashForFile( CString sPath )
|
unsigned int GetHashForFile( CString sPath )
|
||||||
{
|
{
|
||||||
int hash = 0;
|
unsigned int hash = 0;
|
||||||
|
|
||||||
hash += GetHashForString( sPath );
|
hash += GetHashForString( sPath );
|
||||||
|
|
||||||
@@ -448,12 +448,12 @@ int GetHashForFile( CString sPath )
|
|||||||
if( CFile::GetStatus(sPath, status) )
|
if( CFile::GetStatus(sPath, status) )
|
||||||
hash += status.m_mtime.GetHour() * 3600 + status.m_mtime.GetMinute() * 60 + status.m_mtime.GetSecond();
|
hash += status.m_mtime.GetHour() * 3600 + status.m_mtime.GetMinute() * 60 + status.m_mtime.GetSecond();
|
||||||
|
|
||||||
return abs(hash);
|
return hash;
|
||||||
}
|
}
|
||||||
|
|
||||||
int GetHashForDirectory( CString sDir )
|
unsigned int GetHashForDirectory( CString sDir )
|
||||||
{
|
{
|
||||||
int hash = 0;
|
unsigned int hash = 0;
|
||||||
|
|
||||||
hash += GetHashForFile( sDir );
|
hash += GetHashForFile( sDir );
|
||||||
|
|
||||||
@@ -465,7 +465,7 @@ int GetHashForDirectory( CString sDir )
|
|||||||
hash += GetHashForFile( sFilePath );
|
hash += GetHashForFile( sFilePath );
|
||||||
}
|
}
|
||||||
|
|
||||||
return abs(hash);
|
return hash;
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD GetFileSizeInBytes( const CString &sFilePath )
|
DWORD GetFileSizeInBytes( const CString &sFilePath )
|
||||||
|
|||||||
@@ -148,9 +148,9 @@ CString join(
|
|||||||
);
|
);
|
||||||
|
|
||||||
void GetDirListing( CString sPath, CStringArray &AddTo, bool bOnlyDirs=false, bool bReturnPathToo=false );
|
void GetDirListing( CString sPath, CStringArray &AddTo, bool bOnlyDirs=false, bool bReturnPathToo=false );
|
||||||
int GetHashForString( CString s );
|
unsigned int GetHashForString( CString s );
|
||||||
int GetHashForFile( CString sPath );
|
unsigned int GetHashForFile( CString sPath );
|
||||||
int GetHashForDirectory( CString sDir ); // a hash value that remains the same as long as nothing in the directory has changed
|
unsigned int GetHashForDirectory( CString sDir ); // a hash value that remains the same as long as nothing in the directory has changed
|
||||||
|
|
||||||
bool DoesFileExist( const CString &sPath );
|
bool DoesFileExist( const CString &sPath );
|
||||||
bool IsAFile( const CString &sPath );
|
bool IsAFile( const CString &sPath );
|
||||||
|
|||||||
@@ -83,9 +83,9 @@ void ScreenCaution::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
|
|
||||||
void ScreenCaution::MenuStart( const PlayerNumber p )
|
void ScreenCaution::MenuStart( const PlayerNumber p )
|
||||||
{
|
{
|
||||||
if( p != PLAYER_INVALID && !GAMESTATE->m_bIsJoined[p] )
|
if( p != PLAYER_INVALID && !GAMESTATE->m_bSideIsJoined[p] )
|
||||||
{
|
{
|
||||||
GAMESTATE->m_bIsJoined[p] = true;
|
GAMESTATE->m_bSideIsJoined[p] = true;
|
||||||
SOUND->PlayOnceStreamed( THEME->GetPathTo("Sounds","menu start") );
|
SOUND->PlayOnceStreamed( THEME->GetPathTo("Sounds","menu start") );
|
||||||
SCREENMAN->RefreshCreditsMessages();
|
SCREENMAN->RefreshCreditsMessages();
|
||||||
return; // don't fall though
|
return; // don't fall though
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ ScreenEdit::ScreenEdit()
|
|||||||
// set both players to joined so the credit message doesn't show
|
// set both players to joined so the credit message doesn't show
|
||||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||||
{
|
{
|
||||||
GAMESTATE->m_bIsJoined[p] = true;
|
GAMESTATE->m_bSideIsJoined[p] = true;
|
||||||
}
|
}
|
||||||
SCREENMAN->RefreshCreditsMessages();
|
SCREENMAN->RefreshCreditsMessages();
|
||||||
|
|
||||||
|
|||||||
@@ -50,6 +50,7 @@
|
|||||||
#define NEW_RECORD_Y THEME->GetMetricF("Evaluation","NewRecordY")
|
#define NEW_RECORD_Y THEME->GetMetricF("Evaluation","NewRecordY")
|
||||||
#define TRY_EXTRA_STAGE_X THEME->GetMetricF("Evaluation","TryExtraStageX")
|
#define TRY_EXTRA_STAGE_X THEME->GetMetricF("Evaluation","TryExtraStageX")
|
||||||
#define TRY_EXTRA_STAGE_Y THEME->GetMetricF("Evaluation","TryExtraStageY")
|
#define TRY_EXTRA_STAGE_Y THEME->GetMetricF("Evaluation","TryExtraStageY")
|
||||||
|
#define HELP_TEXT THEME->GetMetric("Evaluation","HelpText")
|
||||||
#define TIMER_SECONDS THEME->GetMetricI("Evaluation","TimerSeconds")
|
#define TIMER_SECONDS THEME->GetMetricI("Evaluation","TimerSeconds")
|
||||||
|
|
||||||
float GRADE_X( int p ) {
|
float GRADE_X( int p ) {
|
||||||
@@ -235,7 +236,7 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary )
|
|||||||
m_Menu.Load(
|
m_Menu.Load(
|
||||||
THEME->GetPathTo("Graphics","evaluation background"),
|
THEME->GetPathTo("Graphics","evaluation background"),
|
||||||
THEME->GetPathTo("Graphics",m_ResultMode==RM_ARCADE_SUMMARY?"evaluation summary top edge":"evaluation top edge"),
|
THEME->GetPathTo("Graphics",m_ResultMode==RM_ARCADE_SUMMARY?"evaluation summary top edge":"evaluation top edge"),
|
||||||
"Press START to continue",
|
HELP_TEXT,
|
||||||
false, true, TIMER_SECONDS
|
false, true, TIMER_SECONDS
|
||||||
);
|
);
|
||||||
this->AddSubActor( &m_Menu );
|
this->AddSubActor( &m_Menu );
|
||||||
@@ -441,7 +442,7 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary )
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
SONGMAN->SaveStatisticsToDisk();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -848,6 +849,8 @@ void ScreenEvaluation::MenuStart( const PlayerNumber p )
|
|||||||
{
|
{
|
||||||
TweenOffScreen();
|
TweenOffScreen();
|
||||||
|
|
||||||
|
m_Menu.StopTimer();
|
||||||
|
|
||||||
if( PREFSMAN->m_bEventMode )
|
if( PREFSMAN->m_bEventMode )
|
||||||
{
|
{
|
||||||
switch( GAMESTATE->m_PlayMode )
|
switch( GAMESTATE->m_PlayMode )
|
||||||
|
|||||||
@@ -191,7 +191,7 @@ ScreenEz2SelectStyle::ScreenEz2SelectStyle()
|
|||||||
TODO: Get all the EZ2 specific stuff out of here
|
TODO: Get all the EZ2 specific stuff out of here
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( GAMESTATE->m_bIsJoined[PLAYER_1] && GAMESTATE->m_CurStyle == STYLE_EZ2_SINGLE) //if p1 already selected hide graphic.
|
if ( GAMESTATE->m_bSideIsJoined[PLAYER_1] && GAMESTATE->m_CurStyle == STYLE_EZ2_SINGLE) //if p1 already selected hide graphic.
|
||||||
{
|
{
|
||||||
m_iSelectedPlayer = 0;
|
m_iSelectedPlayer = 0;
|
||||||
m_sprPly[1].BeginTweening( 0 );
|
m_sprPly[1].BeginTweening( 0 );
|
||||||
@@ -199,7 +199,7 @@ ScreenEz2SelectStyle::ScreenEz2SelectStyle()
|
|||||||
m_sprPly[2].BeginTweening( 0 );
|
m_sprPly[2].BeginTweening( 0 );
|
||||||
m_sprPly[2].SetTweenZoomY( 0 );
|
m_sprPly[2].SetTweenZoomY( 0 );
|
||||||
}
|
}
|
||||||
else if ( GAMESTATE->m_bIsJoined[PLAYER_2] && GAMESTATE->m_CurStyle == STYLE_EZ2_SINGLE) //if p2 already selected hide graphic.
|
else if ( GAMESTATE->m_bSideIsJoined[PLAYER_2] && GAMESTATE->m_CurStyle == STYLE_EZ2_SINGLE) //if p2 already selected hide graphic.
|
||||||
{
|
{
|
||||||
m_iSelectedPlayer = 1;
|
m_iSelectedPlayer = 1;
|
||||||
m_sprPly[3].BeginTweening( 0 );
|
m_sprPly[3].BeginTweening( 0 );
|
||||||
|
|||||||
@@ -710,7 +710,7 @@ bool ScreenGameplay::OneIsHot()
|
|||||||
{
|
{
|
||||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||||
if( GAMESTATE->IsPlayerEnabled(PlayerNumber(p)) )
|
if( GAMESTATE->IsPlayerEnabled(PlayerNumber(p)) )
|
||||||
if( !m_pLifeMeter[p]->IsHot() )
|
if( m_pLifeMeter[p]->IsHot() )
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -778,10 +778,10 @@ void ScreenGameplay::Update( float fDeltaTime )
|
|||||||
//
|
//
|
||||||
// Check for end of song
|
// Check for end of song
|
||||||
//
|
//
|
||||||
if( fSongBeat > GAMESTATE->m_pCurSong->m_fLastBeat+4 )
|
if( fSongBeat > GAMESTATE->m_pCurSong->m_fLastBeat+4 && !m_soundMusic.IsPlaying() )
|
||||||
{
|
{
|
||||||
GAMESTATE->m_fSongBeat = 0;
|
GAMESTATE->m_fSongBeat = 0;
|
||||||
m_soundMusic.Pause();
|
m_soundMusic.Stop();
|
||||||
this->SendScreenMessage( SM_NotesEnded, 0 );
|
this->SendScreenMessage( SM_NotesEnded, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -834,17 +834,16 @@ void ScreenGameplay::Update( float fDeltaTime )
|
|||||||
m_fTimeLeftBeforeDancingComment -= fDeltaTime;
|
m_fTimeLeftBeforeDancingComment -= fDeltaTime;
|
||||||
if( m_fTimeLeftBeforeDancingComment <= 0 )
|
if( m_fTimeLeftBeforeDancingComment <= 0 )
|
||||||
{
|
{
|
||||||
m_fTimeLeftBeforeDancingComment = SECONDS_BETWEEN_COMMENTS; // reset for the next comment
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if( OneIsHot() )
|
if( OneIsHot() )
|
||||||
m_announcerHot.PlayRandom();
|
m_announcerHot.PlayRandom();
|
||||||
else if( AllAreInDanger() )
|
else if( AllAreInDanger() )
|
||||||
m_announcerDanger.PlayRandom();
|
m_announcerDanger.PlayRandom();
|
||||||
else
|
else
|
||||||
m_announcerGood.PlayRandom();
|
m_announcerGood.PlayRandom();
|
||||||
|
|
||||||
|
m_fTimeLeftBeforeDancingComment = SECONDS_BETWEEN_COMMENTS; // reset for the next comment
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -968,7 +967,7 @@ void ScreenGameplay::Input( const DeviceInput& DeviceI, const InputEventType typ
|
|||||||
|
|
||||||
seg.m_fBPM += fOffsetDelta;
|
seg.m_fBPM += fOffsetDelta;
|
||||||
|
|
||||||
m_textDebug.SetText( ssprintf("Cur BPM = %f.", GAMESTATE->m_pCurSong->m_fBeat0OffsetInSeconds) );
|
m_textDebug.SetText( ssprintf("Cur BPM = %f.", seg.m_fBPM) );
|
||||||
m_textDebug.SetDiffuseColor( D3DXCOLOR(1,1,1,1) );
|
m_textDebug.SetDiffuseColor( D3DXCOLOR(1,1,1,1) );
|
||||||
m_textDebug.StopTweening();
|
m_textDebug.StopTweening();
|
||||||
m_textDebug.BeginTweeningQueued( 3 ); // sleep
|
m_textDebug.BeginTweeningQueued( 3 ); // sleep
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ enum {
|
|||||||
GO_BGMODE,
|
GO_BGMODE,
|
||||||
GO_BGBRIGHTNESS,
|
GO_BGBRIGHTNESS,
|
||||||
GO_MOVIEDECODEMS,
|
GO_MOVIEDECODEMS,
|
||||||
|
GO_BGIFNOBANNER,
|
||||||
NUM_GRAPHIC_OPTIONS_LINES
|
NUM_GRAPHIC_OPTIONS_LINES
|
||||||
};
|
};
|
||||||
OptionLineData g_GraphicOptionsLines[NUM_GRAPHIC_OPTIONS_LINES] = {
|
OptionLineData g_GraphicOptionsLines[NUM_GRAPHIC_OPTIONS_LINES] = {
|
||||||
@@ -46,6 +47,7 @@ OptionLineData g_GraphicOptionsLines[NUM_GRAPHIC_OPTIONS_LINES] = {
|
|||||||
{ "BG Mode", 4, {"OFF","ANIMATIONS","VISUALIZATIONS","RANDOM MOVIES"} },
|
{ "BG Mode", 4, {"OFF","ANIMATIONS","VISUALIZATIONS","RANDOM MOVIES"} },
|
||||||
{ "BG Brightness", 5, {"20%","40%","60%","80%","100%"} },
|
{ "BG Brightness", 5, {"20%","40%","60%","80%","100%"} },
|
||||||
{ "Movie Decode", 4, {"1ms","2ms","3ms","4ms"} },
|
{ "Movie Decode", 4, {"1ms","2ms","3ms","4ms"} },
|
||||||
|
{ "BG For Banner", 2, {"NO", "YES (slow)"} },
|
||||||
};
|
};
|
||||||
|
|
||||||
ScreenGraphicOptions::ScreenGraphicOptions() :
|
ScreenGraphicOptions::ScreenGraphicOptions() :
|
||||||
@@ -115,6 +117,7 @@ void ScreenGraphicOptions::ImportOptions()
|
|||||||
else m_iSelectedOption[0][GO_BGBRIGHTNESS] = 2;
|
else m_iSelectedOption[0][GO_BGBRIGHTNESS] = 2;
|
||||||
|
|
||||||
m_iSelectedOption[0][GO_MOVIEDECODEMS] = PREFSMAN->m_iMovieDecodeMS-1;
|
m_iSelectedOption[0][GO_MOVIEDECODEMS] = PREFSMAN->m_iMovieDecodeMS-1;
|
||||||
|
m_iSelectedOption[0][GO_BGIFNOBANNER] = PREFSMAN->m_bUseBGIfNoBanner ? 1:0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenGraphicOptions::ExportOptions()
|
void ScreenGraphicOptions::ExportOptions()
|
||||||
@@ -170,6 +173,7 @@ void ScreenGraphicOptions::ExportOptions()
|
|||||||
}
|
}
|
||||||
|
|
||||||
PREFSMAN->m_iMovieDecodeMS = m_iSelectedOption[0][GO_MOVIEDECODEMS]+1;
|
PREFSMAN->m_iMovieDecodeMS = m_iSelectedOption[0][GO_MOVIEDECODEMS]+1;
|
||||||
|
PREFSMAN->m_bUseBGIfNoBanner = m_iSelectedOption[0][GO_BGIFNOBANNER] == 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenGraphicOptions::GoToPrevState()
|
void ScreenGraphicOptions::GoToPrevState()
|
||||||
|
|||||||
@@ -213,7 +213,7 @@ void ScreenManager::RefreshCreditsMessages()
|
|||||||
// update joined
|
// update joined
|
||||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||||
{
|
{
|
||||||
if( GAMESTATE->m_bIsJoined[p] ) m_textCreditInfo[p].SetText( "" );
|
if( GAMESTATE->m_bSideIsJoined[p] ) m_textCreditInfo[p].SetText( "" );
|
||||||
else if( GAMESTATE->m_bPlayersCanJoin ) m_textCreditInfo[p].SetText( "PRESS START" );
|
else if( GAMESTATE->m_bPlayersCanJoin ) m_textCreditInfo[p].SetText( "PRESS START" );
|
||||||
else m_textCreditInfo[p].SetText( "CREDIT(s) 0 / 0" );
|
else m_textCreditInfo[p].SetText( "CREDIT(s) 0 / 0" );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,6 +50,8 @@ const float LOCK_INPUT_TIME = 0.30f; // lock input while waiting for tweening to
|
|||||||
#define ARROW_OFFSET_P2_Y THEME->GetMetricF("SelectDifficulty","ArrowOffsetP2Y")
|
#define ARROW_OFFSET_P2_Y THEME->GetMetricF("SelectDifficulty","ArrowOffsetP2Y")
|
||||||
#define ARROW_SHADOW_LENGTH_X THEME->GetMetricF("SelectDifficulty","ArrowShadowLengthX")
|
#define ARROW_SHADOW_LENGTH_X THEME->GetMetricF("SelectDifficulty","ArrowShadowLengthX")
|
||||||
#define ARROW_SHADOW_LENGTH_Y THEME->GetMetricF("SelectDifficulty","ArrowShadowLengthY")
|
#define ARROW_SHADOW_LENGTH_Y THEME->GetMetricF("SelectDifficulty","ArrowShadowLengthY")
|
||||||
|
#define HELP_TEXT THEME->GetMetric("SelectDifficulty","HelpText")
|
||||||
|
#define TIMER_SECONDS THEME->GetMetricI("SelectDifficulty","TimerSeconds")
|
||||||
|
|
||||||
|
|
||||||
float MORE_X( int iIndex ) {
|
float MORE_X( int iIndex ) {
|
||||||
@@ -136,8 +138,7 @@ ScreenSelectDifficulty::ScreenSelectDifficulty()
|
|||||||
m_Menu.Load(
|
m_Menu.Load(
|
||||||
THEME->GetPathTo("Graphics","select difficulty background"),
|
THEME->GetPathTo("Graphics","select difficulty background"),
|
||||||
THEME->GetPathTo("Graphics","select difficulty top edge"),
|
THEME->GetPathTo("Graphics","select difficulty top edge"),
|
||||||
ssprintf("Use %c %c to select, then press START", char(1), char(2)),
|
HELP_TEXT, false, true, TIMER_SECONDS
|
||||||
false, true, 40
|
|
||||||
);
|
);
|
||||||
this->AddSubActor( &m_Menu );
|
this->AddSubActor( &m_Menu );
|
||||||
|
|
||||||
@@ -270,6 +271,7 @@ void ScreenSelectDifficulty::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
case SM_MenuTimer:
|
case SM_MenuTimer:
|
||||||
{
|
{
|
||||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||||
|
if( GAMESTATE->IsPlayerEnabled(p) )
|
||||||
MenuStart( (PlayerNumber)p );
|
MenuStart( (PlayerNumber)p );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -467,6 +469,7 @@ void ScreenSelectDifficulty::MenuStart( PlayerNumber pn )
|
|||||||
if( GAMESTATE->IsPlayerEnabled((PlayerNumber)p) && m_bChosen[p] == false )
|
if( GAMESTATE->IsPlayerEnabled((PlayerNumber)p) && m_bChosen[p] == false )
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
m_Menu.StopTimer();
|
||||||
this->SendScreenMessage( SM_StartTweeningOffScreen, 0.7f );
|
this->SendScreenMessage( SM_StartTweeningOffScreen, 0.7f );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -46,6 +46,8 @@
|
|||||||
#define TITLES_START_Y THEME->GetMetricF("SelectGroup","TitlesStartY")
|
#define TITLES_START_Y THEME->GetMetricF("SelectGroup","TitlesStartY")
|
||||||
#define TITLES_COLUMNS THEME->GetMetricI("SelectGroup","TitlesColumns")
|
#define TITLES_COLUMNS THEME->GetMetricI("SelectGroup","TitlesColumns")
|
||||||
#define TITLES_ROWS THEME->GetMetricI("SelectGroup","TitlesRows")
|
#define TITLES_ROWS THEME->GetMetricI("SelectGroup","TitlesRows")
|
||||||
|
#define HELP_TEXT THEME->GetMetric("SelectGroup","HelpText")
|
||||||
|
#define TIMER_SECONDS THEME->GetMetricI("SelectGroup","TimerSeconds")
|
||||||
|
|
||||||
|
|
||||||
const ScreenMessage SM_GoToPrevState = ScreenMessage(SM_User + 1);
|
const ScreenMessage SM_GoToPrevState = ScreenMessage(SM_User + 1);
|
||||||
@@ -131,8 +133,8 @@ ScreenSelectGroup::ScreenSelectGroup()
|
|||||||
m_Menu.Load(
|
m_Menu.Load(
|
||||||
THEME->GetPathTo("Graphics","select group background") ,
|
THEME->GetPathTo("Graphics","select group background") ,
|
||||||
THEME->GetPathTo("Graphics","select group top edge"),
|
THEME->GetPathTo("Graphics","select group top edge"),
|
||||||
ssprintf("Use %c %c to select, then press START", char(1), char(2)),
|
HELP_TEXT,
|
||||||
false, true, 40
|
false, true, TIMER_SECONDS
|
||||||
);
|
);
|
||||||
this->AddSubActor( &m_Menu );
|
this->AddSubActor( &m_Menu );
|
||||||
|
|
||||||
@@ -392,6 +394,7 @@ void ScreenSelectGroup::MenuStart( const PlayerNumber p )
|
|||||||
|
|
||||||
|
|
||||||
TweenOffScreen();
|
TweenOffScreen();
|
||||||
|
m_Menu.StopTimer();
|
||||||
|
|
||||||
this->SendScreenMessage( SM_StartFadingOut, 0.8f );
|
this->SendScreenMessage( SM_StartFadingOut, 0.8f );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,6 +72,8 @@
|
|||||||
#define PLAYER_OPTIONS_P2_Y THEME->GetMetricF("SelectMusic","PlayerOptionsP2Y")
|
#define PLAYER_OPTIONS_P2_Y THEME->GetMetricF("SelectMusic","PlayerOptionsP2Y")
|
||||||
#define SONG_OPTIONS_X THEME->GetMetricF("SelectMusic","SongOptionsX")
|
#define SONG_OPTIONS_X THEME->GetMetricF("SelectMusic","SongOptionsX")
|
||||||
#define SONG_OPTIONS_Y THEME->GetMetricF("SelectMusic","SongOptionsY")
|
#define SONG_OPTIONS_Y THEME->GetMetricF("SelectMusic","SongOptionsY")
|
||||||
|
#define HELP_TEXT THEME->GetMetric("SelectMusic","HelpText")
|
||||||
|
#define TIMER_SECONDS THEME->GetMetricI("SelectMusic","TimerSeconds")
|
||||||
|
|
||||||
const float TWEEN_TIME = 0.5f;
|
const float TWEEN_TIME = 0.5f;
|
||||||
|
|
||||||
@@ -146,9 +148,7 @@ ScreenSelectMusic::ScreenSelectMusic()
|
|||||||
m_Menu.Load(
|
m_Menu.Load(
|
||||||
THEME->GetPathTo("Graphics","select music background"),
|
THEME->GetPathTo("Graphics","select music background"),
|
||||||
THEME->GetPathTo("Graphics","select music top edge"),
|
THEME->GetPathTo("Graphics","select music top edge"),
|
||||||
ssprintf("%c or %c change music Hold %c and %c then press START to change sort\n%c%c easier difficulty %c%c harder difficulty",
|
HELP_TEXT, false, true, TIMER_SECONDS
|
||||||
char(1), char(2), char(1), char(2), char(3), char(3), char(4), char(4) ),
|
|
||||||
false, true, 60
|
|
||||||
);
|
);
|
||||||
this->AddSubActor( &m_Menu );
|
this->AddSubActor( &m_Menu );
|
||||||
|
|
||||||
@@ -248,7 +248,7 @@ ScreenSelectMusic::ScreenSelectMusic()
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_MusicSortDisplay.SetXY( SORT_ICON_X, SORT_ICON_Y );
|
m_MusicSortDisplay.SetXY( SORT_ICON_X, SORT_ICON_Y );
|
||||||
m_MusicSortDisplay.SetEffectGlowing( 1.0f );
|
//m_MusicSortDisplay.SetEffectGlowing( 1.0f );
|
||||||
m_MusicSortDisplay.Set( GAMESTATE->m_SongSortOrder );
|
m_MusicSortDisplay.Set( GAMESTATE->m_SongSortOrder );
|
||||||
this->AddSubActor( &m_MusicSortDisplay );
|
this->AddSubActor( &m_MusicSortDisplay );
|
||||||
|
|
||||||
@@ -388,7 +388,6 @@ void ScreenSelectMusic::TweenOffScreen()
|
|||||||
m_FootMeter[p].SetTweenZoomY( 0 );
|
m_FootMeter[p].SetTweenZoomY( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_MusicSortDisplay.SetDiffuseColor( D3DXCOLOR(1,1,1,1) );
|
|
||||||
m_MusicSortDisplay.SetEffectNone();
|
m_MusicSortDisplay.SetEffectNone();
|
||||||
m_MusicSortDisplay.BeginTweening( TWEEN_TIME );
|
m_MusicSortDisplay.BeginTweening( TWEEN_TIME );
|
||||||
m_MusicSortDisplay.SetTweenDiffuseColor( D3DXCOLOR(1,1,1,0) );
|
m_MusicSortDisplay.SetTweenDiffuseColor( D3DXCOLOR(1,1,1,0) );
|
||||||
@@ -429,6 +428,9 @@ const int MENU_EASIER_DIFFICULTY_PATTERN_SIZE = sizeof(MENU_EASIER_DIFFICULTY_PA
|
|||||||
const MenuButton MENU_HARDER_DIFFICULTY_PATTERN[] = { MENU_BUTTON_DOWN, MENU_BUTTON_DOWN };
|
const MenuButton MENU_HARDER_DIFFICULTY_PATTERN[] = { MENU_BUTTON_DOWN, MENU_BUTTON_DOWN };
|
||||||
const int MENU_HARDER_DIFFICULTY_PATTERN_SIZE = sizeof(MENU_HARDER_DIFFICULTY_PATTERN) / sizeof(MenuButton);
|
const int MENU_HARDER_DIFFICULTY_PATTERN_SIZE = sizeof(MENU_HARDER_DIFFICULTY_PATTERN) / sizeof(MenuButton);
|
||||||
|
|
||||||
|
const MenuButton MENU_NEXT_SORT_PATTERN[] = { MENU_BUTTON_UP, MENU_BUTTON_DOWN, MENU_BUTTON_UP, MENU_BUTTON_DOWN };
|
||||||
|
const int MENU_NEXT_SORT_PATTERN_SIZE = sizeof(MENU_NEXT_SORT_PATTERN) / sizeof(MenuButton);
|
||||||
|
|
||||||
void ScreenSelectMusic::Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI )
|
void ScreenSelectMusic::Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI )
|
||||||
{
|
{
|
||||||
LOG->Trace( "ScreenSelectMusic::Input()" );
|
LOG->Trace( "ScreenSelectMusic::Input()" );
|
||||||
@@ -488,6 +490,21 @@ void ScreenSelectMusic::Input( const DeviceInput& DeviceI, const InputEventType
|
|||||||
HarderDifficulty( MenuI.player );
|
HarderDifficulty( MenuI.player );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if( INPUTQUEUE->MatchesPattern(GameI.controller, MENU_NEXT_SORT_PATTERN, MENU_NEXT_SORT_PATTERN_SIZE) )
|
||||||
|
{
|
||||||
|
if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() )
|
||||||
|
m_soundLocked.Play();
|
||||||
|
else
|
||||||
|
if( m_MusicWheel.NextSort() )
|
||||||
|
{
|
||||||
|
MUSIC->Stop();
|
||||||
|
// tween music sort off screen
|
||||||
|
//m_MusicSortDisplay.SetEffectNone();
|
||||||
|
m_MusicSortDisplay.BeginTweening( 0.3f );
|
||||||
|
m_MusicSortDisplay.SetTweenDiffuseColor( D3DXCOLOR(1,1,1,0) );
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Screen::Input( DeviceI, type, GameI, MenuI, StyleI ); // default input handler
|
Screen::Input( DeviceI, type, GameI, MenuI, StyleI ); // default input handler
|
||||||
}
|
}
|
||||||
@@ -541,7 +558,20 @@ void ScreenSelectMusic::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
switch( SM )
|
switch( SM )
|
||||||
{
|
{
|
||||||
case SM_MenuTimer:
|
case SM_MenuTimer:
|
||||||
MenuStart(PLAYER_1);
|
if( m_MusicWheel.IsRouletting() )
|
||||||
|
{
|
||||||
|
MenuStart(PLAYER_INVALID);
|
||||||
|
m_Menu.SetTimer( 15 );
|
||||||
|
}
|
||||||
|
else if( m_MusicWheel.GetSelectedType() != TYPE_SONG )
|
||||||
|
{
|
||||||
|
m_MusicWheel.StartRoulette();
|
||||||
|
m_Menu.SetTimer( 15 );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MenuStart(PLAYER_INVALID);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case SM_GoToPrevState:
|
case SM_GoToPrevState:
|
||||||
SCREENMAN->SetNewScreen( new ScreenTitleMenu );
|
SCREENMAN->SetNewScreen( new ScreenTitleMenu );
|
||||||
@@ -563,6 +593,9 @@ void ScreenSelectMusic::HandleScreenMessage( const ScreenMessage SM )
|
|||||||
case SM_SongChanged:
|
case SM_SongChanged:
|
||||||
AfterMusicChange();
|
AfterMusicChange();
|
||||||
break;
|
break;
|
||||||
|
case SM_SortOrderChanged:
|
||||||
|
SortOrderChanged();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -591,20 +624,23 @@ void ScreenSelectMusic::MenuRight( const PlayerNumber p, const InputEventType ty
|
|||||||
|
|
||||||
void ScreenSelectMusic::MenuStart( const PlayerNumber p )
|
void ScreenSelectMusic::MenuStart( const PlayerNumber p )
|
||||||
{
|
{
|
||||||
if( INPUTMAPPER->IsButtonDown( MenuInput(p, MENU_BUTTON_LEFT) ) &&
|
if( p != PLAYER_INVALID &&
|
||||||
|
INPUTMAPPER->IsButtonDown( MenuInput(p, MENU_BUTTON_LEFT) ) &&
|
||||||
INPUTMAPPER->IsButtonDown( MenuInput(p, MENU_BUTTON_RIGHT) ) )
|
INPUTMAPPER->IsButtonDown( MenuInput(p, MENU_BUTTON_RIGHT) ) )
|
||||||
{
|
{
|
||||||
if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() )
|
if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() )
|
||||||
m_soundLocked.Play();
|
m_soundLocked.Play();
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_MusicSortDisplay.SetDiffuseColor( D3DXCOLOR(1,1,1,0) );
|
if( m_MusicWheel.NextSort() )
|
||||||
m_MusicSortDisplay.SetState( GAMESTATE->m_SongSortOrder );
|
{
|
||||||
m_MusicSortDisplay.BeginTweening( 0.3f ); // sleep
|
MUSIC->Stop();
|
||||||
m_MusicSortDisplay.BeginTweeningQueued( 0.3f ); // fade in
|
|
||||||
m_MusicSortDisplay.SetDiffuseColor( D3DXCOLOR(1,1,1,1) );
|
|
||||||
|
|
||||||
m_MusicWheel.NextSort();
|
// tween music sort off screen
|
||||||
|
//m_MusicSortDisplay.SetEffectNone();
|
||||||
|
m_MusicSortDisplay.BeginTweening( 0.3f );
|
||||||
|
m_MusicSortDisplay.SetTweenDiffuseColor( D3DXCOLOR(1,1,1,0) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -613,7 +649,12 @@ void ScreenSelectMusic::MenuStart( const PlayerNumber p )
|
|||||||
// this needs to check whether valid Notes are selected!
|
// this needs to check whether valid Notes are selected!
|
||||||
bool bResult = m_MusicWheel.Select();
|
bool bResult = m_MusicWheel.Select();
|
||||||
|
|
||||||
if( bResult )
|
if( !bResult )
|
||||||
|
{
|
||||||
|
if( p != PLAYER_INVALID )
|
||||||
|
this->SendScreenMessage( SM_MenuTimer, 1 ); // re-throw a timer message
|
||||||
|
}
|
||||||
|
else // if !bResult
|
||||||
{
|
{
|
||||||
// a song was selected
|
// a song was selected
|
||||||
switch( m_MusicWheel.GetSelectedType() )
|
switch( m_MusicWheel.GetSelectedType() )
|
||||||
@@ -665,6 +706,8 @@ void ScreenSelectMusic::MenuStart( const PlayerNumber p )
|
|||||||
|
|
||||||
m_Menu.TweenOffScreenToBlack( SM_None, false );
|
m_Menu.TweenOffScreenToBlack( SM_None, false );
|
||||||
|
|
||||||
|
m_Menu.StopTimer();
|
||||||
|
|
||||||
this->SendScreenMessage( SM_GoToNextState, 2.5f );
|
this->SendScreenMessage( SM_GoToNextState, 2.5f );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -717,6 +760,8 @@ void ScreenSelectMusic::AfterNotesChange( const PlayerNumber p )
|
|||||||
|
|
||||||
void ScreenSelectMusic::AfterMusicChange()
|
void ScreenSelectMusic::AfterMusicChange()
|
||||||
{
|
{
|
||||||
|
m_Menu.StallTimer();
|
||||||
|
|
||||||
Song* pSong = m_MusicWheel.GetSelectedSong();
|
Song* pSong = m_MusicWheel.GetSelectedSong();
|
||||||
GAMESTATE->m_pCurSong = pSong;
|
GAMESTATE->m_pCurSong = pSong;
|
||||||
|
|
||||||
@@ -814,4 +859,13 @@ void ScreenSelectMusic::UpdateOptionsDisplays()
|
|||||||
m_textSongOptions.SetText( s );
|
m_textSongOptions.SetText( s );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ScreenSelectMusic::SortOrderChanged()
|
||||||
|
{
|
||||||
|
m_MusicSortDisplay.SetState( GAMESTATE->m_SongSortOrder );
|
||||||
|
|
||||||
|
// tween music sort on screen
|
||||||
|
// m_MusicSortDisplay.SetEffectGlowing();
|
||||||
|
m_MusicSortDisplay.BeginTweening( 0.3f );
|
||||||
|
m_MusicSortDisplay.SetTweenDiffuseColor( D3DXCOLOR(1,1,1,1) );
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ protected:
|
|||||||
void AfterNotesChange( const PlayerNumber p );
|
void AfterNotesChange( const PlayerNumber p );
|
||||||
void AfterMusicChange();
|
void AfterMusicChange();
|
||||||
void PlayMusicSample();
|
void PlayMusicSample();
|
||||||
|
void SortOrderChanged();
|
||||||
|
|
||||||
void UpdateOptionsDisplays();
|
void UpdateOptionsDisplays();
|
||||||
|
|
||||||
|
|||||||
@@ -38,6 +38,8 @@
|
|||||||
#define INFO_Y THEME->GetMetricF("SelectStyle","InfoY")
|
#define INFO_Y THEME->GetMetricF("SelectStyle","InfoY")
|
||||||
#define PREVIEW_X THEME->GetMetricF("SelectStyle","PreviewX")
|
#define PREVIEW_X THEME->GetMetricF("SelectStyle","PreviewX")
|
||||||
#define PREVIEW_Y THEME->GetMetricF("SelectStyle","PreviewY")
|
#define PREVIEW_Y THEME->GetMetricF("SelectStyle","PreviewY")
|
||||||
|
#define HELP_TEXT THEME->GetMetric("SelectStyle","HelpText")
|
||||||
|
#define TIMER_SECONDS THEME->GetMetricI("SelectStyle","TimerSeconds")
|
||||||
|
|
||||||
#define SKIP_SELECT_DIFFICULTY THEME->GetMetricB("General","SkipSelectDifficulty")
|
#define SKIP_SELECT_DIFFICULTY THEME->GetMetricB("General","SkipSelectDifficulty")
|
||||||
|
|
||||||
@@ -91,8 +93,7 @@ ScreenSelectStyle::ScreenSelectStyle()
|
|||||||
m_Menu.Load(
|
m_Menu.Load(
|
||||||
THEME->GetPathTo("Graphics","select style background"),
|
THEME->GetPathTo("Graphics","select style background"),
|
||||||
THEME->GetPathTo("Graphics","select style top edge"),
|
THEME->GetPathTo("Graphics","select style top edge"),
|
||||||
ssprintf("Use %c %c to select, then press START", char(1), char(2) ),
|
HELP_TEXT, false, true, TIMER_SECONDS
|
||||||
false, true, 40
|
|
||||||
);
|
);
|
||||||
this->AddSubActor( &m_Menu );
|
this->AddSubActor( &m_Menu );
|
||||||
|
|
||||||
@@ -244,10 +245,10 @@ void ScreenSelectStyle::MenuRight( const PlayerNumber p )
|
|||||||
|
|
||||||
void ScreenSelectStyle::MenuStart( const PlayerNumber p )
|
void ScreenSelectStyle::MenuStart( const PlayerNumber p )
|
||||||
{
|
{
|
||||||
if( p!=PLAYER_INVALID && !GAMESTATE->m_bIsJoined[p] )
|
if( p!=PLAYER_INVALID && !GAMESTATE->m_bSideIsJoined[p] )
|
||||||
{
|
{
|
||||||
SOUND->PlayOnceStreamed( THEME->GetPathTo("Sounds","menu start") );
|
SOUND->PlayOnceStreamed( THEME->GetPathTo("Sounds","menu start") );
|
||||||
GAMESTATE->m_bIsJoined[p] = true;
|
GAMESTATE->m_bSideIsJoined[p] = true;
|
||||||
SCREENMAN->RefreshCreditsMessages();
|
SCREENMAN->RefreshCreditsMessages();
|
||||||
UpdateEnabledDisabled();
|
UpdateEnabledDisabled();
|
||||||
return; // don't fall through
|
return; // don't fall through
|
||||||
@@ -273,6 +274,8 @@ void ScreenSelectStyle::MenuStart( const PlayerNumber p )
|
|||||||
|
|
||||||
m_soundSelect.PlayRandom();
|
m_soundSelect.PlayRandom();
|
||||||
|
|
||||||
|
m_Menu.StopTimer();
|
||||||
|
|
||||||
TweenOffScreen();
|
TweenOffScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -345,7 +348,7 @@ bool ScreenSelectStyle::IsEnabled( int iStyleIndex )
|
|||||||
|
|
||||||
int iNumSidesJoined = 0;
|
int iNumSidesJoined = 0;
|
||||||
for( int c=0; c<2; c++ )
|
for( int c=0; c<2; c++ )
|
||||||
if( GAMESTATE->m_bIsJoined[c] )
|
if( GAMESTATE->m_bSideIsJoined[c] )
|
||||||
iNumSidesJoined++; // left side, and right side
|
iNumSidesJoined++; // left side, and right side
|
||||||
|
|
||||||
switch( GAMEMAN->GetStyleDefForStyle(style)->m_StyleType )
|
switch( GAMEMAN->GetStyleDefForStyle(style)->m_StyleType )
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ const CString CHOICE_TEXT[ScreenTitleMenu::NUM_TITLE_MENU_CHOICES] = {
|
|||||||
#define COLOR_SELECTED THEME->GetMetricC("TitleMenu","ColorSelected")
|
#define COLOR_SELECTED THEME->GetMetricC("TitleMenu","ColorSelected")
|
||||||
#define SECONDS_BEFORE_DEMONSTRATION THEME->GetMetricF("TitleMenu","SecondsBeforeDemonstration")
|
#define SECONDS_BEFORE_DEMONSTRATION THEME->GetMetricF("TitleMenu","SecondsBeforeDemonstration")
|
||||||
#define SECONDS_BETWEEN_ATTRACT THEME->GetMetricF("TitleMenu","SecondsBetweenAttract")
|
#define SECONDS_BETWEEN_ATTRACT THEME->GetMetricF("TitleMenu","SecondsBetweenAttract")
|
||||||
|
#define HELP_TEXT THEME->GetMetric("TitleMenu","HelpText")
|
||||||
|
|
||||||
#define USE_CAUTION_OR_SELECT_PLAYER THEME->GetMetricB("General","UseCautionOrSelectPlayer")
|
#define USE_CAUTION_OR_SELECT_PLAYER THEME->GetMetricB("General","UseCautionOrSelectPlayer")
|
||||||
|
|
||||||
@@ -119,8 +120,8 @@ ScreenTitleMenu::ScreenTitleMenu()
|
|||||||
m_sprLogo.SetTweenZoom( 1 );
|
m_sprLogo.SetTweenZoom( 1 );
|
||||||
this->AddSubActor( &m_sprLogo );
|
this->AddSubActor( &m_sprLogo );
|
||||||
|
|
||||||
m_textHelp.LoadFromFont( THEME->GetPathTo("Fonts","normal") );
|
m_textHelp.LoadFromFont( THEME->GetPathTo("Fonts","help") );
|
||||||
m_textHelp.SetText( ssprintf("Use %c %c to select, then press START", char(3), char(4)) );
|
m_textHelp.SetText( HELP_TEXT );
|
||||||
m_textHelp.SetXY( HELP_X, HELP_Y );
|
m_textHelp.SetXY( HELP_X, HELP_Y );
|
||||||
m_textHelp.SetZoom( 0.5f );
|
m_textHelp.SetZoom( 0.5f );
|
||||||
m_textHelp.SetEffectBlinking();
|
m_textHelp.SetEffectBlinking();
|
||||||
@@ -345,7 +346,8 @@ void ScreenTitleMenu::MenuDown( const PlayerNumber p )
|
|||||||
|
|
||||||
void ScreenTitleMenu::MenuStart( const PlayerNumber p )
|
void ScreenTitleMenu::MenuStart( const PlayerNumber p )
|
||||||
{
|
{
|
||||||
GAMESTATE->m_bIsJoined[p] = true;
|
GAMESTATE->m_bSideIsJoined[p] = true;
|
||||||
|
GAMESTATE->m_MasterPlayerNumber = p;
|
||||||
|
|
||||||
GAMESTATE->m_bPlayersCanJoin = false;
|
GAMESTATE->m_bPlayersCanJoin = false;
|
||||||
|
|
||||||
|
|||||||
+18
-1
@@ -1394,6 +1394,23 @@ Grade Song::GetGradeForDifficultyClass( NotesType nt, DifficultyClass dc )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool Song::IsNew()
|
||||||
|
{
|
||||||
|
return GetNumTimesPlayed()==0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Song::IsEasy( NotesType nt )
|
||||||
|
{
|
||||||
|
for( int i=0; i<m_apNotes.GetSize(); i++ )
|
||||||
|
{
|
||||||
|
Notes* pNotes = m_apNotes[i];
|
||||||
|
if( pNotes->m_NotesType != nt )
|
||||||
|
continue;
|
||||||
|
if( pNotes->m_iMeter <= 2 )
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/////////////////////////////////////
|
/////////////////////////////////////
|
||||||
// Sorting
|
// Sorting
|
||||||
@@ -1497,7 +1514,7 @@ int CompareSongPointersByMostPlayed(const void *arg1, const void *arg2)
|
|||||||
int iNumTimesPlayed1 = pSong1->GetNumTimesPlayed();
|
int iNumTimesPlayed1 = pSong1->GetNumTimesPlayed();
|
||||||
int iNumTimesPlayed2 = pSong2->GetNumTimesPlayed();
|
int iNumTimesPlayed2 = pSong2->GetNumTimesPlayed();
|
||||||
|
|
||||||
if( iNumTimesPlayed1 < iNumTimesPlayed2 )
|
if( iNumTimesPlayed1 > iNumTimesPlayed2 )
|
||||||
return -1;
|
return -1;
|
||||||
else if( iNumTimesPlayed1 == iNumTimesPlayed2 )
|
else if( iNumTimesPlayed1 == iNumTimesPlayed2 )
|
||||||
return CompareSongPointersByTitle( arg1, arg2 );
|
return CompareSongPointersByTitle( arg1, arg2 );
|
||||||
|
|||||||
@@ -527,7 +527,7 @@ load_from_course_failed:
|
|||||||
|
|
||||||
// should we do something fancy here, like turn on different effects?
|
// should we do something fancy here, like turn on different effects?
|
||||||
int iSongHash = GetHashForString( pSongOut->m_sSongDir );
|
int iSongHash = GetHashForString( pSongOut->m_sSongDir );
|
||||||
switch( iSongHash % 6 )
|
switch( ((UINT)iSongHash) % 6 )
|
||||||
{
|
{
|
||||||
case 0: po_out.m_EffectType = PlayerOptions::EFFECT_DIZZY; break;
|
case 0: po_out.m_EffectType = PlayerOptions::EFFECT_DIZZY; break;
|
||||||
case 1: po_out.m_bDark = true; break;
|
case 1: po_out.m_bDark = true; break;
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
#include "RageUtil.h"
|
#include "RageUtil.h"
|
||||||
#include "GameDef.h"
|
#include "GameDef.h"
|
||||||
#include "IniFile.h"
|
#include "IniFile.h"
|
||||||
|
#include "GameState.h"
|
||||||
|
|
||||||
|
|
||||||
void StyleDef::GetTransformedNoteDataForStyle( PlayerNumber p, NoteData* pOriginal, NoteData* pNoteDataOut )
|
void StyleDef::GetTransformedNoteDataForStyle( PlayerNumber p, NoteData* pOriginal, NoteData* pNoteDataOut )
|
||||||
@@ -41,6 +42,8 @@ GameInput StyleDef::StyleInputToGameInput( const StyleInput StyleI )
|
|||||||
|
|
||||||
StyleInput StyleDef::GameInputToStyleInput( const GameInput &GameI )
|
StyleInput StyleDef::GameInputToStyleInput( const GameInput &GameI )
|
||||||
{
|
{
|
||||||
|
StyleInput SI;
|
||||||
|
|
||||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||||
{
|
{
|
||||||
for( int t=0; t<MAX_NOTE_TRACKS; t++ )
|
for( int t=0; t<MAX_NOTE_TRACKS; t++ )
|
||||||
@@ -48,11 +51,18 @@ StyleInput StyleDef::GameInputToStyleInput( const GameInput &GameI )
|
|||||||
if( m_ColumnInfo[p][t].controller == GameI.controller &&
|
if( m_ColumnInfo[p][t].controller == GameI.controller &&
|
||||||
m_ColumnInfo[p][t].button == GameI.button )
|
m_ColumnInfo[p][t].button == GameI.button )
|
||||||
{
|
{
|
||||||
return StyleInput( (PlayerNumber)p, t );
|
SI = StyleInput( (PlayerNumber)p, t );
|
||||||
|
|
||||||
|
// HACK: Looking up the player number using m_ColumnInfo
|
||||||
|
// returns the wrong answer for ONE_PLAYER_TWO_CREDITS styles
|
||||||
|
if( m_StyleType == ONE_PLAYER_TWO_CREDITS )
|
||||||
|
SI.player = GAMESTATE->m_MasterPlayerNumber;
|
||||||
|
|
||||||
|
return SI;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return StyleInput(); // Didn't find a match. Return invalid.
|
return SI; // Didn't find a match. Return invalid.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
/*
|
/*
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
File: TipDisplay.h
|
Class: TipDisplay
|
||||||
|
|
||||||
Desc: A BitmapText that .
|
Desc: See header
|
||||||
|
|
||||||
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
||||||
Chris Danford
|
Chris Danford
|
||||||
@@ -23,7 +23,7 @@ TipDisplay::TipDisplay()
|
|||||||
{
|
{
|
||||||
LOG->Trace( "TipDisplay::TipDisplay()" );
|
LOG->Trace( "TipDisplay::TipDisplay()" );
|
||||||
|
|
||||||
m_textTip.LoadFromFont( THEME->GetPathTo("Fonts","normal") );
|
m_textTip.LoadFromFont( THEME->GetPathTo("Fonts","help") );
|
||||||
m_textTip.SetEffectBlinking();
|
m_textTip.SetEffectBlinking();
|
||||||
m_textTip.TurnShadowOff();
|
m_textTip.TurnShadowOff();
|
||||||
this->AddSubActor( &m_textTip );
|
this->AddSubActor( &m_textTip );
|
||||||
|
|||||||
@@ -1,18 +1,15 @@
|
|||||||
|
#pragma once
|
||||||
/*
|
/*
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
File: TipDisplay.h
|
Class: TipDisplay
|
||||||
|
|
||||||
Desc: A graphic displayed in the TipDisplay during Dancing.
|
Desc: A BitmapText that cycles through messages.
|
||||||
|
|
||||||
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
|
||||||
|
Chris Danford
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef _TipDisplay_H_
|
|
||||||
#define _TipDisplay_H_
|
|
||||||
|
|
||||||
|
|
||||||
#include "Sprite.h"
|
#include "Sprite.h"
|
||||||
#include "Song.h"
|
#include "Song.h"
|
||||||
#include "ActorFrame.h"
|
#include "ActorFrame.h"
|
||||||
@@ -35,5 +32,3 @@ protected:
|
|||||||
|
|
||||||
float m_fSecsUntilSwitch;
|
float m_fSecsUntilSwitch;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -167,7 +167,8 @@ public:
|
|||||||
}
|
}
|
||||||
return iTotalNumTimesPlayed;
|
return iTotalNumTimesPlayed;
|
||||||
}
|
}
|
||||||
bool IsNew() { return GetNumTimesPlayed()==0; };
|
bool IsNew();
|
||||||
|
bool IsEasy( NotesType nt );
|
||||||
Grade GetGradeForDifficultyClass( NotesType nt, DifficultyClass dc );
|
Grade GetGradeForDifficultyClass( NotesType nt, DifficultyClass dc );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user