Special case kickbox autogen added. GameState now has a member for passing args from the theme to the autogen, only used by kickbox for kick recovery time.

This commit is contained in:
Kyzentun
2015-01-26 19:43:15 -07:00
parent b6e9d188c3
commit c69cf1ef4e
5 changed files with 233 additions and 2 deletions
+23 -2
View File
@@ -352,6 +352,12 @@ void Steps::Decompress() const
const_cast<Steps *>(this)->Decompress();
}
bool stepstype_is_kickbox(StepsType st)
{
return st == StepsType_kickbox_human || st == StepsType_kickbox_quadarm ||
st == StepsType_kickbox_insect || st == StepsType_kickbox_arachnid;
}
void Steps::Decompress()
{
if( m_bNoteDataIsFilled )
@@ -373,9 +379,24 @@ void Steps::Decompress()
}
else
{
NoteDataUtil::LoadTransformedSlidingWindow( notedata, *m_pNoteData, iNewTracks );
// Special case so that kickbox can have autogen steps that are playable.
// Hopefully I'll replace this with a good generalized autogen system
// later. -Kyz
if(stepstype_is_kickbox(this->m_StepsType))
{
// Number of notes seems like a useful "random" input so that charts
// from different sources come out different, but autogen always
// makes the same thing from one source. -Kyz
NoteDataUtil::AutogenKickbox(notedata, *m_pNoteData, *GetTimingData(),
this->m_StepsType,
static_cast<int>(GetRadarValues(PLAYER_1)[RadarCategory_TapsAndHolds]));
}
else
{
NoteDataUtil::LoadTransformedSlidingWindow( notedata, *m_pNoteData, iNewTracks );
NoteDataUtil::RemoveStretch( *m_pNoteData, m_StepsType );
NoteDataUtil::RemoveStretch( *m_pNoteData, m_StepsType );
}
}
return;
}