start.bb 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. ;startup kludge
  2. ;
  3. Start3d_Kludge()
  4. Type GfxMode
  5. Field width,height,depth
  6. End Type
  7. Function Start3d_Kludge()
  8. If Windowed3D()
  9. yn$=Input$( "Use windowed mode?" )
  10. If Left$( Lower$( yn$ ),1 )="y"
  11. Graphics3D 640,480,0,2
  12. SetBuffer BackBuffer()
  13. Return
  14. EndIf
  15. EndIf
  16. Print ""
  17. Print "Display drivers:"
  18. Print "----------------"
  19. For k=1 To CountGfxDrivers()
  20. Print k+":"+GfxDriverName$(k)
  21. Next
  22. Print ""
  23. If CountGfxDrivers()>1
  24. Repeat
  25. driver=Input$( "Display driver (1-"+CountGfxDrivers()+"):" )
  26. Until driver>=1 And driver<=CountGfxDrivers()
  27. SetGfxDriver driver
  28. EndIf
  29. Print ""
  30. Print "Display modes:"
  31. Print "--------------"
  32. cnt=0
  33. For k=1 To CountGfxModes()
  34. If GfxMode3D(k)
  35. t.GfxMode=New GfxMode
  36. t\width=GfxModeWidth(k)
  37. t\height=GfxModeHeight(k)
  38. t\depth=GfxModeDepth(k)
  39. cnt=cnt+1
  40. Print cnt+":"+t\width+","+t\height+","+t\depth
  41. EndIf
  42. Next
  43. If Not cnt
  44. Print "No 3D Graphics modes available!"
  45. Print "Press any key..."
  46. WaitKey
  47. End
  48. EndIf
  49. Repeat
  50. mode=Input$( "Display Mode (1-"+cnt+"):" )
  51. Until mode>=1 And mode<=cnt
  52. t.GfxMode=First GfxMode
  53. While mode>1
  54. t=After t
  55. mode=mode-1
  56. Wend
  57. Graphics3D t\width,t\height,t\depth,1
  58. SetBuffer BackBuffer()
  59. Delete Each GfxMode
  60. End Function