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 >
Wrap
Text File
|
1987-04-22
|
2KB
|
79 lines
10 rem =======================================
20 rem =======================================
30 rem === Draw a box onto the screen ===
40 rem === then use same co-ords to ===
50 rem === create a zone under the box. ===
60 rem =======================================
70 rem =======================================
80 rem
90 rem ---- store screen res and drive ----
100 rem
110 MD=mode
120 DRV=drive
130 rem
140 rem ---- set up the screen ----
150 rem
160 if mode=1 then mode 0
170 cls : key off : hide on : curs off
180 drive=0 : dir$="\stos\"
190 reserve as screen 5
200 load "pic.pi1",5
210 get palette (5)
220 screen copy 5 to physic : screen copy 5 to back
230 dir$="A:"
240 rem
250 rem ---- set up the positon & ----
260 rem ---- size of the box & zone. ----
270 rem
280 X=0 : Y=0 : SIZEH=60 : SIZEV=30
290 X1=X : X2=X1+SIZEH
300 Y1=Y : Y2=Y1+SIZEV
310 rem
320 rem ++++ Draw box and zone ++++
330 rem
340 reset zone
350 for F=1 to 4
360 box X1,Y1 to X2,Y2
370 set zone F,X1,Y1 to X2,Y2
380 X1=X2+10 : X2=X1+SIZEH
390 next F
400 rem
410 rem ++++ SCREEN MESSAGE +++++
420 rem
430 locate 0,15 : pen 4 : print "PRESS LEFT KEY TO PLAY"
440 locate 0,22 : pen 4 : print "PRESS RIGHT KEY TO QUIT"
450 rem
460 rem ---- set up zone detection ----
470 rem
480 rem
490 rem ++++ limit mouse to zones ++++
500 rem
510 MX1=X : MX2=X1-10
520 MY1=Y : MY2=Y2
530 rem if MX2>=320 then MX2=319
540 limit mouse MX1,MY1 to MX2,MY2
550 show on
560 rem
570 rem ---- detect mouse key ----
580 rem
590 MK=0
600 repeat
610 MK=mouse key
620 until MK<>0
630 rem
640 rem ++++ test for not key one ++++
650 rem
660 if MK<>1 then goto 780
670 rem
680 rem ++++ only if key one ++++
690 rem
700 BUTTUN=zone(0)
710 locate 0,12 : print "YOU ARE IN ZONE";BUTTUN
720 wait 100
730 locate 0,12 : print " "
740 goto 590
750 rem
760 rem ---- reset the screen for editing ----
770 rem
780 curs on : show on : limit mouse : pen 1 : mode MD : drive=DRV