home *** CD-ROM | disk | FTP | other *** search
/ AMOS PD CD / amospdcd.iso / sourcecode / general / falling_nums.amos / falling_nums.amosSourceCode < prev    next >
Encoding:
AMOS Source Code  |  1993-02-25  |  1.6 KB  |  56 lines

  1. 'don't ask what this is about!! maybe the start of an educational game?? 
  2. '
  3. Rem raining
  4. Rem bobs 1-9 are digits 1-9 bob 10 is a 0
  5. Rem bob 11 is a +  bob 12 is a -  bob 13 is a X  bob 14 /  bob 15 is = 
  6. Rem bob 16 is pointer <    bob 17 pointer >
  7. '
  8. '
  9. Screen Open 0,336,200,16,Lowres
  10. Flash Off : Paper 0 : Curs Off : Cls 0 : Get Sprite Palette 
  11. Screen Open 1,336,16,4,Lowres
  12. Flash Off : Paper 0 : Curs Off : Cls 0 : Colour 1,$345
  13. Screen Display 1,,256,,
  14. Screen 0 : Rem All future operations should be directed at screen 0 
  15. Double Buffer : Rem Stop the flickering  
  16. Hide 
  17. SCORE=0 : Gosub SCOREUPDATE
  18. '
  19. '
  20. Rem turn sprite 17 to mouse pointer  
  21. Get Sprite Palette 
  22. Channel 15 To Sprite 1
  23. A$="L: Let X=XM; Let Y=YM; Jump L"
  24. Sprite 1,1,1,17 : Amal 1,A$ : Amal On 
  25. '
  26. '
  27. For A=1 To 10 : Channel A To Bob A : Next A
  28. ACR=16
  29. For A=1 To 10
  30. DWN=Rnd(100)
  31. Bob A,ACR,-DWN,A
  32. Move Y A,"( 1,1,310)"
  33. ACR=ACR+Rnd(32)+16
  34. Next A
  35. Move On 
  36. '  
  37. L:
  38. If Spritebob Col(1,1 To 10)
  39. Gosub CHECKHIT
  40. End If 
  41. Wait 10
  42. Goto L
  43. '===================================================================================================================================   ' 
  44. '
  45. SCOREUPDATE:
  46. If B=0 Then B=10
  47. SCORE=SCORE+B
  48. Screen 1 : Rem Direct all future output to screen number 1
  49. SCORE$=Right$("0000000"+Mid$(Str$(SCORE),2),7) : Rem Add a few zero's to the start of the score so that it looks more professional! 
  50. Pen 1 : Print At(17,0);SCORE$ : Rem print the amount of score of the screen at coardinates 17,0
  51. Screen 0 : Return : Rem Direct all future output to screen number 0
  52. CHECKHIT:
  53. For N=1 To 10
  54. If Col(N) Then B=N : Gosub SCOREUPDATE
  55. Next N
  56. Return