| |
|
|
Julian Schmidt | CompileMarkSeparationRandomize
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
CompileMarkSeparationRandomize
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: [...] |
|
|
| |
|
|
|
| in this Context is vlt. too The hPic.inc ( [...] ) interestingly. |
|
|
| |
|
|