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

Add dyed signs. #1626

Merged
merged 4 commits into from
Oct 4, 2023
Merged

Add dyed signs. #1626

merged 4 commits into from
Oct 4, 2023

Conversation

leMaik
Copy link
Member

@leMaik leMaik commented Sep 10, 2023

This PR adds dyed signs. Dyes can be different on the front and back side of a sign.

Note that the 16 dye colors are different from the usual sign text colors (except for black). This means that we can't use the existing 4-bit palette for the dye color. In order to not have to add more bits to the palette, I made it so that if the palette contains a 1 but the text mask is 0, the sign texture treats the pixel as dye color, which requires only 32 or 64 bits (ie. an enum value) per sign texture.

I extracted the colors via screenshots from dyed signs. They may be incorrect.

Closes #1625 and related to #789.

@leMaik leMaik added the minecraft Block updates, world format changes, and anything related to Minecraft updates label Sep 10, 2023
@leMaik leMaik marked this pull request as ready for review September 10, 2023 13:25
@ThatRedox
Copy link
Member

These should be the text colors:

Color ARGB
WHITE 0xFFFFFFFF
ORANGE 0xFFFF681F
MAGENTA 0xFFFF00FF
LIGHT_BLUE 0xFF9AC0CD
YELLOW 0xFFFFFF00
LIME 0xFFBFFF00
PINK 0xFFFF69B4
GRAY 0xFF808080
LIGHT_GRAY 0xFFD3D3D3
CYAN 0xFF00FFFF
PURPLE 0xFFA020F0
BLUE 0xFF0000FF
BROWN 0xFF8B4513
GREEN 0xFF00FF00
RED 0xFFFF0000
BLACK 0xFF000000

@leMaik
Copy link
Member Author

leMaik commented Sep 12, 2023

The text of white dyed signs is light gray in game. Do we need to multiply all of them by some factor if the sign doesn't glow?

@ThatRedox
Copy link
Member

Yes, it looks like each channel is multiplied by 0.4 if the sign isn't glowing.

@leMaik
Copy link
Member Author

leMaik commented Sep 21, 2023

Note to self: The outline on glowing signs is 0.4 * dye color.

@leMaik leMaik merged commit 862504f into chunky-dev:master Oct 4, 2023
1 check passed
@leMaik leMaik deleted the dyed-signs branch October 4, 2023 09:29
@leMaik leMaik added backport-me A PR that is to be backported to the latest stable Chunky version. and removed backport-me A PR that is to be backported to the latest stable Chunky version. labels Oct 4, 2023
leMaik added a commit that referenced this pull request Oct 7, 2023
* Add dyed signs.

* Fix sign text color outside of the extra array being ignored.

* Add support for dyed signs.

* Add glowing text support for all sign types.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minecraft Block updates, world format changes, and anything related to Minecraft updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dyed text on signs
2 participants