Change: Increase house type limit from 512 to 4096. (#12288)

This moves HouseType from m4+m3[6] to m8 making it 'easier' to access.
This commit is contained in:
2024-12-22 18:14:06 +00:00
committed by GitHub
parent 8e948af3bc
commit c72542431a
7 changed files with 30 additions and 18 deletions

View File

@@ -1539,6 +1539,17 @@ bool AfterLoadGame()
}
}
if (IsSavegameVersionBefore(SLV_INCREASE_HOUSE_LIMIT)) {
for (auto t : Map::Iterate()) {
if (IsTileType(t, MP_HOUSE)) {
/* House type is moved from m4 + m3[6] to m8. */
SetHouseType(t, t.m4() | (GB(t.m3(), 6, 1) << 8));
t.m4() = 0;
ClrBit(t.m3(), 6);
}
}
}
/* Check and update house and town values */
UpdateHousesAndTowns();