home *** CD-ROM | disk | FTP | other *** search
/ Amoszine 5 / Amoszine 5.adf / LHA_ARCHIVES / POWERBOBS_DEMO.lha / AZ_POWERBOB_DEMO / AMAL_PBOBS.AMOS / AMAL_PBOBS.amosSourceCode
Encoding:
AMOS Source Code  |  1980-02-10  |  1.8 KB  |  93 lines

  1. Screen Open 0,320,200,32,L
  2. Load "dh1:power_bobs/demo.abk"
  3. Hide On 
  4. For I=1 To 15
  5.    Cls 0
  6.    Circle 16,16,I
  7.    Get Bob I,0,0 To 32,32
  8. Next 
  9. Unpack 10 To 0
  10. Bob Update Off 
  11. Sprite Update Off 
  12. Double Buffer 
  13. Autoback 0
  14. Make Mask 
  15.  Extension_13_0006 8
  16.  Extension_13_0094 True
  17. For I=1 To 8
  18.     Extension_13_003C I,32
  19. Next 
  20.  Extension_13_00FE 
  21. '
  22. 'Don't bother about the AMAL setup, just for testing...
  23. '
  24. For I=0 To 8 Step 2
  25. A$="Let X=Z(120);Let Y=Z(100)+Z(50);Let R0=-1;Let R1=-1;Let A=Z(12)+2;"
  26. A$=A$+"Loop: P ;P;"
  27. A$=A$+"Let X=X+R0 ;"
  28. A$=A$+"If X>250 Jump Reset ;"
  29. A$=A$+"If X<0 Jump Reset ;"
  30. A$=A$+"Let A=A+R1;"
  31. A$=A$+"If A<2 Jump Image;"
  32. A$=A$+"If A>14 Jump Image;"
  33. A$=A$+"Jump Loop ;"
  34. A$=A$+"Reset: ;"
  35. A$=A$+"Let R0=R0*-1 ;"
  36. A$=A$+"Jump Loop ;"
  37. A$=A$+"Image: ;"
  38. A$=A$+"Let R1=R1*-1 ;"
  39. A$=A$+"Jump Loop ;"
  40. Amal I,A$
  41. Next 
  42. For I=1 To 7 Step 2
  43. A$="Let X=Z(220)+Z(50); Let Y=Z(160)+Z(10);Let R0=1;Let R1=1;Let A=Z(12)+2;"
  44. A$=A$+"Loop: P ;P;"
  45. A$=A$+"Let X=X+R0 ;"
  46. A$=A$+"If X>250 Jump Reset ;"
  47. A$=A$+"If X<0 Jump Reset ;"
  48. A$=A$+"Let A=A+R1;"
  49. A$=A$+"If A<2 Jump Image;"
  50. A$=A$+"If A>14 Jump Image;"
  51. A$=A$+"Jump Loop ;"
  52. A$=A$+"Reset: ;"
  53. A$=A$+"Let R0=R0*-1 ;"
  54. A$=A$+"Jump Loop ;"
  55. A$=A$+"Image: ;"
  56. A$=A$+"Let R1=R1*-1 ;"
  57. A$=A$+"Jump Loop ;"
  58. Amal I,A$
  59. Next 
  60. '
  61. 'Assign the Pbobs to an Amal channel...
  62. '
  63. For I=2 To 9
  64.  Extension_13_0272 I-2 To I-1
  65. Next 
  66. '
  67. 'Let's go !
  68. '
  69. Amal On 
  70.  Extension_12_0016 
  71. R=Execall(-132)
  72. ' Whe use 2 Pause instructions in the Amal progs, so synchronize it to 
  73. ' the same speed.
  74.  Extension_13_02A0 2
  75. Repeat 
  76. ' Ok transfer the X/Y and A values to the Pbobs. 
  77. '
  78.     Extension_13_028C 1 To 8
  79. '
  80. '  Try it with Pbob Clear/Draw, it also works...isn't this GREAT ??? 
  81. '   Pbob Clear 1 To 8
  82. '   Pbob Draw 1 To 8 
  83. '
  84. '
  85.     Extension_13_00FE 
  86.    Screen Swap 
  87.    Wait Vbl 
  88. Until Extension_12_0392 
  89. R=Execall(-138)
  90.  Extension_12_0006 
  91. Erase 1
  92. Erase 10
  93. End