Posts: 805
Threads: 135
Joined: Apr 2009
Reputation:
5
Was thinking of doing some scroll routines. I see there are some useful ones in scroll.bas in the library.
However, there appears to be a left, right and another left in there - no up and down!
sub fastcall ScrollRight
sub fastcall ScrollLeft
sub fastcall ScrollLeft
two also begin a bit strangely - loading the byte at (screenaddress) twice?
Posts: 805
Threads: 135
Joined: Apr 2009
Reputation:
5
*bump*
Are these okay? Do we need replacements?
Posts: 282
Threads: 48
Joined: Feb 2011
Reputation:
0
I have never used scroll, so dunno how they act under gaming conditions
Posts: 805
Threads: 135
Joined: Apr 2009
Reputation:
5
Window scroll up is already in wiki library. Scroll down would be a trivial alteration from that.
Left and right is a matter of using 9 bit rotates to carry to next byte - for a single pixel. More than one pixel is a bit tougher to do.
Posts: 1,770
Threads: 55
Joined: Aug 2019
Reputation:
24
I recall there's already a SC/ROLL (Roll means exiting pixels reenter the opposite side) in a MicroHobby machine listing.
I think I could rip them from there.
Posts: 282
Threads: 48
Joined: Feb 2011
Reputation:
0
what do the four numbers represent?
Cant figure it out!!
Whenever I make changes to the numbers the results make no sense
If I change the first 2 numbers to zero the same scroll happens at 40,40
then other numbers when increased make the window smaller!
Posts: 805
Threads: 135
Joined: Apr 2009
Reputation:
5
You mean <!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:WindowScrollUp">http://www.boriel.com/wiki/en/index.php ... owScrollUp</a><!-- m --> ?
Unless it broke somewhere, and I remember correctly (it's been years); X and Y should be the top left corner, and the other two numbers are the width and height of the window.
Posts: 282
Threads: 48
Joined: Feb 2011
Reputation:
0
It's in the demo folder of the latest release
The demo prints a bunch of letters to the screen, then they are scrolled in all directions
Posts: 282
Threads: 48
Joined: Feb 2011
Reputation:
0
The numbers dont seem to behave as I would expect, can someone take a look?