How do I display a sprite?!?
Here is what I want to do...
"FF80BB9293929280"→Str0
I want this at (0,0)
Hi DarkBlade, and welcome to the forums. You don't say which calc and libraries you are using, so I'm going to just assume monochrome (83+, 83+SE, 84+, or 84+SE), and assume that since you have some hex data in there that you're using DCS and the libraries that come with it.

To display a hex sprite as a specific location, you'll want to use PutSprite. So in your example, it'll be:
identity(5,"FF80BB9293929280",0,0,1,8,3,0,1)

There are lots of useful libs, so make sure to check out this page:
http://dcs.cemetech.net/index.php/Third-Party_BASIC_Libraries

If any of my assumptions are wrong, let me know! And don't hesitate to ask more questions.
assuming you are using the DCS sprite routines (which are amazingly awesome!), then your best bet is the PicArc's PutSprite Routine.

for your specific sprite, you would get this:

Code:

:identity(5,"FF80BB9293929280",0,0,1,8,0,0,1)
DarkBlade wrote:
How do I display a sprite?!?
Here is what I want to do...
"FF80BB9293929280"→Str0
I want this at (0,0)


If you want one other way to do it, you could draw the sprite on a pic, store the pic, and use real(1,x cord, y cord, width, height, pic, pic x, pic y, method, flip, ulcd)
Else, a pure BASIC (no lib) way to do it would be to draw two text characters on top of each others with one being offset one pixel to the right (for example Text(-1,0,1,"L":StorePic 0:Text(-1,0,0,"X":RecallPic 0:StorePic 0), which can also give decent results.



Of course, for faster results libs are generally prefered, though. (although it's larger)
  
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

 

Advertisement