Allow 15 edits per profile.

This commit is contained in:
Jason Felds
2011-06-11 15:24:16 -04:00
parent d90c8cfe07
commit 87d151687f
2 changed files with 6 additions and 14 deletions
+4 -12
View File
@@ -11,18 +11,10 @@
#include "SongUtil.h"
#include "XmlFile.h"
// MAX_METERS was previously set to NUM_Difficulty + MAX_EDITS_PER_SONG.
// This was all fine and well until AutoSetStyle was created. In certain
// gametypes (technomotion for example), if autogen is on, the number of
// available stepcharts exceeds MAX_METERS, resulting in a crash.
// My first thought to fix this was:
// (NUM_Difficulty (6) * NUM_StepsType (32)) + MAX_EDITS_PER_SONG (5*profileSlot (2)) = 202
// However, 202 rows may be a bit overkill.
// Dance has 6 stepstypes counting 3panel, Pump and Techno have 5.
// (6 difficulties * 6 stepstypes) + MAX_EDITS_PER_SONG (which is 5 * profileSlots) = 46 rows
// 46 seems to be a good enough number for this. If we get a crash again, up the
// "magic" 6. -aj
#define MAX_METERS (NUM_Difficulty * 6) + MAX_EDITS_PER_SONG
/** @brief Specifies the max number of charts available for a song.
*
* This includes autogenned charts. */
#define MAX_METERS (NUM_Difficulty * NUM_StepsType) + MAX_EDITS_PER_SONG
REGISTER_ACTOR_CLASS( StepsDisplayList );
+2 -2
View File
@@ -20,9 +20,9 @@ struct BackgroundChange;
const static float STEPFILE_VERSION_NUMBER = 0.7f;
/** @brief How many edits for this song can each profile have? */
const int MAX_EDITS_PER_SONG_PER_PROFILE = 5;
const int MAX_EDITS_PER_SONG_PER_PROFILE = 15;
/** @brief How many edits for this song can be available? */
const int MAX_EDITS_PER_SONG = 5*NUM_ProfileSlot;
const int MAX_EDITS_PER_SONG = MAX_EDITS_PER_SONG_PER_PROFILE * NUM_ProfileSlot;
extern const int FILE_CACHE_VERSION;