implement load config on game restart
This commit is contained in:
@@ -9,7 +9,6 @@
|
||||
#include "LogManager.h"
|
||||
#include "MainWindow.h"
|
||||
#include "Simulation.h"
|
||||
#include "VisualsLoader.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
@@ -33,10 +32,9 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
GameConfig config = ConfigLoader::loadFromDirectory(DOTA_FACTORY_CONFIG_DIR);
|
||||
VisualsConfig visuals = VisualsLoader::load(std::string(DOTA_FACTORY_CONFIG_DIR) + "/visuals.toml");
|
||||
std::unique_ptr<Simulation> sim = std::make_unique<Simulation>(config);
|
||||
std::unique_ptr<Simulation> sim = std::make_unique<Simulation>(std::move(config));
|
||||
|
||||
MainWindow window(sim.get(), &config, &visuals);
|
||||
MainWindow window(sim.get(), std::string(DOTA_FACTORY_CONFIG_DIR));
|
||||
window.show();
|
||||
|
||||
const int ret = application.exec();
|
||||
|
||||
Reference in New Issue
Block a user