| |
|
|
| CompileMarkSeparationSource wurde am 15.07.2007 aus der MMJ-Quellcodesammlung (Dietmar Horn) in die Babyklappe auf XProfan.Com abgelegt:
Grafik: Kollissionsabfrage
Declare Bild$, Random1%, Random2%, X1&, X2&, Ende%, Rect1#, Crash&, Crash2&
Def @Ptinrect(3) !User32,PtInRect
Chdir $Winpath
Let Bild$ = @Findfirst$(*.BMP)
Windowstyle 31
Windowtitle Kollisionsabfrage
Window 0,0 - 640,440
Let X1& = 0
Let X2& = 600
Mcls 700,500
Randomize
Let Random1% = @Rnd(15)
Let Random2% = @Rnd(15)
Whilenot Ende%
Sleep 100
Startpaint -1
Cls
Loadsizedbmp Bild$, X1&,100 - 30,30; 0
Loadsizedbmp Bild$, X2&,100 - 30,30; 0
Endpaint
Mcopybmp 0,0 - 640,480 > 0,0; 0
Let Crash& = 0
Let Crash2& = 0
Dim Rect1#,16
Long Rect1#,0 = X1&
Long Rect1#,4 = 100
Long Rect1#,8 = X1& + 30
Long Rect1#,12 = 100 + 30
Let Crash& = @Ptinrect(Rect1#,X2&,100)
Let Crash2& = Crash2& + Crash&
Let Crash& = @Ptinrect(Rect1#,X2& + 30,100)
Let Crash2& = Crash2& + Crash&
Let Crash& = @Ptinrect(Rect1#,X2&,100 + 30)
Let Crash2& = Crash2& + Crash&
Let Crash& = @Ptinrect(Rect1#,X2& + 30,100 + 30)
Let Crash2& = Crash2& + Crash&
Dispose Rect1#
If Crash2& > 0
Let Ende% = 1
@Messagebox(Boing, Bums, 64)
Endif
Let X1& = X1& + Random1%
Let X2& = X2& - Random2%
Endwhile
|
|
|
| |
|
|