Original Post
I was playing with a 50% alphablend and I reduced it to this:
Pascal (What I''ve been playing with)
function fiftypt_Trans(color1,color2:word) : word;
begin
color1 := color1 shr 1;
Inc(color1, color2 shr 1);
result := (color1 and $00041CDF) - $F7DE;
end;
C (Converted just now... hope it''s right
)
word fiftypt_Trans(word color1, word color2){
color1 = color1 >> 1;
color1 += color2 >> 1;
return (color1 && 0x00041CDF) - 0xF7DE);
}
Can I go smaller? And I know there is no error checking ... so shaddap
Merrick
-------------------------------------------------
Mindphuq Software : "Who do you want to do today?"