home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 63 / CDACTUAL63.iso / Aplicaciones / DarkBasic / DemoDarkBasic.exe / help / examples / matrix3d / exam05.dba < prev    next >
Encoding:
Text File  |  1999-09-07  |  939 b   |  49 lines

  1. Rem * Title  : Matrix Scrolling
  2. Rem * Author : DBS-LB
  3. Rem * Date   : 1st Sept 99
  4. rem ===========================================
  5. rem DARK BASIC EXAMPLE PROGRAM 5
  6. rem ===========================================
  7. rem This program will tile shift a matrix
  8. rem -------------------------------------------
  9.  
  10. load bitmap "floor1.bmp",1
  11. get image 1,0,0,256,256
  12. delete bitmap 1
  13.  
  14. rem Make a matrix
  15. make matrix 1,5000,5000,25,25
  16.  
  17. rem Prepare matrix with a texture cut into a 2x2 texture grid 
  18. prepare matrix texture 1,1,2,2
  19. fill matrix 1,0,3
  20.  
  21. rem Randomize the matrix
  22. randomize matrix 1,300.0
  23.  
  24. rem Position camera
  25. position camera 2500,800,-200
  26. point camera 2500,0,2500
  27.  
  28. rem Activate manual sync
  29. sync on
  30.  
  31. rem Begin main loop
  32. while mouseclick()=0
  33.  
  34. rem Scroll the matrix up
  35. shift matrix up 1
  36.  
  37. rem Syncronise
  38. sync
  39.  
  40. rem End main loop
  41. endwhile
  42.  
  43. rem Delete the matrix
  44. delete matrix 1
  45.  
  46. rem End the program
  47. end
  48.  
  49.