Home » Archimedes archive » Archimedes World » AW-1991-12.adf » December91 » !AWDec91/Goodies/Shanghai/!Shanghai/REMedImage
!AWDec91/Goodies/Shanghai/!Shanghai/REMedImage
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-1991-12.adf » December91 |
Filename: | !AWDec91/Goodies/Shanghai/!Shanghai/REMedImage |
Read OK: | ✔ |
File size: | 4B78 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
10 REM > REMedImage fully REMmed library copy of 20 REM > !RunImage Shanghai WIMP patience game 2.00 30 April 1991 30 REM By Wynand Thompson LEN Archimedes World December 1991 40 50 REM * VARIABLES * mostly mnemonic but resident integer variables 60 REM * are used where necessary - these are: F% = file handle, so 70 REM * file(s) can be properly closed in case of error; M% = temp 80 REM * store for move% (move no.) whilst in replay; W% = wimpflag 90 REM * for instantaneous window drags, used in order to restrain 100 REM * pointer inside replay window; I%,J%,L% = loop control variables 110 REM * and temp store whilst in PROCS. * ARRAYS * Three arrays are 120 REM * used - S%() stores all information required for the creation 130 REM * & deletion of tile icons; H%() stores matching tile numbers 140 REM * in order to rapidly find tiles for 'show moves'; M%() keeps a 150 REM * record of all moves played to enable program to replay game. 160 170 REM * Handle non-WIMP errors. 180 190 F%=0:ONERROR:PROCerror:END 200 210 REM * Initialise program. 220 230 PROCinit 240 250 REM * Handle WIMP errors. 260 270 ONERROR:IFFNwimperror END 280 290 REM * Main WIMP poll loop. 300 310 REPEAT 320 SYS "Wimp_Poll",&1823,wblk% TO r% 330 CASE r% OF 340 WHEN 2: SYS "Wimp_OpenWindow",,wblk%:PROCrestrict(0) 350 WHEN 3: SYS "Wimp_CloseWindow",,wblk% 360 IF!wblk%=Sh% !wblk%=rules%:SYS "Wimp_CloseWindow",,wblk% 370 WHEN 4: PROCrestrict(1) 380 WHEN 6: PROCbuttons 390 WHEN 7: PROCDragSave 400 WHEN 8: IFNOTFNkey SYS"Wimp_ProcessKey",wblk%!24 410 WHEN 9: PROCdecode 420 WHEN 17,18: PROCreceive 430 WHEN 19: SYS "OS_File",6,wblk%+44 440 ERROR255,"Data transfer failed: receiver died" 450 ENDCASE 460 UNTILquit%=TRUE 470 PROCclose 480 END 490 500 REM * Handle messages received via WIMP. 510 520 DEFPROCreceive 530 CASE wblk%!16 OF 540 WHEN 0: quit%=TRUE 550 WHEN 2: PROCsave 560 WHEN 3,5: IFwblk%!12=0 ANDwblk%!40=&000 PROCload 570 ENDCASE 580 ENDPROC 590 600 REM * WIMP error; close all our open files, then continue or quit? 610 620 DEFFNwimperror 630 IFF%>0 CLOSE#F%:F%=0 640 !wblk%=ERR:$(wblk%+4)=REPORT$+" (internal error code "+STR$ERL+")"+CHR$0 650 SYS "Wimp_ReportError",wblk%,3,"Shanghai" TO ,r 660 IFr=2 PROCclose:=TRUE ELSE:=FALSE 670 680 REM * Close down !Shanghai. 690 700 DEFPROCclose 710 $wblk%="TASK" 720 SYS "Wimp_CloseDown",task%,!wblk% 730 ENDPROC 740 750 REM * non-WIMP error; close all our open files, report error, quit. 760 770 DEFPROCerror 780 ONERROROFF 790 SYS "Wimp_CloseTemplate":SYS "Wimp_CloseDown" 800 IFF%>0 CLOSE#F%:F%=0 810 REPORT:PRINT" at line ";ERL 820 ENDPROC 830 840 REM * Initialise WIMP. DIM memory blocks & arrays. Initialise main 850 REM * variables. Clear sprite area & load sprites. Load window 860 REM * templates & create windows for info, game, rules, replay, status 870 REM * & save. Load menu data. Initialise main array, S%(). Create 880 REM * icons in 'rules' window. If started by double-click or drag on 890 REM * saved game then load data, update game, window & variables and 900 REM * open window, else shuffle & deal. Game icon to icon bar. 910 920 DEFPROCinit 930 SYS "Wimp_Initialise",200,&4B534154,"Shanghai" TO ,task% 940 DIM wblk% &1160,icn% &C04,sp% &C448,menu% 252,S%(144,5),H%(35,3),M%(71,1) 950 sp%!0=&C448:sp%!4=0:sp%!8=16:sp%!12=16 960 SYS "OS_SpriteOp",265,sp% 970 SYS "OS_SpriteOp",266,sp%,"<Shanghai$Dir>.Sprites" 980 SYS "Wimp_OpenTemplate",,"<Shanghai$Dir>.Templates" 990 x%=icn% 1000 info%=FNwindow("info",0) 1010 Sh%=FNwindow("Shanghai",-1) 1020 rules%=FNwindow("rules",-1) 1030 status%=FNwindow("status",0) 1040 replay%=FNwindow("replay",0):rep%=FALSE 1050 file%=x%:save%=FNwindow("save",0) 1060 SYS "Wimp_CloseTemplate" 1070 OSCLI "LOAD <Shanghai$Dir>.Menus "+STR$~menu% 1080 iblk%=wblk%+256:pblk%=wblk%+512 1090 menu%!32=info%:menu%!184=status%:menu%!232=save% 1100 hnt%=menu%+164:rply%=menu%+142 1110 FORI%=0TO144 1120 READS%(I%,0),S%(I%,1),S%(I%,2),S%(I%,3),S%(I%,4),S%(I%,5) 1130 NEXT 1140 I%=1:FORY%=-1898TO-1998STEP-100 1150 FORX%=150TO450STEP100 1160 PROCicon(rules%,STR$I%,X%,Y%):I%+=1 1170 NEXT:NEXT 1180 FORX%=150TO350STEP100 1190 PROCicon(rules%,STR$I%,X%,-2098):I%+=1 1200 NEXT 1210 FORX%=150TO450STEP100 1220 PROCicon(rules%,STR$I%,X%,-2198):I%+=1 1230 NEXT 1240 FORY%=-2298TO-2498STEP-100 1250 FORX%=150TO950STEP100 1260 PROCicon(rules%,STR$I%,X%,Y%):I%+=1 1270 NEXT:NEXT 1280 PROCblank:new%=TRUE 1290 SYS "OS_GetEnv" TO path$ 1300 IFRIGHT$(path$,1)<>" " path$=MID$(path$,INSTR(path$,""" ")+2):PROCread(FALSE) ELSEPROCdeal(TRUE):move%=0 1310 !iblk%=-1:iblk%!4=0:iblk%!8=0:iblk%!12=70:iblk%!16=68:iblk%!20=&3002 1320 $(iblk%+24)="!shanghai" 1330 SYS "Wimp_CreateIcon",,iblk% 1340 quit%=FALSE 1350 ENDPROC 1360 1370 REM * Load template & Create window. Returns window handle. 1380 1390 DEFFNwindow(w$,spr%) 1400 SYS "Wimp_LoadTemplate",,wblk%,x%,icn%+&C04,-1,w$,0 TO ,,x% 1410 IFspr% wblk%!64=sp% 1420 SYS "Wimp_CreateWindow",,wblk% TO h% 1430 =h% 1440 1450 REM * Opens window w% 1460 1470 DEFPROCopen(w%) 1480 wblk%!0=w%:SYS "Wimp_GetWindowState",,wblk% 1490 wblk%!28=-1:SYS "Wimp_OpenWindow",,wblk% 1500 ENDPROC 1510 1520 REM * Restricts pointer inside replay window - this PROC is needed 1530 REM * as WIMP does not return reason code 7 (drag box dropped) from 1540 REM * system drag type 1 (window drag) - reason code 2 (open window) 1550 REM * & reason code 4 (pointer leaving window) are used instead for 1560 REM * non-instantaneous & instantaneous drags respectively. 1570 1580 DEFPROCrestrict(w%) 1590 IFrep%:IF!wblk%=replay%:IFw%=(W%AND1) SYS "Wimp_GetWindowState",,wblk%:MOUSERECTANGLE wblk%!4,wblk%!8,308,256 1600 ENDPROC 1610 1620 REM * Creates 2 small invisible icons, handle Nos. 0 & 145 - this 1630 REM * enables tile icons to be un-deleted by simply un-setting their 1640 REM * icon deleted flag. Quicker than re-creating icon, screen up- 1650 REM * dating is automatic & icon retains its previous handle. 1660 1670 DEFPROCblank 1680 !iblk%=Sh%:iblk%!4=0:iblk%!8=-1:iblk%!12=1:iblk%!16=0:iblk%!20=1 1690 $(iblk%+24)="" 1700 SYS "Wimp_CreateIcon",,iblk% 1710 ENDPROC 1720 1730 REM * Mouse button pressed. If main menu requested, FNfind_hint is 1740 REM * is called, if no moves found then 'Show moves' is greyed-out. 1750 1760 DEFPROCbuttons 1770 adj%=-1 1780 IFwblk%!12=Sh% ANDshow% PROChint(0) 1790 CASE wblk%!8 OF 1800 WHEN 16,64 : REM *** CLICK/DRAG 1810 CASE wblk%!12 OF 1820 WHEN replay%: !wblk%=replay%:wblk%!4=1:SYS "Wimp_DragBox",,wblk% 1830 WHEN save%: PROCdrag 1840 ENDCASE 1850 WHEN 4 : REM *** <SELECT> 1860 CASE wblk%!12 OF 1870 WHEN Sh%: PROCmove 1880 WHEN replay% 1890 CASE wblk%!16 OF 1900 WHEN 1: PROCback 1910 WHEN 2: PROCforward 1920 WHEN 3,4,5: PROCcontinue(wblk%!16) 1930 ENDCASE 1940 WHEN save%: IFwblk%!16=2 PROCButtSave 1950 WHEN -2: PROCopen(Sh%) 1960 ENDCASE 1970 WHEN 2 : REM *** <MENU> 1980 CASE wblk%!12 OF 1990 WHEN Sh% 2000 IFfirst%>0 PROCtoggle(first%):first%=0 2010 !hnt%=FNfind_hint:?rply%=&40*-(move%=0) 2020 SYS "Wimp_CreateMenu",,menu%+80,!wblk%-64,wblk%!4:tree%=menu%+80 2030 WHEN -2 2040 SYS "Wimp_CreateMenu",,menu%,!wblk%-64,180:tree%=menu% 2050 ENDCASE 2060 WHEN 1 : REM *** <ADJUST> 2070 CASE wblk%!12 OF 2080 WHEN Sh%: IFfirst%>0 PROCtoggle(first%):first%=0 2090 WHEN replay% 2100 CASE wblk%!16 OF 2110 WHEN 1: PROCforward 2120 WHEN 2: PROCback 2130 WHEN 3,4,5: PROCcontinue(wblk%!16) 2140 ENDCASE 2150 WHEN save%: IFwblk%!16=2 adj%=tree%:PROCButtSave 2160 ENDCASE 2170 ENDCASE 2180 ENDPROC 2190 2200 REM * Decodes menu selection & acts on it. 2210 2220 DEFPROCdecode 2230 SYS "Wimp_DecodeMenu",,tree%,wblk%,wblk%+20 2240 CASE $(wblk%+20) OF 2250 WHEN "New game": PROCnew(TRUE) 2260 WHEN "Replay": IFshow% PROChint(0) 2270 PROCstatus(replay%,8,move%):M%=move% 2280 PROCopen(replay%) 2290 MOUSERECTANGLE wblk%!4,wblk%!8,308,256 2300 SYS "OS_Byte",161,197 TO ,,W% 2310 rep%=TRUE 2320 WHEN "Show moves": PROChint(show%) 2330 WHEN "Rules": PROCopen(rules%) 2340 WHEN "Quit": quit%=TRUE 2350 ENDCASE 2360 SYS "Wimp_GetPointerInfo",,wblk% 2370 IFwblk%!8=1 ANDNOTrep% ?rply%=&40*-(move%=0):SYS "Wimp_CreateMenu",,tree% 2380 ENDPROC 2390 2400 REM * Gets moves. If first - checks tile is valid, if OK then 2410 REM * hilights it else beeps. If second - checks tile is valid 2420 REM * and is the same as first, if OK deletes both tiles & updates 2430 REM * variables, else beeps. 2440 2450 DEFPROCmove 2460 IFfirst%<1 THEN 2470 first%=FNvalid:IFfirst%>0 PROCtoggle(first%) 2480 ELSE 2490 second%=FNvalid:IFsecond%=first% PROCtoggle(first%):first%=0:second%=0 2500 IFS%(second%,0)>0 ANDS%(second%,0)<5 ANDS%(first%,0)>4 VDU7:second%=0 2510 IFS%(second%,0)>4 ANDS%(second%,0)<9 AND(S%(first%,0)<5 ORS%(first%,0)>8) VDU7:second%=0 2520 IFS%(second%,0)>8 ANDS%(second%,0)<>S%(first%,0) VDU7:second%=0 2530 IFsecond%>0 PROCdelete(first%):PROCdelete(second%):tiles%-=2:M%(move%,0)=first%:M%(move%,1)=second%:move%+=1:first%=0:second%=0 2540 ENDIF 2550 ENDPROC 2560 2570 REM * Gets pointer position; if over tile, checks that tile is 2580 REM * 'free'. If all is OK returns tile icon number, else beeps 2590 REM * and returns zero. 2600 2610 DEFFNvalid 2620 i%=wblk%!16 2630 IFi%<0 i%=0 2640 IFi%=32 ANDS%(31,0)>0 AND(S%(33,0)>0 ORS%(45,0)>0) i%=0 2650 IFS%(S%(i%,3),0)>0 OR(S%(S%(i%,4),0)>0 ANDS%(S%(i%,5),0)>0) i%=0 2660 IFi%=0 VDU7 2670 =i% 2680 2690 REM * Hilights/un-hilights tile icon. 2700 2710 DEFPROCtoggle(i%) 2720 !iblk%=Sh%:iblk%!4=i%:iblk%!8=&2200000:iblk%!12=0 2730 SYS "Wimp_SetIconState",,iblk% 2740 ENDPROC 2750 2760 REM * Deletes tile icon. 2770 2780 DEFPROCdelete(i%) 2790 !iblk%=Sh%:iblk%!4=i% 2800 SYS "Wimp_DeleteIcon",,iblk% 2810 SYS "Wimp_ForceRedraw",Sh%,S%(i%,1),-S%(i%,2),S%(i%,1)+96,-S%(i%,2)+96 2820 S%(i%,0)=-S%(i%,0) 2830 ENDPROC 2840 2850 REM * Creates tile icon. 2860 2870 DEFPROCicon(w%,i$,x%,y%) 2880 !iblk%=w%:iblk%!4=x%:iblk%!8=y%:iblk%!12=x%+96:iblk%!16=y%+96 2890 iblk%!20=&3002:$(iblk%+24)=i$ 2900 SYS "Wimp_CreateIcon",,iblk% 2910 ENDPROC 2920 2930 REM * Updates status window with tiles & moves, replay window with 2940 REM * move number. 2950 2960 DEFPROCstatus(w%,i%,x%) 2970 !iblk%=w%:iblk%!4=i%:SYS "Wimp_GetIconState",,iblk% 2980 SYS "Wimp_DeleteIcon",,iblk% 2990 $(iblk%+28)=STR$x%:iblk%!4=!iblk%:SYS "Wimp_CreateIcon",,iblk%+4 3000 ENDPROC 3010 3020 REM * If i% then shuffles. Deals the tiles. Tile icons are created 3030 REM * in strict 3D sequence 1 to 144, this makes game logic simpler 3040 REM * to handle. Updates relevant variables. 3050 3060 DEFPROCdeal(i%) 3070 IFi% THEN 3080 R%=RND(-TIME) 3090 FORI%=1TO144 3100 R%=RND(144):SWAPS%(I%,0),S%(R%,0) 3110 NEXT 3120 ENDIF 3130 FORI%=1TO144 3140 PROCicon(Sh%,STR$S%(I%,0),S%(I%,1),-S%(I%,2)) 3150 NEXT 3160 IFnew% PROCblank:new%=FALSE 3170 tiles%=144:first%=0:second%=0:show%=FALSE 3180 ENDPROC 3190 3200 REM * New or same game. Deletes all tile icons. (Shuffles) & 3210 REM * deals. Finds valid moves. Updates window. 3220 3230 DEFPROCnew(i%) 3240 SYS "Hourglass_On" 3250 IFi% REPEAT$file%=LEFT$($file%,LEN$file%-1):UNTIL$file%=""ORRIGHT$($file%)=".":$file%=$file%+"Game_File" 3260 FORI%=144TO1STEP-1 3270 IFS%(I%,0)>0 !iblk%=Sh%:iblk%!4=I%:SYS "Wimp_DeleteIcon",,iblk% ELSES%(I%,0)=ABSS%(I%,0) 3280 NEXT 3290 PROCdeal(i%) 3300 !hnt%=FNfind_hint 3310 move%=0 3320 SYS "Wimp_ForceRedraw",Sh%,2,-718,1274,-34 3330 SYS "Hourglass_Off" 3340 ENDPROC 3350 3360 REM * Scans main array, S%(), for valid matches and places them 3370 REM * in array H%(). hint%=first valid match. 3380 3390 DEFFNfind_hint 3400 H%()=0:moves%=0:show%=FALSE 3410 FORI%=1TO144 3420 IFS%(I%,0)>0 THEN 3430 J%=S%(I%,0) 3440 IFI%=32 ANDS%(31,0)>0 AND(S%(33,0)>0 ORS%(45,0)>0) J%=0 3450 IFS%(S%(I%,3),0)>0 OR(S%(S%(I%,4),0)>0 ANDS%(S%(I%,5),0)>0) J%=0 3460 IFJ%>0 THEN 3470 IFJ%<5 J%=0 3480 IFJ%>4 ANDJ%<9 J%=1 3490 IFJ%>8 J%-=7 3500 L%=-1:REPEATL%+=1:UNTILH%(J%,L%)=0:H%(J%,L%)=I%:moves%+=L% 3510 ENDIF 3520 ENDIF 3530 NEXT 3540 L%=-1:REPEATL%+=1:UNTILH%(L%,1)>0ORL%=35 3550 PROCstatus(status%,3,moves%):PROCstatus(status%,2,tiles%) 3560 IFH%(L%,1)>0 hint%=L%:=&7000021 ELSE =&7400021 3570 3580 REM * Displays valid tile matches. 1 only if with <select>, steps 3590 REM * through each match if selected with <adjust>. 3600 3610 DEFPROChint(i%) 3620 IFNOTi% show%=NOTshow% 3630 FORI%=0TO3:IFH%(hint%,I%)>0 PROCtoggle(H%(hint%,I%)) 3640 NEXT 3650 IFi% THEN 3660 L%=hint%:REPEATL%+=1:IFL%=36 L%=0 3670 UNTILH%(L%,1)>0:hint%=L% 3680 FORI%=0TO3:IFH%(hint%,I%)>0 PROCtoggle(H%(hint%,I%)) 3690 NEXT 3700 ENDIF 3710 ENDPROC 3720 3730 REM * Replay option - Steps back one move. 3740 3750 DEFPROCback 3760 IF M%>0 THEN 3770 M%-=1:FORI%=0TO1 3780 !iblk%=Sh%:iblk%!4=M%(M%,I%):iblk%!8=0:iblk%!12=&2A00000 3790 SYS "Wimp_SetIconState",,iblk% 3800 S%(M%(M%,I%),0)=-S%(M%(M%,I%),0) 3810 NEXT:tiles%+=2:PROCstatus(replay%,8,M%) 3820 SYS "Wimp_ForceRedraw",replay%,iblk%!8+4,iblk%!12+4,iblk%!16-4,iblk%!20-4 3830 ELSE VDU7 3840 ENDIF 3850 ENDPROC 3860 3870 REM * Replay option - Steps forward one move. 3880 3890 DEFPROCforward 3900 IFM%<move% FORI%=0TO1:PROCdelete(M%(M%,I%)):NEXT:tiles%-=2:M%+=1 ELSEVDU7 3910 PROCstatus(replay%,8,M%) 3920 SYS "Wimp_ForceRedraw",replay%,iblk%!8+4,iblk%!12+4,iblk%!16-4,iblk%!20-4 3930 ENDPROC 3940 3950 REM * Replay option - Resume play from 3 Start of game, 4 Position 3960 REM * shown on screen or, 5 Last position before replay selected. 3970 3980 DEFPROCcontinue(I%) 3990 CASE I% OF 4000 WHEN 3: IFM%=0 move%=0 ELSEPROCnew(FALSE) 4010 WHEN 4: move%=M% 4020 WHEN 5 4030 IFM%<move% PROCplay_on(M%):SYS "Wimp_ForceRedraw",Sh%,2,-718,1274,-34 4040 ENDCASE 4050 !pblk%=replay%:MOUSERECTANGLE 0,0,1279,1023 4060 SYS "Wimp_CloseWindow",,pblk%:rep%=FALSE 4070 ENDPROC 4080 4090 REM * Board cleared from position M% to latest move; used when saved 4100 REM * game is re-loaded or when resuming play from replay option. 4110 4120 DEFPROCplay_on(M%) 4130 FORI%=M%TOmove%-1 4140 FORJ%=0TO1 4150 !iblk%=Sh%:iblk%!4=M%(I%,J%):SYS "Wimp_DeleteIcon",,iblk% 4160 S%(M%(I%,J%),0)=-S%(M%(I%,J%),0) 4170 NEXT:NEXT:tiles%=144-2*move% 4180 ENDPROC 4190 4200 REM * Load & Save routines follow - lot of handshaking, ergo lot of 4210 REM * code. At least Acorn's WIMP is a pleasure to use, which is 4220 REM * more than I can say of a certain fashionable PC package! 4230 4240 REM * Inform WIMP that we will accept load. Get path name. 4250 4260 DEFPROCload 4270 SYS "Hourglass_On" 4280 wblk%!12=wblk%!8:wblk%!16=4:!wblk%=64 4290 SYS "Wimp_SendMessage",17,wblk%,wblk%!4 4300 path$="":a%=0:b%=wblk%?44 4310 WHILE b%<>0 ANDb%<>13 4320 path$+=CHR$b% 4330 a%+=1:b%=wblk%?(44+a%) 4340 ENDWHILE 4350 PROCread(TRUE) 4360 SYS "Hourglass_Off" 4370 ENDPROC 4380 4390 REM * IF i% delete all tile icons. Read data from saved game. 4400 REM * Deal tiles, find hint, update window & open if need be. 4410 REM * Update default file name. 4420 4430 DEFPROCread(i%) 4440 IFi% THEN 4450 FORI%=144TO1STEP-1 4460 IFS%(I%,0)>0 !iblk%=Sh%:iblk%!4=I%:SYS "Wimp_DeleteIcon",,iblk% 4470 NEXT 4480 ENDIF 4490 F%=OPENINpath$ 4500 FORI%=1TO144:INPUT#F%,S%(I%,0):NEXT 4510 FORI%=0TO71:INPUT#F%,M%(I%,0),M%(I%,1):NEXT 4520 INPUT#F%,move%:CLOSE#F%:F%=0 4530 PROCdeal(FALSE) 4540 IFmove%>0 PROCplay_on(0) 4550 !hnt%=FNfind_hint 4560 SYS "Wimp_ForceRedraw",Sh%,2,-718,1274,-34 4570 SYS "Wimp_GetPointerInfo",,pblk%:IFpblk%!12<>Sh% !wblk%=Sh%:PROCopen(Sh%) 4580 $file%=path$ 4590 ENDPROC 4600 4610 REM * RETURN pressed - if over 'save' window then attempt a save 4620 REM * with default file name. 4630 4640 DEFFNkey 4650 r%=(!wblk%=save% ANDwblk%!24=13) 4660 IFr% adj%=-1:PROCButtSave 4670 =r% 4680 4690 REM * CLICK/DRAG - initiate file icon drag. 4700 4710 DEFPROCdrag 4720 IFwblk%!8=16 adj%=tree% 4730 !wblk%=save%:SYS "Wimp_GetWindowState",,wblk% 4740 ox%=wblk%!4-wblk%!20:oy%=wblk%!16-wblk%!24 4750 wblk%!4=0:SYS "Wimp_GetIconState",,wblk% 4760 !wblk%=save%:wblk%!4=5:wblk%!8=ox%+wblk%!8:wblk%!12=oy%+wblk%!12 4770 wblk%!16=ox%+wblk%!16:wblk%!20=oy%+wblk%!20 4780 wblk%!24=0:wblk%!28=0:wblk%!32=&7FFFFFFF:wblk%!36=&7FFFFFFF 4790 SYS "Wimp_DragBox",,wblk% 4800 ENDPROC 4810 4820 REM * Drag box 'dropped'. Supply leaf name & file info and ask 4830 REM * receiver if it will accept the save. 4840 4850 DEFPROCDragSave 4860 SYS "Wimp_GetPointerInfo",,wblk% 4870 wblk%!20=wblk%!12:wblk%!24=wblk%!16:wblk%!28=wblk%!0:wblk%!32=wblk%!4 4880 wblk%!36=&5A5:wblk%!0=64:wblk%!12=0:wblk%!16=1:wblk%!40=&000 4890 leaf$=$file% 4900 WHILE INSTR(leaf$,".") 4910 leaf$=MID$(leaf$,INSTR(leaf$,".")+1) 4920 ENDWHILE 4930 $(wblk%+44)=leaf$ 4940 SYS "Wimp_SendMessage",17,wblk%,wblk%!20,wblk%!24 4950 ENDPROC 4960 4970 REM * Receiver will accept data. Get path name supplied by receiver 4980 REM * and write data. If data secure, ie. sent to file system, then 4990 REM * update default file name. Send data load message to receiver. 5000 5010 DEFPROCsave 5020 path$="":a%=0:b%=wblk%?44 5030 WHILEb%<>0 5040 path$+=CHR$b% 5050 a%+=1:b%=wblk%?(44+a%) 5060 ENDWHILE 5070 PROCwrite(path$) 5080 IFwblk%!36>-1 $file%=path$ 5090 wblk%!12=wblk%!8:wblk%!16=3:wblk%!0=256 5100 SYS "Wimp_SendMessage",18,wblk%,wblk%!20,wblk%!24 5110 ENDPROC 5120 5130 REM * RETURN pressed or OK clicked on save window. Attempt a save 5140 REM * using default file name. 5150 5160 DEFPROCButtSave 5170 IFINSTR($file%,".") THEN 5180 PROCwrite($file%) 5190 ELSE 5200 $wblk%=" To save, drag the file icon to a directory viewer" 5210 SYS "Wimp_ReportError",wblk%,1,"Shanghai" 5220 ENDIF 5230 ENDPROC 5240 5250 REM * This is the PROC that finally writes the data to the receiver. 5260 REM * FileType set to 'Shanghai'. Menus deleted if RETURN or 5270 REM * <select> used to initiate save. 5280 5290 DEFPROCwrite(f$) 5300 F%=OPENOUTf$ 5310 FORI%=1TO144:PRINT#F%,ABSS%(I%,0):NEXT 5320 FORI%=0TO71:PRINT#F%,M%(I%,0),M%(I%,1):NEXT 5330 PRINT#F%,move%:CLOSE#F%:F%=0:OSCLI"SetType "+f$+" 000" 5340 SYS "Wimp_CreateMenu",,adj% 5350 ENDPROC 5360 5370 REM * Each data set is:- sprite name, x position, -y position, 5380 REM * tile on top, tile to right, tile to left. All 'free' tiles 5390 REM * have last 3 values set to 0,0,0 5400 5410 DATA-1,0,0,0,0,0 5420 DATA1,1010,130,0,0,0, 2,926,130,0,1,3, 3,842,130,0,2,4, 4,758,130,0,3,5, 5,674,130,0,4,6, 6,590,130,0,5,7, 7,506,130,0,6,8, 8,422,130,0,7,9, 9,338,130,0,8,10, 9,254,130,0,9,11, 9,170,130,0,10,12, 9,86,130,0,0,0 5430 DATA10,842,214,0,0,0, 10,758,214,88,13,15, 10,674,214,89,14,16, 10,590,214,90,15,17, 11,506,214,91,16,18, 11,422,214,92,17,19, 11,338,214,93,18,20, 11,254,214,0,0,0 5440 DATA12,926,298,0,0,0, 12,842,298,0,21,23, 12,758,298,94,22,24, 12,674,298,95,23,25, 13,590,298,96,24,26, 13,506,298,97,25,27, 13,422,298,98,26,28, 13,338,298,99,27,29, 14,254,298,0,28,30, 14,170,298,0,0,0 5450 DATA14,1178,424,0,0,0, 14,1094,424,0,0,0 5460 DATA15,1010,382,0,32,34, 15,926,382,0,33,35, 15,842,382,0,34,36, 15,758,382,100,35,37, 16,674,382,101,36,38, 16,590,382,102,37,39, 16,506,382,103,38,40, 16,422,382,104,39,41, 17,338,382,105,40,42, 17,254,382,0,41,43 5470 DATA17,170,382,0,42,44, 17,86,382,0,43,57 5480 DATA18,1010,466,0,32,46, 18,926,466,0,45,47, 18,842,466,0,46,48, 18,758,466,106,47,49, 19,674,466,107,48,50, 19,590,466,108,49,51, 19,506,466,109,50,52, 19,422,466,110,51,53, 20,338,466,111,52,54, 20,254,466,0,53,55 5490 DATA20,170,466,0,54,56, 20,86,466,0,55,57 5500 DATA21,2,424,0,0,0 5510 DATA21,926,550,0,0,0, 21,842,550,0,58,60, 21,758,550,112,59,61, 22,674,550,113,60,62, 22,590,550,114,61,63, 22,506,550,115,62,64, 22,422,550,116,63,65, 23,338,550,117,64,66, 23,254,550,0,65,67, 23,170,550,0,0,0 5520 DATA23,842,634,0,0,0, 24,758,634,118,68,70, 24,674,634,119,69,71, 24,590,634,120,70,72, 24,506,634,121,71,73, 25,422,634,122,72,74, 25,338,634,123,73,75, 25,254,634,0,0,0 5530 DATA25,1010,718,0,0,0, 26,926,718,0,76,78, 26,842,718,0,77,79, 26,758,718,0,78,80, 26,674,718,0,79,81, 27,590,718,0,80,82, 27,506,718,0,81,83, 27,422,718,0,82,84, 27,338,718,0,83,85, 28,254,718,0,84,86, 28,170,718,0,85,87 5540 DATA28,86,718,0,0,0 5550 : 5560 DATA28,766,206,0,0,0, 29,682,206,0,88,90, 29,598,206,0,89,91, 29,514,206,0,90,92, 29,430,206,0,91,93, 30,346,206,0,0,0 5570 DATA30,766,290,0,0,0, 30,682,290,124,94,96, 30,598,290,125,95,97, 31,514,290,126,96,98, 31,430,290,127,97,99, 31,346,290,0,0,0 5580 DATA31,766,374,0,0,0, 32,682,374,128,100,102, 32,598,374,129,101,103, 32,514,374,130,102,104, 32,430,374,131,103,105, 33,346,374,0,0,0 5590 DATA33,766,458,0,0,0, 33,682,458,132,106,108, 33,598,458,133,107,109, 34,514,458,134,108,110, 34,430,458,135,109,111, 34,346,458,0,0,0 5600 DATA34,766,542,0,0,0, 35,682,542,136,112,114, 35,598,542,137,113,115, 35,514,542,138,114,116, 35,430,542,139,115,117, 36,346,542,0,0,0 5610 DATA36,766,626,0,0,0, 36,682,626,0,118,120, 36,598,626,0,119,121, 37,514,626,0,120,122, 37,430,626,0,121,123, 37,346,626,0,0,0 5620 : 5630 DATA37,690,282,0,0,0, 38,606,282,0,124,126, 38,522,282,0,125,127, 38,438,282,0,0,0 5640 DATA38,690,366,0,0,0, 39,606,366,140,128,130, 39,522,366,141,129,131, 39,438,366,0,0,0 5650 DATA39,690,450,0,0,0, 40,606,450,142,132,134, 40,522,450,143,133,135, 40,438,450,0,0,0 5660 DATA40,690,534,0,0,0, 41,606,534,0,136,138, 41,522,534,0,137,139, 41,438,534,0,0,0 5670 : 5680 DATA41,614,358,144,0,0, 42,530,358,144,0,0 5690 DATA42,614,442,144,0,0, 42,530,442,144,0,0 5700 DATA42,580,392,0,0,0
0 � > REMedImage fully REMmed library copy of E � > !RunImage Shanghai WIMP patience game 2.00 30 April 1991 : � By Wynand Thompson � Archimedes World December 1991 ( 2C � * VARIABLES * mostly mnemonic but resident integer variables <C � * are used where necessary - these are: F% = file handle, so FC � * file(s) can be properly closed in case of error; M% = temp PC � * store for move% (move no.) whilst in replay; W% = wimpflag ZB � * for instantaneous window drags, used in order to restrain dH � * pointer inside replay window; I%,J%,L% = loop control variables nD � * and temp store whilst in PROCS. * ARRAYS * Three arrays are xE � * used - S%() stores all information required for the creation �D � * & deletion of tile icons; H%() stores matching tile numbers �F � * in order to rapidly find tiles for 'show moves'; M%() keeps a �E � * record of all moves played to enable program to replay game. � � � * Handle non-WIMP errors. � � F%=0:�:�error:� � � � * Initialise program. � � �init � � � * Handle WIMP errors. �:�wimperror � " � * Main WIMP poll loop. , 6 � @& ș "Wimp_Poll",&1823,wblk% � r% J Ȏ r% � T6 � 2: ș "Wimp_OpenWindow",,wblk%:�restrict(0) ^* � 3: ș "Wimp_CloseWindow",,wblk% h? �!wblk%=Sh% !wblk%=rules%:ș "Wimp_CloseWindow",,wblk% r � 4: �restrict(1) | � 6: �buttons � � 7: �DragSave �1 � 8: 笤key ș"Wimp_ProcessKey",wblk%!24 � � 9: �decode � � 17,18: �receive �& � 19: ș "OS_File",6,wblk%+44 �3 �255,"Data transfer failed: receiver died" � � � �quit%=� � �close � � � �+ � * Handle messages received via WIMP. � ��receive Ȏ wblk%!16 � � 0: quit%=� & � 2: �save 0. � 3,5: �wblk%!12=0 �wblk%!40=&000 �load : � D � N XE � * WIMP error; close all our open files, then continue or quit? b l ݤwimperror v �F%>0 �#F%:F%=0 �> !wblk%=�:$(wblk%+4)=�$+" (internal error code "+Þ+")"+�0 �2 ș "Wimp_ReportError",wblk%,3,"Shanghai" � ,r � �r=2 �close:=� �:=� � � � * Close down !Shanghai. � � ��close � $wblk%="TASK" �% ș "Wimp_CloseDown",task%,!wblk% � � � �F � * non-WIMP error; close all our open files, report error, quit. � ��error 0 ș "Wimp_CloseTemplate":ș "Wimp_CloseDown" �F%>0 �#F%:F%=0 * �:�" at line ";� 4 � > HG � * Initialise WIMP. DIM memory blocks & arrays. Initialise main RC � * variables. Clear sprite area & load sprites. Load window \I � * templates & create windows for info, game, rules, replay, status fG � * & save. Load menu data. Initialise main array, S%(). Create pH � * icons in 'rules' window. If started by double-click or drag on zG � * saved game then load data, update game, window & variables and �B � * open window, else shuffle & deal. Game icon to icon bar. � � ��init �; ș "Wimp_Initialise",200,&4B534154,"Shanghai" � ,task% �L � wblk% &1160,icn% &C04,sp% &C448,menu% 252,S%(144,5),H%(35,3),M%(71,1) �+ sp%!0=&C448:sp%!4=0:sp%!8=16:sp%!12=16 � ș "OS_SpriteOp",265,sp% �6 ș "OS_SpriteOp",266,sp%,"<Shanghai$Dir>.Sprites" �7 ș "Wimp_OpenTemplate",,"<Shanghai$Dir>.Templates" � x%=icn% � info%=�window("info",0) � Sh%=�window("Shanghai",-1) � rules%=�window("rules",-1) status%=�window("status",0) ' replay%=�window("replay",0):rep%=� % file%=x%:save%=�window("save",0) $ ș "Wimp_CloseTemplate" .+ � "LOAD <Shanghai$Dir>.Menus "+�~menu% 8$ iblk%=wblk%+256:pblk%=wblk%+512 B5 menu%!32=info%:menu%!184=status%:menu%!232=save% L# hnt%=menu%+164:rply%=menu%+142 V �I%=0�144 `= �S%(I%,0),S%(I%,1),S%(I%,2),S%(I%,3),S%(I%,4),S%(I%,5) j � t I%=1:�Y%=-1898�-1998�-100 ~ �X%=150�450�100 �& �icon(rules%,�I%,X%,Y%):I%+=1 � �:� � �X%=150�350�100 �' �icon(rules%,�I%,X%,-2098):I%+=1 � � � �X%=150�450�100 �' �icon(rules%,�I%,X%,-2198):I%+=1 � � � �Y%=-2298�-2498�-100 � �X%=150�950�100 �& �icon(rules%,�I%,X%,Y%):I%+=1 � �:� �blank:new%=� ș "OS_GetEnv" � path$ M ��path$,1)<>" " path$=�path$,�path$,""" ")+2):�read(�) ��deal(�):move%=0 I !iblk%=-1:iblk%!4=0:iblk%!8=0:iblk%!12=70:iblk%!16=68:iblk%!20=&3002 ( $(iblk%+24)="!shanghai" 2 ș "Wimp_CreateIcon",,iblk% < quit%=� F � P Z? � * Load template & Create window. Returns window handle. d n ݤwindow(w$,spr%) x> ș "Wimp_LoadTemplate",,wblk%,x%,icn%+&C04,-1,w$,0 � ,,x% � �spr% wblk%!64=sp% �' ș "Wimp_CreateWindow",,wblk% � h% � =h% � � � * Opens window w% � � ��open(w%) �/ wblk%!0=w%:ș "Wimp_GetWindowState",,wblk% �, wblk%!28=-1:ș "Wimp_OpenWindow",,wblk% � � � �E � * Restricts pointer inside replay window - this PROC is needed �F � * as WIMP does not return reason code 7 (drag box dropped) from G � * system drag type 1 (window drag) - reason code 2 (open window) F � * & reason code 4 (pointer leaving window) are used instead for > � * non-instantaneous & instantaneous drags respectively. " , ��restrict(w%) 6b �rep%:�!wblk%=replay%:�w%=(W%�1) ș "Wimp_GetWindowState",,wblk%:ȗȓ wblk%!4,wblk%!8,308,256 @ � J TD � * Creates 2 small invisible icons, handle Nos. 0 & 145 - this ^G � * enables tile icons to be un-deleted by simply un-setting their hF � * icon deleted flag. Quicker than re-creating icon, screen up- r@ � * dating is automatic & icon retains its previous handle. | � ��blank �E !iblk%=Sh%:iblk%!4=0:iblk%!8=-1:iblk%!12=1:iblk%!16=0:iblk%!20=1 � $(iblk%+24)="" � ș "Wimp_CreateIcon",,iblk% � � � �F � * Mouse button pressed. If main menu requested, FNfind_hint is �F � * is called, if no moves found then 'Show moves' is greyed-out. � � ��buttons � adj%=-1 �" �wblk%!12=Sh% �show% �hint(0) � Ȏ wblk%!8 � ! � 16,64 : � *** CLICK/DRAG Ȏ wblk%!12 � E � replay%: !wblk%=replay%:wblk%!4=1:ș "Wimp_DragBox",,wblk% & � save%: �drag 0 � : � 4 : � *** <SELECT> D Ȏ wblk%!12 � N � Sh%: �move X � replay% b Ȏ wblk%!16 � l � 1: �back v � 2: �forward �' � 3,4,5: �continue(wblk%!16) � � �' � save%: �wblk%!16=2 �ButtSave � � -2: �open(Sh%) � � � � 2 : � *** <MENU> � Ȏ wblk%!12 � � � Sh% �+ �first%>0 �toggle(first%):first%=0 �/ !hnt%=�find_hint:?rply%=&40*-(move%=0) �H ș "Wimp_CreateMenu",,menu%+80,!wblk%-64,wblk%!4:tree%=menu%+80 � � -2 �> ș "Wimp_CreateMenu",,menu%,!wblk%-64,180:tree%=menu% � � 1 : � *** <ADJUST> Ȏ wblk%!12 � 2 � Sh%: �first%>0 �toggle(first%):first%=0 * � replay% 4 Ȏ wblk%!16 � > � 1: �forward H � 2: �back R' � 3,4,5: �continue(wblk%!16) \ � f2 � save%: �wblk%!16=2 adj%=tree%:�ButtSave p � z � � � � �- � * Decodes menu selection & acts on it. � � ��decode �/ ș "Wimp_DecodeMenu",,tree%,wblk%,wblk%+20 � Ȏ $(wblk%+20) � � � "New game": �new(�) �" � "Replay": �show% �hint(0) �( �status(replay%,8,move%):M%=move% � �open(replay%) �# ȗȓ wblk%!4,wblk%!8,308,256 �" ș "OS_Byte",161,197 � ,,W% rep%=� # � "Show moves": �hint(show%) � "Rules": �open(rules%) $ � "Quit": quit%=� . � 8$ ș "Wimp_GetPointerInfo",,wblk% BH �wblk%!8=1 ��rep% ?rply%=&40*-(move%=0):ș "Wimp_CreateMenu",,tree% L � V `A � * Gets moves. If first - checks tile is valid, if OK then jB � * hilights it else beeps. If second - checks tile is valid tE � * and is the same as first, if OK deletes both tiles & updates ~ � * variables, else beeps. � � ��move � �first%<1 � �. first%=�valid:�first%>0 �toggle(first%) � � �H second%=�valid:�second%=first% �toggle(first%):first%=0:second%=0 �E �S%(second%,0)>0 �S%(second%,0)<5 �S%(first%,0)>4 �7:second%=0 �W �S%(second%,0)>4 �S%(second%,0)<9 �(S%(first%,0)<5 �S%(first%,0)>8) �7:second%=0 �A �S%(second%,0)>8 �S%(second%,0)<>S%(first%,0) �7:second%=0 � �second%>0 �delete(first%):�delete(second%):tiles%-=2:M%(move%,0)=first%:M%(move%,1)=second%:move%+=1:first%=0:second%=0 � � � � A � * Gets pointer position; if over tile, checks that tile is C � * 'free'. If all is OK returns tile icon number, else beeps � * and returns zero. ( 2 ݤvalid < i%=wblk%!16 F �i%<0 i%=0 P6 �i%=32 �S%(31,0)>0 �(S%(33,0)>0 �S%(45,0)>0) i%=0 ZA �S%(S%(i%,3),0)>0 �(S%(S%(i%,4),0)>0 �S%(S%(i%,5),0)>0) i%=0 d �i%=0 �7 n =i% x �( � * Hilights/un-hilights tile icon. � � ��toggle(i%) �6 !iblk%=Sh%:iblk%!4=i%:iblk%!8=&2200000:iblk%!12=0 �" ș "Wimp_SetIconState",,iblk% � � � � � * Deletes tile icon. � � ��delete(i%) � !iblk%=Sh%:iblk%!4=i% � ș "Wimp_DeleteIcon",,iblk% �J ș "Wimp_ForceRedraw",Sh%,S%(i%,1),-S%(i%,2),S%(i%,1)+96,-S%(i%,2)+96 S%(i%,0)=-S%(i%,0) � " � * Creates tile icon. , 6 ��icon(w%,i$,x%,y%) @B !iblk%=w%:iblk%!4=x%:iblk%!8=y%:iblk%!12=x%+96:iblk%!16=y%+96 J" iblk%!20=&3002:$(iblk%+24)=i$ T ș "Wimp_CreateIcon",,iblk% ^ � h rE � * Updates status window with tiles & moves, replay window with | � * move number. � � ��status(w%,i%,x%) �7 !iblk%=w%:iblk%!4=i%:ș "Wimp_GetIconState",,iblk% � ș "Wimp_DeleteIcon",,iblk% �A $(iblk%+28)=�x%:iblk%!4=!iblk%:ș "Wimp_CreateIcon",,iblk%+4 � � � �G � * If i% then shuffles. Deals the tiles. Tile icons are created �F � * in strict 3D sequence 1 to 144, this makes game logic simpler �0 � * to handle. Updates relevant variables. � � ��deal(i%) � �i% � R%=�(-�) �I%=1�144 & R%=�(144):ȔS%(I%,0),S%(R%,0) & � 0 � : �I%=1�144 D. �icon(Sh%,�S%(I%,0),S%(I%,1),-S%(I%,2)) N � X �new% �blank:new%=� b* tiles%=144:first%=0:second%=0:show%=� l � v �A � * New or same game. Deletes all tile icons. (Shuffles) & �4 � * deals. Finds valid moves. Updates window. � � ��new(i%) � ș "Hourglass_On" �U �i% �$file%=�$file%,�$file%-1):�$file%=""��$file%)=".":$file%=$file%+"Game_File" � �I%=144�1�-1 �X �S%(I%,0)>0 !iblk%=Sh%:iblk%!4=I%:ș "Wimp_DeleteIcon",,iblk% �S%(I%,0)=�S%(I%,0) � � � �deal(i%) � !hnt%=�find_hint � move%=0 �. ș "Wimp_ForceRedraw",Sh%,2,-718,1274,-34 ș "Hourglass_Off" � B � * Scans main array, S%(), for valid matches and places them *1 � * in array H%(). hint%=first valid match. 4 > ݤfind_hint H H%()=0:moves%=0:show%=� R �I%=1�144 \ �S%(I%,0)>0 � f J%=S%(I%,0) p: �I%=32 �S%(31,0)>0 �(S%(33,0)>0 �S%(45,0)>0) J%=0 zE �S%(S%(I%,3),0)>0 �(S%(S%(I%,4),0)>0 �S%(S%(I%,5),0)>0) J%=0 � �J%>0 � � �J%<5 J%=0 � �J%>4 �J%<9 J%=1 � �J%>8 J%-=7 �< L%=-1:�L%+=1:�H%(J%,L%)=0:H%(J%,L%)=I%:moves%+=L% � � � � � � �# L%=-1:�L%+=1:�H%(L%,1)>0�L%=35 �8 �status(status%,3,moves%):�status(status%,2,tiles%) �/ �H%(L%,1)>0 hint%=L%:=&7000021 � =&7400021 � �E � * Displays valid tile matches. 1 only if with <select>, steps 6 � * through each match if selected with <adjust>. ��hint(i%) $ �i% show%=�show% .2 �I%=0�3:�H%(hint%,I%)>0 �toggle(H%(hint%,I%)) 8 � B �i% � L" L%=hint%:�L%+=1:�L%=36 L%=0 V �H%(L%,1)>0:hint%=L% `4 �I%=0�3:�H%(hint%,I%)>0 �toggle(H%(hint%,I%)) j � t � ~ � � �- � * Replay option - Steps back one move. � � ��back � � M%>0 � � M%-=1:�I%=0�1 �A !iblk%=Sh%:iblk%!4=M%(M%,I%):iblk%!8=0:iblk%!12=&2A00000 �& ș "Wimp_SetIconState",,iblk% �) S%(M%(M%,I%),0)=-S%(M%(M%,I%),0) �( �:tiles%+=2:�status(replay%,8,M%) �O ș "Wimp_ForceRedraw",replay%,iblk%!8+4,iblk%!12+4,iblk%!16-4,iblk%!20-4 � � �7 � � 0 � * Replay option - Steps forward one move. ( 2 ��forward <? �M%<move% �I%=0�1:�delete(M%(M%,I%)):�:tiles%-=2:M%+=1 ��7 F �status(replay%,8,M%) PM ș "Wimp_ForceRedraw",replay%,iblk%!8+4,iblk%!12+4,iblk%!16-4,iblk%!20-4 Z � d nE � * Replay option - Resume play from 3 Start of game, 4 Position xD � * shown on screen or, 5 Last position before replay selected. � � ��continue(I%) � Ȏ I% � �" � 3: �M%=0 move%=0 ��new(�) � � 4: move%=M% � � 5 �G �M%<move% �play_on(M%):ș "Wimp_ForceRedraw",Sh%,2,-718,1274,-34 � � �& !pblk%=replay%:ȗȓ 0,0,1279,1023 �( ș "Wimp_CloseWindow",,pblk%:rep%=� � � � �G � * Board cleared from position M% to latest move; used when saved D � * game is re-loaded or when resuming play from replay option. ��play_on(M%) " �I%=M%�move%-1 , �J%=0�1 6A !iblk%=Sh%:iblk%!4=M%(I%,J%):ș "Wimp_DeleteIcon",,iblk% @) S%(M%(I%,J%),0)=-S%(M%(I%,J%),0) J �:�:tiles%=144-2*move% T � ^ hF � * Load & Save routines follow - lot of handshaking, ergo lot of rD � * code. At least Acorn's WIMP is a pleasure to use, which is |A � * more than I can say of a certain fashionable PC package! � �> � * Inform WIMP that we will accept load. Get path name. � � ��load � ș "Hourglass_On" �* wblk%!12=wblk%!8:wblk%!16=4:!wblk%=64 �+ ș "Wimp_SendMessage",17,wblk%,wblk%!4 � path$="":a%=0:b%=wblk%?44 � ȕ b%<>0 �b%<>13 � path$+=�b% � a%+=1:b%=wblk%?(44+a%) � � � �read(�) ș "Hourglass_Off" � &A � * IF i% delete all tile icons. Read data from saved game. 0@ � * Deal tiles, find hint, update window & open if need be. :" � * Update default file name. D N ��read(i%) X �i% � b �I%=144�1�-1 lF �S%(I%,0)>0 !iblk%=Sh%:iblk%!4=I%:ș "Wimp_DeleteIcon",,iblk% v � � � � F%=�path$ � �I%=1�144:�#F%,S%(I%,0):� �& �I%=0�71:�#F%,M%(I%,0),M%(I%,1):� � �#F%,move%:�#F%:F%=0 � �deal(�) � �move%>0 �play_on(0) � !hnt%=�find_hint �. ș "Wimp_ForceRedraw",Sh%,2,-718,1274,-34 �I ș "Wimp_GetPointerInfo",,pblk%:�pblk%!12<>Sh% !wblk%=Sh%:�open(Sh%) � $file%=path$ � � � C � * RETURN pressed - if over 'save' window then attempt a save � * with default file name. ݤkey *# r%=(!wblk%=save% �wblk%!24=13) 4 �r% adj%=-1:�ButtSave > =r% H R. � * CLICK/DRAG - initiate file icon drag. \ f ��drag p �wblk%!8=16 adj%=tree% z1 !wblk%=save%:ș "Wimp_GetWindowState",,wblk% �/ ox%=wblk%!4-wblk%!20:oy%=wblk%!16-wblk%!24 �, wblk%!4=0:ș "Wimp_GetIconState",,wblk% �E !wblk%=save%:wblk%!4=5:wblk%!8=ox%+wblk%!8:wblk%!12=oy%+wblk%!12 �0 wblk%!16=ox%+wblk%!16:wblk%!20=oy%+wblk%!20 �@ wblk%!24=0:wblk%!28=0:wblk%!32=&7FFFFFFF:wblk%!36=&7FFFFFFF � ș "Wimp_DragBox",,wblk% � � � �B � * Drag box 'dropped'. Supply leaf name & file info and ask �- � * receiver if it will accept the save. � � ��DragSave �$ ș "Wimp_GetPointerInfo",,wblk% J wblk%!20=wblk%!12:wblk%!24=wblk%!16:wblk%!28=wblk%!0:wblk%!32=wblk%!4 A wblk%!36=&5A5:wblk%!0=64:wblk%!12=0:wblk%!16=1:wblk%!40=&000 leaf$=$file% $ ȕ �leaf$,".") ." leaf$=�leaf$,�leaf$,".")+1) 8 � B $(wblk%+44)=leaf$ L5 ș "Wimp_SendMessage",17,wblk%,wblk%!20,wblk%!24 V � ` jG � * Receiver will accept data. Get path name supplied by receiver tG � * and write data. If data secure, ie. sent to file system, then ~G � * update default file name. Send data load message to receiver. � � ��save � path$="":a%=0:b%=wblk%?44 � ȕb%<>0 � path$+=�b% � a%+=1:b%=wblk%?(44+a%) � � � �write(path$) � �wblk%!36>-1 $file%=path$ �, wblk%!12=wblk%!8:wblk%!16=3:wblk%!0=256 �5 ș "Wimp_SendMessage",18,wblk%,wblk%!20,wblk%!24 � � E � * RETURN pressed or OK clicked on save window. Attempt a save ! � * using default file name. ( ��ButtSave 2 �$file%,".") � < �write($file%) F � PE $wblk%=" To save, drag the file icon to a directory viewer" Z/ ș "Wimp_ReportError",wblk%,1,"Shanghai" d � n � x �G � * This is the PROC that finally writes the data to the receiver. �@ � * FileType set to 'Shanghai'. Menus deleted if RETURN or �( � * <select> used to initiate save. � � ��write(f$) � F%=�f$ � �I%=1�144:�#F%,�S%(I%,0):� �& �I%=0�71:�#F%,M%(I%,0),M%(I%,1):� �/ �#F%,move%:�#F%:F%=0:�"SetType "+f$+" 000" � ș "Wimp_CreateMenu",,adj% � � � �A � * Each data set is:- sprite name, x position, -y position, D � * tile on top, tile to right, tile to left. All 'free' tiles ( � * have last 3 values set to 0,0,0 " �-1,0,0,0,0,0 ,� �1,1010,130,0,0,0, 2,926,130,0,1,3, 3,842,130,0,2,4, 4,758,130,0,3,5, 5,674,130,0,4,6, 6,590,130,0,5,7, 7,506,130,0,6,8, 8,422,130,0,7,9, 9,338,130,0,8,10, 9,254,130,0,9,11, 9,170,130,0,10,12, 9,86,130,0,0,0 6� �10,842,214,0,0,0, 10,758,214,88,13,15, 10,674,214,89,14,16, 10,590,214,90,15,17, 11,506,214,91,16,18, 11,422,214,92,17,19, 11,338,214,93,18,20, 11,254,214,0,0,0 @� �12,926,298,0,0,0, 12,842,298,0,21,23, 12,758,298,94,22,24, 12,674,298,95,23,25, 13,590,298,96,24,26, 13,506,298,97,25,27, 13,422,298,98,26,28, 13,338,298,99,27,29, 14,254,298,0,28,30, 14,170,298,0,0,0 J* �14,1178,424,0,0,0, 14,1094,424,0,0,0 T� �15,1010,382,0,32,34, 15,926,382,0,33,35, 15,842,382,0,34,36, 15,758,382,100,35,37, 16,674,382,101,36,38, 16,590,382,102,37,39, 16,506,382,103,38,40, 16,422,382,104,39,41, 17,338,382,105,40,42, 17,254,382,0,41,43 ^+ �17,170,382,0,42,44, 17,86,382,0,43,57 h� �18,1010,466,0,32,46, 18,926,466,0,45,47, 18,842,466,0,46,48, 18,758,466,106,47,49, 19,674,466,107,48,50, 19,590,466,108,49,51, 19,506,466,109,50,52, 19,422,466,110,51,53, 20,338,466,111,52,54, 20,254,466,0,53,55 r+ �20,170,466,0,54,56, 20,86,466,0,55,57 | �21,2,424,0,0,0 �� �21,926,550,0,0,0, 21,842,550,0,58,60, 21,758,550,112,59,61, 22,674,550,113,60,62, 22,590,550,114,61,63, 22,506,550,115,62,64, 22,422,550,116,63,65, 23,338,550,117,64,66, 23,254,550,0,65,67, 23,170,550,0,0,0 �� �23,842,634,0,0,0, 24,758,634,118,68,70, 24,674,634,119,69,71, 24,590,634,120,70,72, 24,506,634,121,71,73, 25,422,634,122,72,74, 25,338,634,123,73,75, 25,254,634,0,0,0 �� �25,1010,718,0,0,0, 26,926,718,0,76,78, 26,842,718,0,77,79, 26,758,718,0,78,80, 26,674,718,0,79,81, 27,590,718,0,80,82, 27,506,718,0,81,83, 27,422,718,0,82,84, 27,338,718,0,83,85, 28,254,718,0,84,86, 28,170,718,0,85,87 � �28,86,718,0,0,0 � : �x �28,766,206,0,0,0, 29,682,206,0,88,90, 29,598,206,0,89,91, 29,514,206,0,90,92, 29,430,206,0,91,93, 30,346,206,0,0,0 �30,766,290,0,0,0, 30,682,290,124,94,96, 30,598,290,125,95,97, 31,514,290,126,96,98, 31,430,290,127,97,99, 31,346,290,0,0,0 ̈ �31,766,374,0,0,0, 32,682,374,128,100,102, 32,598,374,129,101,103, 32,514,374,130,102,104, 32,430,374,131,103,105, 33,346,374,0,0,0 ֈ �33,766,458,0,0,0, 33,682,458,132,106,108, 33,598,458,133,107,109, 34,514,458,134,108,110, 34,430,458,135,109,111, 34,346,458,0,0,0 � �34,766,542,0,0,0, 35,682,542,136,112,114, 35,598,542,137,113,115, 35,514,542,138,114,116, 35,430,542,139,115,117, 36,346,542,0,0,0 � �36,766,626,0,0,0, 36,682,626,0,118,120, 36,598,626,0,119,121, 37,514,626,0,120,122, 37,430,626,0,121,123, 37,346,626,0,0,0 � : �T �37,690,282,0,0,0, 38,606,282,0,124,126, 38,522,282,0,125,127, 38,438,282,0,0,0 X �38,690,366,0,0,0, 39,606,366,140,128,130, 39,522,366,141,129,131, 39,438,366,0,0,0 X �39,690,450,0,0,0, 40,606,450,142,132,134, 40,522,450,143,133,135, 40,438,450,0,0,0 T �40,690,534,0,0,0, 41,606,534,0,136,138, 41,522,534,0,137,139, 41,438,534,0,0,0 & : 0, �41,614,358,144,0,0, 42,530,358,144,0,0 :, �42,614,442,144,0,0, 42,530,442,144,0,0 D �42,580,392,0,0,0 �
00000000 0d 00 0a 30 20 f4 20 3e 20 52 45 4d 65 64 49 6d |...0 . > REMedIm| 00000010 61 67 65 20 66 75 6c 6c 79 20 52 45 4d 6d 65 64 |age fully REMmed| 00000020 20 6c 69 62 72 61 72 79 20 63 6f 70 79 20 6f 66 | library copy of| 00000030 0d 00 14 45 20 f4 20 3e 20 21 52 75 6e 49 6d 61 |...E . > !RunIma| 00000040 67 65 20 20 53 68 61 6e 67 68 61 69 20 20 57 49 |ge Shanghai WI| 00000050 4d 50 20 70 61 74 69 65 6e 63 65 20 67 61 6d 65 |MP patience game| 00000060 20 20 32 2e 30 30 20 20 33 30 20 41 70 72 69 6c | 2.00 30 April| 00000070 20 31 39 39 31 0d 00 1e 3a 20 f4 20 42 79 20 57 | 1991...: . By W| 00000080 79 6e 61 6e 64 20 54 68 6f 6d 70 73 6f 6e 20 a9 |ynand Thompson .| 00000090 20 41 72 63 68 69 6d 65 64 65 73 20 57 6f 72 6c | Archimedes Worl| 000000a0 64 20 44 65 63 65 6d 62 65 72 20 31 39 39 31 0d |d December 1991.| 000000b0 00 28 05 20 0d 00 32 43 20 f4 20 2a 20 56 41 52 |.(. ..2C . * VAR| 000000c0 49 41 42 4c 45 53 20 2a 20 6d 6f 73 74 6c 79 20 |IABLES * mostly | 000000d0 6d 6e 65 6d 6f 6e 69 63 20 62 75 74 20 72 65 73 |mnemonic but res| 000000e0 69 64 65 6e 74 20 69 6e 74 65 67 65 72 20 76 61 |ident integer va| 000000f0 72 69 61 62 6c 65 73 0d 00 3c 43 20 f4 20 2a 20 |riables..<C . * | 00000100 61 72 65 20 75 73 65 64 20 77 68 65 72 65 20 6e |are used where n| 00000110 65 63 65 73 73 61 72 79 20 2d 20 74 68 65 73 65 |ecessary - these| 00000120 20 61 72 65 3a 20 46 25 20 3d 20 66 69 6c 65 20 | are: F% = file | 00000130 68 61 6e 64 6c 65 2c 20 73 6f 0d 00 46 43 20 f4 |handle, so..FC .| 00000140 20 2a 20 66 69 6c 65 28 73 29 20 63 61 6e 20 62 | * file(s) can b| 00000150 65 20 70 72 6f 70 65 72 6c 79 20 63 6c 6f 73 65 |e properly close| 00000160 64 20 69 6e 20 63 61 73 65 20 6f 66 20 65 72 72 |d in case of err| 00000170 6f 72 3b 20 4d 25 20 3d 20 74 65 6d 70 0d 00 50 |or; M% = temp..P| 00000180 43 20 f4 20 2a 20 73 74 6f 72 65 20 66 6f 72 20 |C . * store for | 00000190 6d 6f 76 65 25 20 28 6d 6f 76 65 20 6e 6f 2e 29 |move% (move no.)| 000001a0 20 77 68 69 6c 73 74 20 69 6e 20 72 65 70 6c 61 | whilst in repla| 000001b0 79 3b 20 57 25 20 3d 20 77 69 6d 70 66 6c 61 67 |y; W% = wimpflag| 000001c0 0d 00 5a 42 20 f4 20 2a 20 66 6f 72 20 69 6e 73 |..ZB . * for ins| 000001d0 74 61 6e 74 61 6e 65 6f 75 73 20 77 69 6e 64 6f |tantaneous windo| 000001e0 77 20 64 72 61 67 73 2c 20 75 73 65 64 20 69 6e |w drags, used in| 000001f0 20 6f 72 64 65 72 20 74 6f 20 72 65 73 74 72 61 | order to restra| 00000200 69 6e 0d 00 64 48 20 f4 20 2a 20 70 6f 69 6e 74 |in..dH . * point| 00000210 65 72 20 69 6e 73 69 64 65 20 72 65 70 6c 61 79 |er inside replay| 00000220 20 77 69 6e 64 6f 77 3b 20 49 25 2c 4a 25 2c 4c | window; I%,J%,L| 00000230 25 20 3d 20 6c 6f 6f 70 20 63 6f 6e 74 72 6f 6c |% = loop control| 00000240 20 76 61 72 69 61 62 6c 65 73 0d 00 6e 44 20 f4 | variables..nD .| 00000250 20 2a 20 61 6e 64 20 74 65 6d 70 20 73 74 6f 72 | * and temp stor| 00000260 65 20 77 68 69 6c 73 74 20 69 6e 20 50 52 4f 43 |e whilst in PROC| 00000270 53 2e 20 2a 20 41 52 52 41 59 53 20 2a 20 54 68 |S. * ARRAYS * Th| 00000280 72 65 65 20 61 72 72 61 79 73 20 61 72 65 0d 00 |ree arrays are..| 00000290 78 45 20 f4 20 2a 20 75 73 65 64 20 2d 20 53 25 |xE . * used - S%| 000002a0 28 29 20 73 74 6f 72 65 73 20 61 6c 6c 20 69 6e |() stores all in| 000002b0 66 6f 72 6d 61 74 69 6f 6e 20 72 65 71 75 69 72 |formation requir| 000002c0 65 64 20 66 6f 72 20 74 68 65 20 63 72 65 61 74 |ed for the creat| 000002d0 69 6f 6e 0d 00 82 44 20 f4 20 2a 20 26 20 64 65 |ion...D . * & de| 000002e0 6c 65 74 69 6f 6e 20 6f 66 20 74 69 6c 65 20 69 |letion of tile i| 000002f0 63 6f 6e 73 3b 20 48 25 28 29 20 73 74 6f 72 65 |cons; H%() store| 00000300 73 20 6d 61 74 63 68 69 6e 67 20 74 69 6c 65 20 |s matching tile | 00000310 6e 75 6d 62 65 72 73 0d 00 8c 46 20 f4 20 2a 20 |numbers...F . * | 00000320 69 6e 20 6f 72 64 65 72 20 74 6f 20 72 61 70 69 |in order to rapi| 00000330 64 6c 79 20 66 69 6e 64 20 74 69 6c 65 73 20 66 |dly find tiles f| 00000340 6f 72 20 27 73 68 6f 77 20 6d 6f 76 65 73 27 3b |or 'show moves';| 00000350 20 4d 25 28 29 20 6b 65 65 70 73 20 61 0d 00 96 | M%() keeps a...| 00000360 45 20 f4 20 2a 20 72 65 63 6f 72 64 20 6f 66 20 |E . * record of | 00000370 61 6c 6c 20 6d 6f 76 65 73 20 70 6c 61 79 65 64 |all moves played| 00000380 20 74 6f 20 65 6e 61 62 6c 65 20 70 72 6f 67 72 | to enable progr| 00000390 61 6d 20 74 6f 20 72 65 70 6c 61 79 20 67 61 6d |am to replay gam| 000003a0 65 2e 0d 00 a0 05 20 0d 00 aa 20 20 f4 20 2a 20 |e..... ... . * | 000003b0 48 61 6e 64 6c 65 20 6e 6f 6e 2d 57 49 4d 50 20 |Handle non-WIMP | 000003c0 65 72 72 6f 72 73 2e 0d 00 b4 05 20 0d 00 be 15 |errors..... ....| 000003d0 20 46 25 3d 30 3a ee 85 3a f2 65 72 72 6f 72 3a | F%=0:..:.error:| 000003e0 e0 0d 00 c8 05 20 0d 00 d2 1c 20 f4 20 2a 20 49 |..... .... . * I| 000003f0 6e 69 74 69 61 6c 69 73 65 20 70 72 6f 67 72 61 |nitialise progra| 00000400 6d 2e 0d 00 dc 05 20 0d 00 e6 0a 20 f2 69 6e 69 |m..... .... .ini| 00000410 74 0d 00 f0 05 20 0d 00 fa 1c 20 f4 20 2a 20 48 |t.... .... . * H| 00000420 61 6e 64 6c 65 20 57 49 4d 50 20 65 72 72 6f 72 |andle WIMP error| 00000430 73 2e 0d 01 04 05 20 0d 01 0e 15 20 ee 85 3a e7 |s..... .... ..:.| 00000440 a4 77 69 6d 70 65 72 72 6f 72 20 e0 0d 01 18 05 |.wimperror .....| 00000450 20 0d 01 22 1d 20 f4 20 2a 20 4d 61 69 6e 20 57 | ..". . * Main W| 00000460 49 4d 50 20 70 6f 6c 6c 20 6c 6f 6f 70 2e 0d 01 |IMP poll loop...| 00000470 2c 05 20 0d 01 36 06 20 f5 0d 01 40 26 20 20 20 |,. ..6. ...@& | 00000480 c8 99 20 22 57 69 6d 70 5f 50 6f 6c 6c 22 2c 26 |.. "Wimp_Poll",&| 00000490 31 38 32 33 2c 77 62 6c 6b 25 20 b8 20 72 25 0d |1823,wblk% . r%.| 000004a0 01 4a 0e 20 20 20 c8 8e 20 72 25 20 ca 0d 01 54 |.J. .. r% ...T| 000004b0 36 20 20 20 20 20 c9 20 32 3a 20 c8 99 20 22 57 |6 . 2: .. "W| 000004c0 69 6d 70 5f 4f 70 65 6e 57 69 6e 64 6f 77 22 2c |imp_OpenWindow",| 000004d0 2c 77 62 6c 6b 25 3a f2 72 65 73 74 72 69 63 74 |,wblk%:.restrict| 000004e0 28 30 29 0d 01 5e 2a 20 20 20 20 20 c9 20 33 3a |(0)..^* . 3:| 000004f0 20 c8 99 20 22 57 69 6d 70 5f 43 6c 6f 73 65 57 | .. "Wimp_CloseW| 00000500 69 6e 64 6f 77 22 2c 2c 77 62 6c 6b 25 0d 01 68 |indow",,wblk%..h| 00000510 3f 20 20 20 20 20 e7 21 77 62 6c 6b 25 3d 53 68 |? .!wblk%=Sh| 00000520 25 20 21 77 62 6c 6b 25 3d 72 75 6c 65 73 25 3a |% !wblk%=rules%:| 00000530 c8 99 20 22 57 69 6d 70 5f 43 6c 6f 73 65 57 69 |.. "Wimp_CloseWi| 00000540 6e 64 6f 77 22 2c 2c 77 62 6c 6b 25 0d 01 72 1a |ndow",,wblk%..r.| 00000550 20 20 20 20 20 c9 20 34 3a 20 f2 72 65 73 74 72 | . 4: .restr| 00000560 69 63 74 28 31 29 0d 01 7c 16 20 20 20 20 20 c9 |ict(1)..|. .| 00000570 20 36 3a 20 f2 62 75 74 74 6f 6e 73 0d 01 86 17 | 6: .buttons....| 00000580 20 20 20 20 20 c9 20 37 3a 20 f2 44 72 61 67 53 | . 7: .DragS| 00000590 61 76 65 0d 01 90 31 20 20 20 20 20 c9 20 38 3a |ave...1 . 8:| 000005a0 20 e7 ac a4 6b 65 79 20 c8 99 22 57 69 6d 70 5f | ...key .."Wimp_| 000005b0 50 72 6f 63 65 73 73 4b 65 79 22 2c 77 62 6c 6b |ProcessKey",wblk| 000005c0 25 21 32 34 0d 01 9a 15 20 20 20 20 20 c9 20 39 |%!24.... . 9| 000005d0 3a 20 f2 64 65 63 6f 64 65 0d 01 a4 1a 20 20 20 |: .decode.... | 000005e0 20 20 c9 20 31 37 2c 31 38 3a 20 f2 72 65 63 65 | . 17,18: .rece| 000005f0 69 76 65 0d 01 ae 26 20 20 20 20 20 c9 20 31 39 |ive...& . 19| 00000600 3a 20 c8 99 20 22 4f 53 5f 46 69 6c 65 22 2c 36 |: .. "OS_File",6| 00000610 2c 77 62 6c 6b 25 2b 34 34 0d 01 b8 33 20 20 20 |,wblk%+44...3 | 00000620 20 20 85 32 35 35 2c 22 44 61 74 61 20 74 72 61 | .255,"Data tra| 00000630 6e 73 66 65 72 20 66 61 69 6c 65 64 3a 20 72 65 |nsfer failed: re| 00000640 63 65 69 76 65 72 20 64 69 65 64 22 0d 01 c2 08 |ceiver died"....| 00000650 20 20 20 cb 0d 01 cc 0d 20 fd 71 75 69 74 25 3d | ..... .quit%=| 00000660 b9 0d 01 d6 0b 20 f2 63 6c 6f 73 65 0d 01 e0 06 |..... .close....| 00000670 20 e0 0d 01 ea 05 20 0d 01 f4 2b 20 f4 20 2a 20 | ..... ...+ . * | 00000680 48 61 6e 64 6c 65 20 6d 65 73 73 61 67 65 73 20 |Handle messages | 00000690 72 65 63 65 69 76 65 64 20 76 69 61 20 57 49 4d |received via WIM| 000006a0 50 2e 0d 01 fe 05 20 0d 02 08 0e 20 dd f2 72 65 |P..... .... ..re| 000006b0 63 65 69 76 65 0d 02 12 12 20 c8 8e 20 77 62 6c |ceive.... .. wbl| 000006c0 6b 25 21 31 36 20 ca 0d 02 1c 13 20 20 20 c9 20 |k%!16 ..... . | 000006d0 30 3a 20 71 75 69 74 25 3d b9 0d 02 26 11 20 20 |0: quit%=...&. | 000006e0 20 c9 20 32 3a 20 f2 73 61 76 65 0d 02 30 2e 20 | . 2: .save..0. | 000006f0 20 20 c9 20 33 2c 35 3a 20 e7 77 62 6c 6b 25 21 | . 3,5: .wblk%!| 00000700 31 32 3d 30 20 80 77 62 6c 6b 25 21 34 30 3d 26 |12=0 .wblk%!40=&| 00000710 30 30 30 20 f2 6c 6f 61 64 0d 02 3a 06 20 cb 0d |000 .load..:. ..| 00000720 02 44 06 20 e1 0d 02 4e 05 20 0d 02 58 45 20 f4 |.D. ...N. ..XE .| 00000730 20 2a 20 57 49 4d 50 20 65 72 72 6f 72 3b 20 63 | * WIMP error; c| 00000740 6c 6f 73 65 20 61 6c 6c 20 6f 75 72 20 6f 70 65 |lose all our ope| 00000750 6e 20 66 69 6c 65 73 2c 20 74 68 65 6e 20 63 6f |n files, then co| 00000760 6e 74 69 6e 75 65 20 6f 72 20 71 75 69 74 3f 0d |ntinue or quit?.| 00000770 02 62 05 20 0d 02 6c 10 20 dd a4 77 69 6d 70 65 |.b. ..l. ..wimpe| 00000780 72 72 6f 72 0d 02 76 14 20 e7 46 25 3e 30 20 d9 |rror..v. .F%>0 .| 00000790 23 46 25 3a 46 25 3d 30 0d 02 80 3e 20 21 77 62 |#F%:F%=0...> !wb| 000007a0 6c 6b 25 3d 9f 3a 24 28 77 62 6c 6b 25 2b 34 29 |lk%=.:$(wblk%+4)| 000007b0 3d f6 24 2b 22 20 28 69 6e 74 65 72 6e 61 6c 20 |=.$+" (internal | 000007c0 65 72 72 6f 72 20 63 6f 64 65 20 22 2b c3 9e 2b |error code "+..+| 000007d0 22 29 22 2b bd 30 0d 02 8a 32 20 c8 99 20 22 57 |")"+.0...2 .. "W| 000007e0 69 6d 70 5f 52 65 70 6f 72 74 45 72 72 6f 72 22 |imp_ReportError"| 000007f0 2c 77 62 6c 6b 25 2c 33 2c 22 53 68 61 6e 67 68 |,wblk%,3,"Shangh| 00000800 61 69 22 20 b8 20 2c 72 0d 02 94 18 20 e7 72 3d |ai" . ,r.... .r=| 00000810 32 20 f2 63 6c 6f 73 65 3a 3d b9 20 8b 3a 3d a3 |2 .close:=. .:=.| 00000820 0d 02 9e 05 20 0d 02 a8 1e 20 f4 20 2a 20 43 6c |.... .... . * Cl| 00000830 6f 73 65 20 64 6f 77 6e 20 21 53 68 61 6e 67 68 |ose down !Shangh| 00000840 61 69 2e 0d 02 b2 05 20 0d 02 bc 0c 20 dd f2 63 |ai..... .... ..c| 00000850 6c 6f 73 65 0d 02 c6 12 20 24 77 62 6c 6b 25 3d |lose.... $wblk%=| 00000860 22 54 41 53 4b 22 0d 02 d0 25 20 c8 99 20 22 57 |"TASK"...% .. "W| 00000870 69 6d 70 5f 43 6c 6f 73 65 44 6f 77 6e 22 2c 74 |imp_CloseDown",t| 00000880 61 73 6b 25 2c 21 77 62 6c 6b 25 0d 02 da 06 20 |ask%,!wblk%.... | 00000890 e1 0d 02 e4 05 20 0d 02 ee 46 20 f4 20 2a 20 6e |..... ...F . * n| 000008a0 6f 6e 2d 57 49 4d 50 20 65 72 72 6f 72 3b 20 63 |on-WIMP error; c| 000008b0 6c 6f 73 65 20 61 6c 6c 20 6f 75 72 20 6f 70 65 |lose all our ope| 000008c0 6e 20 66 69 6c 65 73 2c 20 72 65 70 6f 72 74 20 |n files, report | 000008d0 65 72 72 6f 72 2c 20 71 75 69 74 2e 0d 02 f8 05 |error, quit.....| 000008e0 20 0d 03 02 0c 20 dd f2 65 72 72 6f 72 0d 03 0c | .... ..error...| 000008f0 08 20 ee 85 87 0d 03 16 30 20 c8 99 20 22 57 69 |. ......0 .. "Wi| 00000900 6d 70 5f 43 6c 6f 73 65 54 65 6d 70 6c 61 74 65 |mp_CloseTemplate| 00000910 22 3a c8 99 20 22 57 69 6d 70 5f 43 6c 6f 73 65 |":.. "Wimp_Close| 00000920 44 6f 77 6e 22 0d 03 20 14 20 e7 46 25 3e 30 20 |Down".. . .F%>0 | 00000930 d9 23 46 25 3a 46 25 3d 30 0d 03 2a 15 20 f6 3a |.#F%:F%=0..*. .:| 00000940 f1 22 20 61 74 20 6c 69 6e 65 20 22 3b 9e 0d 03 |." at line ";...| 00000950 34 06 20 e1 0d 03 3e 05 20 0d 03 48 47 20 f4 20 |4. ...>. ..HG . | 00000960 2a 20 49 6e 69 74 69 61 6c 69 73 65 20 57 49 4d |* Initialise WIM| 00000970 50 2e 20 20 44 49 4d 20 6d 65 6d 6f 72 79 20 62 |P. DIM memory b| 00000980 6c 6f 63 6b 73 20 26 20 61 72 72 61 79 73 2e 20 |locks & arrays. | 00000990 20 49 6e 69 74 69 61 6c 69 73 65 20 6d 61 69 6e | Initialise main| 000009a0 0d 03 52 43 20 f4 20 2a 20 76 61 72 69 61 62 6c |..RC . * variabl| 000009b0 65 73 2e 20 20 43 6c 65 61 72 20 73 70 72 69 74 |es. Clear sprit| 000009c0 65 20 61 72 65 61 20 26 20 6c 6f 61 64 20 73 70 |e area & load sp| 000009d0 72 69 74 65 73 2e 20 20 4c 6f 61 64 20 77 69 6e |rites. Load win| 000009e0 64 6f 77 0d 03 5c 49 20 f4 20 2a 20 74 65 6d 70 |dow..\I . * temp| 000009f0 6c 61 74 65 73 20 26 20 63 72 65 61 74 65 20 77 |lates & create w| 00000a00 69 6e 64 6f 77 73 20 66 6f 72 20 69 6e 66 6f 2c |indows for info,| 00000a10 20 67 61 6d 65 2c 20 72 75 6c 65 73 2c 20 72 65 | game, rules, re| 00000a20 70 6c 61 79 2c 20 73 74 61 74 75 73 0d 03 66 47 |play, status..fG| 00000a30 20 f4 20 2a 20 26 20 73 61 76 65 2e 20 20 4c 6f | . * & save. Lo| 00000a40 61 64 20 6d 65 6e 75 20 64 61 74 61 2e 20 20 49 |ad menu data. I| 00000a50 6e 69 74 69 61 6c 69 73 65 20 6d 61 69 6e 20 61 |nitialise main a| 00000a60 72 72 61 79 2c 20 53 25 28 29 2e 20 20 43 72 65 |rray, S%(). Cre| 00000a70 61 74 65 0d 03 70 48 20 f4 20 2a 20 69 63 6f 6e |ate..pH . * icon| 00000a80 73 20 69 6e 20 27 72 75 6c 65 73 27 20 77 69 6e |s in 'rules' win| 00000a90 64 6f 77 2e 20 20 49 66 20 73 74 61 72 74 65 64 |dow. If started| 00000aa0 20 62 79 20 64 6f 75 62 6c 65 2d 63 6c 69 63 6b | by double-click| 00000ab0 20 6f 72 20 64 72 61 67 20 6f 6e 0d 03 7a 47 20 | or drag on..zG | 00000ac0 f4 20 2a 20 73 61 76 65 64 20 67 61 6d 65 20 74 |. * saved game t| 00000ad0 68 65 6e 20 6c 6f 61 64 20 64 61 74 61 2c 20 75 |hen load data, u| 00000ae0 70 64 61 74 65 20 67 61 6d 65 2c 20 77 69 6e 64 |pdate game, wind| 00000af0 6f 77 20 26 20 76 61 72 69 61 62 6c 65 73 20 61 |ow & variables a| 00000b00 6e 64 0d 03 84 42 20 f4 20 2a 20 6f 70 65 6e 20 |nd...B . * open | 00000b10 77 69 6e 64 6f 77 2c 20 65 6c 73 65 20 73 68 75 |window, else shu| 00000b20 66 66 6c 65 20 26 20 64 65 61 6c 2e 20 20 47 61 |ffle & deal. Ga| 00000b30 6d 65 20 69 63 6f 6e 20 74 6f 20 69 63 6f 6e 20 |me icon to icon | 00000b40 62 61 72 2e 0d 03 8e 05 20 0d 03 98 0b 20 dd f2 |bar..... .... ..| 00000b50 69 6e 69 74 0d 03 a2 3b 20 c8 99 20 22 57 69 6d |init...; .. "Wim| 00000b60 70 5f 49 6e 69 74 69 61 6c 69 73 65 22 2c 32 30 |p_Initialise",20| 00000b70 30 2c 26 34 42 35 33 34 31 35 34 2c 22 53 68 61 |0,&4B534154,"Sha| 00000b80 6e 67 68 61 69 22 20 b8 20 2c 74 61 73 6b 25 0d |nghai" . ,task%.| 00000b90 03 ac 4c 20 de 20 77 62 6c 6b 25 20 26 31 31 36 |..L . wblk% &116| 00000ba0 30 2c 69 63 6e 25 20 26 43 30 34 2c 73 70 25 20 |0,icn% &C04,sp% | 00000bb0 26 43 34 34 38 2c 6d 65 6e 75 25 20 32 35 32 2c |&C448,menu% 252,| 00000bc0 53 25 28 31 34 34 2c 35 29 2c 48 25 28 33 35 2c |S%(144,5),H%(35,| 00000bd0 33 29 2c 4d 25 28 37 31 2c 31 29 0d 03 b6 2b 20 |3),M%(71,1)...+ | 00000be0 73 70 25 21 30 3d 26 43 34 34 38 3a 73 70 25 21 |sp%!0=&C448:sp%!| 00000bf0 34 3d 30 3a 73 70 25 21 38 3d 31 36 3a 73 70 25 |4=0:sp%!8=16:sp%| 00000c00 21 31 32 3d 31 36 0d 03 c0 1d 20 c8 99 20 22 4f |!12=16.... .. "O| 00000c10 53 5f 53 70 72 69 74 65 4f 70 22 2c 32 36 35 2c |S_SpriteOp",265,| 00000c20 73 70 25 0d 03 ca 36 20 c8 99 20 22 4f 53 5f 53 |sp%...6 .. "OS_S| 00000c30 70 72 69 74 65 4f 70 22 2c 32 36 36 2c 73 70 25 |priteOp",266,sp%| 00000c40 2c 22 3c 53 68 61 6e 67 68 61 69 24 44 69 72 3e |,"<Shanghai$Dir>| 00000c50 2e 53 70 72 69 74 65 73 22 0d 03 d4 37 20 c8 99 |.Sprites"...7 ..| 00000c60 20 22 57 69 6d 70 5f 4f 70 65 6e 54 65 6d 70 6c | "Wimp_OpenTempl| 00000c70 61 74 65 22 2c 2c 22 3c 53 68 61 6e 67 68 61 69 |ate",,"<Shanghai| 00000c80 24 44 69 72 3e 2e 54 65 6d 70 6c 61 74 65 73 22 |$Dir>.Templates"| 00000c90 0d 03 de 0c 20 78 25 3d 69 63 6e 25 0d 03 e8 1c |.... x%=icn%....| 00000ca0 20 69 6e 66 6f 25 3d a4 77 69 6e 64 6f 77 28 22 | info%=.window("| 00000cb0 69 6e 66 6f 22 2c 30 29 0d 03 f2 1f 20 53 68 25 |info",0).... Sh%| 00000cc0 3d a4 77 69 6e 64 6f 77 28 22 53 68 61 6e 67 68 |=.window("Shangh| 00000cd0 61 69 22 2c 2d 31 29 0d 03 fc 1f 20 72 75 6c 65 |ai",-1).... rule| 00000ce0 73 25 3d a4 77 69 6e 64 6f 77 28 22 72 75 6c 65 |s%=.window("rule| 00000cf0 73 22 2c 2d 31 29 0d 04 06 20 20 73 74 61 74 75 |s",-1)... statu| 00000d00 73 25 3d a4 77 69 6e 64 6f 77 28 22 73 74 61 74 |s%=.window("stat| 00000d10 75 73 22 2c 30 29 0d 04 10 27 20 72 65 70 6c 61 |us",0)...' repla| 00000d20 79 25 3d a4 77 69 6e 64 6f 77 28 22 72 65 70 6c |y%=.window("repl| 00000d30 61 79 22 2c 30 29 3a 72 65 70 25 3d a3 0d 04 1a |ay",0):rep%=....| 00000d40 25 20 66 69 6c 65 25 3d 78 25 3a 73 61 76 65 25 |% file%=x%:save%| 00000d50 3d a4 77 69 6e 64 6f 77 28 22 73 61 76 65 22 2c |=.window("save",| 00000d60 30 29 0d 04 24 1c 20 c8 99 20 22 57 69 6d 70 5f |0)..$. .. "Wimp_| 00000d70 43 6c 6f 73 65 54 65 6d 70 6c 61 74 65 22 0d 04 |CloseTemplate"..| 00000d80 2e 2b 20 ff 20 22 4c 4f 41 44 20 3c 53 68 61 6e |.+ . "LOAD <Shan| 00000d90 67 68 61 69 24 44 69 72 3e 2e 4d 65 6e 75 73 20 |ghai$Dir>.Menus | 00000da0 22 2b c3 7e 6d 65 6e 75 25 0d 04 38 24 20 69 62 |"+.~menu%..8$ ib| 00000db0 6c 6b 25 3d 77 62 6c 6b 25 2b 32 35 36 3a 70 62 |lk%=wblk%+256:pb| 00000dc0 6c 6b 25 3d 77 62 6c 6b 25 2b 35 31 32 0d 04 42 |lk%=wblk%+512..B| 00000dd0 35 20 6d 65 6e 75 25 21 33 32 3d 69 6e 66 6f 25 |5 menu%!32=info%| 00000de0 3a 6d 65 6e 75 25 21 31 38 34 3d 73 74 61 74 75 |:menu%!184=statu| 00000df0 73 25 3a 6d 65 6e 75 25 21 32 33 32 3d 73 61 76 |s%:menu%!232=sav| 00000e00 65 25 0d 04 4c 23 20 68 6e 74 25 3d 6d 65 6e 75 |e%..L# hnt%=menu| 00000e10 25 2b 31 36 34 3a 72 70 6c 79 25 3d 6d 65 6e 75 |%+164:rply%=menu| 00000e20 25 2b 31 34 32 0d 04 56 0e 20 e3 49 25 3d 30 b8 |%+142..V. .I%=0.| 00000e30 31 34 34 0d 04 60 3d 20 20 20 f3 53 25 28 49 25 |144..`= .S%(I%| 00000e40 2c 30 29 2c 53 25 28 49 25 2c 31 29 2c 53 25 28 |,0),S%(I%,1),S%(| 00000e50 49 25 2c 32 29 2c 53 25 28 49 25 2c 33 29 2c 53 |I%,2),S%(I%,3),S| 00000e60 25 28 49 25 2c 34 29 2c 53 25 28 49 25 2c 35 29 |%(I%,4),S%(I%,5)| 00000e70 0d 04 6a 06 20 ed 0d 04 74 1e 20 49 25 3d 31 3a |..j. ...t. I%=1:| 00000e80 e3 59 25 3d 2d 31 38 39 38 b8 2d 31 39 39 38 88 |.Y%=-1898.-1998.| 00000e90 2d 31 30 30 0d 04 7e 16 20 20 20 e3 58 25 3d 31 |-100..~. .X%=1| 00000ea0 35 30 b8 34 35 30 88 31 30 30 0d 04 88 26 20 20 |50.450.100...& | 00000eb0 20 20 20 f2 69 63 6f 6e 28 72 75 6c 65 73 25 2c | .icon(rules%,| 00000ec0 c3 49 25 2c 58 25 2c 59 25 29 3a 49 25 2b 3d 31 |.I%,X%,Y%):I%+=1| 00000ed0 0d 04 92 08 20 ed 3a ed 0d 04 9c 14 20 e3 58 25 |.... .:..... .X%| 00000ee0 3d 31 35 30 b8 33 35 30 88 31 30 30 0d 04 a6 27 |=150.350.100...'| 00000ef0 20 20 20 f2 69 63 6f 6e 28 72 75 6c 65 73 25 2c | .icon(rules%,| 00000f00 c3 49 25 2c 58 25 2c 2d 32 30 39 38 29 3a 49 25 |.I%,X%,-2098):I%| 00000f10 2b 3d 31 0d 04 b0 06 20 ed 0d 04 ba 14 20 e3 58 |+=1.... ..... .X| 00000f20 25 3d 31 35 30 b8 34 35 30 88 31 30 30 0d 04 c4 |%=150.450.100...| 00000f30 27 20 20 20 f2 69 63 6f 6e 28 72 75 6c 65 73 25 |' .icon(rules%| 00000f40 2c c3 49 25 2c 58 25 2c 2d 32 31 39 38 29 3a 49 |,.I%,X%,-2198):I| 00000f50 25 2b 3d 31 0d 04 ce 06 20 ed 0d 04 d8 19 20 e3 |%+=1.... ..... .| 00000f60 59 25 3d 2d 32 32 39 38 b8 2d 32 34 39 38 88 2d |Y%=-2298.-2498.-| 00000f70 31 30 30 0d 04 e2 16 20 20 20 e3 58 25 3d 31 35 |100.... .X%=15| 00000f80 30 b8 39 35 30 88 31 30 30 0d 04 ec 26 20 20 20 |0.950.100...& | 00000f90 20 20 f2 69 63 6f 6e 28 72 75 6c 65 73 25 2c c3 | .icon(rules%,.| 00000fa0 49 25 2c 58 25 2c 59 25 29 3a 49 25 2b 3d 31 0d |I%,X%,Y%):I%+=1.| 00000fb0 04 f6 08 20 ed 3a ed 0d 05 00 12 20 f2 62 6c 61 |... .:..... .bla| 00000fc0 6e 6b 3a 6e 65 77 25 3d b9 0d 05 0a 1b 20 c8 99 |nk:new%=..... ..| 00000fd0 20 22 4f 53 5f 47 65 74 45 6e 76 22 20 b8 20 70 | "OS_GetEnv" . p| 00000fe0 61 74 68 24 0d 05 14 4d 20 e7 c2 70 61 74 68 24 |ath$...M ..path$| 00000ff0 2c 31 29 3c 3e 22 20 22 20 70 61 74 68 24 3d c1 |,1)<>" " path$=.| 00001000 70 61 74 68 24 2c a7 70 61 74 68 24 2c 22 22 22 |path$,.path$,"""| 00001010 20 22 29 2b 32 29 3a f2 72 65 61 64 28 a3 29 20 | ")+2):.read(.) | 00001020 8b f2 64 65 61 6c 28 b9 29 3a 6d 6f 76 65 25 3d |..deal(.):move%=| 00001030 30 0d 05 1e 49 20 21 69 62 6c 6b 25 3d 2d 31 3a |0...I !iblk%=-1:| 00001040 69 62 6c 6b 25 21 34 3d 30 3a 69 62 6c 6b 25 21 |iblk%!4=0:iblk%!| 00001050 38 3d 30 3a 69 62 6c 6b 25 21 31 32 3d 37 30 3a |8=0:iblk%!12=70:| 00001060 69 62 6c 6b 25 21 31 36 3d 36 38 3a 69 62 6c 6b |iblk%!16=68:iblk| 00001070 25 21 32 30 3d 26 33 30 30 32 0d 05 28 1c 20 24 |%!20=&3002..(. $| 00001080 28 69 62 6c 6b 25 2b 32 34 29 3d 22 21 73 68 61 |(iblk%+24)="!sha| 00001090 6e 67 68 61 69 22 0d 05 32 20 20 c8 99 20 22 57 |nghai"..2 .. "W| 000010a0 69 6d 70 5f 43 72 65 61 74 65 49 63 6f 6e 22 2c |imp_CreateIcon",| 000010b0 2c 69 62 6c 6b 25 0d 05 3c 0c 20 71 75 69 74 25 |,iblk%..<. quit%| 000010c0 3d a3 0d 05 46 06 20 e1 0d 05 50 05 20 0d 05 5a |=...F. ...P. ..Z| 000010d0 3f 20 f4 20 2a 20 4c 6f 61 64 20 74 65 6d 70 6c |? . * Load templ| 000010e0 61 74 65 20 26 20 43 72 65 61 74 65 20 77 69 6e |ate & Create win| 000010f0 64 6f 77 2e 20 20 52 65 74 75 72 6e 73 20 77 69 |dow. Returns wi| 00001100 6e 64 6f 77 20 68 61 6e 64 6c 65 2e 0d 05 64 05 |ndow handle...d.| 00001110 20 0d 05 6e 16 20 dd a4 77 69 6e 64 6f 77 28 77 | ..n. ..window(w| 00001120 24 2c 73 70 72 25 29 0d 05 78 3e 20 c8 99 20 22 |$,spr%)..x> .. "| 00001130 57 69 6d 70 5f 4c 6f 61 64 54 65 6d 70 6c 61 74 |Wimp_LoadTemplat| 00001140 65 22 2c 2c 77 62 6c 6b 25 2c 78 25 2c 69 63 6e |e",,wblk%,x%,icn| 00001150 25 2b 26 43 30 34 2c 2d 31 2c 77 24 2c 30 20 b8 |%+&C04,-1,w$,0 .| 00001160 20 2c 2c 78 25 0d 05 82 17 20 e7 73 70 72 25 20 | ,,x%.... .spr% | 00001170 77 62 6c 6b 25 21 36 34 3d 73 70 25 0d 05 8c 27 |wblk%!64=sp%...'| 00001180 20 c8 99 20 22 57 69 6d 70 5f 43 72 65 61 74 65 | .. "Wimp_Create| 00001190 57 69 6e 64 6f 77 22 2c 2c 77 62 6c 6b 25 20 b8 |Window",,wblk% .| 000011a0 20 68 25 0d 05 96 08 20 3d 68 25 0d 05 a0 05 20 | h%.... =h%.... | 000011b0 0d 05 aa 19 20 f4 20 2a 20 4f 70 65 6e 73 20 77 |.... . * Opens w| 000011c0 69 6e 64 6f 77 20 20 77 25 0d 05 b4 05 20 0d 05 |indow w%.... ..| 000011d0 be 0f 20 dd f2 6f 70 65 6e 28 77 25 29 0d 05 c8 |.. ..open(w%)...| 000011e0 2f 20 77 62 6c 6b 25 21 30 3d 77 25 3a c8 99 20 |/ wblk%!0=w%:.. | 000011f0 22 57 69 6d 70 5f 47 65 74 57 69 6e 64 6f 77 53 |"Wimp_GetWindowS| 00001200 74 61 74 65 22 2c 2c 77 62 6c 6b 25 0d 05 d2 2c |tate",,wblk%...,| 00001210 20 77 62 6c 6b 25 21 32 38 3d 2d 31 3a c8 99 20 | wblk%!28=-1:.. | 00001220 22 57 69 6d 70 5f 4f 70 65 6e 57 69 6e 64 6f 77 |"Wimp_OpenWindow| 00001230 22 2c 2c 77 62 6c 6b 25 0d 05 dc 06 20 e1 0d 05 |",,wblk%.... ...| 00001240 e6 05 20 0d 05 f0 45 20 f4 20 2a 20 52 65 73 74 |.. ...E . * Rest| 00001250 72 69 63 74 73 20 70 6f 69 6e 74 65 72 20 69 6e |ricts pointer in| 00001260 73 69 64 65 20 72 65 70 6c 61 79 20 77 69 6e 64 |side replay wind| 00001270 6f 77 20 2d 20 74 68 69 73 20 50 52 4f 43 20 69 |ow - this PROC i| 00001280 73 20 6e 65 65 64 65 64 0d 05 fa 46 20 f4 20 2a |s needed...F . *| 00001290 20 61 73 20 57 49 4d 50 20 64 6f 65 73 20 6e 6f | as WIMP does no| 000012a0 74 20 72 65 74 75 72 6e 20 72 65 61 73 6f 6e 20 |t return reason | 000012b0 63 6f 64 65 20 37 20 28 64 72 61 67 20 62 6f 78 |code 7 (drag box| 000012c0 20 64 72 6f 70 70 65 64 29 20 66 72 6f 6d 0d 06 | dropped) from..| 000012d0 04 47 20 f4 20 2a 20 73 79 73 74 65 6d 20 64 72 |.G . * system dr| 000012e0 61 67 20 74 79 70 65 20 31 20 28 77 69 6e 64 6f |ag type 1 (windo| 000012f0 77 20 64 72 61 67 29 20 2d 20 72 65 61 73 6f 6e |w drag) - reason| 00001300 20 63 6f 64 65 20 32 20 28 6f 70 65 6e 20 77 69 | code 2 (open wi| 00001310 6e 64 6f 77 29 0d 06 0e 46 20 f4 20 2a 20 26 20 |ndow)...F . * & | 00001320 72 65 61 73 6f 6e 20 63 6f 64 65 20 34 20 28 70 |reason code 4 (p| 00001330 6f 69 6e 74 65 72 20 6c 65 61 76 69 6e 67 20 77 |ointer leaving w| 00001340 69 6e 64 6f 77 29 20 61 72 65 20 75 73 65 64 20 |indow) are used | 00001350 69 6e 73 74 65 61 64 20 66 6f 72 0d 06 18 3e 20 |instead for...> | 00001360 f4 20 2a 20 6e 6f 6e 2d 69 6e 73 74 61 6e 74 61 |. * non-instanta| 00001370 6e 65 6f 75 73 20 26 20 69 6e 73 74 61 6e 74 61 |neous & instanta| 00001380 6e 65 6f 75 73 20 64 72 61 67 73 20 72 65 73 70 |neous drags resp| 00001390 65 63 74 69 76 65 6c 79 2e 0d 06 22 05 20 0d 06 |ectively...". ..| 000013a0 2c 13 20 dd f2 72 65 73 74 72 69 63 74 28 77 25 |,. ..restrict(w%| 000013b0 29 0d 06 36 62 20 e7 72 65 70 25 3a e7 21 77 62 |)..6b .rep%:.!wb| 000013c0 6c 6b 25 3d 72 65 70 6c 61 79 25 3a e7 77 25 3d |lk%=replay%:.w%=| 000013d0 28 57 25 80 31 29 20 c8 99 20 22 57 69 6d 70 5f |(W%.1) .. "Wimp_| 000013e0 47 65 74 57 69 6e 64 6f 77 53 74 61 74 65 22 2c |GetWindowState",| 000013f0 2c 77 62 6c 6b 25 3a c8 97 c8 93 20 77 62 6c 6b |,wblk%:.... wblk| 00001400 25 21 34 2c 77 62 6c 6b 25 21 38 2c 33 30 38 2c |%!4,wblk%!8,308,| 00001410 32 35 36 0d 06 40 06 20 e1 0d 06 4a 05 20 0d 06 |256..@. ...J. ..| 00001420 54 44 20 f4 20 2a 20 43 72 65 61 74 65 73 20 32 |TD . * Creates 2| 00001430 20 73 6d 61 6c 6c 20 69 6e 76 69 73 69 62 6c 65 | small invisible| 00001440 20 69 63 6f 6e 73 2c 20 68 61 6e 64 6c 65 20 4e | icons, handle N| 00001450 6f 73 2e 20 30 20 26 20 31 34 35 20 2d 20 74 68 |os. 0 & 145 - th| 00001460 69 73 0d 06 5e 47 20 f4 20 2a 20 65 6e 61 62 6c |is..^G . * enabl| 00001470 65 73 20 74 69 6c 65 20 69 63 6f 6e 73 20 74 6f |es tile icons to| 00001480 20 62 65 20 75 6e 2d 64 65 6c 65 74 65 64 20 62 | be un-deleted b| 00001490 79 20 73 69 6d 70 6c 79 20 75 6e 2d 73 65 74 74 |y simply un-sett| 000014a0 69 6e 67 20 74 68 65 69 72 0d 06 68 46 20 f4 20 |ing their..hF . | 000014b0 2a 20 69 63 6f 6e 20 64 65 6c 65 74 65 64 20 66 |* icon deleted f| 000014c0 6c 61 67 2e 20 20 51 75 69 63 6b 65 72 20 74 68 |lag. Quicker th| 000014d0 61 6e 20 72 65 2d 63 72 65 61 74 69 6e 67 20 69 |an re-creating i| 000014e0 63 6f 6e 2c 20 73 63 72 65 65 6e 20 75 70 2d 0d |con, screen up-.| 000014f0 06 72 40 20 f4 20 2a 20 64 61 74 69 6e 67 20 69 |.r@ . * dating i| 00001500 73 20 61 75 74 6f 6d 61 74 69 63 20 26 20 69 63 |s automatic & ic| 00001510 6f 6e 20 72 65 74 61 69 6e 73 20 69 74 73 20 70 |on retains its p| 00001520 72 65 76 69 6f 75 73 20 68 61 6e 64 6c 65 2e 0d |revious handle..| 00001530 06 7c 05 20 0d 06 86 0c 20 dd f2 62 6c 61 6e 6b |.|. .... ..blank| 00001540 0d 06 90 45 20 21 69 62 6c 6b 25 3d 53 68 25 3a |...E !iblk%=Sh%:| 00001550 69 62 6c 6b 25 21 34 3d 30 3a 69 62 6c 6b 25 21 |iblk%!4=0:iblk%!| 00001560 38 3d 2d 31 3a 69 62 6c 6b 25 21 31 32 3d 31 3a |8=-1:iblk%!12=1:| 00001570 69 62 6c 6b 25 21 31 36 3d 30 3a 69 62 6c 6b 25 |iblk%!16=0:iblk%| 00001580 21 32 30 3d 31 0d 06 9a 13 20 24 28 69 62 6c 6b |!20=1.... $(iblk| 00001590 25 2b 32 34 29 3d 22 22 0d 06 a4 20 20 c8 99 20 |%+24)=""... .. | 000015a0 22 57 69 6d 70 5f 43 72 65 61 74 65 49 63 6f 6e |"Wimp_CreateIcon| 000015b0 22 2c 2c 69 62 6c 6b 25 0d 06 ae 06 20 e1 0d 06 |",,iblk%.... ...| 000015c0 b8 05 20 0d 06 c2 46 20 f4 20 2a 20 4d 6f 75 73 |.. ...F . * Mous| 000015d0 65 20 62 75 74 74 6f 6e 20 70 72 65 73 73 65 64 |e button pressed| 000015e0 2e 20 20 49 66 20 6d 61 69 6e 20 6d 65 6e 75 20 |. If main menu | 000015f0 72 65 71 75 65 73 74 65 64 2c 20 46 4e 66 69 6e |requested, FNfin| 00001600 64 5f 68 69 6e 74 20 69 73 0d 06 cc 46 20 f4 20 |d_hint is...F . | 00001610 2a 20 69 73 20 63 61 6c 6c 65 64 2c 20 69 66 20 |* is called, if | 00001620 6e 6f 20 6d 6f 76 65 73 20 66 6f 75 6e 64 20 74 |no moves found t| 00001630 68 65 6e 20 27 53 68 6f 77 20 6d 6f 76 65 73 27 |hen 'Show moves'| 00001640 20 69 73 20 67 72 65 79 65 64 2d 6f 75 74 2e 0d | is greyed-out..| 00001650 06 d6 05 20 0d 06 e0 0e 20 dd f2 62 75 74 74 6f |... .... ..butto| 00001660 6e 73 0d 06 ea 0c 20 61 64 6a 25 3d 2d 31 0d 06 |ns.... adj%=-1..| 00001670 f4 22 20 e7 77 62 6c 6b 25 21 31 32 3d 53 68 25 |." .wblk%!12=Sh%| 00001680 20 80 73 68 6f 77 25 20 f2 68 69 6e 74 28 30 29 | .show% .hint(0)| 00001690 0d 06 fe 11 20 c8 8e 20 77 62 6c 6b 25 21 38 20 |.... .. wblk%!8 | 000016a0 ca 0d 07 08 21 20 20 20 c9 20 31 36 2c 36 34 20 |....! . 16,64 | 000016b0 3a 20 f4 20 2a 2a 2a 20 43 4c 49 43 4b 2f 44 52 |: . *** CLICK/DR| 000016c0 41 47 0d 07 12 14 20 20 20 c8 8e 20 77 62 6c 6b |AG.... .. wblk| 000016d0 25 21 31 32 20 ca 0d 07 1c 45 20 20 20 20 20 c9 |%!12 ....E .| 000016e0 20 72 65 70 6c 61 79 25 3a 20 21 77 62 6c 6b 25 | replay%: !wblk%| 000016f0 3d 72 65 70 6c 61 79 25 3a 77 62 6c 6b 25 21 34 |=replay%:wblk%!4| 00001700 3d 31 3a c8 99 20 22 57 69 6d 70 5f 44 72 61 67 |=1:.. "Wimp_Drag| 00001710 42 6f 78 22 2c 2c 77 62 6c 6b 25 0d 07 26 17 20 |Box",,wblk%..&. | 00001720 20 20 20 20 c9 20 73 61 76 65 25 3a 20 f2 64 72 | . save%: .dr| 00001730 61 67 0d 07 30 08 20 20 20 cb 0d 07 3a 1b 20 20 |ag..0. ...:. | 00001740 20 c9 20 34 20 3a 20 f4 20 2a 2a 2a 20 3c 53 45 | . 4 : . *** <SE| 00001750 4c 45 43 54 3e 0d 07 44 14 20 20 20 c8 8e 20 77 |LECT>..D. .. w| 00001760 62 6c 6b 25 21 31 32 20 ca 0d 07 4e 15 20 20 20 |blk%!12 ...N. | 00001770 20 20 c9 20 53 68 25 3a 20 f2 6d 6f 76 65 0d 07 | . Sh%: .move..| 00001780 58 12 20 20 20 20 20 c9 20 72 65 70 6c 61 79 25 |X. . replay%| 00001790 0d 07 62 16 20 20 20 20 20 c8 8e 20 77 62 6c 6b |..b. .. wblk| 000017a0 25 21 31 36 20 ca 0d 07 6c 15 20 20 20 20 20 20 |%!16 ...l. | 000017b0 20 c9 20 31 3a 20 f2 62 61 63 6b 0d 07 76 18 20 | . 1: .back..v. | 000017c0 20 20 20 20 20 20 c9 20 32 3a 20 f2 66 6f 72 77 | . 2: .forw| 000017d0 61 72 64 0d 07 80 27 20 20 20 20 20 20 20 c9 20 |ard...' . | 000017e0 33 2c 34 2c 35 3a 20 f2 63 6f 6e 74 69 6e 75 65 |3,4,5: .continue| 000017f0 28 77 62 6c 6b 25 21 31 36 29 0d 07 8a 0a 20 20 |(wblk%!16).... | 00001800 20 20 20 cb 0d 07 94 27 20 20 20 20 20 c9 20 73 | ....' . s| 00001810 61 76 65 25 3a 20 e7 77 62 6c 6b 25 21 31 36 3d |ave%: .wblk%!16=| 00001820 32 20 f2 42 75 74 74 53 61 76 65 0d 07 9e 19 20 |2 .ButtSave.... | 00001830 20 20 20 20 c9 20 2d 32 3a 20 f2 6f 70 65 6e 28 | . -2: .open(| 00001840 53 68 25 29 0d 07 a8 08 20 20 20 cb 0d 07 b2 19 |Sh%).... .....| 00001850 20 20 20 c9 20 32 20 3a 20 f4 20 2a 2a 2a 20 3c | . 2 : . *** <| 00001860 4d 45 4e 55 3e 0d 07 bc 14 20 20 20 c8 8e 20 77 |MENU>.... .. w| 00001870 62 6c 6b 25 21 31 32 20 ca 0d 07 c6 0e 20 20 20 |blk%!12 ..... | 00001880 20 20 c9 20 53 68 25 0d 07 d0 2b 20 20 20 20 20 | . Sh%...+ | 00001890 e7 66 69 72 73 74 25 3e 30 20 f2 74 6f 67 67 6c |.first%>0 .toggl| 000018a0 65 28 66 69 72 73 74 25 29 3a 66 69 72 73 74 25 |e(first%):first%| 000018b0 3d 30 0d 07 da 2f 20 20 20 20 20 21 68 6e 74 25 |=0.../ !hnt%| 000018c0 3d a4 66 69 6e 64 5f 68 69 6e 74 3a 3f 72 70 6c |=.find_hint:?rpl| 000018d0 79 25 3d 26 34 30 2a 2d 28 6d 6f 76 65 25 3d 30 |y%=&40*-(move%=0| 000018e0 29 0d 07 e4 48 20 20 20 20 20 c8 99 20 22 57 69 |)...H .. "Wi| 000018f0 6d 70 5f 43 72 65 61 74 65 4d 65 6e 75 22 2c 2c |mp_CreateMenu",,| 00001900 6d 65 6e 75 25 2b 38 30 2c 21 77 62 6c 6b 25 2d |menu%+80,!wblk%-| 00001910 36 34 2c 77 62 6c 6b 25 21 34 3a 74 72 65 65 25 |64,wblk%!4:tree%| 00001920 3d 6d 65 6e 75 25 2b 38 30 0d 07 ee 0d 20 20 20 |=menu%+80.... | 00001930 20 20 c9 20 2d 32 0d 07 f8 3e 20 20 20 20 20 c8 | . -2...> .| 00001940 99 20 22 57 69 6d 70 5f 43 72 65 61 74 65 4d 65 |. "Wimp_CreateMe| 00001950 6e 75 22 2c 2c 6d 65 6e 75 25 2c 21 77 62 6c 6b |nu",,menu%,!wblk| 00001960 25 2d 36 34 2c 31 38 30 3a 74 72 65 65 25 3d 6d |%-64,180:tree%=m| 00001970 65 6e 75 25 0d 08 02 08 20 20 20 cb 0d 08 0c 1b |enu%.... .....| 00001980 20 20 20 c9 20 31 20 3a 20 f4 20 2a 2a 2a 20 3c | . 1 : . *** <| 00001990 41 44 4a 55 53 54 3e 0d 08 16 14 20 20 20 c8 8e |ADJUST>.... ..| 000019a0 20 77 62 6c 6b 25 21 31 32 20 ca 0d 08 20 32 20 | wblk%!12 ... 2 | 000019b0 20 20 20 20 c9 20 53 68 25 3a 20 e7 66 69 72 73 | . Sh%: .firs| 000019c0 74 25 3e 30 20 f2 74 6f 67 67 6c 65 28 66 69 72 |t%>0 .toggle(fir| 000019d0 73 74 25 29 3a 66 69 72 73 74 25 3d 30 0d 08 2a |st%):first%=0..*| 000019e0 12 20 20 20 20 20 c9 20 72 65 70 6c 61 79 25 0d |. . replay%.| 000019f0 08 34 16 20 20 20 20 20 c8 8e 20 77 62 6c 6b 25 |.4. .. wblk%| 00001a00 21 31 36 20 ca 0d 08 3e 18 20 20 20 20 20 20 20 |!16 ...>. | 00001a10 c9 20 31 3a 20 f2 66 6f 72 77 61 72 64 0d 08 48 |. 1: .forward..H| 00001a20 15 20 20 20 20 20 20 20 c9 20 32 3a 20 f2 62 61 |. . 2: .ba| 00001a30 63 6b 0d 08 52 27 20 20 20 20 20 20 20 c9 20 33 |ck..R' . 3| 00001a40 2c 34 2c 35 3a 20 f2 63 6f 6e 74 69 6e 75 65 28 |,4,5: .continue(| 00001a50 77 62 6c 6b 25 21 31 36 29 0d 08 5c 0a 20 20 20 |wblk%!16)..\. | 00001a60 20 20 cb 0d 08 66 32 20 20 20 20 20 c9 20 73 61 | ...f2 . sa| 00001a70 76 65 25 3a 20 e7 77 62 6c 6b 25 21 31 36 3d 32 |ve%: .wblk%!16=2| 00001a80 20 61 64 6a 25 3d 74 72 65 65 25 3a f2 42 75 74 | adj%=tree%:.But| 00001a90 74 53 61 76 65 0d 08 70 08 20 20 20 cb 0d 08 7a |tSave..p. ...z| 00001aa0 06 20 cb 0d 08 84 06 20 e1 0d 08 8e 05 20 0d 08 |. ..... ..... ..| 00001ab0 98 2d 20 f4 20 2a 20 44 65 63 6f 64 65 73 20 6d |.- . * Decodes m| 00001ac0 65 6e 75 20 73 65 6c 65 63 74 69 6f 6e 20 26 20 |enu selection & | 00001ad0 61 63 74 73 20 6f 6e 20 69 74 2e 0d 08 a2 05 20 |acts on it..... | 00001ae0 0d 08 ac 0d 20 dd f2 64 65 63 6f 64 65 0d 08 b6 |.... ..decode...| 00001af0 2f 20 c8 99 20 22 57 69 6d 70 5f 44 65 63 6f 64 |/ .. "Wimp_Decod| 00001b00 65 4d 65 6e 75 22 2c 2c 74 72 65 65 25 2c 77 62 |eMenu",,tree%,wb| 00001b10 6c 6b 25 2c 77 62 6c 6b 25 2b 32 30 0d 08 c0 15 |lk%,wblk%+20....| 00001b20 20 c8 8e 20 24 28 77 62 6c 6b 25 2b 32 30 29 20 | .. $(wblk%+20) | 00001b30 ca 0d 08 ca 1c 20 20 20 c9 20 22 4e 65 77 20 67 |..... . "New g| 00001b40 61 6d 65 22 3a 20 f2 6e 65 77 28 b9 29 0d 08 d4 |ame": .new(.)...| 00001b50 22 20 20 20 c9 20 22 52 65 70 6c 61 79 22 3a 20 |" . "Replay": | 00001b60 e7 73 68 6f 77 25 20 f2 68 69 6e 74 28 30 29 0d |.show% .hint(0).| 00001b70 08 de 28 20 20 20 f2 73 74 61 74 75 73 28 72 65 |..( .status(re| 00001b80 70 6c 61 79 25 2c 38 2c 6d 6f 76 65 25 29 3a 4d |play%,8,move%):M| 00001b90 25 3d 6d 6f 76 65 25 0d 08 e8 15 20 20 20 f2 6f |%=move%.... .o| 00001ba0 70 65 6e 28 72 65 70 6c 61 79 25 29 0d 08 f2 23 |pen(replay%)...#| 00001bb0 20 20 20 c8 97 c8 93 20 77 62 6c 6b 25 21 34 2c | .... wblk%!4,| 00001bc0 77 62 6c 6b 25 21 38 2c 33 30 38 2c 32 35 36 0d |wblk%!8,308,256.| 00001bd0 08 fc 22 20 20 20 c8 99 20 22 4f 53 5f 42 79 74 |.." .. "OS_Byt| 00001be0 65 22 2c 31 36 31 2c 31 39 37 20 b8 20 2c 2c 57 |e",161,197 . ,,W| 00001bf0 25 0d 09 06 0d 20 20 20 72 65 70 25 3d b9 0d 09 |%.... rep%=...| 00001c00 10 23 20 20 20 c9 20 22 53 68 6f 77 20 6d 6f 76 |.# . "Show mov| 00001c10 65 73 22 3a 20 f2 68 69 6e 74 28 73 68 6f 77 25 |es": .hint(show%| 00001c20 29 0d 09 1a 1f 20 20 20 c9 20 22 52 75 6c 65 73 |).... . "Rules| 00001c30 22 3a 20 f2 6f 70 65 6e 28 72 75 6c 65 73 25 29 |": .open(rules%)| 00001c40 0d 09 24 18 20 20 20 c9 20 22 51 75 69 74 22 3a |..$. . "Quit":| 00001c50 20 71 75 69 74 25 3d b9 0d 09 2e 06 20 cb 0d 09 | quit%=..... ...| 00001c60 38 24 20 c8 99 20 22 57 69 6d 70 5f 47 65 74 50 |8$ .. "Wimp_GetP| 00001c70 6f 69 6e 74 65 72 49 6e 66 6f 22 2c 2c 77 62 6c |ointerInfo",,wbl| 00001c80 6b 25 0d 09 42 48 20 e7 77 62 6c 6b 25 21 38 3d |k%..BH .wblk%!8=| 00001c90 31 20 80 ac 72 65 70 25 20 3f 72 70 6c 79 25 3d |1 ..rep% ?rply%=| 00001ca0 26 34 30 2a 2d 28 6d 6f 76 65 25 3d 30 29 3a c8 |&40*-(move%=0):.| 00001cb0 99 20 22 57 69 6d 70 5f 43 72 65 61 74 65 4d 65 |. "Wimp_CreateMe| 00001cc0 6e 75 22 2c 2c 74 72 65 65 25 0d 09 4c 06 20 e1 |nu",,tree%..L. .| 00001cd0 0d 09 56 05 20 0d 09 60 41 20 f4 20 2a 20 47 65 |..V. ..`A . * Ge| 00001ce0 74 73 20 6d 6f 76 65 73 2e 20 20 49 66 20 66 69 |ts moves. If fi| 00001cf0 72 73 74 20 2d 20 63 68 65 63 6b 73 20 74 69 6c |rst - checks til| 00001d00 65 20 69 73 20 76 61 6c 69 64 2c 20 69 66 20 4f |e is valid, if O| 00001d10 4b 20 74 68 65 6e 0d 09 6a 42 20 f4 20 2a 20 68 |K then..jB . * h| 00001d20 69 6c 69 67 68 74 73 20 69 74 20 65 6c 73 65 20 |ilights it else | 00001d30 62 65 65 70 73 2e 20 20 49 66 20 73 65 63 6f 6e |beeps. If secon| 00001d40 64 20 2d 20 63 68 65 63 6b 73 20 74 69 6c 65 20 |d - checks tile | 00001d50 69 73 20 76 61 6c 69 64 0d 09 74 45 20 f4 20 2a |is valid..tE . *| 00001d60 20 61 6e 64 20 69 73 20 74 68 65 20 73 61 6d 65 | and is the same| 00001d70 20 61 73 20 66 69 72 73 74 2c 20 69 66 20 4f 4b | as first, if OK| 00001d80 20 64 65 6c 65 74 65 73 20 62 6f 74 68 20 74 69 | deletes both ti| 00001d90 6c 65 73 20 26 20 75 70 64 61 74 65 73 0d 09 7e |les & updates..~| 00001da0 1f 20 f4 20 2a 20 76 61 72 69 61 62 6c 65 73 2c |. . * variables,| 00001db0 20 65 6c 73 65 20 62 65 65 70 73 2e 0d 09 88 05 | else beeps.....| 00001dc0 20 0d 09 92 0b 20 dd f2 6d 6f 76 65 0d 09 9c 10 | .... ..move....| 00001dd0 20 e7 66 69 72 73 74 25 3c 31 20 8c 0d 09 a6 2e | .first%<1 .....| 00001de0 20 20 20 66 69 72 73 74 25 3d a4 76 61 6c 69 64 | first%=.valid| 00001df0 3a e7 66 69 72 73 74 25 3e 30 20 f2 74 6f 67 67 |:.first%>0 .togg| 00001e00 6c 65 28 66 69 72 73 74 25 29 0d 09 b0 08 20 20 |le(first%).... | 00001e10 20 cc 0d 09 ba 48 20 20 20 73 65 63 6f 6e 64 25 | ....H second%| 00001e20 3d a4 76 61 6c 69 64 3a e7 73 65 63 6f 6e 64 25 |=.valid:.second%| 00001e30 3d 66 69 72 73 74 25 20 f2 74 6f 67 67 6c 65 28 |=first% .toggle(| 00001e40 66 69 72 73 74 25 29 3a 66 69 72 73 74 25 3d 30 |first%):first%=0| 00001e50 3a 73 65 63 6f 6e 64 25 3d 30 0d 09 c4 45 20 20 |:second%=0...E | 00001e60 20 e7 53 25 28 73 65 63 6f 6e 64 25 2c 30 29 3e | .S%(second%,0)>| 00001e70 30 20 80 53 25 28 73 65 63 6f 6e 64 25 2c 30 29 |0 .S%(second%,0)| 00001e80 3c 35 20 80 53 25 28 66 69 72 73 74 25 2c 30 29 |<5 .S%(first%,0)| 00001e90 3e 34 20 ef 37 3a 73 65 63 6f 6e 64 25 3d 30 0d |>4 .7:second%=0.| 00001ea0 09 ce 57 20 20 20 e7 53 25 28 73 65 63 6f 6e 64 |..W .S%(second| 00001eb0 25 2c 30 29 3e 34 20 80 53 25 28 73 65 63 6f 6e |%,0)>4 .S%(secon| 00001ec0 64 25 2c 30 29 3c 39 20 80 28 53 25 28 66 69 72 |d%,0)<9 .(S%(fir| 00001ed0 73 74 25 2c 30 29 3c 35 20 84 53 25 28 66 69 72 |st%,0)<5 .S%(fir| 00001ee0 73 74 25 2c 30 29 3e 38 29 20 ef 37 3a 73 65 63 |st%,0)>8) .7:sec| 00001ef0 6f 6e 64 25 3d 30 0d 09 d8 41 20 20 20 e7 53 25 |ond%=0...A .S%| 00001f00 28 73 65 63 6f 6e 64 25 2c 30 29 3e 38 20 80 53 |(second%,0)>8 .S| 00001f10 25 28 73 65 63 6f 6e 64 25 2c 30 29 3c 3e 53 25 |%(second%,0)<>S%| 00001f20 28 66 69 72 73 74 25 2c 30 29 20 ef 37 3a 73 65 |(first%,0) .7:se| 00001f30 63 6f 6e 64 25 3d 30 0d 09 e2 7f 20 20 20 e7 73 |cond%=0.... .s| 00001f40 65 63 6f 6e 64 25 3e 30 20 f2 64 65 6c 65 74 65 |econd%>0 .delete| 00001f50 28 66 69 72 73 74 25 29 3a f2 64 65 6c 65 74 65 |(first%):.delete| 00001f60 28 73 65 63 6f 6e 64 25 29 3a 74 69 6c 65 73 25 |(second%):tiles%| 00001f70 2d 3d 32 3a 4d 25 28 6d 6f 76 65 25 2c 30 29 3d |-=2:M%(move%,0)=| 00001f80 66 69 72 73 74 25 3a 4d 25 28 6d 6f 76 65 25 2c |first%:M%(move%,| 00001f90 31 29 3d 73 65 63 6f 6e 64 25 3a 6d 6f 76 65 25 |1)=second%:move%| 00001fa0 2b 3d 31 3a 66 69 72 73 74 25 3d 30 3a 73 65 63 |+=1:first%=0:sec| 00001fb0 6f 6e 64 25 3d 30 0d 09 ec 06 20 cd 0d 09 f6 06 |ond%=0.... .....| 00001fc0 20 e1 0d 0a 00 05 20 0d 0a 0a 41 20 f4 20 2a 20 | ..... ...A . * | 00001fd0 47 65 74 73 20 70 6f 69 6e 74 65 72 20 70 6f 73 |Gets pointer pos| 00001fe0 69 74 69 6f 6e 3b 20 69 66 20 6f 76 65 72 20 74 |ition; if over t| 00001ff0 69 6c 65 2c 20 63 68 65 63 6b 73 20 74 68 61 74 |ile, checks that| 00002000 20 74 69 6c 65 20 69 73 0d 0a 14 43 20 f4 20 2a | tile is...C . *| 00002010 20 27 66 72 65 65 27 2e 20 20 49 66 20 61 6c 6c | 'free'. If all| 00002020 20 69 73 20 4f 4b 20 72 65 74 75 72 6e 73 20 74 | is OK returns t| 00002030 69 6c 65 20 69 63 6f 6e 20 6e 75 6d 62 65 72 2c |ile icon number,| 00002040 20 65 6c 73 65 20 62 65 65 70 73 0d 0a 1e 1a 20 | else beeps.... | 00002050 f4 20 2a 20 61 6e 64 20 72 65 74 75 72 6e 73 20 |. * and returns | 00002060 7a 65 72 6f 2e 0d 0a 28 05 20 0d 0a 32 0c 20 dd |zero...(. ..2. .| 00002070 a4 76 61 6c 69 64 0d 0a 3c 10 20 69 25 3d 77 62 |.valid..<. i%=wb| 00002080 6c 6b 25 21 31 36 0d 0a 46 0f 20 e7 69 25 3c 30 |lk%!16..F. .i%<0| 00002090 20 69 25 3d 30 0d 0a 50 36 20 e7 69 25 3d 33 32 | i%=0..P6 .i%=32| 000020a0 20 80 53 25 28 33 31 2c 30 29 3e 30 20 80 28 53 | .S%(31,0)>0 .(S| 000020b0 25 28 33 33 2c 30 29 3e 30 20 84 53 25 28 34 35 |%(33,0)>0 .S%(45| 000020c0 2c 30 29 3e 30 29 20 69 25 3d 30 0d 0a 5a 41 20 |,0)>0) i%=0..ZA | 000020d0 e7 53 25 28 53 25 28 69 25 2c 33 29 2c 30 29 3e |.S%(S%(i%,3),0)>| 000020e0 30 20 84 28 53 25 28 53 25 28 69 25 2c 34 29 2c |0 .(S%(S%(i%,4),| 000020f0 30 29 3e 30 20 80 53 25 28 53 25 28 69 25 2c 35 |0)>0 .S%(S%(i%,5| 00002100 29 2c 30 29 3e 30 29 20 69 25 3d 30 0d 0a 64 0d |),0)>0) i%=0..d.| 00002110 20 e7 69 25 3d 30 20 ef 37 0d 0a 6e 08 20 3d 69 | .i%=0 .7..n. =i| 00002120 25 0d 0a 78 05 20 0d 0a 82 28 20 f4 20 2a 20 48 |%..x. ...( . * H| 00002130 69 6c 69 67 68 74 73 2f 75 6e 2d 68 69 6c 69 67 |ilights/un-hilig| 00002140 68 74 73 20 74 69 6c 65 20 69 63 6f 6e 2e 0d 0a |hts tile icon...| 00002150 8c 05 20 0d 0a 96 11 20 dd f2 74 6f 67 67 6c 65 |.. .... ..toggle| 00002160 28 69 25 29 0d 0a a0 36 20 21 69 62 6c 6b 25 3d |(i%)...6 !iblk%=| 00002170 53 68 25 3a 69 62 6c 6b 25 21 34 3d 69 25 3a 69 |Sh%:iblk%!4=i%:i| 00002180 62 6c 6b 25 21 38 3d 26 32 32 30 30 30 30 30 3a |blk%!8=&2200000:| 00002190 69 62 6c 6b 25 21 31 32 3d 30 0d 0a aa 22 20 c8 |iblk%!12=0..." .| 000021a0 99 20 22 57 69 6d 70 5f 53 65 74 49 63 6f 6e 53 |. "Wimp_SetIconS| 000021b0 74 61 74 65 22 2c 2c 69 62 6c 6b 25 0d 0a b4 06 |tate",,iblk%....| 000021c0 20 e1 0d 0a be 05 20 0d 0a c8 1b 20 f4 20 2a 20 | ..... .... . * | 000021d0 44 65 6c 65 74 65 73 20 74 69 6c 65 20 69 63 6f |Deletes tile ico| 000021e0 6e 2e 0d 0a d2 05 20 0d 0a dc 11 20 dd f2 64 65 |n..... .... ..de| 000021f0 6c 65 74 65 28 69 25 29 0d 0a e6 1a 20 21 69 62 |lete(i%).... !ib| 00002200 6c 6b 25 3d 53 68 25 3a 69 62 6c 6b 25 21 34 3d |lk%=Sh%:iblk%!4=| 00002210 69 25 0d 0a f0 20 20 c8 99 20 22 57 69 6d 70 5f |i%... .. "Wimp_| 00002220 44 65 6c 65 74 65 49 63 6f 6e 22 2c 2c 69 62 6c |DeleteIcon",,ibl| 00002230 6b 25 0d 0a fa 4a 20 c8 99 20 22 57 69 6d 70 5f |k%...J .. "Wimp_| 00002240 46 6f 72 63 65 52 65 64 72 61 77 22 2c 53 68 25 |ForceRedraw",Sh%| 00002250 2c 53 25 28 69 25 2c 31 29 2c 2d 53 25 28 69 25 |,S%(i%,1),-S%(i%| 00002260 2c 32 29 2c 53 25 28 69 25 2c 31 29 2b 39 36 2c |,2),S%(i%,1)+96,| 00002270 2d 53 25 28 69 25 2c 32 29 2b 39 36 0d 0b 04 17 |-S%(i%,2)+96....| 00002280 20 53 25 28 69 25 2c 30 29 3d 2d 53 25 28 69 25 | S%(i%,0)=-S%(i%| 00002290 2c 30 29 0d 0b 0e 06 20 e1 0d 0b 18 05 20 0d 0b |,0).... ..... ..| 000022a0 22 1b 20 f4 20 2a 20 43 72 65 61 74 65 73 20 74 |". . * Creates t| 000022b0 69 6c 65 20 69 63 6f 6e 2e 0d 0b 2c 05 20 0d 0b |ile icon...,. ..| 000022c0 36 18 20 dd f2 69 63 6f 6e 28 77 25 2c 69 24 2c |6. ..icon(w%,i$,| 000022d0 78 25 2c 79 25 29 0d 0b 40 42 20 21 69 62 6c 6b |x%,y%)..@B !iblk| 000022e0 25 3d 77 25 3a 69 62 6c 6b 25 21 34 3d 78 25 3a |%=w%:iblk%!4=x%:| 000022f0 69 62 6c 6b 25 21 38 3d 79 25 3a 69 62 6c 6b 25 |iblk%!8=y%:iblk%| 00002300 21 31 32 3d 78 25 2b 39 36 3a 69 62 6c 6b 25 21 |!12=x%+96:iblk%!| 00002310 31 36 3d 79 25 2b 39 36 0d 0b 4a 22 20 69 62 6c |16=y%+96..J" ibl| 00002320 6b 25 21 32 30 3d 26 33 30 30 32 3a 24 28 69 62 |k%!20=&3002:$(ib| 00002330 6c 6b 25 2b 32 34 29 3d 69 24 0d 0b 54 20 20 c8 |lk%+24)=i$..T .| 00002340 99 20 22 57 69 6d 70 5f 43 72 65 61 74 65 49 63 |. "Wimp_CreateIc| 00002350 6f 6e 22 2c 2c 69 62 6c 6b 25 0d 0b 5e 06 20 e1 |on",,iblk%..^. .| 00002360 0d 0b 68 05 20 0d 0b 72 45 20 f4 20 2a 20 55 70 |..h. ..rE . * Up| 00002370 64 61 74 65 73 20 73 74 61 74 75 73 20 77 69 6e |dates status win| 00002380 64 6f 77 20 77 69 74 68 20 74 69 6c 65 73 20 26 |dow with tiles &| 00002390 20 6d 6f 76 65 73 2c 20 72 65 70 6c 61 79 20 77 | moves, replay w| 000023a0 69 6e 64 6f 77 20 77 69 74 68 0d 0b 7c 15 20 f4 |indow with..|. .| 000023b0 20 2a 20 6d 6f 76 65 20 6e 75 6d 62 65 72 2e 0d | * move number..| 000023c0 0b 86 05 20 0d 0b 90 17 20 dd f2 73 74 61 74 75 |... .... ..statu| 000023d0 73 28 77 25 2c 69 25 2c 78 25 29 0d 0b 9a 37 20 |s(w%,i%,x%)...7 | 000023e0 21 69 62 6c 6b 25 3d 77 25 3a 69 62 6c 6b 25 21 |!iblk%=w%:iblk%!| 000023f0 34 3d 69 25 3a c8 99 20 22 57 69 6d 70 5f 47 65 |4=i%:.. "Wimp_Ge| 00002400 74 49 63 6f 6e 53 74 61 74 65 22 2c 2c 69 62 6c |tIconState",,ibl| 00002410 6b 25 0d 0b a4 20 20 c8 99 20 22 57 69 6d 70 5f |k%... .. "Wimp_| 00002420 44 65 6c 65 74 65 49 63 6f 6e 22 2c 2c 69 62 6c |DeleteIcon",,ibl| 00002430 6b 25 0d 0b ae 41 20 24 28 69 62 6c 6b 25 2b 32 |k%...A $(iblk%+2| 00002440 38 29 3d c3 78 25 3a 69 62 6c 6b 25 21 34 3d 21 |8)=.x%:iblk%!4=!| 00002450 69 62 6c 6b 25 3a c8 99 20 22 57 69 6d 70 5f 43 |iblk%:.. "Wimp_C| 00002460 72 65 61 74 65 49 63 6f 6e 22 2c 2c 69 62 6c 6b |reateIcon",,iblk| 00002470 25 2b 34 0d 0b b8 06 20 e1 0d 0b c2 05 20 0d 0b |%+4.... ..... ..| 00002480 cc 47 20 f4 20 2a 20 49 66 20 69 25 20 74 68 65 |.G . * If i% the| 00002490 6e 20 73 68 75 66 66 6c 65 73 2e 20 20 44 65 61 |n shuffles. Dea| 000024a0 6c 73 20 74 68 65 20 74 69 6c 65 73 2e 20 20 54 |ls the tiles. T| 000024b0 69 6c 65 20 69 63 6f 6e 73 20 61 72 65 20 63 72 |ile icons are cr| 000024c0 65 61 74 65 64 0d 0b d6 46 20 f4 20 2a 20 69 6e |eated...F . * in| 000024d0 20 73 74 72 69 63 74 20 33 44 20 73 65 71 75 65 | strict 3D seque| 000024e0 6e 63 65 20 31 20 74 6f 20 31 34 34 2c 20 74 68 |nce 1 to 144, th| 000024f0 69 73 20 6d 61 6b 65 73 20 67 61 6d 65 20 6c 6f |is makes game lo| 00002500 67 69 63 20 73 69 6d 70 6c 65 72 0d 0b e0 30 20 |gic simpler...0 | 00002510 f4 20 2a 20 74 6f 20 68 61 6e 64 6c 65 2e 20 20 |. * to handle. | 00002520 55 70 64 61 74 65 73 20 72 65 6c 65 76 61 6e 74 |Updates relevant| 00002530 20 76 61 72 69 61 62 6c 65 73 2e 0d 0b ea 05 20 | variables..... | 00002540 0d 0b f4 0f 20 dd f2 64 65 61 6c 28 69 25 29 0d |.... ..deal(i%).| 00002550 0b fe 0a 20 e7 69 25 20 8c 0d 0c 08 0f 20 20 20 |... .i% ..... | 00002560 52 25 3d b3 28 2d 91 29 0d 0c 12 10 20 20 20 e3 |R%=.(-.).... .| 00002570 49 25 3d 31 b8 31 34 34 0d 0c 1c 26 20 20 20 20 |I%=1.144...& | 00002580 20 52 25 3d b3 28 31 34 34 29 3a c8 94 53 25 28 | R%=.(144):..S%(| 00002590 49 25 2c 30 29 2c 53 25 28 52 25 2c 30 29 0d 0c |I%,0),S%(R%,0)..| 000025a0 26 08 20 20 20 ed 0d 0c 30 06 20 cd 0d 0c 3a 0e |&. ...0. ...:.| 000025b0 20 e3 49 25 3d 31 b8 31 34 34 0d 0c 44 2e 20 20 | .I%=1.144..D. | 000025c0 20 f2 69 63 6f 6e 28 53 68 25 2c c3 53 25 28 49 | .icon(Sh%,.S%(I| 000025d0 25 2c 30 29 2c 53 25 28 49 25 2c 31 29 2c 2d 53 |%,0),S%(I%,1),-S| 000025e0 25 28 49 25 2c 32 29 29 0d 0c 4e 06 20 ed 0d 0c |%(I%,2))..N. ...| 000025f0 58 18 20 e7 6e 65 77 25 20 f2 62 6c 61 6e 6b 3a |X. .new% .blank:| 00002600 6e 65 77 25 3d a3 0d 0c 62 2a 20 74 69 6c 65 73 |new%=...b* tiles| 00002610 25 3d 31 34 34 3a 66 69 72 73 74 25 3d 30 3a 73 |%=144:first%=0:s| 00002620 65 63 6f 6e 64 25 3d 30 3a 73 68 6f 77 25 3d a3 |econd%=0:show%=.| 00002630 0d 0c 6c 06 20 e1 0d 0c 76 05 20 0d 0c 80 41 20 |..l. ...v. ...A | 00002640 f4 20 2a 20 4e 65 77 20 6f 72 20 73 61 6d 65 20 |. * New or same | 00002650 67 61 6d 65 2e 20 20 44 65 6c 65 74 65 73 20 61 |game. Deletes a| 00002660 6c 6c 20 74 69 6c 65 20 69 63 6f 6e 73 2e 20 20 |ll tile icons. | 00002670 28 53 68 75 66 66 6c 65 73 29 20 26 0d 0c 8a 34 |(Shuffles) &...4| 00002680 20 f4 20 2a 20 64 65 61 6c 73 2e 20 20 46 69 6e | . * deals. Fin| 00002690 64 73 20 76 61 6c 69 64 20 6d 6f 76 65 73 2e 20 |ds valid moves. | 000026a0 20 55 70 64 61 74 65 73 20 77 69 6e 64 6f 77 2e | Updates window.| 000026b0 0d 0c 94 05 20 0d 0c 9e 0e 20 dd f2 6e 65 77 28 |.... .... ..new(| 000026c0 69 25 29 0d 0c a8 16 20 c8 99 20 22 48 6f 75 72 |i%).... .. "Hour| 000026d0 67 6c 61 73 73 5f 4f 6e 22 0d 0c b2 55 20 e7 69 |glass_On"...U .i| 000026e0 25 20 f5 24 66 69 6c 65 25 3d c0 24 66 69 6c 65 |% .$file%=.$file| 000026f0 25 2c a9 24 66 69 6c 65 25 2d 31 29 3a fd 24 66 |%,.$file%-1):.$f| 00002700 69 6c 65 25 3d 22 22 84 c2 24 66 69 6c 65 25 29 |ile%=""..$file%)| 00002710 3d 22 2e 22 3a 24 66 69 6c 65 25 3d 24 66 69 6c |=".":$file%=$fil| 00002720 65 25 2b 22 47 61 6d 65 5f 46 69 6c 65 22 0d 0c |e%+"Game_File"..| 00002730 bc 11 20 e3 49 25 3d 31 34 34 b8 31 88 2d 31 0d |.. .I%=144.1.-1.| 00002740 0c c6 58 20 20 20 e7 53 25 28 49 25 2c 30 29 3e |..X .S%(I%,0)>| 00002750 30 20 21 69 62 6c 6b 25 3d 53 68 25 3a 69 62 6c |0 !iblk%=Sh%:ibl| 00002760 6b 25 21 34 3d 49 25 3a c8 99 20 22 57 69 6d 70 |k%!4=I%:.. "Wimp| 00002770 5f 44 65 6c 65 74 65 49 63 6f 6e 22 2c 2c 69 62 |_DeleteIcon",,ib| 00002780 6c 6b 25 20 8b 53 25 28 49 25 2c 30 29 3d 94 53 |lk% .S%(I%,0)=.S| 00002790 25 28 49 25 2c 30 29 0d 0c d0 06 20 ed 0d 0c da |%(I%,0).... ....| 000027a0 0e 20 f2 64 65 61 6c 28 69 25 29 0d 0c e4 15 20 |. .deal(i%).... | 000027b0 21 68 6e 74 25 3d a4 66 69 6e 64 5f 68 69 6e 74 |!hnt%=.find_hint| 000027c0 0d 0c ee 0c 20 6d 6f 76 65 25 3d 30 0d 0c f8 2e |.... move%=0....| 000027d0 20 c8 99 20 22 57 69 6d 70 5f 46 6f 72 63 65 52 | .. "Wimp_ForceR| 000027e0 65 64 72 61 77 22 2c 53 68 25 2c 32 2c 2d 37 31 |edraw",Sh%,2,-71| 000027f0 38 2c 31 32 37 34 2c 2d 33 34 0d 0d 02 17 20 c8 |8,1274,-34.... .| 00002800 99 20 22 48 6f 75 72 67 6c 61 73 73 5f 4f 66 66 |. "Hourglass_Off| 00002810 22 0d 0d 0c 06 20 e1 0d 0d 16 05 20 0d 0d 20 42 |".... ..... .. B| 00002820 20 f4 20 2a 20 53 63 61 6e 73 20 6d 61 69 6e 20 | . * Scans main | 00002830 61 72 72 61 79 2c 20 53 25 28 29 2c 20 66 6f 72 |array, S%(), for| 00002840 20 76 61 6c 69 64 20 6d 61 74 63 68 65 73 20 61 | valid matches a| 00002850 6e 64 20 70 6c 61 63 65 73 20 74 68 65 6d 0d 0d |nd places them..| 00002860 2a 31 20 f4 20 2a 20 69 6e 20 61 72 72 61 79 20 |*1 . * in array | 00002870 48 25 28 29 2e 20 20 68 69 6e 74 25 3d 66 69 72 |H%(). hint%=fir| 00002880 73 74 20 76 61 6c 69 64 20 6d 61 74 63 68 2e 0d |st valid match..| 00002890 0d 34 05 20 0d 0d 3e 10 20 dd a4 66 69 6e 64 5f |.4. ..>. ..find_| 000028a0 68 69 6e 74 0d 0d 48 1c 20 48 25 28 29 3d 30 3a |hint..H. H%()=0:| 000028b0 6d 6f 76 65 73 25 3d 30 3a 73 68 6f 77 25 3d a3 |moves%=0:show%=.| 000028c0 0d 0d 52 0e 20 e3 49 25 3d 31 b8 31 34 34 0d 0d |..R. .I%=1.144..| 000028d0 5c 14 20 20 20 e7 53 25 28 49 25 2c 30 29 3e 30 |\. .S%(I%,0)>0| 000028e0 20 8c 0d 0d 66 14 20 20 20 20 20 4a 25 3d 53 25 | ...f. J%=S%| 000028f0 28 49 25 2c 30 29 0d 0d 70 3a 20 20 20 20 20 e7 |(I%,0)..p: .| 00002900 49 25 3d 33 32 20 80 53 25 28 33 31 2c 30 29 3e |I%=32 .S%(31,0)>| 00002910 30 20 80 28 53 25 28 33 33 2c 30 29 3e 30 20 84 |0 .(S%(33,0)>0 .| 00002920 53 25 28 34 35 2c 30 29 3e 30 29 20 4a 25 3d 30 |S%(45,0)>0) J%=0| 00002930 0d 0d 7a 45 20 20 20 20 20 e7 53 25 28 53 25 28 |..zE .S%(S%(| 00002940 49 25 2c 33 29 2c 30 29 3e 30 20 84 28 53 25 28 |I%,3),0)>0 .(S%(| 00002950 53 25 28 49 25 2c 34 29 2c 30 29 3e 30 20 80 53 |S%(I%,4),0)>0 .S| 00002960 25 28 53 25 28 49 25 2c 35 29 2c 30 29 3e 30 29 |%(S%(I%,5),0)>0)| 00002970 20 4a 25 3d 30 0d 0d 84 10 20 20 20 20 20 e7 4a | J%=0.... .J| 00002980 25 3e 30 20 8c 0d 0d 8e 15 20 20 20 20 20 20 20 |%>0 ..... | 00002990 e7 4a 25 3c 35 20 4a 25 3d 30 0d 0d 98 1b 20 20 |.J%<5 J%=0.... | 000029a0 20 20 20 20 20 e7 4a 25 3e 34 20 80 4a 25 3c 39 | .J%>4 .J%<9| 000029b0 20 4a 25 3d 31 0d 0d a2 16 20 20 20 20 20 20 20 | J%=1.... | 000029c0 e7 4a 25 3e 38 20 4a 25 2d 3d 37 0d 0d ac 3c 20 |.J%>8 J%-=7...< | 000029d0 20 20 20 20 20 20 4c 25 3d 2d 31 3a f5 4c 25 2b | L%=-1:.L%+| 000029e0 3d 31 3a fd 48 25 28 4a 25 2c 4c 25 29 3d 30 3a |=1:.H%(J%,L%)=0:| 000029f0 48 25 28 4a 25 2c 4c 25 29 3d 49 25 3a 6d 6f 76 |H%(J%,L%)=I%:mov| 00002a00 65 73 25 2b 3d 4c 25 0d 0d b6 0a 20 20 20 20 20 |es%+=L%.... | 00002a10 cd 0d 0d c0 08 20 20 20 cd 0d 0d ca 06 20 ed 0d |..... ..... ..| 00002a20 0d d4 23 20 4c 25 3d 2d 31 3a f5 4c 25 2b 3d 31 |..# L%=-1:.L%+=1| 00002a30 3a fd 48 25 28 4c 25 2c 31 29 3e 30 84 4c 25 3d |:.H%(L%,1)>0.L%=| 00002a40 33 35 0d 0d de 38 20 f2 73 74 61 74 75 73 28 73 |35...8 .status(s| 00002a50 74 61 74 75 73 25 2c 33 2c 6d 6f 76 65 73 25 29 |tatus%,3,moves%)| 00002a60 3a f2 73 74 61 74 75 73 28 73 74 61 74 75 73 25 |:.status(status%| 00002a70 2c 32 2c 74 69 6c 65 73 25 29 0d 0d e8 2f 20 e7 |,2,tiles%).../ .| 00002a80 48 25 28 4c 25 2c 31 29 3e 30 20 68 69 6e 74 25 |H%(L%,1)>0 hint%| 00002a90 3d 4c 25 3a 3d 26 37 30 30 30 30 32 31 20 8b 20 |=L%:=&7000021 . | 00002aa0 3d 26 37 34 30 30 30 32 31 0d 0d f2 05 20 0d 0d |=&7400021.... ..| 00002ab0 fc 45 20 f4 20 2a 20 44 69 73 70 6c 61 79 73 20 |.E . * Displays | 00002ac0 76 61 6c 69 64 20 74 69 6c 65 20 6d 61 74 63 68 |valid tile match| 00002ad0 65 73 2e 20 20 31 20 6f 6e 6c 79 20 69 66 20 77 |es. 1 only if w| 00002ae0 69 74 68 20 3c 73 65 6c 65 63 74 3e 2c 20 73 74 |ith <select>, st| 00002af0 65 70 73 0d 0e 06 36 20 f4 20 2a 20 74 68 72 6f |eps...6 . * thro| 00002b00 75 67 68 20 65 61 63 68 20 6d 61 74 63 68 20 69 |ugh each match i| 00002b10 66 20 73 65 6c 65 63 74 65 64 20 77 69 74 68 20 |f selected with | 00002b20 3c 61 64 6a 75 73 74 3e 2e 0d 0e 10 05 20 0d 0e |<adjust>..... ..| 00002b30 1a 0f 20 dd f2 68 69 6e 74 28 69 25 29 0d 0e 24 |.. ..hint(i%)..$| 00002b40 16 20 e7 ac 69 25 20 73 68 6f 77 25 3d ac 73 68 |. ..i% show%=.sh| 00002b50 6f 77 25 0d 0e 2e 32 20 e3 49 25 3d 30 b8 33 3a |ow%...2 .I%=0.3:| 00002b60 e7 48 25 28 68 69 6e 74 25 2c 49 25 29 3e 30 20 |.H%(hint%,I%)>0 | 00002b70 f2 74 6f 67 67 6c 65 28 48 25 28 68 69 6e 74 25 |.toggle(H%(hint%| 00002b80 2c 49 25 29 29 0d 0e 38 06 20 ed 0d 0e 42 0a 20 |,I%))..8. ...B. | 00002b90 e7 69 25 20 8c 0d 0e 4c 22 20 20 20 4c 25 3d 68 |.i% ...L" L%=h| 00002ba0 69 6e 74 25 3a f5 4c 25 2b 3d 31 3a e7 4c 25 3d |int%:.L%+=1:.L%=| 00002bb0 33 36 20 4c 25 3d 30 0d 0e 56 1b 20 20 20 fd 48 |36 L%=0..V. .H| 00002bc0 25 28 4c 25 2c 31 29 3e 30 3a 68 69 6e 74 25 3d |%(L%,1)>0:hint%=| 00002bd0 4c 25 0d 0e 60 34 20 20 20 e3 49 25 3d 30 b8 33 |L%..`4 .I%=0.3| 00002be0 3a e7 48 25 28 68 69 6e 74 25 2c 49 25 29 3e 30 |:.H%(hint%,I%)>0| 00002bf0 20 f2 74 6f 67 67 6c 65 28 48 25 28 68 69 6e 74 | .toggle(H%(hint| 00002c00 25 2c 49 25 29 29 0d 0e 6a 08 20 20 20 ed 0d 0e |%,I%))..j. ...| 00002c10 74 06 20 cd 0d 0e 7e 06 20 e1 0d 0e 88 05 20 0d |t. ...~. ..... .| 00002c20 0e 92 2d 20 f4 20 2a 20 52 65 70 6c 61 79 20 6f |..- . * Replay o| 00002c30 70 74 69 6f 6e 20 2d 20 53 74 65 70 73 20 62 61 |ption - Steps ba| 00002c40 63 6b 20 6f 6e 65 20 6d 6f 76 65 2e 0d 0e 9c 05 |ck one move.....| 00002c50 20 0d 0e a6 0b 20 dd f2 62 61 63 6b 0d 0e b0 0d | .... ..back....| 00002c60 20 e7 20 4d 25 3e 30 20 8c 0d 0e ba 14 20 20 20 | . M%>0 ..... | 00002c70 4d 25 2d 3d 31 3a e3 49 25 3d 30 b8 31 0d 0e c4 |M%-=1:.I%=0.1...| 00002c80 41 20 20 20 20 20 21 69 62 6c 6b 25 3d 53 68 25 |A !iblk%=Sh%| 00002c90 3a 69 62 6c 6b 25 21 34 3d 4d 25 28 4d 25 2c 49 |:iblk%!4=M%(M%,I| 00002ca0 25 29 3a 69 62 6c 6b 25 21 38 3d 30 3a 69 62 6c |%):iblk%!8=0:ibl| 00002cb0 6b 25 21 31 32 3d 26 32 41 30 30 30 30 30 0d 0e |k%!12=&2A00000..| 00002cc0 ce 26 20 20 20 20 20 c8 99 20 22 57 69 6d 70 5f |.& .. "Wimp_| 00002cd0 53 65 74 49 63 6f 6e 53 74 61 74 65 22 2c 2c 69 |SetIconState",,i| 00002ce0 62 6c 6b 25 0d 0e d8 29 20 20 20 20 20 53 25 28 |blk%...) S%(| 00002cf0 4d 25 28 4d 25 2c 49 25 29 2c 30 29 3d 2d 53 25 |M%(M%,I%),0)=-S%| 00002d00 28 4d 25 28 4d 25 2c 49 25 29 2c 30 29 0d 0e e2 |(M%(M%,I%),0)...| 00002d10 28 20 20 20 ed 3a 74 69 6c 65 73 25 2b 3d 32 3a |( .:tiles%+=2:| 00002d20 f2 73 74 61 74 75 73 28 72 65 70 6c 61 79 25 2c |.status(replay%,| 00002d30 38 2c 4d 25 29 0d 0e ec 4f 20 20 20 c8 99 20 22 |8,M%)...O .. "| 00002d40 57 69 6d 70 5f 46 6f 72 63 65 52 65 64 72 61 77 |Wimp_ForceRedraw| 00002d50 22 2c 72 65 70 6c 61 79 25 2c 69 62 6c 6b 25 21 |",replay%,iblk%!| 00002d60 38 2b 34 2c 69 62 6c 6b 25 21 31 32 2b 34 2c 69 |8+4,iblk%!12+4,i| 00002d70 62 6c 6b 25 21 31 36 2d 34 2c 69 62 6c 6b 25 21 |blk%!16-4,iblk%!| 00002d80 32 30 2d 34 0d 0e f6 0b 20 20 20 cc 20 ef 37 0d |20-4.... . .7.| 00002d90 0f 00 06 20 cd 0d 0f 0a 06 20 e1 0d 0f 14 05 20 |... ..... ..... | 00002da0 0d 0f 1e 30 20 f4 20 2a 20 52 65 70 6c 61 79 20 |...0 . * Replay | 00002db0 6f 70 74 69 6f 6e 20 2d 20 53 74 65 70 73 20 66 |option - Steps f| 00002dc0 6f 72 77 61 72 64 20 6f 6e 65 20 6d 6f 76 65 2e |orward one move.| 00002dd0 0d 0f 28 05 20 0d 0f 32 0e 20 dd f2 66 6f 72 77 |..(. ..2. ..forw| 00002de0 61 72 64 0d 0f 3c 3f 20 e7 4d 25 3c 6d 6f 76 65 |ard..<? .M%<move| 00002df0 25 20 e3 49 25 3d 30 b8 31 3a f2 64 65 6c 65 74 |% .I%=0.1:.delet| 00002e00 65 28 4d 25 28 4d 25 2c 49 25 29 29 3a ed 3a 74 |e(M%(M%,I%)):.:t| 00002e10 69 6c 65 73 25 2d 3d 32 3a 4d 25 2b 3d 31 20 8b |iles%-=2:M%+=1 .| 00002e20 ef 37 0d 0f 46 1a 20 f2 73 74 61 74 75 73 28 72 |.7..F. .status(r| 00002e30 65 70 6c 61 79 25 2c 38 2c 4d 25 29 0d 0f 50 4d |eplay%,8,M%)..PM| 00002e40 20 c8 99 20 22 57 69 6d 70 5f 46 6f 72 63 65 52 | .. "Wimp_ForceR| 00002e50 65 64 72 61 77 22 2c 72 65 70 6c 61 79 25 2c 69 |edraw",replay%,i| 00002e60 62 6c 6b 25 21 38 2b 34 2c 69 62 6c 6b 25 21 31 |blk%!8+4,iblk%!1| 00002e70 32 2b 34 2c 69 62 6c 6b 25 21 31 36 2d 34 2c 69 |2+4,iblk%!16-4,i| 00002e80 62 6c 6b 25 21 32 30 2d 34 0d 0f 5a 06 20 e1 0d |blk%!20-4..Z. ..| 00002e90 0f 64 05 20 0d 0f 6e 45 20 f4 20 2a 20 52 65 70 |.d. ..nE . * Rep| 00002ea0 6c 61 79 20 6f 70 74 69 6f 6e 20 2d 20 52 65 73 |lay option - Res| 00002eb0 75 6d 65 20 70 6c 61 79 20 66 72 6f 6d 20 33 20 |ume play from 3 | 00002ec0 53 74 61 72 74 20 6f 66 20 67 61 6d 65 2c 20 34 |Start of game, 4| 00002ed0 20 50 6f 73 69 74 69 6f 6e 0d 0f 78 44 20 f4 20 | Position..xD . | 00002ee0 2a 20 73 68 6f 77 6e 20 6f 6e 20 73 63 72 65 65 |* shown on scree| 00002ef0 6e 20 6f 72 2c 20 35 20 4c 61 73 74 20 70 6f 73 |n or, 5 Last pos| 00002f00 69 74 69 6f 6e 20 62 65 66 6f 72 65 20 72 65 70 |ition before rep| 00002f10 6c 61 79 20 73 65 6c 65 63 74 65 64 2e 0d 0f 82 |lay selected....| 00002f20 05 20 0d 0f 8c 13 20 dd f2 63 6f 6e 74 69 6e 75 |. .... ..continu| 00002f30 65 28 49 25 29 0d 0f 96 0c 20 c8 8e 20 49 25 20 |e(I%).... .. I% | 00002f40 ca 0d 0f a0 22 20 20 20 c9 20 33 3a 20 e7 4d 25 |...." . 3: .M%| 00002f50 3d 30 20 6d 6f 76 65 25 3d 30 20 8b f2 6e 65 77 |=0 move%=0 ..new| 00002f60 28 a3 29 0d 0f aa 14 20 20 20 c9 20 34 3a 20 6d |(.).... . 4: m| 00002f70 6f 76 65 25 3d 4d 25 0d 0f b4 0a 20 20 20 c9 20 |ove%=M%.... . | 00002f80 35 0d 0f be 47 20 20 20 e7 4d 25 3c 6d 6f 76 65 |5...G .M%<move| 00002f90 25 20 f2 70 6c 61 79 5f 6f 6e 28 4d 25 29 3a c8 |% .play_on(M%):.| 00002fa0 99 20 22 57 69 6d 70 5f 46 6f 72 63 65 52 65 64 |. "Wimp_ForceRed| 00002fb0 72 61 77 22 2c 53 68 25 2c 32 2c 2d 37 31 38 2c |raw",Sh%,2,-718,| 00002fc0 31 32 37 34 2c 2d 33 34 0d 0f c8 06 20 cb 0d 0f |1274,-34.... ...| 00002fd0 d2 26 20 21 70 62 6c 6b 25 3d 72 65 70 6c 61 79 |.& !pblk%=replay| 00002fe0 25 3a c8 97 c8 93 20 30 2c 30 2c 31 32 37 39 2c |%:.... 0,0,1279,| 00002ff0 31 30 32 33 0d 0f dc 28 20 c8 99 20 22 57 69 6d |1023...( .. "Wim| 00003000 70 5f 43 6c 6f 73 65 57 69 6e 64 6f 77 22 2c 2c |p_CloseWindow",,| 00003010 70 62 6c 6b 25 3a 72 65 70 25 3d a3 0d 0f e6 06 |pblk%:rep%=.....| 00003020 20 e1 0d 0f f0 05 20 0d 0f fa 47 20 f4 20 2a 20 | ..... ...G . * | 00003030 42 6f 61 72 64 20 63 6c 65 61 72 65 64 20 66 72 |Board cleared fr| 00003040 6f 6d 20 70 6f 73 69 74 69 6f 6e 20 4d 25 20 74 |om position M% t| 00003050 6f 20 6c 61 74 65 73 74 20 6d 6f 76 65 3b 20 75 |o latest move; u| 00003060 73 65 64 20 77 68 65 6e 20 73 61 76 65 64 0d 10 |sed when saved..| 00003070 04 44 20 f4 20 2a 20 67 61 6d 65 20 69 73 20 72 |.D . * game is r| 00003080 65 2d 6c 6f 61 64 65 64 20 6f 72 20 77 68 65 6e |e-loaded or when| 00003090 20 72 65 73 75 6d 69 6e 67 20 70 6c 61 79 20 66 | resuming play f| 000030a0 72 6f 6d 20 72 65 70 6c 61 79 20 6f 70 74 69 6f |rom replay optio| 000030b0 6e 2e 0d 10 0e 05 20 0d 10 18 12 20 dd f2 70 6c |n..... .... ..pl| 000030c0 61 79 5f 6f 6e 28 4d 25 29 0d 10 22 13 20 e3 49 |ay_on(M%)..". .I| 000030d0 25 3d 4d 25 b8 6d 6f 76 65 25 2d 31 0d 10 2c 0e |%=M%.move%-1..,.| 000030e0 20 20 20 e3 4a 25 3d 30 b8 31 0d 10 36 41 20 20 | .J%=0.1..6A | 000030f0 20 20 20 21 69 62 6c 6b 25 3d 53 68 25 3a 69 62 | !iblk%=Sh%:ib| 00003100 6c 6b 25 21 34 3d 4d 25 28 49 25 2c 4a 25 29 3a |lk%!4=M%(I%,J%):| 00003110 c8 99 20 22 57 69 6d 70 5f 44 65 6c 65 74 65 49 |.. "Wimp_DeleteI| 00003120 63 6f 6e 22 2c 2c 69 62 6c 6b 25 0d 10 40 29 20 |con",,iblk%..@) | 00003130 20 20 20 20 53 25 28 4d 25 28 49 25 2c 4a 25 29 | S%(M%(I%,J%)| 00003140 2c 30 29 3d 2d 53 25 28 4d 25 28 49 25 2c 4a 25 |,0)=-S%(M%(I%,J%| 00003150 29 2c 30 29 0d 10 4a 1b 20 ed 3a ed 3a 74 69 6c |),0)..J. .:.:til| 00003160 65 73 25 3d 31 34 34 2d 32 2a 6d 6f 76 65 25 0d |es%=144-2*move%.| 00003170 10 54 06 20 e1 0d 10 5e 05 20 0d 10 68 46 20 f4 |.T. ...^. ..hF .| 00003180 20 2a 20 4c 6f 61 64 20 26 20 53 61 76 65 20 72 | * Load & Save r| 00003190 6f 75 74 69 6e 65 73 20 66 6f 6c 6c 6f 77 20 2d |outines follow -| 000031a0 20 6c 6f 74 20 6f 66 20 68 61 6e 64 73 68 61 6b | lot of handshak| 000031b0 69 6e 67 2c 20 65 72 67 6f 20 6c 6f 74 20 6f 66 |ing, ergo lot of| 000031c0 0d 10 72 44 20 f4 20 2a 20 63 6f 64 65 2e 20 20 |..rD . * code. | 000031d0 41 74 20 6c 65 61 73 74 20 41 63 6f 72 6e 27 73 |At least Acorn's| 000031e0 20 57 49 4d 50 20 69 73 20 61 20 70 6c 65 61 73 | WIMP is a pleas| 000031f0 75 72 65 20 74 6f 20 75 73 65 2c 20 77 68 69 63 |ure to use, whic| 00003200 68 20 69 73 0d 10 7c 41 20 f4 20 2a 20 6d 6f 72 |h is..|A . * mor| 00003210 65 20 74 68 61 6e 20 49 20 63 61 6e 20 73 61 79 |e than I can say| 00003220 20 6f 66 20 61 20 63 65 72 74 61 69 6e 20 66 61 | of a certain fa| 00003230 73 68 69 6f 6e 61 62 6c 65 20 50 43 20 70 61 63 |shionable PC pac| 00003240 6b 61 67 65 21 0d 10 86 05 20 0d 10 90 3e 20 f4 |kage!.... ...> .| 00003250 20 2a 20 49 6e 66 6f 72 6d 20 57 49 4d 50 20 74 | * Inform WIMP t| 00003260 68 61 74 20 77 65 20 77 69 6c 6c 20 61 63 63 65 |hat we will acce| 00003270 70 74 20 6c 6f 61 64 2e 20 20 47 65 74 20 70 61 |pt load. Get pa| 00003280 74 68 20 6e 61 6d 65 2e 0d 10 9a 05 20 0d 10 a4 |th name..... ...| 00003290 0b 20 dd f2 6c 6f 61 64 0d 10 ae 16 20 c8 99 20 |. ..load.... .. | 000032a0 22 48 6f 75 72 67 6c 61 73 73 5f 4f 6e 22 0d 10 |"Hourglass_On"..| 000032b0 b8 2a 20 77 62 6c 6b 25 21 31 32 3d 77 62 6c 6b |.* wblk%!12=wblk| 000032c0 25 21 38 3a 77 62 6c 6b 25 21 31 36 3d 34 3a 21 |%!8:wblk%!16=4:!| 000032d0 77 62 6c 6b 25 3d 36 34 0d 10 c2 2b 20 c8 99 20 |wblk%=64...+ .. | 000032e0 22 57 69 6d 70 5f 53 65 6e 64 4d 65 73 73 61 67 |"Wimp_SendMessag| 000032f0 65 22 2c 31 37 2c 77 62 6c 6b 25 2c 77 62 6c 6b |e",17,wblk%,wblk| 00003300 25 21 34 0d 10 cc 1e 20 70 61 74 68 24 3d 22 22 |%!4.... path$=""| 00003310 3a 61 25 3d 30 3a 62 25 3d 77 62 6c 6b 25 3f 34 |:a%=0:b%=wblk%?4| 00003320 34 0d 10 d6 15 20 c8 95 20 62 25 3c 3e 30 20 80 |4.... .. b%<>0 .| 00003330 62 25 3c 3e 31 33 0d 10 e0 11 20 20 20 70 61 74 |b%<>13.... pat| 00003340 68 24 2b 3d bd 62 25 0d 10 ea 1d 20 20 20 61 25 |h$+=.b%.... a%| 00003350 2b 3d 31 3a 62 25 3d 77 62 6c 6b 25 3f 28 34 34 |+=1:b%=wblk%?(44| 00003360 2b 61 25 29 0d 10 f4 06 20 ce 0d 10 fe 0d 20 f2 |+a%).... ..... .| 00003370 72 65 61 64 28 b9 29 0d 11 08 17 20 c8 99 20 22 |read(.).... .. "| 00003380 48 6f 75 72 67 6c 61 73 73 5f 4f 66 66 22 0d 11 |Hourglass_Off"..| 00003390 12 06 20 e1 0d 11 1c 05 20 0d 11 26 41 20 f4 20 |.. ..... ..&A . | 000033a0 2a 20 49 46 20 69 25 20 64 65 6c 65 74 65 20 61 |* IF i% delete a| 000033b0 6c 6c 20 74 69 6c 65 20 69 63 6f 6e 73 2e 20 20 |ll tile icons. | 000033c0 52 65 61 64 20 64 61 74 61 20 66 72 6f 6d 20 73 |Read data from s| 000033d0 61 76 65 64 20 67 61 6d 65 2e 0d 11 30 40 20 f4 |aved game...0@ .| 000033e0 20 2a 20 44 65 61 6c 20 74 69 6c 65 73 2c 20 66 | * Deal tiles, f| 000033f0 69 6e 64 20 68 69 6e 74 2c 20 75 70 64 61 74 65 |ind hint, update| 00003400 20 77 69 6e 64 6f 77 20 26 20 6f 70 65 6e 20 69 | window & open i| 00003410 66 20 6e 65 65 64 20 62 65 2e 0d 11 3a 22 20 f4 |f need be...:" .| 00003420 20 2a 20 55 70 64 61 74 65 20 64 65 66 61 75 6c | * Update defaul| 00003430 74 20 66 69 6c 65 20 6e 61 6d 65 2e 0d 11 44 05 |t file name...D.| 00003440 20 0d 11 4e 0f 20 dd f2 72 65 61 64 28 69 25 29 | ..N. ..read(i%)| 00003450 0d 11 58 0a 20 e7 69 25 20 8c 0d 11 62 13 20 20 |..X. .i% ...b. | 00003460 20 e3 49 25 3d 31 34 34 b8 31 88 2d 31 0d 11 6c | .I%=144.1.-1..l| 00003470 46 20 20 20 20 20 e7 53 25 28 49 25 2c 30 29 3e |F .S%(I%,0)>| 00003480 30 20 21 69 62 6c 6b 25 3d 53 68 25 3a 69 62 6c |0 !iblk%=Sh%:ibl| 00003490 6b 25 21 34 3d 49 25 3a c8 99 20 22 57 69 6d 70 |k%!4=I%:.. "Wimp| 000034a0 5f 44 65 6c 65 74 65 49 63 6f 6e 22 2c 2c 69 62 |_DeleteIcon",,ib| 000034b0 6c 6b 25 0d 11 76 08 20 20 20 ed 0d 11 80 06 20 |lk%..v. ..... | 000034c0 cd 0d 11 8a 0e 20 46 25 3d 8e 70 61 74 68 24 0d |..... F%=.path$.| 000034d0 11 94 1e 20 e3 49 25 3d 31 b8 31 34 34 3a e8 23 |... .I%=1.144:.#| 000034e0 46 25 2c 53 25 28 49 25 2c 30 29 3a ed 0d 11 9e |F%,S%(I%,0):....| 000034f0 26 20 e3 49 25 3d 30 b8 37 31 3a e8 23 46 25 2c |& .I%=0.71:.#F%,| 00003500 4d 25 28 49 25 2c 30 29 2c 4d 25 28 49 25 2c 31 |M%(I%,0),M%(I%,1| 00003510 29 3a ed 0d 11 a8 19 20 e8 23 46 25 2c 6d 6f 76 |):..... .#F%,mov| 00003520 65 25 3a d9 23 46 25 3a 46 25 3d 30 0d 11 b2 0d |e%:.#F%:F%=0....| 00003530 20 f2 64 65 61 6c 28 a3 29 0d 11 bc 19 20 e7 6d | .deal(.).... .m| 00003540 6f 76 65 25 3e 30 20 f2 70 6c 61 79 5f 6f 6e 28 |ove%>0 .play_on(| 00003550 30 29 0d 11 c6 15 20 21 68 6e 74 25 3d a4 66 69 |0).... !hnt%=.fi| 00003560 6e 64 5f 68 69 6e 74 0d 11 d0 2e 20 c8 99 20 22 |nd_hint.... .. "| 00003570 57 69 6d 70 5f 46 6f 72 63 65 52 65 64 72 61 77 |Wimp_ForceRedraw| 00003580 22 2c 53 68 25 2c 32 2c 2d 37 31 38 2c 31 32 37 |",Sh%,2,-718,127| 00003590 34 2c 2d 33 34 0d 11 da 49 20 c8 99 20 22 57 69 |4,-34...I .. "Wi| 000035a0 6d 70 5f 47 65 74 50 6f 69 6e 74 65 72 49 6e 66 |mp_GetPointerInf| 000035b0 6f 22 2c 2c 70 62 6c 6b 25 3a e7 70 62 6c 6b 25 |o",,pblk%:.pblk%| 000035c0 21 31 32 3c 3e 53 68 25 20 21 77 62 6c 6b 25 3d |!12<>Sh% !wblk%=| 000035d0 53 68 25 3a f2 6f 70 65 6e 28 53 68 25 29 0d 11 |Sh%:.open(Sh%)..| 000035e0 e4 11 20 24 66 69 6c 65 25 3d 70 61 74 68 24 0d |.. $file%=path$.| 000035f0 11 ee 06 20 e1 0d 11 f8 05 20 0d 12 02 43 20 f4 |... ..... ...C .| 00003600 20 2a 20 52 45 54 55 52 4e 20 70 72 65 73 73 65 | * RETURN presse| 00003610 64 20 2d 20 69 66 20 6f 76 65 72 20 27 73 61 76 |d - if over 'sav| 00003620 65 27 20 77 69 6e 64 6f 77 20 74 68 65 6e 20 61 |e' window then a| 00003630 74 74 65 6d 70 74 20 61 20 73 61 76 65 0d 12 0c |ttempt a save...| 00003640 20 20 f4 20 2a 20 77 69 74 68 20 64 65 66 61 75 | . * with defau| 00003650 6c 74 20 66 69 6c 65 20 6e 61 6d 65 2e 0d 12 16 |lt file name....| 00003660 05 20 0d 12 20 0a 20 dd a4 6b 65 79 0d 12 2a 23 |. .. . ..key..*#| 00003670 20 72 25 3d 28 21 77 62 6c 6b 25 3d 73 61 76 65 | r%=(!wblk%=save| 00003680 25 20 80 77 62 6c 6b 25 21 32 34 3d 31 33 29 0d |% .wblk%!24=13).| 00003690 12 34 1a 20 e7 72 25 20 61 64 6a 25 3d 2d 31 3a |.4. .r% adj%=-1:| 000036a0 f2 42 75 74 74 53 61 76 65 0d 12 3e 08 20 3d 72 |.ButtSave..>. =r| 000036b0 25 0d 12 48 05 20 0d 12 52 2e 20 f4 20 2a 20 43 |%..H. ..R. . * C| 000036c0 4c 49 43 4b 2f 44 52 41 47 20 2d 20 69 6e 69 74 |LICK/DRAG - init| 000036d0 69 61 74 65 20 66 69 6c 65 20 69 63 6f 6e 20 64 |iate file icon d| 000036e0 72 61 67 2e 0d 12 5c 05 20 0d 12 66 0b 20 dd f2 |rag...\. ..f. ..| 000036f0 64 72 61 67 0d 12 70 1b 20 e7 77 62 6c 6b 25 21 |drag..p. .wblk%!| 00003700 38 3d 31 36 20 61 64 6a 25 3d 74 72 65 65 25 0d |8=16 adj%=tree%.| 00003710 12 7a 31 20 21 77 62 6c 6b 25 3d 73 61 76 65 25 |.z1 !wblk%=save%| 00003720 3a c8 99 20 22 57 69 6d 70 5f 47 65 74 57 69 6e |:.. "Wimp_GetWin| 00003730 64 6f 77 53 74 61 74 65 22 2c 2c 77 62 6c 6b 25 |dowState",,wblk%| 00003740 0d 12 84 2f 20 6f 78 25 3d 77 62 6c 6b 25 21 34 |.../ ox%=wblk%!4| 00003750 2d 77 62 6c 6b 25 21 32 30 3a 6f 79 25 3d 77 62 |-wblk%!20:oy%=wb| 00003760 6c 6b 25 21 31 36 2d 77 62 6c 6b 25 21 32 34 0d |lk%!16-wblk%!24.| 00003770 12 8e 2c 20 77 62 6c 6b 25 21 34 3d 30 3a c8 99 |.., wblk%!4=0:..| 00003780 20 22 57 69 6d 70 5f 47 65 74 49 63 6f 6e 53 74 | "Wimp_GetIconSt| 00003790 61 74 65 22 2c 2c 77 62 6c 6b 25 0d 12 98 45 20 |ate",,wblk%...E | 000037a0 21 77 62 6c 6b 25 3d 73 61 76 65 25 3a 77 62 6c |!wblk%=save%:wbl| 000037b0 6b 25 21 34 3d 35 3a 77 62 6c 6b 25 21 38 3d 6f |k%!4=5:wblk%!8=o| 000037c0 78 25 2b 77 62 6c 6b 25 21 38 3a 77 62 6c 6b 25 |x%+wblk%!8:wblk%| 000037d0 21 31 32 3d 6f 79 25 2b 77 62 6c 6b 25 21 31 32 |!12=oy%+wblk%!12| 000037e0 0d 12 a2 30 20 77 62 6c 6b 25 21 31 36 3d 6f 78 |...0 wblk%!16=ox| 000037f0 25 2b 77 62 6c 6b 25 21 31 36 3a 77 62 6c 6b 25 |%+wblk%!16:wblk%| 00003800 21 32 30 3d 6f 79 25 2b 77 62 6c 6b 25 21 32 30 |!20=oy%+wblk%!20| 00003810 0d 12 ac 40 20 77 62 6c 6b 25 21 32 34 3d 30 3a |...@ wblk%!24=0:| 00003820 77 62 6c 6b 25 21 32 38 3d 30 3a 77 62 6c 6b 25 |wblk%!28=0:wblk%| 00003830 21 33 32 3d 26 37 46 46 46 46 46 46 46 3a 77 62 |!32=&7FFFFFFF:wb| 00003840 6c 6b 25 21 33 36 3d 26 37 46 46 46 46 46 46 46 |lk%!36=&7FFFFFFF| 00003850 0d 12 b6 1d 20 c8 99 20 22 57 69 6d 70 5f 44 72 |.... .. "Wimp_Dr| 00003860 61 67 42 6f 78 22 2c 2c 77 62 6c 6b 25 0d 12 c0 |agBox",,wblk%...| 00003870 06 20 e1 0d 12 ca 05 20 0d 12 d4 42 20 f4 20 2a |. ..... ...B . *| 00003880 20 44 72 61 67 20 62 6f 78 20 27 64 72 6f 70 70 | Drag box 'dropp| 00003890 65 64 27 2e 20 20 53 75 70 70 6c 79 20 6c 65 61 |ed'. Supply lea| 000038a0 66 20 6e 61 6d 65 20 26 20 66 69 6c 65 20 69 6e |f name & file in| 000038b0 66 6f 20 61 6e 64 20 61 73 6b 0d 12 de 2d 20 f4 |fo and ask...- .| 000038c0 20 2a 20 72 65 63 65 69 76 65 72 20 69 66 20 69 | * receiver if i| 000038d0 74 20 77 69 6c 6c 20 61 63 63 65 70 74 20 74 68 |t will accept th| 000038e0 65 20 73 61 76 65 2e 0d 12 e8 05 20 0d 12 f2 0f |e save..... ....| 000038f0 20 dd f2 44 72 61 67 53 61 76 65 0d 12 fc 24 20 | ..DragSave...$ | 00003900 c8 99 20 22 57 69 6d 70 5f 47 65 74 50 6f 69 6e |.. "Wimp_GetPoin| 00003910 74 65 72 49 6e 66 6f 22 2c 2c 77 62 6c 6b 25 0d |terInfo",,wblk%.| 00003920 13 06 4a 20 77 62 6c 6b 25 21 32 30 3d 77 62 6c |..J wblk%!20=wbl| 00003930 6b 25 21 31 32 3a 77 62 6c 6b 25 21 32 34 3d 77 |k%!12:wblk%!24=w| 00003940 62 6c 6b 25 21 31 36 3a 77 62 6c 6b 25 21 32 38 |blk%!16:wblk%!28| 00003950 3d 77 62 6c 6b 25 21 30 3a 77 62 6c 6b 25 21 33 |=wblk%!0:wblk%!3| 00003960 32 3d 77 62 6c 6b 25 21 34 0d 13 10 41 20 77 62 |2=wblk%!4...A wb| 00003970 6c 6b 25 21 33 36 3d 26 35 41 35 3a 77 62 6c 6b |lk%!36=&5A5:wblk| 00003980 25 21 30 3d 36 34 3a 77 62 6c 6b 25 21 31 32 3d |%!0=64:wblk%!12=| 00003990 30 3a 77 62 6c 6b 25 21 31 36 3d 31 3a 77 62 6c |0:wblk%!16=1:wbl| 000039a0 6b 25 21 34 30 3d 26 30 30 30 0d 13 1a 11 20 6c |k%!40=&000.... l| 000039b0 65 61 66 24 3d 24 66 69 6c 65 25 0d 13 24 13 20 |eaf$=$file%..$. | 000039c0 c8 95 20 a7 6c 65 61 66 24 2c 22 2e 22 29 0d 13 |.. .leaf$,".")..| 000039d0 2e 22 20 20 20 6c 65 61 66 24 3d c1 6c 65 61 66 |." leaf$=.leaf| 000039e0 24 2c a7 6c 65 61 66 24 2c 22 2e 22 29 2b 31 29 |$,.leaf$,".")+1)| 000039f0 0d 13 38 06 20 ce 0d 13 42 16 20 24 28 77 62 6c |..8. ...B. $(wbl| 00003a00 6b 25 2b 34 34 29 3d 6c 65 61 66 24 0d 13 4c 35 |k%+44)=leaf$..L5| 00003a10 20 c8 99 20 22 57 69 6d 70 5f 53 65 6e 64 4d 65 | .. "Wimp_SendMe| 00003a20 73 73 61 67 65 22 2c 31 37 2c 77 62 6c 6b 25 2c |ssage",17,wblk%,| 00003a30 77 62 6c 6b 25 21 32 30 2c 77 62 6c 6b 25 21 32 |wblk%!20,wblk%!2| 00003a40 34 0d 13 56 06 20 e1 0d 13 60 05 20 0d 13 6a 47 |4..V. ...`. ..jG| 00003a50 20 f4 20 2a 20 52 65 63 65 69 76 65 72 20 77 69 | . * Receiver wi| 00003a60 6c 6c 20 61 63 63 65 70 74 20 64 61 74 61 2e 20 |ll accept data. | 00003a70 20 47 65 74 20 70 61 74 68 20 6e 61 6d 65 20 73 | Get path name s| 00003a80 75 70 70 6c 69 65 64 20 62 79 20 72 65 63 65 69 |upplied by recei| 00003a90 76 65 72 0d 13 74 47 20 f4 20 2a 20 61 6e 64 20 |ver..tG . * and | 00003aa0 77 72 69 74 65 20 64 61 74 61 2e 20 20 49 66 20 |write data. If | 00003ab0 64 61 74 61 20 73 65 63 75 72 65 2c 20 69 65 2e |data secure, ie.| 00003ac0 20 73 65 6e 74 20 74 6f 20 66 69 6c 65 20 73 79 | sent to file sy| 00003ad0 73 74 65 6d 2c 20 74 68 65 6e 0d 13 7e 47 20 f4 |stem, then..~G .| 00003ae0 20 2a 20 75 70 64 61 74 65 20 64 65 66 61 75 6c | * update defaul| 00003af0 74 20 66 69 6c 65 20 6e 61 6d 65 2e 20 20 53 65 |t file name. Se| 00003b00 6e 64 20 64 61 74 61 20 6c 6f 61 64 20 6d 65 73 |nd data load mes| 00003b10 73 61 67 65 20 74 6f 20 72 65 63 65 69 76 65 72 |sage to receiver| 00003b20 2e 0d 13 88 05 20 0d 13 92 0b 20 dd f2 73 61 76 |..... .... ..sav| 00003b30 65 0d 13 9c 1e 20 70 61 74 68 24 3d 22 22 3a 61 |e.... path$="":a| 00003b40 25 3d 30 3a 62 25 3d 77 62 6c 6b 25 3f 34 34 0d |%=0:b%=wblk%?44.| 00003b50 13 a6 0c 20 c8 95 62 25 3c 3e 30 0d 13 b0 11 20 |... ..b%<>0.... | 00003b60 20 20 70 61 74 68 24 2b 3d bd 62 25 0d 13 ba 1d | path$+=.b%....| 00003b70 20 20 20 61 25 2b 3d 31 3a 62 25 3d 77 62 6c 6b | a%+=1:b%=wblk| 00003b80 25 3f 28 34 34 2b 61 25 29 0d 13 c4 06 20 ce 0d |%?(44+a%).... ..| 00003b90 13 ce 12 20 f2 77 72 69 74 65 28 70 61 74 68 24 |... .write(path$| 00003ba0 29 0d 13 d8 1e 20 e7 77 62 6c 6b 25 21 33 36 3e |).... .wblk%!36>| 00003bb0 2d 31 20 24 66 69 6c 65 25 3d 70 61 74 68 24 0d |-1 $file%=path$.| 00003bc0 13 e2 2c 20 77 62 6c 6b 25 21 31 32 3d 77 62 6c |.., wblk%!12=wbl| 00003bd0 6b 25 21 38 3a 77 62 6c 6b 25 21 31 36 3d 33 3a |k%!8:wblk%!16=3:| 00003be0 77 62 6c 6b 25 21 30 3d 32 35 36 0d 13 ec 35 20 |wblk%!0=256...5 | 00003bf0 c8 99 20 22 57 69 6d 70 5f 53 65 6e 64 4d 65 73 |.. "Wimp_SendMes| 00003c00 73 61 67 65 22 2c 31 38 2c 77 62 6c 6b 25 2c 77 |sage",18,wblk%,w| 00003c10 62 6c 6b 25 21 32 30 2c 77 62 6c 6b 25 21 32 34 |blk%!20,wblk%!24| 00003c20 0d 13 f6 06 20 e1 0d 14 00 05 20 0d 14 0a 45 20 |.... ..... ...E | 00003c30 f4 20 2a 20 52 45 54 55 52 4e 20 70 72 65 73 73 |. * RETURN press| 00003c40 65 64 20 6f 72 20 4f 4b 20 63 6c 69 63 6b 65 64 |ed or OK clicked| 00003c50 20 6f 6e 20 73 61 76 65 20 77 69 6e 64 6f 77 2e | on save window.| 00003c60 20 20 41 74 74 65 6d 70 74 20 61 20 73 61 76 65 | Attempt a save| 00003c70 0d 14 14 21 20 f4 20 2a 20 75 73 69 6e 67 20 64 |...! . * using d| 00003c80 65 66 61 75 6c 74 20 66 69 6c 65 20 6e 61 6d 65 |efault file name| 00003c90 2e 0d 14 1e 05 20 0d 14 28 0f 20 dd f2 42 75 74 |..... ..(. ..But| 00003ca0 74 53 61 76 65 0d 14 32 14 20 e7 a7 24 66 69 6c |tSave..2. ..$fil| 00003cb0 65 25 2c 22 2e 22 29 20 8c 0d 14 3c 15 20 20 20 |e%,".") ...<. | 00003cc0 f2 77 72 69 74 65 28 24 66 69 6c 65 25 29 0d 14 |.write($file%)..| 00003cd0 46 08 20 20 20 cc 0d 14 50 45 20 20 20 24 77 62 |F. ...PE $wb| 00003ce0 6c 6b 25 3d 22 20 20 20 20 54 6f 20 73 61 76 65 |lk%=" To save| 00003cf0 2c 20 64 72 61 67 20 74 68 65 20 66 69 6c 65 20 |, drag the file | 00003d00 69 63 6f 6e 20 74 6f 20 61 20 64 69 72 65 63 74 |icon to a direct| 00003d10 6f 72 79 20 76 69 65 77 65 72 22 0d 14 5a 2f 20 |ory viewer"..Z/ | 00003d20 20 20 c8 99 20 22 57 69 6d 70 5f 52 65 70 6f 72 | .. "Wimp_Repor| 00003d30 74 45 72 72 6f 72 22 2c 77 62 6c 6b 25 2c 31 2c |tError",wblk%,1,| 00003d40 22 53 68 61 6e 67 68 61 69 22 0d 14 64 06 20 cd |"Shanghai"..d. .| 00003d50 0d 14 6e 06 20 e1 0d 14 78 05 20 0d 14 82 47 20 |..n. ...x. ...G | 00003d60 f4 20 2a 20 54 68 69 73 20 69 73 20 74 68 65 20 |. * This is the | 00003d70 50 52 4f 43 20 74 68 61 74 20 66 69 6e 61 6c 6c |PROC that finall| 00003d80 79 20 77 72 69 74 65 73 20 74 68 65 20 64 61 74 |y writes the dat| 00003d90 61 20 74 6f 20 74 68 65 20 72 65 63 65 69 76 65 |a to the receive| 00003da0 72 2e 0d 14 8c 40 20 f4 20 2a 20 46 69 6c 65 54 |r....@ . * FileT| 00003db0 79 70 65 20 73 65 74 20 74 6f 20 27 53 68 61 6e |ype set to 'Shan| 00003dc0 67 68 61 69 27 2e 20 20 4d 65 6e 75 73 20 64 65 |ghai'. Menus de| 00003dd0 6c 65 74 65 64 20 69 66 20 52 45 54 55 52 4e 20 |leted if RETURN | 00003de0 6f 72 0d 14 96 28 20 f4 20 2a 20 3c 73 65 6c 65 |or...( . * <sele| 00003df0 63 74 3e 20 75 73 65 64 20 74 6f 20 69 6e 69 74 |ct> used to init| 00003e00 69 61 74 65 20 73 61 76 65 2e 0d 14 a0 05 20 0d |iate save..... .| 00003e10 14 aa 10 20 dd f2 77 72 69 74 65 28 66 24 29 0d |... ..write(f$).| 00003e20 14 b4 0b 20 46 25 3d ae 66 24 0d 14 be 1f 20 e3 |... F%=.f$.... .| 00003e30 49 25 3d 31 b8 31 34 34 3a f1 23 46 25 2c 94 53 |I%=1.144:.#F%,.S| 00003e40 25 28 49 25 2c 30 29 3a ed 0d 14 c8 26 20 e3 49 |%(I%,0):....& .I| 00003e50 25 3d 30 b8 37 31 3a f1 23 46 25 2c 4d 25 28 49 |%=0.71:.#F%,M%(I| 00003e60 25 2c 30 29 2c 4d 25 28 49 25 2c 31 29 3a ed 0d |%,0),M%(I%,1):..| 00003e70 14 d2 2f 20 f1 23 46 25 2c 6d 6f 76 65 25 3a d9 |../ .#F%,move%:.| 00003e80 23 46 25 3a 46 25 3d 30 3a ff 22 53 65 74 54 79 |#F%:F%=0:."SetTy| 00003e90 70 65 20 22 2b 66 24 2b 22 20 30 30 30 22 0d 14 |pe "+f$+" 000"..| 00003ea0 dc 1f 20 c8 99 20 22 57 69 6d 70 5f 43 72 65 61 |.. .. "Wimp_Crea| 00003eb0 74 65 4d 65 6e 75 22 2c 2c 61 64 6a 25 0d 14 e6 |teMenu",,adj%...| 00003ec0 06 20 e1 0d 14 f0 05 20 0d 14 fa 41 20 f4 20 2a |. ..... ...A . *| 00003ed0 20 45 61 63 68 20 64 61 74 61 20 73 65 74 20 69 | Each data set i| 00003ee0 73 3a 2d 20 73 70 72 69 74 65 20 6e 61 6d 65 2c |s:- sprite name,| 00003ef0 20 78 20 70 6f 73 69 74 69 6f 6e 2c 20 2d 79 20 | x position, -y | 00003f00 70 6f 73 69 74 69 6f 6e 2c 0d 15 04 44 20 f4 20 |position,...D . | 00003f10 2a 20 74 69 6c 65 20 6f 6e 20 74 6f 70 2c 20 74 |* tile on top, t| 00003f20 69 6c 65 20 74 6f 20 72 69 67 68 74 2c 20 74 69 |ile to right, ti| 00003f30 6c 65 20 74 6f 20 6c 65 66 74 2e 20 20 41 6c 6c |le to left. All| 00003f40 20 27 66 72 65 65 27 20 74 69 6c 65 73 0d 15 0e | 'free' tiles...| 00003f50 28 20 f4 20 2a 20 68 61 76 65 20 6c 61 73 74 20 |( . * have last | 00003f60 33 20 76 61 6c 75 65 73 20 73 65 74 20 74 6f 20 |3 values set to | 00003f70 30 2c 30 2c 30 0d 15 18 05 20 0d 15 22 12 20 dc |0,0,0.... ..". .| 00003f80 2d 31 2c 30 2c 30 2c 30 2c 30 2c 30 0d 15 2c d4 |-1,0,0,0,0,0..,.| 00003f90 20 dc 31 2c 31 30 31 30 2c 31 33 30 2c 30 2c 30 | .1,1010,130,0,0| 00003fa0 2c 30 2c 20 32 2c 39 32 36 2c 31 33 30 2c 30 2c |,0, 2,926,130,0,| 00003fb0 31 2c 33 2c 20 33 2c 38 34 32 2c 31 33 30 2c 30 |1,3, 3,842,130,0| 00003fc0 2c 32 2c 34 2c 20 34 2c 37 35 38 2c 31 33 30 2c |,2,4, 4,758,130,| 00003fd0 30 2c 33 2c 35 2c 20 35 2c 36 37 34 2c 31 33 30 |0,3,5, 5,674,130| 00003fe0 2c 30 2c 34 2c 36 2c 20 36 2c 35 39 30 2c 31 33 |,0,4,6, 6,590,13| 00003ff0 30 2c 30 2c 35 2c 37 2c 20 37 2c 35 30 36 2c 31 |0,0,5,7, 7,506,1| 00004000 33 30 2c 30 2c 36 2c 38 2c 20 38 2c 34 32 32 2c |30,0,6,8, 8,422,| 00004010 31 33 30 2c 30 2c 37 2c 39 2c 20 39 2c 33 33 38 |130,0,7,9, 9,338| 00004020 2c 31 33 30 2c 30 2c 38 2c 31 30 2c 20 39 2c 32 |,130,0,8,10, 9,2| 00004030 35 34 2c 31 33 30 2c 30 2c 39 2c 31 31 2c 20 39 |54,130,0,9,11, 9| 00004040 2c 31 37 30 2c 31 33 30 2c 30 2c 31 30 2c 31 32 |,170,130,0,10,12| 00004050 2c 20 39 2c 38 36 2c 31 33 30 2c 30 2c 30 2c 30 |, 9,86,130,0,0,0| 00004060 0d 15 36 a6 20 dc 31 30 2c 38 34 32 2c 32 31 34 |..6. .10,842,214| 00004070 2c 30 2c 30 2c 30 2c 20 31 30 2c 37 35 38 2c 32 |,0,0,0, 10,758,2| 00004080 31 34 2c 38 38 2c 31 33 2c 31 35 2c 20 31 30 2c |14,88,13,15, 10,| 00004090 36 37 34 2c 32 31 34 2c 38 39 2c 31 34 2c 31 36 |674,214,89,14,16| 000040a0 2c 20 31 30 2c 35 39 30 2c 32 31 34 2c 39 30 2c |, 10,590,214,90,| 000040b0 31 35 2c 31 37 2c 20 31 31 2c 35 30 36 2c 32 31 |15,17, 11,506,21| 000040c0 34 2c 39 31 2c 31 36 2c 31 38 2c 20 31 31 2c 34 |4,91,16,18, 11,4| 000040d0 32 32 2c 32 31 34 2c 39 32 2c 31 37 2c 31 39 2c |22,214,92,17,19,| 000040e0 20 31 31 2c 33 33 38 2c 32 31 34 2c 39 33 2c 31 | 11,338,214,93,1| 000040f0 38 2c 32 30 2c 20 31 31 2c 32 35 34 2c 32 31 34 |8,20, 11,254,214| 00004100 2c 30 2c 30 2c 30 0d 15 40 ce 20 dc 31 32 2c 39 |,0,0,0..@. .12,9| 00004110 32 36 2c 32 39 38 2c 30 2c 30 2c 30 2c 20 31 32 |26,298,0,0,0, 12| 00004120 2c 38 34 32 2c 32 39 38 2c 30 2c 32 31 2c 32 33 |,842,298,0,21,23| 00004130 2c 20 31 32 2c 37 35 38 2c 32 39 38 2c 39 34 2c |, 12,758,298,94,| 00004140 32 32 2c 32 34 2c 20 31 32 2c 36 37 34 2c 32 39 |22,24, 12,674,29| 00004150 38 2c 39 35 2c 32 33 2c 32 35 2c 20 31 33 2c 35 |8,95,23,25, 13,5| 00004160 39 30 2c 32 39 38 2c 39 36 2c 32 34 2c 32 36 2c |90,298,96,24,26,| 00004170 20 31 33 2c 35 30 36 2c 32 39 38 2c 39 37 2c 32 | 13,506,298,97,2| 00004180 35 2c 32 37 2c 20 31 33 2c 34 32 32 2c 32 39 38 |5,27, 13,422,298| 00004190 2c 39 38 2c 32 36 2c 32 38 2c 20 31 33 2c 33 33 |,98,26,28, 13,33| 000041a0 38 2c 32 39 38 2c 39 39 2c 32 37 2c 32 39 2c 20 |8,298,99,27,29, | 000041b0 31 34 2c 32 35 34 2c 32 39 38 2c 30 2c 32 38 2c |14,254,298,0,28,| 000041c0 33 30 2c 20 31 34 2c 31 37 30 2c 32 39 38 2c 30 |30, 14,170,298,0| 000041d0 2c 30 2c 30 0d 15 4a 2a 20 dc 31 34 2c 31 31 37 |,0,0..J* .14,117| 000041e0 38 2c 34 32 34 2c 30 2c 30 2c 30 2c 20 31 34 2c |8,424,0,0,0, 14,| 000041f0 31 30 39 34 2c 34 32 34 2c 30 2c 30 2c 30 0d 15 |1094,424,0,0,0..| 00004200 54 d9 20 dc 31 35 2c 31 30 31 30 2c 33 38 32 2c |T. .15,1010,382,| 00004210 30 2c 33 32 2c 33 34 2c 20 31 35 2c 39 32 36 2c |0,32,34, 15,926,| 00004220 33 38 32 2c 30 2c 33 33 2c 33 35 2c 20 31 35 2c |382,0,33,35, 15,| 00004230 38 34 32 2c 33 38 32 2c 30 2c 33 34 2c 33 36 2c |842,382,0,34,36,| 00004240 20 31 35 2c 37 35 38 2c 33 38 32 2c 31 30 30 2c | 15,758,382,100,| 00004250 33 35 2c 33 37 2c 20 31 36 2c 36 37 34 2c 33 38 |35,37, 16,674,38| 00004260 32 2c 31 30 31 2c 33 36 2c 33 38 2c 20 31 36 2c |2,101,36,38, 16,| 00004270 35 39 30 2c 33 38 32 2c 31 30 32 2c 33 37 2c 33 |590,382,102,37,3| 00004280 39 2c 20 31 36 2c 35 30 36 2c 33 38 32 2c 31 30 |9, 16,506,382,10| 00004290 33 2c 33 38 2c 34 30 2c 20 31 36 2c 34 32 32 2c |3,38,40, 16,422,| 000042a0 33 38 32 2c 31 30 34 2c 33 39 2c 34 31 2c 20 31 |382,104,39,41, 1| 000042b0 37 2c 33 33 38 2c 33 38 32 2c 31 30 35 2c 34 30 |7,338,382,105,40| 000042c0 2c 34 32 2c 20 31 37 2c 32 35 34 2c 33 38 32 2c |,42, 17,254,382,| 000042d0 30 2c 34 31 2c 34 33 0d 15 5e 2b 20 dc 31 37 2c |0,41,43..^+ .17,| 000042e0 31 37 30 2c 33 38 32 2c 30 2c 34 32 2c 34 34 2c |170,382,0,42,44,| 000042f0 20 31 37 2c 38 36 2c 33 38 32 2c 30 2c 34 33 2c | 17,86,382,0,43,| 00004300 35 37 0d 15 68 d9 20 dc 31 38 2c 31 30 31 30 2c |57..h. .18,1010,| 00004310 34 36 36 2c 30 2c 33 32 2c 34 36 2c 20 31 38 2c |466,0,32,46, 18,| 00004320 39 32 36 2c 34 36 36 2c 30 2c 34 35 2c 34 37 2c |926,466,0,45,47,| 00004330 20 31 38 2c 38 34 32 2c 34 36 36 2c 30 2c 34 36 | 18,842,466,0,46| 00004340 2c 34 38 2c 20 31 38 2c 37 35 38 2c 34 36 36 2c |,48, 18,758,466,| 00004350 31 30 36 2c 34 37 2c 34 39 2c 20 31 39 2c 36 37 |106,47,49, 19,67| 00004360 34 2c 34 36 36 2c 31 30 37 2c 34 38 2c 35 30 2c |4,466,107,48,50,| 00004370 20 31 39 2c 35 39 30 2c 34 36 36 2c 31 30 38 2c | 19,590,466,108,| 00004380 34 39 2c 35 31 2c 20 31 39 2c 35 30 36 2c 34 36 |49,51, 19,506,46| 00004390 36 2c 31 30 39 2c 35 30 2c 35 32 2c 20 31 39 2c |6,109,50,52, 19,| 000043a0 34 32 32 2c 34 36 36 2c 31 31 30 2c 35 31 2c 35 |422,466,110,51,5| 000043b0 33 2c 20 32 30 2c 33 33 38 2c 34 36 36 2c 31 31 |3, 20,338,466,11| 000043c0 31 2c 35 32 2c 35 34 2c 20 32 30 2c 32 35 34 2c |1,52,54, 20,254,| 000043d0 34 36 36 2c 30 2c 35 33 2c 35 35 0d 15 72 2b 20 |466,0,53,55..r+ | 000043e0 dc 32 30 2c 31 37 30 2c 34 36 36 2c 30 2c 35 34 |.20,170,466,0,54| 000043f0 2c 35 36 2c 20 32 30 2c 38 36 2c 34 36 36 2c 30 |,56, 20,86,466,0| 00004400 2c 35 35 2c 35 37 0d 15 7c 14 20 dc 32 31 2c 32 |,55,57..|. .21,2| 00004410 2c 34 32 34 2c 30 2c 30 2c 30 0d 15 86 d4 20 dc |,424,0,0,0.... .| 00004420 32 31 2c 39 32 36 2c 35 35 30 2c 30 2c 30 2c 30 |21,926,550,0,0,0| 00004430 2c 20 32 31 2c 38 34 32 2c 35 35 30 2c 30 2c 35 |, 21,842,550,0,5| 00004440 38 2c 36 30 2c 20 32 31 2c 37 35 38 2c 35 35 30 |8,60, 21,758,550| 00004450 2c 31 31 32 2c 35 39 2c 36 31 2c 20 32 32 2c 36 |,112,59,61, 22,6| 00004460 37 34 2c 35 35 30 2c 31 31 33 2c 36 30 2c 36 32 |74,550,113,60,62| 00004470 2c 20 32 32 2c 35 39 30 2c 35 35 30 2c 31 31 34 |, 22,590,550,114| 00004480 2c 36 31 2c 36 33 2c 20 32 32 2c 35 30 36 2c 35 |,61,63, 22,506,5| 00004490 35 30 2c 31 31 35 2c 36 32 2c 36 34 2c 20 32 32 |50,115,62,64, 22| 000044a0 2c 34 32 32 2c 35 35 30 2c 31 31 36 2c 36 33 2c |,422,550,116,63,| 000044b0 36 35 2c 20 32 33 2c 33 33 38 2c 35 35 30 2c 31 |65, 23,338,550,1| 000044c0 31 37 2c 36 34 2c 36 36 2c 20 32 33 2c 32 35 34 |17,64,66, 23,254| 000044d0 2c 35 35 30 2c 30 2c 36 35 2c 36 37 2c 20 32 33 |,550,0,65,67, 23| 000044e0 2c 31 37 30 2c 35 35 30 2c 30 2c 30 2c 30 0d 15 |,170,550,0,0,0..| 000044f0 90 ac 20 dc 32 33 2c 38 34 32 2c 36 33 34 2c 30 |.. .23,842,634,0| 00004500 2c 30 2c 30 2c 20 32 34 2c 37 35 38 2c 36 33 34 |,0,0, 24,758,634| 00004510 2c 31 31 38 2c 36 38 2c 37 30 2c 20 32 34 2c 36 |,118,68,70, 24,6| 00004520 37 34 2c 36 33 34 2c 31 31 39 2c 36 39 2c 37 31 |74,634,119,69,71| 00004530 2c 20 32 34 2c 35 39 30 2c 36 33 34 2c 31 32 30 |, 24,590,634,120| 00004540 2c 37 30 2c 37 32 2c 20 32 34 2c 35 30 36 2c 36 |,70,72, 24,506,6| 00004550 33 34 2c 31 32 31 2c 37 31 2c 37 33 2c 20 32 35 |34,121,71,73, 25| 00004560 2c 34 32 32 2c 36 33 34 2c 31 32 32 2c 37 32 2c |,422,634,122,72,| 00004570 37 34 2c 20 32 35 2c 33 33 38 2c 36 33 34 2c 31 |74, 25,338,634,1| 00004580 32 33 2c 37 33 2c 37 35 2c 20 32 35 2c 32 35 34 |23,73,75, 25,254| 00004590 2c 36 33 34 2c 30 2c 30 2c 30 0d 15 9a df 20 dc |,634,0,0,0.... .| 000045a0 32 35 2c 31 30 31 30 2c 37 31 38 2c 30 2c 30 2c |25,1010,718,0,0,| 000045b0 30 2c 20 32 36 2c 39 32 36 2c 37 31 38 2c 30 2c |0, 26,926,718,0,| 000045c0 37 36 2c 37 38 2c 20 32 36 2c 38 34 32 2c 37 31 |76,78, 26,842,71| 000045d0 38 2c 30 2c 37 37 2c 37 39 2c 20 32 36 2c 37 35 |8,0,77,79, 26,75| 000045e0 38 2c 37 31 38 2c 30 2c 37 38 2c 38 30 2c 20 32 |8,718,0,78,80, 2| 000045f0 36 2c 36 37 34 2c 37 31 38 2c 30 2c 37 39 2c 38 |6,674,718,0,79,8| 00004600 31 2c 20 32 37 2c 35 39 30 2c 37 31 38 2c 30 2c |1, 27,590,718,0,| 00004610 38 30 2c 38 32 2c 20 32 37 2c 35 30 36 2c 37 31 |80,82, 27,506,71| 00004620 38 2c 30 2c 38 31 2c 38 33 2c 20 32 37 2c 34 32 |8,0,81,83, 27,42| 00004630 32 2c 37 31 38 2c 30 2c 38 32 2c 38 34 2c 20 32 |2,718,0,82,84, 2| 00004640 37 2c 33 33 38 2c 37 31 38 2c 30 2c 38 33 2c 38 |7,338,718,0,83,8| 00004650 35 2c 20 32 38 2c 32 35 34 2c 37 31 38 2c 30 2c |5, 28,254,718,0,| 00004660 38 34 2c 38 36 2c 20 32 38 2c 31 37 30 2c 37 31 |84,86, 28,170,71| 00004670 38 2c 30 2c 38 35 2c 38 37 0d 15 a4 15 20 dc 32 |8,0,85,87.... .2| 00004680 38 2c 38 36 2c 37 31 38 2c 30 2c 30 2c 30 0d 15 |8,86,718,0,0,0..| 00004690 ae 06 20 3a 0d 15 b8 78 20 dc 32 38 2c 37 36 36 |.. :...x .28,766| 000046a0 2c 32 30 36 2c 30 2c 30 2c 30 2c 20 32 39 2c 36 |,206,0,0,0, 29,6| 000046b0 38 32 2c 32 30 36 2c 30 2c 38 38 2c 39 30 2c 20 |82,206,0,88,90, | 000046c0 32 39 2c 35 39 38 2c 32 30 36 2c 30 2c 38 39 2c |29,598,206,0,89,| 000046d0 39 31 2c 20 32 39 2c 35 31 34 2c 32 30 36 2c 30 |91, 29,514,206,0| 000046e0 2c 39 30 2c 39 32 2c 20 32 39 2c 34 33 30 2c 32 |,90,92, 29,430,2| 000046f0 30 36 2c 30 2c 39 31 2c 39 33 2c 20 33 30 2c 33 |06,0,91,93, 30,3| 00004700 34 36 2c 32 30 36 2c 30 2c 30 2c 30 0d 15 c2 80 |46,206,0,0,0....| 00004710 20 dc 33 30 2c 37 36 36 2c 32 39 30 2c 30 2c 30 | .30,766,290,0,0| 00004720 2c 30 2c 20 33 30 2c 36 38 32 2c 32 39 30 2c 31 |,0, 30,682,290,1| 00004730 32 34 2c 39 34 2c 39 36 2c 20 33 30 2c 35 39 38 |24,94,96, 30,598| 00004740 2c 32 39 30 2c 31 32 35 2c 39 35 2c 39 37 2c 20 |,290,125,95,97, | 00004750 33 31 2c 35 31 34 2c 32 39 30 2c 31 32 36 2c 39 |31,514,290,126,9| 00004760 36 2c 39 38 2c 20 33 31 2c 34 33 30 2c 32 39 30 |6,98, 31,430,290| 00004770 2c 31 32 37 2c 39 37 2c 39 39 2c 20 33 31 2c 33 |,127,97,99, 31,3| 00004780 34 36 2c 32 39 30 2c 30 2c 30 2c 30 0d 15 cc 88 |46,290,0,0,0....| 00004790 20 dc 33 31 2c 37 36 36 2c 33 37 34 2c 30 2c 30 | .31,766,374,0,0| 000047a0 2c 30 2c 20 33 32 2c 36 38 32 2c 33 37 34 2c 31 |,0, 32,682,374,1| 000047b0 32 38 2c 31 30 30 2c 31 30 32 2c 20 33 32 2c 35 |28,100,102, 32,5| 000047c0 39 38 2c 33 37 34 2c 31 32 39 2c 31 30 31 2c 31 |98,374,129,101,1| 000047d0 30 33 2c 20 33 32 2c 35 31 34 2c 33 37 34 2c 31 |03, 32,514,374,1| 000047e0 33 30 2c 31 30 32 2c 31 30 34 2c 20 33 32 2c 34 |30,102,104, 32,4| 000047f0 33 30 2c 33 37 34 2c 31 33 31 2c 31 30 33 2c 31 |30,374,131,103,1| 00004800 30 35 2c 20 33 33 2c 33 34 36 2c 33 37 34 2c 30 |05, 33,346,374,0| 00004810 2c 30 2c 30 0d 15 d6 88 20 dc 33 33 2c 37 36 36 |,0,0.... .33,766| 00004820 2c 34 35 38 2c 30 2c 30 2c 30 2c 20 33 33 2c 36 |,458,0,0,0, 33,6| 00004830 38 32 2c 34 35 38 2c 31 33 32 2c 31 30 36 2c 31 |82,458,132,106,1| 00004840 30 38 2c 20 33 33 2c 35 39 38 2c 34 35 38 2c 31 |08, 33,598,458,1| 00004850 33 33 2c 31 30 37 2c 31 30 39 2c 20 33 34 2c 35 |33,107,109, 34,5| 00004860 31 34 2c 34 35 38 2c 31 33 34 2c 31 30 38 2c 31 |14,458,134,108,1| 00004870 31 30 2c 20 33 34 2c 34 33 30 2c 34 35 38 2c 31 |10, 34,430,458,1| 00004880 33 35 2c 31 30 39 2c 31 31 31 2c 20 33 34 2c 33 |35,109,111, 34,3| 00004890 34 36 2c 34 35 38 2c 30 2c 30 2c 30 0d 15 e0 88 |46,458,0,0,0....| 000048a0 20 dc 33 34 2c 37 36 36 2c 35 34 32 2c 30 2c 30 | .34,766,542,0,0| 000048b0 2c 30 2c 20 33 35 2c 36 38 32 2c 35 34 32 2c 31 |,0, 35,682,542,1| 000048c0 33 36 2c 31 31 32 2c 31 31 34 2c 20 33 35 2c 35 |36,112,114, 35,5| 000048d0 39 38 2c 35 34 32 2c 31 33 37 2c 31 31 33 2c 31 |98,542,137,113,1| 000048e0 31 35 2c 20 33 35 2c 35 31 34 2c 35 34 32 2c 31 |15, 35,514,542,1| 000048f0 33 38 2c 31 31 34 2c 31 31 36 2c 20 33 35 2c 34 |38,114,116, 35,4| 00004900 33 30 2c 35 34 32 2c 31 33 39 2c 31 31 35 2c 31 |30,542,139,115,1| 00004910 31 37 2c 20 33 36 2c 33 34 36 2c 35 34 32 2c 30 |17, 36,346,542,0| 00004920 2c 30 2c 30 0d 15 ea 80 20 dc 33 36 2c 37 36 36 |,0,0.... .36,766| 00004930 2c 36 32 36 2c 30 2c 30 2c 30 2c 20 33 36 2c 36 |,626,0,0,0, 36,6| 00004940 38 32 2c 36 32 36 2c 30 2c 31 31 38 2c 31 32 30 |82,626,0,118,120| 00004950 2c 20 33 36 2c 35 39 38 2c 36 32 36 2c 30 2c 31 |, 36,598,626,0,1| 00004960 31 39 2c 31 32 31 2c 20 33 37 2c 35 31 34 2c 36 |19,121, 37,514,6| 00004970 32 36 2c 30 2c 31 32 30 2c 31 32 32 2c 20 33 37 |26,0,120,122, 37| 00004980 2c 34 33 30 2c 36 32 36 2c 30 2c 31 32 31 2c 31 |,430,626,0,121,1| 00004990 32 33 2c 20 33 37 2c 33 34 36 2c 36 32 36 2c 30 |23, 37,346,626,0| 000049a0 2c 30 2c 30 0d 15 f4 06 20 3a 0d 15 fe 54 20 dc |,0,0.... :...T .| 000049b0 33 37 2c 36 39 30 2c 32 38 32 2c 30 2c 30 2c 30 |37,690,282,0,0,0| 000049c0 2c 20 33 38 2c 36 30 36 2c 32 38 32 2c 30 2c 31 |, 38,606,282,0,1| 000049d0 32 34 2c 31 32 36 2c 20 33 38 2c 35 32 32 2c 32 |24,126, 38,522,2| 000049e0 38 32 2c 30 2c 31 32 35 2c 31 32 37 2c 20 33 38 |82,0,125,127, 38| 000049f0 2c 34 33 38 2c 32 38 32 2c 30 2c 30 2c 30 0d 16 |,438,282,0,0,0..| 00004a00 08 58 20 dc 33 38 2c 36 39 30 2c 33 36 36 2c 30 |.X .38,690,366,0| 00004a10 2c 30 2c 30 2c 20 33 39 2c 36 30 36 2c 33 36 36 |,0,0, 39,606,366| 00004a20 2c 31 34 30 2c 31 32 38 2c 31 33 30 2c 20 33 39 |,140,128,130, 39| 00004a30 2c 35 32 32 2c 33 36 36 2c 31 34 31 2c 31 32 39 |,522,366,141,129| 00004a40 2c 31 33 31 2c 20 33 39 2c 34 33 38 2c 33 36 36 |,131, 39,438,366| 00004a50 2c 30 2c 30 2c 30 0d 16 12 58 20 dc 33 39 2c 36 |,0,0,0...X .39,6| 00004a60 39 30 2c 34 35 30 2c 30 2c 30 2c 30 2c 20 34 30 |90,450,0,0,0, 40| 00004a70 2c 36 30 36 2c 34 35 30 2c 31 34 32 2c 31 33 32 |,606,450,142,132| 00004a80 2c 31 33 34 2c 20 34 30 2c 35 32 32 2c 34 35 30 |,134, 40,522,450| 00004a90 2c 31 34 33 2c 31 33 33 2c 31 33 35 2c 20 34 30 |,143,133,135, 40| 00004aa0 2c 34 33 38 2c 34 35 30 2c 30 2c 30 2c 30 0d 16 |,438,450,0,0,0..| 00004ab0 1c 54 20 dc 34 30 2c 36 39 30 2c 35 33 34 2c 30 |.T .40,690,534,0| 00004ac0 2c 30 2c 30 2c 20 34 31 2c 36 30 36 2c 35 33 34 |,0,0, 41,606,534| 00004ad0 2c 30 2c 31 33 36 2c 31 33 38 2c 20 34 31 2c 35 |,0,136,138, 41,5| 00004ae0 32 32 2c 35 33 34 2c 30 2c 31 33 37 2c 31 33 39 |22,534,0,137,139| 00004af0 2c 20 34 31 2c 34 33 38 2c 35 33 34 2c 30 2c 30 |, 41,438,534,0,0| 00004b00 2c 30 0d 16 26 06 20 3a 0d 16 30 2c 20 dc 34 31 |,0..&. :..0, .41| 00004b10 2c 36 31 34 2c 33 35 38 2c 31 34 34 2c 30 2c 30 |,614,358,144,0,0| 00004b20 2c 20 34 32 2c 35 33 30 2c 33 35 38 2c 31 34 34 |, 42,530,358,144| 00004b30 2c 30 2c 30 0d 16 3a 2c 20 dc 34 32 2c 36 31 34 |,0,0..:, .42,614| 00004b40 2c 34 34 32 2c 31 34 34 2c 30 2c 30 2c 20 34 32 |,442,144,0,0, 42| 00004b50 2c 35 33 30 2c 34 34 32 2c 31 34 34 2c 30 2c 30 |,530,442,144,0,0| 00004b60 0d 16 44 16 20 dc 34 32 2c 35 38 30 2c 33 39 32 |..D. .42,580,392| 00004b70 2c 30 2c 30 2c 30 0d ff |,0,0,0..| 00004b78