Complete native GUI file flows and Football Limited audio data (by Codex)
This commit is contained in:
1 parent
978a014b87
commit
0b2354c979
12 files changed
+155
-26
No files matched your search
@@ -1,5 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
#include "formats/executable_layout.hpp"
|
||||
#include "formats/audio_layout.hpp"
|
||||
#include "launch/fltd.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
@@ -119,6 +120,13 @@ LeImage translate_fltd(const fs::path& fltd_exe, bool apply_supported_rules) {
|
||||
}
|
||||
}
|
||||
}
|
||||
// Bind the English audio driver's data explicitly; the general UI/table map
|
||||
// does not cover its OPL voice slots or key-on frequency table.
|
||||
for (uint32_t i = 0; i < 9; ++i)
|
||||
put(layout::Audio_OriginalAudioAssets_RuntimeField + i * 16,
|
||||
en(layout::EnglishAudioOperatorSlots + i * 16));
|
||||
for (uint32_t i = 0; i < 96 * 2; ++i)
|
||||
put(layout::Audio_OriginalAudioAssets_RuntimeField2 + i, en(layout::EnglishAudioNoteFrequencies + i));
|
||||
LeImage out = LeImage::from_bytes(kDeBase, std::move(image));
|
||||
if (apply_supported_rules) apply_rule_base(out);
|
||||
return out;
|
||||
|
||||
@@ -379,7 +379,8 @@ ResolvedGame resolve_game(const fs::path& input, const fs::path& cache) {
|
||||
const fs::path marker = prepared / ".openbmh-english";
|
||||
// the version of the translation (launch/fltd.cpp, fltd_map.inc): a cache built
|
||||
// by another version is built again
|
||||
constexpr const char* kTranslation = "english translation 13"; // 13: setup toggle rows, positive balance colour and desktop bar controls
|
||||
constexpr const char *kTranslation =
|
||||
"english translation 14"; // 14: bind native English OPL slots and note frequencies
|
||||
std::string built;
|
||||
{
|
||||
std::ifstream in(marker);
|
||||
|
||||
@@ -22,8 +22,15 @@ int run_launcher(const std::filesystem::path &executable, const SaveMigrator &mi
|
||||
if (!source)
|
||||
continue;
|
||||
const auto check = check_game_directory(*source);
|
||||
if (!check.playable)
|
||||
throw FormatError("Installation wird nicht unterstützt: " + check.unsupported);
|
||||
// Raw English installations are importable before legacy directory
|
||||
// normalisation, so their old runtime "playable" flag is irrelevant.
|
||||
if ((check.family != GameFamily::german && check.family != GameFamily::english) ||
|
||||
!check.problems.empty()) {
|
||||
std::string reason = check.unsupported;
|
||||
for (const auto &problem : check.problems)
|
||||
reason += "\n" + problem;
|
||||
throw FormatError("Installation wird nicht unterstützt: " + reason);
|
||||
}
|
||||
AddMod initial;
|
||||
initial.source = check.directory;
|
||||
initial.saves = check.directory;
|
||||
|
||||
@@ -81,6 +81,9 @@ struct Form {
|
||||
if (!window)
|
||||
throw std::runtime_error("Cannot create native launcher window");
|
||||
command = [this](int id) {
|
||||
// Edit controls also emit WM_COMMAND while the user types.
|
||||
if (id != IDOK && id != IDCANCEL)
|
||||
return;
|
||||
response = id;
|
||||
done = true;
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user