A game needs the executable or openbmh.dat, the executable wins

Assets with openbmh.dat are a complete game; without that file the launcher asks
for BMH.EXE (FLTD.EXE) as before. With both present the executable is used.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
ClaudeandClaude Sonnet 5.5 committed 2026-11-08 15:26:42 +01:00
1 parent 32b08e3799
commit f1f5fa523c
6 files changed
+62 -21

No files matched your search

+2
View File
@@ -8,6 +8,7 @@
#include <cstdlib>
#include <cstring>
#include <string>
#include <string_view>
#include <system_error>
#ifdef _WIN32
@@ -98,6 +99,7 @@ void add_texts(LeImage& image, int edition, const std::filesystem::path& game_di
std::filesystem::path find_texts_file(const std::filesystem::path& game_directory) {
if (const char* env = std::getenv("OPENBMH_DAT"); env && *env) {
if (std::string_view(env) == "-") return {}; // "no texts file at all" (tests of the launcher)
std::error_code ec;
if (std::filesystem::is_regular_file(env, ec)) return env;
}
+1 -1
View File
@@ -23,7 +23,7 @@ namespace bmh {
// times (u32 address, u32 length), then the bytes of all ranges. A range must be one of the edition's text ranges, so
// the file can never change a number of the image.
//
// The file is looked for in: the environment variable OPENBMH_DAT, the folder of the game data, the folder of the
// The file is looked for in: the environment variable OPENBMH_DAT ("-" = none at all), the folder of the game data, the folder of the
// running program, the current folder. Returns an empty path when there is none.
std::filesystem::path find_texts_file(const std::filesystem::path& game_directory);