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

Gear images misaligned for cars with more than 8 gears #256

Closed
zear opened this issue Dec 2, 2022 · 0 comments · Fixed by #257
Closed

Gear images misaligned for cars with more than 8 gears #256

zear opened this issue Dec 2, 2022 · 0 comments · Fixed by #257

Comments

@zear
Copy link
Collaborator

zear commented Dec 2, 2022

The game naively assumes that all cars have up to 8 gears (R, N and 1..6) and use HGEARS.PIX.
However, Suppressor has 11 gears and uses HGEARS4.PIX, a bitmap with a different height. This messes up gear mask calculation:
gears
... and causes a buffer overflow on higher gears, where garbage is displayed instead of gear numbers.

This bug is also present in OG.

zear added a commit to zear/dethrace that referenced this issue Dec 2, 2022
Fix misaligned gear mask and a buffer overflow for cars which use more
than 8 gears, and thus pixelmaps other than HGEARS.PIX.

Signed-off-by: Artur Rojek <contact@artur-rojek.eu>
zear added a commit to zear/dethrace that referenced this issue Dec 3, 2022
Fix misaligned gear mask and a buffer overflow for cars which use more
than 8 gears, and thus pixelmaps other than HGEARS.PIX.

Signed-off-by: Artur Rojek <contact@artur-rojek.eu>
dethrace-labs pushed a commit that referenced this issue Dec 3, 2022
Fix misaligned gear mask and a buffer overflow for cars which use more
than 8 gears, and thus pixelmaps other than HGEARS.PIX.

Signed-off-by: Artur Rojek <contact@artur-rojek.eu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant