Home » Archimedes archive » Archimedes World » AW-1994-08-Disc1.adf » Disk1Aug94 » !AWAug94/Goodies/Jigsaw/!/!RunImage
!AWAug94/Goodies/Jigsaw/!/!RunImage
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Archimedes archive » Archimedes World » AW-1994-08-Disc1.adf » Disk1Aug94 |
Filename: | !AWAug94/Goodies/Jigsaw/!/!RunImage |
Read OK: | ✔ |
File size: | 7382 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
10 LIBRARY "<Obey$Dir>.Wimp" 20 PROCWimp_Start("Jigsaw",6000,4000) 30 PROCUser_SetInitialData 40 PROCCreate_Windows 50 PROCCreate_Menus 60 PROCWimp_WaitForEvent 70 PROCWimp_CloseDown 80 END 90: 100DEF PROCUser_SetInitialData 110 PROCdata :REM Read data into arrays 120 VDU 23,1 0,0,0,0,0,0,0,0 130 MOUSE ON 140PROCinitial 150ENDPROC 160: 170DEF PROCCreate_Windows 180JIGSCRN_Window%=FNWimp_WindowLoad("JIGSCRN") 190INFO_Window%=FNWimp_WindowLoad("INFO") 200PROCWimp_IconBar 210ENDPROC 220 : 230 DEF FNEvent_Save(window%)=FALSE 240 : 250 DEF FNEvent_Sprites(window%)=sprites% 260: 270DEF PROCCreate_Menus 280DIM Bar_Menu%(1) 290menu$="Jigsaw\Info>INFO_Window%\Start Puzzle\Palette Info\Help\Quit" 300Bar_Menu%=FNWimp_MenuCreate(menu$) 310ENDPROC 320: 330DEF FNEvent_Menu(window%) 340CASE window% OF 350 WHEN -2 : =Bar_Menu% 360 OTHERWISE : =FALSE 370ENDCASE 380: 390DEF PROCEvent_WindowClose(window%,buttons%) 400ENDPROC 410: 420DEF PROCEvent_Draw(window%,x_origin%,y_origin%) 430CASE window% OF 440 WHEN JIGSCRN_Window% : PROCUser_DrawJIGSCRNWindow 450ENDCASE 460ENDPROC 470 : 480 DEF PROCUser_DrawJIGSCRNWindow 490 ENDPROC 500: 510DEF PROCEvent_MouseClick(window%,icon%,button%,x%,y%) 520CASE window% OF 530 WHEN Bar_Window% : PROCUser_MouseBar( button%,icon%) 540ENDCASE 550ENDPROC 560 : 570 DEF PROCUser_MouseBar( button%,icon%) 580 CASE button% OF 590 WHEN 1,4: 600 PROCopenjigscrn 610 PROCjig 620 ENDCASE 630 ENDPROC 640 : 650DEF PROCEvent_MenuChoice(menu%) 660CASE menu% OF 670 WHEN Bar_Menu% : PROCUser_MenuChoiceBAR 680ENDCASE 690ENDPROC 700 : 710 DEF PROCUser_MenuChoiceBAR 720 CASE FNWimp_MenuChoice(0) OF 730 WHEN 2: 740 PROCopenjigscrn 750 PROCjig 760 WHEN 3: 770 PROChelppal 780 WHEN 4: 790 PROChelp 800 WHEN 5: 810 $(wimp%+4)="Do you really want to Quit?" 820 response%=19 830 SYS "Wimp_ReportError",wimp%,response%,"Jigsaw" TO ,response% 840 IF response%=1 finished%=TRUE 850 ENDCASE 860 ENDPROC 870: 880DEF PROCEvent_LoadFile(file$,type$) 890CASE type$ OF 900 WHEN "Sprite" : PROCUser_LoadFileSprite(file$) 910ENDCASE 920ENDPROC 930 : 940 DEF PROCUser_LoadFileSprite(file$) 950 PROCWimp_WindowAlert("!Jigsaw","Loading file "+file$) 960 ENDPROC 970 : 980DEF PROCEvent_SaveFile(file$,window%) 990ENDPROC 1000 1010DEF PROCWimp_IconBar 1020LOCAL fil%,size% 1030DIM sprite% 8 1040$sprite%="!" 1050fil%=OPENIN "<$Dir>.!Sprites" 1060size%=EXT# fil%+20 1070CLOSE# fil% 1080DIM spritearea% size% 1090spritearea%!0=size% 1100SYS &2E,256+10,spritearea%,"<$Dir>.!Sprites" 1110SYS &2E,256+40,spritearea%,$sprite% TO ,,,w%,h% 1120wimp%!0=-1:wimp%!4=0:wimp%!8=0:wimp%!12=w%*2:wimp%!16=h%*4 1130wimp%!20=&311A:wimp%!24=sprite%:wimp%!28=spritearea% 1140wimp%!32=LEN $sprite% 1150SYS "Wimp_CreateIcon",,wimp% TO icon% 1160*POINTER 1170MOUSE ON 1180ENDPROC 1190 1200DEFPROCclosejigscrn 1210PROCWimp_WindowClose(JIGSCRN_Window%) 1220ENDPROC 1230 1240DEFPROCopenjigscrn 1250!wimp%=JIGSCRN_Window% 1260SYS "Wimp_GetWindowState",,wimp% 1270wimp%!12=wimp%!12+40 1280wimp%!28=-1 1290SYS "Wimp_OpenWindow",,wimp% 1300PROCWimp_WindowForceDraw(JIGSCRN_Window%) 1310ENDPROC 1320 1330DEFPROCresetmodepal 1340SYS "Wimp_SetMode",mode% 1350SYS "Wimp_SetPalette",,palet% 1360*POINTER 1370MOUSE ON 1380ENDPROC 1390 1400 1410DEFPROCjig 1420REM * * * * * * MAIN PROGRAM LOOP * * * * * * 1430R0%=135: R1%=0: mode%=0 1440SYS "OS_Byte",R0% TO R0%,R1%,mode% 1450SYS "Wimp_ReadPalette",,palet% 1460ER%=0 1470SAMEFILE%=0 1480SYS "OS_Byte",229,0,0 1490ON ERROR LOCAL PROCquit 1500REPEAT 1510 MOUSE ON 1520 REPEAT 1530 IF ER%=0 QZ%=0 1540 ER%=0 1550 IF QZ%=1 THEN 1560 SYS "OS_Byte",229,1,0 1570 PROCclosejigscrn 1580 PROCresetmodepal 1590 ENDPROC 1600 ELSE 1610 QZ%=0 1620 PROCstart 1630 ENDIF 1640 UNTIL ER%=0 1650 REPEAT 1660 REPEAT 1670 PROCtimenow :REM Display time so far 1680 PROCselectbit :REM Select puzzle piece 1690 PROCplacebit :REM Place piece on grid 1700 UNTIL CLEARED%=0 1710 PROCcheckpos :REM Check bits in correct positions 1720 UNTIL OK%=0 1730 1740 PROCend :REM Check performance - play tune 1750 REPEAT 1760 MOUSE X%,Y%,Z% 1770 PROCendmessage :REM Display performance message 1780 UNTIL Z%>0 1790 IF Z%=1 SAMEFILE%=-1 ELSE SAMEFILE%=0 1800UNTIL FALSE 1810ENDPROC 1820 1830REM * * * * * * Get number of bits in puzzle * * * * * * 1840DEFPROCbits 1850CLS 1860COLOUR 8 1870@%=3 1880PRINTTAB(26,3)"APPROXIMATE NUMBER OF PIECES" 1890PRINTTAB(26,4)"****************************" 1900GCOL 143 1910COLOUR 143 1920COLOUR 8 1930FOR N%=1 TO 10 1940 VDU 24,576;832-N%*64;656;864-N%*64; 1950 CLG 1960 VDU 26 1970 PRINTTAB(37,N%*2+5) BITNOS%(N%); " " 1980NEXT 1990REPEAT: MOUSE X%,Y%,Z%: UNTIL Z%=0 2000MOUSE TO 648,784 2010REPEAT 2020 REPEAT: MOUSE X%,Y%,Z%: UNTIL POINT(X%,Y%)=15 2030 N%=(880-Y%)/64 2040 COLOUR 140 2050 PRINTTAB(48,N%*2+5) "Target Time: "; TARGETS$(N%) 2060 GCOL 139 2070 COLOUR 139 2080 VDU 24,576;832-N%*64;656;864-N%*64; 2090 CLG 2100 PRINTTAB(37,N%*2+5) BITNOS%(N%); " " 2110 VDU 26 2120 REPEAT: MOUSE X%,Y%,Z%: UNTIL POINT(X%,Y%)=12 OR Z%>0 2130 GCOL 143 2140 COLOUR 143 2150 IF Z%=0 THEN 2160 VDU 24,576;832-N%*64;656;864-N%*64; 2170 CLG 2180 PRINTTAB(37,N%*2+5) BITNOS%(N%); " " 2190 COLOUR 140 2200 PRINTTAB(48,N%*2+5) " " 2210 ENDIF 2220 VDU 26 2230UNTIL Z%>0 2240BITS%=BITNOS%(N%) 2250TARGET%=TARGETS%(N%) 2260COLOUR 128 2270COLOUR 7 2280ENDPROC 2290 2300REM * * * * * * Create border for filename screen * * * * * * 2310DEFPROCborder 2320FOR JX%=0 TO 6 2330 COLTABLE?15=1 + JX% MOD 6 2340 SYS &2E,256+52,spritearea%,"jigbit",JX%*148+84,0,8,0,COLTABLE 2350NEXT 2360SYS &2E,256+33,spritearea%,"jigbit" 2370FOR JX%=0 TO 6 2380 COLTABLE?15=1 + JX% MOD 6 2390 SYS &2E,256+52,spritearea%,"jigbit",JX%*148+84,920,8,0,COLTABLE 2400NEXT 2410SYS &2E,256+33,spritearea%,"jigbit" 2420FOR JY%=1 TO 7 2430 COLTABLE?15=1 + JY% MOD 6 2440 SYS &2E,256+52,spritearea%,"jigbit90",0,JY%*120-40,8,0,COLTABLE 2450NEXT 2460SYS &2E,256+47,spritearea%,"jigbit90" 2470FOR JY%=1 TO 7 2480 COLTABLE?15=1 + JY% MOD 6 2490 SYS &2E,256+52,spritearea%,"jigbit90",1100,JY%*120-40,8,0,COLTABLE 2500NEXT 2510SYS &2E,256+47,spritearea%,"jigbit90" 2520COLTABLE?15=15 2530ENDPROC 2540 2550REM * * * * * * Check bits in correct positions * * * * * * 2560DEFPROCcheckpos 2570FOR N%=1 TO 2 2580 S%=0 2590 OK%=0 2600 FOR Y%=VL%-1 TO 0 STEP-1 2610 FOR X%=0 TO HL%-1 2620 S%=S%+1 2630 IF GRIDSPR%(Y%,X%)<>S% THEN 2640 GS%=GRIDSPR%(Y%,X%) 2650 LX%=LOWX%+WIDE%*X%/HL% 2660 LY%=LOWY%+HIGH%*Y%/VL% 2670 SYS &2E,256+52,BITAREA,STR$(GS%),LX%,LY%,4,0,COLTABLE 2680 OK%=1 2690 ENDIF 2700 NEXT X% 2710 NEXT Y% 2720 IF OK%=1 AND N%=1 THEN 2730 T%=TIME 2740 SYS "OS_Byte",229,1,0 2750 SYS "Hourglass_On" 2760 FOR A%=1 TO 100 2770 FOR B%=1 TO 2000: NEXT B% 2780 SYS "Hourglass_Percentage",A% 2790 NEXT A% 2800 SYS "Hourglass_Off" 2810 SYS "OS_Byte",229,0,0 2820 TIME=T% 2830 ENDIF 2840NEXT N% 2850ENDPROC 2860 2870REM * * * * * * Convert seconds to time string * * * * * * 2880DEFPROCconvtime(SECS%) 2890HRS%=SECS%/3600 2900SECS%=SECS%-HRS%*3600 2910MINS%=SECS%/60 2920SECS%=SECS%-MINS%*60 2930TIMESTR$=RIGHT$("0"+STR$(HRS%),2)+"."+RIGHT$("0"+STR$(MINS%),2)+"."+RIGHT$("0"+STR$(SECS%),2) 2940ENDPROC 2950 2960REM * * * * * Calculate coordinates of pieces in grid * * * * * 2970DEFPROCcoords 2980X1%=((BITNO%-1) MOD HL%)*WIDE%/HL%+LOWX% 2990X2%=(((BITNO%-1) MOD HL%)+1)*WIDE%/HL%+LOWX% 3000Y1%=((VL%-(BITNO%-1) DIV HL%)-1)*HIGH%/VL%+LOWY% 3010Y2%=(VL%-(BITNO%-1) DIV HL%)*HIGH%/VL%+LOWY% 3020ENDPROC 3030 3040REM * * * * * * Read data into arrays * * * * * * 3050DEFPROCdata 3060DIM BITNOS%(10) 3070DIM TARGETS%(10) 3080DIM TARGETS$(10) 3090DIM SPEED$(10) 3100DATA 10,25,"25 Seconds",20,60,"1 Minute",40,180,"3 Minutes",60,360,"6 Minutes",80,720,"12 Minutes",100,1200,"20 Minutes",130,2700,"35 Minutes",160,3600,"1 Hour",200,5400,"1 Hour 30 Mins.",250,7200,"2 Hours" 3110DATA " Average time "," A bit slow "," Slow time "," Very slow time "," Did you doze off? "," Average time "," Good time "," Fast time "," Very fast time "," Top speed! " 3120FOR N%=1 TO 10 3130 READ BITNOS%(N%),TARGETS%(N%),TARGETS$(N%) 3140NEXT 3150FOR N%=1 TO 10 3160 READ SPEED$(N%) 3170NEXT 3180ENDPROC 3190 3200REM * * * * * * Set default palette * * * * * * 3210DEFPROCdefpal 3220COLOUR 0,255,255,255 3230COLOUR 1,221,221,221 3240COLOUR 2,187,187,187 3250COLOUR 3,153,153,153 3260COLOUR 4,119,119,119 3270COLOUR 5,85,85,85 3280COLOUR 6,51,51,51 3290COLOUR 7,0,0,0 3300COLOUR 8,0,68,153 3310COLOUR 9,238,238,0 3320COLOUR 10,0,204,0 3330COLOUR 11,221,0,0 3340COLOUR 12,238,238,187 3350COLOUR 13,85,136,0 3360COLOUR 14,255,187,0 3370COLOUR 15,0,187,255 3380ENDPROC 3390 3400REM * * * * * * Display unused pieces * * * * * * 3410DEFPROCdisplaybits 3420CLEARED%=BITS% 3430FOR N%=1 TO BITS% 3440 USEDBITS%(N%)=0 3450NEXT N% 3460FOR N1%=0 TO VL% 3470 FOR N2%=0 TO HL% 3480 GRIDSPR%(N1%,N2%)=0 3490 NEXT N2% 3500NEXT N1% 3510SCALE!0=TW%: SCALE!4=TH%: SCALE!8=SPRPLOTM12%: SCALE!12=SPRHIGH% 3520SYS &2E,256+52,SPAREA,SPR$,920,780,8,SCALE,COLTABLE 3530PROCgrid 3540NXDISP%=(1260-LOWX%-WIDE%)/(WIDE%/HL%+12) 3550NYDISP%=(LOWY%+HIGH%-12)/(HIGH%/VL%+12) 3560IF NXDISP%<1 OR NXDISP%>32 OR NYDISP%<1 OR NYDISP%>32 THEN 3570 PRINTTAB(25,6) "SPRITE PROPORTIONS UNSUITABLE" 3580 ER%=17 3590 PROCquit 3600 ENDPROC 3610ENDIF 3620D%=0 3630FOR N1%=1 TO NYDISP% 3640 FOR N2%=0 TO NXDISP%-1 3650 REPEAT 3660 S%=RND(BITS%) 3670 UNTIL USEDBITS%(S%)=0 OR D%=BITS% 3680 USEDBITS%(S%)=1 3690 D%=D%+1 3700 DISPSPR%(N1%,N2%)=S% 3710 SYS &2E,256+34,BITAREA,STR$(S%),LOWX%+WIDE%+12+N2%*(WIDE%/HL%+12),LOWY%+HIGH%-12-N1%*(HIGH%/VL%+12),8 3720 IF D%>=BITS% THEN N2%=NXDISP%: N1%=NYDISP% 3730 NEXT N2% 3740NEXT N1% 3750ENDPROC 3760 3770REM * * * * * * Display sprites in file * * * * * * 3780DEFPROCdispsprites 3790VDU 23,1 0,0,0,0,0,0,0,0 3800COLOUR 7 3810COLOUR 140 3820SYS &2E,256+8,SPAREA TO R0%,R1%,R2%,R3%,R4%,R5%,R6% 3830IF R3%=1 THEN 3840 SNO%=1 3850ELSE 3860 MOUSE TO 772,880 3870 LASTPAGE%=0 3880 T%=R3% 3890 S%=1 3900 OLDS%=1 3910 REPEAT 3920 CLS 3930 L%=4 3940 BACKP%=OLDS% 3950 OLDS%=S% 3960 REPEAT 3970 PROCspritebox 3980 UNTIL L%=28 OR S%>T% 3990 PRINT '' 4000 PRINTTAB(24); 4010 COLOUR 138 4020 PRINT "CLICK ON SPRITE TO SELECT" 4030 IF OLDS%>1 THEN 4040 COLOUR 139 4050 VDU 28,59,29,64,26 4060 CLS 4070 PRINT 4080 PRINT " BACK" 4090 PRINT " PAGE" 4100 VDU 26 4110 PRINTTAB(45,29) 4120 COLOUR 140 4130 MOUSE TO 984,120 4140 ENDIF 4150 IF S%<=T% THEN 4160 COLOUR 138 4170 VDU 28,66,29,71,26 4180 CLS 4190 PRINT 4200 PRINT " NEXT" 4210 PRINT " PAGE" 4220 VDU 26 4230 PRINTTAB(45,29) 4240 COLOUR 140 4250 IF OLDS%=1 OR S%<>BACKP% THEN MOUSE TO 1096,120 4260 ENDIF 4270 REPEAT 4280 XYOK%=0 4290 REPEAT: MOUSE X%,Y%,Z%: UNTIL Z%>0 4300 IF X%>=700 AND X%<=850 THEN 4310 L%=(1024-Y%)/32-2 4320 SONP%=(S%-2) MOD 6+1 4330 IF L%>(SONP%-1)*4+3 OR L%<1 OR L% MOD 4 = 0 THEN XYOK%=1 ELSE LASTPAGE%=1 4340 ELSE 4350 IF Y%<64 OR Y%>192 XYOK%=1 4360 IF X%<944 OR X%>1152 XYOK%=1 4370 IF X%>1040 AND X%<1056 XYOK%=1 4380 IF OLDS%=1 AND X%<1056 XYOK%=1 4390 IF S%>T% AND X%>1056 XYOK%=1 4400 IF OLDS%>6 AND X%>943 AND X%<1041 AND Y%>63 AND Y%<193 S%=OLDS%-6 4410 REPEAT: MOUSE X%,Y%,Z%: UNTIL Z%=0 4420 ENDIF 4430 UNTIL XYOK%=0 4440 UNTIL LASTPAGE%=1 4450 SNO%=((S%-2) DIV 6)*6 + L% DIV 4 +1 4460ENDIF 4470SYS &2E,256+13,SPAREA,SPRNAME,14,SNO% TO R0%,R1%,R2%,R3%,R4%,R5%,R6% 4480SPR$="" 4490FOR C%=0 TO R3%-1 4500 SPR$=SPR$+CHR$(SPRNAME?C%) 4510NEXT C% 4520COLOUR 140 4530ENDPROC 4540 4550REM * * * * * * Divide sprite into pieces * * * * * * 4560DEFPROCdividesprite 4570FOR N%=0 TO 15 4580 VDU 19,N%,0,0,0,0 4590NEXT N% 4600GCOL 130 4610CLG 4620LOWX%=0 4630LOWY%=0 4640SCALE!0=WIDE%: SCALE!4=HIGH%: SCALE!8=SPRPLOTM12%: SCALE!12=SPRHIGH% 4650SYS &2E,256+52,SPAREA,SPR$,LOWX%,LOWY%,8,SCALE,COLTABLE 4660PROCgrid 4670FOR BITNO%=1 TO BITS% 4680 PROCcoords 4690 MOVE X1%,Y1% 4700 MOVE X2%,Y2% 4710 SYS &2E,256+14,BITAREA,STR$(BITNO%),0 4720NEXT BITNO% 4730CLG 4740IF M15%=0 THEN PROCgetpal ELSE VDU 20: GCOL 130 4750ENDPROC 4760 4770REM * * * * * * Check performance - play tune * * * * * * 4780DEFPROCend 4790SCALE!0=WIDE%: SCALE!4=HIGH%: SCALE!8=SPRPLOTM12%: SCALE!12=SPRHIGH% 4800SYS &2E,256+52,SPAREA,SPR$,LOWX%,LOWY%,8,SCALE,COLTABLE 4810MOUSE OFF 4820PRINTTAB(57,22) "CLICK 'SELECT' FOR" 4830PRINTTAB(57,23) " NEW SPRITE FILE" 4840COLOUR 11 4850PRINTTAB(57,25) "CLICK 'ADJUST' FOR" 4860PRINTTAB(57,26) " SAME SPRITE FILE" 4870COLOUR 7 4880IF TIM%>TARGET% THEN 4890 DIFF%=TIM%-TARGET% 4900 P%=DIFF%*100/TARGET% 4910 N%=1 4920ELSE 4930 DIFF%=TARGET%-TIM% 4940 P%=DIFF%*100/TIM% 4950 N%=6 4960ENDIF 4970IF P%>80 N%=N%+4 ELSE N%=N%+P%/20 4980PROCendmessage 4990IF N%<6 THEN AMP%=N%*3 ELSE AMP%=(N%-5)*3 5000*CHANNELVOICE 1 2 5010IF TIM%>TARGET% THEN 5020 SOUND 1,-AMP%,80,20 5030 FOR L%=0 TO 40000:NEXT 5040 SOUND 1,-AMP%,60,20 5050 FOR L%=0 TO 40000:NEXT 5060 SOUND 1,-AMP%,40,20 5070 FOR L%=0 TO 40000:NEXT 5080ELSE 5090 SOUND 1,-AMP%,100,5 5100 FOR L%=0 TO 10000:NEXT 5110 SOUND 1,-AMP%,100,8 5120 FOR L%=0 TO 10000:NEXT 5130 SOUND 1,-AMP%,100,5 5140 FOR L%=0 TO 10000:NEXT 5150 SOUND 1,-AMP%,120,10 5160 FOR L%=0 TO 14000:NEXT 5170 SOUND 1,-AMP%,120,10 5180 FOR L%=0 TO 20000:NEXT 5190 SOUND 1,-AMP%,128,10 5200 FOR L%=0 TO 20000:NEXT 5210 SOUND 1,-AMP%,128,10 5220 FOR L%=0 TO 24000:NEXT 5230 SOUND 1,-AMP%,148,15 5240 FOR L%=0 TO 30000:NEXT 5250 SOUND 1,-AMP%,136,5 5260 FOR L%=0 TO 10000:NEXT 5270 SOUND 1,-AMP%,120,10 5280 FOR L%=0 TO 30000:NEXT 5290ENDIF 5300*CHANNELVOICE 1 1 5310REPEAT: MOUSE X%,Y%,Z%: UNTIL Z%=0 5320ENDPROC 5330 5340REM * * * * * * Display performance message * * * * * * 5350DEFPROCendmessage 5360IF M15%=1 BOXCOL%=128+RND(127) ELSE BOXCOL%=128+RND(15) 5370COLOUR BOXCOL% 5380COLOUR 0 5390PRINTTAB(57,13) " " 5400PRINTTAB(57,14) " PUZZLE COMPLETE " 5410PRINTTAB(57,15) " " 5420PRINTTAB(57,17) " " 5430PRINTTAB(57,16) SPEED$(N%) 5440FOR T%=1 TO 40000: NEXT 5450ENDPROC 5460 5470REM * * * * * * Display error message * * * * * * 5480DEFPROCerror 5490VDU 7 5500PRINTTAB(34,6) "NO PIECE SELECTED" 5510ENDPROC 5520 5530REM * * * * * * Get sprite file name * * * * * * 5540DEFPROCfilename 5550MODE12 5560VDU 23,1 0,0,0,0,0,0,0,0 5570MOUSE ON 5580PROCborder 5590VDU 24,112;832;448;864; 5600GCOL 134 5610CLG 5620VDU 24,496;832;1056;864; 5630CLG 5640COLOUR 134 5650COLOUR 4 5660PRINTTAB(8,5) "NAME OF SPRITE FILE" 5670PRINTTAB(32,5) "Description of picture(s) in file" 5680COLOUR 128 5690COLOUR 2 5700PRINTTAB(35,7) "Pictures" 5710PRINTTAB(35,11) "Patterns - 256 colour mode" 5720PRINTTAB(35,15) "Horses" 5730PRINTTAB(35,19) "Girls' names" 5740PRINTTAB(35,23) "Alphabet & numbers" 5750COLOUR 3 5760PRINTTAB(35,9) "Patterns - 16 colour mode" 5770PRINTTAB(35,13) "Butterflies" 5780PRINTTAB(35,17) "Symbols" 5790PRINTTAB(35,21) "Boys' names" 5800COLOUR 4 5810FOR NF%=1 TO 9 5820 GCOL 131 - NF% MOD 2 5830 COLOUR 131 - NF% MOD 2 5840 VDU 24,192;832-NF%*64;384;864-NF%*64; 5850 CLG 5860 VDU 26 5870 PRINTTAB(12,NF%*2+5) " JIGSPRITE"; NF%; " " 5880NEXT 5890GCOL 131 5900COLOUR 131 5910VDU 24,192;192;384;224; 5920CLG 5930VDU 26 5940PRINTTAB(15,25)"OTHER" 5950GCOL 130 5960COLOUR 130 5970VDU 24,384;96;688;128; 5980CLG 5990VDU 26 6000PRINTTAB(25,28)"RETURN TO DESKTOP" 6010MOUSE RECTANGLE 180,90,820,810 6020MOUSE TO 376,784 6030REPEAT 6040 REPEAT: MOUSE X%,Y%,Z%: P%=POINT(X%,Y%): UNTIL P%=2 OR P%=3 6050 GCOL 129 6060 COLOUR 129 6070 IF Y%<132 THEN 6080 NF%=-1 6090 VDU 24,384;96;688;128; 6100 CLG 6110 PRINTTAB(25,28)"RETURN TO DESKTOP" 6120 ELSE 6130 IF Y%<228 THEN 6140 NF%=0 6150 VDU 24,192;192;384;224; 6160 CLG 6170 PRINTTAB(15,25)"OTHER" 6180 ELSE 6190 NF%=(880-Y%)/64 6200 VDU 24,192;832-NF%*64;384;864-NF%*64; 6210 CLG 6220 PRINTTAB(12,NF%*2+5) " JIGSPRITE"; NF%; " " 6230 ENDIF 6240 ENDIF 6250 VDU 26 6260 REPEAT: MOUSE X%,Y%,Z%: UNTIL POINT(X%,Y%)=0 OR Z%>0 6270 GCOL 128+P% 6280 COLOUR 128+P% 6290 IF Z%=0 THEN 6300 IF NF%=-1 THEN 6310 VDU 24,384;96;688;128; 6320 CLG 6330 PRINTTAB(25,28)"RETURN TO DESKTOP" 6340 ELSE 6350 IF NF%=0 THEN 6360 VDU 24,192;192;384;224; 6370 CLG 6380 PRINTTAB(15,25)"OTHER" 6390 ELSE 6400 VDU 24,192;832-NF%*64;384;864-NF%*64; 6410 CLG 6420 PRINTTAB(12,NF%*2+5) " JIGSPRITE"; NF%; " " 6430 ENDIF 6440 ENDIF 6450 ENDIF 6460 VDU 26 6470UNTIL Z%>0 6480MOUSE OFF 6490IF NF%=0 THEN 6500 GCOL 128 6510 VDU 24,192;192;384;224; 6520 CLG 6530 VDU 24,656;192;1104;224; 6540 GCOL 131 6550 CLG 6560 VDU 26 6570 PRINTTAB(41,25) ">" 6580 COLOUR 128 6590 COLOUR 3 6600 PRINTTAB(12,25) "ENTER FILE NAME AND RETURN" 6610 VDU 23,1,1,0,0,0,0,0,0,0 6620 COLOUR 131 6630 COLOUR 4 6640 INPUTTAB(42,25) FILNAME$ 6650 IF FILNAME$="" FILNAME$="<Obey$Dir>.JIGSPRITE1" 6660ELSE 6670 IF NF%=-1 THEN 6680 ER%=1 6690 QZ%=1 6700 ELSE 6710 FILNAME$="<Obey$Dir>.JIGSPRITE"+STR$(NF%) 6720 ENDIF 6730ENDIF 6740VDU 23,1 0,0,0,0,0,0,0,0 6750MOUSE RECTANGLE 0,0,1279,1023 6760COLOUR 128 6770COLOUR 7 6780ENDPROC 6790 6800REM * * * * * * Get sprite's palette if present * * * * * * 6810DEFPROCgetpal 6820A%=SPAREA 6830B%=A%!4 6840C%=A%+A%!8 6850REPEAT 6860 NAME$="" 6870 FOR D%=0 TO 11 6880 IF ?(C%+4+D%) <> 0 THEN NAME$=NAME$+CHR$(?(C%+4+D%)) ELSE D%=11 6890 NEXT 6900 E%=C% 6910 C%=C%+C%!0 6920 B%=B%-1 6930UNTIL B%=0 OR NAME$=SPR$ 6940IF NAME$<>SPR$ THEN PRINT "SPRITE NOT FOUND: "; NAME$: STOP 6950IF !(E%+32)>44 THEN 6960 REM Sprite has own palette 6970 NC%=(!(E%+32)-44)/8 6980 E%=E%+44 6990 FOR D%=0 TO NC%-1 7000 R%=?(E%+D%*8+1): G%=?(E%+D%*8+2): B%=?(E%+D%*8+3) 7010 COLOUR D%,R%,G%,B% 7020 NEXT 7030ELSE 7040 REM Use palette readings on entry to JIGSCRN 7050 SYS "Wimp_SetPalette",,palet% 7060ENDIF 7070R0%=2: R1%=16 7080SYS "OS_ReadPalette",R0%,R1% TO R0%,R1%,R2%,R3% 7090RB%=((R2%>>8) AND &FF): GB%=((R2%>>16) AND &FF): BB%=((R2%>>24) AND &FF) 7100IF RB%>200 OR GB%>200 OR BB%>200 MAXB%=500 ELSE MAXB%=-1 7110MAXC%=0: MAXD%=0: MINC%=-1 7120FOR N%=0 TO 15 7130 R0%=N% 7140 SYS "OS_ReadPalette",R0%,R1% TO R0%,R1%,R2%,R3% 7150 R%=((R2%>>8) AND &FF): G%=((R2%>>16) AND &FF): B%=((R2%>>24) AND &FF) 7160 IF MAXB%>0 THEN 7170 IF R%<160 AND G%<160 AND B%<160 AND MAXB%>R%+G%+B% THEN 7180 MAXB%=R%+G%+B% 7190 MINC%=N% 7200 ENDIF 7210 ENDIF 7220 DR%=ABS(RB%-R%): DG%=ABS(GB%-G%): DB%=ABS(BB%-B%) 7230 DIFFC%=DR%+DG%+DB% 7240 IF DIFFC%>MAXD% THEN MAXC%=N%: MAXD%=DIFFC% 7250NEXT 7260IF MINC%>=0 THEN COLOUR MINC% ELSE COLOUR MAXC% 7270ENDPROC 7280 7290REM * * * * * * Draw grid lines * * * * * * 7300DEFPROCgrid 7310HIGHX%=LOWX%+WIDE%: HIGHY%=LOWY%+HIGH% 7320FOR N%=0 TO HL% 7330 VLINE%=LOWX%+WIDE%*N%/HL% 7340 LINE VLINE%,LOWY%,VLINE%,HIGHY% 7350NEXT N% 7360LINE LOWX%,LOWY%,HIGHX%,LOWY% 7370FOR N%=1 TO VL% 7380 HLINE%=LOWY%+HIGH%*N%/VL% 7390 LINE LOWX%,HLINE%,HIGHX%,HLINE% 7400NEXT N% 7410ENDPROC 7420 7430REM * * * * * * Operating instructions * * * * * * 7440DEFPROChelp 7450MOUSE OFF 7460PROCopenjigscrn 7470PROChelphdr 7480PRINTTAB(5,5) "The first screen shows a selection of files, each containing one or more" 7490PRINTTAB(1,6) "pictures - click mouse button on chosen file name, or if you want to use your" 7500PRINTTAB(1,7) "own picture, click on the entry 'OTHER', then type in the name of your file" 7510PRINTTAB(1,8) "and press RETURN. Any sprite file may be used provided it is not too big and" 7520PRINTTAB(1,9) "the sprite has suitable proportions for a jigsaw (see note later); if the file" 7530PRINTTAB(1,10) "is on a different disc, swap discs before pressing RETURN." 7540PRINTTAB(5,13) "If the chosen file contains more than one sprite, a 2nd screen showing the" 7550PRINTTAB(1,14) "name and a tiny version of each sprite will appear - click on the one you want." 7560PRINTTAB(1,15) "(If a sprite has its own palette, the colours may not be correct at this stage)" 7570PRINTTAB(1,16) "If there are more than six sprites in the file, the rest may be displayed by" 7580PRINTTAB(1,17) "clicking on 'NEXT PAGE' (use 'BACK PAGE' to return to the previous screen)." 7590PRINTTAB(1,18) "If any sprites were created using a 256-colour mode, the sprite will not be" 7600PRINTTAB(1,19) "displayed, but may still be selected by clicking on the box showing the mode." 7610PRINTTAB(5,22) "When you have chosen your picture, the next screen will allow you to select" 7620PRINTTAB(1,23) "how many pieces you want - choose a low number for an easy task, a high one" 7630PRINTTAB(1,24) "if you have plenty of time to spare! (The actual number of pieces may not be" 7640PRINTTAB(1,25) "exactly the number selected; it will depend on the proportions of the chosen" 7650PRINTTAB(1,26) "sprite)." 7660REPEAT: MOUSE X%,Y%,Z%: UNTIL Z%>0 7670PROChelphdr 7680PRINTTAB(5,5) "The puzzle screen itself shows a grid in which the picture is to be " 7690PRINTTAB(1,6) "assembled on the left, a small version of the picture as a guide at top right" 7700PRINTTAB(1,7) "and a selection of puzzle pieces at bottom right. Click any mouse button on" 7710PRINTTAB(1,8) "the piece you want (the selected piece will then appear above the puzzle grid)" 7720PRINTTAB(1,9) "and place it on the grid by clicking the mouse in the square in which you" 7730PRINTTAB(1,10) "think it should go. (If you later realise it is in the wrong place it may be" 7740PRINTTAB(1,11) "moved by clicking the mouse on it to re-select it)." 7750PRINTTAB(5,14) "Continue until all the pieces have been used up - when the puzzle is" 7760PRINTTAB(1,15) "complete (and all the pieces are in their correct positions) the grid lines" 7770PRINTTAB(1,16) "covering the puzzle will disappear (if the sprite has a 'mask', background" 7780PRINTTAB(1,17) "lines will remain). Once all the pieces have been moved to the grid, any" 7790PRINTTAB(1,18) "which are not in the correct position (there are quite likely to be some if" 7800PRINTTAB(1,19) "the puzzle has pieces which appear to be identical or almost so) then any" 7810PRINTTAB(1,20) "piece which is in the wrong place will change colour for a short time" 7820PRINTTAB(1,21) "(indicated by the hourglass), so that you will know which pieces have to be" 7830PRINTTAB(1,22) "swapped around. Note, timimg stops while the hourglass is displayed." 7840PRINTTAB(5,25) "To quit the current puzzle before completion, press the ESCAPE key at any" 7850PRINTTAB(1,26) "time except while the hourglass is running." 7860REPEAT: MOUSE X%,Y%,Z%: UNTIL Z%>0 7870CLS 7880REPEAT: MOUSE X%,Y%,Z%: UNTIL Z%=0 7890PRINTTAB(30,1) "JIGSAW INSTRUCTIONS" 7900PRINTTAB(30,2) "*******************" 7910PRINTTAB(1,5) "Note - Although JIGSAW uses windows, because of possible mode / palette changes" 7920PRINTTAB(1,6) "and because it sets a target time for completing the puzzle, the program does" 7930PRINTTAB(1,7) "not 'multi-task', ie any other WIMP tasks will be suspended while the puzzle" 7940PRINTTAB(1,8) "screen is displayed." 7950PRINTTAB(1,10) "Sprite Size Limitations" 7960PRINTTAB(1,11) "=======================" 7970PRINTTAB(1,12) "Minimum size:- There is no minimum size limit - you can even make a jigsaw" 7980PRINTTAB(1,13) "from one pixel if you wish, though it won't be much fun, as all the pieces" 7990PRINTTAB(1,14) "will look the same!" 8000PRINTTAB(1,16) "Maximum size:- The program allows just over 160Kb for a sprite FILE; this is" 8010PRINTTAB(1,17) "sufficient for one full-screen sprite (640 x 256 pixels) in a 256-colour mode," 8020PRINTTAB(1,18) "two full-screen sprites (or one larger than full-screen, as long as it is not" 8030PRINTTAB(1,19) "more than 160Kb) in a 16-colour mode, or a large number of small sprites." 8040PRINTTAB(1,21) "Proportions:- The program adjusts the size of the picture to the maximum" 8050PRINTTAB(1,22) "allowed by the size of the grid, while still keeping the sprite's original" 8060PRINTTAB(1,23) "height / width ratio. Thus, if you choose a sprite which is much wider than" 8070PRINTTAB(1,24) "it is high, the program will make the picture the same width as the grid and" 8080PRINTTAB(1,25) "will decrease the height proportionately; if the height is then found to be" 8090PRINTTAB(1,26) "insufficient for at least two 'lines' of puzzle, the program will display a" 8100PRINTTAB(1,27) "warning message and abandon the attempt to make a puzzle from this sprite." 8110PRINTTAB(1,28) "(Similarly for tall, thin sprites)." 8120PRINTTAB(36,30) "CLICK MOUSE KEY TO RETURN TO DESKTOP" 8130REPEAT: MOUSE X%,Y%,Z%: UNTIL Z%>0 8140PROCWimp_WindowClose(JIGSCRN_Window%) 8150MOUSE ON 8160ENDPROC 8170 8180REM * * * * * * Operating instructions headings * * * * * * 8190DEFPROChelphdr 8200SYS "Wimp_SetColour",%111 8210SYS "Wimp_SetColour",%10001111 8220CLS 8230REPEAT: MOUSE X%,Y%,Z%: UNTIL Z%=0 8240PRINTTAB(30,1) "JIGSAW INSTRUCTIONS" 8250PRINTTAB(30,2) "*******************" 8260PRINTTAB(40,29) "CLICK MOUSE KEY TO CONTINUE" 8270ENDPROC 8280 8290REM * * * * * * Guide to palette usage * * * * * * 8300DEFPROChelppal 8310MOUSE OFF 8320PROCopenjigscrn 8330SYS "Wimp_SetColour",%111 8340SYS "Wimp_SetColour",%10001111 8350CLS 8360REPEAT: MOUSE X%,Y%,Z%: UNTIL Z%=0 8370PRINTTAB(30,1) "GUIDE TO PALETTE USAGE" 8380PRINTTAB(30,2) "**********************" 8390PRINTTAB(1,5) "If a puzzle sprite contains its own palette, JIGSAW will use this for the" 8400PRINTTAB(1,6) "puzzle, swapping back to the previous palette when you return to the Desktop." 8410PRINTTAB(1,8) "If you are using a sprite with a palette which has to be loaded separately," 8420PRINTTAB(1,9) "load it before you select 'Start Puzzle' from the Icon Bar menu." 8430PRINTTAB(1,11) "Otherwise, JIGSAW will use either the standard (Mode 12) Desktop palette for" 8440PRINTTAB(1,12) "sprites created in 16 (or less) colour modes, or the 256-colour palette." 8450PRINTTAB(32,16) "CLICK MOUSE KEY TO RETURN TO DESKTOP" 8460REPEAT: MOUSE X%,Y%,Z%: UNTIL Z%>0 8470PROCWimp_WindowClose(JIGSCRN_Window%) 8480MOUSE ON 8490ENDPROC 8500 8510REM * * * * * Set up areas * * * * * 8520DEFPROCinitial 8530AREA%=170000 8540DIM SPAREA AREA% 8550DIM SCALE 16 8560DIM COLTABLE 16 8570COLTABAD%=COLTABLE 8580FOR N%=0 TO 15 8590 COLTABLE?N%=N% 8600NEXT N% 8610!SPAREA=AREA% 8620SPAREA!8=16 8630DIM SPRNAME 14 8640DIM palet% 80 8650DIM USEDBITS%(256) 8660DIM GRIDSPR%(32,32) 8670DIM DISPSPR%(32,32) 8680BITAREA%=122000 8690DIM BITAREA BITAREA% 8700!BITAREA=BITAREA% 8710BITAREA!8=16 8720ENDPROC 8730 8740REM * * * * * Read file information & set up constants * * * * * 8750DEFPROCinitialise 8760R0%=0: R1%=0: R2%=0: R3%=0: R4%=0: R5%=0: R6%=0 8770SYS "OS_File",17,FILNAME$ TO R0%,R1%,R2%,R3%,R4%,R5% 8780FILEFOUND%=0 8790IF R0%=1 THEN 8800 IF (R2% AND &FFFFFF00)=&FFFFF900 THEN 8810 FILEFOUND%=-1 8820 SYS &2E,256+9,SPAREA 8830 SYS &2E,256+10,SPAREA,FILNAME$ 8840 PICHIGH%=700 8850 PICWIDE%=860 8860 TINYHIGH%=200 8870 TINYWIDE%=240 8880 COLS16%=0 8890 M15%=0 8900 ELSE 8910 ERRMS$="FILE "+FILNAME$+" NOT SPRITE FILE" 8920 ENDIF 8930ELSE 8940 ERRMS$="FILE "+FILNAME$+" NOT FOUND" 8950ENDIF 8960IF FILEFOUND%=0 THEN 8970 VDU 24,192;160;1279;192; 8980 GCOL 128 8990 CLG 9000 VDU 26 9010 COLOUR 15 9020 PRINTTAB(12,26) ERRMS$ 9030 FOR N%=0 TO 200000: NEXT 9040ENDIF 9050ER%=0 9060MOUSE ON 9070ENDPROC 9080 9090REM * * * * * * Place piece on grid * * * * * * 9100DEFPROCplacebit 9110REPEAT: PROCtimenow: MOUSE X%,Y%,Z%: UNTIL Z%=0 9120REPEAT 9130 REPEAT: MOUSE X%,Y%,Z%: UNTIL Z%>0 OR TIME DIV 100 > TIM% 9140 PROCtimenow 9150 IF Z%>0 THEN 9160 IF X%<=LOWX% OR X%>=LOWX%+WIDE% OR Y%<=LOWY% OR Y%>=LOWY%+HIGH% VDU 7: Z%=0 9170 IF X%>LOWX%+WIDE% PRINTTAB(32,6) "PIECE ALREADY SELECTED" 9180 ENDIF 9190UNTIL Z%>0 9200PRINTTAB(32,6) " " 9210VDU 24,LOWX%;LOWY%;HIGHX%;HIGHY%; 9220NX%=(X%-LOWX%)*HL%/WIDE% 9230NY%=(Y%-LOWY%)*VL%/HIGH% 9240LX%=LOWX%+WIDE%*NX%/HL% 9250LY%=LOWY%+HIGH%*NY%/VL% 9260SYS &2E,256+34,BITAREA,STR$(S%),LX%,LY%,8 9270VDU 26 9280GRIDS%=GRIDSPR%(NY%,NX%) 9290USEDBITS%(GRIDS%)=0 9300IF GRIDS%>0 THEN 9310 CLEARED%=CLEARED%+1 9320 FOR N1%=1 TO NYDISP% 9330 FOR N2%=0 TO NXDISP%-1 9340 IF DISPSPR%(N1%,N2%)=0 THEN 9350 DISPSPR%(N1%,N2%)=GRIDS% 9360 SYS &2E,256+34,BITAREA,STR$(GRIDS%),LOWX%+WIDE%+12+N2%*(WIDE%/HL%+12),LOWY%+HIGH%-12-N1%*(HIGH%/VL%+12),8 9370 USEDBITS%(GRIDS%)=1 9380 N1%=NYDISP%: N2%=NXDISP% 9390 ENDIF 9400 NEXT N2% 9410 NEXT N1% 9420ENDIF 9430GRIDSPR%(NY%,NX%)=S% 9440VDU 24,60;740;500;992; 9450CLG 9460VDU 26 9470ENDPROC 9480 9490REM * * * * * * Quit or restart * * * * * * 9500DEFPROCquit 9510SYS "Hourglass_Off" 9520IF ERR<>17 AND ER%<>17 THEN 9530 REPORT 9540 PRINT " at line "; ERL 9550 FOR N%=0 TO 500000: NEXT 9560 finished%=TRUE 9570ELSE 9580 SYS "OS_Byte",124 9590 *CHANNELVOICE 1 1 9600 VDU 28,16,19,66,15 9610 COLOUR 5,255,0,255 9620 COLOUR 9,0,0,0 9630 COLOUR 133 9640 COLOUR 9 9650 CLS 9660 REPEAT: MOUSE X%,Y%,QZ%: UNTIL QZ%=0 9670 PRINTTAB(2,1) "Press LEFT mouse button to start another jigsaw" 9680 PRINTTAB(2,3) "Press RIGHT mouse button to return to Desktop" 9690 REPEAT: MOUSE X%,Y%,QZ%: UNTIL QZ%=1 OR QZ%=4 9700 IF ER%=0 ER%=1 9710ENDIF 9720ENDPROC 9730 9740REM * * * * * * Select puzzle piece * * * * * * 9750DEFPROCselectbit 9760REPEAT: PROCtimenow: MOUSE X%,Y%,Z%: UNTIL Z%=0 9770REPEAT: MOUSE X%,Y%,Z%: UNTIL Z%>0 OR TIME DIV 100 > TIM% 9780PROCtimenow 9790IF Z%=0 GOTO 9760 9800PRINTTAB(34,6) " " 9810IF X%>LOWX%+WIDE% THEN 9820 N2%=(X%-LOWX%-WIDE%-12)/(WIDE%/HL%+12) 9830 N1%=(LOWY%+HIGH%-12-Y%)/(HIGH%/VL%+12)+1 9840 IF N1%<=0 OR N1%>NYDISP% OR N2%<0 OR N2%>=NXDISP% PROCerror: GOTO 9760 9850 S%=DISPSPR%(N1%,N2%) 9860 IF S%=0 PROCerror: GOTO 9760 9870 CLEARED%=CLEARED%-1 9880 MORE%=0 9890 FOR N%=1 TO BITS% 9900 IF USEDBITS%(N%)=0 MORE%=1: N%=BITS% 9910 NEXT N% 9920 IF MORE%=0 THEN 9930 VDU 24,LOWX%+WIDE%+12+N2%*(WIDE%/HL%+12);LOWY%+HIGH%-12-N1%*(HIGH%/VL%+12);LOWX%+WIDE%+4+(N2%+1)*(WIDE%/HL%+12);LOWY%+HIGH%-16-(N1%-1)*(HIGH%/VL%+12); 9940 CLG 9950 VDU 26 9960 DISPSPR%(N1%,N2%)=0 9970 ELSE 9980 REPEAT 9990 SD%=RND(BITS%) 10000 UNTIL USEDBITS%(SD%)=0 10010 USEDBITS%(SD%)=1 10020 DISPSPR%(N1%,N2%)=SD% 10030 SYS &2E,256+34,BITAREA,STR$(SD%),LOWX%+WIDE%+12+N2%*(WIDE%/HL%+12),LOWY%+HIGH%-12-N1%*(HIGH%/VL%+12),8 10040 ENDIF 10050ELSE 10060 N2%=(X%-LOWX%)*HL%/WIDE% 10070 N1%=(Y%-LOWY%)*VL%/HIGH% 10080 IF N1%>=VL% OR N2%>=HL% THEN PROCerror: GOTO 9760 10090 S%=GRIDSPR%(N1%,N2%) 10100 IF S%=0 PROCerror: GOTO 9760 10110 GRIDSPR%(N1%,N2%)=0 10120 VDU 24,LOWX%+4+N2%*WIDE%/HL%;LOWY%+4+N1%*HIGH%/VL%;LOWX%-4+(N2%+1)*WIDE%/HL%;LOWY%-4+(N1%+1)*HIGH%/VL%; 10130 CLG 10140 VDU 26 10150ENDIF 10160XOFF%=(240-WIDE%/HL%)/2: IF XOFF%<0 THEN XOFF%=0 10170YOFF%=(240-HIGH%/VL%)/2: IF YOFF%<0 THEN YOFF%=0 10180SYS &2E,256+34,BITAREA,STR$(S%),60+XOFF%,740+YOFF%,8 10190PRINTTAB(4,0) "SELECTED PIECE" 10200ENDPROC 10210 10220REM * * * * * * Display sprite or 'Mode' box * * * * * * 10230DEFPROCspritebox 10240SYS &2E,256+13,SPAREA,SPRNAME,12,S% TO R0%,R1%,R2%,R3%,R4%,R5%,R6% 10250SPR$="" 10260FOR C%=0 TO R3%-1 10270 PRINTTAB(21+C%,L%) CHR$(SPRNAME?C%) 10280 SPR$=SPR$+CHR$(SPRNAME?C%) 10290NEXT C% 10300SYS &2E,256+40,SPAREA,SPR$ TO R0%,R1%,R2%,R3%,R4%,R5%,R6% 10310IF R6%=10 OR R6%=13 OR R6%=15 THEN 10320 PRINTTAB(45,L%); 10330 COLOUR 143 10340 GCOL 143 10350 VDU 24,700;(30-L%)*32;850;(30-L%)*32+96; 10360 CLG 10370 PRINT "MODE "; R6% 10380 VDU 26 10390 COLOUR 140 10400 GCOL 140 10410 PRINTTAB(45,L%) 10420ELSE 10430 SPRWIDE%=R3%*2 10440 SPRHIGH%=R4%*4 10450 SCALE!0=150: SCALE!4=96: SCALE!8=SPRWIDE%: SCALE!12=SPRHIGH% 10460 SYS &2E,256+52,SPAREA,SPR$,700,(30-L%)*32,8,SCALE,COLTABLE 10470ENDIF 10480L%=L%+4 10490S%=S%+1 10500ENDPROC 10510 10520REM * * * * * * Set up constants from sprite details * * * * * * 10530DEFPROCspriteinfo 10540SYS &2E,256+40,SPAREA,SPR$ TO R0%,R1%,R2%,R3%,R4%,R5%,R6% 10550CASE R6% OF 10560 WHEN 2,5,10: RESFACT%=8 10570 WHEN 1,4,9,13: RESFACT%=4 10580 OTHERWISE RESFACT%=2 10590ENDCASE 10600COLS16%=0 10610M15%=0 10620CASE R6% OF 10630 WHEN 2,9,12: COLS16%=1 10640 WHEN 10,13,15: M15%=1 10650ENDCASE 10660IF M15%=1 THEN 10670 MODE15 10680 VDU 23,1,0,0,0,0,0,0,0,0 10690 COLTABLE=0 10700ENDIF 10710SYS &2E,256+9,BITAREA 10720SPRPLOTM12%=R3%*2 10730SPRWIDE%=R3%*RESFACT% 10740SPRHIGH%=R4%*4 10750IF SPRHIGH%/SPRWIDE% > PICHIGH%/PICWIDE% THEN 10760 WIDE%=PICHIGH%*SPRWIDE%/SPRHIGH% 10770 HIGH%=PICHIGH% 10780 TW%=TINYHIGH%*SPRWIDE%/SPRHIGH% 10790 TH%=TINYHIGH% 10800ELSE 10810 HIGH%=PICWIDE%*SPRHIGH%/SPRWIDE% 10820 WIDE%=PICWIDE% 10830 TH%=TINYWIDE%*SPRHIGH%/SPRWIDE% 10840 TW%=TINYWIDE% 10850 ENDIF 10860REPEAT 10870 HL%=SQR(BITS%*SPRWIDE%/SPRHIGH%) 10880 IF HL%>0 THEN VL%=BITS%/HL% ELSE VL%=1 10890 IF HL%<2 OR VL%<2 BITS%=BITS%+1 10900UNTIL HL%>=2 AND VL%>=2 10910IF SPR$="sprpal256" AND BITS%=250 THEN HL%=16:VL%=16 10920REPEAT 10930 BITS%=HL%*VL% 10940 IF BITS%>256 HL%=HL%-1 10950UNTIL BITS%<=256 10960IF HL%>32 OR VL%>32 THEN 10970 COLOUR 1,9 10980 COLOUR 1 10990 COLOUR 135 11000 PRINTTAB(25,28) "SPRITE PROPORTIONS UNSUITABLE" 11010 ER%=17 11020 PROCquit 11030ENDIF 11040ENDPROC 11050 11060DEFPROCstart 11070MODE12 11080MOUSE ON 11090COLTABLE=COLTABAD% 11100IF NOT SAMEFILE% THEN 11110 REPEAT 11120 CLS 11130 REPEAT: MOUSE X%,Y%,Z%: UNTIL Z%=0 11140 PROCfilename :REM Get sprite file name 11150 IF NF%=-1 THEN ENDPROC 11160 PROCinitialise :REM Read file info. 11170 UNTIL FILEFOUND% 11180ENDIF 11190SAMEFILE%=0 11200PROCdefpal :REM Set default palette 11210PROCdispsprites :REM Display sprites in file 11220PROCbits :REM Get number of bits in puzzle 11230PROCspriteinfo :REM Set constants from sprite info. 11240IF ER%=17 THEN ENDPROC 11250PROCdividesprite :REM Divide sprite into pieces 11260PROCdisplaybits :REM Display unused pieces 11270IF ER%=17 THEN ENDPROC 11280MOUSE ON 11290COLOUR 130 11300PRINTTAB(32,2) "Target time:" 11310PRINTTAB(32,4) "Time so far:" 11320PROCconvtime(TARGET%) :REM Convert seconds to time string 11330PRINTTAB(45,2) TIMESTR$ 11340TIME=0 11350ENDPROC 11360 11370REM * * * * * * Display time so far * * * * * * 11380DEFPROCtimenow 11390TIM%=TIME/100 11400PROCconvtime(TIM%) 11410PRINTTAB(45,4) TIMESTR$ 11420ENDPROC
3 ț "<Obey$Dir>.Wimp" > �Wimp_Start("Jigsaw",6000,4000) 3 �User_SetInitialData (. �Create_Windows 2, �Create_Menus <1 �Wimp_WaitForEvent F. �Wimp_CloseDown P � Z: d� �User_SetInitialData n> �data :� Read data into arrays x � 23,1 0,0,0,0,0,0,0,0 � ȗ � ��initial �� �: �� �Create_Windows �/JIGSCRN_Window%=�Wimp_WindowLoad("JIGSCRN") �)INFO_Window%=�Wimp_WindowLoad("INFO") ��Wimp_IconBar �� � : � � �Event_Save(window%)=� � : �' � �Event_Sprites(window%)=sprites% : � �Create_Menus � Bar_Menu%(1) "Hmenu$="Jigsaw\Info>INFO_Window%\Start Puzzle\Palette Info\Help\Quit" ,%Bar_Menu%=�Wimp_MenuCreate(menu$) 6� @: J� �Event_Menu(window%) TȎ window% � ^& � -2 : =Bar_Menu% h : =� r� |: �*� �Event_WindowClose(window%,buttons%) �� �: �.� �Event_Draw(window%,x_origin%,y_origin%) �Ȏ window% � �2 � JIGSCRN_Window% : �User_DrawJIGSCRNWindow �� �� � : � � �User_DrawJIGSCRNWindow � � �: �4� �Event_MouseClick(window%,icon%,button%,x%,y%) Ȏ window% � 8 � Bar_Window% : �User_MouseBar( button%,icon%) � &� 0 : :% � �User_MouseBar( button%,icon%) D Ȏ button% � N � 1,4: X �openjigscrn b �jig l � v � � : �� �Event_MenuChoice(menu%) �Ȏ menu% � �/ � Bar_Menu% : �User_MenuChoiceBAR �� �� � : � � �User_MenuChoiceBAR � Ȏ �Wimp_MenuChoice(0) � � � 2: � �openjigscrn � �jig � � 3: �helppal � 4: �help � 5: */ $(wimp%+4)="Do you really want to Quit?" 4 response%=19 >B ș "Wimp_ReportError",wimp%,response%,"Jigsaw" � ,response% H � response%=1 finished%=� R � \ � f: p"� �Event_LoadFile(file$,type$) zȎ type$ � �3 � "Sprite" : �User_LoadFileSprite(file$) �� �� � : �" � �User_LoadFileSprite(file$) �7 �Wimp_WindowAlert("!Jigsaw","Loading file "+file$) � � � : �$� �Event_SaveFile(file$,window%) �� � �� �Wimp_IconBar �� fil%,size% � sprite% 8 $sprite%="!" fil%=� "<$Dir>.!Sprites" $size%=�# fil%+20 .�# fil% 8� spritearea% size% Bspritearea%!0=size% L/ș &2E,256+10,spritearea%,"<$Dir>.!Sprites" V1ș &2E,256+40,spritearea%,$sprite% � ,,,w%,h% `>wimp%!0=-1:wimp%!4=0:wimp%!8=0:wimp%!12=w%*2:wimp%!16=h%*4 j8wimp%!20=&311A:wimp%!24=sprite%:wimp%!28=spritearea% twimp%!32=� $sprite% ~'ș "Wimp_CreateIcon",,wimp% � icon% �*POINTER �ȗ � �� � ���closejigscrn �&�Wimp_WindowClose(JIGSCRN_Window%) �� � ���openjigscrn �!wimp%=JIGSCRN_Window% �#ș "Wimp_GetWindowState",,wimp% �wimp%!12=wimp%!12+40 wimp%!28=-1 ș "Wimp_OpenWindow",,wimp% *�Wimp_WindowForceDraw(JIGSCRN_Window%) � ( 2��resetmodepal <ș "Wimp_SetMode",mode% F ș "Wimp_SetPalette",,palet% P*POINTER Zȗ � d� n x � ��jig �F� * * * * * * MAIN PROGRAM LOOP * * * * * * �R0%=135: R1%=0: mode%=0 �$ș "OS_Byte",R0% � R0%,R1%,mode% �!ș "Wimp_ReadPalette",,palet% � ER%=0 �SAMEFILE%=0 �ș "OS_Byte",229,0,0 �� � � �quit �� � ȗ � � � � � ER%=0 QZ%=0 ER%=0 � QZ%=1 � ș "OS_Byte",229,1,0 " �closejigscrn , �resetmodepal 6 � @ � J QZ%=0 T �start ^ � h � ER%=0 r � | � �< �timenow :� Display time so far �< �selectbit :� Select puzzle piece �< �placebit :� Place piece on grid � � CLEARED%=0 �H �checkpos :� Check bits in correct positions � � OK%=0 � �F �end :� Check performance - play tune � � � ȗ X%,Y%,Z% �D �endmessage :� Display performance message � � Z%>0 �& � Z%=1 SAMEFILE%=-1 � SAMEFILE%=0 � � � &G� * * * * * * Get number of bits in puzzle * * * * * * 0 ��bits :� D� 8 N@%=3 X)�26,3)"APPROXIMATE NUMBER OF PIECES" b)�26,4)"****************************" l � 143 v � 143 �� 8 �� N%=1 � 10 �& � 24,576;832-N%*64;656;864-N%*64; � � � � 26 �" �37,N%*2+5) BITNOS%(N%); " " �� ��: ȗ X%,Y%,Z%: � Z%=0 �ȗ � 648,784 �� �! �: ȗ X%,Y%,Z%: � �X%,Y%)=15 � N%=(880-Y%)/64 � � 140 / �48,N%*2+5) "Target Time: "; TARGETS$(N%) � 139 � 139 & � 24,576;832-N%*64;656;864-N%*64; * � 4" �37,N%*2+5) BITNOS%(N%); " " > � 26 H( �: ȗ X%,Y%,Z%: � �X%,Y%)=12 � Z%>0 R � 143 \ � 143 f � Z%=0 � p' � 24,576;832-N%*64;656;864-N%*64; z � �# �37,N%*2+5) BITNOS%(N%); " " � � 140 �2 �48,N%*2+5) " " � � � � 26 � � Z%>0 �BITS%=BITNOS%(N%) �TARGET%=TARGETS%(N%) � � 128 �� 7 �� � �G� * * * * * * Create border for filename screen * * * * * * ��border � JX%=0 � 6 COLTABLE?15=1 + JX% � 6 $A ș &2E,256+52,spritearea%,"jigbit",JX%*148+84,0,8,0,COLTABLE .� 8&ș &2E,256+33,spritearea%,"jigbit" B� JX%=0 � 6 L COLTABLE?15=1 + JX% � 6 VC ș &2E,256+52,spritearea%,"jigbit",JX%*148+84,920,8,0,COLTABLE `� j&ș &2E,256+33,spritearea%,"jigbit" t� JY%=1 � 7 ~ COLTABLE?15=1 + JY% � 6 �C ș &2E,256+52,spritearea%,"jigbit90",0,JY%*120-40,8,0,COLTABLE �� �(ș &2E,256+47,spritearea%,"jigbit90" �� JY%=1 � 7 � COLTABLE?15=1 + JY% � 6 �F ș &2E,256+52,spritearea%,"jigbit90",1100,JY%*120-40,8,0,COLTABLE �� �(ș &2E,256+47,spritearea%,"jigbit90" �COLTABLE?15=15 �� � �G� * * * * * * Check bits in correct positions * * * * * * ��checkpos � N%=1 � 2 S%=0 OK%=0 ( � Y%=VL%-1 � 0 �-1 2 � X%=0 � HL%-1 < S%=S%+1 F � GRIDSPR%(Y%,X%)<>S% � P GS%=GRIDSPR%(Y%,X%) Z LX%=LOWX%+WIDE%*X%/HL% d LY%=LOWY%+HIGH%*Y%/VL% n9 ș &2E,256+52,BITAREA,�(GS%),LX%,LY%,4,0,COLTABLE x OK%=1 � � � � X% � � Y% � � OK%=1 � N%=1 � � T%=� � ș "OS_Byte",229,1,0 � ș "Hourglass_On" � � A%=1 � 100 � � B%=1 � 2000: � B% �# ș "Hourglass_Percentage",A% � � A% � ș "Hourglass_Off" � ș "OS_Byte",229,0,0 �=T% � � N% "� , 6G� * * * * * * Convert seconds to time string * * * * * * @��convtime(SECS%) JHRS%=SECS%/3600 TSECS%=SECS%-HRS%*3600 ^MINS%=SECS%/60 hSECS%=SECS%-MINS%*60 rFTIMESTR$=�"0"+�(HRS%),2)+"."+�"0"+�(MINS%),2)+"."+�"0"+�(SECS%),2) |� � �G� * * * * * Calculate coordinates of pieces in grid * * * * * ���coords �*X1%=((BITNO%-1) � HL%)*WIDE%/HL%+LOWX% �.X2%=(((BITNO%-1) � HL%)+1)*WIDE%/HL%+LOWX% �2Y1%=((VL%-(BITNO%-1) � HL%)-1)*HIGH%/VL%+LOWY% �.Y2%=(VL%-(BITNO%-1) � HL%)*HIGH%/VL%+LOWY% �� � �G� * * * * * * Read data into arrays * * * * * * � ��data �� BITNOS%(10) �� TARGETS%(10) � TARGETS$(10) � SPEED$(10) �� 10,25,"25 Seconds",20,60,"1 Minute",40,180,"3 Minutes",60,360,"6 Minutes",80,720,"12 Minutes",100,1200,"20 Minutes",130,2700,"35 Minutes",160,3600,"1 Hour",200,5400,"1 Hour 30 Mins.",250,7200,"2 Hours" &�� " Average time "," A bit slow "," Slow time "," Very slow time "," Did you doze off? "," Average time "," Good time "," Fast time "," Very fast time "," Top speed! " 0� N%=1 � 10 :, � BITNOS%(N%),TARGETS%(N%),TARGETS$(N%) D� N� N%=1 � 10 X � SPEED$(N%) b� l� v �G� * * * * * * Set default palette * * * * * * ���defpal �� 0,255,255,255 �� 1,221,221,221 �� 2,187,187,187 �� 3,153,153,153 �� 4,119,119,119 �� 5,85,85,85 �� 6,51,51,51 � � 7,0,0,0 �� 8,0,68,153 �� 9,238,238,0 �� 10,0,204,0 � 11,221,0,0 � 12,238,238,187 � 13,85,136,0 � 14,255,187,0 *� 15,0,187,255 4� > HG� * * * * * * Display unused pieces * * * * * * R��displaybits \CLEARED%=BITS% f� N%=1 � BITS% p USEDBITS%(N%)=0 z� N% �� N1%=0 � VL% � � N2%=0 � HL% � GRIDSPR%(N1%,N2%)=0 � � N2% � � N1% �DSCALE!0=TW%: SCALE!4=TH%: SCALE!8=SPRPLOTM12%: SCALE!12=SPRHIGH% �6ș &2E,256+52,SPAREA,SPR$,920,780,8,SCALE,COLTABLE � �grid �-NXDISP%=(1260-LOWX%-WIDE%)/(WIDE%/HL%+12) �+NYDISP%=(LOWY%+HIGH%-12)/(HIGH%/VL%+12) �7� NXDISP%<1 � NXDISP%>32 � NYDISP%<1 � NYDISP%>32 � �, �25,6) "SPRITE PROPORTIONS UNSUITABLE" � ER%=17 �quit � � $D%=0 .� N1%=1 � NYDISP% 8 � N2%=0 � NXDISP%-1 B � L S%=�(BITS%) V" � USEDBITS%(S%)=0 � D%=BITS% ` USEDBITS%(S%)=1 j D%=D%+1 t DISPSPR%(N1%,N2%)=S% ~g ș &2E,256+34,BITAREA,�(S%),LOWX%+WIDE%+12+N2%*(WIDE%/HL%+12),LOWY%+HIGH%-12-N1%*(HIGH%/VL%+12),8 �, � D%>=BITS% � N2%=NXDISP%: N1%=NYDISP% � � N2% � � N1% �� � �G� * * * * * * Display sprites in file * * * * * * ���dispsprites �� 23,1 0,0,0,0,0,0,0,0 �� 7 � � 140 �5ș &2E,256+8,SPAREA � R0%,R1%,R2%,R3%,R4%,R5%,R6% � � R3%=1 � SNO%=1 � ȗ � 772,880 LASTPAGE%=0 ( T%=R3% 2 S%=1 < OLDS%=1 F � P � Z L%=4 d BACKP%=OLDS% n OLDS%=S% x � � �spritebox � � L%=28 � S%>T% � � '' � �24); � � 138 �# � "CLICK ON SPRITE TO SELECT" � � OLDS%>1 � � � 139 � � 28,59,29,64,26 � � � � � � " BACK" � � " PAGE" � 26 �45,29) � 140 " ȗ � 984,120 , � 6 � S%<=T% � @ � 138 J � 28,66,29,71,26 T � ^ � h � " NEXT" r � " PAGE" | � 26 � �45,29) � � 140 �- � OLDS%=1 � S%<>BACKP% � ȗ � 1096,120 � � � � � XYOK%=0 � �: ȗ X%,Y%,Z%: � Z%>0 � � X%>=700 � X%<=850 � � L%=(1024-Y%)/32-2 � SONP%=(S%-2) � 6+1 �F � L%>(SONP%-1)*4+3 � L%<1 � L% � 4 = 0 � XYOK%=1 � LASTPAGE%=1 � � � � Y%<64 � Y%>192 XYOK%=1 " � X%<944 � X%>1152 XYOK%=1 # � X%>1040 � X%<1056 XYOK%=1 # � OLDS%=1 � X%<1056 XYOK%=1 &! � S%>T% � X%>1056 XYOK%=1 0@ � OLDS%>6 � X%>943 � X%<1041 � Y%>63 � Y%<193 S%=OLDS%-6 : �: ȗ X%,Y%,Z%: � Z%=0 D � N � XYOK%=0 X � LASTPAGE%=1 b$ SNO%=((S%-2) � 6)*6 + L% � 4 +1 l� vFș &2E,256+13,SPAREA,SPRNAME,14,SNO% � R0%,R1%,R2%,R3%,R4%,R5%,R6% �SPR$="" �� C%=0 � R3%-1 � SPR$=SPR$+�(SPRNAME?C%) �� C% � � 140 �� � �G� * * * * * * Divide sprite into pieces * * * * * * ���dividesprite �� N%=0 � 15 � � 19,N%,0,0,0,0 �� N% � � 130 � LOWX%=0 LOWY%=0 HSCALE!0=WIDE%: SCALE!4=HIGH%: SCALE!8=SPRPLOTM12%: SCALE!12=SPRHIGH% *:ș &2E,256+52,SPAREA,SPR$,LOWX%,LOWY%,8,SCALE,COLTABLE 4 �grid >� BITNO%=1 � BITS% H �coords R � X1%,Y1% \ � X2%,Y2% f& ș &2E,256+14,BITAREA,�(BITNO%),0 p� BITNO% z� �$� M15%=0 � �getpal � � 20: � 130 �� � �G� * * * * * * Check performance - play tune * * * * * * � ��end �HSCALE!0=WIDE%: SCALE!4=HIGH%: SCALE!8=SPRPLOTM12%: SCALE!12=SPRHIGH% �:ș &2E,256+52,SPAREA,SPR$,LOWX%,LOWY%,8,SCALE,COLTABLE �ȗ � �!�57,22) "CLICK 'SELECT' FOR" ��57,23) " NEW SPRITE FILE" �� 11 �!�57,25) "CLICK 'ADJUST' FOR" � �57,26) " SAME SPRITE FILE" � 7 � TIM%>TARGET% � DIFF%=TIM%-TARGET% $ P%=DIFF%*100/TARGET% . N%=1 8� B DIFF%=TARGET%-TIM% L P%=DIFF%*100/TIM% V N%=6 `� j!� P%>80 N%=N%+4 � N%=N%+P%/20 t�endmessage ~&� N%<6 � AMP%=N%*3 � AMP%=(N%-5)*3 �*CHANNELVOICE 1 2 �� TIM%>TARGET% � � � 1,-AMP%,80,20 � � L%=0 � 40000:� � � 1,-AMP%,60,20 � � L%=0 � 40000:� � � 1,-AMP%,40,20 � � L%=0 � 40000:� �� � � 1,-AMP%,100,5 � � L%=0 � 10000:� � � 1,-AMP%,100,8 � L%=0 � 10000:� � 1,-AMP%,100,5 � L%=0 � 10000:� � 1,-AMP%,120,10 ( � L%=0 � 14000:� 2 � 1,-AMP%,120,10 < � L%=0 � 20000:� F � 1,-AMP%,128,10 P � L%=0 � 20000:� Z � 1,-AMP%,128,10 d � L%=0 � 24000:� n � 1,-AMP%,148,15 x � L%=0 � 30000:� � � 1,-AMP%,136,5 � � L%=0 � 10000:� � � 1,-AMP%,120,10 � � L%=0 � 30000:� �� �*CHANNELVOICE 1 1 ��: ȗ X%,Y%,Z%: � Z%=0 �� � �G� * * * * * * Display performance message * * * * * * ���endmessage �3� M15%=1 BOXCOL%=128+�(127) � BOXCOL%=128+�(15) � � BOXCOL% � 0 "�57,13) " " "�57,14) " PUZZLE COMPLETE " ""�57,15) " " ,"�57,17) " " 6�57,16) SPEED$(N%) @� T%=1 � 40000: � J� T ^G� * * * * * * Display error message * * * * * * h��error r� 7 |�34,6) "NO PIECE SELECTED" �� � �G� * * * * * * Get sprite file name * * * * * * ���filename ��12 �� 23,1 0,0,0,0,0,0,0,0 �ȗ � ��border �� 24,112;832;448;864; � � 134 �� �� 24,496;832;1056;864; �� � 134 � 4 �8,5) "NAME OF SPRITE FILE" &/�32,5) "Description of picture(s) in file" 0 � 128 :� 2 D�35,7) "Pictures" N)�35,11) "Patterns - 256 colour mode" X�35,15) "Horses" b�35,19) "Girls' names" l!�35,23) "Alphabet & numbers" v� 3 �(�35,9) "Patterns - 16 colour mode" ��35,13) "Butterflies" ��35,17) "Symbols" ��35,21) "Boys' names" �� 4 �� NF%=1 � 9 � � 131 - NF% � 2 � � 131 - NF% � 2 �( � 24,192;832-NF%*64;384;864-NF%*64; � � � � 26 �) �12,NF%*2+5) " JIGSPRITE"; NF%; " " �� � 131 � 131 � 24,192;192;384;224; � *� 26 4�15,25)"OTHER" > � 130 H � 130 R� 24,384;96;688;128; \� f� 26 p�25,28)"RETURN TO DESKTOP" zȗ ȓ 180,90,820,810 �ȗ � 376,784 �� �. �: ȗ X%,Y%,Z%: P%=�X%,Y%): � P%=2 � P%=3 � � 129 � � 129 � � Y%<132 � � NF%=-1 � � 24,384;96;688;128; � � �! �25,28)"RETURN TO DESKTOP" � � � � Y%<228 � � NF%=0 � 24,192;192;384;224; � �15,25)"OTHER" $ � . NF%=(880-Y%)/64 8* � 24,192;832-NF%*64;384;864-NF%*64; B � L+ �12,NF%*2+5) " JIGSPRITE"; NF%; " " V � ` � j � 26 t' �: ȗ X%,Y%,Z%: � �X%,Y%)=0 � Z%>0 ~ � 128+P% � � 128+P% � � Z%=0 � � � NF%=-1 � � � 24,384;96;688;128; � � �" �25,28)"RETURN TO DESKTOP" � � � � NF%=0 � � � 24,192;192;384;224; � � � �15,25)"OTHER" � � + � 24,192;832-NF%*64;384;864-NF%*64; � , �12,NF%*2+5) " JIGSPRITE"; NF%; " " � ( � 2 � < � 26 F � Z%>0 Pȗ � Z � NF%=0 � d � 128 n � 24,192;192;384;224; x � � � 24,656;192;1104;224; � � 131 � � � � 26 � �41,25) ">" � � 128 � � 3 �* �12,25) "ENTER FILE NAME AND RETURN" � � 23,1,1,0,0,0,0,0,0,0 � � 131 � � 4 � �42,25) FILNAME$ �3 � FILNAME$="" FILNAME$="<Obey$Dir>.JIGSPRITE1" � � NF%=-1 � ER%=1 " QZ%=1 , � 6, FILNAME$="<Obey$Dir>.JIGSPRITE"+�(NF%) @ � J� T� 23,1 0,0,0,0,0,0,0,0 ^ȗ ȓ 0,0,1279,1023 h � 128 r� 7 |� � �G� * * * * * * Get sprite's palette if present * * * * * * ���getpal � A%=SPAREA �B%=A%!4 �C%=A%+A%!8 �� � NAME$="" � � D%=0 � 11 �; � ?(C%+4+D%) <> 0 � NAME$=NAME$+�(?(C%+4+D%)) � D%=11 � � � E%=C% � C%=C%+C%!0 B%=B%-1 � B%=0 � NAME$=SPR$ 4� NAME$<>SPR$ � � "SPRITE NOT FOUND: "; NAME$: � &� !(E%+32)>44 � 0 � Sprite has own palette : NC%=(!(E%+32)-44)/8 D E%=E%+44 N � D%=0 � NC%-1 X7 R%=?(E%+D%*8+1): G%=?(E%+D%*8+2): B%=?(E%+D%*8+3) b � D%,R%,G%,B% l � v� �/ � Use palette readings on entry to JIGSCRN �! ș "Wimp_SetPalette",,palet% �� �R0%=2: R1%=16 �1ș "OS_ReadPalette",R0%,R1% � R0%,R1%,R2%,R3% �FRB%=((R2%>>8) � &FF): GB%=((R2%>>16) � &FF): BB%=((R2%>>24) � &FF) �6� RB%>200 � GB%>200 � BB%>200 MAXB%=500 � MAXB%=-1 �MAXC%=0: MAXD%=0: MINC%=-1 �� N%=0 � 15 � R0%=N% �2 ș "OS_ReadPalette",R0%,R1% � R0%,R1%,R2%,R3% �D R%=((R2%>>8) � &FF): G%=((R2%>>16) � &FF): B%=((R2%>>24) � &FF) � � MAXB%>0 � 3 � R%<160 � G%<160 � B%<160 � MAXB%>R%+G%+B% � MAXB%=R%+G%+B% MINC%=N% � * � 40 DR%=�(RB%-R%): DG%=�(GB%-G%): DB%=�(BB%-B%) > DIFFC%=DR%+DG%+DB% H, � DIFFC%>MAXD% � MAXC%=N%: MAXD%=DIFFC% R� \"� MINC%>=0 � � MINC% � � MAXC% f� p zG� * * * * * * Draw grid lines * * * * * * � ��grid �*HIGHX%=LOWX%+WIDE%: HIGHY%=LOWY%+HIGH% �� N%=0 � HL% � VLINE%=LOWX%+WIDE%*N%/HL% �! � VLINE%,LOWY%,VLINE%,HIGHY% �� N% �� LOWX%,LOWY%,HIGHX%,LOWY% �� N%=1 � VL% � HLINE%=LOWY%+HIGH%*N%/VL% �! � LOWX%,HLINE%,HIGHX%,HLINE% �� N% �� � G� * * * * * * Operating instructions * * * * * * ��help ȗ � $�openjigscrn .�helphdr 8U�5,5) "The first screen shows a selection of files, each containing one or more" BZ�1,6) "pictures - click mouse button on chosen file name, or if you want to use your" LX�1,7) "own picture, click on the entry 'OTHER', then type in the name of your file" VY�1,8) "and press RETURN. Any sprite file may be used provided it is not too big and" `[�1,9) "the sprite has suitable proportions for a jigsaw (see note later); if the file" jH�1,10) "is on a different disc, swap discs before pressing RETURN." tX�5,13) "If the chosen file contains more than one sprite, a 2nd screen showing the" ~]�1,14) "name and a tiny version of each sprite will appear - click on the one you want." �]�1,15) "(If a sprite has its own palette, the colours may not be correct at this stage)" �Z�1,16) "If there are more than six sprites in the file, the rest may be displayed by" �Y�1,17) "clicking on 'NEXT PAGE' (use 'BACK PAGE' to return to the previous screen)." �Y�1,18) "If any sprites were created using a 256-colour mode, the sprite will not be" �[�1,19) "displayed, but may still be selected by clicking on the box showing the mode." �Y�5,22) "When you have chosen your picture, the next screen will allow you to select" �Y�1,23) "how many pieces you want - choose a low number for an easy task, a high one" �Z�1,24) "if you have plenty of time to spare! (The actual number of pieces may not be" �Z�1,25) "exactly the number selected; it will depend on the proportions of the chosen" ��1,26) "sprite)." ��: ȗ X%,Y%,Z%: � Z%>0 ��helphdr Q�5,5) "The puzzle screen itself shows a grid in which the picture is to be " Z�1,6) "assembled on the left, a small version of the picture as a guide at top right" X�1,7) "and a selection of puzzle pieces at bottom right. Click any mouse button on" [�1,8) "the piece you want (the selected piece will then appear above the puzzle grid)" (V�1,9) "and place it on the grid by clicking the mouse in the square in which you" 2Z�1,10) "think it should go. (If you later realise it is in the wrong place it may be" <A�1,11) "moved by clicking the mouse on it to re-select it)." FR�5,14) "Continue until all the pieces have been used up - when the puzzle is" PY�1,15) "complete (and all the pieces are in their correct positions) the grid lines" ZX�1,16) "covering the puzzle will disappear (if the sprite has a 'mask', background" dV�1,17) "lines will remain). Once all the pieces have been moved to the grid, any" nY�1,18) "which are not in the correct position (there are quite likely to be some if" xW�1,19) "the puzzle has pieces which appear to be identical or almost so) then any" �S�1,20) "piece which is in the wrong place will change colour for a short time" �Y�1,21) "(indicated by the hourglass), so that you will know which pieces have to be" �R�1,22) "swapped around. Note, timimg stops while the hourglass is displayed." �W�5,25) "To quit the current puzzle before completion, press the ESCAPE key at any" �9�1,26) "time except while the hourglass is running." ��: ȗ X%,Y%,Z%: � Z%>0 �� ��: ȗ X%,Y%,Z%: � Z%=0 �!�30,1) "JIGSAW INSTRUCTIONS" �!�30,2) "*******************" �\�1,5) "Note - Although JIGSAW uses windows, because of possible mode / palette changes" �Z�1,6) "and because it sets a target time for completing the puzzle, the program does" �Y�1,7) "not 'multi-task', ie any other WIMP tasks will be suspended while the puzzle" !�1,8) "screen is displayed." %�1,10) "Sprite Size Limitations" %�1,11) "=======================" "Y�1,12) "Minimum size:- There is no minimum size limit - you can even make a jigsaw" ,X�1,13) "from one pixel if you wish, though it won't be much fun, as all the pieces" 6!�1,14) "will look the same!" @[�1,16) "Maximum size:- The program allows just over 160Kb for a sprite FILE; this is" J\�1,17) "sufficient for one full-screen sprite (640 x 256 pixels) in a 256-colour mode," T[�1,18) "two full-screen sprites (or one larger than full-screen, as long as it is not" ^W�1,19) "more than 160Kb) in a 16-colour mode, or a large number of small sprites." hX�1,21) "Proportions:- The program adjusts the size of the picture to the maximum" rX�1,22) "allowed by the size of the grid, while still keeping the sprite's original" |Y�1,23) "height / width ratio. Thus, if you choose a sprite which is much wider than" �Z�1,24) "it is high, the program will make the picture the same width as the grid and" �Y�1,25) "will decrease the height proportionately; if the height is then found to be" �Y�1,26) "insufficient for at least two 'lines' of puzzle, the program will display a" �X�1,27) "warning message and abandon the attempt to make a puzzle from this sprite." �1�1,28) "(Similarly for tall, thin sprites)." �3�36,30) "CLICK MOUSE KEY TO RETURN TO DESKTOP" ��: ȗ X%,Y%,Z%: � Z%>0 �&�Wimp_WindowClose(JIGSCRN_Window%) �ȗ � �� � �G� * * * * * * Operating instructions headings * * * * * * � ��helphdr ș "Wimp_SetColour",%111 !ș "Wimp_SetColour",%10001111 � &�: ȗ X%,Y%,Z%: � Z%=0 0!�30,1) "JIGSAW INSTRUCTIONS" :!�30,2) "*******************" D*�40,29) "CLICK MOUSE KEY TO CONTINUE" N� X bG� * * * * * * Guide to palette usage * * * * * * l ��helppal vȗ � ��openjigscrn �ș "Wimp_SetColour",%111 �!ș "Wimp_SetColour",%10001111 �� ��: ȗ X%,Y%,Z%: � Z%=0 �$�30,1) "GUIDE TO PALETTE USAGE" �$�30,2) "**********************" �V�1,5) "If a puzzle sprite contains its own palette, JIGSAW will use this for the" �Z�1,6) "puzzle, swapping back to the previous palette when you return to the Desktop." �X�1,8) "If you are using a sprite with a palette which has to be loaded separately," �M�1,9) "load it before you select 'Start Puzzle' from the Icon Bar menu." �Z�1,11) "Otherwise, JIGSAW will use either the standard (Mode 12) Desktop palette for" �V�1,12) "sprites created in 16 (or less) colour modes, or the 256-colour palette." !3�32,16) "CLICK MOUSE KEY TO RETURN TO DESKTOP" !�: ȗ X%,Y%,Z%: � Z%>0 !&�Wimp_WindowClose(JIGSCRN_Window%) ! ȗ � !*� !4 !>C� * * * * * Set up areas * * * * * !H ��initial !RAREA%=170000 !\� SPAREA AREA% !f� SCALE 16 !p� COLTABLE 16 !zCOLTABAD%=COLTABLE !�� N%=0 � 15 !� COLTABLE?N%=N% !�� N% !�!SPAREA=AREA% !�SPAREA!8=16 !�� SPRNAME 14 !�� palet% 80 !�� USEDBITS%(256) !�� GRIDSPR%(32,32) !�� DISPSPR%(32,32) !�BITAREA%=122000 !�� BITAREA BITAREA% !�!BITAREA=BITAREA% "BITAREA!8=16 "� " "$G� * * * * * Read file information & set up constants * * * * * ".��initialise "83R0%=0: R1%=0: R2%=0: R3%=0: R4%=0: R5%=0: R6%=0 "B6ș "OS_File",17,FILNAME$ � R0%,R1%,R2%,R3%,R4%,R5% "LFILEFOUND%=0 "V � R0%=1 � "`$ � (R2% � &FFFFFF00)=&FFFFF900 � "j FILEFOUND%=-1 "t ș &2E,256+9,SPAREA "~# ș &2E,256+10,SPAREA,FILNAME$ "� PICHIGH%=700 "� PICWIDE%=860 "� TINYHIGH%=200 "� TINYWIDE%=240 "� COLS16%=0 "� M15%=0 "� � "�2 ERRMS$="FILE "+FILNAME$+" NOT SPRITE FILE" "� � "�� "�+ ERRMS$="FILE "+FILNAME$+" NOT FOUND" "�� # � FILEFOUND%=0 � # � 24,192;160;1279;192; # � 128 # � #( � 26 #2 � 15 #< �12,26) ERRMS$ #F � N%=0 � 200000: � #P� #Z ER%=0 #dȗ � #n� #x #�G� * * * * * * Place piece on grid * * * * * * #���placebit #�$�: �timenow: ȗ X%,Y%,Z%: � Z%=0 #�� #�, �: ȗ X%,Y%,Z%: � Z%>0 � � � 100 > TIM% #� �timenow #� � Z%>0 � #�K � X%<=LOWX% � X%>=LOWX%+WIDE% � Y%<=LOWY% � Y%>=LOWY%+HIGH% � 7: Z%=0 #�7 � X%>LOWX%+WIDE% �32,6) "PIECE ALREADY SELECTED" #� � #� � Z%>0 #�$�32,6) " " #�#� 24,LOWX%;LOWY%;HIGHX%;HIGHY%; $NX%=(X%-LOWX%)*HL%/WIDE% $NY%=(Y%-LOWY%)*VL%/HIGH% $LX%=LOWX%+WIDE%*NX%/HL% $"LY%=LOWY%+HIGH%*NY%/VL% $,)ș &2E,256+34,BITAREA,�(S%),LX%,LY%,8 $6� 26 $@GRIDS%=GRIDSPR%(NY%,NX%) $JUSEDBITS%(GRIDS%)=0 $T� GRIDS%>0 � $^ CLEARED%=CLEARED%+1 $h � N1%=1 � NYDISP% $r � N2%=0 � NXDISP%-1 $| � DISPSPR%(N1%,N2%)=0 � $� DISPSPR%(N1%,N2%)=GRIDS% $�m ș &2E,256+34,BITAREA,�(GRIDS%),LOWX%+WIDE%+12+N2%*(WIDE%/HL%+12),LOWY%+HIGH%-12-N1%*(HIGH%/VL%+12),8 $� USEDBITS%(GRIDS%)=1 $� N1%=NYDISP%: N2%=NXDISP% $� � $� � N2% $� � N1% $�� $�GRIDSPR%(NY%,NX%)=S% $�� 24,60;740;500;992; $�� $�� 26 $�� % %G� * * * * * * Quit or restart * * * * * * % ��quit %&ș "Hourglass_Off" %0� �<>17 � ER%<>17 � %: � %D � " at line "; � %N � N%=0 � 500000: � %X finished%=� %b� %l ș "OS_Byte",124 %v *CHANNELVOICE 1 1 %� � 28,16,19,66,15 %� � 5,255,0,255 %� � 9,0,0,0 %� � 133 %� � 9 %� � %� �: ȗ X%,Y%,QZ%: � QZ%=0 %�= �2,1) "Press LEFT mouse button to start another jigsaw" %�; �2,3) "Press RIGHT mouse button to return to Desktop" %�% �: ȗ X%,Y%,QZ%: � QZ%=1 � QZ%=4 %� � ER%=0 ER%=1 %�� %�� & &G� * * * * * * Select puzzle piece * * * * * * &��selectbit & $�: �timenow: ȗ X%,Y%,Z%: � Z%=0 &*+�: ȗ X%,Y%,Z%: � Z%>0 � � � 100 > TIM% &4�timenow &>� Z%=0 � �T`f &H�34,6) " " &R� X%>LOWX%+WIDE% � &\+ N2%=(X%-LOWX%-WIDE%-12)/(WIDE%/HL%+12) &f- N1%=(LOWY%+HIGH%-12-Y%)/(HIGH%/VL%+12)+1 &pA � N1%<=0 � N1%>NYDISP% � N2%<0 � N2%>=NXDISP% �error: � �T`f &z S%=DISPSPR%(N1%,N2%) &� � S%=0 �error: � �T`f &� CLEARED%=CLEARED%-1 &� MORE%=0 &� � N%=1 � BITS% &�) � USEDBITS%(N%)=0 MORE%=1: N%=BITS% &� � N% &� � MORE%=0 � &ʚ � 24,LOWX%+WIDE%+12+N2%*(WIDE%/HL%+12);LOWY%+HIGH%-12-N1%*(HIGH%/VL%+12);LOWX%+WIDE%+4+(N2%+1)*(WIDE%/HL%+12);LOWY%+HIGH%-16-(N1%-1)*(HIGH%/VL%+12); &� � &� � 26 &� DISPSPR%(N1%,N2%)=0 &� � &� � ' SD%=�(BITS%) ' � USEDBITS%(SD%)=0 ' USEDBITS%(SD%)=1 '$ DISPSPR%(N1%,N2%)=SD% '.i ș &2E,256+34,BITAREA,�(SD%),LOWX%+WIDE%+12+N2%*(WIDE%/HL%+12),LOWY%+HIGH%-12-N1%*(HIGH%/VL%+12),8 '8 � 'B� 'L N2%=(X%-LOWX%)*HL%/WIDE% 'V N1%=(Y%-LOWY%)*VL%/HIGH% '`+ � N1%>=VL% � N2%>=HL% � �error: � �T`f 'j S%=GRIDSPR%(N1%,N2%) 't � S%=0 �error: � �T`f '~ GRIDSPR%(N1%,N2%)=0 '�j � 24,LOWX%+4+N2%*WIDE%/HL%;LOWY%+4+N1%*HIGH%/VL%;LOWX%-4+(N2%+1)*WIDE%/HL%;LOWY%-4+(N1%+1)*HIGH%/VL%; '� � '� � 26 '�� '�0XOFF%=(240-WIDE%/HL%)/2: � XOFF%<0 � XOFF%=0 '�0YOFF%=(240-HIGH%/VL%)/2: � YOFF%<0 � YOFF%=0 '�4ș &2E,256+34,BITAREA,�(S%),60+XOFF%,740+YOFF%,8 '��4,0) "SELECTED PIECE" '�� '� '�G� * * * * * * Display sprite or 'Mode' box * * * * * * '���spritebox ( Dș &2E,256+13,SPAREA,SPRNAME,12,S% � R0%,R1%,R2%,R3%,R4%,R5%,R6% ( SPR$="" (� C%=0 � R3%-1 ( �21+C%,L%) �(SPRNAME?C%) (( SPR$=SPR$+�(SPRNAME?C%) (2� C% (<;ș &2E,256+40,SPAREA,SPR$ � R0%,R1%,R2%,R3%,R4%,R5%,R6% (F � R6%=10 � R6%=13 � R6%=15 � (P �45,L%); (Z � 143 (d � 143 (n+ � 24,700;(30-L%)*32;850;(30-L%)*32+96; (x � (� � "MODE "; R6% (� � 26 (� � 140 (� � 140 (� �45,L%) (�� (� SPRWIDE%=R3%*2 (� SPRHIGH%=R4%*4 (�A SCALE!0=150: SCALE!4=96: SCALE!8=SPRWIDE%: SCALE!12=SPRHIGH% (�> ș &2E,256+52,SPAREA,SPR$,700,(30-L%)*32,8,SCALE,COLTABLE (�� (�L%=L%+4 (�S%=S%+1 )� ) )G� * * * * * * Set up constants from sprite details * * * * * * )"��spriteinfo ),;ș &2E,256+40,SPAREA,SPR$ � R0%,R1%,R2%,R3%,R4%,R5%,R6% )6Ȏ R6% � )@ � 2,5,10: RESFACT%=8 )J � 1,4,9,13: RESFACT%=4 )T RESFACT%=2 )^� )h COLS16%=0 )r M15%=0 )|Ȏ R6% � )� � 2,9,12: COLS16%=1 )� � 10,13,15: M15%=1 )�� )�� M15%=1 � )� �15 )� � 23,1,0,0,0,0,0,0,0,0 )� COLTABLE=0 )�� )�ș &2E,256+9,BITAREA )�SPRPLOTM12%=R3%*2 )�SPRWIDE%=R3%*RESFACT% )�SPRHIGH%=R4%*4 )�-� SPRHIGH%/SPRWIDE% > PICHIGH%/PICWIDE% � *% WIDE%=PICHIGH%*SPRWIDE%/SPRHIGH% * HIGH%=PICHIGH% *$ TW%=TINYHIGH%*SPRWIDE%/SPRHIGH% *& TH%=TINYHIGH% *0� *:% HIGH%=PICWIDE%*SPRHIGH%/SPRWIDE% *D WIDE%=PICWIDE% *N$ TH%=TINYWIDE%*SPRHIGH%/SPRWIDE% *X TW%=TINYWIDE% *b � *l� *v# HL%=�(BITS%*SPRWIDE%/SPRHIGH%) *�$ � HL%>0 � VL%=BITS%/HL% � VL%=1 *�" � HL%<2 � VL%<2 BITS%=BITS%+1 *�� HL%>=2 � VL%>=2 *�2� SPR$="sprpal256" � BITS%=250 � HL%=16:VL%=16 *�� *� BITS%=HL%*VL% *� � BITS%>256 HL%=HL%-1 *�� BITS%<=256 *�� HL%>32 � VL%>32 � *� � 1,9 *� � 1 *� � 135 *�- �25,28) "SPRITE PROPORTIONS UNSUITABLE" + ER%=17 + �quit +� + � +* +4��start +>�12 +Hȗ � +RCOLTABLE=COLTABAD% +\� � SAMEFILE% � +f � +p � +z �: ȗ X%,Y%,Z%: � Z%=0 +�< �filename :� Get sprite file name +� � NF%=-1 � � +�7 �initialise :� Read file info. +� � FILEFOUND% +�� +�SAMEFILE%=0 +�;�defpal :� Set default palette +�?�dispsprites :� Display sprites in file +�D�bits :� Get number of bits in puzzle +�G�spriteinfo :� Set constants from sprite info. +�� ER%=17 � � +�A�dividesprite :� Divide sprite into pieces +�=�displaybits :� Display unused pieces ,� ER%=17 � � ,ȗ � , � 130 ,$�32,2) "Target time:" ,.�32,4) "Time so far:" ,8F�convtime(TARGET%) :� Convert seconds to time string ,B�45,2) TIMESTR$ ,L�=0 ,V� ,` ,jG� * * * * * * Display time so far * * * * * * ,t ��timenow ,~TIM%=�/100 ,��convtime(TIM%) ,��45,4) TIMESTR$ ,�� �
00000000 0d 00 0a 33 20 20 20 20 20 20 20 20 20 20 20 20 |...3 | 00000010 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 c8 | .| 00000020 9b 20 22 3c 4f 62 65 79 24 44 69 72 3e 2e 57 69 |. "<Obey$Dir>.Wi| 00000030 6d 70 22 0d 00 14 3e 20 20 20 20 20 20 20 20 20 |mp"...> | 00000040 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000050 20 20 f2 57 69 6d 70 5f 53 74 61 72 74 28 22 4a | .Wimp_Start("J| 00000060 69 67 73 61 77 22 2c 36 30 30 30 2c 34 30 30 30 |igsaw",6000,4000| 00000070 29 0d 00 1e 33 20 20 20 20 20 20 20 20 20 20 20 |)...3 | 00000080 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000090 f2 55 73 65 72 5f 53 65 74 49 6e 69 74 69 61 6c |.User_SetInitial| 000000a0 44 61 74 61 0d 00 28 2e 20 20 20 20 20 20 20 20 |Data..(. | 000000b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000000c0 20 20 20 f2 43 72 65 61 74 65 5f 57 69 6e 64 6f | .Create_Windo| 000000d0 77 73 0d 00 32 2c 20 20 20 20 20 20 20 20 20 20 |ws..2, | 000000e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000000f0 20 f2 43 72 65 61 74 65 5f 4d 65 6e 75 73 0d 00 | .Create_Menus..| 00000100 3c 31 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |<1 | 00000110 20 20 20 20 20 20 20 20 20 20 20 20 20 f2 57 69 | .Wi| 00000120 6d 70 5f 57 61 69 74 46 6f 72 45 76 65 6e 74 0d |mp_WaitForEvent.| 00000130 00 46 2e 20 20 20 20 20 20 20 20 20 20 20 20 20 |.F. | 00000140 20 20 20 20 20 20 20 20 20 20 20 20 20 20 f2 57 | .W| 00000150 69 6d 70 5f 43 6c 6f 73 65 44 6f 77 6e 0d 00 50 |imp_CloseDown..P| 00000160 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000170 20 20 20 20 20 20 20 20 20 20 20 20 e0 0d 00 5a | ...Z| 00000180 05 3a 0d 00 64 1a dd 20 f2 55 73 65 72 5f 53 65 |.:..d.. .User_Se| 00000190 74 49 6e 69 74 69 61 6c 44 61 74 61 0d 00 6e 3e |tInitialData..n>| 000001a0 20 f2 64 61 74 61 20 20 20 20 20 20 20 20 20 20 | .data | 000001b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000001c0 20 3a f4 20 20 52 65 61 64 20 64 61 74 61 20 69 | :. Read data i| 000001d0 6e 74 6f 20 61 72 72 61 79 73 0d 00 78 1b 20 ef |nto arrays..x. .| 000001e0 20 32 33 2c 31 20 30 2c 30 2c 30 2c 30 2c 30 2c | 23,1 0,0,0,0,0,| 000001f0 30 2c 30 2c 30 0d 00 82 09 20 c8 97 20 ee 0d 00 |0,0,0.... .. ...| 00000200 8c 0c f2 69 6e 69 74 69 61 6c 0d 00 96 05 e1 0d |...initial......| 00000210 00 a0 05 3a 0d 00 aa 15 dd 20 f2 43 72 65 61 74 |...:..... .Creat| 00000220 65 5f 57 69 6e 64 6f 77 73 0d 00 b4 2f 4a 49 47 |e_Windows.../JIG| 00000230 53 43 52 4e 5f 57 69 6e 64 6f 77 25 3d a4 57 69 |SCRN_Window%=.Wi| 00000240 6d 70 5f 57 69 6e 64 6f 77 4c 6f 61 64 28 22 4a |mp_WindowLoad("J| 00000250 49 47 53 43 52 4e 22 29 0d 00 be 29 49 4e 46 4f |IGSCRN")...)INFO| 00000260 5f 57 69 6e 64 6f 77 25 3d a4 57 69 6d 70 5f 57 |_Window%=.Wimp_W| 00000270 69 6e 64 6f 77 4c 6f 61 64 28 22 49 4e 46 4f 22 |indowLoad("INFO"| 00000280 29 0d 00 c8 11 f2 57 69 6d 70 5f 49 63 6f 6e 42 |).....Wimp_IconB| 00000290 61 72 0d 00 d2 05 e1 0d 00 dc 06 20 3a 0d 00 e6 |ar......... :...| 000002a0 1d 20 dd 20 a4 45 76 65 6e 74 5f 53 61 76 65 28 |. . .Event_Save(| 000002b0 77 69 6e 64 6f 77 25 29 3d a3 0d 00 f0 06 20 3a |window%)=..... :| 000002c0 0d 00 fa 27 20 dd 20 a4 45 76 65 6e 74 5f 53 70 |...' . .Event_Sp| 000002d0 72 69 74 65 73 28 77 69 6e 64 6f 77 25 29 3d 73 |rites(window%)=s| 000002e0 70 72 69 74 65 73 25 0d 01 04 05 3a 0d 01 0e 13 |prites%....:....| 000002f0 dd 20 f2 43 72 65 61 74 65 5f 4d 65 6e 75 73 0d |. .Create_Menus.| 00000300 01 18 12 de 20 42 61 72 5f 4d 65 6e 75 25 28 31 |.... Bar_Menu%(1| 00000310 29 0d 01 22 48 6d 65 6e 75 24 3d 22 4a 69 67 73 |).."Hmenu$="Jigs| 00000320 61 77 5c 49 6e 66 6f 3e 49 4e 46 4f 5f 57 69 6e |aw\Info>INFO_Win| 00000330 64 6f 77 25 5c 53 74 61 72 74 20 50 75 7a 7a 6c |dow%\Start Puzzl| 00000340 65 5c 50 61 6c 65 74 74 65 20 49 6e 66 6f 5c 48 |e\Palette Info\H| 00000350 65 6c 70 5c 51 75 69 74 22 0d 01 2c 25 42 61 72 |elp\Quit"..,%Bar| 00000360 5f 4d 65 6e 75 25 3d a4 57 69 6d 70 5f 4d 65 6e |_Menu%=.Wimp_Men| 00000370 75 43 72 65 61 74 65 28 6d 65 6e 75 24 29 0d 01 |uCreate(menu$)..| 00000380 36 05 e1 0d 01 40 05 3a 0d 01 4a 1a dd 20 a4 45 |6....@.:..J.. .E| 00000390 76 65 6e 74 5f 4d 65 6e 75 28 77 69 6e 64 6f 77 |vent_Menu(window| 000003a0 25 29 0d 01 54 10 c8 8e 20 77 69 6e 64 6f 77 25 |%)..T... window%| 000003b0 20 ca 0d 01 5e 26 20 c9 20 2d 32 20 20 20 20 20 | ...^& . -2 | 000003c0 20 20 20 20 20 20 20 20 20 20 20 20 3a 20 3d 42 | : =B| 000003d0 61 72 5f 4d 65 6e 75 25 0d 01 68 19 20 7f 20 20 |ar_Menu%..h. . | 000003e0 20 20 20 20 20 20 20 20 20 20 20 20 20 3a 20 3d | : =| 000003f0 a3 0d 01 72 05 cb 0d 01 7c 05 3a 0d 01 86 2a dd |...r....|.:...*.| 00000400 20 f2 45 76 65 6e 74 5f 57 69 6e 64 6f 77 43 6c | .Event_WindowCl| 00000410 6f 73 65 28 77 69 6e 64 6f 77 25 2c 62 75 74 74 |ose(window%,butt| 00000420 6f 6e 73 25 29 0d 01 90 05 e1 0d 01 9a 05 3a 0d |ons%).........:.| 00000430 01 a4 2e dd 20 f2 45 76 65 6e 74 5f 44 72 61 77 |.... .Event_Draw| 00000440 28 77 69 6e 64 6f 77 25 2c 78 5f 6f 72 69 67 69 |(window%,x_origi| 00000450 6e 25 2c 79 5f 6f 72 69 67 69 6e 25 29 0d 01 ae |n%,y_origin%)...| 00000460 10 c8 8e 20 77 69 6e 64 6f 77 25 20 ca 0d 01 b8 |... window% ....| 00000470 32 20 c9 20 4a 49 47 53 43 52 4e 5f 57 69 6e 64 |2 . JIGSCRN_Wind| 00000480 6f 77 25 20 20 20 3a 20 f2 55 73 65 72 5f 44 72 |ow% : .User_Dr| 00000490 61 77 4a 49 47 53 43 52 4e 57 69 6e 64 6f 77 0d |awJIGSCRNWindow.| 000004a0 01 c2 05 cb 0d 01 cc 05 e1 0d 01 d6 06 20 3a 0d |............. :.| 000004b0 01 e0 1e 20 dd 20 f2 55 73 65 72 5f 44 72 61 77 |... . .User_Draw| 000004c0 4a 49 47 53 43 52 4e 57 69 6e 64 6f 77 0d 01 ea |JIGSCRNWindow...| 000004d0 06 20 e1 0d 01 f4 05 3a 0d 01 fe 34 dd 20 f2 45 |. .....:...4. .E| 000004e0 76 65 6e 74 5f 4d 6f 75 73 65 43 6c 69 63 6b 28 |vent_MouseClick(| 000004f0 77 69 6e 64 6f 77 25 2c 69 63 6f 6e 25 2c 62 75 |window%,icon%,bu| 00000500 74 74 6f 6e 25 2c 78 25 2c 79 25 29 0d 02 08 10 |tton%,x%,y%)....| 00000510 c8 8e 20 77 69 6e 64 6f 77 25 20 ca 0d 02 12 38 |.. window% ....8| 00000520 20 c9 20 42 61 72 5f 57 69 6e 64 6f 77 25 20 20 | . Bar_Window% | 00000530 20 20 20 20 3a 20 f2 55 73 65 72 5f 4d 6f 75 73 | : .User_Mous| 00000540 65 42 61 72 28 20 62 75 74 74 6f 6e 25 2c 69 63 |eBar( button%,ic| 00000550 6f 6e 25 29 0d 02 1c 05 cb 0d 02 26 05 e1 0d 02 |on%).......&....| 00000560 30 06 20 3a 0d 02 3a 25 20 dd 20 f2 55 73 65 72 |0. :..:% . .User| 00000570 5f 4d 6f 75 73 65 42 61 72 28 20 62 75 74 74 6f |_MouseBar( butto| 00000580 6e 25 2c 69 63 6f 6e 25 29 0d 02 44 11 20 c8 8e |n%,icon%)..D. ..| 00000590 20 62 75 74 74 6f 6e 25 20 ca 0d 02 4e 0c 20 20 | button% ...N. | 000005a0 c9 20 31 2c 34 3a 0d 02 58 13 20 20 20 f2 6f 70 |. 1,4:..X. .op| 000005b0 65 6e 6a 69 67 73 63 72 6e 0d 02 62 0b 20 20 20 |enjigscrn..b. | 000005c0 f2 6a 69 67 0d 02 6c 06 20 cb 0d 02 76 06 20 e1 |.jig..l. ...v. .| 000005d0 0d 02 80 06 20 3a 0d 02 8a 1e dd 20 f2 45 76 65 |.... :..... .Eve| 000005e0 6e 74 5f 4d 65 6e 75 43 68 6f 69 63 65 28 6d 65 |nt_MenuChoice(me| 000005f0 6e 75 25 29 0d 02 94 0e c8 8e 20 6d 65 6e 75 25 |nu%)...... menu%| 00000600 20 ca 0d 02 9e 2f 20 c9 20 42 61 72 5f 4d 65 6e | ..../ . Bar_Men| 00000610 75 25 20 20 20 20 20 20 20 20 20 20 3a 20 f2 55 |u% : .U| 00000620 73 65 72 5f 4d 65 6e 75 43 68 6f 69 63 65 42 41 |ser_MenuChoiceBA| 00000630 52 0d 02 a8 05 cb 0d 02 b2 05 e1 0d 02 bc 06 20 |R.............. | 00000640 3a 0d 02 c6 1a 20 dd 20 f2 55 73 65 72 5f 4d 65 |:.... . .User_Me| 00000650 6e 75 43 68 6f 69 63 65 42 41 52 0d 02 d0 1d 20 |nuChoiceBAR.... | 00000660 c8 8e 20 a4 57 69 6d 70 5f 4d 65 6e 75 43 68 6f |.. .Wimp_MenuCho| 00000670 69 63 65 28 30 29 20 ca 0d 02 da 0a 20 20 c9 20 |ice(0) ..... . | 00000680 32 3a 0d 02 e4 13 20 20 20 f2 6f 70 65 6e 6a 69 |2:.... .openji| 00000690 67 73 63 72 6e 0d 02 ee 0b 20 20 20 f2 6a 69 67 |gscrn.... .jig| 000006a0 0d 02 f8 0a 20 20 c9 20 33 3a 0d 03 02 0f 20 20 |.... . 3:.... | 000006b0 20 f2 68 65 6c 70 70 61 6c 0d 03 0c 0a 20 20 c9 | .helppal.... .| 000006c0 20 34 3a 0d 03 16 0c 20 20 20 f2 68 65 6c 70 0d | 4:.... .help.| 000006d0 03 20 0a 20 20 c9 20 35 3a 0d 03 2a 2f 20 20 20 |. . . 5:..*/ | 000006e0 24 28 77 69 6d 70 25 2b 34 29 3d 22 44 6f 20 79 |$(wimp%+4)="Do y| 000006f0 6f 75 20 72 65 61 6c 6c 79 20 77 61 6e 74 20 74 |ou really want t| 00000700 6f 20 51 75 69 74 3f 22 0d 03 34 13 20 20 20 72 |o Quit?"..4. r| 00000710 65 73 70 6f 6e 73 65 25 3d 31 39 0d 03 3e 42 20 |esponse%=19..>B | 00000720 20 20 c8 99 20 22 57 69 6d 70 5f 52 65 70 6f 72 | .. "Wimp_Repor| 00000730 74 45 72 72 6f 72 22 2c 77 69 6d 70 25 2c 72 65 |tError",wimp%,re| 00000740 73 70 6f 6e 73 65 25 2c 22 4a 69 67 73 61 77 22 |sponse%,"Jigsaw"| 00000750 20 b8 20 2c 72 65 73 70 6f 6e 73 65 25 0d 03 48 | . ,response%..H| 00000760 20 20 20 20 e7 20 72 65 73 70 6f 6e 73 65 25 3d | . response%=| 00000770 31 20 66 69 6e 69 73 68 65 64 25 3d b9 0d 03 52 |1 finished%=...R| 00000780 06 20 cb 0d 03 5c 06 20 e1 0d 03 66 05 3a 0d 03 |. ...\. ...f.:..| 00000790 70 22 dd 20 f2 45 76 65 6e 74 5f 4c 6f 61 64 46 |p". .Event_LoadF| 000007a0 69 6c 65 28 66 69 6c 65 24 2c 74 79 70 65 24 29 |ile(file$,type$)| 000007b0 0d 03 7a 0e c8 8e 20 74 79 70 65 24 20 ca 0d 03 |..z... type$ ...| 000007c0 84 33 20 c9 20 22 53 70 72 69 74 65 22 20 20 20 |.3 . "Sprite" | 000007d0 20 20 20 20 3a 20 f2 55 73 65 72 5f 4c 6f 61 64 | : .User_Load| 000007e0 46 69 6c 65 53 70 72 69 74 65 28 66 69 6c 65 24 |FileSprite(file$| 000007f0 29 0d 03 8e 05 cb 0d 03 98 05 e1 0d 03 a2 06 20 |).............. | 00000800 3a 0d 03 ac 22 20 dd 20 f2 55 73 65 72 5f 4c 6f |:..." . .User_Lo| 00000810 61 64 46 69 6c 65 53 70 72 69 74 65 28 66 69 6c |adFileSprite(fil| 00000820 65 24 29 0d 03 b6 37 20 f2 57 69 6d 70 5f 57 69 |e$)...7 .Wimp_Wi| 00000830 6e 64 6f 77 41 6c 65 72 74 28 22 21 4a 69 67 73 |ndowAlert("!Jigs| 00000840 61 77 22 2c 22 4c 6f 61 64 69 6e 67 20 66 69 6c |aw","Loading fil| 00000850 65 20 22 2b 66 69 6c 65 24 29 0d 03 c0 06 20 e1 |e "+file$).... .| 00000860 0d 03 ca 06 20 3a 0d 03 d4 24 dd 20 f2 45 76 65 |.... :...$. .Eve| 00000870 6e 74 5f 53 61 76 65 46 69 6c 65 28 66 69 6c 65 |nt_SaveFile(file| 00000880 24 2c 77 69 6e 64 6f 77 25 29 0d 03 de 05 e1 0d |$,window%)......| 00000890 03 e8 04 0d 03 f2 13 dd 20 f2 57 69 6d 70 5f 49 |........ .Wimp_I| 000008a0 63 6f 6e 42 61 72 0d 03 fc 10 ea 20 66 69 6c 25 |conBar..... fil%| 000008b0 2c 73 69 7a 65 25 0d 04 06 0f de 20 73 70 72 69 |,size%..... spri| 000008c0 74 65 25 20 38 0d 04 10 10 24 73 70 72 69 74 65 |te% 8....$sprite| 000008d0 25 3d 22 21 22 0d 04 1a 1c 66 69 6c 25 3d 8e 20 |%="!"....fil%=. | 000008e0 22 3c 24 44 69 72 3e 2e 21 53 70 72 69 74 65 73 |"<$Dir>.!Sprites| 000008f0 22 0d 04 24 14 73 69 7a 65 25 3d a2 23 20 66 69 |"..$.size%=.# fi| 00000900 6c 25 2b 32 30 0d 04 2e 0b d9 23 20 66 69 6c 25 |l%+20.....# fil%| 00000910 0d 04 38 17 de 20 73 70 72 69 74 65 61 72 65 61 |..8.. spritearea| 00000920 25 20 73 69 7a 65 25 0d 04 42 17 73 70 72 69 74 |% size%..B.sprit| 00000930 65 61 72 65 61 25 21 30 3d 73 69 7a 65 25 0d 04 |earea%!0=size%..| 00000940 4c 2f c8 99 20 26 32 45 2c 32 35 36 2b 31 30 2c |L/.. &2E,256+10,| 00000950 73 70 72 69 74 65 61 72 65 61 25 2c 22 3c 24 44 |spritearea%,"<$D| 00000960 69 72 3e 2e 21 53 70 72 69 74 65 73 22 0d 04 56 |ir>.!Sprites"..V| 00000970 31 c8 99 20 26 32 45 2c 32 35 36 2b 34 30 2c 73 |1.. &2E,256+40,s| 00000980 70 72 69 74 65 61 72 65 61 25 2c 24 73 70 72 69 |pritearea%,$spri| 00000990 74 65 25 20 b8 20 2c 2c 2c 77 25 2c 68 25 0d 04 |te% . ,,,w%,h%..| 000009a0 60 3e 77 69 6d 70 25 21 30 3d 2d 31 3a 77 69 6d |`>wimp%!0=-1:wim| 000009b0 70 25 21 34 3d 30 3a 77 69 6d 70 25 21 38 3d 30 |p%!4=0:wimp%!8=0| 000009c0 3a 77 69 6d 70 25 21 31 32 3d 77 25 2a 32 3a 77 |:wimp%!12=w%*2:w| 000009d0 69 6d 70 25 21 31 36 3d 68 25 2a 34 0d 04 6a 38 |imp%!16=h%*4..j8| 000009e0 77 69 6d 70 25 21 32 30 3d 26 33 31 31 41 3a 77 |wimp%!20=&311A:w| 000009f0 69 6d 70 25 21 32 34 3d 73 70 72 69 74 65 25 3a |imp%!24=sprite%:| 00000a00 77 69 6d 70 25 21 32 38 3d 73 70 72 69 74 65 61 |wimp%!28=spritea| 00000a10 72 65 61 25 0d 04 74 17 77 69 6d 70 25 21 33 32 |rea%..t.wimp%!32| 00000a20 3d a9 20 24 73 70 72 69 74 65 25 0d 04 7e 27 c8 |=. $sprite%..~'.| 00000a30 99 20 22 57 69 6d 70 5f 43 72 65 61 74 65 49 63 |. "Wimp_CreateIc| 00000a40 6f 6e 22 2c 2c 77 69 6d 70 25 20 b8 20 69 63 6f |on",,wimp% . ico| 00000a50 6e 25 0d 04 88 0c 2a 50 4f 49 4e 54 45 52 0d 04 |n%....*POINTER..| 00000a60 92 08 c8 97 20 ee 0d 04 9c 05 e1 0d 04 a6 04 0d |.... ...........| 00000a70 04 b0 12 dd f2 63 6c 6f 73 65 6a 69 67 73 63 72 |.....closejigscr| 00000a80 6e 0d 04 ba 26 f2 57 69 6d 70 5f 57 69 6e 64 6f |n...&.Wimp_Windo| 00000a90 77 43 6c 6f 73 65 28 4a 49 47 53 43 52 4e 5f 57 |wClose(JIGSCRN_W| 00000aa0 69 6e 64 6f 77 25 29 0d 04 c4 05 e1 0d 04 ce 04 |indow%).........| 00000ab0 0d 04 d8 11 dd f2 6f 70 65 6e 6a 69 67 73 63 72 |......openjigscr| 00000ac0 6e 0d 04 e2 1a 21 77 69 6d 70 25 3d 4a 49 47 53 |n....!wimp%=JIGS| 00000ad0 43 52 4e 5f 57 69 6e 64 6f 77 25 0d 04 ec 23 c8 |CRN_Window%...#.| 00000ae0 99 20 22 57 69 6d 70 5f 47 65 74 57 69 6e 64 6f |. "Wimp_GetWindo| 00000af0 77 53 74 61 74 65 22 2c 2c 77 69 6d 70 25 0d 04 |wState",,wimp%..| 00000b00 f6 18 77 69 6d 70 25 21 31 32 3d 77 69 6d 70 25 |..wimp%!12=wimp%| 00000b10 21 31 32 2b 34 30 0d 05 00 0f 77 69 6d 70 25 21 |!12+40....wimp%!| 00000b20 32 38 3d 2d 31 0d 05 0a 1f c8 99 20 22 57 69 6d |28=-1...... "Wim| 00000b30 70 5f 4f 70 65 6e 57 69 6e 64 6f 77 22 2c 2c 77 |p_OpenWindow",,w| 00000b40 69 6d 70 25 0d 05 14 2a f2 57 69 6d 70 5f 57 69 |imp%...*.Wimp_Wi| 00000b50 6e 64 6f 77 46 6f 72 63 65 44 72 61 77 28 4a 49 |ndowForceDraw(JI| 00000b60 47 53 43 52 4e 5f 57 69 6e 64 6f 77 25 29 0d 05 |GSCRN_Window%)..| 00000b70 1e 05 e1 0d 05 28 04 0d 05 32 12 dd f2 72 65 73 |.....(...2...res| 00000b80 65 74 6d 6f 64 65 70 61 6c 0d 05 3c 1b c8 99 20 |etmodepal..<... | 00000b90 22 57 69 6d 70 5f 53 65 74 4d 6f 64 65 22 2c 6d |"Wimp_SetMode",m| 00000ba0 6f 64 65 25 0d 05 46 20 c8 99 20 22 57 69 6d 70 |ode%..F .. "Wimp| 00000bb0 5f 53 65 74 50 61 6c 65 74 74 65 22 2c 2c 70 61 |_SetPalette",,pa| 00000bc0 6c 65 74 25 0d 05 50 0c 2a 50 4f 49 4e 54 45 52 |let%..P.*POINTER| 00000bd0 0d 05 5a 08 c8 97 20 ee 0d 05 64 05 e1 0d 05 6e |..Z... ...d....n| 00000be0 04 0d 05 78 04 0d 05 82 09 dd f2 6a 69 67 0d 05 |...x.......jig..| 00000bf0 8c 46 f4 20 20 20 2a 20 2a 20 2a 20 2a 20 2a 20 |.F. * * * * * | 00000c00 2a 20 20 20 20 20 20 20 20 20 20 20 4d 41 49 4e |* MAIN| 00000c10 20 50 52 4f 47 52 41 4d 20 4c 4f 4f 50 20 20 20 | PROGRAM LOOP | 00000c20 20 20 20 20 20 20 20 20 20 2a 20 2a 20 2a 20 2a | * * * *| 00000c30 20 2a 20 2a 0d 05 96 1b 52 30 25 3d 31 33 35 3a | * *....R0%=135:| 00000c40 20 52 31 25 3d 30 3a 20 6d 6f 64 65 25 3d 30 0d | R1%=0: mode%=0.| 00000c50 05 a0 24 c8 99 20 22 4f 53 5f 42 79 74 65 22 2c |..$.. "OS_Byte",| 00000c60 52 30 25 20 b8 20 52 30 25 2c 52 31 25 2c 6d 6f |R0% . R0%,R1%,mo| 00000c70 64 65 25 0d 05 aa 21 c8 99 20 22 57 69 6d 70 5f |de%...!.. "Wimp_| 00000c80 52 65 61 64 50 61 6c 65 74 74 65 22 2c 2c 70 61 |ReadPalette",,pa| 00000c90 6c 65 74 25 0d 05 b4 09 45 52 25 3d 30 0d 05 be |let%....ER%=0...| 00000ca0 0f 53 41 4d 45 46 49 4c 45 25 3d 30 0d 05 c8 18 |.SAMEFILE%=0....| 00000cb0 c8 99 20 22 4f 53 5f 42 79 74 65 22 2c 32 32 39 |.. "OS_Byte",229| 00000cc0 2c 30 2c 30 0d 05 d2 0f ee 20 85 20 ea 20 f2 71 |,0,0..... . . .q| 00000cd0 75 69 74 0d 05 dc 05 f5 0d 05 e6 09 20 c8 97 20 |uit......... .. | 00000ce0 ee 0d 05 f0 06 20 f5 0d 05 fa 13 20 20 e7 20 45 |..... ..... . E| 00000cf0 52 25 3d 30 20 51 5a 25 3d 30 0d 06 04 0b 20 20 |R%=0 QZ%=0.... | 00000d00 45 52 25 3d 30 0d 06 0e 0f 20 20 e7 20 51 5a 25 |ER%=0.... . QZ%| 00000d10 3d 31 20 8c 0d 06 18 1b 20 20 20 c8 99 20 22 4f |=1 ..... .. "O| 00000d20 53 5f 42 79 74 65 22 2c 32 32 39 2c 31 2c 30 0d |S_Byte",229,1,0.| 00000d30 06 22 14 20 20 20 f2 63 6c 6f 73 65 6a 69 67 73 |.". .closejigs| 00000d40 63 72 6e 0d 06 2c 14 20 20 20 f2 72 65 73 65 74 |crn..,. .reset| 00000d50 6d 6f 64 65 70 61 6c 0d 06 36 08 20 20 20 e1 0d |modepal..6. ..| 00000d60 06 40 07 20 20 cc 0d 06 4a 0c 20 20 20 51 5a 25 |.@. ...J. QZ%| 00000d70 3d 30 0d 06 54 0d 20 20 20 f2 73 74 61 72 74 0d |=0..T. .start.| 00000d80 06 5e 07 20 20 cd 0d 06 68 0c 20 fd 20 45 52 25 |.^. ...h. . ER%| 00000d90 3d 30 0d 06 72 06 20 f5 0d 06 7c 07 20 20 f5 0d |=0..r. ...|. ..| 00000da0 06 86 3c 20 20 20 f2 74 69 6d 65 6e 6f 77 20 20 |..< .timenow | 00000db0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000dc0 20 20 20 20 3a f4 20 20 44 69 73 70 6c 61 79 20 | :. Display | 00000dd0 74 69 6d 65 20 73 6f 20 66 61 72 0d 06 90 3c 20 |time so far...< | 00000de0 20 20 f2 73 65 6c 65 63 74 62 69 74 20 20 20 20 | .selectbit | 00000df0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000e00 3a f4 20 20 53 65 6c 65 63 74 20 70 75 7a 7a 6c |:. Select puzzl| 00000e10 65 20 70 69 65 63 65 0d 06 9a 3c 20 20 20 f2 70 |e piece...< .p| 00000e20 6c 61 63 65 62 69 74 20 20 20 20 20 20 20 20 20 |lacebit | 00000e30 20 20 20 20 20 20 20 20 20 20 20 20 3a f4 20 20 | :. | 00000e40 50 6c 61 63 65 20 70 69 65 63 65 20 6f 6e 20 67 |Place piece on g| 00000e50 72 69 64 0d 06 a4 12 20 20 fd 20 43 4c 45 41 52 |rid.... . CLEAR| 00000e60 45 44 25 3d 30 0d 06 ae 48 20 20 f2 63 68 65 63 |ED%=0...H .chec| 00000e70 6b 70 6f 73 20 20 20 20 20 20 20 20 20 20 20 20 |kpos | 00000e80 20 20 20 20 20 20 20 20 20 20 3a f4 20 20 43 68 | :. Ch| 00000e90 65 63 6b 20 62 69 74 73 20 69 6e 20 63 6f 72 72 |eck bits in corr| 00000ea0 65 63 74 20 70 6f 73 69 74 69 6f 6e 73 0d 06 b8 |ect positions...| 00000eb0 0c 20 fd 20 4f 4b 25 3d 30 0d 06 c2 04 0d 06 cc |. . OK%=0.......| 00000ec0 46 20 f2 65 6e 64 20 20 20 20 20 20 20 20 20 20 |F .end | 00000ed0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000ee0 20 20 3a f4 20 20 43 68 65 63 6b 20 70 65 72 66 | :. Check perf| 00000ef0 6f 72 6d 61 6e 63 65 20 2d 20 70 6c 61 79 20 74 |ormance - play t| 00000f00 75 6e 65 0d 06 d6 06 20 f5 0d 06 e0 11 20 20 c8 |une.... ..... .| 00000f10 97 20 58 25 2c 59 25 2c 5a 25 0d 06 ea 44 20 20 |. X%,Y%,Z%...D | 00000f20 f2 65 6e 64 6d 65 73 73 61 67 65 20 20 20 20 20 |.endmessage | 00000f30 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3a | :| 00000f40 f4 20 20 44 69 73 70 6c 61 79 20 70 65 72 66 6f |. Display perfo| 00000f50 72 6d 61 6e 63 65 20 6d 65 73 73 61 67 65 0d 06 |rmance message..| 00000f60 f4 0b 20 fd 20 5a 25 3e 30 0d 06 fe 26 20 e7 20 |.. . Z%>0...& . | 00000f70 5a 25 3d 31 20 53 41 4d 45 46 49 4c 45 25 3d 2d |Z%=1 SAMEFILE%=-| 00000f80 31 20 8b 20 53 41 4d 45 46 49 4c 45 25 3d 30 0d |1 . SAMEFILE%=0.| 00000f90 07 08 07 fd 20 a3 0d 07 12 05 e1 0d 07 1c 04 0d |.... ...........| 00000fa0 07 26 47 f4 20 20 20 2a 20 2a 20 2a 20 2a 20 2a |.&G. * * * * *| 00000fb0 20 2a 20 20 20 20 20 20 47 65 74 20 6e 75 6d 62 | * Get numb| 00000fc0 65 72 20 6f 66 20 62 69 74 73 20 69 6e 20 70 75 |er of bits in pu| 00000fd0 7a 7a 6c 65 20 20 20 20 20 20 20 2a 20 2a 20 2a |zzle * * *| 00000fe0 20 2a 20 2a 20 2a 0d 07 30 0a dd f2 62 69 74 73 | * * *..0...bits| 00000ff0 0d 07 3a 05 db 0d 07 44 07 fb 20 38 0d 07 4e 08 |..:....D.. 8..N.| 00001000 40 25 3d 33 0d 07 58 29 f1 8a 32 36 2c 33 29 22 |@%=3..X)..26,3)"| 00001010 41 50 50 52 4f 58 49 4d 41 54 45 20 4e 55 4d 42 |APPROXIMATE NUMB| 00001020 45 52 20 4f 46 20 50 49 45 43 45 53 22 0d 07 62 |ER OF PIECES"..b| 00001030 29 f1 8a 32 36 2c 34 29 22 2a 2a 2a 2a 2a 2a 2a |)..26,4)"*******| 00001040 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| 00001050 2a 2a 2a 2a 2a 22 0d 07 6c 09 e6 20 31 34 33 0d |*****"..l.. 143.| 00001060 07 76 09 fb 20 31 34 33 0d 07 80 07 fb 20 38 0d |.v.. 143..... 8.| 00001070 07 8a 0f e3 20 4e 25 3d 31 20 b8 20 31 30 0d 07 |.... N%=1 . 10..| 00001080 94 26 20 ef 20 32 34 2c 35 37 36 3b 38 33 32 2d |.& . 24,576;832-| 00001090 4e 25 2a 36 34 3b 36 35 36 3b 38 36 34 2d 4e 25 |N%*64;656;864-N%| 000010a0 2a 36 34 3b 0d 07 9e 06 20 da 0d 07 a8 09 20 ef |*64;.... ..... .| 000010b0 20 32 36 0d 07 b2 22 20 f1 8a 33 37 2c 4e 25 2a | 26..." ..37,N%*| 000010c0 32 2b 35 29 20 42 49 54 4e 4f 53 25 28 4e 25 29 |2+5) BITNOS%(N%)| 000010d0 3b 20 22 20 22 0d 07 bc 05 ed 0d 07 c6 1a f5 3a |; " "..........:| 000010e0 20 c8 97 20 58 25 2c 59 25 2c 5a 25 3a 20 fd 20 | .. X%,Y%,Z%: . | 000010f0 5a 25 3d 30 0d 07 d0 10 c8 97 20 b8 20 36 34 38 |Z%=0...... . 648| 00001100 2c 37 38 34 0d 07 da 05 f5 0d 07 e4 21 20 f5 3a |,784........! .:| 00001110 20 c8 97 20 58 25 2c 59 25 2c 5a 25 3a 20 fd 20 | .. X%,Y%,Z%: . | 00001120 b0 58 25 2c 59 25 29 3d 31 35 0d 07 ee 13 20 4e |.X%,Y%)=15.... N| 00001130 25 3d 28 38 38 30 2d 59 25 29 2f 36 34 0d 07 f8 |%=(880-Y%)/64...| 00001140 0a 20 fb 20 31 34 30 0d 08 02 2f 20 f1 8a 34 38 |. . 140.../ ..48| 00001150 2c 4e 25 2a 32 2b 35 29 20 22 54 61 72 67 65 74 |,N%*2+5) "Target| 00001160 20 54 69 6d 65 3a 20 22 3b 20 54 41 52 47 45 54 | Time: "; TARGET| 00001170 53 24 28 4e 25 29 0d 08 0c 0a 20 e6 20 31 33 39 |S$(N%).... . 139| 00001180 0d 08 16 0a 20 fb 20 31 33 39 0d 08 20 26 20 ef |.... . 139.. & .| 00001190 20 32 34 2c 35 37 36 3b 38 33 32 2d 4e 25 2a 36 | 24,576;832-N%*6| 000011a0 34 3b 36 35 36 3b 38 36 34 2d 4e 25 2a 36 34 3b |4;656;864-N%*64;| 000011b0 0d 08 2a 06 20 da 0d 08 34 22 20 f1 8a 33 37 2c |..*. ...4" ..37,| 000011c0 4e 25 2a 32 2b 35 29 20 42 49 54 4e 4f 53 25 28 |N%*2+5) BITNOS%(| 000011d0 4e 25 29 3b 20 22 20 22 0d 08 3e 09 20 ef 20 32 |N%); " "..>. . 2| 000011e0 36 0d 08 48 28 20 f5 3a 20 c8 97 20 58 25 2c 59 |6..H( .: .. X%,Y| 000011f0 25 2c 5a 25 3a 20 fd 20 b0 58 25 2c 59 25 29 3d |%,Z%: . .X%,Y%)=| 00001200 31 32 20 84 20 5a 25 3e 30 0d 08 52 0a 20 e6 20 |12 . Z%>0..R. . | 00001210 31 34 33 0d 08 5c 0a 20 fb 20 31 34 33 0d 08 66 |143..\. . 143..f| 00001220 0d 20 e7 20 5a 25 3d 30 20 8c 0d 08 70 27 20 20 |. . Z%=0 ...p' | 00001230 ef 20 32 34 2c 35 37 36 3b 38 33 32 2d 4e 25 2a |. 24,576;832-N%*| 00001240 36 34 3b 36 35 36 3b 38 36 34 2d 4e 25 2a 36 34 |64;656;864-N%*64| 00001250 3b 0d 08 7a 07 20 20 da 0d 08 84 23 20 20 f1 8a |;..z. ....# ..| 00001260 33 37 2c 4e 25 2a 32 2b 35 29 20 42 49 54 4e 4f |37,N%*2+5) BITNO| 00001270 53 25 28 4e 25 29 3b 20 22 20 22 0d 08 8e 0b 20 |S%(N%); " ".... | 00001280 20 fb 20 31 34 30 0d 08 98 32 20 20 f1 8a 34 38 | . 140...2 ..48| 00001290 2c 4e 25 2a 32 2b 35 29 20 22 20 20 20 20 20 20 |,N%*2+5) " | 000012a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000012b0 20 20 20 20 20 20 20 22 0d 08 a2 06 20 cd 0d 08 | ".... ...| 000012c0 ac 09 20 ef 20 32 36 0d 08 b6 0a fd 20 5a 25 3e |.. . 26..... Z%>| 000012d0 30 0d 08 c0 15 42 49 54 53 25 3d 42 49 54 4e 4f |0....BITS%=BITNO| 000012e0 53 25 28 4e 25 29 0d 08 ca 18 54 41 52 47 45 54 |S%(N%)....TARGET| 000012f0 25 3d 54 41 52 47 45 54 53 25 28 4e 25 29 0d 08 |%=TARGETS%(N%)..| 00001300 d4 09 fb 20 31 32 38 0d 08 de 07 fb 20 37 0d 08 |... 128..... 7..| 00001310 e8 05 e1 0d 08 f2 04 0d 08 fc 47 f4 20 20 20 2a |..........G. *| 00001320 20 2a 20 2a 20 2a 20 2a 20 2a 20 20 20 20 43 72 | * * * * * Cr| 00001330 65 61 74 65 20 62 6f 72 64 65 72 20 66 6f 72 20 |eate border for | 00001340 66 69 6c 65 6e 61 6d 65 20 73 63 72 65 65 6e 20 |filename screen | 00001350 20 20 20 2a 20 2a 20 2a 20 2a 20 2a 20 2a 0d 09 | * * * * * *..| 00001360 06 0c dd f2 62 6f 72 64 65 72 0d 09 10 0f e3 20 |....border..... | 00001370 4a 58 25 3d 30 20 b8 20 36 0d 09 1a 1c 20 43 4f |JX%=0 . 6.... CO| 00001380 4c 54 41 42 4c 45 3f 31 35 3d 31 20 2b 20 4a 58 |LTABLE?15=1 + JX| 00001390 25 20 83 20 36 0d 09 24 41 20 c8 99 20 26 32 45 |% . 6..$A .. &2E| 000013a0 2c 32 35 36 2b 35 32 2c 73 70 72 69 74 65 61 72 |,256+52,spritear| 000013b0 65 61 25 2c 22 6a 69 67 62 69 74 22 2c 4a 58 25 |ea%,"jigbit",JX%| 000013c0 2a 31 34 38 2b 38 34 2c 30 2c 38 2c 30 2c 43 4f |*148+84,0,8,0,CO| 000013d0 4c 54 41 42 4c 45 0d 09 2e 05 ed 0d 09 38 26 c8 |LTABLE.......8&.| 000013e0 99 20 26 32 45 2c 32 35 36 2b 33 33 2c 73 70 72 |. &2E,256+33,spr| 000013f0 69 74 65 61 72 65 61 25 2c 22 6a 69 67 62 69 74 |itearea%,"jigbit| 00001400 22 0d 09 42 0f e3 20 4a 58 25 3d 30 20 b8 20 36 |"..B.. JX%=0 . 6| 00001410 0d 09 4c 1c 20 43 4f 4c 54 41 42 4c 45 3f 31 35 |..L. COLTABLE?15| 00001420 3d 31 20 2b 20 4a 58 25 20 83 20 36 0d 09 56 43 |=1 + JX% . 6..VC| 00001430 20 c8 99 20 26 32 45 2c 32 35 36 2b 35 32 2c 73 | .. &2E,256+52,s| 00001440 70 72 69 74 65 61 72 65 61 25 2c 22 6a 69 67 62 |pritearea%,"jigb| 00001450 69 74 22 2c 4a 58 25 2a 31 34 38 2b 38 34 2c 39 |it",JX%*148+84,9| 00001460 32 30 2c 38 2c 30 2c 43 4f 4c 54 41 42 4c 45 0d |20,8,0,COLTABLE.| 00001470 09 60 05 ed 0d 09 6a 26 c8 99 20 26 32 45 2c 32 |.`....j&.. &2E,2| 00001480 35 36 2b 33 33 2c 73 70 72 69 74 65 61 72 65 61 |56+33,spritearea| 00001490 25 2c 22 6a 69 67 62 69 74 22 0d 09 74 0f e3 20 |%,"jigbit"..t.. | 000014a0 4a 59 25 3d 31 20 b8 20 37 0d 09 7e 1c 20 43 4f |JY%=1 . 7..~. CO| 000014b0 4c 54 41 42 4c 45 3f 31 35 3d 31 20 2b 20 4a 59 |LTABLE?15=1 + JY| 000014c0 25 20 83 20 36 0d 09 88 43 20 c8 99 20 26 32 45 |% . 6...C .. &2E| 000014d0 2c 32 35 36 2b 35 32 2c 73 70 72 69 74 65 61 72 |,256+52,spritear| 000014e0 65 61 25 2c 22 6a 69 67 62 69 74 39 30 22 2c 30 |ea%,"jigbit90",0| 000014f0 2c 4a 59 25 2a 31 32 30 2d 34 30 2c 38 2c 30 2c |,JY%*120-40,8,0,| 00001500 43 4f 4c 54 41 42 4c 45 0d 09 92 05 ed 0d 09 9c |COLTABLE........| 00001510 28 c8 99 20 26 32 45 2c 32 35 36 2b 34 37 2c 73 |(.. &2E,256+47,s| 00001520 70 72 69 74 65 61 72 65 61 25 2c 22 6a 69 67 62 |pritearea%,"jigb| 00001530 69 74 39 30 22 0d 09 a6 0f e3 20 4a 59 25 3d 31 |it90"..... JY%=1| 00001540 20 b8 20 37 0d 09 b0 1c 20 43 4f 4c 54 41 42 4c | . 7.... COLTABL| 00001550 45 3f 31 35 3d 31 20 2b 20 4a 59 25 20 83 20 36 |E?15=1 + JY% . 6| 00001560 0d 09 ba 46 20 c8 99 20 26 32 45 2c 32 35 36 2b |...F .. &2E,256+| 00001570 35 32 2c 73 70 72 69 74 65 61 72 65 61 25 2c 22 |52,spritearea%,"| 00001580 6a 69 67 62 69 74 39 30 22 2c 31 31 30 30 2c 4a |jigbit90",1100,J| 00001590 59 25 2a 31 32 30 2d 34 30 2c 38 2c 30 2c 43 4f |Y%*120-40,8,0,CO| 000015a0 4c 54 41 42 4c 45 0d 09 c4 05 ed 0d 09 ce 28 c8 |LTABLE........(.| 000015b0 99 20 26 32 45 2c 32 35 36 2b 34 37 2c 73 70 72 |. &2E,256+47,spr| 000015c0 69 74 65 61 72 65 61 25 2c 22 6a 69 67 62 69 74 |itearea%,"jigbit| 000015d0 39 30 22 0d 09 d8 12 43 4f 4c 54 41 42 4c 45 3f |90"....COLTABLE?| 000015e0 31 35 3d 31 35 0d 09 e2 05 e1 0d 09 ec 04 0d 09 |15=15...........| 000015f0 f6 47 f4 20 20 20 2a 20 2a 20 2a 20 2a 20 2a 20 |.G. * * * * * | 00001600 2a 20 20 20 20 20 43 68 65 63 6b 20 62 69 74 73 |* Check bits| 00001610 20 69 6e 20 63 6f 72 72 65 63 74 20 70 6f 73 69 | in correct posi| 00001620 74 69 6f 6e 73 20 20 20 20 20 2a 20 2a 20 2a 20 |tions * * * | 00001630 2a 20 2a 20 2a 0d 0a 00 0e dd f2 63 68 65 63 6b |* * *......check| 00001640 70 6f 73 0d 0a 0a 0e e3 20 4e 25 3d 31 20 b8 20 |pos..... N%=1 . | 00001650 32 0d 0a 14 09 20 53 25 3d 30 0d 0a 1e 0a 20 4f |2.... S%=0.... O| 00001660 4b 25 3d 30 0d 0a 28 17 20 e3 20 59 25 3d 56 4c |K%=0..(. . Y%=VL| 00001670 25 2d 31 20 b8 20 30 20 88 2d 31 0d 0a 32 14 20 |%-1 . 0 .-1..2. | 00001680 20 e3 20 58 25 3d 30 20 b8 20 48 4c 25 2d 31 0d | . X%=0 . HL%-1.| 00001690 0a 3c 0e 20 20 20 53 25 3d 53 25 2b 31 0d 0a 46 |.<. S%=S%+1..F| 000016a0 1e 20 20 20 e7 20 47 52 49 44 53 50 52 25 28 59 |. . GRIDSPR%(Y| 000016b0 25 2c 58 25 29 3c 3e 53 25 20 8c 0d 0a 50 1b 20 |%,X%)<>S% ...P. | 000016c0 20 20 20 47 53 25 3d 47 52 49 44 53 50 52 25 28 | GS%=GRIDSPR%(| 000016d0 59 25 2c 58 25 29 0d 0a 5a 1e 20 20 20 20 4c 58 |Y%,X%)..Z. LX| 000016e0 25 3d 4c 4f 57 58 25 2b 57 49 44 45 25 2a 58 25 |%=LOWX%+WIDE%*X%| 000016f0 2f 48 4c 25 0d 0a 64 1e 20 20 20 20 4c 59 25 3d |/HL%..d. LY%=| 00001700 4c 4f 57 59 25 2b 48 49 47 48 25 2a 59 25 2f 56 |LOWY%+HIGH%*Y%/V| 00001710 4c 25 0d 0a 6e 39 20 20 20 20 c8 99 20 26 32 45 |L%..n9 .. &2E| 00001720 2c 32 35 36 2b 35 32 2c 42 49 54 41 52 45 41 2c |,256+52,BITAREA,| 00001730 c3 28 47 53 25 29 2c 4c 58 25 2c 4c 59 25 2c 34 |.(GS%),LX%,LY%,4| 00001740 2c 30 2c 43 4f 4c 54 41 42 4c 45 0d 0a 78 0d 20 |,0,COLTABLE..x. | 00001750 20 20 20 4f 4b 25 3d 31 0d 0a 82 08 20 20 20 cd | OK%=1.... .| 00001760 0d 0a 8c 0a 20 20 ed 20 58 25 0d 0a 96 09 20 ed |.... . X%.... .| 00001770 20 59 25 0d 0a a0 15 20 e7 20 4f 4b 25 3d 31 20 | Y%.... . OK%=1 | 00001780 80 20 4e 25 3d 31 20 8c 0d 0a aa 0a 20 20 54 25 |. N%=1 ..... T%| 00001790 3d 91 0d 0a b4 1a 20 20 c8 99 20 22 4f 53 5f 42 |=..... .. "OS_B| 000017a0 79 74 65 22 2c 32 32 39 2c 31 2c 30 0d 0a be 17 |yte",229,1,0....| 000017b0 20 20 c8 99 20 22 48 6f 75 72 67 6c 61 73 73 5f | .. "Hourglass_| 000017c0 4f 6e 22 0d 0a c8 12 20 20 e3 20 41 25 3d 31 20 |On".... . A%=1 | 000017d0 b8 20 31 30 30 0d 0a d2 1a 20 20 20 e3 20 42 25 |. 100.... . B%| 000017e0 3d 31 20 b8 20 32 30 30 30 3a 20 ed 20 42 25 0d |=1 . 2000: . B%.| 000017f0 0a dc 23 20 20 20 c8 99 20 22 48 6f 75 72 67 6c |..# .. "Hourgl| 00001800 61 73 73 5f 50 65 72 63 65 6e 74 61 67 65 22 2c |ass_Percentage",| 00001810 41 25 0d 0a e6 0a 20 20 ed 20 41 25 0d 0a f0 18 |A%.... . A%....| 00001820 20 20 c8 99 20 22 48 6f 75 72 67 6c 61 73 73 5f | .. "Hourglass_| 00001830 4f 66 66 22 0d 0a fa 1a 20 20 c8 99 20 22 4f 53 |Off".... .. "OS| 00001840 5f 42 79 74 65 22 2c 32 32 39 2c 30 2c 30 0d 0b |_Byte",229,0,0..| 00001850 04 0a 20 20 d1 3d 54 25 0d 0b 0e 06 20 cd 0d 0b |.. .=T%.... ...| 00001860 18 08 ed 20 4e 25 0d 0b 22 05 e1 0d 0b 2c 04 0d |... N%.."....,..| 00001870 0b 36 47 f4 20 20 20 2a 20 2a 20 2a 20 2a 20 2a |.6G. * * * * *| 00001880 20 2a 20 20 20 20 20 43 6f 6e 76 65 72 74 20 73 | * Convert s| 00001890 65 63 6f 6e 64 73 20 74 6f 20 74 69 6d 65 20 73 |econds to time s| 000018a0 74 72 69 6e 67 20 20 20 20 20 20 2a 20 2a 20 2a |tring * * *| 000018b0 20 2a 20 2a 20 2a 0d 0b 40 15 dd f2 63 6f 6e 76 | * * *..@...conv| 000018c0 74 69 6d 65 28 53 45 43 53 25 29 0d 0b 4a 13 48 |time(SECS%)..J.H| 000018d0 52 53 25 3d 53 45 43 53 25 2f 33 36 30 30 0d 0b |RS%=SECS%/3600..| 000018e0 54 19 53 45 43 53 25 3d 53 45 43 53 25 2d 48 52 |T.SECS%=SECS%-HR| 000018f0 53 25 2a 33 36 30 30 0d 0b 5e 12 4d 49 4e 53 25 |S%*3600..^.MINS%| 00001900 3d 53 45 43 53 25 2f 36 30 0d 0b 68 18 53 45 43 |=SECS%/60..h.SEC| 00001910 53 25 3d 53 45 43 53 25 2d 4d 49 4e 53 25 2a 36 |S%=SECS%-MINS%*6| 00001920 30 0d 0b 72 46 54 49 4d 45 53 54 52 24 3d c2 22 |0..rFTIMESTR$=."| 00001930 30 22 2b c3 28 48 52 53 25 29 2c 32 29 2b 22 2e |0"+.(HRS%),2)+".| 00001940 22 2b c2 22 30 22 2b c3 28 4d 49 4e 53 25 29 2c |"+."0"+.(MINS%),| 00001950 32 29 2b 22 2e 22 2b c2 22 30 22 2b c3 28 53 45 |2)+"."+."0"+.(SE| 00001960 43 53 25 29 2c 32 29 0d 0b 7c 05 e1 0d 0b 86 04 |CS%),2)..|......| 00001970 0d 0b 90 47 f4 20 20 20 2a 20 2a 20 2a 20 2a 20 |...G. * * * * | 00001980 2a 20 20 20 43 61 6c 63 75 6c 61 74 65 20 63 6f |* Calculate co| 00001990 6f 72 64 69 6e 61 74 65 73 20 6f 66 20 70 69 65 |ordinates of pie| 000019a0 63 65 73 20 69 6e 20 67 72 69 64 20 20 20 2a 20 |ces in grid * | 000019b0 2a 20 2a 20 2a 20 2a 0d 0b 9a 0c dd f2 63 6f 6f |* * * *......coo| 000019c0 72 64 73 0d 0b a4 2a 58 31 25 3d 28 28 42 49 54 |rds...*X1%=((BIT| 000019d0 4e 4f 25 2d 31 29 20 83 20 48 4c 25 29 2a 57 49 |NO%-1) . HL%)*WI| 000019e0 44 45 25 2f 48 4c 25 2b 4c 4f 57 58 25 0d 0b ae |DE%/HL%+LOWX%...| 000019f0 2e 58 32 25 3d 28 28 28 42 49 54 4e 4f 25 2d 31 |.X2%=(((BITNO%-1| 00001a00 29 20 83 20 48 4c 25 29 2b 31 29 2a 57 49 44 45 |) . HL%)+1)*WIDE| 00001a10 25 2f 48 4c 25 2b 4c 4f 57 58 25 0d 0b b8 32 59 |%/HL%+LOWX%...2Y| 00001a20 31 25 3d 28 28 56 4c 25 2d 28 42 49 54 4e 4f 25 |1%=((VL%-(BITNO%| 00001a30 2d 31 29 20 81 20 48 4c 25 29 2d 31 29 2a 48 49 |-1) . HL%)-1)*HI| 00001a40 47 48 25 2f 56 4c 25 2b 4c 4f 57 59 25 0d 0b c2 |GH%/VL%+LOWY%...| 00001a50 2e 59 32 25 3d 28 56 4c 25 2d 28 42 49 54 4e 4f |.Y2%=(VL%-(BITNO| 00001a60 25 2d 31 29 20 81 20 48 4c 25 29 2a 48 49 47 48 |%-1) . HL%)*HIGH| 00001a70 25 2f 56 4c 25 2b 4c 4f 57 59 25 0d 0b cc 05 e1 |%/VL%+LOWY%.....| 00001a80 0d 0b d6 04 0d 0b e0 47 f4 20 20 20 2a 20 2a 20 |.......G. * * | 00001a90 2a 20 2a 20 2a 20 2a 20 20 20 20 20 20 20 20 20 |* * * * | 00001aa0 20 52 65 61 64 20 64 61 74 61 20 69 6e 74 6f 20 | Read data into | 00001ab0 61 72 72 61 79 73 20 20 20 20 20 20 20 20 20 20 |arrays | 00001ac0 2a 20 2a 20 2a 20 2a 20 2a 20 2a 0d 0b ea 0a dd |* * * * * *.....| 00001ad0 f2 64 61 74 61 0d 0b f4 11 de 20 42 49 54 4e 4f |.data..... BITNO| 00001ae0 53 25 28 31 30 29 0d 0b fe 12 de 20 54 41 52 47 |S%(10)..... TARG| 00001af0 45 54 53 25 28 31 30 29 0d 0c 08 12 de 20 54 41 |ETS%(10)..... TA| 00001b00 52 47 45 54 53 24 28 31 30 29 0d 0c 12 10 de 20 |RGETS$(10)..... | 00001b10 53 50 45 45 44 24 28 31 30 29 0d 0c 1c cf dc 20 |SPEED$(10)..... | 00001b20 31 30 2c 32 35 2c 22 32 35 20 53 65 63 6f 6e 64 |10,25,"25 Second| 00001b30 73 22 2c 32 30 2c 36 30 2c 22 31 20 4d 69 6e 75 |s",20,60,"1 Minu| 00001b40 74 65 22 2c 34 30 2c 31 38 30 2c 22 33 20 4d 69 |te",40,180,"3 Mi| 00001b50 6e 75 74 65 73 22 2c 36 30 2c 33 36 30 2c 22 36 |nutes",60,360,"6| 00001b60 20 4d 69 6e 75 74 65 73 22 2c 38 30 2c 37 32 30 | Minutes",80,720| 00001b70 2c 22 31 32 20 4d 69 6e 75 74 65 73 22 2c 31 30 |,"12 Minutes",10| 00001b80 30 2c 31 32 30 30 2c 22 32 30 20 4d 69 6e 75 74 |0,1200,"20 Minut| 00001b90 65 73 22 2c 31 33 30 2c 32 37 30 30 2c 22 33 35 |es",130,2700,"35| 00001ba0 20 4d 69 6e 75 74 65 73 22 2c 31 36 30 2c 33 36 | Minutes",160,36| 00001bb0 30 30 2c 22 31 20 48 6f 75 72 22 2c 32 30 30 2c |00,"1 Hour",200,| 00001bc0 35 34 30 30 2c 22 31 20 48 6f 75 72 20 33 30 20 |5400,"1 Hour 30 | 00001bd0 4d 69 6e 73 2e 22 2c 32 35 30 2c 37 32 30 30 2c |Mins.",250,7200,| 00001be0 22 32 20 48 6f 75 72 73 22 0d 0c 26 e1 dc 20 22 |"2 Hours"..&.. "| 00001bf0 20 20 20 41 76 65 72 61 67 65 20 74 69 6d 65 20 | Average time | 00001c00 20 20 20 22 2c 22 20 20 20 20 41 20 62 69 74 20 | "," A bit | 00001c10 73 6c 6f 77 20 20 20 20 20 22 2c 22 20 20 20 20 |slow "," | 00001c20 20 53 6c 6f 77 20 74 69 6d 65 20 20 20 20 20 22 | Slow time "| 00001c30 2c 22 20 20 56 65 72 79 20 73 6c 6f 77 20 74 69 |," Very slow ti| 00001c40 6d 65 20 20 20 22 2c 22 20 44 69 64 20 79 6f 75 |me "," Did you| 00001c50 20 64 6f 7a 65 20 6f 66 66 3f 20 22 2c 22 20 20 | doze off? "," | 00001c60 20 41 76 65 72 61 67 65 20 74 69 6d 65 20 20 20 | Average time | 00001c70 20 22 2c 22 20 20 20 20 20 47 6f 6f 64 20 74 69 | "," Good ti| 00001c80 6d 65 20 20 20 20 20 22 2c 22 20 20 20 20 20 46 |me "," F| 00001c90 61 73 74 20 74 69 6d 65 20 20 20 20 20 22 2c 22 |ast time ","| 00001ca0 20 20 56 65 72 79 20 66 61 73 74 20 74 69 6d 65 | Very fast time| 00001cb0 20 20 20 22 2c 22 20 20 20 20 54 6f 70 20 73 70 | "," Top sp| 00001cc0 65 65 64 21 20 20 20 20 20 22 0d 0c 30 0f e3 20 |eed! "..0.. | 00001cd0 4e 25 3d 31 20 b8 20 31 30 0d 0c 3a 2c 20 f3 20 |N%=1 . 10..:, . | 00001ce0 42 49 54 4e 4f 53 25 28 4e 25 29 2c 54 41 52 47 |BITNOS%(N%),TARG| 00001cf0 45 54 53 25 28 4e 25 29 2c 54 41 52 47 45 54 53 |ETS%(N%),TARGETS| 00001d00 24 28 4e 25 29 0d 0c 44 05 ed 0d 0c 4e 0f e3 20 |$(N%)..D....N.. | 00001d10 4e 25 3d 31 20 b8 20 31 30 0d 0c 58 11 20 f3 20 |N%=1 . 10..X. . | 00001d20 53 50 45 45 44 24 28 4e 25 29 0d 0c 62 05 ed 0d |SPEED$(N%)..b...| 00001d30 0c 6c 05 e1 0d 0c 76 04 0d 0c 80 47 f4 20 20 20 |.l....v....G. | 00001d40 2a 20 2a 20 2a 20 2a 20 2a 20 2a 20 20 20 20 20 |* * * * * * | 00001d50 20 20 20 20 20 20 53 65 74 20 64 65 66 61 75 6c | Set defaul| 00001d60 74 20 70 61 6c 65 74 74 65 20 20 20 20 20 20 20 |t palette | 00001d70 20 20 20 20 2a 20 2a 20 2a 20 2a 20 2a 20 2a 0d | * * * * * *.| 00001d80 0c 8a 0c dd f2 64 65 66 70 61 6c 0d 0c 94 13 fb |.....defpal.....| 00001d90 20 30 2c 32 35 35 2c 32 35 35 2c 32 35 35 0d 0c | 0,255,255,255..| 00001da0 9e 13 fb 20 31 2c 32 32 31 2c 32 32 31 2c 32 32 |... 1,221,221,22| 00001db0 31 0d 0c a8 13 fb 20 32 2c 31 38 37 2c 31 38 37 |1..... 2,187,187| 00001dc0 2c 31 38 37 0d 0c b2 13 fb 20 33 2c 31 35 33 2c |,187..... 3,153,| 00001dd0 31 35 33 2c 31 35 33 0d 0c bc 13 fb 20 34 2c 31 |153,153..... 4,1| 00001de0 31 39 2c 31 31 39 2c 31 31 39 0d 0c c6 10 fb 20 |19,119,119..... | 00001df0 35 2c 38 35 2c 38 35 2c 38 35 0d 0c d0 10 fb 20 |5,85,85,85..... | 00001e00 36 2c 35 31 2c 35 31 2c 35 31 0d 0c da 0d fb 20 |6,51,51,51..... | 00001e10 37 2c 30 2c 30 2c 30 0d 0c e4 10 fb 20 38 2c 30 |7,0,0,0..... 8,0| 00001e20 2c 36 38 2c 31 35 33 0d 0c ee 11 fb 20 39 2c 32 |,68,153..... 9,2| 00001e30 33 38 2c 32 33 38 2c 30 0d 0c f8 10 fb 20 31 30 |38,238,0..... 10| 00001e40 2c 30 2c 32 30 34 2c 30 0d 0d 02 10 fb 20 31 31 |,0,204,0..... 11| 00001e50 2c 32 32 31 2c 30 2c 30 0d 0d 0c 14 fb 20 31 32 |,221,0,0..... 12| 00001e60 2c 32 33 38 2c 32 33 38 2c 31 38 37 0d 0d 16 11 |,238,238,187....| 00001e70 fb 20 31 33 2c 38 35 2c 31 33 36 2c 30 0d 0d 20 |. 13,85,136,0.. | 00001e80 12 fb 20 31 34 2c 32 35 35 2c 31 38 37 2c 30 0d |.. 14,255,187,0.| 00001e90 0d 2a 12 fb 20 31 35 2c 30 2c 31 38 37 2c 32 35 |.*.. 15,0,187,25| 00001ea0 35 0d 0d 34 05 e1 0d 0d 3e 04 0d 0d 48 47 f4 20 |5..4....>...HG. | 00001eb0 20 20 2a 20 2a 20 2a 20 2a 20 2a 20 2a 20 20 20 | * * * * * * | 00001ec0 20 20 20 20 20 20 20 44 69 73 70 6c 61 79 20 75 | Display u| 00001ed0 6e 75 73 65 64 20 70 69 65 63 65 73 20 20 20 20 |nused pieces | 00001ee0 20 20 20 20 20 20 2a 20 2a 20 2a 20 2a 20 2a 20 | * * * * * | 00001ef0 2a 0d 0d 52 11 dd f2 64 69 73 70 6c 61 79 62 69 |*..R...displaybi| 00001f00 74 73 0d 0d 5c 12 43 4c 45 41 52 45 44 25 3d 42 |ts..\.CLEARED%=B| 00001f10 49 54 53 25 0d 0d 66 12 e3 20 4e 25 3d 31 20 b8 |ITS%..f.. N%=1 .| 00001f20 20 42 49 54 53 25 0d 0d 70 14 20 55 53 45 44 42 | BITS%..p. USEDB| 00001f30 49 54 53 25 28 4e 25 29 3d 30 0d 0d 7a 08 ed 20 |ITS%(N%)=0..z.. | 00001f40 4e 25 0d 0d 84 11 e3 20 4e 31 25 3d 30 20 b8 20 |N%..... N1%=0 . | 00001f50 56 4c 25 0d 0d 8e 12 20 e3 20 4e 32 25 3d 30 20 |VL%.... . N2%=0 | 00001f60 b8 20 48 4c 25 0d 0d 98 19 20 20 47 52 49 44 53 |. HL%.... GRIDS| 00001f70 50 52 25 28 4e 31 25 2c 4e 32 25 29 3d 30 0d 0d |PR%(N1%,N2%)=0..| 00001f80 a2 0a 20 ed 20 4e 32 25 0d 0d ac 09 ed 20 4e 31 |.. . N2%..... N1| 00001f90 25 0d 0d b6 44 53 43 41 4c 45 21 30 3d 54 57 25 |%...DSCALE!0=TW%| 00001fa0 3a 20 53 43 41 4c 45 21 34 3d 54 48 25 3a 20 53 |: SCALE!4=TH%: S| 00001fb0 43 41 4c 45 21 38 3d 53 50 52 50 4c 4f 54 4d 31 |CALE!8=SPRPLOTM1| 00001fc0 32 25 3a 20 53 43 41 4c 45 21 31 32 3d 53 50 52 |2%: SCALE!12=SPR| 00001fd0 48 49 47 48 25 0d 0d c0 36 c8 99 20 26 32 45 2c |HIGH%...6.. &2E,| 00001fe0 32 35 36 2b 35 32 2c 53 50 41 52 45 41 2c 53 50 |256+52,SPAREA,SP| 00001ff0 52 24 2c 39 32 30 2c 37 38 30 2c 38 2c 53 43 41 |R$,920,780,8,SCA| 00002000 4c 45 2c 43 4f 4c 54 41 42 4c 45 0d 0d ca 09 f2 |LE,COLTABLE.....| 00002010 67 72 69 64 0d 0d d4 2d 4e 58 44 49 53 50 25 3d |grid...-NXDISP%=| 00002020 28 31 32 36 30 2d 4c 4f 57 58 25 2d 57 49 44 45 |(1260-LOWX%-WIDE| 00002030 25 29 2f 28 57 49 44 45 25 2f 48 4c 25 2b 31 32 |%)/(WIDE%/HL%+12| 00002040 29 0d 0d de 2b 4e 59 44 49 53 50 25 3d 28 4c 4f |)...+NYDISP%=(LO| 00002050 57 59 25 2b 48 49 47 48 25 2d 31 32 29 2f 28 48 |WY%+HIGH%-12)/(H| 00002060 49 47 48 25 2f 56 4c 25 2b 31 32 29 0d 0d e8 37 |IGH%/VL%+12)...7| 00002070 e7 20 4e 58 44 49 53 50 25 3c 31 20 84 20 4e 58 |. NXDISP%<1 . NX| 00002080 44 49 53 50 25 3e 33 32 20 84 20 4e 59 44 49 53 |DISP%>32 . NYDIS| 00002090 50 25 3c 31 20 84 20 4e 59 44 49 53 50 25 3e 33 |P%<1 . NYDISP%>3| 000020a0 32 20 8c 0d 0d f2 2c 20 f1 8a 32 35 2c 36 29 20 |2 ...., ..25,6) | 000020b0 22 53 50 52 49 54 45 20 50 52 4f 50 4f 52 54 49 |"SPRITE PROPORTI| 000020c0 4f 4e 53 20 55 4e 53 55 49 54 41 42 4c 45 22 0d |ONS UNSUITABLE".| 000020d0 0d fc 0b 20 45 52 25 3d 31 37 0d 0e 06 0a 20 f2 |... ER%=17.... .| 000020e0 71 75 69 74 0d 0e 10 06 20 e1 0d 0e 1a 05 cd 0d |quit.... .......| 000020f0 0e 24 08 44 25 3d 30 0d 0e 2e 15 e3 20 4e 31 25 |.$.D%=0..... N1%| 00002100 3d 31 20 b8 20 4e 59 44 49 53 50 25 0d 0e 38 18 |=1 . NYDISP%..8.| 00002110 20 e3 20 4e 32 25 3d 30 20 b8 20 4e 58 44 49 53 | . N2%=0 . NXDIS| 00002120 50 25 2d 31 0d 0e 42 07 20 20 f5 0d 0e 4c 12 20 |P%-1..B. ...L. | 00002130 20 20 53 25 3d b3 28 42 49 54 53 25 29 0d 0e 56 | S%=.(BITS%)..V| 00002140 22 20 20 fd 20 55 53 45 44 42 49 54 53 25 28 53 |" . USEDBITS%(S| 00002150 25 29 3d 30 20 84 20 44 25 3d 42 49 54 53 25 0d |%)=0 . D%=BITS%.| 00002160 0e 60 15 20 20 55 53 45 44 42 49 54 53 25 28 53 |.`. USEDBITS%(S| 00002170 25 29 3d 31 0d 0e 6a 0d 20 20 44 25 3d 44 25 2b |%)=1..j. D%=D%+| 00002180 31 0d 0e 74 1a 20 20 44 49 53 50 53 50 52 25 28 |1..t. DISPSPR%(| 00002190 4e 31 25 2c 4e 32 25 29 3d 53 25 0d 0e 7e 67 20 |N1%,N2%)=S%..~g | 000021a0 20 c8 99 20 26 32 45 2c 32 35 36 2b 33 34 2c 42 | .. &2E,256+34,B| 000021b0 49 54 41 52 45 41 2c c3 28 53 25 29 2c 4c 4f 57 |ITAREA,.(S%),LOW| 000021c0 58 25 2b 57 49 44 45 25 2b 31 32 2b 4e 32 25 2a |X%+WIDE%+12+N2%*| 000021d0 28 57 49 44 45 25 2f 48 4c 25 2b 31 32 29 2c 4c |(WIDE%/HL%+12),L| 000021e0 4f 57 59 25 2b 48 49 47 48 25 2d 31 32 2d 4e 31 |OWY%+HIGH%-12-N1| 000021f0 25 2a 28 48 49 47 48 25 2f 56 4c 25 2b 31 32 29 |%*(HIGH%/VL%+12)| 00002200 2c 38 0d 0e 88 2c 20 20 e7 20 44 25 3e 3d 42 49 |,8..., . D%>=BI| 00002210 54 53 25 20 8c 20 4e 32 25 3d 4e 58 44 49 53 50 |TS% . N2%=NXDISP| 00002220 25 3a 20 4e 31 25 3d 4e 59 44 49 53 50 25 0d 0e |%: N1%=NYDISP%..| 00002230 92 0a 20 ed 20 4e 32 25 0d 0e 9c 09 ed 20 4e 31 |.. . N2%..... N1| 00002240 25 0d 0e a6 05 e1 0d 0e b0 04 0d 0e ba 47 f4 20 |%............G. | 00002250 20 20 2a 20 2a 20 2a 20 2a 20 2a 20 2a 20 20 20 | * * * * * * | 00002260 20 20 20 20 20 20 44 69 73 70 6c 61 79 20 73 70 | Display sp| 00002270 72 69 74 65 73 20 69 6e 20 66 69 6c 65 20 20 20 |rites in file | 00002280 20 20 20 20 20 20 2a 20 2a 20 2a 20 2a 20 2a 20 | * * * * * | 00002290 2a 0d 0e c4 11 dd f2 64 69 73 70 73 70 72 69 74 |*......dispsprit| 000022a0 65 73 0d 0e ce 1a ef 20 32 33 2c 31 20 30 2c 30 |es..... 23,1 0,0| 000022b0 2c 30 2c 30 2c 30 2c 30 2c 30 2c 30 0d 0e d8 07 |,0,0,0,0,0,0....| 000022c0 fb 20 37 0d 0e e2 09 fb 20 31 34 30 0d 0e ec 35 |. 7..... 140...5| 000022d0 c8 99 20 26 32 45 2c 32 35 36 2b 38 2c 53 50 41 |.. &2E,256+8,SPA| 000022e0 52 45 41 20 b8 20 52 30 25 2c 52 31 25 2c 52 32 |REA . R0%,R1%,R2| 000022f0 25 2c 52 33 25 2c 52 34 25 2c 52 35 25 2c 52 36 |%,R3%,R4%,R5%,R6| 00002300 25 0d 0e f6 0d e7 20 52 33 25 3d 31 20 8c 0d 0f |%..... R3%=1 ...| 00002310 00 0b 20 53 4e 4f 25 3d 31 0d 0f 0a 05 cc 0d 0f |.. SNO%=1.......| 00002320 14 11 20 c8 97 20 b8 20 37 37 32 2c 38 38 30 0d |.. .. . 772,880.| 00002330 0f 1e 10 20 4c 41 53 54 50 41 47 45 25 3d 30 0d |... LASTPAGE%=0.| 00002340 0f 28 0b 20 54 25 3d 52 33 25 0d 0f 32 09 20 53 |.(. T%=R3%..2. S| 00002350 25 3d 31 0d 0f 3c 0c 20 4f 4c 44 53 25 3d 31 0d |%=1..<. OLDS%=1.| 00002360 0f 46 06 20 f5 0d 0f 50 07 20 20 db 0d 0f 5a 0a |.F. ...P. ...Z.| 00002370 20 20 4c 25 3d 34 0d 0f 64 12 20 20 42 41 43 4b | L%=4..d. BACK| 00002380 50 25 3d 4f 4c 44 53 25 0d 0f 6e 0e 20 20 4f 4c |P%=OLDS%..n. OL| 00002390 44 53 25 3d 53 25 0d 0f 78 07 20 20 f5 0d 0f 82 |DS%=S%..x. ....| 000023a0 11 20 20 20 f2 73 70 72 69 74 65 62 6f 78 0d 0f |. .spritebox..| 000023b0 8c 15 20 20 fd 20 4c 25 3d 32 38 20 84 20 53 25 |.. . L%=28 . S%| 000023c0 3e 54 25 0d 0f 96 0a 20 20 f1 20 27 27 0d 0f a0 |>T%.... . ''...| 000023d0 0c 20 20 f1 8a 32 34 29 3b 0d 0f aa 0b 20 20 fb |. ..24);.... .| 000023e0 20 31 33 38 0d 0f b4 23 20 20 f1 20 22 43 4c 49 | 138...# . "CLI| 000023f0 43 4b 20 4f 4e 20 53 50 52 49 54 45 20 54 4f 20 |CK ON SPRITE TO | 00002400 53 45 4c 45 43 54 22 0d 0f be 11 20 20 e7 20 4f |SELECT".... . O| 00002410 4c 44 53 25 3e 31 20 8c 0d 0f c8 0c 20 20 20 fb |LDS%>1 ..... .| 00002420 20 31 33 39 0d 0f d2 17 20 20 20 ef 20 32 38 2c | 139.... . 28,| 00002430 35 39 2c 32 39 2c 36 34 2c 32 36 0d 0f dc 08 20 |59,29,64,26.... | 00002440 20 20 db 0d 0f e6 08 20 20 20 f1 0d 0f f0 10 20 | ..... ..... | 00002450 20 20 f1 20 22 20 42 41 43 4b 22 0d 0f fa 10 20 | . " BACK".... | 00002460 20 20 f1 20 22 20 50 41 47 45 22 0d 10 04 0b 20 | . " PAGE".... | 00002470 20 20 ef 20 32 36 0d 10 0e 0f 20 20 20 f1 8a 34 | . 26.... ..4| 00002480 35 2c 32 39 29 0d 10 18 0c 20 20 20 fb 20 31 34 |5,29).... . 14| 00002490 30 0d 10 22 13 20 20 20 c8 97 20 b8 20 39 38 34 |0..". .. . 984| 000024a0 2c 31 32 30 0d 10 2c 07 20 20 cd 0d 10 36 10 20 |,120..,. ...6. | 000024b0 20 e7 20 53 25 3c 3d 54 25 20 8c 0d 10 40 0c 20 | . S%<=T% ...@. | 000024c0 20 20 fb 20 31 33 38 0d 10 4a 17 20 20 20 ef 20 | . 138..J. . | 000024d0 32 38 2c 36 36 2c 32 39 2c 37 31 2c 32 36 0d 10 |28,66,29,71,26..| 000024e0 54 08 20 20 20 db 0d 10 5e 08 20 20 20 f1 0d 10 |T. ...^. ...| 000024f0 68 10 20 20 20 f1 20 22 20 4e 45 58 54 22 0d 10 |h. . " NEXT"..| 00002500 72 10 20 20 20 f1 20 22 20 50 41 47 45 22 0d 10 |r. . " PAGE"..| 00002510 7c 0b 20 20 20 ef 20 32 36 0d 10 86 0f 20 20 20 ||. . 26.... | 00002520 f1 8a 34 35 2c 32 39 29 0d 10 90 0c 20 20 20 fb |..45,29).... .| 00002530 20 31 34 30 0d 10 9a 2d 20 20 20 e7 20 4f 4c 44 | 140...- . OLD| 00002540 53 25 3d 31 20 84 20 53 25 3c 3e 42 41 43 4b 50 |S%=1 . S%<>BACKP| 00002550 25 20 8c 20 c8 97 20 b8 20 31 30 39 36 2c 31 32 |% . .. . 1096,12| 00002560 30 0d 10 a4 07 20 20 cd 0d 10 ae 07 20 20 f5 0d |0.... ..... ..| 00002570 10 b8 0e 20 20 20 58 59 4f 4b 25 3d 30 0d 10 c2 |... XYOK%=0...| 00002580 1d 20 20 20 f5 3a 20 c8 97 20 58 25 2c 59 25 2c |. .: .. X%,Y%,| 00002590 5a 25 3a 20 fd 20 5a 25 3e 30 0d 10 cc 1c 20 20 |Z%: . Z%>0.... | 000025a0 20 e7 20 58 25 3e 3d 37 30 30 20 80 20 58 25 3c | . X%>=700 . X%<| 000025b0 3d 38 35 30 20 8c 0d 10 d6 19 20 20 20 20 4c 25 |=850 ..... L%| 000025c0 3d 28 31 30 32 34 2d 59 25 29 2f 33 32 2d 32 0d |=(1024-Y%)/32-2.| 000025d0 10 e0 1a 20 20 20 20 53 4f 4e 50 25 3d 28 53 25 |... SONP%=(S%| 000025e0 2d 32 29 20 83 20 36 2b 31 0d 10 ea 46 20 20 20 |-2) . 6+1...F | 000025f0 20 e7 20 4c 25 3e 28 53 4f 4e 50 25 2d 31 29 2a | . L%>(SONP%-1)*| 00002600 34 2b 33 20 84 20 4c 25 3c 31 20 84 20 4c 25 20 |4+3 . L%<1 . L% | 00002610 83 20 34 20 3d 20 30 20 8c 20 58 59 4f 4b 25 3d |. 4 = 0 . XYOK%=| 00002620 31 20 8b 20 4c 41 53 54 50 41 47 45 25 3d 31 0d |1 . LASTPAGE%=1.| 00002630 10 f4 08 20 20 20 cc 0d 10 fe 20 20 20 20 20 e7 |... .... .| 00002640 20 59 25 3c 36 34 20 84 20 59 25 3e 31 39 32 20 | Y%<64 . Y%>192 | 00002650 58 59 4f 4b 25 3d 31 0d 11 08 22 20 20 20 20 e7 |XYOK%=1..." .| 00002660 20 58 25 3c 39 34 34 20 84 20 58 25 3e 31 31 35 | X%<944 . X%>115| 00002670 32 20 58 59 4f 4b 25 3d 31 0d 11 12 23 20 20 20 |2 XYOK%=1...# | 00002680 20 e7 20 58 25 3e 31 30 34 30 20 80 20 58 25 3c | . X%>1040 . X%<| 00002690 31 30 35 36 20 58 59 4f 4b 25 3d 31 0d 11 1c 23 |1056 XYOK%=1...#| 000026a0 20 20 20 20 e7 20 4f 4c 44 53 25 3d 31 20 80 20 | . OLDS%=1 . | 000026b0 58 25 3c 31 30 35 36 20 58 59 4f 4b 25 3d 31 0d |X%<1056 XYOK%=1.| 000026c0 11 26 21 20 20 20 20 e7 20 53 25 3e 54 25 20 80 |.&! . S%>T% .| 000026d0 20 58 25 3e 31 30 35 36 20 58 59 4f 4b 25 3d 31 | X%>1056 XYOK%=1| 000026e0 0d 11 30 40 20 20 20 20 e7 20 4f 4c 44 53 25 3e |..0@ . OLDS%>| 000026f0 36 20 80 20 58 25 3e 39 34 33 20 80 20 58 25 3c |6 . X%>943 . X%<| 00002700 31 30 34 31 20 80 20 59 25 3e 36 33 20 80 20 59 |1041 . Y%>63 . Y| 00002710 25 3c 31 39 33 20 53 25 3d 4f 4c 44 53 25 2d 36 |%<193 S%=OLDS%-6| 00002720 0d 11 3a 1e 20 20 20 20 f5 3a 20 c8 97 20 58 25 |..:. .: .. X%| 00002730 2c 59 25 2c 5a 25 3a 20 fd 20 5a 25 3d 30 0d 11 |,Y%,Z%: . Z%=0..| 00002740 44 08 20 20 20 cd 0d 11 4e 0f 20 20 fd 20 58 59 |D. ...N. . XY| 00002750 4f 4b 25 3d 30 0d 11 58 12 20 fd 20 4c 41 53 54 |OK%=0..X. . LAST| 00002760 50 41 47 45 25 3d 31 0d 11 62 24 20 53 4e 4f 25 |PAGE%=1..b$ SNO%| 00002770 3d 28 28 53 25 2d 32 29 20 81 20 36 29 2a 36 20 |=((S%-2) . 6)*6 | 00002780 2b 20 4c 25 20 81 20 34 20 2b 31 0d 11 6c 05 cd |+ L% . 4 +1..l..| 00002790 0d 11 76 46 c8 99 20 26 32 45 2c 32 35 36 2b 31 |..vF.. &2E,256+1| 000027a0 33 2c 53 50 41 52 45 41 2c 53 50 52 4e 41 4d 45 |3,SPAREA,SPRNAME| 000027b0 2c 31 34 2c 53 4e 4f 25 20 b8 20 52 30 25 2c 52 |,14,SNO% . R0%,R| 000027c0 31 25 2c 52 32 25 2c 52 33 25 2c 52 34 25 2c 52 |1%,R2%,R3%,R4%,R| 000027d0 35 25 2c 52 36 25 0d 11 80 0b 53 50 52 24 3d 22 |5%,R6%....SPR$="| 000027e0 22 0d 11 8a 12 e3 20 43 25 3d 30 20 b8 20 52 33 |"..... C%=0 . R3| 000027f0 25 2d 31 0d 11 94 1c 20 53 50 52 24 3d 53 50 52 |%-1.... SPR$=SPR| 00002800 24 2b bd 28 53 50 52 4e 41 4d 45 3f 43 25 29 0d |$+.(SPRNAME?C%).| 00002810 11 9e 08 ed 20 43 25 0d 11 a8 09 fb 20 31 34 30 |.... C%..... 140| 00002820 0d 11 b2 05 e1 0d 11 bc 04 0d 11 c6 47 f4 20 20 |............G. | 00002830 20 2a 20 2a 20 2a 20 2a 20 2a 20 2a 20 20 20 20 | * * * * * * | 00002840 20 20 20 20 44 69 76 69 64 65 20 73 70 72 69 74 | Divide sprit| 00002850 65 20 69 6e 74 6f 20 70 69 65 63 65 73 20 20 20 |e into pieces | 00002860 20 20 20 20 20 2a 20 2a 20 2a 20 2a 20 2a 20 2a | * * * * * *| 00002870 0d 11 d0 12 dd f2 64 69 76 69 64 65 73 70 72 69 |......dividespri| 00002880 74 65 0d 11 da 0f e3 20 4e 25 3d 30 20 b8 20 31 |te..... N%=0 . 1| 00002890 35 0d 11 e4 14 20 ef 20 31 39 2c 4e 25 2c 30 2c |5.... . 19,N%,0,| 000028a0 30 2c 30 2c 30 0d 11 ee 08 ed 20 4e 25 0d 11 f8 |0,0,0..... N%...| 000028b0 09 e6 20 31 33 30 0d 12 02 05 da 0d 12 0c 0b 4c |.. 130.........L| 000028c0 4f 57 58 25 3d 30 0d 12 16 0b 4c 4f 57 59 25 3d |OWX%=0....LOWY%=| 000028d0 30 0d 12 20 48 53 43 41 4c 45 21 30 3d 57 49 44 |0.. HSCALE!0=WID| 000028e0 45 25 3a 20 53 43 41 4c 45 21 34 3d 48 49 47 48 |E%: SCALE!4=HIGH| 000028f0 25 3a 20 53 43 41 4c 45 21 38 3d 53 50 52 50 4c |%: SCALE!8=SPRPL| 00002900 4f 54 4d 31 32 25 3a 20 53 43 41 4c 45 21 31 32 |OTM12%: SCALE!12| 00002910 3d 53 50 52 48 49 47 48 25 0d 12 2a 3a c8 99 20 |=SPRHIGH%..*:.. | 00002920 26 32 45 2c 32 35 36 2b 35 32 2c 53 50 41 52 45 |&2E,256+52,SPARE| 00002930 41 2c 53 50 52 24 2c 4c 4f 57 58 25 2c 4c 4f 57 |A,SPR$,LOWX%,LOW| 00002940 59 25 2c 38 2c 53 43 41 4c 45 2c 43 4f 4c 54 41 |Y%,8,SCALE,COLTA| 00002950 42 4c 45 0d 12 34 09 f2 67 72 69 64 0d 12 3e 16 |BLE..4..grid..>.| 00002960 e3 20 42 49 54 4e 4f 25 3d 31 20 b8 20 42 49 54 |. BITNO%=1 . BIT| 00002970 53 25 0d 12 48 0c 20 f2 63 6f 6f 72 64 73 0d 12 |S%..H. .coords..| 00002980 52 0e 20 ec 20 58 31 25 2c 59 31 25 0d 12 5c 0e |R. . X1%,Y1%..\.| 00002990 20 ec 20 58 32 25 2c 59 32 25 0d 12 66 26 20 c8 | . X2%,Y2%..f& .| 000029a0 99 20 26 32 45 2c 32 35 36 2b 31 34 2c 42 49 54 |. &2E,256+14,BIT| 000029b0 41 52 45 41 2c c3 28 42 49 54 4e 4f 25 29 2c 30 |AREA,.(BITNO%),0| 000029c0 0d 12 70 0c ed 20 42 49 54 4e 4f 25 0d 12 7a 05 |..p.. BITNO%..z.| 000029d0 da 0d 12 84 24 e7 20 4d 31 35 25 3d 30 20 8c 20 |....$. M15%=0 . | 000029e0 f2 67 65 74 70 61 6c 20 8b 20 ef 20 32 30 3a 20 |.getpal . . 20: | 000029f0 e6 20 31 33 30 0d 12 8e 05 e1 0d 12 98 04 0d 12 |. 130...........| 00002a00 a2 47 f4 20 20 20 2a 20 2a 20 2a 20 2a 20 2a 20 |.G. * * * * * | 00002a10 2a 20 20 20 20 20 20 43 68 65 63 6b 20 70 65 72 |* Check per| 00002a20 66 6f 72 6d 61 6e 63 65 20 2d 20 70 6c 61 79 20 |formance - play | 00002a30 74 75 6e 65 20 20 20 20 20 20 2a 20 2a 20 2a 20 |tune * * * | 00002a40 2a 20 2a 20 2a 0d 12 ac 09 dd f2 65 6e 64 0d 12 |* * *......end..| 00002a50 b6 48 53 43 41 4c 45 21 30 3d 57 49 44 45 25 3a |.HSCALE!0=WIDE%:| 00002a60 20 53 43 41 4c 45 21 34 3d 48 49 47 48 25 3a 20 | SCALE!4=HIGH%: | 00002a70 53 43 41 4c 45 21 38 3d 53 50 52 50 4c 4f 54 4d |SCALE!8=SPRPLOTM| 00002a80 31 32 25 3a 20 53 43 41 4c 45 21 31 32 3d 53 50 |12%: SCALE!12=SP| 00002a90 52 48 49 47 48 25 0d 12 c0 3a c8 99 20 26 32 45 |RHIGH%...:.. &2E| 00002aa0 2c 32 35 36 2b 35 32 2c 53 50 41 52 45 41 2c 53 |,256+52,SPAREA,S| 00002ab0 50 52 24 2c 4c 4f 57 58 25 2c 4c 4f 57 59 25 2c |PR$,LOWX%,LOWY%,| 00002ac0 38 2c 53 43 41 4c 45 2c 43 4f 4c 54 41 42 4c 45 |8,SCALE,COLTABLE| 00002ad0 0d 12 ca 08 c8 97 20 87 0d 12 d4 21 f1 8a 35 37 |...... ....!..57| 00002ae0 2c 32 32 29 20 22 43 4c 49 43 4b 20 27 53 45 4c |,22) "CLICK 'SEL| 00002af0 45 43 54 27 20 46 4f 52 22 0d 12 de 1f f1 8a 35 |ECT' FOR"......5| 00002b00 37 2c 32 33 29 20 22 20 4e 45 57 20 53 50 52 49 |7,23) " NEW SPRI| 00002b10 54 45 20 46 49 4c 45 22 0d 12 e8 08 fb 20 31 31 |TE FILE"..... 11| 00002b20 0d 12 f2 21 f1 8a 35 37 2c 32 35 29 20 22 43 4c |...!..57,25) "CL| 00002b30 49 43 4b 20 27 41 44 4a 55 53 54 27 20 46 4f 52 |ICK 'ADJUST' FOR| 00002b40 22 0d 12 fc 20 f1 8a 35 37 2c 32 36 29 20 22 20 |"... ..57,26) " | 00002b50 53 41 4d 45 20 53 50 52 49 54 45 20 46 49 4c 45 |SAME SPRITE FILE| 00002b60 22 0d 13 06 07 fb 20 37 0d 13 10 14 e7 20 54 49 |"..... 7..... TI| 00002b70 4d 25 3e 54 41 52 47 45 54 25 20 8c 0d 13 1a 17 |M%>TARGET% .....| 00002b80 20 44 49 46 46 25 3d 54 49 4d 25 2d 54 41 52 47 | DIFF%=TIM%-TARG| 00002b90 45 54 25 0d 13 24 19 20 50 25 3d 44 49 46 46 25 |ET%..$. P%=DIFF%| 00002ba0 2a 31 30 30 2f 54 41 52 47 45 54 25 0d 13 2e 09 |*100/TARGET%....| 00002bb0 20 4e 25 3d 31 0d 13 38 05 cc 0d 13 42 17 20 44 | N%=1..8....B. D| 00002bc0 49 46 46 25 3d 54 41 52 47 45 54 25 2d 54 49 4d |IFF%=TARGET%-TIM| 00002bd0 25 0d 13 4c 16 20 50 25 3d 44 49 46 46 25 2a 31 |%..L. P%=DIFF%*1| 00002be0 30 30 2f 54 49 4d 25 0d 13 56 09 20 4e 25 3d 36 |00/TIM%..V. N%=6| 00002bf0 0d 13 60 05 cd 0d 13 6a 21 e7 20 50 25 3e 38 30 |..`....j!. P%>80| 00002c00 20 4e 25 3d 4e 25 2b 34 20 8b 20 4e 25 3d 4e 25 | N%=N%+4 . N%=N%| 00002c10 2b 50 25 2f 32 30 0d 13 74 0f f2 65 6e 64 6d 65 |+P%/20..t..endme| 00002c20 73 73 61 67 65 0d 13 7e 26 e7 20 4e 25 3c 36 20 |ssage..~&. N%<6 | 00002c30 8c 20 41 4d 50 25 3d 4e 25 2a 33 20 8b 20 41 4d |. AMP%=N%*3 . AM| 00002c40 50 25 3d 28 4e 25 2d 35 29 2a 33 0d 13 88 15 2a |P%=(N%-5)*3....*| 00002c50 43 48 41 4e 4e 45 4c 56 4f 49 43 45 20 31 20 32 |CHANNELVOICE 1 2| 00002c60 0d 13 92 14 e7 20 54 49 4d 25 3e 54 41 52 47 45 |..... TIM%>TARGE| 00002c70 54 25 20 8c 0d 13 9c 14 20 d4 20 31 2c 2d 41 4d |T% ..... . 1,-AM| 00002c80 50 25 2c 38 30 2c 32 30 0d 13 a6 15 20 e3 20 4c |P%,80,20.... . L| 00002c90 25 3d 30 20 b8 20 34 30 30 30 30 3a ed 0d 13 b0 |%=0 . 40000:....| 00002ca0 14 20 d4 20 31 2c 2d 41 4d 50 25 2c 36 30 2c 32 |. . 1,-AMP%,60,2| 00002cb0 30 0d 13 ba 15 20 e3 20 4c 25 3d 30 20 b8 20 34 |0.... . L%=0 . 4| 00002cc0 30 30 30 30 3a ed 0d 13 c4 14 20 d4 20 31 2c 2d |0000:..... . 1,-| 00002cd0 41 4d 50 25 2c 34 30 2c 32 30 0d 13 ce 15 20 e3 |AMP%,40,20.... .| 00002ce0 20 4c 25 3d 30 20 b8 20 34 30 30 30 30 3a ed 0d | L%=0 . 40000:..| 00002cf0 13 d8 05 cc 0d 13 e2 14 20 d4 20 31 2c 2d 41 4d |........ . 1,-AM| 00002d00 50 25 2c 31 30 30 2c 35 0d 13 ec 15 20 e3 20 4c |P%,100,5.... . L| 00002d10 25 3d 30 20 b8 20 31 30 30 30 30 3a ed 0d 13 f6 |%=0 . 10000:....| 00002d20 14 20 d4 20 31 2c 2d 41 4d 50 25 2c 31 30 30 2c |. . 1,-AMP%,100,| 00002d30 38 0d 14 00 15 20 e3 20 4c 25 3d 30 20 b8 20 31 |8.... . L%=0 . 1| 00002d40 30 30 30 30 3a ed 0d 14 0a 14 20 d4 20 31 2c 2d |0000:..... . 1,-| 00002d50 41 4d 50 25 2c 31 30 30 2c 35 0d 14 14 15 20 e3 |AMP%,100,5.... .| 00002d60 20 4c 25 3d 30 20 b8 20 31 30 30 30 30 3a ed 0d | L%=0 . 10000:..| 00002d70 14 1e 15 20 d4 20 31 2c 2d 41 4d 50 25 2c 31 32 |... . 1,-AMP%,12| 00002d80 30 2c 31 30 0d 14 28 15 20 e3 20 4c 25 3d 30 20 |0,10..(. . L%=0 | 00002d90 b8 20 31 34 30 30 30 3a ed 0d 14 32 15 20 d4 20 |. 14000:...2. . | 00002da0 31 2c 2d 41 4d 50 25 2c 31 32 30 2c 31 30 0d 14 |1,-AMP%,120,10..| 00002db0 3c 15 20 e3 20 4c 25 3d 30 20 b8 20 32 30 30 30 |<. . L%=0 . 2000| 00002dc0 30 3a ed 0d 14 46 15 20 d4 20 31 2c 2d 41 4d 50 |0:...F. . 1,-AMP| 00002dd0 25 2c 31 32 38 2c 31 30 0d 14 50 15 20 e3 20 4c |%,128,10..P. . L| 00002de0 25 3d 30 20 b8 20 32 30 30 30 30 3a ed 0d 14 5a |%=0 . 20000:...Z| 00002df0 15 20 d4 20 31 2c 2d 41 4d 50 25 2c 31 32 38 2c |. . 1,-AMP%,128,| 00002e00 31 30 0d 14 64 15 20 e3 20 4c 25 3d 30 20 b8 20 |10..d. . L%=0 . | 00002e10 32 34 30 30 30 3a ed 0d 14 6e 15 20 d4 20 31 2c |24000:...n. . 1,| 00002e20 2d 41 4d 50 25 2c 31 34 38 2c 31 35 0d 14 78 15 |-AMP%,148,15..x.| 00002e30 20 e3 20 4c 25 3d 30 20 b8 20 33 30 30 30 30 3a | . L%=0 . 30000:| 00002e40 ed 0d 14 82 14 20 d4 20 31 2c 2d 41 4d 50 25 2c |..... . 1,-AMP%,| 00002e50 31 33 36 2c 35 0d 14 8c 15 20 e3 20 4c 25 3d 30 |136,5.... . L%=0| 00002e60 20 b8 20 31 30 30 30 30 3a ed 0d 14 96 15 20 d4 | . 10000:..... .| 00002e70 20 31 2c 2d 41 4d 50 25 2c 31 32 30 2c 31 30 0d | 1,-AMP%,120,10.| 00002e80 14 a0 15 20 e3 20 4c 25 3d 30 20 b8 20 33 30 30 |... . L%=0 . 300| 00002e90 30 30 3a ed 0d 14 aa 05 cd 0d 14 b4 15 2a 43 48 |00:..........*CH| 00002ea0 41 4e 4e 45 4c 56 4f 49 43 45 20 31 20 31 0d 14 |ANNELVOICE 1 1..| 00002eb0 be 1a f5 3a 20 c8 97 20 58 25 2c 59 25 2c 5a 25 |...: .. X%,Y%,Z%| 00002ec0 3a 20 fd 20 5a 25 3d 30 0d 14 c8 05 e1 0d 14 d2 |: . Z%=0........| 00002ed0 04 0d 14 dc 47 f4 20 20 20 2a 20 2a 20 2a 20 2a |....G. * * * *| 00002ee0 20 2a 20 2a 20 20 20 20 20 20 20 44 69 73 70 6c | * * Displ| 00002ef0 61 79 20 70 65 72 66 6f 72 6d 61 6e 63 65 20 6d |ay performance m| 00002f00 65 73 73 61 67 65 20 20 20 20 20 20 20 2a 20 2a |essage * *| 00002f10 20 2a 20 2a 20 2a 20 2a 0d 14 e6 10 dd f2 65 6e | * * * *......en| 00002f20 64 6d 65 73 73 61 67 65 0d 14 f0 33 e7 20 4d 31 |dmessage...3. M1| 00002f30 35 25 3d 31 20 42 4f 58 43 4f 4c 25 3d 31 32 38 |5%=1 BOXCOL%=128| 00002f40 2b b3 28 31 32 37 29 20 8b 20 42 4f 58 43 4f 4c |+.(127) . BOXCOL| 00002f50 25 3d 31 32 38 2b b3 28 31 35 29 0d 14 fa 0d fb |%=128+.(15).....| 00002f60 20 42 4f 58 43 4f 4c 25 0d 15 04 07 fb 20 30 0d | BOXCOL%..... 0.| 00002f70 15 0e 22 f1 8a 35 37 2c 31 33 29 20 22 20 20 20 |.."..57,13) " | 00002f80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00002f90 22 0d 15 18 22 f1 8a 35 37 2c 31 34 29 20 22 20 |"..."..57,14) " | 00002fa0 20 50 55 5a 5a 4c 45 20 43 4f 4d 50 4c 45 54 45 | PUZZLE COMPLETE| 00002fb0 20 20 22 0d 15 22 22 f1 8a 35 37 2c 31 35 29 20 | "..""..57,15) | 00002fc0 22 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |" | 00002fd0 20 20 20 20 22 0d 15 2c 22 f1 8a 35 37 2c 31 37 | "..,"..57,17| 00002fe0 29 20 22 20 20 20 20 20 20 20 20 20 20 20 20 20 |) " | 00002ff0 20 20 20 20 20 20 22 0d 15 36 17 f1 8a 35 37 2c | "..6...57,| 00003000 31 36 29 20 53 50 45 45 44 24 28 4e 25 29 0d 15 |16) SPEED$(N%)..| 00003010 40 15 e3 20 54 25 3d 31 20 b8 20 34 30 30 30 30 |@.. T%=1 . 40000| 00003020 3a 20 ed 0d 15 4a 05 e1 0d 15 54 04 0d 15 5e 47 |: ...J....T...^G| 00003030 f4 20 20 20 2a 20 2a 20 2a 20 2a 20 2a 20 2a 20 |. * * * * * * | 00003040 20 20 20 20 20 20 20 20 20 44 69 73 70 6c 61 79 | Display| 00003050 20 65 72 72 6f 72 20 6d 65 73 73 61 67 65 20 20 | error message | 00003060 20 20 20 20 20 20 20 20 2a 20 2a 20 2a 20 2a 20 | * * * * | 00003070 2a 20 2a 0d 15 68 0b dd f2 65 72 72 6f 72 0d 15 |* *..h...error..| 00003080 72 07 ef 20 37 0d 15 7c 1f f1 8a 33 34 2c 36 29 |r.. 7..|...34,6)| 00003090 20 22 4e 4f 20 50 49 45 43 45 20 53 45 4c 45 43 | "NO PIECE SELEC| 000030a0 54 45 44 22 0d 15 86 05 e1 0d 15 90 04 0d 15 9a |TED"............| 000030b0 47 f4 20 20 20 2a 20 2a 20 2a 20 2a 20 2a 20 2a |G. * * * * * *| 000030c0 20 20 20 20 20 20 20 20 20 20 47 65 74 20 73 70 | Get sp| 000030d0 72 69 74 65 20 66 69 6c 65 20 6e 61 6d 65 20 20 |rite file name | 000030e0 20 20 20 20 20 20 20 20 20 2a 20 2a 20 2a 20 2a | * * * *| 000030f0 20 2a 20 2a 0d 15 a4 0e dd f2 66 69 6c 65 6e 61 | * *......filena| 00003100 6d 65 0d 15 ae 07 eb 31 32 0d 15 b8 1a ef 20 32 |me.....12..... 2| 00003110 33 2c 31 20 30 2c 30 2c 30 2c 30 2c 30 2c 30 2c |3,1 0,0,0,0,0,0,| 00003120 30 2c 30 0d 15 c2 08 c8 97 20 ee 0d 15 cc 0b f2 |0,0...... ......| 00003130 62 6f 72 64 65 72 0d 15 d6 19 ef 20 32 34 2c 31 |border..... 24,1| 00003140 31 32 3b 38 33 32 3b 34 34 38 3b 38 36 34 3b 0d |12;832;448;864;.| 00003150 15 e0 09 e6 20 31 33 34 0d 15 ea 05 da 0d 15 f4 |.... 134........| 00003160 1a ef 20 32 34 2c 34 39 36 3b 38 33 32 3b 31 30 |.. 24,496;832;10| 00003170 35 36 3b 38 36 34 3b 0d 15 fe 05 da 0d 16 08 09 |56;864;.........| 00003180 fb 20 31 33 34 0d 16 12 07 fb 20 34 0d 16 1c 20 |. 134..... 4... | 00003190 f1 8a 38 2c 35 29 20 22 4e 41 4d 45 20 4f 46 20 |..8,5) "NAME OF | 000031a0 53 50 52 49 54 45 20 46 49 4c 45 22 0d 16 26 2f |SPRITE FILE"..&/| 000031b0 f1 8a 33 32 2c 35 29 20 22 44 65 73 63 72 69 70 |..32,5) "Descrip| 000031c0 74 69 6f 6e 20 6f 66 20 70 69 63 74 75 72 65 28 |tion of picture(| 000031d0 73 29 20 69 6e 20 66 69 6c 65 22 0d 16 30 09 fb |s) in file"..0..| 000031e0 20 31 32 38 0d 16 3a 07 fb 20 32 0d 16 44 17 f1 | 128..:.. 2..D..| 000031f0 8a 33 35 2c 37 29 20 20 22 50 69 63 74 75 72 65 |.35,7) "Picture| 00003200 73 22 0d 16 4e 29 f1 8a 33 35 2c 31 31 29 20 22 |s"..N)..35,11) "| 00003210 50 61 74 74 65 72 6e 73 20 2d 20 32 35 36 20 63 |Patterns - 256 c| 00003220 6f 6c 6f 75 72 20 6d 6f 64 65 22 0d 16 58 15 f1 |olour mode"..X..| 00003230 8a 33 35 2c 31 35 29 20 22 48 6f 72 73 65 73 22 |.35,15) "Horses"| 00003240 0d 16 62 1b f1 8a 33 35 2c 31 39 29 20 22 47 69 |..b...35,19) "Gi| 00003250 72 6c 73 27 20 6e 61 6d 65 73 22 0d 16 6c 21 f1 |rls' names"..l!.| 00003260 8a 33 35 2c 32 33 29 20 22 41 6c 70 68 61 62 65 |.35,23) "Alphabe| 00003270 74 20 26 20 6e 75 6d 62 65 72 73 22 0d 16 76 07 |t & numbers"..v.| 00003280 fb 20 33 0d 16 80 28 f1 8a 33 35 2c 39 29 20 20 |. 3...(..35,9) | 00003290 22 50 61 74 74 65 72 6e 73 20 2d 20 31 36 20 63 |"Patterns - 16 c| 000032a0 6f 6c 6f 75 72 20 6d 6f 64 65 22 0d 16 8a 1a f1 |olour mode".....| 000032b0 8a 33 35 2c 31 33 29 20 22 42 75 74 74 65 72 66 |.35,13) "Butterf| 000032c0 6c 69 65 73 22 0d 16 94 16 f1 8a 33 35 2c 31 37 |lies"......35,17| 000032d0 29 20 22 53 79 6d 62 6f 6c 73 22 0d 16 9e 1a f1 |) "Symbols".....| 000032e0 8a 33 35 2c 32 31 29 20 22 42 6f 79 73 27 20 6e |.35,21) "Boys' n| 000032f0 61 6d 65 73 22 0d 16 a8 07 fb 20 34 0d 16 b2 0f |ames"..... 4....| 00003300 e3 20 4e 46 25 3d 31 20 b8 20 39 0d 16 bc 14 20 |. NF%=1 . 9.... | 00003310 e6 20 31 33 31 20 2d 20 4e 46 25 20 83 20 32 0d |. 131 - NF% . 2.| 00003320 16 c6 14 20 fb 20 31 33 31 20 2d 20 4e 46 25 20 |... . 131 - NF% | 00003330 83 20 32 0d 16 d0 28 20 ef 20 32 34 2c 31 39 32 |. 2...( . 24,192| 00003340 3b 38 33 32 2d 4e 46 25 2a 36 34 3b 33 38 34 3b |;832-NF%*64;384;| 00003350 38 36 34 2d 4e 46 25 2a 36 34 3b 0d 16 da 06 20 |864-NF%*64;.... | 00003360 da 0d 16 e4 09 20 ef 20 32 36 0d 16 ee 29 20 f1 |..... . 26...) .| 00003370 8a 31 32 2c 4e 46 25 2a 32 2b 35 29 20 22 20 4a |.12,NF%*2+5) " J| 00003380 49 47 53 50 52 49 54 45 22 3b 20 4e 46 25 3b 20 |IGSPRITE"; NF%; | 00003390 22 20 22 0d 16 f8 05 ed 0d 17 02 09 e6 20 31 33 |" ".......... 13| 000033a0 31 0d 17 0c 09 fb 20 31 33 31 0d 17 16 19 ef 20 |1..... 131..... | 000033b0 32 34 2c 31 39 32 3b 31 39 32 3b 33 38 34 3b 32 |24,192;192;384;2| 000033c0 32 34 3b 0d 17 20 05 da 0d 17 2a 08 ef 20 32 36 |24;.. ....*.. 26| 000033d0 0d 17 34 13 f1 8a 31 35 2c 32 35 29 22 4f 54 48 |..4...15,25)"OTH| 000033e0 45 52 22 0d 17 3e 09 e6 20 31 33 30 0d 17 48 09 |ER"..>.. 130..H.| 000033f0 fb 20 31 33 30 0d 17 52 18 ef 20 32 34 2c 33 38 |. 130..R.. 24,38| 00003400 34 3b 39 36 3b 36 38 38 3b 31 32 38 3b 0d 17 5c |4;96;688;128;..\| 00003410 05 da 0d 17 66 08 ef 20 32 36 0d 17 70 1f f1 8a |....f.. 26..p...| 00003420 32 35 2c 32 38 29 22 52 45 54 55 52 4e 20 54 4f |25,28)"RETURN TO| 00003430 20 44 45 53 4b 54 4f 50 22 0d 17 7a 18 c8 97 20 | DESKTOP"..z... | 00003440 c8 93 20 31 38 30 2c 39 30 2c 38 32 30 2c 38 31 |.. 180,90,820,81| 00003450 30 0d 17 84 10 c8 97 20 b8 20 33 37 36 2c 37 38 |0...... . 376,78| 00003460 34 0d 17 8e 05 f5 0d 17 98 2e 20 f5 3a 20 c8 97 |4......... .: ..| 00003470 20 58 25 2c 59 25 2c 5a 25 3a 20 50 25 3d b0 58 | X%,Y%,Z%: P%=.X| 00003480 25 2c 59 25 29 3a 20 fd 20 50 25 3d 32 20 84 20 |%,Y%): . P%=2 . | 00003490 50 25 3d 33 0d 17 a2 0a 20 e6 20 31 32 39 0d 17 |P%=3.... . 129..| 000034a0 ac 0a 20 fb 20 31 32 39 0d 17 b6 0f 20 e7 20 59 |.. . 129.... . Y| 000034b0 25 3c 31 33 32 20 8c 0d 17 c0 0c 20 20 4e 46 25 |%<132 ..... NF%| 000034c0 3d 2d 31 0d 17 ca 1a 20 20 ef 20 32 34 2c 33 38 |=-1.... . 24,38| 000034d0 34 3b 39 36 3b 36 38 38 3b 31 32 38 3b 0d 17 d4 |4;96;688;128;...| 000034e0 07 20 20 da 0d 17 de 21 20 20 f1 8a 32 35 2c 32 |. ....! ..25,2| 000034f0 38 29 22 52 45 54 55 52 4e 20 54 4f 20 44 45 53 |8)"RETURN TO DES| 00003500 4b 54 4f 50 22 0d 17 e8 06 20 cc 0d 17 f2 10 20 |KTOP".... ..... | 00003510 20 e7 20 59 25 3c 32 32 38 20 8c 0d 17 fc 0c 20 | . Y%<228 ..... | 00003520 20 20 4e 46 25 3d 30 0d 18 06 1c 20 20 20 ef 20 | NF%=0.... . | 00003530 32 34 2c 31 39 32 3b 31 39 32 3b 33 38 34 3b 32 |24,192;192;384;2| 00003540 32 34 3b 0d 18 10 08 20 20 20 da 0d 18 1a 16 20 |24;.... ..... | 00003550 20 20 f1 8a 31 35 2c 32 35 29 22 4f 54 48 45 52 | ..15,25)"OTHER| 00003560 22 0d 18 24 07 20 20 cc 0d 18 2e 16 20 20 20 4e |"..$. ..... N| 00003570 46 25 3d 28 38 38 30 2d 59 25 29 2f 36 34 0d 18 |F%=(880-Y%)/64..| 00003580 38 2a 20 20 20 ef 20 32 34 2c 31 39 32 3b 38 33 |8* . 24,192;83| 00003590 32 2d 4e 46 25 2a 36 34 3b 33 38 34 3b 38 36 34 |2-NF%*64;384;864| 000035a0 2d 4e 46 25 2a 36 34 3b 0d 18 42 08 20 20 20 da |-NF%*64;..B. .| 000035b0 0d 18 4c 2b 20 20 20 f1 8a 31 32 2c 4e 46 25 2a |..L+ ..12,NF%*| 000035c0 32 2b 35 29 20 22 20 4a 49 47 53 50 52 49 54 45 |2+5) " JIGSPRITE| 000035d0 22 3b 20 4e 46 25 3b 20 22 20 22 0d 18 56 07 20 |"; NF%; " "..V. | 000035e0 20 cd 0d 18 60 06 20 cd 0d 18 6a 09 20 ef 20 32 | ...`. ...j. . 2| 000035f0 36 0d 18 74 27 20 f5 3a 20 c8 97 20 58 25 2c 59 |6..t' .: .. X%,Y| 00003600 25 2c 5a 25 3a 20 fd 20 b0 58 25 2c 59 25 29 3d |%,Z%: . .X%,Y%)=| 00003610 30 20 84 20 5a 25 3e 30 0d 18 7e 0d 20 e6 20 31 |0 . Z%>0..~. . 1| 00003620 32 38 2b 50 25 0d 18 88 0d 20 fb 20 31 32 38 2b |28+P%.... . 128+| 00003630 50 25 0d 18 92 0d 20 e7 20 5a 25 3d 30 20 8c 0d |P%.... . Z%=0 ..| 00003640 18 9c 10 20 20 e7 20 4e 46 25 3d 2d 31 20 8c 0d |... . NF%=-1 ..| 00003650 18 a6 1b 20 20 20 ef 20 32 34 2c 33 38 34 3b 39 |... . 24,384;9| 00003660 36 3b 36 38 38 3b 31 32 38 3b 0d 18 b0 08 20 20 |6;688;128;.... | 00003670 20 da 0d 18 ba 22 20 20 20 f1 8a 32 35 2c 32 38 | ...." ..25,28| 00003680 29 22 52 45 54 55 52 4e 20 54 4f 20 44 45 53 4b |)"RETURN TO DESK| 00003690 54 4f 50 22 0d 18 c4 07 20 20 cc 0d 18 ce 10 20 |TOP".... ..... | 000036a0 20 20 e7 20 4e 46 25 3d 30 20 8c 0d 18 d8 1d 20 | . NF%=0 ..... | 000036b0 20 20 20 ef 20 32 34 2c 31 39 32 3b 31 39 32 3b | . 24,192;192;| 000036c0 33 38 34 3b 32 32 34 3b 0d 18 e2 09 20 20 20 20 |384;224;.... | 000036d0 da 0d 18 ec 17 20 20 20 20 f1 8a 31 35 2c 32 35 |..... ..15,25| 000036e0 29 22 4f 54 48 45 52 22 0d 18 f6 08 20 20 20 cc |)"OTHER".... .| 000036f0 0d 19 00 2b 20 20 20 20 ef 20 32 34 2c 31 39 32 |...+ . 24,192| 00003700 3b 38 33 32 2d 4e 46 25 2a 36 34 3b 33 38 34 3b |;832-NF%*64;384;| 00003710 38 36 34 2d 4e 46 25 2a 36 34 3b 0d 19 0a 09 20 |864-NF%*64;.... | 00003720 20 20 20 da 0d 19 14 2c 20 20 20 20 f1 8a 31 32 | ...., ..12| 00003730 2c 4e 46 25 2a 32 2b 35 29 20 22 20 4a 49 47 53 |,NF%*2+5) " JIGS| 00003740 50 52 49 54 45 22 3b 20 4e 46 25 3b 20 22 20 22 |PRITE"; NF%; " "| 00003750 0d 19 1e 08 20 20 20 cd 0d 19 28 07 20 20 cd 0d |.... ...(. ..| 00003760 19 32 06 20 cd 0d 19 3c 09 20 ef 20 32 36 0d 19 |.2. ...<. . 26..| 00003770 46 0a fd 20 5a 25 3e 30 0d 19 50 08 c8 97 20 87 |F.. Z%>0..P... .| 00003780 0d 19 5a 0d e7 20 4e 46 25 3d 30 20 8c 0d 19 64 |..Z.. NF%=0 ...d| 00003790 0a 20 e6 20 31 32 38 0d 19 6e 1a 20 ef 20 32 34 |. . 128..n. . 24| 000037a0 2c 31 39 32 3b 31 39 32 3b 33 38 34 3b 32 32 34 |,192;192;384;224| 000037b0 3b 0d 19 78 06 20 da 0d 19 82 1b 20 ef 20 32 34 |;..x. ..... . 24| 000037c0 2c 36 35 36 3b 31 39 32 3b 31 31 30 34 3b 32 32 |,656;192;1104;22| 000037d0 34 3b 0d 19 8c 0a 20 e6 20 31 33 31 0d 19 96 06 |4;.... . 131....| 000037e0 20 da 0d 19 a0 09 20 ef 20 32 36 0d 19 aa 11 20 | ..... . 26.... | 000037f0 f1 8a 34 31 2c 32 35 29 20 22 3e 22 0d 19 b4 0a |..41,25) ">"....| 00003800 20 fb 20 31 32 38 0d 19 be 08 20 fb 20 33 0d 19 | . 128.... . 3..| 00003810 c8 2a 20 f1 8a 31 32 2c 32 35 29 20 22 45 4e 54 |.* ..12,25) "ENT| 00003820 45 52 20 46 49 4c 45 20 4e 41 4d 45 20 41 4e 44 |ER FILE NAME AND| 00003830 20 52 45 54 55 52 4e 22 0d 19 d2 1b 20 ef 20 32 | RETURN".... . 2| 00003840 33 2c 31 2c 31 2c 30 2c 30 2c 30 2c 30 2c 30 2c |3,1,1,0,0,0,0,0,| 00003850 30 2c 30 0d 19 dc 0a 20 fb 20 31 33 31 0d 19 e6 |0,0.... . 131...| 00003860 08 20 fb 20 34 0d 19 f0 16 20 e8 8a 34 32 2c 32 |. . 4.... ..42,2| 00003870 35 29 20 46 49 4c 4e 41 4d 45 24 0d 19 fa 33 20 |5) FILNAME$...3 | 00003880 e7 20 46 49 4c 4e 41 4d 45 24 3d 22 22 20 46 49 |. FILNAME$="" FI| 00003890 4c 4e 41 4d 45 24 3d 22 3c 4f 62 65 79 24 44 69 |LNAME$="<Obey$Di| 000038a0 72 3e 2e 4a 49 47 53 50 52 49 54 45 31 22 0d 1a |r>.JIGSPRITE1"..| 000038b0 04 05 cc 0d 1a 0e 0f 20 e7 20 4e 46 25 3d 2d 31 |....... . NF%=-1| 000038c0 20 8c 0d 1a 18 0b 20 20 45 52 25 3d 31 0d 1a 22 | ..... ER%=1.."| 000038d0 0b 20 20 51 5a 25 3d 31 0d 1a 2c 06 20 cc 0d 1a |. QZ%=1..,. ...| 000038e0 36 2c 20 20 46 49 4c 4e 41 4d 45 24 3d 22 3c 4f |6, FILNAME$="<O| 000038f0 62 65 79 24 44 69 72 3e 2e 4a 49 47 53 50 52 49 |bey$Dir>.JIGSPRI| 00003900 54 45 22 2b c3 28 4e 46 25 29 0d 1a 40 06 20 cd |TE"+.(NF%)..@. .| 00003910 0d 1a 4a 05 cd 0d 1a 54 1a ef 20 32 33 2c 31 20 |..J....T.. 23,1 | 00003920 30 2c 30 2c 30 2c 30 2c 30 2c 30 2c 30 2c 30 0d |0,0,0,0,0,0,0,0.| 00003930 1a 5e 17 c8 97 20 c8 93 20 30 2c 30 2c 31 32 37 |.^... .. 0,0,127| 00003940 39 2c 31 30 32 33 0d 1a 68 09 fb 20 31 32 38 0d |9,1023..h.. 128.| 00003950 1a 72 07 fb 20 37 0d 1a 7c 05 e1 0d 1a 86 04 0d |.r.. 7..|.......| 00003960 1a 90 47 f4 20 20 20 2a 20 2a 20 2a 20 2a 20 2a |..G. * * * * *| 00003970 20 2a 20 20 20 20 20 47 65 74 20 73 70 72 69 74 | * Get sprit| 00003980 65 27 73 20 70 61 6c 65 74 74 65 20 69 66 20 70 |e's palette if p| 00003990 72 65 73 65 6e 74 20 20 20 20 20 2a 20 2a 20 2a |resent * * *| 000039a0 20 2a 20 2a 20 2a 0d 1a 9a 0c dd f2 67 65 74 70 | * * *......getp| 000039b0 61 6c 0d 1a a4 0d 41 25 3d 53 50 41 52 45 41 0d |al....A%=SPAREA.| 000039c0 1a ae 0b 42 25 3d 41 25 21 34 0d 1a b8 0e 43 25 |...B%=A%!4....C%| 000039d0 3d 41 25 2b 41 25 21 38 0d 1a c2 05 f5 0d 1a cc |=A%+A%!8........| 000039e0 0d 20 4e 41 4d 45 24 3d 22 22 0d 1a d6 10 20 e3 |. NAME$="".... .| 000039f0 20 44 25 3d 30 20 b8 20 31 31 0d 1a e0 3b 20 20 | D%=0 . 11...; | 00003a00 e7 20 3f 28 43 25 2b 34 2b 44 25 29 20 3c 3e 20 |. ?(C%+4+D%) <> | 00003a10 30 20 8c 20 4e 41 4d 45 24 3d 4e 41 4d 45 24 2b |0 . NAME$=NAME$+| 00003a20 bd 28 3f 28 43 25 2b 34 2b 44 25 29 29 20 8b 20 |.(?(C%+4+D%)) . | 00003a30 44 25 3d 31 31 0d 1a ea 06 20 ed 0d 1a f4 0a 20 |D%=11.... ..... | 00003a40 45 25 3d 43 25 0d 1a fe 0f 20 43 25 3d 43 25 2b |E%=C%.... C%=C%+| 00003a50 43 25 21 30 0d 1b 08 0c 20 42 25 3d 42 25 2d 31 |C%!0.... B%=B%-1| 00003a60 0d 1b 12 17 fd 20 42 25 3d 30 20 84 20 4e 41 4d |..... B%=0 . NAM| 00003a70 45 24 3d 53 50 52 24 0d 1b 1c 34 e7 20 4e 41 4d |E$=SPR$...4. NAM| 00003a80 45 24 3c 3e 53 50 52 24 20 8c 20 f1 20 22 53 50 |E$<>SPR$ . . "SP| 00003a90 52 49 54 45 20 4e 4f 54 20 46 4f 55 4e 44 3a 20 |RITE NOT FOUND: | 00003aa0 22 3b 20 4e 41 4d 45 24 3a 20 fa 0d 1b 26 13 e7 |"; NAME$: ...&..| 00003ab0 20 21 28 45 25 2b 33 32 29 3e 34 34 20 8c 0d 1b | !(E%+32)>44 ...| 00003ac0 30 1d 20 f4 20 53 70 72 69 74 65 20 68 61 73 20 |0. . Sprite has | 00003ad0 6f 77 6e 20 70 61 6c 65 74 74 65 0d 1b 3a 18 20 |own palette..:. | 00003ae0 4e 43 25 3d 28 21 28 45 25 2b 33 32 29 2d 34 34 |NC%=(!(E%+32)-44| 00003af0 29 2f 38 0d 1b 44 0d 20 45 25 3d 45 25 2b 34 34 |)/8..D. E%=E%+44| 00003b00 0d 1b 4e 13 20 e3 20 44 25 3d 30 20 b8 20 4e 43 |..N. . D%=0 . NC| 00003b10 25 2d 31 0d 1b 58 37 20 20 52 25 3d 3f 28 45 25 |%-1..X7 R%=?(E%| 00003b20 2b 44 25 2a 38 2b 31 29 3a 20 47 25 3d 3f 28 45 |+D%*8+1): G%=?(E| 00003b30 25 2b 44 25 2a 38 2b 32 29 3a 20 42 25 3d 3f 28 |%+D%*8+2): B%=?(| 00003b40 45 25 2b 44 25 2a 38 2b 33 29 0d 1b 62 13 20 20 |E%+D%*8+3)..b. | 00003b50 fb 20 44 25 2c 52 25 2c 47 25 2c 42 25 0d 1b 6c |. D%,R%,G%,B%..l| 00003b60 06 20 ed 0d 1b 76 05 cc 0d 1b 80 2f 20 f4 20 55 |. ...v...../ . U| 00003b70 73 65 20 70 61 6c 65 74 74 65 20 72 65 61 64 69 |se palette readi| 00003b80 6e 67 73 20 6f 6e 20 65 6e 74 72 79 20 74 6f 20 |ngs on entry to | 00003b90 4a 49 47 53 43 52 4e 0d 1b 8a 21 20 c8 99 20 22 |JIGSCRN...! .. "| 00003ba0 57 69 6d 70 5f 53 65 74 50 61 6c 65 74 74 65 22 |Wimp_SetPalette"| 00003bb0 2c 2c 70 61 6c 65 74 25 0d 1b 94 05 cd 0d 1b 9e |,,palet%........| 00003bc0 11 52 30 25 3d 32 3a 20 52 31 25 3d 31 36 0d 1b |.R0%=2: R1%=16..| 00003bd0 a8 31 c8 99 20 22 4f 53 5f 52 65 61 64 50 61 6c |.1.. "OS_ReadPal| 00003be0 65 74 74 65 22 2c 52 30 25 2c 52 31 25 20 b8 20 |ette",R0%,R1% . | 00003bf0 52 30 25 2c 52 31 25 2c 52 32 25 2c 52 33 25 0d |R0%,R1%,R2%,R3%.| 00003c00 1b b2 46 52 42 25 3d 28 28 52 32 25 3e 3e 38 29 |..FRB%=((R2%>>8)| 00003c10 20 80 20 26 46 46 29 3a 20 47 42 25 3d 28 28 52 | . &FF): GB%=((R| 00003c20 32 25 3e 3e 31 36 29 20 80 20 26 46 46 29 3a 20 |2%>>16) . &FF): | 00003c30 42 42 25 3d 28 28 52 32 25 3e 3e 32 34 29 20 80 |BB%=((R2%>>24) .| 00003c40 20 26 46 46 29 0d 1b bc 36 e7 20 52 42 25 3e 32 | &FF)...6. RB%>2| 00003c50 30 30 20 84 20 47 42 25 3e 32 30 30 20 84 20 42 |00 . GB%>200 . B| 00003c60 42 25 3e 32 30 30 20 4d 41 58 42 25 3d 35 30 30 |B%>200 MAXB%=500| 00003c70 20 8b 20 4d 41 58 42 25 3d 2d 31 0d 1b c6 1e 4d | . MAXB%=-1....M| 00003c80 41 58 43 25 3d 30 3a 20 4d 41 58 44 25 3d 30 3a |AXC%=0: MAXD%=0:| 00003c90 20 4d 49 4e 43 25 3d 2d 31 0d 1b d0 0f e3 20 4e | MINC%=-1..... N| 00003ca0 25 3d 30 20 b8 20 31 35 0d 1b da 0b 20 52 30 25 |%=0 . 15.... R0%| 00003cb0 3d 4e 25 0d 1b e4 32 20 c8 99 20 22 4f 53 5f 52 |=N%...2 .. "OS_R| 00003cc0 65 61 64 50 61 6c 65 74 74 65 22 2c 52 30 25 2c |eadPalette",R0%,| 00003cd0 52 31 25 20 b8 20 52 30 25 2c 52 31 25 2c 52 32 |R1% . R0%,R1%,R2| 00003ce0 25 2c 52 33 25 0d 1b ee 44 20 52 25 3d 28 28 52 |%,R3%...D R%=((R| 00003cf0 32 25 3e 3e 38 29 20 80 20 26 46 46 29 3a 20 47 |2%>>8) . &FF): G| 00003d00 25 3d 28 28 52 32 25 3e 3e 31 36 29 20 80 20 26 |%=((R2%>>16) . &| 00003d10 46 46 29 3a 20 42 25 3d 28 28 52 32 25 3e 3e 32 |FF): B%=((R2%>>2| 00003d20 34 29 20 80 20 26 46 46 29 0d 1b f8 10 20 e7 20 |4) . &FF).... . | 00003d30 4d 41 58 42 25 3e 30 20 8c 0d 1c 02 33 20 20 e7 |MAXB%>0 ....3 .| 00003d40 20 52 25 3c 31 36 30 20 80 20 47 25 3c 31 36 30 | R%<160 . G%<160| 00003d50 20 80 20 42 25 3c 31 36 30 20 80 20 4d 41 58 42 | . B%<160 . MAXB| 00003d60 25 3e 52 25 2b 47 25 2b 42 25 20 8c 0d 1c 0c 15 |%>R%+G%+B% .....| 00003d70 20 20 20 4d 41 58 42 25 3d 52 25 2b 47 25 2b 42 | MAXB%=R%+G%+B| 00003d80 25 0d 1c 16 0f 20 20 20 4d 49 4e 43 25 3d 4e 25 |%.... MINC%=N%| 00003d90 0d 1c 20 07 20 20 cd 0d 1c 2a 06 20 cd 0d 1c 34 |.. . ...*. ...4| 00003da0 30 20 44 52 25 3d 94 28 52 42 25 2d 52 25 29 3a |0 DR%=.(RB%-R%):| 00003db0 20 44 47 25 3d 94 28 47 42 25 2d 47 25 29 3a 20 | DG%=.(GB%-G%): | 00003dc0 44 42 25 3d 94 28 42 42 25 2d 42 25 29 0d 1c 3e |DB%=.(BB%-B%)..>| 00003dd0 17 20 44 49 46 46 43 25 3d 44 52 25 2b 44 47 25 |. DIFFC%=DR%+DG%| 00003de0 2b 44 42 25 0d 1c 48 2c 20 e7 20 44 49 46 46 43 |+DB%..H, . DIFFC| 00003df0 25 3e 4d 41 58 44 25 20 8c 20 4d 41 58 43 25 3d |%>MAXD% . MAXC%=| 00003e00 4e 25 3a 20 4d 41 58 44 25 3d 44 49 46 46 43 25 |N%: MAXD%=DIFFC%| 00003e10 0d 1c 52 05 ed 0d 1c 5c 22 e7 20 4d 49 4e 43 25 |..R....\". MINC%| 00003e20 3e 3d 30 20 8c 20 fb 20 4d 49 4e 43 25 20 8b 20 |>=0 . . MINC% . | 00003e30 fb 20 4d 41 58 43 25 0d 1c 66 05 e1 0d 1c 70 04 |. MAXC%..f....p.| 00003e40 0d 1c 7a 47 f4 20 20 20 2a 20 2a 20 2a 20 2a 20 |..zG. * * * * | 00003e50 2a 20 2a 20 20 20 20 20 20 20 20 20 20 20 20 20 |* * | 00003e60 44 72 61 77 20 67 72 69 64 20 6c 69 6e 65 73 20 |Draw grid lines | 00003e70 20 20 20 20 20 20 20 20 20 20 20 20 2a 20 2a 20 | * * | 00003e80 2a 20 2a 20 2a 20 2a 0d 1c 84 0a dd f2 67 72 69 |* * * *......gri| 00003e90 64 0d 1c 8e 2a 48 49 47 48 58 25 3d 4c 4f 57 58 |d...*HIGHX%=LOWX| 00003ea0 25 2b 57 49 44 45 25 3a 20 48 49 47 48 59 25 3d |%+WIDE%: HIGHY%=| 00003eb0 4c 4f 57 59 25 2b 48 49 47 48 25 0d 1c 98 10 e3 |LOWY%+HIGH%.....| 00003ec0 20 4e 25 3d 30 20 b8 20 48 4c 25 0d 1c a2 1e 20 | N%=0 . HL%.... | 00003ed0 56 4c 49 4e 45 25 3d 4c 4f 57 58 25 2b 57 49 44 |VLINE%=LOWX%+WID| 00003ee0 45 25 2a 4e 25 2f 48 4c 25 0d 1c ac 21 20 86 20 |E%*N%/HL%...! . | 00003ef0 56 4c 49 4e 45 25 2c 4c 4f 57 59 25 2c 56 4c 49 |VLINE%,LOWY%,VLI| 00003f00 4e 45 25 2c 48 49 47 48 59 25 0d 1c b6 08 ed 20 |NE%,HIGHY%..... | 00003f10 4e 25 0d 1c c0 1e 86 20 4c 4f 57 58 25 2c 4c 4f |N%..... LOWX%,LO| 00003f20 57 59 25 2c 48 49 47 48 58 25 2c 4c 4f 57 59 25 |WY%,HIGHX%,LOWY%| 00003f30 0d 1c ca 10 e3 20 4e 25 3d 31 20 b8 20 56 4c 25 |..... N%=1 . VL%| 00003f40 0d 1c d4 1e 20 48 4c 49 4e 45 25 3d 4c 4f 57 59 |.... HLINE%=LOWY| 00003f50 25 2b 48 49 47 48 25 2a 4e 25 2f 56 4c 25 0d 1c |%+HIGH%*N%/VL%..| 00003f60 de 21 20 86 20 4c 4f 57 58 25 2c 48 4c 49 4e 45 |.! . LOWX%,HLINE| 00003f70 25 2c 48 49 47 48 58 25 2c 48 4c 49 4e 45 25 0d |%,HIGHX%,HLINE%.| 00003f80 1c e8 08 ed 20 4e 25 0d 1c f2 05 e1 0d 1c fc 04 |.... N%.........| 00003f90 0d 1d 06 47 f4 20 20 20 2a 20 2a 20 2a 20 2a 20 |...G. * * * * | 00003fa0 2a 20 2a 20 20 20 20 20 20 20 20 20 4f 70 65 72 |* * Oper| 00003fb0 61 74 69 6e 67 20 69 6e 73 74 72 75 63 74 69 6f |ating instructio| 00003fc0 6e 73 20 20 20 20 20 20 20 20 20 20 2a 20 2a 20 |ns * * | 00003fd0 2a 20 2a 20 2a 20 2a 0d 1d 10 0a dd f2 68 65 6c |* * * *......hel| 00003fe0 70 0d 1d 1a 08 c8 97 20 87 0d 1d 24 10 f2 6f 70 |p...... ...$..op| 00003ff0 65 6e 6a 69 67 73 63 72 6e 0d 1d 2e 0c f2 68 65 |enjigscrn.....he| 00004000 6c 70 68 64 72 0d 1d 38 55 f1 8a 35 2c 35 29 20 |lphdr..8U..5,5) | 00004010 22 54 68 65 20 66 69 72 73 74 20 73 63 72 65 65 |"The first scree| 00004020 6e 20 73 68 6f 77 73 20 61 20 73 65 6c 65 63 74 |n shows a select| 00004030 69 6f 6e 20 6f 66 20 66 69 6c 65 73 2c 20 65 61 |ion of files, ea| 00004040 63 68 20 63 6f 6e 74 61 69 6e 69 6e 67 20 6f 6e |ch containing on| 00004050 65 20 6f 72 20 6d 6f 72 65 22 0d 1d 42 5a f1 8a |e or more"..BZ..| 00004060 31 2c 36 29 20 22 70 69 63 74 75 72 65 73 20 2d |1,6) "pictures -| 00004070 20 63 6c 69 63 6b 20 6d 6f 75 73 65 20 62 75 74 | click mouse but| 00004080 74 6f 6e 20 6f 6e 20 63 68 6f 73 65 6e 20 66 69 |ton on chosen fi| 00004090 6c 65 20 6e 61 6d 65 2c 20 6f 72 20 69 66 20 79 |le name, or if y| 000040a0 6f 75 20 77 61 6e 74 20 74 6f 20 75 73 65 20 79 |ou want to use y| 000040b0 6f 75 72 22 0d 1d 4c 58 f1 8a 31 2c 37 29 20 22 |our"..LX..1,7) "| 000040c0 6f 77 6e 20 70 69 63 74 75 72 65 2c 20 63 6c 69 |own picture, cli| 000040d0 63 6b 20 6f 6e 20 74 68 65 20 65 6e 74 72 79 20 |ck on the entry | 000040e0 27 4f 54 48 45 52 27 2c 20 74 68 65 6e 20 74 79 |'OTHER', then ty| 000040f0 70 65 20 69 6e 20 74 68 65 20 6e 61 6d 65 20 6f |pe in the name o| 00004100 66 20 79 6f 75 72 20 66 69 6c 65 22 0d 1d 56 59 |f your file"..VY| 00004110 f1 8a 31 2c 38 29 20 22 61 6e 64 20 70 72 65 73 |..1,8) "and pres| 00004120 73 20 52 45 54 55 52 4e 2e 20 41 6e 79 20 73 70 |s RETURN. Any sp| 00004130 72 69 74 65 20 66 69 6c 65 20 6d 61 79 20 62 65 |rite file may be| 00004140 20 75 73 65 64 20 70 72 6f 76 69 64 65 64 20 69 | used provided i| 00004150 74 20 69 73 20 6e 6f 74 20 74 6f 6f 20 62 69 67 |t is not too big| 00004160 20 61 6e 64 22 0d 1d 60 5b f1 8a 31 2c 39 29 20 | and"..`[..1,9) | 00004170 22 74 68 65 20 73 70 72 69 74 65 20 68 61 73 20 |"the sprite has | 00004180 73 75 69 74 61 62 6c 65 20 70 72 6f 70 6f 72 74 |suitable proport| 00004190 69 6f 6e 73 20 66 6f 72 20 61 20 6a 69 67 73 61 |ions for a jigsa| 000041a0 77 20 28 73 65 65 20 6e 6f 74 65 20 6c 61 74 65 |w (see note late| 000041b0 72 29 3b 20 69 66 20 74 68 65 20 66 69 6c 65 22 |r); if the file"| 000041c0 0d 1d 6a 48 f1 8a 31 2c 31 30 29 20 22 69 73 20 |..jH..1,10) "is | 000041d0 6f 6e 20 61 20 64 69 66 66 65 72 65 6e 74 20 64 |on a different d| 000041e0 69 73 63 2c 20 73 77 61 70 20 64 69 73 63 73 20 |isc, swap discs | 000041f0 62 65 66 6f 72 65 20 70 72 65 73 73 69 6e 67 20 |before pressing | 00004200 52 45 54 55 52 4e 2e 22 0d 1d 74 58 f1 8a 35 2c |RETURN."..tX..5,| 00004210 31 33 29 20 22 49 66 20 74 68 65 20 63 68 6f 73 |13) "If the chos| 00004220 65 6e 20 66 69 6c 65 20 63 6f 6e 74 61 69 6e 73 |en file contains| 00004230 20 6d 6f 72 65 20 74 68 61 6e 20 6f 6e 65 20 73 | more than one s| 00004240 70 72 69 74 65 2c 20 61 20 32 6e 64 20 73 63 72 |prite, a 2nd scr| 00004250 65 65 6e 20 73 68 6f 77 69 6e 67 20 74 68 65 22 |een showing the"| 00004260 0d 1d 7e 5d f1 8a 31 2c 31 34 29 20 22 6e 61 6d |..~]..1,14) "nam| 00004270 65 20 61 6e 64 20 61 20 74 69 6e 79 20 76 65 72 |e and a tiny ver| 00004280 73 69 6f 6e 20 6f 66 20 65 61 63 68 20 73 70 72 |sion of each spr| 00004290 69 74 65 20 77 69 6c 6c 20 61 70 70 65 61 72 20 |ite will appear | 000042a0 2d 20 63 6c 69 63 6b 20 6f 6e 20 74 68 65 20 6f |- click on the o| 000042b0 6e 65 20 79 6f 75 20 77 61 6e 74 2e 22 0d 1d 88 |ne you want."...| 000042c0 5d f1 8a 31 2c 31 35 29 20 22 28 49 66 20 61 20 |]..1,15) "(If a | 000042d0 73 70 72 69 74 65 20 68 61 73 20 69 74 73 20 6f |sprite has its o| 000042e0 77 6e 20 70 61 6c 65 74 74 65 2c 20 74 68 65 20 |wn palette, the | 000042f0 63 6f 6c 6f 75 72 73 20 6d 61 79 20 6e 6f 74 20 |colours may not | 00004300 62 65 20 63 6f 72 72 65 63 74 20 61 74 20 74 68 |be correct at th| 00004310 69 73 20 73 74 61 67 65 29 22 0d 1d 92 5a f1 8a |is stage)"...Z..| 00004320 31 2c 31 36 29 20 22 49 66 20 74 68 65 72 65 20 |1,16) "If there | 00004330 61 72 65 20 6d 6f 72 65 20 74 68 61 6e 20 73 69 |are more than si| 00004340 78 20 73 70 72 69 74 65 73 20 69 6e 20 74 68 65 |x sprites in the| 00004350 20 66 69 6c 65 2c 20 74 68 65 20 72 65 73 74 20 | file, the rest | 00004360 6d 61 79 20 62 65 20 64 69 73 70 6c 61 79 65 64 |may be displayed| 00004370 20 62 79 22 0d 1d 9c 59 f1 8a 31 2c 31 37 29 20 | by"...Y..1,17) | 00004380 22 63 6c 69 63 6b 69 6e 67 20 6f 6e 20 27 4e 45 |"clicking on 'NE| 00004390 58 54 20 50 41 47 45 27 20 28 75 73 65 20 27 42 |XT PAGE' (use 'B| 000043a0 41 43 4b 20 50 41 47 45 27 20 74 6f 20 72 65 74 |ACK PAGE' to ret| 000043b0 75 72 6e 20 74 6f 20 74 68 65 20 70 72 65 76 69 |urn to the previ| 000043c0 6f 75 73 20 73 63 72 65 65 6e 29 2e 22 0d 1d a6 |ous screen)."...| 000043d0 59 f1 8a 31 2c 31 38 29 20 22 49 66 20 61 6e 79 |Y..1,18) "If any| 000043e0 20 73 70 72 69 74 65 73 20 77 65 72 65 20 63 72 | sprites were cr| 000043f0 65 61 74 65 64 20 75 73 69 6e 67 20 61 20 32 35 |eated using a 25| 00004400 36 2d 63 6f 6c 6f 75 72 20 6d 6f 64 65 2c 20 74 |6-colour mode, t| 00004410 68 65 20 73 70 72 69 74 65 20 77 69 6c 6c 20 6e |he sprite will n| 00004420 6f 74 20 62 65 22 0d 1d b0 5b f1 8a 31 2c 31 39 |ot be"...[..1,19| 00004430 29 20 22 64 69 73 70 6c 61 79 65 64 2c 20 62 75 |) "displayed, bu| 00004440 74 20 6d 61 79 20 73 74 69 6c 6c 20 62 65 20 73 |t may still be s| 00004450 65 6c 65 63 74 65 64 20 62 79 20 63 6c 69 63 6b |elected by click| 00004460 69 6e 67 20 6f 6e 20 74 68 65 20 62 6f 78 20 73 |ing on the box s| 00004470 68 6f 77 69 6e 67 20 74 68 65 20 6d 6f 64 65 2e |howing the mode.| 00004480 22 0d 1d ba 59 f1 8a 35 2c 32 32 29 20 22 57 68 |"...Y..5,22) "Wh| 00004490 65 6e 20 79 6f 75 20 68 61 76 65 20 63 68 6f 73 |en you have chos| 000044a0 65 6e 20 79 6f 75 72 20 70 69 63 74 75 72 65 2c |en your picture,| 000044b0 20 74 68 65 20 6e 65 78 74 20 73 63 72 65 65 6e | the next screen| 000044c0 20 77 69 6c 6c 20 61 6c 6c 6f 77 20 79 6f 75 20 | will allow you | 000044d0 74 6f 20 73 65 6c 65 63 74 22 0d 1d c4 59 f1 8a |to select"...Y..| 000044e0 31 2c 32 33 29 20 22 68 6f 77 20 6d 61 6e 79 20 |1,23) "how many | 000044f0 70 69 65 63 65 73 20 79 6f 75 20 77 61 6e 74 20 |pieces you want | 00004500 2d 20 63 68 6f 6f 73 65 20 61 20 6c 6f 77 20 6e |- choose a low n| 00004510 75 6d 62 65 72 20 66 6f 72 20 61 6e 20 65 61 73 |umber for an eas| 00004520 79 20 74 61 73 6b 2c 20 61 20 68 69 67 68 20 6f |y task, a high o| 00004530 6e 65 22 0d 1d ce 5a f1 8a 31 2c 32 34 29 20 22 |ne"...Z..1,24) "| 00004540 69 66 20 79 6f 75 20 68 61 76 65 20 70 6c 65 6e |if you have plen| 00004550 74 79 20 6f 66 20 74 69 6d 65 20 74 6f 20 73 70 |ty of time to sp| 00004560 61 72 65 21 20 28 54 68 65 20 61 63 74 75 61 6c |are! (The actual| 00004570 20 6e 75 6d 62 65 72 20 6f 66 20 70 69 65 63 65 | number of piece| 00004580 73 20 6d 61 79 20 6e 6f 74 20 62 65 22 0d 1d d8 |s may not be"...| 00004590 5a f1 8a 31 2c 32 35 29 20 22 65 78 61 63 74 6c |Z..1,25) "exactl| 000045a0 79 20 74 68 65 20 6e 75 6d 62 65 72 20 73 65 6c |y the number sel| 000045b0 65 63 74 65 64 3b 20 69 74 20 77 69 6c 6c 20 64 |ected; it will d| 000045c0 65 70 65 6e 64 20 6f 6e 20 74 68 65 20 70 72 6f |epend on the pro| 000045d0 70 6f 72 74 69 6f 6e 73 20 6f 66 20 74 68 65 20 |portions of the | 000045e0 63 68 6f 73 65 6e 22 0d 1d e2 16 f1 8a 31 2c 32 |chosen"......1,2| 000045f0 36 29 20 22 73 70 72 69 74 65 29 2e 22 0d 1d ec |6) "sprite)."...| 00004600 1a f5 3a 20 c8 97 20 58 25 2c 59 25 2c 5a 25 3a |..: .. X%,Y%,Z%:| 00004610 20 fd 20 5a 25 3e 30 0d 1d f6 0c f2 68 65 6c 70 | . Z%>0.....help| 00004620 68 64 72 0d 1e 00 51 f1 8a 35 2c 35 29 20 22 54 |hdr...Q..5,5) "T| 00004630 68 65 20 70 75 7a 7a 6c 65 20 73 63 72 65 65 6e |he puzzle screen| 00004640 20 69 74 73 65 6c 66 20 73 68 6f 77 73 20 61 20 | itself shows a | 00004650 67 72 69 64 20 69 6e 20 77 68 69 63 68 20 74 68 |grid in which th| 00004660 65 20 70 69 63 74 75 72 65 20 69 73 20 74 6f 20 |e picture is to | 00004670 62 65 20 22 0d 1e 0a 5a f1 8a 31 2c 36 29 20 22 |be "...Z..1,6) "| 00004680 61 73 73 65 6d 62 6c 65 64 20 6f 6e 20 74 68 65 |assembled on the| 00004690 20 6c 65 66 74 2c 20 61 20 73 6d 61 6c 6c 20 76 | left, a small v| 000046a0 65 72 73 69 6f 6e 20 6f 66 20 74 68 65 20 70 69 |ersion of the pi| 000046b0 63 74 75 72 65 20 61 73 20 61 20 67 75 69 64 65 |cture as a guide| 000046c0 20 61 74 20 74 6f 70 20 72 69 67 68 74 22 0d 1e | at top right"..| 000046d0 14 58 f1 8a 31 2c 37 29 20 22 61 6e 64 20 61 20 |.X..1,7) "and a | 000046e0 73 65 6c 65 63 74 69 6f 6e 20 6f 66 20 70 75 7a |selection of puz| 000046f0 7a 6c 65 20 70 69 65 63 65 73 20 61 74 20 62 6f |zle pieces at bo| 00004700 74 74 6f 6d 20 72 69 67 68 74 2e 20 43 6c 69 63 |ttom right. Clic| 00004710 6b 20 61 6e 79 20 6d 6f 75 73 65 20 62 75 74 74 |k any mouse butt| 00004720 6f 6e 20 6f 6e 22 0d 1e 1e 5b f1 8a 31 2c 38 29 |on on"...[..1,8)| 00004730 20 22 74 68 65 20 70 69 65 63 65 20 79 6f 75 20 | "the piece you | 00004740 77 61 6e 74 20 28 74 68 65 20 73 65 6c 65 63 74 |want (the select| 00004750 65 64 20 70 69 65 63 65 20 77 69 6c 6c 20 74 68 |ed piece will th| 00004760 65 6e 20 61 70 70 65 61 72 20 61 62 6f 76 65 20 |en appear above | 00004770 74 68 65 20 70 75 7a 7a 6c 65 20 67 72 69 64 29 |the puzzle grid)| 00004780 22 0d 1e 28 56 f1 8a 31 2c 39 29 20 22 61 6e 64 |"..(V..1,9) "and| 00004790 20 70 6c 61 63 65 20 69 74 20 6f 6e 20 74 68 65 | place it on the| 000047a0 20 67 72 69 64 20 62 79 20 63 6c 69 63 6b 69 6e | grid by clickin| 000047b0 67 20 74 68 65 20 6d 6f 75 73 65 20 69 6e 20 74 |g the mouse in t| 000047c0 68 65 20 73 71 75 61 72 65 20 69 6e 20 77 68 69 |he square in whi| 000047d0 63 68 20 79 6f 75 22 0d 1e 32 5a f1 8a 31 2c 31 |ch you"..2Z..1,1| 000047e0 30 29 20 22 74 68 69 6e 6b 20 69 74 20 73 68 6f |0) "think it sho| 000047f0 75 6c 64 20 67 6f 2e 20 28 49 66 20 79 6f 75 20 |uld go. (If you | 00004800 6c 61 74 65 72 20 72 65 61 6c 69 73 65 20 69 74 |later realise it| 00004810 20 69 73 20 69 6e 20 74 68 65 20 77 72 6f 6e 67 | is in the wrong| 00004820 20 70 6c 61 63 65 20 69 74 20 6d 61 79 20 62 65 | place it may be| 00004830 22 0d 1e 3c 41 f1 8a 31 2c 31 31 29 20 22 6d 6f |"..<A..1,11) "mo| 00004840 76 65 64 20 62 79 20 63 6c 69 63 6b 69 6e 67 20 |ved by clicking | 00004850 74 68 65 20 6d 6f 75 73 65 20 6f 6e 20 69 74 20 |the mouse on it | 00004860 74 6f 20 72 65 2d 73 65 6c 65 63 74 20 69 74 29 |to re-select it)| 00004870 2e 22 0d 1e 46 52 f1 8a 35 2c 31 34 29 20 22 43 |."..FR..5,14) "C| 00004880 6f 6e 74 69 6e 75 65 20 75 6e 74 69 6c 20 61 6c |ontinue until al| 00004890 6c 20 74 68 65 20 70 69 65 63 65 73 20 68 61 76 |l the pieces hav| 000048a0 65 20 62 65 65 6e 20 75 73 65 64 20 75 70 20 2d |e been used up -| 000048b0 20 77 68 65 6e 20 74 68 65 20 70 75 7a 7a 6c 65 | when the puzzle| 000048c0 20 69 73 22 0d 1e 50 59 f1 8a 31 2c 31 35 29 20 | is"..PY..1,15) | 000048d0 22 63 6f 6d 70 6c 65 74 65 20 28 61 6e 64 20 61 |"complete (and a| 000048e0 6c 6c 20 74 68 65 20 70 69 65 63 65 73 20 61 72 |ll the pieces ar| 000048f0 65 20 69 6e 20 74 68 65 69 72 20 63 6f 72 72 65 |e in their corre| 00004900 63 74 20 70 6f 73 69 74 69 6f 6e 73 29 20 74 68 |ct positions) th| 00004910 65 20 67 72 69 64 20 6c 69 6e 65 73 22 0d 1e 5a |e grid lines"..Z| 00004920 58 f1 8a 31 2c 31 36 29 20 22 63 6f 76 65 72 69 |X..1,16) "coveri| 00004930 6e 67 20 74 68 65 20 70 75 7a 7a 6c 65 20 77 69 |ng the puzzle wi| 00004940 6c 6c 20 64 69 73 61 70 70 65 61 72 20 28 69 66 |ll disappear (if| 00004950 20 74 68 65 20 73 70 72 69 74 65 20 68 61 73 20 | the sprite has | 00004960 61 20 27 6d 61 73 6b 27 2c 20 62 61 63 6b 67 72 |a 'mask', backgr| 00004970 6f 75 6e 64 22 0d 1e 64 56 f1 8a 31 2c 31 37 29 |ound"..dV..1,17)| 00004980 20 22 6c 69 6e 65 73 20 77 69 6c 6c 20 72 65 6d | "lines will rem| 00004990 61 69 6e 29 2e 20 4f 6e 63 65 20 61 6c 6c 20 74 |ain). Once all t| 000049a0 68 65 20 70 69 65 63 65 73 20 68 61 76 65 20 62 |he pieces have b| 000049b0 65 65 6e 20 6d 6f 76 65 64 20 74 6f 20 74 68 65 |een moved to the| 000049c0 20 67 72 69 64 2c 20 61 6e 79 22 0d 1e 6e 59 f1 | grid, any"..nY.| 000049d0 8a 31 2c 31 38 29 20 22 77 68 69 63 68 20 61 72 |.1,18) "which ar| 000049e0 65 20 6e 6f 74 20 69 6e 20 74 68 65 20 63 6f 72 |e not in the cor| 000049f0 72 65 63 74 20 70 6f 73 69 74 69 6f 6e 20 28 74 |rect position (t| 00004a00 68 65 72 65 20 61 72 65 20 71 75 69 74 65 20 6c |here are quite l| 00004a10 69 6b 65 6c 79 20 74 6f 20 62 65 20 73 6f 6d 65 |ikely to be some| 00004a20 20 69 66 22 0d 1e 78 57 f1 8a 31 2c 31 39 29 20 | if"..xW..1,19) | 00004a30 22 74 68 65 20 70 75 7a 7a 6c 65 20 68 61 73 20 |"the puzzle has | 00004a40 70 69 65 63 65 73 20 77 68 69 63 68 20 61 70 70 |pieces which app| 00004a50 65 61 72 20 74 6f 20 62 65 20 69 64 65 6e 74 69 |ear to be identi| 00004a60 63 61 6c 20 6f 72 20 61 6c 6d 6f 73 74 20 73 6f |cal or almost so| 00004a70 29 20 74 68 65 6e 20 61 6e 79 22 0d 1e 82 53 f1 |) then any"...S.| 00004a80 8a 31 2c 32 30 29 20 22 70 69 65 63 65 20 77 68 |.1,20) "piece wh| 00004a90 69 63 68 20 69 73 20 69 6e 20 74 68 65 20 77 72 |ich is in the wr| 00004aa0 6f 6e 67 20 70 6c 61 63 65 20 77 69 6c 6c 20 63 |ong place will c| 00004ab0 68 61 6e 67 65 20 63 6f 6c 6f 75 72 20 66 6f 72 |hange colour for| 00004ac0 20 61 20 73 68 6f 72 74 20 74 69 6d 65 22 0d 1e | a short time"..| 00004ad0 8c 59 f1 8a 31 2c 32 31 29 20 22 28 69 6e 64 69 |.Y..1,21) "(indi| 00004ae0 63 61 74 65 64 20 62 79 20 74 68 65 20 68 6f 75 |cated by the hou| 00004af0 72 67 6c 61 73 73 29 2c 20 73 6f 20 74 68 61 74 |rglass), so that| 00004b00 20 79 6f 75 20 77 69 6c 6c 20 6b 6e 6f 77 20 77 | you will know w| 00004b10 68 69 63 68 20 70 69 65 63 65 73 20 68 61 76 65 |hich pieces have| 00004b20 20 74 6f 20 62 65 22 0d 1e 96 52 f1 8a 31 2c 32 | to be"...R..1,2| 00004b30 32 29 20 22 73 77 61 70 70 65 64 20 61 72 6f 75 |2) "swapped arou| 00004b40 6e 64 2e 20 4e 6f 74 65 2c 20 74 69 6d 69 6d 67 |nd. Note, timimg| 00004b50 20 73 74 6f 70 73 20 77 68 69 6c 65 20 74 68 65 | stops while the| 00004b60 20 68 6f 75 72 67 6c 61 73 73 20 69 73 20 64 69 | hourglass is di| 00004b70 73 70 6c 61 79 65 64 2e 22 0d 1e a0 57 f1 8a 35 |splayed."...W..5| 00004b80 2c 32 35 29 20 22 54 6f 20 71 75 69 74 20 74 68 |,25) "To quit th| 00004b90 65 20 63 75 72 72 65 6e 74 20 70 75 7a 7a 6c 65 |e current puzzle| 00004ba0 20 62 65 66 6f 72 65 20 63 6f 6d 70 6c 65 74 69 | before completi| 00004bb0 6f 6e 2c 20 70 72 65 73 73 20 74 68 65 20 45 53 |on, press the ES| 00004bc0 43 41 50 45 20 6b 65 79 20 61 74 20 61 6e 79 22 |CAPE key at any"| 00004bd0 0d 1e aa 39 f1 8a 31 2c 32 36 29 20 22 74 69 6d |...9..1,26) "tim| 00004be0 65 20 65 78 63 65 70 74 20 77 68 69 6c 65 20 74 |e except while t| 00004bf0 68 65 20 68 6f 75 72 67 6c 61 73 73 20 69 73 20 |he hourglass is | 00004c00 72 75 6e 6e 69 6e 67 2e 22 0d 1e b4 1a f5 3a 20 |running.".....: | 00004c10 c8 97 20 58 25 2c 59 25 2c 5a 25 3a 20 fd 20 5a |.. X%,Y%,Z%: . Z| 00004c20 25 3e 30 0d 1e be 05 db 0d 1e c8 1a f5 3a 20 c8 |%>0..........: .| 00004c30 97 20 58 25 2c 59 25 2c 5a 25 3a 20 fd 20 5a 25 |. X%,Y%,Z%: . Z%| 00004c40 3d 30 0d 1e d2 21 f1 8a 33 30 2c 31 29 20 22 4a |=0...!..30,1) "J| 00004c50 49 47 53 41 57 20 49 4e 53 54 52 55 43 54 49 4f |IGSAW INSTRUCTIO| 00004c60 4e 53 22 0d 1e dc 21 f1 8a 33 30 2c 32 29 20 22 |NS"...!..30,2) "| 00004c70 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| 00004c80 2a 2a 2a 22 0d 1e e6 5c f1 8a 31 2c 35 29 20 22 |***"...\..1,5) "| 00004c90 4e 6f 74 65 20 2d 20 41 6c 74 68 6f 75 67 68 20 |Note - Although | 00004ca0 4a 49 47 53 41 57 20 75 73 65 73 20 77 69 6e 64 |JIGSAW uses wind| 00004cb0 6f 77 73 2c 20 62 65 63 61 75 73 65 20 6f 66 20 |ows, because of | 00004cc0 70 6f 73 73 69 62 6c 65 20 6d 6f 64 65 20 2f 20 |possible mode / | 00004cd0 70 61 6c 65 74 74 65 20 63 68 61 6e 67 65 73 22 |palette changes"| 00004ce0 0d 1e f0 5a f1 8a 31 2c 36 29 20 22 61 6e 64 20 |...Z..1,6) "and | 00004cf0 62 65 63 61 75 73 65 20 69 74 20 73 65 74 73 20 |because it sets | 00004d00 61 20 74 61 72 67 65 74 20 74 69 6d 65 20 66 6f |a target time fo| 00004d10 72 20 63 6f 6d 70 6c 65 74 69 6e 67 20 74 68 65 |r completing the| 00004d20 20 70 75 7a 7a 6c 65 2c 20 74 68 65 20 70 72 6f | puzzle, the pro| 00004d30 67 72 61 6d 20 64 6f 65 73 22 0d 1e fa 59 f1 8a |gram does"...Y..| 00004d40 31 2c 37 29 20 22 6e 6f 74 20 27 6d 75 6c 74 69 |1,7) "not 'multi| 00004d50 2d 74 61 73 6b 27 2c 20 69 65 20 61 6e 79 20 6f |-task', ie any o| 00004d60 74 68 65 72 20 57 49 4d 50 20 74 61 73 6b 73 20 |ther WIMP tasks | 00004d70 77 69 6c 6c 20 62 65 20 73 75 73 70 65 6e 64 65 |will be suspende| 00004d80 64 20 77 68 69 6c 65 20 74 68 65 20 70 75 7a 7a |d while the puzz| 00004d90 6c 65 22 0d 1f 04 21 f1 8a 31 2c 38 29 20 22 73 |le"...!..1,8) "s| 00004da0 63 72 65 65 6e 20 69 73 20 64 69 73 70 6c 61 79 |creen is display| 00004db0 65 64 2e 22 0d 1f 0e 25 f1 8a 31 2c 31 30 29 20 |ed."...%..1,10) | 00004dc0 22 53 70 72 69 74 65 20 53 69 7a 65 20 4c 69 6d |"Sprite Size Lim| 00004dd0 69 74 61 74 69 6f 6e 73 22 0d 1f 18 25 f1 8a 31 |itations"...%..1| 00004de0 2c 31 31 29 20 22 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d |,11) "==========| 00004df0 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 22 0d 1f |============="..| 00004e00 22 59 f1 8a 31 2c 31 32 29 20 22 4d 69 6e 69 6d |"Y..1,12) "Minim| 00004e10 75 6d 20 73 69 7a 65 3a 2d 20 20 54 68 65 72 65 |um size:- There| 00004e20 20 69 73 20 6e 6f 20 6d 69 6e 69 6d 75 6d 20 73 | is no minimum s| 00004e30 69 7a 65 20 6c 69 6d 69 74 20 2d 20 79 6f 75 20 |ize limit - you | 00004e40 63 61 6e 20 65 76 65 6e 20 6d 61 6b 65 20 61 20 |can even make a | 00004e50 6a 69 67 73 61 77 22 0d 1f 2c 58 f1 8a 31 2c 31 |jigsaw"..,X..1,1| 00004e60 33 29 20 22 66 72 6f 6d 20 6f 6e 65 20 70 69 78 |3) "from one pix| 00004e70 65 6c 20 69 66 20 79 6f 75 20 77 69 73 68 2c 20 |el if you wish, | 00004e80 74 68 6f 75 67 68 20 69 74 20 77 6f 6e 27 74 20 |though it won't | 00004e90 62 65 20 6d 75 63 68 20 66 75 6e 2c 20 61 73 20 |be much fun, as | 00004ea0 61 6c 6c 20 74 68 65 20 70 69 65 63 65 73 22 0d |all the pieces".| 00004eb0 1f 36 21 f1 8a 31 2c 31 34 29 20 22 77 69 6c 6c |.6!..1,14) "will| 00004ec0 20 6c 6f 6f 6b 20 74 68 65 20 73 61 6d 65 21 22 | look the same!"| 00004ed0 0d 1f 40 5b f1 8a 31 2c 31 36 29 20 22 4d 61 78 |..@[..1,16) "Max| 00004ee0 69 6d 75 6d 20 73 69 7a 65 3a 2d 20 20 54 68 65 |imum size:- The| 00004ef0 20 70 72 6f 67 72 61 6d 20 61 6c 6c 6f 77 73 20 | program allows | 00004f00 6a 75 73 74 20 6f 76 65 72 20 31 36 30 4b 62 20 |just over 160Kb | 00004f10 66 6f 72 20 61 20 73 70 72 69 74 65 20 46 49 4c |for a sprite FIL| 00004f20 45 3b 20 74 68 69 73 20 69 73 22 0d 1f 4a 5c f1 |E; this is"..J\.| 00004f30 8a 31 2c 31 37 29 20 22 73 75 66 66 69 63 69 65 |.1,17) "sufficie| 00004f40 6e 74 20 66 6f 72 20 6f 6e 65 20 66 75 6c 6c 2d |nt for one full-| 00004f50 73 63 72 65 65 6e 20 73 70 72 69 74 65 20 28 36 |screen sprite (6| 00004f60 34 30 20 78 20 32 35 36 20 70 69 78 65 6c 73 29 |40 x 256 pixels)| 00004f70 20 69 6e 20 61 20 32 35 36 2d 63 6f 6c 6f 75 72 | in a 256-colour| 00004f80 20 6d 6f 64 65 2c 22 0d 1f 54 5b f1 8a 31 2c 31 | mode,"..T[..1,1| 00004f90 38 29 20 22 74 77 6f 20 66 75 6c 6c 2d 73 63 72 |8) "two full-scr| 00004fa0 65 65 6e 20 73 70 72 69 74 65 73 20 28 6f 72 20 |een sprites (or | 00004fb0 6f 6e 65 20 6c 61 72 67 65 72 20 74 68 61 6e 20 |one larger than | 00004fc0 66 75 6c 6c 2d 73 63 72 65 65 6e 2c 20 61 73 20 |full-screen, as | 00004fd0 6c 6f 6e 67 20 61 73 20 69 74 20 69 73 20 6e 6f |long as it is no| 00004fe0 74 22 0d 1f 5e 57 f1 8a 31 2c 31 39 29 20 22 6d |t"..^W..1,19) "m| 00004ff0 6f 72 65 20 74 68 61 6e 20 31 36 30 4b 62 29 20 |ore than 160Kb) | 00005000 69 6e 20 61 20 31 36 2d 63 6f 6c 6f 75 72 20 6d |in a 16-colour m| 00005010 6f 64 65 2c 20 6f 72 20 61 20 6c 61 72 67 65 20 |ode, or a large | 00005020 6e 75 6d 62 65 72 20 6f 66 20 73 6d 61 6c 6c 20 |number of small | 00005030 73 70 72 69 74 65 73 2e 22 0d 1f 68 58 f1 8a 31 |sprites."..hX..1| 00005040 2c 32 31 29 20 22 50 72 6f 70 6f 72 74 69 6f 6e |,21) "Proportion| 00005050 73 3a 2d 20 20 20 54 68 65 20 70 72 6f 67 72 61 |s:- The progra| 00005060 6d 20 61 64 6a 75 73 74 73 20 74 68 65 20 73 69 |m adjusts the si| 00005070 7a 65 20 6f 66 20 74 68 65 20 70 69 63 74 75 72 |ze of the pictur| 00005080 65 20 74 6f 20 74 68 65 20 6d 61 78 69 6d 75 6d |e to the maximum| 00005090 22 0d 1f 72 58 f1 8a 31 2c 32 32 29 20 22 61 6c |"..rX..1,22) "al| 000050a0 6c 6f 77 65 64 20 62 79 20 74 68 65 20 73 69 7a |lowed by the siz| 000050b0 65 20 6f 66 20 74 68 65 20 67 72 69 64 2c 20 77 |e of the grid, w| 000050c0 68 69 6c 65 20 73 74 69 6c 6c 20 6b 65 65 70 69 |hile still keepi| 000050d0 6e 67 20 74 68 65 20 73 70 72 69 74 65 27 73 20 |ng the sprite's | 000050e0 6f 72 69 67 69 6e 61 6c 22 0d 1f 7c 59 f1 8a 31 |original"..|Y..1| 000050f0 2c 32 33 29 20 22 68 65 69 67 68 74 20 2f 20 77 |,23) "height / w| 00005100 69 64 74 68 20 72 61 74 69 6f 2e 20 54 68 75 73 |idth ratio. Thus| 00005110 2c 20 69 66 20 79 6f 75 20 63 68 6f 6f 73 65 20 |, if you choose | 00005120 61 20 73 70 72 69 74 65 20 77 68 69 63 68 20 69 |a sprite which i| 00005130 73 20 6d 75 63 68 20 77 69 64 65 72 20 74 68 61 |s much wider tha| 00005140 6e 22 0d 1f 86 5a f1 8a 31 2c 32 34 29 20 22 69 |n"...Z..1,24) "i| 00005150 74 20 69 73 20 68 69 67 68 2c 20 74 68 65 20 70 |t is high, the p| 00005160 72 6f 67 72 61 6d 20 77 69 6c 6c 20 6d 61 6b 65 |rogram will make| 00005170 20 74 68 65 20 70 69 63 74 75 72 65 20 74 68 65 | the picture the| 00005180 20 73 61 6d 65 20 77 69 64 74 68 20 61 73 20 74 | same width as t| 00005190 68 65 20 67 72 69 64 20 61 6e 64 22 0d 1f 90 59 |he grid and"...Y| 000051a0 f1 8a 31 2c 32 35 29 20 22 77 69 6c 6c 20 64 65 |..1,25) "will de| 000051b0 63 72 65 61 73 65 20 74 68 65 20 68 65 69 67 68 |crease the heigh| 000051c0 74 20 70 72 6f 70 6f 72 74 69 6f 6e 61 74 65 6c |t proportionatel| 000051d0 79 3b 20 69 66 20 74 68 65 20 68 65 69 67 68 74 |y; if the height| 000051e0 20 69 73 20 74 68 65 6e 20 66 6f 75 6e 64 20 74 | is then found t| 000051f0 6f 20 62 65 22 0d 1f 9a 59 f1 8a 31 2c 32 36 29 |o be"...Y..1,26)| 00005200 20 22 69 6e 73 75 66 66 69 63 69 65 6e 74 20 66 | "insufficient f| 00005210 6f 72 20 61 74 20 6c 65 61 73 74 20 74 77 6f 20 |or at least two | 00005220 27 6c 69 6e 65 73 27 20 6f 66 20 70 75 7a 7a 6c |'lines' of puzzl| 00005230 65 2c 20 74 68 65 20 70 72 6f 67 72 61 6d 20 77 |e, the program w| 00005240 69 6c 6c 20 64 69 73 70 6c 61 79 20 61 22 0d 1f |ill display a"..| 00005250 a4 58 f1 8a 31 2c 32 37 29 20 22 77 61 72 6e 69 |.X..1,27) "warni| 00005260 6e 67 20 6d 65 73 73 61 67 65 20 61 6e 64 20 61 |ng message and a| 00005270 62 61 6e 64 6f 6e 20 74 68 65 20 61 74 74 65 6d |bandon the attem| 00005280 70 74 20 74 6f 20 6d 61 6b 65 20 61 20 70 75 7a |pt to make a puz| 00005290 7a 6c 65 20 66 72 6f 6d 20 74 68 69 73 20 73 70 |zle from this sp| 000052a0 72 69 74 65 2e 22 0d 1f ae 31 f1 8a 31 2c 32 38 |rite."...1..1,28| 000052b0 29 20 22 28 53 69 6d 69 6c 61 72 6c 79 20 66 6f |) "(Similarly fo| 000052c0 72 20 74 61 6c 6c 2c 20 74 68 69 6e 20 73 70 72 |r tall, thin spr| 000052d0 69 74 65 73 29 2e 22 0d 1f b8 33 f1 8a 33 36 2c |ites)."...3..36,| 000052e0 33 30 29 20 22 43 4c 49 43 4b 20 4d 4f 55 53 45 |30) "CLICK MOUSE| 000052f0 20 4b 45 59 20 54 4f 20 52 45 54 55 52 4e 20 54 | KEY TO RETURN T| 00005300 4f 20 44 45 53 4b 54 4f 50 22 0d 1f c2 1a f5 3a |O DESKTOP".....:| 00005310 20 c8 97 20 58 25 2c 59 25 2c 5a 25 3a 20 fd 20 | .. X%,Y%,Z%: . | 00005320 5a 25 3e 30 0d 1f cc 26 f2 57 69 6d 70 5f 57 69 |Z%>0...&.Wimp_Wi| 00005330 6e 64 6f 77 43 6c 6f 73 65 28 4a 49 47 53 43 52 |ndowClose(JIGSCR| 00005340 4e 5f 57 69 6e 64 6f 77 25 29 0d 1f d6 08 c8 97 |N_Window%)......| 00005350 20 ee 0d 1f e0 05 e1 0d 1f ea 04 0d 1f f4 47 f4 | .............G.| 00005360 20 20 20 2a 20 2a 20 2a 20 2a 20 2a 20 2a 20 20 | * * * * * * | 00005370 20 20 20 4f 70 65 72 61 74 69 6e 67 20 69 6e 73 | Operating ins| 00005380 74 72 75 63 74 69 6f 6e 73 20 68 65 61 64 69 6e |tructions headin| 00005390 67 73 20 20 20 20 20 2a 20 2a 20 2a 20 2a 20 2a |gs * * * * *| 000053a0 20 2a 0d 1f fe 0d dd f2 68 65 6c 70 68 64 72 0d | *......helphdr.| 000053b0 20 08 1c c8 99 20 22 57 69 6d 70 5f 53 65 74 43 | .... "Wimp_SetC| 000053c0 6f 6c 6f 75 72 22 2c 25 31 31 31 0d 20 12 21 c8 |olour",%111. .!.| 000053d0 99 20 22 57 69 6d 70 5f 53 65 74 43 6f 6c 6f 75 |. "Wimp_SetColou| 000053e0 72 22 2c 25 31 30 30 30 31 31 31 31 0d 20 1c 05 |r",%10001111. ..| 000053f0 db 0d 20 26 1a f5 3a 20 c8 97 20 58 25 2c 59 25 |.. &..: .. X%,Y%| 00005400 2c 5a 25 3a 20 fd 20 5a 25 3d 30 0d 20 30 21 f1 |,Z%: . Z%=0. 0!.| 00005410 8a 33 30 2c 31 29 20 22 4a 49 47 53 41 57 20 49 |.30,1) "JIGSAW I| 00005420 4e 53 54 52 55 43 54 49 4f 4e 53 22 0d 20 3a 21 |NSTRUCTIONS". :!| 00005430 f1 8a 33 30 2c 32 29 20 22 2a 2a 2a 2a 2a 2a 2a |..30,2) "*******| 00005440 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 22 0d 20 44 |************". D| 00005450 2a f1 8a 34 30 2c 32 39 29 20 22 43 4c 49 43 4b |*..40,29) "CLICK| 00005460 20 4d 4f 55 53 45 20 4b 45 59 20 54 4f 20 43 4f | MOUSE KEY TO CO| 00005470 4e 54 49 4e 55 45 22 0d 20 4e 05 e1 0d 20 58 04 |NTINUE". N... X.| 00005480 0d 20 62 47 f4 20 20 20 2a 20 2a 20 2a 20 2a 20 |. bG. * * * * | 00005490 2a 20 2a 20 20 20 20 20 20 20 20 47 75 69 64 65 |* * Guide| 000054a0 20 74 6f 20 70 61 6c 65 74 74 65 20 75 73 61 67 | to palette usag| 000054b0 65 20 20 20 20 20 20 20 20 20 20 20 2a 20 2a 20 |e * * | 000054c0 2a 20 2a 20 2a 20 2a 0d 20 6c 0d dd f2 68 65 6c |* * * *. l...hel| 000054d0 70 70 61 6c 0d 20 76 08 c8 97 20 87 0d 20 80 10 |ppal. v... .. ..| 000054e0 f2 6f 70 65 6e 6a 69 67 73 63 72 6e 0d 20 8a 1c |.openjigscrn. ..| 000054f0 c8 99 20 22 57 69 6d 70 5f 53 65 74 43 6f 6c 6f |.. "Wimp_SetColo| 00005500 75 72 22 2c 25 31 31 31 0d 20 94 21 c8 99 20 22 |ur",%111. .!.. "| 00005510 57 69 6d 70 5f 53 65 74 43 6f 6c 6f 75 72 22 2c |Wimp_SetColour",| 00005520 25 31 30 30 30 31 31 31 31 0d 20 9e 05 db 0d 20 |%10001111. .... | 00005530 a8 1a f5 3a 20 c8 97 20 58 25 2c 59 25 2c 5a 25 |...: .. X%,Y%,Z%| 00005540 3a 20 fd 20 5a 25 3d 30 0d 20 b2 24 f1 8a 33 30 |: . Z%=0. .$..30| 00005550 2c 31 29 20 22 47 55 49 44 45 20 54 4f 20 50 41 |,1) "GUIDE TO PA| 00005560 4c 45 54 54 45 20 55 53 41 47 45 22 0d 20 bc 24 |LETTE USAGE". .$| 00005570 f1 8a 33 30 2c 32 29 20 22 2a 2a 2a 2a 2a 2a 2a |..30,2) "*******| 00005580 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 22 |***************"| 00005590 0d 20 c6 56 f1 8a 31 2c 35 29 20 22 49 66 20 61 |. .V..1,5) "If a| 000055a0 20 70 75 7a 7a 6c 65 20 73 70 72 69 74 65 20 63 | puzzle sprite c| 000055b0 6f 6e 74 61 69 6e 73 20 69 74 73 20 6f 77 6e 20 |ontains its own | 000055c0 70 61 6c 65 74 74 65 2c 20 4a 49 47 53 41 57 20 |palette, JIGSAW | 000055d0 77 69 6c 6c 20 75 73 65 20 74 68 69 73 20 66 6f |will use this fo| 000055e0 72 20 74 68 65 22 0d 20 d0 5a f1 8a 31 2c 36 29 |r the". .Z..1,6)| 000055f0 20 22 70 75 7a 7a 6c 65 2c 20 73 77 61 70 70 69 | "puzzle, swappi| 00005600 6e 67 20 62 61 63 6b 20 74 6f 20 74 68 65 20 70 |ng back to the p| 00005610 72 65 76 69 6f 75 73 20 70 61 6c 65 74 74 65 20 |revious palette | 00005620 77 68 65 6e 20 79 6f 75 20 72 65 74 75 72 6e 20 |when you return | 00005630 74 6f 20 74 68 65 20 44 65 73 6b 74 6f 70 2e 22 |to the Desktop."| 00005640 0d 20 da 58 f1 8a 31 2c 38 29 20 22 49 66 20 79 |. .X..1,8) "If y| 00005650 6f 75 20 61 72 65 20 75 73 69 6e 67 20 61 20 73 |ou are using a s| 00005660 70 72 69 74 65 20 77 69 74 68 20 61 20 70 61 6c |prite with a pal| 00005670 65 74 74 65 20 77 68 69 63 68 20 68 61 73 20 74 |ette which has t| 00005680 6f 20 62 65 20 6c 6f 61 64 65 64 20 73 65 70 61 |o be loaded sepa| 00005690 72 61 74 65 6c 79 2c 22 0d 20 e4 4d f1 8a 31 2c |rately,". .M..1,| 000056a0 39 29 20 22 6c 6f 61 64 20 69 74 20 62 65 66 6f |9) "load it befo| 000056b0 72 65 20 79 6f 75 20 73 65 6c 65 63 74 20 27 53 |re you select 'S| 000056c0 74 61 72 74 20 50 75 7a 7a 6c 65 27 20 66 72 6f |tart Puzzle' fro| 000056d0 6d 20 74 68 65 20 49 63 6f 6e 20 42 61 72 20 6d |m the Icon Bar m| 000056e0 65 6e 75 2e 22 0d 20 ee 5a f1 8a 31 2c 31 31 29 |enu.". .Z..1,11)| 000056f0 20 22 4f 74 68 65 72 77 69 73 65 2c 20 4a 49 47 | "Otherwise, JIG| 00005700 53 41 57 20 77 69 6c 6c 20 75 73 65 20 65 69 74 |SAW will use eit| 00005710 68 65 72 20 74 68 65 20 73 74 61 6e 64 61 72 64 |her the standard| 00005720 20 28 4d 6f 64 65 20 31 32 29 20 44 65 73 6b 74 | (Mode 12) Deskt| 00005730 6f 70 20 70 61 6c 65 74 74 65 20 66 6f 72 22 0d |op palette for".| 00005740 20 f8 56 f1 8a 31 2c 31 32 29 20 22 73 70 72 69 | .V..1,12) "spri| 00005750 74 65 73 20 63 72 65 61 74 65 64 20 69 6e 20 31 |tes created in 1| 00005760 36 20 28 6f 72 20 6c 65 73 73 29 20 63 6f 6c 6f |6 (or less) colo| 00005770 75 72 20 6d 6f 64 65 73 2c 20 6f 72 20 74 68 65 |ur modes, or the| 00005780 20 32 35 36 2d 63 6f 6c 6f 75 72 20 70 61 6c 65 | 256-colour pale| 00005790 74 74 65 2e 22 0d 21 02 33 f1 8a 33 32 2c 31 36 |tte.".!.3..32,16| 000057a0 29 20 22 43 4c 49 43 4b 20 4d 4f 55 53 45 20 4b |) "CLICK MOUSE K| 000057b0 45 59 20 54 4f 20 52 45 54 55 52 4e 20 54 4f 20 |EY TO RETURN TO | 000057c0 44 45 53 4b 54 4f 50 22 0d 21 0c 1a f5 3a 20 c8 |DESKTOP".!...: .| 000057d0 97 20 58 25 2c 59 25 2c 5a 25 3a 20 fd 20 5a 25 |. X%,Y%,Z%: . Z%| 000057e0 3e 30 0d 21 16 26 f2 57 69 6d 70 5f 57 69 6e 64 |>0.!.&.Wimp_Wind| 000057f0 6f 77 43 6c 6f 73 65 28 4a 49 47 53 43 52 4e 5f |owClose(JIGSCRN_| 00005800 57 69 6e 64 6f 77 25 29 0d 21 20 08 c8 97 20 ee |Window%).! ... .| 00005810 0d 21 2a 05 e1 0d 21 34 04 0d 21 3e 43 f4 20 20 |.!*...!4..!>C. | 00005820 20 2a 20 2a 20 2a 20 2a 20 2a 20 20 20 20 20 20 | * * * * * | 00005830 20 20 20 20 20 20 20 20 20 53 65 74 20 75 70 20 | Set up | 00005840 61 72 65 61 73 20 20 20 20 20 20 20 20 20 20 20 |areas | 00005850 20 20 20 2a 20 2a 20 2a 20 2a 20 2a 0d 21 48 0d | * * * * *.!H.| 00005860 dd f2 69 6e 69 74 69 61 6c 0d 21 52 10 41 52 45 |..initial.!R.ARE| 00005870 41 25 3d 31 37 30 30 30 30 0d 21 5c 12 de 20 53 |A%=170000.!\.. S| 00005880 50 41 52 45 41 20 41 52 45 41 25 0d 21 66 0e de |PAREA AREA%.!f..| 00005890 20 53 43 41 4c 45 20 31 36 0d 21 70 11 de 20 43 | SCALE 16.!p.. C| 000058a0 4f 4c 54 41 42 4c 45 20 31 36 0d 21 7a 16 43 4f |OLTABLE 16.!z.CO| 000058b0 4c 54 41 42 41 44 25 3d 43 4f 4c 54 41 42 4c 45 |LTABAD%=COLTABLE| 000058c0 0d 21 84 0f e3 20 4e 25 3d 30 20 b8 20 31 35 0d |.!... N%=0 . 15.| 000058d0 21 8e 13 20 43 4f 4c 54 41 42 4c 45 3f 4e 25 3d |!.. COLTABLE?N%=| 000058e0 4e 25 0d 21 98 08 ed 20 4e 25 0d 21 a2 11 21 53 |N%.!... N%.!..!S| 000058f0 50 41 52 45 41 3d 41 52 45 41 25 0d 21 ac 0f 53 |PAREA=AREA%.!..S| 00005900 50 41 52 45 41 21 38 3d 31 36 0d 21 b6 10 de 20 |PAREA!8=16.!... | 00005910 53 50 52 4e 41 4d 45 20 31 34 0d 21 c0 0f de 20 |SPRNAME 14.!... | 00005920 70 61 6c 65 74 25 20 38 30 0d 21 ca 14 de 20 55 |palet% 80.!... U| 00005930 53 45 44 42 49 54 53 25 28 32 35 36 29 0d 21 d4 |SEDBITS%(256).!.| 00005940 15 de 20 47 52 49 44 53 50 52 25 28 33 32 2c 33 |.. GRIDSPR%(32,3| 00005950 32 29 0d 21 de 15 de 20 44 49 53 50 53 50 52 25 |2).!... DISPSPR%| 00005960 28 33 32 2c 33 32 29 0d 21 e8 13 42 49 54 41 52 |(32,32).!..BITAR| 00005970 45 41 25 3d 31 32 32 30 30 30 0d 21 f2 16 de 20 |EA%=122000.!... | 00005980 42 49 54 41 52 45 41 20 42 49 54 41 52 45 41 25 |BITAREA BITAREA%| 00005990 0d 21 fc 15 21 42 49 54 41 52 45 41 3d 42 49 54 |.!..!BITAREA=BIT| 000059a0 41 52 45 41 25 0d 22 06 10 42 49 54 41 52 45 41 |AREA%."..BITAREA| 000059b0 21 38 3d 31 36 0d 22 10 05 e1 0d 22 1a 04 0d 22 |!8=16."...."..."| 000059c0 24 47 f4 20 20 20 2a 20 2a 20 2a 20 2a 20 2a 20 |$G. * * * * * | 000059d0 20 52 65 61 64 20 66 69 6c 65 20 69 6e 66 6f 72 | Read file infor| 000059e0 6d 61 74 69 6f 6e 20 26 20 73 65 74 20 75 70 20 |mation & set up | 000059f0 63 6f 6e 73 74 61 6e 74 73 20 20 20 2a 20 2a 20 |constants * * | 00005a00 2a 20 2a 20 2a 0d 22 2e 10 dd f2 69 6e 69 74 69 |* * *."....initi| 00005a10 61 6c 69 73 65 0d 22 38 33 52 30 25 3d 30 3a 20 |alise."83R0%=0: | 00005a20 52 31 25 3d 30 3a 20 52 32 25 3d 30 3a 20 52 33 |R1%=0: R2%=0: R3| 00005a30 25 3d 30 3a 20 52 34 25 3d 30 3a 20 52 35 25 3d |%=0: R4%=0: R5%=| 00005a40 30 3a 20 52 36 25 3d 30 0d 22 42 36 c8 99 20 22 |0: R6%=0."B6.. "| 00005a50 4f 53 5f 46 69 6c 65 22 2c 31 37 2c 46 49 4c 4e |OS_File",17,FILN| 00005a60 41 4d 45 24 20 b8 20 52 30 25 2c 52 31 25 2c 52 |AME$ . R0%,R1%,R| 00005a70 32 25 2c 52 33 25 2c 52 34 25 2c 52 35 25 0d 22 |2%,R3%,R4%,R5%."| 00005a80 4c 10 46 49 4c 45 46 4f 55 4e 44 25 3d 30 0d 22 |L.FILEFOUND%=0."| 00005a90 56 0d e7 20 52 30 25 3d 31 20 8c 0d 22 60 24 20 |V.. R0%=1 .."`$ | 00005aa0 e7 20 28 52 32 25 20 80 20 26 46 46 46 46 46 46 |. (R2% . &FFFFFF| 00005ab0 30 30 29 3d 26 46 46 46 46 46 39 30 30 20 8c 0d |00)=&FFFFF900 ..| 00005ac0 22 6a 13 20 20 46 49 4c 45 46 4f 55 4e 44 25 3d |"j. FILEFOUND%=| 00005ad0 2d 31 0d 22 74 19 20 20 c8 99 20 26 32 45 2c 32 |-1."t. .. &2E,2| 00005ae0 35 36 2b 39 2c 53 50 41 52 45 41 0d 22 7e 23 20 |56+9,SPAREA."~# | 00005af0 20 c8 99 20 26 32 45 2c 32 35 36 2b 31 30 2c 53 | .. &2E,256+10,S| 00005b00 50 41 52 45 41 2c 46 49 4c 4e 41 4d 45 24 0d 22 |PAREA,FILNAME$."| 00005b10 88 12 20 20 50 49 43 48 49 47 48 25 3d 37 30 30 |.. PICHIGH%=700| 00005b20 0d 22 92 12 20 20 50 49 43 57 49 44 45 25 3d 38 |.".. PICWIDE%=8| 00005b30 36 30 0d 22 9c 13 20 20 54 49 4e 59 48 49 47 48 |60.".. TINYHIGH| 00005b40 25 3d 32 30 30 0d 22 a6 13 20 20 54 49 4e 59 57 |%=200.".. TINYW| 00005b50 49 44 45 25 3d 32 34 30 0d 22 b0 0f 20 20 43 4f |IDE%=240.".. CO| 00005b60 4c 53 31 36 25 3d 30 0d 22 ba 0c 20 20 4d 31 35 |LS16%=0.".. M15| 00005b70 25 3d 30 0d 22 c4 06 20 cc 0d 22 ce 32 20 20 45 |%=0.".. ..".2 E| 00005b80 52 52 4d 53 24 3d 22 46 49 4c 45 20 20 22 2b 46 |RRMS$="FILE "+F| 00005b90 49 4c 4e 41 4d 45 24 2b 22 20 20 4e 4f 54 20 53 |ILNAME$+" NOT S| 00005ba0 50 52 49 54 45 20 46 49 4c 45 22 0d 22 d8 06 20 |PRITE FILE".".. | 00005bb0 cd 0d 22 e2 05 cc 0d 22 ec 2b 20 45 52 52 4d 53 |.."....".+ ERRMS| 00005bc0 24 3d 22 46 49 4c 45 20 20 22 2b 46 49 4c 4e 41 |$="FILE "+FILNA| 00005bd0 4d 45 24 2b 22 20 20 4e 4f 54 20 46 4f 55 4e 44 |ME$+" NOT FOUND| 00005be0 22 0d 22 f6 05 cd 0d 23 00 14 e7 20 46 49 4c 45 |"."....#... FILE| 00005bf0 46 4f 55 4e 44 25 3d 30 20 8c 0d 23 0a 1b 20 ef |FOUND%=0 ..#.. .| 00005c00 20 32 34 2c 31 39 32 3b 31 36 30 3b 31 32 37 39 | 24,192;160;1279| 00005c10 3b 31 39 32 3b 0d 23 14 0a 20 e6 20 31 32 38 0d |;192;.#.. . 128.| 00005c20 23 1e 06 20 da 0d 23 28 09 20 ef 20 32 36 0d 23 |#.. ..#(. . 26.#| 00005c30 32 09 20 fb 20 31 35 0d 23 3c 14 20 f1 8a 31 32 |2. . 15.#<. ..12| 00005c40 2c 32 36 29 20 45 52 52 4d 53 24 0d 23 46 17 20 |,26) ERRMS$.#F. | 00005c50 e3 20 4e 25 3d 30 20 b8 20 32 30 30 30 30 30 3a |. N%=0 . 200000:| 00005c60 20 ed 0d 23 50 05 cd 0d 23 5a 09 45 52 25 3d 30 | ..#P...#Z.ER%=0| 00005c70 0d 23 64 08 c8 97 20 ee 0d 23 6e 05 e1 0d 23 78 |.#d... ..#n...#x| 00005c80 04 0d 23 82 47 f4 20 20 20 2a 20 2a 20 2a 20 2a |..#.G. * * * *| 00005c90 20 2a 20 2a 20 20 20 20 20 20 20 20 20 20 20 50 | * * P| 00005ca0 6c 61 63 65 20 70 69 65 63 65 20 6f 6e 20 67 72 |lace piece on gr| 00005cb0 69 64 20 20 20 20 20 20 20 20 20 20 20 2a 20 2a |id * *| 00005cc0 20 2a 20 2a 20 2a 20 2a 0d 23 8c 0e dd f2 70 6c | * * * *.#....pl| 00005cd0 61 63 65 62 69 74 0d 23 96 24 f5 3a 20 f2 74 69 |acebit.#.$.: .ti| 00005ce0 6d 65 6e 6f 77 3a 20 c8 97 20 58 25 2c 59 25 2c |menow: .. X%,Y%,| 00005cf0 5a 25 3a 20 fd 20 5a 25 3d 30 0d 23 a0 05 f5 0d |Z%: . Z%=0.#....| 00005d00 23 aa 2c 20 f5 3a 20 c8 97 20 58 25 2c 59 25 2c |#., .: .. X%,Y%,| 00005d10 5a 25 3a 20 fd 20 5a 25 3e 30 20 84 20 91 20 81 |Z%: . Z%>0 . . .| 00005d20 20 31 30 30 20 3e 20 54 49 4d 25 0d 23 b4 0d 20 | 100 > TIM%.#.. | 00005d30 f2 74 69 6d 65 6e 6f 77 0d 23 be 0d 20 e7 20 5a |.timenow.#.. . Z| 00005d40 25 3e 30 20 8c 0d 23 c8 4b 20 20 e7 20 58 25 3c |%>0 ..#.K . X%<| 00005d50 3d 4c 4f 57 58 25 20 84 20 58 25 3e 3d 4c 4f 57 |=LOWX% . X%>=LOW| 00005d60 58 25 2b 57 49 44 45 25 20 84 20 59 25 3c 3d 4c |X%+WIDE% . Y%<=L| 00005d70 4f 57 59 25 20 84 20 59 25 3e 3d 4c 4f 57 59 25 |OWY% . Y%>=LOWY%| 00005d80 2b 48 49 47 48 25 20 ef 20 37 3a 20 5a 25 3d 30 |+HIGH% . 7: Z%=0| 00005d90 0d 23 d2 37 20 20 e7 20 58 25 3e 4c 4f 57 58 25 |.#.7 . X%>LOWX%| 00005da0 2b 57 49 44 45 25 20 f1 8a 33 32 2c 36 29 20 22 |+WIDE% ..32,6) "| 00005db0 50 49 45 43 45 20 41 4c 52 45 41 44 59 20 53 45 |PIECE ALREADY SE| 00005dc0 4c 45 43 54 45 44 22 0d 23 dc 06 20 cd 0d 23 e6 |LECTED".#.. ..#.| 00005dd0 0a fd 20 5a 25 3e 30 0d 23 f0 24 f1 8a 33 32 2c |.. Z%>0.#.$..32,| 00005de0 36 29 20 22 20 20 20 20 20 20 20 20 20 20 20 20 |6) " | 00005df0 20 20 20 20 20 20 20 20 20 20 22 0d 23 fa 23 ef | ".#.#.| 00005e00 20 32 34 2c 4c 4f 57 58 25 3b 4c 4f 57 59 25 3b | 24,LOWX%;LOWY%;| 00005e10 48 49 47 48 58 25 3b 48 49 47 48 59 25 3b 0d 24 |HIGHX%;HIGHY%;.$| 00005e20 04 1c 4e 58 25 3d 28 58 25 2d 4c 4f 57 58 25 29 |..NX%=(X%-LOWX%)| 00005e30 2a 48 4c 25 2f 57 49 44 45 25 0d 24 0e 1c 4e 59 |*HL%/WIDE%.$..NY| 00005e40 25 3d 28 59 25 2d 4c 4f 57 59 25 29 2a 56 4c 25 |%=(Y%-LOWY%)*VL%| 00005e50 2f 48 49 47 48 25 0d 24 18 1b 4c 58 25 3d 4c 4f |/HIGH%.$..LX%=LO| 00005e60 57 58 25 2b 57 49 44 45 25 2a 4e 58 25 2f 48 4c |WX%+WIDE%*NX%/HL| 00005e70 25 0d 24 22 1b 4c 59 25 3d 4c 4f 57 59 25 2b 48 |%.$".LY%=LOWY%+H| 00005e80 49 47 48 25 2a 4e 59 25 2f 56 4c 25 0d 24 2c 29 |IGH%*NY%/VL%.$,)| 00005e90 c8 99 20 26 32 45 2c 32 35 36 2b 33 34 2c 42 49 |.. &2E,256+34,BI| 00005ea0 54 41 52 45 41 2c c3 28 53 25 29 2c 4c 58 25 2c |TAREA,.(S%),LX%,| 00005eb0 4c 59 25 2c 38 0d 24 36 08 ef 20 32 36 0d 24 40 |LY%,8.$6.. 26.$@| 00005ec0 1c 47 52 49 44 53 25 3d 47 52 49 44 53 50 52 25 |.GRIDS%=GRIDSPR%| 00005ed0 28 4e 59 25 2c 4e 58 25 29 0d 24 4a 17 55 53 45 |(NY%,NX%).$J.USE| 00005ee0 44 42 49 54 53 25 28 47 52 49 44 53 25 29 3d 30 |DBITS%(GRIDS%)=0| 00005ef0 0d 24 54 10 e7 20 47 52 49 44 53 25 3e 30 20 8c |.$T.. GRIDS%>0 .| 00005f00 0d 24 5e 18 20 43 4c 45 41 52 45 44 25 3d 43 4c |.$^. CLEARED%=CL| 00005f10 45 41 52 45 44 25 2b 31 0d 24 68 16 20 e3 20 4e |EARED%+1.$h. . N| 00005f20 31 25 3d 31 20 b8 20 4e 59 44 49 53 50 25 0d 24 |1%=1 . NYDISP%.$| 00005f30 72 19 20 20 e3 20 4e 32 25 3d 30 20 b8 20 4e 58 |r. . N2%=0 . NX| 00005f40 44 49 53 50 25 2d 31 0d 24 7c 1e 20 20 20 e7 20 |DISP%-1.$|. . | 00005f50 44 49 53 50 53 50 52 25 28 4e 31 25 2c 4e 32 25 |DISPSPR%(N1%,N2%| 00005f60 29 3d 30 20 8c 0d 24 86 20 20 20 20 20 44 49 53 |)=0 ..$. DIS| 00005f70 50 53 50 52 25 28 4e 31 25 2c 4e 32 25 29 3d 47 |PSPR%(N1%,N2%)=G| 00005f80 52 49 44 53 25 0d 24 90 6d 20 20 20 20 c8 99 20 |RIDS%.$.m .. | 00005f90 26 32 45 2c 32 35 36 2b 33 34 2c 42 49 54 41 52 |&2E,256+34,BITAR| 00005fa0 45 41 2c c3 28 47 52 49 44 53 25 29 2c 4c 4f 57 |EA,.(GRIDS%),LOW| 00005fb0 58 25 2b 57 49 44 45 25 2b 31 32 2b 4e 32 25 2a |X%+WIDE%+12+N2%*| 00005fc0 28 57 49 44 45 25 2f 48 4c 25 2b 31 32 29 2c 4c |(WIDE%/HL%+12),L| 00005fd0 4f 57 59 25 2b 48 49 47 48 25 2d 31 32 2d 4e 31 |OWY%+HIGH%-12-N1| 00005fe0 25 2a 28 48 49 47 48 25 2f 56 4c 25 2b 31 32 29 |%*(HIGH%/VL%+12)| 00005ff0 2c 38 0d 24 9a 1b 20 20 20 20 55 53 45 44 42 49 |,8.$.. USEDBI| 00006000 54 53 25 28 47 52 49 44 53 25 29 3d 31 0d 24 a4 |TS%(GRIDS%)=1.$.| 00006010 20 20 20 20 20 4e 31 25 3d 4e 59 44 49 53 50 25 | N1%=NYDISP%| 00006020 3a 20 4e 32 25 3d 4e 58 44 49 53 50 25 0d 24 ae |: N2%=NXDISP%.$.| 00006030 08 20 20 20 cd 0d 24 b8 0b 20 20 ed 20 4e 32 25 |. ..$.. . N2%| 00006040 0d 24 c2 0a 20 ed 20 4e 31 25 0d 24 cc 05 cd 0d |.$.. . N1%.$....| 00006050 24 d6 18 47 52 49 44 53 50 52 25 28 4e 59 25 2c |$..GRIDSPR%(NY%,| 00006060 4e 58 25 29 3d 53 25 0d 24 e0 18 ef 20 32 34 2c |NX%)=S%.$... 24,| 00006070 36 30 3b 37 34 30 3b 35 30 30 3b 39 39 32 3b 0d |60;740;500;992;.| 00006080 24 ea 05 da 0d 24 f4 08 ef 20 32 36 0d 24 fe 05 |$....$... 26.$..| 00006090 e1 0d 25 08 04 0d 25 12 47 f4 20 20 20 2a 20 2a |..%...%.G. * *| 000060a0 20 2a 20 2a 20 2a 20 2a 20 20 20 20 20 20 20 20 | * * * * | 000060b0 20 20 20 51 75 69 74 20 6f 72 20 72 65 73 74 61 | Quit or resta| 000060c0 72 74 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |rt | 000060d0 20 2a 20 2a 20 2a 20 2a 20 2a 20 2a 0d 25 1c 0a | * * * * * *.%..| 000060e0 dd f2 71 75 69 74 0d 25 26 16 c8 99 20 22 48 6f |..quit.%&... "Ho| 000060f0 75 72 67 6c 61 73 73 5f 4f 66 66 22 0d 25 30 17 |urglass_Off".%0.| 00006100 e7 20 9f 3c 3e 31 37 20 80 20 45 52 25 3c 3e 31 |. .<>17 . ER%<>1| 00006110 37 20 8c 0d 25 3a 06 20 f6 0d 25 44 15 20 f1 20 |7 ..%:. ..%D. . | 00006120 22 20 61 74 20 6c 69 6e 65 20 22 3b 20 9e 0d 25 |" at line "; ..%| 00006130 4e 17 20 e3 20 4e 25 3d 30 20 b8 20 35 30 30 30 |N. . N%=0 . 5000| 00006140 30 30 3a 20 ed 0d 25 58 10 20 66 69 6e 69 73 68 |00: ..%X. finish| 00006150 65 64 25 3d b9 0d 25 62 05 cc 0d 25 6c 15 20 c8 |ed%=..%b...%l. .| 00006160 99 20 22 4f 53 5f 42 79 74 65 22 2c 31 32 34 0d |. "OS_Byte",124.| 00006170 25 76 16 20 2a 43 48 41 4e 4e 45 4c 56 4f 49 43 |%v. *CHANNELVOIC| 00006180 45 20 31 20 31 0d 25 80 15 20 ef 20 32 38 2c 31 |E 1 1.%.. . 28,1| 00006190 36 2c 31 39 2c 36 36 2c 31 35 0d 25 8a 12 20 fb |6,19,66,15.%.. .| 000061a0 20 35 2c 32 35 35 2c 30 2c 32 35 35 0d 25 94 0e | 5,255,0,255.%..| 000061b0 20 fb 20 39 2c 30 2c 30 2c 30 0d 25 9e 0a 20 fb | . 9,0,0,0.%.. .| 000061c0 20 31 33 33 0d 25 a8 08 20 fb 20 39 0d 25 b2 06 | 133.%.. . 9.%..| 000061d0 20 db 0d 25 bc 1d 20 f5 3a 20 c8 97 20 58 25 2c | ..%.. .: .. X%,| 000061e0 59 25 2c 51 5a 25 3a 20 fd 20 51 5a 25 3d 30 0d |Y%,QZ%: . QZ%=0.| 000061f0 25 c6 3d 20 f1 8a 32 2c 31 29 20 22 50 72 65 73 |%.= ..2,1) "Pres| 00006200 73 20 4c 45 46 54 20 6d 6f 75 73 65 20 62 75 74 |s LEFT mouse but| 00006210 74 6f 6e 20 74 6f 20 73 74 61 72 74 20 61 6e 6f |ton to start ano| 00006220 74 68 65 72 20 6a 69 67 73 61 77 22 0d 25 d0 3b |ther jigsaw".%.;| 00006230 20 f1 8a 32 2c 33 29 20 22 50 72 65 73 73 20 52 | ..2,3) "Press R| 00006240 49 47 48 54 20 6d 6f 75 73 65 20 62 75 74 74 6f |IGHT mouse butto| 00006250 6e 20 74 6f 20 72 65 74 75 72 6e 20 74 6f 20 44 |n to return to D| 00006260 65 73 6b 74 6f 70 22 0d 25 da 25 20 f5 3a 20 c8 |esktop".%.% .: .| 00006270 97 20 58 25 2c 59 25 2c 51 5a 25 3a 20 fd 20 51 |. X%,Y%,QZ%: . Q| 00006280 5a 25 3d 31 20 84 20 51 5a 25 3d 34 0d 25 e4 12 |Z%=1 . QZ%=4.%..| 00006290 20 e7 20 45 52 25 3d 30 20 45 52 25 3d 31 0d 25 | . ER%=0 ER%=1.%| 000062a0 ee 05 cd 0d 25 f8 05 e1 0d 26 02 04 0d 26 0c 47 |....%....&...&.G| 000062b0 f4 20 20 20 2a 20 2a 20 2a 20 2a 20 2a 20 2a 20 |. * * * * * * | 000062c0 20 20 20 20 20 20 20 20 20 20 53 65 6c 65 63 74 | Select| 000062d0 20 70 75 7a 7a 6c 65 20 70 69 65 63 65 20 20 20 | puzzle piece | 000062e0 20 20 20 20 20 20 20 20 2a 20 2a 20 2a 20 2a 20 | * * * * | 000062f0 2a 20 2a 0d 26 16 0f dd f2 73 65 6c 65 63 74 62 |* *.&....selectb| 00006300 69 74 0d 26 20 24 f5 3a 20 f2 74 69 6d 65 6e 6f |it.& $.: .timeno| 00006310 77 3a 20 c8 97 20 58 25 2c 59 25 2c 5a 25 3a 20 |w: .. X%,Y%,Z%: | 00006320 fd 20 5a 25 3d 30 0d 26 2a 2b f5 3a 20 c8 97 20 |. Z%=0.&*+.: .. | 00006330 58 25 2c 59 25 2c 5a 25 3a 20 fd 20 5a 25 3e 30 |X%,Y%,Z%: . Z%>0| 00006340 20 84 20 91 20 81 20 31 30 30 20 3e 20 54 49 4d | . . . 100 > TIM| 00006350 25 0d 26 34 0c f2 74 69 6d 65 6e 6f 77 0d 26 3e |%.&4..timenow.&>| 00006360 11 e7 20 5a 25 3d 30 20 e5 20 8d 54 60 66 0d 26 |.. Z%=0 . .T`f.&| 00006370 48 1f f1 8a 33 34 2c 36 29 20 22 20 20 20 20 20 |H...34,6) " | 00006380 20 20 20 20 20 20 20 20 20 20 20 20 22 0d 26 52 | ".&R| 00006390 16 e7 20 58 25 3e 4c 4f 57 58 25 2b 57 49 44 45 |.. X%>LOWX%+WIDE| 000063a0 25 20 8c 0d 26 5c 2b 20 4e 32 25 3d 28 58 25 2d |% ..&\+ N2%=(X%-| 000063b0 4c 4f 57 58 25 2d 57 49 44 45 25 2d 31 32 29 2f |LOWX%-WIDE%-12)/| 000063c0 28 57 49 44 45 25 2f 48 4c 25 2b 31 32 29 0d 26 |(WIDE%/HL%+12).&| 000063d0 66 2d 20 4e 31 25 3d 28 4c 4f 57 59 25 2b 48 49 |f- N1%=(LOWY%+HI| 000063e0 47 48 25 2d 31 32 2d 59 25 29 2f 28 48 49 47 48 |GH%-12-Y%)/(HIGH| 000063f0 25 2f 56 4c 25 2b 31 32 29 2b 31 0d 26 70 41 20 |%/VL%+12)+1.&pA | 00006400 e7 20 4e 31 25 3c 3d 30 20 84 20 4e 31 25 3e 4e |. N1%<=0 . N1%>N| 00006410 59 44 49 53 50 25 20 84 20 4e 32 25 3c 30 20 84 |YDISP% . N2%<0 .| 00006420 20 4e 32 25 3e 3d 4e 58 44 49 53 50 25 20 f2 65 | N2%>=NXDISP% .e| 00006430 72 72 6f 72 3a 20 e5 20 8d 54 60 66 0d 26 7a 19 |rror: . .T`f.&z.| 00006440 20 53 25 3d 44 49 53 50 53 50 52 25 28 4e 31 25 | S%=DISPSPR%(N1%| 00006450 2c 4e 32 25 29 0d 26 84 1a 20 e7 20 53 25 3d 30 |,N2%).&.. . S%=0| 00006460 20 f2 65 72 72 6f 72 3a 20 e5 20 8d 54 60 66 0d | .error: . .T`f.| 00006470 26 8e 18 20 43 4c 45 41 52 45 44 25 3d 43 4c 45 |&.. CLEARED%=CLE| 00006480 41 52 45 44 25 2d 31 0d 26 98 0c 20 4d 4f 52 45 |ARED%-1.&.. MORE| 00006490 25 3d 30 0d 26 a2 13 20 e3 20 4e 25 3d 31 20 b8 |%=0.&.. . N%=1 .| 000064a0 20 42 49 54 53 25 0d 26 ac 29 20 20 e7 20 55 53 | BITS%.&.) . US| 000064b0 45 44 42 49 54 53 25 28 4e 25 29 3d 30 20 4d 4f |EDBITS%(N%)=0 MO| 000064c0 52 45 25 3d 31 3a 20 4e 25 3d 42 49 54 53 25 0d |RE%=1: N%=BITS%.| 000064d0 26 b6 09 20 ed 20 4e 25 0d 26 c0 10 20 e7 20 4d |&.. . N%.&.. . M| 000064e0 4f 52 45 25 3d 30 20 8c 0d 26 ca 9a 20 20 ef 20 |ORE%=0 ..&.. . | 000064f0 32 34 2c 4c 4f 57 58 25 2b 57 49 44 45 25 2b 31 |24,LOWX%+WIDE%+1| 00006500 32 2b 4e 32 25 2a 28 57 49 44 45 25 2f 48 4c 25 |2+N2%*(WIDE%/HL%| 00006510 2b 31 32 29 3b 4c 4f 57 59 25 2b 48 49 47 48 25 |+12);LOWY%+HIGH%| 00006520 2d 31 32 2d 4e 31 25 2a 28 48 49 47 48 25 2f 56 |-12-N1%*(HIGH%/V| 00006530 4c 25 2b 31 32 29 3b 4c 4f 57 58 25 2b 57 49 44 |L%+12);LOWX%+WID| 00006540 45 25 2b 34 2b 28 4e 32 25 2b 31 29 2a 28 57 49 |E%+4+(N2%+1)*(WI| 00006550 44 45 25 2f 48 4c 25 2b 31 32 29 3b 4c 4f 57 59 |DE%/HL%+12);LOWY| 00006560 25 2b 48 49 47 48 25 2d 31 36 2d 28 4e 31 25 2d |%+HIGH%-16-(N1%-| 00006570 31 29 2a 28 48 49 47 48 25 2f 56 4c 25 2b 31 32 |1)*(HIGH%/VL%+12| 00006580 29 3b 0d 26 d4 07 20 20 da 0d 26 de 0a 20 20 ef |);.&.. ..&.. .| 00006590 20 32 36 0d 26 e8 19 20 20 44 49 53 50 53 50 52 | 26.&.. DISPSPR| 000065a0 25 28 4e 31 25 2c 4e 32 25 29 3d 30 0d 26 f2 06 |%(N1%,N2%)=0.&..| 000065b0 20 cc 0d 26 fc 07 20 20 f5 0d 27 06 13 20 20 20 | ..&.. ..'.. | 000065c0 53 44 25 3d b3 28 42 49 54 53 25 29 0d 27 10 18 |SD%=.(BITS%).'..| 000065d0 20 20 fd 20 55 53 45 44 42 49 54 53 25 28 53 44 | . USEDBITS%(SD| 000065e0 25 29 3d 30 0d 27 1a 16 20 20 55 53 45 44 42 49 |%)=0.'.. USEDBI| 000065f0 54 53 25 28 53 44 25 29 3d 31 0d 27 24 1b 20 20 |TS%(SD%)=1.'$. | 00006600 44 49 53 50 53 50 52 25 28 4e 31 25 2c 4e 32 25 |DISPSPR%(N1%,N2%| 00006610 29 3d 53 44 25 0d 27 2e 69 20 20 20 c8 99 20 26 |)=SD%.'.i .. &| 00006620 32 45 2c 32 35 36 2b 33 34 2c 42 49 54 41 52 45 |2E,256+34,BITARE| 00006630 41 2c c3 28 53 44 25 29 2c 4c 4f 57 58 25 2b 57 |A,.(SD%),LOWX%+W| 00006640 49 44 45 25 2b 31 32 2b 4e 32 25 2a 28 57 49 44 |IDE%+12+N2%*(WID| 00006650 45 25 2f 48 4c 25 2b 31 32 29 2c 4c 4f 57 59 25 |E%/HL%+12),LOWY%| 00006660 2b 48 49 47 48 25 2d 31 32 2d 4e 31 25 2a 28 48 |+HIGH%-12-N1%*(H| 00006670 49 47 48 25 2f 56 4c 25 2b 31 32 29 2c 38 0d 27 |IGH%/VL%+12),8.'| 00006680 38 06 20 cd 0d 27 42 05 cc 0d 27 4c 1d 20 4e 32 |8. ..'B...'L. N2| 00006690 25 3d 28 58 25 2d 4c 4f 57 58 25 29 2a 48 4c 25 |%=(X%-LOWX%)*HL%| 000066a0 2f 57 49 44 45 25 0d 27 56 1d 20 4e 31 25 3d 28 |/WIDE%.'V. N1%=(| 000066b0 59 25 2d 4c 4f 57 59 25 29 2a 56 4c 25 2f 48 49 |Y%-LOWY%)*VL%/HI| 000066c0 47 48 25 0d 27 60 2b 20 e7 20 4e 31 25 3e 3d 56 |GH%.'`+ . N1%>=V| 000066d0 4c 25 20 84 20 4e 32 25 3e 3d 48 4c 25 20 8c 20 |L% . N2%>=HL% . | 000066e0 f2 65 72 72 6f 72 3a 20 e5 20 8d 54 60 66 0d 27 |.error: . .T`f.'| 000066f0 6a 19 20 53 25 3d 47 52 49 44 53 50 52 25 28 4e |j. S%=GRIDSPR%(N| 00006700 31 25 2c 4e 32 25 29 0d 27 74 1a 20 e7 20 53 25 |1%,N2%).'t. . S%| 00006710 3d 30 20 f2 65 72 72 6f 72 3a 20 e5 20 8d 54 60 |=0 .error: . .T`| 00006720 66 0d 27 7e 18 20 47 52 49 44 53 50 52 25 28 4e |f.'~. GRIDSPR%(N| 00006730 31 25 2c 4e 32 25 29 3d 30 0d 27 88 6a 20 ef 20 |1%,N2%)=0.'.j . | 00006740 32 34 2c 4c 4f 57 58 25 2b 34 2b 4e 32 25 2a 57 |24,LOWX%+4+N2%*W| 00006750 49 44 45 25 2f 48 4c 25 3b 4c 4f 57 59 25 2b 34 |IDE%/HL%;LOWY%+4| 00006760 2b 4e 31 25 2a 48 49 47 48 25 2f 56 4c 25 3b 4c |+N1%*HIGH%/VL%;L| 00006770 4f 57 58 25 2d 34 2b 28 4e 32 25 2b 31 29 2a 57 |OWX%-4+(N2%+1)*W| 00006780 49 44 45 25 2f 48 4c 25 3b 4c 4f 57 59 25 2d 34 |IDE%/HL%;LOWY%-4| 00006790 2b 28 4e 31 25 2b 31 29 2a 48 49 47 48 25 2f 56 |+(N1%+1)*HIGH%/V| 000067a0 4c 25 3b 0d 27 92 06 20 da 0d 27 9c 09 20 ef 20 |L%;.'.. ..'.. . | 000067b0 32 36 0d 27 a6 05 cd 0d 27 b0 30 58 4f 46 46 25 |26.'....'.0XOFF%| 000067c0 3d 28 32 34 30 2d 57 49 44 45 25 2f 48 4c 25 29 |=(240-WIDE%/HL%)| 000067d0 2f 32 3a 20 e7 20 58 4f 46 46 25 3c 30 20 8c 20 |/2: . XOFF%<0 . | 000067e0 58 4f 46 46 25 3d 30 0d 27 ba 30 59 4f 46 46 25 |XOFF%=0.'.0YOFF%| 000067f0 3d 28 32 34 30 2d 48 49 47 48 25 2f 56 4c 25 29 |=(240-HIGH%/VL%)| 00006800 2f 32 3a 20 e7 20 59 4f 46 46 25 3c 30 20 8c 20 |/2: . YOFF%<0 . | 00006810 59 4f 46 46 25 3d 30 0d 27 c4 34 c8 99 20 26 32 |YOFF%=0.'.4.. &2| 00006820 45 2c 32 35 36 2b 33 34 2c 42 49 54 41 52 45 41 |E,256+34,BITAREA| 00006830 2c c3 28 53 25 29 2c 36 30 2b 58 4f 46 46 25 2c |,.(S%),60+XOFF%,| 00006840 37 34 30 2b 59 4f 46 46 25 2c 38 0d 27 ce 1b f1 |740+YOFF%,8.'...| 00006850 8a 34 2c 30 29 20 22 53 45 4c 45 43 54 45 44 20 |.4,0) "SELECTED | 00006860 50 49 45 43 45 22 0d 27 d8 05 e1 0d 27 e2 04 0d |PIECE".'....'...| 00006870 27 ec 47 f4 20 20 20 2a 20 2a 20 2a 20 2a 20 2a |'.G. * * * * *| 00006880 20 2a 20 20 20 20 20 20 44 69 73 70 6c 61 79 20 | * Display | 00006890 73 70 72 69 74 65 20 6f 72 20 27 4d 6f 64 65 27 |sprite or 'Mode'| 000068a0 20 62 6f 78 20 20 20 20 20 20 20 2a 20 2a 20 2a | box * * *| 000068b0 20 2a 20 2a 20 2a 0d 27 f6 0f dd f2 73 70 72 69 | * * *.'....spri| 000068c0 74 65 62 6f 78 0d 28 00 44 c8 99 20 26 32 45 2c |tebox.(.D.. &2E,| 000068d0 32 35 36 2b 31 33 2c 53 50 41 52 45 41 2c 53 50 |256+13,SPAREA,SP| 000068e0 52 4e 41 4d 45 2c 31 32 2c 53 25 20 b8 20 52 30 |RNAME,12,S% . R0| 000068f0 25 2c 52 31 25 2c 52 32 25 2c 52 33 25 2c 52 34 |%,R1%,R2%,R3%,R4| 00006900 25 2c 52 35 25 2c 52 36 25 0d 28 0a 0b 53 50 52 |%,R5%,R6%.(..SPR| 00006910 24 3d 22 22 0d 28 14 12 e3 20 43 25 3d 30 20 b8 |$="".(... C%=0 .| 00006920 20 52 33 25 2d 31 0d 28 1e 1e 20 f1 8a 32 31 2b | R3%-1.(.. ..21+| 00006930 43 25 2c 4c 25 29 20 bd 28 53 50 52 4e 41 4d 45 |C%,L%) .(SPRNAME| 00006940 3f 43 25 29 0d 28 28 1c 20 53 50 52 24 3d 53 50 |?C%).((. SPR$=SP| 00006950 52 24 2b bd 28 53 50 52 4e 41 4d 45 3f 43 25 29 |R$+.(SPRNAME?C%)| 00006960 0d 28 32 08 ed 20 43 25 0d 28 3c 3b c8 99 20 26 |.(2.. C%.(<;.. &| 00006970 32 45 2c 32 35 36 2b 34 30 2c 53 50 41 52 45 41 |2E,256+40,SPAREA| 00006980 2c 53 50 52 24 20 b8 20 52 30 25 2c 52 31 25 2c |,SPR$ . R0%,R1%,| 00006990 52 32 25 2c 52 33 25 2c 52 34 25 2c 52 35 25 2c |R2%,R3%,R4%,R5%,| 000069a0 52 36 25 0d 28 46 20 e7 20 52 36 25 3d 31 30 20 |R6%.(F . R6%=10 | 000069b0 84 20 52 36 25 3d 31 33 20 84 20 52 36 25 3d 31 |. R6%=13 . R6%=1| 000069c0 35 20 8c 0d 28 50 0e 20 f1 8a 34 35 2c 4c 25 29 |5 ..(P. ..45,L%)| 000069d0 3b 0d 28 5a 0a 20 fb 20 31 34 33 0d 28 64 0a 20 |;.(Z. . 143.(d. | 000069e0 e6 20 31 34 33 0d 28 6e 2b 20 ef 20 32 34 2c 37 |. 143.(n+ . 24,7| 000069f0 30 30 3b 28 33 30 2d 4c 25 29 2a 33 32 3b 38 35 |00;(30-L%)*32;85| 00006a00 30 3b 28 33 30 2d 4c 25 29 2a 33 32 2b 39 36 3b |0;(30-L%)*32+96;| 00006a10 0d 28 78 06 20 da 0d 28 82 13 20 f1 20 22 4d 4f |.(x. ..(.. . "MO| 00006a20 44 45 20 22 3b 20 52 36 25 0d 28 8c 09 20 ef 20 |DE "; R6%.(.. . | 00006a30 32 36 0d 28 96 0a 20 fb 20 31 34 30 0d 28 a0 0a |26.(.. . 140.(..| 00006a40 20 e6 20 31 34 30 0d 28 aa 0d 20 f1 8a 34 35 2c | . 140.(.. ..45,| 00006a50 4c 25 29 0d 28 b4 05 cc 0d 28 be 13 20 53 50 52 |L%).(....(.. SPR| 00006a60 57 49 44 45 25 3d 52 33 25 2a 32 0d 28 c8 13 20 |WIDE%=R3%*2.(.. | 00006a70 53 50 52 48 49 47 48 25 3d 52 34 25 2a 34 0d 28 |SPRHIGH%=R4%*4.(| 00006a80 d2 41 20 53 43 41 4c 45 21 30 3d 31 35 30 3a 20 |.A SCALE!0=150: | 00006a90 53 43 41 4c 45 21 34 3d 39 36 3a 20 53 43 41 4c |SCALE!4=96: SCAL| 00006aa0 45 21 38 3d 53 50 52 57 49 44 45 25 3a 20 53 43 |E!8=SPRWIDE%: SC| 00006ab0 41 4c 45 21 31 32 3d 53 50 52 48 49 47 48 25 0d |ALE!12=SPRHIGH%.| 00006ac0 28 dc 3e 20 c8 99 20 26 32 45 2c 32 35 36 2b 35 |(.> .. &2E,256+5| 00006ad0 32 2c 53 50 41 52 45 41 2c 53 50 52 24 2c 37 30 |2,SPAREA,SPR$,70| 00006ae0 30 2c 28 33 30 2d 4c 25 29 2a 33 32 2c 38 2c 53 |0,(30-L%)*32,8,S| 00006af0 43 41 4c 45 2c 43 4f 4c 54 41 42 4c 45 0d 28 e6 |CALE,COLTABLE.(.| 00006b00 05 cd 0d 28 f0 0b 4c 25 3d 4c 25 2b 34 0d 28 fa |...(..L%=L%+4.(.| 00006b10 0b 53 25 3d 53 25 2b 31 0d 29 04 05 e1 0d 29 0e |.S%=S%+1.)....).| 00006b20 04 0d 29 18 47 f4 20 20 20 2a 20 2a 20 2a 20 2a |..).G. * * * *| 00006b30 20 2a 20 2a 20 20 53 65 74 20 75 70 20 63 6f 6e | * * Set up con| 00006b40 73 74 61 6e 74 73 20 66 72 6f 6d 20 73 70 72 69 |stants from spri| 00006b50 74 65 20 64 65 74 61 69 6c 73 20 20 20 2a 20 2a |te details * *| 00006b60 20 2a 20 2a 20 2a 20 2a 0d 29 22 10 dd f2 73 70 | * * * *.)"...sp| 00006b70 72 69 74 65 69 6e 66 6f 0d 29 2c 3b c8 99 20 26 |riteinfo.),;.. &| 00006b80 32 45 2c 32 35 36 2b 34 30 2c 53 50 41 52 45 41 |2E,256+40,SPAREA| 00006b90 2c 53 50 52 24 20 b8 20 52 30 25 2c 52 31 25 2c |,SPR$ . R0%,R1%,| 00006ba0 52 32 25 2c 52 33 25 2c 52 34 25 2c 52 35 25 2c |R2%,R3%,R4%,R5%,| 00006bb0 52 36 25 0d 29 36 0c c8 8e 20 52 36 25 20 ca 0d |R6%.)6... R6% ..| 00006bc0 29 40 19 20 c9 20 32 2c 35 2c 31 30 3a 20 52 45 |)@. . 2,5,10: RE| 00006bd0 53 46 41 43 54 25 3d 38 0d 29 4a 1b 20 c9 20 31 |SFACT%=8.)J. . 1| 00006be0 2c 34 2c 39 2c 31 33 3a 20 52 45 53 46 41 43 54 |,4,9,13: RESFACT| 00006bf0 25 3d 34 0d 29 54 11 20 7f 20 52 45 53 46 41 43 |%=4.)T. . RESFAC| 00006c00 54 25 3d 32 0d 29 5e 05 cb 0d 29 68 0d 43 4f 4c |T%=2.)^...)h.COL| 00006c10 53 31 36 25 3d 30 0d 29 72 0a 4d 31 35 25 3d 30 |S16%=0.)r.M15%=0| 00006c20 0d 29 7c 0c c8 8e 20 52 36 25 20 ca 0d 29 86 18 |.)|... R6% ..)..| 00006c30 20 c9 20 32 2c 39 2c 31 32 3a 20 43 4f 4c 53 31 | . 2,9,12: COLS1| 00006c40 36 25 3d 31 0d 29 90 17 20 c9 20 31 30 2c 31 33 |6%=1.).. . 10,13| 00006c50 2c 31 35 3a 20 4d 31 35 25 3d 31 0d 29 9a 05 cb |,15: M15%=1.)...| 00006c60 0d 29 a4 0e e7 20 4d 31 35 25 3d 31 20 8c 0d 29 |.)... M15%=1 ..)| 00006c70 ae 08 20 eb 31 35 0d 29 b8 1b 20 ef 20 32 33 2c |.. .15.).. . 23,| 00006c80 31 2c 30 2c 30 2c 30 2c 30 2c 30 2c 30 2c 30 2c |1,0,0,0,0,0,0,0,| 00006c90 30 0d 29 c2 0f 20 43 4f 4c 54 41 42 4c 45 3d 30 |0.).. COLTABLE=0| 00006ca0 0d 29 cc 05 cd 0d 29 d6 18 c8 99 20 26 32 45 2c |.)....).... &2E,| 00006cb0 32 35 36 2b 39 2c 42 49 54 41 52 45 41 0d 29 e0 |256+9,BITAREA.).| 00006cc0 15 53 50 52 50 4c 4f 54 4d 31 32 25 3d 52 33 25 |.SPRPLOTM12%=R3%| 00006cd0 2a 32 0d 29 ea 19 53 50 52 57 49 44 45 25 3d 52 |*2.)..SPRWIDE%=R| 00006ce0 33 25 2a 52 45 53 46 41 43 54 25 0d 29 f4 12 53 |3%*RESFACT%.)..S| 00006cf0 50 52 48 49 47 48 25 3d 52 34 25 2a 34 0d 29 fe |PRHIGH%=R4%*4.).| 00006d00 2d e7 20 53 50 52 48 49 47 48 25 2f 53 50 52 57 |-. SPRHIGH%/SPRW| 00006d10 49 44 45 25 20 3e 20 50 49 43 48 49 47 48 25 2f |IDE% > PICHIGH%/| 00006d20 50 49 43 57 49 44 45 25 20 8c 0d 2a 08 25 20 57 |PICWIDE% ..*.% W| 00006d30 49 44 45 25 3d 50 49 43 48 49 47 48 25 2a 53 50 |IDE%=PICHIGH%*SP| 00006d40 52 57 49 44 45 25 2f 53 50 52 48 49 47 48 25 0d |RWIDE%/SPRHIGH%.| 00006d50 2a 12 13 20 48 49 47 48 25 3d 50 49 43 48 49 47 |*.. HIGH%=PICHIG| 00006d60 48 25 0d 2a 1c 24 20 54 57 25 3d 54 49 4e 59 48 |H%.*.$ TW%=TINYH| 00006d70 49 47 48 25 2a 53 50 52 57 49 44 45 25 2f 53 50 |IGH%*SPRWIDE%/SP| 00006d80 52 48 49 47 48 25 0d 2a 26 12 20 54 48 25 3d 54 |RHIGH%.*&. TH%=T| 00006d90 49 4e 59 48 49 47 48 25 0d 2a 30 05 cc 0d 2a 3a |INYHIGH%.*0...*:| 00006da0 25 20 48 49 47 48 25 3d 50 49 43 57 49 44 45 25 |% HIGH%=PICWIDE%| 00006db0 2a 53 50 52 48 49 47 48 25 2f 53 50 52 57 49 44 |*SPRHIGH%/SPRWID| 00006dc0 45 25 0d 2a 44 13 20 57 49 44 45 25 3d 50 49 43 |E%.*D. WIDE%=PIC| 00006dd0 57 49 44 45 25 0d 2a 4e 24 20 54 48 25 3d 54 49 |WIDE%.*N$ TH%=TI| 00006de0 4e 59 57 49 44 45 25 2a 53 50 52 48 49 47 48 25 |NYWIDE%*SPRHIGH%| 00006df0 2f 53 50 52 57 49 44 45 25 0d 2a 58 12 20 54 57 |/SPRWIDE%.*X. TW| 00006e00 25 3d 54 49 4e 59 57 49 44 45 25 0d 2a 62 06 20 |%=TINYWIDE%.*b. | 00006e10 cd 0d 2a 6c 05 f5 0d 2a 76 23 20 48 4c 25 3d b6 |..*l...*v# HL%=.| 00006e20 28 42 49 54 53 25 2a 53 50 52 57 49 44 45 25 2f |(BITS%*SPRWIDE%/| 00006e30 53 50 52 48 49 47 48 25 29 0d 2a 80 24 20 e7 20 |SPRHIGH%).*.$ . | 00006e40 48 4c 25 3e 30 20 8c 20 56 4c 25 3d 42 49 54 53 |HL%>0 . VL%=BITS| 00006e50 25 2f 48 4c 25 20 8b 20 56 4c 25 3d 31 0d 2a 8a |%/HL% . VL%=1.*.| 00006e60 22 20 e7 20 48 4c 25 3c 32 20 84 20 56 4c 25 3c |" . HL%<2 . VL%<| 00006e70 32 20 42 49 54 53 25 3d 42 49 54 53 25 2b 31 0d |2 BITS%=BITS%+1.| 00006e80 2a 94 15 fd 20 48 4c 25 3e 3d 32 20 80 20 56 4c |*... HL%>=2 . VL| 00006e90 25 3e 3d 32 0d 2a 9e 32 e7 20 53 50 52 24 3d 22 |%>=2.*.2. SPR$="| 00006ea0 73 70 72 70 61 6c 32 35 36 22 20 80 20 42 49 54 |sprpal256" . BIT| 00006eb0 53 25 3d 32 35 30 20 8c 20 48 4c 25 3d 31 36 3a |S%=250 . HL%=16:| 00006ec0 56 4c 25 3d 31 36 0d 2a a8 05 f5 0d 2a b2 12 20 |VL%=16.*....*.. | 00006ed0 42 49 54 53 25 3d 48 4c 25 2a 56 4c 25 0d 2a bc |BITS%=HL%*VL%.*.| 00006ee0 1a 20 e7 20 42 49 54 53 25 3e 32 35 36 20 48 4c |. . BITS%>256 HL| 00006ef0 25 3d 48 4c 25 2d 31 0d 2a c6 10 fd 20 42 49 54 |%=HL%-1.*... BIT| 00006f00 53 25 3c 3d 32 35 36 0d 2a d0 17 e7 20 48 4c 25 |S%<=256.*... HL%| 00006f10 3e 33 32 20 84 20 56 4c 25 3e 33 32 20 8c 0d 2a |>32 . VL%>32 ..*| 00006f20 da 0a 20 fb 20 31 2c 39 0d 2a e4 08 20 fb 20 31 |.. . 1,9.*.. . 1| 00006f30 0d 2a ee 0a 20 fb 20 31 33 35 0d 2a f8 2d 20 f1 |.*.. . 135.*.- .| 00006f40 8a 32 35 2c 32 38 29 20 22 53 50 52 49 54 45 20 |.25,28) "SPRITE | 00006f50 50 52 4f 50 4f 52 54 49 4f 4e 53 20 55 4e 53 55 |PROPORTIONS UNSU| 00006f60 49 54 41 42 4c 45 22 0d 2b 02 0b 20 45 52 25 3d |ITABLE".+.. ER%=| 00006f70 31 37 0d 2b 0c 0a 20 f2 71 75 69 74 0d 2b 16 05 |17.+.. .quit.+..| 00006f80 cd 0d 2b 20 05 e1 0d 2b 2a 04 0d 2b 34 0b dd f2 |..+ ...+*..+4...| 00006f90 73 74 61 72 74 0d 2b 3e 07 eb 31 32 0d 2b 48 08 |start.+>..12.+H.| 00006fa0 c8 97 20 ee 0d 2b 52 16 43 4f 4c 54 41 42 4c 45 |.. ..+R.COLTABLE| 00006fb0 3d 43 4f 4c 54 41 42 41 44 25 0d 2b 5c 13 e7 20 |=COLTABAD%.+\.. | 00006fc0 ac 20 53 41 4d 45 46 49 4c 45 25 20 8c 0d 2b 66 |. SAMEFILE% ..+f| 00006fd0 06 20 f5 0d 2b 70 07 20 20 db 0d 2b 7a 1c 20 20 |. ..+p. ..+z. | 00006fe0 f5 3a 20 c8 97 20 58 25 2c 59 25 2c 5a 25 3a 20 |.: .. X%,Y%,Z%: | 00006ff0 fd 20 5a 25 3d 30 0d 2b 84 3c 20 20 f2 66 69 6c |. Z%=0.+.< .fil| 00007000 65 6e 61 6d 65 20 20 20 20 20 20 20 20 20 20 20 |ename | 00007010 20 20 20 20 20 20 20 20 20 20 3a f4 20 20 47 65 | :. Ge| 00007020 74 20 73 70 72 69 74 65 20 66 69 6c 65 20 6e 61 |t sprite file na| 00007030 6d 65 0d 2b 8e 12 20 20 e7 20 4e 46 25 3d 2d 31 |me.+.. . NF%=-1| 00007040 20 8c 20 e1 0d 2b 98 37 20 20 f2 69 6e 69 74 69 | . ..+.7 .initi| 00007050 61 6c 69 73 65 20 20 20 20 20 20 20 20 20 20 20 |alise | 00007060 20 20 20 20 20 20 20 20 3a f4 20 20 52 65 61 64 | :. Read| 00007070 20 66 69 6c 65 20 69 6e 66 6f 2e 0d 2b a2 11 20 | file info..+.. | 00007080 fd 20 46 49 4c 45 46 4f 55 4e 44 25 0d 2b ac 05 |. FILEFOUND%.+..| 00007090 cd 0d 2b b6 0f 53 41 4d 45 46 49 4c 45 25 3d 30 |..+..SAMEFILE%=0| 000070a0 0d 2b c0 3b f2 64 65 66 70 61 6c 20 20 20 20 20 |.+.;.defpal | 000070b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000070c0 20 20 20 20 3a f4 20 20 53 65 74 20 64 65 66 61 | :. Set defa| 000070d0 75 6c 74 20 70 61 6c 65 74 74 65 0d 2b ca 3f f2 |ult palette.+.?.| 000070e0 64 69 73 70 73 70 72 69 74 65 73 20 20 20 20 20 |dispsprites | 000070f0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3a | :| 00007100 f4 20 20 44 69 73 70 6c 61 79 20 73 70 72 69 74 |. Display sprit| 00007110 65 73 20 69 6e 20 66 69 6c 65 0d 2b d4 44 f2 62 |es in file.+.D.b| 00007120 69 74 73 20 20 20 20 20 20 20 20 20 20 20 20 20 |its | 00007130 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3a f4 | :.| 00007140 20 20 47 65 74 20 6e 75 6d 62 65 72 20 6f 66 20 | Get number of | 00007150 62 69 74 73 20 69 6e 20 70 75 7a 7a 6c 65 0d 2b |bits in puzzle.+| 00007160 de 47 f2 73 70 72 69 74 65 69 6e 66 6f 20 20 20 |.G.spriteinfo | 00007170 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00007180 20 20 3a f4 20 20 53 65 74 20 63 6f 6e 73 74 61 | :. Set consta| 00007190 6e 74 73 20 66 72 6f 6d 20 73 70 72 69 74 65 20 |nts from sprite | 000071a0 69 6e 66 6f 2e 0d 2b e8 10 e7 20 45 52 25 3d 31 |info..+... ER%=1| 000071b0 37 20 8c 20 e1 0d 2b f2 41 f2 64 69 76 69 64 65 |7 . ..+.A.divide| 000071c0 73 70 72 69 74 65 20 20 20 20 20 20 20 20 20 20 |sprite | 000071d0 20 20 20 20 20 20 20 20 20 3a f4 20 20 44 69 76 | :. Div| 000071e0 69 64 65 20 73 70 72 69 74 65 20 69 6e 74 6f 20 |ide sprite into | 000071f0 70 69 65 63 65 73 0d 2b fc 3d f2 64 69 73 70 6c |pieces.+.=.displ| 00007200 61 79 62 69 74 73 20 20 20 20 20 20 20 20 20 20 |aybits | 00007210 20 20 20 20 20 20 20 20 20 20 3a f4 20 20 44 69 | :. Di| 00007220 73 70 6c 61 79 20 75 6e 75 73 65 64 20 70 69 65 |splay unused pie| 00007230 63 65 73 0d 2c 06 10 e7 20 45 52 25 3d 31 37 20 |ces.,... ER%=17 | 00007240 8c 20 e1 0d 2c 10 08 c8 97 20 ee 0d 2c 1a 09 fb |. ..,.... ..,...| 00007250 20 31 33 30 0d 2c 24 1a f1 8a 33 32 2c 32 29 20 | 130.,$...32,2) | 00007260 22 54 61 72 67 65 74 20 74 69 6d 65 3a 22 0d 2c |"Target time:".,| 00007270 2e 1a f1 8a 33 32 2c 34 29 20 22 54 69 6d 65 20 |....32,4) "Time | 00007280 73 6f 20 66 61 72 3a 22 0d 2c 38 46 f2 63 6f 6e |so far:".,8F.con| 00007290 76 74 69 6d 65 28 54 41 52 47 45 54 25 29 20 20 |vtime(TARGET%) | 000072a0 20 20 20 20 20 20 20 20 20 20 20 20 3a f4 20 20 | :. | 000072b0 43 6f 6e 76 65 72 74 20 73 65 63 6f 6e 64 73 20 |Convert seconds | 000072c0 74 6f 20 74 69 6d 65 20 73 74 72 69 6e 67 0d 2c |to time string.,| 000072d0 42 14 f1 8a 34 35 2c 32 29 20 54 49 4d 45 53 54 |B...45,2) TIMEST| 000072e0 52 24 0d 2c 4c 07 d1 3d 30 0d 2c 56 05 e1 0d 2c |R$.,L..=0.,V...,| 000072f0 60 04 0d 2c 6a 47 f4 20 20 20 2a 20 2a 20 2a 20 |`..,jG. * * * | 00007300 2a 20 2a 20 2a 20 20 20 20 20 20 20 20 20 20 20 |* * * | 00007310 44 69 73 70 6c 61 79 20 74 69 6d 65 20 73 6f 20 |Display time so | 00007320 66 61 72 20 20 20 20 20 20 20 20 20 20 20 2a 20 |far * | 00007330 2a 20 2a 20 2a 20 2a 20 2a 0d 2c 74 0d dd f2 74 |* * * * *.,t...t| 00007340 69 6d 65 6e 6f 77 0d 2c 7e 0e 54 49 4d 25 3d 91 |imenow.,~.TIM%=.| 00007350 2f 31 30 30 0d 2c 88 13 f2 63 6f 6e 76 74 69 6d |/100.,...convtim| 00007360 65 28 54 49 4d 25 29 0d 2c 92 14 f1 8a 34 35 2c |e(TIM%).,....45,| 00007370 34 29 20 54 49 4d 45 53 54 52 24 0d 2c 9c 05 e1 |4) TIMESTR$.,...| 00007380 0d ff |..| 00007382