Attacks can be saved in the editor.
It's more flexible to do it by hand though.
This commit is contained in:
@@ -91,6 +91,19 @@ bool AttackArray::ContainsTransformOrTurn() const
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
vector<RString> AttackArray::ToVectorString() const
|
||||||
|
{
|
||||||
|
vector<RString> ret;
|
||||||
|
FOREACH_CONST( Attack, *this, a )
|
||||||
|
{
|
||||||
|
ret.push_back(ssprintf("TIME=%f:LEN=%f:MODS=%s",
|
||||||
|
a->fStartSecond,
|
||||||
|
a->fSecsRemaining,
|
||||||
|
a->sModifiers.c_str()));
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (c) 2003-2004 Chris Danford
|
* (c) 2003-2004 Chris Danford
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
|||||||
@@ -71,6 +71,11 @@ struct AttackArray : public vector<Attack>
|
|||||||
* @brief Determine if the list of attacks contains a transform or turn mod.
|
* @brief Determine if the list of attacks contains a transform or turn mod.
|
||||||
* @return true if it does, or false otherwise. */
|
* @return true if it does, or false otherwise. */
|
||||||
bool ContainsTransformOrTurn() const;
|
bool ContainsTransformOrTurn() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Return a string representation used for simfiles.
|
||||||
|
* @return the string representation. */
|
||||||
|
vector<RString> ToVectorString() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -329,7 +329,8 @@ static RString GetSSCNoteData( const Song &song, const Steps &in, bool bSavingCa
|
|||||||
if( a != (in.m_sAttackString.size() - 1) )
|
if( a != (in.m_sAttackString.size() - 1) )
|
||||||
attacks += ":"; // Not the end, so write a divider ':'
|
attacks += ":"; // Not the end, so write a divider ':'
|
||||||
}
|
}
|
||||||
lines.push_back( ssprintf( "#ATTACKS%s;", attacks.c_str()));
|
Trim(attacks, ":"); // just in case something screwy happens.
|
||||||
|
lines.push_back( ssprintf( "#ATTACKS:%s;", attacks.c_str()));
|
||||||
|
|
||||||
lines.push_back( ssprintf( "#OFFSET:%.6f;", in.m_Timing.m_fBeat0OffsetInSeconds ) );
|
lines.push_back( ssprintf( "#OFFSET:%.6f;", in.m_Timing.m_fBeat0OffsetInSeconds ) );
|
||||||
|
|
||||||
|
|||||||
@@ -3526,6 +3526,12 @@ void ScreenEdit::HandleMainMenuChoice( MainMenuChoice c, const vector<int> &iAns
|
|||||||
// copy edit into current Steps
|
// copy edit into current Steps
|
||||||
m_pSteps->SetNoteData( m_NoteDataEdit );
|
m_pSteps->SetNoteData( m_NoteDataEdit );
|
||||||
|
|
||||||
|
// don't forget the attacks.
|
||||||
|
m_pSong->m_Attacks = GAMESTATE->m_pCurSong->m_Attacks;
|
||||||
|
m_pSong->m_sAttackString = GAMESTATE->m_pCurSong->m_Attacks.ToVectorString();
|
||||||
|
m_pSteps->m_Attacks = GAMESTATE->m_pCurSteps[PLAYER_1]->m_Attacks;
|
||||||
|
m_pSteps->m_sAttackString = GAMESTATE->m_pCurSteps[PLAYER_1]->m_Attacks.ToVectorString();
|
||||||
|
|
||||||
switch( EDIT_MODE.GetValue() )
|
switch( EDIT_MODE.GetValue() )
|
||||||
{
|
{
|
||||||
DEFAULT_FAIL( EDIT_MODE.GetValue() );
|
DEFAULT_FAIL( EDIT_MODE.GetValue() );
|
||||||
|
|||||||
+1
-1
@@ -41,7 +41,7 @@
|
|||||||
* @brief The internal version of the cache for StepMania.
|
* @brief The internal version of the cache for StepMania.
|
||||||
*
|
*
|
||||||
* Increment this value to invalidate the current cache. */
|
* Increment this value to invalidate the current cache. */
|
||||||
const int FILE_CACHE_VERSION = 183;
|
const int FILE_CACHE_VERSION = 184;
|
||||||
|
|
||||||
/** @brief How long does a song sample last by default? */
|
/** @brief How long does a song sample last by default? */
|
||||||
const float DEFAULT_MUSIC_SAMPLE_LENGTH = 12.f;
|
const float DEFAULT_MUSIC_SAMPLE_LENGTH = 12.f;
|
||||||
|
|||||||
Reference in New Issue
Block a user