start.bb 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. ;Logo()
  2. SetGfx()
  3. Type GfxMode
  4. Field width,height,depth
  5. End Type
  6. Function Logo()
  7. Graphics3D 640,480
  8. SetBuffer BackBuffer()
  9. image=LoadImage( "b3dlogo.jpg" )
  10. If image=0 image=LoadImage( "../b3dlogo.jpg" )
  11. MidHandle image
  12. Color 255,0,0
  13. SetFont LoadFont( "helvetica",16 )
  14. t=MilliSecs()
  15. txt1$="(C)opyright Blitz Research Limited"
  16. txt2$="Published by Guildhall Leisure Services"
  17. txt3$="Find out more at www.blitz-3d.com"
  18. yy=320
  19. Repeat
  20. Cls
  21. DrawBlock image,320,yy-120
  22. Color 0,0,192
  23. Text 0,480-FontHeight()*2,txt1$
  24. Text 0,480-FontHeight()*1,txt2$
  25. Color 0,255,0
  26. Text 640-StringWidth(txt3$),480-FontHeight()*1,txt3$
  27. Color 255,0,0
  28. Text 320,yy+FontHeight()*0,info1$,True,True
  29. Text 320,yy+FontHeight()*1,info2$,True,True
  30. Text 320,yy+FontHeight()*2,info3$,True,True
  31. Text 320,yy+FontHeight()*3,info4$,True,True
  32. d=MilliSecs()-t
  33. If d>5000
  34. If tick=0
  35. tick=127
  36. FlushKeys
  37. Else
  38. tick=tick-1
  39. If tick=0 tick=127
  40. EndIf
  41. If tick And 64
  42. Color 255,255,255
  43. Text 320,yy+FontHeight()*5,"Press any key",True,True
  44. EndIf
  45. If GetKey() Then Exit
  46. EndIf
  47. Flip
  48. Forever
  49. For k=1 To 2
  50. Cls:Flip
  51. Next
  52. FreeImage image
  53. FlushKeys
  54. End Function
  55. Function SetGfx()
  56. Print info1$:Print info2$:Print info3$:Print info4$:Print
  57. If Windowed3D()
  58. yn$=Input$( "Use windowed mode?" )
  59. If Left$( Lower$( yn$ ),1 )="y"
  60. HidePointer
  61. Graphics3D 640,480,0,2
  62. SetBuffer BackBuffer()
  63. Return
  64. EndIf
  65. EndIf
  66. Print ""
  67. Print "Display drivers:"
  68. Print "----------------"
  69. For k=1 To CountGfxDrivers()
  70. Print k+":"+GfxDriverName$(k)
  71. Next
  72. Print ""
  73. If CountGfxDrivers()>1
  74. Repeat
  75. driver=Input$( "Display driver (1-"+CountGfxDrivers()+"):" )
  76. Until driver>=1 And driver<=CountGfxDrivers()
  77. SetGfxDriver driver
  78. EndIf
  79. Print ""
  80. Print "Display modes:"
  81. Print "--------------"
  82. cnt=0
  83. For k=1 To CountGfxModes()
  84. If GfxMode3D(k)
  85. t.GfxMode=New GfxMode
  86. t\width=GfxModeWidth(k)
  87. t\height=GfxModeHeight(k)
  88. t\depth=GfxModeDepth(k)
  89. cnt=cnt+1
  90. Print cnt+":"+t\width+","+t\height+","+t\depth
  91. EndIf
  92. Next
  93. If Not cnt
  94. Print "No 3D Graphics modes available!"
  95. Print "Press any key..."
  96. WaitKey
  97. End
  98. EndIf
  99. Repeat
  100. mode=Input$( "Display Mode (1-"+cnt+"):" )
  101. Until mode>=1 And mode<=cnt
  102. t.GfxMode=First GfxMode
  103. While mode>1
  104. t=After t
  105. mode=mode-1
  106. Wend
  107. Graphics3D t\width,t\height,t\depth,1
  108. SetBuffer BackBuffer()
  109. Delete Each GfxMode
  110. End Function