how to use shadeblend?

BlitzMax Forums/BlitzMax Programming/how to use shadeblend?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

What's the problem?
Graphics 640,480,0,60

maxd# = 30.0
For x = 0 To 63
	For y = 0 To 63
		d# = Sqr((x-32.0)*(x-32.0) + (y-32.0)*(y-32.0))/maxd
		d = d*0.5 + 0.5
		If d>1.0 Then d = 1.0
		SetColor d*255,d*255,d*255
		Plot x,y
	Next
Next
Flip

Global img:TImage = CreateImage(64,64)
GrabImage(img,0,0)
SetImageHandle img,32,32

Type lax
	Global list:TList = New TList
	
	Field x#,y#
	Field dx#,dy#
	
	Method New()
		List.AddLast Self
		x = Rnd(640)
		y = Rnd(480)
		dx = Rnd(-5,5)
		dy = Rnd(-5,5)
	End Method
	
	Function Update()
		
		SetBlend SHADEBLEND
		
		For l:lax = EachIn lax.list
			l.x = l.x + l.dx
			l.y = l.y + l.dy
			If l.x<32 And l.dx<0
				l.x = 32
				l.dx = -l.dx
			ElseIf l.x>GraphicsWidth()-32 And l.dx>0
				l.x = GraphicsWidth()-32
				l.dx = -l.dx
			EndIf

			If l.y>GraphicsHeight()-32 And l.dy>0
				l.y = GraphicsHeight()-32
				l.dy = -l.dy
				If l.dy>-1 Then l.dy = -20.0
			EndIf
			
			l.dy = l.dy + 0.4

			DrawImage img,l.x,l.y
		Next
		
	EndFunction
	
End Type

For i = 0 To 20
	New lax
Next

SetClsColor 255,255,255

Repeat
	Cls
	lax.Update()
	Flip 
Until KeyHit(KEY_ESCAPE)