Omnimaga
Calculator Community => TI Calculators => Axe => Topic started by: parserp on October 21, 2011, 03:07:22 pm
-
Ok, so here's my question:
If I have something displayed on the graph screen in axe, and then I want to be able to press a key and store it as a REAL picture, not an appvar, how would I go about doing that?
Second question:
How would I store the pic into an appvar and then recall it in a different program?
(ok so 2 questions :P)
-
2nd question:
To Store Pic in appvar:
GetCalc("appvBLAH",768)→A //appvBLAH created and stored into pointer A
[Pic1]→B //Pic1 in OS Stored into pointer B
Copy(B,A,768) //Copies Pic1 into appvBLAH
to call it.
Getcalc("appvBLAH")→A //Call appvBLAH from OS and stores it into pointer A
To display that Picture after you call it:
Copy(A,L6,768
-
to call it.
Getcalc("appvBLAH")→A //Call appvBLAH from OS and stores it into pointer A
To display that Picture after you call it:
Copy(A,L6,768
And to call it from archive instead of having the appvar unarchived, you do
Getcalc("appvBLAH",Y0)
Copy(A,Y0,768
And if it doesn't work, replace "Copy(A,Y0,768" by
For(r1,0,767
{Y0+r1}→L6+r1
End
-
2nd question:
To Store Pic in appvar:
GetCalc("appvBLAH",768)→A //appvBLAH created and stored into pointer A
[Pic1]→B //Pic1 in OS Stored into pointer B
Copy(B,A,768) //Copies Pic1 into appvBLAH
to call it.
Getcalc("appvBLAH")→A //Call appvBLAH from OS and stores it into pointer A
To display that Picture after you call it:
Copy(A,L6,768
Ooh I get it now XD
now for the 1st question...
-
to call it.
Getcalc("appvBLAH")→A //Call appvBLAH from OS and stores it into pointer A
To display that Picture after you call it:
Copy(A,L6,768
And to call it from archive instead of having the appvar unarchived, you do
Getcalc("appvBLAH",Y0)
Copy(A,Y0,768
And if it doesn't work, replace "Copy(A,Y0,768" by
For(r1,0,767
{Y0+r1}→L6+r1
End
That second part is wrong. It should be:
{Y0+r1}→{L6+r1}
-
This should give you a lot of insight into how to make the first question's answer work: http://eeems.omnimaga.org/Files/Resources/Tutorials/ASMin28Days/lesson/day19.html and http://eeems.omnimaga.org/Files/Resources/Tutorials/ASMin28Days/lesson/day24.html
If you don't understand some of the Asm stuff, just skip it. ;)
-
Same link...
-
Nevermind. The end was cut off. I tried to edit my last post so its not double posting, but there is no modify or edit button. Theres only a little checkbox.
-
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?
-
you could do this:
prgmSOMETHNG //TI-BASIC PROGRAM
Asm(prgmAXEPROGRAMTHATDISPLAYSPICTUREINGRAPHSCREEN
StorePic 1
Easy getaround. No assembly required XD
-
Just do this Copy(L₆,GetCalc("Pic1",756),756) :)
-
ooh thanks it works now... ;D
EDIT: how would I input a name for the appvar?
It won't let me do
:inputStr1
-
I always wondered how to do that either XP
-
I always wondered how to do that either XP
so in other words you can't?
-
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 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!
-
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.
-
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...
-
now all I need is to find out how to input strings...
Here's how I do it: http://ourl.ca/4129/122465
-
appvars will be a better choice to store pics because you can store more than one in appvar! XD
GetCalc("appvWHATEVER",768*number_of_pictures)->A
[Pic1]->Str1
[Pic2]->Str2 . . . etc
Copy(Str1,A,768)
Copy(Str2,A+768,768) . . . etc
-
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? ???
-
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.
-
hmmm... I can't get that to work.
Here's the smidgin of code that doesn't work:
:.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
-
what error does it gives you?
also, you must have something stored in OS var D and E I think.
-
GetCalc("varA")→D
Edit: I got double ninja'd O_o
-
I hope he really didn't typed "->" instead of →
D:
-
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.
-
do you happen to use number >9999 ?
-
Nope. I had the player at position (1,1) and it didn't work.
-
Are you using the latest Axe version? Some older versions referenced floats incorrectly due to overcompensating for the size field.
-
yupp, using 1.0.5b
EDIT: another new page!