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

DIRECTOR: Fix missing text in buttons in 32bpp mode #4194

Merged
merged 2 commits into from Sep 9, 2022

Conversation

r41k0u
Copy link
Contributor

@r41k0u r41k0u commented Aug 15, 2022

These changes reimplement decomposeColor in macwindowmanager to fix missing text in buttons in 32bpp mode

@sev-
Copy link
Member

sev- commented Aug 20, 2022

"For some reason" is not a great explanation. All the code is in front of you, you need to trace it deeper.

The current hack has no place in our codebase.

@r41k0u r41k0u force-pushed the buttonText branch 3 times, most recently from 3ac8a7a to 921cb79 Compare Aug 26, 2022
@@ -0,0 +1,37 @@
/* ScummVM - Graphic Adventure Engine
Copy link
Member

@sev- sev- Aug 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it here?

@sev-
Copy link
Member

sev- commented Aug 29, 2022

Please rebase it and also split out graphics/managed_surface.* changes into a separate commit

@r41k0u r41k0u marked this pull request as ready for review Aug 31, 2022
wm->decomposeColor(*dst, rDst, gDst, bDst);
wm->decomposeColor(p->foreColor, rFor, gFor, bFor);
wm->decomposeColor(p->backColor, rBak, gBak, bBak);
wm->decomposeColor<T *>(src, rSrc, gSrc, bSrc);
Copy link
Member

@sev- sev- Aug 31, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is wrongly indented.

@@ -241,8 +241,8 @@ void inkDrawPixel(int x, int y, int src, void *data) {
byte rSrc, gSrc, bSrc;
byte rDst, gDst, bDst;

wm->decomposeColor(src, rSrc, gSrc, bSrc);
wm->decomposeColor(*dst, rDst, gDst, bDst);
wm->decomposeColor<T *>(src, rSrc, gSrc, bSrc);
Copy link
Member

@sev- sev- Aug 31, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you're using <T *> everywhere, I suggest changing the template to <uint32> and <byte>, so you could drop the star.

@sev-
Copy link
Member

sev- commented Sep 9, 2022

Thanks!

@sev- sev- merged commit 842fe20 into scummvm:master Sep 9, 2022
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants