[default -> sm130futures] bring in updates.

This commit is contained in:
Jason Felds
2011-03-31 15:24:55 -04:00
10 changed files with 33 additions and 16 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ ret.Redir = function(sButton, sElement)
-- Test -- Test
if sElement == "Hold Head Inactive" or if sElement == "Hold Head Inactive" or
sElement == "Roll Head Inactive" or sElement == "Roll Head Inactive"
then then
sElement = "StreamHead Inactive"; sElement = "StreamHead Inactive";
end end
+2 -1
View File
@@ -3615,13 +3615,14 @@ CancelTransitionsOut=true
PlayMusic=false PlayMusic=false
TimerSeconds=-1 TimerSeconds=-1
ShowStyleIcon=false ShowStyleIcon=false
LineNames="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16" LineNames="1,2,3,4,5,6,R,7,8,9,10,11,12,13,14,15,16"
Line1="list,Speed" Line1="list,Speed"
Line2="list,Accel" Line2="list,Accel"
Line3="list,Effect" Line3="list,Effect"
Line4="list,Appearance" Line4="list,Appearance"
Line5="list,Turn" Line5="list,Turn"
Line6="list,Insert" Line6="list,Insert"
LineR="list,Remove"
Line7="list,Scroll" Line7="list,Scroll"
Line8="list,NoteSkins" Line8="list,NoteSkins"
Line9="list,Holds" Line9="list,Holds"
+1 -1
View File
@@ -99,7 +99,7 @@ void AutoKeysounds::LoadAutoplaySoundsInto( RageSoundReader_Chain *pChain )
if( tn[pn].iKeysoundIndex >= 0 ) if( tn[pn].iKeysoundIndex >= 0 )
{ {
RString sKeysoundFilePath = sSongDir + pSong->m_vsKeysoundFile[tn[pn].iKeysoundIndex]; RString sKeysoundFilePath = sSongDir + pSong->m_vsKeysoundFile[tn[pn].iKeysoundIndex];
float fSeconds = pSong->m_Timing.GetElapsedTimeFromBeat( NoteRowToBeat(iRow) ); float fSeconds = pSong->m_Timing.GetElapsedTimeFromBeatNoOffset( NoteRowToBeat(iRow) );
float fPan = 0; float fPan = 0;
if( !bSoundIsGlobal ) if( !bSoundIsGlobal )
+4 -4
View File
@@ -142,9 +142,9 @@ static void StartMusic( MusicToPlay &ToPlay )
{ {
LOG->Trace( "Found '%s'", ToPlay.m_sTimingFile.c_str() ); LOG->Trace( "Found '%s'", ToPlay.m_sTimingFile.c_str() );
Song song; Song song;
if( GetExtension(ToPlay.m_sTimingFile.c_str()) == ".ssc" ) if( GetExtension(ToPlay.m_sTimingFile.c_str()) == ".ssc" &&
SSCLoader::LoadFromSSCFile(ToPlay.m_sTimingFile, song) )
{ {
SSCLoader::LoadFromSSCFile(ToPlay.m_sTimingFile, song);
ToPlay.HasTiming = true; ToPlay.HasTiming = true;
ToPlay.m_TimingData = song.m_Timing; ToPlay.m_TimingData = song.m_Timing;
// get cabinet lights if any // get cabinet lights if any
@@ -152,9 +152,9 @@ static void StartMusic( MusicToPlay &ToPlay )
if( pStepsCabinetLights ) if( pStepsCabinetLights )
pStepsCabinetLights->GetNoteData( ToPlay.m_LightsData ); pStepsCabinetLights->GetNoteData( ToPlay.m_LightsData );
} }
else if( GetExtension(ToPlay.m_sTimingFile.c_str()) == ".sm" ) else if( GetExtension(ToPlay.m_sTimingFile.c_str()) == ".sm" &&
SMLoader::LoadFromSMFile(ToPlay.m_sTimingFile, song) )
{ {
SMLoader::LoadFromSMFile(ToPlay.m_sTimingFile, song);
ToPlay.HasTiming = true; ToPlay.HasTiming = true;
ToPlay.m_TimingData = song.m_Timing; ToPlay.m_TimingData = song.m_Timing;
// get cabinet lights if any // get cabinet lights if any
+1 -3
View File
@@ -287,7 +287,7 @@ static RString GetSMNotesTag( const Song &song, const Steps &in )
return JoinLineList( lines ); return JoinLineList( lines );
} }
bool NotesWriterSM::Write( RString sPath, const Song &out ) bool NotesWriterSM::Write( RString sPath, const Song &out, const vector<Steps*>& vpStepsToSave )
{ {
int flags = RageFile::WRITE; int flags = RageFile::WRITE;
@@ -302,8 +302,6 @@ bool NotesWriterSM::Write( RString sPath, const Song &out )
WriteGlobalTags( f, out ); WriteGlobalTags( f, out );
// Save specified Steps to this file
const vector<Steps*>& vpStepsToSave = out.GetAllSteps();
FOREACH_CONST( Steps*, vpStepsToSave, s ) FOREACH_CONST( Steps*, vpStepsToSave, s )
{ {
const Steps* pSteps = *s; const Steps* pSteps = *s;
+1 -1
View File
@@ -11,7 +11,7 @@ namespace NotesWriterSM
* @param sPath the path to write the file. * @param sPath the path to write the file.
* @param out the Song to be written out. * @param out the Song to be written out.
* @return its success or failure. */ * @return its success or failure. */
bool Write( RString sPath, const Song &out ); bool Write( RString sPath, const Song &out, const vector<Steps*>& vpStepsToSave );
/** /**
* @brief Get some contents about the edit file first. * @brief Get some contents about the edit file first.
* @param pSong the Song in question. * @param pSong the Song in question.
+4 -1
View File
@@ -1973,7 +1973,10 @@ void Player::StepStrumHopo( int col, int row, const RageTimer &tm, bool bHeld, b
* Either option would fundamentally change the grading of two quick notes * Either option would fundamentally change the grading of two quick notes
* "jack hammers." Hmm. * "jack hammers." Hmm.
*/ */
const int iStepSearchRows = BeatToNoteRow( GAMESTATE->m_pCurSong->m_Timing.GetBeatFromElapsedTime( GAMESTATE->m_fMusicSeconds + StepSearchDistance ) ) - iSongRow; const int iStepSearchRows = max(
BeatToNoteRow( GAMESTATE->m_pCurSong->m_Timing.GetBeatFromElapsedTime( GAMESTATE->m_fMusicSeconds + StepSearchDistance ) ) - iSongRow,
iSongRow - BeatToNoteRow( GAMESTATE->m_pCurSong->m_Timing.GetBeatFromElapsedTime( GAMESTATE->m_fMusicSeconds - StepSearchDistance ) )
) + ROWS_PER_BEAT;
int iRowOfOverlappingNoteOrRow = row; int iRowOfOverlappingNoteOrRow = row;
if( row == -1 ) if( row == -1 )
{ {
+16 -1
View File
@@ -925,7 +925,22 @@ bool Song::SaveToSMFile()
// If the file exists, make a backup. // If the file exists, make a backup.
if( IsAFile(sPath) ) if( IsAFile(sPath) )
FileCopy( sPath, sPath + ".old" ); FileCopy( sPath, sPath + ".old" );
return NotesWriterSM::Write( sPath, *this );
vector<Steps*> vpStepsToSave;
FOREACH_CONST( Steps*, m_vpSteps, s )
{
Steps *pSteps = *s;
if( pSteps->IsAutogen() )
continue; // don't write autogen notes
// Only save steps that weren't loaded from a profile.
if( pSteps->WasLoadedFromProfile() )
continue;
vpStepsToSave.push_back( pSteps );
}
return NotesWriterSM::Write( sPath, *this, vpStepsToSave );
} }
+1 -1
View File
@@ -546,7 +546,7 @@ void TimingData::GetBeatAndBPSFromElapsedTimeNoOffset( float fElapsedTime, float
fBPS = itBPMS->m_fBPS; fBPS = itBPMS->m_fBPS;
itBPMS ++; itBPMS ++;
break; break;
case FOUND_STOP: // TODO: update for Delays. case FOUND_STOP:
{ {
fTimeToNextEvent = itSS->m_fStopSeconds; fTimeToNextEvent = itSS->m_fStopSeconds;
fNextEventTime = fLastTime + fTimeToNextEvent; fNextEventTime = fLastTime + fTimeToNextEvent;
@@ -247,10 +247,10 @@ InputHandler_MacOSX_HID::InputHandler_MacOSX_HID() : m_Sem( "Input thread starte
// Add devices. // Add devices.
LOG->Trace( "Finding keyboards" ); LOG->Trace( "Finding keyboards" );
AddDevices( kHIDPage_GenericDesktop, kHIDUsage_GD_Keyboard, id ); AddDevices( kHIDPage_GenericDesktop, kHIDUsage_GD_Keyboard, id );
/*
LOG->Trace( "Finding mice" ); LOG->Trace( "Finding mice" );
AddDevices( kHIDPage_GenericDesktop, kHIDUsage_GD_Mouse, id ); AddDevices( kHIDPage_GenericDesktop, kHIDUsage_GD_Mouse, id );
*/
LOG->Trace( "Finding joysticks" ); LOG->Trace( "Finding joysticks" );
id = DEVICE_JOY1; id = DEVICE_JOY1;
AddDevices( kHIDPage_GenericDesktop, kHIDUsage_GD_Joystick, id ); AddDevices( kHIDPage_GenericDesktop, kHIDUsage_GD_Joystick, id );