Posted: Sat Mar 05, 2022 12:31 pm Post subject:
Applying Palette Problem
Subject description: I need some help figuring out how to use palettes
Im making a red alert reimplementation, but as anyone who tried knows its easier said.
Anyway, i am fairy confident the .shp and .pal readers work correctly, but i still dont get out a proper looking image.
It seems i have to manipulate the palette somehow after loading but i have no idea on how or what.
I understand that shadow indexes need to be alphad, but other than that i have not been able to find out what happens post loading.
If anyone can shine some light on how to use palettes after loading it would much help me. QUICK_EDIT
The palettes are only 6bit (0 to 64), so to get the real RGB value you have to multiply it by 4 to get the normal 0 to 256 range.
Palette index 0 is transparent. Index 1 is usually the shadow (at least for TS/RA2, other games TD/RA1 use index 4 IIRC)
Other than that, there isn't much else going on with palettes and SHPs and the conversion is pretty straight forward. _________________ SHP Artist of Twisted Insurrection: Nod buildings
Thanks for the quick answer.
According to the mappreviewer code its 3 and 4 for ra/td.
I did bitshift the values just like i looked off the code, so im sure that is all proper.
Could it be that color mapping does more than just manipulate colors?
Guess i just have to keep at it and find out what the issue could be. QUICK_EDIT
Good news and bad news, the good news is i managed to find out what i did wrong, the bad news is its still not fixed and i have no idea how to proceed.
Im not sure where the error lies, i think the pal loading and applying is all the way it should be, on the other hand i can clearly recognize the shapes and animations being played.
If someone would be so kind as to upload me a decompressed grayscale bitmap of FACT.shp(CY) that would save me immense trouble.
Forgive the doubleposting, i really just want this done with so i can focus on implementing gameplay code. QUICK_EDIT
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum