![]() |
|
scroll.bas - Printable Version +- Boriel Basic Forum (https://forum.boriel.com) +-- Forum: Compilers and Computer Languages (https://forum.boriel.com/forumdisplay.php?fid=12) +--- Forum: ZX Basic Compiler (https://forum.boriel.com/forumdisplay.php?fid=11) +---- Forum: Bug Reports (https://forum.boriel.com/forumdisplay.php?fid=15) +---- Thread: scroll.bas (/showthread.php?tid=415) |
scroll.bas - britlion - 2011-12-07 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? Re: scroll.bas - britlion - 2012-08-04 *bump* Are these okay? Do we need replacements? Re: scroll.bas - slenkar - 2012-08-04 I have never used scroll, so dunno how they act under gaming conditions Re: scroll.bas - boriel - 2012-08-05 Not sure how you got them. They should not be bundled with the compiler. I stop programming them, to address more important issues. Horizontal scroll is pixel by pixel. I can finish scroll (and roll) in the 4 directions (Up, Down, Left, Right). But pixel by pixel scroll is slow. A better routine would be:
Re: scroll.bas - britlion - 2012-08-05 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. Re: scroll.bas - boriel - 2012-08-05 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. Re: scroll.bas - slenkar - 2016-04-25 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! Re: scroll.bas - britlion - 2016-05-03 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. Re: scroll.bas - slenkar - 2016-05-30 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 Re: scroll.bas - slenkar - 2017-01-01 The numbers dont seem to behave as I would expect, can someone take a look? |