1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-27 00:34:46 +01:00

Replace remnants of corrupted elements

This commit is contained in:
Gymnasiast
2021-01-17 13:00:40 +01:00
committed by Ted John
parent 944e96f5fb
commit 4437e692e2
7 changed files with 174 additions and 18 deletions

View File

@@ -3575,7 +3575,6 @@ STR_6331 :Create ducks
STR_6332 :Remove ducks
STR_6333 :Increase scale factor
STR_6334 :Decrease scale factor
STR_6335 :Tile Inspector: Insert corrupt element
STR_6336 :Tile Inspector: Copy element
STR_6337 :Tile Inspector: Paste element
STR_6338 :Tile Inspector: Delete element

View File

@@ -0,0 +1,171 @@
/*****************************************************************************
* Copyright (c) 2014-2020 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 <memory>
#include <openrct2/common.h>
#define SHIFT 0x100
#define CTRL 0x200
#define ALT 0x400
#define CMD 0x800
#ifdef __MACOSX__
# define PLATFORM_MODIFIER CMD
#else
# define PLATFORM_MODIFIER CTRL
#endif
struct ScreenCoordsXY;
#include <string>
namespace OpenRCT2
{
struct IPlatformEnvironment;
namespace Input
{
enum class Shortcut : size_t
{
CloseTopMostWindow,
CloseAllFloatingWindows,
CancelConstructionMode,
PauseGame,
ZoomViewOut,
ZoomViewIn,
RotateViewClockwise,
RotateViewAnticlockwise,
RotateConstructionObject,
UndergroundViewToggle,
RemoveBaseLandToggle,
RemoveVerticalLandToggle,
SeeThroughRidesToggle,
SeeThroughSceneryToggle,
InvisibleSupportsToggle,
InvisiblePeopleToggle,
HeightMarksOnLandToggle,
HeightMarksOnRideTracksToggle,
HeightMarksOnPathsToggle,
AdjustLand,
AdjustWater,
BuildScenery,
BuildPaths,
BuildNewRide,
ShowFinancialInformation,
ShowResearchInformation,
ShowRidesList,
ShowParkInformation,
ShowGuestList,
ShowStaffList,
ShowRecentMessages,
ShowMap,
Screenshot,
// New
ReduceGameSpeed,
IncreaseGameSpeed,
OpenCheatWindow,
RemoveTopBottomToolbarToggle,
ScrollMapUp,
ScrollMapLeft,
ScrollMapDown,
ScrollMapRight,
OpenChatWindow,
QuickSaveGame,
ShowOptions,
MuteSound,
WindowedModeToggle,
ShowMultiplayer,
PaintOriginalToggle,
DebugPaintToggle,
SeeThroughPathsToggle,
RideConstructionTurnLeft,
RideConstructionTurnRight,
RideConstructionUseTrackDefault,
RideConstructionSlopeDown,
RideConstructionSlopeUp,
RideConstructionChainLiftToggle,
RideConstructionBankLeft,
RideConstructionBankRight,
RideConstructionPreviousTrack,
RideConstructionNextTrack,
RideConstructionBuildCurrent,
RideConstructionDemolishCurrent,
LoadGame,
ClearScenery,
GridlinesDisplayToggle,
ViewClipping,
HighlightPathIssuesToggle,
TileInspector,
AdvanceToNextTick,
SceneryPicker,
ScaleUp,
ScaleDown,
ToggleInvisibility,
CopyElement,
PasteElement,
RemoveElement,
MoveElementUp,
MoveElementDown,
IncreaseXCoord,
DecreaseXCoord,
IncreaseYCoord,
DecreaseYCoord,
IncreaseElementHeight,
DecreaseElementHeight,
ToggleClearanceChecks,
Count,
Undefined = 0xFFFF,
};
constexpr size_t ShortcutsCount = static_cast<size_t>(Shortcut::Count);
class KeyboardShortcuts
{
private:
constexpr static int32_t CURRENT_FILE_VERSION = 1;
static const uint16_t DefaultKeys[ShortcutsCount];
std::shared_ptr<IPlatformEnvironment> const _env;
uint16_t _keys[ShortcutsCount];
public:
KeyboardShortcuts(const std::shared_ptr<IPlatformEnvironment>& env);
~KeyboardShortcuts();
void Reset();
bool Load();
bool Save();
std::string GetShortcutString(int32_t shortcut) const;
void Set(int32_t key);
Shortcut GetFromKey(int32_t key);
ScreenCoordsXY GetKeyboardMapScroll(const uint8_t* keysState) const;
};
const uint16_t ScanCodeUndefined = 0xFFFF;
} // namespace Input
} // namespace OpenRCT2
// The current shortcut being changed.
extern OpenRCT2::Input::Shortcut gKeyboardShortcutChangeId;
void KeyboardShortcutsReset();
bool KeyboardShortcutsLoad();
bool KeyboardShortcutsSave();
void KeyboardShortcutsSet(int32_t key);
OpenRCT2::Input::Shortcut KeyboardShortcutsGetFromKey(int32_t key);
void KeyboardShortcutsFormatString(char* buffer, size_t bufferSize, int32_t shortcut);
void KeyboardShortcutHandle(int32_t key);
void KeyboardShortcutHandleCommand(OpenRCT2::Input::Shortcut shortcut);
ScreenCoordsXY GetKeyboardMapScroll(const uint8_t* keysState);

View File

@@ -839,7 +839,6 @@ void ShortcutManager::RegisterDefaultShortcuts()
RegisterShortcut(ShortcutId::WindowRideConstructionBuild, STR_SHORTCUT_CONSTRUCTION_BUILD_CURRENT, "NUMPAD 0", []() { ShortcutConstructionBuildCurrent(); });
RegisterShortcut(ShortcutId::WindowRideConstructionDemolish, STR_SHORTCUT_CONSTRUCTION_DEMOLISH_CURRENT, "NUMPAD -", []() { ShortcutConstructionDemolishCurrent(); });
RegisterShortcut(ShortcutId::WindowTileInspectorInsertCorrupt, STR_SHORTCUT_INSERT_CORRPUT_ELEMENT, []() { TileInspectorMouseUp(WC_TILE_INSPECTOR__WIDX_BUTTON_CORRUPT); });
RegisterShortcut(ShortcutId::WindowTileInspectorCopy, STR_SHORTCUT_COPY_ELEMENT, []() { TileInspectorMouseUp(WC_TILE_INSPECTOR__WIDX_BUTTON_COPY); });
RegisterShortcut(ShortcutId::WindowTileInspectorPaste, STR_SHORTCUT_PASTE_ELEMENT, []() { TileInspectorMouseUp(WC_TILE_INSPECTOR__WIDX_BUTTON_PASTE); });
RegisterShortcut(ShortcutId::WindowTileInspectorRemove, STR_SHORTCUT_REMOVE_ELEMENT, []() { TileInspectorMouseUp(WC_TILE_INSPECTOR__WIDX_BUTTON_REMOVE); });

View File

@@ -554,7 +554,7 @@ enum
#define WC_EDITOR_OBJECT_SELECTION__WIDX_TAB_1 21
#define WC_STAFF__WIDX_PICKUP 9
#define WC_TILE_INSPECTOR__WIDX_BUTTON_ROTATE 14
#define WC_TILE_INSPECTOR__WIDX_BUTTON_CORRUPT 10
#define WC_TILE_INSPECTOR__WIDX_BUTTON_TOGGLE_INVISIBILITY 10
#define WC_TILE_INSPECTOR__WIDX_BUTTON_COPY 17
#define WC_TILE_INSPECTOR__WIDX_BUTTON_PASTE 16
#define WC_TILE_INSPECTOR__WIDX_BUTTON_REMOVE 11

View File

@@ -3334,7 +3334,6 @@ enum
STR_TILE_INSPECTOR_GROUPBOX_WALL_INFO = 5929,
STR_TILE_INSPECTOR_GROUPBOX_LARGE_SCENERY_INFO = 5930,
STR_TILE_INSPECTOR_GROUPBOX_BANNER_INFO = 5931,
STR_TILE_INSPECTOR_GROUPBOX_CORRUPT_INFO = 5932,
STR_TILE_INSPECTOR_GROUPBOX_PROPERTIES = 5933,
STR_TILE_INSPECTOR_SURFACE_TERAIN = 5934,
STR_TILE_INSPECTOR_SURFACE_EDGE = 5935,
@@ -3799,7 +3798,6 @@ enum
STR_SHORTCUT_SCALE_UP = 6333,
STR_SHORTCUT_SCALE_DOWN = 6334,
STR_SHORTCUT_INSERT_CORRPUT_ELEMENT = 6335,
STR_SHORTCUT_COPY_ELEMENT = 6336,
STR_SHORTCUT_PASTE_ELEMENT = 6337,
STR_SHORTCUT_REMOVE_ELEMENT = 6338,
@@ -3902,6 +3900,7 @@ enum
STR_INSTALL_INNOEXTRACT = 6408,
STR_NOT_THE_GOG_INSTALLER = 6409,
<<<<<<< HEAD
STR_ZOOM_BUTTON_ON_TOOLBAR = 6410,
STR_ZOOM_BUTTON_ON_TOOLBAR_TIP = 6411,

View File

@@ -90,9 +90,7 @@ namespace OpenRCT2::Scripting
type = TILE_ELEMENT_TYPE_BANNER;
else
{
if (value == "openrct2_corrupt_deprecated")
std::puts(
"Creation of new corrupt elements is deprecated. To hide elements, use the 'hidden' property instead.");
std::puts("Element type not recognised!");
return;
}

View File

@@ -51,7 +51,6 @@ enum class TileElementType : uint8_t
Wall = (5 << 2),
LargeScenery = (6 << 2),
Banner = (7 << 2),
Corrupt = (8 << 2),
};
struct TileElement;
@@ -63,7 +62,6 @@ struct LargeSceneryElement;
struct WallElement;
struct EntranceElement;
struct BannerElement;
struct CorruptElement;
struct TileElementBase
{
@@ -617,14 +615,6 @@ public:
};
assert_struct_size(BannerElement, 16);
struct CorruptElement : TileElementBase
{
static constexpr TileElementType ElementType = TileElementType::Corrupt;
uint8_t pad[3];
uint8_t pad_08[8];
};
assert_struct_size(CorruptElement, 16);
#pragma pack(pop)
class QuarterTile