BAM: SCROLL statement "super-test"
#6
Just another sanity check to make sure scrolling part of the screen works not just for middling portions:

Code: (Select All)
CONST HORIZONTAL = 2, VERTICAL = 1

SCREEN _NEWIMAGE(16,16,7)

FOR x = 0 TO 14 STEP 2
  FOR y = 0 TO 14 STEP 2
    PSET (x,y), CHOOSE( INT(RND*2)+1, 3, 14)
  NEXT y
NEXT x

_DELAY 1

➔again:

  axis = INT(RND*2) + 1
  this_index = INT(RND*4) * 2
  increment = CHOOSE( INT(RND*2)+1, 1, -1)

  FOR l = 1 TO 10
      IF axis = VERTICAL THEN
          SCROLL (this_index,0)-(this_index,15), 0, increment, TRUE
      ELSE
          SCROLL (0,this_index)-(15,this_index), increment, 0, TRUE
      END IF   
      _DELAY 0.25
  NEXT l


GOTO ➔again
Reply


Messages In This Thread
BAM: SCROLL statement "super-test" - by CharlieJV - 06-27-2023, 04:46 AM
RE: BAM: SCROLL statement "super-test" - by bplus - 06-27-2023, 12:49 PM
RE: BAM: SCROLL statement "super-test" - by bplus - 06-27-2023, 08:23 PM
RE: BAM: SCROLL statement "super-test" - by CharlieJV - 06-27-2023, 10:16 PM



Users browsing this thread: 5 Guest(s)