In my contest entry, I use Y and X to tell me the cursor location, but I am having a problem with Y being reset. This occurs in the program to build a tower. I have pinpointed it to when it calls a program to display the tower sprite (loads hex data than uses TIfreak's hex2sprite to display). When I run the program by itself Y is not reset to 0, but when I run through the other programs it is Shock .

Also, there is absolutely NOTHING that modifies Y. Does this have something to do with the graphscreen? Confused (I remember reading somewhere that TI-OS uses the X and Y for some of its graph screen stuff)




P.S. I used a bunch of PAUSE Y commands to pinpoint it
It does have something to do with the graphscreen. I forget this too. Whenever the graphscreen is used, the X and Y variables may be reset. So play it safe and use other variables. I remembered about this when I was getting a Error:Dim on a matrix and found the Y variable used on the matrix was being changed using the graphscreen.
Never use Y for important data if you're using the graphscreen. I've discovered this as well; Y always gets reset to zero, even if all you've done is a ClrDraw. I usually use X and Z or A and B instead of X and Y.
>.< Dangit, I think I might change the current Z to the finance app N and use that instead. You would think TI would be smart enough to change this...
KermMartian wrote:
Never use Y for important data if you're using the graphscreen. I've discovered this as well; Y always gets reset to zero, even if all you've done is a ClrDraw. I usually use X and Z or A and B instead of X and Y.


only partially correct, draw a point offscreen after a ClrDraw or do any drawing command at all and then set X and Y.

also, if you are not graphing functions based on X and Y (aka POLAR mode) then they dont get reset.
elfprince13 wrote:
KermMartian wrote:
Never use Y for important data if you're using the graphscreen. I've discovered this as well; Y always gets reset to zero, even if all you've done is a ClrDraw. I usually use X and Z or A and B instead of X and Y.


only partially correct, draw a point offscreen after a ClrDraw or do any drawing command at all and then set X and Y.


yeah, but still not wise to use y. I wonder why only y is affected and not x?
well yeah, of course, but then if you clrdraw again Y gets reset again.
Harq wrote:
elfprince13 wrote:
KermMartian wrote:
Never use Y for important data if you're using the graphscreen. I've discovered this as well; Y always gets reset to zero, even if all you've done is a ClrDraw. I usually use X and Z or A and B instead of X and Y.


only partially correct, draw a point offscreen after a ClrDraw or do any drawing command at all and then set X and Y.


yeah, but still not wise to use y. I wonder why only y is affected and not x?


I think this is mainly because the value of y is calculated based on each different value of x. So, TI probably just uses some other machine iterator to go over the x value for each pixel, which is probably faster than actually using x. This may not be the reason, but it is probably something like this...

Yeah, I agree that TI shouldn't use y in their drawing/graphing commands.

Also, has anyone tried the new OS 2.41 (or whatever)?
About OS 2.41, I assume this is the OS released for the 84+ not too long ago. After hearing what everyone else said, I decided to stay with my current OS. It seems the only thing they added was that lock thing for teachers.
Same here, I do not want my calc locked. Neutral
Hey, just some fancy luck, but if you want, here's some stuff about OS versions.
http://www.detachedsolutions.com/forum/m/33733/#msg_33733
Mmm, interesting data. They should compile that formally somewhere./
I have not looked at that yet... I still need to install openoffice. Better do that...
  
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 1
» 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