-
Notifications
You must be signed in to change notification settings - Fork 814
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
Sort Pokemon and trainer sprite palettes, with Makefile-specified exceptions #1137
Conversation
The algorithm here is slightly different than what was described in the issue: Both front.2bpp and back.2bpp are created using the same normal.gbcpal input. The normal.gbcpal is generated by combining front.gbcpal and back.gbcpal. This means that front and back can each use a subset of the overall palette (e.g. Jigglypuff's back doesn't use its eye-blue color). tools/gbcpal.c checks the colors by sorting them, filtering out duplicates, also filtering our black and white, and then allowing zero, one, or two colors. This allows for any valid sprite, including "all black and white" (fills in the middle colors as white and black also) or "all color, no black or white" (if we checked for "first color is white" or "last color is black", this would fail). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love this! It is clean and simple, and will be relatively unintrusive to current workflows.
...I just have a few nitpicks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like a good way to enforce that the front and back pics use essentially the same palette.
Thanks, dannye! I've just rebased this after removing most other helper scripts; @mid-kid does it look okay to you? If so we can merge and remove palfix.py too. |
f75d9e0
to
c2ec317
Compare
dd74cff
to
2c53a44
Compare
78e22d8
to
aea7f4c
Compare
…eptions This avoids the need to define their order via indexed PNG palettes It also avoids the need to use tools/palfix.py on custom sprites Fixes pret#1136
Fixes #1136
This avoids the need to define the palette order via indexed PNG palettes.
It also avoids the need to use tools/palfix.py on custom sprites.
(After this is merged, palfix.py and png.py should be removed; they're still available in gb-asm-tools anyway.)
Note that the sprites with reversed palettes can be found with revpals.py.