1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-26 00:04:43 +01:00

Create RCT1_PARK_FLAGS and use them when importing

This commit is contained in:
Gymnasiast
2016-05-16 20:38:55 +02:00
parent b72aac9fbf
commit af65758bd2
2 changed files with 20 additions and 2 deletions

View File

@@ -713,6 +713,24 @@ enum {
RCT1_SCENARIO_FLAG_19 = 1 << 19,
};
enum {
RCT1_PARK_FLAGS_PARK_OPEN = (1 << 0),
RCT1_PARK_FLAGS_SCENARIO_COMPLETE_NAME_INPUT = (1 << 1),
RCT1_PARK_FLAGS_FORBID_LANDSCAPE_CHANGES = (1 << 2),
RCT1_PARK_FLAGS_FORBID_TREE_REMOVAL = (1 << 3),
RCT1_PARK_FLAGS_SHOW_REAL_GUEST_NAMES = (1 << 4),
RCT1_PARK_FLAGS_FORBID_HIGH_CONSTRUCTION = (1 << 5), // Below tree height
RCT1_PARK_FLAGS_PREF_LESS_INTENSE_RIDES = (1 << 6),
RCT1_PARK_FLAGS_FORBID_MARKETING_CAMPAIGN = (1 << 7),
RCT1_PARK_FLAGS_ANTI_CHEAT_DEPRECATED = (1 << 8), // Not used anymore, used for cheat detection
RCT1_PARK_FLAGS_PREF_MORE_INTENSE_RIDES = (1 << 9),
RCT1_PARK_FLAGS_NO_MONEY = (1 << 11), // Used for both scenarios and saved games, unlike RCT2
RCT1_PARK_FLAGS_DIFFICULT_GUEST_GENERATION = (1 << 12),
RCT1_PARK_FLAGS_PARK_ENTRY_LOCKED_AT_FREE = (1 << 13), // Off: rides and park entry chargeable. On: only rides chargeable.
RCT1_PARK_FLAGS_DIFFICULT_PARK_RATING = (1 << 14),
RCT1_PARK_FLAGS_LOCK_REAL_NAMES_OPTION = (1 << 15),
};
extern const uint8 gRideCategories[0x60];
bool rct1_read_sc4(const char *path, rct1_s4 *s4);

View File

@@ -992,13 +992,13 @@ void S4Importer::ImportParkFlags()
// Flags
gParkFlags = _s4.park_flags;
gParkFlags &= ~PARK_FLAGS_ANTI_CHEAT_DEPRECATED;
if (!(_s4.park_flags & PARK_FLAGS_PARK_FREE_ENTRY))
if (!(_s4.park_flags & RCT1_PARK_FLAGS_PARK_ENTRY_LOCKED_AT_FREE))
{
gCheatsUnlockAllPrices = true;
}
// RCT2 uses two flags for no money (for cheat detection). RCT1 used only one.
// Copy its value to make no money scenarios such as Arid Heights work properly.
if (_s4.park_flags & PARK_FLAGS_NO_MONEY)
if (_s4.park_flags & RCT1_PARK_FLAGS_NO_MONEY)
{
gParkFlags |= PARK_FLAGS_NO_MONEY_SCENARIO;
}