Omnimaga

Calculator Community => TI Calculators => TI-BASIC => Topic started by: misirlou on February 06, 2007, 01:53:00 pm

Title: storepic in xlib
Post by: misirlou on February 06, 2007, 01:53:00 pm
im trying to save my tilemap as a pic in order to make the walking routine faster, but when i put

real(9,0,100

it erases the map before it stores the pic, so it just stores a blank screen into pic 100. Why does this happen and can i fix it?
Title: storepic in xlib
Post by: trevmeister66 on February 06, 2007, 04:37:00 pm
hmm, you could just store the pic into normal ti-pic (Pic-Pic9), and then recall it using real(2,Pic#,etc.etc.etc.
That's how i use it.
Title: storepic in xlib
Post by: Floodkiller on February 07, 2007, 04:38:00 am
Actually, I think I am running into the same problem.

The thing might be, now that I think of it, is that the program has problems when storing the first pic that you make.  Everything else I tried so far has failed except saving text to a pic.

One suggestion (that I might try as well), is to save and delete a dummy pic first, then save your real pic after it.  I don't know if that will work though.

Edit: Tried it with my own program.  Works like a charm!
c1-->
CODE
ec1:StorePic 1:DelVar Pic1
:real(9,0,100c2
ec2
I think.
Title: storepic in xlib
Post by: misirlou on February 15, 2007, 10:22:00 am
your method also works for these too, but this seems to be happening with other xlib functions. For example, if i display some sprites, then  underneath them display some text, it deletes the sprites. Maybe it has something to do with the fact that the tilemap and the sprites are recalled when I'm on the homescreen? I thought x-lib would automatically switch to the graphscreen when I displayed something, but i guess not.
Title: storepic in xlib
Post by: Harrierfalcon on February 15, 2007, 11:04:00 am
I think it has something to do with the difference of the graphscreen and the graph buffer/LCD that xLIB uses.  Try drawing a sprite with xLIB, then Pause, and then draw a line on the graphscreen.
Title: storepic in xlib
Post by: lolje on April 29, 2007, 01:35:00 am
Do it this way:

QUOTE

:real(12,1,0,63,95,63
Title: storepic in xlib
Post by: dinhotheone on April 29, 2007, 02:49:00 am
i had that problem, idk if you guys did the same thing as me, i forgot to update the graphscreen, that was my problem, though it sounds like thats not your problem...