Removed hardcoded level file path and moved it into the config.xml.
This commit is contained in:
parent
370135fca8
commit
63acfef341
@ -21,8 +21,7 @@
|
||||
|
||||
<heightmapPath>data/levels/</heightmapPath>
|
||||
|
||||
<levelXmlPath>data/levels/</levelXmlPath>
|
||||
|
||||
<levelXmlPath>data/levels/Level1.xml</levelXmlPath>
|
||||
|
||||
<!-- must be located in the textures directory -->
|
||||
<loadingScreen>
|
||||
|
@ -22,8 +22,7 @@ void Application::init()
|
||||
}
|
||||
|
||||
void Application::initLevel() {
|
||||
std::string levelXmlFilePath = levelXmlPath + "Level1.xml";
|
||||
this->level = Level(levelXmlFilePath);
|
||||
this->level = Level(levelXmlPath);
|
||||
level.getPhysics()->init(geometryPath);
|
||||
// Don't change this!
|
||||
ignoredMouseUpdates = 0;
|
||||
@ -36,7 +35,7 @@ void Application::initLevel() {
|
||||
level.load();
|
||||
Loader loader = Loader();
|
||||
|
||||
loader.load(levelXmlFilePath, &level, compositionsPath, scriptPath, geometryPath, texturePath, heightmapPath);
|
||||
loader.load(levelXmlPath, &level, compositionsPath, scriptPath, geometryPath, texturePath, heightmapPath);
|
||||
graphics.init(&level);
|
||||
|
||||
// just in case: check for errors
|
||||
|
Loading…
Reference in New Issue
Block a user