From 4535061f3653e94d3d0379f9b01ff1688e38e355 Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Fri, 22 Aug 2025 17:43:44 +0200 Subject: [PATCH] Move ScenarioOptions struct into its own header file --- src/openrct2/GameState.h | 23 +--------------- src/openrct2/libopenrct2.vcxproj | 1 + src/openrct2/scenario/ScenarioOptions.h | 35 +++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 22 deletions(-) create mode 100644 src/openrct2/scenario/ScenarioOptions.h diff --git a/src/openrct2/GameState.h b/src/openrct2/GameState.h index bee27d83c6..8cb4c56255 100644 --- a/src/openrct2/GameState.h +++ b/src/openrct2/GameState.h @@ -19,7 +19,7 @@ #include "management/NewsItem.h" #include "ride/Ride.h" #include "ride/RideRatings.h" -#include "scenario/Scenario.h" +#include "scenario/ScenarioOptions.h" #include "world/Banner.h" #include "world/Climate.h" #include "world/Location.hpp" @@ -30,29 +30,8 @@ #include #include -namespace OpenRCT2::Scenario -{ - struct Options - { - Objective objective; - ScenarioCategory category; - std::string name; - std::string details; - - money64 initialCash; - money64 landPrice; - money64 constructionRightsPrice; - - money64 guestInitialCash; - uint8_t guestInitialHappiness; - uint8_t guestInitialHunger; - uint8_t guestInitialThirst; - }; -} // namespace OpenRCT2::Scenario - namespace OpenRCT2 { - struct GameState_t { Park::ParkData park{}; diff --git a/src/openrct2/libopenrct2.vcxproj b/src/openrct2/libopenrct2.vcxproj index 961671dc82..f23c1d52c0 100644 --- a/src/openrct2/libopenrct2.vcxproj +++ b/src/openrct2/libopenrct2.vcxproj @@ -548,6 +548,7 @@ + diff --git a/src/openrct2/scenario/ScenarioOptions.h b/src/openrct2/scenario/ScenarioOptions.h new file mode 100644 index 0000000000..b8b7292186 --- /dev/null +++ b/src/openrct2/scenario/ScenarioOptions.h @@ -0,0 +1,35 @@ +/***************************************************************************** + * Copyright (c) 2014-2025 OpenRCT2 developers + * + * For a complete list of all authors, please refer to contributors.md + * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 + * + * OpenRCT2 is licensed under the GNU General Public License version 3. + *****************************************************************************/ + +#pragma once + +#include "../core/Money.hpp" +#include "Scenario.h" + +#include + +namespace OpenRCT2::Scenario +{ + struct Options + { + Objective objective; + ScenarioCategory category; + std::string name; + std::string details; + + money64 initialCash; + money64 landPrice; + money64 constructionRightsPrice; + + money64 guestInitialCash; + uint8_t guestInitialHappiness; + uint8_t guestInitialHunger; + uint8_t guestInitialThirst; + }; +} // namespace OpenRCT2::Scenario