006_counter 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. # counter
  2. if music_on <> music_on_prev or $music_theme <> $music_theme_prev:
  3. CLOSE $cur_theme[track[$music_theme_prev]]
  4. music_on_prev = music_on
  5. $music_theme_prev = $music_theme
  6. if $music_theme <>'':
  7. copyarr 'cur_theme', 'tracklist_<<$music_theme>>'
  8. track[$music_theme] = track[$music_theme]-1
  9. if track[$music_theme] < 0:
  10. track[$music_theme]=ARRSIZE('cur_theme')
  11. end
  12. end
  13. end
  14. if music_on=1 and $music_theme <> '':
  15. if no isplay ($cur_theme[track[$music_theme]]):
  16. track[$music_theme] = track[$music_theme]+1
  17. if ARRSIZE('cur_theme')<=track[$music_theme]:track[$music_theme]=0
  18. end
  19. play $cur_theme[track[$music_theme]],volume
  20. end
  21. !race
  22. if race_start=1:
  23. bcolor=rgb(255,255,255)
  24. REFINT
  25. *clr
  26. if race_hit=0:
  27. set race_miss=race_miss+1
  28. race_hit=1
  29. end
  30. if $race1[race_row]<>' ' and race_row>0:
  31. race_hit=0
  32. end
  33. '<center><B><<$car>></B></center>'
  34. !interior of the vehicle and the line route
  35. *PL $showcar
  36. *P $race1[race_row]
  37. if $race1[race_row]='<center>-------FINISH--------</center>':
  38. set race_start=0
  39. !return timer
  40. SETTIMER 500
  41. WAIT 2000
  42. !return point
  43. set $metka='finish'
  44. set $loc='RACE_COUNT'
  45. GOTO $loc, $metka
  46. end
  47. race_row=race_row+1
  48. end
  49. --- counter ---------------------------------