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?
The simples method is do in on a computer (with SourceCoder ) and transfer that to the calculator. The other method is something like this:
Code:
(See also this link for inserting lines in an appvar)
EDIT: this is for data, not for images/sprites etc
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
- 100003493
- Advanced Newbie (Posts: 62)
- 21 Apr 2015 11:31:02 am
- Last edited by 100003493 on 21 Apr 2015 11:33:43 am; edited 1 time in total
Wait, what kind of data?
So it doesn't display sprites or images?
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.
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
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
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.
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.
There are quite a few things Celtic II can do with AppVars.
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
» 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
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