blitz+ don't have any builtin transparency.
so you'll have to run the previous code all frames ... you can test this if you wan't to test anyway :)
too slow :(
so you'll have to run the previous code all frames ... you can test this if you wan't to test anyway :)
testpicture=LoadImage(RequestFile("choose a picture (small)")) Graphics 640,480,0,2 SetBuffer BackBuffer() Repeat DrawBlock testpicture,MouseX(),MouseY() scanline_effect(50) Flip Until KeyDown(1) Function ScanLine_effect(percentage) LockBuffer BackBuffer() For y=0 To GraphicsHeight() Step 2 For x=0 To GraphicsWidth() c=(ReadPixelFast(x,y,BackBuffer()) Shl 8)Shr 8 r=minmax(percent(percentage,(c Shl 8) Shr 24),0,255) g=minmax(percent(percentage,(c Shl 16) Shr 24),0,255) b=minmax(percent(percentage,(c Shl 24) Shr 24),0,255) WritePixelFast(x,y,b Or (g Shl 8) Or (r Shl 16)) Next Next UnlockBuffer End Function Function minmax(v,mn,mx) If v<mn:v=mn:EndIf If v>mx:v=mx:EndIf Return v End Function Function percent#(per,cent) onepercent#=(cent*1.0)/100 Return Ceil( onepercent#*per) End Function
too slow :(