1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-28 17:24:47 +01:00

Refactor map size to allow for rectangle maps

This commit is contained in:
Ted John
2021-12-17 18:25:46 +00:00
parent b22ac0551c
commit 454bfb0a8f
46 changed files with 212 additions and 205 deletions

View File

@@ -94,7 +94,7 @@ namespace Editor
{
OpenRCT2::Audio::StopAll();
object_list_load();
OpenRCT2::GetContext()->GetGameState()->InitAll(150);
OpenRCT2::GetContext()->GetGameState()->InitAll({ 150, 150 });
gScreenFlags = SCREEN_FLAGS_SCENARIO_EDITOR;
gEditorStep = EditorStep::ObjectSelection;
gParkFlags |= PARK_FLAGS_SHOW_REAL_GUEST_NAMES;
@@ -170,7 +170,7 @@ namespace Editor
object_manager_unload_all_objects();
object_list_load();
OpenRCT2::GetContext()->GetGameState()->InitAll(150);
OpenRCT2::GetContext()->GetGameState()->InitAll({ 150, 150 });
SetAllLandOwned();
gEditorStep = EditorStep::ObjectSelection;
viewport_init_all();
@@ -191,7 +191,7 @@ namespace Editor
object_manager_unload_all_objects();
object_list_load();
OpenRCT2::GetContext()->GetGameState()->InitAll(150);
OpenRCT2::GetContext()->GetGameState()->InitAll({ 150, 150 });
SetAllLandOwned();
gEditorStep = EditorStep::ObjectSelection;
viewport_init_all();
@@ -206,9 +206,7 @@ namespace Editor
*/
static void SetAllLandOwned()
{
int32_t mapSize = gMapSize;
MapRange range = { 64, 64, (mapSize - 3) * 32, (mapSize - 3) * 32 };
MapRange range = { 64, 64, (gMapSize.x - 3) * 32, (gMapSize.y - 3) * 32 };
auto landSetRightsAction = LandSetRightsAction(range, LandSetRightSetting::SetForSale);
landSetRightsAction.SetFlags(GAME_COMMAND_FLAG_NO_SPEND);
GameActions::Execute(&landSetRightsAction);