Boriel Basic Forum
Help with scroll.bas library - 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: Help & Support (https://forum.boriel.com/forumdisplay.php?fid=16)
+---- Thread: Help with scroll.bas library (/showthread.php?tid=935)



Help with scroll.bas library - Andy1966uk - 2020-04-08

Team,

When I use the library, the screen scrolls, however the colour of the objects bleeds to the background colour.
Is there a fix for this and also the x,y,x1,y1 cordinates of the scroll window don't seem correct.

Thanks for looking into this as I am desperate for a scroll function. thx


RE: Help with scroll.bas library - britlion - 2020-04-08

Which library exactly?

Remember that on the spectrum the colour and the pixels are in completely separate grids - the colour is in 8x8 squares. So unless you scroll 8 pixels at a time, you have a problem aligning to the colour grid. This is why many spectrum games are very single colour in the play area.

It wouldn't be too hard to add a colour scroll routine to the library; but it would only work with Character Square size movements.


RE: Help with scroll.bas library - Andy1966uk - 2020-04-09

(2020-04-08, 09:28 PM)britlion Wrote: Which library exactly?

Remember that on the spectrum the colour and the pixels are in completely separate grids - the colour is in 8x8 squares. So unless you scroll 8 pixels at a time, you have a problem aligning to the colour grid. This is why many spectrum games are very single colour in the play area.

It wouldn't be too hard to add a colour scroll routine to the library; but it would only work with Character Square size movements.
the scroll.bas library found under zbasic library, running the scroll.bas in the examples folder.


RE: Help with scroll.bas library - boriel - 2021-01-18

(2020-04-09, 02:42 PM)Andy1966uk Wrote:
(2020-04-08, 09:28 PM)britlion Wrote: Which library exactly?

Remember that on the spectrum the colour and the pixels are in completely separate grids - the colour is in 8x8 squares. So unless you scroll 8 pixels at a time, you have a problem aligning to the colour grid. This is why many spectrum games are very single colour in the play area.

It wouldn't be too hard to add a colour scroll routine to the library; but it would only work with Character Square size movements.
the scroll.bas library found under zbasic library, running the scroll.bas in the examples folder.

Can you post an example, please?