home *** CD-ROM | disk | FTP | other *** search
/ No Fragments Archive 10: Diskmags / nf_archive_10.iso / MAGS / STOSSER / STOSSE06.MSA / TUTORIAL.BIT / TUT.6 / T6L5.ASC < prev    next >
Text File  |  1987-04-22  |  2KB  |  79 lines

  1. 10 rem =======================================
  2. 20 rem =======================================
  3. 30 rem ===  Draw a box onto the screen    ===
  4. 40 rem ===  then use same co-ords to      ===
  5. 50 rem ===  create a zone under the box.  ===
  6. 60 rem =======================================
  7. 70 rem =======================================
  8. 80 rem
  9. 90 rem ---- store screen res and drive ----
  10. 100 rem
  11. 110 MD=mode
  12. 120 DRV=drive
  13. 130 rem
  14. 140 rem ---- set up the screen  ----
  15. 150 rem
  16. 160 if mode=1 then mode 0
  17. 170 cls : key off : hide on : curs off 
  18. 180 drive=0 : dir$="\stos\"
  19. 190 reserve as screen 5
  20. 200 load "pic.pi1",5
  21. 210 get palette (5)
  22. 220 screen copy 5 to physic : screen copy 5 to back
  23. 230 dir$="A:"
  24. 240 rem
  25. 250 rem ----   set up the positon &     ----
  26. 260 rem ----   size of the box & zone.  ----
  27. 270 rem
  28. 280 X=0 : Y=0 : SIZEH=60 : SIZEV=30
  29. 290 X1=X : X2=X1+SIZEH
  30. 300 Y1=Y : Y2=Y1+SIZEV
  31. 310 rem
  32. 320 rem ++++   Draw box and zone  ++++
  33. 330 rem
  34. 340 reset zone 
  35. 350 for F=1 to 4
  36. 360 box X1,Y1 to X2,Y2
  37. 370 set zone F,X1,Y1 to X2,Y2
  38. 380 X1=X2+10 : X2=X1+SIZEH
  39. 390 next F
  40. 400 rem
  41. 410 rem ++++ SCREEN MESSAGE +++++
  42. 420 rem
  43. 430 locate 0,15 : pen 4 : print "PRESS LEFT KEY TO PLAY"
  44. 440 locate 0,22 : pen 4 : print "PRESS RIGHT KEY TO QUIT"
  45. 450 rem
  46. 460 rem ----   set up zone detection  ----
  47. 470 rem
  48. 480 rem
  49. 490 rem ++++ limit mouse to zones ++++
  50. 500 rem
  51. 510 MX1=X : MX2=X1-10
  52. 520 MY1=Y : MY2=Y2
  53. 530 rem if MX2>=320 then MX2=319
  54. 540 limit mouse MX1,MY1 to MX2,MY2
  55. 550 show on 
  56. 560 rem
  57. 570 rem ---- detect mouse key ----
  58. 580 rem
  59. 590 MK=0
  60. 600 repeat 
  61. 610 MK=mouse key
  62. 620 until MK<>0
  63. 630 rem
  64. 640 rem ++++ test for not key one ++++
  65. 650 rem
  66. 660 if MK<>1 then goto 780
  67. 670 rem
  68. 680 rem ++++ only if key one ++++
  69. 690 rem
  70. 700 BUTTUN=zone(0)
  71. 710 locate 0,12 : print "YOU ARE IN ZONE";BUTTUN
  72. 720 wait 100
  73. 730 locate 0,12 : print "                   "
  74. 740 goto 590
  75. 750 rem
  76. 760 rem ---- reset the screen for editing ----
  77. 770 rem
  78. 780 curs on : show on : limit mouse : pen 1 : mode MD : drive=DRV
  79.