diff options
author | ClarkeCode <clarke.john.robert@gmail.com> | 2023-06-14 05:41:28 +0200 |
---|---|---|
committer | ClarkeCode <clarke.john.robert@gmail.com> | 2023-06-18 07:04:24 +0200 |
commit | 741cfe452156f7c6365d1a66b6228e15ef660bf6 (patch) | |
tree | 893e5b7b299eff272ec186bdaebc8d91e5ee0bd5 /src | |
parent | 5433008d163e7e85cd7ee668e769c649e318f491 (diff) |
Rough draft of compiling headless simulation
Diffstat (limited to 'src')
-rw-r--r-- | src/headless/main.cpp | 22 | ||||
-rw-r--r-- | src/openvic/dataloader/Dataloader.hpp | 4 |
2 files changed, 24 insertions, 2 deletions
diff --git a/src/headless/main.cpp b/src/headless/main.cpp new file mode 100644 index 0000000..70a57a9 --- /dev/null +++ b/src/headless/main.cpp @@ -0,0 +1,22 @@ +#ifdef OPENVIC_HEADLESS_SIM +#include <iostream> +#include <string> +#include "openvic/Simulation.hpp" +#include "openvic/dataloader/Dataloader.hpp" + + +int main() { + std::cout << "HEADLESS SIMULATION" << std::endl; + + + std::string vic2FolderLocation = ""; + if (vic2FolderLocation.length() <= 0) { + std::cout << "Path to Victoria 2 folder not specified. Manually specify location: "; + std::cin >> vic2FolderLocation; + } + std::filesystem::path path(vic2FolderLocation); + + OpenVic::Simulation sim; + std::cout << (OpenVic::Dataloader::loadDir(path, sim) ? "Dataloader suceeded" : "Dataloader failed") << std::endl; +} +#endif
\ No newline at end of file diff --git a/src/openvic/dataloader/Dataloader.hpp b/src/openvic/dataloader/Dataloader.hpp index 250d100..062f3d5 100644 --- a/src/openvic/dataloader/Dataloader.hpp +++ b/src/openvic/dataloader/Dataloader.hpp @@ -6,10 +6,10 @@ namespace OpenVic { class Dataloader { public: enum class LoadingMode { - DL_COMPATABILITY + DL_COMPATIBILITY }; - static bool loadDir(std::filesystem::path p, Simulation& sim, LoadingMode loadMode = LoadingMode::DL_COMPATABILITY) { + static bool loadDir(std::filesystem::path p, Simulation& sim, LoadingMode loadMode = LoadingMode::DL_COMPATIBILITY) { return true; } }; |