Home » Personal collection » Acorn hard disk » zipped_disks » 2000_games » games/!Puzzle/!RunImage

games/!Puzzle/!RunImage

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Personal collection » Acorn hard disk » zipped_disks » 2000_games
Filename: games/!Puzzle/!RunImage
Read OK:
File size: 1A0E bytes
Load address: 0000
Exec address: 0000
Duplicates

There are 4 duplicate copies of this file in the archive:

File contents
   10REM > !RunImage
   20DIM taskid%4:$taskid%="TASK"
   30SYS "Wimp_Initialise",200,!taskid%,"Puzzle" TO version%
   40`wbcol=3:`tbcol=2:`sco=3:`mbcol=2:`wfcol=7:`tfcol=7:`sci=1:`tbcol2=12
   50PROCvars
   60DIM Bd%(3,3),T%(15),q% 256,buffer% &200
   70DIM menu$(10),menuptr%(10),maxmw%(10)
   80PROCNewBoard
   90puzzle_h%=280
  100puzzle_w%=276
  110puzzle%=FNcwindow
  120DATA Puzzle,3,`wfcol,`wbcol,0,-1024,1280,0,0,-puzzle_w%,puzzle_h%,0,0
  130ON ERROR PROCfinish:VDU4,30:OSCLI"FX4":REPORT:PRINT" at line ";ERL:END
  140 
  150ONERROR PROCerrorbox:SYS CrMenu,,-1 : REM close menus!
  160SYS Drag,,-1:PROCgetpointer:PROCpopup(puzzle%)
  170REPEAT
  180  SYS Poll%,1,q% TO A%
  190  CASE A% OF
  200  WHEN 1 :PROCredraw_window(!q%)
  210  WHEN 2 :PROCopen_window(!q%,q%!4,q%!8,q%!12,q%!16,q%!20,q%!24,q%!28)
  220  WHEN 3 :PROCcloseawindow(!q%)
  230  WHEN 6 :PROCcheckmouse(!q%,q%!4,q%!8,q%!12,q%!16,q%!20)
  240  WHEN 9 :PROCmenuselect(q%)
  250  WHEN 17,18:PROCreceive(q%)
  260  ENDCASE
  270UNTIL FALSE
  280 
  290DEF PROCreceive(q%)
  300CASE q%!16 OF
  310WHEN 0:PROCfinish:END
  320ENDCASE
  330ENDPROC
  340 
  350DEF FNcwindow
  360READ A$,f%,fc%,bc%,x0%,y0%,x1%,y1%,cx0%,cy0%,cx1%,cy1%,nicons%
  370=FNcreate_window(cx0%,cy0%,cx1%,cy1%,0,0,f%,fc%,bc%,x0%,y0%,x1%,y1%,&2D,A$,nicons%)
  380 
  390DEF PROCcheckmouse(mousex%,mousey%,b%,handle%,icon%,ob%)
  400IF(b%AND5)THEN
  410  IFhandle%<>-1THENPROCgetw(handle%)
  420  CASE handle% OF
  430  WHEN puzzle%:PROCstrike
  440  ENDCASE
  450ENDIF
  460IF(b%AND2)THEN
  470  CASE handle% OF
  480  WHEN puzzle%
  490    PROCdomenu(puzzle%,"New Board","Puzzle")
  500  ENDCASE
  510ENDIF
  520ENDPROC
  530 
  540DEF PROCdomenu(handle%,menu$,menutitle$)
  550menuhandle%=handle%
  560menuptr%=buffer%
  570i%=0
  580menuptr%!20=40
  590$menuptr%=menutitle$
  600menuptr%?12=`tfcol:menuptr%?13=2:menuptr%?14=`wfcol:menuptr%?15=`wbcol
  610menuptr%!16=180-24:menuptr%!24=0
  620menuptr%+=28
  630REPEAT item$=FNpar(","):PROCmenuitem(item$):UNTIL item$=""
  640menuptr%!-24=(menuptr%!-24)OR&80
  650IFhandle%=101 SYS CrMenu,,buffer%,mousex%-32,96+40 ELSE SYS CrMenu,,buffer%,mousex%-32,mousey%+16
  660ENDPROC
  670 
  680DEF PROCmenuitem(text$)
  690IF text$="" ENDPROC
  700menuptr%!0=0
  710menuptr%!4=-1
  720menuptr%!8=&07000021
  730$(menuptr%+12)=text$
  740menuptr%+=24
  750ENDPROC
  760 
  770DEF FNpar(sep$)
  780i1%=i%+1:i%=INSTR(menu$+sep$,sep$,i1%)
  790=MID$(menu$,i1%,i%-i1%)
  800 
  810DEF PROCmenuselect(menus%)
  820SYS DcMenu,,buffer%,menus%,STRING$(200," ")TO,,,a$
  830IF a$="" THEN ENDPROC
  840CASE menuhandle% OF
  850WHEN puzzle%
  860  IF a$="New Board"THEN
  870    PROCNewBoard:PROCredraw_window(puzzle%)
  880  ENDIF
  890ENDCASE
  900ENDPROC
  910 
  920DEF PROCstrike
  930CX%=mousex%-bx%-14>>6:CY%=by%-8-mousey%>>6
  940IFCX%>=0 AND CX%<4 AND CY%>=0 AND CY%<4 AND(CX%=puzzle_xblank% ORCY%=puzzle_yblank%) THEN
  950IFCX%=puzzle_xblank% THEN
  960CASE TRUE OF
  970WHEN CY%>puzzle_yblank%
  980REPEAT Bd%(CX%,puzzle_yblank%)=Bd%(CX%,puzzle_yblank%+1)+&80
  990puzzle_yblank%+=1:UNTILpuzzle_yblank%=CY%
 1000WHEN CY%<puzzle_yblank%
 1010REPEAT Bd%(CX%,puzzle_yblank%)=Bd%(CX%,puzzle_yblank%-1)+&80
 1020puzzle_yblank%-=1:UNTILpuzzle_yblank%=CY%
 1030ENDCASE
 1040ELSE
 1050CASE TRUE OF
 1060WHEN CX%>puzzle_xblank%
 1070REPEAT Bd%(puzzle_xblank%,CY%)=Bd%(puzzle_xblank%+1,CY%)+&80
 1080puzzle_xblank%+=1:UNTILpuzzle_xblank%=CX%
 1090WHEN CX%<puzzle_xblank%
 1100REPEAT Bd%(puzzle_xblank%,CY%)=Bd%(puzzle_xblank%-1,CY%)+&80
 1110puzzle_xblank%-=1:UNTILpuzzle_xblank%=CX%
 1120ENDCASE
 1130ENDIF
 1140puzzle_xblank%=CX%:puzzle_yblank%=CY%:Bd%(CX%,CY%)=&80
 1150PROCupdate(puzzle%,0,-puzzle_h%,puzzle_w%,0)
 1160WHILE more%
 1170FORCX%=0TO3:FORCY%=0TO3:IFBd%(CX%,CY%)>127 PROCTile(CX%,CY%)
 1180NEXT:NEXT
 1190SYS GetR%,0,q% TO more%
 1200ENDWHILE
 1210FORCX%=0TO3:FORCY%=0TO3:Bd%(CX%,CY%)=Bd%(CX%,CY%)AND&7F
 1220NEXT:NEXT
 1230ELSE VDU7
 1240ENDIF
 1250ENDIF
 1260ENDPROC
 1270 
 1280DEF PROCNewBoard
 1290FORZ%=0TO15:T%(Z%)=Z%:NEXT
 1300FORX%=0TO3:FORY%=0TO3:REPEAT Q%=RND(16)-1:UNTILT%(Q%)<>-1
 1310IFT%(Q%)=0 puzzle_xblank%=X%:puzzle_yblank%=Y%
 1320Bd%(X%,Y%)=T%(Q%):T%(Q%)=-1:NEXT:NEXT
 1330ENDPROC
 1340 
 1350DEF PROCcloseawindow(handle%)
 1360PROCclose_window(handle%)
 1370PROCfinish:END
 1380ENDPROC
 1390 
 1400DEF PROCfinish
 1410SYS "Wimp_CloseDown"
 1420ENDPROC
 1430 
 1440DEF FNcreate_window(cx0%,cy0%,cx1%,cy1%,scx%,scy%,flags%,fc%,bc%,sx0%,sy0%,sx1%,sy1%,titlef%,title$,nicons%)
 1450!q%=cx0%:q%!4=cy0%:q%!8=cx1%:q%!12=cy1%:q%!16=scx%:q%!20=scy%
 1460q%!24=-1:q%!28=flags%
 1470IFfc%=15ANDbc%=15THEN
 1480  q%?32=15:q%?33=15:q%?34=fc%:q%?35=bc%
 1490ELSE q%?32=`tfcol:q%?33=`tbcol:q%?34=fc%:q%?35=bc%
 1500ENDIF
 1510q%?36=`sco:q%?37=`tbcol:q%?38=`tbcol2:q%?39=0
 1520q%!40=sx0%:q%!44=sy0%:q%!48=sx1%:q%!52=sy1%
 1530q%!56=titlef%
 1540q%!60=&3000      : REM work area flags
 1550q%!64=0:q%!68=0  : REM reserved
 1560$(q%+72)=LEFT$(title$,11)
 1570q%!84=nicons%
 1580LOCALI%,x0%,y0%,x1%,y1%,f%,data$:I%=q%+88
 1590WHILE nicons%>0
 1600  READ x0%,y0%,x1%,y1%,f%,fc%,bc%,data$
 1610  I%!0=x0%:I%!4=y0%:I%!8=x1%:I%!12=y1%
 1620  IF (f%AND&40)=0 THEN bc%=fc%+(bc%<<4)
 1630  I%!16=f%+(bc%<<24)
 1640  IF(f%AND&100)THEN
 1650    ERROR 2000,"Not combat capable"
 1660  ELSE
 1670    $(I%+20)=data$
 1680  ENDIF
 1690  I%=I%+32:nicons%=nicons%-1
 1700ENDWHILE
 1710SYS CreateW,,q% TO handle%
 1720=handle%
 1730 
 1740DEF PROCfront(handle%)
 1750IFhandle%=-1THENENDPROC
 1760PROCgetw(handle%)
 1770PROCopen_window(handle%,x0%,y0%,x1%,y1%,scx%,scy%,-1)
 1780ENDPROC
 1790 
 1800DEF PROCpopup(handle%)
 1810PROCgetw(handle%)
 1820xo%=mousex%-(x0%+x1%)/2:yo%=mousey%-(y1%+64)
 1830PROCopen_window(handle%,x0%+xo%,y0%+yo%,x1%+xo%,y1%+yo%,scx%,scy%,-1)
 1840ENDPROC
 1850 
 1860DEF PROCopen_window(handle%,x0%,y0%,x1%,y1%,scx%,scy%,bhandle%)
 1870IFhandle%=-1THENENDPROC
 1880q%!0=handle%:q%!28=bhandle%
 1890q%!4=x0%:q%!8=y0%:q%!12=x1%:q%!16=y1%
 1900q%!20=scx%:q%!24=scy%
 1910SYS OpenW,,q%
 1920ENDPROC
 1930 
 1940DEF PROCgetw(handle%)
 1950!q%=handle%:SYS GetW,,q%
 1960PROCinfo(q%+4):bhandle%=q%!28:flags%=q%!32
 1970ENDPROC
 1980 
 1990DEF PROCinfo(q%)
 2000x0%=!q%:y0%=q%!4:x1%=q%!8:y1%=q%!12:scx%=q%!16:scy%=q%!20
 2010bx%=x0%-scx%:by%=y1%-scy%
 2020ENDPROC
 2030 
 2040DEF PROCupdate(handle%,ux0%,uy0%,ux1%,uy1%)
 2050!q%=handle%:q%!4=ux0%:q%!8=uy0%:q%!12=ux1%:q%!16=uy1%
 2060SYS UpdateW,,q% TO more%:PROCinfo(q%+4)
 2070ENDPROC
 2080 
 2090DEF PROCredraw_window(handle%)
 2100IFhandle%=puzzle% THEN
 2110!q%=handle%:SYS RedrawW,,q% TO more%
 2120PROCinfo(q%+4)
 2130WHILE more%
 2140  SYS Col%,3:RECTANGLE FILL bx%,by%,puzzle_w%,-puzzle_h%
 2150  SYS Col%,7:RECTANGLE bx%+8,by%-8,puzzle_w%-16,16-puzzle_h%
 2160  ox0%=(q%!28-(bx%+14))DIV64:IFox0%>3 ox0%=3
 2170  ox1%=(q%!36-(bx%+14))DIV64:IFox1%>3 ox1%=3
 2180  oy0%=-(q%!40-(by%-14))DIV64:IFoy0%>3 oy0%=3
 2190  oy1%=-(q%!32-(by%-14))DIV64:IFoy1%>3 oy1%=3
 2200  FORX%=ox0%TOox1%:FORY%=oy0%TOoy1%:PROCTile(X%,Y%)
 2210  NEXT:NEXT
 2220  SYS GetR%,0,q% TO more%
 2230ENDWHILE
 2240ENDIF
 2250ENDPROC
 2260 
 2270DEF PROCclose_window(handle%)
 2280!q%=handle%:SYS CloseW,,q%
 2290ENDPROC
 2300 
 2310DEF PROCvars
 2320Wimp    = (1<<18) + (3<<6)
 2330CreateW = Wimp+1
 2340OpenW   = Wimp+5
 2350CloseW  = Wimp+6
 2360Poll%   = Wimp+7
 2370RedrawW = Wimp+8
 2380UpdateW = Wimp+9
 2390GetR%   = Wimp+10
 2400GetW    = Wimp+11
 2410GetP    = Wimp+15
 2420Drag    = Wimp+16
 2430CrMenu  = Wimp+20
 2440DcMenu  = Wimp+21
 2450SYS "OS_SWINumberFromString",,"Wimp_SetColour" TO Col%
 2460ENDPROC
 2470 
 2480DEF PROCgetpointer
 2490SYS GetP,,q%
 2500mousex%=!q%:mousey%=q%!4:b%=q%!8:handle%=q%!12:icon%=q%!16:ob%=q%!20
 2510ENDPROC
 2520 
 2530DEF PROCerrorbox
 2540SYS Drag,,-1
 2550!buffer%=ERR:$(buffer%+4)=REPORT$+" at line "+STR$ERL+CHR$0
 2560SYS "Wimp_ReportError",buffer%,1,"Puzzle"
 2570VDU4:OSCLI"FX4":END
 2580ENDPROC
 2590 
 2600DEF PROCTile(X%,Y%)
 2610LOCALA%:A%=Bd%(X%,Y%)AND&7F:X%=bx%+X%*64+14:Y%=by%-Y%*64-72
 2620IFA% THEN
 2630SYS Col%,0:RECTANGLE FILL X%+2,Y%+4,52,48
 2640SYS Col%,7:RECTANGLE X%,Y%,56:MOVEX%+(A%>9)*8+20,Y%+40:PRINT;A%;
 2650ELSE SYS Col%,4:RECTANGLEFILLX%,Y%,56
 2660ENDIF
 2670ENDPROC

� > !RunImage
� taskid%4:$taskid%="TASK"
9ș "Wimp_Initialise",200,!taskid%,"Puzzle" � version%
(I`wbcol=3:`tbcol=2:`sco=3:`mbcol=2:`wfcol=7:`tfcol=7:`sci=1:`tbcol2=12
2	�vars
<)� Bd%(3,3),T%(15),q% 256,buffer% &200
F'� menu$(10),menuptr%(10),maxmw%(10)
P
�NewBoard
Zpuzzle_h%=280
dpuzzle_w%=276
npuzzle%=�cwindow
xF� Puzzle,3,`wfcol,`wbcol,0,-1024,1280,0,0,-puzzle_w%,puzzle_h%,0,0
�/� � �finish:�4,30:�"FX4":�:�" at line ";�:�
� 
�/� �errorbox:ș CrMenu,,-1 : � close menus!
�+ș Drag,,-1:�getpointer:�popup(puzzle%)
��
�  ș Poll%,1,q% � A%
�
  Ȏ A% �
�  � 1 :�redraw_window(!q%)
�D  � 2 :�open_window(!q%,q%!4,q%!8,q%!12,q%!16,q%!20,q%!24,q%!28)
�  � 3 :�closeawindow(!q%)
�7  � 6 :�checkmouse(!q%,q%!4,q%!8,q%!12,q%!16,q%!20)
�  � 9 :�menuselect(q%)
�  � 17,18:�receive(q%)
  �
� �
 
"� �receive(q%)
,Ȏ q%!16 �
6� 0:�finish:�
@�
J�
T 
^� �cwindow
h?� A$,f%,fc%,bc%,x0%,y0%,x1%,y1%,cx0%,cy0%,cx1%,cy1%,nicons%
rV=�create_window(cx0%,cy0%,cx1%,cy1%,0,0,f%,fc%,bc%,x0%,y0%,x1%,y1%,&2D,A$,nicons%)
| 
�7� �checkmouse(mousex%,mousey%,b%,handle%,icon%,ob%)
��(b%�5)�
�!  �handle%<>-1��getw(handle%)
�  Ȏ handle% �
�  � puzzle%:�strike
�  �
��
��(b%�2)�
�  Ȏ handle% �
�  � puzzle%
�-    �domenu(puzzle%,"New Board","Puzzle")
�  �
��
�
 
'� �domenu(handle%,menu$,menutitle$)
&menuhandle%=handle%
0menuptr%=buffer%
:i%=0
Dmenuptr%!20=40
N$menuptr%=menutitle$
XJmenuptr%?12=`tfcol:menuptr%?13=2:menuptr%?14=`wfcol:menuptr%?15=`wbcol
b$menuptr%!16=180-24:menuptr%!24=0
lmenuptr%+=28
v1� item$=�par(","):�menuitem(item$):� item$=""
�#menuptr%!-24=(menuptr%!-24)�&80
�_�handle%=101 ș CrMenu,,buffer%,mousex%-32,96+40 � ș CrMenu,,buffer%,mousex%-32,mousey%+16
��
� 
�� �menuitem(text$)
�� text$="" �
�menuptr%!0=0
�menuptr%!4=-1
�menuptr%!8=&07000021
�$(menuptr%+12)=text$
�menuptr%+=24
��
� 
� �par(sep$)
%i1%=i%+1:i%=�menu$+sep$,sep$,i1%)
=�menu$,i1%,i%-i1%)
  
*� �menuselect(menus%)
4-ș DcMenu,,buffer%,menus%,�200," ")�,,,a$
>� a$="" � �
HȎ menuhandle% �
R
� puzzle%
\  � a$="New Board"�
f)    �NewBoard:�redraw_window(puzzle%)
p  �
z�
��
� 
�
� �strike
�.CX%=mousex%-bx%-14>>6:CY%=by%-8-mousey%>>6
�P�CX%>=0 � CX%<4 � CY%>=0 � CY%<4 �(CX%=puzzle_xblank% �CY%=puzzle_yblank%) �
��CX%=puzzle_xblank% �
�
Ȏ � �
�� CY%>puzzle_yblank%
�;� Bd%(CX%,puzzle_yblank%)=Bd%(CX%,puzzle_yblank%+1)+&80
�)puzzle_yblank%+=1:�puzzle_yblank%=CY%
�� CY%<puzzle_yblank%
�;� Bd%(CX%,puzzle_yblank%)=Bd%(CX%,puzzle_yblank%-1)+&80
�)puzzle_yblank%-=1:�puzzle_yblank%=CY%
�
�

Ȏ � �
$� CX%>puzzle_xblank%
.;� Bd%(puzzle_xblank%,CY%)=Bd%(puzzle_xblank%+1,CY%)+&80
8)puzzle_xblank%+=1:�puzzle_xblank%=CX%
B� CX%<puzzle_xblank%
L;� Bd%(puzzle_xblank%,CY%)=Bd%(puzzle_xblank%-1,CY%)+&80
V)puzzle_xblank%-=1:�puzzle_xblank%=CX%
`�
j�
t:puzzle_xblank%=CX%:puzzle_yblank%=CY%:Bd%(CX%,CY%)=&80
~-�update(puzzle%,0,-puzzle_h%,puzzle_w%,0)
�ȕ more%
�6�CX%=0�3:�CY%=0�3:�Bd%(CX%,CY%)>127 �Tile(CX%,CY%)
��:�
�ș GetR%,0,q% � more%
��
�3�CX%=0�3:�CY%=0�3:Bd%(CX%,CY%)=Bd%(CX%,CY%)�&7F
��:�
�� �7
��
��
��
� 
� �NewBoard

�Z%=0�15:T%(Z%)=Z%:�
,�X%=0�3:�Y%=0�3:� Q%=�(16)-1:�T%(Q%)<>-1
1�T%(Q%)=0 puzzle_xblank%=X%:puzzle_yblank%=Y%
(#Bd%(X%,Y%)=T%(Q%):T%(Q%)=-1:�:�
2�
< 
F� �closeawindow(handle%)
P�close_window(handle%)
Z
�finish:�
d�
n 
x
� �finish
�ș "Wimp_CloseDown"
��
� 
�m� �create_window(cx0%,cy0%,cx1%,cy1%,scx%,scy%,flags%,fc%,bc%,sx0%,sy0%,sx1%,sy1%,titlef%,title$,nicons%)
�A!q%=cx0%:q%!4=cy0%:q%!8=cx1%:q%!12=cy1%:q%!16=scx%:q%!20=scy%
�q%!24=-1:q%!28=flags%
��fc%=15�bc%=15�
�+  q%?32=15:q%?33=15:q%?34=fc%:q%?35=bc%
�3� q%?32=`tfcol:q%?33=`tbcol:q%?34=fc%:q%?35=bc%
��
�1q%?36=`sco:q%?37=`tbcol:q%?38=`tbcol2:q%?39=0
�/q%!40=sx0%:q%!44=sy0%:q%!48=sx1%:q%!52=sy1%
�q%!56=titlef%
(q%!60=&3000      : � work area flags
!q%!64=0:q%!68=0  : � reserved
$(q%+72)=�title$,11)
"q%!84=nicons%
,)�I%,x0%,y0%,x1%,y1%,f%,data$:I%=q%+88
6ȕ nicons%>0
@(  � x0%,y0%,x1%,y1%,f%,fc%,bc%,data$
J*  I%!0=x0%:I%!4=y0%:I%!8=x1%:I%!12=y1%
T%  � (f%�&40)=0 � bc%=fc%+(bc%<<4)
^  I%!16=f%+(bc%<<24)
h  �(f%�&100)�
r#    � 2000,"Not combat capable"
|  �
�    $(I%+20)=data$
�  �
�   I%=I%+32:nicons%=nicons%-1
��
�ș CreateW,,q% � handle%
�=handle%
� 
�� �front(handle%)
��handle%=-1��
��getw(handle%)
�6�open_window(handle%,x0%,y0%,x1%,y1%,scx%,scy%,-1)
��
� 
� �popup(handle%)
�getw(handle%)
0xo%=mousex%-(x0%+x1%)/2:yo%=mousey%-(y1%+64)
&F�open_window(handle%,x0%+xo%,y0%+yo%,x1%+xo%,y1%+yo%,scx%,scy%,-1)
0�
: 
D>� �open_window(handle%,x0%,y0%,x1%,y1%,scx%,scy%,bhandle%)
N�handle%=-1��
Xq%!0=handle%:q%!28=bhandle%
b)q%!4=x0%:q%!8=y0%:q%!12=x1%:q%!16=y1%
lq%!20=scx%:q%!24=scy%
vș OpenW,,q%
��
� 
�� �getw(handle%)
�!q%=handle%:ș GetW,,q%
�+�info(q%+4):bhandle%=q%!28:flags%=q%!32
��
� 
�� �info(q%)
�=x0%=!q%:y0%=q%!4:x1%=q%!8:y1%=q%!12:scx%=q%!16:scy%=q%!20
�bx%=x0%-scx%:by%=y1%-scy%
��
� 
�*� �update(handle%,ux0%,uy0%,ux1%,uy1%)
9!q%=handle%:q%!4=ux0%:q%!8=uy0%:q%!12=ux1%:q%!16=uy1%
&ș UpdateW,,q% � more%:�info(q%+4)
�
  
*� �redraw_window(handle%)
4�handle%=puzzle% �
>&!q%=handle%:ș RedrawW,,q% � more%
H�info(q%+4)
Rȕ more%
\2  ș Col%,3:ȓ Ȑ bx%,by%,puzzle_w%,-puzzle_h%
f8  ș Col%,7:ȓ bx%+8,by%-8,puzzle_w%-16,16-puzzle_h%
p-  ox0%=(q%!28-(bx%+14))�64:�ox0%>3 ox0%=3
z-  ox1%=(q%!36-(bx%+14))�64:�ox1%>3 ox1%=3
�.  oy0%=-(q%!40-(by%-14))�64:�oy0%>3 oy0%=3
�.  oy1%=-(q%!32-(by%-14))�64:�oy1%>3 oy1%=3
�.  �X%=ox0%�ox1%:�Y%=oy0%�oy1%:�Tile(X%,Y%)
�	  �:�
�  ș GetR%,0,q% � more%
��
��
��
� 
�� �close_window(handle%)
�!q%=handle%:ș CloseW,,q%
��
� 
	� �vars
	Wimp    = (1<<18) + (3<<6)
	CreateW = Wimp+1
	$OpenW   = Wimp+5
	.CloseW  = Wimp+6
	8Poll%   = Wimp+7
	BRedrawW = Wimp+8
	LUpdateW = Wimp+9
	VGetR%   = Wimp+10
	`GetW    = Wimp+11
	jGetP    = Wimp+15
	tDrag    = Wimp+16
	~CrMenu  = Wimp+20
	�DcMenu  = Wimp+21
	�8ș "OS_SWINumberFromString",,"Wimp_SetColour" � Col%
	��
	� 
	�� �getpointer
	�ș GetP,,q%
	�Hmousex%=!q%:mousey%=q%!4:b%=q%!8:handle%=q%!12:icon%=q%!16:ob%=q%!20
	��
	� 
	�� �errorbox
	�ș Drag,,-1
	�0!buffer%=�:$(buffer%+4)=�$+" at line "+Þ+�0
,ș "Wimp_ReportError",buffer%,1,"Puzzle"

�4:�"FX4":�
�
 
(� �Tile(X%,Y%)
29�A%:A%=Bd%(X%,Y%)�&7F:X%=bx%+X%*64+14:Y%=by%-Y%*64-72
<	�A% �
F#ș Col%,0:ȓ Ȑ X%+2,Y%+4,52,48
P5ș Col%,7:ȓ X%,Y%,56:�X%+(A%>9)*8+20,Y%+40:�;A%;
Z� ș Col%,4:ȓȐX%,Y%,56
d�
n�
�
00000000  0d 00 0a 11 f4 20 3e 20  21 52 75 6e 49 6d 61 67  |..... > !RunImag|
00000010  65 0d 00 14 1e de 20 74  61 73 6b 69 64 25 34 3a  |e..... taskid%4:|
00000020  24 74 61 73 6b 69 64 25  3d 22 54 41 53 4b 22 0d  |$taskid%="TASK".|
00000030  00 1e 39 c8 99 20 22 57  69 6d 70 5f 49 6e 69 74  |..9.. "Wimp_Init|
00000040  69 61 6c 69 73 65 22 2c  32 30 30 2c 21 74 61 73  |ialise",200,!tas|
00000050  6b 69 64 25 2c 22 50 75  7a 7a 6c 65 22 20 b8 20  |kid%,"Puzzle" . |
00000060  76 65 72 73 69 6f 6e 25  0d 00 28 49 60 77 62 63  |version%..(I`wbc|
00000070  6f 6c 3d 33 3a 60 74 62  63 6f 6c 3d 32 3a 60 73  |ol=3:`tbcol=2:`s|
00000080  63 6f 3d 33 3a 60 6d 62  63 6f 6c 3d 32 3a 60 77  |co=3:`mbcol=2:`w|
00000090  66 63 6f 6c 3d 37 3a 60  74 66 63 6f 6c 3d 37 3a  |fcol=7:`tfcol=7:|
000000a0  60 73 63 69 3d 31 3a 60  74 62 63 6f 6c 32 3d 31  |`sci=1:`tbcol2=1|
000000b0  32 0d 00 32 09 f2 76 61  72 73 0d 00 3c 29 de 20  |2..2..vars..<). |
000000c0  42 64 25 28 33 2c 33 29  2c 54 25 28 31 35 29 2c  |Bd%(3,3),T%(15),|
000000d0  71 25 20 32 35 36 2c 62  75 66 66 65 72 25 20 26  |q% 256,buffer% &|
000000e0  32 30 30 0d 00 46 27 de  20 6d 65 6e 75 24 28 31  |200..F'. menu$(1|
000000f0  30 29 2c 6d 65 6e 75 70  74 72 25 28 31 30 29 2c  |0),menuptr%(10),|
00000100  6d 61 78 6d 77 25 28 31  30 29 0d 00 50 0d f2 4e  |maxmw%(10)..P..N|
00000110  65 77 42 6f 61 72 64 0d  00 5a 11 70 75 7a 7a 6c  |ewBoard..Z.puzzl|
00000120  65 5f 68 25 3d 32 38 30  0d 00 64 11 70 75 7a 7a  |e_h%=280..d.puzz|
00000130  6c 65 5f 77 25 3d 32 37  36 0d 00 6e 14 70 75 7a  |le_w%=276..n.puz|
00000140  7a 6c 65 25 3d a4 63 77  69 6e 64 6f 77 0d 00 78  |zle%=.cwindow..x|
00000150  46 dc 20 50 75 7a 7a 6c  65 2c 33 2c 60 77 66 63  |F. Puzzle,3,`wfc|
00000160  6f 6c 2c 60 77 62 63 6f  6c 2c 30 2c 2d 31 30 32  |ol,`wbcol,0,-102|
00000170  34 2c 31 32 38 30 2c 30  2c 30 2c 2d 70 75 7a 7a  |4,1280,0,0,-puzz|
00000180  6c 65 5f 77 25 2c 70 75  7a 7a 6c 65 5f 68 25 2c  |le_w%,puzzle_h%,|
00000190  30 2c 30 0d 00 82 2f ee  20 85 20 f2 66 69 6e 69  |0,0.../. . .fini|
000001a0  73 68 3a ef 34 2c 33 30  3a ff 22 46 58 34 22 3a  |sh:.4,30:."FX4":|
000001b0  f6 3a f1 22 20 61 74 20  6c 69 6e 65 20 22 3b 9e  |.:." at line ";.|
000001c0  3a e0 0d 00 8c 05 20 0d  00 96 2f ee 85 20 f2 65  |:..... .../.. .e|
000001d0  72 72 6f 72 62 6f 78 3a  c8 99 20 43 72 4d 65 6e  |rrorbox:.. CrMen|
000001e0  75 2c 2c 2d 31 20 3a 20  f4 20 63 6c 6f 73 65 20  |u,,-1 : . close |
000001f0  6d 65 6e 75 73 21 0d 00  a0 2b c8 99 20 44 72 61  |menus!...+.. Dra|
00000200  67 2c 2c 2d 31 3a f2 67  65 74 70 6f 69 6e 74 65  |g,,-1:.getpointe|
00000210  72 3a f2 70 6f 70 75 70  28 70 75 7a 7a 6c 65 25  |r:.popup(puzzle%|
00000220  29 0d 00 aa 05 f5 0d 00  b4 18 20 20 c8 99 20 50  |).........  .. P|
00000230  6f 6c 6c 25 2c 31 2c 71  25 20 b8 20 41 25 0d 00  |oll%,1,q% . A%..|
00000240  be 0d 20 20 c8 8e 20 41  25 20 ca 0d 00 c8 1e 20  |..  .. A% ..... |
00000250  20 c9 20 31 20 3a f2 72  65 64 72 61 77 5f 77 69  | . 1 :.redraw_wi|
00000260  6e 64 6f 77 28 21 71 25  29 0d 00 d2 44 20 20 c9  |ndow(!q%)...D  .|
00000270  20 32 20 3a f2 6f 70 65  6e 5f 77 69 6e 64 6f 77  | 2 :.open_window|
00000280  28 21 71 25 2c 71 25 21  34 2c 71 25 21 38 2c 71  |(!q%,q%!4,q%!8,q|
00000290  25 21 31 32 2c 71 25 21  31 36 2c 71 25 21 32 30  |%!12,q%!16,q%!20|
000002a0  2c 71 25 21 32 34 2c 71  25 21 32 38 29 0d 00 dc  |,q%!24,q%!28)...|
000002b0  1d 20 20 c9 20 33 20 3a  f2 63 6c 6f 73 65 61 77  |.  . 3 :.closeaw|
000002c0  69 6e 64 6f 77 28 21 71  25 29 0d 00 e6 37 20 20  |indow(!q%)...7  |
000002d0  c9 20 36 20 3a f2 63 68  65 63 6b 6d 6f 75 73 65  |. 6 :.checkmouse|
000002e0  28 21 71 25 2c 71 25 21  34 2c 71 25 21 38 2c 71  |(!q%,q%!4,q%!8,q|
000002f0  25 21 31 32 2c 71 25 21  31 36 2c 71 25 21 32 30  |%!12,q%!16,q%!20|
00000300  29 0d 00 f0 1a 20 20 c9  20 39 20 3a f2 6d 65 6e  |)....  . 9 :.men|
00000310  75 73 65 6c 65 63 74 28  71 25 29 0d 00 fa 1a 20  |uselect(q%).... |
00000320  20 c9 20 31 37 2c 31 38  3a f2 72 65 63 65 69 76  | . 17,18:.receiv|
00000330  65 28 71 25 29 0d 01 04  07 20 20 cb 0d 01 0e 07  |e(q%)....  .....|
00000340  fd 20 a3 0d 01 18 05 20  0d 01 22 12 dd 20 f2 72  |. ..... ..".. .r|
00000350  65 63 65 69 76 65 28 71  25 29 0d 01 2c 0e c8 8e  |eceive(q%)..,...|
00000360  20 71 25 21 31 36 20 ca  0d 01 36 11 c9 20 30 3a  | q%!16 ...6.. 0:|
00000370  f2 66 69 6e 69 73 68 3a  e0 0d 01 40 05 cb 0d 01  |.finish:...@....|
00000380  4a 05 e1 0d 01 54 05 20  0d 01 5e 0e dd 20 a4 63  |J....T. ..^.. .c|
00000390  77 69 6e 64 6f 77 0d 01  68 3f f3 20 41 24 2c 66  |window..h?. A$,f|
000003a0  25 2c 66 63 25 2c 62 63  25 2c 78 30 25 2c 79 30  |%,fc%,bc%,x0%,y0|
000003b0  25 2c 78 31 25 2c 79 31  25 2c 63 78 30 25 2c 63  |%,x1%,y1%,cx0%,c|
000003c0  79 30 25 2c 63 78 31 25  2c 63 79 31 25 2c 6e 69  |y0%,cx1%,cy1%,ni|
000003d0  63 6f 6e 73 25 0d 01 72  56 3d a4 63 72 65 61 74  |cons%..rV=.creat|
000003e0  65 5f 77 69 6e 64 6f 77  28 63 78 30 25 2c 63 79  |e_window(cx0%,cy|
000003f0  30 25 2c 63 78 31 25 2c  63 79 31 25 2c 30 2c 30  |0%,cx1%,cy1%,0,0|
00000400  2c 66 25 2c 66 63 25 2c  62 63 25 2c 78 30 25 2c  |,f%,fc%,bc%,x0%,|
00000410  79 30 25 2c 78 31 25 2c  79 31 25 2c 26 32 44 2c  |y0%,x1%,y1%,&2D,|
00000420  41 24 2c 6e 69 63 6f 6e  73 25 29 0d 01 7c 05 20  |A$,nicons%)..|. |
00000430  0d 01 86 37 dd 20 f2 63  68 65 63 6b 6d 6f 75 73  |...7. .checkmous|
00000440  65 28 6d 6f 75 73 65 78  25 2c 6d 6f 75 73 65 79  |e(mousex%,mousey|
00000450  25 2c 62 25 2c 68 61 6e  64 6c 65 25 2c 69 63 6f  |%,b%,handle%,ico|
00000460  6e 25 2c 6f 62 25 29 0d  01 90 0c e7 28 62 25 80  |n%,ob%).....(b%.|
00000470  35 29 8c 0d 01 9a 21 20  20 e7 68 61 6e 64 6c 65  |5)....!  .handle|
00000480  25 3c 3e 2d 31 8c f2 67  65 74 77 28 68 61 6e 64  |%<>-1..getw(hand|
00000490  6c 65 25 29 0d 01 a4 12  20 20 c8 8e 20 68 61 6e  |le%)....  .. han|
000004a0  64 6c 65 25 20 ca 0d 01  ae 17 20 20 c9 20 70 75  |dle% .....  . pu|
000004b0  7a 7a 6c 65 25 3a f2 73  74 72 69 6b 65 0d 01 b8  |zzle%:.strike...|
000004c0  07 20 20 cb 0d 01 c2 05  cd 0d 01 cc 0c e7 28 62  |.  ...........(b|
000004d0  25 80 32 29 8c 0d 01 d6  12 20 20 c8 8e 20 68 61  |%.2).....  .. ha|
000004e0  6e 64 6c 65 25 20 ca 0d  01 e0 0f 20 20 c9 20 70  |ndle% .....  . p|
000004f0  75 7a 7a 6c 65 25 0d 01  ea 2d 20 20 20 20 f2 64  |uzzle%...-    .d|
00000500  6f 6d 65 6e 75 28 70 75  7a 7a 6c 65 25 2c 22 4e  |omenu(puzzle%,"N|
00000510  65 77 20 42 6f 61 72 64  22 2c 22 50 75 7a 7a 6c  |ew Board","Puzzl|
00000520  65 22 29 0d 01 f4 07 20  20 cb 0d 01 fe 05 cd 0d  |e")....  .......|
00000530  02 08 05 e1 0d 02 12 05  20 0d 02 1c 27 dd 20 f2  |........ ...'. .|
00000540  64 6f 6d 65 6e 75 28 68  61 6e 64 6c 65 25 2c 6d  |domenu(handle%,m|
00000550  65 6e 75 24 2c 6d 65 6e  75 74 69 74 6c 65 24 29  |enu$,menutitle$)|
00000560  0d 02 26 17 6d 65 6e 75  68 61 6e 64 6c 65 25 3d  |..&.menuhandle%=|
00000570  68 61 6e 64 6c 65 25 0d  02 30 14 6d 65 6e 75 70  |handle%..0.menup|
00000580  74 72 25 3d 62 75 66 66  65 72 25 0d 02 3a 08 69  |tr%=buffer%..:.i|
00000590  25 3d 30 0d 02 44 12 6d  65 6e 75 70 74 72 25 21  |%=0..D.menuptr%!|
000005a0  32 30 3d 34 30 0d 02 4e  18 24 6d 65 6e 75 70 74  |20=40..N.$menupt|
000005b0  72 25 3d 6d 65 6e 75 74  69 74 6c 65 24 0d 02 58  |r%=menutitle$..X|
000005c0  4a 6d 65 6e 75 70 74 72  25 3f 31 32 3d 60 74 66  |Jmenuptr%?12=`tf|
000005d0  63 6f 6c 3a 6d 65 6e 75  70 74 72 25 3f 31 33 3d  |col:menuptr%?13=|
000005e0  32 3a 6d 65 6e 75 70 74  72 25 3f 31 34 3d 60 77  |2:menuptr%?14=`w|
000005f0  66 63 6f 6c 3a 6d 65 6e  75 70 74 72 25 3f 31 35  |fcol:menuptr%?15|
00000600  3d 60 77 62 63 6f 6c 0d  02 62 24 6d 65 6e 75 70  |=`wbcol..b$menup|
00000610  74 72 25 21 31 36 3d 31  38 30 2d 32 34 3a 6d 65  |tr%!16=180-24:me|
00000620  6e 75 70 74 72 25 21 32  34 3d 30 0d 02 6c 10 6d  |nuptr%!24=0..l.m|
00000630  65 6e 75 70 74 72 25 2b  3d 32 38 0d 02 76 31 f5  |enuptr%+=28..v1.|
00000640  20 69 74 65 6d 24 3d a4  70 61 72 28 22 2c 22 29  | item$=.par(",")|
00000650  3a f2 6d 65 6e 75 69 74  65 6d 28 69 74 65 6d 24  |:.menuitem(item$|
00000660  29 3a fd 20 69 74 65 6d  24 3d 22 22 0d 02 80 23  |):. item$=""...#|
00000670  6d 65 6e 75 70 74 72 25  21 2d 32 34 3d 28 6d 65  |menuptr%!-24=(me|
00000680  6e 75 70 74 72 25 21 2d  32 34 29 84 26 38 30 0d  |nuptr%!-24).&80.|
00000690  02 8a 5f e7 68 61 6e 64  6c 65 25 3d 31 30 31 20  |.._.handle%=101 |
000006a0  c8 99 20 43 72 4d 65 6e  75 2c 2c 62 75 66 66 65  |.. CrMenu,,buffe|
000006b0  72 25 2c 6d 6f 75 73 65  78 25 2d 33 32 2c 39 36  |r%,mousex%-32,96|
000006c0  2b 34 30 20 8b 20 c8 99  20 43 72 4d 65 6e 75 2c  |+40 . .. CrMenu,|
000006d0  2c 62 75 66 66 65 72 25  2c 6d 6f 75 73 65 78 25  |,buffer%,mousex%|
000006e0  2d 33 32 2c 6d 6f 75 73  65 79 25 2b 31 36 0d 02  |-32,mousey%+16..|
000006f0  94 05 e1 0d 02 9e 05 20  0d 02 a8 16 dd 20 f2 6d  |....... ..... .m|
00000700  65 6e 75 69 74 65 6d 28  74 65 78 74 24 29 0d 02  |enuitem(text$)..|
00000710  b2 10 e7 20 74 65 78 74  24 3d 22 22 20 e1 0d 02  |... text$="" ...|
00000720  bc 10 6d 65 6e 75 70 74  72 25 21 30 3d 30 0d 02  |..menuptr%!0=0..|
00000730  c6 11 6d 65 6e 75 70 74  72 25 21 34 3d 2d 31 0d  |..menuptr%!4=-1.|
00000740  02 d0 18 6d 65 6e 75 70  74 72 25 21 38 3d 26 30  |...menuptr%!8=&0|
00000750  37 30 30 30 30 32 31 0d  02 da 18 24 28 6d 65 6e  |7000021....$(men|
00000760  75 70 74 72 25 2b 31 32  29 3d 74 65 78 74 24 0d  |uptr%+12)=text$.|
00000770  02 e4 10 6d 65 6e 75 70  74 72 25 2b 3d 32 34 0d  |...menuptr%+=24.|
00000780  02 ee 05 e1 0d 02 f8 05  20 0d 03 02 10 dd 20 a4  |........ ..... .|
00000790  70 61 72 28 73 65 70 24  29 0d 03 0c 25 69 31 25  |par(sep$)...%i1%|
000007a0  3d 69 25 2b 31 3a 69 25  3d a7 6d 65 6e 75 24 2b  |=i%+1:i%=.menu$+|
000007b0  73 65 70 24 2c 73 65 70  24 2c 69 31 25 29 0d 03  |sep$,sep$,i1%)..|
000007c0  16 17 3d c1 6d 65 6e 75  24 2c 69 31 25 2c 69 25  |..=.menu$,i1%,i%|
000007d0  2d 69 31 25 29 0d 03 20  05 20 0d 03 2a 19 dd 20  |-i1%).. . ..*.. |
000007e0  f2 6d 65 6e 75 73 65 6c  65 63 74 28 6d 65 6e 75  |.menuselect(menu|
000007f0  73 25 29 0d 03 34 2d c8  99 20 44 63 4d 65 6e 75  |s%)..4-.. DcMenu|
00000800  2c 2c 62 75 66 66 65 72  25 2c 6d 65 6e 75 73 25  |,,buffer%,menus%|
00000810  2c c4 32 30 30 2c 22 20  22 29 b8 2c 2c 2c 61 24  |,.200," ").,,,a$|
00000820  0d 03 3e 0f e7 20 61 24  3d 22 22 20 8c 20 e1 0d  |..>.. a$="" . ..|
00000830  03 48 14 c8 8e 20 6d 65  6e 75 68 61 6e 64 6c 65  |.H... menuhandle|
00000840  25 20 ca 0d 03 52 0d c9  20 70 75 7a 7a 6c 65 25  |% ...R.. puzzle%|
00000850  0d 03 5c 17 20 20 e7 20  61 24 3d 22 4e 65 77 20  |..\.  . a$="New |
00000860  42 6f 61 72 64 22 8c 0d  03 66 29 20 20 20 20 f2  |Board"...f)    .|
00000870  4e 65 77 42 6f 61 72 64  3a f2 72 65 64 72 61 77  |NewBoard:.redraw|
00000880  5f 77 69 6e 64 6f 77 28  70 75 7a 7a 6c 65 25 29  |_window(puzzle%)|
00000890  0d 03 70 07 20 20 cd 0d  03 7a 05 cb 0d 03 84 05  |..p.  ...z......|
000008a0  e1 0d 03 8e 05 20 0d 03  98 0d dd 20 f2 73 74 72  |..... ..... .str|
000008b0  69 6b 65 0d 03 a2 2e 43  58 25 3d 6d 6f 75 73 65  |ike....CX%=mouse|
000008c0  78 25 2d 62 78 25 2d 31  34 3e 3e 36 3a 43 59 25  |x%-bx%-14>>6:CY%|
000008d0  3d 62 79 25 2d 38 2d 6d  6f 75 73 65 79 25 3e 3e  |=by%-8-mousey%>>|
000008e0  36 0d 03 ac 50 e7 43 58  25 3e 3d 30 20 80 20 43  |6...P.CX%>=0 . C|
000008f0  58 25 3c 34 20 80 20 43  59 25 3e 3d 30 20 80 20  |X%<4 . CY%>=0 . |
00000900  43 59 25 3c 34 20 80 28  43 58 25 3d 70 75 7a 7a  |CY%<4 .(CX%=puzz|
00000910  6c 65 5f 78 62 6c 61 6e  6b 25 20 84 43 59 25 3d  |le_xblank% .CY%=|
00000920  70 75 7a 7a 6c 65 5f 79  62 6c 61 6e 6b 25 29 20  |puzzle_yblank%) |
00000930  8c 0d 03 b6 19 e7 43 58  25 3d 70 75 7a 7a 6c 65  |......CX%=puzzle|
00000940  5f 78 62 6c 61 6e 6b 25  20 8c 0d 03 c0 0a c8 8e  |_xblank% .......|
00000950  20 b9 20 ca 0d 03 ca 18  c9 20 43 59 25 3e 70 75  | . ...... CY%>pu|
00000960  7a 7a 6c 65 5f 79 62 6c  61 6e 6b 25 0d 03 d4 3b  |zzle_yblank%...;|
00000970  f5 20 42 64 25 28 43 58  25 2c 70 75 7a 7a 6c 65  |. Bd%(CX%,puzzle|
00000980  5f 79 62 6c 61 6e 6b 25  29 3d 42 64 25 28 43 58  |_yblank%)=Bd%(CX|
00000990  25 2c 70 75 7a 7a 6c 65  5f 79 62 6c 61 6e 6b 25  |%,puzzle_yblank%|
000009a0  2b 31 29 2b 26 38 30 0d  03 de 29 70 75 7a 7a 6c  |+1)+&80...)puzzl|
000009b0  65 5f 79 62 6c 61 6e 6b  25 2b 3d 31 3a fd 70 75  |e_yblank%+=1:.pu|
000009c0  7a 7a 6c 65 5f 79 62 6c  61 6e 6b 25 3d 43 59 25  |zzle_yblank%=CY%|
000009d0  0d 03 e8 18 c9 20 43 59  25 3c 70 75 7a 7a 6c 65  |..... CY%<puzzle|
000009e0  5f 79 62 6c 61 6e 6b 25  0d 03 f2 3b f5 20 42 64  |_yblank%...;. Bd|
000009f0  25 28 43 58 25 2c 70 75  7a 7a 6c 65 5f 79 62 6c  |%(CX%,puzzle_ybl|
00000a00  61 6e 6b 25 29 3d 42 64  25 28 43 58 25 2c 70 75  |ank%)=Bd%(CX%,pu|
00000a10  7a 7a 6c 65 5f 79 62 6c  61 6e 6b 25 2d 31 29 2b  |zzle_yblank%-1)+|
00000a20  26 38 30 0d 03 fc 29 70  75 7a 7a 6c 65 5f 79 62  |&80...)puzzle_yb|
00000a30  6c 61 6e 6b 25 2d 3d 31  3a fd 70 75 7a 7a 6c 65  |lank%-=1:.puzzle|
00000a40  5f 79 62 6c 61 6e 6b 25  3d 43 59 25 0d 04 06 05  |_yblank%=CY%....|
00000a50  cb 0d 04 10 05 cc 0d 04  1a 0a c8 8e 20 b9 20 ca  |............ . .|
00000a60  0d 04 24 18 c9 20 43 58  25 3e 70 75 7a 7a 6c 65  |..$.. CX%>puzzle|
00000a70  5f 78 62 6c 61 6e 6b 25  0d 04 2e 3b f5 20 42 64  |_xblank%...;. Bd|
00000a80  25 28 70 75 7a 7a 6c 65  5f 78 62 6c 61 6e 6b 25  |%(puzzle_xblank%|
00000a90  2c 43 59 25 29 3d 42 64  25 28 70 75 7a 7a 6c 65  |,CY%)=Bd%(puzzle|
00000aa0  5f 78 62 6c 61 6e 6b 25  2b 31 2c 43 59 25 29 2b  |_xblank%+1,CY%)+|
00000ab0  26 38 30 0d 04 38 29 70  75 7a 7a 6c 65 5f 78 62  |&80..8)puzzle_xb|
00000ac0  6c 61 6e 6b 25 2b 3d 31  3a fd 70 75 7a 7a 6c 65  |lank%+=1:.puzzle|
00000ad0  5f 78 62 6c 61 6e 6b 25  3d 43 58 25 0d 04 42 18  |_xblank%=CX%..B.|
00000ae0  c9 20 43 58 25 3c 70 75  7a 7a 6c 65 5f 78 62 6c  |. CX%<puzzle_xbl|
00000af0  61 6e 6b 25 0d 04 4c 3b  f5 20 42 64 25 28 70 75  |ank%..L;. Bd%(pu|
00000b00  7a 7a 6c 65 5f 78 62 6c  61 6e 6b 25 2c 43 59 25  |zzle_xblank%,CY%|
00000b10  29 3d 42 64 25 28 70 75  7a 7a 6c 65 5f 78 62 6c  |)=Bd%(puzzle_xbl|
00000b20  61 6e 6b 25 2d 31 2c 43  59 25 29 2b 26 38 30 0d  |ank%-1,CY%)+&80.|
00000b30  04 56 29 70 75 7a 7a 6c  65 5f 78 62 6c 61 6e 6b  |.V)puzzle_xblank|
00000b40  25 2d 3d 31 3a fd 70 75  7a 7a 6c 65 5f 78 62 6c  |%-=1:.puzzle_xbl|
00000b50  61 6e 6b 25 3d 43 58 25  0d 04 60 05 cb 0d 04 6a  |ank%=CX%..`....j|
00000b60  05 cd 0d 04 74 3a 70 75  7a 7a 6c 65 5f 78 62 6c  |....t:puzzle_xbl|
00000b70  61 6e 6b 25 3d 43 58 25  3a 70 75 7a 7a 6c 65 5f  |ank%=CX%:puzzle_|
00000b80  79 62 6c 61 6e 6b 25 3d  43 59 25 3a 42 64 25 28  |yblank%=CY%:Bd%(|
00000b90  43 58 25 2c 43 59 25 29  3d 26 38 30 0d 04 7e 2d  |CX%,CY%)=&80..~-|
00000ba0  f2 75 70 64 61 74 65 28  70 75 7a 7a 6c 65 25 2c  |.update(puzzle%,|
00000bb0  30 2c 2d 70 75 7a 7a 6c  65 5f 68 25 2c 70 75 7a  |0,-puzzle_h%,puz|
00000bc0  7a 6c 65 5f 77 25 2c 30  29 0d 04 88 0c c8 95 20  |zle_w%,0)...... |
00000bd0  6d 6f 72 65 25 0d 04 92  36 e3 43 58 25 3d 30 b8  |more%...6.CX%=0.|
00000be0  33 3a e3 43 59 25 3d 30  b8 33 3a e7 42 64 25 28  |3:.CY%=0.3:.Bd%(|
00000bf0  43 58 25 2c 43 59 25 29  3e 31 32 37 20 f2 54 69  |CX%,CY%)>127 .Ti|
00000c00  6c 65 28 43 58 25 2c 43  59 25 29 0d 04 9c 07 ed  |le(CX%,CY%).....|
00000c10  3a ed 0d 04 a6 19 c8 99  20 47 65 74 52 25 2c 30  |:....... GetR%,0|
00000c20  2c 71 25 20 b8 20 6d 6f  72 65 25 0d 04 b0 05 ce  |,q% . more%.....|
00000c30  0d 04 ba 33 e3 43 58 25  3d 30 b8 33 3a e3 43 59  |...3.CX%=0.3:.CY|
00000c40  25 3d 30 b8 33 3a 42 64  25 28 43 58 25 2c 43 59  |%=0.3:Bd%(CX%,CY|
00000c50  25 29 3d 42 64 25 28 43  58 25 2c 43 59 25 29 80  |%)=Bd%(CX%,CY%).|
00000c60  26 37 46 0d 04 c4 07 ed  3a ed 0d 04 ce 08 cc 20  |&7F.....:...... |
00000c70  ef 37 0d 04 d8 05 cd 0d  04 e2 05 cd 0d 04 ec 05  |.7..............|
00000c80  e1 0d 04 f6 05 20 0d 05  00 0f dd 20 f2 4e 65 77  |..... ..... .New|
00000c90  42 6f 61 72 64 0d 05 0a  18 e3 5a 25 3d 30 b8 31  |Board.....Z%=0.1|
00000ca0  35 3a 54 25 28 5a 25 29  3d 5a 25 3a ed 0d 05 14  |5:T%(Z%)=Z%:....|
00000cb0  2c e3 58 25 3d 30 b8 33  3a e3 59 25 3d 30 b8 33  |,.X%=0.3:.Y%=0.3|
00000cc0  3a f5 20 51 25 3d b3 28  31 36 29 2d 31 3a fd 54  |:. Q%=.(16)-1:.T|
00000cd0  25 28 51 25 29 3c 3e 2d  31 0d 05 1e 31 e7 54 25  |%(Q%)<>-1...1.T%|
00000ce0  28 51 25 29 3d 30 20 70  75 7a 7a 6c 65 5f 78 62  |(Q%)=0 puzzle_xb|
00000cf0  6c 61 6e 6b 25 3d 58 25  3a 70 75 7a 7a 6c 65 5f  |lank%=X%:puzzle_|
00000d00  79 62 6c 61 6e 6b 25 3d  59 25 0d 05 28 23 42 64  |yblank%=Y%..(#Bd|
00000d10  25 28 58 25 2c 59 25 29  3d 54 25 28 51 25 29 3a  |%(X%,Y%)=T%(Q%):|
00000d20  54 25 28 51 25 29 3d 2d  31 3a ed 3a ed 0d 05 32  |T%(Q%)=-1:.:...2|
00000d30  05 e1 0d 05 3c 05 20 0d  05 46 1c dd 20 f2 63 6c  |....<. ..F.. .cl|
00000d40  6f 73 65 61 77 69 6e 64  6f 77 28 68 61 6e 64 6c  |oseawindow(handl|
00000d50  65 25 29 0d 05 50 1a f2  63 6c 6f 73 65 5f 77 69  |e%)..P..close_wi|
00000d60  6e 64 6f 77 28 68 61 6e  64 6c 65 25 29 0d 05 5a  |ndow(handle%)..Z|
00000d70  0d f2 66 69 6e 69 73 68  3a e0 0d 05 64 05 e1 0d  |..finish:...d...|
00000d80  05 6e 05 20 0d 05 78 0d  dd 20 f2 66 69 6e 69 73  |.n. ..x.. .finis|
00000d90  68 0d 05 82 17 c8 99 20  22 57 69 6d 70 5f 43 6c  |h...... "Wimp_Cl|
00000da0  6f 73 65 44 6f 77 6e 22  0d 05 8c 05 e1 0d 05 96  |oseDown"........|
00000db0  05 20 0d 05 a0 6d dd 20  a4 63 72 65 61 74 65 5f  |. ...m. .create_|
00000dc0  77 69 6e 64 6f 77 28 63  78 30 25 2c 63 79 30 25  |window(cx0%,cy0%|
00000dd0  2c 63 78 31 25 2c 63 79  31 25 2c 73 63 78 25 2c  |,cx1%,cy1%,scx%,|
00000de0  73 63 79 25 2c 66 6c 61  67 73 25 2c 66 63 25 2c  |scy%,flags%,fc%,|
00000df0  62 63 25 2c 73 78 30 25  2c 73 79 30 25 2c 73 78  |bc%,sx0%,sy0%,sx|
00000e00  31 25 2c 73 79 31 25 2c  74 69 74 6c 65 66 25 2c  |1%,sy1%,titlef%,|
00000e10  74 69 74 6c 65 24 2c 6e  69 63 6f 6e 73 25 29 0d  |title$,nicons%).|
00000e20  05 aa 41 21 71 25 3d 63  78 30 25 3a 71 25 21 34  |..A!q%=cx0%:q%!4|
00000e30  3d 63 79 30 25 3a 71 25  21 38 3d 63 78 31 25 3a  |=cy0%:q%!8=cx1%:|
00000e40  71 25 21 31 32 3d 63 79  31 25 3a 71 25 21 31 36  |q%!12=cy1%:q%!16|
00000e50  3d 73 63 78 25 3a 71 25  21 32 30 3d 73 63 79 25  |=scx%:q%!20=scy%|
00000e60  0d 05 b4 19 71 25 21 32  34 3d 2d 31 3a 71 25 21  |....q%!24=-1:q%!|
00000e70  32 38 3d 66 6c 61 67 73  25 0d 05 be 13 e7 66 63  |28=flags%.....fc|
00000e80  25 3d 31 35 80 62 63 25  3d 31 35 8c 0d 05 c8 2b  |%=15.bc%=15....+|
00000e90  20 20 71 25 3f 33 32 3d  31 35 3a 71 25 3f 33 33  |  q%?32=15:q%?33|
00000ea0  3d 31 35 3a 71 25 3f 33  34 3d 66 63 25 3a 71 25  |=15:q%?34=fc%:q%|
00000eb0  3f 33 35 3d 62 63 25 0d  05 d2 33 cc 20 71 25 3f  |?35=bc%...3. q%?|
00000ec0  33 32 3d 60 74 66 63 6f  6c 3a 71 25 3f 33 33 3d  |32=`tfcol:q%?33=|
00000ed0  60 74 62 63 6f 6c 3a 71  25 3f 33 34 3d 66 63 25  |`tbcol:q%?34=fc%|
00000ee0  3a 71 25 3f 33 35 3d 62  63 25 0d 05 dc 05 cd 0d  |:q%?35=bc%......|
00000ef0  05 e6 31 71 25 3f 33 36  3d 60 73 63 6f 3a 71 25  |..1q%?36=`sco:q%|
00000f00  3f 33 37 3d 60 74 62 63  6f 6c 3a 71 25 3f 33 38  |?37=`tbcol:q%?38|
00000f10  3d 60 74 62 63 6f 6c 32  3a 71 25 3f 33 39 3d 30  |=`tbcol2:q%?39=0|
00000f20  0d 05 f0 2f 71 25 21 34  30 3d 73 78 30 25 3a 71  |.../q%!40=sx0%:q|
00000f30  25 21 34 34 3d 73 79 30  25 3a 71 25 21 34 38 3d  |%!44=sy0%:q%!48=|
00000f40  73 78 31 25 3a 71 25 21  35 32 3d 73 79 31 25 0d  |sx1%:q%!52=sy1%.|
00000f50  05 fa 11 71 25 21 35 36  3d 74 69 74 6c 65 66 25  |...q%!56=titlef%|
00000f60  0d 06 04 28 71 25 21 36  30 3d 26 33 30 30 30 20  |...(q%!60=&3000 |
00000f70  20 20 20 20 20 3a 20 f4  20 77 6f 72 6b 20 61 72  |     : . work ar|
00000f80  65 61 20 66 6c 61 67 73  0d 06 0e 21 71 25 21 36  |ea flags...!q%!6|
00000f90  34 3d 30 3a 71 25 21 36  38 3d 30 20 20 3a 20 f4  |4=0:q%!68=0  : .|
00000fa0  20 72 65 73 65 72 76 65  64 0d 06 18 18 24 28 71  | reserved....$(q|
00000fb0  25 2b 37 32 29 3d c0 74  69 74 6c 65 24 2c 31 31  |%+72)=.title$,11|
00000fc0  29 0d 06 22 11 71 25 21  38 34 3d 6e 69 63 6f 6e  |)..".q%!84=nicon|
00000fd0  73 25 0d 06 2c 29 ea 49  25 2c 78 30 25 2c 79 30  |s%..,).I%,x0%,y0|
00000fe0  25 2c 78 31 25 2c 79 31  25 2c 66 25 2c 64 61 74  |%,x1%,y1%,f%,dat|
00000ff0  61 24 3a 49 25 3d 71 25  2b 38 38 0d 06 36 10 c8  |a$:I%=q%+88..6..|
00001000  95 20 6e 69 63 6f 6e 73  25 3e 30 0d 06 40 28 20  |. nicons%>0..@( |
00001010  20 f3 20 78 30 25 2c 79  30 25 2c 78 31 25 2c 79  | . x0%,y0%,x1%,y|
00001020  31 25 2c 66 25 2c 66 63  25 2c 62 63 25 2c 64 61  |1%,f%,fc%,bc%,da|
00001030  74 61 24 0d 06 4a 2a 20  20 49 25 21 30 3d 78 30  |ta$..J*  I%!0=x0|
00001040  25 3a 49 25 21 34 3d 79  30 25 3a 49 25 21 38 3d  |%:I%!4=y0%:I%!8=|
00001050  78 31 25 3a 49 25 21 31  32 3d 79 31 25 0d 06 54  |x1%:I%!12=y1%..T|
00001060  25 20 20 e7 20 28 66 25  80 26 34 30 29 3d 30 20  |%  . (f%.&40)=0 |
00001070  8c 20 62 63 25 3d 66 63  25 2b 28 62 63 25 3c 3c  |. bc%=fc%+(bc%<<|
00001080  34 29 0d 06 5e 18 20 20  49 25 21 31 36 3d 66 25  |4)..^.  I%!16=f%|
00001090  2b 28 62 63 25 3c 3c 32  34 29 0d 06 68 11 20 20  |+(bc%<<24)..h.  |
000010a0  e7 28 66 25 80 26 31 30  30 29 8c 0d 06 72 23 20  |.(f%.&100)...r# |
000010b0  20 20 20 85 20 32 30 30  30 2c 22 4e 6f 74 20 63  |   . 2000,"Not c|
000010c0  6f 6d 62 61 74 20 63 61  70 61 62 6c 65 22 0d 06  |ombat capable"..|
000010d0  7c 07 20 20 cc 0d 06 86  16 20 20 20 20 24 28 49  ||.  .....    $(I|
000010e0  25 2b 32 30 29 3d 64 61  74 61 24 0d 06 90 07 20  |%+20)=data$.... |
000010f0  20 cd 0d 06 9a 20 20 20  49 25 3d 49 25 2b 33 32  | ....   I%=I%+32|
00001100  3a 6e 69 63 6f 6e 73 25  3d 6e 69 63 6f 6e 73 25  |:nicons%=nicons%|
00001110  2d 31 0d 06 a4 05 ce 0d  06 ae 1c c8 99 20 43 72  |-1........... Cr|
00001120  65 61 74 65 57 2c 2c 71  25 20 b8 20 68 61 6e 64  |eateW,,q% . hand|
00001130  6c 65 25 0d 06 b8 0c 3d  68 61 6e 64 6c 65 25 0d  |le%....=handle%.|
00001140  06 c2 05 20 0d 06 cc 15  dd 20 f2 66 72 6f 6e 74  |... ..... .front|
00001150  28 68 61 6e 64 6c 65 25  29 0d 06 d6 11 e7 68 61  |(handle%).....ha|
00001160  6e 64 6c 65 25 3d 2d 31  8c e1 0d 06 e0 12 f2 67  |ndle%=-1.......g|
00001170  65 74 77 28 68 61 6e 64  6c 65 25 29 0d 06 ea 36  |etw(handle%)...6|
00001180  f2 6f 70 65 6e 5f 77 69  6e 64 6f 77 28 68 61 6e  |.open_window(han|
00001190  64 6c 65 25 2c 78 30 25  2c 79 30 25 2c 78 31 25  |dle%,x0%,y0%,x1%|
000011a0  2c 79 31 25 2c 73 63 78  25 2c 73 63 79 25 2c 2d  |,y1%,scx%,scy%,-|
000011b0  31 29 0d 06 f4 05 e1 0d  06 fe 05 20 0d 07 08 15  |1)......... ....|
000011c0  dd 20 f2 70 6f 70 75 70  28 68 61 6e 64 6c 65 25  |. .popup(handle%|
000011d0  29 0d 07 12 12 f2 67 65  74 77 28 68 61 6e 64 6c  |).....getw(handl|
000011e0  65 25 29 0d 07 1c 30 78  6f 25 3d 6d 6f 75 73 65  |e%)...0xo%=mouse|
000011f0  78 25 2d 28 78 30 25 2b  78 31 25 29 2f 32 3a 79  |x%-(x0%+x1%)/2:y|
00001200  6f 25 3d 6d 6f 75 73 65  79 25 2d 28 79 31 25 2b  |o%=mousey%-(y1%+|
00001210  36 34 29 0d 07 26 46 f2  6f 70 65 6e 5f 77 69 6e  |64)..&F.open_win|
00001220  64 6f 77 28 68 61 6e 64  6c 65 25 2c 78 30 25 2b  |dow(handle%,x0%+|
00001230  78 6f 25 2c 79 30 25 2b  79 6f 25 2c 78 31 25 2b  |xo%,y0%+yo%,x1%+|
00001240  78 6f 25 2c 79 31 25 2b  79 6f 25 2c 73 63 78 25  |xo%,y1%+yo%,scx%|
00001250  2c 73 63 79 25 2c 2d 31  29 0d 07 30 05 e1 0d 07  |,scy%,-1)..0....|
00001260  3a 05 20 0d 07 44 3e dd  20 f2 6f 70 65 6e 5f 77  |:. ..D>. .open_w|
00001270  69 6e 64 6f 77 28 68 61  6e 64 6c 65 25 2c 78 30  |indow(handle%,x0|
00001280  25 2c 79 30 25 2c 78 31  25 2c 79 31 25 2c 73 63  |%,y0%,x1%,y1%,sc|
00001290  78 25 2c 73 63 79 25 2c  62 68 61 6e 64 6c 65 25  |x%,scy%,bhandle%|
000012a0  29 0d 07 4e 11 e7 68 61  6e 64 6c 65 25 3d 2d 31  |)..N..handle%=-1|
000012b0  8c e1 0d 07 58 1f 71 25  21 30 3d 68 61 6e 64 6c  |....X.q%!0=handl|
000012c0  65 25 3a 71 25 21 32 38  3d 62 68 61 6e 64 6c 65  |e%:q%!28=bhandle|
000012d0  25 0d 07 62 29 71 25 21  34 3d 78 30 25 3a 71 25  |%..b)q%!4=x0%:q%|
000012e0  21 38 3d 79 30 25 3a 71  25 21 31 32 3d 78 31 25  |!8=y0%:q%!12=x1%|
000012f0  3a 71 25 21 31 36 3d 79  31 25 0d 07 6c 19 71 25  |:q%!16=y1%..l.q%|
00001300  21 32 30 3d 73 63 78 25  3a 71 25 21 32 34 3d 73  |!20=scx%:q%!24=s|
00001310  63 79 25 0d 07 76 10 c8  99 20 4f 70 65 6e 57 2c  |cy%..v... OpenW,|
00001320  2c 71 25 0d 07 80 05 e1  0d 07 8a 05 20 0d 07 94  |,q%......... ...|
00001330  14 dd 20 f2 67 65 74 77  28 68 61 6e 64 6c 65 25  |.. .getw(handle%|
00001340  29 0d 07 9e 1b 21 71 25  3d 68 61 6e 64 6c 65 25  |)....!q%=handle%|
00001350  3a c8 99 20 47 65 74 57  2c 2c 71 25 0d 07 a8 2b  |:.. GetW,,q%...+|
00001360  f2 69 6e 66 6f 28 71 25  2b 34 29 3a 62 68 61 6e  |.info(q%+4):bhan|
00001370  64 6c 65 25 3d 71 25 21  32 38 3a 66 6c 61 67 73  |dle%=q%!28:flags|
00001380  25 3d 71 25 21 33 32 0d  07 b2 05 e1 0d 07 bc 05  |%=q%!32.........|
00001390  20 0d 07 c6 0f dd 20 f2  69 6e 66 6f 28 71 25 29  | ..... .info(q%)|
000013a0  0d 07 d0 3d 78 30 25 3d  21 71 25 3a 79 30 25 3d  |...=x0%=!q%:y0%=|
000013b0  71 25 21 34 3a 78 31 25  3d 71 25 21 38 3a 79 31  |q%!4:x1%=q%!8:y1|
000013c0  25 3d 71 25 21 31 32 3a  73 63 78 25 3d 71 25 21  |%=q%!12:scx%=q%!|
000013d0  31 36 3a 73 63 79 25 3d  71 25 21 32 30 0d 07 da  |16:scy%=q%!20...|
000013e0  1d 62 78 25 3d 78 30 25  2d 73 63 78 25 3a 62 79  |.bx%=x0%-scx%:by|
000013f0  25 3d 79 31 25 2d 73 63  79 25 0d 07 e4 05 e1 0d  |%=y1%-scy%......|
00001400  07 ee 05 20 0d 07 f8 2a  dd 20 f2 75 70 64 61 74  |... ...*. .updat|
00001410  65 28 68 61 6e 64 6c 65  25 2c 75 78 30 25 2c 75  |e(handle%,ux0%,u|
00001420  79 30 25 2c 75 78 31 25  2c 75 79 31 25 29 0d 08  |y0%,ux1%,uy1%)..|
00001430  02 39 21 71 25 3d 68 61  6e 64 6c 65 25 3a 71 25  |.9!q%=handle%:q%|
00001440  21 34 3d 75 78 30 25 3a  71 25 21 38 3d 75 79 30  |!4=ux0%:q%!8=uy0|
00001450  25 3a 71 25 21 31 32 3d  75 78 31 25 3a 71 25 21  |%:q%!12=ux1%:q%!|
00001460  31 36 3d 75 79 31 25 0d  08 0c 26 c8 99 20 55 70  |16=uy1%...&.. Up|
00001470  64 61 74 65 57 2c 2c 71  25 20 b8 20 6d 6f 72 65  |dateW,,q% . more|
00001480  25 3a f2 69 6e 66 6f 28  71 25 2b 34 29 0d 08 16  |%:.info(q%+4)...|
00001490  05 e1 0d 08 20 05 20 0d  08 2a 1d dd 20 f2 72 65  |.... . ..*.. .re|
000014a0  64 72 61 77 5f 77 69 6e  64 6f 77 28 68 61 6e 64  |draw_window(hand|
000014b0  6c 65 25 29 0d 08 34 16  e7 68 61 6e 64 6c 65 25  |le%)..4..handle%|
000014c0  3d 70 75 7a 7a 6c 65 25  20 8c 0d 08 3e 26 21 71  |=puzzle% ...>&!q|
000014d0  25 3d 68 61 6e 64 6c 65  25 3a c8 99 20 52 65 64  |%=handle%:.. Red|
000014e0  72 61 77 57 2c 2c 71 25  20 b8 20 6d 6f 72 65 25  |rawW,,q% . more%|
000014f0  0d 08 48 0f f2 69 6e 66  6f 28 71 25 2b 34 29 0d  |..H..info(q%+4).|
00001500  08 52 0c c8 95 20 6d 6f  72 65 25 0d 08 5c 32 20  |.R... more%..\2 |
00001510  20 c8 99 20 43 6f 6c 25  2c 33 3a c8 93 20 c8 90  | .. Col%,3:.. ..|
00001520  20 62 78 25 2c 62 79 25  2c 70 75 7a 7a 6c 65 5f  | bx%,by%,puzzle_|
00001530  77 25 2c 2d 70 75 7a 7a  6c 65 5f 68 25 0d 08 66  |w%,-puzzle_h%..f|
00001540  38 20 20 c8 99 20 43 6f  6c 25 2c 37 3a c8 93 20  |8  .. Col%,7:.. |
00001550  62 78 25 2b 38 2c 62 79  25 2d 38 2c 70 75 7a 7a  |bx%+8,by%-8,puzz|
00001560  6c 65 5f 77 25 2d 31 36  2c 31 36 2d 70 75 7a 7a  |le_w%-16,16-puzz|
00001570  6c 65 5f 68 25 0d 08 70  2d 20 20 6f 78 30 25 3d  |le_h%..p-  ox0%=|
00001580  28 71 25 21 32 38 2d 28  62 78 25 2b 31 34 29 29  |(q%!28-(bx%+14))|
00001590  81 36 34 3a e7 6f 78 30  25 3e 33 20 6f 78 30 25  |.64:.ox0%>3 ox0%|
000015a0  3d 33 0d 08 7a 2d 20 20  6f 78 31 25 3d 28 71 25  |=3..z-  ox1%=(q%|
000015b0  21 33 36 2d 28 62 78 25  2b 31 34 29 29 81 36 34  |!36-(bx%+14)).64|
000015c0  3a e7 6f 78 31 25 3e 33  20 6f 78 31 25 3d 33 0d  |:.ox1%>3 ox1%=3.|
000015d0  08 84 2e 20 20 6f 79 30  25 3d 2d 28 71 25 21 34  |...  oy0%=-(q%!4|
000015e0  30 2d 28 62 79 25 2d 31  34 29 29 81 36 34 3a e7  |0-(by%-14)).64:.|
000015f0  6f 79 30 25 3e 33 20 6f  79 30 25 3d 33 0d 08 8e  |oy0%>3 oy0%=3...|
00001600  2e 20 20 6f 79 31 25 3d  2d 28 71 25 21 33 32 2d  |.  oy1%=-(q%!32-|
00001610  28 62 79 25 2d 31 34 29  29 81 36 34 3a e7 6f 79  |(by%-14)).64:.oy|
00001620  31 25 3e 33 20 6f 79 31  25 3d 33 0d 08 98 2e 20  |1%>3 oy1%=3.... |
00001630  20 e3 58 25 3d 6f 78 30  25 b8 6f 78 31 25 3a e3  | .X%=ox0%.ox1%:.|
00001640  59 25 3d 6f 79 30 25 b8  6f 79 31 25 3a f2 54 69  |Y%=oy0%.oy1%:.Ti|
00001650  6c 65 28 58 25 2c 59 25  29 0d 08 a2 09 20 20 ed  |le(X%,Y%)....  .|
00001660  3a ed 0d 08 ac 1b 20 20  c8 99 20 47 65 74 52 25  |:.....  .. GetR%|
00001670  2c 30 2c 71 25 20 b8 20  6d 6f 72 65 25 0d 08 b6  |,0,q% . more%...|
00001680  05 ce 0d 08 c0 05 cd 0d  08 ca 05 e1 0d 08 d4 05  |................|
00001690  20 0d 08 de 1c dd 20 f2  63 6c 6f 73 65 5f 77 69  | ..... .close_wi|
000016a0  6e 64 6f 77 28 68 61 6e  64 6c 65 25 29 0d 08 e8  |ndow(handle%)...|
000016b0  1d 21 71 25 3d 68 61 6e  64 6c 65 25 3a c8 99 20  |.!q%=handle%:.. |
000016c0  43 6c 6f 73 65 57 2c 2c  71 25 0d 08 f2 05 e1 0d  |CloseW,,q%......|
000016d0  08 fc 05 20 0d 09 06 0b  dd 20 f2 76 61 72 73 0d  |... ..... .vars.|
000016e0  09 10 1e 57 69 6d 70 20  20 20 20 3d 20 28 31 3c  |...Wimp    = (1<|
000016f0  3c 31 38 29 20 2b 20 28  33 3c 3c 36 29 0d 09 1a  |<18) + (3<<6)...|
00001700  14 43 72 65 61 74 65 57  20 3d 20 57 69 6d 70 2b  |.CreateW = Wimp+|
00001710  31 0d 09 24 14 4f 70 65  6e 57 20 20 20 3d 20 57  |1..$.OpenW   = W|
00001720  69 6d 70 2b 35 0d 09 2e  14 43 6c 6f 73 65 57 20  |imp+5....CloseW |
00001730  20 3d 20 57 69 6d 70 2b  36 0d 09 38 14 50 6f 6c  | = Wimp+6..8.Pol|
00001740  6c 25 20 20 20 3d 20 57  69 6d 70 2b 37 0d 09 42  |l%   = Wimp+7..B|
00001750  14 52 65 64 72 61 77 57  20 3d 20 57 69 6d 70 2b  |.RedrawW = Wimp+|
00001760  38 0d 09 4c 14 55 70 64  61 74 65 57 20 3d 20 57  |8..L.UpdateW = W|
00001770  69 6d 70 2b 39 0d 09 56  15 47 65 74 52 25 20 20  |imp+9..V.GetR%  |
00001780  20 3d 20 57 69 6d 70 2b  31 30 0d 09 60 15 47 65  | = Wimp+10..`.Ge|
00001790  74 57 20 20 20 20 3d 20  57 69 6d 70 2b 31 31 0d  |tW    = Wimp+11.|
000017a0  09 6a 15 47 65 74 50 20  20 20 20 3d 20 57 69 6d  |.j.GetP    = Wim|
000017b0  70 2b 31 35 0d 09 74 15  44 72 61 67 20 20 20 20  |p+15..t.Drag    |
000017c0  3d 20 57 69 6d 70 2b 31  36 0d 09 7e 15 43 72 4d  |= Wimp+16..~.CrM|
000017d0  65 6e 75 20 20 3d 20 57  69 6d 70 2b 32 30 0d 09  |enu  = Wimp+20..|
000017e0  88 15 44 63 4d 65 6e 75  20 20 3d 20 57 69 6d 70  |..DcMenu  = Wimp|
000017f0  2b 32 31 0d 09 92 38 c8  99 20 22 4f 53 5f 53 57  |+21...8.. "OS_SW|
00001800  49 4e 75 6d 62 65 72 46  72 6f 6d 53 74 72 69 6e  |INumberFromStrin|
00001810  67 22 2c 2c 22 57 69 6d  70 5f 53 65 74 43 6f 6c  |g",,"Wimp_SetCol|
00001820  6f 75 72 22 20 b8 20 43  6f 6c 25 0d 09 9c 05 e1  |our" . Col%.....|
00001830  0d 09 a6 05 20 0d 09 b0  11 dd 20 f2 67 65 74 70  |.... ..... .getp|
00001840  6f 69 6e 74 65 72 0d 09  ba 0f c8 99 20 47 65 74  |ointer...... Get|
00001850  50 2c 2c 71 25 0d 09 c4  48 6d 6f 75 73 65 78 25  |P,,q%...Hmousex%|
00001860  3d 21 71 25 3a 6d 6f 75  73 65 79 25 3d 71 25 21  |=!q%:mousey%=q%!|
00001870  34 3a 62 25 3d 71 25 21  38 3a 68 61 6e 64 6c 65  |4:b%=q%!8:handle|
00001880  25 3d 71 25 21 31 32 3a  69 63 6f 6e 25 3d 71 25  |%=q%!12:icon%=q%|
00001890  21 31 36 3a 6f 62 25 3d  71 25 21 32 30 0d 09 ce  |!16:ob%=q%!20...|
000018a0  05 e1 0d 09 d8 05 20 0d  09 e2 0f dd 20 f2 65 72  |...... ..... .er|
000018b0  72 6f 72 62 6f 78 0d 09  ec 0f c8 99 20 44 72 61  |rorbox...... Dra|
000018c0  67 2c 2c 2d 31 0d 09 f6  30 21 62 75 66 66 65 72  |g,,-1...0!buffer|
000018d0  25 3d 9f 3a 24 28 62 75  66 66 65 72 25 2b 34 29  |%=.:$(buffer%+4)|
000018e0  3d f6 24 2b 22 20 61 74  20 6c 69 6e 65 20 22 2b  |=.$+" at line "+|
000018f0  c3 9e 2b bd 30 0d 0a 00  2c c8 99 20 22 57 69 6d  |..+.0...,.. "Wim|
00001900  70 5f 52 65 70 6f 72 74  45 72 72 6f 72 22 2c 62  |p_ReportError",b|
00001910  75 66 66 65 72 25 2c 31  2c 22 50 75 7a 7a 6c 65  |uffer%,1,"Puzzle|
00001920  22 0d 0a 0a 0f ef 34 3a  ff 22 46 58 34 22 3a e0  |".....4:."FX4":.|
00001930  0d 0a 14 05 e1 0d 0a 1e  05 20 0d 0a 28 12 dd 20  |......... ..(.. |
00001940  f2 54 69 6c 65 28 58 25  2c 59 25 29 0d 0a 32 39  |.Tile(X%,Y%)..29|
00001950  ea 41 25 3a 41 25 3d 42  64 25 28 58 25 2c 59 25  |.A%:A%=Bd%(X%,Y%|
00001960  29 80 26 37 46 3a 58 25  3d 62 78 25 2b 58 25 2a  |).&7F:X%=bx%+X%*|
00001970  36 34 2b 31 34 3a 59 25  3d 62 79 25 2d 59 25 2a  |64+14:Y%=by%-Y%*|
00001980  36 34 2d 37 32 0d 0a 3c  09 e7 41 25 20 8c 0d 0a  |64-72..<..A% ...|
00001990  46 23 c8 99 20 43 6f 6c  25 2c 30 3a c8 93 20 c8  |F#.. Col%,0:.. .|
000019a0  90 20 58 25 2b 32 2c 59  25 2b 34 2c 35 32 2c 34  |. X%+2,Y%+4,52,4|
000019b0  38 0d 0a 50 35 c8 99 20  43 6f 6c 25 2c 37 3a c8  |8..P5.. Col%,7:.|
000019c0  93 20 58 25 2c 59 25 2c  35 36 3a ec 58 25 2b 28  |. X%,Y%,56:.X%+(|
000019d0  41 25 3e 39 29 2a 38 2b  32 30 2c 59 25 2b 34 30  |A%>9)*8+20,Y%+40|
000019e0  3a f1 3b 41 25 3b 0d 0a  5a 1c cc 20 c8 99 20 43  |:.;A%;..Z.. .. C|
000019f0  6f 6c 25 2c 34 3a c8 93  c8 90 58 25 2c 59 25 2c  |ol%,4:....X%,Y%,|
00001a00  35 36 0d 0a 64 05 cd 0d  0a 6e 05 e1 0d ff        |56..d....n....|
00001a0e