Run from the asset files alone: built-in numbers and texts for BMH and FLTD

The game no longer needs BMH.EXE or FLTD.EXE. The numbers and the game texts of
the Diamond 3.7 executable and of the English Football Limited are generated into
formats/diamond_constants.inc and formats/fltd_constants.inc (tools/diamond_constants).
A missing BMH.exe loads the embedded German image, an English installation without
FLTD.EXE gets the embedded English image; an executable that is present is used as
before. The default manager name is OpenBMH. The launcher accepts directories and
archives that hold only the asset files. Replays of a recorded session give identical
output with and without BMH.EXE, and the English image equals the translated one.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
ClaudeandClaude Sonnet 5.5 committed 2026-11-08 14:04:34 +01:00
1 parent 6aa7c4f4a2
commit 524b9e4158
15 files changed
+4262 -23

No files matched your search

+3 -1
View File
@@ -131,7 +131,9 @@ ManagerScreen::ManagerScreen(const std::filesystem::path& data, int slot, const
if (id < 0 || id >= int(db_.club_names.size()) || !unique.insert(id).second)
throw FormatError("manager selection: club order must contain unique valid master IDs");
choice_.slot = slot; choice_.roster_revision = context_.revision;
choice_.name = texts_[(::bmh::layout::Career_NewCareerMarketsAndMoods_ExecutableField - ::bmh::layout::TextPointerTable) / 4 + slot];
// The default name of a new manager: OpenBMH (the original text blocks offer "Nobody" for every slot). The player can still
// type another name; the name editor of the original keeps working on this string.
choice_.name = "OpenBMH";
while (club_locked(master_id(choice_.selection_club))) ++choice_.selection_club;
choice_.master_club = master_id(choice_.selection_club);
while (portrait_locked(choice_.portrait)) ++choice_.portrait;
+3
View File
@@ -38,6 +38,9 @@ std::filesystem::path asset_path(const std::filesystem::path& directory, const s
found = e.path();
}
}
// The game runs from its asset files alone: BMH.exe may be missing, load_le() then uses the embedded numbers of the
// Diamond executable (formats/diamond_image.hpp). The returned path simply does not exist.
if (found.empty() && folded(name) == "bmh.exe") return directory / "BMH.exe";
if (found.empty()) throw FormatError("missing original asset: " + (directory / name).string());
return found;
}