start.bb 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. SetGfx()
  2. Function SetGfx()
  3. If info1$<>""
  4. AppTitle info1$,"Exit "+info1$+" ?"
  5. EndIf
  6. FlushKeys()
  7. mode_cnt=CountGfxModes3D()
  8. If Not mode_cnt RuntimeError "Can't find any 3D graphics modes"
  9. mode=0
  10. If Not Windowed3D() mode=1
  11. Graphics 640,480,16,2
  12. SetBuffer BackBuffer()
  13. image=LoadImage( "b3dlogo.jpg" )
  14. If Not image image=LoadImage( "../b3dlogo.jpg" )
  15. MidHandle image
  16. font=LoadFont( "verdana",16 )
  17. SetFont font
  18. tx=640+160
  19. nx=-160
  20. ty=280
  21. url$="www.blitzbasic.com"
  22. url_x=640-StringWidth( url$ )
  23. url_y=480-FontHeight()
  24. Repeat
  25. Cls
  26. DrawBlock image,320,144
  27. Color 0,255,0
  28. Text tx,ty+FontHeight()*0,info1$,True
  29. Text nx,ty+FontHeight()*1,info2$,True
  30. Text tx,ty+FontHeight()*2,info3$,True
  31. Text nx,ty+FontHeight()*3,info4$,True
  32. Color 255,255,255
  33. If mode=0
  34. Text tx,ty+FontHeight()*5,"Windowed",True
  35. Else
  36. Text tx,ty+FontHeight()*5,GfxModeWidth( mode )+","+GfxModeHeight( mode )+","+GfxModeDepth( mode ),True
  37. EndIf
  38. Color 255,0,0
  39. Text nx,ty+FontHeight()*7,"[Return] to begin",True
  40. Text tx,ty+FontHeight()*8,"[Arrows] change mode",True
  41. Text nx,ty+FontHeight()*9,"[Escape] to exit",True
  42. Color 0,0,255
  43. Text url_x,url_y,url$
  44. If KeyHit( 1 ) End
  45. If KeyHit( 28 )
  46. Cls:Flip
  47. Cls:Flip
  48. FreeFont font
  49. FreeImage image
  50. EndGraphics
  51. If mode
  52. Graphics3D GfxModeWidth(mode),GfxModeHeight(mode),GfxModeDepth(mode),1
  53. Else
  54. Graphics3D 640,480,0,2
  55. EndIf
  56. SetBuffer BackBuffer()
  57. Return
  58. EndIf
  59. If KeyHit( 203 )
  60. mode=mode-1
  61. If mode<0 Or (mode=0 And (Not Windowed3D()))
  62. mode=mode_cnt
  63. EndIf
  64. Else If KeyHit( 205 )
  65. mode=mode+1
  66. If mode>mode_cnt
  67. mode=0
  68. If Not Windowed3D() mode=1
  69. EndIf
  70. EndIf
  71. If tx>320 tx=tx-8
  72. If nx<320 nx=nx+8
  73. Flip
  74. Forever
  75. End Function