Italia
Fonte/ Codesnippets

Ausschneiden Ausstanzen Form Puzzle Sprite

 

Julian
Schmidt

KompilierenMarkierenSeparieren
Randomize
Declare pos_x&, pos_y&, way_x&, way_y&
Var sprite&=Create("hPic",-1,"C:\\Puzzle.bmp")
Var bild&=Create("hNewPic", 185, 234, $FF00FF)
MoveTo RND(%bmpx+1),RND(%bmpy+1)
StartPaint bild&
DrawPic sprite&, 0, 0, -1, RGB(255,255,255)
EndPaint
DrawBackground
DrawPic bild&, (width(%hwnd)-%bmpx)/2, (height(%hwnd)-%bmpy)/2; -1
Deleteobject sprite&
Deleteobject bild&
waitinput
end

Proc DrawBackground

    CLS RGB(200,200,200)
    UsePen 0,10,RGB(128,128,128)

    whileloop Int((width(%hwnd)+height(%hwnd))\100)

        Line 0,100*&loop - 100*&loop,0

    EndWhile

EndProc


KompilierenMarkierenSeparieren
Randomize
Declare pos_x&, pos_y&, way_x&, way_y&
Var col&=RGB(128,128,128)
Var sprite&=Create("hPic",-1,"C:\\Puzzle.bmp")
Var bild&=Create("hNewPic", 185, 234, RGB(128,255,255))
MoveTo RND(%bmpx+1),RND(%bmpy+1)
StartPaint bild&
DrawPic sprite&, 0, 0, -1, RGB(255,255,255)
EndPaint
CLS col&

WhileNot iskey(27) or (%Umessage=16)

    Sleep 10
    Case pos_x&<0 : way_x&=0
    Case pos_x&+%bmpx>width(%hwnd) : way_x&=-1
    Case pos_y&<0 : way_y&=0
    Case pos_y&+%bmpy>height(%hwnd) : way_y&=-1
    Case way_x&<>-1 : pos_x&=pos_x&+1
    Case way_y&<>-1 : pos_y&=pos_y&+1
    Case way_x&=-1 : pos_x&=pos_x&-1
    Case way_y&=-1 : pos_y&=pos_y&-1
    CLS col&
    DrawPic bild&, pos_x&, pos_y&; -1

EndWhile

Deleteobject sprite&
Deleteobject bild&
end

...siehe: [...] 

6 kB
Hochgeladen:24.05.2012
Downloadcounter191
Download
 
XProfan X2
Win7 Home Premium, SP1, AMD Athlon(tm) II Neo K125 Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
24.05.2012  
 



In diesem Zusammenhang ist vlt. auch die hPic.inc ( [...]  ) interessant.
 
25.05.2012  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

Kein Systemprofil angelegt. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Bitte anmelden um einen Beitrag zu verfassen.
 

Topic-Options

5.586 Views

Untitledvor 0 min.
Heiko Dix30.10.2023
p.specht21.11.2021
R.Schneider20.11.2021
Uwe Lang20.11.2021
Di più...

Themeninformationen

Dieses Thema hat 2 subscriber:

iF (1x)
Julian Schmidt (1x)


Admins  |  AGB  |  Applications  |  Autori  |  Chat  |  Informativa sulla privacy  |  Download  |  Entrance  |  Aiuto  |  Merchantportal  |  Impronta  |  Mart  |  Interfaces  |  SDK  |  Services  |  Giochi  |  Cerca  |  Support

Ein Projekt aller XProfaner, die es gibt!


Il mio XProfan
Private Notizie
Eigenes Ablageforum
Argomenti-Merkliste
Eigene Beiträge
Eigene Argomenti
Zwischenablage
Annullare
 Deutsch English Français Español Italia
Traduzioni

Informativa sulla privacy


Wir verwenden Cookies nur als Session-Cookies wegen der technischen Notwendigkeit und bei uns gibt es keine Cookies von Drittanbietern.

Wenn du hier auf unsere Webseite klickst oder navigierst, stimmst du unserer Erfassung von Informationen in unseren Cookies auf XProfan.Net zu.

Weitere Informationen zu unseren Cookies und dazu, wie du die Kontrolle darüber behältst, findest du in unserer nachfolgenden Datenschutzerklärung.


einverstandenDatenschutzerklärung
Ich möchte keinen Cookie