RE: A89: Re: Sprites with ti-gcc
[Prev][Next][Index][Thread]
RE: A89: Re: Sprites with ti-gcc
I can't find your raw2sprite program anywhere. Also I looked for any other
programs that do it. Can you send me your program or if there is a better
program tell me where I can get it please.
thanks
-----Original Message-----
From: owner-assembly-89@lists.ticalc.org
[mailto:owner-assembly-89@lists.ticalc.org]On Behalf Of Niklas Brunlid
Sent: Wednesday, June 07, 2000 12:09 AM
To: assembly-89@lists.ticalc.org
Subject: A89: Re: Sprites with ti-gcc
> How do I make a sprite for the ti-gcc compiler? I read through the
> documentation but I don't know how to define a sprite. What I have is:
>
> static unsigned int sprite[8][8] = {{0,1,1,1,1,1,1,0},
> {1,1,0,1,1,0,1,1},
> {0,1,1,1,1,1,1,0},
> {0,0,0,1,1,0,0,0},
> {0,0,0,1,1,0,0,0},
> {0,0,0,1,1,0,0,0},
> {0,0,0,1,1,0,0,0},
> {0,0,0,1,1,0,0,0}};
>
> But when I use this it just gives me a 1pixel thick line? The sprite
routine
> I'm using is:
>
> Sprite16 (30, 30, 8, sprite, LCD_MEM, SPRT_OR);
>
> How do I make a sprite that I want to use?
That code creates data that is 8*8*2 = 128 bytes big. You can't write bits
directly in C like that - you have to write it in bytes or words:
(I assume that Sprite16 takes words here)
static unsigned int sprite[8] =
{0x007e,0x00db,0x007e,0x0018,0x0018,0x0018,0x0018,0x0018};
Now, designings sprites like this is a real pain, so usually a program is
used
that converts graphic data to sprite data (like my own raw2sprite) or a
sprite
editor is used that can output C code (there are some on ticalc, and I think
the
IDE will have that ability someday).
/ Niklas Brunlid
Check out Prosit for the TI-89 / TI-92+ at http://prosit.ticalc.org
Random PQF Quote follows:
The Ephebians made wine out of anything they could put in a bucket, and ate
anything that couldn't climb out of one.
-- (Terry Pratchett, Pyramids)
Follow-Ups:
References: