Author Topic: Storing Pics  (Read 19605 times)

0 Members and 2 Guests are viewing this topic.

Offline parserp

  • Hero Extraordinaire
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1455
  • Rating: +88/-7
  • The King Has Returned
    • View Profile
Re: Storing Pics
« Reply #15 on: October 21, 2011, 10:45:31 pm »
I believe it's possible. maybe if you store "appv" to a string and the name into other string and concentrate it, it would work.
I think I get the idea, but could you put that in code please?

EDIT: new page!
« Last Edit: October 21, 2011, 10:45:42 pm by parser padwan »

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Storing Pics
« Reply #16 on: October 21, 2011, 11:15:03 pm »
If you don't understand some of the Asm stuff, just skip it. ;)
I don't understand any of it... ???
can anyone answer my first question?
Alright, I'll try my best to explain how to do it without writing it for you. ;)

First you have to create the variable.  This is done with GetCalc(PTR,SIZE).  SIZE will almost* always 756 bytes, as it's 63*12.  The pointer will point to some information like this:
7,96,Picture Number (Pic1 is 0, Pic2 is 1, ... Pic0 is 10),0
This is [0760##00] in hex.

GetCalc will return a pointer to the new file.  You then have to fill the file with data.  The 756 bytes are all the picture info.  You can just copy 756 bytes from the main buffer (L6) into it if you want.

This is the basic premise.  I'm not 100% sure this will work - I've never done this in Axe before, but I know I'm on the right track.  Good luck getting this to work - if it doesn't, let me know, and I'll try and figure out what I screwed up. :P

P.S.  You know how I kept saying "almost*"?  Well, that's because you can have different sized pictures, but they may cause unpredictable behavior. :P  Edit: After talking to Runer I found out that he recommends making it 768 bytes and then being able to copy the whole buffer.
« Last Edit: October 21, 2011, 11:24:02 pm by ztrumpet »

Offline parserp

  • Hero Extraordinaire
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1455
  • Rating: +88/-7
  • The King Has Returned
    • View Profile
Re: Storing Pics
« Reply #17 on: October 21, 2011, 11:25:53 pm »
If you don't understand some of the Asm stuff, just skip it. ;)
I don't understand any of it... ???
can anyone answer my first question?
Alright, I'll try my best to explain how to do it without writing it for you. ;)

First you have to create the variable.  This is done with GetCalc(PTR,SIZE).  SIZE will almost* always 756 bytes, as it's 63*12.  The pointer will point to some information like this:
7,96,Picture Number (Pic1 is 0, Pic2 is 1, ... Pic0 is 10),0
This is [0760##00] in hex.

GetCalc will return a pointer to the new file.  You then have to fill the file with data.  The 756 bytes are all the picture info.  You can just copy 756 bytes from the main buffer (L6) into it if you want.

This is the basic premise.  I'm not 100% sure this will work - I've never done this in Axe before, but I know I'm on the right track.  Good luck getting this to work - if it doesn't, let me know, and I'll try and figure out what I screwed up. :P

P.S.  You know how I kept saying "almost*"?  Well, that's because you can have different sized pictures, but they may cause unpredictable behavior. :P  Edit: After talking to Runer I found out that he recommends making it 768 bytes and then being able to copy the whole buffer.
ooh I get it now... now all I need is to find out how to input strings...
« Last Edit: October 21, 2011, 11:26:22 pm by parser padwan »

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Storing Pics
« Reply #18 on: October 21, 2011, 11:26:54 pm »
now all I need is to find out how to input strings...

Here's how I do it: http://ourl.ca/4129/122465

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Storing Pics
« Reply #19 on: October 21, 2011, 11:27:24 pm »
appvars will be a better choice to store pics because you can store more than one in appvar! XD
Code: [Select]
GetCalc("appvWHATEVER",768*number_of_pictures)->A
[Pic1]->Str1
[Pic2]->Str2 . . . etc
Copy(Str1,A,768)
Copy(Str2,A+768,768) . . . etc
« Last Edit: October 21, 2011, 11:28:11 pm by yeongJIN_COOL »
Sig wipe!

Offline parserp

  • Hero Extraordinaire
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1455
  • Rating: +88/-7
  • The King Has Returned
    • View Profile
Re: Storing Pics
« Reply #20 on: October 26, 2011, 05:43:50 pm »
Ok, so I have yet another question.  ;)
so I have a moving charector in a game, and I want to be able to press a key and have his coordinates stored in a REAL variable (as in the ones on the calc)
How would I do that?  ???

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Storing Pics
« Reply #21 on: October 26, 2011, 05:45:40 pm »
GetCalc("varA"->D       //Calls Variable A from OS
float{D}->A               //Store it into Axe var A
Repeat getKey(Whatever)
.....
End
A->float{D}               //After you're done messing with Axe var A, store it back into OS A.
Sig wipe!

Offline parserp

  • Hero Extraordinaire
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1455
  • Rating: +88/-7
  • The King Has Returned
    • View Profile
Re: Storing Pics
« Reply #22 on: October 26, 2011, 06:05:22 pm »
hmmm... I can't get that to work.
Here's the smidgin of code that doesn't work:
Code: [Select]
:.players position is (X,Y)
:If getKey(53)
:GetCalc("varA")->D
:GetCalc("carB")->E
:X->A
:Y->B
:A->float{D}
:B->float{E}
:End

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Storing Pics
« Reply #23 on: October 26, 2011, 06:07:34 pm »
what error does it gives you?
also, you must have something stored in OS var D and E I think.
Sig wipe!

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Storing Pics
« Reply #24 on: October 26, 2011, 06:08:52 pm »
GetCalc("varA")→D

Edit: I got double ninja'd O_o
« Last Edit: October 26, 2011, 06:09:12 pm by calc84maniac »
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Storing Pics
« Reply #25 on: October 26, 2011, 06:09:25 pm »
I hope he really didn't typed "->" instead of →
D:
Sig wipe!

Offline parserp

  • Hero Extraordinaire
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1455
  • Rating: +88/-7
  • The King Has Returned
    • View Profile
Re: Storing Pics
« Reply #26 on: October 26, 2011, 06:10:51 pm »
It compiles perfectly well, but when I do that and exit the program, it doesn't change the values of the variables to what it should be.
EDIT: tried deleting vars first and it still didn't work.
« Last Edit: October 26, 2011, 06:11:38 pm by parser padwan »

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Storing Pics
« Reply #27 on: October 26, 2011, 06:11:50 pm »
do you happen to use number >9999 ?
Sig wipe!

Offline parserp

  • Hero Extraordinaire
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1455
  • Rating: +88/-7
  • The King Has Returned
    • View Profile
Re: Storing Pics
« Reply #28 on: October 26, 2011, 06:12:59 pm »
Nope. I had the player at position (1,1) and it didn't work.

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Storing Pics
« Reply #29 on: October 26, 2011, 07:27:55 pm »
Are you using the latest Axe version?  Some older versions referenced floats incorrectly due to overcompensating for the size field.
___Axe_Parser___
Today the calculator, tomorrow the world!