map layers help

BlitzMax Forums/BlitzMax Programming/map layers help

Kev(Posted 2005) [#1]
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


tonyg(Posted 2005) [#2]
Might be another symptom of this...
shadeblend
You can change the code but it gets overwritten next syncmod.
I'm not sure, from the replies, whether people believe it is a bug or not.


Kev(Posted 2005) [#3]
thanks tony,

i dont realy want to edit glmax2d module though. surely if i want to mask an image and its not being masked its a bug? yes?no. i could modify the glmax2d and backup so its not overwritten next syncmod. but i would loose anything new that added :(

kev


tonyg(Posted 2005) [#4]
I agree if I tell something not to include masked pixels then it shouldn't. I can't quite tell if people agree with me or not so I added something to the bug report.


Kev(Posted 2005) [#5]
ive fixed this it was my mistake when loading the image i was not using MASKEDIMAGE in the flags.

kev