English
Source / code snippets

cut out Ausstanzen shape Puzzle Sprite

 

Julian
Schmidt

CompileMarkSeparation
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


CompileMarkSeparation
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

...see: [...] 

6 kB
Hochgeladen:05/24/12
Downloadcounter196
Download
 
XProfan X2
Win7 Home Premium, SP1, AMD Athlon(tm) II Neo K125 Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
05/24/12  
 



in this Context is vlt. too The hPic.inc ( [...]  ) interestingly.
 
05/25/12  
 



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

5.762 Views

Untitledvor 0 min.
Heiko Dix10/30/23
p.specht11/21/21
R.Schneider11/20/21
Uwe Lang11/20/21
More...

Themeninformationen

this Topic has 2 subscriber:

iF (1x)
Julian Schmidt (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