home *** CD-ROM | disk | FTP | other *** search
/ AMOS PD CD / amospdcd.iso / 451-475 / apd472 / meter.amos / meter.amosSourceCode < prev    next >
AMOS Source Code  |  1993-03-13  |  720b  |  49 lines

  1. ' < to decrease volume 
  2. ' > to increase volume 
  3. '
  4. Double Buffer 
  5. Flash Off : Curs Off : Hide : Cls 0
  6. Get Sprite Palette 
  7. Degree 
  8. '
  9. Global X,Y,X1,Y1,X2,Y2,ANGLE,LONG,V,T$
  10. X=120 : Y=80 : X1=X+47 : Y1=Y+49 : X2=X1 : Y2=Y+10 : ANGLE=90 : LONG=39 : V=0
  11. '
  12. Music 1
  13. Proc VOL
  14. '
  15. Do 
  16.    '
  17.    T$=Inkey$
  18.    If T$<>"" Then Proc VOL
  19.    Clear Key 
  20.    T$=""
  21.    Wait Vbl 
  22.    '
  23. Loop 
  24. '
  25. Procedure RDR
  26.    '
  27.    Ink 0 : Draw X1,Y1 To X2,Y2
  28.    Proc CALC
  29.    Ink 2 : Draw X1,Y1 To X2,Y2
  30.    Bob 1,X,Y,1
  31.    '
  32. End Proc
  33. '
  34. Procedure VOL
  35.    '
  36.    If T$="," and V>0 Then Dec V
  37.    If T$="." and V<31 Then Inc V
  38.    Mvolume V*2
  39.    Proc RDR
  40.    '
  41. End Proc
  42. '
  43. Procedure CALC
  44.    '
  45.    ANGLE=(V*4)+27
  46.    Y2=Y1-Sin(ANGLE)*LONG
  47.    X2=X1-Cos(ANGLE)*LONG
  48.    '
  49. End Proc