Skip to main content
Topic: [patch] Alpha channel & makeobj (Read 2210 times) previous topic - next topic

[patch] Alpha channel & makeobj

Instead of talking about how makeobj doesn't work with alpha channel, why not make it work?

This does not add alpha, just ignores it, so that images with correct colours but "wrong" format compile correctly. For example, Paint in Windows 7 does (on some occasions?) save with alpha channel present.

BTW: handling palettized format already worked. I tested with a few images and as long as the resulting colours resolve to what you want, all is acceptable. So, the 8bpp requirement is a myth...

edit: updated per comments below

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

Re: [patch] Alpha channel & makeobj

Reply #1
full Alpha support would be awesome, though... :::)

Re: [patch] Alpha channel & makeobj

Reply #2
That's a good alternative solution fo the alpha channel issue. One detail, although with this patch makeobj ignores alpha, does it show a message of some kind? Something like "NOTE: The image has alpha channel activated. I'll process it but you should remove it."

P.S: where's the makeobj source code available?

 

Re: [patch] Alpha channel & makeobj

Reply #3
That sounds like very a good idea - I'll change this!

In short, Makeobj's source code is the source of Simutrans. There is a large pool of data structures and their helper code that is shared by both programs. Makeobj adds on top of this just a dat reader, while Simutrans also includes all the game logic for interactions (even more).

edit: Done, updated the patch.

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!