As KermMartian suggested me yesterday, I propose you my last project named SPRITES Very Happy
( Available here : )

I've just translated the file "instructions.txt" (hope my old-school-english 's not too bad!)

First of all, the installation...Just transmit these 6 files :


The SPRITES project v3.2 (for TI83PCE/TI84+CE) is composed of 6 functions, written in ASM, executables from the TI-OS :

1) SETTINGS ,situated in the beginning of your Basic program, initialises the routines, memorises the Status Bar, clears the screen in black, goes to 256-color-mode (8bpp).

If you write the string "+" just before it, that will force to stay in 16bpp mode
(useful for debugging an error in your Basic program!).

inside your program:


or just before launching your program DEMO:


2) CLSCREEN allows you to clear (part of) screen, using one of 256 colors
(see 256_colors.png).


clears the whole screen in white.


Displays at least one filled rectangle starting at (x,y) position (top left corner).
You'll notice that chaining of parameters is possible.

allows you to modify/re-initialise the standard 36-color-palette
(see Palette_36colors.png)


changes the first colors of the palette (modifying all the palette is possible)

0:Asm(prgmPALETTE ou "":Asm(prgmPALETTE ...(well, everything but a list!)
re-initialise the standard palette.

4) SPRITE allows you to define/display a Sprite.

When defining, you'll have to mention respectively:
-its number (0 to ...),
-its width (1 to 35),
-its height (1 to 35),
-its zooming (x1 to x7),
-then pixels data...

As we need to put values higher than 9, we'll use the base 36 (values between 0 and Z ,eg A=10, B=11....Z=35)

For example:


define the Sprite number 0 (=000), which size will be 12x3 (=C3), and zoom x5 (=5)

IMPORTANT: : the sprites always have to be defined increasingly : 0,1,2....
Plus, when defining sprite "000", this also (re)set the Sprites Data !

76800 are available for storing sprites (I guess that will be enough)
One sprite = 2+(width*height)*zoom^2 bytes, we can store up to 62 sprites 35x35 , zoom x1 Smile

When displaying, a chaining of several sprites parameters is possible:

For example:


will display the sprite #0, coordinates (100,200) , also the sprite #1 , coordinates (0,0) ( =top left corner of screen) .

5) PRINT allows you to set the displaying mode (graphical position, color/background color (0 to 256), size of characters )
Also allows to display characters (text, variables,...)
Of course, the minus are availables thanks to a double [alpha] key pressing.

For setting...



{x,y,color,background color:Asm(prgmPRINT
{x,y,color,background color,zoom-width,zoom-height:Asm(prgmPRINT

And for displaying...

"Hello world":Asm(prgmPRINT

If you want to "return & go to next line", just put an "i" by pressing [2nd] [.]

"Hello!iEverything's fine?":Asm(prgmPRINT

will display...

Everything's fine?

Let's mention that PRINT will be more accurate :


will display 3.1415926535898 instead of usual 3.141592654

By the way, DO NOT FORGET to use the instruction DEC !
...Or else ,

will display 1

Be careful to put DEC,FLOAT, MATHPRINT, CLASSIC,...Before Asm(prgmSETTINGS !
Simply because these instructions could modify the Status Bar

6) BACKHOME allows a safe return to the TI-OS :
-clear all Data, converts final screen (and goes back) to 16bpp mode, then finally restore the Status Bar


If you want not to restore the Status Bar (useful for screenshots!)
just write the string "NSB" (No Status Bar)


IMPORTANT, in order not to annoy your dear Calculator:

-SETTINGS must be in the beginning of your program ( 'cause it initialises things...)
-Always define sprites increasingly (from number 0...)
-obviously NEVER try to display an inexistant Sprite!
-I recommend not to display outside the screen
-no more use of display functions: Output,ClrHome,ClrDraw,Text, Line,Pxl-on,Pt-on...

Voilà! I hope that this tool will be useful for your creations.
Have lots of fun ! And good programming !

I give Thanks to Epharius, DjOmnimaga, Diolum (tip "minuscules"), DrDnar (trick "faster/fastest") and others for their advices , testings, tips and inforrmations !!

-Gérald aka grosged (june 2016)

PS: Please don't hesitate, in case of bugs , tell me, thanks Wink

I must add that despite using Asm(prgmNAME) instead of parser hooks, this lib runs very fast compared to Codex, Zapi, ZSprite, xLIB v0.1a and v0.3a, because of chained commands. What I like the most, though, is that displaying a sprite only requires 3 arguments.
Update : now version 3.3 !
A few optimisations here & there (see the 1st page of this topic for more informations)
Wow, that's actually pretty cool. Did you make that font or was it already part of TI-OS?
The font was from the Amstrad CPC computers from the 80's. I agree that it looks cool Smile (plus you can zoom it in both directions)
Sprites for BASIC (v3.31) now available thru ticalc Smile
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum