Home » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199801_2.adf » Regulars2 » StarInfo/Fletcher/!Setup/Files/Disc1/Program/NetGame/!NetGame/Skeleton/Standard/!RunImage

StarInfo/Fletcher/!Setup/Files/Disc1/Program/NetGame/!NetGame/Skeleton/Standard/!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 » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199801_2.adf » Regulars2
Filename: StarInfo/Fletcher/!Setup/Files/Disc1/Program/NetGame/!NetGame/Skeleton/Standard/!RunImage
Read OK:
File size: 1EC3 bytes
Load address: 0000
Exec address: 0000
File contents
   10REM >!RunImage
   20testing%=FALSE
   30LIBRARY "<BasicLibrary$File>":PROCinitlibrary
   40LIBRARY "<HeapLibrary$File>":PROCinitheap
   50LIBRARY "<NetGameLibrary$File>"
   60ON ERROR PROCclosemessages:PROCeerror:IF testing%=TRUE THENOSCLI("Spool"):END ELSE END
   70IF testing%=TRUE THEN*Spool Spooled
   80IF testing%=TRUE THENTRACE ON
   90REM Appname$ is used for task manager & Appname$Dir
  100REM shortname$ is used for iconbar name and should usually be null
  110REM longname$ is used for info window
  120REM AppURL$ is used to for clicks on the version icon
  130Appname$="?????":version$="1.00 (?? ??? ????)"
  140shortname$="":longname$="?????"
  150Appdir$=FNsystemvar(Appname$+"$Dir")
  160AppURL$="http://users.essex.ac.uk/users/gerph/acorn/"
  170PROCinitwimp:PROCinitprog
  180quit%=FALSE:init%=FALSE
  190ON ERROR PROCerror
  200IF NOT init% THEN
  210 go$=FNGetEnv:init%=TRUE
  220 IF go$<>"" THENPROCloadfile(go$,FNfiletype(go$))
  230ENDIF
  240WHILE quit%=FALSE
  250 PROCPoll
  260ENDWHILE
  270SYS "Wimp_CloseDown"
  280PROCclosemessages
  290PROCnetgame_final
  300IF testing%=TRUE THEN*SPOOL
  310END
  320REM quit%=-1 for user quit, -2 for taskmanager quit
  330:
  340DEFPROCPoll
  350SYS "OS_ReadMonotonicTime" TO t%
  360SYS "Wimp_PollIdle",0,b%,t%+15 TO reason%
  370CASE reason% OF
  380 WHEN 0:REM Null poll
  390  PROCnetgame_poll:REM Check if there is something to do
  400 REM 1 = Redraw window
  410 WHEN 2:SYS "Wimp_OpenWindow",,b%
  420 WHEN 3:SYS "Wimp_CloseWindow",,b%
  430 WHEN 6:PROCmouseclick(b%!8,b%!12,b%!16)
  440 REM 7 = Drag box dropped on another task
  450 WHEN 8:PROCprocesskey(b%!0,b%!4,b%!24)
  460 WHEN 9:PROCmenuchoice
  470 WHEN 17,18:PROCreceive(b%!16)
  480 WHEN 19:PROCreceiveack(b%!16)
  490ENDCASE
  500ENDPROC
  510:
  520REM Buttons : 1 = Adjust, 2 = Menu, 4 = Select
  530DEFPROCmouseclick(but,win,icon)
  540CASE win OF
  550 WHEN -2
  560  CASE but OF
  570   WHEN 2:PROCibmenu
  580   WHEN 1,4:REM Select or adjust
  590    IF FNnetgame_connected THEN
  600     REM Open a window or something
  610    ELSE
  620     PROCopenconnect:REM Open the connect window
  630    ENDIF
  640  ENDCASE
  650 WHEN infobox%
  660  CASE icon OF
  670   WHEN 1:PROCshowfree
  680   WHEN 3:PROCFetchPage("http://users.essex.ac.uk/users/gerph/")
  690   WHEN 4:PROCFetchPage(AppURL$)
  700  ENDCASE
  710 WHEN connectwin%
  720  CASE icon OF
  730   WHEN 5:PROCmenu(FNnetgame_sitesmenu,-1,-1):REM Sites list
  740   WHEN 4:PROCtryconnect
  750  ENDCASE
  760 WHEN sendwin%
  770  CASE icon OF
  780   WHEN 2:REM Cancel - clear text and close
  790    PROCseticontext(sendwin%,0,"")
  800    PROCclosewin(sendwin%)
  810   WHEN 1:REM Send
  820    PROCsendmessage
  830  ENDCASE
  840 WHEN msgwin%
  850  CASE icon OF
  860   WHEN 2:REM Reply
  870    PROCopenreply
  880   WHEN 1:REM Ok
  890    PROCclosewin(win)
  900  ENDCASE
  910ENDCASE
  920ENDPROC
  930:
  940DEFPROCprocesskey(win,icon,key)
  950LOCAL keydone:keydone=FALSE
  960CASE win OF
  970 WHEN connectwin%
  980  CASE key OF
  990   WHEN 27:REM Escape - close window
 1000    PROCclosewin(connectwin%)
 1010   WHEN 13:REM Return
 1020    PROCtryconnect:keydone=TRUE
 1030  ENDCASE
 1040 WHEN sendwin%
 1050  CASE key OF
 1060   WHEN 27:REM Escape - close window
 1070    PROCclosewin(sendwin%):keydone=TRUE
 1080   WHEN 13:REM Return
 1090    PROCsendmessage:keydone=TRUE
 1100  ENDCASE
 1110ENDCASE
 1120IF NOT keydone THENSYS "Wimp_ProcessKey",key
 1130ENDPROC
 1140:
 1150DEFPROCmenuchoice
 1160SYS"Wimp_GetPointerInfo",,message_buffer%:mbut%=message_buffer%!8
 1170m$=FNdecodemenu(curmenu%)
 1180CASE curmenu% OF
 1190 WHEN FNnetgame_sitesmenu:REM The sites menu, so select it
 1200  PROCnetgame_selectsite(!b%,connectwin%,1,3,-1)
 1210  curmenu%=FNnetgame_sitesmenu:REM In case it's been re-created
 1220 OTHERWISE
 1230  CASE m$ OF
 1240   WHEN "Quit":quit%=TRUE
 1250   WHEN "Sites...":PROCnetgame_editsites(???):REM Editing time
 1260  ENDCASE
 1270ENDCASE
 1280IF (mbut%AND1)=1 THENPROCrecreatemenu ELSEcurmenu%=-1
 1290ENDPROC
 1300:
 1310DEFPROCreceive(mess)
 1320CASE mess OF
 1330 REM &400C1 = mode change
 1340 REM &400C2 = task start up
 1350 REM &400C3 = task shut down
 1360 WHEN &90281:REM Sites file has been updated
 1370  PROCnetgame_readsites
 1380 WHEN 0:quit%=TRUE*2
 1390 WHEN &502:PROCHelp(b%!32,b%!36,b%!4)
 1400 WHEN 10:PROCdesktopsave(b%!20)
 1410ENDCASE
 1420ENDPROC
 1430:
 1440DEFPROCreceiveack(mess)
 1450CASE mess OF
 1460ENDCASE
 1470ENDPROC
 1480:
 1490DEFPROCdesktopsave(file%)
 1500LOCAL ERROR
 1510ON ERROR LOCAL b%!12=b%!8:SYS "Wimp_SendMessage",19,b%,b%!4:RESTORE ERROR:ENDPROC
 1520REM The above line acknowledges the message if an error occurs
 1530REM aborting the desktop save.
 1540BPUT#file%,"Run "+Appdir$
 1550ENDPROC
 1560:
 1570DEFPROCloadfile(file$,type)
 1580CASE type OF
 1590ENDCASE
 1600ENDPROC
 1610:
 1620REM Any messages to be received MUST be noted
 1630DEFPROCinitwimp
 1640DIM messagelist% 256:messptr%=0
 1650PROCnotemessage(&502):PROCnotemessage(10)
 1660PROCnotemessage(0)
 1670SYS "Wimp_Initialise",310,&4B534154,Appname$,messagelist% TO wimpversion,taskhandle
 1680indl%=1024:menul%=1024:DIM b% 2048,ind% indl%,menu% menul%,wspc% &800
 1690curmenu%=-1
 1700PROCopenmessages
 1710REM sprites%=FNloadsprites(Appdir$+".Sprites")
 1720infobox%=FNloadtemplate("Info",1)
 1730connectwin%=FNloadtemplate("connect",1)
 1740sendwin%=FNloadtemplate("send",1)
 1750msgwin%=FNloadtemplate("message",1)
 1760PROCseticontext(infobox%,1,Appname$)
 1770PROCseticontext(infobox%,2,longname$+" (port xxxx)")
 1780PROCseticontext(infobox%,4,version$)
 1790ibhandle=FNCreateIconBarIcon("!"+Appname$,shortname$,1)
 1800ibmenu%=FNcreatemenu(Appname$+"|Info]>infobox%|Sites...|Quit")
 1810iboptions%=options%
 1820ENDPROC
 1830:
 1840DEFPROCinitprog
 1850REM Initialise the network game library
 1860port=FNnetgame_init(???):REM Port number
 1870REM Ensure that everything went ok
 1880IF port=-1 THEN
 1890 reply=FNerrorbox(">Message",">CouldntInit",%10001)
 1900 SYS "Wimp_CloseDown"
 1910 PROCclosemessages
 1920 END
 1930ELSE
 1940 PROCseticontext(infobox%,2,">Info:"+STR$port)
 1950ENDIF
 1960REM Mark the correct site in the connect window
 1970PROCseticontext(connectwin%,3,STR$port)
 1980REM Read the sites from the file
 1990PROCnetgame_readsites
 2000ENDPROC
 2010:
 2020DEFPROCHelp(win,icon,to)
 2030RESTORE +1:PROCreadhelp(win,icon,to)
 2040ENDPROC
 2050REM Windows
 2060DATA infobox%,">HInfobox"
 2070DATA 3,">HInfobox3"
 2080DATA 4,">HInfobox4"
 2090DATA sendwin%,">HSendwin"
 2100DATA 2,">HSCancel"
 2110DATA 3,">HSSend"
 2120DATA msgwin%,">HMsgwin"
 2130DATA 2,">HReply"
 2140DATA 1,">HOk"
 2150DATA connectwin%,">HConnectwin"
 2160DATA 4,">HCOk"
 2170DATA -2,">HIconbar"
 2180DATA -1,-1
 2190REM Menus
 2200DATA -2,-2,-2,-2
 2210:
 2220DEFPROCFetchPage(f$)
 2230REM XURI_Dispatch - this protocol is still being decided !
 2240SYS &6E381,%000,f$+CHR$0
 2250ENDPROC
 2260:
 2270REM ******************** NetGame routines ******************
 2280:
 2290REM They've gone, so we'd better tell them
 2300DEFPROCdisconnected(type)
 2310LOCAL reply
 2320CASE type OF
 2330 WHEN ngs_dead:REM Bad little boy, dropped connection
 2340  reply=FNerrorbox(">Message",">Closed",%10001)
 2350 WHEN ngs_going:REM Mr Flibble says 'Game Over', boys
 2360  reply=FNerrorbox(">Message",">GameOver",%10001)
 2370 WHEN ngs_failed:REM Couldn't get a connection
 2380  reply=FNerrorbox(">Message",">NoConnect",%10001)
 2390  PROCopenconnect
 2400ENDCASE
 2410ENDPROC
 2420:
 2430REM We've got a connection
 2440REM type = ngs_originate if we connected to them
 2450REM        ngs_answer if they connected to us
 2460DEFPROCconnected(host$,type)
 2470PROCclosewin(connectwin%):REM Close the connect window
 2480REM We should open a window or something
 2490ENDPROC
 2500:
 2510REM Message has arrived from them - try not to create a loop
 2520REM 'cos that is kinda silly...
 2530DEFPROCincoming(msg$)
 2540REM If it's a user message we should put it in the message window
 2550REM with PROCgotmessage(msg$), otherwise it's a 'go' so we need
 2560REM to process it
 2570ENDPROC
 2580:
 2590REM ********************** Other routines **********************
 2600:
 2610REM Attempt a connection using the 'connect' window as host
 2620DEFPROCtryconnect
 2630LOCAL host$,port
 2640host$=FNgeticontext(connectwin%,1):REM Read the host
 2650IF host$="" THENENDPROC
 2660REM Read the service number
 2670port=FNinet_getservbyname(FNgeticontext(connectwin%,3),"tcp")
 2680REM Now do the connection
 2690ok=FNnetgame_connect(host$,port)
 2700IF NOT ok THEN
 2710 REM We couldn't connect so tell them
 2720 reply=FNerrorbox(">Message",">NoConnect",%10001)
 2730ELSE
 2740 PROCclosewin(connectwin%)
 2750ENDIF
 2760ENDPROC
 2770:
 2780REM We've got a message from them so lets stick it on the screen
 2790DEFPROCgotmessage(msg$)
 2800PROCseticontext(msgwin%,0,LEFT$(msg$,39)):REM Fit it to the icon
 2810PROCopenwin(msgwin%):REM Open the window
 2820ENDPROC
 2830:
 2840REM Send the message in the 'send' window
 2850DEFPROCsendmessage
 2860LOCAL a$:a$=FNgeticontext(sendwin%,0)
 2870REM Send the message
 2880REM You need to put some code here :
 2890REM like PROCnetgame_send(a$)
 2900REM Clear the text and close the window
 2910PROCseticontext(sendwin%,0,"")
 2920PROCclosewin(sendwin%)
 2930ENDPROC
 2940:
 2950REM Open the 'connect' window
 2960DEFPROCopenconnect
 2970PROCopenwincentre(connectwin%)
 2980PROCsetcaretend(connectwin%,1)
 2990ENDPROC
 3000:
 3010REM Open the 'reply' window
 3020DEFPROCopenreply
 3030PROCclosewin(msgwin%)
 3040PROCopenwin(sendwin%)
 3050PROCsetcaretend(sendwin%,0)
 3060ENDPROC

� >!RunImage
testing%=�
)ț "<BasicLibrary$File>":�initlibrary
(%ț "<HeapLibrary$File>":�initheap
2ț "<NetGameLibrary$File>"
<=� � �closemessages:�eerror:� testing%=� ��("Spool"):� � �
F � testing%=� �*Spool Spooled
P� testing%=� �� �
Z5� Appname$ is used for task manager & Appname$Dir
dD� shortname$ is used for iconbar name and should usually be null
n'� longname$ is used for info window
x7� AppURL$ is used to for clicks on the version icon
�2Appname$="?????":version$="1.00 (?? ??? ????)"
�#shortname$="":longname$="?????"
�'Appdir$=�systemvar(Appname$+"$Dir")
�9AppURL$="http://users.essex.ac.uk/users/gerph/acorn/"
��initwimp:�initprog
�quit%=�:init%=�
�� � �error
�� � init% �
� go$=�GetEnv:init%=�
�- � go$<>"" ��loadfile(go$,�filetype(go$))
��
�ȕ quit%=�
�
 �Poll
�
ș "Wimp_CloseDown"
�closemessages
"�netgame_final
,� testing%=� �*SPOOL
6�
@5� quit%=-1 for user quit, -2 for taskmanager quit
J:
T
��Poll
^"ș "OS_ReadMonotonicTime" � t%
h+ș "Wimp_PollIdle",0,b%,t%+15 � reason%
rȎ reason% �
| � 0:� Null poll
�7  �netgame_poll:� Check if there is something to do
� � 1 = Redraw window
�! � 2:ș "Wimp_OpenWindow",,b%
�" � 3:ș "Wimp_CloseWindow",,b%
�& � 6:�mouseclick(b%!8,b%!12,b%!16)
�+ � 7 = Drag box dropped on another task
�% � 8:�processkey(b%!0,b%!4,b%!24)
� � 9:�menuchoice
� � 17,18:�receive(b%!16)
� � 19:�receiveack(b%!16)
��
��
�:
0� Buttons : 1 = Adjust, 2 = Menu, 4 = Select
��mouseclick(but,win,icon)
Ȏ win �
&	 � -2
0  Ȏ but �
:   � 2:�ibmenu
D   � 1,4:� Select or adjust
N    � �netgame_connected �
X%     � Open a window or something
b	    �
l/     �openconnect:� Open the connect window
v	    �
�  �
� � infobox%
�  Ȏ icon �
�   � 1:�showfree
�>   � 3:�FetchPage("http://users.essex.ac.uk/users/gerph/")
�   � 4:�FetchPage(AppURL$)
�  �
� � connectwin%
�  Ȏ icon �
�7   � 5:�menu(�netgame_sitesmenu,-1,-1):� Sites list
�   � 4:�tryconnect
�  �
� � sendwin%
  Ȏ icon �
*   � 2:� Cancel - clear text and close
#    �seticontext(sendwin%,0,"")
     �closewin(sendwin%)
*   � 1:� Send
4    �sendmessage
>  �
H � msgwin%
R  Ȏ icon �
\   � 2:� Reply
f    �openreply
p   � 1:� Ok
z    �closewin(win)
�  �
��
��
�:
���processkey(win,icon,key)
�� keydone:keydone=�
�Ȏ win �
� � connectwin%
�  Ȏ key �
�#   � 27:� Escape - close window
�    �closewin(connectwin%)
�   � 13:� Return
�    �tryconnect:keydone=�
  �
 � sendwin%
  Ȏ key �
$#   � 27:� Escape - close window
.%    �closewin(sendwin%):keydone=�
8   � 13:� Return
B    �sendmessage:keydone=�
L  �
V�
`)� � keydone �ș "Wimp_ProcessKey",key
j�
t:
~��menuchoice
�Dș"Wimp_GetPointerInfo",,message_buffer%:mbut%=message_buffer%!8
�m$=�decodemenu(curmenu%)
�Ȏ curmenu% �
�8 � �netgame_sitesmenu:� The sites menu, so select it
�1  �netgame_selectsite(!b%,connectwin%,1,3,-1)
�@  curmenu%=�netgame_sitesmenu:� In case it's been re-created
� 
�
  Ȏ m$ �
�   � "Quit":quit%=�
�:   � "Sites...":�netgame_editsites(???):� Editing time
�  �
��
-� (mbut%�1)=1 ��recreatemenu �curmenu%=-1

�
:
��receive(mess)
(
Ȏ mess �
2 � &400C1 = mode change
< � &400C2 = task start up
F � &400C3 = task shut down
P+ � &90281:� Sites file has been updated
Z  �netgame_readsites
d � 0:quit%=�*2
n# � &502:�Help(b%!32,b%!36,b%!4)
x � 10:�desktopsave(b%!20)
��
��
�:
���receiveack(mess)
�
Ȏ mess �
��
��
�:
���desktopsave(file%)
�� �
�;� � � b%!12=b%!8:ș "Wimp_SendMessage",19,b%,b%!4:� �:�
�@� The above line acknowledges the message if an error occurs
� � aborting the desktop save.
�#file%,"Run "+Appdir$
�
:
"��loadfile(file$,type)
,
Ȏ type �
6�
@�
J:
T/� Any messages to be received MUST be noted
^��initwimp
h!� messagelist% 256:messptr%=0
r'�notemessage(&502):�notemessage(10)
|�notemessage(0)
�Uș "Wimp_Initialise",310,&4B534154,Appname$,messagelist% � wimpversion,taskhandle
�Gindl%=1024:menul%=1024:� b% 2048,ind% indl%,menu% menul%,wspc% &800
�curmenu%=-1
��openmessages
�0� sprites%=FNloadsprites(Appdir$+".Sprites")
�$infobox%=�loadtemplate("Info",1)
�*connectwin%=�loadtemplate("connect",1)
�$sendwin%=�loadtemplate("send",1)
�&msgwin%=�loadtemplate("message",1)
�%�seticontext(infobox%,1,Appname$)
�5�seticontext(infobox%,2,longname$+" (port xxxx)")
�%�seticontext(infobox%,4,version$)
�:ibhandle=�CreateIconBarIcon("!"+Appname$,shortname$,1)
Aibmenu%=�createmenu(Appname$+"|Info]>infobox%|Sites...|Quit")
iboptions%=options%
�
&:
0��initprog
:)� Initialise the network game library
D)port=�netgame_init(???):� Port number
N$� Ensure that everything went ok
X� port=-1 �
b6 reply=�errorbox(">Message",">CouldntInit",%10001)
l ș "Wimp_CloseDown"
v �closemessages
� �
��
�, �seticontext(infobox%,2,">Info:"+�port)
��
�1� Mark the correct site in the connect window
�%�seticontext(connectwin%,3,�port)
�"� Read the sites from the file
��netgame_readsites
��
�:
���Help(win,icon,to)
�� +1:�readhelp(win,icon,to)
��

� Windows
� infobox%,">HInfobox"
� 3,">HInfobox3"
 � 4,">HInfobox4"
*� sendwin%,">HSendwin"
4� 2,">HSCancel"
>� 3,">HSSend"
H� msgwin%,">HMsgwin"
R� 2,">HReply"
\� 1,">HOk"
f � connectwin%,">HConnectwin"
p� 4,">HCOk"
z� -2,">HIconbar"
�� -1,-1
�� Menus
�� -2,-2,-2,-2
�:
���FetchPage(f$)
�<� XURI_Dispatch - this protocol is still being decided !
�ș &6E381,%000,f$+�0
��
�:
�>� ******************** NetGame routines ******************
�:
�,� They've gone, so we'd better tell them
���disconnected(type)
	� reply
	
Ȏ type �
	4 � ngs_dead:� Bad little boy, dropped connection
	$2  reply=�errorbox(">Message",">Closed",%10001)
	.4 � ngs_going:� Mr Flibble says 'Game Over', boys
	84  reply=�errorbox(">Message",">GameOver",%10001)
	B- � ngs_failed:� Couldn't get a connection
	L5  reply=�errorbox(">Message",">NoConnect",%10001)
	V  �openconnect
	`�
	j�
	t:
	~� We've got a connection
	�2� type = ngs_originate if we connected to them
	�/�        ngs_answer if they connected to us
	���connected(host$,type)
	�5�closewin(connectwin%):� Close the connect window
	�*� We should open a window or something
	��
	�:
	�>� Message has arrived from them - try not to create a loop
	�!� 'cos that is kinda silly...
	���incoming(msg$)
	�C� If it's a user message we should put it in the message window
	�A� with PROCgotmessage(msg$), otherwise it's a 'go' so we need
� to process it

�
:
B� ********************** Other routines **********************
(:
2=� Attempt a connection using the 'connect' window as host
<��tryconnect
F� host$,port
P5host$=�geticontext(connectwin%,1):� Read the host
Z� host$="" ��
d� Read the service number
n?port=�inet_getservbyname(�geticontext(connectwin%,3),"tcp")
x� Now do the connection
�#ok=�netgame_connect(host$,port)
�� � ok �
�' � We couldn't connect so tell them
�4 reply=�errorbox(">Message",">NoConnect",%10001)
��
� �closewin(connectwin%)
��
��
�:
�B� We've got a message from them so lets stick it on the screen
���gotmessage(msg$)
�:�seticontext(msgwin%,0,�msg$,39)):� Fit it to the icon
�'�openwin(msgwin%):� Open the window
�
:
+� Send the message in the 'send' window
"��sendmessage
,$� a$:a$=�geticontext(sendwin%,0)
6� Send the message
@&� You need to put some code here :
J� like PROCnetgame_send(a$)
T)� Clear the text and close the window
^�seticontext(sendwin%,0,"")
h�closewin(sendwin%)
r�
|:
�� Open the 'connect' window
���openconnect
��openwincentre(connectwin%)
��setcaretend(connectwin%,1)
��
�:
�� Open the 'reply' window
���openreply
��closewin(msgwin%)
��openwin(sendwin%)
��setcaretend(sendwin%,0)
��
�
00000000  0d 00 0a 10 f4 20 3e 21  52 75 6e 49 6d 61 67 65  |..... >!RunImage|
00000010  0d 00 14 0e 74 65 73 74  69 6e 67 25 3d a3 0d 00  |....testing%=...|
00000020  1e 29 c8 9b 20 22 3c 42  61 73 69 63 4c 69 62 72  |.).. "<BasicLibr|
00000030  61 72 79 24 46 69 6c 65  3e 22 3a f2 69 6e 69 74  |ary$File>":.init|
00000040  6c 69 62 72 61 72 79 0d  00 28 25 c8 9b 20 22 3c  |library..(%.. "<|
00000050  48 65 61 70 4c 69 62 72  61 72 79 24 46 69 6c 65  |HeapLibrary$File|
00000060  3e 22 3a f2 69 6e 69 74  68 65 61 70 0d 00 32 1e  |>":.initheap..2.|
00000070  c8 9b 20 22 3c 4e 65 74  47 61 6d 65 4c 69 62 72  |.. "<NetGameLibr|
00000080  61 72 79 24 46 69 6c 65  3e 22 0d 00 3c 3d ee 20  |ary$File>"..<=. |
00000090  85 20 f2 63 6c 6f 73 65  6d 65 73 73 61 67 65 73  |. .closemessages|
000000a0  3a f2 65 65 72 72 6f 72  3a e7 20 74 65 73 74 69  |:.eerror:. testi|
000000b0  6e 67 25 3d b9 20 8c ff  28 22 53 70 6f 6f 6c 22  |ng%=. ..("Spool"|
000000c0  29 3a e0 20 8b 20 e0 0d  00 46 20 e7 20 74 65 73  |):. . ...F . tes|
000000d0  74 69 6e 67 25 3d b9 20  8c 2a 53 70 6f 6f 6c 20  |ting%=. .*Spool |
000000e0  53 70 6f 6f 6c 65 64 0d  00 50 15 e7 20 74 65 73  |Spooled..P.. tes|
000000f0  74 69 6e 67 25 3d b9 20  8c fc 20 ee 0d 00 5a 35  |ting%=. .. ...Z5|
00000100  f4 20 41 70 70 6e 61 6d  65 24 20 69 73 20 75 73  |. Appname$ is us|
00000110  65 64 20 66 6f 72 20 74  61 73 6b 20 6d 61 6e 61  |ed for task mana|
00000120  67 65 72 20 26 20 41 70  70 6e 61 6d 65 24 44 69  |ger & Appname$Di|
00000130  72 0d 00 64 44 f4 20 73  68 6f 72 74 6e 61 6d 65  |r..dD. shortname|
00000140  24 20 69 73 20 75 73 65  64 20 66 6f 72 20 69 63  |$ is used for ic|
00000150  6f 6e 62 61 72 20 6e 61  6d 65 20 61 6e 64 20 73  |onbar name and s|
00000160  68 6f 75 6c 64 20 75 73  75 61 6c 6c 79 20 62 65  |hould usually be|
00000170  20 6e 75 6c 6c 0d 00 6e  27 f4 20 6c 6f 6e 67 6e  | null..n'. longn|
00000180  61 6d 65 24 20 69 73 20  75 73 65 64 20 66 6f 72  |ame$ is used for|
00000190  20 69 6e 66 6f 20 77 69  6e 64 6f 77 0d 00 78 37  | info window..x7|
000001a0  f4 20 41 70 70 55 52 4c  24 20 69 73 20 75 73 65  |. AppURL$ is use|
000001b0  64 20 74 6f 20 66 6f 72  20 63 6c 69 63 6b 73 20  |d to for clicks |
000001c0  6f 6e 20 74 68 65 20 76  65 72 73 69 6f 6e 20 69  |on the version i|
000001d0  63 6f 6e 0d 00 82 32 41  70 70 6e 61 6d 65 24 3d  |con...2Appname$=|
000001e0  22 3f 3f 3f 3f 3f 22 3a  76 65 72 73 69 6f 6e 24  |"?????":version$|
000001f0  3d 22 31 2e 30 30 20 28  3f 3f 20 3f 3f 3f 20 3f  |="1.00 (?? ??? ?|
00000200  3f 3f 3f 29 22 0d 00 8c  23 73 68 6f 72 74 6e 61  |???)"...#shortna|
00000210  6d 65 24 3d 22 22 3a 6c  6f 6e 67 6e 61 6d 65 24  |me$="":longname$|
00000220  3d 22 3f 3f 3f 3f 3f 22  0d 00 96 27 41 70 70 64  |="?????"...'Appd|
00000230  69 72 24 3d a4 73 79 73  74 65 6d 76 61 72 28 41  |ir$=.systemvar(A|
00000240  70 70 6e 61 6d 65 24 2b  22 24 44 69 72 22 29 0d  |ppname$+"$Dir").|
00000250  00 a0 39 41 70 70 55 52  4c 24 3d 22 68 74 74 70  |..9AppURL$="http|
00000260  3a 2f 2f 75 73 65 72 73  2e 65 73 73 65 78 2e 61  |://users.essex.a|
00000270  63 2e 75 6b 2f 75 73 65  72 73 2f 67 65 72 70 68  |c.uk/users/gerph|
00000280  2f 61 63 6f 72 6e 2f 22  0d 00 aa 17 f2 69 6e 69  |/acorn/".....ini|
00000290  74 77 69 6d 70 3a f2 69  6e 69 74 70 72 6f 67 0d  |twimp:.initprog.|
000002a0  00 b4 13 71 75 69 74 25  3d a3 3a 69 6e 69 74 25  |...quit%=.:init%|
000002b0  3d a3 0d 00 be 0e ee 20  85 20 f2 65 72 72 6f 72  |=...... . .error|
000002c0  0d 00 c8 0f e7 20 ac 20  69 6e 69 74 25 20 8c 0d  |..... . init% ..|
000002d0  00 d2 18 20 67 6f 24 3d  a4 47 65 74 45 6e 76 3a  |... go$=.GetEnv:|
000002e0  69 6e 69 74 25 3d b9 0d  00 dc 2d 20 e7 20 67 6f  |init%=....- . go|
000002f0  24 3c 3e 22 22 20 8c f2  6c 6f 61 64 66 69 6c 65  |$<>"" ..loadfile|
00000300  28 67 6f 24 2c a4 66 69  6c 65 74 79 70 65 28 67  |(go$,.filetype(g|
00000310  6f 24 29 29 0d 00 e6 05  cd 0d 00 f0 0e c8 95 20  |o$))........... |
00000320  71 75 69 74 25 3d a3 0d  00 fa 0a 20 f2 50 6f 6c  |quit%=..... .Pol|
00000330  6c 0d 01 04 05 ce 0d 01  0e 17 c8 99 20 22 57 69  |l........... "Wi|
00000340  6d 70 5f 43 6c 6f 73 65  44 6f 77 6e 22 0d 01 18  |mp_CloseDown"...|
00000350  12 f2 63 6c 6f 73 65 6d  65 73 73 61 67 65 73 0d  |..closemessages.|
00000360  01 22 12 f2 6e 65 74 67  61 6d 65 5f 66 69 6e 61  |."..netgame_fina|
00000370  6c 0d 01 2c 18 e7 20 74  65 73 74 69 6e 67 25 3d  |l..,.. testing%=|
00000380  b9 20 8c 2a 53 50 4f 4f  4c 0d 01 36 05 e0 0d 01  |. .*SPOOL..6....|
00000390  40 35 f4 20 71 75 69 74  25 3d 2d 31 20 66 6f 72  |@5. quit%=-1 for|
000003a0  20 75 73 65 72 20 71 75  69 74 2c 20 2d 32 20 66  | user quit, -2 f|
000003b0  6f 72 20 74 61 73 6b 6d  61 6e 61 67 65 72 20 71  |or taskmanager q|
000003c0  75 69 74 0d 01 4a 05 3a  0d 01 54 0a dd f2 50 6f  |uit..J.:..T...Po|
000003d0  6c 6c 0d 01 5e 22 c8 99  20 22 4f 53 5f 52 65 61  |ll..^".. "OS_Rea|
000003e0  64 4d 6f 6e 6f 74 6f 6e  69 63 54 69 6d 65 22 20  |dMonotonicTime" |
000003f0  b8 20 74 25 0d 01 68 2b  c8 99 20 22 57 69 6d 70  |. t%..h+.. "Wimp|
00000400  5f 50 6f 6c 6c 49 64 6c  65 22 2c 30 2c 62 25 2c  |_PollIdle",0,b%,|
00000410  74 25 2b 31 35 20 b8 20  72 65 61 73 6f 6e 25 0d  |t%+15 . reason%.|
00000420  01 72 10 c8 8e 20 72 65  61 73 6f 6e 25 20 ca 0d  |.r... reason% ..|
00000430  01 7c 14 20 c9 20 30 3a  f4 20 4e 75 6c 6c 20 70  |.|. . 0:. Null p|
00000440  6f 6c 6c 0d 01 86 37 20  20 f2 6e 65 74 67 61 6d  |oll...7  .netgam|
00000450  65 5f 70 6f 6c 6c 3a f4  20 43 68 65 63 6b 20 69  |e_poll:. Check i|
00000460  66 20 74 68 65 72 65 20  69 73 20 73 6f 6d 65 74  |f there is somet|
00000470  68 69 6e 67 20 74 6f 20  64 6f 0d 01 90 18 20 f4  |hing to do.... .|
00000480  20 31 20 3d 20 52 65 64  72 61 77 20 77 69 6e 64  | 1 = Redraw wind|
00000490  6f 77 0d 01 9a 21 20 c9  20 32 3a c8 99 20 22 57  |ow...! . 2:.. "W|
000004a0  69 6d 70 5f 4f 70 65 6e  57 69 6e 64 6f 77 22 2c  |imp_OpenWindow",|
000004b0  2c 62 25 0d 01 a4 22 20  c9 20 33 3a c8 99 20 22  |,b%..." . 3:.. "|
000004c0  57 69 6d 70 5f 43 6c 6f  73 65 57 69 6e 64 6f 77  |Wimp_CloseWindow|
000004d0  22 2c 2c 62 25 0d 01 ae  26 20 c9 20 36 3a f2 6d  |",,b%...& . 6:.m|
000004e0  6f 75 73 65 63 6c 69 63  6b 28 62 25 21 38 2c 62  |ouseclick(b%!8,b|
000004f0  25 21 31 32 2c 62 25 21  31 36 29 0d 01 b8 2b 20  |%!12,b%!16)...+ |
00000500  f4 20 37 20 3d 20 44 72  61 67 20 62 6f 78 20 64  |. 7 = Drag box d|
00000510  72 6f 70 70 65 64 20 6f  6e 20 61 6e 6f 74 68 65  |ropped on anothe|
00000520  72 20 74 61 73 6b 0d 01  c2 25 20 c9 20 38 3a f2  |r task...% . 8:.|
00000530  70 72 6f 63 65 73 73 6b  65 79 28 62 25 21 30 2c  |processkey(b%!0,|
00000540  62 25 21 34 2c 62 25 21  32 34 29 0d 01 cc 14 20  |b%!4,b%!24).... |
00000550  c9 20 39 3a f2 6d 65 6e  75 63 68 6f 69 63 65 0d  |. 9:.menuchoice.|
00000560  01 d6 1c 20 c9 20 31 37  2c 31 38 3a f2 72 65 63  |... . 17,18:.rec|
00000570  65 69 76 65 28 62 25 21  31 36 29 0d 01 e0 1c 20  |eive(b%!16).... |
00000580  c9 20 31 39 3a f2 72 65  63 65 69 76 65 61 63 6b  |. 19:.receiveack|
00000590  28 62 25 21 31 36 29 0d  01 ea 05 cb 0d 01 f4 05  |(b%!16).........|
000005a0  e1 0d 01 fe 05 3a 0d 02  08 30 f4 20 42 75 74 74  |.....:...0. Butt|
000005b0  6f 6e 73 20 3a 20 31 20  3d 20 41 64 6a 75 73 74  |ons : 1 = Adjust|
000005c0  2c 20 32 20 3d 20 4d 65  6e 75 2c 20 34 20 3d 20  |, 2 = Menu, 4 = |
000005d0  53 65 6c 65 63 74 0d 02  12 1e dd f2 6d 6f 75 73  |Select......mous|
000005e0  65 63 6c 69 63 6b 28 62  75 74 2c 77 69 6e 2c 69  |eclick(but,win,i|
000005f0  63 6f 6e 29 0d 02 1c 0c  c8 8e 20 77 69 6e 20 ca  |con)...... win .|
00000600  0d 02 26 09 20 c9 20 2d  32 0d 02 30 0e 20 20 c8  |..&. . -2..0.  .|
00000610  8e 20 62 75 74 20 ca 0d  02 3a 12 20 20 20 c9 20  |. but ...:.   . |
00000620  32 3a f2 69 62 6d 65 6e  75 0d 02 44 1f 20 20 20  |2:.ibmenu..D.   |
00000630  c9 20 31 2c 34 3a f4 20  53 65 6c 65 63 74 20 6f  |. 1,4:. Select o|
00000640  72 20 61 64 6a 75 73 74  0d 02 4e 1e 20 20 20 20  |r adjust..N.    |
00000650  e7 20 a4 6e 65 74 67 61  6d 65 5f 63 6f 6e 6e 65  |. .netgame_conne|
00000660  63 74 65 64 20 8c 0d 02  58 25 20 20 20 20 20 f4  |cted ...X%     .|
00000670  20 4f 70 65 6e 20 61 20  77 69 6e 64 6f 77 20 6f  | Open a window o|
00000680  72 20 73 6f 6d 65 74 68  69 6e 67 0d 02 62 09 20  |r something..b. |
00000690  20 20 20 cc 0d 02 6c 2f  20 20 20 20 20 f2 6f 70  |   ...l/     .op|
000006a0  65 6e 63 6f 6e 6e 65 63  74 3a f4 20 4f 70 65 6e  |enconnect:. Open|
000006b0  20 74 68 65 20 63 6f 6e  6e 65 63 74 20 77 69 6e  | the connect win|
000006c0  64 6f 77 0d 02 76 09 20  20 20 20 cd 0d 02 80 07  |dow..v.    .....|
000006d0  20 20 cb 0d 02 8a 0f 20  c9 20 69 6e 66 6f 62 6f  |  ..... . infobo|
000006e0  78 25 0d 02 94 0f 20 20  c8 8e 20 69 63 6f 6e 20  |x%....  .. icon |
000006f0  ca 0d 02 9e 14 20 20 20  c9 20 31 3a f2 73 68 6f  |.....   . 1:.sho|
00000700  77 66 72 65 65 0d 02 a8  3e 20 20 20 c9 20 33 3a  |wfree...>   . 3:|
00000710  f2 46 65 74 63 68 50 61  67 65 28 22 68 74 74 70  |.FetchPage("http|
00000720  3a 2f 2f 75 73 65 72 73  2e 65 73 73 65 78 2e 61  |://users.essex.a|
00000730  63 2e 75 6b 2f 75 73 65  72 73 2f 67 65 72 70 68  |c.uk/users/gerph|
00000740  2f 22 29 0d 02 b2 1e 20  20 20 c9 20 34 3a f2 46  |/")....   . 4:.F|
00000750  65 74 63 68 50 61 67 65  28 41 70 70 55 52 4c 24  |etchPage(AppURL$|
00000760  29 0d 02 bc 07 20 20 cb  0d 02 c6 12 20 c9 20 63  |)....  ..... . c|
00000770  6f 6e 6e 65 63 74 77 69  6e 25 0d 02 d0 0f 20 20  |onnectwin%....  |
00000780  c8 8e 20 69 63 6f 6e 20  ca 0d 02 da 37 20 20 20  |.. icon ....7   |
00000790  c9 20 35 3a f2 6d 65 6e  75 28 a4 6e 65 74 67 61  |. 5:.menu(.netga|
000007a0  6d 65 5f 73 69 74 65 73  6d 65 6e 75 2c 2d 31 2c  |me_sitesmenu,-1,|
000007b0  2d 31 29 3a f4 20 53 69  74 65 73 20 6c 69 73 74  |-1):. Sites list|
000007c0  0d 02 e4 16 20 20 20 c9  20 34 3a f2 74 72 79 63  |....   . 4:.tryc|
000007d0  6f 6e 6e 65 63 74 0d 02  ee 07 20 20 cb 0d 02 f8  |onnect....  ....|
000007e0  0f 20 c9 20 73 65 6e 64  77 69 6e 25 0d 03 02 0f  |. . sendwin%....|
000007f0  20 20 c8 8e 20 69 63 6f  6e 20 ca 0d 03 0c 2a 20  |  .. icon ....* |
00000800  20 20 c9 20 32 3a f4 20  43 61 6e 63 65 6c 20 2d  |  . 2:. Cancel -|
00000810  20 63 6c 65 61 72 20 74  65 78 74 20 61 6e 64 20  | clear text and |
00000820  63 6c 6f 73 65 0d 03 16  23 20 20 20 20 f2 73 65  |close...#    .se|
00000830  74 69 63 6f 6e 74 65 78  74 28 73 65 6e 64 77 69  |ticontext(sendwi|
00000840  6e 25 2c 30 2c 22 22 29  0d 03 20 1b 20 20 20 20  |n%,0,"").. .    |
00000850  f2 63 6c 6f 73 65 77 69  6e 28 73 65 6e 64 77 69  |.closewin(sendwi|
00000860  6e 25 29 0d 03 2a 11 20  20 20 c9 20 31 3a f4 20  |n%)..*.   . 1:. |
00000870  53 65 6e 64 0d 03 34 14  20 20 20 20 f2 73 65 6e  |Send..4.    .sen|
00000880  64 6d 65 73 73 61 67 65  0d 03 3e 07 20 20 cb 0d  |dmessage..>.  ..|
00000890  03 48 0e 20 c9 20 6d 73  67 77 69 6e 25 0d 03 52  |.H. . msgwin%..R|
000008a0  0f 20 20 c8 8e 20 69 63  6f 6e 20 ca 0d 03 5c 12  |.  .. icon ...\.|
000008b0  20 20 20 c9 20 32 3a f4  20 52 65 70 6c 79 0d 03  |   . 2:. Reply..|
000008c0  66 12 20 20 20 20 f2 6f  70 65 6e 72 65 70 6c 79  |f.    .openreply|
000008d0  0d 03 70 0f 20 20 20 c9  20 31 3a f4 20 4f 6b 0d  |..p.   . 1:. Ok.|
000008e0  03 7a 16 20 20 20 20 f2  63 6c 6f 73 65 77 69 6e  |.z.    .closewin|
000008f0  28 77 69 6e 29 0d 03 84  07 20 20 cb 0d 03 8e 05  |(win)....  .....|
00000900  cb 0d 03 98 05 e1 0d 03  a2 05 3a 0d 03 ac 1e dd  |..........:.....|
00000910  f2 70 72 6f 63 65 73 73  6b 65 79 28 77 69 6e 2c  |.processkey(win,|
00000920  69 63 6f 6e 2c 6b 65 79  29 0d 03 b6 17 ea 20 6b  |icon,key)..... k|
00000930  65 79 64 6f 6e 65 3a 6b  65 79 64 6f 6e 65 3d a3  |eydone:keydone=.|
00000940  0d 03 c0 0c c8 8e 20 77  69 6e 20 ca 0d 03 ca 12  |...... win .....|
00000950  20 c9 20 63 6f 6e 6e 65  63 74 77 69 6e 25 0d 03  | . connectwin%..|
00000960  d4 0e 20 20 c8 8e 20 6b  65 79 20 ca 0d 03 de 23  |..  .. key ....#|
00000970  20 20 20 c9 20 32 37 3a  f4 20 45 73 63 61 70 65  |   . 27:. Escape|
00000980  20 2d 20 63 6c 6f 73 65  20 77 69 6e 64 6f 77 0d  | - close window.|
00000990  03 e8 1e 20 20 20 20 f2  63 6c 6f 73 65 77 69 6e  |...    .closewin|
000009a0  28 63 6f 6e 6e 65 63 74  77 69 6e 25 29 0d 03 f2  |(connectwin%)...|
000009b0  14 20 20 20 c9 20 31 33  3a f4 20 52 65 74 75 72  |.   . 13:. Retur|
000009c0  6e 0d 03 fc 1d 20 20 20  20 f2 74 72 79 63 6f 6e  |n....    .trycon|
000009d0  6e 65 63 74 3a 6b 65 79  64 6f 6e 65 3d b9 0d 04  |nect:keydone=...|
000009e0  06 07 20 20 cb 0d 04 10  0f 20 c9 20 73 65 6e 64  |..  ..... . send|
000009f0  77 69 6e 25 0d 04 1a 0e  20 20 c8 8e 20 6b 65 79  |win%....  .. key|
00000a00  20 ca 0d 04 24 23 20 20  20 c9 20 32 37 3a f4 20  | ...$#   . 27:. |
00000a10  45 73 63 61 70 65 20 2d  20 63 6c 6f 73 65 20 77  |Escape - close w|
00000a20  69 6e 64 6f 77 0d 04 2e  25 20 20 20 20 f2 63 6c  |indow...%    .cl|
00000a30  6f 73 65 77 69 6e 28 73  65 6e 64 77 69 6e 25 29  |osewin(sendwin%)|
00000a40  3a 6b 65 79 64 6f 6e 65  3d b9 0d 04 38 14 20 20  |:keydone=...8.  |
00000a50  20 c9 20 31 33 3a f4 20  52 65 74 75 72 6e 0d 04  | . 13:. Return..|
00000a60  42 1e 20 20 20 20 f2 73  65 6e 64 6d 65 73 73 61  |B.    .sendmessa|
00000a70  67 65 3a 6b 65 79 64 6f  6e 65 3d b9 0d 04 4c 07  |ge:keydone=...L.|
00000a80  20 20 cb 0d 04 56 05 cb  0d 04 60 29 e7 20 ac 20  |  ...V....`). . |
00000a90  6b 65 79 64 6f 6e 65 20  8c c8 99 20 22 57 69 6d  |keydone ... "Wim|
00000aa0  70 5f 50 72 6f 63 65 73  73 4b 65 79 22 2c 6b 65  |p_ProcessKey",ke|
00000ab0  79 0d 04 6a 05 e1 0d 04  74 05 3a 0d 04 7e 10 dd  |y..j....t.:..~..|
00000ac0  f2 6d 65 6e 75 63 68 6f  69 63 65 0d 04 88 44 c8  |.menuchoice...D.|
00000ad0  99 22 57 69 6d 70 5f 47  65 74 50 6f 69 6e 74 65  |."Wimp_GetPointe|
00000ae0  72 49 6e 66 6f 22 2c 2c  6d 65 73 73 61 67 65 5f  |rInfo",,message_|
00000af0  62 75 66 66 65 72 25 3a  6d 62 75 74 25 3d 6d 65  |buffer%:mbut%=me|
00000b00  73 73 61 67 65 5f 62 75  66 66 65 72 25 21 38 0d  |ssage_buffer%!8.|
00000b10  04 92 1c 6d 24 3d a4 64  65 63 6f 64 65 6d 65 6e  |...m$=.decodemen|
00000b20  75 28 63 75 72 6d 65 6e  75 25 29 0d 04 9c 11 c8  |u(curmenu%).....|
00000b30  8e 20 63 75 72 6d 65 6e  75 25 20 ca 0d 04 a6 38  |. curmenu% ....8|
00000b40  20 c9 20 a4 6e 65 74 67  61 6d 65 5f 73 69 74 65  | . .netgame_site|
00000b50  73 6d 65 6e 75 3a f4 20  54 68 65 20 73 69 74 65  |smenu:. The site|
00000b60  73 20 6d 65 6e 75 2c 20  73 6f 20 73 65 6c 65 63  |s menu, so selec|
00000b70  74 20 69 74 0d 04 b0 31  20 20 f2 6e 65 74 67 61  |t it...1  .netga|
00000b80  6d 65 5f 73 65 6c 65 63  74 73 69 74 65 28 21 62  |me_selectsite(!b|
00000b90  25 2c 63 6f 6e 6e 65 63  74 77 69 6e 25 2c 31 2c  |%,connectwin%,1,|
00000ba0  33 2c 2d 31 29 0d 04 ba  40 20 20 63 75 72 6d 65  |3,-1)...@  curme|
00000bb0  6e 75 25 3d a4 6e 65 74  67 61 6d 65 5f 73 69 74  |nu%=.netgame_sit|
00000bc0  65 73 6d 65 6e 75 3a f4  20 49 6e 20 63 61 73 65  |esmenu:. In case|
00000bd0  20 69 74 27 73 20 62 65  65 6e 20 72 65 2d 63 72  | it's been re-cr|
00000be0  65 61 74 65 64 0d 04 c4  06 20 7f 0d 04 ce 0d 20  |eated.... ..... |
00000bf0  20 c8 8e 20 6d 24 20 ca  0d 04 d8 17 20 20 20 c9  | .. m$ .....   .|
00000c00  20 22 51 75 69 74 22 3a  71 75 69 74 25 3d b9 0d  | "Quit":quit%=..|
00000c10  04 e2 3a 20 20 20 c9 20  22 53 69 74 65 73 2e 2e  |..:   . "Sites..|
00000c20  2e 22 3a f2 6e 65 74 67  61 6d 65 5f 65 64 69 74  |.":.netgame_edit|
00000c30  73 69 74 65 73 28 3f 3f  3f 29 3a f4 20 45 64 69  |sites(???):. Edi|
00000c40  74 69 6e 67 20 74 69 6d  65 0d 04 ec 07 20 20 cb  |ting time....  .|
00000c50  0d 04 f6 05 cb 0d 05 00  2d e7 20 28 6d 62 75 74  |........-. (mbut|
00000c60  25 80 31 29 3d 31 20 8c  f2 72 65 63 72 65 61 74  |%.1)=1 ..recreat|
00000c70  65 6d 65 6e 75 20 8b 63  75 72 6d 65 6e 75 25 3d  |emenu .curmenu%=|
00000c80  2d 31 0d 05 0a 05 e1 0d  05 14 05 3a 0d 05 1e 13  |-1.........:....|
00000c90  dd f2 72 65 63 65 69 76  65 28 6d 65 73 73 29 0d  |..receive(mess).|
00000ca0  05 28 0d c8 8e 20 6d 65  73 73 20 ca 0d 05 32 1b  |.(... mess ...2.|
00000cb0  20 f4 20 26 34 30 30 43  31 20 3d 20 6d 6f 64 65  | . &400C1 = mode|
00000cc0  20 63 68 61 6e 67 65 0d  05 3c 1d 20 f4 20 26 34  | change..<. . &4|
00000cd0  30 30 43 32 20 3d 20 74  61 73 6b 20 73 74 61 72  |00C2 = task star|
00000ce0  74 20 75 70 0d 05 46 1e  20 f4 20 26 34 30 30 43  |t up..F. . &400C|
00000cf0  33 20 3d 20 74 61 73 6b  20 73 68 75 74 20 64 6f  |3 = task shut do|
00000d00  77 6e 0d 05 50 2b 20 c9  20 26 39 30 32 38 31 3a  |wn..P+ . &90281:|
00000d10  f4 20 53 69 74 65 73 20  66 69 6c 65 20 68 61 73  |. Sites file has|
00000d20  20 62 65 65 6e 20 75 70  64 61 74 65 64 0d 05 5a  | been updated..Z|
00000d30  18 20 20 f2 6e 65 74 67  61 6d 65 5f 72 65 61 64  |.  .netgame_read|
00000d40  73 69 74 65 73 0d 05 64  12 20 c9 20 30 3a 71 75  |sites..d. . 0:qu|
00000d50  69 74 25 3d b9 2a 32 0d  05 6e 23 20 c9 20 26 35  |it%=.*2..n# . &5|
00000d60  30 32 3a f2 48 65 6c 70  28 62 25 21 33 32 2c 62  |02:.Help(b%!32,b|
00000d70  25 21 33 36 2c 62 25 21  34 29 0d 05 78 1d 20 c9  |%!36,b%!4)..x. .|
00000d80  20 31 30 3a f2 64 65 73  6b 74 6f 70 73 61 76 65  | 10:.desktopsave|
00000d90  28 62 25 21 32 30 29 0d  05 82 05 cb 0d 05 8c 05  |(b%!20).........|
00000da0  e1 0d 05 96 05 3a 0d 05  a0 16 dd f2 72 65 63 65  |.....:......rece|
00000db0  69 76 65 61 63 6b 28 6d  65 73 73 29 0d 05 aa 0d  |iveack(mess)....|
00000dc0  c8 8e 20 6d 65 73 73 20  ca 0d 05 b4 05 cb 0d 05  |.. mess ........|
00000dd0  be 05 e1 0d 05 c8 05 3a  0d 05 d2 18 dd f2 64 65  |.......:......de|
00000de0  73 6b 74 6f 70 73 61 76  65 28 66 69 6c 65 25 29  |sktopsave(file%)|
00000df0  0d 05 dc 07 ea 20 85 0d  05 e6 3b ee 20 85 20 ea  |..... ....;. . .|
00000e00  20 62 25 21 31 32 3d 62  25 21 38 3a c8 99 20 22  | b%!12=b%!8:.. "|
00000e10  57 69 6d 70 5f 53 65 6e  64 4d 65 73 73 61 67 65  |Wimp_SendMessage|
00000e20  22 2c 31 39 2c 62 25 2c  62 25 21 34 3a f7 20 85  |",19,b%,b%!4:. .|
00000e30  3a e1 0d 05 f0 40 f4 20  54 68 65 20 61 62 6f 76  |:....@. The abov|
00000e40  65 20 6c 69 6e 65 20 61  63 6b 6e 6f 77 6c 65 64  |e line acknowled|
00000e50  67 65 73 20 74 68 65 20  6d 65 73 73 61 67 65 20  |ges the message |
00000e60  69 66 20 61 6e 20 65 72  72 6f 72 20 6f 63 63 75  |if an error occu|
00000e70  72 73 0d 05 fa 20 f4 20  61 62 6f 72 74 69 6e 67  |rs... . aborting|
00000e80  20 74 68 65 20 64 65 73  6b 74 6f 70 20 73 61 76  | the desktop sav|
00000e90  65 2e 0d 06 04 1a d5 23  66 69 6c 65 25 2c 22 52  |e......#file%,"R|
00000ea0  75 6e 20 22 2b 41 70 70  64 69 72 24 0d 06 0e 05  |un "+Appdir$....|
00000eb0  e1 0d 06 18 05 3a 0d 06  22 1a dd f2 6c 6f 61 64  |.....:.."...load|
00000ec0  66 69 6c 65 28 66 69 6c  65 24 2c 74 79 70 65 29  |file(file$,type)|
00000ed0  0d 06 2c 0d c8 8e 20 74  79 70 65 20 ca 0d 06 36  |..,... type ...6|
00000ee0  05 cb 0d 06 40 05 e1 0d  06 4a 05 3a 0d 06 54 2f  |....@....J.:..T/|
00000ef0  f4 20 41 6e 79 20 6d 65  73 73 61 67 65 73 20 74  |. Any messages t|
00000f00  6f 20 62 65 20 72 65 63  65 69 76 65 64 20 4d 55  |o be received MU|
00000f10  53 54 20 62 65 20 6e 6f  74 65 64 0d 06 5e 0e dd  |ST be noted..^..|
00000f20  f2 69 6e 69 74 77 69 6d  70 0d 06 68 21 de 20 6d  |.initwimp..h!. m|
00000f30  65 73 73 61 67 65 6c 69  73 74 25 20 32 35 36 3a  |essagelist% 256:|
00000f40  6d 65 73 73 70 74 72 25  3d 30 0d 06 72 27 f2 6e  |messptr%=0..r'.n|
00000f50  6f 74 65 6d 65 73 73 61  67 65 28 26 35 30 32 29  |otemessage(&502)|
00000f60  3a f2 6e 6f 74 65 6d 65  73 73 61 67 65 28 31 30  |:.notemessage(10|
00000f70  29 0d 06 7c 13 f2 6e 6f  74 65 6d 65 73 73 61 67  |)..|..notemessag|
00000f80  65 28 30 29 0d 06 86 55  c8 99 20 22 57 69 6d 70  |e(0)...U.. "Wimp|
00000f90  5f 49 6e 69 74 69 61 6c  69 73 65 22 2c 33 31 30  |_Initialise",310|
00000fa0  2c 26 34 42 35 33 34 31  35 34 2c 41 70 70 6e 61  |,&4B534154,Appna|
00000fb0  6d 65 24 2c 6d 65 73 73  61 67 65 6c 69 73 74 25  |me$,messagelist%|
00000fc0  20 b8 20 77 69 6d 70 76  65 72 73 69 6f 6e 2c 74  | . wimpversion,t|
00000fd0  61 73 6b 68 61 6e 64 6c  65 0d 06 90 47 69 6e 64  |askhandle...Gind|
00000fe0  6c 25 3d 31 30 32 34 3a  6d 65 6e 75 6c 25 3d 31  |l%=1024:menul%=1|
00000ff0  30 32 34 3a de 20 62 25  20 32 30 34 38 2c 69 6e  |024:. b% 2048,in|
00001000  64 25 20 69 6e 64 6c 25  2c 6d 65 6e 75 25 20 6d  |d% indl%,menu% m|
00001010  65 6e 75 6c 25 2c 77 73  70 63 25 20 26 38 30 30  |enul%,wspc% &800|
00001020  0d 06 9a 0f 63 75 72 6d  65 6e 75 25 3d 2d 31 0d  |....curmenu%=-1.|
00001030  06 a4 11 f2 6f 70 65 6e  6d 65 73 73 61 67 65 73  |....openmessages|
00001040  0d 06 ae 30 f4 20 73 70  72 69 74 65 73 25 3d 46  |...0. sprites%=F|
00001050  4e 6c 6f 61 64 73 70 72  69 74 65 73 28 41 70 70  |Nloadsprites(App|
00001060  64 69 72 24 2b 22 2e 53  70 72 69 74 65 73 22 29  |dir$+".Sprites")|
00001070  0d 06 b8 24 69 6e 66 6f  62 6f 78 25 3d a4 6c 6f  |...$infobox%=.lo|
00001080  61 64 74 65 6d 70 6c 61  74 65 28 22 49 6e 66 6f  |adtemplate("Info|
00001090  22 2c 31 29 0d 06 c2 2a  63 6f 6e 6e 65 63 74 77  |",1)...*connectw|
000010a0  69 6e 25 3d a4 6c 6f 61  64 74 65 6d 70 6c 61 74  |in%=.loadtemplat|
000010b0  65 28 22 63 6f 6e 6e 65  63 74 22 2c 31 29 0d 06  |e("connect",1)..|
000010c0  cc 24 73 65 6e 64 77 69  6e 25 3d a4 6c 6f 61 64  |.$sendwin%=.load|
000010d0  74 65 6d 70 6c 61 74 65  28 22 73 65 6e 64 22 2c  |template("send",|
000010e0  31 29 0d 06 d6 26 6d 73  67 77 69 6e 25 3d a4 6c  |1)...&msgwin%=.l|
000010f0  6f 61 64 74 65 6d 70 6c  61 74 65 28 22 6d 65 73  |oadtemplate("mes|
00001100  73 61 67 65 22 2c 31 29  0d 06 e0 25 f2 73 65 74  |sage",1)...%.set|
00001110  69 63 6f 6e 74 65 78 74  28 69 6e 66 6f 62 6f 78  |icontext(infobox|
00001120  25 2c 31 2c 41 70 70 6e  61 6d 65 24 29 0d 06 ea  |%,1,Appname$)...|
00001130  35 f2 73 65 74 69 63 6f  6e 74 65 78 74 28 69 6e  |5.seticontext(in|
00001140  66 6f 62 6f 78 25 2c 32  2c 6c 6f 6e 67 6e 61 6d  |fobox%,2,longnam|
00001150  65 24 2b 22 20 28 70 6f  72 74 20 78 78 78 78 29  |e$+" (port xxxx)|
00001160  22 29 0d 06 f4 25 f2 73  65 74 69 63 6f 6e 74 65  |")...%.seticonte|
00001170  78 74 28 69 6e 66 6f 62  6f 78 25 2c 34 2c 76 65  |xt(infobox%,4,ve|
00001180  72 73 69 6f 6e 24 29 0d  06 fe 3a 69 62 68 61 6e  |rsion$)...:ibhan|
00001190  64 6c 65 3d a4 43 72 65  61 74 65 49 63 6f 6e 42  |dle=.CreateIconB|
000011a0  61 72 49 63 6f 6e 28 22  21 22 2b 41 70 70 6e 61  |arIcon("!"+Appna|
000011b0  6d 65 24 2c 73 68 6f 72  74 6e 61 6d 65 24 2c 31  |me$,shortname$,1|
000011c0  29 0d 07 08 41 69 62 6d  65 6e 75 25 3d a4 63 72  |)...Aibmenu%=.cr|
000011d0  65 61 74 65 6d 65 6e 75  28 41 70 70 6e 61 6d 65  |eatemenu(Appname|
000011e0  24 2b 22 7c 49 6e 66 6f  5d 3e 69 6e 66 6f 62 6f  |$+"|Info]>infobo|
000011f0  78 25 7c 53 69 74 65 73  2e 2e 2e 7c 51 75 69 74  |x%|Sites...|Quit|
00001200  22 29 0d 07 12 17 69 62  6f 70 74 69 6f 6e 73 25  |")....iboptions%|
00001210  3d 6f 70 74 69 6f 6e 73  25 0d 07 1c 05 e1 0d 07  |=options%.......|
00001220  26 05 3a 0d 07 30 0e dd  f2 69 6e 69 74 70 72 6f  |&.:..0...initpro|
00001230  67 0d 07 3a 29 f4 20 49  6e 69 74 69 61 6c 69 73  |g..:). Initialis|
00001240  65 20 74 68 65 20 6e 65  74 77 6f 72 6b 20 67 61  |e the network ga|
00001250  6d 65 20 6c 69 62 72 61  72 79 0d 07 44 29 70 6f  |me library..D)po|
00001260  72 74 3d a4 6e 65 74 67  61 6d 65 5f 69 6e 69 74  |rt=.netgame_init|
00001270  28 3f 3f 3f 29 3a f4 20  50 6f 72 74 20 6e 75 6d  |(???):. Port num|
00001280  62 65 72 0d 07 4e 24 f4  20 45 6e 73 75 72 65 20  |ber..N$. Ensure |
00001290  74 68 61 74 20 65 76 65  72 79 74 68 69 6e 67 20  |that everything |
000012a0  77 65 6e 74 20 6f 6b 0d  07 58 0f e7 20 70 6f 72  |went ok..X.. por|
000012b0  74 3d 2d 31 20 8c 0d 07  62 36 20 72 65 70 6c 79  |t=-1 ...b6 reply|
000012c0  3d a4 65 72 72 6f 72 62  6f 78 28 22 3e 4d 65 73  |=.errorbox(">Mes|
000012d0  73 61 67 65 22 2c 22 3e  43 6f 75 6c 64 6e 74 49  |sage",">CouldntI|
000012e0  6e 69 74 22 2c 25 31 30  30 30 31 29 0d 07 6c 18  |nit",%10001)..l.|
000012f0  20 c8 99 20 22 57 69 6d  70 5f 43 6c 6f 73 65 44  | .. "Wimp_CloseD|
00001300  6f 77 6e 22 0d 07 76 13  20 f2 63 6c 6f 73 65 6d  |own"..v. .closem|
00001310  65 73 73 61 67 65 73 0d  07 80 06 20 e0 0d 07 8a  |essages.... ....|
00001320  05 cc 0d 07 94 2c 20 f2  73 65 74 69 63 6f 6e 74  |....., .seticont|
00001330  65 78 74 28 69 6e 66 6f  62 6f 78 25 2c 32 2c 22  |ext(infobox%,2,"|
00001340  3e 49 6e 66 6f 3a 22 2b  c3 70 6f 72 74 29 0d 07  |>Info:"+.port)..|
00001350  9e 05 cd 0d 07 a8 31 f4  20 4d 61 72 6b 20 74 68  |......1. Mark th|
00001360  65 20 63 6f 72 72 65 63  74 20 73 69 74 65 20 69  |e correct site i|
00001370  6e 20 74 68 65 20 63 6f  6e 6e 65 63 74 20 77 69  |n the connect wi|
00001380  6e 64 6f 77 0d 07 b2 25  f2 73 65 74 69 63 6f 6e  |ndow...%.seticon|
00001390  74 65 78 74 28 63 6f 6e  6e 65 63 74 77 69 6e 25  |text(connectwin%|
000013a0  2c 33 2c c3 70 6f 72 74  29 0d 07 bc 22 f4 20 52  |,3,.port)...". R|
000013b0  65 61 64 20 74 68 65 20  73 69 74 65 73 20 66 72  |ead the sites fr|
000013c0  6f 6d 20 74 68 65 20 66  69 6c 65 0d 07 c6 16 f2  |om the file.....|
000013d0  6e 65 74 67 61 6d 65 5f  72 65 61 64 73 69 74 65  |netgame_readsite|
000013e0  73 0d 07 d0 05 e1 0d 07  da 05 3a 0d 07 e4 17 dd  |s.........:.....|
000013f0  f2 48 65 6c 70 28 77 69  6e 2c 69 63 6f 6e 2c 74  |.Help(win,icon,t|
00001400  6f 29 0d 07 ee 1f f7 20  2b 31 3a f2 72 65 61 64  |o)..... +1:.read|
00001410  68 65 6c 70 28 77 69 6e  2c 69 63 6f 6e 2c 74 6f  |help(win,icon,to|
00001420  29 0d 07 f8 05 e1 0d 08  02 0d f4 20 57 69 6e 64  |).......... Wind|
00001430  6f 77 73 0d 08 0c 1a dc  20 69 6e 66 6f 62 6f 78  |ows..... infobox|
00001440  25 2c 22 3e 48 49 6e 66  6f 62 6f 78 22 0d 08 16  |%,">HInfobox"...|
00001450  14 dc 20 33 2c 22 3e 48  49 6e 66 6f 62 6f 78 33  |.. 3,">HInfobox3|
00001460  22 0d 08 20 14 dc 20 34  2c 22 3e 48 49 6e 66 6f  |".. .. 4,">HInfo|
00001470  62 6f 78 34 22 0d 08 2a  1a dc 20 73 65 6e 64 77  |box4"..*.. sendw|
00001480  69 6e 25 2c 22 3e 48 53  65 6e 64 77 69 6e 22 0d  |in%,">HSendwin".|
00001490  08 34 13 dc 20 32 2c 22  3e 48 53 43 61 6e 63 65  |.4.. 2,">HSCance|
000014a0  6c 22 0d 08 3e 11 dc 20  33 2c 22 3e 48 53 53 65  |l"..>.. 3,">HSSe|
000014b0  6e 64 22 0d 08 48 18 dc  20 6d 73 67 77 69 6e 25  |nd"..H.. msgwin%|
000014c0  2c 22 3e 48 4d 73 67 77  69 6e 22 0d 08 52 11 dc  |,">HMsgwin"..R..|
000014d0  20 32 2c 22 3e 48 52 65  70 6c 79 22 0d 08 5c 0e  | 2,">HReply"..\.|
000014e0  dc 20 31 2c 22 3e 48 4f  6b 22 0d 08 66 20 dc 20  |. 1,">HOk"..f . |
000014f0  63 6f 6e 6e 65 63 74 77  69 6e 25 2c 22 3e 48 43  |connectwin%,">HC|
00001500  6f 6e 6e 65 63 74 77 69  6e 22 0d 08 70 0f dc 20  |onnectwin"..p.. |
00001510  34 2c 22 3e 48 43 4f 6b  22 0d 08 7a 14 dc 20 2d  |4,">HCOk"..z.. -|
00001520  32 2c 22 3e 48 49 63 6f  6e 62 61 72 22 0d 08 84  |2,">HIconbar"...|
00001530  0b dc 20 2d 31 2c 2d 31  0d 08 8e 0b f4 20 4d 65  |.. -1,-1..... Me|
00001540  6e 75 73 0d 08 98 11 dc  20 2d 32 2c 2d 32 2c 2d  |nus..... -2,-2,-|
00001550  32 2c 2d 32 0d 08 a2 05  3a 0d 08 ac 13 dd f2 46  |2,-2....:......F|
00001560  65 74 63 68 50 61 67 65  28 66 24 29 0d 08 b6 3c  |etchPage(f$)...<|
00001570  f4 20 58 55 52 49 5f 44  69 73 70 61 74 63 68 20  |. XURI_Dispatch |
00001580  2d 20 74 68 69 73 20 70  72 6f 74 6f 63 6f 6c 20  |- this protocol |
00001590  69 73 20 73 74 69 6c 6c  20 62 65 69 6e 67 20 64  |is still being d|
000015a0  65 63 69 64 65 64 20 21  0d 08 c0 18 c8 99 20 26  |ecided !...... &|
000015b0  36 45 33 38 31 2c 25 30  30 30 2c 66 24 2b bd 30  |6E381,%000,f$+.0|
000015c0  0d 08 ca 05 e1 0d 08 d4  05 3a 0d 08 de 3e f4 20  |.........:...>. |
000015d0  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
000015e0  2a 2a 2a 2a 20 4e 65 74  47 61 6d 65 20 72 6f 75  |**** NetGame rou|
000015f0  74 69 6e 65 73 20 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |tines **********|
00001600  2a 2a 2a 2a 2a 2a 2a 2a  0d 08 e8 05 3a 0d 08 f2  |********....:...|
00001610  2c f4 20 54 68 65 79 27  76 65 20 67 6f 6e 65 2c  |,. They've gone,|
00001620  20 73 6f 20 77 65 27 64  20 62 65 74 74 65 72 20  | so we'd better |
00001630  74 65 6c 6c 20 74 68 65  6d 0d 08 fc 18 dd f2 64  |tell them......d|
00001640  69 73 63 6f 6e 6e 65 63  74 65 64 28 74 79 70 65  |isconnected(type|
00001650  29 0d 09 06 0b ea 20 72  65 70 6c 79 0d 09 10 0d  |)..... reply....|
00001660  c8 8e 20 74 79 70 65 20  ca 0d 09 1a 34 20 c9 20  |.. type ....4 . |
00001670  6e 67 73 5f 64 65 61 64  3a f4 20 42 61 64 20 6c  |ngs_dead:. Bad l|
00001680  69 74 74 6c 65 20 62 6f  79 2c 20 64 72 6f 70 70  |ittle boy, dropp|
00001690  65 64 20 63 6f 6e 6e 65  63 74 69 6f 6e 0d 09 24  |ed connection..$|
000016a0  32 20 20 72 65 70 6c 79  3d a4 65 72 72 6f 72 62  |2  reply=.errorb|
000016b0  6f 78 28 22 3e 4d 65 73  73 61 67 65 22 2c 22 3e  |ox(">Message",">|
000016c0  43 6c 6f 73 65 64 22 2c  25 31 30 30 30 31 29 0d  |Closed",%10001).|
000016d0  09 2e 34 20 c9 20 6e 67  73 5f 67 6f 69 6e 67 3a  |..4 . ngs_going:|
000016e0  f4 20 4d 72 20 46 6c 69  62 62 6c 65 20 73 61 79  |. Mr Flibble say|
000016f0  73 20 27 47 61 6d 65 20  4f 76 65 72 27 2c 20 62  |s 'Game Over', b|
00001700  6f 79 73 0d 09 38 34 20  20 72 65 70 6c 79 3d a4  |oys..84  reply=.|
00001710  65 72 72 6f 72 62 6f 78  28 22 3e 4d 65 73 73 61  |errorbox(">Messa|
00001720  67 65 22 2c 22 3e 47 61  6d 65 4f 76 65 72 22 2c  |ge",">GameOver",|
00001730  25 31 30 30 30 31 29 0d  09 42 2d 20 c9 20 6e 67  |%10001)..B- . ng|
00001740  73 5f 66 61 69 6c 65 64  3a f4 20 43 6f 75 6c 64  |s_failed:. Could|
00001750  6e 27 74 20 67 65 74 20  61 20 63 6f 6e 6e 65 63  |n't get a connec|
00001760  74 69 6f 6e 0d 09 4c 35  20 20 72 65 70 6c 79 3d  |tion..L5  reply=|
00001770  a4 65 72 72 6f 72 62 6f  78 28 22 3e 4d 65 73 73  |.errorbox(">Mess|
00001780  61 67 65 22 2c 22 3e 4e  6f 43 6f 6e 6e 65 63 74  |age",">NoConnect|
00001790  22 2c 25 31 30 30 30 31  29 0d 09 56 12 20 20 f2  |",%10001)..V.  .|
000017a0  6f 70 65 6e 63 6f 6e 6e  65 63 74 0d 09 60 05 cb  |openconnect..`..|
000017b0  0d 09 6a 05 e1 0d 09 74  05 3a 0d 09 7e 1c f4 20  |..j....t.:..~.. |
000017c0  57 65 27 76 65 20 67 6f  74 20 61 20 63 6f 6e 6e  |We've got a conn|
000017d0  65 63 74 69 6f 6e 0d 09  88 32 f4 20 74 79 70 65  |ection...2. type|
000017e0  20 3d 20 6e 67 73 5f 6f  72 69 67 69 6e 61 74 65  | = ngs_originate|
000017f0  20 69 66 20 77 65 20 63  6f 6e 6e 65 63 74 65 64  | if we connected|
00001800  20 74 6f 20 74 68 65 6d  0d 09 92 2f f4 20 20 20  | to them.../.   |
00001810  20 20 20 20 20 6e 67 73  5f 61 6e 73 77 65 72 20  |     ngs_answer |
00001820  69 66 20 74 68 65 79 20  63 6f 6e 6e 65 63 74 65  |if they connecte|
00001830  64 20 74 6f 20 75 73 0d  09 9c 1b dd f2 63 6f 6e  |d to us......con|
00001840  6e 65 63 74 65 64 28 68  6f 73 74 24 2c 74 79 70  |nected(host$,typ|
00001850  65 29 0d 09 a6 35 f2 63  6c 6f 73 65 77 69 6e 28  |e)...5.closewin(|
00001860  63 6f 6e 6e 65 63 74 77  69 6e 25 29 3a f4 20 43  |connectwin%):. C|
00001870  6c 6f 73 65 20 74 68 65  20 63 6f 6e 6e 65 63 74  |lose the connect|
00001880  20 77 69 6e 64 6f 77 0d  09 b0 2a f4 20 57 65 20  | window...*. We |
00001890  73 68 6f 75 6c 64 20 6f  70 65 6e 20 61 20 77 69  |should open a wi|
000018a0  6e 64 6f 77 20 6f 72 20  73 6f 6d 65 74 68 69 6e  |ndow or somethin|
000018b0  67 0d 09 ba 05 e1 0d 09  c4 05 3a 0d 09 ce 3e f4  |g.........:...>.|
000018c0  20 4d 65 73 73 61 67 65  20 68 61 73 20 61 72 72  | Message has arr|
000018d0  69 76 65 64 20 66 72 6f  6d 20 74 68 65 6d 20 2d  |ived from them -|
000018e0  20 74 72 79 20 6e 6f 74  20 74 6f 20 63 72 65 61  | try not to crea|
000018f0  74 65 20 61 20 6c 6f 6f  70 0d 09 d8 21 f4 20 27  |te a loop...!. '|
00001900  63 6f 73 20 74 68 61 74  20 69 73 20 6b 69 6e 64  |cos that is kind|
00001910  61 20 73 69 6c 6c 79 2e  2e 2e 0d 09 e2 14 dd f2  |a silly.........|
00001920  69 6e 63 6f 6d 69 6e 67  28 6d 73 67 24 29 0d 09  |incoming(msg$)..|
00001930  ec 43 f4 20 49 66 20 69  74 27 73 20 61 20 75 73  |.C. If it's a us|
00001940  65 72 20 6d 65 73 73 61  67 65 20 77 65 20 73 68  |er message we sh|
00001950  6f 75 6c 64 20 70 75 74  20 69 74 20 69 6e 20 74  |ould put it in t|
00001960  68 65 20 6d 65 73 73 61  67 65 20 77 69 6e 64 6f  |he message windo|
00001970  77 0d 09 f6 41 f4 20 77  69 74 68 20 50 52 4f 43  |w...A. with PROC|
00001980  67 6f 74 6d 65 73 73 61  67 65 28 6d 73 67 24 29  |gotmessage(msg$)|
00001990  2c 20 6f 74 68 65 72 77  69 73 65 20 69 74 27 73  |, otherwise it's|
000019a0  20 61 20 27 67 6f 27 20  73 6f 20 77 65 20 6e 65  | a 'go' so we ne|
000019b0  65 64 0d 0a 00 13 f4 20  74 6f 20 70 72 6f 63 65  |ed..... to proce|
000019c0  73 73 20 69 74 0d 0a 0a  05 e1 0d 0a 14 05 3a 0d  |ss it.........:.|
000019d0  0a 1e 42 f4 20 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |..B. ***********|
000019e0  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 20 4f 74 68 65  |*********** Othe|
000019f0  72 20 72 6f 75 74 69 6e  65 73 20 2a 2a 2a 2a 2a  |r routines *****|
00001a00  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
00001a10  2a 0d 0a 28 05 3a 0d 0a  32 3d f4 20 41 74 74 65  |*..(.:..2=. Atte|
00001a20  6d 70 74 20 61 20 63 6f  6e 6e 65 63 74 69 6f 6e  |mpt a connection|
00001a30  20 75 73 69 6e 67 20 74  68 65 20 27 63 6f 6e 6e  | using the 'conn|
00001a40  65 63 74 27 20 77 69 6e  64 6f 77 20 61 73 20 68  |ect' window as h|
00001a50  6f 73 74 0d 0a 3c 10 dd  f2 74 72 79 63 6f 6e 6e  |ost..<...tryconn|
00001a60  65 63 74 0d 0a 46 10 ea  20 68 6f 73 74 24 2c 70  |ect..F.. host$,p|
00001a70  6f 72 74 0d 0a 50 35 68  6f 73 74 24 3d a4 67 65  |ort..P5host$=.ge|
00001a80  74 69 63 6f 6e 74 65 78  74 28 63 6f 6e 6e 65 63  |ticontext(connec|
00001a90  74 77 69 6e 25 2c 31 29  3a f4 20 52 65 61 64 20  |twin%,1):. Read |
00001aa0  74 68 65 20 68 6f 73 74  0d 0a 5a 11 e7 20 68 6f  |the host..Z.. ho|
00001ab0  73 74 24 3d 22 22 20 8c  e1 0d 0a 64 1d f4 20 52  |st$="" ....d.. R|
00001ac0  65 61 64 20 74 68 65 20  73 65 72 76 69 63 65 20  |ead the service |
00001ad0  6e 75 6d 62 65 72 0d 0a  6e 3f 70 6f 72 74 3d a4  |number..n?port=.|
00001ae0  69 6e 65 74 5f 67 65 74  73 65 72 76 62 79 6e 61  |inet_getservbyna|
00001af0  6d 65 28 a4 67 65 74 69  63 6f 6e 74 65 78 74 28  |me(.geticontext(|
00001b00  63 6f 6e 6e 65 63 74 77  69 6e 25 2c 33 29 2c 22  |connectwin%,3),"|
00001b10  74 63 70 22 29 0d 0a 78  1b f4 20 4e 6f 77 20 64  |tcp")..x.. Now d|
00001b20  6f 20 74 68 65 20 63 6f  6e 6e 65 63 74 69 6f 6e  |o the connection|
00001b30  0d 0a 82 23 6f 6b 3d a4  6e 65 74 67 61 6d 65 5f  |...#ok=.netgame_|
00001b40  63 6f 6e 6e 65 63 74 28  68 6f 73 74 24 2c 70 6f  |connect(host$,po|
00001b50  72 74 29 0d 0a 8c 0c e7  20 ac 20 6f 6b 20 8c 0d  |rt)..... . ok ..|
00001b60  0a 96 27 20 f4 20 57 65  20 63 6f 75 6c 64 6e 27  |..' . We couldn'|
00001b70  74 20 63 6f 6e 6e 65 63  74 20 73 6f 20 74 65 6c  |t connect so tel|
00001b80  6c 20 74 68 65 6d 0d 0a  a0 34 20 72 65 70 6c 79  |l them...4 reply|
00001b90  3d a4 65 72 72 6f 72 62  6f 78 28 22 3e 4d 65 73  |=.errorbox(">Mes|
00001ba0  73 61 67 65 22 2c 22 3e  4e 6f 43 6f 6e 6e 65 63  |sage",">NoConnec|
00001bb0  74 22 2c 25 31 30 30 30  31 29 0d 0a aa 05 cc 0d  |t",%10001)......|
00001bc0  0a b4 1b 20 f2 63 6c 6f  73 65 77 69 6e 28 63 6f  |... .closewin(co|
00001bd0  6e 6e 65 63 74 77 69 6e  25 29 0d 0a be 05 cd 0d  |nnectwin%)......|
00001be0  0a c8 05 e1 0d 0a d2 05  3a 0d 0a dc 42 f4 20 57  |........:...B. W|
00001bf0  65 27 76 65 20 67 6f 74  20 61 20 6d 65 73 73 61  |e've got a messa|
00001c00  67 65 20 66 72 6f 6d 20  74 68 65 6d 20 73 6f 20  |ge from them so |
00001c10  6c 65 74 73 20 73 74 69  63 6b 20 69 74 20 6f 6e  |lets stick it on|
00001c20  20 74 68 65 20 73 63 72  65 65 6e 0d 0a e6 16 dd  | the screen.....|
00001c30  f2 67 6f 74 6d 65 73 73  61 67 65 28 6d 73 67 24  |.gotmessage(msg$|
00001c40  29 0d 0a f0 3a f2 73 65  74 69 63 6f 6e 74 65 78  |)...:.seticontex|
00001c50  74 28 6d 73 67 77 69 6e  25 2c 30 2c c0 6d 73 67  |t(msgwin%,0,.msg|
00001c60  24 2c 33 39 29 29 3a f4  20 46 69 74 20 69 74 20  |$,39)):. Fit it |
00001c70  74 6f 20 74 68 65 20 69  63 6f 6e 0d 0a fa 27 f2  |to the icon...'.|
00001c80  6f 70 65 6e 77 69 6e 28  6d 73 67 77 69 6e 25 29  |openwin(msgwin%)|
00001c90  3a f4 20 4f 70 65 6e 20  74 68 65 20 77 69 6e 64  |:. Open the wind|
00001ca0  6f 77 0d 0b 04 05 e1 0d  0b 0e 05 3a 0d 0b 18 2b  |ow.........:...+|
00001cb0  f4 20 53 65 6e 64 20 74  68 65 20 6d 65 73 73 61  |. Send the messa|
00001cc0  67 65 20 69 6e 20 74 68  65 20 27 73 65 6e 64 27  |ge in the 'send'|
00001cd0  20 77 69 6e 64 6f 77 0d  0b 22 11 dd f2 73 65 6e  | window.."...sen|
00001ce0  64 6d 65 73 73 61 67 65  0d 0b 2c 24 ea 20 61 24  |dmessage..,$. a$|
00001cf0  3a 61 24 3d a4 67 65 74  69 63 6f 6e 74 65 78 74  |:a$=.geticontext|
00001d00  28 73 65 6e 64 77 69 6e  25 2c 30 29 0d 0b 36 16  |(sendwin%,0)..6.|
00001d10  f4 20 53 65 6e 64 20 74  68 65 20 6d 65 73 73 61  |. Send the messa|
00001d20  67 65 0d 0b 40 26 f4 20  59 6f 75 20 6e 65 65 64  |ge..@&. You need|
00001d30  20 74 6f 20 70 75 74 20  73 6f 6d 65 20 63 6f 64  | to put some cod|
00001d40  65 20 68 65 72 65 20 3a  0d 0b 4a 1f f4 20 6c 69  |e here :..J.. li|
00001d50  6b 65 20 50 52 4f 43 6e  65 74 67 61 6d 65 5f 73  |ke PROCnetgame_s|
00001d60  65 6e 64 28 61 24 29 0d  0b 54 29 f4 20 43 6c 65  |end(a$)..T). Cle|
00001d70  61 72 20 74 68 65 20 74  65 78 74 20 61 6e 64 20  |ar the text and |
00001d80  63 6c 6f 73 65 20 74 68  65 20 77 69 6e 64 6f 77  |close the window|
00001d90  0d 0b 5e 1f f2 73 65 74  69 63 6f 6e 74 65 78 74  |..^..seticontext|
00001da0  28 73 65 6e 64 77 69 6e  25 2c 30 2c 22 22 29 0d  |(sendwin%,0,"").|
00001db0  0b 68 17 f2 63 6c 6f 73  65 77 69 6e 28 73 65 6e  |.h..closewin(sen|
00001dc0  64 77 69 6e 25 29 0d 0b  72 05 e1 0d 0b 7c 05 3a  |dwin%)..r....|.:|
00001dd0  0d 0b 86 1f f4 20 4f 70  65 6e 20 74 68 65 20 27  |..... Open the '|
00001de0  63 6f 6e 6e 65 63 74 27  20 77 69 6e 64 6f 77 0d  |connect' window.|
00001df0  0b 90 11 dd f2 6f 70 65  6e 63 6f 6e 6e 65 63 74  |.....openconnect|
00001e00  0d 0b 9a 1f f2 6f 70 65  6e 77 69 6e 63 65 6e 74  |.....openwincent|
00001e10  72 65 28 63 6f 6e 6e 65  63 74 77 69 6e 25 29 0d  |re(connectwin%).|
00001e20  0b a4 1f f2 73 65 74 63  61 72 65 74 65 6e 64 28  |....setcaretend(|
00001e30  63 6f 6e 6e 65 63 74 77  69 6e 25 2c 31 29 0d 0b  |connectwin%,1)..|
00001e40  ae 05 e1 0d 0b b8 05 3a  0d 0b c2 1d f4 20 4f 70  |.......:..... Op|
00001e50  65 6e 20 74 68 65 20 27  72 65 70 6c 79 27 20 77  |en the 'reply' w|
00001e60  69 6e 64 6f 77 0d 0b cc  0f dd f2 6f 70 65 6e 72  |indow......openr|
00001e70  65 70 6c 79 0d 0b d6 16  f2 63 6c 6f 73 65 77 69  |eply.....closewi|
00001e80  6e 28 6d 73 67 77 69 6e  25 29 0d 0b e0 16 f2 6f  |n(msgwin%).....o|
00001e90  70 65 6e 77 69 6e 28 73  65 6e 64 77 69 6e 25 29  |penwin(sendwin%)|
00001ea0  0d 0b ea 1c f2 73 65 74  63 61 72 65 74 65 6e 64  |.....setcaretend|
00001eb0  28 73 65 6e 64 77 69 6e  25 2c 30 29 0d 0b f4 05  |(sendwin%,0)....|
00001ec0  e1 0d ff                                          |...|
00001ec3