FAQ  •  Register  •  Login

scroll.bas

<<

britlion

Posts: 766

Joined: Mon Apr 27, 2009 7:26 pm

Location: Slough, Berkshire, UK

Post Wed Dec 07, 2011 10:27 pm

scroll.bas

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?
<<

britlion

Posts: 766

Joined: Mon Apr 27, 2009 7:26 pm

Location: Slough, Berkshire, UK

Post Fri Aug 03, 2012 11:32 pm

Re: scroll.bas

*bump*

Are these okay? Do we need replacements?
<<

slenkar

Posts: 282

Joined: Sun Feb 13, 2011 3:33 am

Location: Kentucky US, used to be Birmingham UK

Post Sat Aug 04, 2012 1:59 am

Re: scroll.bas

I have never used scroll, so dunno how they act under gaming conditions
<<

boriel

Site Admin

Posts: 1463

Joined: Wed Nov 01, 2006 6:18 pm

Location: Santa Cruz de Tenerife, Spain

Post Sun Aug 05, 2012 1:01 am

Re: scroll.bas

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:
  • Scroll within a given window (e.g. x, y, height, width)
  • Scroll the given amount of pixels. This is more interesting, but I guess it's much harder when done horizontally.
  • Scroll colors (attributes)
I will try to work out pixel by pixel scroll within a given window.
<<

britlion

Posts: 766

Joined: Mon Apr 27, 2009 7:26 pm

Location: Slough, Berkshire, UK

Post Sun Aug 05, 2012 4:37 pm

Re: scroll.bas

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.
<<

boriel

Site Admin

Posts: 1463

Joined: Wed Nov 01, 2006 6:18 pm

Location: Santa Cruz de Tenerife, Spain

Post Sun Aug 05, 2012 5:45 pm

Re: scroll.bas

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.
<<

slenkar

Posts: 282

Joined: Sun Feb 13, 2011 3:33 am

Location: Kentucky US, used to be Birmingham UK

Post Mon Apr 25, 2016 1:57 am

Re: scroll.bas

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!
<<

britlion

Posts: 766

Joined: Mon Apr 27, 2009 7:26 pm

Location: Slough, Berkshire, UK

Post Tue May 03, 2016 11:20 am

Re: scroll.bas

You mean http://www.boriel.com/wiki/en/index.php ... owScrollUp ?

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.
<<

slenkar

Posts: 282

Joined: Sun Feb 13, 2011 3:33 am

Location: Kentucky US, used to be Birmingham UK

Post Mon May 30, 2016 7:02 pm

Re: scroll.bas

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
<<

slenkar

Posts: 282

Joined: Sun Feb 13, 2011 3:33 am

Location: Kentucky US, used to be Birmingham UK

Post Sun Jan 01, 2017 9:23 pm

Re: scroll.bas

The numbers dont seem to behave as I would expect, can someone take a look?

Return to Bug Reports

Who is online

Users browsing this forum: No registered users and 1 guest

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by Vjacheslav Trushkin for Free Forums/DivisionCore.

phpBB SEO