An S4 class object that represent graphical objects known as hardware sprites on the Commodore Amiga.
Amiga hardware supported sprites, which are graphical objects that could be moved around the display and independently from each other. Basic sprites were 16 pixels wide and any number of pixels high and were composed of four colours, of which one is transparent.
More complex sprites could be formed by linking separate sprites together. That way, sprites could become wider, or be composed of more colours. Such extended sprites are currently not supported by this package.
A well known example of hardware sprite on the Commodore Amiga is the mouse pointer.
This object simply holds the basic information belonging to
hardware sprite. Use
as.raster to convert it to
a raster which is a more useful graphical element in R.
The vertical starting position of a sprite.
The horizontal starting position of a sprite.
The vertical stopping position of a sprite. The
height of a sprite should be given by
logical values used for extending
sprites. The values are stored in this objects but extending
sprites is not (yet) supported.
Interleaved bitmap data containing information on the pixel colour numbers of the sprite.
A vector of the 3 colours used for the sprite.
Sprite data can be followed by another sprite. It is terminated
with two WORDS equalling zero (
raw(4)). Repeated sprite data is currently not
Pepijn de Vries
## This generates a sprite of a single line (16x1 pixels) with an empty bitmap: new("hardwareSprite") ## This generates a sprite of a single line (16x1 pixels) where ## the bitmap contains some coloured pixels: new("hardwareSprite", bitmap = as.raw(c(0x01,0x02,0x03,0x04))) ## This generates a sprite of 16x16 pixels: new("hardwareSprite", VStop = 16, bitmap = as.raw(sample.int(255, 64, replace = TRUE)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.