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

Problem with rendering of GUI #1181

Closed
rdebath opened this issue Apr 30, 2024 · 1 comment
Closed

Problem with rendering of GUI #1181

rdebath opened this issue Apr 30, 2024 · 1 comment

Comments

@rdebath
Copy link

rdebath commented Apr 30, 2024

The most recent version of Classicube seem to be showing a gui.png file incorrectly.

The terrain file is http://51.195.219.231:8000/ocdpack.zip

Problem starts with commit c26944576 Optimise PNG decoding to decode image using the destination image buffer

@UnknownShadow200
Copy link
Collaborator

With these macros in Bitmap.c:

#define PNG_Do_Grayscale_8()      rgb = src[0]; Bitmap_Set(*dst, rgb, rgb, rgb,    255); dst--; src -= 2;
#define PNG_Do_Grayscale_A__8()   rgb = src[0]; Bitmap_Set(*dst, rgb, rgb, rgb, src[1]); dst--; src -= 1;

I accidentally swapped src -= 1; and src -= 2; around there (GrayScale_A should be the one consuming 2 bytes per pixel)

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

No branches or pull requests

2 participants