counter.bb 584 B

1234567891011121314151617181920212223242526272829
  1. ; Set display mode variables
  2. Const width=640,height=480,depth=16
  3. ; Set the display mode
  4. Graphics width,height,depth
  5. ;Draw to the back buffer
  6. SetBuffer BackBuffer ()
  7. counter = 1
  8. ;Set font to arial size 128
  9. fontno=LoadFont("verdana",128)
  10. SetFont fontno
  11. While Not KeyDown(1); Repeat the following loop until the escape key is pressed
  12. ;Set font colour to psychedelic
  13. Color Rnd(256),Rnd(256),Rnd(256)
  14. counter = counter + 1
  15. Cls; Clear screen
  16. ;Print current counter number to the screen 195 pixels across by 160 pixels high
  17. Text 195,160,counter
  18. ; Flip the screen buffers
  19. Flip
  20. Wend