Home » Archimedes archive » Acorn User » AU 1996-12 B.adf » Features » PCA/!Spaint/!Runimage
PCA/!Spaint/!Runimage
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
| Tape/disk: | Home » Archimedes archive » Acorn User » AU 1996-12 B.adf » Features |
| Filename: | PCA/!Spaint/!Runimage |
| Read OK: | ✔ |
| File size: | D6C3 bytes |
| Load address: | 0000 |
| Exec address: | 0000 |
File contents
1REM >!RunImage
2REM
3REM SPaint 0.04
4REM
5REM LEN Rob Davison 1996
6REM Updated sometime...
7REM
8REM Code sections relating to the PCA are commented !!!PCA!!!
9REM not particularly easy to follow still...Sorry!
10REM Now use PCA 'tags' and the PCASupport Module
11REM
12ONERROR ERROR EXT 1,REPORT$+" "+STR$ERL:QUIT
13
14PROCinit_variables
15PROCinitall:PROCassemble_blit:PROCinit_Wimp
16
17ONERROR PROCreperr(REPORT$+"at code "+STR$ERL)
18
19PROCpoll:PROCterminate
20END
21
22REM called on desktop mode change and when new object linked in.
23REM creates colour translation tables for display of sprites.
24DEFPROCinitsptrans
25SYS XCtGet%,sblock%,"grad",-1,-1,sgblkg%,0
26REM !!!PCA!!!
27REM update displayEVALtranslation settings on mode changes/new objects
28IF remotetag%>0 THEN
29SYS "XWimp_ReadPixTrans",&200,!remotetag%,!remotetag%+remotetag%!4,,,,stransW%,sgblk%
30SYS XCtGet%,!remotetag%,!remotetag%+remotetag%!4,-1,-1,sgblk%,1
31stransWx=stransW%!8/!stransW%:stransWy=stransW%!12/stransW%!4
32SYS Spop%,552,!remotetag%,!remotetag%+remotetag%!4 TO ,,,xwhook%,ywhook%
33ENDIF
34IFspria%>0 THEN
35REM reference via the tag is not strictly necessary here as it is a local
36REM object - but just for forms sake...
37SYS "XWimp_ReadPixTrans",&200,!localtag%,!localtag%+localtag%!4,,,,stransW%,sgblkB%
38SYS XCtGet%,!localtag%,!localtag%+localtag%!4,-1,-1,sgblkB%,1
39ENDIF
40SYS"OS_ReadModeVariable",-1,3 TO ,,nocol%
41SYS&35,-1,11 TO ,,sw%:SYS&35,-1,12 TO ,,sh%
42SYS&35,-1,4 TO ,,xpix%:SYS&35,-1,5 TO ,,ypix%
43xpixf=xpix%:ypixf=ypix%
44xpix%=1<<xpix%:ypix%=1<<ypix%
45sw%=xpix%*(sw%+1):sh%=ypix%*(sh%+1)
46ENDPROC
47
48REM redraw the 'remote' (linked) sprites window.
49DEFPROCrdremote(f%)
50IFf% THEN SYS Wupdw%,,Wb% TO more% ELSESYSWrdw%,,Wb% TO more%
51x0%=Wb%!4-Wb%!20:y0%=Wb%!16-Wb%!24
52WHILE more%
53wx0%=Wb%!28:wy0%=Wb%!32:wx1%=Wb%!36:wy1%=Wb%!40
54IFremotetag%>0 THEN
55SYS XSpop%,564,!remotetag%,!remotetag%+remotetag%!4,x0%,y0%,0,stransW%,sgblk%
56ELSE
57PROCsc(0,0,0):RECTANGLE FILL x0%,y0%,xwhook%*2,ywhook%*2
58ENDIF
59SYS Wgr%,0,Wb% TO more%
60ENDWHILE
61ENDPROC
62
63REM redraw the 'local' sprites window.
64DEFPROCrdlocal(f%)
65IFf% THEN SYS Wupdw%,,Wb% TO more% ELSESYSWrdw%,,Wb% TO more%
66x0%=Wb%!4-Wb%!20:y0%=Wb%!16-Wb%!24
67WHILE more%
68wx0%=Wb%!28:wy0%=Wb%!32:wx1%=Wb%!36:wy1%=Wb%!40
69IFlocaltag%>0 THEN
70SYS XSpop%,564,!localtag%,!localtag%+localtag%!4,x0%,y0%,0,stransW%,sgblkB%
71ELSE
72PROCsc(0,0,0):RECTANGLE FILL x0%,y0%,xwL%*2,ywL%*2
73ENDIF
74SYS Wgr%,0,Wb% TO more%
75ENDWHILE
76ENDPROC
77
78REM find the width of a text string in the current desktop font.
79DEFFNtwid(s$)
80SYS"XOS_SWINumberFromString",,"Wimp_TextOp" TO ;F:IF (F AND1)=0 THEN
81SYS"XWimp_TextOp",1,s$,0 TO v%
82ELSE
83v%=LEN(s$)*16
84ENDIF
85=v%
86
87REM print some text in the current desktop font.
88DEFPROCpp(x%,y%,tt$,bg%)
89SYS "XWimp_TextOp",0,0,bg%
90SYS"XWimp_TextOp",2+(1<<30),tt$,-1,-1,x%,y%
91ENDPROC
92
93REM work out the width of a PCA dialogue item.
94REM uses fixed values for all but the width of the item name which can vary.
95DEFFNuwid(s$,xx%)
96v%=FNtwid(s$)
97IF xx%<>0 THEN
98ENDIF
99=v%+32+40+64+84
100
101REM !!!PCA!!!
102REM redraw pca dialogue box window.
103REM chosen%,down% are for when an item is chosen
104REM in order to simulate the button 'clicking'
105
106DEFPROCrdpca(f%,chosen%,down%)
107IF f% THEN SYS Wupdw%,,Wb% TO more% ELSESYS Wrdw%,,Wb% TO more%
108xscrol%=Wb%!20:yscrol%=Wb%!24:x0%=Wb%!4-xscrol%+4:y1%=Wb%!8:x1%=Wb%!12:y0%=Wb%!16-yscrol%
109SYS "Wimp_BaseOfSprites" TO ,spa%
110WHILE more%
111menu$=RIGHT$(util$,LEN(util$)-INSTR(util$,"\"))
112p%=0:yy%=y0%+4
113FOR pca%=0 TO utile%-1
114s$=FNpar("\",p%)
115IFchosen%=pca% AND down% THEN PROCsc(&99,&99,&BB) ELSE PROCsc(&AA,&AA,&CC)
116RECTANGLE FILL x0%,yy%+pca%*(uboxh%+8),uboxw%,uboxh%
117A%=x0%:B%=yy%+pca%*(uboxh%+8):C%=A%+uboxw%:D%=B%+uboxh%:CALLbdr%
118IFchosen%=pca% AND down% A%+=4:B%-=4
119
120REM display the sprite for this item.
121IF utils$(pca%)<>"" THEN
122SYS XCtGet%,spa%,utils$(pca%),-1,-1,savea%,0
123SYS XSpop%,308,spa%,utils$(pca%),A%+12,B%+(uboxh%-68)/2,8,stransW%,savea%
124ENDIF
125
126REM display 'sm!info' if info available flag for this item is set.
127SYS "XWimp_ReadPixTrans",&100,sblock%,"sm!info",,,,stransW%,savea%
128IF (uf%(pca%) AND %10)<>0 THEN SYS XSpop%,308,sblock%,"sm!info",A%+uboxw%-48,B%+(uboxh%-40)/2,8,stransW%,savea%
129
130REM display the items name.
131IF chosen%=pca% AND down% THEN PROCpp(A%+((uboxw%-FNtwid(s$))/2),B%+uboxh%/2-12,s$,&BB999900) ELSE PROCpp(A%+((uboxw%-FNtwid(s$))/2),B%+uboxh%/2-12,s$,&CCAAAA00)
132NEXT
133SYS Wgr%,0,Wb% TO more%
134ENDWHILE
135ENDPROC
136
137REM main redraw request proc.
138DEFPROCredraw(f%)
139w%=!Wb%
140CASEw% OF
141WHEN m_remote%:PROCrdremote(f%)
142WHEN m_local%:PROCrdlocal(f%)
143WHEN pca_w%:PROCrdpca(f%,-1,0)
144ENDCASE
145ENDPROC
146
147REM Wimp Message receipt.
148
149DEFPROCrecieve_msg:FORl%=0TO !Wb% STEP4:Wbtsk%!l%=Wb%!l%:NEXT:le%=!Wb%:tsk%=Wb%!4
150msg$=FNs(Wb%+44):mess%=Wb%!16
151CASE mess% OF
152WHEN0:PROCterminate
153WHEN 2:EX%=FALSE:IF Wb%!4<>Task_h% THEN
154IF savingfile% THEN mox%=Wb%!28:moy%=Wb%!32:PROCsavefile(FNs(Wb%+44),Wb%!36=-1):savingfile%=FALSE
155IF EX%=FALSE THEN Wbtsk%!12=Wbtsk%!8:Wbtsk%!16=3:SYS"Wimp_SendMessage",17,Wbtsk%,tsk% ELSE EX%=FALSE
156ENDIF
157WHEN3
158EX%=0
159IF Wb%!40<&1000 THEN PROCread_andload(FNs(Wb%+44),Wb%!40,Wb%!20,Wb%!24)
160IF EX%=FALSE AND Wb%!12=scrapref% THEN *REMOVE <Wimp$Scrap>
161IF EX%=FALSE Wbtsk%!12=Wbtsk%!8:Wbtsk%!16=4:SYS"Wimp_SendMessage",17,Wbtsk%,tsk%
162WHEN9
163
164REM !!!PCA!!! Incoming message handling
165
166REM Receipt of Msg_ImHere - record details
167WHEN Msg_Im%
168IF utile%<24 THEN
169util$=util$+"\"+FNs(Wb%+28):utiltsk%(utile%)=tsk%:uf%(utile%)=Wb%!20
170REM IFuf%(utile%) AND %10000<>0 THEN uf%(utile%)=uf%(utile%) AND &FFFFFFEF
171IF Wb%!20 AND 1<>0 THEN utils$(utile%)=FNs(Wb%+60)
172utilid%(utile%)=Wb%!24
173v%=FNuwid(FNs(Wb%+28),Wb%!20)
174IFuboxw%<v% uboxw%=v%
175utile%+=1
176ENDIF
177
178WHEN Msg_Info%:IFtsk%<>Task_h% AND Wbtsk%!12=0 THEN
179REM Receipt of Message_Info - return an info string.
180s$="Spaint - a very simple paint program. "
181IFremotetag%>0 THEN s$=s$+"Linked to '"+wn$+"'" ELSE s$=s$+"Not linked to anything."
182PROCstring0(Wbtsk%+20,s$):!Wbtsk%=24+LEN(FNs(Wbtsk%+20)) AND NOT3
183Wbtsk%!12=Wbtsk%!8
184SYS Wmess%,17,Wbtsk%,tsk%
185ELSE
186REM return of Message_Info - display info string (if any)
187IF Wb%!12=myref% THEN
188IFFNs(Wb%+20)<>"" THEN PROCrepmsg(FNs(Wb%+20))
189ENDIF
190ENDIF
191
192REM Receipt of Message_WhosAbout - check details of object and respond with ImHere
193WHEN Msg_Whos%
194IF (Wb%!20 AND &FFF)=&FF9 AND tsk%<>Task_h% THEN
195REM v%=Wb%!24:v%=(!v%+v%!4)!40)>>27:IFv%=6 THEN:REM only 32bpp sprites need apply?
196gb%!4=Task_h%:gb%!8=0:gb%!12=0:gb%!16=Msg_Im%
197IF inplace% THEN gb%!20=%10011 ELSE gb%!20=%11:REM flags word
198gb%!24=0:PROCstring0(gb%+28,"Simple Paint")
199PROCstring0(gb%+60,"!spaint"):!gb%=64+(LEN(FNs(gb%+60)) AND NOT3)
200SYS Wmess%,17,gb%,tsk%
201REM ENDIF
202ENDIF
203
204REM Following not used by this example. This message is
205REM returned after the owning task has successfully changed the size of the
206REM object in response to Message_Resize sent. Check myref before acting
207REM as it may be a resize request by another program.
208WHEN Msg_ResizeAck%
209IFWb%!12=myref% THEN
210PROCdotheresize:myref%=0
211ENDIF
212
213REM Receipt of Message_DoYourStuff
214REM open remote window and display the object.
215WHEN Msg_Do%
216tsk%=Wb%!4
217REM are we already editing something?
218REM if so (and its not this tag), send the old local task an unhook...
219IF remotetag%>0 AND remotetag%<>Wb%!24 THEN tskh%=localtask%:ms0%=0:ms1%=remotetag%:PROCpca(Msg_Unhook%)
220
221REM new local task...
222localtask%=Wb%!4
223uflg%=Wb%!36
224REM beginning an inplace session so close the remote window (if open).
225IF (uflg% AND %10000)<>0 AND inplace% THEN PROCCwT(m_remote%)
226PROCnewmunge
227
228REM inplace on so opentoolbar and send Msg_Hook (which will generate msg_ObjPos for us)
229IF (uflg% AND %10000)<>0 AND remotetag%>0 AND inplace% THEN tskh%=localtask%:PROCpca(Msg_Hook%):PROCOw(w_remotet%,-1,-1,-1)
230
231REM object position message.
232REM open toolbar at correct position and depth
233WHEN Msg_ObjPos%
234
235IF Wb%!24=remotetag% THEN
236remotescale%=Wb%!48:remotexpos%=Wb%!52:remoteypos%=Wb%!56
237remotescaley%=Wb%!28:IFremotescaley%=0 remotescaley%=remotescale%
238xown%=Wb%!32:yown%=Wb%!36
239!gblk%=w_remotet%:gblk%!4=Wb%!32:gblk%!8=Wb%!36-64:gblk%!12=gblk%!4+192:gblk%!16=gblk%!8+64:gblk%!20=0:gblk%!24=0:gblk%!28=Wb%!44:SYS Wow%,,gblk%
240ENDIF
241
242REM sent an unhook message.
243REM as Spaint can handle both sides of the protocol it
244REM must check to see if it is the remote or local task which is asking it
245REM to unhook.
246WHEN Msg_Unhook%
247REM remote task - therefore we are the local so delete trap icon.
248
249IFWb%!24=localtag% AND tsk%=remotetask% THEN PROCdeleteRicon(0):aremote%=-1:remotetask%=0
250REM local task - therefore we are the remote so close window/toolbar
251IF Wb%!24=remotetag% AND tsk%=localtask% THEN remotetag%=-1:PROCCw(m_remote%):PROCCw(w_remotet%):localtask%=0
252
253REM sent a hook message by a remote task
254REM create a trap icon and send Msg_ObjPos
255WHEN Msg_Hook%
256IF Wb%!24=localtag% THEN
257remotewin%=Wb%!32:remotetask%=Wb%!4:aremote%=0:rbut%=Wb%!28
258remoteicon%=FNcreateRicon(0,0,xwL%*2,ywL%*2,rbut%)
259PROCgwi(m_local%):y1a%=y1%-yscrol%:yscrola%=yscrol%:xscrola%=xscrol%
260xposU%=winx%:yposU%=y1a%
261xposL%=xposU%:yposL%=yposU%
262IFxposL%<x0% THEN xposL%=x0%
263IFyposL%<y0% THEN yposL%=y0%
264IFxposL%>x1% THEN xposL%=x1%
265IFyposL%>y1% THEN yposL%=y1%
266sfac%=65536:REM 100% scale
267ms2%=m_local%:ms3%=w_localt%:v%=s%:tskh%=remotetask%:PROCpca(Msg_ObjPos%)
268ENDIF
269
270REM Message_Changed message
271REM assume nothing is the same!
272WHEN Msg_Changed%
273IF Wb%!24=remotetag% THEN PROCnewmunge
274IFWb%!24=localtag% AND tsk%<>Task_h% THEN PROCprime_local(local$):PROCredrawit(m_local%)
275
276REM Message_Deselect - delink from object as it has been deleted.
277WHEN Msg_Desel%
278IFWb%!24=localtag% THEN IF aremote%>=0 PROCdeleteRicon(0):aremote%=-1
279IFWb%!24=remotetag% THEN
280remotetag%=0:localtask%=0
281wn$="Nothing":$maint%="Nothing"
282IF maino% THEN PROCredrawit(m_remote%) ELSE PROCCw(w_remotet%)
283ENDIF
284
285REM Message_Done% someone has modified the entire object
286REM so redraw it. Its size and other parameters are still the same though.
287WHEN Msg_Done%
288IFremotetag%=Wb%!24 THEN
289PROCredrawit(m_remote%)
290ENDIF
291IFWb%!24=localtag% THEN
292PROCredrawit(m_local%)
293ENDIF
294
295REM Message_UpdateArea - an area of the object has been modified
296REM update the correct area of the window quickly.
297WHEN Msg_Uparea%
298IFremotetag%=Wb%!24 THEN
299ms0%=Wb%!28:ms1%=Wb%!32:ms2%=Wb%!36-ms0%:ms3%=Wb%!40-ms1%
300spritexm%=4:spriteym%=4
301PROCredrawW(m_remote%,ms0%,ms1%,ms2%,ms3%)
302ENDIF
303IFlocaltag%=Wb%!24 THEN
304ms0%=Wb%!28:ms1%=Wb%!32:ms2%=Wb%!36-ms0%:ms3%=Wb%!40-ms1%
305spritexm%=4:spriteym%=4
306PROCredrawW(m_local%,ms0%,ms1%,ms2%,ms3%)
307ENDIF
308
309REM Example return from Message_MiscOp (Compo_GiveDetails)
310REM not used by this program.
311WHEN Msg_Misc%:IFtsk%<>Task_h% THEN
312CASE Wb%!20 OF
313WHEN Sub_Associated%
314VDU4,30
315PRINT '"Details of object "
316PRINT '"Masks:"
317FORxx%=0 TO 4:PRINT xx%;" address="~Wb%!(40+xx%*4):NEXT
318PRINT '"Opacity=";Wb%!68
319PRINT "Math=";Wb%!72
320ENDCASE
321ENDIF
322
323WHEN&400C1:PROCinitsptrans
324WHEN&400C0:SYS"Wimp_CreateSubMenu",,Wb%!20,Wb%!24,Wb%!28
325WHEN&502:PROChelptext
326WHEN &47700,&47701:vh%=Wb%!20:v2%=Wb%!28:IF mess%=&47700 THEN oFCOL1%=v2%
327IF (Wb%!24 AND 1)=1 THEN v2%=-1
328MOUSE mx%,my%,bt%:IF(bt%=5 OR mess%=&47700) THEN
329REM ColourChanged
330pcol%=v2%:oFCOL1%=pcol%
331ENDIF
332mess%=-1
333WHEN&47702:vh%=Wb%!20:v2%=Wb%!28
334MOUSE mx%,my%,b%
335pcol%=oFCOL1%
336IF b%<>1 THEN SYS&67703,0,Wb%!20:lcpw%=0
337ENDCASE
338ENDPROC
339
340REM !!!PCA!!!
341REM new or radically modified remote object so re-read its details (width and height may have changed etc.)
342DEFPROCnewmunge
343IF Wb%!20<>&FF9 THEN
344REM woops, we can't edit that...
345IF remotetag%>0 THEN tskh%=localtask%:ms0%=0:ms1%=remotetag%:PROCpca(Msg_Unhook%)
346remotetag%=-1:wn$="Nothing":PROCCw(m_remote%):ENDPROC
347ELSE
348remotetag%=Wb%!24
349IFmess%=Msg_Do% THEN wn$=FNs(Wb%+40):IFwn$="" THEN wn$="<The image with no name>"
350IFmess%=Msg_Changed% THEN w$=FNs(Wb%+32):IFw$<>"" THEN wn$=w$
351PROCinitsptrans
352SYS Spop%,552,!remotetag%,!remotetag%+remotetag%!4 TO ,,,xwhook%,ywhook%
353IF (uflg% AND %10000)=0 OR inplace%=0 THEN
354PROCprime_remote:PROCOw(m_remote%,-1,-1,-1)
355ENDIF
356ENDIF
357ENDPROC
358
359REM !!!PCA!!!
360REM new/updated local image
361REM broadcast Message_Changed
362REM alternative would be to broadcast Message_Deselect for old object.
363REM in this case we ask anyone who was linked into the old object
364REM to accept the new one. This may fail (eg new object is different type/bpp)
365REM in which case the app receiving Message_Changed should delink quietly
366DEFPROCloadsprite(s$)
367local$=s$
368PROCr_fi(s$):spril%=length%
369PROCdoclaimg(spril%,spria%,"mem1","SPaint image",m64%)
370local%=FNourarea(spria%):!local%=spril%:OSCLI"LOAD "+s$+" "+STR$~(local%+4)
371local2%=local%+local%!8:REM first sprite in area.
372REM !!!PCA!!!
373IFlocaltag%=-1 THEN
374SYS"PCA_CreateTag",,local%,local%!8,!local%,0 TO localtag%
375ELSE
376localtag%!0=local%:localtag%!4=local%!8
377ENDIF
378REM hack - we can't resize when the window is open!
379!Wb%=m_local%:SYS "XWimp_CloseWindow",,Wb%
380PROCprime_local(s$)
381PROCOw(m_local%,-1,-1,-1)
382PROCredrawit(m_local%)
383ms0%=localtag%:ms0$=FNgls(local$):PROCpca(Msg_Changed%)
384PROCmini_poll(8)
385IFaremote%>=0 THEN PROCresizeRicon(0,0,0,xwL%*xpix%,ywL%*ypix%)
386ENDPROC
387
388REM open the local window to suit the new size of the object.
389DEFPROCprime_local(s$)
390local2%=local%+local%!8
391SYS Spop%,552,!localtag%,!localtag%+localtag%!4 TO ,,,xwL%,ywL%
392IFlocal%>0 THEN
393SYS "Wimp_ReadPixTrans",&200,!localtag%,!localtag%+localtag%!4,,,,stransW%,sgblkB%
394SYS XCtGet%,!localtag%,!localtag%+localtag%!4,-1,-1,sgblkB%,1
395ENDIF
396PROCsetsize(m_local%,ywL%*ypix%/ypixf,xwL%*xpix%/xpixf)
397$localt%="Local:"+s$
398ENDPROC
399
400DEFPROCprime_remote
401PROCsetsize(m_remote%,ywhook%*ypix%/ypixf,xwhook%*xpix%/xpixf)
402$maint%="Linked to:"+wn$
403IFmaino% THEN !Wb%=m_remote%:SYSWgwst%,,Wb%:PROCCwT(m_remote%):x%=Wb%!4:y%=Wb%!8 ELSE x%=-1:y%=-1
404PROCOw(m_remote%,x%,y%,-1)
405ENDPROC
406
407REM quit the program.
408DEFPROCterminate
409REM !!!PCA!!! local must remember to broadcast Msg_Desel before removing your object.
410IFlocaltag%>0 THEN PROCpca(Msg_Desel%)
411IF localtag%>0 THEN SYS"PCA_DeleteTag",localtag%:localtag%=-1
412
413REM !!!PCA!!! remote must send Msg_Unhook before quitting.
414IF remotetag%>0 THEN tskh%=remotetask%:ms0%=1:ms1%=remotetag%:PROCpca(Msg_Unhook%)
415spril%=0:PROCkillara(spria%)
416PROCms_end
417SYS"Wimp_CloseDown",Task_h%:SYS"XOS_Exit"
418ENDPROC
419
420REM user clicked in a remote window.
421DEFPROCremote_win
422IFBt%=2 THEN
423PROCgpi:ppick%=FNpicker("Paint colour",pcol%,mox%-128,moy%+128,%1,%100)
424ENDPROC
425ENDIF
426IFremotetag%=0 ENDPROC
427IFIcn%<>-&414350 THEN
428!gb%=m_remote%:SYS Wgwst%,,gb%:winx%=gb%!4-gb%!20:y1a%=gb%!16-gb%!24
429scalefacX=1:scalefacY=1
430moy%=moy%-y1a%:mox%=mox%-winx%
431ELSE
432scalefacX=remotescale%/65536
433scalefacY=remotescaley%/65536
434winx%=remotexpos%:y1a%=remoteypos%
435ENDIF
436omox%=mox%:omoy%=moy%
437REPEAT
438PROCswtos(!remotetag%,!remotetag%+remotetag%!4)
439IFBt%=4 SYS CtSgcol%,pcol%,,,256,0 ELSE IFBt%=1 SYS CtSgcol%,0,,,256,0
440CIRCLE FILL mox%,moy%,size2%
441PROCswbak
442ms0%=mox%-size2%:ms1%=moy%-size2%:ms2%=mox%+size2%+4:ms3%=moy%+size2%+4
443IFms0%<0 ms0%=0
444IFms1%<0 ms1%=0
445IFms2%>xwhook%*2 ms2%=xwhook%*2
446IFms3%>ywhook%*2 ms3%=ywhook%*2
447IF maino% THEN
448!Wb%=m_remote%:Wb%!4=ms0%*mscd:Wb%!8=ms1%*mscd:Wb%!12=Wb%!4+ms2%*mscd:Wb%!16=Wb%!8+ms3%*mscd
449SYS Wupdw%,,Wb% TO more%
450x0%=Wb%!4-Wb%!20:y0%=Wb%!16-Wb%!24
451WHILE more%
452SYS Spop%,564,!remotetag%,!remotetag%+remotetag%!4,x0%,y0%,0,stransW%,sgblk%
453SYS Wgr%,0,Wb% TO more%
454ENDWHILE
455ENDIF
456REM !!!PCA!!!
457REM user has painted into remote object so
458REM broadcast message_updatearea so other apps using
459REM the object can redraw the appropriate part of their windows
460PROCpca(Msg_Uparea%)
461PROCmini_poll(1)
462PROCgpi:mox%=mox%-winx%:moy%=moy%-y1a%
463mox%=mox%/scalefacX:moy%=moy%/scalefacY
464UNTIL Bt%=0
465ENDPROC
466
467
468DEFPROCRiconpositions
469
470REM do resizeRicon for each linked object which has moved
471
472ENDPROC
473
474REM delete 'remote' trap icon
475REM this is a _simple_ version as Spaint
476REM can only handle one object at a time.
477REM more sophistocated apps will have to do better.
478
479DEFPROCdeleteRicon(i%):IFi%<0 ENDPROC
480!gblk%=m_local%:gblk%!4=i%:SYS"Wimp_DeleteIcon",,gblk%
481IFi%*32+remoteicblk%=ricptr%-32 THEN ricptr%-=32
482WHILE (ricptr%!20 AND 1<<23)<>0 AND ricptr%>remoteicblk%
483ricptr%-=32
484ENDWHILE
485ENDPROC
486
487REM resize 'remote' trap icon
488DEFPROCresizeRicon(i%,x%,y%,w%,h%)
489SYS"XWimp_ResizeIcon",m_local%,i%,x%,y%,(x%+w%),(y%+h%) TO r0;F
490REM IF (F AND 1)<>0 THEN PROCreperr(FNs(r0+4)):ENDPROC
491PROCgwi(m_local%):y1a%=y1%-yscrol%:yscrola%=yscrol%:xscrola%=xscrol%
492xposU%=winx%:yposU%=y1a%
493xposL%=xposU%:yposL%=yposU%
494IFxposL%<x0% THEN xposL%=x0%
495IFyposL%<y0% THEN yposL%=y0%
496IFxposL%>x1% THEN xposL%=x1%
497IFyposL%>y1% THEN yposL%=y1%
498sfac%=65536:REM 100% scale
499ms2%=m_local%:ms3%=w_localt%:tskh%=remotetask%:PROCpca(Msg_ObjPos%)
500ENDPROC
501
502REM !!!PCA!!! create a 'remote' trap icon to cover the object
503REM a simple version. For more complex apps (multiple objects)
504REM something better will have to be done.
505DEFFNcreateRicon(x%,y%,w%,h%,flgs%)
506IFricptr%>=remoteicblk%+32*10 THEN ERROR 1,"Remote icon store full!"
507flgs%=flgs%>>28:flgs%=flgs%<<12
508!ricptr%=m_local%
509ricptr%!4=x%:ricptr%!8=y%:ricptr%!12=(x%+w%):ricptr%!16=(y%+h%)
510ricptr%!20=flgs%:IF Rbdr% ricptr%!20=ricptr%!20+%100
511SYS "Wimp_CreateIcon",aremote%,ricptr% TO i%
512ricptr%+=32
513=i%
514
515REM !!!PCA!!!
516REM send message on to remote task.
517DEFPROCremotemessage(R%)
518sp%=-1:y1a%=y1%-yscrol%
519
520REM locate object which matches icon...
521IF Icn%=remoteicon% AND remotetask%<>0 THEN
522CASE R% OF
523WHEN 6
524!Wb%=!Wb%-winx%:Wb%!4=Wb%!4-y1a%:Wb%!8=tBt%:Wb%!12=remotewin%:Wb%!16=-&414350
525ENDCASE
526SYS "Wimp_SendMessage",R%,Wb%,remotetask%
527ENDIF
528ENDPROC
529
530
531REM !!!PCA!!!
532REM Central Message despatch proc.
533
534DEFPROCpca(msg%)
535REM don't bother with remote update messages if no remote object in use:
536IFremotetag%=0 AND (msg%=Msg_Resize% OR msg%=Msg_Uparea% OR msg%=Msg_Misc%) THEN ENDPROC
537
538gb%!4=Task_h%:gb%!8=0:gb%!12=0:gb%!16=msg%:send%=17
539CASE msg% OF
540
541REM Send Message_WhosAbout
542WHEN Msg_Whos%
543util$="#Utilities":pcatask%=0
544utiltsk%()=0:utile%=0
545utilid%()=0
546uf%()=0
547uboxw%=0:REM max width of dialogue
548REM sprite, local tag
549gb%!20=&FF9:gb%!24=localtag%:gb%!28=0
550!gb%=32:th%=0:REM broadcast message
551
552REM Ask task for info about itself.
553WHEN Msg_Info%
554gb%!20=0:!gb%=24:th%=pcatask%
555
556REM Tell task to do its stuff (link onto object)
557WHEN Msg_Do%
558gb%!20=&FF9:gb%!24=localtag%:gb%!28=0
559gb%!32=utilid%(item%):gb%!36=uf%(item%):rflg%=gb%!36
560PROCstring0(gb%+40,FNgls(local$))
561!gb%=44+LEN(FNs(gb%+40))AND NOT3
562th%=utiltsk%(item%):REM send message direct to appropriate task.
563
564REM Broadcast message_done (not used by this program as it
565REM has no 'whole object modified' functions).
566WHEN Msg_Done%
567gb%!20=&FF9
568gb%!24=remotetag%:gb%!28=0
569!gb%=32:th%=0
570
571REM Broadcast Message_UpdateArea
572REM so other tasks can redraw appropriate area of their windows.
573WHEN Msg_Uparea%
574gb%!20=&FF9:gb%!24=remotetag%:gb%!28=ms0%:gb%!32=ms1%:gb%!36=ms2%:gb%!40=ms3%:!gb%=44:th%=0
575
576REM Send Resize_Request to owning task
577REM not used by this program.
578REM ms0% is the new size of the object
579REM total size - including header.
580REM owner will reply with ResizeAck if successful
581WHEN Msg_Resize%
582gb%!20=&FF9:gb%!24=remotetag%:gb%!28=0:gb%!32=ms0%:gb%!36=0:!gb%=40:th%=0
583send%=18
584
585REM Broadcast Message_Changed
586REM sent when new local image and after ResizeAck and data structure changes.
587WHEN Msg_Changed%
588gb%!20=&FF9:gb%!24=ms0%:gb%!28=0
589IFms0$<>"" THEN PROCstring0(gb%+32,ms0$):!gb%=36+LEN(FNs(gb%+32))AND NOT3 ELSE gb%!32=0:!gb%=36
590th%=0
591
592REM Broadcast Message_MiscOp with Sub_GiveInfoCompo
593REM not used by this program.
594WHEN Msg_Misc%
595gb%!20=Sub_Give%:gb%!24=&FF9:gb%!28=remotetag%:gb%!32=0:!gb%=36:th%=0
596
597REM Broadcast Message_Deselect as object has been deleted.
598WHEN Msg_Desel%
599gb%!20=&FF9
600gb%!24=localtag%:gb%!28=0
601!gb%=32:th%=0:pcatask%=0:remotetask%=0:PROCdeleteRicon(0):aremote%=-1
602
603REM send msg_objPos to remote task
604REM see Wimp_Poll loop for call details.
605WHEN Msg_ObjPos%
606gb%!20=0
607gb%!24=localtag%:gb%!28=0
608gb%!32=xposL%:gb%!36=yposL%:gb%!40=ms2%:gb%!44=ms3%:gb%!48=sfac%:gb%!52=xposU%:gb%!56=yposU%:th%=tskh%:!gb%=60
609REM send msg_Hook to local task
610REM this asks it to trap messages to the object and
611REM pass them back to us.
612WHEN Msg_Hook%
613gb%!20=0
614gb%!24=remotetag%:gb%!28=%11<<28:REM window button type
615gb%!32=m_remote%:!gb%=36:th%=tskh%
616
617REM send msg_unhook
618WHEN Msg_Unhook%
619gb%!20=0
620gb%!24=ms1%:gb%!28=0
621gb%!32=m_local%:gb%!36=ms0%:!gb%=40:th%=tskh%
622REM Hey, thats our local tag (we'd better delete the trap icon...)
623IFms1%=localtag% THEN remotetask%=0:PROCdeleteRicon(0):aremote%=-1
624ENDCASE
625
626REM send the message and keep ref for checking in Message_Receipt
627SYS Wmess%,send%,gb%,th%:myref%=gb%!8
628ENDPROC
629
630REM !!!PCA!!!
631REM generate the plug-in dialogue
632REM start by sending Message_WhosAbout and
633REM poll until the messages stop flooding in.
634
635DEFPROCpcasprite
636PROCpca(Msg_Whos%)
637REPEAT
638PROCmini_poll(0)
639UNTIL RR%=0
640
641IFutil$="#Utilities" THEN
642PROCrepmsg("No utilities are available for this object at the moment. Please load a utility providing application and try again.")
643ELSE
644
645REM simple menu...
646IFpopuptype%=1 THEN
647currbuff%=cbstr%:maxbuff%=cbstr%+&80:menufree%=cbbuff%:menuend%=cbbuff%+&80
648m_pca%=FNcmen(util$):PROCgpi:PROCmenu(m_pca%,mox%-186,moy%+12)
649ELSE
650REM ...or something more ambitious
651!Wb%=pca_w%:SYS "Wimp_DeleteWindow",,Wb%:c%=(1<<28)+(1<<29)
652REM If more than five utilities give it a scrollbar (and limit opened size to five)
653IF utile%>5 THEN e%=(1<<28)+(1<<29) ELSE e%=0
654pca_wblock%!28=(pca_wblock%!28 AND NOTc%) EOR e%
655SYSWcw%,,pca_wblock% TO pca_w%
656
657REM maximum height of dialogue.
658ole2h%=((uboxh%+8)*utile%)
659
660REM open as a menu positioned such that the first item is centred about the mouse pointer.
661
662PROCgpi:PROCsetsize3(pca_w%,ole2h%,uboxw%+10,mox%-uboxw%/2,moy%-ole2h%/2):wh%=Wb%!16-Wb%!8
663PROCCw(pca_w%):x%=mox%-uboxw%/2:y%=moy%+(uboxh%/2)
664
665REM while coping with pointer near the edge of the screen!
666IFx%<0 x%=0
667IFy%-wh%<0 y%=wh%
668
669SYS Wcm%,,pca_w%,x%,y%
670ENDIF
671ENDIF
672ENDPROC
673
674REM general proc. for setting the maximum extent of a window - modified to limit
675REM the displayed size to a maximum of 5* the height of a pca dialogue item.
676DEFPROCsetsize3(whn%,h%,w%,x%,y%)
677IFx%<0 x%=0
678IFy%<0 y%=0
679!Wb%=whn%:SYSWgwst%,,Wb%:Wb%!4=0:Wb%!8=0:Wb%!16=h%:Wb%!12=w%:SYS&600D7,whn%,(Wb%+4)
680IFh%>(uboxh%+8)*5 Wb%!16=(uboxh%+8)*5
681Wb%!28=-1:Wb%!4=Wb%!4+x%:Wb%!8=Wb%!8+y%:Wb%!12=Wb%!12+x%:Wb%!16=Wb%!16+y%:SYSWow%,,Wb%
682ENDPROC
683
684REM !!!PCA!!!
685REM user has chosen an item in the PCA dialogue
686REM either send Message_DoYourStuff or Message_Info
687REM depending on flags and where user clicked.
688DEFPROCpca_win
689REM get window info an work out which button they clicked on.
690PROCgwi(pca_w%):oBt%=Bt%:y1a%=y1%-yscrol%
691item%=(moy%-y1a%)/(uboxh%+8):IFitem%>utile%-1 item%=-1
692xx%=mox%-winx%
693
694IFitem%>=0 THEN
695REM make the 'button' click
696!Wb%=pca_w%:Wb%!4=0:Wb%!8=item%*(uboxh%+8):Wb%!12=vissizX%:Wb%!16=Wb%!8+(uboxh%+2):PROCrdpca(TRUE,item%,TRUE)
697REPEAT:PROCgpi:UNTIL Bt%=0
698!Wb%=pca_w%:Wb%!4=0:Wb%!8=item%*(uboxh%+8):Wb%!12=vissizX%:Wb%!16=Wb%!8+(uboxh%+2):PROCrdpca(TRUE,item%,0)
699pcatask%=utiltsk%(item%)
700
701REM clicked on info or elsewhere in button?
702
703IF xx%<uboxw%-42 OR ((uf%(item%) AND %10)=0) THEN
704
705REM Does the utility want sole access to the object?
706IF (uf%(item%) AND %1000)<>0 THEN PROCpca(Msg_Desel%)
707
708REM make _sure_ there is a tag for the local object.
709REM we do it when loading the object so this isn't strictly
710REM necessary...If you don' want a PCA tag for every object
711REM you create then this is the time to create it.
712
713IFlocaltag%<0 THEN
714SYS"PCA_CreateTag",,local%,local%!8,0,0 TO localtag%
715ELSE
716!localtag%=local%:localtag%!4=local%!8
717ENDIF
718
719REM are we already in an inplace session?
720REM if so, send an unhook to the previous remote...
721IF ((uf%(item%) AND %10000)<>0 AND aremote%<>-1) OR remotetask%=utiltsk%(item%) THEN
722IFremotetask%<>0 THEN tskh%=remotetask%:ms0%=1:ms1%=localtag%:PROCpca(Msg_Unhook%)
723ENDIF
724REM tell the utility to do its stuff...
725pcatsk%=utiltsk%(item%)
726PROCpca(Msg_Do%)
727ELSE
728pcatsk%=utiltsk%(item%):PROCpca(Msg_Info%)
729ENDIF
730
731ENDIF
732
733REM Only close dialogue if SELECT clicked.
734IFoBt%=4 PROCCw(pca_w%)
735ENDPROC
736
737DEFPROCselect_menu
738IF FNcheck_adj=TRUE adjusting%=TRUE ELSE adjusting%=FALSE
739IFmnhnd%=m_ibar% AND !Wb%=2 PROCterminate
740IFmnhnd%=m_ibar% AND !Wb%=1 THEN PROCoo(w_prefs%,4,inplace%):PROCOw(w_prefs%,-1,-1,-1)
741IFmnhnd%=mm_remote% THEN
742CASE !Wb% OF
743REM !!!PCA!!!
744REM not used by demo, example 'change object size'
745REM function.
746WHEN 1:REM double size request
747cursize%=!remotetag%:cursize%=!cursize%:REM read total size from sprite area header
748adat%=!remotetag%+remotetag%!4:adat%=adat%+adat%!32:hdr%=adat%-!remotetag%
749ms0%=hdr%+xwhook%*4*2*(ywhook%*2)
750PROCpca(Msg_Resize%)
751WHEN 2:PROCpca(Msg_Misc%)
752ENDCASE
753ENDIF
754IFmnhnd%=m_pca% THEN
755item%=!Wb%
756IF (uf%(item%) AND %1000)<>0 THEN v%=0:PROCpca(Msg_Desel%)
757pcatask%=utiltsk%(item%)
758PROCpca(Msg_Do%)
759ENDIF
760IF adjusting% THEN PROCmenu(mnhnd%,mousex%,mousey%):ENDPROC
761mnhnd%=-1
762ENDPROC
763
764DEFPROCprefs_win
765CASE Icn% OF
766WHEN 2,3:popuptype%=Icn%-2:PROCuiG(w_prefs%,2,3,0):PROCui(w_prefs%,popuptype%+2,1<<21)
767WHEN 4:inplace%=NOT inplace%:PROCoo(w_prefs%,4,inplace%)
768
769REM !!!PCA!!!
770REM user has toggled inplace editing option
771REM Did we begin with inplace on?
772IF (uflg% AND %10000)<>0 AND remotetag%>0 THEN
773IFinplace%=0 THEN
774REM yes, now off so send (temporary) unhook and open remote window.
775tskh%=localtask%:ms0%=0:ms1%=remotetag%:PROCpca(Msg_Unhook%)
776PROCprime_remote
777IFmaino% THEN !Wb%=m_remote%:SYSWgwst%,,Wb%:PROCCwT(m_remote%):x%=Wb%!4:y%=Wb%!8 ELSE x%=-1:y%=-1
778PROCOw(m_remote%,x%,y%,-1)
779PROCOw(m_remote%,-1,-1,-1)
780PROCredrawit(m_remote%)
781ELSE
782REM yes, and now turned on again so close our window and send Msg_Hook
783PROCCwT(m_remote%):tskh%=remotetask%:PROCpca(Msg_Hook%):PROCOw(w_remotet%,-1,-1,-1)
784ENDIF
785ENDIF
786
787ENDCASE
788ENDPROC
789
790DEFPROCremoteT_win
791CASE Icn% OF
792REM !!!PCA!!! User has clicked close icon in remote toolbar - we unhook
793WHEN 0:tskh%=remotetask%:ms0%=1:ms1%=remotetag%:PROCpca(Msg_Unhook%):remotetag%=-1:PROCCw(m_remote%):PROCCw(w_remotet%)
794WHEN 1:ppick%=FNpicker("Paint colour",pcol%,mox%-128,moy%+128,%1,%100)
795ENDCASE
796ENDPROC
797
798DEFPROClocalT_win
799CASE Icn% OF
800WHEN 0:REM info
801WHEN 1:REM utils
802PROCpcasprite
803WHEN 2:REM close
804REM !!!PCA!!!
805IFlocaltag%>0 PROCpca(Msg_Desel%):PROCCw(m_local%)
806ENDCASE
807ENDPROC
808
809DEFPROCclick:tBt%=Wb%!8:Bt%=tBt%:mox%=Wb%!0:moy%=Wb%!4:Icn%=Wb%!16:Win%=Wb%!12
810CASE Win% OF
811WHEN m_remote%:PROCremote_win
812WHEN m_local%:PROClocal_win
813WHEN pca_w%:PROCpca_win
814WHEN w_prefs%:PROCprefs_win
815WHEN w_report%:IF Icn%=0 THEN PROCCw(w_report%)
816WHEN w_remotet%:PROCremoteT_win
817WHEN w_localt%:PROClocalT_win
818WHEN -2
819IF Icn%=icnbh% AND Bt%=2 THEN PROCmenu(m_ibar%,mox%-144,204)
820IF Icn%=icnbh% AND Bt%=4 THEN
821IFremotetag%>0 OR localtag%>0 THEN
822IF remotetag%>0 AND NOT inplace% THEN
823EX%=0:PROCprime_remote:IF NOT EX% PROCOw(m_remote%,-1,-1,-1) ELSE EX%=0
824ELSE
825IF remotetask%<>0 AND inplace% AND remotetag%>0 THEN PROCOw(w_remotet%,-1,-1,-1)
826ENDIF
827IFlocaltag%>0 THEN
828PROCprime_local(local$):PROCOw(m_local%,-1,-1,-1)
829ENDIF
830ELSE
831PROCreperr("Spaint has nothing to work on at the moment. Either link an image in or drag an image to the icon.")
832ENDIF
833ENDIF
834ENDCASE
835ENDPROC
836
837
838REM *************************************************************************************************
839REM bits'n pieces of little interest follow...
840
841DEFFNgetpath(s$):n%=LEN(s$):REPEAT:ch$=MID$(s$,n%,1):n%-=1:UNTIL(n%<=0 OR ch$="." OR ch$=":" OR ch$=CHR$13)
842IF n%>0 THEN=LEFT$(s$,n%+1)
843=s$
844
845DEFFNvarpresent(s$):SYS"XOS_ReadVarVal",s$,gblk%,(1<<31),0,3 TO ,,exists%:=exists%<>0
846
847DEFFNgls(s$):n%=LEN(s$):REPEAT:ch$=MID$(s$,n%,1):n%-=1:UNTIL(n%<=0 OR ch$="." OR ch$=":" OR ch$=CHR$13)
848IF n%>0 THEN =RIGHT$(s$,LEN(s$)-n%-1)
849=RIGHT$(s$,10)
850
851DEFPROCr_fi(nme$)
852SYS "XOS_File",5,nme$ TO there%,B,ft%,D,length% ;F
853ft%=(ft%>>8) AND&FFF
854IF (F AND 1)<>0 THENthere%=255
855IFft%=&FCA AND there%=1 THEN ff%=OPENIN(nme$):SYS"OS_GBPB",4,ff%,gblk%,32:CLOSE#ff%:ff%=0:orlen%=gblk%!4:type%=!(gblk%+8):type%=(type%>>8) AND &FFF
856REM IFft%=pshopty%
857IF there%=1 THEN ff%=OPENIN(nme$):SYS"OS_GBPB",4,ff%,gblk%,32:CLOSE#ff%:ff%=0:IF !gblk%=&53504238 THEN ft%=&524F42:type%=&524F42
858ENDPROC
859
860DEFPROCfrc_redraw:SYS WfrcR%,-1,0,0,&FFFF,&FFFF:ENDPROC
861
862DEFPROCCwT(hand%):REM (Temporary) close window - used to allow window resize.
863IFhand%<=0 ENDPROC
864!Wb%=hand%:SYS"XWimp_CloseWindow",,Wb%
865IF hand%=m_remote% THEN maino%=0:!Wb%=w_remotet%:SYS "XWimp_CloseWindow",,Wb%
866IF hand%=m_local% THEN !Wb%=w_localt%:SYS "XWimp_CloseWindow",,Wb%
867ENDPROC
868
869DEFPROCCw(hand%)
870IFhand%<=0 ENDPROC
871!Wb%=hand%:SYS"XWimp_CloseWindow",,Wb%
872IF hand%=m_remote% THEN maino%=0:!Wb%=w_remotet%:SYS "XWimp_CloseWindow",,Wb%
873IF hand%=m_local% THEN !Wb%=w_localt%:SYS "XWimp_CloseWindow",,Wb%
874REM !!!PCA!!! closing local window - tell the remote to close its toolbar with an unhook.
875IFhand%=m_local% THEN tskh%=remotetask%:ms0%=1:ms1%=localtag%:PROCpca(Msg_Unhook%)
876
877REM !!!PCA!!! closing remote window - tell the local.
878IFhand%=m_remote% THEN tskh%=localtask%:ms0%=1:ms1%=remotetag%:PROCpca(Msg_Unhook%):remotetag%=-1
879
880ENDPROC
881
882DEFFNConfirmchange(str1$):!GB%=1:$(GB%+4)=str1$
883SYS "Wimp_ReportError",GB%,19,"SPaint" TO ,resp%
884=(resp%=1)
885
886DEFPROCmini_poll(s5%)
887FORs2%=0 TOs5%
888SYS&400C7,0,Wb% TO RR%
889CASE RR% OF
890WHEN1:PROCredraw(0)
891WHEN2
892SYSWow%,,Wb%
893WHEN3
894PROCCw(!Wb%)
895WHEN4
896WHEN5
897WHEN6:PROCmini_click
898WHEN7:
899WHEN8:PROCkey_pressed
900WHEN17,18,19:R%=RR%:PROCrecieve_msg
901ENDCASE
902NEXT
903ENDPROC
904
905DEFPROCmini_click
906ENDPROC
907
908DEFPROClocal_win
909IFIcn%>=0 THEN PROCgwi(m_local%):PROCremotemessage(R%):ENDPROC
910IFBt%=4 AND (INKEY-1 AND INKEY-2) THEN
911PROCpcasprite
912ENDIF
913IFBt%=2 THEN PROCgpi:PROCmenu(m_ibar%,mox%-128,moy%+48)
914ENDPROC
915
916DEFFNspritep1(v%):=v%+v%!8
917DEFPROCswtosm(v1%,v2%):IF v1%<&8000 OR v2%<&8000 THEN ERROR &524F42,"Redirection to invalid sprite."
918!savea%=0:SYSSpop%,573,v1%,v2%,savea% TO sw0%,sw1%,sw2%,sw3%:switched%=TRUE
919ENDPROC
920DEFPROCswtos(v1%,v2%):IF v1%<&8000 OR v2%<&8000 THEN ERROR &524F42,"Redirection to invalid sprite."
921!savea%=0:SYSSpop%,572,v1%,v2%,savea% TO sw0%,sw1%,sw2%,sw3%:switched%=TRUE
922ENDPROC
923DEFPROCswto(v%)
924!savea%=0:SYSSpop%,572,v%,v%+v%!8,savea% TO sw0%,sw1%,sw2%,sw3%:switched%=TRUE
925ENDPROC
926DEFPROCswbak
927IF switched% THEN SYSSpop%,sw0%,sw1%,sw2%,sw3%:switched%=0
928ENDPROC
929
930DEFFNpicker(s$,col%,x%,y%,f,f2)
931$gb%=s$
932!Mgb%=f2:IF col%=-1 AND (f2 AND %1)<>0 THEN col%=&FFFFFF00:!Mgb%=%111
933Mgb%!4=gb%:Mgb%!8=x%:Mgb%!12=(1<<31):Mgb%!16=(1<<31)-1:Mgb%!20=y%:Mgb%!24=0:Mgb%!28=0
934Mgb%!32=col%
935Mgb%!36=0
936SYS"ColourPicker_OpenDialogue",f,Mgb% TO h%,lcpw%
937=h%
938
939DEFPROCwword(RETURN b%,v%)
940!b%=v%:b%+=4:ENDPROC
941DEFPROCwstring(RETURN b%,s$)
942$b%=s$:b%=b%+4+LEN(s$)AND NOT3
943ENDPROC
944
945DEFPROCnudge
946IFINKEY-58 moy%+=1:MOUSE TO mox%,moy%
947IFINKEY-26 mox%-=1:MOUSE TO mox%,moy%
948IFINKEY-122 mox%+=1:MOUSE TO mox%,moy%
949IFINKEY-42 moy%-=1:MOUSE TO mox%,moy%
950ENDPROC
951DEFPROCgpi:MOUSE mox%,moy%,Bt%:PROCnudge
952ENDPROC
953
954DEFPROCrpanes
955!gb%=!Wb%:SYS Wgwst%,,gb%:flg%=gb%!32
956CASE h% OF
957WHEN m_local%:!gblk%=w_localt%:tooly%=gb%!8-gb%!16+192:toolyy%=192:toolx%=64:toolxx%=64
958WHEN m_remote%:!gblk%=w_remotet%:tooly%=104:toolyy%=64:toolx%=0:toolxx%=192
959ENDCASE
960gblk%!28=Wb%!28
961IF (flg% AND 2097152)=0 OR (flg% AND 131072)<>0 AND Wb%!28<>-1 THEN Wb%!28=!gblk%
962IF (flg% AND 2097152)<>0 THEN
963IF Wb%!28<>-1 Wb%!28=!gblk%
964SYS Wow%,,Wb%:gblk%!28=Wb%!28
965ENDIF
966gblk%!8=Wb%!8-tooly%:IFgblk%!8<0 AND Wb%!8>0 THEN gblk%!8=0 ELSE IF Wb%!8<=0 AND gblk%!8<0 THEN gblk%!8=Wb%!8
967gblk%!16=gblk%!8+toolyy%
968gblk%!4=Wb%!4-toolx%:IFgblk%!4<0 ANDWb%!4>0 THEN gblk%!4=0 ELSEIFWb%!4<=0 AND gblk%!4<0 THEN gblk%!4=Wb%!4
969gblk%!12=gblk%!4+toolxx%-2
970gblk%!20=0:gblk%!24=0
971IF !gblk%<>h% THEN SYS Wow%,,gblk%
972IF (flg% AND 2097152)=0 THEN SYS Wow%,,Wb%
973ENDPROC
974
975DEFPROCpoll
976
977PROCinitsptrans
978REPEAT:SYS&400C7,1,Wb% TO R%
979CASE R% OF
980WHEN1:PROCredraw(0)
981WHEN2:h%=!Wb%
982IFh%=m_local% OR h%=m_remote% THEN PROCrpanes ELSE SYSWow%,,Wb%
983
984IFh%=m_local% AND aremote%>=0 THEN
985PROCgwi(m_local%):y1a%=y1%-yscrol%:yscrola%=yscrol%:xscrola%=xscrol%
986xposU%=winx%:yposU%=y1a%
987xposL%=xposU%:yposL%=yposU%
988IFxposL%<x0% THEN xposL%=x0%
989IFyposL%<y0% THEN yposL%=y0%
990IFxposL%>x1% THEN xposL%=x1%
991IFyposL%>y1% THEN yposL%=y1%
992sfac%=65536:REM 100% scale
993ms2%=m_local%:ms3%=w_localt%:tskh%=remotetask%:PROCpca(Msg_ObjPos%)
994ENDIF
995WHEN3:PROCCw(!Wb%)
996WHEN6:PROCclick
997WHEN7:
998WHEN8:PROCkey_pressed
999WHEN9:PROCselect_menu
1000WHEN17,18:PROCrecieve_msg
1001ENDCASE
1002UNTIL 0
1003ENDPROC
1004DEFPROCOw(h%,x%,y%,bhnd%)
1005IF h%=m_remote% THEN maino%=-1
1006!Wb%=h%:IF x%=-1 OR y%=-1 THEN
1007SYSWgwst%,,Wb%:Wb%!28=bhnd%:SYS Wow%,,Wb%
1008IF h%=m_local% OR h%=m_remote% THEN PROCrpanes
1009ENDPROC
1010ENDIF
1011SYSWgwst%,,Wb%:xsize%=Wb%!12-Wb%!4:ysize%=Wb%!16-Wb%!8
1012!Wb%=h%:Wb%!4=x%:Wb%!12=Wb%!4+xsize%:Wb%!8=y%:Wb%!16=Wb%!8+ysize%
1013REM Wb%!8=y%:Wb%!16=Wb%!8+ysize%:Wb%!28=bhnd%:SYS"Wimp_OpenWindow",,Wb%
1014SYS"Wimp_OpenWindow",,Wb%
1015IF h%=m_local% OR h%=m_remote% THEN PROCrpanes
1016ENDPROC
1017
1018DEFPROCrms:SYS&35,-1,4 TO ,,xpix%:SYS&35,-1,5 TO ,,ypix%
1019SYS&35,-1,11 TO ,,sw%:SYS&35,-1,12 TO ,,sh%
1020xpix%=1<<xpix%:ypix%=1<<ypix%:sw%=xpix%*(sw%+1):sh%=ypix%*(sh%+1)
1021xpixf=xpix%/2:ypixf=ypix%/2
1022ENDPROC
1023
1024DEFPROCrepmsg(str1$)
1025OSCLI"POINTER 1":SYS&35,-1,3 TO ,,nocol%
1026PROCwi(w_report%,1,str1$):$msgtit%="Spaint":SYS Wgpi%,,GB%:PROCOw(w_report%,!GB%-356,GB%!4-42,-1)
1027ENDPROC
1028DEFPROCreperr(str1$):mnhnd%=0
1029LOCAL ERROR
1030ONERRORLOCAL ERROR EXT 1,"In Error code:"+REPORT$+" "+STR$ERL:QUIT
1031OSCLI"POINTER 1":SYS"OS_ReadModeVariable",MODE,3 TO ,,nocol%
1032VDU5
1033!gb%=1:$(gb%+4)=str1$
1034SYS "Wimp_ReportError",gb%,2,"Spaint"
1035ENDPROC
1036DEFPROCkey_pressed:win%=!Wb%:key%=Wb%!24:icn%=Wb%!4:mine%=FALSE
1037IFwin%=lcpw% mine%=TRUE
1038IFwin%=gensave% AND key%=13 THEN PROCoksave(FNri(gensave%,2)):mine%=TRUE
1039
1040IF NOT mine% SYS"Wimp_ProcessKey",key%
1041ENDPROC
1042
1043DEFPROCread_andload(s$,ft%,win%,Icn%):EX%=0
1044CASE win% OF
1045WHEN -2,m_local%
1046IFft%=&FF9 PROCloadsprite(s$)
1047ENDCASE
1048xwp%=0
1049ENDPROC
1050
1051DEFFNcheckpath(nme$)
1052IF INSTR(nme$,":")=0 AND INSTR(nme$,"<")=0 AND INSTR(nme$,".")=0 AND nme$<>"<Wimp$Scrap>" THEN =FALSE
1053=TRUE
1054
1055DEFPROConoff(win%,Icn%,state%):IFstate% PROCui(win%,Icn%,0) ELSEPROCui(win%,Icn%,2097152)
1056ENDPROC
1057
1058DEFPROCa(A%,B%):CALLNiceA%,A%,B%:ENDPROC
1059
1060DEFPROCda(A%,B%):CALLNiceDa%,A%,B%:ENDPROC
1061
1062DEFPROCaG(A%,B%,C%):CALLNiceAg%,A%,B%,C%:ENDPROC
1063
1064DEFPROCdaG(A%,B%,C%):CALLNiceDag%,A%,B%,C%
1065SYSWcGp%,,gblk%:IF!gblk%=A% AND gblk%!4>=B% AND gblk%!4<=C% THENSYSWcSp%,-1
1066ENDPROC
1067
1068DEFPROCwarning(win%,icn%)
1069!Wb%=win%:Wb%!4=icn%:Wb%!8=11<<24:Wb%!12=%1111<<24:SYS Wsist%,,Wb%
1070ENDPROC
1071
1072DEFPROCok(win%,icn%)
1073!Wb%=win%:Wb%!4=icn%:Wb%!8=7<<24:Wb%!12=%1111<<24:SYS Wsist%,,Wb%
1074ENDPROC
1075
1076DEFPROCui(hand%,no%,state%):!gb%=hand%:gb%!4=no%:gb%!8=state%:gb%!12=2097152:SYSWsist%,,gb%:ENDPROC
1077
1078DEFPROCuiG(hand%,start%,end%,state%):IFhand%<=0 ENDPROC
1079!gb%=hand%:gb%!8=state%:gb%!12=2097152:FORl%=start% TOend%:gb%!4=l%:SYSWsist%,,gb%:NEXT:ENDPROC
1080
1081DEFPROCwii(win%,icn%,text$):!gb%=win%:gb%!4=icn%:SYSWgist%,,gb%:IFFNs(gb%!32)<>text$ $(gb%!32)=text$:gb%!8=0:gb%!12=0:SYSWsist%,,gb%
1082ENDPROC
1083
1084DEFPROCwi(win%,icn%,text$):!gb%=win%:gb%!4=icn%:SYSWgist%,,gb%:IFgb%!28<&8000 OR gb%!28>&800000 THENERROR &524F42,"Icon not indir. or invalid. Handle "+STR$icn%
1085IFFNs(gb%!28)<>text$ THEN$(gb%!28)=text$:gb%!8=0:gb%!12=0:SYSWsist%,,gb%
1086ENDPROC
1087
1088DEFFNicnok(win%,icn%):IF icn%=0 THEN =0
1089!gb%=win%:gb%!4=icn%:SYSWgist%,,gb%:v%=gb%!(8+16)>>22
1090IF (v% AND %1)=0 THEN =TRUE
1091=FALSE
1092
1093DEFPROCsetsize(whn%,h%,w%)
1094!Wb%=whn%:SYSWgwst%,,Wb%:Wb%!4=0:Wb%!8=0:Wb%!16=h%:Wb%!12=w%:SYS&600D7,whn%,(Wb%+4):SYSWgwst%,,Wb%
1095ENDPROC
1096
1097DEFPROCloadsquashed(nme$,base%,off%)
1098LOCALERROR
1099ONERRORLOCAL PROCreperr(REPORT$,"(code "+STR$ERL+")"):PROCresizeslot(0):EX%=TRUE:ENDPROC
1100SYS&406C0
1101PROCr_fi(nme$):rlen%=length%:length%-=off%:REM ***
1102SYS"Squash_Decompress",%1000,-1 TO work%
1103SYS"Wimp_SlotSize",-1,-1 TO current,,free:free-=32*1024
1104IFfree<work%+4096+1024 THENPROCreperr(FNms("Sorrlc"),""):EX%=TRUE:ENDPROC:REM length%
1105IFfree>work%+length%+outsize% THEN free=work%+length%+outsize%
1106EX%=0:PROCresizeslot(free)
1107IF EX% THEN PROCreperr(FNms("Sorrlc"),""):EX%=TRUE:ENDPROC
1108freec%=free-work%:worka%=current+&8000
1109SYS"Wimp_SlotSize",-1,-1 TO current
1110IF freec%-length%>1024 THEN
1111outa%=worka%+work%+length%:outl%=(current+&8000)-outa%:ina%=worka%+work%:inl%=length%
1112ELSE
1113hlf%=freec%/2:outa%=worka%+work%+hlf%:outl%=hlf%:ina%=worka%+work%:inl%=hlf%
1114ENDIF
1115r5%=outl%:otype%=-1
1116fileoff%=0:offe%=FALSE:cont%=0:r3%=0:start%=0
1117IF inl%>=length% AND outl%>=outsize% THENstart%=%100
1118SYS"Hourglass_Percentage",0
1119REPEAT
1120offc%=inl%:PROCgetbit(nme$,off%,ina%,offc%)
1121r1%=worka%:r2%=ina%:r3%=offc%:r4%=outa%:r5%=outl%
1122REPEAT:IF offe% THEN cont%=0 ELSEcont%=1
1123SYS"Hourglass_Percentage",(fileoff%/outsize%)*100
1124SYS"Squash_Decompress",start% OR (cont%<<1),r1%,r2%,r3%,r4%,r5% TO status%,r1%,r2%,r3%,r4%,r5%
1125start%=1
1126IF status%=2 THENPROCstoreaway(outa%,r4%-outa%,fileoff%,base%,outsize%,otype%,0):r4%=outa%:r5%=outl%
1127IFfileoff%>=outsize% THENstatus%=0:off%=rlen%:r4%=outa%
1128UNTIL status%=1 OR status%=0
1129PROCstoreaway(outa%,r4%-outa%,fileoff%,base%,outsize%,otype%,0):r4%=outa%:r5%=outl%
1130off%+=(offc%-r3%)
1131UNTIL off%>=rlen% AND status%=0
1132SYS&406C1
1133PROCresizeslot(0)
1134ENDPROC
1135DEFPROCgetbit(nme$,off%,addr%,RETURN offc%):IF off%+offc%>rlen% THEN offc%=rlen%-off%:offe%=TRUE
1136IFoffc%=0 THENENDPROC
1137F%=OPENIN(nme$):PTR#F%=off%:SYS"OS_GBPB",4,F%,addr%,offc%:CLOSE#F%:F%=0:ENDPROC
1138DEFPROCstoreaway(unsquashbuffer,unsquashed,RETURN fileoff%,base%,outsize%,otype%,filter%):IF unsquashed<=0 THENENDPROC
1139A%=unsquashbuffer:B%=base%+fileoff%:C%=unsquashed:IF B%+C%>base%+outsize% THENC%=(base%+outsize%)-(B%)
1140IF A%MOD4=0 AND B%MOD4=0 AND C%MOD4=0 THEN D%=0 ELSED%=1
1141IF C%>0 THEN CALLmoveto,A%,B%,C% ELSE C%=0:fileoff%=outsize%
1142fileoff%+=C%
1143ENDPROC
1144
1145DEFPROCcarpos
1146ENDPROC
1147
1148DEFPROCgwi(hand%):!gb%=hand%:SYS Wgwst%,,gb%:x0%=gb%!4:y0%=gb%!8:x1%=gb%!12:y1%=gb%!16:vissizX%=x1%-x0%:vissizY%=y1%-y0%:xscrol%=gb%!20:yscrol%=gb%!24:winx%=x0%:wy%=y0%
1149wflg%=gb%!32:wo%=(wflg% AND 1<<16)<>0
1150wy%+=yscrol%:winx%-=xscrol%
1151ENDPROC
1152
1153DEFFNri(win%,icn%):!gb%=win%:gb%!4=icn%:SYSWgist%,,gb%:=FNs(gb%!28)
1154DEFFNr_icid(win%,icn%):!gb%=win%:gb%!4=icn%:SYSWgist%,,gb%:=FNs(gb%!32)
1155DEFPROCw_icid(win%,icn%,s$):!gb%=win%:gb%!4=icn%:SYSWgist%,,gb%:$(gb%!32)=s$:gb%!8=0:gb%!12=0:SYS Wsist%,,gb%:ENDPROC
1156DEFPROChelptext:Wb%!16=&503:Wb%!12=Wb%!8:icn%=Wb%!36:nme$="":htx%=-1:CASE Wb%!32 OF
1157ENDCASE
1158$(Wb%+20)=nme$:Wb%!0=(((20+LEN(nme$)+1)DIV4)*4)+4:$(Wb%+21+LEN(nme$))=CHR$0:SYSWmess%,17,Wb%
1159ENDPROC
1160
1161DEFPROCsc(r%,g%,b%):SYS CtSgcol%,(b%<<24)+(g%<<16)+(r%<<8),,,256,0:ENDPROC
1162DEFPROCscE(r%,g%,b%):SYS CtSgcol%,(b%<<24)+(g%<<16)+(r%<<8),,,256,3:ENDPROC
1163DEFPROCisld(x%,y%,w%):IF w%>0 AND w%<256 THEN RECTANGLE FILL x%+(255-w%),y%,w%,18
1164IFw%<255 AND w%>=0 THEN SYS XWscol%,0:RECTANGLE FILL x%,y%,(255-w%),18
1165IFw%<0 OR w%>255 THENSYS XWscol%,2:RECTANGLE FILL x%,y%,256,18
1166ENDPROC
1167
1168DEFPROCstring0(l%,a$):$l%=a$:l%?LENa$=0:ENDPROC
1169
1170DEFPROCar(v%)
1171IF!v%/(v%!8/xpixf)>v%!4/(v%!12/ypixf) THEN
1172!v%=v%!4:v%!8=v%!12*xpixf
1173ELSE
1174IF xpixf<>1 THEN v%!4=!v%*xpixf ELSE v%!4=!v%
1175v%!12=v%!8*ypixf
1176ENDIF
1177ENDPROC
1178
1179DEFPROCredrawW(h%,x00%,y00%,x11%,y11%):!Wb%=h%:Wb%!4=x00%*mscd-spritexm%:Wb%!8=y00%*mscd-spriteym%:Wb%!12=Wb%!4+x11%*mscd+spritexm%*2:Wb%!16=Wb%!8+y11%*mscd+spriteym%*2
1180PROCredraw(-1)
1181ENDPROC
1182
1183DEFFNrword(v%)
1184v2%=v% DIV4:IF v2%*4<>v% v%=v2%*4+4
1185=v%
1186DEFFNrword2(v%)
1187v2%=v% DIV4:IF v2%*4<>v% v%=v2%*4
1188=v%
1189DEFPROCblobs(x0%,y0%,x1%,y1%,x2%,y2%,x3%,y3%):CIRCLE FILL wx%+x0%,wy%+y0%,6:CIRCLE FILL wx%+x3%,wy%+y3%,6:CIRCLE FILL wx%+x1%,wy%+y1%,6:CIRCLE FILL wx%+x2%,wy%+y2%,6:ENDPROC
1190DEFPROCblob(x%,y%):CIRCLE FILL x%,y%,6:ENDPROC
1191DEFPROCblob2(x%,y%):RECTANGLE x%-4,y%-4,16,16:ENDPROC
1192
1193DEFPROCredrawit(hand%):!GB%=hand%:SYS"Wimp_GetWindowOutline",,GB%:SYS WfrcR%,-1,GB%!4,GB%!8,GB%!12,GB%!16:ENDPROC
1194DEFPROCrdi(hand%,icn%):IFhand%<=0 ENDPROC ELSE !gb%=hand%:gb%!4=icn%:SYSWgist%,,gb%:SYSWfrcR%,hand%,gb%!8,gb%!12,gb%!16,gb%!20:ENDPROC
1195WHILE go%:SYS"Wimp_GetRectangle",,GB% TO go%:ENDWHILE:ENDPROC
1196DEFPROCgetwininfo(hand%):!Wb%=hand%:SYSWgwst%,,Wb%:xbase%=Wb%!4:ybase%=Wb%!8:width%=Wb%!12:height%=Wb%!16:ENDPROC
1197DEFFNGetLeafname(name%):LOCAL ch$,n%,name$:name$=FNs(name%):IF((INSTR(name$,".")=0) AND(INSTR(name$,":")=0)) THEN =name$
1198n%=LEN(name$):REPEAT:ch$=MID$(name$,n%,1):n%-=1:UNTIL(n%<=0 OR ch$="." OR ch$=":")
1199IF n%>0 THEN =RIGHT$(name$,LEN(name$)-n%-1)
1200=""
1201DEFFNs(s%):IF?s%<32 =""
1202n$="":WHILE ?s%>31 AND LENn$<255:n$+=CHR$?s%:s%+=1:ENDWHILE
1203=n$
1204
1205DEFPROCresizeslot(cc%)
1206SYSWslt%,-1,-1 TO ,,free%
1207IF free%+(slsiz%-basesiz%)<cc% THEN EX%=TRUE:PROCreperr(FNms_exp("mem1",STR$(((slsiz%-basesiz%+cc%)-free%)/1024),"")):ENDPROC
1208SYSWslt%,(basesiz%+cc%),-1:SYSWslt%,-1,-1 TO slsiz%
1209IFslsiz%<basesiz%+cc% THEN EX%=TRUE:SYS Wslt%,basesiz%,-1:slsiz%=basesiz%:PROCreperr(FNms_exp("mem1",STR$((basesiz%+cc%-slsiz%)/1024),""))
1210claims%=slsiz%-basesiz%
1211ENDPROC
1212
1213DEFFNcheck_adj
1214SYS"Wimp_GetPointerInfo",,GB%+300
1215IF (%111 AND GB%!308=1) THEN =TRUE ELSE IF (%111 AND GB%!308=2) THEN =2
1216=FALSE
1217DEFFNquitreq(E$,box%):LOCAL RES%:!GB%=0:$(GB%+4)=LEFT$(E$,100)+CHR$0
1218IF box%=255 SYS"Wimp_ReportError",GB%,19,"SPaint" TO ,resp% ELSE SYS"Wimp_ReportError",GB%,box%,"SPaint" TO ,resp%
1219=resp%=1
1220DEFFNdecode(hand%,Wb%,gb%):SYS"Wimp_DecodeMenu",,hand%,Wb%,gb%:=$gb%
1221DEFPROCgrey(h%,i%):IFh%>0 !gb%=h%:gb%!4=i%:gb%!8=&2000000:gb%!12=&F000000:SYSWsist%,,gb%
1222ENDPROC
1223DEFPROCnotselect(h%,i%):IFh%<=0 ENDPROC
1224!gb%=h%:gb%!4=i%:gb%!8=&A000:gb%!12=&F000:SYSWsist%,,gb%:ENDPROC
1225DEFPROCblack(h%,i%):IFh%>0 !gb%=h%:gb%!4=i%:gb%!8=&7000000:gb%!12=&F000000:SYSWsist%,,gb%
1226ENDPROC
1227DEFPROCencodemenu(mnhnd%)
1228IFmnhnd%<&8000 THEN ERROR 1,"Bad menuhandle"
1229REM PROCclm(m_remote%)
1230ENDPROC
1231DEFPROCtk(hand%,icn%):IFicn%<0 ENDPROC
1232hand%!(28+(24*icn%))=hand%!(28+(24*icn%))OR &01:ENDPROC
1233DEFPROCclm(hand%):IFhand%<&8000 ERROR 1,"menu handle &"+STR$~hand%+" called for clearing is invalid."
1234hand%+=28:REPEAT:!hand%=!hand% ANDNOT1:hand%!8=hand%!8 ANDNOT&400000:hand%+=24:UNTIL!(hand%-24) AND 2<<6:ENDPROC
1235DEFPROCshade(mh%,I%):mh%!(28+8+24*I%)=mh%!(28+8+24*I%)OR&40000:ENDPROC
1236DEF PROCtick(mh%,I%):IFI%<0 I%=0
1237mh%!(28+(24*I%))=mh%!(28+(24*I%))OR &01:ENDPROC
1238DEFPROCselect(h%,i%):IF h%>0 !gb%=h%:gb%!4=i%:gb%!8=&7000000:gb%!12=&F000000:SYSWsist%,,gb%:ENDPROC
1239ENDPROC
1240DEFPROCdeselect(h%,i%):IFh%>0 !gb%=h%:gb%!4=i%:gb%!8=&4000000:gb%!12=&F000000:SYSWsist%,,gb%
1241ENDPROC
1242DEFPROCmsgrep(str1$):$errb%=str1$
1243ENDPROC
1244!gb%=0:$(gb%+4)=str1$
1245SYS"Wimp_ReportError",gb%,17,"SPaint Message" TO ,resp%
1246ENDPROC
1247
1248DEFPROCinitall:DIM BL% 16,nameblk% 255:adjusting%=FALSE:mainW_active%=FALSE:ENDPROC
1249DEFPROCinit_Wimp:mnhnd%=0:PROCinitSys:PROCsprites:PROCload_templates:PROCcreatemenus:scrapref%=-1:ENDPROC
1250
1251DEFFNtriplezero(v):LOCAL @%:@%=(1<<24)+(2<<16)+(3<<8)+12:=STR$(v)
1252DEFFNdoublezero(v):LOCAL @%:@%=(1<<24)+(2<<16)+(2<<8)+12:=STR$(v)
1253DEFFNsinglezero(v):LOCAL @%:@%=(1<<24)+(2<<16)+(1<<8)+12:=STR$(v)
1254DEFFNazero(v):LOCAL @%:@%=(1<<24)+(2<<16)+(1<<8)+12:v$=STR$(v):IFRIGHT$(v$,2)=".0" THEN =LEFT$(v$,LEN(v$)-2)
1255=v$
1256DEFFNalt(v%):IFv% THEN =" *"
1257=""
1258
1259DEFPROCinitSys
1260SYS "Wimp_Initialise",200,&4B534154,"Simple Paint" TO ,Task_h%
1261DIM SpriteName% 14:$SpriteName%="!spaint"
1262!Wb%=-1:Wb%!4=0:Wb%!8=0:Wb%!12=76:Wb%!16=76:Wb%!20=&7000311A:Wb%!24=SpriteName%:Wb%!28=1:Wb%!32=12:SYS"Wimp_CreateIcon",,Wb% TO icnbh%
1263ENDPROC
1264
1265DEFPROCsprites
1266
1267PROCr_fi("<SPaint$Dir>.Sprites22")
1268IF there%<>1 OR (ft%<>&FCA AND ft%<>&FF9) THEN ERROR EXT 1,"!Spaint.Sprites missing/corrupt. Please install again."
1269IF ft%=&FCA THEN DIM sblock% orlen%+16:!sblock%=orlen%+16 ELSE DIM sblock% length%+16:!sblock%=length%+16
1270sblock%!4=0:sblock%!8=16:sblock%!12=16
1271IF ft%=&FCA THEN
1272fl%=orlen%+4:outsize%=orlen%:PROCloadsquashed("<SPaint$Dir>.Sprites22",sblock%+4,&14)
1273IFEX% THEN SYS "XOS_Exit"
1274ELSE
1275IF ft%=&FF9 THEN SYSSpop%,522,sblock%,"<SPaint$Dir>.Sprites22" ELSEPROCreperr("Spaint Sprites are corrupt or missing. Please reinstall the program.",""):SYS"XOS_Exit"
1276ENDIF
1277ENDPROC
1278
1279DEFPROCload_templates:st%=styleindir:ste%=styleindir+&1300
1280SYS"Wimp_OpenTemplate",,"<SPaint$Dir>.Templates"
1281
1282
1283SYSWlt%,,wad%(1),st%,ste%,-1,"info",0 TO ,,stx%:wad%(1)!64=sblock%:st%=stx%:SYS Wcw%,,wad%(1) TO w_info%
1284split_hand%=-1:restore_hand%=-1
1285SYS Wlt%,,GB%,st%,ste%,-1,"generalsave",0 TO ,,stx%:GB%!64=1:st%=stx%:SYS Wcw%,,GB% TO gensave%
1286SYS Wlt%,,GB%,st%,ste%,-1,"prefs",0 TO ,,stx%:GB%!64=1:st%=stx%:SYS Wcw%,,GB% TO w_prefs%
1287SYS Wlt%,,GB%,st%,ste%,-1,"remote",0 TO ,,stx%:maint%=st%:GB%!64=sblock%:st%=stx%:SYS Wcw%,,GB% TO m_remote%
1288SYS Wlt%,,GB%,st%,ste%,-1,"local",0 TO ,,stx%:localt%=st%:GB%!64=sblock%:st%=stx%:SYS Wcw%,,GB% TO m_local%
1289
1290SYSWlt%,,GB%,st%,ste%,-1,"report",0 TO ,,stx%:GB%!64=1:msgtit%=st%:st%=stx%:SYSWcw%,,GB% TO w_report%
1291
1292SYSWlt%,,GB%,st%,ste%,-1,"localtool",0 TO ,,stx%:GB%!64=sblock%:st%=stx%:SYSWcw%,,GB% TO w_localt%
1293
1294SYSWlt%,,GB%,st%,ste%,-1,"remotetool",0 TO ,,stx%:GB%!64=sblock%:st%=stx%:SYSWcw%,,GB% TO w_remotet%
1295
1296REM !!!PCA!!!
1297REM keep the window create block for the PCA dialogue as we
1298REM need to delete and recreate in order to add the scrollbar.
1299DIM pca_wblock% 256,pca_windir% 100
1300SYSWlt%,,pca_wblock%,pca_windir%,pca_windir%+100,-1,"ole2",0:GB%!64=sblock%:SYSWcw%,,pca_wblock% TO pca_w%
1301
1302SYS"Wimp_CloseTemplate",,"<SPaint$Dir>.Templates"
1303IF end% VDU4,30:SYS6,4,0:SYS 6,229,0:END
1304IF st%>=ste% THEN ERROR 1,"indirection overlap when loading windows.":QUIT
1305REMPROCdefaultstrings
1306ENDPROC
1307DEFPROCoo(win%,Icn%,state%):IF state% PROCui(win%,Icn%,0) ELSE PROCui(win%,Icn%,1<<21)
1308ENDPROC
1309DEFPROCallow(win%,icn%)
1310!gb%=win%:gb%!4=icn%:gb%!8=0<<22:gb%!12=1<<22:SYS"Wimp_SetIconState",,gb%
1311ENDPROC
1312DEFPROCdisallow(win%,icn%)
1313!gb%=win%:gb%!4=icn%:gb%!8=1<<22:gb%!12=1<<22:SYS"Wimp_SetIconState",,gb%
1314ENDPROC
1315DEFPROCcreatemenus
1316DIM menufree% &800:menuend%=menufree%+&800
1317DIM buffer% &400:maxbuff%=buffer%+&400:currbuff%=buffer%
1318F%=OPENUP("<SPaint$Dir>.menus")
1319IFF%=0 THEN ERROR EXT 1,FNms("nomenus"):SYS"OS_Exit"
1320submsg%=FALSE:wid%()=4
1321wbptr%=1
1322submsg%=FALSE
1323m_file%=FNcmen(GET$#F%)
1324m_ibar%=FNcmen(GET$#F%):numfonts%=0
1325mm_remote%=FNcmen(GET$#F%)
1326CLOSE#F%
1327ENDPROC
1328
1329DEFPROCmenu(m%,moux%,mouy%)
1330mnhnd%=m%
1331PROCencodemenu(mnhnd%):SYS"Wimp_CreateMenu",,mnhnd%,moux%+100,mouy%+12
1332IF moux%<>0 AND mouy%<>0 THEN mousex%=moux%:mousey%=mouy%
1333ENDPROC
1334DEFFNcmen(menu$)
1335IFmenufree%>menuend%-28 =-1
1336LOCALm%,m$
1337menuptr%=menufree%:i%=0:ctr%=0
1338IFLEFT$(menu$,1)="#" THEN i%=1:menutitle$=FNpar("\",i%) ELSE menutitle$=""
1339menuptr%!20=40:$menuptr%=menutitle$:menuptr%?12=7:menuptr%?13=2:menuptr%?14=7:menuptr%?15=0:menuptr%!16=172:menuptr%!24=0:menuptr%+=28:maxx%=LENmenutitle$-3
1340REPEAT:item$=FNpar("\",i%):PROCmenuitem(item$):UNTIL item$="" OR menuptr%>=menuend%-24
1341!(menuptr%-24)=!(menuptr%-24)OR&80
1342m%=menufree%:m%!16=maxx%*16+12
1343menufree%=menuptr%
1344=m%
1345DEFPROCmenuitem(nme$)
1346IFnme$="" ENDPROC
1347IFmenuptr%+24>menuend% ENDPROC
1348LOCAL flg%,i%:IFsubmsg% flg%=8 ELSE flg%=0
1349i%=INSTR(nme$,">")
1350IFi%>0 THEN
1351subptr%=EVALMID$(nme$,i%+1):IFMID$(nme$,i%+1)="i_font%" fontsub%=menuptr%+4
1352nme$=LEFT$(nme$,i%-1)
1353ELSE subptr%=-1
1354ENDIF
1355IFRIGHT$(nme$,1)="#" nme$=LEFT$(nme$,LENnme$-1):flg%+=&02
1356menuptr%!0=flg%:menuptr%!4=subptr%:menuptr%!8=&07000021
1357IFLEFT$(nme$,1)="$" THEN
1358!menuptr%+=&04:menuptr%!8+=&100:i%=INSTR(nme$,"(")
1359IFi%>0 THEN L%=VALMID$(nme$,i%+1):nme$=LEFT$(nme$,i%-1)ELSE L%=12
1360menuptr%!12=EVALMID$(nme$,2):menuptr%!16=-1:menuptr%!20=L%
1361IFL%>15 THEN L%=15
1362nme$=STRING$(L%-1," ")
1363ELSE
1364IFLENnme$<=12 THEN
1365$(menuptr%+12)=nme$
1366ELSE I%=FNworkspace(LENnme$+1):$I%=nme$
1367menuptr%!12=I%:menuptr%!16=-1:menuptr%!20=LENnme$+1:menuptr%!8=menuptr%!8 OR &100
1368ENDIF
1369ENDIF
1370IFLENnme$>maxx% maxx%=LENnme$
1371menuptr%+=24
1372ENDPROC
1373DEFFNpar(sep$,RETURN pos%):i1%=pos%+1:pos%=INSTR(menu$+sep$,sep$,i1%):=MID$(menu$,i1%,pos%-i1%)
1374DEFFNworkspace(L%)
1375IF currbuff%+L%>maxbuff% THEN ERROR 1,"No room to store menu definitions - too many fonts ?"
1376currbuff%+=L%:=currbuff%-L%
1377DEFPROCsetupstores:offset%=0:RESTORE+2:FORlopx%=1 TO2:READ required%:wad%(lopx%)=generalstore%+offset%:offset%+=required%:NEXT
1378IFoffset%>&800 ERROR 1,"No room for window storage."
1379ENDPROC
1380DATA &500,&100
1381
1382DEFFNstr(num):LOCAL ERROR
1383ONERROR LOCAL SYS"XOS_Release",3,wrchv%,possaddr%:PROCreperr(REPORT$+" code number "+STR$~ERL):="0"
1384!possaddr%=gb%:SYS131103,3,wrchv%,possaddr%:PRINTnum
1385SYS131104,3,wrchv%,possaddr%
1386s$=$gb%:WHILE LEFT$(s$,1)=CHR$32:s$=RIGHT$(s$,LEN(s$)-1):ENDWHILE
1387WHILE RIGHT$(s$,1)<CHR$32:s$=LEFT$(s$):ENDWHILE
1388=s$
1389
1390DEFPROCassemble_blit
1391DIM space% &1A00
1392ccr%=0:ccg%=1:ccb%=2:ro%=8:go%=9:bo%=10
1393r%=11:g%=12:b%=14
1394rd%=4:gd%=5:bd%=7
1395FORopt=0 TO 2 STEP 2
1396P%=space%
1397[OPT opt
1398
1399.moveto
1400\r0=src%
1401\r1=des%
1402\r2=len%
1403\r3=0 for words, 1 for bytes
1404CMP R2,#0:MOVLE PC,R14
1405CMP R0,R1:MOVEQ PC,R14
1406CMP R3,#0:BNE movebytes
1407.movewords
1408CMP R0,R1:BLE else
1409\ src%>des%
1410MOV R3,#0:SUB R6,R2,#4
1411.for1m
1412LDR R5,[R0,R3]:STR R5,[R1,R3]
1413ADD R3,R3,#4:CMP R3,R6:BLE for1m
1414MOV PC,R14
1415.else
1416SUB R3,R2,#4
1417.for2m
1418LDR R5,[R0,R3]:STR R5,[R1,R3]
1419SUBS R3,R3,#4
1420BGE for2m
1421MOV PC,R14
1422
1423.movebytes
1424.truemoveb
1425CMP R0,R1:BLE elseb
1426\ src%>des%
1427MOV R3,#0
1428.for1mb
1429LDRB R5,[R0,R3]:STRB R5,[R1,R3]:ADD R3,R3,#1
1430CMP R3,R2:BLT for1mb
1431MOV PC,R14
1432.elseb
1433SUB R3,R2,#1
1434.for2mb
1435LDRB R5,[R0,R3]:STRB R5,[R1,R3]
1436SUBS R3,R3,#1
1437BGE for2mb
1438MOV PC,R14
1439
1440
1441.copydata%
1442; r0 =source ptr
1443; r1 =dest ptr
1444; r2 =length
1445
1446.copywordsl:TST R2,#31:LDRNE R3,[R0],#4:STRNE R3,[R1],#4:SUBNE R2,R2,#4:BNE copywordsl
1447TEQ R2,#0
1448LDMNEIA R0!,{r5-r12}:STMNEIA R1!,{r5-r12}:SUBNES R2,R2,#8*4:BNE copywordsl
1449MOV PC,R14
1450.copyj:MOV R0,R2:MOV R1,R3:MOV R2,R4:B copydata%
1451
1452.NiceAg%
1453MOV R4,#0:MOV R7,#1:B groupdo
1454.NiceDag%
1455MOV R4,#1<<22:MOV R7,#0:B groupdo
1456
1457.groupdo
1458; r0 = window handle
1459; r1 = min_ic
1460; r2 = max_ic
1461
1462MOV R8,R0:MOV R9,R1:MOV R10,R2:STMFD R13!,{R14}
1463MOV R5,#1<<22
1464
1465STR R8,window
1466.loop
1467STR R9,icon
1468ADR R1,block
1469SWI "XWimp_GetIconState"
1470LDR R12,flags:MOV R12,R12,LSR#22:AND R12,R12,#1:CMP R12,R7:; is it shaded ?
1471BNE ok
1472; change it
1473STR R4,eorword:STR R5,clearword
1474ADR R1,block
1475SWI "XWimp_SetIconState"
1476.ok
1477ADD R9,R9,#1:CMP R9,R10:BLE loop
1478LDMFD R13!,{PC}
1479
1480.block
1481.window EQUD 0
1482.icon EQUD 0
1483
1484.eorword EQUD 0
1485.clearword EQUD 0
1486.data2 EQUD 0
1487EQUD 0
1488
1489; bit 22 of flags =shaded bit
1490; bits 12-15 =button type
1491
1492.flags EQUD 0
1493.data0 EQUD 0
1494.data1 EQUD 0
1495.data2 EQUD 0
1496.data3 EQUD 0
1497
1498.NiceDa%
1499; r0 =window
1500; r1 =icon
1501MOV R2,R1:B NiceDag%
1502.NiceA%
1503; r0 = window
1504; r1 = icon
1505MOV R2,R1:B NiceAg%
1506
1507
1508; !!!PCA!!!
1509; used by the dialogue redraw code to simulate 'r1' style icons
1510
1511.bdr%
1512; x0
1513; y0
1514; x1
1515; y1
1516
1517; simulate Acorn style 'r1' border
1518
1519MOV R9,R0:MOV R10,R1:MOV R11,R2:MOV R12,R3
1520
1521MOV R0,#0
1522SWI &600E6
1523
1524
1525; lh side
1526MOV R0,#4:SUB R1,R9,#2:SUB R2,R10,#2:SWI "OS_Plot":; move x0-2,y0-2
1527MOV R0,#5:MOV R2,R12:SWI "OS_Plot":; draw x0-2,y1
1528
1529MOV R0,#4:SUB R1,R1,#2:SWI "OS_Plot":; move x0-4,y1
1530MOV R0,#5:SUB R2,R10,#4:SWI "OS_Plot":; draw x0-4,y0-4
1531
1532; top
1533MOV R0,#4:ADD R2,R12,#4:SWI "OS_Plot"
1534MOV R0,#5:ADD R1,R11,#2:SWI "OS_Plot":; draw x0-4,y1+4,x1+2,y1+4
1535MOV R0,#4:SUB R1,R1,#2:SUB R2,R2,#2:SWI "OS_Plot":; move x1,y1+2
1536MOV R0,#5:SUB R1,R9,#4:SWI "OS_Plot"; draw x0-4,y1+2,x1,y1+2
1537
1538
1539MOV R0,#4
1540SWI &600E6
1541
1542;bottom
1543MOV R0,#4:SUB R1,R9,#2:SUB R2,R10,#4:SWI "OS_Plot":; move x0-2,y0-4
1544MOV R0,#5:ADD R1,R11,#4:SWI "OS_Plot":; draw x1+2,y0-4
1545
1546MOV R0,#4:SUB R1,R1,#0:SUB R2,R10,#2:SWI "OS_Plot":; move x1,y0-2
1547MOV R0,#5:MOV R1,R9:SWI"OS_Plot":; draw x0,y0-2
1548
1549;right
1550
1551MOV R0,#4:ADD R1,R11,#2:MOV R2,R10:SWI "OS_Plot"
1552MOV R0,#5:ADD R2,R12,#2:SWI "OS_Plot"
1553
1554MOV R0,#4:ADD R1,R11,#4:MOV R2,R10:SWI "OS_Plot"
1555MOV R0,#5:ADD R2,R12,#4:SWI "OS_Plot"
1556
1557MOV PC,R14
1558
1559]:NEXT:ENDPROC
1560
1561REM Dynamic area version...
1562DEFFNcreatearea(size%,s$,RETURN aa%,maxm%)
1563LOCAL ERROR
1564ON ERRORLOCAL VDU4,30:PRINTREPORT$:mm$=REPORT$+FNms("vmfail"):EX%=TRUE:areasize%=0:aa%=0:=-1
1565areasize%=0
1566SYS "XOS_DynamicArea",0,-1,size%,-1,%10000000+(1<<31 AND virtual%),maxm%,0,0,s$ TO r0,aa%,,areabase%;F%
1567IF(F% AND1)<>0 THEN PROCkillara(aa%):mm$="Couldn't create "+s$+" area. Probably not enough free memory or disc space.":aa%=0:size%=0:EX%=TRUE:=0
1568SYS "OS_ReadDynamicArea",aa% TO ,areasize%
1569IF areasize%<size% THEN PROCkillara(aa%):ERROR 42,"Couldn't create "+s$+" area. Probably not enough free memory."
1570=areabase%
1571DEFFNourarea(v%):IFv%=0 THEN ERROR &524F42,"Dynamic area "+STR$v%+" called by SPaint is invalid!"
1572SYS "OS_DynamicArea",2,v% TO ,,areasize%,addr%
1573=addr%
1574DEFFNareasize(v%):IFv%=0 THENERROR &524F42,"Dynamic area "+STR$v%+" called by SPaint is invalid!"
1575SYS "OS_DynamicArea",2,v% TO ,,areasize%,addr%
1576=areasize%
1577DEFPROCkillara(v%)
1578IFv%<>0 THEN SYS"XOS_DynamicArea",1,v%
1579ENDPROC
1580
1581DEFFNmin(v1,v2):IFv1<v2 THEN =v1
1582=v2
1583DEFFNmax(v1,v2):IFv1>v2 THEN =v1
1584=v2
1585
1586REM DA version, general area create/claim
1587DEFPROCdoclaimg(size%,RETURN number%,msg$,arean$,maxm%):EX%=0
1588IF size%=0 THEN PROCkillara(number%):number%=0:ENDPROC
1589IFnumber%=0 THEN areabase%=FNcreatearea(size%,arean$,number%,maxm%):csize%=areasize%:IF number%=0 THEN EX%=TRUE
1590IFEX% THEN PROCrepmsg(FNms_exp(msg$,FNrounds(size%/1024),"")):number%=0:ENDPROC
1591b%=FNourarea(number%):csize%=areasize%
1592SYS Wslt%,-1,-1 TO ,,free%:IF free%<(size%-csize%) AND NOTvirtual% THEN PROCrepmsg(FNms_exp(msg$,FNrounds((size%-csize%-free%)/1024),"")):EX%=TRUE:ENDPROC
1593b%=FNourarea(number%)
1594v%=0:change%=size%-areasize%
1595IF change%<>0 THEN SYS "XOS_ChangeDynamicArea",number%,change% TO r0,v%;F%:IFv%<ABS(change%) AND change%>0 THEN PROCreperr("DynamicArea memory change failed badly. (Passed "+STR$(INT(size%/1024))+"k)",""):EX%=TRUE:ENDPROC
1596b%=FNourarea(number%)
1597ENDPROC
1598
1599DEFPROCms_load(A$):SYS "MessageTrans_FileInfo",,A$:SYS "OS_Module",6,,,17+LENA$ TO ,,ms_desc%:$(ms_desc%+16)=A$:SYS "MessageTrans_OpenFile",ms_desc%,ms_desc%+16:ENDPROC
1600
1601DEFPROCms_end:SYS "XMessageTrans_CloseFile",ms_desc%:SYS "XOS_Module",7,,ms_desc%:ENDPROC
1602
1603DEFFNms(nme$):=FNms_exp(nme$,"","")
1604
1605DEFFNms_exp(A$,B$,C$):SYS 398594,ms_desc%,A$,gb%,256,B$,C$ TO ,,,zl%;zf%:IFzf% AND1 THEN ="tag '"+A$+"' not present in messages."
1606gb%?zl%=13:=$gb%
1607
1608DEFPROCinit_variables
1609
1610wh%=-256:rd%=&FF00:cy%=-65536:gr%=&FF0000:myref%=0
1611CtHSVtRGB%=&40759:CtRGBtHSV%=&40758:Wscol%=&400E6:CtSgcol%=&40743:CtSOgcol%=&40748:Wrdw%=&400C8:Wgr%=&400CA:XWgr%=&600CA:Wgpi%=&400CF
1612Spop%=&2E:XSpop%=&2002E:CtSfc%=&4074F:CtInval%=&40750:CtStb%=&40740:Wlt%=&600DB:Wcw%=&400C1:Wslt%=&600EC:Wgist%=&400CE:Wsist%=&400CD:Wgwst%=&400CB:Ptx%=&40086:XPtx%=&60086:WfrcR%=&400D1:XWfrcR%=&600D1:Wupdw%=&400C9:XCtGet%=&40763
1613WcSp%=&400D2:Ffnt%=&40081:Fctp%=&40089:Fctos%=&40088:Lfnt%=&40082:Strw%=&40085:WgR%=&600CA:Fsfnt%=&4008A:Wmess%=&400E7:Fcar%=&40087
1614Bbox%=&40097:XWscol%=&600E6:XWgrec%=&600CA:GSTrns%=&20027:WcGp%=&400D3:WcSp%=&400D2:Wcm%=&400D4:Wow%=&400C5:WclW%=&600C6:Wsist%=&400CD:Drwf%=&40702:Drwstr%=&40704:XDwS%=&60704
1615maino%=0:overmain%=0
1616Spop%=&2E:CtSfc%=&4074F:CtInval%=&40750:CtStb%=&40740:Wlt%=&600DB:Wcw%=&400C1:Wslt%=&600EC:Wgist%=&400CE:Wsist%=&400CD:Wgwst%=&400CB:Ptx%=&40086:WfrcR%=&400D1:XSndC%=&60140
1617Ffnt%=&40081:Fctp%=&40089:Fctos%=&40088:Lfnt%=&40082:Strw%=&40085:WgR%=&600CA:Fsfnt%=&4008A:Wmess%=&400E7
1618XOags%=&20009
1619Bbox%=&40097:XWscol%=&600E6:XWgrec%=&600CA:Wcm%=&600D4
1620
1621REM !!!PCA!!!
1622
1623REM PCA message numbers
1624Msg_Whos%=&83484:Msg_Im%=&83485:Msg_Do%=&83486:Msg_Desel%=&83487:Msg_Done%=&83488
1625Msg_Moving%=&83489:Msg_Changed%=&8348A:Msg_Resize%=&8348B:Msg_Uparea%=&8348C:Msg_ResizeAck%=&8348D:Msg_Misc%=&8348E:Msg_Info%=&8348F
1626Sub_Give%=&83480:Sub_Associated%=&83481
1627
1628Msg_ObjPos%=&83490:Msg_Hook%=&83491:Msg_Unhook%=&83492
1629
1630REM PCA popup dialogue/menu
1631util$="#Utilities":pcatask%=0:DIM utiltsk%(24),utilid%(24),uf%(24),utils$(24):utile%=0:uboxw%=0:uboxh%=96
1632popuptype%=0:m_pca%=0:REM 0 - dialogue 1 - menu
1633
1634REM pointers to remote objects
1635remotetag%=-1:wn$=""
1636
1637pcol%=&FFFFFF00:size%=64:size2%=64/2+4:ppick%=0:lcpw%=0
1638
1639DIM strans% 32,stransW% 32,sgblk% 256,sgblkB% 256*4,savea% 1024,c0% 1024,Mgb% 256,ascale0p% 32,sgblkg% 256*4
1640
1641PROCms_load("<SPaint$Dir>.messages")
1642SYS"Wimp_SlotSize",-1,-1 TO slsiz%:basesiz%=slsiz%
1643ty01%=104:ty02%=64:tx01%=0:tx02%=258:viewR%=-1:viewG%=-1:viewB%=-1
1644DIM buff% &400,buffo% &400,buffb% &400,gb% &400,gbw% &200,gblk% &400,GWb% &400,gb2% &100
1645page%=64*1024:g%=0:handle1%=0
1646virtual%=0:m64%=64*1024*1024
1647mscd=1
1648
1649SYS"XOS_SWINumberFromString",,"DragASprite_Start" TO ds%;F
1650IFF AND1 THEN ds%=-1
1651SYS"XOS_SWINumberFromString",,"DragASprite_Stop" TO de%;F
1652IFF AND1 THEN de%=-1
1653SYS6,161,28 TO,,f%:IF (f% AND2)=0 THENds%=-1:de%=-1
1654
1655REM !!!PCA!!! local dynamic area and sprite details
1656local%=0:local2%=0:localtag%=-1:spria%=0:spril%=0:local$="Nothing"
1657
1658REM !!!PCA!!! inplace editing (remote) flags and storage...
1659inplace%=-1:localtask%=0:uflg%=0
1660
1661REM !!!PCA!!! inplace editing (local) flags and storage...
1662aremote%=-1:remotetask%=0
1663
1664DIM remoteicblk% 32*10:ricptr%=remoteicblk%:Rbdr%=0
1665
1666REM buffers for simple menu - can be scratch space
1667DIM cbstr% &120,cbbuff% &120
1668
1669end%=FALSE
1670savingfile%=0:DRAGGING%=0
1671DIM wad%(32),Wbtsk% &300,wid%(32),GB% &2400,styleindir &1300,generalstore% &500:wid%()=0:lastopen%=-1:gb%=GB%+&1700:gblk%=GB%+&1A00:Wb%=GB%:PROCsetupstores
1672EX%=FALSE
1673F%=0:outform%=0
1674ENDPROC
� >!RunImage
�
� SPaint 0.04
�
� � Rob Davison 1996
� Updated sometime...
�
?� Code sections relating to the PCA are commented !!!PCA!!!
4� not particularly easy to follow still...Sorry!
2� Now use PCA 'tags' and the PCASupport Module
�
� � � 1,�$+" "+Þ:Ș
�init_variables
&�initall:�assemble_blit:�init_Wimp
� �reperr(�$+"at code "+Þ)
�poll:�terminate
�
B� called on desktop mode change and when new object linked in.
?� creates colour translation tables for display of sprites.
��initsptrans
-ș XCtGet%,sblock%,"grad",-1,-1,sgblkg%,0
� !!!PCA!!!
E� update display�translation settings on mode changes/new objects
� remotetag%>0 �
Xș "XWimp_ReadPixTrans",&200,!remotetag%,!remotetag%+remotetag%!4,,,,stransW%,sgblk%
Bș XCtGet%,!remotetag%,!remotetag%+remotetag%!4,-1,-1,sgblk%,1
AstransWx=stransW%!8/!stransW%:stransWy=stransW%!12/stransW%!4
Jș Spop%,552,!remotetag%,!remotetag%+remotetag%!4 � ,,,xwhook%,ywhook%
!�
"�spria%>0 �
#K� reference via the tag is not strictly necessary here as it is a local
$)� object - but just for forms sake...
%Vș "XWimp_ReadPixTrans",&200,!localtag%,!localtag%+localtag%!4,,,,stransW%,sgblkB%
&@ș XCtGet%,!localtag%,!localtag%+localtag%!4,-1,-1,sgblkB%,1
'�
(+ș"OS_ReadModeVariable",-1,3 � ,,nocol%
)+ș&35,-1,11 � ,,sw%:ș&35,-1,12 � ,,sh%
*-ș&35,-1,4 � ,,xpix%:ș&35,-1,5 � ,,ypix%
+xpixf=xpix%:ypixf=ypix%
,!xpix%=1<<xpix%:ypix%=1<<ypix%
-'sw%=xpix%*(sw%+1):sh%=ypix%*(sh%+1)
.�
/
02� redraw the 'remote' (linked) sprites window.
1��rdremote(f%)
26�f% � ș Wupdw%,,Wb% � more% �șWrdw%,,Wb% � more%
3&x0%=Wb%!4-Wb%!20:y0%=Wb%!16-Wb%!24
4ȕ more%
53wx0%=Wb%!28:wy0%=Wb%!32:wx1%=Wb%!36:wy1%=Wb%!40
6�remotetag%>0 �
7Pș XSpop%,564,!remotetag%,!remotetag%+remotetag%!4,x0%,y0%,0,stransW%,sgblk%
8�
90�sc(0,0,0):ȓ Ȑ x0%,y0%,xwhook%*2,ywhook%*2
:�
;ș Wgr%,0,Wb% � more%
<�
=�
>
?(� redraw the 'local' sprites window.
@��rdlocal(f%)
A6�f% � ș Wupdw%,,Wb% � more% �șWrdw%,,Wb% � more%
B&x0%=Wb%!4-Wb%!20:y0%=Wb%!16-Wb%!24
Cȕ more%
D3wx0%=Wb%!28:wy0%=Wb%!32:wx1%=Wb%!36:wy1%=Wb%!40
E�localtag%>0 �
FNș XSpop%,564,!localtag%,!localtag%+localtag%!4,x0%,y0%,0,stransW%,sgblkB%
G�
H*�sc(0,0,0):ȓ Ȑ x0%,y0%,xwL%*2,ywL%*2
I�
Jș Wgr%,0,Wb% � more%
K�
L�
M
NB� find the width of a text string in the current desktop font.
Oݤtwid(s$)
P@ș"XOS_SWINumberFromString",,"Wimp_TextOp" � ;F:� (F �1)=0 �
Q ș"XWimp_TextOp",1,s$,0 � v%
R�
Sv%=�(s$)*16
T�
U=v%
V
W2� print some text in the current desktop font.
X��pp(x%,y%,tt$,bg%)
Yș "XWimp_TextOp",0,0,bg%
Z.ș"XWimp_TextOp",2+(1<<30),tt$,-1,-1,x%,y%
[�
\
]0� work out the width of a PCA dialogue item.
^N� uses fixed values for all but the width of the item name which can vary.
_ݤuwid(s$,xx%)
`v%=�twid(s$)
a� xx%<>0 �
b�
c=v%+32+40+64+84
d
e� !!!PCA!!!
f%� redraw pca dialogue box window.
g2� chosen%,down% are for when an item is chosen
h0� in order to simulate the button 'clicking'
i
j��rdpca(f%,chosen%,down%)
k8� f% � ș Wupdw%,,Wb% � more% �ș Wrdw%,,Wb% � more%
l]xscrol%=Wb%!20:yscrol%=Wb%!24:x0%=Wb%!4-xscrol%+4:y1%=Wb%!8:x1%=Wb%!12:y0%=Wb%!16-yscrol%
m#ș "Wimp_BaseOfSprites" � ,spa%
nȕ more%
o&menu$=�util$,�(util$)-�util$,"\"))
pp%=0:yy%=y0%+4
q� pca%=0 � utile%-1
rs$=�par("\",p%)
s?�chosen%=pca% � down% � �sc(&99,&99,&BB) � �sc(&AA,&AA,&CC)
t/ȓ Ȑ x0%,yy%+pca%*(uboxh%+8),uboxw%,uboxh%
uAA%=x0%:B%=yy%+pca%*(uboxh%+8):C%=A%+uboxw%:D%=B%+uboxh%:�bdr%
v%�chosen%=pca% � down% A%+=4:B%-=4
w
x'� display the sprite for this item.
y� utils$(pca%)<>"" �
z/ș XCtGet%,spa%,utils$(pca%),-1,-1,savea%,0
{Lș XSpop%,308,spa%,utils$(pca%),A%+12,B%+(uboxh%-68)/2,8,stransW%,savea%
|�
}
~D� display 'sm!info' if info available flag for this item is set.
Eș "XWimp_ReadPixTrans",&100,sblock%,"sm!info",,,,stransW%,savea%
�l� (uf%(pca%) � %10)<>0 � ș XSpop%,308,sblock%,"sm!info",A%+uboxw%-48,B%+(uboxh%-40)/2,8,stransW%,savea%
�
�� display the items name.
��� chosen%=pca% � down% � �pp(A%+((uboxw%-�twid(s$))/2),B%+uboxh%/2-12,s$,&BB999900) � �pp(A%+((uboxw%-�twid(s$))/2),B%+uboxh%/2-12,s$,&CCAAAA00)
��
�ș Wgr%,0,Wb% � more%
��
��
�
�� main redraw request proc.
���redraw(f%)
�w%=!Wb%
�
Ȏw% �
�� m_remote%:�rdremote(f%)
�� m_local%:�rdlocal(f%)
�� pca_w%:�rdpca(f%,-1,0)
��
��
�
�� Wimp Message receipt.
�
�G��recieve_msg:�l%=0� !Wb% �4:Wbtsk%!l%=Wb%!l%:�:le%=!Wb%:tsk%=Wb%!4
� msg$=�s(Wb%+44):mess%=Wb%!16
�Ȏ mess% �
��0:�terminate
� � 2:EX%=�:� Wb%!4<>Task_h% �
�Y� savingfile% � mox%=Wb%!28:moy%=Wb%!32:�savefile(�s(Wb%+44),Wb%!36=-1):savingfile%=�
�X� EX%=� � Wbtsk%!12=Wbtsk%!8:Wbtsk%!16=3:ș"Wimp_SendMessage",17,Wbtsk%,tsk% � EX%=�
��
��3
� EX%=0
�C� Wb%!40<&1000 � �read_andload(�s(Wb%+44),Wb%!40,Wb%!20,Wb%!24)
�5� EX%=� � Wb%!12=scrapref% � *REMOVE <Wimp$Scrap>
�N� EX%=� Wbtsk%!12=Wbtsk%!8:Wbtsk%!16=4:ș"Wimp_SendMessage",17,Wbtsk%,tsk%
��9
�
�)� !!!PCA!!! Incoming message handling
�
�,� Receipt of Msg_ImHere - record details
�
� Msg_Im%
�� utile%<24 �
�Gutil$=util$+"\"+�s(Wb%+28):utiltsk%(utile%)=tsk%:uf%(utile%)=Wb%!20
�L� IFuf%(utile%) AND %10000<>0 THEN uf%(utile%)=uf%(utile%) AND &FFFFFFEF
�/� Wb%!20 � 1<>0 � utils$(utile%)=�s(Wb%+60)
�utilid%(utile%)=Wb%!24
�v%=�uwid(�s(Wb%+28),Wb%!20)
��uboxw%<v% uboxw%=v%
�
utile%+=1
��
�
�.� Msg_Info%:�tsk%<>Task_h% � Wbtsk%!12=0 �
�6� Receipt of Message_Info - return an info string.
�/s$="Spaint - a very simple paint program. "
�Q�remotetag%>0 � s$=s$+"Linked to '"+wn$+"'" � s$=s$+"Not linked to anything."
�;�string0(Wbtsk%+20,s$):!Wbtsk%=24+�(�s(Wbtsk%+20)) � �3
�Wbtsk%!12=Wbtsk%!8
�ș Wmess%,17,Wbtsk%,tsk%
��
�;� return of Message_Info - display info string (if any)
�� Wb%!12=myref% �
�)�s(Wb%+20)<>"" � �repmsg(�s(Wb%+20))
��
��
�
�T� Receipt of Message_WhosAbout - check details of object and respond with ImHere
�� Msg_Whos%
�,� (Wb%!20 � &FFF)=&FF9 � tsk%<>Task_h% �
�T� v%=Wb%!24:v%=(!v%+v%!4)!40)>>27:IFv%=6 THEN:REM only 32bpp sprites need apply?
�1gb%!4=Task_h%:gb%!8=0:gb%!12=0:gb%!16=Msg_Im%
�8� inplace% � gb%!20=%10011 � gb%!20=%11:� flags word
�,gb%!24=0:�string0(gb%+28,"Simple Paint")
�;�string0(gb%+60,"!spaint"):!gb%=64+(�(�s(gb%+60)) � �3)
�ș Wmess%,17,gb%,tsk%
�� ENDIF
��
�
�9� Following not used by this example. This message is
�M� returned after the owning task has successfully changed the size of the
�J� object in response to Message_Resize sent. Check myref before acting
�7� as it may be a resize request by another program.
�� Msg_ResizeAck%
��Wb%!12=myref% �
��dotheresize:myref%=0
��
�
�$� Receipt of Message_DoYourStuff
�0� open remote window and display the object.
�
� Msg_Do%
�tsk%=Wb%!4
�'� are we already editing something?
�H� if so (and its not this tag), send the old local task an unhook...
�c� remotetag%>0 � remotetag%<>Wb%!24 � tskh%=localtask%:ms0%=0:ms1%=remotetag%:�pca(Msg_Unhook%)
�
�� new local task...
�localtask%=Wb%!4
�uflg%=Wb%!36
�H� beginning an inplace session so close the remote window (if open).
�6� (uflg% � %10000)<>0 � inplace% � �CwT(m_remote%)
�
�newmunge
�
�Y� inplace on so opentoolbar and send Msg_Hook (which will generate msg_ObjPos for us)
�o� (uflg% � %10000)<>0 � remotetag%>0 � inplace% � tskh%=localtask%:�pca(Msg_Hook%):�Ow(w_remotet%,-1,-1,-1)
�
�� object position message.
�0� open toolbar at correct position and depth
�� Msg_ObjPos%
�
�� Wb%!24=remotetag% �
�=remotescale%=Wb%!48:remotexpos%=Wb%!52:remoteypos%=Wb%!56
�Dremotescaley%=Wb%!28:�remotescaley%=0 remotescaley%=remotescale%
�xown%=Wb%!32:yown%=Wb%!36
�!gblk%=w_remotet%:gblk%!4=Wb%!32:gblk%!8=Wb%!36-64:gblk%!12=gblk%!4+192:gblk%!16=gblk%!8+64:gblk%!20=0:gblk%!24=0:gblk%!28=Wb%!44:ș Wow%,,gblk%
��
�
�� sent an unhook message.
�8� as Spaint can handle both sides of the protocol it
�L� must check to see if it is the remote or local task which is asking it
�� to unhook.
�� Msg_Unhook%
�C� remote task - therefore we are the local so delete trap icon.
�
�T�Wb%!24=localtag% � tsk%=remotetask% � �deleteRicon(0):aremote%=-1:remotetask%=0
�F� local task - therefore we are the remote so close window/toolbar
�e� Wb%!24=remotetag% � tsk%=localtask% � remotetag%=-1:�Cw(m_remote%):�Cw(w_remotet%):localtask%=0
�
�*� sent a hook message by a remote task
�,� create a trap icon and send Msg_ObjPos
�� Msg_Hook%
� Wb%!24=localtag% �
?remotewin%=Wb%!32:remotetask%=Wb%!4:aremote%=0:rbut%=Wb%!28
5remoteicon%=�createRicon(0,0,xwL%*2,ywL%*2,rbut%)
E�gwi(m_local%):y1a%=y1%-yscrol%:yscrola%=yscrol%:xscrola%=xscrol%
xposU%=winx%:yposU%=y1a%
xposL%=xposU%:yposL%=yposU%
�xposL%<x0% � xposL%=x0%
�yposL%<y0% � yposL%=y0%
�xposL%>x1% � xposL%=x1%
�yposL%>y1% � yposL%=y1%
sfac%=65536:� 100% scale
Jms2%=m_local%:ms3%=w_localt%:v%=s%:tskh%=remotetask%:�pca(Msg_ObjPos%)
�
� Message_Changed message
!� assume nothing is the same!
� Msg_Changed%
#� Wb%!24=remotetag% � �newmunge
P�Wb%!24=localtag% � tsk%<>Task_h% � �prime_local(local$):�redrawit(m_local%)
C� Message_Deselect - delink from object as it has been deleted.
� Msg_Desel%
A�Wb%!24=localtag% � � aremote%>=0 �deleteRicon(0):aremote%=-1
�Wb%!24=remotetag% �
remotetag%=0:localtask%=0
#wn$="Nothing":$maint%="Nothing"
5� maino% � �redrawit(m_remote%) � �Cw(w_remotet%)
�
:� Message_Done% someone has modified the entire object
L� so redraw it. Its size and other parameters are still the same though.
� Msg_Done%
�remotetag%=Wb%!24 �
!�redrawit(m_remote%)
"�
#�Wb%!24=localtag% �
$�redrawit(m_local%)
%�
&
'B� Message_UpdateArea - an area of the object has been modified
(4� update the correct area of the window quickly.
)� Msg_Uparea%
*�remotetag%=Wb%!24 �
+=ms0%=Wb%!28:ms1%=Wb%!32:ms2%=Wb%!36-ms0%:ms3%=Wb%!40-ms1%
,spritexm%=4:spriteym%=4
-+�redrawW(m_remote%,ms0%,ms1%,ms2%,ms3%)
.�
/�localtag%=Wb%!24 �
0=ms0%=Wb%!28:ms1%=Wb%!32:ms2%=Wb%!36-ms0%:ms3%=Wb%!40-ms1%
1spritexm%=4:spriteym%=4
2*�redrawW(m_local%,ms0%,ms1%,ms2%,ms3%)
3�
4
5<� Example return from Message_MiscOp (Compo_GiveDetails)
6� not used by this program.
7 � Msg_Misc%:�tsk%<>Task_h% �
8Ȏ Wb%!20 �
9� Sub_Associated%
: �4,30
;� '"Details of object "
<� '"Masks:"
=1�xx%=0 � 4:� xx%;" address="~Wb%!(40+xx%*4):�
>� '"Opacity=";Wb%!68
?� "Math=";Wb%!72
@�
A�
B
C�&400C1:�initsptrans
D8�&400C0:ș"Wimp_CreateSubMenu",,Wb%!20,Wb%!24,Wb%!28
E�&502:�helptext
FF� &47700,&47701:vh%=Wb%!20:v2%=Wb%!28:� mess%=&47700 � oFCOL1%=v2%
G� (Wb%!24 � 1)=1 � v2%=-1
H,ȗ mx%,my%,bt%:�(bt%=5 � mess%=&47700) �
I� ColourChanged
Jpcol%=v2%:oFCOL1%=pcol%
K�
Lmess%=-1
M!�&47702:vh%=Wb%!20:v2%=Wb%!28
Nȗ mx%,my%,b%
Opcol%=oFCOL1%
P'� b%<>1 � ș&67703,0,Wb%!20:lcpw%=0
Q�
R�
S
T� !!!PCA!!!
Um� new or radically modified remote object so re-read its details (width and height may have changed etc.)
V��newmunge
W� Wb%!20<>&FF9 �
X"� woops, we can't edit that...
YN� remotetag%>0 � tskh%=localtask%:ms0%=0:ms1%=remotetag%:�pca(Msg_Unhook%)
Z0remotetag%=-1:wn$="Nothing":�Cw(m_remote%):�
[�
\remotetag%=Wb%!24
]L�mess%=Msg_Do% � wn$=�s(Wb%+40):�wn$="" � wn$="<The image with no name>"
^8�mess%=Msg_Changed% � w$=�s(Wb%+32):�w$<>"" � wn$=w$
_�initsptrans
`Jș Spop%,552,!remotetag%,!remotetag%+remotetag%!4 � ,,,xwhook%,ywhook%
a'� (uflg% � %10000)=0 � inplace%=0 �
b)�prime_remote:�Ow(m_remote%,-1,-1,-1)
c�
d�
e�
f
g� !!!PCA!!!
h� new/updated local image
i� broadcast Message_Changed
jH� alternative would be to broadcast Message_Deselect for old object.
kC� in this case we ask anyone who was linked into the old object
lP� to accept the new one. This may fail (eg new object is different type/bpp)
mK� in which case the app receiving Message_Changed should delink quietly
n��loadsprite(s$)
o
local$=s$
p�r_fi(s$):spril%=length%
q7�doclaimg(spril%,spria%,"mem1","SPaint image",m64%)
rGlocal%=�ourarea(spria%):!local%=spril%:�"LOAD "+s$+" "+�~(local%+4)
s3local2%=local%+local%!8:� first sprite in area.
t� !!!PCA!!!
u�localtag%=-1 �
v<ș"PCA_CreateTag",,local%,local%!8,!local%,0 � localtag%
w�
x+localtag%!0=local%:localtag%!4=local%!8
y�
z5� hack - we can't resize when the window is open!
{-!Wb%=m_local%:ș "XWimp_CloseWindow",,Wb%
|�prime_local(s$)
}�Ow(m_local%,-1,-1,-1)
~�redrawit(m_local%)
7ms0%=localtag%:ms0$=�gls(local$):�pca(Msg_Changed%)
��mini_poll(8)
�<�aremote%>=0 � �resizeRicon(0,0,0,xwL%*xpix%,ywL%*ypix%)
��
�
�?� open the local window to suit the new size of the object.
���prime_local(s$)
�local2%=local%+local%!8
�Aș Spop%,552,!localtag%,!localtag%+localtag%!4 � ,,,xwL%,ywL%
��local%>0 �
�Uș "Wimp_ReadPixTrans",&200,!localtag%,!localtag%+localtag%!4,,,,stransW%,sgblkB%
�@ș XCtGet%,!localtag%,!localtag%+localtag%!4,-1,-1,sgblkB%,1
��
�8�setsize(m_local%,ywL%*ypix%/ypixf,xwL%*xpix%/xpixf)
�$localt%="Local:"+s$
��
�
���prime_remote
�?�setsize(m_remote%,ywhook%*ypix%/ypixf,xwhook%*xpix%/xpixf)
�$maint%="Linked to:"+wn$
�Z�maino% � !Wb%=m_remote%:șWgwst%,,Wb%:�CwT(m_remote%):x%=Wb%!4:y%=Wb%!8 � x%=-1:y%=-1
��Ow(m_remote%,x%,y%,-1)
��
�
�� quit the program.
���terminate
�W� !!!PCA!!! local must remember to broadcast Msg_Desel before removing your object.
�#�localtag%>0 � �pca(Msg_Desel%)
�<� localtag%>0 � ș"PCA_DeleteTag",localtag%:localtag%=-1
�
�<� !!!PCA!!! remote must send Msg_Unhook before quitting.
�O� remotetag%>0 � tskh%=remotetask%:ms0%=1:ms1%=remotetag%:�pca(Msg_Unhook%)
�spril%=0:�killara(spria%)
��ms_end
�+ș"Wimp_CloseDown",Task_h%:ș"XOS_Exit"
��
�
�&� user clicked in a remote window.
���remote_win
��Bt%=2 �
�G�gpi:ppick%=�picker("Paint colour",pcol%,mox%-128,moy%+128,%1,%100)
��
��
��remotetag%=0 �
��Icn%<>-&414350 �
�G!gb%=m_remote%:ș Wgwst%,,gb%:winx%=gb%!4-gb%!20:y1a%=gb%!16-gb%!24
�scalefacX=1:scalefacY=1
�"moy%=moy%-y1a%:mox%=mox%-winx%
��
� scalefacX=remotescale%/65536
�!scalefacY=remotescaley%/65536
�&winx%=remotexpos%:y1a%=remoteypos%
��
�omox%=mox%:omoy%=moy%
��
�0�swtos(!remotetag%,!remotetag%+remotetag%!4)
�C�Bt%=4 ș CtSgcol%,pcol%,,,256,0 � �Bt%=1 ș CtSgcol%,0,,,256,0
�ȏ Ȑ mox%,moy%,size2%
�
�swbak
�Kms0%=mox%-size2%:ms1%=moy%-size2%:ms2%=mox%+size2%+4:ms3%=moy%+size2%+4
��ms0%<0 ms0%=0
��ms1%<0 ms1%=0
�"�ms2%>xwhook%*2 ms2%=xwhook%*2
�"�ms3%>ywhook%*2 ms3%=ywhook%*2
�� maino% �
�`!Wb%=m_remote%:Wb%!4=ms0%*mscd:Wb%!8=ms1%*mscd:Wb%!12=Wb%!4+ms2%*mscd:Wb%!16=Wb%!8+ms3%*mscd
�ș Wupdw%,,Wb% � more%
�&x0%=Wb%!4-Wb%!20:y0%=Wb%!16-Wb%!24
�ȕ more%
�Oș Spop%,564,!remotetag%,!remotetag%+remotetag%!4,x0%,y0%,0,stransW%,sgblk%
�ș Wgr%,0,Wb% � more%
��
��
�� !!!PCA!!!
�,� user has painted into remote object so
�6� broadcast message_updatearea so other apps using
�A� the object can redraw the appropriate part of their windows
��pca(Msg_Uparea%)
��mini_poll(1)
�'�gpi:mox%=mox%-winx%:moy%=moy%-y1a%
�+mox%=mox%/scalefacX:moy%=moy%/scalefacY
�� Bt%=0
��
�
�
���Riconpositions
�
�;� do resizeRicon for each linked object which has moved
�
��
�
�� delete 'remote' trap icon
�*� this is a _simple_ version as Spaint
�+� can only handle one object at a time.
�5� more sophistocated apps will have to do better.
�
���deleteRicon(i%):�i%<0 �
�9!gblk%=m_local%:gblk%!4=i%:ș"Wimp_DeleteIcon",,gblk%
�0�i%*32+remoteicblk%=ricptr%-32 � ricptr%-=32
�5ȕ (ricptr%!20 � 1<<23)<>0 � ricptr%>remoteicblk%
�ricptr%-=32
��
��
�
�� resize 'remote' trap icon
�!��resizeRicon(i%,x%,y%,w%,h%)
�Aș"XWimp_ResizeIcon",m_local%,i%,x%,y%,(x%+w%),(y%+h%) � r0;F
�8� IF (F AND 1)<>0 THEN PROCreperr(FNs(r0+4)):ENDPROC
�E�gwi(m_local%):y1a%=y1%-yscrol%:yscrola%=yscrol%:xscrola%=xscrol%
�xposU%=winx%:yposU%=y1a%
�xposL%=xposU%:yposL%=yposU%
��xposL%<x0% � xposL%=x0%
��yposL%<y0% � yposL%=y0%
��xposL%>x1% � xposL%=x1%
��yposL%>y1% � yposL%=y1%
�sfac%=65536:� 100% scale
�Dms2%=m_local%:ms3%=w_localt%:tskh%=remotetask%:�pca(Msg_ObjPos%)
��
�
�?� !!!PCA!!! create a 'remote' trap icon to cover the object
�@� a simple version. For more complex apps (multiple objects)
�,� something better will have to be done.
�$ݤcreateRicon(x%,y%,w%,h%,flgs%)
�@�ricptr%>=remoteicblk%+32*10 � � 1,"Remote icon store full!"
�#flgs%=flgs%>>28:flgs%=flgs%<<12
�!ricptr%=m_local%
�Cricptr%!4=x%:ricptr%!8=y%:ricptr%!12=(x%+w%):ricptr%!16=(y%+h%)
�7ricptr%!20=flgs%:� Rbdr% ricptr%!20=ricptr%!20+%100
�.ș "Wimp_CreateIcon",aremote%,ricptr% � i%
ricptr%+=32
=i%
� !!!PCA!!!
%� send message on to remote task.
��remotemessage(R%)
sp%=-1:y1a%=y1%-yscrol%
)� locate object which matches icon...
)� Icn%=remoteicon% � remotetask%<>0 �
Ȏ R% �
� 6
Q!Wb%=!Wb%-winx%:Wb%!4=Wb%!4-y1a%:Wb%!8=tBt%:Wb%!12=remotewin%:Wb%!16=-&414350
�
,ș "Wimp_SendMessage",R%,Wb%,remotetask%
�
�
� !!!PCA!!!
$� Central Message despatch proc.
��pca(msg%)
J� don't bother with remote update messages if no remote object in use:
N�remotetag%=0 � (msg%=Msg_Resize% � msg%=Msg_Uparea% � msg%=Msg_Misc%) � �
7gb%!4=Task_h%:gb%!8=0:gb%!12=0:gb%!16=msg%:send%=17
Ȏ msg% �
� Send Message_WhosAbout
� Msg_Whos%
!util$="#Utilities":pcatask%=0
utiltsk%()=0:utile%=0
!utilid%()=0
"uf%()=0
#$uboxw%=0:� max width of dialogue
$� sprite, local tag
%)gb%!20=&FF9:gb%!24=localtag%:gb%!28=0
&%!gb%=32:th%=0:� broadcast message
'
(%� Ask task for info about itself.
)� Msg_Info%
*!gb%!20=0:!gb%=24:th%=pcatask%
+
,2� Tell task to do its stuff (link onto object)
-
� Msg_Do%
.)gb%!20=&FF9:gb%!24=localtag%:gb%!28=0
/8gb%!32=utilid%(item%):gb%!36=uf%(item%):rflg%=gb%!36
0!�string0(gb%+40,�gls(local$))
1!gb%=44+�(�s(gb%+40))� �3
2Bth%=utiltsk%(item%):� send message direct to appropriate task.
3
4<� Broadcast message_done (not used by this program as it
50� has no 'whole object modified' functions).
6� Msg_Done%
7gb%!20=&FF9
8gb%!24=remotetag%:gb%!28=0
9!gb%=32:th%=0
:
;"� Broadcast Message_UpdateArea
<B� so other tasks can redraw appropriate area of their windows.
=� Msg_Uparea%
>_gb%!20=&FF9:gb%!24=remotetag%:gb%!28=ms0%:gb%!32=ms1%:gb%!36=ms2%:gb%!40=ms3%:!gb%=44:th%=0
?
@(� Send Resize_Request to owning task
A� not used by this program.
B(� ms0% is the new size of the object
C$� total size - including header.
D3� owner will reply with ResizeAck if successful
E� Msg_Resize%
FMgb%!20=&FF9:gb%!24=remotetag%:gb%!28=0:gb%!32=ms0%:gb%!36=0:!gb%=40:th%=0
Gsend%=18
H
I� Broadcast Message_Changed
JO� sent when new local image and after ResizeAck and data structure changes.
K� Msg_Changed%
L$gb%!20=&FF9:gb%!24=ms0%:gb%!28=0
MR�ms0$<>"" � �string0(gb%+32,ms0$):!gb%=36+�(�s(gb%+32))� �3 � gb%!32=0:!gb%=36
N th%=0
O
P5� Broadcast Message_MiscOp with Sub_GiveInfoCompo
Q� not used by this program.
R� Msg_Misc%
SIgb%!20=Sub_Give%:gb%!24=&FF9:gb%!28=remotetag%:gb%!32=0:!gb%=36:th%=0
T
U<� Broadcast Message_Deselect as object has been deleted.
V� Msg_Desel%
Wgb%!20=&FF9
Xgb%!24=localtag%:gb%!28=0
YF!gb%=32:th%=0:pcatask%=0:remotetask%=0:�deleteRicon(0):aremote%=-1
Z
[$� send msg_objPos to remote task
\*� see Wimp_Poll loop for call details.
]� Msg_ObjPos%
^gb%!20=0
_gb%!24=localtag%:gb%!28=0
`rgb%!32=xposL%:gb%!36=yposL%:gb%!40=ms2%:gb%!44=ms3%:gb%!48=sfac%:gb%!52=xposU%:gb%!56=yposU%:th%=tskh%:!gb%=60
a!� send msg_Hook to local task
b5� this asks it to trap messages to the object and
c� pass them back to us.
d� Msg_Hook%
egb%!20=0
f9gb%!24=remotetag%:gb%!28=%11<<28:� window button type
g&gb%!32=m_remote%:!gb%=36:th%=tskh%
h
i� send msg_unhook
j� Msg_Unhook%
kgb%!20=0
lgb%!24=ms1%:gb%!28=0
m1gb%!32=m_local%:gb%!36=ms0%:!gb%=40:th%=tskh%
nD� Hey, thats our local tag (we'd better delete the trap icon...)
o?�ms1%=localtag% � remotetask%=0:�deleteRicon(0):aremote%=-1
p�
q
rC� send the message and keep ref for checking in Message_Receipt
s(ș Wmess%,send%,gb%,th%:myref%=gb%!8
t�
u
v� !!!PCA!!!
w#� generate the plug-in dialogue
x,� start by sending Message_WhosAbout and
y/� poll until the messages stop flooding in.
z
{��pcasprite
|�pca(Msg_Whos%)
}�
~�mini_poll(0)
� RR%=0
�
��util$="#Utilities" �
���repmsg("No utilities are available for this object at the moment. Please load a utility providing application and try again.")
��
�
�� simple menu...
��popuptype%=1 �
�Ocurrbuff%=cbstr%:maxbuff%=cbstr%+&80:menufree%=cbbuff%:menuend%=cbbuff%+&80
�;m_pca%=�cmen(util$):�gpi:�menu(m_pca%,mox%-186,moy%+12)
��
�$� ...or something more ambitious
�>!Wb%=pca_w%:ș "Wimp_DeleteWindow",,Wb%:c%=(1<<28)+(1<<29)
�U� If more than five utilities give it a scrollbar (and limit opened size to five)
�*� utile%>5 � e%=(1<<28)+(1<<29) � e%=0
�.pca_wblock%!28=(pca_wblock%!28 � �c%) � e%
� șWcw%,,pca_wblock% � pca_w%
�
�!� maximum height of dialogue.
�ole2h%=((uboxh%+8)*utile%)
�
�\� open as a menu positioned such that the first item is centred about the mouse pointer.
�
�X�gpi:�setsize3(pca_w%,ole2h%,uboxw%+10,mox%-uboxw%/2,moy%-ole2h%/2):wh%=Wb%!16-Wb%!8
�3�Cw(pca_w%):x%=mox%-uboxw%/2:y%=moy%+(uboxh%/2)
�
�<� while coping with pointer near the edge of the screen!
��x%<0 x%=0
��y%-wh%<0 y%=wh%
�
�ș Wcm%,,pca_w%,x%,y%
��
��
��
�
�R� general proc. for setting the maximum extent of a window - modified to limit
�N� the displayed size to a maximum of 5* the height of a pca dialogue item.
� ��setsize3(whn%,h%,w%,x%,y%)
��x%<0 x%=0
��y%<0 y%=0
�U!Wb%=whn%:șWgwst%,,Wb%:Wb%!4=0:Wb%!8=0:Wb%!16=h%:Wb%!12=w%:ș&600D7,whn%,(Wb%+4)
�(�h%>(uboxh%+8)*5 Wb%!16=(uboxh%+8)*5
�YWb%!28=-1:Wb%!4=Wb%!4+x%:Wb%!8=Wb%!8+y%:Wb%!12=Wb%!12+x%:Wb%!16=Wb%!16+y%:șWow%,,Wb%
��
�
�� !!!PCA!!!
�1� user has chosen an item in the PCA dialogue
�5� either send Message_DoYourStuff or Message_Info
�0� depending on flags and where user clicked.
�
��pca_win
�?� get window info an work out which button they clicked on.
�*�gwi(pca_w%):oBt%=Bt%:y1a%=y1%-yscrol%
�9item%=(moy%-y1a%)/(uboxh%+8):�item%>utile%-1 item%=-1
�xx%=mox%-winx%
�
��item%>=0 �
�� make the 'button' click
�h!Wb%=pca_w%:Wb%!4=0:Wb%!8=item%*(uboxh%+8):Wb%!12=vissizX%:Wb%!16=Wb%!8+(uboxh%+2):�rdpca(�,item%,�)
��:�gpi:� Bt%=0
�h!Wb%=pca_w%:Wb%!4=0:Wb%!8=item%*(uboxh%+8):Wb%!12=vissizX%:Wb%!16=Wb%!8+(uboxh%+2):�rdpca(�,item%,0)
�pcatask%=utiltsk%(item%)
�
�-� clicked on info or elsewhere in button?
�
�.� xx%<uboxw%-42 � ((uf%(item%) � %10)=0) �
�
�6� Does the utility want sole access to the object?
�0� (uf%(item%) � %1000)<>0 � �pca(Msg_Desel%)
�
�6� make _sure_ there is a tag for the local object.
�=� we do it when loading the object so this isn't strictly
�=� necessary...If you don' want a PCA tag for every object
�4� you create then this is the time to create it.
�
��localtag%<0 �
�6ș"PCA_CreateTag",,local%,local%!8,0,0 � localtag%
��
�*!localtag%=local%:localtag%!4=local%!8
��
�
�+� are we already in an inplace session?
�5� if so, send an unhook to the previous remote...
�O� ((uf%(item%) � %10000)<>0 � aremote%<>-1) � remotetask%=utiltsk%(item%) �
�O�remotetask%<>0 � tskh%=remotetask%:ms0%=1:ms1%=localtag%:�pca(Msg_Unhook%)
��
�)� tell the utility to do its stuff...
�pcatsk%=utiltsk%(item%)
��pca(Msg_Do%)
��
�+pcatsk%=utiltsk%(item%):�pca(Msg_Info%)
��
�
��
�
�,� Only close dialogue if SELECT clicked.
��oBt%=4 �Cw(pca_w%)
��
�
���select_menu
�.� �check_adj=� adjusting%=� � adjusting%=�
�'�mnhnd%=m_ibar% � !Wb%=2 �terminate
�N�mnhnd%=m_ibar% � !Wb%=1 � �oo(w_prefs%,4,inplace%):�Ow(w_prefs%,-1,-1,-1)
��mnhnd%=mm_remote% �
�
Ȏ !Wb% �
�� !!!PCA!!!
�4� not used by demo, example 'change object size'
�� function.
�� 1:� double size request
�Ucursize%=!remotetag%:cursize%=!cursize%:� read total size from sprite area header
�Nadat%=!remotetag%+remotetag%!4:adat%=adat%+adat%!32:hdr%=adat%-!remotetag%
�%ms0%=hdr%+xwhook%*4*2*(ywhook%*2)
��pca(Msg_Resize%)
�� 2:�pca(Msg_Misc%)
��
��
��mnhnd%=m_pca% �
�item%=!Wb%
�5� (uf%(item%) � %1000)<>0 � v%=0:�pca(Msg_Desel%)
�pcatask%=utiltsk%(item%)
��pca(Msg_Do%)
��
�2� adjusting% � �menu(mnhnd%,mousex%,mousey%):�
�
mnhnd%=-1
��
�
���prefs_win
�
Ȏ Icn% �
�Q� 2,3:popuptype%=Icn%-2:�uiG(w_prefs%,2,3,0):�ui(w_prefs%,popuptype%+2,1<<21)
�4� 4:inplace%=� inplace%:�oo(w_prefs%,4,inplace%)
� !!!PCA!!!
-� user has toggled inplace editing option
#� Did we begin with inplace on?
*� (uflg% � %10000)<>0 � remotetag%>0 �
�inplace%=0 �
E� yes, now off so send (temporary) unhook and open remote window.
=tskh%=localtask%:ms0%=0:ms1%=remotetag%:�pca(Msg_Unhook%)
�prime_remote
Z�maino% � !Wb%=m_remote%:șWgwst%,,Wb%:�CwT(m_remote%):x%=Wb%!4:y%=Wb%!8 � x%=-1:y%=-1
�Ow(m_remote%,x%,y%,-1)
�Ow(m_remote%,-1,-1,-1)
�redrawit(m_remote%)
�
H� yes, and now turned on again so close our window and send Msg_Hook
N�CwT(m_remote%):tskh%=remotetask%:�pca(Msg_Hook%):�Ow(w_remotet%,-1,-1,-1)
�
�
�
�
��remoteT_win
Ȏ Icn% �
I� !!!PCA!!! User has clicked close icon in remote toolbar - we unhook
o� 0:tskh%=remotetask%:ms0%=1:ms1%=remotetag%:�pca(Msg_Unhook%):remotetag%=-1:�Cw(m_remote%):�Cw(w_remotet%)
F� 1:ppick%=�picker("Paint colour",pcol%,mox%-128,moy%+128,%1,%100)
�
�
��localT_win
Ȏ Icn% �
� 0:� info
!� 1:� utils
"�pcasprite
#� 2:� close
$� !!!PCA!!!
%/�localtag%>0 �pca(Msg_Desel%):�Cw(m_local%)
&�
'�
(
)M��click:tBt%=Wb%!8:Bt%=tBt%:mox%=Wb%!0:moy%=Wb%!4:Icn%=Wb%!16:Win%=Wb%!12
*
Ȏ Win% �
+� m_remote%:�remote_win
,� m_local%:�local_win
-� pca_w%:�pca_win
.� w_prefs%:�prefs_win
/)� w_report%:� Icn%=0 � �Cw(w_report%)
0� w_remotet%:�remoteT_win
1� w_localt%:�localT_win
2� -2
37� Icn%=icnbh% � Bt%=2 � �menu(m_ibar%,mox%-144,204)
4� Icn%=icnbh% � Bt%=4 �
5!�remotetag%>0 � localtag%>0 �
6!� remotetag%>0 � � inplace% �
7?EX%=0:�prime_remote:� � EX% �Ow(m_remote%,-1,-1,-1) � EX%=0
8�
9I� remotetask%<>0 � inplace% � remotetag%>0 � �Ow(w_remotet%,-1,-1,-1)
:�
;�localtag%>0 �
</�prime_local(local$):�Ow(m_local%,-1,-1,-1)
=�
>�
?q�reperr("Spaint has nothing to work on at the moment. Either link an image in or drag an image to the icon.")
@�
A�
B�
C�
D
E
Fg� *************************************************************************************************
G0� bits'n pieces of little interest follow...
H
IWݤgetpath(s$):n%=�(s$):�:ch$=�s$,n%,1):n%-=1:�(n%<=0 � ch$="." � ch$=":" � ch$=�13)
J� n%>0 �=�s$,n%+1)
K=s$
L
MTݤvarpresent(s$):ș"XOS_ReadVarVal",s$,gblk%,(1<<31),0,3 � ,,exists%:=exists%<>0
N
OSݤgls(s$):n%=�(s$):�:ch$=�s$,n%,1):n%-=1:�(n%<=0 � ch$="." � ch$=":" � ch$=�13)
P� n%>0 � =�s$,�(s$)-n%-1)
Q=�s$,10)
R
S��r_fi(nme$)
T4ș "XOS_File",5,nme$ � there%,B,ft%,D,length% ;F
Uft%=(ft%>>8) �&FFF
V� (F � 1)<>0 �there%=255
W��ft%=&FCA � there%=1 � ff%=�(nme$):ș"OS_GBPB",4,ff%,gblk%,32:�#ff%:ff%=0:orlen%=gblk%!4:type%=!(gblk%+8):type%=(type%>>8) � &FFF
X� IFft%=pshopty%
Yr� there%=1 � ff%=�(nme$):ș"OS_GBPB",4,ff%,gblk%,32:�#ff%:ff%=0:� !gblk%=&53504238 � ft%=&524F42:type%=&524F42
Z�
[
\/��frc_redraw:ș WfrcR%,-1,0,0,&FFFF,&FFFF:�
]
^J��CwT(hand%):� (Temporary) close window - used to allow window resize.
_�hand%<=0 �
`)!Wb%=hand%:ș"XWimp_CloseWindow",,Wb%
aL� hand%=m_remote% � maino%=0:!Wb%=w_remotet%:ș "XWimp_CloseWindow",,Wb%
bA� hand%=m_local% � !Wb%=w_localt%:ș "XWimp_CloseWindow",,Wb%
c�
d
e��Cw(hand%)
f�hand%<=0 �
g)!Wb%=hand%:ș"XWimp_CloseWindow",,Wb%
hL� hand%=m_remote% � maino%=0:!Wb%=w_remotet%:ș "XWimp_CloseWindow",,Wb%
iA� hand%=m_local% � !Wb%=w_localt%:ș "XWimp_CloseWindow",,Wb%
j[� !!!PCA!!! closing local window - tell the remote to close its toolbar with an unhook.
kO�hand%=m_local% � tskh%=remotetask%:ms0%=1:ms1%=localtag%:�pca(Msg_Unhook%)
l
m7� !!!PCA!!! closing remote window - tell the local.
n^�hand%=m_remote% � tskh%=localtask%:ms0%=1:ms1%=remotetag%:�pca(Msg_Unhook%):remotetag%=-1
o
p�
q
r0ݤConfirmchange(str1$):!GB%=1:$(GB%+4)=str1$
s2ș "Wimp_ReportError",GB%,19,"SPaint" � ,resp%
t=(resp%=1)
u
v��mini_poll(s5%)
w�s2%=0 �s5%
xș&400C7,0,Wb% � RR%
yȎ RR% �
z�1:�redraw(0)
{�2
|șWow%,,Wb%
}�3
~
�Cw(!Wb%)
�4
��5
��6:�mini_click
��7:
��8:�key_pressed
�!�17,18,19:R%=RR%:�recieve_msg
��
��
��
�
���mini_click
��
�
���local_win
�2�Icn%>=0 � �gwi(m_local%):�remotemessage(R%):�
��Bt%=4 � (�-1 � �-2) �
��pcasprite
��
�1�Bt%=2 � �gpi:�menu(m_ibar%,mox%-128,moy%+48)
��
�
�ݤspritep1(v%):=v%+v%!8
�Z��swtosm(v1%,v2%):� v1%<&8000 � v2%<&8000 � � &524F42,"Redirection to invalid sprite."
�J!savea%=0:șSpop%,573,v1%,v2%,savea% � sw0%,sw1%,sw2%,sw3%:switched%=�
��
�Y��swtos(v1%,v2%):� v1%<&8000 � v2%<&8000 � � &524F42,"Redirection to invalid sprite."
�J!savea%=0:șSpop%,572,v1%,v2%,savea% � sw0%,sw1%,sw2%,sw3%:switched%=�
��
���swto(v%)
�M!savea%=0:șSpop%,572,v%,v%+v%!8,savea% � sw0%,sw1%,sw2%,sw3%:switched%=�
��
���swbak
�9� switched% � șSpop%,sw0%,sw1%,sw2%,sw3%:switched%=0
��
�
� ݤpicker(s$,col%,x%,y%,f,f2)
�$gb%=s$
�A!Mgb%=f2:� col%=-1 � (f2 � %1)<>0 � col%=&FFFFFF00:!Mgb%=%111
�YMgb%!4=gb%:Mgb%!8=x%:Mgb%!12=(1<<31):Mgb%!16=(1<<31)-1:Mgb%!20=y%:Mgb%!24=0:Mgb%!28=0
�Mgb%!32=col%
�
Mgb%!36=0
�3ș"ColourPicker_OpenDialogue",f,Mgb% � h%,lcpw%
�=h%
�
���wword(� b%,v%)
�!b%=v%:b%+=4:�
���wstring(� b%,s$)
�$b%=s$:b%=b%+4+�(s$)� �3
��
�
���nudge
� �-58 moy%+=1:ȗ � mox%,moy%
� �-26 mox%-=1:ȗ � mox%,moy%
�!�-122 mox%+=1:ȗ � mox%,moy%
� �-42 moy%-=1:ȗ � mox%,moy%
��
�!��gpi:ȗ mox%,moy%,Bt%:�nudge
��
�
���rpanes
�(!gb%=!Wb%:ș Wgwst%,,gb%:flg%=gb%!32
�Ȏ h% �
�X� m_local%:!gblk%=w_localt%:tooly%=gb%!8-gb%!16+192:toolyy%=192:toolx%=64:toolxx%=64
�L� m_remote%:!gblk%=w_remotet%:tooly%=104:toolyy%=64:toolx%=0:toolxx%=192
��
�gblk%!28=Wb%!28
�J� (flg% � 2097152)=0 � (flg% � 131072)<>0 � Wb%!28<>-1 � Wb%!28=!gblk%
�� (flg% � 2097152)<>0 �
�� Wb%!28<>-1 Wb%!28=!gblk%
� ș Wow%,,Wb%:gblk%!28=Wb%!28
��
�bgblk%!8=Wb%!8-tooly%:�gblk%!8<0 � Wb%!8>0 � gblk%!8=0 � � Wb%!8<=0 � gblk%!8<0 � gblk%!8=Wb%!8
�gblk%!16=gblk%!8+toolyy%
�_gblk%!4=Wb%!4-toolx%:�gblk%!4<0 �Wb%!4>0 � gblk%!4=0 ��Wb%!4<=0 � gblk%!4<0 � gblk%!4=Wb%!4
�gblk%!12=gblk%!4+toolxx%-2
�gblk%!20=0:gblk%!24=0
�!� !gblk%<>h% � ș Wow%,,gblk%
�'� (flg% � 2097152)=0 � ș Wow%,,Wb%
��
�
�
��poll
�
��initsptrans
��:ș&400C7,1,Wb% � R%
�Ȏ R% �
��1:�redraw(0)
��2:h%=!Wb%
�7�h%=m_local% � h%=m_remote% � �rpanes � șWow%,,Wb%
�
� �h%=m_local% � aremote%>=0 �
�E�gwi(m_local%):y1a%=y1%-yscrol%:yscrola%=yscrol%:xscrola%=xscrol%
�xposU%=winx%:yposU%=y1a%
�xposL%=xposU%:yposL%=yposU%
��xposL%<x0% � xposL%=x0%
��yposL%<y0% � yposL%=y0%
��xposL%>x1% � xposL%=x1%
��yposL%>y1% � yposL%=y1%
�sfac%=65536:� 100% scale
�Dms2%=m_local%:ms3%=w_localt%:tskh%=remotetask%:�pca(Msg_ObjPos%)
��
��3:�Cw(!Wb%)
�
�6:�click
��7:
��8:�key_pressed
��9:�select_menu
��17,18:�recieve_msg
��
�� 0
��
���Ow(h%,x%,y%,bhnd%)
�� h%=m_remote% � maino%=-1
�!Wb%=h%:� x%=-1 � y%=-1 �
�+șWgwst%,,Wb%:Wb%!28=bhnd%:ș Wow%,,Wb%
�*� h%=m_local% � h%=m_remote% � �rpanes
��
��
�9șWgwst%,,Wb%:xsize%=Wb%!12-Wb%!4:ysize%=Wb%!16-Wb%!8
�E!Wb%=h%:Wb%!4=x%:Wb%!12=Wb%!4+xsize%:Wb%!8=y%:Wb%!16=Wb%!8+ysize%
�I� Wb%!8=y%:Wb%!16=Wb%!8+ysize%:Wb%!28=bhnd%:SYS"Wimp_OpenWindow",,Wb%
�ș"Wimp_OpenWindow",,Wb%
�*� h%=m_local% � h%=m_remote% � �rpanes
��
�
�3��rms:ș&35,-1,4 � ,,xpix%:ș&35,-1,5 � ,,ypix%
�+ș&35,-1,11 � ,,sw%:ș&35,-1,12 � ,,sh%
�Expix%=1<<xpix%:ypix%=1<<ypix%:sw%=xpix%*(sw%+1):sh%=ypix%*(sh%+1)
�xpixf=xpix%/2:ypixf=ypix%/2
��
�
��repmsg(str1$)
&�"POINTER 1":ș&35,-1,3 � ,,nocol%
^�wi(w_report%,1,str1$):$msgtit%="Spaint":ș Wgpi%,,GB%:�Ow(w_report%,!GB%-356,GB%!4-42,-1)
�
��reperr(str1$):mnhnd%=0
� �
,�� � � 1,"In Error code:"+�$+" "+Þ:Ș
7�"POINTER 1":ș"OS_ReadModeVariable",�,3 � ,,nocol%
�5
!gb%=1:$(gb%+4)=str1$
(ș "Wimp_ReportError",gb%,2,"Spaint"
�
:��key_pressed:win%=!Wb%:key%=Wb%!24:icn%=Wb%!4:mine%=�
�win%=lcpw% mine%=�
?�win%=gensave% � key%=13 � �oksave(�ri(gensave%,2)):mine%=�
&� � mine% ș"Wimp_ProcessKey",key%
�
*��read_andload(s$,ft%,win%,Icn%):EX%=0
Ȏ win% �
� -2,m_local%
�ft%=&FF9 �loadsprite(s$)
�
xwp%=0
�
ݤcheckpath(nme$)
L� �nme$,":")=0 � �nme$,"<")=0 � �nme$,".")=0 � nme$<>"<Wimp$Scrap>" � =�
=�
N��onoff(win%,Icn%,state%):�state% �ui(win%,Icn%,0) ��ui(win%,Icn%,2097152)
�
!
"��a(A%,B%):�NiceA%,A%,B%:�
#
$ ��da(A%,B%):�NiceDa%,A%,B%:�
%
&&��aG(A%,B%,C%):�NiceAg%,A%,B%,C%:�
'
(&��daG(A%,B%,C%):�NiceDag%,A%,B%,C%
)EșWcGp%,,gblk%:�!gblk%=A% � gblk%!4>=B% � gblk%!4<=C% �șWcSp%,-1
*�
+
,��warning(win%,icn%)
-E!Wb%=win%:Wb%!4=icn%:Wb%!8=11<<24:Wb%!12=%1111<<24:ș Wsist%,,Wb%
.�
/
0��ok(win%,icn%)
1D!Wb%=win%:Wb%!4=icn%:Wb%!8=7<<24:Wb%!12=%1111<<24:ș Wsist%,,Wb%
2�
3
4[��ui(hand%,no%,state%):!gb%=hand%:gb%!4=no%:gb%!8=state%:gb%!12=2097152:șWsist%,,gb%:�
5
6/��uiG(hand%,start%,end%,state%):�hand%<=0 �
7V!gb%=hand%:gb%!8=state%:gb%!12=2097152:�l%=start% �end%:gb%!4=l%:șWsist%,,gb%:�:�
8
9��wii(win%,icn%,text$):!gb%=win%:gb%!4=icn%:șWgist%,,gb%:�s(gb%!32)<>text$ $(gb%!32)=text$:gb%!8=0:gb%!12=0:șWsist%,,gb%
:�
;
<���wi(win%,icn%,text$):!gb%=win%:gb%!4=icn%:șWgist%,,gb%:�gb%!28<&8000 � gb%!28>&800000 �� &524F42,"Icon not indir. or invalid. Handle "+�icn%
=F�s(gb%!28)<>text$ �$(gb%!28)=text$:gb%!8=0:gb%!12=0:șWsist%,,gb%
>�
?
@$ݤicnok(win%,icn%):� icn%=0 � =0
A8!gb%=win%:gb%!4=icn%:șWgist%,,gb%:v%=gb%!(8+16)>>22
B� (v% � %1)=0 � =�
C=�
D
E��setsize(whn%,h%,w%)
Fc!Wb%=whn%:șWgwst%,,Wb%:Wb%!4=0:Wb%!8=0:Wb%!16=h%:Wb%!12=w%:ș&600D7,whn%,(Wb%+4):șWgwst%,,Wb%
G�
H
I#��loadsquashed(nme$,base%,off%)
J�
K:�� �reperr(�$,"(code "+Þ+")"):�resizeslot(0):EX%=�:�
Lș&406C0
M1�r_fi(nme$):rlen%=length%:length%-=off%:� ***
N*ș"Squash_Decompress",%1000,-1 � work%
O9ș"Wimp_SlotSize",-1,-1 � current,,free:free-=32*1024
PF�free<work%+4096+1024 ��reperr(�ms("Sorrlc"),""):EX%=�:�:� length%
Q>�free>work%+length%+outsize% � free=work%+length%+outsize%
REX%=0:�resizeslot(free)
S-� EX% � �reperr(�ms("Sorrlc"),""):EX%=�:�
T*freec%=free-work%:worka%=current+&8000
U%ș"Wimp_SlotSize",-1,-1 � current
V� freec%-length%>1024 �
WYouta%=worka%+work%+length%:outl%=(current+&8000)-outa%:ina%=worka%+work%:inl%=length%
X�
YPhlf%=freec%/2:outa%=worka%+work%+hlf%:outl%=hlf%:ina%=worka%+work%:inl%=hlf%
Z�
[r5%=outl%:otype%=-1
\-fileoff%=0:offe%=�:cont%=0:r3%=0:start%=0
]2� inl%>=length% � outl%>=outsize% �start%=%100
^ș"Hourglass_Percentage",0
_�
`,offc%=inl%:�getbit(nme$,off%,ina%,offc%)
a5r1%=worka%:r2%=ina%:r3%=offc%:r4%=outa%:r5%=outl%
b �:� offe% � cont%=0 �cont%=1
c4ș"Hourglass_Percentage",(fileoff%/outsize%)*100
d_ș"Squash_Decompress",start% � (cont%<<1),r1%,r2%,r3%,r4%,r5% � status%,r1%,r2%,r3%,r4%,r5%
estart%=1
fa� status%=2 ��storeaway(outa%,r4%-outa%,fileoff%,base%,outsize%,otype%,0):r4%=outa%:r5%=outl%
g7�fileoff%>=outsize% �status%=0:off%=rlen%:r4%=outa%
h� status%=1 � status%=0
iT�storeaway(outa%,r4%-outa%,fileoff%,base%,outsize%,otype%,0):r4%=outa%:r5%=outl%
joff%+=(offc%-r3%)
k� off%>=rlen% � status%=0
lș&406C1
m�resizeslot(0)
n�
oS��getbit(nme$,off%,addr%,� offc%):� off%+offc%>rlen% � offc%=rlen%-off%:offe%=�
p�offc%=0 ��
qAF%=�(nme$):�#F%=off%:ș"OS_GBPB",4,F%,addr%,offc%:�#F%:F%=0:�
rf��storeaway(unsquashbuffer,unsquashed,� fileoff%,base%,outsize%,otype%,filter%):� unsquashed<=0 ��
sfA%=unsquashbuffer:B%=base%+fileoff%:C%=unsquashed:� B%+C%>base%+outsize% �C%=(base%+outsize%)-(B%)
t+� A%�4=0 � B%�4=0 � C%�4=0 � D%=0 �D%=1
u6� C%>0 � �moveto,A%,B%,C% � C%=0:fileoff%=outsize%
vfileoff%+=C%
w�
x
y��carpos
z�
{
|���gwi(hand%):!gb%=hand%:ș Wgwst%,,gb%:x0%=gb%!4:y0%=gb%!8:x1%=gb%!12:y1%=gb%!16:vissizX%=x1%-x0%:vissizY%=y1%-y0%:xscrol%=gb%!20:yscrol%=gb%!24:winx%=x0%:wy%=y0%
}'wflg%=gb%!32:wo%=(wflg% � 1<<16)<>0
~wy%+=yscrol%:winx%-=xscrol%
�
�
�Bݤri(win%,icn%):!gb%=win%:gb%!4=icn%:șWgist%,,gb%:=�s(gb%!28)
�Fݤr_icid(win%,icn%):!gb%=win%:gb%!4=icn%:șWgist%,,gb%:=�s(gb%!32)
�l��w_icid(win%,icn%,s$):!gb%=win%:gb%!4=icn%:șWgist%,,gb%:$(gb%!32)=s$:gb%!8=0:gb%!12=0:ș Wsist%,,gb%:�
�O��helptext:Wb%!16=&503:Wb%!12=Wb%!8:icn%=Wb%!36:nme$="":htx%=-1:Ȏ Wb%!32 �
��
�V$(Wb%+20)=nme$:Wb%!0=(((20+�(nme$)+1)�4)*4)+4:$(Wb%+21+�(nme$))=�0:șWmess%,17,Wb%
��
�
�B��sc(r%,g%,b%):ș CtSgcol%,(b%<<24)+(g%<<16)+(r%<<8),,,256,0:�
�C��scE(r%,g%,b%):ș CtSgcol%,(b%<<24)+(g%<<16)+(r%<<8),,,256,3:�
�A��isld(x%,y%,w%):� w%>0 � w%<256 � ȓ Ȑ x%+(255-w%),y%,w%,18
�:�w%<255 � w%>=0 � ș XWscol%,0:ȓ Ȑ x%,y%,(255-w%),18
�3�w%<0 � w%>255 �ș XWscol%,2:ȓ Ȑ x%,y%,256,18
��
�
�&��string0(l%,a$):$l%=a$:l%?�a$=0:�
�
���ar(v%)
�*�!v%/(v%!8/xpixf)>v%!4/(v%!12/ypixf) �
�!v%=v%!4:v%!8=v%!12*xpixf
��
�*� xpixf<>1 � v%!4=!v%*xpixf � v%!4=!v%
�v%!12=v%!8*ypixf
��
��
�
����redrawW(h%,x00%,y00%,x11%,y11%):!Wb%=h%:Wb%!4=x00%*mscd-spritexm%:Wb%!8=y00%*mscd-spriteym%:Wb%!12=Wb%!4+x11%*mscd+spritexm%*2:Wb%!16=Wb%!8+y11%*mscd+spriteym%*2
��redraw(-1)
��
�
�ݤrword(v%)
�$v2%=v% �4:� v2%*4<>v% v%=v2%*4+4
�=v%
�ݤrword2(v%)
�"v2%=v% �4:� v2%*4<>v% v%=v2%*4
�=v%
����blobs(x0%,y0%,x1%,y1%,x2%,y2%,x3%,y3%):ȏ Ȑ wx%+x0%,wy%+y0%,6:ȏ Ȑ wx%+x3%,wy%+y3%,6:ȏ Ȑ wx%+x1%,wy%+y1%,6:ȏ Ȑ wx%+x2%,wy%+y2%,6:�
�!��blob(x%,y%):ȏ Ȑ x%,y%,6:�
�'��blob2(x%,y%):ȓ x%-4,y%-4,16,16:�
�
�h��redrawit(hand%):!GB%=hand%:ș"Wimp_GetWindowOutline",,GB%:ș WfrcR%,-1,GB%!4,GB%!8,GB%!12,GB%!16:�
�s��rdi(hand%,icn%):�hand%<=0 � � !gb%=hand%:gb%!4=icn%:șWgist%,,gb%:șWfrcR%,hand%,gb%!8,gb%!12,gb%!16,gb%!20:�
�/ȕ go%:ș"Wimp_GetRectangle",,GB% � go%:�:�
�i��getwininfo(hand%):!Wb%=hand%:șWgwst%,,Wb%:xbase%=Wb%!4:ybase%=Wb%!8:width%=Wb%!12:height%=Wb%!16:�
�dݤGetLeafname(name%):� ch$,n%,name$:name$=�s(name%):�((�name$,".")=0) �(�name$,":")=0)) � =name$
�En%=�(name$):�:ch$=�name$,n%,1):n%-=1:�(n%<=0 � ch$="." � ch$=":")
�#� n%>0 � =�name$,�(name$)-n%-1)
�=""
�ݤs(s%):�?s%<32 =""
�.n$="":ȕ ?s%>31 � �n$<255:n$+=�?s%:s%+=1:�
�=n$
�
���resizeslot(cc%)
�șWslt%,-1,-1 � ,,free%
�m� free%+(slsiz%-basesiz%)<cc% � EX%=�:�reperr(�ms_exp("mem1",�(((slsiz%-basesiz%+cc%)-free%)/1024),"")):�
�4șWslt%,(basesiz%+cc%),-1:șWslt%,-1,-1 � slsiz%
��slsiz%<basesiz%+cc% � EX%=�:ș Wslt%,basesiz%,-1:slsiz%=basesiz%:�reperr(�ms_exp("mem1",�((basesiz%+cc%-slsiz%)/1024),""))
�claims%=slsiz%-basesiz%
��
�
�ݤcheck_adj
�$ș"Wimp_GetPointerInfo",,GB%+300
�9� (%111 � GB%!308=1) � =� � � (%111 � GB%!308=2) � =2
�=�
�9ݤquitreq(E$,box%):� RES%:!GB%=0:$(GB%+4)=�E$,100)+�0
�n� box%=255 ș"Wimp_ReportError",GB%,19,"SPaint" � ,resp% � ș"Wimp_ReportError",GB%,box%,"SPaint" � ,resp%
�=resp%=1
�Dݤdecode(hand%,Wb%,gb%):ș"Wimp_DecodeMenu",,hand%,Wb%,gb%:=$gb%
�U��grey(h%,i%):�h%>0 !gb%=h%:gb%!4=i%:gb%!8=&2000000:gb%!12=&F000000:șWsist%,,gb%
��
���notselect(h%,i%):�h%<=0 �
�=!gb%=h%:gb%!4=i%:gb%!8=&A000:gb%!12=&F000:șWsist%,,gb%:�
�V��black(h%,i%):�h%>0 !gb%=h%:gb%!4=i%:gb%!8=&7000000:gb%!12=&F000000:șWsist%,,gb%
��
���encodemenu(mnhnd%)
�(�mnhnd%<&8000 � � 1,"Bad menuhandle"
�� PROCclm(m_remote%)
��
���tk(hand%,icn%):�icn%<0 �
�4hand%!(28+(24*icn%))=hand%!(28+(24*icn%))� &01:�
�\��clm(hand%):�hand%<&8000 � 1,"menu handle &"+�~hand%+" called for clearing is invalid."
�[hand%+=28:�:!hand%=!hand% ��1:hand%!8=hand%!8 ��&400000:hand%+=24:�!(hand%-24) � 2<<6:�
�>��shade(mh%,I%):mh%!(28+8+24*I%)=mh%!(28+8+24*I%)�&40000:�
�� �tick(mh%,I%):�I%<0 I%=0
�,mh%!(28+(24*I%))=mh%!(28+(24*I%))� &01:�
�Z��select(h%,i%):� h%>0 !gb%=h%:gb%!4=i%:gb%!8=&7000000:gb%!12=&F000000:șWsist%,,gb%:�
��
�Y��deselect(h%,i%):�h%>0 !gb%=h%:gb%!4=i%:gb%!8=&4000000:gb%!12=&F000000:șWsist%,,gb%
��
� ��msgrep(str1$):$errb%=str1$
��
�!gb%=0:$(gb%+4)=str1$
�9ș"Wimp_ReportError",gb%,17,"SPaint Message" � ,resp%
��
�
�B��initall:� BL% 16,nameblk% 255:adjusting%=�:mainW_active%=�:�
�V��init_Wimp:mnhnd%=0:�initSys:�sprites:�load_templates:�createmenus:scrapref%=-1:�
�
�;ݤtriplezero(v):� @%:@%=(1<<24)+(2<<16)+(3<<8)+12:=�(v)
�;ݤdoublezero(v):� @%:@%=(1<<24)+(2<<16)+(2<<8)+12:=�(v)
�;ݤsinglezero(v):� @%:@%=(1<<24)+(2<<16)+(1<<8)+12:=�(v)
�Uݤazero(v):� @%:@%=(1<<24)+(2<<16)+(1<<8)+12:v$=�(v):��v$,2)=".0" � =�v$,�(v$)-2)
�=v$
�ݤalt(v%):�v% � =" *"
�=""
�
�
��initSys
�@ș "Wimp_Initialise",200,&4B534154,"Simple Paint" � ,Task_h%
�+� SpriteName% 14:$SpriteName%="!spaint"
�!Wb%=-1:Wb%!4=0:Wb%!8=0:Wb%!12=76:Wb%!16=76:Wb%!20=&7000311A:Wb%!24=SpriteName%:Wb%!28=1:Wb%!32=12:ș"Wimp_CreateIcon",,Wb% � icnbh%
��
�
�
��sprites
�
�#�r_fi("<SPaint$Dir>.Sprites22")
�j� there%<>1 � (ft%<>&FCA � ft%<>&FF9) � � � 1,"!Spaint.Sprites missing/corrupt. Please install again."
�b� ft%=&FCA � � sblock% orlen%+16:!sblock%=orlen%+16 � � sblock% length%+16:!sblock%=length%+16
�*sblock%!4=0:sblock%!8=16:sblock%!12=16
�� ft%=&FCA �
�Vfl%=orlen%+4:outsize%=orlen%:�loadsquashed("<SPaint$Dir>.Sprites22",sblock%+4,&14)
��EX% � ș "XOS_Exit"
��
��� ft%=&FF9 � șSpop%,522,sblock%,"<SPaint$Dir>.Sprites22" ��reperr("Spaint Sprites are corrupt or missing. Please reinstall the program.",""):ș"XOS_Exit"
��
��
�
�9��load_templates:st%=styleindir:ste%=styleindir+&1300
3ș"Wimp_OpenTemplate",,"<SPaint$Dir>.Templates"
hșWlt%,,wad%(1),st%,ste%,-1,"info",0 � ,,stx%:wad%(1)!64=sblock%:st%=stx%:ș Wcw%,,wad%(1) � w_info%
#split_hand%=-1:restore_hand%=-1
_ș Wlt%,,GB%,st%,ste%,-1,"generalsave",0 � ,,stx%:GB%!64=1:st%=stx%:ș Wcw%,,GB% � gensave%
Yș Wlt%,,GB%,st%,ste%,-1,"prefs",0 � ,,stx%:GB%!64=1:st%=stx%:ș Wcw%,,GB% � w_prefs%
lș Wlt%,,GB%,st%,ste%,-1,"remote",0 � ,,stx%:maint%=st%:GB%!64=sblock%:st%=stx%:ș Wcw%,,GB% � m_remote%
kș Wlt%,,GB%,st%,ste%,-1,"local",0 � ,,stx%:localt%=st%:GB%!64=sblock%:st%=stx%:ș Wcw%,,GB% � m_local%
eșWlt%,,GB%,st%,ste%,-1,"report",0 � ,,stx%:GB%!64=1:msgtit%=st%:st%=stx%:șWcw%,,GB% � w_report%
bșWlt%,,GB%,st%,ste%,-1,"localtool",0 � ,,stx%:GB%!64=sblock%:st%=stx%:șWcw%,,GB% � w_localt%
dșWlt%,,GB%,st%,ste%,-1,"remotetool",0 � ,,stx%:GB%!64=sblock%:st%=stx%:șWcw%,,GB% � w_remotet%
� !!!PCA!!!
=� keep the window create block for the PCA dialogue as we
@� need to delete and recreate in order to add the scrollbar.
%� pca_wblock% 256,pca_windir% 100
kșWlt%,,pca_wblock%,pca_windir%,pca_windir%+100,-1,"ole2",0:GB%!64=sblock%:șWcw%,,pca_wblock% � pca_w%
4ș"Wimp_CloseTemplate",,"<SPaint$Dir>.Templates"
%� end% �4,30:ș6,4,0:ș 6,229,0:�
D� st%>=ste% � � 1,"indirection overlap when loading windows.":Ș
�PROCdefaultstrings
�
K��oo(win%,Icn%,state%):� state% �ui(win%,Icn%,0) � �ui(win%,Icn%,1<<21)
�
��allow(win%,icn%)
L!gb%=win%:gb%!4=icn%:gb%!8=0<<22:gb%!12=1<<22:ș"Wimp_SetIconState",,gb%
�
��disallow(win%,icn%)
!L!gb%=win%:gb%!4=icn%:gb%!8=1<<22:gb%!12=1<<22:ș"Wimp_SetIconState",,gb%
"�
#��createmenus
$,� menufree% &800:menuend%=menufree%+&800
%:� buffer% &400:maxbuff%=buffer%+&400:currbuff%=buffer%
&F%=�("<SPaint$Dir>.menus")
',�F%=0 � � � 1,�ms("nomenus"):ș"OS_Exit"
(submsg%=�:wid%()=4
)wbptr%=1
*
submsg%=�
+m_file%=�cmen(�#F%)
,#m_ibar%=�cmen(�#F%):numfonts%=0
-mm_remote%=�cmen(�#F%)
.�#F%
/�
0
1��menu(m%,moux%,mouy%)
2
mnhnd%=m%
3F�encodemenu(mnhnd%):ș"Wimp_CreateMenu",,mnhnd%,moux%+100,mouy%+12
47� moux%<>0 � mouy%<>0 � mousex%=moux%:mousey%=mouy%
5�
6ݤcmen(menu$)
7�menufree%>menuend%-28 =-1
8
�m%,m$
9"menuptr%=menufree%:i%=0:ctr%=0
:A�menu$,1)="#" � i%=1:menutitle$=�par("\",i%) � menutitle$=""
;�menuptr%!20=40:$menuptr%=menutitle$:menuptr%?12=7:menuptr%?13=2:menuptr%?14=7:menuptr%?15=0:menuptr%!16=172:menuptr%!24=0:menuptr%+=28:maxx%=�menutitle$-3
<L�:item$=�par("\",i%):�menuitem(item$):� item$="" � menuptr%>=menuend%-24
=%!(menuptr%-24)=!(menuptr%-24)�&80
>"m%=menufree%:m%!16=maxx%*16+12
?menufree%=menuptr%
@=m%
A��menuitem(nme$)
B�nme$="" �
C�menuptr%+24>menuend% �
D&� flg%,i%:�submsg% flg%=8 � flg%=0
Ei%=�nme$,">")
F�i%>0 �
GCsubptr%=��nme$,i%+1):�nme$,i%+1)="i_font%" fontsub%=menuptr%+4
Hnme$=�nme$,i%-1)
I� subptr%=-1
J�
K/��nme$,1)="#" nme$=�nme$,�nme$-1):flg%+=&02
L;menuptr%!0=flg%:menuptr%!4=subptr%:menuptr%!8=&07000021
M�nme$,1)="$" �
N1!menuptr%+=&04:menuptr%!8+=&100:i%=�nme$,"(")
O3�i%>0 � L%=��nme$,i%+1):nme$=�nme$,i%-1)� L%=12
P7menuptr%!12=��nme$,2):menuptr%!16=-1:menuptr%!20=L%
Q�L%>15 � L%=15
Rnme$=�L%-1," ")
S�
T�nme$<=12 �
U$(menuptr%+12)=nme$
V%� I%=�workspace(�nme$+1):$I%=nme$
WRmenuptr%!12=I%:menuptr%!16=-1:menuptr%!20=�nme$+1:menuptr%!8=menuptr%!8 � &100
X�
Y�
Z�nme$>maxx% maxx%=�nme$
[menuptr%+=24
\�
]Rݤpar(sep$,� pos%):i1%=pos%+1:pos%=�menu$+sep$,sep$,i1%):=�menu$,i1%,pos%-i1%)
^ݤworkspace(L%)
_Y� currbuff%+L%>maxbuff% � � 1,"No room to store menu definitions - too many fonts ?"
`currbuff%+=L%:=currbuff%-L%
an��setupstores:offset%=0:�+2:�lopx%=1 �2:� required%:wad%(lopx%)=generalstore%+offset%:offset%+=required%:�
b3�offset%>&800 � 1,"No room for window storage."
c�
d� &500,&100
e
fݤstr(num):� �
gP� � ș"XOS_Release",3,wrchv%,possaddr%:�reperr(�$+" code number "+�~�):="0"
h3!possaddr%=gb%:ș131103,3,wrchv%,possaddr%:�num
iș131104,3,wrchv%,possaddr%
j+s$=$gb%:ȕ �s$,1)=�32:s$=�s$,�(s$)-1):�
kȕ �s$,1)<�32:s$=�s$):�
l=s$
m
n��assemble_blit
o� space% &1A00
p+ccr%=0:ccg%=1:ccb%=2:ro%=8:go%=9:bo%=10
qr%=11:g%=12:b%=14
rrd%=4:gd%=5:bd%=7
s�opt=0 � 2 � 2
t
P%=space%
u[OPT opt
v
w.moveto
x\r0=src%
y\r1=des%
z\r2=len%
{ \r3=0 for words, 1 for bytes
|CMP R2,#0:MOVLE PC,R14
}CMP R0,R1:�Q PC,R14
~CMP R3,#0:BNE movebytes
.movewords
�CMP R0,R1:BLE else
�\ src%>des%
�MOV R3,#0:SUB R6,R2,#4
�
.for1m
�!LDR R5,[R0,R3]:STR R5,[R1,R3]
�$ADD R3,R3,#4:CMP R3,R6:BLE for1m
�MOV PC,R14
� .else
�SUB R3,R2,#4
�
.for2m
�!LDR R5,[R0,R3]:STR R5,[R1,R3]
�SUBS R3,R3,#4
�
BGE for2m
�MOV PC,R14
�
�.movebytes
�.truemoveb
�CMP R0,R1:BLE elseb
�\ src%>des%
�
MOV R3,#0
�.for1mb
�0LDRB R5,[R0,R3]:STRB R5,[R1,R3]:ADD R3,R3,#1
�CMP R3,R2:BLT for1mb
�MOV PC,R14
�
.elseb
�SUB R3,R2,#1
�.for2mb
�#LDRB R5,[R0,R3]:STRB R5,[R1,R3]
�SUBS R3,R3,#1
�BGE for2mb
�MOV PC,R14
�
�
�.copydata%
�; r0 =source ptr
�; r1 =dest ptr
�; r2 =length
�
�Z.copywordsl:TST R2,#31:LDRNE R3,[R0],#4:STRNE R3,[R1],#4:SUBNE R2,R2,#4:BNE copywordsl
�
TEQ R2,#0
�NLDMNEIA R0!,{r5-r12}:STMNEIA R1!,{r5-r12}:SUBNES R2,R2,#8*4:BNE copywordsl
�MOV PC,R14
�4.copyj:MOV R0,R2:MOV R1,R3:MOV R2,R4:B copydata%
�
�.NiceAg%
�!MOV R4,#0:MOV R7,#1:B groupdo
�
.NiceDag%
�%MOV R4,#1<<22:MOV R7,#0:B groupdo
�
�.groupdo
�; r0 = window handle
�; r1 = min_ic
�; r2 = max_ic
�
�3MOV R8,R0:MOV R9,R1:MOV R10,R2:STMFD R13!,{R14}
�MOV R5,#1<<22
�
�STR R8,window
� .loop
�STR R9,icon
�ADR R1,block
�SWI "XWimp_GetIconState"
�MLDR R12,flags:MOV R12,R12,LSR#22:� R12,R12,#1:CMP R12,R7:; is it shaded ?
�
BNE ok
�; change it
�#STR R4,eorword:STR R5,clearword
�ADR R1,block
�SWI "XWimp_SetIconState"
�.ok
�$ADD R9,R9,#1:CMP R9,R10:BLE loop
�LDMFD R13!,{PC}
�
�
.block
�.window EQUD 0
�.icon EQUD 0
�
�.eorword EQUD 0
�.clearword EQUD 0
�.data2 EQUD 0
�
EQUD 0
�
�!; bit 22 of flags =shaded bit
�"; bits 12-15 =button type
�
�.flags EQUD 0
�.data0 EQUD 0
�.data1 EQUD 0
�.data2 EQUD 0
�.data3 EQUD 0
�
�.NiceDa%
�; r0 =window
�; r1 =icon
�MOV R2,R1:B NiceDag%
�.NiceA%
�; r0 = window
�; r1 = icon
�MOV R2,R1:B NiceAg%
�
�
�; !!!PCA!!!
�C; used by the dialogue redraw code to simulate 'r1' style icons
�
� .bdr%
�; x0
�; y0
�; x1
�; y1
�
�&; simulate Acorn style 'r1' border
�
�.MOV R9,R0:MOV R10,R1:MOV R11,R2:MOV R12,R3
�
�
MOV R0,#0
�SWI &600E6
�
�
�
; lh side
�GMOV R0,#4:SUB R1,R9,#2:SUB R2,R10,#2:SWI "OS_Plot":; move x0-2,y0-2
�5MOV R0,#5:MOV R2,R12:SWI "OS_Plot":; draw x0-2,y1
�
�7MOV R0,#4:SUB R1,R1,#2:SWI "OS_Plot":; move x0-4,y1
�:MOV R0,#5:SUB R2,R10,#4:SWI "OS_Plot":; draw x0-4,y0-4
�
� ; top
�)MOV R0,#4:ADD R2,R12,#4:SWI "OS_Plot"
�DMOV R0,#5:ADD R1,R11,#2:SWI "OS_Plot":; draw x0-4,y1+4,x1+2,y1+4
�DMOV R0,#4:SUB R1,R1,#2:SUB R2,R2,#2:SWI "OS_Plot":; move x1,y1+2
@MOV R0,#5:SUB R1,R9,#4:SWI "OS_Plot"; draw x0-4,y1+2,x1,y1+2
MOV R0,#4
SWI &600E6
;bottom
GMOV R0,#4:SUB R1,R9,#2:SUB R2,R10,#4:SWI "OS_Plot":; move x0-2,y0-4
:MOV R0,#5:ADD R1,R11,#4:SWI "OS_Plot":; draw x1+2,y0-4
EMOV R0,#4:SUB R1,R1,#0:SUB R2,R10,#2:SWI "OS_Plot":; move x1,y0-2
3MOV R0,#5:MOV R1,R9:SWI"OS_Plot":; draw x0,y0-2
;right
4MOV R0,#4:ADD R1,R11,#2:MOV R2,R10:SWI "OS_Plot"
)MOV R0,#5:ADD R2,R12,#2:SWI "OS_Plot"
4MOV R0,#4:ADD R1,R11,#4:MOV R2,R10:SWI "OS_Plot"
)MOV R0,#5:ADD R2,R12,#4:SWI "OS_Plot"
MOV PC,R14
]:�:�
� Dynamic area version...
&ݤcreatearea(size%,s$,� aa%,maxm%)
� �
C� �� �4,30:�$:mm$=�$+�ms("vmfail"):EX%=�:areasize%=0:aa%=0:=-1
areasize%=0
gș "XOS_DynamicArea",0,-1,size%,-1,%10000000+(1<<31 � virtual%),maxm%,0,0,s$ � r0,aa%,,areabase%;F%
��(F% �1)<>0 � �killara(aa%):mm$="Couldn't create "+s$+" area. Probably not enough free memory or disc space.":aa%=0:size%=0:EX%=�:=0
,ș "OS_ReadDynamicArea",aa% � ,areasize%
!j� areasize%<size% � �killara(aa%):� 42,"Couldn't create "+s$+" area. Probably not enough free memory."
"=areabase%
#Wݤourarea(v%):�v%=0 � � &524F42,"Dynamic area "+�v%+" called by SPaint is invalid!"
$0ș "OS_DynamicArea",2,v% � ,,areasize%,addr%
%
=addr%
&Wݤareasize(v%):�v%=0 �� &524F42,"Dynamic area "+�v%+" called by SPaint is invalid!"
'0ș "OS_DynamicArea",2,v% � ,,areasize%,addr%
(=areasize%
)��killara(v%)
*%�v%<>0 � ș"XOS_DynamicArea",1,v%
+�
,
-ݤmin(v1,v2):�v1<v2 � =v1
.=v2
/ݤmax(v1,v2):�v1>v2 � =v1
0=v2
1
2+� DA version, general area create/claim
37��doclaimg(size%,� number%,msg$,arean$,maxm%):EX%=0
4-� size%=0 � �killara(number%):number%=0:�
5g�number%=0 � areabase%=�createarea(size%,arean$,number%,maxm%):csize%=areasize%:� number%=0 � EX%=�
6D�EX% � �repmsg(�ms_exp(msg$,�rounds(size%/1024),"")):number%=0:�
7)b%=�ourarea(number%):csize%=areasize%
8�ș Wslt%,-1,-1 � ,,free%:� free%<(size%-csize%) � �virtual% � �repmsg(�ms_exp(msg$,�rounds((size%-csize%-free%)/1024),"")):EX%=�:�
9b%=�ourarea(number%)
: v%=0:change%=size%-areasize%
;�� change%<>0 � ș "XOS_ChangeDynamicArea",number%,change% � r0,v%;F%:�v%<�(change%) � change%>0 � �reperr("DynamicArea memory change failed badly. (Passed "+�(�(size%/1024))+"k)",""):EX%=�:�
<b%=�ourarea(number%)
=�
>
?���ms_load(A$):ș "MessageTrans_FileInfo",,A$:ș "OS_Module",6,,,17+�A$ � ,,ms_desc%:$(ms_desc%+16)=A$:ș "MessageTrans_OpenFile",ms_desc%,ms_desc%+16:�
@
AP��ms_end:ș "XMessageTrans_CloseFile",ms_desc%:ș "XOS_Module",7,,ms_desc%:�
B
C#ݤms(nme$):=�ms_exp(nme$,"","")
D
Ezݤms_exp(A$,B$,C$):ș 398594,ms_desc%,A$,gb%,256,B$,C$ � ,,,zl%;zf%:�zf% �1 � ="tag '"+A$+"' not present in messages."
Fgb%?zl%=13:=$gb%
G
H��init_variables
I
J6wh%=-256:rd%=&FF00:cy%=-65536:gr%=&FF0000:myref%=0
K�CtHSVtRGB%=&40759:CtRGBtHSV%=&40758:Wscol%=&400E6:CtSgcol%=&40743:CtSOgcol%=&40748:Wrdw%=&400C8:Wgr%=&400CA:XWgr%=&600CA:Wgpi%=&400CF
L�Spop%=&2E:XSpop%=&2002E:CtSfc%=&4074F:CtInval%=&40750:CtStb%=&40740:Wlt%=&600DB:Wcw%=&400C1:Wslt%=&600EC:Wgist%=&400CE:Wsist%=&400CD:Wgwst%=&400CB:Ptx%=&40086:XPtx%=&60086:WfrcR%=&400D1:XWfrcR%=&600D1:Wupdw%=&400C9:XCtGet%=&40763
M�WcSp%=&400D2:Ffnt%=&40081:Fctp%=&40089:Fctos%=&40088:Lfnt%=&40082:Strw%=&40085:WgR%=&600CA:Fsfnt%=&4008A:Wmess%=&400E7:Fcar%=&40087
N�Bbox%=&40097:XWscol%=&600E6:XWgrec%=&600CA:GSTrns%=&20027:WcGp%=&400D3:WcSp%=&400D2:Wcm%=&400D4:Wow%=&400C5:WclW%=&600C6:Wsist%=&400CD:Drwf%=&40702:Drwstr%=&40704:XDwS%=&60704
Omaino%=0:overmain%=0
P�Spop%=&2E:CtSfc%=&4074F:CtInval%=&40750:CtStb%=&40740:Wlt%=&600DB:Wcw%=&400C1:Wslt%=&600EC:Wgist%=&400CE:Wsist%=&400CD:Wgwst%=&400CB:Ptx%=&40086:WfrcR%=&400D1:XSndC%=&60140
QmFfnt%=&40081:Fctp%=&40089:Fctos%=&40088:Lfnt%=&40082:Strw%=&40085:WgR%=&600CA:Fsfnt%=&4008A:Wmess%=&400E7
RXOags%=&20009
S:Bbox%=&40097:XWscol%=&600E6:XWgrec%=&600CA:Wcm%=&600D4
T
U� !!!PCA!!!
V
W� PCA message numbers
XUMsg_Whos%=&83484:Msg_Im%=&83485:Msg_Do%=&83486:Msg_Desel%=&83487:Msg_Done%=&83488
Y�Msg_Moving%=&83489:Msg_Changed%=&8348A:Msg_Resize%=&8348B:Msg_Uparea%=&8348C:Msg_ResizeAck%=&8348D:Msg_Misc%=&8348E:Msg_Info%=&8348F
Z+Sub_Give%=&83480:Sub_Associated%=&83481
[
\:Msg_ObjPos%=&83490:Msg_Hook%=&83491:Msg_Unhook%=&83492
]
^� PCA popup dialogue/menu
_kutil$="#Utilities":pcatask%=0:� utiltsk%(24),utilid%(24),uf%(24),utils$(24):utile%=0:uboxw%=0:uboxh%=96
`3popuptype%=0:m_pca%=0:� 0 - dialogue 1 - menu
a
b � pointers to remote objects
cremotetag%=-1:wn$=""
d
e;pcol%=&FFFFFF00:size%=64:size2%=64/2+4:ppick%=0:lcpw%=0
f
gn� strans% 32,stransW% 32,sgblk% 256,sgblkB% 256*4,savea% 1024,c0% 1024,Mgb% 256,ascale0p% 32,sgblkg% 256*4
h
i%�ms_load("<SPaint$Dir>.messages")
j4ș"Wimp_SlotSize",-1,-1 � slsiz%:basesiz%=slsiz%
kFty01%=104:ty02%=64:tx01%=0:tx02%=258:viewR%=-1:viewG%=-1:viewB%=-1
lZ� buff% &400,buffo% &400,buffb% &400,gb% &400,gbw% &200,gblk% &400,GWb% &400,gb2% &100
m!page%=64*1024:g%=0:handle1%=0
n virtual%=0:m64%=64*1024*1024
o
mscd=1
p
q<ș"XOS_SWINumberFromString",,"DragASprite_Start" � ds%;F
r�F �1 � ds%=-1
s;ș"XOS_SWINumberFromString",,"DragASprite_Stop" � de%;F
t�F �1 � de%=-1
u/ș6,161,28 �,,f%:� (f% �2)=0 �ds%=-1:de%=-1
v
w5� !!!PCA!!! local dynamic area and sprite details
xFlocal%=0:local2%=0:localtag%=-1:spria%=0:spril%=0:local$="Nothing"
y
z=� !!!PCA!!! inplace editing (remote) flags and storage...
{$inplace%=-1:localtask%=0:uflg%=0
|
}<� !!!PCA!!! inplace editing (local) flags and storage...
~aremote%=-1:remotetask%=0
�5� remoteicblk% 32*10:ricptr%=remoteicblk%:Rbdr%=0
�
�4� buffers for simple menu - can be scratch space
�� cbstr% &120,cbbuff% &120
�
�
end%=�
�savingfile%=0:DRAGGING%=0
��� wad%(32),Wbtsk% &300,wid%(32),GB% &2400,styleindir &1300,generalstore% &500:wid%()=0:lastopen%=-1:gb%=GB%+&1700:gblk%=GB%+&1A00:Wb%=GB%:�setupstores
� EX%=�
�F%=0:outform%=0
��
� 00000000 0d 00 01 10 f4 20 3e 21 52 75 6e 49 6d 61 67 65 |..... >!RunImage|
00000010 0d 00 02 05 f4 0d 00 03 11 f4 20 53 50 61 69 6e |.......... SPain|
00000020 74 20 30 2e 30 34 0d 00 04 05 f4 0d 00 05 1e f4 |t 0.04..........|
00000030 20 20 20 20 20 20 20 a9 20 52 6f 62 20 44 61 76 | . Rob Dav|
00000040 69 73 6f 6e 20 31 39 39 36 0d 00 06 1a f4 20 20 |ison 1996..... |
00000050 55 70 64 61 74 65 64 20 73 6f 6d 65 74 69 6d 65 |Updated sometime|
00000060 2e 2e 2e 0d 00 07 05 f4 0d 00 08 3f f4 20 43 6f |...........?. Co|
00000070 64 65 20 73 65 63 74 69 6f 6e 73 20 72 65 6c 61 |de sections rela|
00000080 74 69 6e 67 20 74 6f 20 74 68 65 20 50 43 41 20 |ting to the PCA |
00000090 61 72 65 20 63 6f 6d 6d 65 6e 74 65 64 20 21 21 |are commented !!|
000000a0 21 50 43 41 21 21 21 0d 00 09 34 f4 20 6e 6f 74 |!PCA!!!...4. not|
000000b0 20 70 61 72 74 69 63 75 6c 61 72 6c 79 20 65 61 | particularly ea|
000000c0 73 79 20 74 6f 20 66 6f 6c 6c 6f 77 20 73 74 69 |sy to follow sti|
000000d0 6c 6c 2e 2e 2e 53 6f 72 72 79 21 0d 00 0a 32 f4 |ll...Sorry!...2.|
000000e0 20 4e 6f 77 20 75 73 65 20 50 43 41 20 27 74 61 | Now use PCA 'ta|
000000f0 67 73 27 20 61 6e 64 20 74 68 65 20 50 43 41 53 |gs' and the PCAS|
00000100 75 70 70 6f 72 74 20 4d 6f 64 75 6c 65 0d 00 0b |upport Module...|
00000110 05 f4 0d 00 0c 19 ee 85 20 85 20 a2 20 31 2c f6 |........ . . 1,.|
00000120 24 2b 22 20 22 2b c3 9e 3a c8 98 0d 00 0d 04 0d |$+" "+..:.......|
00000130 00 0e 13 f2 69 6e 69 74 5f 76 61 72 69 61 62 6c |....init_variabl|
00000140 65 73 0d 00 0f 26 f2 69 6e 69 74 61 6c 6c 3a f2 |es...&.initall:.|
00000150 61 73 73 65 6d 62 6c 65 5f 62 6c 69 74 3a f2 69 |assemble_blit:.i|
00000160 6e 69 74 5f 57 69 6d 70 0d 00 10 04 0d 00 11 20 |nit_Wimp....... |
00000170 ee 85 20 f2 72 65 70 65 72 72 28 f6 24 2b 22 61 |.. .reperr(.$+"a|
00000180 74 20 63 6f 64 65 20 22 2b c3 9e 29 0d 00 12 04 |t code "+..)....|
00000190 0d 00 13 14 f2 70 6f 6c 6c 3a f2 74 65 72 6d 69 |.....poll:.termi|
000001a0 6e 61 74 65 0d 00 14 05 e0 0d 00 15 04 0d 00 16 |nate............|
000001b0 42 f4 20 63 61 6c 6c 65 64 20 6f 6e 20 64 65 73 |B. called on des|
000001c0 6b 74 6f 70 20 6d 6f 64 65 20 63 68 61 6e 67 65 |ktop mode change|
000001d0 20 61 6e 64 20 77 68 65 6e 20 6e 65 77 20 6f 62 | and when new ob|
000001e0 6a 65 63 74 20 6c 69 6e 6b 65 64 20 69 6e 2e 0d |ject linked in..|
000001f0 00 17 3f f4 20 63 72 65 61 74 65 73 20 63 6f 6c |..?. creates col|
00000200 6f 75 72 20 74 72 61 6e 73 6c 61 74 69 6f 6e 20 |our translation |
00000210 74 61 62 6c 65 73 20 66 6f 72 20 64 69 73 70 6c |tables for displ|
00000220 61 79 20 6f 66 20 73 70 72 69 74 65 73 2e 0d 00 |ay of sprites...|
00000230 18 11 dd f2 69 6e 69 74 73 70 74 72 61 6e 73 0d |....initsptrans.|
00000240 00 19 2d c8 99 20 58 43 74 47 65 74 25 2c 73 62 |..-.. XCtGet%,sb|
00000250 6c 6f 63 6b 25 2c 22 67 72 61 64 22 2c 2d 31 2c |lock%,"grad",-1,|
00000260 2d 31 2c 73 67 62 6c 6b 67 25 2c 30 0d 00 1a 0f |-1,sgblkg%,0....|
00000270 f4 20 21 21 21 50 43 41 21 21 21 0d 00 1b 45 f4 |. !!!PCA!!!...E.|
00000280 20 75 70 64 61 74 65 20 64 69 73 70 6c 61 79 a0 | update display.|
00000290 74 72 61 6e 73 6c 61 74 69 6f 6e 20 73 65 74 74 |translation sett|
000002a0 69 6e 67 73 20 6f 6e 20 6d 6f 64 65 20 63 68 61 |ings on mode cha|
000002b0 6e 67 65 73 2f 6e 65 77 20 6f 62 6a 65 63 74 73 |nges/new objects|
000002c0 0d 00 1c 14 e7 20 72 65 6d 6f 74 65 74 61 67 25 |..... remotetag%|
000002d0 3e 30 20 8c 0d 00 1d 58 c8 99 20 22 58 57 69 6d |>0 ....X.. "XWim|
000002e0 70 5f 52 65 61 64 50 69 78 54 72 61 6e 73 22 2c |p_ReadPixTrans",|
000002f0 26 32 30 30 2c 21 72 65 6d 6f 74 65 74 61 67 25 |&200,!remotetag%|
00000300 2c 21 72 65 6d 6f 74 65 74 61 67 25 2b 72 65 6d |,!remotetag%+rem|
00000310 6f 74 65 74 61 67 25 21 34 2c 2c 2c 2c 73 74 72 |otetag%!4,,,,str|
00000320 61 6e 73 57 25 2c 73 67 62 6c 6b 25 0d 00 1e 42 |ansW%,sgblk%...B|
00000330 c8 99 20 58 43 74 47 65 74 25 2c 21 72 65 6d 6f |.. XCtGet%,!remo|
00000340 74 65 74 61 67 25 2c 21 72 65 6d 6f 74 65 74 61 |tetag%,!remoteta|
00000350 67 25 2b 72 65 6d 6f 74 65 74 61 67 25 21 34 2c |g%+remotetag%!4,|
00000360 2d 31 2c 2d 31 2c 73 67 62 6c 6b 25 2c 31 0d 00 |-1,-1,sgblk%,1..|
00000370 1f 41 73 74 72 61 6e 73 57 78 3d 73 74 72 61 6e |.AstransWx=stran|
00000380 73 57 25 21 38 2f 21 73 74 72 61 6e 73 57 25 3a |sW%!8/!stransW%:|
00000390 73 74 72 61 6e 73 57 79 3d 73 74 72 61 6e 73 57 |stransWy=stransW|
000003a0 25 21 31 32 2f 73 74 72 61 6e 73 57 25 21 34 0d |%!12/stransW%!4.|
000003b0 00 20 4a c8 99 20 53 70 6f 70 25 2c 35 35 32 2c |. J.. Spop%,552,|
000003c0 21 72 65 6d 6f 74 65 74 61 67 25 2c 21 72 65 6d |!remotetag%,!rem|
000003d0 6f 74 65 74 61 67 25 2b 72 65 6d 6f 74 65 74 61 |otetag%+remoteta|
000003e0 67 25 21 34 20 b8 20 2c 2c 2c 78 77 68 6f 6f 6b |g%!4 . ,,,xwhook|
000003f0 25 2c 79 77 68 6f 6f 6b 25 0d 00 21 05 cd 0d 00 |%,ywhook%..!....|
00000400 22 0f e7 73 70 72 69 61 25 3e 30 20 8c 0d 00 23 |"..spria%>0 ...#|
00000410 4b f4 20 72 65 66 65 72 65 6e 63 65 20 76 69 61 |K. reference via|
00000420 20 74 68 65 20 74 61 67 20 69 73 20 6e 6f 74 20 | the tag is not |
00000430 73 74 72 69 63 74 6c 79 20 6e 65 63 65 73 73 61 |strictly necessa|
00000440 72 79 20 68 65 72 65 20 61 73 20 69 74 20 69 73 |ry here as it is|
00000450 20 61 20 6c 6f 63 61 6c 0d 00 24 29 f4 20 6f 62 | a local..$). ob|
00000460 6a 65 63 74 20 2d 20 62 75 74 20 6a 75 73 74 20 |ject - but just |
00000470 66 6f 72 20 66 6f 72 6d 73 20 73 61 6b 65 2e 2e |for forms sake..|
00000480 2e 0d 00 25 56 c8 99 20 22 58 57 69 6d 70 5f 52 |...%V.. "XWimp_R|
00000490 65 61 64 50 69 78 54 72 61 6e 73 22 2c 26 32 30 |eadPixTrans",&20|
000004a0 30 2c 21 6c 6f 63 61 6c 74 61 67 25 2c 21 6c 6f |0,!localtag%,!lo|
000004b0 63 61 6c 74 61 67 25 2b 6c 6f 63 61 6c 74 61 67 |caltag%+localtag|
000004c0 25 21 34 2c 2c 2c 2c 73 74 72 61 6e 73 57 25 2c |%!4,,,,stransW%,|
000004d0 73 67 62 6c 6b 42 25 0d 00 26 40 c8 99 20 58 43 |sgblkB%..&@.. XC|
000004e0 74 47 65 74 25 2c 21 6c 6f 63 61 6c 74 61 67 25 |tGet%,!localtag%|
000004f0 2c 21 6c 6f 63 61 6c 74 61 67 25 2b 6c 6f 63 61 |,!localtag%+loca|
00000500 6c 74 61 67 25 21 34 2c 2d 31 2c 2d 31 2c 73 67 |ltag%!4,-1,-1,sg|
00000510 62 6c 6b 42 25 2c 31 0d 00 27 05 cd 0d 00 28 2b |blkB%,1..'....(+|
00000520 c8 99 22 4f 53 5f 52 65 61 64 4d 6f 64 65 56 61 |.."OS_ReadModeVa|
00000530 72 69 61 62 6c 65 22 2c 2d 31 2c 33 20 b8 20 2c |riable",-1,3 . ,|
00000540 2c 6e 6f 63 6f 6c 25 0d 00 29 2b c8 99 26 33 35 |,nocol%..)+..&35|
00000550 2c 2d 31 2c 31 31 20 b8 20 2c 2c 73 77 25 3a c8 |,-1,11 . ,,sw%:.|
00000560 99 26 33 35 2c 2d 31 2c 31 32 20 b8 20 2c 2c 73 |.&35,-1,12 . ,,s|
00000570 68 25 0d 00 2a 2d c8 99 26 33 35 2c 2d 31 2c 34 |h%..*-..&35,-1,4|
00000580 20 b8 20 2c 2c 78 70 69 78 25 3a c8 99 26 33 35 | . ,,xpix%:..&35|
00000590 2c 2d 31 2c 35 20 b8 20 2c 2c 79 70 69 78 25 0d |,-1,5 . ,,ypix%.|
000005a0 00 2b 1b 78 70 69 78 66 3d 78 70 69 78 25 3a 79 |.+.xpixf=xpix%:y|
000005b0 70 69 78 66 3d 79 70 69 78 25 0d 00 2c 21 78 70 |pixf=ypix%..,!xp|
000005c0 69 78 25 3d 31 3c 3c 78 70 69 78 25 3a 79 70 69 |ix%=1<<xpix%:ypi|
000005d0 78 25 3d 31 3c 3c 79 70 69 78 25 0d 00 2d 27 73 |x%=1<<ypix%..-'s|
000005e0 77 25 3d 78 70 69 78 25 2a 28 73 77 25 2b 31 29 |w%=xpix%*(sw%+1)|
000005f0 3a 73 68 25 3d 79 70 69 78 25 2a 28 73 68 25 2b |:sh%=ypix%*(sh%+|
00000600 31 29 0d 00 2e 05 e1 0d 00 2f 04 0d 00 30 32 f4 |1)......./...02.|
00000610 20 72 65 64 72 61 77 20 74 68 65 20 27 72 65 6d | redraw the 'rem|
00000620 6f 74 65 27 20 28 6c 69 6e 6b 65 64 29 20 73 70 |ote' (linked) sp|
00000630 72 69 74 65 73 20 77 69 6e 64 6f 77 2e 0d 00 31 |rites window...1|
00000640 12 dd f2 72 64 72 65 6d 6f 74 65 28 66 25 29 0d |...rdremote(f%).|
00000650 00 32 36 e7 66 25 20 8c 20 c8 99 20 57 75 70 64 |.26.f% . .. Wupd|
00000660 77 25 2c 2c 57 62 25 20 b8 20 6d 6f 72 65 25 20 |w%,,Wb% . more% |
00000670 8b c8 99 57 72 64 77 25 2c 2c 57 62 25 20 b8 20 |...Wrdw%,,Wb% . |
00000680 6d 6f 72 65 25 0d 00 33 26 78 30 25 3d 57 62 25 |more%..3&x0%=Wb%|
00000690 21 34 2d 57 62 25 21 32 30 3a 79 30 25 3d 57 62 |!4-Wb%!20:y0%=Wb|
000006a0 25 21 31 36 2d 57 62 25 21 32 34 0d 00 34 0c c8 |%!16-Wb%!24..4..|
000006b0 95 20 6d 6f 72 65 25 0d 00 35 33 77 78 30 25 3d |. more%..53wx0%=|
000006c0 57 62 25 21 32 38 3a 77 79 30 25 3d 57 62 25 21 |Wb%!28:wy0%=Wb%!|
000006d0 33 32 3a 77 78 31 25 3d 57 62 25 21 33 36 3a 77 |32:wx1%=Wb%!36:w|
000006e0 79 31 25 3d 57 62 25 21 34 30 0d 00 36 13 e7 72 |y1%=Wb%!40..6..r|
000006f0 65 6d 6f 74 65 74 61 67 25 3e 30 20 8c 0d 00 37 |emotetag%>0 ...7|
00000700 50 c8 99 20 58 53 70 6f 70 25 2c 35 36 34 2c 21 |P.. XSpop%,564,!|
00000710 72 65 6d 6f 74 65 74 61 67 25 2c 21 72 65 6d 6f |remotetag%,!remo|
00000720 74 65 74 61 67 25 2b 72 65 6d 6f 74 65 74 61 67 |tetag%+remotetag|
00000730 25 21 34 2c 78 30 25 2c 79 30 25 2c 30 2c 73 74 |%!4,x0%,y0%,0,st|
00000740 72 61 6e 73 57 25 2c 73 67 62 6c 6b 25 0d 00 38 |ransW%,sgblk%..8|
00000750 05 cc 0d 00 39 30 f2 73 63 28 30 2c 30 2c 30 29 |....90.sc(0,0,0)|
00000760 3a c8 93 20 c8 90 20 78 30 25 2c 79 30 25 2c 78 |:.. .. x0%,y0%,x|
00000770 77 68 6f 6f 6b 25 2a 32 2c 79 77 68 6f 6f 6b 25 |whook%*2,ywhook%|
00000780 2a 32 0d 00 3a 05 cd 0d 00 3b 19 c8 99 20 57 67 |*2..:....;... Wg|
00000790 72 25 2c 30 2c 57 62 25 20 b8 20 6d 6f 72 65 25 |r%,0,Wb% . more%|
000007a0 0d 00 3c 05 ce 0d 00 3d 05 e1 0d 00 3e 04 0d 00 |..<....=....>...|
000007b0 3f 28 f4 20 72 65 64 72 61 77 20 74 68 65 20 27 |?(. redraw the '|
000007c0 6c 6f 63 61 6c 27 20 73 70 72 69 74 65 73 20 77 |local' sprites w|
000007d0 69 6e 64 6f 77 2e 0d 00 40 11 dd f2 72 64 6c 6f |indow...@...rdlo|
000007e0 63 61 6c 28 66 25 29 0d 00 41 36 e7 66 25 20 8c |cal(f%)..A6.f% .|
000007f0 20 c8 99 20 57 75 70 64 77 25 2c 2c 57 62 25 20 | .. Wupdw%,,Wb% |
00000800 b8 20 6d 6f 72 65 25 20 8b c8 99 57 72 64 77 25 |. more% ...Wrdw%|
00000810 2c 2c 57 62 25 20 b8 20 6d 6f 72 65 25 0d 00 42 |,,Wb% . more%..B|
00000820 26 78 30 25 3d 57 62 25 21 34 2d 57 62 25 21 32 |&x0%=Wb%!4-Wb%!2|
00000830 30 3a 79 30 25 3d 57 62 25 21 31 36 2d 57 62 25 |0:y0%=Wb%!16-Wb%|
00000840 21 32 34 0d 00 43 0c c8 95 20 6d 6f 72 65 25 0d |!24..C... more%.|
00000850 00 44 33 77 78 30 25 3d 57 62 25 21 32 38 3a 77 |.D3wx0%=Wb%!28:w|
00000860 79 30 25 3d 57 62 25 21 33 32 3a 77 78 31 25 3d |y0%=Wb%!32:wx1%=|
00000870 57 62 25 21 33 36 3a 77 79 31 25 3d 57 62 25 21 |Wb%!36:wy1%=Wb%!|
00000880 34 30 0d 00 45 12 e7 6c 6f 63 61 6c 74 61 67 25 |40..E..localtag%|
00000890 3e 30 20 8c 0d 00 46 4e c8 99 20 58 53 70 6f 70 |>0 ...FN.. XSpop|
000008a0 25 2c 35 36 34 2c 21 6c 6f 63 61 6c 74 61 67 25 |%,564,!localtag%|
000008b0 2c 21 6c 6f 63 61 6c 74 61 67 25 2b 6c 6f 63 61 |,!localtag%+loca|
000008c0 6c 74 61 67 25 21 34 2c 78 30 25 2c 79 30 25 2c |ltag%!4,x0%,y0%,|
000008d0 30 2c 73 74 72 61 6e 73 57 25 2c 73 67 62 6c 6b |0,stransW%,sgblk|
000008e0 42 25 0d 00 47 05 cc 0d 00 48 2a f2 73 63 28 30 |B%..G....H*.sc(0|
000008f0 2c 30 2c 30 29 3a c8 93 20 c8 90 20 78 30 25 2c |,0,0):.. .. x0%,|
00000900 79 30 25 2c 78 77 4c 25 2a 32 2c 79 77 4c 25 2a |y0%,xwL%*2,ywL%*|
00000910 32 0d 00 49 05 cd 0d 00 4a 19 c8 99 20 57 67 72 |2..I....J... Wgr|
00000920 25 2c 30 2c 57 62 25 20 b8 20 6d 6f 72 65 25 0d |%,0,Wb% . more%.|
00000930 00 4b 05 ce 0d 00 4c 05 e1 0d 00 4d 04 0d 00 4e |.K....L....M...N|
00000940 42 f4 20 66 69 6e 64 20 74 68 65 20 77 69 64 74 |B. find the widt|
00000950 68 20 6f 66 20 61 20 74 65 78 74 20 73 74 72 69 |h of a text stri|
00000960 6e 67 20 69 6e 20 74 68 65 20 63 75 72 72 65 6e |ng in the curren|
00000970 74 20 64 65 73 6b 74 6f 70 20 66 6f 6e 74 2e 0d |t desktop font..|
00000980 00 4f 0e dd a4 74 77 69 64 28 73 24 29 0d 00 50 |.O...twid(s$)..P|
00000990 40 c8 99 22 58 4f 53 5f 53 57 49 4e 75 6d 62 65 |@.."XOS_SWINumbe|
000009a0 72 46 72 6f 6d 53 74 72 69 6e 67 22 2c 2c 22 57 |rFromString",,"W|
000009b0 69 6d 70 5f 54 65 78 74 4f 70 22 20 b8 20 3b 46 |imp_TextOp" . ;F|
000009c0 3a e7 20 28 46 20 80 31 29 3d 30 20 8c 0d 00 51 |:. (F .1)=0 ...Q|
000009d0 20 c8 99 22 58 57 69 6d 70 5f 54 65 78 74 4f 70 | .."XWimp_TextOp|
000009e0 22 2c 31 2c 73 24 2c 30 20 b8 20 76 25 0d 00 52 |",1,s$,0 . v%..R|
000009f0 05 cc 0d 00 53 0f 76 25 3d a9 28 73 24 29 2a 31 |....S.v%=.(s$)*1|
00000a00 36 0d 00 54 05 cd 0d 00 55 07 3d 76 25 0d 00 56 |6..T....U.=v%..V|
00000a10 04 0d 00 57 32 f4 20 70 72 69 6e 74 20 73 6f 6d |...W2. print som|
00000a20 65 20 74 65 78 74 20 69 6e 20 74 68 65 20 63 75 |e text in the cu|
00000a30 72 72 65 6e 74 20 64 65 73 6b 74 6f 70 20 66 6f |rrent desktop fo|
00000a40 6e 74 2e 0d 00 58 17 dd f2 70 70 28 78 25 2c 79 |nt...X...pp(x%,y|
00000a50 25 2c 74 74 24 2c 62 67 25 29 0d 00 59 1d c8 99 |%,tt$,bg%)..Y...|
00000a60 20 22 58 57 69 6d 70 5f 54 65 78 74 4f 70 22 2c | "XWimp_TextOp",|
00000a70 30 2c 30 2c 62 67 25 0d 00 5a 2e c8 99 22 58 57 |0,0,bg%..Z..."XW|
00000a80 69 6d 70 5f 54 65 78 74 4f 70 22 2c 32 2b 28 31 |imp_TextOp",2+(1|
00000a90 3c 3c 33 30 29 2c 74 74 24 2c 2d 31 2c 2d 31 2c |<<30),tt$,-1,-1,|
00000aa0 78 25 2c 79 25 0d 00 5b 05 e1 0d 00 5c 04 0d 00 |x%,y%..[....\...|
00000ab0 5d 30 f4 20 77 6f 72 6b 20 6f 75 74 20 74 68 65 |]0. work out the|
00000ac0 20 77 69 64 74 68 20 6f 66 20 61 20 50 43 41 20 | width of a PCA |
00000ad0 64 69 61 6c 6f 67 75 65 20 69 74 65 6d 2e 0d 00 |dialogue item...|
00000ae0 5e 4e f4 20 75 73 65 73 20 66 69 78 65 64 20 76 |^N. uses fixed v|
00000af0 61 6c 75 65 73 20 66 6f 72 20 61 6c 6c 20 62 75 |alues for all bu|
00000b00 74 20 74 68 65 20 77 69 64 74 68 20 6f 66 20 74 |t the width of t|
00000b10 68 65 20 69 74 65 6d 20 6e 61 6d 65 20 77 68 69 |he item name whi|
00000b20 63 68 20 63 61 6e 20 76 61 72 79 2e 0d 00 5f 12 |ch can vary..._.|
00000b30 dd a4 75 77 69 64 28 73 24 2c 78 78 25 29 0d 00 |..uwid(s$,xx%)..|
00000b40 60 10 76 25 3d a4 74 77 69 64 28 73 24 29 0d 00 |`.v%=.twid(s$)..|
00000b50 61 0e e7 20 78 78 25 3c 3e 30 20 8c 0d 00 62 05 |a.. xx%<>0 ...b.|
00000b60 cd 0d 00 63 13 3d 76 25 2b 33 32 2b 34 30 2b 36 |...c.=v%+32+40+6|
00000b70 34 2b 38 34 0d 00 64 04 0d 00 65 0f f4 20 21 21 |4+84..d...e.. !!|
00000b80 21 50 43 41 21 21 21 0d 00 66 25 f4 20 72 65 64 |!PCA!!!..f%. red|
00000b90 72 61 77 20 70 63 61 20 64 69 61 6c 6f 67 75 65 |raw pca dialogue|
00000ba0 20 62 6f 78 20 77 69 6e 64 6f 77 2e 0d 00 67 32 | box window...g2|
00000bb0 f4 20 63 68 6f 73 65 6e 25 2c 64 6f 77 6e 25 20 |. chosen%,down% |
00000bc0 61 72 65 20 66 6f 72 20 77 68 65 6e 20 61 6e 20 |are for when an |
00000bd0 69 74 65 6d 20 69 73 20 63 68 6f 73 65 6e 0d 00 |item is chosen..|
00000be0 68 30 f4 20 69 6e 20 6f 72 64 65 72 20 74 6f 20 |h0. in order to |
00000bf0 73 69 6d 75 6c 61 74 65 20 74 68 65 20 62 75 74 |simulate the but|
00000c00 74 6f 6e 20 27 63 6c 69 63 6b 69 6e 67 27 0d 00 |ton 'clicking'..|
00000c10 69 04 0d 00 6a 1d dd f2 72 64 70 63 61 28 66 25 |i...j...rdpca(f%|
00000c20 2c 63 68 6f 73 65 6e 25 2c 64 6f 77 6e 25 29 0d |,chosen%,down%).|
00000c30 00 6b 38 e7 20 66 25 20 8c 20 c8 99 20 57 75 70 |.k8. f% . .. Wup|
00000c40 64 77 25 2c 2c 57 62 25 20 b8 20 6d 6f 72 65 25 |dw%,,Wb% . more%|
00000c50 20 8b c8 99 20 57 72 64 77 25 2c 2c 57 62 25 20 | ... Wrdw%,,Wb% |
00000c60 b8 20 6d 6f 72 65 25 0d 00 6c 5d 78 73 63 72 6f |. more%..l]xscro|
00000c70 6c 25 3d 57 62 25 21 32 30 3a 79 73 63 72 6f 6c |l%=Wb%!20:yscrol|
00000c80 25 3d 57 62 25 21 32 34 3a 78 30 25 3d 57 62 25 |%=Wb%!24:x0%=Wb%|
00000c90 21 34 2d 78 73 63 72 6f 6c 25 2b 34 3a 79 31 25 |!4-xscrol%+4:y1%|
00000ca0 3d 57 62 25 21 38 3a 78 31 25 3d 57 62 25 21 31 |=Wb%!8:x1%=Wb%!1|
00000cb0 32 3a 79 30 25 3d 57 62 25 21 31 36 2d 79 73 63 |2:y0%=Wb%!16-ysc|
00000cc0 72 6f 6c 25 0d 00 6d 23 c8 99 20 22 57 69 6d 70 |rol%..m#.. "Wimp|
00000cd0 5f 42 61 73 65 4f 66 53 70 72 69 74 65 73 22 20 |_BaseOfSprites" |
00000ce0 b8 20 2c 73 70 61 25 0d 00 6e 0c c8 95 20 6d 6f |. ,spa%..n... mo|
00000cf0 72 65 25 0d 00 6f 26 6d 65 6e 75 24 3d c2 75 74 |re%..o&menu$=.ut|
00000d00 69 6c 24 2c a9 28 75 74 69 6c 24 29 2d a7 75 74 |il$,.(util$)-.ut|
00000d10 69 6c 24 2c 22 5c 22 29 29 0d 00 70 12 70 25 3d |il$,"\"))..p.p%=|
00000d20 30 3a 79 79 25 3d 79 30 25 2b 34 0d 00 71 17 e3 |0:yy%=y0%+4..q..|
00000d30 20 70 63 61 25 3d 30 20 b8 20 75 74 69 6c 65 25 | pca%=0 . utile%|
00000d40 2d 31 0d 00 72 13 73 24 3d a4 70 61 72 28 22 5c |-1..r.s$=.par("\|
00000d50 22 2c 70 25 29 0d 00 73 3f e7 63 68 6f 73 65 6e |",p%)..s?.chosen|
00000d60 25 3d 70 63 61 25 20 80 20 64 6f 77 6e 25 20 8c |%=pca% . down% .|
00000d70 20 f2 73 63 28 26 39 39 2c 26 39 39 2c 26 42 42 | .sc(&99,&99,&BB|
00000d80 29 20 8b 20 f2 73 63 28 26 41 41 2c 26 41 41 2c |) . .sc(&AA,&AA,|
00000d90 26 43 43 29 0d 00 74 2f c8 93 20 c8 90 20 78 30 |&CC)..t/.. .. x0|
00000da0 25 2c 79 79 25 2b 70 63 61 25 2a 28 75 62 6f 78 |%,yy%+pca%*(ubox|
00000db0 68 25 2b 38 29 2c 75 62 6f 78 77 25 2c 75 62 6f |h%+8),uboxw%,ubo|
00000dc0 78 68 25 0d 00 75 41 41 25 3d 78 30 25 3a 42 25 |xh%..uAA%=x0%:B%|
00000dd0 3d 79 79 25 2b 70 63 61 25 2a 28 75 62 6f 78 68 |=yy%+pca%*(uboxh|
00000de0 25 2b 38 29 3a 43 25 3d 41 25 2b 75 62 6f 78 77 |%+8):C%=A%+uboxw|
00000df0 25 3a 44 25 3d 42 25 2b 75 62 6f 78 68 25 3a d6 |%:D%=B%+uboxh%:.|
00000e00 62 64 72 25 0d 00 76 25 e7 63 68 6f 73 65 6e 25 |bdr%..v%.chosen%|
00000e10 3d 70 63 61 25 20 80 20 64 6f 77 6e 25 20 41 25 |=pca% . down% A%|
00000e20 2b 3d 34 3a 42 25 2d 3d 34 0d 00 77 04 0d 00 78 |+=4:B%-=4..w...x|
00000e30 27 f4 20 64 69 73 70 6c 61 79 20 74 68 65 20 73 |'. display the s|
00000e40 70 72 69 74 65 20 66 6f 72 20 74 68 69 73 20 69 |prite for this i|
00000e50 74 65 6d 2e 0d 00 79 18 e7 20 75 74 69 6c 73 24 |tem...y.. utils$|
00000e60 28 70 63 61 25 29 3c 3e 22 22 20 8c 0d 00 7a 2f |(pca%)<>"" ...z/|
00000e70 c8 99 20 58 43 74 47 65 74 25 2c 73 70 61 25 2c |.. XCtGet%,spa%,|
00000e80 75 74 69 6c 73 24 28 70 63 61 25 29 2c 2d 31 2c |utils$(pca%),-1,|
00000e90 2d 31 2c 73 61 76 65 61 25 2c 30 0d 00 7b 4c c8 |-1,savea%,0..{L.|
00000ea0 99 20 58 53 70 6f 70 25 2c 33 30 38 2c 73 70 61 |. XSpop%,308,spa|
00000eb0 25 2c 75 74 69 6c 73 24 28 70 63 61 25 29 2c 41 |%,utils$(pca%),A|
00000ec0 25 2b 31 32 2c 42 25 2b 28 75 62 6f 78 68 25 2d |%+12,B%+(uboxh%-|
00000ed0 36 38 29 2f 32 2c 38 2c 73 74 72 61 6e 73 57 25 |68)/2,8,stransW%|
00000ee0 2c 73 61 76 65 61 25 0d 00 7c 05 cd 0d 00 7d 04 |,savea%..|....}.|
00000ef0 0d 00 7e 44 f4 20 64 69 73 70 6c 61 79 20 27 73 |..~D. display 's|
00000f00 6d 21 69 6e 66 6f 27 20 69 66 20 69 6e 66 6f 20 |m!info' if info |
00000f10 61 76 61 69 6c 61 62 6c 65 20 66 6c 61 67 20 66 |available flag f|
00000f20 6f 72 20 74 68 69 73 20 69 74 65 6d 20 69 73 20 |or this item is |
00000f30 73 65 74 2e 0d 00 7f 45 c8 99 20 22 58 57 69 6d |set....E.. "XWim|
00000f40 70 5f 52 65 61 64 50 69 78 54 72 61 6e 73 22 2c |p_ReadPixTrans",|
00000f50 26 31 30 30 2c 73 62 6c 6f 63 6b 25 2c 22 73 6d |&100,sblock%,"sm|
00000f60 21 69 6e 66 6f 22 2c 2c 2c 2c 73 74 72 61 6e 73 |!info",,,,strans|
00000f70 57 25 2c 73 61 76 65 61 25 0d 00 80 6c e7 20 28 |W%,savea%...l. (|
00000f80 75 66 25 28 70 63 61 25 29 20 80 20 25 31 30 29 |uf%(pca%) . %10)|
00000f90 3c 3e 30 20 8c 20 c8 99 20 58 53 70 6f 70 25 2c |<>0 . .. XSpop%,|
00000fa0 33 30 38 2c 73 62 6c 6f 63 6b 25 2c 22 73 6d 21 |308,sblock%,"sm!|
00000fb0 69 6e 66 6f 22 2c 41 25 2b 75 62 6f 78 77 25 2d |info",A%+uboxw%-|
00000fc0 34 38 2c 42 25 2b 28 75 62 6f 78 68 25 2d 34 30 |48,B%+(uboxh%-40|
00000fd0 29 2f 32 2c 38 2c 73 74 72 61 6e 73 57 25 2c 73 |)/2,8,stransW%,s|
00000fe0 61 76 65 61 25 0d 00 81 04 0d 00 82 1d f4 20 64 |avea%......... d|
00000ff0 69 73 70 6c 61 79 20 74 68 65 20 69 74 65 6d 73 |isplay the items|
00001000 20 6e 61 6d 65 2e 0d 00 83 94 e7 20 63 68 6f 73 | name...... chos|
00001010 65 6e 25 3d 70 63 61 25 20 80 20 64 6f 77 6e 25 |en%=pca% . down%|
00001020 20 8c 20 f2 70 70 28 41 25 2b 28 28 75 62 6f 78 | . .pp(A%+((ubox|
00001030 77 25 2d a4 74 77 69 64 28 73 24 29 29 2f 32 29 |w%-.twid(s$))/2)|
00001040 2c 42 25 2b 75 62 6f 78 68 25 2f 32 2d 31 32 2c |,B%+uboxh%/2-12,|
00001050 73 24 2c 26 42 42 39 39 39 39 30 30 29 20 8b 20 |s$,&BB999900) . |
00001060 f2 70 70 28 41 25 2b 28 28 75 62 6f 78 77 25 2d |.pp(A%+((uboxw%-|
00001070 a4 74 77 69 64 28 73 24 29 29 2f 32 29 2c 42 25 |.twid(s$))/2),B%|
00001080 2b 75 62 6f 78 68 25 2f 32 2d 31 32 2c 73 24 2c |+uboxh%/2-12,s$,|
00001090 26 43 43 41 41 41 41 30 30 29 0d 00 84 05 ed 0d |&CCAAAA00)......|
000010a0 00 85 19 c8 99 20 57 67 72 25 2c 30 2c 57 62 25 |..... Wgr%,0,Wb%|
000010b0 20 b8 20 6d 6f 72 65 25 0d 00 86 05 ce 0d 00 87 | . more%........|
000010c0 05 e1 0d 00 88 04 0d 00 89 1f f4 20 6d 61 69 6e |........... main|
000010d0 20 72 65 64 72 61 77 20 72 65 71 75 65 73 74 20 | redraw request |
000010e0 70 72 6f 63 2e 0d 00 8a 10 dd f2 72 65 64 72 61 |proc.......redra|
000010f0 77 28 66 25 29 0d 00 8b 0b 77 25 3d 21 57 62 25 |w(f%)....w%=!Wb%|
00001100 0d 00 8c 0a c8 8e 77 25 20 ca 0d 00 8d 1d c9 20 |......w% ...... |
00001110 6d 5f 72 65 6d 6f 74 65 25 3a f2 72 64 72 65 6d |m_remote%:.rdrem|
00001120 6f 74 65 28 66 25 29 0d 00 8e 1b c9 20 6d 5f 6c |ote(f%)..... m_l|
00001130 6f 63 61 6c 25 3a f2 72 64 6c 6f 63 61 6c 28 66 |ocal%:.rdlocal(f|
00001140 25 29 0d 00 8f 1c c9 20 70 63 61 5f 77 25 3a f2 |%)..... pca_w%:.|
00001150 72 64 70 63 61 28 66 25 2c 2d 31 2c 30 29 0d 00 |rdpca(f%,-1,0)..|
00001160 90 05 cb 0d 00 91 05 e1 0d 00 92 04 0d 00 93 1b |................|
00001170 f4 20 57 69 6d 70 20 4d 65 73 73 61 67 65 20 72 |. Wimp Message r|
00001180 65 63 65 69 70 74 2e 0d 00 94 04 0d 00 95 47 dd |eceipt........G.|
00001190 f2 72 65 63 69 65 76 65 5f 6d 73 67 3a e3 6c 25 |.recieve_msg:.l%|
000011a0 3d 30 b8 20 21 57 62 25 20 88 34 3a 57 62 74 73 |=0. !Wb% .4:Wbts|
000011b0 6b 25 21 6c 25 3d 57 62 25 21 6c 25 3a ed 3a 6c |k%!l%=Wb%!l%:.:l|
000011c0 65 25 3d 21 57 62 25 3a 74 73 6b 25 3d 57 62 25 |e%=!Wb%:tsk%=Wb%|
000011d0 21 34 0d 00 96 20 6d 73 67 24 3d a4 73 28 57 62 |!4... msg$=.s(Wb|
000011e0 25 2b 34 34 29 3a 6d 65 73 73 25 3d 57 62 25 21 |%+44):mess%=Wb%!|
000011f0 31 36 0d 00 97 0e c8 8e 20 6d 65 73 73 25 20 ca |16...... mess% .|
00001200 0d 00 98 11 c9 30 3a f2 74 65 72 6d 69 6e 61 74 |.....0:.terminat|
00001210 65 0d 00 99 20 c9 20 32 3a 45 58 25 3d a3 3a e7 |e... . 2:EX%=.:.|
00001220 20 57 62 25 21 34 3c 3e 54 61 73 6b 5f 68 25 20 | Wb%!4<>Task_h% |
00001230 8c 0d 00 9a 59 e7 20 73 61 76 69 6e 67 66 69 6c |....Y. savingfil|
00001240 65 25 20 8c 20 6d 6f 78 25 3d 57 62 25 21 32 38 |e% . mox%=Wb%!28|
00001250 3a 6d 6f 79 25 3d 57 62 25 21 33 32 3a f2 73 61 |:moy%=Wb%!32:.sa|
00001260 76 65 66 69 6c 65 28 a4 73 28 57 62 25 2b 34 34 |vefile(.s(Wb%+44|
00001270 29 2c 57 62 25 21 33 36 3d 2d 31 29 3a 73 61 76 |),Wb%!36=-1):sav|
00001280 69 6e 67 66 69 6c 65 25 3d a3 0d 00 9b 58 e7 20 |ingfile%=....X. |
00001290 45 58 25 3d a3 20 8c 20 57 62 74 73 6b 25 21 31 |EX%=. . Wbtsk%!1|
000012a0 32 3d 57 62 74 73 6b 25 21 38 3a 57 62 74 73 6b |2=Wbtsk%!8:Wbtsk|
000012b0 25 21 31 36 3d 33 3a c8 99 22 57 69 6d 70 5f 53 |%!16=3:.."Wimp_S|
000012c0 65 6e 64 4d 65 73 73 61 67 65 22 2c 31 37 2c 57 |endMessage",17,W|
000012d0 62 74 73 6b 25 2c 74 73 6b 25 20 8b 20 45 58 25 |btsk%,tsk% . EX%|
000012e0 3d a3 0d 00 9c 05 cd 0d 00 9d 06 c9 33 0d 00 9e |=...........3...|
000012f0 09 45 58 25 3d 30 0d 00 9f 43 e7 20 57 62 25 21 |.EX%=0...C. Wb%!|
00001300 34 30 3c 26 31 30 30 30 20 8c 20 f2 72 65 61 64 |40<&1000 . .read|
00001310 5f 61 6e 64 6c 6f 61 64 28 a4 73 28 57 62 25 2b |_andload(.s(Wb%+|
00001320 34 34 29 2c 57 62 25 21 34 30 2c 57 62 25 21 32 |44),Wb%!40,Wb%!2|
00001330 30 2c 57 62 25 21 32 34 29 0d 00 a0 35 e7 20 45 |0,Wb%!24)...5. E|
00001340 58 25 3d a3 20 80 20 57 62 25 21 31 32 3d 73 63 |X%=. . Wb%!12=sc|
00001350 72 61 70 72 65 66 25 20 8c 20 2a 52 45 4d 4f 56 |rapref% . *REMOV|
00001360 45 20 3c 57 69 6d 70 24 53 63 72 61 70 3e 0d 00 |E <Wimp$Scrap>..|
00001370 a1 4e e7 20 45 58 25 3d a3 20 57 62 74 73 6b 25 |.N. EX%=. Wbtsk%|
00001380 21 31 32 3d 57 62 74 73 6b 25 21 38 3a 57 62 74 |!12=Wbtsk%!8:Wbt|
00001390 73 6b 25 21 31 36 3d 34 3a c8 99 22 57 69 6d 70 |sk%!16=4:.."Wimp|
000013a0 5f 53 65 6e 64 4d 65 73 73 61 67 65 22 2c 31 37 |_SendMessage",17|
000013b0 2c 57 62 74 73 6b 25 2c 74 73 6b 25 0d 00 a2 06 |,Wbtsk%,tsk%....|
000013c0 c9 39 0d 00 a3 04 0d 00 a4 29 f4 20 21 21 21 50 |.9.......). !!!P|
000013d0 43 41 21 21 21 20 49 6e 63 6f 6d 69 6e 67 20 6d |CA!!! Incoming m|
000013e0 65 73 73 61 67 65 20 68 61 6e 64 6c 69 6e 67 0d |essage handling.|
000013f0 00 a5 04 0d 00 a6 2c f4 20 52 65 63 65 69 70 74 |......,. Receipt|
00001400 20 6f 66 20 4d 73 67 5f 49 6d 48 65 72 65 20 2d | of Msg_ImHere -|
00001410 20 72 65 63 6f 72 64 20 64 65 74 61 69 6c 73 0d | record details.|
00001420 00 a7 0d c9 20 4d 73 67 5f 49 6d 25 0d 00 a8 11 |.... Msg_Im%....|
00001430 e7 20 75 74 69 6c 65 25 3c 32 34 20 8c 0d 00 a9 |. utile%<24 ....|
00001440 47 75 74 69 6c 24 3d 75 74 69 6c 24 2b 22 5c 22 |Gutil$=util$+"\"|
00001450 2b a4 73 28 57 62 25 2b 32 38 29 3a 75 74 69 6c |+.s(Wb%+28):util|
00001460 74 73 6b 25 28 75 74 69 6c 65 25 29 3d 74 73 6b |tsk%(utile%)=tsk|
00001470 25 3a 75 66 25 28 75 74 69 6c 65 25 29 3d 57 62 |%:uf%(utile%)=Wb|
00001480 25 21 32 30 0d 00 aa 4c f4 20 49 46 75 66 25 28 |%!20...L. IFuf%(|
00001490 75 74 69 6c 65 25 29 20 41 4e 44 20 25 31 30 30 |utile%) AND %100|
000014a0 30 30 3c 3e 30 20 54 48 45 4e 20 75 66 25 28 75 |00<>0 THEN uf%(u|
000014b0 74 69 6c 65 25 29 3d 75 66 25 28 75 74 69 6c 65 |tile%)=uf%(utile|
000014c0 25 29 20 41 4e 44 20 26 46 46 46 46 46 46 45 46 |%) AND &FFFFFFEF|
000014d0 0d 00 ab 2f e7 20 57 62 25 21 32 30 20 80 20 31 |.../. Wb%!20 . 1|
000014e0 3c 3e 30 20 8c 20 75 74 69 6c 73 24 28 75 74 69 |<>0 . utils$(uti|
000014f0 6c 65 25 29 3d a4 73 28 57 62 25 2b 36 30 29 0d |le%)=.s(Wb%+60).|
00001500 00 ac 1a 75 74 69 6c 69 64 25 28 75 74 69 6c 65 |...utilid%(utile|
00001510 25 29 3d 57 62 25 21 32 34 0d 00 ad 1f 76 25 3d |%)=Wb%!24....v%=|
00001520 a4 75 77 69 64 28 a4 73 28 57 62 25 2b 32 38 29 |.uwid(.s(Wb%+28)|
00001530 2c 57 62 25 21 32 30 29 0d 00 ae 18 e7 75 62 6f |,Wb%!20).....ubo|
00001540 78 77 25 3c 76 25 20 75 62 6f 78 77 25 3d 76 25 |xw%<v% uboxw%=v%|
00001550 0d 00 af 0d 75 74 69 6c 65 25 2b 3d 31 0d 00 b0 |....utile%+=1...|
00001560 05 cd 0d 00 b1 04 0d 00 b2 2e c9 20 4d 73 67 5f |........... Msg_|
00001570 49 6e 66 6f 25 3a e7 74 73 6b 25 3c 3e 54 61 73 |Info%:.tsk%<>Tas|
00001580 6b 5f 68 25 20 80 20 57 62 74 73 6b 25 21 31 32 |k_h% . Wbtsk%!12|
00001590 3d 30 20 8c 0d 00 b3 36 f4 20 52 65 63 65 69 70 |=0 ....6. Receip|
000015a0 74 20 6f 66 20 4d 65 73 73 61 67 65 5f 49 6e 66 |t of Message_Inf|
000015b0 6f 20 2d 20 72 65 74 75 72 6e 20 61 6e 20 69 6e |o - return an in|
000015c0 66 6f 20 73 74 72 69 6e 67 2e 0d 00 b4 2f 73 24 |fo string..../s$|
000015d0 3d 22 53 70 61 69 6e 74 20 2d 20 61 20 76 65 72 |="Spaint - a ver|
000015e0 79 20 73 69 6d 70 6c 65 20 70 61 69 6e 74 20 70 |y simple paint p|
000015f0 72 6f 67 72 61 6d 2e 20 22 0d 00 b5 51 e7 72 65 |rogram. "...Q.re|
00001600 6d 6f 74 65 74 61 67 25 3e 30 20 8c 20 73 24 3d |motetag%>0 . s$=|
00001610 73 24 2b 22 4c 69 6e 6b 65 64 20 74 6f 20 27 22 |s$+"Linked to '"|
00001620 2b 77 6e 24 2b 22 27 22 20 8b 20 73 24 3d 73 24 |+wn$+"'" . s$=s$|
00001630 2b 22 4e 6f 74 20 6c 69 6e 6b 65 64 20 74 6f 20 |+"Not linked to |
00001640 61 6e 79 74 68 69 6e 67 2e 22 0d 00 b6 3b f2 73 |anything."...;.s|
00001650 74 72 69 6e 67 30 28 57 62 74 73 6b 25 2b 32 30 |tring0(Wbtsk%+20|
00001660 2c 73 24 29 3a 21 57 62 74 73 6b 25 3d 32 34 2b |,s$):!Wbtsk%=24+|
00001670 a9 28 a4 73 28 57 62 74 73 6b 25 2b 32 30 29 29 |.(.s(Wbtsk%+20))|
00001680 20 80 20 ac 33 0d 00 b7 16 57 62 74 73 6b 25 21 | . .3....Wbtsk%!|
00001690 31 32 3d 57 62 74 73 6b 25 21 38 0d 00 b8 1c c8 |12=Wbtsk%!8.....|
000016a0 99 20 57 6d 65 73 73 25 2c 31 37 2c 57 62 74 73 |. Wmess%,17,Wbts|
000016b0 6b 25 2c 74 73 6b 25 0d 00 b9 05 cc 0d 00 ba 3b |k%,tsk%........;|
000016c0 f4 20 72 65 74 75 72 6e 20 6f 66 20 4d 65 73 73 |. return of Mess|
000016d0 61 67 65 5f 49 6e 66 6f 20 2d 20 64 69 73 70 6c |age_Info - displ|
000016e0 61 79 20 69 6e 66 6f 20 73 74 72 69 6e 67 20 28 |ay info string (|
000016f0 69 66 20 61 6e 79 29 0d 00 bb 15 e7 20 57 62 25 |if any)..... Wb%|
00001700 21 31 32 3d 6d 79 72 65 66 25 20 8c 0d 00 bc 29 |!12=myref% ....)|
00001710 e7 a4 73 28 57 62 25 2b 32 30 29 3c 3e 22 22 20 |..s(Wb%+20)<>"" |
00001720 8c 20 f2 72 65 70 6d 73 67 28 a4 73 28 57 62 25 |. .repmsg(.s(Wb%|
00001730 2b 32 30 29 29 0d 00 bd 05 cd 0d 00 be 05 cd 0d |+20))...........|
00001740 00 bf 04 0d 00 c0 54 f4 20 52 65 63 65 69 70 74 |......T. Receipt|
00001750 20 6f 66 20 4d 65 73 73 61 67 65 5f 57 68 6f 73 | of Message_Whos|
00001760 41 62 6f 75 74 20 2d 20 63 68 65 63 6b 20 64 65 |About - check de|
00001770 74 61 69 6c 73 20 6f 66 20 6f 62 6a 65 63 74 20 |tails of object |
00001780 61 6e 64 20 72 65 73 70 6f 6e 64 20 77 69 74 68 |and respond with|
00001790 20 49 6d 48 65 72 65 0d 00 c1 0f c9 20 4d 73 67 | ImHere..... Msg|
000017a0 5f 57 68 6f 73 25 0d 00 c2 2c e7 20 28 57 62 25 |_Whos%...,. (Wb%|
000017b0 21 32 30 20 80 20 26 46 46 46 29 3d 26 46 46 39 |!20 . &FFF)=&FF9|
000017c0 20 80 20 74 73 6b 25 3c 3e 54 61 73 6b 5f 68 25 | . tsk%<>Task_h%|
000017d0 20 8c 0d 00 c3 54 f4 20 76 25 3d 57 62 25 21 32 | ....T. v%=Wb%!2|
000017e0 34 3a 76 25 3d 28 21 76 25 2b 76 25 21 34 29 21 |4:v%=(!v%+v%!4)!|
000017f0 34 30 29 3e 3e 32 37 3a 49 46 76 25 3d 36 20 54 |40)>>27:IFv%=6 T|
00001800 48 45 4e 3a 52 45 4d 20 6f 6e 6c 79 20 33 32 62 |HEN:REM only 32b|
00001810 70 70 20 73 70 72 69 74 65 73 20 6e 65 65 64 20 |pp sprites need |
00001820 61 70 70 6c 79 3f 0d 00 c4 31 67 62 25 21 34 3d |apply?...1gb%!4=|
00001830 54 61 73 6b 5f 68 25 3a 67 62 25 21 38 3d 30 3a |Task_h%:gb%!8=0:|
00001840 67 62 25 21 31 32 3d 30 3a 67 62 25 21 31 36 3d |gb%!12=0:gb%!16=|
00001850 4d 73 67 5f 49 6d 25 0d 00 c5 38 e7 20 69 6e 70 |Msg_Im%...8. inp|
00001860 6c 61 63 65 25 20 8c 20 67 62 25 21 32 30 3d 25 |lace% . gb%!20=%|
00001870 31 30 30 31 31 20 8b 20 67 62 25 21 32 30 3d 25 |10011 . gb%!20=%|
00001880 31 31 3a f4 20 66 6c 61 67 73 20 77 6f 72 64 0d |11:. flags word.|
00001890 00 c6 2c 67 62 25 21 32 34 3d 30 3a f2 73 74 72 |..,gb%!24=0:.str|
000018a0 69 6e 67 30 28 67 62 25 2b 32 38 2c 22 53 69 6d |ing0(gb%+28,"Sim|
000018b0 70 6c 65 20 50 61 69 6e 74 22 29 0d 00 c7 3b f2 |ple Paint")...;.|
000018c0 73 74 72 69 6e 67 30 28 67 62 25 2b 36 30 2c 22 |string0(gb%+60,"|
000018d0 21 73 70 61 69 6e 74 22 29 3a 21 67 62 25 3d 36 |!spaint"):!gb%=6|
000018e0 34 2b 28 a9 28 a4 73 28 67 62 25 2b 36 30 29 29 |4+(.(.s(gb%+60))|
000018f0 20 80 20 ac 33 29 0d 00 c8 19 c8 99 20 57 6d 65 | . .3)...... Wme|
00001900 73 73 25 2c 31 37 2c 67 62 25 2c 74 73 6b 25 0d |ss%,17,gb%,tsk%.|
00001910 00 c9 0b f4 20 45 4e 44 49 46 0d 00 ca 05 cd 0d |.... ENDIF......|
00001920 00 cb 04 0d 00 cc 39 f4 20 46 6f 6c 6c 6f 77 69 |......9. Followi|
00001930 6e 67 20 6e 6f 74 20 75 73 65 64 20 62 79 20 74 |ng not used by t|
00001940 68 69 73 20 65 78 61 6d 70 6c 65 2e 20 54 68 69 |his example. Thi|
00001950 73 20 6d 65 73 73 61 67 65 20 69 73 0d 00 cd 4d |s message is...M|
00001960 f4 20 72 65 74 75 72 6e 65 64 20 61 66 74 65 72 |. returned after|
00001970 20 74 68 65 20 6f 77 6e 69 6e 67 20 74 61 73 6b | the owning task|
00001980 20 68 61 73 20 73 75 63 63 65 73 73 66 75 6c 6c | has successfull|
00001990 79 20 63 68 61 6e 67 65 64 20 74 68 65 20 73 69 |y changed the si|
000019a0 7a 65 20 6f 66 20 74 68 65 0d 00 ce 4a f4 20 6f |ze of the...J. o|
000019b0 62 6a 65 63 74 20 69 6e 20 72 65 73 70 6f 6e 73 |bject in respons|
000019c0 65 20 74 6f 20 4d 65 73 73 61 67 65 5f 52 65 73 |e to Message_Res|
000019d0 69 7a 65 20 73 65 6e 74 2e 20 43 68 65 63 6b 20 |ize sent. Check |
000019e0 6d 79 72 65 66 20 62 65 66 6f 72 65 20 61 63 74 |myref before act|
000019f0 69 6e 67 0d 00 cf 37 f4 20 61 73 20 69 74 20 6d |ing...7. as it m|
00001a00 61 79 20 62 65 20 61 20 72 65 73 69 7a 65 20 72 |ay be a resize r|
00001a10 65 71 75 65 73 74 20 62 79 20 61 6e 6f 74 68 65 |equest by anothe|
00001a20 72 20 70 72 6f 67 72 61 6d 2e 0d 00 d0 14 c9 20 |r program...... |
00001a30 4d 73 67 5f 52 65 73 69 7a 65 41 63 6b 25 0d 00 |Msg_ResizeAck%..|
00001a40 d1 14 e7 57 62 25 21 31 32 3d 6d 79 72 65 66 25 |...Wb%!12=myref%|
00001a50 20 8c 0d 00 d2 19 f2 64 6f 74 68 65 72 65 73 69 | ......dotheresi|
00001a60 7a 65 3a 6d 79 72 65 66 25 3d 30 0d 00 d3 05 cd |ze:myref%=0.....|
00001a70 0d 00 d4 04 0d 00 d5 24 f4 20 52 65 63 65 69 70 |.......$. Receip|
00001a80 74 20 6f 66 20 4d 65 73 73 61 67 65 5f 44 6f 59 |t of Message_DoY|
00001a90 6f 75 72 53 74 75 66 66 0d 00 d6 30 f4 20 6f 70 |ourStuff...0. op|
00001aa0 65 6e 20 72 65 6d 6f 74 65 20 77 69 6e 64 6f 77 |en remote window|
00001ab0 20 61 6e 64 20 64 69 73 70 6c 61 79 20 74 68 65 | and display the|
00001ac0 20 6f 62 6a 65 63 74 2e 0d 00 d7 0d c9 20 4d 73 | object...... Ms|
00001ad0 67 5f 44 6f 25 0d 00 d8 0e 74 73 6b 25 3d 57 62 |g_Do%....tsk%=Wb|
00001ae0 25 21 34 0d 00 d9 27 f4 20 61 72 65 20 77 65 20 |%!4...'. are we |
00001af0 61 6c 72 65 61 64 79 20 65 64 69 74 69 6e 67 20 |already editing |
00001b00 73 6f 6d 65 74 68 69 6e 67 3f 0d 00 da 48 f4 20 |something?...H. |
00001b10 69 66 20 73 6f 20 28 61 6e 64 20 69 74 73 20 6e |if so (and its n|
00001b20 6f 74 20 74 68 69 73 20 74 61 67 29 2c 20 73 65 |ot this tag), se|
00001b30 6e 64 20 74 68 65 20 6f 6c 64 20 6c 6f 63 61 6c |nd the old local|
00001b40 20 74 61 73 6b 20 61 6e 20 75 6e 68 6f 6f 6b 2e | task an unhook.|
00001b50 2e 2e 0d 00 db 63 e7 20 72 65 6d 6f 74 65 74 61 |.....c. remoteta|
00001b60 67 25 3e 30 20 80 20 72 65 6d 6f 74 65 74 61 67 |g%>0 . remotetag|
00001b70 25 3c 3e 57 62 25 21 32 34 20 8c 20 74 73 6b 68 |%<>Wb%!24 . tskh|
00001b80 25 3d 6c 6f 63 61 6c 74 61 73 6b 25 3a 6d 73 30 |%=localtask%:ms0|
00001b90 25 3d 30 3a 6d 73 31 25 3d 72 65 6d 6f 74 65 74 |%=0:ms1%=remotet|
00001ba0 61 67 25 3a f2 70 63 61 28 4d 73 67 5f 55 6e 68 |ag%:.pca(Msg_Unh|
00001bb0 6f 6f 6b 25 29 0d 00 dc 04 0d 00 dd 17 f4 20 6e |ook%)......... n|
00001bc0 65 77 20 6c 6f 63 61 6c 20 74 61 73 6b 2e 2e 2e |ew local task...|
00001bd0 0d 00 de 14 6c 6f 63 61 6c 74 61 73 6b 25 3d 57 |....localtask%=W|
00001be0 62 25 21 34 0d 00 df 10 75 66 6c 67 25 3d 57 62 |b%!4....uflg%=Wb|
00001bf0 25 21 33 36 0d 00 e0 48 f4 20 62 65 67 69 6e 6e |%!36...H. beginn|
00001c00 69 6e 67 20 61 6e 20 69 6e 70 6c 61 63 65 20 73 |ing an inplace s|
00001c10 65 73 73 69 6f 6e 20 73 6f 20 63 6c 6f 73 65 20 |ession so close |
00001c20 74 68 65 20 72 65 6d 6f 74 65 20 77 69 6e 64 6f |the remote windo|
00001c30 77 20 28 69 66 20 6f 70 65 6e 29 2e 0d 00 e1 36 |w (if open)....6|
00001c40 e7 20 28 75 66 6c 67 25 20 80 20 25 31 30 30 30 |. (uflg% . %1000|
00001c50 30 29 3c 3e 30 20 80 20 69 6e 70 6c 61 63 65 25 |0)<>0 . inplace%|
00001c60 20 8c 20 f2 43 77 54 28 6d 5f 72 65 6d 6f 74 65 | . .CwT(m_remote|
00001c70 25 29 0d 00 e2 0d f2 6e 65 77 6d 75 6e 67 65 0d |%).....newmunge.|
00001c80 00 e3 04 0d 00 e4 59 f4 20 69 6e 70 6c 61 63 65 |......Y. inplace|
00001c90 20 6f 6e 20 73 6f 20 6f 70 65 6e 74 6f 6f 6c 62 | on so opentoolb|
00001ca0 61 72 20 61 6e 64 20 73 65 6e 64 20 4d 73 67 5f |ar and send Msg_|
00001cb0 48 6f 6f 6b 20 28 77 68 69 63 68 20 77 69 6c 6c |Hook (which will|
00001cc0 20 67 65 6e 65 72 61 74 65 20 6d 73 67 5f 4f 62 | generate msg_Ob|
00001cd0 6a 50 6f 73 20 66 6f 72 20 75 73 29 0d 00 e5 6f |jPos for us)...o|
00001ce0 e7 20 28 75 66 6c 67 25 20 80 20 25 31 30 30 30 |. (uflg% . %1000|
00001cf0 30 29 3c 3e 30 20 80 20 72 65 6d 6f 74 65 74 61 |0)<>0 . remoteta|
00001d00 67 25 3e 30 20 80 20 69 6e 70 6c 61 63 65 25 20 |g%>0 . inplace% |
00001d10 8c 20 74 73 6b 68 25 3d 6c 6f 63 61 6c 74 61 73 |. tskh%=localtas|
00001d20 6b 25 3a f2 70 63 61 28 4d 73 67 5f 48 6f 6f 6b |k%:.pca(Msg_Hook|
00001d30 25 29 3a f2 4f 77 28 77 5f 72 65 6d 6f 74 65 74 |%):.Ow(w_remotet|
00001d40 25 2c 2d 31 2c 2d 31 2c 2d 31 29 0d 00 e6 04 0d |%,-1,-1,-1).....|
00001d50 00 e7 1e f4 20 6f 62 6a 65 63 74 20 70 6f 73 69 |.... object posi|
00001d60 74 69 6f 6e 20 6d 65 73 73 61 67 65 2e 0d 00 e8 |tion message....|
00001d70 30 f4 20 6f 70 65 6e 20 74 6f 6f 6c 62 61 72 20 |0. open toolbar |
00001d80 61 74 20 63 6f 72 72 65 63 74 20 70 6f 73 69 74 |at correct posit|
00001d90 69 6f 6e 20 61 6e 64 20 64 65 70 74 68 0d 00 e9 |ion and depth...|
00001da0 11 c9 20 4d 73 67 5f 4f 62 6a 50 6f 73 25 0d 00 |.. Msg_ObjPos%..|
00001db0 ea 04 0d 00 eb 19 e7 20 57 62 25 21 32 34 3d 72 |....... Wb%!24=r|
00001dc0 65 6d 6f 74 65 74 61 67 25 20 8c 0d 00 ec 3d 72 |emotetag% ....=r|
00001dd0 65 6d 6f 74 65 73 63 61 6c 65 25 3d 57 62 25 21 |emotescale%=Wb%!|
00001de0 34 38 3a 72 65 6d 6f 74 65 78 70 6f 73 25 3d 57 |48:remotexpos%=W|
00001df0 62 25 21 35 32 3a 72 65 6d 6f 74 65 79 70 6f 73 |b%!52:remoteypos|
00001e00 25 3d 57 62 25 21 35 36 0d 00 ed 44 72 65 6d 6f |%=Wb%!56...Dremo|
00001e10 74 65 73 63 61 6c 65 79 25 3d 57 62 25 21 32 38 |tescaley%=Wb%!28|
00001e20 3a e7 72 65 6d 6f 74 65 73 63 61 6c 65 79 25 3d |:.remotescaley%=|
00001e30 30 20 72 65 6d 6f 74 65 73 63 61 6c 65 79 25 3d |0 remotescaley%=|
00001e40 72 65 6d 6f 74 65 73 63 61 6c 65 25 0d 00 ee 1d |remotescale%....|
00001e50 78 6f 77 6e 25 3d 57 62 25 21 33 32 3a 79 6f 77 |xown%=Wb%!32:yow|
00001e60 6e 25 3d 57 62 25 21 33 36 0d 00 ef 94 21 67 62 |n%=Wb%!36....!gb|
00001e70 6c 6b 25 3d 77 5f 72 65 6d 6f 74 65 74 25 3a 67 |lk%=w_remotet%:g|
00001e80 62 6c 6b 25 21 34 3d 57 62 25 21 33 32 3a 67 62 |blk%!4=Wb%!32:gb|
00001e90 6c 6b 25 21 38 3d 57 62 25 21 33 36 2d 36 34 3a |lk%!8=Wb%!36-64:|
00001ea0 67 62 6c 6b 25 21 31 32 3d 67 62 6c 6b 25 21 34 |gblk%!12=gblk%!4|
00001eb0 2b 31 39 32 3a 67 62 6c 6b 25 21 31 36 3d 67 62 |+192:gblk%!16=gb|
00001ec0 6c 6b 25 21 38 2b 36 34 3a 67 62 6c 6b 25 21 32 |lk%!8+64:gblk%!2|
00001ed0 30 3d 30 3a 67 62 6c 6b 25 21 32 34 3d 30 3a 67 |0=0:gblk%!24=0:g|
00001ee0 62 6c 6b 25 21 32 38 3d 57 62 25 21 34 34 3a c8 |blk%!28=Wb%!44:.|
00001ef0 99 20 57 6f 77 25 2c 2c 67 62 6c 6b 25 0d 00 f0 |. Wow%,,gblk%...|
00001f00 05 cd 0d 00 f1 04 0d 00 f2 1d f4 20 73 65 6e 74 |........... sent|
00001f10 20 61 6e 20 75 6e 68 6f 6f 6b 20 6d 65 73 73 61 | an unhook messa|
00001f20 67 65 2e 0d 00 f3 38 f4 20 61 73 20 53 70 61 69 |ge....8. as Spai|
00001f30 6e 74 20 63 61 6e 20 68 61 6e 64 6c 65 20 62 6f |nt can handle bo|
00001f40 74 68 20 73 69 64 65 73 20 6f 66 20 74 68 65 20 |th sides of the |
00001f50 70 72 6f 74 6f 63 6f 6c 20 69 74 0d 00 f4 4c f4 |protocol it...L.|
00001f60 20 6d 75 73 74 20 63 68 65 63 6b 20 74 6f 20 73 | must check to s|
00001f70 65 65 20 69 66 20 69 74 20 69 73 20 74 68 65 20 |ee if it is the |
00001f80 72 65 6d 6f 74 65 20 6f 72 20 6c 6f 63 61 6c 20 |remote or local |
00001f90 74 61 73 6b 20 77 68 69 63 68 20 69 73 20 61 73 |task which is as|
00001fa0 6b 69 6e 67 20 69 74 0d 00 f5 10 f4 20 74 6f 20 |king it..... to |
00001fb0 75 6e 68 6f 6f 6b 2e 0d 00 f6 11 c9 20 4d 73 67 |unhook...... Msg|
00001fc0 5f 55 6e 68 6f 6f 6b 25 0d 00 f7 43 f4 20 72 65 |_Unhook%...C. re|
00001fd0 6d 6f 74 65 20 74 61 73 6b 20 2d 20 74 68 65 72 |mote task - ther|
00001fe0 65 66 6f 72 65 20 77 65 20 61 72 65 20 74 68 65 |efore we are the|
00001ff0 20 6c 6f 63 61 6c 20 73 6f 20 64 65 6c 65 74 65 | local so delete|
00002000 20 74 72 61 70 20 69 63 6f 6e 2e 0d 00 f8 04 0d | trap icon......|
00002010 00 f9 54 e7 57 62 25 21 32 34 3d 6c 6f 63 61 6c |..T.Wb%!24=local|
00002020 74 61 67 25 20 80 20 74 73 6b 25 3d 72 65 6d 6f |tag% . tsk%=remo|
00002030 74 65 74 61 73 6b 25 20 8c 20 f2 64 65 6c 65 74 |tetask% . .delet|
00002040 65 52 69 63 6f 6e 28 30 29 3a 61 72 65 6d 6f 74 |eRicon(0):aremot|
00002050 65 25 3d 2d 31 3a 72 65 6d 6f 74 65 74 61 73 6b |e%=-1:remotetask|
00002060 25 3d 30 0d 00 fa 46 f4 20 6c 6f 63 61 6c 20 74 |%=0...F. local t|
00002070 61 73 6b 20 2d 20 74 68 65 72 65 66 6f 72 65 20 |ask - therefore |
00002080 77 65 20 61 72 65 20 74 68 65 20 72 65 6d 6f 74 |we are the remot|
00002090 65 20 73 6f 20 63 6c 6f 73 65 20 77 69 6e 64 6f |e so close windo|
000020a0 77 2f 74 6f 6f 6c 62 61 72 0d 00 fb 65 e7 20 57 |w/toolbar...e. W|
000020b0 62 25 21 32 34 3d 72 65 6d 6f 74 65 74 61 67 25 |b%!24=remotetag%|
000020c0 20 80 20 74 73 6b 25 3d 6c 6f 63 61 6c 74 61 73 | . tsk%=localtas|
000020d0 6b 25 20 8c 20 72 65 6d 6f 74 65 74 61 67 25 3d |k% . remotetag%=|
000020e0 2d 31 3a f2 43 77 28 6d 5f 72 65 6d 6f 74 65 25 |-1:.Cw(m_remote%|
000020f0 29 3a f2 43 77 28 77 5f 72 65 6d 6f 74 65 74 25 |):.Cw(w_remotet%|
00002100 29 3a 6c 6f 63 61 6c 74 61 73 6b 25 3d 30 0d 00 |):localtask%=0..|
00002110 fc 04 0d 00 fd 2a f4 20 73 65 6e 74 20 61 20 68 |.....*. sent a h|
00002120 6f 6f 6b 20 6d 65 73 73 61 67 65 20 62 79 20 61 |ook message by a|
00002130 20 72 65 6d 6f 74 65 20 74 61 73 6b 0d 00 fe 2c | remote task...,|
00002140 f4 20 63 72 65 61 74 65 20 61 20 74 72 61 70 20 |. create a trap |
00002150 69 63 6f 6e 20 61 6e 64 20 73 65 6e 64 20 4d 73 |icon and send Ms|
00002160 67 5f 4f 62 6a 50 6f 73 0d 00 ff 0f c9 20 4d 73 |g_ObjPos..... Ms|
00002170 67 5f 48 6f 6f 6b 25 0d 01 00 18 e7 20 57 62 25 |g_Hook%..... Wb%|
00002180 21 32 34 3d 6c 6f 63 61 6c 74 61 67 25 20 8c 0d |!24=localtag% ..|
00002190 01 01 3f 72 65 6d 6f 74 65 77 69 6e 25 3d 57 62 |..?remotewin%=Wb|
000021a0 25 21 33 32 3a 72 65 6d 6f 74 65 74 61 73 6b 25 |%!32:remotetask%|
000021b0 3d 57 62 25 21 34 3a 61 72 65 6d 6f 74 65 25 3d |=Wb%!4:aremote%=|
000021c0 30 3a 72 62 75 74 25 3d 57 62 25 21 32 38 0d 01 |0:rbut%=Wb%!28..|
000021d0 02 35 72 65 6d 6f 74 65 69 63 6f 6e 25 3d a4 63 |.5remoteicon%=.c|
000021e0 72 65 61 74 65 52 69 63 6f 6e 28 30 2c 30 2c 78 |reateRicon(0,0,x|
000021f0 77 4c 25 2a 32 2c 79 77 4c 25 2a 32 2c 72 62 75 |wL%*2,ywL%*2,rbu|
00002200 74 25 29 0d 01 03 45 f2 67 77 69 28 6d 5f 6c 6f |t%)...E.gwi(m_lo|
00002210 63 61 6c 25 29 3a 79 31 61 25 3d 79 31 25 2d 79 |cal%):y1a%=y1%-y|
00002220 73 63 72 6f 6c 25 3a 79 73 63 72 6f 6c 61 25 3d |scrol%:yscrola%=|
00002230 79 73 63 72 6f 6c 25 3a 78 73 63 72 6f 6c 61 25 |yscrol%:xscrola%|
00002240 3d 78 73 63 72 6f 6c 25 0d 01 04 1c 78 70 6f 73 |=xscrol%....xpos|
00002250 55 25 3d 77 69 6e 78 25 3a 79 70 6f 73 55 25 3d |U%=winx%:yposU%=|
00002260 79 31 61 25 0d 01 05 1f 78 70 6f 73 4c 25 3d 78 |y1a%....xposL%=x|
00002270 70 6f 73 55 25 3a 79 70 6f 73 4c 25 3d 79 70 6f |posU%:yposL%=ypo|
00002280 73 55 25 0d 01 06 1c e7 78 70 6f 73 4c 25 3c 78 |sU%.....xposL%<x|
00002290 30 25 20 8c 20 78 70 6f 73 4c 25 3d 78 30 25 0d |0% . xposL%=x0%.|
000022a0 01 07 1c e7 79 70 6f 73 4c 25 3c 79 30 25 20 8c |....yposL%<y0% .|
000022b0 20 79 70 6f 73 4c 25 3d 79 30 25 0d 01 08 1c e7 | yposL%=y0%.....|
000022c0 78 70 6f 73 4c 25 3e 78 31 25 20 8c 20 78 70 6f |xposL%>x1% . xpo|
000022d0 73 4c 25 3d 78 31 25 0d 01 09 1c e7 79 70 6f 73 |sL%=x1%.....ypos|
000022e0 4c 25 3e 79 31 25 20 8c 20 79 70 6f 73 4c 25 3d |L%>y1% . yposL%=|
000022f0 79 31 25 0d 01 0a 1c 73 66 61 63 25 3d 36 35 35 |y1%....sfac%=655|
00002300 33 36 3a f4 20 31 30 30 25 20 73 63 61 6c 65 0d |36:. 100% scale.|
00002310 01 0b 4a 6d 73 32 25 3d 6d 5f 6c 6f 63 61 6c 25 |..Jms2%=m_local%|
00002320 3a 6d 73 33 25 3d 77 5f 6c 6f 63 61 6c 74 25 3a |:ms3%=w_localt%:|
00002330 76 25 3d 73 25 3a 74 73 6b 68 25 3d 72 65 6d 6f |v%=s%:tskh%=remo|
00002340 74 65 74 61 73 6b 25 3a f2 70 63 61 28 4d 73 67 |tetask%:.pca(Msg|
00002350 5f 4f 62 6a 50 6f 73 25 29 0d 01 0c 05 cd 0d 01 |_ObjPos%).......|
00002360 0d 04 0d 01 0e 1d f4 20 4d 65 73 73 61 67 65 5f |....... Message_|
00002370 43 68 61 6e 67 65 64 20 6d 65 73 73 61 67 65 0d |Changed message.|
00002380 01 0f 21 f4 20 61 73 73 75 6d 65 20 6e 6f 74 68 |..!. assume noth|
00002390 69 6e 67 20 69 73 20 74 68 65 20 73 61 6d 65 21 |ing is the same!|
000023a0 0d 01 10 12 c9 20 4d 73 67 5f 43 68 61 6e 67 65 |..... Msg_Change|
000023b0 64 25 0d 01 11 23 e7 20 57 62 25 21 32 34 3d 72 |d%...#. Wb%!24=r|
000023c0 65 6d 6f 74 65 74 61 67 25 20 8c 20 f2 6e 65 77 |emotetag% . .new|
000023d0 6d 75 6e 67 65 0d 01 12 50 e7 57 62 25 21 32 34 |munge...P.Wb%!24|
000023e0 3d 6c 6f 63 61 6c 74 61 67 25 20 80 20 74 73 6b |=localtag% . tsk|
000023f0 25 3c 3e 54 61 73 6b 5f 68 25 20 8c 20 f2 70 72 |%<>Task_h% . .pr|
00002400 69 6d 65 5f 6c 6f 63 61 6c 28 6c 6f 63 61 6c 24 |ime_local(local$|
00002410 29 3a f2 72 65 64 72 61 77 69 74 28 6d 5f 6c 6f |):.redrawit(m_lo|
00002420 63 61 6c 25 29 0d 01 13 04 0d 01 14 43 f4 20 4d |cal%).......C. M|
00002430 65 73 73 61 67 65 5f 44 65 73 65 6c 65 63 74 20 |essage_Deselect |
00002440 2d 20 64 65 6c 69 6e 6b 20 66 72 6f 6d 20 6f 62 |- delink from ob|
00002450 6a 65 63 74 20 61 73 20 69 74 20 68 61 73 20 62 |ject as it has b|
00002460 65 65 6e 20 64 65 6c 65 74 65 64 2e 0d 01 15 10 |een deleted.....|
00002470 c9 20 4d 73 67 5f 44 65 73 65 6c 25 0d 01 16 41 |. Msg_Desel%...A|
00002480 e7 57 62 25 21 32 34 3d 6c 6f 63 61 6c 74 61 67 |.Wb%!24=localtag|
00002490 25 20 8c 20 e7 20 61 72 65 6d 6f 74 65 25 3e 3d |% . . aremote%>=|
000024a0 30 20 f2 64 65 6c 65 74 65 52 69 63 6f 6e 28 30 |0 .deleteRicon(0|
000024b0 29 3a 61 72 65 6d 6f 74 65 25 3d 2d 31 0d 01 17 |):aremote%=-1...|
000024c0 18 e7 57 62 25 21 32 34 3d 72 65 6d 6f 74 65 74 |..Wb%!24=remotet|
000024d0 61 67 25 20 8c 0d 01 18 1d 72 65 6d 6f 74 65 74 |ag% .....remotet|
000024e0 61 67 25 3d 30 3a 6c 6f 63 61 6c 74 61 73 6b 25 |ag%=0:localtask%|
000024f0 3d 30 0d 01 19 23 77 6e 24 3d 22 4e 6f 74 68 69 |=0...#wn$="Nothi|
00002500 6e 67 22 3a 24 6d 61 69 6e 74 25 3d 22 4e 6f 74 |ng":$maint%="Not|
00002510 68 69 6e 67 22 0d 01 1a 35 e7 20 6d 61 69 6e 6f |hing"...5. maino|
00002520 25 20 8c 20 f2 72 65 64 72 61 77 69 74 28 6d 5f |% . .redrawit(m_|
00002530 72 65 6d 6f 74 65 25 29 20 8b 20 f2 43 77 28 77 |remote%) . .Cw(w|
00002540 5f 72 65 6d 6f 74 65 74 25 29 0d 01 1b 05 cd 0d |_remotet%)......|
00002550 01 1c 04 0d 01 1d 3a f4 20 4d 65 73 73 61 67 65 |......:. Message|
00002560 5f 44 6f 6e 65 25 20 73 6f 6d 65 6f 6e 65 20 68 |_Done% someone h|
00002570 61 73 20 6d 6f 64 69 66 69 65 64 20 74 68 65 20 |as modified the |
00002580 65 6e 74 69 72 65 20 6f 62 6a 65 63 74 0d 01 1e |entire object...|
00002590 4c f4 20 73 6f 20 72 65 64 72 61 77 20 69 74 2e |L. so redraw it.|
000025a0 20 49 74 73 20 73 69 7a 65 20 61 6e 64 20 6f 74 | Its size and ot|
000025b0 68 65 72 20 70 61 72 61 6d 65 74 65 72 73 20 61 |her parameters a|
000025c0 72 65 20 73 74 69 6c 6c 20 74 68 65 20 73 61 6d |re still the sam|
000025d0 65 20 74 68 6f 75 67 68 2e 0d 01 1f 0f c9 20 4d |e though...... M|
000025e0 73 67 5f 44 6f 6e 65 25 0d 01 20 18 e7 72 65 6d |sg_Done%.. ..rem|
000025f0 6f 74 65 74 61 67 25 3d 57 62 25 21 32 34 20 8c |otetag%=Wb%!24 .|
00002600 0d 01 21 18 f2 72 65 64 72 61 77 69 74 28 6d 5f |..!..redrawit(m_|
00002610 72 65 6d 6f 74 65 25 29 0d 01 22 05 cd 0d 01 23 |remote%).."....#|
00002620 17 e7 57 62 25 21 32 34 3d 6c 6f 63 61 6c 74 61 |..Wb%!24=localta|
00002630 67 25 20 8c 0d 01 24 17 f2 72 65 64 72 61 77 69 |g% ...$..redrawi|
00002640 74 28 6d 5f 6c 6f 63 61 6c 25 29 0d 01 25 05 cd |t(m_local%)..%..|
00002650 0d 01 26 04 0d 01 27 42 f4 20 4d 65 73 73 61 67 |..&...'B. Messag|
00002660 65 5f 55 70 64 61 74 65 41 72 65 61 20 2d 20 61 |e_UpdateArea - a|
00002670 6e 20 61 72 65 61 20 6f 66 20 74 68 65 20 6f 62 |n area of the ob|
00002680 6a 65 63 74 20 68 61 73 20 62 65 65 6e 20 6d 6f |ject has been mo|
00002690 64 69 66 69 65 64 0d 01 28 34 f4 20 75 70 64 61 |dified..(4. upda|
000026a0 74 65 20 74 68 65 20 63 6f 72 72 65 63 74 20 61 |te the correct a|
000026b0 72 65 61 20 6f 66 20 74 68 65 20 77 69 6e 64 6f |rea of the windo|
000026c0 77 20 71 75 69 63 6b 6c 79 2e 0d 01 29 11 c9 20 |w quickly...).. |
000026d0 4d 73 67 5f 55 70 61 72 65 61 25 0d 01 2a 18 e7 |Msg_Uparea%..*..|
000026e0 72 65 6d 6f 74 65 74 61 67 25 3d 57 62 25 21 32 |remotetag%=Wb%!2|
000026f0 34 20 8c 0d 01 2b 3d 6d 73 30 25 3d 57 62 25 21 |4 ...+=ms0%=Wb%!|
00002700 32 38 3a 6d 73 31 25 3d 57 62 25 21 33 32 3a 6d |28:ms1%=Wb%!32:m|
00002710 73 32 25 3d 57 62 25 21 33 36 2d 6d 73 30 25 3a |s2%=Wb%!36-ms0%:|
00002720 6d 73 33 25 3d 57 62 25 21 34 30 2d 6d 73 31 25 |ms3%=Wb%!40-ms1%|
00002730 0d 01 2c 1b 73 70 72 69 74 65 78 6d 25 3d 34 3a |..,.spritexm%=4:|
00002740 73 70 72 69 74 65 79 6d 25 3d 34 0d 01 2d 2b f2 |spriteym%=4..-+.|
00002750 72 65 64 72 61 77 57 28 6d 5f 72 65 6d 6f 74 65 |redrawW(m_remote|
00002760 25 2c 6d 73 30 25 2c 6d 73 31 25 2c 6d 73 32 25 |%,ms0%,ms1%,ms2%|
00002770 2c 6d 73 33 25 29 0d 01 2e 05 cd 0d 01 2f 17 e7 |,ms3%)......./..|
00002780 6c 6f 63 61 6c 74 61 67 25 3d 57 62 25 21 32 34 |localtag%=Wb%!24|
00002790 20 8c 0d 01 30 3d 6d 73 30 25 3d 57 62 25 21 32 | ...0=ms0%=Wb%!2|
000027a0 38 3a 6d 73 31 25 3d 57 62 25 21 33 32 3a 6d 73 |8:ms1%=Wb%!32:ms|
000027b0 32 25 3d 57 62 25 21 33 36 2d 6d 73 30 25 3a 6d |2%=Wb%!36-ms0%:m|
000027c0 73 33 25 3d 57 62 25 21 34 30 2d 6d 73 31 25 0d |s3%=Wb%!40-ms1%.|
000027d0 01 31 1b 73 70 72 69 74 65 78 6d 25 3d 34 3a 73 |.1.spritexm%=4:s|
000027e0 70 72 69 74 65 79 6d 25 3d 34 0d 01 32 2a f2 72 |priteym%=4..2*.r|
000027f0 65 64 72 61 77 57 28 6d 5f 6c 6f 63 61 6c 25 2c |edrawW(m_local%,|
00002800 6d 73 30 25 2c 6d 73 31 25 2c 6d 73 32 25 2c 6d |ms0%,ms1%,ms2%,m|
00002810 73 33 25 29 0d 01 33 05 cd 0d 01 34 04 0d 01 35 |s3%)..3....4...5|
00002820 3c f4 20 45 78 61 6d 70 6c 65 20 72 65 74 75 72 |<. Example retur|
00002830 6e 20 66 72 6f 6d 20 4d 65 73 73 61 67 65 5f 4d |n from Message_M|
00002840 69 73 63 4f 70 20 28 43 6f 6d 70 6f 5f 47 69 76 |iscOp (Compo_Giv|
00002850 65 44 65 74 61 69 6c 73 29 0d 01 36 1f f4 20 6e |eDetails)..6.. n|
00002860 6f 74 20 75 73 65 64 20 62 79 20 74 68 69 73 20 |ot used by this |
00002870 70 72 6f 67 72 61 6d 2e 0d 01 37 20 c9 20 4d 73 |program...7 . Ms|
00002880 67 5f 4d 69 73 63 25 3a e7 74 73 6b 25 3c 3e 54 |g_Misc%:.tsk%<>T|
00002890 61 73 6b 5f 68 25 20 8c 0d 01 38 0f c8 8e 20 57 |ask_h% ...8... W|
000028a0 62 25 21 32 30 20 ca 0d 01 39 15 c9 20 53 75 62 |b%!20 ...9.. Sub|
000028b0 5f 41 73 73 6f 63 69 61 74 65 64 25 0d 01 3a 09 |_Associated%..:.|
000028c0 ef 34 2c 33 30 0d 01 3b 1b f1 20 27 22 44 65 74 |.4,30..;.. '"Det|
000028d0 61 69 6c 73 20 6f 66 20 6f 62 6a 65 63 74 20 22 |ails of object "|
000028e0 0d 01 3c 0f f1 20 27 22 4d 61 73 6b 73 3a 22 0d |..<.. '"Masks:".|
000028f0 01 3d 31 e3 78 78 25 3d 30 20 b8 20 34 3a f1 20 |.=1.xx%=0 . 4:. |
00002900 78 78 25 3b 22 20 61 64 64 72 65 73 73 3d 22 7e |xx%;" address="~|
00002910 57 62 25 21 28 34 30 2b 78 78 25 2a 34 29 3a ed |Wb%!(40+xx%*4):.|
00002920 0d 01 3e 18 f1 20 27 22 4f 70 61 63 69 74 79 3d |..>.. '"Opacity=|
00002930 22 3b 57 62 25 21 36 38 0d 01 3f 14 f1 20 22 4d |";Wb%!68..?.. "M|
00002940 61 74 68 3d 22 3b 57 62 25 21 37 32 0d 01 40 05 |ath=";Wb%!72..@.|
00002950 cb 0d 01 41 05 cd 0d 01 42 04 0d 01 43 18 c9 26 |...A....B...C..&|
00002960 34 30 30 43 31 3a f2 69 6e 69 74 73 70 74 72 61 |400C1:.initsptra|
00002970 6e 73 0d 01 44 38 c9 26 34 30 30 43 30 3a c8 99 |ns..D8.&400C0:..|
00002980 22 57 69 6d 70 5f 43 72 65 61 74 65 53 75 62 4d |"Wimp_CreateSubM|
00002990 65 6e 75 22 2c 2c 57 62 25 21 32 30 2c 57 62 25 |enu",,Wb%!20,Wb%|
000029a0 21 32 34 2c 57 62 25 21 32 38 0d 01 45 13 c9 26 |!24,Wb%!28..E..&|
000029b0 35 30 32 3a f2 68 65 6c 70 74 65 78 74 0d 01 46 |502:.helptext..F|
000029c0 46 c9 20 26 34 37 37 30 30 2c 26 34 37 37 30 31 |F. &47700,&47701|
000029d0 3a 76 68 25 3d 57 62 25 21 32 30 3a 76 32 25 3d |:vh%=Wb%!20:v2%=|
000029e0 57 62 25 21 32 38 3a e7 20 6d 65 73 73 25 3d 26 |Wb%!28:. mess%=&|
000029f0 34 37 37 30 30 20 8c 20 6f 46 43 4f 4c 31 25 3d |47700 . oFCOL1%=|
00002a00 76 32 25 0d 01 47 1d e7 20 28 57 62 25 21 32 34 |v2%..G.. (Wb%!24|
00002a10 20 80 20 31 29 3d 31 20 8c 20 76 32 25 3d 2d 31 | . 1)=1 . v2%=-1|
00002a20 0d 01 48 2c c8 97 20 6d 78 25 2c 6d 79 25 2c 62 |..H,.. mx%,my%,b|
00002a30 74 25 3a e7 28 62 74 25 3d 35 20 84 20 6d 65 73 |t%:.(bt%=5 . mes|
00002a40 73 25 3d 26 34 37 37 30 30 29 20 8c 0d 01 49 13 |s%=&47700) ...I.|
00002a50 f4 20 43 6f 6c 6f 75 72 43 68 61 6e 67 65 64 0d |. ColourChanged.|
00002a60 01 4a 1b 70 63 6f 6c 25 3d 76 32 25 3a 6f 46 43 |.J.pcol%=v2%:oFC|
00002a70 4f 4c 31 25 3d 70 63 6f 6c 25 0d 01 4b 05 cd 0d |OL1%=pcol%..K...|
00002a80 01 4c 0c 6d 65 73 73 25 3d 2d 31 0d 01 4d 21 c9 |.L.mess%=-1..M!.|
00002a90 26 34 37 37 30 32 3a 76 68 25 3d 57 62 25 21 32 |&47702:vh%=Wb%!2|
00002aa0 30 3a 76 32 25 3d 57 62 25 21 32 38 0d 01 4e 11 |0:v2%=Wb%!28..N.|
00002ab0 c8 97 20 6d 78 25 2c 6d 79 25 2c 62 25 0d 01 4f |.. mx%,my%,b%..O|
00002ac0 11 70 63 6f 6c 25 3d 6f 46 43 4f 4c 31 25 0d 01 |.pcol%=oFCOL1%..|
00002ad0 50 27 e7 20 62 25 3c 3e 31 20 8c 20 c8 99 26 36 |P'. b%<>1 . ..&6|
00002ae0 37 37 30 33 2c 30 2c 57 62 25 21 32 30 3a 6c 63 |7703,0,Wb%!20:lc|
00002af0 70 77 25 3d 30 0d 01 51 05 cb 0d 01 52 05 e1 0d |pw%=0..Q....R...|
00002b00 01 53 04 0d 01 54 0f f4 20 21 21 21 50 43 41 21 |.S...T.. !!!PCA!|
00002b10 21 21 0d 01 55 6d f4 20 6e 65 77 20 6f 72 20 72 |!!..Um. new or r|
00002b20 61 64 69 63 61 6c 6c 79 20 6d 6f 64 69 66 69 65 |adically modifie|
00002b30 64 20 72 65 6d 6f 74 65 20 6f 62 6a 65 63 74 20 |d remote object |
00002b40 73 6f 20 72 65 2d 72 65 61 64 20 69 74 73 20 64 |so re-read its d|
00002b50 65 74 61 69 6c 73 20 28 77 69 64 74 68 20 61 6e |etails (width an|
00002b60 64 20 68 65 69 67 68 74 20 6d 61 79 20 68 61 76 |d height may hav|
00002b70 65 20 63 68 61 6e 67 65 64 20 65 74 63 2e 29 0d |e changed etc.).|
00002b80 01 56 0e dd f2 6e 65 77 6d 75 6e 67 65 0d 01 57 |.V...newmunge..W|
00002b90 14 e7 20 57 62 25 21 32 30 3c 3e 26 46 46 39 20 |.. Wb%!20<>&FF9 |
00002ba0 8c 0d 01 58 22 f4 20 77 6f 6f 70 73 2c 20 77 65 |...X". woops, we|
00002bb0 20 63 61 6e 27 74 20 65 64 69 74 20 74 68 61 74 | can't edit that|
00002bc0 2e 2e 2e 0d 01 59 4e e7 20 72 65 6d 6f 74 65 74 |.....YN. remotet|
00002bd0 61 67 25 3e 30 20 8c 20 74 73 6b 68 25 3d 6c 6f |ag%>0 . tskh%=lo|
00002be0 63 61 6c 74 61 73 6b 25 3a 6d 73 30 25 3d 30 3a |caltask%:ms0%=0:|
00002bf0 6d 73 31 25 3d 72 65 6d 6f 74 65 74 61 67 25 3a |ms1%=remotetag%:|
00002c00 f2 70 63 61 28 4d 73 67 5f 55 6e 68 6f 6f 6b 25 |.pca(Msg_Unhook%|
00002c10 29 0d 01 5a 30 72 65 6d 6f 74 65 74 61 67 25 3d |)..Z0remotetag%=|
00002c20 2d 31 3a 77 6e 24 3d 22 4e 6f 74 68 69 6e 67 22 |-1:wn$="Nothing"|
00002c30 3a f2 43 77 28 6d 5f 72 65 6d 6f 74 65 25 29 3a |:.Cw(m_remote%):|
00002c40 e1 0d 01 5b 05 cc 0d 01 5c 15 72 65 6d 6f 74 65 |...[....\.remote|
00002c50 74 61 67 25 3d 57 62 25 21 32 34 0d 01 5d 4c e7 |tag%=Wb%!24..]L.|
00002c60 6d 65 73 73 25 3d 4d 73 67 5f 44 6f 25 20 8c 20 |mess%=Msg_Do% . |
00002c70 77 6e 24 3d a4 73 28 57 62 25 2b 34 30 29 3a e7 |wn$=.s(Wb%+40):.|
00002c80 77 6e 24 3d 22 22 20 8c 20 77 6e 24 3d 22 3c 54 |wn$="" . wn$="<T|
00002c90 68 65 20 69 6d 61 67 65 20 77 69 74 68 20 6e 6f |he image with no|
00002ca0 20 6e 61 6d 65 3e 22 0d 01 5e 38 e7 6d 65 73 73 | name>"..^8.mess|
00002cb0 25 3d 4d 73 67 5f 43 68 61 6e 67 65 64 25 20 8c |%=Msg_Changed% .|
00002cc0 20 77 24 3d a4 73 28 57 62 25 2b 33 32 29 3a e7 | w$=.s(Wb%+32):.|
00002cd0 77 24 3c 3e 22 22 20 8c 20 77 6e 24 3d 77 24 0d |w$<>"" . wn$=w$.|
00002ce0 01 5f 10 f2 69 6e 69 74 73 70 74 72 61 6e 73 0d |._..initsptrans.|
00002cf0 01 60 4a c8 99 20 53 70 6f 70 25 2c 35 35 32 2c |.`J.. Spop%,552,|
00002d00 21 72 65 6d 6f 74 65 74 61 67 25 2c 21 72 65 6d |!remotetag%,!rem|
00002d10 6f 74 65 74 61 67 25 2b 72 65 6d 6f 74 65 74 61 |otetag%+remoteta|
00002d20 67 25 21 34 20 b8 20 2c 2c 2c 78 77 68 6f 6f 6b |g%!4 . ,,,xwhook|
00002d30 25 2c 79 77 68 6f 6f 6b 25 0d 01 61 27 e7 20 28 |%,ywhook%..a'. (|
00002d40 75 66 6c 67 25 20 80 20 25 31 30 30 30 30 29 3d |uflg% . %10000)=|
00002d50 30 20 84 20 69 6e 70 6c 61 63 65 25 3d 30 20 8c |0 . inplace%=0 .|
00002d60 0d 01 62 29 f2 70 72 69 6d 65 5f 72 65 6d 6f 74 |..b).prime_remot|
00002d70 65 3a f2 4f 77 28 6d 5f 72 65 6d 6f 74 65 25 2c |e:.Ow(m_remote%,|
00002d80 2d 31 2c 2d 31 2c 2d 31 29 0d 01 63 05 cd 0d 01 |-1,-1,-1)..c....|
00002d90 64 05 cd 0d 01 65 05 e1 0d 01 66 04 0d 01 67 0f |d....e....f...g.|
00002da0 f4 20 21 21 21 50 43 41 21 21 21 0d 01 68 1d f4 |. !!!PCA!!!..h..|
00002db0 20 6e 65 77 2f 75 70 64 61 74 65 64 20 6c 6f 63 | new/updated loc|
00002dc0 61 6c 20 69 6d 61 67 65 0d 01 69 1f f4 20 62 72 |al image..i.. br|
00002dd0 6f 61 64 63 61 73 74 20 4d 65 73 73 61 67 65 5f |oadcast Message_|
00002de0 43 68 61 6e 67 65 64 0d 01 6a 48 f4 20 61 6c 74 |Changed..jH. alt|
00002df0 65 72 6e 61 74 69 76 65 20 77 6f 75 6c 64 20 62 |ernative would b|
00002e00 65 20 74 6f 20 62 72 6f 61 64 63 61 73 74 20 4d |e to broadcast M|
00002e10 65 73 73 61 67 65 5f 44 65 73 65 6c 65 63 74 20 |essage_Deselect |
00002e20 66 6f 72 20 6f 6c 64 20 6f 62 6a 65 63 74 2e 0d |for old object..|
00002e30 01 6b 43 f4 20 69 6e 20 74 68 69 73 20 63 61 73 |.kC. in this cas|
00002e40 65 20 77 65 20 61 73 6b 20 61 6e 79 6f 6e 65 20 |e we ask anyone |
00002e50 77 68 6f 20 77 61 73 20 6c 69 6e 6b 65 64 20 69 |who was linked i|
00002e60 6e 74 6f 20 74 68 65 20 6f 6c 64 20 6f 62 6a 65 |nto the old obje|
00002e70 63 74 0d 01 6c 50 f4 20 74 6f 20 61 63 63 65 70 |ct..lP. to accep|
00002e80 74 20 74 68 65 20 6e 65 77 20 6f 6e 65 2e 20 54 |t the new one. T|
00002e90 68 69 73 20 6d 61 79 20 66 61 69 6c 20 28 65 67 |his may fail (eg|
00002ea0 20 6e 65 77 20 6f 62 6a 65 63 74 20 69 73 20 64 | new object is d|
00002eb0 69 66 66 65 72 65 6e 74 20 74 79 70 65 2f 62 70 |ifferent type/bp|
00002ec0 70 29 0d 01 6d 4b f4 20 69 6e 20 77 68 69 63 68 |p)..mK. in which|
00002ed0 20 63 61 73 65 20 74 68 65 20 61 70 70 20 72 65 | case the app re|
00002ee0 63 65 69 76 69 6e 67 20 4d 65 73 73 61 67 65 5f |ceiving Message_|
00002ef0 43 68 61 6e 67 65 64 20 73 68 6f 75 6c 64 20 64 |Changed should d|
00002f00 65 6c 69 6e 6b 20 71 75 69 65 74 6c 79 0d 01 6e |elink quietly..n|
00002f10 14 dd f2 6c 6f 61 64 73 70 72 69 74 65 28 73 24 |...loadsprite(s$|
00002f20 29 0d 01 6f 0d 6c 6f 63 61 6c 24 3d 73 24 0d 01 |)..o.local$=s$..|
00002f30 70 1c f2 72 5f 66 69 28 73 24 29 3a 73 70 72 69 |p..r_fi(s$):spri|
00002f40 6c 25 3d 6c 65 6e 67 74 68 25 0d 01 71 37 f2 64 |l%=length%..q7.d|
00002f50 6f 63 6c 61 69 6d 67 28 73 70 72 69 6c 25 2c 73 |oclaimg(spril%,s|
00002f60 70 72 69 61 25 2c 22 6d 65 6d 31 22 2c 22 53 50 |pria%,"mem1","SP|
00002f70 61 69 6e 74 20 69 6d 61 67 65 22 2c 6d 36 34 25 |aint image",m64%|
00002f80 29 0d 01 72 47 6c 6f 63 61 6c 25 3d a4 6f 75 72 |)..rGlocal%=.our|
00002f90 61 72 65 61 28 73 70 72 69 61 25 29 3a 21 6c 6f |area(spria%):!lo|
00002fa0 63 61 6c 25 3d 73 70 72 69 6c 25 3a ff 22 4c 4f |cal%=spril%:."LO|
00002fb0 41 44 20 22 2b 73 24 2b 22 20 22 2b c3 7e 28 6c |AD "+s$+" "+.~(l|
00002fc0 6f 63 61 6c 25 2b 34 29 0d 01 73 33 6c 6f 63 61 |ocal%+4)..s3loca|
00002fd0 6c 32 25 3d 6c 6f 63 61 6c 25 2b 6c 6f 63 61 6c |l2%=local%+local|
00002fe0 25 21 38 3a f4 20 66 69 72 73 74 20 73 70 72 69 |%!8:. first spri|
00002ff0 74 65 20 69 6e 20 61 72 65 61 2e 0d 01 74 0f f4 |te in area...t..|
00003000 20 21 21 21 50 43 41 21 21 21 0d 01 75 13 e7 6c | !!!PCA!!!..u..l|
00003010 6f 63 61 6c 74 61 67 25 3d 2d 31 20 8c 0d 01 76 |ocaltag%=-1 ...v|
00003020 3c c8 99 22 50 43 41 5f 43 72 65 61 74 65 54 61 |<.."PCA_CreateTa|
00003030 67 22 2c 2c 6c 6f 63 61 6c 25 2c 6c 6f 63 61 6c |g",,local%,local|
00003040 25 21 38 2c 21 6c 6f 63 61 6c 25 2c 30 20 b8 20 |%!8,!local%,0 . |
00003050 6c 6f 63 61 6c 74 61 67 25 0d 01 77 05 cc 0d 01 |localtag%..w....|
00003060 78 2b 6c 6f 63 61 6c 74 61 67 25 21 30 3d 6c 6f |x+localtag%!0=lo|
00003070 63 61 6c 25 3a 6c 6f 63 61 6c 74 61 67 25 21 34 |cal%:localtag%!4|
00003080 3d 6c 6f 63 61 6c 25 21 38 0d 01 79 05 cd 0d 01 |=local%!8..y....|
00003090 7a 35 f4 20 68 61 63 6b 20 2d 20 77 65 20 63 61 |z5. hack - we ca|
000030a0 6e 27 74 20 72 65 73 69 7a 65 20 77 68 65 6e 20 |n't resize when |
000030b0 74 68 65 20 77 69 6e 64 6f 77 20 69 73 20 6f 70 |the window is op|
000030c0 65 6e 21 0d 01 7b 2d 21 57 62 25 3d 6d 5f 6c 6f |en!..{-!Wb%=m_lo|
000030d0 63 61 6c 25 3a c8 99 20 22 58 57 69 6d 70 5f 43 |cal%:.. "XWimp_C|
000030e0 6c 6f 73 65 57 69 6e 64 6f 77 22 2c 2c 57 62 25 |loseWindow",,Wb%|
000030f0 0d 01 7c 14 f2 70 72 69 6d 65 5f 6c 6f 63 61 6c |..|..prime_local|
00003100 28 73 24 29 0d 01 7d 1a f2 4f 77 28 6d 5f 6c 6f |(s$)..}..Ow(m_lo|
00003110 63 61 6c 25 2c 2d 31 2c 2d 31 2c 2d 31 29 0d 01 |cal%,-1,-1,-1)..|
00003120 7e 17 f2 72 65 64 72 61 77 69 74 28 6d 5f 6c 6f |~..redrawit(m_lo|
00003130 63 61 6c 25 29 0d 01 7f 37 6d 73 30 25 3d 6c 6f |cal%)...7ms0%=lo|
00003140 63 61 6c 74 61 67 25 3a 6d 73 30 24 3d a4 67 6c |caltag%:ms0$=.gl|
00003150 73 28 6c 6f 63 61 6c 24 29 3a f2 70 63 61 28 4d |s(local$):.pca(M|
00003160 73 67 5f 43 68 61 6e 67 65 64 25 29 0d 01 80 11 |sg_Changed%)....|
00003170 f2 6d 69 6e 69 5f 70 6f 6c 6c 28 38 29 0d 01 81 |.mini_poll(8)...|
00003180 3c e7 61 72 65 6d 6f 74 65 25 3e 3d 30 20 8c 20 |<.aremote%>=0 . |
00003190 f2 72 65 73 69 7a 65 52 69 63 6f 6e 28 30 2c 30 |.resizeRicon(0,0|
000031a0 2c 30 2c 78 77 4c 25 2a 78 70 69 78 25 2c 79 77 |,0,xwL%*xpix%,yw|
000031b0 4c 25 2a 79 70 69 78 25 29 0d 01 82 05 e1 0d 01 |L%*ypix%).......|
000031c0 83 04 0d 01 84 3f f4 20 6f 70 65 6e 20 74 68 65 |.....?. open the|
000031d0 20 6c 6f 63 61 6c 20 77 69 6e 64 6f 77 20 74 6f | local window to|
000031e0 20 73 75 69 74 20 74 68 65 20 6e 65 77 20 73 69 | suit the new si|
000031f0 7a 65 20 6f 66 20 74 68 65 20 6f 62 6a 65 63 74 |ze of the object|
00003200 2e 0d 01 85 15 dd f2 70 72 69 6d 65 5f 6c 6f 63 |.......prime_loc|
00003210 61 6c 28 73 24 29 0d 01 86 1b 6c 6f 63 61 6c 32 |al(s$)....local2|
00003220 25 3d 6c 6f 63 61 6c 25 2b 6c 6f 63 61 6c 25 21 |%=local%+local%!|
00003230 38 0d 01 87 41 c8 99 20 53 70 6f 70 25 2c 35 35 |8...A.. Spop%,55|
00003240 32 2c 21 6c 6f 63 61 6c 74 61 67 25 2c 21 6c 6f |2,!localtag%,!lo|
00003250 63 61 6c 74 61 67 25 2b 6c 6f 63 61 6c 74 61 67 |caltag%+localtag|
00003260 25 21 34 20 b8 20 2c 2c 2c 78 77 4c 25 2c 79 77 |%!4 . ,,,xwL%,yw|
00003270 4c 25 0d 01 88 0f e7 6c 6f 63 61 6c 25 3e 30 20 |L%.....local%>0 |
00003280 8c 0d 01 89 55 c8 99 20 22 57 69 6d 70 5f 52 65 |....U.. "Wimp_Re|
00003290 61 64 50 69 78 54 72 61 6e 73 22 2c 26 32 30 30 |adPixTrans",&200|
000032a0 2c 21 6c 6f 63 61 6c 74 61 67 25 2c 21 6c 6f 63 |,!localtag%,!loc|
000032b0 61 6c 74 61 67 25 2b 6c 6f 63 61 6c 74 61 67 25 |altag%+localtag%|
000032c0 21 34 2c 2c 2c 2c 73 74 72 61 6e 73 57 25 2c 73 |!4,,,,stransW%,s|
000032d0 67 62 6c 6b 42 25 0d 01 8a 40 c8 99 20 58 43 74 |gblkB%...@.. XCt|
000032e0 47 65 74 25 2c 21 6c 6f 63 61 6c 74 61 67 25 2c |Get%,!localtag%,|
000032f0 21 6c 6f 63 61 6c 74 61 67 25 2b 6c 6f 63 61 6c |!localtag%+local|
00003300 74 61 67 25 21 34 2c 2d 31 2c 2d 31 2c 73 67 62 |tag%!4,-1,-1,sgb|
00003310 6c 6b 42 25 2c 31 0d 01 8b 05 cd 0d 01 8c 38 f2 |lkB%,1........8.|
00003320 73 65 74 73 69 7a 65 28 6d 5f 6c 6f 63 61 6c 25 |setsize(m_local%|
00003330 2c 79 77 4c 25 2a 79 70 69 78 25 2f 79 70 69 78 |,ywL%*ypix%/ypix|
00003340 66 2c 78 77 4c 25 2a 78 70 69 78 25 2f 78 70 69 |f,xwL%*xpix%/xpi|
00003350 78 66 29 0d 01 8d 18 24 6c 6f 63 61 6c 74 25 3d |xf)....$localt%=|
00003360 22 4c 6f 63 61 6c 3a 22 2b 73 24 0d 01 8e 05 e1 |"Local:"+s$.....|
00003370 0d 01 8f 04 0d 01 90 12 dd f2 70 72 69 6d 65 5f |..........prime_|
00003380 72 65 6d 6f 74 65 0d 01 91 3f f2 73 65 74 73 69 |remote...?.setsi|
00003390 7a 65 28 6d 5f 72 65 6d 6f 74 65 25 2c 79 77 68 |ze(m_remote%,ywh|
000033a0 6f 6f 6b 25 2a 79 70 69 78 25 2f 79 70 69 78 66 |ook%*ypix%/ypixf|
000033b0 2c 78 77 68 6f 6f 6b 25 2a 78 70 69 78 25 2f 78 |,xwhook%*xpix%/x|
000033c0 70 69 78 66 29 0d 01 92 1c 24 6d 61 69 6e 74 25 |pixf)....$maint%|
000033d0 3d 22 4c 69 6e 6b 65 64 20 74 6f 3a 22 2b 77 6e |="Linked to:"+wn|
000033e0 24 0d 01 93 5a e7 6d 61 69 6e 6f 25 20 8c 20 21 |$...Z.maino% . !|
000033f0 57 62 25 3d 6d 5f 72 65 6d 6f 74 65 25 3a c8 99 |Wb%=m_remote%:..|
00003400 57 67 77 73 74 25 2c 2c 57 62 25 3a f2 43 77 54 |Wgwst%,,Wb%:.CwT|
00003410 28 6d 5f 72 65 6d 6f 74 65 25 29 3a 78 25 3d 57 |(m_remote%):x%=W|
00003420 62 25 21 34 3a 79 25 3d 57 62 25 21 38 20 8b 20 |b%!4:y%=Wb%!8 . |
00003430 78 25 3d 2d 31 3a 79 25 3d 2d 31 0d 01 94 1b f2 |x%=-1:y%=-1.....|
00003440 4f 77 28 6d 5f 72 65 6d 6f 74 65 25 2c 78 25 2c |Ow(m_remote%,x%,|
00003450 79 25 2c 2d 31 29 0d 01 95 05 e1 0d 01 96 04 0d |y%,-1)..........|
00003460 01 97 17 f4 20 71 75 69 74 20 74 68 65 20 70 72 |.... quit the pr|
00003470 6f 67 72 61 6d 2e 0d 01 98 0f dd f2 74 65 72 6d |ogram.......term|
00003480 69 6e 61 74 65 0d 01 99 57 f4 20 21 21 21 50 43 |inate...W. !!!PC|
00003490 41 21 21 21 20 6c 6f 63 61 6c 20 6d 75 73 74 20 |A!!! local must |
000034a0 72 65 6d 65 6d 62 65 72 20 74 6f 20 62 72 6f 61 |remember to broa|
000034b0 64 63 61 73 74 20 4d 73 67 5f 44 65 73 65 6c 20 |dcast Msg_Desel |
000034c0 62 65 66 6f 72 65 20 72 65 6d 6f 76 69 6e 67 20 |before removing |
000034d0 79 6f 75 72 20 6f 62 6a 65 63 74 2e 0d 01 9a 23 |your object....#|
000034e0 e7 6c 6f 63 61 6c 74 61 67 25 3e 30 20 8c 20 f2 |.localtag%>0 . .|
000034f0 70 63 61 28 4d 73 67 5f 44 65 73 65 6c 25 29 0d |pca(Msg_Desel%).|
00003500 01 9b 3c e7 20 6c 6f 63 61 6c 74 61 67 25 3e 30 |..<. localtag%>0|
00003510 20 8c 20 c8 99 22 50 43 41 5f 44 65 6c 65 74 65 | . .."PCA_Delete|
00003520 54 61 67 22 2c 6c 6f 63 61 6c 74 61 67 25 3a 6c |Tag",localtag%:l|
00003530 6f 63 61 6c 74 61 67 25 3d 2d 31 0d 01 9c 04 0d |ocaltag%=-1.....|
00003540 01 9d 3c f4 20 21 21 21 50 43 41 21 21 21 20 72 |..<. !!!PCA!!! r|
00003550 65 6d 6f 74 65 20 6d 75 73 74 20 73 65 6e 64 20 |emote must send |
00003560 4d 73 67 5f 55 6e 68 6f 6f 6b 20 62 65 66 6f 72 |Msg_Unhook befor|
00003570 65 20 71 75 69 74 74 69 6e 67 2e 0d 01 9e 4f e7 |e quitting....O.|
00003580 20 72 65 6d 6f 74 65 74 61 67 25 3e 30 20 8c 20 | remotetag%>0 . |
00003590 74 73 6b 68 25 3d 72 65 6d 6f 74 65 74 61 73 6b |tskh%=remotetask|
000035a0 25 3a 6d 73 30 25 3d 31 3a 6d 73 31 25 3d 72 65 |%:ms0%=1:ms1%=re|
000035b0 6d 6f 74 65 74 61 67 25 3a f2 70 63 61 28 4d 73 |motetag%:.pca(Ms|
000035c0 67 5f 55 6e 68 6f 6f 6b 25 29 0d 01 9f 1d 73 70 |g_Unhook%)....sp|
000035d0 72 69 6c 25 3d 30 3a f2 6b 69 6c 6c 61 72 61 28 |ril%=0:.killara(|
000035e0 73 70 72 69 61 25 29 0d 01 a0 0b f2 6d 73 5f 65 |spria%).....ms_e|
000035f0 6e 64 0d 01 a1 2b c8 99 22 57 69 6d 70 5f 43 6c |nd...+.."Wimp_Cl|
00003600 6f 73 65 44 6f 77 6e 22 2c 54 61 73 6b 5f 68 25 |oseDown",Task_h%|
00003610 3a c8 99 22 58 4f 53 5f 45 78 69 74 22 0d 01 a2 |:.."XOS_Exit"...|
00003620 05 e1 0d 01 a3 04 0d 01 a4 26 f4 20 75 73 65 72 |.........&. user|
00003630 20 63 6c 69 63 6b 65 64 20 69 6e 20 61 20 72 65 | clicked in a re|
00003640 6d 6f 74 65 20 77 69 6e 64 6f 77 2e 0d 01 a5 10 |mote window.....|
00003650 dd f2 72 65 6d 6f 74 65 5f 77 69 6e 0d 01 a6 0c |..remote_win....|
00003660 e7 42 74 25 3d 32 20 8c 0d 01 a7 47 f2 67 70 69 |.Bt%=2 ....G.gpi|
00003670 3a 70 70 69 63 6b 25 3d a4 70 69 63 6b 65 72 28 |:ppick%=.picker(|
00003680 22 50 61 69 6e 74 20 63 6f 6c 6f 75 72 22 2c 70 |"Paint colour",p|
00003690 63 6f 6c 25 2c 6d 6f 78 25 2d 31 32 38 2c 6d 6f |col%,mox%-128,mo|
000036a0 79 25 2b 31 32 38 2c 25 31 2c 25 31 30 30 29 0d |y%+128,%1,%100).|
000036b0 01 a8 05 e1 0d 01 a9 05 cd 0d 01 aa 13 e7 72 65 |..............re|
000036c0 6d 6f 74 65 74 61 67 25 3d 30 20 e1 0d 01 ab 15 |motetag%=0 .....|
000036d0 e7 49 63 6e 25 3c 3e 2d 26 34 31 34 33 35 30 20 |.Icn%<>-&414350 |
000036e0 8c 0d 01 ac 47 21 67 62 25 3d 6d 5f 72 65 6d 6f |....G!gb%=m_remo|
000036f0 74 65 25 3a c8 99 20 57 67 77 73 74 25 2c 2c 67 |te%:.. Wgwst%,,g|
00003700 62 25 3a 77 69 6e 78 25 3d 67 62 25 21 34 2d 67 |b%:winx%=gb%!4-g|
00003710 62 25 21 32 30 3a 79 31 61 25 3d 67 62 25 21 31 |b%!20:y1a%=gb%!1|
00003720 36 2d 67 62 25 21 32 34 0d 01 ad 1b 73 63 61 6c |6-gb%!24....scal|
00003730 65 66 61 63 58 3d 31 3a 73 63 61 6c 65 66 61 63 |efacX=1:scalefac|
00003740 59 3d 31 0d 01 ae 22 6d 6f 79 25 3d 6d 6f 79 25 |Y=1..."moy%=moy%|
00003750 2d 79 31 61 25 3a 6d 6f 78 25 3d 6d 6f 78 25 2d |-y1a%:mox%=mox%-|
00003760 77 69 6e 78 25 0d 01 af 05 cc 0d 01 b0 20 73 63 |winx%........ sc|
00003770 61 6c 65 66 61 63 58 3d 72 65 6d 6f 74 65 73 63 |alefacX=remotesc|
00003780 61 6c 65 25 2f 36 35 35 33 36 0d 01 b1 21 73 63 |ale%/65536...!sc|
00003790 61 6c 65 66 61 63 59 3d 72 65 6d 6f 74 65 73 63 |alefacY=remotesc|
000037a0 61 6c 65 79 25 2f 36 35 35 33 36 0d 01 b2 26 77 |aley%/65536...&w|
000037b0 69 6e 78 25 3d 72 65 6d 6f 74 65 78 70 6f 73 25 |inx%=remotexpos%|
000037c0 3a 79 31 61 25 3d 72 65 6d 6f 74 65 79 70 6f 73 |:y1a%=remoteypos|
000037d0 25 0d 01 b3 05 cd 0d 01 b4 19 6f 6d 6f 78 25 3d |%.........omox%=|
000037e0 6d 6f 78 25 3a 6f 6d 6f 79 25 3d 6d 6f 79 25 0d |mox%:omoy%=moy%.|
000037f0 01 b5 05 f5 0d 01 b6 30 f2 73 77 74 6f 73 28 21 |.......0.swtos(!|
00003800 72 65 6d 6f 74 65 74 61 67 25 2c 21 72 65 6d 6f |remotetag%,!remo|
00003810 74 65 74 61 67 25 2b 72 65 6d 6f 74 65 74 61 67 |tetag%+remotetag|
00003820 25 21 34 29 0d 01 b7 43 e7 42 74 25 3d 34 20 c8 |%!4)...C.Bt%=4 .|
00003830 99 20 43 74 53 67 63 6f 6c 25 2c 70 63 6f 6c 25 |. CtSgcol%,pcol%|
00003840 2c 2c 2c 32 35 36 2c 30 20 8b 20 e7 42 74 25 3d |,,,256,0 . .Bt%=|
00003850 31 20 c8 99 20 43 74 53 67 63 6f 6c 25 2c 30 2c |1 .. CtSgcol%,0,|
00003860 2c 2c 32 35 36 2c 30 0d 01 b8 1a c8 8f 20 c8 90 |,,256,0...... ..|
00003870 20 6d 6f 78 25 2c 6d 6f 79 25 2c 73 69 7a 65 32 | mox%,moy%,size2|
00003880 25 0d 01 b9 0a f2 73 77 62 61 6b 0d 01 ba 4b 6d |%.....swbak...Km|
00003890 73 30 25 3d 6d 6f 78 25 2d 73 69 7a 65 32 25 3a |s0%=mox%-size2%:|
000038a0 6d 73 31 25 3d 6d 6f 79 25 2d 73 69 7a 65 32 25 |ms1%=moy%-size2%|
000038b0 3a 6d 73 32 25 3d 6d 6f 78 25 2b 73 69 7a 65 32 |:ms2%=mox%+size2|
000038c0 25 2b 34 3a 6d 73 33 25 3d 6d 6f 79 25 2b 73 69 |%+4:ms3%=moy%+si|
000038d0 7a 65 32 25 2b 34 0d 01 bb 12 e7 6d 73 30 25 3c |ze2%+4.....ms0%<|
000038e0 30 20 6d 73 30 25 3d 30 0d 01 bc 12 e7 6d 73 31 |0 ms0%=0.....ms1|
000038f0 25 3c 30 20 6d 73 31 25 3d 30 0d 01 bd 22 e7 6d |%<0 ms1%=0...".m|
00003900 73 32 25 3e 78 77 68 6f 6f 6b 25 2a 32 20 6d 73 |s2%>xwhook%*2 ms|
00003910 32 25 3d 78 77 68 6f 6f 6b 25 2a 32 0d 01 be 22 |2%=xwhook%*2..."|
00003920 e7 6d 73 33 25 3e 79 77 68 6f 6f 6b 25 2a 32 20 |.ms3%>ywhook%*2 |
00003930 6d 73 33 25 3d 79 77 68 6f 6f 6b 25 2a 32 0d 01 |ms3%=ywhook%*2..|
00003940 bf 0e e7 20 6d 61 69 6e 6f 25 20 8c 0d 01 c0 60 |... maino% ....`|
00003950 21 57 62 25 3d 6d 5f 72 65 6d 6f 74 65 25 3a 57 |!Wb%=m_remote%:W|
00003960 62 25 21 34 3d 6d 73 30 25 2a 6d 73 63 64 3a 57 |b%!4=ms0%*mscd:W|
00003970 62 25 21 38 3d 6d 73 31 25 2a 6d 73 63 64 3a 57 |b%!8=ms1%*mscd:W|
00003980 62 25 21 31 32 3d 57 62 25 21 34 2b 6d 73 32 25 |b%!12=Wb%!4+ms2%|
00003990 2a 6d 73 63 64 3a 57 62 25 21 31 36 3d 57 62 25 |*mscd:Wb%!16=Wb%|
000039a0 21 38 2b 6d 73 33 25 2a 6d 73 63 64 0d 01 c1 1a |!8+ms3%*mscd....|
000039b0 c8 99 20 57 75 70 64 77 25 2c 2c 57 62 25 20 b8 |.. Wupdw%,,Wb% .|
000039c0 20 6d 6f 72 65 25 0d 01 c2 26 78 30 25 3d 57 62 | more%...&x0%=Wb|
000039d0 25 21 34 2d 57 62 25 21 32 30 3a 79 30 25 3d 57 |%!4-Wb%!20:y0%=W|
000039e0 62 25 21 31 36 2d 57 62 25 21 32 34 0d 01 c3 0c |b%!16-Wb%!24....|
000039f0 c8 95 20 6d 6f 72 65 25 0d 01 c4 4f c8 99 20 53 |.. more%...O.. S|
00003a00 70 6f 70 25 2c 35 36 34 2c 21 72 65 6d 6f 74 65 |pop%,564,!remote|
00003a10 74 61 67 25 2c 21 72 65 6d 6f 74 65 74 61 67 25 |tag%,!remotetag%|
00003a20 2b 72 65 6d 6f 74 65 74 61 67 25 21 34 2c 78 30 |+remotetag%!4,x0|
00003a30 25 2c 79 30 25 2c 30 2c 73 74 72 61 6e 73 57 25 |%,y0%,0,stransW%|
00003a40 2c 73 67 62 6c 6b 25 0d 01 c5 19 c8 99 20 57 67 |,sgblk%...... Wg|
00003a50 72 25 2c 30 2c 57 62 25 20 b8 20 6d 6f 72 65 25 |r%,0,Wb% . more%|
00003a60 0d 01 c6 05 ce 0d 01 c7 05 cd 0d 01 c8 0f f4 20 |............... |
00003a70 21 21 21 50 43 41 21 21 21 0d 01 c9 2c f4 20 75 |!!!PCA!!!...,. u|
00003a80 73 65 72 20 68 61 73 20 70 61 69 6e 74 65 64 20 |ser has painted |
00003a90 69 6e 74 6f 20 72 65 6d 6f 74 65 20 6f 62 6a 65 |into remote obje|
00003aa0 63 74 20 73 6f 0d 01 ca 36 f4 20 62 72 6f 61 64 |ct so...6. broad|
00003ab0 63 61 73 74 20 6d 65 73 73 61 67 65 5f 75 70 64 |cast message_upd|
00003ac0 61 74 65 61 72 65 61 20 73 6f 20 6f 74 68 65 72 |atearea so other|
00003ad0 20 61 70 70 73 20 75 73 69 6e 67 0d 01 cb 41 f4 | apps using...A.|
00003ae0 20 74 68 65 20 6f 62 6a 65 63 74 20 63 61 6e 20 | the object can |
00003af0 72 65 64 72 61 77 20 74 68 65 20 61 70 70 72 6f |redraw the appro|
00003b00 70 72 69 61 74 65 20 70 61 72 74 20 6f 66 20 74 |priate part of t|
00003b10 68 65 69 72 20 77 69 6e 64 6f 77 73 0d 01 cc 15 |heir windows....|
00003b20 f2 70 63 61 28 4d 73 67 5f 55 70 61 72 65 61 25 |.pca(Msg_Uparea%|
00003b30 29 0d 01 cd 11 f2 6d 69 6e 69 5f 70 6f 6c 6c 28 |).....mini_poll(|
00003b40 31 29 0d 01 ce 27 f2 67 70 69 3a 6d 6f 78 25 3d |1)...'.gpi:mox%=|
00003b50 6d 6f 78 25 2d 77 69 6e 78 25 3a 6d 6f 79 25 3d |mox%-winx%:moy%=|
00003b60 6d 6f 79 25 2d 79 31 61 25 0d 01 cf 2b 6d 6f 78 |moy%-y1a%...+mox|
00003b70 25 3d 6d 6f 78 25 2f 73 63 61 6c 65 66 61 63 58 |%=mox%/scalefacX|
00003b80 3a 6d 6f 79 25 3d 6d 6f 79 25 2f 73 63 61 6c 65 |:moy%=moy%/scale|
00003b90 66 61 63 59 0d 01 d0 0b fd 20 42 74 25 3d 30 0d |facY..... Bt%=0.|
00003ba0 01 d1 05 e1 0d 01 d2 04 0d 01 d3 04 0d 01 d4 14 |................|
00003bb0 dd f2 52 69 63 6f 6e 70 6f 73 69 74 69 6f 6e 73 |..Riconpositions|
00003bc0 0d 01 d5 04 0d 01 d6 3b f4 20 64 6f 20 72 65 73 |.......;. do res|
00003bd0 69 7a 65 52 69 63 6f 6e 20 66 6f 72 20 65 61 63 |izeRicon for eac|
00003be0 68 20 6c 69 6e 6b 65 64 20 6f 62 6a 65 63 74 20 |h linked object |
00003bf0 77 68 69 63 68 20 68 61 73 20 6d 6f 76 65 64 0d |which has moved.|
00003c00 01 d7 04 0d 01 d8 05 e1 0d 01 d9 04 0d 01 da 1f |................|
00003c10 f4 20 64 65 6c 65 74 65 20 27 72 65 6d 6f 74 65 |. delete 'remote|
00003c20 27 20 74 72 61 70 20 69 63 6f 6e 0d 01 db 2a f4 |' trap icon...*.|
00003c30 20 74 68 69 73 20 69 73 20 61 20 5f 73 69 6d 70 | this is a _simp|
00003c40 6c 65 5f 20 76 65 72 73 69 6f 6e 20 61 73 20 53 |le_ version as S|
00003c50 70 61 69 6e 74 0d 01 dc 2b f4 20 63 61 6e 20 6f |paint...+. can o|
00003c60 6e 6c 79 20 68 61 6e 64 6c 65 20 6f 6e 65 20 6f |nly handle one o|
00003c70 62 6a 65 63 74 20 61 74 20 61 20 74 69 6d 65 2e |bject at a time.|
00003c80 0d 01 dd 35 f4 20 6d 6f 72 65 20 73 6f 70 68 69 |...5. more sophi|
00003c90 73 74 6f 63 61 74 65 64 20 61 70 70 73 20 77 69 |stocated apps wi|
00003ca0 6c 6c 20 68 61 76 65 20 74 6f 20 64 6f 20 62 65 |ll have to do be|
00003cb0 74 74 65 72 2e 0d 01 de 04 0d 01 df 1d dd f2 64 |tter...........d|
00003cc0 65 6c 65 74 65 52 69 63 6f 6e 28 69 25 29 3a e7 |eleteRicon(i%):.|
00003cd0 69 25 3c 30 20 e1 0d 01 e0 39 21 67 62 6c 6b 25 |i%<0 ....9!gblk%|
00003ce0 3d 6d 5f 6c 6f 63 61 6c 25 3a 67 62 6c 6b 25 21 |=m_local%:gblk%!|
00003cf0 34 3d 69 25 3a c8 99 22 57 69 6d 70 5f 44 65 6c |4=i%:.."Wimp_Del|
00003d00 65 74 65 49 63 6f 6e 22 2c 2c 67 62 6c 6b 25 0d |eteIcon",,gblk%.|
00003d10 01 e1 30 e7 69 25 2a 33 32 2b 72 65 6d 6f 74 65 |..0.i%*32+remote|
00003d20 69 63 62 6c 6b 25 3d 72 69 63 70 74 72 25 2d 33 |icblk%=ricptr%-3|
00003d30 32 20 8c 20 72 69 63 70 74 72 25 2d 3d 33 32 0d |2 . ricptr%-=32.|
00003d40 01 e2 35 c8 95 20 28 72 69 63 70 74 72 25 21 32 |..5.. (ricptr%!2|
00003d50 30 20 80 20 31 3c 3c 32 33 29 3c 3e 30 20 80 20 |0 . 1<<23)<>0 . |
00003d60 72 69 63 70 74 72 25 3e 72 65 6d 6f 74 65 69 63 |ricptr%>remoteic|
00003d70 62 6c 6b 25 0d 01 e3 0f 72 69 63 70 74 72 25 2d |blk%....ricptr%-|
00003d80 3d 33 32 0d 01 e4 05 ce 0d 01 e5 05 e1 0d 01 e6 |=32.............|
00003d90 04 0d 01 e7 1f f4 20 72 65 73 69 7a 65 20 27 72 |...... resize 'r|
00003da0 65 6d 6f 74 65 27 20 74 72 61 70 20 69 63 6f 6e |emote' trap icon|
00003db0 0d 01 e8 21 dd f2 72 65 73 69 7a 65 52 69 63 6f |...!..resizeRico|
00003dc0 6e 28 69 25 2c 78 25 2c 79 25 2c 77 25 2c 68 25 |n(i%,x%,y%,w%,h%|
00003dd0 29 0d 01 e9 41 c8 99 22 58 57 69 6d 70 5f 52 65 |)...A.."XWimp_Re|
00003de0 73 69 7a 65 49 63 6f 6e 22 2c 6d 5f 6c 6f 63 61 |sizeIcon",m_loca|
00003df0 6c 25 2c 69 25 2c 78 25 2c 79 25 2c 28 78 25 2b |l%,i%,x%,y%,(x%+|
00003e00 77 25 29 2c 28 79 25 2b 68 25 29 20 b8 20 72 30 |w%),(y%+h%) . r0|
00003e10 3b 46 0d 01 ea 38 f4 20 49 46 20 28 46 20 41 4e |;F...8. IF (F AN|
00003e20 44 20 31 29 3c 3e 30 20 54 48 45 4e 20 50 52 4f |D 1)<>0 THEN PRO|
00003e30 43 72 65 70 65 72 72 28 46 4e 73 28 72 30 2b 34 |Creperr(FNs(r0+4|
00003e40 29 29 3a 45 4e 44 50 52 4f 43 0d 01 eb 45 f2 67 |)):ENDPROC...E.g|
00003e50 77 69 28 6d 5f 6c 6f 63 61 6c 25 29 3a 79 31 61 |wi(m_local%):y1a|
00003e60 25 3d 79 31 25 2d 79 73 63 72 6f 6c 25 3a 79 73 |%=y1%-yscrol%:ys|
00003e70 63 72 6f 6c 61 25 3d 79 73 63 72 6f 6c 25 3a 78 |crola%=yscrol%:x|
00003e80 73 63 72 6f 6c 61 25 3d 78 73 63 72 6f 6c 25 0d |scrola%=xscrol%.|
00003e90 01 ec 1c 78 70 6f 73 55 25 3d 77 69 6e 78 25 3a |...xposU%=winx%:|
00003ea0 79 70 6f 73 55 25 3d 79 31 61 25 0d 01 ed 1f 78 |yposU%=y1a%....x|
00003eb0 70 6f 73 4c 25 3d 78 70 6f 73 55 25 3a 79 70 6f |posL%=xposU%:ypo|
00003ec0 73 4c 25 3d 79 70 6f 73 55 25 0d 01 ee 1c e7 78 |sL%=yposU%.....x|
00003ed0 70 6f 73 4c 25 3c 78 30 25 20 8c 20 78 70 6f 73 |posL%<x0% . xpos|
00003ee0 4c 25 3d 78 30 25 0d 01 ef 1c e7 79 70 6f 73 4c |L%=x0%.....yposL|
00003ef0 25 3c 79 30 25 20 8c 20 79 70 6f 73 4c 25 3d 79 |%<y0% . yposL%=y|
00003f00 30 25 0d 01 f0 1c e7 78 70 6f 73 4c 25 3e 78 31 |0%.....xposL%>x1|
00003f10 25 20 8c 20 78 70 6f 73 4c 25 3d 78 31 25 0d 01 |% . xposL%=x1%..|
00003f20 f1 1c e7 79 70 6f 73 4c 25 3e 79 31 25 20 8c 20 |...yposL%>y1% . |
00003f30 79 70 6f 73 4c 25 3d 79 31 25 0d 01 f2 1c 73 66 |yposL%=y1%....sf|
00003f40 61 63 25 3d 36 35 35 33 36 3a f4 20 31 30 30 25 |ac%=65536:. 100%|
00003f50 20 73 63 61 6c 65 0d 01 f3 44 6d 73 32 25 3d 6d | scale...Dms2%=m|
00003f60 5f 6c 6f 63 61 6c 25 3a 6d 73 33 25 3d 77 5f 6c |_local%:ms3%=w_l|
00003f70 6f 63 61 6c 74 25 3a 74 73 6b 68 25 3d 72 65 6d |ocalt%:tskh%=rem|
00003f80 6f 74 65 74 61 73 6b 25 3a f2 70 63 61 28 4d 73 |otetask%:.pca(Ms|
00003f90 67 5f 4f 62 6a 50 6f 73 25 29 0d 01 f4 05 e1 0d |g_ObjPos%)......|
00003fa0 01 f5 04 0d 01 f6 3f f4 20 21 21 21 50 43 41 21 |......?. !!!PCA!|
00003fb0 21 21 20 63 72 65 61 74 65 20 61 20 27 72 65 6d |!! create a 'rem|
00003fc0 6f 74 65 27 20 74 72 61 70 20 69 63 6f 6e 20 74 |ote' trap icon t|
00003fd0 6f 20 63 6f 76 65 72 20 74 68 65 20 6f 62 6a 65 |o cover the obje|
00003fe0 63 74 0d 01 f7 40 f4 20 61 20 73 69 6d 70 6c 65 |ct...@. a simple|
00003ff0 20 76 65 72 73 69 6f 6e 2e 20 46 6f 72 20 6d 6f | version. For mo|
00004000 72 65 20 63 6f 6d 70 6c 65 78 20 61 70 70 73 20 |re complex apps |
00004010 28 6d 75 6c 74 69 70 6c 65 20 6f 62 6a 65 63 74 |(multiple object|
00004020 73 29 0d 01 f8 2c f4 20 73 6f 6d 65 74 68 69 6e |s)...,. somethin|
00004030 67 20 62 65 74 74 65 72 20 77 69 6c 6c 20 68 61 |g better will ha|
00004040 76 65 20 74 6f 20 62 65 20 64 6f 6e 65 2e 0d 01 |ve to be done...|
00004050 f9 24 dd a4 63 72 65 61 74 65 52 69 63 6f 6e 28 |.$..createRicon(|
00004060 78 25 2c 79 25 2c 77 25 2c 68 25 2c 66 6c 67 73 |x%,y%,w%,h%,flgs|
00004070 25 29 0d 01 fa 40 e7 72 69 63 70 74 72 25 3e 3d |%)...@.ricptr%>=|
00004080 72 65 6d 6f 74 65 69 63 62 6c 6b 25 2b 33 32 2a |remoteicblk%+32*|
00004090 31 30 20 8c 20 85 20 31 2c 22 52 65 6d 6f 74 65 |10 . . 1,"Remote|
000040a0 20 69 63 6f 6e 20 73 74 6f 72 65 20 66 75 6c 6c | icon store full|
000040b0 21 22 0d 01 fb 23 66 6c 67 73 25 3d 66 6c 67 73 |!"...#flgs%=flgs|
000040c0 25 3e 3e 32 38 3a 66 6c 67 73 25 3d 66 6c 67 73 |%>>28:flgs%=flgs|
000040d0 25 3c 3c 31 32 0d 01 fc 15 21 72 69 63 70 74 72 |%<<12....!ricptr|
000040e0 25 3d 6d 5f 6c 6f 63 61 6c 25 0d 01 fd 43 72 69 |%=m_local%...Cri|
000040f0 63 70 74 72 25 21 34 3d 78 25 3a 72 69 63 70 74 |cptr%!4=x%:ricpt|
00004100 72 25 21 38 3d 79 25 3a 72 69 63 70 74 72 25 21 |r%!8=y%:ricptr%!|
00004110 31 32 3d 28 78 25 2b 77 25 29 3a 72 69 63 70 74 |12=(x%+w%):ricpt|
00004120 72 25 21 31 36 3d 28 79 25 2b 68 25 29 0d 01 fe |r%!16=(y%+h%)...|
00004130 37 72 69 63 70 74 72 25 21 32 30 3d 66 6c 67 73 |7ricptr%!20=flgs|
00004140 25 3a e7 20 52 62 64 72 25 20 72 69 63 70 74 72 |%:. Rbdr% ricptr|
00004150 25 21 32 30 3d 72 69 63 70 74 72 25 21 32 30 2b |%!20=ricptr%!20+|
00004160 25 31 30 30 0d 01 ff 2e c8 99 20 22 57 69 6d 70 |%100...... "Wimp|
00004170 5f 43 72 65 61 74 65 49 63 6f 6e 22 2c 61 72 65 |_CreateIcon",are|
00004180 6d 6f 74 65 25 2c 72 69 63 70 74 72 25 20 b8 20 |mote%,ricptr% . |
00004190 69 25 0d 02 00 0f 72 69 63 70 74 72 25 2b 3d 33 |i%....ricptr%+=3|
000041a0 32 0d 02 01 07 3d 69 25 0d 02 02 04 0d 02 03 0f |2....=i%........|
000041b0 f4 20 21 21 21 50 43 41 21 21 21 0d 02 04 25 f4 |. !!!PCA!!!...%.|
000041c0 20 73 65 6e 64 20 6d 65 73 73 61 67 65 20 6f 6e | send message on|
000041d0 20 74 6f 20 72 65 6d 6f 74 65 20 74 61 73 6b 2e | to remote task.|
000041e0 0d 02 05 17 dd f2 72 65 6d 6f 74 65 6d 65 73 73 |......remotemess|
000041f0 61 67 65 28 52 25 29 0d 02 06 1b 73 70 25 3d 2d |age(R%)....sp%=-|
00004200 31 3a 79 31 61 25 3d 79 31 25 2d 79 73 63 72 6f |1:y1a%=y1%-yscro|
00004210 6c 25 0d 02 07 04 0d 02 08 29 f4 20 6c 6f 63 61 |l%.......). loca|
00004220 74 65 20 6f 62 6a 65 63 74 20 77 68 69 63 68 20 |te object which |
00004230 6d 61 74 63 68 65 73 20 69 63 6f 6e 2e 2e 2e 0d |matches icon....|
00004240 02 09 29 e7 20 49 63 6e 25 3d 72 65 6d 6f 74 65 |..). Icn%=remote|
00004250 69 63 6f 6e 25 20 80 20 72 65 6d 6f 74 65 74 61 |icon% . remoteta|
00004260 73 6b 25 3c 3e 30 20 8c 0d 02 0a 0b c8 8e 20 52 |sk%<>0 ....... R|
00004270 25 20 ca 0d 02 0b 07 c9 20 36 0d 02 0c 51 21 57 |% ...... 6...Q!W|
00004280 62 25 3d 21 57 62 25 2d 77 69 6e 78 25 3a 57 62 |b%=!Wb%-winx%:Wb|
00004290 25 21 34 3d 57 62 25 21 34 2d 79 31 61 25 3a 57 |%!4=Wb%!4-y1a%:W|
000042a0 62 25 21 38 3d 74 42 74 25 3a 57 62 25 21 31 32 |b%!8=tBt%:Wb%!12|
000042b0 3d 72 65 6d 6f 74 65 77 69 6e 25 3a 57 62 25 21 |=remotewin%:Wb%!|
000042c0 31 36 3d 2d 26 34 31 34 33 35 30 0d 02 0d 05 cb |16=-&414350.....|
000042d0 0d 02 0e 2c c8 99 20 22 57 69 6d 70 5f 53 65 6e |...,.. "Wimp_Sen|
000042e0 64 4d 65 73 73 61 67 65 22 2c 52 25 2c 57 62 25 |dMessage",R%,Wb%|
000042f0 2c 72 65 6d 6f 74 65 74 61 73 6b 25 0d 02 0f 05 |,remotetask%....|
00004300 cd 0d 02 10 05 e1 0d 02 11 04 0d 02 12 04 0d 02 |................|
00004310 13 0f f4 20 21 21 21 50 43 41 21 21 21 0d 02 14 |... !!!PCA!!!...|
00004320 24 f4 20 43 65 6e 74 72 61 6c 20 4d 65 73 73 61 |$. Central Messa|
00004330 67 65 20 64 65 73 70 61 74 63 68 20 70 72 6f 63 |ge despatch proc|
00004340 2e 0d 02 15 04 0d 02 16 0f dd f2 70 63 61 28 6d |...........pca(m|
00004350 73 67 25 29 0d 02 17 4a f4 20 64 6f 6e 27 74 20 |sg%)...J. don't |
00004360 62 6f 74 68 65 72 20 77 69 74 68 20 72 65 6d 6f |bother with remo|
00004370 74 65 20 75 70 64 61 74 65 20 6d 65 73 73 61 67 |te update messag|
00004380 65 73 20 69 66 20 6e 6f 20 72 65 6d 6f 74 65 20 |es if no remote |
00004390 6f 62 6a 65 63 74 20 69 6e 20 75 73 65 3a 0d 02 |object in use:..|
000043a0 18 4e e7 72 65 6d 6f 74 65 74 61 67 25 3d 30 20 |.N.remotetag%=0 |
000043b0 80 20 28 6d 73 67 25 3d 4d 73 67 5f 52 65 73 69 |. (msg%=Msg_Resi|
000043c0 7a 65 25 20 84 20 6d 73 67 25 3d 4d 73 67 5f 55 |ze% . msg%=Msg_U|
000043d0 70 61 72 65 61 25 20 84 20 6d 73 67 25 3d 4d 73 |parea% . msg%=Ms|
000043e0 67 5f 4d 69 73 63 25 29 20 8c 20 e1 0d 02 19 04 |g_Misc%) . .....|
000043f0 0d 02 1a 37 67 62 25 21 34 3d 54 61 73 6b 5f 68 |...7gb%!4=Task_h|
00004400 25 3a 67 62 25 21 38 3d 30 3a 67 62 25 21 31 32 |%:gb%!8=0:gb%!12|
00004410 3d 30 3a 67 62 25 21 31 36 3d 6d 73 67 25 3a 73 |=0:gb%!16=msg%:s|
00004420 65 6e 64 25 3d 31 37 0d 02 1b 0d c8 8e 20 6d 73 |end%=17...... ms|
00004430 67 25 20 ca 0d 02 1c 04 0d 02 1d 1c f4 20 53 65 |g% .......... Se|
00004440 6e 64 20 4d 65 73 73 61 67 65 5f 57 68 6f 73 41 |nd Message_WhosA|
00004450 62 6f 75 74 0d 02 1e 0f c9 20 4d 73 67 5f 57 68 |bout..... Msg_Wh|
00004460 6f 73 25 0d 02 1f 21 75 74 69 6c 24 3d 22 23 55 |os%...!util$="#U|
00004470 74 69 6c 69 74 69 65 73 22 3a 70 63 61 74 61 73 |tilities":pcatas|
00004480 6b 25 3d 30 0d 02 20 19 75 74 69 6c 74 73 6b 25 |k%=0.. .utiltsk%|
00004490 28 29 3d 30 3a 75 74 69 6c 65 25 3d 30 0d 02 21 |()=0:utile%=0..!|
000044a0 0f 75 74 69 6c 69 64 25 28 29 3d 30 0d 02 22 0b |.utilid%()=0..".|
000044b0 75 66 25 28 29 3d 30 0d 02 23 24 75 62 6f 78 77 |uf%()=0..#$uboxw|
000044c0 25 3d 30 3a f4 20 6d 61 78 20 77 69 64 74 68 20 |%=0:. max width |
000044d0 6f 66 20 64 69 61 6c 6f 67 75 65 0d 02 24 17 f4 |of dialogue..$..|
000044e0 20 73 70 72 69 74 65 2c 20 6c 6f 63 61 6c 20 74 | sprite, local t|
000044f0 61 67 0d 02 25 29 67 62 25 21 32 30 3d 26 46 46 |ag..%)gb%!20=&FF|
00004500 39 3a 67 62 25 21 32 34 3d 6c 6f 63 61 6c 74 61 |9:gb%!24=localta|
00004510 67 25 3a 67 62 25 21 32 38 3d 30 0d 02 26 25 21 |g%:gb%!28=0..&%!|
00004520 67 62 25 3d 33 32 3a 74 68 25 3d 30 3a f4 20 62 |gb%=32:th%=0:. b|
00004530 72 6f 61 64 63 61 73 74 20 6d 65 73 73 61 67 65 |roadcast message|
00004540 0d 02 27 04 0d 02 28 25 f4 20 41 73 6b 20 74 61 |..'...(%. Ask ta|
00004550 73 6b 20 66 6f 72 20 69 6e 66 6f 20 61 62 6f 75 |sk for info abou|
00004560 74 20 69 74 73 65 6c 66 2e 0d 02 29 0f c9 20 4d |t itself...).. M|
00004570 73 67 5f 49 6e 66 6f 25 0d 02 2a 21 67 62 25 21 |sg_Info%..*!gb%!|
00004580 32 30 3d 30 3a 21 67 62 25 3d 32 34 3a 74 68 25 |20=0:!gb%=24:th%|
00004590 3d 70 63 61 74 61 73 6b 25 0d 02 2b 04 0d 02 2c |=pcatask%..+...,|
000045a0 32 f4 20 54 65 6c 6c 20 74 61 73 6b 20 74 6f 20 |2. Tell task to |
000045b0 64 6f 20 69 74 73 20 73 74 75 66 66 20 28 6c 69 |do its stuff (li|
000045c0 6e 6b 20 6f 6e 74 6f 20 6f 62 6a 65 63 74 29 0d |nk onto object).|
000045d0 02 2d 0d c9 20 4d 73 67 5f 44 6f 25 0d 02 2e 29 |.-.. Msg_Do%...)|
000045e0 67 62 25 21 32 30 3d 26 46 46 39 3a 67 62 25 21 |gb%!20=&FF9:gb%!|
000045f0 32 34 3d 6c 6f 63 61 6c 74 61 67 25 3a 67 62 25 |24=localtag%:gb%|
00004600 21 32 38 3d 30 0d 02 2f 38 67 62 25 21 33 32 3d |!28=0../8gb%!32=|
00004610 75 74 69 6c 69 64 25 28 69 74 65 6d 25 29 3a 67 |utilid%(item%):g|
00004620 62 25 21 33 36 3d 75 66 25 28 69 74 65 6d 25 29 |b%!36=uf%(item%)|
00004630 3a 72 66 6c 67 25 3d 67 62 25 21 33 36 0d 02 30 |:rflg%=gb%!36..0|
00004640 21 f2 73 74 72 69 6e 67 30 28 67 62 25 2b 34 30 |!.string0(gb%+40|
00004650 2c a4 67 6c 73 28 6c 6f 63 61 6c 24 29 29 0d 02 |,.gls(local$))..|
00004660 31 1d 21 67 62 25 3d 34 34 2b a9 28 a4 73 28 67 |1.!gb%=44+.(.s(g|
00004670 62 25 2b 34 30 29 29 80 20 ac 33 0d 02 32 42 74 |b%+40)). .3..2Bt|
00004680 68 25 3d 75 74 69 6c 74 73 6b 25 28 69 74 65 6d |h%=utiltsk%(item|
00004690 25 29 3a f4 20 73 65 6e 64 20 6d 65 73 73 61 67 |%):. send messag|
000046a0 65 20 64 69 72 65 63 74 20 74 6f 20 61 70 70 72 |e direct to appr|
000046b0 6f 70 72 69 61 74 65 20 74 61 73 6b 2e 0d 02 33 |opriate task...3|
000046c0 04 0d 02 34 3c f4 20 42 72 6f 61 64 63 61 73 74 |...4<. Broadcast|
000046d0 20 6d 65 73 73 61 67 65 5f 64 6f 6e 65 20 28 6e | message_done (n|
000046e0 6f 74 20 75 73 65 64 20 62 79 20 74 68 69 73 20 |ot used by this |
000046f0 70 72 6f 67 72 61 6d 20 61 73 20 69 74 0d 02 35 |program as it..5|
00004700 30 f4 20 68 61 73 20 6e 6f 20 27 77 68 6f 6c 65 |0. has no 'whole|
00004710 20 6f 62 6a 65 63 74 20 6d 6f 64 69 66 69 65 64 | object modified|
00004720 27 20 66 75 6e 63 74 69 6f 6e 73 29 2e 0d 02 36 |' functions)...6|
00004730 0f c9 20 4d 73 67 5f 44 6f 6e 65 25 0d 02 37 0f |.. Msg_Done%..7.|
00004740 67 62 25 21 32 30 3d 26 46 46 39 0d 02 38 1e 67 |gb%!20=&FF9..8.g|
00004750 62 25 21 32 34 3d 72 65 6d 6f 74 65 74 61 67 25 |b%!24=remotetag%|
00004760 3a 67 62 25 21 32 38 3d 30 0d 02 39 11 21 67 62 |:gb%!28=0..9.!gb|
00004770 25 3d 33 32 3a 74 68 25 3d 30 0d 02 3a 04 0d 02 |%=32:th%=0..:...|
00004780 3b 22 f4 20 42 72 6f 61 64 63 61 73 74 20 4d 65 |;". Broadcast Me|
00004790 73 73 61 67 65 5f 55 70 64 61 74 65 41 72 65 61 |ssage_UpdateArea|
000047a0 0d 02 3c 42 f4 20 73 6f 20 6f 74 68 65 72 20 74 |..<B. so other t|
000047b0 61 73 6b 73 20 63 61 6e 20 72 65 64 72 61 77 20 |asks can redraw |
000047c0 61 70 70 72 6f 70 72 69 61 74 65 20 61 72 65 61 |appropriate area|
000047d0 20 6f 66 20 74 68 65 69 72 20 77 69 6e 64 6f 77 | of their window|
000047e0 73 2e 0d 02 3d 11 c9 20 4d 73 67 5f 55 70 61 72 |s...=.. Msg_Upar|
000047f0 65 61 25 0d 02 3e 5f 67 62 25 21 32 30 3d 26 46 |ea%..>_gb%!20=&F|
00004800 46 39 3a 67 62 25 21 32 34 3d 72 65 6d 6f 74 65 |F9:gb%!24=remote|
00004810 74 61 67 25 3a 67 62 25 21 32 38 3d 6d 73 30 25 |tag%:gb%!28=ms0%|
00004820 3a 67 62 25 21 33 32 3d 6d 73 31 25 3a 67 62 25 |:gb%!32=ms1%:gb%|
00004830 21 33 36 3d 6d 73 32 25 3a 67 62 25 21 34 30 3d |!36=ms2%:gb%!40=|
00004840 6d 73 33 25 3a 21 67 62 25 3d 34 34 3a 74 68 25 |ms3%:!gb%=44:th%|
00004850 3d 30 0d 02 3f 04 0d 02 40 28 f4 20 53 65 6e 64 |=0..?...@(. Send|
00004860 20 52 65 73 69 7a 65 5f 52 65 71 75 65 73 74 20 | Resize_Request |
00004870 74 6f 20 6f 77 6e 69 6e 67 20 74 61 73 6b 0d 02 |to owning task..|
00004880 41 1f f4 20 6e 6f 74 20 75 73 65 64 20 62 79 20 |A.. not used by |
00004890 74 68 69 73 20 70 72 6f 67 72 61 6d 2e 0d 02 42 |this program...B|
000048a0 28 f4 20 6d 73 30 25 20 69 73 20 74 68 65 20 6e |(. ms0% is the n|
000048b0 65 77 20 73 69 7a 65 20 6f 66 20 74 68 65 20 6f |ew size of the o|
000048c0 62 6a 65 63 74 0d 02 43 24 f4 20 74 6f 74 61 6c |bject..C$. total|
000048d0 20 73 69 7a 65 20 2d 20 69 6e 63 6c 75 64 69 6e | size - includin|
000048e0 67 20 68 65 61 64 65 72 2e 0d 02 44 33 f4 20 6f |g header...D3. o|
000048f0 77 6e 65 72 20 77 69 6c 6c 20 72 65 70 6c 79 20 |wner will reply |
00004900 77 69 74 68 20 52 65 73 69 7a 65 41 63 6b 20 69 |with ResizeAck i|
00004910 66 20 73 75 63 63 65 73 73 66 75 6c 0d 02 45 11 |f successful..E.|
00004920 c9 20 4d 73 67 5f 52 65 73 69 7a 65 25 0d 02 46 |. Msg_Resize%..F|
00004930 4d 67 62 25 21 32 30 3d 26 46 46 39 3a 67 62 25 |Mgb%!20=&FF9:gb%|
00004940 21 32 34 3d 72 65 6d 6f 74 65 74 61 67 25 3a 67 |!24=remotetag%:g|
00004950 62 25 21 32 38 3d 30 3a 67 62 25 21 33 32 3d 6d |b%!28=0:gb%!32=m|
00004960 73 30 25 3a 67 62 25 21 33 36 3d 30 3a 21 67 62 |s0%:gb%!36=0:!gb|
00004970 25 3d 34 30 3a 74 68 25 3d 30 0d 02 47 0c 73 65 |%=40:th%=0..G.se|
00004980 6e 64 25 3d 31 38 0d 02 48 04 0d 02 49 1f f4 20 |nd%=18..H...I.. |
00004990 42 72 6f 61 64 63 61 73 74 20 4d 65 73 73 61 67 |Broadcast Messag|
000049a0 65 5f 43 68 61 6e 67 65 64 0d 02 4a 4f f4 20 73 |e_Changed..JO. s|
000049b0 65 6e 74 20 77 68 65 6e 20 6e 65 77 20 6c 6f 63 |ent when new loc|
000049c0 61 6c 20 69 6d 61 67 65 20 61 6e 64 20 61 66 74 |al image and aft|
000049d0 65 72 20 52 65 73 69 7a 65 41 63 6b 20 61 6e 64 |er ResizeAck and|
000049e0 20 64 61 74 61 20 73 74 72 75 63 74 75 72 65 20 | data structure |
000049f0 63 68 61 6e 67 65 73 2e 0d 02 4b 12 c9 20 4d 73 |changes...K.. Ms|
00004a00 67 5f 43 68 61 6e 67 65 64 25 0d 02 4c 24 67 62 |g_Changed%..L$gb|
00004a10 25 21 32 30 3d 26 46 46 39 3a 67 62 25 21 32 34 |%!20=&FF9:gb%!24|
00004a20 3d 6d 73 30 25 3a 67 62 25 21 32 38 3d 30 0d 02 |=ms0%:gb%!28=0..|
00004a30 4d 52 e7 6d 73 30 24 3c 3e 22 22 20 8c 20 f2 73 |MR.ms0$<>"" . .s|
00004a40 74 72 69 6e 67 30 28 67 62 25 2b 33 32 2c 6d 73 |tring0(gb%+32,ms|
00004a50 30 24 29 3a 21 67 62 25 3d 33 36 2b a9 28 a4 73 |0$):!gb%=36+.(.s|
00004a60 28 67 62 25 2b 33 32 29 29 80 20 ac 33 20 8b 20 |(gb%+32)). .3 . |
00004a70 67 62 25 21 33 32 3d 30 3a 21 67 62 25 3d 33 36 |gb%!32=0:!gb%=36|
00004a80 0d 02 4e 09 74 68 25 3d 30 0d 02 4f 04 0d 02 50 |..N.th%=0..O...P|
00004a90 35 f4 20 42 72 6f 61 64 63 61 73 74 20 4d 65 73 |5. Broadcast Mes|
00004aa0 73 61 67 65 5f 4d 69 73 63 4f 70 20 77 69 74 68 |sage_MiscOp with|
00004ab0 20 53 75 62 5f 47 69 76 65 49 6e 66 6f 43 6f 6d | Sub_GiveInfoCom|
00004ac0 70 6f 0d 02 51 1f f4 20 6e 6f 74 20 75 73 65 64 |po..Q.. not used|
00004ad0 20 62 79 20 74 68 69 73 20 70 72 6f 67 72 61 6d | by this program|
00004ae0 2e 0d 02 52 0f c9 20 4d 73 67 5f 4d 69 73 63 25 |...R.. Msg_Misc%|
00004af0 0d 02 53 49 67 62 25 21 32 30 3d 53 75 62 5f 47 |..SIgb%!20=Sub_G|
00004b00 69 76 65 25 3a 67 62 25 21 32 34 3d 26 46 46 39 |ive%:gb%!24=&FF9|
00004b10 3a 67 62 25 21 32 38 3d 72 65 6d 6f 74 65 74 61 |:gb%!28=remoteta|
00004b20 67 25 3a 67 62 25 21 33 32 3d 30 3a 21 67 62 25 |g%:gb%!32=0:!gb%|
00004b30 3d 33 36 3a 74 68 25 3d 30 0d 02 54 04 0d 02 55 |=36:th%=0..T...U|
00004b40 3c f4 20 42 72 6f 61 64 63 61 73 74 20 4d 65 73 |<. Broadcast Mes|
00004b50 73 61 67 65 5f 44 65 73 65 6c 65 63 74 20 61 73 |sage_Deselect as|
00004b60 20 6f 62 6a 65 63 74 20 68 61 73 20 62 65 65 6e | object has been|
00004b70 20 64 65 6c 65 74 65 64 2e 0d 02 56 10 c9 20 4d | deleted...V.. M|
00004b80 73 67 5f 44 65 73 65 6c 25 0d 02 57 0f 67 62 25 |sg_Desel%..W.gb%|
00004b90 21 32 30 3d 26 46 46 39 0d 02 58 1d 67 62 25 21 |!20=&FF9..X.gb%!|
00004ba0 32 34 3d 6c 6f 63 61 6c 74 61 67 25 3a 67 62 25 |24=localtag%:gb%|
00004bb0 21 32 38 3d 30 0d 02 59 46 21 67 62 25 3d 33 32 |!28=0..YF!gb%=32|
00004bc0 3a 74 68 25 3d 30 3a 70 63 61 74 61 73 6b 25 3d |:th%=0:pcatask%=|
00004bd0 30 3a 72 65 6d 6f 74 65 74 61 73 6b 25 3d 30 3a |0:remotetask%=0:|
00004be0 f2 64 65 6c 65 74 65 52 69 63 6f 6e 28 30 29 3a |.deleteRicon(0):|
00004bf0 61 72 65 6d 6f 74 65 25 3d 2d 31 0d 02 5a 04 0d |aremote%=-1..Z..|
00004c00 02 5b 24 f4 20 73 65 6e 64 20 6d 73 67 5f 6f 62 |.[$. send msg_ob|
00004c10 6a 50 6f 73 20 74 6f 20 72 65 6d 6f 74 65 20 74 |jPos to remote t|
00004c20 61 73 6b 0d 02 5c 2a f4 20 73 65 65 20 57 69 6d |ask..\*. see Wim|
00004c30 70 5f 50 6f 6c 6c 20 6c 6f 6f 70 20 66 6f 72 20 |p_Poll loop for |
00004c40 63 61 6c 6c 20 64 65 74 61 69 6c 73 2e 0d 02 5d |call details...]|
00004c50 11 c9 20 4d 73 67 5f 4f 62 6a 50 6f 73 25 0d 02 |.. Msg_ObjPos%..|
00004c60 5e 0c 67 62 25 21 32 30 3d 30 0d 02 5f 1d 67 62 |^.gb%!20=0.._.gb|
00004c70 25 21 32 34 3d 6c 6f 63 61 6c 74 61 67 25 3a 67 |%!24=localtag%:g|
00004c80 62 25 21 32 38 3d 30 0d 02 60 72 67 62 25 21 33 |b%!28=0..`rgb%!3|
00004c90 32 3d 78 70 6f 73 4c 25 3a 67 62 25 21 33 36 3d |2=xposL%:gb%!36=|
00004ca0 79 70 6f 73 4c 25 3a 67 62 25 21 34 30 3d 6d 73 |yposL%:gb%!40=ms|
00004cb0 32 25 3a 67 62 25 21 34 34 3d 6d 73 33 25 3a 67 |2%:gb%!44=ms3%:g|
00004cc0 62 25 21 34 38 3d 73 66 61 63 25 3a 67 62 25 21 |b%!48=sfac%:gb%!|
00004cd0 35 32 3d 78 70 6f 73 55 25 3a 67 62 25 21 35 36 |52=xposU%:gb%!56|
00004ce0 3d 79 70 6f 73 55 25 3a 74 68 25 3d 74 73 6b 68 |=yposU%:th%=tskh|
00004cf0 25 3a 21 67 62 25 3d 36 30 0d 02 61 21 f4 20 73 |%:!gb%=60..a!. s|
00004d00 65 6e 64 20 6d 73 67 5f 48 6f 6f 6b 20 74 6f 20 |end msg_Hook to |
00004d10 6c 6f 63 61 6c 20 74 61 73 6b 0d 02 62 35 f4 20 |local task..b5. |
00004d20 74 68 69 73 20 61 73 6b 73 20 69 74 20 74 6f 20 |this asks it to |
00004d30 74 72 61 70 20 6d 65 73 73 61 67 65 73 20 74 6f |trap messages to|
00004d40 20 74 68 65 20 6f 62 6a 65 63 74 20 61 6e 64 0d | the object and.|
00004d50 02 63 1b f4 20 70 61 73 73 20 74 68 65 6d 20 62 |.c.. pass them b|
00004d60 61 63 6b 20 74 6f 20 75 73 2e 0d 02 64 0f c9 20 |ack to us...d.. |
00004d70 4d 73 67 5f 48 6f 6f 6b 25 0d 02 65 0c 67 62 25 |Msg_Hook%..e.gb%|
00004d80 21 32 30 3d 30 0d 02 66 39 67 62 25 21 32 34 3d |!20=0..f9gb%!24=|
00004d90 72 65 6d 6f 74 65 74 61 67 25 3a 67 62 25 21 32 |remotetag%:gb%!2|
00004da0 38 3d 25 31 31 3c 3c 32 38 3a f4 20 77 69 6e 64 |8=%11<<28:. wind|
00004db0 6f 77 20 62 75 74 74 6f 6e 20 74 79 70 65 0d 02 |ow button type..|
00004dc0 67 26 67 62 25 21 33 32 3d 6d 5f 72 65 6d 6f 74 |g&gb%!32=m_remot|
00004dd0 65 25 3a 21 67 62 25 3d 33 36 3a 74 68 25 3d 74 |e%:!gb%=36:th%=t|
00004de0 73 6b 68 25 0d 02 68 04 0d 02 69 15 f4 20 73 65 |skh%..h...i.. se|
00004df0 6e 64 20 6d 73 67 5f 75 6e 68 6f 6f 6b 0d 02 6a |nd msg_unhook..j|
00004e00 11 c9 20 4d 73 67 5f 55 6e 68 6f 6f 6b 25 0d 02 |.. Msg_Unhook%..|
00004e10 6b 0c 67 62 25 21 32 30 3d 30 0d 02 6c 18 67 62 |k.gb%!20=0..l.gb|
00004e20 25 21 32 34 3d 6d 73 31 25 3a 67 62 25 21 32 38 |%!24=ms1%:gb%!28|
00004e30 3d 30 0d 02 6d 31 67 62 25 21 33 32 3d 6d 5f 6c |=0..m1gb%!32=m_l|
00004e40 6f 63 61 6c 25 3a 67 62 25 21 33 36 3d 6d 73 30 |ocal%:gb%!36=ms0|
00004e50 25 3a 21 67 62 25 3d 34 30 3a 74 68 25 3d 74 73 |%:!gb%=40:th%=ts|
00004e60 6b 68 25 0d 02 6e 44 f4 20 48 65 79 2c 20 74 68 |kh%..nD. Hey, th|
00004e70 61 74 73 20 6f 75 72 20 6c 6f 63 61 6c 20 74 61 |ats our local ta|
00004e80 67 20 28 77 65 27 64 20 62 65 74 74 65 72 20 64 |g (we'd better d|
00004e90 65 6c 65 74 65 20 74 68 65 20 74 72 61 70 20 69 |elete the trap i|
00004ea0 63 6f 6e 2e 2e 2e 29 0d 02 6f 3f e7 6d 73 31 25 |con...)..o?.ms1%|
00004eb0 3d 6c 6f 63 61 6c 74 61 67 25 20 8c 20 72 65 6d |=localtag% . rem|
00004ec0 6f 74 65 74 61 73 6b 25 3d 30 3a f2 64 65 6c 65 |otetask%=0:.dele|
00004ed0 74 65 52 69 63 6f 6e 28 30 29 3a 61 72 65 6d 6f |teRicon(0):aremo|
00004ee0 74 65 25 3d 2d 31 0d 02 70 05 cb 0d 02 71 04 0d |te%=-1..p....q..|
00004ef0 02 72 43 f4 20 73 65 6e 64 20 74 68 65 20 6d 65 |.rC. send the me|
00004f00 73 73 61 67 65 20 61 6e 64 20 6b 65 65 70 20 72 |ssage and keep r|
00004f10 65 66 20 66 6f 72 20 63 68 65 63 6b 69 6e 67 20 |ef for checking |
00004f20 69 6e 20 4d 65 73 73 61 67 65 5f 52 65 63 65 69 |in Message_Recei|
00004f30 70 74 0d 02 73 28 c8 99 20 57 6d 65 73 73 25 2c |pt..s(.. Wmess%,|
00004f40 73 65 6e 64 25 2c 67 62 25 2c 74 68 25 3a 6d 79 |send%,gb%,th%:my|
00004f50 72 65 66 25 3d 67 62 25 21 38 0d 02 74 05 e1 0d |ref%=gb%!8..t...|
00004f60 02 75 04 0d 02 76 0f f4 20 21 21 21 50 43 41 21 |.u...v.. !!!PCA!|
00004f70 21 21 0d 02 77 23 f4 20 67 65 6e 65 72 61 74 65 |!!..w#. generate|
00004f80 20 74 68 65 20 70 6c 75 67 2d 69 6e 20 64 69 61 | the plug-in dia|
00004f90 6c 6f 67 75 65 0d 02 78 2c f4 20 73 74 61 72 74 |logue..x,. start|
00004fa0 20 62 79 20 73 65 6e 64 69 6e 67 20 4d 65 73 73 | by sending Mess|
00004fb0 61 67 65 5f 57 68 6f 73 41 62 6f 75 74 20 61 6e |age_WhosAbout an|
00004fc0 64 0d 02 79 2f f4 20 70 6f 6c 6c 20 75 6e 74 69 |d..y/. poll unti|
00004fd0 6c 20 74 68 65 20 6d 65 73 73 61 67 65 73 20 73 |l the messages s|
00004fe0 74 6f 70 20 66 6c 6f 6f 64 69 6e 67 20 69 6e 2e |top flooding in.|
00004ff0 0d 02 7a 04 0d 02 7b 0f dd f2 70 63 61 73 70 72 |..z...{...pcaspr|
00005000 69 74 65 0d 02 7c 13 f2 70 63 61 28 4d 73 67 5f |ite..|..pca(Msg_|
00005010 57 68 6f 73 25 29 0d 02 7d 05 f5 0d 02 7e 11 f2 |Whos%)..}....~..|
00005020 6d 69 6e 69 5f 70 6f 6c 6c 28 30 29 0d 02 7f 0b |mini_poll(0)....|
00005030 fd 20 52 52 25 3d 30 0d 02 80 04 0d 02 81 19 e7 |. RR%=0.........|
00005040 75 74 69 6c 24 3d 22 23 55 74 69 6c 69 74 69 65 |util$="#Utilitie|
00005050 73 22 20 8c 0d 02 82 83 f2 72 65 70 6d 73 67 28 |s" ......repmsg(|
00005060 22 4e 6f 20 75 74 69 6c 69 74 69 65 73 20 61 72 |"No utilities ar|
00005070 65 20 61 76 61 69 6c 61 62 6c 65 20 66 6f 72 20 |e available for |
00005080 74 68 69 73 20 6f 62 6a 65 63 74 20 61 74 20 74 |this object at t|
00005090 68 65 20 6d 6f 6d 65 6e 74 2e 20 50 6c 65 61 73 |he moment. Pleas|
000050a0 65 20 6c 6f 61 64 20 61 20 75 74 69 6c 69 74 79 |e load a utility|
000050b0 20 70 72 6f 76 69 64 69 6e 67 20 61 70 70 6c 69 | providing appli|
000050c0 63 61 74 69 6f 6e 20 61 6e 64 20 74 72 79 20 61 |cation and try a|
000050d0 67 61 69 6e 2e 22 29 0d 02 83 05 cc 0d 02 84 04 |gain.").........|
000050e0 0d 02 85 14 f4 20 73 69 6d 70 6c 65 20 6d 65 6e |..... simple men|
000050f0 75 2e 2e 2e 0d 02 86 13 e7 70 6f 70 75 70 74 79 |u........popupty|
00005100 70 65 25 3d 31 20 8c 0d 02 87 4f 63 75 72 72 62 |pe%=1 ....Ocurrb|
00005110 75 66 66 25 3d 63 62 73 74 72 25 3a 6d 61 78 62 |uff%=cbstr%:maxb|
00005120 75 66 66 25 3d 63 62 73 74 72 25 2b 26 38 30 3a |uff%=cbstr%+&80:|
00005130 6d 65 6e 75 66 72 65 65 25 3d 63 62 62 75 66 66 |menufree%=cbbuff|
00005140 25 3a 6d 65 6e 75 65 6e 64 25 3d 63 62 62 75 66 |%:menuend%=cbbuf|
00005150 66 25 2b 26 38 30 0d 02 88 3b 6d 5f 70 63 61 25 |f%+&80...;m_pca%|
00005160 3d a4 63 6d 65 6e 28 75 74 69 6c 24 29 3a f2 67 |=.cmen(util$):.g|
00005170 70 69 3a f2 6d 65 6e 75 28 6d 5f 70 63 61 25 2c |pi:.menu(m_pca%,|
00005180 6d 6f 78 25 2d 31 38 36 2c 6d 6f 79 25 2b 31 32 |mox%-186,moy%+12|
00005190 29 0d 02 89 05 cc 0d 02 8a 24 f4 20 2e 2e 2e 6f |)........$. ...o|
000051a0 72 20 73 6f 6d 65 74 68 69 6e 67 20 6d 6f 72 65 |r something more|
000051b0 20 61 6d 62 69 74 69 6f 75 73 0d 02 8b 3e 21 57 | ambitious...>!W|
000051c0 62 25 3d 70 63 61 5f 77 25 3a c8 99 20 22 57 69 |b%=pca_w%:.. "Wi|
000051d0 6d 70 5f 44 65 6c 65 74 65 57 69 6e 64 6f 77 22 |mp_DeleteWindow"|
000051e0 2c 2c 57 62 25 3a 63 25 3d 28 31 3c 3c 32 38 29 |,,Wb%:c%=(1<<28)|
000051f0 2b 28 31 3c 3c 32 39 29 0d 02 8c 55 f4 20 49 66 |+(1<<29)...U. If|
00005200 20 6d 6f 72 65 20 74 68 61 6e 20 66 69 76 65 20 | more than five |
00005210 75 74 69 6c 69 74 69 65 73 20 67 69 76 65 20 69 |utilities give i|
00005220 74 20 61 20 73 63 72 6f 6c 6c 62 61 72 20 28 61 |t a scrollbar (a|
00005230 6e 64 20 6c 69 6d 69 74 20 6f 70 65 6e 65 64 20 |nd limit opened |
00005240 73 69 7a 65 20 74 6f 20 66 69 76 65 29 0d 02 8d |size to five)...|
00005250 2a e7 20 75 74 69 6c 65 25 3e 35 20 8c 20 65 25 |*. utile%>5 . e%|
00005260 3d 28 31 3c 3c 32 38 29 2b 28 31 3c 3c 32 39 29 |=(1<<28)+(1<<29)|
00005270 20 8b 20 65 25 3d 30 0d 02 8e 2e 70 63 61 5f 77 | . e%=0....pca_w|
00005280 62 6c 6f 63 6b 25 21 32 38 3d 28 70 63 61 5f 77 |block%!28=(pca_w|
00005290 62 6c 6f 63 6b 25 21 32 38 20 80 20 ac 63 25 29 |block%!28 . .c%)|
000052a0 20 82 20 65 25 0d 02 8f 20 c8 99 57 63 77 25 2c | . e%... ..Wcw%,|
000052b0 2c 70 63 61 5f 77 62 6c 6f 63 6b 25 20 b8 20 70 |,pca_wblock% . p|
000052c0 63 61 5f 77 25 0d 02 90 04 0d 02 91 21 f4 20 6d |ca_w%.......!. m|
000052d0 61 78 69 6d 75 6d 20 68 65 69 67 68 74 20 6f 66 |aximum height of|
000052e0 20 64 69 61 6c 6f 67 75 65 2e 0d 02 92 1e 6f 6c | dialogue.....ol|
000052f0 65 32 68 25 3d 28 28 75 62 6f 78 68 25 2b 38 29 |e2h%=((uboxh%+8)|
00005300 2a 75 74 69 6c 65 25 29 0d 02 93 04 0d 02 94 5c |*utile%).......\|
00005310 f4 20 6f 70 65 6e 20 61 73 20 61 20 6d 65 6e 75 |. open as a menu|
00005320 20 70 6f 73 69 74 69 6f 6e 65 64 20 73 75 63 68 | positioned such|
00005330 20 74 68 61 74 20 74 68 65 20 66 69 72 73 74 20 | that the first |
00005340 69 74 65 6d 20 69 73 20 63 65 6e 74 72 65 64 20 |item is centred |
00005350 61 62 6f 75 74 20 74 68 65 20 6d 6f 75 73 65 20 |about the mouse |
00005360 70 6f 69 6e 74 65 72 2e 0d 02 95 04 0d 02 96 58 |pointer........X|
00005370 f2 67 70 69 3a f2 73 65 74 73 69 7a 65 33 28 70 |.gpi:.setsize3(p|
00005380 63 61 5f 77 25 2c 6f 6c 65 32 68 25 2c 75 62 6f |ca_w%,ole2h%,ubo|
00005390 78 77 25 2b 31 30 2c 6d 6f 78 25 2d 75 62 6f 78 |xw%+10,mox%-ubox|
000053a0 77 25 2f 32 2c 6d 6f 79 25 2d 6f 6c 65 32 68 25 |w%/2,moy%-ole2h%|
000053b0 2f 32 29 3a 77 68 25 3d 57 62 25 21 31 36 2d 57 |/2):wh%=Wb%!16-W|
000053c0 62 25 21 38 0d 02 97 33 f2 43 77 28 70 63 61 5f |b%!8...3.Cw(pca_|
000053d0 77 25 29 3a 78 25 3d 6d 6f 78 25 2d 75 62 6f 78 |w%):x%=mox%-ubox|
000053e0 77 25 2f 32 3a 79 25 3d 6d 6f 79 25 2b 28 75 62 |w%/2:y%=moy%+(ub|
000053f0 6f 78 68 25 2f 32 29 0d 02 98 04 0d 02 99 3c f4 |oxh%/2).......<.|
00005400 20 77 68 69 6c 65 20 63 6f 70 69 6e 67 20 77 69 | while coping wi|
00005410 74 68 20 70 6f 69 6e 74 65 72 20 6e 65 61 72 20 |th pointer near |
00005420 74 68 65 20 65 64 67 65 20 6f 66 20 74 68 65 20 |the edge of the |
00005430 73 63 72 65 65 6e 21 0d 02 9a 0e e7 78 25 3c 30 |screen!.....x%<0|
00005440 20 78 25 3d 30 0d 02 9b 14 e7 79 25 2d 77 68 25 | x%=0.....y%-wh%|
00005450 3c 30 20 79 25 3d 77 68 25 0d 02 9c 04 0d 02 9d |<0 y%=wh%.......|
00005460 19 c8 99 20 57 63 6d 25 2c 2c 70 63 61 5f 77 25 |... Wcm%,,pca_w%|
00005470 2c 78 25 2c 79 25 0d 02 9e 05 cd 0d 02 9f 05 cd |,x%,y%..........|
00005480 0d 02 a0 05 e1 0d 02 a1 04 0d 02 a2 52 f4 20 67 |............R. g|
00005490 65 6e 65 72 61 6c 20 70 72 6f 63 2e 20 66 6f 72 |eneral proc. for|
000054a0 20 73 65 74 74 69 6e 67 20 74 68 65 20 6d 61 78 | setting the max|
000054b0 69 6d 75 6d 20 65 78 74 65 6e 74 20 6f 66 20 61 |imum extent of a|
000054c0 20 77 69 6e 64 6f 77 20 2d 20 6d 6f 64 69 66 69 | window - modifi|
000054d0 65 64 20 74 6f 20 6c 69 6d 69 74 0d 02 a3 4e f4 |ed to limit...N.|
000054e0 20 74 68 65 20 64 69 73 70 6c 61 79 65 64 20 73 | the displayed s|
000054f0 69 7a 65 20 74 6f 20 61 20 6d 61 78 69 6d 75 6d |ize to a maximum|
00005500 20 6f 66 20 35 2a 20 74 68 65 20 68 65 69 67 68 | of 5* the heigh|
00005510 74 20 6f 66 20 61 20 70 63 61 20 64 69 61 6c 6f |t of a pca dialo|
00005520 67 75 65 20 69 74 65 6d 2e 0d 02 a4 20 dd f2 73 |gue item.... ..s|
00005530 65 74 73 69 7a 65 33 28 77 68 6e 25 2c 68 25 2c |etsize3(whn%,h%,|
00005540 77 25 2c 78 25 2c 79 25 29 0d 02 a5 0e e7 78 25 |w%,x%,y%).....x%|
00005550 3c 30 20 78 25 3d 30 0d 02 a6 0e e7 79 25 3c 30 |<0 x%=0.....y%<0|
00005560 20 79 25 3d 30 0d 02 a7 55 21 57 62 25 3d 77 68 | y%=0...U!Wb%=wh|
00005570 6e 25 3a c8 99 57 67 77 73 74 25 2c 2c 57 62 25 |n%:..Wgwst%,,Wb%|
00005580 3a 57 62 25 21 34 3d 30 3a 57 62 25 21 38 3d 30 |:Wb%!4=0:Wb%!8=0|
00005590 3a 57 62 25 21 31 36 3d 68 25 3a 57 62 25 21 31 |:Wb%!16=h%:Wb%!1|
000055a0 32 3d 77 25 3a c8 99 26 36 30 30 44 37 2c 77 68 |2=w%:..&600D7,wh|
000055b0 6e 25 2c 28 57 62 25 2b 34 29 0d 02 a8 28 e7 68 |n%,(Wb%+4)...(.h|
000055c0 25 3e 28 75 62 6f 78 68 25 2b 38 29 2a 35 20 57 |%>(uboxh%+8)*5 W|
000055d0 62 25 21 31 36 3d 28 75 62 6f 78 68 25 2b 38 29 |b%!16=(uboxh%+8)|
000055e0 2a 35 0d 02 a9 59 57 62 25 21 32 38 3d 2d 31 3a |*5...YWb%!28=-1:|
000055f0 57 62 25 21 34 3d 57 62 25 21 34 2b 78 25 3a 57 |Wb%!4=Wb%!4+x%:W|
00005600 62 25 21 38 3d 57 62 25 21 38 2b 79 25 3a 57 62 |b%!8=Wb%!8+y%:Wb|
00005610 25 21 31 32 3d 57 62 25 21 31 32 2b 78 25 3a 57 |%!12=Wb%!12+x%:W|
00005620 62 25 21 31 36 3d 57 62 25 21 31 36 2b 79 25 3a |b%!16=Wb%!16+y%:|
00005630 c8 99 57 6f 77 25 2c 2c 57 62 25 0d 02 aa 05 e1 |..Wow%,,Wb%.....|
00005640 0d 02 ab 04 0d 02 ac 0f f4 20 21 21 21 50 43 41 |......... !!!PCA|
00005650 21 21 21 0d 02 ad 31 f4 20 75 73 65 72 20 68 61 |!!!...1. user ha|
00005660 73 20 63 68 6f 73 65 6e 20 61 6e 20 69 74 65 6d |s chosen an item|
00005670 20 69 6e 20 74 68 65 20 50 43 41 20 64 69 61 6c | in the PCA dial|
00005680 6f 67 75 65 0d 02 ae 35 f4 20 65 69 74 68 65 72 |ogue...5. either|
00005690 20 73 65 6e 64 20 4d 65 73 73 61 67 65 5f 44 6f | send Message_Do|
000056a0 59 6f 75 72 53 74 75 66 66 20 6f 72 20 4d 65 73 |YourStuff or Mes|
000056b0 73 61 67 65 5f 49 6e 66 6f 0d 02 af 30 f4 20 64 |sage_Info...0. d|
000056c0 65 70 65 6e 64 69 6e 67 20 6f 6e 20 66 6c 61 67 |epending on flag|
000056d0 73 20 61 6e 64 20 77 68 65 72 65 20 75 73 65 72 |s and where user|
000056e0 20 63 6c 69 63 6b 65 64 2e 0d 02 b0 0d dd f2 70 | clicked.......p|
000056f0 63 61 5f 77 69 6e 0d 02 b1 3f f4 20 67 65 74 20 |ca_win...?. get |
00005700 77 69 6e 64 6f 77 20 69 6e 66 6f 20 61 6e 20 77 |window info an w|
00005710 6f 72 6b 20 6f 75 74 20 77 68 69 63 68 20 62 75 |ork out which bu|
00005720 74 74 6f 6e 20 74 68 65 79 20 63 6c 69 63 6b 65 |tton they clicke|
00005730 64 20 6f 6e 2e 0d 02 b2 2a f2 67 77 69 28 70 63 |d on....*.gwi(pc|
00005740 61 5f 77 25 29 3a 6f 42 74 25 3d 42 74 25 3a 79 |a_w%):oBt%=Bt%:y|
00005750 31 61 25 3d 79 31 25 2d 79 73 63 72 6f 6c 25 0d |1a%=y1%-yscrol%.|
00005760 02 b3 39 69 74 65 6d 25 3d 28 6d 6f 79 25 2d 79 |..9item%=(moy%-y|
00005770 31 61 25 29 2f 28 75 62 6f 78 68 25 2b 38 29 3a |1a%)/(uboxh%+8):|
00005780 e7 69 74 65 6d 25 3e 75 74 69 6c 65 25 2d 31 20 |.item%>utile%-1 |
00005790 69 74 65 6d 25 3d 2d 31 0d 02 b4 13 78 78 25 3d |item%=-1....xx%=|
000057a0 6d 6f 78 25 2d 77 69 6e 78 25 20 0d 02 b5 04 0d |mox%-winx% .....|
000057b0 02 b6 0f e7 69 74 65 6d 25 3e 3d 30 20 8c 0d 02 |....item%>=0 ...|
000057c0 b7 1d f4 20 6d 61 6b 65 20 74 68 65 20 27 62 75 |... make the 'bu|
000057d0 74 74 6f 6e 27 20 63 6c 69 63 6b 0d 02 b8 68 21 |tton' click...h!|
000057e0 57 62 25 3d 70 63 61 5f 77 25 3a 57 62 25 21 34 |Wb%=pca_w%:Wb%!4|
000057f0 3d 30 3a 57 62 25 21 38 3d 69 74 65 6d 25 2a 28 |=0:Wb%!8=item%*(|
00005800 75 62 6f 78 68 25 2b 38 29 3a 57 62 25 21 31 32 |uboxh%+8):Wb%!12|
00005810 3d 76 69 73 73 69 7a 58 25 3a 57 62 25 21 31 36 |=vissizX%:Wb%!16|
00005820 3d 57 62 25 21 38 2b 28 75 62 6f 78 68 25 2b 32 |=Wb%!8+(uboxh%+2|
00005830 29 3a f2 72 64 70 63 61 28 b9 2c 69 74 65 6d 25 |):.rdpca(.,item%|
00005840 2c b9 29 0d 02 b9 12 f5 3a f2 67 70 69 3a fd 20 |,.).....:.gpi:. |
00005850 42 74 25 3d 30 0d 02 ba 68 21 57 62 25 3d 70 63 |Bt%=0...h!Wb%=pc|
00005860 61 5f 77 25 3a 57 62 25 21 34 3d 30 3a 57 62 25 |a_w%:Wb%!4=0:Wb%|
00005870 21 38 3d 69 74 65 6d 25 2a 28 75 62 6f 78 68 25 |!8=item%*(uboxh%|
00005880 2b 38 29 3a 57 62 25 21 31 32 3d 76 69 73 73 69 |+8):Wb%!12=vissi|
00005890 7a 58 25 3a 57 62 25 21 31 36 3d 57 62 25 21 38 |zX%:Wb%!16=Wb%!8|
000058a0 2b 28 75 62 6f 78 68 25 2b 32 29 3a f2 72 64 70 |+(uboxh%+2):.rdp|
000058b0 63 61 28 b9 2c 69 74 65 6d 25 2c 30 29 0d 02 bb |ca(.,item%,0)...|
000058c0 1c 70 63 61 74 61 73 6b 25 3d 75 74 69 6c 74 73 |.pcatask%=utilts|
000058d0 6b 25 28 69 74 65 6d 25 29 0d 02 bc 04 0d 02 bd |k%(item%).......|
000058e0 2d f4 20 63 6c 69 63 6b 65 64 20 6f 6e 20 69 6e |-. clicked on in|
000058f0 66 6f 20 6f 72 20 65 6c 73 65 77 68 65 72 65 20 |fo or elsewhere |
00005900 69 6e 20 62 75 74 74 6f 6e 3f 0d 02 be 04 0d 02 |in button?......|
00005910 bf 2e e7 20 78 78 25 3c 75 62 6f 78 77 25 2d 34 |... xx%<uboxw%-4|
00005920 32 20 84 20 28 28 75 66 25 28 69 74 65 6d 25 29 |2 . ((uf%(item%)|
00005930 20 80 20 25 31 30 29 3d 30 29 20 8c 0d 02 c0 04 | . %10)=0) .....|
00005940 0d 02 c1 36 f4 20 44 6f 65 73 20 74 68 65 20 75 |...6. Does the u|
00005950 74 69 6c 69 74 79 20 77 61 6e 74 20 73 6f 6c 65 |tility want sole|
00005960 20 61 63 63 65 73 73 20 74 6f 20 74 68 65 20 6f | access to the o|
00005970 62 6a 65 63 74 3f 0d 02 c2 30 e7 20 28 75 66 25 |bject?...0. (uf%|
00005980 28 69 74 65 6d 25 29 20 80 20 25 31 30 30 30 29 |(item%) . %1000)|
00005990 3c 3e 30 20 8c 20 f2 70 63 61 28 4d 73 67 5f 44 |<>0 . .pca(Msg_D|
000059a0 65 73 65 6c 25 29 0d 02 c3 04 0d 02 c4 36 f4 20 |esel%).......6. |
000059b0 6d 61 6b 65 20 5f 73 75 72 65 5f 20 74 68 65 72 |make _sure_ ther|
000059c0 65 20 69 73 20 61 20 74 61 67 20 66 6f 72 20 74 |e is a tag for t|
000059d0 68 65 20 6c 6f 63 61 6c 20 6f 62 6a 65 63 74 2e |he local object.|
000059e0 0d 02 c5 3d f4 20 77 65 20 64 6f 20 69 74 20 77 |...=. we do it w|
000059f0 68 65 6e 20 6c 6f 61 64 69 6e 67 20 74 68 65 20 |hen loading the |
00005a00 6f 62 6a 65 63 74 20 73 6f 20 74 68 69 73 20 69 |object so this i|
00005a10 73 6e 27 74 20 73 74 72 69 63 74 6c 79 0d 02 c6 |sn't strictly...|
00005a20 3d f4 20 6e 65 63 65 73 73 61 72 79 2e 2e 2e 49 |=. necessary...I|
00005a30 66 20 79 6f 75 20 64 6f 6e 27 20 77 61 6e 74 20 |f you don' want |
00005a40 61 20 50 43 41 20 74 61 67 20 66 6f 72 20 65 76 |a PCA tag for ev|
00005a50 65 72 79 20 6f 62 6a 65 63 74 0d 02 c7 34 f4 20 |ery object...4. |
00005a60 79 6f 75 20 63 72 65 61 74 65 20 74 68 65 6e 20 |you create then |
00005a70 74 68 69 73 20 69 73 20 74 68 65 20 74 69 6d 65 |this is the time|
00005a80 20 74 6f 20 63 72 65 61 74 65 20 69 74 2e 0d 02 | to create it...|
00005a90 c8 04 0d 02 c9 12 e7 6c 6f 63 61 6c 74 61 67 25 |.......localtag%|
00005aa0 3c 30 20 8c 0d 02 ca 36 c8 99 22 50 43 41 5f 43 |<0 ....6.."PCA_C|
00005ab0 72 65 61 74 65 54 61 67 22 2c 2c 6c 6f 63 61 6c |reateTag",,local|
00005ac0 25 2c 6c 6f 63 61 6c 25 21 38 2c 30 2c 30 20 b8 |%,local%!8,0,0 .|
00005ad0 20 6c 6f 63 61 6c 74 61 67 25 0d 02 cb 05 cc 0d | localtag%......|
00005ae0 02 cc 2a 21 6c 6f 63 61 6c 74 61 67 25 3d 6c 6f |..*!localtag%=lo|
00005af0 63 61 6c 25 3a 6c 6f 63 61 6c 74 61 67 25 21 34 |cal%:localtag%!4|
00005b00 3d 6c 6f 63 61 6c 25 21 38 0d 02 cd 05 cd 0d 02 |=local%!8.......|
00005b10 ce 04 0d 02 cf 2b f4 20 61 72 65 20 77 65 20 61 |.....+. are we a|
00005b20 6c 72 65 61 64 79 20 69 6e 20 61 6e 20 69 6e 70 |lready in an inp|
00005b30 6c 61 63 65 20 73 65 73 73 69 6f 6e 3f 0d 02 d0 |lace session?...|
00005b40 35 f4 20 69 66 20 73 6f 2c 20 73 65 6e 64 20 61 |5. if so, send a|
00005b50 6e 20 75 6e 68 6f 6f 6b 20 74 6f 20 74 68 65 20 |n unhook to the |
00005b60 70 72 65 76 69 6f 75 73 20 72 65 6d 6f 74 65 2e |previous remote.|
00005b70 2e 2e 0d 02 d1 4f e7 20 28 28 75 66 25 28 69 74 |.....O. ((uf%(it|
00005b80 65 6d 25 29 20 80 20 25 31 30 30 30 30 29 3c 3e |em%) . %10000)<>|
00005b90 30 20 80 20 61 72 65 6d 6f 74 65 25 3c 3e 2d 31 |0 . aremote%<>-1|
00005ba0 29 20 84 20 72 65 6d 6f 74 65 74 61 73 6b 25 3d |) . remotetask%=|
00005bb0 75 74 69 6c 74 73 6b 25 28 69 74 65 6d 25 29 20 |utiltsk%(item%) |
00005bc0 8c 0d 02 d2 4f e7 72 65 6d 6f 74 65 74 61 73 6b |....O.remotetask|
00005bd0 25 3c 3e 30 20 8c 20 74 73 6b 68 25 3d 72 65 6d |%<>0 . tskh%=rem|
00005be0 6f 74 65 74 61 73 6b 25 3a 6d 73 30 25 3d 31 3a |otetask%:ms0%=1:|
00005bf0 6d 73 31 25 3d 6c 6f 63 61 6c 74 61 67 25 3a f2 |ms1%=localtag%:.|
00005c00 70 63 61 28 4d 73 67 5f 55 6e 68 6f 6f 6b 25 29 |pca(Msg_Unhook%)|
00005c10 0d 02 d3 05 cd 0d 02 d4 29 f4 20 74 65 6c 6c 20 |........). tell |
00005c20 74 68 65 20 75 74 69 6c 69 74 79 20 74 6f 20 64 |the utility to d|
00005c30 6f 20 69 74 73 20 73 74 75 66 66 2e 2e 2e 0d 02 |o its stuff.....|
00005c40 d5 1b 70 63 61 74 73 6b 25 3d 75 74 69 6c 74 73 |..pcatsk%=utilts|
00005c50 6b 25 28 69 74 65 6d 25 29 0d 02 d6 11 f2 70 63 |k%(item%).....pc|
00005c60 61 28 4d 73 67 5f 44 6f 25 29 0d 02 d7 05 cc 0d |a(Msg_Do%)......|
00005c70 02 d8 2b 70 63 61 74 73 6b 25 3d 75 74 69 6c 74 |..+pcatsk%=utilt|
00005c80 73 6b 25 28 69 74 65 6d 25 29 3a f2 70 63 61 28 |sk%(item%):.pca(|
00005c90 4d 73 67 5f 49 6e 66 6f 25 29 0d 02 d9 05 cd 0d |Msg_Info%)......|
00005ca0 02 da 04 0d 02 db 05 cd 0d 02 dc 04 0d 02 dd 2c |...............,|
00005cb0 f4 20 4f 6e 6c 79 20 63 6c 6f 73 65 20 64 69 61 |. Only close dia|
00005cc0 6c 6f 67 75 65 20 69 66 20 53 45 4c 45 43 54 20 |logue if SELECT |
00005cd0 63 6c 69 63 6b 65 64 2e 0d 02 de 17 e7 6f 42 74 |clicked......oBt|
00005ce0 25 3d 34 20 f2 43 77 28 70 63 61 5f 77 25 29 0d |%=4 .Cw(pca_w%).|
00005cf0 02 df 05 e1 0d 02 e0 04 0d 02 e1 11 dd f2 73 65 |..............se|
00005d00 6c 65 63 74 5f 6d 65 6e 75 0d 02 e2 2e e7 20 a4 |lect_menu..... .|
00005d10 63 68 65 63 6b 5f 61 64 6a 3d b9 20 61 64 6a 75 |check_adj=. adju|
00005d20 73 74 69 6e 67 25 3d b9 20 8b 20 61 64 6a 75 73 |sting%=. . adjus|
00005d30 74 69 6e 67 25 3d a3 0d 02 e3 27 e7 6d 6e 68 6e |ting%=....'.mnhn|
00005d40 64 25 3d 6d 5f 69 62 61 72 25 20 80 20 21 57 62 |d%=m_ibar% . !Wb|
00005d50 25 3d 32 20 f2 74 65 72 6d 69 6e 61 74 65 0d 02 |%=2 .terminate..|
00005d60 e4 4e e7 6d 6e 68 6e 64 25 3d 6d 5f 69 62 61 72 |.N.mnhnd%=m_ibar|
00005d70 25 20 80 20 21 57 62 25 3d 31 20 8c 20 f2 6f 6f |% . !Wb%=1 . .oo|
00005d80 28 77 5f 70 72 65 66 73 25 2c 34 2c 69 6e 70 6c |(w_prefs%,4,inpl|
00005d90 61 63 65 25 29 3a f2 4f 77 28 77 5f 70 72 65 66 |ace%):.Ow(w_pref|
00005da0 73 25 2c 2d 31 2c 2d 31 2c 2d 31 29 0d 02 e5 18 |s%,-1,-1,-1)....|
00005db0 e7 6d 6e 68 6e 64 25 3d 6d 6d 5f 72 65 6d 6f 74 |.mnhnd%=mm_remot|
00005dc0 65 25 20 8c 0d 02 e6 0d c8 8e 20 21 57 62 25 20 |e% ....... !Wb% |
00005dd0 ca 0d 02 e7 0f f4 20 21 21 21 50 43 41 21 21 21 |...... !!!PCA!!!|
00005de0 0d 02 e8 34 f4 20 6e 6f 74 20 75 73 65 64 20 62 |...4. not used b|
00005df0 79 20 64 65 6d 6f 2c 20 65 78 61 6d 70 6c 65 20 |y demo, example |
00005e00 27 63 68 61 6e 67 65 20 6f 62 6a 65 63 74 20 73 |'change object s|
00005e10 69 7a 65 27 0d 02 e9 0f f4 20 66 75 6e 63 74 69 |ize'..... functi|
00005e20 6f 6e 2e 0d 02 ea 1d c9 20 31 3a f4 20 64 6f 75 |on...... 1:. dou|
00005e30 62 6c 65 20 73 69 7a 65 20 72 65 71 75 65 73 74 |ble size request|
00005e40 0d 02 eb 55 63 75 72 73 69 7a 65 25 3d 21 72 65 |...Ucursize%=!re|
00005e50 6d 6f 74 65 74 61 67 25 3a 63 75 72 73 69 7a 65 |motetag%:cursize|
00005e60 25 3d 21 63 75 72 73 69 7a 65 25 3a f4 20 72 65 |%=!cursize%:. re|
00005e70 61 64 20 74 6f 74 61 6c 20 73 69 7a 65 20 66 72 |ad total size fr|
00005e80 6f 6d 20 73 70 72 69 74 65 20 61 72 65 61 20 68 |om sprite area h|
00005e90 65 61 64 65 72 0d 02 ec 4e 61 64 61 74 25 3d 21 |eader...Nadat%=!|
00005ea0 72 65 6d 6f 74 65 74 61 67 25 2b 72 65 6d 6f 74 |remotetag%+remot|
00005eb0 65 74 61 67 25 21 34 3a 61 64 61 74 25 3d 61 64 |etag%!4:adat%=ad|
00005ec0 61 74 25 2b 61 64 61 74 25 21 33 32 3a 68 64 72 |at%+adat%!32:hdr|
00005ed0 25 3d 61 64 61 74 25 2d 21 72 65 6d 6f 74 65 74 |%=adat%-!remotet|
00005ee0 61 67 25 0d 02 ed 25 6d 73 30 25 3d 68 64 72 25 |ag%...%ms0%=hdr%|
00005ef0 2b 78 77 68 6f 6f 6b 25 2a 34 2a 32 2a 28 79 77 |+xwhook%*4*2*(yw|
00005f00 68 6f 6f 6b 25 2a 32 29 0d 02 ee 15 f2 70 63 61 |hook%*2).....pca|
00005f10 28 4d 73 67 5f 52 65 73 69 7a 65 25 29 0d 02 ef |(Msg_Resize%)...|
00005f20 17 c9 20 32 3a f2 70 63 61 28 4d 73 67 5f 4d 69 |.. 2:.pca(Msg_Mi|
00005f30 73 63 25 29 0d 02 f0 05 cb 0d 02 f1 05 cd 0d 02 |sc%)............|
00005f40 f2 14 e7 6d 6e 68 6e 64 25 3d 6d 5f 70 63 61 25 |...mnhnd%=m_pca%|
00005f50 20 8c 0d 02 f3 0e 69 74 65 6d 25 3d 21 57 62 25 | .....item%=!Wb%|
00005f60 0d 02 f4 35 e7 20 28 75 66 25 28 69 74 65 6d 25 |...5. (uf%(item%|
00005f70 29 20 80 20 25 31 30 30 30 29 3c 3e 30 20 8c 20 |) . %1000)<>0 . |
00005f80 76 25 3d 30 3a f2 70 63 61 28 4d 73 67 5f 44 65 |v%=0:.pca(Msg_De|
00005f90 73 65 6c 25 29 0d 02 f5 1c 70 63 61 74 61 73 6b |sel%)....pcatask|
00005fa0 25 3d 75 74 69 6c 74 73 6b 25 28 69 74 65 6d 25 |%=utiltsk%(item%|
00005fb0 29 0d 02 f6 11 f2 70 63 61 28 4d 73 67 5f 44 6f |).....pca(Msg_Do|
00005fc0 25 29 0d 02 f7 05 cd 0d 02 f8 32 e7 20 61 64 6a |%)........2. adj|
00005fd0 75 73 74 69 6e 67 25 20 8c 20 f2 6d 65 6e 75 28 |usting% . .menu(|
00005fe0 6d 6e 68 6e 64 25 2c 6d 6f 75 73 65 78 25 2c 6d |mnhnd%,mousex%,m|
00005ff0 6f 75 73 65 79 25 29 3a e1 0d 02 f9 0d 6d 6e 68 |ousey%):.....mnh|
00006000 6e 64 25 3d 2d 31 0d 02 fa 05 e1 0d 02 fb 04 0d |nd%=-1..........|
00006010 02 fc 0f dd f2 70 72 65 66 73 5f 77 69 6e 0d 02 |.....prefs_win..|
00006020 fd 0d c8 8e 20 49 63 6e 25 20 ca 0d 02 fe 51 c9 |.... Icn% ....Q.|
00006030 20 32 2c 33 3a 70 6f 70 75 70 74 79 70 65 25 3d | 2,3:popuptype%=|
00006040 49 63 6e 25 2d 32 3a f2 75 69 47 28 77 5f 70 72 |Icn%-2:.uiG(w_pr|
00006050 65 66 73 25 2c 32 2c 33 2c 30 29 3a f2 75 69 28 |efs%,2,3,0):.ui(|
00006060 77 5f 70 72 65 66 73 25 2c 70 6f 70 75 70 74 79 |w_prefs%,popupty|
00006070 70 65 25 2b 32 2c 31 3c 3c 32 31 29 0d 02 ff 34 |pe%+2,1<<21)...4|
00006080 c9 20 34 3a 69 6e 70 6c 61 63 65 25 3d ac 20 69 |. 4:inplace%=. i|
00006090 6e 70 6c 61 63 65 25 3a f2 6f 6f 28 77 5f 70 72 |nplace%:.oo(w_pr|
000060a0 65 66 73 25 2c 34 2c 69 6e 70 6c 61 63 65 25 29 |efs%,4,inplace%)|
000060b0 0d 03 00 04 0d 03 01 0f f4 20 21 21 21 50 43 41 |......... !!!PCA|
000060c0 21 21 21 0d 03 02 2d f4 20 75 73 65 72 20 68 61 |!!!...-. user ha|
000060d0 73 20 74 6f 67 67 6c 65 64 20 69 6e 70 6c 61 63 |s toggled inplac|
000060e0 65 20 65 64 69 74 69 6e 67 20 6f 70 74 69 6f 6e |e editing option|
000060f0 0d 03 03 23 f4 20 44 69 64 20 77 65 20 62 65 67 |...#. Did we beg|
00006100 69 6e 20 77 69 74 68 20 69 6e 70 6c 61 63 65 20 |in with inplace |
00006110 6f 6e 3f 0d 03 04 2a e7 20 28 75 66 6c 67 25 20 |on?...*. (uflg% |
00006120 80 20 25 31 30 30 30 30 29 3c 3e 30 20 80 20 72 |. %10000)<>0 . r|
00006130 65 6d 6f 74 65 74 61 67 25 3e 30 20 8c 0d 03 05 |emotetag%>0 ....|
00006140 11 e7 69 6e 70 6c 61 63 65 25 3d 30 20 8c 0d 03 |..inplace%=0 ...|
00006150 06 45 f4 20 79 65 73 2c 20 6e 6f 77 20 6f 66 66 |.E. yes, now off|
00006160 20 73 6f 20 73 65 6e 64 20 28 74 65 6d 70 6f 72 | so send (tempor|
00006170 61 72 79 29 20 75 6e 68 6f 6f 6b 20 61 6e 64 20 |ary) unhook and |
00006180 6f 70 65 6e 20 72 65 6d 6f 74 65 20 77 69 6e 64 |open remote wind|
00006190 6f 77 2e 0d 03 07 3d 74 73 6b 68 25 3d 6c 6f 63 |ow....=tskh%=loc|
000061a0 61 6c 74 61 73 6b 25 3a 6d 73 30 25 3d 30 3a 6d |altask%:ms0%=0:m|
000061b0 73 31 25 3d 72 65 6d 6f 74 65 74 61 67 25 3a f2 |s1%=remotetag%:.|
000061c0 70 63 61 28 4d 73 67 5f 55 6e 68 6f 6f 6b 25 29 |pca(Msg_Unhook%)|
000061d0 0d 03 08 11 f2 70 72 69 6d 65 5f 72 65 6d 6f 74 |.....prime_remot|
000061e0 65 0d 03 09 5a e7 6d 61 69 6e 6f 25 20 8c 20 21 |e...Z.maino% . !|
000061f0 57 62 25 3d 6d 5f 72 65 6d 6f 74 65 25 3a c8 99 |Wb%=m_remote%:..|
00006200 57 67 77 73 74 25 2c 2c 57 62 25 3a f2 43 77 54 |Wgwst%,,Wb%:.CwT|
00006210 28 6d 5f 72 65 6d 6f 74 65 25 29 3a 78 25 3d 57 |(m_remote%):x%=W|
00006220 62 25 21 34 3a 79 25 3d 57 62 25 21 38 20 8b 20 |b%!4:y%=Wb%!8 . |
00006230 78 25 3d 2d 31 3a 79 25 3d 2d 31 0d 03 0a 1b f2 |x%=-1:y%=-1.....|
00006240 4f 77 28 6d 5f 72 65 6d 6f 74 65 25 2c 78 25 2c |Ow(m_remote%,x%,|
00006250 79 25 2c 2d 31 29 0d 03 0b 1b f2 4f 77 28 6d 5f |y%,-1).....Ow(m_|
00006260 72 65 6d 6f 74 65 25 2c 2d 31 2c 2d 31 2c 2d 31 |remote%,-1,-1,-1|
00006270 29 0d 03 0c 18 f2 72 65 64 72 61 77 69 74 28 6d |).....redrawit(m|
00006280 5f 72 65 6d 6f 74 65 25 29 0d 03 0d 05 cc 0d 03 |_remote%).......|
00006290 0e 48 f4 20 79 65 73 2c 20 61 6e 64 20 6e 6f 77 |.H. yes, and now|
000062a0 20 74 75 72 6e 65 64 20 6f 6e 20 61 67 61 69 6e | turned on again|
000062b0 20 73 6f 20 63 6c 6f 73 65 20 6f 75 72 20 77 69 | so close our wi|
000062c0 6e 64 6f 77 20 61 6e 64 20 73 65 6e 64 20 4d 73 |ndow and send Ms|
000062d0 67 5f 48 6f 6f 6b 0d 03 0f 4e f2 43 77 54 28 6d |g_Hook...N.CwT(m|
000062e0 5f 72 65 6d 6f 74 65 25 29 3a 74 73 6b 68 25 3d |_remote%):tskh%=|
000062f0 72 65 6d 6f 74 65 74 61 73 6b 25 3a f2 70 63 61 |remotetask%:.pca|
00006300 28 4d 73 67 5f 48 6f 6f 6b 25 29 3a f2 4f 77 28 |(Msg_Hook%):.Ow(|
00006310 77 5f 72 65 6d 6f 74 65 74 25 2c 2d 31 2c 2d 31 |w_remotet%,-1,-1|
00006320 2c 2d 31 29 0d 03 10 05 cd 0d 03 11 05 cd 0d 03 |,-1)............|
00006330 12 04 0d 03 13 05 cb 0d 03 14 05 e1 0d 03 15 04 |................|
00006340 0d 03 16 11 dd f2 72 65 6d 6f 74 65 54 5f 77 69 |......remoteT_wi|
00006350 6e 0d 03 17 0d c8 8e 20 49 63 6e 25 20 ca 0d 03 |n...... Icn% ...|
00006360 18 49 f4 20 21 21 21 50 43 41 21 21 21 20 55 73 |.I. !!!PCA!!! Us|
00006370 65 72 20 68 61 73 20 63 6c 69 63 6b 65 64 20 63 |er has clicked c|
00006380 6c 6f 73 65 20 69 63 6f 6e 20 69 6e 20 72 65 6d |lose icon in rem|
00006390 6f 74 65 20 74 6f 6f 6c 62 61 72 20 2d 20 77 65 |ote toolbar - we|
000063a0 20 75 6e 68 6f 6f 6b 0d 03 19 6f c9 20 30 3a 74 | unhook...o. 0:t|
000063b0 73 6b 68 25 3d 72 65 6d 6f 74 65 74 61 73 6b 25 |skh%=remotetask%|
000063c0 3a 6d 73 30 25 3d 31 3a 6d 73 31 25 3d 72 65 6d |:ms0%=1:ms1%=rem|
000063d0 6f 74 65 74 61 67 25 3a f2 70 63 61 28 4d 73 67 |otetag%:.pca(Msg|
000063e0 5f 55 6e 68 6f 6f 6b 25 29 3a 72 65 6d 6f 74 65 |_Unhook%):remote|
000063f0 74 61 67 25 3d 2d 31 3a f2 43 77 28 6d 5f 72 65 |tag%=-1:.Cw(m_re|
00006400 6d 6f 74 65 25 29 3a f2 43 77 28 77 5f 72 65 6d |mote%):.Cw(w_rem|
00006410 6f 74 65 74 25 29 0d 03 1a 46 c9 20 31 3a 70 70 |otet%)...F. 1:pp|
00006420 69 63 6b 25 3d a4 70 69 63 6b 65 72 28 22 50 61 |ick%=.picker("Pa|
00006430 69 6e 74 20 63 6f 6c 6f 75 72 22 2c 70 63 6f 6c |int colour",pcol|
00006440 25 2c 6d 6f 78 25 2d 31 32 38 2c 6d 6f 79 25 2b |%,mox%-128,moy%+|
00006450 31 32 38 2c 25 31 2c 25 31 30 30 29 0d 03 1b 05 |128,%1,%100)....|
00006460 cb 0d 03 1c 05 e1 0d 03 1d 04 0d 03 1e 10 dd f2 |................|
00006470 6c 6f 63 61 6c 54 5f 77 69 6e 0d 03 1f 0d c8 8e |localT_win......|
00006480 20 49 63 6e 25 20 ca 0d 03 20 0e c9 20 30 3a f4 | Icn% ... .. 0:.|
00006490 20 69 6e 66 6f 0d 03 21 0f c9 20 31 3a f4 20 75 | info..!.. 1:. u|
000064a0 74 69 6c 73 0d 03 22 0e f2 70 63 61 73 70 72 69 |tils.."..pcaspri|
000064b0 74 65 0d 03 23 0f c9 20 32 3a f4 20 63 6c 6f 73 |te..#.. 2:. clos|
000064c0 65 0d 03 24 0f f4 20 21 21 21 50 43 41 21 21 21 |e..$.. !!!PCA!!!|
000064d0 0d 03 25 2f e7 6c 6f 63 61 6c 74 61 67 25 3e 30 |..%/.localtag%>0|
000064e0 20 f2 70 63 61 28 4d 73 67 5f 44 65 73 65 6c 25 | .pca(Msg_Desel%|
000064f0 29 3a f2 43 77 28 6d 5f 6c 6f 63 61 6c 25 29 0d |):.Cw(m_local%).|
00006500 03 26 05 cb 0d 03 27 05 e1 0d 03 28 04 0d 03 29 |.&....'....(...)|
00006510 4d dd f2 63 6c 69 63 6b 3a 74 42 74 25 3d 57 62 |M..click:tBt%=Wb|
00006520 25 21 38 3a 42 74 25 3d 74 42 74 25 3a 6d 6f 78 |%!8:Bt%=tBt%:mox|
00006530 25 3d 57 62 25 21 30 3a 6d 6f 79 25 3d 57 62 25 |%=Wb%!0:moy%=Wb%|
00006540 21 34 3a 49 63 6e 25 3d 57 62 25 21 31 36 3a 57 |!4:Icn%=Wb%!16:W|
00006550 69 6e 25 3d 57 62 25 21 31 32 0d 03 2a 0d c8 8e |in%=Wb%!12..*...|
00006560 20 57 69 6e 25 20 ca 0d 03 2b 1b c9 20 6d 5f 72 | Win% ...+.. m_r|
00006570 65 6d 6f 74 65 25 3a f2 72 65 6d 6f 74 65 5f 77 |emote%:.remote_w|
00006580 69 6e 0d 03 2c 19 c9 20 6d 5f 6c 6f 63 61 6c 25 |in..,.. m_local%|
00006590 3a f2 6c 6f 63 61 6c 5f 77 69 6e 0d 03 2d 15 c9 |:.local_win..-..|
000065a0 20 70 63 61 5f 77 25 3a f2 70 63 61 5f 77 69 6e | pca_w%:.pca_win|
000065b0 0d 03 2e 19 c9 20 77 5f 70 72 65 66 73 25 3a f2 |..... w_prefs%:.|
000065c0 70 72 65 66 73 5f 77 69 6e 0d 03 2f 29 c9 20 77 |prefs_win../). w|
000065d0 5f 72 65 70 6f 72 74 25 3a e7 20 49 63 6e 25 3d |_report%:. Icn%=|
000065e0 30 20 8c 20 f2 43 77 28 77 5f 72 65 70 6f 72 74 |0 . .Cw(w_report|
000065f0 25 29 0d 03 30 1d c9 20 77 5f 72 65 6d 6f 74 65 |%)..0.. w_remote|
00006600 74 25 3a f2 72 65 6d 6f 74 65 54 5f 77 69 6e 0d |t%:.remoteT_win.|
00006610 03 31 1b c9 20 77 5f 6c 6f 63 61 6c 74 25 3a f2 |.1.. w_localt%:.|
00006620 6c 6f 63 61 6c 54 5f 77 69 6e 0d 03 32 08 c9 20 |localT_win..2.. |
00006630 2d 32 0d 03 33 37 e7 20 49 63 6e 25 3d 69 63 6e |-2..37. Icn%=icn|
00006640 62 68 25 20 80 20 42 74 25 3d 32 20 8c 20 f2 6d |bh% . Bt%=2 . .m|
00006650 65 6e 75 28 6d 5f 69 62 61 72 25 2c 6d 6f 78 25 |enu(m_ibar%,mox%|
00006660 2d 31 34 34 2c 32 30 34 29 0d 03 34 1b e7 20 49 |-144,204)..4.. I|
00006670 63 6e 25 3d 69 63 6e 62 68 25 20 80 20 42 74 25 |cn%=icnbh% . Bt%|
00006680 3d 34 20 8c 0d 03 35 21 e7 72 65 6d 6f 74 65 74 |=4 ...5!.remotet|
00006690 61 67 25 3e 30 20 84 20 6c 6f 63 61 6c 74 61 67 |ag%>0 . localtag|
000066a0 25 3e 30 20 8c 0d 03 36 21 e7 20 72 65 6d 6f 74 |%>0 ...6!. remot|
000066b0 65 74 61 67 25 3e 30 20 80 20 ac 20 69 6e 70 6c |etag%>0 . . inpl|
000066c0 61 63 65 25 20 8c 0d 03 37 3f 45 58 25 3d 30 3a |ace% ...7?EX%=0:|
000066d0 f2 70 72 69 6d 65 5f 72 65 6d 6f 74 65 3a e7 20 |.prime_remote:. |
000066e0 ac 20 45 58 25 20 f2 4f 77 28 6d 5f 72 65 6d 6f |. EX% .Ow(m_remo|
000066f0 74 65 25 2c 2d 31 2c 2d 31 2c 2d 31 29 20 8b 20 |te%,-1,-1,-1) . |
00006700 45 58 25 3d 30 0d 03 38 05 cc 0d 03 39 49 e7 20 |EX%=0..8....9I. |
00006710 72 65 6d 6f 74 65 74 61 73 6b 25 3c 3e 30 20 80 |remotetask%<>0 .|
00006720 20 69 6e 70 6c 61 63 65 25 20 80 20 72 65 6d 6f | inplace% . remo|
00006730 74 65 74 61 67 25 3e 30 20 8c 20 f2 4f 77 28 77 |tetag%>0 . .Ow(w|
00006740 5f 72 65 6d 6f 74 65 74 25 2c 2d 31 2c 2d 31 2c |_remotet%,-1,-1,|
00006750 2d 31 29 0d 03 3a 05 cd 0d 03 3b 12 e7 6c 6f 63 |-1)..:....;..loc|
00006760 61 6c 74 61 67 25 3e 30 20 8c 0d 03 3c 2f f2 70 |altag%>0 ...</.p|
00006770 72 69 6d 65 5f 6c 6f 63 61 6c 28 6c 6f 63 61 6c |rime_local(local|
00006780 24 29 3a f2 4f 77 28 6d 5f 6c 6f 63 61 6c 25 2c |$):.Ow(m_local%,|
00006790 2d 31 2c 2d 31 2c 2d 31 29 0d 03 3d 05 cd 0d 03 |-1,-1,-1)..=....|
000067a0 3e 05 cc 0d 03 3f 71 f2 72 65 70 65 72 72 28 22 |>....?q.reperr("|
000067b0 53 70 61 69 6e 74 20 68 61 73 20 6e 6f 74 68 69 |Spaint has nothi|
000067c0 6e 67 20 74 6f 20 77 6f 72 6b 20 6f 6e 20 61 74 |ng to work on at|
000067d0 20 74 68 65 20 6d 6f 6d 65 6e 74 2e 20 45 69 74 | the moment. Eit|
000067e0 68 65 72 20 6c 69 6e 6b 20 61 6e 20 69 6d 61 67 |her link an imag|
000067f0 65 20 69 6e 20 6f 72 20 64 72 61 67 20 61 6e 20 |e in or drag an |
00006800 69 6d 61 67 65 20 74 6f 20 74 68 65 20 69 63 6f |image to the ico|
00006810 6e 2e 22 29 0d 03 40 05 cd 0d 03 41 05 cd 0d 03 |n.")..@....A....|
00006820 42 05 cb 0d 03 43 05 e1 0d 03 44 04 0d 03 45 04 |B....C....D...E.|
00006830 0d 03 46 67 f4 20 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |..Fg. **********|
00006840 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************|
*
00006890 2a 2a 2a 2a 2a 2a 2a 0d 03 47 30 f4 20 62 69 74 |*******..G0. bit|
000068a0 73 27 6e 20 70 69 65 63 65 73 20 6f 66 20 6c 69 |s'n pieces of li|
000068b0 74 74 6c 65 20 69 6e 74 65 72 65 73 74 20 66 6f |ttle interest fo|
000068c0 6c 6c 6f 77 2e 2e 2e 0d 03 48 04 0d 03 49 57 dd |llow.....H...IW.|
000068d0 a4 67 65 74 70 61 74 68 28 73 24 29 3a 6e 25 3d |.getpath(s$):n%=|
000068e0 a9 28 73 24 29 3a f5 3a 63 68 24 3d c1 73 24 2c |.(s$):.:ch$=.s$,|
000068f0 6e 25 2c 31 29 3a 6e 25 2d 3d 31 3a fd 28 6e 25 |n%,1):n%-=1:.(n%|
00006900 3c 3d 30 20 84 20 63 68 24 3d 22 2e 22 20 84 20 |<=0 . ch$="." . |
00006910 63 68 24 3d 22 3a 22 20 84 20 63 68 24 3d bd 31 |ch$=":" . ch$=.1|
00006920 33 29 0d 03 4a 16 e7 20 6e 25 3e 30 20 8c 3d c0 |3)..J.. n%>0 .=.|
00006930 73 24 2c 6e 25 2b 31 29 0d 03 4b 07 3d 73 24 0d |s$,n%+1)..K.=s$.|
00006940 03 4c 04 0d 03 4d 54 dd a4 76 61 72 70 72 65 73 |.L...MT..varpres|
00006950 65 6e 74 28 73 24 29 3a c8 99 22 58 4f 53 5f 52 |ent(s$):.."XOS_R|
00006960 65 61 64 56 61 72 56 61 6c 22 2c 73 24 2c 67 62 |eadVarVal",s$,gb|
00006970 6c 6b 25 2c 28 31 3c 3c 33 31 29 2c 30 2c 33 20 |lk%,(1<<31),0,3 |
00006980 b8 20 2c 2c 65 78 69 73 74 73 25 3a 3d 65 78 69 |. ,,exists%:=exi|
00006990 73 74 73 25 3c 3e 30 0d 03 4e 04 0d 03 4f 53 dd |sts%<>0..N...OS.|
000069a0 a4 67 6c 73 28 73 24 29 3a 6e 25 3d a9 28 73 24 |.gls(s$):n%=.(s$|
000069b0 29 3a f5 3a 63 68 24 3d c1 73 24 2c 6e 25 2c 31 |):.:ch$=.s$,n%,1|
000069c0 29 3a 6e 25 2d 3d 31 3a fd 28 6e 25 3c 3d 30 20 |):n%-=1:.(n%<=0 |
000069d0 84 20 63 68 24 3d 22 2e 22 20 84 20 63 68 24 3d |. ch$="." . ch$=|
000069e0 22 3a 22 20 84 20 63 68 24 3d bd 31 33 29 0d 03 |":" . ch$=.13)..|
000069f0 50 1d e7 20 6e 25 3e 30 20 8c 20 3d c2 73 24 2c |P.. n%>0 . =.s$,|
00006a00 a9 28 73 24 29 2d 6e 25 2d 31 29 0d 03 51 0c 3d |.(s$)-n%-1)..Q.=|
00006a10 c2 73 24 2c 31 30 29 0d 03 52 04 0d 03 53 10 dd |.s$,10)..R...S..|
00006a20 f2 72 5f 66 69 28 6e 6d 65 24 29 0d 03 54 34 c8 |.r_fi(nme$)..T4.|
00006a30 99 20 22 58 4f 53 5f 46 69 6c 65 22 2c 35 2c 6e |. "XOS_File",5,n|
00006a40 6d 65 24 20 b8 20 74 68 65 72 65 25 2c 42 2c 66 |me$ . there%,B,f|
00006a50 74 25 2c 44 2c 6c 65 6e 67 74 68 25 20 3b 46 0d |t%,D,length% ;F.|
00006a60 03 55 16 66 74 25 3d 28 66 74 25 3e 3e 38 29 20 |.U.ft%=(ft%>>8) |
00006a70 80 26 46 46 46 0d 03 56 1c e7 20 28 46 20 80 20 |.&FFF..V.. (F . |
00006a80 31 29 3c 3e 30 20 8c 74 68 65 72 65 25 3d 32 35 |1)<>0 .there%=25|
00006a90 35 0d 03 57 85 e7 66 74 25 3d 26 46 43 41 20 80 |5..W..ft%=&FCA .|
00006aa0 20 74 68 65 72 65 25 3d 31 20 8c 20 66 66 25 3d | there%=1 . ff%=|
00006ab0 8e 28 6e 6d 65 24 29 3a c8 99 22 4f 53 5f 47 42 |.(nme$):.."OS_GB|
00006ac0 50 42 22 2c 34 2c 66 66 25 2c 67 62 6c 6b 25 2c |PB",4,ff%,gblk%,|
00006ad0 33 32 3a d9 23 66 66 25 3a 66 66 25 3d 30 3a 6f |32:.#ff%:ff%=0:o|
00006ae0 72 6c 65 6e 25 3d 67 62 6c 6b 25 21 34 3a 74 79 |rlen%=gblk%!4:ty|
00006af0 70 65 25 3d 21 28 67 62 6c 6b 25 2b 38 29 3a 74 |pe%=!(gblk%+8):t|
00006b00 79 70 65 25 3d 28 74 79 70 65 25 3e 3e 38 29 20 |ype%=(type%>>8) |
00006b10 80 20 26 46 46 46 0d 03 58 14 f4 20 49 46 66 74 |. &FFF..X.. IFft|
00006b20 25 3d 70 73 68 6f 70 74 79 25 0d 03 59 72 e7 20 |%=pshopty%..Yr. |
00006b30 74 68 65 72 65 25 3d 31 20 8c 20 66 66 25 3d 8e |there%=1 . ff%=.|
00006b40 28 6e 6d 65 24 29 3a c8 99 22 4f 53 5f 47 42 50 |(nme$):.."OS_GBP|
00006b50 42 22 2c 34 2c 66 66 25 2c 67 62 6c 6b 25 2c 33 |B",4,ff%,gblk%,3|
00006b60 32 3a d9 23 66 66 25 3a 66 66 25 3d 30 3a e7 20 |2:.#ff%:ff%=0:. |
00006b70 21 67 62 6c 6b 25 3d 26 35 33 35 30 34 32 33 38 |!gblk%=&53504238|
00006b80 20 8c 20 66 74 25 3d 26 35 32 34 46 34 32 3a 74 | . ft%=&524F42:t|
00006b90 79 70 65 25 3d 26 35 32 34 46 34 32 0d 03 5a 05 |ype%=&524F42..Z.|
00006ba0 e1 0d 03 5b 04 0d 03 5c 2f dd f2 66 72 63 5f 72 |...[...\/..frc_r|
00006bb0 65 64 72 61 77 3a c8 99 20 57 66 72 63 52 25 2c |edraw:.. WfrcR%,|
00006bc0 2d 31 2c 30 2c 30 2c 26 46 46 46 46 2c 26 46 46 |-1,0,0,&FFFF,&FF|
00006bd0 46 46 3a e1 0d 03 5d 04 0d 03 5e 4a dd f2 43 77 |FF:...]...^J..Cw|
00006be0 54 28 68 61 6e 64 25 29 3a f4 20 28 54 65 6d 70 |T(hand%):. (Temp|
00006bf0 6f 72 61 72 79 29 20 63 6c 6f 73 65 20 77 69 6e |orary) close win|
00006c00 64 6f 77 20 2d 20 75 73 65 64 20 74 6f 20 61 6c |dow - used to al|
00006c10 6c 6f 77 20 77 69 6e 64 6f 77 20 72 65 73 69 7a |low window resiz|
00006c20 65 2e 0d 03 5f 0f e7 68 61 6e 64 25 3c 3d 30 20 |e..._..hand%<=0 |
00006c30 e1 0d 03 60 29 21 57 62 25 3d 68 61 6e 64 25 3a |...`)!Wb%=hand%:|
00006c40 c8 99 22 58 57 69 6d 70 5f 43 6c 6f 73 65 57 69 |.."XWimp_CloseWi|
00006c50 6e 64 6f 77 22 2c 2c 57 62 25 0d 03 61 4c e7 20 |ndow",,Wb%..aL. |
00006c60 68 61 6e 64 25 3d 6d 5f 72 65 6d 6f 74 65 25 20 |hand%=m_remote% |
00006c70 8c 20 6d 61 69 6e 6f 25 3d 30 3a 21 57 62 25 3d |. maino%=0:!Wb%=|
00006c80 77 5f 72 65 6d 6f 74 65 74 25 3a c8 99 20 22 58 |w_remotet%:.. "X|
00006c90 57 69 6d 70 5f 43 6c 6f 73 65 57 69 6e 64 6f 77 |Wimp_CloseWindow|
00006ca0 22 2c 2c 57 62 25 0d 03 62 41 e7 20 68 61 6e 64 |",,Wb%..bA. hand|
00006cb0 25 3d 6d 5f 6c 6f 63 61 6c 25 20 8c 20 21 57 62 |%=m_local% . !Wb|
00006cc0 25 3d 77 5f 6c 6f 63 61 6c 74 25 3a c8 99 20 22 |%=w_localt%:.. "|
00006cd0 58 57 69 6d 70 5f 43 6c 6f 73 65 57 69 6e 64 6f |XWimp_CloseWindo|
00006ce0 77 22 2c 2c 57 62 25 0d 03 63 05 e1 0d 03 64 04 |w",,Wb%..c....d.|
00006cf0 0d 03 65 0f dd f2 43 77 28 68 61 6e 64 25 29 0d |..e...Cw(hand%).|
00006d00 03 66 0f e7 68 61 6e 64 25 3c 3d 30 20 e1 0d 03 |.f..hand%<=0 ...|
00006d10 67 29 21 57 62 25 3d 68 61 6e 64 25 3a c8 99 22 |g)!Wb%=hand%:.."|
00006d20 58 57 69 6d 70 5f 43 6c 6f 73 65 57 69 6e 64 6f |XWimp_CloseWindo|
00006d30 77 22 2c 2c 57 62 25 0d 03 68 4c e7 20 68 61 6e |w",,Wb%..hL. han|
00006d40 64 25 3d 6d 5f 72 65 6d 6f 74 65 25 20 8c 20 6d |d%=m_remote% . m|
00006d50 61 69 6e 6f 25 3d 30 3a 21 57 62 25 3d 77 5f 72 |aino%=0:!Wb%=w_r|
00006d60 65 6d 6f 74 65 74 25 3a c8 99 20 22 58 57 69 6d |emotet%:.. "XWim|
00006d70 70 5f 43 6c 6f 73 65 57 69 6e 64 6f 77 22 2c 2c |p_CloseWindow",,|
00006d80 57 62 25 0d 03 69 41 e7 20 68 61 6e 64 25 3d 6d |Wb%..iA. hand%=m|
00006d90 5f 6c 6f 63 61 6c 25 20 8c 20 21 57 62 25 3d 77 |_local% . !Wb%=w|
00006da0 5f 6c 6f 63 61 6c 74 25 3a c8 99 20 22 58 57 69 |_localt%:.. "XWi|
00006db0 6d 70 5f 43 6c 6f 73 65 57 69 6e 64 6f 77 22 2c |mp_CloseWindow",|
00006dc0 2c 57 62 25 0d 03 6a 5b f4 20 21 21 21 50 43 41 |,Wb%..j[. !!!PCA|
00006dd0 21 21 21 20 63 6c 6f 73 69 6e 67 20 6c 6f 63 61 |!!! closing loca|
00006de0 6c 20 77 69 6e 64 6f 77 20 2d 20 74 65 6c 6c 20 |l window - tell |
00006df0 74 68 65 20 72 65 6d 6f 74 65 20 74 6f 20 63 6c |the remote to cl|
00006e00 6f 73 65 20 69 74 73 20 74 6f 6f 6c 62 61 72 20 |ose its toolbar |
00006e10 77 69 74 68 20 61 6e 20 75 6e 68 6f 6f 6b 2e 0d |with an unhook..|
00006e20 03 6b 4f e7 68 61 6e 64 25 3d 6d 5f 6c 6f 63 61 |.kO.hand%=m_loca|
00006e30 6c 25 20 8c 20 74 73 6b 68 25 3d 72 65 6d 6f 74 |l% . tskh%=remot|
00006e40 65 74 61 73 6b 25 3a 6d 73 30 25 3d 31 3a 6d 73 |etask%:ms0%=1:ms|
00006e50 31 25 3d 6c 6f 63 61 6c 74 61 67 25 3a f2 70 63 |1%=localtag%:.pc|
00006e60 61 28 4d 73 67 5f 55 6e 68 6f 6f 6b 25 29 0d 03 |a(Msg_Unhook%)..|
00006e70 6c 04 0d 03 6d 37 f4 20 21 21 21 50 43 41 21 21 |l...m7. !!!PCA!!|
00006e80 21 20 63 6c 6f 73 69 6e 67 20 72 65 6d 6f 74 65 |! closing remote|
00006e90 20 77 69 6e 64 6f 77 20 2d 20 74 65 6c 6c 20 74 | window - tell t|
00006ea0 68 65 20 6c 6f 63 61 6c 2e 0d 03 6e 5e e7 68 61 |he local...n^.ha|
00006eb0 6e 64 25 3d 6d 5f 72 65 6d 6f 74 65 25 20 8c 20 |nd%=m_remote% . |
00006ec0 74 73 6b 68 25 3d 6c 6f 63 61 6c 74 61 73 6b 25 |tskh%=localtask%|
00006ed0 3a 6d 73 30 25 3d 31 3a 6d 73 31 25 3d 72 65 6d |:ms0%=1:ms1%=rem|
00006ee0 6f 74 65 74 61 67 25 3a f2 70 63 61 28 4d 73 67 |otetag%:.pca(Msg|
00006ef0 5f 55 6e 68 6f 6f 6b 25 29 3a 72 65 6d 6f 74 65 |_Unhook%):remote|
00006f00 74 61 67 25 3d 2d 31 0d 03 6f 04 0d 03 70 05 e1 |tag%=-1..o...p..|
00006f10 0d 03 71 04 0d 03 72 30 dd a4 43 6f 6e 66 69 72 |..q...r0..Confir|
00006f20 6d 63 68 61 6e 67 65 28 73 74 72 31 24 29 3a 21 |mchange(str1$):!|
00006f30 47 42 25 3d 31 3a 24 28 47 42 25 2b 34 29 3d 73 |GB%=1:$(GB%+4)=s|
00006f40 74 72 31 24 0d 03 73 32 c8 99 20 22 57 69 6d 70 |tr1$..s2.. "Wimp|
00006f50 5f 52 65 70 6f 72 74 45 72 72 6f 72 22 2c 47 42 |_ReportError",GB|
00006f60 25 2c 31 39 2c 22 53 50 61 69 6e 74 22 20 b8 20 |%,19,"SPaint" . |
00006f70 2c 72 65 73 70 25 0d 03 74 0e 3d 28 72 65 73 70 |,resp%..t.=(resp|
00006f80 25 3d 31 29 0d 03 75 04 0d 03 76 14 dd f2 6d 69 |%=1)..u...v...mi|
00006f90 6e 69 5f 70 6f 6c 6c 28 73 35 25 29 0d 03 77 0f |ni_poll(s5%)..w.|
00006fa0 e3 73 32 25 3d 30 20 b8 73 35 25 0d 03 78 18 c8 |.s2%=0 .s5%..x..|
00006fb0 99 26 34 30 30 43 37 2c 30 2c 57 62 25 20 b8 20 |.&400C7,0,Wb% . |
00006fc0 52 52 25 0d 03 79 0c c8 8e 20 52 52 25 20 ca 0d |RR%..y... RR% ..|
00006fd0 03 7a 11 c9 31 3a f2 72 65 64 72 61 77 28 30 29 |.z..1:.redraw(0)|
00006fe0 0d 03 7b 06 c9 32 0d 03 7c 0f c8 99 57 6f 77 25 |..{..2..|...Wow%|
00006ff0 2c 2c 57 62 25 0d 03 7d 06 c9 33 0d 03 7e 0d f2 |,,Wb%..}..3..~..|
00007000 43 77 28 21 57 62 25 29 0d 03 7f 06 c9 34 0d 03 |Cw(!Wb%).....4..|
00007010 80 06 c9 35 0d 03 81 12 c9 36 3a f2 6d 69 6e 69 |...5.....6:.mini|
00007020 5f 63 6c 69 63 6b 0d 03 82 07 c9 37 3a 0d 03 83 |_click.....7:...|
00007030 13 c9 38 3a f2 6b 65 79 5f 70 72 65 73 73 65 64 |..8:.key_pressed|
00007040 0d 03 84 21 c9 31 37 2c 31 38 2c 31 39 3a 52 25 |...!.17,18,19:R%|
00007050 3d 52 52 25 3a f2 72 65 63 69 65 76 65 5f 6d 73 |=RR%:.recieve_ms|
00007060 67 0d 03 85 05 cb 0d 03 86 05 ed 0d 03 87 05 e1 |g...............|
00007070 0d 03 88 04 0d 03 89 10 dd f2 6d 69 6e 69 5f 63 |..........mini_c|
00007080 6c 69 63 6b 0d 03 8a 05 e1 0d 03 8b 04 0d 03 8c |lick............|
00007090 0f dd f2 6c 6f 63 61 6c 5f 77 69 6e 0d 03 8d 32 |...local_win...2|
000070a0 e7 49 63 6e 25 3e 3d 30 20 8c 20 f2 67 77 69 28 |.Icn%>=0 . .gwi(|
000070b0 6d 5f 6c 6f 63 61 6c 25 29 3a f2 72 65 6d 6f 74 |m_local%):.remot|
000070c0 65 6d 65 73 73 61 67 65 28 52 25 29 3a e1 0d 03 |emessage(R%):...|
000070d0 8e 1a e7 42 74 25 3d 34 20 80 20 28 a6 2d 31 20 |...Bt%=4 . (.-1 |
000070e0 80 20 a6 2d 32 29 20 8c 0d 03 8f 0e f2 70 63 61 |. .-2) ......pca|
000070f0 73 70 72 69 74 65 0d 03 90 05 cd 0d 03 91 31 e7 |sprite........1.|
00007100 42 74 25 3d 32 20 8c 20 f2 67 70 69 3a f2 6d 65 |Bt%=2 . .gpi:.me|
00007110 6e 75 28 6d 5f 69 62 61 72 25 2c 6d 6f 78 25 2d |nu(m_ibar%,mox%-|
00007120 31 32 38 2c 6d 6f 79 25 2b 34 38 29 0d 03 92 05 |128,moy%+48)....|
00007130 e1 0d 03 93 04 0d 03 94 1b dd a4 73 70 72 69 74 |...........sprit|
00007140 65 70 31 28 76 25 29 3a 3d 76 25 2b 76 25 21 38 |ep1(v%):=v%+v%!8|
00007150 0d 03 95 5a dd f2 73 77 74 6f 73 6d 28 76 31 25 |...Z..swtosm(v1%|
00007160 2c 76 32 25 29 3a e7 20 76 31 25 3c 26 38 30 30 |,v2%):. v1%<&800|
00007170 30 20 84 20 76 32 25 3c 26 38 30 30 30 20 8c 20 |0 . v2%<&8000 . |
00007180 85 20 26 35 32 34 46 34 32 2c 22 52 65 64 69 72 |. &524F42,"Redir|
00007190 65 63 74 69 6f 6e 20 74 6f 20 69 6e 76 61 6c 69 |ection to invali|
000071a0 64 20 73 70 72 69 74 65 2e 22 0d 03 96 4a 21 73 |d sprite."...J!s|
000071b0 61 76 65 61 25 3d 30 3a c8 99 53 70 6f 70 25 2c |avea%=0:..Spop%,|
000071c0 35 37 33 2c 76 31 25 2c 76 32 25 2c 73 61 76 65 |573,v1%,v2%,save|
000071d0 61 25 20 b8 20 73 77 30 25 2c 73 77 31 25 2c 73 |a% . sw0%,sw1%,s|
000071e0 77 32 25 2c 73 77 33 25 3a 73 77 69 74 63 68 65 |w2%,sw3%:switche|
000071f0 64 25 3d b9 0d 03 97 05 e1 0d 03 98 59 dd f2 73 |d%=.........Y..s|
00007200 77 74 6f 73 28 76 31 25 2c 76 32 25 29 3a e7 20 |wtos(v1%,v2%):. |
00007210 76 31 25 3c 26 38 30 30 30 20 84 20 76 32 25 3c |v1%<&8000 . v2%<|
00007220 26 38 30 30 30 20 8c 20 85 20 26 35 32 34 46 34 |&8000 . . &524F4|
00007230 32 2c 22 52 65 64 69 72 65 63 74 69 6f 6e 20 74 |2,"Redirection t|
00007240 6f 20 69 6e 76 61 6c 69 64 20 73 70 72 69 74 65 |o invalid sprite|
00007250 2e 22 0d 03 99 4a 21 73 61 76 65 61 25 3d 30 3a |."...J!savea%=0:|
00007260 c8 99 53 70 6f 70 25 2c 35 37 32 2c 76 31 25 2c |..Spop%,572,v1%,|
00007270 76 32 25 2c 73 61 76 65 61 25 20 b8 20 73 77 30 |v2%,savea% . sw0|
00007280 25 2c 73 77 31 25 2c 73 77 32 25 2c 73 77 33 25 |%,sw1%,sw2%,sw3%|
00007290 3a 73 77 69 74 63 68 65 64 25 3d b9 0d 03 9a 05 |:switched%=.....|
000072a0 e1 0d 03 9b 0e dd f2 73 77 74 6f 28 76 25 29 0d |.......swto(v%).|
000072b0 03 9c 4d 21 73 61 76 65 61 25 3d 30 3a c8 99 53 |..M!savea%=0:..S|
000072c0 70 6f 70 25 2c 35 37 32 2c 76 25 2c 76 25 2b 76 |pop%,572,v%,v%+v|
000072d0 25 21 38 2c 73 61 76 65 61 25 20 b8 20 73 77 30 |%!8,savea% . sw0|
000072e0 25 2c 73 77 31 25 2c 73 77 32 25 2c 73 77 33 25 |%,sw1%,sw2%,sw3%|
000072f0 3a 73 77 69 74 63 68 65 64 25 3d b9 0d 03 9d 05 |:switched%=.....|
00007300 e1 0d 03 9e 0b dd f2 73 77 62 61 6b 0d 03 9f 39 |.......swbak...9|
00007310 e7 20 73 77 69 74 63 68 65 64 25 20 8c 20 c8 99 |. switched% . ..|
00007320 53 70 6f 70 25 2c 73 77 30 25 2c 73 77 31 25 2c |Spop%,sw0%,sw1%,|
00007330 73 77 32 25 2c 73 77 33 25 3a 73 77 69 74 63 68 |sw2%,sw3%:switch|
00007340 65 64 25 3d 30 0d 03 a0 05 e1 0d 03 a1 04 0d 03 |ed%=0...........|
00007350 a2 20 dd a4 70 69 63 6b 65 72 28 73 24 2c 63 6f |. ..picker(s$,co|
00007360 6c 25 2c 78 25 2c 79 25 2c 66 2c 66 32 29 0d 03 |l%,x%,y%,f,f2)..|
00007370 a3 0b 24 67 62 25 3d 73 24 0d 03 a4 41 21 4d 67 |..$gb%=s$...A!Mg|
00007380 62 25 3d 66 32 3a e7 20 63 6f 6c 25 3d 2d 31 20 |b%=f2:. col%=-1 |
00007390 80 20 28 66 32 20 80 20 25 31 29 3c 3e 30 20 8c |. (f2 . %1)<>0 .|
000073a0 20 63 6f 6c 25 3d 26 46 46 46 46 46 46 30 30 3a | col%=&FFFFFF00:|
000073b0 21 4d 67 62 25 3d 25 31 31 31 0d 03 a5 59 4d 67 |!Mgb%=%111...YMg|
000073c0 62 25 21 34 3d 67 62 25 3a 4d 67 62 25 21 38 3d |b%!4=gb%:Mgb%!8=|
000073d0 78 25 3a 4d 67 62 25 21 31 32 3d 28 31 3c 3c 33 |x%:Mgb%!12=(1<<3|
000073e0 31 29 3a 4d 67 62 25 21 31 36 3d 28 31 3c 3c 33 |1):Mgb%!16=(1<<3|
000073f0 31 29 2d 31 3a 4d 67 62 25 21 32 30 3d 79 25 3a |1)-1:Mgb%!20=y%:|
00007400 4d 67 62 25 21 32 34 3d 30 3a 4d 67 62 25 21 32 |Mgb%!24=0:Mgb%!2|
00007410 38 3d 30 0d 03 a6 10 4d 67 62 25 21 33 32 3d 63 |8=0....Mgb%!32=c|
00007420 6f 6c 25 0d 03 a7 0d 4d 67 62 25 21 33 36 3d 30 |ol%....Mgb%!36=0|
00007430 0d 03 a8 33 c8 99 22 43 6f 6c 6f 75 72 50 69 63 |...3.."ColourPic|
00007440 6b 65 72 5f 4f 70 65 6e 44 69 61 6c 6f 67 75 65 |ker_OpenDialogue|
00007450 22 2c 66 2c 4d 67 62 25 20 b8 20 68 25 2c 6c 63 |",f,Mgb% . h%,lc|
00007460 70 77 25 0d 03 a9 07 3d 68 25 0d 03 aa 04 0d 03 |pw%....=h%......|
00007470 ab 14 dd f2 77 77 6f 72 64 28 f8 20 62 25 2c 76 |....wword(. b%,v|
00007480 25 29 0d 03 ac 12 21 62 25 3d 76 25 3a 62 25 2b |%)....!b%=v%:b%+|
00007490 3d 34 3a e1 0d 03 ad 16 dd f2 77 73 74 72 69 6e |=4:.......wstrin|
000074a0 67 28 f8 20 62 25 2c 73 24 29 0d 03 ae 1c 24 62 |g(. b%,s$)....$b|
000074b0 25 3d 73 24 3a 62 25 3d 62 25 2b 34 2b a9 28 73 |%=s$:b%=b%+4+.(s|
000074c0 24 29 80 20 ac 33 0d 03 af 05 e1 0d 03 b0 04 0d |$). .3..........|
000074d0 03 b1 0b dd f2 6e 75 64 67 65 0d 03 b2 20 e7 a6 |.....nudge... ..|
000074e0 2d 35 38 20 6d 6f 79 25 2b 3d 31 3a c8 97 20 b8 |-58 moy%+=1:.. .|
000074f0 20 6d 6f 78 25 2c 6d 6f 79 25 0d 03 b3 20 e7 a6 | mox%,moy%... ..|
00007500 2d 32 36 20 6d 6f 78 25 2d 3d 31 3a c8 97 20 b8 |-26 mox%-=1:.. .|
00007510 20 6d 6f 78 25 2c 6d 6f 79 25 0d 03 b4 21 e7 a6 | mox%,moy%...!..|
00007520 2d 31 32 32 20 6d 6f 78 25 2b 3d 31 3a c8 97 20 |-122 mox%+=1:.. |
00007530 b8 20 6d 6f 78 25 2c 6d 6f 79 25 0d 03 b5 20 e7 |. mox%,moy%... .|
00007540 a6 2d 34 32 20 6d 6f 79 25 2d 3d 31 3a c8 97 20 |.-42 moy%-=1:.. |
00007550 b8 20 6d 6f 78 25 2c 6d 6f 79 25 0d 03 b6 05 e1 |. mox%,moy%.....|
00007560 0d 03 b7 21 dd f2 67 70 69 3a c8 97 20 6d 6f 78 |...!..gpi:.. mox|
00007570 25 2c 6d 6f 79 25 2c 42 74 25 3a f2 6e 75 64 67 |%,moy%,Bt%:.nudg|
00007580 65 0d 03 b8 05 e1 0d 03 b9 04 0d 03 ba 0c dd f2 |e...............|
00007590 72 70 61 6e 65 73 0d 03 bb 28 21 67 62 25 3d 21 |rpanes...(!gb%=!|
000075a0 57 62 25 3a c8 99 20 57 67 77 73 74 25 2c 2c 67 |Wb%:.. Wgwst%,,g|
000075b0 62 25 3a 66 6c 67 25 3d 67 62 25 21 33 32 0d 03 |b%:flg%=gb%!32..|
000075c0 bc 0b c8 8e 20 68 25 20 ca 0d 03 bd 58 c9 20 6d |.... h% ....X. m|
000075d0 5f 6c 6f 63 61 6c 25 3a 21 67 62 6c 6b 25 3d 77 |_local%:!gblk%=w|
000075e0 5f 6c 6f 63 61 6c 74 25 3a 74 6f 6f 6c 79 25 3d |_localt%:tooly%=|
000075f0 67 62 25 21 38 2d 67 62 25 21 31 36 2b 31 39 32 |gb%!8-gb%!16+192|
00007600 3a 74 6f 6f 6c 79 79 25 3d 31 39 32 3a 74 6f 6f |:toolyy%=192:too|
00007610 6c 78 25 3d 36 34 3a 74 6f 6f 6c 78 78 25 3d 36 |lx%=64:toolxx%=6|
00007620 34 0d 03 be 4c c9 20 6d 5f 72 65 6d 6f 74 65 25 |4...L. m_remote%|
00007630 3a 21 67 62 6c 6b 25 3d 77 5f 72 65 6d 6f 74 65 |:!gblk%=w_remote|
00007640 74 25 3a 74 6f 6f 6c 79 25 3d 31 30 34 3a 74 6f |t%:tooly%=104:to|
00007650 6f 6c 79 79 25 3d 36 34 3a 74 6f 6f 6c 78 25 3d |olyy%=64:toolx%=|
00007660 30 3a 74 6f 6f 6c 78 78 25 3d 31 39 32 0d 03 bf |0:toolxx%=192...|
00007670 05 cb 0d 03 c0 13 67 62 6c 6b 25 21 32 38 3d 57 |......gblk%!28=W|
00007680 62 25 21 32 38 0d 03 c1 4a e7 20 28 66 6c 67 25 |b%!28...J. (flg%|
00007690 20 80 20 32 30 39 37 31 35 32 29 3d 30 20 84 20 | . 2097152)=0 . |
000076a0 28 66 6c 67 25 20 80 20 31 33 31 30 37 32 29 3c |(flg% . 131072)<|
000076b0 3e 30 20 80 20 57 62 25 21 32 38 3c 3e 2d 31 20 |>0 . Wb%!28<>-1 |
000076c0 8c 20 57 62 25 21 32 38 3d 21 67 62 6c 6b 25 0d |. Wb%!28=!gblk%.|
000076d0 03 c2 1b e7 20 28 66 6c 67 25 20 80 20 32 30 39 |.... (flg% . 209|
000076e0 37 31 35 32 29 3c 3e 30 20 8c 0d 03 c3 1e e7 20 |7152)<>0 ...... |
000076f0 57 62 25 21 32 38 3c 3e 2d 31 20 57 62 25 21 32 |Wb%!28<>-1 Wb%!2|
00007700 38 3d 21 67 62 6c 6b 25 0d 03 c4 20 c8 99 20 57 |8=!gblk%... .. W|
00007710 6f 77 25 2c 2c 57 62 25 3a 67 62 6c 6b 25 21 32 |ow%,,Wb%:gblk%!2|
00007720 38 3d 57 62 25 21 32 38 0d 03 c5 05 cd 0d 03 c6 |8=Wb%!28........|
00007730 62 67 62 6c 6b 25 21 38 3d 57 62 25 21 38 2d 74 |bgblk%!8=Wb%!8-t|
00007740 6f 6f 6c 79 25 3a e7 67 62 6c 6b 25 21 38 3c 30 |ooly%:.gblk%!8<0|
00007750 20 80 20 57 62 25 21 38 3e 30 20 8c 20 67 62 6c | . Wb%!8>0 . gbl|
00007760 6b 25 21 38 3d 30 20 8b 20 e7 20 57 62 25 21 38 |k%!8=0 . . Wb%!8|
00007770 3c 3d 30 20 80 20 67 62 6c 6b 25 21 38 3c 30 20 |<=0 . gblk%!8<0 |
00007780 8c 20 67 62 6c 6b 25 21 38 3d 57 62 25 21 38 0d |. gblk%!8=Wb%!8.|
00007790 03 c7 1c 67 62 6c 6b 25 21 31 36 3d 67 62 6c 6b |...gblk%!16=gblk|
000077a0 25 21 38 2b 74 6f 6f 6c 79 79 25 0d 03 c8 5f 67 |%!8+toolyy%..._g|
000077b0 62 6c 6b 25 21 34 3d 57 62 25 21 34 2d 74 6f 6f |blk%!4=Wb%!4-too|
000077c0 6c 78 25 3a e7 67 62 6c 6b 25 21 34 3c 30 20 80 |lx%:.gblk%!4<0 .|
000077d0 57 62 25 21 34 3e 30 20 8c 20 67 62 6c 6b 25 21 |Wb%!4>0 . gblk%!|
000077e0 34 3d 30 20 8b e7 57 62 25 21 34 3c 3d 30 20 80 |4=0 ..Wb%!4<=0 .|
000077f0 20 67 62 6c 6b 25 21 34 3c 30 20 8c 20 67 62 6c | gblk%!4<0 . gbl|
00007800 6b 25 21 34 3d 57 62 25 21 34 0d 03 c9 1e 67 62 |k%!4=Wb%!4....gb|
00007810 6c 6b 25 21 31 32 3d 67 62 6c 6b 25 21 34 2b 74 |lk%!12=gblk%!4+t|
00007820 6f 6f 6c 78 78 25 2d 32 0d 03 ca 19 67 62 6c 6b |oolxx%-2....gblk|
00007830 25 21 32 30 3d 30 3a 67 62 6c 6b 25 21 32 34 3d |%!20=0:gblk%!24=|
00007840 30 0d 03 cb 21 e7 20 21 67 62 6c 6b 25 3c 3e 68 |0...!. !gblk%<>h|
00007850 25 20 8c 20 c8 99 20 57 6f 77 25 2c 2c 67 62 6c |% . .. Wow%,,gbl|
00007860 6b 25 0d 03 cc 27 e7 20 28 66 6c 67 25 20 80 20 |k%...'. (flg% . |
00007870 32 30 39 37 31 35 32 29 3d 30 20 8c 20 c8 99 20 |2097152)=0 . .. |
00007880 57 6f 77 25 2c 2c 57 62 25 0d 03 cd 05 e1 0d 03 |Wow%,,Wb%.......|
00007890 ce 04 0d 03 cf 0a dd f2 70 6f 6c 6c 0d 03 d0 04 |........poll....|
000078a0 0d 03 d1 10 f2 69 6e 69 74 73 70 74 72 61 6e 73 |.....initsptrans|
000078b0 0d 03 d2 19 f5 3a c8 99 26 34 30 30 43 37 2c 31 |.....:..&400C7,1|
000078c0 2c 57 62 25 20 b8 20 52 25 0d 03 d3 0b c8 8e 20 |,Wb% . R%...... |
000078d0 52 25 20 ca 0d 03 d4 11 c9 31 3a f2 72 65 64 72 |R% ......1:.redr|
000078e0 61 77 28 30 29 0d 03 d5 0e c9 32 3a 68 25 3d 21 |aw(0).....2:h%=!|
000078f0 57 62 25 0d 03 d6 37 e7 68 25 3d 6d 5f 6c 6f 63 |Wb%...7.h%=m_loc|
00007900 61 6c 25 20 84 20 68 25 3d 6d 5f 72 65 6d 6f 74 |al% . h%=m_remot|
00007910 65 25 20 8c 20 f2 72 70 61 6e 65 73 20 8b 20 c8 |e% . .rpanes . .|
00007920 99 57 6f 77 25 2c 2c 57 62 25 0d 03 d7 04 0d 03 |.Wow%,,Wb%......|
00007930 d8 20 e7 68 25 3d 6d 5f 6c 6f 63 61 6c 25 20 80 |. .h%=m_local% .|
00007940 20 61 72 65 6d 6f 74 65 25 3e 3d 30 20 8c 0d 03 | aremote%>=0 ...|
00007950 d9 45 f2 67 77 69 28 6d 5f 6c 6f 63 61 6c 25 29 |.E.gwi(m_local%)|
00007960 3a 79 31 61 25 3d 79 31 25 2d 79 73 63 72 6f 6c |:y1a%=y1%-yscrol|
00007970 25 3a 79 73 63 72 6f 6c 61 25 3d 79 73 63 72 6f |%:yscrola%=yscro|
00007980 6c 25 3a 78 73 63 72 6f 6c 61 25 3d 78 73 63 72 |l%:xscrola%=xscr|
00007990 6f 6c 25 0d 03 da 1c 78 70 6f 73 55 25 3d 77 69 |ol%....xposU%=wi|
000079a0 6e 78 25 3a 79 70 6f 73 55 25 3d 79 31 61 25 0d |nx%:yposU%=y1a%.|
000079b0 03 db 1f 78 70 6f 73 4c 25 3d 78 70 6f 73 55 25 |...xposL%=xposU%|
000079c0 3a 79 70 6f 73 4c 25 3d 79 70 6f 73 55 25 0d 03 |:yposL%=yposU%..|
000079d0 dc 1c e7 78 70 6f 73 4c 25 3c 78 30 25 20 8c 20 |...xposL%<x0% . |
000079e0 78 70 6f 73 4c 25 3d 78 30 25 0d 03 dd 1c e7 79 |xposL%=x0%.....y|
000079f0 70 6f 73 4c 25 3c 79 30 25 20 8c 20 79 70 6f 73 |posL%<y0% . ypos|
00007a00 4c 25 3d 79 30 25 0d 03 de 1c e7 78 70 6f 73 4c |L%=y0%.....xposL|
00007a10 25 3e 78 31 25 20 8c 20 78 70 6f 73 4c 25 3d 78 |%>x1% . xposL%=x|
00007a20 31 25 0d 03 df 1c e7 79 70 6f 73 4c 25 3e 79 31 |1%.....yposL%>y1|
00007a30 25 20 8c 20 79 70 6f 73 4c 25 3d 79 31 25 0d 03 |% . yposL%=y1%..|
00007a40 e0 1c 73 66 61 63 25 3d 36 35 35 33 36 3a f4 20 |..sfac%=65536:. |
00007a50 31 30 30 25 20 73 63 61 6c 65 0d 03 e1 44 6d 73 |100% scale...Dms|
00007a60 32 25 3d 6d 5f 6c 6f 63 61 6c 25 3a 6d 73 33 25 |2%=m_local%:ms3%|
00007a70 3d 77 5f 6c 6f 63 61 6c 74 25 3a 74 73 6b 68 25 |=w_localt%:tskh%|
00007a80 3d 72 65 6d 6f 74 65 74 61 73 6b 25 3a f2 70 63 |=remotetask%:.pc|
00007a90 61 28 4d 73 67 5f 4f 62 6a 50 6f 73 25 29 0d 03 |a(Msg_ObjPos%)..|
00007aa0 e2 05 cd 0d 03 e3 10 c9 33 3a f2 43 77 28 21 57 |........3:.Cw(!W|
00007ab0 62 25 29 0d 03 e4 0d c9 36 3a f2 63 6c 69 63 6b |b%).....6:.click|
00007ac0 0d 03 e5 07 c9 37 3a 0d 03 e6 13 c9 38 3a f2 6b |.....7:.....8:.k|
00007ad0 65 79 5f 70 72 65 73 73 65 64 0d 03 e7 13 c9 39 |ey_pressed.....9|
00007ae0 3a f2 73 65 6c 65 63 74 5f 6d 65 6e 75 0d 03 e8 |:.select_menu...|
00007af0 17 c9 31 37 2c 31 38 3a f2 72 65 63 69 65 76 65 |..17,18:.recieve|
00007b00 5f 6d 73 67 0d 03 e9 05 cb 0d 03 ea 07 fd 20 30 |_msg.......... 0|
00007b10 0d 03 eb 05 e1 0d 03 ec 18 dd f2 4f 77 28 68 25 |...........Ow(h%|
00007b20 2c 78 25 2c 79 25 2c 62 68 6e 64 25 29 0d 03 ed |,x%,y%,bhnd%)...|
00007b30 1e e7 20 68 25 3d 6d 5f 72 65 6d 6f 74 65 25 20 |.. h%=m_remote% |
00007b40 8c 20 6d 61 69 6e 6f 25 3d 2d 31 0d 03 ee 1d 21 |. maino%=-1....!|
00007b50 57 62 25 3d 68 25 3a e7 20 78 25 3d 2d 31 20 84 |Wb%=h%:. x%=-1 .|
00007b60 20 79 25 3d 2d 31 20 8c 0d 03 ef 2b c8 99 57 67 | y%=-1 ....+..Wg|
00007b70 77 73 74 25 2c 2c 57 62 25 3a 57 62 25 21 32 38 |wst%,,Wb%:Wb%!28|
00007b80 3d 62 68 6e 64 25 3a c8 99 20 57 6f 77 25 2c 2c |=bhnd%:.. Wow%,,|
00007b90 57 62 25 0d 03 f0 2a e7 20 68 25 3d 6d 5f 6c 6f |Wb%...*. h%=m_lo|
00007ba0 63 61 6c 25 20 84 20 68 25 3d 6d 5f 72 65 6d 6f |cal% . h%=m_remo|
00007bb0 74 65 25 20 8c 20 f2 72 70 61 6e 65 73 0d 03 f1 |te% . .rpanes...|
00007bc0 05 e1 0d 03 f2 05 cd 0d 03 f3 39 c8 99 57 67 77 |..........9..Wgw|
00007bd0 73 74 25 2c 2c 57 62 25 3a 78 73 69 7a 65 25 3d |st%,,Wb%:xsize%=|
00007be0 57 62 25 21 31 32 2d 57 62 25 21 34 3a 79 73 69 |Wb%!12-Wb%!4:ysi|
00007bf0 7a 65 25 3d 57 62 25 21 31 36 2d 57 62 25 21 38 |ze%=Wb%!16-Wb%!8|
00007c00 0d 03 f4 45 21 57 62 25 3d 68 25 3a 57 62 25 21 |...E!Wb%=h%:Wb%!|
00007c10 34 3d 78 25 3a 57 62 25 21 31 32 3d 57 62 25 21 |4=x%:Wb%!12=Wb%!|
00007c20 34 2b 78 73 69 7a 65 25 3a 57 62 25 21 38 3d 79 |4+xsize%:Wb%!8=y|
00007c30 25 3a 57 62 25 21 31 36 3d 57 62 25 21 38 2b 79 |%:Wb%!16=Wb%!8+y|
00007c40 73 69 7a 65 25 0d 03 f5 49 f4 20 57 62 25 21 38 |size%...I. Wb%!8|
00007c50 3d 79 25 3a 57 62 25 21 31 36 3d 57 62 25 21 38 |=y%:Wb%!16=Wb%!8|
00007c60 2b 79 73 69 7a 65 25 3a 57 62 25 21 32 38 3d 62 |+ysize%:Wb%!28=b|
00007c70 68 6e 64 25 3a 53 59 53 22 57 69 6d 70 5f 4f 70 |hnd%:SYS"Wimp_Op|
00007c80 65 6e 57 69 6e 64 6f 77 22 2c 2c 57 62 25 0d 03 |enWindow",,Wb%..|
00007c90 f6 1c c8 99 22 57 69 6d 70 5f 4f 70 65 6e 57 69 |...."Wimp_OpenWi|
00007ca0 6e 64 6f 77 22 2c 2c 57 62 25 0d 03 f7 2a e7 20 |ndow",,Wb%...*. |
00007cb0 68 25 3d 6d 5f 6c 6f 63 61 6c 25 20 84 20 68 25 |h%=m_local% . h%|
00007cc0 3d 6d 5f 72 65 6d 6f 74 65 25 20 8c 20 f2 72 70 |=m_remote% . .rp|
00007cd0 61 6e 65 73 0d 03 f8 05 e1 0d 03 f9 04 0d 03 fa |anes............|
00007ce0 33 dd f2 72 6d 73 3a c8 99 26 33 35 2c 2d 31 2c |3..rms:..&35,-1,|
00007cf0 34 20 b8 20 2c 2c 78 70 69 78 25 3a c8 99 26 33 |4 . ,,xpix%:..&3|
00007d00 35 2c 2d 31 2c 35 20 b8 20 2c 2c 79 70 69 78 25 |5,-1,5 . ,,ypix%|
00007d10 0d 03 fb 2b c8 99 26 33 35 2c 2d 31 2c 31 31 20 |...+..&35,-1,11 |
00007d20 b8 20 2c 2c 73 77 25 3a c8 99 26 33 35 2c 2d 31 |. ,,sw%:..&35,-1|
00007d30 2c 31 32 20 b8 20 2c 2c 73 68 25 0d 03 fc 45 78 |,12 . ,,sh%...Ex|
00007d40 70 69 78 25 3d 31 3c 3c 78 70 69 78 25 3a 79 70 |pix%=1<<xpix%:yp|
00007d50 69 78 25 3d 31 3c 3c 79 70 69 78 25 3a 73 77 25 |ix%=1<<ypix%:sw%|
00007d60 3d 78 70 69 78 25 2a 28 73 77 25 2b 31 29 3a 73 |=xpix%*(sw%+1):s|
00007d70 68 25 3d 79 70 69 78 25 2a 28 73 68 25 2b 31 29 |h%=ypix%*(sh%+1)|
00007d80 0d 03 fd 1f 78 70 69 78 66 3d 78 70 69 78 25 2f |....xpixf=xpix%/|
00007d90 32 3a 79 70 69 78 66 3d 79 70 69 78 25 2f 32 0d |2:ypixf=ypix%/2.|
00007da0 03 fe 05 e1 0d 03 ff 04 0d 04 00 13 dd f2 72 65 |..............re|
00007db0 70 6d 73 67 28 73 74 72 31 24 29 0d 04 01 26 ff |pmsg(str1$)...&.|
00007dc0 22 50 4f 49 4e 54 45 52 20 31 22 3a c8 99 26 33 |"POINTER 1":..&3|
00007dd0 35 2c 2d 31 2c 33 20 b8 20 2c 2c 6e 6f 63 6f 6c |5,-1,3 . ,,nocol|
00007de0 25 0d 04 02 5e f2 77 69 28 77 5f 72 65 70 6f 72 |%...^.wi(w_repor|
00007df0 74 25 2c 31 2c 73 74 72 31 24 29 3a 24 6d 73 67 |t%,1,str1$):$msg|
00007e00 74 69 74 25 3d 22 53 70 61 69 6e 74 22 3a c8 99 |tit%="Spaint":..|
00007e10 20 57 67 70 69 25 2c 2c 47 42 25 3a f2 4f 77 28 | Wgpi%,,GB%:.Ow(|
00007e20 77 5f 72 65 70 6f 72 74 25 2c 21 47 42 25 2d 33 |w_report%,!GB%-3|
00007e30 35 36 2c 47 42 25 21 34 2d 34 32 2c 2d 31 29 0d |56,GB%!4-42,-1).|
00007e40 04 03 05 e1 0d 04 04 1c dd f2 72 65 70 65 72 72 |..........reperr|
00007e50 28 73 74 72 31 24 29 3a 6d 6e 68 6e 64 25 3d 30 |(str1$):mnhnd%=0|
00007e60 0d 04 05 07 ea 20 85 0d 04 06 2c ee 85 ea 20 85 |..... ....,... .|
00007e70 20 a2 20 31 2c 22 49 6e 20 45 72 72 6f 72 20 63 | . 1,"In Error c|
00007e80 6f 64 65 3a 22 2b f6 24 2b 22 20 22 2b c3 9e 3a |ode:"+.$+" "+..:|
00007e90 c8 98 20 0d 04 07 37 ff 22 50 4f 49 4e 54 45 52 |.. ...7."POINTER|
00007ea0 20 31 22 3a c8 99 22 4f 53 5f 52 65 61 64 4d 6f | 1":.."OS_ReadMo|
00007eb0 64 65 56 61 72 69 61 62 6c 65 22 2c eb 2c 33 20 |deVariable",.,3 |
00007ec0 b8 20 2c 2c 6e 6f 63 6f 6c 25 0d 04 08 06 ef 35 |. ,,nocol%.....5|
00007ed0 0d 04 09 19 21 67 62 25 3d 31 3a 24 28 67 62 25 |....!gb%=1:$(gb%|
00007ee0 2b 34 29 3d 73 74 72 31 24 0d 04 0a 28 c8 99 20 |+4)=str1$...(.. |
00007ef0 22 57 69 6d 70 5f 52 65 70 6f 72 74 45 72 72 6f |"Wimp_ReportErro|
00007f00 72 22 2c 67 62 25 2c 32 2c 22 53 70 61 69 6e 74 |r",gb%,2,"Spaint|
00007f10 22 0d 04 0b 05 e1 0d 04 0c 3a dd f2 6b 65 79 5f |"........:..key_|
00007f20 70 72 65 73 73 65 64 3a 77 69 6e 25 3d 21 57 62 |pressed:win%=!Wb|
00007f30 25 3a 6b 65 79 25 3d 57 62 25 21 32 34 3a 69 63 |%:key%=Wb%!24:ic|
00007f40 6e 25 3d 57 62 25 21 34 3a 6d 69 6e 65 25 3d a3 |n%=Wb%!4:mine%=.|
00007f50 0d 04 0d 17 e7 77 69 6e 25 3d 6c 63 70 77 25 20 |.....win%=lcpw% |
00007f60 6d 69 6e 65 25 3d b9 0d 04 0e 3f e7 77 69 6e 25 |mine%=....?.win%|
00007f70 3d 67 65 6e 73 61 76 65 25 20 80 20 6b 65 79 25 |=gensave% . key%|
00007f80 3d 31 33 20 8c 20 f2 6f 6b 73 61 76 65 28 a4 72 |=13 . .oksave(.r|
00007f90 69 28 67 65 6e 73 61 76 65 25 2c 32 29 29 3a 6d |i(gensave%,2)):m|
00007fa0 69 6e 65 25 3d b9 0d 04 0f 04 0d 04 10 26 e7 20 |ine%=........&. |
00007fb0 ac 20 6d 69 6e 65 25 20 c8 99 22 57 69 6d 70 5f |. mine% .."Wimp_|
00007fc0 50 72 6f 63 65 73 73 4b 65 79 22 2c 6b 65 79 25 |ProcessKey",key%|
00007fd0 0d 04 11 05 e1 0d 04 12 04 0d 04 13 2a dd f2 72 |............*..r|
00007fe0 65 61 64 5f 61 6e 64 6c 6f 61 64 28 73 24 2c 66 |ead_andload(s$,f|
00007ff0 74 25 2c 77 69 6e 25 2c 49 63 6e 25 29 3a 45 58 |t%,win%,Icn%):EX|
00008000 25 3d 30 0d 04 14 0d c8 8e 20 77 69 6e 25 20 ca |%=0...... win% .|
00008010 0d 04 15 11 c9 20 2d 32 2c 6d 5f 6c 6f 63 61 6c |..... -2,m_local|
00008020 25 0d 04 16 1d e7 66 74 25 3d 26 46 46 39 20 f2 |%.....ft%=&FF9 .|
00008030 6c 6f 61 64 73 70 72 69 74 65 28 73 24 29 0d 04 |loadsprite(s$)..|
00008040 17 05 cb 0d 04 18 0a 78 77 70 25 3d 30 0d 04 19 |.......xwp%=0...|
00008050 05 e1 0d 04 1a 04 0d 04 1b 15 dd a4 63 68 65 63 |............chec|
00008060 6b 70 61 74 68 28 6e 6d 65 24 29 0d 04 1c 4c e7 |kpath(nme$)...L.|
00008070 20 a7 6e 6d 65 24 2c 22 3a 22 29 3d 30 20 80 20 | .nme$,":")=0 . |
00008080 a7 6e 6d 65 24 2c 22 3c 22 29 3d 30 20 80 20 a7 |.nme$,"<")=0 . .|
00008090 6e 6d 65 24 2c 22 2e 22 29 3d 30 20 80 20 6e 6d |nme$,".")=0 . nm|
000080a0 65 24 3c 3e 22 3c 57 69 6d 70 24 53 63 72 61 70 |e$<>"<Wimp$Scrap|
000080b0 3e 22 20 8c 20 3d a3 0d 04 1d 06 3d b9 0d 04 1e |>" . =.....=....|
000080c0 04 0d 04 1f 4e dd f2 6f 6e 6f 66 66 28 77 69 6e |....N..onoff(win|
000080d0 25 2c 49 63 6e 25 2c 73 74 61 74 65 25 29 3a e7 |%,Icn%,state%):.|
000080e0 73 74 61 74 65 25 20 f2 75 69 28 77 69 6e 25 2c |state% .ui(win%,|
000080f0 49 63 6e 25 2c 30 29 20 8b f2 75 69 28 77 69 6e |Icn%,0) ..ui(win|
00008100 25 2c 49 63 6e 25 2c 32 30 39 37 31 35 32 29 0d |%,Icn%,2097152).|
00008110 04 20 05 e1 0d 04 21 04 0d 04 22 1e dd f2 61 28 |. ....!..."...a(|
00008120 41 25 2c 42 25 29 3a d6 4e 69 63 65 41 25 2c 41 |A%,B%):.NiceA%,A|
00008130 25 2c 42 25 3a e1 0d 04 23 04 0d 04 24 20 dd f2 |%,B%:...#...$ ..|
00008140 64 61 28 41 25 2c 42 25 29 3a d6 4e 69 63 65 44 |da(A%,B%):.NiceD|
00008150 61 25 2c 41 25 2c 42 25 3a e1 0d 04 25 04 0d 04 |a%,A%,B%:...%...|
00008160 26 26 dd f2 61 47 28 41 25 2c 42 25 2c 43 25 29 |&&..aG(A%,B%,C%)|
00008170 3a d6 4e 69 63 65 41 67 25 2c 41 25 2c 42 25 2c |:.NiceAg%,A%,B%,|
00008180 43 25 3a e1 0d 04 27 04 0d 04 28 26 dd f2 64 61 |C%:...'...(&..da|
00008190 47 28 41 25 2c 42 25 2c 43 25 29 3a d6 4e 69 63 |G(A%,B%,C%):.Nic|
000081a0 65 44 61 67 25 2c 41 25 2c 42 25 2c 43 25 0d 04 |eDag%,A%,B%,C%..|
000081b0 29 45 c8 99 57 63 47 70 25 2c 2c 67 62 6c 6b 25 |)E..WcGp%,,gblk%|
000081c0 3a e7 21 67 62 6c 6b 25 3d 41 25 20 80 20 67 62 |:.!gblk%=A% . gb|
000081d0 6c 6b 25 21 34 3e 3d 42 25 20 80 20 67 62 6c 6b |lk%!4>=B% . gblk|
000081e0 25 21 34 3c 3d 43 25 20 8c c8 99 57 63 53 70 25 |%!4<=C% ...WcSp%|
000081f0 2c 2d 31 0d 04 2a 05 e1 0d 04 2b 04 0d 04 2c 18 |,-1..*....+...,.|
00008200 dd f2 77 61 72 6e 69 6e 67 28 77 69 6e 25 2c 69 |..warning(win%,i|
00008210 63 6e 25 29 0d 04 2d 45 21 57 62 25 3d 77 69 6e |cn%)..-E!Wb%=win|
00008220 25 3a 57 62 25 21 34 3d 69 63 6e 25 3a 57 62 25 |%:Wb%!4=icn%:Wb%|
00008230 21 38 3d 31 31 3c 3c 32 34 3a 57 62 25 21 31 32 |!8=11<<24:Wb%!12|
00008240 3d 25 31 31 31 31 3c 3c 32 34 3a c8 99 20 57 73 |=%1111<<24:.. Ws|
00008250 69 73 74 25 2c 2c 57 62 25 0d 04 2e 05 e1 0d 04 |ist%,,Wb%.......|
00008260 2f 04 0d 04 30 13 dd f2 6f 6b 28 77 69 6e 25 2c |/...0...ok(win%,|
00008270 69 63 6e 25 29 0d 04 31 44 21 57 62 25 3d 77 69 |icn%)..1D!Wb%=wi|
00008280 6e 25 3a 57 62 25 21 34 3d 69 63 6e 25 3a 57 62 |n%:Wb%!4=icn%:Wb|
00008290 25 21 38 3d 37 3c 3c 32 34 3a 57 62 25 21 31 32 |%!8=7<<24:Wb%!12|
000082a0 3d 25 31 31 31 31 3c 3c 32 34 3a c8 99 20 57 73 |=%1111<<24:.. Ws|
000082b0 69 73 74 25 2c 2c 57 62 25 0d 04 32 05 e1 0d 04 |ist%,,Wb%..2....|
000082c0 33 04 0d 04 34 5b dd f2 75 69 28 68 61 6e 64 25 |3...4[..ui(hand%|
000082d0 2c 6e 6f 25 2c 73 74 61 74 65 25 29 3a 21 67 62 |,no%,state%):!gb|
000082e0 25 3d 68 61 6e 64 25 3a 67 62 25 21 34 3d 6e 6f |%=hand%:gb%!4=no|
000082f0 25 3a 67 62 25 21 38 3d 73 74 61 74 65 25 3a 67 |%:gb%!8=state%:g|
00008300 62 25 21 31 32 3d 32 30 39 37 31 35 32 3a c8 99 |b%!12=2097152:..|
00008310 57 73 69 73 74 25 2c 2c 67 62 25 3a e1 0d 04 35 |Wsist%,,gb%:...5|
00008320 04 0d 04 36 2f dd f2 75 69 47 28 68 61 6e 64 25 |...6/..uiG(hand%|
00008330 2c 73 74 61 72 74 25 2c 65 6e 64 25 2c 73 74 61 |,start%,end%,sta|
00008340 74 65 25 29 3a e7 68 61 6e 64 25 3c 3d 30 20 e1 |te%):.hand%<=0 .|
00008350 0d 04 37 56 21 67 62 25 3d 68 61 6e 64 25 3a 67 |..7V!gb%=hand%:g|
00008360 62 25 21 38 3d 73 74 61 74 65 25 3a 67 62 25 21 |b%!8=state%:gb%!|
00008370 31 32 3d 32 30 39 37 31 35 32 3a e3 6c 25 3d 73 |12=2097152:.l%=s|
00008380 74 61 72 74 25 20 b8 65 6e 64 25 3a 67 62 25 21 |tart% .end%:gb%!|
00008390 34 3d 6c 25 3a c8 99 57 73 69 73 74 25 2c 2c 67 |4=l%:..Wsist%,,g|
000083a0 62 25 3a ed 3a e1 0d 04 38 04 0d 04 39 7f dd f2 |b%:.:...8...9...|
000083b0 77 69 69 28 77 69 6e 25 2c 69 63 6e 25 2c 74 65 |wii(win%,icn%,te|
000083c0 78 74 24 29 3a 21 67 62 25 3d 77 69 6e 25 3a 67 |xt$):!gb%=win%:g|
000083d0 62 25 21 34 3d 69 63 6e 25 3a c8 99 57 67 69 73 |b%!4=icn%:..Wgis|
000083e0 74 25 2c 2c 67 62 25 3a e7 a4 73 28 67 62 25 21 |t%,,gb%:..s(gb%!|
000083f0 33 32 29 3c 3e 74 65 78 74 24 20 24 28 67 62 25 |32)<>text$ $(gb%|
00008400 21 33 32 29 3d 74 65 78 74 24 3a 67 62 25 21 38 |!32)=text$:gb%!8|
00008410 3d 30 3a 67 62 25 21 31 32 3d 30 3a c8 99 57 73 |=0:gb%!12=0:..Ws|
00008420 69 73 74 25 2c 2c 67 62 25 0d 04 3a 05 e1 0d 04 |ist%,,gb%..:....|
00008430 3b 04 0d 04 3c 92 dd f2 77 69 28 77 69 6e 25 2c |;...<...wi(win%,|
00008440 69 63 6e 25 2c 74 65 78 74 24 29 3a 21 67 62 25 |icn%,text$):!gb%|
00008450 3d 77 69 6e 25 3a 67 62 25 21 34 3d 69 63 6e 25 |=win%:gb%!4=icn%|
00008460 3a c8 99 57 67 69 73 74 25 2c 2c 67 62 25 3a e7 |:..Wgist%,,gb%:.|
00008470 67 62 25 21 32 38 3c 26 38 30 30 30 20 84 20 67 |gb%!28<&8000 . g|
00008480 62 25 21 32 38 3e 26 38 30 30 30 30 30 20 8c 85 |b%!28>&800000 ..|
00008490 20 26 35 32 34 46 34 32 2c 22 49 63 6f 6e 20 6e | &524F42,"Icon n|
000084a0 6f 74 20 69 6e 64 69 72 2e 20 6f 72 20 69 6e 76 |ot indir. or inv|
000084b0 61 6c 69 64 2e 20 48 61 6e 64 6c 65 20 22 2b c3 |alid. Handle "+.|
000084c0 69 63 6e 25 0d 04 3d 46 e7 a4 73 28 67 62 25 21 |icn%..=F..s(gb%!|
000084d0 32 38 29 3c 3e 74 65 78 74 24 20 8c 24 28 67 62 |28)<>text$ .$(gb|
000084e0 25 21 32 38 29 3d 74 65 78 74 24 3a 67 62 25 21 |%!28)=text$:gb%!|
000084f0 38 3d 30 3a 67 62 25 21 31 32 3d 30 3a c8 99 57 |8=0:gb%!12=0:..W|
00008500 73 69 73 74 25 2c 2c 67 62 25 0d 04 3e 05 e1 0d |sist%,,gb%..>...|
00008510 04 3f 04 0d 04 40 24 dd a4 69 63 6e 6f 6b 28 77 |.?...@$..icnok(w|
00008520 69 6e 25 2c 69 63 6e 25 29 3a e7 20 69 63 6e 25 |in%,icn%):. icn%|
00008530 3d 30 20 8c 20 3d 30 0d 04 41 38 21 67 62 25 3d |=0 . =0..A8!gb%=|
00008540 77 69 6e 25 3a 67 62 25 21 34 3d 69 63 6e 25 3a |win%:gb%!4=icn%:|
00008550 c8 99 57 67 69 73 74 25 2c 2c 67 62 25 3a 76 25 |..Wgist%,,gb%:v%|
00008560 3d 67 62 25 21 28 38 2b 31 36 29 3e 3e 32 32 0d |=gb%!(8+16)>>22.|
00008570 04 42 16 e7 20 28 76 25 20 80 20 25 31 29 3d 30 |.B.. (v% . %1)=0|
00008580 20 8c 20 3d b9 0d 04 43 06 3d a3 0d 04 44 04 0d | . =...C.=...D..|
00008590 04 45 19 dd f2 73 65 74 73 69 7a 65 28 77 68 6e |.E...setsize(whn|
000085a0 25 2c 68 25 2c 77 25 29 0d 04 46 63 21 57 62 25 |%,h%,w%)..Fc!Wb%|
000085b0 3d 77 68 6e 25 3a c8 99 57 67 77 73 74 25 2c 2c |=whn%:..Wgwst%,,|
000085c0 57 62 25 3a 57 62 25 21 34 3d 30 3a 57 62 25 21 |Wb%:Wb%!4=0:Wb%!|
000085d0 38 3d 30 3a 57 62 25 21 31 36 3d 68 25 3a 57 62 |8=0:Wb%!16=h%:Wb|
000085e0 25 21 31 32 3d 77 25 3a c8 99 26 36 30 30 44 37 |%!12=w%:..&600D7|
000085f0 2c 77 68 6e 25 2c 28 57 62 25 2b 34 29 3a c8 99 |,whn%,(Wb%+4):..|
00008600 57 67 77 73 74 25 2c 2c 57 62 25 0d 04 47 05 e1 |Wgwst%,,Wb%..G..|
00008610 0d 04 48 04 0d 04 49 23 dd f2 6c 6f 61 64 73 71 |..H...I#..loadsq|
00008620 75 61 73 68 65 64 28 6e 6d 65 24 2c 62 61 73 65 |uashed(nme$,base|
00008630 25 2c 6f 66 66 25 29 0d 04 4a 06 ea 85 0d 04 4b |%,off%)..J.....K|
00008640 3a ee 85 ea 20 f2 72 65 70 65 72 72 28 f6 24 2c |:... .reperr(.$,|
00008650 22 28 63 6f 64 65 20 22 2b c3 9e 2b 22 29 22 29 |"(code "+..+")")|
00008660 3a f2 72 65 73 69 7a 65 73 6c 6f 74 28 30 29 3a |:.resizeslot(0):|
00008670 45 58 25 3d b9 3a e1 0d 04 4c 0c c8 99 26 34 30 |EX%=.:...L...&40|
00008680 36 43 30 0d 04 4d 31 f2 72 5f 66 69 28 6e 6d 65 |6C0..M1.r_fi(nme|
00008690 24 29 3a 72 6c 65 6e 25 3d 6c 65 6e 67 74 68 25 |$):rlen%=length%|
000086a0 3a 6c 65 6e 67 74 68 25 2d 3d 6f 66 66 25 3a f4 |:length%-=off%:.|
000086b0 20 2a 2a 2a 0d 04 4e 2a c8 99 22 53 71 75 61 73 | ***..N*.."Squas|
000086c0 68 5f 44 65 63 6f 6d 70 72 65 73 73 22 2c 25 31 |h_Decompress",%1|
000086d0 30 30 30 2c 2d 31 20 b8 20 77 6f 72 6b 25 0d 04 |000,-1 . work%..|
000086e0 4f 39 c8 99 22 57 69 6d 70 5f 53 6c 6f 74 53 69 |O9.."Wimp_SlotSi|
000086f0 7a 65 22 2c 2d 31 2c 2d 31 20 b8 20 63 75 72 72 |ze",-1,-1 . curr|
00008700 65 6e 74 2c 2c 66 72 65 65 3a 66 72 65 65 2d 3d |ent,,free:free-=|
00008710 33 32 2a 31 30 32 34 0d 04 50 46 e7 66 72 65 65 |32*1024..PF.free|
00008720 3c 77 6f 72 6b 25 2b 34 30 39 36 2b 31 30 32 34 |<work%+4096+1024|
00008730 20 8c f2 72 65 70 65 72 72 28 a4 6d 73 28 22 53 | ..reperr(.ms("S|
00008740 6f 72 72 6c 63 22 29 2c 22 22 29 3a 45 58 25 3d |orrlc"),""):EX%=|
00008750 b9 3a e1 3a f4 20 6c 65 6e 67 74 68 25 0d 04 51 |.:.:. length%..Q|
00008760 3e e7 66 72 65 65 3e 77 6f 72 6b 25 2b 6c 65 6e |>.free>work%+len|
00008770 67 74 68 25 2b 6f 75 74 73 69 7a 65 25 20 8c 20 |gth%+outsize% . |
00008780 66 72 65 65 3d 77 6f 72 6b 25 2b 6c 65 6e 67 74 |free=work%+lengt|
00008790 68 25 2b 6f 75 74 73 69 7a 65 25 0d 04 52 1b 45 |h%+outsize%..R.E|
000087a0 58 25 3d 30 3a f2 72 65 73 69 7a 65 73 6c 6f 74 |X%=0:.resizeslot|
000087b0 28 66 72 65 65 29 0d 04 53 2d e7 20 45 58 25 20 |(free)..S-. EX% |
000087c0 8c 20 f2 72 65 70 65 72 72 28 a4 6d 73 28 22 53 |. .reperr(.ms("S|
000087d0 6f 72 72 6c 63 22 29 2c 22 22 29 3a 45 58 25 3d |orrlc"),""):EX%=|
000087e0 b9 3a e1 0d 04 54 2a 66 72 65 65 63 25 3d 66 72 |.:...T*freec%=fr|
000087f0 65 65 2d 77 6f 72 6b 25 3a 77 6f 72 6b 61 25 3d |ee-work%:worka%=|
00008800 63 75 72 72 65 6e 74 2b 26 38 30 30 30 0d 04 55 |current+&8000..U|
00008810 25 c8 99 22 57 69 6d 70 5f 53 6c 6f 74 53 69 7a |%.."Wimp_SlotSiz|
00008820 65 22 2c 2d 31 2c 2d 31 20 b8 20 63 75 72 72 65 |e",-1,-1 . curre|
00008830 6e 74 0d 04 56 1b e7 20 66 72 65 65 63 25 2d 6c |nt..V.. freec%-l|
00008840 65 6e 67 74 68 25 3e 31 30 32 34 20 8c 0d 04 57 |ength%>1024 ...W|
00008850 59 6f 75 74 61 25 3d 77 6f 72 6b 61 25 2b 77 6f |Youta%=worka%+wo|
00008860 72 6b 25 2b 6c 65 6e 67 74 68 25 3a 6f 75 74 6c |rk%+length%:outl|
00008870 25 3d 28 63 75 72 72 65 6e 74 2b 26 38 30 30 30 |%=(current+&8000|
00008880 29 2d 6f 75 74 61 25 3a 69 6e 61 25 3d 77 6f 72 |)-outa%:ina%=wor|
00008890 6b 61 25 2b 77 6f 72 6b 25 3a 69 6e 6c 25 3d 6c |ka%+work%:inl%=l|
000088a0 65 6e 67 74 68 25 0d 04 58 05 cc 0d 04 59 50 68 |ength%..X....YPh|
000088b0 6c 66 25 3d 66 72 65 65 63 25 2f 32 3a 6f 75 74 |lf%=freec%/2:out|
000088c0 61 25 3d 77 6f 72 6b 61 25 2b 77 6f 72 6b 25 2b |a%=worka%+work%+|
000088d0 68 6c 66 25 3a 6f 75 74 6c 25 3d 68 6c 66 25 3a |hlf%:outl%=hlf%:|
000088e0 69 6e 61 25 3d 77 6f 72 6b 61 25 2b 77 6f 72 6b |ina%=worka%+work|
000088f0 25 3a 69 6e 6c 25 3d 68 6c 66 25 0d 04 5a 05 cd |%:inl%=hlf%..Z..|
00008900 0d 04 5b 17 72 35 25 3d 6f 75 74 6c 25 3a 6f 74 |..[.r5%=outl%:ot|
00008910 79 70 65 25 3d 2d 31 0d 04 5c 2d 66 69 6c 65 6f |ype%=-1..\-fileo|
00008920 66 66 25 3d 30 3a 6f 66 66 65 25 3d a3 3a 63 6f |ff%=0:offe%=.:co|
00008930 6e 74 25 3d 30 3a 72 33 25 3d 30 3a 73 74 61 72 |nt%=0:r3%=0:star|
00008940 74 25 3d 30 0d 04 5d 32 e7 20 69 6e 6c 25 3e 3d |t%=0..]2. inl%>=|
00008950 6c 65 6e 67 74 68 25 20 80 20 6f 75 74 6c 25 3e |length% . outl%>|
00008960 3d 6f 75 74 73 69 7a 65 25 20 8c 73 74 61 72 74 |=outsize% .start|
00008970 25 3d 25 31 30 30 0d 04 5e 1e c8 99 22 48 6f 75 |%=%100..^..."Hou|
00008980 72 67 6c 61 73 73 5f 50 65 72 63 65 6e 74 61 67 |rglass_Percentag|
00008990 65 22 2c 30 0d 04 5f 05 f5 0d 04 60 2c 6f 66 66 |e",0.._....`,off|
000089a0 63 25 3d 69 6e 6c 25 3a f2 67 65 74 62 69 74 28 |c%=inl%:.getbit(|
000089b0 6e 6d 65 24 2c 6f 66 66 25 2c 69 6e 61 25 2c 6f |nme$,off%,ina%,o|
000089c0 66 66 63 25 29 0d 04 61 35 72 31 25 3d 77 6f 72 |ffc%)..a5r1%=wor|
000089d0 6b 61 25 3a 72 32 25 3d 69 6e 61 25 3a 72 33 25 |ka%:r2%=ina%:r3%|
000089e0 3d 6f 66 66 63 25 3a 72 34 25 3d 6f 75 74 61 25 |=offc%:r4%=outa%|
000089f0 3a 72 35 25 3d 6f 75 74 6c 25 0d 04 62 20 f5 3a |:r5%=outl%..b .:|
00008a00 e7 20 6f 66 66 65 25 20 8c 20 63 6f 6e 74 25 3d |. offe% . cont%=|
00008a10 30 20 8b 63 6f 6e 74 25 3d 31 0d 04 63 34 c8 99 |0 .cont%=1..c4..|
00008a20 22 48 6f 75 72 67 6c 61 73 73 5f 50 65 72 63 65 |"Hourglass_Perce|
00008a30 6e 74 61 67 65 22 2c 28 66 69 6c 65 6f 66 66 25 |ntage",(fileoff%|
00008a40 2f 6f 75 74 73 69 7a 65 25 29 2a 31 30 30 0d 04 |/outsize%)*100..|
00008a50 64 5f c8 99 22 53 71 75 61 73 68 5f 44 65 63 6f |d_.."Squash_Deco|
00008a60 6d 70 72 65 73 73 22 2c 73 74 61 72 74 25 20 84 |mpress",start% .|
00008a70 20 28 63 6f 6e 74 25 3c 3c 31 29 2c 72 31 25 2c | (cont%<<1),r1%,|
00008a80 72 32 25 2c 72 33 25 2c 72 34 25 2c 72 35 25 20 |r2%,r3%,r4%,r5% |
00008a90 b8 20 73 74 61 74 75 73 25 2c 72 31 25 2c 72 32 |. status%,r1%,r2|
00008aa0 25 2c 72 33 25 2c 72 34 25 2c 72 35 25 0d 04 65 |%,r3%,r4%,r5%..e|
00008ab0 0c 73 74 61 72 74 25 3d 31 0d 04 66 61 e7 20 73 |.start%=1..fa. s|
00008ac0 74 61 74 75 73 25 3d 32 20 8c f2 73 74 6f 72 65 |tatus%=2 ..store|
00008ad0 61 77 61 79 28 6f 75 74 61 25 2c 72 34 25 2d 6f |away(outa%,r4%-o|
00008ae0 75 74 61 25 2c 66 69 6c 65 6f 66 66 25 2c 62 61 |uta%,fileoff%,ba|
00008af0 73 65 25 2c 6f 75 74 73 69 7a 65 25 2c 6f 74 79 |se%,outsize%,oty|
00008b00 70 65 25 2c 30 29 3a 72 34 25 3d 6f 75 74 61 25 |pe%,0):r4%=outa%|
00008b10 3a 72 35 25 3d 6f 75 74 6c 25 0d 04 67 37 e7 66 |:r5%=outl%..g7.f|
00008b20 69 6c 65 6f 66 66 25 3e 3d 6f 75 74 73 69 7a 65 |ileoff%>=outsize|
00008b30 25 20 8c 73 74 61 74 75 73 25 3d 30 3a 6f 66 66 |% .status%=0:off|
00008b40 25 3d 72 6c 65 6e 25 3a 72 34 25 3d 6f 75 74 61 |%=rlen%:r4%=outa|
00008b50 25 0d 04 68 1b fd 20 73 74 61 74 75 73 25 3d 31 |%..h.. status%=1|
00008b60 20 84 20 73 74 61 74 75 73 25 3d 30 0d 04 69 54 | . status%=0..iT|
00008b70 f2 73 74 6f 72 65 61 77 61 79 28 6f 75 74 61 25 |.storeaway(outa%|
00008b80 2c 72 34 25 2d 6f 75 74 61 25 2c 66 69 6c 65 6f |,r4%-outa%,fileo|
00008b90 66 66 25 2c 62 61 73 65 25 2c 6f 75 74 73 69 7a |ff%,base%,outsiz|
00008ba0 65 25 2c 6f 74 79 70 65 25 2c 30 29 3a 72 34 25 |e%,otype%,0):r4%|
00008bb0 3d 6f 75 74 61 25 3a 72 35 25 3d 6f 75 74 6c 25 |=outa%:r5%=outl%|
00008bc0 0d 04 6a 15 6f 66 66 25 2b 3d 28 6f 66 66 63 25 |..j.off%+=(offc%|
00008bd0 2d 72 33 25 29 0d 04 6b 1d fd 20 6f 66 66 25 3e |-r3%)..k.. off%>|
00008be0 3d 72 6c 65 6e 25 20 80 20 73 74 61 74 75 73 25 |=rlen% . status%|
00008bf0 3d 30 0d 04 6c 0c c8 99 26 34 30 36 43 31 0d 04 |=0..l...&406C1..|
00008c00 6d 12 f2 72 65 73 69 7a 65 73 6c 6f 74 28 30 29 |m..resizeslot(0)|
00008c10 0d 04 6e 05 e1 0d 04 6f 53 dd f2 67 65 74 62 69 |..n....oS..getbi|
00008c20 74 28 6e 6d 65 24 2c 6f 66 66 25 2c 61 64 64 72 |t(nme$,off%,addr|
00008c30 25 2c f8 20 6f 66 66 63 25 29 3a e7 20 6f 66 66 |%,. offc%):. off|
00008c40 25 2b 6f 66 66 63 25 3e 72 6c 65 6e 25 20 8c 20 |%+offc%>rlen% . |
00008c50 6f 66 66 63 25 3d 72 6c 65 6e 25 2d 6f 66 66 25 |offc%=rlen%-off%|
00008c60 3a 6f 66 66 65 25 3d b9 0d 04 70 0f e7 6f 66 66 |:offe%=...p..off|
00008c70 63 25 3d 30 20 8c e1 0d 04 71 41 46 25 3d 8e 28 |c%=0 ....qAF%=.(|
00008c80 6e 6d 65 24 29 3a cf 23 46 25 3d 6f 66 66 25 3a |nme$):.#F%=off%:|
00008c90 c8 99 22 4f 53 5f 47 42 50 42 22 2c 34 2c 46 25 |.."OS_GBPB",4,F%|
00008ca0 2c 61 64 64 72 25 2c 6f 66 66 63 25 3a d9 23 46 |,addr%,offc%:.#F|
00008cb0 25 3a 46 25 3d 30 3a e1 0d 04 72 66 dd f2 73 74 |%:F%=0:...rf..st|
00008cc0 6f 72 65 61 77 61 79 28 75 6e 73 71 75 61 73 68 |oreaway(unsquash|
00008cd0 62 75 66 66 65 72 2c 75 6e 73 71 75 61 73 68 65 |buffer,unsquashe|
00008ce0 64 2c f8 20 66 69 6c 65 6f 66 66 25 2c 62 61 73 |d,. fileoff%,bas|
00008cf0 65 25 2c 6f 75 74 73 69 7a 65 25 2c 6f 74 79 70 |e%,outsize%,otyp|
00008d00 65 25 2c 66 69 6c 74 65 72 25 29 3a e7 20 75 6e |e%,filter%):. un|
00008d10 73 71 75 61 73 68 65 64 3c 3d 30 20 8c e1 0d 04 |squashed<=0 ....|
00008d20 73 66 41 25 3d 75 6e 73 71 75 61 73 68 62 75 66 |sfA%=unsquashbuf|
00008d30 66 65 72 3a 42 25 3d 62 61 73 65 25 2b 66 69 6c |fer:B%=base%+fil|
00008d40 65 6f 66 66 25 3a 43 25 3d 75 6e 73 71 75 61 73 |eoff%:C%=unsquas|
00008d50 68 65 64 3a e7 20 42 25 2b 43 25 3e 62 61 73 65 |hed:. B%+C%>base|
00008d60 25 2b 6f 75 74 73 69 7a 65 25 20 8c 43 25 3d 28 |%+outsize% .C%=(|
00008d70 62 61 73 65 25 2b 6f 75 74 73 69 7a 65 25 29 2d |base%+outsize%)-|
00008d80 28 42 25 29 0d 04 74 2b e7 20 41 25 83 34 3d 30 |(B%)..t+. A%.4=0|
00008d90 20 80 20 42 25 83 34 3d 30 20 80 20 43 25 83 34 | . B%.4=0 . C%.4|
00008da0 3d 30 20 8c 20 44 25 3d 30 20 8b 44 25 3d 31 0d |=0 . D%=0 .D%=1.|
00008db0 04 75 36 e7 20 43 25 3e 30 20 8c 20 d6 6d 6f 76 |.u6. C%>0 . .mov|
00008dc0 65 74 6f 2c 41 25 2c 42 25 2c 43 25 20 8b 20 43 |eto,A%,B%,C% . C|
00008dd0 25 3d 30 3a 66 69 6c 65 6f 66 66 25 3d 6f 75 74 |%=0:fileoff%=out|
00008de0 73 69 7a 65 25 0d 04 76 10 66 69 6c 65 6f 66 66 |size%..v.fileoff|
00008df0 25 2b 3d 43 25 0d 04 77 05 e1 0d 04 78 04 0d 04 |%+=C%..w....x...|
00008e00 79 0c dd f2 63 61 72 70 6f 73 0d 04 7a 05 e1 0d |y...carpos..z...|
00008e10 04 7b 04 0d 04 7c a6 dd f2 67 77 69 28 68 61 6e |.{...|...gwi(han|
00008e20 64 25 29 3a 21 67 62 25 3d 68 61 6e 64 25 3a c8 |d%):!gb%=hand%:.|
00008e30 99 20 57 67 77 73 74 25 2c 2c 67 62 25 3a 78 30 |. Wgwst%,,gb%:x0|
00008e40 25 3d 67 62 25 21 34 3a 79 30 25 3d 67 62 25 21 |%=gb%!4:y0%=gb%!|
00008e50 38 3a 78 31 25 3d 67 62 25 21 31 32 3a 79 31 25 |8:x1%=gb%!12:y1%|
00008e60 3d 67 62 25 21 31 36 3a 76 69 73 73 69 7a 58 25 |=gb%!16:vissizX%|
00008e70 3d 78 31 25 2d 78 30 25 3a 76 69 73 73 69 7a 59 |=x1%-x0%:vissizY|
00008e80 25 3d 79 31 25 2d 79 30 25 3a 78 73 63 72 6f 6c |%=y1%-y0%:xscrol|
00008e90 25 3d 67 62 25 21 32 30 3a 79 73 63 72 6f 6c 25 |%=gb%!20:yscrol%|
00008ea0 3d 67 62 25 21 32 34 3a 77 69 6e 78 25 3d 78 30 |=gb%!24:winx%=x0|
00008eb0 25 3a 77 79 25 3d 79 30 25 0d 04 7d 27 77 66 6c |%:wy%=y0%..}'wfl|
00008ec0 67 25 3d 67 62 25 21 33 32 3a 77 6f 25 3d 28 77 |g%=gb%!32:wo%=(w|
00008ed0 66 6c 67 25 20 80 20 31 3c 3c 31 36 29 3c 3e 30 |flg% . 1<<16)<>0|
00008ee0 0d 04 7e 1f 77 79 25 2b 3d 79 73 63 72 6f 6c 25 |..~.wy%+=yscrol%|
00008ef0 3a 77 69 6e 78 25 2d 3d 78 73 63 72 6f 6c 25 0d |:winx%-=xscrol%.|
00008f00 04 7f 05 e1 0d 04 80 04 0d 04 81 42 dd a4 72 69 |...........B..ri|
00008f10 28 77 69 6e 25 2c 69 63 6e 25 29 3a 21 67 62 25 |(win%,icn%):!gb%|
00008f20 3d 77 69 6e 25 3a 67 62 25 21 34 3d 69 63 6e 25 |=win%:gb%!4=icn%|
00008f30 3a c8 99 57 67 69 73 74 25 2c 2c 67 62 25 3a 3d |:..Wgist%,,gb%:=|
00008f40 a4 73 28 67 62 25 21 32 38 29 0d 04 82 46 dd a4 |.s(gb%!28)...F..|
00008f50 72 5f 69 63 69 64 28 77 69 6e 25 2c 69 63 6e 25 |r_icid(win%,icn%|
00008f60 29 3a 21 67 62 25 3d 77 69 6e 25 3a 67 62 25 21 |):!gb%=win%:gb%!|
00008f70 34 3d 69 63 6e 25 3a c8 99 57 67 69 73 74 25 2c |4=icn%:..Wgist%,|
00008f80 2c 67 62 25 3a 3d a4 73 28 67 62 25 21 33 32 29 |,gb%:=.s(gb%!32)|
00008f90 0d 04 83 6c dd f2 77 5f 69 63 69 64 28 77 69 6e |...l..w_icid(win|
00008fa0 25 2c 69 63 6e 25 2c 73 24 29 3a 21 67 62 25 3d |%,icn%,s$):!gb%=|
00008fb0 77 69 6e 25 3a 67 62 25 21 34 3d 69 63 6e 25 3a |win%:gb%!4=icn%:|
00008fc0 c8 99 57 67 69 73 74 25 2c 2c 67 62 25 3a 24 28 |..Wgist%,,gb%:$(|
00008fd0 67 62 25 21 33 32 29 3d 73 24 3a 67 62 25 21 38 |gb%!32)=s$:gb%!8|
00008fe0 3d 30 3a 67 62 25 21 31 32 3d 30 3a c8 99 20 57 |=0:gb%!12=0:.. W|
00008ff0 73 69 73 74 25 2c 2c 67 62 25 3a e1 0d 04 84 4f |sist%,,gb%:....O|
00009000 dd f2 68 65 6c 70 74 65 78 74 3a 57 62 25 21 31 |..helptext:Wb%!1|
00009010 36 3d 26 35 30 33 3a 57 62 25 21 31 32 3d 57 62 |6=&503:Wb%!12=Wb|
00009020 25 21 38 3a 69 63 6e 25 3d 57 62 25 21 33 36 3a |%!8:icn%=Wb%!36:|
00009030 6e 6d 65 24 3d 22 22 3a 68 74 78 25 3d 2d 31 3a |nme$="":htx%=-1:|
00009040 c8 8e 20 57 62 25 21 33 32 20 ca 0d 04 85 05 cb |.. Wb%!32 ......|
00009050 0d 04 86 56 24 28 57 62 25 2b 32 30 29 3d 6e 6d |...V$(Wb%+20)=nm|
00009060 65 24 3a 57 62 25 21 30 3d 28 28 28 32 30 2b a9 |e$:Wb%!0=(((20+.|
00009070 28 6e 6d 65 24 29 2b 31 29 81 34 29 2a 34 29 2b |(nme$)+1).4)*4)+|
00009080 34 3a 24 28 57 62 25 2b 32 31 2b a9 28 6e 6d 65 |4:$(Wb%+21+.(nme|
00009090 24 29 29 3d bd 30 3a c8 99 57 6d 65 73 73 25 2c |$))=.0:..Wmess%,|
000090a0 31 37 2c 57 62 25 0d 04 87 05 e1 0d 04 88 04 0d |17,Wb%..........|
000090b0 04 89 42 dd f2 73 63 28 72 25 2c 67 25 2c 62 25 |..B..sc(r%,g%,b%|
000090c0 29 3a c8 99 20 43 74 53 67 63 6f 6c 25 2c 28 62 |):.. CtSgcol%,(b|
000090d0 25 3c 3c 32 34 29 2b 28 67 25 3c 3c 31 36 29 2b |%<<24)+(g%<<16)+|
000090e0 28 72 25 3c 3c 38 29 2c 2c 2c 32 35 36 2c 30 3a |(r%<<8),,,256,0:|
000090f0 e1 0d 04 8a 43 dd f2 73 63 45 28 72 25 2c 67 25 |....C..scE(r%,g%|
00009100 2c 62 25 29 3a c8 99 20 43 74 53 67 63 6f 6c 25 |,b%):.. CtSgcol%|
00009110 2c 28 62 25 3c 3c 32 34 29 2b 28 67 25 3c 3c 31 |,(b%<<24)+(g%<<1|
00009120 36 29 2b 28 72 25 3c 3c 38 29 2c 2c 2c 32 35 36 |6)+(r%<<8),,,256|
00009130 2c 33 3a e1 0d 04 8b 41 dd f2 69 73 6c 64 28 78 |,3:....A..isld(x|
00009140 25 2c 79 25 2c 77 25 29 3a e7 20 77 25 3e 30 20 |%,y%,w%):. w%>0 |
00009150 80 20 77 25 3c 32 35 36 20 8c 20 c8 93 20 c8 90 |. w%<256 . .. ..|
00009160 20 78 25 2b 28 32 35 35 2d 77 25 29 2c 79 25 2c | x%+(255-w%),y%,|
00009170 77 25 2c 31 38 0d 04 8c 3a e7 77 25 3c 32 35 35 |w%,18...:.w%<255|
00009180 20 80 20 77 25 3e 3d 30 20 8c 20 c8 99 20 58 57 | . w%>=0 . .. XW|
00009190 73 63 6f 6c 25 2c 30 3a c8 93 20 c8 90 20 78 25 |scol%,0:.. .. x%|
000091a0 2c 79 25 2c 28 32 35 35 2d 77 25 29 2c 31 38 0d |,y%,(255-w%),18.|
000091b0 04 8d 33 e7 77 25 3c 30 20 84 20 77 25 3e 32 35 |..3.w%<0 . w%>25|
000091c0 35 20 8c c8 99 20 58 57 73 63 6f 6c 25 2c 32 3a |5 ... XWscol%,2:|
000091d0 c8 93 20 c8 90 20 78 25 2c 79 25 2c 32 35 36 2c |.. .. x%,y%,256,|
000091e0 31 38 0d 04 8e 05 e1 0d 04 8f 04 0d 04 90 26 dd |18............&.|
000091f0 f2 73 74 72 69 6e 67 30 28 6c 25 2c 61 24 29 3a |.string0(l%,a$):|
00009200 24 6c 25 3d 61 24 3a 6c 25 3f a9 61 24 3d 30 3a |$l%=a$:l%?.a$=0:|
00009210 e1 0d 04 91 04 0d 04 92 0c dd f2 61 72 28 76 25 |...........ar(v%|
00009220 29 0d 04 93 2a e7 21 76 25 2f 28 76 25 21 38 2f |)...*.!v%/(v%!8/|
00009230 78 70 69 78 66 29 3e 76 25 21 34 2f 28 76 25 21 |xpixf)>v%!4/(v%!|
00009240 31 32 2f 79 70 69 78 66 29 20 8c 0d 04 94 1d 21 |12/ypixf) .....!|
00009250 76 25 3d 76 25 21 34 3a 76 25 21 38 3d 76 25 21 |v%=v%!4:v%!8=v%!|
00009260 31 32 2a 78 70 69 78 66 0d 04 95 05 cc 0d 04 96 |12*xpixf........|
00009270 2a e7 20 78 70 69 78 66 3c 3e 31 20 8c 20 76 25 |*. xpixf<>1 . v%|
00009280 21 34 3d 21 76 25 2a 78 70 69 78 66 20 8b 20 76 |!4=!v%*xpixf . v|
00009290 25 21 34 3d 21 76 25 0d 04 97 14 76 25 21 31 32 |%!4=!v%....v%!12|
000092a0 3d 76 25 21 38 2a 79 70 69 78 66 0d 04 98 05 cd |=v%!8*ypixf.....|
000092b0 0d 04 99 05 e1 0d 04 9a 04 0d 04 9b a7 dd f2 72 |...............r|
000092c0 65 64 72 61 77 57 28 68 25 2c 78 30 30 25 2c 79 |edrawW(h%,x00%,y|
000092d0 30 30 25 2c 78 31 31 25 2c 79 31 31 25 29 3a 21 |00%,x11%,y11%):!|
000092e0 57 62 25 3d 68 25 3a 57 62 25 21 34 3d 78 30 30 |Wb%=h%:Wb%!4=x00|
000092f0 25 2a 6d 73 63 64 2d 73 70 72 69 74 65 78 6d 25 |%*mscd-spritexm%|
00009300 3a 57 62 25 21 38 3d 79 30 30 25 2a 6d 73 63 64 |:Wb%!8=y00%*mscd|
00009310 2d 73 70 72 69 74 65 79 6d 25 3a 57 62 25 21 31 |-spriteym%:Wb%!1|
00009320 32 3d 57 62 25 21 34 2b 78 31 31 25 2a 6d 73 63 |2=Wb%!4+x11%*msc|
00009330 64 2b 73 70 72 69 74 65 78 6d 25 2a 32 3a 57 62 |d+spritexm%*2:Wb|
00009340 25 21 31 36 3d 57 62 25 21 38 2b 79 31 31 25 2a |%!16=Wb%!8+y11%*|
00009350 6d 73 63 64 2b 73 70 72 69 74 65 79 6d 25 2a 32 |mscd+spriteym%*2|
00009360 0d 04 9c 0f f2 72 65 64 72 61 77 28 2d 31 29 0d |.....redraw(-1).|
00009370 04 9d 05 e1 0d 04 9e 04 0d 04 9f 0f dd a4 72 77 |..............rw|
00009380 6f 72 64 28 76 25 29 0d 04 a0 24 76 32 25 3d 76 |ord(v%)...$v2%=v|
00009390 25 20 81 34 3a e7 20 76 32 25 2a 34 3c 3e 76 25 |% .4:. v2%*4<>v%|
000093a0 20 76 25 3d 76 32 25 2a 34 2b 34 0d 04 a1 07 3d | v%=v2%*4+4....=|
000093b0 76 25 0d 04 a2 10 dd a4 72 77 6f 72 64 32 28 76 |v%......rword2(v|
000093c0 25 29 0d 04 a3 22 76 32 25 3d 76 25 20 81 34 3a |%)..."v2%=v% .4:|
000093d0 e7 20 76 32 25 2a 34 3c 3e 76 25 20 76 25 3d 76 |. v2%*4<>v% v%=v|
000093e0 32 25 2a 34 0d 04 a4 07 3d 76 25 0d 04 a5 8e dd |2%*4....=v%.....|
000093f0 f2 62 6c 6f 62 73 28 78 30 25 2c 79 30 25 2c 78 |.blobs(x0%,y0%,x|
00009400 31 25 2c 79 31 25 2c 78 32 25 2c 79 32 25 2c 78 |1%,y1%,x2%,y2%,x|
00009410 33 25 2c 79 33 25 29 3a c8 8f 20 c8 90 20 77 78 |3%,y3%):.. .. wx|
00009420 25 2b 78 30 25 2c 77 79 25 2b 79 30 25 2c 36 3a |%+x0%,wy%+y0%,6:|
00009430 c8 8f 20 c8 90 20 77 78 25 2b 78 33 25 2c 77 79 |.. .. wx%+x3%,wy|
00009440 25 2b 79 33 25 2c 36 3a c8 8f 20 c8 90 20 77 78 |%+y3%,6:.. .. wx|
00009450 25 2b 78 31 25 2c 77 79 25 2b 79 31 25 2c 36 3a |%+x1%,wy%+y1%,6:|
00009460 c8 8f 20 c8 90 20 77 78 25 2b 78 32 25 2c 77 79 |.. .. wx%+x2%,wy|
00009470 25 2b 79 32 25 2c 36 3a e1 0d 04 a6 21 dd f2 62 |%+y2%,6:....!..b|
00009480 6c 6f 62 28 78 25 2c 79 25 29 3a c8 8f 20 c8 90 |lob(x%,y%):.. ..|
00009490 20 78 25 2c 79 25 2c 36 3a e1 0d 04 a7 27 dd f2 | x%,y%,6:....'..|
000094a0 62 6c 6f 62 32 28 78 25 2c 79 25 29 3a c8 93 20 |blob2(x%,y%):.. |
000094b0 78 25 2d 34 2c 79 25 2d 34 2c 31 36 2c 31 36 3a |x%-4,y%-4,16,16:|
000094c0 e1 0d 04 a8 04 0d 04 a9 68 dd f2 72 65 64 72 61 |........h..redra|
000094d0 77 69 74 28 68 61 6e 64 25 29 3a 21 47 42 25 3d |wit(hand%):!GB%=|
000094e0 68 61 6e 64 25 3a c8 99 22 57 69 6d 70 5f 47 65 |hand%:.."Wimp_Ge|
000094f0 74 57 69 6e 64 6f 77 4f 75 74 6c 69 6e 65 22 2c |tWindowOutline",|
00009500 2c 47 42 25 3a c8 99 20 57 66 72 63 52 25 2c 2d |,GB%:.. WfrcR%,-|
00009510 31 2c 47 42 25 21 34 2c 47 42 25 21 38 2c 47 42 |1,GB%!4,GB%!8,GB|
00009520 25 21 31 32 2c 47 42 25 21 31 36 3a e1 0d 04 aa |%!12,GB%!16:....|
00009530 73 dd f2 72 64 69 28 68 61 6e 64 25 2c 69 63 6e |s..rdi(hand%,icn|
00009540 25 29 3a e7 68 61 6e 64 25 3c 3d 30 20 e1 20 8b |%):.hand%<=0 . .|
00009550 20 21 67 62 25 3d 68 61 6e 64 25 3a 67 62 25 21 | !gb%=hand%:gb%!|
00009560 34 3d 69 63 6e 25 3a c8 99 57 67 69 73 74 25 2c |4=icn%:..Wgist%,|
00009570 2c 67 62 25 3a c8 99 57 66 72 63 52 25 2c 68 61 |,gb%:..WfrcR%,ha|
00009580 6e 64 25 2c 67 62 25 21 38 2c 67 62 25 21 31 32 |nd%,gb%!8,gb%!12|
00009590 2c 67 62 25 21 31 36 2c 67 62 25 21 32 30 3a e1 |,gb%!16,gb%!20:.|
000095a0 0d 04 ab 2f c8 95 20 67 6f 25 3a c8 99 22 57 69 |.../.. go%:.."Wi|
000095b0 6d 70 5f 47 65 74 52 65 63 74 61 6e 67 6c 65 22 |mp_GetRectangle"|
000095c0 2c 2c 47 42 25 20 b8 20 67 6f 25 3a ce 3a e1 0d |,,GB% . go%:.:..|
000095d0 04 ac 69 dd f2 67 65 74 77 69 6e 69 6e 66 6f 28 |..i..getwininfo(|
000095e0 68 61 6e 64 25 29 3a 21 57 62 25 3d 68 61 6e 64 |hand%):!Wb%=hand|
000095f0 25 3a c8 99 57 67 77 73 74 25 2c 2c 57 62 25 3a |%:..Wgwst%,,Wb%:|
00009600 78 62 61 73 65 25 3d 57 62 25 21 34 3a 79 62 61 |xbase%=Wb%!4:yba|
00009610 73 65 25 3d 57 62 25 21 38 3a 77 69 64 74 68 25 |se%=Wb%!8:width%|
00009620 3d 57 62 25 21 31 32 3a 68 65 69 67 68 74 25 3d |=Wb%!12:height%=|
00009630 57 62 25 21 31 36 3a e1 0d 04 ad 64 dd a4 47 65 |Wb%!16:....d..Ge|
00009640 74 4c 65 61 66 6e 61 6d 65 28 6e 61 6d 65 25 29 |tLeafname(name%)|
00009650 3a ea 20 63 68 24 2c 6e 25 2c 6e 61 6d 65 24 3a |:. ch$,n%,name$:|
00009660 6e 61 6d 65 24 3d a4 73 28 6e 61 6d 65 25 29 3a |name$=.s(name%):|
00009670 e7 28 28 a7 6e 61 6d 65 24 2c 22 2e 22 29 3d 30 |.((.name$,".")=0|
00009680 29 20 80 28 a7 6e 61 6d 65 24 2c 22 3a 22 29 3d |) .(.name$,":")=|
00009690 30 29 29 20 8c 20 3d 6e 61 6d 65 24 0d 04 ae 45 |0)) . =name$...E|
000096a0 6e 25 3d a9 28 6e 61 6d 65 24 29 3a f5 3a 63 68 |n%=.(name$):.:ch|
000096b0 24 3d c1 6e 61 6d 65 24 2c 6e 25 2c 31 29 3a 6e |$=.name$,n%,1):n|
000096c0 25 2d 3d 31 3a fd 28 6e 25 3c 3d 30 20 84 20 63 |%-=1:.(n%<=0 . c|
000096d0 68 24 3d 22 2e 22 20 84 20 63 68 24 3d 22 3a 22 |h$="." . ch$=":"|
000096e0 29 0d 04 af 23 e7 20 6e 25 3e 30 20 8c 20 3d c2 |)...#. n%>0 . =.|
000096f0 6e 61 6d 65 24 2c a9 28 6e 61 6d 65 24 29 2d 6e |name$,.(name$)-n|
00009700 25 2d 31 29 0d 04 b0 07 3d 22 22 0d 04 b1 17 dd |%-1)....="".....|
00009710 a4 73 28 73 25 29 3a e7 3f 73 25 3c 33 32 20 3d |.s(s%):.?s%<32 =|
00009720 22 22 0d 04 b2 2e 6e 24 3d 22 22 3a c8 95 20 3f |""....n$="":.. ?|
00009730 73 25 3e 33 31 20 80 20 a9 6e 24 3c 32 35 35 3a |s%>31 . .n$<255:|
00009740 6e 24 2b 3d bd 3f 73 25 3a 73 25 2b 3d 31 3a ce |n$+=.?s%:s%+=1:.|
00009750 0d 04 b3 07 3d 6e 24 0d 04 b4 04 0d 04 b5 15 dd |....=n$.........|
00009760 f2 72 65 73 69 7a 65 73 6c 6f 74 28 63 63 25 29 |.resizeslot(cc%)|
00009770 0d 04 b6 1b c8 99 57 73 6c 74 25 2c 2d 31 2c 2d |......Wslt%,-1,-|
00009780 31 20 b8 20 2c 2c 66 72 65 65 25 0d 04 b7 6d e7 |1 . ,,free%...m.|
00009790 20 66 72 65 65 25 2b 28 73 6c 73 69 7a 25 2d 62 | free%+(slsiz%-b|
000097a0 61 73 65 73 69 7a 25 29 3c 63 63 25 20 8c 20 45 |asesiz%)<cc% . E|
000097b0 58 25 3d b9 3a f2 72 65 70 65 72 72 28 a4 6d 73 |X%=.:.reperr(.ms|
000097c0 5f 65 78 70 28 22 6d 65 6d 31 22 2c c3 28 28 28 |_exp("mem1",.(((|
000097d0 73 6c 73 69 7a 25 2d 62 61 73 65 73 69 7a 25 2b |slsiz%-basesiz%+|
000097e0 63 63 25 29 2d 66 72 65 65 25 29 2f 31 30 32 34 |cc%)-free%)/1024|
000097f0 29 2c 22 22 29 29 3a e1 0d 04 b8 34 c8 99 57 73 |),"")):....4..Ws|
00009800 6c 74 25 2c 28 62 61 73 65 73 69 7a 25 2b 63 63 |lt%,(basesiz%+cc|
00009810 25 29 2c 2d 31 3a c8 99 57 73 6c 74 25 2c 2d 31 |%),-1:..Wslt%,-1|
00009820 2c 2d 31 20 b8 20 73 6c 73 69 7a 25 0d 04 b9 7f |,-1 . slsiz%....|
00009830 e7 73 6c 73 69 7a 25 3c 62 61 73 65 73 69 7a 25 |.slsiz%<basesiz%|
00009840 2b 63 63 25 20 8c 20 45 58 25 3d b9 3a c8 99 20 |+cc% . EX%=.:.. |
00009850 57 73 6c 74 25 2c 62 61 73 65 73 69 7a 25 2c 2d |Wslt%,basesiz%,-|
00009860 31 3a 73 6c 73 69 7a 25 3d 62 61 73 65 73 69 7a |1:slsiz%=basesiz|
00009870 25 3a f2 72 65 70 65 72 72 28 a4 6d 73 5f 65 78 |%:.reperr(.ms_ex|
00009880 70 28 22 6d 65 6d 31 22 2c c3 28 28 62 61 73 65 |p("mem1",.((base|
00009890 73 69 7a 25 2b 63 63 25 2d 73 6c 73 69 7a 25 29 |siz%+cc%-slsiz%)|
000098a0 2f 31 30 32 34 29 2c 22 22 29 29 0d 04 ba 1b 63 |/1024),""))....c|
000098b0 6c 61 69 6d 73 25 3d 73 6c 73 69 7a 25 2d 62 61 |laims%=slsiz%-ba|
000098c0 73 65 73 69 7a 25 0d 04 bb 05 e1 0d 04 bc 04 0d |sesiz%..........|
000098d0 04 bd 0f dd a4 63 68 65 63 6b 5f 61 64 6a 0d 04 |.....check_adj..|
000098e0 be 24 c8 99 22 57 69 6d 70 5f 47 65 74 50 6f 69 |.$.."Wimp_GetPoi|
000098f0 6e 74 65 72 49 6e 66 6f 22 2c 2c 47 42 25 2b 33 |nterInfo",,GB%+3|
00009900 30 30 0d 04 bf 39 e7 20 28 25 31 31 31 20 80 20 |00...9. (%111 . |
00009910 47 42 25 21 33 30 38 3d 31 29 20 8c 20 3d b9 20 |GB%!308=1) . =. |
00009920 8b 20 e7 20 28 25 31 31 31 20 80 20 47 42 25 21 |. . (%111 . GB%!|
00009930 33 30 38 3d 32 29 20 8c 20 3d 32 0d 04 c0 06 3d |308=2) . =2....=|
00009940 a3 0d 04 c1 39 dd a4 71 75 69 74 72 65 71 28 45 |....9..quitreq(E|
00009950 24 2c 62 6f 78 25 29 3a ea 20 52 45 53 25 3a 21 |$,box%):. RES%:!|
00009960 47 42 25 3d 30 3a 24 28 47 42 25 2b 34 29 3d c0 |GB%=0:$(GB%+4)=.|
00009970 45 24 2c 31 30 30 29 2b bd 30 0d 04 c2 6e e7 20 |E$,100)+.0...n. |
00009980 62 6f 78 25 3d 32 35 35 20 c8 99 22 57 69 6d 70 |box%=255 .."Wimp|
00009990 5f 52 65 70 6f 72 74 45 72 72 6f 72 22 2c 47 42 |_ReportError",GB|
000099a0 25 2c 31 39 2c 22 53 50 61 69 6e 74 22 20 b8 20 |%,19,"SPaint" . |
000099b0 2c 72 65 73 70 25 20 8b 20 c8 99 22 57 69 6d 70 |,resp% . .."Wimp|
000099c0 5f 52 65 70 6f 72 74 45 72 72 6f 72 22 2c 47 42 |_ReportError",GB|
000099d0 25 2c 62 6f 78 25 2c 22 53 50 61 69 6e 74 22 20 |%,box%,"SPaint" |
000099e0 b8 20 2c 72 65 73 70 25 0d 04 c3 0c 3d 72 65 73 |. ,resp%....=res|
000099f0 70 25 3d 31 0d 04 c4 44 dd a4 64 65 63 6f 64 65 |p%=1...D..decode|
00009a00 28 68 61 6e 64 25 2c 57 62 25 2c 67 62 25 29 3a |(hand%,Wb%,gb%):|
00009a10 c8 99 22 57 69 6d 70 5f 44 65 63 6f 64 65 4d 65 |.."Wimp_DecodeMe|
00009a20 6e 75 22 2c 2c 68 61 6e 64 25 2c 57 62 25 2c 67 |nu",,hand%,Wb%,g|
00009a30 62 25 3a 3d 24 67 62 25 0d 04 c5 55 dd f2 67 72 |b%:=$gb%...U..gr|
00009a40 65 79 28 68 25 2c 69 25 29 3a e7 68 25 3e 30 20 |ey(h%,i%):.h%>0 |
00009a50 21 67 62 25 3d 68 25 3a 67 62 25 21 34 3d 69 25 |!gb%=h%:gb%!4=i%|
00009a60 3a 67 62 25 21 38 3d 26 32 30 30 30 30 30 30 3a |:gb%!8=&2000000:|
00009a70 67 62 25 21 31 32 3d 26 46 30 30 30 30 30 30 3a |gb%!12=&F000000:|
00009a80 c8 99 57 73 69 73 74 25 2c 2c 67 62 25 0d 04 c6 |..Wsist%,,gb%...|
00009a90 05 e1 0d 04 c7 1f dd f2 6e 6f 74 73 65 6c 65 63 |........notselec|
00009aa0 74 28 68 25 2c 69 25 29 3a e7 68 25 3c 3d 30 20 |t(h%,i%):.h%<=0 |
00009ab0 e1 0d 04 c8 3d 21 67 62 25 3d 68 25 3a 67 62 25 |....=!gb%=h%:gb%|
00009ac0 21 34 3d 69 25 3a 67 62 25 21 38 3d 26 41 30 30 |!4=i%:gb%!8=&A00|
00009ad0 30 3a 67 62 25 21 31 32 3d 26 46 30 30 30 3a c8 |0:gb%!12=&F000:.|
00009ae0 99 57 73 69 73 74 25 2c 2c 67 62 25 3a e1 0d 04 |.Wsist%,,gb%:...|
00009af0 c9 56 dd f2 62 6c 61 63 6b 28 68 25 2c 69 25 29 |.V..black(h%,i%)|
00009b00 3a e7 68 25 3e 30 20 21 67 62 25 3d 68 25 3a 67 |:.h%>0 !gb%=h%:g|
00009b10 62 25 21 34 3d 69 25 3a 67 62 25 21 38 3d 26 37 |b%!4=i%:gb%!8=&7|
00009b20 30 30 30 30 30 30 3a 67 62 25 21 31 32 3d 26 46 |000000:gb%!12=&F|
00009b30 30 30 30 30 30 30 3a c8 99 57 73 69 73 74 25 2c |000000:..Wsist%,|
00009b40 2c 67 62 25 0d 04 ca 05 e1 0d 04 cb 18 dd f2 65 |,gb%...........e|
00009b50 6e 63 6f 64 65 6d 65 6e 75 28 6d 6e 68 6e 64 25 |ncodemenu(mnhnd%|
00009b60 29 0d 04 cc 28 e7 6d 6e 68 6e 64 25 3c 26 38 30 |)...(.mnhnd%<&80|
00009b70 30 30 20 8c 20 85 20 31 2c 22 42 61 64 20 6d 65 |00 . . 1,"Bad me|
00009b80 6e 75 68 61 6e 64 6c 65 22 0d 04 cd 18 f4 20 50 |nuhandle"..... P|
00009b90 52 4f 43 63 6c 6d 28 6d 5f 72 65 6d 6f 74 65 25 |ROCclm(m_remote%|
00009ba0 29 0d 04 ce 05 e1 0d 04 cf 1e dd f2 74 6b 28 68 |)...........tk(h|
00009bb0 61 6e 64 25 2c 69 63 6e 25 29 3a e7 69 63 6e 25 |and%,icn%):.icn%|
00009bc0 3c 30 20 e1 0d 04 d0 34 68 61 6e 64 25 21 28 32 |<0 ....4hand%!(2|
00009bd0 38 2b 28 32 34 2a 69 63 6e 25 29 29 3d 68 61 6e |8+(24*icn%))=han|
00009be0 64 25 21 28 32 38 2b 28 32 34 2a 69 63 6e 25 29 |d%!(28+(24*icn%)|
00009bf0 29 84 20 26 30 31 3a e1 0d 04 d1 5c dd f2 63 6c |). &01:....\..cl|
00009c00 6d 28 68 61 6e 64 25 29 3a e7 68 61 6e 64 25 3c |m(hand%):.hand%<|
00009c10 26 38 30 30 30 20 85 20 31 2c 22 6d 65 6e 75 20 |&8000 . 1,"menu |
00009c20 68 61 6e 64 6c 65 20 26 22 2b c3 7e 68 61 6e 64 |handle &"+.~hand|
00009c30 25 2b 22 20 63 61 6c 6c 65 64 20 66 6f 72 20 63 |%+" called for c|
00009c40 6c 65 61 72 69 6e 67 20 69 73 20 69 6e 76 61 6c |learing is inval|
00009c50 69 64 2e 22 0d 04 d2 5b 68 61 6e 64 25 2b 3d 32 |id."...[hand%+=2|
00009c60 38 3a f5 3a 21 68 61 6e 64 25 3d 21 68 61 6e 64 |8:.:!hand%=!hand|
00009c70 25 20 80 ac 31 3a 68 61 6e 64 25 21 38 3d 68 61 |% ..1:hand%!8=ha|
00009c80 6e 64 25 21 38 20 80 ac 26 34 30 30 30 30 30 3a |nd%!8 ..&400000:|
00009c90 68 61 6e 64 25 2b 3d 32 34 3a fd 21 28 68 61 6e |hand%+=24:.!(han|
00009ca0 64 25 2d 32 34 29 20 80 20 32 3c 3c 36 3a e1 0d |d%-24) . 2<<6:..|
00009cb0 04 d3 3e dd f2 73 68 61 64 65 28 6d 68 25 2c 49 |..>..shade(mh%,I|
00009cc0 25 29 3a 6d 68 25 21 28 32 38 2b 38 2b 32 34 2a |%):mh%!(28+8+24*|
00009cd0 49 25 29 3d 6d 68 25 21 28 32 38 2b 38 2b 32 34 |I%)=mh%!(28+8+24|
00009ce0 2a 49 25 29 84 26 34 30 30 30 30 3a e1 0d 04 d4 |*I%).&40000:....|
00009cf0 1e dd 20 f2 74 69 63 6b 28 6d 68 25 2c 49 25 29 |.. .tick(mh%,I%)|
00009d00 3a e7 49 25 3c 30 20 49 25 3d 30 0d 04 d5 2c 6d |:.I%<0 I%=0...,m|
00009d10 68 25 21 28 32 38 2b 28 32 34 2a 49 25 29 29 3d |h%!(28+(24*I%))=|
00009d20 6d 68 25 21 28 32 38 2b 28 32 34 2a 49 25 29 29 |mh%!(28+(24*I%))|
00009d30 84 20 26 30 31 3a e1 0d 04 d6 5a dd f2 73 65 6c |. &01:....Z..sel|
00009d40 65 63 74 28 68 25 2c 69 25 29 3a e7 20 68 25 3e |ect(h%,i%):. h%>|
00009d50 30 20 21 67 62 25 3d 68 25 3a 67 62 25 21 34 3d |0 !gb%=h%:gb%!4=|
00009d60 69 25 3a 67 62 25 21 38 3d 26 37 30 30 30 30 30 |i%:gb%!8=&700000|
00009d70 30 3a 67 62 25 21 31 32 3d 26 46 30 30 30 30 30 |0:gb%!12=&F00000|
00009d80 30 3a c8 99 57 73 69 73 74 25 2c 2c 67 62 25 3a |0:..Wsist%,,gb%:|
00009d90 e1 0d 04 d7 05 e1 0d 04 d8 59 dd f2 64 65 73 65 |.........Y..dese|
00009da0 6c 65 63 74 28 68 25 2c 69 25 29 3a e7 68 25 3e |lect(h%,i%):.h%>|
00009db0 30 20 21 67 62 25 3d 68 25 3a 67 62 25 21 34 3d |0 !gb%=h%:gb%!4=|
00009dc0 69 25 3a 67 62 25 21 38 3d 26 34 30 30 30 30 30 |i%:gb%!8=&400000|
00009dd0 30 3a 67 62 25 21 31 32 3d 26 46 30 30 30 30 30 |0:gb%!12=&F00000|
00009de0 30 3a c8 99 57 73 69 73 74 25 2c 2c 67 62 25 0d |0:..Wsist%,,gb%.|
00009df0 04 d9 05 e1 0d 04 da 20 dd f2 6d 73 67 72 65 70 |....... ..msgrep|
00009e00 28 73 74 72 31 24 29 3a 24 65 72 72 62 25 3d 73 |(str1$):$errb%=s|
00009e10 74 72 31 24 0d 04 db 05 e1 0d 04 dc 19 21 67 62 |tr1$.........!gb|
00009e20 25 3d 30 3a 24 28 67 62 25 2b 34 29 3d 73 74 72 |%=0:$(gb%+4)=str|
00009e30 31 24 0d 04 dd 39 c8 99 22 57 69 6d 70 5f 52 65 |1$...9.."Wimp_Re|
00009e40 70 6f 72 74 45 72 72 6f 72 22 2c 67 62 25 2c 31 |portError",gb%,1|
00009e50 37 2c 22 53 50 61 69 6e 74 20 4d 65 73 73 61 67 |7,"SPaint Messag|
00009e60 65 22 20 b8 20 2c 72 65 73 70 25 0d 04 de 05 e1 |e" . ,resp%.....|
00009e70 0d 04 df 04 0d 04 e0 42 dd f2 69 6e 69 74 61 6c |.......B..inital|
00009e80 6c 3a de 20 42 4c 25 20 31 36 2c 6e 61 6d 65 62 |l:. BL% 16,nameb|
00009e90 6c 6b 25 20 32 35 35 3a 61 64 6a 75 73 74 69 6e |lk% 255:adjustin|
00009ea0 67 25 3d a3 3a 6d 61 69 6e 57 5f 61 63 74 69 76 |g%=.:mainW_activ|
00009eb0 65 25 3d a3 3a e1 0d 04 e1 56 dd f2 69 6e 69 74 |e%=.:....V..init|
00009ec0 5f 57 69 6d 70 3a 6d 6e 68 6e 64 25 3d 30 3a f2 |_Wimp:mnhnd%=0:.|
00009ed0 69 6e 69 74 53 79 73 3a f2 73 70 72 69 74 65 73 |initSys:.sprites|
00009ee0 3a f2 6c 6f 61 64 5f 74 65 6d 70 6c 61 74 65 73 |:.load_templates|
00009ef0 3a f2 63 72 65 61 74 65 6d 65 6e 75 73 3a 73 63 |:.createmenus:sc|
00009f00 72 61 70 72 65 66 25 3d 2d 31 3a e1 0d 04 e2 04 |rapref%=-1:.....|
00009f10 0d 04 e3 3b dd a4 74 72 69 70 6c 65 7a 65 72 6f |...;..triplezero|
00009f20 28 76 29 3a ea 20 40 25 3a 40 25 3d 28 31 3c 3c |(v):. @%:@%=(1<<|
00009f30 32 34 29 2b 28 32 3c 3c 31 36 29 2b 28 33 3c 3c |24)+(2<<16)+(3<<|
00009f40 38 29 2b 31 32 3a 3d c3 28 76 29 0d 04 e4 3b dd |8)+12:=.(v)...;.|
00009f50 a4 64 6f 75 62 6c 65 7a 65 72 6f 28 76 29 3a ea |.doublezero(v):.|
00009f60 20 40 25 3a 40 25 3d 28 31 3c 3c 32 34 29 2b 28 | @%:@%=(1<<24)+(|
00009f70 32 3c 3c 31 36 29 2b 28 32 3c 3c 38 29 2b 31 32 |2<<16)+(2<<8)+12|
00009f80 3a 3d c3 28 76 29 0d 04 e5 3b dd a4 73 69 6e 67 |:=.(v)...;..sing|
00009f90 6c 65 7a 65 72 6f 28 76 29 3a ea 20 40 25 3a 40 |lezero(v):. @%:@|
00009fa0 25 3d 28 31 3c 3c 32 34 29 2b 28 32 3c 3c 31 36 |%=(1<<24)+(2<<16|
00009fb0 29 2b 28 31 3c 3c 38 29 2b 31 32 3a 3d c3 28 76 |)+(1<<8)+12:=.(v|
00009fc0 29 0d 04 e6 55 dd a4 61 7a 65 72 6f 28 76 29 3a |)...U..azero(v):|
00009fd0 ea 20 40 25 3a 40 25 3d 28 31 3c 3c 32 34 29 2b |. @%:@%=(1<<24)+|
00009fe0 28 32 3c 3c 31 36 29 2b 28 31 3c 3c 38 29 2b 31 |(2<<16)+(1<<8)+1|
00009ff0 32 3a 76 24 3d c3 28 76 29 3a e7 c2 76 24 2c 32 |2:v$=.(v):..v$,2|
0000a000 29 3d 22 2e 30 22 20 8c 20 3d c0 76 24 2c a9 28 |)=".0" . =.v$,.(|
0000a010 76 24 29 2d 32 29 0d 04 e7 07 3d 76 24 0d 04 e8 |v$)-2)....=v$...|
0000a020 19 dd a4 61 6c 74 28 76 25 29 3a e7 76 25 20 8c |...alt(v%):.v% .|
0000a030 20 3d 22 20 2a 22 0d 04 e9 07 3d 22 22 0d 04 ea | =" *"....=""...|
0000a040 04 0d 04 eb 0d dd f2 69 6e 69 74 53 79 73 0d 04 |.......initSys..|
0000a050 ec 40 c8 99 20 22 57 69 6d 70 5f 49 6e 69 74 69 |.@.. "Wimp_Initi|
0000a060 61 6c 69 73 65 22 2c 32 30 30 2c 26 34 42 35 33 |alise",200,&4B53|
0000a070 34 31 35 34 2c 22 53 69 6d 70 6c 65 20 50 61 69 |4154,"Simple Pai|
0000a080 6e 74 22 20 b8 20 2c 54 61 73 6b 5f 68 25 0d 04 |nt" . ,Task_h%..|
0000a090 ed 2b de 20 53 70 72 69 74 65 4e 61 6d 65 25 20 |.+. SpriteName% |
0000a0a0 31 34 3a 24 53 70 72 69 74 65 4e 61 6d 65 25 3d |14:$SpriteName%=|
0000a0b0 22 21 73 70 61 69 6e 74 22 0d 04 ee 88 21 57 62 |"!spaint"....!Wb|
0000a0c0 25 3d 2d 31 3a 57 62 25 21 34 3d 30 3a 57 62 25 |%=-1:Wb%!4=0:Wb%|
0000a0d0 21 38 3d 30 3a 57 62 25 21 31 32 3d 37 36 3a 57 |!8=0:Wb%!12=76:W|
0000a0e0 62 25 21 31 36 3d 37 36 3a 57 62 25 21 32 30 3d |b%!16=76:Wb%!20=|
0000a0f0 26 37 30 30 30 33 31 31 41 3a 57 62 25 21 32 34 |&7000311A:Wb%!24|
0000a100 3d 53 70 72 69 74 65 4e 61 6d 65 25 3a 57 62 25 |=SpriteName%:Wb%|
0000a110 21 32 38 3d 31 3a 57 62 25 21 33 32 3d 31 32 3a |!28=1:Wb%!32=12:|
0000a120 c8 99 22 57 69 6d 70 5f 43 72 65 61 74 65 49 63 |.."Wimp_CreateIc|
0000a130 6f 6e 22 2c 2c 57 62 25 20 b8 20 69 63 6e 62 68 |on",,Wb% . icnbh|
0000a140 25 0d 04 ef 05 e1 0d 04 f0 04 0d 04 f1 0d dd f2 |%...............|
0000a150 73 70 72 69 74 65 73 0d 04 f2 04 0d 04 f3 23 f2 |sprites.......#.|
0000a160 72 5f 66 69 28 22 3c 53 50 61 69 6e 74 24 44 69 |r_fi("<SPaint$Di|
0000a170 72 3e 2e 53 70 72 69 74 65 73 32 32 22 29 0d 04 |r>.Sprites22")..|
0000a180 f4 6a e7 20 74 68 65 72 65 25 3c 3e 31 20 84 20 |.j. there%<>1 . |
0000a190 28 66 74 25 3c 3e 26 46 43 41 20 80 20 66 74 25 |(ft%<>&FCA . ft%|
0000a1a0 3c 3e 26 46 46 39 29 20 8c 20 85 20 a2 20 31 2c |<>&FF9) . . . 1,|
0000a1b0 22 21 53 70 61 69 6e 74 2e 53 70 72 69 74 65 73 |"!Spaint.Sprites|
0000a1c0 20 6d 69 73 73 69 6e 67 2f 63 6f 72 72 75 70 74 | missing/corrupt|
0000a1d0 2e 20 50 6c 65 61 73 65 20 69 6e 73 74 61 6c 6c |. Please install|
0000a1e0 20 61 67 61 69 6e 2e 22 0d 04 f5 62 e7 20 66 74 | again."...b. ft|
0000a1f0 25 3d 26 46 43 41 20 8c 20 de 20 73 62 6c 6f 63 |%=&FCA . . sbloc|
0000a200 6b 25 20 6f 72 6c 65 6e 25 2b 31 36 3a 21 73 62 |k% orlen%+16:!sb|
0000a210 6c 6f 63 6b 25 3d 6f 72 6c 65 6e 25 2b 31 36 20 |lock%=orlen%+16 |
0000a220 8b 20 de 20 73 62 6c 6f 63 6b 25 20 6c 65 6e 67 |. . sblock% leng|
0000a230 74 68 25 2b 31 36 3a 21 73 62 6c 6f 63 6b 25 3d |th%+16:!sblock%=|
0000a240 6c 65 6e 67 74 68 25 2b 31 36 0d 04 f6 2a 73 62 |length%+16...*sb|
0000a250 6c 6f 63 6b 25 21 34 3d 30 3a 73 62 6c 6f 63 6b |lock%!4=0:sblock|
0000a260 25 21 38 3d 31 36 3a 73 62 6c 6f 63 6b 25 21 31 |%!8=16:sblock%!1|
0000a270 32 3d 31 36 0d 04 f7 10 e7 20 66 74 25 3d 26 46 |2=16..... ft%=&F|
0000a280 43 41 20 8c 0d 04 f8 56 66 6c 25 3d 6f 72 6c 65 |CA ....Vfl%=orle|
0000a290 6e 25 2b 34 3a 6f 75 74 73 69 7a 65 25 3d 6f 72 |n%+4:outsize%=or|
0000a2a0 6c 65 6e 25 3a f2 6c 6f 61 64 73 71 75 61 73 68 |len%:.loadsquash|
0000a2b0 65 64 28 22 3c 53 50 61 69 6e 74 24 44 69 72 3e |ed("<SPaint$Dir>|
0000a2c0 2e 53 70 72 69 74 65 73 32 32 22 2c 73 62 6c 6f |.Sprites22",sblo|
0000a2d0 63 6b 25 2b 34 2c 26 31 34 29 0d 04 f9 18 e7 45 |ck%+4,&14).....E|
0000a2e0 58 25 20 8c 20 c8 99 20 22 58 4f 53 5f 45 78 69 |X% . .. "XOS_Exi|
0000a2f0 74 22 0d 04 fa 05 cc 0d 04 fb 9e e7 20 66 74 25 |t".......... ft%|
0000a300 3d 26 46 46 39 20 8c 20 c8 99 53 70 6f 70 25 2c |=&FF9 . ..Spop%,|
0000a310 35 32 32 2c 73 62 6c 6f 63 6b 25 2c 22 3c 53 50 |522,sblock%,"<SP|
0000a320 61 69 6e 74 24 44 69 72 3e 2e 53 70 72 69 74 65 |aint$Dir>.Sprite|
0000a330 73 32 32 22 20 8b f2 72 65 70 65 72 72 28 22 53 |s22" ..reperr("S|
0000a340 70 61 69 6e 74 20 53 70 72 69 74 65 73 20 61 72 |paint Sprites ar|
0000a350 65 20 63 6f 72 72 75 70 74 20 6f 72 20 6d 69 73 |e corrupt or mis|
0000a360 73 69 6e 67 2e 20 50 6c 65 61 73 65 20 72 65 69 |sing. Please rei|
0000a370 6e 73 74 61 6c 6c 20 74 68 65 20 70 72 6f 67 72 |nstall the progr|
0000a380 61 6d 2e 22 2c 22 22 29 3a c8 99 22 58 4f 53 5f |am.",""):.."XOS_|
0000a390 45 78 69 74 22 0d 04 fc 05 cd 0d 04 fd 05 e1 0d |Exit"...........|
0000a3a0 04 fe 04 0d 04 ff 39 dd f2 6c 6f 61 64 5f 74 65 |......9..load_te|
0000a3b0 6d 70 6c 61 74 65 73 3a 73 74 25 3d 73 74 79 6c |mplates:st%=styl|
0000a3c0 65 69 6e 64 69 72 3a 73 74 65 25 3d 73 74 79 6c |eindir:ste%=styl|
0000a3d0 65 69 6e 64 69 72 2b 26 31 33 30 30 0d 05 00 33 |eindir+&1300...3|
0000a3e0 c8 99 22 57 69 6d 70 5f 4f 70 65 6e 54 65 6d 70 |.."Wimp_OpenTemp|
0000a3f0 6c 61 74 65 22 2c 2c 22 3c 53 50 61 69 6e 74 24 |late",,"<SPaint$|
0000a400 44 69 72 3e 2e 54 65 6d 70 6c 61 74 65 73 22 0d |Dir>.Templates".|
0000a410 05 01 04 0d 05 02 04 0d 05 03 68 c8 99 57 6c 74 |..........h..Wlt|
0000a420 25 2c 2c 77 61 64 25 28 31 29 2c 73 74 25 2c 73 |%,,wad%(1),st%,s|
0000a430 74 65 25 2c 2d 31 2c 22 69 6e 66 6f 22 2c 30 20 |te%,-1,"info",0 |
0000a440 b8 20 2c 2c 73 74 78 25 3a 77 61 64 25 28 31 29 |. ,,stx%:wad%(1)|
0000a450 21 36 34 3d 73 62 6c 6f 63 6b 25 3a 73 74 25 3d |!64=sblock%:st%=|
0000a460 73 74 78 25 3a c8 99 20 57 63 77 25 2c 2c 77 61 |stx%:.. Wcw%,,wa|
0000a470 64 25 28 31 29 20 b8 20 77 5f 69 6e 66 6f 25 0d |d%(1) . w_info%.|
0000a480 05 04 23 73 70 6c 69 74 5f 68 61 6e 64 25 3d 2d |..#split_hand%=-|
0000a490 31 3a 72 65 73 74 6f 72 65 5f 68 61 6e 64 25 3d |1:restore_hand%=|
0000a4a0 2d 31 0d 05 05 5f c8 99 20 57 6c 74 25 2c 2c 47 |-1..._.. Wlt%,,G|
0000a4b0 42 25 2c 73 74 25 2c 73 74 65 25 2c 2d 31 2c 22 |B%,st%,ste%,-1,"|
0000a4c0 67 65 6e 65 72 61 6c 73 61 76 65 22 2c 30 20 b8 |generalsave",0 .|
0000a4d0 20 2c 2c 73 74 78 25 3a 47 42 25 21 36 34 3d 31 | ,,stx%:GB%!64=1|
0000a4e0 3a 73 74 25 3d 73 74 78 25 3a c8 99 20 57 63 77 |:st%=stx%:.. Wcw|
0000a4f0 25 2c 2c 47 42 25 20 b8 20 67 65 6e 73 61 76 65 |%,,GB% . gensave|
0000a500 25 0d 05 06 59 c8 99 20 57 6c 74 25 2c 2c 47 42 |%...Y.. Wlt%,,GB|
0000a510 25 2c 73 74 25 2c 73 74 65 25 2c 2d 31 2c 22 70 |%,st%,ste%,-1,"p|
0000a520 72 65 66 73 22 2c 30 20 b8 20 2c 2c 73 74 78 25 |refs",0 . ,,stx%|
0000a530 3a 47 42 25 21 36 34 3d 31 3a 73 74 25 3d 73 74 |:GB%!64=1:st%=st|
0000a540 78 25 3a c8 99 20 57 63 77 25 2c 2c 47 42 25 20 |x%:.. Wcw%,,GB% |
0000a550 b8 20 77 5f 70 72 65 66 73 25 0d 05 07 6c c8 99 |. w_prefs%...l..|
0000a560 20 57 6c 74 25 2c 2c 47 42 25 2c 73 74 25 2c 73 | Wlt%,,GB%,st%,s|
0000a570 74 65 25 2c 2d 31 2c 22 72 65 6d 6f 74 65 22 2c |te%,-1,"remote",|
0000a580 30 20 b8 20 2c 2c 73 74 78 25 3a 6d 61 69 6e 74 |0 . ,,stx%:maint|
0000a590 25 3d 73 74 25 3a 47 42 25 21 36 34 3d 73 62 6c |%=st%:GB%!64=sbl|
0000a5a0 6f 63 6b 25 3a 73 74 25 3d 73 74 78 25 3a c8 99 |ock%:st%=stx%:..|
0000a5b0 20 57 63 77 25 2c 2c 47 42 25 20 b8 20 6d 5f 72 | Wcw%,,GB% . m_r|
0000a5c0 65 6d 6f 74 65 25 0d 05 08 6b c8 99 20 57 6c 74 |emote%...k.. Wlt|
0000a5d0 25 2c 2c 47 42 25 2c 73 74 25 2c 73 74 65 25 2c |%,,GB%,st%,ste%,|
0000a5e0 2d 31 2c 22 6c 6f 63 61 6c 22 2c 30 20 b8 20 2c |-1,"local",0 . ,|
0000a5f0 2c 73 74 78 25 3a 6c 6f 63 61 6c 74 25 3d 73 74 |,stx%:localt%=st|
0000a600 25 3a 47 42 25 21 36 34 3d 73 62 6c 6f 63 6b 25 |%:GB%!64=sblock%|
0000a610 3a 73 74 25 3d 73 74 78 25 3a c8 99 20 57 63 77 |:st%=stx%:.. Wcw|
0000a620 25 2c 2c 47 42 25 20 b8 20 6d 5f 6c 6f 63 61 6c |%,,GB% . m_local|
0000a630 25 0d 05 09 04 0d 05 0a 65 c8 99 57 6c 74 25 2c |%.......e..Wlt%,|
0000a640 2c 47 42 25 2c 73 74 25 2c 73 74 65 25 2c 2d 31 |,GB%,st%,ste%,-1|
0000a650 2c 22 72 65 70 6f 72 74 22 2c 30 20 b8 20 2c 2c |,"report",0 . ,,|
0000a660 73 74 78 25 3a 47 42 25 21 36 34 3d 31 3a 6d 73 |stx%:GB%!64=1:ms|
0000a670 67 74 69 74 25 3d 73 74 25 3a 73 74 25 3d 73 74 |gtit%=st%:st%=st|
0000a680 78 25 3a c8 99 57 63 77 25 2c 2c 47 42 25 20 b8 |x%:..Wcw%,,GB% .|
0000a690 20 77 5f 72 65 70 6f 72 74 25 0d 05 0b 04 0d 05 | w_report%......|
0000a6a0 0c 62 c8 99 57 6c 74 25 2c 2c 47 42 25 2c 73 74 |.b..Wlt%,,GB%,st|
0000a6b0 25 2c 73 74 65 25 2c 2d 31 2c 22 6c 6f 63 61 6c |%,ste%,-1,"local|
0000a6c0 74 6f 6f 6c 22 2c 30 20 b8 20 2c 2c 73 74 78 25 |tool",0 . ,,stx%|
0000a6d0 3a 47 42 25 21 36 34 3d 73 62 6c 6f 63 6b 25 3a |:GB%!64=sblock%:|
0000a6e0 73 74 25 3d 73 74 78 25 3a c8 99 57 63 77 25 2c |st%=stx%:..Wcw%,|
0000a6f0 2c 47 42 25 20 b8 20 77 5f 6c 6f 63 61 6c 74 25 |,GB% . w_localt%|
0000a700 0d 05 0d 04 0d 05 0e 64 c8 99 57 6c 74 25 2c 2c |.......d..Wlt%,,|
0000a710 47 42 25 2c 73 74 25 2c 73 74 65 25 2c 2d 31 2c |GB%,st%,ste%,-1,|
0000a720 22 72 65 6d 6f 74 65 74 6f 6f 6c 22 2c 30 20 b8 |"remotetool",0 .|
0000a730 20 2c 2c 73 74 78 25 3a 47 42 25 21 36 34 3d 73 | ,,stx%:GB%!64=s|
0000a740 62 6c 6f 63 6b 25 3a 73 74 25 3d 73 74 78 25 3a |block%:st%=stx%:|
0000a750 c8 99 57 63 77 25 2c 2c 47 42 25 20 b8 20 77 5f |..Wcw%,,GB% . w_|
0000a760 72 65 6d 6f 74 65 74 25 0d 05 0f 04 0d 05 10 0f |remotet%........|
0000a770 f4 20 21 21 21 50 43 41 21 21 21 0d 05 11 3d f4 |. !!!PCA!!!...=.|
0000a780 20 6b 65 65 70 20 74 68 65 20 77 69 6e 64 6f 77 | keep the window|
0000a790 20 63 72 65 61 74 65 20 62 6c 6f 63 6b 20 66 6f | create block fo|
0000a7a0 72 20 74 68 65 20 50 43 41 20 64 69 61 6c 6f 67 |r the PCA dialog|
0000a7b0 75 65 20 61 73 20 77 65 0d 05 12 40 f4 20 6e 65 |ue as we...@. ne|
0000a7c0 65 64 20 74 6f 20 64 65 6c 65 74 65 20 61 6e 64 |ed to delete and|
0000a7d0 20 72 65 63 72 65 61 74 65 20 69 6e 20 6f 72 64 | recreate in ord|
0000a7e0 65 72 20 74 6f 20 61 64 64 20 74 68 65 20 73 63 |er to add the sc|
0000a7f0 72 6f 6c 6c 62 61 72 2e 0d 05 13 25 de 20 70 63 |rollbar....%. pc|
0000a800 61 5f 77 62 6c 6f 63 6b 25 20 32 35 36 2c 70 63 |a_wblock% 256,pc|
0000a810 61 5f 77 69 6e 64 69 72 25 20 31 30 30 0d 05 14 |a_windir% 100...|
0000a820 6b c8 99 57 6c 74 25 2c 2c 70 63 61 5f 77 62 6c |k..Wlt%,,pca_wbl|
0000a830 6f 63 6b 25 2c 70 63 61 5f 77 69 6e 64 69 72 25 |ock%,pca_windir%|
0000a840 2c 70 63 61 5f 77 69 6e 64 69 72 25 2b 31 30 30 |,pca_windir%+100|
0000a850 2c 2d 31 2c 22 6f 6c 65 32 22 2c 30 3a 47 42 25 |,-1,"ole2",0:GB%|
0000a860 21 36 34 3d 73 62 6c 6f 63 6b 25 3a c8 99 57 63 |!64=sblock%:..Wc|
0000a870 77 25 2c 2c 70 63 61 5f 77 62 6c 6f 63 6b 25 20 |w%,,pca_wblock% |
0000a880 b8 20 70 63 61 5f 77 25 0d 05 15 04 0d 05 16 34 |. pca_w%.......4|
0000a890 c8 99 22 57 69 6d 70 5f 43 6c 6f 73 65 54 65 6d |.."Wimp_CloseTem|
0000a8a0 70 6c 61 74 65 22 2c 2c 22 3c 53 50 61 69 6e 74 |plate",,"<SPaint|
0000a8b0 24 44 69 72 3e 2e 54 65 6d 70 6c 61 74 65 73 22 |$Dir>.Templates"|
0000a8c0 0d 05 17 25 e7 20 65 6e 64 25 20 ef 34 2c 33 30 |...%. end% .4,30|
0000a8d0 3a c8 99 36 2c 34 2c 30 3a c8 99 20 36 2c 32 32 |:..6,4,0:.. 6,22|
0000a8e0 39 2c 30 3a e0 0d 05 18 44 e7 20 73 74 25 3e 3d |9,0:....D. st%>=|
0000a8f0 73 74 65 25 20 8c 20 85 20 31 2c 22 69 6e 64 69 |ste% . . 1,"indi|
0000a900 72 65 63 74 69 6f 6e 20 6f 76 65 72 6c 61 70 20 |rection overlap |
0000a910 77 68 65 6e 20 6c 6f 61 64 69 6e 67 20 77 69 6e |when loading win|
0000a920 64 6f 77 73 2e 22 3a c8 98 0d 05 19 17 f4 50 52 |dows.":.......PR|
0000a930 4f 43 64 65 66 61 75 6c 74 73 74 72 69 6e 67 73 |OCdefaultstrings|
0000a940 0d 05 1a 05 e1 0d 05 1b 4b dd f2 6f 6f 28 77 69 |........K..oo(wi|
0000a950 6e 25 2c 49 63 6e 25 2c 73 74 61 74 65 25 29 3a |n%,Icn%,state%):|
0000a960 e7 20 73 74 61 74 65 25 20 f2 75 69 28 77 69 6e |. state% .ui(win|
0000a970 25 2c 49 63 6e 25 2c 30 29 20 8b 20 f2 75 69 28 |%,Icn%,0) . .ui(|
0000a980 77 69 6e 25 2c 49 63 6e 25 2c 31 3c 3c 32 31 29 |win%,Icn%,1<<21)|
0000a990 0d 05 1c 05 e1 0d 05 1d 16 dd f2 61 6c 6c 6f 77 |...........allow|
0000a9a0 28 77 69 6e 25 2c 69 63 6e 25 29 0d 05 1e 4c 21 |(win%,icn%)...L!|
0000a9b0 67 62 25 3d 77 69 6e 25 3a 67 62 25 21 34 3d 69 |gb%=win%:gb%!4=i|
0000a9c0 63 6e 25 3a 67 62 25 21 38 3d 30 3c 3c 32 32 3a |cn%:gb%!8=0<<22:|
0000a9d0 67 62 25 21 31 32 3d 31 3c 3c 32 32 3a c8 99 22 |gb%!12=1<<22:.."|
0000a9e0 57 69 6d 70 5f 53 65 74 49 63 6f 6e 53 74 61 74 |Wimp_SetIconStat|
0000a9f0 65 22 2c 2c 67 62 25 0d 05 1f 05 e1 0d 05 20 19 |e",,gb%....... .|
0000aa00 dd f2 64 69 73 61 6c 6c 6f 77 28 77 69 6e 25 2c |..disallow(win%,|
0000aa10 69 63 6e 25 29 0d 05 21 4c 21 67 62 25 3d 77 69 |icn%)..!L!gb%=wi|
0000aa20 6e 25 3a 67 62 25 21 34 3d 69 63 6e 25 3a 67 62 |n%:gb%!4=icn%:gb|
0000aa30 25 21 38 3d 31 3c 3c 32 32 3a 67 62 25 21 31 32 |%!8=1<<22:gb%!12|
0000aa40 3d 31 3c 3c 32 32 3a c8 99 22 57 69 6d 70 5f 53 |=1<<22:.."Wimp_S|
0000aa50 65 74 49 63 6f 6e 53 74 61 74 65 22 2c 2c 67 62 |etIconState",,gb|
0000aa60 25 0d 05 22 05 e1 0d 05 23 11 dd f2 63 72 65 61 |%.."....#...crea|
0000aa70 74 65 6d 65 6e 75 73 0d 05 24 2c de 20 6d 65 6e |temenus..$,. men|
0000aa80 75 66 72 65 65 25 20 26 38 30 30 3a 6d 65 6e 75 |ufree% &800:menu|
0000aa90 65 6e 64 25 3d 6d 65 6e 75 66 72 65 65 25 2b 26 |end%=menufree%+&|
0000aaa0 38 30 30 0d 05 25 3a de 20 62 75 66 66 65 72 25 |800..%:. buffer%|
0000aab0 20 26 34 30 30 3a 6d 61 78 62 75 66 66 25 3d 62 | &400:maxbuff%=b|
0000aac0 75 66 66 65 72 25 2b 26 34 30 30 3a 63 75 72 72 |uffer%+&400:curr|
0000aad0 62 75 66 66 25 3d 62 75 66 66 65 72 25 0d 05 26 |buff%=buffer%..&|
0000aae0 1e 46 25 3d ad 28 22 3c 53 50 61 69 6e 74 24 44 |.F%=.("<SPaint$D|
0000aaf0 69 72 3e 2e 6d 65 6e 75 73 22 29 0d 05 27 2c e7 |ir>.menus")..',.|
0000ab00 46 25 3d 30 20 8c 20 85 20 a2 20 31 2c a4 6d 73 |F%=0 . . . 1,.ms|
0000ab10 28 22 6e 6f 6d 65 6e 75 73 22 29 3a c8 99 22 4f |("nomenus"):.."O|
0000ab20 53 5f 45 78 69 74 22 0d 05 28 16 73 75 62 6d 73 |S_Exit"..(.subms|
0000ab30 67 25 3d a3 3a 77 69 64 25 28 29 3d 34 0d 05 29 |g%=.:wid%()=4..)|
0000ab40 0c 77 62 70 74 72 25 3d 31 0d 05 2a 0d 73 75 62 |.wbptr%=1..*.sub|
0000ab50 6d 73 67 25 3d a3 0d 05 2b 17 6d 5f 66 69 6c 65 |msg%=...+.m_file|
0000ab60 25 3d a4 63 6d 65 6e 28 be 23 46 25 29 0d 05 2c |%=.cmen(.#F%)..,|
0000ab70 23 6d 5f 69 62 61 72 25 3d a4 63 6d 65 6e 28 be |#m_ibar%=.cmen(.|
0000ab80 23 46 25 29 3a 6e 75 6d 66 6f 6e 74 73 25 3d 30 |#F%):numfonts%=0|
0000ab90 0d 05 2d 1a 6d 6d 5f 72 65 6d 6f 74 65 25 3d a4 |..-.mm_remote%=.|
0000aba0 63 6d 65 6e 28 be 23 46 25 29 0d 05 2e 08 d9 23 |cmen(.#F%).....#|
0000abb0 46 25 0d 05 2f 05 e1 0d 05 30 04 0d 05 31 1a dd |F%../....0...1..|
0000abc0 f2 6d 65 6e 75 28 6d 25 2c 6d 6f 75 78 25 2c 6d |.menu(m%,moux%,m|
0000abd0 6f 75 79 25 29 0d 05 32 0d 6d 6e 68 6e 64 25 3d |ouy%)..2.mnhnd%=|
0000abe0 6d 25 0d 05 33 46 f2 65 6e 63 6f 64 65 6d 65 6e |m%..3F.encodemen|
0000abf0 75 28 6d 6e 68 6e 64 25 29 3a c8 99 22 57 69 6d |u(mnhnd%):.."Wim|
0000ac00 70 5f 43 72 65 61 74 65 4d 65 6e 75 22 2c 2c 6d |p_CreateMenu",,m|
0000ac10 6e 68 6e 64 25 2c 6d 6f 75 78 25 2b 31 30 30 2c |nhnd%,moux%+100,|
0000ac20 6d 6f 75 79 25 2b 31 32 0d 05 34 37 e7 20 6d 6f |mouy%+12..47. mo|
0000ac30 75 78 25 3c 3e 30 20 80 20 6d 6f 75 79 25 3c 3e |ux%<>0 . mouy%<>|
0000ac40 30 20 8c 20 6d 6f 75 73 65 78 25 3d 6d 6f 75 78 |0 . mousex%=moux|
0000ac50 25 3a 6d 6f 75 73 65 79 25 3d 6d 6f 75 79 25 0d |%:mousey%=mouy%.|
0000ac60 05 35 05 e1 0d 05 36 11 dd a4 63 6d 65 6e 28 6d |.5....6...cmen(m|
0000ac70 65 6e 75 24 29 0d 05 37 1e e7 6d 65 6e 75 66 72 |enu$)..7..menufr|
0000ac80 65 65 25 3e 6d 65 6e 75 65 6e 64 25 2d 32 38 20 |ee%>menuend%-28 |
0000ac90 3d 2d 31 0d 05 38 0a ea 6d 25 2c 6d 24 0d 05 39 |=-1..8..m%,m$..9|
0000aca0 22 6d 65 6e 75 70 74 72 25 3d 6d 65 6e 75 66 72 |"menuptr%=menufr|
0000acb0 65 65 25 3a 69 25 3d 30 3a 63 74 72 25 3d 30 0d |ee%:i%=0:ctr%=0.|
0000acc0 05 3a 41 e7 c0 6d 65 6e 75 24 2c 31 29 3d 22 23 |.:A..menu$,1)="#|
0000acd0 22 20 8c 20 69 25 3d 31 3a 6d 65 6e 75 74 69 74 |" . i%=1:menutit|
0000ace0 6c 65 24 3d a4 70 61 72 28 22 5c 22 2c 69 25 29 |le$=.par("\",i%)|
0000acf0 20 8b 20 6d 65 6e 75 74 69 74 6c 65 24 3d 22 22 | . menutitle$=""|
0000ad00 0d 05 3b 9e 6d 65 6e 75 70 74 72 25 21 32 30 3d |..;.menuptr%!20=|
0000ad10 34 30 3a 24 6d 65 6e 75 70 74 72 25 3d 6d 65 6e |40:$menuptr%=men|
0000ad20 75 74 69 74 6c 65 24 3a 6d 65 6e 75 70 74 72 25 |utitle$:menuptr%|
0000ad30 3f 31 32 3d 37 3a 6d 65 6e 75 70 74 72 25 3f 31 |?12=7:menuptr%?1|
0000ad40 33 3d 32 3a 6d 65 6e 75 70 74 72 25 3f 31 34 3d |3=2:menuptr%?14=|
0000ad50 37 3a 6d 65 6e 75 70 74 72 25 3f 31 35 3d 30 3a |7:menuptr%?15=0:|
0000ad60 6d 65 6e 75 70 74 72 25 21 31 36 3d 31 37 32 3a |menuptr%!16=172:|
0000ad70 6d 65 6e 75 70 74 72 25 21 32 34 3d 30 3a 6d 65 |menuptr%!24=0:me|
0000ad80 6e 75 70 74 72 25 2b 3d 32 38 3a 6d 61 78 78 25 |nuptr%+=28:maxx%|
0000ad90 3d a9 6d 65 6e 75 74 69 74 6c 65 24 2d 33 0d 05 |=.menutitle$-3..|
0000ada0 3c 4c f5 3a 69 74 65 6d 24 3d a4 70 61 72 28 22 |<L.:item$=.par("|
0000adb0 5c 22 2c 69 25 29 3a f2 6d 65 6e 75 69 74 65 6d |\",i%):.menuitem|
0000adc0 28 69 74 65 6d 24 29 3a fd 20 69 74 65 6d 24 3d |(item$):. item$=|
0000add0 22 22 20 84 20 6d 65 6e 75 70 74 72 25 3e 3d 6d |"" . menuptr%>=m|
0000ade0 65 6e 75 65 6e 64 25 2d 32 34 0d 05 3d 25 21 28 |enuend%-24..=%!(|
0000adf0 6d 65 6e 75 70 74 72 25 2d 32 34 29 3d 21 28 6d |menuptr%-24)=!(m|
0000ae00 65 6e 75 70 74 72 25 2d 32 34 29 84 26 38 30 0d |enuptr%-24).&80.|
0000ae10 05 3e 22 6d 25 3d 6d 65 6e 75 66 72 65 65 25 3a |.>"m%=menufree%:|
0000ae20 6d 25 21 31 36 3d 6d 61 78 78 25 2a 31 36 2b 31 |m%!16=maxx%*16+1|
0000ae30 32 0d 05 3f 16 6d 65 6e 75 66 72 65 65 25 3d 6d |2..?.menufree%=m|
0000ae40 65 6e 75 70 74 72 25 0d 05 40 07 3d 6d 25 0d 05 |enuptr%..@.=m%..|
0000ae50 41 14 dd f2 6d 65 6e 75 69 74 65 6d 28 6e 6d 65 |A...menuitem(nme|
0000ae60 24 29 0d 05 42 0e e7 6e 6d 65 24 3d 22 22 20 e1 |$)..B..nme$="" .|
0000ae70 0d 05 43 1b e7 6d 65 6e 75 70 74 72 25 2b 32 34 |..C..menuptr%+24|
0000ae80 3e 6d 65 6e 75 65 6e 64 25 20 e1 0d 05 44 26 ea |>menuend% ...D&.|
0000ae90 20 66 6c 67 25 2c 69 25 3a e7 73 75 62 6d 73 67 | flg%,i%:.submsg|
0000aea0 25 20 66 6c 67 25 3d 38 20 8b 20 66 6c 67 25 3d |% flg%=8 . flg%=|
0000aeb0 30 0d 05 45 11 69 25 3d a7 6e 6d 65 24 2c 22 3e |0..E.i%=.nme$,">|
0000aec0 22 29 0d 05 46 0b e7 69 25 3e 30 20 8c 0d 05 47 |")..F..i%>0 ...G|
0000aed0 43 73 75 62 70 74 72 25 3d a0 c1 6e 6d 65 24 2c |Csubptr%=..nme$,|
0000aee0 69 25 2b 31 29 3a e7 c1 6e 6d 65 24 2c 69 25 2b |i%+1):..nme$,i%+|
0000aef0 31 29 3d 22 69 5f 66 6f 6e 74 25 22 20 66 6f 6e |1)="i_font%" fon|
0000af00 74 73 75 62 25 3d 6d 65 6e 75 70 74 72 25 2b 34 |tsub%=menuptr%+4|
0000af10 0d 05 48 14 6e 6d 65 24 3d c0 6e 6d 65 24 2c 69 |..H.nme$=.nme$,i|
0000af20 25 2d 31 29 0d 05 49 10 cc 20 73 75 62 70 74 72 |%-1)..I.. subptr|
0000af30 25 3d 2d 31 0d 05 4a 05 cd 0d 05 4b 2f e7 c2 6e |%=-1..J....K/..n|
0000af40 6d 65 24 2c 31 29 3d 22 23 22 20 6e 6d 65 24 3d |me$,1)="#" nme$=|
0000af50 c0 6e 6d 65 24 2c a9 6e 6d 65 24 2d 31 29 3a 66 |.nme$,.nme$-1):f|
0000af60 6c 67 25 2b 3d 26 30 32 0d 05 4c 3b 6d 65 6e 75 |lg%+=&02..L;menu|
0000af70 70 74 72 25 21 30 3d 66 6c 67 25 3a 6d 65 6e 75 |ptr%!0=flg%:menu|
0000af80 70 74 72 25 21 34 3d 73 75 62 70 74 72 25 3a 6d |ptr%!4=subptr%:m|
0000af90 65 6e 75 70 74 72 25 21 38 3d 26 30 37 30 30 30 |enuptr%!8=&07000|
0000afa0 30 32 31 0d 05 4d 13 e7 c0 6e 6d 65 24 2c 31 29 |021..M...nme$,1)|
0000afb0 3d 22 24 22 20 8c 0d 05 4e 31 21 6d 65 6e 75 70 |="$" ...N1!menup|
0000afc0 74 72 25 2b 3d 26 30 34 3a 6d 65 6e 75 70 74 72 |tr%+=&04:menuptr|
0000afd0 25 21 38 2b 3d 26 31 30 30 3a 69 25 3d a7 6e 6d |%!8+=&100:i%=.nm|
0000afe0 65 24 2c 22 28 22 29 0d 05 4f 33 e7 69 25 3e 30 |e$,"(")..O3.i%>0|
0000aff0 20 8c 20 4c 25 3d bb c1 6e 6d 65 24 2c 69 25 2b | . L%=..nme$,i%+|
0000b000 31 29 3a 6e 6d 65 24 3d c0 6e 6d 65 24 2c 69 25 |1):nme$=.nme$,i%|
0000b010 2d 31 29 8b 20 4c 25 3d 31 32 0d 05 50 37 6d 65 |-1). L%=12..P7me|
0000b020 6e 75 70 74 72 25 21 31 32 3d a0 c1 6e 6d 65 24 |nuptr%!12=..nme$|
0000b030 2c 32 29 3a 6d 65 6e 75 70 74 72 25 21 31 36 3d |,2):menuptr%!16=|
0000b040 2d 31 3a 6d 65 6e 75 70 74 72 25 21 32 30 3d 4c |-1:menuptr%!20=L|
0000b050 25 0d 05 51 12 e7 4c 25 3e 31 35 20 8c 20 4c 25 |%..Q..L%>15 . L%|
0000b060 3d 31 35 0d 05 52 13 6e 6d 65 24 3d c4 4c 25 2d |=15..R.nme$=.L%-|
0000b070 31 2c 22 20 22 29 0d 05 53 05 cc 0d 05 54 10 e7 |1," ")..S....T..|
0000b080 a9 6e 6d 65 24 3c 3d 31 32 20 8c 0d 05 55 17 24 |.nme$<=12 ...U.$|
0000b090 28 6d 65 6e 75 70 74 72 25 2b 31 32 29 3d 6e 6d |(menuptr%+12)=nm|
0000b0a0 65 24 0d 05 56 25 cc 20 49 25 3d a4 77 6f 72 6b |e$..V%. I%=.work|
0000b0b0 73 70 61 63 65 28 a9 6e 6d 65 24 2b 31 29 3a 24 |space(.nme$+1):$|
0000b0c0 49 25 3d 6e 6d 65 24 0d 05 57 52 6d 65 6e 75 70 |I%=nme$..WRmenup|
0000b0d0 74 72 25 21 31 32 3d 49 25 3a 6d 65 6e 75 70 74 |tr%!12=I%:menupt|
0000b0e0 72 25 21 31 36 3d 2d 31 3a 6d 65 6e 75 70 74 72 |r%!16=-1:menuptr|
0000b0f0 25 21 32 30 3d a9 6e 6d 65 24 2b 31 3a 6d 65 6e |%!20=.nme$+1:men|
0000b100 75 70 74 72 25 21 38 3d 6d 65 6e 75 70 74 72 25 |uptr%!8=menuptr%|
0000b110 21 38 20 84 20 26 31 30 30 0d 05 58 05 cd 0d 05 |!8 . &100..X....|
0000b120 59 05 cd 0d 05 5a 1c e7 a9 6e 6d 65 24 3e 6d 61 |Y....Z...nme$>ma|
0000b130 78 78 25 20 6d 61 78 78 25 3d a9 6e 6d 65 24 0d |xx% maxx%=.nme$.|
0000b140 05 5b 10 6d 65 6e 75 70 74 72 25 2b 3d 32 34 0d |.[.menuptr%+=24.|
0000b150 05 5c 05 e1 0d 05 5d 52 dd a4 70 61 72 28 73 65 |.\....]R..par(se|
0000b160 70 24 2c f8 20 70 6f 73 25 29 3a 69 31 25 3d 70 |p$,. pos%):i1%=p|
0000b170 6f 73 25 2b 31 3a 70 6f 73 25 3d a7 6d 65 6e 75 |os%+1:pos%=.menu|
0000b180 24 2b 73 65 70 24 2c 73 65 70 24 2c 69 31 25 29 |$+sep$,sep$,i1%)|
0000b190 3a 3d c1 6d 65 6e 75 24 2c 69 31 25 2c 70 6f 73 |:=.menu$,i1%,pos|
0000b1a0 25 2d 69 31 25 29 0d 05 5e 13 dd a4 77 6f 72 6b |%-i1%)..^...work|
0000b1b0 73 70 61 63 65 28 4c 25 29 0d 05 5f 59 e7 20 63 |space(L%).._Y. c|
0000b1c0 75 72 72 62 75 66 66 25 2b 4c 25 3e 6d 61 78 62 |urrbuff%+L%>maxb|
0000b1d0 75 66 66 25 20 8c 20 85 20 31 2c 22 4e 6f 20 72 |uff% . . 1,"No r|
0000b1e0 6f 6f 6d 20 74 6f 20 73 74 6f 72 65 20 6d 65 6e |oom to store men|
0000b1f0 75 20 64 65 66 69 6e 69 74 69 6f 6e 73 20 2d 20 |u definitions - |
0000b200 20 74 6f 6f 20 6d 61 6e 79 20 66 6f 6e 74 73 20 | too many fonts |
0000b210 3f 22 0d 05 60 1f 63 75 72 72 62 75 66 66 25 2b |?"..`.currbuff%+|
0000b220 3d 4c 25 3a 3d 63 75 72 72 62 75 66 66 25 2d 4c |=L%:=currbuff%-L|
0000b230 25 0d 05 61 6e dd f2 73 65 74 75 70 73 74 6f 72 |%..an..setupstor|
0000b240 65 73 3a 6f 66 66 73 65 74 25 3d 30 3a f7 2b 32 |es:offset%=0:.+2|
0000b250 3a e3 6c 6f 70 78 25 3d 31 20 b8 32 3a f3 20 72 |:.lopx%=1 .2:. r|
0000b260 65 71 75 69 72 65 64 25 3a 77 61 64 25 28 6c 6f |equired%:wad%(lo|
0000b270 70 78 25 29 3d 67 65 6e 65 72 61 6c 73 74 6f 72 |px%)=generalstor|
0000b280 65 25 2b 6f 66 66 73 65 74 25 3a 6f 66 66 73 65 |e%+offset%:offse|
0000b290 74 25 2b 3d 72 65 71 75 69 72 65 64 25 3a ed 0d |t%+=required%:..|
0000b2a0 05 62 33 e7 6f 66 66 73 65 74 25 3e 26 38 30 30 |.b3.offset%>&800|
0000b2b0 20 85 20 31 2c 22 4e 6f 20 72 6f 6f 6d 20 66 6f | . 1,"No room fo|
0000b2c0 72 20 77 69 6e 64 6f 77 20 73 74 6f 72 61 67 65 |r window storage|
0000b2d0 2e 22 0d 05 63 05 e1 0d 05 64 0f dc 20 26 35 30 |."..c....d.. &50|
0000b2e0 30 2c 26 31 30 30 0d 05 65 04 0d 05 66 12 dd a4 |0,&100..e...f...|
0000b2f0 73 74 72 28 6e 75 6d 29 3a ea 20 85 0d 05 67 50 |str(num):. ...gP|
0000b300 ee 85 20 ea 20 c8 99 22 58 4f 53 5f 52 65 6c 65 |.. . .."XOS_Rele|
0000b310 61 73 65 22 2c 33 2c 77 72 63 68 76 25 2c 70 6f |ase",3,wrchv%,po|
0000b320 73 73 61 64 64 72 25 3a f2 72 65 70 65 72 72 28 |ssaddr%:.reperr(|
0000b330 f6 24 2b 22 20 63 6f 64 65 20 6e 75 6d 62 65 72 |.$+" code number|
0000b340 20 22 2b c3 7e 9e 29 3a 3d 22 30 22 0d 05 68 33 | "+.~.):="0"..h3|
0000b350 21 70 6f 73 73 61 64 64 72 25 3d 67 62 25 3a c8 |!possaddr%=gb%:.|
0000b360 99 31 33 31 31 30 33 2c 33 2c 77 72 63 68 76 25 |.131103,3,wrchv%|
0000b370 2c 70 6f 73 73 61 64 64 72 25 3a f1 6e 75 6d 0d |,possaddr%:.num.|
0000b380 05 69 1f c8 99 31 33 31 31 30 34 2c 33 2c 77 72 |.i...131104,3,wr|
0000b390 63 68 76 25 2c 70 6f 73 73 61 64 64 72 25 0d 05 |chv%,possaddr%..|
0000b3a0 6a 2b 73 24 3d 24 67 62 25 3a c8 95 20 c0 73 24 |j+s$=$gb%:.. .s$|
0000b3b0 2c 31 29 3d bd 33 32 3a 73 24 3d c2 73 24 2c a9 |,1)=.32:s$=.s$,.|
0000b3c0 28 73 24 29 2d 31 29 3a ce 0d 05 6b 1b c8 95 20 |(s$)-1):...k... |
0000b3d0 c2 73 24 2c 31 29 3c bd 33 32 3a 73 24 3d c0 73 |.s$,1)<.32:s$=.s|
0000b3e0 24 29 3a ce 0d 05 6c 07 3d 73 24 0d 05 6d 04 0d |$):...l.=s$..m..|
0000b3f0 05 6e 13 dd f2 61 73 73 65 6d 62 6c 65 5f 62 6c |.n...assemble_bl|
0000b400 69 74 0d 05 6f 12 de 20 73 70 61 63 65 25 20 26 |it..o.. space% &|
0000b410 31 41 30 30 0d 05 70 2b 63 63 72 25 3d 30 3a 63 |1A00..p+ccr%=0:c|
0000b420 63 67 25 3d 31 3a 63 63 62 25 3d 32 3a 72 6f 25 |cg%=1:ccb%=2:ro%|
0000b430 3d 38 3a 67 6f 25 3d 39 3a 62 6f 25 3d 31 30 0d |=8:go%=9:bo%=10.|
0000b440 05 71 15 72 25 3d 31 31 3a 67 25 3d 31 32 3a 62 |.q.r%=11:g%=12:b|
0000b450 25 3d 31 34 0d 05 72 15 72 64 25 3d 34 3a 67 64 |%=14..r.rd%=4:gd|
0000b460 25 3d 35 3a 62 64 25 3d 37 0d 05 73 12 e3 6f 70 |%=5:bd%=7..s..op|
0000b470 74 3d 30 20 b8 20 32 20 88 20 32 0d 05 74 0d 50 |t=0 . 2 . 2..t.P|
0000b480 25 3d 73 70 61 63 65 25 0d 05 75 0c 5b 4f 50 54 |%=space%..u.[OPT|
0000b490 20 6f 70 74 0d 05 76 04 0d 05 77 0b 2e 6d 6f 76 | opt..v...w..mov|
0000b4a0 65 74 6f 0d 05 78 0c 5c 72 30 3d 73 72 63 25 0d |eto..x.\r0=src%.|
0000b4b0 05 79 0c 5c 72 31 3d 64 65 73 25 0d 05 7a 0c 5c |.y.\r1=des%..z.\|
0000b4c0 72 32 3d 6c 65 6e 25 0d 05 7b 20 5c 72 33 3d 30 |r2=len%..{ \r3=0|
0000b4d0 20 66 6f 72 20 77 6f 72 64 73 2c 20 31 20 66 6f | for words, 1 fo|
0000b4e0 72 20 62 79 74 65 73 0d 05 7c 1a 43 4d 50 20 52 |r bytes..|.CMP R|
0000b4f0 32 2c 23 30 3a 4d 4f 56 4c 45 20 50 43 2c 52 31 |2,#0:MOVLE PC,R1|
0000b500 34 0d 05 7d 17 43 4d 50 20 52 30 2c 52 31 3a ec |4..}.CMP R0,R1:.|
0000b510 51 20 50 43 2c 52 31 34 0d 05 7e 1b 43 4d 50 20 |Q PC,R14..~.CMP |
0000b520 52 33 2c 23 30 3a 42 4e 45 20 6d 6f 76 65 62 79 |R3,#0:BNE moveby|
0000b530 74 65 73 0d 05 7f 0e 2e 6d 6f 76 65 77 6f 72 64 |tes.....moveword|
0000b540 73 0d 05 80 16 43 4d 50 20 52 30 2c 52 31 3a 42 |s....CMP R0,R1:B|
0000b550 4c 45 20 65 6c 73 65 0d 05 81 0f 5c 20 73 72 63 |LE else....\ src|
0000b560 25 3e 64 65 73 25 0d 05 82 1a 4d 4f 56 20 52 33 |%>des%....MOV R3|
0000b570 2c 23 30 3a 53 55 42 20 52 36 2c 52 32 2c 23 34 |,#0:SUB R6,R2,#4|
0000b580 0d 05 83 0a 2e 66 6f 72 31 6d 0d 05 84 21 4c 44 |.....for1m...!LD|
0000b590 52 20 52 35 2c 5b 52 30 2c 52 33 5d 3a 53 54 52 |R R5,[R0,R3]:STR|
0000b5a0 20 52 35 2c 5b 52 31 2c 52 33 5d 0d 05 85 24 41 | R5,[R1,R3]...$A|
0000b5b0 44 44 20 52 33 2c 52 33 2c 23 34 3a 43 4d 50 20 |DD R3,R3,#4:CMP |
0000b5c0 52 33 2c 52 36 3a 42 4c 45 20 66 6f 72 31 6d 0d |R3,R6:BLE for1m.|
0000b5d0 05 86 0e 4d 4f 56 20 50 43 2c 52 31 34 0d 05 87 |...MOV PC,R14...|
0000b5e0 09 2e 65 6c 73 65 0d 05 88 10 53 55 42 20 52 33 |..else....SUB R3|
0000b5f0 2c 52 32 2c 23 34 0d 05 89 0a 2e 66 6f 72 32 6d |,R2,#4.....for2m|
0000b600 0d 05 8a 21 4c 44 52 20 52 35 2c 5b 52 30 2c 52 |...!LDR R5,[R0,R|
0000b610 33 5d 3a 53 54 52 20 52 35 2c 5b 52 31 2c 52 33 |3]:STR R5,[R1,R3|
0000b620 5d 0d 05 8b 11 53 55 42 53 20 52 33 2c 52 33 2c |]....SUBS R3,R3,|
0000b630 23 34 0d 05 8c 0d 42 47 45 20 66 6f 72 32 6d 0d |#4....BGE for2m.|
0000b640 05 8d 0e 4d 4f 56 20 50 43 2c 52 31 34 0d 05 8e |...MOV PC,R14...|
0000b650 04 0d 05 8f 0e 2e 6d 6f 76 65 62 79 74 65 73 0d |......movebytes.|
0000b660 05 90 0e 2e 74 72 75 65 6d 6f 76 65 62 0d 05 91 |....truemoveb...|
0000b670 17 43 4d 50 20 52 30 2c 52 31 3a 42 4c 45 20 65 |.CMP R0,R1:BLE e|
0000b680 6c 73 65 62 0d 05 92 0f 5c 20 73 72 63 25 3e 64 |lseb....\ src%>d|
0000b690 65 73 25 0d 05 93 0d 4d 4f 56 20 52 33 2c 23 30 |es%....MOV R3,#0|
0000b6a0 0d 05 94 0b 2e 66 6f 72 31 6d 62 0d 05 95 30 4c |.....for1mb...0L|
0000b6b0 44 52 42 20 52 35 2c 5b 52 30 2c 52 33 5d 3a 53 |DRB R5,[R0,R3]:S|
0000b6c0 54 52 42 20 52 35 2c 5b 52 31 2c 52 33 5d 3a 41 |TRB R5,[R1,R3]:A|
0000b6d0 44 44 20 52 33 2c 52 33 2c 23 31 0d 05 96 18 43 |DD R3,R3,#1....C|
0000b6e0 4d 50 20 52 33 2c 52 32 3a 42 4c 54 20 66 6f 72 |MP R3,R2:BLT for|
0000b6f0 31 6d 62 0d 05 97 0e 4d 4f 56 20 50 43 2c 52 31 |1mb....MOV PC,R1|
0000b700 34 0d 05 98 0a 2e 65 6c 73 65 62 0d 05 99 10 53 |4.....elseb....S|
0000b710 55 42 20 52 33 2c 52 32 2c 23 31 0d 05 9a 0b 2e |UB R3,R2,#1.....|
0000b720 66 6f 72 32 6d 62 0d 05 9b 23 4c 44 52 42 20 52 |for2mb...#LDRB R|
0000b730 35 2c 5b 52 30 2c 52 33 5d 3a 53 54 52 42 20 52 |5,[R0,R3]:STRB R|
0000b740 35 2c 5b 52 31 2c 52 33 5d 0d 05 9c 11 53 55 42 |5,[R1,R3]....SUB|
0000b750 53 20 52 33 2c 52 33 2c 23 31 0d 05 9d 0e 42 47 |S R3,R3,#1....BG|
0000b760 45 20 66 6f 72 32 6d 62 0d 05 9e 0e 4d 4f 56 20 |E for2mb....MOV |
0000b770 50 43 2c 52 31 34 0d 05 9f 04 0d 05 a0 04 0d 05 |PC,R14..........|
0000b780 a1 0e 2e 63 6f 70 79 64 61 74 61 25 0d 05 a2 14 |...copydata%....|
0000b790 3b 20 72 30 20 3d 73 6f 75 72 63 65 20 70 74 72 |; r0 =source ptr|
0000b7a0 0d 05 a3 12 3b 20 72 31 20 3d 64 65 73 74 20 70 |....; r1 =dest p|
0000b7b0 74 72 0d 05 a4 10 3b 20 72 32 20 3d 6c 65 6e 67 |tr....; r2 =leng|
0000b7c0 74 68 0d 05 a5 04 0d 05 a6 5a 2e 63 6f 70 79 77 |th.......Z.copyw|
0000b7d0 6f 72 64 73 6c 3a 54 53 54 20 52 32 2c 23 33 31 |ordsl:TST R2,#31|
0000b7e0 3a 4c 44 52 4e 45 20 52 33 2c 5b 52 30 5d 2c 23 |:LDRNE R3,[R0],#|
0000b7f0 34 3a 53 54 52 4e 45 20 52 33 2c 5b 52 31 5d 2c |4:STRNE R3,[R1],|
0000b800 23 34 3a 53 55 42 4e 45 20 52 32 2c 52 32 2c 23 |#4:SUBNE R2,R2,#|
0000b810 34 3a 42 4e 45 20 63 6f 70 79 77 6f 72 64 73 6c |4:BNE copywordsl|
0000b820 0d 05 a7 0d 54 45 51 20 52 32 2c 23 30 0d 05 a8 |....TEQ R2,#0...|
0000b830 4e 4c 44 4d 4e 45 49 41 20 52 30 21 2c 7b 72 35 |NLDMNEIA R0!,{r5|
0000b840 2d 72 31 32 7d 3a 53 54 4d 4e 45 49 41 20 52 31 |-r12}:STMNEIA R1|
0000b850 21 2c 7b 72 35 2d 72 31 32 7d 3a 53 55 42 4e 45 |!,{r5-r12}:SUBNE|
0000b860 53 20 52 32 2c 52 32 2c 23 38 2a 34 3a 42 4e 45 |S R2,R2,#8*4:BNE|
0000b870 20 63 6f 70 79 77 6f 72 64 73 6c 0d 05 a9 0e 4d | copywordsl....M|
0000b880 4f 56 20 50 43 2c 52 31 34 0d 05 aa 34 2e 63 6f |OV PC,R14...4.co|
0000b890 70 79 6a 3a 4d 4f 56 20 52 30 2c 52 32 3a 4d 4f |pyj:MOV R0,R2:MO|
0000b8a0 56 20 52 31 2c 52 33 3a 4d 4f 56 20 52 32 2c 52 |V R1,R3:MOV R2,R|
0000b8b0 34 3a 42 20 63 6f 70 79 64 61 74 61 25 0d 05 ab |4:B copydata%...|
0000b8c0 04 0d 05 ac 0c 2e 4e 69 63 65 41 67 25 0d 05 ad |......NiceAg%...|
0000b8d0 21 4d 4f 56 20 52 34 2c 23 30 3a 4d 4f 56 20 52 |!MOV R4,#0:MOV R|
0000b8e0 37 2c 23 31 3a 42 20 67 72 6f 75 70 64 6f 0d 05 |7,#1:B groupdo..|
0000b8f0 ae 0d 2e 4e 69 63 65 44 61 67 25 0d 05 af 25 4d |...NiceDag%...%M|
0000b900 4f 56 20 52 34 2c 23 31 3c 3c 32 32 3a 4d 4f 56 |OV R4,#1<<22:MOV|
0000b910 20 52 37 2c 23 30 3a 42 20 67 72 6f 75 70 64 6f | R7,#0:B groupdo|
0000b920 0d 05 b0 04 0d 05 b1 0c 2e 67 72 6f 75 70 64 6f |.........groupdo|
0000b930 0d 05 b2 18 3b 20 72 30 20 3d 20 77 69 6e 64 6f |....; r0 = windo|
0000b940 77 20 68 61 6e 64 6c 65 0d 05 b3 11 3b 20 72 31 |w handle....; r1|
0000b950 20 3d 20 6d 69 6e 5f 69 63 0d 05 b4 11 3b 20 72 | = min_ic....; r|
0000b960 32 20 3d 20 6d 61 78 5f 69 63 0d 05 b5 04 0d 05 |2 = max_ic......|
0000b970 b6 33 4d 4f 56 20 52 38 2c 52 30 3a 4d 4f 56 20 |.3MOV R8,R0:MOV |
0000b980 52 39 2c 52 31 3a 4d 4f 56 20 52 31 30 2c 52 32 |R9,R1:MOV R10,R2|
0000b990 3a 53 54 4d 46 44 20 52 31 33 21 2c 7b 52 31 34 |:STMFD R13!,{R14|
0000b9a0 7d 0d 05 b7 11 4d 4f 56 20 52 35 2c 23 31 3c 3c |}....MOV R5,#1<<|
0000b9b0 32 32 0d 05 b8 04 0d 05 b9 11 53 54 52 20 52 38 |22........STR R8|
0000b9c0 2c 77 69 6e 64 6f 77 0d 05 ba 09 2e 6c 6f 6f 70 |,window.....loop|
0000b9d0 0d 05 bb 0f 53 54 52 20 52 39 2c 69 63 6f 6e 0d |....STR R9,icon.|
0000b9e0 05 bc 10 41 44 52 20 52 31 2c 62 6c 6f 63 6b 0d |...ADR R1,block.|
0000b9f0 05 bd 1c 53 57 49 20 22 58 57 69 6d 70 5f 47 65 |...SWI "XWimp_Ge|
0000ba00 74 49 63 6f 6e 53 74 61 74 65 22 0d 05 be 4d 4c |tIconState"...ML|
0000ba10 44 52 20 52 31 32 2c 66 6c 61 67 73 3a 4d 4f 56 |DR R12,flags:MOV|
0000ba20 20 52 31 32 2c 52 31 32 2c 4c 53 52 23 32 32 3a | R12,R12,LSR#22:|
0000ba30 80 20 52 31 32 2c 52 31 32 2c 23 31 3a 43 4d 50 |. R12,R12,#1:CMP|
0000ba40 20 52 31 32 2c 52 37 3a 3b 20 69 73 20 69 74 20 | R12,R7:; is it |
0000ba50 73 68 61 64 65 64 20 3f 0d 05 bf 0a 42 4e 45 20 |shaded ?....BNE |
0000ba60 6f 6b 0d 05 c0 0f 3b 20 63 68 61 6e 67 65 20 69 |ok....; change i|
0000ba70 74 0d 05 c1 23 53 54 52 20 52 34 2c 65 6f 72 77 |t...#STR R4,eorw|
0000ba80 6f 72 64 3a 53 54 52 20 52 35 2c 63 6c 65 61 72 |ord:STR R5,clear|
0000ba90 77 6f 72 64 0d 05 c2 10 41 44 52 20 52 31 2c 62 |word....ADR R1,b|
0000baa0 6c 6f 63 6b 0d 05 c3 1c 53 57 49 20 22 58 57 69 |lock....SWI "XWi|
0000bab0 6d 70 5f 53 65 74 49 63 6f 6e 53 74 61 74 65 22 |mp_SetIconState"|
0000bac0 0d 05 c4 07 2e 6f 6b 0d 05 c5 24 41 44 44 20 52 |.....ok...$ADD R|
0000bad0 39 2c 52 39 2c 23 31 3a 43 4d 50 20 52 39 2c 52 |9,R9,#1:CMP R9,R|
0000bae0 31 30 3a 42 4c 45 20 6c 6f 6f 70 0d 05 c6 13 4c |10:BLE loop....L|
0000baf0 44 4d 46 44 20 52 31 33 21 2c 7b 50 43 7d 0d 05 |DMFD R13!,{PC}..|
0000bb00 c7 04 0d 05 c8 0a 2e 62 6c 6f 63 6b 0d 05 c9 12 |.......block....|
0000bb10 2e 77 69 6e 64 6f 77 20 45 51 55 44 20 30 0d 05 |.window EQUD 0..|
0000bb20 ca 12 2e 69 63 6f 6e 20 20 20 45 51 55 44 20 30 |...icon EQUD 0|
0000bb30 0d 05 cb 04 0d 05 cc 15 2e 65 6f 72 77 6f 72 64 |.........eorword|
0000bb40 20 20 20 45 51 55 44 20 30 0d 05 cd 15 2e 63 6c | EQUD 0.....cl|
0000bb50 65 61 72 77 6f 72 64 20 45 51 55 44 20 30 0d 05 |earword EQUD 0..|
0000bb60 ce 11 2e 64 61 74 61 32 20 45 51 55 44 20 30 0d |...data2 EQUD 0.|
0000bb70 05 cf 0a 45 51 55 44 20 30 0d 05 d0 04 0d 05 d1 |...EQUD 0.......|
0000bb80 21 3b 20 62 69 74 20 32 32 20 6f 66 20 66 6c 61 |!; bit 22 of fla|
0000bb90 67 73 20 3d 73 68 61 64 65 64 20 62 69 74 0d 05 |gs =shaded bit..|
0000bba0 d2 22 3b 20 62 69 74 73 20 31 32 2d 31 35 20 20 |."; bits 12-15 |
0000bbb0 20 20 20 20 3d 62 75 74 74 6f 6e 20 74 79 70 65 | =button type|
0000bbc0 0d 05 d3 04 0d 05 d4 11 2e 66 6c 61 67 73 20 45 |.........flags E|
0000bbd0 51 55 44 20 30 0d 05 d5 11 2e 64 61 74 61 30 20 |QUD 0.....data0 |
0000bbe0 45 51 55 44 20 30 0d 05 d6 11 2e 64 61 74 61 31 |EQUD 0.....data1|
0000bbf0 20 45 51 55 44 20 30 0d 05 d7 11 2e 64 61 74 61 | EQUD 0.....data|
0000bc00 32 20 45 51 55 44 20 30 0d 05 d8 11 2e 64 61 74 |2 EQUD 0.....dat|
0000bc10 61 33 20 45 51 55 44 20 30 0d 05 d9 04 0d 05 da |a3 EQUD 0.......|
0000bc20 0c 2e 4e 69 63 65 44 61 25 0d 05 db 10 3b 20 72 |..NiceDa%....; r|
0000bc30 30 20 3d 77 69 6e 64 6f 77 0d 05 dc 0e 3b 20 72 |0 =window....; r|
0000bc40 31 20 3d 69 63 6f 6e 0d 05 dd 18 4d 4f 56 20 52 |1 =icon....MOV R|
0000bc50 32 2c 52 31 3a 42 20 4e 69 63 65 44 61 67 25 0d |2,R1:B NiceDag%.|
0000bc60 05 de 0b 2e 4e 69 63 65 41 25 0d 05 df 11 3b 20 |....NiceA%....; |
0000bc70 72 30 20 3d 20 77 69 6e 64 6f 77 0d 05 e0 0f 3b |r0 = window....;|
0000bc80 20 72 31 20 3d 20 69 63 6f 6e 0d 05 e1 17 4d 4f | r1 = icon....MO|
0000bc90 56 20 52 32 2c 52 31 3a 42 20 4e 69 63 65 41 67 |V R2,R1:B NiceAg|
0000bca0 25 0d 05 e2 04 0d 05 e3 04 0d 05 e4 0f 3b 20 21 |%............; !|
0000bcb0 21 21 50 43 41 21 21 21 0d 05 e5 43 3b 20 75 73 |!!PCA!!!...C; us|
0000bcc0 65 64 20 62 79 20 74 68 65 20 64 69 61 6c 6f 67 |ed by the dialog|
0000bcd0 75 65 20 72 65 64 72 61 77 20 63 6f 64 65 20 74 |ue redraw code t|
0000bce0 6f 20 73 69 6d 75 6c 61 74 65 20 27 72 31 27 20 |o simulate 'r1' |
0000bcf0 73 74 79 6c 65 20 69 63 6f 6e 73 0d 05 e6 04 0d |style icons.....|
0000bd00 05 e7 09 2e 62 64 72 25 0d 05 e8 08 3b 20 78 30 |....bdr%....; x0|
0000bd10 0d 05 e9 08 3b 20 79 30 0d 05 ea 08 3b 20 78 31 |....; y0....; x1|
0000bd20 0d 05 eb 08 3b 20 79 31 0d 05 ec 04 0d 05 ed 26 |....; y1.......&|
0000bd30 3b 20 73 69 6d 75 6c 61 74 65 20 41 63 6f 72 6e |; simulate Acorn|
0000bd40 20 73 74 79 6c 65 20 27 72 31 27 20 62 6f 72 64 | style 'r1' bord|
0000bd50 65 72 0d 05 ee 04 0d 05 ef 2e 4d 4f 56 20 52 39 |er........MOV R9|
0000bd60 2c 52 30 3a 4d 4f 56 20 52 31 30 2c 52 31 3a 4d |,R0:MOV R10,R1:M|
0000bd70 4f 56 20 52 31 31 2c 52 32 3a 4d 4f 56 20 52 31 |OV R11,R2:MOV R1|
0000bd80 32 2c 52 33 0d 05 f0 04 0d 05 f1 0d 4d 4f 56 20 |2,R3........MOV |
0000bd90 52 30 2c 23 30 0d 05 f2 0e 53 57 49 20 26 36 30 |R0,#0....SWI &60|
0000bda0 30 45 36 0d 05 f3 04 0d 05 f4 04 0d 05 f5 0d 3b |0E6............;|
0000bdb0 20 6c 68 20 73 69 64 65 0d 05 f6 47 4d 4f 56 20 | lh side...GMOV |
0000bdc0 52 30 2c 23 34 3a 53 55 42 20 52 31 2c 52 39 2c |R0,#4:SUB R1,R9,|
0000bdd0 23 32 3a 53 55 42 20 52 32 2c 52 31 30 2c 23 32 |#2:SUB R2,R10,#2|
0000bde0 3a 53 57 49 20 22 4f 53 5f 50 6c 6f 74 22 3a 3b |:SWI "OS_Plot":;|
0000bdf0 20 6d 6f 76 65 20 78 30 2d 32 2c 79 30 2d 32 0d | move x0-2,y0-2.|
0000be00 05 f7 35 4d 4f 56 20 52 30 2c 23 35 3a 4d 4f 56 |..5MOV R0,#5:MOV|
0000be10 20 52 32 2c 52 31 32 3a 53 57 49 20 22 4f 53 5f | R2,R12:SWI "OS_|
0000be20 50 6c 6f 74 22 3a 3b 20 64 72 61 77 20 78 30 2d |Plot":; draw x0-|
0000be30 32 2c 79 31 0d 05 f8 04 0d 05 f9 37 4d 4f 56 20 |2,y1.......7MOV |
0000be40 52 30 2c 23 34 3a 53 55 42 20 52 31 2c 52 31 2c |R0,#4:SUB R1,R1,|
0000be50 23 32 3a 53 57 49 20 22 4f 53 5f 50 6c 6f 74 22 |#2:SWI "OS_Plot"|
0000be60 3a 3b 20 6d 6f 76 65 20 78 30 2d 34 2c 79 31 0d |:; move x0-4,y1.|
0000be70 05 fa 3a 4d 4f 56 20 52 30 2c 23 35 3a 53 55 42 |..:MOV R0,#5:SUB|
0000be80 20 52 32 2c 52 31 30 2c 23 34 3a 53 57 49 20 22 | R2,R10,#4:SWI "|
0000be90 4f 53 5f 50 6c 6f 74 22 3a 3b 20 64 72 61 77 20 |OS_Plot":; draw |
0000bea0 78 30 2d 34 2c 79 30 2d 34 0d 05 fb 04 0d 05 fc |x0-4,y0-4.......|
0000beb0 09 3b 20 74 6f 70 0d 05 fd 29 4d 4f 56 20 52 30 |.; top...)MOV R0|
0000bec0 2c 23 34 3a 41 44 44 20 52 32 2c 52 31 32 2c 23 |,#4:ADD R2,R12,#|
0000bed0 34 3a 53 57 49 20 22 4f 53 5f 50 6c 6f 74 22 0d |4:SWI "OS_Plot".|
0000bee0 05 fe 44 4d 4f 56 20 52 30 2c 23 35 3a 41 44 44 |..DMOV R0,#5:ADD|
0000bef0 20 52 31 2c 52 31 31 2c 23 32 3a 53 57 49 20 22 | R1,R11,#2:SWI "|
0000bf00 4f 53 5f 50 6c 6f 74 22 3a 3b 20 64 72 61 77 20 |OS_Plot":; draw |
0000bf10 78 30 2d 34 2c 79 31 2b 34 2c 78 31 2b 32 2c 79 |x0-4,y1+4,x1+2,y|
0000bf20 31 2b 34 0d 05 ff 44 4d 4f 56 20 52 30 2c 23 34 |1+4...DMOV R0,#4|
0000bf30 3a 53 55 42 20 52 31 2c 52 31 2c 23 32 3a 53 55 |:SUB R1,R1,#2:SU|
0000bf40 42 20 52 32 2c 52 32 2c 23 32 3a 53 57 49 20 22 |B R2,R2,#2:SWI "|
0000bf50 4f 53 5f 50 6c 6f 74 22 3a 3b 20 6d 6f 76 65 20 |OS_Plot":; move |
0000bf60 78 31 2c 79 31 2b 32 0d 06 00 40 4d 4f 56 20 52 |x1,y1+2...@MOV R|
0000bf70 30 2c 23 35 3a 53 55 42 20 52 31 2c 52 39 2c 23 |0,#5:SUB R1,R9,#|
0000bf80 34 3a 53 57 49 20 22 4f 53 5f 50 6c 6f 74 22 3b |4:SWI "OS_Plot";|
0000bf90 20 64 72 61 77 20 78 30 2d 34 2c 79 31 2b 32 2c | draw x0-4,y1+2,|
0000bfa0 78 31 2c 79 31 2b 32 0d 06 01 04 0d 06 02 04 0d |x1,y1+2.........|
0000bfb0 06 03 0d 4d 4f 56 20 52 30 2c 23 34 0d 06 04 0e |...MOV R0,#4....|
0000bfc0 53 57 49 20 26 36 30 30 45 36 0d 06 05 04 0d 06 |SWI &600E6......|
0000bfd0 06 0b 3b 62 6f 74 74 6f 6d 0d 06 07 47 4d 4f 56 |..;bottom...GMOV|
0000bfe0 20 52 30 2c 23 34 3a 53 55 42 20 52 31 2c 52 39 | R0,#4:SUB R1,R9|
0000bff0 2c 23 32 3a 53 55 42 20 52 32 2c 52 31 30 2c 23 |,#2:SUB R2,R10,#|
0000c000 34 3a 53 57 49 20 22 4f 53 5f 50 6c 6f 74 22 3a |4:SWI "OS_Plot":|
0000c010 3b 20 6d 6f 76 65 20 78 30 2d 32 2c 79 30 2d 34 |; move x0-2,y0-4|
0000c020 0d 06 08 3a 4d 4f 56 20 52 30 2c 23 35 3a 41 44 |...:MOV R0,#5:AD|
0000c030 44 20 52 31 2c 52 31 31 2c 23 34 3a 53 57 49 20 |D R1,R11,#4:SWI |
0000c040 22 4f 53 5f 50 6c 6f 74 22 3a 3b 20 64 72 61 77 |"OS_Plot":; draw|
0000c050 20 78 31 2b 32 2c 79 30 2d 34 0d 06 09 04 0d 06 | x1+2,y0-4......|
0000c060 0a 45 4d 4f 56 20 52 30 2c 23 34 3a 53 55 42 20 |.EMOV R0,#4:SUB |
0000c070 52 31 2c 52 31 2c 23 30 3a 53 55 42 20 52 32 2c |R1,R1,#0:SUB R2,|
0000c080 52 31 30 2c 23 32 3a 53 57 49 20 22 4f 53 5f 50 |R10,#2:SWI "OS_P|
0000c090 6c 6f 74 22 3a 3b 20 6d 6f 76 65 20 78 31 2c 79 |lot":; move x1,y|
0000c0a0 30 2d 32 0d 06 0b 33 4d 4f 56 20 52 30 2c 23 35 |0-2...3MOV R0,#5|
0000c0b0 3a 4d 4f 56 20 52 31 2c 52 39 3a 53 57 49 22 4f |:MOV R1,R9:SWI"O|
0000c0c0 53 5f 50 6c 6f 74 22 3a 3b 20 64 72 61 77 20 78 |S_Plot":; draw x|
0000c0d0 30 2c 79 30 2d 32 0d 06 0c 04 0d 06 0d 0a 3b 72 |0,y0-2........;r|
0000c0e0 69 67 68 74 0d 06 0e 04 0d 06 0f 34 4d 4f 56 20 |ight.......4MOV |
0000c0f0 52 30 2c 23 34 3a 41 44 44 20 52 31 2c 52 31 31 |R0,#4:ADD R1,R11|
0000c100 2c 23 32 3a 4d 4f 56 20 52 32 2c 52 31 30 3a 53 |,#2:MOV R2,R10:S|
0000c110 57 49 20 22 4f 53 5f 50 6c 6f 74 22 0d 06 10 29 |WI "OS_Plot"...)|
0000c120 4d 4f 56 20 52 30 2c 23 35 3a 41 44 44 20 52 32 |MOV R0,#5:ADD R2|
0000c130 2c 52 31 32 2c 23 32 3a 53 57 49 20 22 4f 53 5f |,R12,#2:SWI "OS_|
0000c140 50 6c 6f 74 22 0d 06 11 04 0d 06 12 34 4d 4f 56 |Plot".......4MOV|
0000c150 20 52 30 2c 23 34 3a 41 44 44 20 52 31 2c 52 31 | R0,#4:ADD R1,R1|
0000c160 31 2c 23 34 3a 4d 4f 56 20 52 32 2c 52 31 30 3a |1,#4:MOV R2,R10:|
0000c170 53 57 49 20 22 4f 53 5f 50 6c 6f 74 22 0d 06 13 |SWI "OS_Plot"...|
0000c180 29 4d 4f 56 20 52 30 2c 23 35 3a 41 44 44 20 52 |)MOV R0,#5:ADD R|
0000c190 32 2c 52 31 32 2c 23 34 3a 53 57 49 20 22 4f 53 |2,R12,#4:SWI "OS|
0000c1a0 5f 50 6c 6f 74 22 0d 06 14 04 0d 06 15 0e 4d 4f |_Plot"........MO|
0000c1b0 56 20 50 43 2c 52 31 34 0d 06 16 04 0d 06 17 09 |V PC,R14........|
0000c1c0 5d 3a ed 3a e1 0d 06 18 04 0d 06 19 1d f4 20 44 |]:.:.......... D|
0000c1d0 79 6e 61 6d 69 63 20 61 72 65 61 20 76 65 72 73 |ynamic area vers|
0000c1e0 69 6f 6e 2e 2e 2e 0d 06 1a 26 dd a4 63 72 65 61 |ion......&..crea|
0000c1f0 74 65 61 72 65 61 28 73 69 7a 65 25 2c 73 24 2c |tearea(size%,s$,|
0000c200 f8 20 61 61 25 2c 6d 61 78 6d 25 29 0d 06 1b 07 |. aa%,maxm%)....|
0000c210 ea 20 85 0d 06 1c 43 ee 20 85 ea 20 ef 34 2c 33 |. ....C. .. .4,3|
0000c220 30 3a f1 f6 24 3a 6d 6d 24 3d f6 24 2b a4 6d 73 |0:..$:mm$=.$+.ms|
0000c230 28 22 76 6d 66 61 69 6c 22 29 3a 45 58 25 3d b9 |("vmfail"):EX%=.|
0000c240 3a 61 72 65 61 73 69 7a 65 25 3d 30 3a 61 61 25 |:areasize%=0:aa%|
0000c250 3d 30 3a 3d 2d 31 0d 06 1d 0f 61 72 65 61 73 69 |=0:=-1....areasi|
0000c260 7a 65 25 3d 30 0d 06 1e 67 c8 99 20 22 58 4f 53 |ze%=0...g.. "XOS|
0000c270 5f 44 79 6e 61 6d 69 63 41 72 65 61 22 2c 30 2c |_DynamicArea",0,|
0000c280 2d 31 2c 73 69 7a 65 25 2c 2d 31 2c 25 31 30 30 |-1,size%,-1,%100|
0000c290 30 30 30 30 30 2b 28 31 3c 3c 33 31 20 80 20 76 |00000+(1<<31 . v|
0000c2a0 69 72 74 75 61 6c 25 29 2c 6d 61 78 6d 25 2c 30 |irtual%),maxm%,0|
0000c2b0 2c 30 2c 73 24 20 b8 20 72 30 2c 61 61 25 2c 2c |,0,s$ . r0,aa%,,|
0000c2c0 61 72 65 61 62 61 73 65 25 3b 46 25 0d 06 1f 88 |areabase%;F%....|
0000c2d0 e7 28 46 25 20 80 31 29 3c 3e 30 20 8c 20 f2 6b |.(F% .1)<>0 . .k|
0000c2e0 69 6c 6c 61 72 61 28 61 61 25 29 3a 6d 6d 24 3d |illara(aa%):mm$=|
0000c2f0 22 43 6f 75 6c 64 6e 27 74 20 63 72 65 61 74 65 |"Couldn't create|
0000c300 20 22 2b 73 24 2b 22 20 61 72 65 61 2e 20 50 72 | "+s$+" area. Pr|
0000c310 6f 62 61 62 6c 79 20 6e 6f 74 20 65 6e 6f 75 67 |obably not enoug|
0000c320 68 20 66 72 65 65 20 6d 65 6d 6f 72 79 20 6f 72 |h free memory or|
0000c330 20 64 69 73 63 20 73 70 61 63 65 2e 22 3a 61 61 | disc space.":aa|
0000c340 25 3d 30 3a 73 69 7a 65 25 3d 30 3a 45 58 25 3d |%=0:size%=0:EX%=|
0000c350 b9 3a 3d 30 0d 06 20 2c c8 99 20 22 4f 53 5f 52 |.:=0.. ,.. "OS_R|
0000c360 65 61 64 44 79 6e 61 6d 69 63 41 72 65 61 22 2c |eadDynamicArea",|
0000c370 61 61 25 20 b8 20 2c 61 72 65 61 73 69 7a 65 25 |aa% . ,areasize%|
0000c380 0d 06 21 6a e7 20 61 72 65 61 73 69 7a 65 25 3c |..!j. areasize%<|
0000c390 73 69 7a 65 25 20 8c 20 f2 6b 69 6c 6c 61 72 61 |size% . .killara|
0000c3a0 28 61 61 25 29 3a 85 20 34 32 2c 22 43 6f 75 6c |(aa%):. 42,"Coul|
0000c3b0 64 6e 27 74 20 63 72 65 61 74 65 20 22 2b 73 24 |dn't create "+s$|
0000c3c0 2b 22 20 61 72 65 61 2e 20 50 72 6f 62 61 62 6c |+" area. Probabl|
0000c3d0 79 20 6e 6f 74 20 65 6e 6f 75 67 68 20 66 72 65 |y not enough fre|
0000c3e0 65 20 6d 65 6d 6f 72 79 2e 22 0d 06 22 0e 3d 61 |e memory."..".=a|
0000c3f0 72 65 61 62 61 73 65 25 0d 06 23 57 dd a4 6f 75 |reabase%..#W..ou|
0000c400 72 61 72 65 61 28 76 25 29 3a e7 76 25 3d 30 20 |rarea(v%):.v%=0 |
0000c410 8c 20 85 20 26 35 32 34 46 34 32 2c 22 44 79 6e |. . &524F42,"Dyn|
0000c420 61 6d 69 63 20 61 72 65 61 20 22 2b c3 76 25 2b |amic area "+.v%+|
0000c430 22 20 63 61 6c 6c 65 64 20 62 79 20 53 50 61 69 |" called by SPai|
0000c440 6e 74 20 69 73 20 69 6e 76 61 6c 69 64 21 22 0d |nt is invalid!".|
0000c450 06 24 30 c8 99 20 22 4f 53 5f 44 79 6e 61 6d 69 |.$0.. "OS_Dynami|
0000c460 63 41 72 65 61 22 2c 32 2c 76 25 20 b8 20 2c 2c |cArea",2,v% . ,,|
0000c470 61 72 65 61 73 69 7a 65 25 2c 61 64 64 72 25 0d |areasize%,addr%.|
0000c480 06 25 0a 3d 61 64 64 72 25 0d 06 26 57 dd a4 61 |.%.=addr%..&W..a|
0000c490 72 65 61 73 69 7a 65 28 76 25 29 3a e7 76 25 3d |reasize(v%):.v%=|
0000c4a0 30 20 8c 85 20 26 35 32 34 46 34 32 2c 22 44 79 |0 .. &524F42,"Dy|
0000c4b0 6e 61 6d 69 63 20 61 72 65 61 20 22 2b c3 76 25 |namic area "+.v%|
0000c4c0 2b 22 20 63 61 6c 6c 65 64 20 62 79 20 53 50 61 |+" called by SPa|
0000c4d0 69 6e 74 20 69 73 20 69 6e 76 61 6c 69 64 21 22 |int is invalid!"|
0000c4e0 0d 06 27 30 c8 99 20 22 4f 53 5f 44 79 6e 61 6d |..'0.. "OS_Dynam|
0000c4f0 69 63 41 72 65 61 22 2c 32 2c 76 25 20 b8 20 2c |icArea",2,v% . ,|
0000c500 2c 61 72 65 61 73 69 7a 65 25 2c 61 64 64 72 25 |,areasize%,addr%|
0000c510 0d 06 28 0e 3d 61 72 65 61 73 69 7a 65 25 0d 06 |..(.=areasize%..|
0000c520 29 11 dd f2 6b 69 6c 6c 61 72 61 28 76 25 29 0d |)...killara(v%).|
0000c530 06 2a 25 e7 76 25 3c 3e 30 20 8c 20 c8 99 22 58 |.*%.v%<>0 . .."X|
0000c540 4f 53 5f 44 79 6e 61 6d 69 63 41 72 65 61 22 2c |OS_DynamicArea",|
0000c550 31 2c 76 25 0d 06 2b 05 e1 0d 06 2c 04 0d 06 2d |1,v%..+....,...-|
0000c560 1d dd a4 6d 69 6e 28 76 31 2c 76 32 29 3a e7 76 |...min(v1,v2):.v|
0000c570 31 3c 76 32 20 8c 20 3d 76 31 0d 06 2e 07 3d 76 |1<v2 . =v1....=v|
0000c580 32 0d 06 2f 1d dd a4 6d 61 78 28 76 31 2c 76 32 |2../...max(v1,v2|
0000c590 29 3a e7 76 31 3e 76 32 20 8c 20 3d 76 31 0d 06 |):.v1>v2 . =v1..|
0000c5a0 30 07 3d 76 32 0d 06 31 04 0d 06 32 2b f4 20 44 |0.=v2..1...2+. D|
0000c5b0 41 20 76 65 72 73 69 6f 6e 2c 20 67 65 6e 65 72 |A version, gener|
0000c5c0 61 6c 20 61 72 65 61 20 63 72 65 61 74 65 2f 63 |al area create/c|
0000c5d0 6c 61 69 6d 0d 06 33 37 dd f2 64 6f 63 6c 61 69 |laim..37..doclai|
0000c5e0 6d 67 28 73 69 7a 65 25 2c f8 20 6e 75 6d 62 65 |mg(size%,. numbe|
0000c5f0 72 25 2c 6d 73 67 24 2c 61 72 65 61 6e 24 2c 6d |r%,msg$,arean$,m|
0000c600 61 78 6d 25 29 3a 45 58 25 3d 30 0d 06 34 2d e7 |axm%):EX%=0..4-.|
0000c610 20 73 69 7a 65 25 3d 30 20 8c 20 f2 6b 69 6c 6c | size%=0 . .kill|
0000c620 61 72 61 28 6e 75 6d 62 65 72 25 29 3a 6e 75 6d |ara(number%):num|
0000c630 62 65 72 25 3d 30 3a e1 0d 06 35 67 e7 6e 75 6d |ber%=0:...5g.num|
0000c640 62 65 72 25 3d 30 20 8c 20 61 72 65 61 62 61 73 |ber%=0 . areabas|
0000c650 65 25 3d a4 63 72 65 61 74 65 61 72 65 61 28 73 |e%=.createarea(s|
0000c660 69 7a 65 25 2c 61 72 65 61 6e 24 2c 6e 75 6d 62 |ize%,arean$,numb|
0000c670 65 72 25 2c 6d 61 78 6d 25 29 3a 63 73 69 7a 65 |er%,maxm%):csize|
0000c680 25 3d 61 72 65 61 73 69 7a 65 25 3a e7 20 6e 75 |%=areasize%:. nu|
0000c690 6d 62 65 72 25 3d 30 20 8c 20 45 58 25 3d b9 0d |mber%=0 . EX%=..|
0000c6a0 06 36 44 e7 45 58 25 20 8c 20 f2 72 65 70 6d 73 |.6D.EX% . .repms|
0000c6b0 67 28 a4 6d 73 5f 65 78 70 28 6d 73 67 24 2c a4 |g(.ms_exp(msg$,.|
0000c6c0 72 6f 75 6e 64 73 28 73 69 7a 65 25 2f 31 30 32 |rounds(size%/102|
0000c6d0 34 29 2c 22 22 29 29 3a 6e 75 6d 62 65 72 25 3d |4),"")):number%=|
0000c6e0 30 3a e1 0d 06 37 29 62 25 3d a4 6f 75 72 61 72 |0:...7)b%=.ourar|
0000c6f0 65 61 28 6e 75 6d 62 65 72 25 29 3a 63 73 69 7a |ea(number%):csiz|
0000c700 65 25 3d 61 72 65 61 73 69 7a 65 25 0d 06 38 86 |e%=areasize%..8.|
0000c710 c8 99 20 57 73 6c 74 25 2c 2d 31 2c 2d 31 20 b8 |.. Wslt%,-1,-1 .|
0000c720 20 2c 2c 66 72 65 65 25 3a e7 20 66 72 65 65 25 | ,,free%:. free%|
0000c730 3c 28 73 69 7a 65 25 2d 63 73 69 7a 65 25 29 20 |<(size%-csize%) |
0000c740 80 20 ac 76 69 72 74 75 61 6c 25 20 8c 20 f2 72 |. .virtual% . .r|
0000c750 65 70 6d 73 67 28 a4 6d 73 5f 65 78 70 28 6d 73 |epmsg(.ms_exp(ms|
0000c760 67 24 2c a4 72 6f 75 6e 64 73 28 28 73 69 7a 65 |g$,.rounds((size|
0000c770 25 2d 63 73 69 7a 65 25 2d 66 72 65 65 25 29 2f |%-csize%-free%)/|
0000c780 31 30 32 34 29 2c 22 22 29 29 3a 45 58 25 3d b9 |1024),"")):EX%=.|
0000c790 3a e1 0d 06 39 18 62 25 3d a4 6f 75 72 61 72 65 |:...9.b%=.ourare|
0000c7a0 61 28 6e 75 6d 62 65 72 25 29 0d 06 3a 20 76 25 |a(number%)..: v%|
0000c7b0 3d 30 3a 63 68 61 6e 67 65 25 3d 73 69 7a 65 25 |=0:change%=size%|
0000c7c0 2d 61 72 65 61 73 69 7a 65 25 0d 06 3b c2 e7 20 |-areasize%..;.. |
0000c7d0 63 68 61 6e 67 65 25 3c 3e 30 20 8c 20 c8 99 20 |change%<>0 . .. |
0000c7e0 22 58 4f 53 5f 43 68 61 6e 67 65 44 79 6e 61 6d |"XOS_ChangeDynam|
0000c7f0 69 63 41 72 65 61 22 2c 6e 75 6d 62 65 72 25 2c |icArea",number%,|
0000c800 63 68 61 6e 67 65 25 20 b8 20 72 30 2c 76 25 3b |change% . r0,v%;|
0000c810 46 25 3a e7 76 25 3c 94 28 63 68 61 6e 67 65 25 |F%:.v%<.(change%|
0000c820 29 20 80 20 63 68 61 6e 67 65 25 3e 30 20 8c 20 |) . change%>0 . |
0000c830 f2 72 65 70 65 72 72 28 22 44 79 6e 61 6d 69 63 |.reperr("Dynamic|
0000c840 41 72 65 61 20 6d 65 6d 6f 72 79 20 63 68 61 6e |Area memory chan|
0000c850 67 65 20 66 61 69 6c 65 64 20 62 61 64 6c 79 2e |ge failed badly.|
0000c860 20 28 50 61 73 73 65 64 20 22 2b c3 28 a8 28 73 | (Passed "+.(.(s|
0000c870 69 7a 65 25 2f 31 30 32 34 29 29 2b 22 6b 29 22 |ize%/1024))+"k)"|
0000c880 2c 22 22 29 3a 45 58 25 3d b9 3a e1 0d 06 3c 18 |,""):EX%=.:...<.|
0000c890 62 25 3d a4 6f 75 72 61 72 65 61 28 6e 75 6d 62 |b%=.ourarea(numb|
0000c8a0 65 72 25 29 0d 06 3d 05 e1 0d 06 3e 04 0d 06 3f |er%)..=....>...?|
0000c8b0 9b dd f2 6d 73 5f 6c 6f 61 64 28 41 24 29 3a c8 |...ms_load(A$):.|
0000c8c0 99 20 22 4d 65 73 73 61 67 65 54 72 61 6e 73 5f |. "MessageTrans_|
0000c8d0 46 69 6c 65 49 6e 66 6f 22 2c 2c 41 24 3a c8 99 |FileInfo",,A$:..|
0000c8e0 20 22 4f 53 5f 4d 6f 64 75 6c 65 22 2c 36 2c 2c | "OS_Module",6,,|
0000c8f0 2c 31 37 2b a9 41 24 20 b8 20 2c 2c 6d 73 5f 64 |,17+.A$ . ,,ms_d|
0000c900 65 73 63 25 3a 24 28 6d 73 5f 64 65 73 63 25 2b |esc%:$(ms_desc%+|
0000c910 31 36 29 3d 41 24 3a c8 99 20 22 4d 65 73 73 61 |16)=A$:.. "Messa|
0000c920 67 65 54 72 61 6e 73 5f 4f 70 65 6e 46 69 6c 65 |geTrans_OpenFile|
0000c930 22 2c 6d 73 5f 64 65 73 63 25 2c 6d 73 5f 64 65 |",ms_desc%,ms_de|
0000c940 73 63 25 2b 31 36 3a e1 0d 06 40 04 0d 06 41 50 |sc%+16:...@...AP|
0000c950 dd f2 6d 73 5f 65 6e 64 3a c8 99 20 22 58 4d 65 |..ms_end:.. "XMe|
0000c960 73 73 61 67 65 54 72 61 6e 73 5f 43 6c 6f 73 65 |ssageTrans_Close|
0000c970 46 69 6c 65 22 2c 6d 73 5f 64 65 73 63 25 3a c8 |File",ms_desc%:.|
0000c980 99 20 22 58 4f 53 5f 4d 6f 64 75 6c 65 22 2c 37 |. "XOS_Module",7|
0000c990 2c 2c 6d 73 5f 64 65 73 63 25 3a e1 0d 06 42 04 |,,ms_desc%:...B.|
0000c9a0 0d 06 43 23 dd a4 6d 73 28 6e 6d 65 24 29 3a 3d |..C#..ms(nme$):=|
0000c9b0 a4 6d 73 5f 65 78 70 28 6e 6d 65 24 2c 22 22 2c |.ms_exp(nme$,"",|
0000c9c0 22 22 29 0d 06 44 04 0d 06 45 7a dd a4 6d 73 5f |"")..D...Ez..ms_|
0000c9d0 65 78 70 28 41 24 2c 42 24 2c 43 24 29 3a c8 99 |exp(A$,B$,C$):..|
0000c9e0 20 33 39 38 35 39 34 2c 6d 73 5f 64 65 73 63 25 | 398594,ms_desc%|
0000c9f0 2c 41 24 2c 67 62 25 2c 32 35 36 2c 42 24 2c 43 |,A$,gb%,256,B$,C|
0000ca00 24 20 b8 20 2c 2c 2c 7a 6c 25 3b 7a 66 25 3a e7 |$ . ,,,zl%;zf%:.|
0000ca10 7a 66 25 20 80 31 20 8c 20 3d 22 74 61 67 20 27 |zf% .1 . ="tag '|
0000ca20 22 2b 41 24 2b 22 27 20 6e 6f 74 20 70 72 65 73 |"+A$+"' not pres|
0000ca30 65 6e 74 20 69 6e 20 6d 65 73 73 61 67 65 73 2e |ent in messages.|
0000ca40 22 0d 06 46 14 67 62 25 3f 7a 6c 25 3d 31 33 3a |"..F.gb%?zl%=13:|
0000ca50 3d 24 67 62 25 0d 06 47 04 0d 06 48 14 dd f2 69 |=$gb%..G...H...i|
0000ca60 6e 69 74 5f 76 61 72 69 61 62 6c 65 73 0d 06 49 |nit_variables..I|
0000ca70 04 0d 06 4a 36 77 68 25 3d 2d 32 35 36 3a 72 64 |...J6wh%=-256:rd|
0000ca80 25 3d 26 46 46 30 30 3a 63 79 25 3d 2d 36 35 35 |%=&FF00:cy%=-655|
0000ca90 33 36 3a 67 72 25 3d 26 46 46 30 30 30 30 3a 6d |36:gr%=&FF0000:m|
0000caa0 79 72 65 66 25 3d 30 0d 06 4b 89 43 74 48 53 56 |yref%=0..K.CtHSV|
0000cab0 74 52 47 42 25 3d 26 34 30 37 35 39 3a 43 74 52 |tRGB%=&40759:CtR|
0000cac0 47 42 74 48 53 56 25 3d 26 34 30 37 35 38 3a 57 |GBtHSV%=&40758:W|
0000cad0 73 63 6f 6c 25 3d 26 34 30 30 45 36 3a 43 74 53 |scol%=&400E6:CtS|
0000cae0 67 63 6f 6c 25 3d 26 34 30 37 34 33 3a 43 74 53 |gcol%=&40743:CtS|
0000caf0 4f 67 63 6f 6c 25 3d 26 34 30 37 34 38 3a 57 72 |Ogcol%=&40748:Wr|
0000cb00 64 77 25 3d 26 34 30 30 43 38 3a 57 67 72 25 3d |dw%=&400C8:Wgr%=|
0000cb10 26 34 30 30 43 41 3a 58 57 67 72 25 3d 26 36 30 |&400CA:XWgr%=&60|
0000cb20 30 43 41 3a 57 67 70 69 25 3d 26 34 30 30 43 46 |0CA:Wgpi%=&400CF|
0000cb30 0d 06 4c e9 53 70 6f 70 25 3d 26 32 45 3a 58 53 |..L.Spop%=&2E:XS|
0000cb40 70 6f 70 25 3d 26 32 30 30 32 45 3a 43 74 53 66 |pop%=&2002E:CtSf|
0000cb50 63 25 3d 26 34 30 37 34 46 3a 43 74 49 6e 76 61 |c%=&4074F:CtInva|
0000cb60 6c 25 3d 26 34 30 37 35 30 3a 43 74 53 74 62 25 |l%=&40750:CtStb%|
0000cb70 3d 26 34 30 37 34 30 3a 57 6c 74 25 3d 26 36 30 |=&40740:Wlt%=&60|
0000cb80 30 44 42 3a 57 63 77 25 3d 26 34 30 30 43 31 3a |0DB:Wcw%=&400C1:|
0000cb90 57 73 6c 74 25 3d 26 36 30 30 45 43 3a 57 67 69 |Wslt%=&600EC:Wgi|
0000cba0 73 74 25 3d 26 34 30 30 43 45 3a 57 73 69 73 74 |st%=&400CE:Wsist|
0000cbb0 25 3d 26 34 30 30 43 44 3a 57 67 77 73 74 25 3d |%=&400CD:Wgwst%=|
0000cbc0 26 34 30 30 43 42 3a 50 74 78 25 3d 26 34 30 30 |&400CB:Ptx%=&400|
0000cbd0 38 36 3a 58 50 74 78 25 3d 26 36 30 30 38 36 3a |86:XPtx%=&60086:|
0000cbe0 57 66 72 63 52 25 3d 26 34 30 30 44 31 3a 58 57 |WfrcR%=&400D1:XW|
0000cbf0 66 72 63 52 25 3d 26 36 30 30 44 31 3a 57 75 70 |frcR%=&600D1:Wup|
0000cc00 64 77 25 3d 26 34 30 30 43 39 3a 58 43 74 47 65 |dw%=&400C9:XCtGe|
0000cc10 74 25 3d 26 34 30 37 36 33 0d 06 4d 87 57 63 53 |t%=&40763..M.WcS|
0000cc20 70 25 3d 26 34 30 30 44 32 3a 46 66 6e 74 25 3d |p%=&400D2:Ffnt%=|
0000cc30 26 34 30 30 38 31 3a 46 63 74 70 25 3d 26 34 30 |&40081:Fctp%=&40|
0000cc40 30 38 39 3a 46 63 74 6f 73 25 3d 26 34 30 30 38 |089:Fctos%=&4008|
0000cc50 38 3a 4c 66 6e 74 25 3d 26 34 30 30 38 32 3a 53 |8:Lfnt%=&40082:S|
0000cc60 74 72 77 25 3d 26 34 30 30 38 35 3a 57 67 52 25 |trw%=&40085:WgR%|
0000cc70 3d 26 36 30 30 43 41 3a 46 73 66 6e 74 25 3d 26 |=&600CA:Fsfnt%=&|
0000cc80 34 30 30 38 41 3a 57 6d 65 73 73 25 3d 26 34 30 |4008A:Wmess%=&40|
0000cc90 30 45 37 3a 46 63 61 72 25 3d 26 34 30 30 38 37 |0E7:Fcar%=&40087|
0000cca0 0d 06 4e b3 42 62 6f 78 25 3d 26 34 30 30 39 37 |..N.Bbox%=&40097|
0000ccb0 3a 58 57 73 63 6f 6c 25 3d 26 36 30 30 45 36 3a |:XWscol%=&600E6:|
0000ccc0 58 57 67 72 65 63 25 3d 26 36 30 30 43 41 3a 47 |XWgrec%=&600CA:G|
0000ccd0 53 54 72 6e 73 25 3d 26 32 30 30 32 37 3a 57 63 |STrns%=&20027:Wc|
0000cce0 47 70 25 3d 26 34 30 30 44 33 3a 57 63 53 70 25 |Gp%=&400D3:WcSp%|
0000ccf0 3d 26 34 30 30 44 32 3a 57 63 6d 25 3d 26 34 30 |=&400D2:Wcm%=&40|
0000cd00 30 44 34 3a 57 6f 77 25 3d 26 34 30 30 43 35 3a |0D4:Wow%=&400C5:|
0000cd10 57 63 6c 57 25 3d 26 36 30 30 43 36 3a 57 73 69 |WclW%=&600C6:Wsi|
0000cd20 73 74 25 3d 26 34 30 30 43 44 3a 44 72 77 66 25 |st%=&400CD:Drwf%|
0000cd30 3d 26 34 30 37 30 32 3a 44 72 77 73 74 72 25 3d |=&40702:Drwstr%=|
0000cd40 26 34 30 37 30 34 3a 58 44 77 53 25 3d 26 36 30 |&40704:XDwS%=&60|
0000cd50 37 30 34 0d 06 4f 18 6d 61 69 6e 6f 25 3d 30 3a |704..O.maino%=0:|
0000cd60 6f 76 65 72 6d 61 69 6e 25 3d 30 0d 06 50 b0 53 |overmain%=0..P.S|
0000cd70 70 6f 70 25 3d 26 32 45 3a 43 74 53 66 63 25 3d |pop%=&2E:CtSfc%=|
0000cd80 26 34 30 37 34 46 3a 43 74 49 6e 76 61 6c 25 3d |&4074F:CtInval%=|
0000cd90 26 34 30 37 35 30 3a 43 74 53 74 62 25 3d 26 34 |&40750:CtStb%=&4|
0000cda0 30 37 34 30 3a 57 6c 74 25 3d 26 36 30 30 44 42 |0740:Wlt%=&600DB|
0000cdb0 3a 57 63 77 25 3d 26 34 30 30 43 31 3a 57 73 6c |:Wcw%=&400C1:Wsl|
0000cdc0 74 25 3d 26 36 30 30 45 43 3a 57 67 69 73 74 25 |t%=&600EC:Wgist%|
0000cdd0 3d 26 34 30 30 43 45 3a 57 73 69 73 74 25 3d 26 |=&400CE:Wsist%=&|
0000cde0 34 30 30 43 44 3a 57 67 77 73 74 25 3d 26 34 30 |400CD:Wgwst%=&40|
0000cdf0 30 43 42 3a 50 74 78 25 3d 26 34 30 30 38 36 3a |0CB:Ptx%=&40086:|
0000ce00 57 66 72 63 52 25 3d 26 34 30 30 44 31 3a 58 53 |WfrcR%=&400D1:XS|
0000ce10 6e 64 43 25 3d 26 36 30 31 34 30 0d 06 51 6d 46 |ndC%=&60140..QmF|
0000ce20 66 6e 74 25 3d 26 34 30 30 38 31 3a 46 63 74 70 |fnt%=&40081:Fctp|
0000ce30 25 3d 26 34 30 30 38 39 3a 46 63 74 6f 73 25 3d |%=&40089:Fctos%=|
0000ce40 26 34 30 30 38 38 3a 4c 66 6e 74 25 3d 26 34 30 |&40088:Lfnt%=&40|
0000ce50 30 38 32 3a 53 74 72 77 25 3d 26 34 30 30 38 35 |082:Strw%=&40085|
0000ce60 3a 57 67 52 25 3d 26 36 30 30 43 41 3a 46 73 66 |:WgR%=&600CA:Fsf|
0000ce70 6e 74 25 3d 26 34 30 30 38 41 3a 57 6d 65 73 73 |nt%=&4008A:Wmess|
0000ce80 25 3d 26 34 30 30 45 37 0d 06 52 11 58 4f 61 67 |%=&400E7..R.XOag|
0000ce90 73 25 3d 26 32 30 30 30 39 0d 06 53 3a 42 62 6f |s%=&20009..S:Bbo|
0000cea0 78 25 3d 26 34 30 30 39 37 3a 58 57 73 63 6f 6c |x%=&40097:XWscol|
0000ceb0 25 3d 26 36 30 30 45 36 3a 58 57 67 72 65 63 25 |%=&600E6:XWgrec%|
0000cec0 3d 26 36 30 30 43 41 3a 57 63 6d 25 3d 26 36 30 |=&600CA:Wcm%=&60|
0000ced0 30 44 34 0d 06 54 04 0d 06 55 0f f4 20 21 21 21 |0D4..T...U.. !!!|
0000cee0 50 43 41 21 21 21 0d 06 56 04 0d 06 57 19 f4 20 |PCA!!!..V...W.. |
0000cef0 50 43 41 20 6d 65 73 73 61 67 65 20 6e 75 6d 62 |PCA message numb|
0000cf00 65 72 73 0d 06 58 55 4d 73 67 5f 57 68 6f 73 25 |ers..XUMsg_Whos%|
0000cf10 3d 26 38 33 34 38 34 3a 4d 73 67 5f 49 6d 25 3d |=&83484:Msg_Im%=|
0000cf20 26 38 33 34 38 35 3a 4d 73 67 5f 44 6f 25 3d 26 |&83485:Msg_Do%=&|
0000cf30 38 33 34 38 36 3a 4d 73 67 5f 44 65 73 65 6c 25 |83486:Msg_Desel%|
0000cf40 3d 26 38 33 34 38 37 3a 4d 73 67 5f 44 6f 6e 65 |=&83487:Msg_Done|
0000cf50 25 3d 26 38 33 34 38 38 0d 06 59 88 4d 73 67 5f |%=&83488..Y.Msg_|
0000cf60 4d 6f 76 69 6e 67 25 3d 26 38 33 34 38 39 3a 4d |Moving%=&83489:M|
0000cf70 73 67 5f 43 68 61 6e 67 65 64 25 3d 26 38 33 34 |sg_Changed%=&834|
0000cf80 38 41 3a 4d 73 67 5f 52 65 73 69 7a 65 25 3d 26 |8A:Msg_Resize%=&|
0000cf90 38 33 34 38 42 3a 4d 73 67 5f 55 70 61 72 65 61 |8348B:Msg_Uparea|
0000cfa0 25 3d 26 38 33 34 38 43 3a 4d 73 67 5f 52 65 73 |%=&8348C:Msg_Res|
0000cfb0 69 7a 65 41 63 6b 25 3d 26 38 33 34 38 44 3a 4d |izeAck%=&8348D:M|
0000cfc0 73 67 5f 4d 69 73 63 25 3d 26 38 33 34 38 45 3a |sg_Misc%=&8348E:|
0000cfd0 4d 73 67 5f 49 6e 66 6f 25 3d 26 38 33 34 38 46 |Msg_Info%=&8348F|
0000cfe0 0d 06 5a 2b 53 75 62 5f 47 69 76 65 25 3d 26 38 |..Z+Sub_Give%=&8|
0000cff0 33 34 38 30 3a 53 75 62 5f 41 73 73 6f 63 69 61 |3480:Sub_Associa|
0000d000 74 65 64 25 3d 26 38 33 34 38 31 0d 06 5b 04 0d |ted%=&83481..[..|
0000d010 06 5c 3a 4d 73 67 5f 4f 62 6a 50 6f 73 25 3d 26 |.\:Msg_ObjPos%=&|
0000d020 38 33 34 39 30 3a 4d 73 67 5f 48 6f 6f 6b 25 3d |83490:Msg_Hook%=|
0000d030 26 38 33 34 39 31 3a 4d 73 67 5f 55 6e 68 6f 6f |&83491:Msg_Unhoo|
0000d040 6b 25 3d 26 38 33 34 39 32 0d 06 5d 04 0d 06 5e |k%=&83492..]...^|
0000d050 1d f4 20 50 43 41 20 70 6f 70 75 70 20 64 69 61 |.. PCA popup dia|
0000d060 6c 6f 67 75 65 2f 6d 65 6e 75 0d 06 5f 6b 75 74 |logue/menu.._kut|
0000d070 69 6c 24 3d 22 23 55 74 69 6c 69 74 69 65 73 22 |il$="#Utilities"|
0000d080 3a 70 63 61 74 61 73 6b 25 3d 30 3a de 20 75 74 |:pcatask%=0:. ut|
0000d090 69 6c 74 73 6b 25 28 32 34 29 2c 75 74 69 6c 69 |iltsk%(24),utili|
0000d0a0 64 25 28 32 34 29 2c 75 66 25 28 32 34 29 2c 75 |d%(24),uf%(24),u|
0000d0b0 74 69 6c 73 24 28 32 34 29 3a 75 74 69 6c 65 25 |tils$(24):utile%|
0000d0c0 3d 30 3a 75 62 6f 78 77 25 3d 30 3a 75 62 6f 78 |=0:uboxw%=0:ubox|
0000d0d0 68 25 3d 39 36 0d 06 60 33 70 6f 70 75 70 74 79 |h%=96..`3popupty|
0000d0e0 70 65 25 3d 30 3a 6d 5f 70 63 61 25 3d 30 3a f4 |pe%=0:m_pca%=0:.|
0000d0f0 20 30 20 2d 20 64 69 61 6c 6f 67 75 65 20 20 20 | 0 - dialogue |
0000d100 31 20 2d 20 6d 65 6e 75 0d 06 61 04 0d 06 62 20 |1 - menu..a...b |
0000d110 f4 20 70 6f 69 6e 74 65 72 73 20 74 6f 20 72 65 |. pointers to re|
0000d120 6d 6f 74 65 20 6f 62 6a 65 63 74 73 0d 06 63 18 |mote objects..c.|
0000d130 72 65 6d 6f 74 65 74 61 67 25 3d 2d 31 3a 77 6e |remotetag%=-1:wn|
0000d140 24 3d 22 22 0d 06 64 04 0d 06 65 3b 70 63 6f 6c |$=""..d...e;pcol|
0000d150 25 3d 26 46 46 46 46 46 46 30 30 3a 73 69 7a 65 |%=&FFFFFF00:size|
0000d160 25 3d 36 34 3a 73 69 7a 65 32 25 3d 36 34 2f 32 |%=64:size2%=64/2|
0000d170 2b 34 3a 70 70 69 63 6b 25 3d 30 3a 6c 63 70 77 |+4:ppick%=0:lcpw|
0000d180 25 3d 30 0d 06 66 04 0d 06 67 6e de 20 73 74 72 |%=0..f...gn. str|
0000d190 61 6e 73 25 20 33 32 2c 73 74 72 61 6e 73 57 25 |ans% 32,stransW%|
0000d1a0 20 33 32 2c 73 67 62 6c 6b 25 20 32 35 36 2c 73 | 32,sgblk% 256,s|
0000d1b0 67 62 6c 6b 42 25 20 32 35 36 2a 34 2c 73 61 76 |gblkB% 256*4,sav|
0000d1c0 65 61 25 20 31 30 32 34 2c 63 30 25 20 31 30 32 |ea% 1024,c0% 102|
0000d1d0 34 2c 4d 67 62 25 20 32 35 36 2c 61 73 63 61 6c |4,Mgb% 256,ascal|
0000d1e0 65 30 70 25 20 33 32 2c 73 67 62 6c 6b 67 25 20 |e0p% 32,sgblkg% |
0000d1f0 32 35 36 2a 34 0d 06 68 04 0d 06 69 25 f2 6d 73 |256*4..h...i%.ms|
0000d200 5f 6c 6f 61 64 28 22 3c 53 50 61 69 6e 74 24 44 |_load("<SPaint$D|
0000d210 69 72 3e 2e 6d 65 73 73 61 67 65 73 22 29 0d 06 |ir>.messages")..|
0000d220 6a 34 c8 99 22 57 69 6d 70 5f 53 6c 6f 74 53 69 |j4.."Wimp_SlotSi|
0000d230 7a 65 22 2c 2d 31 2c 2d 31 20 b8 20 73 6c 73 69 |ze",-1,-1 . slsi|
0000d240 7a 25 3a 62 61 73 65 73 69 7a 25 3d 73 6c 73 69 |z%:basesiz%=slsi|
0000d250 7a 25 0d 06 6b 46 74 79 30 31 25 3d 31 30 34 3a |z%..kFty01%=104:|
0000d260 74 79 30 32 25 3d 36 34 3a 74 78 30 31 25 3d 30 |ty02%=64:tx01%=0|
0000d270 3a 74 78 30 32 25 3d 32 35 38 3a 76 69 65 77 52 |:tx02%=258:viewR|
0000d280 25 3d 2d 31 3a 76 69 65 77 47 25 3d 2d 31 3a 76 |%=-1:viewG%=-1:v|
0000d290 69 65 77 42 25 3d 2d 31 0d 06 6c 5a de 20 62 75 |iewB%=-1..lZ. bu|
0000d2a0 66 66 25 20 26 34 30 30 2c 62 75 66 66 6f 25 20 |ff% &400,buffo% |
0000d2b0 26 34 30 30 2c 62 75 66 66 62 25 20 26 34 30 30 |&400,buffb% &400|
0000d2c0 2c 67 62 25 20 26 34 30 30 2c 67 62 77 25 20 26 |,gb% &400,gbw% &|
0000d2d0 32 30 30 2c 67 62 6c 6b 25 20 26 34 30 30 2c 47 |200,gblk% &400,G|
0000d2e0 57 62 25 20 26 34 30 30 2c 67 62 32 25 20 26 31 |Wb% &400,gb2% &1|
0000d2f0 30 30 0d 06 6d 21 70 61 67 65 25 3d 36 34 2a 31 |00..m!page%=64*1|
0000d300 30 32 34 3a 67 25 3d 30 3a 68 61 6e 64 6c 65 31 |024:g%=0:handle1|
0000d310 25 3d 30 0d 06 6e 20 76 69 72 74 75 61 6c 25 3d |%=0..n virtual%=|
0000d320 30 3a 6d 36 34 25 3d 36 34 2a 31 30 32 34 2a 31 |0:m64%=64*1024*1|
0000d330 30 32 34 0d 06 6f 0a 6d 73 63 64 3d 31 0d 06 70 |024..o.mscd=1..p|
0000d340 04 0d 06 71 3c c8 99 22 58 4f 53 5f 53 57 49 4e |...q<.."XOS_SWIN|
0000d350 75 6d 62 65 72 46 72 6f 6d 53 74 72 69 6e 67 22 |umberFromString"|
0000d360 2c 2c 22 44 72 61 67 41 53 70 72 69 74 65 5f 53 |,,"DragASprite_S|
0000d370 74 61 72 74 22 20 b8 20 64 73 25 3b 46 0d 06 72 |tart" . ds%;F..r|
0000d380 12 e7 46 20 80 31 20 8c 20 64 73 25 3d 2d 31 0d |..F .1 . ds%=-1.|
0000d390 06 73 3b c8 99 22 58 4f 53 5f 53 57 49 4e 75 6d |.s;.."XOS_SWINum|
0000d3a0 62 65 72 46 72 6f 6d 53 74 72 69 6e 67 22 2c 2c |berFromString",,|
0000d3b0 22 44 72 61 67 41 53 70 72 69 74 65 5f 53 74 6f |"DragASprite_Sto|
0000d3c0 70 22 20 b8 20 64 65 25 3b 46 0d 06 74 12 e7 46 |p" . de%;F..t..F|
0000d3d0 20 80 31 20 8c 20 64 65 25 3d 2d 31 0d 06 75 2f | .1 . de%=-1..u/|
0000d3e0 c8 99 36 2c 31 36 31 2c 32 38 20 b8 2c 2c 66 25 |..6,161,28 .,,f%|
0000d3f0 3a e7 20 28 66 25 20 80 32 29 3d 30 20 8c 64 73 |:. (f% .2)=0 .ds|
0000d400 25 3d 2d 31 3a 64 65 25 3d 2d 31 0d 06 76 04 0d |%=-1:de%=-1..v..|
0000d410 06 77 35 f4 20 21 21 21 50 43 41 21 21 21 20 6c |.w5. !!!PCA!!! l|
0000d420 6f 63 61 6c 20 64 79 6e 61 6d 69 63 20 61 72 65 |ocal dynamic are|
0000d430 61 20 61 6e 64 20 73 70 72 69 74 65 20 64 65 74 |a and sprite det|
0000d440 61 69 6c 73 0d 06 78 46 6c 6f 63 61 6c 25 3d 30 |ails..xFlocal%=0|
0000d450 3a 6c 6f 63 61 6c 32 25 3d 30 3a 6c 6f 63 61 6c |:local2%=0:local|
0000d460 74 61 67 25 3d 2d 31 3a 73 70 72 69 61 25 3d 30 |tag%=-1:spria%=0|
0000d470 3a 73 70 72 69 6c 25 3d 30 3a 6c 6f 63 61 6c 24 |:spril%=0:local$|
0000d480 3d 22 4e 6f 74 68 69 6e 67 22 0d 06 79 04 0d 06 |="Nothing"..y...|
0000d490 7a 3d f4 20 21 21 21 50 43 41 21 21 21 20 69 6e |z=. !!!PCA!!! in|
0000d4a0 70 6c 61 63 65 20 65 64 69 74 69 6e 67 20 28 72 |place editing (r|
0000d4b0 65 6d 6f 74 65 29 20 66 6c 61 67 73 20 61 6e 64 |emote) flags and|
0000d4c0 20 73 74 6f 72 61 67 65 2e 2e 2e 0d 06 7b 24 69 | storage.....{$i|
0000d4d0 6e 70 6c 61 63 65 25 3d 2d 31 3a 6c 6f 63 61 6c |nplace%=-1:local|
0000d4e0 74 61 73 6b 25 3d 30 3a 75 66 6c 67 25 3d 30 0d |task%=0:uflg%=0.|
0000d4f0 06 7c 04 0d 06 7d 3c f4 20 21 21 21 50 43 41 21 |.|...}<. !!!PCA!|
0000d500 21 21 20 69 6e 70 6c 61 63 65 20 65 64 69 74 69 |!! inplace editi|
0000d510 6e 67 20 28 6c 6f 63 61 6c 29 20 66 6c 61 67 73 |ng (local) flags|
0000d520 20 61 6e 64 20 73 74 6f 72 61 67 65 2e 2e 2e 0d | and storage....|
0000d530 06 7e 1d 61 72 65 6d 6f 74 65 25 3d 2d 31 3a 72 |.~.aremote%=-1:r|
0000d540 65 6d 6f 74 65 74 61 73 6b 25 3d 30 0d 06 7f 04 |emotetask%=0....|
0000d550 0d 06 80 35 de 20 72 65 6d 6f 74 65 69 63 62 6c |...5. remoteicbl|
0000d560 6b 25 20 33 32 2a 31 30 3a 72 69 63 70 74 72 25 |k% 32*10:ricptr%|
0000d570 3d 72 65 6d 6f 74 65 69 63 62 6c 6b 25 3a 52 62 |=remoteicblk%:Rb|
0000d580 64 72 25 3d 30 0d 06 81 04 0d 06 82 34 f4 20 62 |dr%=0.......4. b|
0000d590 75 66 66 65 72 73 20 66 6f 72 20 73 69 6d 70 6c |uffers for simpl|
0000d5a0 65 20 6d 65 6e 75 20 2d 20 63 61 6e 20 62 65 20 |e menu - can be |
0000d5b0 73 63 72 61 74 63 68 20 73 70 61 63 65 0d 06 83 |scratch space...|
0000d5c0 1e de 20 63 62 73 74 72 25 20 26 31 32 30 2c 63 |.. cbstr% &120,c|
0000d5d0 62 62 75 66 66 25 20 26 31 32 30 0d 06 84 04 0d |bbuff% &120.....|
0000d5e0 06 85 0a 65 6e 64 25 3d a3 0d 06 86 1d 73 61 76 |...end%=.....sav|
0000d5f0 69 6e 67 66 69 6c 65 25 3d 30 3a 44 52 41 47 47 |ingfile%=0:DRAGG|
0000d600 49 4e 47 25 3d 30 0d 06 87 9a de 20 77 61 64 25 |ING%=0..... wad%|
0000d610 28 33 32 29 2c 57 62 74 73 6b 25 20 26 33 30 30 |(32),Wbtsk% &300|
0000d620 2c 77 69 64 25 28 33 32 29 2c 47 42 25 20 26 32 |,wid%(32),GB% &2|
0000d630 34 30 30 2c 73 74 79 6c 65 69 6e 64 69 72 20 26 |400,styleindir &|
0000d640 31 33 30 30 2c 67 65 6e 65 72 61 6c 73 74 6f 72 |1300,generalstor|
0000d650 65 25 20 26 35 30 30 3a 77 69 64 25 28 29 3d 30 |e% &500:wid%()=0|
0000d660 3a 6c 61 73 74 6f 70 65 6e 25 3d 2d 31 3a 67 62 |:lastopen%=-1:gb|
0000d670 25 3d 47 42 25 2b 26 31 37 30 30 3a 67 62 6c 6b |%=GB%+&1700:gblk|
0000d680 25 3d 47 42 25 2b 26 31 41 30 30 3a 57 62 25 3d |%=GB%+&1A00:Wb%=|
0000d690 47 42 25 3a f2 73 65 74 75 70 73 74 6f 72 65 73 |GB%:.setupstores|
0000d6a0 0d 06 88 09 45 58 25 3d a3 0d 06 89 13 46 25 3d |....EX%=.....F%=|
0000d6b0 30 3a 6f 75 74 66 6f 72 6d 25 3d 30 0d 06 8a 05 |0:outform%=0....|
0000d6c0 e1 0d ff |...|
0000d6c3
.