Prepare Classic 1.0 edition rules and Diamond 3.7 foreign crests (by Codex)

This commit is contained in:
Codex committed 2026-10-30 15:39:56 +01:00
1 parent c293a35f56
commit 8ee062ea46
46 files changed
+296 -147

No files matched your search

+5 -1
View File
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: GPL-3.0-only
#include "formats/badge_policy.hpp"
#include "formats/executable_layout.hpp"
#include "app/career_session.hpp"
@@ -540,6 +541,9 @@ static void install_league_sizes(const LeImage& exe) {
kNewcomerCount = exe.u16(::bmh::layout::CareerSession_InstallLeagueSizes_RuntimeField6);
// EXE strings the engine posts (messages.hpp)
install_message_texts(exe);
install_career_rules(exe);
install_environment_rules(exe);
install_original_badge_policy(exe);
}
CareerSession::CareerSession(const std::filesystem::path& data, uint32_t watcom_seed)
@@ -3331,7 +3335,7 @@ std::optional<CareerSession::BalanceDispatch> CareerSession::dispatch_balance_pl
notice.manager_name.assign(reinterpret_cast<const char*>(next.state.manager_records.data()+name_at),name_end-name_at);
notice.portrait=next.state.manager_records[record+0x221];
const int club=next.state.manager_teams[size_t(manager)];
notice.badge_fallback=club==0x0fff||(club>89&&club<138)||(club>167&&club<357);
notice.badge_fallback=original_badge_fallback(club,&exe_);
if(!notice.badge_fallback&&club>=0&&size_t(club)*2+2<=next.state.club_heap_78.size())
notice.badge_sprite=(int(next.state.club_heap_78[size_t(club)*2])|
int(next.state.club_heap_78[size_t(club)*2+1])<<8)&0x1ff;
+2 -1
View File
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: GPL-3.0-only
#include "formats/badge_policy.hpp"
#include "formats/executable_layout.hpp"
#include "app/controller.hpp"
#include "app/window_actions.hpp"
@@ -56,7 +57,7 @@ ui::NationalFriendlyIdentity national_friendly_identity(const GameState& game,in
out.manager_name.push_back(char(game.manager_records[record+0xa8+i]));
out.portrait=game.manager_records[record+0x221];
out.manager_slot=manager;
out.badge_fallback=team==0x0fff||(team>89&&team<138)||(team>167&&team<357);
out.badge_fallback=original_badge_fallback(team);
if(!out.badge_fallback&&team>=0&&size_t(team)*2+1<game.club_heap_78.size())
out.badge_sprite=int(game.club_heap_78[size_t(team)*2]|
uint16_t(game.club_heap_78[size_t(team)*2+1])<<8)&0x1ff;
+2 -2
View File
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: GPL-3.0-only
#include "formats/badge_policy.hpp"
#include "formats/executable_layout.hpp"
#include "ui/live_timing.hpp"
// openbmh_play - the UI of src/ui connected to the engine: options, manager dialogs, a new
@@ -684,8 +685,7 @@ int main(int argc, char** argv) {
view.manager_name += char(state.manager_records[base + 0xa8 + i]);
view.body = event.text;
view.portrait = state.manager_records[base + 0x221];
view.badge_fallback = event.team == 0x0fff || (event.team > 89 && event.team < 138) ||
(event.team > 167 && event.team < 357);
view.badge_fallback = original_badge_fallback(event.team);
view.badge_sprite = view.badge_fallback ? 0 : le16(state.club_heap_78, size_t(event.team) * 2) & 0x1ff;
ui::GameEndTaxDialog screen(data, std::move(view), game_end_options(state),
event.kind == SeasonTaxEventKind::outcome ? season_backdrop : std::optional<Image>{});