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

  1. ;demo07-07.bb - Demonstrates the use of ScaleImage
  2. Graphics 1024,768
  3.  
  4. ;Set automidhandle to true
  5. AutoMidHandle True
  6.  
  7. ;IMAGES
  8. ;Load the spaceship that will be drawn on screen
  9. spaceshipimage = LoadImage("spaceship.bmp")
  10.  
  11. ;Draw the space ship directly in the center of the screen
  12. DrawImage spaceshipimage, 512,384
  13.  
  14. ;Find out what the player wants the x and y scaling factors to be
  15. xs# = Input("What would you like the x scaling value to be? ")
  16. ys# = Input("What would you like the y scaling value to be? ")
  17.  
  18. ;Prepare the screen for the scaled spaceship by clearing it
  19. Cls
  20. ;Scale the image
  21. ScaleImage spaceshipimage, xs#,ys#
  22.  
  23. ;Draw the new scaled spaceship
  24. DrawImage spaceshipimage, 512,384
  25.  
  26. Print "This is your updated image"
  27. Print "Press any key to exit"
  28.  
  29. ;Wait for user to press a key before exiting
  30. WaitKey