Home » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199609.adf » Extras » Educ/!To-Mars/!Runimage

Educ/!To-Mars/!Runimage

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

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

Tape/disk: Home » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199609.adf » Extras
Filename: Educ/!To-Mars/!Runimage
Read OK:
File size: D147 bytes
Load address: 0000
Exec address: 0000
File contents
   10REM Ultimap v 2.00 (30 March 1995)
   20REM LEN Simon Hayles 1994
   30
   40 HIMEM=&40000
   50 DIM taskid% 4:$taskid%="TASK"
   60 SYS "Wimp_Initialise",200,!taskid%,"Ultimap" TO version%,task_handle%
   70
   80 ON ERROR PROCerrorbox
   90
  100 PROCvars
  110
  120 SYS "OS_Module",16,"Ubase%Ultimap"
  130 *UBASE 40000 800000
  140
  150 REM global variables
  160
  170 DIM box% 12,box2% 12,matrix% 16,origin1% 8,origin2% 8
  180 icon_font$="Homerton.Medium"
  190 full_name$="Untitled"
  200 query_string$=""
  210 menu%=0
  220 sprite_size%=&1E000
  230 DIM q% 256,old_q% 256
  240 DIM errblk% 3000
  250 DIM main% 1000,sprites% sprite_size%
  260 !sprites%=sprite_size%:sprites%!8=16:SYS spop%,&209,sprites%
  270 DIM wimp_palette% 20*4
  280 DIM page_stack% 1024
  290
  300 s_sprites%=1
  310 s_draw%=2
  320 s_replay%=3
  330 s_quicktime%=4
  340 s_fonts%=5
  350 s_starcoms%=6
  360 s_loadorder%=7
  370 s_sounds%=8
  380 s_text%=9
  390 s_pages%=10
  400
  410 s_clicks%=11
  420 s_mousedrag%=12
  430 s_often%=13
  440 s_pointer%=14
  450 s_mouse%=15
  460 s_pageshown%=16
  470 s_spare%=17
  480 s_clickson%=18
  490 s_temp%=19
  500 s_sequences%=20
  510
  520 REM options
  530
  540 printing%=FALSE
  550 portrait%=FALSE
  560 current_page%=0
  570 margin%=16
  580 click_time=1
  590 click_pause=1
  600 temp_list%=0
  610 trying%=TRUE
  620 speaking_text%=FALSE
  630 speak_sound%=FALSE
  640 speak_token%=FALSE
  650 h_scroll%=TRUE
  660 v_scroll%=TRUE
  670 toggle_icon%=TRUE
  680 title_bar%=TRUE
  690 scanning%=FALSE
  700 scan_keys%=1
  710 scan_time%=100
  720 scan_object%=1
  730 scan_count%=0
  740 menu_enabled%=TRUE
  750 ws%=sprites%+32
  760 page_size%=3
  770 file_version%=101
  780 current_page$="Page 1"
  790 ws%=sprites%+32
  800
  810 SYS "Hourglass_On"
  820 PROCload_templates
  830 PROCget_mode_info
  840 PROCload_options
  850 PROCnew_file
  860
  870 SYS "OS_GetEnv" TO EnvStr$,end_adr%
  880 IF INSTR(EnvStr$," -quit ") THEN
  890 I%=INSTR(EnvStr$,""""):I%=INSTR(EnvStr$,"""",I%+1)
  900 REPEATI%+=1:UNTILMID$(EnvStr$,I%,1)<>" "
  910 f$=MID$(EnvStr$,I%)
  920 IF f$<>"" full_name$=f$:PROCload_file(f$,2)
  930 ENDIF
  940
  950 icon_bar%=FNiconbar
  960
  970 SYS setcaret%,main_w%,-1,0,10,10
  980
  990 SYS "Hourglass_Off"
 1000 ON ERROR PROCerrorbox
 1010
 1020 SYS drag%,,-1
 1030 PROCbegin_trying
 1040 REPEAT
 1050   PROCtry_poll
 1060 UNTIL FALSE
 1070
 1080 DEFPROCload_templates
 1090 DIM font_array% 256:FORt%=0TO252STEP4:t%!font_array%=0:NEXT
 1100 SYS "Wimp_OpenTemplate",,"<Obey$Dir>.Templates"
 1110 DIM winds% 2000,indir% 1000
 1120 indl%=indir%+4000
 1130 SYS "Wimp_LoadTemplate",,winds%,indir%,indl%,-1,"main_w",0 TO ,,indir%
 1140 SYS "Wimp_CreateWindow",,winds% TO main_w%
 1150 SYS "Wimp_LoadTemplate",,winds%,indir%,indl%,font_array%,"pagelist_wc",0 TO ,,indir%
 1160 SYS "Wimp_CreateWindow",,winds% TO pagelist_wc%
 1170 SYS "Wimp_LoadTemplate",,winds%,indir%,indl%,font_array%,"print_w",0 TO ,,indir%
 1180 SYS "Wimp_CreateWindow",,winds% TO print_w%
 1190 SYS "Wimp_LoadTemplate",,winds%,indir%,indl%,-1,"info",0 TO ,,indir%
 1200 SYS "Wimp_CreateWindow",,winds% TO info%
 1210 SYS "Wimp_CloseTemplate"
 1220 ENDPROC
 1230;
 1240 DEFPROCload_options
 1250 ptr%=OPENIN("<Ultimap$Dir>.options")
 1260 INPUT#ptr%,toolbox_on%,scanning%,scan_keys%,scan_time%,menu_enabled%,sound_vol%
 1270 CLOSE#ptr%
 1280 ptr%=OPENIN("<Ultimap$Dir>.messages")
 1290 INPUT#ptr%,info$,info1$
 1300 CLOSE#ptr%
 1310 PROCset_icon_text(info%,1,info$)
 1320 PROCset_icon_text(info%,2,info1$)
 1330 ENDPROC
 1340
 1350
 1360DEF PROCfinish
 1370 SYS setcaret%,-1
 1380 PROClose_fonts
 1390 SYS "Wimp_CloseDown",task_handle%,!taskid%
 1400 SYS "OS_Exit"
 1410ENDPROC
 1420
 1430 DEFPROCredraw_window
 1440 SYS redraww%,,q% TO more%
 1450 WHILE more%
 1460   offx%=(q%!4-q%!20):offy%=(q%!16-q%!24)
 1470   CASE !q% OF
 1480     WHEN main_w%:PROCdraw_main_w(q%!28-offx%,q%!32-offy%,q%!36-offx%,q%!40-offy%,offx%,offy%)
 1490     WHEN pagelist_wc%:PROCdraw_pagelist_wc(q%!28-offx%,q%!32-offy%,q%!36-offx%,q%!40-offy%)
 1500   ENDCASE
 1510   SYS getr%,,q% TO more%
 1520 ENDWHILE
 1530 ENDPROC
 1540
 1550 DEF PROCfront(handle%)
 1560 !q%=handle%:SYS getw%,,q%
 1570 PROCopen_window(!q%,q%!4,q%!8,q%!12,q%!16,q%!20,q%!24,-1)
 1580 ENDPROC
 1590
 1600 DEF PROCopen_window(handle%,x%,y%,x1%,y1%,scx%,scy%,bhandle%)
 1610 IFhandle%=-1THENENDPROC
 1620 q%!28=bhandle%
 1630 q%!0=handle%
 1640 q%!4=x%:q%!8=y%:q%!12=x1%:q%!16=y1%
 1650 q%!20=scx%:q%!24=scy%
 1660 SYS openw%,,q%
 1670 ENDPROC
 1680
 1690
 1700 DEF PROCclose_window(handle%)
 1710 !q%=handle%:SYS closew%,,q%
 1720 ENDPROC
 1730
 1740DEF PROCvars
 1750 getenv%=&10
 1760 wimp%    = (1<<18) + (3<<6)
 1770 createw%=wimp%+1
 1780 createicon%=wimp%+2
 1790 deleteicon%=wimp%+4
 1800 openw%=wimp%+5
 1810 closew%=wimp%+6
 1820 poll%=wimp%+7
 1830 redraww%=wimp%+8
 1840 updatew%=wimp%+9
 1850 getr%=wimp%+10
 1860 getw%=wimp%+11
 1870 getwi%=wimp%+12
 1880 seti%=wimp%+13
 1890 geti%=wimp%+14
 1900 getp%=wimp%+15
 1910 drag%=wimp%+16
 1920 forceredraw%=wimp%+17
 1930 setcaret%=wimp%+18
 1940 getcaret%=wimp%+19
 1950 createmenu%=wimp%+20
 1960 setextent%=wimp%+&17
 1970 processkey%=wimp%+&1C
 1980 sendmessage%=wimp%+&27
 1990 crsubmenu%=wimp%+&28
 2000 ploticon%=&400E2
 2010
 2020 setcol%=&40743
 2030 spop%=&2E
 2040 findfont%=&40081
 2050 losefont%=&40082
 2060 fontinfo%=&40084
 2070 stringwidth%=&40085
 2080 setfont%=&4008A
 2090 currentfont%=&4008B
 2100 converttoos%=&40088
 2110 converttopoints%=&40089
 2120 paint%=&40086
 2130 findcaret%=&4008D
 2140 charbbox%=&4008E
 2150
 2160 Ubase%=&1C0100
 2170 newfile%=Ubase%
 2180 newstack%=Ubase%+1
 2190 killstack%=Ubase%+2
 2200 addentry%=Ubase%+3
 2210 amendentry%=Ubase%+4
 2220 findtoken%=Ubase%+5
 2230 killentry%=Ubase%+6
 2240 movedata%=Ubase%+7
 2250 addpacked%=Ubase%+8
 2260 getentry%=Ubase%+9
 2270 unpacksprite%=Ubase%+10
 2280 nentries%=Ubase%+11
 2290 movetoend%=Ubase%+12
 2300 readstatus%=Ubase%+13
 2310 writestatus%=Ubase%+14
 2320 rendershape%=Ubase%+15
 2330 getnth%=Ubase%+17
 2340 locatefile%=Ubase%+19
 2350 playsound%=Ubase%+20
 2360
 2370 PD%=&80140
 2380 PDselect%=PD%+5
 2390 PDabort%=PD%+9
 2400 PDpagesize%=PD%+3
 2410 PDgiverec%=PD%+11
 2420 PDdrawpage%=PD%+12
 2430 PDgetrec%=PD%+13
 2440 PDendjob%=PD%+8
 2450
 2460 LOCAL ERROR
 2470 ON ERROR LOCAL ENDPROC
 2480 SYS "OS_Module",14,"Ubase%Ultimap"
 2490 ENDPROC
 2500
 2510DEF PROCget_pointer
 2520SYS getp%,,q%
 2530mousex%=!q%:mousey%=q%!4:b%=q%!8:handle%=q%!12:icon%=q%!16:ob%=q%!20
 2540ENDPROC
 2550
 2560DEF PROCerrorbox
 2570REM SYS drag%,,-1
 2580!errblk%=ERR:t$=REPORT$:t$="("+STR$ERR+")"+t$+" at line "+STR$ERL
 2590$(errblk%+4)=t$+CHR$0
 2600SYS "Wimp_ReportError",errblk%,1,"Ultimap"
 2610IF ERR<>1 PROCfinish:END
 2620REM IF printing% printing%=FALSE:PROCclose_window(print_w%)
 2630ENDPROC
 2640;
 2650 DEFFNiconbar
 2660 !q%=-1:q%!4=0:q%!8=0:q%!12=64:q%!16=64
 2670 q%!20=&300A
 2680 PROCstring0(q%+24,appsprite$)
 2690 SYS "Wimp_CreateIcon",,q% TO handle%
 2700 =handle%
 2710;
 2720 DEFPROCset_icon_fonts
 2730 SYS findfont%,,icon_font$,12*16,12*16 TO font%
 2740 SYS "Wimp_WhichIcon",print_w%,q%,1<<6,1<<6
 2750 t%=0:REPEAT:PROCicon_font(print_w%,t%!q%,font%):t%+=4:UNTILt%!q%=-1
 2760 ENDPROC
 2770
 2780 DEFPROCicon_font(window%,icon%,font%)
 2790 !errblk%=window%:errblk%!4=icon%
 2800 errblk%!12=&FF000000:errblk%!8=font%<<24
 2810 font%?font_array%+=1
 2820 SYS seti%,,errblk%
 2830 ENDPROC
 2840
 2850 DEFPROClose_fonts
 2860 FORA%=0TO255:n%=A%?font_array%:A%?font_array%=0
 2870 IF n%>0 FOR B%=1TOn%:SYS losefont%,A%:NEXT
 2880 NEXT:ENDPROC
 2890
 2900 DEFPROCget_mode_info
 2910 SYS "Wimp_ReadPalette",,wimp_palette%
 2920 SYS "OS_ReadModeVariable",-1,4 TO ,,xef%
 2930 SYS "OS_ReadModeVariable",-1,5 TO ,,yef%
 2940 SYS "OS_ReadModeVariable",-1,11 TO ,,screen_width%
 2950 SYS "OS_ReadModeVariable",-1,12 TO ,,screen_height%
 2960 screen_width%=screen_width%<<xef%:screen_height%=screen_height%<<yef%
 2970 ENDPROC
 2980
 2990 DEFPROCstart_drag(type%,x%,y%,x1%,y1%)
 3000 !q%=0:q%!4=5
 3010 q%!8=x%:q%!12=y%:q%!16=x1%:q%!20=y1%
 3020 q%!24=0:q%!28=0:q%!32=screen_width%:q%!36=screen_height%
 3030 SYS drag%,,q%
 3040 drag_type%=type%
 3050 ENDPROC
 3060
 3070REM--------------------------------------------------------------------------------------------------------
 3080
 3090 DEFFNstring0(t%):LOCAL t$:t$="":IF ?t%<32:=""
 3100 REPEAT:t$=t$+CHR$?t%:t%+=1:UNTIL?t%<32 OR LENt$=255:=t$
 3110
 3120 DEFPROCstring0(t%,t$):$t%=t$:t%?LENt$=0:ENDPROC
 3130
 3140REM--------------------------------------------------------------------------------------------------------
 3150
 3160 DEFPROCcheck_pagelist_wc
 3170 but%=q%!8
 3180 !ws%=pagelist_wc%:SYS getw%,,ws%
 3190 offx%=(ws%!4-ws%!20):offy%=(ws%!16-ws%!24)
 3200 page%=(((q%!4)-offy%)DIV-48)+1
 3210 SYS nentries%,s_pages% TO np%:IF page%>np% ENDPROC
 3220 SYS getnth%,s_pages%,page% TO ,page%
 3230 current_page%=page%
 3240 PROCarrange_pagelist_wc(page%)
 3250 PROCpre_process
 3260 PROCshow_page(page%)
 3270 IF scanning% PROCscan
 3280 IF but%AND4 SYS createmenu%,,-1
 3290 ENDPROC
 3300
 3310 DEFPROCshow_page(page%)
 3320 current_page%=page%
 3330 !q%=main_w%:SYS getw%,,q%
 3340 IF (q%!32) AND (1<<16) SYS forceredraw%,-1,q%!4,q%!8,q%!12,q%!16
 3350 PROCwindow_title(main_w%,full_name$)
 3360 SYS getentry%,s_pages%,page% TO adr%
 3370 current_page$=FNstring0(adr%+4)
 3380 OSCLI "set Upage "+current_page$
 3390 ENDPROC
 3400
 3410 DEFPROCupdate_object(stack%,object%)
 3420 LOCAL adr%
 3430 SYS getentry%,stack%,object% TO adr%
 3440 SYS forceredraw%,main_w%,adr%!12,adr%!16,adr%!20,adr%!24
 3450 ENDPROC
 3460
 3470 DEFPROCset_icon_state(window%,icon%,eor%,clear%)
 3480 !errblk%=window%:errblk%!4=icon%:errblk%!8=eor%:errblk%!12=clear%:SYS seti%,,errblk%
 3490 ENDPROC
 3500
 3510 DEFFNicon_state(window%,icon%)
 3520 !errblk%=window%:errblk%!4=icon%:SYS geti%,,errblk%:=errblk%!24
 3530
 3540 DEF PROCset_icon_text(window%,icon%,text$)
 3550 !errblk%=window%:errblk%!4=icon%:SYS geti%,,errblk%
 3560 PROCstring0(errblk%!28,LEFT$(text$,(errblk%!36)-1))
 3570 errblk%!8=0:errblk%!12=0:SYS seti%,,errblk%
 3580 ENDPROC
 3590
 3600 DEFFNleaf(name$):IF INSTR(name$,".")=0:=name$
 3610 REPEATname$=RIGHT$(name$,LENname$-INSTR(name$,"."))
 3620 UNTILINSTR(name$,".")=0:=name$
 3630
 3640 DEFPROCstart_drag(type%,x%,y%,x1%,y1%)
 3650 !q%=0:q%!4=5
 3660 q%!8=x%:q%!12=y%:q%!16=x1%:q%!20=y1%
 3670 q%!24=0:q%!28=0:q%!32=screen_width%:q%!36=screen_height%
 3680 SYS drag%,,q%
 3690 drag_type%=type%
 3700 ENDPROC
 3710
 3720 DEFPROCramfetch
 3730 DMT_ref%=q%!4
 3740 DMT%=q%!20
 3750 DMT_len%=q%!24
 3760 CASE file_type% OF
 3770   WHEN &AFF,&FF9:PROCsave_picture(drag_ptype%,drag_picture%,"")
 3780   WHEN &FFF:PROCsave_text(drag_picture%,"")
 3790   WHEN &D3C:PROCsave_sound(drag_sound%,"")
 3800 ENDCASE
 3810 ENDPROC
 3820
 3830 DEFPROCdatasaveack
 3840 IF q%!12<>myref% ENDPROC
 3850 DMT%=0
 3860 f_type%=q%!40
 3870 CASE f_type% OF
 3880   WHEN &AFF,&FF9:PROCsave_picture(drag_ptype%,drag_picture%,FNstring0(q%+44))
 3890   WHEN &D3C:PROCsave_sound(drag_sound%,FNstring0(q%+44))
 3900   WHEN &FFF:PROCsave_text(drag_picture%,FNstring0(q%+44))
 3910 ENDCASE
 3920 q%!12=q%!8:q%!16=3
 3930 SYS sendmessage%,17,q%,q%!4
 3940 ENDPROC
 3950
 3960 DEFPROCsave_picture(type%,token%,name$)
 3970 save$=""
 3980 LOCAL ERROR
 3990 ON ERROR LOCAL:RESTORE ERROR:ERROR 1,REPORT$
 4000 IF DMT_ptr%=0 THEN
 4010   SYS "Hourglass_On"
 4020   SYS getentry%,type%,token% TO adr%
 4030   len%=(!adr%)-16
 4040   SYS readstatus%,type%,token% TO l%:IF l% len%=l%
 4050   adr%+=16
 4060   IF type%=s_sprites% THEN
 4070     SYS getentry%,s_sprites%,token% TO adr%
 4080     IF !adr%=(adr%!16)+16 THEN
 4090       save$=FNstring0(adr%+4)
 4100       adr%!4=1:adr%!8=16:adr%!12=!adr%
 4110       len%=!adr%+12:adr%+=4
 4120     ELSE
 4130       SYS unpacksprite%,s_sprites%,token%,sprites%+12
 4140       !sprites%=1
 4150       sprites%!4=16
 4160       sprites%!8=(sprites%!12)+16
 4170       len%=sprites%!8
 4180       adr%=sprites%
 4190     ENDIF
 4200     file_type%=&FF9
 4210   ELSE
 4220     file_type%=&AFF
 4230   ENDIF
 4240   DMT_mylen%=len%
 4250   DMT_data%=adr%
 4260 ENDIF
 4270 PROCsave_slave(name$,adr%,len%,file_type%)
 4280 IF save$<>"" THEN
 4290   SYS getentry%,s_sprites%,token% TO adr%
 4300   PROCstring0(adr%+4,save$)
 4310 ENDIF
 4320 ENDPROC
 4330
 4340 DEFPROCsave_sound(sound%,name$)
 4350 LOCAL ERROR
 4360 ON ERROR LOCAL:RESTORE ERROR:ERROR 1,REPORT$
 4370 IF DMT_ptr%=0 THEN
 4380   SYS "Hourglass_On"
 4390   SYS getentry%,s_sounds%,sound% TO adr%
 4400   len%=(!adr%)-24
 4410   SYS readstatus%,s_sounds%,sound% TO l%:IF l% len%=l%
 4420   adr%+=24
 4430   DMT_mylen%=len%
 4440   DMT_data%=adr%
 4450 ENDIF
 4460 PROCsave_slave(name$,adr%,len%,&D3C)
 4470 ENDPROC
 4480
 4490 DEFPROCsave_text(text%,name$)
 4500 LOCAL ERROR
 4510 ON ERROR LOCAL:RESTORE ERROR:ERROR 1,REPORT$
 4520 SYS getentry%,s_text%,text% TO adr%
 4530 SYS movedata%,adr%,ws%,!adr%
 4540 adr%=ws%+4:t%=adr%
 4550 len%=0
 4560 REPEAT
 4570   IF ?t%=13 ?t%=10
 4580   IF ?t%<>0 len%+=1:t%+=1
 4590 UNTIL?t%=0 ELSE UNTIL?t%=0
 4600 IF DMT_ptr%=0 THEN
 4610   SYS "Hourglass_On"
 4620   DMT_mylen%=len%
 4630   DMT_data%=adr%
 4640 ENDIF
 4650 PROCsave_slave(name$,adr%,len%,&FFF)
 4660 ENDPROC
 4670
 4680 DEFPROCsave_slave(name$,adr%,len%,file_type%)
 4690 IF DMT% THEN
 4700   IF DMT_mylen%-DMT_ptr%>DMT_len% THEN
 4710     l%=DMT_len%
 4720   ELSE
 4730     l%=DMT_mylen%-DMT_ptr%
 4740     SYS "Hourglass_Off"
 4750   ENDIF
 4760   SYS "Wimp_TransferBlock",task_handle%,DMT_data%+DMT_ptr%,DMT_ref%,DMT%,l%
 4770   DMT_ptr%+=l%
 4780   q%!12=q%!8:q%!16=7
 4790   q%!24=l%
 4800   SYS sendmessage%,18,q%,q%!4:REM send RAM transmit
 4810 ELSE
 4820    OSCLI "save "+name$+" "+STR$~adr%+" +"+STR$~len%
 4830    OSCLI "SETTYPE "+name$+" "+STR$~file_type%
 4840    SYS "Hourglass_Off"
 4850 ENDIF
 4860 ENDPROC
 4870
 4880 DEFPROCdataload
 4890 SYS movedata%,q%,old_q%,256
 4900 CASE old_q%!40 OF
 4910   WHEN &BC3:
 4920     IF old_q%!20=main_w% OR (old_q%!20=-2 AND old_q%!24=icon_bar%) THEN
 4930       IF old_q%!12<>0 ENDPROC
 4940       IF modified% THEN
 4950         PROCopen_query("load"+FNstring0(old_q%+44))
 4960       ELSE
 4970         PROCload_file(FNstring0(old_q%+44),1)
 4980         old_q%!12=old_q%!8:old_q%!16=4:SYS "Wimp_SendMessage",17,old_q%,old_q%!4
 4990       ENDIF
 5000     ENDIF
 5010 ENDCASE
 5020 ENDPROC
 5030
 5040 DEFPROCload_file(name$,error%)
 5050 t%=OPENIN(name$):l%=EXT#t%:CLOSE#t%
 5060 PROCset_slot(HIMEM+(l%DIV&4000)*&4000+&4000,error%)
 5070 SYS newfile%
 5080 full_name$=LEFT$(name$,LEN(name$)-INSTR(name$,"!")-1)
 5090 SYS "Hourglass_On"
 5100 OSCLI "load  "+name$+" 40000"
 5110 version%=!&4000C
 5120 SYS locatefile%,&78000
 5130 modified%=0
 5140 query_string$=""
 5150 edited_area%=0
 5160 current_page%=!&40020:toolbox_on%=!&40024:menu_enabled%=!&40028:page_size%=!&4002C
 5170 h_scroll%=!&40060:v_scroll%=!&40064:title_bar%=!&40068:toggle_icon%=!&4006C
 5180 scanning%=!&40070:scan_keys%=!&40074:scan_time%=!&40078
 5190 PROCsize_page
 5200 PROCredefine_main_w
 5210 PROCopen_main_w
 5220 IF !&40030 THEN
 5230   t%=&40030:x%=t%!4:y%=t%!8:x1%=t%!12:y1%=t%!16
 5240   IF x1%>screen_width% x%=x%-(x1%-x%):x1%=screen_width%
 5250   IF y1%+40>screen_height% y%=y%-(y1%-y%)-40:y1%=screen_height%-40
 5260   IF x%<0 x%=0
 5270   IF y%<0 y%=0
 5280   PROCopen_window(main_w%,x%,y%,x1%,y1%,t%!20,t%!24,-1)
 5290 ENDIF
 5300 SYS "Hourglass_Off"
 5310 SYS "OS_ReadVarVal","Obey$Dir",main%,1000 TO ,,T%
 5320 T%?main%=0
 5330 full_name$=FNstring0(main%)
 5340 PROCwindow_title(main_w%,full_name$)
 5350 appsprite$=FNleaf(full_name$)
 5360 menu$=RIGHT$(appsprite$,LEN(appsprite$)-1)
 5370 IF LENmenu$<12 REPEAT:menu$=menu$+CHR$0:UNTILLENmenu$=12
 5380 ENDPROC
 5390
 5400REM--------------------------------------------------------------------------------------------------------
 5410
 5420 DEFPROCnew_file
 5430 PROCset_slot(HIMEM+&4000,2)
 5440 SYS newfile%
 5450 FOR t%=1 TO 20
 5460   SYS newstack%
 5470 NEXT
 5480 full_name$="No_Name"
 5490 ENDPROC
 5500
 5510REM----------------------------------------------------------------------------------------------------
 5520
 5530 DEFPROCopen_centre(handle%,off%)
 5540 !q%=handle%:SYS getw%,,q%
 5550 w%=(q%!12)-(q%!4):h%=(q%!16)-(q%!8)
 5560 wx%=screen_width%DIV2-w%DIV2
 5570 wy%=screen_height%DIV2-h%DIV2
 5580 PROCopen_window(handle%,wx%,wy%+off%,wx%+w%,wy%+h%+off%,q%!20,q%!24,-1)
 5590 ENDPROC
 5600
 5610 DEFPROCopen_main_w
 5620 !ws%=main_w%:SYS getw%,,ws%
 5630 sx%=ws%!4:sy%=ws%!8
 5640 sx1%=ws%!12:sy1%=ws%!16
 5650 sh%=screen_height%:sw%=screen_width%
 5660 hs%=0:vs%=0:tb%=0
 5670 IF h_scroll% hs%=40
 5680 IF v_scroll% vs%+=40
 5690 IF title_bar% tb%=36
 5700 w%=sx1%-sx%:h%=sy1%-sy%
 5710 IF sy1%+tb%>sh% sy1%=sh%-tb%:sy%=sy1%-h%
 5720 IF sy%<hs% sy%=hs%
 5730 IF sx1%+vs%>sw% sx1%=sw%-vs%:sx%=sx1%-w%
 5740 IF sx%<0 sx%=0
 5750 !ws%=main_w%
 5760 ws%!4=sx%
 5770 ws%!8=sy%
 5780 ws%!12=sx1%
 5790 ws%!16=sy1%
 5800 ws%!20=0:ws%!24=0
 5810 ws%!28=-1
 5820 PROCopen_window(main_w%,ws%!4,ws%!8,ws%!12,ws%!16,ws%!20,ws%!24,ws%!28)
 5830 !q%=main_w%:SYS getw%,,ws%
 5840 ENDPROC
 5850
 5860REM----------------------------------------------------------------------------------------------------
 5870
 5880 DEFPROCdraw_picture(type%,token%,x%,y%,w%,h%,flags%)
 5890 IF type%=s_draw% x%+=(1<<xef%):y%+=(1<<yef%):w%-=(2<<xef%):h%-=(2<<yef%)
 5900 SYS getentry%,type%,token% TO a%
 5910 IF !a%>sprite_size%-24 flags%=flags%OR8
 5920 !errblk%=x%:errblk%!4=y%:errblk%!8=w%:errblk%!12=h%
 5930 SYS rendershape%,type%,token%,sprites%,errblk%,flags%AND15
 5940 ENDPROC
 5950
 5960REM----------------------------------------------------------------------------------------------------
 5970
 5980 DEFPROCwindow_title(window%,title$)
 5990 IF window%=main_w% THEN
 6000   SYS getentry%,s_pages%,current_page% TO adr%
 6010   title$=title$+" - "+FNstring0(adr%+4)
 6020 ENDIF
 6030 IF modified% title$=title$+" *"
 6040 !errblk%=window%:SYS getwi%,,errblk%
 6050 PROCstring0(errblk%!76,title$)
 6060 SYS forceredraw%,-1,errblk%!4,(errblk%!16),errblk%!12,errblk%!16+36
 6070 ENDPROC
 6080
 6090
 6100
 6110REM----------------------------------------------------------------------------------------------------
 6120
 6130 DEFPROCcheck_icon_bar
 6140 mx%=!q%:my%=q%!4:button%=q%!8
 6150 IF button% AND 2:PROCdo_icon_bar_menu(mx%,my%):ENDPROC
 6160 PROCfront(main_w%)
 6170 SYS setcaret%,main_w%,-1,0,0,10
 6180 ENDPROC
 6190
 6200 DEFPROCdo_icon_bar_menu(x%,y%)
 6210 IF scan_time%=0:scan_time%=100:scan_keys%=1
 6220 FOR opt%=0TO2STEP2:P%=main%
 6230 [opt opt%
 6240.iconmenu
 6250 equs menu$
 6260 equd &070207:equd 208:equd 40:equd 0
 6270 equd 0:equd info%:equd &07000021
 6280 equs "Info        "
 6290 equd scanning%AND1:equd ibmenu:equd &07000021
 6300 equs "Scanning    "
 6310 equd 0:equd somenu:equd &07000021
 6320 equs "Sound volume"
 6330 equd &80:equd -1:equd &07000021
 6340 equs "Quit        "
 6350
 6360.ibmenu
 6370 equs "Scanning":equd 0
 6380 equd &070207:equd 208:equd 40:equd 0
 6390 equd (scan_keys%=2)AND1:equd -1:equd &07000021
 6400 equs "Two switches"
 6410 equd &80:equd ibmenu1:equd &07000021
 6420 equs "Speed       "
 6430
 6440.somenu
 6450 equs "Sound Volume"
 6460 equd &070207:equd 208:equd 40:equd 0
 6470 equd (sound_vol%=&10F)AND1:equd -1:equd &07000021
 6480 equs "Off         "
 6490 equd (sound_vol%=&14F)AND1:equd -1:equd &07000021
 6500 equs "Quiet       "
 6510 equd &80 OR ((sound_vol%=&17F)AND1):equd -1:equd &07000021
 6520 equs "Loud        "
 6530
 6540.ibmenu1
 6550 equs "Seconds":equb 0:equd 0
 6560 equd &070207:equd 208:equd 40:equd 0
 6570 equd &84:equd -1:equd &07000121
 6580 equd ibmess:equd ibval:equd 8
 6590
 6600.ibval equs "a0-9."+CHR$0
 6610.ibmess equs STR$(scan_time%/100)+CHR$(0)
 6620
 6630 ]:NEXT
 6640
 6650 SYS createmenu%,,main%,mx%-16,260
 6660 menu%=5
 6670 ENDPROC
 6680
 6690REM----------------------------------------------------------------------------------------------------
 6700
 6710 DEFPROCicon_bar_menu
 6720 LOCAL c%
 6730 CASE !q% OF
 6740   WHEN 1
 6750     CASE q%!4 OF
 6760       WHEN -1:scanning%=scanning% EOR TRUE
 6770       WHEN 0:
 6780         IF scan_keys%=2 scan_keys%=1 ELSE scan_keys%=2
 6790         scanning%=TRUE
 6800       WHEN 1:
 6810         t%=(VAL(FNstring0(ibmess)))*100
 6820         IF t% scan_time%=t%
 6830         scanning%=TRUE
 6840     ENDCASE
 6850   WHEN 2:
 6860     CASE q%!4 OF
 6870       WHEN 0:sound_vol%=&10F
 6880       WHEN 1:sound_vol%=&14F
 6890       WHEN 2:sound_vol%=&17F
 6900     ENDCASE
 6910   WHEN 3:IF modified% PROCopen_query("") ELSE PROCfinish
 6920 ENDCASE
 6930 SYS getp%,,q%:IF q%!8 AND 1 PROCdo_icon_bar_menu(mx%,my%)
 6940 ENDPROC
 6950
 6960REM--------------------------------------------------------------------------------------------------------
 6970
 6980 DEFPROCdraw_main_w(wx%,wy%,wx1%,wy1%,offx%,offy%)
 6990 SYS getentry%,s_pages%,current_page% TO adr%
 7000 stack%=adr%!20:page_col%=adr%!28
 7010 SYS setcol%,page_col%:RECTANGLE FILL wx%+offx%,wy%+offy%,wx1%-wx%,wy1%-wy%
 7020 SYS nentries%,stack% TO no%
 7030 IF no% THEN
 7040   FOR object%=1 TO no%
 7050     SYS getnth%,stack%,object% TO adr%,token%
 7060     x%=adr%!12:y%=adr%!16:x1%=adr%!20:y1%=adr%!24:flags%=adr%!36
 7070     IF x%<wx1% AND x1%>wx% AND y%<wy1% AND y1%>wy% AND (flags%AND128)=0 THEN
 7080       CASE adr%!4 OF
 7090         WHEN s_text%:PROCdraw_text(stack%,token%,offx%,offy%)
 7100         WHEN s_sprites%,s_draw%:PROCdraw_picture(adr%!4,adr%!8,x%+offx%,y%+offy%,x1%-x%,y1%-y%,flags%)
 7110       ENDCASE
 7120     ENDIF
 7130   NEXT
 7140 ENDIF
 7150 ENDPROC
 7160
 7170 DEFFNstrip_spaces(text$)
 7180 REPEAT
 7190   IF ASCtext$=32 text$=RIGHT$(text$,LENtext$-1)
 7200 UNTILASCtext$<>32
 7210 =text$
 7220
 7230 DEFFNlower_case(text$):IF text$="":=""
 7240 LOCAL t$,t%,c%
 7250 FORt%=1TOLENtext$
 7260   c%=ASC(MID$(text$,t%,1))
 7270   IF c%>64 AND c%<91 c%+=32
 7280   t$=t$+CHR$c%
 7290 NEXT
 7300 =t$
 7310
 7320REM----------------------------------------------------------------------------------------------------
 7330
 7340 DEFPROCdraw_text(stack%,token%,offx%,offy%)
 7350 IF speaking_text% AND speak_token%=token% PROChighlight_text(stack%,token%,offx%,offy%,speak_word%):ENDPROC
 7360 SYS getentry%,stack%,token% TO adr%
 7370 x%=(adr%!12)+offx%
 7380 y%=(adr%!16)+offy%
 7390 x1%=(adr%!20)-(1<<xef%)+offx%
 7400 y1%=(adr%!24)-(1<<yef%)+offy%
 7410 flags%=adr%!36:font%=adr%!40:b_s%=adr%!32
 7420 fcol%=adr%!52:IF fcol% AND &FF fcol%=page_col%
 7430 bcol%=adr%!56
 7440 IF flags%AND1 fcol%=fcol%EOR&FFFFFF00:bcol%=bcol%EOR&FFFFFF00
 7450 PROCdraw_border(b_s%,fcol%,bcol%,x%,y%,x1%,y1%)
 7460 x%+=(1<<xef%)
 7470 x1%-=(1<<xef%)
 7480 y%+=(1<<yef%)
 7490 y1%-=(1<<yef%)
 7500LOCAL ERROR
 7510ON ERROR LOCAL RESTORE ERROR:font%=0
 7520 IF font% THEN
 7530   SYS getentry%,s_fonts%,font% TO t%
 7540   SYS findfont%,,t%+4,adr%!44,adr%!48 TO font%
 7550 ENDIF
 7560 IF font% THEN
 7570   IF bcol% AND &FF bcol%=fcol%
 7580   SYS "ColourTrans_SetFontColours",font%,bcol%,fcol%,14
 7590   SYS fontinfo%,font% TO ,cx%,cy%,cx1%,cy1%
 7600 ELSE
 7610   cx%=-(1<<xef%):cy%=-(1<<yef%):cx1%=8<<xef%:cy1%=8<<yef%
 7620 ENDIF
 7630 text_height%=cy1%
 7640 SYS getentry%,s_text%,adr%!8 TO text%
 7650 text%+=4
 7660 text_offset%=0
 7670 px%=x%+margin%:py%=y1%-text_height%+cy%
 7680 centre%=FALSE:right%=FALSE:underline%=FALSE
 7690 IF flags% AND 8 centre%=TRUE
 7700 IF flags% AND 16 right%=TRUE
 7710 IF flags% AND 32 underline%=TRUE
 7720 REPEAT
 7730   CASE text_offset%?text% OF
 7740     WHEN 0:
 7750     WHEN 13:py%-=text_height%:text_offset%+=1
 7760     OTHERWISE
 7770       text$=FNstring0(text%+text_offset%)
 7780       text_offset%+=LENtext$
 7790       IF font% THEN
 7800         SYS stringwidth%,,text$,1<<30,1<<30,-1,LENtext$ TO ,,w%
 7810         SYS converttoos%,,w% TO ,w%
 7820         IF centre% px%=x%+(x1%-x%)DIV2-w%DIV2
 7830         IF right% px%=x1%-w%-margin%
 7840         IF underline% text$=CHR$(25)+CHR$(1)+CHR$(16)+text$
 7850         SYS paint%,,text$,1<<4,px%,py%-cy%
 7860       ELSE
 7870         w%=LENtext$*cx1%
 7880         IF centre% px%=x%+(x1%-x%)DIV2-w%DIV2
 7890         IF right% px%=x1%-w%-margin%
 7900         SYS setcol%,fcol%:MOVE px%,py%+cy1%:PRINTtext$
 7910         IF underline% MOVE px%,py%-cy%:PLOT1,cx1%*LENtext$,0
 7920       ENDIF
 7930   ENDCASE
 7940 UNTIL text_offset%?text%=0
 7950 IF font% SYS losefont%,font%
 7960 ENDPROC
 7970
 7980 DEFPROCdraw_border(style%,col%,bcol%,x%,y%,x1%,y1%)
 7990 IF (bcol%AND&FF)=0 SYS setcol%,bcol%:RECTANGLE FILL x%,y%,x1%-x%,y1%-y%
 8000 CASE style% OF
 8010   WHEN 1
 8020     SYS setcol%,col%
 8030     RECTANGLE x%,y%,x1%-x%,y1%-y%
 8040   WHEN 2:REM bold
 8050     SYS setcol%,&FFFFFF00
 8060     MOVE x%,y%:DRAW x%,y1%:DRAW x1%,y1%
 8070     SYS setcol%,!(wimp_palette%+16)
 8080     DRAW x1%,y%:DRAW x%,y%
 8090   WHEN 3:REM inset
 8100     SYS setcol%,!(wimp_palette%+16)
 8110     MOVE x%,y%:DRAW x%,y1%:DRAW x1%,y1%
 8120     SYS setcol%,&FFFFFF00
 8130     DRAW x1%,y%:DRAW x%,y%
 8140   ENDCASE
 8150 ENDIF
 8160 ENDPROC
 8170
 8180 DEFPROCplay_sound(sound%)
 8190 SYS getentry%,s_sounds%,sound% TO adr1%
 8200 len%=(!adr1%)-24:SYS readstatus%,s_sounds%,sound% TO l%:IF l% len%=l%
 8210 LOCAL ERROR
 8220 ON ERROR LOCAL RESTORE ERROR:PROCerrorbox:ENDPROC
 8230 SYS playsound%,adr1%+24,len%,sound_vol%
 8240 ENDPROC
 8250
 8260 DEFPROCplay_sound_wait(sound%)
 8270 SYS getentry%,s_sounds%,sound% TO adr1%
 8280 len%=(!adr1%)-24:SYS readstatus%,s_sounds%,sound% TO l%:IF l% len%=l%
 8290 SYS playsound%,adr1%+24,len%,sound_vol%
 8300 REPEAT:SYS playsound%,0 TO t%:UNTILt%<>-1
 8310 ENDPROC
 8320
 8330 DEFPROCmake_space(plus%)
 8340 size%=(!&40004-&40000)+plus%*2
 8350 slot_size%=HIMEM+(size%DIV&4000)*&4000+&4000
 8360 SYS "Wimp_SlotSize",slot_size%,-1 TO t%
 8370 IF t%<slot_size% ERROR 1,"Ultimap has run out of memory"
 8380 ENDPROC
 8390
 8400 DEFPROCset_slot(size%,error%)
 8410 slot_size%=size%
 8420 SYS "Wimp_SlotSize",slot_size%,-1 TO t%
 8430 IF t%<slot_size% ERROR error%,"There's not enough memory to load this file!"
 8440 ENDPROC
 8450
 8460 DEFPROCopen_print_w
 8470 IF portrait% a%=0:b%=1<<21 ELSE a%=1<<21:b%=0
 8480 PROCset_icon_state(print_w%,6,a%,1<<21)
 8490 PROCset_icon_state(print_w%,7,b%,1<<21)
 8500 PROCset_icon_text(print_w%,2,"1")
 8510 SYS getp%,,q%
 8520 SYS createmenu%,,-1
 8530 SYS createmenu%,,print_w%,!q%-30,q%!4+60
 8540 ENDPROC
 8550
 8560 DEFPROCcheck_print_w
 8570 b%=q%!8
 8580 CASE q%!16 OF
 8590   WHEN 3:SYS createmenu%,,-1
 8600   WHEN 4:
 8610     !q%=print_w%:q%!4=7:SYS geti%,,q%
 8620     IF (q%!24) AND (1<<21) style%=2:portrait%=TRUE ELSE style%=1:portrait%=FALSE
 8630     !q%=print_w%:q%!4=2:SYS geti%,,q%
 8640     run_num%=VAL(FNstring0(q%!28))
 8650     IF run_num%=0 run_num%=1
 8660     PROCprint_routine(style%,run_num%)
 8670     IF b% AND 6 SYS createmenu%,,-1
 8680 ENDCASE
 8690 ENDPROC
 8700
 8710 DEFPROCprint_routine(style%,run_num%)
 8720 LOCAL phandle%,ohandle%
 8730 LOCAL left%,bottom%,right%,top%
 8740 LOCAL copiesleft%,rect%
 8750
 8760 phandle%=OPENOUT("printer:")
 8770 LOCAL ERROR
 8780 ON ERROR LOCAL:CLOSE#phandle%:RESTORE ERROR:ERROR 1,"There is no printer driver!"
 8790 SYS PDselect%,phandle%,"Ultima" TO ohandle%
 8800
 8810 ON ERROR LOCAL:SYS PDabort%,phandle%:CLOSE#phandle%:SYS PDselect%,ohandle%:printing%=FALSE:RESTORE ERROR:ERROR 1,REPORT$+STR$ERL
 8820
 8830 SYS PDpagesize% TO ,,,left%,bottom%,right%,top%
 8840 SYS "Hourglass_On"
 8850
 8860 FOR loop%=1 TO run_num%
 8870   !ws%=main_w%:SYS getwi%,,ws%
 8880   mx%=ws%!44:my%=ws%!48:mx1%=ws%!52:my1%=ws%!56
 8890   !box%=mx%:box%!4=my%:box%!8=mx1%:box%!12=my1%
 8900   CASE style% OF
 8910     WHEN 1:REM landscape
 8920       IF page_size%=4 THEN
 8930         scx=.67
 8940         scy=.67
 8950         !matrix%=0:matrix%!4=-scx*2^16:matrix%!8=scy*2^16:matrix%!12=0
 8960         !origin1%=(right%-left%)DIV16:origin1%!4=top%-(top%-bottom%)DIV2-(top%-bottom%)DIV30
 8970       ELSE
 8980         scx=1.4
 8990         scy=1.5
 9000         !matrix%=0:matrix%!4=-scx*2^16:matrix%!8=scy*2^16:matrix%!12=0
 9010         !origin1%=(right%-left%)DIV20:origin1%!4=top%-(top%-bottom%)DIV20
 9020       ENDIF
 9030     WHEN 2:REM portrait
 9040       scx=1.05
 9050       scy=.95
 9060       !matrix%=scx*2^16:matrix%!4=0:matrix%!8=0:matrix%!12=scy*2^16
 9070       !origin1%=(right%-left%)DIV20:origin1%!4=bottom%
 9080   ENDCASE
 9090   SYS PDgiverec%,loop%,box%,matrix%,origin1%,&FFFFFF00
 9100   printing%=TRUE
 9110   SYS PDdrawpage%,1,box2%,0,0 TO copiesleft%,,rect%
 9120   WHILE copiesleft%<>0
 9130     PROCdraw_main_w(mx%,my%,mx1%,my1%,0,0)
 9140     SYS PDgetrec%,,box2% TO copiesleft%,,rect%
 9150   ENDWHILE
 9160 NEXT
 9170
 9180 SYS PDendjob%,phandle%
 9190 CLOSE#phandle%
 9200 SYS PDselect%,ohandle%
 9210 printing%=FALSE
 9220 SYS "Hourglass_Off"
 9230 ENDPROC
 9240
 9250 DEFPROChide_object(stack%,token%,hide%,on_vdu%)
 9260 SYS getentry%,stack%,token% TO adr1%
 9270 IF hide%<>0 AND ((adr1%!36)AND128)<>0 on_vdu%=0
 9280 IF hide%=0 AND ((adr1%!36)AND128)=0 on_vdu%=0
 9290 IF hide% adr1%!36=(adr1%!36)OR128 ELSE adr1%!36=(adr1%!36)AND&FFFFFF7F
 9300 IF on_vdu% SYS forceredraw%,main_w%,adr1%!12,adr1%!16,adr1%!20+(4<<xef%),adr1%!24+(1<<yef%)
 9310 ENDPROC
 9320
 9330 DEFPROClight_object(stack%,token%,hi%,on_vdu%)
 9340 SYS getentry%,stack%,token% TO adr1%
 9350 h%=(adr1%!36)AND1:IF hi% hi%=1
 9360 IF hi% adr1%!36=(adr1%!36)OR1 ELSE adr1%!36=(adr1%!36)AND&FFFFFFFE
 9370 IF on_vdu% AND h%<>hi% SYS forceredraw%,main_w%,adr1%!12,adr1%!16,adr1%!20,adr1%!24
 9380 ENDPROC
 9390
 9400 DEFFNstack(page%)
 9410 LOCAL adr%
 9420 SYS getentry%,s_pages%,page% TO adr%
 9430 IF adr%=0 OR adr%!20=0 ERROR 2,"bad stack from page"
 9440 =adr%!20
 9450
 9460 DEFFNwhich_object(page%,x%,y%)
 9470 stack%=FNstack(page%)
 9480 SYS nentries%,stack% TO no%:o%=0
 9490 IF no%=0:=0
 9500 FOR t%=1 TO no%
 9510   SYS getnth%,stack%,t% TO adr%,token%
 9520   IF x%>=adr%!12 AND y%>=adr%!16 AND x%<adr%!20 AND y%<adr%!24 AND ((adr%!36)AND128)=0 THEN
 9530     o%=token%:off_mx%=x%-adr%!12:off_my%=y%-adr%!16
 9540   ENDIF
 9550 NEXT
 9560 =o%
 9570
 9580 DEFPROCarrange_pagelist_wc(page%)
 9590 iw%=280:ih%=-48:pl_tick%=0
 9600 SYS nentries%,s_pages% TO np%
 9610 !q%=0:q%!8=iw%-(3<<xef%):q%!12=0
 9620 IF np%<3 q%!4=ih%*3 ELSE q%!4=ih%*np%
 9630 SYS setextent%,pagelist_wc%,q%
 9640 iy%=ih%:cur_y%=iy%
 9650 FOR loop%=1TOnp%
 9660   SYS getnth%,s_pages%,loop% TO adr%,token%
 9670   IF token%=page% cur_y%=iy%:pl_tick%=iy%
 9680   iy%+=ih%
 9690 NEXT
 9700 !q%=pagelist_wc%:SYS getw%,,q%
 9710 offy%=(q%!16-q%!24):sy%=q%!24
 9720 wy%=(q%!8)-offy%:wy1%=(q%!16)-offy%
 9730 IF cur_y%<wy% sy%+=cur_y%-wy%
 9740 IF cur_y%-ih%>wy1% sy%=cur_y%-ih%
 9750 q%!24=sy%
 9760 o%=(q%!32)AND(1<<16)
 9770 SYS openw%,,q%
 9780 IF o%=0 THEN
 9790   SYS closew%,,q%
 9800 ELSE
 9810   SYS forceredraw%,-1,q%!4,q%!8,q%!12,q%!16
 9820 ENDIF
 9830 ENDPROC
 9840
 9850 DEFPROCdraw_pagelist_wc(wx%,wy%,wx1%,wy1%)
 9860 SYS nentries%,s_pages% TO np%
 9870 SYS findfont%,,icon_font$,12*16,12*16 TO font%
 9880 ih%=-48:ix%=0:iy%=ih%:ix1%=280:iy1%=0
 9890 FORpage%=1TOnp%
 9900   IF ix%<=wx1% AND ix1%>=wx% AND iy%<=wy1% AND iy1%>=wy% THEN
 9910     SYS getnth%,s_pages%,page% TO adr%,token%
 9920     IF iy%=pl_tick% THEN
 9930       !q%=ix%:q%!4=iy%:q%!8=ix%+38:q%!12=iy1%
 9940       q%!16=&7000019:PROCstring0(q%+20,"�")
 9950       SYS ploticon%,,q%
 9960     ENDIF
 9970     !q%=ix%+38:q%!4=iy%:q%!8=ix%+280:q%!12=iy1%
 9980     q%!16=font%<<24 OR &171:q%!20=adr%+4:q%!24=0:q%!32=12
 9990     SYS ploticon%,,q%
10000   ENDIF
10010   iy%+=ih%:iy1%+=ih%
10020 NEXT
10030 SYS losefont%,font%
10040 !q%=pagelist_wc%
10050 ENDPROC
10060
10070 DEFFNpt_from_context(context%)
10080 CASE context% OF
10090   WHEN s_mousedrag%:=4
10100   WHEN s_often%:=8
10110   WHEN s_pointer%:=16
10120   WHEN s_mouse%:=20
10130   WHEN s_pageshown%:=32
10140 ENDCASE
10150 =0
10160
10170 DEFFNname_exsists(stack%,f$)
10180 SYS nentries%,stack% TO ne%
10190 IF ne%=0:=0
10200 f%=0:f$=FNlower_case(f$)
10210 FORentry%=1TOne%
10220   SYS getnth%,stack%,entry% TO adr%,token%
10230   IF f$=FNlower_case(FNstring0(adr%+4)) f%=token%
10240 NEXT:=f%
10250
10260 DEFPROCsize_page
10270 !q%=main_w%:SYS getwi%,,q%
10280 IF (q%!32)AND(1<<16) open%=TRUE ELSE open%=FALSE
10290 SYS "Wimp_DeleteWindow",,q%
10300 bh%=q%!28
10310 portrait%=FALSE
10320 CASE page_size% OF
10330   WHEN 1:q%!52=1279:q%!48=-920
10340   WHEN 2:q%!52=1599:q%!48=-1160
10350   WHEN 3:q%!52=2046:q%!48=-1500
10360   WHEN 4:q%!52=1320:q%!48=-2000:portrait%=TRUE
10370   OTHERWISE:q%!52=1279:q%!48=-920
10380 ENDCASE
10390 SYS "Wimp_CreateWindow",,q%+4 TO main_w%
10400 !q%=main_w%:SYS getw%,,q%:PROCopen_window(!q%,q%!4,q%!8,q%!12,q%!16,q%!20,q%!24,bh%)
10410 ENDPROC
10420
10430REM ***************************** clicks below here **************************
10440
10450 DEFPROCbegin_trying
10460 trying%=TRUE
10470 click_underway%=FALSE
10480 pause_on%=FALSE
10490 pointer_object%=0
10500 input$=""
10510 PROCzero_page_stack
10520 PROCpre_process
10530 PROCshow_page(current_page%)
10540 IF scanning% PROCscan
10550 OSCLI "set Uobject "+CHR$34+CHR$34
10560 OSCLI "set Ustatus "+CHR$34+CHR$34
10570 status$=""
10580 ENDPROC
10590
10600 DEFPROCdelight
10610 stack%=FNstack(current_page%)
10620 SYS nentries%,stack% TO no%
10630 IF no% THEN
10640   FOR object%=1TOno%
10650     SYS getnth%,stack%,object% TO adr%
10660     IF adr%!36 AND 1 adr%!36=(adr%!36)AND-2
10670   NEXT
10680 ENDIF
10690 IF speak_token% PROCupdate_object(stack%,speak_token%)
10700 ENDPROC
10710
10720 DEFPROCzero_page_stack:FORT%=0TO1020STEP4:T%!page_stack%=0:NEXT:page_ptr%=0:ENDPROC
10730
10740 DEFPROCpre_process
10750 pointer_object%=0
10760 pointer_int%=0
10770 often_int%=0
10780 seq_int%=0
10790 scan_object%=0
10800 speaking_text%=0:speak_word%=0:speak_token%=0
10810 pointer_on%=TRUE
10820 try_time%=TIME
10830 REPEAT
10840  SYS nentries%,s_sequences% TO s%
10850  IF s% THEN
10860    SYS getnth%,s_sequences%,1 TO adr%,token%
10870    SYS killentry%,s_sequences%,token%:REM     clear all sequences
10880  ENDIF
10890 UNTILs%=0
10900 REPEAT
10910  SYS nentries%,s_clickson% TO s%
10920  IF s% THEN
10930    SYS getnth%,s_clickson%,1 TO ,token%
10940    SYS killentry%,s_clickson%,token%:REM     clear all clicks
10950  ENDIF
10960 UNTILs%=0
10970 stack%=FNstack(current_page%)
10980 SYS getentry%,s_pages%,current_page% TO adr%
10990 IF adr%!24 SYS writestatus%,s_clicks%,adr%!24,0
11000 SYS nentries%,stack% TO no%
11010 IF no% THEN
11020   FOR object%=1TOno%
11030     SYS getnth%,stack%,object% TO adr%
11040     adr%!36=(adr%!36)AND&FFFFFF3E:REM     ensure all objects shown, unselected and unhighlighted
11050     click%=adr%!28
11060     IF click% SYS writestatus%,s_clicks%,click%,0:REM          zero status to avoid repetition of click
11070   NEXT
11080 ENDIF
11090 FOR object%=0TOno%
11100   IF object%=0 THEN
11110     SYS getentry%,s_pages%,current_page% TO adr%
11120     click%=adr%!24
11130   ELSE
11140     SYS getnth%,stack%,object% TO adr%
11150     click%=adr%!28
11160   ENDIF
11170   IF click% THEN
11180     SYS getentry%,s_clicks%,click% TO adr%
11190     SYS readstatus%,s_clicks%,click% TO s%
11200     IF s%=0 THEN
11210       SYS writestatus%,s_clicks%,click%,1
11220       IF adr%!4 PROCpre_click(s_mousedrag%,adr%!4,0)
11230       IF adr%!8 THEN
11240         often_int%=TRUE
11250         adr%!24=try_time%+adr%!12
11260         PROCpre_click(s_often%,adr%!8,1)
11270       ENDIF
11280       IF adr%!16 THEN
11290         pointer_int%=TRUE
11300         PROCpre_click(s_pointer%,adr%!16,1)
11310       ENDIF
11320       IF adr%!20 PROCpre_click(s_mouse%,adr%!20,1)
11330       IF adr%!32 THEN
11340         PROCpre_click(s_pageshown%,adr%!32,1)
11350         PROCdo_click(s_pageshown%,adr%!32)
11360       ENDIF
11370     ENDIF
11380   ENDIF
11390 NEXT
11400 ENDPROC
11410
11420 DEFPROCpre_click(context%,click%,seq%)
11430 LOCAL adr%
11440 SYS getentry%,context%,click% TO adr%
11450 end%=adr%+!adr%:adr%+=4
11460 REPEAT
11470   len%=!adr%:cmd%=adr%!4
11480   CASE cmd% OF
11490     WHEN 1,3,4:IF seq%=0 PROCpre_list(cmd%,adr%+8,len%-12)
11500     WHEN 5:IF context%=s_pageshown% AND seq%=0 PROCplay_sound(adr%!8)
11510     WHEN 7:
11520       IF seq% THEN
11530         seq_int%=TRUE
11540         flag%=adr%!12:s%=adr%+36:e%=len%-40
11550         IF flag% AND 4 s%=adr%+40:e%=len%-44
11560         PROCpre_list(3,s%,e%)
11570       ENDIF
11580   ENDCASE
11590   adr%+=len%
11600 UNTIL adr%>=end%
11610 ENDPROC
11620
11630 DEFPROCpre_list(cmd%,adr%,len%)
11640 FORlist%=0TOlen%STEP4
11650   CASE cmd% OF
11660     WHEN 1:PROClight_object(stack%,list%!adr%,1,0)
11670     WHEN 3:PROChide_object(stack%,list%!adr%,1,0)
11680     WHEN 4:PROChide_object(stack%,list%!adr%,0,0)
11690   ENDCASE
11700 NEXT
11710 ENDPROC
11720
11730 DEFPROCtry_poll
11740 SYS poll%,,q% TO A%
11750 SYS playsound%,0
11760 SYS "OS_Module",16,"Ubase%Ultimap"
11770 CASE A% OF
11780   WHEN 0:PROCtry_null
11790   WHEN 1:PROCredraw_window
11800   WHEN 2:PROCopen_window(!q%,q%!4,q%!8,q%!12,q%!16,q%!20,q%!24,q%!28)
11810   WHEN 3:PROCclose_window(!q%)
11820   WHEN 4:IF !q%=main_w% AND pointer_on%<>TRUE OSCLI"pointer 1"
11830   WHEN 5
11840     IF !q%=main_w% AND pointer_on%=1 SYS "Wimp_SpriteOp",36,1,"ptr_clock",2
11850     IF !q%=main_w% AND pointer_on%=2 SYS "Wimp_SpriteOp",36,1,"ptr_hand",2
11860   WHEN 6:PROCtry_mouse
11870   WHEN 7:PROCtry_user_drag
11880   WHEN 8:PROCtry_keys
11890   WHEN 9:PROCtry_menu_select
11900   WHEN 17,18:PROCtry_receive(q%)
11910 ENDCASE
11920 ENDPROC
11930
11940 DEF PROCtry_receive(q%)
11950 CASE q%!16 OF
11960   WHEN 0:PROCfinish:END
11970   WHEN 2:PROCdatasaveack
11980   WHEN 3:IF q%!40=&BC3 PROCdataload
11990   WHEN 6:PROCramfetch
12000   WHEN &502:PROChelp_request
12010   WHEN &400C0:PROCtry_menu_warning
12020   WHEN &400C1:
12030     SYS "Hourglass_On"
12040     PROCget_mode_info
12050     PROClose_fonts
12060     PROCset_icon_fonts
12070     SYS "Hourglass_Off"
12080 ENDCASE
12090 ENDPROC
12100
12110 DEFPROCtry_null
12120 !q%=main_w%:SYS getw%,,q%:IF((q%!32)AND(1<<16))=0 ENDPROC
12130 IF seq_int% PROCcheck_sequences(TIME)
12140 PROCcheck_clicks
12150 IF RIGHT$(input$,1)=CHR$13:input$=LEFT$(input$,LEN(input$)-1):!q%=main_w%:q%!24=13:PROCtry_keys
12160 IF pointer_int% AND scanning%=FALSE PROCunder_pointer
12170 IF often_int% PROCoften
12180 IF scanning% AND scan_keys%=1 PROCscan
12190 SYS playsound%,0 TO t%
12200 IF t%<>-1 THEN
12210   IF speaking_text% THEN
12220     IF speak_sound% THEN
12230       PROCplay_sound_wait(speak_sound%)
12240     ELSE
12250       VDU7:t%=TIME+50:REPEAT:UNTILTIME>t%
12260     ENDIF
12270     PROCspeaking_text
12280   ENDIF
12290 ENDIF
12300 PROCcheck_sysvars
12310 ENDPROC
12320
12330 DEFPROCcheck_sysvars
12340 SYS "OS_ReadVarVal","Upage",main%,1000 TO ,,T%
12350 T%?main%=0:page$=FNstring0(main%)
12360 IF page$<>current_page$ THEN
12370   page%=FNname_exsists(s_pages%,page$)
12380   IF page% THEN
12390     current_page%=page%
12400     PROCpre_process
12410     PROCshow_page(current_page%)
12420     IF scanning% PROCscan
12430   ENDIF
12440 ENDIF
12450 SYS "OS_ReadVarVal","Uobject",main%,1000 TO ,,T%
12460 T%?main%=0:object$=FNstring0(main%)
12470 IF object$<>"" THEN
12480   OSCLI "set Uobject "+CHR$34+CHR$34
12490   input$=object$:!q%=main_w%:q%!24=13:PROCtry_keys
12500 ENDIF
12510 ENDPROC
12520
12530 DEFPROCtry_mouse
12540 CASE q%!12 OF
12550   WHEN -2:IF q%!16=icon_bar% SOUND 1,&100,&9000,1:PROCcheck_icon_bar
12560   WHEN main_w%:PROCtry_main_w
12570   WHEN pagelist_wc%:PROCcheck_pagelist_wc
12580   WHEN print_w%:PROCcheck_print_w
12590 ENDCASE
12600 ENDPROC
12610
12620 DEFPROCtry_main_w
12630 SYS setcaret%,main_w%,-1,0,0,10
12640 mx%=!q%:my%=q%!4
12650 button%=q%!8
12660 IF button%AND2 THEN
12670   IF menu_enabled% PROCopen_try_menu(mx%,my%)
12680   ENDPROC
12690 ENDIF
12700 IF scanning% PROCscan_click(button%):ENDPROC
12710 IF pointer_on%=1 ENDPROC
12720 icon%=q%!16
12730 !q%=main_w%:SYS getw%,,q%
12740 offx%=(q%!4-q%!20):offy%=(q%!16-q%!24)
12750 mx%-=offx%:my%-=offy%
12760 CASE button% OF
12770   WHEN &40
12780     stack%=FNstack(current_page%)
12790     object%=FNwhich_object(current_page%,mx%,my%)
12800     IF object% THEN
12810       SYS getentry%,stack%,object% TO adr%
12820       click%=adr%!28
12830       IF click% THEN
12840         SYS getentry%,s_clicks%,click% TO adr%
12850         IF adr%!4 THEN
12860           SYS getentry%,s_mousedrag%,adr%!4 TO adr%
12870           PROCbegin_save(object%,adr%!12)
12880         ENDIF
12890       ENDIF
12900     ENDIF
12910   WHEN &100
12920     page_ptr%-=4:IF page_ptr%<0 page_ptr%=1020
12930     IF page_ptr%!page_stack%<>0 THEN
12940       PROCdelight
12950       current_page%=page_ptr%!page_stack%
12960       page_ptr%!page_stack%=0
12970       PROCpre_process
12980       PROCshow_page(current_page%)
12990       IF scanning% PROCscan
13000     ENDIF
13010   WHEN &400
13020     stack%=FNstack(current_page%)
13030     object%=FNwhich_object(current_page%,mx%,my%)
13040     IF object% THEN
13050       SYS getentry%,stack%,object% TO adr%
13060       click%=adr%!28
13070       IF click% THEN
13080         SYS getentry%,s_clicks%,click% TO adr%
13090         IF adr%!20 PROCdo_click_recorded(object%,s_mouse%,adr%!20)
13100       ENDIF
13110     ELSE
13120       SYS getentry%,s_pages%,current_page% TO adr%
13130       click%=adr%!24
13140       IF click% THEN
13150         SYS getentry%,s_clicks%,click% TO adr%
13160         IF adr%!20 PROCdo_click_recorded(0,s_mouse%,adr%!20)
13170       ENDIF
13180     ENDIF
13190 ENDCASE
13200 ENDPROC
13210
13220 DEFPROCtry_keys
13230 CASE !q% OF
13240   WHEN main_w%
13250     key%=q%!24
13260     IF key%=13 THEN
13270       stack%=FNstack(current_page%)
13280       IF FNlower_case(LEFT$(input$,6))="object" THEN
13290         token%=VAL(RIGHT$(input$,LEN(input$)-6))
13300         SYS getentry%,stack%,token% TO adr%
13310         IF adr% THEN
13320           IF adr%!28 THEN
13330             pointer_object%=token%
13340             SYS getentry%,s_clicks%,adr%!28 TO adr%
13350             IF adr%!20 PROCdo_click_recorded(token%,s_mouse%,adr%!20)
13360           ENDIF
13370         ENDIF
13380       ENDIF
13390       IF FNlower_case(LEFT$(input$,4))="back" q%!8=&100:PROCtry_main_w
13400       input$=""
13410     ELSE
13420       IF key%=27:PROCclose_window(main_w%):ENDPROC
13430       IF key%=&180 PROCopen_print_w:ENDPROC
13440       IF key%>31 AND key%<255 input$=input$+CHR$(key%) ELSE SYS processkey%,key%
13450       IF LENinput$=255 input$=""
13460     ENDIF
13470   WHEN print_w%
13480     IF q%!24=13 q%!8=4:q%!16=4:PROCcheck_print_w ELSE SYS processkey%,q%!24
13490   OTHERWISE
13500     SYS processkey%,q%!24
13510 ENDCASE
13520 ENDPROC
13530
13540 DEFPROCdo_click_recorded(object%,context%,click%)
13550 IF object% status$=".object"+STR$object%+"."+RIGHT$(TIME$,8)
13560 IF object%=0 status$=".background."+RIGHT$(TIME$,8)
13570 OSCLI "set Ustatus "+FNleaf(full_name$)+"."+current_page$+status$
13580 PROCdo_click(context%,click%)
13590 ENDPROC
13600
13610 DEFPROCdo_click(context%,click%)
13620 SYS getentry%,context%,click% TO adr%
13630 SYS movedata%,adr%,ws%+8,!adr%
13640 !ws%=(ws%!8)+8:ws%!4=12:ws%!8=0
13650 PROCmake_space(!ws%+16)
13660 SYS addentry%,s_clickson%,ws%
13670 PROCcheck_clicks
13680 ENDPROC
13690
13700 DEFPROCcheck_clicks
13710 SYS nentries%,s_clickson% TO nc%
13720 IF nc%=0 ENDPROC
13730 FOR click%=1TOnc%
13740   SYS getnth%,s_clickson%,click% TO click_adr%
13750   IF click_adr%!8<TIME AND click_adr%!4<>0 THEN
13760     ptr%=click_adr%!4:cadr%=click_adr%+ptr%
13770     click_len%=!cadr%:cmd%=cadr%!4:ok%=TRUE
13780     CASE cmd% OF
13790       WHEN 1,3,4:PROCclick_list(cmd%,cadr%+8,click_len%-12)
13800       WHEN 2
13810         PROCdelight
13820         page_ptr%!page_stack%=current_page%
13830         page_ptr%+=4:IF page_ptr%=1024 page_ptr%=0
13840         current_page%=cadr%!8
13850         IF current_page%=0 SYS nentries%,s_pages% TO t%:current_page%=RND(t%)
13860         IF current_page%=0 current_page%=1
13870         PROCpre_process
13880         PROCshow_page(current_page%)
13890         IF scanning% PROCscan
13900         ENDPROC
13910       WHEN 5
13920         SYS playsound%,0 TO t%
13930         IF t%=-1 ok%=FALSE ELSE PROCplay_sound(cadr%!8)
13940       WHEN 6:PROCspeak_text(stack%,cadr%!8)
13950       WHEN 7:PROCinit_seq(TIME,cadr%)
13960       WHEN 8:
13970         click_cmd$=FNstring0(cadr%+8)
13980         cmd$=FNlower_case(click_cmd$)
13990         IF LEFT$(cmd$,10)="load file " THEN
14000           file$=RIGHT$(cmd$,LENcmd$-10):page$=""
14010           IF INSTR(file$," ") THEN
14020             page$=RIGHT$(file$,LEN(file$)-INSTR(file$," "))
14030             file$=LEFT$(file$,INSTR(file$," ")-1)
14040           ENDIF
14050           file$=full_name$+"."+file$
14060           LOCAL ERROR
14070           ON ERROR LOCAL:RESTORE ERROR:click_adr%!4=0:ERROR 1,REPORT$
14080           PROCload_file(file$,1)
14090           IF page$<>"" page%=FNname_exsists(s_pages%,page$):IF page% current_page%=page%
14100           PROCpre_process
14110           PROCshow_page(current_page%)
14120           IF scanning% PROCscan
14130           PROCzero_page_stack
14140           ENDPROC
14150         ENDIF
14160         IF LEFT$(cmd$,4)="load" OR LEFT$(cmd$,5)="*load" THEN
14170           file$=RIGHT$(cmd$,LENcmd$-5):page$=""
14180           IF INSTR(file$," ") THEN
14190             page$=RIGHT$(file$,LEN(file$)-INSTR(file$," "))
14200             file$=LEFT$(file$,INSTR(file$," ")-1)
14210           ENDIF
14220           LOCAL ERROR
14230           ON ERROR LOCAL:RESTORE ERROR:click_adr%!4=0:ERROR 1,REPORT$
14240           PROCload_file(file$,1)
14250           IF page$<>"" page%=FNname_exsists(s_pages%,page$):IF page% current_page%=page%
14260           PROCpre_process
14270           PROCshow_page(current_page%)
14280           IF scanning% PROCscan
14290           PROCzero_page_stack
14300           ENDPROC
14310         ENDIF
14320         IF LEFT$(cmd$,3)="run" OR LEFT$(cmd$,4)="*run" THEN
14330           file$=RIGHT$(cmd$,LENcmd$-4):PRINTfile$
14340           LOCAL ERROR
14350           ON ERROR LOCAL:RESTORE ERROR:click_adr%!4=0:ERROR 1,REPORT$
14360           OSCLI "filer_run "+file$
14370           click_cmd$=""
14380         ENDIF
14390         IF LEFT$(cmd$,6)="replay" THEN
14400           file$=RIGHT$(cmd$,LENcmd$-7)
14410           IF INSTR(file$,"-at")=0 THEN
14420             SYS getentry%,stack%,object% TO adr%
14430             x%=(adr%!12)+offx%:y%=(adr%!16)+offy%
14440             file$=file$+" -at "+STR$x%+","+STR$y%
14450           ENDIF
14460           LOCAL ERROR
14470           ON ERROR LOCAL:RESTORE ERROR:click_adr%!4=0:ERROR 1,REPORT$
14480           SYS "Wimp_StartTask",file$
14490           click_cmd$=""
14500         ENDIF
14510         IF LEFT$(cmd$,4)="back" input$="back":!q%=main_w%:q%!24=13:PROCtry_keys:ENDPROC
14520         IF LEFT$(cmd$,6)="object" THEN
14530           click_cmd$=""
14540           input$=cmd$+CHR$13
14550         ENDIF
14560         LOCAL ERROR
14570         ON ERROR LOCAL:RESTORE ERROR:click_adr%!4=0:ERROR 1,REPORT$
14580         IF click_cmd$<>"" OSCLI click_cmd$
14590       WHEN 9:click_adr%!8=TIME+cadr%!8
14600       WHEN 12:pointer_on%=2:PROCget_pointer:IF handle%=main_w% SYS "Wimp_SpriteOp",36,1,"ptr_hand",2
14610     ENDCASE
14620     SYS getnth%,s_clickson%,click% TO click_adr%
14630     IF ok% click_adr%!4=ptr%+click_len%
14640     IF click_adr%!4>=!click_adr% click_adr%!4=0
14650   ENDIF
14660 NEXT
14670 click%=1
14680 REPEAT
14690   SYS getnth%,s_clickson%,click% TO adr%,token%
14700   IF adr%!4=0 THEN
14710     SYS killentry%,s_clickson%,token%
14720     click%-=1
14730   ENDIF
14740   click%+=1
14750   SYS nentries%,s_clickson% TO nc%
14760 UNTILclick%>=nc% OR nc%=0
14770 ENDPROC
14780
14790 DEFPROCclick_list(cmd%,adr%,len%)
14800 FORlist%=0TOlen%STEP4
14810   CASE cmd% OF
14820     WHEN 1
14830       SYS getentry%,stack%,list%!adr% TO t%
14840       IF (t%!36)AND1 t%=0 ELSE t%=1
14850       PROClight_object(stack%,list%!adr%,1,1)
14860     WHEN 3:PROChide_object(stack%,list%!adr%,1,1)
14870     WHEN 4:PROChide_object(stack%,list%!adr%,0,1)
14880   ENDCASE
14890 NEXT
14900 ENDPROC
14910
14920 DEFPROCunder_pointer:IF pointer_on%=1 ENDPROC
14930 PROCget_pointer
14940 !q%=main_w%:SYS getw%,,q%
14950 offx%=(q%!4-q%!20):offy%=(q%!16-q%!24)
14960 mx%=mousex%-offx%:my%=mousey%-offy%
14970 IF handle%=main_w% object%=FNwhich_object(current_page%,mx%,my%) ELSE object%=0
14980 IF object%<>pointer_object% THEN
14990   OSCLI"pointer 1":pointer_on%=TRUE
15000   pointer_object%=object%
15010   stack%=FNstack(current_page%)
15020   SYS nentries%,stack% TO no%
15030   IF no% THEN
15040     FOR ob%=1TOno%
15050       SYS getnth%,stack%,ob% TO adr%,token%
15060       IF token%<>object% AND (adr%!36)AND1 PROClight_object(stack%,token%,0,1)
15070     NEXT
15080     IF object% THEN
15090       SYS getentry%,stack%,object% TO adr%,token%
15100       IF adr%!28 THEN
15110         SYS getentry%,s_clicks%,adr%!28 TO adr%
15120         IF adr%!16 PROCdo_click(s_pointer%,adr%!16)
15130       ENDIF
15140     ELSE
15150       SYS getentry%,s_pages%,current_page% TO adr%
15160       IF adr%!24 THEN
15170         SYS getentry%,s_clicks%,adr%!24 TO adr%
15180         IF adr%!16 PROCdo_click(s_pointer%,adr%!16)
15190       ENDIF
15200     ENDIF
15210   ENDIF
15220 ENDIF
15230 ENDPROC
15240
15250 DEFPROCoften:IF pointer_on%<>TRUE ENDPROC
15260 stack%=FNstack(current_page%)
15270 SYS nentries%,stack% TO no%
15280 IF no% THEN
15290   FOR ob%=1TOno%
15300     SYS getnth%,stack%,ob% TO adr%,token%
15310     IF adr%!28 THEN
15320       SYS getentry%,s_clicks%,adr%!28 TO adr%
15330       IF adr%!8 THEN
15340         IF adr%!24<TIME THEN
15350           adr%!24=TIME+adr%!12
15360           PROCdo_click(s_often%,adr%!8)
15370         ENDIF
15380       ENDIF
15390     ENDIF
15400   NEXT
15410 ENDIF
15420 ENDPROC
15430
15440 DEFPROCopen_try_menu(mx%,my%)
15450 FORI%=0TO2STEP2:P%=main%
15460 [optI%
15470 equs menu$
15480 equd &070207
15490 equd 168:equd 40:equd 0
15500 equd 8:equd pagelist_wc%:equd &07000021
15510 equs "Show page   "
15520 equd &80:equd -1:equd &07000021
15530 equs "Print       "
15540 ]:NEXT
15550 menu%=11
15560 SYS createmenu%,,main%,mx%,my%-32
15570 ENDPROC
15580
15590 DEFPROCtry_menu_warning
15600 mx%=q%!24:my%=q%!28:item%=q%!32
15610 PROCarrange_pagelist_wc(current_page%)
15620 SYS crsubmenu%,,pagelist_wc%,mx%,my%
15630 ENDPROC
15640
15650 DEFPROCtry_menu_select
15660 CASE menu% OF
15670   WHEN 5:PROCicon_bar_menu
15680   WHEN 11:
15690     CASE !q% OF
15700       WHEN 1:PROCopen_print_w
15710     ENDCASE
15720 ENDCASE
15730 ENDPROC
15740
15750 DEFPROCtry_pagelist_wc
15760 but%=q%!8
15770 !ws%=pagelist_wc%:SYS getw%,,ws%
15780 offx%=(ws%!4-ws%!20):offy%=(ws%!16-ws%!24)
15790 page%=(((q%!4)-offy%)DIV-48)+1
15800 SYS nentries%,s_pages% TO np%:IF page%>np% ENDPROC
15810 SYS getnth%,s_pages%,page% TO ,page%
15820 PROCarrange_pagelist_wc(page%)
15830 PROCshow_page(page%)
15840 PROCarrange_pagelist_wc(current_page%)
15850 PROCbegin_trying
15860 IF but%AND4 SYS createmenu%,,-1
15870 ENDPROC
15880
15890 DEFPROCscan
15900 IF scan_count%>TIME ENDPROC
15910 IF scan_keys%=1 scan_count%=TIME+scan_time%
15920 stack%=FNstack(current_page%)
15930 SYS nentries%,stack% TO no%
15940 IF no%=0 ENDPROC
15950 IF scan_object%<>0 THEN
15960   SYS getnth%,stack%,scan_object% TO adr%,token%
15970   IF adr%!36 AND 1 THEN
15980     PROClight_object(stack%,token%,0,1)
15990     scan_object%+=1
16000     IF scan_object%>no% scan_object%=1
16010   ENDIF
16020 ELSE
16030   scan_object%=1
16040 ENDIF
16050 yes%=0
16060 REPEAT
16070   SYS getnth%,stack%,scan_object% TO adr%,token%
16080   IF (adr%!28)<>0 AND ((adr%!36)AND128)=0 THEN
16090     SYS getentry%,s_clicks%,adr%!28 TO adr%
16100     IF adr%!16 THEN
16110       PROClight_object(stack%,token%,1,1):yes%=no%
16120     ELSE
16130       scan_object%+=1
16140       IF scan_object%>no% scan_object%=1
16150       yes%+=1
16160     ENDIF
16170   ELSE
16180     scan_object%+=1
16190     IF scan_object%>no% scan_object%=1
16200     yes%+=1
16210   ENDIF
16220 UNTILyes%=no%
16230 ENDPROC
16240
16250 DEFPROCscan_click(but%)
16260 IF scan_object%=0 ENDPROC
16270 stack%=FNstack(current_page%)
16280 IF scan_keys%=1 OR (scan_keys%=2 AND (but%AND&101)) THEN
16290   SYS getnth%,stack%,scan_object% TO adr%,token%
16300   IF adr%!28 THEN
16310     SYS getentry%,s_clicks%,adr%!28 TO adr%
16320     IF adr%!20 PROCdo_click(s_mouse%,adr%!20)
16330   ENDIF
16340 ELSE
16350   IF but%AND&404 PROCscan
16360 ENDIF
16370 ENDPROC
16380
16390 DEFPROCredefine_main_w
16400 !q%=main_w%:SYS getwi%,,q%
16410 IF (q%!32)AND(1<<16) open%=TRUE ELSE open%=FALSE
16420 SYS "Wimp_DeleteWindow",,q%
16430 f%=((q%!32)AND&83FFFFFF) OR (&83<<24)
16440 bh%=q%!28
16450 IF h_scroll% f%=f%OR(1<<30)
16460 IF v_scroll% f%=f%OR(1<<28)
16470 IF h_scroll% OR v_scroll% f%=f%OR(1<<29)
16480 IF title_bar% f%=f%OR(1<<26):IF toggle_icon% f%=f%OR(1<<27)
16490 q%!32=f%
16500 SYS "Wimp_CreateWindow",,q%+4 TO main_w%
16510 !q%=main_w%:SYS getw%,,q%:PROCopen_window(!q%,q%!4,q%!8,q%!12,q%!16,q%!20,q%!24,bh%)
16520 ENDPROC
16530
16540 DEFPROCinit_seq(time%,adr%)
16550 SYS movedata%,adr%,ws%,!adr%
16560 IF (adr%!12)AND4 ws%!4=40:ws%!8=36 ELSE ws%!4=36:ws%!8=0
16570 ws%!12=4:ws%!16=adr%!20:ws%!20=time%
16580 ws%!24=adr%!8:ws%!28=0:ws%!32=adr%!12
16590 PROCmake_space(!ws%+16)
16600 SYS addentry%,s_sequences%,ws%
16610 IF (ws%!32)AND64 pointer_on%=1:PROCget_pointer:IF handle%=main_w% SYS "Wimp_SpriteOp",36,1,"ptr_clock",2
16620 ENDPROC
16630
16640 DEFPROCcheck_sequences(time%)
16650 SYS nentries%,s_sequences% TO ns%
16660 IF ns% THEN
16670   stack%=FNstack(current_page%)
16680   FOR seq%=1 TO ns%
16690     SYS getnth%,s_sequences%,seq% TO adr%
16700     IF time%>adr%!20 THEN
16710       adr%!20=time%+adr%!16
16720       len%=!adr%:ptr%=adr%!4:optr%=adr%!8:ptr_inc%=adr%!12
16730       loop%=(adr%!32)AND2:last_one%=0
16740       last%=(adr%!32)AND8:trail%=(adr%!32)AND16:noud%=(adr%!32)AND32
16750       seethru%=(adr%!32)AND128
16760       IF adr%!24<>0 AND adr%!28=adr%!24 THEN
16770         IF loop% THEN
16780           IF ptr%=40 last_one%=TRUE
16790         ELSE
16800           IF ptr%=36 last_one%=TRUE
16810         ENDIF
16820       ENDIF
16830       IF optr%<>0 AND trail%=0 THEN
16840         IF last_one% THEN
16850           IF last%=0 THEN
16860             IF noud% THEN
16870               PROCfast_draw(stack%,optr%!adr%,TRUE,0)
16880             ELSE
16890               PROChide_object(stack%,optr%!adr%,1,1)
16900             ENDIF
16910           ENDIF
16920         ELSE
16930           IF noud% THEN
16940             PROCfast_draw(stack%,optr%!adr%,TRUE,0)
16950           ELSE
16960             PROChide_object(stack%,optr%!adr%,1,1)
16970           ENDIF
16980         ENDIF
16990       ENDIF
17000       IF last_one%=0 THEN
17010         IF noud% THEN
17020           PROCfast_draw(stack%,ptr%!adr%,0,seethru%)
17030         ELSE
17040           PROChide_object(stack%,ptr%!adr%,0,1)
17050         ENDIF
17060         adr%!8=ptr%:ptr%+=ptr_inc%
17070         IF loop% THEN
17080           IF ptr%=len% THEN
17090             ptr%=len%-8:adr%!12=-4
17100           ELSE
17110             IF ptr%=32 THEN
17120               ptr%=40:adr%!12=4
17130               IF adr%!24<>0 adr%!28=(adr%!28)+1
17140             ENDIF
17150           ENDIF
17160         ELSE
17170           IF ptr%=len% THEN
17180             ptr%=36
17190             IF adr%!24<>0 adr%!28=(adr%!28)+1
17200           ENDIF
17210         ENDIF
17220       ELSE
17230         ptr%=0
17240       ENDIF
17250       adr%!4=ptr%
17260     ENDIF
17270   NEXT
17280   REPEAT
17290     nomore%=TRUE
17300     SYS nentries%,s_sequences% TO ns%
17310     IF ns% THEN
17320       FOR seq%=1 TO ns%
17330         SYS getnth%,s_sequences%,seq% TO adr%,token%
17340         IF adr%!4=0 AND (adr%!32)AND64 OSCLI"pointer 1":pointer_on%=TRUE
17350         IF adr%!4=0 nomore%=0:seq%=ns%:SYS killentry%,s_sequences%,token%
17360       NEXT
17370     ENDIF
17380   UNTILnomore%
17390 ENDIF
17400 ENDPROC
17410
17420 DEFPROCfast_draw(stack%,token%,erase%,seethru%)
17430 LOCAL adr%
17440 !q%=main_w%:SYS getw%,,q%
17450 offx%=(q%!4-q%!20):offy%=(q%!16-q%!24)
17460 SYS getentry%,stack%,token% TO adr%
17470 x%=(adr%!12)+offx%
17480 y%=(adr%!16)+offy%
17490 x1%=(adr%!20)-(1<<xef%)+offx%
17500 y1%=(adr%!24)-(1<<yef%)+offy%
17510 IF erase% THEN
17520   IF ((adr%!36)AND128)=0 adr%!36=(adr%!36)OR128
17530   SYS getentry%,s_pages%,current_page% TO adr1%
17540   bcol%=adr1%!28:
17550 ELSE
17560   IF (adr%!36)AND128 AND seethru%=0 adr%!36=(adr%!36)EOR128
17570 ENDIF
17580 flags%=adr%!36:type%=adr%!4
17590 !q%=main_w%:q%!4=x%-offx%:q%!8=y%-offy%-32:q%!12=x1%-offx%+(1<<xef%)+32:q%!16=y1%-offy%+(1<<yef%)
17600 SYS updatew%,,q% TO more%
17610 WHILE more%
17620   IF erase% THEN
17630     SYS setcol%,bcol%:RECTANGLE FILL x%,y%,x1%-x%,y1%-y%
17640   ELSE
17650     CASE type% OF
17660       WHEN s_text%:PROCdraw_text(stack%,token%,offx%,offy%)
17670       WHEN s_sprites%,s_draw%:PROCdraw_picture(adr%!4,adr%!8,x%+(1<<xef%),y%+(1<<yef%),x1%-x%,y1%-y%,flags%)
17680     ENDCASE
17690   ENDIF
17700   SYS getr%,,q% TO more%
17710 ENDWHILE
17720 ENDPROC
17730
17740 DEFPROCspeak_text(stack%,token%)
17750 speak_token%=token%
17760 speak_word%=0:speak_sound%=0
17770 SYS getentry%,stack%,token% TO adr%
17780 SYS getentry%,s_text%,adr%!8 TO adr%
17790 sptext%=adr%+4
17800 IF ?sptext%<>0 THEN
17810   speaking_text%=TRUE
17820   text$="":a%=sptext%
17830   REPEAT:text$=text$+CHR$(?a%):a%+=1:UNTIL?a%<48
17840   speak_sound%=FNname_exsists(s_sounds%,text$)
17850   PROCupdate_object(stack%,speak_token%)
17860 ENDIF
17870 ENDPROC
17880
17890 DEFPROCspeaking_text
17900 SYS getentry%,stack%,speak_token% TO adr%
17910 SYS getentry%,s_text%,adr%!8 TO adr%
17920 sptext%=adr%+4
17930 REPEAT
17940   speak_word%+=1
17950   c%=speak_word%?sptext%
17960 UNTILc%=32 OR c%=13 OR c%=0
17970 IF c%=32 OR c%=13 THEN
17980   REPEAT
17990    speak_word%+=1:c%=speak_word%?sptext%
18000   UNTILc%>32 OR c%=0
18010 ENDIF
18020 IF c%<>0 THEN
18030   text$="":a%=speak_word%+sptext%
18040   REPEAT:text$=text$+CHR$(?a%):a%+=1:UNTIL?a%<48
18050   speak_sound%=FNname_exsists(s_sounds%,text$)
18060 ENDIF
18070 IF c%=0 speaking_text%=FALSE
18080 PROCupdate_object(stack%,speak_token%)
18090 ENDPROC
18100
18110 DEFPROChighlight_text(stack%,token%,offx%,offy%,word%)
18120 SYS getentry%,stack%,token% TO adr%
18130 x%=(adr%!12)+offx%
18140 y%=(adr%!16)+offy%
18150 x1%=(adr%!20)-(1<<xef%)+offx%
18160 y1%=(adr%!24)-(1<<yef%)+offy%
18170 flags%=adr%!36:font%=adr%!40:b_s%=adr%!32
18180 fcol%=adr%!52:IF fcol% AND &FF fcol%=default_page_col%
18190 bcol%=adr%!56
18200 IF flags%AND1 fcol%=fcol%EOR&FFFFFF00:bcol%=bcol%EOR&FFFFFF00
18210 PROCdraw_border(b_s%,fcol%,bcol%,x%,y%,x1%,y1%)
18220 x%+=(1<<xef%)
18230 x1%-=(1<<xef%)
18240 y%+=(1<<yef%)
18250 y1%-=(1<<yef%)
18260 LOCAL ERROR
18270 ON ERROR LOCAL RESTORE ERROR:font%=0
18280 IF font% THEN
18290   SYS getentry%,s_fonts%,font% TO t%
18300   SYS findfont%,,t%+4,adr%!44,adr%!48 TO font%
18310 ENDIF
18320 IF font% THEN
18330   IF bcol% AND &FF bcol%=fcol%
18340   SYS fontinfo%,font% TO ,cx%,cy%,cx1%,cy1%
18350 ELSE
18360   cx%=-(1<<xef%):cy%=-(1<<yef%):cx1%=8<<xef%:cy1%=8<<yef%
18370 ENDIF
18380 text_height%=cy1%
18390 SYS getentry%,s_text%,adr%!8 TO text%
18400 text%+=4
18410 text_offset%=0
18420 px%=x%+margin%:py%=y1%-text_height%+cy%
18430 centre%=FALSE:right%=FALSE:underline%=FALSE
18440 IF flags% AND 8 centre%=TRUE
18450 IF flags% AND 16 right%=TRUE
18460 IF flags% AND 32 underline%=TRUE
18470 REPEAT
18480   CASE text_offset%?text% OF
18490     WHEN 0:
18500     WHEN 13:py%-=text_height%:text_offset%+=1
18510     OTHERWISE
18520       text$=FNstring0(text%+text_offset%)
18530       text_offset%+=LENtext$
18540       px%=x%+margin%
18550       IF font% THEN
18560         SYS stringwidth%,,text$,1<<30,1<<30,-1,LENtext$ TO ,,w%
18570         SYS converttoos%,,w% TO ,w%
18580         IF centre% px%=x%+(x1%-x%)DIV2-w%DIV2
18590         IF right% px%=x1%-w%-margin%
18600         IF underline% ul$=CHR$(25)+CHR$(1)+CHR$(16) ELSE ul$=""
18610         SYS "ColourTrans_SetFontColours",font%,bcol%,fcol%,14
18620         SYS paint%,,ul$+text$,1<<4,px%,py%-cy%
18630         IF text_offset%>word% AND (text_offset%-LENtext$)<=word% THEN
18640           i%=word%-(text_offset%-LEN(text$))
18650           l$=LEFT$(text$,i%)
18660           SYS stringwidth%,,l$,1<<30,1<<30,-1,LENl$ TO ,,w%
18670           SYS converttoos%,,w% TO ,w%
18680           px%+=w%
18690           r$=RIGHT$(text$,LENtext$-LENl$)
18700           IF INSTR(r$," ") r$=LEFT$(r$,INSTR(r$," "))
18710           SYS "ColourTrans_SetFontColours",font%,bcol%EOR&FFFFFF00,fcol%EOR&FFFFFF00,14
18720           SYS paint%,,ul$+r$,1<<4,px%,py%-cy%
18730         ENDIF
18740       ELSE
18750         w%=LENtext$*cx1%
18760         IF centre% px%=x%+(x1%-x%)DIV2-w%DIV2
18770         IF right% px%=x1%-w%-margin%
18780         SYS setcol%,fcol%:MOVE px%,py%+cy1%:PRINTtext$
18790         IF underline% MOVE px%,py%-cy%:PLOT1,cx1%*LENtext$,0
18800         IF text_offset%>word% AND (text_offset%-LENtext$)<=word% THEN
18810           i%=word%-(text_offset%-LEN(text$))
18820           l$=LEFT$(text$,i%)
18830           w%=LENl$*cx1%:px%+=w%
18840           r$=RIGHT$(text$,LENtext$-LENl$)
18850           IF INSTR(r$," ") r$=LEFT$(r$,INSTR(r$," "))
18860           SYS setcol%,fcol%EOR&FFFF0000:MOVE px%,py%+cy1%:PRINTr$
18870           IF underline% MOVE px%,py%-cy%:PLOT1,cx1%*LENr$,0
18880         ENDIF
18890       ENDIF
18900   ENDCASE
18910 UNTIL text_offset%?text%=0
18920 IF font% SYS losefont%,font%
18930 ENDPROC
18940
18950 DEFPROCbegin_save(object%,sound%)
18960 SYS getentry%,stack%,object% TO adr%
18970 SYS getp%,,q%:mx%=!q%:my%=q%!4
18980 ix%=mx%-38:iy%=my%-38:ix1%=mx%+38:iy1%=my%+38
18990 IF sound% THEN
19000   IF adr%!28 THEN
19010     SYS getentry%,s_clicks%,adr%!28 TO adr%
19020     IF adr%!20 THEN
19030       SYS getentry%,s_mouse%,adr%!20 TO adr%
19040       IF adr%!8=5 THEN
19050         drag_sound%=adr%!12
19060         PROCstart_drag(3,ix%,iy%,ix1%,iy1%)
19070       ENDIF
19080     ENDIF
19090   ENDIF
19100 ELSE
19110   IF adr%!4=s_text% THEN
19120     drag_ptype%=s_text%:drag_picture%=adr%!8
19130     PROCstart_drag(20,ix%,iy%,ix1%,iy1%)
19140   ELSE
19150     drag_ptype%=adr%!4:drag_picture%=adr%!8
19160     PROCstart_drag(4,ix%,iy%,ix1%,iy1%)
19170   ENDIF
19180 ENDIF
19190 ENDPROC
19200
19210 DEFPROCtry_user_drag
19220 PROCget_pointer
19230 IF handle%=main_w% ENDPROC
19240 q%!20=handle%:q%!24=icon%
19250 q%!28=mousex%:q%!32=mousey%
19260 q%!36=sprite_size%-24
19270 !q%=56
19280 CASE drag_type% OF
19290    WHEN 3:REM saving sound
19300      SYS getentry%,s_sounds%,drag_sound% TO adr%
19310      save$=FNstring0(adr%+4)
19320      file_type%=&D3C
19330    WHEN 4:REM saving picture
19340      SYS getentry%,drag_ptype%,drag_picture% TO adr%
19350      save$=FNstring0(adr%+4)
19360      IF drag_ptype%=s_sprites% file_type%=&FF9 ELSE file_type%=&AFF
19370    WHEN 20:REM saving text
19380      save$="text"
19390      file_type%=&FFF
19400   ENDCASE
19410   q%!40=file_type%
19420   PROCstring0(q%+44,save$)
19430   q%!12=q%!8:q%!16=1
19440   SYS sendmessage%,17,q%,handle%,icon%:REM send datasave
19450   myref%=q%!8
19460   DMT%=0
19470   DMT_ptr%=0
19480 ENDCASE
19490 ENDPROC

$� Ultimap v 2.00 (30 March 1995)
� � Simon Hayles 1994

(
 �=&40000
2  � taskid% 4:$taskid%="TASK"
<H ș "Wimp_Initialise",200,!taskid%,"Ultimap" � version%,task_handle%
F
P � � �errorbox
Z
d
 �vars
n
x& ș "OS_Module",16,"Ubase%Ultimap"
� *UBASE 40000 800000
�
� � global variables
�
�8 � box% 12,box2% 12,matrix% 16,origin1% 8,origin2% 8
�! icon_font$="Homerton.Medium"
� full_name$="Untitled"
� query_string$=""
� menu%=0
� sprite_size%=&1E000
� � q% 256,old_q% 256
� � errblk% 3000
�' � main% 1000,sprites% sprite_size%
@ !sprites%=sprite_size%:sprites%!8=16:ș spop%,&209,sprites%
 � wimp_palette% 20*4
 � page_stack% 1024
"
, s_sprites%=1
6 s_draw%=2
@ s_replay%=3
J s_quicktime%=4
T s_fonts%=5
^ s_starcoms%=6
h s_loadorder%=7
r s_sounds%=8
| s_text%=9
� s_pages%=10
�
� s_clicks%=11
� s_mousedrag%=12
� s_often%=13
� s_pointer%=14
� s_mouse%=15
� s_pageshown%=16
� s_spare%=17
� s_clickson%=18
� s_temp%=19
� s_sequences%=20
�
 � options

 printing%=�
& portrait%=�
0 current_page%=0
: margin%=16
D click_time=1
N click_pause=1
X temp_list%=0
b trying%=�
l speaking_text%=�
v speak_sound%=�
� speak_token%=�
� h_scroll%=�
� v_scroll%=�
� toggle_icon%=�
� title_bar%=�
� scanning%=�
� scan_keys%=1
� scan_time%=100
� scan_object%=1
� scan_count%=0
� menu_enabled%=�
� ws%=sprites%+32
� page_size%=3
 file_version%=101
 current_page$="Page 1"
 ws%=sprites%+32
 
* ș "Hourglass_On"
4 �load_templates
> �get_mode_info
H �load_options
R �new_file
\
f& ș "OS_GetEnv" � EnvStr$,end_adr%
p � �EnvStr$," -quit ") �
z- I%=�EnvStr$,""""):I%=�EnvStr$,"""",I%+1)
�  �I%+=1:��EnvStr$,I%,1)<>" "
� f$=�EnvStr$,I%)
�, � f$<>"" full_name$=f$:�load_file(f$,2)
� �
�
� icon_bar%=�iconbar
�
�$ ș setcaret%,main_w%,-1,0,10,10
�
� ș "Hourglass_Off"
� � � �errorbox
�
� ș drag%,,-1
 �begin_trying
 �
   �try_poll
$ � �
.
8 ��load_templates
B5 � font_array% 256:�t%=0�252�4:t%!font_array%=0:�
L3 ș "Wimp_OpenTemplate",,"<Obey$Dir>.Templates"
V � winds% 2000,indir% 1000
` indl%=indir%+4000
jI ș "Wimp_LoadTemplate",,winds%,indir%,indl%,-1,"main_w",0 � ,,indir%
t- ș "Wimp_CreateWindow",,winds% � main_w%
~W ș "Wimp_LoadTemplate",,winds%,indir%,indl%,font_array%,"pagelist_wc",0 � ,,indir%
�2 ș "Wimp_CreateWindow",,winds% � pagelist_wc%
�S ș "Wimp_LoadTemplate",,winds%,indir%,indl%,font_array%,"print_w",0 � ,,indir%
�. ș "Wimp_CreateWindow",,winds% � print_w%
�G ș "Wimp_LoadTemplate",,winds%,indir%,indl%,-1,"info",0 � ,,indir%
�+ ș "Wimp_CreateWindow",,winds% � info%
� ș "Wimp_CloseTemplate"
� �
�;
� ��load_options
�$ ptr%=�("<Ultimap$Dir>.options")
�P �#ptr%,toolbox_on%,scanning%,scan_keys%,scan_time%,menu_enabled%,sound_vol%
� �#ptr%
% ptr%=�("<Ultimap$Dir>.messages")

 �#ptr%,info$,info1$
 �#ptr%
" �set_icon_text(info%,1,info$)
(# �set_icon_text(info%,2,info1$)
2 �
<
F
P
� �finish
Z ș setcaret%,-1
d �lose_fonts
n. ș "Wimp_CloseDown",task_handle%,!taskid%
x ș "OS_Exit"
��
�
� ��redraw_window
� ș redraww%,,q% � more%
�
 ȕ more%
�-   offx%=(q%!4-q%!20):offy%=(q%!16-q%!24)
�   Ȏ !q% �
�\     � main_w%:�draw_main_w(q%!28-offx%,q%!32-offy%,q%!36-offx%,q%!40-offy%,offx%,offy%)
�Z     � pagelist_wc%:�draw_pagelist_wc(q%!28-offx%,q%!32-offy%,q%!36-offx%,q%!40-offy%)
�   �
�   ș getr%,,q% � more%
� �
� �

 � �front(handle%)
 !q%=handle%:ș getw%,,q%
"; �open_window(!q%,q%!4,q%!8,q%!12,q%!16,q%!20,q%!24,-1)
, �
6
@= � �open_window(handle%,x%,y%,x1%,y1%,scx%,scy%,bhandle%)
J �handle%=-1��
T q%!28=bhandle%
^ q%!0=handle%
h( q%!4=x%:q%!8=y%:q%!12=x1%:q%!16=y1%
r q%!20=scx%:q%!24=scy%
| ș openw%,,q%
� �
�
�
� � �close_window(handle%)
� !q%=handle%:ș closew%,,q%
� �
�
�� �vars
� getenv%=&10
�  wimp%    = (1<<18) + (3<<6)
� createw%=wimp%+1
� createicon%=wimp%+2
� deleteicon%=wimp%+4
 openw%=wimp%+5
 closew%=wimp%+6
 poll%=wimp%+7
& redraww%=wimp%+8
0 updatew%=wimp%+9
: getr%=wimp%+10
D getw%=wimp%+11
N getwi%=wimp%+12
X seti%=wimp%+13
b geti%=wimp%+14
l getp%=wimp%+15
v drag%=wimp%+16
� forceredraw%=wimp%+17
� setcaret%=wimp%+18
� getcaret%=wimp%+19
� createmenu%=wimp%+20
� setextent%=wimp%+&17
� processkey%=wimp%+&1C
� sendmessage%=wimp%+&27
� crsubmenu%=wimp%+&28
� ploticon%=&400E2
�
� setcol%=&40743
� spop%=&2E
� findfont%=&40081
 losefont%=&40082
 fontinfo%=&40084
 stringwidth%=&40085
  setfont%=&4008A
* currentfont%=&4008B
4 converttoos%=&40088
> converttopoints%=&40089
H paint%=&40086
R findcaret%=&4008D
\ charbbox%=&4008E
f
p Ubase%=&1C0100
z newfile%=Ubase%
� newstack%=Ubase%+1
� killstack%=Ubase%+2
� addentry%=Ubase%+3
� amendentry%=Ubase%+4
� findtoken%=Ubase%+5
� killentry%=Ubase%+6
� movedata%=Ubase%+7
� addpacked%=Ubase%+8
� getentry%=Ubase%+9
� unpacksprite%=Ubase%+10
� nentries%=Ubase%+11
� movetoend%=Ubase%+12
� readstatus%=Ubase%+13
	 writestatus%=Ubase%+14
	 rendershape%=Ubase%+15
	 getnth%=Ubase%+17
	$ locatefile%=Ubase%+19
	. playsound%=Ubase%+20
	8
	B PD%=&80140
	L PDselect%=PD%+5
	V PDabort%=PD%+9
	` PDpagesize%=PD%+3
	j PDgiverec%=PD%+11
	t PDdrawpage%=PD%+12
	~ PDgetrec%=PD%+13
	� PDendjob%=PD%+8
	�
	� � �
	� � � � �
	�& ș "OS_Module",14,"Ubase%Ultimap"
	� �
	�
	�� �get_pointer
	�ș getp%,,q%
	�Hmousex%=!q%:mousey%=q%!4:b%=q%!8:handle%=q%!12:icon%=q%!16:ob%=q%!20
	��
	�
� �errorbox

� SYS drag%,,-1
4!errblk%=�:t$=�$:t$="("+ß+")"+t$+" at line "+Þ
$(errblk%+4)=t$+�0
(-ș "Wimp_ReportError",errblk%,1,"Ultimap"
2� �<>1 �finish:�
<=� IF printing% printing%=FALSE:PROCclose_window(print_w%)
F�
P;
Z ݤiconbar
d+ !q%=-1:q%!4=0:q%!8=0:q%!12=64:q%!16=64
n q%!20=&300A
x �string0(q%+24,appsprite$)
�' ș "Wimp_CreateIcon",,q% � handle%
�
 =handle%
�;
� ��set_icon_fonts
�1 ș findfont%,,icon_font$,12*16,12*16 � font%
�. ș "Wimp_WhichIcon",print_w%,q%,1<<6,1<<6
�< t%=0:�:�icon_font(print_w%,t%!q%,font%):t%+=4:�t%!q%=-1
� �
�
�% ��icon_font(window%,icon%,font%)
�% !errblk%=window%:errblk%!4=icon%
�- errblk%!12=&FF000000:errblk%!8=font%<<24
� font%?font_array%+=1
 ș seti%,,errblk%
 �

" ��lose_fonts
,1 �A%=0�255:n%=A%?font_array%:A%?font_array%=0
6' � n%>0 � B%=1�n%:ș losefont%,A%:�
@ �:�
J
T ��get_mode_info
^) ș "Wimp_ReadPalette",,wimp_palette%
h+ ș "OS_ReadModeVariable",-1,4 � ,,xef%
r+ ș "OS_ReadModeVariable",-1,5 � ,,yef%
|5 ș "OS_ReadModeVariable",-1,11 � ,,screen_width%
�6 ș "OS_ReadModeVariable",-1,12 � ,,screen_height%
�J screen_width%=screen_width%<<xef%:screen_height%=screen_height%<<yef%
� �
�
�& ��start_drag(type%,x%,y%,x1%,y1%)
� !q%=0:q%!4=5
�) q%!8=x%:q%!12=y%:q%!16=x1%:q%!20=y1%
�= q%!24=0:q%!28=0:q%!32=screen_width%:q%!36=screen_height%
� ș drag%,,q%
� drag_type%=type%
� �
�
�m�--------------------------------------------------------------------------------------------------------

* ݤstring0(t%):� t$:t$="":� ?t%<32:=""
- �:t$=t$+�?t%:t%+=1:�?t%<32 � �t$=255:=t$
&
0' ��string0(t%,t$):$t%=t$:t%?�t$=0:�
:
Dm�--------------------------------------------------------------------------------------------------------
N
X ��check_pagelist_wc
b but%=q%!8
l$ !ws%=pagelist_wc%:ș getw%,,ws%
v/ offx%=(ws%!4-ws%!20):offy%=(ws%!16-ws%!24)
�! page%=(((q%!4)-offy%)�-48)+1
�. ș nentries%,s_pages% � np%:� page%>np% �
�' ș getnth%,s_pages%,page% � ,page%
� current_page%=page%
�  �arrange_pagelist_wc(page%)
� �pre_process
� �show_page(page%)
� � scanning% �scan
�  � but%�4 ș createmenu%,,-1
� �
�
� ��show_page(page%)
� current_page%=page%

 !q%=main_w%:ș getw%,,q%

A � (q%!32) � (1<<16) ș forceredraw%,-1,q%!4,q%!8,q%!12,q%!16

& �window_title(main_w%,full_name$)

 ' ș getentry%,s_pages%,page% � adr%

*# current_page$=�string0(adr%+4)

4! � "set Upage "+current_page$

> �

H

R$ ��update_object(stack%,object%)

\ � adr%

f' ș getentry%,stack%,object% � adr%

p< ș forceredraw%,main_w%,adr%!12,adr%!16,adr%!20,adr%!24

z �

�

�0 ��set_icon_state(window%,icon%,eor%,clear%)

�X !errblk%=window%:errblk%!4=icon%:errblk%!8=eor%:errblk%!12=clear%:ș seti%,,errblk%

� �

�

�  ݤicon_state(window%,icon%)

�C !errblk%=window%:errblk%!4=icon%:ș geti%,,errblk%:=errblk%!24

�

�* � �set_icon_text(window%,icon%,text$)

�7 !errblk%=window%:errblk%!4=icon%:ș geti%,,errblk%

�0 �string0(errblk%!28,�text$,(errblk%!36)-1))

�/ errblk%!8=0:errblk%!12=0:ș seti%,,errblk%

� �

) ݤleaf(name$):� �name$,".")=0:=name$
& �name$=�name$,�name$-�name$,"."))
$ ��name$,".")=0:=name$
.
8& ��start_drag(type%,x%,y%,x1%,y1%)
B !q%=0:q%!4=5
L) q%!8=x%:q%!12=y%:q%!16=x1%:q%!20=y1%
V= q%!24=0:q%!28=0:q%!32=screen_width%:q%!36=screen_height%
` ș drag%,,q%
j drag_type%=type%
t �
~
� ��ramfetch
� DMT_ref%=q%!4
� DMT%=q%!20
� DMT_len%=q%!24
� Ȏ file_type% �
�>   � &AFF,&FF9:�save_picture(drag_ptype%,drag_picture%,"")
�*   � &FFF:�save_text(drag_picture%,"")
�)   � &D3C:�save_sound(drag_sound%,"")
� �
� �
�
� ��datasaveack
 � q%!12<>myref% �

 DMT%=0
 f_type%=q%!40
 Ȏ f_type% �
(K   � &AFF,&FF9:�save_picture(drag_ptype%,drag_picture%,�string0(q%+44))
26   � &D3C:�save_sound(drag_sound%,�string0(q%+44))
<7   � &FFF:�save_text(drag_picture%,�string0(q%+44))
F �
P q%!12=q%!8:q%!16=3
Z ș sendmessage%,17,q%,q%!4
d �
n
x' ��save_picture(type%,token%,name$)
�
 save$=""
� � �
� � � �:� �:� 1,�$
� � DMT_ptr%=0 �
�   ș "Hourglass_On"
�'   ș getentry%,type%,token% � adr%
�   len%=(!adr%)-16
�4   ș readstatus%,type%,token% � l%:� l% len%=l%
�   adr%+=16
�   � type%=s_sprites% �
�.     ș getentry%,s_sprites%,token% � adr%
�     � !adr%=(adr%!16)+16 �
�!       save$=�string0(adr%+4)
+       adr%!4=1:adr%!8=16:adr%!12=!adr%
        len%=!adr%+12:adr%+=4

     �
"9       ș unpacksprite%,s_sprites%,token%,sprites%+12
,       !sprites%=1
6       sprites%!4=16
@&       sprites%!8=(sprites%!12)+16
J       len%=sprites%!8
T       adr%=sprites%
^
     �
h     file_type%=&FF9
r   �
|     file_type%=&AFF
�   �
�   DMT_mylen%=len%
�   DMT_data%=adr%
� �
�, �save_slave(name$,adr%,len%,file_type%)
� � save$<>"" �
�,   ș getentry%,s_sprites%,token% � adr%
�   �string0(adr%+4,save$)
� �
� �
�
� ��save_sound(sound%,name$)
� � �
 � � �:� �:� 1,�$
 � DMT_ptr%=0 �
   ș "Hourglass_On"
&+   ș getentry%,s_sounds%,sound% � adr%
0   len%=(!adr%)-24
:8   ș readstatus%,s_sounds%,sound% � l%:� l% len%=l%
D   adr%+=24
N   DMT_mylen%=len%
X   DMT_data%=adr%
b �
l& �save_slave(name$,adr%,len%,&D3C)
v �
�
� ��save_text(text%,name$)
� � �
� � � �:� �:� 1,�$
�& ș getentry%,s_text%,text% � adr%
�  ș movedata%,adr%,ws%,!adr%
� adr%=ws%+4:t%=adr%
� len%=0
� �
�   � ?t%=13 ?t%=10
�   � ?t%<>0 len%+=1:t%+=1
� �?t%=0 � �?t%=0
� � DMT_ptr%=0 �
   ș "Hourglass_On"
   DMT_mylen%=len%
   DMT_data%=adr%
  �
*& �save_slave(name$,adr%,len%,&FFF)
4 �
>
H- ��save_slave(name$,adr%,len%,file_type%)
R
 � DMT% �
\'   � DMT_mylen%-DMT_ptr%>DMT_len% �
f     l%=DMT_len%
p   �
z     l%=DMT_mylen%-DMT_ptr%
�     ș "Hourglass_Off"
�   �
�O   ș "Wimp_TransferBlock",task_handle%,DMT_data%+DMT_ptr%,DMT_ref%,DMT%,l%
�   DMT_ptr%+=l%
�   q%!12=q%!8:q%!16=7
�   q%!24=l%
�5   ș sendmessage%,18,q%,q%!4:� send RAM transmit
� �
�.    � "save "+name$+" "+�~adr%+" +"+�~len%
�+    � "SETTYPE "+name$+" "+�~file_type%
�    ș "Hourglass_Off"
� �
� �

 ��dataload
 ș movedata%,q%,old_q%,256
$ Ȏ old_q%!40 �
.   � &BC3:
8E     � old_q%!20=main_w% � (old_q%!20=-2 � old_q%!24=icon_bar%) �
B       � old_q%!12<>0 �
L       � modified% �
V4         �open_query("load"+�string0(old_q%+44))
`       �
j.         �load_file(�string0(old_q%+44),1)
tT         old_q%!12=old_q%!8:old_q%!16=4:ș "Wimp_SendMessage",17,old_q%,old_q%!4
~       �
�
     �
� �
� �
�
� ��load_file(name$,error%)
� t%=�(name$):l%=�#t%:�#t%
�/ �set_slot(�+(l%�&4000)*&4000+&4000,error%)
� ș newfile%
�. full_name$=�name$,�(name$)-�name$,"!")-1)
� ș "Hourglass_On"
� � "load  "+name$+" 40000"
� version%=!&4000C
 ș locatefile%,&78000

 modified%=0
 query_string$=""
 edited_area%=0
(W current_page%=!&40020:toolbox_on%=!&40024:menu_enabled%=!&40028:page_size%=!&4002C
2P h_scroll%=!&40060:v_scroll%=!&40064:title_bar%=!&40068:toggle_icon%=!&4006C
<< scanning%=!&40070:scan_keys%=!&40074:scan_time%=!&40078
F �size_page
P �redefine_main_w
Z �open_main_w
d � !&40030 �
n4   t%=&40030:x%=t%!4:y%=t%!8:x1%=t%!12:y1%=t%!16
x;   � x1%>screen_width% x%=x%-(x1%-x%):x1%=screen_width%
�F   � y1%+40>screen_height% y%=y%-(y1%-y%)-40:y1%=screen_height%-40
�   � x%<0 x%=0
�   � y%<0 y%=0
�9   �open_window(main_w%,x%,y%,x1%,y1%,t%!20,t%!24,-1)
� �
� ș "Hourglass_Off"
�4 ș "OS_ReadVarVal","Obey$Dir",main%,1000 � ,,T%
� T%?main%=0
� full_name$=�string0(main%)
�& �window_title(main_w%,full_name$)
�! appsprite$=�leaf(full_name$)
�' menu$=�appsprite$,�(appsprite$)-1)
�, � �menu$<12 �:menu$=menu$+�0:��menu$=12
 �

m�--------------------------------------------------------------------------------------------------------
"
, ��new_file
6 �set_slot(�+&4000,2)
@ ș newfile%
J � t%=1 � 20
T   ș newstack%
^ �
h full_name$="No_Name"
r �
|
�i�----------------------------------------------------------------------------------------------------
�
�  ��open_centre(handle%,off%)
� !q%=handle%:ș getw%,,q%
�( w%=(q%!12)-(q%!4):h%=(q%!16)-(q%!8)
� wx%=screen_width%�2-w%�2
� wy%=screen_height%�2-h%�2
�I �open_window(handle%,wx%,wy%+off%,wx%+w%,wy%+h%+off%,q%!20,q%!24,-1)
� �
�
� ��open_main_w
� !ws%=main_w%:ș getw%,,ws%
� sx%=ws%!4:sy%=ws%!8
 sx1%=ws%!12:sy1%=ws%!16
) sh%=screen_height%:sw%=screen_width%
 hs%=0:vs%=0:tb%=0
& � h_scroll% hs%=40
0 � v_scroll% vs%+=40
: � title_bar% tb%=36
D w%=sx1%-sx%:h%=sy1%-sy%
N, � sy1%+tb%>sh% sy1%=sh%-tb%:sy%=sy1%-h%
X � sy%<hs% sy%=hs%
b, � sx1%+vs%>sw% sx1%=sw%-vs%:sx%=sx1%-w%
l � sx%<0 sx%=0
v !ws%=main_w%
� ws%!4=sx%
� ws%!8=sy%
� ws%!12=sx1%
� ws%!16=sy1%
� ws%!20=0:ws%!24=0
� ws%!28=-1
�I �open_window(main_w%,ws%!4,ws%!8,ws%!12,ws%!16,ws%!20,ws%!24,ws%!28)
� !q%=main_w%:ș getw%,,ws%
� �
�
�i�----------------------------------------------------------------------------------------------------
�
�4 ��draw_picture(type%,token%,x%,y%,w%,h%,flags%)
L � type%=s_draw% x%+=(1<<xef%):y%+=(1<<yef%):w%-=(2<<xef%):h%-=(2<<yef%)
# ș getentry%,type%,token% � a%
* � !a%>sprite_size%-24 flags%=flags%�8
 8 !errblk%=x%:errblk%!4=y%:errblk%!8=w%:errblk%!12=h%
*< ș rendershape%,type%,token%,sprites%,errblk%,flags%�15
4 �
>
Hi�----------------------------------------------------------------------------------------------------
R
\# ��window_title(window%,title$)
f � window%=main_w% �
p1   ș getentry%,s_pages%,current_page% � adr%
z+   title$=title$+" - "+�string0(adr%+4)
� �
�# � modified% title$=title$+" *"
�( !errblk%=window%:ș getwi%,,errblk%
�  �string0(errblk%!76,title$)
�G ș forceredraw%,-1,errblk%!4,(errblk%!16),errblk%!12,errblk%!16+36
� �
�
�
�
�i�----------------------------------------------------------------------------------------------------
�
� ��check_icon_bar
�" mx%=!q%:my%=q%!4:button%=q%!8
/ � button% � 2:�do_icon_bar_menu(mx%,my%):�
 �front(main_w%)
# ș setcaret%,main_w%,-1,0,0,10
$ �
.
8 ��do_icon_bar_menu(x%,y%)
B/ � scan_time%=0:scan_time%=100:scan_keys%=1
L � opt%=0�2�2:P%=main%
V [opt opt%
`
.iconmenu
j equs menu$
t) equd &070207:equd 208:equd 40:equd 0
~% equd 0:equd info%:equd &07000021
� equs "Info        "
�0 equd scanning%�1:equd ibmenu:equd &07000021
� equs "Scanning    "
�& equd 0:equd somenu:equd &07000021
� equs "Sound volume"
�$ equd &80:equd -1:equd &07000021
� equs "Quit        "
�
�.ibmenu
� equs "Scanning":equd 0
�) equd &070207:equd 208:equd 40:equd 0
�1 equd (scan_keys%=2)�1:equd -1:equd &07000021
 equs "Two switches"

) equd &80:equd ibmenu1:equd &07000021
 equs "Speed       "

(.somenu
2 equs "Sound Volume"
<) equd &070207:equd 208:equd 40:equd 0
F4 equd (sound_vol%=&10F)�1:equd -1:equd &07000021
P equs "Off         "
Z4 equd (sound_vol%=&14F)�1:equd -1:equd &07000021
d equs "Quiet       "
n< equd &80 � ((sound_vol%=&17F)�1):equd -1:equd &07000021
x equs "Loud        "
�
�.ibmenu1
�! equs "Seconds":equb 0:equd 0
�) equd &070207:equd 208:equd 40:equd 0
�$ equd &84:equd -1:equd &07000121
�" equd ibmess:equd ibval:equd 8
�
�.ibval equs "a0-9."+�0
�'.ibmess equs �(scan_time%/100)+�(0)
�
� ]:�
�
�% ș createmenu%,,main%,mx%-16,260
 menu%=5
 �

"i�----------------------------------------------------------------------------------------------------
,
6 ��icon_bar_menu
@	 � c%
J
 Ȏ !q% �
T
   � 1
^     Ȏ q%!4 �
h'       � -1:scanning%=scanning% � �
r       � 0:
|7         � scan_keys%=2 scan_keys%=1 � scan_keys%=2
�         scanning%=�
�       � 1:
�)         t%=(�(�string0(ibmess)))*100
�         � t% scan_time%=t%
�         scanning%=�
�
     �
�   � 2:
�     Ȏ q%!4 �
�       � 0:sound_vol%=&10F
�       � 1:sound_vol%=&14F
�       � 2:sound_vol%=&17F
�
     �
�0   � 3:� modified% �open_query("") � �finish
 �
7 ș getp%,,q%:� q%!8 � 1 �do_icon_bar_menu(mx%,my%)
 �
&
0m�--------------------------------------------------------------------------------------------------------
:
D1 ��draw_main_w(wx%,wy%,wx1%,wy1%,offx%,offy%)
N/ ș getentry%,s_pages%,current_page% � adr%
X% stack%=adr%!20:page_col%=adr%!28
bE ș setcol%,page_col%:ȓ Ȑ wx%+offx%,wy%+offy%,wx1%-wx%,wy1%-wy%
l ș nentries%,stack% � no%
v � no% �
�   � object%=1 � no%
�0     ș getnth%,stack%,object% � adr%,token%
�E     x%=adr%!12:y%=adr%!16:x1%=adr%!20:y1%=adr%!24:flags%=adr%!36
�C     � x%<wx1% � x1%>wx% � y%<wy1% � y1%>wy% � (flags%�128)=0 �
�       Ȏ adr%!4 �
�<         � s_text%:�draw_text(stack%,token%,offx%,offy%)
�e         � s_sprites%,s_draw%:�draw_picture(adr%!4,adr%!8,x%+offx%,y%+offy%,x1%-x%,y1%-y%,flags%)
�       �
�
     �
�   �
� �
� �
�
 ݤstrip_spaces(text$)
 �
)   � �text$=32 text$=�text$,�text$-1)
  ��text$<>32
* =text$
4
>' ݤlower_case(text$):� text$="":=""
H � t$,t%,c%
R �t%=1��text$
\   c%=�(�text$,t%,1))
f   � c%>64 � c%<91 c%+=32
p   t$=t$+�c%
z �
� =t$
�
�i�----------------------------------------------------------------------------------------------------
�
�+ ��draw_text(stack%,token%,offx%,offy%)
�d � speaking_text% � speak_token%=token% �highlight_text(stack%,token%,offx%,offy%,speak_word%):�
�& ș getentry%,stack%,token% � adr%
� x%=(adr%!12)+offx%
� y%=(adr%!16)+offy%
�" x1%=(adr%!20)-(1<<xef%)+offx%
�" y1%=(adr%!24)-(1<<yef%)+offy%
�. flags%=adr%!36:font%=adr%!40:b_s%=adr%!32
�0 fcol%=adr%!52:� fcol% � &FF fcol%=page_col%
 bcol%=adr%!56
; � flags%�1 fcol%=fcol%�&FFFFFF00:bcol%=bcol%�&FFFFFF00
1 �draw_border(b_s%,fcol%,bcol%,x%,y%,x1%,y1%)
$ x%+=(1<<xef%)
. x1%-=(1<<xef%)
8 y%+=(1<<yef%)
B y1%-=(1<<yef%)
L� �
V� � � � �:font%=0
` � font% �
j'   ș getentry%,s_fonts%,font% � t%
t1   ș findfont%,,t%+4,adr%!44,adr%!48 � font%
~ �
� � font% �
�    � bcol% � &FF bcol%=fcol%
�;   ș "ColourTrans_SetFontColours",font%,bcol%,fcol%,14
�.   ș fontinfo%,font% � ,cx%,cy%,cx1%,cy1%
� �
�>   cx%=-(1<<xef%):cy%=-(1<<yef%):cx1%=8<<xef%:cy1%=8<<yef%
� �
� text_height%=cy1%
�( ș getentry%,s_text%,adr%!8 � text%
�
 text%+=4
� text_offset%=0
�, px%=x%+margin%:py%=y1%-text_height%+cy%
$ centre%=�:right%=�:underline%=�

 � flags% � 8 centre%=�
 � flags% � 16 right%=�
 � flags% � 32 underline%=�
( �
2   Ȏ text_offset%?text% �
<
     � 0:
F/     � 13:py%-=text_height%:text_offset%+=1
P
     
Z-       text$=�string0(text%+text_offset%)
d       text_offset%+=�text$
n       � font% �
x@         ș stringwidth%,,text$,1<<30,1<<30,-1,�text$ � ,,w%
�&         ș converttoos%,,w% � ,w%
�-         � centre% px%=x%+(x1%-x%)�2-w%�2
�(         � right% px%=x1%-w%-margin%
�6         � underline% text$=�(25)+�(1)+�(16)+text$
�.         ș paint%,,text$,1<<4,px%,py%-cy%
�       �
�         w%=�text$*cx1%
�-         � centre% px%=x%+(x1%-x%)�2-w%�2
�(         � right% px%=x1%-w%-margin%
�3         ș setcol%,fcol%:� px%,py%+cy1%:�text$
�8         � underline% � px%,py%-cy%:�1,cx1%*�text$,0
�       �
�   �
 � text_offset%?text%=0
 � font% ș losefont%,font%
 �
"
,3 ��draw_border(style%,col%,bcol%,x%,y%,x1%,y1%)
6? � (bcol%�&FF)=0 ș setcol%,bcol%:ȓ Ȑ x%,y%,x1%-x%,y1%-y%
@ Ȏ style% �
J
   � 1
T     ș setcol%,col%
^     ȓ x%,y%,x1%-x%,y1%-y%
h   � 2:� bold
r     ș setcol%,&FFFFFF00
|#     � x%,y%:� x%,y1%:� x1%,y1%
�'     ș setcol%,!(wimp_palette%+16)
�     � x1%,y%:� x%,y%
�   � 3:� inset
�'     ș setcol%,!(wimp_palette%+16)
�#     � x%,y%:� x%,y1%:� x1%,y1%
�     ș setcol%,&FFFFFF00
�     � x1%,y%:� x%,y%
�   �
� �
� �
�
� ��play_sound(sound%)
�* ș getentry%,s_sounds%,sound% � adr1%
 G len%=(!adr1%)-24:ș readstatus%,s_sounds%,sound% � l%:� l% len%=l%
  � �
  � � � � �:�errorbox:�
 &+ ș playsound%,adr1%+24,len%,sound_vol%
 0 �
 :
 D ��play_sound_wait(sound%)
 N* ș getentry%,s_sounds%,sound% � adr1%
 XG len%=(!adr1%)-24:ș readstatus%,s_sounds%,sound% � l%:� l% len%=l%
 b+ ș playsound%,adr1%+24,len%,sound_vol%
 l# �:ș playsound%,0 � t%:�t%<>-1
 v �
 �
 � ��make_space(plus%)
 �# size%=(!&40004-&40000)+plus%*2
 �+ slot_size%=�+(size%�&4000)*&4000+&4000
 �* ș "Wimp_SlotSize",slot_size%,-1 � t%
 �8 � t%<slot_size% � 1,"Ultimap has run out of memory"
 � �
 �
 � ��set_slot(size%,error%)
 � slot_size%=size%
 �* ș "Wimp_SlotSize",slot_size%,-1 � t%
 �L � t%<slot_size% � error%,"There's not enough memory to load this file!"
 � �
!
! ��open_print_w
!. � portrait% a%=0:b%=1<<21 � a%=1<<21:b%=0
! ) �set_icon_state(print_w%,6,a%,1<<21)
!*) �set_icon_state(print_w%,7,b%,1<<21)
!4# �set_icon_text(print_w%,2,"1")
!> ș getp%,,q%
!H ș createmenu%,,-1
!R, ș createmenu%,,print_w%,!q%-30,q%!4+60
!\ �
!f
!p ��check_print_w
!z b%=q%!8
!� Ȏ q%!16 �
!�   � 3:ș createmenu%,,-1
!�   � 4:
!�)     !q%=print_w%:q%!4=7:ș geti%,,q%
!�H     � (q%!24) � (1<<21) style%=2:portrait%=� � style%=1:portrait%=�
!�)     !q%=print_w%:q%!4=2:ș geti%,,q%
!�$     run_num%=�(�string0(q%!28))
!�      � run_num%=0 run_num%=1
!�(     �print_routine(style%,run_num%)
!�$     � b% � 6 ș createmenu%,,-1
!� �
!� �
!�
"% ��print_routine(style%,run_num%)
" � phandle%,ohandle%
"  � left%,bottom%,right%,top%
"$ � copiesleft%,rect%
".
"8 phandle%=�("printer:")
"B � �
"L; � � �:�#phandle%:� �:� 1,"There is no printer driver!"
"V. ș PDselect%,phandle%,"Ultima" � ohandle%
"`
"jZ � � �:ș PDabort%,phandle%:�#phandle%:ș PDselect%,ohandle%:printing%=�:� �:� 1,�$+Þ
"t
"~2 ș PDpagesize% � ,,,left%,bottom%,right%,top%
"� ș "Hourglass_On"
"�
"� � loop%=1 � run_num%
"�"   !ws%=main_w%:ș getwi%,,ws%
"�4   mx%=ws%!44:my%=ws%!48:mx1%=ws%!52:my1%=ws%!56
"�4   !box%=mx%:box%!4=my%:box%!8=mx1%:box%!12=my1%
"�   Ȏ style% �
"�     � 1:� landscape
"�       � page_size%=4 �
"�         scx=.67
"�         scy=.67
"�K         !matrix%=0:matrix%!4=-scx*2^16:matrix%!8=scy*2^16:matrix%!12=0
#[         !origin1%=(right%-left%)�16:origin1%!4=top%-(top%-bottom%)�2-(top%-bottom%)�30
#
       �
#         scx=1.4
#         scy=1.5
#(K         !matrix%=0:matrix%!4=-scx*2^16:matrix%!8=scy*2^16:matrix%!12=0
#2J         !origin1%=(right%-left%)�20:origin1%!4=top%-(top%-bottom%)�20
#<       �
#F     � 2:� portrait
#P       scx=1.05
#Z       scy=.95
#dH       !matrix%=scx*2^16:matrix%!4=0:matrix%!8=0:matrix%!12=scy*2^16
#n9       !origin1%=(right%-left%)�20:origin1%!4=bottom%
#x   �
#�:   ș PDgiverec%,loop%,box%,matrix%,origin1%,&FFFFFF00
#�   printing%=�
#�6   ș PDdrawpage%,1,box2%,0,0 � copiesleft%,,rect%
#�   ȕ copiesleft%<>0
#�,     �draw_main_w(mx%,my%,mx1%,my1%,0,0)
#�1     ș PDgetrec%,,box2% � copiesleft%,,rect%
#�   �
#� �
#�
#� ș PDendjob%,phandle%
#� �#phandle%
#� ș PDselect%,ohandle%
#� printing%=�
$ ș "Hourglass_Off"
$ �
$
$"/ ��hide_object(stack%,token%,hide%,on_vdu%)
$,' ș getentry%,stack%,token% � adr1%
$6/ � hide%<>0 � ((adr1%!36)�128)<>0 on_vdu%=0
$@- � hide%=0 � ((adr1%!36)�128)=0 on_vdu%=0
$JD � hide% adr1%!36=(adr1%!36)�128 � adr1%!36=(adr1%!36)�&FFFFFF7F
$T^ � on_vdu% ș forceredraw%,main_w%,adr1%!12,adr1%!16,adr1%!20+(4<<xef%),adr1%!24+(1<<yef%)
$^ �
$h
$r. ��light_object(stack%,token%,hi%,on_vdu%)
$|' ș getentry%,stack%,token% � adr1%
$�  h%=(adr1%!36)�1:� hi% hi%=1
$�@ � hi% adr1%!36=(adr1%!36)�1 � adr1%!36=(adr1%!36)�&FFFFFFFE
$�T � on_vdu% � h%<>hi% ș forceredraw%,main_w%,adr1%!12,adr1%!16,adr1%!20,adr1%!24
$� �
$�
$� ݤstack(page%)
$� � adr%
$�' ș getentry%,s_pages%,page% � adr%
$�3 � adr%=0 � adr%!20=0 � 2,"bad stack from page"
$�
 =adr%!20
$�
$�  ݤwhich_object(page%,x%,y%)
$� stack%=�stack(page%)
%# ș nentries%,stack% � no%:o%=0
% � no%=0:=0
% � t%=1 � no%
%&)   ș getnth%,stack%,t% � adr%,token%
%0R   � x%>=adr%!12 � y%>=adr%!16 � x%<adr%!20 � y%<adr%!24 � ((adr%!36)�128)=0 �
%:8     o%=token%:off_mx%=x%-adr%!12:off_my%=y%-adr%!16
%D   �
%N �
%X =o%
%b
%l! ��arrange_pagelist_wc(page%)
%v iw%=280:ih%=-48:pl_tick%=0
%�  ș nentries%,s_pages% � np%
%�% !q%=0:q%!8=iw%-(3<<xef%):q%!12=0
%�& � np%<3 q%!4=ih%*3 � q%!4=ih%*np%
%�" ș setextent%,pagelist_wc%,q%
%� iy%=ih%:cur_y%=iy%
%� � loop%=1�np%
%�.   ș getnth%,s_pages%,loop% � adr%,token%
%�-   � token%=page% cur_y%=iy%:pl_tick%=iy%
%�   iy%+=ih%
%� �
%�" !q%=pagelist_wc%:ș getw%,,q%
%�" offy%=(q%!16-q%!24):sy%=q%!24
%�( wy%=(q%!8)-offy%:wy1%=(q%!16)-offy%
&! � cur_y%<wy% sy%+=cur_y%-wy%
&% � cur_y%-ih%>wy1% sy%=cur_y%-ih%
& q%!24=sy%
&  o%=(q%!32)�(1<<16)
&* ș openw%,,q%
&4
 � o%=0 �
&>   ș closew%,,q%
&H �
&R/   ș forceredraw%,-1,q%!4,q%!8,q%!12,q%!16
&\ �
&f �
&p
&z* ��draw_pagelist_wc(wx%,wy%,wx1%,wy1%)
&�  ș nentries%,s_pages% � np%
&�1 ș findfont%,,icon_font$,12*16,12*16 � font%
&�* ih%=-48:ix%=0:iy%=ih%:ix1%=280:iy1%=0
&� �page%=1�np%
&�8   � ix%<=wx1% � ix1%>=wx% � iy%<=wy1% � iy1%>=wy% �
&�0     ș getnth%,s_pages%,page% � adr%,token%
&�     � iy%=pl_tick% �
&�2       !q%=ix%:q%!4=iy%:q%!8=ix%+38:q%!12=iy1%
&�-       q%!16=&7000019:�string0(q%+20,"�")
&�       ș ploticon%,,q%
&�
     �
&�4     !q%=ix%+38:q%!4=iy%:q%!8=ix%+280:q%!12=iy1%
&�=     q%!16=font%<<24 � &171:q%!20=adr%+4:q%!24=0:q%!32=12
'     ș ploticon%,,q%
'   �
'   iy%+=ih%:iy1%+=ih%
'$ �
'. ș losefont%,font%
'8 !q%=pagelist_wc%
'B �
'L
'V  ݤpt_from_context(context%)
'` Ȏ context% �
'j   � s_mousedrag%:=4
't   � s_often%:=8
'~   � s_pointer%:=16
'�   � s_mouse%:=20
'�   � s_pageshown%:=32
'� �
'� =0
'�
'� ݤname_exsists(stack%,f$)
'� ș nentries%,stack% � ne%
'� � ne%=0:=0
'� f%=0:f$=�lower_case(f$)
'� �entry%=1�ne%
'�-   ș getnth%,stack%,entry% � adr%,token%
'�3   � f$=�lower_case(�string0(adr%+4)) f%=token%
(
 �:=f%
(

( ��size_page
( !q%=main_w%:ș getwi%,,q%
((( � (q%!32)�(1<<16) open%=� � open%=�
(2 ș "Wimp_DeleteWindow",,q%
(< bh%=q%!28
(F portrait%=�
(P Ȏ page_size% �
(Z    � 1:q%!52=1279:q%!48=-920
(d!   � 2:q%!52=1599:q%!48=-1160
(n!   � 3:q%!52=2046:q%!48=-1500
(x-   � 4:q%!52=1320:q%!48=-2000:portrait%=�
(�   :q%!52=1279:q%!48=-920
(� �
(�+ ș "Wimp_CreateWindow",,q%+4 � main_w%
(�U !q%=main_w%:ș getw%,,q%:�open_window(!q%,q%!4,q%!8,q%!12,q%!16,q%!20,q%!24,bh%)
(� �
(�
(�P� ***************************** clicks below here **************************
(�
(� ��begin_trying
(� trying%=�
(� click_underway%=�
(� pause_on%=�
(� pointer_object%=0
) input$=""
) �zero_page_stack
) �pre_process
)" �show_page(current_page%)
), � scanning% �scan
)6 � "set Uobject "+�34+�34
)@ � "set Ustatus "+�34+�34
)J status$=""
)T �
)^
)h ��delight
)r! stack%=�stack(current_page%)
)| ș nentries%,stack% � no%
)� � no% �
)�   � object%=1�no%
)�)     ș getnth%,stack%,object% � adr%
)�+     � adr%!36 � 1 adr%!36=(adr%!36)�-2
)�   �
)� �
)�7 � speak_token% �update_object(stack%,speak_token%)
)� �
)�
)�D ��zero_page_stack:�T%=0�1020�4:T%!page_stack%=0:�:page_ptr%=0:�
)�
)� ��pre_process
)� pointer_object%=0
* pointer_int%=0
* often_int%=0
* seq_int%=0
*& scan_object%=0
*02 speaking_text%=0:speak_word%=0:speak_token%=0
*: pointer_on%=�
*D try_time%=�
*N �
*X$  ș nentries%,s_sequences% � s%
*b  � s% �
*l/    ș getnth%,s_sequences%,1 � adr%,token%
*vC    ș killentry%,s_sequences%,token%:�     clear all sequences
*�  �
*�
 �s%=0
*� �
*�#  ș nentries%,s_clickson% � s%
*�  � s% �
*�*    ș getnth%,s_clickson%,1 � ,token%
*�?    ș killentry%,s_clickson%,token%:�     clear all clicks
*�  �
*�
 �s%=0
*�! stack%=�stack(current_page%)
*�/ ș getentry%,s_pages%,current_page% � adr%
*�2 � adr%!24 ș writestatus%,s_clicks%,adr%!24,0
*� ș nentries%,stack% � no%
+ � no% �
+   � object%=1�no%
+)     ș getnth%,stack%,object% � adr%
+ a     adr%!36=(adr%!36)�&FFFFFF3E:�     ensure all objects shown, unselected and unhighlighted
+*     click%=adr%!28
+4h     � click% ș writestatus%,s_clicks%,click%,0:�          zero status to avoid repetition of click
+>   �
+H �
+R � object%=0�no%
+\   � object%=0 �
+f3     ș getentry%,s_pages%,current_page% � adr%
+p     click%=adr%!24
+z   �
+�)     ș getnth%,stack%,object% � adr%
+�     click%=adr%!28
+�   �
+�   � click% �
+�-     ș getentry%,s_clicks%,click% � adr%
+�-     ș readstatus%,s_clicks%,click% � s%
+�     � s%=0 �
+�-       ș writestatus%,s_clicks%,click%,1
+�5       � adr%!4 �pre_click(s_mousedrag%,adr%!4,0)
+�       � adr%!8 �
+�         often_int%=�
+�&         adr%!24=try_time%+adr%!12
+�*         �pre_click(s_often%,adr%!8,1)
,       �
,       � adr%!16 �
,         pointer_int%=�
,$-         �pre_click(s_pointer%,adr%!16,1)
,.       �
,83       � adr%!20 �pre_click(s_mouse%,adr%!20,1)
,B       � adr%!32 �
,L/         �pre_click(s_pageshown%,adr%!32,1)
,V,         �do_click(s_pageshown%,adr%!32)
,`       �
,j
     �
,t   �
,~ �
,� �
,�
,�& ��pre_click(context%,click%,seq%)
,� � adr%
,�( ș getentry%,context%,click% � adr%
,� end%=adr%+!adr%:adr%+=4
,� �
,�   len%=!adr%:cmd%=adr%!4
,�   Ȏ cmd% �
,�8     � 1,3,4:� seq%=0 �pre_list(cmd%,adr%+8,len%-12)
,�A     � 5:� context%=s_pageshown% � seq%=0 �play_sound(adr%!8)
,�
     � 7:
-       � seq% �
-
         seq_int%=�
-0         flag%=adr%!12:s%=adr%+36:e%=len%-40
-.         � flag% � 4 s%=adr%+40:e%=len%-44
-(         �pre_list(3,s%,e%)
-2       �
-<   �
-F   adr%+=len%
-P � adr%>=end%
-Z �
-d
-n ��pre_list(cmd%,adr%,len%)
-x �list%=0�len%�4
-�   Ȏ cmd% �
-�1     � 1:�light_object(stack%,list%!adr%,1,0)
-�0     � 3:�hide_object(stack%,list%!adr%,1,0)
-�0     � 4:�hide_object(stack%,list%!adr%,0,0)
-�   �
-� �
-� �
-�
-� ��try_poll
-� ș poll%,,q% � A%
-� ș playsound%,0
-�& ș "OS_Module",16,"Ubase%Ultimap"
-� Ȏ A% �
.   � 0:�try_null
.   � 1:�redraw_window
.D   � 2:�open_window(!q%,q%!4,q%!8,q%!12,q%!16,q%!20,q%!24,q%!28)
."   � 3:�close_window(!q%)
.,6   � 4:� !q%=main_w% � pointer_on%<>� �"pointer 1"
.6
   � 5
.@L     � !q%=main_w% � pointer_on%=1 ș "Wimp_SpriteOp",36,1,"ptr_clock",2
.JK     � !q%=main_w% � pointer_on%=2 ș "Wimp_SpriteOp",36,1,"ptr_hand",2
.T   � 6:�try_mouse
.^   � 7:�try_user_drag
.h   � 8:�try_keys
.r   � 9:�try_menu_select
.|   � 17,18:�try_receive(q%)
.� �
.� �
.�
.� � �try_receive(q%)
.� Ȏ q%!16 �
.�   � 0:�finish:�
.�   � 2:�datasaveack
.�!   � 3:� q%!40=&BC3 �dataload
.�   � 6:�ramfetch
.�   � &502:�help_request
.�!   � &400C0:�try_menu_warning
.�   � &400C1:
.�     ș "Hourglass_On"
/     �get_mode_info
/     �lose_fonts
/     �set_icon_fonts
/&     ș "Hourglass_Off"
/0 �
/: �
/D
/N ��try_null
/X4 !q%=main_w%:ș getw%,,q%:�((q%!32)�(1<<16))=0 �
/b# � seq_int% �check_sequences(�)
/l �check_clicks
/vP � �input$,1)=�13:input$=�input$,�(input$)-1):!q%=main_w%:q%!24=13:�try_keys
/�0 � pointer_int% � scanning%=� �under_pointer
/� � often_int% �often
/�% � scanning% � scan_keys%=1 �scan
/� ș playsound%,0 � t%
/� � t%<>-1 �
/�   � speaking_text% �
/�     � speak_sound% �
/�)       �play_sound_wait(speak_sound%)
/�
     �
/�       �7:t%=�+50:�:��>t%
/�
     �
/�     �speaking_text
/�   �
0 �
0 �check_sysvars
0 �
0 
0* ��check_sysvars
041 ș "OS_ReadVarVal","Upage",main%,1000 � ,,T%
0>% T%?main%=0:page$=�string0(main%)
0H � page$<>current_page$ �
0R*   page%=�name_exsists(s_pages%,page$)
0\   � page% �
0f     current_page%=page%
0p     �pre_process
0z"     �show_page(current_page%)
0�     � scanning% �scan
0�   �
0� �
0�3 ș "OS_ReadVarVal","Uobject",main%,1000 � ,,T%
0�' T%?main%=0:object$=�string0(main%)
0� � object$<>"" �
0�   � "set Uobject "+�34+�34
0�4   input$=object$:!q%=main_w%:q%!24=13:�try_keys
0� �
0� �
0�
0� ��try_mouse
0� Ȏ q%!12 �
1>   � -2:� q%!16=icon_bar% � 1,&100,&9000,1:�check_icon_bar
1   � main_w%:�try_main_w
1(   � pagelist_wc%:�check_pagelist_wc
1$    � print_w%:�check_print_w
1. �
18 �
1B
1L ��try_main_w
1V# ș setcaret%,main_w%,-1,0,0,10
1` mx%=!q%:my%=q%!4
1j button%=q%!8
1t � button%�2 �
1~.   � menu_enabled% �open_try_menu(mx%,my%)
1�   �
1� �
1�' � scanning% �scan_click(button%):�
1� � pointer_on%=1 �
1� icon%=q%!16
1� !q%=main_w%:ș getw%,,q%
1�+ offx%=(q%!4-q%!20):offy%=(q%!16-q%!24)
1� mx%-=offx%:my%-=offy%
1� Ȏ button% �
1�   � &40
1�%     stack%=�stack(current_page%)
1�5     object%=�which_object(current_page%,mx%,my%)
2     � object% �
2
-       ș getentry%,stack%,object% � adr%
2       click%=adr%!28
2       � click% �
2(1         ș getentry%,s_clicks%,click% � adr%
22         � adr%!4 �
2<6           ș getentry%,s_mousedrag%,adr%!4 � adr%
2F+           �begin_save(object%,adr%!12)
2P         �
2Z       �
2d
     �
2n
   � &100
2x2     page_ptr%-=4:� page_ptr%<0 page_ptr%=1020
2�%     � page_ptr%!page_stack%<>0 �
2�       �delight
2�.       current_page%=page_ptr%!page_stack%
2�"       page_ptr%!page_stack%=0
2�       �pre_process
2�$       �show_page(current_page%)
2�       � scanning% �scan
2�
     �
2�
   � &400
2�%     stack%=�stack(current_page%)
2�5     object%=�which_object(current_page%,mx%,my%)
2�     � object% �
2�-       ș getentry%,stack%,object% � adr%
3       click%=adr%!28
3       � click% �
31         ș getentry%,s_clicks%,click% � adr%
3"C         � adr%!20 �do_click_recorded(object%,s_mouse%,adr%!20)
3,       �
36
     �
3@5       ș getentry%,s_pages%,current_page% � adr%
3J       click%=adr%!24
3T       � click% �
3^1         ș getentry%,s_clicks%,click% � adr%
3h=         � adr%!20 �do_click_recorded(0,s_mouse%,adr%!20)
3r       �
3|
     �
3� �
3� �
3�
3� ��try_keys
3�
 Ȏ !q% �
3�   � main_w%
3�     key%=q%!24
3�     � key%=13 �
3�'       stack%=�stack(current_page%)
3�/       � �lower_case(�input$,6))="object" �
3�+         token%=�(�input$,�(input$)-6))
3�.         ș getentry%,stack%,token% � adr%
3�         � adr% �
4           � adr%!28 �
4'             pointer_object%=token%
46             ș getentry%,s_clicks%,adr%!28 � adr%
4&F             � adr%!20 �do_click_recorded(token%,s_mouse%,adr%!20)
40           �
4:         �
4D       �
4NA       � �lower_case(�input$,4))="back" q%!8=&100:�try_main_w
4X       input$=""
4b
     �
4l-       � key%=27:�close_window(main_w%):�
4v&       � key%=&180 �open_print_w:�
4�K       � key%>31 � key%<255 input$=input$+�(key%) � ș processkey%,key%
4�"       � �input$=255 input$=""
4�
     �
4�   � print_w%
4�H     � q%!24=13 q%!8=4:q%!16=4:�check_print_w � ș processkey%,q%!24
4�   
4�     ș processkey%,q%!24
4� �
4� �
4�
4�1 ��do_click_recorded(object%,context%,click%)
4�4 � object% status$=".object"+�object%+"."+‘$,8)
4�. � object%=0 status$=".background."+‘$,8)
5A � "set Ustatus "+�leaf(full_name$)+"."+current_page$+status$
5 �do_click(context%,click%)
5 �
5 
5*  ��do_click(context%,click%)
54( ș getentry%,context%,click% � adr%
5>" ș movedata%,adr%,ws%+8,!adr%
5H$ !ws%=(ws%!8)+8:ws%!4=12:ws%!8=0
5R �make_space(!ws%+16)
5\! ș addentry%,s_clickson%,ws%
5f �check_clicks
5p �
5z
5� ��check_clicks
5�# ș nentries%,s_clickson% � nc%
5� � nc%=0 �
5� � click%=1�nc%
5�1   ș getnth%,s_clickson%,click% � click_adr%
5�+   � click_adr%!8<� � click_adr%!4<>0 �
5�0     ptr%=click_adr%!4:cadr%=click_adr%+ptr%
5�-     click_len%=!cadr%:cmd%=cadr%!4:ok%=�
5�     Ȏ cmd% �
5�:       � 1,3,4:�click_list(cmd%,cadr%+8,click_len%-12)
5�       � 2
5�         �delight
5�0         page_ptr%!page_stack%=current_page%
66         page_ptr%+=4:� page_ptr%=1024 page_ptr%=0
6"         current_page%=cadr%!8
6M         � current_page%=0 ș nentries%,s_pages% � t%:current_page%=�(t%)
6$.         � current_page%=0 current_page%=1
6.         �pre_process
68&         �show_page(current_page%)
6B         � scanning% �scan
6L         �
6V       � 5
6`!         ș playsound%,0 � t%
6j1         � t%=-1 ok%=� � �play_sound(cadr%!8)
6t*       � 6:�speak_text(stack%,cadr%!8)
6~!       � 7:�init_seq(�,cadr%)
6�       � 8:
6�)         click_cmd$=�string0(cadr%+8)
6�)         cmd$=�lower_case(click_cmd$)
6�'         � �cmd$,10)="load file " �
6�-           file$=�cmd$,�cmd$-10):page$=""
6�           � �file$," ") �
6�3             page$=�file$,�(file$)-�file$," "))
6�,             file$=�file$,�file$," ")-1)
6�           �
6�)           file$=full_name$+"."+file$
6�           � �
6�.           � � �:� �:click_adr%!4=0:� 1,�$
7"           �load_file(file$,1)
7
Z           � page$<>"" page%=�name_exsists(s_pages%,page$):� page% current_page%=page%
7           �pre_process
7(           �show_page(current_page%)
7(            � scanning% �scan
72           �zero_page_stack
7<           �
7F         �
7P3         � �cmd$,4)="load" � �cmd$,5)="*load" �
7Z,           file$=�cmd$,�cmd$-5):page$=""
7d           � �file$," ") �
7n3             page$=�file$,�(file$)-�file$," "))
7x,             file$=�file$,�file$," ")-1)
7�           �
7�           � �
7�.           � � �:� �:click_adr%!4=0:� 1,�$
7�"           �load_file(file$,1)
7�Z           � page$<>"" page%=�name_exsists(s_pages%,page$):� page% current_page%=page%
7�           �pre_process
7�(           �show_page(current_page%)
7�            � scanning% �scan
7�           �zero_page_stack
7�           �
7�         �
7�1         � �cmd$,3)="run" � �cmd$,4)="*run" �
7�*           file$=�cmd$,�cmd$-4):�file$
8           � �
8.           � � �:� �:click_adr%!4=0:� 1,�$
8#           � "filer_run "+file$
8"           click_cmd$=""
8,         �
86"         � �cmd$,6)="replay" �
8@#           file$=�cmd$,�cmd$-7)
8J"           � �file$,"-at")=0 �
8T3             ș getentry%,stack%,object% � adr%
8^6             x%=(adr%!12)+offx%:y%=(adr%!16)+offy%
8h0             file$=file$+" -at "+�x%+","+�y%
8r           �
8|           � �
8�.           � � �:� �:click_adr%!4=0:� 1,�$
8�(           ș "Wimp_StartTask",file$
8�           click_cmd$=""
8�         �
8�M         � �cmd$,4)="back" input$="back":!q%=main_w%:q%!24=13:�try_keys:�
8�"         � �cmd$,6)="object" �
8�           click_cmd$=""
8�           input$=cmd$+�13
8�         �
8�         � �
8�,         � � �:� �:click_adr%!4=0:� 1,�$
8�*         � click_cmd$<>"" � click_cmd$
8�%       � 9:click_adr%!8=�+cadr%!8
9a       � 12:pointer_on%=2:�get_pointer:� handle%=main_w% ș "Wimp_SpriteOp",36,1,"ptr_hand",2
9
     �
93     ș getnth%,s_clickson%,click% � click_adr%
9&+     � ok% click_adr%!4=ptr%+click_len%
903     � click_adr%!4>=!click_adr% click_adr%!4=0
9:   �
9D �
9N
 click%=1
9X �
9b2   ș getnth%,s_clickson%,click% � adr%,token%
9l   � adr%!4=0 �
9v)     ș killentry%,s_clickson%,token%
9�     click%-=1
9�   �
9�   click%+=1
9�%   ș nentries%,s_clickson% � nc%
9� �click%>=nc% � nc%=0
9� �
9�
9�! ��click_list(cmd%,adr%,len%)
9� �list%=0�len%�4
9�   Ȏ cmd% �
9�     � 1
9�.       ș getentry%,stack%,list%!adr% � t%
9�"       � (t%!36)�1 t%=0 � t%=1
:/       �light_object(stack%,list%!adr%,1,1)
:0     � 3:�hide_object(stack%,list%!adr%,1,1)
:0     � 4:�hide_object(stack%,list%!adr%,0,1)
:    �
:* �
:4 �
:>
:H& ��under_pointer:� pointer_on%=1 �
:R �get_pointer
:\ !q%=main_w%:ș getw%,,q%
:f+ offx%=(q%!4-q%!20):offy%=(q%!16-q%!24)
:p( mx%=mousex%-offx%:my%=mousey%-offy%
:zO � handle%=main_w% object%=�which_object(current_page%,mx%,my%) � object%=0
:�! � object%<>pointer_object% �
:�!   �"pointer 1":pointer_on%=�
:�   pointer_object%=object%
:�#   stack%=�stack(current_page%)
:�    ș nentries%,stack% � no%
:�   � no% �
:�     � ob%=1�no%
:�.       ș getnth%,stack%,ob% � adr%,token%
:�K       � token%<>object% � (adr%!36)�1 �light_object(stack%,token%,0,1)
:�
     �
:�     � object% �
:�4       ș getentry%,stack%,object% � adr%,token%
:�       � adr%!28 �
;2         ș getentry%,s_clicks%,adr%!28 � adr%
;4         � adr%!16 �do_click(s_pointer%,adr%!16)
;       �
;$
     �
;.5       ș getentry%,s_pages%,current_page% � adr%
;8       � adr%!24 �
;B2         ș getentry%,s_clicks%,adr%!24 � adr%
;L4         � adr%!16 �do_click(s_pointer%,adr%!16)
;V       �
;`
     �
;j   �
;t �
;~ �
;�
;� ��often:� pointer_on%<>� �
;�! stack%=�stack(current_page%)
;� ș nentries%,stack% � no%
;� � no% �
;�   � ob%=1�no%
;�,     ș getnth%,stack%,ob% � adr%,token%
;�     � adr%!28 �
;�0       ș getentry%,s_clicks%,adr%!28 � adr%
;�       � adr%!8 �
;�         � adr%!24<� �
;�            adr%!24=�+adr%!12
<)           �do_click(s_often%,adr%!8)
<
         �
<       �
<
     �
<(   �
<2 �
<< �
<F
<P ��open_try_menu(mx%,my%)
<Z �I%=0�2�2:P%=main%
<d [optI%
<n equs menu$
<x equd &070207
<� equd 168:equd 40:equd 0
<�, equd 8:equd pagelist_wc%:equd &07000021
<� equs "Show page   "
<�$ equd &80:equd -1:equd &07000021
<� equs "Print       "
<� ]:�
<�
 menu%=11
<�% ș createmenu%,,main%,mx%,my%-32
<� �
<�
<� ��try_menu_warning
<�$ mx%=q%!24:my%=q%!28:item%=q%!32
<�( �arrange_pagelist_wc(current_page%)
=( ș crsubmenu%,,pagelist_wc%,mx%,my%
= �
=
=" ��try_menu_select
=, Ȏ menu% �
=6   � 5:�icon_bar_menu
=@   � 11:
=J     Ȏ !q% �
=T       � 1:�open_print_w
=^
     �
=h �
=r �
=|
=� ��try_pagelist_wc
=� but%=q%!8
=�$ !ws%=pagelist_wc%:ș getw%,,ws%
=�/ offx%=(ws%!4-ws%!20):offy%=(ws%!16-ws%!24)
=�! page%=(((q%!4)-offy%)�-48)+1
=�. ș nentries%,s_pages% � np%:� page%>np% �
=�' ș getnth%,s_pages%,page% � ,page%
=�  �arrange_pagelist_wc(page%)
=� �show_page(page%)
=�( �arrange_pagelist_wc(current_page%)
=� �begin_trying
=�  � but%�4 ș createmenu%,,-1
=� �
>
> ��scan
> � scan_count%>� �
>&, � scan_keys%=1 scan_count%=�+scan_time%
>0! stack%=�stack(current_page%)
>: ș nentries%,stack% � no%
>D � no%=0 �
>N � scan_object%<>0 �
>X3   ș getnth%,stack%,scan_object% � adr%,token%
>b   � adr%!36 � 1 �
>l)     �light_object(stack%,token%,0,1)
>v     scan_object%+=1
>�*     � scan_object%>no% scan_object%=1
>�   �
>� �
>�   scan_object%=1
>� �
>� yes%=0
>� �
>�3   ș getnth%,stack%,scan_object% � adr%,token%
>�+   � (adr%!28)<>0 � ((adr%!36)�128)=0 �
>�.     ș getentry%,s_clicks%,adr%!28 � adr%
>�     � adr%!16 �
>�4       �light_object(stack%,token%,1,1):yes%=no%
>�
     �
?       scan_object%+=1
?,       � scan_object%>no% scan_object%=1
?       yes%+=1
? 
     �
?*   �
?4     scan_object%+=1
?>*     � scan_object%>no% scan_object%=1
?H     yes%+=1
?R   �
?\ �yes%=no%
?f �
?p
?z ��scan_click(but%)
?� � scan_object%=0 �
?�! stack%=�stack(current_page%)
?�4 � scan_keys%=1 � (scan_keys%=2 � (but%�&101)) �
?�3   ș getnth%,stack%,scan_object% � adr%,token%
?�   � adr%!28 �
?�.     ș getentry%,s_clicks%,adr%!28 � adr%
?�.     � adr%!20 �do_click(s_mouse%,adr%!20)
?�   �
?� �
?�   � but%�&404 �scan
?� �
?� �
?�
@ ��redefine_main_w
@ !q%=main_w%:ș getwi%,,q%
@( � (q%!32)�(1<<16) open%=� � open%=�
@$ ș "Wimp_DeleteWindow",,q%
@.' f%=((q%!32)�&83FFFFFF) � (&83<<24)
@8 bh%=q%!28
@B � h_scroll% f%=f%�(1<<30)
@L � v_scroll% f%=f%�(1<<28)
@V* � h_scroll% � v_scroll% f%=f%�(1<<29)
@`< � title_bar% f%=f%�(1<<26):� toggle_icon% f%=f%�(1<<27)
@j
 q%!32=f%
@t+ ș "Wimp_CreateWindow",,q%+4 � main_w%
@~U !q%=main_w%:ș getw%,,q%:�open_window(!q%,q%!4,q%!8,q%!12,q%!16,q%!20,q%!24,bh%)
@� �
@�
@� ��init_seq(time%,adr%)
@�  ș movedata%,adr%,ws%,!adr%
@�7 � (adr%!12)�4 ws%!4=40:ws%!8=36 � ws%!4=36:ws%!8=0
@�) ws%!12=4:ws%!16=adr%!20:ws%!20=time%
@�* ws%!24=adr%!8:ws%!28=0:ws%!32=adr%!12
@� �make_space(!ws%+16)
@�" ș addentry%,s_sequences%,ws%
@�e � (ws%!32)�64 pointer_on%=1:�get_pointer:� handle%=main_w% ș "Wimp_SpriteOp",36,1,"ptr_clock",2
@� �
@�
A ��check_sequences(time%)
A
$ ș nentries%,s_sequences% � ns%
A � ns% �
A#   stack%=�stack(current_page%)
A(   � seq%=1 � ns%
A2,     ș getnth%,s_sequences%,seq% � adr%
A<     � time%>adr%!20 �
AF        adr%!20=time%+adr%!16
AP?       len%=!adr%:ptr%=adr%!4:optr%=adr%!8:ptr_inc%=adr%!12
AZ(       loop%=(adr%!32)�2:last_one%=0
AdC       last%=(adr%!32)�8:trail%=(adr%!32)�16:noud%=(adr%!32)�32
An!       seethru%=(adr%!32)�128
Ax+       � adr%!24<>0 � adr%!28=adr%!24 �
A�         � loop% �
A�$           � ptr%=40 last_one%=�
A�         �
A�$           � ptr%=36 last_one%=�
A�         �
A�       �
A�"       � optr%<>0 � trail%=0 �
A�         � last_one% �
A�           � last%=0 �
A�             � noud% �
A�4               �fast_draw(stack%,optr%!adr%,�,0)
A�             �
A�6               �hide_object(stack%,optr%!adr%,1,1)
B             �
B           �
B         �
B"           � noud% �
B,2             �fast_draw(stack%,optr%!adr%,�,0)
B6           �
B@4             �hide_object(stack%,optr%!adr%,1,1)
BJ           �
BT         �
B^       �
Bh       � last_one%=0 �
Br         � noud% �
B|6           �fast_draw(stack%,ptr%!adr%,0,seethru%)
B�         �
B�1           �hide_object(stack%,ptr%!adr%,0,1)
B�         �
B�'         adr%!8=ptr%:ptr%+=ptr_inc%
B�         � loop% �
B�           � ptr%=len% �
B�'             ptr%=len%-8:adr%!12=-4
B�           �
B�             � ptr%=32 �
B�$               ptr%=40:adr%!12=4
B�3               � adr%!24<>0 adr%!28=(adr%!28)+1
B�             �
B�           �
C         �
C           � ptr%=len% �
C             ptr%=36
C&1             � adr%!24<>0 adr%!28=(adr%!28)+1
C0           �
C:         �
CD       �
CN         ptr%=0
CX       �
Cb       adr%!4=ptr%
Cl
     �
Cv   �
C�   �
C�     nomore%=�
C�(     ș nentries%,s_sequences% � ns%
C�     � ns% �
C�       � seq%=1 � ns%
C�7         ș getnth%,s_sequences%,seq% � adr%,token%
C�A         � adr%!4=0 � (adr%!32)�64 �"pointer 1":pointer_on%=�
C�L         � adr%!4=0 nomore%=0:seq%=ns%:ș killentry%,s_sequences%,token%
C�       �
C�
     �
C�   �nomore%
C� �
C� �
D
D/ ��fast_draw(stack%,token%,erase%,seethru%)
D � adr%
D  !q%=main_w%:ș getw%,,q%
D*+ offx%=(q%!4-q%!20):offy%=(q%!16-q%!24)
D4& ș getentry%,stack%,token% � adr%
D> x%=(adr%!12)+offx%
DH y%=(adr%!16)+offy%
DR" x1%=(adr%!20)-(1<<xef%)+offx%
D\" y1%=(adr%!24)-(1<<yef%)+offy%
Df � erase% �
Dp0   � ((adr%!36)�128)=0 adr%!36=(adr%!36)�128
Dz2   ș getentry%,s_pages%,current_page% � adr1%
D�   bcol%=adr1%!28:
D� �
D�9   � (adr%!36)�128 � seethru%=0 adr%!36=(adr%!36)�128
D� �
D�  flags%=adr%!36:type%=adr%!4
D�f !q%=main_w%:q%!4=x%-offx%:q%!8=y%-offy%-32:q%!12=x1%-offx%+(1<<xef%)+32:q%!16=y1%-offy%+(1<<yef%)
D� ș updatew%,,q% � more%
D�
 ȕ more%
D�   � erase% �
D�3     ș setcol%,bcol%:ȓ Ȑ x%,y%,x1%-x%,y1%-y%
D�   �
D�     Ȏ type% �
D�:       � s_text%:�draw_text(stack%,token%,offx%,offy%)
Ek       � s_sprites%,s_draw%:�draw_picture(adr%!4,adr%!8,x%+(1<<xef%),y%+(1<<yef%),x1%-x%,y1%-y%,flags%)
E
     �
E   �
E$   ș getr%,,q% � more%
E. �
E8 �
EB
EL  ��speak_text(stack%,token%)
EV speak_token%=token%
E`! speak_word%=0:speak_sound%=0
Ej& ș getentry%,stack%,token% � adr%
Et' ș getentry%,s_text%,adr%!8 � adr%
E~ sptext%=adr%+4
E� � ?sptext%<>0 �
E�   speaking_text%=�
E�   text$="":a%=sptext%
E�)   �:text$=text$+�(?a%):a%+=1:�?a%<48
E�2   speak_sound%=�name_exsists(s_sounds%,text$)
E�*   �update_object(stack%,speak_token%)
E� �
E� �
E�
E� ��speaking_text
E�, ș getentry%,stack%,speak_token% � adr%
E�' ș getentry%,s_text%,adr%!8 � adr%
F sptext%=adr%+4
F
 �
F   speak_word%+=1
F   c%=speak_word%?sptext%
F( �c%=32 � c%=13 � c%=0
F2 � c%=32 � c%=13 �
F<   �
FF-    speak_word%+=1:c%=speak_word%?sptext%
FP   �c%>32 � c%=0
FZ �
Fd � c%<>0 �
Fn&   text$="":a%=speak_word%+sptext%
Fx)   �:text$=text$+�(?a%):a%+=1:�?a%<48
F�2   speak_sound%=�name_exsists(s_sounds%,text$)
F� �
F� � c%=0 speaking_text%=�
F�( �update_object(stack%,speak_token%)
F� �
F�
F�6 ��highlight_text(stack%,token%,offx%,offy%,word%)
F�& ș getentry%,stack%,token% � adr%
F� x%=(adr%!12)+offx%
F� y%=(adr%!16)+offy%
F�" x1%=(adr%!20)-(1<<xef%)+offx%
F�" y1%=(adr%!24)-(1<<yef%)+offy%
F�. flags%=adr%!36:font%=adr%!40:b_s%=adr%!32
G8 fcol%=adr%!52:� fcol% � &FF fcol%=default_page_col%
G bcol%=adr%!56
G; � flags%�1 fcol%=fcol%�&FFFFFF00:bcol%=bcol%�&FFFFFF00
G"1 �draw_border(b_s%,fcol%,bcol%,x%,y%,x1%,y1%)
G, x%+=(1<<xef%)
G6 x1%-=(1<<xef%)
G@ y%+=(1<<yef%)
GJ y1%-=(1<<yef%)
GT � �
G^ � � � � �:font%=0
Gh � font% �
Gr'   ș getentry%,s_fonts%,font% � t%
G|1   ș findfont%,,t%+4,adr%!44,adr%!48 � font%
G� �
G� � font% �
G�    � bcol% � &FF bcol%=fcol%
G�.   ș fontinfo%,font% � ,cx%,cy%,cx1%,cy1%
G� �
G�>   cx%=-(1<<xef%):cy%=-(1<<yef%):cx1%=8<<xef%:cy1%=8<<yef%
G� �
G� text_height%=cy1%
G�( ș getentry%,s_text%,adr%!8 � text%
G�
 text%+=4
G� text_offset%=0
G�, px%=x%+margin%:py%=y1%-text_height%+cy%
G�$ centre%=�:right%=�:underline%=�
H � flags% � 8 centre%=�
H � flags% � 16 right%=�
H � flags% � 32 underline%=�
H& �
H0   Ȏ text_offset%?text% �
H:
     � 0:
HD/     � 13:py%-=text_height%:text_offset%+=1
HN
     
HX-       text$=�string0(text%+text_offset%)
Hb       text_offset%+=�text$
Hl       px%=x%+margin%
Hv       � font% �
H�@         ș stringwidth%,,text$,1<<30,1<<30,-1,�text$ � ,,w%
H�&         ș converttoos%,,w% � ,w%
H�-         � centre% px%=x%+(x1%-x%)�2-w%�2
H�(         � right% px%=x1%-w%-margin%
H�7         � underline% ul$=�(25)+�(1)+�(16) � ul$=""
H�A         ș "ColourTrans_SetFontColours",font%,bcol%,fcol%,14
H�2         ș paint%,,ul$+text$,1<<4,px%,py%-cy%
H�B         � text_offset%>word% � (text_offset%-�text$)<=word% �
H�/           i%=word%-(text_offset%-�(text$))
H�           l$=�text$,i%)
H�<           ș stringwidth%,,l$,1<<30,1<<30,-1,�l$ � ,,w%
H�(           ș converttoos%,,w% � ,w%
H�           px%+=w%
I$           r$=�text$,�text$-�l$)
I*           � �r$," ") r$=�r$,�r$," "))
IW           ș "ColourTrans_SetFontColours",font%,bcol%�&FFFFFF00,fcol%�&FFFFFF00,14
I 1           ș paint%,,ul$+r$,1<<4,px%,py%-cy%
I*         �
I4       �
I>         w%=�text$*cx1%
IH-         � centre% px%=x%+(x1%-x%)�2-w%�2
IR(         � right% px%=x1%-w%-margin%
I\3         ș setcol%,fcol%:� px%,py%+cy1%:�text$
If8         � underline% � px%,py%-cy%:�1,cx1%*�text$,0
IpB         � text_offset%>word% � (text_offset%-�text$)<=word% �
Iz/           i%=word%-(text_offset%-�(text$))
I�           l$=�text$,i%)
I�"           w%=�l$*cx1%:px%+=w%
I�$           r$=�text$,�text$-�l$)
I�*           � �r$," ") r$=�r$,�r$," "))
I�<           ș setcol%,fcol%�&FFFF0000:� px%,py%+cy1%:�r$
I�7           � underline% � px%,py%-cy%:�1,cx1%*�r$,0
I�         �
I�       �
I�   �
I� � text_offset%?text%=0
I� � font% ș losefont%,font%
I� �
I�
J! ��begin_save(object%,sound%)
J' ș getentry%,stack%,object% � adr%
J" ș getp%,,q%:mx%=!q%:my%=q%!4
J$2 ix%=mx%-38:iy%=my%-38:ix1%=mx%+38:iy1%=my%+38
J. � sound% �
J8   � adr%!28 �
JB.     ș getentry%,s_clicks%,adr%!28 � adr%
JL     � adr%!20 �
JV/       ș getentry%,s_mouse%,adr%!20 � adr%
J`       � adr%!8=5 �
Jj          drag_sound%=adr%!12
Jt-         �start_drag(3,ix%,iy%,ix1%,iy1%)
J~       �
J�
     �
J�   �
J� �
J�   � adr%!4=s_text% �
J�1     drag_ptype%=s_text%:drag_picture%=adr%!8
J�*     �start_drag(20,ix%,iy%,ix1%,iy1%)
J�   �
J�0     drag_ptype%=adr%!4:drag_picture%=adr%!8
J�)     �start_drag(4,ix%,iy%,ix1%,iy1%)
J�   �
J� �
J� �
K
K
 ��try_user_drag
K �get_pointer
K � handle%=main_w% �
K( q%!20=handle%:q%!24=icon%
K2  q%!28=mousex%:q%!32=mousey%
K< q%!36=sprite_size%-24
KF !q%=56
KP Ȏ drag_type% �
KZ    � 3:� saving sound
Kd3      ș getentry%,s_sounds%,drag_sound% � adr%
Kn       save$=�string0(adr%+4)
Kx      file_type%=&D3C
K�    � 4:� saving picture
K�7      ș getentry%,drag_ptype%,drag_picture% � adr%
K�       save$=�string0(adr%+4)
K�D      � drag_ptype%=s_sprites% file_type%=&FF9 � file_type%=&AFF
K�    � 20:� saving text
K�      save$="text"
K�      file_type%=&FFF
K�   �
K�   q%!40=file_type%
K�   �string0(q%+44,save$)
K�   q%!12=q%!8:q%!16=1
K�:   ș sendmessage%,17,q%,handle%,icon%:� send datasave
K�   myref%=q%!8
L
   DMT%=0
L   DMT_ptr%=0
L �
L" �
�
00000000  0d 00 0a 24 f4 20 55 6c  74 69 6d 61 70 20 76 20  |...$. Ultimap v |
00000010  32 2e 30 30 20 28 33 30  20 4d 61 72 63 68 20 31  |2.00 (30 March 1|
00000020  39 39 35 29 0d 00 14 19  f4 20 a9 20 53 69 6d 6f  |995)..... . Simo|
00000030  6e 20 48 61 79 6c 65 73  20 31 39 39 34 0d 00 1e  |n Hayles 1994...|
00000040  04 0d 00 28 0d 20 d3 3d  26 34 30 30 30 30 0d 00  |...(. .=&40000..|
00000050  32 20 20 de 20 74 61 73  6b 69 64 25 20 34 3a 24  |2  . taskid% 4:$|
00000060  74 61 73 6b 69 64 25 3d  22 54 41 53 4b 22 0d 00  |taskid%="TASK"..|
00000070  3c 48 20 c8 99 20 22 57  69 6d 70 5f 49 6e 69 74  |<H .. "Wimp_Init|
00000080  69 61 6c 69 73 65 22 2c  32 30 30 2c 21 74 61 73  |ialise",200,!tas|
00000090  6b 69 64 25 2c 22 55 6c  74 69 6d 61 70 22 20 b8  |kid%,"Ultimap" .|
000000a0  20 76 65 72 73 69 6f 6e  25 2c 74 61 73 6b 5f 68  | version%,task_h|
000000b0  61 6e 64 6c 65 25 0d 00  46 04 0d 00 50 12 20 ee  |andle%..F...P. .|
000000c0  20 85 20 f2 65 72 72 6f  72 62 6f 78 0d 00 5a 04  | . .errorbox..Z.|
000000d0  0d 00 64 0a 20 f2 76 61  72 73 0d 00 6e 04 0d 00  |..d. .vars..n...|
000000e0  78 26 20 c8 99 20 22 4f  53 5f 4d 6f 64 75 6c 65  |x& .. "OS_Module|
000000f0  22 2c 31 36 2c 22 55 62  61 73 65 25 55 6c 74 69  |",16,"Ubase%Ulti|
00000100  6d 61 70 22 0d 00 82 18  20 2a 55 42 41 53 45 20  |map".... *UBASE |
00000110  34 30 30 30 30 20 38 30  30 30 30 30 0d 00 8c 04  |40000 800000....|
00000120  0d 00 96 17 20 f4 20 67  6c 6f 62 61 6c 20 76 61  |.... . global va|
00000130  72 69 61 62 6c 65 73 0d  00 a0 04 0d 00 aa 38 20  |riables.......8 |
00000140  de 20 62 6f 78 25 20 31  32 2c 62 6f 78 32 25 20  |. box% 12,box2% |
00000150  31 32 2c 6d 61 74 72 69  78 25 20 31 36 2c 6f 72  |12,matrix% 16,or|
00000160  69 67 69 6e 31 25 20 38  2c 6f 72 69 67 69 6e 32  |igin1% 8,origin2|
00000170  25 20 38 0d 00 b4 21 20  69 63 6f 6e 5f 66 6f 6e  |% 8...! icon_fon|
00000180  74 24 3d 22 48 6f 6d 65  72 74 6f 6e 2e 4d 65 64  |t$="Homerton.Med|
00000190  69 75 6d 22 0d 00 be 1a  20 66 75 6c 6c 5f 6e 61  |ium".... full_na|
000001a0  6d 65 24 3d 22 55 6e 74  69 74 6c 65 64 22 0d 00  |me$="Untitled"..|
000001b0  c8 15 20 71 75 65 72 79  5f 73 74 72 69 6e 67 24  |.. query_string$|
000001c0  3d 22 22 0d 00 d2 0c 20  6d 65 6e 75 25 3d 30 0d  |="".... menu%=0.|
000001d0  00 dc 18 20 73 70 72 69  74 65 5f 73 69 7a 65 25  |... sprite_size%|
000001e0  3d 26 31 45 30 30 30 0d  00 e6 18 20 de 20 71 25  |=&1E000.... . q%|
000001f0  20 32 35 36 2c 6f 6c 64  5f 71 25 20 32 35 36 0d  | 256,old_q% 256.|
00000200  00 f0 13 20 de 20 65 72  72 62 6c 6b 25 20 33 30  |... . errblk% 30|
00000210  30 30 0d 00 fa 27 20 de  20 6d 61 69 6e 25 20 31  |00...' . main% 1|
00000220  30 30 30 2c 73 70 72 69  74 65 73 25 20 73 70 72  |000,sprites% spr|
00000230  69 74 65 5f 73 69 7a 65  25 0d 01 04 40 20 21 73  |ite_size%...@ !s|
00000240  70 72 69 74 65 73 25 3d  73 70 72 69 74 65 5f 73  |prites%=sprite_s|
00000250  69 7a 65 25 3a 73 70 72  69 74 65 73 25 21 38 3d  |ize%:sprites%!8=|
00000260  31 36 3a c8 99 20 73 70  6f 70 25 2c 26 32 30 39  |16:.. spop%,&209|
00000270  2c 73 70 72 69 74 65 73  25 0d 01 0e 19 20 de 20  |,sprites%.... . |
00000280  77 69 6d 70 5f 70 61 6c  65 74 74 65 25 20 32 30  |wimp_palette% 20|
00000290  2a 34 0d 01 18 17 20 de  20 70 61 67 65 5f 73 74  |*4.... . page_st|
000002a0  61 63 6b 25 20 31 30 32  34 0d 01 22 04 0d 01 2c  |ack% 1024.."...,|
000002b0  11 20 73 5f 73 70 72 69  74 65 73 25 3d 31 0d 01  |. s_sprites%=1..|
000002c0  36 0e 20 73 5f 64 72 61  77 25 3d 32 0d 01 40 10  |6. s_draw%=2..@.|
000002d0  20 73 5f 72 65 70 6c 61  79 25 3d 33 0d 01 4a 13  | s_replay%=3..J.|
000002e0  20 73 5f 71 75 69 63 6b  74 69 6d 65 25 3d 34 0d  | s_quicktime%=4.|
000002f0  01 54 0f 20 73 5f 66 6f  6e 74 73 25 3d 35 0d 01  |.T. s_fonts%=5..|
00000300  5e 12 20 73 5f 73 74 61  72 63 6f 6d 73 25 3d 36  |^. s_starcoms%=6|
00000310  0d 01 68 13 20 73 5f 6c  6f 61 64 6f 72 64 65 72  |..h. s_loadorder|
00000320  25 3d 37 0d 01 72 10 20  73 5f 73 6f 75 6e 64 73  |%=7..r. s_sounds|
00000330  25 3d 38 0d 01 7c 0e 20  73 5f 74 65 78 74 25 3d  |%=8..|. s_text%=|
00000340  39 0d 01 86 10 20 73 5f  70 61 67 65 73 25 3d 31  |9.... s_pages%=1|
00000350  30 0d 01 90 04 0d 01 9a  11 20 73 5f 63 6c 69 63  |0........ s_clic|
00000360  6b 73 25 3d 31 31 0d 01  a4 14 20 73 5f 6d 6f 75  |ks%=11.... s_mou|
00000370  73 65 64 72 61 67 25 3d  31 32 0d 01 ae 10 20 73  |sedrag%=12.... s|
00000380  5f 6f 66 74 65 6e 25 3d  31 33 0d 01 b8 12 20 73  |_often%=13.... s|
00000390  5f 70 6f 69 6e 74 65 72  25 3d 31 34 0d 01 c2 10  |_pointer%=14....|
000003a0  20 73 5f 6d 6f 75 73 65  25 3d 31 35 0d 01 cc 14  | s_mouse%=15....|
000003b0  20 73 5f 70 61 67 65 73  68 6f 77 6e 25 3d 31 36  | s_pageshown%=16|
000003c0  0d 01 d6 10 20 73 5f 73  70 61 72 65 25 3d 31 37  |.... s_spare%=17|
000003d0  0d 01 e0 13 20 73 5f 63  6c 69 63 6b 73 6f 6e 25  |.... s_clickson%|
000003e0  3d 31 38 0d 01 ea 0f 20  73 5f 74 65 6d 70 25 3d  |=18.... s_temp%=|
000003f0  31 39 0d 01 f4 14 20 73  5f 73 65 71 75 65 6e 63  |19.... s_sequenc|
00000400  65 73 25 3d 32 30 0d 01  fe 04 0d 02 08 0e 20 f4  |es%=20........ .|
00000410  20 6f 70 74 69 6f 6e 73  0d 02 12 04 0d 02 1c 10  | options........|
00000420  20 70 72 69 6e 74 69 6e  67 25 3d a3 0d 02 26 10  | printing%=...&.|
00000430  20 70 6f 72 74 72 61 69  74 25 3d a3 0d 02 30 14  | portrait%=...0.|
00000440  20 63 75 72 72 65 6e 74  5f 70 61 67 65 25 3d 30  | current_page%=0|
00000450  0d 02 3a 0f 20 6d 61 72  67 69 6e 25 3d 31 36 0d  |..:. margin%=16.|
00000460  02 44 11 20 63 6c 69 63  6b 5f 74 69 6d 65 3d 31  |.D. click_time=1|
00000470  0d 02 4e 12 20 63 6c 69  63 6b 5f 70 61 75 73 65  |..N. click_pause|
00000480  3d 31 0d 02 58 11 20 74  65 6d 70 5f 6c 69 73 74  |=1..X. temp_list|
00000490  25 3d 30 0d 02 62 0e 20  74 72 79 69 6e 67 25 3d  |%=0..b. trying%=|
000004a0  b9 0d 02 6c 15 20 73 70  65 61 6b 69 6e 67 5f 74  |...l. speaking_t|
000004b0  65 78 74 25 3d a3 0d 02  76 13 20 73 70 65 61 6b  |ext%=...v. speak|
000004c0  5f 73 6f 75 6e 64 25 3d  a3 0d 02 80 13 20 73 70  |_sound%=..... sp|
000004d0  65 61 6b 5f 74 6f 6b 65  6e 25 3d a3 0d 02 8a 10  |eak_token%=.....|
000004e0  20 68 5f 73 63 72 6f 6c  6c 25 3d b9 0d 02 94 10  | h_scroll%=.....|
000004f0  20 76 5f 73 63 72 6f 6c  6c 25 3d b9 0d 02 9e 13  | v_scroll%=.....|
00000500  20 74 6f 67 67 6c 65 5f  69 63 6f 6e 25 3d b9 0d  | toggle_icon%=..|
00000510  02 a8 11 20 74 69 74 6c  65 5f 62 61 72 25 3d b9  |... title_bar%=.|
00000520  0d 02 b2 10 20 73 63 61  6e 6e 69 6e 67 25 3d a3  |.... scanning%=.|
00000530  0d 02 bc 11 20 73 63 61  6e 5f 6b 65 79 73 25 3d  |.... scan_keys%=|
00000540  31 0d 02 c6 13 20 73 63  61 6e 5f 74 69 6d 65 25  |1.... scan_time%|
00000550  3d 31 30 30 0d 02 d0 13  20 73 63 61 6e 5f 6f 62  |=100.... scan_ob|
00000560  6a 65 63 74 25 3d 31 0d  02 da 12 20 73 63 61 6e  |ject%=1.... scan|
00000570  5f 63 6f 75 6e 74 25 3d  30 0d 02 e4 14 20 6d 65  |_count%=0.... me|
00000580  6e 75 5f 65 6e 61 62 6c  65 64 25 3d b9 0d 02 ee  |nu_enabled%=....|
00000590  14 20 77 73 25 3d 73 70  72 69 74 65 73 25 2b 33  |. ws%=sprites%+3|
000005a0  32 0d 02 f8 11 20 70 61  67 65 5f 73 69 7a 65 25  |2.... page_size%|
000005b0  3d 33 0d 03 02 16 20 66  69 6c 65 5f 76 65 72 73  |=3.... file_vers|
000005c0  69 6f 6e 25 3d 31 30 31  0d 03 0c 1b 20 63 75 72  |ion%=101.... cur|
000005d0  72 65 6e 74 5f 70 61 67  65 24 3d 22 50 61 67 65  |rent_page$="Page|
000005e0  20 31 22 0d 03 16 14 20  77 73 25 3d 73 70 72 69  | 1".... ws%=spri|
000005f0  74 65 73 25 2b 33 32 0d  03 20 04 0d 03 2a 16 20  |tes%+32.. ...*. |
00000600  c8 99 20 22 48 6f 75 72  67 6c 61 73 73 5f 4f 6e  |.. "Hourglass_On|
00000610  22 0d 03 34 14 20 f2 6c  6f 61 64 5f 74 65 6d 70  |"..4. .load_temp|
00000620  6c 61 74 65 73 0d 03 3e  13 20 f2 67 65 74 5f 6d  |lates..>. .get_m|
00000630  6f 64 65 5f 69 6e 66 6f  0d 03 48 12 20 f2 6c 6f  |ode_info..H. .lo|
00000640  61 64 5f 6f 70 74 69 6f  6e 73 0d 03 52 0e 20 f2  |ad_options..R. .|
00000650  6e 65 77 5f 66 69 6c 65  0d 03 5c 04 0d 03 66 26  |new_file..\...f&|
00000660  20 c8 99 20 22 4f 53 5f  47 65 74 45 6e 76 22 20  | .. "OS_GetEnv" |
00000670  b8 20 45 6e 76 53 74 72  24 2c 65 6e 64 5f 61 64  |. EnvStr$,end_ad|
00000680  72 25 0d 03 70 1c 20 e7  20 a7 45 6e 76 53 74 72  |r%..p. . .EnvStr|
00000690  24 2c 22 20 2d 71 75 69  74 20 22 29 20 8c 0d 03  |$," -quit ") ...|
000006a0  7a 2d 20 49 25 3d a7 45  6e 76 53 74 72 24 2c 22  |z- I%=.EnvStr$,"|
000006b0  22 22 22 29 3a 49 25 3d  a7 45 6e 76 53 74 72 24  |"""):I%=.EnvStr$|
000006c0  2c 22 22 22 22 2c 49 25  2b 31 29 0d 03 84 20 20  |,"""",I%+1)...  |
000006d0  f5 49 25 2b 3d 31 3a fd  c1 45 6e 76 53 74 72 24  |.I%+=1:..EnvStr$|
000006e0  2c 49 25 2c 31 29 3c 3e  22 20 22 0d 03 8e 14 20  |,I%,1)<>" ".... |
000006f0  66 24 3d c1 45 6e 76 53  74 72 24 2c 49 25 29 0d  |f$=.EnvStr$,I%).|
00000700  03 98 2c 20 e7 20 66 24  3c 3e 22 22 20 66 75 6c  |.., . f$<>"" ful|
00000710  6c 5f 6e 61 6d 65 24 3d  66 24 3a f2 6c 6f 61 64  |l_name$=f$:.load|
00000720  5f 66 69 6c 65 28 66 24  2c 32 29 0d 03 a2 06 20  |_file(f$,2).... |
00000730  cd 0d 03 ac 04 0d 03 b6  17 20 69 63 6f 6e 5f 62  |......... icon_b|
00000740  61 72 25 3d a4 69 63 6f  6e 62 61 72 0d 03 c0 04  |ar%=.iconbar....|
00000750  0d 03 ca 24 20 c8 99 20  73 65 74 63 61 72 65 74  |...$ .. setcaret|
00000760  25 2c 6d 61 69 6e 5f 77  25 2c 2d 31 2c 30 2c 31  |%,main_w%,-1,0,1|
00000770  30 2c 31 30 0d 03 d4 04  0d 03 de 17 20 c8 99 20  |0,10........ .. |
00000780  22 48 6f 75 72 67 6c 61  73 73 5f 4f 66 66 22 0d  |"Hourglass_Off".|
00000790  03 e8 12 20 ee 20 85 20  f2 65 72 72 6f 72 62 6f  |... . . .errorbo|
000007a0  78 0d 03 f2 04 0d 03 fc  11 20 c8 99 20 64 72 61  |x........ .. dra|
000007b0  67 25 2c 2c 2d 31 0d 04  06 12 20 f2 62 65 67 69  |g%,,-1.... .begi|
000007c0  6e 5f 74 72 79 69 6e 67  0d 04 10 06 20 f5 0d 04  |n_trying.... ...|
000007d0  1a 10 20 20 20 f2 74 72  79 5f 70 6f 6c 6c 0d 04  |..   .try_poll..|
000007e0  24 08 20 fd 20 a3 0d 04  2e 04 0d 04 38 15 20 dd  |$. . .......8. .|
000007f0  f2 6c 6f 61 64 5f 74 65  6d 70 6c 61 74 65 73 0d  |.load_templates.|
00000800  04 42 35 20 de 20 66 6f  6e 74 5f 61 72 72 61 79  |.B5 . font_array|
00000810  25 20 32 35 36 3a e3 74  25 3d 30 b8 32 35 32 88  |% 256:.t%=0.252.|
00000820  34 3a 74 25 21 66 6f 6e  74 5f 61 72 72 61 79 25  |4:t%!font_array%|
00000830  3d 30 3a ed 0d 04 4c 33  20 c8 99 20 22 57 69 6d  |=0:...L3 .. "Wim|
00000840  70 5f 4f 70 65 6e 54 65  6d 70 6c 61 74 65 22 2c  |p_OpenTemplate",|
00000850  2c 22 3c 4f 62 65 79 24  44 69 72 3e 2e 54 65 6d  |,"<Obey$Dir>.Tem|
00000860  70 6c 61 74 65 73 22 0d  04 56 1e 20 de 20 77 69  |plates"..V. . wi|
00000870  6e 64 73 25 20 32 30 30  30 2c 69 6e 64 69 72 25  |nds% 2000,indir%|
00000880  20 31 30 30 30 0d 04 60  16 20 69 6e 64 6c 25 3d  | 1000..`. indl%=|
00000890  69 6e 64 69 72 25 2b 34  30 30 30 0d 04 6a 49 20  |indir%+4000..jI |
000008a0  c8 99 20 22 57 69 6d 70  5f 4c 6f 61 64 54 65 6d  |.. "Wimp_LoadTem|
000008b0  70 6c 61 74 65 22 2c 2c  77 69 6e 64 73 25 2c 69  |plate",,winds%,i|
000008c0  6e 64 69 72 25 2c 69 6e  64 6c 25 2c 2d 31 2c 22  |ndir%,indl%,-1,"|
000008d0  6d 61 69 6e 5f 77 22 2c  30 20 b8 20 2c 2c 69 6e  |main_w",0 . ,,in|
000008e0  64 69 72 25 0d 04 74 2d  20 c8 99 20 22 57 69 6d  |dir%..t- .. "Wim|
000008f0  70 5f 43 72 65 61 74 65  57 69 6e 64 6f 77 22 2c  |p_CreateWindow",|
00000900  2c 77 69 6e 64 73 25 20  b8 20 6d 61 69 6e 5f 77  |,winds% . main_w|
00000910  25 0d 04 7e 57 20 c8 99  20 22 57 69 6d 70 5f 4c  |%..~W .. "Wimp_L|
00000920  6f 61 64 54 65 6d 70 6c  61 74 65 22 2c 2c 77 69  |oadTemplate",,wi|
00000930  6e 64 73 25 2c 69 6e 64  69 72 25 2c 69 6e 64 6c  |nds%,indir%,indl|
00000940  25 2c 66 6f 6e 74 5f 61  72 72 61 79 25 2c 22 70  |%,font_array%,"p|
00000950  61 67 65 6c 69 73 74 5f  77 63 22 2c 30 20 b8 20  |agelist_wc",0 . |
00000960  2c 2c 69 6e 64 69 72 25  0d 04 88 32 20 c8 99 20  |,,indir%...2 .. |
00000970  22 57 69 6d 70 5f 43 72  65 61 74 65 57 69 6e 64  |"Wimp_CreateWind|
00000980  6f 77 22 2c 2c 77 69 6e  64 73 25 20 b8 20 70 61  |ow",,winds% . pa|
00000990  67 65 6c 69 73 74 5f 77  63 25 0d 04 92 53 20 c8  |gelist_wc%...S .|
000009a0  99 20 22 57 69 6d 70 5f  4c 6f 61 64 54 65 6d 70  |. "Wimp_LoadTemp|
000009b0  6c 61 74 65 22 2c 2c 77  69 6e 64 73 25 2c 69 6e  |late",,winds%,in|
000009c0  64 69 72 25 2c 69 6e 64  6c 25 2c 66 6f 6e 74 5f  |dir%,indl%,font_|
000009d0  61 72 72 61 79 25 2c 22  70 72 69 6e 74 5f 77 22  |array%,"print_w"|
000009e0  2c 30 20 b8 20 2c 2c 69  6e 64 69 72 25 0d 04 9c  |,0 . ,,indir%...|
000009f0  2e 20 c8 99 20 22 57 69  6d 70 5f 43 72 65 61 74  |. .. "Wimp_Creat|
00000a00  65 57 69 6e 64 6f 77 22  2c 2c 77 69 6e 64 73 25  |eWindow",,winds%|
00000a10  20 b8 20 70 72 69 6e 74  5f 77 25 0d 04 a6 47 20  | . print_w%...G |
00000a20  c8 99 20 22 57 69 6d 70  5f 4c 6f 61 64 54 65 6d  |.. "Wimp_LoadTem|
00000a30  70 6c 61 74 65 22 2c 2c  77 69 6e 64 73 25 2c 69  |plate",,winds%,i|
00000a40  6e 64 69 72 25 2c 69 6e  64 6c 25 2c 2d 31 2c 22  |ndir%,indl%,-1,"|
00000a50  69 6e 66 6f 22 2c 30 20  b8 20 2c 2c 69 6e 64 69  |info",0 . ,,indi|
00000a60  72 25 0d 04 b0 2b 20 c8  99 20 22 57 69 6d 70 5f  |r%...+ .. "Wimp_|
00000a70  43 72 65 61 74 65 57 69  6e 64 6f 77 22 2c 2c 77  |CreateWindow",,w|
00000a80  69 6e 64 73 25 20 b8 20  69 6e 66 6f 25 0d 04 ba  |inds% . info%...|
00000a90  1c 20 c8 99 20 22 57 69  6d 70 5f 43 6c 6f 73 65  |. .. "Wimp_Close|
00000aa0  54 65 6d 70 6c 61 74 65  22 0d 04 c4 06 20 e1 0d  |Template".... ..|
00000ab0  04 ce 05 3b 0d 04 d8 13  20 dd f2 6c 6f 61 64 5f  |...;.... ..load_|
00000ac0  6f 70 74 69 6f 6e 73 0d  04 e2 24 20 70 74 72 25  |options...$ ptr%|
00000ad0  3d 8e 28 22 3c 55 6c 74  69 6d 61 70 24 44 69 72  |=.("<Ultimap$Dir|
00000ae0  3e 2e 6f 70 74 69 6f 6e  73 22 29 0d 04 ec 50 20  |>.options")...P |
00000af0  e8 23 70 74 72 25 2c 74  6f 6f 6c 62 6f 78 5f 6f  |.#ptr%,toolbox_o|
00000b00  6e 25 2c 73 63 61 6e 6e  69 6e 67 25 2c 73 63 61  |n%,scanning%,sca|
00000b10  6e 5f 6b 65 79 73 25 2c  73 63 61 6e 5f 74 69 6d  |n_keys%,scan_tim|
00000b20  65 25 2c 6d 65 6e 75 5f  65 6e 61 62 6c 65 64 25  |e%,menu_enabled%|
00000b30  2c 73 6f 75 6e 64 5f 76  6f 6c 25 0d 04 f6 0b 20  |,sound_vol%.... |
00000b40  d9 23 70 74 72 25 0d 05  00 25 20 70 74 72 25 3d  |.#ptr%...% ptr%=|
00000b50  8e 28 22 3c 55 6c 74 69  6d 61 70 24 44 69 72 3e  |.("<Ultimap$Dir>|
00000b60  2e 6d 65 73 73 61 67 65  73 22 29 0d 05 0a 18 20  |.messages").... |
00000b70  e8 23 70 74 72 25 2c 69  6e 66 6f 24 2c 69 6e 66  |.#ptr%,info$,inf|
00000b80  6f 31 24 0d 05 14 0b 20  d9 23 70 74 72 25 0d 05  |o1$.... .#ptr%..|
00000b90  1e 22 20 f2 73 65 74 5f  69 63 6f 6e 5f 74 65 78  |." .set_icon_tex|
00000ba0  74 28 69 6e 66 6f 25 2c  31 2c 69 6e 66 6f 24 29  |t(info%,1,info$)|
00000bb0  0d 05 28 23 20 f2 73 65  74 5f 69 63 6f 6e 5f 74  |..(# .set_icon_t|
00000bc0  65 78 74 28 69 6e 66 6f  25 2c 32 2c 69 6e 66 6f  |ext(info%,2,info|
00000bd0  31 24 29 0d 05 32 06 20  e1 0d 05 3c 04 0d 05 46  |1$)..2. ...<...F|
00000be0  04 0d 05 50 0d dd 20 f2  66 69 6e 69 73 68 0d 05  |...P.. .finish..|
00000bf0  5a 14 20 c8 99 20 73 65  74 63 61 72 65 74 25 2c  |Z. .. setcaret%,|
00000c00  2d 31 0d 05 64 10 20 f2  6c 6f 73 65 5f 66 6f 6e  |-1..d. .lose_fon|
00000c10  74 73 0d 05 6e 2e 20 c8  99 20 22 57 69 6d 70 5f  |ts..n. .. "Wimp_|
00000c20  43 6c 6f 73 65 44 6f 77  6e 22 2c 74 61 73 6b 5f  |CloseDown",task_|
00000c30  68 61 6e 64 6c 65 25 2c  21 74 61 73 6b 69 64 25  |handle%,!taskid%|
00000c40  0d 05 78 11 20 c8 99 20  22 4f 53 5f 45 78 69 74  |..x. .. "OS_Exit|
00000c50  22 0d 05 82 05 e1 0d 05  8c 04 0d 05 96 14 20 dd  |"............. .|
00000c60  f2 72 65 64 72 61 77 5f  77 69 6e 64 6f 77 0d 05  |.redraw_window..|
00000c70  a0 1c 20 c8 99 20 72 65  64 72 61 77 77 25 2c 2c  |.. .. redraww%,,|
00000c80  71 25 20 b8 20 6d 6f 72  65 25 0d 05 aa 0d 20 c8  |q% . more%.... .|
00000c90  95 20 6d 6f 72 65 25 0d  05 b4 2d 20 20 20 6f 66  |. more%...-   of|
00000ca0  66 78 25 3d 28 71 25 21  34 2d 71 25 21 32 30 29  |fx%=(q%!4-q%!20)|
00000cb0  3a 6f 66 66 79 25 3d 28  71 25 21 31 36 2d 71 25  |:offy%=(q%!16-q%|
00000cc0  21 32 34 29 0d 05 be 0f  20 20 20 c8 8e 20 21 71  |!24)....   .. !q|
00000cd0  25 20 ca 0d 05 c8 5c 20  20 20 20 20 c9 20 6d 61  |% ....\     . ma|
00000ce0  69 6e 5f 77 25 3a f2 64  72 61 77 5f 6d 61 69 6e  |in_w%:.draw_main|
00000cf0  5f 77 28 71 25 21 32 38  2d 6f 66 66 78 25 2c 71  |_w(q%!28-offx%,q|
00000d00  25 21 33 32 2d 6f 66 66  79 25 2c 71 25 21 33 36  |%!32-offy%,q%!36|
00000d10  2d 6f 66 66 78 25 2c 71  25 21 34 30 2d 6f 66 66  |-offx%,q%!40-off|
00000d20  79 25 2c 6f 66 66 78 25  2c 6f 66 66 79 25 29 0d  |y%,offx%,offy%).|
00000d30  05 d2 5a 20 20 20 20 20  c9 20 70 61 67 65 6c 69  |..Z     . pageli|
00000d40  73 74 5f 77 63 25 3a f2  64 72 61 77 5f 70 61 67  |st_wc%:.draw_pag|
00000d50  65 6c 69 73 74 5f 77 63  28 71 25 21 32 38 2d 6f  |elist_wc(q%!28-o|
00000d60  66 66 78 25 2c 71 25 21  33 32 2d 6f 66 66 79 25  |ffx%,q%!32-offy%|
00000d70  2c 71 25 21 33 36 2d 6f  66 66 78 25 2c 71 25 21  |,q%!36-offx%,q%!|
00000d80  34 30 2d 6f 66 66 79 25  29 0d 05 dc 08 20 20 20  |40-offy%)....   |
00000d90  cb 0d 05 e6 1b 20 20 20  c8 99 20 67 65 74 72 25  |.....   .. getr%|
00000da0  2c 2c 71 25 20 b8 20 6d  6f 72 65 25 0d 05 f0 06  |,,q% . more%....|
00000db0  20 ce 0d 05 fa 06 20 e1  0d 06 04 04 0d 06 0e 16  | ..... .........|
00000dc0  20 dd 20 f2 66 72 6f 6e  74 28 68 61 6e 64 6c 65  | . .front(handle|
00000dd0  25 29 0d 06 18 1d 20 21  71 25 3d 68 61 6e 64 6c  |%).... !q%=handl|
00000de0  65 25 3a c8 99 20 67 65  74 77 25 2c 2c 71 25 0d  |e%:.. getw%,,q%.|
00000df0  06 22 3b 20 f2 6f 70 65  6e 5f 77 69 6e 64 6f 77  |."; .open_window|
00000e00  28 21 71 25 2c 71 25 21  34 2c 71 25 21 38 2c 71  |(!q%,q%!4,q%!8,q|
00000e10  25 21 31 32 2c 71 25 21  31 36 2c 71 25 21 32 30  |%!12,q%!16,q%!20|
00000e20  2c 71 25 21 32 34 2c 2d  31 29 0d 06 2c 06 20 e1  |,q%!24,-1)..,. .|
00000e30  0d 06 36 04 0d 06 40 3d  20 dd 20 f2 6f 70 65 6e  |..6...@= . .open|
00000e40  5f 77 69 6e 64 6f 77 28  68 61 6e 64 6c 65 25 2c  |_window(handle%,|
00000e50  78 25 2c 79 25 2c 78 31  25 2c 79 31 25 2c 73 63  |x%,y%,x1%,y1%,sc|
00000e60  78 25 2c 73 63 79 25 2c  62 68 61 6e 64 6c 65 25  |x%,scy%,bhandle%|
00000e70  29 0d 06 4a 12 20 e7 68  61 6e 64 6c 65 25 3d 2d  |)..J. .handle%=-|
00000e80  31 8c e1 0d 06 54 13 20  71 25 21 32 38 3d 62 68  |1....T. q%!28=bh|
00000e90  61 6e 64 6c 65 25 0d 06  5e 11 20 71 25 21 30 3d  |andle%..^. q%!0=|
00000ea0  68 61 6e 64 6c 65 25 0d  06 68 28 20 71 25 21 34  |handle%..h( q%!4|
00000eb0  3d 78 25 3a 71 25 21 38  3d 79 25 3a 71 25 21 31  |=x%:q%!8=y%:q%!1|
00000ec0  32 3d 78 31 25 3a 71 25  21 31 36 3d 79 31 25 0d  |2=x1%:q%!16=y1%.|
00000ed0  06 72 1a 20 71 25 21 32  30 3d 73 63 78 25 3a 71  |.r. q%!20=scx%:q|
00000ee0  25 21 32 34 3d 73 63 79  25 0d 06 7c 12 20 c8 99  |%!24=scy%..|. ..|
00000ef0  20 6f 70 65 6e 77 25 2c  2c 71 25 0d 06 86 06 20  | openw%,,q%.... |
00000f00  e1 0d 06 90 04 0d 06 9a  04 0d 06 a4 1d 20 dd 20  |............. . |
00000f10  f2 63 6c 6f 73 65 5f 77  69 6e 64 6f 77 28 68 61  |.close_window(ha|
00000f20  6e 64 6c 65 25 29 0d 06  ae 1f 20 21 71 25 3d 68  |ndle%).... !q%=h|
00000f30  61 6e 64 6c 65 25 3a c8  99 20 63 6c 6f 73 65 77  |andle%:.. closew|
00000f40  25 2c 2c 71 25 0d 06 b8  06 20 e1 0d 06 c2 04 0d  |%,,q%.... ......|
00000f50  06 cc 0b dd 20 f2 76 61  72 73 0d 06 d6 10 20 67  |.... .vars.... g|
00000f60  65 74 65 6e 76 25 3d 26  31 30 0d 06 e0 20 20 77  |etenv%=&10...  w|
00000f70  69 6d 70 25 20 20 20 20  3d 20 28 31 3c 3c 31 38  |imp%    = (1<<18|
00000f80  29 20 2b 20 28 33 3c 3c  36 29 0d 06 ea 15 20 63  |) + (3<<6).... c|
00000f90  72 65 61 74 65 77 25 3d  77 69 6d 70 25 2b 31 0d  |reatew%=wimp%+1.|
00000fa0  06 f4 18 20 63 72 65 61  74 65 69 63 6f 6e 25 3d  |... createicon%=|
00000fb0  77 69 6d 70 25 2b 32 0d  06 fe 18 20 64 65 6c 65  |wimp%+2.... dele|
00000fc0  74 65 69 63 6f 6e 25 3d  77 69 6d 70 25 2b 34 0d  |teicon%=wimp%+4.|
00000fd0  07 08 13 20 6f 70 65 6e  77 25 3d 77 69 6d 70 25  |... openw%=wimp%|
00000fe0  2b 35 0d 07 12 14 20 63  6c 6f 73 65 77 25 3d 77  |+5.... closew%=w|
00000ff0  69 6d 70 25 2b 36 0d 07  1c 12 20 70 6f 6c 6c 25  |imp%+6.... poll%|
00001000  3d 77 69 6d 70 25 2b 37  0d 07 26 15 20 72 65 64  |=wimp%+7..&. red|
00001010  72 61 77 77 25 3d 77 69  6d 70 25 2b 38 0d 07 30  |raww%=wimp%+8..0|
00001020  15 20 75 70 64 61 74 65  77 25 3d 77 69 6d 70 25  |. updatew%=wimp%|
00001030  2b 39 0d 07 3a 13 20 67  65 74 72 25 3d 77 69 6d  |+9..:. getr%=wim|
00001040  70 25 2b 31 30 0d 07 44  13 20 67 65 74 77 25 3d  |p%+10..D. getw%=|
00001050  77 69 6d 70 25 2b 31 31  0d 07 4e 14 20 67 65 74  |wimp%+11..N. get|
00001060  77 69 25 3d 77 69 6d 70  25 2b 31 32 0d 07 58 13  |wi%=wimp%+12..X.|
00001070  20 73 65 74 69 25 3d 77  69 6d 70 25 2b 31 33 0d  | seti%=wimp%+13.|
00001080  07 62 13 20 67 65 74 69  25 3d 77 69 6d 70 25 2b  |.b. geti%=wimp%+|
00001090  31 34 0d 07 6c 13 20 67  65 74 70 25 3d 77 69 6d  |14..l. getp%=wim|
000010a0  70 25 2b 31 35 0d 07 76  13 20 64 72 61 67 25 3d  |p%+15..v. drag%=|
000010b0  77 69 6d 70 25 2b 31 36  0d 07 80 1a 20 66 6f 72  |wimp%+16.... for|
000010c0  63 65 72 65 64 72 61 77  25 3d 77 69 6d 70 25 2b  |ceredraw%=wimp%+|
000010d0  31 37 0d 07 8a 17 20 73  65 74 63 61 72 65 74 25  |17.... setcaret%|
000010e0  3d 77 69 6d 70 25 2b 31  38 0d 07 94 17 20 67 65  |=wimp%+18.... ge|
000010f0  74 63 61 72 65 74 25 3d  77 69 6d 70 25 2b 31 39  |tcaret%=wimp%+19|
00001100  0d 07 9e 19 20 63 72 65  61 74 65 6d 65 6e 75 25  |.... createmenu%|
00001110  3d 77 69 6d 70 25 2b 32  30 0d 07 a8 19 20 73 65  |=wimp%+20.... se|
00001120  74 65 78 74 65 6e 74 25  3d 77 69 6d 70 25 2b 26  |textent%=wimp%+&|
00001130  31 37 0d 07 b2 1a 20 70  72 6f 63 65 73 73 6b 65  |17.... processke|
00001140  79 25 3d 77 69 6d 70 25  2b 26 31 43 0d 07 bc 1b  |y%=wimp%+&1C....|
00001150  20 73 65 6e 64 6d 65 73  73 61 67 65 25 3d 77 69  | sendmessage%=wi|
00001160  6d 70 25 2b 26 32 37 0d  07 c6 19 20 63 72 73 75  |mp%+&27.... crsu|
00001170  62 6d 65 6e 75 25 3d 77  69 6d 70 25 2b 26 32 38  |bmenu%=wimp%+&28|
00001180  0d 07 d0 15 20 70 6c 6f  74 69 63 6f 6e 25 3d 26  |.... ploticon%=&|
00001190  34 30 30 45 32 0d 07 da  04 0d 07 e4 13 20 73 65  |400E2........ se|
000011a0  74 63 6f 6c 25 3d 26 34  30 37 34 33 0d 07 ee 0e  |tcol%=&40743....|
000011b0  20 73 70 6f 70 25 3d 26  32 45 0d 07 f8 15 20 66  | spop%=&2E.... f|
000011c0  69 6e 64 66 6f 6e 74 25  3d 26 34 30 30 38 31 0d  |indfont%=&40081.|
000011d0  08 02 15 20 6c 6f 73 65  66 6f 6e 74 25 3d 26 34  |... losefont%=&4|
000011e0  30 30 38 32 0d 08 0c 15  20 66 6f 6e 74 69 6e 66  |0082.... fontinf|
000011f0  6f 25 3d 26 34 30 30 38  34 0d 08 16 18 20 73 74  |o%=&40084.... st|
00001200  72 69 6e 67 77 69 64 74  68 25 3d 26 34 30 30 38  |ringwidth%=&4008|
00001210  35 0d 08 20 14 20 73 65  74 66 6f 6e 74 25 3d 26  |5.. . setfont%=&|
00001220  34 30 30 38 41 0d 08 2a  18 20 63 75 72 72 65 6e  |4008A..*. curren|
00001230  74 66 6f 6e 74 25 3d 26  34 30 30 38 42 0d 08 34  |tfont%=&4008B..4|
00001240  18 20 63 6f 6e 76 65 72  74 74 6f 6f 73 25 3d 26  |. converttoos%=&|
00001250  34 30 30 38 38 0d 08 3e  1c 20 63 6f 6e 76 65 72  |40088..>. conver|
00001260  74 74 6f 70 6f 69 6e 74  73 25 3d 26 34 30 30 38  |ttopoints%=&4008|
00001270  39 0d 08 48 12 20 70 61  69 6e 74 25 3d 26 34 30  |9..H. paint%=&40|
00001280  30 38 36 0d 08 52 16 20  66 69 6e 64 63 61 72 65  |086..R. findcare|
00001290  74 25 3d 26 34 30 30 38  44 0d 08 5c 15 20 63 68  |t%=&4008D..\. ch|
000012a0  61 72 62 62 6f 78 25 3d  26 34 30 30 38 45 0d 08  |arbbox%=&4008E..|
000012b0  66 04 0d 08 70 13 20 55  62 61 73 65 25 3d 26 31  |f...p. Ubase%=&1|
000012c0  43 30 31 30 30 0d 08 7a  14 20 6e 65 77 66 69 6c  |C0100..z. newfil|
000012d0  65 25 3d 55 62 61 73 65  25 0d 08 84 17 20 6e 65  |e%=Ubase%.... ne|
000012e0  77 73 74 61 63 6b 25 3d  55 62 61 73 65 25 2b 31  |wstack%=Ubase%+1|
000012f0  0d 08 8e 18 20 6b 69 6c  6c 73 74 61 63 6b 25 3d  |.... killstack%=|
00001300  55 62 61 73 65 25 2b 32  0d 08 98 17 20 61 64 64  |Ubase%+2.... add|
00001310  65 6e 74 72 79 25 3d 55  62 61 73 65 25 2b 33 0d  |entry%=Ubase%+3.|
00001320  08 a2 19 20 61 6d 65 6e  64 65 6e 74 72 79 25 3d  |... amendentry%=|
00001330  55 62 61 73 65 25 2b 34  0d 08 ac 18 20 66 69 6e  |Ubase%+4.... fin|
00001340  64 74 6f 6b 65 6e 25 3d  55 62 61 73 65 25 2b 35  |dtoken%=Ubase%+5|
00001350  0d 08 b6 18 20 6b 69 6c  6c 65 6e 74 72 79 25 3d  |.... killentry%=|
00001360  55 62 61 73 65 25 2b 36  0d 08 c0 17 20 6d 6f 76  |Ubase%+6.... mov|
00001370  65 64 61 74 61 25 3d 55  62 61 73 65 25 2b 37 0d  |edata%=Ubase%+7.|
00001380  08 ca 18 20 61 64 64 70  61 63 6b 65 64 25 3d 55  |... addpacked%=U|
00001390  62 61 73 65 25 2b 38 0d  08 d4 17 20 67 65 74 65  |base%+8.... gete|
000013a0  6e 74 72 79 25 3d 55 62  61 73 65 25 2b 39 0d 08  |ntry%=Ubase%+9..|
000013b0  de 1c 20 75 6e 70 61 63  6b 73 70 72 69 74 65 25  |.. unpacksprite%|
000013c0  3d 55 62 61 73 65 25 2b  31 30 0d 08 e8 18 20 6e  |=Ubase%+10.... n|
000013d0  65 6e 74 72 69 65 73 25  3d 55 62 61 73 65 25 2b  |entries%=Ubase%+|
000013e0  31 31 0d 08 f2 19 20 6d  6f 76 65 74 6f 65 6e 64  |11.... movetoend|
000013f0  25 3d 55 62 61 73 65 25  2b 31 32 0d 08 fc 1a 20  |%=Ubase%+12.... |
00001400  72 65 61 64 73 74 61 74  75 73 25 3d 55 62 61 73  |readstatus%=Ubas|
00001410  65 25 2b 31 33 0d 09 06  1b 20 77 72 69 74 65 73  |e%+13.... writes|
00001420  74 61 74 75 73 25 3d 55  62 61 73 65 25 2b 31 34  |tatus%=Ubase%+14|
00001430  0d 09 10 1b 20 72 65 6e  64 65 72 73 68 61 70 65  |.... rendershape|
00001440  25 3d 55 62 61 73 65 25  2b 31 35 0d 09 1a 16 20  |%=Ubase%+15.... |
00001450  67 65 74 6e 74 68 25 3d  55 62 61 73 65 25 2b 31  |getnth%=Ubase%+1|
00001460  37 0d 09 24 1a 20 6c 6f  63 61 74 65 66 69 6c 65  |7..$. locatefile|
00001470  25 3d 55 62 61 73 65 25  2b 31 39 0d 09 2e 19 20  |%=Ubase%+19.... |
00001480  70 6c 61 79 73 6f 75 6e  64 25 3d 55 62 61 73 65  |playsound%=Ubase|
00001490  25 2b 32 30 0d 09 38 04  0d 09 42 0f 20 50 44 25  |%+20..8...B. PD%|
000014a0  3d 26 38 30 31 34 30 0d  09 4c 14 20 50 44 73 65  |=&80140..L. PDse|
000014b0  6c 65 63 74 25 3d 50 44  25 2b 35 0d 09 56 13 20  |lect%=PD%+5..V. |
000014c0  50 44 61 62 6f 72 74 25  3d 50 44 25 2b 39 0d 09  |PDabort%=PD%+9..|
000014d0  60 16 20 50 44 70 61 67  65 73 69 7a 65 25 3d 50  |`. PDpagesize%=P|
000014e0  44 25 2b 33 0d 09 6a 16  20 50 44 67 69 76 65 72  |D%+3..j. PDgiver|
000014f0  65 63 25 3d 50 44 25 2b  31 31 0d 09 74 17 20 50  |ec%=PD%+11..t. P|
00001500  44 64 72 61 77 70 61 67  65 25 3d 50 44 25 2b 31  |Ddrawpage%=PD%+1|
00001510  32 0d 09 7e 15 20 50 44  67 65 74 72 65 63 25 3d  |2..~. PDgetrec%=|
00001520  50 44 25 2b 31 33 0d 09  88 14 20 50 44 65 6e 64  |PD%+13.... PDend|
00001530  6a 6f 62 25 3d 50 44 25  2b 38 0d 09 92 04 0d 09  |job%=PD%+8......|
00001540  9c 08 20 ea 20 85 0d 09  a6 0c 20 ee 20 85 20 ea  |.. . ..... . . .|
00001550  20 e1 0d 09 b0 26 20 c8  99 20 22 4f 53 5f 4d 6f  | ....& .. "OS_Mo|
00001560  64 75 6c 65 22 2c 31 34  2c 22 55 62 61 73 65 25  |dule",14,"Ubase%|
00001570  55 6c 74 69 6d 61 70 22  0d 09 ba 06 20 e1 0d 09  |Ultimap".... ...|
00001580  c4 04 0d 09 ce 12 dd 20  f2 67 65 74 5f 70 6f 69  |....... .get_poi|
00001590  6e 74 65 72 0d 09 d8 10  c8 99 20 67 65 74 70 25  |nter...... getp%|
000015a0  2c 2c 71 25 0d 09 e2 48  6d 6f 75 73 65 78 25 3d  |,,q%...Hmousex%=|
000015b0  21 71 25 3a 6d 6f 75 73  65 79 25 3d 71 25 21 34  |!q%:mousey%=q%!4|
000015c0  3a 62 25 3d 71 25 21 38  3a 68 61 6e 64 6c 65 25  |:b%=q%!8:handle%|
000015d0  3d 71 25 21 31 32 3a 69  63 6f 6e 25 3d 71 25 21  |=q%!12:icon%=q%!|
000015e0  31 36 3a 6f 62 25 3d 71  25 21 32 30 0d 09 ec 05  |16:ob%=q%!20....|
000015f0  e1 0d 09 f6 04 0d 0a 00  0f dd 20 f2 65 72 72 6f  |.......... .erro|
00001600  72 62 6f 78 0d 0a 0a 13  f4 20 53 59 53 20 64 72  |rbox..... SYS dr|
00001610  61 67 25 2c 2c 2d 31 0d  0a 14 34 21 65 72 72 62  |ag%,,-1...4!errb|
00001620  6c 6b 25 3d 9f 3a 74 24  3d f6 24 3a 74 24 3d 22  |lk%=.:t$=.$:t$="|
00001630  28 22 2b c3 9f 2b 22 29  22 2b 74 24 2b 22 20 61  |("+..+")"+t$+" a|
00001640  74 20 6c 69 6e 65 20 22  2b c3 9e 0d 0a 1e 16 24  |t line "+......$|
00001650  28 65 72 72 62 6c 6b 25  2b 34 29 3d 74 24 2b bd  |(errblk%+4)=t$+.|
00001660  30 0d 0a 28 2d c8 99 20  22 57 69 6d 70 5f 52 65  |0..(-.. "Wimp_Re|
00001670  70 6f 72 74 45 72 72 6f  72 22 2c 65 72 72 62 6c  |portError",errbl|
00001680  6b 25 2c 31 2c 22 55 6c  74 69 6d 61 70 22 0d 0a  |k%,1,"Ultimap"..|
00001690  32 14 e7 20 9f 3c 3e 31  20 f2 66 69 6e 69 73 68  |2.. .<>1 .finish|
000016a0  3a e0 0d 0a 3c 3d f4 20  49 46 20 70 72 69 6e 74  |:...<=. IF print|
000016b0  69 6e 67 25 20 70 72 69  6e 74 69 6e 67 25 3d 46  |ing% printing%=F|
000016c0  41 4c 53 45 3a 50 52 4f  43 63 6c 6f 73 65 5f 77  |ALSE:PROCclose_w|
000016d0  69 6e 64 6f 77 28 70 72  69 6e 74 5f 77 25 29 0d  |indow(print_w%).|
000016e0  0a 46 05 e1 0d 0a 50 05  3b 0d 0a 5a 0e 20 dd a4  |.F....P.;..Z. ..|
000016f0  69 63 6f 6e 62 61 72 0d  0a 64 2b 20 21 71 25 3d  |iconbar..d+ !q%=|
00001700  2d 31 3a 71 25 21 34 3d  30 3a 71 25 21 38 3d 30  |-1:q%!4=0:q%!8=0|
00001710  3a 71 25 21 31 32 3d 36  34 3a 71 25 21 31 36 3d  |:q%!12=64:q%!16=|
00001720  36 34 0d 0a 6e 10 20 71  25 21 32 30 3d 26 33 30  |64..n. q%!20=&30|
00001730  30 41 0d 0a 78 1f 20 f2  73 74 72 69 6e 67 30 28  |0A..x. .string0(|
00001740  71 25 2b 32 34 2c 61 70  70 73 70 72 69 74 65 24  |q%+24,appsprite$|
00001750  29 0d 0a 82 27 20 c8 99  20 22 57 69 6d 70 5f 43  |)...' .. "Wimp_C|
00001760  72 65 61 74 65 49 63 6f  6e 22 2c 2c 71 25 20 b8  |reateIcon",,q% .|
00001770  20 68 61 6e 64 6c 65 25  0d 0a 8c 0d 20 3d 68 61  | handle%.... =ha|
00001780  6e 64 6c 65 25 0d 0a 96  05 3b 0d 0a a0 15 20 dd  |ndle%....;.... .|
00001790  f2 73 65 74 5f 69 63 6f  6e 5f 66 6f 6e 74 73 0d  |.set_icon_fonts.|
000017a0  0a aa 31 20 c8 99 20 66  69 6e 64 66 6f 6e 74 25  |..1 .. findfont%|
000017b0  2c 2c 69 63 6f 6e 5f 66  6f 6e 74 24 2c 31 32 2a  |,,icon_font$,12*|
000017c0  31 36 2c 31 32 2a 31 36  20 b8 20 66 6f 6e 74 25  |16,12*16 . font%|
000017d0  0d 0a b4 2e 20 c8 99 20  22 57 69 6d 70 5f 57 68  |.... .. "Wimp_Wh|
000017e0  69 63 68 49 63 6f 6e 22  2c 70 72 69 6e 74 5f 77  |ichIcon",print_w|
000017f0  25 2c 71 25 2c 31 3c 3c  36 2c 31 3c 3c 36 0d 0a  |%,q%,1<<6,1<<6..|
00001800  be 3c 20 74 25 3d 30 3a  f5 3a f2 69 63 6f 6e 5f  |.< t%=0:.:.icon_|
00001810  66 6f 6e 74 28 70 72 69  6e 74 5f 77 25 2c 74 25  |font(print_w%,t%|
00001820  21 71 25 2c 66 6f 6e 74  25 29 3a 74 25 2b 3d 34  |!q%,font%):t%+=4|
00001830  3a fd 74 25 21 71 25 3d  2d 31 0d 0a c8 06 20 e1  |:.t%!q%=-1.... .|
00001840  0d 0a d2 04 0d 0a dc 25  20 dd f2 69 63 6f 6e 5f  |.......% ..icon_|
00001850  66 6f 6e 74 28 77 69 6e  64 6f 77 25 2c 69 63 6f  |font(window%,ico|
00001860  6e 25 2c 66 6f 6e 74 25  29 0d 0a e6 25 20 21 65  |n%,font%)...% !e|
00001870  72 72 62 6c 6b 25 3d 77  69 6e 64 6f 77 25 3a 65  |rrblk%=window%:e|
00001880  72 72 62 6c 6b 25 21 34  3d 69 63 6f 6e 25 0d 0a  |rrblk%!4=icon%..|
00001890  f0 2d 20 65 72 72 62 6c  6b 25 21 31 32 3d 26 46  |.- errblk%!12=&F|
000018a0  46 30 30 30 30 30 30 3a  65 72 72 62 6c 6b 25 21  |F000000:errblk%!|
000018b0  38 3d 66 6f 6e 74 25 3c  3c 32 34 0d 0a fa 19 20  |8=font%<<24.... |
000018c0  66 6f 6e 74 25 3f 66 6f  6e 74 5f 61 72 72 61 79  |font%?font_array|
000018d0  25 2b 3d 31 0d 0b 04 16  20 c8 99 20 73 65 74 69  |%+=1.... .. seti|
000018e0  25 2c 2c 65 72 72 62 6c  6b 25 0d 0b 0e 06 20 e1  |%,,errblk%.... .|
000018f0  0d 0b 18 04 0d 0b 22 11  20 dd f2 6c 6f 73 65 5f  |......". ..lose_|
00001900  66 6f 6e 74 73 0d 0b 2c  31 20 e3 41 25 3d 30 b8  |fonts..,1 .A%=0.|
00001910  32 35 35 3a 6e 25 3d 41  25 3f 66 6f 6e 74 5f 61  |255:n%=A%?font_a|
00001920  72 72 61 79 25 3a 41 25  3f 66 6f 6e 74 5f 61 72  |rray%:A%?font_ar|
00001930  72 61 79 25 3d 30 0d 0b  36 27 20 e7 20 6e 25 3e  |ray%=0..6' . n%>|
00001940  30 20 e3 20 42 25 3d 31  b8 6e 25 3a c8 99 20 6c  |0 . B%=1.n%:.. l|
00001950  6f 73 65 66 6f 6e 74 25  2c 41 25 3a ed 0d 0b 40  |osefont%,A%:...@|
00001960  08 20 ed 3a e1 0d 0b 4a  04 0d 0b 54 14 20 dd f2  |. .:...J...T. ..|
00001970  67 65 74 5f 6d 6f 64 65  5f 69 6e 66 6f 0d 0b 5e  |get_mode_info..^|
00001980  29 20 c8 99 20 22 57 69  6d 70 5f 52 65 61 64 50  |) .. "Wimp_ReadP|
00001990  61 6c 65 74 74 65 22 2c  2c 77 69 6d 70 5f 70 61  |alette",,wimp_pa|
000019a0  6c 65 74 74 65 25 0d 0b  68 2b 20 c8 99 20 22 4f  |lette%..h+ .. "O|
000019b0  53 5f 52 65 61 64 4d 6f  64 65 56 61 72 69 61 62  |S_ReadModeVariab|
000019c0  6c 65 22 2c 2d 31 2c 34  20 b8 20 2c 2c 78 65 66  |le",-1,4 . ,,xef|
000019d0  25 0d 0b 72 2b 20 c8 99  20 22 4f 53 5f 52 65 61  |%..r+ .. "OS_Rea|
000019e0  64 4d 6f 64 65 56 61 72  69 61 62 6c 65 22 2c 2d  |dModeVariable",-|
000019f0  31 2c 35 20 b8 20 2c 2c  79 65 66 25 0d 0b 7c 35  |1,5 . ,,yef%..|5|
00001a00  20 c8 99 20 22 4f 53 5f  52 65 61 64 4d 6f 64 65  | .. "OS_ReadMode|
00001a10  56 61 72 69 61 62 6c 65  22 2c 2d 31 2c 31 31 20  |Variable",-1,11 |
00001a20  b8 20 2c 2c 73 63 72 65  65 6e 5f 77 69 64 74 68  |. ,,screen_width|
00001a30  25 0d 0b 86 36 20 c8 99  20 22 4f 53 5f 52 65 61  |%...6 .. "OS_Rea|
00001a40  64 4d 6f 64 65 56 61 72  69 61 62 6c 65 22 2c 2d  |dModeVariable",-|
00001a50  31 2c 31 32 20 b8 20 2c  2c 73 63 72 65 65 6e 5f  |1,12 . ,,screen_|
00001a60  68 65 69 67 68 74 25 0d  0b 90 4a 20 73 63 72 65  |height%...J scre|
00001a70  65 6e 5f 77 69 64 74 68  25 3d 73 63 72 65 65 6e  |en_width%=screen|
00001a80  5f 77 69 64 74 68 25 3c  3c 78 65 66 25 3a 73 63  |_width%<<xef%:sc|
00001a90  72 65 65 6e 5f 68 65 69  67 68 74 25 3d 73 63 72  |reen_height%=scr|
00001aa0  65 65 6e 5f 68 65 69 67  68 74 25 3c 3c 79 65 66  |een_height%<<yef|
00001ab0  25 0d 0b 9a 06 20 e1 0d  0b a4 04 0d 0b ae 26 20  |%.... ........& |
00001ac0  dd f2 73 74 61 72 74 5f  64 72 61 67 28 74 79 70  |..start_drag(typ|
00001ad0  65 25 2c 78 25 2c 79 25  2c 78 31 25 2c 79 31 25  |e%,x%,y%,x1%,y1%|
00001ae0  29 0d 0b b8 11 20 21 71  25 3d 30 3a 71 25 21 34  |).... !q%=0:q%!4|
00001af0  3d 35 0d 0b c2 29 20 71  25 21 38 3d 78 25 3a 71  |=5...) q%!8=x%:q|
00001b00  25 21 31 32 3d 79 25 3a  71 25 21 31 36 3d 78 31  |%!12=y%:q%!16=x1|
00001b10  25 3a 71 25 21 32 30 3d  79 31 25 0d 0b cc 3d 20  |%:q%!20=y1%...= |
00001b20  71 25 21 32 34 3d 30 3a  71 25 21 32 38 3d 30 3a  |q%!24=0:q%!28=0:|
00001b30  71 25 21 33 32 3d 73 63  72 65 65 6e 5f 77 69 64  |q%!32=screen_wid|
00001b40  74 68 25 3a 71 25 21 33  36 3d 73 63 72 65 65 6e  |th%:q%!36=screen|
00001b50  5f 68 65 69 67 68 74 25  0d 0b d6 11 20 c8 99 20  |_height%.... .. |
00001b60  64 72 61 67 25 2c 2c 71  25 0d 0b e0 15 20 64 72  |drag%,,q%.... dr|
00001b70  61 67 5f 74 79 70 65 25  3d 74 79 70 65 25 0d 0b  |ag_type%=type%..|
00001b80  ea 06 20 e1 0d 0b f4 04  0d 0b fe 6d f4 2d 2d 2d  |.. ........m.---|
00001b90  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00001bf0  2d 2d 2d 2d 2d 0d 0c 08  04 0d 0c 12 2a 20 dd a4  |-----.......* ..|
00001c00  73 74 72 69 6e 67 30 28  74 25 29 3a ea 20 74 24  |string0(t%):. t$|
00001c10  3a 74 24 3d 22 22 3a e7  20 3f 74 25 3c 33 32 3a  |:t$="":. ?t%<32:|
00001c20  3d 22 22 0d 0c 1c 2d 20  f5 3a 74 24 3d 74 24 2b  |=""...- .:t$=t$+|
00001c30  bd 3f 74 25 3a 74 25 2b  3d 31 3a fd 3f 74 25 3c  |.?t%:t%+=1:.?t%<|
00001c40  33 32 20 84 20 a9 74 24  3d 32 35 35 3a 3d 74 24  |32 . .t$=255:=t$|
00001c50  0d 0c 26 04 0d 0c 30 27  20 dd f2 73 74 72 69 6e  |..&...0' ..strin|
00001c60  67 30 28 74 25 2c 74 24  29 3a 24 74 25 3d 74 24  |g0(t%,t$):$t%=t$|
00001c70  3a 74 25 3f a9 74 24 3d  30 3a e1 0d 0c 3a 04 0d  |:t%?.t$=0:...:..|
00001c80  0c 44 6d f4 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |.Dm.------------|
00001c90  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00001ce0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 0d 0c 4e 04  |------------..N.|
00001cf0  0d 0c 58 18 20 dd f2 63  68 65 63 6b 5f 70 61 67  |..X. ..check_pag|
00001d00  65 6c 69 73 74 5f 77 63  0d 0c 62 0e 20 62 75 74  |elist_wc..b. but|
00001d10  25 3d 71 25 21 38 0d 0c  6c 24 20 21 77 73 25 3d  |%=q%!8..l$ !ws%=|
00001d20  70 61 67 65 6c 69 73 74  5f 77 63 25 3a c8 99 20  |pagelist_wc%:.. |
00001d30  67 65 74 77 25 2c 2c 77  73 25 0d 0c 76 2f 20 6f  |getw%,,ws%..v/ o|
00001d40  66 66 78 25 3d 28 77 73  25 21 34 2d 77 73 25 21  |ffx%=(ws%!4-ws%!|
00001d50  32 30 29 3a 6f 66 66 79  25 3d 28 77 73 25 21 31  |20):offy%=(ws%!1|
00001d60  36 2d 77 73 25 21 32 34  29 0d 0c 80 21 20 70 61  |6-ws%!24)...! pa|
00001d70  67 65 25 3d 28 28 28 71  25 21 34 29 2d 6f 66 66  |ge%=(((q%!4)-off|
00001d80  79 25 29 81 2d 34 38 29  2b 31 0d 0c 8a 2e 20 c8  |y%).-48)+1.... .|
00001d90  99 20 6e 65 6e 74 72 69  65 73 25 2c 73 5f 70 61  |. nentries%,s_pa|
00001da0  67 65 73 25 20 b8 20 6e  70 25 3a e7 20 70 61 67  |ges% . np%:. pag|
00001db0  65 25 3e 6e 70 25 20 e1  0d 0c 94 27 20 c8 99 20  |e%>np% ....' .. |
00001dc0  67 65 74 6e 74 68 25 2c  73 5f 70 61 67 65 73 25  |getnth%,s_pages%|
00001dd0  2c 70 61 67 65 25 20 b8  20 2c 70 61 67 65 25 0d  |,page% . ,page%.|
00001de0  0c 9e 18 20 63 75 72 72  65 6e 74 5f 70 61 67 65  |... current_page|
00001df0  25 3d 70 61 67 65 25 0d  0c a8 20 20 f2 61 72 72  |%=page%...  .arr|
00001e00  61 6e 67 65 5f 70 61 67  65 6c 69 73 74 5f 77 63  |ange_pagelist_wc|
00001e10  28 70 61 67 65 25 29 0d  0c b2 11 20 f2 70 72 65  |(page%).... .pre|
00001e20  5f 70 72 6f 63 65 73 73  0d 0c bc 16 20 f2 73 68  |_process.... .sh|
00001e30  6f 77 5f 70 61 67 65 28  70 61 67 65 25 29 0d 0c  |ow_page(page%)..|
00001e40  c6 16 20 e7 20 73 63 61  6e 6e 69 6e 67 25 20 f2  |.. . scanning% .|
00001e50  73 63 61 6e 0d 0c d0 20  20 e7 20 62 75 74 25 80  |scan...  . but%.|
00001e60  34 20 c8 99 20 63 72 65  61 74 65 6d 65 6e 75 25  |4 .. createmenu%|
00001e70  2c 2c 2d 31 0d 0c da 06  20 e1 0d 0c e4 04 0d 0c  |,,-1.... .......|
00001e80  ee 17 20 dd f2 73 68 6f  77 5f 70 61 67 65 28 70  |.. ..show_page(p|
00001e90  61 67 65 25 29 0d 0c f8  18 20 63 75 72 72 65 6e  |age%).... curren|
00001ea0  74 5f 70 61 67 65 25 3d  70 61 67 65 25 0d 0d 02  |t_page%=page%...|
00001eb0  1d 20 21 71 25 3d 6d 61  69 6e 5f 77 25 3a c8 99  |. !q%=main_w%:..|
00001ec0  20 67 65 74 77 25 2c 2c  71 25 0d 0d 0c 41 20 e7  | getw%,,q%...A .|
00001ed0  20 28 71 25 21 33 32 29  20 80 20 28 31 3c 3c 31  | (q%!32) . (1<<1|
00001ee0  36 29 20 c8 99 20 66 6f  72 63 65 72 65 64 72 61  |6) .. forceredra|
00001ef0  77 25 2c 2d 31 2c 71 25  21 34 2c 71 25 21 38 2c  |w%,-1,q%!4,q%!8,|
00001f00  71 25 21 31 32 2c 71 25  21 31 36 0d 0d 16 26 20  |q%!12,q%!16...& |
00001f10  f2 77 69 6e 64 6f 77 5f  74 69 74 6c 65 28 6d 61  |.window_title(ma|
00001f20  69 6e 5f 77 25 2c 66 75  6c 6c 5f 6e 61 6d 65 24  |in_w%,full_name$|
00001f30  29 0d 0d 20 27 20 c8 99  20 67 65 74 65 6e 74 72  |).. ' .. getentr|
00001f40  79 25 2c 73 5f 70 61 67  65 73 25 2c 70 61 67 65  |y%,s_pages%,page|
00001f50  25 20 b8 20 61 64 72 25  0d 0d 2a 23 20 63 75 72  |% . adr%..*# cur|
00001f60  72 65 6e 74 5f 70 61 67  65 24 3d a4 73 74 72 69  |rent_page$=.stri|
00001f70  6e 67 30 28 61 64 72 25  2b 34 29 0d 0d 34 21 20  |ng0(adr%+4)..4! |
00001f80  ff 20 22 73 65 74 20 55  70 61 67 65 20 22 2b 63  |. "set Upage "+c|
00001f90  75 72 72 65 6e 74 5f 70  61 67 65 24 0d 0d 3e 06  |urrent_page$..>.|
00001fa0  20 e1 0d 0d 48 04 0d 0d  52 24 20 dd f2 75 70 64  | ...H...R$ ..upd|
00001fb0  61 74 65 5f 6f 62 6a 65  63 74 28 73 74 61 63 6b  |ate_object(stack|
00001fc0  25 2c 6f 62 6a 65 63 74  25 29 0d 0d 5c 0b 20 ea  |%,object%)..\. .|
00001fd0  20 61 64 72 25 0d 0d 66  27 20 c8 99 20 67 65 74  | adr%..f' .. get|
00001fe0  65 6e 74 72 79 25 2c 73  74 61 63 6b 25 2c 6f 62  |entry%,stack%,ob|
00001ff0  6a 65 63 74 25 20 b8 20  61 64 72 25 0d 0d 70 3c  |ject% . adr%..p<|
00002000  20 c8 99 20 66 6f 72 63  65 72 65 64 72 61 77 25  | .. forceredraw%|
00002010  2c 6d 61 69 6e 5f 77 25  2c 61 64 72 25 21 31 32  |,main_w%,adr%!12|
00002020  2c 61 64 72 25 21 31 36  2c 61 64 72 25 21 32 30  |,adr%!16,adr%!20|
00002030  2c 61 64 72 25 21 32 34  0d 0d 7a 06 20 e1 0d 0d  |,adr%!24..z. ...|
00002040  84 04 0d 0d 8e 30 20 dd  f2 73 65 74 5f 69 63 6f  |.....0 ..set_ico|
00002050  6e 5f 73 74 61 74 65 28  77 69 6e 64 6f 77 25 2c  |n_state(window%,|
00002060  69 63 6f 6e 25 2c 65 6f  72 25 2c 63 6c 65 61 72  |icon%,eor%,clear|
00002070  25 29 0d 0d 98 58 20 21  65 72 72 62 6c 6b 25 3d  |%)...X !errblk%=|
00002080  77 69 6e 64 6f 77 25 3a  65 72 72 62 6c 6b 25 21  |window%:errblk%!|
00002090  34 3d 69 63 6f 6e 25 3a  65 72 72 62 6c 6b 25 21  |4=icon%:errblk%!|
000020a0  38 3d 65 6f 72 25 3a 65  72 72 62 6c 6b 25 21 31  |8=eor%:errblk%!1|
000020b0  32 3d 63 6c 65 61 72 25  3a c8 99 20 73 65 74 69  |2=clear%:.. seti|
000020c0  25 2c 2c 65 72 72 62 6c  6b 25 0d 0d a2 06 20 e1  |%,,errblk%.... .|
000020d0  0d 0d ac 04 0d 0d b6 20  20 dd a4 69 63 6f 6e 5f  |.......  ..icon_|
000020e0  73 74 61 74 65 28 77 69  6e 64 6f 77 25 2c 69 63  |state(window%,ic|
000020f0  6f 6e 25 29 0d 0d c0 43  20 21 65 72 72 62 6c 6b  |on%)...C !errblk|
00002100  25 3d 77 69 6e 64 6f 77  25 3a 65 72 72 62 6c 6b  |%=window%:errblk|
00002110  25 21 34 3d 69 63 6f 6e  25 3a c8 99 20 67 65 74  |%!4=icon%:.. get|
00002120  69 25 2c 2c 65 72 72 62  6c 6b 25 3a 3d 65 72 72  |i%,,errblk%:=err|
00002130  62 6c 6b 25 21 32 34 0d  0d ca 04 0d 0d d4 2a 20  |blk%!24.......* |
00002140  dd 20 f2 73 65 74 5f 69  63 6f 6e 5f 74 65 78 74  |. .set_icon_text|
00002150  28 77 69 6e 64 6f 77 25  2c 69 63 6f 6e 25 2c 74  |(window%,icon%,t|
00002160  65 78 74 24 29 0d 0d de  37 20 21 65 72 72 62 6c  |ext$)...7 !errbl|
00002170  6b 25 3d 77 69 6e 64 6f  77 25 3a 65 72 72 62 6c  |k%=window%:errbl|
00002180  6b 25 21 34 3d 69 63 6f  6e 25 3a c8 99 20 67 65  |k%!4=icon%:.. ge|
00002190  74 69 25 2c 2c 65 72 72  62 6c 6b 25 0d 0d e8 30  |ti%,,errblk%...0|
000021a0  20 f2 73 74 72 69 6e 67  30 28 65 72 72 62 6c 6b  | .string0(errblk|
000021b0  25 21 32 38 2c c0 74 65  78 74 24 2c 28 65 72 72  |%!28,.text$,(err|
000021c0  62 6c 6b 25 21 33 36 29  2d 31 29 29 0d 0d f2 2f  |blk%!36)-1)).../|
000021d0  20 65 72 72 62 6c 6b 25  21 38 3d 30 3a 65 72 72  | errblk%!8=0:err|
000021e0  62 6c 6b 25 21 31 32 3d  30 3a c8 99 20 73 65 74  |blk%!12=0:.. set|
000021f0  69 25 2c 2c 65 72 72 62  6c 6b 25 0d 0d fc 06 20  |i%,,errblk%.... |
00002200  e1 0d 0e 06 04 0d 0e 10  29 20 dd a4 6c 65 61 66  |........) ..leaf|
00002210  28 6e 61 6d 65 24 29 3a  e7 20 a7 6e 61 6d 65 24  |(name$):. .name$|
00002220  2c 22 2e 22 29 3d 30 3a  3d 6e 61 6d 65 24 0d 0e  |,".")=0:=name$..|
00002230  1a 26 20 f5 6e 61 6d 65  24 3d c2 6e 61 6d 65 24  |.& .name$=.name$|
00002240  2c a9 6e 61 6d 65 24 2d  a7 6e 61 6d 65 24 2c 22  |,.name$-.name$,"|
00002250  2e 22 29 29 0d 0e 24 1a  20 fd a7 6e 61 6d 65 24  |."))..$. ..name$|
00002260  2c 22 2e 22 29 3d 30 3a  3d 6e 61 6d 65 24 0d 0e  |,".")=0:=name$..|
00002270  2e 04 0d 0e 38 26 20 dd  f2 73 74 61 72 74 5f 64  |....8& ..start_d|
00002280  72 61 67 28 74 79 70 65  25 2c 78 25 2c 79 25 2c  |rag(type%,x%,y%,|
00002290  78 31 25 2c 79 31 25 29  0d 0e 42 11 20 21 71 25  |x1%,y1%)..B. !q%|
000022a0  3d 30 3a 71 25 21 34 3d  35 0d 0e 4c 29 20 71 25  |=0:q%!4=5..L) q%|
000022b0  21 38 3d 78 25 3a 71 25  21 31 32 3d 79 25 3a 71  |!8=x%:q%!12=y%:q|
000022c0  25 21 31 36 3d 78 31 25  3a 71 25 21 32 30 3d 79  |%!16=x1%:q%!20=y|
000022d0  31 25 0d 0e 56 3d 20 71  25 21 32 34 3d 30 3a 71  |1%..V= q%!24=0:q|
000022e0  25 21 32 38 3d 30 3a 71  25 21 33 32 3d 73 63 72  |%!28=0:q%!32=scr|
000022f0  65 65 6e 5f 77 69 64 74  68 25 3a 71 25 21 33 36  |een_width%:q%!36|
00002300  3d 73 63 72 65 65 6e 5f  68 65 69 67 68 74 25 0d  |=screen_height%.|
00002310  0e 60 11 20 c8 99 20 64  72 61 67 25 2c 2c 71 25  |.`. .. drag%,,q%|
00002320  0d 0e 6a 15 20 64 72 61  67 5f 74 79 70 65 25 3d  |..j. drag_type%=|
00002330  74 79 70 65 25 0d 0e 74  06 20 e1 0d 0e 7e 04 0d  |type%..t. ...~..|
00002340  0e 88 0f 20 dd f2 72 61  6d 66 65 74 63 68 0d 0e  |... ..ramfetch..|
00002350  92 12 20 44 4d 54 5f 72  65 66 25 3d 71 25 21 34  |.. DMT_ref%=q%!4|
00002360  0d 0e 9c 0f 20 44 4d 54  25 3d 71 25 21 32 30 0d  |.... DMT%=q%!20.|
00002370  0e a6 13 20 44 4d 54 5f  6c 65 6e 25 3d 71 25 21  |... DMT_len%=q%!|
00002380  32 34 0d 0e b0 14 20 c8  8e 20 66 69 6c 65 5f 74  |24.... .. file_t|
00002390  79 70 65 25 20 ca 0d 0e  ba 3e 20 20 20 c9 20 26  |ype% ....>   . &|
000023a0  41 46 46 2c 26 46 46 39  3a f2 73 61 76 65 5f 70  |AFF,&FF9:.save_p|
000023b0  69 63 74 75 72 65 28 64  72 61 67 5f 70 74 79 70  |icture(drag_ptyp|
000023c0  65 25 2c 64 72 61 67 5f  70 69 63 74 75 72 65 25  |e%,drag_picture%|
000023d0  2c 22 22 29 0d 0e c4 2a  20 20 20 c9 20 26 46 46  |,"")...*   . &FF|
000023e0  46 3a f2 73 61 76 65 5f  74 65 78 74 28 64 72 61  |F:.save_text(dra|
000023f0  67 5f 70 69 63 74 75 72  65 25 2c 22 22 29 0d 0e  |g_picture%,"")..|
00002400  ce 29 20 20 20 c9 20 26  44 33 43 3a f2 73 61 76  |.)   . &D3C:.sav|
00002410  65 5f 73 6f 75 6e 64 28  64 72 61 67 5f 73 6f 75  |e_sound(drag_sou|
00002420  6e 64 25 2c 22 22 29 0d  0e d8 06 20 cb 0d 0e e2  |nd%,"").... ....|
00002430  06 20 e1 0d 0e ec 04 0d  0e f6 12 20 dd f2 64 61  |. ......... ..da|
00002440  74 61 73 61 76 65 61 63  6b 0d 0f 00 16 20 e7 20  |tasaveack.... . |
00002450  71 25 21 31 32 3c 3e 6d  79 72 65 66 25 20 e1 0d  |q%!12<>myref% ..|
00002460  0f 0a 0b 20 44 4d 54 25  3d 30 0d 0f 14 12 20 66  |... DMT%=0.... f|
00002470  5f 74 79 70 65 25 3d 71  25 21 34 30 0d 0f 1e 11  |_type%=q%!40....|
00002480  20 c8 8e 20 66 5f 74 79  70 65 25 20 ca 0d 0f 28  | .. f_type% ...(|
00002490  4b 20 20 20 c9 20 26 41  46 46 2c 26 46 46 39 3a  |K   . &AFF,&FF9:|
000024a0  f2 73 61 76 65 5f 70 69  63 74 75 72 65 28 64 72  |.save_picture(dr|
000024b0  61 67 5f 70 74 79 70 65  25 2c 64 72 61 67 5f 70  |ag_ptype%,drag_p|
000024c0  69 63 74 75 72 65 25 2c  a4 73 74 72 69 6e 67 30  |icture%,.string0|
000024d0  28 71 25 2b 34 34 29 29  0d 0f 32 36 20 20 20 c9  |(q%+44))..26   .|
000024e0  20 26 44 33 43 3a f2 73  61 76 65 5f 73 6f 75 6e  | &D3C:.save_soun|
000024f0  64 28 64 72 61 67 5f 73  6f 75 6e 64 25 2c a4 73  |d(drag_sound%,.s|
00002500  74 72 69 6e 67 30 28 71  25 2b 34 34 29 29 0d 0f  |tring0(q%+44))..|
00002510  3c 37 20 20 20 c9 20 26  46 46 46 3a f2 73 61 76  |<7   . &FFF:.sav|
00002520  65 5f 74 65 78 74 28 64  72 61 67 5f 70 69 63 74  |e_text(drag_pict|
00002530  75 72 65 25 2c a4 73 74  72 69 6e 67 30 28 71 25  |ure%,.string0(q%|
00002540  2b 34 34 29 29 0d 0f 46  06 20 cb 0d 0f 50 17 20  |+44))..F. ...P. |
00002550  71 25 21 31 32 3d 71 25  21 38 3a 71 25 21 31 36  |q%!12=q%!8:q%!16|
00002560  3d 33 0d 0f 5a 1f 20 c8  99 20 73 65 6e 64 6d 65  |=3..Z. .. sendme|
00002570  73 73 61 67 65 25 2c 31  37 2c 71 25 2c 71 25 21  |ssage%,17,q%,q%!|
00002580  34 0d 0f 64 06 20 e1 0d  0f 6e 04 0d 0f 78 27 20  |4..d. ...n...x' |
00002590  dd f2 73 61 76 65 5f 70  69 63 74 75 72 65 28 74  |..save_picture(t|
000025a0  79 70 65 25 2c 74 6f 6b  65 6e 25 2c 6e 61 6d 65  |ype%,token%,name|
000025b0  24 29 0d 0f 82 0d 20 73  61 76 65 24 3d 22 22 0d  |$).... save$="".|
000025c0  0f 8c 08 20 ea 20 85 0d  0f 96 15 20 ee 20 85 20  |... . ..... . . |
000025d0  ea 3a f7 20 85 3a 85 20  31 2c f6 24 0d 0f a0 13  |.:. .:. 1,.$....|
000025e0  20 e7 20 44 4d 54 5f 70  74 72 25 3d 30 20 8c 0d  | . DMT_ptr%=0 ..|
000025f0  0f aa 18 20 20 20 c8 99  20 22 48 6f 75 72 67 6c  |...   .. "Hourgl|
00002600  61 73 73 5f 4f 6e 22 0d  0f b4 27 20 20 20 c8 99  |ass_On"...'   ..|
00002610  20 67 65 74 65 6e 74 72  79 25 2c 74 79 70 65 25  | getentry%,type%|
00002620  2c 74 6f 6b 65 6e 25 20  b8 20 61 64 72 25 0d 0f  |,token% . adr%..|
00002630  be 16 20 20 20 6c 65 6e  25 3d 28 21 61 64 72 25  |..   len%=(!adr%|
00002640  29 2d 31 36 0d 0f c8 34  20 20 20 c8 99 20 72 65  |)-16...4   .. re|
00002650  61 64 73 74 61 74 75 73  25 2c 74 79 70 65 25 2c  |adstatus%,type%,|
00002660  74 6f 6b 65 6e 25 20 b8  20 6c 25 3a e7 20 6c 25  |token% . l%:. l%|
00002670  20 6c 65 6e 25 3d 6c 25  0d 0f d2 0f 20 20 20 61  | len%=l%....   a|
00002680  64 72 25 2b 3d 31 36 0d  0f dc 1b 20 20 20 e7 20  |dr%+=16....   . |
00002690  74 79 70 65 25 3d 73 5f  73 70 72 69 74 65 73 25  |type%=s_sprites%|
000026a0  20 8c 0d 0f e6 2e 20 20  20 20 20 c8 99 20 67 65  | .....     .. ge|
000026b0  74 65 6e 74 72 79 25 2c  73 5f 73 70 72 69 74 65  |tentry%,s_sprite|
000026c0  73 25 2c 74 6f 6b 65 6e  25 20 b8 20 61 64 72 25  |s%,token% . adr%|
000026d0  0d 0f f0 1f 20 20 20 20  20 e7 20 21 61 64 72 25  |....     . !adr%|
000026e0  3d 28 61 64 72 25 21 31  36 29 2b 31 36 20 8c 0d  |=(adr%!16)+16 ..|
000026f0  0f fa 21 20 20 20 20 20  20 20 73 61 76 65 24 3d  |..!       save$=|
00002700  a4 73 74 72 69 6e 67 30  28 61 64 72 25 2b 34 29  |.string0(adr%+4)|
00002710  0d 10 04 2b 20 20 20 20  20 20 20 61 64 72 25 21  |...+       adr%!|
00002720  34 3d 31 3a 61 64 72 25  21 38 3d 31 36 3a 61 64  |4=1:adr%!8=16:ad|
00002730  72 25 21 31 32 3d 21 61  64 72 25 0d 10 0e 20 20  |r%!12=!adr%...  |
00002740  20 20 20 20 20 20 6c 65  6e 25 3d 21 61 64 72 25  |      len%=!adr%|
00002750  2b 31 32 3a 61 64 72 25  2b 3d 34 0d 10 18 0a 20  |+12:adr%+=4.... |
00002760  20 20 20 20 cc 0d 10 22  39 20 20 20 20 20 20 20  |    ..."9       |
00002770  c8 99 20 75 6e 70 61 63  6b 73 70 72 69 74 65 25  |.. unpacksprite%|
00002780  2c 73 5f 73 70 72 69 74  65 73 25 2c 74 6f 6b 65  |,s_sprites%,toke|
00002790  6e 25 2c 73 70 72 69 74  65 73 25 2b 31 32 0d 10  |n%,sprites%+12..|
000027a0  2c 16 20 20 20 20 20 20  20 21 73 70 72 69 74 65  |,.       !sprite|
000027b0  73 25 3d 31 0d 10 36 18  20 20 20 20 20 20 20 73  |s%=1..6.       s|
000027c0  70 72 69 74 65 73 25 21  34 3d 31 36 0d 10 40 26  |prites%!4=16..@&|
000027d0  20 20 20 20 20 20 20 73  70 72 69 74 65 73 25 21  |       sprites%!|
000027e0  38 3d 28 73 70 72 69 74  65 73 25 21 31 32 29 2b  |8=(sprites%!12)+|
000027f0  31 36 0d 10 4a 1a 20 20  20 20 20 20 20 6c 65 6e  |16..J.       len|
00002800  25 3d 73 70 72 69 74 65  73 25 21 38 0d 10 54 18  |%=sprites%!8..T.|
00002810  20 20 20 20 20 20 20 61  64 72 25 3d 73 70 72 69  |       adr%=spri|
00002820  74 65 73 25 0d 10 5e 0a  20 20 20 20 20 cd 0d 10  |tes%..^.     ...|
00002830  68 18 20 20 20 20 20 66  69 6c 65 5f 74 79 70 65  |h.     file_type|
00002840  25 3d 26 46 46 39 0d 10  72 08 20 20 20 cc 0d 10  |%=&FF9..r.   ...|
00002850  7c 18 20 20 20 20 20 66  69 6c 65 5f 74 79 70 65  ||.     file_type|
00002860  25 3d 26 41 46 46 0d 10  86 08 20 20 20 cd 0d 10  |%=&AFF....   ...|
00002870  90 16 20 20 20 44 4d 54  5f 6d 79 6c 65 6e 25 3d  |..   DMT_mylen%=|
00002880  6c 65 6e 25 0d 10 9a 15  20 20 20 44 4d 54 5f 64  |len%....   DMT_d|
00002890  61 74 61 25 3d 61 64 72  25 0d 10 a4 06 20 cd 0d  |ata%=adr%.... ..|
000028a0  10 ae 2c 20 f2 73 61 76  65 5f 73 6c 61 76 65 28  |.., .save_slave(|
000028b0  6e 61 6d 65 24 2c 61 64  72 25 2c 6c 65 6e 25 2c  |name$,adr%,len%,|
000028c0  66 69 6c 65 5f 74 79 70  65 25 29 0d 10 b8 12 20  |file_type%).... |
000028d0  e7 20 73 61 76 65 24 3c  3e 22 22 20 8c 0d 10 c2  |. save$<>"" ....|
000028e0  2c 20 20 20 c8 99 20 67  65 74 65 6e 74 72 79 25  |,   .. getentry%|
000028f0  2c 73 5f 73 70 72 69 74  65 73 25 2c 74 6f 6b 65  |,s_sprites%,toke|
00002900  6e 25 20 b8 20 61 64 72  25 0d 10 cc 1d 20 20 20  |n% . adr%....   |
00002910  f2 73 74 72 69 6e 67 30  28 61 64 72 25 2b 34 2c  |.string0(adr%+4,|
00002920  73 61 76 65 24 29 0d 10  d6 06 20 cd 0d 10 e0 06  |save$).... .....|
00002930  20 e1 0d 10 ea 04 0d 10  f4 1f 20 dd f2 73 61 76  | ......... ..sav|
00002940  65 5f 73 6f 75 6e 64 28  73 6f 75 6e 64 25 2c 6e  |e_sound(sound%,n|
00002950  61 6d 65 24 29 0d 10 fe  08 20 ea 20 85 0d 11 08  |ame$).... . ....|
00002960  15 20 ee 20 85 20 ea 3a  f7 20 85 3a 85 20 31 2c  |. . . .:. .:. 1,|
00002970  f6 24 0d 11 12 13 20 e7  20 44 4d 54 5f 70 74 72  |.$.... . DMT_ptr|
00002980  25 3d 30 20 8c 0d 11 1c  18 20 20 20 c8 99 20 22  |%=0 .....   .. "|
00002990  48 6f 75 72 67 6c 61 73  73 5f 4f 6e 22 0d 11 26  |Hourglass_On"..&|
000029a0  2b 20 20 20 c8 99 20 67  65 74 65 6e 74 72 79 25  |+   .. getentry%|
000029b0  2c 73 5f 73 6f 75 6e 64  73 25 2c 73 6f 75 6e 64  |,s_sounds%,sound|
000029c0  25 20 b8 20 61 64 72 25  0d 11 30 16 20 20 20 6c  |% . adr%..0.   l|
000029d0  65 6e 25 3d 28 21 61 64  72 25 29 2d 32 34 0d 11  |en%=(!adr%)-24..|
000029e0  3a 38 20 20 20 c8 99 20  72 65 61 64 73 74 61 74  |:8   .. readstat|
000029f0  75 73 25 2c 73 5f 73 6f  75 6e 64 73 25 2c 73 6f  |us%,s_sounds%,so|
00002a00  75 6e 64 25 20 b8 20 6c  25 3a e7 20 6c 25 20 6c  |und% . l%:. l% l|
00002a10  65 6e 25 3d 6c 25 0d 11  44 0f 20 20 20 61 64 72  |en%=l%..D.   adr|
00002a20  25 2b 3d 32 34 0d 11 4e  16 20 20 20 44 4d 54 5f  |%+=24..N.   DMT_|
00002a30  6d 79 6c 65 6e 25 3d 6c  65 6e 25 0d 11 58 15 20  |mylen%=len%..X. |
00002a40  20 20 44 4d 54 5f 64 61  74 61 25 3d 61 64 72 25  |  DMT_data%=adr%|
00002a50  0d 11 62 06 20 cd 0d 11  6c 26 20 f2 73 61 76 65  |..b. ...l& .save|
00002a60  5f 73 6c 61 76 65 28 6e  61 6d 65 24 2c 61 64 72  |_slave(name$,adr|
00002a70  25 2c 6c 65 6e 25 2c 26  44 33 43 29 0d 11 76 06  |%,len%,&D3C)..v.|
00002a80  20 e1 0d 11 80 04 0d 11  8a 1d 20 dd f2 73 61 76  | ......... ..sav|
00002a90  65 5f 74 65 78 74 28 74  65 78 74 25 2c 6e 61 6d  |e_text(text%,nam|
00002aa0  65 24 29 0d 11 94 08 20  ea 20 85 0d 11 9e 15 20  |e$).... . ..... |
00002ab0  ee 20 85 20 ea 3a f7 20  85 3a 85 20 31 2c f6 24  |. . .:. .:. 1,.$|
00002ac0  0d 11 a8 26 20 c8 99 20  67 65 74 65 6e 74 72 79  |...& .. getentry|
00002ad0  25 2c 73 5f 74 65 78 74  25 2c 74 65 78 74 25 20  |%,s_text%,text% |
00002ae0  b8 20 61 64 72 25 0d 11  b2 20 20 c8 99 20 6d 6f  |. adr%...  .. mo|
00002af0  76 65 64 61 74 61 25 2c  61 64 72 25 2c 77 73 25  |vedata%,adr%,ws%|
00002b00  2c 21 61 64 72 25 0d 11  bc 17 20 61 64 72 25 3d  |,!adr%.... adr%=|
00002b10  77 73 25 2b 34 3a 74 25  3d 61 64 72 25 0d 11 c6  |ws%+4:t%=adr%...|
00002b20  0b 20 6c 65 6e 25 3d 30  0d 11 d0 06 20 f5 0d 11  |. len%=0.... ...|
00002b30  da 16 20 20 20 e7 20 3f  74 25 3d 31 33 20 3f 74  |..   . ?t%=13 ?t|
00002b40  25 3d 31 30 0d 11 e4 1d  20 20 20 e7 20 3f 74 25  |%=10....   . ?t%|
00002b50  3c 3e 30 20 6c 65 6e 25  2b 3d 31 3a 74 25 2b 3d  |<>0 len%+=1:t%+=|
00002b60  31 0d 11 ee 14 20 fd 3f  74 25 3d 30 20 8b 20 fd  |1.... .?t%=0 . .|
00002b70  3f 74 25 3d 30 0d 11 f8  13 20 e7 20 44 4d 54 5f  |?t%=0.... . DMT_|
00002b80  70 74 72 25 3d 30 20 8c  0d 12 02 18 20 20 20 c8  |ptr%=0 .....   .|
00002b90  99 20 22 48 6f 75 72 67  6c 61 73 73 5f 4f 6e 22  |. "Hourglass_On"|
00002ba0  0d 12 0c 16 20 20 20 44  4d 54 5f 6d 79 6c 65 6e  |....   DMT_mylen|
00002bb0  25 3d 6c 65 6e 25 0d 12  16 15 20 20 20 44 4d 54  |%=len%....   DMT|
00002bc0  5f 64 61 74 61 25 3d 61  64 72 25 0d 12 20 06 20  |_data%=adr%.. . |
00002bd0  cd 0d 12 2a 26 20 f2 73  61 76 65 5f 73 6c 61 76  |...*& .save_slav|
00002be0  65 28 6e 61 6d 65 24 2c  61 64 72 25 2c 6c 65 6e  |e(name$,adr%,len|
00002bf0  25 2c 26 46 46 46 29 0d  12 34 06 20 e1 0d 12 3e  |%,&FFF)..4. ...>|
00002c00  04 0d 12 48 2d 20 dd f2  73 61 76 65 5f 73 6c 61  |...H- ..save_sla|
00002c10  76 65 28 6e 61 6d 65 24  2c 61 64 72 25 2c 6c 65  |ve(name$,adr%,le|
00002c20  6e 25 2c 66 69 6c 65 5f  74 79 70 65 25 29 0d 12  |n%,file_type%)..|
00002c30  52 0d 20 e7 20 44 4d 54  25 20 8c 0d 12 5c 27 20  |R. . DMT% ...\' |
00002c40  20 20 e7 20 44 4d 54 5f  6d 79 6c 65 6e 25 2d 44  |  . DMT_mylen%-D|
00002c50  4d 54 5f 70 74 72 25 3e  44 4d 54 5f 6c 65 6e 25  |MT_ptr%>DMT_len%|
00002c60  20 8c 0d 12 66 14 20 20  20 20 20 6c 25 3d 44 4d  | ...f.     l%=DM|
00002c70  54 5f 6c 65 6e 25 0d 12  70 08 20 20 20 cc 0d 12  |T_len%..p.   ...|
00002c80  7a 1f 20 20 20 20 20 6c  25 3d 44 4d 54 5f 6d 79  |z.     l%=DMT_my|
00002c90  6c 65 6e 25 2d 44 4d 54  5f 70 74 72 25 0d 12 84  |len%-DMT_ptr%...|
00002ca0  1b 20 20 20 20 20 c8 99  20 22 48 6f 75 72 67 6c  |.     .. "Hourgl|
00002cb0  61 73 73 5f 4f 66 66 22  0d 12 8e 08 20 20 20 cd  |ass_Off"....   .|
00002cc0  0d 12 98 4f 20 20 20 c8  99 20 22 57 69 6d 70 5f  |...O   .. "Wimp_|
00002cd0  54 72 61 6e 73 66 65 72  42 6c 6f 63 6b 22 2c 74  |TransferBlock",t|
00002ce0  61 73 6b 5f 68 61 6e 64  6c 65 25 2c 44 4d 54 5f  |ask_handle%,DMT_|
00002cf0  64 61 74 61 25 2b 44 4d  54 5f 70 74 72 25 2c 44  |data%+DMT_ptr%,D|
00002d00  4d 54 5f 72 65 66 25 2c  44 4d 54 25 2c 6c 25 0d  |MT_ref%,DMT%,l%.|
00002d10  12 a2 13 20 20 20 44 4d  54 5f 70 74 72 25 2b 3d  |...   DMT_ptr%+=|
00002d20  6c 25 0d 12 ac 19 20 20  20 71 25 21 31 32 3d 71  |l%....   q%!12=q|
00002d30  25 21 38 3a 71 25 21 31  36 3d 37 0d 12 b6 0f 20  |%!8:q%!16=7.... |
00002d40  20 20 71 25 21 32 34 3d  6c 25 0d 12 c0 35 20 20  |  q%!24=l%...5  |
00002d50  20 c8 99 20 73 65 6e 64  6d 65 73 73 61 67 65 25  | .. sendmessage%|
00002d60  2c 31 38 2c 71 25 2c 71  25 21 34 3a f4 20 73 65  |,18,q%,q%!4:. se|
00002d70  6e 64 20 52 41 4d 20 74  72 61 6e 73 6d 69 74 0d  |nd RAM transmit.|
00002d80  12 ca 06 20 cc 0d 12 d4  2e 20 20 20 20 ff 20 22  |... .....    . "|
00002d90  73 61 76 65 20 22 2b 6e  61 6d 65 24 2b 22 20 22  |save "+name$+" "|
00002da0  2b c3 7e 61 64 72 25 2b  22 20 2b 22 2b c3 7e 6c  |+.~adr%+" +"+.~l|
00002db0  65 6e 25 0d 12 de 2b 20  20 20 20 ff 20 22 53 45  |en%...+    . "SE|
00002dc0  54 54 59 50 45 20 22 2b  6e 61 6d 65 24 2b 22 20  |TTYPE "+name$+" |
00002dd0  22 2b c3 7e 66 69 6c 65  5f 74 79 70 65 25 0d 12  |"+.~file_type%..|
00002de0  e8 1a 20 20 20 20 c8 99  20 22 48 6f 75 72 67 6c  |..    .. "Hourgl|
00002df0  61 73 73 5f 4f 66 66 22  0d 12 f2 06 20 cd 0d 12  |ass_Off".... ...|
00002e00  fc 06 20 e1 0d 13 06 04  0d 13 10 0f 20 dd f2 64  |.. ......... ..d|
00002e10  61 74 61 6c 6f 61 64 0d  13 1a 1f 20 c8 99 20 6d  |ataload.... .. m|
00002e20  6f 76 65 64 61 74 61 25  2c 71 25 2c 6f 6c 64 5f  |ovedata%,q%,old_|
00002e30  71 25 2c 32 35 36 0d 13  24 13 20 c8 8e 20 6f 6c  |q%,256..$. .. ol|
00002e40  64 5f 71 25 21 34 30 20  ca 0d 13 2e 0e 20 20 20  |d_q%!40 .....   |
00002e50  c9 20 26 42 43 33 3a 0d  13 38 45 20 20 20 20 20  |. &BC3:..8E     |
00002e60  e7 20 6f 6c 64 5f 71 25  21 32 30 3d 6d 61 69 6e  |. old_q%!20=main|
00002e70  5f 77 25 20 84 20 28 6f  6c 64 5f 71 25 21 32 30  |_w% . (old_q%!20|
00002e80  3d 2d 32 20 80 20 6f 6c  64 5f 71 25 21 32 34 3d  |=-2 . old_q%!24=|
00002e90  69 63 6f 6e 5f 62 61 72  25 29 20 8c 0d 13 42 1b  |icon_bar%) ...B.|
00002ea0  20 20 20 20 20 20 20 e7  20 6f 6c 64 5f 71 25 21  |       . old_q%!|
00002eb0  31 32 3c 3e 30 20 e1 0d  13 4c 18 20 20 20 20 20  |12<>0 ...L.     |
00002ec0  20 20 e7 20 6d 6f 64 69  66 69 65 64 25 20 8c 0d  |  . modified% ..|
00002ed0  13 56 34 20 20 20 20 20  20 20 20 20 f2 6f 70 65  |.V4         .ope|
00002ee0  6e 5f 71 75 65 72 79 28  22 6c 6f 61 64 22 2b a4  |n_query("load"+.|
00002ef0  73 74 72 69 6e 67 30 28  6f 6c 64 5f 71 25 2b 34  |string0(old_q%+4|
00002f00  34 29 29 0d 13 60 0c 20  20 20 20 20 20 20 cc 0d  |4))..`.       ..|
00002f10  13 6a 2e 20 20 20 20 20  20 20 20 20 f2 6c 6f 61  |.j.         .loa|
00002f20  64 5f 66 69 6c 65 28 a4  73 74 72 69 6e 67 30 28  |d_file(.string0(|
00002f30  6f 6c 64 5f 71 25 2b 34  34 29 2c 31 29 0d 13 74  |old_q%+44),1)..t|
00002f40  54 20 20 20 20 20 20 20  20 20 6f 6c 64 5f 71 25  |T         old_q%|
00002f50  21 31 32 3d 6f 6c 64 5f  71 25 21 38 3a 6f 6c 64  |!12=old_q%!8:old|
00002f60  5f 71 25 21 31 36 3d 34  3a c8 99 20 22 57 69 6d  |_q%!16=4:.. "Wim|
00002f70  70 5f 53 65 6e 64 4d 65  73 73 61 67 65 22 2c 31  |p_SendMessage",1|
00002f80  37 2c 6f 6c 64 5f 71 25  2c 6f 6c 64 5f 71 25 21  |7,old_q%,old_q%!|
00002f90  34 0d 13 7e 0c 20 20 20  20 20 20 20 cd 0d 13 88  |4..~.       ....|
00002fa0  0a 20 20 20 20 20 cd 0d  13 92 06 20 cb 0d 13 9c  |.     ..... ....|
00002fb0  06 20 e1 0d 13 a6 04 0d  13 b0 1e 20 dd f2 6c 6f  |. ......... ..lo|
00002fc0  61 64 5f 66 69 6c 65 28  6e 61 6d 65 24 2c 65 72  |ad_file(name$,er|
00002fd0  72 6f 72 25 29 0d 13 ba  1d 20 74 25 3d 8e 28 6e  |ror%).... t%=.(n|
00002fe0  61 6d 65 24 29 3a 6c 25  3d a2 23 74 25 3a d9 23  |ame$):l%=.#t%:.#|
00002ff0  74 25 0d 13 c4 2f 20 f2  73 65 74 5f 73 6c 6f 74  |t%.../ .set_slot|
00003000  28 93 2b 28 6c 25 81 26  34 30 30 30 29 2a 26 34  |(.+(l%.&4000)*&4|
00003010  30 30 30 2b 26 34 30 30  30 2c 65 72 72 6f 72 25  |000+&4000,error%|
00003020  29 0d 13 ce 10 20 c8 99  20 6e 65 77 66 69 6c 65  |).... .. newfile|
00003030  25 0d 13 d8 2e 20 66 75  6c 6c 5f 6e 61 6d 65 24  |%.... full_name$|
00003040  3d c0 6e 61 6d 65 24 2c  a9 28 6e 61 6d 65 24 29  |=.name$,.(name$)|
00003050  2d a7 6e 61 6d 65 24 2c  22 21 22 29 2d 31 29 0d  |-.name$,"!")-1).|
00003060  13 e2 16 20 c8 99 20 22  48 6f 75 72 67 6c 61 73  |... .. "Hourglas|
00003070  73 5f 4f 6e 22 0d 13 ec  1e 20 ff 20 22 6c 6f 61  |s_On".... . "loa|
00003080  64 20 20 22 2b 6e 61 6d  65 24 2b 22 20 34 30 30  |d  "+name$+" 400|
00003090  30 30 22 0d 13 f6 15 20  76 65 72 73 69 6f 6e 25  |00".... version%|
000030a0  3d 21 26 34 30 30 30 43  0d 14 00 1a 20 c8 99 20  |=!&4000C.... .. |
000030b0  6c 6f 63 61 74 65 66 69  6c 65 25 2c 26 37 38 30  |locatefile%,&780|
000030c0  30 30 0d 14 0a 10 20 6d  6f 64 69 66 69 65 64 25  |00.... modified%|
000030d0  3d 30 0d 14 14 15 20 71  75 65 72 79 5f 73 74 72  |=0.... query_str|
000030e0  69 6e 67 24 3d 22 22 0d  14 1e 13 20 65 64 69 74  |ing$="".... edit|
000030f0  65 64 5f 61 72 65 61 25  3d 30 0d 14 28 57 20 63  |ed_area%=0..(W c|
00003100  75 72 72 65 6e 74 5f 70  61 67 65 25 3d 21 26 34  |urrent_page%=!&4|
00003110  30 30 32 30 3a 74 6f 6f  6c 62 6f 78 5f 6f 6e 25  |0020:toolbox_on%|
00003120  3d 21 26 34 30 30 32 34  3a 6d 65 6e 75 5f 65 6e  |=!&40024:menu_en|
00003130  61 62 6c 65 64 25 3d 21  26 34 30 30 32 38 3a 70  |abled%=!&40028:p|
00003140  61 67 65 5f 73 69 7a 65  25 3d 21 26 34 30 30 32  |age_size%=!&4002|
00003150  43 0d 14 32 50 20 68 5f  73 63 72 6f 6c 6c 25 3d  |C..2P h_scroll%=|
00003160  21 26 34 30 30 36 30 3a  76 5f 73 63 72 6f 6c 6c  |!&40060:v_scroll|
00003170  25 3d 21 26 34 30 30 36  34 3a 74 69 74 6c 65 5f  |%=!&40064:title_|
00003180  62 61 72 25 3d 21 26 34  30 30 36 38 3a 74 6f 67  |bar%=!&40068:tog|
00003190  67 6c 65 5f 69 63 6f 6e  25 3d 21 26 34 30 30 36  |gle_icon%=!&4006|
000031a0  43 0d 14 3c 3c 20 73 63  61 6e 6e 69 6e 67 25 3d  |C..<< scanning%=|
000031b0  21 26 34 30 30 37 30 3a  73 63 61 6e 5f 6b 65 79  |!&40070:scan_key|
000031c0  73 25 3d 21 26 34 30 30  37 34 3a 73 63 61 6e 5f  |s%=!&40074:scan_|
000031d0  74 69 6d 65 25 3d 21 26  34 30 30 37 38 0d 14 46  |time%=!&40078..F|
000031e0  0f 20 f2 73 69 7a 65 5f  70 61 67 65 0d 14 50 15  |. .size_page..P.|
000031f0  20 f2 72 65 64 65 66 69  6e 65 5f 6d 61 69 6e 5f  | .redefine_main_|
00003200  77 0d 14 5a 11 20 f2 6f  70 65 6e 5f 6d 61 69 6e  |w..Z. .open_main|
00003210  5f 77 0d 14 64 10 20 e7  20 21 26 34 30 30 33 30  |_w..d. . !&40030|
00003220  20 8c 0d 14 6e 34 20 20  20 74 25 3d 26 34 30 30  | ...n4   t%=&400|
00003230  33 30 3a 78 25 3d 74 25  21 34 3a 79 25 3d 74 25  |30:x%=t%!4:y%=t%|
00003240  21 38 3a 78 31 25 3d 74  25 21 31 32 3a 79 31 25  |!8:x1%=t%!12:y1%|
00003250  3d 74 25 21 31 36 0d 14  78 3b 20 20 20 e7 20 78  |=t%!16..x;   . x|
00003260  31 25 3e 73 63 72 65 65  6e 5f 77 69 64 74 68 25  |1%>screen_width%|
00003270  20 78 25 3d 78 25 2d 28  78 31 25 2d 78 25 29 3a  | x%=x%-(x1%-x%):|
00003280  78 31 25 3d 73 63 72 65  65 6e 5f 77 69 64 74 68  |x1%=screen_width|
00003290  25 0d 14 82 46 20 20 20  e7 20 79 31 25 2b 34 30  |%...F   . y1%+40|
000032a0  3e 73 63 72 65 65 6e 5f  68 65 69 67 68 74 25 20  |>screen_height% |
000032b0  79 25 3d 79 25 2d 28 79  31 25 2d 79 25 29 2d 34  |y%=y%-(y1%-y%)-4|
000032c0  30 3a 79 31 25 3d 73 63  72 65 65 6e 5f 68 65 69  |0:y1%=screen_hei|
000032d0  67 68 74 25 2d 34 30 0d  14 8c 12 20 20 20 e7 20  |ght%-40....   . |
000032e0  78 25 3c 30 20 78 25 3d  30 0d 14 96 12 20 20 20  |x%<0 x%=0....   |
000032f0  e7 20 79 25 3c 30 20 79  25 3d 30 0d 14 a0 39 20  |. y%<0 y%=0...9 |
00003300  20 20 f2 6f 70 65 6e 5f  77 69 6e 64 6f 77 28 6d  |  .open_window(m|
00003310  61 69 6e 5f 77 25 2c 78  25 2c 79 25 2c 78 31 25  |ain_w%,x%,y%,x1%|
00003320  2c 79 31 25 2c 74 25 21  32 30 2c 74 25 21 32 34  |,y1%,t%!20,t%!24|
00003330  2c 2d 31 29 0d 14 aa 06  20 cd 0d 14 b4 17 20 c8  |,-1).... ..... .|
00003340  99 20 22 48 6f 75 72 67  6c 61 73 73 5f 4f 66 66  |. "Hourglass_Off|
00003350  22 0d 14 be 34 20 c8 99  20 22 4f 53 5f 52 65 61  |"...4 .. "OS_Rea|
00003360  64 56 61 72 56 61 6c 22  2c 22 4f 62 65 79 24 44  |dVarVal","Obey$D|
00003370  69 72 22 2c 6d 61 69 6e  25 2c 31 30 30 30 20 b8  |ir",main%,1000 .|
00003380  20 2c 2c 54 25 0d 14 c8  0f 20 54 25 3f 6d 61 69  | ,,T%.... T%?mai|
00003390  6e 25 3d 30 0d 14 d2 1f  20 66 75 6c 6c 5f 6e 61  |n%=0.... full_na|
000033a0  6d 65 24 3d a4 73 74 72  69 6e 67 30 28 6d 61 69  |me$=.string0(mai|
000033b0  6e 25 29 0d 14 dc 26 20  f2 77 69 6e 64 6f 77 5f  |n%)...& .window_|
000033c0  74 69 74 6c 65 28 6d 61  69 6e 5f 77 25 2c 66 75  |title(main_w%,fu|
000033d0  6c 6c 5f 6e 61 6d 65 24  29 0d 14 e6 21 20 61 70  |ll_name$)...! ap|
000033e0  70 73 70 72 69 74 65 24  3d a4 6c 65 61 66 28 66  |psprite$=.leaf(f|
000033f0  75 6c 6c 5f 6e 61 6d 65  24 29 0d 14 f0 27 20 6d  |ull_name$)...' m|
00003400  65 6e 75 24 3d c2 61 70  70 73 70 72 69 74 65 24  |enu$=.appsprite$|
00003410  2c a9 28 61 70 70 73 70  72 69 74 65 24 29 2d 31  |,.(appsprite$)-1|
00003420  29 0d 14 fa 2c 20 e7 20  a9 6d 65 6e 75 24 3c 31  |)..., . .menu$<1|
00003430  32 20 f5 3a 6d 65 6e 75  24 3d 6d 65 6e 75 24 2b  |2 .:menu$=menu$+|
00003440  bd 30 3a fd a9 6d 65 6e  75 24 3d 31 32 0d 15 04  |.0:..menu$=12...|
00003450  06 20 e1 0d 15 0e 04 0d  15 18 6d f4 2d 2d 2d 2d  |. ........m.----|
00003460  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
000034c0  2d 2d 2d 2d 0d 15 22 04  0d 15 2c 0f 20 dd f2 6e  |----.."...,. ..n|
000034d0  65 77 5f 66 69 6c 65 0d  15 36 19 20 f2 73 65 74  |ew_file..6. .set|
000034e0  5f 73 6c 6f 74 28 93 2b  26 34 30 30 30 2c 32 29  |_slot(.+&4000,2)|
000034f0  0d 15 40 10 20 c8 99 20  6e 65 77 66 69 6c 65 25  |..@. .. newfile%|
00003500  0d 15 4a 10 20 e3 20 74  25 3d 31 20 b8 20 32 30  |..J. . t%=1 . 20|
00003510  0d 15 54 13 20 20 20 c8  99 20 6e 65 77 73 74 61  |..T.   .. newsta|
00003520  63 6b 25 0d 15 5e 06 20  ed 0d 15 68 19 20 66 75  |ck%..^. ...h. fu|
00003530  6c 6c 5f 6e 61 6d 65 24  3d 22 4e 6f 5f 4e 61 6d  |ll_name$="No_Nam|
00003540  65 22 0d 15 72 06 20 e1  0d 15 7c 04 0d 15 86 69  |e"..r. ...|....i|
00003550  f4 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |.---------------|
00003560  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
000035b0  2d 2d 2d 2d 2d 0d 15 90  04 0d 15 9a 20 20 dd f2  |-----.......  ..|
000035c0  6f 70 65 6e 5f 63 65 6e  74 72 65 28 68 61 6e 64  |open_centre(hand|
000035d0  6c 65 25 2c 6f 66 66 25  29 0d 15 a4 1d 20 21 71  |le%,off%).... !q|
000035e0  25 3d 68 61 6e 64 6c 65  25 3a c8 99 20 67 65 74  |%=handle%:.. get|
000035f0  77 25 2c 2c 71 25 0d 15  ae 28 20 77 25 3d 28 71  |w%,,q%...( w%=(q|
00003600  25 21 31 32 29 2d 28 71  25 21 34 29 3a 68 25 3d  |%!12)-(q%!4):h%=|
00003610  28 71 25 21 31 36 29 2d  28 71 25 21 38 29 0d 15  |(q%!16)-(q%!8)..|
00003620  b8 1d 20 77 78 25 3d 73  63 72 65 65 6e 5f 77 69  |.. wx%=screen_wi|
00003630  64 74 68 25 81 32 2d 77  25 81 32 0d 15 c2 1e 20  |dth%.2-w%.2.... |
00003640  77 79 25 3d 73 63 72 65  65 6e 5f 68 65 69 67 68  |wy%=screen_heigh|
00003650  74 25 81 32 2d 68 25 81  32 0d 15 cc 49 20 f2 6f  |t%.2-h%.2...I .o|
00003660  70 65 6e 5f 77 69 6e 64  6f 77 28 68 61 6e 64 6c  |pen_window(handl|
00003670  65 25 2c 77 78 25 2c 77  79 25 2b 6f 66 66 25 2c  |e%,wx%,wy%+off%,|
00003680  77 78 25 2b 77 25 2c 77  79 25 2b 68 25 2b 6f 66  |wx%+w%,wy%+h%+of|
00003690  66 25 2c 71 25 21 32 30  2c 71 25 21 32 34 2c 2d  |f%,q%!20,q%!24,-|
000036a0  31 29 0d 15 d6 06 20 e1  0d 15 e0 04 0d 15 ea 12  |1).... .........|
000036b0  20 dd f2 6f 70 65 6e 5f  6d 61 69 6e 5f 77 0d 15  | ..open_main_w..|
000036c0  f4 1f 20 21 77 73 25 3d  6d 61 69 6e 5f 77 25 3a  |.. !ws%=main_w%:|
000036d0  c8 99 20 67 65 74 77 25  2c 2c 77 73 25 0d 15 fe  |.. getw%,,ws%...|
000036e0  18 20 73 78 25 3d 77 73  25 21 34 3a 73 79 25 3d  |. sx%=ws%!4:sy%=|
000036f0  77 73 25 21 38 0d 16 08  1c 20 73 78 31 25 3d 77  |ws%!8.... sx1%=w|
00003700  73 25 21 31 32 3a 73 79  31 25 3d 77 73 25 21 31  |s%!12:sy1%=ws%!1|
00003710  36 0d 16 12 29 20 73 68  25 3d 73 63 72 65 65 6e  |6...) sh%=screen|
00003720  5f 68 65 69 67 68 74 25  3a 73 77 25 3d 73 63 72  |_height%:sw%=scr|
00003730  65 65 6e 5f 77 69 64 74  68 25 0d 16 1c 16 20 68  |een_width%.... h|
00003740  73 25 3d 30 3a 76 73 25  3d 30 3a 74 62 25 3d 30  |s%=0:vs%=0:tb%=0|
00003750  0d 16 26 17 20 e7 20 68  5f 73 63 72 6f 6c 6c 25  |..&. . h_scroll%|
00003760  20 68 73 25 3d 34 30 0d  16 30 18 20 e7 20 76 5f  | hs%=40..0. . v_|
00003770  73 63 72 6f 6c 6c 25 20  76 73 25 2b 3d 34 30 0d  |scroll% vs%+=40.|
00003780  16 3a 18 20 e7 20 74 69  74 6c 65 5f 62 61 72 25  |.:. . title_bar%|
00003790  20 74 62 25 3d 33 36 0d  16 44 1c 20 77 25 3d 73  | tb%=36..D. w%=s|
000037a0  78 31 25 2d 73 78 25 3a  68 25 3d 73 79 31 25 2d  |x1%-sx%:h%=sy1%-|
000037b0  73 79 25 0d 16 4e 2c 20  e7 20 73 79 31 25 2b 74  |sy%..N, . sy1%+t|
000037c0  62 25 3e 73 68 25 20 73  79 31 25 3d 73 68 25 2d  |b%>sh% sy1%=sh%-|
000037d0  74 62 25 3a 73 79 25 3d  73 79 31 25 2d 68 25 0d  |tb%:sy%=sy1%-h%.|
000037e0  16 58 16 20 e7 20 73 79  25 3c 68 73 25 20 73 79  |.X. . sy%<hs% sy|
000037f0  25 3d 68 73 25 0d 16 62  2c 20 e7 20 73 78 31 25  |%=hs%..b, . sx1%|
00003800  2b 76 73 25 3e 73 77 25  20 73 78 31 25 3d 73 77  |+vs%>sw% sx1%=sw|
00003810  25 2d 76 73 25 3a 73 78  25 3d 73 78 31 25 2d 77  |%-vs%:sx%=sx1%-w|
00003820  25 0d 16 6c 12 20 e7 20  73 78 25 3c 30 20 73 78  |%..l. . sx%<0 sx|
00003830  25 3d 30 0d 16 76 11 20  21 77 73 25 3d 6d 61 69  |%=0..v. !ws%=mai|
00003840  6e 5f 77 25 0d 16 80 0e  20 77 73 25 21 34 3d 73  |n_w%.... ws%!4=s|
00003850  78 25 0d 16 8a 0e 20 77  73 25 21 38 3d 73 79 25  |x%.... ws%!8=sy%|
00003860  0d 16 94 10 20 77 73 25  21 31 32 3d 73 78 31 25  |.... ws%!12=sx1%|
00003870  0d 16 9e 10 20 77 73 25  21 31 36 3d 73 79 31 25  |.... ws%!16=sy1%|
00003880  0d 16 a8 16 20 77 73 25  21 32 30 3d 30 3a 77 73  |.... ws%!20=0:ws|
00003890  25 21 32 34 3d 30 0d 16  b2 0e 20 77 73 25 21 32  |%!24=0.... ws%!2|
000038a0  38 3d 2d 31 0d 16 bc 49  20 f2 6f 70 65 6e 5f 77  |8=-1...I .open_w|
000038b0  69 6e 64 6f 77 28 6d 61  69 6e 5f 77 25 2c 77 73  |indow(main_w%,ws|
000038c0  25 21 34 2c 77 73 25 21  38 2c 77 73 25 21 31 32  |%!4,ws%!8,ws%!12|
000038d0  2c 77 73 25 21 31 36 2c  77 73 25 21 32 30 2c 77  |,ws%!16,ws%!20,w|
000038e0  73 25 21 32 34 2c 77 73  25 21 32 38 29 0d 16 c6  |s%!24,ws%!28)...|
000038f0  1e 20 21 71 25 3d 6d 61  69 6e 5f 77 25 3a c8 99  |. !q%=main_w%:..|
00003900  20 67 65 74 77 25 2c 2c  77 73 25 0d 16 d0 06 20  | getw%,,ws%.... |
00003910  e1 0d 16 da 04 0d 16 e4  69 f4 2d 2d 2d 2d 2d 2d  |........i.------|
00003920  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00003970  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 0d 16  |--------------..|
00003980  ee 04 0d 16 f8 34 20 dd  f2 64 72 61 77 5f 70 69  |.....4 ..draw_pi|
00003990  63 74 75 72 65 28 74 79  70 65 25 2c 74 6f 6b 65  |cture(type%,toke|
000039a0  6e 25 2c 78 25 2c 79 25  2c 77 25 2c 68 25 2c 66  |n%,x%,y%,w%,h%,f|
000039b0  6c 61 67 73 25 29 0d 17  02 4c 20 e7 20 74 79 70  |lags%)...L . typ|
000039c0  65 25 3d 73 5f 64 72 61  77 25 20 78 25 2b 3d 28  |e%=s_draw% x%+=(|
000039d0  31 3c 3c 78 65 66 25 29  3a 79 25 2b 3d 28 31 3c  |1<<xef%):y%+=(1<|
000039e0  3c 79 65 66 25 29 3a 77  25 2d 3d 28 32 3c 3c 78  |<yef%):w%-=(2<<x|
000039f0  65 66 25 29 3a 68 25 2d  3d 28 32 3c 3c 79 65 66  |ef%):h%-=(2<<yef|
00003a00  25 29 0d 17 0c 23 20 c8  99 20 67 65 74 65 6e 74  |%)...# .. getent|
00003a10  72 79 25 2c 74 79 70 65  25 2c 74 6f 6b 65 6e 25  |ry%,type%,token%|
00003a20  20 b8 20 61 25 0d 17 16  2a 20 e7 20 21 61 25 3e  | . a%...* . !a%>|
00003a30  73 70 72 69 74 65 5f 73  69 7a 65 25 2d 32 34 20  |sprite_size%-24 |
00003a40  66 6c 61 67 73 25 3d 66  6c 61 67 73 25 84 38 0d  |flags%=flags%.8.|
00003a50  17 20 38 20 21 65 72 72  62 6c 6b 25 3d 78 25 3a  |. 8 !errblk%=x%:|
00003a60  65 72 72 62 6c 6b 25 21  34 3d 79 25 3a 65 72 72  |errblk%!4=y%:err|
00003a70  62 6c 6b 25 21 38 3d 77  25 3a 65 72 72 62 6c 6b  |blk%!8=w%:errblk|
00003a80  25 21 31 32 3d 68 25 0d  17 2a 3c 20 c8 99 20 72  |%!12=h%..*< .. r|
00003a90  65 6e 64 65 72 73 68 61  70 65 25 2c 74 79 70 65  |endershape%,type|
00003aa0  25 2c 74 6f 6b 65 6e 25  2c 73 70 72 69 74 65 73  |%,token%,sprites|
00003ab0  25 2c 65 72 72 62 6c 6b  25 2c 66 6c 61 67 73 25  |%,errblk%,flags%|
00003ac0  80 31 35 0d 17 34 06 20  e1 0d 17 3e 04 0d 17 48  |.15..4. ...>...H|
00003ad0  69 f4 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |i.--------------|
00003ae0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00003b30  2d 2d 2d 2d 2d 2d 0d 17  52 04 0d 17 5c 23 20 dd  |------..R...\# .|
00003b40  f2 77 69 6e 64 6f 77 5f  74 69 74 6c 65 28 77 69  |.window_title(wi|
00003b50  6e 64 6f 77 25 2c 74 69  74 6c 65 24 29 0d 17 66  |ndow%,title$)..f|
00003b60  18 20 e7 20 77 69 6e 64  6f 77 25 3d 6d 61 69 6e  |. . window%=main|
00003b70  5f 77 25 20 8c 0d 17 70  31 20 20 20 c8 99 20 67  |_w% ...p1   .. g|
00003b80  65 74 65 6e 74 72 79 25  2c 73 5f 70 61 67 65 73  |etentry%,s_pages|
00003b90  25 2c 63 75 72 72 65 6e  74 5f 70 61 67 65 25 20  |%,current_page% |
00003ba0  b8 20 61 64 72 25 0d 17  7a 2b 20 20 20 74 69 74  |. adr%..z+   tit|
00003bb0  6c 65 24 3d 74 69 74 6c  65 24 2b 22 20 2d 20 22  |le$=title$+" - "|
00003bc0  2b a4 73 74 72 69 6e 67  30 28 61 64 72 25 2b 34  |+.string0(adr%+4|
00003bd0  29 0d 17 84 06 20 cd 0d  17 8e 23 20 e7 20 6d 6f  |).... ....# . mo|
00003be0  64 69 66 69 65 64 25 20  74 69 74 6c 65 24 3d 74  |dified% title$=t|
00003bf0  69 74 6c 65 24 2b 22 20  2a 22 0d 17 98 28 20 21  |itle$+" *"...( !|
00003c00  65 72 72 62 6c 6b 25 3d  77 69 6e 64 6f 77 25 3a  |errblk%=window%:|
00003c10  c8 99 20 67 65 74 77 69  25 2c 2c 65 72 72 62 6c  |.. getwi%,,errbl|
00003c20  6b 25 0d 17 a2 20 20 f2  73 74 72 69 6e 67 30 28  |k%...  .string0(|
00003c30  65 72 72 62 6c 6b 25 21  37 36 2c 74 69 74 6c 65  |errblk%!76,title|
00003c40  24 29 0d 17 ac 47 20 c8  99 20 66 6f 72 63 65 72  |$)...G .. forcer|
00003c50  65 64 72 61 77 25 2c 2d  31 2c 65 72 72 62 6c 6b  |edraw%,-1,errblk|
00003c60  25 21 34 2c 28 65 72 72  62 6c 6b 25 21 31 36 29  |%!4,(errblk%!16)|
00003c70  2c 65 72 72 62 6c 6b 25  21 31 32 2c 65 72 72 62  |,errblk%!12,errb|
00003c80  6c 6b 25 21 31 36 2b 33  36 0d 17 b6 06 20 e1 0d  |lk%!16+36.... ..|
00003c90  17 c0 04 0d 17 ca 04 0d  17 d4 04 0d 17 de 69 f4  |..............i.|
00003ca0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00003d00  2d 2d 2d 2d 0d 17 e8 04  0d 17 f2 15 20 dd f2 63  |----........ ..c|
00003d10  68 65 63 6b 5f 69 63 6f  6e 5f 62 61 72 0d 17 fc  |heck_icon_bar...|
00003d20  22 20 6d 78 25 3d 21 71  25 3a 6d 79 25 3d 71 25  |" mx%=!q%:my%=q%|
00003d30  21 34 3a 62 75 74 74 6f  6e 25 3d 71 25 21 38 0d  |!4:button%=q%!8.|
00003d40  18 06 2f 20 e7 20 62 75  74 74 6f 6e 25 20 80 20  |../ . button% . |
00003d50  32 3a f2 64 6f 5f 69 63  6f 6e 5f 62 61 72 5f 6d  |2:.do_icon_bar_m|
00003d60  65 6e 75 28 6d 78 25 2c  6d 79 25 29 3a e1 0d 18  |enu(mx%,my%):...|
00003d70  10 14 20 f2 66 72 6f 6e  74 28 6d 61 69 6e 5f 77  |.. .front(main_w|
00003d80  25 29 0d 18 1a 23 20 c8  99 20 73 65 74 63 61 72  |%)...# .. setcar|
00003d90  65 74 25 2c 6d 61 69 6e  5f 77 25 2c 2d 31 2c 30  |et%,main_w%,-1,0|
00003da0  2c 30 2c 31 30 0d 18 24  06 20 e1 0d 18 2e 04 0d  |,0,10..$. ......|
00003db0  18 38 1e 20 dd f2 64 6f  5f 69 63 6f 6e 5f 62 61  |.8. ..do_icon_ba|
00003dc0  72 5f 6d 65 6e 75 28 78  25 2c 79 25 29 0d 18 42  |r_menu(x%,y%)..B|
00003dd0  2f 20 e7 20 73 63 61 6e  5f 74 69 6d 65 25 3d 30  |/ . scan_time%=0|
00003de0  3a 73 63 61 6e 5f 74 69  6d 65 25 3d 31 30 30 3a  |:scan_time%=100:|
00003df0  73 63 61 6e 5f 6b 65 79  73 25 3d 31 0d 18 4c 1a  |scan_keys%=1..L.|
00003e00  20 e3 20 6f 70 74 25 3d  30 b8 32 88 32 3a 50 25  | . opt%=0.2.2:P%|
00003e10  3d 6d 61 69 6e 25 0d 18  56 0e 20 5b 6f 70 74 20  |=main%..V. [opt |
00003e20  6f 70 74 25 0d 18 60 0d  2e 69 63 6f 6e 6d 65 6e  |opt%..`..iconmen|
00003e30  75 0d 18 6a 0f 20 65 71  75 73 20 6d 65 6e 75 24  |u..j. equs menu$|
00003e40  0d 18 74 29 20 65 71 75  64 20 26 30 37 30 32 30  |..t) equd &07020|
00003e50  37 3a 65 71 75 64 20 32  30 38 3a 65 71 75 64 20  |7:equd 208:equd |
00003e60  34 30 3a 65 71 75 64 20  30 0d 18 7e 25 20 65 71  |40:equd 0..~% eq|
00003e70  75 64 20 30 3a 65 71 75  64 20 69 6e 66 6f 25 3a  |ud 0:equd info%:|
00003e80  65 71 75 64 20 26 30 37  30 30 30 30 32 31 0d 18  |equd &07000021..|
00003e90  88 18 20 65 71 75 73 20  22 49 6e 66 6f 20 20 20  |.. equs "Info   |
00003ea0  20 20 20 20 20 22 0d 18  92 30 20 65 71 75 64 20  |     "...0 equd |
00003eb0  73 63 61 6e 6e 69 6e 67  25 80 31 3a 65 71 75 64  |scanning%.1:equd|
00003ec0  20 69 62 6d 65 6e 75 3a  65 71 75 64 20 26 30 37  | ibmenu:equd &07|
00003ed0  30 30 30 30 32 31 0d 18  9c 18 20 65 71 75 73 20  |000021.... equs |
00003ee0  22 53 63 61 6e 6e 69 6e  67 20 20 20 20 22 0d 18  |"Scanning    "..|
00003ef0  a6 26 20 65 71 75 64 20  30 3a 65 71 75 64 20 73  |.& equd 0:equd s|
00003f00  6f 6d 65 6e 75 3a 65 71  75 64 20 26 30 37 30 30  |omenu:equd &0700|
00003f10  30 30 32 31 0d 18 b0 18  20 65 71 75 73 20 22 53  |0021.... equs "S|
00003f20  6f 75 6e 64 20 76 6f 6c  75 6d 65 22 0d 18 ba 24  |ound volume"...$|
00003f30  20 65 71 75 64 20 26 38  30 3a 65 71 75 64 20 2d  | equd &80:equd -|
00003f40  31 3a 65 71 75 64 20 26  30 37 30 30 30 30 32 31  |1:equd &07000021|
00003f50  0d 18 c4 18 20 65 71 75  73 20 22 51 75 69 74 20  |.... equs "Quit |
00003f60  20 20 20 20 20 20 20 22  0d 18 ce 04 0d 18 d8 0b  |       "........|
00003f70  2e 69 62 6d 65 6e 75 0d  18 e2 1b 20 65 71 75 73  |.ibmenu.... equs|
00003f80  20 22 53 63 61 6e 6e 69  6e 67 22 3a 65 71 75 64  | "Scanning":equd|
00003f90  20 30 0d 18 ec 29 20 65  71 75 64 20 26 30 37 30  | 0...) equd &070|
00003fa0  32 30 37 3a 65 71 75 64  20 32 30 38 3a 65 71 75  |207:equd 208:equ|
00003fb0  64 20 34 30 3a 65 71 75  64 20 30 0d 18 f6 31 20  |d 40:equd 0...1 |
00003fc0  65 71 75 64 20 28 73 63  61 6e 5f 6b 65 79 73 25  |equd (scan_keys%|
00003fd0  3d 32 29 80 31 3a 65 71  75 64 20 2d 31 3a 65 71  |=2).1:equd -1:eq|
00003fe0  75 64 20 26 30 37 30 30  30 30 32 31 0d 19 00 18  |ud &07000021....|
00003ff0  20 65 71 75 73 20 22 54  77 6f 20 73 77 69 74 63  | equs "Two switc|
00004000  68 65 73 22 0d 19 0a 29  20 65 71 75 64 20 26 38  |hes"...) equd &8|
00004010  30 3a 65 71 75 64 20 69  62 6d 65 6e 75 31 3a 65  |0:equd ibmenu1:e|
00004020  71 75 64 20 26 30 37 30  30 30 30 32 31 0d 19 14  |qud &07000021...|
00004030  18 20 65 71 75 73 20 22  53 70 65 65 64 20 20 20  |. equs "Speed   |
00004040  20 20 20 20 22 0d 19 1e  04 0d 19 28 0b 2e 73 6f  |    "......(..so|
00004050  6d 65 6e 75 0d 19 32 18  20 65 71 75 73 20 22 53  |menu..2. equs "S|
00004060  6f 75 6e 64 20 56 6f 6c  75 6d 65 22 0d 19 3c 29  |ound Volume"..<)|
00004070  20 65 71 75 64 20 26 30  37 30 32 30 37 3a 65 71  | equd &070207:eq|
00004080  75 64 20 32 30 38 3a 65  71 75 64 20 34 30 3a 65  |ud 208:equd 40:e|
00004090  71 75 64 20 30 0d 19 46  34 20 65 71 75 64 20 28  |qud 0..F4 equd (|
000040a0  73 6f 75 6e 64 5f 76 6f  6c 25 3d 26 31 30 46 29  |sound_vol%=&10F)|
000040b0  80 31 3a 65 71 75 64 20  2d 31 3a 65 71 75 64 20  |.1:equd -1:equd |
000040c0  26 30 37 30 30 30 30 32  31 0d 19 50 18 20 65 71  |&07000021..P. eq|
000040d0  75 73 20 22 4f 66 66 20  20 20 20 20 20 20 20 20  |us "Off         |
000040e0  22 0d 19 5a 34 20 65 71  75 64 20 28 73 6f 75 6e  |"..Z4 equd (soun|
000040f0  64 5f 76 6f 6c 25 3d 26  31 34 46 29 80 31 3a 65  |d_vol%=&14F).1:e|
00004100  71 75 64 20 2d 31 3a 65  71 75 64 20 26 30 37 30  |qud -1:equd &070|
00004110  30 30 30 32 31 0d 19 64  18 20 65 71 75 73 20 22  |00021..d. equs "|
00004120  51 75 69 65 74 20 20 20  20 20 20 20 22 0d 19 6e  |Quiet       "..n|
00004130  3c 20 65 71 75 64 20 26  38 30 20 84 20 28 28 73  |< equd &80 . ((s|
00004140  6f 75 6e 64 5f 76 6f 6c  25 3d 26 31 37 46 29 80  |ound_vol%=&17F).|
00004150  31 29 3a 65 71 75 64 20  2d 31 3a 65 71 75 64 20  |1):equd -1:equd |
00004160  26 30 37 30 30 30 30 32  31 0d 19 78 18 20 65 71  |&07000021..x. eq|
00004170  75 73 20 22 4c 6f 75 64  20 20 20 20 20 20 20 20  |us "Loud        |
00004180  22 0d 19 82 04 0d 19 8c  0c 2e 69 62 6d 65 6e 75  |".........ibmenu|
00004190  31 0d 19 96 21 20 65 71  75 73 20 22 53 65 63 6f  |1...! equs "Seco|
000041a0  6e 64 73 22 3a 65 71 75  62 20 30 3a 65 71 75 64  |nds":equb 0:equd|
000041b0  20 30 0d 19 a0 29 20 65  71 75 64 20 26 30 37 30  | 0...) equd &070|
000041c0  32 30 37 3a 65 71 75 64  20 32 30 38 3a 65 71 75  |207:equd 208:equ|
000041d0  64 20 34 30 3a 65 71 75  64 20 30 0d 19 aa 24 20  |d 40:equd 0...$ |
000041e0  65 71 75 64 20 26 38 34  3a 65 71 75 64 20 2d 31  |equd &84:equd -1|
000041f0  3a 65 71 75 64 20 26 30  37 30 30 30 31 32 31 0d  |:equd &07000121.|
00004200  19 b4 22 20 65 71 75 64  20 69 62 6d 65 73 73 3a  |.." equd ibmess:|
00004210  65 71 75 64 20 69 62 76  61 6c 3a 65 71 75 64 20  |equd ibval:equd |
00004220  38 0d 19 be 04 0d 19 c8  1a 2e 69 62 76 61 6c 20  |8.........ibval |
00004230  65 71 75 73 20 22 61 30  2d 39 2e 22 2b bd 30 0d  |equs "a0-9."+.0.|
00004240  19 d2 27 2e 69 62 6d 65  73 73 20 65 71 75 73 20  |..'.ibmess equs |
00004250  c3 28 73 63 61 6e 5f 74  69 6d 65 25 2f 31 30 30  |.(scan_time%/100|
00004260  29 2b bd 28 30 29 0d 19  dc 04 0d 19 e6 08 20 5d  |)+.(0)........ ]|
00004270  3a ed 0d 19 f0 04 0d 19  fa 25 20 c8 99 20 63 72  |:........% .. cr|
00004280  65 61 74 65 6d 65 6e 75  25 2c 2c 6d 61 69 6e 25  |eatemenu%,,main%|
00004290  2c 6d 78 25 2d 31 36 2c  32 36 30 0d 1a 04 0c 20  |,mx%-16,260.... |
000042a0  6d 65 6e 75 25 3d 35 0d  1a 0e 06 20 e1 0d 1a 18  |menu%=5.... ....|
000042b0  04 0d 1a 22 69 f4 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |..."i.----------|
000042c0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00004310  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 0d 1a 2c 04 0d 1a  |----------..,...|
00004320  36 14 20 dd f2 69 63 6f  6e 5f 62 61 72 5f 6d 65  |6. ..icon_bar_me|
00004330  6e 75 0d 1a 40 09 20 ea  20 63 25 0d 1a 4a 0d 20  |nu..@. . c%..J. |
00004340  c8 8e 20 21 71 25 20 ca  0d 1a 54 0a 20 20 20 c9  |.. !q% ...T.   .|
00004350  20 31 0d 1a 5e 12 20 20  20 20 20 c8 8e 20 71 25  | 1..^.     .. q%|
00004360  21 34 20 ca 0d 1a 68 27  20 20 20 20 20 20 20 c9  |!4 ...h'       .|
00004370  20 2d 31 3a 73 63 61 6e  6e 69 6e 67 25 3d 73 63  | -1:scanning%=sc|
00004380  61 6e 6e 69 6e 67 25 20  82 20 b9 0d 1a 72 0f 20  |anning% . ...r. |
00004390  20 20 20 20 20 20 c9 20  30 3a 0d 1a 7c 37 20 20  |      . 0:..|7  |
000043a0  20 20 20 20 20 20 20 e7  20 73 63 61 6e 5f 6b 65  |       . scan_ke|
000043b0  79 73 25 3d 32 20 73 63  61 6e 5f 6b 65 79 73 25  |ys%=2 scan_keys%|
000043c0  3d 31 20 8b 20 73 63 61  6e 5f 6b 65 79 73 25 3d  |=1 . scan_keys%=|
000043d0  32 0d 1a 86 18 20 20 20  20 20 20 20 20 20 73 63  |2....         sc|
000043e0  61 6e 6e 69 6e 67 25 3d  b9 0d 1a 90 0f 20 20 20  |anning%=.....   |
000043f0  20 20 20 20 c9 20 31 3a  0d 1a 9a 29 20 20 20 20  |    . 1:...)    |
00004400  20 20 20 20 20 74 25 3d  28 bb 28 a4 73 74 72 69  |     t%=(.(.stri|
00004410  6e 67 30 28 69 62 6d 65  73 73 29 29 29 2a 31 30  |ng0(ibmess)))*10|
00004420  30 0d 1a a4 1f 20 20 20  20 20 20 20 20 20 e7 20  |0....         . |
00004430  74 25 20 73 63 61 6e 5f  74 69 6d 65 25 3d 74 25  |t% scan_time%=t%|
00004440  0d 1a ae 18 20 20 20 20  20 20 20 20 20 73 63 61  |....         sca|
00004450  6e 6e 69 6e 67 25 3d b9  0d 1a b8 0a 20 20 20 20  |nning%=.....    |
00004460  20 cb 0d 1a c2 0b 20 20  20 c9 20 32 3a 0d 1a cc  | .....   . 2:...|
00004470  12 20 20 20 20 20 c8 8e  20 71 25 21 34 20 ca 0d  |.     .. q%!4 ..|
00004480  1a d6 1e 20 20 20 20 20  20 20 c9 20 30 3a 73 6f  |...       . 0:so|
00004490  75 6e 64 5f 76 6f 6c 25  3d 26 31 30 46 0d 1a e0  |und_vol%=&10F...|
000044a0  1e 20 20 20 20 20 20 20  c9 20 31 3a 73 6f 75 6e  |.       . 1:soun|
000044b0  64 5f 76 6f 6c 25 3d 26  31 34 46 0d 1a ea 1e 20  |d_vol%=&14F.... |
000044c0  20 20 20 20 20 20 c9 20  32 3a 73 6f 75 6e 64 5f  |      . 2:sound_|
000044d0  76 6f 6c 25 3d 26 31 37  46 0d 1a f4 0a 20 20 20  |vol%=&17F....   |
000044e0  20 20 cb 0d 1a fe 30 20  20 20 c9 20 33 3a e7 20  |  ....0   . 3:. |
000044f0  6d 6f 64 69 66 69 65 64  25 20 f2 6f 70 65 6e 5f  |modified% .open_|
00004500  71 75 65 72 79 28 22 22  29 20 8b 20 f2 66 69 6e  |query("") . .fin|
00004510  69 73 68 0d 1b 08 06 20  cb 0d 1b 12 37 20 c8 99  |ish.... ....7 ..|
00004520  20 67 65 74 70 25 2c 2c  71 25 3a e7 20 71 25 21  | getp%,,q%:. q%!|
00004530  38 20 80 20 31 20 f2 64  6f 5f 69 63 6f 6e 5f 62  |8 . 1 .do_icon_b|
00004540  61 72 5f 6d 65 6e 75 28  6d 78 25 2c 6d 79 25 29  |ar_menu(mx%,my%)|
00004550  0d 1b 1c 06 20 e1 0d 1b  26 04 0d 1b 30 6d f4 2d  |.... ...&...0m.-|
00004560  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
000045c0  2d 2d 2d 2d 2d 2d 2d 0d  1b 3a 04 0d 1b 44 31 20  |-------..:...D1 |
000045d0  dd f2 64 72 61 77 5f 6d  61 69 6e 5f 77 28 77 78  |..draw_main_w(wx|
000045e0  25 2c 77 79 25 2c 77 78  31 25 2c 77 79 31 25 2c  |%,wy%,wx1%,wy1%,|
000045f0  6f 66 66 78 25 2c 6f 66  66 79 25 29 0d 1b 4e 2f  |offx%,offy%)..N/|
00004600  20 c8 99 20 67 65 74 65  6e 74 72 79 25 2c 73 5f  | .. getentry%,s_|
00004610  70 61 67 65 73 25 2c 63  75 72 72 65 6e 74 5f 70  |pages%,current_p|
00004620  61 67 65 25 20 b8 20 61  64 72 25 0d 1b 58 25 20  |age% . adr%..X% |
00004630  73 74 61 63 6b 25 3d 61  64 72 25 21 32 30 3a 70  |stack%=adr%!20:p|
00004640  61 67 65 5f 63 6f 6c 25  3d 61 64 72 25 21 32 38  |age_col%=adr%!28|
00004650  0d 1b 62 45 20 c8 99 20  73 65 74 63 6f 6c 25 2c  |..bE .. setcol%,|
00004660  70 61 67 65 5f 63 6f 6c  25 3a c8 93 20 c8 90 20  |page_col%:.. .. |
00004670  77 78 25 2b 6f 66 66 78  25 2c 77 79 25 2b 6f 66  |wx%+offx%,wy%+of|
00004680  66 79 25 2c 77 78 31 25  2d 77 78 25 2c 77 79 31  |fy%,wx1%-wx%,wy1|
00004690  25 2d 77 79 25 0d 1b 6c  1e 20 c8 99 20 6e 65 6e  |%-wy%..l. .. nen|
000046a0  74 72 69 65 73 25 2c 73  74 61 63 6b 25 20 b8 20  |tries%,stack% . |
000046b0  6e 6f 25 0d 1b 76 0c 20  e7 20 6e 6f 25 20 8c 0d  |no%..v. . no% ..|
000046c0  1b 80 18 20 20 20 e3 20  6f 62 6a 65 63 74 25 3d  |...   . object%=|
000046d0  31 20 b8 20 6e 6f 25 0d  1b 8a 30 20 20 20 20 20  |1 . no%...0     |
000046e0  c8 99 20 67 65 74 6e 74  68 25 2c 73 74 61 63 6b  |.. getnth%,stack|
000046f0  25 2c 6f 62 6a 65 63 74  25 20 b8 20 61 64 72 25  |%,object% . adr%|
00004700  2c 74 6f 6b 65 6e 25 0d  1b 94 45 20 20 20 20 20  |,token%...E     |
00004710  78 25 3d 61 64 72 25 21  31 32 3a 79 25 3d 61 64  |x%=adr%!12:y%=ad|
00004720  72 25 21 31 36 3a 78 31  25 3d 61 64 72 25 21 32  |r%!16:x1%=adr%!2|
00004730  30 3a 79 31 25 3d 61 64  72 25 21 32 34 3a 66 6c  |0:y1%=adr%!24:fl|
00004740  61 67 73 25 3d 61 64 72  25 21 33 36 0d 1b 9e 43  |ags%=adr%!36...C|
00004750  20 20 20 20 20 e7 20 78  25 3c 77 78 31 25 20 80  |     . x%<wx1% .|
00004760  20 78 31 25 3e 77 78 25  20 80 20 79 25 3c 77 79  | x1%>wx% . y%<wy|
00004770  31 25 20 80 20 79 31 25  3e 77 79 25 20 80 20 28  |1% . y1%>wy% . (|
00004780  66 6c 61 67 73 25 80 31  32 38 29 3d 30 20 8c 0d  |flags%.128)=0 ..|
00004790  1b a8 16 20 20 20 20 20  20 20 c8 8e 20 61 64 72  |...       .. adr|
000047a0  25 21 34 20 ca 0d 1b b2  3c 20 20 20 20 20 20 20  |%!4 ....<       |
000047b0  20 20 c9 20 73 5f 74 65  78 74 25 3a f2 64 72 61  |  . s_text%:.dra|
000047c0  77 5f 74 65 78 74 28 73  74 61 63 6b 25 2c 74 6f  |w_text(stack%,to|
000047d0  6b 65 6e 25 2c 6f 66 66  78 25 2c 6f 66 66 79 25  |ken%,offx%,offy%|
000047e0  29 0d 1b bc 65 20 20 20  20 20 20 20 20 20 c9 20  |)...e         . |
000047f0  73 5f 73 70 72 69 74 65  73 25 2c 73 5f 64 72 61  |s_sprites%,s_dra|
00004800  77 25 3a f2 64 72 61 77  5f 70 69 63 74 75 72 65  |w%:.draw_picture|
00004810  28 61 64 72 25 21 34 2c  61 64 72 25 21 38 2c 78  |(adr%!4,adr%!8,x|
00004820  25 2b 6f 66 66 78 25 2c  79 25 2b 6f 66 66 79 25  |%+offx%,y%+offy%|
00004830  2c 78 31 25 2d 78 25 2c  79 31 25 2d 79 25 2c 66  |,x1%-x%,y1%-y%,f|
00004840  6c 61 67 73 25 29 0d 1b  c6 0c 20 20 20 20 20 20  |lags%)....      |
00004850  20 cb 0d 1b d0 0a 20 20  20 20 20 cd 0d 1b da 08  | .....     .....|
00004860  20 20 20 ed 0d 1b e4 06  20 cd 0d 1b ee 06 20 e1  |   ..... ..... .|
00004870  0d 1b f8 04 0d 1c 02 1a  20 dd a4 73 74 72 69 70  |........ ..strip|
00004880  5f 73 70 61 63 65 73 28  74 65 78 74 24 29 0d 1c  |_spaces(text$)..|
00004890  0c 06 20 f5 0d 1c 16 29  20 20 20 e7 20 97 74 65  |.. ....)   . .te|
000048a0  78 74 24 3d 33 32 20 74  65 78 74 24 3d c2 74 65  |xt$=32 text$=.te|
000048b0  78 74 24 2c a9 74 65 78  74 24 2d 31 29 0d 1c 20  |xt$,.text$-1).. |
000048c0  10 20 fd 97 74 65 78 74  24 3c 3e 33 32 0d 1c 2a  |. ..text$<>32..*|
000048d0  0b 20 3d 74 65 78 74 24  0d 1c 34 04 0d 1c 3e 27  |. =text$..4...>'|
000048e0  20 dd a4 6c 6f 77 65 72  5f 63 61 73 65 28 74 65  | ..lower_case(te|
000048f0  78 74 24 29 3a e7 20 74  65 78 74 24 3d 22 22 3a  |xt$):. text$="":|
00004900  3d 22 22 0d 1c 48 0f 20  ea 20 74 24 2c 74 25 2c  |=""..H. . t$,t%,|
00004910  63 25 0d 1c 52 11 20 e3  74 25 3d 31 b8 a9 74 65  |c%..R. .t%=1..te|
00004920  78 74 24 0d 1c 5c 19 20  20 20 63 25 3d 97 28 c1  |xt$..\.   c%=.(.|
00004930  74 65 78 74 24 2c 74 25  2c 31 29 29 0d 1c 66 1d  |text$,t%,1))..f.|
00004940  20 20 20 e7 20 63 25 3e  36 34 20 80 20 63 25 3c  |   . c%>64 . c%<|
00004950  39 31 20 63 25 2b 3d 33  32 0d 1c 70 10 20 20 20  |91 c%+=32..p.   |
00004960  74 24 3d 74 24 2b bd 63  25 0d 1c 7a 06 20 ed 0d  |t$=t$+.c%..z. ..|
00004970  1c 84 08 20 3d 74 24 0d  1c 8e 04 0d 1c 98 69 f4  |... =t$.......i.|
00004980  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
000049e0  2d 2d 2d 2d 0d 1c a2 04  0d 1c ac 2b 20 dd f2 64  |----.......+ ..d|
000049f0  72 61 77 5f 74 65 78 74  28 73 74 61 63 6b 25 2c  |raw_text(stack%,|
00004a00  74 6f 6b 65 6e 25 2c 6f  66 66 78 25 2c 6f 66 66  |token%,offx%,off|
00004a10  79 25 29 0d 1c b6 64 20  e7 20 73 70 65 61 6b 69  |y%)...d . speaki|
00004a20  6e 67 5f 74 65 78 74 25  20 80 20 73 70 65 61 6b  |ng_text% . speak|
00004a30  5f 74 6f 6b 65 6e 25 3d  74 6f 6b 65 6e 25 20 f2  |_token%=token% .|
00004a40  68 69 67 68 6c 69 67 68  74 5f 74 65 78 74 28 73  |highlight_text(s|
00004a50  74 61 63 6b 25 2c 74 6f  6b 65 6e 25 2c 6f 66 66  |tack%,token%,off|
00004a60  78 25 2c 6f 66 66 79 25  2c 73 70 65 61 6b 5f 77  |x%,offy%,speak_w|
00004a70  6f 72 64 25 29 3a e1 0d  1c c0 26 20 c8 99 20 67  |ord%):....& .. g|
00004a80  65 74 65 6e 74 72 79 25  2c 73 74 61 63 6b 25 2c  |etentry%,stack%,|
00004a90  74 6f 6b 65 6e 25 20 b8  20 61 64 72 25 0d 1c ca  |token% . adr%...|
00004aa0  17 20 78 25 3d 28 61 64  72 25 21 31 32 29 2b 6f  |. x%=(adr%!12)+o|
00004ab0  66 66 78 25 0d 1c d4 17  20 79 25 3d 28 61 64 72  |ffx%.... y%=(adr|
00004ac0  25 21 31 36 29 2b 6f 66  66 79 25 0d 1c de 22 20  |%!16)+offy%..." |
00004ad0  78 31 25 3d 28 61 64 72  25 21 32 30 29 2d 28 31  |x1%=(adr%!20)-(1|
00004ae0  3c 3c 78 65 66 25 29 2b  6f 66 66 78 25 0d 1c e8  |<<xef%)+offx%...|
00004af0  22 20 79 31 25 3d 28 61  64 72 25 21 32 34 29 2d  |" y1%=(adr%!24)-|
00004b00  28 31 3c 3c 79 65 66 25  29 2b 6f 66 66 79 25 0d  |(1<<yef%)+offy%.|
00004b10  1c f2 2e 20 66 6c 61 67  73 25 3d 61 64 72 25 21  |... flags%=adr%!|
00004b20  33 36 3a 66 6f 6e 74 25  3d 61 64 72 25 21 34 30  |36:font%=adr%!40|
00004b30  3a 62 5f 73 25 3d 61 64  72 25 21 33 32 0d 1c fc  |:b_s%=adr%!32...|
00004b40  30 20 66 63 6f 6c 25 3d  61 64 72 25 21 35 32 3a  |0 fcol%=adr%!52:|
00004b50  e7 20 66 63 6f 6c 25 20  80 20 26 46 46 20 66 63  |. fcol% . &FF fc|
00004b60  6f 6c 25 3d 70 61 67 65  5f 63 6f 6c 25 0d 1d 06  |ol%=page_col%...|
00004b70  12 20 62 63 6f 6c 25 3d  61 64 72 25 21 35 36 0d  |. bcol%=adr%!56.|
00004b80  1d 10 3b 20 e7 20 66 6c  61 67 73 25 80 31 20 66  |..; . flags%.1 f|
00004b90  63 6f 6c 25 3d 66 63 6f  6c 25 82 26 46 46 46 46  |col%=fcol%.&FFFF|
00004ba0  46 46 30 30 3a 62 63 6f  6c 25 3d 62 63 6f 6c 25  |FF00:bcol%=bcol%|
00004bb0  82 26 46 46 46 46 46 46  30 30 0d 1d 1a 31 20 f2  |.&FFFFFF00...1 .|
00004bc0  64 72 61 77 5f 62 6f 72  64 65 72 28 62 5f 73 25  |draw_border(b_s%|
00004bd0  2c 66 63 6f 6c 25 2c 62  63 6f 6c 25 2c 78 25 2c  |,fcol%,bcol%,x%,|
00004be0  79 25 2c 78 31 25 2c 79  31 25 29 0d 1d 24 12 20  |y%,x1%,y1%)..$. |
00004bf0  78 25 2b 3d 28 31 3c 3c  78 65 66 25 29 0d 1d 2e  |x%+=(1<<xef%)...|
00004c00  13 20 78 31 25 2d 3d 28  31 3c 3c 78 65 66 25 29  |. x1%-=(1<<xef%)|
00004c10  0d 1d 38 12 20 79 25 2b  3d 28 31 3c 3c 79 65 66  |..8. y%+=(1<<yef|
00004c20  25 29 0d 1d 42 13 20 79  31 25 2d 3d 28 31 3c 3c  |%)..B. y1%-=(1<<|
00004c30  79 65 66 25 29 0d 1d 4c  07 ea 20 85 0d 1d 56 15  |yef%)..L.. ...V.|
00004c40  ee 20 85 20 ea 20 f7 20  85 3a 66 6f 6e 74 25 3d  |. . . . .:font%=|
00004c50  30 0d 1d 60 0e 20 e7 20  66 6f 6e 74 25 20 8c 0d  |0..`. . font% ..|
00004c60  1d 6a 27 20 20 20 c8 99  20 67 65 74 65 6e 74 72  |.j'   .. getentr|
00004c70  79 25 2c 73 5f 66 6f 6e  74 73 25 2c 66 6f 6e 74  |y%,s_fonts%,font|
00004c80  25 20 b8 20 74 25 0d 1d  74 31 20 20 20 c8 99 20  |% . t%..t1   .. |
00004c90  66 69 6e 64 66 6f 6e 74  25 2c 2c 74 25 2b 34 2c  |findfont%,,t%+4,|
00004ca0  61 64 72 25 21 34 34 2c  61 64 72 25 21 34 38 20  |adr%!44,adr%!48 |
00004cb0  b8 20 66 6f 6e 74 25 0d  1d 7e 06 20 cd 0d 1d 88  |. font%..~. ....|
00004cc0  0e 20 e7 20 66 6f 6e 74  25 20 8c 0d 1d 92 20 20  |. . font% ....  |
00004cd0  20 20 e7 20 62 63 6f 6c  25 20 80 20 26 46 46 20  |  . bcol% . &FF |
00004ce0  62 63 6f 6c 25 3d 66 63  6f 6c 25 0d 1d 9c 3b 20  |bcol%=fcol%...; |
00004cf0  20 20 c8 99 20 22 43 6f  6c 6f 75 72 54 72 61 6e  |  .. "ColourTran|
00004d00  73 5f 53 65 74 46 6f 6e  74 43 6f 6c 6f 75 72 73  |s_SetFontColours|
00004d10  22 2c 66 6f 6e 74 25 2c  62 63 6f 6c 25 2c 66 63  |",font%,bcol%,fc|
00004d20  6f 6c 25 2c 31 34 0d 1d  a6 2e 20 20 20 c8 99 20  |ol%,14....   .. |
00004d30  66 6f 6e 74 69 6e 66 6f  25 2c 66 6f 6e 74 25 20  |fontinfo%,font% |
00004d40  b8 20 2c 63 78 25 2c 63  79 25 2c 63 78 31 25 2c  |. ,cx%,cy%,cx1%,|
00004d50  63 79 31 25 0d 1d b0 06  20 cc 0d 1d ba 3e 20 20  |cy1%.... ....>  |
00004d60  20 63 78 25 3d 2d 28 31  3c 3c 78 65 66 25 29 3a  | cx%=-(1<<xef%):|
00004d70  63 79 25 3d 2d 28 31 3c  3c 79 65 66 25 29 3a 63  |cy%=-(1<<yef%):c|
00004d80  78 31 25 3d 38 3c 3c 78  65 66 25 3a 63 79 31 25  |x1%=8<<xef%:cy1%|
00004d90  3d 38 3c 3c 79 65 66 25  0d 1d c4 06 20 cd 0d 1d  |=8<<yef%.... ...|
00004da0  ce 16 20 74 65 78 74 5f  68 65 69 67 68 74 25 3d  |.. text_height%=|
00004db0  63 79 31 25 0d 1d d8 28  20 c8 99 20 67 65 74 65  |cy1%...( .. gete|
00004dc0  6e 74 72 79 25 2c 73 5f  74 65 78 74 25 2c 61 64  |ntry%,s_text%,ad|
00004dd0  72 25 21 38 20 b8 20 74  65 78 74 25 0d 1d e2 0d  |r%!8 . text%....|
00004de0  20 74 65 78 74 25 2b 3d  34 0d 1d ec 13 20 74 65  | text%+=4.... te|
00004df0  78 74 5f 6f 66 66 73 65  74 25 3d 30 0d 1d f6 2c  |xt_offset%=0...,|
00004e00  20 70 78 25 3d 78 25 2b  6d 61 72 67 69 6e 25 3a  | px%=x%+margin%:|
00004e10  70 79 25 3d 79 31 25 2d  74 65 78 74 5f 68 65 69  |py%=y1%-text_hei|
00004e20  67 68 74 25 2b 63 79 25  0d 1e 00 24 20 63 65 6e  |ght%+cy%...$ cen|
00004e30  74 72 65 25 3d a3 3a 72  69 67 68 74 25 3d a3 3a  |tre%=.:right%=.:|
00004e40  75 6e 64 65 72 6c 69 6e  65 25 3d a3 0d 1e 0a 1b  |underline%=.....|
00004e50  20 e7 20 66 6c 61 67 73  25 20 80 20 38 20 63 65  | . flags% . 8 ce|
00004e60  6e 74 72 65 25 3d b9 0d  1e 14 1b 20 e7 20 66 6c  |ntre%=..... . fl|
00004e70  61 67 73 25 20 80 20 31  36 20 72 69 67 68 74 25  |ags% . 16 right%|
00004e80  3d b9 0d 1e 1e 1f 20 e7  20 66 6c 61 67 73 25 20  |=..... . flags% |
00004e90  80 20 33 32 20 75 6e 64  65 72 6c 69 6e 65 25 3d  |. 32 underline%=|
00004ea0  b9 0d 1e 28 06 20 f5 0d  1e 32 1e 20 20 20 c8 8e  |...(. ...2.   ..|
00004eb0  20 74 65 78 74 5f 6f 66  66 73 65 74 25 3f 74 65  | text_offset%?te|
00004ec0  78 74 25 20 ca 0d 1e 3c  0d 20 20 20 20 20 c9 20  |xt% ...<.     . |
00004ed0  30 3a 0d 1e 46 2f 20 20  20 20 20 c9 20 31 33 3a  |0:..F/     . 13:|
00004ee0  70 79 25 2d 3d 74 65 78  74 5f 68 65 69 67 68 74  |py%-=text_height|
00004ef0  25 3a 74 65 78 74 5f 6f  66 66 73 65 74 25 2b 3d  |%:text_offset%+=|
00004f00  31 0d 1e 50 0a 20 20 20  20 20 7f 0d 1e 5a 2d 20  |1..P.     ...Z- |
00004f10  20 20 20 20 20 20 74 65  78 74 24 3d a4 73 74 72  |      text$=.str|
00004f20  69 6e 67 30 28 74 65 78  74 25 2b 74 65 78 74 5f  |ing0(text%+text_|
00004f30  6f 66 66 73 65 74 25 29  0d 1e 64 1f 20 20 20 20  |offset%)..d.    |
00004f40  20 20 20 74 65 78 74 5f  6f 66 66 73 65 74 25 2b  |   text_offset%+|
00004f50  3d a9 74 65 78 74 24 0d  1e 6e 14 20 20 20 20 20  |=.text$..n.     |
00004f60  20 20 e7 20 66 6f 6e 74  25 20 8c 0d 1e 78 40 20  |  . font% ...x@ |
00004f70  20 20 20 20 20 20 20 20  c8 99 20 73 74 72 69 6e  |        .. strin|
00004f80  67 77 69 64 74 68 25 2c  2c 74 65 78 74 24 2c 31  |gwidth%,,text$,1|
00004f90  3c 3c 33 30 2c 31 3c 3c  33 30 2c 2d 31 2c a9 74  |<<30,1<<30,-1,.t|
00004fa0  65 78 74 24 20 b8 20 2c  2c 77 25 0d 1e 82 26 20  |ext$ . ,,w%...& |
00004fb0  20 20 20 20 20 20 20 20  c8 99 20 63 6f 6e 76 65  |        .. conve|
00004fc0  72 74 74 6f 6f 73 25 2c  2c 77 25 20 b8 20 2c 77  |rttoos%,,w% . ,w|
00004fd0  25 0d 1e 8c 2d 20 20 20  20 20 20 20 20 20 e7 20  |%...-         . |
00004fe0  63 65 6e 74 72 65 25 20  70 78 25 3d 78 25 2b 28  |centre% px%=x%+(|
00004ff0  78 31 25 2d 78 25 29 81  32 2d 77 25 81 32 0d 1e  |x1%-x%).2-w%.2..|
00005000  96 28 20 20 20 20 20 20  20 20 20 e7 20 72 69 67  |.(         . rig|
00005010  68 74 25 20 70 78 25 3d  78 31 25 2d 77 25 2d 6d  |ht% px%=x1%-w%-m|
00005020  61 72 67 69 6e 25 0d 1e  a0 36 20 20 20 20 20 20  |argin%...6      |
00005030  20 20 20 e7 20 75 6e 64  65 72 6c 69 6e 65 25 20  |   . underline% |
00005040  74 65 78 74 24 3d bd 28  32 35 29 2b bd 28 31 29  |text$=.(25)+.(1)|
00005050  2b bd 28 31 36 29 2b 74  65 78 74 24 0d 1e aa 2e  |+.(16)+text$....|
00005060  20 20 20 20 20 20 20 20  20 c8 99 20 70 61 69 6e  |         .. pain|
00005070  74 25 2c 2c 74 65 78 74  24 2c 31 3c 3c 34 2c 70  |t%,,text$,1<<4,p|
00005080  78 25 2c 70 79 25 2d 63  79 25 0d 1e b4 0c 20 20  |x%,py%-cy%....  |
00005090  20 20 20 20 20 cc 0d 1e  be 1b 20 20 20 20 20 20  |     .....      |
000050a0  20 20 20 77 25 3d a9 74  65 78 74 24 2a 63 78 31  |   w%=.text$*cx1|
000050b0  25 0d 1e c8 2d 20 20 20  20 20 20 20 20 20 e7 20  |%...-         . |
000050c0  63 65 6e 74 72 65 25 20  70 78 25 3d 78 25 2b 28  |centre% px%=x%+(|
000050d0  78 31 25 2d 78 25 29 81  32 2d 77 25 81 32 0d 1e  |x1%-x%).2-w%.2..|
000050e0  d2 28 20 20 20 20 20 20  20 20 20 e7 20 72 69 67  |.(         . rig|
000050f0  68 74 25 20 70 78 25 3d  78 31 25 2d 77 25 2d 6d  |ht% px%=x1%-w%-m|
00005100  61 72 67 69 6e 25 0d 1e  dc 33 20 20 20 20 20 20  |argin%...3      |
00005110  20 20 20 c8 99 20 73 65  74 63 6f 6c 25 2c 66 63  |   .. setcol%,fc|
00005120  6f 6c 25 3a ec 20 70 78  25 2c 70 79 25 2b 63 79  |ol%:. px%,py%+cy|
00005130  31 25 3a f1 74 65 78 74  24 0d 1e e6 38 20 20 20  |1%:.text$...8   |
00005140  20 20 20 20 20 20 e7 20  75 6e 64 65 72 6c 69 6e  |      . underlin|
00005150  65 25 20 ec 20 70 78 25  2c 70 79 25 2d 63 79 25  |e% . px%,py%-cy%|
00005160  3a f0 31 2c 63 78 31 25  2a a9 74 65 78 74 24 2c  |:.1,cx1%*.text$,|
00005170  30 0d 1e f0 0c 20 20 20  20 20 20 20 cd 0d 1e fa  |0....       ....|
00005180  08 20 20 20 cb 0d 1f 04  1b 20 fd 20 74 65 78 74  |.   ..... . text|
00005190  5f 6f 66 66 73 65 74 25  3f 74 65 78 74 25 3d 30  |_offset%?text%=0|
000051a0  0d 1f 0e 1f 20 e7 20 66  6f 6e 74 25 20 c8 99 20  |.... . font% .. |
000051b0  6c 6f 73 65 66 6f 6e 74  25 2c 66 6f 6e 74 25 0d  |losefont%,font%.|
000051c0  1f 18 06 20 e1 0d 1f 22  04 0d 1f 2c 33 20 dd f2  |... ..."...,3 ..|
000051d0  64 72 61 77 5f 62 6f 72  64 65 72 28 73 74 79 6c  |draw_border(styl|
000051e0  65 25 2c 63 6f 6c 25 2c  62 63 6f 6c 25 2c 78 25  |e%,col%,bcol%,x%|
000051f0  2c 79 25 2c 78 31 25 2c  79 31 25 29 0d 1f 36 3f  |,y%,x1%,y1%)..6?|
00005200  20 e7 20 28 62 63 6f 6c  25 80 26 46 46 29 3d 30  | . (bcol%.&FF)=0|
00005210  20 c8 99 20 73 65 74 63  6f 6c 25 2c 62 63 6f 6c  | .. setcol%,bcol|
00005220  25 3a c8 93 20 c8 90 20  78 25 2c 79 25 2c 78 31  |%:.. .. x%,y%,x1|
00005230  25 2d 78 25 2c 79 31 25  2d 79 25 0d 1f 40 10 20  |%-x%,y1%-y%..@. |
00005240  c8 8e 20 73 74 79 6c 65  25 20 ca 0d 1f 4a 0a 20  |.. style% ...J. |
00005250  20 20 c9 20 31 0d 1f 54  18 20 20 20 20 20 c8 99  |  . 1..T.     ..|
00005260  20 73 65 74 63 6f 6c 25  2c 63 6f 6c 25 0d 1f 5e  | setcol%,col%..^|
00005270  1f 20 20 20 20 20 c8 93  20 78 25 2c 79 25 2c 78  |.     .. x%,y%,x|
00005280  31 25 2d 78 25 2c 79 31  25 2d 79 25 0d 1f 68 11  |1%-x%,y1%-y%..h.|
00005290  20 20 20 c9 20 32 3a f4  20 62 6f 6c 64 0d 1f 72  |   . 2:. bold..r|
000052a0  1d 20 20 20 20 20 c8 99  20 73 65 74 63 6f 6c 25  |.     .. setcol%|
000052b0  2c 26 46 46 46 46 46 46  30 30 0d 1f 7c 23 20 20  |,&FFFFFF00..|#  |
000052c0  20 20 20 ec 20 78 25 2c  79 25 3a df 20 78 25 2c  |   . x%,y%:. x%,|
000052d0  79 31 25 3a df 20 78 31  25 2c 79 31 25 0d 1f 86  |y1%:. x1%,y1%...|
000052e0  27 20 20 20 20 20 c8 99  20 73 65 74 63 6f 6c 25  |'     .. setcol%|
000052f0  2c 21 28 77 69 6d 70 5f  70 61 6c 65 74 74 65 25  |,!(wimp_palette%|
00005300  2b 31 36 29 0d 1f 90 19  20 20 20 20 20 df 20 78  |+16)....     . x|
00005310  31 25 2c 79 25 3a df 20  78 25 2c 79 25 0d 1f 9a  |1%,y%:. x%,y%...|
00005320  12 20 20 20 c9 20 33 3a  f4 20 69 6e 73 65 74 0d  |.   . 3:. inset.|
00005330  1f a4 27 20 20 20 20 20  c8 99 20 73 65 74 63 6f  |..'     .. setco|
00005340  6c 25 2c 21 28 77 69 6d  70 5f 70 61 6c 65 74 74  |l%,!(wimp_palett|
00005350  65 25 2b 31 36 29 0d 1f  ae 23 20 20 20 20 20 ec  |e%+16)...#     .|
00005360  20 78 25 2c 79 25 3a df  20 78 25 2c 79 31 25 3a  | x%,y%:. x%,y1%:|
00005370  df 20 78 31 25 2c 79 31  25 0d 1f b8 1d 20 20 20  |. x1%,y1%....   |
00005380  20 20 c8 99 20 73 65 74  63 6f 6c 25 2c 26 46 46  |  .. setcol%,&FF|
00005390  46 46 46 46 30 30 0d 1f  c2 19 20 20 20 20 20 df  |FFFF00....     .|
000053a0  20 78 31 25 2c 79 25 3a  df 20 78 25 2c 79 25 0d  | x1%,y%:. x%,y%.|
000053b0  1f cc 08 20 20 20 cb 0d  1f d6 06 20 cd 0d 1f e0  |...   ..... ....|
000053c0  06 20 e1 0d 1f ea 04 0d  1f f4 19 20 dd f2 70 6c  |. ......... ..pl|
000053d0  61 79 5f 73 6f 75 6e 64  28 73 6f 75 6e 64 25 29  |ay_sound(sound%)|
000053e0  0d 1f fe 2a 20 c8 99 20  67 65 74 65 6e 74 72 79  |...* .. getentry|
000053f0  25 2c 73 5f 73 6f 75 6e  64 73 25 2c 73 6f 75 6e  |%,s_sounds%,soun|
00005400  64 25 20 b8 20 61 64 72  31 25 0d 20 08 47 20 6c  |d% . adr1%. .G l|
00005410  65 6e 25 3d 28 21 61 64  72 31 25 29 2d 32 34 3a  |en%=(!adr1%)-24:|
00005420  c8 99 20 72 65 61 64 73  74 61 74 75 73 25 2c 73  |.. readstatus%,s|
00005430  5f 73 6f 75 6e 64 73 25  2c 73 6f 75 6e 64 25 20  |_sounds%,sound% |
00005440  b8 20 6c 25 3a e7 20 6c  25 20 6c 65 6e 25 3d 6c  |. l%:. l% len%=l|
00005450  25 0d 20 12 08 20 ea 20  85 0d 20 1c 1a 20 ee 20  |%. .. . .. .. . |
00005460  85 20 ea 20 f7 20 85 3a  f2 65 72 72 6f 72 62 6f  |. . . .:.errorbo|
00005470  78 3a e1 0d 20 26 2b 20  c8 99 20 70 6c 61 79 73  |x:.. &+ .. plays|
00005480  6f 75 6e 64 25 2c 61 64  72 31 25 2b 32 34 2c 6c  |ound%,adr1%+24,l|
00005490  65 6e 25 2c 73 6f 75 6e  64 5f 76 6f 6c 25 0d 20  |en%,sound_vol%. |
000054a0  30 06 20 e1 0d 20 3a 04  0d 20 44 1e 20 dd f2 70  |0. .. :.. D. ..p|
000054b0  6c 61 79 5f 73 6f 75 6e  64 5f 77 61 69 74 28 73  |lay_sound_wait(s|
000054c0  6f 75 6e 64 25 29 0d 20  4e 2a 20 c8 99 20 67 65  |ound%). N* .. ge|
000054d0  74 65 6e 74 72 79 25 2c  73 5f 73 6f 75 6e 64 73  |tentry%,s_sounds|
000054e0  25 2c 73 6f 75 6e 64 25  20 b8 20 61 64 72 31 25  |%,sound% . adr1%|
000054f0  0d 20 58 47 20 6c 65 6e  25 3d 28 21 61 64 72 31  |. XG len%=(!adr1|
00005500  25 29 2d 32 34 3a c8 99  20 72 65 61 64 73 74 61  |%)-24:.. readsta|
00005510  74 75 73 25 2c 73 5f 73  6f 75 6e 64 73 25 2c 73  |tus%,s_sounds%,s|
00005520  6f 75 6e 64 25 20 b8 20  6c 25 3a e7 20 6c 25 20  |ound% . l%:. l% |
00005530  6c 65 6e 25 3d 6c 25 0d  20 62 2b 20 c8 99 20 70  |len%=l%. b+ .. p|
00005540  6c 61 79 73 6f 75 6e 64  25 2c 61 64 72 31 25 2b  |laysound%,adr1%+|
00005550  32 34 2c 6c 65 6e 25 2c  73 6f 75 6e 64 5f 76 6f  |24,len%,sound_vo|
00005560  6c 25 0d 20 6c 23 20 f5  3a c8 99 20 70 6c 61 79  |l%. l# .:.. play|
00005570  73 6f 75 6e 64 25 2c 30  20 b8 20 74 25 3a fd 74  |sound%,0 . t%:.t|
00005580  25 3c 3e 2d 31 0d 20 76  06 20 e1 0d 20 80 04 0d  |%<>-1. v. .. ...|
00005590  20 8a 18 20 dd f2 6d 61  6b 65 5f 73 70 61 63 65  | .. ..make_space|
000055a0  28 70 6c 75 73 25 29 0d  20 94 23 20 73 69 7a 65  |(plus%). .# size|
000055b0  25 3d 28 21 26 34 30 30  30 34 2d 26 34 30 30 30  |%=(!&40004-&4000|
000055c0  30 29 2b 70 6c 75 73 25  2a 32 0d 20 9e 2b 20 73  |0)+plus%*2. .+ s|
000055d0  6c 6f 74 5f 73 69 7a 65  25 3d 93 2b 28 73 69 7a  |lot_size%=.+(siz|
000055e0  65 25 81 26 34 30 30 30  29 2a 26 34 30 30 30 2b  |e%.&4000)*&4000+|
000055f0  26 34 30 30 30 0d 20 a8  2a 20 c8 99 20 22 57 69  |&4000. .* .. "Wi|
00005600  6d 70 5f 53 6c 6f 74 53  69 7a 65 22 2c 73 6c 6f  |mp_SlotSize",slo|
00005610  74 5f 73 69 7a 65 25 2c  2d 31 20 b8 20 74 25 0d  |t_size%,-1 . t%.|
00005620  20 b2 38 20 e7 20 74 25  3c 73 6c 6f 74 5f 73 69  | .8 . t%<slot_si|
00005630  7a 65 25 20 85 20 31 2c  22 55 6c 74 69 6d 61 70  |ze% . 1,"Ultimap|
00005640  20 68 61 73 20 72 75 6e  20 6f 75 74 20 6f 66 20  | has run out of |
00005650  6d 65 6d 6f 72 79 22 0d  20 bc 06 20 e1 0d 20 c6  |memory". .. .. .|
00005660  04 0d 20 d0 1d 20 dd f2  73 65 74 5f 73 6c 6f 74  |.. .. ..set_slot|
00005670  28 73 69 7a 65 25 2c 65  72 72 6f 72 25 29 0d 20  |(size%,error%). |
00005680  da 15 20 73 6c 6f 74 5f  73 69 7a 65 25 3d 73 69  |.. slot_size%=si|
00005690  7a 65 25 0d 20 e4 2a 20  c8 99 20 22 57 69 6d 70  |ze%. .* .. "Wimp|
000056a0  5f 53 6c 6f 74 53 69 7a  65 22 2c 73 6c 6f 74 5f  |_SlotSize",slot_|
000056b0  73 69 7a 65 25 2c 2d 31  20 b8 20 74 25 0d 20 ee  |size%,-1 . t%. .|
000056c0  4c 20 e7 20 74 25 3c 73  6c 6f 74 5f 73 69 7a 65  |L . t%<slot_size|
000056d0  25 20 85 20 65 72 72 6f  72 25 2c 22 54 68 65 72  |% . error%,"Ther|
000056e0  65 27 73 20 6e 6f 74 20  65 6e 6f 75 67 68 20 6d  |e's not enough m|
000056f0  65 6d 6f 72 79 20 74 6f  20 6c 6f 61 64 20 74 68  |emory to load th|
00005700  69 73 20 66 69 6c 65 21  22 0d 20 f8 06 20 e1 0d  |is file!". .. ..|
00005710  21 02 04 0d 21 0c 13 20  dd f2 6f 70 65 6e 5f 70  |!...!.. ..open_p|
00005720  72 69 6e 74 5f 77 0d 21  16 2e 20 e7 20 70 6f 72  |rint_w.!.. . por|
00005730  74 72 61 69 74 25 20 61  25 3d 30 3a 62 25 3d 31  |trait% a%=0:b%=1|
00005740  3c 3c 32 31 20 8b 20 61  25 3d 31 3c 3c 32 31 3a  |<<21 . a%=1<<21:|
00005750  62 25 3d 30 0d 21 20 29  20 f2 73 65 74 5f 69 63  |b%=0.! ) .set_ic|
00005760  6f 6e 5f 73 74 61 74 65  28 70 72 69 6e 74 5f 77  |on_state(print_w|
00005770  25 2c 36 2c 61 25 2c 31  3c 3c 32 31 29 0d 21 2a  |%,6,a%,1<<21).!*|
00005780  29 20 f2 73 65 74 5f 69  63 6f 6e 5f 73 74 61 74  |) .set_icon_stat|
00005790  65 28 70 72 69 6e 74 5f  77 25 2c 37 2c 62 25 2c  |e(print_w%,7,b%,|
000057a0  31 3c 3c 32 31 29 0d 21  34 23 20 f2 73 65 74 5f  |1<<21).!4# .set_|
000057b0  69 63 6f 6e 5f 74 65 78  74 28 70 72 69 6e 74 5f  |icon_text(print_|
000057c0  77 25 2c 32 2c 22 31 22  29 0d 21 3e 11 20 c8 99  |w%,2,"1").!>. ..|
000057d0  20 67 65 74 70 25 2c 2c  71 25 0d 21 48 17 20 c8  | getp%,,q%.!H. .|
000057e0  99 20 63 72 65 61 74 65  6d 65 6e 75 25 2c 2c 2d  |. createmenu%,,-|
000057f0  31 0d 21 52 2c 20 c8 99  20 63 72 65 61 74 65 6d  |1.!R, .. createm|
00005800  65 6e 75 25 2c 2c 70 72  69 6e 74 5f 77 25 2c 21  |enu%,,print_w%,!|
00005810  71 25 2d 33 30 2c 71 25  21 34 2b 36 30 0d 21 5c  |q%-30,q%!4+60.!\|
00005820  06 20 e1 0d 21 66 04 0d  21 70 14 20 dd f2 63 68  |. ..!f..!p. ..ch|
00005830  65 63 6b 5f 70 72 69 6e  74 5f 77 0d 21 7a 0c 20  |eck_print_w.!z. |
00005840  62 25 3d 71 25 21 38 0d  21 84 0f 20 c8 8e 20 71  |b%=q%!8.!.. .. q|
00005850  25 21 31 36 20 ca 0d 21  8e 1d 20 20 20 c9 20 33  |%!16 ..!..   . 3|
00005860  3a c8 99 20 63 72 65 61  74 65 6d 65 6e 75 25 2c  |:.. createmenu%,|
00005870  2c 2d 31 0d 21 98 0b 20  20 20 c9 20 34 3a 0d 21  |,-1.!..   . 4:.!|
00005880  a2 29 20 20 20 20 20 21  71 25 3d 70 72 69 6e 74  |.)     !q%=print|
00005890  5f 77 25 3a 71 25 21 34  3d 37 3a c8 99 20 67 65  |_w%:q%!4=7:.. ge|
000058a0  74 69 25 2c 2c 71 25 0d  21 ac 48 20 20 20 20 20  |ti%,,q%.!.H     |
000058b0  e7 20 28 71 25 21 32 34  29 20 80 20 28 31 3c 3c  |. (q%!24) . (1<<|
000058c0  32 31 29 20 73 74 79 6c  65 25 3d 32 3a 70 6f 72  |21) style%=2:por|
000058d0  74 72 61 69 74 25 3d b9  20 8b 20 73 74 79 6c 65  |trait%=. . style|
000058e0  25 3d 31 3a 70 6f 72 74  72 61 69 74 25 3d a3 0d  |%=1:portrait%=..|
000058f0  21 b6 29 20 20 20 20 20  21 71 25 3d 70 72 69 6e  |!.)     !q%=prin|
00005900  74 5f 77 25 3a 71 25 21  34 3d 32 3a c8 99 20 67  |t_w%:q%!4=2:.. g|
00005910  65 74 69 25 2c 2c 71 25  0d 21 c0 24 20 20 20 20  |eti%,,q%.!.$    |
00005920  20 72 75 6e 5f 6e 75 6d  25 3d bb 28 a4 73 74 72  | run_num%=.(.str|
00005930  69 6e 67 30 28 71 25 21  32 38 29 29 0d 21 ca 20  |ing0(q%!28)).!. |
00005940  20 20 20 20 20 e7 20 72  75 6e 5f 6e 75 6d 25 3d  |     . run_num%=|
00005950  30 20 72 75 6e 5f 6e 75  6d 25 3d 31 0d 21 d4 28  |0 run_num%=1.!.(|
00005960  20 20 20 20 20 f2 70 72  69 6e 74 5f 72 6f 75 74  |     .print_rout|
00005970  69 6e 65 28 73 74 79 6c  65 25 2c 72 75 6e 5f 6e  |ine(style%,run_n|
00005980  75 6d 25 29 0d 21 de 24  20 20 20 20 20 e7 20 62  |um%).!.$     . b|
00005990  25 20 80 20 36 20 c8 99  20 63 72 65 61 74 65 6d  |% . 6 .. createm|
000059a0  65 6e 75 25 2c 2c 2d 31  0d 21 e8 06 20 cb 0d 21  |enu%,,-1.!.. ..!|
000059b0  f2 06 20 e1 0d 21 fc 04  0d 22 06 25 20 dd f2 70  |.. ..!...".% ..p|
000059c0  72 69 6e 74 5f 72 6f 75  74 69 6e 65 28 73 74 79  |rint_routine(sty|
000059d0  6c 65 25 2c 72 75 6e 5f  6e 75 6d 25 29 0d 22 10  |le%,run_num%).".|
000059e0  18 20 ea 20 70 68 61 6e  64 6c 65 25 2c 6f 68 61  |. . phandle%,oha|
000059f0  6e 64 6c 65 25 0d 22 1a  20 20 ea 20 6c 65 66 74  |ndle%.".  . left|
00005a00  25 2c 62 6f 74 74 6f 6d  25 2c 72 69 67 68 74 25  |%,bottom%,right%|
00005a10  2c 74 6f 70 25 0d 22 24  18 20 ea 20 63 6f 70 69  |,top%."$. . copi|
00005a20  65 73 6c 65 66 74 25 2c  72 65 63 74 25 0d 22 2e  |esleft%,rect%.".|
00005a30  04 0d 22 38 1b 20 70 68  61 6e 64 6c 65 25 3d ae  |.."8. phandle%=.|
00005a40  28 22 70 72 69 6e 74 65  72 3a 22 29 0d 22 42 08  |("printer:")."B.|
00005a50  20 ea 20 85 0d 22 4c 3b  20 ee 20 85 20 ea 3a d9  | . .."L; . . .:.|
00005a60  23 70 68 61 6e 64 6c 65  25 3a f7 20 85 3a 85 20  |#phandle%:. .:. |
00005a70  31 2c 22 54 68 65 72 65  20 69 73 20 6e 6f 20 70  |1,"There is no p|
00005a80  72 69 6e 74 65 72 20 64  72 69 76 65 72 21 22 0d  |rinter driver!".|
00005a90  22 56 2e 20 c8 99 20 50  44 73 65 6c 65 63 74 25  |"V. .. PDselect%|
00005aa0  2c 70 68 61 6e 64 6c 65  25 2c 22 55 6c 74 69 6d  |,phandle%,"Ultim|
00005ab0  61 22 20 b8 20 6f 68 61  6e 64 6c 65 25 0d 22 60  |a" . ohandle%."`|
00005ac0  04 0d 22 6a 5a 20 ee 20  85 20 ea 3a c8 99 20 50  |.."jZ . . .:.. P|
00005ad0  44 61 62 6f 72 74 25 2c  70 68 61 6e 64 6c 65 25  |Dabort%,phandle%|
00005ae0  3a d9 23 70 68 61 6e 64  6c 65 25 3a c8 99 20 50  |:.#phandle%:.. P|
00005af0  44 73 65 6c 65 63 74 25  2c 6f 68 61 6e 64 6c 65  |Dselect%,ohandle|
00005b00  25 3a 70 72 69 6e 74 69  6e 67 25 3d a3 3a f7 20  |%:printing%=.:. |
00005b10  85 3a 85 20 31 2c f6 24  2b c3 9e 0d 22 74 04 0d  |.:. 1,.$+..."t..|
00005b20  22 7e 32 20 c8 99 20 50  44 70 61 67 65 73 69 7a  |"~2 .. PDpagesiz|
00005b30  65 25 20 b8 20 2c 2c 2c  6c 65 66 74 25 2c 62 6f  |e% . ,,,left%,bo|
00005b40  74 74 6f 6d 25 2c 72 69  67 68 74 25 2c 74 6f 70  |ttom%,right%,top|
00005b50  25 0d 22 88 16 20 c8 99  20 22 48 6f 75 72 67 6c  |%.".. .. "Hourgl|
00005b60  61 73 73 5f 4f 6e 22 0d  22 92 04 0d 22 9c 19 20  |ass_On"."...".. |
00005b70  e3 20 6c 6f 6f 70 25 3d  31 20 b8 20 72 75 6e 5f  |. loop%=1 . run_|
00005b80  6e 75 6d 25 0d 22 a6 22  20 20 20 21 77 73 25 3d  |num%."."   !ws%=|
00005b90  6d 61 69 6e 5f 77 25 3a  c8 99 20 67 65 74 77 69  |main_w%:.. getwi|
00005ba0  25 2c 2c 77 73 25 0d 22  b0 34 20 20 20 6d 78 25  |%,,ws%.".4   mx%|
00005bb0  3d 77 73 25 21 34 34 3a  6d 79 25 3d 77 73 25 21  |=ws%!44:my%=ws%!|
00005bc0  34 38 3a 6d 78 31 25 3d  77 73 25 21 35 32 3a 6d  |48:mx1%=ws%!52:m|
00005bd0  79 31 25 3d 77 73 25 21  35 36 0d 22 ba 34 20 20  |y1%=ws%!56.".4  |
00005be0  20 21 62 6f 78 25 3d 6d  78 25 3a 62 6f 78 25 21  | !box%=mx%:box%!|
00005bf0  34 3d 6d 79 25 3a 62 6f  78 25 21 38 3d 6d 78 31  |4=my%:box%!8=mx1|
00005c00  25 3a 62 6f 78 25 21 31  32 3d 6d 79 31 25 0d 22  |%:box%!12=my1%."|
00005c10  c4 12 20 20 20 c8 8e 20  73 74 79 6c 65 25 20 ca  |..   .. style% .|
00005c20  0d 22 ce 18 20 20 20 20  20 c9 20 31 3a f4 20 6c  |."..     . 1:. l|
00005c30  61 6e 64 73 63 61 70 65  0d 22 d8 1b 20 20 20 20  |andscape."..    |
00005c40  20 20 20 e7 20 70 61 67  65 5f 73 69 7a 65 25 3d  |   . page_size%=|
00005c50  34 20 8c 0d 22 e2 14 20  20 20 20 20 20 20 20 20  |4 .."..         |
00005c60  73 63 78 3d 2e 36 37 0d  22 ec 14 20 20 20 20 20  |scx=.67."..     |
00005c70  20 20 20 20 73 63 79 3d  2e 36 37 0d 22 f6 4b 20  |    scy=.67.".K |
00005c80  20 20 20 20 20 20 20 20  21 6d 61 74 72 69 78 25  |        !matrix%|
00005c90  3d 30 3a 6d 61 74 72 69  78 25 21 34 3d 2d 73 63  |=0:matrix%!4=-sc|
00005ca0  78 2a 32 5e 31 36 3a 6d  61 74 72 69 78 25 21 38  |x*2^16:matrix%!8|
00005cb0  3d 73 63 79 2a 32 5e 31  36 3a 6d 61 74 72 69 78  |=scy*2^16:matrix|
00005cc0  25 21 31 32 3d 30 0d 23  00 5b 20 20 20 20 20 20  |%!12=0.#.[      |
00005cd0  20 20 20 21 6f 72 69 67  69 6e 31 25 3d 28 72 69  |   !origin1%=(ri|
00005ce0  67 68 74 25 2d 6c 65 66  74 25 29 81 31 36 3a 6f  |ght%-left%).16:o|
00005cf0  72 69 67 69 6e 31 25 21  34 3d 74 6f 70 25 2d 28  |rigin1%!4=top%-(|
00005d00  74 6f 70 25 2d 62 6f 74  74 6f 6d 25 29 81 32 2d  |top%-bottom%).2-|
00005d10  28 74 6f 70 25 2d 62 6f  74 74 6f 6d 25 29 81 33  |(top%-bottom%).3|
00005d20  30 0d 23 0a 0c 20 20 20  20 20 20 20 cc 0d 23 14  |0.#..       ..#.|
00005d30  14 20 20 20 20 20 20 20  20 20 73 63 78 3d 31 2e  |.         scx=1.|
00005d40  34 0d 23 1e 14 20 20 20  20 20 20 20 20 20 73 63  |4.#..         sc|
00005d50  79 3d 31 2e 35 0d 23 28  4b 20 20 20 20 20 20 20  |y=1.5.#(K       |
00005d60  20 20 21 6d 61 74 72 69  78 25 3d 30 3a 6d 61 74  |  !matrix%=0:mat|
00005d70  72 69 78 25 21 34 3d 2d  73 63 78 2a 32 5e 31 36  |rix%!4=-scx*2^16|
00005d80  3a 6d 61 74 72 69 78 25  21 38 3d 73 63 79 2a 32  |:matrix%!8=scy*2|
00005d90  5e 31 36 3a 6d 61 74 72  69 78 25 21 31 32 3d 30  |^16:matrix%!12=0|
00005da0  0d 23 32 4a 20 20 20 20  20 20 20 20 20 21 6f 72  |.#2J         !or|
00005db0  69 67 69 6e 31 25 3d 28  72 69 67 68 74 25 2d 6c  |igin1%=(right%-l|
00005dc0  65 66 74 25 29 81 32 30  3a 6f 72 69 67 69 6e 31  |eft%).20:origin1|
00005dd0  25 21 34 3d 74 6f 70 25  2d 28 74 6f 70 25 2d 62  |%!4=top%-(top%-b|
00005de0  6f 74 74 6f 6d 25 29 81  32 30 0d 23 3c 0c 20 20  |ottom%).20.#<.  |
00005df0  20 20 20 20 20 cd 0d 23  46 17 20 20 20 20 20 c9  |     ..#F.     .|
00005e00  20 32 3a f4 20 70 6f 72  74 72 61 69 74 0d 23 50  | 2:. portrait.#P|
00005e10  13 20 20 20 20 20 20 20  73 63 78 3d 31 2e 30 35  |.       scx=1.05|
00005e20  0d 23 5a 12 20 20 20 20  20 20 20 73 63 79 3d 2e  |.#Z.       scy=.|
00005e30  39 35 0d 23 64 48 20 20  20 20 20 20 20 21 6d 61  |95.#dH       !ma|
00005e40  74 72 69 78 25 3d 73 63  78 2a 32 5e 31 36 3a 6d  |trix%=scx*2^16:m|
00005e50  61 74 72 69 78 25 21 34  3d 30 3a 6d 61 74 72 69  |atrix%!4=0:matri|
00005e60  78 25 21 38 3d 30 3a 6d  61 74 72 69 78 25 21 31  |x%!8=0:matrix%!1|
00005e70  32 3d 73 63 79 2a 32 5e  31 36 0d 23 6e 39 20 20  |2=scy*2^16.#n9  |
00005e80  20 20 20 20 20 21 6f 72  69 67 69 6e 31 25 3d 28  |     !origin1%=(|
00005e90  72 69 67 68 74 25 2d 6c  65 66 74 25 29 81 32 30  |right%-left%).20|
00005ea0  3a 6f 72 69 67 69 6e 31  25 21 34 3d 62 6f 74 74  |:origin1%!4=bott|
00005eb0  6f 6d 25 0d 23 78 08 20  20 20 cb 0d 23 82 3a 20  |om%.#x.   ..#.: |
00005ec0  20 20 c8 99 20 50 44 67  69 76 65 72 65 63 25 2c  |  .. PDgiverec%,|
00005ed0  6c 6f 6f 70 25 2c 62 6f  78 25 2c 6d 61 74 72 69  |loop%,box%,matri|
00005ee0  78 25 2c 6f 72 69 67 69  6e 31 25 2c 26 46 46 46  |x%,origin1%,&FFF|
00005ef0  46 46 46 30 30 0d 23 8c  12 20 20 20 70 72 69 6e  |FFF00.#..   prin|
00005f00  74 69 6e 67 25 3d b9 0d  23 96 36 20 20 20 c8 99  |ting%=..#.6   ..|
00005f10  20 50 44 64 72 61 77 70  61 67 65 25 2c 31 2c 62  | PDdrawpage%,1,b|
00005f20  6f 78 32 25 2c 30 2c 30  20 b8 20 63 6f 70 69 65  |ox2%,0,0 . copie|
00005f30  73 6c 65 66 74 25 2c 2c  72 65 63 74 25 0d 23 a0  |sleft%,,rect%.#.|
00005f40  18 20 20 20 c8 95 20 63  6f 70 69 65 73 6c 65 66  |.   .. copieslef|
00005f50  74 25 3c 3e 30 0d 23 aa  2c 20 20 20 20 20 f2 64  |t%<>0.#.,     .d|
00005f60  72 61 77 5f 6d 61 69 6e  5f 77 28 6d 78 25 2c 6d  |raw_main_w(mx%,m|
00005f70  79 25 2c 6d 78 31 25 2c  6d 79 31 25 2c 30 2c 30  |y%,mx1%,my1%,0,0|
00005f80  29 0d 23 b4 31 20 20 20  20 20 c8 99 20 50 44 67  |).#.1     .. PDg|
00005f90  65 74 72 65 63 25 2c 2c  62 6f 78 32 25 20 b8 20  |etrec%,,box2% . |
00005fa0  63 6f 70 69 65 73 6c 65  66 74 25 2c 2c 72 65 63  |copiesleft%,,rec|
00005fb0  74 25 0d 23 be 08 20 20  20 ce 0d 23 c8 06 20 ed  |t%.#..   ..#.. .|
00005fc0  0d 23 d2 04 0d 23 dc 1a  20 c8 99 20 50 44 65 6e  |.#...#.. .. PDen|
00005fd0  64 6a 6f 62 25 2c 70 68  61 6e 64 6c 65 25 0d 23  |djob%,phandle%.#|
00005fe0  e6 0f 20 d9 23 70 68 61  6e 64 6c 65 25 0d 23 f0  |.. .#phandle%.#.|
00005ff0  1a 20 c8 99 20 50 44 73  65 6c 65 63 74 25 2c 6f  |. .. PDselect%,o|
00006000  68 61 6e 64 6c 65 25 0d  23 fa 10 20 70 72 69 6e  |handle%.#.. prin|
00006010  74 69 6e 67 25 3d a3 0d  24 04 17 20 c8 99 20 22  |ting%=..$.. .. "|
00006020  48 6f 75 72 67 6c 61 73  73 5f 4f 66 66 22 0d 24  |Hourglass_Off".$|
00006030  0e 06 20 e1 0d 24 18 04  0d 24 22 2f 20 dd f2 68  |.. ..$...$"/ ..h|
00006040  69 64 65 5f 6f 62 6a 65  63 74 28 73 74 61 63 6b  |ide_object(stack|
00006050  25 2c 74 6f 6b 65 6e 25  2c 68 69 64 65 25 2c 6f  |%,token%,hide%,o|
00006060  6e 5f 76 64 75 25 29 0d  24 2c 27 20 c8 99 20 67  |n_vdu%).$,' .. g|
00006070  65 74 65 6e 74 72 79 25  2c 73 74 61 63 6b 25 2c  |etentry%,stack%,|
00006080  74 6f 6b 65 6e 25 20 b8  20 61 64 72 31 25 0d 24  |token% . adr1%.$|
00006090  36 2f 20 e7 20 68 69 64  65 25 3c 3e 30 20 80 20  |6/ . hide%<>0 . |
000060a0  28 28 61 64 72 31 25 21  33 36 29 80 31 32 38 29  |((adr1%!36).128)|
000060b0  3c 3e 30 20 6f 6e 5f 76  64 75 25 3d 30 0d 24 40  |<>0 on_vdu%=0.$@|
000060c0  2d 20 e7 20 68 69 64 65  25 3d 30 20 80 20 28 28  |- . hide%=0 . ((|
000060d0  61 64 72 31 25 21 33 36  29 80 31 32 38 29 3d 30  |adr1%!36).128)=0|
000060e0  20 6f 6e 5f 76 64 75 25  3d 30 0d 24 4a 44 20 e7  | on_vdu%=0.$JD .|
000060f0  20 68 69 64 65 25 20 61  64 72 31 25 21 33 36 3d  | hide% adr1%!36=|
00006100  28 61 64 72 31 25 21 33  36 29 84 31 32 38 20 8b  |(adr1%!36).128 .|
00006110  20 61 64 72 31 25 21 33  36 3d 28 61 64 72 31 25  | adr1%!36=(adr1%|
00006120  21 33 36 29 80 26 46 46  46 46 46 46 37 46 0d 24  |!36).&FFFFFF7F.$|
00006130  54 5e 20 e7 20 6f 6e 5f  76 64 75 25 20 c8 99 20  |T^ . on_vdu% .. |
00006140  66 6f 72 63 65 72 65 64  72 61 77 25 2c 6d 61 69  |forceredraw%,mai|
00006150  6e 5f 77 25 2c 61 64 72  31 25 21 31 32 2c 61 64  |n_w%,adr1%!12,ad|
00006160  72 31 25 21 31 36 2c 61  64 72 31 25 21 32 30 2b  |r1%!16,adr1%!20+|
00006170  28 34 3c 3c 78 65 66 25  29 2c 61 64 72 31 25 21  |(4<<xef%),adr1%!|
00006180  32 34 2b 28 31 3c 3c 79  65 66 25 29 0d 24 5e 06  |24+(1<<yef%).$^.|
00006190  20 e1 0d 24 68 04 0d 24  72 2e 20 dd f2 6c 69 67  | ..$h..$r. ..lig|
000061a0  68 74 5f 6f 62 6a 65 63  74 28 73 74 61 63 6b 25  |ht_object(stack%|
000061b0  2c 74 6f 6b 65 6e 25 2c  68 69 25 2c 6f 6e 5f 76  |,token%,hi%,on_v|
000061c0  64 75 25 29 0d 24 7c 27  20 c8 99 20 67 65 74 65  |du%).$|' .. gete|
000061d0  6e 74 72 79 25 2c 73 74  61 63 6b 25 2c 74 6f 6b  |ntry%,stack%,tok|
000061e0  65 6e 25 20 b8 20 61 64  72 31 25 0d 24 86 20 20  |en% . adr1%.$.  |
000061f0  68 25 3d 28 61 64 72 31  25 21 33 36 29 80 31 3a  |h%=(adr1%!36).1:|
00006200  e7 20 68 69 25 20 68 69  25 3d 31 0d 24 90 40 20  |. hi% hi%=1.$.@ |
00006210  e7 20 68 69 25 20 61 64  72 31 25 21 33 36 3d 28  |. hi% adr1%!36=(|
00006220  61 64 72 31 25 21 33 36  29 84 31 20 8b 20 61 64  |adr1%!36).1 . ad|
00006230  72 31 25 21 33 36 3d 28  61 64 72 31 25 21 33 36  |r1%!36=(adr1%!36|
00006240  29 80 26 46 46 46 46 46  46 46 45 0d 24 9a 54 20  |).&FFFFFFFE.$.T |
00006250  e7 20 6f 6e 5f 76 64 75  25 20 80 20 68 25 3c 3e  |. on_vdu% . h%<>|
00006260  68 69 25 20 c8 99 20 66  6f 72 63 65 72 65 64 72  |hi% .. forceredr|
00006270  61 77 25 2c 6d 61 69 6e  5f 77 25 2c 61 64 72 31  |aw%,main_w%,adr1|
00006280  25 21 31 32 2c 61 64 72  31 25 21 31 36 2c 61 64  |%!12,adr1%!16,ad|
00006290  72 31 25 21 32 30 2c 61  64 72 31 25 21 32 34 0d  |r1%!20,adr1%!24.|
000062a0  24 a4 06 20 e1 0d 24 ae  04 0d 24 b8 13 20 dd a4  |$.. ..$...$.. ..|
000062b0  73 74 61 63 6b 28 70 61  67 65 25 29 0d 24 c2 0b  |stack(page%).$..|
000062c0  20 ea 20 61 64 72 25 0d  24 cc 27 20 c8 99 20 67  | . adr%.$.' .. g|
000062d0  65 74 65 6e 74 72 79 25  2c 73 5f 70 61 67 65 73  |etentry%,s_pages|
000062e0  25 2c 70 61 67 65 25 20  b8 20 61 64 72 25 0d 24  |%,page% . adr%.$|
000062f0  d6 33 20 e7 20 61 64 72  25 3d 30 20 84 20 61 64  |.3 . adr%=0 . ad|
00006300  72 25 21 32 30 3d 30 20  85 20 32 2c 22 62 61 64  |r%!20=0 . 2,"bad|
00006310  20 73 74 61 63 6b 20 66  72 6f 6d 20 70 61 67 65  | stack from page|
00006320  22 0d 24 e0 0d 20 3d 61  64 72 25 21 32 30 0d 24  |".$.. =adr%!20.$|
00006330  ea 04 0d 24 f4 20 20 dd  a4 77 68 69 63 68 5f 6f  |...$.  ..which_o|
00006340  62 6a 65 63 74 28 70 61  67 65 25 2c 78 25 2c 79  |bject(page%,x%,y|
00006350  25 29 0d 24 fe 19 20 73  74 61 63 6b 25 3d a4 73  |%).$.. stack%=.s|
00006360  74 61 63 6b 28 70 61 67  65 25 29 0d 25 08 23 20  |tack(page%).%.# |
00006370  c8 99 20 6e 65 6e 74 72  69 65 73 25 2c 73 74 61  |.. nentries%,sta|
00006380  63 6b 25 20 b8 20 6e 6f  25 3a 6f 25 3d 30 0d 25  |ck% . no%:o%=0.%|
00006390  12 0f 20 e7 20 6e 6f 25  3d 30 3a 3d 30 0d 25 1c  |.. . no%=0:=0.%.|
000063a0  11 20 e3 20 74 25 3d 31  20 b8 20 6e 6f 25 0d 25  |. . t%=1 . no%.%|
000063b0  26 29 20 20 20 c8 99 20  67 65 74 6e 74 68 25 2c  |&)   .. getnth%,|
000063c0  73 74 61 63 6b 25 2c 74  25 20 b8 20 61 64 72 25  |stack%,t% . adr%|
000063d0  2c 74 6f 6b 65 6e 25 0d  25 30 52 20 20 20 e7 20  |,token%.%0R   . |
000063e0  78 25 3e 3d 61 64 72 25  21 31 32 20 80 20 79 25  |x%>=adr%!12 . y%|
000063f0  3e 3d 61 64 72 25 21 31  36 20 80 20 78 25 3c 61  |>=adr%!16 . x%<a|
00006400  64 72 25 21 32 30 20 80  20 79 25 3c 61 64 72 25  |dr%!20 . y%<adr%|
00006410  21 32 34 20 80 20 28 28  61 64 72 25 21 33 36 29  |!24 . ((adr%!36)|
00006420  80 31 32 38 29 3d 30 20  8c 0d 25 3a 38 20 20 20  |.128)=0 ..%:8   |
00006430  20 20 6f 25 3d 74 6f 6b  65 6e 25 3a 6f 66 66 5f  |  o%=token%:off_|
00006440  6d 78 25 3d 78 25 2d 61  64 72 25 21 31 32 3a 6f  |mx%=x%-adr%!12:o|
00006450  66 66 5f 6d 79 25 3d 79  25 2d 61 64 72 25 21 31  |ff_my%=y%-adr%!1|
00006460  36 0d 25 44 08 20 20 20  cd 0d 25 4e 06 20 ed 0d  |6.%D.   ..%N. ..|
00006470  25 58 08 20 3d 6f 25 0d  25 62 04 0d 25 6c 21 20  |%X. =o%.%b..%l! |
00006480  dd f2 61 72 72 61 6e 67  65 5f 70 61 67 65 6c 69  |..arrange_pageli|
00006490  73 74 5f 77 63 28 70 61  67 65 25 29 0d 25 76 1f  |st_wc(page%).%v.|
000064a0  20 69 77 25 3d 32 38 30  3a 69 68 25 3d 2d 34 38  | iw%=280:ih%=-48|
000064b0  3a 70 6c 5f 74 69 63 6b  25 3d 30 0d 25 80 20 20  |:pl_tick%=0.%.  |
000064c0  c8 99 20 6e 65 6e 74 72  69 65 73 25 2c 73 5f 70  |.. nentries%,s_p|
000064d0  61 67 65 73 25 20 b8 20  6e 70 25 0d 25 8a 25 20  |ages% . np%.%.% |
000064e0  21 71 25 3d 30 3a 71 25  21 38 3d 69 77 25 2d 28  |!q%=0:q%!8=iw%-(|
000064f0  33 3c 3c 78 65 66 25 29  3a 71 25 21 31 32 3d 30  |3<<xef%):q%!12=0|
00006500  0d 25 94 26 20 e7 20 6e  70 25 3c 33 20 71 25 21  |.%.& . np%<3 q%!|
00006510  34 3d 69 68 25 2a 33 20  8b 20 71 25 21 34 3d 69  |4=ih%*3 . q%!4=i|
00006520  68 25 2a 6e 70 25 0d 25  9e 22 20 c8 99 20 73 65  |h%*np%.%." .. se|
00006530  74 65 78 74 65 6e 74 25  2c 70 61 67 65 6c 69 73  |textent%,pagelis|
00006540  74 5f 77 63 25 2c 71 25  0d 25 a8 17 20 69 79 25  |t_wc%,q%.%.. iy%|
00006550  3d 69 68 25 3a 63 75 72  5f 79 25 3d 69 79 25 0d  |=ih%:cur_y%=iy%.|
00006560  25 b2 12 20 e3 20 6c 6f  6f 70 25 3d 31 b8 6e 70  |%.. . loop%=1.np|
00006570  25 0d 25 bc 2e 20 20 20  c8 99 20 67 65 74 6e 74  |%.%..   .. getnt|
00006580  68 25 2c 73 5f 70 61 67  65 73 25 2c 6c 6f 6f 70  |h%,s_pages%,loop|
00006590  25 20 b8 20 61 64 72 25  2c 74 6f 6b 65 6e 25 0d  |% . adr%,token%.|
000065a0  25 c6 2d 20 20 20 e7 20  74 6f 6b 65 6e 25 3d 70  |%.-   . token%=p|
000065b0  61 67 65 25 20 63 75 72  5f 79 25 3d 69 79 25 3a  |age% cur_y%=iy%:|
000065c0  70 6c 5f 74 69 63 6b 25  3d 69 79 25 0d 25 d0 0f  |pl_tick%=iy%.%..|
000065d0  20 20 20 69 79 25 2b 3d  69 68 25 0d 25 da 06 20  |   iy%+=ih%.%.. |
000065e0  ed 0d 25 e4 22 20 21 71  25 3d 70 61 67 65 6c 69  |..%." !q%=pageli|
000065f0  73 74 5f 77 63 25 3a c8  99 20 67 65 74 77 25 2c  |st_wc%:.. getw%,|
00006600  2c 71 25 0d 25 ee 22 20  6f 66 66 79 25 3d 28 71  |,q%.%." offy%=(q|
00006610  25 21 31 36 2d 71 25 21  32 34 29 3a 73 79 25 3d  |%!16-q%!24):sy%=|
00006620  71 25 21 32 34 0d 25 f8  28 20 77 79 25 3d 28 71  |q%!24.%.( wy%=(q|
00006630  25 21 38 29 2d 6f 66 66  79 25 3a 77 79 31 25 3d  |%!8)-offy%:wy1%=|
00006640  28 71 25 21 31 36 29 2d  6f 66 66 79 25 0d 26 02  |(q%!16)-offy%.&.|
00006650  21 20 e7 20 63 75 72 5f  79 25 3c 77 79 25 20 73  |! . cur_y%<wy% s|
00006660  79 25 2b 3d 63 75 72 5f  79 25 2d 77 79 25 0d 26  |y%+=cur_y%-wy%.&|
00006670  0c 25 20 e7 20 63 75 72  5f 79 25 2d 69 68 25 3e  |.% . cur_y%-ih%>|
00006680  77 79 31 25 20 73 79 25  3d 63 75 72 5f 79 25 2d  |wy1% sy%=cur_y%-|
00006690  69 68 25 0d 26 16 0e 20  71 25 21 32 34 3d 73 79  |ih%.&.. q%!24=sy|
000066a0  25 0d 26 20 17 20 6f 25  3d 28 71 25 21 33 32 29  |%.& . o%=(q%!32)|
000066b0  80 28 31 3c 3c 31 36 29  0d 26 2a 12 20 c8 99 20  |.(1<<16).&*. .. |
000066c0  6f 70 65 6e 77 25 2c 2c  71 25 0d 26 34 0d 20 e7  |openw%,,q%.&4. .|
000066d0  20 6f 25 3d 30 20 8c 0d  26 3e 15 20 20 20 c8 99  | o%=0 ..&>.   ..|
000066e0  20 63 6c 6f 73 65 77 25  2c 2c 71 25 0d 26 48 06  | closew%,,q%.&H.|
000066f0  20 cc 0d 26 52 2f 20 20  20 c8 99 20 66 6f 72 63  | ..&R/   .. forc|
00006700  65 72 65 64 72 61 77 25  2c 2d 31 2c 71 25 21 34  |eredraw%,-1,q%!4|
00006710  2c 71 25 21 38 2c 71 25  21 31 32 2c 71 25 21 31  |,q%!8,q%!12,q%!1|
00006720  36 0d 26 5c 06 20 cd 0d  26 66 06 20 e1 0d 26 70  |6.&\. ..&f. ..&p|
00006730  04 0d 26 7a 2a 20 dd f2  64 72 61 77 5f 70 61 67  |..&z* ..draw_pag|
00006740  65 6c 69 73 74 5f 77 63  28 77 78 25 2c 77 79 25  |elist_wc(wx%,wy%|
00006750  2c 77 78 31 25 2c 77 79  31 25 29 0d 26 84 20 20  |,wx1%,wy1%).&.  |
00006760  c8 99 20 6e 65 6e 74 72  69 65 73 25 2c 73 5f 70  |.. nentries%,s_p|
00006770  61 67 65 73 25 20 b8 20  6e 70 25 0d 26 8e 31 20  |ages% . np%.&.1 |
00006780  c8 99 20 66 69 6e 64 66  6f 6e 74 25 2c 2c 69 63  |.. findfont%,,ic|
00006790  6f 6e 5f 66 6f 6e 74 24  2c 31 32 2a 31 36 2c 31  |on_font$,12*16,1|
000067a0  32 2a 31 36 20 b8 20 66  6f 6e 74 25 0d 26 98 2a  |2*16 . font%.&.*|
000067b0  20 69 68 25 3d 2d 34 38  3a 69 78 25 3d 30 3a 69  | ih%=-48:ix%=0:i|
000067c0  79 25 3d 69 68 25 3a 69  78 31 25 3d 32 38 30 3a  |y%=ih%:ix1%=280:|
000067d0  69 79 31 25 3d 30 0d 26  a2 11 20 e3 70 61 67 65  |iy1%=0.&.. .page|
000067e0  25 3d 31 b8 6e 70 25 0d  26 ac 38 20 20 20 e7 20  |%=1.np%.&.8   . |
000067f0  69 78 25 3c 3d 77 78 31  25 20 80 20 69 78 31 25  |ix%<=wx1% . ix1%|
00006800  3e 3d 77 78 25 20 80 20  69 79 25 3c 3d 77 79 31  |>=wx% . iy%<=wy1|
00006810  25 20 80 20 69 79 31 25  3e 3d 77 79 25 20 8c 0d  |% . iy1%>=wy% ..|
00006820  26 b6 30 20 20 20 20 20  c8 99 20 67 65 74 6e 74  |&.0     .. getnt|
00006830  68 25 2c 73 5f 70 61 67  65 73 25 2c 70 61 67 65  |h%,s_pages%,page|
00006840  25 20 b8 20 61 64 72 25  2c 74 6f 6b 65 6e 25 0d  |% . adr%,token%.|
00006850  26 c0 19 20 20 20 20 20  e7 20 69 79 25 3d 70 6c  |&..     . iy%=pl|
00006860  5f 74 69 63 6b 25 20 8c  0d 26 ca 32 20 20 20 20  |_tick% ..&.2    |
00006870  20 20 20 21 71 25 3d 69  78 25 3a 71 25 21 34 3d  |   !q%=ix%:q%!4=|
00006880  69 79 25 3a 71 25 21 38  3d 69 78 25 2b 33 38 3a  |iy%:q%!8=ix%+38:|
00006890  71 25 21 31 32 3d 69 79  31 25 0d 26 d4 2d 20 20  |q%!12=iy1%.&.-  |
000068a0  20 20 20 20 20 71 25 21  31 36 3d 26 37 30 30 30  |     q%!16=&7000|
000068b0  30 31 39 3a f2 73 74 72  69 6e 67 30 28 71 25 2b  |019:.string0(q%+|
000068c0  32 30 2c 22 80 22 29 0d  26 de 1b 20 20 20 20 20  |20,".").&..     |
000068d0  20 20 c8 99 20 70 6c 6f  74 69 63 6f 6e 25 2c 2c  |  .. ploticon%,,|
000068e0  71 25 0d 26 e8 0a 20 20  20 20 20 cd 0d 26 f2 34  |q%.&..     ..&.4|
000068f0  20 20 20 20 20 21 71 25  3d 69 78 25 2b 33 38 3a  |     !q%=ix%+38:|
00006900  71 25 21 34 3d 69 79 25  3a 71 25 21 38 3d 69 78  |q%!4=iy%:q%!8=ix|
00006910  25 2b 32 38 30 3a 71 25  21 31 32 3d 69 79 31 25  |%+280:q%!12=iy1%|
00006920  0d 26 fc 3d 20 20 20 20  20 71 25 21 31 36 3d 66  |.&.=     q%!16=f|
00006930  6f 6e 74 25 3c 3c 32 34  20 84 20 26 31 37 31 3a  |ont%<<24 . &171:|
00006940  71 25 21 32 30 3d 61 64  72 25 2b 34 3a 71 25 21  |q%!20=adr%+4:q%!|
00006950  32 34 3d 30 3a 71 25 21  33 32 3d 31 32 0d 27 06  |24=0:q%!32=12.'.|
00006960  19 20 20 20 20 20 c8 99  20 70 6c 6f 74 69 63 6f  |.     .. plotico|
00006970  6e 25 2c 2c 71 25 0d 27  10 08 20 20 20 cd 0d 27  |n%,,q%.'..   ..'|
00006980  1a 19 20 20 20 69 79 25  2b 3d 69 68 25 3a 69 79  |..   iy%+=ih%:iy|
00006990  31 25 2b 3d 69 68 25 0d  27 24 06 20 ed 0d 27 2e  |1%+=ih%.'$. ..'.|
000069a0  17 20 c8 99 20 6c 6f 73  65 66 6f 6e 74 25 2c 66  |. .. losefont%,f|
000069b0  6f 6e 74 25 0d 27 38 15  20 21 71 25 3d 70 61 67  |ont%.'8. !q%=pag|
000069c0  65 6c 69 73 74 5f 77 63  25 0d 27 42 06 20 e1 0d  |elist_wc%.'B. ..|
000069d0  27 4c 04 0d 27 56 20 20  dd a4 70 74 5f 66 72 6f  |'L..'V  ..pt_fro|
000069e0  6d 5f 63 6f 6e 74 65 78  74 28 63 6f 6e 74 65 78  |m_context(contex|
000069f0  74 25 29 0d 27 60 12 20  c8 8e 20 63 6f 6e 74 65  |t%).'`. .. conte|
00006a00  78 74 25 20 ca 0d 27 6a  18 20 20 20 c9 20 73 5f  |xt% ..'j.   . s_|
00006a10  6d 6f 75 73 65 64 72 61  67 25 3a 3d 34 0d 27 74  |mousedrag%:=4.'t|
00006a20  14 20 20 20 c9 20 73 5f  6f 66 74 65 6e 25 3a 3d  |.   . s_often%:=|
00006a30  38 0d 27 7e 17 20 20 20  c9 20 73 5f 70 6f 69 6e  |8.'~.   . s_poin|
00006a40  74 65 72 25 3a 3d 31 36  0d 27 88 15 20 20 20 c9  |ter%:=16.'..   .|
00006a50  20 73 5f 6d 6f 75 73 65  25 3a 3d 32 30 0d 27 92  | s_mouse%:=20.'.|
00006a60  19 20 20 20 c9 20 73 5f  70 61 67 65 73 68 6f 77  |.   . s_pageshow|
00006a70  6e 25 3a 3d 33 32 0d 27  9c 06 20 cb 0d 27 a6 07  |n%:=32.'.. ..'..|
00006a80  20 3d 30 0d 27 b0 04 0d  27 ba 1e 20 dd a4 6e 61  | =0.'...'.. ..na|
00006a90  6d 65 5f 65 78 73 69 73  74 73 28 73 74 61 63 6b  |me_exsists(stack|
00006aa0  25 2c 66 24 29 0d 27 c4  1e 20 c8 99 20 6e 65 6e  |%,f$).'.. .. nen|
00006ab0  74 72 69 65 73 25 2c 73  74 61 63 6b 25 20 b8 20  |tries%,stack% . |
00006ac0  6e 65 25 0d 27 ce 0f 20  e7 20 6e 65 25 3d 30 3a  |ne%.'.. . ne%=0:|
00006ad0  3d 30 0d 27 d8 1c 20 66  25 3d 30 3a 66 24 3d a4  |=0.'.. f%=0:f$=.|
00006ae0  6c 6f 77 65 72 5f 63 61  73 65 28 66 24 29 0d 27  |lower_case(f$).'|
00006af0  e2 12 20 e3 65 6e 74 72  79 25 3d 31 b8 6e 65 25  |.. .entry%=1.ne%|
00006b00  0d 27 ec 2d 20 20 20 c8  99 20 67 65 74 6e 74 68  |.'.-   .. getnth|
00006b10  25 2c 73 74 61 63 6b 25  2c 65 6e 74 72 79 25 20  |%,stack%,entry% |
00006b20  b8 20 61 64 72 25 2c 74  6f 6b 65 6e 25 0d 27 f6  |. adr%,token%.'.|
00006b30  33 20 20 20 e7 20 66 24  3d a4 6c 6f 77 65 72 5f  |3   . f$=.lower_|
00006b40  63 61 73 65 28 a4 73 74  72 69 6e 67 30 28 61 64  |case(.string0(ad|
00006b50  72 25 2b 34 29 29 20 66  25 3d 74 6f 6b 65 6e 25  |r%+4)) f%=token%|
00006b60  0d 28 00 0a 20 ed 3a 3d  66 25 0d 28 0a 04 0d 28  |.(.. .:=f%.(...(|
00006b70  14 10 20 dd f2 73 69 7a  65 5f 70 61 67 65 0d 28  |.. ..size_page.(|
00006b80  1e 1e 20 21 71 25 3d 6d  61 69 6e 5f 77 25 3a c8  |.. !q%=main_w%:.|
00006b90  99 20 67 65 74 77 69 25  2c 2c 71 25 0d 28 28 28  |. getwi%,,q%.(((|
00006ba0  20 e7 20 28 71 25 21 33  32 29 80 28 31 3c 3c 31  | . (q%!32).(1<<1|
00006bb0  36 29 20 6f 70 65 6e 25  3d b9 20 8b 20 6f 70 65  |6) open%=. . ope|
00006bc0  6e 25 3d a3 0d 28 32 1f  20 c8 99 20 22 57 69 6d  |n%=..(2. .. "Wim|
00006bd0  70 5f 44 65 6c 65 74 65  57 69 6e 64 6f 77 22 2c  |p_DeleteWindow",|
00006be0  2c 71 25 0d 28 3c 0e 20  62 68 25 3d 71 25 21 32  |,q%.(<. bh%=q%!2|
00006bf0  38 0d 28 46 10 20 70 6f  72 74 72 61 69 74 25 3d  |8.(F. portrait%=|
00006c00  a3 0d 28 50 14 20 c8 8e  20 70 61 67 65 5f 73 69  |..(P. .. page_si|
00006c10  7a 65 25 20 ca 0d 28 5a  20 20 20 20 c9 20 31 3a  |ze% ..(Z    . 1:|
00006c20  71 25 21 35 32 3d 31 32  37 39 3a 71 25 21 34 38  |q%!52=1279:q%!48|
00006c30  3d 2d 39 32 30 0d 28 64  21 20 20 20 c9 20 32 3a  |=-920.(d!   . 2:|
00006c40  71 25 21 35 32 3d 31 35  39 39 3a 71 25 21 34 38  |q%!52=1599:q%!48|
00006c50  3d 2d 31 31 36 30 0d 28  6e 21 20 20 20 c9 20 33  |=-1160.(n!   . 3|
00006c60  3a 71 25 21 35 32 3d 32  30 34 36 3a 71 25 21 34  |:q%!52=2046:q%!4|
00006c70  38 3d 2d 31 35 30 30 0d  28 78 2d 20 20 20 c9 20  |8=-1500.(x-   . |
00006c80  34 3a 71 25 21 35 32 3d  31 33 32 30 3a 71 25 21  |4:q%!52=1320:q%!|
00006c90  34 38 3d 2d 32 30 30 30  3a 70 6f 72 74 72 61 69  |48=-2000:portrai|
00006ca0  74 25 3d b9 0d 28 82 1e  20 20 20 7f 3a 71 25 21  |t%=..(..   .:q%!|
00006cb0  35 32 3d 31 32 37 39 3a  71 25 21 34 38 3d 2d 39  |52=1279:q%!48=-9|
00006cc0  32 30 0d 28 8c 06 20 cb  0d 28 96 2b 20 c8 99 20  |20.(.. ..(.+ .. |
00006cd0  22 57 69 6d 70 5f 43 72  65 61 74 65 57 69 6e 64  |"Wimp_CreateWind|
00006ce0  6f 77 22 2c 2c 71 25 2b  34 20 b8 20 6d 61 69 6e  |ow",,q%+4 . main|
00006cf0  5f 77 25 0d 28 a0 55 20  21 71 25 3d 6d 61 69 6e  |_w%.(.U !q%=main|
00006d00  5f 77 25 3a c8 99 20 67  65 74 77 25 2c 2c 71 25  |_w%:.. getw%,,q%|
00006d10  3a f2 6f 70 65 6e 5f 77  69 6e 64 6f 77 28 21 71  |:.open_window(!q|
00006d20  25 2c 71 25 21 34 2c 71  25 21 38 2c 71 25 21 31  |%,q%!4,q%!8,q%!1|
00006d30  32 2c 71 25 21 31 36 2c  71 25 21 32 30 2c 71 25  |2,q%!16,q%!20,q%|
00006d40  21 32 34 2c 62 68 25 29  0d 28 aa 06 20 e1 0d 28  |!24,bh%).(.. ..(|
00006d50  b4 04 0d 28 be 50 f4 20  2a 2a 2a 2a 2a 2a 2a 2a  |...(.P. ********|
00006d60  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
00006d70  2a 2a 2a 2a 2a 20 63 6c  69 63 6b 73 20 62 65 6c  |***** clicks bel|
00006d80  6f 77 20 68 65 72 65 20  2a 2a 2a 2a 2a 2a 2a 2a  |ow here ********|
00006d90  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
00006da0  2a 2a 0d 28 c8 04 0d 28  d2 13 20 dd f2 62 65 67  |**.(...(.. ..beg|
00006db0  69 6e 5f 74 72 79 69 6e  67 0d 28 dc 0e 20 74 72  |in_trying.(.. tr|
00006dc0  79 69 6e 67 25 3d b9 0d  28 e6 16 20 63 6c 69 63  |ying%=..(.. clic|
00006dd0  6b 5f 75 6e 64 65 72 77  61 79 25 3d a3 0d 28 f0  |k_underway%=..(.|
00006de0  10 20 70 61 75 73 65 5f  6f 6e 25 3d a3 0d 28 fa  |. pause_on%=..(.|
00006df0  16 20 70 6f 69 6e 74 65  72 5f 6f 62 6a 65 63 74  |. pointer_object|
00006e00  25 3d 30 0d 29 04 0e 20  69 6e 70 75 74 24 3d 22  |%=0.).. input$="|
00006e10  22 0d 29 0e 15 20 f2 7a  65 72 6f 5f 70 61 67 65  |".).. .zero_page|
00006e20  5f 73 74 61 63 6b 0d 29  18 11 20 f2 70 72 65 5f  |_stack.).. .pre_|
00006e30  70 72 6f 63 65 73 73 0d  29 22 1e 20 f2 73 68 6f  |process.)". .sho|
00006e40  77 5f 70 61 67 65 28 63  75 72 72 65 6e 74 5f 70  |w_page(current_p|
00006e50  61 67 65 25 29 0d 29 2c  16 20 e7 20 73 63 61 6e  |age%).),. . scan|
00006e60  6e 69 6e 67 25 20 f2 73  63 61 6e 0d 29 36 1d 20  |ning% .scan.)6. |
00006e70  ff 20 22 73 65 74 20 55  6f 62 6a 65 63 74 20 22  |. "set Uobject "|
00006e80  2b bd 33 34 2b bd 33 34  0d 29 40 1d 20 ff 20 22  |+.34+.34.)@. . "|
00006e90  73 65 74 20 55 73 74 61  74 75 73 20 22 2b bd 33  |set Ustatus "+.3|
00006ea0  34 2b bd 33 34 0d 29 4a  0f 20 73 74 61 74 75 73  |4+.34.)J. status|
00006eb0  24 3d 22 22 0d 29 54 06  20 e1 0d 29 5e 04 0d 29  |$="".)T. ..)^..)|
00006ec0  68 0e 20 dd f2 64 65 6c  69 67 68 74 0d 29 72 21  |h. ..delight.)r!|
00006ed0  20 73 74 61 63 6b 25 3d  a4 73 74 61 63 6b 28 63  | stack%=.stack(c|
00006ee0  75 72 72 65 6e 74 5f 70  61 67 65 25 29 0d 29 7c  |urrent_page%).)||
00006ef0  1e 20 c8 99 20 6e 65 6e  74 72 69 65 73 25 2c 73  |. .. nentries%,s|
00006f00  74 61 63 6b 25 20 b8 20  6e 6f 25 0d 29 86 0c 20  |tack% . no%.).. |
00006f10  e7 20 6e 6f 25 20 8c 0d  29 90 16 20 20 20 e3 20  |. no% ..)..   . |
00006f20  6f 62 6a 65 63 74 25 3d  31 b8 6e 6f 25 0d 29 9a  |object%=1.no%.).|
00006f30  29 20 20 20 20 20 c8 99  20 67 65 74 6e 74 68 25  |)     .. getnth%|
00006f40  2c 73 74 61 63 6b 25 2c  6f 62 6a 65 63 74 25 20  |,stack%,object% |
00006f50  b8 20 61 64 72 25 0d 29  a4 2b 20 20 20 20 20 e7  |. adr%.).+     .|
00006f60  20 61 64 72 25 21 33 36  20 80 20 31 20 61 64 72  | adr%!36 . 1 adr|
00006f70  25 21 33 36 3d 28 61 64  72 25 21 33 36 29 80 2d  |%!36=(adr%!36).-|
00006f80  32 0d 29 ae 08 20 20 20  ed 0d 29 b8 06 20 cd 0d  |2.)..   ..).. ..|
00006f90  29 c2 37 20 e7 20 73 70  65 61 6b 5f 74 6f 6b 65  |).7 . speak_toke|
00006fa0  6e 25 20 f2 75 70 64 61  74 65 5f 6f 62 6a 65 63  |n% .update_objec|
00006fb0  74 28 73 74 61 63 6b 25  2c 73 70 65 61 6b 5f 74  |t(stack%,speak_t|
00006fc0  6f 6b 65 6e 25 29 0d 29  cc 06 20 e1 0d 29 d6 04  |oken%).).. ..)..|
00006fd0  0d 29 e0 44 20 dd f2 7a  65 72 6f 5f 70 61 67 65  |.).D ..zero_page|
00006fe0  5f 73 74 61 63 6b 3a e3  54 25 3d 30 b8 31 30 32  |_stack:.T%=0.102|
00006ff0  30 88 34 3a 54 25 21 70  61 67 65 5f 73 74 61 63  |0.4:T%!page_stac|
00007000  6b 25 3d 30 3a ed 3a 70  61 67 65 5f 70 74 72 25  |k%=0:.:page_ptr%|
00007010  3d 30 3a e1 0d 29 ea 04  0d 29 f4 12 20 dd f2 70  |=0:..)...).. ..p|
00007020  72 65 5f 70 72 6f 63 65  73 73 0d 29 fe 16 20 70  |re_process.).. p|
00007030  6f 69 6e 74 65 72 5f 6f  62 6a 65 63 74 25 3d 30  |ointer_object%=0|
00007040  0d 2a 08 13 20 70 6f 69  6e 74 65 72 5f 69 6e 74  |.*.. pointer_int|
00007050  25 3d 30 0d 2a 12 11 20  6f 66 74 65 6e 5f 69 6e  |%=0.*.. often_in|
00007060  74 25 3d 30 0d 2a 1c 0f  20 73 65 71 5f 69 6e 74  |t%=0.*.. seq_int|
00007070  25 3d 30 0d 2a 26 13 20  73 63 61 6e 5f 6f 62 6a  |%=0.*&. scan_obj|
00007080  65 63 74 25 3d 30 0d 2a  30 32 20 73 70 65 61 6b  |ect%=0.*02 speak|
00007090  69 6e 67 5f 74 65 78 74  25 3d 30 3a 73 70 65 61  |ing_text%=0:spea|
000070a0  6b 5f 77 6f 72 64 25 3d  30 3a 73 70 65 61 6b 5f  |k_word%=0:speak_|
000070b0  74 6f 6b 65 6e 25 3d 30  0d 2a 3a 12 20 70 6f 69  |token%=0.*:. poi|
000070c0  6e 74 65 72 5f 6f 6e 25  3d b9 0d 2a 44 10 20 74  |nter_on%=..*D. t|
000070d0  72 79 5f 74 69 6d 65 25  3d 91 0d 2a 4e 06 20 f5  |ry_time%=..*N. .|
000070e0  0d 2a 58 24 20 20 c8 99  20 6e 65 6e 74 72 69 65  |.*X$  .. nentrie|
000070f0  73 25 2c 73 5f 73 65 71  75 65 6e 63 65 73 25 20  |s%,s_sequences% |
00007100  b8 20 73 25 0d 2a 62 0c  20 20 e7 20 73 25 20 8c  |. s%.*b.  . s% .|
00007110  0d 2a 6c 2f 20 20 20 20  c8 99 20 67 65 74 6e 74  |.*l/    .. getnt|
00007120  68 25 2c 73 5f 73 65 71  75 65 6e 63 65 73 25 2c  |h%,s_sequences%,|
00007130  31 20 b8 20 61 64 72 25  2c 74 6f 6b 65 6e 25 0d  |1 . adr%,token%.|
00007140  2a 76 43 20 20 20 20 c8  99 20 6b 69 6c 6c 65 6e  |*vC    .. killen|
00007150  74 72 79 25 2c 73 5f 73  65 71 75 65 6e 63 65 73  |try%,s_sequences|
00007160  25 2c 74 6f 6b 65 6e 25  3a f4 20 20 20 20 20 63  |%,token%:.     c|
00007170  6c 65 61 72 20 61 6c 6c  20 73 65 71 75 65 6e 63  |lear all sequenc|
00007180  65 73 0d 2a 80 07 20 20  cd 0d 2a 8a 0a 20 fd 73  |es.*..  ..*.. .s|
00007190  25 3d 30 0d 2a 94 06 20  f5 0d 2a 9e 23 20 20 c8  |%=0.*.. ..*.#  .|
000071a0  99 20 6e 65 6e 74 72 69  65 73 25 2c 73 5f 63 6c  |. nentries%,s_cl|
000071b0  69 63 6b 73 6f 6e 25 20  b8 20 73 25 0d 2a a8 0c  |ickson% . s%.*..|
000071c0  20 20 e7 20 73 25 20 8c  0d 2a b2 2a 20 20 20 20  |  . s% ..*.*    |
000071d0  c8 99 20 67 65 74 6e 74  68 25 2c 73 5f 63 6c 69  |.. getnth%,s_cli|
000071e0  63 6b 73 6f 6e 25 2c 31  20 b8 20 2c 74 6f 6b 65  |ckson%,1 . ,toke|
000071f0  6e 25 0d 2a bc 3f 20 20  20 20 c8 99 20 6b 69 6c  |n%.*.?    .. kil|
00007200  6c 65 6e 74 72 79 25 2c  73 5f 63 6c 69 63 6b 73  |lentry%,s_clicks|
00007210  6f 6e 25 2c 74 6f 6b 65  6e 25 3a f4 20 20 20 20  |on%,token%:.    |
00007220  20 63 6c 65 61 72 20 61  6c 6c 20 63 6c 69 63 6b  | clear all click|
00007230  73 0d 2a c6 07 20 20 cd  0d 2a d0 0a 20 fd 73 25  |s.*..  ..*.. .s%|
00007240  3d 30 0d 2a da 21 20 73  74 61 63 6b 25 3d a4 73  |=0.*.! stack%=.s|
00007250  74 61 63 6b 28 63 75 72  72 65 6e 74 5f 70 61 67  |tack(current_pag|
00007260  65 25 29 0d 2a e4 2f 20  c8 99 20 67 65 74 65 6e  |e%).*./ .. geten|
00007270  74 72 79 25 2c 73 5f 70  61 67 65 73 25 2c 63 75  |try%,s_pages%,cu|
00007280  72 72 65 6e 74 5f 70 61  67 65 25 20 b8 20 61 64  |rrent_page% . ad|
00007290  72 25 0d 2a ee 32 20 e7  20 61 64 72 25 21 32 34  |r%.*.2 . adr%!24|
000072a0  20 c8 99 20 77 72 69 74  65 73 74 61 74 75 73 25  | .. writestatus%|
000072b0  2c 73 5f 63 6c 69 63 6b  73 25 2c 61 64 72 25 21  |,s_clicks%,adr%!|
000072c0  32 34 2c 30 0d 2a f8 1e  20 c8 99 20 6e 65 6e 74  |24,0.*.. .. nent|
000072d0  72 69 65 73 25 2c 73 74  61 63 6b 25 20 b8 20 6e  |ries%,stack% . n|
000072e0  6f 25 0d 2b 02 0c 20 e7  20 6e 6f 25 20 8c 0d 2b  |o%.+.. . no% ..+|
000072f0  0c 16 20 20 20 e3 20 6f  62 6a 65 63 74 25 3d 31  |..   . object%=1|
00007300  b8 6e 6f 25 0d 2b 16 29  20 20 20 20 20 c8 99 20  |.no%.+.)     .. |
00007310  67 65 74 6e 74 68 25 2c  73 74 61 63 6b 25 2c 6f  |getnth%,stack%,o|
00007320  62 6a 65 63 74 25 20 b8  20 61 64 72 25 0d 2b 20  |bject% . adr%.+ |
00007330  61 20 20 20 20 20 61 64  72 25 21 33 36 3d 28 61  |a     adr%!36=(a|
00007340  64 72 25 21 33 36 29 80  26 46 46 46 46 46 46 33  |dr%!36).&FFFFFF3|
00007350  45 3a f4 20 20 20 20 20  65 6e 73 75 72 65 20 61  |E:.     ensure a|
00007360  6c 6c 20 6f 62 6a 65 63  74 73 20 73 68 6f 77 6e  |ll objects shown|
00007370  2c 20 75 6e 73 65 6c 65  63 74 65 64 20 61 6e 64  |, unselected and|
00007380  20 75 6e 68 69 67 68 6c  69 67 68 74 65 64 0d 2b  | unhighlighted.+|
00007390  2a 17 20 20 20 20 20 63  6c 69 63 6b 25 3d 61 64  |*.     click%=ad|
000073a0  72 25 21 32 38 0d 2b 34  68 20 20 20 20 20 e7 20  |r%!28.+4h     . |
000073b0  63 6c 69 63 6b 25 20 c8  99 20 77 72 69 74 65 73  |click% .. writes|
000073c0  74 61 74 75 73 25 2c 73  5f 63 6c 69 63 6b 73 25  |tatus%,s_clicks%|
000073d0  2c 63 6c 69 63 6b 25 2c  30 3a f4 20 20 20 20 20  |,click%,0:.     |
000073e0  20 20 20 20 20 7a 65 72  6f 20 73 74 61 74 75 73  |     zero status|
000073f0  20 74 6f 20 61 76 6f 69  64 20 72 65 70 65 74 69  | to avoid repeti|
00007400  74 69 6f 6e 20 6f 66 20  63 6c 69 63 6b 0d 2b 3e  |tion of click.+>|
00007410  08 20 20 20 ed 0d 2b 48  06 20 cd 0d 2b 52 14 20  |.   ..+H. ..+R. |
00007420  e3 20 6f 62 6a 65 63 74  25 3d 30 b8 6e 6f 25 0d  |. object%=0.no%.|
00007430  2b 5c 14 20 20 20 e7 20  6f 62 6a 65 63 74 25 3d  |+\.   . object%=|
00007440  30 20 8c 0d 2b 66 33 20  20 20 20 20 c8 99 20 67  |0 ..+f3     .. g|
00007450  65 74 65 6e 74 72 79 25  2c 73 5f 70 61 67 65 73  |etentry%,s_pages|
00007460  25 2c 63 75 72 72 65 6e  74 5f 70 61 67 65 25 20  |%,current_page% |
00007470  b8 20 61 64 72 25 0d 2b  70 17 20 20 20 20 20 63  |. adr%.+p.     c|
00007480  6c 69 63 6b 25 3d 61 64  72 25 21 32 34 0d 2b 7a  |lick%=adr%!24.+z|
00007490  08 20 20 20 cc 0d 2b 84  29 20 20 20 20 20 c8 99  |.   ..+.)     ..|
000074a0  20 67 65 74 6e 74 68 25  2c 73 74 61 63 6b 25 2c  | getnth%,stack%,|
000074b0  6f 62 6a 65 63 74 25 20  b8 20 61 64 72 25 0d 2b  |object% . adr%.+|
000074c0  8e 17 20 20 20 20 20 63  6c 69 63 6b 25 3d 61 64  |..     click%=ad|
000074d0  72 25 21 32 38 0d 2b 98  08 20 20 20 cd 0d 2b a2  |r%!28.+..   ..+.|
000074e0  11 20 20 20 e7 20 63 6c  69 63 6b 25 20 8c 0d 2b  |.   . click% ..+|
000074f0  ac 2d 20 20 20 20 20 c8  99 20 67 65 74 65 6e 74  |.-     .. getent|
00007500  72 79 25 2c 73 5f 63 6c  69 63 6b 73 25 2c 63 6c  |ry%,s_clicks%,cl|
00007510  69 63 6b 25 20 b8 20 61  64 72 25 0d 2b b6 2d 20  |ick% . adr%.+.- |
00007520  20 20 20 20 c8 99 20 72  65 61 64 73 74 61 74 75  |    .. readstatu|
00007530  73 25 2c 73 5f 63 6c 69  63 6b 73 25 2c 63 6c 69  |s%,s_clicks%,cli|
00007540  63 6b 25 20 b8 20 73 25  0d 2b c0 11 20 20 20 20  |ck% . s%.+..    |
00007550  20 e7 20 73 25 3d 30 20  8c 0d 2b ca 2d 20 20 20  | . s%=0 ..+.-   |
00007560  20 20 20 20 c8 99 20 77  72 69 74 65 73 74 61 74  |    .. writestat|
00007570  75 73 25 2c 73 5f 63 6c  69 63 6b 73 25 2c 63 6c  |us%,s_clicks%,cl|
00007580  69 63 6b 25 2c 31 0d 2b  d4 35 20 20 20 20 20 20  |ick%,1.+.5      |
00007590  20 e7 20 61 64 72 25 21  34 20 f2 70 72 65 5f 63  | . adr%!4 .pre_c|
000075a0  6c 69 63 6b 28 73 5f 6d  6f 75 73 65 64 72 61 67  |lick(s_mousedrag|
000075b0  25 2c 61 64 72 25 21 34  2c 30 29 0d 2b de 15 20  |%,adr%!4,0).+.. |
000075c0  20 20 20 20 20 20 e7 20  61 64 72 25 21 38 20 8c  |      . adr%!8 .|
000075d0  0d 2b e8 19 20 20 20 20  20 20 20 20 20 6f 66 74  |.+..         oft|
000075e0  65 6e 5f 69 6e 74 25 3d  b9 0d 2b f2 26 20 20 20  |en_int%=..+.&   |
000075f0  20 20 20 20 20 20 61 64  72 25 21 32 34 3d 74 72  |      adr%!24=tr|
00007600  79 5f 74 69 6d 65 25 2b  61 64 72 25 21 31 32 0d  |y_time%+adr%!12.|
00007610  2b fc 2a 20 20 20 20 20  20 20 20 20 f2 70 72 65  |+.*         .pre|
00007620  5f 63 6c 69 63 6b 28 73  5f 6f 66 74 65 6e 25 2c  |_click(s_often%,|
00007630  61 64 72 25 21 38 2c 31  29 0d 2c 06 0c 20 20 20  |adr%!8,1).,..   |
00007640  20 20 20 20 cd 0d 2c 10  16 20 20 20 20 20 20 20  |    ..,..       |
00007650  e7 20 61 64 72 25 21 31  36 20 8c 0d 2c 1a 1b 20  |. adr%!16 ..,.. |
00007660  20 20 20 20 20 20 20 20  70 6f 69 6e 74 65 72 5f  |        pointer_|
00007670  69 6e 74 25 3d b9 0d 2c  24 2d 20 20 20 20 20 20  |int%=..,$-      |
00007680  20 20 20 f2 70 72 65 5f  63 6c 69 63 6b 28 73 5f  |   .pre_click(s_|
00007690  70 6f 69 6e 74 65 72 25  2c 61 64 72 25 21 31 36  |pointer%,adr%!16|
000076a0  2c 31 29 0d 2c 2e 0c 20  20 20 20 20 20 20 cd 0d  |,1).,..       ..|
000076b0  2c 38 33 20 20 20 20 20  20 20 e7 20 61 64 72 25  |,83       . adr%|
000076c0  21 32 30 20 f2 70 72 65  5f 63 6c 69 63 6b 28 73  |!20 .pre_click(s|
000076d0  5f 6d 6f 75 73 65 25 2c  61 64 72 25 21 32 30 2c  |_mouse%,adr%!20,|
000076e0  31 29 0d 2c 42 16 20 20  20 20 20 20 20 e7 20 61  |1).,B.       . a|
000076f0  64 72 25 21 33 32 20 8c  0d 2c 4c 2f 20 20 20 20  |dr%!32 ..,L/    |
00007700  20 20 20 20 20 f2 70 72  65 5f 63 6c 69 63 6b 28  |     .pre_click(|
00007710  73 5f 70 61 67 65 73 68  6f 77 6e 25 2c 61 64 72  |s_pageshown%,adr|
00007720  25 21 33 32 2c 31 29 0d  2c 56 2c 20 20 20 20 20  |%!32,1).,V,     |
00007730  20 20 20 20 f2 64 6f 5f  63 6c 69 63 6b 28 73 5f  |    .do_click(s_|
00007740  70 61 67 65 73 68 6f 77  6e 25 2c 61 64 72 25 21  |pageshown%,adr%!|
00007750  33 32 29 0d 2c 60 0c 20  20 20 20 20 20 20 cd 0d  |32).,`.       ..|
00007760  2c 6a 0a 20 20 20 20 20  cd 0d 2c 74 08 20 20 20  |,j.     ..,t.   |
00007770  cd 0d 2c 7e 06 20 ed 0d  2c 88 06 20 e1 0d 2c 92  |..,~. ..,.. ..,.|
00007780  04 0d 2c 9c 26 20 dd f2  70 72 65 5f 63 6c 69 63  |..,.& ..pre_clic|
00007790  6b 28 63 6f 6e 74 65 78  74 25 2c 63 6c 69 63 6b  |k(context%,click|
000077a0  25 2c 73 65 71 25 29 0d  2c a6 0b 20 ea 20 61 64  |%,seq%).,.. . ad|
000077b0  72 25 0d 2c b0 28 20 c8  99 20 67 65 74 65 6e 74  |r%.,.( .. getent|
000077c0  72 79 25 2c 63 6f 6e 74  65 78 74 25 2c 63 6c 69  |ry%,context%,cli|
000077d0  63 6b 25 20 b8 20 61 64  72 25 0d 2c ba 1c 20 65  |ck% . adr%.,.. e|
000077e0  6e 64 25 3d 61 64 72 25  2b 21 61 64 72 25 3a 61  |nd%=adr%+!adr%:a|
000077f0  64 72 25 2b 3d 34 0d 2c  c4 06 20 f5 0d 2c ce 1d  |dr%+=4.,.. ..,..|
00007800  20 20 20 6c 65 6e 25 3d  21 61 64 72 25 3a 63 6d  |   len%=!adr%:cm|
00007810  64 25 3d 61 64 72 25 21  34 0d 2c d8 10 20 20 20  |d%=adr%!4.,..   |
00007820  c8 8e 20 63 6d 64 25 20  ca 0d 2c e2 38 20 20 20  |.. cmd% ..,.8   |
00007830  20 20 c9 20 31 2c 33 2c  34 3a e7 20 73 65 71 25  |  . 1,3,4:. seq%|
00007840  3d 30 20 f2 70 72 65 5f  6c 69 73 74 28 63 6d 64  |=0 .pre_list(cmd|
00007850  25 2c 61 64 72 25 2b 38  2c 6c 65 6e 25 2d 31 32  |%,adr%+8,len%-12|
00007860  29 0d 2c ec 41 20 20 20  20 20 c9 20 35 3a e7 20  |).,.A     . 5:. |
00007870  63 6f 6e 74 65 78 74 25  3d 73 5f 70 61 67 65 73  |context%=s_pages|
00007880  68 6f 77 6e 25 20 80 20  73 65 71 25 3d 30 20 f2  |hown% . seq%=0 .|
00007890  70 6c 61 79 5f 73 6f 75  6e 64 28 61 64 72 25 21  |play_sound(adr%!|
000078a0  38 29 0d 2c f6 0d 20 20  20 20 20 c9 20 37 3a 0d  |8).,..     . 7:.|
000078b0  2d 00 13 20 20 20 20 20  20 20 e7 20 73 65 71 25  |-..       . seq%|
000078c0  20 8c 0d 2d 0a 17 20 20  20 20 20 20 20 20 20 73  | ..-..         s|
000078d0  65 71 5f 69 6e 74 25 3d  b9 0d 2d 14 30 20 20 20  |eq_int%=..-.0   |
000078e0  20 20 20 20 20 20 66 6c  61 67 25 3d 61 64 72 25  |      flag%=adr%|
000078f0  21 31 32 3a 73 25 3d 61  64 72 25 2b 33 36 3a 65  |!12:s%=adr%+36:e|
00007900  25 3d 6c 65 6e 25 2d 34  30 0d 2d 1e 2e 20 20 20  |%=len%-40.-..   |
00007910  20 20 20 20 20 20 e7 20  66 6c 61 67 25 20 80 20  |      . flag% . |
00007920  34 20 73 25 3d 61 64 72  25 2b 34 30 3a 65 25 3d  |4 s%=adr%+40:e%=|
00007930  6c 65 6e 25 2d 34 34 0d  2d 28 1f 20 20 20 20 20  |len%-44.-(.     |
00007940  20 20 20 20 f2 70 72 65  5f 6c 69 73 74 28 33 2c  |    .pre_list(3,|
00007950  73 25 2c 65 25 29 0d 2d  32 0c 20 20 20 20 20 20  |s%,e%).-2.      |
00007960  20 cd 0d 2d 3c 08 20 20  20 cb 0d 2d 46 11 20 20  | ..-<.   ..-F.  |
00007970  20 61 64 72 25 2b 3d 6c  65 6e 25 0d 2d 50 11 20  | adr%+=len%.-P. |
00007980  fd 20 61 64 72 25 3e 3d  65 6e 64 25 0d 2d 5a 06  |. adr%>=end%.-Z.|
00007990  20 e1 0d 2d 64 04 0d 2d  6e 1f 20 dd f2 70 72 65  | ..-d..-n. ..pre|
000079a0  5f 6c 69 73 74 28 63 6d  64 25 2c 61 64 72 25 2c  |_list(cmd%,adr%,|
000079b0  6c 65 6e 25 29 0d 2d 78  14 20 e3 6c 69 73 74 25  |len%).-x. .list%|
000079c0  3d 30 b8 6c 65 6e 25 88  34 0d 2d 82 10 20 20 20  |=0.len%.4.-..   |
000079d0  c8 8e 20 63 6d 64 25 20  ca 0d 2d 8c 31 20 20 20  |.. cmd% ..-.1   |
000079e0  20 20 c9 20 31 3a f2 6c  69 67 68 74 5f 6f 62 6a  |  . 1:.light_obj|
000079f0  65 63 74 28 73 74 61 63  6b 25 2c 6c 69 73 74 25  |ect(stack%,list%|
00007a00  21 61 64 72 25 2c 31 2c  30 29 0d 2d 96 30 20 20  |!adr%,1,0).-.0  |
00007a10  20 20 20 c9 20 33 3a f2  68 69 64 65 5f 6f 62 6a  |   . 3:.hide_obj|
00007a20  65 63 74 28 73 74 61 63  6b 25 2c 6c 69 73 74 25  |ect(stack%,list%|
00007a30  21 61 64 72 25 2c 31 2c  30 29 0d 2d a0 30 20 20  |!adr%,1,0).-.0  |
00007a40  20 20 20 c9 20 34 3a f2  68 69 64 65 5f 6f 62 6a  |   . 4:.hide_obj|
00007a50  65 63 74 28 73 74 61 63  6b 25 2c 6c 69 73 74 25  |ect(stack%,list%|
00007a60  21 61 64 72 25 2c 30 2c  30 29 0d 2d aa 08 20 20  |!adr%,0,0).-..  |
00007a70  20 cb 0d 2d b4 06 20 ed  0d 2d be 06 20 e1 0d 2d  | ..-.. ..-.. ..-|
00007a80  c8 04 0d 2d d2 0f 20 dd  f2 74 72 79 5f 70 6f 6c  |...-.. ..try_pol|
00007a90  6c 0d 2d dc 16 20 c8 99  20 70 6f 6c 6c 25 2c 2c  |l.-.. .. poll%,,|
00007aa0  71 25 20 b8 20 41 25 0d  2d e6 14 20 c8 99 20 70  |q% . A%.-.. .. p|
00007ab0  6c 61 79 73 6f 75 6e 64  25 2c 30 0d 2d f0 26 20  |laysound%,0.-.& |
00007ac0  c8 99 20 22 4f 53 5f 4d  6f 64 75 6c 65 22 2c 31  |.. "OS_Module",1|
00007ad0  36 2c 22 55 62 61 73 65  25 55 6c 74 69 6d 61 70  |6,"Ubase%Ultimap|
00007ae0  22 0d 2d fa 0c 20 c8 8e  20 41 25 20 ca 0d 2e 04  |".-.. .. A% ....|
00007af0  14 20 20 20 c9 20 30 3a  f2 74 72 79 5f 6e 75 6c  |.   . 0:.try_nul|
00007b00  6c 0d 2e 0e 19 20 20 20  c9 20 31 3a f2 72 65 64  |l....   . 1:.red|
00007b10  72 61 77 5f 77 69 6e 64  6f 77 0d 2e 18 44 20 20  |raw_window...D  |
00007b20  20 c9 20 32 3a f2 6f 70  65 6e 5f 77 69 6e 64 6f  | . 2:.open_windo|
00007b30  77 28 21 71 25 2c 71 25  21 34 2c 71 25 21 38 2c  |w(!q%,q%!4,q%!8,|
00007b40  71 25 21 31 32 2c 71 25  21 31 36 2c 71 25 21 32  |q%!12,q%!16,q%!2|
00007b50  30 2c 71 25 21 32 34 2c  71 25 21 32 38 29 0d 2e  |0,q%!24,q%!28)..|
00007b60  22 1d 20 20 20 c9 20 33  3a f2 63 6c 6f 73 65 5f  |".   . 3:.close_|
00007b70  77 69 6e 64 6f 77 28 21  71 25 29 0d 2e 2c 36 20  |window(!q%)..,6 |
00007b80  20 20 c9 20 34 3a e7 20  21 71 25 3d 6d 61 69 6e  |  . 4:. !q%=main|
00007b90  5f 77 25 20 80 20 70 6f  69 6e 74 65 72 5f 6f 6e  |_w% . pointer_on|
00007ba0  25 3c 3e b9 20 ff 22 70  6f 69 6e 74 65 72 20 31  |%<>. ."pointer 1|
00007bb0  22 0d 2e 36 0a 20 20 20  c9 20 35 0d 2e 40 4c 20  |"..6.   . 5..@L |
00007bc0  20 20 20 20 e7 20 21 71  25 3d 6d 61 69 6e 5f 77  |    . !q%=main_w|
00007bd0  25 20 80 20 70 6f 69 6e  74 65 72 5f 6f 6e 25 3d  |% . pointer_on%=|
00007be0  31 20 c8 99 20 22 57 69  6d 70 5f 53 70 72 69 74  |1 .. "Wimp_Sprit|
00007bf0  65 4f 70 22 2c 33 36 2c  31 2c 22 70 74 72 5f 63  |eOp",36,1,"ptr_c|
00007c00  6c 6f 63 6b 22 2c 32 0d  2e 4a 4b 20 20 20 20 20  |lock",2..JK     |
00007c10  e7 20 21 71 25 3d 6d 61  69 6e 5f 77 25 20 80 20  |. !q%=main_w% . |
00007c20  70 6f 69 6e 74 65 72 5f  6f 6e 25 3d 32 20 c8 99  |pointer_on%=2 ..|
00007c30  20 22 57 69 6d 70 5f 53  70 72 69 74 65 4f 70 22  | "Wimp_SpriteOp"|
00007c40  2c 33 36 2c 31 2c 22 70  74 72 5f 68 61 6e 64 22  |,36,1,"ptr_hand"|
00007c50  2c 32 0d 2e 54 15 20 20  20 c9 20 36 3a f2 74 72  |,2..T.   . 6:.tr|
00007c60  79 5f 6d 6f 75 73 65 0d  2e 5e 19 20 20 20 c9 20  |y_mouse..^.   . |
00007c70  37 3a f2 74 72 79 5f 75  73 65 72 5f 64 72 61 67  |7:.try_user_drag|
00007c80  0d 2e 68 14 20 20 20 c9  20 38 3a f2 74 72 79 5f  |..h.   . 8:.try_|
00007c90  6b 65 79 73 0d 2e 72 1b  20 20 20 c9 20 39 3a f2  |keys..r.   . 9:.|
00007ca0  74 72 79 5f 6d 65 6e 75  5f 73 65 6c 65 63 74 0d  |try_menu_select.|
00007cb0  2e 7c 1f 20 20 20 c9 20  31 37 2c 31 38 3a f2 74  |.|.   . 17,18:.t|
00007cc0  72 79 5f 72 65 63 65 69  76 65 28 71 25 29 0d 2e  |ry_receive(q%)..|
00007cd0  86 06 20 cb 0d 2e 90 06  20 e1 0d 2e 9a 04 0d 2e  |.. ..... .......|
00007ce0  a4 17 20 dd 20 f2 74 72  79 5f 72 65 63 65 69 76  |.. . .try_receiv|
00007cf0  65 28 71 25 29 0d 2e ae  0f 20 c8 8e 20 71 25 21  |e(q%).... .. q%!|
00007d00  31 36 20 ca 0d 2e b8 14  20 20 20 c9 20 30 3a f2  |16 .....   . 0:.|
00007d10  66 69 6e 69 73 68 3a e0  0d 2e c2 17 20 20 20 c9  |finish:.....   .|
00007d20  20 32 3a f2 64 61 74 61  73 61 76 65 61 63 6b 0d  | 2:.datasaveack.|
00007d30  2e cc 21 20 20 20 c9 20  33 3a e7 20 71 25 21 34  |..!   . 3:. q%!4|
00007d40  30 3d 26 42 43 33 20 f2  64 61 74 61 6c 6f 61 64  |0=&BC3 .dataload|
00007d50  0d 2e d6 14 20 20 20 c9  20 36 3a f2 72 61 6d 66  |....   . 6:.ramf|
00007d60  65 74 63 68 0d 2e e0 1b  20 20 20 c9 20 26 35 30  |etch....   . &50|
00007d70  32 3a f2 68 65 6c 70 5f  72 65 71 75 65 73 74 0d  |2:.help_request.|
00007d80  2e ea 21 20 20 20 c9 20  26 34 30 30 43 30 3a f2  |..!   . &400C0:.|
00007d90  74 72 79 5f 6d 65 6e 75  5f 77 61 72 6e 69 6e 67  |try_menu_warning|
00007da0  0d 2e f4 10 20 20 20 c9  20 26 34 30 30 43 31 3a  |....   . &400C1:|
00007db0  0d 2e fe 1a 20 20 20 20  20 c8 99 20 22 48 6f 75  |....     .. "Hou|
00007dc0  72 67 6c 61 73 73 5f 4f  6e 22 0d 2f 08 17 20 20  |rglass_On"./..  |
00007dd0  20 20 20 f2 67 65 74 5f  6d 6f 64 65 5f 69 6e 66  |   .get_mode_inf|
00007de0  6f 0d 2f 12 14 20 20 20  20 20 f2 6c 6f 73 65 5f  |o./..     .lose_|
00007df0  66 6f 6e 74 73 0d 2f 1c  18 20 20 20 20 20 f2 73  |fonts./..     .s|
00007e00  65 74 5f 69 63 6f 6e 5f  66 6f 6e 74 73 0d 2f 26  |et_icon_fonts./&|
00007e10  1b 20 20 20 20 20 c8 99  20 22 48 6f 75 72 67 6c  |.     .. "Hourgl|
00007e20  61 73 73 5f 4f 66 66 22  0d 2f 30 06 20 cb 0d 2f  |ass_Off"./0. ../|
00007e30  3a 06 20 e1 0d 2f 44 04  0d 2f 4e 0f 20 dd f2 74  |:. ../D../N. ..t|
00007e40  72 79 5f 6e 75 6c 6c 0d  2f 58 34 20 21 71 25 3d  |ry_null./X4 !q%=|
00007e50  6d 61 69 6e 5f 77 25 3a  c8 99 20 67 65 74 77 25  |main_w%:.. getw%|
00007e60  2c 2c 71 25 3a e7 28 28  71 25 21 33 32 29 80 28  |,,q%:.((q%!32).(|
00007e70  31 3c 3c 31 36 29 29 3d  30 20 e1 0d 2f 62 23 20  |1<<16))=0 ../b# |
00007e80  e7 20 73 65 71 5f 69 6e  74 25 20 f2 63 68 65 63  |. seq_int% .chec|
00007e90  6b 5f 73 65 71 75 65 6e  63 65 73 28 91 29 0d 2f  |k_sequences(.)./|
00007ea0  6c 12 20 f2 63 68 65 63  6b 5f 63 6c 69 63 6b 73  |l. .check_clicks|
00007eb0  0d 2f 76 50 20 e7 20 c2  69 6e 70 75 74 24 2c 31  |./vP . .input$,1|
00007ec0  29 3d bd 31 33 3a 69 6e  70 75 74 24 3d c0 69 6e  |)=.13:input$=.in|
00007ed0  70 75 74 24 2c a9 28 69  6e 70 75 74 24 29 2d 31  |put$,.(input$)-1|
00007ee0  29 3a 21 71 25 3d 6d 61  69 6e 5f 77 25 3a 71 25  |):!q%=main_w%:q%|
00007ef0  21 32 34 3d 31 33 3a f2  74 72 79 5f 6b 65 79 73  |!24=13:.try_keys|
00007f00  0d 2f 80 30 20 e7 20 70  6f 69 6e 74 65 72 5f 69  |./.0 . pointer_i|
00007f10  6e 74 25 20 80 20 73 63  61 6e 6e 69 6e 67 25 3d  |nt% . scanning%=|
00007f20  a3 20 f2 75 6e 64 65 72  5f 70 6f 69 6e 74 65 72  |. .under_pointer|
00007f30  0d 2f 8a 18 20 e7 20 6f  66 74 65 6e 5f 69 6e 74  |./.. . often_int|
00007f40  25 20 f2 6f 66 74 65 6e  0d 2f 94 25 20 e7 20 73  |% .often./.% . s|
00007f50  63 61 6e 6e 69 6e 67 25  20 80 20 73 63 61 6e 5f  |canning% . scan_|
00007f60  6b 65 79 73 25 3d 31 20  f2 73 63 61 6e 0d 2f 9e  |keys%=1 .scan./.|
00007f70  19 20 c8 99 20 70 6c 61  79 73 6f 75 6e 64 25 2c  |. .. playsound%,|
00007f80  30 20 b8 20 74 25 0d 2f  a8 0f 20 e7 20 74 25 3c  |0 . t%./.. . t%<|
00007f90  3e 2d 31 20 8c 0d 2f b2  19 20 20 20 e7 20 73 70  |>-1 ../..   . sp|
00007fa0  65 61 6b 69 6e 67 5f 74  65 78 74 25 20 8c 0d 2f  |eaking_text% ../|
00007fb0  bc 19 20 20 20 20 20 e7  20 73 70 65 61 6b 5f 73  |..     . speak_s|
00007fc0  6f 75 6e 64 25 20 8c 0d  2f c6 29 20 20 20 20 20  |ound% ../.)     |
00007fd0  20 20 f2 70 6c 61 79 5f  73 6f 75 6e 64 5f 77 61  |  .play_sound_wa|
00007fe0  69 74 28 73 70 65 61 6b  5f 73 6f 75 6e 64 25 29  |it(speak_sound%)|
00007ff0  0d 2f d0 0a 20 20 20 20  20 cc 0d 2f da 1d 20 20  |./..     ../..  |
00008000  20 20 20 20 20 ef 37 3a  74 25 3d 91 2b 35 30 3a  |     .7:t%=.+50:|
00008010  f5 3a fd 91 3e 74 25 0d  2f e4 0a 20 20 20 20 20  |.:..>t%./..     |
00008020  cd 0d 2f ee 17 20 20 20  20 20 f2 73 70 65 61 6b  |../..     .speak|
00008030  69 6e 67 5f 74 65 78 74  0d 2f f8 08 20 20 20 cd  |ing_text./..   .|
00008040  0d 30 02 06 20 cd 0d 30  0c 13 20 f2 63 68 65 63  |.0.. ..0.. .chec|
00008050  6b 5f 73 79 73 76 61 72  73 0d 30 16 06 20 e1 0d  |k_sysvars.0.. ..|
00008060  30 20 04 0d 30 2a 14 20  dd f2 63 68 65 63 6b 5f  |0 ..0*. ..check_|
00008070  73 79 73 76 61 72 73 0d  30 34 31 20 c8 99 20 22  |sysvars.041 .. "|
00008080  4f 53 5f 52 65 61 64 56  61 72 56 61 6c 22 2c 22  |OS_ReadVarVal","|
00008090  55 70 61 67 65 22 2c 6d  61 69 6e 25 2c 31 30 30  |Upage",main%,100|
000080a0  30 20 b8 20 2c 2c 54 25  0d 30 3e 25 20 54 25 3f  |0 . ,,T%.0>% T%?|
000080b0  6d 61 69 6e 25 3d 30 3a  70 61 67 65 24 3d a4 73  |main%=0:page$=.s|
000080c0  74 72 69 6e 67 30 28 6d  61 69 6e 25 29 0d 30 48  |tring0(main%).0H|
000080d0  1d 20 e7 20 70 61 67 65  24 3c 3e 63 75 72 72 65  |. . page$<>curre|
000080e0  6e 74 5f 70 61 67 65 24  20 8c 0d 30 52 2a 20 20  |nt_page$ ..0R*  |
000080f0  20 70 61 67 65 25 3d a4  6e 61 6d 65 5f 65 78 73  | page%=.name_exs|
00008100  69 73 74 73 28 73 5f 70  61 67 65 73 25 2c 70 61  |ists(s_pages%,pa|
00008110  67 65 24 29 0d 30 5c 10  20 20 20 e7 20 70 61 67  |ge$).0\.   . pag|
00008120  65 25 20 8c 0d 30 66 1c  20 20 20 20 20 63 75 72  |e% ..0f.     cur|
00008130  72 65 6e 74 5f 70 61 67  65 25 3d 70 61 67 65 25  |rent_page%=page%|
00008140  0d 30 70 15 20 20 20 20  20 f2 70 72 65 5f 70 72  |.0p.     .pre_pr|
00008150  6f 63 65 73 73 0d 30 7a  22 20 20 20 20 20 f2 73  |ocess.0z"     .s|
00008160  68 6f 77 5f 70 61 67 65  28 63 75 72 72 65 6e 74  |how_page(current|
00008170  5f 70 61 67 65 25 29 0d  30 84 1a 20 20 20 20 20  |_page%).0..     |
00008180  e7 20 73 63 61 6e 6e 69  6e 67 25 20 f2 73 63 61  |. scanning% .sca|
00008190  6e 0d 30 8e 08 20 20 20  cd 0d 30 98 06 20 cd 0d  |n.0..   ..0.. ..|
000081a0  30 a2 33 20 c8 99 20 22  4f 53 5f 52 65 61 64 56  |0.3 .. "OS_ReadV|
000081b0  61 72 56 61 6c 22 2c 22  55 6f 62 6a 65 63 74 22  |arVal","Uobject"|
000081c0  2c 6d 61 69 6e 25 2c 31  30 30 30 20 b8 20 2c 2c  |,main%,1000 . ,,|
000081d0  54 25 0d 30 ac 27 20 54  25 3f 6d 61 69 6e 25 3d  |T%.0.' T%?main%=|
000081e0  30 3a 6f 62 6a 65 63 74  24 3d a4 73 74 72 69 6e  |0:object$=.strin|
000081f0  67 30 28 6d 61 69 6e 25  29 0d 30 b6 14 20 e7 20  |g0(main%).0.. . |
00008200  6f 62 6a 65 63 74 24 3c  3e 22 22 20 8c 0d 30 c0  |object$<>"" ..0.|
00008210  1f 20 20 20 ff 20 22 73  65 74 20 55 6f 62 6a 65  |.   . "set Uobje|
00008220  63 74 20 22 2b bd 33 34  2b bd 33 34 0d 30 ca 34  |ct "+.34+.34.0.4|
00008230  20 20 20 69 6e 70 75 74  24 3d 6f 62 6a 65 63 74  |   input$=object|
00008240  24 3a 21 71 25 3d 6d 61  69 6e 5f 77 25 3a 71 25  |$:!q%=main_w%:q%|
00008250  21 32 34 3d 31 33 3a f2  74 72 79 5f 6b 65 79 73  |!24=13:.try_keys|
00008260  0d 30 d4 06 20 cd 0d 30  de 06 20 e1 0d 30 e8 04  |.0.. ..0.. ..0..|
00008270  0d 30 f2 10 20 dd f2 74  72 79 5f 6d 6f 75 73 65  |.0.. ..try_mouse|
00008280  0d 30 fc 0f 20 c8 8e 20  71 25 21 31 32 20 ca 0d  |.0.. .. q%!12 ..|
00008290  31 06 3e 20 20 20 c9 20  2d 32 3a e7 20 71 25 21  |1.>   . -2:. q%!|
000082a0  31 36 3d 69 63 6f 6e 5f  62 61 72 25 20 d4 20 31  |16=icon_bar% . 1|
000082b0  2c 26 31 30 30 2c 26 39  30 30 30 2c 31 3a f2 63  |,&100,&9000,1:.c|
000082c0  68 65 63 6b 5f 69 63 6f  6e 5f 62 61 72 0d 31 10  |heck_icon_bar.1.|
000082d0  1c 20 20 20 c9 20 6d 61  69 6e 5f 77 25 3a f2 74  |.   . main_w%:.t|
000082e0  72 79 5f 6d 61 69 6e 5f  77 0d 31 1a 28 20 20 20  |ry_main_w.1.(   |
000082f0  c9 20 70 61 67 65 6c 69  73 74 5f 77 63 25 3a f2  |. pagelist_wc%:.|
00008300  63 68 65 63 6b 5f 70 61  67 65 6c 69 73 74 5f 77  |check_pagelist_w|
00008310  63 0d 31 24 20 20 20 20  c9 20 70 72 69 6e 74 5f  |c.1$    . print_|
00008320  77 25 3a f2 63 68 65 63  6b 5f 70 72 69 6e 74 5f  |w%:.check_print_|
00008330  77 0d 31 2e 06 20 cb 0d  31 38 06 20 e1 0d 31 42  |w.1.. ..18. ..1B|
00008340  04 0d 31 4c 11 20 dd f2  74 72 79 5f 6d 61 69 6e  |..1L. ..try_main|
00008350  5f 77 0d 31 56 23 20 c8  99 20 73 65 74 63 61 72  |_w.1V# .. setcar|
00008360  65 74 25 2c 6d 61 69 6e  5f 77 25 2c 2d 31 2c 30  |et%,main_w%,-1,0|
00008370  2c 30 2c 31 30 0d 31 60  15 20 6d 78 25 3d 21 71  |,0,10.1`. mx%=!q|
00008380  25 3a 6d 79 25 3d 71 25  21 34 0d 31 6a 11 20 62  |%:my%=q%!4.1j. b|
00008390  75 74 74 6f 6e 25 3d 71  25 21 38 0d 31 74 12 20  |utton%=q%!8.1t. |
000083a0  e7 20 62 75 74 74 6f 6e  25 80 32 20 8c 0d 31 7e  |. button%.2 ..1~|
000083b0  2e 20 20 20 e7 20 6d 65  6e 75 5f 65 6e 61 62 6c  |.   . menu_enabl|
000083c0  65 64 25 20 f2 6f 70 65  6e 5f 74 72 79 5f 6d 65  |ed% .open_try_me|
000083d0  6e 75 28 6d 78 25 2c 6d  79 25 29 0d 31 88 08 20  |nu(mx%,my%).1.. |
000083e0  20 20 e1 0d 31 92 06 20  cd 0d 31 9c 27 20 e7 20  |  ..1.. ..1.' . |
000083f0  73 63 61 6e 6e 69 6e 67  25 20 f2 73 63 61 6e 5f  |scanning% .scan_|
00008400  63 6c 69 63 6b 28 62 75  74 74 6f 6e 25 29 3a e1  |click(button%):.|
00008410  0d 31 a6 16 20 e7 20 70  6f 69 6e 74 65 72 5f 6f  |.1.. . pointer_o|
00008420  6e 25 3d 31 20 e1 0d 31  b0 10 20 69 63 6f 6e 25  |n%=1 ..1.. icon%|
00008430  3d 71 25 21 31 36 0d 31  ba 1d 20 21 71 25 3d 6d  |=q%!16.1.. !q%=m|
00008440  61 69 6e 5f 77 25 3a c8  99 20 67 65 74 77 25 2c  |ain_w%:.. getw%,|
00008450  2c 71 25 0d 31 c4 2b 20  6f 66 66 78 25 3d 28 71  |,q%.1.+ offx%=(q|
00008460  25 21 34 2d 71 25 21 32  30 29 3a 6f 66 66 79 25  |%!4-q%!20):offy%|
00008470  3d 28 71 25 21 31 36 2d  71 25 21 32 34 29 0d 31  |=(q%!16-q%!24).1|
00008480  ce 1a 20 6d 78 25 2d 3d  6f 66 66 78 25 3a 6d 79  |.. mx%-=offx%:my|
00008490  25 2d 3d 6f 66 66 79 25  0d 31 d8 11 20 c8 8e 20  |%-=offy%.1.. .. |
000084a0  62 75 74 74 6f 6e 25 20  ca 0d 31 e2 0c 20 20 20  |button% ..1..   |
000084b0  c9 20 26 34 30 0d 31 ec  25 20 20 20 20 20 73 74  |. &40.1.%     st|
000084c0  61 63 6b 25 3d a4 73 74  61 63 6b 28 63 75 72 72  |ack%=.stack(curr|
000084d0  65 6e 74 5f 70 61 67 65  25 29 0d 31 f6 35 20 20  |ent_page%).1.5  |
000084e0  20 20 20 6f 62 6a 65 63  74 25 3d a4 77 68 69 63  |   object%=.whic|
000084f0  68 5f 6f 62 6a 65 63 74  28 63 75 72 72 65 6e 74  |h_object(current|
00008500  5f 70 61 67 65 25 2c 6d  78 25 2c 6d 79 25 29 0d  |_page%,mx%,my%).|
00008510  32 00 14 20 20 20 20 20  e7 20 6f 62 6a 65 63 74  |2..     . object|
00008520  25 20 8c 0d 32 0a 2d 20  20 20 20 20 20 20 c8 99  |% ..2.-       ..|
00008530  20 67 65 74 65 6e 74 72  79 25 2c 73 74 61 63 6b  | getentry%,stack|
00008540  25 2c 6f 62 6a 65 63 74  25 20 b8 20 61 64 72 25  |%,object% . adr%|
00008550  0d 32 14 19 20 20 20 20  20 20 20 63 6c 69 63 6b  |.2..       click|
00008560  25 3d 61 64 72 25 21 32  38 0d 32 1e 15 20 20 20  |%=adr%!28.2..   |
00008570  20 20 20 20 e7 20 63 6c  69 63 6b 25 20 8c 0d 32  |    . click% ..2|
00008580  28 31 20 20 20 20 20 20  20 20 20 c8 99 20 67 65  |(1         .. ge|
00008590  74 65 6e 74 72 79 25 2c  73 5f 63 6c 69 63 6b 73  |tentry%,s_clicks|
000085a0  25 2c 63 6c 69 63 6b 25  20 b8 20 61 64 72 25 0d  |%,click% . adr%.|
000085b0  32 32 17 20 20 20 20 20  20 20 20 20 e7 20 61 64  |22.         . ad|
000085c0  72 25 21 34 20 8c 0d 32  3c 36 20 20 20 20 20 20  |r%!4 ..2<6      |
000085d0  20 20 20 20 20 c8 99 20  67 65 74 65 6e 74 72 79  |     .. getentry|
000085e0  25 2c 73 5f 6d 6f 75 73  65 64 72 61 67 25 2c 61  |%,s_mousedrag%,a|
000085f0  64 72 25 21 34 20 b8 20  61 64 72 25 0d 32 46 2b  |dr%!4 . adr%.2F+|
00008600  20 20 20 20 20 20 20 20  20 20 20 f2 62 65 67 69  |           .begi|
00008610  6e 5f 73 61 76 65 28 6f  62 6a 65 63 74 25 2c 61  |n_save(object%,a|
00008620  64 72 25 21 31 32 29 0d  32 50 0e 20 20 20 20 20  |dr%!12).2P.     |
00008630  20 20 20 20 cd 0d 32 5a  0c 20 20 20 20 20 20 20  |    ..2Z.       |
00008640  cd 0d 32 64 0a 20 20 20  20 20 cd 0d 32 6e 0d 20  |..2d.     ..2n. |
00008650  20 20 c9 20 26 31 30 30  0d 32 78 32 20 20 20 20  |  . &100.2x2    |
00008660  20 70 61 67 65 5f 70 74  72 25 2d 3d 34 3a e7 20  | page_ptr%-=4:. |
00008670  70 61 67 65 5f 70 74 72  25 3c 30 20 70 61 67 65  |page_ptr%<0 page|
00008680  5f 70 74 72 25 3d 31 30  32 30 0d 32 82 25 20 20  |_ptr%=1020.2.%  |
00008690  20 20 20 e7 20 70 61 67  65 5f 70 74 72 25 21 70  |   . page_ptr%!p|
000086a0  61 67 65 5f 73 74 61 63  6b 25 3c 3e 30 20 8c 0d  |age_stack%<>0 ..|
000086b0  32 8c 13 20 20 20 20 20  20 20 f2 64 65 6c 69 67  |2..       .delig|
000086c0  68 74 0d 32 96 2e 20 20  20 20 20 20 20 63 75 72  |ht.2..       cur|
000086d0  72 65 6e 74 5f 70 61 67  65 25 3d 70 61 67 65 5f  |rent_page%=page_|
000086e0  70 74 72 25 21 70 61 67  65 5f 73 74 61 63 6b 25  |ptr%!page_stack%|
000086f0  0d 32 a0 22 20 20 20 20  20 20 20 70 61 67 65 5f  |.2."       page_|
00008700  70 74 72 25 21 70 61 67  65 5f 73 74 61 63 6b 25  |ptr%!page_stack%|
00008710  3d 30 0d 32 aa 17 20 20  20 20 20 20 20 f2 70 72  |=0.2..       .pr|
00008720  65 5f 70 72 6f 63 65 73  73 0d 32 b4 24 20 20 20  |e_process.2.$   |
00008730  20 20 20 20 f2 73 68 6f  77 5f 70 61 67 65 28 63  |    .show_page(c|
00008740  75 72 72 65 6e 74 5f 70  61 67 65 25 29 0d 32 be  |urrent_page%).2.|
00008750  1c 20 20 20 20 20 20 20  e7 20 73 63 61 6e 6e 69  |.       . scanni|
00008760  6e 67 25 20 f2 73 63 61  6e 0d 32 c8 0a 20 20 20  |ng% .scan.2..   |
00008770  20 20 cd 0d 32 d2 0d 20  20 20 c9 20 26 34 30 30  |  ..2..   . &400|
00008780  0d 32 dc 25 20 20 20 20  20 73 74 61 63 6b 25 3d  |.2.%     stack%=|
00008790  a4 73 74 61 63 6b 28 63  75 72 72 65 6e 74 5f 70  |.stack(current_p|
000087a0  61 67 65 25 29 0d 32 e6  35 20 20 20 20 20 6f 62  |age%).2.5     ob|
000087b0  6a 65 63 74 25 3d a4 77  68 69 63 68 5f 6f 62 6a  |ject%=.which_obj|
000087c0  65 63 74 28 63 75 72 72  65 6e 74 5f 70 61 67 65  |ect(current_page|
000087d0  25 2c 6d 78 25 2c 6d 79  25 29 0d 32 f0 14 20 20  |%,mx%,my%).2..  |
000087e0  20 20 20 e7 20 6f 62 6a  65 63 74 25 20 8c 0d 32  |   . object% ..2|
000087f0  fa 2d 20 20 20 20 20 20  20 c8 99 20 67 65 74 65  |.-       .. gete|
00008800  6e 74 72 79 25 2c 73 74  61 63 6b 25 2c 6f 62 6a  |ntry%,stack%,obj|
00008810  65 63 74 25 20 b8 20 61  64 72 25 0d 33 04 19 20  |ect% . adr%.3.. |
00008820  20 20 20 20 20 20 63 6c  69 63 6b 25 3d 61 64 72  |      click%=adr|
00008830  25 21 32 38 0d 33 0e 15  20 20 20 20 20 20 20 e7  |%!28.3..       .|
00008840  20 63 6c 69 63 6b 25 20  8c 0d 33 18 31 20 20 20  | click% ..3.1   |
00008850  20 20 20 20 20 20 c8 99  20 67 65 74 65 6e 74 72  |      .. getentr|
00008860  79 25 2c 73 5f 63 6c 69  63 6b 73 25 2c 63 6c 69  |y%,s_clicks%,cli|
00008870  63 6b 25 20 b8 20 61 64  72 25 0d 33 22 43 20 20  |ck% . adr%.3"C  |
00008880  20 20 20 20 20 20 20 e7  20 61 64 72 25 21 32 30  |       . adr%!20|
00008890  20 f2 64 6f 5f 63 6c 69  63 6b 5f 72 65 63 6f 72  | .do_click_recor|
000088a0  64 65 64 28 6f 62 6a 65  63 74 25 2c 73 5f 6d 6f  |ded(object%,s_mo|
000088b0  75 73 65 25 2c 61 64 72  25 21 32 30 29 0d 33 2c  |use%,adr%!20).3,|
000088c0  0c 20 20 20 20 20 20 20  cd 0d 33 36 0a 20 20 20  |.       ..36.   |
000088d0  20 20 cc 0d 33 40 35 20  20 20 20 20 20 20 c8 99  |  ..3@5       ..|
000088e0  20 67 65 74 65 6e 74 72  79 25 2c 73 5f 70 61 67  | getentry%,s_pag|
000088f0  65 73 25 2c 63 75 72 72  65 6e 74 5f 70 61 67 65  |es%,current_page|
00008900  25 20 b8 20 61 64 72 25  0d 33 4a 19 20 20 20 20  |% . adr%.3J.    |
00008910  20 20 20 63 6c 69 63 6b  25 3d 61 64 72 25 21 32  |   click%=adr%!2|
00008920  34 0d 33 54 15 20 20 20  20 20 20 20 e7 20 63 6c  |4.3T.       . cl|
00008930  69 63 6b 25 20 8c 0d 33  5e 31 20 20 20 20 20 20  |ick% ..3^1      |
00008940  20 20 20 c8 99 20 67 65  74 65 6e 74 72 79 25 2c  |   .. getentry%,|
00008950  73 5f 63 6c 69 63 6b 73  25 2c 63 6c 69 63 6b 25  |s_clicks%,click%|
00008960  20 b8 20 61 64 72 25 0d  33 68 3d 20 20 20 20 20  | . adr%.3h=     |
00008970  20 20 20 20 e7 20 61 64  72 25 21 32 30 20 f2 64  |    . adr%!20 .d|
00008980  6f 5f 63 6c 69 63 6b 5f  72 65 63 6f 72 64 65 64  |o_click_recorded|
00008990  28 30 2c 73 5f 6d 6f 75  73 65 25 2c 61 64 72 25  |(0,s_mouse%,adr%|
000089a0  21 32 30 29 0d 33 72 0c  20 20 20 20 20 20 20 cd  |!20).3r.       .|
000089b0  0d 33 7c 0a 20 20 20 20  20 cd 0d 33 86 06 20 cb  |.3|.     ..3.. .|
000089c0  0d 33 90 06 20 e1 0d 33  9a 04 0d 33 a4 0f 20 dd  |.3.. ..3...3.. .|
000089d0  f2 74 72 79 5f 6b 65 79  73 0d 33 ae 0d 20 c8 8e  |.try_keys.3.. ..|
000089e0  20 21 71 25 20 ca 0d 33  b8 10 20 20 20 c9 20 6d  | !q% ..3..   . m|
000089f0  61 69 6e 5f 77 25 0d 33  c2 13 20 20 20 20 20 6b  |ain_w%.3..     k|
00008a00  65 79 25 3d 71 25 21 32  34 0d 33 cc 14 20 20 20  |ey%=q%!24.3..   |
00008a10  20 20 e7 20 6b 65 79 25  3d 31 33 20 8c 0d 33 d6  |  . key%=13 ..3.|
00008a20  27 20 20 20 20 20 20 20  73 74 61 63 6b 25 3d a4  |'       stack%=.|
00008a30  73 74 61 63 6b 28 63 75  72 72 65 6e 74 5f 70 61  |stack(current_pa|
00008a40  67 65 25 29 0d 33 e0 2f  20 20 20 20 20 20 20 e7  |ge%).3./       .|
00008a50  20 a4 6c 6f 77 65 72 5f  63 61 73 65 28 c0 69 6e  | .lower_case(.in|
00008a60  70 75 74 24 2c 36 29 29  3d 22 6f 62 6a 65 63 74  |put$,6))="object|
00008a70  22 20 8c 0d 33 ea 2b 20  20 20 20 20 20 20 20 20  |" ..3.+         |
00008a80  74 6f 6b 65 6e 25 3d bb  28 c2 69 6e 70 75 74 24  |token%=.(.input$|
00008a90  2c a9 28 69 6e 70 75 74  24 29 2d 36 29 29 0d 33  |,.(input$)-6)).3|
00008aa0  f4 2e 20 20 20 20 20 20  20 20 20 c8 99 20 67 65  |..         .. ge|
00008ab0  74 65 6e 74 72 79 25 2c  73 74 61 63 6b 25 2c 74  |tentry%,stack%,t|
00008ac0  6f 6b 65 6e 25 20 b8 20  61 64 72 25 0d 33 fe 15  |oken% . adr%.3..|
00008ad0  20 20 20 20 20 20 20 20  20 e7 20 61 64 72 25 20  |         . adr% |
00008ae0  8c 0d 34 08 1a 20 20 20  20 20 20 20 20 20 20 20  |..4..           |
00008af0  e7 20 61 64 72 25 21 32  38 20 8c 0d 34 12 27 20  |. adr%!28 ..4.' |
00008b00  20 20 20 20 20 20 20 20  20 20 20 20 70 6f 69 6e  |            poin|
00008b10  74 65 72 5f 6f 62 6a 65  63 74 25 3d 74 6f 6b 65  |ter_object%=toke|
00008b20  6e 25 0d 34 1c 36 20 20  20 20 20 20 20 20 20 20  |n%.4.6          |
00008b30  20 20 20 c8 99 20 67 65  74 65 6e 74 72 79 25 2c  |   .. getentry%,|
00008b40  73 5f 63 6c 69 63 6b 73  25 2c 61 64 72 25 21 32  |s_clicks%,adr%!2|
00008b50  38 20 b8 20 61 64 72 25  0d 34 26 46 20 20 20 20  |8 . adr%.4&F    |
00008b60  20 20 20 20 20 20 20 20  20 e7 20 61 64 72 25 21  |         . adr%!|
00008b70  32 30 20 f2 64 6f 5f 63  6c 69 63 6b 5f 72 65 63  |20 .do_click_rec|
00008b80  6f 72 64 65 64 28 74 6f  6b 65 6e 25 2c 73 5f 6d  |orded(token%,s_m|
00008b90  6f 75 73 65 25 2c 61 64  72 25 21 32 30 29 0d 34  |ouse%,adr%!20).4|
00008ba0  30 10 20 20 20 20 20 20  20 20 20 20 20 cd 0d 34  |0.           ..4|
00008bb0  3a 0e 20 20 20 20 20 20  20 20 20 cd 0d 34 44 0c  |:.         ..4D.|
00008bc0  20 20 20 20 20 20 20 cd  0d 34 4e 41 20 20 20 20  |       ..4NA    |
00008bd0  20 20 20 e7 20 a4 6c 6f  77 65 72 5f 63 61 73 65  |   . .lower_case|
00008be0  28 c0 69 6e 70 75 74 24  2c 34 29 29 3d 22 62 61  |(.input$,4))="ba|
00008bf0  63 6b 22 20 71 25 21 38  3d 26 31 30 30 3a f2 74  |ck" q%!8=&100:.t|
00008c00  72 79 5f 6d 61 69 6e 5f  77 0d 34 58 14 20 20 20  |ry_main_w.4X.   |
00008c10  20 20 20 20 69 6e 70 75  74 24 3d 22 22 0d 34 62  |    input$="".4b|
00008c20  0a 20 20 20 20 20 cc 0d  34 6c 2d 20 20 20 20 20  |.     ..4l-     |
00008c30  20 20 e7 20 6b 65 79 25  3d 32 37 3a f2 63 6c 6f  |  . key%=27:.clo|
00008c40  73 65 5f 77 69 6e 64 6f  77 28 6d 61 69 6e 5f 77  |se_window(main_w|
00008c50  25 29 3a e1 0d 34 76 26  20 20 20 20 20 20 20 e7  |%):..4v&       .|
00008c60  20 6b 65 79 25 3d 26 31  38 30 20 f2 6f 70 65 6e  | key%=&180 .open|
00008c70  5f 70 72 69 6e 74 5f 77  3a e1 0d 34 80 4b 20 20  |_print_w:..4.K  |
00008c80  20 20 20 20 20 e7 20 6b  65 79 25 3e 33 31 20 80  |     . key%>31 .|
00008c90  20 6b 65 79 25 3c 32 35  35 20 69 6e 70 75 74 24  | key%<255 input$|
00008ca0  3d 69 6e 70 75 74 24 2b  bd 28 6b 65 79 25 29 20  |=input$+.(key%) |
00008cb0  8b 20 c8 99 20 70 72 6f  63 65 73 73 6b 65 79 25  |. .. processkey%|
00008cc0  2c 6b 65 79 25 0d 34 8a  22 20 20 20 20 20 20 20  |,key%.4."       |
00008cd0  e7 20 a9 69 6e 70 75 74  24 3d 32 35 35 20 69 6e  |. .input$=255 in|
00008ce0  70 75 74 24 3d 22 22 0d  34 94 0a 20 20 20 20 20  |put$="".4..     |
00008cf0  cd 0d 34 9e 11 20 20 20  c9 20 70 72 69 6e 74 5f  |..4..   . print_|
00008d00  77 25 0d 34 a8 48 20 20  20 20 20 e7 20 71 25 21  |w%.4.H     . q%!|
00008d10  32 34 3d 31 33 20 71 25  21 38 3d 34 3a 71 25 21  |24=13 q%!8=4:q%!|
00008d20  31 36 3d 34 3a f2 63 68  65 63 6b 5f 70 72 69 6e  |16=4:.check_prin|
00008d30  74 5f 77 20 8b 20 c8 99  20 70 72 6f 63 65 73 73  |t_w . .. process|
00008d40  6b 65 79 25 2c 71 25 21  32 34 0d 34 b2 08 20 20  |key%,q%!24.4..  |
00008d50  20 7f 0d 34 bc 1d 20 20  20 20 20 c8 99 20 70 72  | ..4..     .. pr|
00008d60  6f 63 65 73 73 6b 65 79  25 2c 71 25 21 32 34 0d  |ocesskey%,q%!24.|
00008d70  34 c6 06 20 cb 0d 34 d0  06 20 e1 0d 34 da 04 0d  |4.. ..4.. ..4...|
00008d80  34 e4 31 20 dd f2 64 6f  5f 63 6c 69 63 6b 5f 72  |4.1 ..do_click_r|
00008d90  65 63 6f 72 64 65 64 28  6f 62 6a 65 63 74 25 2c  |ecorded(object%,|
00008da0  63 6f 6e 74 65 78 74 25  2c 63 6c 69 63 6b 25 29  |context%,click%)|
00008db0  0d 34 ee 34 20 e7 20 6f  62 6a 65 63 74 25 20 73  |.4.4 . object% s|
00008dc0  74 61 74 75 73 24 3d 22  2e 6f 62 6a 65 63 74 22  |tatus$=".object"|
00008dd0  2b c3 6f 62 6a 65 63 74  25 2b 22 2e 22 2b c2 91  |+.object%+"."+..|
00008de0  24 2c 38 29 0d 34 f8 2e  20 e7 20 6f 62 6a 65 63  |$,8).4.. . objec|
00008df0  74 25 3d 30 20 73 74 61  74 75 73 24 3d 22 2e 62  |t%=0 status$=".b|
00008e00  61 63 6b 67 72 6f 75 6e  64 2e 22 2b c2 91 24 2c  |ackground."+..$,|
00008e10  38 29 0d 35 02 41 20 ff  20 22 73 65 74 20 55 73  |8).5.A . "set Us|
00008e20  74 61 74 75 73 20 22 2b  a4 6c 65 61 66 28 66 75  |tatus "+.leaf(fu|
00008e30  6c 6c 5f 6e 61 6d 65 24  29 2b 22 2e 22 2b 63 75  |ll_name$)+"."+cu|
00008e40  72 72 65 6e 74 5f 70 61  67 65 24 2b 73 74 61 74  |rrent_page$+stat|
00008e50  75 73 24 0d 35 0c 1f 20  f2 64 6f 5f 63 6c 69 63  |us$.5.. .do_clic|
00008e60  6b 28 63 6f 6e 74 65 78  74 25 2c 63 6c 69 63 6b  |k(context%,click|
00008e70  25 29 0d 35 16 06 20 e1  0d 35 20 04 0d 35 2a 20  |%).5.. ..5 ..5* |
00008e80  20 dd f2 64 6f 5f 63 6c  69 63 6b 28 63 6f 6e 74  | ..do_click(cont|
00008e90  65 78 74 25 2c 63 6c 69  63 6b 25 29 0d 35 34 28  |ext%,click%).54(|
00008ea0  20 c8 99 20 67 65 74 65  6e 74 72 79 25 2c 63 6f  | .. getentry%,co|
00008eb0  6e 74 65 78 74 25 2c 63  6c 69 63 6b 25 20 b8 20  |ntext%,click% . |
00008ec0  61 64 72 25 0d 35 3e 22  20 c8 99 20 6d 6f 76 65  |adr%.5>" .. move|
00008ed0  64 61 74 61 25 2c 61 64  72 25 2c 77 73 25 2b 38  |data%,adr%,ws%+8|
00008ee0  2c 21 61 64 72 25 0d 35  48 24 20 21 77 73 25 3d  |,!adr%.5H$ !ws%=|
00008ef0  28 77 73 25 21 38 29 2b  38 3a 77 73 25 21 34 3d  |(ws%!8)+8:ws%!4=|
00008f00  31 32 3a 77 73 25 21 38  3d 30 0d 35 52 19 20 f2  |12:ws%!8=0.5R. .|
00008f10  6d 61 6b 65 5f 73 70 61  63 65 28 21 77 73 25 2b  |make_space(!ws%+|
00008f20  31 36 29 0d 35 5c 21 20  c8 99 20 61 64 64 65 6e  |16).5\! .. adden|
00008f30  74 72 79 25 2c 73 5f 63  6c 69 63 6b 73 6f 6e 25  |try%,s_clickson%|
00008f40  2c 77 73 25 0d 35 66 12  20 f2 63 68 65 63 6b 5f  |,ws%.5f. .check_|
00008f50  63 6c 69 63 6b 73 0d 35  70 06 20 e1 0d 35 7a 04  |clicks.5p. ..5z.|
00008f60  0d 35 84 13 20 dd f2 63  68 65 63 6b 5f 63 6c 69  |.5.. ..check_cli|
00008f70  63 6b 73 0d 35 8e 23 20  c8 99 20 6e 65 6e 74 72  |cks.5.# .. nentr|
00008f80  69 65 73 25 2c 73 5f 63  6c 69 63 6b 73 6f 6e 25  |ies%,s_clickson%|
00008f90  20 b8 20 6e 63 25 0d 35  98 0e 20 e7 20 6e 63 25  | . nc%.5.. . nc%|
00008fa0  3d 30 20 e1 0d 35 a2 13  20 e3 20 63 6c 69 63 6b  |=0 ..5.. . click|
00008fb0  25 3d 31 b8 6e 63 25 0d  35 ac 31 20 20 20 c8 99  |%=1.nc%.5.1   ..|
00008fc0  20 67 65 74 6e 74 68 25  2c 73 5f 63 6c 69 63 6b  | getnth%,s_click|
00008fd0  73 6f 6e 25 2c 63 6c 69  63 6b 25 20 b8 20 63 6c  |son%,click% . cl|
00008fe0  69 63 6b 5f 61 64 72 25  0d 35 b6 2b 20 20 20 e7  |ick_adr%.5.+   .|
00008ff0  20 63 6c 69 63 6b 5f 61  64 72 25 21 38 3c 91 20  | click_adr%!8<. |
00009000  80 20 63 6c 69 63 6b 5f  61 64 72 25 21 34 3c 3e  |. click_adr%!4<>|
00009010  30 20 8c 0d 35 c0 30 20  20 20 20 20 70 74 72 25  |0 ..5.0     ptr%|
00009020  3d 63 6c 69 63 6b 5f 61  64 72 25 21 34 3a 63 61  |=click_adr%!4:ca|
00009030  64 72 25 3d 63 6c 69 63  6b 5f 61 64 72 25 2b 70  |dr%=click_adr%+p|
00009040  74 72 25 0d 35 ca 2d 20  20 20 20 20 63 6c 69 63  |tr%.5.-     clic|
00009050  6b 5f 6c 65 6e 25 3d 21  63 61 64 72 25 3a 63 6d  |k_len%=!cadr%:cm|
00009060  64 25 3d 63 61 64 72 25  21 34 3a 6f 6b 25 3d b9  |d%=cadr%!4:ok%=.|
00009070  0d 35 d4 12 20 20 20 20  20 c8 8e 20 63 6d 64 25  |.5..     .. cmd%|
00009080  20 ca 0d 35 de 3a 20 20  20 20 20 20 20 c9 20 31  | ..5.:       . 1|
00009090  2c 33 2c 34 3a f2 63 6c  69 63 6b 5f 6c 69 73 74  |,3,4:.click_list|
000090a0  28 63 6d 64 25 2c 63 61  64 72 25 2b 38 2c 63 6c  |(cmd%,cadr%+8,cl|
000090b0  69 63 6b 5f 6c 65 6e 25  2d 31 32 29 0d 35 e8 0e  |ick_len%-12).5..|
000090c0  20 20 20 20 20 20 20 c9  20 32 0d 35 f2 15 20 20  |       . 2.5..  |
000090d0  20 20 20 20 20 20 20 f2  64 65 6c 69 67 68 74 0d  |       .delight.|
000090e0  35 fc 30 20 20 20 20 20  20 20 20 20 70 61 67 65  |5.0         page|
000090f0  5f 70 74 72 25 21 70 61  67 65 5f 73 74 61 63 6b  |_ptr%!page_stack|
00009100  25 3d 63 75 72 72 65 6e  74 5f 70 61 67 65 25 0d  |%=current_page%.|
00009110  36 06 36 20 20 20 20 20  20 20 20 20 70 61 67 65  |6.6         page|
00009120  5f 70 74 72 25 2b 3d 34  3a e7 20 70 61 67 65 5f  |_ptr%+=4:. page_|
00009130  70 74 72 25 3d 31 30 32  34 20 70 61 67 65 5f 70  |ptr%=1024 page_p|
00009140  74 72 25 3d 30 0d 36 10  22 20 20 20 20 20 20 20  |tr%=0.6."       |
00009150  20 20 63 75 72 72 65 6e  74 5f 70 61 67 65 25 3d  |  current_page%=|
00009160  63 61 64 72 25 21 38 0d  36 1a 4d 20 20 20 20 20  |cadr%!8.6.M     |
00009170  20 20 20 20 e7 20 63 75  72 72 65 6e 74 5f 70 61  |    . current_pa|
00009180  67 65 25 3d 30 20 c8 99  20 6e 65 6e 74 72 69 65  |ge%=0 .. nentrie|
00009190  73 25 2c 73 5f 70 61 67  65 73 25 20 b8 20 74 25  |s%,s_pages% . t%|
000091a0  3a 63 75 72 72 65 6e 74  5f 70 61 67 65 25 3d b3  |:current_page%=.|
000091b0  28 74 25 29 0d 36 24 2e  20 20 20 20 20 20 20 20  |(t%).6$.        |
000091c0  20 e7 20 63 75 72 72 65  6e 74 5f 70 61 67 65 25  | . current_page%|
000091d0  3d 30 20 63 75 72 72 65  6e 74 5f 70 61 67 65 25  |=0 current_page%|
000091e0  3d 31 0d 36 2e 19 20 20  20 20 20 20 20 20 20 f2  |=1.6..         .|
000091f0  70 72 65 5f 70 72 6f 63  65 73 73 0d 36 38 26 20  |pre_process.68& |
00009200  20 20 20 20 20 20 20 20  f2 73 68 6f 77 5f 70 61  |        .show_pa|
00009210  67 65 28 63 75 72 72 65  6e 74 5f 70 61 67 65 25  |ge(current_page%|
00009220  29 0d 36 42 1e 20 20 20  20 20 20 20 20 20 e7 20  |).6B.         . |
00009230  73 63 61 6e 6e 69 6e 67  25 20 f2 73 63 61 6e 0d  |scanning% .scan.|
00009240  36 4c 0e 20 20 20 20 20  20 20 20 20 e1 0d 36 56  |6L.         ..6V|
00009250  0e 20 20 20 20 20 20 20  c9 20 35 0d 36 60 21 20  |.       . 5.6`! |
00009260  20 20 20 20 20 20 20 20  c8 99 20 70 6c 61 79 73  |        .. plays|
00009270  6f 75 6e 64 25 2c 30 20  b8 20 74 25 0d 36 6a 31  |ound%,0 . t%.6j1|
00009280  20 20 20 20 20 20 20 20  20 e7 20 74 25 3d 2d 31  |         . t%=-1|
00009290  20 6f 6b 25 3d a3 20 8b  20 f2 70 6c 61 79 5f 73  | ok%=. . .play_s|
000092a0  6f 75 6e 64 28 63 61 64  72 25 21 38 29 0d 36 74  |ound(cadr%!8).6t|
000092b0  2a 20 20 20 20 20 20 20  c9 20 36 3a f2 73 70 65  |*       . 6:.spe|
000092c0  61 6b 5f 74 65 78 74 28  73 74 61 63 6b 25 2c 63  |ak_text(stack%,c|
000092d0  61 64 72 25 21 38 29 0d  36 7e 21 20 20 20 20 20  |adr%!8).6~!     |
000092e0  20 20 c9 20 37 3a f2 69  6e 69 74 5f 73 65 71 28  |  . 7:.init_seq(|
000092f0  91 2c 63 61 64 72 25 29  0d 36 88 0f 20 20 20 20  |.,cadr%).6..    |
00009300  20 20 20 c9 20 38 3a 0d  36 92 29 20 20 20 20 20  |   . 8:.6.)     |
00009310  20 20 20 20 63 6c 69 63  6b 5f 63 6d 64 24 3d a4  |    click_cmd$=.|
00009320  73 74 72 69 6e 67 30 28  63 61 64 72 25 2b 38 29  |string0(cadr%+8)|
00009330  0d 36 9c 29 20 20 20 20  20 20 20 20 20 63 6d 64  |.6.)         cmd|
00009340  24 3d a4 6c 6f 77 65 72  5f 63 61 73 65 28 63 6c  |$=.lower_case(cl|
00009350  69 63 6b 5f 63 6d 64 24  29 0d 36 a6 27 20 20 20  |ick_cmd$).6.'   |
00009360  20 20 20 20 20 20 e7 20  c0 63 6d 64 24 2c 31 30  |      . .cmd$,10|
00009370  29 3d 22 6c 6f 61 64 20  66 69 6c 65 20 22 20 8c  |)="load file " .|
00009380  0d 36 b0 2d 20 20 20 20  20 20 20 20 20 20 20 66  |.6.-           f|
00009390  69 6c 65 24 3d c2 63 6d  64 24 2c a9 63 6d 64 24  |ile$=.cmd$,.cmd$|
000093a0  2d 31 30 29 3a 70 61 67  65 24 3d 22 22 0d 36 ba  |-10):page$="".6.|
000093b0  1e 20 20 20 20 20 20 20  20 20 20 20 e7 20 a7 66  |.           . .f|
000093c0  69 6c 65 24 2c 22 20 22  29 20 8c 0d 36 c4 33 20  |ile$," ") ..6.3 |
000093d0  20 20 20 20 20 20 20 20  20 20 20 20 70 61 67 65  |            page|
000093e0  24 3d c2 66 69 6c 65 24  2c a9 28 66 69 6c 65 24  |$=.file$,.(file$|
000093f0  29 2d a7 66 69 6c 65 24  2c 22 20 22 29 29 0d 36  |)-.file$," ")).6|
00009400  ce 2c 20 20 20 20 20 20  20 20 20 20 20 20 20 66  |.,             f|
00009410  69 6c 65 24 3d c0 66 69  6c 65 24 2c a7 66 69 6c  |ile$=.file$,.fil|
00009420  65 24 2c 22 20 22 29 2d  31 29 0d 36 d8 10 20 20  |e$," ")-1).6..  |
00009430  20 20 20 20 20 20 20 20  20 cd 0d 36 e2 29 20 20  |         ..6.)  |
00009440  20 20 20 20 20 20 20 20  20 66 69 6c 65 24 3d 66  |         file$=f|
00009450  75 6c 6c 5f 6e 61 6d 65  24 2b 22 2e 22 2b 66 69  |ull_name$+"."+fi|
00009460  6c 65 24 0d 36 ec 12 20  20 20 20 20 20 20 20 20  |le$.6..         |
00009470  20 20 ea 20 85 0d 36 f6  2e 20 20 20 20 20 20 20  |  . ..6..       |
00009480  20 20 20 20 ee 20 85 20  ea 3a f7 20 85 3a 63 6c  |    . . .:. .:cl|
00009490  69 63 6b 5f 61 64 72 25  21 34 3d 30 3a 85 20 31  |ick_adr%!4=0:. 1|
000094a0  2c f6 24 0d 37 00 22 20  20 20 20 20 20 20 20 20  |,.$.7."         |
000094b0  20 20 f2 6c 6f 61 64 5f  66 69 6c 65 28 66 69 6c  |  .load_file(fil|
000094c0  65 24 2c 31 29 0d 37 0a  5a 20 20 20 20 20 20 20  |e$,1).7.Z       |
000094d0  20 20 20 20 e7 20 70 61  67 65 24 3c 3e 22 22 20  |    . page$<>"" |
000094e0  70 61 67 65 25 3d a4 6e  61 6d 65 5f 65 78 73 69  |page%=.name_exsi|
000094f0  73 74 73 28 73 5f 70 61  67 65 73 25 2c 70 61 67  |sts(s_pages%,pag|
00009500  65 24 29 3a e7 20 70 61  67 65 25 20 63 75 72 72  |e$):. page% curr|
00009510  65 6e 74 5f 70 61 67 65  25 3d 70 61 67 65 25 0d  |ent_page%=page%.|
00009520  37 14 1b 20 20 20 20 20  20 20 20 20 20 20 f2 70  |7..           .p|
00009530  72 65 5f 70 72 6f 63 65  73 73 0d 37 1e 28 20 20  |re_process.7.(  |
00009540  20 20 20 20 20 20 20 20  20 f2 73 68 6f 77 5f 70  |         .show_p|
00009550  61 67 65 28 63 75 72 72  65 6e 74 5f 70 61 67 65  |age(current_page|
00009560  25 29 0d 37 28 20 20 20  20 20 20 20 20 20 20 20  |%).7(           |
00009570  20 e7 20 73 63 61 6e 6e  69 6e 67 25 20 f2 73 63  | . scanning% .sc|
00009580  61 6e 0d 37 32 1f 20 20  20 20 20 20 20 20 20 20  |an.72.          |
00009590  20 f2 7a 65 72 6f 5f 70  61 67 65 5f 73 74 61 63  | .zero_page_stac|
000095a0  6b 0d 37 3c 10 20 20 20  20 20 20 20 20 20 20 20  |k.7<.           |
000095b0  e1 0d 37 46 0e 20 20 20  20 20 20 20 20 20 cd 0d  |..7F.         ..|
000095c0  37 50 33 20 20 20 20 20  20 20 20 20 e7 20 c0 63  |7P3         . .c|
000095d0  6d 64 24 2c 34 29 3d 22  6c 6f 61 64 22 20 84 20  |md$,4)="load" . |
000095e0  c0 63 6d 64 24 2c 35 29  3d 22 2a 6c 6f 61 64 22  |.cmd$,5)="*load"|
000095f0  20 8c 0d 37 5a 2c 20 20  20 20 20 20 20 20 20 20  | ..7Z,          |
00009600  20 66 69 6c 65 24 3d c2  63 6d 64 24 2c a9 63 6d  | file$=.cmd$,.cm|
00009610  64 24 2d 35 29 3a 70 61  67 65 24 3d 22 22 0d 37  |d$-5):page$="".7|
00009620  64 1e 20 20 20 20 20 20  20 20 20 20 20 e7 20 a7  |d.           . .|
00009630  66 69 6c 65 24 2c 22 20  22 29 20 8c 0d 37 6e 33  |file$," ") ..7n3|
00009640  20 20 20 20 20 20 20 20  20 20 20 20 20 70 61 67  |             pag|
00009650  65 24 3d c2 66 69 6c 65  24 2c a9 28 66 69 6c 65  |e$=.file$,.(file|
00009660  24 29 2d a7 66 69 6c 65  24 2c 22 20 22 29 29 0d  |$)-.file$," ")).|
00009670  37 78 2c 20 20 20 20 20  20 20 20 20 20 20 20 20  |7x,             |
00009680  66 69 6c 65 24 3d c0 66  69 6c 65 24 2c a7 66 69  |file$=.file$,.fi|
00009690  6c 65 24 2c 22 20 22 29  2d 31 29 0d 37 82 10 20  |le$," ")-1).7.. |
000096a0  20 20 20 20 20 20 20 20  20 20 cd 0d 37 8c 12 20  |          ..7.. |
000096b0  20 20 20 20 20 20 20 20  20 20 ea 20 85 0d 37 96  |          . ..7.|
000096c0  2e 20 20 20 20 20 20 20  20 20 20 20 ee 20 85 20  |.           . . |
000096d0  ea 3a f7 20 85 3a 63 6c  69 63 6b 5f 61 64 72 25  |.:. .:click_adr%|
000096e0  21 34 3d 30 3a 85 20 31  2c f6 24 0d 37 a0 22 20  |!4=0:. 1,.$.7." |
000096f0  20 20 20 20 20 20 20 20  20 20 f2 6c 6f 61 64 5f  |          .load_|
00009700  66 69 6c 65 28 66 69 6c  65 24 2c 31 29 0d 37 aa  |file(file$,1).7.|
00009710  5a 20 20 20 20 20 20 20  20 20 20 20 e7 20 70 61  |Z           . pa|
00009720  67 65 24 3c 3e 22 22 20  70 61 67 65 25 3d a4 6e  |ge$<>"" page%=.n|
00009730  61 6d 65 5f 65 78 73 69  73 74 73 28 73 5f 70 61  |ame_exsists(s_pa|
00009740  67 65 73 25 2c 70 61 67  65 24 29 3a e7 20 70 61  |ges%,page$):. pa|
00009750  67 65 25 20 63 75 72 72  65 6e 74 5f 70 61 67 65  |ge% current_page|
00009760  25 3d 70 61 67 65 25 0d  37 b4 1b 20 20 20 20 20  |%=page%.7..     |
00009770  20 20 20 20 20 20 f2 70  72 65 5f 70 72 6f 63 65  |      .pre_proce|
00009780  73 73 0d 37 be 28 20 20  20 20 20 20 20 20 20 20  |ss.7.(          |
00009790  20 f2 73 68 6f 77 5f 70  61 67 65 28 63 75 72 72  | .show_page(curr|
000097a0  65 6e 74 5f 70 61 67 65  25 29 0d 37 c8 20 20 20  |ent_page%).7.   |
000097b0  20 20 20 20 20 20 20 20  20 e7 20 73 63 61 6e 6e  |         . scann|
000097c0  69 6e 67 25 20 f2 73 63  61 6e 0d 37 d2 1f 20 20  |ing% .scan.7..  |
000097d0  20 20 20 20 20 20 20 20  20 f2 7a 65 72 6f 5f 70  |         .zero_p|
000097e0  61 67 65 5f 73 74 61 63  6b 0d 37 dc 10 20 20 20  |age_stack.7..   |
000097f0  20 20 20 20 20 20 20 20  e1 0d 37 e6 0e 20 20 20  |        ..7..   |
00009800  20 20 20 20 20 20 cd 0d  37 f0 31 20 20 20 20 20  |      ..7.1     |
00009810  20 20 20 20 e7 20 c0 63  6d 64 24 2c 33 29 3d 22  |    . .cmd$,3)="|
00009820  72 75 6e 22 20 84 20 c0  63 6d 64 24 2c 34 29 3d  |run" . .cmd$,4)=|
00009830  22 2a 72 75 6e 22 20 8c  0d 37 fa 2a 20 20 20 20  |"*run" ..7.*    |
00009840  20 20 20 20 20 20 20 66  69 6c 65 24 3d c2 63 6d  |       file$=.cm|
00009850  64 24 2c a9 63 6d 64 24  2d 34 29 3a f1 66 69 6c  |d$,.cmd$-4):.fil|
00009860  65 24 0d 38 04 12 20 20  20 20 20 20 20 20 20 20  |e$.8..          |
00009870  20 ea 20 85 0d 38 0e 2e  20 20 20 20 20 20 20 20  | . ..8..        |
00009880  20 20 20 ee 20 85 20 ea  3a f7 20 85 3a 63 6c 69  |   . . .:. .:cli|
00009890  63 6b 5f 61 64 72 25 21  34 3d 30 3a 85 20 31 2c  |ck_adr%!4=0:. 1,|
000098a0  f6 24 0d 38 18 23 20 20  20 20 20 20 20 20 20 20  |.$.8.#          |
000098b0  20 ff 20 22 66 69 6c 65  72 5f 72 75 6e 20 22 2b  | . "filer_run "+|
000098c0  66 69 6c 65 24 0d 38 22  1c 20 20 20 20 20 20 20  |file$.8".       |
000098d0  20 20 20 20 63 6c 69 63  6b 5f 63 6d 64 24 3d 22  |    click_cmd$="|
000098e0  22 0d 38 2c 0e 20 20 20  20 20 20 20 20 20 cd 0d  |".8,.         ..|
000098f0  38 36 22 20 20 20 20 20  20 20 20 20 e7 20 c0 63  |86"         . .c|
00009900  6d 64 24 2c 36 29 3d 22  72 65 70 6c 61 79 22 20  |md$,6)="replay" |
00009910  8c 0d 38 40 23 20 20 20  20 20 20 20 20 20 20 20  |..8@#           |
00009920  66 69 6c 65 24 3d c2 63  6d 64 24 2c a9 63 6d 64  |file$=.cmd$,.cmd|
00009930  24 2d 37 29 0d 38 4a 22  20 20 20 20 20 20 20 20  |$-7).8J"        |
00009940  20 20 20 e7 20 a7 66 69  6c 65 24 2c 22 2d 61 74  |   . .file$,"-at|
00009950  22 29 3d 30 20 8c 0d 38  54 33 20 20 20 20 20 20  |")=0 ..8T3      |
00009960  20 20 20 20 20 20 20 c8  99 20 67 65 74 65 6e 74  |       .. getent|
00009970  72 79 25 2c 73 74 61 63  6b 25 2c 6f 62 6a 65 63  |ry%,stack%,objec|
00009980  74 25 20 b8 20 61 64 72  25 0d 38 5e 36 20 20 20  |t% . adr%.8^6   |
00009990  20 20 20 20 20 20 20 20  20 20 78 25 3d 28 61 64  |          x%=(ad|
000099a0  72 25 21 31 32 29 2b 6f  66 66 78 25 3a 79 25 3d  |r%!12)+offx%:y%=|
000099b0  28 61 64 72 25 21 31 36  29 2b 6f 66 66 79 25 0d  |(adr%!16)+offy%.|
000099c0  38 68 30 20 20 20 20 20  20 20 20 20 20 20 20 20  |8h0             |
000099d0  66 69 6c 65 24 3d 66 69  6c 65 24 2b 22 20 2d 61  |file$=file$+" -a|
000099e0  74 20 22 2b c3 78 25 2b  22 2c 22 2b c3 79 25 0d  |t "+.x%+","+.y%.|
000099f0  38 72 10 20 20 20 20 20  20 20 20 20 20 20 cd 0d  |8r.           ..|
00009a00  38 7c 12 20 20 20 20 20  20 20 20 20 20 20 ea 20  |8|.           . |
00009a10  85 0d 38 86 2e 20 20 20  20 20 20 20 20 20 20 20  |..8..           |
00009a20  ee 20 85 20 ea 3a f7 20  85 3a 63 6c 69 63 6b 5f  |. . .:. .:click_|
00009a30  61 64 72 25 21 34 3d 30  3a 85 20 31 2c f6 24 0d  |adr%!4=0:. 1,.$.|
00009a40  38 90 28 20 20 20 20 20  20 20 20 20 20 20 c8 99  |8.(           ..|
00009a50  20 22 57 69 6d 70 5f 53  74 61 72 74 54 61 73 6b  | "Wimp_StartTask|
00009a60  22 2c 66 69 6c 65 24 0d  38 9a 1c 20 20 20 20 20  |",file$.8..     |
00009a70  20 20 20 20 20 20 63 6c  69 63 6b 5f 63 6d 64 24  |      click_cmd$|
00009a80  3d 22 22 0d 38 a4 0e 20  20 20 20 20 20 20 20 20  |="".8..         |
00009a90  cd 0d 38 ae 4d 20 20 20  20 20 20 20 20 20 e7 20  |..8.M         . |
00009aa0  c0 63 6d 64 24 2c 34 29  3d 22 62 61 63 6b 22 20  |.cmd$,4)="back" |
00009ab0  69 6e 70 75 74 24 3d 22  62 61 63 6b 22 3a 21 71  |input$="back":!q|
00009ac0  25 3d 6d 61 69 6e 5f 77  25 3a 71 25 21 32 34 3d  |%=main_w%:q%!24=|
00009ad0  31 33 3a f2 74 72 79 5f  6b 65 79 73 3a e1 0d 38  |13:.try_keys:..8|
00009ae0  b8 22 20 20 20 20 20 20  20 20 20 e7 20 c0 63 6d  |."         . .cm|
00009af0  64 24 2c 36 29 3d 22 6f  62 6a 65 63 74 22 20 8c  |d$,6)="object" .|
00009b00  0d 38 c2 1c 20 20 20 20  20 20 20 20 20 20 20 63  |.8..           c|
00009b10  6c 69 63 6b 5f 63 6d 64  24 3d 22 22 0d 38 cc 1e  |lick_cmd$="".8..|
00009b20  20 20 20 20 20 20 20 20  20 20 20 69 6e 70 75 74  |           input|
00009b30  24 3d 63 6d 64 24 2b bd  31 33 0d 38 d6 0e 20 20  |$=cmd$+.13.8..  |
00009b40  20 20 20 20 20 20 20 cd  0d 38 e0 10 20 20 20 20  |       ..8..    |
00009b50  20 20 20 20 20 ea 20 85  0d 38 ea 2c 20 20 20 20  |     . ..8.,    |
00009b60  20 20 20 20 20 ee 20 85  20 ea 3a f7 20 85 3a 63  |     . . .:. .:c|
00009b70  6c 69 63 6b 5f 61 64 72  25 21 34 3d 30 3a 85 20  |lick_adr%!4=0:. |
00009b80  31 2c f6 24 0d 38 f4 2a  20 20 20 20 20 20 20 20  |1,.$.8.*        |
00009b90  20 e7 20 63 6c 69 63 6b  5f 63 6d 64 24 3c 3e 22  | . click_cmd$<>"|
00009ba0  22 20 ff 20 63 6c 69 63  6b 5f 63 6d 64 24 0d 38  |" . click_cmd$.8|
00009bb0  fe 25 20 20 20 20 20 20  20 c9 20 39 3a 63 6c 69  |.%       . 9:cli|
00009bc0  63 6b 5f 61 64 72 25 21  38 3d 91 2b 63 61 64 72  |ck_adr%!8=.+cadr|
00009bd0  25 21 38 0d 39 08 61 20  20 20 20 20 20 20 c9 20  |%!8.9.a       . |
00009be0  31 32 3a 70 6f 69 6e 74  65 72 5f 6f 6e 25 3d 32  |12:pointer_on%=2|
00009bf0  3a f2 67 65 74 5f 70 6f  69 6e 74 65 72 3a e7 20  |:.get_pointer:. |
00009c00  68 61 6e 64 6c 65 25 3d  6d 61 69 6e 5f 77 25 20  |handle%=main_w% |
00009c10  c8 99 20 22 57 69 6d 70  5f 53 70 72 69 74 65 4f  |.. "Wimp_SpriteO|
00009c20  70 22 2c 33 36 2c 31 2c  22 70 74 72 5f 68 61 6e  |p",36,1,"ptr_han|
00009c30  64 22 2c 32 0d 39 12 0a  20 20 20 20 20 cb 0d 39  |d",2.9..     ..9|
00009c40  1c 33 20 20 20 20 20 c8  99 20 67 65 74 6e 74 68  |.3     .. getnth|
00009c50  25 2c 73 5f 63 6c 69 63  6b 73 6f 6e 25 2c 63 6c  |%,s_clickson%,cl|
00009c60  69 63 6b 25 20 b8 20 63  6c 69 63 6b 5f 61 64 72  |ick% . click_adr|
00009c70  25 0d 39 26 2b 20 20 20  20 20 e7 20 6f 6b 25 20  |%.9&+     . ok% |
00009c80  63 6c 69 63 6b 5f 61 64  72 25 21 34 3d 70 74 72  |click_adr%!4=ptr|
00009c90  25 2b 63 6c 69 63 6b 5f  6c 65 6e 25 0d 39 30 33  |%+click_len%.903|
00009ca0  20 20 20 20 20 e7 20 63  6c 69 63 6b 5f 61 64 72  |     . click_adr|
00009cb0  25 21 34 3e 3d 21 63 6c  69 63 6b 5f 61 64 72 25  |%!4>=!click_adr%|
00009cc0  20 63 6c 69 63 6b 5f 61  64 72 25 21 34 3d 30 0d  | click_adr%!4=0.|
00009cd0  39 3a 08 20 20 20 cd 0d  39 44 06 20 ed 0d 39 4e  |9:.   ..9D. ..9N|
00009ce0  0d 20 63 6c 69 63 6b 25  3d 31 0d 39 58 06 20 f5  |. click%=1.9X. .|
00009cf0  0d 39 62 32 20 20 20 c8  99 20 67 65 74 6e 74 68  |.9b2   .. getnth|
00009d00  25 2c 73 5f 63 6c 69 63  6b 73 6f 6e 25 2c 63 6c  |%,s_clickson%,cl|
00009d10  69 63 6b 25 20 b8 20 61  64 72 25 2c 74 6f 6b 65  |ick% . adr%,toke|
00009d20  6e 25 0d 39 6c 13 20 20  20 e7 20 61 64 72 25 21  |n%.9l.   . adr%!|
00009d30  34 3d 30 20 8c 0d 39 76  29 20 20 20 20 20 c8 99  |4=0 ..9v)     ..|
00009d40  20 6b 69 6c 6c 65 6e 74  72 79 25 2c 73 5f 63 6c  | killentry%,s_cl|
00009d50  69 63 6b 73 6f 6e 25 2c  74 6f 6b 65 6e 25 0d 39  |ickson%,token%.9|
00009d60  80 12 20 20 20 20 20 63  6c 69 63 6b 25 2d 3d 31  |..     click%-=1|
00009d70  0d 39 8a 08 20 20 20 cd  0d 39 94 10 20 20 20 63  |.9..   ..9..   c|
00009d80  6c 69 63 6b 25 2b 3d 31  0d 39 9e 25 20 20 20 c8  |lick%+=1.9.%   .|
00009d90  99 20 6e 65 6e 74 72 69  65 73 25 2c 73 5f 63 6c  |. nentries%,s_cl|
00009da0  69 63 6b 73 6f 6e 25 20  b8 20 6e 63 25 0d 39 a8  |ickson% . nc%.9.|
00009db0  19 20 fd 63 6c 69 63 6b  25 3e 3d 6e 63 25 20 84  |. .click%>=nc% .|
00009dc0  20 6e 63 25 3d 30 0d 39  b2 06 20 e1 0d 39 bc 04  | nc%=0.9.. ..9..|
00009dd0  0d 39 c6 21 20 dd f2 63  6c 69 63 6b 5f 6c 69 73  |.9.! ..click_lis|
00009de0  74 28 63 6d 64 25 2c 61  64 72 25 2c 6c 65 6e 25  |t(cmd%,adr%,len%|
00009df0  29 0d 39 d0 14 20 e3 6c  69 73 74 25 3d 30 b8 6c  |).9.. .list%=0.l|
00009e00  65 6e 25 88 34 0d 39 da  10 20 20 20 c8 8e 20 63  |en%.4.9..   .. c|
00009e10  6d 64 25 20 ca 0d 39 e4  0c 20 20 20 20 20 c9 20  |md% ..9..     . |
00009e20  31 0d 39 ee 2e 20 20 20  20 20 20 20 c8 99 20 67  |1.9..       .. g|
00009e30  65 74 65 6e 74 72 79 25  2c 73 74 61 63 6b 25 2c  |etentry%,stack%,|
00009e40  6c 69 73 74 25 21 61 64  72 25 20 b8 20 74 25 0d  |list%!adr% . t%.|
00009e50  39 f8 22 20 20 20 20 20  20 20 e7 20 28 74 25 21  |9."       . (t%!|
00009e60  33 36 29 80 31 20 74 25  3d 30 20 8b 20 74 25 3d  |36).1 t%=0 . t%=|
00009e70  31 0d 3a 02 2f 20 20 20  20 20 20 20 f2 6c 69 67  |1.:./       .lig|
00009e80  68 74 5f 6f 62 6a 65 63  74 28 73 74 61 63 6b 25  |ht_object(stack%|
00009e90  2c 6c 69 73 74 25 21 61  64 72 25 2c 31 2c 31 29  |,list%!adr%,1,1)|
00009ea0  0d 3a 0c 30 20 20 20 20  20 c9 20 33 3a f2 68 69  |.:.0     . 3:.hi|
00009eb0  64 65 5f 6f 62 6a 65 63  74 28 73 74 61 63 6b 25  |de_object(stack%|
00009ec0  2c 6c 69 73 74 25 21 61  64 72 25 2c 31 2c 31 29  |,list%!adr%,1,1)|
00009ed0  0d 3a 16 30 20 20 20 20  20 c9 20 34 3a f2 68 69  |.:.0     . 4:.hi|
00009ee0  64 65 5f 6f 62 6a 65 63  74 28 73 74 61 63 6b 25  |de_object(stack%|
00009ef0  2c 6c 69 73 74 25 21 61  64 72 25 2c 30 2c 31 29  |,list%!adr%,0,1)|
00009f00  0d 3a 20 08 20 20 20 cb  0d 3a 2a 06 20 ed 0d 3a  |.: .   ..:*. ..:|
00009f10  34 06 20 e1 0d 3a 3e 04  0d 3a 48 26 20 dd f2 75  |4. ..:>..:H& ..u|
00009f20  6e 64 65 72 5f 70 6f 69  6e 74 65 72 3a e7 20 70  |nder_pointer:. p|
00009f30  6f 69 6e 74 65 72 5f 6f  6e 25 3d 31 20 e1 0d 3a  |ointer_on%=1 ..:|
00009f40  52 11 20 f2 67 65 74 5f  70 6f 69 6e 74 65 72 0d  |R. .get_pointer.|
00009f50  3a 5c 1d 20 21 71 25 3d  6d 61 69 6e 5f 77 25 3a  |:\. !q%=main_w%:|
00009f60  c8 99 20 67 65 74 77 25  2c 2c 71 25 0d 3a 66 2b  |.. getw%,,q%.:f+|
00009f70  20 6f 66 66 78 25 3d 28  71 25 21 34 2d 71 25 21  | offx%=(q%!4-q%!|
00009f80  32 30 29 3a 6f 66 66 79  25 3d 28 71 25 21 31 36  |20):offy%=(q%!16|
00009f90  2d 71 25 21 32 34 29 0d  3a 70 28 20 6d 78 25 3d  |-q%!24).:p( mx%=|
00009fa0  6d 6f 75 73 65 78 25 2d  6f 66 66 78 25 3a 6d 79  |mousex%-offx%:my|
00009fb0  25 3d 6d 6f 75 73 65 79  25 2d 6f 66 66 79 25 0d  |%=mousey%-offy%.|
00009fc0  3a 7a 4f 20 e7 20 68 61  6e 64 6c 65 25 3d 6d 61  |:zO . handle%=ma|
00009fd0  69 6e 5f 77 25 20 6f 62  6a 65 63 74 25 3d a4 77  |in_w% object%=.w|
00009fe0  68 69 63 68 5f 6f 62 6a  65 63 74 28 63 75 72 72  |hich_object(curr|
00009ff0  65 6e 74 5f 70 61 67 65  25 2c 6d 78 25 2c 6d 79  |ent_page%,mx%,my|
0000a000  25 29 20 8b 20 6f 62 6a  65 63 74 25 3d 30 0d 3a  |%) . object%=0.:|
0000a010  84 21 20 e7 20 6f 62 6a  65 63 74 25 3c 3e 70 6f  |.! . object%<>po|
0000a020  69 6e 74 65 72 5f 6f 62  6a 65 63 74 25 20 8c 0d  |inter_object% ..|
0000a030  3a 8e 21 20 20 20 ff 22  70 6f 69 6e 74 65 72 20  |:.!   ."pointer |
0000a040  31 22 3a 70 6f 69 6e 74  65 72 5f 6f 6e 25 3d b9  |1":pointer_on%=.|
0000a050  0d 3a 98 1e 20 20 20 70  6f 69 6e 74 65 72 5f 6f  |.:..   pointer_o|
0000a060  62 6a 65 63 74 25 3d 6f  62 6a 65 63 74 25 0d 3a  |bject%=object%.:|
0000a070  a2 23 20 20 20 73 74 61  63 6b 25 3d a4 73 74 61  |.#   stack%=.sta|
0000a080  63 6b 28 63 75 72 72 65  6e 74 5f 70 61 67 65 25  |ck(current_page%|
0000a090  29 0d 3a ac 20 20 20 20  c8 99 20 6e 65 6e 74 72  |).:.    .. nentr|
0000a0a0  69 65 73 25 2c 73 74 61  63 6b 25 20 b8 20 6e 6f  |ies%,stack% . no|
0000a0b0  25 0d 3a b6 0e 20 20 20  e7 20 6e 6f 25 20 8c 0d  |%.:..   . no% ..|
0000a0c0  3a c0 14 20 20 20 20 20  e3 20 6f 62 25 3d 31 b8  |:..     . ob%=1.|
0000a0d0  6e 6f 25 0d 3a ca 2e 20  20 20 20 20 20 20 c8 99  |no%.:..       ..|
0000a0e0  20 67 65 74 6e 74 68 25  2c 73 74 61 63 6b 25 2c  | getnth%,stack%,|
0000a0f0  6f 62 25 20 b8 20 61 64  72 25 2c 74 6f 6b 65 6e  |ob% . adr%,token|
0000a100  25 0d 3a d4 4b 20 20 20  20 20 20 20 e7 20 74 6f  |%.:.K       . to|
0000a110  6b 65 6e 25 3c 3e 6f 62  6a 65 63 74 25 20 80 20  |ken%<>object% . |
0000a120  28 61 64 72 25 21 33 36  29 80 31 20 f2 6c 69 67  |(adr%!36).1 .lig|
0000a130  68 74 5f 6f 62 6a 65 63  74 28 73 74 61 63 6b 25  |ht_object(stack%|
0000a140  2c 74 6f 6b 65 6e 25 2c  30 2c 31 29 0d 3a de 0a  |,token%,0,1).:..|
0000a150  20 20 20 20 20 ed 0d 3a  e8 14 20 20 20 20 20 e7  |     ..:..     .|
0000a160  20 6f 62 6a 65 63 74 25  20 8c 0d 3a f2 34 20 20  | object% ..:.4  |
0000a170  20 20 20 20 20 c8 99 20  67 65 74 65 6e 74 72 79  |     .. getentry|
0000a180  25 2c 73 74 61 63 6b 25  2c 6f 62 6a 65 63 74 25  |%,stack%,object%|
0000a190  20 b8 20 61 64 72 25 2c  74 6f 6b 65 6e 25 0d 3a  | . adr%,token%.:|
0000a1a0  fc 16 20 20 20 20 20 20  20 e7 20 61 64 72 25 21  |..       . adr%!|
0000a1b0  32 38 20 8c 0d 3b 06 32  20 20 20 20 20 20 20 20  |28 ..;.2        |
0000a1c0  20 c8 99 20 67 65 74 65  6e 74 72 79 25 2c 73 5f  | .. getentry%,s_|
0000a1d0  63 6c 69 63 6b 73 25 2c  61 64 72 25 21 32 38 20  |clicks%,adr%!28 |
0000a1e0  b8 20 61 64 72 25 0d 3b  10 34 20 20 20 20 20 20  |. adr%.;.4      |
0000a1f0  20 20 20 e7 20 61 64 72  25 21 31 36 20 f2 64 6f  |   . adr%!16 .do|
0000a200  5f 63 6c 69 63 6b 28 73  5f 70 6f 69 6e 74 65 72  |_click(s_pointer|
0000a210  25 2c 61 64 72 25 21 31  36 29 0d 3b 1a 0c 20 20  |%,adr%!16).;..  |
0000a220  20 20 20 20 20 cd 0d 3b  24 0a 20 20 20 20 20 cc  |     ..;$.     .|
0000a230  0d 3b 2e 35 20 20 20 20  20 20 20 c8 99 20 67 65  |.;.5       .. ge|
0000a240  74 65 6e 74 72 79 25 2c  73 5f 70 61 67 65 73 25  |tentry%,s_pages%|
0000a250  2c 63 75 72 72 65 6e 74  5f 70 61 67 65 25 20 b8  |,current_page% .|
0000a260  20 61 64 72 25 0d 3b 38  16 20 20 20 20 20 20 20  | adr%.;8.       |
0000a270  e7 20 61 64 72 25 21 32  34 20 8c 0d 3b 42 32 20  |. adr%!24 ..;B2 |
0000a280  20 20 20 20 20 20 20 20  c8 99 20 67 65 74 65 6e  |        .. geten|
0000a290  74 72 79 25 2c 73 5f 63  6c 69 63 6b 73 25 2c 61  |try%,s_clicks%,a|
0000a2a0  64 72 25 21 32 34 20 b8  20 61 64 72 25 0d 3b 4c  |dr%!24 . adr%.;L|
0000a2b0  34 20 20 20 20 20 20 20  20 20 e7 20 61 64 72 25  |4         . adr%|
0000a2c0  21 31 36 20 f2 64 6f 5f  63 6c 69 63 6b 28 73 5f  |!16 .do_click(s_|
0000a2d0  70 6f 69 6e 74 65 72 25  2c 61 64 72 25 21 31 36  |pointer%,adr%!16|
0000a2e0  29 0d 3b 56 0c 20 20 20  20 20 20 20 cd 0d 3b 60  |).;V.       ..;`|
0000a2f0  0a 20 20 20 20 20 cd 0d  3b 6a 08 20 20 20 cd 0d  |.     ..;j.   ..|
0000a300  3b 74 06 20 cd 0d 3b 7e  06 20 e1 0d 3b 88 04 0d  |;t. ..;~. ..;...|
0000a310  3b 92 1f 20 dd f2 6f 66  74 65 6e 3a e7 20 70 6f  |;.. ..often:. po|
0000a320  69 6e 74 65 72 5f 6f 6e  25 3c 3e b9 20 e1 0d 3b  |inter_on%<>. ..;|
0000a330  9c 21 20 73 74 61 63 6b  25 3d a4 73 74 61 63 6b  |.! stack%=.stack|
0000a340  28 63 75 72 72 65 6e 74  5f 70 61 67 65 25 29 0d  |(current_page%).|
0000a350  3b a6 1e 20 c8 99 20 6e  65 6e 74 72 69 65 73 25  |;.. .. nentries%|
0000a360  2c 73 74 61 63 6b 25 20  b8 20 6e 6f 25 0d 3b b0  |,stack% . no%.;.|
0000a370  0c 20 e7 20 6e 6f 25 20  8c 0d 3b ba 12 20 20 20  |. . no% ..;..   |
0000a380  e3 20 6f 62 25 3d 31 b8  6e 6f 25 0d 3b c4 2c 20  |. ob%=1.no%.;., |
0000a390  20 20 20 20 c8 99 20 67  65 74 6e 74 68 25 2c 73  |    .. getnth%,s|
0000a3a0  74 61 63 6b 25 2c 6f 62  25 20 b8 20 61 64 72 25  |tack%,ob% . adr%|
0000a3b0  2c 74 6f 6b 65 6e 25 0d  3b ce 14 20 20 20 20 20  |,token%.;..     |
0000a3c0  e7 20 61 64 72 25 21 32  38 20 8c 0d 3b d8 30 20  |. adr%!28 ..;.0 |
0000a3d0  20 20 20 20 20 20 c8 99  20 67 65 74 65 6e 74 72  |      .. getentr|
0000a3e0  79 25 2c 73 5f 63 6c 69  63 6b 73 25 2c 61 64 72  |y%,s_clicks%,adr|
0000a3f0  25 21 32 38 20 b8 20 61  64 72 25 0d 3b e2 15 20  |%!28 . adr%.;.. |
0000a400  20 20 20 20 20 20 e7 20  61 64 72 25 21 38 20 8c  |      . adr%!8 .|
0000a410  0d 3b ec 1a 20 20 20 20  20 20 20 20 20 e7 20 61  |.;..         . a|
0000a420  64 72 25 21 32 34 3c 91  20 8c 0d 3b f6 20 20 20  |dr%!24<. ..;.   |
0000a430  20 20 20 20 20 20 20 20  20 61 64 72 25 21 32 34  |         adr%!24|
0000a440  3d 91 2b 61 64 72 25 21  31 32 0d 3c 00 29 20 20  |=.+adr%!12.<.)  |
0000a450  20 20 20 20 20 20 20 20  20 f2 64 6f 5f 63 6c 69  |         .do_cli|
0000a460  63 6b 28 73 5f 6f 66 74  65 6e 25 2c 61 64 72 25  |ck(s_often%,adr%|
0000a470  21 38 29 0d 3c 0a 0e 20  20 20 20 20 20 20 20 20  |!8).<..         |
0000a480  cd 0d 3c 14 0c 20 20 20  20 20 20 20 cd 0d 3c 1e  |..<..       ..<.|
0000a490  0a 20 20 20 20 20 cd 0d  3c 28 08 20 20 20 ed 0d  |.     ..<(.   ..|
0000a4a0  3c 32 06 20 cd 0d 3c 3c  06 20 e1 0d 3c 46 04 0d  |<2. ..<<. ..<F..|
0000a4b0  3c 50 1d 20 dd f2 6f 70  65 6e 5f 74 72 79 5f 6d  |<P. ..open_try_m|
0000a4c0  65 6e 75 28 6d 78 25 2c  6d 79 25 29 0d 3c 5a 17  |enu(mx%,my%).<Z.|
0000a4d0  20 e3 49 25 3d 30 b8 32  88 32 3a 50 25 3d 6d 61  | .I%=0.2.2:P%=ma|
0000a4e0  69 6e 25 0d 3c 64 0b 20  5b 6f 70 74 49 25 0d 3c  |in%.<d. [optI%.<|
0000a4f0  6e 0f 20 65 71 75 73 20  6d 65 6e 75 24 0d 3c 78  |n. equs menu$.<x|
0000a500  11 20 65 71 75 64 20 26  30 37 30 32 30 37 0d 3c  |. equd &070207.<|
0000a510  82 1c 20 65 71 75 64 20  31 36 38 3a 65 71 75 64  |.. equd 168:equd|
0000a520  20 34 30 3a 65 71 75 64  20 30 0d 3c 8c 2c 20 65  | 40:equd 0.<., e|
0000a530  71 75 64 20 38 3a 65 71  75 64 20 70 61 67 65 6c  |qud 8:equd pagel|
0000a540  69 73 74 5f 77 63 25 3a  65 71 75 64 20 26 30 37  |ist_wc%:equd &07|
0000a550  30 30 30 30 32 31 0d 3c  96 18 20 65 71 75 73 20  |000021.<.. equs |
0000a560  22 53 68 6f 77 20 70 61  67 65 20 20 20 22 0d 3c  |"Show page   ".<|
0000a570  a0 24 20 65 71 75 64 20  26 38 30 3a 65 71 75 64  |.$ equd &80:equd|
0000a580  20 2d 31 3a 65 71 75 64  20 26 30 37 30 30 30 30  | -1:equd &070000|
0000a590  32 31 0d 3c aa 18 20 65  71 75 73 20 22 50 72 69  |21.<.. equs "Pri|
0000a5a0  6e 74 20 20 20 20 20 20  20 22 0d 3c b4 08 20 5d  |nt       ".<.. ]|
0000a5b0  3a ed 0d 3c be 0d 20 6d  65 6e 75 25 3d 31 31 0d  |:..<.. menu%=11.|
0000a5c0  3c c8 25 20 c8 99 20 63  72 65 61 74 65 6d 65 6e  |<.% .. createmen|
0000a5d0  75 25 2c 2c 6d 61 69 6e  25 2c 6d 78 25 2c 6d 79  |u%,,main%,mx%,my|
0000a5e0  25 2d 33 32 0d 3c d2 06  20 e1 0d 3c dc 04 0d 3c  |%-32.<.. ..<...<|
0000a5f0  e6 17 20 dd f2 74 72 79  5f 6d 65 6e 75 5f 77 61  |.. ..try_menu_wa|
0000a600  72 6e 69 6e 67 0d 3c f0  24 20 6d 78 25 3d 71 25  |rning.<.$ mx%=q%|
0000a610  21 32 34 3a 6d 79 25 3d  71 25 21 32 38 3a 69 74  |!24:my%=q%!28:it|
0000a620  65 6d 25 3d 71 25 21 33  32 0d 3c fa 28 20 f2 61  |em%=q%!32.<.( .a|
0000a630  72 72 61 6e 67 65 5f 70  61 67 65 6c 69 73 74 5f  |rrange_pagelist_|
0000a640  77 63 28 63 75 72 72 65  6e 74 5f 70 61 67 65 25  |wc(current_page%|
0000a650  29 0d 3d 04 28 20 c8 99  20 63 72 73 75 62 6d 65  |).=.( .. crsubme|
0000a660  6e 75 25 2c 2c 70 61 67  65 6c 69 73 74 5f 77 63  |nu%,,pagelist_wc|
0000a670  25 2c 6d 78 25 2c 6d 79  25 0d 3d 0e 06 20 e1 0d  |%,mx%,my%.=.. ..|
0000a680  3d 18 04 0d 3d 22 16 20  dd f2 74 72 79 5f 6d 65  |=...=". ..try_me|
0000a690  6e 75 5f 73 65 6c 65 63  74 0d 3d 2c 0f 20 c8 8e  |nu_select.=,. ..|
0000a6a0  20 6d 65 6e 75 25 20 ca  0d 3d 36 19 20 20 20 c9  | menu% ..=6.   .|
0000a6b0  20 35 3a f2 69 63 6f 6e  5f 62 61 72 5f 6d 65 6e  | 5:.icon_bar_men|
0000a6c0  75 0d 3d 40 0c 20 20 20  c9 20 31 31 3a 0d 3d 4a  |u.=@.   . 11:.=J|
0000a6d0  11 20 20 20 20 20 c8 8e  20 21 71 25 20 ca 0d 3d  |.     .. !q% ..=|
0000a6e0  54 1c 20 20 20 20 20 20  20 c9 20 31 3a f2 6f 70  |T.       . 1:.op|
0000a6f0  65 6e 5f 70 72 69 6e 74  5f 77 0d 3d 5e 0a 20 20  |en_print_w.=^.  |
0000a700  20 20 20 cb 0d 3d 68 06  20 cb 0d 3d 72 06 20 e1  |   ..=h. ..=r. .|
0000a710  0d 3d 7c 04 0d 3d 86 16  20 dd f2 74 72 79 5f 70  |.=|..=.. ..try_p|
0000a720  61 67 65 6c 69 73 74 5f  77 63 0d 3d 90 0e 20 62  |agelist_wc.=.. b|
0000a730  75 74 25 3d 71 25 21 38  0d 3d 9a 24 20 21 77 73  |ut%=q%!8.=.$ !ws|
0000a740  25 3d 70 61 67 65 6c 69  73 74 5f 77 63 25 3a c8  |%=pagelist_wc%:.|
0000a750  99 20 67 65 74 77 25 2c  2c 77 73 25 0d 3d a4 2f  |. getw%,,ws%.=./|
0000a760  20 6f 66 66 78 25 3d 28  77 73 25 21 34 2d 77 73  | offx%=(ws%!4-ws|
0000a770  25 21 32 30 29 3a 6f 66  66 79 25 3d 28 77 73 25  |%!20):offy%=(ws%|
0000a780  21 31 36 2d 77 73 25 21  32 34 29 0d 3d ae 21 20  |!16-ws%!24).=.! |
0000a790  70 61 67 65 25 3d 28 28  28 71 25 21 34 29 2d 6f  |page%=(((q%!4)-o|
0000a7a0  66 66 79 25 29 81 2d 34  38 29 2b 31 0d 3d b8 2e  |ffy%).-48)+1.=..|
0000a7b0  20 c8 99 20 6e 65 6e 74  72 69 65 73 25 2c 73 5f  | .. nentries%,s_|
0000a7c0  70 61 67 65 73 25 20 b8  20 6e 70 25 3a e7 20 70  |pages% . np%:. p|
0000a7d0  61 67 65 25 3e 6e 70 25  20 e1 0d 3d c2 27 20 c8  |age%>np% ..=.' .|
0000a7e0  99 20 67 65 74 6e 74 68  25 2c 73 5f 70 61 67 65  |. getnth%,s_page|
0000a7f0  73 25 2c 70 61 67 65 25  20 b8 20 2c 70 61 67 65  |s%,page% . ,page|
0000a800  25 0d 3d cc 20 20 f2 61  72 72 61 6e 67 65 5f 70  |%.=.  .arrange_p|
0000a810  61 67 65 6c 69 73 74 5f  77 63 28 70 61 67 65 25  |agelist_wc(page%|
0000a820  29 0d 3d d6 16 20 f2 73  68 6f 77 5f 70 61 67 65  |).=.. .show_page|
0000a830  28 70 61 67 65 25 29 0d  3d e0 28 20 f2 61 72 72  |(page%).=.( .arr|
0000a840  61 6e 67 65 5f 70 61 67  65 6c 69 73 74 5f 77 63  |ange_pagelist_wc|
0000a850  28 63 75 72 72 65 6e 74  5f 70 61 67 65 25 29 0d  |(current_page%).|
0000a860  3d ea 12 20 f2 62 65 67  69 6e 5f 74 72 79 69 6e  |=.. .begin_tryin|
0000a870  67 0d 3d f4 20 20 e7 20  62 75 74 25 80 34 20 c8  |g.=.  . but%.4 .|
0000a880  99 20 63 72 65 61 74 65  6d 65 6e 75 25 2c 2c 2d  |. createmenu%,,-|
0000a890  31 0d 3d fe 06 20 e1 0d  3e 08 04 0d 3e 12 0b 20  |1.=.. ..>...>.. |
0000a8a0  dd f2 73 63 61 6e 0d 3e  1c 16 20 e7 20 73 63 61  |..scan.>.. . sca|
0000a8b0  6e 5f 63 6f 75 6e 74 25  3e 91 20 e1 0d 3e 26 2c  |n_count%>. ..>&,|
0000a8c0  20 e7 20 73 63 61 6e 5f  6b 65 79 73 25 3d 31 20  | . scan_keys%=1 |
0000a8d0  73 63 61 6e 5f 63 6f 75  6e 74 25 3d 91 2b 73 63  |scan_count%=.+sc|
0000a8e0  61 6e 5f 74 69 6d 65 25  0d 3e 30 21 20 73 74 61  |an_time%.>0! sta|
0000a8f0  63 6b 25 3d a4 73 74 61  63 6b 28 63 75 72 72 65  |ck%=.stack(curre|
0000a900  6e 74 5f 70 61 67 65 25  29 0d 3e 3a 1e 20 c8 99  |nt_page%).>:. ..|
0000a910  20 6e 65 6e 74 72 69 65  73 25 2c 73 74 61 63 6b  | nentries%,stack|
0000a920  25 20 b8 20 6e 6f 25 0d  3e 44 0e 20 e7 20 6e 6f  |% . no%.>D. . no|
0000a930  25 3d 30 20 e1 0d 3e 4e  18 20 e7 20 73 63 61 6e  |%=0 ..>N. . scan|
0000a940  5f 6f 62 6a 65 63 74 25  3c 3e 30 20 8c 0d 3e 58  |_object%<>0 ..>X|
0000a950  33 20 20 20 c8 99 20 67  65 74 6e 74 68 25 2c 73  |3   .. getnth%,s|
0000a960  74 61 63 6b 25 2c 73 63  61 6e 5f 6f 62 6a 65 63  |tack%,scan_objec|
0000a970  74 25 20 b8 20 61 64 72  25 2c 74 6f 6b 65 6e 25  |t% . adr%,token%|
0000a980  0d 3e 62 16 20 20 20 e7  20 61 64 72 25 21 33 36  |.>b.   . adr%!36|
0000a990  20 80 20 31 20 8c 0d 3e  6c 29 20 20 20 20 20 f2  | . 1 ..>l)     .|
0000a9a0  6c 69 67 68 74 5f 6f 62  6a 65 63 74 28 73 74 61  |light_object(sta|
0000a9b0  63 6b 25 2c 74 6f 6b 65  6e 25 2c 30 2c 31 29 0d  |ck%,token%,0,1).|
0000a9c0  3e 76 18 20 20 20 20 20  73 63 61 6e 5f 6f 62 6a  |>v.     scan_obj|
0000a9d0  65 63 74 25 2b 3d 31 0d  3e 80 2a 20 20 20 20 20  |ect%+=1.>.*     |
0000a9e0  e7 20 73 63 61 6e 5f 6f  62 6a 65 63 74 25 3e 6e  |. scan_object%>n|
0000a9f0  6f 25 20 73 63 61 6e 5f  6f 62 6a 65 63 74 25 3d  |o% scan_object%=|
0000aa00  31 0d 3e 8a 08 20 20 20  cd 0d 3e 94 06 20 cc 0d  |1.>..   ..>.. ..|
0000aa10  3e 9e 15 20 20 20 73 63  61 6e 5f 6f 62 6a 65 63  |>..   scan_objec|
0000aa20  74 25 3d 31 0d 3e a8 06  20 cd 0d 3e b2 0b 20 79  |t%=1.>.. ..>.. y|
0000aa30  65 73 25 3d 30 0d 3e bc  06 20 f5 0d 3e c6 33 20  |es%=0.>.. ..>.3 |
0000aa40  20 20 c8 99 20 67 65 74  6e 74 68 25 2c 73 74 61  |  .. getnth%,sta|
0000aa50  63 6b 25 2c 73 63 61 6e  5f 6f 62 6a 65 63 74 25  |ck%,scan_object%|
0000aa60  20 b8 20 61 64 72 25 2c  74 6f 6b 65 6e 25 0d 3e  | . adr%,token%.>|
0000aa70  d0 2b 20 20 20 e7 20 28  61 64 72 25 21 32 38 29  |.+   . (adr%!28)|
0000aa80  3c 3e 30 20 80 20 28 28  61 64 72 25 21 33 36 29  |<>0 . ((adr%!36)|
0000aa90  80 31 32 38 29 3d 30 20  8c 0d 3e da 2e 20 20 20  |.128)=0 ..>..   |
0000aaa0  20 20 c8 99 20 67 65 74  65 6e 74 72 79 25 2c 73  |  .. getentry%,s|
0000aab0  5f 63 6c 69 63 6b 73 25  2c 61 64 72 25 21 32 38  |_clicks%,adr%!28|
0000aac0  20 b8 20 61 64 72 25 0d  3e e4 14 20 20 20 20 20  | . adr%.>..     |
0000aad0  e7 20 61 64 72 25 21 31  36 20 8c 0d 3e ee 34 20  |. adr%!16 ..>.4 |
0000aae0  20 20 20 20 20 20 f2 6c  69 67 68 74 5f 6f 62 6a  |      .light_obj|
0000aaf0  65 63 74 28 73 74 61 63  6b 25 2c 74 6f 6b 65 6e  |ect(stack%,token|
0000ab00  25 2c 31 2c 31 29 3a 79  65 73 25 3d 6e 6f 25 0d  |%,1,1):yes%=no%.|
0000ab10  3e f8 0a 20 20 20 20 20  cc 0d 3f 02 1a 20 20 20  |>..     ..?..   |
0000ab20  20 20 20 20 73 63 61 6e  5f 6f 62 6a 65 63 74 25  |    scan_object%|
0000ab30  2b 3d 31 0d 3f 0c 2c 20  20 20 20 20 20 20 e7 20  |+=1.?.,       . |
0000ab40  73 63 61 6e 5f 6f 62 6a  65 63 74 25 3e 6e 6f 25  |scan_object%>no%|
0000ab50  20 73 63 61 6e 5f 6f 62  6a 65 63 74 25 3d 31 0d  | scan_object%=1.|
0000ab60  3f 16 12 20 20 20 20 20  20 20 79 65 73 25 2b 3d  |?..       yes%+=|
0000ab70  31 0d 3f 20 0a 20 20 20  20 20 cd 0d 3f 2a 08 20  |1.? .     ..?*. |
0000ab80  20 20 cc 0d 3f 34 18 20  20 20 20 20 73 63 61 6e  |  ..?4.     scan|
0000ab90  5f 6f 62 6a 65 63 74 25  2b 3d 31 0d 3f 3e 2a 20  |_object%+=1.?>* |
0000aba0  20 20 20 20 e7 20 73 63  61 6e 5f 6f 62 6a 65 63  |    . scan_objec|
0000abb0  74 25 3e 6e 6f 25 20 73  63 61 6e 5f 6f 62 6a 65  |t%>no% scan_obje|
0000abc0  63 74 25 3d 31 0d 3f 48  10 20 20 20 20 20 79 65  |ct%=1.?H.     ye|
0000abd0  73 25 2b 3d 31 0d 3f 52  08 20 20 20 cd 0d 3f 5c  |s%+=1.?R.   ..?\|
0000abe0  0e 20 fd 79 65 73 25 3d  6e 6f 25 0d 3f 66 06 20  |. .yes%=no%.?f. |
0000abf0  e1 0d 3f 70 04 0d 3f 7a  17 20 dd f2 73 63 61 6e  |..?p..?z. ..scan|
0000ac00  5f 63 6c 69 63 6b 28 62  75 74 25 29 0d 3f 84 17  |_click(but%).?..|
0000ac10  20 e7 20 73 63 61 6e 5f  6f 62 6a 65 63 74 25 3d  | . scan_object%=|
0000ac20  30 20 e1 0d 3f 8e 21 20  73 74 61 63 6b 25 3d a4  |0 ..?.! stack%=.|
0000ac30  73 74 61 63 6b 28 63 75  72 72 65 6e 74 5f 70 61  |stack(current_pa|
0000ac40  67 65 25 29 0d 3f 98 34  20 e7 20 73 63 61 6e 5f  |ge%).?.4 . scan_|
0000ac50  6b 65 79 73 25 3d 31 20  84 20 28 73 63 61 6e 5f  |keys%=1 . (scan_|
0000ac60  6b 65 79 73 25 3d 32 20  80 20 28 62 75 74 25 80  |keys%=2 . (but%.|
0000ac70  26 31 30 31 29 29 20 8c  0d 3f a2 33 20 20 20 c8  |&101)) ..?.3   .|
0000ac80  99 20 67 65 74 6e 74 68  25 2c 73 74 61 63 6b 25  |. getnth%,stack%|
0000ac90  2c 73 63 61 6e 5f 6f 62  6a 65 63 74 25 20 b8 20  |,scan_object% . |
0000aca0  61 64 72 25 2c 74 6f 6b  65 6e 25 0d 3f ac 12 20  |adr%,token%.?.. |
0000acb0  20 20 e7 20 61 64 72 25  21 32 38 20 8c 0d 3f b6  |  . adr%!28 ..?.|
0000acc0  2e 20 20 20 20 20 c8 99  20 67 65 74 65 6e 74 72  |.     .. getentr|
0000acd0  79 25 2c 73 5f 63 6c 69  63 6b 73 25 2c 61 64 72  |y%,s_clicks%,adr|
0000ace0  25 21 32 38 20 b8 20 61  64 72 25 0d 3f c0 2e 20  |%!28 . adr%.?.. |
0000acf0  20 20 20 20 e7 20 61 64  72 25 21 32 30 20 f2 64  |    . adr%!20 .d|
0000ad00  6f 5f 63 6c 69 63 6b 28  73 5f 6d 6f 75 73 65 25  |o_click(s_mouse%|
0000ad10  2c 61 64 72 25 21 32 30  29 0d 3f ca 08 20 20 20  |,adr%!20).?..   |
0000ad20  cd 0d 3f d4 06 20 cc 0d  3f de 18 20 20 20 e7 20  |..?.. ..?..   . |
0000ad30  62 75 74 25 80 26 34 30  34 20 f2 73 63 61 6e 0d  |but%.&404 .scan.|
0000ad40  3f e8 06 20 cd 0d 3f f2  06 20 e1 0d 3f fc 04 0d  |?.. ..?.. ..?...|
0000ad50  40 06 16 20 dd f2 72 65  64 65 66 69 6e 65 5f 6d  |@.. ..redefine_m|
0000ad60  61 69 6e 5f 77 0d 40 10  1e 20 21 71 25 3d 6d 61  |ain_w.@.. !q%=ma|
0000ad70  69 6e 5f 77 25 3a c8 99  20 67 65 74 77 69 25 2c  |in_w%:.. getwi%,|
0000ad80  2c 71 25 0d 40 1a 28 20  e7 20 28 71 25 21 33 32  |,q%.@.( . (q%!32|
0000ad90  29 80 28 31 3c 3c 31 36  29 20 6f 70 65 6e 25 3d  |).(1<<16) open%=|
0000ada0  b9 20 8b 20 6f 70 65 6e  25 3d a3 0d 40 24 1f 20  |. . open%=..@$. |
0000adb0  c8 99 20 22 57 69 6d 70  5f 44 65 6c 65 74 65 57  |.. "Wimp_DeleteW|
0000adc0  69 6e 64 6f 77 22 2c 2c  71 25 0d 40 2e 27 20 66  |indow",,q%.@.' f|
0000add0  25 3d 28 28 71 25 21 33  32 29 80 26 38 33 46 46  |%=((q%!32).&83FF|
0000ade0  46 46 46 46 29 20 84 20  28 26 38 33 3c 3c 32 34  |FFFF) . (&83<<24|
0000adf0  29 0d 40 38 0e 20 62 68  25 3d 71 25 21 32 38 0d  |).@8. bh%=q%!28.|
0000ae00  40 42 1e 20 e7 20 68 5f  73 63 72 6f 6c 6c 25 20  |@B. . h_scroll% |
0000ae10  66 25 3d 66 25 84 28 31  3c 3c 33 30 29 0d 40 4c  |f%=f%.(1<<30).@L|
0000ae20  1e 20 e7 20 76 5f 73 63  72 6f 6c 6c 25 20 66 25  |. . v_scroll% f%|
0000ae30  3d 66 25 84 28 31 3c 3c  32 38 29 0d 40 56 2a 20  |=f%.(1<<28).@V* |
0000ae40  e7 20 68 5f 73 63 72 6f  6c 6c 25 20 84 20 76 5f  |. h_scroll% . v_|
0000ae50  73 63 72 6f 6c 6c 25 20  66 25 3d 66 25 84 28 31  |scroll% f%=f%.(1|
0000ae60  3c 3c 32 39 29 0d 40 60  3c 20 e7 20 74 69 74 6c  |<<29).@`< . titl|
0000ae70  65 5f 62 61 72 25 20 66  25 3d 66 25 84 28 31 3c  |e_bar% f%=f%.(1<|
0000ae80  3c 32 36 29 3a e7 20 74  6f 67 67 6c 65 5f 69 63  |<26):. toggle_ic|
0000ae90  6f 6e 25 20 66 25 3d 66  25 84 28 31 3c 3c 32 37  |on% f%=f%.(1<<27|
0000aea0  29 0d 40 6a 0d 20 71 25  21 33 32 3d 66 25 0d 40  |).@j. q%!32=f%.@|
0000aeb0  74 2b 20 c8 99 20 22 57  69 6d 70 5f 43 72 65 61  |t+ .. "Wimp_Crea|
0000aec0  74 65 57 69 6e 64 6f 77  22 2c 2c 71 25 2b 34 20  |teWindow",,q%+4 |
0000aed0  b8 20 6d 61 69 6e 5f 77  25 0d 40 7e 55 20 21 71  |. main_w%.@~U !q|
0000aee0  25 3d 6d 61 69 6e 5f 77  25 3a c8 99 20 67 65 74  |%=main_w%:.. get|
0000aef0  77 25 2c 2c 71 25 3a f2  6f 70 65 6e 5f 77 69 6e  |w%,,q%:.open_win|
0000af00  64 6f 77 28 21 71 25 2c  71 25 21 34 2c 71 25 21  |dow(!q%,q%!4,q%!|
0000af10  38 2c 71 25 21 31 32 2c  71 25 21 31 36 2c 71 25  |8,q%!12,q%!16,q%|
0000af20  21 32 30 2c 71 25 21 32  34 2c 62 68 25 29 0d 40  |!20,q%!24,bh%).@|
0000af30  88 06 20 e1 0d 40 92 04  0d 40 9c 1b 20 dd f2 69  |.. ..@...@.. ..i|
0000af40  6e 69 74 5f 73 65 71 28  74 69 6d 65 25 2c 61 64  |nit_seq(time%,ad|
0000af50  72 25 29 0d 40 a6 20 20  c8 99 20 6d 6f 76 65 64  |r%).@.  .. moved|
0000af60  61 74 61 25 2c 61 64 72  25 2c 77 73 25 2c 21 61  |ata%,adr%,ws%,!a|
0000af70  64 72 25 0d 40 b0 37 20  e7 20 28 61 64 72 25 21  |dr%.@.7 . (adr%!|
0000af80  31 32 29 80 34 20 77 73  25 21 34 3d 34 30 3a 77  |12).4 ws%!4=40:w|
0000af90  73 25 21 38 3d 33 36 20  8b 20 77 73 25 21 34 3d  |s%!8=36 . ws%!4=|
0000afa0  33 36 3a 77 73 25 21 38  3d 30 0d 40 ba 29 20 77  |36:ws%!8=0.@.) w|
0000afb0  73 25 21 31 32 3d 34 3a  77 73 25 21 31 36 3d 61  |s%!12=4:ws%!16=a|
0000afc0  64 72 25 21 32 30 3a 77  73 25 21 32 30 3d 74 69  |dr%!20:ws%!20=ti|
0000afd0  6d 65 25 0d 40 c4 2a 20  77 73 25 21 32 34 3d 61  |me%.@.* ws%!24=a|
0000afe0  64 72 25 21 38 3a 77 73  25 21 32 38 3d 30 3a 77  |dr%!8:ws%!28=0:w|
0000aff0  73 25 21 33 32 3d 61 64  72 25 21 31 32 0d 40 ce  |s%!32=adr%!12.@.|
0000b000  19 20 f2 6d 61 6b 65 5f  73 70 61 63 65 28 21 77  |. .make_space(!w|
0000b010  73 25 2b 31 36 29 0d 40  d8 22 20 c8 99 20 61 64  |s%+16).@." .. ad|
0000b020  64 65 6e 74 72 79 25 2c  73 5f 73 65 71 75 65 6e  |dentry%,s_sequen|
0000b030  63 65 73 25 2c 77 73 25  0d 40 e2 65 20 e7 20 28  |ces%,ws%.@.e . (|
0000b040  77 73 25 21 33 32 29 80  36 34 20 70 6f 69 6e 74  |ws%!32).64 point|
0000b050  65 72 5f 6f 6e 25 3d 31  3a f2 67 65 74 5f 70 6f  |er_on%=1:.get_po|
0000b060  69 6e 74 65 72 3a e7 20  68 61 6e 64 6c 65 25 3d  |inter:. handle%=|
0000b070  6d 61 69 6e 5f 77 25 20  c8 99 20 22 57 69 6d 70  |main_w% .. "Wimp|
0000b080  5f 53 70 72 69 74 65 4f  70 22 2c 33 36 2c 31 2c  |_SpriteOp",36,1,|
0000b090  22 70 74 72 5f 63 6c 6f  63 6b 22 2c 32 0d 40 ec  |"ptr_clock",2.@.|
0000b0a0  06 20 e1 0d 40 f6 04 0d  41 00 1d 20 dd f2 63 68  |. ..@...A.. ..ch|
0000b0b0  65 63 6b 5f 73 65 71 75  65 6e 63 65 73 28 74 69  |eck_sequences(ti|
0000b0c0  6d 65 25 29 0d 41 0a 24  20 c8 99 20 6e 65 6e 74  |me%).A.$ .. nent|
0000b0d0  72 69 65 73 25 2c 73 5f  73 65 71 75 65 6e 63 65  |ries%,s_sequence|
0000b0e0  73 25 20 b8 20 6e 73 25  0d 41 14 0c 20 e7 20 6e  |s% . ns%.A.. . n|
0000b0f0  73 25 20 8c 0d 41 1e 23  20 20 20 73 74 61 63 6b  |s% ..A.#   stack|
0000b100  25 3d a4 73 74 61 63 6b  28 63 75 72 72 65 6e 74  |%=.stack(current|
0000b110  5f 70 61 67 65 25 29 0d  41 28 15 20 20 20 e3 20  |_page%).A(.   . |
0000b120  73 65 71 25 3d 31 20 b8  20 6e 73 25 0d 41 32 2c  |seq%=1 . ns%.A2,|
0000b130  20 20 20 20 20 c8 99 20  67 65 74 6e 74 68 25 2c  |     .. getnth%,|
0000b140  73 5f 73 65 71 75 65 6e  63 65 73 25 2c 73 65 71  |s_sequences%,seq|
0000b150  25 20 b8 20 61 64 72 25  0d 41 3c 1a 20 20 20 20  |% . adr%.A<.    |
0000b160  20 e7 20 74 69 6d 65 25  3e 61 64 72 25 21 32 30  | . time%>adr%!20|
0000b170  20 8c 0d 41 46 20 20 20  20 20 20 20 20 61 64 72  | ..AF        adr|
0000b180  25 21 32 30 3d 74 69 6d  65 25 2b 61 64 72 25 21  |%!20=time%+adr%!|
0000b190  31 36 0d 41 50 3f 20 20  20 20 20 20 20 6c 65 6e  |16.AP?       len|
0000b1a0  25 3d 21 61 64 72 25 3a  70 74 72 25 3d 61 64 72  |%=!adr%:ptr%=adr|
0000b1b0  25 21 34 3a 6f 70 74 72  25 3d 61 64 72 25 21 38  |%!4:optr%=adr%!8|
0000b1c0  3a 70 74 72 5f 69 6e 63  25 3d 61 64 72 25 21 31  |:ptr_inc%=adr%!1|
0000b1d0  32 0d 41 5a 28 20 20 20  20 20 20 20 6c 6f 6f 70  |2.AZ(       loop|
0000b1e0  25 3d 28 61 64 72 25 21  33 32 29 80 32 3a 6c 61  |%=(adr%!32).2:la|
0000b1f0  73 74 5f 6f 6e 65 25 3d  30 0d 41 64 43 20 20 20  |st_one%=0.AdC   |
0000b200  20 20 20 20 6c 61 73 74  25 3d 28 61 64 72 25 21  |    last%=(adr%!|
0000b210  33 32 29 80 38 3a 74 72  61 69 6c 25 3d 28 61 64  |32).8:trail%=(ad|
0000b220  72 25 21 33 32 29 80 31  36 3a 6e 6f 75 64 25 3d  |r%!32).16:noud%=|
0000b230  28 61 64 72 25 21 33 32  29 80 33 32 0d 41 6e 21  |(adr%!32).32.An!|
0000b240  20 20 20 20 20 20 20 73  65 65 74 68 72 75 25 3d  |       seethru%=|
0000b250  28 61 64 72 25 21 33 32  29 80 31 32 38 0d 41 78  |(adr%!32).128.Ax|
0000b260  2b 20 20 20 20 20 20 20  e7 20 61 64 72 25 21 32  |+       . adr%!2|
0000b270  34 3c 3e 30 20 80 20 61  64 72 25 21 32 38 3d 61  |4<>0 . adr%!28=a|
0000b280  64 72 25 21 32 34 20 8c  0d 41 82 16 20 20 20 20  |dr%!24 ..A..    |
0000b290  20 20 20 20 20 e7 20 6c  6f 6f 70 25 20 8c 0d 41  |     . loop% ..A|
0000b2a0  8c 24 20 20 20 20 20 20  20 20 20 20 20 e7 20 70  |.$           . p|
0000b2b0  74 72 25 3d 34 30 20 6c  61 73 74 5f 6f 6e 65 25  |tr%=40 last_one%|
0000b2c0  3d b9 0d 41 96 0e 20 20  20 20 20 20 20 20 20 cc  |=..A..         .|
0000b2d0  0d 41 a0 24 20 20 20 20  20 20 20 20 20 20 20 e7  |.A.$           .|
0000b2e0  20 70 74 72 25 3d 33 36  20 6c 61 73 74 5f 6f 6e  | ptr%=36 last_on|
0000b2f0  65 25 3d b9 0d 41 aa 0e  20 20 20 20 20 20 20 20  |e%=..A..        |
0000b300  20 cd 0d 41 b4 0c 20 20  20 20 20 20 20 cd 0d 41  | ..A..       ..A|
0000b310  be 22 20 20 20 20 20 20  20 e7 20 6f 70 74 72 25  |."       . optr%|
0000b320  3c 3e 30 20 80 20 74 72  61 69 6c 25 3d 30 20 8c  |<>0 . trail%=0 .|
0000b330  0d 41 c8 1a 20 20 20 20  20 20 20 20 20 e7 20 6c  |.A..         . l|
0000b340  61 73 74 5f 6f 6e 65 25  20 8c 0d 41 d2 1a 20 20  |ast_one% ..A..  |
0000b350  20 20 20 20 20 20 20 20  20 e7 20 6c 61 73 74 25  |         . last%|
0000b360  3d 30 20 8c 0d 41 dc 1a  20 20 20 20 20 20 20 20  |=0 ..A..        |
0000b370  20 20 20 20 20 e7 20 6e  6f 75 64 25 20 8c 0d 41  |     . noud% ..A|
0000b380  e6 34 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |.4              |
0000b390  20 f2 66 61 73 74 5f 64  72 61 77 28 73 74 61 63  | .fast_draw(stac|
0000b3a0  6b 25 2c 6f 70 74 72 25  21 61 64 72 25 2c b9 2c  |k%,optr%!adr%,.,|
0000b3b0  30 29 0d 41 f0 12 20 20  20 20 20 20 20 20 20 20  |0).A..          |
0000b3c0  20 20 20 cc 0d 41 fa 36  20 20 20 20 20 20 20 20  |   ..A.6        |
0000b3d0  20 20 20 20 20 20 20 f2  68 69 64 65 5f 6f 62 6a  |       .hide_obj|
0000b3e0  65 63 74 28 73 74 61 63  6b 25 2c 6f 70 74 72 25  |ect(stack%,optr%|
0000b3f0  21 61 64 72 25 2c 31 2c  31 29 0d 42 04 12 20 20  |!adr%,1,1).B..  |
0000b400  20 20 20 20 20 20 20 20  20 20 20 cd 0d 42 0e 10  |           ..B..|
0000b410  20 20 20 20 20 20 20 20  20 20 20 cd 0d 42 18 0e  |           ..B..|
0000b420  20 20 20 20 20 20 20 20  20 cc 0d 42 22 18 20 20  |         ..B".  |
0000b430  20 20 20 20 20 20 20 20  20 e7 20 6e 6f 75 64 25  |         . noud%|
0000b440  20 8c 0d 42 2c 32 20 20  20 20 20 20 20 20 20 20  | ..B,2          |
0000b450  20 20 20 f2 66 61 73 74  5f 64 72 61 77 28 73 74  |   .fast_draw(st|
0000b460  61 63 6b 25 2c 6f 70 74  72 25 21 61 64 72 25 2c  |ack%,optr%!adr%,|
0000b470  b9 2c 30 29 0d 42 36 10  20 20 20 20 20 20 20 20  |.,0).B6.        |
0000b480  20 20 20 cc 0d 42 40 34  20 20 20 20 20 20 20 20  |   ..B@4        |
0000b490  20 20 20 20 20 f2 68 69  64 65 5f 6f 62 6a 65 63  |     .hide_objec|
0000b4a0  74 28 73 74 61 63 6b 25  2c 6f 70 74 72 25 21 61  |t(stack%,optr%!a|
0000b4b0  64 72 25 2c 31 2c 31 29  0d 42 4a 10 20 20 20 20  |dr%,1,1).BJ.    |
0000b4c0  20 20 20 20 20 20 20 cd  0d 42 54 0e 20 20 20 20  |       ..BT.    |
0000b4d0  20 20 20 20 20 cd 0d 42  5e 0c 20 20 20 20 20 20  |     ..B^.      |
0000b4e0  20 cd 0d 42 68 1a 20 20  20 20 20 20 20 e7 20 6c  | ..Bh.       . l|
0000b4f0  61 73 74 5f 6f 6e 65 25  3d 30 20 8c 0d 42 72 16  |ast_one%=0 ..Br.|
0000b500  20 20 20 20 20 20 20 20  20 e7 20 6e 6f 75 64 25  |         . noud%|
0000b510  20 8c 0d 42 7c 36 20 20  20 20 20 20 20 20 20 20  | ..B|6          |
0000b520  20 f2 66 61 73 74 5f 64  72 61 77 28 73 74 61 63  | .fast_draw(stac|
0000b530  6b 25 2c 70 74 72 25 21  61 64 72 25 2c 30 2c 73  |k%,ptr%!adr%,0,s|
0000b540  65 65 74 68 72 75 25 29  0d 42 86 0e 20 20 20 20  |eethru%).B..    |
0000b550  20 20 20 20 20 cc 0d 42  90 31 20 20 20 20 20 20  |     ..B.1      |
0000b560  20 20 20 20 20 f2 68 69  64 65 5f 6f 62 6a 65 63  |     .hide_objec|
0000b570  74 28 73 74 61 63 6b 25  2c 70 74 72 25 21 61 64  |t(stack%,ptr%!ad|
0000b580  72 25 2c 30 2c 31 29 0d  42 9a 0e 20 20 20 20 20  |r%,0,1).B..     |
0000b590  20 20 20 20 cd 0d 42 a4  27 20 20 20 20 20 20 20  |    ..B.'       |
0000b5a0  20 20 61 64 72 25 21 38  3d 70 74 72 25 3a 70 74  |  adr%!8=ptr%:pt|
0000b5b0  72 25 2b 3d 70 74 72 5f  69 6e 63 25 0d 42 ae 16  |r%+=ptr_inc%.B..|
0000b5c0  20 20 20 20 20 20 20 20  20 e7 20 6c 6f 6f 70 25  |         . loop%|
0000b5d0  20 8c 0d 42 b8 1c 20 20  20 20 20 20 20 20 20 20  | ..B..          |
0000b5e0  20 e7 20 70 74 72 25 3d  6c 65 6e 25 20 8c 0d 42  | . ptr%=len% ..B|
0000b5f0  c2 27 20 20 20 20 20 20  20 20 20 20 20 20 20 70  |.'             p|
0000b600  74 72 25 3d 6c 65 6e 25  2d 38 3a 61 64 72 25 21  |tr%=len%-8:adr%!|
0000b610  31 32 3d 2d 34 0d 42 cc  10 20 20 20 20 20 20 20  |12=-4.B..       |
0000b620  20 20 20 20 cc 0d 42 d6  1c 20 20 20 20 20 20 20  |    ..B..       |
0000b630  20 20 20 20 20 20 e7 20  70 74 72 25 3d 33 32 20  |      . ptr%=32 |
0000b640  8c 0d 42 e0 24 20 20 20  20 20 20 20 20 20 20 20  |..B.$           |
0000b650  20 20 20 20 70 74 72 25  3d 34 30 3a 61 64 72 25  |    ptr%=40:adr%|
0000b660  21 31 32 3d 34 0d 42 ea  33 20 20 20 20 20 20 20  |!12=4.B.3       |
0000b670  20 20 20 20 20 20 20 20  e7 20 61 64 72 25 21 32  |        . adr%!2|
0000b680  34 3c 3e 30 20 61 64 72  25 21 32 38 3d 28 61 64  |4<>0 adr%!28=(ad|
0000b690  72 25 21 32 38 29 2b 31  0d 42 f4 12 20 20 20 20  |r%!28)+1.B..    |
0000b6a0  20 20 20 20 20 20 20 20  20 cd 0d 42 fe 10 20 20  |         ..B..  |
0000b6b0  20 20 20 20 20 20 20 20  20 cd 0d 43 08 0e 20 20  |         ..C..  |
0000b6c0  20 20 20 20 20 20 20 cc  0d 43 12 1c 20 20 20 20  |       ..C..    |
0000b6d0  20 20 20 20 20 20 20 e7  20 70 74 72 25 3d 6c 65  |       . ptr%=le|
0000b6e0  6e 25 20 8c 0d 43 1c 18  20 20 20 20 20 20 20 20  |n% ..C..        |
0000b6f0  20 20 20 20 20 70 74 72  25 3d 33 36 0d 43 26 31  |     ptr%=36.C&1|
0000b700  20 20 20 20 20 20 20 20  20 20 20 20 20 e7 20 61  |             . a|
0000b710  64 72 25 21 32 34 3c 3e  30 20 61 64 72 25 21 32  |dr%!24<>0 adr%!2|
0000b720  38 3d 28 61 64 72 25 21  32 38 29 2b 31 0d 43 30  |8=(adr%!28)+1.C0|
0000b730  10 20 20 20 20 20 20 20  20 20 20 20 cd 0d 43 3a  |.           ..C:|
0000b740  0e 20 20 20 20 20 20 20  20 20 cd 0d 43 44 0c 20  |.         ..CD. |
0000b750  20 20 20 20 20 20 cc 0d  43 4e 13 20 20 20 20 20  |      ..CN.     |
0000b760  20 20 20 20 70 74 72 25  3d 30 0d 43 58 0c 20 20  |    ptr%=0.CX.  |
0000b770  20 20 20 20 20 cd 0d 43  62 16 20 20 20 20 20 20  |     ..Cb.      |
0000b780  20 61 64 72 25 21 34 3d  70 74 72 25 0d 43 6c 0a  | adr%!4=ptr%.Cl.|
0000b790  20 20 20 20 20 cd 0d 43  76 08 20 20 20 ed 0d 43  |     ..Cv.   ..C|
0000b7a0  80 08 20 20 20 f5 0d 43  8a 12 20 20 20 20 20 6e  |..   ..C..     n|
0000b7b0  6f 6d 6f 72 65 25 3d b9  0d 43 94 28 20 20 20 20  |omore%=..C.(    |
0000b7c0  20 c8 99 20 6e 65 6e 74  72 69 65 73 25 2c 73 5f  | .. nentries%,s_|
0000b7d0  73 65 71 75 65 6e 63 65  73 25 20 b8 20 6e 73 25  |sequences% . ns%|
0000b7e0  0d 43 9e 10 20 20 20 20  20 e7 20 6e 73 25 20 8c  |.C..     . ns% .|
0000b7f0  0d 43 a8 19 20 20 20 20  20 20 20 e3 20 73 65 71  |.C..       . seq|
0000b800  25 3d 31 20 b8 20 6e 73  25 0d 43 b2 37 20 20 20  |%=1 . ns%.C.7   |
0000b810  20 20 20 20 20 20 c8 99  20 67 65 74 6e 74 68 25  |      .. getnth%|
0000b820  2c 73 5f 73 65 71 75 65  6e 63 65 73 25 2c 73 65  |,s_sequences%,se|
0000b830  71 25 20 b8 20 61 64 72  25 2c 74 6f 6b 65 6e 25  |q% . adr%,token%|
0000b840  0d 43 bc 41 20 20 20 20  20 20 20 20 20 e7 20 61  |.C.A         . a|
0000b850  64 72 25 21 34 3d 30 20  80 20 28 61 64 72 25 21  |dr%!4=0 . (adr%!|
0000b860  33 32 29 80 36 34 20 ff  22 70 6f 69 6e 74 65 72  |32).64 ."pointer|
0000b870  20 31 22 3a 70 6f 69 6e  74 65 72 5f 6f 6e 25 3d  | 1":pointer_on%=|
0000b880  b9 0d 43 c6 4c 20 20 20  20 20 20 20 20 20 e7 20  |..C.L         . |
0000b890  61 64 72 25 21 34 3d 30  20 6e 6f 6d 6f 72 65 25  |adr%!4=0 nomore%|
0000b8a0  3d 30 3a 73 65 71 25 3d  6e 73 25 3a c8 99 20 6b  |=0:seq%=ns%:.. k|
0000b8b0  69 6c 6c 65 6e 74 72 79  25 2c 73 5f 73 65 71 75  |illentry%,s_sequ|
0000b8c0  65 6e 63 65 73 25 2c 74  6f 6b 65 6e 25 0d 43 d0  |ences%,token%.C.|
0000b8d0  0c 20 20 20 20 20 20 20  ed 0d 43 da 0a 20 20 20  |.       ..C..   |
0000b8e0  20 20 cd 0d 43 e4 0f 20  20 20 fd 6e 6f 6d 6f 72  |  ..C..   .nomor|
0000b8f0  65 25 0d 43 ee 06 20 cd  0d 43 f8 06 20 e1 0d 44  |e%.C.. ..C.. ..D|
0000b900  02 04 0d 44 0c 2f 20 dd  f2 66 61 73 74 5f 64 72  |...D./ ..fast_dr|
0000b910  61 77 28 73 74 61 63 6b  25 2c 74 6f 6b 65 6e 25  |aw(stack%,token%|
0000b920  2c 65 72 61 73 65 25 2c  73 65 65 74 68 72 75 25  |,erase%,seethru%|
0000b930  29 0d 44 16 0b 20 ea 20  61 64 72 25 0d 44 20 1d  |).D.. . adr%.D .|
0000b940  20 21 71 25 3d 6d 61 69  6e 5f 77 25 3a c8 99 20  | !q%=main_w%:.. |
0000b950  67 65 74 77 25 2c 2c 71  25 0d 44 2a 2b 20 6f 66  |getw%,,q%.D*+ of|
0000b960  66 78 25 3d 28 71 25 21  34 2d 71 25 21 32 30 29  |fx%=(q%!4-q%!20)|
0000b970  3a 6f 66 66 79 25 3d 28  71 25 21 31 36 2d 71 25  |:offy%=(q%!16-q%|
0000b980  21 32 34 29 0d 44 34 26  20 c8 99 20 67 65 74 65  |!24).D4& .. gete|
0000b990  6e 74 72 79 25 2c 73 74  61 63 6b 25 2c 74 6f 6b  |ntry%,stack%,tok|
0000b9a0  65 6e 25 20 b8 20 61 64  72 25 0d 44 3e 17 20 78  |en% . adr%.D>. x|
0000b9b0  25 3d 28 61 64 72 25 21  31 32 29 2b 6f 66 66 78  |%=(adr%!12)+offx|
0000b9c0  25 0d 44 48 17 20 79 25  3d 28 61 64 72 25 21 31  |%.DH. y%=(adr%!1|
0000b9d0  36 29 2b 6f 66 66 79 25  0d 44 52 22 20 78 31 25  |6)+offy%.DR" x1%|
0000b9e0  3d 28 61 64 72 25 21 32  30 29 2d 28 31 3c 3c 78  |=(adr%!20)-(1<<x|
0000b9f0  65 66 25 29 2b 6f 66 66  78 25 0d 44 5c 22 20 79  |ef%)+offx%.D\" y|
0000ba00  31 25 3d 28 61 64 72 25  21 32 34 29 2d 28 31 3c  |1%=(adr%!24)-(1<|
0000ba10  3c 79 65 66 25 29 2b 6f  66 66 79 25 0d 44 66 0f  |<yef%)+offy%.Df.|
0000ba20  20 e7 20 65 72 61 73 65  25 20 8c 0d 44 70 30 20  | . erase% ..Dp0 |
0000ba30  20 20 e7 20 28 28 61 64  72 25 21 33 36 29 80 31  |  . ((adr%!36).1|
0000ba40  32 38 29 3d 30 20 61 64  72 25 21 33 36 3d 28 61  |28)=0 adr%!36=(a|
0000ba50  64 72 25 21 33 36 29 84  31 32 38 0d 44 7a 32 20  |dr%!36).128.Dz2 |
0000ba60  20 20 c8 99 20 67 65 74  65 6e 74 72 79 25 2c 73  |  .. getentry%,s|
0000ba70  5f 70 61 67 65 73 25 2c  63 75 72 72 65 6e 74 5f  |_pages%,current_|
0000ba80  70 61 67 65 25 20 b8 20  61 64 72 31 25 0d 44 84  |page% . adr1%.D.|
0000ba90  16 20 20 20 62 63 6f 6c  25 3d 61 64 72 31 25 21  |.   bcol%=adr1%!|
0000baa0  32 38 3a 0d 44 8e 06 20  cc 0d 44 98 39 20 20 20  |28:.D.. ..D.9   |
0000bab0  e7 20 28 61 64 72 25 21  33 36 29 80 31 32 38 20  |. (adr%!36).128 |
0000bac0  80 20 73 65 65 74 68 72  75 25 3d 30 20 61 64 72  |. seethru%=0 adr|
0000bad0  25 21 33 36 3d 28 61 64  72 25 21 33 36 29 82 31  |%!36=(adr%!36).1|
0000bae0  32 38 0d 44 a2 06 20 cd  0d 44 ac 20 20 66 6c 61  |28.D.. ..D.  fla|
0000baf0  67 73 25 3d 61 64 72 25  21 33 36 3a 74 79 70 65  |gs%=adr%!36:type|
0000bb00  25 3d 61 64 72 25 21 34  0d 44 b6 66 20 21 71 25  |%=adr%!4.D.f !q%|
0000bb10  3d 6d 61 69 6e 5f 77 25  3a 71 25 21 34 3d 78 25  |=main_w%:q%!4=x%|
0000bb20  2d 6f 66 66 78 25 3a 71  25 21 38 3d 79 25 2d 6f  |-offx%:q%!8=y%-o|
0000bb30  66 66 79 25 2d 33 32 3a  71 25 21 31 32 3d 78 31  |ffy%-32:q%!12=x1|
0000bb40  25 2d 6f 66 66 78 25 2b  28 31 3c 3c 78 65 66 25  |%-offx%+(1<<xef%|
0000bb50  29 2b 33 32 3a 71 25 21  31 36 3d 79 31 25 2d 6f  |)+32:q%!16=y1%-o|
0000bb60  66 66 79 25 2b 28 31 3c  3c 79 65 66 25 29 0d 44  |ffy%+(1<<yef%).D|
0000bb70  c0 1c 20 c8 99 20 75 70  64 61 74 65 77 25 2c 2c  |.. .. updatew%,,|
0000bb80  71 25 20 b8 20 6d 6f 72  65 25 0d 44 ca 0d 20 c8  |q% . more%.D.. .|
0000bb90  95 20 6d 6f 72 65 25 0d  44 d4 11 20 20 20 e7 20  |. more%.D..   . |
0000bba0  65 72 61 73 65 25 20 8c  0d 44 de 33 20 20 20 20  |erase% ..D.3    |
0000bbb0  20 c8 99 20 73 65 74 63  6f 6c 25 2c 62 63 6f 6c  | .. setcol%,bcol|
0000bbc0  25 3a c8 93 20 c8 90 20  78 25 2c 79 25 2c 78 31  |%:.. .. x%,y%,x1|
0000bbd0  25 2d 78 25 2c 79 31 25  2d 79 25 0d 44 e8 08 20  |%-x%,y1%-y%.D.. |
0000bbe0  20 20 cc 0d 44 f2 13 20  20 20 20 20 c8 8e 20 74  |  ..D..     .. t|
0000bbf0  79 70 65 25 20 ca 0d 44  fc 3a 20 20 20 20 20 20  |ype% ..D.:      |
0000bc00  20 c9 20 73 5f 74 65 78  74 25 3a f2 64 72 61 77  | . s_text%:.draw|
0000bc10  5f 74 65 78 74 28 73 74  61 63 6b 25 2c 74 6f 6b  |_text(stack%,tok|
0000bc20  65 6e 25 2c 6f 66 66 78  25 2c 6f 66 66 79 25 29  |en%,offx%,offy%)|
0000bc30  0d 45 06 6b 20 20 20 20  20 20 20 c9 20 73 5f 73  |.E.k       . s_s|
0000bc40  70 72 69 74 65 73 25 2c  73 5f 64 72 61 77 25 3a  |prites%,s_draw%:|
0000bc50  f2 64 72 61 77 5f 70 69  63 74 75 72 65 28 61 64  |.draw_picture(ad|
0000bc60  72 25 21 34 2c 61 64 72  25 21 38 2c 78 25 2b 28  |r%!4,adr%!8,x%+(|
0000bc70  31 3c 3c 78 65 66 25 29  2c 79 25 2b 28 31 3c 3c  |1<<xef%),y%+(1<<|
0000bc80  79 65 66 25 29 2c 78 31  25 2d 78 25 2c 79 31 25  |yef%),x1%-x%,y1%|
0000bc90  2d 79 25 2c 66 6c 61 67  73 25 29 0d 45 10 0a 20  |-y%,flags%).E.. |
0000bca0  20 20 20 20 cb 0d 45 1a  08 20 20 20 cd 0d 45 24  |    ..E..   ..E$|
0000bcb0  1b 20 20 20 c8 99 20 67  65 74 72 25 2c 2c 71 25  |.   .. getr%,,q%|
0000bcc0  20 b8 20 6d 6f 72 65 25  0d 45 2e 06 20 ce 0d 45  | . more%.E.. ..E|
0000bcd0  38 06 20 e1 0d 45 42 04  0d 45 4c 20 20 dd f2 73  |8. ..EB..EL  ..s|
0000bce0  70 65 61 6b 5f 74 65 78  74 28 73 74 61 63 6b 25  |peak_text(stack%|
0000bcf0  2c 74 6f 6b 65 6e 25 29  0d 45 56 18 20 73 70 65  |,token%).EV. spe|
0000bd00  61 6b 5f 74 6f 6b 65 6e  25 3d 74 6f 6b 65 6e 25  |ak_token%=token%|
0000bd10  0d 45 60 21 20 73 70 65  61 6b 5f 77 6f 72 64 25  |.E`! speak_word%|
0000bd20  3d 30 3a 73 70 65 61 6b  5f 73 6f 75 6e 64 25 3d  |=0:speak_sound%=|
0000bd30  30 0d 45 6a 26 20 c8 99  20 67 65 74 65 6e 74 72  |0.Ej& .. getentr|
0000bd40  79 25 2c 73 74 61 63 6b  25 2c 74 6f 6b 65 6e 25  |y%,stack%,token%|
0000bd50  20 b8 20 61 64 72 25 0d  45 74 27 20 c8 99 20 67  | . adr%.Et' .. g|
0000bd60  65 74 65 6e 74 72 79 25  2c 73 5f 74 65 78 74 25  |etentry%,s_text%|
0000bd70  2c 61 64 72 25 21 38 20  b8 20 61 64 72 25 0d 45  |,adr%!8 . adr%.E|
0000bd80  7e 13 20 73 70 74 65 78  74 25 3d 61 64 72 25 2b  |~. sptext%=adr%+|
0000bd90  34 0d 45 88 14 20 e7 20  3f 73 70 74 65 78 74 25  |4.E.. . ?sptext%|
0000bda0  3c 3e 30 20 8c 0d 45 92  17 20 20 20 73 70 65 61  |<>0 ..E..   spea|
0000bdb0  6b 69 6e 67 5f 74 65 78  74 25 3d b9 0d 45 9c 1a  |king_text%=..E..|
0000bdc0  20 20 20 74 65 78 74 24  3d 22 22 3a 61 25 3d 73  |   text$="":a%=s|
0000bdd0  70 74 65 78 74 25 0d 45  a6 29 20 20 20 f5 3a 74  |ptext%.E.)   .:t|
0000bde0  65 78 74 24 3d 74 65 78  74 24 2b bd 28 3f 61 25  |ext$=text$+.(?a%|
0000bdf0  29 3a 61 25 2b 3d 31 3a  fd 3f 61 25 3c 34 38 0d  |):a%+=1:.?a%<48.|
0000be00  45 b0 32 20 20 20 73 70  65 61 6b 5f 73 6f 75 6e  |E.2   speak_soun|
0000be10  64 25 3d a4 6e 61 6d 65  5f 65 78 73 69 73 74 73  |d%=.name_exsists|
0000be20  28 73 5f 73 6f 75 6e 64  73 25 2c 74 65 78 74 24  |(s_sounds%,text$|
0000be30  29 0d 45 ba 2a 20 20 20  f2 75 70 64 61 74 65 5f  |).E.*   .update_|
0000be40  6f 62 6a 65 63 74 28 73  74 61 63 6b 25 2c 73 70  |object(stack%,sp|
0000be50  65 61 6b 5f 74 6f 6b 65  6e 25 29 0d 45 c4 06 20  |eak_token%).E.. |
0000be60  cd 0d 45 ce 06 20 e1 0d  45 d8 04 0d 45 e2 14 20  |..E.. ..E...E.. |
0000be70  dd f2 73 70 65 61 6b 69  6e 67 5f 74 65 78 74 0d  |..speaking_text.|
0000be80  45 ec 2c 20 c8 99 20 67  65 74 65 6e 74 72 79 25  |E., .. getentry%|
0000be90  2c 73 74 61 63 6b 25 2c  73 70 65 61 6b 5f 74 6f  |,stack%,speak_to|
0000bea0  6b 65 6e 25 20 b8 20 61  64 72 25 0d 45 f6 27 20  |ken% . adr%.E.' |
0000beb0  c8 99 20 67 65 74 65 6e  74 72 79 25 2c 73 5f 74  |.. getentry%,s_t|
0000bec0  65 78 74 25 2c 61 64 72  25 21 38 20 b8 20 61 64  |ext%,adr%!8 . ad|
0000bed0  72 25 0d 46 00 13 20 73  70 74 65 78 74 25 3d 61  |r%.F.. sptext%=a|
0000bee0  64 72 25 2b 34 0d 46 0a  06 20 f5 0d 46 14 15 20  |dr%+4.F.. ..F.. |
0000bef0  20 20 73 70 65 61 6b 5f  77 6f 72 64 25 2b 3d 31  |  speak_word%+=1|
0000bf00  0d 46 1e 1d 20 20 20 63  25 3d 73 70 65 61 6b 5f  |.F..   c%=speak_|
0000bf10  77 6f 72 64 25 3f 73 70  74 65 78 74 25 0d 46 28  |word%?sptext%.F(|
0000bf20  1a 20 fd 63 25 3d 33 32  20 84 20 63 25 3d 31 33  |. .c%=32 . c%=13|
0000bf30  20 84 20 63 25 3d 30 0d  46 32 16 20 e7 20 63 25  | . c%=0.F2. . c%|
0000bf40  3d 33 32 20 84 20 63 25  3d 31 33 20 8c 0d 46 3c  |=32 . c%=13 ..F<|
0000bf50  08 20 20 20 f5 0d 46 46  2d 20 20 20 20 73 70 65  |.   ..FF-    spe|
0000bf60  61 6b 5f 77 6f 72 64 25  2b 3d 31 3a 63 25 3d 73  |ak_word%+=1:c%=s|
0000bf70  70 65 61 6b 5f 77 6f 72  64 25 3f 73 70 74 65 78  |peak_word%?sptex|
0000bf80  74 25 0d 46 50 14 20 20  20 fd 63 25 3e 33 32 20  |t%.FP.   .c%>32 |
0000bf90  84 20 63 25 3d 30 0d 46  5a 06 20 cd 0d 46 64 0e  |. c%=0.FZ. ..Fd.|
0000bfa0  20 e7 20 63 25 3c 3e 30  20 8c 0d 46 6e 26 20 20  | . c%<>0 ..Fn&  |
0000bfb0  20 74 65 78 74 24 3d 22  22 3a 61 25 3d 73 70 65  | text$="":a%=spe|
0000bfc0  61 6b 5f 77 6f 72 64 25  2b 73 70 74 65 78 74 25  |ak_word%+sptext%|
0000bfd0  0d 46 78 29 20 20 20 f5  3a 74 65 78 74 24 3d 74  |.Fx)   .:text$=t|
0000bfe0  65 78 74 24 2b bd 28 3f  61 25 29 3a 61 25 2b 3d  |ext$+.(?a%):a%+=|
0000bff0  31 3a fd 3f 61 25 3c 34  38 0d 46 82 32 20 20 20  |1:.?a%<48.F.2   |
0000c000  73 70 65 61 6b 5f 73 6f  75 6e 64 25 3d a4 6e 61  |speak_sound%=.na|
0000c010  6d 65 5f 65 78 73 69 73  74 73 28 73 5f 73 6f 75  |me_exsists(s_sou|
0000c020  6e 64 73 25 2c 74 65 78  74 24 29 0d 46 8c 06 20  |nds%,text$).F.. |
0000c030  cd 0d 46 96 1c 20 e7 20  63 25 3d 30 20 73 70 65  |..F.. . c%=0 spe|
0000c040  61 6b 69 6e 67 5f 74 65  78 74 25 3d a3 0d 46 a0  |aking_text%=..F.|
0000c050  28 20 f2 75 70 64 61 74  65 5f 6f 62 6a 65 63 74  |( .update_object|
0000c060  28 73 74 61 63 6b 25 2c  73 70 65 61 6b 5f 74 6f  |(stack%,speak_to|
0000c070  6b 65 6e 25 29 0d 46 aa  06 20 e1 0d 46 b4 04 0d  |ken%).F.. ..F...|
0000c080  46 be 36 20 dd f2 68 69  67 68 6c 69 67 68 74 5f  |F.6 ..highlight_|
0000c090  74 65 78 74 28 73 74 61  63 6b 25 2c 74 6f 6b 65  |text(stack%,toke|
0000c0a0  6e 25 2c 6f 66 66 78 25  2c 6f 66 66 79 25 2c 77  |n%,offx%,offy%,w|
0000c0b0  6f 72 64 25 29 0d 46 c8  26 20 c8 99 20 67 65 74  |ord%).F.& .. get|
0000c0c0  65 6e 74 72 79 25 2c 73  74 61 63 6b 25 2c 74 6f  |entry%,stack%,to|
0000c0d0  6b 65 6e 25 20 b8 20 61  64 72 25 0d 46 d2 17 20  |ken% . adr%.F.. |
0000c0e0  78 25 3d 28 61 64 72 25  21 31 32 29 2b 6f 66 66  |x%=(adr%!12)+off|
0000c0f0  78 25 0d 46 dc 17 20 79  25 3d 28 61 64 72 25 21  |x%.F.. y%=(adr%!|
0000c100  31 36 29 2b 6f 66 66 79  25 0d 46 e6 22 20 78 31  |16)+offy%.F." x1|
0000c110  25 3d 28 61 64 72 25 21  32 30 29 2d 28 31 3c 3c  |%=(adr%!20)-(1<<|
0000c120  78 65 66 25 29 2b 6f 66  66 78 25 0d 46 f0 22 20  |xef%)+offx%.F." |
0000c130  79 31 25 3d 28 61 64 72  25 21 32 34 29 2d 28 31  |y1%=(adr%!24)-(1|
0000c140  3c 3c 79 65 66 25 29 2b  6f 66 66 79 25 0d 46 fa  |<<yef%)+offy%.F.|
0000c150  2e 20 66 6c 61 67 73 25  3d 61 64 72 25 21 33 36  |. flags%=adr%!36|
0000c160  3a 66 6f 6e 74 25 3d 61  64 72 25 21 34 30 3a 62  |:font%=adr%!40:b|
0000c170  5f 73 25 3d 61 64 72 25  21 33 32 0d 47 04 38 20  |_s%=adr%!32.G.8 |
0000c180  66 63 6f 6c 25 3d 61 64  72 25 21 35 32 3a e7 20  |fcol%=adr%!52:. |
0000c190  66 63 6f 6c 25 20 80 20  26 46 46 20 66 63 6f 6c  |fcol% . &FF fcol|
0000c1a0  25 3d 64 65 66 61 75 6c  74 5f 70 61 67 65 5f 63  |%=default_page_c|
0000c1b0  6f 6c 25 0d 47 0e 12 20  62 63 6f 6c 25 3d 61 64  |ol%.G.. bcol%=ad|
0000c1c0  72 25 21 35 36 0d 47 18  3b 20 e7 20 66 6c 61 67  |r%!56.G.; . flag|
0000c1d0  73 25 80 31 20 66 63 6f  6c 25 3d 66 63 6f 6c 25  |s%.1 fcol%=fcol%|
0000c1e0  82 26 46 46 46 46 46 46  30 30 3a 62 63 6f 6c 25  |.&FFFFFF00:bcol%|
0000c1f0  3d 62 63 6f 6c 25 82 26  46 46 46 46 46 46 30 30  |=bcol%.&FFFFFF00|
0000c200  0d 47 22 31 20 f2 64 72  61 77 5f 62 6f 72 64 65  |.G"1 .draw_borde|
0000c210  72 28 62 5f 73 25 2c 66  63 6f 6c 25 2c 62 63 6f  |r(b_s%,fcol%,bco|
0000c220  6c 25 2c 78 25 2c 79 25  2c 78 31 25 2c 79 31 25  |l%,x%,y%,x1%,y1%|
0000c230  29 0d 47 2c 12 20 78 25  2b 3d 28 31 3c 3c 78 65  |).G,. x%+=(1<<xe|
0000c240  66 25 29 0d 47 36 13 20  78 31 25 2d 3d 28 31 3c  |f%).G6. x1%-=(1<|
0000c250  3c 78 65 66 25 29 0d 47  40 12 20 79 25 2b 3d 28  |<xef%).G@. y%+=(|
0000c260  31 3c 3c 79 65 66 25 29  0d 47 4a 13 20 79 31 25  |1<<yef%).GJ. y1%|
0000c270  2d 3d 28 31 3c 3c 79 65  66 25 29 0d 47 54 08 20  |-=(1<<yef%).GT. |
0000c280  ea 20 85 0d 47 5e 16 20  ee 20 85 20 ea 20 f7 20  |. ..G^. . . . . |
0000c290  85 3a 66 6f 6e 74 25 3d  30 0d 47 68 0e 20 e7 20  |.:font%=0.Gh. . |
0000c2a0  66 6f 6e 74 25 20 8c 0d  47 72 27 20 20 20 c8 99  |font% ..Gr'   ..|
0000c2b0  20 67 65 74 65 6e 74 72  79 25 2c 73 5f 66 6f 6e  | getentry%,s_fon|
0000c2c0  74 73 25 2c 66 6f 6e 74  25 20 b8 20 74 25 0d 47  |ts%,font% . t%.G|
0000c2d0  7c 31 20 20 20 c8 99 20  66 69 6e 64 66 6f 6e 74  ||1   .. findfont|
0000c2e0  25 2c 2c 74 25 2b 34 2c  61 64 72 25 21 34 34 2c  |%,,t%+4,adr%!44,|
0000c2f0  61 64 72 25 21 34 38 20  b8 20 66 6f 6e 74 25 0d  |adr%!48 . font%.|
0000c300  47 86 06 20 cd 0d 47 90  0e 20 e7 20 66 6f 6e 74  |G.. ..G.. . font|
0000c310  25 20 8c 0d 47 9a 20 20  20 20 e7 20 62 63 6f 6c  |% ..G.    . bcol|
0000c320  25 20 80 20 26 46 46 20  62 63 6f 6c 25 3d 66 63  |% . &FF bcol%=fc|
0000c330  6f 6c 25 0d 47 a4 2e 20  20 20 c8 99 20 66 6f 6e  |ol%.G..   .. fon|
0000c340  74 69 6e 66 6f 25 2c 66  6f 6e 74 25 20 b8 20 2c  |tinfo%,font% . ,|
0000c350  63 78 25 2c 63 79 25 2c  63 78 31 25 2c 63 79 31  |cx%,cy%,cx1%,cy1|
0000c360  25 0d 47 ae 06 20 cc 0d  47 b8 3e 20 20 20 63 78  |%.G.. ..G.>   cx|
0000c370  25 3d 2d 28 31 3c 3c 78  65 66 25 29 3a 63 79 25  |%=-(1<<xef%):cy%|
0000c380  3d 2d 28 31 3c 3c 79 65  66 25 29 3a 63 78 31 25  |=-(1<<yef%):cx1%|
0000c390  3d 38 3c 3c 78 65 66 25  3a 63 79 31 25 3d 38 3c  |=8<<xef%:cy1%=8<|
0000c3a0  3c 79 65 66 25 0d 47 c2  06 20 cd 0d 47 cc 16 20  |<yef%.G.. ..G.. |
0000c3b0  74 65 78 74 5f 68 65 69  67 68 74 25 3d 63 79 31  |text_height%=cy1|
0000c3c0  25 0d 47 d6 28 20 c8 99  20 67 65 74 65 6e 74 72  |%.G.( .. getentr|
0000c3d0  79 25 2c 73 5f 74 65 78  74 25 2c 61 64 72 25 21  |y%,s_text%,adr%!|
0000c3e0  38 20 b8 20 74 65 78 74  25 0d 47 e0 0d 20 74 65  |8 . text%.G.. te|
0000c3f0  78 74 25 2b 3d 34 0d 47  ea 13 20 74 65 78 74 5f  |xt%+=4.G.. text_|
0000c400  6f 66 66 73 65 74 25 3d  30 0d 47 f4 2c 20 70 78  |offset%=0.G., px|
0000c410  25 3d 78 25 2b 6d 61 72  67 69 6e 25 3a 70 79 25  |%=x%+margin%:py%|
0000c420  3d 79 31 25 2d 74 65 78  74 5f 68 65 69 67 68 74  |=y1%-text_height|
0000c430  25 2b 63 79 25 0d 47 fe  24 20 63 65 6e 74 72 65  |%+cy%.G.$ centre|
0000c440  25 3d a3 3a 72 69 67 68  74 25 3d a3 3a 75 6e 64  |%=.:right%=.:und|
0000c450  65 72 6c 69 6e 65 25 3d  a3 0d 48 08 1b 20 e7 20  |erline%=..H.. . |
0000c460  66 6c 61 67 73 25 20 80  20 38 20 63 65 6e 74 72  |flags% . 8 centr|
0000c470  65 25 3d b9 0d 48 12 1b  20 e7 20 66 6c 61 67 73  |e%=..H.. . flags|
0000c480  25 20 80 20 31 36 20 72  69 67 68 74 25 3d b9 0d  |% . 16 right%=..|
0000c490  48 1c 1f 20 e7 20 66 6c  61 67 73 25 20 80 20 33  |H.. . flags% . 3|
0000c4a0  32 20 75 6e 64 65 72 6c  69 6e 65 25 3d b9 0d 48  |2 underline%=..H|
0000c4b0  26 06 20 f5 0d 48 30 1e  20 20 20 c8 8e 20 74 65  |&. ..H0.   .. te|
0000c4c0  78 74 5f 6f 66 66 73 65  74 25 3f 74 65 78 74 25  |xt_offset%?text%|
0000c4d0  20 ca 0d 48 3a 0d 20 20  20 20 20 c9 20 30 3a 0d  | ..H:.     . 0:.|
0000c4e0  48 44 2f 20 20 20 20 20  c9 20 31 33 3a 70 79 25  |HD/     . 13:py%|
0000c4f0  2d 3d 74 65 78 74 5f 68  65 69 67 68 74 25 3a 74  |-=text_height%:t|
0000c500  65 78 74 5f 6f 66 66 73  65 74 25 2b 3d 31 0d 48  |ext_offset%+=1.H|
0000c510  4e 0a 20 20 20 20 20 7f  0d 48 58 2d 20 20 20 20  |N.     ..HX-    |
0000c520  20 20 20 74 65 78 74 24  3d a4 73 74 72 69 6e 67  |   text$=.string|
0000c530  30 28 74 65 78 74 25 2b  74 65 78 74 5f 6f 66 66  |0(text%+text_off|
0000c540  73 65 74 25 29 0d 48 62  1f 20 20 20 20 20 20 20  |set%).Hb.       |
0000c550  74 65 78 74 5f 6f 66 66  73 65 74 25 2b 3d a9 74  |text_offset%+=.t|
0000c560  65 78 74 24 0d 48 6c 19  20 20 20 20 20 20 20 70  |ext$.Hl.       p|
0000c570  78 25 3d 78 25 2b 6d 61  72 67 69 6e 25 0d 48 76  |x%=x%+margin%.Hv|
0000c580  14 20 20 20 20 20 20 20  e7 20 66 6f 6e 74 25 20  |.       . font% |
0000c590  8c 0d 48 80 40 20 20 20  20 20 20 20 20 20 c8 99  |..H.@         ..|
0000c5a0  20 73 74 72 69 6e 67 77  69 64 74 68 25 2c 2c 74  | stringwidth%,,t|
0000c5b0  65 78 74 24 2c 31 3c 3c  33 30 2c 31 3c 3c 33 30  |ext$,1<<30,1<<30|
0000c5c0  2c 2d 31 2c a9 74 65 78  74 24 20 b8 20 2c 2c 77  |,-1,.text$ . ,,w|
0000c5d0  25 0d 48 8a 26 20 20 20  20 20 20 20 20 20 c8 99  |%.H.&         ..|
0000c5e0  20 63 6f 6e 76 65 72 74  74 6f 6f 73 25 2c 2c 77  | converttoos%,,w|
0000c5f0  25 20 b8 20 2c 77 25 0d  48 94 2d 20 20 20 20 20  |% . ,w%.H.-     |
0000c600  20 20 20 20 e7 20 63 65  6e 74 72 65 25 20 70 78  |    . centre% px|
0000c610  25 3d 78 25 2b 28 78 31  25 2d 78 25 29 81 32 2d  |%=x%+(x1%-x%).2-|
0000c620  77 25 81 32 0d 48 9e 28  20 20 20 20 20 20 20 20  |w%.2.H.(        |
0000c630  20 e7 20 72 69 67 68 74  25 20 70 78 25 3d 78 31  | . right% px%=x1|
0000c640  25 2d 77 25 2d 6d 61 72  67 69 6e 25 0d 48 a8 37  |%-w%-margin%.H.7|
0000c650  20 20 20 20 20 20 20 20  20 e7 20 75 6e 64 65 72  |         . under|
0000c660  6c 69 6e 65 25 20 75 6c  24 3d bd 28 32 35 29 2b  |line% ul$=.(25)+|
0000c670  bd 28 31 29 2b bd 28 31  36 29 20 8b 20 75 6c 24  |.(1)+.(16) . ul$|
0000c680  3d 22 22 0d 48 b2 41 20  20 20 20 20 20 20 20 20  |="".H.A         |
0000c690  c8 99 20 22 43 6f 6c 6f  75 72 54 72 61 6e 73 5f  |.. "ColourTrans_|
0000c6a0  53 65 74 46 6f 6e 74 43  6f 6c 6f 75 72 73 22 2c  |SetFontColours",|
0000c6b0  66 6f 6e 74 25 2c 62 63  6f 6c 25 2c 66 63 6f 6c  |font%,bcol%,fcol|
0000c6c0  25 2c 31 34 0d 48 bc 32  20 20 20 20 20 20 20 20  |%,14.H.2        |
0000c6d0  20 c8 99 20 70 61 69 6e  74 25 2c 2c 75 6c 24 2b  | .. paint%,,ul$+|
0000c6e0  74 65 78 74 24 2c 31 3c  3c 34 2c 70 78 25 2c 70  |text$,1<<4,px%,p|
0000c6f0  79 25 2d 63 79 25 0d 48  c6 42 20 20 20 20 20 20  |y%-cy%.H.B      |
0000c700  20 20 20 e7 20 74 65 78  74 5f 6f 66 66 73 65 74  |   . text_offset|
0000c710  25 3e 77 6f 72 64 25 20  80 20 28 74 65 78 74 5f  |%>word% . (text_|
0000c720  6f 66 66 73 65 74 25 2d  a9 74 65 78 74 24 29 3c  |offset%-.text$)<|
0000c730  3d 77 6f 72 64 25 20 8c  0d 48 d0 2f 20 20 20 20  |=word% ..H./    |
0000c740  20 20 20 20 20 20 20 69  25 3d 77 6f 72 64 25 2d  |       i%=word%-|
0000c750  28 74 65 78 74 5f 6f 66  66 73 65 74 25 2d a9 28  |(text_offset%-.(|
0000c760  74 65 78 74 24 29 29 0d  48 da 1c 20 20 20 20 20  |text$)).H..     |
0000c770  20 20 20 20 20 20 6c 24  3d c0 74 65 78 74 24 2c  |      l$=.text$,|
0000c780  69 25 29 0d 48 e4 3c 20  20 20 20 20 20 20 20 20  |i%).H.<         |
0000c790  20 20 c8 99 20 73 74 72  69 6e 67 77 69 64 74 68  |  .. stringwidth|
0000c7a0  25 2c 2c 6c 24 2c 31 3c  3c 33 30 2c 31 3c 3c 33  |%,,l$,1<<30,1<<3|
0000c7b0  30 2c 2d 31 2c a9 6c 24  20 b8 20 2c 2c 77 25 0d  |0,-1,.l$ . ,,w%.|
0000c7c0  48 ee 28 20 20 20 20 20  20 20 20 20 20 20 c8 99  |H.(           ..|
0000c7d0  20 63 6f 6e 76 65 72 74  74 6f 6f 73 25 2c 2c 77  | converttoos%,,w|
0000c7e0  25 20 b8 20 2c 77 25 0d  48 f8 16 20 20 20 20 20  |% . ,w%.H..     |
0000c7f0  20 20 20 20 20 20 70 78  25 2b 3d 77 25 0d 49 02  |      px%+=w%.I.|
0000c800  24 20 20 20 20 20 20 20  20 20 20 20 72 24 3d c2  |$           r$=.|
0000c810  74 65 78 74 24 2c a9 74  65 78 74 24 2d a9 6c 24  |text$,.text$-.l$|
0000c820  29 0d 49 0c 2a 20 20 20  20 20 20 20 20 20 20 20  |).I.*           |
0000c830  e7 20 a7 72 24 2c 22 20  22 29 20 72 24 3d c0 72  |. .r$," ") r$=.r|
0000c840  24 2c a7 72 24 2c 22 20  22 29 29 0d 49 16 57 20  |$,.r$," ")).I.W |
0000c850  20 20 20 20 20 20 20 20  20 20 c8 99 20 22 43 6f  |          .. "Co|
0000c860  6c 6f 75 72 54 72 61 6e  73 5f 53 65 74 46 6f 6e  |lourTrans_SetFon|
0000c870  74 43 6f 6c 6f 75 72 73  22 2c 66 6f 6e 74 25 2c  |tColours",font%,|
0000c880  62 63 6f 6c 25 82 26 46  46 46 46 46 46 30 30 2c  |bcol%.&FFFFFF00,|
0000c890  66 63 6f 6c 25 82 26 46  46 46 46 46 46 30 30 2c  |fcol%.&FFFFFF00,|
0000c8a0  31 34 0d 49 20 31 20 20  20 20 20 20 20 20 20 20  |14.I 1          |
0000c8b0  20 c8 99 20 70 61 69 6e  74 25 2c 2c 75 6c 24 2b  | .. paint%,,ul$+|
0000c8c0  72 24 2c 31 3c 3c 34 2c  70 78 25 2c 70 79 25 2d  |r$,1<<4,px%,py%-|
0000c8d0  63 79 25 0d 49 2a 0e 20  20 20 20 20 20 20 20 20  |cy%.I*.         |
0000c8e0  cd 0d 49 34 0c 20 20 20  20 20 20 20 cc 0d 49 3e  |..I4.       ..I>|
0000c8f0  1b 20 20 20 20 20 20 20  20 20 77 25 3d a9 74 65  |.         w%=.te|
0000c900  78 74 24 2a 63 78 31 25  0d 49 48 2d 20 20 20 20  |xt$*cx1%.IH-    |
0000c910  20 20 20 20 20 e7 20 63  65 6e 74 72 65 25 20 70  |     . centre% p|
0000c920  78 25 3d 78 25 2b 28 78  31 25 2d 78 25 29 81 32  |x%=x%+(x1%-x%).2|
0000c930  2d 77 25 81 32 0d 49 52  28 20 20 20 20 20 20 20  |-w%.2.IR(       |
0000c940  20 20 e7 20 72 69 67 68  74 25 20 70 78 25 3d 78  |  . right% px%=x|
0000c950  31 25 2d 77 25 2d 6d 61  72 67 69 6e 25 0d 49 5c  |1%-w%-margin%.I\|
0000c960  33 20 20 20 20 20 20 20  20 20 c8 99 20 73 65 74  |3         .. set|
0000c970  63 6f 6c 25 2c 66 63 6f  6c 25 3a ec 20 70 78 25  |col%,fcol%:. px%|
0000c980  2c 70 79 25 2b 63 79 31  25 3a f1 74 65 78 74 24  |,py%+cy1%:.text$|
0000c990  0d 49 66 38 20 20 20 20  20 20 20 20 20 e7 20 75  |.If8         . u|
0000c9a0  6e 64 65 72 6c 69 6e 65  25 20 ec 20 70 78 25 2c  |nderline% . px%,|
0000c9b0  70 79 25 2d 63 79 25 3a  f0 31 2c 63 78 31 25 2a  |py%-cy%:.1,cx1%*|
0000c9c0  a9 74 65 78 74 24 2c 30  0d 49 70 42 20 20 20 20  |.text$,0.IpB    |
0000c9d0  20 20 20 20 20 e7 20 74  65 78 74 5f 6f 66 66 73  |     . text_offs|
0000c9e0  65 74 25 3e 77 6f 72 64  25 20 80 20 28 74 65 78  |et%>word% . (tex|
0000c9f0  74 5f 6f 66 66 73 65 74  25 2d a9 74 65 78 74 24  |t_offset%-.text$|
0000ca00  29 3c 3d 77 6f 72 64 25  20 8c 0d 49 7a 2f 20 20  |)<=word% ..Iz/  |
0000ca10  20 20 20 20 20 20 20 20  20 69 25 3d 77 6f 72 64  |         i%=word|
0000ca20  25 2d 28 74 65 78 74 5f  6f 66 66 73 65 74 25 2d  |%-(text_offset%-|
0000ca30  a9 28 74 65 78 74 24 29  29 0d 49 84 1c 20 20 20  |.(text$)).I..   |
0000ca40  20 20 20 20 20 20 20 20  6c 24 3d c0 74 65 78 74  |        l$=.text|
0000ca50  24 2c 69 25 29 0d 49 8e  22 20 20 20 20 20 20 20  |$,i%).I."       |
0000ca60  20 20 20 20 77 25 3d a9  6c 24 2a 63 78 31 25 3a  |    w%=.l$*cx1%:|
0000ca70  70 78 25 2b 3d 77 25 0d  49 98 24 20 20 20 20 20  |px%+=w%.I.$     |
0000ca80  20 20 20 20 20 20 72 24  3d c2 74 65 78 74 24 2c  |      r$=.text$,|
0000ca90  a9 74 65 78 74 24 2d a9  6c 24 29 0d 49 a2 2a 20  |.text$-.l$).I.* |
0000caa0  20 20 20 20 20 20 20 20  20 20 e7 20 a7 72 24 2c  |          . .r$,|
0000cab0  22 20 22 29 20 72 24 3d  c0 72 24 2c a7 72 24 2c  |" ") r$=.r$,.r$,|
0000cac0  22 20 22 29 29 0d 49 ac  3c 20 20 20 20 20 20 20  |" ")).I.<       |
0000cad0  20 20 20 20 c8 99 20 73  65 74 63 6f 6c 25 2c 66  |    .. setcol%,f|
0000cae0  63 6f 6c 25 82 26 46 46  46 46 30 30 30 30 3a ec  |col%.&FFFF0000:.|
0000caf0  20 70 78 25 2c 70 79 25  2b 63 79 31 25 3a f1 72  | px%,py%+cy1%:.r|
0000cb00  24 0d 49 b6 37 20 20 20  20 20 20 20 20 20 20 20  |$.I.7           |
0000cb10  e7 20 75 6e 64 65 72 6c  69 6e 65 25 20 ec 20 70  |. underline% . p|
0000cb20  78 25 2c 70 79 25 2d 63  79 25 3a f0 31 2c 63 78  |x%,py%-cy%:.1,cx|
0000cb30  31 25 2a a9 72 24 2c 30  0d 49 c0 0e 20 20 20 20  |1%*.r$,0.I..    |
0000cb40  20 20 20 20 20 cd 0d 49  ca 0c 20 20 20 20 20 20  |     ..I..      |
0000cb50  20 cd 0d 49 d4 08 20 20  20 cb 0d 49 de 1b 20 fd  | ..I..   ..I.. .|
0000cb60  20 74 65 78 74 5f 6f 66  66 73 65 74 25 3f 74 65  | text_offset%?te|
0000cb70  78 74 25 3d 30 0d 49 e8  1f 20 e7 20 66 6f 6e 74  |xt%=0.I.. . font|
0000cb80  25 20 c8 99 20 6c 6f 73  65 66 6f 6e 74 25 2c 66  |% .. losefont%,f|
0000cb90  6f 6e 74 25 0d 49 f2 06  20 e1 0d 49 fc 04 0d 4a  |ont%.I.. ..I...J|
0000cba0  06 21 20 dd f2 62 65 67  69 6e 5f 73 61 76 65 28  |.! ..begin_save(|
0000cbb0  6f 62 6a 65 63 74 25 2c  73 6f 75 6e 64 25 29 0d  |object%,sound%).|
0000cbc0  4a 10 27 20 c8 99 20 67  65 74 65 6e 74 72 79 25  |J.' .. getentry%|
0000cbd0  2c 73 74 61 63 6b 25 2c  6f 62 6a 65 63 74 25 20  |,stack%,object% |
0000cbe0  b8 20 61 64 72 25 0d 4a  1a 22 20 c8 99 20 67 65  |. adr%.J." .. ge|
0000cbf0  74 70 25 2c 2c 71 25 3a  6d 78 25 3d 21 71 25 3a  |tp%,,q%:mx%=!q%:|
0000cc00  6d 79 25 3d 71 25 21 34  0d 4a 24 32 20 69 78 25  |my%=q%!4.J$2 ix%|
0000cc10  3d 6d 78 25 2d 33 38 3a  69 79 25 3d 6d 79 25 2d  |=mx%-38:iy%=my%-|
0000cc20  33 38 3a 69 78 31 25 3d  6d 78 25 2b 33 38 3a 69  |38:ix1%=mx%+38:i|
0000cc30  79 31 25 3d 6d 79 25 2b  33 38 0d 4a 2e 0f 20 e7  |y1%=my%+38.J.. .|
0000cc40  20 73 6f 75 6e 64 25 20  8c 0d 4a 38 12 20 20 20  | sound% ..J8.   |
0000cc50  e7 20 61 64 72 25 21 32  38 20 8c 0d 4a 42 2e 20  |. adr%!28 ..JB. |
0000cc60  20 20 20 20 c8 99 20 67  65 74 65 6e 74 72 79 25  |    .. getentry%|
0000cc70  2c 73 5f 63 6c 69 63 6b  73 25 2c 61 64 72 25 21  |,s_clicks%,adr%!|
0000cc80  32 38 20 b8 20 61 64 72  25 0d 4a 4c 14 20 20 20  |28 . adr%.JL.   |
0000cc90  20 20 e7 20 61 64 72 25  21 32 30 20 8c 0d 4a 56  |  . adr%!20 ..JV|
0000cca0  2f 20 20 20 20 20 20 20  c8 99 20 67 65 74 65 6e  |/       .. geten|
0000ccb0  74 72 79 25 2c 73 5f 6d  6f 75 73 65 25 2c 61 64  |try%,s_mouse%,ad|
0000ccc0  72 25 21 32 30 20 b8 20  61 64 72 25 0d 4a 60 17  |r%!20 . adr%.J`.|
0000ccd0  20 20 20 20 20 20 20 e7  20 61 64 72 25 21 38 3d  |       . adr%!8=|
0000cce0  35 20 8c 0d 4a 6a 20 20  20 20 20 20 20 20 20 20  |5 ..Jj          |
0000ccf0  64 72 61 67 5f 73 6f 75  6e 64 25 3d 61 64 72 25  |drag_sound%=adr%|
0000cd00  21 31 32 0d 4a 74 2d 20  20 20 20 20 20 20 20 20  |!12.Jt-         |
0000cd10  f2 73 74 61 72 74 5f 64  72 61 67 28 33 2c 69 78  |.start_drag(3,ix|
0000cd20  25 2c 69 79 25 2c 69 78  31 25 2c 69 79 31 25 29  |%,iy%,ix1%,iy1%)|
0000cd30  0d 4a 7e 0c 20 20 20 20  20 20 20 cd 0d 4a 88 0a  |.J~.       ..J..|
0000cd40  20 20 20 20 20 cd 0d 4a  92 08 20 20 20 cd 0d 4a  |     ..J..   ..J|
0000cd50  9c 06 20 cc 0d 4a a6 19  20 20 20 e7 20 61 64 72  |.. ..J..   . adr|
0000cd60  25 21 34 3d 73 5f 74 65  78 74 25 20 8c 0d 4a b0  |%!4=s_text% ..J.|
0000cd70  31 20 20 20 20 20 64 72  61 67 5f 70 74 79 70 65  |1     drag_ptype|
0000cd80  25 3d 73 5f 74 65 78 74  25 3a 64 72 61 67 5f 70  |%=s_text%:drag_p|
0000cd90  69 63 74 75 72 65 25 3d  61 64 72 25 21 38 0d 4a  |icture%=adr%!8.J|
0000cda0  ba 2a 20 20 20 20 20 f2  73 74 61 72 74 5f 64 72  |.*     .start_dr|
0000cdb0  61 67 28 32 30 2c 69 78  25 2c 69 79 25 2c 69 78  |ag(20,ix%,iy%,ix|
0000cdc0  31 25 2c 69 79 31 25 29  0d 4a c4 08 20 20 20 cc  |1%,iy1%).J..   .|
0000cdd0  0d 4a ce 30 20 20 20 20  20 64 72 61 67 5f 70 74  |.J.0     drag_pt|
0000cde0  79 70 65 25 3d 61 64 72  25 21 34 3a 64 72 61 67  |ype%=adr%!4:drag|
0000cdf0  5f 70 69 63 74 75 72 65  25 3d 61 64 72 25 21 38  |_picture%=adr%!8|
0000ce00  0d 4a d8 29 20 20 20 20  20 f2 73 74 61 72 74 5f  |.J.)     .start_|
0000ce10  64 72 61 67 28 34 2c 69  78 25 2c 69 79 25 2c 69  |drag(4,ix%,iy%,i|
0000ce20  78 31 25 2c 69 79 31 25  29 0d 4a e2 08 20 20 20  |x1%,iy1%).J..   |
0000ce30  cd 0d 4a ec 06 20 cd 0d  4a f6 06 20 e1 0d 4b 00  |..J.. ..J.. ..K.|
0000ce40  04 0d 4b 0a 14 20 dd f2  74 72 79 5f 75 73 65 72  |..K.. ..try_user|
0000ce50  5f 64 72 61 67 0d 4b 14  11 20 f2 67 65 74 5f 70  |_drag.K.. .get_p|
0000ce60  6f 69 6e 74 65 72 0d 4b  1e 18 20 e7 20 68 61 6e  |ointer.K.. . han|
0000ce70  64 6c 65 25 3d 6d 61 69  6e 5f 77 25 20 e1 0d 4b  |dle%=main_w% ..K|
0000ce80  28 1e 20 71 25 21 32 30  3d 68 61 6e 64 6c 65 25  |(. q%!20=handle%|
0000ce90  3a 71 25 21 32 34 3d 69  63 6f 6e 25 0d 4b 32 20  |:q%!24=icon%.K2 |
0000cea0  20 71 25 21 32 38 3d 6d  6f 75 73 65 78 25 3a 71  | q%!28=mousex%:q|
0000ceb0  25 21 33 32 3d 6d 6f 75  73 65 79 25 0d 4b 3c 1a  |%!32=mousey%.K<.|
0000cec0  20 71 25 21 33 36 3d 73  70 72 69 74 65 5f 73 69  | q%!36=sprite_si|
0000ced0  7a 65 25 2d 32 34 0d 4b  46 0b 20 21 71 25 3d 35  |ze%-24.KF. !q%=5|
0000cee0  36 0d 4b 50 14 20 c8 8e  20 64 72 61 67 5f 74 79  |6.KP. .. drag_ty|
0000cef0  70 65 25 20 ca 0d 4b 5a  1a 20 20 20 20 c9 20 33  |pe% ..KZ.    . 3|
0000cf00  3a f4 20 73 61 76 69 6e  67 20 73 6f 75 6e 64 0d  |:. saving sound.|
0000cf10  4b 64 33 20 20 20 20 20  20 c8 99 20 67 65 74 65  |Kd3      .. gete|
0000cf20  6e 74 72 79 25 2c 73 5f  73 6f 75 6e 64 73 25 2c  |ntry%,s_sounds%,|
0000cf30  64 72 61 67 5f 73 6f 75  6e 64 25 20 b8 20 61 64  |drag_sound% . ad|
0000cf40  72 25 0d 4b 6e 20 20 20  20 20 20 20 73 61 76 65  |r%.Kn       save|
0000cf50  24 3d a4 73 74 72 69 6e  67 30 28 61 64 72 25 2b  |$=.string0(adr%+|
0000cf60  34 29 0d 4b 78 19 20 20  20 20 20 20 66 69 6c 65  |4).Kx.      file|
0000cf70  5f 74 79 70 65 25 3d 26  44 33 43 0d 4b 82 1c 20  |_type%=&D3C.K.. |
0000cf80  20 20 20 c9 20 34 3a f4  20 73 61 76 69 6e 67 20  |   . 4:. saving |
0000cf90  70 69 63 74 75 72 65 0d  4b 8c 37 20 20 20 20 20  |picture.K.7     |
0000cfa0  20 c8 99 20 67 65 74 65  6e 74 72 79 25 2c 64 72  | .. getentry%,dr|
0000cfb0  61 67 5f 70 74 79 70 65  25 2c 64 72 61 67 5f 70  |ag_ptype%,drag_p|
0000cfc0  69 63 74 75 72 65 25 20  b8 20 61 64 72 25 0d 4b  |icture% . adr%.K|
0000cfd0  96 20 20 20 20 20 20 20  73 61 76 65 24 3d a4 73  |.       save$=.s|
0000cfe0  74 72 69 6e 67 30 28 61  64 72 25 2b 34 29 0d 4b  |tring0(adr%+4).K|
0000cff0  a0 44 20 20 20 20 20 20  e7 20 64 72 61 67 5f 70  |.D      . drag_p|
0000d000  74 79 70 65 25 3d 73 5f  73 70 72 69 74 65 73 25  |type%=s_sprites%|
0000d010  20 66 69 6c 65 5f 74 79  70 65 25 3d 26 46 46 39  | file_type%=&FF9|
0000d020  20 8b 20 66 69 6c 65 5f  74 79 70 65 25 3d 26 41  | . file_type%=&A|
0000d030  46 46 0d 4b aa 1a 20 20  20 20 c9 20 32 30 3a f4  |FF.K..    . 20:.|
0000d040  20 73 61 76 69 6e 67 20  74 65 78 74 0d 4b b4 16  | saving text.K..|
0000d050  20 20 20 20 20 20 73 61  76 65 24 3d 22 74 65 78  |      save$="tex|
0000d060  74 22 0d 4b be 19 20 20  20 20 20 20 66 69 6c 65  |t".K..      file|
0000d070  5f 74 79 70 65 25 3d 26  46 46 46 0d 4b c8 08 20  |_type%=&FFF.K.. |
0000d080  20 20 cb 0d 4b d2 17 20  20 20 71 25 21 34 30 3d  |  ..K..   q%!40=|
0000d090  66 69 6c 65 5f 74 79 70  65 25 0d 4b dc 1c 20 20  |file_type%.K..  |
0000d0a0  20 f2 73 74 72 69 6e 67  30 28 71 25 2b 34 34 2c  | .string0(q%+44,|
0000d0b0  73 61 76 65 24 29 0d 4b  e6 19 20 20 20 71 25 21  |save$).K..   q%!|
0000d0c0  31 32 3d 71 25 21 38 3a  71 25 21 31 36 3d 31 0d  |12=q%!8:q%!16=1.|
0000d0d0  4b f0 3a 20 20 20 c8 99  20 73 65 6e 64 6d 65 73  |K.:   .. sendmes|
0000d0e0  73 61 67 65 25 2c 31 37  2c 71 25 2c 68 61 6e 64  |sage%,17,q%,hand|
0000d0f0  6c 65 25 2c 69 63 6f 6e  25 3a f4 20 73 65 6e 64  |le%,icon%:. send|
0000d100  20 64 61 74 61 73 61 76  65 0d 4b fa 12 20 20 20  | datasave.K..   |
0000d110  6d 79 72 65 66 25 3d 71  25 21 38 0d 4c 04 0d 20  |myref%=q%!8.L.. |
0000d120  20 20 44 4d 54 25 3d 30  0d 4c 0e 11 20 20 20 44  |  DMT%=0.L..   D|
0000d130  4d 54 5f 70 74 72 25 3d  30 0d 4c 18 06 20 cb 0d  |MT_ptr%=0.L.. ..|
0000d140  4c 22 06 20 e1 0d ff                              |L". ...|
0000d147