Monopoly — Portage moderne 0.1.0
Portage moderne C/C++23 du Monopoly de 1999
Loading...
Searching...
No Matches
ArchiveAssembly.hpp
Go to the documentation of this file.
1#pragma once
2
4
5#include <filesystem>
6#include <map>
7#include <optional>
8#include <string>
9#include <vector>
10
12{
13 struct Request
14 {
15 std::filesystem::path sourceRoot; // Source/monopoly, read-only
16 std::filesystem::path outputRoot; // Isolated reconstruction workspace
17 std::vector<std::filesystem::path> extraRoots;
18 std::optional<std::filesystem::path> mappings;
20 };
21
23 {
24 std::string name;
25 std::size_t expected{};
26 std::size_t available{};
27 std::size_t invalid{};
28 std::filesystem::path archive;
30 { return expected != 0 && available == expected && invalid == 0; }
31 };
32
33 struct Result
34 {
35 std::filesystem::path directory;
36 std::vector<BankResult> banks;
38 };
39
40 // Assembly never installs incomplete banks into the application's Dat_Mon.
41 // Failure to resolve a payload is recorded, never substituted with an image,
42 // fabricated animation, silent WAV or a compacted (renumbered) data index.
43 [[nodiscard]] Result run(const Request& request);
44
46 {
47 std::map<std::uint32_t, std::string> requiredNames;
48 std::map<std::uint32_t, std::string> text;
49 std::vector<std::string> unmappedSymbols;
50 };
51
52 // The supplied English.atr uses ASCII, symbolic IDs and braced messages.
53 // Only exact symbols in the active dat_lang.h are mapped. English.A belongs
54 // to a different compiled format and its numeric offsets are not guessed.
56 const std::filesystem::path& definitions,
57 const std::filesystem::path& atr);
58 [[nodiscard]] std::vector<ArchiveBuildItem> buildEnglishItems(
59 const EnglishText& input);
60}
unsigned index
Bytes input
EnglishText readEnglishText(const std::filesystem::path &definitions, const std::filesystem::path &atr)
std::vector< ArchiveBuildItem > buildEnglishItems(const EnglishText &input)
Result run(const Request &request)
std::map< std::uint32_t, std::string > requiredNames
std::vector< std::string > unmappedSymbols
std::map< std::uint32_t, std::string > text
std::optional< std::filesystem::path > mappings
std::vector< std::filesystem::path > extraRoots
std::vector< BankResult > banks