###############################################################################
#
# deathscene.txt
# original death scene for XR7: EarthStrike developed by Drake Analytics, Inc.
# www.xandis.com
#
# This is the scene data for when a player dies and does not achieve the end
# of the game and also does not achieve a top-10 score. Basically, just a 
# full screen picture is shown and the system waits for input to move to the
# next scene.
#
###############################################################################

def lighting MainAmbientLight
	color = 255 255 255 255
end

def bounds MainBounds
	min = -10.0 -10.0 -10.0
	max = 10.0 10.0 100.0
end

def projection NormalProjection
	nearplane	= 1.0
	farplane	= 100.0
	fov		= 0.7850
	aspect		= 1.0
end

def camera NormalCamera
	lookat	= 0.0 0.0 0.0
	pos	= 0.0 0.0 -10.0
	up	= 0.0 1.0 0.0
end

################## RENDER STATES ######################
#
def renderstate SpriteRenderState
	id		= 3
	zenable		= f
	specularenable	= f
	fogenable	= f
	alphaenable	= t
	lightenable	= f
	fillmode	= SOLID
	shading		= GOURAUD
	lighting	= 255 255 255
	alphasrc	= SRCALPHA
	alphadest	= INVSRCALPHA
	blendop		= ADD
	cull		= NONE
	clipping	= y
end

###################### SPRITES #####################
#
def sprite BackImage1
	source		= sprites\death-back-1.bmp
	transformed	= y
	maxonscreen	= 1
	size		= 1.0
	renderstate	= SpriteRenderState
end

def sprite BackImage2
	source		= sprites\death-back-2.bmp
	transformed	= y
	maxonscreen	= 1
	size		= 1.0
	renderstate	= SpriteRenderState
end

def sprite BackImage3
	source		= sprites\death-back-3.bmp
	transformed	= y
	maxonscreen	= 1
	size		= 1.0
	renderstate	= SpriteRenderState
end

def sprite BackImage4
	source		= sprites\death-back-4.bmp
	transformed	= y
	maxonscreen	= 1
	size		= 1.0
	renderstate	= SpriteRenderState
end

###################### BACK IMAGE #####################
#
def backimage BackImage
	numimages	= 4
	image1		= BackImage1
	image2		= BackImage2
	image3		= BackImage3
	image4		= BackImage4
	pos1		= 144.0	42.0	0.0
	pos2		= 400.0	42.0	0.0
	pos3		= 144.0	298.0	0.0
	pos4		= 400.0	298.0	0.0
end


################# MUSIC AND WAVES #################
#
def music DeathSceneMusic
	source	= audio\music\ALEX-ssoul1se.mid
	repeats = 1000
end

########################### SCENE ############################
#
def scene main
	playmusic	= DeathSceneMusic
	setcamera	= NormalCamera
	setprojection	= NormalProjection
	setambientlight	= MainAmbientLight
	setbackcolor	= 0 0 0			# R G B
	setrenderstate	= SpriteRenderState  	# start off with any old render state
	setbounds	= MainBounds
	setbackimage	= BackImage

	waituntilinput
	eos				
end

### END OF SCENE

