Posted: 5th Feb 2008 03:16
hi, has someone an idea why this short 2D demo flickering. I have tryed a lot of things like paste image, sync and sync rate commands etc. but nothing helps...
Rgs Mike
---
set display mode 800,600,32
hide mouse
create bitmap 1,800,600
set current bitmap 1
REM Blue Line
cls
y=0
For x=0 To 25
inc y, 10
ink rgb(0,0,y),0
Line 0, x, 800 ,x
Next
For x= 25 To 50
dec y, 10
ink rgb(0,0,y), 0
Line 0,x,800,x
Next
Get image 3,0,0,800,50, rgb(0,0,0)
sprite 3,0,0,3
REM red Line
cls
y=0
For x=0 To 25
inc y, 10
ink rgb(y,0,0),0
Line 0, x, 800 ,x,
Next
For x= 25 To 50
dec y, 10
ink rgb(y,0,0), 0
Line 0,x,800,x
Next
Get image 4,0,0,800,50, rgb(0,0,0)
sprite 4,0,0,4
RasterWinkelA=0
RasterWinkleB=180
repeat
set current bitmap 1
cls
paste sprite 3,0,250+250*sin(RasterWinkelA)
paste sprite 4,0,250+250*sin(RasterWinkelA+15)
inc RasterWinkelA,5
inc RasterWinkelB,3
if RasterWinkelA>360 then RasterWinkelA=0
if RasterWinkelB>360 then RasterWinkelB=0
copy bitmap 1,0
wait 50
until inkey$()<>""
end