Merge pull request #326 from InfoTeddy/general-refactors

Refactor how custom level stats are stored, read, and written
This commit is contained in:
Ethan Lee
2020-06-29 22:31:03 -04:00
committed by GitHub
2 changed files with 137 additions and 85 deletions

View File

@@ -76,6 +76,12 @@ struct MenuStackFrame
enum Menu::MenuName name;
};
struct CustomLevelStat
{
std::string name;
int score; //0 - not played, 1 - finished, 2 - all trinkets, 3 - finished, all trinkets
};
class Game
{
@@ -364,9 +370,7 @@ public:
void savecustomlevelstats();
void updatecustomlevelstats(std::string clevel, int cscore);
std::string customlevelstats[200]; //string array containing level filenames
int customlevelscore[200];//0 - not played, 1 - finished, 2 - all trinkets, 3 - finished, all trinkets
int numcustomlevelstats;
std::vector<CustomLevelStat> customlevelstats;
bool customlevelstatsloaded;