Omnimaga
Calculator Community => TI Calculators => TI-BASIC => Topic started by: Blue72 on September 23, 2011, 05:56:39 pm
-
So I've found that the Text( command spaces are excellent for erasing sprites, but on some people's calculators it seems to erase one pixel below the space as well.
The TI-Basic Developer wiki says this:
"On the TI-84+ and TI-84+ SE, the Text( command may also erase a single row of pixels underneath the text: whether this occurs or not depends on whether it was the menu screen or the table that was visited last, of the two."
This is very vague to me, and I don't understand what "the menu" refers to, since it clearly isn't the homescreen. Anyone have insight?
-
It means the Mode menu, if a calculator visits the mode menu, a flag is set that makes text erase the pixels beneath it. Visiting a menu such as the table selection, or the metrix editor resets the flag. On the newest OS however, there is no way to reset the flag, which can be annoying to games that rely on the text not having the erasing underneath.
-
It means the Mode menu, if a calculator visits the mode menu, a flag is set that makes text erase the pixels beneath it. Visiting a menu such as the table selection, or the metrix editor resets the flag. On the newest OS however, there is no way to reset the flag, which can be annoying to games that rely on the text not having the erasing underneath.
Yeah I hate that XP
-
That's why you draw tilemaps from the bottom up.
Oh wait... the other thing.. that DOES suck!!
-
Grrr... Can someone think of a different or better way to erase 6x6 sprites? I used to do it with lines before I though of the Text( way, but the speed benefits are such that I would find it hard to return.
-
Pxl-Off?
or install xLib or DCS7 and run:
real(12,7,A,B,A+5,B+5), where A and B is X and Y coordinate accordingly
-
Courtesy of ztrumpet in his Vertical Text Sprites topic:
Edit: After I wrote this, TI released OS 2.53 MP. It messes with the flag so you can't reset it with G-T. Instead, you must use a small Asm program with this hex code: FDCB058EC9 However, on the old (read: better) OSes you can use G-T.
-
I'll try that, but I'm curious as to whether Pxl-Off( would be faster than lines. Logic suggest to me that it would be both slower and larger, but am I incorrect?
-
you're correct, but it's one of the way XP
Probably using that hexcode will help you a bunch though.
-
Maybe I'm crazy, but I want this game to be only one program and only BASIC... I'll learn Axe for my next project for sure though...
Is there really no better way to efficiently erase areas of the screen? Can I somehow check the flag and have it tell the user to go the Mode screen if it's wrong?
Also, is there a command to clear the Y= screen? It always messes stuff up when there are equations in there.
-
If you use Pt-Off(X,Y,3) you might be able to turn it off pretty quickly using only a few hardcoded commands
-
I think it would be better using Pt-Off(X,Y,2), if it were a cross then I wouldn't be able to get corners without overlapping.
Is it possible to read the flag? I don't really know anything about how that system works...
-
Oh whoops yeah i meant Pt-Off(X,Y,2) x.x I forgot which number was which :P And there is no direct way to read the flag, but you can test it by simply displaying a pixel, and then display a space above it, then detect if the pixel was erased or not
-
How do I test if it was changed?
-
Use pixel-test() to determine the color of the pixel
-
I suggest doing this:
Pt-Off(X+1,Y+1,2)
Pt-Off(X+1,Y+1)
Pt-Off(X+4,Y+1,2)
Pt-Off(X+4,Y+1)
Pt-Off(X+1,Y+4,2)
Pt-Off(X+1,Y+4)
Pt-Off(X+4,Y+4,2)
Pt-Off(X+4,Y+4)
It's not very elegant, but it's the best I can come up with.
If you can deal with it being 8 pixels long (but still 6 wide), I strongly recommend doing this:
Text(-1,Y,X," // One space
Good luck! :)
-
I do appreciate all of the suggestions, but I have decided to stick with the small spaces, and add an inconspicuous pixel under text on the start menu. It checks to see if it's there, and if not, it shows an error screen which explains that the user needs to open and close the table and restart the program. :)
-
I do appreciate all of the suggestions, but I have decided to stick with the small spaces, and add an inconspicuous pixel under text on the start menu. It checks to see if it's there, and if not, it shows an error screen which explains that the user needs to open and close the table and restart the program. :)
Remember that this won't work on the MP OSes (Because TI is lame).
However, if you still want to go through with it, use this code instead of exiting:
:G-T
:DispGraph
:Full
This will automatically display the table, so then you don't even have to exit the program.
-
How frustrating :P Ah well, I've decided to just display a warning instead that explains that it might have erasing bugs and then run the possible fix.