home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 63 / CDACTUAL63.iso / Aplicaciones / DarkBasic / DemoDarkBasic.exe / help / examples / system / exam02.dba < prev    next >
Encoding:
Text File  |  1999-12-13  |  1.7 KB  |  79 lines

  1. Rem * Title  : Set Emulation Mode
  2. Rem * Author : DBS-MB
  3. Rem * Date   : 1st August 99
  4. rem ===========================================
  5. rem DARK BASIC EXAMPLE PROGRAM 2
  6. rem ===========================================
  7. rem This program will set software or hardware
  8. rem -------------------------------------------
  9.  
  10. rem Set the ink to white and paper color to black 
  11. ink rgb(244,214,210),1
  12.  
  13. rem What graphic card is dark baisc using 
  14. print "THE CURRENT GRAPHICS CARD IS CALLED ",current graphics card$()
  15.  
  16. rem This command will set dark basic not to use any 3d hardware
  17. print "SETING DARK BASIC TO USE 3D HARDWARE" 
  18. set emulation on
  19. draw to back
  20.  
  21. rem Pick a random pen color
  22. ink rgb(rnd(255),rnd(255),rnd(255)),1
  23.  
  24. make object cube 1,200.0 : sync on : backdrop off
  25. repeat
  26.  
  27.     cls
  28.     if emulation mode()=0
  29.         print "USING 3D HARDWARE ACCELERATION"
  30.     else
  31.         print "USING 3D SOFTWARE EMULATION"
  32.     endif
  33.     print "PLEASE PRESS LEFT MOUSE BUTTON"
  34.  
  35.     rem Spin 3D Cube
  36.     r#=wrapvalue(r#+4.0)
  37.     rotate object 1,r#,r#,0
  38.  
  39.     rem Update screen
  40.     sync
  41.  
  42. until mouseclick()=1
  43. delete object 1 : sync off
  44.  
  45. rem Clear the screen
  46. cls 
  47.  
  48. rem This command will set dark basic to use any 3d hardware 
  49. print "SET DARK BASIC TO NOT USE ANY 3D HARDWARE" 
  50. set emulation off
  51.  
  52. rem Pick a random pen color
  53. ink rgb(rnd(255),rnd(255),rnd(255)),1
  54.  
  55. make object cube 1,200.0 : sync on
  56. repeat
  57.  
  58.     cls
  59.     if emulation mode()=0
  60.         print "USING 3D HARDWARE ACCELERATION"
  61.     else
  62.         print "USING 3D SOFTWARE EMULATION"
  63.     endif
  64.     print "PLEASE PRESS LEFT MOUSE BUTTON"
  65.  
  66.     rem Spin 3D Cube
  67.     r#=wrapvalue(r#+4.0)
  68.     rotate object 1,r#,r#,0
  69.  
  70.     rem Update screen
  71.     sync
  72.  
  73. until mouseclick()=1
  74. delete object 1 : sync off
  75.  
  76. rem End the program
  77. end
  78.  
  79.