'demo.bas', 'r_logo.shp' and 'ball.shp' as example files for AmigaBasic and AmigaBasicShape objects
Source:R/data.r
AmigaBasic-files.Rd
'demo.bas', 'r_logo.shp' and 'ball.shp' as example files for AmigaBasic()
and
AmigaBasicShape()
objects
Format
See AmigaBasic()
and AmigaBasicShape()
for more information
about the format.
Details
The 'r_logo.shp' and 'ball.shp' files are formatted such that they can be read with
read.AmigaBasicShape()
. They serve as an example of the AmigaBasicShape()
class, where
the first represents a blitter object, and the latter a sprite.
The 'demo.bas' file is an example of a binary encoded Amiga Basic script. It can be read with
read.AmigaBasic()
. The script demonstrates how the shape files could be used in Amiga Basic.
Examples
read.AmigaBasic(system.file("demo.bas", package = "AmigaFFH"))
#> OPEN "ball.shp" FOR INPUT AS 1
#> OBJECT.SHAPE 1,INPUT$(LOF(1),1)
#> CLOSE 1
#> OBJECT.X 1,320
#> OBJECT.Y 1,127
#> OBJECT.ON 1
#> OBJECT.START
#> LET t=0
#> PRINT "Press any key to continue..."
#> WHILE INKEY$ =""
#> OBJECT.X 1, 320+200*SIN(t)
#> OBJECT.Y 1, 127+100*COS(t)
#> t=t+.001
#> WEND
#> SCREEN 1,320,256,3,1
#> WINDOW 1,"Bob Window",(0,0)-(297,242),31,1
#> PALETTE 0,1,1,1
#> PALETTE 1,.1333333,.4,.7333333
#> PALETTE 2,.2,.4,.7333333
#> PALETTE 3,.2666667,.4666667,.6666667
#> PALETTE 4,.4666667,.5333333,.6
#> PALETTE 5,.6,.6,.6
#> PALETTE 6,.6666667,.6666667,.6666667
#> PALETTE 7,.7333333,.7333333,.7333333
#> FOR i% = 0 TO 7
#> COLOR i%
#> AREA (i%*10, 30)
#> AREA STEP (10, 0)
#> AREA STEP (0, 10)
#> AREA STEP (-10,0)
#> AREAFILL
#> NEXT i%
#> OPEN "r_logo.shp" FOR INPUT AS 1
#> OBJECT.SHAPE 2,INPUT$(LOF(1),1)
#> CLOSE 1
#> OBJECT.X 2,160
#> OBJECT.Y 2,127
#> OBJECT.ON 2
#> PRINT "Press any key to stop..."
#> WHILE INKEY$=""
#> OBJECT.X 2, 160+100*SIN(t*.3)
#> OBJECT.Y 2, 127+50*COS(t)
#> t=t+.01
#> WEND
#> SCREEN CLOSE 1
#> END
read.AmigaBasicShape(system.file("ball.shp", package = "AmigaFFH"))
#> [1] "A 16 x 16 sprite with 4 colours to be used in Amiga Basic."
read.AmigaBasicShape(system.file("r_logo.shp", package = "AmigaFFH"))
#> [1] "A 32 x 25 blitter object with 8 colours to be used in Amiga Basic."