rawToAmigaBasicShape: Coerce raw data into an AmigaBasicShape class object

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/basic.r

Description

Coerce raw data into an AmigaBasicShape-class object

Usage

1

Arguments

x

A vector of raw data that is to be converted into an AmigaBasicShape class object.

palette

A vector of character strings, where each element represents a colour in the palette. This palette will be used to display the graphics (note that the raw format does not store the palette, but this S3 class does). When this argument is omitted a grey scale palette will be generated.

Details

AmigaBasicShape objects are comprehensive representations of blitter and sprite graphics that can be used in AmigaBasic scripts. Use this function to convert raw content to an AmigaBasicShape object.

Value

returns an AmigaBasicShape-class object.

Author(s)

Pepijn de Vries

See Also

Other raw.operations: as.AmigaBasic(), as.raw.AmigaBasic(), colourToAmigaRaw(), packBitmap(), rawToAmigaBasicBMAP(), rawToAmigaBasic(), rawToAmigaBitmapFontSet(), rawToAmigaBitmapFont(), rawToAmigaIcon(), rawToHWSprite(), rawToIFFChunk(), rawToSysConfig(), simpleAmigaIcon()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
filename <- system.file("ball.shp", package = "AmigaFFH")

## read as binary:
con      <- file(filename, "rb")
ball.raw <- readBin(con, "raw", file.size(filename))
close(con)

## convert raw data into something useful:
ball     <- rawToAmigaBasicShape(ball.raw)

## A shortcut would be to call read.AmigaBasicShape
ball2    <- read.AmigaBasicShape(filename)

## End(Not run)

AmigaFFH documentation built on Sept. 5, 2021, 5:22 p.m.