"Romans_I_XVI" wrote:
Thanks for this tip. But wait... this "alpha parameter" , are you saying I can colorize my bitmaps?
edit: or do you just mean I can adjust the transparency (alpha)?
"squirreltown" wrote:
Wow i thinks i found an actual bug...errr Feature! yea thats it.
OK.
screen.Drawscaledobject( 620, 230, 2, 2, varr.but_off ) 'good
So the scale params are supposed to be floats, natch but the above works.
Until you add the ( i swear i saw it somewhere - recently documented alpha parameter) then it errors with type mismatch
screen.Drawscaledobject( 620, 230, 2, 2, varr.but_off, &hFFFFFF99 ) 'no good
but when you do it correctly:
screen.Drawscaledobject( 620, 230, 2.0,2.0, varr.but_off, &hFFFFFF99) 'good
Now it flys!
Function reduce_transparency_hex(hex)
if hex = &hFFFFFFFF
hex = &hFFFFFFEF
return hex
else if hex = &hFFFFFFEF
hex = &hFFFFFFDF
return hex
else if hex = &hFFFFFFDF
hex = &hFFFFFFCF
return hex
else if hex = &hFFFFFFCF
hex = &hFFFFFFBF
return hex
else if hex = &hFFFFFFBF
hex = &hFFFFFFAF
return hex
else if hex = &hFFFFFFAF
hex = &hFFFFFF9F
return hex
else if hex = &hFFFFFF9F
hex = &hFFFFFF8F
return hex
else if hex = &hFFFFFF8F
hex = &hFFFFFF7F
return hex
else if hex = &hFFFFFF7F
hex = &hFFFFFF6F
return hex
else if hex = &hFFFFFF6F
hex = &hFFFFFF5F
return hex
else if hex = &hFFFFFF5F
hex = &hFFFFFF4F
return hex
else if hex = &hFFFFFF4F
hex = &hFFFFFF3F
return hex
else if hex = &hFFFFFF3F
hex = &hFFFFFF2F
return hex
else if hex = &hFFFFFF2F
hex = &hFFFFFF1F
return hex
else if hex = &hFFFFFF1F
hex = &hFFFFFF0F
return hex
else
hex = &hFFFFFF00
return hex
end if
End Function
for i = 0 to 255
hexcolor = &hFFFFFF00+i
hexcolor2 = &hFFFFFFFF-i
screen.clear(whatev)
screen.drawobject( 0,0, bitmap, hexcolor) 'fading in
screen.drawobject( 0,0, bitmap2, hexcolor2) ' fading out
screen.swapbuffers()
end for
color = color - 16