added ability to reference sound and videos in lua using variables: {TECHTREEPATH}, {SCENARIOPATH}, {TUTORIALPATH} example:

playStreamingSound('{SCENARIOPATH}/music/myambient.ogg')
This commit is contained in:
Mark Vejvoda
2013-05-28 02:54:23 +00:00
parent 7ee5d2b300
commit 72480bc576
5 changed files with 96 additions and 16 deletions

View File

@@ -49,6 +49,10 @@ private:
static string applicationPath;
static string gameVersion;
static string techtreePath;
static string scenarioPath;
static string tutorialPath;
public:
static void setApplicationPath(string value) { applicationPath=value; }
static string getApplicationPath() { return applicationPath; }
@@ -56,6 +60,13 @@ public:
static void setGameVersion(string value) { gameVersion=value; }
static string getGameVersion() { return gameVersion; }
static void setTechtreePath(string value) { techtreePath=value; }
static string getTechtreePath() { return techtreePath; }
static void setScenarioPath(string value) { scenarioPath=value; }
static string getScenarioPath() { return scenarioPath; }
static void setTutorialPath(string value) { tutorialPath=value; }
static string getTutorialPath() { return tutorialPath; }
void clear();
void load(const string &path,bool clearCurrentProperties=true);
void save(const string &path);