Simple question with SDL

Started by
3 comments, last by kontrolkl 18 years, 8 months ago
I load image with SDL, and sometime in the game I'd like to change the color of that image ( a specific color of the image ) can it be done?.
Advertisement
Describe what you want to do:

change one color to another ( like make all the blue pixels red)

or make the whole image one color?
i have Tetris piece made up with Square i load as BMP. And I'd like to change the center color of the image to another color.
Are you trying to do this with when the levels change? The only solution that I can think of that doesn't involve manipulating individual pixles is just to make a set of colored blocks for each level and put them in according directories and create a sort of LoadLevel() function that would change the souce of the surfaces when the level changes.
Quote:Original post by Ekim_Gram
Are you trying to do this with when the levels change? The only solution that I can think of that doesn't involve manipulating individual pixles is just to make a set of colored blocks for each level and put them in according directories and create a sort of LoadLevel() function that would change the souce of the surfaces when the level changes.


You are correct this is what i wana do.

I already tought of your solution, but i wanted to know if i could made it just by changing the color, seem like no, too bad ;)

Thank

This topic is closed to new replies.

Advertisement