/***************
 * NAME:          title.ray
 * DESCRIPTION:   This ARexx-programm renders the RayStorm title
 *	AUTHOR:        Andreas Heumann
 ***************/

signal on error

options results

IF ~show('P','RAYSTORM') THEN DO
	address COMMAND 'run >NIL: <NIL: /RayStorm'
	address COMMAND WaitForPort RAYSTORM
END  

address RAYSTORM

'OBJECTPATH /objects'
'BRUSHPATH /brushes'

'SETSCREEN 160 128'
'SETCAMERA <0,0,-700> <0,0,0> <0,1,0> 56.25 45'
'SETWORLD [0,0,0] REFLMAP=reflectionmap.png'
'POINTLIGHT <0,0,-700>'

'NEWSURFACE BACK'
'DIFFUSE [100,140,200]'
'SPECULAR [0,0,0]'

'PLANE BACK <0,0,180> <0,0,1>'

'LOADOBJ title.iob'

'STARTRENDER'

'SAVEPIC title.iff'

'CLEANUP'

exit 0

error:
say "Error" rc "in line" sigl ":"
GETERRORSTR rc
say result
exit 0
