Home » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199609.adf » Extras » PDScheme/!BackSetUp/!RunImage

PDScheme/!BackSetUp/!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: PDScheme/!BackSetUp/!RunImage
Read OK:
File size: 51A3 bytes
Load address: 0000
Exec address: 0000
File contents
   10REM BackDrops setup program
   20REM LEN Andrew J Booker (April 96)
   30REM Look here for bad programming ...
   40:
   50ONERRORONERROROFF:ERROR0,REPORT$+STR$ERL:END
   60PROCinit
   70:
   80WHILE NOT quit%
   90  SYS "Wimp_Poll",mask%,block% TO reason%
  100  CASE reason% OF
  110    WHEN 2:SYS "Wimp_OpenWindow",,block%
  120    WHEN 3:SYS "Wimp_CloseWindow",,block%
  130    WHEN 6:PROCmouseclick(!block%,block%!4,block%!8,block%!12,block%!16)
  140    WHEN 7:PROCdragfinished
  150    WHEN 9:PROCmenusel
  160    WHEN 17,18:PROCmessage(block%!16)
  170  ENDCASE
  180ENDWHILE
  190OSCLI "Save BackDrops:Data "+STR$~data%+" +3AA"
  200OSCLI "SetType BackDrops:Data FFD"
  210SYS "XOS_CLI","Wipe <Wimp$ScrapDir>.BackDrops F R ~C ~V"
  220SYS "Wimp_CloseDown"
  230END
  240:
  250DEFPROCinit
  260DIM task% 4,list% 15,block% 11250,temp% 319,indir% 3750,drag% 127
  270endindir%=indir%+3750
  280DIM type$(3)
  290type$()="Tiled","Scaled","Centred","Centred"
  300$task%="TASK"
  310!list%=1:list%!4=3:list%!8=&400C0:list%!12=0
  320quit%=FALSE
  330Greyed1%=FALSE
  340Greyed2%=FALSE
  350MenuOpen%=-1
  360mask%=0
  370SYS "Wimp_Initialise",300,!task%,"BackDrops Setup",list%
  380:
  390SYS "Wimp_OpenTemplate",,"<BackDropSet$Dir>.Templates"
  400SYS "Wimp_LoadTemplate",,block%,indir%,endindir%,-1,"info",0 TO ,,indir%,,,,r6
  410SYS "Wimp_CreateWindow",,block% TO InfoHandle%
  420SYS "Wimp_LoadTemplate",,block%,indir%,endindir%,-1,"main",r6
  430SYS "Wimp_CreateWindow",,block% TO MainHandle%
  440SYS "Wimp_CloseTemplate"
  450:
  460DIM IconMenu% 27+24*2
  470$IconMenu%="BackDrops":IconMenu%!12=&70207:IconMenu%!16=7*16
  480IconMenu%!20=44:IconMenu%!24=0
  490IconMenu%!28=0:IconMenu%!32=InfoHandle%:IconMenu%!36=&7000021
  500$(IconMenu%+40)="Info"
  510IconMenu%!52=&80:IconMenu%!56=0:IconMenu%!60=&7000021
  520$(IconMenu%+64)="Quit"
  530:
  540DIM TypeMenu% 27+24*3
  550$TypeMenu%="SpriteName":TypeMenu%!12=&70207:TypeMenu%!16=8*16
  560TypeMenu%!20=44:TypeMenu%!24=0
  570TypeMenu%!28=0:TypeMenu%!32=0:TypeMenu%!36=&7000021:$(TypeMenu%+40)="Scaled"
  580TypeMenu%!52=0:TypeMenu%!56=0:TypeMenu%!60=&7000021:$(TypeMenu%+64)="Centred"
  590TypeMenu%!76=&80:TypeMenu%!80=0:TypeMenu%!84=&7000021:$(TypeMenu%+88)="Tiled"
  600:
  610DIM SelMenu% 27+24*8,A% 13
  620$SelMenu%="SpriteName":SelMenu%!12=&70207:SelMenu%!16=18*16
  630SelMenu%!20=44:SelMenu%!24=0
  640SelMenu%!28=0:SelMenu%!32=0:SelMenu%!36=&7000021:$(SelMenu%+40)="View"
  650SelMenu%!52=0:SelMenu%!56=0:SelMenu%!60=&7000121:SelMenu%!64=A%
  660SelMenu%!68=-1:SelMenu%!72=14:$A%="Make backdrop"
  670SelMenu%!76=2:SelMenu%!80=0:SelMenu%!84=&7000021:$(SelMenu%+88)="Delete"
  680DIM A% 17
  690SelMenu%!100=0:SelMenu%!104=0:SelMenu%!108=&7000121:SelMenu%!112=A%
  700SelMenu%!116=-1:SelMenu%!120=18:$A%="Include in random"
  710DIM A% 13
  720SelMenu%!124=2:SelMenu%!128=0:SelMenu%!132=&7000121:SelMenu%!136=A%
  730SelMenu%!140=-1:SelMenu%!144=14:$A%="Don't include"
  740SelMenu%!148=0:SelMenu%!152=0:SelMenu%!156=&7000021:$(SelMenu%+160)="Scaled"
  750SelMenu%!172=0:SelMenu%!176=0:SelMenu%!180=&7000021:$(SelMenu%+184)="Centred"
  760SelMenu%!196=&80:SelMenu%!200=0:SelMenu%!204=&7000021:$(SelMenu%+208)="Tiled"
  770:
  780DIM ListMenu% 27+24*79
  790$ListMenu%="Startup":ListMenu%!12=&70207:ListMenu%!16=7*16
  800ListMenu%!20=44:ListMenu%!24=0
  810FOR A%=0 TO 78
  820!(ListMenu%+32+24*A%)=0
  830!(ListMenu%+36+24*A%)=&7000021
  840NEXT
  850$(ListMenu%+40)="Random"
  860$(ListMenu%+64)="(None)"
  870:
  880DIM MainMenu% 28+24*2:DIM A% 21
  890$MainMenu%="BackDrops":MainMenu%!12=&70207:MainMenu%!16=8*16
  900MainMenu%!20=44:MainMenu%!24=0
  910MainMenu%!28=8:MainMenu%!32=ListMenu%:MainMenu%!36=&7000021
  920$(MainMenu%+40)="Startup"
  930MainMenu%!52=&98:MainMenu%!56=SelMenu%:MainMenu%!60=&7000121
  940MainMenu%!64=A%:MainMenu%!68=-1:MainMenu%!72=22
  950:
  960DIM data% 78*12+1
  970OSCLI "Load BackDrops:Data "+STR$~data%
  980PROCupdatelist
  990:
 1000!block%=-1
 1010block%!4=0:block%!8=0:block%!12=68:block%!16=68
 1020block%!20=&3002:$(block%+24)="!backsetup"
 1030SYS "Wimp_CreateIcon",,block% TO IconHandle%
 1040ENDPROC
 1050:
 1060:
 1070:
 1080:
 1090DEFPROCmouseclick(x%,y%,buttons%,window%,icon%)
 1100LOCAL pos%,loop%,offset%,ox%,oy%,minx%,maxx%,miny%,maxy%,sel%,xeig%,yeig%
 1110CASE window% OF
 1120  WHEN -2
 1130  IF buttons%=2 THEN
 1140    SYS "Wimp_CreateMenu",,IconMenu%,x%-64,94+44*2:MenuOpen%=IconMenu%
 1150  ELSE
 1160    IF buttons%=1 OR buttons%=4 THEN
 1170      !temp%=MainHandle%:SYS "Wimp_GetWindowState",,temp%
 1180      temp%!28=-1
 1190      REM centre if not already open
 1200      IF ((temp%!32)AND(1<<16))=0 THEN
 1210        SYS "OS_ReadModeVariable",-1,11 TO ,,x%
 1220        SYS "OS_ReadModeVariable",-1,12 TO ,,y%
 1230        SYS "OS_ReadModeVariable",-1,4 TO ,,xeig%
 1240        SYS "OS_ReadModeVariable",-1,5 TO ,,yeig%
 1250        x%=((x%+1)<<xeig%):y%=((y%+1)<<yeig%)
 1260        temp%!8=temp%!16-284
 1270        temp%!12=temp%!4+400
 1280        x%=(x%-(temp%!12-temp%!4))DIV2
 1290        y%=(y%-(temp%!16-temp%!8))DIV2
 1300        temp%!12=x%+(temp%!12-temp%!4)
 1310        temp%!4=x%
 1320        temp%!16=y%+(temp%!16-temp%!8)
 1330        temp%!8=y%
 1340        temp%!20=0:temp%!24=0
 1350      ENDIF
 1360      SYS "Wimp_OpenWindow",,temp%
 1370    ENDIF
 1380  ENDIF
 1390  
 1400  WHEN MainHandle%
 1410    CASE buttons% OF
 1420    WHEN 2
 1430      SYS "Wimp_WhichIcon",MainHandle%,temp%,&bf0000,&210000
 1440      IF !temp%=-1 THEN
 1450        !temp%=MainHandle%
 1460        SYS "Wimp_GetWindowState",,temp%
 1470        !temp%=((temp%!16-y%-temp%!24)DIV48)*3
 1480        temp%!4=-1
 1490      ENDIF
 1500      IF temp%!4=-1 THEN
 1510        IF NOT(((Greyed1% AND !temp%=3) OR (Greyed2% AND !temp%=6))) THEN
 1520          MenuParent%=((!temp%)DIV3)
 1530          str$="Backdrop '"+$(FNindiraddr(MainHandle%,!temp%))+"'"
 1540          $(MainMenu%!64)=str$
 1550          MainMenu%!16=(LEN(str$)+1)*16
 1560          MainMenu%!60=&7000121
 1570        ELSE
 1580          MenuParent%=-2
 1590          $(MainMenu%!64)="Backdrop"
 1600          MainMenu%!16=9*16
 1610          MainMenu%!60=&7400121
 1620        ENDIF
 1630      ELSE
 1640        $(MainMenu%!64)="Selection":MainMenu%!16=10*16
 1650        MainMenu%!60=&7000121
 1660        MenuParent%=-1
 1670      ENDIF
 1680      SYS "Wimp_CreateMenu",,MainMenu%,x%-64,y%
 1690      MenuOpen%=MainMenu%
 1700    
 1710    WHEN 16,64
 1720      IF icon%=-1 AND buttons%=64 THEN
 1730      !temp%=MainHandle%
 1740      FOR icon%=0 TO (?data%)*3 STEP3
 1750        temp%!4=icon%
 1760        SYS "Wimp_GetIconState",,temp%
 1770        IF ((temp%!24)AND(1<<21))=(1<<21) THEN temp%!8=0:temp%!12=1<<21:SYS "Wimp_SetIconState",,temp%
 1780      NEXT
 1790      ENDIF
 1800      IF buttons%=64 THEN adjustdrag%=FALSE ELSEadjustdrag%=TRUE
 1810      IF (icon% MOD 3)=0THEN
 1820        !temp%=MainHandle%
 1830        temp%!4=icon%
 1840        temp%!8=1<<21
 1850        temp%!12=0
 1860        SYS "Wimp_SetIconState",,temp%
 1870      ENDIF
 1880      !temp%=MainHandle%:SYS "Wimp_GetWindowState",,temp%
 1890      ox%=temp%!4-temp%!20
 1900      oy%=temp%!16-temp%!24
 1910      IF x%-ox%<174 THEN
 1920        dragx%=x%-ox%:dragy%=y%-oy%
 1930        drag%!4=6
 1940        drag%!8=x%:drag%!16=x%
 1950        drag%!12=y%:drag%!20=y%
 1960        minx%=ox%
 1970        miny%=oy%-44-(?data%)*48
 1980        IF ?data%<2 THENminy%=oy%-140
 1990        maxx%=ox%+174
 2000        maxy%=oy%-48
 2010        IF temp%!8>miny% THENminy%=temp%!8
 2020        IF temp%!12<maxx% THENmaxx%=temp%!12
 2030        IF temp%!16<maxy% THENmaxy%=temp%!16
 2040        drag%!24=minx%
 2050        drag%!28=miny%
 2060        drag%!32=maxx%
 2070        drag%!36=maxy%
 2080        SYS "Wimp_DragBox",,drag%
 2090      ENDIF
 2100    
 2110    OTHERWISE
 2120      IF (icon% MOD 3)=1 THEN
 2130        REM Scaled/Centred/Tiled menu
 2140        $TypeMenu%=$(FNindiraddr(MainHandle%,icon%-1))
 2150        CASE $(FNindiraddr(MainHandle%,icon%)) OF
 2160          WHEN "Scaled":pos%=1
 2170          WHEN "Centred":pos%=2
 2180          WHEN "Tiled":pos%=3
 2190        ENDCASE
 2200        FOR loop%=1 TO 3
 2210          offset%=4+24*loop%
 2220          IF loop%=pos% THEN
 2230            TypeMenu%!offset%=((TypeMenu%!offset%)OR1)
 2240          ELSE
 2250            TypeMenu%!offset%=((TypeMenu%!offset%)AND(NOT1))
 2260          ENDIF
 2270        NEXT
 2280        SYS "Wimp_CreateMenu",,TypeMenu%,x%-64,y%
 2290        MenuOpen%=TypeMenu%:MenuParent%=icon%DIV3
 2300      ENDIF
 2310      
 2320      IF (icon% MOD 3)=2 THEN
 2330        !temp%=MainHandle%
 2340        temp%!4=icon%
 2350        SYS "Wimp_GetIconState",,temp%
 2360        sel%=(((temp%!24)AND(1<<21))>>21)
 2370        ?(data%+12+(icon%DIV3)*12)=(((?(data%+12+(icon%DIV3)*12))AND(NOT1))+sel%)
 2380      ENDIF
 2390    ENDCASE
 2400        
 2410ENDCASE
 2420ENDPROC
 2430:
 2440:
 2450:
 2460:
 2470DEFPROCmenusel
 2480LOCAL val%,addr%,adjust%
 2490SYS "Wimp_GetPointerInfo",,temp%
 2500IF temp%!8=1 THENadjust%=TRUE ELSEadjust%=FALSE
 2510CASE MenuOpen% OF
 2520  WHEN IconMenu%
 2530    IF !block%=1 THENquit%=TRUE
 2540
 2550  WHEN TypeMenu%
 2560    val%=(((!block%)+1)MOD3)
 2570    addr%=data%+12+MenuParent%*12
 2580    ?addr%=(((?addr%)AND%111111)OR(val%<<6))
 2590    $(FNindiraddr(MainHandle%,MenuParent%*3+1))=type$(val%)
 2600    !temp%=MainHandle%:temp%!4=MenuParent%*3+1:temp%!8=0:temp%!12=0
 2610    SYS "Wimp_SetIconState",,temp%
 2620  
 2630  WHEN MainMenu%
 2640    CASE !block% OF
 2650    WHEN 0:PROCmenu_startup
 2660    WHEN 1:PROCmenu_sel
 2670    ENDCASE
 2680    
 2690ENDCASE
 2700IF adjust% THENSYS "Wimp_CreateMenu",,MenuOpen%
 2710ENDPROC
 2720:
 2730:
 2740DEFPROCmenu_startup
 2750LOCAL sel%,old%
 2760sel%=block%!4
 2770IF sel%>-1 THEN
 2780  old%=data%?937
 2790  IF old%=255 THENold%=-1
 2800  old%+=1
 2810  !(ListMenu%+28+old%*24)=((!(ListMenu%+28+old%*24))AND(NOT1))
 2820  !(ListMenu%+28+sel%*24)=((!(ListMenu%+28+sel%*24))OR1)
 2830  sel%-=1
 2840  IF sel%=-1 THENsel%=255
 2850  data%?937=sel%
 2860ENDIF
 2870ENDPROC
 2880:
 2890:
 2900DEFPROCmenu_sel
 2910LOCAL sel%
 2920sel%=block%!4
 2930REM double check if everything greyed out
 2940IF MenuParent%>-2 THEN
 2950CASE sel% OF
 2960  WHEN 0:PROCmenu_viewbd(MenuParent%)
 2970  WHEN 1:PROCmenu_makebd(MenuParent%)
 2980  WHEN 2:PROCmenu_deletebd(MenuParent%)
 2990  WHEN 3:PROCmenu_incrandom(MenuParent%)
 3000  WHEN 4:PROCmenu_notrandom(MenuParent%)
 3010  WHEN 5:PROCmenu_scaled(MenuParent%)
 3020  WHEN 6:PROCmenu_centred(MenuParent%)
 3030  WHEN 7:PROCmenu_tiled(MenuParent%)
 3040ENDCASE
 3050ENDIF
 3060ENDPROC
 3070:
 3080:
 3090DEFPROCgetsellist:SYS "Wimp_WhichIcon",MainHandle%,temp%,&7f0000,&210000:ENDPROC
 3100:
 3110:
 3120DEFPROCmenu_viewbd(no%)
 3130LOCAL offset%
 3140IF no%=-1 THENPROCgetsellist ELSE!temp%=no%*3:temp%!4=-1
 3150offset%=0
 3160SYS "Hourglass_On"
 3170WHILE (temp%!offset%)>-1
 3180  OSCLI "Filer_Run BackDrops:Sprites."+FNCtrlTermString(data%+1+(temp%!offset%)*4)
 3190  offset%+=4
 3200ENDWHILE
 3210SYS "Hourglass_Off"
 3220ENDPROC
 3230:
 3240:
 3250DEFPROCmenu_makebd(no%)
 3260LOCAL str$
 3270SYS "Hourglass_On"
 3280IF no%=0 THEN
 3290  REM remove backdrop???
 3300ELSE
 3310  CASE ((?(data%+12+no%*12))>>6) OF
 3320    WHEN 0:str$="-tile"
 3330    WHEN 1:str$="-scale"
 3340    OTHERWISE:str$="-centre"
 3350  ENDCASE
 3360  OSCLI "BackDrop "+str$+" BackDrops:Sprites."+FNCtrlTermString(data%+1+no%*12)
 3370ENDIF
 3380SYS "Hourglass_Off"
 3390ENDPROC
 3400:
 3410:
 3420DEFPROCmenu_deletebd(no%)
 3430LOCAL offset%,loop%:offset%=0
 3440SYS "Hourglass_On"
 3450IF no%=-1 THENPROCgetsellist ELSE!temp%=no%*3:temp%!4=-1
 3460WHILE (temp%!offset%)>-1
 3470  no%=((temp%!offset%)DIV3)-(offset%DIV4)
 3480  SYS "XOS_CLI","Wipe BackDrops:Sprites."+FNCtrlTermString(data%+no%*12+1)+" F R ~C ~V"
 3490  IF no%<?data% THEN
 3500    FOR loop%=no% TO ?data%-1
 3510      !(data%+loop%*12+1)=!(data%+loop%*12+13)
 3520      !(data%+loop%*12+5)=!(data%+loop%*12+17)
 3530      !(data%+loop%*12+9)=!(data%+loop%*12+21)
 3540    NEXT
 3550  ENDIF
 3560  !(data%+(?data%)*12+1)=10
 3570  !(data%+(?data%)*12+5)=0
 3580  !(data%+(?data%)*12+9)=0
 3590  ?data%-=1
 3600  offset%+=4
 3610ENDWHILE
 3620PROCupdatelist
 3630!temp%=MainHandle%
 3640FOR loop%=0 TO 231 STEP3
 3650  temp%!4=loop%
 3660  SYS "Wimp_GetIconState",,temp%
 3670  IF ((temp%!24)AND(1<<21))=(1<<21) THEN temp%!8=0:temp%!12=1<<21:SYS "Wimp_SetIconState",,temp%
 3680NEXT
 3690SelMenu%!36=&7400021:SelMenu%!60=&7400121:SelMenu%!84=&7400021
 3700SelMenu%!108=&7400121:SelMenu%!132=&7400121:SelMenu%!156=&7400021
 3710SelMenu%!180=&7400021:SelMenu%!204=&7400021
 3720SelMenu%!100=0:SelMenu%!124=2:SelMenu%!148=0:SelMenu%!176=0:SelMenu%!196=&80
 3730$SelMenu%="Backdrop":$(MainMenu%!64)="Backdrop"
 3740MainMenu%!16=9*16
 3750MainMenu%!60=&7400121
 3760MenuParent%=-2
 3770SYS "Hourglass_Off"
 3780ENDPROC
 3790:
 3800:
 3810DEFPROCmenu_incrandom(no%)
 3820LOCAL offset%
 3830IF no%=-1 THENPROCgetsellist ELSE!temp%=no%*3:temp%!4=-1
 3840offset%=0
 3850WHILE (temp%!offset%)>-1
 3860  PROCmakeinc((temp%!offset%)DIV3,1)
 3870  offset%+=4
 3880ENDWHILE
 3890IF no%>-1 THEN
 3900  SelMenu%!100=1
 3910  SelMenu%!124=2
 3920ENDIF
 3930ENDPROC
 3940:
 3950DEFPROCmenu_notrandom(no%)
 3960LOCAL offset%
 3970IF no%=-1 THENPROCgetsellist ELSE!temp%=no%*3:temp%!4=-1
 3980offset%=0
 3990WHILE (temp%!offset%)>-1
 4000  PROCmakeinc((temp%!offset%)DIV3,0)
 4010  offset%+=4
 4020ENDWHILE
 4030IF no%>-1 THEN
 4040  SelMenu%!100=0
 4050  SelMenu%!124=3
 4060ENDIF
 4070ENDPROC
 4080:
 4090DEFPROCmakeinc(addr%,flag%)
 4100!block%=MainHandle%
 4110block%!4=addr%*3+2
 4120block%!8=flag%<<21
 4130block%!12=1<<21
 4140SYS "Wimp_SetIconState",,block%
 4150addr%=data%+12+addr%*12
 4160?addr%=(((?addr%)AND(NOT1))ORflag%)
 4170ENDPROC
 4180:
 4190:
 4200DEFPROCmenu_scaled(no%)
 4210LOCAL offset%
 4220IF no%=-1 THENPROCgetsellist ELSE!temp%=no%*3:temp%!4=-1
 4230offset%=0
 4240WHILE (temp%!offset%)>-1
 4250  PROCmaketype((temp%!offset%)DIV3,1)
 4260  offset%+=4
 4270ENDWHILE
 4280IF no%>-1 THEN
 4290  SelMenu%!148=1
 4300  SelMenu%!172=0
 4310  SelMenu%!196=&80
 4320ENDIF
 4330ENDPROC
 4340:
 4350DEFPROCmenu_centred(no%)
 4360LOCAL offset%
 4370IF no%=-1 THENPROCgetsellist ELSE!temp%=no%*3:temp%!4=-1
 4380offset%=0
 4390WHILE (temp%!offset%)>-1
 4400  PROCmaketype((temp%!offset%)DIV3,2)
 4410  offset%+=4
 4420ENDWHILE
 4430IF no%>-1 THEN
 4440  SelMenu%!148=0
 4450  SelMenu%!172=1
 4460  SelMenu%!196=&80
 4470ENDIF
 4480ENDPROC
 4490:
 4500DEFPROCmenu_tiled(no%)
 4510LOCAL offset%
 4520IF no%=-1 THENPROCgetsellist ELSE!temp%=no%*3:temp%!4=-1
 4530offset%=0
 4540WHILE (temp%!offset%)>-1
 4550  PROCmaketype((temp%!offset%)DIV3,0)
 4560  offset%+=4
 4570ENDWHILE
 4580IF no%>-1 THEN
 4590  SelMenu%!148=0
 4600  SelMenu%!172=0
 4610  SelMenu%!196=&81
 4620ENDIF
 4630ENDPROC
 4640:
 4650DEFPROCmaketype(addr%,type%)
 4660!block%=MainHandle%
 4670block%!4=addr%*3+1
 4680SYS "Wimp_GetIconState",,block%
 4690$(block%!28)=type$(type%)
 4700block%!8=0:block%!12=0
 4710SYS "Wimp_SetIconState",,block%
 4720type%=(type%<<6)
 4730addr%=data%+12+addr%*12
 4740?addr%=(((?addr%)AND63)+type%)
 4750ENDPROC
 4760ENDPROC
 4770:
 4780:
 4790:
 4800:
 4810DEFPROCmessage(mess%)
 4820LOCAL filename$,name$
 4830CASE mess% OF
 4840  WHEN 0
 4850    quit%=TRUE
 4860  
 4870  WHEN 1
 4880    IF block%!40=&FF9 THEN
 4890      filename$=FNCtrlTermString(block%+44)
 4900      IF FNexists(filename$) THEN
 4910        PROCerror("A backdrop with the filename '"+filename$+"' already exists","",2)
 4920      ELSE
 4930        IF ?data%=77 THEN
 4940          PROCerror("You can only have 77 backdrops","",2)
 4950        ELSE
 4960          block%!36=-1
 4970          block%!12=block%!8
 4980          $(block%+44)="<Wimp$ScrapDir>.BackDrops."+filename$+CHR$0
 4990          !block%=256
 5000          block%!16=2
 5010          SYS "Wimp_SendMessage",17,block%,block%!4
 5020        ENDIF
 5030      ENDIF
 5040    ENDIF
 5050    
 5060    WHEN 3
 5070      IF block%!40=&FF9 THEN
 5080        filename$=FNCtrlTermString(block%+44)
 5090        IF (FNexists(FNleafname(filename$))) OR (?data%=77) THEN
 5100          IF ?data%=77 THEN
 5110            PROCerror("You can only have 77 backdrops","",2)
 5120          ELSE
 5130            PROCerror("A backdrop with the filename '"+FNleafname(filename$)+"' already exists","",2)
 5140          ENDIF
 5150          IF FNcaps(LEFT$(filename$,11))="<WIMP$SCRAP" THEN
 5160            SYS "XOS_CLI","Wipe "+filename$+" F R ~C ~V"
 5170          ENDIF
 5180        ELSE
 5190
 5200          REM load backdrop
 5210          SYS "Hourglass_On"
 5220            OSCLI "Copy "+filename$+" BackDrops:Sprites."+FNleafname(filename$)+" ~A ~C ~D F ~L ~N ~P ~Q ~R ~S ~T ~V"
 5230            ?data%+=1
 5240            name$=FNleafname(filename$)+CHR$10
 5250            IF LEN(name$)<11 THEN name$+=STRING$(11-LEN(name$),CHR$0)
 5260            $(data%+1+(?data%)*12)=name$
 5270            ?(data%+12+(?data%)*12)=1
 5280            PROCupdatelist
 5290          SYS "Hourglass_Off"
 5300
 5310          IF FNcaps(LEFT$(filename$,11))="<WIMP$SCRAP" THEN
 5320            SYS "XOS_CLI","Wipe "+filename$+" F R ~C ~V"
 5330          ENDIF
 5340          block%!12=block%!8
 5350          block%!16=4
 5360          SYS "Wimp_SendMessage",17,block%,block%!4
 5370        ENDIF
 5380      ENDIF
 5390    
 5400    WHEN &400C0
 5410      CASE block%!20 OF
 5420        WHEN ListMenu%:PROCsub_list
 5430        WHEN SelMenu%:PROCsub_sel
 5440      ENDCASE
 5450      SYS "Wimp_CreateSubMenu",,block%!20,block%!24,block%!28
 5460      
 5470ENDCASE
 5480ENDPROC
 5490:
 5500:
 5510DEFPROCsub_list
 5520LOCAL loop%,val%,str$,len%
 5530len%=7
 5540IF ?data%>0 THEN
 5550  FOR loop%=1 TO ?data%
 5560    str$=$(FNindiraddr(MainHandle%,loop%*3))
 5570    IF LEN(str$)+1>len% THENlen%=LEN(str$)+1
 5580    $(ListMenu%+64+24*loop%)=str$
 5590    val%=0
 5600    IF loop%=?data% THENval%=&80
 5610    IF data%?937=loop% THENval%+=1
 5620    !(ListMenu%+52+24*loop%)=val%
 5630  NEXT
 5640ENDIF
 5650IF data%?937=255 THEN ListMenu%!28=3 ELSE ListMenu%!28=2
 5660IF data%?937=0 THENval%=1 ELSEval%=0
 5670IF ?data%=0 THENval%+=&80
 5680ListMenu%!52=val%
 5690ListMenu%!16=len%*16
 5700ENDPROC
 5710:
 5720:
 5730DEFPROCsub_sel
 5740LOCAL str$,flags%
 5750IF MenuParent%=-1 THEN
 5760  str$="Selection"
 5770  SelMenu%!60=&7400121
 5780  SelMenu%!108=&7000121
 5790  SelMenu%!132=&7000121
 5800  SelMenu%!100=0
 5810  SelMenu%!124=2
 5820  SelMenu%!148=0
 5830  SelMenu%!172=0
 5840  SelMenu%!196=&80
 5850  flags%=&7000021
 5860ELSE
 5870  IF MenuParent%>-1 THEN
 5880    str$=MID$($(MainMenu%!64),11,LEN($(MainMenu%!64))-11)
 5890    IF MenuParent%=0 THEN SelMenu%!60=&7400121 ELSESelMenu%!60=&7000121:REM****
 5900    flags%=?(data%+12+MenuParent%*12)
 5910    IF MenuParent%=0 THEN flags%=(flags%OR(3<<6))
 5920    IF(flags%AND1)=1 THENSelMenu%!100=1:SelMenu%!124=2 ELSESelMenu%!100=0:SelMenu%!124=3
 5930    IF (flags%>>6)=1 THEN SelMenu%!148=1 ELSESelMenu%!148=0
 5940    IF (flags%>>6)>1 THEN SelMenu%!172=1 ELSESelMenu%!172=0
 5950    IF (flags%>>6)=0 THEN SelMenu%!196=&81 ELSESelMenu%!196=&80
 5960    SelMenu%!108=&7000121
 5970    SelMenu%!132=&7000121
 5980    IF MenuParent%=0 THENflags%=&7400021 ELSEflags%=&7000021
 5990  ELSE
 6000    SelMenu%!60=&7400121
 6010    SelMenu%!108=&7400121
 6020    SelMenu%!132=&7400121
 6030    SelMenu%!100=0:SelMenu%!124=2
 6040    SelMenu%!148=0:SelMenu%!176=0:SelMenu%!196=&80
 6050    str$="Backdrop"
 6060    flags%=&7400021
 6070  ENDIF
 6080ENDIF
 6090SelMenu%!36=flags%
 6100SelMenu%!84=flags%
 6110SelMenu%!156=flags%
 6120SelMenu%!180=flags%
 6130SelMenu%!204=flags%
 6140$SelMenu%=str$
 6150ENDPROC
 6160:
 6170:
 6180:
 6190:
 6200DEFFNCtrlTermString(addr%)
 6210LOCAL return$,ptr%
 6220ptr%=0:return$=""
 6230WHILE addr%?ptr%>31
 6240  return$+=CHR$(addr%?ptr%)
 6250  ptr%+=1
 6260ENDWHILE
 6270=return$
 6280:
 6290:
 6300DEFFNleafname(name$)
 6310WHILE INSTR(name$,".")
 6320  name$=MID$(name$,INSTR(name$,".")+1)
 6330ENDWHILE
 6340=name$
 6350:
 6360:
 6370DEFFNexists(name$)
 6380LOCAL min%,max%,pos%,str$,reply%
 6390min%=1
 6400max%=?data%
 6410reply%=FALSE
 6420WHILE min%<=max%
 6430  pos%=INT((min%+max%)/2)
 6440  str$=FNCtrlTermString(data%+1+pos%*12)
 6450  IF str$<name$ THENmin%=pos%+1
 6460  IF str$>name$ THENmax%=pos%-1
 6470  IF str$=name$ THENreply%=TRUE:max%=0
 6480ENDWHILE
 6490=reply%
 6500:
 6510:
 6520DEFFNcaps(str$)
 6530LOCAL reply$,loop%
 6540reply$=""
 6550FOR loop%=1 TO LEN(str$)
 6560  letter$=MID$(str$,loop%,1)
 6570  IF letter$>="a" AND letter$<="z" THEN letter$=CHR$(ASC(letter$)-32)
 6580  reply$+=letter$
 6590NEXT
 6600=reply$
 6610:
 6620:
 6630DEFFNindiraddr(window%,icon%)
 6640!temp%=window%:temp%!4=icon%
 6650SYS "Wimp_GetIconState",,temp%
 6660=temp%!28
 6670:
 6680:
 6690:
 6700:
 6710DEFPROCerror(text$,title$,flags%)
 6720!block%=0:$(block%+4)=text$
 6730SYS "Wimp_ReportError",block%,flags%,title$+"BackDrops"
 6740ENDPROC
 6750:
 6760:
 6770:
 6780:
 6790DEFPROCupdatelist
 6800LOCAL loop1%,loop2%,low1%,low2%,low3%,cur1%,cur2%,cur3%,swap%,pos%,loop%,offset%
 6810SYS "Hourglass_On"
 6820REM sort
 6830IF ?data%>1 THEN
 6840  FOR loop1%=1 TO (?data%)-1
 6850    swap%=FALSE
 6860    !temp%=!(data%+1+loop1%*12)
 6870    temp%!4=!(data%+5+loop1%*12)
 6880    temp%!8=!(data%+9+loop1%*12)
 6890    FOR loop2%=loop1%+1 TO ?data%
 6900      offset%=0
 6910      WHILE (?(data%+1+loop2%*12+offset%)=temp%?offset%) AND offset%<11
 6920        offset%+=1
 6930      ENDWHILE
 6940      IF ?(data%+1+loop2%*12+offset%)<temp%?offset% THEN
 6950        !temp%=!(data%+1+loop2%*12)
 6960        temp%!4=!(data%+5+loop2%*12)
 6970        temp%!8=!(data%+9+loop2%*12)
 6980        swap%=TRUE:pos%=loop2%
 6990      ENDIF
 7000    NEXT
 7010    IF swap% THEN
 7020      !(data%+1+pos%*12)=!(data%+1+loop1%*12)
 7030      !(data%+5+pos%*12)=!(data%+5+loop1%*12)
 7040      !(data%+9+pos%*12)=!(data%+9+loop1%*12)
 7050      !(data%+1+loop1%*12)=!temp%
 7060      !(data%+5+loop1%*12)=temp%!4
 7070      !(data%+9+loop1%*12)=temp%!8
 7080    ENDIF
 7090  NEXT
 7100ENDIF
 7110REM update window
 7120IF ?data%>0 THEN
 7130  FOR loop%=1 TO ?data%
 7140    $(FNindiraddr(MainHandle%,loop%*3))=FNCtrlTermString(data%+1+loop%*12)
 7150    $(FNindiraddr(MainHandle%,loop%*3+1))=type$((?(data%+12+loop%*12))>>6)
 7160    !temp%=MainHandle%
 7170    temp%!4=loop%*3+2
 7180    temp%!8=((?(data%+12+loop%*12))AND1)<<21
 7190    temp%!12=1<<21
 7200    SYS "Wimp_SetIconState",,temp%
 7210  NEXT
 7220ENDIF
 7230IF ?data%=0 THEN
 7240  IF NOT(Greyed1%) THEN
 7250    PROCdelicons(3,TRUE)
 7260    Greyed1%=TRUE
 7270  ENDIF
 7280ENDIF
 7290IF ?data%<=1 THEN
 7300  IF NOT(Greyed2%) THEN
 7310    PROCdelicons(6,TRUE)
 7320    Greyed2%=TRUE
 7330  ENDIF
 7340ENDIF
 7350IF ?data%>=2 THEN
 7360  IF Greyed2% THEN
 7370    PROCdelicons(6,FALSE)
 7380    Greyed2%=FALSE
 7390  ENDIF
 7400ENDIF
 7410IF ?data%>=1 THEN
 7420  IF Greyed1% THEN
 7430    PROCdelicons(3,FALSE)
 7440    Greyed1%=FALSE
 7450  ENDIF
 7460ENDIF
 7470!temp%=0
 7480temp%!4=-(44+(?data%)*48)
 7490temp%!8=400
 7500temp%!12=0
 7510SYS "Wimp_SetExtent",MainHandle%,temp%
 7520!temp%=MainHandle%
 7530SYS "Wimp_GetWindowState",,temp%
 7540IF ((temp%!32)AND(1<<16))=(1<<16) THEN SYS "Wimp_OpenWindow",,temp%
 7550SYS "Wimp_ForceRedraw",MainHandle%,0,-3740,400,0
 7560SYS "Hourglass_Off"
 7570ENDPROC
 7580:
 7590:
 7600DEFPROCdelicons(base%,del%)
 7610LOCAL icon%
 7620!temp%=MainHandle%
 7630IF del% THEN
 7640  temp%!8=1<<23
 7650ELSE
 7660  temp%!8=0
 7670ENDIF
 7680temp%!12=1<<23
 7690FOR icon%=base% TO base%+2
 7700  temp%!4=icon%
 7710  SYS "Wimp_SetIconState",,temp%
 7720NEXT
 7730ENDPROC
 7740:
 7750:
 7760:
 7770:
 7780DEFPROCdragfinished
 7790LOCAL start%,end%,loop%
 7800!temp%=MainHandle%
 7810SYS "Wimp_GetWindowState",,temp%
 7820start%=(temp%!16-temp%!24-block%!12)DIV48
 7830end%=(temp%!16-temp%!24-block%!4)DIV48
 7840IF adjustdrag% THEN temp%!12=0 ELSEtemp%!12=1<<21
 7850!temp%=MainHandle%
 7860temp%!8=1<<21
 7870IF start%>end% THEN SWAP start%,end%
 7880IF start%=0 THENstart%=1
 7890IF Greyed2% THENend%=1
 7900IF Greyed1% THENend%=0
 7910IF start%<=end% THEN
 7920  FOR loop%=start% TO end%
 7930    temp%!4=loop%*3
 7940    SYS "Wimp_SetIconState",,temp%
 7950  NEXT
 7960ENDIF
 7970ENDPROC

� BackDrops setup program
"� � Andrew J Booker (April 96)
'� Look here for bad programming ...
(:
2�:�0,�$+Þ:�
<	�init
F:
Pȕ � quit%
Z+  ș "Wimp_Poll",mask%,block% � reason%
d  Ȏ reason% �
n(    � 2:ș "Wimp_OpenWindow",,block%
x)    � 3:ș "Wimp_CloseWindow",,block%
�F    � 6:�mouseclick(!block%,block%!4,block%!8,block%!12,block%!16)
�    � 7:�dragfinished
�    � 9:�menusel
�#    � 17,18:�message(block%!16)
�  �
��
�,� "Save BackDrops:Data "+�~data%+" +3AA"
�"� "SetType BackDrops:Data FFD"
�;ș "XOS_CLI","Wipe <Wimp$ScrapDir>.BackDrops F R ~C ~V"
�ș "Wimp_CloseDown"
��
�:
�
��init
C� task% 4,list% 15,block% 11250,temp% 319,indir% 3750,drag% 127
endindir%=indir%+3750
� type$(3)
"0type$()="Tiled","Scaled","Centred","Centred"
,$task%="TASK"
60!list%=1:list%!4=3:list%!8=&400C0:list%!12=0
@quit%=�
JGreyed1%=�
TGreyed2%=�
^MenuOpen%=-1
hmask%=0
r;ș "Wimp_Initialise",300,!task%,"BackDrops Setup",list%
|:
�9ș "Wimp_OpenTemplate",,"<BackDropSet$Dir>.Templates"
�Pș "Wimp_LoadTemplate",,block%,indir%,endindir%,-1,"info",0 � ,,indir%,,,,r6
�0ș "Wimp_CreateWindow",,block% � InfoHandle%
�@ș "Wimp_LoadTemplate",,block%,indir%,endindir%,-1,"main",r6
�0ș "Wimp_CreateWindow",,block% � MainHandle%
�ș "Wimp_CloseTemplate"
�:
�� IconMenu% 27+24*2
�@$IconMenu%="BackDrops":IconMenu%!12=&70207:IconMenu%!16=7*16
�"IconMenu%!20=44:IconMenu%!24=0
�AIconMenu%!28=0:IconMenu%!32=InfoHandle%:IconMenu%!36=&7000021
�$(IconMenu%+40)="Info"
�9IconMenu%!52=&80:IconMenu%!56=0:IconMenu%!60=&7000021
$(IconMenu%+64)="Quit"
:
� TypeMenu% 27+24*3
&A$TypeMenu%="SpriteName":TypeMenu%!12=&70207:TypeMenu%!16=8*16
0"TypeMenu%!20=44:TypeMenu%!24=0
:PTypeMenu%!28=0:TypeMenu%!32=0:TypeMenu%!36=&7000021:$(TypeMenu%+40)="Scaled"
DQTypeMenu%!52=0:TypeMenu%!56=0:TypeMenu%!60=&7000021:$(TypeMenu%+64)="Centred"
NQTypeMenu%!76=&80:TypeMenu%!80=0:TypeMenu%!84=&7000021:$(TypeMenu%+88)="Tiled"
X:
b� SelMenu% 27+24*8,A% 13
l?$SelMenu%="SpriteName":SelMenu%!12=&70207:SelMenu%!16=18*16
v SelMenu%!20=44:SelMenu%!24=0
�JSelMenu%!28=0:SelMenu%!32=0:SelMenu%!36=&7000021:$(SelMenu%+40)="View"
�CSelMenu%!52=0:SelMenu%!56=0:SelMenu%!60=&7000121:SelMenu%!64=A%
�5SelMenu%!68=-1:SelMenu%!72=14:$A%="Make backdrop"
�LSelMenu%!76=2:SelMenu%!80=0:SelMenu%!84=&7000021:$(SelMenu%+88)="Delete"
�� A% 17
�GSelMenu%!100=0:SelMenu%!104=0:SelMenu%!108=&7000121:SelMenu%!112=A%
�;SelMenu%!116=-1:SelMenu%!120=18:$A%="Include in random"
�� A% 13
�GSelMenu%!124=2:SelMenu%!128=0:SelMenu%!132=&7000121:SelMenu%!136=A%
�7SelMenu%!140=-1:SelMenu%!144=14:$A%="Don't include"
�PSelMenu%!148=0:SelMenu%!152=0:SelMenu%!156=&7000021:$(SelMenu%+160)="Scaled"
�QSelMenu%!172=0:SelMenu%!176=0:SelMenu%!180=&7000021:$(SelMenu%+184)="Centred"
�QSelMenu%!196=&80:SelMenu%!200=0:SelMenu%!204=&7000021:$(SelMenu%+208)="Tiled"
:
� ListMenu% 27+24*79
>$ListMenu%="Startup":ListMenu%!12=&70207:ListMenu%!16=7*16
 "ListMenu%!20=44:ListMenu%!24=0
*� A%=0 � 78
4!(ListMenu%+32+24*A%)=0
>"!(ListMenu%+36+24*A%)=&7000021
H�
R$(ListMenu%+40)="Random"
\$(ListMenu%+64)="(None)"
f:
p� MainMenu% 28+24*2:� A% 21
z@$MainMenu%="BackDrops":MainMenu%!12=&70207:MainMenu%!16=8*16
�"MainMenu%!20=44:MainMenu%!24=0
�?MainMenu%!28=8:MainMenu%!32=ListMenu%:MainMenu%!36=&7000021
�$(MainMenu%+40)="Startup"
�@MainMenu%!52=&98:MainMenu%!56=SelMenu%:MainMenu%!60=&7000121
�3MainMenu%!64=A%:MainMenu%!68=-1:MainMenu%!72=22
�:
�� data% 78*12+1
�$� "Load BackDrops:Data "+�~data%
��updatelist
�:
�!block%=-1
�3block%!4=0:block%!8=0:block%!12=68:block%!16=68
�-block%!20=&3002:$(block%+24)="!backsetup"
.ș "Wimp_CreateIcon",,block% � IconHandle%
�
:
$:
.:
8:
B.��mouseclick(x%,y%,buttons%,window%,icon%)
LI� pos%,loop%,offset%,ox%,oy%,minx%,maxx%,miny%,maxy%,sel%,xeig%,yeig%
VȎ window% �
`
  � -2
j  � buttons%=2 �
tI    ș "Wimp_CreateMenu",,IconMenu%,x%-64,94+44*2:MenuOpen%=IconMenu%
~  �
�#    � buttons%=1 � buttons%=4 �
�<      !temp%=MainHandle%:ș "Wimp_GetWindowState",,temp%
�      temp%!28=-1
�&      � centre if not already open
�$      � ((temp%!32)�(1<<16))=0 �
�1        ș "OS_ReadModeVariable",-1,11 � ,,x%
�1        ș "OS_ReadModeVariable",-1,12 � ,,y%
�3        ș "OS_ReadModeVariable",-1,4 � ,,xeig%
�3        ș "OS_ReadModeVariable",-1,5 � ,,yeig%
�1        x%=((x%+1)<<xeig%):y%=((y%+1)<<yeig%)
�         temp%!8=temp%!16-284
�         temp%!12=temp%!4+400
(        x%=(x%-(temp%!12-temp%!4))�2

(        y%=(y%-(temp%!16-temp%!8))�2
*        temp%!12=x%+(temp%!12-temp%!4)
        temp%!4=x%
(*        temp%!16=y%+(temp%!16-temp%!8)
2        temp%!8=y%
<!        temp%!20=0:temp%!24=0
F      �
P%      ș "Wimp_OpenWindow",,temp%
Z	    �
d  �
n  
x  � MainHandle%
�    Ȏ buttons% �
�    � 2
�?      ș "Wimp_WhichIcon",MainHandle%,temp%,&bf0000,&210000
�      � !temp%=-1 �
�        !temp%=MainHandle%
�+        ș "Wimp_GetWindowState",,temp%
�0        !temp%=((temp%!16-y%-temp%!24)�48)*3
�        temp%!4=-1
�      �
�      � temp%!4=-1 �
�B        � �(((Greyed1% � !temp%=3) � (Greyed2% � !temp%=6))) �
�&          MenuParent%=((!temp%)�3)
�E          str$="Backdrop '"+$(�indiraddr(MainHandle%,!temp%))+"'"
"          $(MainMenu%!64)=str$
)          MainMenu%!16=(�(str$)+1)*16
#          MainMenu%!60=&7000121
"
        �
,          MenuParent%=-2
6(          $(MainMenu%!64)="Backdrop"
@          MainMenu%!16=9*16
J#          MainMenu%!60=&7400121
T
        �
^      �
h:        $(MainMenu%!64)="Selection":MainMenu%!16=10*16
r!        MainMenu%!60=&7000121
|        MenuParent%=-1
�      �
�2      ș "Wimp_CreateMenu",,MainMenu%,x%-64,y%
�      MenuOpen%=MainMenu%
�    
�    � 16,64
�$      � icon%=-1 � buttons%=64 �
�      !temp%=MainHandle%
�#      � icon%=0 � (?data%)*3 �3
�        temp%!4=icon%
�)        ș "Wimp_GetIconState",,temp%
�c        � ((temp%!24)�(1<<21))=(1<<21) � temp%!8=0:temp%!12=1<<21:ș "Wimp_SetIconState",,temp%
�      �
�      �
6      � buttons%=64 � adjustdrag%=� �adjustdrag%=�
      � (icon% � 3)=0�
        !temp%=MainHandle%
&        temp%!4=icon%
0        temp%!8=1<<21
:        temp%!12=0
D)        ș "Wimp_SetIconState",,temp%
N      �
X<      !temp%=MainHandle%:ș "Wimp_GetWindowState",,temp%
b      ox%=temp%!4-temp%!20
l      oy%=temp%!16-temp%!24
v      � x%-ox%<174 �
�'        dragx%=x%-ox%:dragy%=y%-oy%
�        drag%!4=6
�"        drag%!8=x%:drag%!16=x%
�#        drag%!12=y%:drag%!20=y%
�        minx%=ox%
�$        miny%=oy%-44-(?data%)*48
�%        � ?data%<2 �miny%=oy%-140
�        maxx%=ox%+174
�        maxy%=oy%-48
�*        � temp%!8>miny% �miny%=temp%!8
�,        � temp%!12<maxx% �maxx%=temp%!12
�,        � temp%!16<maxy% �maxy%=temp%!16
�        drag%!24=minx%
        drag%!28=miny%
        drag%!32=maxx%
        drag%!36=maxy%
 $        ș "Wimp_DragBox",,drag%
*      �
4    
>	    
H      � (icon% � 3)=1 �
R'        � Scaled/Centred/Tiled menu
\9        $TypeMenu%=$(�indiraddr(MainHandle%,icon%-1))
f1        Ȏ $(�indiraddr(MainHandle%,icon%)) �
p          � "Scaled":pos%=1
z           � "Centred":pos%=2
�          � "Tiled":pos%=3
�
        �
�        � loop%=1 � 3
�           offset%=4+24*loop%
�          � loop%=pos% �
�9            TypeMenu%!offset%=((TypeMenu%!offset%)�1)
�          �
�<            TypeMenu%!offset%=((TypeMenu%!offset%)�(�1))
�          �
�
        �
�4        ș "Wimp_CreateMenu",,TypeMenu%,x%-64,y%
�3        MenuOpen%=TypeMenu%:MenuParent%=icon%�3
�      �
	
      
	      � (icon% � 3)=2 �
	        !temp%=MainHandle%
	$        temp%!4=icon%
	.)        ș "Wimp_GetIconState",,temp%
	8+        sel%=(((temp%!24)�(1<<21))>>21)
	BM        ?(data%+12+(icon%�3)*12)=(((?(data%+12+(icon%�3)*12))�(�1))+sel%)
	L      �
	V	    �
	`        
	j�
	t�
	~:
	�:
	�:
	�:
	�
��menusel
	�� val%,addr%,adjust%
	�#ș "Wimp_GetPointerInfo",,temp%
	�%� temp%!8=1 �adjust%=� �adjust%=�
	�Ȏ MenuOpen% �
	�  � IconMenu%
	�    � !block%=1 �quit%=�
	�
	�  � TypeMenu%
    val%=(((!block%)+1)�3)

%    addr%=data%+12+MenuParent%*12
-    ?addr%=(((?addr%)�%111111)�(val%<<6))
>    $(�indiraddr(MainHandle%,MenuParent%*3+1))=type$(val%)
(G    !temp%=MainHandle%:temp%!4=MenuParent%*3+1:temp%!8=0:temp%!12=0
2%    ș "Wimp_SetIconState",,temp%
<  
F  � MainMenu%
P    Ȏ !block% �
Z    � 0:�menu_startup
d    � 1:�menu_sel
n	    �
x    
��
�.� adjust% �ș "Wimp_CreateMenu",,MenuOpen%
��
�:
�:
���menu_startup
�� sel%,old%
�sel%=block%!4
�� sel%>-1 �
�  old%=data%?937
�  � old%=255 �old%=-1
�
  old%+=1
�>  !(ListMenu%+28+old%*24)=((!(ListMenu%+28+old%*24))�(�1))
;  !(ListMenu%+28+sel%*24)=((!(ListMenu%+28+sel%*24))�1)

  sel%-=1
  � sel%=-1 �sel%=255
"  data%?937=sel%
,�
6�
@:
J:
T��menu_sel
^
� sel%
hsel%=block%!4
r+� double check if everything greyed out
|� MenuParent%>-2 �
�
Ȏ sel% �
�#  � 0:�menu_viewbd(MenuParent%)
�#  � 1:�menu_makebd(MenuParent%)
�%  � 2:�menu_deletebd(MenuParent%)
�&  � 3:�menu_incrandom(MenuParent%)
�&  � 4:�menu_notrandom(MenuParent%)
�#  � 5:�menu_scaled(MenuParent%)
�$  � 6:�menu_centred(MenuParent%)
�"  � 7:�menu_tiled(MenuParent%)
��
��
��
�:
:
H��getsellist:ș "Wimp_WhichIcon",MainHandle%,temp%,&7f0000,&210000:�
:
&:
0��menu_viewbd(no%)
:
� offset%
D2� no%=-1 ��getsellist �!temp%=no%*3:temp%!4=-1
N
offset%=0
Xș "Hourglass_On"
bȕ (temp%!offset%)>-1
lQ  � "Filer_Run BackDrops:Sprites."+�CtrlTermString(data%+1+(temp%!offset%)*4)
v  offset%+=4
��
�ș "Hourglass_Off"
��
�:
�:
���menu_makebd(no%)
�
� str$
�ș "Hourglass_On"
�
� no%=0 �
�  � remove backdrop???
��
�$  Ȏ ((?(data%+12+no%*12))>>6) �
�    � 0:str$="-tile"

    � 1:str$="-scale"

    :str$="-centre"

  �

 N  � "BackDrop "+str$+" BackDrops:Sprites."+�CtrlTermString(data%+1+no%*12)

*�

4ș "Hourglass_Off"

>�

H:

R:

\��menu_deletebd(no%)

f� offset%,loop%:offset%=0

pș "Hourglass_On"

z2� no%=-1 ��getsellist �!temp%=no%*3:temp%!4=-1

�ȕ (temp%!offset%)>-1

�)  no%=((temp%!offset%)�3)-(offset%�4)

�Y  ș "XOS_CLI","Wipe BackDrops:Sprites."+�CtrlTermString(data%+no%*12+1)+" F R ~C ~V"

�  � no%<?data% �

�    � loop%=no% � ?data%-1

�2      !(data%+loop%*12+1)=!(data%+loop%*12+13)

�2      !(data%+loop%*12+5)=!(data%+loop%*12+17)

�2      !(data%+loop%*12+9)=!(data%+loop%*12+21)

�	    �

�  �

�  !(data%+(?data%)*12+1)=10

�  !(data%+(?data%)*12+5)=0

�  !(data%+(?data%)*12+9)=0
  ?data%-=1
  offset%+=4
�
$�updatelist
.!temp%=MainHandle%
8� loop%=0 � 231 �3
B  temp%!4=loop%
L#  ș "Wimp_GetIconState",,temp%
V]  � ((temp%!24)�(1<<21))=(1<<21) � temp%!8=0:temp%!12=1<<21:ș "Wimp_SetIconState",,temp%
`�
jBSelMenu%!36=&7400021:SelMenu%!60=&7400121:SelMenu%!84=&7400021
tESelMenu%!108=&7400121:SelMenu%!132=&7400121:SelMenu%!156=&7400021
~/SelMenu%!180=&7400021:SelMenu%!204=&7400021
�PSelMenu%!100=0:SelMenu%!124=2:SelMenu%!148=0:SelMenu%!176=0:SelMenu%!196=&80
�3$SelMenu%="Backdrop":$(MainMenu%!64)="Backdrop"
�MainMenu%!16=9*16
�MainMenu%!60=&7400121
�MenuParent%=-2
�ș "Hourglass_Off"
��
�:
�:
���menu_incrandom(no%)
�
� offset%
�2� no%=-1 ��getsellist �!temp%=no%*3:temp%!4=-1

offset%=0

ȕ (temp%!offset%)>-1
#  �makeinc((temp%!offset%)�3,1)
  offset%+=4
(�
2� no%>-1 �
<  SelMenu%!100=1
F  SelMenu%!124=2
P�
Z�
d:
n��menu_notrandom(no%)
x
� offset%
�2� no%=-1 ��getsellist �!temp%=no%*3:temp%!4=-1
�
offset%=0
�ȕ (temp%!offset%)>-1
�#  �makeinc((temp%!offset%)�3,0)
�  offset%+=4
��
�� no%>-1 �
�  SelMenu%!100=0
�  SelMenu%!124=3
��
��
�:
���makeinc(addr%,flag%)
!block%=MainHandle%
block%!4=addr%*3+2
block%!8=flag%<<21
"block%!12=1<<21
,"ș "Wimp_SetIconState",,block%
6addr%=data%+12+addr%*12
@"?addr%=(((?addr%)�(�1))�flag%)
J�
T:
^:
h��menu_scaled(no%)
r
� offset%
|2� no%=-1 ��getsellist �!temp%=no%*3:temp%!4=-1
�
offset%=0
�ȕ (temp%!offset%)>-1
�$  �maketype((temp%!offset%)�3,1)
�  offset%+=4
��
�� no%>-1 �
�  SelMenu%!148=1
�  SelMenu%!172=0
�  SelMenu%!196=&80
��
��
�:
���menu_centred(no%)

� offset%
2� no%=-1 ��getsellist �!temp%=no%*3:temp%!4=-1

offset%=0
&ȕ (temp%!offset%)>-1
0$  �maketype((temp%!offset%)�3,2)
:  offset%+=4
D�
N� no%>-1 �
X  SelMenu%!148=0
b  SelMenu%!172=1
l  SelMenu%!196=&80
v�
��
�:
���menu_tiled(no%)
�
� offset%
�2� no%=-1 ��getsellist �!temp%=no%*3:temp%!4=-1
�
offset%=0
�ȕ (temp%!offset%)>-1
�$  �maketype((temp%!offset%)�3,0)
�  offset%+=4
��
�� no%>-1 �
�  SelMenu%!148=0
�  SelMenu%!172=0
  SelMenu%!196=&81
�
�
 :
*��maketype(addr%,type%)
4!block%=MainHandle%
>block%!4=addr%*3+1
H"ș "Wimp_GetIconState",,block%
R$(block%!28)=type$(type%)
\block%!8=0:block%!12=0
f"ș "Wimp_SetIconState",,block%
ptype%=(type%<<6)
zaddr%=data%+12+addr%*12
� ?addr%=(((?addr%)�63)+type%)
��
��
�:
�:
�:
�:
���message(mess%)
�� filename$,name$
�Ȏ mess% �
�	  � 0
�    quit%=�
�  
	  � 1
    � block%!40=&FF9 �
.      filename$=�CtrlTermString(block%+44)
$       � �exists(filename$) �
.V        �error("A backdrop with the filename '"+filename$+"' already exists","",2)
8      �
B        � ?data%=77 �
L;          �error("You can only have 77 backdrops","",2)
V
        �
`          block%!36=-1
j           block%!12=block%!8
tD          $(block%+44)="<Wimp$ScrapDir>.BackDrops."+filename$+�0
~          !block%=256
�          block%!16=2
�6          ș "Wimp_SendMessage",17,block%,block%!4
�
        �
�      �
�	    �
�    
�    � 3
�      � block%!40=&FF9 �
�0        filename$=�CtrlTermString(block%+44)
�=        � (�exists(�leafname(filename$))) � (?data%=77) �
�          � ?data%=77 �
�=            �error("You can only have 77 backdrops","",2)
          �

e            �error("A backdrop with the filename '"+�leafname(filename$)+"' already exists","",2)
          �
5          � �caps(�filename$,11))="<WIMP$SCRAP" �
(;            ș "XOS_CLI","Wipe "+filename$+" F R ~C ~V"
2          �
<
        �
F
P          � load backdrop
Z          ș "Hourglass_On"
dt            � "Copy "+filename$+" BackDrops:Sprites."+�leafname(filename$)+" ~A ~C ~D F ~L ~N ~P ~Q ~R ~S ~T ~V"
n            ?data%+=1
x.            name$=�leafname(filename$)+�10
�7            � �(name$)<11 � name$+=�11-�(name$),�0)
�,            $(data%+1+(?data%)*12)=name$
�)            ?(data%+12+(?data%)*12)=1
�            �updatelist
�           ș "Hourglass_Off"
�
�5          � �caps(�filename$,11))="<WIMP$SCRAP" �
�;            ș "XOS_CLI","Wipe "+filename$+" F R ~C ~V"
�          �
�           block%!12=block%!8
�          block%!16=4
�6          ș "Wimp_SendMessage",17,block%,block%!4
�
        �
      �
    
    � &400C0
"      Ȏ block%!20 �
,!        � ListMenu%:�sub_list
6        � SelMenu%:�sub_sel
@      �
J@      ș "Wimp_CreateSubMenu",,block%!20,block%!24,block%!28
T
      
^�
h�
r:
|:
���sub_list
�� loop%,val%,str$,len%
�
len%=7
�� ?data%>0 �
�  � loop%=1 � ?data%
�/    str$=$(�indiraddr(MainHandle%,loop%*3))
�(    � �(str$)+1>len% �len%=�(str$)+1
�%    $(ListMenu%+64+24*loop%)=str$
�    val%=0
�     � loop%=?data% �val%=&80
�"    � data%?937=loop% �val%+=1
�%    !(ListMenu%+52+24*loop%)=val%
�  �
�
5� data%?937=255 � ListMenu%!28=3 � ListMenu%!28=2
!� data%?937=0 �val%=1 �val%=0
&� ?data%=0 �val%+=&80
0ListMenu%!52=val%
:ListMenu%!16=len%*16
D�
N:
X:
b
��sub_sel
l� str$,flags%
v� MenuParent%=-1 �
�  str$="Selection"
�  SelMenu%!60=&7400121
�  SelMenu%!108=&7000121
�  SelMenu%!132=&7000121
�  SelMenu%!100=0
�  SelMenu%!124=2
�  SelMenu%!148=0
�  SelMenu%!172=0
�  SelMenu%!196=&80
�  flags%=&7000021
��
�  � MenuParent%>-1 �
�7    str$=�$(MainMenu%!64),11,�($(MainMenu%!64))-11)
J    � MenuParent%=0 � SelMenu%!60=&7400121 �SelMenu%!60=&7000121:�****
)    flags%=?(data%+12+MenuParent%*12)
0    � MenuParent%=0 � flags%=(flags%�(3<<6))
 S    �(flags%�1)=1 �SelMenu%!100=1:SelMenu%!124=2 �SelMenu%!100=0:SelMenu%!124=3
*8    � (flags%>>6)=1 � SelMenu%!148=1 �SelMenu%!148=0
48    � (flags%>>6)>1 � SelMenu%!172=1 �SelMenu%!172=0
><    � (flags%>>6)=0 � SelMenu%!196=&81 �SelMenu%!196=&80
H    SelMenu%!108=&7000121
R    SelMenu%!132=&7000121
\9    � MenuParent%=0 �flags%=&7400021 �flags%=&7000021
f  �
p    SelMenu%!60=&7400121
z    SelMenu%!108=&7400121
�    SelMenu%!132=&7400121
�%    SelMenu%!100=0:SelMenu%!124=2
�6    SelMenu%!148=0:SelMenu%!176=0:SelMenu%!196=&80
�    str$="Backdrop"
�    flags%=&7400021
�  �
��
�SelMenu%!36=flags%
�SelMenu%!84=flags%
�SelMenu%!156=flags%
�SelMenu%!180=flags%
�SelMenu%!204=flags%
�$SelMenu%=str$
�
:
:
$:
.:
8ݤCtrlTermString(addr%)
B� return$,ptr%
Lptr%=0:return$=""
Vȕ addr%?ptr%>31
`  return$+=�(addr%?ptr%)
j
  ptr%+=1
t�
~=return$
�:
�:
�ݤleafname(name$)
�ȕ �name$,".")
�!  name$=�name$,�name$,".")+1)
��
�
=name$
�:
�:
�ݤexists(name$)
� � min%,max%,pos%,str$,reply%
�
min%=1
max%=?data%

reply%=�
ȕ min%<=max%
  pos%=�((min%+max%)/2)
(+  str$=�CtrlTermString(data%+1+pos%*12)
2  � str$<name$ �min%=pos%+1
<  � str$>name$ �max%=pos%-1
F#  � str$=name$ �reply%=�:max%=0
P�
Z=reply%
d:
n:
xݤcaps(str$)
�� reply$,loop%
�
reply$=""
�� loop%=1 � �(str$)
�  letter$=�str$,loop%,1)
�>  � letter$>="a" � letter$<="z" � letter$=�(�(letter$)-32)
�  reply$+=letter$
��
�=reply$
�:
�:
�ݤindiraddr(window%,icon%)
� !temp%=window%:temp%!4=icon%
�!ș "Wimp_GetIconState",,temp%

=temp%!28
:
:
":
,:
6 ��error(text$,title$,flags%)
@!block%=0:$(block%+4)=text$
J:ș "Wimp_ReportError",block%,flags%,title$+"BackDrops"
T�
^:
h:
r:
|:
���updatelist
�P� loop1%,loop2%,low1%,low2%,low3%,cur1%,cur2%,cur3%,swap%,pos%,loop%,offset%
�ș "Hourglass_On"
�
� sort
�� ?data%>1 �
�  � loop1%=1 � (?data%)-1
�    swap%=�
�#    !temp%=!(data%+1+loop1%*12)
�$    temp%!4=!(data%+5+loop1%*12)
�$    temp%!8=!(data%+9+loop1%*12)
�"    � loop2%=loop1%+1 � ?data%
�      offset%=0
�F      ȕ (?(data%+1+loop2%*12+offset%)=temp%?offset%) � offset%<11
        offset%+=1
      �
8      � ?(data%+1+loop2%*12+offset%)<temp%?offset% �
&'        !temp%=!(data%+1+loop2%*12)
0(        temp%!4=!(data%+5+loop2%*12)
:(        temp%!8=!(data%+9+loop2%*12)
D        swap%=�:pos%=loop2%
N      �
X	    �
b    � swap% �
l1      !(data%+1+pos%*12)=!(data%+1+loop1%*12)
v1      !(data%+5+pos%*12)=!(data%+5+loop1%*12)
�1      !(data%+9+pos%*12)=!(data%+9+loop1%*12)
�%      !(data%+1+loop1%*12)=!temp%
�&      !(data%+5+loop1%*12)=temp%!4
�&      !(data%+9+loop1%*12)=temp%!8
�	    �
�  �
��
�� update window
�� ?data%>0 �
�  � loop%=1 � ?data%
�L    $(�indiraddr(MainHandle%,loop%*3))=�CtrlTermString(data%+1+loop%*12)
�M    $(�indiraddr(MainHandle%,loop%*3+1))=type$((?(data%+12+loop%*12))>>6)
�    !temp%=MainHandle%
    temp%!4=loop%*3+2
.    temp%!8=((?(data%+12+loop%*12))�1)<<21
    temp%!12=1<<21
 %    ș "Wimp_SetIconState",,temp%
*  �
4�
>� ?data%=0 �
H  � �(Greyed1%) �
R    �delicons(3,�)
\    Greyed1%=�
f  �
p�
z� ?data%<=1 �
�  � �(Greyed2%) �
�    �delicons(6,�)
�    Greyed2%=�
�  �
��
�� ?data%>=2 �
�  � Greyed2% �
�    �delicons(6,�)
�    Greyed2%=�
�  �
��
�� ?data%>=1 �
�  � Greyed1% �
    �delicons(3,�)
    Greyed1%=�
  �
$�
.!temp%=0
8temp%!4=-(44+(?data%)*48)
Btemp%!8=400
Ltemp%!12=0
V)ș "Wimp_SetExtent",MainHandle%,temp%
`!temp%=MainHandle%
j#ș "Wimp_GetWindowState",,temp%
t@� ((temp%!32)�(1<<16))=(1<<16) � ș "Wimp_OpenWindow",,temp%
~3ș "Wimp_ForceRedraw",MainHandle%,0,-3740,400,0
�ș "Hourglass_Off"
��
�:
�:
���delicons(base%,del%)
�� icon%
�!temp%=MainHandle%
�� del% �
�  temp%!8=1<<23
��
�  temp%!8=0
��
temp%!12=1<<23

� icon%=base% � base%+2
  temp%!4=icon%
#  ș "Wimp_SetIconState",,temp%
(�
2�
<:
F:
P:
Z:
d��dragfinished
n� start%,end%,loop%
x!temp%=MainHandle%
�#ș "Wimp_GetWindowState",,temp%
�+start%=(temp%!16-temp%!24-block%!12)�48
�(end%=(temp%!16-temp%!24-block%!4)�48
�.� adjustdrag% � temp%!12=0 �temp%!12=1<<21
�!temp%=MainHandle%
�temp%!8=1<<21
�"� start%>end% � Ȕ start%,end%
�� start%=0 �start%=1
�� Greyed2% �end%=1
�� Greyed1% �end%=0
�� start%<=end% �
�  � loop%=start% � end%
�    temp%!4=loop%*3
%    ș "Wimp_SetIconState",,temp%
  �
�
"�
�
00000000  0d 00 0a 1d f4 20 42 61  63 6b 44 72 6f 70 73 20  |..... BackDrops |
00000010  73 65 74 75 70 20 70 72  6f 67 72 61 6d 0d 00 14  |setup program...|
00000020  22 f4 20 a9 20 41 6e 64  72 65 77 20 4a 20 42 6f  |". . Andrew J Bo|
00000030  6f 6b 65 72 20 28 41 70  72 69 6c 20 39 36 29 0d  |oker (April 96).|
00000040  00 1e 27 f4 20 4c 6f 6f  6b 20 68 65 72 65 20 66  |..'. Look here f|
00000050  6f 72 20 62 61 64 20 70  72 6f 67 72 61 6d 6d 69  |or bad programmi|
00000060  6e 67 20 2e 2e 2e 0d 00  28 05 3a 0d 00 32 14 ee  |ng .....(.:..2..|
00000070  85 ee 85 87 3a 85 30 2c  f6 24 2b c3 9e 3a e0 0d  |....:.0,.$+..:..|
00000080  00 3c 09 f2 69 6e 69 74  0d 00 46 05 3a 0d 00 50  |.<..init..F.:..P|
00000090  0e c8 95 20 ac 20 71 75  69 74 25 0d 00 5a 2b 20  |... . quit%..Z+ |
000000a0  20 c8 99 20 22 57 69 6d  70 5f 50 6f 6c 6c 22 2c  | .. "Wimp_Poll",|
000000b0  6d 61 73 6b 25 2c 62 6c  6f 63 6b 25 20 b8 20 72  |mask%,block% . r|
000000c0  65 61 73 6f 6e 25 0d 00  64 12 20 20 c8 8e 20 72  |eason%..d.  .. r|
000000d0  65 61 73 6f 6e 25 20 ca  0d 00 6e 28 20 20 20 20  |eason% ...n(    |
000000e0  c9 20 32 3a c8 99 20 22  57 69 6d 70 5f 4f 70 65  |. 2:.. "Wimp_Ope|
000000f0  6e 57 69 6e 64 6f 77 22  2c 2c 62 6c 6f 63 6b 25  |nWindow",,block%|
00000100  0d 00 78 29 20 20 20 20  c9 20 33 3a c8 99 20 22  |..x)    . 3:.. "|
00000110  57 69 6d 70 5f 43 6c 6f  73 65 57 69 6e 64 6f 77  |Wimp_CloseWindow|
00000120  22 2c 2c 62 6c 6f 63 6b  25 0d 00 82 46 20 20 20  |",,block%...F   |
00000130  20 c9 20 36 3a f2 6d 6f  75 73 65 63 6c 69 63 6b  | . 6:.mouseclick|
00000140  28 21 62 6c 6f 63 6b 25  2c 62 6c 6f 63 6b 25 21  |(!block%,block%!|
00000150  34 2c 62 6c 6f 63 6b 25  21 38 2c 62 6c 6f 63 6b  |4,block%!8,block|
00000160  25 21 31 32 2c 62 6c 6f  63 6b 25 21 31 36 29 0d  |%!12,block%!16).|
00000170  00 8c 19 20 20 20 20 c9  20 37 3a f2 64 72 61 67  |...    . 7:.drag|
00000180  66 69 6e 69 73 68 65 64  0d 00 96 14 20 20 20 20  |finished....    |
00000190  c9 20 39 3a f2 6d 65 6e  75 73 65 6c 0d 00 a0 23  |. 9:.menusel...#|
000001a0  20 20 20 20 c9 20 31 37  2c 31 38 3a f2 6d 65 73  |    . 17,18:.mes|
000001b0  73 61 67 65 28 62 6c 6f  63 6b 25 21 31 36 29 0d  |sage(block%!16).|
000001c0  00 aa 07 20 20 cb 0d 00  b4 05 ce 0d 00 be 2c ff  |...  .........,.|
000001d0  20 22 53 61 76 65 20 42  61 63 6b 44 72 6f 70 73  | "Save BackDrops|
000001e0  3a 44 61 74 61 20 22 2b  c3 7e 64 61 74 61 25 2b  |:Data "+.~data%+|
000001f0  22 20 2b 33 41 41 22 0d  00 c8 22 ff 20 22 53 65  |" +3AA"...". "Se|
00000200  74 54 79 70 65 20 42 61  63 6b 44 72 6f 70 73 3a  |tType BackDrops:|
00000210  44 61 74 61 20 46 46 44  22 0d 00 d2 3b c8 99 20  |Data FFD"...;.. |
00000220  22 58 4f 53 5f 43 4c 49  22 2c 22 57 69 70 65 20  |"XOS_CLI","Wipe |
00000230  3c 57 69 6d 70 24 53 63  72 61 70 44 69 72 3e 2e  |<Wimp$ScrapDir>.|
00000240  42 61 63 6b 44 72 6f 70  73 20 46 20 52 20 7e 43  |BackDrops F R ~C|
00000250  20 7e 56 22 0d 00 dc 17  c8 99 20 22 57 69 6d 70  | ~V"...... "Wimp|
00000260  5f 43 6c 6f 73 65 44 6f  77 6e 22 0d 00 e6 05 e0  |_CloseDown".....|
00000270  0d 00 f0 05 3a 0d 00 fa  0a dd f2 69 6e 69 74 0d  |....:......init.|
00000280  01 04 43 de 20 74 61 73  6b 25 20 34 2c 6c 69 73  |..C. task% 4,lis|
00000290  74 25 20 31 35 2c 62 6c  6f 63 6b 25 20 31 31 32  |t% 15,block% 112|
000002a0  35 30 2c 74 65 6d 70 25  20 33 31 39 2c 69 6e 64  |50,temp% 319,ind|
000002b0  69 72 25 20 33 37 35 30  2c 64 72 61 67 25 20 31  |ir% 3750,drag% 1|
000002c0  32 37 0d 01 0e 19 65 6e  64 69 6e 64 69 72 25 3d  |27....endindir%=|
000002d0  69 6e 64 69 72 25 2b 33  37 35 30 0d 01 18 0e de  |indir%+3750.....|
000002e0  20 74 79 70 65 24 28 33  29 0d 01 22 30 74 79 70  | type$(3).."0typ|
000002f0  65 24 28 29 3d 22 54 69  6c 65 64 22 2c 22 53 63  |e$()="Tiled","Sc|
00000300  61 6c 65 64 22 2c 22 43  65 6e 74 72 65 64 22 2c  |aled","Centred",|
00000310  22 43 65 6e 74 72 65 64  22 0d 01 2c 11 24 74 61  |"Centred"..,.$ta|
00000320  73 6b 25 3d 22 54 41 53  4b 22 0d 01 36 30 21 6c  |sk%="TASK"..60!l|
00000330  69 73 74 25 3d 31 3a 6c  69 73 74 25 21 34 3d 33  |ist%=1:list%!4=3|
00000340  3a 6c 69 73 74 25 21 38  3d 26 34 30 30 43 30 3a  |:list%!8=&400C0:|
00000350  6c 69 73 74 25 21 31 32  3d 30 0d 01 40 0b 71 75  |list%!12=0..@.qu|
00000360  69 74 25 3d a3 0d 01 4a  0e 47 72 65 79 65 64 31  |it%=...J.Greyed1|
00000370  25 3d a3 0d 01 54 0e 47  72 65 79 65 64 32 25 3d  |%=...T.Greyed2%=|
00000380  a3 0d 01 5e 10 4d 65 6e  75 4f 70 65 6e 25 3d 2d  |...^.MenuOpen%=-|
00000390  31 0d 01 68 0b 6d 61 73  6b 25 3d 30 0d 01 72 3b  |1..h.mask%=0..r;|
000003a0  c8 99 20 22 57 69 6d 70  5f 49 6e 69 74 69 61 6c  |.. "Wimp_Initial|
000003b0  69 73 65 22 2c 33 30 30  2c 21 74 61 73 6b 25 2c  |ise",300,!task%,|
000003c0  22 42 61 63 6b 44 72 6f  70 73 20 53 65 74 75 70  |"BackDrops Setup|
000003d0  22 2c 6c 69 73 74 25 0d  01 7c 05 3a 0d 01 86 39  |",list%..|.:...9|
000003e0  c8 99 20 22 57 69 6d 70  5f 4f 70 65 6e 54 65 6d  |.. "Wimp_OpenTem|
000003f0  70 6c 61 74 65 22 2c 2c  22 3c 42 61 63 6b 44 72  |plate",,"<BackDr|
00000400  6f 70 53 65 74 24 44 69  72 3e 2e 54 65 6d 70 6c  |opSet$Dir>.Templ|
00000410  61 74 65 73 22 0d 01 90  50 c8 99 20 22 57 69 6d  |ates"...P.. "Wim|
00000420  70 5f 4c 6f 61 64 54 65  6d 70 6c 61 74 65 22 2c  |p_LoadTemplate",|
00000430  2c 62 6c 6f 63 6b 25 2c  69 6e 64 69 72 25 2c 65  |,block%,indir%,e|
00000440  6e 64 69 6e 64 69 72 25  2c 2d 31 2c 22 69 6e 66  |ndindir%,-1,"inf|
00000450  6f 22 2c 30 20 b8 20 2c  2c 69 6e 64 69 72 25 2c  |o",0 . ,,indir%,|
00000460  2c 2c 2c 72 36 0d 01 9a  30 c8 99 20 22 57 69 6d  |,,,r6...0.. "Wim|
00000470  70 5f 43 72 65 61 74 65  57 69 6e 64 6f 77 22 2c  |p_CreateWindow",|
00000480  2c 62 6c 6f 63 6b 25 20  b8 20 49 6e 66 6f 48 61  |,block% . InfoHa|
00000490  6e 64 6c 65 25 0d 01 a4  40 c8 99 20 22 57 69 6d  |ndle%...@.. "Wim|
000004a0  70 5f 4c 6f 61 64 54 65  6d 70 6c 61 74 65 22 2c  |p_LoadTemplate",|
000004b0  2c 62 6c 6f 63 6b 25 2c  69 6e 64 69 72 25 2c 65  |,block%,indir%,e|
000004c0  6e 64 69 6e 64 69 72 25  2c 2d 31 2c 22 6d 61 69  |ndindir%,-1,"mai|
000004d0  6e 22 2c 72 36 0d 01 ae  30 c8 99 20 22 57 69 6d  |n",r6...0.. "Wim|
000004e0  70 5f 43 72 65 61 74 65  57 69 6e 64 6f 77 22 2c  |p_CreateWindow",|
000004f0  2c 62 6c 6f 63 6b 25 20  b8 20 4d 61 69 6e 48 61  |,block% . MainHa|
00000500  6e 64 6c 65 25 0d 01 b8  1b c8 99 20 22 57 69 6d  |ndle%...... "Wim|
00000510  70 5f 43 6c 6f 73 65 54  65 6d 70 6c 61 74 65 22  |p_CloseTemplate"|
00000520  0d 01 c2 05 3a 0d 01 cc  17 de 20 49 63 6f 6e 4d  |....:..... IconM|
00000530  65 6e 75 25 20 32 37 2b  32 34 2a 32 0d 01 d6 40  |enu% 27+24*2...@|
00000540  24 49 63 6f 6e 4d 65 6e  75 25 3d 22 42 61 63 6b  |$IconMenu%="Back|
00000550  44 72 6f 70 73 22 3a 49  63 6f 6e 4d 65 6e 75 25  |Drops":IconMenu%|
00000560  21 31 32 3d 26 37 30 32  30 37 3a 49 63 6f 6e 4d  |!12=&70207:IconM|
00000570  65 6e 75 25 21 31 36 3d  37 2a 31 36 0d 01 e0 22  |enu%!16=7*16..."|
00000580  49 63 6f 6e 4d 65 6e 75  25 21 32 30 3d 34 34 3a  |IconMenu%!20=44:|
00000590  49 63 6f 6e 4d 65 6e 75  25 21 32 34 3d 30 0d 01  |IconMenu%!24=0..|
000005a0  ea 41 49 63 6f 6e 4d 65  6e 75 25 21 32 38 3d 30  |.AIconMenu%!28=0|
000005b0  3a 49 63 6f 6e 4d 65 6e  75 25 21 33 32 3d 49 6e  |:IconMenu%!32=In|
000005c0  66 6f 48 61 6e 64 6c 65  25 3a 49 63 6f 6e 4d 65  |foHandle%:IconMe|
000005d0  6e 75 25 21 33 36 3d 26  37 30 30 30 30 32 31 0d  |nu%!36=&7000021.|
000005e0  01 f4 1a 24 28 49 63 6f  6e 4d 65 6e 75 25 2b 34  |...$(IconMenu%+4|
000005f0  30 29 3d 22 49 6e 66 6f  22 0d 01 fe 39 49 63 6f  |0)="Info"...9Ico|
00000600  6e 4d 65 6e 75 25 21 35  32 3d 26 38 30 3a 49 63  |nMenu%!52=&80:Ic|
00000610  6f 6e 4d 65 6e 75 25 21  35 36 3d 30 3a 49 63 6f  |onMenu%!56=0:Ico|
00000620  6e 4d 65 6e 75 25 21 36  30 3d 26 37 30 30 30 30  |nMenu%!60=&70000|
00000630  32 31 0d 02 08 1a 24 28  49 63 6f 6e 4d 65 6e 75  |21....$(IconMenu|
00000640  25 2b 36 34 29 3d 22 51  75 69 74 22 0d 02 12 05  |%+64)="Quit"....|
00000650  3a 0d 02 1c 17 de 20 54  79 70 65 4d 65 6e 75 25  |:..... TypeMenu%|
00000660  20 32 37 2b 32 34 2a 33  0d 02 26 41 24 54 79 70  | 27+24*3..&A$Typ|
00000670  65 4d 65 6e 75 25 3d 22  53 70 72 69 74 65 4e 61  |eMenu%="SpriteNa|
00000680  6d 65 22 3a 54 79 70 65  4d 65 6e 75 25 21 31 32  |me":TypeMenu%!12|
00000690  3d 26 37 30 32 30 37 3a  54 79 70 65 4d 65 6e 75  |=&70207:TypeMenu|
000006a0  25 21 31 36 3d 38 2a 31  36 0d 02 30 22 54 79 70  |%!16=8*16..0"Typ|
000006b0  65 4d 65 6e 75 25 21 32  30 3d 34 34 3a 54 79 70  |eMenu%!20=44:Typ|
000006c0  65 4d 65 6e 75 25 21 32  34 3d 30 0d 02 3a 50 54  |eMenu%!24=0..:PT|
000006d0  79 70 65 4d 65 6e 75 25  21 32 38 3d 30 3a 54 79  |ypeMenu%!28=0:Ty|
000006e0  70 65 4d 65 6e 75 25 21  33 32 3d 30 3a 54 79 70  |peMenu%!32=0:Typ|
000006f0  65 4d 65 6e 75 25 21 33  36 3d 26 37 30 30 30 30  |eMenu%!36=&70000|
00000700  32 31 3a 24 28 54 79 70  65 4d 65 6e 75 25 2b 34  |21:$(TypeMenu%+4|
00000710  30 29 3d 22 53 63 61 6c  65 64 22 0d 02 44 51 54  |0)="Scaled"..DQT|
00000720  79 70 65 4d 65 6e 75 25  21 35 32 3d 30 3a 54 79  |ypeMenu%!52=0:Ty|
00000730  70 65 4d 65 6e 75 25 21  35 36 3d 30 3a 54 79 70  |peMenu%!56=0:Typ|
00000740  65 4d 65 6e 75 25 21 36  30 3d 26 37 30 30 30 30  |eMenu%!60=&70000|
00000750  32 31 3a 24 28 54 79 70  65 4d 65 6e 75 25 2b 36  |21:$(TypeMenu%+6|
00000760  34 29 3d 22 43 65 6e 74  72 65 64 22 0d 02 4e 51  |4)="Centred"..NQ|
00000770  54 79 70 65 4d 65 6e 75  25 21 37 36 3d 26 38 30  |TypeMenu%!76=&80|
00000780  3a 54 79 70 65 4d 65 6e  75 25 21 38 30 3d 30 3a  |:TypeMenu%!80=0:|
00000790  54 79 70 65 4d 65 6e 75  25 21 38 34 3d 26 37 30  |TypeMenu%!84=&70|
000007a0  30 30 30 32 31 3a 24 28  54 79 70 65 4d 65 6e 75  |00021:$(TypeMenu|
000007b0  25 2b 38 38 29 3d 22 54  69 6c 65 64 22 0d 02 58  |%+88)="Tiled"..X|
000007c0  05 3a 0d 02 62 1c de 20  53 65 6c 4d 65 6e 75 25  |.:..b.. SelMenu%|
000007d0  20 32 37 2b 32 34 2a 38  2c 41 25 20 31 33 0d 02  | 27+24*8,A% 13..|
000007e0  6c 3f 24 53 65 6c 4d 65  6e 75 25 3d 22 53 70 72  |l?$SelMenu%="Spr|
000007f0  69 74 65 4e 61 6d 65 22  3a 53 65 6c 4d 65 6e 75  |iteName":SelMenu|
00000800  25 21 31 32 3d 26 37 30  32 30 37 3a 53 65 6c 4d  |%!12=&70207:SelM|
00000810  65 6e 75 25 21 31 36 3d  31 38 2a 31 36 0d 02 76  |enu%!16=18*16..v|
00000820  20 53 65 6c 4d 65 6e 75  25 21 32 30 3d 34 34 3a  | SelMenu%!20=44:|
00000830  53 65 6c 4d 65 6e 75 25  21 32 34 3d 30 0d 02 80  |SelMenu%!24=0...|
00000840  4a 53 65 6c 4d 65 6e 75  25 21 32 38 3d 30 3a 53  |JSelMenu%!28=0:S|
00000850  65 6c 4d 65 6e 75 25 21  33 32 3d 30 3a 53 65 6c  |elMenu%!32=0:Sel|
00000860  4d 65 6e 75 25 21 33 36  3d 26 37 30 30 30 30 32  |Menu%!36=&700002|
00000870  31 3a 24 28 53 65 6c 4d  65 6e 75 25 2b 34 30 29  |1:$(SelMenu%+40)|
00000880  3d 22 56 69 65 77 22 0d  02 8a 43 53 65 6c 4d 65  |="View"...CSelMe|
00000890  6e 75 25 21 35 32 3d 30  3a 53 65 6c 4d 65 6e 75  |nu%!52=0:SelMenu|
000008a0  25 21 35 36 3d 30 3a 53  65 6c 4d 65 6e 75 25 21  |%!56=0:SelMenu%!|
000008b0  36 30 3d 26 37 30 30 30  31 32 31 3a 53 65 6c 4d  |60=&7000121:SelM|
000008c0  65 6e 75 25 21 36 34 3d  41 25 0d 02 94 35 53 65  |enu%!64=A%...5Se|
000008d0  6c 4d 65 6e 75 25 21 36  38 3d 2d 31 3a 53 65 6c  |lMenu%!68=-1:Sel|
000008e0  4d 65 6e 75 25 21 37 32  3d 31 34 3a 24 41 25 3d  |Menu%!72=14:$A%=|
000008f0  22 4d 61 6b 65 20 62 61  63 6b 64 72 6f 70 22 0d  |"Make backdrop".|
00000900  02 9e 4c 53 65 6c 4d 65  6e 75 25 21 37 36 3d 32  |..LSelMenu%!76=2|
00000910  3a 53 65 6c 4d 65 6e 75  25 21 38 30 3d 30 3a 53  |:SelMenu%!80=0:S|
00000920  65 6c 4d 65 6e 75 25 21  38 34 3d 26 37 30 30 30  |elMenu%!84=&7000|
00000930  30 32 31 3a 24 28 53 65  6c 4d 65 6e 75 25 2b 38  |021:$(SelMenu%+8|
00000940  38 29 3d 22 44 65 6c 65  74 65 22 0d 02 a8 0b de  |8)="Delete".....|
00000950  20 41 25 20 31 37 0d 02  b2 47 53 65 6c 4d 65 6e  | A% 17...GSelMen|
00000960  75 25 21 31 30 30 3d 30  3a 53 65 6c 4d 65 6e 75  |u%!100=0:SelMenu|
00000970  25 21 31 30 34 3d 30 3a  53 65 6c 4d 65 6e 75 25  |%!104=0:SelMenu%|
00000980  21 31 30 38 3d 26 37 30  30 30 31 32 31 3a 53 65  |!108=&7000121:Se|
00000990  6c 4d 65 6e 75 25 21 31  31 32 3d 41 25 0d 02 bc  |lMenu%!112=A%...|
000009a0  3b 53 65 6c 4d 65 6e 75  25 21 31 31 36 3d 2d 31  |;SelMenu%!116=-1|
000009b0  3a 53 65 6c 4d 65 6e 75  25 21 31 32 30 3d 31 38  |:SelMenu%!120=18|
000009c0  3a 24 41 25 3d 22 49 6e  63 6c 75 64 65 20 69 6e  |:$A%="Include in|
000009d0  20 72 61 6e 64 6f 6d 22  0d 02 c6 0b de 20 41 25  | random"..... A%|
000009e0  20 31 33 0d 02 d0 47 53  65 6c 4d 65 6e 75 25 21  | 13...GSelMenu%!|
000009f0  31 32 34 3d 32 3a 53 65  6c 4d 65 6e 75 25 21 31  |124=2:SelMenu%!1|
00000a00  32 38 3d 30 3a 53 65 6c  4d 65 6e 75 25 21 31 33  |28=0:SelMenu%!13|
00000a10  32 3d 26 37 30 30 30 31  32 31 3a 53 65 6c 4d 65  |2=&7000121:SelMe|
00000a20  6e 75 25 21 31 33 36 3d  41 25 0d 02 da 37 53 65  |nu%!136=A%...7Se|
00000a30  6c 4d 65 6e 75 25 21 31  34 30 3d 2d 31 3a 53 65  |lMenu%!140=-1:Se|
00000a40  6c 4d 65 6e 75 25 21 31  34 34 3d 31 34 3a 24 41  |lMenu%!144=14:$A|
00000a50  25 3d 22 44 6f 6e 27 74  20 69 6e 63 6c 75 64 65  |%="Don't include|
00000a60  22 0d 02 e4 50 53 65 6c  4d 65 6e 75 25 21 31 34  |"...PSelMenu%!14|
00000a70  38 3d 30 3a 53 65 6c 4d  65 6e 75 25 21 31 35 32  |8=0:SelMenu%!152|
00000a80  3d 30 3a 53 65 6c 4d 65  6e 75 25 21 31 35 36 3d  |=0:SelMenu%!156=|
00000a90  26 37 30 30 30 30 32 31  3a 24 28 53 65 6c 4d 65  |&7000021:$(SelMe|
00000aa0  6e 75 25 2b 31 36 30 29  3d 22 53 63 61 6c 65 64  |nu%+160)="Scaled|
00000ab0  22 0d 02 ee 51 53 65 6c  4d 65 6e 75 25 21 31 37  |"...QSelMenu%!17|
00000ac0  32 3d 30 3a 53 65 6c 4d  65 6e 75 25 21 31 37 36  |2=0:SelMenu%!176|
00000ad0  3d 30 3a 53 65 6c 4d 65  6e 75 25 21 31 38 30 3d  |=0:SelMenu%!180=|
00000ae0  26 37 30 30 30 30 32 31  3a 24 28 53 65 6c 4d 65  |&7000021:$(SelMe|
00000af0  6e 75 25 2b 31 38 34 29  3d 22 43 65 6e 74 72 65  |nu%+184)="Centre|
00000b00  64 22 0d 02 f8 51 53 65  6c 4d 65 6e 75 25 21 31  |d"...QSelMenu%!1|
00000b10  39 36 3d 26 38 30 3a 53  65 6c 4d 65 6e 75 25 21  |96=&80:SelMenu%!|
00000b20  32 30 30 3d 30 3a 53 65  6c 4d 65 6e 75 25 21 32  |200=0:SelMenu%!2|
00000b30  30 34 3d 26 37 30 30 30  30 32 31 3a 24 28 53 65  |04=&7000021:$(Se|
00000b40  6c 4d 65 6e 75 25 2b 32  30 38 29 3d 22 54 69 6c  |lMenu%+208)="Til|
00000b50  65 64 22 0d 03 02 05 3a  0d 03 0c 18 de 20 4c 69  |ed"....:..... Li|
00000b60  73 74 4d 65 6e 75 25 20  32 37 2b 32 34 2a 37 39  |stMenu% 27+24*79|
00000b70  0d 03 16 3e 24 4c 69 73  74 4d 65 6e 75 25 3d 22  |...>$ListMenu%="|
00000b80  53 74 61 72 74 75 70 22  3a 4c 69 73 74 4d 65 6e  |Startup":ListMen|
00000b90  75 25 21 31 32 3d 26 37  30 32 30 37 3a 4c 69 73  |u%!12=&70207:Lis|
00000ba0  74 4d 65 6e 75 25 21 31  36 3d 37 2a 31 36 0d 03  |tMenu%!16=7*16..|
00000bb0  20 22 4c 69 73 74 4d 65  6e 75 25 21 32 30 3d 34  | "ListMenu%!20=4|
00000bc0  34 3a 4c 69 73 74 4d 65  6e 75 25 21 32 34 3d 30  |4:ListMenu%!24=0|
00000bd0  0d 03 2a 0f e3 20 41 25  3d 30 20 b8 20 37 38 0d  |..*.. A%=0 . 78.|
00000be0  03 34 1b 21 28 4c 69 73  74 4d 65 6e 75 25 2b 33  |.4.!(ListMenu%+3|
00000bf0  32 2b 32 34 2a 41 25 29  3d 30 0d 03 3e 22 21 28  |2+24*A%)=0..>"!(|
00000c00  4c 69 73 74 4d 65 6e 75  25 2b 33 36 2b 32 34 2a  |ListMenu%+36+24*|
00000c10  41 25 29 3d 26 37 30 30  30 30 32 31 0d 03 48 05  |A%)=&7000021..H.|
00000c20  ed 0d 03 52 1c 24 28 4c  69 73 74 4d 65 6e 75 25  |...R.$(ListMenu%|
00000c30  2b 34 30 29 3d 22 52 61  6e 64 6f 6d 22 0d 03 5c  |+40)="Random"..\|
00000c40  1c 24 28 4c 69 73 74 4d  65 6e 75 25 2b 36 34 29  |.$(ListMenu%+64)|
00000c50  3d 22 28 4e 6f 6e 65 29  22 0d 03 66 05 3a 0d 03  |="(None)"..f.:..|
00000c60  70 1f de 20 4d 61 69 6e  4d 65 6e 75 25 20 32 38  |p.. MainMenu% 28|
00000c70  2b 32 34 2a 32 3a de 20  41 25 20 32 31 0d 03 7a  |+24*2:. A% 21..z|
00000c80  40 24 4d 61 69 6e 4d 65  6e 75 25 3d 22 42 61 63  |@$MainMenu%="Bac|
00000c90  6b 44 72 6f 70 73 22 3a  4d 61 69 6e 4d 65 6e 75  |kDrops":MainMenu|
00000ca0  25 21 31 32 3d 26 37 30  32 30 37 3a 4d 61 69 6e  |%!12=&70207:Main|
00000cb0  4d 65 6e 75 25 21 31 36  3d 38 2a 31 36 0d 03 84  |Menu%!16=8*16...|
00000cc0  22 4d 61 69 6e 4d 65 6e  75 25 21 32 30 3d 34 34  |"MainMenu%!20=44|
00000cd0  3a 4d 61 69 6e 4d 65 6e  75 25 21 32 34 3d 30 0d  |:MainMenu%!24=0.|
00000ce0  03 8e 3f 4d 61 69 6e 4d  65 6e 75 25 21 32 38 3d  |..?MainMenu%!28=|
00000cf0  38 3a 4d 61 69 6e 4d 65  6e 75 25 21 33 32 3d 4c  |8:MainMenu%!32=L|
00000d00  69 73 74 4d 65 6e 75 25  3a 4d 61 69 6e 4d 65 6e  |istMenu%:MainMen|
00000d10  75 25 21 33 36 3d 26 37  30 30 30 30 32 31 0d 03  |u%!36=&7000021..|
00000d20  98 1d 24 28 4d 61 69 6e  4d 65 6e 75 25 2b 34 30  |..$(MainMenu%+40|
00000d30  29 3d 22 53 74 61 72 74  75 70 22 0d 03 a2 40 4d  |)="Startup"...@M|
00000d40  61 69 6e 4d 65 6e 75 25  21 35 32 3d 26 39 38 3a  |ainMenu%!52=&98:|
00000d50  4d 61 69 6e 4d 65 6e 75  25 21 35 36 3d 53 65 6c  |MainMenu%!56=Sel|
00000d60  4d 65 6e 75 25 3a 4d 61  69 6e 4d 65 6e 75 25 21  |Menu%:MainMenu%!|
00000d70  36 30 3d 26 37 30 30 30  31 32 31 0d 03 ac 33 4d  |60=&7000121...3M|
00000d80  61 69 6e 4d 65 6e 75 25  21 36 34 3d 41 25 3a 4d  |ainMenu%!64=A%:M|
00000d90  61 69 6e 4d 65 6e 75 25  21 36 38 3d 2d 31 3a 4d  |ainMenu%!68=-1:M|
00000da0  61 69 6e 4d 65 6e 75 25  21 37 32 3d 32 32 0d 03  |ainMenu%!72=22..|
00000db0  b6 05 3a 0d 03 c0 13 de  20 64 61 74 61 25 20 37  |..:..... data% 7|
00000dc0  38 2a 31 32 2b 31 0d 03  ca 24 ff 20 22 4c 6f 61  |8*12+1...$. "Loa|
00000dd0  64 20 42 61 63 6b 44 72  6f 70 73 3a 44 61 74 61  |d BackDrops:Data|
00000de0  20 22 2b c3 7e 64 61 74  61 25 0d 03 d4 0f f2 75  | "+.~data%.....u|
00000df0  70 64 61 74 65 6c 69 73  74 0d 03 de 05 3a 0d 03  |pdatelist....:..|
00000e00  e8 0e 21 62 6c 6f 63 6b  25 3d 2d 31 0d 03 f2 33  |..!block%=-1...3|
00000e10  62 6c 6f 63 6b 25 21 34  3d 30 3a 62 6c 6f 63 6b  |block%!4=0:block|
00000e20  25 21 38 3d 30 3a 62 6c  6f 63 6b 25 21 31 32 3d  |%!8=0:block%!12=|
00000e30  36 38 3a 62 6c 6f 63 6b  25 21 31 36 3d 36 38 0d  |68:block%!16=68.|
00000e40  03 fc 2d 62 6c 6f 63 6b  25 21 32 30 3d 26 33 30  |..-block%!20=&30|
00000e50  30 32 3a 24 28 62 6c 6f  63 6b 25 2b 32 34 29 3d  |02:$(block%+24)=|
00000e60  22 21 62 61 63 6b 73 65  74 75 70 22 0d 04 06 2e  |"!backsetup"....|
00000e70  c8 99 20 22 57 69 6d 70  5f 43 72 65 61 74 65 49  |.. "Wimp_CreateI|
00000e80  63 6f 6e 22 2c 2c 62 6c  6f 63 6b 25 20 b8 20 49  |con",,block% . I|
00000e90  63 6f 6e 48 61 6e 64 6c  65 25 0d 04 10 05 e1 0d  |conHandle%......|
00000ea0  04 1a 05 3a 0d 04 24 05  3a 0d 04 2e 05 3a 0d 04  |...:..$.:....:..|
00000eb0  38 05 3a 0d 04 42 2e dd  f2 6d 6f 75 73 65 63 6c  |8.:..B...mousecl|
00000ec0  69 63 6b 28 78 25 2c 79  25 2c 62 75 74 74 6f 6e  |ick(x%,y%,button|
00000ed0  73 25 2c 77 69 6e 64 6f  77 25 2c 69 63 6f 6e 25  |s%,window%,icon%|
00000ee0  29 0d 04 4c 49 ea 20 70  6f 73 25 2c 6c 6f 6f 70  |)..LI. pos%,loop|
00000ef0  25 2c 6f 66 66 73 65 74  25 2c 6f 78 25 2c 6f 79  |%,offset%,ox%,oy|
00000f00  25 2c 6d 69 6e 78 25 2c  6d 61 78 78 25 2c 6d 69  |%,minx%,maxx%,mi|
00000f10  6e 79 25 2c 6d 61 78 79  25 2c 73 65 6c 25 2c 78  |ny%,maxy%,sel%,x|
00000f20  65 69 67 25 2c 79 65 69  67 25 0d 04 56 10 c8 8e  |eig%,yeig%..V...|
00000f30  20 77 69 6e 64 6f 77 25  20 ca 0d 04 60 0a 20 20  | window% ...`.  |
00000f40  c9 20 2d 32 0d 04 6a 14  20 20 e7 20 62 75 74 74  |. -2..j.  . butt|
00000f50  6f 6e 73 25 3d 32 20 8c  0d 04 74 49 20 20 20 20  |ons%=2 ...tI    |
00000f60  c8 99 20 22 57 69 6d 70  5f 43 72 65 61 74 65 4d  |.. "Wimp_CreateM|
00000f70  65 6e 75 22 2c 2c 49 63  6f 6e 4d 65 6e 75 25 2c  |enu",,IconMenu%,|
00000f80  78 25 2d 36 34 2c 39 34  2b 34 34 2a 32 3a 4d 65  |x%-64,94+44*2:Me|
00000f90  6e 75 4f 70 65 6e 25 3d  49 63 6f 6e 4d 65 6e 75  |nuOpen%=IconMenu|
00000fa0  25 0d 04 7e 07 20 20 cc  0d 04 88 23 20 20 20 20  |%..~.  ....#    |
00000fb0  e7 20 62 75 74 74 6f 6e  73 25 3d 31 20 84 20 62  |. buttons%=1 . b|
00000fc0  75 74 74 6f 6e 73 25 3d  34 20 8c 0d 04 92 3c 20  |uttons%=4 ....< |
00000fd0  20 20 20 20 20 21 74 65  6d 70 25 3d 4d 61 69 6e  |     !temp%=Main|
00000fe0  48 61 6e 64 6c 65 25 3a  c8 99 20 22 57 69 6d 70  |Handle%:.. "Wimp|
00000ff0  5f 47 65 74 57 69 6e 64  6f 77 53 74 61 74 65 22  |_GetWindowState"|
00001000  2c 2c 74 65 6d 70 25 0d  04 9c 15 20 20 20 20 20  |,,temp%....     |
00001010  20 74 65 6d 70 25 21 32  38 3d 2d 31 0d 04 a6 26  | temp%!28=-1...&|
00001020  20 20 20 20 20 20 f4 20  63 65 6e 74 72 65 20 69  |      . centre i|
00001030  66 20 6e 6f 74 20 61 6c  72 65 61 64 79 20 6f 70  |f not already op|
00001040  65 6e 0d 04 b0 24 20 20  20 20 20 20 e7 20 28 28  |en...$      . ((|
00001050  74 65 6d 70 25 21 33 32  29 80 28 31 3c 3c 31 36  |temp%!32).(1<<16|
00001060  29 29 3d 30 20 8c 0d 04  ba 31 20 20 20 20 20 20  |))=0 ....1      |
00001070  20 20 c8 99 20 22 4f 53  5f 52 65 61 64 4d 6f 64  |  .. "OS_ReadMod|
00001080  65 56 61 72 69 61 62 6c  65 22 2c 2d 31 2c 31 31  |eVariable",-1,11|
00001090  20 b8 20 2c 2c 78 25 0d  04 c4 31 20 20 20 20 20  | . ,,x%...1     |
000010a0  20 20 20 c8 99 20 22 4f  53 5f 52 65 61 64 4d 6f  |   .. "OS_ReadMo|
000010b0  64 65 56 61 72 69 61 62  6c 65 22 2c 2d 31 2c 31  |deVariable",-1,1|
000010c0  32 20 b8 20 2c 2c 79 25  0d 04 ce 33 20 20 20 20  |2 . ,,y%...3    |
000010d0  20 20 20 20 c8 99 20 22  4f 53 5f 52 65 61 64 4d  |    .. "OS_ReadM|
000010e0  6f 64 65 56 61 72 69 61  62 6c 65 22 2c 2d 31 2c  |odeVariable",-1,|
000010f0  34 20 b8 20 2c 2c 78 65  69 67 25 0d 04 d8 33 20  |4 . ,,xeig%...3 |
00001100  20 20 20 20 20 20 20 c8  99 20 22 4f 53 5f 52 65  |       .. "OS_Re|
00001110  61 64 4d 6f 64 65 56 61  72 69 61 62 6c 65 22 2c  |adModeVariable",|
00001120  2d 31 2c 35 20 b8 20 2c  2c 79 65 69 67 25 0d 04  |-1,5 . ,,yeig%..|
00001130  e2 31 20 20 20 20 20 20  20 20 78 25 3d 28 28 78  |.1        x%=((x|
00001140  25 2b 31 29 3c 3c 78 65  69 67 25 29 3a 79 25 3d  |%+1)<<xeig%):y%=|
00001150  28 28 79 25 2b 31 29 3c  3c 79 65 69 67 25 29 0d  |((y%+1)<<yeig%).|
00001160  04 ec 20 20 20 20 20 20  20 20 20 74 65 6d 70 25  |..         temp%|
00001170  21 38 3d 74 65 6d 70 25  21 31 36 2d 32 38 34 0d  |!8=temp%!16-284.|
00001180  04 f6 20 20 20 20 20 20  20 20 20 74 65 6d 70 25  |..         temp%|
00001190  21 31 32 3d 74 65 6d 70  25 21 34 2b 34 30 30 0d  |!12=temp%!4+400.|
000011a0  05 00 28 20 20 20 20 20  20 20 20 78 25 3d 28 78  |..(        x%=(x|
000011b0  25 2d 28 74 65 6d 70 25  21 31 32 2d 74 65 6d 70  |%-(temp%!12-temp|
000011c0  25 21 34 29 29 81 32 0d  05 0a 28 20 20 20 20 20  |%!4)).2...(     |
000011d0  20 20 20 79 25 3d 28 79  25 2d 28 74 65 6d 70 25  |   y%=(y%-(temp%|
000011e0  21 31 36 2d 74 65 6d 70  25 21 38 29 29 81 32 0d  |!16-temp%!8)).2.|
000011f0  05 14 2a 20 20 20 20 20  20 20 20 74 65 6d 70 25  |..*        temp%|
00001200  21 31 32 3d 78 25 2b 28  74 65 6d 70 25 21 31 32  |!12=x%+(temp%!12|
00001210  2d 74 65 6d 70 25 21 34  29 0d 05 1e 16 20 20 20  |-temp%!4)....   |
00001220  20 20 20 20 20 74 65 6d  70 25 21 34 3d 78 25 0d  |     temp%!4=x%.|
00001230  05 28 2a 20 20 20 20 20  20 20 20 74 65 6d 70 25  |.(*        temp%|
00001240  21 31 36 3d 79 25 2b 28  74 65 6d 70 25 21 31 36  |!16=y%+(temp%!16|
00001250  2d 74 65 6d 70 25 21 38  29 0d 05 32 16 20 20 20  |-temp%!8)..2.   |
00001260  20 20 20 20 20 74 65 6d  70 25 21 38 3d 79 25 0d  |     temp%!8=y%.|
00001270  05 3c 21 20 20 20 20 20  20 20 20 74 65 6d 70 25  |.<!        temp%|
00001280  21 32 30 3d 30 3a 74 65  6d 70 25 21 32 34 3d 30  |!20=0:temp%!24=0|
00001290  0d 05 46 0b 20 20 20 20  20 20 cd 0d 05 50 25 20  |..F.      ...P% |
000012a0  20 20 20 20 20 c8 99 20  22 57 69 6d 70 5f 4f 70  |     .. "Wimp_Op|
000012b0  65 6e 57 69 6e 64 6f 77  22 2c 2c 74 65 6d 70 25  |enWindow",,temp%|
000012c0  0d 05 5a 09 20 20 20 20  cd 0d 05 64 07 20 20 cd  |..Z.    ...d.  .|
000012d0  0d 05 6e 06 20 20 0d 05  78 13 20 20 c9 20 4d 61  |..n.  ..x.  . Ma|
000012e0  69 6e 48 61 6e 64 6c 65  25 0d 05 82 15 20 20 20  |inHandle%....   |
000012f0  20 c8 8e 20 62 75 74 74  6f 6e 73 25 20 ca 0d 05  | .. buttons% ...|
00001300  8c 0b 20 20 20 20 c9 20  32 0d 05 96 3f 20 20 20  |..    . 2...?   |
00001310  20 20 20 c8 99 20 22 57  69 6d 70 5f 57 68 69 63  |   .. "Wimp_Whic|
00001320  68 49 63 6f 6e 22 2c 4d  61 69 6e 48 61 6e 64 6c  |hIcon",MainHandl|
00001330  65 25 2c 74 65 6d 70 25  2c 26 62 66 30 30 30 30  |e%,temp%,&bf0000|
00001340  2c 26 32 31 30 30 30 30  0d 05 a0 17 20 20 20 20  |,&210000....    |
00001350  20 20 e7 20 21 74 65 6d  70 25 3d 2d 31 20 8c 0d  |  . !temp%=-1 ..|
00001360  05 aa 1e 20 20 20 20 20  20 20 20 21 74 65 6d 70  |...        !temp|
00001370  25 3d 4d 61 69 6e 48 61  6e 64 6c 65 25 0d 05 b4  |%=MainHandle%...|
00001380  2b 20 20 20 20 20 20 20  20 c8 99 20 22 57 69 6d  |+        .. "Wim|
00001390  70 5f 47 65 74 57 69 6e  64 6f 77 53 74 61 74 65  |p_GetWindowState|
000013a0  22 2c 2c 74 65 6d 70 25  0d 05 be 30 20 20 20 20  |",,temp%...0    |
000013b0  20 20 20 20 21 74 65 6d  70 25 3d 28 28 74 65 6d  |    !temp%=((tem|
000013c0  70 25 21 31 36 2d 79 25  2d 74 65 6d 70 25 21 32  |p%!16-y%-temp%!2|
000013d0  34 29 81 34 38 29 2a 33  0d 05 c8 16 20 20 20 20  |4).48)*3....    |
000013e0  20 20 20 20 74 65 6d 70  25 21 34 3d 2d 31 0d 05  |    temp%!4=-1..|
000013f0  d2 0b 20 20 20 20 20 20  cd 0d 05 dc 18 20 20 20  |..      .....   |
00001400  20 20 20 e7 20 74 65 6d  70 25 21 34 3d 2d 31 20  |   . temp%!4=-1 |
00001410  8c 0d 05 e6 42 20 20 20  20 20 20 20 20 e7 20 ac  |....B        . .|
00001420  28 28 28 47 72 65 79 65  64 31 25 20 80 20 21 74  |(((Greyed1% . !t|
00001430  65 6d 70 25 3d 33 29 20  84 20 28 47 72 65 79 65  |emp%=3) . (Greye|
00001440  64 32 25 20 80 20 21 74  65 6d 70 25 3d 36 29 29  |d2% . !temp%=6))|
00001450  29 20 8c 0d 05 f0 26 20  20 20 20 20 20 20 20 20  |) ....&         |
00001460  20 4d 65 6e 75 50 61 72  65 6e 74 25 3d 28 28 21  | MenuParent%=((!|
00001470  74 65 6d 70 25 29 81 33  29 0d 05 fa 45 20 20 20  |temp%).3)...E   |
00001480  20 20 20 20 20 20 20 73  74 72 24 3d 22 42 61 63  |       str$="Bac|
00001490  6b 64 72 6f 70 20 27 22  2b 24 28 a4 69 6e 64 69  |kdrop '"+$(.indi|
000014a0  72 61 64 64 72 28 4d 61  69 6e 48 61 6e 64 6c 65  |raddr(MainHandle|
000014b0  25 2c 21 74 65 6d 70 25  29 29 2b 22 27 22 0d 06  |%,!temp%))+"'"..|
000014c0  04 22 20 20 20 20 20 20  20 20 20 20 24 28 4d 61  |."          $(Ma|
000014d0  69 6e 4d 65 6e 75 25 21  36 34 29 3d 73 74 72 24  |inMenu%!64)=str$|
000014e0  0d 06 0e 29 20 20 20 20  20 20 20 20 20 20 4d 61  |...)          Ma|
000014f0  69 6e 4d 65 6e 75 25 21  31 36 3d 28 a9 28 73 74  |inMenu%!16=(.(st|
00001500  72 24 29 2b 31 29 2a 31  36 0d 06 18 23 20 20 20  |r$)+1)*16...#   |
00001510  20 20 20 20 20 20 20 4d  61 69 6e 4d 65 6e 75 25  |       MainMenu%|
00001520  21 36 30 3d 26 37 30 30  30 31 32 31 0d 06 22 0d  |!60=&7000121..".|
00001530  20 20 20 20 20 20 20 20  cc 0d 06 2c 1c 20 20 20  |        ...,.   |
00001540  20 20 20 20 20 20 20 4d  65 6e 75 50 61 72 65 6e  |       MenuParen|
00001550  74 25 3d 2d 32 0d 06 36  28 20 20 20 20 20 20 20  |t%=-2..6(       |
00001560  20 20 20 24 28 4d 61 69  6e 4d 65 6e 75 25 21 36  |   $(MainMenu%!6|
00001570  34 29 3d 22 42 61 63 6b  64 72 6f 70 22 0d 06 40  |4)="Backdrop"..@|
00001580  1f 20 20 20 20 20 20 20  20 20 20 4d 61 69 6e 4d  |.          MainM|
00001590  65 6e 75 25 21 31 36 3d  39 2a 31 36 0d 06 4a 23  |enu%!16=9*16..J#|
000015a0  20 20 20 20 20 20 20 20  20 20 4d 61 69 6e 4d 65  |          MainMe|
000015b0  6e 75 25 21 36 30 3d 26  37 34 30 30 31 32 31 0d  |nu%!60=&7400121.|
000015c0  06 54 0d 20 20 20 20 20  20 20 20 cd 0d 06 5e 0b  |.T.        ...^.|
000015d0  20 20 20 20 20 20 cc 0d  06 68 3a 20 20 20 20 20  |      ...h:     |
000015e0  20 20 20 24 28 4d 61 69  6e 4d 65 6e 75 25 21 36  |   $(MainMenu%!6|
000015f0  34 29 3d 22 53 65 6c 65  63 74 69 6f 6e 22 3a 4d  |4)="Selection":M|
00001600  61 69 6e 4d 65 6e 75 25  21 31 36 3d 31 30 2a 31  |ainMenu%!16=10*1|
00001610  36 0d 06 72 21 20 20 20  20 20 20 20 20 4d 61 69  |6..r!        Mai|
00001620  6e 4d 65 6e 75 25 21 36  30 3d 26 37 30 30 30 31  |nMenu%!60=&70001|
00001630  32 31 0d 06 7c 1a 20 20  20 20 20 20 20 20 4d 65  |21..|.        Me|
00001640  6e 75 50 61 72 65 6e 74  25 3d 2d 31 0d 06 86 0b  |nuParent%=-1....|
00001650  20 20 20 20 20 20 cd 0d  06 90 32 20 20 20 20 20  |      ....2     |
00001660  20 c8 99 20 22 57 69 6d  70 5f 43 72 65 61 74 65  | .. "Wimp_Create|
00001670  4d 65 6e 75 22 2c 2c 4d  61 69 6e 4d 65 6e 75 25  |Menu",,MainMenu%|
00001680  2c 78 25 2d 36 34 2c 79  25 0d 06 9a 1d 20 20 20  |,x%-64,y%....   |
00001690  20 20 20 4d 65 6e 75 4f  70 65 6e 25 3d 4d 61 69  |   MenuOpen%=Mai|
000016a0  6e 4d 65 6e 75 25 0d 06  a4 08 20 20 20 20 0d 06  |nMenu%....    ..|
000016b0  ae 0f 20 20 20 20 c9 20  31 36 2c 36 34 0d 06 b8  |..    . 16,64...|
000016c0  24 20 20 20 20 20 20 e7  20 69 63 6f 6e 25 3d 2d  |$      . icon%=-|
000016d0  31 20 80 20 62 75 74 74  6f 6e 73 25 3d 36 34 20  |1 . buttons%=64 |
000016e0  8c 0d 06 c2 1c 20 20 20  20 20 20 21 74 65 6d 70  |.....      !temp|
000016f0  25 3d 4d 61 69 6e 48 61  6e 64 6c 65 25 0d 06 cc  |%=MainHandle%...|
00001700  23 20 20 20 20 20 20 e3  20 69 63 6f 6e 25 3d 30  |#      . icon%=0|
00001710  20 b8 20 28 3f 64 61 74  61 25 29 2a 33 20 88 33  | . (?data%)*3 .3|
00001720  0d 06 d6 19 20 20 20 20  20 20 20 20 74 65 6d 70  |....        temp|
00001730  25 21 34 3d 69 63 6f 6e  25 0d 06 e0 29 20 20 20  |%!4=icon%...)   |
00001740  20 20 20 20 20 c8 99 20  22 57 69 6d 70 5f 47 65  |     .. "Wimp_Ge|
00001750  74 49 63 6f 6e 53 74 61  74 65 22 2c 2c 74 65 6d  |tIconState",,tem|
00001760  70 25 0d 06 ea 63 20 20  20 20 20 20 20 20 e7 20  |p%...c        . |
00001770  28 28 74 65 6d 70 25 21  32 34 29 80 28 31 3c 3c  |((temp%!24).(1<<|
00001780  32 31 29 29 3d 28 31 3c  3c 32 31 29 20 8c 20 74  |21))=(1<<21) . t|
00001790  65 6d 70 25 21 38 3d 30  3a 74 65 6d 70 25 21 31  |emp%!8=0:temp%!1|
000017a0  32 3d 31 3c 3c 32 31 3a  c8 99 20 22 57 69 6d 70  |2=1<<21:.. "Wimp|
000017b0  5f 53 65 74 49 63 6f 6e  53 74 61 74 65 22 2c 2c  |_SetIconState",,|
000017c0  74 65 6d 70 25 0d 06 f4  0b 20 20 20 20 20 20 ed  |temp%....      .|
000017d0  0d 06 fe 0b 20 20 20 20  20 20 cd 0d 07 08 36 20  |....      ....6 |
000017e0  20 20 20 20 20 e7 20 62  75 74 74 6f 6e 73 25 3d  |     . buttons%=|
000017f0  36 34 20 8c 20 61 64 6a  75 73 74 64 72 61 67 25  |64 . adjustdrag%|
00001800  3d a3 20 8b 61 64 6a 75  73 74 64 72 61 67 25 3d  |=. .adjustdrag%=|
00001810  b9 0d 07 12 1a 20 20 20  20 20 20 e7 20 28 69 63  |.....      . (ic|
00001820  6f 6e 25 20 83 20 33 29  3d 30 8c 0d 07 1c 1e 20  |on% . 3)=0..... |
00001830  20 20 20 20 20 20 20 21  74 65 6d 70 25 3d 4d 61  |       !temp%=Ma|
00001840  69 6e 48 61 6e 64 6c 65  25 0d 07 26 19 20 20 20  |inHandle%..&.   |
00001850  20 20 20 20 20 74 65 6d  70 25 21 34 3d 69 63 6f  |     temp%!4=ico|
00001860  6e 25 0d 07 30 19 20 20  20 20 20 20 20 20 74 65  |n%..0.        te|
00001870  6d 70 25 21 38 3d 31 3c  3c 32 31 0d 07 3a 16 20  |mp%!8=1<<21..:. |
00001880  20 20 20 20 20 20 20 74  65 6d 70 25 21 31 32 3d  |       temp%!12=|
00001890  30 0d 07 44 29 20 20 20  20 20 20 20 20 c8 99 20  |0..D)        .. |
000018a0  22 57 69 6d 70 5f 53 65  74 49 63 6f 6e 53 74 61  |"Wimp_SetIconSta|
000018b0  74 65 22 2c 2c 74 65 6d  70 25 0d 07 4e 0b 20 20  |te",,temp%..N.  |
000018c0  20 20 20 20 cd 0d 07 58  3c 20 20 20 20 20 20 21  |    ...X<      !|
000018d0  74 65 6d 70 25 3d 4d 61  69 6e 48 61 6e 64 6c 65  |temp%=MainHandle|
000018e0  25 3a c8 99 20 22 57 69  6d 70 5f 47 65 74 57 69  |%:.. "Wimp_GetWi|
000018f0  6e 64 6f 77 53 74 61 74  65 22 2c 2c 74 65 6d 70  |ndowState",,temp|
00001900  25 0d 07 62 1e 20 20 20  20 20 20 6f 78 25 3d 74  |%..b.      ox%=t|
00001910  65 6d 70 25 21 34 2d 74  65 6d 70 25 21 32 30 0d  |emp%!4-temp%!20.|
00001920  07 6c 1f 20 20 20 20 20  20 6f 79 25 3d 74 65 6d  |.l.      oy%=tem|
00001930  70 25 21 31 36 2d 74 65  6d 70 25 21 32 34 0d 07  |p%!16-temp%!24..|
00001940  76 18 20 20 20 20 20 20  e7 20 78 25 2d 6f 78 25  |v.      . x%-ox%|
00001950  3c 31 37 34 20 8c 0d 07  80 27 20 20 20 20 20 20  |<174 ....'      |
00001960  20 20 64 72 61 67 78 25  3d 78 25 2d 6f 78 25 3a  |  dragx%=x%-ox%:|
00001970  64 72 61 67 79 25 3d 79  25 2d 6f 79 25 0d 07 8a  |dragy%=y%-oy%...|
00001980  15 20 20 20 20 20 20 20  20 64 72 61 67 25 21 34  |.        drag%!4|
00001990  3d 36 0d 07 94 22 20 20  20 20 20 20 20 20 64 72  |=6..."        dr|
000019a0  61 67 25 21 38 3d 78 25  3a 64 72 61 67 25 21 31  |ag%!8=x%:drag%!1|
000019b0  36 3d 78 25 0d 07 9e 23  20 20 20 20 20 20 20 20  |6=x%...#        |
000019c0  64 72 61 67 25 21 31 32  3d 79 25 3a 64 72 61 67  |drag%!12=y%:drag|
000019d0  25 21 32 30 3d 79 25 0d  07 a8 15 20 20 20 20 20  |%!20=y%....     |
000019e0  20 20 20 6d 69 6e 78 25  3d 6f 78 25 0d 07 b2 24  |   minx%=ox%...$|
000019f0  20 20 20 20 20 20 20 20  6d 69 6e 79 25 3d 6f 79  |        miny%=oy|
00001a00  25 2d 34 34 2d 28 3f 64  61 74 61 25 29 2a 34 38  |%-44-(?data%)*48|
00001a10  0d 07 bc 25 20 20 20 20  20 20 20 20 e7 20 3f 64  |...%        . ?d|
00001a20  61 74 61 25 3c 32 20 8c  6d 69 6e 79 25 3d 6f 79  |ata%<2 .miny%=oy|
00001a30  25 2d 31 34 30 0d 07 c6  19 20 20 20 20 20 20 20  |%-140....       |
00001a40  20 6d 61 78 78 25 3d 6f  78 25 2b 31 37 34 0d 07  | maxx%=ox%+174..|
00001a50  d0 18 20 20 20 20 20 20  20 20 6d 61 78 79 25 3d  |..        maxy%=|
00001a60  6f 79 25 2d 34 38 0d 07  da 2a 20 20 20 20 20 20  |oy%-48...*      |
00001a70  20 20 e7 20 74 65 6d 70  25 21 38 3e 6d 69 6e 79  |  . temp%!8>miny|
00001a80  25 20 8c 6d 69 6e 79 25  3d 74 65 6d 70 25 21 38  |% .miny%=temp%!8|
00001a90  0d 07 e4 2c 20 20 20 20  20 20 20 20 e7 20 74 65  |...,        . te|
00001aa0  6d 70 25 21 31 32 3c 6d  61 78 78 25 20 8c 6d 61  |mp%!12<maxx% .ma|
00001ab0  78 78 25 3d 74 65 6d 70  25 21 31 32 0d 07 ee 2c  |xx%=temp%!12...,|
00001ac0  20 20 20 20 20 20 20 20  e7 20 74 65 6d 70 25 21  |        . temp%!|
00001ad0  31 36 3c 6d 61 78 79 25  20 8c 6d 61 78 79 25 3d  |16<maxy% .maxy%=|
00001ae0  74 65 6d 70 25 21 31 36  0d 07 f8 1a 20 20 20 20  |temp%!16....    |
00001af0  20 20 20 20 64 72 61 67  25 21 32 34 3d 6d 69 6e  |    drag%!24=min|
00001b00  78 25 0d 08 02 1a 20 20  20 20 20 20 20 20 64 72  |x%....        dr|
00001b10  61 67 25 21 32 38 3d 6d  69 6e 79 25 0d 08 0c 1a  |ag%!28=miny%....|
00001b20  20 20 20 20 20 20 20 20  64 72 61 67 25 21 33 32  |        drag%!32|
00001b30  3d 6d 61 78 78 25 0d 08  16 1a 20 20 20 20 20 20  |=maxx%....      |
00001b40  20 20 64 72 61 67 25 21  33 36 3d 6d 61 78 79 25  |  drag%!36=maxy%|
00001b50  0d 08 20 24 20 20 20 20  20 20 20 20 c8 99 20 22  |.. $        .. "|
00001b60  57 69 6d 70 5f 44 72 61  67 42 6f 78 22 2c 2c 64  |Wimp_DragBox",,d|
00001b70  72 61 67 25 0d 08 2a 0b  20 20 20 20 20 20 cd 0d  |rag%..*.      ..|
00001b80  08 34 08 20 20 20 20 0d  08 3e 09 20 20 20 20 7f  |.4.    ..>.    .|
00001b90  0d 08 48 1b 20 20 20 20  20 20 e7 20 28 69 63 6f  |..H.      . (ico|
00001ba0  6e 25 20 83 20 33 29 3d  31 20 8c 0d 08 52 27 20  |n% . 3)=1 ...R' |
00001bb0  20 20 20 20 20 20 20 f4  20 53 63 61 6c 65 64 2f  |       . Scaled/|
00001bc0  43 65 6e 74 72 65 64 2f  54 69 6c 65 64 20 6d 65  |Centred/Tiled me|
00001bd0  6e 75 0d 08 5c 39 20 20  20 20 20 20 20 20 24 54  |nu..\9        $T|
00001be0  79 70 65 4d 65 6e 75 25  3d 24 28 a4 69 6e 64 69  |ypeMenu%=$(.indi|
00001bf0  72 61 64 64 72 28 4d 61  69 6e 48 61 6e 64 6c 65  |raddr(MainHandle|
00001c00  25 2c 69 63 6f 6e 25 2d  31 29 29 0d 08 66 31 20  |%,icon%-1))..f1 |
00001c10  20 20 20 20 20 20 20 c8  8e 20 24 28 a4 69 6e 64  |       .. $(.ind|
00001c20  69 72 61 64 64 72 28 4d  61 69 6e 48 61 6e 64 6c  |iraddr(MainHandl|
00001c30  65 25 2c 69 63 6f 6e 25  29 29 20 ca 0d 08 70 1f  |e%,icon%)) ...p.|
00001c40  20 20 20 20 20 20 20 20  20 20 c9 20 22 53 63 61  |          . "Sca|
00001c50  6c 65 64 22 3a 70 6f 73  25 3d 31 0d 08 7a 20 20  |led":pos%=1..z  |
00001c60  20 20 20 20 20 20 20 20  20 c9 20 22 43 65 6e 74  |         . "Cent|
00001c70  72 65 64 22 3a 70 6f 73  25 3d 32 0d 08 84 1e 20  |red":pos%=2.... |
00001c80  20 20 20 20 20 20 20 20  20 c9 20 22 54 69 6c 65  |         . "Tile|
00001c90  64 22 3a 70 6f 73 25 3d  33 0d 08 8e 0d 20 20 20  |d":pos%=3....   |
00001ca0  20 20 20 20 20 cb 0d 08  98 19 20 20 20 20 20 20  |     .....      |
00001cb0  20 20 e3 20 6c 6f 6f 70  25 3d 31 20 b8 20 33 0d  |  . loop%=1 . 3.|
00001cc0  08 a2 20 20 20 20 20 20  20 20 20 20 20 6f 66 66  |..           off|
00001cd0  73 65 74 25 3d 34 2b 32  34 2a 6c 6f 6f 70 25 0d  |set%=4+24*loop%.|
00001ce0  08 ac 1c 20 20 20 20 20  20 20 20 20 20 e7 20 6c  |...          . l|
00001cf0  6f 6f 70 25 3d 70 6f 73  25 20 8c 0d 08 b6 39 20  |oop%=pos% ....9 |
00001d00  20 20 20 20 20 20 20 20  20 20 20 54 79 70 65 4d  |           TypeM|
00001d10  65 6e 75 25 21 6f 66 66  73 65 74 25 3d 28 28 54  |enu%!offset%=((T|
00001d20  79 70 65 4d 65 6e 75 25  21 6f 66 66 73 65 74 25  |ypeMenu%!offset%|
00001d30  29 84 31 29 0d 08 c0 0f  20 20 20 20 20 20 20 20  |).1)....        |
00001d40  20 20 cc 0d 08 ca 3c 20  20 20 20 20 20 20 20 20  |  ....<         |
00001d50  20 20 20 54 79 70 65 4d  65 6e 75 25 21 6f 66 66  |   TypeMenu%!off|
00001d60  73 65 74 25 3d 28 28 54  79 70 65 4d 65 6e 75 25  |set%=((TypeMenu%|
00001d70  21 6f 66 66 73 65 74 25  29 80 28 ac 31 29 29 0d  |!offset%).(.1)).|
00001d80  08 d4 0f 20 20 20 20 20  20 20 20 20 20 cd 0d 08  |...          ...|
00001d90  de 0d 20 20 20 20 20 20  20 20 ed 0d 08 e8 34 20  |..        ....4 |
00001da0  20 20 20 20 20 20 20 c8  99 20 22 57 69 6d 70 5f  |       .. "Wimp_|
00001db0  43 72 65 61 74 65 4d 65  6e 75 22 2c 2c 54 79 70  |CreateMenu",,Typ|
00001dc0  65 4d 65 6e 75 25 2c 78  25 2d 36 34 2c 79 25 0d  |eMenu%,x%-64,y%.|
00001dd0  08 f2 33 20 20 20 20 20  20 20 20 4d 65 6e 75 4f  |..3        MenuO|
00001de0  70 65 6e 25 3d 54 79 70  65 4d 65 6e 75 25 3a 4d  |pen%=TypeMenu%:M|
00001df0  65 6e 75 50 61 72 65 6e  74 25 3d 69 63 6f 6e 25  |enuParent%=icon%|
00001e00  81 33 0d 08 fc 0b 20 20  20 20 20 20 cd 0d 09 06  |.3....      ....|
00001e10  0a 20 20 20 20 20 20 0d  09 10 1b 20 20 20 20 20  |.      ....     |
00001e20  20 e7 20 28 69 63 6f 6e  25 20 83 20 33 29 3d 32  | . (icon% . 3)=2|
00001e30  20 8c 0d 09 1a 1e 20 20  20 20 20 20 20 20 21 74  | .....        !t|
00001e40  65 6d 70 25 3d 4d 61 69  6e 48 61 6e 64 6c 65 25  |emp%=MainHandle%|
00001e50  0d 09 24 19 20 20 20 20  20 20 20 20 74 65 6d 70  |..$.        temp|
00001e60  25 21 34 3d 69 63 6f 6e  25 0d 09 2e 29 20 20 20  |%!4=icon%...)   |
00001e70  20 20 20 20 20 c8 99 20  22 57 69 6d 70 5f 47 65  |     .. "Wimp_Ge|
00001e80  74 49 63 6f 6e 53 74 61  74 65 22 2c 2c 74 65 6d  |tIconState",,tem|
00001e90  70 25 0d 09 38 2b 20 20  20 20 20 20 20 20 73 65  |p%..8+        se|
00001ea0  6c 25 3d 28 28 28 74 65  6d 70 25 21 32 34 29 80  |l%=(((temp%!24).|
00001eb0  28 31 3c 3c 32 31 29 29  3e 3e 32 31 29 0d 09 42  |(1<<21))>>21)..B|
00001ec0  4d 20 20 20 20 20 20 20  20 3f 28 64 61 74 61 25  |M        ?(data%|
00001ed0  2b 31 32 2b 28 69 63 6f  6e 25 81 33 29 2a 31 32  |+12+(icon%.3)*12|
00001ee0  29 3d 28 28 28 3f 28 64  61 74 61 25 2b 31 32 2b  |)=(((?(data%+12+|
00001ef0  28 69 63 6f 6e 25 81 33  29 2a 31 32 29 29 80 28  |(icon%.3)*12)).(|
00001f00  ac 31 29 29 2b 73 65 6c  25 29 0d 09 4c 0b 20 20  |.1))+sel%)..L.  |
00001f10  20 20 20 20 cd 0d 09 56  09 20 20 20 20 cb 0d 09  |    ...V.    ...|
00001f20  60 0c 20 20 20 20 20 20  20 20 0d 09 6a 05 cb 0d  |`.        ..j...|
00001f30  09 74 05 e1 0d 09 7e 05  3a 0d 09 88 05 3a 0d 09  |.t....~.:....:..|
00001f40  92 05 3a 0d 09 9c 05 3a  0d 09 a6 0d dd f2 6d 65  |..:....:......me|
00001f50  6e 75 73 65 6c 0d 09 b0  18 ea 20 76 61 6c 25 2c  |nusel..... val%,|
00001f60  61 64 64 72 25 2c 61 64  6a 75 73 74 25 0d 09 ba  |addr%,adjust%...|
00001f70  23 c8 99 20 22 57 69 6d  70 5f 47 65 74 50 6f 69  |#.. "Wimp_GetPoi|
00001f80  6e 74 65 72 49 6e 66 6f  22 2c 2c 74 65 6d 70 25  |nterInfo",,temp%|
00001f90  0d 09 c4 25 e7 20 74 65  6d 70 25 21 38 3d 31 20  |...%. temp%!8=1 |
00001fa0  8c 61 64 6a 75 73 74 25  3d b9 20 8b 61 64 6a 75  |.adjust%=. .adju|
00001fb0  73 74 25 3d a3 0d 09 ce  12 c8 8e 20 4d 65 6e 75  |st%=....... Menu|
00001fc0  4f 70 65 6e 25 20 ca 0d  09 d8 11 20 20 c9 20 49  |Open% .....  . I|
00001fd0  63 6f 6e 4d 65 6e 75 25  0d 09 e2 1c 20 20 20 20  |conMenu%....    |
00001fe0  e7 20 21 62 6c 6f 63 6b  25 3d 31 20 8c 71 75 69  |. !block%=1 .qui|
00001ff0  74 25 3d b9 0d 09 ec 04  0d 09 f6 11 20 20 c9 20  |t%=.........  . |
00002000  54 79 70 65 4d 65 6e 75  25 0d 0a 00 1e 20 20 20  |TypeMenu%....   |
00002010  20 76 61 6c 25 3d 28 28  28 21 62 6c 6f 63 6b 25  | val%=(((!block%|
00002020  29 2b 31 29 83 33 29 0d  0a 0a 25 20 20 20 20 61  |)+1).3)...%    a|
00002030  64 64 72 25 3d 64 61 74  61 25 2b 31 32 2b 4d 65  |ddr%=data%+12+Me|
00002040  6e 75 50 61 72 65 6e 74  25 2a 31 32 0d 0a 14 2d  |nuParent%*12...-|
00002050  20 20 20 20 3f 61 64 64  72 25 3d 28 28 28 3f 61  |    ?addr%=(((?a|
00002060  64 64 72 25 29 80 25 31  31 31 31 31 31 29 84 28  |ddr%).%111111).(|
00002070  76 61 6c 25 3c 3c 36 29  29 0d 0a 1e 3e 20 20 20  |val%<<6))...>   |
00002080  20 24 28 a4 69 6e 64 69  72 61 64 64 72 28 4d 61  | $(.indiraddr(Ma|
00002090  69 6e 48 61 6e 64 6c 65  25 2c 4d 65 6e 75 50 61  |inHandle%,MenuPa|
000020a0  72 65 6e 74 25 2a 33 2b  31 29 29 3d 74 79 70 65  |rent%*3+1))=type|
000020b0  24 28 76 61 6c 25 29 0d  0a 28 47 20 20 20 20 21  |$(val%)..(G    !|
000020c0  74 65 6d 70 25 3d 4d 61  69 6e 48 61 6e 64 6c 65  |temp%=MainHandle|
000020d0  25 3a 74 65 6d 70 25 21  34 3d 4d 65 6e 75 50 61  |%:temp%!4=MenuPa|
000020e0  72 65 6e 74 25 2a 33 2b  31 3a 74 65 6d 70 25 21  |rent%*3+1:temp%!|
000020f0  38 3d 30 3a 74 65 6d 70  25 21 31 32 3d 30 0d 0a  |8=0:temp%!12=0..|
00002100  32 25 20 20 20 20 c8 99  20 22 57 69 6d 70 5f 53  |2%    .. "Wimp_S|
00002110  65 74 49 63 6f 6e 53 74  61 74 65 22 2c 2c 74 65  |etIconState",,te|
00002120  6d 70 25 0d 0a 3c 06 20  20 0d 0a 46 11 20 20 c9  |mp%..<.  ..F.  .|
00002130  20 4d 61 69 6e 4d 65 6e  75 25 0d 0a 50 14 20 20  | MainMenu%..P.  |
00002140  20 20 c8 8e 20 21 62 6c  6f 63 6b 25 20 ca 0d 0a  |  .. !block% ...|
00002150  5a 19 20 20 20 20 c9 20  30 3a f2 6d 65 6e 75 5f  |Z.    . 0:.menu_|
00002160  73 74 61 72 74 75 70 0d  0a 64 15 20 20 20 20 c9  |startup..d.    .|
00002170  20 31 3a f2 6d 65 6e 75  5f 73 65 6c 0d 0a 6e 09  | 1:.menu_sel..n.|
00002180  20 20 20 20 cb 0d 0a 78  08 20 20 20 20 0d 0a 82  |    ...x.    ...|
00002190  05 cb 0d 0a 8c 2e e7 20  61 64 6a 75 73 74 25 20  |....... adjust% |
000021a0  8c c8 99 20 22 57 69 6d  70 5f 43 72 65 61 74 65  |... "Wimp_Create|
000021b0  4d 65 6e 75 22 2c 2c 4d  65 6e 75 4f 70 65 6e 25  |Menu",,MenuOpen%|
000021c0  0d 0a 96 05 e1 0d 0a a0  05 3a 0d 0a aa 05 3a 0d  |.........:....:.|
000021d0  0a b4 12 dd f2 6d 65 6e  75 5f 73 74 61 72 74 75  |.....menu_startu|
000021e0  70 0d 0a be 0f ea 20 73  65 6c 25 2c 6f 6c 64 25  |p..... sel%,old%|
000021f0  0d 0a c8 11 73 65 6c 25  3d 62 6c 6f 63 6b 25 21  |....sel%=block%!|
00002200  34 0d 0a d2 0f e7 20 73  65 6c 25 3e 2d 31 20 8c  |4..... sel%>-1 .|
00002210  0d 0a dc 14 20 20 6f 6c  64 25 3d 64 61 74 61 25  |....  old%=data%|
00002220  3f 39 33 37 0d 0a e6 19  20 20 e7 20 6f 6c 64 25  |?937....  . old%|
00002230  3d 32 35 35 20 8c 6f 6c  64 25 3d 2d 31 0d 0a f0  |=255 .old%=-1...|
00002240  0d 20 20 6f 6c 64 25 2b  3d 31 0d 0a fa 3e 20 20  |.  old%+=1...>  |
00002250  21 28 4c 69 73 74 4d 65  6e 75 25 2b 32 38 2b 6f  |!(ListMenu%+28+o|
00002260  6c 64 25 2a 32 34 29 3d  28 28 21 28 4c 69 73 74  |ld%*24)=((!(List|
00002270  4d 65 6e 75 25 2b 32 38  2b 6f 6c 64 25 2a 32 34  |Menu%+28+old%*24|
00002280  29 29 80 28 ac 31 29 29  0d 0b 04 3b 20 20 21 28  |)).(.1))...;  !(|
00002290  4c 69 73 74 4d 65 6e 75  25 2b 32 38 2b 73 65 6c  |ListMenu%+28+sel|
000022a0  25 2a 32 34 29 3d 28 28  21 28 4c 69 73 74 4d 65  |%*24)=((!(ListMe|
000022b0  6e 75 25 2b 32 38 2b 73  65 6c 25 2a 32 34 29 29  |nu%+28+sel%*24))|
000022c0  84 31 29 0d 0b 0e 0d 20  20 73 65 6c 25 2d 3d 31  |.1)....  sel%-=1|
000022d0  0d 0b 18 19 20 20 e7 20  73 65 6c 25 3d 2d 31 20  |....  . sel%=-1 |
000022e0  8c 73 65 6c 25 3d 32 35  35 0d 0b 22 14 20 20 64  |.sel%=255..".  d|
000022f0  61 74 61 25 3f 39 33 37  3d 73 65 6c 25 0d 0b 2c  |ata%?937=sel%..,|
00002300  05 cd 0d 0b 36 05 e1 0d  0b 40 05 3a 0d 0b 4a 05  |....6....@.:..J.|
00002310  3a 0d 0b 54 0e dd f2 6d  65 6e 75 5f 73 65 6c 0d  |:..T...menu_sel.|
00002320  0b 5e 0a ea 20 73 65 6c  25 0d 0b 68 11 73 65 6c  |.^.. sel%..h.sel|
00002330  25 3d 62 6c 6f 63 6b 25  21 34 0d 0b 72 2b f4 20  |%=block%!4..r+. |
00002340  64 6f 75 62 6c 65 20 63  68 65 63 6b 20 69 66 20  |double check if |
00002350  65 76 65 72 79 74 68 69  6e 67 20 67 72 65 79 65  |everything greye|
00002360  64 20 6f 75 74 0d 0b 7c  16 e7 20 4d 65 6e 75 50  |d out..|.. MenuP|
00002370  61 72 65 6e 74 25 3e 2d  32 20 8c 0d 0b 86 0d c8  |arent%>-2 ......|
00002380  8e 20 73 65 6c 25 20 ca  0d 0b 90 23 20 20 c9 20  |. sel% ....#  . |
00002390  30 3a f2 6d 65 6e 75 5f  76 69 65 77 62 64 28 4d  |0:.menu_viewbd(M|
000023a0  65 6e 75 50 61 72 65 6e  74 25 29 0d 0b 9a 23 20  |enuParent%)...# |
000023b0  20 c9 20 31 3a f2 6d 65  6e 75 5f 6d 61 6b 65 62  | . 1:.menu_makeb|
000023c0  64 28 4d 65 6e 75 50 61  72 65 6e 74 25 29 0d 0b  |d(MenuParent%)..|
000023d0  a4 25 20 20 c9 20 32 3a  f2 6d 65 6e 75 5f 64 65  |.%  . 2:.menu_de|
000023e0  6c 65 74 65 62 64 28 4d  65 6e 75 50 61 72 65 6e  |letebd(MenuParen|
000023f0  74 25 29 0d 0b ae 26 20  20 c9 20 33 3a f2 6d 65  |t%)...&  . 3:.me|
00002400  6e 75 5f 69 6e 63 72 61  6e 64 6f 6d 28 4d 65 6e  |nu_incrandom(Men|
00002410  75 50 61 72 65 6e 74 25  29 0d 0b b8 26 20 20 c9  |uParent%)...&  .|
00002420  20 34 3a f2 6d 65 6e 75  5f 6e 6f 74 72 61 6e 64  | 4:.menu_notrand|
00002430  6f 6d 28 4d 65 6e 75 50  61 72 65 6e 74 25 29 0d  |om(MenuParent%).|
00002440  0b c2 23 20 20 c9 20 35  3a f2 6d 65 6e 75 5f 73  |..#  . 5:.menu_s|
00002450  63 61 6c 65 64 28 4d 65  6e 75 50 61 72 65 6e 74  |caled(MenuParent|
00002460  25 29 0d 0b cc 24 20 20  c9 20 36 3a f2 6d 65 6e  |%)...$  . 6:.men|
00002470  75 5f 63 65 6e 74 72 65  64 28 4d 65 6e 75 50 61  |u_centred(MenuPa|
00002480  72 65 6e 74 25 29 0d 0b  d6 22 20 20 c9 20 37 3a  |rent%)..."  . 7:|
00002490  f2 6d 65 6e 75 5f 74 69  6c 65 64 28 4d 65 6e 75  |.menu_tiled(Menu|
000024a0  50 61 72 65 6e 74 25 29  0d 0b e0 05 cb 0d 0b ea  |Parent%)........|
000024b0  05 cd 0d 0b f4 05 e1 0d  0b fe 05 3a 0d 0c 08 05  |...........:....|
000024c0  3a 0d 0c 12 48 dd f2 67  65 74 73 65 6c 6c 69 73  |:...H..getsellis|
000024d0  74 3a c8 99 20 22 57 69  6d 70 5f 57 68 69 63 68  |t:.. "Wimp_Which|
000024e0  49 63 6f 6e 22 2c 4d 61  69 6e 48 61 6e 64 6c 65  |Icon",MainHandle|
000024f0  25 2c 74 65 6d 70 25 2c  26 37 66 30 30 30 30 2c  |%,temp%,&7f0000,|
00002500  26 32 31 30 30 30 30 3a  e1 0d 0c 1c 05 3a 0d 0c  |&210000:.....:..|
00002510  26 05 3a 0d 0c 30 16 dd  f2 6d 65 6e 75 5f 76 69  |&.:..0...menu_vi|
00002520  65 77 62 64 28 6e 6f 25  29 0d 0c 3a 0d ea 20 6f  |ewbd(no%)..:.. o|
00002530  66 66 73 65 74 25 0d 0c  44 32 e7 20 6e 6f 25 3d  |ffset%..D2. no%=|
00002540  2d 31 20 8c f2 67 65 74  73 65 6c 6c 69 73 74 20  |-1 ..getsellist |
00002550  8b 21 74 65 6d 70 25 3d  6e 6f 25 2a 33 3a 74 65  |.!temp%=no%*3:te|
00002560  6d 70 25 21 34 3d 2d 31  0d 0c 4e 0d 6f 66 66 73  |mp%!4=-1..N.offs|
00002570  65 74 25 3d 30 0d 0c 58  15 c8 99 20 22 48 6f 75  |et%=0..X... "Hou|
00002580  72 67 6c 61 73 73 5f 4f  6e 22 0d 0c 62 19 c8 95  |rglass_On"..b...|
00002590  20 28 74 65 6d 70 25 21  6f 66 66 73 65 74 25 29  | (temp%!offset%)|
000025a0  3e 2d 31 0d 0c 6c 51 20  20 ff 20 22 46 69 6c 65  |>-1..lQ  . "File|
000025b0  72 5f 52 75 6e 20 42 61  63 6b 44 72 6f 70 73 3a  |r_Run BackDrops:|
000025c0  53 70 72 69 74 65 73 2e  22 2b a4 43 74 72 6c 54  |Sprites."+.CtrlT|
000025d0  65 72 6d 53 74 72 69 6e  67 28 64 61 74 61 25 2b  |ermString(data%+|
000025e0  31 2b 28 74 65 6d 70 25  21 6f 66 66 73 65 74 25  |1+(temp%!offset%|
000025f0  29 2a 34 29 0d 0c 76 10  20 20 6f 66 66 73 65 74  |)*4)..v.  offset|
00002600  25 2b 3d 34 0d 0c 80 05  ce 0d 0c 8a 16 c8 99 20  |%+=4........... |
00002610  22 48 6f 75 72 67 6c 61  73 73 5f 4f 66 66 22 0d  |"Hourglass_Off".|
00002620  0c 94 05 e1 0d 0c 9e 05  3a 0d 0c a8 05 3a 0d 0c  |........:....:..|
00002630  b2 16 dd f2 6d 65 6e 75  5f 6d 61 6b 65 62 64 28  |....menu_makebd(|
00002640  6e 6f 25 29 0d 0c bc 0a  ea 20 73 74 72 24 0d 0c  |no%)..... str$..|
00002650  c6 15 c8 99 20 22 48 6f  75 72 67 6c 61 73 73 5f  |.... "Hourglass_|
00002660  4f 6e 22 0d 0c d0 0d e7  20 6e 6f 25 3d 30 20 8c  |On"..... no%=0 .|
00002670  0d 0c da 1a 20 20 f4 20  72 65 6d 6f 76 65 20 62  |....  . remove b|
00002680  61 63 6b 64 72 6f 70 3f  3f 3f 0d 0c e4 05 cc 0d  |ackdrop???......|
00002690  0c ee 24 20 20 c8 8e 20  28 28 3f 28 64 61 74 61  |..$  .. ((?(data|
000026a0  25 2b 31 32 2b 6e 6f 25  2a 31 32 29 29 3e 3e 36  |%+12+no%*12))>>6|
000026b0  29 20 ca 0d 0c f8 18 20  20 20 20 c9 20 30 3a 73  |) .....    . 0:s|
000026c0  74 72 24 3d 22 2d 74 69  6c 65 22 0d 0d 02 19 20  |tr$="-tile".... |
000026d0  20 20 20 c9 20 31 3a 73  74 72 24 3d 22 2d 73 63  |   . 1:str$="-sc|
000026e0  61 6c 65 22 0d 0d 0c 18  20 20 20 20 7f 3a 73 74  |ale"....    .:st|
000026f0  72 24 3d 22 2d 63 65 6e  74 72 65 22 0d 0d 16 07  |r$="-centre"....|
00002700  20 20 cb 0d 0d 20 4e 20  20 ff 20 22 42 61 63 6b  |  ... N  . "Back|
00002710  44 72 6f 70 20 22 2b 73  74 72 24 2b 22 20 42 61  |Drop "+str$+" Ba|
00002720  63 6b 44 72 6f 70 73 3a  53 70 72 69 74 65 73 2e  |ckDrops:Sprites.|
00002730  22 2b a4 43 74 72 6c 54  65 72 6d 53 74 72 69 6e  |"+.CtrlTermStrin|
00002740  67 28 64 61 74 61 25 2b  31 2b 6e 6f 25 2a 31 32  |g(data%+1+no%*12|
00002750  29 0d 0d 2a 05 cd 0d 0d  34 16 c8 99 20 22 48 6f  |)..*....4... "Ho|
00002760  75 72 67 6c 61 73 73 5f  4f 66 66 22 0d 0d 3e 05  |urglass_Off"..>.|
00002770  e1 0d 0d 48 05 3a 0d 0d  52 05 3a 0d 0d 5c 18 dd  |...H.:..R.:..\..|
00002780  f2 6d 65 6e 75 5f 64 65  6c 65 74 65 62 64 28 6e  |.menu_deletebd(n|
00002790  6f 25 29 0d 0d 66 1d ea  20 6f 66 66 73 65 74 25  |o%)..f.. offset%|
000027a0  2c 6c 6f 6f 70 25 3a 6f  66 66 73 65 74 25 3d 30  |,loop%:offset%=0|
000027b0  0d 0d 70 15 c8 99 20 22  48 6f 75 72 67 6c 61 73  |..p... "Hourglas|
000027c0  73 5f 4f 6e 22 0d 0d 7a  32 e7 20 6e 6f 25 3d 2d  |s_On"..z2. no%=-|
000027d0  31 20 8c f2 67 65 74 73  65 6c 6c 69 73 74 20 8b  |1 ..getsellist .|
000027e0  21 74 65 6d 70 25 3d 6e  6f 25 2a 33 3a 74 65 6d  |!temp%=no%*3:tem|
000027f0  70 25 21 34 3d 2d 31 0d  0d 84 19 c8 95 20 28 74  |p%!4=-1...... (t|
00002800  65 6d 70 25 21 6f 66 66  73 65 74 25 29 3e 2d 31  |emp%!offset%)>-1|
00002810  0d 0d 8e 29 20 20 6e 6f  25 3d 28 28 74 65 6d 70  |...)  no%=((temp|
00002820  25 21 6f 66 66 73 65 74  25 29 81 33 29 2d 28 6f  |%!offset%).3)-(o|
00002830  66 66 73 65 74 25 81 34  29 0d 0d 98 59 20 20 c8  |ffset%.4)...Y  .|
00002840  99 20 22 58 4f 53 5f 43  4c 49 22 2c 22 57 69 70  |. "XOS_CLI","Wip|
00002850  65 20 42 61 63 6b 44 72  6f 70 73 3a 53 70 72 69  |e BackDrops:Spri|
00002860  74 65 73 2e 22 2b a4 43  74 72 6c 54 65 72 6d 53  |tes."+.CtrlTermS|
00002870  74 72 69 6e 67 28 64 61  74 61 25 2b 6e 6f 25 2a  |tring(data%+no%*|
00002880  31 32 2b 31 29 2b 22 20  46 20 52 20 7e 43 20 7e  |12+1)+" F R ~C ~|
00002890  56 22 0d 0d a2 14 20 20  e7 20 6e 6f 25 3c 3f 64  |V"....  . no%<?d|
000028a0  61 74 61 25 20 8c 0d 0d  ac 1e 20 20 20 20 e3 20  |ata% .....    . |
000028b0  6c 6f 6f 70 25 3d 6e 6f  25 20 b8 20 3f 64 61 74  |loop%=no% . ?dat|
000028c0  61 25 2d 31 0d 0d b6 32  20 20 20 20 20 20 21 28  |a%-1...2      !(|
000028d0  64 61 74 61 25 2b 6c 6f  6f 70 25 2a 31 32 2b 31  |data%+loop%*12+1|
000028e0  29 3d 21 28 64 61 74 61  25 2b 6c 6f 6f 70 25 2a  |)=!(data%+loop%*|
000028f0  31 32 2b 31 33 29 0d 0d  c0 32 20 20 20 20 20 20  |12+13)...2      |
00002900  21 28 64 61 74 61 25 2b  6c 6f 6f 70 25 2a 31 32  |!(data%+loop%*12|
00002910  2b 35 29 3d 21 28 64 61  74 61 25 2b 6c 6f 6f 70  |+5)=!(data%+loop|
00002920  25 2a 31 32 2b 31 37 29  0d 0d ca 32 20 20 20 20  |%*12+17)...2    |
00002930  20 20 21 28 64 61 74 61  25 2b 6c 6f 6f 70 25 2a  |  !(data%+loop%*|
00002940  31 32 2b 39 29 3d 21 28  64 61 74 61 25 2b 6c 6f  |12+9)=!(data%+lo|
00002950  6f 70 25 2a 31 32 2b 32  31 29 0d 0d d4 09 20 20  |op%*12+21)....  |
00002960  20 20 ed 0d 0d de 07 20  20 cd 0d 0d e8 1f 20 20  |  .....  .....  |
00002970  21 28 64 61 74 61 25 2b  28 3f 64 61 74 61 25 29  |!(data%+(?data%)|
00002980  2a 31 32 2b 31 29 3d 31  30 0d 0d f2 1e 20 20 21  |*12+1)=10....  !|
00002990  28 64 61 74 61 25 2b 28  3f 64 61 74 61 25 29 2a  |(data%+(?data%)*|
000029a0  31 32 2b 35 29 3d 30 0d  0d fc 1e 20 20 21 28 64  |12+5)=0....  !(d|
000029b0  61 74 61 25 2b 28 3f 64  61 74 61 25 29 2a 31 32  |ata%+(?data%)*12|
000029c0  2b 39 29 3d 30 0d 0e 06  0f 20 20 3f 64 61 74 61  |+9)=0....  ?data|
000029d0  25 2d 3d 31 0d 0e 10 10  20 20 6f 66 66 73 65 74  |%-=1....  offset|
000029e0  25 2b 3d 34 0d 0e 1a 05  ce 0d 0e 24 0f f2 75 70  |%+=4.......$..up|
000029f0  64 61 74 65 6c 69 73 74  0d 0e 2e 16 21 74 65 6d  |datelist....!tem|
00002a00  70 25 3d 4d 61 69 6e 48  61 6e 64 6c 65 25 0d 0e  |p%=MainHandle%..|
00002a10  38 16 e3 20 6c 6f 6f 70  25 3d 30 20 b8 20 32 33  |8.. loop%=0 . 23|
00002a20  31 20 88 33 0d 0e 42 13  20 20 74 65 6d 70 25 21  |1 .3..B.  temp%!|
00002a30  34 3d 6c 6f 6f 70 25 0d  0e 4c 23 20 20 c8 99 20  |4=loop%..L#  .. |
00002a40  22 57 69 6d 70 5f 47 65  74 49 63 6f 6e 53 74 61  |"Wimp_GetIconSta|
00002a50  74 65 22 2c 2c 74 65 6d  70 25 0d 0e 56 5d 20 20  |te",,temp%..V]  |
00002a60  e7 20 28 28 74 65 6d 70  25 21 32 34 29 80 28 31  |. ((temp%!24).(1|
00002a70  3c 3c 32 31 29 29 3d 28  31 3c 3c 32 31 29 20 8c  |<<21))=(1<<21) .|
00002a80  20 74 65 6d 70 25 21 38  3d 30 3a 74 65 6d 70 25  | temp%!8=0:temp%|
00002a90  21 31 32 3d 31 3c 3c 32  31 3a c8 99 20 22 57 69  |!12=1<<21:.. "Wi|
00002aa0  6d 70 5f 53 65 74 49 63  6f 6e 53 74 61 74 65 22  |mp_SetIconState"|
00002ab0  2c 2c 74 65 6d 70 25 0d  0e 60 05 ed 0d 0e 6a 42  |,,temp%..`....jB|
00002ac0  53 65 6c 4d 65 6e 75 25  21 33 36 3d 26 37 34 30  |SelMenu%!36=&740|
00002ad0  30 30 32 31 3a 53 65 6c  4d 65 6e 75 25 21 36 30  |0021:SelMenu%!60|
00002ae0  3d 26 37 34 30 30 31 32  31 3a 53 65 6c 4d 65 6e  |=&7400121:SelMen|
00002af0  75 25 21 38 34 3d 26 37  34 30 30 30 32 31 0d 0e  |u%!84=&7400021..|
00002b00  74 45 53 65 6c 4d 65 6e  75 25 21 31 30 38 3d 26  |tESelMenu%!108=&|
00002b10  37 34 30 30 31 32 31 3a  53 65 6c 4d 65 6e 75 25  |7400121:SelMenu%|
00002b20  21 31 33 32 3d 26 37 34  30 30 31 32 31 3a 53 65  |!132=&7400121:Se|
00002b30  6c 4d 65 6e 75 25 21 31  35 36 3d 26 37 34 30 30  |lMenu%!156=&7400|
00002b40  30 32 31 0d 0e 7e 2f 53  65 6c 4d 65 6e 75 25 21  |021..~/SelMenu%!|
00002b50  31 38 30 3d 26 37 34 30  30 30 32 31 3a 53 65 6c  |180=&7400021:Sel|
00002b60  4d 65 6e 75 25 21 32 30  34 3d 26 37 34 30 30 30  |Menu%!204=&74000|
00002b70  32 31 0d 0e 88 50 53 65  6c 4d 65 6e 75 25 21 31  |21...PSelMenu%!1|
00002b80  30 30 3d 30 3a 53 65 6c  4d 65 6e 75 25 21 31 32  |00=0:SelMenu%!12|
00002b90  34 3d 32 3a 53 65 6c 4d  65 6e 75 25 21 31 34 38  |4=2:SelMenu%!148|
00002ba0  3d 30 3a 53 65 6c 4d 65  6e 75 25 21 31 37 36 3d  |=0:SelMenu%!176=|
00002bb0  30 3a 53 65 6c 4d 65 6e  75 25 21 31 39 36 3d 26  |0:SelMenu%!196=&|
00002bc0  38 30 0d 0e 92 33 24 53  65 6c 4d 65 6e 75 25 3d  |80...3$SelMenu%=|
00002bd0  22 42 61 63 6b 64 72 6f  70 22 3a 24 28 4d 61 69  |"Backdrop":$(Mai|
00002be0  6e 4d 65 6e 75 25 21 36  34 29 3d 22 42 61 63 6b  |nMenu%!64)="Back|
00002bf0  64 72 6f 70 22 0d 0e 9c  15 4d 61 69 6e 4d 65 6e  |drop"....MainMen|
00002c00  75 25 21 31 36 3d 39 2a  31 36 0d 0e a6 19 4d 61  |u%!16=9*16....Ma|
00002c10  69 6e 4d 65 6e 75 25 21  36 30 3d 26 37 34 30 30  |inMenu%!60=&7400|
00002c20  31 32 31 0d 0e b0 12 4d  65 6e 75 50 61 72 65 6e  |121....MenuParen|
00002c30  74 25 3d 2d 32 0d 0e ba  16 c8 99 20 22 48 6f 75  |t%=-2...... "Hou|
00002c40  72 67 6c 61 73 73 5f 4f  66 66 22 0d 0e c4 05 e1  |rglass_Off".....|
00002c50  0d 0e ce 05 3a 0d 0e d8  05 3a 0d 0e e2 19 dd f2  |....:....:......|
00002c60  6d 65 6e 75 5f 69 6e 63  72 61 6e 64 6f 6d 28 6e  |menu_incrandom(n|
00002c70  6f 25 29 0d 0e ec 0d ea  20 6f 66 66 73 65 74 25  |o%)..... offset%|
00002c80  0d 0e f6 32 e7 20 6e 6f  25 3d 2d 31 20 8c f2 67  |...2. no%=-1 ..g|
00002c90  65 74 73 65 6c 6c 69 73  74 20 8b 21 74 65 6d 70  |etsellist .!temp|
00002ca0  25 3d 6e 6f 25 2a 33 3a  74 65 6d 70 25 21 34 3d  |%=no%*3:temp%!4=|
00002cb0  2d 31 0d 0f 00 0d 6f 66  66 73 65 74 25 3d 30 0d  |-1....offset%=0.|
00002cc0  0f 0a 19 c8 95 20 28 74  65 6d 70 25 21 6f 66 66  |..... (temp%!off|
00002cd0  73 65 74 25 29 3e 2d 31  0d 0f 14 23 20 20 f2 6d  |set%)>-1...#  .m|
00002ce0  61 6b 65 69 6e 63 28 28  74 65 6d 70 25 21 6f 66  |akeinc((temp%!of|
00002cf0  66 73 65 74 25 29 81 33  2c 31 29 0d 0f 1e 10 20  |fset%).3,1).... |
00002d00  20 6f 66 66 73 65 74 25  2b 3d 34 0d 0f 28 05 ce  | offset%+=4..(..|
00002d10  0d 0f 32 0e e7 20 6e 6f  25 3e 2d 31 20 8c 0d 0f  |..2.. no%>-1 ...|
00002d20  3c 14 20 20 53 65 6c 4d  65 6e 75 25 21 31 30 30  |<.  SelMenu%!100|
00002d30  3d 31 0d 0f 46 14 20 20  53 65 6c 4d 65 6e 75 25  |=1..F.  SelMenu%|
00002d40  21 31 32 34 3d 32 0d 0f  50 05 cd 0d 0f 5a 05 e1  |!124=2..P....Z..|
00002d50  0d 0f 64 05 3a 0d 0f 6e  19 dd f2 6d 65 6e 75 5f  |..d.:..n...menu_|
00002d60  6e 6f 74 72 61 6e 64 6f  6d 28 6e 6f 25 29 0d 0f  |notrandom(no%)..|
00002d70  78 0d ea 20 6f 66 66 73  65 74 25 0d 0f 82 32 e7  |x.. offset%...2.|
00002d80  20 6e 6f 25 3d 2d 31 20  8c f2 67 65 74 73 65 6c  | no%=-1 ..getsel|
00002d90  6c 69 73 74 20 8b 21 74  65 6d 70 25 3d 6e 6f 25  |list .!temp%=no%|
00002da0  2a 33 3a 74 65 6d 70 25  21 34 3d 2d 31 0d 0f 8c  |*3:temp%!4=-1...|
00002db0  0d 6f 66 66 73 65 74 25  3d 30 0d 0f 96 19 c8 95  |.offset%=0......|
00002dc0  20 28 74 65 6d 70 25 21  6f 66 66 73 65 74 25 29  | (temp%!offset%)|
00002dd0  3e 2d 31 0d 0f a0 23 20  20 f2 6d 61 6b 65 69 6e  |>-1...#  .makein|
00002de0  63 28 28 74 65 6d 70 25  21 6f 66 66 73 65 74 25  |c((temp%!offset%|
00002df0  29 81 33 2c 30 29 0d 0f  aa 10 20 20 6f 66 66 73  |).3,0)....  offs|
00002e00  65 74 25 2b 3d 34 0d 0f  b4 05 ce 0d 0f be 0e e7  |et%+=4..........|
00002e10  20 6e 6f 25 3e 2d 31 20  8c 0d 0f c8 14 20 20 53  | no%>-1 .....  S|
00002e20  65 6c 4d 65 6e 75 25 21  31 30 30 3d 30 0d 0f d2  |elMenu%!100=0...|
00002e30  14 20 20 53 65 6c 4d 65  6e 75 25 21 31 32 34 3d  |.  SelMenu%!124=|
00002e40  33 0d 0f dc 05 cd 0d 0f  e6 05 e1 0d 0f f0 05 3a  |3..............:|
00002e50  0d 0f fa 1a dd f2 6d 61  6b 65 69 6e 63 28 61 64  |......makeinc(ad|
00002e60  64 72 25 2c 66 6c 61 67  25 29 0d 10 04 17 21 62  |dr%,flag%)....!b|
00002e70  6c 6f 63 6b 25 3d 4d 61  69 6e 48 61 6e 64 6c 65  |lock%=MainHandle|
00002e80  25 0d 10 0e 16 62 6c 6f  63 6b 25 21 34 3d 61 64  |%....block%!4=ad|
00002e90  64 72 25 2a 33 2b 32 0d  10 18 16 62 6c 6f 63 6b  |dr%*3+2....block|
00002ea0  25 21 38 3d 66 6c 61 67  25 3c 3c 32 31 0d 10 22  |%!8=flag%<<21.."|
00002eb0  13 62 6c 6f 63 6b 25 21  31 32 3d 31 3c 3c 32 31  |.block%!12=1<<21|
00002ec0  0d 10 2c 22 c8 99 20 22  57 69 6d 70 5f 53 65 74  |..,".. "Wimp_Set|
00002ed0  49 63 6f 6e 53 74 61 74  65 22 2c 2c 62 6c 6f 63  |IconState",,bloc|
00002ee0  6b 25 0d 10 36 1b 61 64  64 72 25 3d 64 61 74 61  |k%..6.addr%=data|
00002ef0  25 2b 31 32 2b 61 64 64  72 25 2a 31 32 0d 10 40  |%+12+addr%*12..@|
00002f00  22 3f 61 64 64 72 25 3d  28 28 28 3f 61 64 64 72  |"?addr%=(((?addr|
00002f10  25 29 80 28 ac 31 29 29  84 66 6c 61 67 25 29 0d  |%).(.1)).flag%).|
00002f20  10 4a 05 e1 0d 10 54 05  3a 0d 10 5e 05 3a 0d 10  |.J....T.:..^.:..|
00002f30  68 16 dd f2 6d 65 6e 75  5f 73 63 61 6c 65 64 28  |h...menu_scaled(|
00002f40  6e 6f 25 29 0d 10 72 0d  ea 20 6f 66 66 73 65 74  |no%)..r.. offset|
00002f50  25 0d 10 7c 32 e7 20 6e  6f 25 3d 2d 31 20 8c f2  |%..|2. no%=-1 ..|
00002f60  67 65 74 73 65 6c 6c 69  73 74 20 8b 21 74 65 6d  |getsellist .!tem|
00002f70  70 25 3d 6e 6f 25 2a 33  3a 74 65 6d 70 25 21 34  |p%=no%*3:temp%!4|
00002f80  3d 2d 31 0d 10 86 0d 6f  66 66 73 65 74 25 3d 30  |=-1....offset%=0|
00002f90  0d 10 90 19 c8 95 20 28  74 65 6d 70 25 21 6f 66  |...... (temp%!of|
00002fa0  66 73 65 74 25 29 3e 2d  31 0d 10 9a 24 20 20 f2  |fset%)>-1...$  .|
00002fb0  6d 61 6b 65 74 79 70 65  28 28 74 65 6d 70 25 21  |maketype((temp%!|
00002fc0  6f 66 66 73 65 74 25 29  81 33 2c 31 29 0d 10 a4  |offset%).3,1)...|
00002fd0  10 20 20 6f 66 66 73 65  74 25 2b 3d 34 0d 10 ae  |.  offset%+=4...|
00002fe0  05 ce 0d 10 b8 0e e7 20  6e 6f 25 3e 2d 31 20 8c  |....... no%>-1 .|
00002ff0  0d 10 c2 14 20 20 53 65  6c 4d 65 6e 75 25 21 31  |....  SelMenu%!1|
00003000  34 38 3d 31 0d 10 cc 14  20 20 53 65 6c 4d 65 6e  |48=1....  SelMen|
00003010  75 25 21 31 37 32 3d 30  0d 10 d6 16 20 20 53 65  |u%!172=0....  Se|
00003020  6c 4d 65 6e 75 25 21 31  39 36 3d 26 38 30 0d 10  |lMenu%!196=&80..|
00003030  e0 05 cd 0d 10 ea 05 e1  0d 10 f4 05 3a 0d 10 fe  |............:...|
00003040  17 dd f2 6d 65 6e 75 5f  63 65 6e 74 72 65 64 28  |...menu_centred(|
00003050  6e 6f 25 29 0d 11 08 0d  ea 20 6f 66 66 73 65 74  |no%)..... offset|
00003060  25 0d 11 12 32 e7 20 6e  6f 25 3d 2d 31 20 8c f2  |%...2. no%=-1 ..|
00003070  67 65 74 73 65 6c 6c 69  73 74 20 8b 21 74 65 6d  |getsellist .!tem|
00003080  70 25 3d 6e 6f 25 2a 33  3a 74 65 6d 70 25 21 34  |p%=no%*3:temp%!4|
00003090  3d 2d 31 0d 11 1c 0d 6f  66 66 73 65 74 25 3d 30  |=-1....offset%=0|
000030a0  0d 11 26 19 c8 95 20 28  74 65 6d 70 25 21 6f 66  |..&... (temp%!of|
000030b0  66 73 65 74 25 29 3e 2d  31 0d 11 30 24 20 20 f2  |fset%)>-1..0$  .|
000030c0  6d 61 6b 65 74 79 70 65  28 28 74 65 6d 70 25 21  |maketype((temp%!|
000030d0  6f 66 66 73 65 74 25 29  81 33 2c 32 29 0d 11 3a  |offset%).3,2)..:|
000030e0  10 20 20 6f 66 66 73 65  74 25 2b 3d 34 0d 11 44  |.  offset%+=4..D|
000030f0  05 ce 0d 11 4e 0e e7 20  6e 6f 25 3e 2d 31 20 8c  |....N.. no%>-1 .|
00003100  0d 11 58 14 20 20 53 65  6c 4d 65 6e 75 25 21 31  |..X.  SelMenu%!1|
00003110  34 38 3d 30 0d 11 62 14  20 20 53 65 6c 4d 65 6e  |48=0..b.  SelMen|
00003120  75 25 21 31 37 32 3d 31  0d 11 6c 16 20 20 53 65  |u%!172=1..l.  Se|
00003130  6c 4d 65 6e 75 25 21 31  39 36 3d 26 38 30 0d 11  |lMenu%!196=&80..|
00003140  76 05 cd 0d 11 80 05 e1  0d 11 8a 05 3a 0d 11 94  |v...........:...|
00003150  15 dd f2 6d 65 6e 75 5f  74 69 6c 65 64 28 6e 6f  |...menu_tiled(no|
00003160  25 29 0d 11 9e 0d ea 20  6f 66 66 73 65 74 25 0d  |%)..... offset%.|
00003170  11 a8 32 e7 20 6e 6f 25  3d 2d 31 20 8c f2 67 65  |..2. no%=-1 ..ge|
00003180  74 73 65 6c 6c 69 73 74  20 8b 21 74 65 6d 70 25  |tsellist .!temp%|
00003190  3d 6e 6f 25 2a 33 3a 74  65 6d 70 25 21 34 3d 2d  |=no%*3:temp%!4=-|
000031a0  31 0d 11 b2 0d 6f 66 66  73 65 74 25 3d 30 0d 11  |1....offset%=0..|
000031b0  bc 19 c8 95 20 28 74 65  6d 70 25 21 6f 66 66 73  |.... (temp%!offs|
000031c0  65 74 25 29 3e 2d 31 0d  11 c6 24 20 20 f2 6d 61  |et%)>-1...$  .ma|
000031d0  6b 65 74 79 70 65 28 28  74 65 6d 70 25 21 6f 66  |ketype((temp%!of|
000031e0  66 73 65 74 25 29 81 33  2c 30 29 0d 11 d0 10 20  |fset%).3,0).... |
000031f0  20 6f 66 66 73 65 74 25  2b 3d 34 0d 11 da 05 ce  | offset%+=4.....|
00003200  0d 11 e4 0e e7 20 6e 6f  25 3e 2d 31 20 8c 0d 11  |..... no%>-1 ...|
00003210  ee 14 20 20 53 65 6c 4d  65 6e 75 25 21 31 34 38  |..  SelMenu%!148|
00003220  3d 30 0d 11 f8 14 20 20  53 65 6c 4d 65 6e 75 25  |=0....  SelMenu%|
00003230  21 31 37 32 3d 30 0d 12  02 16 20 20 53 65 6c 4d  |!172=0....  SelM|
00003240  65 6e 75 25 21 31 39 36  3d 26 38 31 0d 12 0c 05  |enu%!196=&81....|
00003250  cd 0d 12 16 05 e1 0d 12  20 05 3a 0d 12 2a 1b dd  |........ .:..*..|
00003260  f2 6d 61 6b 65 74 79 70  65 28 61 64 64 72 25 2c  |.maketype(addr%,|
00003270  74 79 70 65 25 29 0d 12  34 17 21 62 6c 6f 63 6b  |type%)..4.!block|
00003280  25 3d 4d 61 69 6e 48 61  6e 64 6c 65 25 0d 12 3e  |%=MainHandle%..>|
00003290  16 62 6c 6f 63 6b 25 21  34 3d 61 64 64 72 25 2a  |.block%!4=addr%*|
000032a0  33 2b 31 0d 12 48 22 c8  99 20 22 57 69 6d 70 5f  |3+1..H".. "Wimp_|
000032b0  47 65 74 49 63 6f 6e 53  74 61 74 65 22 2c 2c 62  |GetIconState",,b|
000032c0  6c 6f 63 6b 25 0d 12 52  1d 24 28 62 6c 6f 63 6b  |lock%..R.$(block|
000032d0  25 21 32 38 29 3d 74 79  70 65 24 28 74 79 70 65  |%!28)=type$(type|
000032e0  25 29 0d 12 5c 1a 62 6c  6f 63 6b 25 21 38 3d 30  |%)..\.block%!8=0|
000032f0  3a 62 6c 6f 63 6b 25 21  31 32 3d 30 0d 12 66 22  |:block%!12=0..f"|
00003300  c8 99 20 22 57 69 6d 70  5f 53 65 74 49 63 6f 6e  |.. "Wimp_SetIcon|
00003310  53 74 61 74 65 22 2c 2c  62 6c 6f 63 6b 25 0d 12  |State",,block%..|
00003320  70 14 74 79 70 65 25 3d  28 74 79 70 65 25 3c 3c  |p.type%=(type%<<|
00003330  36 29 0d 12 7a 1b 61 64  64 72 25 3d 64 61 74 61  |6)..z.addr%=data|
00003340  25 2b 31 32 2b 61 64 64  72 25 2a 31 32 0d 12 84  |%+12+addr%*12...|
00003350  20 3f 61 64 64 72 25 3d  28 28 28 3f 61 64 64 72  | ?addr%=(((?addr|
00003360  25 29 80 36 33 29 2b 74  79 70 65 25 29 0d 12 8e  |%).63)+type%)...|
00003370  05 e1 0d 12 98 05 e1 0d  12 a2 05 3a 0d 12 ac 05  |...........:....|
00003380  3a 0d 12 b6 05 3a 0d 12  c0 05 3a 0d 12 ca 14 dd  |:....:....:.....|
00003390  f2 6d 65 73 73 61 67 65  28 6d 65 73 73 25 29 0d  |.message(mess%).|
000033a0  12 d4 15 ea 20 66 69 6c  65 6e 61 6d 65 24 2c 6e  |.... filename$,n|
000033b0  61 6d 65 24 0d 12 de 0e  c8 8e 20 6d 65 73 73 25  |ame$...... mess%|
000033c0  20 ca 0d 12 e8 09 20 20  c9 20 30 0d 12 f2 0f 20  | .....  . 0.... |
000033d0  20 20 20 71 75 69 74 25  3d b9 0d 12 fc 06 20 20  |   quit%=.....  |
000033e0  0d 13 06 09 20 20 c9 20  31 0d 13 10 1a 20 20 20  |....  . 1....   |
000033f0  20 e7 20 62 6c 6f 63 6b  25 21 34 30 3d 26 46 46  | . block%!40=&FF|
00003400  39 20 8c 0d 13 1a 2e 20  20 20 20 20 20 66 69 6c  |9 .....      fil|
00003410  65 6e 61 6d 65 24 3d a4  43 74 72 6c 54 65 72 6d  |ename$=.CtrlTerm|
00003420  53 74 72 69 6e 67 28 62  6c 6f 63 6b 25 2b 34 34  |String(block%+44|
00003430  29 0d 13 24 20 20 20 20  20 20 20 e7 20 a4 65 78  |)..$       . .ex|
00003440  69 73 74 73 28 66 69 6c  65 6e 61 6d 65 24 29 20  |ists(filename$) |
00003450  8c 0d 13 2e 56 20 20 20  20 20 20 20 20 f2 65 72  |....V        .er|
00003460  72 6f 72 28 22 41 20 62  61 63 6b 64 72 6f 70 20  |ror("A backdrop |
00003470  77 69 74 68 20 74 68 65  20 66 69 6c 65 6e 61 6d  |with the filenam|
00003480  65 20 27 22 2b 66 69 6c  65 6e 61 6d 65 24 2b 22  |e '"+filename$+"|
00003490  27 20 61 6c 72 65 61 64  79 20 65 78 69 73 74 73  |' already exists|
000034a0  22 2c 22 22 2c 32 29 0d  13 38 0b 20 20 20 20 20  |","",2)..8.     |
000034b0  20 cc 0d 13 42 19 20 20  20 20 20 20 20 20 e7 20  | ...B.        . |
000034c0  3f 64 61 74 61 25 3d 37  37 20 8c 0d 13 4c 3b 20  |?data%=77 ...L; |
000034d0  20 20 20 20 20 20 20 20  20 f2 65 72 72 6f 72 28  |         .error(|
000034e0  22 59 6f 75 20 63 61 6e  20 6f 6e 6c 79 20 68 61  |"You can only ha|
000034f0  76 65 20 37 37 20 62 61  63 6b 64 72 6f 70 73 22  |ve 77 backdrops"|
00003500  2c 22 22 2c 32 29 0d 13  56 0d 20 20 20 20 20 20  |,"",2)..V.      |
00003510  20 20 cc 0d 13 60 1a 20  20 20 20 20 20 20 20 20  |  ...`.         |
00003520  20 62 6c 6f 63 6b 25 21  33 36 3d 2d 31 0d 13 6a  | block%!36=-1..j|
00003530  20 20 20 20 20 20 20 20  20 20 20 62 6c 6f 63 6b  |           block|
00003540  25 21 31 32 3d 62 6c 6f  63 6b 25 21 38 0d 13 74  |%!12=block%!8..t|
00003550  44 20 20 20 20 20 20 20  20 20 20 24 28 62 6c 6f  |D          $(blo|
00003560  63 6b 25 2b 34 34 29 3d  22 3c 57 69 6d 70 24 53  |ck%+44)="<Wimp$S|
00003570  63 72 61 70 44 69 72 3e  2e 42 61 63 6b 44 72 6f  |crapDir>.BackDro|
00003580  70 73 2e 22 2b 66 69 6c  65 6e 61 6d 65 24 2b bd  |ps."+filename$+.|
00003590  30 0d 13 7e 19 20 20 20  20 20 20 20 20 20 20 21  |0..~.          !|
000035a0  62 6c 6f 63 6b 25 3d 32  35 36 0d 13 88 19 20 20  |block%=256....  |
000035b0  20 20 20 20 20 20 20 20  62 6c 6f 63 6b 25 21 31  |        block%!1|
000035c0  36 3d 32 0d 13 92 36 20  20 20 20 20 20 20 20 20  |6=2...6         |
000035d0  20 c8 99 20 22 57 69 6d  70 5f 53 65 6e 64 4d 65  | .. "Wimp_SendMe|
000035e0  73 73 61 67 65 22 2c 31  37 2c 62 6c 6f 63 6b 25  |ssage",17,block%|
000035f0  2c 62 6c 6f 63 6b 25 21  34 0d 13 9c 0d 20 20 20  |,block%!4....   |
00003600  20 20 20 20 20 cd 0d 13  a6 0b 20 20 20 20 20 20  |     .....      |
00003610  cd 0d 13 b0 09 20 20 20  20 cd 0d 13 ba 08 20 20  |.....    .....  |
00003620  20 20 0d 13 c4 0b 20 20  20 20 c9 20 33 0d 13 ce  |  ....    . 3...|
00003630  1c 20 20 20 20 20 20 e7  20 62 6c 6f 63 6b 25 21  |.      . block%!|
00003640  34 30 3d 26 46 46 39 20  8c 0d 13 d8 30 20 20 20  |40=&FF9 ....0   |
00003650  20 20 20 20 20 66 69 6c  65 6e 61 6d 65 24 3d a4  |     filename$=.|
00003660  43 74 72 6c 54 65 72 6d  53 74 72 69 6e 67 28 62  |CtrlTermString(b|
00003670  6c 6f 63 6b 25 2b 34 34  29 0d 13 e2 3d 20 20 20  |lock%+44)...=   |
00003680  20 20 20 20 20 e7 20 28  a4 65 78 69 73 74 73 28  |     . (.exists(|
00003690  a4 6c 65 61 66 6e 61 6d  65 28 66 69 6c 65 6e 61  |.leafname(filena|
000036a0  6d 65 24 29 29 29 20 84  20 28 3f 64 61 74 61 25  |me$))) . (?data%|
000036b0  3d 37 37 29 20 8c 0d 13  ec 1b 20 20 20 20 20 20  |=77) .....      |
000036c0  20 20 20 20 e7 20 3f 64  61 74 61 25 3d 37 37 20  |    . ?data%=77 |
000036d0  8c 0d 13 f6 3d 20 20 20  20 20 20 20 20 20 20 20  |....=           |
000036e0  20 f2 65 72 72 6f 72 28  22 59 6f 75 20 63 61 6e  | .error("You can|
000036f0  20 6f 6e 6c 79 20 68 61  76 65 20 37 37 20 62 61  | only have 77 ba|
00003700  63 6b 64 72 6f 70 73 22  2c 22 22 2c 32 29 0d 14  |ckdrops","",2)..|
00003710  00 0f 20 20 20 20 20 20  20 20 20 20 cc 0d 14 0a  |..          ....|
00003720  65 20 20 20 20 20 20 20  20 20 20 20 20 f2 65 72  |e            .er|
00003730  72 6f 72 28 22 41 20 62  61 63 6b 64 72 6f 70 20  |ror("A backdrop |
00003740  77 69 74 68 20 74 68 65  20 66 69 6c 65 6e 61 6d  |with the filenam|
00003750  65 20 27 22 2b a4 6c 65  61 66 6e 61 6d 65 28 66  |e '"+.leafname(f|
00003760  69 6c 65 6e 61 6d 65 24  29 2b 22 27 20 61 6c 72  |ilename$)+"' alr|
00003770  65 61 64 79 20 65 78 69  73 74 73 22 2c 22 22 2c  |eady exists","",|
00003780  32 29 0d 14 14 0f 20 20  20 20 20 20 20 20 20 20  |2)....          |
00003790  cd 0d 14 1e 35 20 20 20  20 20 20 20 20 20 20 e7  |....5          .|
000037a0  20 a4 63 61 70 73 28 c0  66 69 6c 65 6e 61 6d 65  | .caps(.filename|
000037b0  24 2c 31 31 29 29 3d 22  3c 57 49 4d 50 24 53 43  |$,11))="<WIMP$SC|
000037c0  52 41 50 22 20 8c 0d 14  28 3b 20 20 20 20 20 20  |RAP" ...(;      |
000037d0  20 20 20 20 20 20 c8 99  20 22 58 4f 53 5f 43 4c  |      .. "XOS_CL|
000037e0  49 22 2c 22 57 69 70 65  20 22 2b 66 69 6c 65 6e  |I","Wipe "+filen|
000037f0  61 6d 65 24 2b 22 20 46  20 52 20 7e 43 20 7e 56  |ame$+" F R ~C ~V|
00003800  22 0d 14 32 0f 20 20 20  20 20 20 20 20 20 20 cd  |"..2.          .|
00003810  0d 14 3c 0d 20 20 20 20  20 20 20 20 cc 0d 14 46  |..<.        ...F|
00003820  04 0d 14 50 1d 20 20 20  20 20 20 20 20 20 20 f4  |...P.          .|
00003830  20 6c 6f 61 64 20 62 61  63 6b 64 72 6f 70 0d 14  | load backdrop..|
00003840  5a 1f 20 20 20 20 20 20  20 20 20 20 c8 99 20 22  |Z.          .. "|
00003850  48 6f 75 72 67 6c 61 73  73 5f 4f 6e 22 0d 14 64  |Hourglass_On"..d|
00003860  74 20 20 20 20 20 20 20  20 20 20 20 20 ff 20 22  |t            . "|
00003870  43 6f 70 79 20 22 2b 66  69 6c 65 6e 61 6d 65 24  |Copy "+filename$|
00003880  2b 22 20 42 61 63 6b 44  72 6f 70 73 3a 53 70 72  |+" BackDrops:Spr|
00003890  69 74 65 73 2e 22 2b a4  6c 65 61 66 6e 61 6d 65  |ites."+.leafname|
000038a0  28 66 69 6c 65 6e 61 6d  65 24 29 2b 22 20 7e 41  |(filename$)+" ~A|
000038b0  20 7e 43 20 7e 44 20 46  20 7e 4c 20 7e 4e 20 7e  | ~C ~D F ~L ~N ~|
000038c0  50 20 7e 51 20 7e 52 20  7e 53 20 7e 54 20 7e 56  |P ~Q ~R ~S ~T ~V|
000038d0  22 0d 14 6e 19 20 20 20  20 20 20 20 20 20 20 20  |"..n.           |
000038e0  20 3f 64 61 74 61 25 2b  3d 31 0d 14 78 2e 20 20  | ?data%+=1..x.  |
000038f0  20 20 20 20 20 20 20 20  20 20 6e 61 6d 65 24 3d  |          name$=|
00003900  a4 6c 65 61 66 6e 61 6d  65 28 66 69 6c 65 6e 61  |.leafname(filena|
00003910  6d 65 24 29 2b bd 31 30  0d 14 82 37 20 20 20 20  |me$)+.10...7    |
00003920  20 20 20 20 20 20 20 20  e7 20 a9 28 6e 61 6d 65  |        . .(name|
00003930  24 29 3c 31 31 20 8c 20  6e 61 6d 65 24 2b 3d c4  |$)<11 . name$+=.|
00003940  31 31 2d a9 28 6e 61 6d  65 24 29 2c bd 30 29 0d  |11-.(name$),.0).|
00003950  14 8c 2c 20 20 20 20 20  20 20 20 20 20 20 20 24  |..,            $|
00003960  28 64 61 74 61 25 2b 31  2b 28 3f 64 61 74 61 25  |(data%+1+(?data%|
00003970  29 2a 31 32 29 3d 6e 61  6d 65 24 0d 14 96 29 20  |)*12)=name$...) |
00003980  20 20 20 20 20 20 20 20  20 20 20 3f 28 64 61 74  |           ?(dat|
00003990  61 25 2b 31 32 2b 28 3f  64 61 74 61 25 29 2a 31  |a%+12+(?data%)*1|
000039a0  32 29 3d 31 0d 14 a0 1b  20 20 20 20 20 20 20 20  |2)=1....        |
000039b0  20 20 20 20 f2 75 70 64  61 74 65 6c 69 73 74 0d  |    .updatelist.|
000039c0  14 aa 20 20 20 20 20 20  20 20 20 20 20 c8 99 20  |..           .. |
000039d0  22 48 6f 75 72 67 6c 61  73 73 5f 4f 66 66 22 0d  |"Hourglass_Off".|
000039e0  14 b4 04 0d 14 be 35 20  20 20 20 20 20 20 20 20  |......5         |
000039f0  20 e7 20 a4 63 61 70 73  28 c0 66 69 6c 65 6e 61  | . .caps(.filena|
00003a00  6d 65 24 2c 31 31 29 29  3d 22 3c 57 49 4d 50 24  |me$,11))="<WIMP$|
00003a10  53 43 52 41 50 22 20 8c  0d 14 c8 3b 20 20 20 20  |SCRAP" ....;    |
00003a20  20 20 20 20 20 20 20 20  c8 99 20 22 58 4f 53 5f  |        .. "XOS_|
00003a30  43 4c 49 22 2c 22 57 69  70 65 20 22 2b 66 69 6c  |CLI","Wipe "+fil|
00003a40  65 6e 61 6d 65 24 2b 22  20 46 20 52 20 7e 43 20  |ename$+" F R ~C |
00003a50  7e 56 22 0d 14 d2 0f 20  20 20 20 20 20 20 20 20  |~V"....         |
00003a60  20 cd 0d 14 dc 20 20 20  20 20 20 20 20 20 20 20  | ....           |
00003a70  62 6c 6f 63 6b 25 21 31  32 3d 62 6c 6f 63 6b 25  |block%!12=block%|
00003a80  21 38 0d 14 e6 19 20 20  20 20 20 20 20 20 20 20  |!8....          |
00003a90  62 6c 6f 63 6b 25 21 31  36 3d 34 0d 14 f0 36 20  |block%!16=4...6 |
00003aa0  20 20 20 20 20 20 20 20  20 c8 99 20 22 57 69 6d  |         .. "Wim|
00003ab0  70 5f 53 65 6e 64 4d 65  73 73 61 67 65 22 2c 31  |p_SendMessage",1|
00003ac0  37 2c 62 6c 6f 63 6b 25  2c 62 6c 6f 63 6b 25 21  |7,block%,block%!|
00003ad0  34 0d 14 fa 0d 20 20 20  20 20 20 20 20 cd 0d 15  |4....        ...|
00003ae0  04 0b 20 20 20 20 20 20  cd 0d 15 0e 08 20 20 20  |..      .....   |
00003af0  20 0d 15 18 10 20 20 20  20 c9 20 26 34 30 30 43  | ....    . &400C|
00003b00  30 0d 15 22 18 20 20 20  20 20 20 c8 8e 20 62 6c  |0..".      .. bl|
00003b10  6f 63 6b 25 21 32 30 20  ca 0d 15 2c 21 20 20 20  |ock%!20 ...,!   |
00003b20  20 20 20 20 20 c9 20 4c  69 73 74 4d 65 6e 75 25  |     . ListMenu%|
00003b30  3a f2 73 75 62 5f 6c 69  73 74 0d 15 36 1f 20 20  |:.sub_list..6.  |
00003b40  20 20 20 20 20 20 c9 20  53 65 6c 4d 65 6e 75 25  |      . SelMenu%|
00003b50  3a f2 73 75 62 5f 73 65  6c 0d 15 40 0b 20 20 20  |:.sub_sel..@.   |
00003b60  20 20 20 cb 0d 15 4a 40  20 20 20 20 20 20 c8 99  |   ...J@      ..|
00003b70  20 22 57 69 6d 70 5f 43  72 65 61 74 65 53 75 62  | "Wimp_CreateSub|
00003b80  4d 65 6e 75 22 2c 2c 62  6c 6f 63 6b 25 21 32 30  |Menu",,block%!20|
00003b90  2c 62 6c 6f 63 6b 25 21  32 34 2c 62 6c 6f 63 6b  |,block%!24,block|
00003ba0  25 21 32 38 0d 15 54 0a  20 20 20 20 20 20 0d 15  |%!28..T.      ..|
00003bb0  5e 05 cb 0d 15 68 05 e1  0d 15 72 05 3a 0d 15 7c  |^....h....r.:..||
00003bc0  05 3a 0d 15 86 0e dd f2  73 75 62 5f 6c 69 73 74  |.:......sub_list|
00003bd0  0d 15 90 1a ea 20 6c 6f  6f 70 25 2c 76 61 6c 25  |..... loop%,val%|
00003be0  2c 73 74 72 24 2c 6c 65  6e 25 0d 15 9a 0a 6c 65  |,str$,len%....le|
00003bf0  6e 25 3d 37 0d 15 a4 10  e7 20 3f 64 61 74 61 25  |n%=7..... ?data%|
00003c00  3e 30 20 8c 0d 15 ae 18  20 20 e3 20 6c 6f 6f 70  |>0 .....  . loop|
00003c10  25 3d 31 20 b8 20 3f 64  61 74 61 25 0d 15 b8 2f  |%=1 . ?data%.../|
00003c20  20 20 20 20 73 74 72 24  3d 24 28 a4 69 6e 64 69  |    str$=$(.indi|
00003c30  72 61 64 64 72 28 4d 61  69 6e 48 61 6e 64 6c 65  |raddr(MainHandle|
00003c40  25 2c 6c 6f 6f 70 25 2a  33 29 29 0d 15 c2 28 20  |%,loop%*3))...( |
00003c50  20 20 20 e7 20 a9 28 73  74 72 24 29 2b 31 3e 6c  |   . .(str$)+1>l|
00003c60  65 6e 25 20 8c 6c 65 6e  25 3d a9 28 73 74 72 24  |en% .len%=.(str$|
00003c70  29 2b 31 0d 15 cc 25 20  20 20 20 24 28 4c 69 73  |)+1...%    $(Lis|
00003c80  74 4d 65 6e 75 25 2b 36  34 2b 32 34 2a 6c 6f 6f  |tMenu%+64+24*loo|
00003c90  70 25 29 3d 73 74 72 24  0d 15 d6 0e 20 20 20 20  |p%)=str$....    |
00003ca0  76 61 6c 25 3d 30 0d 15  e0 20 20 20 20 20 e7 20  |val%=0...     . |
00003cb0  6c 6f 6f 70 25 3d 3f 64  61 74 61 25 20 8c 76 61  |loop%=?data% .va|
00003cc0  6c 25 3d 26 38 30 0d 15  ea 22 20 20 20 20 e7 20  |l%=&80..."    . |
00003cd0  64 61 74 61 25 3f 39 33  37 3d 6c 6f 6f 70 25 20  |data%?937=loop% |
00003ce0  8c 76 61 6c 25 2b 3d 31  0d 15 f4 25 20 20 20 20  |.val%+=1...%    |
00003cf0  21 28 4c 69 73 74 4d 65  6e 75 25 2b 35 32 2b 32  |!(ListMenu%+52+2|
00003d00  34 2a 6c 6f 6f 70 25 29  3d 76 61 6c 25 0d 15 fe  |4*loop%)=val%...|
00003d10  07 20 20 ed 0d 16 08 05  cd 0d 16 12 35 e7 20 64  |.  .........5. d|
00003d20  61 74 61 25 3f 39 33 37  3d 32 35 35 20 8c 20 4c  |ata%?937=255 . L|
00003d30  69 73 74 4d 65 6e 75 25  21 32 38 3d 33 20 8b 20  |istMenu%!28=3 . |
00003d40  4c 69 73 74 4d 65 6e 75  25 21 32 38 3d 32 0d 16  |ListMenu%!28=2..|
00003d50  1c 21 e7 20 64 61 74 61  25 3f 39 33 37 3d 30 20  |.!. data%?937=0 |
00003d60  8c 76 61 6c 25 3d 31 20  8b 76 61 6c 25 3d 30 0d  |.val%=1 .val%=0.|
00003d70  16 26 19 e7 20 3f 64 61  74 61 25 3d 30 20 8c 76  |.&.. ?data%=0 .v|
00003d80  61 6c 25 2b 3d 26 38 30  0d 16 30 15 4c 69 73 74  |al%+=&80..0.List|
00003d90  4d 65 6e 75 25 21 35 32  3d 76 61 6c 25 0d 16 3a  |Menu%!52=val%..:|
00003da0  18 4c 69 73 74 4d 65 6e  75 25 21 31 36 3d 6c 65  |.ListMenu%!16=le|
00003db0  6e 25 2a 31 36 0d 16 44  05 e1 0d 16 4e 05 3a 0d  |n%*16..D....N.:.|
00003dc0  16 58 05 3a 0d 16 62 0d  dd f2 73 75 62 5f 73 65  |.X.:..b...sub_se|
00003dd0  6c 0d 16 6c 11 ea 20 73  74 72 24 2c 66 6c 61 67  |l..l.. str$,flag|
00003de0  73 25 0d 16 76 16 e7 20  4d 65 6e 75 50 61 72 65  |s%..v.. MenuPare|
00003df0  6e 74 25 3d 2d 31 20 8c  0d 16 80 16 20 20 73 74  |nt%=-1 .....  st|
00003e00  72 24 3d 22 53 65 6c 65  63 74 69 6f 6e 22 0d 16  |r$="Selection"..|
00003e10  8a 1a 20 20 53 65 6c 4d  65 6e 75 25 21 36 30 3d  |..  SelMenu%!60=|
00003e20  26 37 34 30 30 31 32 31  0d 16 94 1b 20 20 53 65  |&7400121....  Se|
00003e30  6c 4d 65 6e 75 25 21 31  30 38 3d 26 37 30 30 30  |lMenu%!108=&7000|
00003e40  31 32 31 0d 16 9e 1b 20  20 53 65 6c 4d 65 6e 75  |121....  SelMenu|
00003e50  25 21 31 33 32 3d 26 37  30 30 30 31 32 31 0d 16  |%!132=&7000121..|
00003e60  a8 14 20 20 53 65 6c 4d  65 6e 75 25 21 31 30 30  |..  SelMenu%!100|
00003e70  3d 30 0d 16 b2 14 20 20  53 65 6c 4d 65 6e 75 25  |=0....  SelMenu%|
00003e80  21 31 32 34 3d 32 0d 16  bc 14 20 20 53 65 6c 4d  |!124=2....  SelM|
00003e90  65 6e 75 25 21 31 34 38  3d 30 0d 16 c6 14 20 20  |enu%!148=0....  |
00003ea0  53 65 6c 4d 65 6e 75 25  21 31 37 32 3d 30 0d 16  |SelMenu%!172=0..|
00003eb0  d0 16 20 20 53 65 6c 4d  65 6e 75 25 21 31 39 36  |..  SelMenu%!196|
00003ec0  3d 26 38 30 0d 16 da 15  20 20 66 6c 61 67 73 25  |=&80....  flags%|
00003ed0  3d 26 37 30 30 30 30 32  31 0d 16 e4 05 cc 0d 16  |=&7000021.......|
00003ee0  ee 18 20 20 e7 20 4d 65  6e 75 50 61 72 65 6e 74  |..  . MenuParent|
00003ef0  25 3e 2d 31 20 8c 0d 16  f8 37 20 20 20 20 73 74  |%>-1 ....7    st|
00003f00  72 24 3d c1 24 28 4d 61  69 6e 4d 65 6e 75 25 21  |r$=.$(MainMenu%!|
00003f10  36 34 29 2c 31 31 2c a9  28 24 28 4d 61 69 6e 4d  |64),11,.($(MainM|
00003f20  65 6e 75 25 21 36 34 29  29 2d 31 31 29 0d 17 02  |enu%!64))-11)...|
00003f30  4a 20 20 20 20 e7 20 4d  65 6e 75 50 61 72 65 6e  |J    . MenuParen|
00003f40  74 25 3d 30 20 8c 20 53  65 6c 4d 65 6e 75 25 21  |t%=0 . SelMenu%!|
00003f50  36 30 3d 26 37 34 30 30  31 32 31 20 8b 53 65 6c  |60=&7400121 .Sel|
00003f60  4d 65 6e 75 25 21 36 30  3d 26 37 30 30 30 31 32  |Menu%!60=&700012|
00003f70  31 3a f4 2a 2a 2a 2a 0d  17 0c 29 20 20 20 20 66  |1:.****...)    f|
00003f80  6c 61 67 73 25 3d 3f 28  64 61 74 61 25 2b 31 32  |lags%=?(data%+12|
00003f90  2b 4d 65 6e 75 50 61 72  65 6e 74 25 2a 31 32 29  |+MenuParent%*12)|
00003fa0  0d 17 16 30 20 20 20 20  e7 20 4d 65 6e 75 50 61  |...0    . MenuPa|
00003fb0  72 65 6e 74 25 3d 30 20  8c 20 66 6c 61 67 73 25  |rent%=0 . flags%|
00003fc0  3d 28 66 6c 61 67 73 25  84 28 33 3c 3c 36 29 29  |=(flags%.(3<<6))|
00003fd0  0d 17 20 53 20 20 20 20  e7 28 66 6c 61 67 73 25  |.. S    .(flags%|
00003fe0  80 31 29 3d 31 20 8c 53  65 6c 4d 65 6e 75 25 21  |.1)=1 .SelMenu%!|
00003ff0  31 30 30 3d 31 3a 53 65  6c 4d 65 6e 75 25 21 31  |100=1:SelMenu%!1|
00004000  32 34 3d 32 20 8b 53 65  6c 4d 65 6e 75 25 21 31  |24=2 .SelMenu%!1|
00004010  30 30 3d 30 3a 53 65 6c  4d 65 6e 75 25 21 31 32  |00=0:SelMenu%!12|
00004020  34 3d 33 0d 17 2a 38 20  20 20 20 e7 20 28 66 6c  |4=3..*8    . (fl|
00004030  61 67 73 25 3e 3e 36 29  3d 31 20 8c 20 53 65 6c  |ags%>>6)=1 . Sel|
00004040  4d 65 6e 75 25 21 31 34  38 3d 31 20 8b 53 65 6c  |Menu%!148=1 .Sel|
00004050  4d 65 6e 75 25 21 31 34  38 3d 30 0d 17 34 38 20  |Menu%!148=0..48 |
00004060  20 20 20 e7 20 28 66 6c  61 67 73 25 3e 3e 36 29  |   . (flags%>>6)|
00004070  3e 31 20 8c 20 53 65 6c  4d 65 6e 75 25 21 31 37  |>1 . SelMenu%!17|
00004080  32 3d 31 20 8b 53 65 6c  4d 65 6e 75 25 21 31 37  |2=1 .SelMenu%!17|
00004090  32 3d 30 0d 17 3e 3c 20  20 20 20 e7 20 28 66 6c  |2=0..><    . (fl|
000040a0  61 67 73 25 3e 3e 36 29  3d 30 20 8c 20 53 65 6c  |ags%>>6)=0 . Sel|
000040b0  4d 65 6e 75 25 21 31 39  36 3d 26 38 31 20 8b 53  |Menu%!196=&81 .S|
000040c0  65 6c 4d 65 6e 75 25 21  31 39 36 3d 26 38 30 0d  |elMenu%!196=&80.|
000040d0  17 48 1d 20 20 20 20 53  65 6c 4d 65 6e 75 25 21  |.H.    SelMenu%!|
000040e0  31 30 38 3d 26 37 30 30  30 31 32 31 0d 17 52 1d  |108=&7000121..R.|
000040f0  20 20 20 20 53 65 6c 4d  65 6e 75 25 21 31 33 32  |    SelMenu%!132|
00004100  3d 26 37 30 30 30 31 32  31 0d 17 5c 39 20 20 20  |=&7000121..\9   |
00004110  20 e7 20 4d 65 6e 75 50  61 72 65 6e 74 25 3d 30  | . MenuParent%=0|
00004120  20 8c 66 6c 61 67 73 25  3d 26 37 34 30 30 30 32  | .flags%=&740002|
00004130  31 20 8b 66 6c 61 67 73  25 3d 26 37 30 30 30 30  |1 .flags%=&70000|
00004140  32 31 0d 17 66 07 20 20  cc 0d 17 70 1c 20 20 20  |21..f.  ...p.   |
00004150  20 53 65 6c 4d 65 6e 75  25 21 36 30 3d 26 37 34  | SelMenu%!60=&74|
00004160  30 30 31 32 31 0d 17 7a  1d 20 20 20 20 53 65 6c  |00121..z.    Sel|
00004170  4d 65 6e 75 25 21 31 30  38 3d 26 37 34 30 30 31  |Menu%!108=&74001|
00004180  32 31 0d 17 84 1d 20 20  20 20 53 65 6c 4d 65 6e  |21....    SelMen|
00004190  75 25 21 31 33 32 3d 26  37 34 30 30 31 32 31 0d  |u%!132=&7400121.|
000041a0  17 8e 25 20 20 20 20 53  65 6c 4d 65 6e 75 25 21  |..%    SelMenu%!|
000041b0  31 30 30 3d 30 3a 53 65  6c 4d 65 6e 75 25 21 31  |100=0:SelMenu%!1|
000041c0  32 34 3d 32 0d 17 98 36  20 20 20 20 53 65 6c 4d  |24=2...6    SelM|
000041d0  65 6e 75 25 21 31 34 38  3d 30 3a 53 65 6c 4d 65  |enu%!148=0:SelMe|
000041e0  6e 75 25 21 31 37 36 3d  30 3a 53 65 6c 4d 65 6e  |nu%!176=0:SelMen|
000041f0  75 25 21 31 39 36 3d 26  38 30 0d 17 a2 17 20 20  |u%!196=&80....  |
00004200  20 20 73 74 72 24 3d 22  42 61 63 6b 64 72 6f 70  |  str$="Backdrop|
00004210  22 0d 17 ac 17 20 20 20  20 66 6c 61 67 73 25 3d  |"....    flags%=|
00004220  26 37 34 30 30 30 32 31  0d 17 b6 07 20 20 cd 0d  |&7400021....  ..|
00004230  17 c0 05 cd 0d 17 ca 16  53 65 6c 4d 65 6e 75 25  |........SelMenu%|
00004240  21 33 36 3d 66 6c 61 67  73 25 0d 17 d4 16 53 65  |!36=flags%....Se|
00004250  6c 4d 65 6e 75 25 21 38  34 3d 66 6c 61 67 73 25  |lMenu%!84=flags%|
00004260  0d 17 de 17 53 65 6c 4d  65 6e 75 25 21 31 35 36  |....SelMenu%!156|
00004270  3d 66 6c 61 67 73 25 0d  17 e8 17 53 65 6c 4d 65  |=flags%....SelMe|
00004280  6e 75 25 21 31 38 30 3d  66 6c 61 67 73 25 0d 17  |nu%!180=flags%..|
00004290  f2 17 53 65 6c 4d 65 6e  75 25 21 32 30 34 3d 66  |..SelMenu%!204=f|
000042a0  6c 61 67 73 25 0d 17 fc  12 24 53 65 6c 4d 65 6e  |lags%....$SelMen|
000042b0  75 25 3d 73 74 72 24 0d  18 06 05 e1 0d 18 10 05  |u%=str$.........|
000042c0  3a 0d 18 1a 05 3a 0d 18  24 05 3a 0d 18 2e 05 3a  |:....:..$.:....:|
000042d0  0d 18 38 1b dd a4 43 74  72 6c 54 65 72 6d 53 74  |..8...CtrlTermSt|
000042e0  72 69 6e 67 28 61 64 64  72 25 29 0d 18 42 12 ea  |ring(addr%)..B..|
000042f0  20 72 65 74 75 72 6e 24  2c 70 74 72 25 0d 18 4c  | return$,ptr%..L|
00004300  15 70 74 72 25 3d 30 3a  72 65 74 75 72 6e 24 3d  |.ptr%=0:return$=|
00004310  22 22 0d 18 56 14 c8 95  20 61 64 64 72 25 3f 70  |""..V... addr%?p|
00004320  74 72 25 3e 33 31 0d 18  60 1c 20 20 72 65 74 75  |tr%>31..`.  retu|
00004330  72 6e 24 2b 3d bd 28 61  64 64 72 25 3f 70 74 72  |rn$+=.(addr%?ptr|
00004340  25 29 0d 18 6a 0d 20 20  70 74 72 25 2b 3d 31 0d  |%)..j.  ptr%+=1.|
00004350  18 74 05 ce 0d 18 7e 0c  3d 72 65 74 75 72 6e 24  |.t....~.=return$|
00004360  0d 18 88 05 3a 0d 18 92  05 3a 0d 18 9c 15 dd a4  |....:....:......|
00004370  6c 65 61 66 6e 61 6d 65  28 6e 61 6d 65 24 29 0d  |leafname(name$).|
00004380  18 a6 12 c8 95 20 a7 6e  61 6d 65 24 2c 22 2e 22  |..... .name$,"."|
00004390  29 0d 18 b0 21 20 20 6e  61 6d 65 24 3d c1 6e 61  |)...!  name$=.na|
000043a0  6d 65 24 2c a7 6e 61 6d  65 24 2c 22 2e 22 29 2b  |me$,.name$,".")+|
000043b0  31 29 0d 18 ba 05 ce 0d  18 c4 0a 3d 6e 61 6d 65  |1).........=name|
000043c0  24 0d 18 ce 05 3a 0d 18  d8 05 3a 0d 18 e2 13 dd  |$....:....:.....|
000043d0  a4 65 78 69 73 74 73 28  6e 61 6d 65 24 29 0d 18  |.exists(name$)..|
000043e0  ec 20 ea 20 6d 69 6e 25  2c 6d 61 78 25 2c 70 6f  |. . min%,max%,po|
000043f0  73 25 2c 73 74 72 24 2c  72 65 70 6c 79 25 0d 18  |s%,str$,reply%..|
00004400  f6 0a 6d 69 6e 25 3d 31  0d 19 00 0f 6d 61 78 25  |..min%=1....max%|
00004410  3d 3f 64 61 74 61 25 0d  19 0a 0c 72 65 70 6c 79  |=?data%....reply|
00004420  25 3d a3 0d 19 14 11 c8  95 20 6d 69 6e 25 3c 3d  |%=....... min%<=|
00004430  6d 61 78 25 0d 19 1e 1b  20 20 70 6f 73 25 3d a8  |max%....  pos%=.|
00004440  28 28 6d 69 6e 25 2b 6d  61 78 25 29 2f 32 29 0d  |((min%+max%)/2).|
00004450  19 28 2b 20 20 73 74 72  24 3d a4 43 74 72 6c 54  |.(+  str$=.CtrlT|
00004460  65 72 6d 53 74 72 69 6e  67 28 64 61 74 61 25 2b  |ermString(data%+|
00004470  31 2b 70 6f 73 25 2a 31  32 29 0d 19 32 1f 20 20  |1+pos%*12)..2.  |
00004480  e7 20 73 74 72 24 3c 6e  61 6d 65 24 20 8c 6d 69  |. str$<name$ .mi|
00004490  6e 25 3d 70 6f 73 25 2b  31 0d 19 3c 1f 20 20 e7  |n%=pos%+1..<.  .|
000044a0  20 73 74 72 24 3e 6e 61  6d 65 24 20 8c 6d 61 78  | str$>name$ .max|
000044b0  25 3d 70 6f 73 25 2d 31  0d 19 46 23 20 20 e7 20  |%=pos%-1..F#  . |
000044c0  73 74 72 24 3d 6e 61 6d  65 24 20 8c 72 65 70 6c  |str$=name$ .repl|
000044d0  79 25 3d b9 3a 6d 61 78  25 3d 30 0d 19 50 05 ce  |y%=.:max%=0..P..|
000044e0  0d 19 5a 0b 3d 72 65 70  6c 79 25 0d 19 64 05 3a  |..Z.=reply%..d.:|
000044f0  0d 19 6e 05 3a 0d 19 78  10 dd a4 63 61 70 73 28  |..n.:..x...caps(|
00004500  73 74 72 24 29 0d 19 82  12 ea 20 72 65 70 6c 79  |str$)..... reply|
00004510  24 2c 6c 6f 6f 70 25 0d  19 8c 0d 72 65 70 6c 79  |$,loop%....reply|
00004520  24 3d 22 22 0d 19 96 17  e3 20 6c 6f 6f 70 25 3d  |$=""..... loop%=|
00004530  31 20 b8 20 a9 28 73 74  72 24 29 0d 19 a0 1c 20  |1 . .(str$).... |
00004540  20 6c 65 74 74 65 72 24  3d c1 73 74 72 24 2c 6c  | letter$=.str$,l|
00004550  6f 6f 70 25 2c 31 29 0d  19 aa 3e 20 20 e7 20 6c  |oop%,1)...>  . l|
00004560  65 74 74 65 72 24 3e 3d  22 61 22 20 80 20 6c 65  |etter$>="a" . le|
00004570  74 74 65 72 24 3c 3d 22  7a 22 20 8c 20 6c 65 74  |tter$<="z" . let|
00004580  74 65 72 24 3d bd 28 97  28 6c 65 74 74 65 72 24  |ter$=.(.(letter$|
00004590  29 2d 33 32 29 0d 19 b4  15 20 20 72 65 70 6c 79  |)-32)....  reply|
000045a0  24 2b 3d 6c 65 74 74 65  72 24 0d 19 be 05 ed 0d  |$+=letter$......|
000045b0  19 c8 0b 3d 72 65 70 6c  79 24 0d 19 d2 05 3a 0d  |...=reply$....:.|
000045c0  19 dc 05 3a 0d 19 e6 1e  dd a4 69 6e 64 69 72 61  |...:......indira|
000045d0  64 64 72 28 77 69 6e 64  6f 77 25 2c 69 63 6f 6e  |ddr(window%,icon|
000045e0  25 29 0d 19 f0 20 21 74  65 6d 70 25 3d 77 69 6e  |%)... !temp%=win|
000045f0  64 6f 77 25 3a 74 65 6d  70 25 21 34 3d 69 63 6f  |dow%:temp%!4=ico|
00004600  6e 25 0d 19 fa 21 c8 99  20 22 57 69 6d 70 5f 47  |n%...!.. "Wimp_G|
00004610  65 74 49 63 6f 6e 53 74  61 74 65 22 2c 2c 74 65  |etIconState",,te|
00004620  6d 70 25 0d 1a 04 0d 3d  74 65 6d 70 25 21 32 38  |mp%....=temp%!28|
00004630  0d 1a 0e 05 3a 0d 1a 18  05 3a 0d 1a 22 05 3a 0d  |....:....:..".:.|
00004640  1a 2c 05 3a 0d 1a 36 20  dd f2 65 72 72 6f 72 28  |.,.:..6 ..error(|
00004650  74 65 78 74 24 2c 74 69  74 6c 65 24 2c 66 6c 61  |text$,title$,fla|
00004660  67 73 25 29 0d 1a 40 1f  21 62 6c 6f 63 6b 25 3d  |gs%)..@.!block%=|
00004670  30 3a 24 28 62 6c 6f 63  6b 25 2b 34 29 3d 74 65  |0:$(block%+4)=te|
00004680  78 74 24 0d 1a 4a 3a c8  99 20 22 57 69 6d 70 5f  |xt$..J:.. "Wimp_|
00004690  52 65 70 6f 72 74 45 72  72 6f 72 22 2c 62 6c 6f  |ReportError",blo|
000046a0  63 6b 25 2c 66 6c 61 67  73 25 2c 74 69 74 6c 65  |ck%,flags%,title|
000046b0  24 2b 22 42 61 63 6b 44  72 6f 70 73 22 0d 1a 54  |$+"BackDrops"..T|
000046c0  05 e1 0d 1a 5e 05 3a 0d  1a 68 05 3a 0d 1a 72 05  |....^.:..h.:..r.|
000046d0  3a 0d 1a 7c 05 3a 0d 1a  86 10 dd f2 75 70 64 61  |:..|.:......upda|
000046e0  74 65 6c 69 73 74 0d 1a  90 50 ea 20 6c 6f 6f 70  |telist...P. loop|
000046f0  31 25 2c 6c 6f 6f 70 32  25 2c 6c 6f 77 31 25 2c  |1%,loop2%,low1%,|
00004700  6c 6f 77 32 25 2c 6c 6f  77 33 25 2c 63 75 72 31  |low2%,low3%,cur1|
00004710  25 2c 63 75 72 32 25 2c  63 75 72 33 25 2c 73 77  |%,cur2%,cur3%,sw|
00004720  61 70 25 2c 70 6f 73 25  2c 6c 6f 6f 70 25 2c 6f  |ap%,pos%,loop%,o|
00004730  66 66 73 65 74 25 0d 1a  9a 15 c8 99 20 22 48 6f  |ffset%...... "Ho|
00004740  75 72 67 6c 61 73 73 5f  4f 6e 22 0d 1a a4 0a f4  |urglass_On".....|
00004750  20 73 6f 72 74 0d 1a ae  10 e7 20 3f 64 61 74 61  | sort..... ?data|
00004760  25 3e 31 20 8c 0d 1a b8  1d 20 20 e3 20 6c 6f 6f  |%>1 .....  . loo|
00004770  70 31 25 3d 31 20 b8 20  28 3f 64 61 74 61 25 29  |p1%=1 . (?data%)|
00004780  2d 31 0d 1a c2 0f 20 20  20 20 73 77 61 70 25 3d  |-1....    swap%=|
00004790  a3 0d 1a cc 23 20 20 20  20 21 74 65 6d 70 25 3d  |....#    !temp%=|
000047a0  21 28 64 61 74 61 25 2b  31 2b 6c 6f 6f 70 31 25  |!(data%+1+loop1%|
000047b0  2a 31 32 29 0d 1a d6 24  20 20 20 20 74 65 6d 70  |*12)...$    temp|
000047c0  25 21 34 3d 21 28 64 61  74 61 25 2b 35 2b 6c 6f  |%!4=!(data%+5+lo|
000047d0  6f 70 31 25 2a 31 32 29  0d 1a e0 24 20 20 20 20  |op1%*12)...$    |
000047e0  74 65 6d 70 25 21 38 3d  21 28 64 61 74 61 25 2b  |temp%!8=!(data%+|
000047f0  39 2b 6c 6f 6f 70 31 25  2a 31 32 29 0d 1a ea 22  |9+loop1%*12)..."|
00004800  20 20 20 20 e3 20 6c 6f  6f 70 32 25 3d 6c 6f 6f  |    . loop2%=loo|
00004810  70 31 25 2b 31 20 b8 20  3f 64 61 74 61 25 0d 1a  |p1%+1 . ?data%..|
00004820  f4 13 20 20 20 20 20 20  6f 66 66 73 65 74 25 3d  |..      offset%=|
00004830  30 0d 1a fe 46 20 20 20  20 20 20 c8 95 20 28 3f  |0...F      .. (?|
00004840  28 64 61 74 61 25 2b 31  2b 6c 6f 6f 70 32 25 2a  |(data%+1+loop2%*|
00004850  31 32 2b 6f 66 66 73 65  74 25 29 3d 74 65 6d 70  |12+offset%)=temp|
00004860  25 3f 6f 66 66 73 65 74  25 29 20 80 20 6f 66 66  |%?offset%) . off|
00004870  73 65 74 25 3c 31 31 0d  1b 08 16 20 20 20 20 20  |set%<11....     |
00004880  20 20 20 6f 66 66 73 65  74 25 2b 3d 31 0d 1b 12  |   offset%+=1...|
00004890  0b 20 20 20 20 20 20 ce  0d 1b 1c 38 20 20 20 20  |.      ....8    |
000048a0  20 20 e7 20 3f 28 64 61  74 61 25 2b 31 2b 6c 6f  |  . ?(data%+1+lo|
000048b0  6f 70 32 25 2a 31 32 2b  6f 66 66 73 65 74 25 29  |op2%*12+offset%)|
000048c0  3c 74 65 6d 70 25 3f 6f  66 66 73 65 74 25 20 8c  |<temp%?offset% .|
000048d0  0d 1b 26 27 20 20 20 20  20 20 20 20 21 74 65 6d  |..&'        !tem|
000048e0  70 25 3d 21 28 64 61 74  61 25 2b 31 2b 6c 6f 6f  |p%=!(data%+1+loo|
000048f0  70 32 25 2a 31 32 29 0d  1b 30 28 20 20 20 20 20  |p2%*12)..0(     |
00004900  20 20 20 74 65 6d 70 25  21 34 3d 21 28 64 61 74  |   temp%!4=!(dat|
00004910  61 25 2b 35 2b 6c 6f 6f  70 32 25 2a 31 32 29 0d  |a%+5+loop2%*12).|
00004920  1b 3a 28 20 20 20 20 20  20 20 20 74 65 6d 70 25  |.:(        temp%|
00004930  21 38 3d 21 28 64 61 74  61 25 2b 39 2b 6c 6f 6f  |!8=!(data%+9+loo|
00004940  70 32 25 2a 31 32 29 0d  1b 44 1f 20 20 20 20 20  |p2%*12)..D.     |
00004950  20 20 20 73 77 61 70 25  3d b9 3a 70 6f 73 25 3d  |   swap%=.:pos%=|
00004960  6c 6f 6f 70 32 25 0d 1b  4e 0b 20 20 20 20 20 20  |loop2%..N.      |
00004970  cd 0d 1b 58 09 20 20 20  20 ed 0d 1b 62 11 20 20  |...X.    ...b.  |
00004980  20 20 e7 20 73 77 61 70  25 20 8c 0d 1b 6c 31 20  |  . swap% ...l1 |
00004990  20 20 20 20 20 21 28 64  61 74 61 25 2b 31 2b 70  |     !(data%+1+p|
000049a0  6f 73 25 2a 31 32 29 3d  21 28 64 61 74 61 25 2b  |os%*12)=!(data%+|
000049b0  31 2b 6c 6f 6f 70 31 25  2a 31 32 29 0d 1b 76 31  |1+loop1%*12)..v1|
000049c0  20 20 20 20 20 20 21 28  64 61 74 61 25 2b 35 2b  |      !(data%+5+|
000049d0  70 6f 73 25 2a 31 32 29  3d 21 28 64 61 74 61 25  |pos%*12)=!(data%|
000049e0  2b 35 2b 6c 6f 6f 70 31  25 2a 31 32 29 0d 1b 80  |+5+loop1%*12)...|
000049f0  31 20 20 20 20 20 20 21  28 64 61 74 61 25 2b 39  |1      !(data%+9|
00004a00  2b 70 6f 73 25 2a 31 32  29 3d 21 28 64 61 74 61  |+pos%*12)=!(data|
00004a10  25 2b 39 2b 6c 6f 6f 70  31 25 2a 31 32 29 0d 1b  |%+9+loop1%*12)..|
00004a20  8a 25 20 20 20 20 20 20  21 28 64 61 74 61 25 2b  |.%      !(data%+|
00004a30  31 2b 6c 6f 6f 70 31 25  2a 31 32 29 3d 21 74 65  |1+loop1%*12)=!te|
00004a40  6d 70 25 0d 1b 94 26 20  20 20 20 20 20 21 28 64  |mp%...&      !(d|
00004a50  61 74 61 25 2b 35 2b 6c  6f 6f 70 31 25 2a 31 32  |ata%+5+loop1%*12|
00004a60  29 3d 74 65 6d 70 25 21  34 0d 1b 9e 26 20 20 20  |)=temp%!4...&   |
00004a70  20 20 20 21 28 64 61 74  61 25 2b 39 2b 6c 6f 6f  |   !(data%+9+loo|
00004a80  70 31 25 2a 31 32 29 3d  74 65 6d 70 25 21 38 0d  |p1%*12)=temp%!8.|
00004a90  1b a8 09 20 20 20 20 cd  0d 1b b2 07 20 20 ed 0d  |...    .....  ..|
00004aa0  1b bc 05 cd 0d 1b c6 13  f4 20 75 70 64 61 74 65  |......... update|
00004ab0  20 77 69 6e 64 6f 77 0d  1b d0 10 e7 20 3f 64 61  | window..... ?da|
00004ac0  74 61 25 3e 30 20 8c 0d  1b da 18 20 20 e3 20 6c  |ta%>0 .....  . l|
00004ad0  6f 6f 70 25 3d 31 20 b8  20 3f 64 61 74 61 25 0d  |oop%=1 . ?data%.|
00004ae0  1b e4 4c 20 20 20 20 24  28 a4 69 6e 64 69 72 61  |..L    $(.indira|
00004af0  64 64 72 28 4d 61 69 6e  48 61 6e 64 6c 65 25 2c  |ddr(MainHandle%,|
00004b00  6c 6f 6f 70 25 2a 33 29  29 3d a4 43 74 72 6c 54  |loop%*3))=.CtrlT|
00004b10  65 72 6d 53 74 72 69 6e  67 28 64 61 74 61 25 2b  |ermString(data%+|
00004b20  31 2b 6c 6f 6f 70 25 2a  31 32 29 0d 1b ee 4d 20  |1+loop%*12)...M |
00004b30  20 20 20 24 28 a4 69 6e  64 69 72 61 64 64 72 28  |   $(.indiraddr(|
00004b40  4d 61 69 6e 48 61 6e 64  6c 65 25 2c 6c 6f 6f 70  |MainHandle%,loop|
00004b50  25 2a 33 2b 31 29 29 3d  74 79 70 65 24 28 28 3f  |%*3+1))=type$((?|
00004b60  28 64 61 74 61 25 2b 31  32 2b 6c 6f 6f 70 25 2a  |(data%+12+loop%*|
00004b70  31 32 29 29 3e 3e 36 29  0d 1b f8 1a 20 20 20 20  |12))>>6)....    |
00004b80  21 74 65 6d 70 25 3d 4d  61 69 6e 48 61 6e 64 6c  |!temp%=MainHandl|
00004b90  65 25 0d 1c 02 19 20 20  20 20 74 65 6d 70 25 21  |e%....    temp%!|
00004ba0  34 3d 6c 6f 6f 70 25 2a  33 2b 32 0d 1c 0c 2e 20  |4=loop%*3+2.... |
00004bb0  20 20 20 74 65 6d 70 25  21 38 3d 28 28 3f 28 64  |   temp%!8=((?(d|
00004bc0  61 74 61 25 2b 31 32 2b  6c 6f 6f 70 25 2a 31 32  |ata%+12+loop%*12|
00004bd0  29 29 80 31 29 3c 3c 32  31 0d 1c 16 16 20 20 20  |)).1)<<21....   |
00004be0  20 74 65 6d 70 25 21 31  32 3d 31 3c 3c 32 31 0d  | temp%!12=1<<21.|
00004bf0  1c 20 25 20 20 20 20 c8  99 20 22 57 69 6d 70 5f  |. %    .. "Wimp_|
00004c00  53 65 74 49 63 6f 6e 53  74 61 74 65 22 2c 2c 74  |SetIconState",,t|
00004c10  65 6d 70 25 0d 1c 2a 07  20 20 ed 0d 1c 34 05 cd  |emp%..*.  ...4..|
00004c20  0d 1c 3e 10 e7 20 3f 64  61 74 61 25 3d 30 20 8c  |..>.. ?data%=0 .|
00004c30  0d 1c 48 15 20 20 e7 20  ac 28 47 72 65 79 65 64  |..H.  . .(Greyed|
00004c40  31 25 29 20 8c 0d 1c 52  16 20 20 20 20 f2 64 65  |1%) ...R.    .de|
00004c50  6c 69 63 6f 6e 73 28 33  2c b9 29 0d 1c 5c 12 20  |licons(3,.)..\. |
00004c60  20 20 20 47 72 65 79 65  64 31 25 3d b9 0d 1c 66  |   Greyed1%=...f|
00004c70  07 20 20 cd 0d 1c 70 05  cd 0d 1c 7a 11 e7 20 3f  |.  ...p....z.. ?|
00004c80  64 61 74 61 25 3c 3d 31  20 8c 0d 1c 84 15 20 20  |data%<=1 .....  |
00004c90  e7 20 ac 28 47 72 65 79  65 64 32 25 29 20 8c 0d  |. .(Greyed2%) ..|
00004ca0  1c 8e 16 20 20 20 20 f2  64 65 6c 69 63 6f 6e 73  |...    .delicons|
00004cb0  28 36 2c b9 29 0d 1c 98  12 20 20 20 20 47 72 65  |(6,.)....    Gre|
00004cc0  79 65 64 32 25 3d b9 0d  1c a2 07 20 20 cd 0d 1c  |yed2%=.....  ...|
00004cd0  ac 05 cd 0d 1c b6 11 e7  20 3f 64 61 74 61 25 3e  |........ ?data%>|
00004ce0  3d 32 20 8c 0d 1c c0 12  20 20 e7 20 47 72 65 79  |=2 .....  . Grey|
00004cf0  65 64 32 25 20 8c 0d 1c  ca 16 20 20 20 20 f2 64  |ed2% .....    .d|
00004d00  65 6c 69 63 6f 6e 73 28  36 2c a3 29 0d 1c d4 12  |elicons(6,.)....|
00004d10  20 20 20 20 47 72 65 79  65 64 32 25 3d a3 0d 1c  |    Greyed2%=...|
00004d20  de 07 20 20 cd 0d 1c e8  05 cd 0d 1c f2 11 e7 20  |..  ........... |
00004d30  3f 64 61 74 61 25 3e 3d  31 20 8c 0d 1c fc 12 20  |?data%>=1 ..... |
00004d40  20 e7 20 47 72 65 79 65  64 31 25 20 8c 0d 1d 06  | . Greyed1% ....|
00004d50  16 20 20 20 20 f2 64 65  6c 69 63 6f 6e 73 28 33  |.    .delicons(3|
00004d60  2c a3 29 0d 1d 10 12 20  20 20 20 47 72 65 79 65  |,.)....    Greye|
00004d70  64 31 25 3d a3 0d 1d 1a  07 20 20 cd 0d 1d 24 05  |d1%=.....  ...$.|
00004d80  cd 0d 1d 2e 0c 21 74 65  6d 70 25 3d 30 0d 1d 38  |.....!temp%=0..8|
00004d90  1d 74 65 6d 70 25 21 34  3d 2d 28 34 34 2b 28 3f  |.temp%!4=-(44+(?|
00004da0  64 61 74 61 25 29 2a 34  38 29 0d 1d 42 0f 74 65  |data%)*48)..B.te|
00004db0  6d 70 25 21 38 3d 34 30  30 0d 1d 4c 0e 74 65 6d  |mp%!8=400..L.tem|
00004dc0  70 25 21 31 32 3d 30 0d  1d 56 29 c8 99 20 22 57  |p%!12=0..V).. "W|
00004dd0  69 6d 70 5f 53 65 74 45  78 74 65 6e 74 22 2c 4d  |imp_SetExtent",M|
00004de0  61 69 6e 48 61 6e 64 6c  65 25 2c 74 65 6d 70 25  |ainHandle%,temp%|
00004df0  0d 1d 60 16 21 74 65 6d  70 25 3d 4d 61 69 6e 48  |..`.!temp%=MainH|
00004e00  61 6e 64 6c 65 25 0d 1d  6a 23 c8 99 20 22 57 69  |andle%..j#.. "Wi|
00004e10  6d 70 5f 47 65 74 57 69  6e 64 6f 77 53 74 61 74  |mp_GetWindowStat|
00004e20  65 22 2c 2c 74 65 6d 70  25 0d 1d 74 40 e7 20 28  |e",,temp%..t@. (|
00004e30  28 74 65 6d 70 25 21 33  32 29 80 28 31 3c 3c 31  |(temp%!32).(1<<1|
00004e40  36 29 29 3d 28 31 3c 3c  31 36 29 20 8c 20 c8 99  |6))=(1<<16) . ..|
00004e50  20 22 57 69 6d 70 5f 4f  70 65 6e 57 69 6e 64 6f  | "Wimp_OpenWindo|
00004e60  77 22 2c 2c 74 65 6d 70  25 0d 1d 7e 33 c8 99 20  |w",,temp%..~3.. |
00004e70  22 57 69 6d 70 5f 46 6f  72 63 65 52 65 64 72 61  |"Wimp_ForceRedra|
00004e80  77 22 2c 4d 61 69 6e 48  61 6e 64 6c 65 25 2c 30  |w",MainHandle%,0|
00004e90  2c 2d 33 37 34 30 2c 34  30 30 2c 30 0d 1d 88 16  |,-3740,400,0....|
00004ea0  c8 99 20 22 48 6f 75 72  67 6c 61 73 73 5f 4f 66  |.. "Hourglass_Of|
00004eb0  66 22 0d 1d 92 05 e1 0d  1d 9c 05 3a 0d 1d a6 05  |f".........:....|
00004ec0  3a 0d 1d b0 1a dd f2 64  65 6c 69 63 6f 6e 73 28  |:......delicons(|
00004ed0  62 61 73 65 25 2c 64 65  6c 25 29 0d 1d ba 0b ea  |base%,del%).....|
00004ee0  20 69 63 6f 6e 25 0d 1d  c4 16 21 74 65 6d 70 25  | icon%....!temp%|
00004ef0  3d 4d 61 69 6e 48 61 6e  64 6c 65 25 0d 1d ce 0c  |=MainHandle%....|
00004f00  e7 20 64 65 6c 25 20 8c  0d 1d d8 13 20 20 74 65  |. del% .....  te|
00004f10  6d 70 25 21 38 3d 31 3c  3c 32 33 0d 1d e2 05 cc  |mp%!8=1<<23.....|
00004f20  0d 1d ec 0f 20 20 74 65  6d 70 25 21 38 3d 30 0d  |....  temp%!8=0.|
00004f30  1d f6 05 cd 0d 1e 00 12  74 65 6d 70 25 21 31 32  |........temp%!12|
00004f40  3d 31 3c 3c 32 33 0d 1e  0a 1b e3 20 69 63 6f 6e  |=1<<23..... icon|
00004f50  25 3d 62 61 73 65 25 20  b8 20 62 61 73 65 25 2b  |%=base% . base%+|
00004f60  32 0d 1e 14 13 20 20 74  65 6d 70 25 21 34 3d 69  |2....  temp%!4=i|
00004f70  63 6f 6e 25 0d 1e 1e 23  20 20 c8 99 20 22 57 69  |con%...#  .. "Wi|
00004f80  6d 70 5f 53 65 74 49 63  6f 6e 53 74 61 74 65 22  |mp_SetIconState"|
00004f90  2c 2c 74 65 6d 70 25 0d  1e 28 05 ed 0d 1e 32 05  |,,temp%..(....2.|
00004fa0  e1 0d 1e 3c 05 3a 0d 1e  46 05 3a 0d 1e 50 05 3a  |...<.:..F.:..P.:|
00004fb0  0d 1e 5a 05 3a 0d 1e 64  12 dd f2 64 72 61 67 66  |..Z.:..d...dragf|
00004fc0  69 6e 69 73 68 65 64 0d  1e 6e 17 ea 20 73 74 61  |inished..n.. sta|
00004fd0  72 74 25 2c 65 6e 64 25  2c 6c 6f 6f 70 25 0d 1e  |rt%,end%,loop%..|
00004fe0  78 16 21 74 65 6d 70 25  3d 4d 61 69 6e 48 61 6e  |x.!temp%=MainHan|
00004ff0  64 6c 65 25 0d 1e 82 23  c8 99 20 22 57 69 6d 70  |dle%...#.. "Wimp|
00005000  5f 47 65 74 57 69 6e 64  6f 77 53 74 61 74 65 22  |_GetWindowState"|
00005010  2c 2c 74 65 6d 70 25 0d  1e 8c 2b 73 74 61 72 74  |,,temp%...+start|
00005020  25 3d 28 74 65 6d 70 25  21 31 36 2d 74 65 6d 70  |%=(temp%!16-temp|
00005030  25 21 32 34 2d 62 6c 6f  63 6b 25 21 31 32 29 81  |%!24-block%!12).|
00005040  34 38 0d 1e 96 28 65 6e  64 25 3d 28 74 65 6d 70  |48...(end%=(temp|
00005050  25 21 31 36 2d 74 65 6d  70 25 21 32 34 2d 62 6c  |%!16-temp%!24-bl|
00005060  6f 63 6b 25 21 34 29 81  34 38 0d 1e a0 2e e7 20  |ock%!4).48..... |
00005070  61 64 6a 75 73 74 64 72  61 67 25 20 8c 20 74 65  |adjustdrag% . te|
00005080  6d 70 25 21 31 32 3d 30  20 8b 74 65 6d 70 25 21  |mp%!12=0 .temp%!|
00005090  31 32 3d 31 3c 3c 32 31  0d 1e aa 16 21 74 65 6d  |12=1<<21....!tem|
000050a0  70 25 3d 4d 61 69 6e 48  61 6e 64 6c 65 25 0d 1e  |p%=MainHandle%..|
000050b0  b4 11 74 65 6d 70 25 21  38 3d 31 3c 3c 32 31 0d  |..temp%!8=1<<21.|
000050c0  1e be 22 e7 20 73 74 61  72 74 25 3e 65 6e 64 25  |..". start%>end%|
000050d0  20 8c 20 c8 94 20 73 74  61 72 74 25 2c 65 6e 64  | . .. start%,end|
000050e0  25 0d 1e c8 18 e7 20 73  74 61 72 74 25 3d 30 20  |%..... start%=0 |
000050f0  8c 73 74 61 72 74 25 3d  31 0d 1e d2 16 e7 20 47  |.start%=1..... G|
00005100  72 65 79 65 64 32 25 20  8c 65 6e 64 25 3d 31 0d  |reyed2% .end%=1.|
00005110  1e dc 16 e7 20 47 72 65  79 65 64 31 25 20 8c 65  |.... Greyed1% .e|
00005120  6e 64 25 3d 30 0d 1e e6  14 e7 20 73 74 61 72 74  |nd%=0..... start|
00005130  25 3c 3d 65 6e 64 25 20  8c 0d 1e f0 1b 20 20 e3  |%<=end% .....  .|
00005140  20 6c 6f 6f 70 25 3d 73  74 61 72 74 25 20 b8 20  | loop%=start% . |
00005150  65 6e 64 25 0d 1e fa 17  20 20 20 20 74 65 6d 70  |end%....    temp|
00005160  25 21 34 3d 6c 6f 6f 70  25 2a 33 0d 1f 04 25 20  |%!4=loop%*3...% |
00005170  20 20 20 c8 99 20 22 57  69 6d 70 5f 53 65 74 49  |   .. "Wimp_SetI|
00005180  63 6f 6e 53 74 61 74 65  22 2c 2c 74 65 6d 70 25  |conState",,temp%|
00005190  0d 1f 0e 07 20 20 ed 0d  1f 18 05 cd 0d 1f 22 05  |....  ........".|
000051a0  e1 0d ff                                          |...|
000051a3