Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Fri Apr 19, 2024 10:38 am
All times are UTC + 0
Applying Palette Problem
Moderators: Global Moderators
Post new topic   Reply to topic Page 1 of 1 [4 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Code_Man
Guest




PostPosted: Sat Mar 05, 2022 12:31 pm    Post subject:  Applying Palette Problem
Subject description: I need some help figuring out how to use palettes
Reply with quote  Mark this post and the followings unread

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.

Back to top
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Sat Mar 05, 2022 2:46 pm    Post subject: Reply with quote  Mark this post and the followings unread

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

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Code_Man
Guest




PostPosted: Sat Mar 05, 2022 11:15 pm    Post subject: Reply with quote  Mark this post and the followings unread

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.

Back to top
Code_Man
Guest




PostPosted: Fri Mar 11, 2022 10:48 am    Post subject: Reply with quote  Mark this post and the followings unread

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.

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [4 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
Quick Reply
Username:


If you are visually impaired or cannot otherwise answer the challenges below please contact the Administrator for help.


Write only two of the following words separated by a sharp: Brotherhood, unity, peace! 

 
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


Powered by phpBB © phpBB Group

[ Time: 0.1499s ][ Queries: 11 (0.0089s) ][ Debug on ]