I did post this yesterday but can't find it anymore. So here the second time.
I load a BMP file in the program. The split it up in lines. redraw it on the screen using a sinus wave. In full mode the screen draws every time corrupted but. There come every time pieces of the desktop picture in the drawing???
This is the code i cant find any mistake...
I load a BMP file in the program. The split it up in lines. redraw it on the screen using a sinus wave. In full mode the screen draws every time corrupted but. There come every time pieces of the desktop picture in the drawing???
This is the code i cant find any mistake...
Global Steps# = 0 Global Set_Point# =0 Global Step_Count =6 Global Off_Time# =25 Global Timing Global InitOn =False Global Title Dim Wave_Screen(480) Graphics 640,480,32 Title=LoadImage("Graphics/MainScreen.bmp") Repeat sinewaveon() If KeyHit(1) End EndIf ; finaly show update on screen Flip True Forever ; Create a sinus wave on screen Function Sinewaveon() If Steps#<3 ;If InitOn = False Cls ; Setup screen DrawImage Title,0,0 ; Grab the line of the image For x = 0 To 479 Wave_Screen(x)=CreateImage(640,1) GrabImage Wave_Screen(x),1,x-1 Next ;SetBuffer BackBuffer() InitOn=True ;EndIf Steps# = 8.0 Set_Point#=0 Step_Count=6 Off_Time#=25 Timing=MilliSecs() EndIf Cls ;Draw in sinus mode For x = 1 To 479 DrawImage Wave_Screen(x),Sin(Set_Point#+x*Steps#)*Off_time,x-1 Next Set_Point#=Set_Point#+Step_Count ;Calculate new sinus wave If MilliSecs()=>Timing+25 Steps# = Steps# -0.05 Off_Time=Off_time-0.25 Timing=MilliSecs() EndIf If GetKey()<>0 Or GetJoy()<>0 Case_Active =2 EndIf End Function