A89: Re: Sprite Formats


[Prev][Next][Index][Thread]

A89: Re: Sprite Formats




> Hi!
>
> Could someone please send me a list of available sprite formats that are not
> described in the TI-GCC Library Documentation?  I especially need to know
> how to make M68k ASM files for all (if there is more than one) standard
> sprite formats.

The "sprites" on the calcs are nothing more than bit patterns representing the
raw graphics (and possibly the mask) of the figures in them... afaik there is no
standard format. Some use a fixed size (8x8, 16x16), others use dynamic sizes
(and data that tells how big the sprite is). Some put the graphics separate from
the mask, others put them in two or more blocks following each other. Some
separate the greyscale planes of the gfx, others interleave them, and some even
interleave the mask with the gfx.

My own favourite (because I currently use it) is a fixed-width, variable-height
interleaved sprite:

typedef struct {
  int Height,HotspotX,HotspotY;
  WORD data[0];
} SPRITE_DATA;

...or in asm:
 mysprite:
    dc.w height, hotspotX, hotspotY
    dc.w row0_mask, row0_plane0, row0_plane1
    dc.w row1_mask, row1_plane0, row1_plane1
    ... etc.

The most *common* one would probably be formats used by the sprite functions in
DoorsOS and compatibles, since they are directly available, finished and
documented (I think - never used them myself).

> Also, does anyone know the format of GIFs, animated GIFs, and AVIs?  If
> there are even more known formats, I'll take all of them. :-)  I will soon
> be creating the sprite editor for my IDE, so the more formats I get, the
> more formats will be available for pictures.  Thanks.

The coolest would be if you could make a simple script language to describe the
sprite data format, making it very dynamic. Or you could simply look/ask around
for all the different formats in different sources and build them into the
program.

As for graphic file formats, a very quick look in altavista gave me this (going
through the tree is so much easier than blindly searching when you know exactly
what you're looking for):
http://www.dcs.ed.ac.uk/home/mxr/gfx/

 / Niklas Brunlid
Check out Prosit for the TI-89 / TI-92+ at http://prosit.ticalc.org
Random PQF Quote follows:

It would be nice to say that the tiny frogs thought long and hard about the
new flower, about life in the old flower, about the need to explore, about
the possibility that the world was bigger than a pool with petals around
the edge.
In fact, what they thought was: "._._.mipmip._._.mipmip._._.mipmip".
        -- (Terry Pratchett, Wings)





Follow-Ups: References: