Rename some fields in PaintStruct

This commit is contained in:
ζeh Matt 2023-04-14 03:06:53 +03:00
parent 63d15c71ae
commit 5ea09be0f8
No known key found for this signature in database
GPG Key ID: 18CE582C71A225B0
5 changed files with 100 additions and 100 deletions

View File

@ -43,14 +43,14 @@ static void fixup_pointers(std::vector<RecordedPaintSession>& s)
auto& quadrants = s[i].Session.Quadrants; auto& quadrants = s[i].Session.Quadrants;
for (size_t j = 0; j < entries.size(); j++) for (size_t j = 0; j < entries.size(); j++)
{ {
if (entries[j].AsBasic()->next_quadrant_ps == reinterpret_cast<PaintStruct*>(-1)) if (entries[j].AsBasic()->NextQuadrantEntry == reinterpret_cast<PaintStruct*>(-1))
{ {
entries[j].AsBasic()->next_quadrant_ps = nullptr; entries[j].AsBasic()->NextQuadrantEntry = nullptr;
} }
else else
{ {
auto nextQuadrantPs = reinterpret_cast<size_t>(entries[j].AsBasic()->next_quadrant_ps) / sizeof(PaintEntry); auto nextQuadrantPs = reinterpret_cast<size_t>(entries[j].AsBasic()->NextQuadrantEntry) / sizeof(PaintEntry);
entries[j].AsBasic()->next_quadrant_ps = s[i].Entries[nextQuadrantPs].AsBasic(); entries[j].AsBasic()->NextQuadrantEntry = s[i].Entries[nextQuadrantPs].AsBasic();
} }
} }
for (size_t j = 0; j < std::size(quadrants); j++) for (size_t j = 0; j < std::size(quadrants); j++)
@ -160,7 +160,7 @@ static int command_line_for_bench_sprite_sort(int argc, const char** argv)
std::vector<RecordedPaintSession> sessions(1); std::vector<RecordedPaintSession> sessions(1);
for (auto& ps : sessions[0].Entries) for (auto& ps : sessions[0].Entries)
{ {
ps.AsBasic()->next_quadrant_ps = reinterpret_cast<PaintStruct*>(-1); ps.AsBasic()->NextQuadrantEntry = reinterpret_cast<PaintStruct*>(-1);
} }
for (auto& quad : sessions[0].Session.Quadrants) for (auto& quad : sessions[0].Session.Quadrants)
{ {

View File

@ -73,9 +73,9 @@ uint8_t gCurrentRotation;
static uint32_t _currentImageType; static uint32_t _currentImageType;
InteractionInfo::InteractionInfo(const PaintStruct* ps) InteractionInfo::InteractionInfo(const PaintStruct* ps)
: Loc(ps->map_x, ps->map_y) : Loc(ps->map_x, ps->map_y)
, Element(ps->tileElement) , Element(ps->Element)
, Entity(ps->entity) , Entity(ps->Entity)
, SpriteType(ps->sprite_type) , SpriteType(ps->InteractionItem)
{ {
} }
static void ViewportPaintWeatherGloom(DrawPixelInfo& dpi); static void ViewportPaintWeatherGloom(DrawPixelInfo& dpi);
@ -879,7 +879,7 @@ static void RecordSession(
// Remap all entries // Remap all entries
for (auto& ps : recordedSession.Entries) for (auto& ps : recordedSession.Entries)
{ {
auto& ptr = ps.AsBasic()->next_quadrant_ps; auto& ptr = ps.AsBasic()->NextQuadrantEntry;
auto it = entryRemap.find(ptr); auto it = entryRemap.find(ptr);
if (it == entryRemap.end()) if (it == entryRemap.end())
{ {
@ -1416,12 +1416,12 @@ static bool IsTileElementVegetation(const TileElement* tileElement)
VisibilityKind GetPaintStructVisibility(const PaintStruct* ps, uint32_t viewFlags) VisibilityKind GetPaintStructVisibility(const PaintStruct* ps, uint32_t viewFlags)
{ {
switch (ps->sprite_type) switch (ps->InteractionItem)
{ {
case ViewportInteractionItem::Entity: case ViewportInteractionItem::Entity:
if (ps->entity != nullptr) if (ps->Entity != nullptr)
{ {
switch (ps->entity->Type) switch (ps->Entity->Type)
{ {
case EntityType::Vehicle: case EntityType::Vehicle:
{ {
@ -1434,7 +1434,7 @@ VisibilityKind GetPaintStructVisibility(const PaintStruct* ps, uint32_t viewFlag
// these should be hidden if 'hide rides' is enabled // these should be hidden if 'hide rides' is enabled
if (viewFlags & VIEWPORT_FLAG_HIDE_RIDES) if (viewFlags & VIEWPORT_FLAG_HIDE_RIDES)
{ {
auto vehicle = ps->entity->As<Vehicle>(); auto vehicle = ps->Entity->As<Vehicle>();
if (vehicle == nullptr) if (vehicle == nullptr)
break; break;
@ -1481,9 +1481,9 @@ VisibilityKind GetPaintStructVisibility(const PaintStruct* ps, uint32_t viewFlag
case ViewportInteractionItem::Scenery: case ViewportInteractionItem::Scenery:
case ViewportInteractionItem::LargeScenery: case ViewportInteractionItem::LargeScenery:
case ViewportInteractionItem::Wall: case ViewportInteractionItem::Wall:
if (ps->tileElement != nullptr) if (ps->Element != nullptr)
{ {
if (IsTileElementVegetation(ps->tileElement)) if (IsTileElementVegetation(ps->Element))
{ {
if (viewFlags & VIEWPORT_FLAG_HIDE_VEGETATION) if (viewFlags & VIEWPORT_FLAG_HIDE_VEGETATION)
{ {
@ -1499,7 +1499,7 @@ VisibilityKind GetPaintStructVisibility(const PaintStruct* ps, uint32_t viewFlag
} }
} }
} }
if (ps->sprite_type == ViewportInteractionItem::Wall && (viewFlags & VIEWPORT_FLAG_UNDERGROUND_INSIDE)) if (ps->InteractionItem == ViewportInteractionItem::Wall && (viewFlags & VIEWPORT_FLAG_UNDERGROUND_INSIDE))
{ {
return VisibilityKind::Partial; return VisibilityKind::Partial;
} }
@ -1515,10 +1515,10 @@ VisibilityKind GetPaintStructVisibility(const PaintStruct* ps, uint32_t viewFlag
*/ */
static bool PSSpriteTypeIsInFilter(PaintStruct* ps, uint16_t filter) static bool PSSpriteTypeIsInFilter(PaintStruct* ps, uint16_t filter)
{ {
if (ps->sprite_type != ViewportInteractionItem::None && ps->sprite_type != ViewportInteractionItem::Label if (ps->InteractionItem != ViewportInteractionItem::None && ps->InteractionItem != ViewportInteractionItem::Label
&& ps->sprite_type <= ViewportInteractionItem::Banner) && ps->InteractionItem <= ViewportInteractionItem::Banner)
{ {
auto mask = EnumToFlag(ps->sprite_type); auto mask = EnumToFlag(ps->InteractionItem);
if (filter & mask) if (filter & mask)
{ {
return true; return true;
@ -1837,7 +1837,7 @@ InteractionInfo SetInteractionInfoFromPaintSession(PaintSession* session, uint32
PaintStruct* ps = &session->PaintHead; PaintStruct* ps = &session->PaintHead;
InteractionInfo info{}; InteractionInfo info{};
while ((ps = ps->next_quadrant_ps) != nullptr) while ((ps = ps->NextQuadrantEntry) != nullptr)
{ {
PaintStruct* old_ps = ps; PaintStruct* old_ps = ps;
PaintStruct* next_ps = ps; PaintStruct* next_ps = ps;
@ -1851,12 +1851,12 @@ InteractionInfo SetInteractionInfoFromPaintSession(PaintSession* session, uint32
info = { ps }; info = { ps };
} }
} }
next_ps = ps->children; next_ps = ps->Children;
} }
#pragma GCC diagnostic push #pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wnull-dereference" #pragma GCC diagnostic ignored "-Wnull-dereference"
for (AttachedPaintStruct* attached_ps = ps->attached_ps; attached_ps != nullptr; attached_ps = attached_ps->next) for (AttachedPaintStruct* attached_ps = ps->Attached; attached_ps != nullptr; attached_ps = attached_ps->next)
{ {
if (IsSpriteInteractedWith( if (IsSpriteInteractedWith(
session->DPI, attached_ps->image_id, { (attached_ps->x + ps->x), (attached_ps->y + ps->y) })) session->DPI, attached_ps->image_id, { (attached_ps->x + ps->x), (attached_ps->y + ps->y) }))

View File

@ -64,8 +64,8 @@ static int32_t RemapPositionToQuadrant(const PaintStruct& ps, uint8_t rotation)
constexpr auto MapRangeMax = MaxPaintQuadrants * COORDS_XY_STEP; constexpr auto MapRangeMax = MaxPaintQuadrants * COORDS_XY_STEP;
constexpr auto MapRangeCenter = MapRangeMax / 2; constexpr auto MapRangeCenter = MapRangeMax / 2;
const auto x = ps.bounds.x; const auto x = ps.Bounds.x;
const auto y = ps.bounds.y; const auto y = ps.Bounds.y;
// NOTE: We are not calling CoordsXY::Rotate on purpose to mix in the additional // NOTE: We are not calling CoordsXY::Rotate on purpose to mix in the additional
// value without a secondary switch. // value without a secondary switch.
switch (rotation & 3) switch (rotation & 3)
@ -92,8 +92,8 @@ static void PaintSessionAddPSToQuadrant(PaintSession& session, PaintStruct* ps)
// Values below zero or above MaxPaintQuadrants are void, corners also share the same quadrant as void. // Values below zero or above MaxPaintQuadrants are void, corners also share the same quadrant as void.
const uint32_t paintQuadrantIndex = std::clamp(positionHash / COORDS_XY_STEP, 0, MaxPaintQuadrants - 1); const uint32_t paintQuadrantIndex = std::clamp(positionHash / COORDS_XY_STEP, 0, MaxPaintQuadrants - 1);
ps->quadrant_index = paintQuadrantIndex; ps->QuadrantIndex = paintQuadrantIndex;
ps->next_quadrant_ps = session.Quadrants[paintQuadrantIndex]; ps->NextQuadrantEntry = session.Quadrants[paintQuadrantIndex];
session.Quadrants[paintQuadrantIndex] = ps; session.Quadrants[paintQuadrantIndex] = ps;
session.QuadrantBackIndex = std::min(session.QuadrantBackIndex, paintQuadrantIndex); session.QuadrantBackIndex = std::min(session.QuadrantBackIndex, paintQuadrantIndex);
@ -180,19 +180,19 @@ static PaintStruct* CreateNormalPaintStruct(
ps->image_id = image_id; ps->image_id = image_id;
ps->x = imagePos.x; ps->x = imagePos.x;
ps->y = imagePos.y; ps->y = imagePos.y;
ps->bounds.x_end = rotBoundBoxSize.x + rotBoundBoxOffset.x + session.SpritePosition.x; ps->Bounds.x_end = rotBoundBoxSize.x + rotBoundBoxOffset.x + session.SpritePosition.x;
ps->bounds.y_end = rotBoundBoxSize.y + rotBoundBoxOffset.y + session.SpritePosition.y; ps->Bounds.y_end = rotBoundBoxSize.y + rotBoundBoxOffset.y + session.SpritePosition.y;
ps->bounds.z_end = rotBoundBoxSize.z + rotBoundBoxOffset.z; ps->Bounds.z_end = rotBoundBoxSize.z + rotBoundBoxOffset.z;
ps->bounds.x = rotBoundBoxOffset.x + session.SpritePosition.x; ps->Bounds.x = rotBoundBoxOffset.x + session.SpritePosition.x;
ps->bounds.y = rotBoundBoxOffset.y + session.SpritePosition.y; ps->Bounds.y = rotBoundBoxOffset.y + session.SpritePosition.y;
ps->bounds.z = rotBoundBoxOffset.z; ps->Bounds.z = rotBoundBoxOffset.z;
ps->attached_ps = nullptr; ps->Attached = nullptr;
ps->children = nullptr; ps->Children = nullptr;
ps->sprite_type = session.InteractionType; ps->InteractionItem = session.InteractionType;
ps->map_x = session.MapPosition.x; ps->map_x = session.MapPosition.x;
ps->map_y = session.MapPosition.y; ps->map_y = session.MapPosition.y;
ps->tileElement = session.CurrentlyDrawnTileElement; ps->Element = session.CurrentlyDrawnTileElement;
ps->entity = session.CurrentlyDrawnEntity; ps->Entity = session.CurrentlyDrawnEntity;
return ps; return ps;
} }
@ -315,10 +315,10 @@ static PaintStruct* PaintStructsFirstInQuadrant(PaintStruct* psNext, uint16_t qu
do do
{ {
ps = psNext; ps = psNext;
psNext = psNext->next_quadrant_ps; psNext = psNext->NextQuadrantEntry;
if (psNext == nullptr) if (psNext == nullptr)
return ps; return ps;
} while (quadrantIndex > psNext->quadrant_index); } while (quadrantIndex > psNext->QuadrantIndex);
return ps; return ps;
} }
@ -326,26 +326,26 @@ static void PaintStructsInitializeSort(PaintStruct* ps, uint16_t quadrantIndex,
{ {
do do
{ {
ps = ps->next_quadrant_ps; ps = ps->NextQuadrantEntry;
if (ps == nullptr) if (ps == nullptr)
break; break;
if (ps->quadrant_index > quadrantIndex + 1) if (ps->QuadrantIndex > quadrantIndex + 1)
{ {
// Outside of the range. // Outside of the range.
ps->SortFlags = PaintSortFlags::OutsideQuadrant; ps->SortFlags = PaintSortFlags::OutsideQuadrant;
} }
else if (ps->quadrant_index == quadrantIndex + 1) else if (ps->QuadrantIndex == quadrantIndex + 1)
{ {
// Is neighbour and requires a visit. // Is neighbour and requires a visit.
ps->SortFlags = PaintSortFlags::Neighbour | PaintSortFlags::PendingVisit; ps->SortFlags = PaintSortFlags::Neighbour | PaintSortFlags::PendingVisit;
} }
else if (ps->quadrant_index == quadrantIndex) else if (ps->QuadrantIndex == quadrantIndex)
{ {
// In specified quadrant, requires visit. // In specified quadrant, requires visit.
ps->SortFlags = flag | PaintSortFlags::PendingVisit; ps->SortFlags = flag | PaintSortFlags::PendingVisit;
} }
} while (ps->quadrant_index <= quadrantIndex + 1); } while (ps->QuadrantIndex <= quadrantIndex + 1);
} }
static std::pair<PaintStruct*, PaintStruct*> PaintStructsGetNextPending(PaintStruct* ps) static std::pair<PaintStruct*, PaintStruct*> PaintStructsGetNextPending(PaintStruct* ps)
@ -353,7 +353,7 @@ static std::pair<PaintStruct*, PaintStruct*> PaintStructsGetNextPending(PaintStr
PaintStruct* ps_next; PaintStruct* ps_next;
while (true) while (true)
{ {
ps_next = ps->next_quadrant_ps; ps_next = ps->NextQuadrantEntry;
if (ps_next == nullptr) if (ps_next == nullptr)
{ {
// End of the current list. // End of the current list.
@ -380,11 +380,11 @@ template<uint8_t TRotation> static void PaintStructsSortQuadrant(PaintStruct* pa
child->SortFlags &= ~PaintSortFlags::PendingVisit; child->SortFlags &= ~PaintSortFlags::PendingVisit;
// Compare all the children below the first child and move them up in the list if they intersect. // Compare all the children below the first child and move them up in the list if they intersect.
const PaintStructBoundBox& initialBBox = child->bounds; const PaintStructBoundBox& initialBBox = child->Bounds;
for (;;) for (;;)
{ {
auto* ps = child; auto* ps = child;
child = child->next_quadrant_ps; child = child->NextQuadrantEntry;
if (child == nullptr || child->SortFlags & PaintSortFlags::OutsideQuadrant) if (child == nullptr || child->SortFlags & PaintSortFlags::OutsideQuadrant)
{ {
@ -396,15 +396,15 @@ template<uint8_t TRotation> static void PaintStructsSortQuadrant(PaintStruct* pa
continue; continue;
} }
if (CheckBoundingBox<TRotation>(initialBBox, child->bounds)) if (CheckBoundingBox<TRotation>(initialBBox, child->Bounds))
{ {
// Child node intersects with current node, move behind. // Child node intersects with current node, move behind.
ps->next_quadrant_ps = child->next_quadrant_ps; ps->NextQuadrantEntry = child->NextQuadrantEntry;
auto* psTemp = parent->next_quadrant_ps; auto* psTemp = parent->NextQuadrantEntry;
parent->next_quadrant_ps = child; parent->NextQuadrantEntry = child;
child->next_quadrant_ps = psTemp; child->NextQuadrantEntry = psTemp;
child = ps; child = ps;
} }
} }
@ -444,7 +444,7 @@ static PaintStruct* PaintArrangeStructsHelperRotation(PaintStruct* psQuadrantEnt
static void PaintStructsLinkQuadrants(PaintSessionCore& session) static void PaintStructsLinkQuadrants(PaintSessionCore& session)
{ {
PaintStruct* ps = &session.PaintHead; PaintStruct* ps = &session.PaintHead;
ps->next_quadrant_ps = nullptr; ps->NextQuadrantEntry = nullptr;
uint32_t quadrantIndex = session.QuadrantBackIndex; uint32_t quadrantIndex = session.QuadrantBackIndex;
do do
@ -452,11 +452,11 @@ static void PaintStructsLinkQuadrants(PaintSessionCore& session)
PaintStruct* psNext = session.Quadrants[quadrantIndex]; PaintStruct* psNext = session.Quadrants[quadrantIndex];
if (psNext != nullptr) if (psNext != nullptr)
{ {
ps->next_quadrant_ps = psNext; ps->NextQuadrantEntry = psNext;
do do
{ {
ps = psNext; ps = psNext;
psNext = psNext->next_quadrant_ps; psNext = psNext->NextQuadrantEntry;
} while (psNext != nullptr); } while (psNext != nullptr);
} }
@ -506,7 +506,7 @@ static void PaintDrawStruct(PaintSession& session, PaintStruct* ps)
auto x = ps->x; auto x = ps->x;
auto y = ps->y; auto y = ps->y;
if (ps->sprite_type == ViewportInteractionItem::Entity) if (ps->InteractionItem == ViewportInteractionItem::Entity)
{ {
if (session.DPI.zoom_level >= ZoomLevel{ 1 }) if (session.DPI.zoom_level >= ZoomLevel{ 1 })
{ {
@ -530,9 +530,9 @@ static void PaintDrawStruct(PaintSession& session, PaintStruct* ps)
GfxDrawSprite(session.DPI, imageId, { x, y }); GfxDrawSprite(session.DPI, imageId, { x, y });
} }
if (ps->children != nullptr) if (ps->Children != nullptr)
{ {
PaintDrawStruct(session, ps->children); PaintDrawStruct(session, ps->Children);
} }
else else
{ {
@ -550,11 +550,11 @@ void PaintDrawStructs(PaintSession& session)
PaintStruct* ps = &session.PaintHead; PaintStruct* ps = &session.PaintHead;
for (ps = ps->next_quadrant_ps; ps != nullptr;) for (ps = ps->NextQuadrantEntry; ps != nullptr;)
{ {
PaintDrawStruct(session, ps); PaintDrawStruct(session, ps);
ps = ps->next_quadrant_ps; ps = ps->NextQuadrantEntry;
} }
} }
@ -565,7 +565,7 @@ void PaintDrawStructs(PaintSession& session)
*/ */
static void PaintAttachedPS(DrawPixelInfo& dpi, PaintStruct* ps, uint32_t viewFlags) static void PaintAttachedPS(DrawPixelInfo& dpi, PaintStruct* ps, uint32_t viewFlags)
{ {
AttachedPaintStruct* attached_ps = ps->attached_ps; AttachedPaintStruct* attached_ps = ps->Attached;
for (; attached_ps != nullptr; attached_ps = attached_ps->next) for (; attached_ps != nullptr; attached_ps = attached_ps->next)
{ {
auto screenCoords = ScreenCoordsXY{ attached_ps->x + ps->x, attached_ps->y + ps->y }; auto screenCoords = ScreenCoordsXY{ attached_ps->x + ps->x, attached_ps->y + ps->y };
@ -584,62 +584,62 @@ static void PaintAttachedPS(DrawPixelInfo& dpi, PaintStruct* ps, uint32_t viewFl
static void PaintPSImageWithBoundingBoxes(DrawPixelInfo& dpi, PaintStruct* ps, ImageId imageId, int32_t x, int32_t y) static void PaintPSImageWithBoundingBoxes(DrawPixelInfo& dpi, PaintStruct* ps, ImageId imageId, int32_t x, int32_t y)
{ {
const uint8_t colour = BoundBoxDebugColours[EnumValue(ps->sprite_type)]; const uint8_t colour = BoundBoxDebugColours[EnumValue(ps->InteractionItem)];
const uint8_t rotation = GetCurrentRotation(); const uint8_t rotation = GetCurrentRotation();
const CoordsXYZ frontTop = { const CoordsXYZ frontTop = {
ps->bounds.x_end, ps->Bounds.x_end,
ps->bounds.y_end, ps->Bounds.y_end,
ps->bounds.z_end, ps->Bounds.z_end,
}; };
const auto screenCoordFrontTop = Translate3DTo2DWithZ(rotation, frontTop); const auto screenCoordFrontTop = Translate3DTo2DWithZ(rotation, frontTop);
const CoordsXYZ frontBottom = { const CoordsXYZ frontBottom = {
ps->bounds.x_end, ps->Bounds.x_end,
ps->bounds.y_end, ps->Bounds.y_end,
ps->bounds.z, ps->Bounds.z,
}; };
const auto screenCoordFrontBottom = Translate3DTo2DWithZ(rotation, frontBottom); const auto screenCoordFrontBottom = Translate3DTo2DWithZ(rotation, frontBottom);
const CoordsXYZ leftTop = { const CoordsXYZ leftTop = {
ps->bounds.x, ps->Bounds.x,
ps->bounds.y_end, ps->Bounds.y_end,
ps->bounds.z_end, ps->Bounds.z_end,
}; };
const auto screenCoordLeftTop = Translate3DTo2DWithZ(rotation, leftTop); const auto screenCoordLeftTop = Translate3DTo2DWithZ(rotation, leftTop);
const CoordsXYZ leftBottom = { const CoordsXYZ leftBottom = {
ps->bounds.x, ps->Bounds.x,
ps->bounds.y_end, ps->Bounds.y_end,
ps->bounds.z, ps->Bounds.z,
}; };
const auto screenCoordLeftBottom = Translate3DTo2DWithZ(rotation, leftBottom); const auto screenCoordLeftBottom = Translate3DTo2DWithZ(rotation, leftBottom);
const CoordsXYZ rightTop = { const CoordsXYZ rightTop = {
ps->bounds.x_end, ps->Bounds.x_end,
ps->bounds.y, ps->Bounds.y,
ps->bounds.z_end, ps->Bounds.z_end,
}; };
const auto screenCoordRightTop = Translate3DTo2DWithZ(rotation, rightTop); const auto screenCoordRightTop = Translate3DTo2DWithZ(rotation, rightTop);
const CoordsXYZ rightBottom = { const CoordsXYZ rightBottom = {
ps->bounds.x_end, ps->Bounds.x_end,
ps->bounds.y, ps->Bounds.y,
ps->bounds.z, ps->Bounds.z,
}; };
const auto screenCoordRightBottom = Translate3DTo2DWithZ(rotation, rightBottom); const auto screenCoordRightBottom = Translate3DTo2DWithZ(rotation, rightBottom);
const CoordsXYZ backTop = { const CoordsXYZ backTop = {
ps->bounds.x, ps->Bounds.x,
ps->bounds.y, ps->Bounds.y,
ps->bounds.z_end, ps->Bounds.z_end,
}; };
const auto screenCoordBackTop = Translate3DTo2DWithZ(rotation, backTop); const auto screenCoordBackTop = Translate3DTo2DWithZ(rotation, backTop);
const CoordsXYZ backBottom = { const CoordsXYZ backBottom = {
ps->bounds.x, ps->Bounds.x,
ps->bounds.y, ps->Bounds.y,
ps->bounds.z, ps->Bounds.z,
}; };
const auto screenCoordBackBottom = Translate3DTo2DWithZ(rotation, backBottom); const auto screenCoordBackBottom = Translate3DTo2DWithZ(rotation, backBottom);
@ -782,7 +782,7 @@ PaintStruct* PaintAddImageAsChild(
return nullptr; return nullptr;
} }
parentPS->children = ps; parentPS->Children = ps;
return ps; return ps;
} }
@ -847,8 +847,8 @@ bool PaintAttachToPreviousPS(PaintSession& session, const ImageId image_id, int3
ps->y = y; ps->y = y;
ps->IsMasked = false; ps->IsMasked = false;
AttachedPaintStruct* oldFirstAttached = masterPs->attached_ps; AttachedPaintStruct* oldFirstAttached = masterPs->Attached;
masterPs->attached_ps = ps; masterPs->Attached = ps;
ps->next = oldFirstAttached; ps->next = oldFirstAttached;
return true; return true;

View File

@ -48,20 +48,20 @@ struct PaintStructBoundBox
struct PaintStruct struct PaintStruct
{ {
PaintStructBoundBox bounds; PaintStructBoundBox Bounds;
AttachedPaintStruct* attached_ps; AttachedPaintStruct* Attached;
PaintStruct* children; PaintStruct* Children;
PaintStruct* next_quadrant_ps; PaintStruct* NextQuadrantEntry;
TileElement* tileElement; TileElement* Element;
EntityBase* entity; EntityBase* Entity;
ImageId image_id; ImageId image_id;
int32_t x; int32_t x;
int32_t y; int32_t y;
int32_t map_x; int32_t map_x;
int32_t map_y; int32_t map_y;
uint16_t quadrant_index; uint16_t QuadrantIndex;
uint8_t SortFlags; uint8_t SortFlags;
ViewportInteractionItem sprite_type; ViewportInteractionItem InteractionItem;
}; };
struct PaintStringStruct struct PaintStringStruct

View File

@ -596,7 +596,7 @@ bool WoodenASupportsPaintSetup(
auto* ps = PaintAddImageAsOrphan(session, imageId, { 0, 0, z }, bBox); auto* ps = PaintAddImageAsOrphan(session, imageId, { 0, 0, z }, bBox);
if (ps != nullptr) if (ps != nullptr)
{ {
session.WoodenSupportsPrependTo->children = ps; session.WoodenSupportsPrependTo->Children = ps;
} }
} }
} }
@ -768,7 +768,7 @@ bool WoodenBSupportsPaintSetup(
_9E32B1 = true; _9E32B1 = true;
if (paintStruct != nullptr) if (paintStruct != nullptr)
{ {
session.WoodenSupportsPrependTo->children = paintStruct; session.WoodenSupportsPrependTo->Children = paintStruct;
} }
} }
} }
@ -1296,7 +1296,7 @@ bool PathASupportsPaintSetup(
hasSupports = true; hasSupports = true;
if (paintStruct != nullptr) if (paintStruct != nullptr)
{ {
session.WoodenSupportsPrependTo->children = paintStruct; session.WoodenSupportsPrependTo->Children = paintStruct;
} }
} }
} }