Scroll2
Previous  Next

Description: Scrolls the active background plane to an absolute position, unlike the Scroll command, which scrolls the plane by a relative position.

     Syntax:
     
Scroll2 <Direction>, <Quantity> [, <Cell>]

Part
Description
<Direction>
Required. Sets the direction to shift the background plane. Valid values are:
  • Up
  • Down
  • Left
  • Right
<Quantity>
Required. Amount of pixels to shift the background plane.
<Cell>
Required if the scroll mode is HSCROLL_CELL, HSCROLL_LINE, or VSCROLL_2CELL.

If the scroll mode is HSCROLL_CELL, then <Cell> indicates which horizontal cell will be scrolled.

If the scroll mode is HSCROLL_LINE, then <Cell> indicates which line to scroll.

If the scroll mode is VSCROLL_2CELL, then <Cell> indicates which cell to scroll. <Cell> here is 16 pixels wide.

Notes: Scrolling the background planes will not shift any sprites. Sprites have to be shifted separately.

Example:

        DrawTile 1,0,0
        Sleep 100
        Scroll2 DOWN, 10
        Sleep 100
        SCROLL2 DOWN, 9