clintbellanger / flare

Free Libre Action Roleplaying Engine
http://clintbellanger.net/rpg/
GNU General Public License v3.0
166 stars 41 forks source link

Colored equipment #896

Closed igorko closed 11 years ago

igorko commented 11 years ago

Does SDL 1.2 provide the fast way to change sprite color? So we don't need to recreate images with different colors. I'm talking about creating red/green etc.. armor at runtime from current silver armor.

Bertram25 commented 11 years ago

A dying system? https://github.com/mana/mana/tree/master/tools/dyecmd

Using SDL, one can reset the RGB values of the image for simple-colors pixels. http://doc.manasource.org/image_dyeing_system

igorko commented 11 years ago

@clintbellanger this util converts png and creates another one. Do we need to save this behavior, or maybe convert on-the-fly?

clintbellanger commented 11 years ago

We won't do any color conversions on the fly. Just use different images.

dorkster commented 11 years ago

I don't think color-swapping would be good anyway, especially for a metallic object like steel armor. When the object is rendered, its surface might reflect parts of itself. And I think such an effect would be hard to capture with a color-swap.

Bertram25 commented 11 years ago

@igorko While I'm completely out of this point, the tool was only a reference in term of code, not in term of tool to use on the fly, just in case.

igorko commented 11 years ago

@Bertram25 Well, I didn't mean tool itself. I meant the algorithm of it's work. @clintbellanger Ok, making different image is not so bad.