heey, i'm new to the hybrid functions of the TI-84 PLUS C Silver Edition like real(6, etc. But seriously, i don't understand the "DrawString" function. Example: i wanted to show the "!" on (40,30) on the screen. How could i do that?
What have you tried thus far, PT_? What happened when you tried? I ask only so that we can help lead you towards discovering the answer yourself rather than just giving you the answer, which would be a less valuable learning experience.
oke thank you
i have made something like this:


Code:
"33"
real(6,0,50,50,100,0,1)


but then it only displays "33" and not a "!" or something else
Well, that real( function displays whatever is in a string. So since you only have "33" it is only going to display 33. If you want it to display more, you have to lengthen your string.
yeah, but what?
The '!' character is available in the TIOS by pressing MATH and then looking under the PROB menu.

The DrawString function will display any string that is in ANS. If you do something like "33, then you are storing the string "33" in ANS and thus that's what gets displayed.

Here is some example code for you to try:

Quote:
real(0,1,1,0
real(0,3,4,255,1
real(0,3,4,255,0
"TEST!!
real(6,0,8,8,192,0,1
Pause
real(0,1,0,1


Where:

real(0,1,1,0 = set LCD mode to half res, this is required by xLIBC graphics commands

real(0,3,4,255,1
real(0,3,4,255,0 = fill BOTH sides of the LCD with white (effectively clear screen)

"TEST!!
real(6,0,8,8,192,0,1 = write the string "TEST!!" at x,y location 8,8 in RED (also update LCD so that it is visible)

Pause
real(0,1,0,1 = pause program and restore LCD mode upon exit.
oke thank you very much!
pls can you give me a very simple example where you draw a simple sprite like

00011000
00111100
01111110
11111111
11111111
01111110
00111100
00011000

where 0 is nothing and 1 = a black square
Sprites are usually drawn on a PC and transferred across in APPVARS. There is some information about it on the wiki: http://dcs.cemetech.net/index.php/DCSE:BasicLibs:DrawSprite

To actually draw the sprites i strongly recommend a project by Merthsoft called TokenIDE, which can be found here: http://www.cemetech.net/forum/viewtopic.php?t=10098&start=0

I also created an example program that also demonstrates key input and movement in this thread (with example download as well): http://www.cemetech.net/forum/viewtopic.php?p=226698#226698
hmm i wanted to create a sprite but that wasn't good :%.
i have did it once, with a black box, but seriously, i didn't know how i did that Surprised . I've already downloaded your example - very interesting - but not the appvars
can you give me a video or something else?
  
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