Author Topic: storepic in xlib  (Read 4257 times)

0 Members and 1 Guest are viewing this topic.

misirlou

  • Guest
storepic in xlib
« 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?

Offline trevmeister66

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1009
  • Rating: +14/-5
    • View Profile
storepic in xlib
« Reply #1 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.
Projects:    nameless RPG: 1.0%  |  Reverse Snake v1.5: 100%  |  Secret Project: 5%  |  DUNGEON: 70%

My MW2 Blog <-- Please visit :)

Floodkiller

  • Guest
storepic in xlib
« Reply #2 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.

misirlou

  • Guest
storepic in xlib
« Reply #3 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.

Harrierfalcon

  • Guest
storepic in xlib
« Reply #4 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.

Offline lolje

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 299
  • Rating: +2/-0
    • View Profile
storepic in xlib
« Reply #5 on: April 29, 2007, 01:35:00 am »
Do it this way:

QUOTE

:real(12,1,0,63,95,63
83+/84+ xLIB projects
Age of culture II (~89%)

Contact: [email protected]

Offline dinhotheone

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 410
  • Rating: +2/-1
    • View Profile
storepic in xlib
« Reply #6 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...