'=========================================================================== ' Subject: MOUSE PAINT PROGRAM Date: 04-01-96 (11:01) ' Author: Unknown Author(s) Code: QB, PDS ' Origin: pages.prodigy.com/gamersp Packet: GRAPHICS.ABC '=========================================================================== 'Click the right mouse button to open the menu 'DRAW! v3.6 'Fixed I/O error, and a better 'printing routine. Now to print 'just press 'P' while in the draw 'space and DRAW! will remove the 'mouse cursor from the screen and 'print it. 'NOTE: QB 4.5 user PLEASE LOAD THE QB.QLB library! To do so 'start QB 4.5 like so at the command prompt: 'C:\QB45>QB /L QB ' 'If you have any trouble loading a .PAL(palette file), '.PL1-4(EGA BSAVE files), or a .PIC(VGA BSAVE file) please send 'me E-MAIL. And just so you know: 'BSAVE files are based on code supplied by Dave Gentry from 'VGA LESSON #39. PALette files are simple text format that 'support 1 line per color and have 4 segments to a line. Here is 'the basic format for a PAL file: 'Segment 1: Segment 2: Segment 3: Segment 4: 'The COLOR # Red value Green value Blue value '(These can be read using INPUT #1, CO%,R%,G%,B%) 'Once those values are read into memory use David Gilhams EGA/VGA 'palette routines: 'OUT &H3C8, CO% 'Selects color to change 'OUT &H3C9, R% 'Selects red value 'OUT &H3C9, G% 'Selects green value 'OUT &H3C9, B% 'Selects blue value 'Credits to: ' '~Dave~ Gentry, for his BLOAD/BSAVE routines! 'David Gillham, for his EGA palette routines. ' DECLARE SUB PRINTIT () DECLARE SUB PALIO (F$) DECLARE SUB SCREENIO (F$, flag!) DECLARE SUB SAVEPRINTER (PRNTRTYPE%) DECLARE SUB PRINTSETUP () DECLARE SUB INTRO () DECLARE SUB PAINTIT () DECLARE SUB COPYIT () DECLARE SUB TEXTFONT () DECLARE SUB PALETTECHANGE () DECLARE SUB WARN (RETURN.CODE%) DECLARE SUB CHANGESCREENMODE () DECLARE SUB ZOBJ (SEL%) DECLARE SUB PLOT (XX%, YY%, X%, Y%) DECLARE SUB PLOTX (PX%, PY%) DECLARE SUB SAVEIT (OP%) DECLARE SUB ZOOM () DECLARE SUB AIRBRUSH () DECLARE SUB FONT (TEXT$, X%, Y%, stepX%, stepY%, CO!, Ang%) DECLARE SUB BUTTON (X1%, Y1%, X2%, Y2%, d%) DECLARE SUB DOODLE () DECLARE SUB DRAWOBJ (OBJ%) DECLARE SUB POPOPS (SEL%) DECLARE SUB NEWDIR () DECLARE SUB SETCOM () DECLARE SUB SETUP () DECLARE SUB NEWODIR () DECLARE SUB TEXTBOX (BY!, BX!, EY!, EX!, ASCII!, C!, BC!, SHADOW, BS) DECLARE SUB BOX (BX, BY, EX, EY, B) DECLARE SUB Pause () DECLARE SUB MOUSESTATUS (LB%, RB%, XMOUSE%, YMOUSE%) DECLARE SUB MouseRange (X1%, Y1%, X2%, Y2%) DECLARE SUB MousePut (X%, Y%) DECLARE SUB MOUSEHIDE () DECLARE SUB MouseDriver (ax%, BX%, cx%, dx%) DECLARE SUB MOUSESHOW () DECLARE FUNCTION MouseInit% () DIM SHARED Mouse$ DIM SHARED THICK%, CO%, SCREENMODE%, PLX%(100), FONTSIZE% CONST UP = 1 CONST DOWN = 0 CONST ZOOMHELP = 1 'Set to zero to disable ZOOM instructions FONTSIZE% = 1 'Set to default FONT size SCREENMODE% = 7 'Set to default screen mode Mouse$ = SPACE$(57) FOR i% = 1 TO 57 READ a$ H$ = CHR$(VAL("&H" + a$)) MID$(Mouse$, i%, 1) = H$ NEXT i% DATA 55,89,E5,8B,5E,0C,8B,07,50,8B,5E,0A,8B,07,50,8B DATA 5E,08,8B,0F,8B,5E,06,8B,17,5B,58,1E,07,CD,33,53 DATA 8B,5E,0C,89,07,58,8B,5E,0A,89,07,8B,5E,08,89,0F DATA 8B,5E,06,89,17,5D,CA,08,00 CLS : THICK% = 10: CO% = 1 ms% = MouseInit% IF NOT ms% THEN PRINT "Mouse not found" END END IF OPEN "DRAW!PAL.TMP" FOR OUTPUT AS #1: CLOSE #1 'ON ERROR GOTO ERRORTRAP CHANGEIT: SCREEN SCREENMODE%: PAINT (1, 1), 15: MOUSESHOW FUNC% = 1 in: K$ = INKEY$ MOUSESTATUS LB%, RB%, X%, Y% IF FUNC% > 0 AND FUNC% < 6 THEN DRAWOBJ FUNC% IF FUNC% = 8 THEN DOODLE IF FUNC% = 6 THEN AIRBRUSH IF FUNC% = 7 THEN PAINTIT IF FUNC% = 9 THEN ZOOM: POPOPS FUNC% IF FUNC% = 10 THEN TEXTFONT IF RB% = -1 THEN POPOPS FUNC% IF FUNC% = 99 THEN GOTO CHANGEIT IF K$ <> CHR$(27) THEN GOTO in DATA G,a,m,e,r,s,' DATA P,a,r,a,d,i,s,e DATA S,o,f,t,w,a,r,e printcode: DATA 205, 5, 203 : ' int 5 retf 'Machine-language code 'for printing screen. 'ERRORTRAP: 'PRINT "ERROR!! #";ERR 'RESUME NEXT SUB AIRBRUSH RANDOMIZE TIMER MOUSESTATUS LB%, RB%, X%, Y% IF LB% = -1 THEN MOUSEHIDE XX% = INT(RND(1) * THICK%) + 1 YY% = INT(RND(1) * THICK%) + 1 PSET (X% - XX% - 1, Y% - YY% - 1), CO% MOUSESHOW END IF MOUSESHOW END SUB SUB BUTTON (X1%, Y1%, X2%, Y2%, d%) IF d% = 1 THEN B1% = 15: B2% = 8 IF d% = 0 THEN B1% = 8: B2% = 15 LINE (X1%, Y1%)-(X2%, Y2%), 7, BF LINE (X1%, Y1%)-(X2%, Y1%), B1% LINE (X1%, Y1%)-(X1%, Y2%), B1% LINE (X2%, Y1%)-(X2%, Y2%), B2% LINE (X1%, Y2%)-(X2%, Y2%), B2% END SUB SUB CHANGESCREENMODE REDIM COVERUP5%(7000) REDIM MODES$(5) MODES$(1) = "320 X 200 X 16": MODES$(2) = "640 X 200 X 16" MODES$(3) = "640 X 350 X 16": MODES$(4) = "640 X 480 X 16" MODES$(5) = "320 X 200 X 256" GET (14, 14)-(161, 101), COVERUP5% BUTTON 14, 14, 161, 101, UP BUTTON 15, 15, 160, 100, UP BUTTON 17, 17, 30, 30, DOWN: LINE (18, 18)-(29, 29), 0: LINE (18, 29)-(29, 18), 0 BUTTON 32, 17, 158, 30, UP: LINE (33, 18)-(157, 29), 9, BF FONT "Screen modes", 34, 20, 6, 0, 15, 0 FOR i% = 35 TO 90 STEP 12 a = a + 1 d% = 1 IF a = 1 AND SCREENMODE% = 7 THEN d% = 0 IF a = 2 AND SCREENMODE% = 8 THEN d% = 0 IF a = 3 AND SCREENMODE% = 9 THEN d% = 0 IF a = 4 AND SCREENMODE% = 12 THEN d% = 0 IF a = 5 AND SCREENMODE% = 13 THEN d% = 0 BUTTON 17, i%, 150, i% + 9, d% FONT MODES$(a), 19, i% + 2, 6, 0, 0, 0 NEXT MOUSESHOW WAIT4PRESS2: LB% = -1 WHILE LB% = -1 MOUSESTATUS LB%, RB%, X%, Y% WEND LB% = 0 WHILE LB% = 0 MOUSESTATUS LB%, RB%, X%, Y% IF RB% = -1 THEN EXIT SUB WEND IF X% > 17 AND Y% > 17 AND X% < 30 AND Y% < 30 THEN GOTO ABORTIT4 a = 0 FOR i% = 35 TO 90 STEP 12 a = a + 1 IF X% > 17 AND Y% > i% AND X% < 150 AND Y% < i% + 9 THEN WARN RETURN.CODE% IF RETURN.CODE% = 1 THEN GOTO ABORTIT4 IF a = 1 THEN SCREENMODE% = 7: GOTO ABORTIT4 IF a = 2 THEN SCREENMODE% = 8: GOTO ABORTIT4 IF a = 3 THEN SCREENMODE% = 9: GOTO ABORTIT4 IF a = 4 THEN SCREENMODE% = 12: GOTO ABORTIT4 IF a = 5 THEN SCREENMODE% = 13: GOTO ABORTIT4 END IF NEXT GOTO WAIT4PRESS2 ABORTIT4: PUT (14, 14), COVERUP5%, PSET LB% = -1 WHILE LB% = -1 MOUSESTATUS LB%, RB%, X%, Y% WEND END SUB SUB DELAY END SUB SUB DOODLE MOUSESHOW MOUSESTATUS LB%, RB%, X%, Y% IF LB% = -1 THEN MOUSEHIDE IF LB% = -1 THEN LINE (X% - 1, Y% - 1)-(X% - 1 - THICK% - 1, Y% - 1 - THICK% - 1), CO%, BF IF LB% = -1 THEN MOUSESHOW END SUB SUB DRAWOBJ (OBJ%) MOUSESHOW LB% = -1 WHILE LB% = -1 MOUSESTATUS LB%, RB%, X%, Y% WEND LB% = 0 WHILE LB% = 0 IF INKEY$ = "p" OR INKEY$ = "P" THEN PRINTIT MOUSESTATUS LB%, RB%, X%, Y% IF RB% = -1 THEN EXIT SUB WEND PLOTX X%, Y% XX% = X%: YY% = Y% LB% = -1 WHILE LB% = -1 MOUSESTATUS LB%, RB%, X%, Y% WEND LB% = 0 WHILE LB% = 0 IF INKEY$ = "p" OR INKEY$ = "P" THEN PRINTIT MOUSESTATUS LB%, RB%, X%, Y% IF RB% = -1 THEN GOTO ABORTIT WEND MOUSEHIDE PUT (XX% - 4, YY% - 4), PLX%, PSET IF OBJ% = 1 OR OBJ% = 3 OR OBJ% = 5 THEN FOR i = 0 TO THICK% - 1 IF OBJ% = 1 THEN LINE (XX%, YY% - i)-(X%, Y% - i), CO% IF OBJ% = 3 THEN LINE (XX%, YY%)-(X%, Y%), CO%, BF IF OBJ% = 5 AND X% > XX% THEN COLOR CO%: CIRCLE (XX%, YY%), X% - XX%: PAINT (XX%, YY%), CO% IF OBJ% = 5 AND XX% > X% THEN COLOR CO%: CIRCLE (XX%, YY%), XX% - X%: PAINT (XX%, YY%), CO% NEXT END IF IF OBJ% = 2 THEN IF XX% < X% AND YY% < Y% OR XX% > X% AND YY% > Y% THEN FOR i = 1 TO THICK% LINE (XX% + i, YY% + i)-(X% - i, Y% - i), CO%, B NEXT END IF IF XX% > X% AND YY% < Y% OR XX% < X% AND YY% > Y% THEN FOR i = 1 TO THICK% LINE (XX% - i, YY% + i)-(X% + i, Y% - i), CO%, B NEXT END IF END IF IF OBJ% = 4 THEN FOR i = 1 TO THICK% IF OBJ% = 4 AND X% > XX% THEN COLOR CO%: CIRCLE (XX%, YY%), X% - XX% + i: CIRCLE (XX% + 1, YY%), X% - XX% + i IF OBJ% = 4 AND XX% > X% THEN COLOR CO%: CIRCLE (XX%, YY%), XX% - X% + i: CIRCLE (XX% + 1, YY%), XX% - X% + i NEXT END IF MOUSESHOW EXIT SUB ABORTIT: PUT (XX% - 4, YY% - 4), PLX%, PSET END SUB SUB FONT (TEXT$, X%, Y%, stepX%, stepY%, CO, Ang%) TEXT$ = UCASE$(TEXT$): T = LEN(TEXT$) IF Ang% < 4 THEN DRAW "A" + STR$(Ang%) DRAW "S4;BM" + STR$(X%) + "," + STR$(Y%) + "C" + STR$(CO) FOR C = 1 TO T SELECT CASE MID$(TEXT$, C, 1) CASE "A": DRAW "d4u4r4d4u2l4u2" CASE "B": DRAW "d4r4l4u2r4l4u2r4d4u4l4" CASE "C": DRAW "r4l4d4r4bu4l4" CASE "D": DRAW "r4l3d4l1r4u4l4" CASE "E": DRAW "d4r4l4u2r3l3u2r4l4" CASE "F": DRAW "d4u2r3l3u2r4l4" CASE "G": DRAW "r4l4d4r4u2l1r1bu2l4" CASE "H": DRAW "d4u2r4u2d4u4bl4" CASE "I": DRAW "r4l2d4l2r4bu4l4" CASE "J": DRAW "br4d3bd1bl1l3bu4" CASE "K": DRAW "d4u2r2u1r2u1r1l1d1l2d1l2r2d1r2d1r1bu4bl4" CASE "L": DRAW "d4r4l4u4" CASE "M": DRAW "d4u4f2e2d4bu4bl4" CASE "N": DRAW "d4u4f4u4bl4" CASE "O": DRAW "d4r4u4l4" CASE "P": DRAW "d4u4r4d2l4u2" CASE "Q": DRAW "d4r4u4l4d4r4h1f2h1u4l4" CASE "R": DRAW "d4u4r4d2l4r2f2h2l2u2" CASE "S": DRAW "r4l4d2r4d2l4bu4" CASE "T": DRAW "r4l2d4u4l2" CASE "U": DRAW "d4r4u4bl4" CASE "V": DRAW "d2f2e2u2bl4" CASE "W": DRAW "d4e2f2u4bl4" CASE "X": DRAW "f4h2g2e4bl4" CASE "Y": DRAW "f3d1u1e3bl4" CASE "Z": DRAW "r4g4r4bu4l4" CASE "1": DRAW "br2d4u4bl2" CASE "2": DRAW "r3d1g3r3bu4bl4" CASE "3": DRAW "r4d2l3r3d2l4bu4" CASE "4": DRAW "d2r4d2u4bl4" CASE "5": DRAW "r4l4d2r4d2l4bu4" CASE "6": DRAW "r4l4d4r4u2l4u2" CASE "7": DRAW "r4d4u4l4" CASE "8": DRAW "r4d4l4u4d2r4u2l4" CASE "9": DRAW "r4d4u2l4u2" CASE "0": DRAW "r4d4l4u4r4g4u4" END SELECT DRAW "BR" + STR$(stepX%) IF stepY% > 0 THEN DRAW "BD" + STR$(stepY%) ELSE DRAW "BU" + STR$(ABS(stepY%)) END IF NEXT C DRAW "A0" END SUB SUB INTRO SCREEN 13 FOR i = 1 TO 15: PALETTE i, 0: NEXT DEF SEG = &HA000 'BLOAD "LOGO320.PIC", 0 'PALIO "LOGO320" SOUND 2000, .5: SOUND 3000, 1 WHILE INKEY$ = "": WEND END SUB SUB MouseDriver (ax%, BX%, cx%, dx%) DEF SEG = VARSEG(Mouse$) Mouse% = SADD(Mouse$) CALL ABSOLUTE(ax%, BX%, cx%, dx%, Mouse%) END SUB SUB MOUSEHIDE ax% = 2 MouseDriver ax%, 0, 0, 0 END SUB FUNCTION MouseInit% ax% = 0 MouseDriver ax%, 0, 0, 0 MouseInit% = ax% END FUNCTION SUB MousePut (X%, Y%) ax% = 4 cx% = X% dx% = Y% MouseDriver ax%, 0, cx%, dx% END SUB SUB MouseRange (X1%, Y1%, X2%, Y2%) ax% = 7 cx% = X1% dx% = X2% MouseDriver ax%, 0, cx%, dx% ax% = 8 cx% = Y1% dx% = Y2% MouseDriver ax%, 0, cx%, dx% END SUB SUB MOUSESHOW ax% = 1 MouseDriver ax%, 0, 0, 0 END SUB SUB MOUSESTATUS (LB%, RB%, XMOUSE%, YMOUSE%) ax% = 3 MouseDriver ax%, BX%, cx%, dx% LB% = ((BX% AND 1) <> 0) RB% = ((BX% AND 2) <> 0) XMOUSE% = cx% YMOUSE% = dx% IF SCREENMODE% = 7 OR SCREENMODE% = 13 THEN XMOUSE% = XMOUSE% / 2 END SUB SUB PAINTIT MOUSESHOW LB% = -1 WHILE LB% = -1 MOUSESTATUS LB%, RB%, X%, Y% WEND LB% = 0 WHILE LB% = 0 MOUSESTATUS LB%, RB%, X%, Y% IF RB% = -1 THEN EXIT SUB WEND MOUSEHIDE PAINT (X%, Y%), CO% MOUSESHOW END SUB SUB PALETTECHANGE REDIM COVERUP6%(8000) GET (30, 30)-(170, 135), COVERUP6% BUTTON 30, 30, 170, 135, UP BUTTON 32, 32, 46, 46, DOWN: LINE (33, 33)-(45, 45), 0: LINE (33, 45)-(45, 33), 0 BUTTON 48, 32, 168, 46, UP BUTTON 120, 87, 160, 98, UP BUTTON 33, 122, 63, 132, UP BUTTON 70, 122, 100, 132, UP FONT "SAVE LOAD", 35, 124, 6, 0, 0, 0 FONT "OK", 130, 91, 6, 0, 0, 0 LINE (49, 33)-(167, 45), 9, BF FONT "PALETTE", 51, 35, 6, 0, 15, 0 FONT "RED", 32, 60, 6, 0, 12, 0 FONT "GREEN", 32, 75, 6, 0, 10, 0 FONT "BLUE", 32, 90, 6, 0, 9, 0 FOR i% = 55 TO 85 STEP 15 BUTTON 70, i%, 80, i% + 13, UP BUTTON 83, i%, 103, i% + 13, UP BUTTON 105, i%, 115, i% + 13, UP NEXT FONT "PALETTE WILL CHANGE THE", 32, 100, 6, 0, 0, 0 FONT "VALUE OF THE", 32, 106, 6, 0, 0, 0 COL = CO% FONT "CURRENT", 109, 106, 6, 0, COL, 0 FONT "COLOR", 32, 112, 6, 0, 0, 0 MOUSESHOW WAIT4PRESS4: MOUSESHOW LB% = -1 WHILE LB% = -1 MOUSESTATUS LB%, RB%, X%, Y% WEND LB% = 0 WHILE LB% = 0 MOUSESTATUS LB%, RB%, X%, Y% LINE (120, 60)-(160, 85), CO%, BF FONT STR$(R%), 82, 60, 6, 0, 0, 0 FONT STR$(G%), 82, 75, 6, 0, 0, 0 FONT STR$(B%), 82, 90, 6, 0, 0, 0 WEND MOUSEHIDE IF X% > 33 AND Y% > 122 AND X% < 63 AND Y% < 132 THEN OPEN "DRAW!PAL.TMP" FOR APPEND AS #1 IF CHANGED% <> 0 THEN WRITE #1, CO%, R%, G%, B% CLOSE #1 SAVEIT 3 END IF IF X% > 70 AND Y% > 122 AND X% < 100 AND Y% < 132 THEN SAVEIT 4 IF X% > 120 AND Y% > 87 AND X% < 160 AND Y% < 98 THEN PUT (30, 30), COVERUP6%, PSET OPEN "DRAW!PAL.TMP" FOR APPEND AS #1 IF R% <> 0 AND G% <> 0 AND B% <> 0 THEN WRITE #1, CO%, R%, G%, B% CLOSE #1 EXIT SUB END IF IF X% > 32 AND Y% > 32 AND X% < 46 AND Y% < 46 THEN PUT (30, 30), COVERUP6%, PSET: EXIT SUB IF X% > 70 AND Y% > 55 AND X% < 80 AND Y% < 70 THEN LINE (84, 56)-(102, 67), 7, BF R% = R% - 1 IF R% = -1 THEN R% = 63 GOSUB CPAL END IF IF X% > 105 AND Y% > 55 AND X% < 115 AND Y% < 70 THEN LINE (84, 56)-(102, 67), 7, BF R% = R% + 1 IF R% = 64 THEN R% = 0 GOSUB CPAL END IF IF X% > 70 AND Y% > 70 AND X% < 80 AND Y% < 85 THEN LINE (84, 71)-(102, 82), 7, BF G% = G% - 1 IF G% = -1 THEN G% = 63 GOSUB CPAL END IF IF X% > 105 AND Y% > 70 AND X% < 115 AND Y% < 85 THEN LINE (84, 71)-(102, 82), 7, BF G% = G% + 1 IF G% = 64 THEN G% = 0 GOSUB CPAL END IF IF X% > 70 AND Y% > 85 AND X% < 80 AND Y% < 100 THEN LINE (84, 86)-(102, 97), 7, BF B% = B% - 1 IF B% = -1 THEN B% = 63 GOSUB CPAL END IF IF X% > 105 AND Y% > 85 AND X% < 115 AND Y% < 100 THEN LINE (84, 86)-(102, 97), 7, BF B% = B% + 1 IF B% = 64 THEN B% = 0 GOSUB CPAL END IF GOTO WAIT4PRESS4 CPAL: CHANGED% = 1 'Special thanks to David Gilham(SP?) for these EGA extended palette routines! OUT &H3C8, CO% 'Selects color to change \ OUT &H3C9, R% 'Selects red value \ OUT &H3C9, G% 'Selects green value / OUT &H3C9, B% 'Selects blue value / RETURN END SUB SUB PALIO (F$) F$ = F$ + ".pal" PALETTE OPEN F$ FOR APPEND AS #1: CLOSE #1 OPEN F$ FOR INPUT AS #1 WHILE NOT (EOF(1)) INPUT #1, C%, R%, G%, B% GOSUB CCPAL WEND CLOSE #1 EXIT SUB CCPAL: OUT &H3C8, C% 'Selects color to change \ OUT &H3C9, R% 'Selects red value \ OUT &H3C9, G% 'Selects green value / OUT &H3C9, B% 'Selects blue value / RETURN END SUB 'This sub used for demo, not needed for mouse calls SUB Pause PRINT "Press any key to continue..." G$ = INPUT$(1) PRINT END SUB SUB PLOT (XX%, YY%, X%, Y%) MOUSEHIDE PAINT (XX%, YY%), CO%, 0 PSET (188 + X%, 6 + Y%), CO% MOUSESHOW END SUB SUB PLOTX (PX%, PY%) MOUSEHIDE N = 4 GET (PX% - N, PY% - N)-(PX% + N, PY% + N), PLX% LINE (PX% - N, PY% - N)-(PX% + N, PY% + N), 0 LINE (PX% + N, PY% - N)-(PX% - N, PY% + N), 0 MOUSESHOW END SUB SUB POPOPS (FUNC%) THEWHOLETHING: IF SCREENMODE% = 13 THEN REDIM COVERUP1%(31000) IF SCREENMODE% <> 13 THEN REDIM COVERUP1%(13000) MOUSEHIDE GET (1, 1)-(319, 150), COVERUP1% BUTTON 1, 1, 319, 150, UP BUTTON 2, 2, 318, 149, UP BUTTON 5, 5, 18, 18, DOWN: LINE (6, 6)-(17, 17), 0: LINE (6, 17)-(17, 6), 0 BUTTON 21, 5, 316, 18, UP: LINE (22, 6)-(315, 17), 9, BF BUTTON 130, 132, 175, 142, UP BUTTON 190, 132, 210, 142, UP BUTTON 178, 132, 188, 142, UP BUTTON 212, 132, 222, 142, UP BUTTON 225, 132, 300, 142, UP FONT "Tools", 24, 9, 7, 0, 15, 0 REDRAW: FONT "PALETTE", 132, 135, 6, 0, 0, 0 FONT "Screen mode", 227, 135, 6, 0, 0, 0 a% = 0 MOUSEHIDE FOR i% = 5 TO 250 STEP 40 a% = a% + 1 BUTTON i%, 20, i% + 38, 50, UP IF a% = FUNC% THEN BUTTON i%, 20, i% + 38, 50, DOWN NEXT FOR i% = 5 TO 175 STEP 40 a% = a% + 1 BUTTON i%, 53, i% + 38, 83, UP IF a% = FUNC% THEN BUTTON i%, 53, i% + 38, 83, DOWN NEXT IF SCREENMODE% <> 13 THEN FOR i = 5 TO 235 STEP 15 C = C + 1 LINE (i, 85)-(i + 14, 100), C - 1, BF CS% = 0 IF C - 1 = CO% THEN CS% = 14 LINE (i, 85)-(i + 14, 100), CS%, B NEXT C = 0 END IF IF SCREENMODE% = 13 THEN FOR a = 0 TO 4 FOR i = 5 TO 295 STEP 5 C = C + 1 IF C > 255 THEN GOTO NXT LINE (i, 85 + 11 * a)-(i + 5, 96 + 11 * a), C - 1, BF CS% = 0 IF C - 1 = CO% THEN CS% = 14 LINE (i, 85 + 11 * a)-(i + 5, 96 + 11 * a), CS%, B NXT: NEXT NEXT END IF LINE (7, 21)-(42, 49), 9 LINE (48, 22)-(80, 48), 4, B LINE (88, 22)-(120, 48), 14, BF COLOR 10: CIRCLE (144, 35), 16 COLOR 11: CIRCLE (184, 35), 16: PAINT (184, 35), 11 LINE (215, 30)-(225, 48), 0, B: LINE (221, 33)-(225, 45), 0, B: PAINT (222, 34), 4, 0 LINE (215, 30)-(217, 28), 0: LINE (217, 28)-(223, 28), 0: LINE (223, 28)-(225, 30), 0 LINE (220, 27)-(221, 26), 15, BF FONT "PAINT", 248, 27, 6, 0, 12, 0 FONT "DOODLE", 7, 60, 6, 0, 10, 0 FONT "ZOOM", 53, 60, 6, 0, 9, 0 FONT "ABC", 90, 60, 6, 0, 1, 0 FONT "SAVE", 130, 60, 6, 0, 0, 0 FONT "LOAD", 170, 60, 6, 0, 0, 0 BUTTON 210, 60, 250, 70, UP BUTTON 255, 60, 290, 70, UP BUTTON 210, 72, 290, 82, UP FONT "EXIT", 215, 62, 6, 0, 0, 0 FONT "UNDO", 260, 62, 6, 0, 0, 0 FONT "PRINTER SETUP", 212, 74, 6, 0, 0, 0 LB% = -1 WHILE LB% = -1 MOUSESTATUS LB%, RB%, X%, Y% WEND WAIT4PRESS: FONT STR$(THICK%), 188, 136, 6, 0, 0, 0 MOUSESHOW MOUSESTATUS LB%, RB%, X%, Y% IF LB% = -1 THEN MOUSEHIDE IF X% > 210 AND Y% > 72 AND X% < 290 AND Y% < 82 THEN PRINTSETUP IF X% > 210 AND Y% > 60 AND X% < 250 AND Y% < 70 THEN SYSTEM IF X% > 130 AND Y% > 132 AND X% < 175 AND Y% < 142 THEN PALETTECHANGE IF X% > 225 AND Y% > 132 AND X% < 300 AND Y% < 142 THEN OSC% = SCREENMODE% CHANGESCREENMODE IF OSC% <> SCREENMODE% THEN FUNC% = 99: EXIT SUB END IF IF X% > 178 AND Y% > 132 AND X% < 188 AND Y% < 142 AND LB% = -1 THEN THICK% = THICK% - 1 IF THICK% = 0 THEN THICK% = 1 BUTTON 190, 132, 210, 142, UP GOSUB DELAY GOTO WAIT4PRESS END IF IF X% > 212 AND Y% > 132 AND X% < 222 AND Y% < 142 AND LB% = -1 THEN THICK% = THICK% + 1 IF THICK% = 25 THEN THICK% = 24 BUTTON 190, 132, 210, 142, UP GOSUB DELAY GOTO WAIT4PRESS END IF IF SCREENMODE% <> 13 THEN FOR i = 5 TO 235 STEP 15 C = C + 1 IF SCREENMODE% <> 13 AND X% > i AND Y% > 85 AND X% < i + 14 AND Y% < 100 THEN CO% = C - 1 NEXT C = 0 END IF C = 0 IF SCREENMODE% = 13 THEN FOR a = 0 TO 4 FOR i = 5 TO 295 STEP 5 C = C + 1 IF X% > i AND Y% > 85 + 11 * a AND X% < i + 5 AND Y% < 96 + 11 * a THEN CO% = C - 1 NEXT NEXT C = 0 END IF a% = 0 IF X% > 5 AND Y% > 5 AND X% < 18 AND Y% < 18 THEN GOTO ABORTIT2 FOR i% = 5 TO 250 STEP 40 a% = a% + 1 IF X% > i% AND Y% > 20 AND X% < i% + 38 AND Y% < 50 THEN LF% = FUNC%: FUNC% = a% IF a% = FUNC% THEN BUTTON i%, 20, i% + 38, 50, DOWN NEXT FOR i% = 5 TO 170 STEP 40 a% = a% + 1 IF X% > i% AND Y% > 53 AND X% < i% + 38 AND Y% < 83 THEN LF% = FUNC%: FUNC% = a% IF a% = FUNC% THEN BUTTON i%, 53, i% + 38, 83, DOWN NEXT IF FUNC% = 11 THEN PUT (1, 1), COVERUP1%, PSET: SAVEIT 1: FUNC% = LF%: GOTO THEWHOLETHING IF FUNC% = 12 THEN PUT (1, 1), COVERUP1%, PSET: SAVEIT 2: FUNC% = LF%: GOTO THEWHOLETHING IF X% > 255 AND Y% > 60 AND X% < 290 AND Y% < 70 THEN PUT (1, 1), COVERUP1%, PSET: SAVEIT 6: FUNC% = LF%: MOUSESHOW: GOTO THEWHOLETHING MOUSESHOW GOTO REDRAW END IF GOTO WAIT4PRESS ABORTIT2: LB% = -1 WHILE LB% = -1 MOUSESTATUS LB%, RB%, X%, Y% WEND MOUSEHIDE PUT (1, 1), COVERUP1%, PSET SAVEIT 5 MOUSESHOW ERASE COVERUP1% EXIT SUB DELAY: LB% = -1 WHILE LB% = -1 MOUSESTATUS LB%, RB%, X%, Y% WEND RETURN END SUB SUB PRINTIT RESTORE printcode MOUSEHIDE REDIM a%(2) DEF SEG = VARSEG(a%(0)) FOR i% = 0 TO 2 READ d% POKE VARPTR(a%(0)) + i%, d% NEXT i% CALL ABSOLUTE(VARPTR(a%(0))) DEF SEG MOUSESHOW END SUB SUB PRINTSETUP OPEN "DRAWPRNT.STP" FOR APPEND AS #1: CLOSE #1 OPEN "DRAWPRNT.STP" FOR INPUT AS #1 WHILE NOT (EOF(1)) INPUT #1, PRN% WEND CLOSE #1 IF PRN% = 0 THEN PRN% = 1 REDIM PR$(18), DRV$(18) PR$(1) = "IBM B/W Printer": DRV$(1) = "COLOR1" PR$(2) = "IBM RGB Printer": DRV$(2) = "COLOR4" PR$(3) = "IBM CMY Printer": DRV$(3) = "COLOR8" PR$(4) = "HP PCL Default": DRV$(4) = "HPDEFAULT" PR$(5) = "HP Deskjet": DRV$(5) = "DESKJET" PR$(6) = "IBM PROprinter": DRV$(6) = "GRAPHICS" PR$(7) = "IBM Quietwriter": DRV$(7) = "GRAPHICS" PR$(8) = "IBM Graphics WIDE": DRV$(8) = "GRAPHICSWIDE" PR$(9) = "HP Laserjet": DRV$(9) = "LASERJET" PR$(10) = "HP Laserjet II": DRV$(10) = "LASERJETII" PR$(11) = "HP Paintjet": DRV$(11) = "PAINTJET" PR$(12) = "HP Quitjet": DRV$(12) = "QUIETJET" PR$(13) = "HP Quitjet plus": DRV$(13) = "QUIETJETPLUS" PR$(14) = "HP Ruggedwriter": DRV$(14) = "RUGGEDWRITER" PR$(15) = "HP Ruggedwriterwide": DRV$(15) = "RUGGEDWRITERWIDE" PR$(16) = "IBM Thermal printer": DRV$(16) = "THERMAL" PR$(17) = "HP Thinkjet": DRV$(17) = "THINKJET" REDIM COVERUP8%(10000) GET (18, 18)-(200, 90), COVERUP8% BUTTON 18, 18, 200, 90, UP FONT "TO PRINT MOVE MOUSE OFF SCREEN", 20, 75, 6, 0, 0, 0 FONT "AND PRESS SHIFT PRNT SCRN", 20, 82, 6, 0, 0, 0 BUTTON 20, 20, 34, 34, DOWN: LINE (21, 21)-(33, 33), 0: LINE (21, 33)-(33, 21), 0 BUTTON 36, 20, 198, 34, UP: LINE (37, 21)-(197, 33), 9, BF FONT "PRINTER SETUP", 38, 22, 6, 0, 15, 0 BUTTON 30, 40, 40, 55, UP BUTTON 45, 40, 160, 55, UP BUTTON 165, 40, 175, 55, UP BUTTON 70, 58, 110, 68, UP FONT "OK", 85, 60, 6, 0, 0, 0 WAIT4PRESS6: MOUSESHOW LB% = -1 WHILE LB% = -1 MOUSESTATUS LB%, RB%, X%, Y% WEND LB% = 0 WHILE LB% = 0 MOUSESTATUS LB%, RB%, X%, Y% FONT PR$(PRN%), 47, 42, 6, 0, 0, 0 WEND IF X% > 70 AND Y% > 58 AND X% < 110 AND Y% < 68 THEN PUT (18, 18), COVERUP8%, PSET OPEN "DRAWPRNT.STP" FOR OUTPUT AS #1 WRITE #1, PRN% SHELL "GRAPHICS " + DRV$(PRN%) + " /R" CLOSE #1 EXIT SUB END IF IF X% > 20 AND Y% > 20 AND X% < 34 AND Y% < 34 THEN PUT (18, 18), COVERUP8%, PSET: EXIT SUB IF X% > 30 AND Y% > 40 AND X% < 40 AND Y% < 55 THEN PRN% = PRN% - 1 IF PRN% = 0 THEN PRN% = 1 BUTTON 45, 40, 160, 55, UP END IF IF X% > 165 AND Y% > 40 AND X% < 175 AND Y% < 55 THEN PRN% = PRN% + 1 IF PRN% = 18 THEN PRN% = 17 BUTTON 45, 40, 160, 55, UP END IF GOTO WAIT4PRESS6 END SUB SUB SAVEIT (OP%) IF OP% = 5 THEN F2$ = "DRAWUNDO": OP% = 1: GOTO UNDOSAVE IF OP% = 6 THEN F2$ = "DRAWUNDO": OP% = 2: GOTO UNDOSAVE REDIM COVERUP2%(10000) MOUSEHIDE GET (1, 1)-(202, 55), COVERUP2% BUTTON 1, 1, 202, 55, UP IF SCREENMODE% = 7 OR SCREENMODE% = 9 OR SCREENMODE% = 8 THEN COLOR 15, 7 LOCATE 2, 2: PRINT "Filename(NO EXTENSION!):" COLOR 9 REIN: LOCATE 3, 2: PRINT " " LOCATE 3, 2: INPUT "", FILENAME$ F2$ = FILENAME$ IF LEN(FILENAME$) > 8 THEN GOTO REIN PUT (1, 1), COVERUP2%, PSET UNDOSAVE: MOUSESHOW IF SCREENMODE% = 7 OR SCREENMODE% = 9 OR SCREENMODE% = 8 THEN COLOR 15, 0 IF OP% = 3 THEN OPEN "DRAW!PAL.TMP" FOR INPUT AS #2 OPEN F2$ + ".PAL" FOR APPEND AS #3 WHILE NOT (EOF(2)) INPUT #2, RC%, RR%, RG%, RB% WRITE #3, RC%, RR%, RG%, RB% WEND CLOSE #2: CLOSE #3 MOUSESHOW END IF IF OP% = 4 THEN CLOSE OPEN F2$ + ".PAL" FOR INPUT AS #1 WHILE NOT (EOF(1)) INPUT #1, CO%, R%, G%, B% 'Special thanks to David Gilham(SP?) for these EGA extended palette routines! OUT &H3C8, CO% 'Selects color to change \ OUT &H3C9, R% 'Selects red value \ OUT &H3C9, G% 'Selects green value / OUT &H3C9, B% 'Selects blue value / WEND CLOSE MOUSESHOW END IF IF OP% = 1 AND SCREENMODE% = 13 THEN DEF SEG = &HA000 BSAVE F2$ + ".PIC", 0, 64000 END IF IF OP% = 1 AND SCREENMODE% > 6 AND SCREENMODE% < 13 THEN SCREENIO F2$, 1: EXIT SUB IF OP% = 2 AND SCREENMODE% = 13 THEN DEF SEG = &HA000 BLOAD F2$ + ".PIC", 0 END IF IF OP% = 2 AND SCREENMODE% > 6 AND SCREENMODE% < 13 THEN SCREENIO F2$, 0: EXIT SUB END SUB SUB SAVEPRINTER (PRNTRTYPE%) END SUB SUB SCREENIO (F$, flag) DEF SEG = &H40 VidMode = PEEK(&H49) PageAddr& = PEEK(&H4E) + PEEK(&H4F) * 256& PageSize& = PEEK(&H4C) + PEEK(&H4D) * 256& IF VidMode = 19 THEN PageSize& = 64000 DEF SEG SELECT CASE VidMode CASE 3, 4, 6 'SCREEN 0,1,2 DEF SEG = &HB800: GOSUB ScreenIO1: DEF SEG CASE 13 TO 19 'SCREEN 7 to 13 DEF SEG = &HA000 IF VidMode = 19 THEN GOSUB ScreenIO1 ELSE FOR p = 0 TO 3 IF flag THEN OUT &H3CE, 4: OUT &H3CF, p BSAVE F$ + ".PL" + LTRIM$(STR$(p)), PageAddr&, PageSize& ELSE OUT &H3C4, 2: OUT &H3C5, 2 ^ p BLOAD F$ + ".PL" + LTRIM$(STR$(p)), PageAddr& END IF IF p = 1 AND VidMode = 15 THEN EXIT FOR NEXT END IF DEF SEG END SELECT EXIT SUB ScreenIO1: IF flag THEN BSAVE F$ + ".SCR", PageAddr&, PageSize&'Goes on above line'-> ELSE BLOAD f$ + ".SCR", PageAddr& RETURN END SUB SUB TEXTFONT REDIM COVERUP7%(10000) GET (1, 1)-(318, 60), COVERUP7% MOUSESHOW LB% = -1 WHILE LB% = -1 MOUSESTATUS LB%, RB%, X%, Y% WEND LB% = 0 WHILE LB% = 0 MOUSESTATUS LB%, RB%, X%, Y% IF RB% = -1 THEN EXIT SUB WEND MOUSEHIDE BUTTON 1, 1, 318, 60, UP BUTTON 3, 3, 17, 17, DOWN: LINE (4, 4)-(16, 16), 0: LINE (4, 16)-(16, 4), 0 BUTTON 19, 3, 316, 17, UP: LINE (20, 4)-(315, 16), 9, BF BUTTON 135, 45, 145, 55, UP BUTTON 148, 45, 163, 55, UP BUTTON 166, 45, 176, 55, UP BUTTON 180, 45, 220, 55, UP FONT STR$(FONTSIZE%), 145, 48, 6, 0, 0, 0 FONT "OK", 195, 48, 6, 0, 0, 0 FONT "Enter text", 22, 6, 6, 0, 15, 0 IF SCREENMODE% < 10 THEN COLOR CO%, 0 IF SCREENMODE% > 10 THEN COLOR CO% LOCATE 4, 2: PRINT STRING$(38, " ") LOCATE 5, 2: PRINT STRING$(38, " ") MOUSESHOW LOCATE 4, 2: LINE INPUT "", DUMMY$ LOCATE 5, 2: LINE INPUT "", DUMMY$ FONT "PRESS 'OK' WHEN READY", 5, 50, 6, 0, 12, 0 MOUSEHIDE REDIM LINE1%(304, 8) REDIM LINE2%(304, 8) FOR XX% = 8 TO 311 a% = a% + 1 FOR YY% = 24 TO 31 B% = B% + 1 LINE1%(a%, B%) = POINT(XX%, YY%) NEXT B% = 0 NEXT a% = 0: B% = 0 FOR XX% = 8 TO 311 a% = a% + 1 FOR YY% = 32 TO 39 B% = B% + 1 LINE2%(a%, B%) = POINT(XX%, YY%) NEXT B% = 0 NEXT OX% = X%: OY% = Y% WAIT4PRESS5: MOUSESHOW LB% = -1 WHILE LB% = -1 MOUSESTATUS LB%, RB%, X%, Y% WEND LB% = 0 WHILE LB% = 0 MOUSESTATUS LB%, RB%, X%, Y% FONT STR$(FONTSIZE%), 145, 48, 6, 0, 0, 0 WEND MOUSEHIDE IF X% > 3 AND Y% > 3 AND X% < 17 AND Y% < 17 THEN PUT (1, 1), COVERUP7%, PSET: EXIT SUB IF X% > 180 AND Y% > 45 AND X% < 220 AND Y% < 55 THEN GOTO PRINTFONT IF X% > 135 AND Y% > 45 AND X% < 145 AND Y% < 55 THEN FONTSIZE% = FONTSIZE% - 2 IF FONTSIZE% < 0 THEN FONTSIZE% = 1 BUTTON 148, 45, 163, 55, UP GOTO WAIT4PRESS5 END IF IF X% > 166 AND Y% > 45 AND X% < 176 AND Y% < 55 THEN FONTSIZE% = FONTSIZE% + 2 IF FONTSIZE% > 23 THEN FONTSIZE% = 23 BUTTON 148, 45, 163, 55, UP GOTO WAIT4PRESS5 END IF GOTO WAIT4PRESS5 PRINTFONT: S% = FONTSIZE% - 1 a% = 0: B% = 0 MOUSEHIDE PUT (1, 1), COVERUP7%, PSET FOR X = 8 TO 311 a% = a% + 1 FOR Y = 24 TO 31 B% = B% + 1 IF LINE1%(a%, B%) = 0 THEN GOTO NXT2 i = S% IF i > 1 THEN LINE (OX% + a% * i, OY% + B% * i)-(OX% + a% * i + S%, OY% + B% * i + S%), LINE1%(a%, B%), BF IF i < 3 THEN PSET (OX% + a%, OY% + B%), LINE1%(a%, B%) IF i > 1 THEN LX% = a% * i IF i < 3 THEN LX% = a% NXT2: NEXT B% = 0 NEXT a% = 0: B% = 0 OX% = OX% + LX% FOR X = 8 TO 311 a% = a% + 1 FOR Y = 24 TO 31 B% = B% + 1 IF LINE2%(a%, B%) = 0 THEN GOTO NXT3 i = S% LX% = LX% + 1 IF i > 1 THEN LINE (OX% + a% * i, OY% + B% * i)-(OX% + a% * i + S%, OY% + B% * i + S%), LINE2%(a%, B%), BF IF i < 3 THEN PSET (OX% + a%, OY% + B%), LINE2%(a%, B%) NXT3: NEXT B% = 0 NEXT MOUSESHOW END SUB SUB WARN (RETURN.CODE%) REDIM WARNING%(6000) GET (20, 20)-(140, 80), WARNING% MOUSEHIDE BUTTON 20, 20, 140, 80, UP BUTTON 22, 22, 35, 35, DOWN: LINE (23, 23)-(34, 34), 0: LINE (23, 34)-(34, 23), 0 BUTTON 37, 22, 138, 35, UP: LINE (38, 23)-(137, 34), 9, BF FONT "WARNING", 39, 25, 6, 0, 15, 0 FONT "Changing screen", 25, 38, 6, 0, 0, 0 FONT "modes means lose", 25, 45, 6, 0, 0, 0 FONT "PICTURE", 25, 51, 6, 0, 0, 0 BUTTON 27, 67, 70, 77, UP BUTTON 73, 67, 113, 77, UP FONT "PROCEED", 29, 70, 6, 0, 0, 0 FONT "CANCEL", 75, 70, 6, 0, 0, 0 MOUSESHOW WAIT4PRESS3: LB% = -1 WHILE LB% = -1 MOUSESTATUS LB%, RB%, X%, Y% WEND LB% = 0 WHILE LB% = 0 MOUSESTATUS LB%, RB%, X%, Y% IF RB% = -1 THEN EXIT SUB WEND IF X% > 27 AND Y% > 67 AND X% < 70 AND Y% < 77 THEN RETURN.CODE% = 0: EXIT SUB IF X% > 73 AND Y% > 67 AND X% < 113 AND Y% < 77 THEN RETURN.CODE% = 1: EXIT SUB IF X% > 22 AND Y% > 22 AND Y% < 35 AND Y% < 35 THEN RETURN.CODE% = 0: EXIT SUB GOTO WAIT4PRESS3 END SUB SUB ZOBJ (SEL%) LB% = -1 WHILE LB% = -1 MOUSESTATUS LB%, RB%, X%, Y% WEND LB% = 0 WHILE LB% = 0 MOUSESTATUS LB%, RB%, X%, Y% IF LB% = -1 AND X% > 4 AND Y% > 4 AND X% < 18 AND Y% < 18 THEN EXIT SUB IF RB% = -1 THEN EXIT SUB WEND FOR XX% = 5 TO 180 STEP 5 a% = a% + 1 FOR YY% = 20 TO 145 STEP 5 B% = B% + 1 IF X% > XX% AND Y% > YY% AND X% < XX% + 5 AND Y% < YY% + 5 THEN PLOT X%, Y%, a%, B%: GOTO FOUNDIT NEXT B% = 0 NEXT FOUNDIT: OX% = a%: OY% = B% a% = 0: B% = 0: X% = 0: Y% = 0: XX% = 0: YY% = 0 LB% = -1 WHILE LB% = -1 MOUSESTATUS LB%, RB%, X%, Y% WEND LB% = 0 WHILE LB% = 0 MOUSESTATUS LB%, RB%, X%, Y% IF RB% = -1 THEN EXIT SUB WEND FOR XX% = 5 TO 180 STEP 5 a% = a% + 1 FOR YY% = 20 TO 145 STEP 5 B% = B% + 1 IF X% > XX% AND Y% > YY% AND X% < XX% + 5 AND Y% < YY% + 5 THEN PLOT X%, Y%, a%, B%: GOTO FOUNDIT2 NEXT B% = 0 NEXT FOUNDIT2: IF SEL% = 1 THEN LINE (188 + OX%, 6 + OY%)-(188 + a%, 6 + B%), CO% IF SEL% = 2 THEN LINE (188 + OX%, 6 + OY%)-(188 + a%, 6 + B%), CO%, B IF SEL% = 3 THEN LINE (188 + OX%, 6 + OY%)-(188 + a%, 6 + B%), CO%, BF X% = 188: Y% = 6 MOUSEHIDE REDIM ZOOMM(35, 25) FOR CAPX = 1 TO 35 FOR CAPY = 1 TO 25 ZOOMM(CAPX, CAPY) = POINT(X% + CAPX, Y% + CAPY) NEXT NEXT FOR X = 5 TO 175 STEP 5 XX = XX + 1 FOR Y = 20 TO 140 STEP 5 YY = YY + 1 PAINT (X + 1, Y + 1), ZOOMM(XX, YY), 0 PSET (188 + XX, 6 + YY), ZOOMM(XX, YY) NEXT YY = 0 NEXT MOUSESHOW END SUB SUB ZOOM IF ZOOMHELP = 1 THEN REDIM HELP%(15000) MOUSEHIDE GET (1, 1)-(200, 100), HELP% BUTTON 1, 1, 200, 100, UP BUTTON 2, 2, 199, 99, UP BUTTON 4, 4, 18, 18, DOWN: LINE (5, 5)-(17, 17), 0: LINE (5, 17)-(17, 5), 0 BUTTON 20, 4, 197, 18, UP: LINE (21, 5)-(196, 17), 9, BF FONT "ZOOM Instructions", 22, 9, 6, 0, 15, 0 FONT "To disable these instructions", 6, 20, 6, 0, 4, 0 FONT "set the CONSTant ZOOMHELP to 0", 6, 26, 6, 0, 4, 0 FONT "Using ZOOM is easy. To ZOOM into", 6, 35, 6, 0, 10, 0 FONT "a specific region use the mouse", 6, 41, 6, 0, 10, 0 FONT "to select the upper-right corner", 6, 47, 6, 0, 10, 0 FONT "of that area. DRAW! will capture", 6, 53, 6, 0, 10, 0 FONT "34x25 pixels from that point", 6, 59, 6, 0, 10, 0 DO WHILE INKEY$ = "" MOUSESHOW MOUSESTATUS LB%, RB%, X%, Y% IF LB% = -1 AND X% > 4 AND Y% > 4 AND X% < 18 AND Y% < 18 THEN EXIT DO LOOP MOUSEHIDE PUT (1, 1), HELP%, PSET ERASE HELP% MOUSESHOW END IF LB% = -1 WHILE LB% = -1 MOUSESTATUS LB%, RB%, X%, Y% WEND LB% = 0 WHILE LB% = 0 MOUSESTATUS LB%, RB%, X%, Y% IF RB% = -1 THEN EXIT SUB WEND XXX% = X%: YYY% = Y% MOUSEHIDE REDIM COVERUP3%(14000) REDIM COVERUP4%(5000) GET (187, 5)-(225, 33), COVERUP4% GET (2, 2)-(183, 151), COVERUP3% REDIM ZOOMM(35, 25) FOR CAPX = 1 TO 35 FOR CAPY = 1 TO 25 ZOOMM(CAPX, CAPY) = POINT(X% + CAPX, Y% + CAPY) NEXT NEXT BUTTON 2, 2, 183, 151, UP BUTTON 187, 5, 225, 33, UP BUTTON 4, 4, 18, 18, DOWN: LINE (5, 5)-(17, 17), 0: LINE (5, 17)-(17, 5), 0 BUTTON 20, 4, 181, 18, UP: LINE (21, 5)-(180, 17), 9, BF FONT "ZOOM EDITOR", 23, 8, 6, 0, 15, 0 FOR X = 5 TO 180 STEP 5 LINE (X, 20)-(X, 145), 0 NEXT FOR Y = 20 TO 145 STEP 5 LINE (5, Y)-(180, Y), 0 NEXT FOR X = 5 TO 175 STEP 5 XX = XX + 1 FOR Y = 20 TO 140 STEP 5 YY = YY + 1 PAINT (X + 1, Y + 1), ZOOMM(XX, YY), 0 PSET (188 + XX, 6 + YY), ZOOMM(XX, YY) NEXT YY = 0 NEXT MOUSESHOW IN02: MOUSESTATUS LB%, RB%, X%, Y% a% = 0: B% = 0 IF LB% = -1 AND X% > 4 AND Y% > 4 AND X% < 18 AND Y% < 18 THEN GOTO ABORTIT3 IF RB% = -1 THEN POPOPS ZFUNC% MOUSESHOW END IF IF ZFUNC% > 0 AND ZFUNC% < 6 THEN ZOBJ ZFUNC% IF LB% = -1 AND ZFUNC% = 0 THEN FOR XX% = 5 TO 175 STEP 5 a% = a% + 1 FOR YY% = 20 TO 140 STEP 5 B% = B% + 1 IF X% > XX% AND Y% > YY% AND X% < XX% + 5 AND Y% < YY% + 5 THEN PLOT X%, Y%, a%, B% NEXT B% = 0 NEXT END IF GOTO IN02 ABORTIT3: MOUSEHIDE REDIM EDITED%(5000) GET (189, 7)-(223, 31), EDITED% PUT (187, 5), COVERUP4%, PSET PUT (2, 2), COVERUP3%, PSET PUT (XXX% + 1, YYY% + 1), EDITED%, PSET ERASE EDITED% ERASE COVERUP4% ERASE COVERUP3% MOUSESHOW END SUB