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

Colorful refactoring #304

Merged
merged 7 commits into from
Apr 17, 2024
Merged

Colorful refactoring #304

merged 7 commits into from
Apr 17, 2024

Conversation

mmatyas
Copy link
Owner

@mmatyas mmatyas commented Apr 16, 2024

No description provided.

{
return gfx_loadteamcoloredimage(gSprites, filename, 255, 0, 255, 255, fVertical, fWrap);
return gfx_loadteamcoloredimage(sprites, path, colors::MAGENTA, 255, fVertical, fWrap);
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm nitpicking, but it being magenta is probably not the important thing about 0xff00ff in this case. What is important is that it is the background color.

Copy link
Owner Author

Choose a reason for hiding this comment

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

You are correct, and this is why the parameter name in gfxSprite::init is key (from color key) instead of just RGB. However, some images use a different color key, for example black; calling 0xff00ff then as 'transparent' would be misleading, so I went with the color names.

@mmatyas mmatyas merged commit d692ca6 into master Apr 17, 2024
12 checks passed
@mmatyas mmatyas deleted the color-refac branch April 17, 2024 13:08
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 this pull request may close these issues.

2 participants