Author Topic: Text Command Erasing Pixels  (Read 6341 times)

0 Members and 1 Guest are viewing this topic.

Offline Blue72

  • LV2 Member (Next: 40)
  • **
  • Posts: 20
  • Rating: +3/-0
    • View Profile
Text Command Erasing Pixels
« 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?
« Last Edit: September 23, 2011, 06:00:25 pm by Blue72 »

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Text Command Erasing Pixels
« Reply #1 on: September 23, 2011, 06:07:06 pm »
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.

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Text Command Erasing Pixels
« Reply #2 on: September 23, 2011, 06:10:30 pm »
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
Sig wipe!

Offline boot2490

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 607
  • Rating: +54/-36
    • View Profile
    • Boot2490's Stuff
Re: Text Command Erasing Pixels
« Reply #3 on: September 23, 2011, 06:16:24 pm »
That's why you draw tilemaps from the bottom up.

Oh wait... the other thing.. that DOES suck!!
« Last Edit: September 23, 2011, 06:22:39 pm by boot2490 »
I'm not worried about SOPA creating censorship, that will not stand for long. I'm worried that they'll succeed in stopping piracy!

Spoiler For Signature, updated march 23, 11:28 PM EST:















An useful tool!

PM me if you need some help. I am glad to be of assistance and part of the TI Communnity.

Offline Blue72

  • LV2 Member (Next: 40)
  • **
  • Posts: 20
  • Rating: +3/-0
    • View Profile
Re: Text Command Erasing Pixels
« Reply #4 on: September 23, 2011, 06:39:54 pm »
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.

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Text Command Erasing Pixels
« Reply #5 on: September 23, 2011, 06:52:58 pm »
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
Sig wipe!

Offline FinaleTI

  • Believe in the pony that believes in you!
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1830
  • Rating: +121/-2
  • Believe in the pony that believes in you!
    • View Profile
    • dmuckerman.tumblr.com
Re: Text Command Erasing Pixels
« Reply #6 on: September 23, 2011, 06:53:29 pm »
Courtesy of ztrumpet in his Vertical Text Sprites topic:
Quote from: ztrumpet
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.


Spoiler For Projects:

My projects haven't been worked on in a while, so they're all on hiatus for the time being. I do hope to eventually return to them in some form or another...

Spoiler For Pokemon TI:
Axe port of Pokemon Red/Blue to the 83+/84+ family. On hold.

Spoiler For Nostalgia:
My big personal project, an original RPG about dimensional travel and a few heroes tasked with saving the world.
Coding-wise, on hold, but I am re-working the story.

Spoiler For Finale's Super Insane Tunnel Pack of Doom:
I will be combining Blur and Collision Course into a single gamepack. On hold.

Spoiler For Nostalgia Origins: Sky's Story:
Prequel to Nostalgia. On hold, especially while the story is re-worked.

Offline Blue72

  • LV2 Member (Next: 40)
  • **
  • Posts: 20
  • Rating: +3/-0
    • View Profile
Re: Text Command Erasing Pixels
« Reply #7 on: September 23, 2011, 06:55:09 pm »
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?

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Text Command Erasing Pixels
« Reply #8 on: September 23, 2011, 06:56:54 pm »
you're correct, but it's one of the way XP
Probably using that hexcode will help you a bunch though.
Sig wipe!

Offline Blue72

  • LV2 Member (Next: 40)
  • **
  • Posts: 20
  • Rating: +3/-0
    • View Profile
Re: Text Command Erasing Pixels
« Reply #9 on: September 23, 2011, 06:59:56 pm »
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.

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Text Command Erasing Pixels
« Reply #10 on: September 23, 2011, 07:38:53 pm »
If you use Pt-Off(X,Y,3) you might be able to turn it off pretty quickly using only a few hardcoded commands

Offline Blue72

  • LV2 Member (Next: 40)
  • **
  • Posts: 20
  • Rating: +3/-0
    • View Profile
Re: Text Command Erasing Pixels
« Reply #11 on: September 23, 2011, 07:48:46 pm »
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...

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Text Command Erasing Pixels
« Reply #12 on: September 23, 2011, 08:00:47 pm »
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
« Last Edit: September 23, 2011, 08:01:27 pm by Builderboy »

Offline Blue72

  • LV2 Member (Next: 40)
  • **
  • Posts: 20
  • Rating: +3/-0
    • View Profile
Re: Text Command Erasing Pixels
« Reply #13 on: September 23, 2011, 08:03:08 pm »
How do I test if it was changed?

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Text Command Erasing Pixels
« Reply #14 on: September 23, 2011, 09:10:43 pm »
Use pixel-test() to determine the color of the pixel