home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1994 June / 1994-06b.d64 / boxes (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  1KB  |  43 lines

  1. 100 rem  ml box drawing
  2. 110 rem  by greg waggoner
  3. 120 rem
  4. 130 rem ---------format----------------
  5. 140 rem   sys 49152,x1,y1,x2,y2
  6. 150 rem
  7. 160 rem  where x1 and y1 are the upper-
  8. 170 rem  left coordinates. x1 runs from
  9. 180 rem  0-36, and y1 from 0-21. x2 and
  10. 190 rem  y2 are the box length and
  11. 200 rem  height, respectively. they are
  12. 210 rem  described as follows:
  13. 220 rem    x2 > 1 and x2 < 39-x1
  14. 230 rem    y2 > 1 and y2 < 24-y1
  15. 240 rem
  16. 250 data32,241,183,142,167,2,32,241,183
  17. 260 data 142,168,2,32,241,183,142,169,2
  18. 270 data 32,241,183,142,170,2,174,168,2
  19. 280 data172,167,2,24,32,240,255,169,176
  20. 290 data 32,210,255,162,0,169,96,32,210
  21. 300 data 255,232,236,169,2,208,245,169
  22. 310 data 174,32,210,255,162,0,142,171,2
  23. 320 data 238,168,2,238,171,2,174,168
  24. 330 data 2,172,167,2,24,32,240,255,169
  25. 340 data 98,32,210,255,162,0,169,29,32
  26. 350 data 210,255,232,236,169,2,208,245
  27. 360 data 169,98,32,210,255,174,171,2
  28. 370 data 236,170,2,208,209,238,168,2
  29. 380 data 174,168,2,172,167,2,24,32,240
  30. 390 data 255,169,173,32,210,255,162,0
  31. 400 data169,96,32,210,255,232,236,169,2
  32. 410 data 208,245,169,189,32,210,255,96,
  33. 420 fori=49152to49298:readd:ck=ck+d:pokei,d:next
  34. 430 print"[147]":c=peek(53281)and15:ifck<>20639thenprint"error in data":stop
  35. 440 x1=int(rnd(1)*37)
  36. 450 x2=int(rnd(1)*(36-x1))+2
  37. 460 y1=int(rnd(1)*22)
  38. 470 y2=int(rnd(1)*(21-y1))+2
  39. 480 ifx1+x2>37andy1+y2>22then440
  40. 490 sys49152,x1,y1,x2,y2
  41. 500 x=int(rnd(1)*16):ifx=cthen500
  42. 510 poke646,x:goto440
  43.