map layers help

BlitzMax Forums/BlitzMax Programming/map layers help

hi all

Ive setup an map array that hold's 3 layers, each layer images are drawn in order.
layer1 then layer2 and layer3, now layer1 does not use masking but layers 2/3 do. heres where im having trouble.

if i use LIGHTBLEND mode when i call SetBlend the layers under is visable through the masked default color (0,0,0)
any other mode acts like SOLIDBLEND mode, ie. there no mask on the layer.

heres the code im using to draw the map's layers.
		For map_layer:Int = 0 To num_map_layers-1	
			
			If map_layer => 1 Then
				SetBlend MASKBLEND 'LIGHTBLEND
			Else	
				SetBlend SOLIDBLEND
			EndIf
					
			For map_y:Int = 0 To map_height-1
				For map_x:Int = 0 To map_width-1
					Local data_value:Int = MAP_ARRAY[map_layer,map_x,map_y] 
					If data_value <> -1 ' -1 are holes in layers
						DrawImage MAP_IMAGES,map_x*32,map_y*32,data_value
					EndIf
				Next
			Next
		Next



any help welcome.

thanks
kev