home *** CD-ROM | disk | FTP | other *** search
/ Game Programming for Teens / GameProgrammingForTeens.iso / Source / chapter07 / demo07-09.bb < prev    next >
Encoding:
Text File  |  2003-04-06  |  716 b   |  32 lines

  1. ;demo07-09.bb - Demonstrates Rotation
  2.  
  3. Graphics 800,600
  4.  
  5. ;Make sure you handle images from center
  6. AutoMidHandle True
  7.  
  8. ;IMAGES
  9. ;Load the image we will be rotating
  10. shipimage = LoadImage ("bullet.bmp")
  11.  
  12. Print "Welcome to the rotation program."
  13.  
  14. ;Draw the beginning image
  15. DrawImage shipimage,400,300
  16.  
  17. ;Find out what the rotation value is
  18. rotationvalue# = Input ( "How many degrees would you like to rotate the image? ")
  19.  
  20. ;Rotate the Image
  21. RotateImage shipimage, rotationvalue#
  22.  
  23.  
  24. Print "Your new image is now drawn on the screen"
  25.  
  26. ;Draw the new and rotated image on the screen
  27. DrawImage shipimage, 440,300
  28.  
  29. Print "Press any key to exit"
  30.  
  31. ;Wait for user to press a key before exiting
  32. WaitKey