Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Guest sprites on water coaster boat and other vehicles don't render properly. #23471

Closed
ZeeMaji opened this issue Dec 24, 2024 · 4 comments · Fixed by #23475
Closed

Guest sprites on water coaster boat and other vehicles don't render properly. #23471

ZeeMaji opened this issue Dec 24, 2024 · 4 comments · Fixed by #23475
Labels
bug Something went wrong.
Milestone

Comments

@ZeeMaji
Copy link
Contributor

ZeeMaji commented Dec 24, 2024

Operating System

Linux (Fedora 40)

OpenRCT2 build

Actions Build AppImage (https://github.com/OpenRCT2/OpenRCT2/actions/runs/12473776407)

Base game

RollerCoaster Tycoon 2

Area(s) with this issue?

This bug is a graphical glitch or error

Describe the issue

The guest sprites on the water coaster boats don't seem to render properly anymore, they're cut off and flicker in and out of existence.

Steps to reproduce

  1. Look at any water coaster boat with guests
  2. Observe the sprite glitching

Attachments

Image
Image

@ZeeMaji ZeeMaji added the bug Something went wrong. label Dec 24, 2024
@ZeeMaji
Copy link
Contributor Author

ZeeMaji commented Dec 24, 2024

Upon looking further, it affects other vehicles too like the six seater bobsleds and splash boats.
Image
Image

@ZeeMaji ZeeMaji changed the title Guest sprites on water coaster boats don't render properly. Guest sprites on water coaster boat and other vehicles don't render properly. Dec 24, 2024
@ZeeMaji
Copy link
Contributor Author

ZeeMaji commented Dec 24, 2024

This seems to be affecting nearly every vehicle with more than one set of guest sprites, the first set renders correctly but all of the ones after it glitch badly.

@Gymnasiast Gymnasiast added this to the v0.4.18 milestone Dec 24, 2024
@ZehMatt
Copy link
Member

ZehMatt commented Dec 24, 2024

Could this be again related to procedurally computing their bounding box for invalidation @AaronVanGeffen ?

@AaronVanGeffen
Copy link
Member

AaronVanGeffen commented Dec 24, 2024

These would be vehicle sprites, not peep animation sprites, so it can't be due to the recent changes. Curious to see what this bisects to.

That said, the peep animation algorithm is actually based on the inference code used for vehicle objects, which is much older. Large sprites might not fit in the 100x100 quadrants allotted for them:

void CarEntrySetImageMaxSizes(CarEntry& carEntry, int32_t numImages)
{
constexpr uint8_t kWidth = 200;
constexpr uint8_t kHeight = 200;
constexpr uint8_t kCentreX = kWidth / 2;
constexpr uint8_t kCentreY = kHeight / 2;
uint8_t bitmap[kHeight][kWidth] = { 0 };
DrawPixelInfo dpi = {
.bits = reinterpret_cast<uint8_t*>(bitmap),
.x = -(kWidth / 2),
.y = -(kHeight / 2),
.width = kWidth,
.height = kHeight,
.pitch = 0,
.zoom_level = ZoomLevel{ 0 },
};

ZehMatt added a commit that referenced this issue Dec 24, 2024
Fix #23471: Traverse the paint nodes in correct order
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something went wrong.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants