- 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>
38 lines
1.7 KiB
C++
38 lines
1.7 KiB
C++
// SPDX-License-Identifier: GPL-3.0-only
|
|
#pragma once
|
|
#include "game/highscore.hpp"
|
|
|
|
#include <array>
|
|
#include <cstdint>
|
|
#include <filesystem>
|
|
#include <string>
|
|
|
|
#include "modern/game/modern_state.hpp"
|
|
|
|
namespace bmh::modern {
|
|
|
|
// HighscoreOperation / GameEndAlternateScoreScreen. Names retain Original ISO646-DE bytes.
|
|
|
|
|
|
|
|
// Assets in HighscoreScore use global ActiveManager even when scoring another manager. At the
|
|
// season boundary DailyInterest's preceding manager loop leaves ActiveManager=manager_count.
|
|
// Pass that context explicitly without modifying the caller's continuation state.
|
|
HighscoreScore highscore_score(const ModernState& g, int manager,
|
|
HighscoreContext context = HighscoreContext::ActiveManager);
|
|
HighscoreRow highscore_candidate(const ModernState& g, int manager,
|
|
HighscoreContext context = HighscoreContext::ActiveManager);
|
|
void insert_highscore(HighscoreTable& rows, const HighscoreRow& candidate);
|
|
HighscoreProjection make_highscore_projection(const ModernState& g, HighscoreTable rows = {},
|
|
HighscoreContext context = HighscoreContext::ActiveManager);
|
|
|
|
HighscoreBytes encode_highscore_table(const HighscoreTable& rows);
|
|
HighscoreTable decode_highscore_table(const HighscoreBytes& bytes);
|
|
// The caller supplies the configured installation base and Original TEXTD889 prefix.
|
|
std::filesystem::path highscore_file(const std::filesystem::path &base, uint16_t signature,
|
|
const std::string &prefix = "high/h.", bool native = false);
|
|
HighscoreTable load_highscore_table(const std::filesystem::path& file);
|
|
bool save_highscore_table(const std::filesystem::path& file, const HighscoreTable& rows);
|
|
|
|
} // namespace bmh::modern
|