[Xcode4 -> default] We are ready to roar!
This commit is contained in:
@@ -48,7 +48,7 @@ Docs/doxygen
|
|||||||
PBProject/build
|
PBProject/build
|
||||||
Xcode/build
|
Xcode/build
|
||||||
*.xcodeproj/xcuserdata
|
*.xcodeproj/xcuserdata
|
||||||
*.xcodeproj/project.xcworkspace/xcuserdata
|
*.xcodeproj/project.xcworkspace
|
||||||
src/build-*
|
src/build-*
|
||||||
src/Release-*
|
src/Release-*
|
||||||
src/libtomcrypt/build-*
|
src/libtomcrypt/build-*
|
||||||
|
|||||||
@@ -47,6 +47,8 @@
|
|||||||
<string>Step</string>
|
<string>Step</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>PRODUCT_VER_BARE</string>
|
<string>PRODUCT_VER_BARE</string>
|
||||||
|
<key>LSApplicationCategoryType</key>
|
||||||
|
<string>public.app-category.music-games</string>
|
||||||
<key>LSMinimumSystemVersion</key>
|
<key>LSMinimumSystemVersion</key>
|
||||||
<string>10.4.10</string>
|
<string>10.4.10</string>
|
||||||
<key>NSHumanReadableCopyright</key>
|
<key>NSHumanReadableCopyright</key>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
+7
-6
@@ -722,12 +722,13 @@ void Actor::UpdateInternal( float fDeltaTime )
|
|||||||
// todo: account for SSC_FUTURES -aj
|
// todo: account for SSC_FUTURES -aj
|
||||||
switch( m_Effect )
|
switch( m_Effect )
|
||||||
{
|
{
|
||||||
case spin:
|
case spin:
|
||||||
m_current.rotation += m_fEffectDelta*m_vEffectMagnitude;
|
m_current.rotation += m_fEffectDelta*m_vEffectMagnitude;
|
||||||
wrap( m_current.rotation.x, 360 );
|
wrap( m_current.rotation.x, 360 );
|
||||||
wrap( m_current.rotation.y, 360 );
|
wrap( m_current.rotation.y, 360 );
|
||||||
wrap( m_current.rotation.z, 360 );
|
wrap( m_current.rotation.z, 360 );
|
||||||
break;
|
break;
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
UpdateTweening( fDeltaTime );
|
UpdateTweening( fDeltaTime );
|
||||||
|
|||||||
@@ -189,11 +189,11 @@ void BGAnimationLayer::LoadFromAniLayerFile( const RString& sPath )
|
|||||||
|
|
||||||
switch( effect )
|
switch( effect )
|
||||||
{
|
{
|
||||||
case EFFECT_STRETCH_SCROLL_LEFT: m_fTexCoordVelocityX = +0.5f; m_fTexCoordVelocityY = 0; break;
|
case EFFECT_STRETCH_SCROLL_LEFT: m_fTexCoordVelocityX = +0.5f; m_fTexCoordVelocityY = 0; break;
|
||||||
case EFFECT_STRETCH_SCROLL_RIGHT: m_fTexCoordVelocityX = -0.5f; m_fTexCoordVelocityY = 0; break;
|
case EFFECT_STRETCH_SCROLL_RIGHT: m_fTexCoordVelocityX = -0.5f; m_fTexCoordVelocityY = 0; break;
|
||||||
case EFFECT_STRETCH_SCROLL_UP: m_fTexCoordVelocityX = 0; m_fTexCoordVelocityY = +0.5f; break;
|
case EFFECT_STRETCH_SCROLL_UP: m_fTexCoordVelocityX = 0; m_fTexCoordVelocityY = +0.5f; break;
|
||||||
case EFFECT_STRETCH_SCROLL_DOWN: m_fTexCoordVelocityX = 0; m_fTexCoordVelocityY = -0.5f; break;
|
case EFFECT_STRETCH_SCROLL_DOWN: m_fTexCoordVelocityX = 0; m_fTexCoordVelocityY = -0.5f; break;
|
||||||
break;
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
+6
-4
@@ -429,12 +429,14 @@ bool Course::GetTrailUnsorted( StepsType st, CourseDifficulty cd, Trail &trail )
|
|||||||
{
|
{
|
||||||
trail.Init();
|
trail.Init();
|
||||||
|
|
||||||
|
// XXX: Why are beginner and challenge excluded here? -Wolfman2000
|
||||||
switch( cd )
|
switch( cd )
|
||||||
{
|
{
|
||||||
case Difficulty_Beginner:
|
case Difficulty_Beginner:
|
||||||
return false;
|
return false;
|
||||||
case Difficulty_Challenge:
|
case Difficulty_Challenge:
|
||||||
return false;
|
return false;
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Construct a new Trail, add it to the cache, then return it.
|
// Construct a new Trail, add it to the cache, then return it.
|
||||||
|
|||||||
@@ -131,10 +131,11 @@ DancingCharacters::DancingCharacters(): m_bDrawDangerLight(false),
|
|||||||
|
|
||||||
switch( GAMESTATE->m_PlayMode )
|
switch( GAMESTATE->m_PlayMode )
|
||||||
{
|
{
|
||||||
case PLAY_MODE_BATTLE:
|
case PLAY_MODE_BATTLE:
|
||||||
case PLAY_MODE_RAVE:
|
case PLAY_MODE_RAVE:
|
||||||
m_pCharacter[p]->SetRotationY( MODEL_ROTATIONY_TWO_PLAYERS[p] );
|
m_pCharacter[p]->SetRotationY( MODEL_ROTATIONY_TWO_PLAYERS[p] );
|
||||||
break;
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_pCharacter[p]->LoadMilkshapeAscii( pChar->GetModelPath() );
|
m_pCharacter[p]->LoadMilkshapeAscii( pChar->GetModelPath() );
|
||||||
|
|||||||
+4
-4
@@ -275,12 +275,12 @@ bool EditMenu::RowIsSelectable( EditMenuRow row )
|
|||||||
{
|
{
|
||||||
switch( row )
|
switch( row )
|
||||||
{
|
{
|
||||||
case ROW_SOURCE_STEPS_TYPE:
|
case ROW_SOURCE_STEPS_TYPE:
|
||||||
case ROW_SOURCE_STEPS:
|
case ROW_SOURCE_STEPS:
|
||||||
return false;
|
return false;
|
||||||
|
default: return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+17
-17
@@ -465,22 +465,21 @@ static bool AreStyleAndPlayModeCompatible( const Style *style, PlayMode pm )
|
|||||||
|
|
||||||
switch( pm )
|
switch( pm )
|
||||||
{
|
{
|
||||||
case PLAY_MODE_BATTLE:
|
case PLAY_MODE_BATTLE:
|
||||||
case PLAY_MODE_RAVE:
|
case PLAY_MODE_RAVE:
|
||||||
// Can't play rave if there isn't enough room for two players.
|
// Can't play rave if there isn't enough room for two players.
|
||||||
// This is correct for dance (ie, no rave for solo and doubles),
|
// This is correct for dance (ie, no rave for solo and doubles),
|
||||||
// and should be okay for pump.. not sure about other game types.
|
// and should be okay for pump.. not sure about other game types.
|
||||||
// Techno Motion scales down versus arrows, though, so allow this.
|
// Techno Motion scales down versus arrows, though, so allow this.
|
||||||
if( style->m_iColsPerPlayer >= 6 && RString(GAMESTATE->m_pCurGame->m_szName) != "techno" )
|
if( style->m_iColsPerPlayer >= 6 && RString(GAMESTATE->m_pCurGame->m_szName) != "techno" )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Don't allow battle modes if the style takes both sides.
|
// Don't allow battle modes if the style takes both sides.
|
||||||
if( style->m_StyleType==StyleType_OnePlayerTwoSides ||
|
if( style->m_StyleType==StyleType_OnePlayerTwoSides ||
|
||||||
style->m_StyleType==StyleType_TwoPlayersSharedSides )
|
style->m_StyleType==StyleType_TwoPlayersSharedSides )
|
||||||
return false;
|
return false;
|
||||||
|
default: return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GameCommand::IsPlayable( RString *why ) const
|
bool GameCommand::IsPlayable( RString *why ) const
|
||||||
@@ -500,9 +499,10 @@ bool GameCommand::IsPlayable( RString *why ) const
|
|||||||
|
|
||||||
switch( GAMESTATE->GetCoinMode() )
|
switch( GAMESTATE->GetCoinMode() )
|
||||||
{
|
{
|
||||||
case CoinMode_Home:
|
case CoinMode_Home:
|
||||||
case CoinMode_Free:
|
case CoinMode_Free:
|
||||||
iCredits = NUM_PLAYERS; // not iNumCreditsPaid
|
iCredits = NUM_PLAYERS; // not iNumCreditsPaid
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* With PREFSMAN->m_bDelayedCreditsReconcile disabled, enough credits must
|
/* With PREFSMAN->m_bDelayedCreditsReconcile disabled, enough credits must
|
||||||
|
|||||||
+19
-16
@@ -747,7 +747,9 @@ void GameState::CancelStage()
|
|||||||
{
|
{
|
||||||
case PLAY_MODE_BATTLE:
|
case PLAY_MODE_BATTLE:
|
||||||
case PLAY_MODE_RAVE:
|
case PLAY_MODE_RAVE:
|
||||||
m_iPlayerStageTokens[p] = PREFSMAN->m_iSongsPerPlay;
|
m_iPlayerStageTokens[p] = PREFSMAN->m_iSongsPerPlay;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1169,12 +1171,12 @@ bool GameState::IsPlayerEnabled( PlayerNumber pn ) const
|
|||||||
// In rave, all players are present. Non-human players are CPU controlled.
|
// In rave, all players are present. Non-human players are CPU controlled.
|
||||||
switch( m_PlayMode )
|
switch( m_PlayMode )
|
||||||
{
|
{
|
||||||
case PLAY_MODE_BATTLE:
|
case PLAY_MODE_BATTLE:
|
||||||
case PLAY_MODE_RAVE:
|
case PLAY_MODE_RAVE:
|
||||||
return true;
|
return true;
|
||||||
|
default:
|
||||||
|
return IsHumanPlayer(pn);
|
||||||
}
|
}
|
||||||
|
|
||||||
return IsHumanPlayer( pn );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GameState::IsMultiPlayerEnabled( MultiPlayer mp ) const
|
bool GameState::IsMultiPlayerEnabled( MultiPlayer mp ) const
|
||||||
@@ -1346,16 +1348,17 @@ StageResult GameState::GetStageResult( PlayerNumber pn ) const
|
|||||||
{
|
{
|
||||||
switch( m_PlayMode )
|
switch( m_PlayMode )
|
||||||
{
|
{
|
||||||
case PLAY_MODE_BATTLE:
|
case PLAY_MODE_BATTLE:
|
||||||
case PLAY_MODE_RAVE:
|
case PLAY_MODE_RAVE:
|
||||||
if( fabsf(m_fTugLifePercentP1 - 0.5f) < 0.0001f )
|
if( fabsf(m_fTugLifePercentP1 - 0.5f) < 0.0001f )
|
||||||
return RESULT_DRAW;
|
return RESULT_DRAW;
|
||||||
switch( pn )
|
switch( pn )
|
||||||
{
|
{
|
||||||
case PLAYER_1: return (m_fTugLifePercentP1>=0.5f)?RESULT_WIN:RESULT_LOSE;
|
case PLAYER_1: return (m_fTugLifePercentP1>=0.5f)?RESULT_WIN:RESULT_LOSE;
|
||||||
case PLAYER_2: return (m_fTugLifePercentP1<0.5f)?RESULT_WIN:RESULT_LOSE;
|
case PLAYER_2: return (m_fTugLifePercentP1<0.5f)?RESULT_WIN:RESULT_LOSE;
|
||||||
default: ASSERT(0); return RESULT_LOSE;
|
default: FAIL_M("Invalid player for battle! Aborting..."); return RESULT_LOSE;
|
||||||
}
|
}
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
StageResult win = RESULT_WIN;
|
StageResult win = RESULT_WIN;
|
||||||
|
|||||||
+11
-8
@@ -72,16 +72,19 @@ void Inventory::Load( PlayerState* pPlayerState )
|
|||||||
// don't load battle sounds if they're not going to be used
|
// don't load battle sounds if they're not going to be used
|
||||||
switch( GAMESTATE->m_PlayMode )
|
switch( GAMESTATE->m_PlayMode )
|
||||||
{
|
{
|
||||||
case PLAY_MODE_BATTLE:
|
case PLAY_MODE_BATTLE:
|
||||||
m_soundAcquireItem.Load( THEME->GetPathS("Inventory","aquire item") );
|
|
||||||
for( unsigned i=0; i<g_Items.size(); i++ )
|
|
||||||
{
|
{
|
||||||
RageSound* pSound = new RageSound;
|
m_soundAcquireItem.Load( THEME->GetPathS("Inventory","aquire item") );
|
||||||
pSound->Load( THEME->GetPathS("Inventory",ssprintf("use item %u",i+1)) );
|
for( unsigned i=0; i<g_Items.size(); i++ )
|
||||||
m_vpSoundUseItem.push_back( pSound );
|
{
|
||||||
|
RageSound* pSound = new RageSound;
|
||||||
|
pSound->Load( THEME->GetPathS("Inventory",ssprintf("use item %u",i+1)) );
|
||||||
|
m_vpSoundUseItem.push_back( pSound );
|
||||||
|
}
|
||||||
|
m_soundItemEnding.Load( THEME->GetPathS("Inventory","item ending") );
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
m_soundItemEnding.Load( THEME->GetPathS("Inventory","item ending") );
|
default: break;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -212,12 +212,13 @@ void LifeMeterBar::ChangeLife( float fDeltaLife )
|
|||||||
|
|
||||||
switch( GAMESTATE->m_SongOptions.GetSong().m_DrainType )
|
switch( GAMESTATE->m_SongOptions.GetSong().m_DrainType )
|
||||||
{
|
{
|
||||||
case SongOptions::DRAIN_NORMAL:
|
case SongOptions::DRAIN_NORMAL:
|
||||||
case SongOptions::DRAIN_NO_RECOVER:
|
case SongOptions::DRAIN_NO_RECOVER:
|
||||||
if( fDeltaLife > 0 )
|
if( fDeltaLife > 0 )
|
||||||
fDeltaLife *= m_fLifeDifficulty;
|
fDeltaLife *= m_fLifeDifficulty;
|
||||||
else
|
else
|
||||||
fDeltaLife /= m_fLifeDifficulty;
|
fDeltaLife /= m_fLifeDifficulty;
|
||||||
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+32
-30
@@ -449,22 +449,23 @@ void MemoryCardManager::CheckStateChanges()
|
|||||||
{
|
{
|
||||||
switch( new_device.m_State )
|
switch( new_device.m_State )
|
||||||
{
|
{
|
||||||
case UsbStorageDevice::STATE_NONE:
|
case UsbStorageDevice::STATE_NONE:
|
||||||
state = MemoryCardState_NoCard;
|
state = MemoryCardState_NoCard;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case UsbStorageDevice::STATE_CHECKING:
|
case UsbStorageDevice::STATE_CHECKING:
|
||||||
state = MemoryCardState_Checking;
|
state = MemoryCardState_Checking;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case UsbStorageDevice::STATE_ERROR:
|
case UsbStorageDevice::STATE_ERROR:
|
||||||
state = MemoryCardState_Error;
|
state = MemoryCardState_Error;
|
||||||
sError = new_device.m_sError;
|
sError = new_device.m_sError;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case UsbStorageDevice::STATE_READY:
|
case UsbStorageDevice::STATE_READY:
|
||||||
state = MemoryCardState_Ready;
|
state = MemoryCardState_Ready;
|
||||||
break;
|
break;
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -476,23 +477,24 @@ void MemoryCardManager::CheckStateChanges()
|
|||||||
params.m_bIsCriticalSound = true;
|
params.m_bIsCriticalSound = true;
|
||||||
switch( state )
|
switch( state )
|
||||||
{
|
{
|
||||||
case MemoryCardState_NoCard:
|
case MemoryCardState_NoCard:
|
||||||
case MemoryCardState_Removed:
|
case MemoryCardState_Removed:
|
||||||
if( LastState == MemoryCardState_Ready )
|
if( LastState == MemoryCardState_Ready )
|
||||||
{
|
{
|
||||||
m_soundDisconnect.Play( ¶ms );
|
m_soundDisconnect.Play( ¶ms );
|
||||||
MESSAGEMAN->Broadcast( (MessageID)(Message_CardRemovedP1+p) );
|
MESSAGEMAN->Broadcast( (MessageID)(Message_CardRemovedP1+p) );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MemoryCardState_Ready:
|
case MemoryCardState_Ready:
|
||||||
m_soundReady.Play( ¶ms );
|
m_soundReady.Play( ¶ms );
|
||||||
break;
|
break;
|
||||||
case MemoryCardState_TooLate:
|
case MemoryCardState_TooLate:
|
||||||
m_soundTooLate.Play( ¶ms );
|
m_soundTooLate.Play( ¶ms );
|
||||||
break;
|
break;
|
||||||
case MemoryCardState_Error:
|
case MemoryCardState_Error:
|
||||||
m_soundError.Play( ¶ms );
|
m_soundError.Play( ¶ms );
|
||||||
break;
|
break;
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_State[p] = state;
|
m_State[p] = state;
|
||||||
|
|||||||
+173
-171
@@ -42,23 +42,23 @@ static SortOrder ForceAppropriateSort( PlayMode pm, SortOrder so )
|
|||||||
{
|
{
|
||||||
switch( pm )
|
switch( pm )
|
||||||
{
|
{
|
||||||
// in course modes, force a particular sort
|
// in course modes, force a particular sort
|
||||||
case PLAY_MODE_ONI: return SORT_ONI_COURSES;
|
case PLAY_MODE_ONI: return SORT_ONI_COURSES;
|
||||||
case PLAY_MODE_NONSTOP: return SORT_NONSTOP_COURSES;
|
case PLAY_MODE_NONSTOP: return SORT_NONSTOP_COURSES;
|
||||||
case PLAY_MODE_ENDLESS: return SORT_ENDLESS_COURSES;
|
case PLAY_MODE_ENDLESS: return SORT_ENDLESS_COURSES;
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we're not in a course mode, don't start in a course sort.
|
// If we're not in a course mode, don't start in a course sort.
|
||||||
switch( so )
|
switch( so )
|
||||||
{
|
{
|
||||||
case SORT_ONI_COURSES:
|
case SORT_ONI_COURSES:
|
||||||
case SORT_NONSTOP_COURSES:
|
case SORT_NONSTOP_COURSES:
|
||||||
case SORT_ENDLESS_COURSES:
|
case SORT_ENDLESS_COURSES:
|
||||||
so = SortOrder_Invalid;
|
so = SortOrder_Invalid;
|
||||||
break;
|
default:
|
||||||
|
return so;
|
||||||
}
|
}
|
||||||
|
|
||||||
return so;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MusicWheelItem *MusicWheel::MakeItem()
|
MusicWheelItem *MusicWheel::MakeItem()
|
||||||
@@ -490,7 +490,7 @@ void MusicWheel::BuildWheelItemDatas( vector<MusicWheelItemData *> &arrayWheelIt
|
|||||||
{
|
{
|
||||||
switch( so )
|
switch( so )
|
||||||
{
|
{
|
||||||
case SORT_MODE_MENU:
|
case SORT_MODE_MENU:
|
||||||
{
|
{
|
||||||
arrayWheelItemDatas.clear(); // clear out the previous wheel items
|
arrayWheelItemDatas.clear(); // clear out the previous wheel items
|
||||||
vector<RString> vsNames;
|
vector<RString> vsNames;
|
||||||
@@ -510,22 +510,22 @@ void MusicWheel::BuildWheelItemDatas( vector<MusicWheelItemData *> &arrayWheelIt
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SORT_PREFERRED:
|
case SORT_PREFERRED:
|
||||||
case SORT_ROULETTE:
|
case SORT_ROULETTE:
|
||||||
case SORT_GROUP:
|
case SORT_GROUP:
|
||||||
case SORT_TITLE:
|
case SORT_TITLE:
|
||||||
case SORT_BPM:
|
case SORT_BPM:
|
||||||
case SORT_POPULARITY:
|
case SORT_POPULARITY:
|
||||||
case SORT_TOP_GRADES:
|
case SORT_TOP_GRADES:
|
||||||
case SORT_ARTIST:
|
case SORT_ARTIST:
|
||||||
case SORT_GENRE:
|
case SORT_GENRE:
|
||||||
case SORT_BEGINNER_METER:
|
case SORT_BEGINNER_METER:
|
||||||
case SORT_EASY_METER:
|
case SORT_EASY_METER:
|
||||||
case SORT_MEDIUM_METER:
|
case SORT_MEDIUM_METER:
|
||||||
case SORT_HARD_METER:
|
case SORT_HARD_METER:
|
||||||
case SORT_CHALLENGE_METER:
|
case SORT_CHALLENGE_METER:
|
||||||
case SORT_LENGTH:
|
case SORT_LENGTH:
|
||||||
case SORT_RECENT:
|
case SORT_RECENT:
|
||||||
{
|
{
|
||||||
// Make an array of Song*, then sort them
|
// Make an array of Song*, then sort them
|
||||||
vector<Song*> arraySongs;
|
vector<Song*> arraySongs;
|
||||||
@@ -536,72 +536,72 @@ void MusicWheel::BuildWheelItemDatas( vector<MusicWheelItemData *> &arrayWheelIt
|
|||||||
// sort the songs
|
// sort the songs
|
||||||
switch( so )
|
switch( so )
|
||||||
{
|
{
|
||||||
case SORT_PREFERRED:
|
case SORT_PREFERRED:
|
||||||
// obey order specified by the preferred sort list
|
// obey order specified by the preferred sort list
|
||||||
break;
|
break;
|
||||||
case SORT_ROULETTE:
|
case SORT_ROULETTE:
|
||||||
{
|
{
|
||||||
StepsType st;
|
StepsType st;
|
||||||
Difficulty dc;
|
Difficulty dc;
|
||||||
SongUtil::GetStepsTypeAndDifficultyFromSortOrder( SORT_EASY_METER, st, dc );
|
SongUtil::GetStepsTypeAndDifficultyFromSortOrder( SORT_EASY_METER, st, dc );
|
||||||
SongUtil::SortSongPointerArrayByStepsTypeAndMeter( arraySongs, st, dc );
|
SongUtil::SortSongPointerArrayByStepsTypeAndMeter( arraySongs, st, dc );
|
||||||
if( (bool)PREFSMAN->m_bPreferredSortUsesGroups )
|
if( (bool)PREFSMAN->m_bPreferredSortUsesGroups )
|
||||||
stable_sort( arraySongs.begin(), arraySongs.end(), SongUtil::CompareSongPointersByGroup );
|
stable_sort( arraySongs.begin(), arraySongs.end(), SongUtil::CompareSongPointersByGroup );
|
||||||
bUseSections = false;
|
bUseSections = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SORT_GROUP:
|
case SORT_GROUP:
|
||||||
SongUtil::SortSongPointerArrayByGroupAndTitle( arraySongs );
|
SongUtil::SortSongPointerArrayByGroupAndTitle( arraySongs );
|
||||||
if(USE_SECTIONS_WITH_PREFERRED_GROUP)
|
if(USE_SECTIONS_WITH_PREFERRED_GROUP)
|
||||||
bUseSections = true;
|
bUseSections = true;
|
||||||
else
|
else
|
||||||
bUseSections = GAMESTATE->m_sPreferredSongGroup == GROUP_ALL;
|
bUseSections = GAMESTATE->m_sPreferredSongGroup == GROUP_ALL;
|
||||||
break;
|
break;
|
||||||
case SORT_TITLE:
|
case SORT_TITLE:
|
||||||
SongUtil::SortSongPointerArrayByTitle( arraySongs );
|
SongUtil::SortSongPointerArrayByTitle( arraySongs );
|
||||||
break;
|
break;
|
||||||
case SORT_BPM:
|
case SORT_BPM:
|
||||||
SongUtil::SortSongPointerArrayByBPM( arraySongs );
|
SongUtil::SortSongPointerArrayByBPM( arraySongs );
|
||||||
break;
|
break;
|
||||||
case SORT_POPULARITY:
|
case SORT_POPULARITY:
|
||||||
if( (int) arraySongs.size() > MOST_PLAYED_SONGS_TO_SHOW )
|
if( (int) arraySongs.size() > MOST_PLAYED_SONGS_TO_SHOW )
|
||||||
arraySongs.erase( arraySongs.begin()+MOST_PLAYED_SONGS_TO_SHOW, arraySongs.end() );
|
arraySongs.erase( arraySongs.begin()+MOST_PLAYED_SONGS_TO_SHOW, arraySongs.end() );
|
||||||
bUseSections = false;
|
bUseSections = false;
|
||||||
break;
|
break;
|
||||||
case SORT_TOP_GRADES:
|
case SORT_TOP_GRADES:
|
||||||
SongUtil::SortSongPointerArrayByGrades( arraySongs, true );
|
SongUtil::SortSongPointerArrayByGrades( arraySongs, true );
|
||||||
break;
|
break;
|
||||||
case SORT_ARTIST:
|
case SORT_ARTIST:
|
||||||
SongUtil::SortSongPointerArrayByArtist( arraySongs );
|
SongUtil::SortSongPointerArrayByArtist( arraySongs );
|
||||||
break;
|
break;
|
||||||
case SORT_GENRE:
|
case SORT_GENRE:
|
||||||
SongUtil::SortSongPointerArrayByGenre( arraySongs );
|
SongUtil::SortSongPointerArrayByGenre( arraySongs );
|
||||||
break;
|
break;
|
||||||
case SORT_LENGTH:
|
case SORT_LENGTH:
|
||||||
SongUtil::SortSongPointerArrayByLength( arraySongs );
|
SongUtil::SortSongPointerArrayByLength( arraySongs );
|
||||||
break;
|
break;
|
||||||
case SORT_RECENT:
|
case SORT_RECENT:
|
||||||
SongUtil::SortByMostRecentlyPlayedForMachine( arraySongs );
|
SongUtil::SortByMostRecentlyPlayedForMachine( arraySongs );
|
||||||
if( (int) arraySongs.size() > RECENT_SONGS_TO_SHOW )
|
if( (int) arraySongs.size() > RECENT_SONGS_TO_SHOW )
|
||||||
arraySongs.erase( arraySongs.begin()+RECENT_SONGS_TO_SHOW, arraySongs.end() );
|
arraySongs.erase( arraySongs.begin()+RECENT_SONGS_TO_SHOW, arraySongs.end() );
|
||||||
bUseSections = false;
|
bUseSections = false;
|
||||||
break;
|
break;
|
||||||
case SORT_BEGINNER_METER:
|
case SORT_BEGINNER_METER:
|
||||||
case SORT_EASY_METER:
|
case SORT_EASY_METER:
|
||||||
case SORT_MEDIUM_METER:
|
case SORT_MEDIUM_METER:
|
||||||
case SORT_HARD_METER:
|
case SORT_HARD_METER:
|
||||||
case SORT_CHALLENGE_METER:
|
case SORT_CHALLENGE_METER:
|
||||||
case SORT_DOUBLE_EASY_METER:
|
case SORT_DOUBLE_EASY_METER:
|
||||||
case SORT_DOUBLE_MEDIUM_METER:
|
case SORT_DOUBLE_MEDIUM_METER:
|
||||||
case SORT_DOUBLE_HARD_METER:
|
case SORT_DOUBLE_HARD_METER:
|
||||||
case SORT_DOUBLE_CHALLENGE_METER:
|
case SORT_DOUBLE_CHALLENGE_METER:
|
||||||
StepsType st;
|
StepsType st;
|
||||||
Difficulty dc;
|
Difficulty dc;
|
||||||
SongUtil::GetStepsTypeAndDifficultyFromSortOrder( so, st, dc );
|
SongUtil::GetStepsTypeAndDifficultyFromSortOrder( so, st, dc );
|
||||||
SongUtil::SortSongPointerArrayByStepsTypeAndMeter( arraySongs, st, dc );
|
SongUtil::SortSongPointerArrayByStepsTypeAndMeter( arraySongs, st, dc );
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ASSERT(0); // unhandled SortOrder
|
FAIL_M("Unhandled sort order! Aborting...");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build an array of WheelItemDatas from the sorted list of Song*'s
|
// Build an array of WheelItemDatas from the sorted list of Song*'s
|
||||||
@@ -610,13 +610,15 @@ void MusicWheel::BuildWheelItemDatas( vector<MusicWheelItemData *> &arrayWheelIt
|
|||||||
|
|
||||||
switch( PREFSMAN->m_MusicWheelUsesSections )
|
switch( PREFSMAN->m_MusicWheelUsesSections )
|
||||||
{
|
{
|
||||||
case MusicWheelUsesSections_NEVER:
|
case MusicWheelUsesSections_NEVER:
|
||||||
bUseSections = false;
|
|
||||||
break;
|
|
||||||
case MusicWheelUsesSections_ABC_ONLY:
|
|
||||||
if( so != SORT_TITLE && so != SORT_GROUP )
|
|
||||||
bUseSections = false;
|
bUseSections = false;
|
||||||
break;
|
break;
|
||||||
|
case MusicWheelUsesSections_ABC_ONLY:
|
||||||
|
if( so != SORT_TITLE && so != SORT_GROUP )
|
||||||
|
bUseSections = false;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( bUseSections )
|
if( bUseSections )
|
||||||
@@ -630,13 +632,13 @@ void MusicWheel::BuildWheelItemDatas( vector<MusicWheelItemData *> &arrayWheelIt
|
|||||||
/* We're using sections, so use the section name as the top-level sort. */
|
/* We're using sections, so use the section name as the top-level sort. */
|
||||||
switch( so )
|
switch( so )
|
||||||
{
|
{
|
||||||
case SORT_PREFERRED:
|
case SORT_PREFERRED:
|
||||||
case SORT_TOP_GRADES:
|
case SORT_TOP_GRADES:
|
||||||
case SORT_BPM:
|
case SORT_BPM:
|
||||||
break; // don't sort by section
|
break; // don't sort by section
|
||||||
default:
|
default:
|
||||||
SongUtil::SortSongPointerArrayBySectionName(arraySongs, so);
|
SongUtil::SortSongPointerArrayBySectionName(arraySongs, so);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -731,10 +733,10 @@ void MusicWheel::BuildWheelItemDatas( vector<MusicWheelItemData *> &arrayWheelIt
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SORT_ALL_COURSES:
|
case SORT_ALL_COURSES:
|
||||||
case SORT_NONSTOP_COURSES:
|
case SORT_NONSTOP_COURSES:
|
||||||
case SORT_ONI_COURSES:
|
case SORT_ONI_COURSES:
|
||||||
case SORT_ENDLESS_COURSES:
|
case SORT_ENDLESS_COURSES:
|
||||||
{
|
{
|
||||||
bool bOnlyPreferred = PREFSMAN->m_CourseSortOrder == COURSE_SORT_PREFERRED;
|
bool bOnlyPreferred = PREFSMAN->m_CourseSortOrder == COURSE_SORT_PREFERRED;
|
||||||
|
|
||||||
@@ -769,21 +771,21 @@ void MusicWheel::BuildWheelItemDatas( vector<MusicWheelItemData *> &arrayWheelIt
|
|||||||
|
|
||||||
switch( PREFSMAN->m_CourseSortOrder )
|
switch( PREFSMAN->m_CourseSortOrder )
|
||||||
{
|
{
|
||||||
case COURSE_SORT_SONGS:
|
case COURSE_SORT_SONGS:
|
||||||
CourseUtil::SortCoursePointerArrayByDifficulty( apCourses );
|
CourseUtil::SortCoursePointerArrayByDifficulty( apCourses );
|
||||||
break;
|
break;
|
||||||
case COURSE_SORT_PREFERRED:
|
case COURSE_SORT_PREFERRED:
|
||||||
break;
|
break;
|
||||||
case COURSE_SORT_METER:
|
case COURSE_SORT_METER:
|
||||||
CourseUtil::SortCoursePointerArrayByAvgDifficulty( apCourses );
|
CourseUtil::SortCoursePointerArrayByAvgDifficulty( apCourses );
|
||||||
break;
|
break;
|
||||||
case COURSE_SORT_METER_SUM:
|
case COURSE_SORT_METER_SUM:
|
||||||
CourseUtil::SortCoursePointerArrayByTotalDifficulty( apCourses );
|
CourseUtil::SortCoursePointerArrayByTotalDifficulty( apCourses );
|
||||||
break;
|
break;
|
||||||
case COURSE_SORT_RANK:
|
case COURSE_SORT_RANK:
|
||||||
CourseUtil::SortCoursePointerArrayByRanking( apCourses );
|
CourseUtil::SortCoursePointerArrayByRanking( apCourses );
|
||||||
break;
|
break;
|
||||||
default: ASSERT(0);
|
default: FAIL_M("Impossible to sort the courses! Aborting...");
|
||||||
}
|
}
|
||||||
|
|
||||||
// since we can't agree, make it an option
|
// since we can't agree, make it an option
|
||||||
@@ -810,9 +812,10 @@ void MusicWheel::BuildWheelItemDatas( vector<MusicWheelItemData *> &arrayWheelIt
|
|||||||
{
|
{
|
||||||
switch( pCourse->GetPlayMode() )
|
switch( pCourse->GetPlayMode() )
|
||||||
{
|
{
|
||||||
case PLAY_MODE_ONI: sThisSection = "Oni"; break;
|
case PLAY_MODE_ONI: sThisSection = "Oni"; break;
|
||||||
case PLAY_MODE_NONSTOP: sThisSection = "Nonstop"; break;
|
case PLAY_MODE_NONSTOP: sThisSection = "Nonstop"; break;
|
||||||
case PLAY_MODE_ENDLESS: sThisSection = "Endless"; break;
|
case PLAY_MODE_ENDLESS: sThisSection = "Endless"; break;
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -833,6 +836,8 @@ void MusicWheel::BuildWheelItemDatas( vector<MusicWheelItemData *> &arrayWheelIt
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// init music status icons
|
// init music status icons
|
||||||
@@ -1227,23 +1232,24 @@ bool MusicWheel::Select() // return true if this selection ends the screen
|
|||||||
|
|
||||||
switch( m_WheelState )
|
switch( m_WheelState )
|
||||||
{
|
{
|
||||||
case STATE_FLYING_OFF_BEFORE_NEXT_SORT:
|
case STATE_FLYING_OFF_BEFORE_NEXT_SORT:
|
||||||
case STATE_ROULETTE_SLOWING_DOWN:
|
case STATE_ROULETTE_SLOWING_DOWN:
|
||||||
return false;
|
return false;
|
||||||
case STATE_ROULETTE_SPINNING:
|
case STATE_ROULETTE_SPINNING:
|
||||||
m_WheelState = STATE_ROULETTE_SLOWING_DOWN;
|
m_WheelState = STATE_ROULETTE_SLOWING_DOWN;
|
||||||
m_iSwitchesLeftInSpinDown = ROULETTE_SLOW_DOWN_SWITCHES/2+1 + RandomInt( ROULETTE_SLOW_DOWN_SWITCHES/2 );
|
m_iSwitchesLeftInSpinDown = ROULETTE_SLOW_DOWN_SWITCHES/2+1 + RandomInt( ROULETTE_SLOW_DOWN_SWITCHES/2 );
|
||||||
m_fTimeLeftInState = 0.1f;
|
m_fTimeLeftInState = 0.1f;
|
||||||
return false;
|
return false;
|
||||||
case STATE_RANDOM_SPINNING:
|
case STATE_RANDOM_SPINNING:
|
||||||
m_fPositionOffsetFromSelection = max(m_fPositionOffsetFromSelection, 0.3f);
|
m_fPositionOffsetFromSelection = max(m_fPositionOffsetFromSelection, 0.3f);
|
||||||
m_WheelState = STATE_LOCKED;
|
m_WheelState = STATE_LOCKED;
|
||||||
SCREENMAN->PlayStartSound();
|
SCREENMAN->PlayStartSound();
|
||||||
m_fLockedWheelVelocity = 0;
|
m_fLockedWheelVelocity = 0;
|
||||||
// Set m_Moving to zero to stop the sounds from playing.
|
// Set m_Moving to zero to stop the sounds from playing.
|
||||||
m_Moving = 0;
|
m_Moving = 0;
|
||||||
SCREENMAN->PostMessageToTopScreen( SM_SongChanged, 0 );
|
SCREENMAN->PostMessageToTopScreen( SM_SongChanged, 0 );
|
||||||
return true;
|
return true;
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !WheelBase::Select() )
|
if( !WheelBase::Select() )
|
||||||
@@ -1251,29 +1257,25 @@ bool MusicWheel::Select() // return true if this selection ends the screen
|
|||||||
|
|
||||||
switch( m_CurWheelItemData[m_iSelection]->m_Type )
|
switch( m_CurWheelItemData[m_iSelection]->m_Type )
|
||||||
{
|
{
|
||||||
case TYPE_ROULETTE:
|
case TYPE_ROULETTE:
|
||||||
StartRoulette();
|
StartRoulette();
|
||||||
return false;
|
|
||||||
case TYPE_RANDOM:
|
|
||||||
StartRandom();
|
|
||||||
return false;
|
|
||||||
case TYPE_SONG:
|
|
||||||
case TYPE_COURSE:
|
|
||||||
case TYPE_PORTAL:
|
|
||||||
break;
|
|
||||||
case TYPE_SORT:
|
|
||||||
GetCurWheelItemData(m_iSelection)->m_pAction->ApplyToAllPlayers();
|
|
||||||
ChangeSort( GAMESTATE->m_PreferredSortOrder );
|
|
||||||
m_sLastModeMenuItem = GetCurWheelItemData(m_iSelection)->m_pAction->m_sName;
|
|
||||||
return false;
|
|
||||||
case TYPE_CUSTOM:
|
|
||||||
GetCurWheelItemData(m_iSelection)->m_pAction->ApplyToAllPlayers();
|
|
||||||
if( GetCurWheelItemData(m_iSelection)->m_pAction->m_sScreen != "" )
|
|
||||||
return true;
|
|
||||||
else
|
|
||||||
return false;
|
return false;
|
||||||
|
case TYPE_RANDOM:
|
||||||
|
StartRandom();
|
||||||
|
return false;
|
||||||
|
case TYPE_SORT:
|
||||||
|
GetCurWheelItemData(m_iSelection)->m_pAction->ApplyToAllPlayers();
|
||||||
|
ChangeSort( GAMESTATE->m_PreferredSortOrder );
|
||||||
|
m_sLastModeMenuItem = GetCurWheelItemData(m_iSelection)->m_pAction->m_sName;
|
||||||
|
return false;
|
||||||
|
case TYPE_CUSTOM:
|
||||||
|
GetCurWheelItemData(m_iSelection)->m_pAction->ApplyToAllPlayers();
|
||||||
|
if( GetCurWheelItemData(m_iSelection)->m_pAction->m_sScreen != "" )
|
||||||
|
return true;
|
||||||
|
else
|
||||||
|
return false;
|
||||||
|
default: return true;
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MusicWheel::StartRoulette()
|
void MusicWheel::StartRoulette()
|
||||||
@@ -1517,11 +1519,11 @@ Song* MusicWheel::GetSelectedSong()
|
|||||||
{
|
{
|
||||||
switch( m_CurWheelItemData[m_iSelection]->m_Type )
|
switch( m_CurWheelItemData[m_iSelection]->m_Type )
|
||||||
{
|
{
|
||||||
case TYPE_PORTAL:
|
case TYPE_PORTAL:
|
||||||
return GetPreferredSelectionForRandomOrPortal();
|
return GetPreferredSelectionForRandomOrPortal();
|
||||||
|
default:
|
||||||
|
return GetCurWheelItemData(m_iSelection)->m_pSong;
|
||||||
}
|
}
|
||||||
|
|
||||||
return GetCurWheelItemData(m_iSelection)->m_pSong;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Find a random song. If possible, find one that has the preferred difficulties of
|
/* Find a random song. If possible, find one that has the preferred difficulties of
|
||||||
|
|||||||
+6
-4
@@ -547,10 +547,12 @@ bool NoteData::RowNeedsAtLeastSimultaneousPresses( int iMinSimultaneousPresses,
|
|||||||
const TapNote &tn = GetTapNote(t, row);
|
const TapNote &tn = GetTapNote(t, row);
|
||||||
switch( tn.type )
|
switch( tn.type )
|
||||||
{
|
{
|
||||||
case TapNote::mine:
|
case TapNote::mine:
|
||||||
case TapNote::empty:
|
case TapNote::empty:
|
||||||
case TapNote::fake:
|
case TapNote::fake:
|
||||||
continue; // skip these types - they don't count
|
case TapNote::lift: // you don't "press" on a lift.
|
||||||
|
continue; // skip these types - they don't count
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
++iNumNotesThisIndex;
|
++iNumNotesThisIndex;
|
||||||
}
|
}
|
||||||
|
|||||||
+11
-9
@@ -800,11 +800,12 @@ RadarStats CalculateRadarStatsFast( const NoteData &in, RadarStats &out )
|
|||||||
const TapNote &tn = in.GetTapNote(t, r);
|
const TapNote &tn = in.GetTapNote(t, r);
|
||||||
switch( tn.type )
|
switch( tn.type )
|
||||||
{
|
{
|
||||||
case TapNote::mine:
|
case TapNote::mine:
|
||||||
case TapNote::empty:
|
case TapNote::empty:
|
||||||
case TapNote::fake:
|
case TapNote::fake:
|
||||||
case TapNote::autoKeysound:
|
case TapNote::autoKeysound:
|
||||||
continue; // skip these types - they don't count
|
continue; // skip these types - they don't count
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( (itr = simultaneousMap.find(r)) == simultaneousMap.end() )
|
if( (itr = simultaneousMap.find(r)) == simultaneousMap.end() )
|
||||||
@@ -830,10 +831,11 @@ RadarStats CalculateRadarStatsFast( const NoteData &in, RadarStats &out )
|
|||||||
{
|
{
|
||||||
switch( in.GetTapNote(t, rr).type )
|
switch( in.GetTapNote(t, rr).type )
|
||||||
{
|
{
|
||||||
case TapNote::mine:
|
case TapNote::mine:
|
||||||
case TapNote::empty:
|
case TapNote::empty:
|
||||||
case TapNote::fake:
|
case TapNote::fake:
|
||||||
continue; // skip these types - they don't count
|
continue; // skip these types - they don't count
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
if( (itr = simultaneousMap.find(rr)) == simultaneousMap.end() )
|
if( (itr = simultaneousMap.find(rr)) == simultaneousMap.end() )
|
||||||
simultaneousMap[rr] = 1;
|
simultaneousMap[rr] = 1;
|
||||||
|
|||||||
@@ -1265,6 +1265,7 @@ void NoteField::DrawPrimitives()
|
|||||||
//if (tn.subType == TapNote::hold_head_roll)
|
//if (tn.subType == TapNote::hold_head_roll)
|
||||||
continue; // skip
|
continue; // skip
|
||||||
}
|
}
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Don't draw hidden (fully judged) steps.
|
// Don't draw hidden (fully judged) steps.
|
||||||
|
|||||||
+20
-10
@@ -217,16 +217,26 @@ inline const RString TapNoteTypeToString( TapNote::Type tn )
|
|||||||
{
|
{
|
||||||
switch( tn )
|
switch( tn )
|
||||||
{
|
{
|
||||||
case TapNote::empty: return RString("empty");
|
case TapNote::empty:
|
||||||
case TapNote::tap: return RString("tap");
|
return RString("empty");
|
||||||
case TapNote::hold_head: return RString("hold_head");
|
case TapNote::tap:
|
||||||
case TapNote::hold_tail: return RString("hold_tail");
|
return RString("tap");
|
||||||
case TapNote::mine: return RString("mine");
|
case TapNote::hold_head:
|
||||||
case TapNote::lift: return RString("lift");
|
return RString("hold_head");
|
||||||
case TapNote::attack: return RString("attack");
|
case TapNote::hold_tail:
|
||||||
case TapNote::autoKeysound: return RString("autoKeysound");
|
return RString("hold_tail");
|
||||||
case TapNote::fake: return RString("fake");
|
case TapNote::mine:
|
||||||
default: return RString();
|
return RString("mine");
|
||||||
|
case TapNote::lift:
|
||||||
|
return RString("lift");
|
||||||
|
case TapNote::attack:
|
||||||
|
return RString("attack");
|
||||||
|
case TapNote::autoKeysound:
|
||||||
|
return RString("autoKeysound");
|
||||||
|
case TapNote::fake:
|
||||||
|
return RString("fake");
|
||||||
|
default:
|
||||||
|
return RString("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1111,9 +1111,9 @@ bool BMSLoader::LoadNoteDataFromSimfile( const RString & cachePath, Steps & out
|
|||||||
if( commonSubstring == "" )
|
if( commonSubstring == "" )
|
||||||
{
|
{
|
||||||
copy->SetDifficulty(Difficulty_Medium);
|
copy->SetDifficulty(Difficulty_Medium);
|
||||||
RString sTag;
|
RString localTag;
|
||||||
if (GetTagFromMap(BMSData[0], "#title#", sTag))
|
if (GetTagFromMap(BMSData[0], "#title#", localTag))
|
||||||
SearchForDifficulty(sTag, copy);
|
SearchForDifficulty(localTag, copy);
|
||||||
}
|
}
|
||||||
ReadGlobalTags( BMSData[0], dummy );
|
ReadGlobalTags( BMSData[0], dummy );
|
||||||
if( commonSubstring.size() > 2 && commonSubstring[commonSubstring.size() - 2] == ' ' )
|
if( commonSubstring.size() > 2 && commonSubstring[commonSubstring.size() - 2] == ' ' )
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ static void Deserialize(TimingSegment &seg_, const Json::Value &root)
|
|||||||
static_cast<StopSegment *>(seg)->SetPause(fStop);
|
static_cast<StopSegment *>(seg)->SetPause(fStop);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
default: break; // The rest are unused.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -817,8 +817,8 @@ skip_track:
|
|||||||
// Check for termination of a sustain note
|
// Check for termination of a sustain note
|
||||||
switch( midiEventType )
|
switch( midiEventType )
|
||||||
{
|
{
|
||||||
case note_off:
|
case note_off:
|
||||||
case note_on:
|
case note_on:
|
||||||
if( bNonTerminatedNote )
|
if( bNonTerminatedNote )
|
||||||
{
|
{
|
||||||
if( length >= 240 )
|
if( length >= 240 )
|
||||||
@@ -833,14 +833,15 @@ skip_track:
|
|||||||
|
|
||||||
bNonTerminatedNote = false;
|
bNonTerminatedNote = false;
|
||||||
bNoteHandled = true;
|
bNoteHandled = true;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
switch( midiEventType )
|
switch( midiEventType )
|
||||||
{
|
{
|
||||||
case note_on:
|
case note_on:
|
||||||
{
|
{
|
||||||
TapNote tn = TAP_ORIGINAL_TAP;
|
TapNote tn = TAP_ORIGINAL_TAP;
|
||||||
|
|
||||||
@@ -867,7 +868,9 @@ skip_track:
|
|||||||
|
|
||||||
bNonTerminatedNote = true;
|
bNonTerminatedNote = true;
|
||||||
bNoteHandled = true;
|
bNoteHandled = true;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
countOfLastNote = count;
|
countOfLastNote = count;
|
||||||
|
|||||||
@@ -123,9 +123,10 @@ static RString NotesToDWIString( const TapNote tnCols[6] )
|
|||||||
{
|
{
|
||||||
switch( tnCols[col].type )
|
switch( tnCols[col].type )
|
||||||
{
|
{
|
||||||
case TapNote::empty:
|
case TapNote::empty:
|
||||||
case TapNote::mine:
|
case TapNote::mine:
|
||||||
continue;
|
continue;
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( tnCols[col].type == TapNote::hold_head )
|
if( tnCols[col].type == TapNote::hold_head )
|
||||||
|
|||||||
+17
-13
@@ -426,15 +426,18 @@ void OptionRow::AfterImportOptions( PlayerNumber pn )
|
|||||||
|
|
||||||
switch( m_pHand->m_Def.m_selectType )
|
switch( m_pHand->m_Def.m_selectType )
|
||||||
{
|
{
|
||||||
case SELECT_ONE:
|
case SELECT_ONE:
|
||||||
// Make sure the row actually has a selection.
|
|
||||||
int iSelection = GetOneSelection(pn, true);
|
|
||||||
if( iSelection == -1 )
|
|
||||||
{
|
{
|
||||||
ASSERT( !m_vbSelected[pn].empty() );
|
// Make sure the row actually has a selection.
|
||||||
m_vbSelected[pn][0] = true;
|
int iSelection = GetOneSelection(pn, true);
|
||||||
|
if( iSelection == -1 )
|
||||||
|
{
|
||||||
|
ASSERT( !m_vbSelected[pn].empty() );
|
||||||
|
m_vbSelected[pn][0] = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResetFocusFromSelection( pn );
|
ResetFocusFromSelection( pn );
|
||||||
@@ -503,7 +506,7 @@ void OptionRow::UpdateText( PlayerNumber p )
|
|||||||
{
|
{
|
||||||
switch( m_pHand->m_Def.m_layoutType )
|
switch( m_pHand->m_Def.m_layoutType )
|
||||||
{
|
{
|
||||||
case LAYOUT_SHOW_ONE_IN_ROW:
|
case LAYOUT_SHOW_ONE_IN_ROW:
|
||||||
{
|
{
|
||||||
unsigned pn = m_pHand->m_Def.m_bOneChoiceForAllPlayers ? 0 : p;
|
unsigned pn = m_pHand->m_Def.m_bOneChoiceForAllPlayers ? 0 : p;
|
||||||
int iChoiceWithFocus = m_iChoiceInRowWithFocus[pn];
|
int iChoiceWithFocus = m_iChoiceInRowWithFocus[pn];
|
||||||
@@ -519,7 +522,7 @@ void OptionRow::UpdateText( PlayerNumber p )
|
|||||||
|
|
||||||
m_textItems[index]->SetText( sText );
|
m_textItems[index]->SetText( sText );
|
||||||
}
|
}
|
||||||
break;
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -757,10 +760,11 @@ void OptionRow::ResetFocusFromSelection( PlayerNumber pn )
|
|||||||
int iSelection = -1;
|
int iSelection = -1;
|
||||||
switch( m_pHand->m_Def.m_selectType )
|
switch( m_pHand->m_Def.m_selectType )
|
||||||
{
|
{
|
||||||
case SELECT_ONE:
|
case SELECT_ONE:
|
||||||
// Import the focus from the selected option.
|
// Import the focus from the selected option.
|
||||||
iSelection = GetOneSelection( pn, true );
|
iSelection = GetOneSelection( pn, true );
|
||||||
break;
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// HACK: Set focus to one item in the row, which is "go down"
|
// HACK: Set focus to one item in the row, which is "go down"
|
||||||
|
|||||||
+65
-59
@@ -137,13 +137,14 @@ void PaneDisplay::SetContent( PaneCategory c )
|
|||||||
{
|
{
|
||||||
switch( c )
|
switch( c )
|
||||||
{
|
{
|
||||||
case PaneCategory_MachineHighName:
|
case PaneCategory_MachineHighName:
|
||||||
str = EMPTY_MACHINE_HIGH_SCORE_NAME;
|
str = EMPTY_MACHINE_HIGH_SCORE_NAME;
|
||||||
break;
|
break;
|
||||||
case PaneCategory_MachineHighScore:
|
case PaneCategory_MachineHighScore:
|
||||||
case PaneCategory_ProfileHighScore:
|
case PaneCategory_ProfileHighScore:
|
||||||
str = NOT_AVAILABLE;
|
str = NOT_AVAILABLE;
|
||||||
break;
|
break;
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -157,13 +158,14 @@ void PaneDisplay::SetContent( PaneCategory c )
|
|||||||
{
|
{
|
||||||
switch( c )
|
switch( c )
|
||||||
{
|
{
|
||||||
case PaneCategory_MachineHighName:
|
case PaneCategory_MachineHighName:
|
||||||
str = EMPTY_MACHINE_HIGH_SCORE_NAME;
|
str = EMPTY_MACHINE_HIGH_SCORE_NAME;
|
||||||
break;
|
break;
|
||||||
case PaneCategory_MachineHighScore:
|
case PaneCategory_MachineHighScore:
|
||||||
case PaneCategory_ProfileHighScore:
|
case PaneCategory_ProfileHighScore:
|
||||||
str = NOT_AVAILABLE;
|
str = NOT_AVAILABLE;
|
||||||
break;
|
break;
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -184,8 +186,9 @@ void PaneDisplay::SetContent( PaneCategory c )
|
|||||||
ProfileSlot slot = ProfileSlot_Machine;
|
ProfileSlot slot = ProfileSlot_Machine;
|
||||||
switch( c )
|
switch( c )
|
||||||
{
|
{
|
||||||
case PaneCategory_ProfileHighScore:
|
case PaneCategory_ProfileHighScore:
|
||||||
slot = (ProfileSlot) m_PlayerNumber;
|
slot = (ProfileSlot) m_PlayerNumber;
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( pSteps )
|
if( pSteps )
|
||||||
@@ -201,55 +204,58 @@ void PaneDisplay::SetContent( PaneCategory c )
|
|||||||
|
|
||||||
switch( c )
|
switch( c )
|
||||||
{
|
{
|
||||||
case PaneCategory_NumSteps: val = rv[RadarCategory_TapsAndHolds]; break;
|
case PaneCategory_NumSteps: val = rv[RadarCategory_TapsAndHolds]; break;
|
||||||
case PaneCategory_Jumps: val = rv[RadarCategory_Jumps]; break;
|
case PaneCategory_Jumps: val = rv[RadarCategory_Jumps]; break;
|
||||||
case PaneCategory_Holds: val = rv[RadarCategory_Holds]; break;
|
case PaneCategory_Holds: val = rv[RadarCategory_Holds]; break;
|
||||||
case PaneCategory_Rolls: val = rv[RadarCategory_Rolls]; break;
|
case PaneCategory_Rolls: val = rv[RadarCategory_Rolls]; break;
|
||||||
case PaneCategory_Mines: val = rv[RadarCategory_Mines]; break;
|
case PaneCategory_Mines: val = rv[RadarCategory_Mines]; break;
|
||||||
case PaneCategory_Hands: val = rv[RadarCategory_Hands]; break;
|
case PaneCategory_Hands: val = rv[RadarCategory_Hands]; break;
|
||||||
case PaneCategory_Lifts: val = rv[RadarCategory_Lifts]; break;
|
case PaneCategory_Lifts: val = rv[RadarCategory_Lifts]; break;
|
||||||
case PaneCategory_Fakes: val = rv[RadarCategory_Fakes]; break;
|
case PaneCategory_Fakes: val = rv[RadarCategory_Fakes]; break;
|
||||||
case PaneCategory_ProfileHighScore:
|
case PaneCategory_ProfileHighScore:
|
||||||
case PaneCategory_MachineHighName: // set val for color
|
case PaneCategory_MachineHighName: // set val for color
|
||||||
case PaneCategory_MachineHighScore:
|
case PaneCategory_MachineHighScore:
|
||||||
CHECKPOINT;
|
CHECKPOINT;
|
||||||
val = pHSL->GetTopScore().GetPercentDP();
|
val = pHSL->GetTopScore().GetPercentDP();
|
||||||
break;
|
break;
|
||||||
|
default: break;
|
||||||
};
|
};
|
||||||
|
|
||||||
if( val != RADAR_VAL_UNKNOWN )
|
if( val != RADAR_VAL_UNKNOWN )
|
||||||
{
|
{
|
||||||
switch( c )
|
switch( c )
|
||||||
{
|
{
|
||||||
case PaneCategory_MachineHighName:
|
case PaneCategory_MachineHighName:
|
||||||
if( pHSL->vHighScores.empty() )
|
if( pHSL->vHighScores.empty() )
|
||||||
{
|
{
|
||||||
str = EMPTY_MACHINE_HIGH_SCORE_NAME;
|
str = EMPTY_MACHINE_HIGH_SCORE_NAME;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
str = pHSL->GetTopScore().GetName();
|
str = pHSL->GetTopScore().GetName();
|
||||||
if( str.empty() )
|
if( str.empty() )
|
||||||
str = "????";
|
str = "????";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PaneCategory_MachineHighScore:
|
case PaneCategory_MachineHighScore:
|
||||||
case PaneCategory_ProfileHighScore:
|
case PaneCategory_ProfileHighScore:
|
||||||
// Don't show or save machine high scores for edits loaded from a player profile.
|
// Don't show or save machine high scores for edits loaded from a player profile.
|
||||||
if( bIsPlayerEdit )
|
if( bIsPlayerEdit )
|
||||||
str = NOT_AVAILABLE;
|
str = NOT_AVAILABLE;
|
||||||
else
|
else
|
||||||
str = PlayerStageStats::FormatPercentScore( val );
|
str = PlayerStageStats::FormatPercentScore( val );
|
||||||
break;
|
break;
|
||||||
case PaneCategory_NumSteps:
|
case PaneCategory_NumSteps:
|
||||||
case PaneCategory_Jumps:
|
case PaneCategory_Jumps:
|
||||||
case PaneCategory_Holds:
|
case PaneCategory_Holds:
|
||||||
case PaneCategory_Rolls:
|
case PaneCategory_Rolls:
|
||||||
case PaneCategory_Mines:
|
case PaneCategory_Mines:
|
||||||
case PaneCategory_Hands:
|
case PaneCategory_Hands:
|
||||||
case PaneCategory_Lifts:
|
case PaneCategory_Lifts:
|
||||||
case PaneCategory_Fakes:
|
case PaneCategory_Fakes:
|
||||||
str = ssprintf( COUNT_FORMAT.GetValue(), val );
|
str = ssprintf( COUNT_FORMAT.GetValue(), val );
|
||||||
|
break;
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+33
-27
@@ -628,8 +628,8 @@ void Player::Load()
|
|||||||
|
|
||||||
switch( GAMESTATE->m_PlayMode )
|
switch( GAMESTATE->m_PlayMode )
|
||||||
{
|
{
|
||||||
case PLAY_MODE_RAVE:
|
case PLAY_MODE_RAVE:
|
||||||
case PLAY_MODE_BATTLE:
|
case PLAY_MODE_BATTLE:
|
||||||
{
|
{
|
||||||
// ugly, ugly, ugly. Works only w/ dance.
|
// ugly, ugly, ugly. Works only w/ dance.
|
||||||
// Why does this work only with dance? - Steve
|
// Why does this work only with dance? - Steve
|
||||||
@@ -659,8 +659,9 @@ void Player::Load()
|
|||||||
count++;
|
count++;
|
||||||
count %= 4;
|
count %= 4;
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
int iDrawDistanceAfterTargetsPixels = GAMESTATE->IsEditing() ? -100 : DRAW_DISTANCE_AFTER_TARGET_PIXELS;
|
int iDrawDistanceAfterTargetsPixels = GAMESTATE->IsEditing() ? -100 : DRAW_DISTANCE_AFTER_TARGET_PIXELS;
|
||||||
@@ -2879,41 +2880,46 @@ void Player::CrossedRows( int iLastRowCrossed, const RageTimer &now )
|
|||||||
int iTrack = iter.Track();
|
int iTrack = iter.Track();
|
||||||
switch( tn.type )
|
switch( tn.type )
|
||||||
{
|
{
|
||||||
case TapNote::hold_head:
|
case TapNote::hold_head:
|
||||||
tn.HoldResult.fLife = INITIAL_HOLD_LIFE;
|
|
||||||
if( !REQUIRE_STEP_ON_HOLD_HEADS )
|
|
||||||
{
|
{
|
||||||
|
tn.HoldResult.fLife = INITIAL_HOLD_LIFE;
|
||||||
|
if( !REQUIRE_STEP_ON_HOLD_HEADS )
|
||||||
|
{
|
||||||
|
PlayerNumber pn = m_pPlayerState->m_PlayerNumber;
|
||||||
|
GameInput GameI = GAMESTATE->GetCurrentStyle()->StyleInputToGameInput( iTrack, pn );
|
||||||
|
if( PREFSMAN->m_fPadStickSeconds > 0.f )
|
||||||
|
{
|
||||||
|
float fSecsHeld = INPUTMAPPER->GetSecsHeld( GameI, m_pPlayerState->m_mp );
|
||||||
|
if( fSecsHeld >= PREFSMAN->m_fPadStickSeconds )
|
||||||
|
Step( iTrack, -1, now - PREFSMAN->m_fPadStickSeconds, true, false );
|
||||||
|
}
|
||||||
|
else if( INPUTMAPPER->IsBeingPressed(GameI, m_pPlayerState->m_mp) )
|
||||||
|
{
|
||||||
|
Step( iTrack, -1, now, true, false );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case TapNote::mine:
|
||||||
|
{
|
||||||
|
// Hold the panel while crossing a mine will cause the mine to explode
|
||||||
|
// TODO: Remove use of PlayerNumber.
|
||||||
PlayerNumber pn = m_pPlayerState->m_PlayerNumber;
|
PlayerNumber pn = m_pPlayerState->m_PlayerNumber;
|
||||||
GameInput GameI = GAMESTATE->GetCurrentStyle()->StyleInputToGameInput( iTrack, pn );
|
GameInput GameI = GAMESTATE->GetCurrentStyle()->StyleInputToGameInput( iTrack, pn );
|
||||||
if( PREFSMAN->m_fPadStickSeconds > 0.f )
|
if( PREFSMAN->m_fPadStickSeconds > 0 )
|
||||||
{
|
{
|
||||||
float fSecsHeld = INPUTMAPPER->GetSecsHeld( GameI, m_pPlayerState->m_mp );
|
float fSecsHeld = INPUTMAPPER->GetSecsHeld( GameI, m_pPlayerState->m_mp );
|
||||||
if( fSecsHeld >= PREFSMAN->m_fPadStickSeconds )
|
if( fSecsHeld >= PREFSMAN->m_fPadStickSeconds )
|
||||||
Step( iTrack, -1, now - PREFSMAN->m_fPadStickSeconds, true, false );
|
Step( iTrack, -1, now - PREFSMAN->m_fPadStickSeconds, true, false );
|
||||||
}
|
}
|
||||||
else if( INPUTMAPPER->IsBeingPressed(GameI, m_pPlayerState->m_mp) )
|
else
|
||||||
{
|
{
|
||||||
Step( iTrack, -1, now, true, false );
|
if( INPUTMAPPER->IsBeingPressed(GameI, m_pPlayerState->m_mp) )
|
||||||
|
Step( iTrack, iRow, now, true, false );
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
default: break;
|
||||||
case TapNote::mine:
|
|
||||||
// Hold the panel while crossing a mine will cause the mine to explode
|
|
||||||
// TODO: Remove use of PlayerNumber.
|
|
||||||
PlayerNumber pn = m_pPlayerState->m_PlayerNumber;
|
|
||||||
GameInput GameI = GAMESTATE->GetCurrentStyle()->StyleInputToGameInput( iTrack, pn );
|
|
||||||
if( PREFSMAN->m_fPadStickSeconds > 0 )
|
|
||||||
{
|
|
||||||
float fSecsHeld = INPUTMAPPER->GetSecsHeld( GameI, m_pPlayerState->m_mp );
|
|
||||||
if( fSecsHeld >= PREFSMAN->m_fPadStickSeconds )
|
|
||||||
Step( iTrack, -1, now - PREFSMAN->m_fPadStickSeconds, true, false );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if( INPUTMAPPER->IsBeingPressed(GameI, m_pPlayerState->m_mp) )
|
|
||||||
Step( iTrack, iRow, now, true, false );
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if( iRow != iLastSeenRow )
|
if( iRow != iLastSeenRow )
|
||||||
|
|||||||
+14
-11
@@ -274,6 +274,7 @@ float PlayerStageStats::GetCurMaxPercentDancePoints() const
|
|||||||
return fCurMaxPercentDancePoints;
|
return fCurMaxPercentDancePoints;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Make this use lua. Let more judgments be possible. -Wolfman2000
|
||||||
int PlayerStageStats::GetLessonScoreActual() const
|
int PlayerStageStats::GetLessonScoreActual() const
|
||||||
{
|
{
|
||||||
int iScore = 0;
|
int iScore = 0;
|
||||||
@@ -282,14 +283,15 @@ int PlayerStageStats::GetLessonScoreActual() const
|
|||||||
{
|
{
|
||||||
switch( tns )
|
switch( tns )
|
||||||
{
|
{
|
||||||
case TNS_AvoidMine:
|
case TNS_AvoidMine:
|
||||||
case TNS_W5:
|
case TNS_W5:
|
||||||
case TNS_W4:
|
case TNS_W4:
|
||||||
case TNS_W3:
|
case TNS_W3:
|
||||||
case TNS_W2:
|
case TNS_W2:
|
||||||
case TNS_W1:
|
case TNS_W1:
|
||||||
iScore += m_iTapNoteScores[tns];
|
iScore += m_iTapNoteScores[tns];
|
||||||
break;
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -297,9 +299,10 @@ int PlayerStageStats::GetLessonScoreActual() const
|
|||||||
{
|
{
|
||||||
switch( hns )
|
switch( hns )
|
||||||
{
|
{
|
||||||
case HNS_Held:
|
case HNS_Held:
|
||||||
iScore += m_iHoldNoteScores[hns];
|
iScore += m_iHoldNoteScores[hns];
|
||||||
break;
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+21
-20
@@ -1625,6 +1625,7 @@ void RageDisplay_Legacy::SetTextureMode( TextureUnit tu, TextureMode tm )
|
|||||||
glTexEnvi(GL_TEXTURE_ENV, GLenum(GL_OPERAND1_ALPHA_EXT), GL_SRC_ALPHA);
|
glTexEnvi(GL_TEXTURE_ENV, GLenum(GL_OPERAND1_ALPHA_EXT), GL_SRC_ALPHA);
|
||||||
glTexEnvi(GL_TEXTURE_ENV, GLenum(GL_SOURCE1_ALPHA_EXT), GL_TEXTURE);
|
glTexEnvi(GL_TEXTURE_ENV, GLenum(GL_SOURCE1_ALPHA_EXT), GL_TEXTURE);
|
||||||
break;
|
break;
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1668,15 +1669,16 @@ void RageDisplay_Legacy::SetEffectMode( EffectMode effect )
|
|||||||
GLhandleARB hShader = 0;
|
GLhandleARB hShader = 0;
|
||||||
switch (effect)
|
switch (effect)
|
||||||
{
|
{
|
||||||
case EffectMode_Normal: hShader = 0; break;
|
case EffectMode_Normal: hShader = 0; break;
|
||||||
case EffectMode_Unpremultiply: hShader = g_bUnpremultiplyShader; break;
|
case EffectMode_Unpremultiply: hShader = g_bUnpremultiplyShader; break;
|
||||||
case EffectMode_ColorBurn: hShader = g_bColorBurnShader; break;
|
case EffectMode_ColorBurn: hShader = g_bColorBurnShader; break;
|
||||||
case EffectMode_ColorDodge: hShader = g_bColorDodgeShader; break;
|
case EffectMode_ColorDodge: hShader = g_bColorDodgeShader; break;
|
||||||
case EffectMode_VividLight: hShader = g_bVividLightShader; break;
|
case EffectMode_VividLight: hShader = g_bVividLightShader; break;
|
||||||
case EffectMode_HardMix: hShader = g_hHardMixShader; break;
|
case EffectMode_HardMix: hShader = g_hHardMixShader; break;
|
||||||
case EffectMode_Overlay: hShader = g_hOverlayShader; break;
|
case EffectMode_Overlay: hShader = g_hOverlayShader; break;
|
||||||
case EffectMode_Screen: hShader = g_hScreenShader; break;
|
case EffectMode_Screen: hShader = g_hScreenShader; break;
|
||||||
case EffectMode_YUYV422: hShader = g_hYUYV422Shader; break;
|
case EffectMode_YUYV422: hShader = g_hYUYV422Shader; break;
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
DebugFlushGLErrors();
|
DebugFlushGLErrors();
|
||||||
@@ -1703,18 +1705,17 @@ bool RageDisplay_Legacy::IsEffectModeSupported( EffectMode effect )
|
|||||||
{
|
{
|
||||||
switch( effect )
|
switch( effect )
|
||||||
{
|
{
|
||||||
case EffectMode_Normal: return true;
|
case EffectMode_Normal: return true;
|
||||||
case EffectMode_Unpremultiply: return g_bUnpremultiplyShader != 0;
|
case EffectMode_Unpremultiply: return g_bUnpremultiplyShader != 0;
|
||||||
case EffectMode_ColorBurn: return g_bColorBurnShader != 0;
|
case EffectMode_ColorBurn: return g_bColorBurnShader != 0;
|
||||||
case EffectMode_ColorDodge: return g_bColorDodgeShader != 0;
|
case EffectMode_ColorDodge: return g_bColorDodgeShader != 0;
|
||||||
case EffectMode_VividLight: return g_bVividLightShader != 0;
|
case EffectMode_VividLight: return g_bVividLightShader != 0;
|
||||||
case EffectMode_HardMix: return g_hHardMixShader != 0;
|
case EffectMode_HardMix: return g_hHardMixShader != 0;
|
||||||
case EffectMode_Overlay: return g_hOverlayShader != 0;
|
case EffectMode_Overlay: return g_hOverlayShader != 0;
|
||||||
case EffectMode_Screen: return g_hScreenShader != 0;
|
case EffectMode_Screen: return g_hScreenShader != 0;
|
||||||
case EffectMode_YUYV422: return g_hYUYV422Shader != 0;
|
case EffectMode_YUYV422: return g_hYUYV422Shader != 0;
|
||||||
|
default: return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void RageDisplay_Legacy::SetBlendMode( BlendMode mode )
|
void RageDisplay_Legacy::SetBlendMode( BlendMode mode )
|
||||||
|
|||||||
+10
-9
@@ -576,15 +576,16 @@ void RageSound::ApplyParams()
|
|||||||
|
|
||||||
switch( GetStopMode() )
|
switch( GetStopMode() )
|
||||||
{
|
{
|
||||||
case RageSoundParams::M_LOOP:
|
case RageSoundParams::M_LOOP:
|
||||||
m_pSource->SetProperty( "Loop", 1.0f );
|
m_pSource->SetProperty( "Loop", 1.0f );
|
||||||
break;
|
break;
|
||||||
case RageSoundParams::M_STOP:
|
case RageSoundParams::M_STOP:
|
||||||
m_pSource->SetProperty( "Stop", 1.0f );
|
m_pSource->SetProperty( "Stop", 1.0f );
|
||||||
break;
|
break;
|
||||||
case RageSoundParams::M_CONTINUE:
|
case RageSoundParams::M_CONTINUE:
|
||||||
m_pSource->SetProperty( "Continue", 1.0f );
|
m_pSource->SetProperty( "Continue", 1.0f );
|
||||||
break;
|
break;
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -67,17 +67,18 @@ RageSoundReader_FileReader *RageSoundReader_FileReader::TryOpenFile( RageFileBas
|
|||||||
bKeepTrying = (ret != OPEN_FATAL_ERROR);
|
bKeepTrying = (ret != OPEN_FATAL_ERROR);
|
||||||
switch( ret )
|
switch( ret )
|
||||||
{
|
{
|
||||||
case OPEN_UNKNOWN_FILE_FORMAT:
|
case OPEN_UNKNOWN_FILE_FORMAT:
|
||||||
bKeepTrying = true;
|
bKeepTrying = true;
|
||||||
error = "Unknown file format";
|
error = "Unknown file format";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case OPEN_FATAL_ERROR:
|
case OPEN_FATAL_ERROR:
|
||||||
/* The file matched, but failed to load. We know it's this type of data;
|
/* The file matched, but failed to load. We know it's this type of data;
|
||||||
* don't bother trying the other file types. */
|
* don't bother trying the other file types. */
|
||||||
bKeepTrying = false;
|
bKeepTrying = false;
|
||||||
error = err;
|
error = err;
|
||||||
break;
|
break;
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|||||||
@@ -57,16 +57,17 @@ static RageSurface *TryOpenFile( RString sPath, bool bHeaderOnly, RString &error
|
|||||||
bKeepTrying = (result != RageSurfaceUtils::OPEN_FATAL_ERROR);
|
bKeepTrying = (result != RageSurfaceUtils::OPEN_FATAL_ERROR);
|
||||||
switch( result )
|
switch( result )
|
||||||
{
|
{
|
||||||
case RageSurfaceUtils::OPEN_UNKNOWN_FILE_FORMAT:
|
case RageSurfaceUtils::OPEN_UNKNOWN_FILE_FORMAT:
|
||||||
bKeepTrying = true;
|
bKeepTrying = true;
|
||||||
error = "Unknown file format";
|
error = "Unknown file format";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RageSurfaceUtils::OPEN_FATAL_ERROR:
|
case RageSurfaceUtils::OPEN_FATAL_ERROR:
|
||||||
/* The file matched, but failed to load. We know it's this type of data;
|
/* The file matched, but failed to load. We know it's this type of data;
|
||||||
* don't bother trying the other file types. */
|
* don't bother trying the other file types. */
|
||||||
bKeepTrying = false;
|
bKeepTrying = false;
|
||||||
break;
|
break;
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|||||||
@@ -83,7 +83,10 @@ void ScoreKeeperRave::HandleHoldScore( const TapNote &tn )
|
|||||||
float fPercentToMove = 0;
|
float fPercentToMove = 0;
|
||||||
switch( tapScore )
|
switch( tapScore )
|
||||||
{
|
{
|
||||||
case TNS_HitMine: fPercentToMove = g_fSuperMeterPercentChange[SE_HitMine]; break;
|
case TNS_HitMine:
|
||||||
|
fPercentToMove = g_fSuperMeterPercentChange[SE_HitMine];
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
AddSuperMeterDelta( fPercentToMove );
|
AddSuperMeterDelta( fPercentToMove );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -226,6 +226,7 @@ void Screen::Input( const InputEventPlus &input )
|
|||||||
case GAME_BUTTON_START: this->MenuStart ( input ); return;
|
case GAME_BUTTON_START: this->MenuStart ( input ); return;
|
||||||
case GAME_BUTTON_SELECT:this->MenuSelect( input ); return;
|
case GAME_BUTTON_SELECT:this->MenuSelect( input ); return;
|
||||||
case GAME_BUTTON_COIN: this->MenuCoin ( input ); return;
|
case GAME_BUTTON_COIN: this->MenuCoin ( input ); return;
|
||||||
|
default: return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+32
-29
@@ -75,34 +75,36 @@ void ScreenAttract::AttractInput( const InputEventPlus &input, ScreenWithMenuEle
|
|||||||
|
|
||||||
switch( input.MenuI )
|
switch( input.MenuI )
|
||||||
{
|
{
|
||||||
case GAME_BUTTON_BACK:
|
case GAME_BUTTON_BACK:
|
||||||
if( !(bool)BACK_GOES_TO_START_SCREEN )
|
if( !BACK_GOES_TO_START_SCREEN )
|
||||||
break;
|
break;
|
||||||
// fall through
|
|
||||||
case GAME_BUTTON_START:
|
|
||||||
case GAME_BUTTON_COIN:
|
|
||||||
switch( GAMESTATE->GetCoinMode() )
|
|
||||||
{
|
|
||||||
case CoinMode_Pay:
|
|
||||||
LOG->Trace("ScreenAttract::AttractInput: COIN_PAY (%i/%i, %i)", GAMESTATE->m_iCoins.Get(), PREFSMAN->m_iCoinsPerCredit.Get(), GAMESTATE->GetNumSidesJoined() );
|
|
||||||
if( GAMESTATE->m_iCoins < PREFSMAN->m_iCoinsPerCredit && GAMESTATE->GetNumSidesJoined() == 0 )
|
|
||||||
break; // don't fall through
|
|
||||||
// fall through
|
// fall through
|
||||||
case CoinMode_Home:
|
case GAME_BUTTON_START:
|
||||||
case CoinMode_Free:
|
case GAME_BUTTON_COIN:
|
||||||
if( pScreen->IsTransitioning() )
|
switch( GAMESTATE->GetCoinMode() )
|
||||||
return;
|
{
|
||||||
|
case CoinMode_Pay:
|
||||||
|
LOG->Trace("ScreenAttract::AttractInput: COIN_PAY (%i/%i, %i)",
|
||||||
|
GAMESTATE->m_iCoins.Get(),
|
||||||
|
PREFSMAN->m_iCoinsPerCredit.Get(),
|
||||||
|
GAMESTATE->GetNumSidesJoined() );
|
||||||
|
if( GAMESTATE->m_iCoins < PREFSMAN->m_iCoinsPerCredit && GAMESTATE->GetNumSidesJoined() == 0 )
|
||||||
|
break; // don't fall through
|
||||||
|
// fall through
|
||||||
|
case CoinMode_Home:
|
||||||
|
case CoinMode_Free:
|
||||||
|
if( pScreen->IsTransitioning() )
|
||||||
|
return;
|
||||||
|
|
||||||
// HandleGlobalInputs() already played the coin sound. Don't play it again.
|
// HandleGlobalInputs() already played the coin sound. Don't play it again.
|
||||||
if( input.MenuI != GAME_BUTTON_COIN )
|
if( input.MenuI != GAME_BUTTON_COIN )
|
||||||
SCREENMAN->PlayStartSound();
|
SCREENMAN->PlayStartSound();
|
||||||
|
|
||||||
pScreen->Cancel( SM_GoToStartScreen );
|
pScreen->Cancel( SM_GoToStartScreen );
|
||||||
break;
|
break;
|
||||||
default:
|
default: FAIL_M("Invalid Coin Mode! Aborting...");
|
||||||
ASSERT(0);
|
}
|
||||||
}
|
default: break;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if( pScreen->IsTransitioning() )
|
if( pScreen->IsTransitioning() )
|
||||||
@@ -110,10 +112,11 @@ void ScreenAttract::AttractInput( const InputEventPlus &input, ScreenWithMenuEle
|
|||||||
|
|
||||||
switch( input.MenuI )
|
switch( input.MenuI )
|
||||||
{
|
{
|
||||||
case GAME_BUTTON_LEFT:
|
case GAME_BUTTON_LEFT:
|
||||||
case GAME_BUTTON_RIGHT:
|
case GAME_BUTTON_RIGHT:
|
||||||
SCREENMAN->PostMessageToTopScreen( SM_BeginFadingOut, 0 );
|
SCREENMAN->PostMessageToTopScreen( SM_BeginFadingOut, 0 );
|
||||||
break;
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Screen::Input( input );
|
// Screen::Input( input );
|
||||||
|
|||||||
+15
-12
@@ -63,18 +63,21 @@ void ScreenContinue::Input( const InputEventPlus &input )
|
|||||||
{
|
{
|
||||||
switch( input.MenuI )
|
switch( input.MenuI )
|
||||||
{
|
{
|
||||||
case GAME_BUTTON_START:
|
case GAME_BUTTON_START:
|
||||||
case GAME_BUTTON_UP:
|
case GAME_BUTTON_UP:
|
||||||
case GAME_BUTTON_DOWN:
|
case GAME_BUTTON_DOWN:
|
||||||
case GAME_BUTTON_LEFT:
|
case GAME_BUTTON_LEFT:
|
||||||
case GAME_BUTTON_RIGHT:
|
case GAME_BUTTON_RIGHT:
|
||||||
float fSeconds = floorf(m_MenuTimer->GetSeconds()) - 0.0001f;
|
{
|
||||||
fSeconds = max( fSeconds, 0.0001f ); // don't set to 0
|
float fSeconds = floorf(m_MenuTimer->GetSeconds()) - 0.0001f;
|
||||||
m_MenuTimer->SetSeconds( fSeconds );
|
fSeconds = max( fSeconds, 0.0001f ); // don't set to 0
|
||||||
Message msg("HurryTimer");
|
m_MenuTimer->SetSeconds( fSeconds );
|
||||||
msg.SetParam( "PlayerNumber", input.pn );
|
Message msg("HurryTimer");
|
||||||
this->HandleMessage( msg );
|
msg.SetParam( "PlayerNumber", input.pn );
|
||||||
return; // handled
|
this->HandleMessage( msg );
|
||||||
|
return; // handled
|
||||||
|
}
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -813,12 +813,11 @@ class DebugLineProfileSlot : public IDebugLine
|
|||||||
{
|
{
|
||||||
switch( g_ProfileSlot )
|
switch( g_ProfileSlot )
|
||||||
{
|
{
|
||||||
case ProfileSlot_Machine: return "Machine";
|
case ProfileSlot_Machine: return "Machine";
|
||||||
case ProfileSlot_Player1: return "Player 1";
|
case ProfileSlot_Player1: return "Player 1";
|
||||||
case ProfileSlot_Player2: return "Player 2";
|
case ProfileSlot_Player2: return "Player 2";
|
||||||
|
default: return RString();
|
||||||
}
|
}
|
||||||
|
|
||||||
return RString();
|
|
||||||
}
|
}
|
||||||
virtual bool IsEnabled() { return IsSelectProfilePersistent(); }
|
virtual bool IsEnabled() { return IsSelectProfilePersistent(); }
|
||||||
virtual RString GetPageName() const { return "Profiles"; }
|
virtual RString GetPageName() const { return "Profiles"; }
|
||||||
|
|||||||
@@ -257,6 +257,7 @@ void ScreenEdit::InitEditMappings()
|
|||||||
m_EditMappingsDeviceInput.hold[EDIT_BUTTON_DELETE_SHIFT_PAUSES][0] = DeviceInput(DEVICE_KEYBOARD, KEY_LCTRL);
|
m_EditMappingsDeviceInput.hold[EDIT_BUTTON_DELETE_SHIFT_PAUSES][0] = DeviceInput(DEVICE_KEYBOARD, KEY_LCTRL);
|
||||||
m_EditMappingsDeviceInput.hold[EDIT_BUTTON_DELETE_SHIFT_PAUSES][1] = DeviceInput(DEVICE_KEYBOARD, KEY_RCTRL);
|
m_EditMappingsDeviceInput.hold[EDIT_BUTTON_DELETE_SHIFT_PAUSES][1] = DeviceInput(DEVICE_KEYBOARD, KEY_RCTRL);
|
||||||
break;
|
break;
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_EditMappingsDeviceInput.button[EDIT_BUTTON_COLUMN_0][0] = DeviceInput(DEVICE_KEYBOARD, KEY_C1);
|
m_EditMappingsDeviceInput.button[EDIT_BUTTON_COLUMN_0][0] = DeviceInput(DEVICE_KEYBOARD, KEY_C1);
|
||||||
@@ -2387,6 +2388,7 @@ void ScreenEdit::InputEdit( const InputEventPlus &input, EditButton EditB )
|
|||||||
GAMESTATE->m_bIsUsingStepTiming = !GAMESTATE->m_bIsUsingStepTiming;
|
GAMESTATE->m_bIsUsingStepTiming = !GAMESTATE->m_bIsUsingStepTiming;
|
||||||
m_soundSwitchTiming.Play();
|
m_soundSwitchTiming.Play();
|
||||||
break;
|
break;
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2494,6 +2496,7 @@ void ScreenEdit::InputRecordPaused( const InputEventPlus &input, EditButton Edit
|
|||||||
case EDIT_BUTTON_RETURN_TO_EDIT:
|
case EDIT_BUTTON_RETURN_TO_EDIT:
|
||||||
TransitionEditState( STATE_EDITING );
|
TransitionEditState( STATE_EDITING );
|
||||||
break;
|
break;
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2542,6 +2545,7 @@ void ScreenEdit::InputPlay( const InputEventPlus &input, EditButton EditB )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2584,6 +2588,7 @@ void ScreenEdit::InputPlay( const InputEventPlus &input, EditButton EditB )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2650,6 +2655,7 @@ void ScreenEdit::TransitionEditState( EditState em )
|
|||||||
|
|
||||||
CheckNumberOfNotesAndUndo();
|
CheckNumberOfNotesAndUndo();
|
||||||
break;
|
break;
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2750,6 +2756,7 @@ void ScreenEdit::TransitionEditState( EditState em )
|
|||||||
m_NoteFieldRecord.m_iEndMarker = m_iStopPlayingAt;
|
m_NoteFieldRecord.m_iEndMarker = m_iStopPlayingAt;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show/hide depending on edit state (em)
|
// Show/hide depending on edit state (em)
|
||||||
@@ -2776,6 +2783,7 @@ void ScreenEdit::TransitionEditState( EditState em )
|
|||||||
{
|
{
|
||||||
case STATE_PLAYING:
|
case STATE_PLAYING:
|
||||||
case STATE_RECORDING:
|
case STATE_RECORDING:
|
||||||
|
{
|
||||||
const float fStartSeconds = GetAppropriateTiming().GetElapsedTimeFromBeat( GetBeat() );
|
const float fStartSeconds = GetAppropriateTiming().GetElapsedTimeFromBeat( GetBeat() );
|
||||||
LOG->Trace( "Starting playback at %f", fStartSeconds );
|
LOG->Trace( "Starting playback at %f", fStartSeconds );
|
||||||
|
|
||||||
@@ -2786,6 +2794,8 @@ void ScreenEdit::TransitionEditState( EditState em )
|
|||||||
m_pSoundMusic->SetProperty( "AccurateSync", true );
|
m_pSoundMusic->SetProperty( "AccurateSync", true );
|
||||||
m_pSoundMusic->Play( &p );
|
m_pSoundMusic->Play( &p );
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_EditState = em;
|
m_EditState = em;
|
||||||
@@ -4235,6 +4245,7 @@ void ScreenEdit::HandleAlterMenuChoice(AlterMenuChoice c, const vector<int> &iAn
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -4508,6 +4519,7 @@ void ScreenEdit::HandleSongInformationChoice( SongInformationChoice c, const vec
|
|||||||
ssprintf("%.6f", pSong->m_fSpecifiedBPMMax), 20,
|
ssprintf("%.6f", pSong->m_fSpecifiedBPMMax), 20,
|
||||||
ScreenTextEntry::FloatValidate, ChangeMaxBPM, NULL );
|
ScreenTextEntry::FloatValidate, ChangeMaxBPM, NULL );
|
||||||
break;
|
break;
|
||||||
|
default: break;
|
||||||
};
|
};
|
||||||
SetDirty(true);
|
SetDirty(true);
|
||||||
}
|
}
|
||||||
|
|||||||
+24
-19
@@ -193,33 +193,38 @@ void ScreenEditMenu::MenuStart( const InputEventPlus &input )
|
|||||||
|
|
||||||
switch( m_Selector.EDIT_MODE )
|
switch( m_Selector.EDIT_MODE )
|
||||||
{
|
{
|
||||||
case EditMode_Full:
|
case EditMode_Full:
|
||||||
{
|
|
||||||
RString sDir = pSong->GetSongDir();
|
|
||||||
RString sTempFile = sDir + TEMP_FILE_NAME;
|
|
||||||
RageFile file;
|
|
||||||
if( !file.Open( sTempFile, RageFile::WRITE ) )
|
|
||||||
{
|
{
|
||||||
ScreenPrompt::Prompt( SM_None, SONG_DIR_READ_ONLY );
|
RString sDir = pSong->GetSongDir();
|
||||||
return;
|
RString sTempFile = sDir + TEMP_FILE_NAME;
|
||||||
}
|
RageFile file;
|
||||||
|
if( !file.Open( sTempFile, RageFile::WRITE ) )
|
||||||
|
{
|
||||||
|
ScreenPrompt::Prompt( SM_None, SONG_DIR_READ_ONLY );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
file.Close();
|
file.Close();
|
||||||
FILEMAN->Remove( sTempFile );
|
FILEMAN->Remove( sTempFile );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch( action )
|
switch( action )
|
||||||
{
|
{
|
||||||
case EditMenuAction_Delete:
|
case EditMenuAction_Delete:
|
||||||
ASSERT( pSteps );
|
|
||||||
if( pSteps->IsAutogen() )
|
|
||||||
{
|
{
|
||||||
SCREENMAN->PlayInvalidSound();
|
ASSERT( pSteps );
|
||||||
SCREENMAN->SystemMessage( DELETED_AUTOGEN_STEPS.GetValue() );
|
if( pSteps->IsAutogen() )
|
||||||
return;
|
{
|
||||||
|
SCREENMAN->PlayInvalidSound();
|
||||||
|
SCREENMAN->SystemMessage( DELETED_AUTOGEN_STEPS.GetValue() );
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do work
|
// Do work
|
||||||
|
|||||||
@@ -93,10 +93,11 @@ void ScreenEnding::Init()
|
|||||||
m_sprRemoveMemoryCard[p].Load( THEME->GetPathG("ScreenEnding",ssprintf("remove card P%d",p+1)) );
|
m_sprRemoveMemoryCard[p].Load( THEME->GetPathG("ScreenEnding",ssprintf("remove card P%d",p+1)) );
|
||||||
switch( MEMCARDMAN->GetCardState(p) )
|
switch( MEMCARDMAN->GetCardState(p) )
|
||||||
{
|
{
|
||||||
case MemoryCardState_Removed:
|
case MemoryCardState_Removed:
|
||||||
case MemoryCardState_NoCard:
|
case MemoryCardState_NoCard:
|
||||||
m_sprRemoveMemoryCard[p].SetVisible( false );
|
m_sprRemoveMemoryCard[p].SetVisible( false );
|
||||||
break;
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
LOAD_ALL_COMMANDS_AND_SET_XY_AND_ON_COMMAND( m_sprRemoveMemoryCard[p] );
|
LOAD_ALL_COMMANDS_AND_SET_XY_AND_ON_COMMAND( m_sprRemoveMemoryCard[p] );
|
||||||
this->AddChild( &m_sprRemoveMemoryCard[p] );
|
this->AddChild( &m_sprRemoveMemoryCard[p] );
|
||||||
@@ -114,9 +115,10 @@ void ScreenEnding::Input( const InputEventPlus &input )
|
|||||||
{
|
{
|
||||||
switch( input.MenuI )
|
switch( input.MenuI )
|
||||||
{
|
{
|
||||||
case GAME_BUTTON_START:
|
case GAME_BUTTON_START:
|
||||||
SCREENMAN->PostMessageToTopScreen( SM_BeginFadingOut, 0 );
|
SCREENMAN->PostMessageToTopScreen( SM_BeginFadingOut, 0 );
|
||||||
break;
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+26
-24
@@ -182,25 +182,26 @@ void ScreenEvaluation::Init()
|
|||||||
{
|
{
|
||||||
switch( rc )
|
switch( rc )
|
||||||
{
|
{
|
||||||
case RadarCategory_Stream:
|
case RadarCategory_Stream:
|
||||||
case RadarCategory_Voltage:
|
case RadarCategory_Voltage:
|
||||||
case RadarCategory_Air:
|
case RadarCategory_Air:
|
||||||
case RadarCategory_Freeze:
|
case RadarCategory_Freeze:
|
||||||
case RadarCategory_Chaos:
|
case RadarCategory_Chaos:
|
||||||
ss.m_player[p].m_radarPossible[rc] = randomf( 0, 1 );
|
ss.m_player[p].m_radarPossible[rc] = randomf( 0, 1 );
|
||||||
ss.m_player[p].m_radarActual[rc] = randomf( 0, ss.m_player[p].m_radarPossible[rc] );
|
ss.m_player[p].m_radarActual[rc] = randomf( 0, ss.m_player[p].m_radarPossible[rc] );
|
||||||
break;
|
break;
|
||||||
case RadarCategory_TapsAndHolds:
|
case RadarCategory_TapsAndHolds:
|
||||||
case RadarCategory_Jumps:
|
case RadarCategory_Jumps:
|
||||||
case RadarCategory_Holds:
|
case RadarCategory_Holds:
|
||||||
case RadarCategory_Mines:
|
case RadarCategory_Mines:
|
||||||
case RadarCategory_Hands:
|
case RadarCategory_Hands:
|
||||||
case RadarCategory_Rolls:
|
case RadarCategory_Rolls:
|
||||||
case RadarCategory_Lifts:
|
case RadarCategory_Lifts:
|
||||||
case RadarCategory_Fakes:
|
case RadarCategory_Fakes:
|
||||||
ss.m_player[p].m_radarPossible[rc] = 1 + (rand() % 200);
|
ss.m_player[p].m_radarPossible[rc] = 1 + (rand() % 200);
|
||||||
ss.m_player[p].m_radarActual[rc] = rand() % (int)(ss.m_player[p].m_radarPossible[rc]);
|
ss.m_player[p].m_radarActual[rc] = rand() % (int)(ss.m_player[p].m_radarPossible[rc]);
|
||||||
break;
|
break;
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
; // filled in by ScreenGameplay on start of notes
|
; // filled in by ScreenGameplay on start of notes
|
||||||
@@ -651,11 +652,12 @@ void ScreenEvaluation::Init()
|
|||||||
|
|
||||||
switch( best_grade )
|
switch( best_grade )
|
||||||
{
|
{
|
||||||
case Grade_Tier01:
|
case Grade_Tier01:
|
||||||
case Grade_Tier02:
|
case Grade_Tier02:
|
||||||
case Grade_Tier03:
|
case Grade_Tier03:
|
||||||
this->PostScreenMessage( SM_PlayCheer, CHEER_DELAY_SECONDS );
|
this->PostScreenMessage( SM_PlayCheer, CHEER_DELAY_SECONDS );
|
||||||
break;
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+270
-260
@@ -151,10 +151,11 @@ void PlayerInfo::Load( PlayerNumber pn, MultiPlayer mp, bool bShowNoteField, int
|
|||||||
|
|
||||||
switch( GAMESTATE->m_PlayMode )
|
switch( GAMESTATE->m_PlayMode )
|
||||||
{
|
{
|
||||||
case PLAY_MODE_RAVE:
|
case PLAY_MODE_RAVE:
|
||||||
m_pSecondaryScoreDisplay = new ScoreDisplayRave;
|
m_pSecondaryScoreDisplay = new ScoreDisplayRave;
|
||||||
m_pSecondaryScoreDisplay->SetName( "ScoreDisplayRave" );
|
m_pSecondaryScoreDisplay->SetName( "ScoreDisplayRave" );
|
||||||
break;
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( m_pSecondaryScoreDisplay )
|
if( m_pSecondaryScoreDisplay )
|
||||||
@@ -164,9 +165,10 @@ void PlayerInfo::Load( PlayerNumber pn, MultiPlayer mp, bool bShowNoteField, int
|
|||||||
|
|
||||||
switch( GAMESTATE->m_PlayMode )
|
switch( GAMESTATE->m_PlayMode )
|
||||||
{
|
{
|
||||||
case PLAY_MODE_RAVE:
|
case PLAY_MODE_RAVE:
|
||||||
m_pSecondaryScoreKeeper = new ScoreKeeperRave( pPlayerState, pPlayerStageStats );
|
m_pSecondaryScoreKeeper = new ScoreKeeperRave( pPlayerState, pPlayerStageStats );
|
||||||
break;
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_ptextPlayerOptions = NULL;
|
m_ptextPlayerOptions = NULL;
|
||||||
@@ -522,13 +524,14 @@ void ScreenGameplay::Init()
|
|||||||
// Add combined life meter
|
// Add combined life meter
|
||||||
switch( GAMESTATE->m_PlayMode )
|
switch( GAMESTATE->m_PlayMode )
|
||||||
{
|
{
|
||||||
case PLAY_MODE_BATTLE:
|
case PLAY_MODE_BATTLE:
|
||||||
case PLAY_MODE_RAVE:
|
case PLAY_MODE_RAVE:
|
||||||
m_pCombinedLifeMeter = new CombinedLifeMeterTug;
|
m_pCombinedLifeMeter = new CombinedLifeMeterTug;
|
||||||
m_pCombinedLifeMeter->SetName( "CombinedLife" );
|
m_pCombinedLifeMeter->SetName( "CombinedLife" );
|
||||||
LOAD_ALL_COMMANDS_AND_SET_XY( *m_pCombinedLifeMeter );
|
LOAD_ALL_COMMANDS_AND_SET_XY( *m_pCombinedLifeMeter );
|
||||||
this->AddChild( m_pCombinedLifeMeter );
|
this->AddChild( m_pCombinedLifeMeter );
|
||||||
break;
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Before the lifemeter loads, if Networking is required
|
// Before the lifemeter loads, if Networking is required
|
||||||
@@ -541,25 +544,26 @@ void ScreenGameplay::Init()
|
|||||||
// Add individual life meter
|
// Add individual life meter
|
||||||
switch( GAMESTATE->m_PlayMode )
|
switch( GAMESTATE->m_PlayMode )
|
||||||
{
|
{
|
||||||
case PLAY_MODE_REGULAR:
|
case PLAY_MODE_REGULAR:
|
||||||
case PLAY_MODE_ONI:
|
case PLAY_MODE_ONI:
|
||||||
case PLAY_MODE_NONSTOP:
|
case PLAY_MODE_NONSTOP:
|
||||||
case PLAY_MODE_ENDLESS:
|
case PLAY_MODE_ENDLESS:
|
||||||
FOREACH_PlayerNumberInfo( m_vPlayerInfo, pi )
|
FOREACH_PlayerNumberInfo( m_vPlayerInfo, pi )
|
||||||
{
|
{
|
||||||
if( !GAMESTATE->IsPlayerEnabled(pi->m_pn) && !SHOW_LIFE_METER_FOR_DISABLED_PLAYERS )
|
if( !GAMESTATE->IsPlayerEnabled(pi->m_pn) && !SHOW_LIFE_METER_FOR_DISABLED_PLAYERS )
|
||||||
continue; // skip
|
continue; // skip
|
||||||
|
|
||||||
pi->m_pLifeMeter = LifeMeter::MakeLifeMeter( GAMESTATE->m_SongOptions.GetStage().m_LifeType );
|
pi->m_pLifeMeter = LifeMeter::MakeLifeMeter( GAMESTATE->m_SongOptions.GetStage().m_LifeType );
|
||||||
pi->m_pLifeMeter->Load( pi->GetPlayerState(), pi->GetPlayerStageStats() );
|
pi->m_pLifeMeter->Load( pi->GetPlayerState(), pi->GetPlayerStageStats() );
|
||||||
pi->m_pLifeMeter->SetName( ssprintf("Life%s",pi->GetName().c_str()) );
|
pi->m_pLifeMeter->SetName( ssprintf("Life%s",pi->GetName().c_str()) );
|
||||||
LOAD_ALL_COMMANDS_AND_SET_XY( pi->m_pLifeMeter );
|
LOAD_ALL_COMMANDS_AND_SET_XY( pi->m_pLifeMeter );
|
||||||
this->AddChild( pi->m_pLifeMeter );
|
this->AddChild( pi->m_pLifeMeter );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PLAY_MODE_BATTLE:
|
case PLAY_MODE_BATTLE:
|
||||||
case PLAY_MODE_RAVE:
|
case PLAY_MODE_RAVE:
|
||||||
break;
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_bShowScoreboard = false;
|
m_bShowScoreboard = false;
|
||||||
@@ -718,11 +722,12 @@ void ScreenGameplay::Init()
|
|||||||
|
|
||||||
switch( GAMESTATE->m_PlayMode )
|
switch( GAMESTATE->m_PlayMode )
|
||||||
{
|
{
|
||||||
case PLAY_MODE_BATTLE:
|
case PLAY_MODE_BATTLE:
|
||||||
m_soundBattleTrickLevel1.Load( THEME->GetPathS(m_sName,"battle trick level1"), true );
|
m_soundBattleTrickLevel1.Load( THEME->GetPathS(m_sName,"battle trick level1"), true );
|
||||||
m_soundBattleTrickLevel2.Load( THEME->GetPathS(m_sName,"battle trick level2"), true );
|
m_soundBattleTrickLevel2.Load( THEME->GetPathS(m_sName,"battle trick level2"), true );
|
||||||
m_soundBattleTrickLevel3.Load( THEME->GetPathS(m_sName,"battle trick level3"), true );
|
m_soundBattleTrickLevel3.Load( THEME->GetPathS(m_sName,"battle trick level3"), true );
|
||||||
break;
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -996,9 +1001,10 @@ void ScreenGameplay::SetupSong( int iSongIndex )
|
|||||||
RString sType;
|
RString sType;
|
||||||
switch( GAMESTATE->m_SongOptions.GetCurrent().m_SoundEffectType )
|
switch( GAMESTATE->m_SongOptions.GetCurrent().m_SoundEffectType )
|
||||||
{
|
{
|
||||||
case SongOptions::SOUNDEFFECT_OFF: sType = "SoundEffectControl_Off"; break;
|
case SongOptions::SOUNDEFFECT_OFF: sType = "SoundEffectControl_Off"; break;
|
||||||
case SongOptions::SOUNDEFFECT_SPEED: sType = "SoundEffectControl_Speed"; break;
|
case SongOptions::SOUNDEFFECT_SPEED: sType = "SoundEffectControl_Speed"; break;
|
||||||
case SongOptions::SOUNDEFFECT_PITCH: sType = "SoundEffectControl_Pitch"; break;
|
case SongOptions::SOUNDEFFECT_PITCH: sType = "SoundEffectControl_Pitch"; break;
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
pi->m_SoundEffectControl.Load( sType, pi->GetPlayerState(), &pi->m_NoteData );
|
pi->m_SoundEffectControl.Load( sType, pi->GetPlayerState(), &pi->m_NoteData );
|
||||||
@@ -1630,246 +1636,250 @@ void ScreenGameplay::Update( float fDeltaTime )
|
|||||||
|
|
||||||
switch( m_DancingState )
|
switch( m_DancingState )
|
||||||
{
|
{
|
||||||
case STATE_DANCING:
|
case STATE_DANCING:
|
||||||
/* Set STATSMAN->m_CurStageStats.bFailed for failed players. In, FAIL_IMMEDIATE, send
|
|
||||||
* SM_BeginFailed if all players failed, and kill dead Oni players. */
|
|
||||||
FOREACH_EnabledPlayerInfo( m_vPlayerInfo, pi )
|
|
||||||
{
|
{
|
||||||
PlayerNumber pn = pi->GetStepsAndTrailIndex();
|
/* Set STATSMAN->m_CurStageStats.bFailed for failed players. In, FAIL_IMMEDIATE, send
|
||||||
|
* SM_BeginFailed if all players failed, and kill dead Oni players. */
|
||||||
PlayerOptions::FailType ft = GAMESTATE->GetPlayerFailType( pi->GetPlayerState() );
|
FOREACH_EnabledPlayerInfo( m_vPlayerInfo, pi )
|
||||||
SongOptions::LifeType lt = GAMESTATE->m_SongOptions.GetCurrent().m_LifeType;
|
|
||||||
|
|
||||||
if( ft == PlayerOptions::FAIL_OFF || ft == PlayerOptions::FAIL_AT_END )
|
|
||||||
continue;
|
|
||||||
|
|
||||||
// check for individual fail
|
|
||||||
if( pi->m_pLifeMeter == NULL || !pi->m_pLifeMeter->IsFailing() )
|
|
||||||
continue; /* isn't failing */
|
|
||||||
if( pi->GetPlayerStageStats()->m_bFailed )
|
|
||||||
continue; /* failed and is already dead */
|
|
||||||
|
|
||||||
LOG->Trace("Player %d failed", (int)pn);
|
|
||||||
pi->GetPlayerStageStats()->m_bFailed = true; // fail
|
|
||||||
|
|
||||||
{
|
{
|
||||||
Message msg("PlayerFailed");
|
PlayerNumber pn = pi->GetStepsAndTrailIndex();
|
||||||
msg.SetParam( "PlayerNumber", pi->m_pn );
|
|
||||||
MESSAGEMAN->Broadcast( msg );
|
PlayerOptions::FailType ft = GAMESTATE->GetPlayerFailType( pi->GetPlayerState() );
|
||||||
}
|
SongOptions::LifeType lt = GAMESTATE->m_SongOptions.GetCurrent().m_LifeType;
|
||||||
|
|
||||||
|
if( ft == PlayerOptions::FAIL_OFF || ft == PlayerOptions::FAIL_AT_END )
|
||||||
|
continue;
|
||||||
|
|
||||||
|
// check for individual fail
|
||||||
|
if( pi->m_pLifeMeter == NULL || !pi->m_pLifeMeter->IsFailing() )
|
||||||
|
continue; /* isn't failing */
|
||||||
|
if( pi->GetPlayerStageStats()->m_bFailed )
|
||||||
|
continue; /* failed and is already dead */
|
||||||
|
|
||||||
|
LOG->Trace("Player %d failed", (int)pn);
|
||||||
|
pi->GetPlayerStageStats()->m_bFailed = true; // fail
|
||||||
|
|
||||||
// Check for and do Oni die.
|
|
||||||
bool bAllowOniDie = false;
|
|
||||||
switch( lt )
|
|
||||||
{
|
|
||||||
case SongOptions::LIFE_BATTERY:
|
|
||||||
bAllowOniDie = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if( bAllowOniDie && ft == PlayerOptions::FAIL_IMMEDIATE )
|
|
||||||
{
|
|
||||||
if( !STATSMAN->m_CurStageStats.AllFailed() ) // if not the last one to fail
|
|
||||||
{
|
{
|
||||||
// kill them!
|
Message msg("PlayerFailed");
|
||||||
SOUND->PlayOnceFromDir( THEME->GetPathS(m_sName,"oni die") );
|
msg.SetParam( "PlayerNumber", pi->m_pn );
|
||||||
pi->ShowOniGameOver();
|
MESSAGEMAN->Broadcast( msg );
|
||||||
pi->m_NoteData.Init(); // remove all notes and scoring
|
}
|
||||||
pi->m_pPlayer->FadeToFail(); // tell the NoteField to fade to white
|
|
||||||
|
// Check for and do Oni die.
|
||||||
|
bool bAllowOniDie = false;
|
||||||
|
switch( lt )
|
||||||
|
{
|
||||||
|
case SongOptions::LIFE_BATTERY:
|
||||||
|
bAllowOniDie = true;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if( bAllowOniDie && ft == PlayerOptions::FAIL_IMMEDIATE )
|
||||||
|
{
|
||||||
|
if( !STATSMAN->m_CurStageStats.AllFailed() ) // if not the last one to fail
|
||||||
|
{
|
||||||
|
// kill them!
|
||||||
|
SOUND->PlayOnceFromDir( THEME->GetPathS(m_sName,"oni die") );
|
||||||
|
pi->ShowOniGameOver();
|
||||||
|
pi->m_NoteData.Init(); // remove all notes and scoring
|
||||||
|
pi->m_pPlayer->FadeToFail(); // tell the NoteField to fade to white
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
bool bAllFailed = true;
|
bool bAllFailed = true;
|
||||||
FOREACH_EnabledPlayerInfo( m_vPlayerInfo, pi )
|
FOREACH_EnabledPlayerInfo( m_vPlayerInfo, pi )
|
||||||
{
|
|
||||||
PlayerOptions::FailType ft = GAMESTATE->GetPlayerFailType( pi->GetPlayerState() );
|
|
||||||
switch( ft )
|
|
||||||
{
|
{
|
||||||
case PlayerOptions::FAIL_IMMEDIATE:
|
PlayerOptions::FailType ft = GAMESTATE->GetPlayerFailType( pi->GetPlayerState() );
|
||||||
if( pi->m_pLifeMeter == NULL || (pi->m_pLifeMeter && !pi->m_pLifeMeter->IsFailing()) )
|
switch( ft )
|
||||||
bAllFailed = false;
|
|
||||||
break;
|
|
||||||
case PlayerOptions::FAIL_IMMEDIATE_CONTINUE:
|
|
||||||
case PlayerOptions::FAIL_AT_END:
|
|
||||||
bAllFailed = false; // wait until the end of the song to fail.
|
|
||||||
break;
|
|
||||||
case PlayerOptions::FAIL_OFF:
|
|
||||||
bAllFailed = false; // never fail.
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
ASSERT(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if( bAllFailed )
|
|
||||||
{
|
|
||||||
m_pSoundMusic->StopPlaying();
|
|
||||||
SCREENMAN->PostMessageToTopScreen( SM_NotesEnded, 0 );
|
|
||||||
// todo: stop lyrics (m_LyricDisplay) from animating -aj
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update living players' alive time
|
|
||||||
// HACK: Don't scale alive time when using tab/tilde. Instead of accumulating time from a timer,
|
|
||||||
// this time should instead be tied to the music position.
|
|
||||||
float fUnscaledDeltaTime = m_timerGameplaySeconds.GetDeltaTime();
|
|
||||||
|
|
||||||
FOREACH_EnabledPlayerInfo( m_vPlayerInfo, pi )
|
|
||||||
if( !pi->GetPlayerStageStats()->m_bFailed )
|
|
||||||
pi->GetPlayerStageStats()->m_fAliveSeconds += fUnscaledDeltaTime * GAMESTATE->m_SongOptions.GetCurrent().m_fMusicRate;
|
|
||||||
|
|
||||||
// update fGameplaySeconds
|
|
||||||
STATSMAN->m_CurStageStats.m_fGameplaySeconds += fUnscaledDeltaTime;
|
|
||||||
float curBeat = GAMESTATE->m_Position.m_fSongBeat;
|
|
||||||
Song &s = *GAMESTATE->m_pCurSong;
|
|
||||||
|
|
||||||
if( curBeat >= s.GetFirstBeat() && curBeat < s.GetLastBeat() )
|
|
||||||
{
|
|
||||||
STATSMAN->m_CurStageStats.m_fStepsSeconds += fUnscaledDeltaTime;
|
|
||||||
|
|
||||||
if( GAMESTATE->m_SongOptions.GetCurrent().m_fHaste != 0.0f )
|
|
||||||
{
|
|
||||||
float fHasteRate = GetHasteRate();
|
|
||||||
GAMESTATE->m_fAccumulatedHasteSeconds += (fUnscaledDeltaTime * fHasteRate) - fUnscaledDeltaTime;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check for end of song
|
|
||||||
{
|
|
||||||
float fSecondsToStartFadingOutMusic, fSecondsToStartTransitioningOut;
|
|
||||||
GetMusicEndTiming( fSecondsToStartFadingOutMusic, fSecondsToStartTransitioningOut );
|
|
||||||
|
|
||||||
bool bAllReallyFailed = STATSMAN->m_CurStageStats.AllFailed();
|
|
||||||
if( bAllReallyFailed )
|
|
||||||
fSecondsToStartTransitioningOut += BEGIN_FAILED_DELAY;
|
|
||||||
|
|
||||||
if( GAMESTATE->m_Position.m_fMusicSeconds >= fSecondsToStartTransitioningOut && !m_NextSong.IsTransitioning() )
|
|
||||||
this->PostScreenMessage( SM_NotesEnded, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
// update 2d dancing characters
|
|
||||||
FOREACH_EnabledPlayerNumberInfo( m_vPlayerInfo, pi )
|
|
||||||
{
|
|
||||||
DancingCharacters *pCharacter = NULL;
|
|
||||||
if( m_pSongBackground )
|
|
||||||
pCharacter = m_pSongBackground->GetDancingCharacters();
|
|
||||||
if( pCharacter != NULL )
|
|
||||||
{
|
|
||||||
TapNoteScore tns = pi->m_pPlayer->GetLastTapNoteScore();
|
|
||||||
|
|
||||||
ANIM_STATES_2D state = AS2D_MISS;
|
|
||||||
|
|
||||||
switch( tns )
|
|
||||||
{
|
{
|
||||||
case TNS_W4:
|
case PlayerOptions::FAIL_IMMEDIATE:
|
||||||
case TNS_W3:
|
if( pi->m_pLifeMeter == NULL || (pi->m_pLifeMeter && !pi->m_pLifeMeter->IsFailing()) )
|
||||||
state = AS2D_GOOD;
|
bAllFailed = false;
|
||||||
break;
|
break;
|
||||||
case TNS_W2:
|
case PlayerOptions::FAIL_IMMEDIATE_CONTINUE:
|
||||||
case TNS_W1:
|
case PlayerOptions::FAIL_AT_END:
|
||||||
state = AS2D_GREAT;
|
bAllFailed = false; // wait until the end of the song to fail.
|
||||||
|
break;
|
||||||
|
case PlayerOptions::FAIL_OFF:
|
||||||
|
bAllFailed = false; // never fail.
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
state = AS2D_MISS;
|
FAIL_M("Invalid fail type! Aborting...");
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if( state == AS2D_GREAT && pi->GetPlayerState()->m_HealthState == HealthState_Hot )
|
|
||||||
state = AS2D_FEVER;
|
|
||||||
|
|
||||||
pCharacter->Change2DAnimState( pi->m_pn, state );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check for enemy death in enemy battle
|
|
||||||
static float fLastSeenEnemyHealth = 1;
|
|
||||||
if( fLastSeenEnemyHealth != GAMESTATE->m_fOpponentHealthPercent )
|
|
||||||
{
|
|
||||||
fLastSeenEnemyHealth = GAMESTATE->m_fOpponentHealthPercent;
|
|
||||||
|
|
||||||
if( GAMESTATE->m_fOpponentHealthPercent == 0 )
|
|
||||||
{
|
|
||||||
// HACK: Load incorrect directory on purpose for now.
|
|
||||||
PlayAnnouncer( "gameplay battle damage level3", 0 );
|
|
||||||
|
|
||||||
GAMESTATE->RemoveAllActiveAttacks();
|
|
||||||
|
|
||||||
FOREACH_EnabledPlayerNumberInfo( m_vPlayerInfo, pi )
|
|
||||||
{
|
|
||||||
if( !GAMESTATE->IsCpuPlayer(pi->m_pn) )
|
|
||||||
continue;
|
|
||||||
|
|
||||||
SOUND->PlayOnceFromDir( THEME->GetPathS(m_sName,"oni die") );
|
|
||||||
pi->ShowOniGameOver();
|
|
||||||
pi->m_NoteData.Init(); // remove all notes and scoring
|
|
||||||
pi->m_pPlayer->FadeToFail(); // tell the NoteField to fade to white
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// update give up
|
if( bAllFailed )
|
||||||
bool bGiveUpTimerFired = !m_GiveUpTimer.IsZero() && m_GiveUpTimer.Ago() > 2.5f;
|
|
||||||
|
|
||||||
|
|
||||||
bool bAllHumanHaveBigMissCombo = true;
|
|
||||||
FOREACH_EnabledPlayerNumberInfo( m_vPlayerInfo, pi )
|
|
||||||
{
|
|
||||||
if (pi->GetPlayerState()->m_PlayerOptions.GetCurrent().m_FailType == PlayerOptions::FAIL_OFF ||
|
|
||||||
pi->GetPlayerState()->m_HealthState < HealthState_Dead )
|
|
||||||
{
|
|
||||||
bAllHumanHaveBigMissCombo = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (bAllHumanHaveBigMissCombo) // possible to get in here.
|
|
||||||
{
|
|
||||||
bAllHumanHaveBigMissCombo = FAIL_ON_MISS_COMBO.GetValue() != -1 && STATSMAN->m_CurStageStats.GetMinimumMissCombo() >= FAIL_ON_MISS_COMBO;
|
|
||||||
}
|
|
||||||
if( bGiveUpTimerFired || bAllHumanHaveBigMissCombo )
|
|
||||||
{
|
|
||||||
STATSMAN->m_CurStageStats.m_bGaveUp = true;
|
|
||||||
FOREACH_EnabledPlayerNumberInfo( m_vPlayerInfo, pi )
|
|
||||||
{
|
|
||||||
pi->GetPlayerStageStats()->m_bFailed |= bAllHumanHaveBigMissCombo;
|
|
||||||
pi->GetPlayerStageStats()->m_bDisqualified |= bGiveUpTimerFired; // Don't disqualify if failing for miss combo. The player should still be eligable for a high score on courses.
|
|
||||||
}
|
|
||||||
|
|
||||||
AbortGiveUp( false );
|
|
||||||
|
|
||||||
if( GIVING_UP_GOES_TO_PREV_SCREEN )
|
|
||||||
{
|
|
||||||
BeginBackingOutFromGameplay();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
m_pSoundMusic->StopPlaying();
|
m_pSoundMusic->StopPlaying();
|
||||||
this->PostScreenMessage( SM_NotesEnded, 0 );
|
SCREENMAN->PostMessageToTopScreen( SM_NotesEnded, 0 );
|
||||||
|
// todo: stop lyrics (m_LyricDisplay) from animating -aj
|
||||||
}
|
}
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check to see if it's time to play a ScreenGameplay comment
|
// Update living players' alive time
|
||||||
m_fTimeSinceLastDancingComment += fDeltaTime;
|
// HACK: Don't scale alive time when using tab/tilde. Instead of accumulating time from a timer,
|
||||||
|
// this time should instead be tied to the music position.
|
||||||
|
float fUnscaledDeltaTime = m_timerGameplaySeconds.GetDeltaTime();
|
||||||
|
|
||||||
switch( GAMESTATE->m_PlayMode )
|
FOREACH_EnabledPlayerInfo( m_vPlayerInfo, pi )
|
||||||
{
|
if( !pi->GetPlayerStageStats()->m_bFailed )
|
||||||
case PLAY_MODE_REGULAR:
|
pi->GetPlayerStageStats()->m_fAliveSeconds += fUnscaledDeltaTime * GAMESTATE->m_SongOptions.GetCurrent().m_fMusicRate;
|
||||||
case PLAY_MODE_BATTLE:
|
|
||||||
case PLAY_MODE_RAVE:
|
// update fGameplaySeconds
|
||||||
if( GAMESTATE->OneIsHot() )
|
STATSMAN->m_CurStageStats.m_fGameplaySeconds += fUnscaledDeltaTime;
|
||||||
PlayAnnouncer( "gameplay comment hot", SECONDS_BETWEEN_COMMENTS );
|
float curBeat = GAMESTATE->m_Position.m_fSongBeat;
|
||||||
else if( GAMESTATE->AllAreInDangerOrWorse() )
|
Song &s = *GAMESTATE->m_pCurSong;
|
||||||
PlayAnnouncer( "gameplay comment danger", SECONDS_BETWEEN_COMMENTS );
|
|
||||||
else
|
if( curBeat >= s.GetFirstBeat() && curBeat < s.GetLastBeat() )
|
||||||
PlayAnnouncer( "gameplay comment good", SECONDS_BETWEEN_COMMENTS );
|
{
|
||||||
break;
|
STATSMAN->m_CurStageStats.m_fStepsSeconds += fUnscaledDeltaTime;
|
||||||
case PLAY_MODE_NONSTOP:
|
|
||||||
case PLAY_MODE_ONI:
|
if( GAMESTATE->m_SongOptions.GetCurrent().m_fHaste != 0.0f )
|
||||||
case PLAY_MODE_ENDLESS:
|
{
|
||||||
PlayAnnouncer( "gameplay comment oni", SECONDS_BETWEEN_COMMENTS );
|
float fHasteRate = GetHasteRate();
|
||||||
break;
|
GAMESTATE->m_fAccumulatedHasteSeconds += (fUnscaledDeltaTime * fHasteRate) - fUnscaledDeltaTime;
|
||||||
default:
|
}
|
||||||
ASSERT(0);
|
}
|
||||||
}
|
|
||||||
|
// Check for end of song
|
||||||
|
{
|
||||||
|
float fSecondsToStartFadingOutMusic, fSecondsToStartTransitioningOut;
|
||||||
|
GetMusicEndTiming( fSecondsToStartFadingOutMusic, fSecondsToStartTransitioningOut );
|
||||||
|
|
||||||
|
bool bAllReallyFailed = STATSMAN->m_CurStageStats.AllFailed();
|
||||||
|
if( bAllReallyFailed )
|
||||||
|
fSecondsToStartTransitioningOut += BEGIN_FAILED_DELAY;
|
||||||
|
|
||||||
|
if( GAMESTATE->m_Position.m_fMusicSeconds >= fSecondsToStartTransitioningOut && !m_NextSong.IsTransitioning() )
|
||||||
|
this->PostScreenMessage( SM_NotesEnded, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
// update 2d dancing characters
|
||||||
|
FOREACH_EnabledPlayerNumberInfo( m_vPlayerInfo, pi )
|
||||||
|
{
|
||||||
|
DancingCharacters *pCharacter = NULL;
|
||||||
|
if( m_pSongBackground )
|
||||||
|
pCharacter = m_pSongBackground->GetDancingCharacters();
|
||||||
|
if( pCharacter != NULL )
|
||||||
|
{
|
||||||
|
TapNoteScore tns = pi->m_pPlayer->GetLastTapNoteScore();
|
||||||
|
|
||||||
|
ANIM_STATES_2D state = AS2D_MISS;
|
||||||
|
|
||||||
|
switch( tns )
|
||||||
|
{
|
||||||
|
case TNS_W4:
|
||||||
|
case TNS_W3:
|
||||||
|
state = AS2D_GOOD;
|
||||||
|
break;
|
||||||
|
case TNS_W2:
|
||||||
|
case TNS_W1:
|
||||||
|
state = AS2D_GREAT;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
state = AS2D_MISS;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( state == AS2D_GREAT && pi->GetPlayerState()->m_HealthState == HealthState_Hot )
|
||||||
|
state = AS2D_FEVER;
|
||||||
|
|
||||||
|
pCharacter->Change2DAnimState( pi->m_pn, state );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check for enemy death in enemy battle
|
||||||
|
static float fLastSeenEnemyHealth = 1;
|
||||||
|
if( fLastSeenEnemyHealth != GAMESTATE->m_fOpponentHealthPercent )
|
||||||
|
{
|
||||||
|
fLastSeenEnemyHealth = GAMESTATE->m_fOpponentHealthPercent;
|
||||||
|
|
||||||
|
if( GAMESTATE->m_fOpponentHealthPercent == 0 )
|
||||||
|
{
|
||||||
|
// HACK: Load incorrect directory on purpose for now.
|
||||||
|
PlayAnnouncer( "gameplay battle damage level3", 0 );
|
||||||
|
|
||||||
|
GAMESTATE->RemoveAllActiveAttacks();
|
||||||
|
|
||||||
|
FOREACH_EnabledPlayerNumberInfo( m_vPlayerInfo, pi )
|
||||||
|
{
|
||||||
|
if( !GAMESTATE->IsCpuPlayer(pi->m_pn) )
|
||||||
|
continue;
|
||||||
|
|
||||||
|
SOUND->PlayOnceFromDir( THEME->GetPathS(m_sName,"oni die") );
|
||||||
|
pi->ShowOniGameOver();
|
||||||
|
pi->m_NoteData.Init(); // remove all notes and scoring
|
||||||
|
pi->m_pPlayer->FadeToFail(); // tell the NoteField to fade to white
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// update give up
|
||||||
|
bool bGiveUpTimerFired = !m_GiveUpTimer.IsZero() && m_GiveUpTimer.Ago() > 2.5f;
|
||||||
|
|
||||||
|
|
||||||
|
bool bAllHumanHaveBigMissCombo = true;
|
||||||
|
FOREACH_EnabledPlayerNumberInfo( m_vPlayerInfo, pi )
|
||||||
|
{
|
||||||
|
if (pi->GetPlayerState()->m_PlayerOptions.GetCurrent().m_FailType == PlayerOptions::FAIL_OFF ||
|
||||||
|
pi->GetPlayerState()->m_HealthState < HealthState_Dead )
|
||||||
|
{
|
||||||
|
bAllHumanHaveBigMissCombo = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (bAllHumanHaveBigMissCombo) // possible to get in here.
|
||||||
|
{
|
||||||
|
bAllHumanHaveBigMissCombo = FAIL_ON_MISS_COMBO.GetValue() != -1 && STATSMAN->m_CurStageStats.GetMinimumMissCombo() >= FAIL_ON_MISS_COMBO;
|
||||||
|
}
|
||||||
|
if( bGiveUpTimerFired || bAllHumanHaveBigMissCombo )
|
||||||
|
{
|
||||||
|
STATSMAN->m_CurStageStats.m_bGaveUp = true;
|
||||||
|
FOREACH_EnabledPlayerNumberInfo( m_vPlayerInfo, pi )
|
||||||
|
{
|
||||||
|
pi->GetPlayerStageStats()->m_bFailed |= bAllHumanHaveBigMissCombo;
|
||||||
|
pi->GetPlayerStageStats()->m_bDisqualified |= bGiveUpTimerFired; // Don't disqualify if failing for miss combo. The player should still be eligable for a high score on courses.
|
||||||
|
}
|
||||||
|
|
||||||
|
AbortGiveUp( false );
|
||||||
|
|
||||||
|
if( GIVING_UP_GOES_TO_PREV_SCREEN )
|
||||||
|
{
|
||||||
|
BeginBackingOutFromGameplay();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_pSoundMusic->StopPlaying();
|
||||||
|
this->PostScreenMessage( SM_NotesEnded, 0 );
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check to see if it's time to play a ScreenGameplay comment
|
||||||
|
m_fTimeSinceLastDancingComment += fDeltaTime;
|
||||||
|
|
||||||
|
switch( GAMESTATE->m_PlayMode )
|
||||||
|
{
|
||||||
|
case PLAY_MODE_REGULAR:
|
||||||
|
case PLAY_MODE_BATTLE:
|
||||||
|
case PLAY_MODE_RAVE:
|
||||||
|
if( GAMESTATE->OneIsHot() )
|
||||||
|
PlayAnnouncer( "gameplay comment hot", SECONDS_BETWEEN_COMMENTS );
|
||||||
|
else if( GAMESTATE->AllAreInDangerOrWorse() )
|
||||||
|
PlayAnnouncer( "gameplay comment danger", SECONDS_BETWEEN_COMMENTS );
|
||||||
|
else
|
||||||
|
PlayAnnouncer( "gameplay comment good", SECONDS_BETWEEN_COMMENTS );
|
||||||
|
break;
|
||||||
|
case PLAY_MODE_NONSTOP:
|
||||||
|
case PLAY_MODE_ONI:
|
||||||
|
case PLAY_MODE_ENDLESS:
|
||||||
|
PlayAnnouncer( "gameplay comment oni", SECONDS_BETWEEN_COMMENTS );
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
ASSERT(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
PlayTicks();
|
PlayTicks();
|
||||||
|
|||||||
@@ -248,10 +248,12 @@ void ScreenJukebox::Input( const InputEventPlus &input )
|
|||||||
|
|
||||||
switch( input.MenuI )
|
switch( input.MenuI )
|
||||||
{
|
{
|
||||||
case GAME_BUTTON_LEFT:
|
case GAME_BUTTON_LEFT:
|
||||||
case GAME_BUTTON_RIGHT:
|
case GAME_BUTTON_RIGHT:
|
||||||
SCREENMAN->PostMessageToTopScreen( SM_NotesEnded, 0 );
|
SCREENMAN->PostMessageToTopScreen( SM_NotesEnded, 0 );
|
||||||
return;
|
return;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
ScreenAttract::AttractInput( input, this );
|
ScreenAttract::AttractInput( input, this );
|
||||||
|
|||||||
+40
-32
@@ -465,12 +465,13 @@ void ScreenOptions::TweenCursor( PlayerNumber pn )
|
|||||||
bool bCanGoRight = false;
|
bool bCanGoRight = false;
|
||||||
switch( row.GetRowDef().m_layoutType )
|
switch( row.GetRowDef().m_layoutType )
|
||||||
{
|
{
|
||||||
case LAYOUT_SHOW_ONE_IN_ROW:
|
case LAYOUT_SHOW_ONE_IN_ROW:
|
||||||
bCanGoLeft = iChoiceWithFocus > 0;
|
bCanGoLeft = iChoiceWithFocus > 0;
|
||||||
bCanGoRight = iChoiceWithFocus >= 0 && iChoiceWithFocus < (int) row.GetRowDef().m_vsChoices.size()-1;
|
bCanGoRight = iChoiceWithFocus >= 0 && iChoiceWithFocus < (int) row.GetRowDef().m_vsChoices.size()-1;
|
||||||
break;
|
break;
|
||||||
case LAYOUT_SHOW_ALL_IN_ROW:
|
case LAYOUT_SHOW_ALL_IN_ROW:
|
||||||
break;
|
break;
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
cursor.SetCanGo( bCanGoLeft, bCanGoRight );
|
cursor.SetCanGo( bCanGoLeft, bCanGoRight );
|
||||||
|
|
||||||
@@ -505,13 +506,15 @@ void ScreenOptions::Input( const InputEventPlus &input )
|
|||||||
{
|
{
|
||||||
switch( input.MenuI )
|
switch( input.MenuI )
|
||||||
{
|
{
|
||||||
case GAME_BUTTON_START:
|
case GAME_BUTTON_START:
|
||||||
case GAME_BUTTON_SELECT:
|
case GAME_BUTTON_SELECT:
|
||||||
case GAME_BUTTON_MENURIGHT:
|
case GAME_BUTTON_MENURIGHT:
|
||||||
case GAME_BUTTON_MENULEFT:
|
case GAME_BUTTON_MENULEFT:
|
||||||
INPUTMAPPER->ResetKeyRepeat( GAME_BUTTON_START, input.pn );
|
INPUTMAPPER->ResetKeyRepeat( GAME_BUTTON_START, input.pn );
|
||||||
INPUTMAPPER->ResetKeyRepeat( GAME_BUTTON_RIGHT, input.pn );
|
INPUTMAPPER->ResetKeyRepeat( GAME_BUTTON_RIGHT, input.pn );
|
||||||
INPUTMAPPER->ResetKeyRepeat( GAME_BUTTON_LEFT, input.pn );
|
INPUTMAPPER->ResetKeyRepeat( GAME_BUTTON_LEFT, input.pn );
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -736,12 +739,13 @@ void ScreenOptions::AfterChangeValueOrRow( PlayerNumber pn )
|
|||||||
BitmapText *pText = NULL;
|
BitmapText *pText = NULL;
|
||||||
switch( m_InputMode )
|
switch( m_InputMode )
|
||||||
{
|
{
|
||||||
case INPUTMODE_INDIVIDUAL:
|
case INPUTMODE_INDIVIDUAL:
|
||||||
pText = &m_textExplanation[pn];
|
pText = &m_textExplanation[pn];
|
||||||
break;
|
break;
|
||||||
case INPUTMODE_SHARE_CURSOR:
|
case INPUTMODE_SHARE_CURSOR:
|
||||||
pText = &m_textExplanationTogether;
|
pText = &m_textExplanationTogether;
|
||||||
break;
|
break;
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
if( pText->GetText() != text )
|
if( pText->GetText() != text )
|
||||||
{
|
{
|
||||||
@@ -787,8 +791,8 @@ void ScreenOptions::MenuStart( const InputEventPlus &input )
|
|||||||
* GAME_BUTTON_RIGHT are being held. */
|
* GAME_BUTTON_RIGHT are being held. */
|
||||||
switch( m_OptionsNavigation )
|
switch( m_OptionsNavigation )
|
||||||
{
|
{
|
||||||
case NAV_THREE_KEY:
|
case NAV_THREE_KEY:
|
||||||
case NAV_TOGGLE_THREE_KEY:
|
case NAV_TOGGLE_THREE_KEY:
|
||||||
{
|
{
|
||||||
bool bHoldingLeftAndRight =
|
bool bHoldingLeftAndRight =
|
||||||
INPUTMAPPER->IsBeingPressed( GAME_BUTTON_RIGHT, pn ) &&
|
INPUTMAPPER->IsBeingPressed( GAME_BUTTON_RIGHT, pn ) &&
|
||||||
@@ -800,6 +804,7 @@ void ScreenOptions::MenuStart( const InputEventPlus &input )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
this->ProcessMenuStart( input );
|
this->ProcessMenuStart( input );
|
||||||
@@ -1170,23 +1175,26 @@ void ScreenOptions::AfterChangeRow( PlayerNumber pn )
|
|||||||
OptionRow &row = *m_pRows[iRow];
|
OptionRow &row = *m_pRows[iRow];
|
||||||
switch( m_OptionsNavigation )
|
switch( m_OptionsNavigation )
|
||||||
{
|
{
|
||||||
case NAV_TOGGLE_FIVE_KEY:
|
case NAV_TOGGLE_FIVE_KEY:
|
||||||
if( row.GetRowDef().m_layoutType != LAYOUT_SHOW_ONE_IN_ROW )
|
|
||||||
{
|
{
|
||||||
int iSelectionDist = -1;
|
if( row.GetRowDef().m_layoutType != LAYOUT_SHOW_ONE_IN_ROW )
|
||||||
for( unsigned i = 0; i < row.GetTextItemsSize(); ++i )
|
|
||||||
{
|
{
|
||||||
int iWidth, iX, iY;
|
int iSelectionDist = -1;
|
||||||
GetWidthXY( pn, m_iCurrentRow[pn], i, iWidth, iX, iY );
|
for( unsigned i = 0; i < row.GetTextItemsSize(); ++i )
|
||||||
const int iDist = abs( iX-m_iFocusX[pn] );
|
|
||||||
if( iSelectionDist == -1 || iDist < iSelectionDist )
|
|
||||||
{
|
{
|
||||||
iSelectionDist = iDist;
|
int iWidth, iX, iY;
|
||||||
row.SetChoiceInRowWithFocus( pn, i );
|
GetWidthXY( pn, m_iCurrentRow[pn], i, iWidth, iX, iY );
|
||||||
|
const int iDist = abs( iX-m_iFocusX[pn] );
|
||||||
|
if( iSelectionDist == -1 || iDist < iSelectionDist )
|
||||||
|
{
|
||||||
|
iSelectionDist = iDist;
|
||||||
|
row.SetChoiceInRowWithFocus( pn, i );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( row.GetFirstItemGoesDown() )
|
if( row.GetFirstItemGoesDown() )
|
||||||
|
|||||||
+26
-22
@@ -118,12 +118,13 @@ void ScreenPrompt::Input( const InputEventPlus &input )
|
|||||||
{
|
{
|
||||||
switch( input.DeviceI.button )
|
switch( input.DeviceI.button )
|
||||||
{
|
{
|
||||||
case KEY_LEFT:
|
case KEY_LEFT:
|
||||||
this->MenuLeft( input );
|
this->MenuLeft( input );
|
||||||
return;
|
return;
|
||||||
case KEY_RIGHT:
|
case KEY_RIGHT:
|
||||||
this->MenuRight( input );
|
this->MenuRight( input );
|
||||||
return;
|
return;
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -198,12 +199,13 @@ void ScreenPrompt::End( bool bCancelled )
|
|||||||
{
|
{
|
||||||
switch( m_Answer )
|
switch( m_Answer )
|
||||||
{
|
{
|
||||||
case ANSWER_YES:
|
case ANSWER_YES:
|
||||||
m_smSendOnPop = SM_Success;
|
m_smSendOnPop = SM_Success;
|
||||||
break;
|
break;
|
||||||
case ANSWER_NO:
|
case ANSWER_NO:
|
||||||
m_smSendOnPop = SM_Failure;
|
m_smSendOnPop = SM_Failure;
|
||||||
break;
|
break;
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( bCancelled )
|
if( bCancelled )
|
||||||
@@ -218,14 +220,15 @@ void ScreenPrompt::End( bool bCancelled )
|
|||||||
|
|
||||||
switch( m_Answer )
|
switch( m_Answer )
|
||||||
{
|
{
|
||||||
case ANSWER_YES:
|
case ANSWER_YES:
|
||||||
if( g_pOnYes )
|
if( g_pOnYes )
|
||||||
g_pOnYes(g_pCallbackData);
|
g_pOnYes(g_pCallbackData);
|
||||||
break;
|
break;
|
||||||
case ANSWER_NO:
|
case ANSWER_NO:
|
||||||
if( g_pOnNo )
|
if( g_pOnNo )
|
||||||
g_pOnNo(g_pCallbackData);
|
g_pOnNo(g_pCallbackData);
|
||||||
break;
|
break;
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
s_LastAnswer = bCancelled ? ANSWER_CANCEL : m_Answer;
|
s_LastAnswer = bCancelled ? ANSWER_CANCEL : m_Answer;
|
||||||
@@ -251,8 +254,9 @@ void ScreenPrompt::TweenOffScreen()
|
|||||||
// lua start
|
// lua start
|
||||||
/*
|
/*
|
||||||
#include "LuaBinding.h"
|
#include "LuaBinding.h"
|
||||||
|
|
||||||
/** @brief Allow Lua to have access to the ScreenPrompt.
|
// use proper doxygen when lua is enabled.
|
||||||
|
@brief Allow Lua to have access to the ScreenPrompt.
|
||||||
class LunaScreenPrompt: public Luna<ScreenPrompt>
|
class LunaScreenPrompt: public Luna<ScreenPrompt>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -212,14 +212,15 @@ float ScreenRanking::SetPage( const PageToShow &pts )
|
|||||||
bool bShowTime = false;
|
bool bShowTime = false;
|
||||||
switch( RANKING_TYPE )
|
switch( RANKING_TYPE )
|
||||||
{
|
{
|
||||||
case RankingType_Category:
|
case RankingType_Category:
|
||||||
bShowScores = true;
|
bShowScores = true;
|
||||||
break;
|
break;
|
||||||
case RankingType_SpecificTrail:
|
case RankingType_SpecificTrail:
|
||||||
bShowScores = !pts.pCourse->IsOni();
|
bShowScores = !pts.pCourse->IsOni();
|
||||||
bShowPoints = pts.pCourse->IsOni();
|
bShowPoints = pts.pCourse->IsOni();
|
||||||
bShowTime = pts.pCourse->IsOni();
|
bShowTime = pts.pCourse->IsOni();
|
||||||
break;
|
break;
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
for( int l=0; l<NUM_RANKING_LINES; l++ )
|
for( int l=0; l<NUM_RANKING_LINES; l++ )
|
||||||
|
|||||||
@@ -205,10 +205,11 @@ void ScreenSelectCharacter::BeforeRowChange( PlayerNumber pn )
|
|||||||
PlayerNumber pnAffected = GetAffectedPlayerNumber(pn);
|
PlayerNumber pnAffected = GetAffectedPlayerNumber(pn);
|
||||||
switch( m_SelectionRow[pn] )
|
switch( m_SelectionRow[pn] )
|
||||||
{
|
{
|
||||||
case CHOOSING_CPU_CHARACTER:
|
case CHOOSING_CPU_CHARACTER:
|
||||||
case CHOOSING_HUMAN_CHARACTER:
|
case CHOOSING_HUMAN_CHARACTER:
|
||||||
m_sprCardArrows[pnAffected].StopEffect();
|
m_sprCardArrows[pnAffected].StopEffect();
|
||||||
break;
|
break;
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -217,10 +218,11 @@ void ScreenSelectCharacter::AfterRowChange( PlayerNumber pn )
|
|||||||
PlayerNumber pnAffected = GetAffectedPlayerNumber(pn);
|
PlayerNumber pnAffected = GetAffectedPlayerNumber(pn);
|
||||||
switch( m_SelectionRow[pn] )
|
switch( m_SelectionRow[pn] )
|
||||||
{
|
{
|
||||||
case CHOOSING_CPU_CHARACTER:
|
case CHOOSING_CPU_CHARACTER:
|
||||||
case CHOOSING_HUMAN_CHARACTER:
|
case CHOOSING_HUMAN_CHARACTER:
|
||||||
m_sprCardArrows[pnAffected].SetEffectGlowShift();
|
m_sprCardArrows[pnAffected].SetEffectGlowShift();
|
||||||
break;
|
break;
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -297,15 +299,18 @@ void ScreenSelectCharacter::Move( PlayerNumber pn, int deltaValue )
|
|||||||
PlayerNumber pnAffected = GetAffectedPlayerNumber(pn);
|
PlayerNumber pnAffected = GetAffectedPlayerNumber(pn);
|
||||||
switch( m_SelectionRow[pn] )
|
switch( m_SelectionRow[pn] )
|
||||||
{
|
{
|
||||||
case CHOOSING_CPU_CHARACTER:
|
case CHOOSING_CPU_CHARACTER:
|
||||||
case CHOOSING_HUMAN_CHARACTER:
|
case CHOOSING_HUMAN_CHARACTER:
|
||||||
vector<Character*> apCharacters;
|
{
|
||||||
CHARMAN->GetCharacters( apCharacters );
|
vector<Character*> apCharacters;
|
||||||
m_iSelectedCharacter[pnAffected] += deltaValue;
|
CHARMAN->GetCharacters( apCharacters );
|
||||||
wrap( m_iSelectedCharacter[pnAffected], apCharacters.size() );
|
m_iSelectedCharacter[pnAffected] += deltaValue;
|
||||||
AfterValueChange(pn);
|
wrap( m_iSelectedCharacter[pnAffected], apCharacters.size() );
|
||||||
m_soundChange.Play();
|
AfterValueChange(pn);
|
||||||
break;
|
m_soundChange.Play();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -332,12 +337,13 @@ void ScreenSelectCharacter::MakeSelection( PlayerNumber pn )
|
|||||||
BeforeRowChange(pn);
|
BeforeRowChange(pn);
|
||||||
switch( m_SelectionRow[pn] )
|
switch( m_SelectionRow[pn] )
|
||||||
{
|
{
|
||||||
case CHOOSING_HUMAN_CHARACTER:
|
case CHOOSING_HUMAN_CHARACTER:
|
||||||
m_SelectionRow[pn] = GAMESTATE->AnyPlayersAreCpu() ? CHOOSING_CPU_CHARACTER : FINISHED_CHOOSING;
|
m_SelectionRow[pn] = GAMESTATE->AnyPlayersAreCpu() ? CHOOSING_CPU_CHARACTER : FINISHED_CHOOSING;
|
||||||
break;
|
break;
|
||||||
case CHOOSING_CPU_CHARACTER:
|
case CHOOSING_CPU_CHARACTER:
|
||||||
m_SelectionRow[pn] = FINISHED_CHOOSING;
|
m_SelectionRow[pn] = FINISHED_CHOOSING;
|
||||||
break;
|
break;
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
AfterRowChange(pn);
|
AfterRowChange(pn);
|
||||||
AfterValueChange(pn);
|
AfterValueChange(pn);
|
||||||
|
|||||||
+16
-15
@@ -528,21 +528,22 @@ void ScreenSelectMusic::Input( const InputEventPlus &input )
|
|||||||
{
|
{
|
||||||
switch( input.MenuI )
|
switch( input.MenuI )
|
||||||
{
|
{
|
||||||
case GAME_BUTTON_LEFT:
|
case GAME_BUTTON_LEFT:
|
||||||
ChangeSteps( input.pn, -1 );
|
ChangeSteps( input.pn, -1 );
|
||||||
m_bAcceptSelectRelease[input.pn] = false;
|
m_bAcceptSelectRelease[input.pn] = false;
|
||||||
break;
|
break;
|
||||||
case GAME_BUTTON_RIGHT:
|
case GAME_BUTTON_RIGHT:
|
||||||
ChangeSteps( input.pn, +1 );
|
ChangeSteps( input.pn, +1 );
|
||||||
m_bAcceptSelectRelease[input.pn] = false;
|
m_bAcceptSelectRelease[input.pn] = false;
|
||||||
break;
|
break;
|
||||||
case GAME_BUTTON_START:
|
case GAME_BUTTON_START:
|
||||||
m_bAcceptSelectRelease[input.pn] = false;
|
m_bAcceptSelectRelease[input.pn] = false;
|
||||||
if( MODE_MENU_AVAILABLE )
|
if( MODE_MENU_AVAILABLE )
|
||||||
m_MusicWheel.NextSort();
|
m_MusicWheel.NextSort();
|
||||||
else
|
else
|
||||||
m_soundLocked.Play();
|
m_soundLocked.Play();
|
||||||
break;
|
break;
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if( input.type == IET_FIRST_PRESS && input.MenuI != GAME_BUTTON_SELECT )
|
else if( input.type == IET_FIRST_PRESS && input.MenuI != GAME_BUTTON_SELECT )
|
||||||
|
|||||||
+36
-24
@@ -212,12 +212,16 @@ bool ScreenSyncOverlay::OverlayInput( const InputEventPlus &input )
|
|||||||
}
|
}
|
||||||
switch( input.type )
|
switch( input.type )
|
||||||
{
|
{
|
||||||
case IET_RELEASE: fDelta *= 0; break;
|
case IET_RELEASE: fDelta *= 0; break;
|
||||||
case IET_REPEAT:
|
case IET_REPEAT:
|
||||||
if( INPUTFILTER->GetSecsHeld(input.DeviceI) < 1.0f )
|
{
|
||||||
fDelta *= 0;
|
if( INPUTFILTER->GetSecsHeld(input.DeviceI) < 1.0f )
|
||||||
else
|
fDelta *= 0;
|
||||||
fDelta *= 10;
|
else
|
||||||
|
fDelta *= 10;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
if( GAMESTATE->m_pCurSong != NULL )
|
if( GAMESTATE->m_pCurSong != NULL )
|
||||||
{
|
{
|
||||||
@@ -237,31 +241,39 @@ bool ScreenSyncOverlay::OverlayInput( const InputEventPlus &input )
|
|||||||
}
|
}
|
||||||
switch( input.type )
|
switch( input.type )
|
||||||
{
|
{
|
||||||
case IET_RELEASE: fDelta *= 0; break;
|
case IET_RELEASE: fDelta *= 0; break;
|
||||||
case IET_REPEAT:
|
case IET_REPEAT:
|
||||||
if( INPUTFILTER->GetSecsHeld(input.DeviceI) < 1.0f )
|
{
|
||||||
fDelta *= 0;
|
if( INPUTFILTER->GetSecsHeld(input.DeviceI) < 1.0f )
|
||||||
else
|
fDelta *= 0;
|
||||||
fDelta *= 10;
|
else
|
||||||
|
fDelta *= 10;
|
||||||
|
}
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch( a )
|
switch( a )
|
||||||
{
|
{
|
||||||
case ChangeGlobalOffset:
|
case ChangeGlobalOffset:
|
||||||
|
{
|
||||||
PREFSMAN->m_fGlobalOffsetSeconds.Set( PREFSMAN->m_fGlobalOffsetSeconds + fDelta );
|
PREFSMAN->m_fGlobalOffsetSeconds.Set( PREFSMAN->m_fGlobalOffsetSeconds + fDelta );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ChangeSongOffset:
|
|
||||||
if( GAMESTATE->m_pCurSong != NULL )
|
|
||||||
{
|
|
||||||
GAMESTATE->m_pCurSong->m_SongTiming.m_fBeat0OffsetInSeconds += fDelta;
|
|
||||||
const vector<Steps *>& vpSteps = GAMESTATE->m_pCurSong->GetAllSteps();
|
|
||||||
FOREACH( Steps*, const_cast<vector<Steps *>&>(vpSteps), s )
|
|
||||||
{
|
|
||||||
(*s)->m_Timing.m_fBeat0OffsetInSeconds += fDelta;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
|
case ChangeSongOffset:
|
||||||
|
{
|
||||||
|
if( GAMESTATE->m_pCurSong != NULL )
|
||||||
|
{
|
||||||
|
GAMESTATE->m_pCurSong->m_SongTiming.m_fBeat0OffsetInSeconds += fDelta;
|
||||||
|
const vector<Steps *>& vpSteps = GAMESTATE->m_pCurSong->GetAllSteps();
|
||||||
|
FOREACH( Steps*, const_cast<vector<Steps *>&>(vpSteps), s )
|
||||||
|
{
|
||||||
|
(*s)->m_Timing.m_fBeat0OffsetInSeconds += fDelta;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
+11
-6
@@ -95,14 +95,19 @@ void ScreenTestInput::Input( const InputEventPlus &input )
|
|||||||
RString sMessage = input.DeviceI.ToString();
|
RString sMessage = input.DeviceI.ToString();
|
||||||
switch( input.type )
|
switch( input.type )
|
||||||
{
|
{
|
||||||
case IET_FIRST_PRESS:
|
case IET_FIRST_PRESS:
|
||||||
case IET_RELEASE:
|
case IET_RELEASE:
|
||||||
switch( input.type )
|
|
||||||
{
|
{
|
||||||
case IET_FIRST_PRESS: sMessage += "Pressed"; break;
|
switch( input.type )
|
||||||
case IET_RELEASE: sMessage += "Released"; break;
|
{
|
||||||
|
case IET_FIRST_PRESS: sMessage += "Pressed"; break;
|
||||||
|
case IET_RELEASE: sMessage += "Released"; break;
|
||||||
|
default: break;
|
||||||
|
}
|
||||||
|
MESSAGEMAN->Broadcast( sMessage );
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
MESSAGEMAN->Broadcast( sMessage );
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
Screen::Input( input ); // default handler
|
Screen::Input( input ); // default handler
|
||||||
|
|||||||
@@ -59,12 +59,13 @@ void ScreenTestLights::Update( float fDeltaTime )
|
|||||||
|
|
||||||
switch( LIGHTSMAN->GetLightsMode() )
|
switch( LIGHTSMAN->GetLightsMode() )
|
||||||
{
|
{
|
||||||
case LIGHTSMODE_TEST_AUTO_CYCLE:
|
case LIGHTSMODE_TEST_AUTO_CYCLE:
|
||||||
s += AUTO_CYCLE.GetValue()+"\n";
|
s += AUTO_CYCLE.GetValue()+"\n";
|
||||||
break;
|
break;
|
||||||
case LIGHTSMODE_TEST_MANUAL_CYCLE:
|
case LIGHTSMODE_TEST_MANUAL_CYCLE:
|
||||||
s += MANUAL_CYCLE.GetValue()+"\n";
|
s += MANUAL_CYCLE.GetValue()+"\n";
|
||||||
break;
|
break;
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( cl == CabinetLight_Invalid )
|
if( cl == CabinetLight_Invalid )
|
||||||
|
|||||||
+44
-43
@@ -137,68 +137,69 @@ void ScreenTestSound::Input( const InputEventPlus &input )
|
|||||||
case DEVICE_KEYBOARD:
|
case DEVICE_KEYBOARD:
|
||||||
switch( input.DeviceI.button )
|
switch( input.DeviceI.button )
|
||||||
{
|
{
|
||||||
case '1':
|
case '1':
|
||||||
case '2':
|
case '2':
|
||||||
case '3':
|
case '3':
|
||||||
case '4':
|
case '4':
|
||||||
case '5': selected = input.DeviceI.button - '0'-1; break;
|
case '5': selected = input.DeviceI.button - '0'-1; break;
|
||||||
case 'p':
|
case 'p':
|
||||||
{
|
|
||||||
/* We want to be able to read the position of copied sounds; if we let
|
|
||||||
* RageSound copy itself, then the copy will be owned by RageSoundManager
|
|
||||||
* and we won't be allowed to touch it. Copy it ourself. */
|
|
||||||
RageSound *pCopy = new RageSound( s[selected].s );
|
|
||||||
m_sSoundCopies[selected].push_back( pCopy );
|
|
||||||
pCopy->Play();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 's':
|
|
||||||
for( int i = 0; i < nsounds; ++i )
|
|
||||||
{
|
{
|
||||||
/* Stop copied sounds. */
|
/* We want to be able to read the position of copied sounds; if we let
|
||||||
vector<RageSound *> &snds = m_sSoundCopies[i];
|
* RageSound copy itself, then the copy will be owned by RageSoundManager
|
||||||
for( unsigned j = 0; j < snds.size(); ++j )
|
* and we won't be allowed to touch it. Copy it ourself. */
|
||||||
snds[j]->Stop();
|
RageSound *pCopy = new RageSound( s[selected].s );
|
||||||
|
m_sSoundCopies[selected].push_back( pCopy );
|
||||||
|
pCopy->Play();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
case 's':
|
||||||
case 'l':
|
{
|
||||||
|
for( int i = 0; i < nsounds; ++i )
|
||||||
|
{
|
||||||
|
/* Stop copied sounds. */
|
||||||
|
vector<RageSound *> &snds = m_sSoundCopies[i];
|
||||||
|
for( unsigned j = 0; j < snds.size(); ++j )
|
||||||
|
snds[j]->Stop();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 'l':
|
||||||
{
|
{
|
||||||
RageSoundParams p = s[selected].s.GetParams();
|
RageSoundParams p = s[selected].s.GetParams();
|
||||||
p.StopMode = RageSoundParams::M_LOOP;
|
p.StopMode = RageSoundParams::M_LOOP;
|
||||||
s[selected].s.SetParams( p );
|
s[selected].s.SetParams( p );
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
case 'a':
|
||||||
break;
|
|
||||||
case 'a':
|
|
||||||
{
|
{
|
||||||
RageSoundParams p = s[selected].s.GetParams();
|
RageSoundParams p = s[selected].s.GetParams();
|
||||||
p.StopMode = RageSoundParams::M_STOP;
|
p.StopMode = RageSoundParams::M_STOP;
|
||||||
s[selected].s.SetParams( p );
|
s[selected].s.SetParams( p );
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
case 'c':
|
||||||
case 'c':
|
|
||||||
{
|
{
|
||||||
RageSoundParams p = s[selected].s.GetParams();
|
RageSoundParams p = s[selected].s.GetParams();
|
||||||
p.StopMode = RageSoundParams::M_CONTINUE;
|
p.StopMode = RageSoundParams::M_CONTINUE;
|
||||||
s[selected].s.SetParams( p );
|
s[selected].s.SetParams( p );
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
/* case KEY_LEFT:
|
||||||
|
obj.SetX(obj.GetX() - 10);
|
||||||
/* case KEY_LEFT:
|
break;
|
||||||
obj.SetX(obj.GetX() - 10);
|
case KEY_RIGHT:
|
||||||
break;
|
obj.SetX(obj.GetX() + 10);
|
||||||
case KEY_RIGHT:
|
break;
|
||||||
obj.SetX(obj.GetX() + 10);
|
case KEY_UP:
|
||||||
break;
|
obj.SetY(obj.GetY() - 10);
|
||||||
case KEY_UP:
|
break;
|
||||||
obj.SetY(obj.GetY() - 10);
|
case KEY_DOWN:
|
||||||
break;
|
obj.SetY(obj.GetY() + 10);
|
||||||
case KEY_DOWN:
|
break;
|
||||||
obj.SetY(obj.GetY() + 10);
|
|
||||||
break;
|
|
||||||
*/
|
*/
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -200,10 +200,11 @@ void ScreenTextEntry::Input( const InputEventPlus &input )
|
|||||||
{
|
{
|
||||||
switch( input.type )
|
switch( input.type )
|
||||||
{
|
{
|
||||||
case IET_FIRST_PRESS:
|
case IET_FIRST_PRESS:
|
||||||
case IET_REPEAT:
|
case IET_REPEAT:
|
||||||
BackspaceInAnswer();
|
BackspaceInAnswer();
|
||||||
break;
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if( input.type == IET_FIRST_PRESS )
|
else if( input.type == IET_FIRST_PRESS )
|
||||||
|
|||||||
+6
-5
@@ -497,7 +497,7 @@ RageColor SongManager::GetSongColor( const Song* pSong ) const
|
|||||||
int i = m_vPreferredSongSort.size();
|
int i = m_vPreferredSongSort.size();
|
||||||
return SONG_GROUP_COLOR.GetValue( i%NUM_SONG_GROUP_COLORS );
|
return SONG_GROUP_COLOR.GetValue( i%NUM_SONG_GROUP_COLORS );
|
||||||
}
|
}
|
||||||
else
|
else // TODO: Have a better fallback plan with colors?
|
||||||
{
|
{
|
||||||
/* XXX: Previously, this matched all notes, which set a song to "extra"
|
/* XXX: Previously, this matched all notes, which set a song to "extra"
|
||||||
* if it had any 10-foot steps at all, even edits or doubles.
|
* if it had any 10-foot steps at all, even edits or doubles.
|
||||||
@@ -516,9 +516,10 @@ RageColor SongManager::GetSongColor( const Song* pSong ) const
|
|||||||
const Steps* pSteps = vpSteps[i];
|
const Steps* pSteps = vpSteps[i];
|
||||||
switch( pSteps->GetDifficulty() )
|
switch( pSteps->GetDifficulty() )
|
||||||
{
|
{
|
||||||
case Difficulty_Challenge:
|
case Difficulty_Challenge:
|
||||||
case Difficulty_Edit:
|
case Difficulty_Edit:
|
||||||
continue;
|
continue;
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//if(pSteps->m_StepsType != st)
|
//if(pSteps->m_StepsType != st)
|
||||||
@@ -527,7 +528,7 @@ RageColor SongManager::GetSongColor( const Song* pSong ) const
|
|||||||
if( pSteps->GetMeter() >= EXTRA_COLOR_METER )
|
if( pSteps->GetMeter() >= EXTRA_COLOR_METER )
|
||||||
return (RageColor)EXTRA_COLOR;
|
return (RageColor)EXTRA_COLOR;
|
||||||
}
|
}
|
||||||
if( pSong->m_sMainTitle == "DVNO")
|
if( pSong->m_sMainTitle == "DVNO") // XXX: What IS this? An easter egg? -Wolfman2000
|
||||||
{
|
{
|
||||||
return RageColor(1.0f,0.8f,0.0f,1.0f);
|
return RageColor(1.0f,0.8f,0.0f,1.0f);
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-3
@@ -166,9 +166,10 @@ void StageStats::FinalizeScores( bool bSummary )
|
|||||||
{
|
{
|
||||||
switch( GAMESTATE->m_PlayMode )
|
switch( GAMESTATE->m_PlayMode )
|
||||||
{
|
{
|
||||||
case PLAY_MODE_BATTLE:
|
case PLAY_MODE_BATTLE:
|
||||||
case PLAY_MODE_RAVE:
|
case PLAY_MODE_RAVE:
|
||||||
return; // don't save scores in battle
|
return; // don't save scores in battle
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( PREFSMAN->m_sTestInitialScreen.Get() != "" )
|
if( PREFSMAN->m_sTestInitialScreen.Get() != "" )
|
||||||
|
|||||||
+22
-21
@@ -1273,28 +1273,29 @@ bool HandleGlobalInputs( const InputEventPlus &input )
|
|||||||
|
|
||||||
switch( input.MenuI )
|
switch( input.MenuI )
|
||||||
{
|
{
|
||||||
case GAME_BUTTON_OPERATOR:
|
case GAME_BUTTON_OPERATOR:
|
||||||
/* Global operator key, to get quick access to the options menu. Don't
|
/* Global operator key, to get quick access to the options menu. Don't
|
||||||
* do this if we're on a "system menu", which includes the editor
|
* do this if we're on a "system menu", which includes the editor
|
||||||
* (to prevent quitting without storing changes). */
|
* (to prevent quitting without storing changes). */
|
||||||
if( SCREENMAN->AllowOperatorMenuButton() )
|
if( SCREENMAN->AllowOperatorMenuButton() )
|
||||||
{
|
{
|
||||||
SCREENMAN->SystemMessage( SERVICE_SWITCH_PRESSED );
|
SCREENMAN->SystemMessage( SERVICE_SWITCH_PRESSED );
|
||||||
SCREENMAN->PopAllScreens();
|
SCREENMAN->PopAllScreens();
|
||||||
GAMESTATE->Reset();
|
GAMESTATE->Reset();
|
||||||
SCREENMAN->SetNewScreen( CommonMetrics::OPERATOR_MENU_SCREEN );
|
SCREENMAN->SetNewScreen( CommonMetrics::OPERATOR_MENU_SCREEN );
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case GAME_BUTTON_COIN:
|
case GAME_BUTTON_COIN:
|
||||||
// Handle a coin insertion.
|
// Handle a coin insertion.
|
||||||
if( GAMESTATE->IsEditing() ) // no coins while editing
|
if( GAMESTATE->IsEditing() ) // no coins while editing
|
||||||
{
|
{
|
||||||
LOG->Trace( "Ignored coin insertion (editing)" );
|
LOG->Trace( "Ignored coin insertion (editing)" );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
StepMania::InsertCoin();
|
StepMania::InsertCoin();
|
||||||
return false; // Attract needs to know because it goes to TitleMenu on > 1 credit
|
return false; // Attract needs to know because it goes to TitleMenu on > 1 credit
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Re-added for StepMania 3.9 theming veterans, plus it's just faster than
|
/* Re-added for StepMania 3.9 theming veterans, plus it's just faster than
|
||||||
|
|||||||
+15
-10
@@ -268,18 +268,20 @@ static float GetArcadePoints( const Profile *pProfile )
|
|||||||
{
|
{
|
||||||
switch(pm)
|
switch(pm)
|
||||||
{
|
{
|
||||||
case PLAY_MODE_NONSTOP:
|
case PLAY_MODE_NONSTOP:
|
||||||
case PLAY_MODE_ONI:
|
case PLAY_MODE_ONI:
|
||||||
case PLAY_MODE_ENDLESS:
|
case PLAY_MODE_ENDLESS:
|
||||||
fAP += pProfile->m_iNumSongsPlayedByPlayMode[pm];
|
{
|
||||||
break;
|
fAP += pProfile->m_iNumSongsPlayedByPlayMode[pm];
|
||||||
|
}
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return fAP;
|
return fAP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Make this more flexible for games with many grade tiers. Lua-ize it? -Wolfman2000
|
||||||
static float GetSongPoints( const Profile *pProfile )
|
static float GetSongPoints( const Profile *pProfile )
|
||||||
{
|
{
|
||||||
float fSP = 0;
|
float fSP = 0;
|
||||||
@@ -297,6 +299,7 @@ static float GetSongPoints( const Profile *pProfile )
|
|||||||
case Grade_Tier07:/*D*/ fSP += 1* pProfile->m_iNumStagesPassedByGrade[g]; break;
|
case Grade_Tier07:/*D*/ fSP += 1* pProfile->m_iNumStagesPassedByGrade[g]; break;
|
||||||
case Grade_Failed:
|
case Grade_Failed:
|
||||||
case Grade_NoData:
|
case Grade_NoData:
|
||||||
|
default:
|
||||||
; // no points
|
; // no points
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -306,11 +309,13 @@ static float GetSongPoints( const Profile *pProfile )
|
|||||||
{
|
{
|
||||||
switch(pm)
|
switch(pm)
|
||||||
{
|
{
|
||||||
case PLAY_MODE_NONSTOP:
|
case PLAY_MODE_NONSTOP:
|
||||||
case PLAY_MODE_ONI:
|
case PLAY_MODE_ONI:
|
||||||
case PLAY_MODE_ENDLESS:
|
case PLAY_MODE_ENDLESS:
|
||||||
|
{
|
||||||
fSP += pProfile->m_iNumSongsPlayedByPlayMode[pm];
|
fSP += pProfile->m_iNumSongsPlayedByPlayMode[pm];
|
||||||
break;
|
}
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -347,6 +347,7 @@ RString InputHandler_MacOSX_HID::GetDeviceSpecificInputString( const DeviceInput
|
|||||||
case OTHER(48): return "non US backslash";
|
case OTHER(48): return "non US backslash";
|
||||||
case OTHER(49): return "application";
|
case OTHER(49): return "application";
|
||||||
case OTHER(50): return "prior";
|
case OTHER(50): return "prior";
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
#undef OTHER
|
#undef OTHER
|
||||||
}
|
}
|
||||||
@@ -365,6 +366,7 @@ RString InputHandler_MacOSX_HID::GetDeviceSpecificInputString( const DeviceInput
|
|||||||
case JOY_BUTTON_9: return "P2 MID";
|
case JOY_BUTTON_9: return "P2 MID";
|
||||||
case JOY_BUTTON_10: return "P2 DL";
|
case JOY_BUTTON_10: return "P2 DL";
|
||||||
case JOY_BUTTON_11: return "P2 DR";
|
case JOY_BUTTON_11: return "P2 DR";
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user