1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-24 23:34:37 +01:00

Move tile inspector code into TileInspector namespace

This commit is contained in:
Matt
2021-02-19 18:12:22 +02:00
parent e11304f1df
commit 62a01fe043
3 changed files with 1094 additions and 1094 deletions

View File

@@ -11,6 +11,8 @@
#include "../world/TileInspector.h"
using namespace OpenRCT2;
TileModifyAction::TileModifyAction(
CoordsXY loc, TileModifyType setting, uint32_t value1, uint32_t value2, TileElement pasteElement)
: _loc(loc)
@@ -55,163 +57,163 @@ GameActions::Result::Ptr TileModifyAction::QueryExecute(bool isExecuting) const
case TileModifyType::AnyRemove:
{
const auto elementIndex = _value1;
res = tile_inspector_remove_element_at(_loc, elementIndex, isExecuting);
res = TileInspector::RemoveElementAt(_loc, elementIndex, isExecuting);
break;
}
case TileModifyType::AnySwap:
{
const auto firstIndex = _value1;
const auto secondIndex = _value2;
res = tile_inspector_swap_elements_at(_loc, firstIndex, secondIndex, isExecuting);
res = TileInspector::SwapElementsAt(_loc, firstIndex, secondIndex, isExecuting);
break;
}
case TileModifyType::AnyInsertCorrupt:
{
const auto elementIndex = _value1;
res = tile_inspector_insert_corrupt_at(_loc, elementIndex, isExecuting);
res = TileInspector::InsertCorruptElementAt(_loc, elementIndex, isExecuting);
break;
}
case TileModifyType::AnyRotate:
{
const auto elementIndex = _value1;
res = tile_inspector_rotate_element_at(_loc, elementIndex, isExecuting);
res = TileInspector::RotateElementAt(_loc, elementIndex, isExecuting);
break;
}
case TileModifyType::AnyPaste:
{
res = tile_inspector_paste_element_at(_loc, _pasteElement, isExecuting);
res = TileInspector::PasteElementAt(_loc, _pasteElement, isExecuting);
break;
}
case TileModifyType::AnySort:
{
res = tile_inspector_sort_elements_at(_loc, isExecuting);
res = TileInspector::SortElementsAt(_loc, isExecuting);
break;
}
case TileModifyType::AnyBaseHeightOffset:
{
const auto elementIndex = _value1;
const auto heightOffset = _value2;
res = tile_inspector_any_base_height_offset(_loc, elementIndex, heightOffset, isExecuting);
res = TileInspector::AnyBaseHeightOffset(_loc, elementIndex, heightOffset, isExecuting);
break;
}
case TileModifyType::SurfaceShowParkFences:
{
const bool showFences = _value1;
res = tile_inspector_surface_show_park_fences(_loc, showFences, isExecuting);
res = TileInspector::SurfaceShowParkFences(_loc, showFences, isExecuting);
break;
}
case TileModifyType::SurfaceToggleCorner:
{
const auto cornerIndex = _value1;
res = tile_inspector_surface_toggle_corner(_loc, cornerIndex, isExecuting);
res = TileInspector::SurfaceToggleCorner(_loc, cornerIndex, isExecuting);
break;
}
case TileModifyType::SurfaceToggleDiagonal:
{
res = tile_inspector_surface_toggle_diagonal(_loc, isExecuting);
res = TileInspector::SurfaceToggleDiagonal(_loc, isExecuting);
break;
}
case TileModifyType::PathSetSlope:
{
const auto elementIndex = _value1;
const bool sloped = _value2;
res = tile_inspector_path_set_sloped(_loc, elementIndex, sloped, isExecuting);
res = TileInspector::PathSetSloped(_loc, elementIndex, sloped, isExecuting);
break;
}
case TileModifyType::PathSetBroken:
{
const auto elementIndex = _value1;
const bool broken = _value2;
res = tile_inspector_path_set_broken(_loc, elementIndex, broken, isExecuting);
res = TileInspector::PathSetBroken(_loc, elementIndex, broken, isExecuting);
break;
}
case TileModifyType::PathToggleEdge:
{
const auto elementIndex = _value1;
const auto edgeIndex = _value2;
res = tile_inspector_path_toggle_edge(_loc, elementIndex, edgeIndex, isExecuting);
res = TileInspector::PathToggleEdge(_loc, elementIndex, edgeIndex, isExecuting);
break;
}
case TileModifyType::EntranceMakeUsable:
{
const auto elementIndex = _value1;
res = tile_inspector_entrance_make_usable(_loc, elementIndex, isExecuting);
res = TileInspector::EntranceMakeUsable(_loc, elementIndex, isExecuting);
break;
}
case TileModifyType::WallSetSlope:
{
const auto elementIndex = _value1;
const auto slopeValue = _value2;
res = tile_inspector_wall_set_slope(_loc, elementIndex, slopeValue, isExecuting);
res = TileInspector::WallSetSlope(_loc, elementIndex, slopeValue, isExecuting);
break;
}
case TileModifyType::WallSetAnimationFrame:
{
const auto elementIndex = _value1;
const auto animationFrameOffset = _value2;
res = tile_inspector_wall_animation_frame_offset(_loc, elementIndex, animationFrameOffset, isExecuting);
res = TileInspector::WallAnimationFrameOffset(_loc, elementIndex, animationFrameOffset, isExecuting);
break;
}
case TileModifyType::TrackBaseHeightOffset:
{
const auto elementIndex = _value1;
const auto heightOffset = _value2;
res = tile_inspector_track_base_height_offset(_loc, elementIndex, heightOffset, isExecuting);
res = TileInspector::TrackBaseHeightOffset(_loc, elementIndex, heightOffset, isExecuting);
break;
}
case TileModifyType::TrackSetChainBlock:
{
const auto elementIndex = _value1;
const bool setChain = _value2;
res = tile_inspector_track_set_chain(_loc, elementIndex, true, setChain, isExecuting);
res = TileInspector::TrackSetChain(_loc, elementIndex, true, setChain, isExecuting);
break;
}
case TileModifyType::TrackSetChain:
{
const auto elementIndex = _value1;
const bool setChain = _value2;
res = tile_inspector_track_set_chain(_loc, elementIndex, false, setChain, isExecuting);
res = TileInspector::TrackSetChain(_loc, elementIndex, false, setChain, isExecuting);
break;
}
case TileModifyType::TrackSetBlockBrake:
{
const auto elementIndex = _value1;
const bool blockBrake = _value2;
res = tile_inspector_track_set_block_brake(_loc, elementIndex, blockBrake, isExecuting);
res = TileInspector::TrackSetBlockBrake(_loc, elementIndex, blockBrake, isExecuting);
break;
}
case TileModifyType::TrackSetIndestructible:
{
const auto elementIndex = _value1;
const bool isIndestructible = _value2;
res = tile_inspector_track_set_indestructible(_loc, elementIndex, isIndestructible, isExecuting);
res = TileInspector::TrackSetIndestructible(_loc, elementIndex, isIndestructible, isExecuting);
break;
}
case TileModifyType::ScenerySetQuarterLocation:
{
const auto elementIndex = _value1;
const auto quarterIndex = _value2;
res = tile_inspector_scenery_set_quarter_location(_loc, elementIndex, quarterIndex, isExecuting);
res = TileInspector::ScenerySetQuarterLocation(_loc, elementIndex, quarterIndex, isExecuting);
break;
}
case TileModifyType::ScenerySetQuarterCollision:
{
const auto elementIndex = _value1;
const auto quarterIndex = _value2;
res = tile_inspector_scenery_set_quarter_collision(_loc, elementIndex, quarterIndex, isExecuting);
res = TileInspector::ScenerySetQuarterCollision(_loc, elementIndex, quarterIndex, isExecuting);
break;
}
case TileModifyType::BannerToggleBlockingEdge:
{
const auto elementIndex = _value1;
const auto edgeIndex = _value2;
res = tile_inspector_banner_toggle_blocking_edge(_loc, elementIndex, edgeIndex, isExecuting);
res = TileInspector::BannerToggleBlockingEdge(_loc, elementIndex, edgeIndex, isExecuting);
break;
}
case TileModifyType::CorruptClamp:
{
const auto elementIndex = _value1;
res = tile_inspector_corrupt_clamp(_loc, elementIndex, isExecuting);
res = TileInspector::CorruptClamp(_loc, elementIndex, isExecuting);
break;
}
default: