Fix save loading at the national desk, calendar colours, pointer size; add -debug

- Loading: a single-manager desk saved with DeskPosition == ManagerCount
  (the completed loop) is read as the first desk again instead of being
  refused as "not a savegame".
- Calendar: text takes the original's six-row colour gradient (the flat
  colours were too dark next to the original).
- Pointer: sized in window points, so it is not doubled on Retina screens.
- Settings: the page names OpenBMH and shows the build version below.
- Desk: the opponent's badge is shown whenever the data has one
  (documented difference); cup-only teams keep the computer portrait.
- Live overview tests: Tabelle/Stärken/Spiele handovers, also with the
  Spiele page opened first.
- New command line option -debug: timestamped log, stderr captured in a
  file, and a savegame after every match day in <saves>/debug.

Refs #63, #65, #67, #68, #71, #73.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
ClaudeandClaude Sonnet 5.5 committed 2026-11-04 22:22:30 +01:00
1 parent 1e7df751a0
commit 38f69fa37b
15 files changed
+234 -13

No files matched your search

+8 -1
View File
@@ -374,8 +374,15 @@ void restore_saved_turn_cursor(TurnDriver& driver, GameState& state, const Datab
const int manager_count = int(state.manager_teams.size());
if (manager_count > 4 || !state.memory.has(::bmh::layout::ActiveManager) || !state.memory.has(::bmh::layout::DeskPosition))
throw std::runtime_error("saved turn cursor: manager continuation fields are missing");
const int position = int(state.memory.u8(::bmh::layout::DeskPosition));
int position = int(state.memory.u8(::bmh::layout::DeskPosition));
const int active = int(state.memory.u8(::bmh::layout::ActiveManager));
// A completed manager loop leaves DeskPosition == ManagerCount (the day's desks are done). A desk
// that was saved in that state is the first desk again for a single manager: nothing else can
// follow it. Reading the byte as 0 lets the day go on instead of refusing the whole save.
if (manager_count == 1 && position == 1 && active == 0) {
position = 0;
state.memory.set8(::bmh::layout::DeskPosition, 0);
}
if (position < 0 || position >= manager_count)
throw std::runtime_error("saved turn cursor: manager position is outside the saved roster");
if (manager_count == 1) {