(by Codex) Wait for a complete mouse click on the static title

This commit is contained in:
Codex committed 2026-11-01 17:55:16 +01:00
1 parent fc07e45bbc
commit 777039832d
2 files changed
+28 -26

No files matched your search

+5 -5
View File
@@ -31,11 +31,11 @@ The six-budget monthly environment implementation has been checked against the p
Release acceptance of individual editions is recorded separately from their recognition. Source compatibility and automated tests do not establish full original-game or platform validation.
The graphical startup presents the supplied publisher, credits and title images
before the game options. The first two original waits are three and one seconds.
OpenBMH deviates from the original: the title remains visible for 1.5 seconds
instead of depending on DOS database initialization time. A key or mouse release
skips the opening sequence without also changing a setup option.
OpenBMH deviates from the original: graphical startup shows the supplied static
137.VGA title with its embedded palette, without the DOS loading animation.
It waits for a complete left or right mouse click before the game options.
The title does not advance on a timer; its confirming press and release are
consumed so they cannot also change a setup option.
Setup restores ordinary scene-backed manager dialogs before a career is created
or loaded. The executable's boot-only black dialog mode is process state and is
+23 -21
View File
@@ -3599,28 +3599,30 @@ int main(int argc, char** argv) {
if (expired.request != ui::FlowRequest::none || expired.changed) handle(expired);
}
};
// Original boot order: publisher, credits, then the game's title. Keep
// these in the graphical frontend; creating a session starts at options.
// OpenBMH deviates from the original: keep the title visible for 1.5s
// instead of relying on the duration of DOS database initialization.
bool skip_opening = false;
for (const auto [picture, milliseconds] :
std::array<std::pair<int, Uint64>, 3>{{{138, 3000}, {139, 1000}, {137, 1500}}}) {
if (!running || skip_opening) break;
const auto picture_path = ui::asset_path(data / "KB", std::to_string(picture) + ".VGA");
const auto picture_palette = load_optional_embedded_palette(picture_path);
present_season(load_vga(picture_path), window_title.c_str(),
picture_palette ? &*picture_palette : nullptr);
const auto until = SDL_GetTicks64() + milliseconds;
while (running && !skip_opening && SDL_GetTicks64() < until) {
SDL_Event opening_event;
while (quit_confirmation.poll(&opening_event)) {
if (opening_event.type == SDL_QUIT) running = false;
if (opening_event.type == SDL_KEYDOWN || opening_event.type == SDL_MOUSEBUTTONUP)
skip_opening = true;
}
SDL_Delay(10);
// OpenBMH deviates from the original: show only the static title until
// a complete left or right click, without the DOS loading animation.
const auto title_path = ui::asset_path(data / "KB", "137.VGA");
const auto title_palette = load_optional_embedded_palette(title_path);
present_season(load_vga(title_path), window_title.c_str(),
title_palette ? &*title_palette : nullptr);
bool opening_confirmed = false;
std::optional<Uint8> opening_press;
while (running && !opening_confirmed) {
SDL_Event opening_event;
while (quit_confirmation.poll(&opening_event)) {
if (opening_event.type == SDL_QUIT) running = false;
if (opening_event.type == SDL_WINDOWEVENT &&
opening_event.window.event == SDL_WINDOWEVENT_FOCUS_LOST)
opening_press.reset();
if (opening_event.type == SDL_MOUSEBUTTONDOWN &&
(opening_event.button.button == SDL_BUTTON_LEFT ||
opening_event.button.button == SDL_BUTTON_RIGHT))
opening_press = opening_event.button.button;
if (opening_event.type == SDL_MOUSEBUTTONUP && opening_press &&
opening_event.button.button == *opening_press)
opening_confirmed = true;
}
SDL_Delay(10);
}
// Opening input must not also change an option on the first setup frame.
SDL_FlushEvents(SDL_KEYDOWN, SDL_KEYUP);