Game::endgame = 0;
}
- Account::saveFile(Folders::getUserDataPath()+"/users");
+ Account::saveFile(Folders::getUserSavePath());
//textures.clear();
numchallengelevels = 14;
- Account::loadFile(Folders::getUserDataPath()+"/users");
+ Account::loadFile(Folders::getUserSavePath());
whichjointstartarray[0] = righthip;
whichjointendarray[0] = rightfoot;
Account::active().winLevel(whichlevel, bonustotal - startbonustotal, leveltime);
}
won = 1;
+ Account::active().saveFile(Folders::getUserSavePath());
}
}
return screenshotDir;
}
-std::string Folders::getResourcePath(std::string filepath)
-{
- return dataDir + '/' + filepath;
-}
-
std::string Folders::getUserDataPath()
{
std::string userDataPath;
/* Returns path to the screenshot directory. Creates it if needed. */
static std::string getScreenshotDir();
- /* Returns full path for a game resource */
- static std::string getResourcePath(std::string filepath);
-
/* Returns full path for user data */
static std::string getUserDataPath();
static FILE* openMandatoryFile(std::string filename, const char* mode);
+ /* Returns full path for a game resource */
+ static inline std::string getResourcePath(std::string filepath) { return dataDir + '/' + filepath; }
+
+ /* Returns full path for user progress save */
+ static inline std::string getUserSavePath() { return getUserDataPath() + "/users"; }
+
private:
static const char* getHomeDirectory();
static std::string getGenericDirectory(const char* ENVVAR, const std::string fallback);