Merge pull request #19241 from Gymnasiast/refactor/more-fields

Desnake TileElement fields, pad_ and byte_
This commit is contained in:
Michael Steenbeek 2023-01-21 22:38:07 +01:00 committed by GitHub
commit ba39d7be5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
26 changed files with 240 additions and 240 deletions

View File

@ -28,10 +28,10 @@ static constexpr uint32_t InvalidTick = 0xFFFFFFFF;
#pragma pack(push, 1)
union EntitySnapshot
{
uint8_t pad_00[0x200];
uint8_t Pad00[0x200];
EntityBase base;
EntitySnapshot()
: pad_00()
: Pad00()
{
}
};
@ -436,9 +436,9 @@ struct GameStateSnapshots final : public IGameStateSnapshots
COMPARE_FIELD(Vehicle, powered_acceleration);
COMPARE_FIELD(Vehicle, CollisionDetectionTimer);
COMPARE_FIELD(Vehicle, animation_frame);
for (std::size_t i = 0; i < sizeof(Vehicle::pad_C6) / sizeof(*Vehicle::pad_C6); i++)
for (std::size_t i = 0; i < sizeof(Vehicle::PadC6) / sizeof(*Vehicle::PadC6); i++)
{
COMPARE_FIELD(Vehicle, pad_C6[i]);
COMPARE_FIELD(Vehicle, PadC6[i]);
}
COMPARE_FIELD(Vehicle, animationState);
COMPARE_FIELD(Vehicle, scream_sound_id);

View File

@ -211,10 +211,10 @@ GameActions::Result MazeSetTrackAction::Execute() const
if (!_initialPlacement)
{
segmentOffset = byte_993CE9[(_loc.direction + segmentOffset)];
segmentOffset = Byte993CE9[(_loc.direction + segmentOffset)];
tileElement->AsTrack()->MazeEntrySubtract(1 << segmentOffset);
uint8_t temp_edx = byte_993CFC[segmentOffset];
uint8_t temp_edx = Byte993CFC[segmentOffset];
if (temp_edx != 0xFF)
{
auto previousElementLoc = CoordsXY{ _loc }.ToTileStart() - CoordsDirectionDelta[_loc.direction];
@ -269,7 +269,7 @@ GameActions::Result MazeSetTrackAction::Execute() const
{
tileElement->AsTrack()->MazeEntryAdd(1 << segmentBit);
uint32_t direction1 = byte_993D0C[segmentBit];
uint32_t direction1 = Byte993D0C[segmentBit];
auto nextElementLoc = previousSegment.ToTileStart() + CoordsDirectionDelta[direction1];
TileElement* tmp_tileElement = MapGetTrackElementAtOfTypeFromRide(
@ -277,7 +277,7 @@ GameActions::Result MazeSetTrackAction::Execute() const
if (tmp_tileElement != nullptr)
{
uint8_t edx11 = byte_993CFC[segmentBit];
uint8_t edx11 = Byte993CFC[segmentBit];
tmp_tileElement->AsTrack()->MazeEntryAdd(1 << (edx11));
}

View File

@ -12,7 +12,7 @@
#include "GameAction.h"
// clang-format off
/** rct2: 0x00993CE9 */
static constexpr const uint8_t byte_993CE9[] = {
static constexpr const uint8_t Byte993CE9[] = {
0xFF, 0xE0, 0xFF,
14, 0, 1, 2,
6, 2, 4, 5,
@ -21,7 +21,7 @@ static constexpr const uint8_t byte_993CE9[] = {
};
/** rct2: 0x00993CFC */
static constexpr const uint8_t byte_993CFC[] = {
static constexpr const uint8_t Byte993CFC[] = {
5, 12, 0xFF, 0xFF,
9, 0, 0xFF, 0xFF,
13, 4, 0xFF, 0xFF,
@ -29,7 +29,7 @@ static constexpr const uint8_t byte_993CFC[] = {
};
/** rct2: 0x00993D0C */
static constexpr const uint8_t byte_993D0C[] = {
static constexpr const uint8_t Byte993D0C[] = {
3, 0, 0xFF, 0xFF,
0, 1, 0xFF, 0xFF,
1, 2, 0xFF, 0xFF,

View File

@ -450,32 +450,32 @@ template<> struct DataSerializerTraitsT<TileElement>
{
static void encode(OpenRCT2::IStream* stream, const TileElement& tileElement)
{
stream->WriteValue(tileElement.type);
stream->WriteValue(tileElement.Type);
stream->WriteValue(tileElement.Flags);
stream->WriteValue(tileElement.BaseHeight);
stream->WriteValue(tileElement.ClearanceHeight);
stream->WriteValue(tileElement.Owner);
for (auto v : tileElement.pad_05)
for (auto v : tileElement.Pad05)
{
stream->WriteValue(v);
}
for (auto v : tileElement.pad_08)
for (auto v : tileElement.Pad08)
{
stream->WriteValue(v);
}
}
static void decode(OpenRCT2::IStream* stream, TileElement& tileElement)
{
tileElement.type = stream->ReadValue<uint8_t>();
tileElement.Type = stream->ReadValue<uint8_t>();
tileElement.Flags = stream->ReadValue<uint8_t>();
tileElement.BaseHeight = stream->ReadValue<uint8_t>();
tileElement.ClearanceHeight = stream->ReadValue<uint8_t>();
tileElement.Owner = stream->ReadValue<uint8_t>();
for (auto& v : tileElement.pad_05)
for (auto& v : tileElement.Pad05)
{
v = stream->ReadValue<uint8_t>();
}
for (auto& v : tileElement.pad_08)
for (auto& v : tileElement.Pad08)
{
v = stream->ReadValue<uint8_t>();
}
@ -484,7 +484,7 @@ template<> struct DataSerializerTraitsT<TileElement>
{
char msg[128] = {};
snprintf(
msg, sizeof(msg), "TileElement(type = %u, flags = %u, BaseHeight = %u)", tileElement.type, tileElement.Flags,
msg, sizeof(msg), "TileElement(type = %u, flags = %u, BaseHeight = %u)", tileElement.Type, tileElement.Flags,
tileElement.BaseHeight);
stream->Write(msg, strlen(msg));
}

View File

@ -38,10 +38,10 @@
union Entity
{
uint8_t pad_00[0x200];
uint8_t Pad00[0x200];
EntityBase base;
Entity()
: pad_00()
: Pad00()
{
}
};

View File

@ -265,15 +265,15 @@ struct CampaignVariables
::RideId RideId;
ObjectEntryIndex ShopItemId;
};
uint32_t pad_486;
uint32_t Pad486;
};
struct NewRideVariables
{
RideSelection SelectedRide; // 0x480
RideSelection HighlightedRide; // 0x482
uint16_t pad_484;
uint16_t pad_486;
uint16_t Pad484;
uint16_t Pad486;
uint16_t selected_ride_countdown; // 488
};

View File

@ -85,7 +85,7 @@ void RideObject::ReadLegacy(IReadObjectContext* context, IStream* stream)
_legacyType.ThirdCar = stream->ReadValue<uint8_t>();
_legacyType.BuildMenuPriority = 0;
// Skip pad_019
// Skip Pad019
stream->Seek(1, STREAM_SEEK_CURRENT);
for (auto& carEntry : _legacyType.Cars)

View File

@ -43,9 +43,9 @@ void SceneryGroupObject::ReadLegacy(IReadObjectContext* context, IStream* stream
stream->Seek(6, STREAM_SEEK_CURRENT);
stream->Seek(0x80 * 2, STREAM_SEEK_CURRENT);
stream->Seek(1, STREAM_SEEK_CURRENT); // entry_count
stream->Seek(1, STREAM_SEEK_CURRENT); // pad_107;
stream->Seek(1, STREAM_SEEK_CURRENT); // Pad107;
_legacyType.priority = stream->ReadValue<uint8_t>();
stream->Seek(1, STREAM_SEEK_CURRENT); // pad_109;
stream->Seek(1, STREAM_SEEK_CURRENT); // Pad109;
_legacyType.entertainer_costumes = stream->ReadValue<uint32_t>();
GetStringTable().Read(context, stream, ObjectStringID::NAME);

View File

@ -316,7 +316,7 @@ struct UnkSupportsDescriptor {
};
/* 0x0097B23C */
static constexpr const UnkSupportsDescriptor byte_97B23C[] = {
static constexpr const UnkSupportsDescriptor Byte97B23C[] = {
{{{0, 0, 0}, {1, 1, 8}}, 0, 1}, // Flat to gentle
{{{0, 0, 0}, {1, 1, 8}}, 0, 1},
{{{0, 0, 0}, {1, 1, 8}}, 0, 1},
@ -401,7 +401,7 @@ static constexpr const UnkSupportsDescriptor byte_97B23C[] = {
};
/* 0x0098D8D4 */
static constexpr const UnkSupportsDescriptor byte_98D8D4[] = {
static constexpr const UnkSupportsDescriptor Byte98D8D4[] = {
{{{0, 0, 0}, {1, 1, 4}}, 0, 1},
{{{0, 0, 0}, {1, 1, 4}}, 0, 1},
{{{0, 0, 0}, {1, 1, 4}}, 0, 1},
@ -578,14 +578,14 @@ bool WoodenASupportsPaintSetup(
special = (special - 1) & 0xFFFF;
if (WoodenCurveSupportImageIds[supportType] != nullptr && WoodenCurveSupportImageIds[supportType][special] != 0
&& byte_97B23C[special].var_7 != 0)
&& Byte97B23C[special].var_7 != 0)
{
auto imageId = imageTemplate.WithIndex(WoodenCurveSupportImageIds[supportType][special]);
auto bBox = byte_97B23C[special].bounding_box;
auto bBox = Byte97B23C[special].bounding_box;
bBox.offset.z += z;
if (byte_97B23C[special].var_6 == 0 || session.WoodenSupportsPrependTo == nullptr)
if (Byte97B23C[special].var_6 == 0 || session.WoodenSupportsPrependTo == nullptr)
{
PaintAddImageAsParent(session, imageId, { 0, 0, z }, bBox);
hasSupports = true;
@ -747,11 +747,11 @@ bool WoodenBSupportsPaintSetup(
{
uint16_t specialIndex = (special - 1) & 0xFFFF;
const UnkSupportsDescriptor& supportsDesc = byte_97B23C[specialIndex];
const UnkSupportsDescriptor& supportsDesc = Byte97B23C[specialIndex];
if (WoodenCurveSupportImageIds[supportType] != nullptr && WoodenCurveSupportImageIds[supportType][specialIndex] != 0
&& supportsDesc.var_7 != 0)
{ // byte_97B23C[special].var_7 is never 0
{ // Byte97B23C[special].var_7 is never 0
auto imageId = imageTemplate.WithIndex(WoodenCurveSupportImageIds[supportType][specialIndex]);
auto boundBox = supportsDesc.bounding_box;
@ -1285,7 +1285,7 @@ bool PathASupportsPaintSetup(
ImageIndex imageIndex = pathPaintInfo.BridgeImageId + 55 + specialIndex;
const UnkSupportsDescriptor& supportsDesc = byte_98D8D4[specialIndex];
const UnkSupportsDescriptor& supportsDesc = Byte98D8D4[specialIndex];
auto boundBox = supportsDesc.bounding_box;
boundBox.offset.z += baseHeight;

View File

@ -54,7 +54,7 @@ const uint8_t PathSlopeToLandSlope[] = {
TILE_ELEMENT_SLOPE_SE_SIDE_UP,
};
static constexpr const uint8_t byte_98D6E0[] = {
static constexpr const uint8_t Byte98D6E0[] = {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 20, 4, 5, 6, 22, 8, 9, 10, 26, 12, 13, 14, 36,
0, 1, 2, 3, 4, 5, 21, 23, 8, 9, 10, 11, 12, 13, 33, 37, 0, 1, 2, 3, 4, 5, 6, 24, 8, 9, 10, 11, 12, 13, 14, 38,
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 29, 30, 34, 39, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 40,
@ -85,7 +85,7 @@ static constexpr const BoundBoxXY stru_98D804[] = {
{ { 0, 0 }, { 32, 32 } },
};
static constexpr const uint8_t byte_98D8A4[] = {
static constexpr const uint8_t Byte98D8A4[] = {
0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0
};
// clang-format on
@ -1065,7 +1065,7 @@ void PathPaintBoxSupport(
}
else
{
surfaceBaseImageIndex += byte_98D6E0[edi];
surfaceBaseImageIndex += Byte98D6E0[edi];
}
const bool hasPassedSurface = (session.Flags & PaintSessionFlags::PassedSurface) != 0;
@ -1107,7 +1107,7 @@ void PathPaintBoxSupport(
}
else
{
bridgeBaseImageIndex = byte_98D8A4[edges] + pathPaintInfo.BridgeImageId + 49;
bridgeBaseImageIndex = Byte98D8A4[edges] + pathPaintInfo.BridgeImageId + 49;
}
PaintAddImageAsParent(
@ -1130,7 +1130,7 @@ void PathPaintBoxSupport(
ax = ((pathElement.GetSlopeDirection() + session.CurrentRotation) & 0x3) + 1;
}
auto supportType = byte_98D8A4[edges] == 0 ? 0 : 1;
auto supportType = Byte98D8A4[edges] == 0 ? 0 : 1;
PathASupportsPaintSetup(session, supportType, ax, height, imageTemplate, pathPaintInfo, nullptr);
height += 32;
@ -1203,7 +1203,7 @@ void PathPaintPoleSupport(
}
else
{
surfaceBaseImageIndex += byte_98D6E0[edi];
surfaceBaseImageIndex += Byte98D6E0[edi];
}
// Below Surface

View File

@ -39,7 +39,7 @@
#include <cstring>
#include <iterator>
static constexpr const uint8_t byte_97B444[] = {
static constexpr const uint8_t Byte97B444[] = {
0, 2, 1, 3, 8, 10, 9, 11, 4, 6, 5, 7, 12, 14, 13, 15, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 16, 0, 18, 15, 0,
};
@ -128,25 +128,25 @@ static constexpr const CornerHeight corner_heights[] = {
};
// bottom left tint
static constexpr const uint8_t byte_97B524[] = {
static constexpr const uint8_t Byte97B524[] = {
2, 5, 1, 4, 2, 5, 1, 2, 2, 4,
1, 2, 1, 3, 0, 3, 1, 5, 0,
};
// top left tint
static constexpr const uint32_t byte_97B537[] = {
static constexpr const uint32_t Byte97B537[] = {
2, 5, 2, 4, 2, 5, 1, 1, 3, 4,
3, 2, 1, 2, 0, 3, 1, 5, 0,
};
// top right tint
static constexpr const uint8_t byte_97B54A[] = {
static constexpr const uint8_t Byte97B54A[] = {
2, 2, 2, 4, 0, 0, 1, 1, 3, 4,
3, 5, 1, 2, 2, 3, 1, 5, 0,
};
// bottom right tint
static constexpr const uint8_t byte_97B55D[] = {
static constexpr const uint8_t Byte97B55D[] = {
2, 2, 1, 4, 0, 0, 1, 2, 2, 4,
1, 5, 1, 3, 2, 3, 1, 5, 0,
};
@ -205,11 +205,11 @@ static constexpr const int16_t _boundBoxZOffsets[TUNNEL_TYPE_COUNT] = {
// clang-format on
// tunnel offset
static constexpr const uint8_t byte_97B5B0[TUNNEL_TYPE_COUNT] = {
static constexpr const uint8_t Byte97B5B0[TUNNEL_TYPE_COUNT] = {
0, 0, 0, 3, 3, 3, 6, 6, 6, 6, 10, 11, 12, 13, 14, 14, 16, 17, 18, 19, 20, 21, 22,
};
static constexpr const uint8_t byte_97B740[] = {
static constexpr const uint8_t Byte97B740[] = {
0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 3, 0, 1, 4, 0,
};
@ -498,23 +498,23 @@ static void ViewportSurfaceSmoothenEdge(
switch (edge)
{
case EDGE_BOTTOMLEFT:
dh = byte_97B524[byte_97B444[self.slope]];
cl = byte_97B54A[byte_97B444[neighbour.slope]];
dh = Byte97B524[Byte97B444[self.slope]];
cl = Byte97B54A[Byte97B444[neighbour.slope]];
break;
case EDGE_TOPLEFT:
dh = byte_97B537[byte_97B444[self.slope]];
cl = byte_97B55D[byte_97B444[neighbour.slope]];
dh = Byte97B537[Byte97B444[self.slope]];
cl = Byte97B55D[Byte97B444[neighbour.slope]];
break;
case EDGE_BOTTOMRIGHT:
dh = byte_97B55D[byte_97B444[self.slope]];
cl = byte_97B537[byte_97B444[neighbour.slope]];
dh = Byte97B55D[Byte97B444[self.slope]];
cl = Byte97B537[Byte97B444[neighbour.slope]];
break;
case EDGE_TOPRIGHT:
dh = byte_97B54A[byte_97B444[self.slope]];
cl = byte_97B524[byte_97B444[neighbour.slope]];
dh = Byte97B54A[Byte97B444[self.slope]];
cl = Byte97B524[Byte97B444[neighbour.slope]];
break;
}
@ -536,7 +536,7 @@ static void ViewportSurfaceSmoothenEdge(
return;
}
const auto image_id = ImageId(maskImageBase + byte_97B444[self.slope]);
const auto image_id = ImageId(maskImageBase + Byte97B444[self.slope]);
if (PaintAttachToPreviousPS(session, image_id, 0, 0))
{
@ -722,7 +722,7 @@ static void ViewportSurfaceDrawTileSideBottom(
if ((zOffset + tunnelHeight) > neighbourCornerHeight1 || (zOffset + tunnelHeight) > cornerHeight1)
{
tunnelType = byte_97B5B0[tunnelType];
tunnelType = Byte97B5B0[tunnelType];
}
zOffset *= 16;
@ -1001,10 +1001,10 @@ static void PaintPatrolArea(PaintSession& session, const SurfaceElement& element
auto colour = GetPatrolAreaTileColour(session.MapPosition);
if (colour)
{
assert(surfaceShape < std::size(byte_97B444));
assert(surfaceShape < std::size(Byte97B444));
auto [localZ, localSurfaceShape] = SurfaceGetHeightAboveWater(element, height, surfaceShape);
auto imageId = ImageId(SPR_TERRAIN_SELECTION_PATROL_AREA + byte_97B444[localSurfaceShape], *colour);
auto imageId = ImageId(SPR_TERRAIN_SELECTION_PATROL_AREA + Byte97B444[localSurfaceShape], *colour);
auto* backup = session.LastPS;
PaintAddImageAsParent(session, imageId, { 0, 0, localZ }, { 32, 32, 1 });
@ -1118,8 +1118,8 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con
}
}
assert(surfaceShape < std::size(byte_97B444));
const uint8_t image_offset = byte_97B444[surfaceShape];
assert(surfaceShape < std::size(Byte97B444));
const uint8_t image_offset = Byte97B444[surfaceShape];
ImageId imageId;
if (gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER))
@ -1169,8 +1169,8 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con
// Loc660E9A:
if (tileElement.GetOwnership() & OWNERSHIP_OWNED)
{
assert(surfaceShape < std::size(byte_97B444));
PaintAttachToPreviousPS(session, ImageId(SPR_TERRAIN_SELECTION_SQUARE + byte_97B444[surfaceShape]), 0, 0);
assert(surfaceShape < std::size(Byte97B444));
PaintAttachToPreviousPS(session, ImageId(SPR_TERRAIN_SELECTION_SQUARE + Byte97B444[surfaceShape]), 0, 0);
}
else if (tileElement.GetOwnership() & OWNERSHIP_AVAILABLE)
{
@ -1186,8 +1186,8 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con
{
if (tileElement.GetOwnership() & OWNERSHIP_CONSTRUCTION_RIGHTS_OWNED)
{
assert(surfaceShape < std::size(byte_97B444));
PaintAttachToPreviousPS(session, ImageId(SPR_TERRAIN_SELECTION_DOTTED + byte_97B444[surfaceShape]), 0, 0);
assert(surfaceShape < std::size(Byte97B444));
PaintAttachToPreviousPS(session, ImageId(SPR_TERRAIN_SELECTION_DOTTED + Byte97B444[surfaceShape]), 0, 0);
}
else if (tileElement.GetOwnership() & OWNERSHIP_CONSTRUCTION_RIGHTS_AVAILABLE)
{
@ -1217,7 +1217,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con
// Walls
// Loc661089:
const auto fpId = static_cast<FilterPaletteID>((((mapSelectionType - 9) + rotation) & 3) + 0x21);
const auto image_id = ImageId(SPR_TERRAIN_SELECTION_EDGE + byte_97B444[surfaceShape], fpId);
const auto image_id = ImageId(SPR_TERRAIN_SELECTION_EDGE + Byte97B444[surfaceShape], fpId);
PaintAttachToPreviousPS(session, image_id, 0, 0);
}
else if (mapSelectionType >= MAP_SELECT_TYPE_QUARTER_0)
@ -1226,7 +1226,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con
// Selection split into four quarter segments
const auto fpId = static_cast<FilterPaletteID>(
(((mapSelectionType - MAP_SELECT_TYPE_QUARTER_0) + rotation) & 3) + 0x27);
const auto image_id = ImageId(SPR_TERRAIN_SELECTION_QUARTER + byte_97B444[surfaceShape], fpId);
const auto image_id = ImageId(SPR_TERRAIN_SELECTION_QUARTER + Byte97B444[surfaceShape], fpId);
PaintAttachToPreviousPS(session, image_id, 0, 0);
}
else if (mapSelectionType <= MAP_SELECT_TYPE_FULL)
@ -1239,7 +1239,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con
}
const auto fpId = static_cast<FilterPaletteID>(eax + 0x21);
const auto image_id = ImageId(SPR_TERRAIN_SELECTION_CORNER + byte_97B444[surfaceShape], fpId);
const auto image_id = ImageId(SPR_TERRAIN_SELECTION_CORNER + Byte97B444[surfaceShape], fpId);
PaintAttachToPreviousPS(session, image_id, 0, 0);
}
else
@ -1248,7 +1248,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con
auto [local_height, local_surfaceShape] = SurfaceGetHeightAboveWater(tileElement, height, surfaceShape);
const auto fpId = static_cast<FilterPaletteID>(38);
const auto image_id = ImageId(SPR_TERRAIN_SELECTION_CORNER + byte_97B444[local_surfaceShape], fpId);
const auto image_id = ImageId(SPR_TERRAIN_SELECTION_CORNER + Byte97B444[local_surfaceShape], fpId);
PaintStruct* backup = session.LastPS;
PaintAddImageAsParent(session, image_id, { 0, 0, local_height }, { 32, 32, 1 });
@ -1274,7 +1274,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con
fpId = static_cast<FilterPaletteID>(43);
}
const auto image_id = ImageId(SPR_TERRAIN_SELECTION_CORNER + byte_97B444[surfaceShape], fpId);
const auto image_id = ImageId(SPR_TERRAIN_SELECTION_CORNER + Byte97B444[surfaceShape], fpId);
PaintAttachToPreviousPS(session, image_id, 0, 0);
break;
}
@ -1292,7 +1292,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con
if ((session.ViewFlags & VIEWPORT_FLAG_UNDERGROUND_INSIDE) && !(session.ViewFlags & VIEWPORT_FLAG_HIDE_BASE)
&& !(gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)))
{
const uint8_t image_offset = byte_97B444[surfaceShape];
const uint8_t image_offset = Byte97B444[surfaceShape];
auto imageId = GetSurfaceImage(session, terrain_type, image_offset, rotation, 1, false, true);
PaintAttachToPreviousPS(session, imageId, 0, 0);
}
@ -1326,7 +1326,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con
int32_t image_offset = 0;
if (waterHeight <= localHeight)
{
image_offset = byte_97B740[surfaceShape & 0xF];
image_offset = Byte97B740[surfaceShape & 0xF];
}
const auto image_id = ImageId(SPR_WATER_MASK + image_offset, FilterPaletteID::PaletteWater).WithBlended(true);

View File

@ -30,7 +30,7 @@ using namespace OpenRCT2;
RCT12TileElementType RCT12TileElementBase::GetType() const
{
auto elem_type = static_cast<RCT12TileElementType>((this->type & TILE_ELEMENT_TYPE_MASK) >> 2);
auto elem_type = static_cast<RCT12TileElementType>((this->Type & TILE_ELEMENT_TYPE_MASK) >> 2);
switch (elem_type)
{
case RCT12TileElementType::Surface:
@ -53,22 +53,22 @@ RCT12TileElementType RCT12TileElementBase::GetType() const
uint8_t RCT12TileElementBase::GetDirection() const
{
return this->type & TILE_ELEMENT_DIRECTION_MASK;
return this->Type & TILE_ELEMENT_DIRECTION_MASK;
}
uint8_t RCT12TileElementBase::GetOccupiedQuadrants() const
{
return flags & TILE_ELEMENT_OCCUPIED_QUADRANTS_MASK;
return Flags & TILE_ELEMENT_OCCUPIED_QUADRANTS_MASK;
}
bool RCT12TileElementBase::IsLastForTile() const
{
return (this->flags & RCT12_TILE_ELEMENT_FLAG_LAST_TILE) != 0;
return (this->Flags & RCT12_TILE_ELEMENT_FLAG_LAST_TILE) != 0;
}
bool RCT12TileElementBase::IsGhost() const
{
return (this->flags & RCT12_TILE_ELEMENT_FLAG_GHOST) != 0;
return (this->Flags & RCT12_TILE_ELEMENT_FLAG_GHOST) != 0;
}
uint8_t RCT12SurfaceElement::GetSlope() const
@ -79,14 +79,14 @@ uint8_t RCT12SurfaceElement::GetSlope() const
uint32_t RCT12SurfaceElement::GetSurfaceStyle() const
{
uint32_t retVal = (terrain >> 5) & 7;
retVal |= (type & RCT12_SURFACE_ELEMENT_TYPE_SURFACE_MASK) << 3;
retVal |= (Type & RCT12_SURFACE_ELEMENT_TYPE_SURFACE_MASK) << 3;
return retVal;
}
uint32_t RCT12SurfaceElement::GetEdgeStyle() const
{
uint32_t terrain_edge = (slope >> 5) & 7;
if (type & 128)
if (Type & 128)
terrain_edge |= (1 << 3);
return terrain_edge;
}
@ -113,7 +113,7 @@ uint8_t RCT12SurfaceElement::GetParkFences() const
bool RCT12SurfaceElement::HasTrackThatNeedsWater() const
{
return (type & SURFACE_ELEMENT_HAS_TRACK_THAT_NEEDS_WATER) != 0;
return (Type & SURFACE_ELEMENT_HAS_TRACK_THAT_NEEDS_WATER) != 0;
}
uint8_t RCT12PathElement::GetEntryIndex() const
@ -123,7 +123,7 @@ uint8_t RCT12PathElement::GetEntryIndex() const
uint8_t RCT12PathElement::GetQueueBannerDirection() const
{
return ((type & FOOTPATH_ELEMENT_TYPE_DIRECTION_MASK) >> 6);
return ((Type & FOOTPATH_ELEMENT_TYPE_DIRECTION_MASK) >> 6);
}
bool RCT12PathElement::IsSloped() const
@ -148,12 +148,12 @@ uint8_t RCT12PathElement::GetStationIndex() const
bool RCT12PathElement::IsWide() const
{
return (type & FOOTPATH_ELEMENT_TYPE_FLAG_IS_WIDE) != 0;
return (Type & FOOTPATH_ELEMENT_TYPE_FLAG_IS_WIDE) != 0;
}
bool RCT12PathElement::IsQueue() const
{
return (type & FOOTPATH_ELEMENT_TYPE_FLAG_IS_QUEUE) != 0;
return (Type & FOOTPATH_ELEMENT_TYPE_FLAG_IS_QUEUE) != 0;
}
bool RCT12PathElement::HasQueueBanner() const
@ -187,7 +187,7 @@ uint8_t RCT12PathElement::GetAdditionStatus() const
uint8_t RCT12PathElement::GetRCT1PathType() const
{
uint8_t pathColour = type & 3;
uint8_t pathColour = Type & 3;
uint8_t pathType2 = (entryIndex & RCT12_FOOTPATH_PROPERTIES_TYPE_MASK) >> 2;
pathType2 = pathType2 | pathColour;
@ -196,7 +196,7 @@ uint8_t RCT12PathElement::GetRCT1PathType() const
uint8_t RCT12PathElement::GetRCT1SupportType() const
{
return (flags & 0b01100000) >> 5;
return (Flags & 0b01100000) >> 5;
}
uint8_t RCT12TrackElement::GetTrackType() const
@ -230,7 +230,7 @@ uint8_t RCT12TrackElement::GetStationIndex() const
bool RCT12TrackElement::HasChain() const
{
return type & RCT12_TRACK_ELEMENT_TYPE_FLAG_CHAIN_LIFT;
return Type & RCT12_TRACK_ELEMENT_TYPE_FLAG_CHAIN_LIFT;
}
bool RCT12TrackElement::HasCableLift() const
@ -292,7 +292,7 @@ uint8_t RCT12TrackElement::GetDoorBState() const
bool RCT12TrackElement::IsIndestructible() const
{
return (flags & RCT12_TILE_ELEMENT_FLAG_INDESTRUCTIBLE_TRACK_PIECE) != 0;
return (Flags & RCT12_TILE_ELEMENT_FLAG_INDESTRUCTIBLE_TRACK_PIECE) != 0;
}
uint8_t RCT12SmallSceneryElement::GetEntryIndex() const
@ -307,7 +307,7 @@ uint8_t RCT12SmallSceneryElement::GetAge() const
uint8_t RCT12SmallSceneryElement::GetSceneryQuadrant() const
{
return (this->type & TILE_ELEMENT_QUADRANT_MASK) >> 6;
return (this->Type & TILE_ELEMENT_QUADRANT_MASK) >> 6;
}
colour_t RCT12SmallSceneryElement::GetPrimaryColour() const
@ -346,7 +346,7 @@ colour_t RCT12LargeSceneryElement::GetSecondaryColour() const
uint8_t RCT12LargeSceneryElement::GetBannerIndex() const
{
return (type & 0xC0) | (((colour[0]) & ~TILE_ELEMENT_COLOUR_MASK) >> 2) | (((colour[1]) & ~TILE_ELEMENT_COLOUR_MASK) >> 5);
return (Type & 0xC0) | (((colour[0]) & ~TILE_ELEMENT_COLOUR_MASK) >> 2) | (((colour[1]) & ~TILE_ELEMENT_COLOUR_MASK) >> 5);
}
uint8_t RCT12WallElement::GetEntryIndex() const
@ -356,7 +356,7 @@ uint8_t RCT12WallElement::GetEntryIndex() const
uint8_t RCT12WallElement::GetSlope() const
{
return (type & TILE_ELEMENT_QUADRANT_MASK) >> 6;
return (Type & TILE_ELEMENT_QUADRANT_MASK) >> 6;
}
colour_t RCT12WallElement::GetPrimaryColour() const
@ -367,7 +367,7 @@ colour_t RCT12WallElement::GetPrimaryColour() const
colour_t RCT12WallElement::GetSecondaryColour() const
{
uint8_t secondaryColour = (colour_1 & ~TILE_ELEMENT_COLOUR_MASK) >> 5;
secondaryColour |= (flags & 0x60) >> 2;
secondaryColour |= (Flags & 0x60) >> 2;
return secondaryColour;
}
@ -414,7 +414,7 @@ int32_t RCT12WallElement::GetRCT1WallType(int32_t edge) const
colour_t RCT12WallElement::GetRCT1WallColour() const
{
return ((type & 0xC0) >> 3) | ((entryIndex & 0xE0) >> 5);
return ((Type & 0xC0) >> 3) | ((entryIndex & 0xE0) >> 5);
}
uint8_t RCT12WallElement::GetRCT1Slope() const
@ -469,17 +469,17 @@ bool IsUserStringID(StringId stringId)
bool RCT12PathElement::IsBroken() const
{
return (flags & RCT12_TILE_ELEMENT_FLAG_BROKEN) != 0;
return (Flags & RCT12_TILE_ELEMENT_FLAG_BROKEN) != 0;
}
bool RCT12PathElement::IsBlockedByVehicle() const
{
return (flags & RCT12_TILE_ELEMENT_FLAG_BLOCKED_BY_VEHICLE) != 0;
return (Flags & RCT12_TILE_ELEMENT_FLAG_BLOCKED_BY_VEHICLE) != 0;
}
bool RCT12TrackElement::BlockBrakeClosed() const
{
return (flags & RCT12_TILE_ELEMENT_FLAG_BLOCK_BRAKE_CLOSED) != 0;
return (Flags & RCT12_TILE_ELEMENT_FLAG_BLOCK_BRAKE_CLOSED) != 0;
}
bool RCT12ResearchItem::IsInventedEndMarker() const

View File

@ -240,7 +240,7 @@ struct rct12_news_item
uint16_t Ticks;
uint16_t MonthYear;
uint8_t Day;
uint8_t pad_0B;
uint8_t Pad0B;
char Text[256];
};
assert_struct_size(rct12_news_item, 0x10C);
@ -310,8 +310,8 @@ struct RCT12EightCarsCorruptElement15;
struct RCT12TileElementBase
{
uint8_t type; // 0
uint8_t flags; // 1. Upper nibble: flags. Lower nibble: occupied quadrants (one bit per quadrant).
uint8_t Type; // 0
uint8_t Flags; // 1. Upper nibble: flags. Lower nibble: occupied quadrants (one bit per quadrant).
uint8_t BaseHeight; // 2
uint8_t ClearanceHeight; // 3
RCT12TileElementType GetType() const;
@ -328,7 +328,7 @@ struct RCT12TileElementBase
*/
struct RCT12TileElement : public RCT12TileElementBase
{
uint8_t pad_04[4];
uint8_t Pad04[4];
template<typename TType, RCT12TileElementType TClass> const TType* as() const
{
return static_cast<RCT12TileElementType>(GetType()) == TClass ? reinterpret_cast<const TType*>(this) : nullptr;
@ -677,63 +677,63 @@ assert_struct_size(RCT12EntityBase, 0x1F);
struct RCT12EntityBalloon : RCT12EntityBase
{
uint8_t pad_1F[0x24 - 0x1F];
uint8_t Pad1F[0x24 - 0x1F];
uint16_t popped; // 0x24
uint8_t time_to_move; // 0x26
uint8_t frame; // 0x27
uint8_t pad_28[4];
uint8_t Pad28[4];
uint8_t colour; // 0x2C
};
assert_struct_size(RCT12EntityBalloon, 0x2D);
struct RCT12EntityDuck : RCT12EntityBase
{
uint8_t pad_1F[0x26 - 0x1F];
uint8_t Pad1F[0x26 - 0x1F];
uint16_t frame; // 0x26
uint8_t pad_28[0x30 - 0x28];
uint8_t Pad28[0x30 - 0x28];
int16_t target_x; // 0x30
int16_t target_y; // 0x32
uint8_t pad_34[0x14];
uint8_t Pad34[0x14];
uint8_t state; // 0x48
};
assert_struct_size(RCT12EntityDuck, 0x49);
struct RCT12EntityLitter : RCT12EntityBase
{
uint8_t pad_1F[0x24 - 0x1F];
uint8_t Pad1F[0x24 - 0x1F];
uint32_t creationTick; // 0x24
};
assert_struct_size(RCT12EntityLitter, 0x28);
struct RCT12EntityParticle : RCT12EntityBase
{
uint8_t pad_1F[0x26 - 0x1F];
uint8_t Pad1F[0x26 - 0x1F];
uint16_t frame; // 0x26
};
assert_struct_size(RCT12EntityParticle, 0x28);
struct RCT12EntityJumpingFountain : RCT12EntityBase
{
uint8_t pad_1F[0x26 - 0x1F];
uint8_t Pad1F[0x26 - 0x1F];
uint8_t num_ticks_alive; // 0x26
uint8_t frame; // 0x27
uint8_t pad_28[0x2F - 0x28];
uint8_t Pad28[0x2F - 0x28];
uint8_t fountain_flags; // 0x2F
int16_t target_x; // 0x30
int16_t target_y; // 0x32
uint8_t pad_34[0x46 - 0x34];
uint8_t Pad34[0x46 - 0x34];
uint16_t iteration; // 0x46
};
assert_struct_size(RCT12EntityJumpingFountain, 0x48);
struct RCT12EntityMoneyEffect : RCT12EntityBase
{
uint8_t pad_1F[0x24 - 0x1F];
uint8_t Pad1F[0x24 - 0x1F];
uint16_t move_delay; // 0x24
uint8_t num_movements; // 0x26
uint8_t vertical;
money32 value; // 0x28
uint8_t pad_2C[0x44 - 0x2C];
uint8_t Pad2C[0x44 - 0x2C];
int16_t offset_x; // 0x44
uint16_t wiggle; // 0x46
};
@ -741,16 +741,16 @@ assert_struct_size(RCT12EntityMoneyEffect, 0x48);
struct RCT12EntityCrashedVehicleParticle : RCT12EntityBase
{
uint8_t pad_1F[0x24 - 0x1F];
uint8_t Pad1F[0x24 - 0x1F];
uint16_t time_to_live; // 0x24
uint16_t frame; // 0x26
uint8_t pad_28[0x2C - 0x28];
uint8_t Pad28[0x2C - 0x28];
uint8_t colour[2]; // 0x2C
uint16_t CrashedEntityBase; // 0x2E
int16_t velocity_x; // 0x30
int16_t velocity_y; // 0x32
int16_t velocity_z; // 0x34
uint8_t pad_36[0x38 - 0x36];
uint8_t Pad36[0x38 - 0x36];
int32_t acceleration_x; // 0x38
int32_t acceleration_y; // 0x3C
int32_t acceleration_z; // 0x40
@ -759,14 +759,14 @@ assert_struct_size(RCT12EntityCrashedVehicleParticle, 0x44);
struct RCT12EntityCrashSplash : RCT12EntityBase
{
uint8_t pad_1F[0x26 - 0x1F];
uint8_t Pad1F[0x26 - 0x1F];
uint16_t frame; // 0x26
};
assert_struct_size(RCT12EntityCrashSplash, 0x28);
struct RCT12EntitySteamParticle : RCT12EntityBase
{
uint8_t pad_1F[0x24 - 0x1F];
uint8_t Pad1F[0x24 - 0x1F];
uint16_t time_to_move; // 0x24
uint16_t frame; // 0x26
};

View File

@ -73,11 +73,11 @@ namespace RCT2
// pointer to static info. for example, wild mouse type is 0x36, subtype is
// 0x4c.
RCT12ObjectEntryIndex subtype; // 0x001
uint16_t pad_002; // 0x002
uint16_t Pad002; // 0x002
uint8_t mode; // 0x004
uint8_t colour_scheme_type; // 0x005
RCT12VehicleColour vehicle_colours[Limits::MaxTrainsPerRide]; // 0x006
uint8_t pad_046[0x03]; // 0x046, Used to be track colours in RCT1 without expansions
uint8_t Pad046[0x03]; // 0x046, Used to be track colours in RCT1 without expansions
// 0 = closed, 1 = open, 2 = test
uint8_t status; // 0x049
StringId name; // 0x04A
@ -101,7 +101,7 @@ namespace RCT2
RCT12xy8 entrances[Limits::MaxStationsPerRide]; // 0x06A
RCT12xy8 exits[Limits::MaxStationsPerRide]; // 0x072
uint16_t last_peep_in_queue[Limits::MaxStationsPerRide]; // 0x07A
uint8_t pad_082[Limits::MaxStationsPerRide]; // 0x082, Used to be number of peeps in queue in RCT1, but this
uint8_t Pad082[Limits::MaxStationsPerRide]; // 0x082, Used to be number of peeps in queue in RCT1, but this
// has moved.
uint16_t vehicles[Limits::MaxTrainsPerRide]; // 0x086, Points to the first car in the train
uint8_t depart_flags; // 0x0C6
@ -134,14 +134,14 @@ namespace RCT2
// bit 6: log reverser, waterfall
// bit 7: whirlpool
uint8_t special_track_elements; // 0x0D5
uint8_t pad_0D6[2]; // 0x0D6
uint8_t Pad0D6[2]; // 0x0D6
// Divide this value by 29127 to get the human-readable max speed
// (in RCT2, display_speed = (max_speed * 9) >> 18)
int32_t max_speed; // 0x0D8
int32_t average_speed; // 0x0DC
uint8_t current_test_segment; // 0x0E0
uint8_t average_speed_test_timeout; // 0x0E1
uint8_t pad_0E2[0x2]; // 0x0E2
uint8_t Pad0E2[0x2]; // 0x0E2
int32_t length[Limits::MaxStationsPerRide]; // 0x0E4
uint16_t time[Limits::MaxStationsPerRide]; // 0x0F4
fixed16_2dp max_positive_vertical_g; // 0x0FC
@ -149,7 +149,7 @@ namespace RCT2
fixed16_2dp max_lateral_g; // 0x100
fixed16_2dp previous_vertical_g; // 0x102
fixed16_2dp previous_lateral_g; // 0x104
uint8_t pad_106[0x2]; // 0x106
uint8_t Pad106[0x2]; // 0x106
uint32_t testing_flags; // 0x108
// x y map location of the current track piece during a test
// this is to prevent counting special tracks multiple times
@ -202,7 +202,7 @@ namespace RCT2
uint8_t satisfaction_next; // 0x14C
// Various flags stating whether a window needs to be refreshed
uint8_t window_invalidate_flags; // 0x14D
uint8_t pad_14E[0x02]; // 0x14E
uint8_t Pad14E[0x02]; // 0x14E
uint32_t total_customers; // 0x150
money32 total_profit; // 0x154
uint8_t popularity; // 0x158
@ -216,15 +216,15 @@ namespace RCT2
uint16_t slide_peep; // 0x15E
uint16_t maze_tiles; // 0x15E
};
uint8_t pad_160[0xE]; // 0x160
uint8_t Pad160[0xE]; // 0x160
uint8_t slide_peep_t_shirt_colour; // 0x16E
uint8_t pad_16F[0x7]; // 0x16F
uint8_t Pad16F[0x7]; // 0x16F
uint8_t spiral_slide_progress; // 0x176
uint8_t pad_177[0x9]; // 0x177
uint8_t Pad177[0x9]; // 0x177
int16_t build_date; // 0x180
money16 upkeep_cost; // 0x182
uint16_t race_winner; // 0x184
uint8_t pad_186[0x02]; // 0x186
uint8_t Pad186[0x02]; // 0x186
uint32_t music_position; // 0x188
uint8_t breakdown_reason_pending; // 0x18C
uint8_t mechanic_status; // 0x18D
@ -279,10 +279,10 @@ namespace RCT2
int16_t cable_lift_x; // 0x1F8
int16_t cable_lift_y; // 0x1FA
uint8_t cable_lift_z; // 0x1FC
uint8_t pad_1FD; // 0x1FD
uint8_t Pad1FD; // 0x1FD
uint16_t cable_lift; // 0x1FE
uint16_t queue_length[Limits::MaxStationsPerRide]; // 0x200
uint8_t pad_208[0x58]; // 0x208
uint8_t Pad208[0x58]; // 0x208
uint8_t GetMinCarsPerTrain() const;
uint8_t GetMaxCarsPerTrain() const;
@ -340,7 +340,7 @@ namespace RCT2
RCT12VehicleColour vehicle_colours[Limits::MaxTrainsPerRide]; // 0x08
union
{
uint8_t pad_48;
uint8_t Pad48;
uint8_t track_spine_colour_rct1; // 0x48
};
union
@ -410,7 +410,7 @@ namespace RCT2
{
char Path[256];
uint8_t Category;
uint8_t pad_0101[0x1F];
uint8_t Pad0101[0x1F];
int8_t ObjectiveType;
int8_t ObjectiveArg1;
int32_t objectiveArg2;
@ -427,7 +427,7 @@ namespace RCT2
{
uint8_t Pitch; // 0x1F
uint8_t bank_rotation; // 0x20
uint8_t pad_21[3];
uint8_t Pad21[3];
int32_t remaining_distance; // 0x24
int32_t velocity; // 0x28
int32_t acceleration; // 0x2C
@ -509,7 +509,7 @@ namespace RCT2
uint8_t CollisionDetectionTimer; // 0xC4
};
uint8_t animation_frame; // 0xC5
uint8_t pad_C6[0x2];
uint8_t PadC6[0x2];
uint32_t animationState;
uint8_t scream_sound_id; // 0xCC
uint8_t TrackSubposition;
@ -550,7 +550,7 @@ namespace RCT2
struct Peep : RCT12EntityBase
{
uint8_t pad_1F[0x22 - 0x1F];
uint8_t Pad1F[0x22 - 0x1F];
StringId name_string_idx; // 0x22
uint16_t next_x; // 0x24
uint16_t next_y; // 0x26
@ -592,7 +592,7 @@ namespace RCT2
RCT12RideId photo2_ride_ref; // 0x5C
RCT12RideId photo3_ride_ref; // 0x5D
RCT12RideId photo4_ride_ref; // 0x5E
uint8_t pad_5F[0x09]; // 0x5F
uint8_t Pad5F[0x09]; // 0x5F
RCT12RideId current_ride; // 0x68
uint8_t current_ride_station; // 0x69
uint8_t current_train; // 0x6A
@ -622,8 +622,8 @@ namespace RCT2
uint16_t mechanic_time_since_call;
uint16_t next_in_queue; // 0x74
};
uint8_t pad_76;
uint8_t pad_77;
uint8_t Pad76;
uint8_t Pad77;
union
{
uint8_t maze_last_edge; // 0x78
@ -700,7 +700,7 @@ namespace RCT2
uint8_t hat_colour; // 0xF8
RCT12RideId favourite_ride; // 0xF9
uint8_t favourite_ride_rating; // 0xFA
uint8_t pad_FB;
uint8_t PadFB;
uint32_t item_standard_flags; // 0xFC
uint64_t GetItemFlags() const
{
@ -719,7 +719,7 @@ namespace RCT2
union Entity
{
private:
uint8_t pad_00[0x100];
uint8_t Pad00[0x100];
public:
RCT12EntityBase unknown;
@ -768,7 +768,7 @@ namespace RCT2
uint16_t num_packed_objects; // 0x02
uint32_t version; // 0x04
uint32_t magic_number; // 0x08
uint8_t pad_0C[0x14];
uint8_t Pad0C[0x14];
};
assert_struct_size(S6Header, 0x20);
@ -784,7 +784,7 @@ namespace RCT2
uint8_t objective_arg_1; // 0x03
int32_t objective_arg_2; // 0x04
int16_t objective_arg_3; // 0x08
uint8_t pad_00A[0x3E];
uint8_t Pad00A[0x3E];
char name[64]; // 0x48
char details[256]; // 0x88
RCTObjectEntry entry; // 0x188
@ -838,7 +838,7 @@ namespace RCT2
uint16_t sprite_lists_head[static_cast<uint8_t>(EntityListId::Count)];
uint16_t sprite_lists_count[static_cast<uint8_t>(EntityListId::Count)];
StringId park_name;
uint8_t pad_013573D6[2];
uint8_t Pad013573D6[2];
uint32_t park_name_args;
money32 initial_cash;
money32 current_loan;
@ -846,13 +846,13 @@ namespace RCT2
money16 park_entrance_fee;
uint16_t rct1_park_entrance_x;
uint16_t rct1_park_entrance_y;
uint8_t pad_013573EE[2];
uint8_t Pad013573EE[2];
uint8_t rct1_park_entrance_z;
uint8_t pad_013573F1;
uint8_t Pad013573F1;
rct12_peep_spawn peep_spawns[Limits::MaxPeepSpawns];
uint8_t guest_count_change_modifier;
uint8_t current_research_level;
uint8_t pad_01357400[4];
uint8_t Pad01357400[4];
uint32_t researched_ride_types[Limits::MaxResearchedRideTypeQuads];
uint32_t researched_ride_entries[Limits::MaxResearchedRideEntryQuads];
uint32_t researched_track_types_a[128];
@ -867,7 +867,7 @@ namespace RCT2
// SC6[8]
uint16_t last_guests_in_park;
uint8_t pad_01357BCA[3];
uint8_t Pad01357BCA[3];
uint8_t handyman_colour;
uint8_t mechanic_colour;
uint8_t security_colour;
@ -886,7 +886,7 @@ namespace RCT2
uint8_t active_research_types;
uint8_t research_progress_stage;
uint32_t last_researched_item_subject;
uint8_t pad_01357CF8[1000];
uint8_t Pad01357CF8[1000];
uint32_t next_research_item;
uint16_t research_progress;
uint8_t next_research_category;
@ -902,7 +902,7 @@ namespace RCT2
uint8_t guest_initial_thirst;
uint8_t objective_type;
uint8_t objective_year;
uint8_t pad_013580FA[2];
uint8_t Pad013580FA[2];
money32 objective_currency;
uint16_t objective_guests;
uint8_t campaign_weeks_left[20];
@ -916,7 +916,7 @@ namespace RCT2
money32 current_profit;
money32 weekly_profit_average_dividend;
uint16_t weekly_profit_average_divisor;
uint8_t pad_0135833A[2];
uint8_t Pad0135833A[2];
// Ignored in scenario
money32 weekly_profit_history[Limits::FinanceGraphSize];
@ -937,19 +937,19 @@ namespace RCT2
money16 land_price;
money16 construction_rights_price;
uint16_t word_01358774;
uint8_t pad_01358776[2];
uint8_t Pad01358776[2];
uint32_t cd_key;
uint8_t pad_0135877C[64];
uint8_t Pad0135877C[64];
uint32_t game_version_number;
money32 completed_company_value_record;
uint32_t loan_hash;
uint16_t ride_count;
uint8_t pad_013587CA[6];
uint8_t Pad013587CA[6];
money32 historical_profit;
uint8_t pad_013587D4[4];
uint8_t Pad013587D4[4];
char scenario_completed_name[32];
money32 cash;
uint8_t pad_013587FC[50];
uint8_t Pad013587FC[50];
uint16_t park_rating_casualty_penalty;
uint16_t map_size_units;
uint16_t map_size_minus_2;
@ -960,13 +960,13 @@ namespace RCT2
uint16_t park_rating_warning_days;
uint8_t last_entrance_style;
uint8_t rct1_water_colour;
uint8_t pad_01358842[2];
uint8_t Pad01358842[2];
RCT12ResearchItem research_items[Limits::MaxResearchItems];
uint16_t map_base_z;
char scenario_name[64];
char scenario_description[256];
uint8_t current_interest_rate;
uint8_t pad_0135934B;
uint8_t Pad0135934B;
uint32_t same_price_throughout_extended;
int16_t park_entrance_x[Limits::MaxParkEntrances];
int16_t park_entrance_y[Limits::MaxParkEntrances];
@ -985,21 +985,21 @@ namespace RCT2
uint8_t saved_view_rotation;
RCT12MapAnimation map_animations[Limits::MaxAnimatedObjects];
uint16_t num_map_animations;
uint8_t pad_0138B582[2];
uint8_t Pad0138B582[2];
RideRatingCalculationData ride_ratings_calc_data;
uint8_t pad_0138B5D0[60];
uint8_t Pad0138B5D0[60];
RCT12RideMeasurement ride_measurements[8];
uint32_t next_guest_index;
uint16_t grass_and_scenery_tilepos;
uint32_t patrol_areas[(Limits::MaxStaff + Limits::StaffTypeCount) * Limits::PatrolAreaSize];
StaffMode staff_modes[Limits::MaxStaff + Limits::StaffTypeCount];
uint8_t pad_13CA73E;
uint8_t pad_13CA73F;
uint8_t byte_13CA740;
uint8_t pad_13CA741;
uint8_t byte_13CA742[4]; // unused
uint8_t Pad13CA73E;
uint8_t Pad13CA73F;
uint8_t Byte13CA740;
uint8_t Pad13CA741;
uint8_t Byte13CA742[4]; // unused
uint8_t climate;
uint8_t pad_013CA747;
uint8_t Pad013CA747;
uint16_t climate_update_timer;
uint8_t current_weather;
uint8_t next_weather;
@ -1017,7 +1017,7 @@ namespace RCT2
uint32_t rct1_scenario_flags; // Unused in RCT2
uint16_t wide_path_tile_loop_x;
uint16_t wide_path_tile_loop_y;
uint8_t pad_13CE778[434];
uint8_t Pad13CE778[434];
};
assert_struct_size(S6Data, 0x5a3c4a);

View File

@ -274,14 +274,14 @@ namespace RCT2
gParkEntranceFee = _s6.park_entrance_fee;
// rct1_park_entrance_x
// rct1_park_entrance_y
// pad_013573EE
// Pad013573EE
// rct1_park_entrance_z
ImportPeepSpawns();
gGuestChangeModifier = _s6.guest_count_change_modifier;
gResearchFundingLevel = _s6.current_research_level;
// pad_01357400
// Pad01357400
// _s6.researched_track_types_a
// _s6.researched_track_types_b
@ -297,7 +297,7 @@ namespace RCT2
}
gNumGuestsInParkLastWeek = _s6.last_guests_in_park;
// pad_01357BCA
// Pad01357BCA
gStaffHandymanColour = _s6.handyman_colour;
gStaffMechanicColour = _s6.mechanic_colour;
gStaffSecurityColour = _s6.security_colour;
@ -323,7 +323,7 @@ namespace RCT2
.ToResearchItem();
else
gResearchLastItem = std::nullopt;
// pad_01357CF8
// Pad01357CF8
if (_s6.next_research_item != RCT12_RESEARCHED_ITEMS_SEPARATOR)
gResearchNextItem = RCT12ResearchItem{ _s6.next_research_item, _s6.next_research_category }.ToResearchItem();
else
@ -342,7 +342,7 @@ namespace RCT2
gGuestInitialThirst = _s6.guest_initial_thirst;
gScenarioObjective.Type = _s6.objective_type;
gScenarioObjective.Year = _s6.objective_year;
// pad_013580FA
// Pad013580FA
gScenarioObjective.Currency = _s6.objective_currency;
// In RCT2, the ride string IDs start at index STR_0002 and are directly mappable.
// This is not always the case in OpenRCT2, so we use the actual ride ID.
@ -356,7 +356,7 @@ namespace RCT2
gCurrentProfit = ToMoney64(_s6.current_profit);
gWeeklyProfitAverageDividend = ToMoney64(_s6.weekly_profit_average_dividend);
gWeeklyProfitAverageDivisor = _s6.weekly_profit_average_divisor;
// pad_0135833A
// Pad0135833A
gParkValue = ToMoney64(_s6.park_value);
@ -386,17 +386,17 @@ namespace RCT2
gLandPrice = _s6.land_price;
gConstructionRightsPrice = _s6.construction_rights_price;
// unk_01358774
// pad_01358776
// Pad01358776
// _s6.cd_key
_gameVersion = _s6.game_version_number;
gScenarioCompanyValueRecord = _s6.completed_company_value_record;
// _s6.loan_hash;
// pad_013587CA
// Pad013587CA
gHistoricalProfit = ToMoney64(_s6.historical_profit);
// pad_013587D4
// Pad013587D4
gScenarioCompletedBy = std::string_view(_s6.scenario_completed_name, sizeof(_s6.scenario_completed_name));
gCash = ToMoney64(DECRYPT_MONEY(_s6.cash));
// pad_013587FC
// Pad013587FC
gParkRatingCasualtyPenalty = _s6.park_rating_casualty_penalty;
gMapSize = { _s6.map_size, _s6.map_size };
gSamePriceThroughoutPark = _s6.same_price_throughout
@ -405,11 +405,11 @@ namespace RCT2
gScenarioParkRatingWarningDays = _s6.park_rating_warning_days;
gLastEntranceStyle = _s6.last_entrance_style;
// rct1_water_colour
// pad_01358842
// Pad01358842
ImportResearchList();
gMapBaseZ = _s6.map_base_z;
gBankLoanInterestRate = _s6.current_interest_rate;
// pad_0135934B
// Pad0135934B
// Preserve compatibility with vanilla RCT2's save format.
gParkEntrances.clear();
for (uint8_t i = 0; i < Limits::MaxParkEntrances; i++)
@ -448,12 +448,12 @@ namespace RCT2
gNextGuestNumber = _s6.next_guest_index;
gGrassSceneryTileLoopPosition = _s6.grass_and_scenery_tilepos;
// unk_13CA73E
// pad_13CA73F
// Pad13CA73F
// unk_13CA740
gClimate = ClimateType{ _s6.climate };
// pad_13CA741;
// byte_13CA742
// pad_013CA747
// Pad13CA741;
// Byte13CA742
// Pad013CA747
gClimateUpdateTimer = _s6.climate_update_timer;
gClimateCurrent.Weather = WeatherType{ _s6.current_weather };
gClimateNext.Weather = WeatherType{ _s6.next_weather };
@ -492,11 +492,11 @@ namespace RCT2
}
}
// pad_13CE730
// Pad13CE730
// rct1_scenario_flags
gWidePathTileLoopPosition.x = _s6.wide_path_tile_loop_x;
gWidePathTileLoopPosition.y = _s6.wide_path_tile_loop_y;
// pad_13CE778
// Pad13CE778
// Fix and set dynamic variables
MapStripGhostFlagFromElements();
@ -780,7 +780,7 @@ namespace RCT2
}
dst->type = rideType;
dst->subtype = subtype;
// pad_002;
// Pad002;
dst->mode = static_cast<RideMode>(src->mode);
dst->colour_scheme_type = src->colour_scheme_type;
@ -790,7 +790,7 @@ namespace RCT2
dst->vehicle_colours[i].Trim = src->vehicle_colours[i].trim_colour;
}
// pad_046;
// Pad046;
dst->status = static_cast<RideStatus>(src->status);
dst->default_name_number = src->name_arguments_number;
@ -894,20 +894,20 @@ namespace RCT2
dst->boat_hire_return_position = { src->boat_hire_return_position.x, src->boat_hire_return_position.y };
dst->special_track_elements = src->special_track_elements;
// pad_0D6[2];
// Pad0D6[2];
dst->max_speed = src->max_speed;
dst->average_speed = src->average_speed;
dst->current_test_segment = src->current_test_segment;
dst->average_speed_test_timeout = src->average_speed_test_timeout;
// pad_0E2[0x2];
// Pad0E2[0x2];
dst->max_positive_vertical_g = src->max_positive_vertical_g;
dst->max_negative_vertical_g = src->max_negative_vertical_g;
dst->max_lateral_g = src->max_lateral_g;
dst->previous_vertical_g = src->previous_vertical_g;
dst->previous_lateral_g = src->previous_lateral_g;
// pad_106[0x2];
// Pad106[0x2];
dst->testing_flags = src->testing_flags;
if (src->cur_test_track_location.IsNull())
@ -961,7 +961,7 @@ namespace RCT2
dst->satisfaction_next = src->satisfaction_next;
dst->window_invalidate_flags = src->window_invalidate_flags;
// pad_14E[0x02];
// Pad14E[0x02];
dst->total_customers = src->total_customers;
dst->total_profit = ToMoney64(src->total_profit);
@ -975,15 +975,15 @@ namespace RCT2
dst->slide_in_use = src->slide_in_use;
// Includes maze_tiles
dst->slide_peep = EntityId::FromUnderlying(src->slide_peep);
// pad_160[0xE];
// Pad160[0xE];
dst->slide_peep_t_shirt_colour = src->slide_peep_t_shirt_colour;
// pad_16F[0x7];
// Pad16F[0x7];
dst->spiral_slide_progress = src->spiral_slide_progress;
// pad_177[0x9];
// Pad177[0x9];
dst->build_date = static_cast<int32_t>(src->build_date);
dst->upkeep_cost = src->upkeep_cost;
dst->race_winner = EntityId::FromUnderlying(src->race_winner);
// pad_186[0x02];
// Pad186[0x02];
dst->music_position = src->music_position;
dst->breakdown_reason_pending = src->breakdown_reason_pending;
@ -1064,10 +1064,10 @@ namespace RCT2
dst->current_test_station = StationIndex::FromUnderlying(src->current_test_station);
dst->num_circuits = src->num_circuits;
dst->CableLiftLoc = { src->cable_lift_x, src->cable_lift_y, src->cable_lift_z * COORDS_Z_STEP };
// pad_1FD;
// Pad1FD;
dst->cable_lift = EntityId::FromUnderlying(src->cable_lift);
// pad_208[0x58];
// Pad208[0x58];
}
void ImportRideRatingsCalcData()

View File

@ -271,7 +271,7 @@ ResultWithMessage TrackRemoveStationElement(const CoordsXYZD& loc, RideId rideIn
CoordsXYZD stationBackLoc = loc;
CoordsXYZD stationFrontLoc = loc;
int32_t stationLength = 0;
int32_t byte_F441D1 = -1;
int32_t ByteF441D1 = -1;
if (ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_HAS_SINGLE_PIECE_STATION))
{
@ -301,7 +301,7 @@ ResultWithMessage TrackRemoveStationElement(const CoordsXYZD& loc, RideId rideIn
}
stationBackLoc = currentLoc;
byte_F441D1++;
ByteF441D1++;
currentLoc -= CoordsDirectionDelta[currentLoc.direction];
}
@ -363,7 +363,7 @@ ResultWithMessage TrackRemoveStationElement(const CoordsXYZD& loc, RideId rideIn
station.Start = currentLoc;
station.Height = currentLoc.z / COORDS_Z_STEP;
station.Depart = 1;
station.Length = stationLength != 0 ? stationLength : byte_F441D1;
station.Length = stationLength != 0 ? stationLength : ByteF441D1;
ride->num_stations++;
}

View File

@ -185,7 +185,7 @@ struct Vehicle : EntityBase
uint8_t CollisionDetectionTimer;
};
uint8_t animation_frame;
uint8_t pad_C6[0x2];
uint8_t PadC6[0x2];
uint32_t animationState;
OpenRCT2::Audio::SoundId scream_sound_id;
VehicleTrackSubposition TrackSubposition;

View File

@ -1524,14 +1524,14 @@ void PathElement::SetSlopeDirection(Direction newSlope)
bool PathElement::IsQueue() const
{
return (type & FOOTPATH_ELEMENT_TYPE_FLAG_IS_QUEUE) != 0;
return (Type & FOOTPATH_ELEMENT_TYPE_FLAG_IS_QUEUE) != 0;
}
void PathElement::SetIsQueue(bool isQueue)
{
type &= ~FOOTPATH_ELEMENT_TYPE_FLAG_IS_QUEUE;
Type &= ~FOOTPATH_ELEMENT_TYPE_FLAG_IS_QUEUE;
if (isQueue)
type |= FOOTPATH_ELEMENT_TYPE_FLAG_IS_QUEUE;
Type |= FOOTPATH_ELEMENT_TYPE_FLAG_IS_QUEUE;
}
bool PathElement::HasQueueBanner() const
@ -1592,14 +1592,14 @@ void PathElement::SetStationIndex(::StationIndex newStationIndex)
bool PathElement::IsWide() const
{
return (type & FOOTPATH_ELEMENT_TYPE_FLAG_IS_WIDE) != 0;
return (Type & FOOTPATH_ELEMENT_TYPE_FLAG_IS_WIDE) != 0;
}
void PathElement::SetWide(bool isWide)
{
type &= ~FOOTPATH_ELEMENT_TYPE_FLAG_IS_WIDE;
Type &= ~FOOTPATH_ELEMENT_TYPE_FLAG_IS_WIDE;
if (isWide)
type |= FOOTPATH_ELEMENT_TYPE_FLAG_IS_WIDE;
Type |= FOOTPATH_ELEMENT_TYPE_FLAG_IS_WIDE;
}
bool PathElement::HasAddition() const
@ -1747,13 +1747,13 @@ void PathElement::SetRailingsEntryIndex(ObjectEntryIndex newEntryIndex)
uint8_t PathElement::GetQueueBannerDirection() const
{
return ((type & FOOTPATH_ELEMENT_TYPE_DIRECTION_MASK) >> 6);
return ((Type & FOOTPATH_ELEMENT_TYPE_DIRECTION_MASK) >> 6);
}
void PathElement::SetQueueBannerDirection(uint8_t direction)
{
type &= ~FOOTPATH_ELEMENT_TYPE_DIRECTION_MASK;
type |= (direction << 6);
Type &= ~FOOTPATH_ELEMENT_TYPE_DIRECTION_MASK;
Type |= (direction << 6);
}
bool PathElement::ShouldDrawPathOverSupports() const

View File

@ -1268,7 +1268,7 @@ TileElement* TileElementInsert(const CoordsXYZ& loc, int32_t occupiedQuadrants,
// Insert new map element
auto* insertedElement = newTileElement;
newTileElement->type = 0;
newTileElement->Type = 0;
newTileElement->SetType(type);
newTileElement->SetBaseZ(loc.z);
newTileElement->Flags = 0;
@ -1276,8 +1276,8 @@ TileElement* TileElementInsert(const CoordsXYZ& loc, int32_t occupiedQuadrants,
newTileElement->SetOccupiedQuadrants(occupiedQuadrants);
newTileElement->SetClearanceZ(loc.z);
newTileElement->Owner = 0;
std::memset(&newTileElement->pad_05, 0, sizeof(newTileElement->pad_05));
std::memset(&newTileElement->pad_08, 0, sizeof(newTileElement->pad_08));
std::memset(&newTileElement->Pad05, 0, sizeof(newTileElement->Pad05));
std::memset(&newTileElement->Pad08, 0, sizeof(newTileElement->Pad08));
newTileElement++;
// Insert rest of map elements above insert height

View File

@ -51,7 +51,7 @@ struct LargeSceneryTextGlyph
uint8_t image_offset;
uint8_t width;
uint8_t height;
uint8_t pad_3;
uint8_t Pad3;
};
// TODO: Remove not required
@ -62,7 +62,7 @@ struct RCTLargeSceneryText
int16_t x, y;
} offset[2]; // 0x0
uint16_t max_width; // 0x8
uint16_t pad_A; // 0xA
uint16_t PadA; // 0xA
uint8_t flags; // 0xC
uint8_t num_images; // 0xD
LargeSceneryTextGlyph glyphs[256]; // 0xE

View File

@ -26,13 +26,13 @@
uint8_t SmallSceneryElement::GetSceneryQuadrant() const
{
return (this->type & TILE_ELEMENT_QUADRANT_MASK) >> 6;
return (this->Type & TILE_ELEMENT_QUADRANT_MASK) >> 6;
}
void SmallSceneryElement::SetSceneryQuadrant(uint8_t newQuadrant)
{
type &= ~TILE_ELEMENT_QUADRANT_MASK;
type |= (newQuadrant << 6);
Type &= ~TILE_ELEMENT_QUADRANT_MASK;
Type |= (newQuadrant << 6);
}
uint16_t SmallSceneryElement::GetEntryIndex() const

View File

@ -224,12 +224,12 @@ void SurfaceElement::SetSlope(uint8_t newSlope)
bool SurfaceElement::HasTrackThatNeedsWater() const
{
return (type & SURFACE_ELEMENT_HAS_TRACK_THAT_NEEDS_WATER) != 0;
return (Type & SURFACE_ELEMENT_HAS_TRACK_THAT_NEEDS_WATER) != 0;
}
void SurfaceElement::SetHasTrackThatNeedsWater(bool on)
{
type &= ~SURFACE_ELEMENT_HAS_TRACK_THAT_NEEDS_WATER;
Type &= ~SURFACE_ELEMENT_HAS_TRACK_THAT_NEEDS_WATER;
if (on)
type |= SURFACE_ELEMENT_HAS_TRACK_THAT_NEEDS_WATER;
Type |= SURFACE_ELEMENT_HAS_TRACK_THAT_NEEDS_WATER;
}

View File

@ -103,14 +103,14 @@ RideId TileElement::GetRideIndex() const
void TileElement::ClearAs(TileElementType newType)
{
type = 0;
Type = 0;
SetType(newType);
Flags = 0;
BaseHeight = MINIMUM_LAND_HEIGHT;
ClearanceHeight = MINIMUM_LAND_HEIGHT;
Owner = 0;
std::fill_n(pad_05, sizeof(pad_05), 0x00);
std::fill_n(pad_08, sizeof(pad_08), 0x00);
std::fill_n(Pad05, sizeof(Pad05), 0x00);
std::fill_n(Pad08, sizeof(Pad08), 0x00);
}
// Rotate both of the values amount

View File

@ -50,7 +50,7 @@ struct BannerElement;
struct TileElementBase
{
uint8_t type; // 0
uint8_t Type; // 0
uint8_t Flags; // 1. Upper nibble: flags. Lower nibble: occupied quadrants (one bit per quadrant).
uint8_t BaseHeight; // 2
uint8_t ClearanceHeight; // 3
@ -172,8 +172,8 @@ struct TileElementBase
*/
struct TileElement : public TileElementBase
{
uint8_t pad_05[3];
uint8_t pad_08[8];
uint8_t Pad05[3];
uint8_t Pad08[8];
void ClearAs(TileElementType newType);
@ -198,7 +198,7 @@ private:
uint8_t EdgeStyle;
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
uint8_t pad_0B[5];
uint8_t Pad0B[5];
#pragma clang diagnostic pop
public:
@ -433,7 +433,7 @@ private:
uint8_t Colour[3]; // 8
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
uint8_t pad_0B[5];
uint8_t Pad0B[5];
#pragma clang diagnostic pop
public:
@ -510,7 +510,7 @@ private:
uint8_t animation; // 0C 0b_dfff_ft00 d = direction, f = frame num, t = across track flag (not used)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
uint8_t pad_0D[3];
uint8_t Pad0D[3];
#pragma clang diagnostic pop
public:
@ -555,7 +555,7 @@ private:
uint8_t flags2; // C
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
uint8_t pad_0D[3];
uint8_t Pad0D[3];
#pragma clang diagnostic pop
public:
@ -597,7 +597,7 @@ private:
uint8_t AllowedEdges; // 8
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
uint8_t pad_09[7];
uint8_t Pad09[7];
#pragma clang diagnostic pop
public:
Banner* GetBanner() const;

View File

@ -12,29 +12,29 @@
TileElementType TileElementBase::GetType() const
{
return static_cast<TileElementType>((this->type & TILE_ELEMENT_TYPE_MASK) >> 2);
return static_cast<TileElementType>((this->Type & TILE_ELEMENT_TYPE_MASK) >> 2);
}
void TileElementBase::SetType(TileElementType newType)
{
this->type &= ~TILE_ELEMENT_TYPE_MASK;
this->type |= ((EnumValue(newType) << 2) & TILE_ELEMENT_TYPE_MASK);
this->Type &= ~TILE_ELEMENT_TYPE_MASK;
this->Type |= ((EnumValue(newType) << 2) & TILE_ELEMENT_TYPE_MASK);
}
Direction TileElementBase::GetDirection() const
{
return this->type & TILE_ELEMENT_DIRECTION_MASK;
return this->Type & TILE_ELEMENT_DIRECTION_MASK;
}
void TileElementBase::SetDirection(Direction direction)
{
this->type &= ~TILE_ELEMENT_DIRECTION_MASK;
this->type |= (direction & TILE_ELEMENT_DIRECTION_MASK);
this->Type &= ~TILE_ELEMENT_DIRECTION_MASK;
this->Type |= (direction & TILE_ELEMENT_DIRECTION_MASK);
}
Direction TileElementBase::GetDirectionWithOffset(uint8_t offset) const
{
return ((this->type & TILE_ELEMENT_DIRECTION_MASK) + offset) & TILE_ELEMENT_DIRECTION_MASK;
return ((this->Type & TILE_ELEMENT_DIRECTION_MASK) + offset) & TILE_ELEMENT_DIRECTION_MASK;
}
bool TileElementBase::IsLastForTile() const

View File

@ -82,13 +82,13 @@ void WallRemoveIntersectingWalls(const CoordsXYRangedZ& wallPos, Direction direc
uint8_t WallElement::GetSlope() const
{
return (type & TILE_ELEMENT_QUADRANT_MASK) >> 6;
return (Type & TILE_ELEMENT_QUADRANT_MASK) >> 6;
}
void WallElement::SetSlope(uint8_t newSlope)
{
type &= ~TILE_ELEMENT_QUADRANT_MASK;
type |= (newSlope << 6);
Type &= ~TILE_ELEMENT_QUADRANT_MASK;
Type |= (newSlope << 6);
}
colour_t WallElement::GetPrimaryColour() const