hedgewars/uLandObjects.pas
changeset 1181 3ae244bffef9
parent 1180 e56317fdf78d
child 1182 e2e13aa055c1
equal deleted inserted replaced
1180:e56317fdf78d 1181:3ae244bffef9
    79 p:= Image^.pixels;
    79 p:= Image^.pixels;
    80 
    80 
    81 for y:= 0 to Pred(Image^.h) do
    81 for y:= 0 to Pred(Image^.h) do
    82 	begin
    82 	begin
    83 	for x:= 0 to Pred(Image^.w) do
    83 	for x:= 0 to Pred(Image^.w) do
    84 		//if LandPixels[cpY + y, cpX + x] = 0 then
    84 		if LandPixels[cpY + y, cpX + x] = 0 then
    85 			begin
    85 			begin
    86 			LandPixels[cpY + y, cpX + x]:= PLongword(@(p^[x * 4]))^;
    86 			LandPixels[cpY + y, cpX + x]:= PLongword(@(p^[x * 4]))^;
    87 			if (PLongword(@(p^[x * 4]))^ and $FF000000) <> 0 then Land[cpY + y, cpX + x]:= COLOR_LAND;
    87 			if (PLongword(@(p^[x * 4]))^ and $FF000000) <> 0 then Land[cpY + y, cpX + x]:= COLOR_LAND;
    88 			end;
    88 			end;
    89 	p:= @(p^[Image^.pitch]);
    89 	p:= @(p^[Image^.pitch]);