|
Post by MPN on Jan 12, 2006 22:08:00 GMT -5
I've read the manual, but i still don't understand how to scroll a background image. I want to make a steady down-to-up repeating pattern, but i don't understand. Can someone here help? thanks.
|
|
oompa loompa
I AM THE GOVERNATOR
"Git 'Er Dun!"
Posts: 1,301
|
Post by oompa loompa on Jan 14, 2006 12:40:10 GMT -5
first you need to set up a scrolling mode:
setscrollmode HSCROLL_somemode, VSCROLL_somemode
the first parameter specifies which mode to use for when scrolling horizontally (left - right), and the second parameter specifies which mode to use when scrolling vertically (up - down).
the sega genesis can scroll a plane horizontally in three ways: scroll the entire plane (HSCROLL_OVERALL), scroll every cell (HSCROLL_CELL), or scroll every line (HSCROLL_LINE). the genesis can scroll a plane vertically in only two modes: scroll the entire plane (VSCROLL_OVERALL), scroll every 2 cells (VSCROLL_2CELL). set these values for setscrollmode before you start scrolling
next, you need to specify which plane to scroll by using:
setscrollplane PLANE_someplane
there are two planes: PLANE_A, and PLANE_B. PLANE_A is used for text, like you see when using the command print. PLANE_B is the plane that's above PLANE_A, which you don't usually see without setting your drawing plane to draw to plane b
next, you're ready to scroll, by using the commands:
to scroll relatively:
scroll LEFT/RIGHT/DOWN/UP, <quantity to scroll>, <entity to scroll>
to scroll absolutely:
scroll2 LEFT/RIGHT/DOWN/UP, <value to scroll>, <entity to scroll>
relatively means that you want to scroll RELATIVE to what has already been scrolled. for example: scroll LEFT, 1 will scroll the screen left by one. running the command again will scroll the screen, again, by one pixel.
scrolling absolutely is totally different, if you use the command scroll LEFT,1 for the first time, it will scroll the screen left by one pixel. if you run the command again, nothing will happen because you have already scrolled the screen left by one pixel already, and will have to use something like: scroll2 LEFT,2 will scroll the screen left, by two pixels.
|
|