Archived

This topic is now archived and is closed to further replies.

NeptuneKul

RTS character color questions...

Recommended Posts

I know it''s through palette to change the colors of different players. Let''s say the game is going to run under 16 or 24 bit mode, the bitmaps are 256 color with 8 bit palette table, one object with one bitmap and with the standard palette table, all the other 7 colors of the same object need to change the palette dynamically. All my offscreen surfaces should also be 16 or 24 bits right? How to blit those offscreen surfaces to the primary surface with different colors? Must I store all the 8 colors of the same object to 8 different offscreen surfaces? If I made any wrong assumption, just point me out.. Thank you!

Share this post


Link to post
Share on other sites
For directdraw your best bet would be to use 8 bit surfaces and write a custom blit routine that replaces the color you use for these pixels with the player color (best written in asm).

If you were willing to use dx 8 then you could load 8 bit textures and modify the texture palette to get the appropiate effect (D3DDevice::SetTexturePalette or something like that). Change the entry you use to the appropiate player color for each blit maybe sort them by player.

Share this post


Link to post
Share on other sites