From efa88c722fcb6c8fea7a86e1b3b8a83f1f59eb31 Mon Sep 17 00:00:00 2001 From: Hop311 Date: Thu, 24 Aug 2023 00:32:23 +0100 Subject: Big Dataloader Commit (openvic-simulation) --- src/openvic/dataloader/Dataloader.hpp | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) (limited to 'src/openvic/dataloader/Dataloader.hpp') diff --git a/src/openvic/dataloader/Dataloader.hpp b/src/openvic/dataloader/Dataloader.hpp index 062f3d5..b080300 100644 --- a/src/openvic/dataloader/Dataloader.hpp +++ b/src/openvic/dataloader/Dataloader.hpp @@ -1,16 +1,24 @@ #pragma once -#include -#include "../Simulation.hpp" + +#include "openvic/types/Return.hpp" +#include "openvic-dataloader/v2script/Parser.hpp" namespace OpenVic { + struct GameManager; + class Dataloader { - public: - enum class LoadingMode { - DL_COMPATIBILITY - }; + std::vector roots; + + public: + Dataloader() = default; + + /* In reverse-load order, so base defines first and final loaded mod last */ + return_t set_roots(std::vector new_roots); + + std::filesystem::path lookup_file(std::filesystem::path const& path) const; + std::vector lookup_files_in_dir(std::filesystem::path const& path) const; - static bool loadDir(std::filesystem::path p, Simulation& sim, LoadingMode loadMode = LoadingMode::DL_COMPATIBILITY) { - return true; - } + return_t load_defines(GameManager& game_manager) const; + return_t load_pop_history(GameManager& game_manager, std::filesystem::path const& path) const; }; -} \ No newline at end of file +} -- cgit v1.2.3-56-ga3b1