Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => Topic started by: bfr on June 13, 2006, 06:27:00 am

Title: Sprites Library
Post by: bfr on June 13, 2006, 06:27:00 am
Besides MLC 3.0, I have been working on some other projects (you can view the projects I'm working on at http://bfr.ticalcs.net.  

Sprites Library is a library for 68k TI-BASIC programmers.  I programmed it using C (with http://tigcc.ticalc.org).  As of now, it only can display 8x8, 16x16, and 32x32 sprites in grayscale.  But in the future, I  want to imlement double-buffering, bitmaps of any size, and an on-calc sprite editor that generate the sprite data and can export it to a file.  The data for the sprites is stored in a simple text file.  Here is an example of what you can do now:

c1-->
CODE
ec1
spdata32("sprite","0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0xFF000000,
0x81000000, 0x81000000, 0x81000000, 0x81000000, 0x81000000, 0x810FE000, 0x81080000, 0xFF080000, 0x80000,
0x80000, 0x80000, 0xF8000, 0x80000, 0x80400, 0x807F0, 0x80400, 0x80400, 0x400, 0x400, 0x400, 0x400, 0x0,
0x0,0x0,0x0")
sprite32(1,3,20,"sprite","normal","xor")
c2
ec2

Here's an example of what I hope will be possible in the future:

c1
-->
CODE
ec1
loadsp("sprite","0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0xFF000000,
0x81000000, 0x81000000, 0x81000000, 0x81000000, 0x81000000, 0x810FE000, 0x81080000, 0xFF080000, 0x80000,
0x80000, 0x80000, 0xF8000, 0x80000, 0x80400, 0x807F0, 0x80400, 0x80400, 0x400, 0x400, 0x400, 0x400, 0x0,
0x0,0x0,0x0")
loadpl("cpy")
scrncopy("light","cpy")
sprite32(1,3,20,"sprite","cpy","xor")
c2
ec2

Or something like that.  You can download versions of Sprites Library http://www.savefile.com/projects.php?pid=430839.  In case you're wondering where beta 1 is, I hosted it somewhere else, before I started using savefile I think.  I completely changed the code, and released an alpha version of the new code.  Beta 2 is the beta version of the new code.  I'd appreciate constructive questions, comments, bug reports, etc.

EDIT:  I kind of messed up the readme.  In the table of contents, it lists a "Credits" section, but I forgot to make the "Credits" section >.<.  I guess I'll fix that in beta 3....
Title: Sprites Library
Post by: tifreak on June 13, 2006, 07:48:00 am
Looking good! I am sure programmers in the future will find this program handy.

I am thinking about making a sprite designer program, to go along with my hex-2-sprite program. One of these days I will get around to making it...
Title: Sprites Library
Post by: DJ Omnimaga on June 13, 2006, 08:33:00 am
wow cool if I had 68k calc I would use it for sure
Title: Sprites Library
Post by: saubue on June 13, 2006, 09:11:00 am
Yeah, this sounds good, I think many BASIC programmers could use this.
Title: Sprites Library
Post by: DJ Omnimaga on June 13, 2006, 09:16:00 am
will it be able to draw maps like xlib?
Title: Sprites Library
Post by: bfr on June 13, 2006, 09:34:00 am
Well, not yet, but that's a good idea.   :)smile.gif  I'll have to implement it.

EDIT:  Sprites Library 1.0.0 Beta 3 finished!  You download it, along with some other versions, ? http://www.savefile.com/projects/430839.  Beta 3 has double-buffering  B)cool.gif .  I also put Omnimaga in the credits for being supportive :)smile.gif

EDIT:  I finished beta 4.  I noticed a problem with scrncopy because it didn't really work with grayscale.
Title: Sprites Library
Post by: Dragon__lance on June 13, 2006, 02:20:00 pm
Sweet Progress :thumb:thumb.gif too bad i don't own a 89 though... :(sad.gif