Re: [cc65] tgi_sprite and friends

From: Oliver Schmidt <ol.sc1web.de>
Date: 2012-11-07 13:10:39
Hi,

>> - The question if that tool is creates a common header for that binary
>> data allowing i.e. to dynamically load a suitable TGI driver in order
>> to render it (as I advocated for) is already answered: Uz added some
>> metadata support when generating C code but clearly stated that he
>> does _not_ see that - at least in a generic cross-target fashion - for
>> generating binary data.

> I am very much for the way Uz did it. There is no way the sp65 can know in
> advance what the bitmap will be used for. Is it transparent, border sprite,
> collidable sprite, scalable, tiltable/skewable. All these require different
> container structures. They can easily be implemented with the #defines
> provided in the bitmap.c file.

I don't know if you are aware that some of them are - optionally -
already provided. Check out the bottom of
http://www.cc65.org/snapshot-doc/sp65-7.html#ss7.3

"In addition, three #defines are added for <ident>_COLORS,
<ident>_WIDTH and <ident>_HEIGHT"

>> a) Does it make sense to define a cross-target TGI function that takes
>> some target-specific sp65 output and places it on the screen?
>>
>> But now with sp65 that tool is
>> already there so I see no reason to not use it that way.

> I have the same opinion.

:-)

> Could it be tgi_bitmap with some arguments?

Or maybe tgi_bitblt() ?

> What arguments should tgi_bitmap have?
>
> Could it be an argv style command like tgi_bitmap(bitmap, ...)?
> It could be expanded by posx, posy, width, height, type, bits_per_pixel,
> palette depending on what the target can handle.

The argv style might make sense. However I'd like to see at least
width, height and something like bits_per_pixel or colors be
obligatory.

Regarding posx, posy there should maybe exist a tgi_...xy() variant
for the sake of consistency with the existing TGI API. One could
define that the cursor is position right of the drawn bitmap so that a
sequence of tgi_...() draws them in a horizontal line, i.e. useful for
a custom bitmap font or alike.

Regards,
Oliver
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Wed Nov 7 13:11:02 2012

This archive was generated by hypermail 2.1.8 : 2012-11-07 13:11:06 CET