I looked into doing this. The complicating factor is that there is some shading
from left-right to give a 3D effect. (The current atlas file where all is done
is at:
http://freedroid.git.sourceforge.net/git/gitweb.cgi?p=freedroid/freedroid;a=blob;f=graphics/to_elem.png;h=91f7e4b34e935606573e4bfabc6f47c06afbaa44;hb=HEAD
).
There are three options that I could come up with:
A) We double the size of the atlas file by generating the (near) mirror images.
B) We simply add a horizontal flip operation into the rendering process. This
has the downside of having the light source appear to shift from the upper left
to upper right, which I think would be distracting.
C) We remove the color information from the atlas file, and use layers:
bottom: is the same
middle: is a color rectangle
top: is a transparent png providing shading information
This has the added advantage that we could then allow the colors in the hacking
game to be defined as part of the configuration.
(I'm a fan of C, and if I get to it, thats probably how I'd approach the problem.) |