Rename members of PathSurfaceDescriptor

This commit is contained in:
Gymnasiast committed 2026-01-11 19:25:52 +01:00
1 parent 41eb24dbd7
commit fdab1ceacd
5 files changed
+22 -21

No files matched your search

+10 -10
View File
@@ -42,15 +42,15 @@ namespace OpenRCT2
_legacyType.image = LoadImages();
_legacyType.bridge_image = _legacyType.image + 109;
_pathSurfaceDescriptor.Name = _legacyType.string_idx;
_pathSurfaceDescriptor.Image = _legacyType.image;
_pathSurfaceDescriptor.PreviewImage = _legacyType.GetPreviewImage();
_pathSurfaceDescriptor.Flags = _legacyType.flags;
_pathSurfaceDescriptor.name = _legacyType.string_idx;
_pathSurfaceDescriptor.image = _legacyType.image;
_pathSurfaceDescriptor.previewImage = _legacyType.GetPreviewImage();
_pathSurfaceDescriptor.flags = _legacyType.flags;
_queueSurfaceDescriptor.Name = _legacyType.string_idx;
_queueSurfaceDescriptor.Image = _legacyType.GetQueueImage();
_queueSurfaceDescriptor.PreviewImage = _legacyType.GetQueuePreviewImage();
_queueSurfaceDescriptor.Flags = _legacyType.flags | FOOTPATH_ENTRY_FLAG_IS_QUEUE;
_queueSurfaceDescriptor.name = _legacyType.string_idx;
_queueSurfaceDescriptor.image = _legacyType.GetQueueImage();
_queueSurfaceDescriptor.previewImage = _legacyType.GetQueuePreviewImage();
_queueSurfaceDescriptor.flags = _legacyType.flags | FOOTPATH_ENTRY_FLAG_IS_QUEUE;
_pathRailingsDescriptor.Name = _legacyType.string_idx;
_pathRailingsDescriptor.BridgeImage = _legacyType.bridge_image;
@@ -73,8 +73,8 @@ namespace OpenRCT2
void FootpathObject::DrawPreview(Drawing::RenderTarget& rt, int32_t width, int32_t height) const
{
auto screenCoords = ScreenCoordsXY{ width / 2, height / 2 };
GfxDrawSprite(rt, ImageId(_pathSurfaceDescriptor.PreviewImage), screenCoords - ScreenCoordsXY{ 49, 17 });
GfxDrawSprite(rt, ImageId(_queueSurfaceDescriptor.PreviewImage), screenCoords + ScreenCoordsXY{ 4, -17 });
GfxDrawSprite(rt, ImageId(_pathSurfaceDescriptor.previewImage), screenCoords - ScreenCoordsXY{ 49, 17 });
GfxDrawSprite(rt, ImageId(_queueSurfaceDescriptor.previewImage), screenCoords + ScreenCoordsXY{ 4, -17 });
}
void FootpathObject::ReadJson(IReadObjectContext* context, json_t& root)
@@ -31,10 +31,10 @@ namespace OpenRCT2
BaseImageId = PreviewImageId + 1;
}
_descriptor.Name = NameStringId;
_descriptor.Image = BaseImageId;
_descriptor.PreviewImage = PreviewImageId;
_descriptor.Flags = Flags;
_descriptor.name = NameStringId;
_descriptor.image = BaseImageId;
_descriptor.previewImage = PreviewImageId;
_descriptor.flags = Flags;
}
void FootpathSurfaceObject::Unload()
@@ -309,7 +309,7 @@ static void PaintParkEntrance(PaintSession& session, uint8_t direction, int32_t
auto surfaceDescriptor = entranceEl.GetPathSurfaceDescriptor();
if (surfaceDescriptor != nullptr)
{
auto imageIndex = (surfaceDescriptor->Image + 5 * (1 + (direction & 1)));
auto imageIndex = (surfaceDescriptor->image + 5 * (1 + (direction & 1)));
PaintAddImageAsParent(
session, imageTemplate.WithIndex(imageIndex), { 0, 0, height }, { { 0, 2, height }, { 32, 28, 0 } });
}
@@ -685,8 +685,8 @@ static FootpathPaintInfo GetFootpathPaintInfo(const PathElement& pathEl)
const auto* surfaceDescriptor = pathEl.GetSurfaceDescriptor();
if (surfaceDescriptor != nullptr)
{
pathPaintInfo.SurfaceImageId = surfaceDescriptor->Image;
pathPaintInfo.SurfaceFlags = surfaceDescriptor->Flags;
pathPaintInfo.SurfaceImageId = surfaceDescriptor->image;
pathPaintInfo.SurfaceFlags = surfaceDescriptor->flags;
}
const auto* railingsDescriptor = pathEl.GetRailingsDescriptor();
+5 -4
View File
@@ -11,6 +11,7 @@
#include "../Identifiers.h"
#include "../actions/CommandFlag.h"
#include "../drawing/ImageIndexType.h"
#include "../interface/Colour.h"
#include "../localisation/StringIdType.h"
#include "../object/ObjectTypes.h"
@@ -43,10 +44,10 @@ enum class RailingEntrySupportType : uint8_t
struct PathSurfaceDescriptor
{
StringId Name;
uint32_t Image;
uint32_t PreviewImage;
uint8_t Flags;
StringId name;
ImageIndex image;
ImageIndex previewImage;
uint8_t flags;
};
struct PathRailingsDescriptor