(by Codex) Wait for a complete mouse click on the static title
This commit is contained in:
1 parent
fc07e45bbc
commit
777039832d
2 files changed
+24
-22
No files matched your search
@@ -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.
|
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
|
OpenBMH deviates from the original: graphical startup shows the supplied static
|
||||||
before the game options. The first two original waits are three and one seconds.
|
137.VGA title with its embedded palette, without the DOS loading animation.
|
||||||
OpenBMH deviates from the original: the title remains visible for 1.5 seconds
|
It waits for a complete left or right mouse click before the game options.
|
||||||
instead of depending on DOS database initialization time. A key or mouse release
|
The title does not advance on a timer; its confirming press and release are
|
||||||
skips the opening sequence without also changing a setup option.
|
consumed so they cannot also change a setup option.
|
||||||
|
|
||||||
Setup restores ordinary scene-backed manager dialogs before a career is created
|
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
|
or loaded. The executable's boot-only black dialog mode is process state and is
|
||||||
|
|||||||
+19
-17
@@ -3599,29 +3599,31 @@ int main(int argc, char** argv) {
|
|||||||
if (expired.request != ui::FlowRequest::none || expired.changed) handle(expired);
|
if (expired.request != ui::FlowRequest::none || expired.changed) handle(expired);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
// Original boot order: publisher, credits, then the game's title. Keep
|
// OpenBMH deviates from the original: show only the static title until
|
||||||
// these in the graphical frontend; creating a session starts at options.
|
// a complete left or right click, without the DOS loading animation.
|
||||||
// OpenBMH deviates from the original: keep the title visible for 1.5s
|
const auto title_path = ui::asset_path(data / "KB", "137.VGA");
|
||||||
// instead of relying on the duration of DOS database initialization.
|
const auto title_palette = load_optional_embedded_palette(title_path);
|
||||||
bool skip_opening = false;
|
present_season(load_vga(title_path), window_title.c_str(),
|
||||||
for (const auto [picture, milliseconds] :
|
title_palette ? &*title_palette : nullptr);
|
||||||
std::array<std::pair<int, Uint64>, 3>{{{138, 3000}, {139, 1000}, {137, 1500}}}) {
|
bool opening_confirmed = false;
|
||||||
if (!running || skip_opening) break;
|
std::optional<Uint8> opening_press;
|
||||||
const auto picture_path = ui::asset_path(data / "KB", std::to_string(picture) + ".VGA");
|
while (running && !opening_confirmed) {
|
||||||
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;
|
SDL_Event opening_event;
|
||||||
while (quit_confirmation.poll(&opening_event)) {
|
while (quit_confirmation.poll(&opening_event)) {
|
||||||
if (opening_event.type == SDL_QUIT) running = false;
|
if (opening_event.type == SDL_QUIT) running = false;
|
||||||
if (opening_event.type == SDL_KEYDOWN || opening_event.type == SDL_MOUSEBUTTONUP)
|
if (opening_event.type == SDL_WINDOWEVENT &&
|
||||||
skip_opening = true;
|
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);
|
SDL_Delay(10);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// Opening input must not also change an option on the first setup frame.
|
// Opening input must not also change an option on the first setup frame.
|
||||||
SDL_FlushEvents(SDL_KEYDOWN, SDL_KEYUP);
|
SDL_FlushEvents(SDL_KEYDOWN, SDL_KEYUP);
|
||||||
SDL_FlushEvents(SDL_MOUSEBUTTONDOWN, SDL_MOUSEBUTTONUP);
|
SDL_FlushEvents(SDL_MOUSEBUTTONDOWN, SDL_MOUSEBUTTONUP);
|
||||||
|
|||||||
Reference in new issue
Block a user