PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Palette effects

Since PF surface contains RGB values and not indexes of palette table, I see no way to change palette during run-time, exept changing system palette. I can't find the way to do this on PPC. Did someone do this?
I use a lookup table for fire/smoke effects in Assaultaire.

I use an additive blit to a temporary surface. Then I scan through the pixels and use the color value as a lookup into my color table.
You can also check the "Firework" sample that comes with PocketHAL... It uses a palette to render the fire particles.
fast_rx wrote:
I use an additive blit to a temporary surface. Then I scan through the pixels and use the color value as a lookup into my color table.


I do the same for now, and it works quite fast, but I need it work even faster. Remember Warcraft2, unit in there has colors of the player which owns it. When there are a lot of units on the screen, changing pixels can take a lot of time. And I have the same problem.