home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 4: Phase Four / 17Bit_Phase_Four.iso / files / 3023.dms / 3023.adf / Source-Code / Amos_Loader / Amos_Loader.amosSourceCode next >
Encoding:
AMOS Source Code  |  1994-02-21  |  8.1 KB  |  139 lines

  1. '
  2. ' Amos Loader  - Written By: John White.   
  3. ' ^^^^^^^^^^^    
  4. '
  5. ' You can edit/alter this program til the cows come home for all I care. 
  6. ' All I ask is that you leave the P.D/Copyright notice on the screen.
  7. '
  8. ' Just press the key on the button (or click on the button with mouse key 1) 
  9. ' to activate that button's menu.
  10. '
  11. ' Click Mouse Key 2 to toggle between each column.   
  12. '
  13. ' All the calculations are precise to the button positions of this screen    
  14. ' so if you want to alter the button positions then check the calculations 
  15. ' before altering the button positions.  
  16. '
  17. '             Here are 2 useful ways to use this Loader -    
  18. '
  19. ' 1. Leave it like this (in Amos Basic) and call it 'Autoexec.Amos'
  20. '    for use with your Auto-Loading Ramos disk.      
  21. '  
  22. ' 2. Compile it and then Execute it in your Startup-Sequence 
  23. '    for use with your Auto-Boot Disk. 
  24. '
  25. ' I've used the Z range of Variables and Arrays so its easier for you to merge     
  26. ' this loader into your own program. I.e. Most people start using Variables    
  27. ' and Arrays from the A (or AA,AB,AC/AA,BB,CC etc) range before using the Z  
  28. ' range in their programs. This loader has left you Variables ZS to ZZ to use. 
  29. ' It's used Variables ZA to ZQ, Z and ZZ$. It's used Arrays ZR and Z$.   
  30. '
  31. Close Editor : Screen Open 0,640,275,8,Hires : Curs Off : Screen Hide 0 : Get Sprite Palette : Flash Off : Cls 0 : Screen Display 0,128,33,640,275 : Screen Offset 0,0,0 : Paste Bob 0,7,3 : Paste Bob 320,7,4 : Dim Z$(17) : Dim ZR(7)
  32. Z$(0)="F1" : Z$(1)="F2" : Z$(2)="F3" : Z$(3)="F4" : Z$(4)="F5" : Z$(5)="F6" : Z$(6)="F7" : Z$(7)="F8" : Z$(8)="F9" : Z$(9)="01" : Z$(10)="02" : Z$(11)="03" : Z$(12)="04" : Z$(13)="05" : Z$(14)="06" : Z$(15)="07" : Z$(16)="08" : Z$(17)="09"
  33. For Z=44 To 236 Step 24 : Paste Bob 8,Z,1 : Paste Bob 320,Z,1 : Next Z : Paper 3 : ZA=0 : For Z=6 To 30 Step 3 : Print At(2,Z);Z$(ZA);At(41,Z);Z$(ZA+9) : ZA=ZA+1 : Next Z : ZG=0 : ZH=0 : ZN=0
  34. Paper 0 : Print At(8,6);"Text Reader";At(8,9);"IFF loader";At(8,12);"Packed Screen Loader";At(8,15);"PPMore File Loader";At(8,18);"Load Favourite Game";At(8,21);"Load a Amos Program" : Paper 7 : Print At(1,2);"You could use this space for your Logo"
  35. Paper 0 : Print At(4,32);"Amos Loader is Public Domain - (c) John White, 1993. All rights reserved."
  36. Limit Mouse 138,77 To 138,283 : X Mouse=138 : For Z=0 To 7 : ZR(Z)=Colour(Z) : Colour Z,0 : Next Z : Screen Show 0 : Fade 1,ZR(0),ZR(1),ZR(2),ZR(3),ZR(4),ZR(5),ZR(6),ZR(7) : Wait 15 : Paper 6
  37. 3
  38. ZQ=1 : Reserve Zone 18 : For Z=44 To 236 Step 24 : Set Zone ZQ,6,Z To 38,Z+14 : ZQ=ZQ+1 : Next Z : For Z=44 To 236 Step 24 : Set Zone ZQ,320,Z To 350,Z+14 : ZQ=ZQ+1 : Next Z
  39. 4
  40. ZZ$=Inkey$ : ZA=Scancode : ZB=Mouse Zone : ZC=Mouse Click : ZD=X Mouse : If ZC=0 and ZA<1 or ZA>9 Then If ZA<80 or ZA>88 Then Goto 4
  41. If ZA=80 or ZB=1 and ZC=1 Then Paste Bob 8,44,2 : Wait Vbl : Print At(2,6);"F1"
  42. If ZA=81 or ZB=2 and ZC=1 Then Paste Bob 8,68,2 : Wait Vbl : Print At(2,9);"F2"
  43. If ZA=82 or ZB=3 and ZC=1 Then Paste Bob 8,92,2 : Wait Vbl : Print At(2,12);"F3"
  44. If ZA=83 or ZB=4 and ZC=1 Then Paste Bob 8,116,2 : Wait Vbl : Print At(2,15);"F4"
  45. If ZA=84 or ZB=5 and ZC=1 Then Paste Bob 8,140,2 : Wait Vbl : Print At(2,18);"F5"
  46. If ZA=85 or ZB=6 and ZC=1 Then Paste Bob 8,164,2 : Wait Vbl : Print At(2,21);"F6"
  47. If ZA=86 or ZB=7 and ZC=1 Then Paste Bob 8,188,2 : Wait Vbl : Print At(2,24);"F7"
  48. If ZA=87 or ZB=8 and ZC=1 Then Paste Bob 8,212,2 : Wait Vbl : Print At(2,27);"F8"
  49. If ZA=88 or ZB=9 and ZC=1 Then Paste Bob 8,236,2 : Wait Vbl : Print At(2,30);"F9"
  50. If ZA=1 or ZB=10 and ZC=1 Then Paste Bob 320,44,2 : Wait Vbl : Print At(41,6);"01"
  51. If ZA=2 or ZB=11 and ZC=1 Then Paste Bob 320,68,2 : Wait Vbl : Print At(41,9);"02"
  52. If ZA=3 or ZB=12 and ZC=1 Then Paste Bob 320,92,2 : Wait Vbl : Print At(41,12);"03"
  53. If ZA=4 or ZB=13 and ZC=1 Then Paste Bob 320,116,2 : Wait Vbl : Print At(41,15);"04"
  54. If ZA=5 or ZB=14 and ZC=1 Then Paste Bob 320,140,2 : Wait Vbl : Print At(41,18);"05"
  55. If ZA=6 or ZB=15 and ZC=1 Then Paste Bob 320,164,2 : Wait Vbl : Print At(41,21);"06"
  56. If ZA=7 or ZB=16 and ZC=1 Then Paste Bob 320,188,2 : Wait Vbl : Print At(41,24);"07"
  57. If ZA=8 or ZB=17 and ZC=1 Then Paste Bob 320,212,2 : Wait Vbl : Print At(41,27);"08"
  58. If ZA=9 or ZB=18 and ZC=1 Then Paste Bob 320,236,2 : Wait Vbl : Print At(41,30);"09"
  59. If ZD=138 and ZC=2 or ZA=33 Then Limit Mouse 294,77 To 294,283 : X Mouse=294
  60. If ZD=294 and ZC=2 or ZA=32 Then Limit Mouse 138,77 To 138,283 : X Mouse=138
  61. If ZA>0 Then Gosub 5 : Gosub 9
  62. If ZB>0 and ZC=1 Then Gosub 7 : Gosub 9
  63. Goto 4
  64. 5
  65. If ZH=1 Then ZP=ZA : If ZP=ZM Then ZH=0 : Paper 6 : Paste Bob ZK,ZJ,2 : Wait Vbl : If ZM=>80 and ZM<89 Then Print At(2,ZL);Z$(ZM-80) Else Print At(41,ZL);Z$(ZM+8)
  66. If ZH=1 and ZP<>ZM Then ZH=0 : Paper 3 : Paste Bob ZK,ZJ,1 : Wait Vbl : If ZM=>80 and ZM<89 Then Print At(2,ZL);Z$(ZM-80) Else Print At(41,ZL);Z$(ZM+8)
  67. ZM=ZA : If ZH=0 and ZN=1 and ZM-79<>ZE or ZH=0 and ZN=1 and ZM+9<>ZE Then Gosub 8 : Paper 3 : Paste Bob ZF,ZI,1 : Wait Vbl : If ZE<10 Then Print At(2,ZE*3+3);Z$(ZE-1) Else Print At(41,ZE*3-24);Z$(ZE-1)
  68. If ZH=0 and ZN=1 and ZM-79=ZE or ZH=0 and ZN=1 and ZM+9=ZE Then Gosub 8 : Paper 6 : Paste Bob ZF,ZI,2 : Wait Vbl : If ZE<10 Then Print At(2,ZE*3+3);Z$(ZE-1) Else Print At(41,ZE*3-24);Z$(ZE-1)
  69. Gosub 6 : Add ZH,1 : Paper 6 : ZN=2 : Return 
  70. 6
  71. If ZA=80 or ZA=1 Then ZJ=44
  72. If ZA=81 or ZA=2 Then ZJ=68
  73. If ZA=82 or ZA=3 Then ZJ=92
  74. If ZA=83 or ZA=4 Then ZJ=116
  75. If ZA=84 or ZA=5 Then ZJ=140
  76. If ZA=85 or ZA=6 Then ZJ=164
  77. If ZA=86 or ZA=7 Then ZJ=188
  78. If ZA=87 or ZA=8 Then ZJ=212
  79. If ZA=88 or ZA=9 Then ZJ=236
  80. If ZA=>80 and ZA<89 Then ZK=8 : ZL=ZA*3-234 Else ZK=320 : ZL=ZA*3+3
  81. Return 
  82. 7
  83. If ZG=1 Then ZO=ZB : If ZO=ZE Then ZG=0 : Gosub 8 : Paper 6 : Paste Bob ZF,ZI,2 : Wait Vbl : If ZE<10 Then Print At(2,ZE*3+3);Z$(ZE-1) Else Print At(41,ZE*3-24);Z$(ZE-1)
  84. If ZG=1 and ZO<>ZE Then ZG=0 : Gosub 8 : Paper 3 : Paste Bob ZF,ZI,1 : Wait Vbl : If ZE<10 Then Print At(2,ZE*3+3);Z$(ZE-1) Else Print At(41,ZE*3-24);Z$(ZE-1)
  85. ZF=X Screen(ZD)-12 : ZE=ZB : If ZG=0 and ZN=2 and ZE<>ZM-79 or ZG=0 and ZN=2 and ZE<>ZM+9 Then Paper 3 : Paste Bob ZK,ZJ,1 : Wait Vbl : If ZM=>80 and ZM<89 Then Print At(2,ZL);Z$(ZM-80) Else Print At(41,ZL);Z$(ZM+8)
  86. If ZG=0 and ZN=2 and ZE=ZM-79 or ZG=0 and ZN=2 and ZE=ZM+9 Then Paper 6 : Paste Bob ZK,ZJ,2 : Wait Vbl : If ZM=>80 and ZM<89 Then Print At(2,ZL);Z$(ZM-80) Else Print At(41,ZL);Z$(ZM+8)
  87. Add ZG,1 : Paper 6 : ZN=1 : Return 
  88. 8
  89. If ZE=1 or ZE=10 Then ZI=44
  90. If ZE=2 or ZE=11 Then ZI=68
  91. If ZE=3 or ZE=12 Then ZI=92
  92. If ZE=4 or ZE=13 Then ZI=116
  93. If ZE=5 or ZE=14 Then ZI=140
  94. If ZE=6 or ZE=15 Then ZI=164
  95. If ZE=7 or ZE=16 Then ZI=188
  96. If ZE=8 or ZE=17 Then ZI=212
  97. If ZE=9 or ZE=18 Then ZI=236
  98. Return 
  99. 9
  100. If ZB>0 and ZC=1 Then Gosub 10+ZB
  101. If ZA=>80 and ZA<89 Then Gosub ZA-69
  102. If ZA=>1 and ZA<10 Then Gosub 19+ZA
  103. Return 
  104. 11
  105. Print At(1,32); : Cline : Print "You pressed ";Z$(0);" or the Mouse Key" : Return 
  106. 12
  107. Print At(1,32); : Cline : Print "You pressed ";Z$(1);" or the Mouse Key" : Return 
  108. 13
  109. Print At(1,32); : Cline : Print "You pressed ";Z$(2);" or the Mouse Key" : Return 
  110. 14
  111. Print At(1,32); : Cline : Print "You pressed ";Z$(3);" or the Mouse Key" : Return 
  112. 15
  113. Print At(1,32); : Cline : Print "You pressed ";Z$(4);" or the Mouse Key" : Return 
  114. 16
  115. Print At(1,32); : Cline : Print "You pressed ";Z$(5);" or the Mouse Key" : Return 
  116. 17
  117. Print At(1,32); : Cline : Print "You pressed ";Z$(6);" or the Mouse Key" : Return 
  118. 18
  119. Print At(1,32); : Cline : Print "You pressed ";Z$(7);" or the Mouse Key" : Return 
  120. 19
  121. Print At(1,32); : Cline : Print "You pressed ";Z$(8);" or the Mouse Key" : Return 
  122. 20
  123. Print At(1,32); : Cline : Print "You pressed ";Z$(9);" or the Mouse Key" : Return 
  124. 21
  125. Print At(1,32); : Cline : Print "You pressed ";Z$(10);" or the Mouse Key" : Return 
  126. 22
  127. Print At(1,32); : Cline : Print "You pressed ";Z$(11);" or the Mouse Key" : Return 
  128. 23
  129. Print At(1,32); : Cline : Print "You pressed ";Z$(12);" or the Mouse Key" : Return 
  130. 24
  131. Print At(1,32); : Cline : Print "You pressed ";Z$(13);" or the Mouse Key" : Return 
  132. 25
  133. Print At(1,32); : Cline : Print "You pressed ";Z$(14);" or the Mouse Key" : Return 
  134. 26
  135. Print At(1,32); : Cline : Print "You pressed ";Z$(15);" or the Mouse Key" : Return 
  136. 27
  137. Print At(1,32); : Cline : Print "You pressed ";Z$(16);" or the Mouse Key" : Return 
  138. 28
  139. Print At(1,32); : Cline : Print "You pressed ";Z$(17);" or the Mouse Key" : Return