Skip to content

title: "vbmSpriteShiftSL" description: TRSE built-in method (from IDE help)


vbmSpriteShiftSL

Systems: VIC20
Parameters: a, a, b, b, a


vbmSpriteShiftSL( [address-src], [address-dest], [byte-inc], [byte-height], [address-pre] );

  • [address-src] - source sprite character graphic
  • [address-dest] - destination address where to store pre-shifted sprite
  • [byte-inc] - number of pixels to shift, 0-7 are allowed
  • [byte-height] - height of the sprite, for example 8, 16, 100, etc
  • [address-pre] - where to store the address of the pre-shifted sprite

Description

Create a single pre-shifted sprite frame for use with the sprite drawing commands. Shifts to the left to create a 'right' side frame of a pre-shifted sprite. This version of the Sprite Shift command only performs one shift operation. Can be used if different sprite characters are to be used for each shifted position to create animation as the sprite moves.

Example

// presift a character, found at address $4000 // stores the pre-shifted result in $a000 // shift into position 6 // set 16 pixel rows to shift (height of character sprite) // Store the address of the pre-shifted frame in $4400 vbmSpriteShiftSL( ^$4000, ^$a000, 6, 16, ^$4400 );

See also

  • vbmSpriteShiftSR
  • vbmSpriteShiftR
  • vbmSpriteShiftL
  • vbmSpriteStitch