Files
Dreierpack-Manager/src/modern/game/other_games.hpp
T
ClaudeandClaude Opus 5.5 f2fcb28f65 Fork the Classic season core into src/modern and add the world layout (M1)
- src/modern/game: the season modules as bmh::modern, working on ModernState
  (a GameState). Data types stay shared with Classic; Modern code calls its
  season functions qualified (modern::...), so a missing Modern function is a
  compile error instead of a silent call into Classic.
- src/modern/app/modern_session: the session on the Modern core. It still uses
  the Classic UI projections until the Modern projections exist.
- SeasonHooks: the shared match core reaches player statistics and the table
  prediction of the season core that owns the game (Classic: unchanged).
- WorldLayout: team ranges, squad slots and pools of the running world. Shared
  code and the Modern fork read them; Classic keeps the original numbers.
- Transfer list views moved to game/transfer_offer_view.hpp (shared).
- tools/modern/check_fork_calls.sh, modern_season_sim and world_layout_tests.

Verified: Classic tests and replay regression unchanged; season_sim and
modern_season_sim produce identical output with Classic data.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 18:08:54 +02:00

42 lines
1.9 KiB
C++

// SPDX-License-Identifier: GPL-3.0-only
#pragma once
#include "game/other_games.hpp"
#include <cstdint>
#include <array>
#include <string>
#include <vector>
#include "formats/textd.hpp"
#include "modern/game/modern_state.hpp"
#include "game/table.hpp"
namespace bmh::modern {
// Source local20==0 (`compact`) draws the complete round in dense six-pixel rows;
// local20==1 (`detail`) draws a 16-participant window in the taller 16-pixel layout.
// One Source row in the ordinary CupGroupOverviewEffects desk view. Names and text are kept in
// Original encoding so the presentation layer can pass them through the existing FNT3 path.
// Const projection of the ordinary menu-5 call to CupGroupOverviewEffects. This API intentionally models
// only the visible values: Original entry separately updates serialized CareerSession_FormatError_RuntimeField3/selector-12 state,
// while complete/compact and page navigation persist the active manager's CareerSession_DispatchOtherGames_RuntimeField byte. It is
// therefore not evidence that the entire Original menu interaction is Native-neutral.
// `linked_page` follows the descriptor's Source +0x17 parallel-group link, then +0x16 next-stage
// link. `round == -1` selects CupRound's live round; otherwise it is range-checked.
// `participant_offset` is Source's low-seven-bit display cursor (multiples of 16). The
// displayed-round group row list remains complete; the mode/offset applies to knockout rows.
OtherGamesProjection other_games_from_game(const ModernState& game, const TextDb& texts,
int competition = 0, int linked_page = 0,
int round = -1,
OtherGamesDisplayMode display_mode = OtherGamesDisplayMode::detail,
int participant_offset = 0,
bool source_new_selection = true);
} // namespace bmh::modern