Author Topic: Friendly window in Horiz mode  (Read 6059 times)

0 Members and 1 Guest are viewing this topic.

Offline JosJuice

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1344
  • Rating: +66/-14
    • View Profile
Friendly window in Horiz mode
« on: November 10, 2010, 12:51:38 pm »
The window I prefer to use is the one with 0,0 in the bottom-left corner, since it saves the most space. I used to set it up like this:
Code: [Select]
:0→Xmin
:0→Ymin
:94→Xmax
:62→Ymax
However, TI-BASIC Dev suggests this instead:
Code: [Select]
:ZStandard
:84→Xmin
:72→Ymax
:ZInteger
I don't understand what ZInteger does to create the window I want and why 84 and 72 are used instead of 94 and 62. I used this method for my programs anyway.

However, I've run into a problem now. I'm making a Horiz mode program, and because of this I need the window to be a different size. I tried randomly replacing values in the code in order to get the desired 94/31, and this seems to work:
Code: [Select]
:ZStandard
:Horiz
:84→Xmin
:41→Ymax
:ZInteger
Placing the Horiz command later in the code (after ZInteger) does not create the window I want. However, changing the size of the window while Horiz is in effect makes the line between the graphscreen and homescreen flash a bit, which does not look good. Is there any way to solve this without increasing the size of the program? I have no idea of how to make this work, since I don't understand in which way ZDecimal makes every pixel be an integer.

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Friendly window in Horiz mode
« Reply #1 on: November 10, 2010, 01:03:25 pm »
Do you want each pixel to be 1 unit? If so, you can do this:
Code: [Select]
0→Xmin
0→Ymin
1→dY
1→dX
(The dX is delta x where delta is the triangle thing. Same goes for dY)

If you do this in full screen mode, but then you want to have the same effect in split mode, just do the
Code: [Select]
1→dY
1→dX
thing again and you will be fine.

Offline JosJuice

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1344
  • Rating: +66/-14
    • View Profile
Re: Friendly window in Horiz mode
« Reply #2 on: November 10, 2010, 01:06:49 pm »
That's what I want to do. However, your method doesn't seem to be smaller than the one I'm currently using, and wouldn't setting dY and dX in Horiz mode make the line flicker, just like the way it does with ZInteger..?

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Friendly window in Horiz mode
« Reply #3 on: November 10, 2010, 01:10:17 pm »
It always flickers when you change window sizes, doesn't it? There is a flag set to mark the screen as "dirty" whenever equations are edited or window size is modified, I believe.

And it is slightly smaller that way...

Offline JosJuice

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1344
  • Rating: +66/-14
    • View Profile
Re: Friendly window in Horiz mode
« Reply #4 on: November 10, 2010, 01:13:55 pm »
Changing window sizes in Full mode with AxesOff makes the flicker happen on a completely white background, which means that the screen will stay white unlike in Horiz mode, in which the line has to be redrawn.

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Friendly window in Horiz mode
« Reply #5 on: November 10, 2010, 01:14:55 pm »
And you want a way to change the size without redrawing the line?

Offline JosJuice

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1344
  • Rating: +66/-14
    • View Profile
Re: Friendly window in Horiz mode
« Reply #6 on: November 10, 2010, 01:16:00 pm »
Yes.

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Friendly window in Horiz mode
« Reply #7 on: November 10, 2010, 01:18:04 pm »
That I am not sure can be done in BASIC. I might be able to make a hex code to "undirty" the screen, but that seems like a little much. The code would not be very large, though, if it is what I am thinking.
Code: [Select]
FDCB0380C9

Offline JosJuice

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1344
  • Rating: +66/-14
    • View Profile
Re: Friendly window in Horiz mode
« Reply #8 on: November 10, 2010, 01:27:18 pm »
I would prefer to not use Asm in this program, but thanks anyway.

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Friendly window in Horiz mode
« Reply #9 on: November 10, 2010, 01:29:32 pm »
Yeah, something like that isn't extreme enough for assembly, but I included it just in case. If you were making use of a library that included ExecHex or something, the opcode would be more useful, but an actual program is a bit extreme, I agree.

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Friendly window in Horiz mode
« Reply #10 on: November 10, 2010, 10:53:27 pm »
How many times are you changing the Window settings in your program? Because if it's just once as the calculator goes into horizontal mode then I don't see any issue with it. Or are you saying for when you clear the screen each time you see the flicker and you want to get rid of that? I'm kinda confused about what you want and are doing.
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Friendly window in Horiz mode
« Reply #11 on: November 10, 2010, 11:04:11 pm »
Here's how to do it exactly as you want it:
Code: [Select]
:ZStandard
:84→Xmin
:20→Ymax
:ZInteger
:Horiz
Good luck. :)

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Friendly window in Horiz mode
« Reply #12 on: November 10, 2010, 11:32:39 pm »
Here's how to do it exactly as you want it:
Code: [Select]
:ZStandard
:84→Xmin
:20→Ymax
:ZInteger
:Horiz
Good luck. :)

That doesn't make the y-axis scrollable by one at a time though. That stored negative twenty-six to Ymin and thirty-six to Ymax.
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Friendly window in Horiz mode
« Reply #13 on: November 10, 2010, 11:45:23 pm »
Whoops, let's try that again. ;)
Code: [Select]
:ZStandard
:0→Xmin
:1->_delta_X
:0→Ymin
:30→Ymax
:Horiz

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Friendly window in Horiz mode
« Reply #14 on: November 10, 2010, 11:49:30 pm »
This is three bytes smaller ;)

Code: [Select]
ZStandard
84→Xmin
9→Ymax
ZInteger
0→Ymin
Horiz
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)