English
Source / code snippets

graphic Kollissionsabfrage

 

CompileMarkSeparation
Source 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

 
07/15/07  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

1.372 Views

Untitledvor 0 min.
funkheld01/11/14

Themeninformationen

this Topic has 1 subscriber:

unbekannt (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie