home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 10 / amigaformatcd10.iso / -in_the_mag- / emulation / theemulator / drive_inf / £.ptrain (.txt) < prev    next >
RISC OS BBC BASIC V Source  |  1989-10-20  |  6KB  |  287 lines

  1. <>&E00 
  2. :?&E04=244
  3. * (C) Anita Straker
  4. mode(1)
  5. initialise:
  6. title
  7. mode(7):
  8. options:
  9. CH=4 
  10. info:
  11. mode(1):
  12. 19,1,4;0;19,2,3;0;:
  13. CH=1 
  14. 19,1,1;0;19,2,2;0;
  15. CH=3 
  16. 19,1,2;0;19,2,1;0;
  17. numbers
  18. 11:M%(K)=0:
  19. c(" Fill the train with "+
  20. (tot)+" people",2,W$)
  21. line(NT)
  22. CLS(27)
  23. total=0:
  24. 130:total=total+M%(K):
  25. (total),4,DO+2,
  26. 128):
  27. total<>tot 
  28. 28,0,4,39,0,12,26:
  29. c(" That's "+
  30. (total),2,R$):
  31. return:
  32. CLS(28)
  33. 28,0,4,39,0,12,26:
  34. total=tot 
  35. reward 
  36. c("Here's one way",2,W$):
  37. correct
  38. space
  39. return
  40. CLS(28):
  41. b("Press",13,28,W$):
  42. b("RETURN",19,28,
  43. 130):*FX15
  44. WAIT(T)
  45. (100*T):
  46. space
  47. 10,28)"  Press the SPACE bar  ":
  48. 320,128:
  49. 1052,128:
  50.  G=32:
  51. c(wx$,Y,COL$):
  52. b(wx$,
  53. ((40-
  54. (wx$))/2)-2,Y,COL$):
  55. arrow(I1,I2)
  56. *FX15,0
  57. I0=I1 
  58.  I0=I2
  59. CLS(D%)
  60. 28,0,d%,39,D%,12,26
  61. 23;11,0;0;0;0:
  62. 23;11,255;0;0;0:
  63. mode(N1)
  64. off:d%=24:
  65. N1<5 d%=31
  66. *FX 4,0
  67. *FX 12,0
  68. "INDEX":
  69. " in line ";
  70. options
  71. b("Choice Page",14,1,G$):
  72. b("You can:",0,4,W$)
  73. b("A  "+W$+"play the easy game",0,7,G$)
  74. b("B  "+W$+"play the average game",0,9,G$)
  75. b("C  "+W$+"play the hard  game",0,11,G$)
  76. b("D  "+W$+"see the notes",0,13,G$)
  77. b("E  "+W$+"stop",0,15,G$)
  78. b("Type a letter then"+G$+"RETURN",0,20,W$)
  79. BOX1(3,32,19,W$)
  80. 35,21);:
  81. (IN$)-64:
  82. numbers
  83. !F=-5*(CH=1)-9*(CH=2)-9*(CH=3)
  84. (F):B=
  85. (C=B 
  86. CH=1 NT=3+
  87.  NT=6+
  88. !F=-3*(CH=1)-4*(CH=2)-5*(CH=3)
  89.  )A1=
  90. CH<3 B1=NT-A1:C1=0:C=0:
  91. A1+B1>=NT 
  92. C1=NT-(A1+B1)
  93. tot=A1*A+B1*B+C1*C
  94. b(A$,X,Y,cl$)
  95. (cl$)-128
  96. N:A%=135:
  97. (&FFF4)
  98.  &FF0000)
  99. &10000=7
  100. 2A%=&A:X%=0:Y%=&A:D=&A00:
  101. (A$):B$=
  102. A$,N,1)
  103. (B$):
  104. (&FFF1)
  105. 23,254,0,D?1,D?1,D?2,D?2,D?3,D?3,D?4:
  106. 23,255,D?4,D?5,D?5,D?6,D?6,D?7,D?7,D?8
  107. X+N+1,Y)
  108. X+N+1,Y+1)
  109. X,Y)DH$cl$A$
  110. X,Y+1)DH$cl$A$;
  111. on:*FX15,1
  112. "AaBbCcDdEe",
  113. ):Q=(1+Q)
  114. (Q+64)
  115. b(IN$,
  116. -1,G$)
  117. Q=127 
  118. b(" "+
  119. -1,W$):
  120. Q=13 
  121. BOX1(LL,X1,Y2,col$)
  122. BOXcol=
  123. (col$)+16
  124. X1-1,Y2);
  125. BOXcol,183,163:
  126. 163,235
  127. X1-2,Y2+1);:
  128. 141BOXcol,181,32:
  129. BOXcol,234
  130. Y2=Y2+1:
  131. X1-1,Y2+1);
  132. BOXcol,245,240:
  133. 240,250
  134. title
  135. TL$="PLAY TRAIN"
  136. *FX 4,1
  137. *FX 11,0
  138. line(3):
  139. reward
  140. c(TL$,19,W$)
  141. 11,26)"Sound on (Y or N)? ";
  142. "YyNn",
  143. Q=(1+Q)
  144. *FX210,1
  145. *FX210,0
  146. c(TL$,1,G$)
  147. b("In this game you must fill carriages",0,4,W$):
  148. b("on a train with people.  You must put",0,6,W$):
  149. b("some people in EACH carriage, and you",0,8,W$):
  150. b("can only use the given numbers.",0,10,W$)
  151. c("REMEMBER",13,G$):
  152. b("Press"+G$+"DELETE"+W$+"to rub out a number",0,16,W$):
  153. b("Press"+G$+"RETURN"+W$+"when your train is ready",0,18,W$)
  154. b("Press"+G$+"ESCAPE"+W$+"to return to"+G$+"Choice Page",0,20,W$)
  155. b("Press"+R$+"_]"+W$+"to go on",9,23,W$):
  156. arrow(137,137)
  157. carriage(x1,y1)
  158. x1,y1)TR$;:
  159. "OO   OO"
  160. num(x1,y1,N)
  161. (N),x1+1,y1+3,
  162. x1+1,y1+1)P$(N)
  163. line(tt)
  164. t=tt:
  165. t>7 DO=5 
  166.  DO=9
  167.     AC%=4
  168. AC%,DO)EG$:
  169. carriage(AC%+9*K,DO):
  170. :b%=4:
  171. t<7 b%=t-3
  172. xx=1232:yy=1023-(DO+3)*32
  173. xx+4*k,yy:
  174. xx+4*k,yy-8*32:
  175. carriage(AC%+36-9*K,DO+8):
  176. carriage(AC%+9*(K-1),DO+16):
  177. )1?xx=AC%*32-36:yy=yy-8*32:
  178. xx+4*k,yy:
  179. xx+4*k,yy-8*32:
  180. T=1:c=0:ro=2:co=1:s%=1
  181. c=NT 
  182. return
  183. c=NT 
  184. (G<>13
  185. G<>127)
  186. G=127
  187. c=NT 
  188. CLS(28):
  189. G=127
  190. G=127
  191. G-48=A 
  192. G-48=B 
  193. (CH=3
  194. G-48=C)
  195. (G=13
  196. c=NT)
  197. num(AC%+9*(ro-1),DO+8*(co-1),G-48)
  198. 3,%c=c+1:M%(c)=G-48:
  199. c=NT+1 
  200. 369M%(c)=0:c=c-1:t%=-s%:ro=ro+t%:
  201. ro=5 ro=4:s%=1:co=co-1
  202. ro=0 ro=1:s%=-1:co=co-1
  203. carriage(AC%+9*(ro-1),DO+8*(co-1)):
  204. A:ro=ro+s%:
  205. ro=5 ro=4:s%=-1:co=co+1
  206. ro=0 ro=1:s%=1:co=co+1
  207. CH<3 ME$="You can use "+
  208. (A)+" or "+
  209.  ME$="You can use "+
  210. (A)+", "+
  211. (B)+" or "+
  212. c(ME$,28,W$):
  213. reward:
  214. 1,-15,150,5:
  215. 1,0,100,1:
  216. 1,-15,150,10:G=
  217. (100):YY=1023-32*(DO-3):
  218. 32*(4+6*(K-1)),YY:
  219. 242,243,244,8,8,8,10,245,32,246,8,8,8,10,247,248,249
  220. 0,-15,100,2:
  221. 0,0,180,2:G=
  222. (100/K):YY=YY+16:
  223. correct
  224. line(NT)
  225. F_!co=1:ro=2:s%=1:
  226. A1>0 
  227. B(A1,A)
  228. B1>0 
  229. B(B1,B)
  230. C1>0 
  231. B(C1,C)
  232. (tot),4,DO+2,
  233. B(D1,D2)
  234. num(AC%+9*(ro-1),DO+8*(co-1),D2):
  235. WAIT(1):
  236. initialise
  237. N>,TM=3.5:
  238. * Basic time of warning messages
  239. KT=TM:CH=0
  240. NR7R$=
  241. 129:G$=
  242. 129:W$=
  243. 135:B$=
  244. 132:DH$=
  245. * Colours
  246. 23,225,240,240,240,240,240,240,240,240,23,226,0,0,0,0,0,255,255,255,23,228,15,15,15,15,15,15,15,15,23,229,240,240,240,240,240,255,255,255,23,230,15,15,15,15,15,255,255,255,23,253,255,255,255,255,255,255,255,255
  247. 23,252,56,124,214,254,214,108,56,0,23,232,255,255,255,255,0,0,0,0,23,233,0,0,0,31,31,31,31,31
  248. 23,242,0,0,0,0,0,0,7,4,23,243,0,0,0,0,120,135,0,0,23,244,0,0,0,0,128,64,48,8,23,245,4,4,8,8,8,4,8,8,23,246,4,4,4,4,8,16,16,16,23,247,4,2,3,0,0,0,0,0,23,248,0,0,198,57,0,0,0,0,23,249,32,64,64,128,0,0,0,0
  249. &S0$=
  250. 226):S2$=
  251. 225+"     "+
  252. 10:CH$=
  253. OL?TR$=S0$+BD$+S2$+BD$+S2$+BD$+
  254. 229+CH$+
  255. 8+BD$+CH$+BD$
  256. OVwEG$=
  257. 233+"  "+
  258. 232+" "+BD$+
  259. 253)+" "+
  260. 228+BD$+
  261. 253)+BD$+
  262. 253)+
  263. 8+BD$+
  264. 253)+BD$+"OOO  OO"
  265. P$(9):BD$=
  266. 10:P$(1)="     "+BD$+"   "+
  267. 252:P$(2)="     "+BD$+" "+
  268. 252:P$(3)="     "+BD$+" "+
  269. 252+" "+
  270. 252:P$(4)="     "+BD$+
  271. 252)::P$(5)="   "+
  272. 252+" "+BD$+" "+
  273. V$,4):P$(6)=" "+
  274. 252+"   "+BD$+V$:P$(7)="  "+
  275. 252+" "+BD$+V$:P$(8)=" "+
  276. 252+" "+
  277. 252+BD$+V$:P$(9)=" "+
  278. V$,4)+BD$+V$
  279. M%(12)
  280.     *TAPE
  281. I%=0 
  282. 4:I%!&E00=I%!
  283. "?&13=?&13-(
  284. -&E00)
  285.  256:
  286. =&E00
  287.