Rename next to NextEntry

This commit is contained in:
ζeh Matt 2023-04-14 03:37:26 +03:00
parent b78a1ac9f2
commit a1c3f38469
No known key found for this signature in database
GPG Key ID: 18CE582C71A225B0
3 changed files with 10 additions and 10 deletions

View File

@ -1856,7 +1856,7 @@ InteractionInfo SetInteractionInfoFromPaintSession(PaintSession* session, uint32
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wnull-dereference"
for (AttachedPaintStruct* attached_ps = ps->Attached; attached_ps != nullptr; attached_ps = attached_ps->next)
for (AttachedPaintStruct* attached_ps = ps->Attached; attached_ps != nullptr; attached_ps = attached_ps->NextEntry)
{
if (IsSpriteInteractedWith(session->DPI, attached_ps->image_id, ps->ScreenPos + attached_ps->RelativePos))
{

View File

@ -562,7 +562,7 @@ void PaintDrawStructs(PaintSession& session)
static void PaintAttachedPS(DrawPixelInfo& dpi, PaintStruct* ps, uint32_t viewFlags)
{
AttachedPaintStruct* attached_ps = ps->Attached;
for (; attached_ps != nullptr; attached_ps = attached_ps->next)
for (; attached_ps != nullptr; attached_ps = attached_ps->NextEntry)
{
const auto screenCoords = ps->ScreenPos + attached_ps->RelativePos;
@ -808,9 +808,9 @@ bool PaintAttachToPreviousAttach(PaintSession& session, const ImageId imageId, i
ps->image_id = imageId;
ps->RelativePos = { x, y };
ps->IsMasked = false;
ps->next = nullptr;
ps->NextEntry = nullptr;
previousAttachedPS->next = ps;
previousAttachedPS->NextEntry = ps;
return true;
}
@ -843,7 +843,7 @@ bool PaintAttachToPreviousPS(PaintSession& session, const ImageId image_id, int3
AttachedPaintStruct* oldFirstAttached = masterPs->Attached;
masterPs->Attached = ps;
ps->next = oldFirstAttached;
ps->NextEntry = oldFirstAttached;
return true;
}
@ -876,7 +876,7 @@ void PaintFloatingMoneyEffect(
const auto coord = Translate3DTo2DWithZ(rotation, position);
ps->string_id = string_id;
ps->next = nullptr;
ps->NextEntry = nullptr;
std::memcpy(ps->args, &amount, sizeof(amount));
ps->args[2] = 0;
ps->args[3] = 0;
@ -906,7 +906,7 @@ void PaintDrawMoneyStructs(DrawPixelInfo& dpi, PaintStringStruct* ps)
GfxDrawStringWithYOffsets(
dpi, buffer, COLOUR_BLACK, ps->ScreenPos, reinterpret_cast<int8_t*>(ps->y_offsets), forceSpriteFont,
FontStyle::Medium);
} while ((ps = ps->next) != nullptr);
} while ((ps = ps->NextEntry) != nullptr);
}
PaintEntryPool::Chain::Chain(PaintEntryPool* pool)

View File

@ -28,7 +28,7 @@ enum class ViewportInteractionItem : uint8_t;
struct AttachedPaintStruct
{
AttachedPaintStruct* next;
AttachedPaintStruct* NextEntry;
ImageId image_id;
ImageId ColourImageId;
// This is relative to the parent where we are attached to.
@ -65,7 +65,7 @@ struct PaintStruct
struct PaintStringStruct
{
StringId string_id;
PaintStringStruct* next;
PaintStringStruct* NextEntry;
ScreenCoordsXY ScreenPos;
uint32_t args[4];
uint8_t* y_offsets;
@ -249,7 +249,7 @@ struct PaintSession : public PaintSessionCore
}
else
{
LastPSString->next = string;
LastPSString->NextEntry = string;
}
LastPSString = string;
return LastPSString;