Introduce explicit Classic and expanded 1.1 data profile dimensions (by Codex)

This commit is contained in:
Codex committed 2026-10-31 09:48:45 +01:00
1 parent b2a6300aad
commit ff05d4f28a
12 files changed
+132 -8

No files matched your search

+2 -2
View File
@@ -106,7 +106,7 @@ constexpr BlockDef kBlocks[] = {
SaveState::SaveState(const Bytes& stream, const DbCounts& c) : stream_(stream) {
// Teams in league play and cup-only teams are not part of DbCounts yet;
// these are the V2.24 values (CareerSession_DispatchLineup_RuntimeField, CareerSession_InstallLeagueSizes_RuntimeField6).
constexpr uint32_t kTeams = 138, kCupTeams = 30;
const uint32_t kTeams = c.league_teams, kCupTeams = c.cup_teams;
size_t pos = 0;
uint32_t last_pointer = 0;
for (const BlockDef& d : kBlocks) {
@@ -177,7 +177,7 @@ const SaveBlock& SaveState::block(uint32_t address) const {
namespace bmh {
std::vector<SaveBlock> save_layout(const DbCounts& c, bool club_records) {
constexpr uint32_t kTeams = 138, kCupTeams = 30;
const uint32_t kTeams = c.league_teams, kCupTeams = c.cup_teams;
std::vector<SaveBlock> out;
size_t pos = 0;
for (const BlockDef& d : kBlocks) {