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

Broken color cycling for lava #14

Open
galaxyhaxz opened this issue Aug 23, 2021 · 5 comments
Open

Broken color cycling for lava #14

galaxyhaxz opened this issue Aug 23, 2021 · 5 comments

Comments

@galaxyhaxz
Copy link
Contributor

If you try to convert caves tiles back, the color cycling for the lava becomes broken. Even with an 8-bit PNG, the tool will re-search and find a new index for each color in the image.

The game expects colors to be cycled to be in indices 1-31, and each color mapped to a specific index to make the cycling effect work. My suggestion is to add a direct conversion of 8-bit PNG images, where the tool will simply keep the same 1-1 palette indices of the palette in the image rather than remapping to one in the command line.

@galaxyhaxz
Copy link
Contributor Author

Here is an explanation of why this happens: the cycling effect fades in then out using the same color. This means duplicate palette entries exist. The tool will simply select the first matching index in the palette.
Capture

@mewmew
Copy link
Member

mewmew commented Aug 23, 2021

Here is an explanation of why this happens: the cycling effect fades in then out using the same color. This means duplicate palette entries exist. The tool will simply select the first matching index in the palette.

Ah, that makes sense. There are so many specific details to keep in mind to have the palettes fully working in the game :P

@galaxyhaxz
Copy link
Contributor Author

There are so many specific details to keep in mind to have the palettes fully working in the game :P

Yeah, to be fair though, they could have probably made it work without the fade out part if they coded tables instead of shifting everything by one (:

@AJenbo
Copy link
Contributor

AJenbo commented Aug 23, 2021

Are the png palette indexes even exposed to the code?

@galaxyhaxz
Copy link
Contributor Author

I imagine there should be a function for it, you don't even need the palette itself just have to decompress the raw image data and then RLE it.

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

No branches or pull requests

3 participants