To avoid the wasting of my picture variables, I made an Axe program that I was hoping would recall the image and allow it to stay on-screen. It (prgmVZWHSCRN) is called from within prgmVZW, and then returns to prgmVZW after it draws to the screen. However, it is either that when it returns, the image vanishes, or that the image never displays. I cannot tell which.

If there are any people who have experience with Axe, I am kindly asking them if they are able to assist me with this.

For those who would normally question what I'm doing, I decided to compete with a friend who is very good with TI-BASIC to make a pseudo-cell phone program. We are judging by speed, size, variables used, and useful features. I am hoping more for speed than size (he would almost definitely use the internal draw functions for graphics), so I am using Axe to display the images, despite having no experience with Axe.

Programs:

VZW: http://sc.cemetech.net/?xpi=730539a8cf990d785459bd471082cf4f
HSCRNSRC (Source for VZWHSCRN): http://sc.cemetech.net/?xpi=e60c6422c0dd7541ffe12834ea3ad753
iirc, when you do Ptr->DispGraph, it copies directly to the screen, rather then to the buffer where you can do things with it in Basic. The way I would write VZWHSCRN is:
Code:
[Pic4]->Pic1
For(A,0,768
{Pic1+A}->{L6+A}
End
DispGraph
That should work. If it doesn't I'd like to hear back Smile
You mentioned in IRC that my code doesn't work, what qualifies it as not working?
_player1537 wrote:
You mentioned in IRC that my code doesn't work, what qualifies it as not working?
He's gone for the night; hopefully he'll return tomorrow to see your answer. Smile
Ah, okay. Thanks, Kerm Smile
_player1537 wrote:
Ah, okay. Thanks, Kerm Smile
Any time. To continue the clerical meta-discussion, he returned later this evening, and I pointed him to this thread, but I guess he didn't notice your update.
Okay, so after falling asleep, waking up, and remembering to post on my thread, I can explain AND I have another question related to the same project.

1) It has the same result. Going back into the BASIC code makes it disappear.
2) Should I post my other question in a new thread? It's not Axe-related, but involves the same project.
@_player: The Copy() command is faster than manually copying bytes in a For() loop, iirc

@techno: I haven't looked at your code, but I think you are copying a picture to the graph buffer, right? That won't always work, as TI-Basic tends to clear the graph buffer often. :/
souvik1997 wrote:
@_player: The Copy() command is faster than manually copying bytes in a For() loop, iirc

@techno: I haven't looked at your code, but I think you are copying a picture to the graph buffer, right? That won't always work, as TI-Basic tends to clear the graph buffer often. :/


It is, but I am really bad about remembering the arguments... and I don't really want to <.< I still prefer just copying the bytes manually because it is easier to add different effects to it (AND, OR, or XOR), and because I still prefer the original Axe commands, rather than the new ones that do most of the work Razz
2) What's your other question? Is it stuff we've already resolved in your other thread?
KermMartian wrote:
2) What's your other question? Is it stuff we've already resolved in your other thread?

Yes it is. I decided that I would need to make a new thread because not everything would be *completely* relevant to this topic. Razz
technomonkey76 wrote:
KermMartian wrote:
2) What's your other question? Is it stuff we've already resolved in your other thread?

Yes it is. I decided that I would need to make a new thread because not everything would be *completely* relevant to this topic. Razz
Excellent, that was good thinking. How's the Axe side of things going, though; working smoothly?
KermMartian wrote:
technomonkey76 wrote:
KermMartian wrote:
2) What's your other question? Is it stuff we've already resolved in your other thread?

Yes it is. I decided that I would need to make a new thread because not everything would be *completely* relevant to this topic. Razz
Excellent, that was good thinking. How's the Axe side of things going, though; working smoothly?

In Axe, the image works just fine; when it goes back to BASIC, it disappears still. I'm considering trying to port the entire thing to Axe to avoid the issues with the images. How would one use the "input" command in Axe?
You would use it like

Code:

input->A

A now contains the pointer to the first byte returned from the input command. You can use *any variable*, not just A.
souvik1997 wrote:
You would use it like

Code:

input->A

A now contains the pointer to the first byte returned from the input command. You can use *any variable*, not just A.

Ah, okay. I'm starting to understand Axe much more now! Smile
I would like to point out that that command is really not the best for what you want. IIRC, it looks really unprofessional and returns stuff in a weird way. I would recommend writing your own input routine that only works with numbers, because that is all you would be using. It would also be cool if it added the hyphens and parenthesis ( (865)-555-1234 ) automatically and allowed you to delete a number. Your choice, though.
_player1537 wrote:
I would like to point out that that command is really not the best for what you want. IIRC, it looks really unprofessional and returns stuff in a weird way. I would recommend writing your own input routine that only works with numbers, because that is all you would be using. It would also be cool if it added the hyphens and parenthesis ( (865)-555-1234 ) automatically and allowed you to delete a number. Your choice, though.

So what would you recommend as to how I could do that? This is only my second day even TRYING Axe! Laughing
Use the getKey command for custom input, like you would do in TI Basic.
To clarify, getKey uses the same keycodes as the image in the Axe folder shows. Which happens to be getCSC codes and the ones xLib uses. Also, getKey only allows you to press one key at a time, and doesn't repeat. If you want to make a game with key input, you use getKey(CSC-Code), which will return 1 if that key is pressed and 0 otherwise. You also can't do:
Code:
For(A,1,100
getKey(A)
End
because getKey() evaluates the code it needs at compile time.
Okay, so I would like to know if I'm getting this even *remotely* correct:

Code:
:.VZWPHONE Pseudo-Phone!
:[Pic4]→Pic1
:"Dial: "→Str1
:"0123456789"→Str2
:DiagnosticOff
:Full
:Pic1→DispGraphClrDraw
:Lbl A
:getKey{^r}→K
:If K=9
:Return
:End
:If K=50
:Disp Str1►Frac
:0→K
:0→I
:Repeat K=5
:getKey{^r}→K
:If K=142
:Disp Str2►Frac
:Str2→{L1}
:I+1→I
:End
:If K=143
:Disp {Str2+1}►Frac
:{Str2+1}→{{L1}+I}
:I+1→I
:End
:If K=144
:Disp {Str2+2}►Frac
:{Str2+2}→{{L1}+I}
:I+1→I
:End
:If K=145
:Disp {Str2+3}►Frac
:{Str2+3}→({L1}+I}
:I+1→I
:End
:If K=146
:Disp {Str2+4}►Frac
:{Str2+4}→{{L1}+I}
:I+1→I
:End
:If K=147
:Disp {Str2+5}►Frac
:{Str2+5}→{{L1}+I}
:I+1→I
:End
:If K=148
:Disp {Str2+6}►Frac
:{Str2+6}→{{L1}+I}
:I+1→I
:End
:If K=149
:Disp {Str2+7}►Frac
:{Str2+7}→{{L1}+I}
:I+1→I
:End
:If K=150
:Disp {Str2+8}►Frac
:{Str2+8}→{{L1}+I}
:I+1→I
:End
:If K=151
:Disp {Str2+9}►Frac
:{Str2+9}→{{L1}+9}
:I+1→I
:End
:If K=9
:Return
:End
:Disp {L1}►Frac
:End
:Goto A

(Where ►Frac=►Char)
It won't compile, but I would like to know how I can get even this part functional. Please keep in mind that I'm a total Axe n00b. Smile
  
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 2
» 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