home *** CD-ROM | disk | FTP | other *** search
- Rem * Title : Flipping a Bob
- Rem * Author : DBS-MB
- Rem * Date : 1st August 99
- rem ===================================================
- rem DARK BASIC EXAMPLE PROGRAM 8
- rem ===================================================
- rem This program will draw and flip a bob on screen
- rem ---------------------------------------------------
-
- rem Set the ink to white and paper color to black
- ink rgb(244,214,210),1
-
- rem Load a bitmap on to the screen
- load bitmap "face.bmp"
-
- rem Grab image 1 from bitmap
- get image 1,18,17,156,196
-
- rem Clear the Screen
- cls
-
- rem Now we will make a bob
- bob 1,100,100,1
-
- rem get bob width and find the middle of it going across
- rem get bob height and find the middle of it going down
- rem new offset for bob 1
-
- offset bob 1,(bob width(1)/2),(bob height(1)/2)
-
- rem the is were on screen bob will appear
- acrossscreen=(640/2)
- downscreen=(480/2)
-
- rem press left mouse button to quit
- rem move mouse left,right,up and down to stretch bob
-
- print "the flip bob command"
- repeat
-
- rem flip bob
- flip bob 1
-
- rem draw the bob at the new position
- bob 1,acrossscreen,downscreen,1
-
- until mouseclick()=1
-
- rem clear the screen
- cls
-
- rem remove the bob from memory
- delete bob 1
-
- rem remove image 1 from memory
- delete image 1
-
- rem End the program
- end
-