OpenRCT2/src/openrct2/Cheats.h

137 lines
3.6 KiB
C
Raw Normal View History

/*****************************************************************************
* Copyright (c) 2014-2023 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
2015-06-26 23:40:09 +02:00
#include "common.h"
enum class StaffSpeedCheat
{
None,
Frozen,
Fast,
};
2015-06-26 23:40:09 +02:00
extern bool gCheatsSandboxMode;
extern bool gCheatsDisableClearanceChecks;
extern bool gCheatsDisableSupportLimits;
extern bool gCheatsShowAllOperatingModes;
extern bool gCheatsShowVehiclesFromOtherTrackTypes;
extern bool gCheatsUnlockOperatingLimits;
2016-01-25 21:24:18 +01:00
extern bool gCheatsDisableBrakesFailure;
extern bool gCheatsDisableAllBreakdowns;
extern bool gCheatsBuildInPauseMode;
extern bool gCheatsIgnoreRideIntensity;
extern bool gCheatsDisableVandalism;
extern bool gCheatsDisableLittering;
extern bool gCheatsNeverendingMarketing;
extern bool gCheatsFreezeWeather;
extern bool gCheatsDisableTrainLengthLimit;
2016-05-29 03:12:31 +02:00
extern bool gCheatsDisablePlantAging;
2017-02-09 06:45:51 +01:00
extern bool gCheatsDisableRideValueAging;
extern bool gCheatsEnableChainLiftOnAllTrack;
extern bool gCheatsAllowArbitraryRideTypeChanges;
2017-07-23 12:09:29 +02:00
extern bool gCheatsIgnoreResearchStatus;
extern bool gCheatsEnableAllDrawableTrackPieces;
extern bool gCheatsAllowTrackPlaceInvalidHeights;
extern bool gCheatsAllowRegularPathAsQueue;
Extend color selection dropdown with more colors (#19446) * Setup for extended palette * Define order for color picker cells * Init G2 Palettes in ColoursInitMaps * Add Glass Palettes * Use special sprite for Invisible color * Set up new cheat for special colors * Add glass palettes to palette_to_g1_offset * Add entries for new colors in TranslucentWindowPalettes * Finish implementation of special colors cheat * Some cleanup * New colors almost work * Correct g2 palette loading indices * Invisible color sprite displays properly * Repaint works with large scenery and walls * Prevent random shop items from overflowing to junk palettes * More cleanup * Fix glass palettes * Add mapping of new colors to original colors for UI themes * Fix junk palettes for random shop items * Fix missing highlight color in software renderer * Convert small scenery support flag to allow use of new colors * Progress on displaying new colors in software renderer * Fix invisible color scheme sprite * Formatting cleanup * Resolve comparison of integer expressions of different signedness * Index g2 palette maps to fix visible chain lift * Progress on fixing new colors in software renderer * Fix station and support colors * Fix dropdown selected index * Get invisible color (mostly) working in software renderer * Use forceBmp for palette resources * Remove test function definition left in by mistake * Remove some obsolete range checks for original color values * Add changelog entry * Reorder color dropdown based on NE user feedback * Some cleanup * Further cleanup * Formatting * Add include for GetPaletteMapIndexForColour * Fix a couple things I broke * Fix function placement * Revert "Add include for GetPaletteMapIndexForColour" This reverts commit 0af9611e6656d792adb7a36efe7dbf3387a4a759. * Use color constants for color order list * Make remappable colors contiguous * turn off clang format for ordered color list * Appease clang * Use all colors for random shop item animation * Improvements to palette map resources * Fix chain lifts again + adjustments to a few colors * Update changelog and contributors.md * Revert changes to S4 and S6 importers which are no longer needed * Bump network, plugin, and minimum park versions * Revert "Progress on displaying new colors in software renderer" This reverts commit 337602e4a78a67f828d9c524138a1cb79b2c91dc. * Remove unnecessary comment --------- Co-authored-by: Trevor Finney <8711258+finneyt@users.noreply.github.com>
2023-04-06 09:36:07 +02:00
extern bool gCheatsAllowSpecialColourSchemes;
extern bool gCheatsMakeAllDestructible;
extern StaffSpeedCheat gCheatsSelectedStaffSpeed;
enum class CheatType : int32_t
2018-06-22 23:25:16 +02:00
{
SandboxMode,
DisableClearanceChecks,
DisableSupportLimits,
ShowAllOperatingModes,
ShowVehiclesFromOtherTrackTypes,
DisableTrainLengthLimit,
EnableChainLiftOnAllTrack,
FastLiftHill,
DisableBrakesFailure,
DisableAllBreakdowns,
UnlockAllPrices,
BuildInPauseMode,
IgnoreRideIntensity,
DisableVandalism,
DisableLittering,
NoMoney,
AddMoney,
SetMoney,
ClearLoan,
SetGuestParameter,
GenerateGuests,
RemoveAllGuests,
GiveAllGuests,
SetGrassLength,
WaterPlants,
DisablePlantAging,
FixVandalism,
RemoveLitter,
SetStaffSpeed,
RenewRides,
MakeDestructible,
FixRides,
ResetCrashStatus,
TenMinuteInspections,
WinScenario,
ForceWeather,
FreezeWeather,
OpenClosePark,
HaveFun,
SetForcedParkRating,
NeverEndingMarketing,
AllowArbitraryRideTypeChanges,
OwnAllLand,
DisableRideValueAging,
IgnoreResearchStatus,
EnableAllDrawableTrackPieces,
2019-10-15 16:34:21 +02:00
CreateDucks,
2019-10-15 16:48:45 +02:00
RemoveDucks,
AllowTrackPlaceInvalidHeights,
2022-04-05 19:35:42 +02:00
NoCapOnQueueLengthDummy, // Removed; this dummy exists only for deserialisation parks that had it saved
AllowRegularPathAsQueue,
Extend color selection dropdown with more colors (#19446) * Setup for extended palette * Define order for color picker cells * Init G2 Palettes in ColoursInitMaps * Add Glass Palettes * Use special sprite for Invisible color * Set up new cheat for special colors * Add glass palettes to palette_to_g1_offset * Add entries for new colors in TranslucentWindowPalettes * Finish implementation of special colors cheat * Some cleanup * New colors almost work * Correct g2 palette loading indices * Invisible color sprite displays properly * Repaint works with large scenery and walls * Prevent random shop items from overflowing to junk palettes * More cleanup * Fix glass palettes * Add mapping of new colors to original colors for UI themes * Fix junk palettes for random shop items * Fix missing highlight color in software renderer * Convert small scenery support flag to allow use of new colors * Progress on displaying new colors in software renderer * Fix invisible color scheme sprite * Formatting cleanup * Resolve comparison of integer expressions of different signedness * Index g2 palette maps to fix visible chain lift * Progress on fixing new colors in software renderer * Fix station and support colors * Fix dropdown selected index * Get invisible color (mostly) working in software renderer * Use forceBmp for palette resources * Remove test function definition left in by mistake * Remove some obsolete range checks for original color values * Add changelog entry * Reorder color dropdown based on NE user feedback * Some cleanup * Further cleanup * Formatting * Add include for GetPaletteMapIndexForColour * Fix a couple things I broke * Fix function placement * Revert "Add include for GetPaletteMapIndexForColour" This reverts commit 0af9611e6656d792adb7a36efe7dbf3387a4a759. * Use color constants for color order list * Make remappable colors contiguous * turn off clang format for ordered color list * Appease clang * Use all colors for random shop item animation * Improvements to palette map resources * Fix chain lifts again + adjustments to a few colors * Update changelog and contributors.md * Revert changes to S4 and S6 importers which are no longer needed * Bump network, plugin, and minimum park versions * Revert "Progress on displaying new colors in software renderer" This reverts commit 337602e4a78a67f828d9c524138a1cb79b2c91dc. * Remove unnecessary comment --------- Co-authored-by: Trevor Finney <8711258+finneyt@users.noreply.github.com>
2023-04-06 09:36:07 +02:00
AllowSpecialColourSchemes,
RemoveParkFences,
Count,
2016-02-02 01:04:39 +01:00
};
2018-06-22 23:25:16 +02:00
enum
{
GUEST_PARAMETER_HAPPINESS,
GUEST_PARAMETER_ENERGY,
GUEST_PARAMETER_HUNGER,
GUEST_PARAMETER_THIRST,
GUEST_PARAMETER_NAUSEA,
GUEST_PARAMETER_NAUSEA_TOLERANCE,
2020-04-25 15:34:43 +02:00
GUEST_PARAMETER_TOILET,
GUEST_PARAMETER_PREFERRED_RIDE_INTENSITY
2016-02-02 01:04:39 +01:00
};
2018-06-22 23:25:16 +02:00
enum
{
OBJECT_MONEY,
OBJECT_PARK_MAP,
OBJECT_BALLOON,
OBJECT_UMBRELLA
2016-02-02 01:04:39 +01:00
};
constexpr auto CHEATS_GIVE_GUESTS_MONEY = 1000.00_GBP;
2016-02-02 01:04:39 +01:00
#define CHEATS_TRAM_INCREMENT 250
2019-10-15 16:34:21 +02:00
#define CHEATS_DUCK_INCREMENT 20
#define CHEATS_STAFF_FAST_SPEED 0xFF
#define CHEATS_STAFF_NORMAL_SPEED 0x60
#define CHEATS_STAFF_FREEZE_SPEED 0
2016-02-02 01:04:39 +01:00
void CheatsReset();
const char* CheatsGetName(CheatType cheatType);
void CheatsSet(CheatType cheatType, int64_t param1 = 0, int64_t param2 = 0);
void CheatsSerialise(class DataSerialiser& ds);