REM Translucent ring
REM
REM Disable the Escape key
REM
*ESC OFF
REM
REM Set up a simple error handler
REM
ON ERROR OSCLI "REFRESH ON" : CLS : ON : REPORT : PRINT " at line ";ERL : VDU 7 : END
REM
REM Make 2 Megabytes of RAM available to this program
REM
M% = 2 : HIMEM=LOMEM+&100000*M%
REM
REM Prevent the program window from being resized by the user
REM
SYS "GetWindowLong", @hwnd%, -16 TO S%
SYS "SetWindowLong", @hwnd%, -16, S% AND NOT &50000
SYS "SetWindowPos", @hwnd%, 0, 0, 0, 0, 0, 32+7
REM
REM Set up a 640x512 display mode, and turn OFF the flashing cursor
REM
MODE 8
OFF
REM
REM Install and initialise GFXLIB and required external modules
REM
INSTALL @lib$ + "GFXLIB2.BBC"
PROCInitGFXLIB( dispVars{}, 0 )
INSTALL @lib$ + "GFXLIB_modules\PlotShapeBlend.BBC" : PROCInitModule
INSTALL @lib$ + "GFXLIB_modules\PlotTintBlend.BBC" : PROCInitModule
REM
REM Load the background image (dimensions: 640x512, bit depth: 8)
REM
PROCLoadBMP( @dir$ + "resources\bg1_640x512x8.BMP", bgBm%, FALSE )
REM
REM Load the sphere graphic (dimensions: 64x64, bit depth: 24)
REM
PROCLoadBMP( @dir$ + "resources\sphere003_64x64x24.BMP", sphereBm%, FALSE )
REM
REM Now get down to business
REM
theta% = 0
*REFRESH OFF
REPEAT
SYS GFXLIB_BPlot%, dispVars{}, bgBm%, 640, 512, 0, 0
R% = RND(-3611636)
FOR I%=0 TO 11
x% = 288 + 180*SINRAD(theta% + (360/12)*I%)
y% = 224 + 180*COSRAD(theta% + (360/12)*I%)
REM. First draw translucent ball shadow
SYS GFXLIB_PlotShapeBlend%, dispVars{}, sphereBm%, 64, 64, x%-12, y%-12, &000000, 50
REM. Now draw translucent ball
SYS GFXLIB_PlotTintBlend%, dispVars{}, sphereBm%, 64, 64, x%, y%, RND(&FFFFFF), 128, 150
NEXT I%
theta% += 1
IF theta% > 359 THEN theta%=0
PROCdisplay
UNTIL FALSE