Monopoly — Portage moderne 0.1.0
Portage moderne C/C++23 du Monopoly de 1999
Loading...
Searching...
No Matches
StartupResources.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "ResourceRuntime.hpp"
4
5#include <expected>
6#include <filesystem>
7#include <optional>
8#include <span>
9#include <string>
10#include <string_view>
11#include <vector>
12
13namespace monopoly::startup
14{
16 {
17 std::optional<std::string> dataRoot;
18 std::optional<std::string> dataOverrides;
19 bool checkOnly{};
21 std::vector<std::string_view> remaining;
22 };
23
24 // Resource switches can be combined with the existing network arguments.
25 [[nodiscard]] std::expected<ResourceArguments, std::string>
26 parseResourceArguments(std::span<const std::string_view> arguments);
27
28 // Process-local selection shared by installation qualification and startup.
29 [[nodiscard]] std::expected<void, std::string>
32
33 // Uses SDL's process-local environment; never writes into the installation.
34 [[nodiscard]] std::expected<void, std::string>
36
37 // Optional manifest of loose logical DATA payloads layered above DAT.
38 [[nodiscard]] std::expected<void, std::string>
40 [[nodiscard]] std::optional<std::filesystem::path>
42
44
45 // Interactive mode requires SDL video initialized, before creating GPU or
46 // game owners. Check-only mode neither opens a window nor starts the game.
48}
unsigned index
std::string path
data::ResourceContext resourceContext() noexcept
std::optional< std::filesystem::path > dataOverrideManifest()
std::expected< void, std::string > selectResourceContext(data::ResourceContext context)
ResourceSetupResult prepareResources(bool interactive)
std::expected< ResourceArguments, std::string > parseResourceArguments(std::span< const std::string_view > arguments)
std::expected< void, std::string > selectDataOverrideManifest(std::string_view utf8Path)
std::expected< void, std::string > selectResourceRoot(std::string_view utf8Root)
std::optional< std::string > dataOverrides
std::optional< std::string > dataRoot
std::vector< std::string_view > remaining