Hey, I'm a noob programmer and I have recently begun programming in Xlibc and I need to know how to create an app var. I'll appreciate any help you can give thanks.
Do you want to create a blank AppVar within your program, then use the Celtic 2 CSE commands to manipulate the contents of the AppVar? Or are you asking how to create an AppVar containing sprites or background images that you can use with the xLIBC commands?
I'm wondering how I can create an app var containing map data that I can use later in xlibc.
The simples method is do in on a computer (with SourceCoder Wink) and transfer that to the calculator. The other method is something like this:

Code:

"rowSwap(APPVAR->Str0              // Name of appvar, with rowSwap, so that is in an appvar, not a program
det(4                              // Create appvar/program
"UPLOAD DATA HERE..........->Str9     // Data to write in the appvar
1                                   // Line number where the data must be stored
det(2                             // Insert line

(See also this link for inserting lines in an appvar)

EDIT: this is for data, not for images/sprites etc Confused
Oh sweet, thanks PT_ that's exactly what I needed! I really appreciate your help!😀
Wait, what kind of data?
So it doesn't display sprites or images?
Only data that can be normally stored in strings. This is like text, symbols, but as I said not images/backgrounds/sprites etc. What would you use?

For images etc, you must use TokenIDE where you can create, edit and save them.
Map data for xLIBC is pretty specific. TokenIDE has a map editor which can insert/edit strings from an appvar. It also supports the image formats so you can create sprite sheets etc.

Additionally, please don't double post within 24 hours. We prefer if you edit your post instead. Not a big deal, just wanted to let you know Smile
Okay, well do you know how to create custom sprites and/or images and then display them?
Yes. If you're using xLIBC, you can use TokenIDE (linked in my previous post) to create the sprite sheet, and the various DrawSprite functions. There's also the Celtic II BufSprite function which will draw a sprite with a different format, also supported by TokenIDE.
Okay thanks! BTW can you make the sprite sheet directly on the calculator, or do you absolutely need to make the sprite sheet in TokenIDE?
As far as I know, no one has made an on-calc tool that can generate an xLIBC sprite-sheet. I usually make it in Paint.NET (insert your favorite image editor here, of course) and then import it from TokenIDE. TokenIDE has some nice image editing tools, but it's not as fully-featured as an actual image editor.
Okay thanks! Also, is the tile map making process also done in TokenIDE or is it done in some other computer program?
Yup, per my earlier post:
merthsoft wrote:
TokenIDE has a map editor which can insert/edit strings from an appvar.
Sweet thanks, that's all I needed to know for now.
Can celtic II edit app vars?
You should refer to the documentation: http://dcs.cemetech.net/index.php/Third-Party_BASIC_Libraries_%28Color%29

There are quite a few things Celtic II can do with AppVars.
Okay.
  
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