hedgewars/uLandGraphics.pas
changeset 5179 8d64dcb566ea
parent 5041 3dc6ad20cbfe
child 5261 2db030882bc9
equal deleted inserted replaced
5178:f3cc6119f1fe 5179:8d64dcb566ea
    59     nGreen := (NewColor shr GShift) and $FF;
    59     nGreen := (NewColor shr GShift) and $FF;
    60     nBlue  := (NewColor shr BShift) and $FF;
    60     nBlue  := (NewColor shr BShift) and $FF;
    61 
    61 
    62     // Mix colors
    62     // Mix colors
    63     nAlpha := min(255, oAlpha + nAlpha);
    63     nAlpha := min(255, oAlpha + nAlpha);
    64     nRed   := ((oRed * oAlpha) + (nRed * (255-oAlpha))) div 255;
    64     nRed   := ((oRed * oAlpha) + (nRed * Byte(255-oAlpha))) div 255;
    65     nGreen := ((oGreen * oAlpha) + (nGreen * (255-oAlpha))) div 255;
    65     nGreen := ((oGreen * oAlpha) + (nGreen * Byte(255-oAlpha))) div 255;
    66     nBlue  := ((oBlue * oAlpha) + (nBlue * (255-oAlpha))) div 255;
    66     nBlue  := ((oBlue * oAlpha) + (nBlue * Byte(255-oAlpha))) div 255;
    67 
    67 
    68     addBgColor := (nAlpha shl AShift) or (nRed shl RShift) or (nGreen shl GShift) or (nBlue shl BShift);
    68     addBgColor := (nAlpha shl AShift) or (nRed shl RShift) or (nGreen shl GShift) or (nBlue shl BShift);
    69 end;
    69 end;
    70 
    70 
    71 procedure FillCircleLines(x, y, dx, dy: LongInt; Value: Longword);
    71 procedure FillCircleLines(x, y, dx, dy: LongInt; Value: Longword);