add second palette#16538
Conversation
498785e to
d4f1cee
Compare
|
Wouldn't the better option be that you can specify a user defined palate? What happens when someone wants to use it with some other remap colour. |
|
I did think of that, but I didn't think of an elegant way to add it to the sprite entry of a sprite list manifest. |
|
You could just provide a 1x256 bitmap of your colours. I think that would work. |
|
that is a good idea |
|
I have to agree with @duncanspumpkin I don't think this is practical doing it this way, user defined palettes would avoid adding code for every specific case. |
|
We also have an option to use the raw indices that are stored in .png file. This is faster and would allow you to use any colour, because the game would only use the raw byte index for each pixel rather than using a colour lookup table. |
|
I know that, but the tools to create 8-bit images elude me, and this was the easiest option. |
I should point out that every other tool in existence uses green as the primary remap instead of orange. As such, I think building it in makes more sense in this case. Since I’m not a fan of adding another parameter for the green remap, I have done a refactor which should make it easy. See here: #16601 After that one is merged, this PR should be updated to use it. Additionally, since |
As that is not true that is the reason why i suggested having the ability to provide any palette. |
Ok, can you name a tool that doesn’t use green for primary remap? The Object Editor, Trigger’s tools and the RCT2 GUI Editor all use that palette. |
Landmark editor uses an alternative palette. I vaguely recall one other, but I don't remember its name or what it did. |
d4f1cee to
72c9a3a
Compare
|
I'm looking to suggestions on making the command line parsing less bad, as well as setting the actual data of each PaletteBGRA. And open to suggestions on removing the new header file. I added it because I added the palette as an optional parameter which has to be declared above the function declaration, and I didn't know how to do that without moving the declaration 256 lines of data above the declaration or moving them into a header. |
Do you have a link? I tried Googling, but didn’t see anything that looked like a RCT sprite editor/exporter. |
https://www.nedesigns.com/index.php?app=core&module=attach§ion=attach&attach_id=25880 From the NEDesigns website. IIRC there are two links, one of them worked when I tried it and one of them didn't. I don't remember where the other link is. |
|
I found an issue with the example palettes, the 0th pixel is 255 255 255 255 instead of 0 0 0 0. I'm not in a position to fix it right now, so if there's any danger of this PR being merged in the next several hours, please hold back until they are fixed. |
This issue has been resolved. I think the PR is ready for review, less any suggestions regarding what I asked about earlier. |
7b5e0be to
3655194
Compare
|
I have been thinking about OpenRCT2's palette collisions with sparkling water and I wanted to see if any tools do not have palette collisions. It appears none of the tools avoid palette collisions, I think because no scenery actually uses all of the animated water colors. I've written more of my findings here: #16611 As far as the effect on this PR, since there is no standard on which to base these colors on, I think this PR is an opportunity to create a new standard for animated water pixels and apply it to both the RCT2 and OpenRCT2 palette. |
Gymnasiast
left a comment
There was a problem hiding this comment.
Code looks OK, want to test.
97bea1d to
94cd622
Compare
|
I do not have a plugin that uses custom images to test against. |
|
The image api demo works fine in this branch. Please can this be merged before any other changes are made? |
Before which other changes? |
|
Any others that affect image import code that I have to work around and require another review and delay things further until the next change that affects image import code that I have to work around and require another review that delay things further and so on. |
|
I've tested all the functionality and I am happy with it. Is there anything else left before this PR can get merged? |
|
Is this PR now defunct since libsawyer is being created? I wish there was better communication. |
|
These changes can be ported now to gxc in libsawyer. |
|
It feels like I'm missing something critical in libsawer... I've poked around but I have yet to find where the sprite functions are actually used. |
I am not sure what you are looking for. |
|
Here's two color table files for the palette index. OpenRCT2 is default gxc, OpenRCT2 green is the green palette used here. You can easily convert between the two by just swapping the index. |
|
This pull request has been marked as stale and will be closed in 14 days if no action is taken. To keep it open, leave a comment or remove the |
|
Keep this open please. |
|
This pull request has been marked as stale and will be closed in 14 days if no action is taken. To keep it open, leave a comment or remove the |
|
Keep this open please. |
|
This pull request has been marked as stale and will be closed in 14 days if no action is taken. To keep it open, leave a comment or remove the |
|
This pull request has been closed due to inactivity. If you want to continue with this, or are awaiting a review, don't hesitate to reach out to a developer. We'll gladly re-open this PR! You can tag us here, or send us a message on Discord. |
Custom content creators struggle with handling 8-bit png when creating and editing sprites, and most tools to create custom content for RCT2 utilise a different palette than OpenRCT2. The OpenRCT2 palette does not have unique RGB values for every palette color - several animated water colors have the same RGB value, which cause problems when importing and exporting in true color.
This PR attempts to address both issues by providing native support for the RCT2 palette as well defining one's own palette to import/export with.
todo:
features:
testing plan:
testing results: