Home » Personal collection » Acorn ADFS disks » Greaseweazled » adfs_Dominic_1.adf » !Atelier/Atelier

!Atelier/Atelier

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

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

Tape/disk: Home » Personal collection » Acorn ADFS disks » Greaseweazled » adfs_Dominic_1.adf
Filename: !Atelier/Atelier
Read OK:
File size: F39C bytes
Load address: FFFFFB41
Exec address: DD63791A
File contents
   10REM> <Atelier$Dir>.Atelier
   20REM  By Simon Clay Copyright (c) Simon Clay, 1989
   30:    version$="1.02"
   40
   50
   60ONERROR:PROCerror(ERR,REPORT$,ERL,TRUE)
   70PROCinit
   80ONERROR:PROCerror(ERR,REPORT$,ERL,FALSE):PROCreport
   90PROCnormpoint
  100IF FNokfile_at(start_file$,-1,start_t%) THEN t%=start_t%:start_t%=-1:PROCloadfile(start_file$,-1,t%)
  110
  120REPEAT
  130SYS "Wimp_PollIdle",,q%,1E9 TO reason%
  140PROCrespond(reason%)
  150UNTILquit%
  160PROCquit
  170END
  180
  190DEFPROCrespond(reason%)
  200PROCwaitpoint
  210CASEreason%OF
  220WHEN0:
  230WHEN1:
  240WHEN2:PROCopen(!q%,q%!4,q%!8,q%!12,q%!16,q%!20,q%!24,q%!28)
  250WHEN3:PROCclosew(!q%)
  260WHEN4:
  270WHEN5:
  280WHEN6:PROCmouse(!q%,q%!4,q%!8,q%!12,q%!16,q%!20)
  290WHEN7:PROCenddrag
  300WHEN8:
  310WHEN9:PROCmenuselect
  320WHEN10
  330WHEN11
  340WHEN12
  350WHEN17,18:PROCumess1
  360WHEN19:PROCumess2
  370ENDCASE
  380PROCnormpoint
  390ENDPROC
  400
  410DEFPROCquit:PROCnormpoint
  420IFFNdebug:PROCtidy:END
  430$q%="TASK":SYS "Wimp_CloseDown",taskhandle%,!q%
  440QUIT
  450
  460DEFPROCinit
  470DIM q% 2500, workbuf% 100
  480appl$="Atelier"
  490PROCfindmos
  500waiter%=0:PROCwaitpoint
  510testing=FALSE
  520IF os%=2 THEN SYS "OS_GetEnv" TO SA$:IF MID$(SA$,7,5)<>"-quit" THEN testing=TRUE
  530PROCinit_at
  540PROCcheckmos
  550*fx229,1
  560wimpsaved%=FALSE
  570v%=FNinitwimp:IFv%<180:MODE12:PROCerr(2)
  580quit%=FALSE:dialogue%=-1E9:stopreason%=-1
  590ackpending%=FALSE:ackref%=-1
  600dragreason%=-1:help$=""
  610savereason%=-1
  620PROCdefws:PROCdefmenus:PROCversion
  630checkref%=-1
  640as$="Are you sure ?"
  650PROCbaricon
  660REM find start bit
  670start_file$="":start_t%=-1
  680LOCAL ERROR
  690ON ERROR LOCAL start_file$="":start_t%=-1:GOTO 830
  700SYS "OS_GetEnv" TO r0,r1,r2
  710A$=""
  720IF ?r0<>0 THEN A$+=CHR$(?r0):r0+=1:GOTO 720
  730IF INSTR(A$," ")<>0 THEN A$=MID$(A$,INSTR(A$," ")+1):GOTO 730
  740IF A$<>"" THEN
  750SYS "OS_File",5,A$ TO r0,r1,r2
  760IF r0=1 THEN
  770IF ((r2 AND &FFF00000)=&FFF00000) THEN start_t%=(r2 AND &FFF00)>>8
  780start_file$=A$
  790ENDIF
  800ENDIF
  810ENDIF
  820REM end start bit
  830ENDPROC
  840
  850DEFPROCversion
  860LOCALT$:T$=version$:IFNOTFNprod:T$+=" *UNFINISHED*"
  870PROCseti(w_pinfo%,4,"v"+T$)
  880ENDPROC
  890
  900DEFFNprod=MID$(version$,INSTR(version$,".")+1,1)="0"
  910DEFFNdebug=NOTFNprod ANDINKEY-1ANDINKEY-2
  920
  930DEFFNinitwimp
  940$q%="TASK":SYS "Wimp_Initialise",200,!q%,"Atelier"TO!q%,taskhandle%
  950=!q%
  960
  970DEFPROCtidy
  980PROCnormpoint
  990VDU4:PRINTTAB(0,2);:*fx4
 1000*fx225,1
 1010*fx229
 1020ONERROR:REPORT:PRINT" ";ERL:END
 1030ENDPROC
 1040
 1050DEFPROCbaricon
 1060!q%=-1:q%!4=0:q%!8=0:q%!12=64:q%!16=68
 1070q%!20=%11000000000010:$(q%+24)="!Atelier"
 1080SYS"Wimp_CreateIcon",,q%TObaricon%
 1090ENDPROC
 1100
 1110DEFPROCerror(err%,err$,erl%,quit%)
 1120PROCnormpoint:dragreason%=-1:@%=&90A:*fx229,1
 1130LOCALi%,e%,t$,T$
 1140IFFNdebug:err$+=" ("+STR$ERL+")"
 1150LOCALERROR
 1160ONERRORLOCAL:PROCerror(ERR,REPORT$,ERL,TRUE)
 1170!q%=err%:$(q%+4)=err$:SYS"Wimp_ReportError",q%,1,appl$
 1180IFquit%:PROCquit
 1190ENDPROC
 1200
 1210DEFPROCreport:IFFNdebug:VDU4:REPORT:PRINT" @ ";ERL:PROCtidy:END
 1220ENDPROC
 1230
 1240DEFFNdir
 1250LOCALT$:T$=FNArfVar(appl$+"$Dir")
 1260IFT$="":T$="&.!"+appl$+"."
 1270IFRIGHT$(T$)<>".":T$+="."
 1280=T$
 1290
 1300DEFFNArfVar(A$)
 1310LOCALERROR
 1320ONERRORLOCALRESTOREERROR:=""
 1330SYS&23,A$,workbuf%,200,0,3TO,,L%
 1340workbuf%?L%=13:=$workbuf%
 1350
 1360DEFPROCumess1
 1370ref%=q%!8:task%=q%!4:IFtask%=taskhandle%:ENDPROC
 1380mess%=q%!16
 1390CASEmess%OF
 1400WHEN0:PROCquit
 1410WHEN1:PROCdatasaved
 1420WHEN2:PROCsavedata
 1430WHEN3:PROCdataload
 1440WHEN4:ackpending%=FALSE
 1450WHEN5:PROCdataopen
 1460WHEN6:
 1470WHEN7:
 1480WHEN8:PROCprequit
 1490WHEN9:
 1500WHEN&502:
 1510WHEN&400C0:PROCsubmenu(q%!20,q%!24,q%!28,q%+32)
 1520ENDCASE
 1530ENDPROC
 1540
 1550DEFPROCdataopen
 1560LOCALs%,t%
 1570file$=FNzts(q%+44):s%=q%!36:t%=q%!40
 1580IFFNokfile_at(file$,s%,t%)PROCdataloadack:PROCloadfile(file$,s%,t%)
 1590ENDPROC
 1600
 1610DEFPROCdataload
 1620LOCALs%,t%
 1630file$=FNzts(q%+44):s%=q%!36:t%=q%!40
 1640IFFNokfile_at(file$,s%,t%)PROCdataloadack:PROCloadfile(file$,s%,t%)
 1650ENDPROC
 1660
 1670DEFPROCdatasaved
 1680LOCALs%,t%
 1690file$=FNzts(q%+44):s%=q%!36:t%=q%!40
 1700IFFNokfile_at(file$,s%,t%)PROCdatasaveack
 1710ENDPROC
 1720
 1730DEFPROCtemplate(T$)
 1740PROCtemplate1(T$,q%)
 1750ENDPROC
 1760
 1770DEFPROCtemplate1(T$,q%)
 1780LOCAL c%:$workbuf%=T$
 1790SYS "Wimp_LoadTemplate",,q%,curbuf%,endbuf%,-1,workbuf%TO,,curbuf%,,,,c%
 1800IF c%=0 THEN ERROR 1,"Template '"+T$+"' not found"
 1810ENDPROC
 1820
 1830DEFPROCdefws
 1840LOCALI%
 1850bufsz%=&1000
 1860DIM buffer% bufsz%:curbuf%=buffer%:endbuf%=buffer%+bufsz%
 1870SYS"Wimp_OpenTemplate",,FNdir+"AtFrm"
 1880PROCtemplate("stopbox"):q%!64=1:SYS"Wimp_CreateWindow",,q%TOw_stop%
 1890PROCtemplate("save"):q%!64=1:SYS"Wimp_CreateWindow",,q%TOw_save%
 1900PROCtemplate("ProgInfo"):SYS"Wimp_CreateWindow",,q%TOw_pinfo%
 1910SYS"Wimp_CloseTemplate"
 1920free%=endbuf%-curbuf%
 1930ENDPROC
 1940
 1950DEFPROCdefmenus
 1960LOCALt$
 1970DIM mlist% 32,function% 51
 1980bufsz%=&200
 1990DIM menufree% bufsz%:menuptr%=menufree%:menuend%=menufree%+bufsz%
 2000menustart%=menufree%:RESTORE+2
 2010READt$:m_save%=FNcrmenu(t$)
 2020DATA"#Save,Compressed Screen}w_save%,System Screen}w_save%,Super Compacted Screen}w_save%,Super Compacted Sprite}w_save%,System Sprite(s)}w_save%,Brush Shapes}w_save%,Patterns}w_save%"
 2030READt$:m_main%=FNcrmenu(t$)
 2040DATA"#Atelier,Info>w_pinfo%,Save>m_save%,Quit"
 2050ENDPROC
 2060
 2070DEFPROCfront(h%,X%,Y%)
 2080PROCgetw(h%)
 2090IFX%>=0x1%+=X%-x0%:x0%=X%
 2100IFY%>=0y1%+=Y%-y0%:y0%=Y%
 2110PROCopen(h%,x0%,y0%,x1%,y1%,scx%,scy%,-1)
 2120ENDPROC
 2130
 2140DEFPROCtop(h%)
 2150PROCgetw(h%):PROCopen(h%,x0%,y0%,x1%,y1%,scx%,scy%,-1):ENDPROC
 2160
 2170DEFPROCopen(oh%,ox0%,oy0%,ox1%,oy1%,oscx%,oscy%,obh%)
 2180LOCALO%
 2190!q%=oh%:SYS"Wimp_GetWindowState",,q%
 2200PROCwimpopen
 2210ENDPROC
 2220
 2230DEFPROCwimpopen
 2240!q%=oh%:q%!4=ox0%:q%!8=oy0%:q%!12=ox1%:q%!16=oy1%
 2250q%!20=oscx%:q%!24=oscy%:q%!28=obh%:SYS"Wimp_OpenWindow",,q%
 2260ENDPROC
 2270
 2280DEFPROCclosew(!q%)
 2290LOCALI%
 2300SYS"Wimp_CloseWindow",,q%
 2310IF!q%=dialogue%:dialreason%=-1:dialogue%=-1
 2320IFdialogue%>=0:PROCclosew(dialogue%)
 2330CASE!q%OF
 2340WHENw_stop%:stopreason%=-1
 2350ENDCASE
 2360ENDPROC
 2370
 2380DEFFNia(h%,i%):PROCgeti(h%,i%):PROCchkii:=q%!28
 2390DEFFNva(h%,i%):PROCgeti(h%,i%):PROCchkii:=q%!32
 2400DEFFNil(h%,i%):PROCgeti(h%,i%):PROCchkii:=q%!36
 2410
 2420DEFPROCchkii:IF(q%!24AND&100)=0ERROR1,"Icon not indirected"
 2430ENDPROC
 2440
 2450DEFPROCgeti(h%,i%):!q%=h%:q%!4=i%:SYS"Wimp_GetIconState",,q%:ENDPROC
 2460
 2470DEFPROCstop(r%,T$,U$,T%)
 2480dialreason%=r%
 2490IFINKEY-3mi%=3:PROCmstop:ENDPROC
 2500PROCseti(w_stop%,0,T$):PROCseti(w_stop%,1,U$)
 2510PROCunselall(w_stop%):PROCdialogue(w_stop%)
 2520dialreason%=r%
 2530ENDPROC
 2540
 2550DEFPROCdialogue(h%)
 2560LOCALX%,Y%
 2570IFdialogue%>=0:PROCclosew(dialogue%)
 2580PROCnomenu:PROCreadpointer:X%=mx%-200:Y%=my%-85
 2590IFX%<0X%=0
 2600IFY%<96Y%=96
 2610dialogue%=h%:PROCfront(h%,X%,Y%):PROCsetct(h%,-1,-1)
 2620ENDPROC
 2630
 2640DEFPROCreadpointer:LOCALq%:q%=workbuf%
 2650SYS"Wimp_GetPointerInfo",,q%
 2660mx%=!q%:my%=q%!4:mb%=q%!8:mh%=q%!12:mi%=q%!16
 2670ENDPROC
 2680
 2690DEFFNdialogue
 2700IFdialogue%>=0ANDmh%<>dialogue%THEN
 2710PROCclosew(dialogue%)
 2720ENDIF
 2730=FALSE
 2740
 2750DEFPROCmouse(mx%,my%,mb%,mh%,mi%,mo%)
 2760IFdragreason%>=0ORmb%>255:ENDPROC
 2770IFFNdialogue:ENDPROC
 2780CASEmb%OF
 2790WHEN2:PROCmenu
 2800WHEN1,4:PROCselect
 2810WHEN16,64:PROCstartdrag
 2820ENDCASE
 2830ENDPROC
 2840
 2850DEFPROCseti(h%,i%,T$):T$=LEFT$(T$,FNil(h%,i%)):$FNia(h%,i%)=T$
 2860PROCiconupd(h%,i%):PROCgetct:IF!q%=h%ANDq%!4=i%:PROCsetct(h%,i%,LENT$)
 2870ENDPROC
 2880
 2890DEFPROCiset(h%,i%,B%,E%):LOCALq%:q%=workbuf%
 2900!q%=h%:q%!4=i%:q%!12=B%:q%!8=E%:SYS"Wimp_SetIconState",,q%:ENDPROC
 2910
 2920DEFPROCiconupd(h%,i%):PROCiset(h%,i%,0,0):ENDPROC
 2930
 2940DEFPROCreadblock(p%)
 2950x0%=!p%:y0%=p%!4:x1%=p%!8:y1%=p%!12:REM physical area
 2960scx%=p%!16:scy%=p%!20:bhandle%=p%!24:REM scroll offsets, stack depth
 2970bx%=x0%-scx%:by%=y1%-scy%:REM calculate physical co-ords of logical area
 2980ex0%=p%!40:ey0%=p%!44:ex1%=p%!48:ey1%=p%!52:REM logical area
 2990gx0%=p%!24:gy0%=p%!28:gx1%=p%!32:gy1%=p%!36:REM graphics window
 3000open%=(p%!28AND&10000)<>0:REM window open flag
 3010ENDPROC
 3020
 3030DEFPROCgetw(h%)
 3040!q%=h%:SYS "Wimp_GetWindowInfo",,q%
 3050PROCreadblock(q%+4)
 3060ENDPROC
 3070
 3080DEFPROCselect
 3090CASEmh%OF
 3100WHEN-2:enter%=0:PROCenter_atelier
 3110WHENw_stop%:PROCmstop
 3120WHENw_save%:PROCmsave
 3130ENDCASE
 3140ENDPROC
 3150
 3160DEFPROCmstop
 3170IFmi%<3ORmi%>4ENDPROC
 3180LOCALT%:T%=dialreason%:dialreason%=-1
 3190IFmi%=3THEN
 3200CASET%OF
 3210WHEN1:PROCquit
 3220ENDCASE
 3230ENDIF
 3240PROCclosew(w_stop%):ENDPROC
 3250
 3260DEFPROCmsave
 3270IFmi%<>0ENDPROC
 3280LOCALT$:T$=$FNia(w_save%,2):IFT$=FNleaf(T$):ERROR99,"To save, please drag the file icon to a directory viewer"
 3290file$=T$:PROCsavedata1
 3300ENDPROC
 3310
 3320DEFPROCstartdrag
 3330dragreason%=-1:dragbutton%=mb%
 3340CASEmh%OF
 3350WHENw_save%:IFmi%=3:dragreason%=1:PROCdragicon(w_save%,3)
 3360ENDCASE
 3370ENDPROC
 3380
 3390DEFPROCenddrag
 3400PROCreadpointer
 3410IFmh%<>-1THEN
 3420CASEdragreason%OF
 3430WHEN1:file$=FNleaf($FNia(w_save%,2))
 3440PROCsavereq(file$,savet%,saves%,savereason%)
 3450ENDCASE
 3460ENDIF
 3470dragreason%=-1
 3480ENDPROC
 3490
 3500DEFPROCunseli(h%,i%):PROCiset(h%,i%,&200000,0):ENDPROC
 3510
 3520DEFPROCseli(h%,i%):PROCiset(h%,i%,&200000,&200000):ENDPROC
 3530
 3540DEFPROCunselall(h%)
 3550LOCALI%,i%:PROCwchi(h%)
 3560I%=q%:REPEAT:i%=!I%:IFi%>=0:PROCunseli(h%,i%)
 3570I%+=4:UNTILi%<0:ENDPROC
 3580
 3590DEFPROCwchi(h%):SYS "Wimp_WhichIcon",h%,q%,&200000,&200000
 3600ENDPROC
 3610
 3620DEFPROCmenu
 3630CASEmh%OF
 3640WHEN-2:my%=64+3*40:PROCpop(m_main%,-1)
 3650ENDCASE
 3660ENDPROC
 3670
 3680DEFFNpar(t$,s$,RETURN i%):LOCALi1%
 3690i1%=i%+1:i%=INSTR(t$+s$,s$,i1%)
 3700=MID$(t$,i1%,i%-i1%)
 3710
 3720DEFFNcrmenu(menu$)
 3730IFmenufree%+28>menuend%ERROR99,"Menu area full"
 3740LOCAL m%
 3750menuptr%=menufree%
 3760i%=0
 3770IF LEFT$(menu$,1)="#"i%=1:menutitle$=FNpar(menu$,",",i%)ELSEmenutitle$=""
 3780$menuptr%=menutitle$
 3790menuptr%?12=7:menuptr%?13=2:menuptr%?14=7:menuptr%?15=0
 3800menuptr%!16=196-24:menuptr%!20=40:menuptr%!24=0
 3810menuptr%+=28:maxx%=LENmenutitle$
 3820REPEATitem$=FNpar(menu$,",",i%)
 3830PROCmenuitem(item$)
 3840UNTIL item$=""
 3850m%=menufree%:m%!16=(maxx%*8+6)*2
 3860menufree%=menuptr%
 3870=m%
 3880
 3890DEFPROCmenuitem(text$)
 3900IFtext$=""menuptr%!-24=(menuptr%!-24)OR&80:ENDPROC
 3910IFmenuptr%+24>menuend%THENERROR99,"Menu area full"
 3920LOCALi%,flg%
 3930flg%=&00
 3940i%=INSTR(text$,">")
 3950IFi%>0subptr%=EVALMID$(text$,i%+1):text$=LEFT$(text$,i%-1)ELSEsubptr%=-1
 3960i%=INSTR(text$,"}")
 3970IFi%>0subptr%=EVALMID$(text$,i%+1):text$=LEFT$(text$,i%-1):flg%+=&08
 3980IFRIGHT$(text$,1)="#"text$=LEFT$(text$):flg%+=&02
 3990menuptr%!0=flg%:menuptr%!4=subptr%:menuptr%!8=&07000021
 4000IFLEFT$(text$,1)="$"THEN
 4010!menuptr%+=&04:menuptr%!8+=&100:i%=INSTR(text$,"(")
 4020IFi%>0THENL%=VALMID$(text$,i%+1):text$=LEFT$(text$,i%-1)ELSEL%=12
 4030menuptr%!12=EVALMID$(text$,2):menuptr%!16=-1:menuptr%!20=L%
 4040text$=STRING$(L%," ")
 4050ELSE
 4060IFLENtext$<=12THEN
 4070$(menuptr%+12)=text$
 4080ELSE
 4090I%=FNworkspace(LENtext$+1):$I%=text$
 4100menuptr%!12=I%:menuptr%!16=-1:menuptr%!20=LENtext$+1
 4110menuptr%!8=menuptr%!8 OR &100
 4120ENDIF
 4130IFLENtext$>maxx%maxx%=LENtext$
 4140ENDIF
 4150menuptr%+=24
 4160ENDPROC
 4170
 4180DEFFNworkspace(L%)
 4190IF curbuf%+L%>endbuf%ERROR99,"No more buffer space"
 4200curbuf%+=L%:=curbuf%-L%
 4210
 4220DEFPROCprep(menu%,tree%)
 4230LOCALI%,T$
 4240PROCclearts(menu%)
 4250CASEmenu%OF
 4260WHENm_main%:PROCmp_main
 4270ENDCASE
 4280ENDPROC
 4290
 4300DEFPROCmp_main
 4310LOCALn%,f$,s%,t%
 4320IFtree%>0THEN
 4330IF!mlist%=1THEN
 4340n%=mlist%!4:PROCsetfile_at(n%,f$,s%,t%):PROCsaveset(f$,t%,n%,s%)
 4350ENDIF
 4360ENDIF
 4370ENDPROC
 4380
 4390DEFPROCpop(menu%,tree%)
 4400IFmenu%<0:ENDPROC
 4410PROCprep(menu%,tree%)
 4420SYS "Wimp_CreateMenu",,menu%,mx%-50,my%+32
 4430openmenu%=menu%
 4440ENDPROC
 4450
 4460DEFPROCnomenu
 4470SYS"Wimp_CreateMenu",,-1:openmenu%=-1
 4480ENDPROC
 4490
 4500DEFPROCmenuselect
 4510LOCALI%
 4520I%=0:REPEATmlist%!I%=q%!I%:I%+=4:UNTILq%!(I%-4)=-1
 4530PROCreadpointer
 4540CASEopenmenu%OF
 4550WHENm_main%:PROCm_main
 4560ENDCASE
 4570IFmb%=1THEN
 4580PROCpop(openmenu%,mlist%):ELSEPROCnomenu
 4590ENDIF
 4600ENDPROC
 4610
 4620DEFPROCm_main
 4630CASE!mlist%OF
 4640WHEN0:PROCdialogue(w_pinfo%)
 4650WHEN2:IFFNaltered_at:PROCqquit:ELSEPROCquit
 4660ENDCASE
 4670ENDPROC
 4680
 4690DEFPROCsubmenu(menu%,X%,Y%,q%)
 4700REM ;{{{{{{
 4710LOCALI%
 4720I%=0:REPEATmlist%!I%=q%!I%:I%+=4:UNTILq%!(I%-4)=-1
 4730PROCprep(openmenu%,mlist%)
 4740SYS"Wimp_CreateSubMenu",,menu%,X%,Y%
 4750ENDPROC
 4760
 4770DEFPROCclearts(mh%):LOCALI%:I%=mh%+28
 4780IFmh%<menustart%ORmh%>menuend%:ENDPROC
 4790REPEAT
 4800!I%=!I%ANDNOT1:I%!8=I%!8ANDNOT&400000:
 4810I%+=24:UNTILI%!-24AND&80
 4820ENDPROC
 4830
 4840DEFPROCshade(mh%,I%)
 4850mh%!(28+8+24*I%)=mh%!(28+8+24*I%)OR&400000:ENDPROC
 4860
 4870DEFPROCtick(mh%,I%)
 4880mh%!(28+24*I%)=mh%!(28+24*I%)OR&01:ENDPROC
 4890
 4900DEFFNcommand
 4910LOCALT%,I%,T$
 4920SYS"OS_GetEnv" TO T$
 4930PROCstrip(T$)
 4940=T$
 4950
 4960DEFFNparam
 4970LOCALI%,T$:T$=FNcommand
 4980I%=INSTR(T$," -quit "):IFI%=0:=""
 4990T$=MID$(T$,I%+7):PROCstrip(T$)
 5000I%=INSTR(T$," "):IFI%>0T$=MID$(T$,I%+1):PROCstrip(T$):ELSE=""
 5010I%=INSTR(T$," "):IFI%>0T$=LEFT$(T$,I%-1):PROCstrip(T$)
 5020=T$
 5030
 5040DEFFNfiletype(T$)
 5050LOCALT%,U%:SYS "OS_File",5,T$ TOU%,,T%
 5060IFT%=0:=-1
 5070=(T%AND&FFF00)>>8
 5080 
 5090DEFPROCwaitpoint
 5100IF os%<>2 ENDPROC
 5110waiter%+=1
 5120SYS"Hourglass_On"
 5130ENDPROC
 5140
 5150DEFPROCnormpoint
 5160IF os%<>2 ENDPROC
 5170WHILEwaiter%>0:SYS"Hourglass_Off":waiter%-=1:ENDWHILE:waiter%=0
 5180ENDPROC
 5190
 5200DEFPROChelp
 5210ENDPROC
 5220
 5230DEFPROCdataloadack
 5240q%!0=20:q%!12=ref%:q%!16=4
 5250SYS"Wimp_SendMessage",17,q%,task%
 5260ENDPROC
 5270
 5280DEFPROCdatasaveack
 5290IFFNArfVar("Wimp$Scrap")="":ERROR99,"<Wimp$Scrap> not defined"
 5300!q%=60:q%!12=ref%:q%!16=2:q%!36=-1:$(q%+44)="<Wimp$Scrap>"+CHR$0
 5310SYS"Wimp_SendMessage",17,q%,task%:ackref%=q%!8
 5320ENDPROC
 5330
 5340DEFPROCsavereq(T$,t%,s%,r%)
 5350savereason%=r%
 5360q%!32=my%:q%!28=mx%:q%!24=mi%:q%!20=mh%
 5370q%!16=1:q%!12=0:q%!36=s%:q%!40=t%:!q%=60
 5380$(q%+44)=T$+CHR$0:SYS"Wimp_SendMessage",17,q%,q%!20,q%!24
 5390saveref%=q%!8:ENDPROC
 5400
 5410DEFPROCloadmess
 5420$(q%+44)=file$+CHR$0:!q%=60
 5430q%!12=ref%:q%!16=3:SYS"Wimp_SendMessage",17,q%,task%
 5440ackpending%=TRUE:ENDPROC
 5450 
 5460DEFFNzts(T%):LOCALT$:T$=""
 5470WHILE?T%<>0:T$+=CHR$?T%:T%+=1:ENDWHILE
 5480=T$
 5490
 5500DEFPROCgetct:SYS"Wimp_GetCaretPosition",,q%:ENDPROC
 5510
 5520DEFPROCsetct(h%,i%,o%):SYS "Wimp_SetCaretPosition",h%,i%,,,-1,o%
 5530ENDPROC
 5540
 5550DEFFNleaf(T$)
 5560LOCALI%,C%
 5570IF((INSTR(T$,".")=0)AND(INSTR(T$,":")=0))THEN=T$
 5580I%=LEN(T$)
 5590REPEAT
 5600C%=ASCMID$(T$,I%,1)
 5610I%-=1
 5620UNTIL(I%<=0ORC%=ASC"."ORC%=ASC":")
 5630IFI%>0THEN=RIGHT$(T$,LEN(T$)-I%-1)
 5640=T$
 5650
 5660DEFPROCscrsz
 5670!workbuf%=4:workbuf%!4=5:workbuf%!8=11:workbuf%!12=12:workbuf%!16=-1
 5680SYS "OS_ReadVduVariables",workbuf%,workbuf%+24
 5690q%!32=(workbuf%!32)<<(workbuf%!24):q%!36=(workbuf%!36)<<(workbuf%!28)
 5700ENDPROC
 5710
 5720DEFPROCsaveset(f$,T%,r%,s%)
 5730savereason%=r%:savef$=f$:savet%=T%:saves%=s%
 5740PROCseti(w_save%,2,f$):$FNva(w_save%,3)="sfile_"+RIGHT$("00"+STR$~T%,3)
 5750ENDPROC
 5760
 5770DEFPROCdragicon(h%,i%)
 5780LOCALx%,y%,ys%
 5790PROCgetw(h%):ys%=y1%-y0%:x%=bx%:y%=y0%-scy%
 5800PROCgeti(h%,i%):q%!8+=x%:q%!12+=y%+ys%:q%!16+=x%
 5810q%!20+=y%+ys%:q%!24=0:q%!28=0:!q%=0:PROCdrag5:ENDPROC
 5820
 5830DEFPROCdrag5:PROCreadpointer:PROCscrsz
 5840q%!24-=mx%-q%!8:q%!28-=my%-q%!12:q%!32+=q%!16-mx%:q%!36+=q%!20-my%
 5850q%!4=5:SYS"Wimp_DragBox",,q%:ENDPROC
 5860
 5870DEFPROCsavedata
 5880IFq%!12<>saveref%:ENDPROC
 5890file$=FNzts(q%+44)
 5900PROCsavedata1
 5910ENDPROC
 5920
 5930DEFPROCsavedata1:PROCclosew(w_save%)
 5940PROCsavefile(savereason%,file$)
 5950savereason%=-1:PROCloadmess
 5960ENDPROC
 5970
 5980DEFPROCprequit
 5990IFFNaltered_at:PROCackrec:PROCqquit
 6000ENDPROC
 6010
 6020DEFPROCackrec:q%!12=ref%:SYS "Wimp_SendMessage",19,q%,task%
 6030DEFPROCqquit:PROCstop(1,"Lose screen and quit Atelier",as$,-1)
 6040ENDPROC
 6050 
 6060DEFPROCenter_atelier
 6070LOCALERROR:ONERRORLOCAL:RESTOREERROR:PROCrestorewimp:ERRORERR,REPORT$
 6080enter%=0:PROCrun_at:PROCrestorewimp:ENDPROC
 6090
 6100DEFPROCsavefile(n%,f$)
 6110LOCALERROR:ONERRORLOCAL:RESTOREERROR:PROCrestorewimp:ERRORERR,REPORT$
 6120PROCsave_at(n%,f$):PROCrestorewimp:ENDPROC
 6130
 6140DEFPROCsavewimp:IFos%=1:ENDPROC
 6150IF wimpsaved% THEN ENDPROC
 6160wimpsaved%=TRUE
 6170LOCALI%,J%:REM SYS"Wimp_CommandWindow",1
 6180PROCnormpoint:mode%=MODE:PROCmode15
 6190*fx229
 6200ENDPROC
 6210
 6220DEFPROCrestorewimp:IFos%=1:ENDPROC
 6230IF NOT wimpsaved% THEN ENDPROC
 6240wimpsaved%=FALSE
 6250*fx229,1
 6260SYS "Wimp_CommandWindow",-1
 6270SYS "Wimp_SetMode",mode%:OFF:SYS"Wimp_ForceRedraw",-1,-1E9,-1E9,1E9,1E9
 6280ENDPROC
 6290
 6300DEFPROCmode15
 6310LOCALERROR
 6320ONERRORLOCAL:RESTOREERROR:ERROR99,"Atelier needs to use MODE 15 and there is not enough RAM! You must use the task manager to make at least 160k of screen available"
 6330MODE15:ENDPROC
 6340
 6350DEFPROCfindmos:os%=1
 6360LOCALERROR:ONERRORLOCAL:RESTOREERROR:ENDPROC
 6370RESTORE+1
 6380os%=2:ENDPROC
 6390
 6400DEFPROCcheckmos:os%=1
 6410LOCALERROR:ONERRORLOCAL:RESTOREERROR:PROCmos12:END
 6420RESTORE+1
 6430os%=2:ENDPROC
 6440
 6450DEFPROCmos12
 6460MODE15:OFF
 6470SYS &400C0
 6480enter%=0
 6490PROCrun_at
 6500MODE12:*desktop
 6510END
 6520
 6530DEFPROCstore(RETURN A$,f$)
 6540LOCALI%,C%,T$:T$=f$:IFT$>""THEN
 6550FORI%=1TOLENT$:C%=ASCMID$(T$,I%)
 6560IFC%>64ANDC%<91MID$(T$,I%,1)=CHR$(C%+32)
 6570NEXT
 6580ENDIF
 6590IFINSTR(T$,"$scrap>")=0A$=f$
 6600ENDPROC
 6610
 6620
 6630REM ----ATELIER BITS-------------------------------------------------
 6640DEFPROCrun_at
 6650REM ;{{ here, copy the background screen to the foreground
 6660REM ;{{ and do the biz. NB all ERROR traps etc MUST be LOCAL
 6670PROCsavewimp
 6680PROCnormpoint
 6690VDU 23,255,255,255,255,255,255,255,255,255
 6700cat%!0=148
 6710cat%!4=-1
 6720SYS "OS_ReadVduVariables",cat%,cat%
 6730!topscreen%=!cat%
 6740PROCunsetsoftkeys
 6750SYS "OS_RemoveCursors"
 6760PROCsetvectors
 6770CALL undorestore%
 6780PROCenter_action
 6790CALL colour%
 6800CALL mousecolour%
 6810CALL liftdown%
 6820VDU5:CALL helptext%
 6830PROCupdate
 6840PROCatelier
 6850CALL liftup%
 6860CALL undosave%
 6870PROCunsetvectors
 6880REM PROCsetsoftkeys
 6890PROCrestorewimp
 6900ENDPROC
 6910
 6920DEFPROCsetvectors
 6930IF vectors_set% THEN ENDPROC
 6940SYS "OS_Claim",&1D,duff_call%,0
 6950PROCset_abort_traps
 6960vectors_set%=TRUE
 6970ENDPROC
 6980
 6990DEFPROCunsetvectors
 7000IF NOT vectors_set% THEN ENDPROC
 7010SYS "OS_Release",&1D,duff_call%,0
 7020PROCunset_abort_traps
 7030vectors_set%=FALSE
 7040ENDPROC
 7050
 7060DEFPROCenter_action
 7070ON ERROR LOCAL:PROCerror_at:ENDPROC
 7080CASE enter% OF
 7090WHEN0:REM no action,just enter
 7100WHEN1:REM compacted load
 7110*UnDefine
 7120*SetPosition 0 1023
 7130G%=cat%:$cat%=f$:CALL com_update_info%
 7140OSCLI"PlotFile "+f$
 7150enter%=0:PROCstore($screen_str%,f$)
 7160WHEN2:$file_str%=f$  :REM sprites - handled by atelier
 7170WHEN3:$cat%=f$
 7180G%=cat%
 7190CALL compactedload%
 7200CALL undosave%
 7210enter%=0
 7220ENDCASE
 7230ENDPROC
 7240
 7250DEFFNaltered_at
 7260REM ;{{ return TRUE if you would lose any data if they quit just
 7270REM ;{{ now (ie they have altered screen/sprites/brushes etc
 7280REM ;{{ since last save/load. Just return FALSE if you don't care
 7290=NOT testing
 7300
 7310DEFFNokfile_at(f$,s%,t%)
 7320IF t%=&D7E OR t%=&D3A OR t%=&D7F OR t%=&D39 OR t%=&FF9 OR t%=&DE2 THEN =TRUE ELSE =FALSE
 7330
 7340DEFPROCloadfile(f$,s%,t%)
 7350LOCALERROR:ONERRORLOCAL:RESTOREERROR:PROCrestorewimp:ERRORERR,REPORT$
 7360PROCload_at(f$,s%,t%):PROCrestorewimp:ENDPROC
 7370
 7380DEFPROCload_at(f$,s%,t%)
 7390CASE t% OF
 7400WHEN&D7F,&FF9,&DE2
 7410SYS "OS_Find",&40,f$ TO hdl%
 7420SYS "OS_GBPB",4,hdl%,cat%,1
 7430SYS "OS_Find",&00,hdl%
 7440ENDCASE
 7450CASE t% OF
 7460WHEN&D7E:OSCLI"LOAD "+f$+" "+STR$~(brush%):PROCstore($brush_str%,f$)
 7470WHEN&D3A:OSCLI"LOAD "+f$+" "+STR$~(brpatt%):PROCstore($pattern_str%,f$):!pm%=1
 7480WHEN&D7F:enter%=1:PROCrun_at
 7490WHEN&D39:PROCformula_load(f$)
 7500WHEN&FF9:enter%=2:PROCstore($sprite_str%,f$):PROCrun_at
 7510WHEN&DE2:enter%=3:PROCstore($screen_str%,f$):PROCrun_at
 7520ENDCASE
 7530ENDPROC
 7540
 7550DEFPROCsave_at(n%,f$)
 7560CALL savecheck%
 7570CASE n% OF
 7580WHEN0,1,2,3
 7590SYS "OS_File",&0A,f$,&FFF,,cat%,cat%   :REM saves dummy file
 7600PROCsavewimp
 7610cat%!0=148:cat%!4=-1
 7620SYS "OS_ReadVduVariables",cat%,cat%
 7630!topscreen%=!cat%:SYS "OS_RemoveCursors"
 7640CALL undorestore%
 7650CASE n% OF
 7660WHEN0:PROCcompressedsave(f$):PROCstore($screen_str%,f$)
 7670WHEN1:OSCLI"SCREENSAVE "+f$:PROCstore($screen_str%,f$)
 7680WHEN2:PROCcompactedsave(0,f$):PROCstore($screen_str%,f$)
 7690WHEN3:PROCcompactedsave(1,f$):PROCstore($screen_str%,f$)
 7700ENDCASE
 7710PROCrestorewimp
 7720WHEN4:OSCLI"SSAVE "+f$:PROCstore($sprite_str%,f$)
 7730WHEN5:OSCLI"SAVE "+f$+" "+STR$~(brush%)+" +2000":PROCstore($brush_str%,f$)
 7740OSCLI"SETTYPE "+f$+" D7E"
 7750WHEN6:OSCLI"SAVE "+f$+" "+STR$~(brpatt%)+" +2000":PROCstore($brush_str%,f$)
 7760OSCLI"SETTYPE "+f$+" D3A"
 7770ENDCASE
 7780ENDPROC
 7790
 7800DEFPROCsetfile_at(n%,RETURN f$,RETURN s%,RETURN t%)
 7810REM ;{{ setup up f$ to be filename, s% to estimated size and t%
 7820REM ;{{ to filetype for file of internal type n%
 7830REM ;{{ NB s%<0 means unknown size, try it anyway
 7840CASE n% OF
 7850WHEN0:t%=&DE2:f$=$screen_str% :s%=&28000
 7860WHEN1:t%=&FF9:f$=$screen_str% :s%=&28000
 7870WHEN2:t%=&D7F:f$=$screen_str% :s%=-1
 7880WHEN3:t%=&D7F:f$=$screen_str% :s%=-1
 7890WHEN4:t%=&FF9:f$=$sprite_str% :SYS "OS_SpriteOp",8TO,,,,,s%
 7900WHEN5:t%=&D7E:f$=$brush_str%  :s%=&2000
 7910WHEN6:t%=&D3A:f$=$pattern_str%:s%=&2000
 7920ENDCASE
 7930ENDPROC
 7940
 7950DEFPROCanimate_sprites
 7960FOR frame%=0 TO 7
 7970CALL colour%:RECTANGLE FILL 0,0,1023,1023
 7980OSCLI"PlotFile AniCreate.Sprites.Frame"+STR$frame%
 7990CALL undosave%
 8000x1%=0:y1%=0
 8010x2%=1023:y2%=1023
 8020x3%=0:y3%=0
 8030x4%=x3%+63:y4%=y3%+127
 8040step%=happenstep%:PROCscreen_select
 8050OSCLI"DefineBuffer "+STR$(STORE%)+" &28000"
 8060OSCLI"Com_Save AniCreate.Sprites.Small"+STR$frame%+" 0 0 63 127 0"
 8070NEXT
 8080ENDPROC
 8090
 8100DEFPROCanimate
 8110FOR frame%=45 TO 64
 8111FOR !pc%=0 TO 255 STEP 255
 8120CALL colour%:RECTANGLE FILL 0,0,1023,1023
 8130OSCLI"PlotFile ShipSpr.Sprites.Ship"+STR$frame%
 8140CALL undosave%
 8150x1%=0:y1%=0
 8160x2%=1023:y2%=1023
 8170x3%=1024+!pc%DIV255*96:y3%=0
 8180x4%=x3%+95:y4%=y3%+191
 8190step%=happenstep%:PROCscreen_select
 8191NEXT
 8200OSCLI"DefineBuffer "+STR$(STORE%)+" &28000"
 8210OSCLI"Com_Save ShipSpr.Small.Ship"+STR$frame%+" 1024 0 1215 191 0"
 8220NEXT
 8230ENDPROC
 8240
 8250DEFPROCatelier
 8260angle=0
 8270*FX 15,0
 8280REM                    ---------MAIN LOOP-----------
 8290ON ERROR LOCAL PROCerror_at
 8300REPEAT
 8310REPEAT
 8320mrctx1%=0
 8330mrcty1%=0
 8340mrctx2%=1279
 8350mrcty2%=1023
 8360CASE !Ac% OF
 8370WHEN35,36:mrctx1%=32:mrcty1%=32:mrctx2%=1216:mrcty2%=960
 8380WHEN24:IF step%>2 THEN PROCsetlimits(xs%,-ys%)
 8390WHEN45:mrctx1%=-xs%-xo%:mrcty1%=-ys%-yo%:mrctx2%=1280+xs%:mrcty2%=1024+ys%
 8400WHEN71:IF step%>2 THEN mrctx1%=x1%:mrcty1%=y2%:mrctx2%=xs%:mrcty2%=-ys%
 8410WHEN75:IF step%>2 THEN mrctx2%-=xs%DIV2:mrcty2%+=ys%
 8420WHEN37,40:IF FNsprites>0 THEN CALL locatesprite%:SYS &2E,40,,!sprstr TO ,,,xs%,ys%:PROCsetlimits(xs%*2,ys%*4)
 8430ENDCASE
 8440MOUSE RECTANGLE mrctx1%,mrcty1%,mrctx2%,mrcty2%
 8450PROCmouse_handle
 8460IF MB=2 OR enter% THEN PROCmenucalled
 8470AcCODE%=?(!step_codes)
 8480happenstep%=(AcCODE% AND 15)
 8490stepcode%=?(!step_codes+step%)
 8500IF (!pm%=2) AND (stepcode% AND 64) THEN step%+=1:PROCcopysort:F%=step%:CALL helpstep%:GOTO 8490
 8510CASE !Ac% OF
 8520WHEN60,61,62,63,64,65
 8530CASE !rect_brush_mode OF
 8540WHEN0:AcCODE%=AcCODE% AND 191
 8550WHEN1:happenstep%+=1:AcCODE%=AcCODE% OR 64
 8560IF step%=2 THEN stepcode%=stepcode% OR 16
 8570WHEN2:happenstep%+=1:AcCODE%=AcCODE% AND 191
 8580IF step%=1 THEN stepcode%=stepcode% OR 16+32
 8590ENDCASE
 8600ENDCASE
 8610IF (AcCODE% AND 64) AND step%=happenstep% THEN step%=1:PROCBUTOFF(4):F%=step%:CALL helpstep%
 8620IF NOT (AcCODE% AND 64) AND step%=happenstep% THEN step%=step%-1:F%=step%:CALL helpstep%
 8630CASE TRUE OF
 8640WHEN(NOT (AcCODE% AND 64)) AND (step%=happenstep%-1):
 8650IF (MB AND 4)=4 THEN step%=step%+1:F%=step%:CALL helpstep%
 8660OTHERWISE
 8670IF NOT select THEN IF (MB AND 4)=(step% AND 1)*4 THEN step%=step%+1:F%=step%:CALL helpstep%
 8680IF select THEN IF (MB AND 4) THEN step%=step%+1:F%=step%:CALL helpstep%:PROCBUTOFF(4)
 8690ENDCASE
 8700*FX 229,1
 8710IF step%=happenstep% THEN *FX 229,0
 8720inaction=!Ac%
 8730IF (MB AND 1)=1 THEN PROCadjustpressed
 8740E%=-1
 8750IF stepcode% AND 16 THEN
 8760CASE step% OF
 8770WHEN0,1:C%=MX-x0%:D%=MY-y0%
 8780WHEN2,3:C%=MX-x1%:D%=MY-y1%
 8790WHEN4,5:C%=MX-x3%:D%=MY-y3%
 8800ENDCASE
 8810IF stepcode% AND 32 THEN B%=C%*2:C%=D%:CALL calc_radius%:C%=!RESULTX/2:E%=2 ELSE E%=0
 8820ENDIF
 8830A%=MX:B%=MY:CALL help%
 8840IF step%=happenstep% AND (AcCODE% AND 128) THEN
 8850WAIT
 8860CALL liftup%
 8870CALL colour%
 8880IF !pm%>0 AND (AcCODE% AND &20) THEN CALL bit_map_scan_A%
 8890PROCscreen_select
 8900IF !pm%>0 AND (AcCODE% AND &20) THEN CALL bit_map_pattern%
 8910IF (AcCODE% AND 16) THEN CALL show_thru%
 8920CALL liftdown%
 8930ELSE
 8940GCOL 3,63 TINT 192
 8950PROCscreen_select
 8960ENDIF
 8970keypress%=INKEY(0):IF keypress%>0 THEN PROCkeypressed
 8980IF inaction<>!Ac% THEN PROCprocess_new_action
 8990IF step%<>oldstep% THEN F%=step%:CALL helpstep%
 9000oldstep%=step%
 9010UNTIL !Ac%=20
 9020PROCreset_action
 9030IF os%=1 THEN
 9040IF testing THEN
 9050PROCerrorhandle(3,"Where to Boss","Basic Program|Source Code|Don't Exit",selected)
 9060ELSE
 9070PROCerrorhandle(2,"Do you really wish to exit from ATELIER","CONFIRM",selected)
 9080ENDIF
 9090ELSE selected=1
 9100ENDIF
 9110IF testing THEN UNTIL selected=1 OR selected=2
 9120IF NOT testing THEN UNTIL selected=1
 9130REM          -------------END OF MAIN LOOP ----------
 9140IF NOT testing OR os%=2 THEN ENDPROC
 9150PROCtidy_at
 9160*FX 15,0
 9170CASE selected OF
 9180WHEN1:
 9190*KEY 4 SAVE|MRUN|M
 9200*FX 138,0,69
 9210*FX 138,0,68
 9220*FX 138,0,46
 9230*FX 138,0,46
 9240*FX 138,0,13
 9250END
 9260WHEN2:
 9270*KEY 4 RUN|M
 9280PROCstring_to_buffer("LO. ""<Ateli*$Dir>.Sour*.Sou*"""+CHR$(13)+"ED.."+CHR$(13))
 9290END
 9300ENDCASE
 9310ENDPROC
 9320
 9330DEFPROCadjustpressed
 9340IF !Ac%=82 OR !Ac%=59 THEN
 9350PROCreset_action
 9360ELSE
 9370IF (MB AND 1)=1 AND step%>1 THEN step%=step%-1:PROCBUTOFF(1):PROCupdate:F%=step%:CALL helpstep%
 9380ENDIF
 9390ENDPROC
 9400
 9410DEFPROCreset_action
 9420!Ac%=!oldaction%
 9430ENDPROC
 9440
 9450DEFPROCmouse_handle
 9460MOUSE MX,MY,MB:IF mgs THEN PROCmousegrid
 9470IF !left_handed THEN CASE MB OF
 9480WHEN%001:MB=%100
 9490WHEN%011:MB=%110
 9500WHEN%100:MB=%001
 9510WHEN%110:MB=%011
 9520ENDCASE
 9530IF NOT INKEY(-97) THEN ENDPROC
 9540IF INKEY(-1) THEN xrst%=MX:yrst%=MY ELSE MOUSE TO xrst%,yrst%
 9550ENDPROC
 9560
 9570DEF PROCmousegrid
 9580MX=((MX+mousegrid DIV 2) DIV mousegrid)*mousegrid
 9590MY=((MY+mousegrid DIV 2) DIV mousegrid)*mousegrid
 9600IF MX<mrctx1% THEN MX=mrctx1%
 9610IF MY<mrcty1% THEN MY=mrcty1%
 9620IF MX>mrctx2% THEN MX=mrctx2%
 9630IF MY>mrcty2% THEN MY=mrcty2%
 9640POINT TO MX,MY
 9650ENDPROC
 9660
 9670DEFPROCset_action
 9680CASE !Ac% OF
 9690WHEN57,59,82,43
 9700OTHERWISE
 9710!oldaction%=!Ac%
 9720ENDCASE
 9730ENDPROC
 9740
 9750DEFPROCBUTOFF(M)
 9760REPEAT
 9770MOUSE DX,DY,MB
 9780IF !left_handed THEN CASE MB OF
 9790WHEN%001:MB=%100
 9800WHEN%011:MB=%110
 9810WHEN%100:MB=%001
 9820WHEN%110:MB=%011
 9830ENDCASE
 9840UNTIL (MB AND M)=0
 9850ENDPROC
 9860
 9870DEFPROCkeypressed
 9880*FX 15,0
 9890CASE CHR$(keypress%) OF
 9900WHEN"*":enter%=5
 9910ENDCASE
 9920IF (keypress% AND 128)=0 THEN ENDPROC
 9930CASE keypress% OF
 9940WHEN&80,&90,&A0,&B0        :REM f0-print key
 9950CALL liftup%
 9960CALL undosave%
 9970PROCpoint(0,0)
 9980OSCLI(funcprint$)
 9990IF MODE<>15 THEN MODE 15:CALL undorestore%
10000PROCupdate
10010CALL liftdown%
10020WHEN&B1
10030CALL undosave%
10040*FX229
10050MODE 0
10060VDU2
10070FOR !Ac%=0 TO 82
10080!rect_brush_mode=(!Ac% MOD 3)
10090PRINT"Function ";!Ac%
10100PRINT
10110CALL helptext%
10120PRINT
10130NEXT
10140VDU3
10150MODE 15
10160CALL undorestore%
10170WHEN&81,&91,&A1,&B1:CALL liftup%:CALL undorestore%:CALL liftdown%
10180WHEN&82,&92,&A2,&B2:step%=1:PROCset_action:!Ac%=57
10190WHEN&83,&93,&A3,&B3:IF !Ac%<>82 THEN step%=1:PROCset_action:!Ac%=82 ELSE !brushsel%=((!brushsel%+1) AND 15)
10200WHEN&84,&94,&A4,&B4:!pm%=0:!pc%=POINT(MX,MY)+TINT(MX,MY):PROCupdate
10210WHEN&85,&95,&A5,&B5
10220IF !helpstatus% THEN CALL helpon%:VDU5:CALL helptext%:F%=step%:CALL helpstep% ELSE CALL helpoff%
10230WHEN&86,&96,&A6,&B6
10240mgs=1-mgs:PROCupdate
10250WHEN&87,&97,&A7,&B7
10260IF testing AND keypress%=&A7 THEN
10270*FX229
10280CALL liftup%:PROCanimate:CALL liftdown%
10290ELSE
10300CALL liftup%
10310CALL undosave%
10320CALL liftdown%
10330ENDIF
10340WHEN&88,&98,&A8,&B8
10350IF (testing AND keypress%=&88) OR (NOT testing) THEN PROCset_action:!Ac%=20
10360IF testing AND keypress%=&98 THEN os%=1:!Ac%=20
10370IF testing AND keypress%=&A8 THEN CALL liftup%:A%=!presentmenu%:G%=MX:H%=MY:CALL drawmenu%:CALL liftdown%
10380ENDCASE
10390keyin%=(keypress%AND&F)-9
10400IF keyin%>4 THEN keyin%=-1
10410IF keyin%>-1 THEN
10420keylevel%=(((keypress%AND&F0)>>4)MOD4)
10430IF INKEY(-3) THEN function%(keyin%,keylevel%)=!Ac% ELSE !Ac%=function%(keyin%,keylevel%):PROCupdate
10440ENDIF
10450ENDPROC
10460
10470DEFPROCprocess_new_action
10480IF !Ac%=33 THEN PROCreset_action
10490VDU5:CALL helptext%:F%=1:CALL helpstep%:step%=1:PROCupdate
10500ENDPROC
10510
10520DEFPROCmenucalled
10530PROCset_action
10540MOUSE RECTANGLE 0,0,1279,1023
10550CALL liftup%
10560!mousebuts=0
10570IF ?(!actionsave)<255 THEN ?(!actionsave)=!Ac%
10580GCOL 128+(BACKCOL% AND 63) TINT (BACKCOL% AND 192)
10590CASE enter% OF
10600WHEN2:A%=7:CALL downtree%:REM sprites
10610WHEN5:A%=28:CALL downtree%:REM oscli
10620ENDCASE
10630IF enter%=4 AND !Ac%=12 THEN A%=9 ELSE A%=0
10640MOUSE MX,MY,MB
10650G%=MX:H%=MY:CALL menusystem%
10660IF !Ac%=33 THEN PROCreset_action
10670step%=1:PROCupdate:PROCBUTOFF(7)
10680IF !Ac%<>43 THEN
10690CALL liftdown%
10700VDU5:CALL helptext%
10710F%=step%:CALL helpstep%
10720ENDIF
10730IF ?(!actionsave)<255 THEN !oldaction%=?(!actionsave)
10740enter%=0
10750ENDPROC
10760
10770DEFPROCiniterror
10780IF MODE=15 THEN MODE 0
10790VDU 7
10800IF ERR=17 THEN PRINT"Escaped!":END
10810PRINTREPORT$;" at line ";ERL
10820IF NOT testing THEN END
10830*FX 15,0
10840A=GET
10850PROCstring_to_buffer("ED. "+STR$(ERL)+CHR$(13))
10860END
10870ENDPROC
10880
10890DEFPROCstring_to_buffer(tran$)
10900REPEAT
10910OSCLI"FX 138,0,"+STR$(ASC(LEFT$(tran$,1)))
10920tran$=MID$(tran$,2)
10930UNTIL tran$=""
10940ENDPROC
10950
10960DEFPROCtidy_at
10970PROCsetsoftkeys
10980PROCunsetvectors
10990ENDPROC
11000
11010DEFPROCunsetsoftkeys
11020FOR R=221 TO 228:OSCLI"FX "+STR$(R)+",2":NEXT
11030*FX 219,9
11040ENDPROC
11050
11060DEFPROCsetsoftkeys
11070FOR R=221 TO 228:OSCLI"FX "+STR$(R)+",1":NEXT
11080*FX 219,9
11090ENDPROC
11100
11110DEFPROCinit_at
11120IF testing THEN ON ERROR LOCAL PROCiniterror
11130RESTORE11110
11140PNglass=2:PNbrush=3:PNflood=4:PNpencil=5:PNspray=6
11150PNnormal=7:PNspriteop=8:PNcalculator=14:PNkeyboard=15:PNA=16:PNstopped=17
11160PNquestion=18:PNhand=19
11170com_gx1%=0:com_gy1%=0:com_gx2%=1278:com_gy2%=1020
11180PROCunsetsoftkeys:K=1024
11190DIM BLOW% 1*K,STORE% 160*K,cat% 1*K,brush% 8*K,brpatt% 8*K,cycle% 128,file_icons% 3*K,log_table% 256,log_scale% 1040,formnames% 1*K,fontlist% 1*K
11200DIM skel% 1764*10,sqr% &5201,sin% 360*4,tan% 90*4,numbers% &720,screen_str% 256,pattern_str% 256,brush_str% 256,sprite_str% 256,file_str% 256
11210DIM behind% 256,flags% 4,PO% &14DC,sprstr% 30,fontstr% 45,presentfont% 80,xget% 800,yget% 800,BUFF% 1*K,BUFFER% 35328,freetable% 256,abts% 16
11220DIM L(640),A%(641,1),B%(256,1),function%(4,3),formulas$(10)
11230OSCLI"LOAD "+FNdir+"POINTER "+STR$~(PO%)
11240IF os%=1 THEN PROCpoint(0,1)
11250s%=OPENIN(FNdir+"code*"):sz%=EXT#s%:CLOSE#s%
11260DIM code% sz%:OSCLI"LOAD "+FNdir+"code* "+STR$~(code%)
11270pl$="LOAD "+FNdir
11280OSCLIpl$+"!Brushes "+STR$~(brush%)
11290OSCLIpl$+"!Patterns "+STR$~(brpatt%)
11300*Com_Open <Atelier$Dir>.Sprites
11310PROCin(file_icons%,"40 8")
11320PROCin(numbers%,"12 8")
11330PROCin(BUFFER%,"384 92")
11340*Com_Close
11350PROCcodevars
11360IF os%=1 THEN PROCpoint(0,0)
11370$screen_str%="Screen"
11380$pattern_str%="Patterns"
11390$brush_str%="Brushes"
11400$sprite_str%="SpriteFile"
11410$sprstr%="new_sprite"
11420g_sprite$="new_sprite"
11430cycle%!0=16
11440FOR R=0 TO 3
11450READ o%
11460FOR R1=0 TO 3
11470!(cycle%+R*16+R1*4+4)=o%+R1
11480NEXT:NEXT
11490FOR R=0 TO 255:?(behind%+R)=255:NEXT
11500FOR R=1 TO 256:?(log_table%+R-1)=20+(R^2)/300:NEXT:FOR R=0 TO 5248:!(sqr%+R*4)=SQR(R*1024):NEXT
11510FOR R=0 TO 359:!(sin%+R*4)=SINRAD(R)*65536:NEXT
11520FOR R=0 TO 89:!(tan%+R*4)=TANRAD(R)*65536:NEXT
11530DATA 0,44,208,252
11540DATA 4,364,408,584,224,584,72,456,72
11550READ numlist
11560!bolpoint%=numlist
11570FOR R=0 TO !bolpoint%-1
11580READ X,Y
11590!(xget%+R*4)=X:!(yget%+R*4)=Y+4
11600NEXT
11610?(flags%)=255
11620?(flags%+1)=255
11630?(flags%+2)=255
11640?(flags%+3)=255
11650!sprstr=sprstr%
11660!brpatt=brpatt%
11670!flags=flags%
11680!cat=cat%
11690!behind=behind%
11700!brushshapes=brush%
11710!BUFF=BUFF%
11720!FLOB=PO%
11730!bolx=xget%
11740!boly=yget%
11750!fontstr=fontstr%
11760!presentfont=presentfont%
11770!STORE=STORE%
11780!freetable=freetable%
11790!put=BUFFER%
11800!cycle=cycle%
11810!screen_str=screen_str%
11820!pattern_str=pattern_str%
11830!brush_str=brush_str%
11840!sprite_str=sprite_str%
11850!file_icons=file_icons%
11860!log_table=log_table%
11870!log_scale=log_scale%
11880!numbers=numbers%
11890!sqr=sqr%
11900!sin=sin%
11910!tan=tan%
11920!file_str=file_str%
11930!formnames=formnames%
11940!skel=skel%
11950!fontlist=fontlist%
11960*IF "<Font$Prefix>"="" THEN *SET Font$Prefix $
11970LOCAL ERROR
11980ON ERROR LOCAL $fontlist%="Font Disk Not Present"+CHR$(0):GOTO 12010
11990A%=testing
12000CALL initialisation%
12010RESTORE ERROR
12020PROCcheckdumper
12030xrst%=640:yrst%=512
12040x0%=0:y0%=0:x1%=0:y1%=0
12050x2%=0:y2%=0:x3%=0:y3%=0
12060x4%=0:y4%=0:x5%=0:y5%=0
12070actionflags%=8:actionstep%=3
12080xs%=0:ys%=0:oldstep%=0
12090step%=1:vectors_set%=FALSE
12100wedge%=0:col%=0
12110psizex%=160:psizey%=160
12120xpsize%=-1:ypsize%=-1
12130mgs=FALSE:mcs=FALSE
12140mousegrid=32:select=TRUE
12150P%=formnames%
12160[OPT 0
12170EQUB 1
12180EQUB 10
12190EQUS "Defineable"
12200]
12210formula$="SIN(YR)*50"
12220dummy=FNbuild_formula(formula$,0)
12230botrad$="1"
12240atext$="Atelier (C) Simon Clay 1989"
12250PROCremovekeymod
12260funcprint$="BYE"
12270eval$=""
12280!oldaction%=60
12290ENDPROC
12300
12310
12320DEFPROCin(b%,s$)
12330OSCLI"Com_Sprites $ "+STR$(b%)+" "+s$
12340ENDPROC
12350
12360DEFPROCremovekeymod
12370LOCAL ERROR
12380ON ERROR LOCAL ENDPROC
12390*Unplug InternationalKeyboard
12400ENDPROC
12410
12420DEFPROCset_abort_traps
12430abts%!0=!&C
12440abts%!4=!&10
12450abts%!8=!&14
12460FOR PASS=0 TO 2 STEP 2
12470P%=&C
12480[OPT PASS
12490B abt1%       ;sets abort on instuction fetch error trap
12500B abt2%       ;sets abort on data transfer error trap
12510B abt3%       ;sets address exception error trap
12520]NEXT
12530ENDPROC
12540
12550DEFPROCunset_abort_traps
12560!&0C=abts%!0
12570!&10=abts%!4
12580!&14=abts%!8
12590ENDPROC
12600
12610DEFPROCcodevars
12620
12630variablelocate%=code%+4*1
12640com_put%=code%+4*2
12650locatesprite%=code%+4*3
12660help%=code%+4*4
12670helpon%=code%+4*5
12680helpoff%=code%+4*6
12690helpstep%=code%+4*7
12700helptext%=code%+4*8
12710liftup%=code%+4*9
12720liftdown%=code%+4*10
12730colour%=code%+4*11
12740undorestore%=code%+4*12
12750undosave%=code%+4*13
12760drawmenu%=code%+4*14
12770menusystem%=code%+4*15
12780mousecolour%=code%+4*16
12790screen_select%=code%+4*17
12800spriteinit%=code%+4*18
12810magnify%=code%+4*19
12820uptree%=code%+4*20
12830putbackground%=code%+4*21
12840com_get%=code%+4*22
12850putscreenrectangle%=code%+4*23
12860brusheor%=code%+4*24
12870brushdraw%=code%+4*25
12880brushundo%=code%+4*26
12890spritepix%=code%+4*27
12900brushget%=code%+4*28
12910shapeget%=code%+4*29
12920spriteputerror%=code%+4*30
12930getspritefromscreen%=code%+4*31
12940priorityin%=code%+4*32
12950undochar%=code%+4*33
12960undobox%=code%+4*34
12970scanscreen%=code%+4*35
12980colourbyte%=code%+4*36
12990calc_intensity%=code%+4*37
13000splodgeread%=code%+4*38
13010setbord%=code%+4*39
13020abt1%=code%+4*40
13030FINDMENU%=code%+4*41
13040SKIPWORD%=code%+4*42
13050drawword%=code%+4*43
13060abt2%=code%+4*44
13070abt3%=code%+4*45
13080COLaverage%=code%+4*46
13090COLgcol%=code%+4*47
13100COLmode15_13resize%=code%+4*48
13110show_thru%=code%+4*49
13120swap_pixels%=code%+4*50
13130COLsmooth_rectangle%=code%+4*51
13140compactedsave%=code%+4*52
13150screensave%=code%+4*53
13160bit_map_scan_A%=code%+4*54
13170bit_map_scan_B%=code%+4*55
13180bit_map_pattern%=code%+4*56
13190vertical_fill%=code%+4*57
13200copy_fill%=code%+4*58
13210calc_radius%=code%+4*59
13220framedraw%=code%+4*60
13230spin_bottle%=code%+4*61
13240translate_point%=code%+4*62
13250anti_aliased_squash%=code%+4*63
13260screenload%=code%+4*64
13270initialisation%=code%+4*65
13280formframedraw%=code%+4*66
13290form_translate%=code%+4*67
13300convertmode%=code%+4*68
13310bytecolour%=code%+4*69
13320downtree%=code%+4*70
13330checksprites%=code%+4*71
13340compactedload%=code%+4*72
13350savecheck%=code%+4*73
13360fontlistinit%=code%+4*74
13370duff_call%=code%+4*75
13380draw_error_box%=code%+4*76
13390com_update_info%=code%+4*77
13400
13410CALLvariablelocate%
13420
13430c=!code%
13440
13450Ac%=c+4*0
13460printmenu%=c+4*1
13470pc%=c+4*2
13480brushsel%=c+4*3
13490helpstatus%=c+4*4
13500presentmenu%=c+4*5
13510bolpoint%=c+4*6
13520topscreen%=c+4*7
13530blowcol%=c+4*8
13540YES%=c+4*9
13550putit%=c+4*10
13560sprsel%=c+4*11
13570startx%=c+4*12
13580starty%=c+4*13
13590compaction%=c+4*14
13600sprpos=c+4*15
13610freecol=c+4*16
13620OUT=c+4*17
13630limtop=c+4*18
13640limbot=c+4*19
13650start=c+4*20
13660hlength=c+4*21
13670RESULTX=c+4*22
13680RESULTY=c+4*23
13690lastmenu=c+4*24
13700r1store=c+4*25
13710r0store=c+4*26
13720left_handed=c+4*27
13730compact3x4=c+4*28
13740inlaysed=c+4*29
13750sprstr=c+4*30
13760brpatt=c+4*31
13770flags=c+4*32
13780cat=c+4*33
13790behind=c+4*34
13800brushshapes=c+4*35
13810BUFF=c+4*36
13820FLOB=c+4*37
13830bolx=c+4*38
13840boly=c+4*39
13850fontstr=c+4*40
13860presentfont=c+4*41
13870STORE=c+4*42
13880freetable=c+4*43
13890put=c+4*44
13900cycle=c+4*45
13910rect_brush=c+4*46
13920screen_str=c+4*47
13930pattern_str=c+4*48
13940brush_str=c+4*49
13950sprite_str=c+4*50
13960help_text_data=c+4*51
13970file_icons=c+4*52
13980bit_map=c+4*53
13990fillstylepic=c+4*54
14000log_table=c+4*55
14010log_scale=c+4*56
14020
14030numbers=c+4*58
14040magnify_xpos=c+4*59
14050magnify_ypos=c+4*60
14060putpos=c+4*61
14070magputpos=c+4*62
14080sizex=c+4*63
14090sizey=c+4*64
14100sprsize=c+4*65
14110spritex=c+4*66
14120spritey=c+4*67
14130gtspritex=c+4*68
14140gtspritey=c+4*69
14150diskfontlistposition=c+4*70
14160catpos=c+4*71
14170fontsel=c+4*72
14180pattsel=c+4*73
14190treepos=c+4*74
14200matrixput=c+4*75
14210barval_red=c+4*76
14220barval_grn=c+4*77
14230barval_blu=c+4*78
14240scaleval_left=c+4*79
14250scaleval_right=c+4*80
14260cycleplace=c+4*81
14270cycledirection=c+4*82
14280cyclemode=c+4*83
14290pm%=c+4*84
14300mixval_red=c+4*85
14310mixval_grn=c+4*86
14320mixval_blu=c+4*87
14330mousex=c+4*88
14340mousey=c+4*89
14350mousebuts=c+4*90
14360magnification=c+4*91
14370magnify_xget=c+4*92
14380magnify_yget=c+4*93
14390magnify_status=c+4*94
14400HANG=c+4*95
14410rect_brush_mode=c+4*96
14420vacant=c+4*97
14430com_x1=c+4*98
14440com_y1=c+4*99
14450com_x2=c+4*100
14460com_y2=c+4*101
14470sprint_xsize=c+4*102
14480sprint_ysize=c+4*103
14490spritemask=c+4*104
14500fill_style=c+4*105
14510fill_prop=c+4*106
14520fill_logr=c+4*107
14530fill_dith=c+4*108
14540step_codes=c+4*109
14550border=c+4*110
14560sqr=c+4*111
14570actionsave=c+4*112
14580bottle=c+4*113
14590bot_tilt=c+4*114
14600bot_lean=c+4*115
14610bot_xout=c+4*116
14620bot_yout=c+4*117
14630line_selected=c+4*118
14640bot_finish=c+4*119
14650bot_xscale=c+4*120
14660bot_yscale=c+4*121
14670hangdelay=c+4*122
14680sin=c+4*123
14690tan=c+4*124
14700file_str=c+4*125
14710form=c+4*126
14720tilt=c+4*127
14730lean=c+4*128
14740rotation=c+4*129
14750xscale=c+4*130
14760yscale=c+4*131
14770hscale=c+4*132
14780form_list_pos=c+4*133
14790formnames=c+4*134
14800formula=c+4*135
14810skel=c+4*136
14820shade_range=c+4*137
14830min_shade=c+4*138
14840fontlist=c+4*139
14850oldaction%=c+4*140
14860
14870
14880BORDSIZE=28
14890WEDGESIZE=16
14900textcol%=0
14910BACKCOL%=202
14920TITLECOL%=0
14930BORDERCOL%=74
14940BORD1%=207
14950BORD2%=15
14960BORD3%=138
14970BORD4%=197
14980DIRECTORYCOL%=224
14990
15000ENDPROC
15010
15020DEFPROCscreen_select
15030
15040IF (!Ac%=1 OR !Ac%=2) AND step%=3 THEN
15050REPEAT
15060PROCmouse_handle
15070D%=!Ac%:E%=step%:F%=MB:G%=MX:H%=MY:CALL screen_select%
15080UNTIL MB=0
15090IF !Ac%=1 THEN x1%=MX:y1%=MY
15100ELSE
15110D%=!Ac%:E%=step%:F%=MB:G%=MX:H%=MY:CALL screen_select%
15120ENDIF
15130IF !YES% THEN
15140CASE step% OF
15150WHEN1:x1%=MX:y1%=MY
15160WHEN2:x2%=MX:y2%=MY
15170WHEN3:x3%=MX:y3%=MY
15180WHEN4:x4%=MX:y4%=MY
15190WHEN5:x5%=MX:y5%=MY
15200ENDCASE
15210ENDIF
15220IF !YES% THEN ENDPROC
15230
15240
15250CASE (!Ac%) OF
15260
15270REM Magnify
15280WHEN12:CASE step% OF
15290WHEN2:enter%=4
15300!magnify_xpos=MX DIV 2
15310!magnify_ypos=255-(MY DIV 4)
15320ENDCASE
15330
15340REM Fill
15350WHEN13:CASE step% OF
15360WHEN2:PROCpoint(0,0)
15370col%=POINT(MX,MY)+TINT(MX,MY)
15380GCOL 128+POINT(MX,MY) TINT TINT(MX,MY)
15390CASE !fill_style OF
15400WHEN0:
15410IF !pm%>0 THEN CALL bit_map_scan_A%
15420IF !pm%>0 OR col%<>!pc% THEN PLOT&85,MX,MY
15430IF !pm%>0 THEN CALL bit_map_pattern%
15440WHEN1,2,3:
15450CALL bit_map_scan_A%
15460PLOT&85,MX,MY
15470CASE !fill_style OF
15480WHEN1,2:CALL vertical_fill%
15490WHEN3:A%=MX DIV2:B%=255-MY DIV4
15500CALL vertical_fill%
15510ENDCASE
15520ENDCASE
15530PROCupdate
15540ENDCASE
15550
15560REM Sprite Handling
15570WHEN14,16
15580GCOL 0,(textcol% AND 63) TINT (textcol% AND 192)
15590GCOL 0,128+(BACKCOL% AND 63) TINT (BACKCOL% AND 192)
15600SYS &2E,8 TO ,,,r3
15610SYS &2E,13,,sprstr%,30,!sprsel% TO ,,,leng
15620?(sprstr%+leng+1)=13
15630errorcheat=!Ac%
15640!putit%=1:PROCpoint(0,PNkeyboard)
15650PROCreset_action:CALL uptree%
15660A%=-128:B%=!starty%+56:E%=-1:CALL help%
15670A%=-128:B%=!starty%-!sizey-96:E%=-1:CALL help%
15680XP=!startx%+6:YP=!starty%-48:MOVE XP,YP:VDU 5:PRINT" ";
15690step%=1:PRINT$sprstr%:!starty%=!starty%-32
15700old$=$sprstr%:old$=LEFT$(old$,LEN(old$)-1)
15710go=FNinstring(33,126,"",out$,12)
15720CALL liftup%:CALL putbackground%
15730IF go THEN
15740CASE errorcheat OF
15750WHEN16:OSCLI "SCOPY "+old$+" "+out$:!sprsel%=r3+1:!sprpos=r3-5
15760WHEN14:OSCLI "SRENAME "+old$+" "+out$
15770ENDCASE
15780ENDIF
15790PROCreset_entry
15800
15810REM Save Compressed Screen
15820WHEN15:IF FNtext_entry(33,$screen_str%,255) THEN
15830PROCpoint(0,1):PROCcompressedsave(out$):$screen_str%=out$
15840ENDIF
15850PROCreset_entry
15860
15870REM Save Brushes
15880WHEN17:IF FNtext_entry(33,$brush_str%,255) THEN
15890PROCpoint(0,1):OSCLI "SAVE "+out$+" "+STR$~(brush%)+" +2000"
15900OSCLI("SETTYPE "+out$+" &D7E"):$brush_str%=out$
15910ENDIF
15920PROCreset_entry
15930
15940REM Name Sprite
15950WHEN18:IF FNtext_entry(33,g_sprite$,12) THEN g_sprite$=out$
15960!Ac%=38:PROCreset_entry
15970
15980REM Save Patterns
15990WHEN19:IF FNtext_entry(33,$pattern_str%,255) THEN
16000PROCpoint(0,1):OSCLI "SAVE "+out$+" "+STR$~(brpatt%)+" +2000"
16010OSCLI("SETTYPE "+out$+" &D3A"):$pattern_str%=out$
16020ENDIF
16030PROCreset_entry
16040
16050REM function 20 -- FINISH -- !
16060
16070REM Set Border Colour
16080WHEN21:PROCreset_action
16090CALL setbord%
16100
16110REM Ellipse
16120WHEN22:CASE step% OF
16130WHEN1:x1%=MX:y1%=MY
16140WHEN2:rd%=SQR((MX-x1%)^2+(MY-y1%)^2)
16150CIRCLE x1%,y1%,rd%
16160WAIT:WAIT:CIRCLE x1%,y1%,rd%
16170WHEN3:MOVE x1%,y1%:MOVE x1%+rd%,y1%:PLOT &C5,MX,MY
16180WAIT:WAIT:MOVE x1%,y1%:MOVE x1%+rd%,y1%:PLOT &C5,MX,MY
16190WHEN4:MOVE x1%,y1%:MOVE x1%+rd%,y1%:PLOT &C5,MX,MY
16200ENDCASE
16210
16220REM EllipseFill
16230WHEN23:CASE step% OF
16240WHEN1:x1%=MX:y1%=MY
16250WHEN2:rd%=SQR((MX-x1%)^2+(MY-y1%)^2)
16260CIRCLE x1%,y1%,rd%
16270WAIT:WAIT:CIRCLE x1%,y1%,rd%
16280WHEN3:MOVE x1%,y1%:MOVE x1%+rd%,y1%:PLOT &C5,MX,MY
16290WAIT:WAIT:MOVE x1%,y1%:MOVE x1%+rd%,y1%:PLOT &C5,MX,MY
16300WHEN4:MOVE x1%,y1%:MOVE x1%+rd%,y1%:PLOT &CD,MX,MY
16310ENDCASE
16320
16330REM fastcopy
16340WHEN24:CASE step% OF
16350WHEN1,2:PROCgetrectangle
16360WHEN3:MX=(MX DIV 2)*2:MY=(MY DIV 4)*4:PROCcopysort
16370RECTANGLE MX,MY,xs%-2,-(ys%+4)
16380WAIT:WAIT:RECTANGLE MX,MY,xs%-2,-(ys%+4)
16390WHEN4:
16400A%=x1%DIV2
16410B%=255-(y1%DIV4)
16420C%=xs%DIV2
16430D%=-ys%DIV4
16440E%=MX DIV2
16450F%=255-(MY DIV4)+(ys%+4)DIV4
16460G%=!pm%
16470CALL putscreenrectangle%
16480ENDCASE
16490
16500REM smearcopy
16510WHEN25:CASE step% OF
16520WHEN1,2:PROCgetrectangle
16530WHEN3:px1%=MX:py1%=MY
16540WHEN4:LINE px1%,py1%,MX,MY
16550WAIT:WAIT:LINE px1%,py1%,MX,MY
16560px2%=MX:py2%=MY
16570WHEN5:LINE px1%,py1%,px2%,py2%:DRAW MX,MY:DRAW px1%,py1%
16580WAIT:WAIT:LINE px1%,py1%,px2%,py2%:DRAW MX,MY:DRAW px1%,py1%
16590px3%=MX:py3%=MY
16600WHEN6:LINE px1%,py1%,px2%,py2%:DRAW px3%,py3%:DRAW MX,MY:DRAW px1%,py1%
16610WAIT:WAIT:LINE px1%,py1%,px2%,py2%:DRAW px3%,py3%:DRAW MX,MY:DRAW px1%,py1%
16620px4%=MX:py4%=MY
16630WHEN7:
16640PROCsmearscreen(x1%,y1%,xs%,ys%)
16650ENDCASE
16660
16670REM Parrallogram
16680WHEN26:CASE step% OF
16690WHEN1:px1%=MX:py1%=MY
16700WHEN2:LINE px1%,py1%,MX,MY
16710WAIT:WAIT:LINE px1%,py1%,MX,MY
16720px2%=MX:py2%=MY
16730WHEN3:LINE px1%,py1%,px2%,py2%:DRAW MX,MY:DRAW px1%-(px2%-MX),py1%-(py2%-MY):DRAW px1%,py1%
16740WAIT:WAIT:LINE px1%,py1%,px2%,py2%:DRAW MX,MY:DRAW px1%-(px2%-MX),py1%-(py2%-MY):DRAW px1%,py1%
16750WHEN4:LINE px1%,py1%,px2%,py2%:DRAW MX,MY:DRAW px1%-(px2%-MX),py1%-(py2%-MY):DRAW px1%,py1%
16760ENDCASE
16770
16780REM Parralogram fill
16790WHEN27:CASE step% OF
16800WHEN1:px1%=MX:py1%=MY
16810WHEN2:LINE px1%,py1%,MX,MY
16820WAIT:WAIT:LINE px1%,py1%,MX,MY
16830px2%=MX:py2%=MY
16840WHEN3:LINE px1%,py1%,px2%,py2%:DRAW MX,MY:DRAW px1%-(px2%-MX),py1%-(py2%-MY):DRAW px1%,py1%
16850WAIT:WAIT:LINE px1%,py1%,px2%,py2%:DRAW MX,MY:DRAW px1%-(px2%-MX),py1%-(py2%-MY):DRAW px1%,py1%
16860WHEN4:MOVE px1%,py1%:MOVE px2%,py2%:PLOT &75,MX,MY
16870ENDCASE
16880
16890REM Cls
16900WHEN28:
16910PROCerrorhandle(2,"Do you really wish to clear the screen to the current colour (NOTE You can UNDO afterwards)","CONFIRM",selected)
16920IF selected=1 THEN
16930CALL liftup%
16940CALL colour%:RECTANGLE FILL 0,0,1279,1023
16950CALL liftdown%
16960ENDIF
16970PROCreset_action
16980PROCupdate
16990
17000REM Filing (Believe it or not!)
17010WHEN29,30,31,32
17020PROCpoint(0,1)
17030errorcheat=!Ac%:filename$=$file_str%
17040PROCreset_action:CALL uptree%
17050CASE errorcheat OF
17060WHEN29:OSCLI "SLOAD "+filename$:$sprite_str%=filename$:!pm%=2
17070WHEN30:OSCLI "SMERGE "+filename$:$sprite_str%=filename$:!pm%=2
17080WHEN31
17090CALL liftup%:CALL undosave%
17100$screen_str%=filename$
17110CASE os% OF
17120WHEN1:B%=file_str%:CALL screenload%
17130OTHERWISE:OSCLI "SCREENLOAD "+$file_str%
17140ENDCASE
17150IF MODE<>15 THEN
17160SYS "OS_RemoveCursors"
17170CASE INKEY$(0) OF
17180WHEN"D","d"
17190FOR R=0 TO 15:COLOUR R,R<<4,R<<4,R<<4:NEXT
17200WHEN"I","i"
17210FOR R=0 TO 15:COLOUR 15-R,R<<4,R<<4,R<<4:NEXT
17220ENDCASE
17230LOCAL ERROR:err%=FALSE
17240ON ERROR LOCAL err%=TRUE:GOTO 17270
17250CALL convertmode%
17260$screen_str%=filename$
17270MODE15
17280RESTORE ERROR
17290cat%!0=148
17300cat%!4=-1
17310SYS "OS_ReadVduVariables",cat%,cat%
17320!topscreen%=!cat%
17330SYS "OS_RemoveCursors"
17340CALL undorestore%
17350IF err% THEN ERROR ERR,REPORT$
17360ENDIF
17370CALL liftdown%
17380WHEN32:PROCformula_load(filename$)
17390ENDCASE
17400PROCupdate
17410
17420REM Function 33 = dummy
17430
17440REM Eval Expression
17450WHEN34:!putit%=1:PROCpoint(0,PNkeyboard)
17460PROCreset_action:CALL uptree%
17470A%=-128:B%=!starty%+56:E%=-1:CALL help%
17480A%=-128:B%=!starty%-!sizey-96:E%=-1:CALL help%
17490step%=1
17500REPEAT
17510dummy=FNinstring(32,126,eval$,out$,255):IF dummy THEN
17520!starty%-=32:PROCBUTOFF(7):eval$=out$
17530PROCeval_error_cheat:dummy=FNinstring(32,126,t$,t$,1)
17540ENDIF
17550!starty%+=32:PROCBUTOFF(7)
17560UNTIL NOT dummy
17570CALL liftup%:CALL putbackground%
17580PROCreset_entry
17590
17600REM Pattern & Brush get
17610WHEN35,36:CASE step% OF
17620WHEN1:RECTANGLE MX-32,MY-32,62,60
17630WAIT:WAIT:RECTANGLE MX-32,MY-32,62,60
17640WHEN2:A%=(MX DIV 2)-16:B%=255-((MY DIV 4)+7)
17650CASE !Ac% OF
17660WHEN35:CALL brushget%
17670WHEN36:CALL shapeget%
17680ENDCASE
17690ENDCASE
17700
17710REM Sprite put
17720WHEN37:IF FNput_check THEN
17730CASE step% OF
17740WHEN1:MX=(MX DIV 2)*2:MY=(MY DIV 4)*4:PROCspritesort
17750RECTANGLE MX,MY,xs%-2,-(ys%+4)
17760WAIT:WAIT:RECTANGLE MX,MY,xs%-2,-(ys%+4)
17770WHEN2:PROCspritesort
17780A%=x1%DIV2
17790B%=255-(y1%DIV4)
17800C%=xs%DIV2
17810D%=-ys%DIV4
17820E%=MX DIV2
17830F%=255-(MY DIV4)+(ys%+4)DIV4
17840G%=2
17850CALL putscreenrectangle%
17860ENDCASE
17870ENDIF
17880
17890REM Get Sprite
17900WHEN38:CASE step% OF
17910WHEN1,2:PROCgetrectangle
17920WHEN3:PROCsortcord
17930A%=x1%:B%=y1%:C%=x2%:D%=y2%
17940PROCpoint(0,0)
17950$sprstr%=g_sprite$
17960CALL getspritefromscreen%
17970PROCupdate
17980ENDCASE
17990
18000REM Save Sprites
18010WHEN39:IF FNtext_entry(33,$sprite_str%,255) THEN
18020PROCpoint(0,1):OSCLI "SSAVE "+out$:$sprite_str%=out$
18030ENDIF
18040PROCreset_entry
18050
18060REM Sprite smear
18070WHEN40:IF FNput_check THEN
18080CASE step% OF
18090WHEN1:MX=(MX DIV 2)*2:MY=(MY DIV 4)*4:PROCspritesort
18100RECTANGLE MX,MY,xs%-2,-(ys%+4)
18110WAIT:WAIT:RECTANGLE MX,MY,xs%-2,-(ys%+4)
18120WHEN2:PROCspritesort
18130OSCLI "SCHOOSE "+$sprstr%
18140GCOL 8,0
18150REPEAT
18160PROCmouse_handle
18170PLOT &ED,MX,MY
18180UNTIL MB=0
18190ENDCASE
18200ENDIF
18210
18220REM Printer Dumps
18230WHEN41
18240PROCreset_action
18250*FX 229
18260CALL liftup%
18270A$="SCREENDUMP 0 "+STR$~(!line_selected-1)
18280OSCLI A$
18290CALL liftdown%
18300PROCupdate
18310
18320REM Delete Sprite
18330WHEN42
18340IF FNsprites THEN
18350SYS &2E,13,,sprstr%,30,!sprsel% TO ,,,leng
18360?(sprstr%+leng+1)=13
18370PROCerrorhandle(2,"Do you really wish to delete the sprite "+$sprstr%,"Confirm",selected)
18380IF selected=1 THEN
18390OSCLI"SDELETE "+$sprstr%
18400IF !sprsel%>FNsprites THEN !sprsel%=FNsprites
18410IF !sprsel%<1 THEN !sprsel%=1
18420ENDIF
18430ELSE
18440VDU 7
18450ENDIF
18460PROCreset_action:PROCupdate
18470
18480REM oscli
18490WHEN43:
18500PROCoscliaction
18510PROCcheckdumper
18520
18530REM Anti aliased text to screen
18540WHEN44:CASE step% OF
18550WHEN1:PROCgetrectangle
18560WHEN2:PROCgetrectangle
18570WHEN3:PROCsortcord
18580tint%=((!pc% AND 192) >> 2)
18590red%=tint%+((!pc% AND 3) << 6)
18600grn%=tint%+((!pc% AND 12) << 4)
18610blu%=tint%+((!pc% AND 48) << 2)
18620tint2%=TINT(MX,MY) >> 2
18630back%=POINT(MX,MY)
18640red2%=tint2%+((back% AND 3) << 6)
18650grn2%=tint2%+((back% AND 12) << 4)
18660blu2%=tint2%+((back% AND 48) << 2)
18670FONT$=$presentfont%+CHR$(13)
18680VDU 23,25,&FF,15,red2%,grn2%,blu2%,red%,grn%,blu%
18690SYS "Font_FindFont",,FONT$,320,320,0,0 TO roman%  :REM ;scrapsizes
18700SYS "Font_StringBBox",,atext$ TO ,xmin%,ymin%,xmax%,ymax%
18710xsize%=ABS(xmax%-xmin%):ysize%=ABS(ymax%-ymin%)
18720SYS "Font_ReadScaleFactor" TO ,xscale%,yscale%
18730psizex%=(x2%-x1%)*320/(xsize%/xscale%)
18740psizey%=(y1%-y2%)*320/(ysize%/yscale%)
18750xo%=(xmin%/xscale%)*psizex%/320
18760yo%=(ymin%/yscale%)*psizey%/320
18770SYS "Font_FindFont",,FONT$,psizex%,psizey%,0,0 TO roman%
18780SYS "Font_Paint",,atext$,%10000,x1%-xo%,y2%-yo%
18790COLOUR 63 TINT 192
18800ENDCASE
18810
18820REM Anti box text to screen
18830WHEN45:CASE step% OF
18840WHEN1:
18850FONT$=$presentfont%+CHR$(13)
18860SYS "Font_FindFont",,FONT$,320,320,0,0 TO roman%   :REM ;scrapsizes
18870SYS "Font_StringBBox",,atext$ TO ,xmin%,ymin%,xmax%,ymax%
18880xsize%=ABS(xmax%-xmin%):ysize%=ABS(ymax%-ymin%)
18890SYS "Font_ReadScaleFactor" TO ,xscale%,yscale%
18900xs%=(xsize%/xscale%)*psizex%/320
18910ys%=(ysize%/yscale%)*psizey%/320
18920xo%=(xmin%/xscale%)*psizex%/320
18930yo%=(ymin%/yscale%)*psizey%/320
18940RECTANGLE MX+xo%,MY+yo%,xs%,ys%
18950WAIT:WAIT
18960RECTANGLE MX+xo%,MY+yo%,xs%,ys%
18970WHEN2:
18980tint%=((!pc% AND 192) >> 2)
18990red%=tint%+((!pc% AND 3) << 6)
19000grn%=tint%+((!pc% AND 12) << 4)
19010blu%=tint%+((!pc% AND 48) << 2)
19020tint2%=TINT(MX,MY) >> 2
19030back%=POINT(MX,MY)
19040red2%=tint2%+((back% AND 3) << 6)
19050grn2%=tint2%+((back% AND 12) << 4)
19060blu2%=tint2%+((back% AND 48) << 2)
19070VDU 23,25,&FF,15,red2%,grn2%,blu2%,red%,grn%,blu%
19080SYS "Font_FindFont",,FONT$,psizex%,psizey%,0,0 TO roman%
19090SYS "Font_Paint",,atext$,%10000,MX,MY
19100COLOUR 63 TINT 192
19110ENDCASE
19120
19130REM demo function
19140WHEN46
19150PROCreset_action
19160PROCerrorhandle(1,"This is a demonstration version of ATELIER so this function has been disabled,|CALL 0392 437756 to order a proper version of ATELIER, the ultimate art package.","||Continue",selected)
19170
19180REM Bottle draw
19190WHEN47:CASE step% OF
19200WHEN1,2:PROCgetrectangle
19210WHEN3
19220VDU 29,MX;MY;
19230F%=-1:CALL framedraw%
19240WAIT:WAIT
19250VDU 29,MX;MY;
19260F%=-1:CALL framedraw%
19270CALL spin_bottle%
19280WHEN4:PROCpoint(0,0)
19290PROCcopysort
19300steps%=ABS(ys%)/4-1
19310PT%=(!bolpoint%)-1
19320TL=0:FOR R%=1 TO PT%
19330L(R%)=SQR(((FNboltx(R%)-FNboltx(R%-1))^2+(FNbolty(R%)-FNbolty(R%-1))^2))
19340TL=TL+L(R%)
19350NEXT R%
19360TLP=TL/(steps%-1)
19370TLP=(TL+TLP-1)/(steps%)
19380FOR YP%=0 TO steps%
19390FL=YP%*TLP:GP%=0:FLB=0
19400IF FL<TL THEN
19410REPEAT
19420FLB=FLB+L(GP%)
19430GP%=GP%+1
19440UNTIL FLB>FL
19450ELSE
19460GP%=PT%-1
19470ENDIF
19480GP%=GP%-1
19490IF GP%>PT% THEN GP%=PT%-1
19500IF GP%<1 THEN GP%=1
19510LL=FLB-L(GP%)
19520PL=FL-LL
19530PM=PL/L(GP%)
19540B%(YP%,0)=(((FNboltx(GP%))-(FNboltx(GP%-1)))*PM)+(FNboltx(GP%-1))
19550B%(YP%,1)=((FNbolty(GP%)-FNbolty(GP%-1))*PM)+FNbolty(GP%-1)
19560NEXT YP%
19570PT%=ABS(y1%-y2%)
19580ST%=ABS(xs%)
19590STCM=360/ST%
19600SB%=0
19610T1%=0:T2%=steps%-1:TS%=1:y1%+=1
19620IF !bot_lean<=90 THEN T1%=steps%-1:T2%=0:TS%=-1:y1%-=2
19630IF !bot_lean>270 THEN T1%=steps%-1:T2%=0:TS%=-1:y1%-=2
19640FOR BT%=T1% TO T2% STEP TS%
19650wedge%=0
19660X%=B%(BT%,0):Y%=B%(BT%,1)
19670SC%=0
19680CT%=-1
19690IF !bot_lean<=180 THEN
19700deg1=-STCM:deg2=360:degs=STCM
19710ELSE
19720deg1=359+STCM:deg2=0:degs=-STCM
19730ENDIF
19740FOR Cd=deg1 TO deg2 STEP degs*2
19750CT%=CT%+1
19760VDU 26
19770CASE !pm% OF
19780WHEN0,1:plt%=FNgcol(x2%-(Cd+1)/STCM+2,y1%-BT%*4+4)
19790WHEN2:plt%=FNgcol(x2%-Cd/STCM-1,y1%-BT%*4)
19800ENDCASE
19810angle=Cd
19820A%=632-((632-X%)*EVAL(botrad$)):B%=Y%:C%=Cd:CALL translate_point%
19830XD%=!bot_xout:YD%=!bot_yout
19840VDU 29,MX;MY;     :REM origin
19850IF SB%>0 AND SC%>0 AND plt% THEN
19860MOVE LXD2%,LYD2%
19870MOVE LXD%,LYD%:PLOT &55,XD%,YD%
19880PLOT&55,A%(CT%,0),A%(CT%,1)
19890ENDIF
19900SC%=1
19910LXD%=A%(CT%,0):LYD%=A%(CT%,1)
19920LXD2%=XD%:LYD2%=YD%
19930A%(CT%,0)=XD%:A%(CT%,1)=YD%
19940NEXT Cd
19950REM UNTIL C%*STCM>360
19960SB%=1
19970NEXT BT%
19980PROCupdate
19990VDU 26
20000ENDCASE
20010
20020REM Set Mouse Grid
20030WHEN48:IF FNtext_entry(33,STR$(mousegrid),15)
20040mousegrid=EVAL(out$)
20050IF mousegrid<1 THEN mousegrid=1
20060mgs=1
20070ENDIF
20080PROCreset_entry
20090
20100REM Formula Entry
20110WHEN49:oldform$=formula$:test=FALSE
20120!putit%=1:PROCpoint(0,PNkeyboard)
20130PROCreset_action:CALL uptree%
20140A%=-128:B%=!starty%+56:E%=-1:CALL help%
20150A%=-128:B%=!starty%-!sizey-96:E%=-1:CALL help%
20160REPEAT
20170go=FNinstring(32,126,formula$,formula$,255)
20180P%=formnames%
20190num%=?P%:P%+=1
20200F=0
20210test$=""
20220num2%=?P%:P%+=1
20230FOR R=1 TO num2%
20240test$=test$+CHR$(?P%)
20250P%+=1:NEXT
20260IF formula$=test$ THEN formula$=formulas$(F-1):GOTO 20170
20270F+=1
20280IF F<num% THEN GOTO 20210
20290IF go THEN PROCpoint(0,0):test=FNbuild_formula(formula$,0)
20300UNTIL test OR NOT go
20310IF NOT go THEN formula$=oldform$
20320!formula=0
20330CALL liftup%:CALL putbackground%
20340PROCreset_entry
20350
20360WHEN50,54,53:CASE step% OF
20370REM FORMULA COPY
20380WHEN1,2:PROCgetrectangle
20390WHEN3:
20400VDU 29,MX;MY;
20410F%=-1:CALL formframedraw%
20420WAIT:WAIT
20430VDU 29,MX;MY;
20440F%=-1:CALL formframedraw%
20450WHEN4:PROCcopysort
20460xsteps=720/(xs%/2):ysteps=720/(ys%/4)
20470IF !Ac%=53 THEN
20480PROCpoint(0,PNcalculator)
20490max=-65536
20500min=65536
20510ofm=0
20520FOR XD=-360 TO 360 STEP xsteps
20530wedge%=0
20540FOR YD=360 TO -360 STEP ysteps
20550XR=RAD(XD)
20560YR=RAD(YD)
20570IF !formula=0 THEN FM=EVAL(formula$) ELSE FM=EVAL(formulas$(!formula-1))
20580FD=ofm-FM
20590IF YD<360 THEN IF FD>max THEN max=FD
20600IF YD<360 THEN IF FD<min THEN min=FD
20610ofm=FM
20620NEXT YD,XD
20630ENDIF
20640YF%=0
20650PROCpoint(0,0)
20660FOR YD=360 TO -360 STEP ysteps
20670wedge%=0
20680FOR XD=-360 TO 360 STEP xsteps
20690XR=RAD(XD)
20700YR=RAD(YD)
20710IF !formula=0 THEN FM=EVAL(formula$) ELSE FM=EVAL(formulas$(!formula-1))
20720A%=XD:B%=YD:C%=FM:CALL form_translate%
20730npx%=!bot_xout
20740npy%=!bot_yout
20750PX%=((360+XD)/xsteps):PY%=((360+YD)/-ysteps)
20760VDU 4
20770VDU 26
20780xp%=x1%+PX%*2-2:yp%=y2%+PY%*4+3
20790plt%=FNgcol(xp%,yp%)
20800IF XD>-360 AND YD<360 AND plt% THEN
20810IF !Ac%=53 THEN
20820num%=4+(((L(PX%)-FM)-min)/((max-min)/11))
20830IF num%<4 THEN num%=4:IF testing THEN VDU 7
20840IF num%>15 THEN num%=15:IF testing THEN VDU 7
20850A%=col%:B%=15-num%:CALL calc_intensity%
20860ENDIF
20870VDU 29,MX;MY;
20880MOVE nlpx%,nlpy%
20890MOVE A%((ABS(PX%))-1,0),A%((ABS(PX%))-1,1)
20900PLOT &55,A%(ABS(PX%),0),A%(ABS(PX%),1)
20910PLOT &55,npx%,npy%
20920IF !Ac%=54 THEN
20930CALL colour%
20940MOVE nlpx%,nlpy%
20950DRAW A%((ABS(PX%))-1,0),A%((ABS(PX%))-1,1)
20960DRAW npx%,npy%
20970DRAW A%(ABS(PX%),0),A%(ABS(PX%),1)
20980DRAW nlpx%,nlpy%
20990ENDIF
21000ENDIF
21010L(PX%)=FM
21020nlpx%=A%(ABS(PX%),0)
21030nlpy%=A%(ABS(PX%),1)
21040A%(ABS(PX%),0)=npx%
21050A%(ABS(PX%),1)=npy%
21060ENDIF
21070NEXT XD
21080YF%=1
21090NEXT YD
21100PROCupdate
21110VDU 26
21120ENDCASE
21130
21140REM Rotate copy
21150WHEN51:CASE step% OF
21160WHEN1,2:PROCgetrectangle
21170WHEN3:x3%=MX:y3%=MY
21180WHEN4:PROCshape
21190WAIT:WAIT:PROCshape
21200WHEN5:PROCsmearscreen(x1%,y1%,xs%,ys%)
21210ENDCASE
21220
21230REM AA text input
21240WHEN52:IF FNtext_entry(32,atext$,255) THEN atext$=out$
21250PROCreset_entry
21260
21270REM Save Compacted Screen
21280WHEN55:IF FNtext_entry(33,$screen_str%,255) THEN
21290PROCpoint(0,1):PROCcompactedsave(0,out$):$screen_str%=out$
21300ENDIF
21310PROCreset_entry
21320
21330REM Set Print Key Command
21340WHEN56:IF FNtext_entry(32,funcprint$,255) THEN funcprint$=out$
21350PROCreset_entry
21360
21370REM undo box
21380WHEN57:CASE step% OF
21390WHEN1,2:PROCgetrectangle
21400WHEN3:PROCsortcord
21410A%=x1%:B%=y1%:C%=xs%:D%=-ys%
21420CALL undobox%
21430ENDIF
21440step%=1:PROCreset_action:PROCupdate
21450ENDCASE
21460
21470REM Save System Screen
21480WHEN58:IF FNtext_entry(33,$screen_str%,255) THEN
21490PROCpoint(0,1):OSCLI "SCREENSAVE "+out$:$screen_str%=out$
21500ENDIF
21510PROCreset_entry
21520
21530REM Title Screen
21540WHEN59:CASE step% OF
21550WHEN1:IF FNsprites=0 THEN PROCtitlesprite
21560WHEN2:PROCreset_action
21570ENDCASE
21580
21590REM Brushes
21600WHEN60,61,62,63,64,65
21610A%=!Ac%-60
21620CASE !rect_brush_mode OF
21630WHEN0:CASE step% OF
21640WHEN1:A%=(MX DIV 2)-16:B%=255-((MY DIV 4)+8)
21650CALL brusheor%
21660WAIT:WAIT:CALL brusheor%
21670WHEN2:REPEAT
21680PROCmouse_handle
21690B%=MX-32:C%=MY+32:CALL brushdraw%
21700UNTIL MB=0
21710ENDCASE
21720WHEN1:CASE step% OF
21730WHEN1,2:PROCgetrectangle
21740WHEN3:PROCpoint(0,0)
21750PROCsortcord
21760B%=x1%:C%=y1%:D%=xs%DIV2:E%=-ys%DIV4
21770CALL brushdraw%
21780PROCupdate
21790ENDCASE
21800WHEN2:CASE step% OF
21810WHEN1:x0%=640:y0%=512
21820CIRCLE x0%,y0%,SQR((MX-x0%)^2+(MY-y0%)^2)
21830WAIT:WAIT
21840CIRCLE x0%,y0%,SQR((MX-x0%)^2+(MY-y0%)^2)
21850R%=SQR((MX-x0%)^2+(MY-y0%)^2)
21860WHEN3:REPEAT
21870PROCmouse_handle
21880AN=RAD(RND(360)):RO%=TAN(RAD(RND(80)))*(R%/10)
21890B%=MX+SIN(AN)*RO%
21900C%=MY+COS(AN)*RO%
21910CALL brushdraw%
21920UNTIL MB=0
21930ENDCASE
21940ENDCASE
21950
21960REM Anti aliased squash
21970WHEN67:CASE step% OF
21980WHEN1,2:PROCgetrectangle
21990WHEN3:x3%=MX:y3%=MY
22000WHEN4:RECTANGLE x3%,y3%,MX-x3%,MY-y3%
22010WAIT:WAIT:RECTANGLE x3%,y3%,MX-x3%,MY-y3%
22020x4%=MX:y4%=MY
22030WHEN5:PROCcopysort
22040x3%=(x3%DIV2)*2
22050x4%=(x4%DIV2)*2
22060y3%=(y3%DIV4)*4
22070y4%=(y4%DIV4)*4
22080IF x3%>x4% THEN temp%=x3%:x3%=x4%:x4%=temp%
22090IF y4%>y3% THEN temp%=y4%:y4%=y3%:y3%=temp%
22100xps%=x4%-x3%+3:yps%=y4%-y3%-7
22110A%=x1%
22120B%=y1%
22130C%=xs%DIV2
22140D%=-ys%DIV4
22150E%=x3%
22160F%=y3%
22170G%=xps%DIV2
22180H%=-yps%DIV4
22190CALL anti_aliased_squash%
22200ENDCASE
22210
22220REM Fuzz
22230WHEN68:CASE step% OF
22240WHEN1:x0%=640:y0%=512
22250CIRCLE x0%,y0%,SQR((MX-x0%)^2+(MY-y0%)^2)
22260WAIT:WAIT
22270CIRCLE x0%,y0%,SQR((MX-x0%)^2+(MY-y0%)^2)
22280R%=SQR((MX-x0%)^2+(MY-y0%)^2)
22290WHEN3
22300REPEAT
22310PROCmouse_handle
22320AN1=RAD(RND(360)):RO1%=TAN(RAD(RND(80)))*(R%/10)
22330AN2=RAD(RND(360)):RO2%=TAN(RAD(RND(80)))*(R%/10)
22340A%=MX+SIN(AN1)*RO1%
22350B%=MY+COS(AN1)*RO1%
22360C%=MX+SIN(AN2)*RO2%
22370D%=MY+COS(AN2)*RO2%
22380CALL swap_pixels%
22390UNTIL MB=0
22400ENDCASE
22410
22420REM Options
22430WHEN69,70,78,79
22440CASE !Ac% OF
22450WHEN69:select=TRUE
22460WHEN70:select=FALSE
22470WHEN78:!left_handed=0
22480WHEN79:!left_handed=1
22490ENDCASE
22500PROCreset_action
22510
22520REM Pixellate
22530WHEN71:CASE step% OF
22540WHEN1,2:PROCgetrectangle
22550WHEN3:PROCsortcord
22560gsx%=ABS(x1%-MX):gsy%=ABS(y1%-MY)
22570gsx%=(gsx% DIV 2)*2
22580gsy%=(gsy% DIV 4)*4
22590IF gsx%<4 THEN gsx%=4
22600IF gsy%<8 THEN gsy%=8
22610PROCpixgrid
22620WAIT:WAIT
22630PROCpixgrid
22640WHEN4:PROCpoint(0,0)
22650FOR gy%=y1% TO y2% STEP -gsy%
22660FOR gx%=x1% TO x2% STEP gsx%
22670sx%=gsx%:sy%=gsy%
22680IF gx%+sx%>x2% THEN sx%-=gx%+sx%-x2%-2
22690IF gy%-sy%<y2% THEN sy%-=y2%-(gy%-sy%)-4
22700A%=gx%:B%=gy%:C%=sx%DIV2:D%=sy%DIV4
22710CALL COLaverage%
22720NEXT
22730NEXT
22740MOUSE RECTANGLE 0,0,1279,1023
22750PROCupdate
22760ENDCASE
22770
22780REM Copy Fill
22790WHEN72:CASE step% OF
22800WHEN1,2:PROCgetrectangle
22810WHEN3:px%=MX:py%=MY
22820WHEN4:PROCcopysort:PROCpoint(0,0)
22830GCOL 128+POINT(MX,MY) TINT TINT(MX,MY)
22840IF !fill_style=0 OR !fill_style=3 THEN !fill_style=2
22850CASE !fill_style OF
22860WHEN1,2,3:
22870CALL bit_map_scan_A%
22880PLOT&85,MX,MY
22890A%=x1%DIV2:B%=y1%DIV4:C%=xs%DIV2:D%=-ys%DIV4
22900CASE !fill_style OF
22910WHEN1,2:CALL copy_fill%
22920WHEN3:REM Should be full mapping.
22930ENDCASE
22940ENDCASE
22950PROCupdate
22960ENDCASE
22970
22980REM Save Compacted Sprite
22990WHEN73:IF FNtext_entry(33,$screen_str%,255) THEN
23000PROCpoint(0,1):PROCcompactedsave(1,out$)
23010area$=STR$(xs%*ys%)
23020per$=LEFT$(STR$(cs%/(xs%*ys%)*100),4)
23030IF INKEY(-1) THEN PROCerrorhandle(1,"Compaction Report|Size: "+STR$(xs%)+"x"+STR$(ys%)+"|Area in bytes: "+area$+"|Bytes used: "+STR$(cs%)+"|Percentage: "+per$," ",selected)
23040$screen_str%=out$
23050ENDIF
23060PROCreset_entry
23070
23080REM Compacted Get
23090WHEN74:CASE step% OF
23100WHEN1,2:PROCgetrectangle
23110WHEN3:PROCsortcord
23120!com_x1=x1%
23130!com_y1=y1%
23140!com_x2=x2%
23150!com_y2=y2%
23160ENDCASE
23170
23180REM Mode 15 to 13 convert
23190WHEN75:CASE step% OF
23200WHEN1,2:PROCgetrectangle
23210WHEN3:PROCsortcord:xs%-=2:ys%+=4:px%=MX:py%=MY
23220RECTANGLE px%,py%,xs%/2,-ys%
23230WAIT:WAIT
23240RECTANGLE px%,py%,xs%/2,-ys%
23250WHEN4:PROCsortcord
23260A%=x1%:B%=y1%:C%=xs%DIV4:D%=-ys%DIV4:E%=px%:F%=py%-ys%-4
23270CALL COLmode15_13resize%
23280ENDCASE
23290
23300REM Colour Average Area
23310WHEN76:CASE step% OF
23320WHEN1,2:PROCgetrectangle
23330WHEN3:PROCsortcord
23340A%=x1%:B%=y1%:C%=xs%DIV2:D%=-ys%DIV4
23350CALL COLaverage%
23360ENDCASE
23370
23380REM Update Font List
23390WHEN77
23400CALL fontlistinit%
23410PROCreset_action
23420
23430REM 3 point curve
23440WHEN80:CASE step% OF
23450WHEN1:x1%=MX:y1%=MY
23460WHEN2:x2%=MX:y2%=MY
23470MOVE x1%,y1%:DRAW x2%,y2%
23480WAIT:WAIT
23490MOVE x1%,y1%:DRAW x2%,y2%
23500WHEN3:x3%=MX:y3%=MY
23510PROCcurve(20):WAIT:WAIT:PROCcurve(20)
23520WHEN4:PROCcurve(1)
23530ENDCASE
23540
23550REM Bottle Wall Formula
23560WHEN81:IF FNtext_entry(32,botrad$,255) THEN botrad$=out$
23570PROCreset_entry
23580
23590REM Undo Brush
23600WHEN82:CASE step% OF
23610WHEN1:A%=(MX DIV 2)-16:B%=255-((MY DIV 4)+8)
23620CALL brusheor%
23630WAIT:WAIT:CALL brusheor%
23640WHEN2:REPEAT
23650PROCmouse_handle
23660A%=(MX DIV 2)-16:B%=255-((MY DIV 4)+8)
23670CALL brushundo%
23680UNTIL MB=0
23690ENDCASE
23700
23710ENDCASE
23720ENDPROC
23730
23740DEFPROCcurve(r%)
23750PLOT &45,x1%,y1%
23760xs%=x1%-x2%:ys%=y1%-y2%
23770xs2%=(x1%-xs%/2)-x3%:ys2%=(y1%-ys%/2)-y3%
23780IF r%<>1 THEN
23790s%=r%
23800ELSE
23810IF ABSxs%>ABSys% THEN s%=ABSxs% ELSE s%=ABSys%
23820ENDIF
23830FOR st=1/s% TO 1-1/s% STEP 1/s%
23840x%=x1%-(xs%*st)-(xs2%*SINRAD(st*180))
23850y%=y1%-(ys%*st)-(ys2%*SINRAD(st*180))
23860PLOT &25,x%,y%
23870NEXT
23880PLOT &25,x2%,y2%
23890ENDPROC
23900
23910DEFFNtext_entry(sl%,in$,len%)
23920!putit%=1
23930PROCpoint(0,PNkeyboard)
23940PROCreset_action:CALL uptree%
23950A%=-128:B%=!starty%+56:E%=-1:CALL help%
23960A%=-128:B%=!starty%-!sizey-96:E%=-1:CALL help%
23970step%=1
23980go=FNinstring(sl%,126,in$,out$,len%)
23990CALL liftup%:CALL putbackground%
24000=go
24010
24020DEFPROCreset_entry
24030CALL liftdown%:VDU5:CALL helptext%:PROCupdate
24040ENDPROC
24050
24060DEFPROCeval_error_cheat
24070LOCAL ERROR
24080ON ERROR LOCAL eval$="":VDU7:t$=REPORT$:RESTORE ERROR:ENDPROC
24090IF ASC(eval$)=126 THEN t$=STR$~(EVAL(MID$(eval$,2))) ELSE t$=STR$(EVAL(eval$))
24100RESTORE ERROR
24110ENDPROC
24120
24130DEFPROCcompactedsave(t%,fn$)
24140LOCAL ERROR
24150ON ERROR LOCAL CALL undosave%:RESTORE ERROR:ERROR 99,REPORT$:ENDPROC
24160OSCLI"DefineBuffer "+STR$(STORE%)+" &28000"
24170CASE t% OF
24180WHEN0:OSCLI"Com_Save "+fn$+" 0 0 1279 1023 0"
24190WHEN1:IF ?(flags%+1)=0 THEN tl%=behind% ELSE tl%=0
24200OSCLI"Com_Save "+fn$+" "+STR$(!com_x1)+" "+STR$(!com_y1)+" "+STR$(!com_x2)+" "+STR$(!com_y2)+" "+STR$(tl%)
24210ENDCASE
24220cs%=10
24230xs%=10
24240ys%=10
24250CALL undosave%
24260RESTORE ERROR
24270ENDPROC
24280
24290DEFPROCcompressedsave(fn$)
24300LOCAL ERROR
24310ON ERROR LOCAL CALL undosave%:RESTORE ERROR:ERROR 99,REPORT$:ENDPROC
24320$cat%=fn$
24330CALL compactedsave%
24340CALL undosave%
24350RESTORE ERROR
24360ENDPROC
24370
24380DEFPROCpixgrid
24390RECTANGLE x1%,y1%,xs%,ys%
24400FOR X%=x1%+gsx% TO x2% STEP gsx%
24410LINE X%,y1%,X%,y2%
24420NEXT
24430FOR Y%=y1%-gsy% TO y2% STEP -gsy%
24440LINE x1%,Y%,x2%,Y%
24450NEXT
24460ENDPROC
24470
24480DEFFNsprites
24490CALL checksprites%
24500=!OUT
24510
24520DEFFNput_check
24530IF FNsprites>0 THEN =TRUE
24540PROCreset_action
24550IF !Ac%=37 OR !Ac%=40 THEN !Ac%=38:ERROR 99,"No Sprites Present. Unable to Restore Action, Setting Action to Sprite Get."
24560=FALSE
24570
24580DEFPROCtitlesprite
24590LOCAL ERROR
24600ON ERROR LOCAL RESTORE ERROR:ENDPROC
24610MOVE 52,711:MOVE 274,932:*SGET Diamond
24620RESTORE ERROR:ENDPROC
24630
24640REM formula functions
24650
24660DEF FNradiusR
24670=SQR(XR^2+YR^2)
24680
24690DEF FNradiusD
24700=SQR(XD^2+YD^2)
24710
24720DEF FNdepth
24730LOCAL r%,g%,b%,t%
24740t%=(col% AND 192)>> 6
24750r%=t%+(col% AND 3)<<2
24760g%=t%+(col% AND 12)
24770b%=t%+(col% AND 48)>>2
24780t%=r%
24790IF g%>t% THEN t%=g%
24800IF b%>t% THEN t%=b%
24810=t%/15
24820
24830DEF FNwedge(up%,down%)
24840IF col%=up% THEN wedge%+=1
24850IF col%=down% THEN wedge%-=1
24860=wedge%
24870
24880DEFPROCsmearscreen(x1%,y1%,xs%,ys%)
24890PROCcopysort
24900c1%=(px1%-px4%)
24910c2%=(py1%-py4%)
24920c3%=(ys%)
24930c4%=(xs%)
24940c5%=(px2%-px1%)
24950c6%=(py2%-py1%)
24960c7%=(px3%-px4%)-c5%
24970c8%=(py3%-py4%)-c6%
24980PROCpoint(0,0)
24990FOR yp%=y1% TO y1%+ys% STEP SGN(ys%)*4
25000arx%=0
25010FOR xp%=x1% TO x1%+xs% STEP SGN(xs%)*2
25020IF yp%=y1% THEN A%(arx%,0)=FNnpx(xp%,yp%):A%(arx%,1)=FNnpy(xp%,yp%):GOTO 25120
25030IF arx%=0 THEN nplx%=FNnpx(xp%,yp%):nply%=FNnpy(xp%,yp%):GOTO 25100
25040plt%=FNgcol(xp%-2,yp%+4)
25050MOVE tx%,ty%
25060MOVE A%(arx%,0),A%(arx%,1)
25070IF plt% THEN PLOT &55,nplx%,nply%
25080nplx%=FNnpx(xp%,yp%):nply%=FNnpy(xp%,yp%)
25090IF plt% THEN PLOT &55,nplx%,nply%
25100tx%=A%(arx%,0):ty%=A%(arx%,1)
25110A%(arx%,0)=nplx%:A%(arx%,1)=nply%
25120arx%=arx%+1
25130NEXT xp%,yp%
25140step%=1
25150ENDCASE
25160PROCupdate
25170ENDPROC
25180
25190DEF FNnpx(PX,PY)
25200w1=((PY-y1%)/c3%)
25210w2=((PX-x1%)/c4%)
25220=px1%-(c1%*w1)+(c5%+c7%*w1)*w2
25230
25240DEF FNnpy(PX,PY)
25250=py1%-(c2%*w1)+(c6%+c8%*w1)*w2
25260
25270DEF FNatn(X,Y)
25280IF ABS(Y)>0 THEN A=DEG(ATN(X/Y)) ELSE A=90+180*(X<0)
25290IF Y<0 THEN A=A+180
25300=A
25310
25320DEF FNradius(X,Y)
25330=SQR(X^2+Y^2)
25340
25350DEFPROCshape
25360A=FNatn(MX-x3%,MY-y3%)
25370D=FNradius(MX-x3%,MY-y3%)
25380OA1=2*(DEG(ATN(ABS(xs%)/ABS(ys%))))
25390OA2=180-OA1
25400px1%=x3%+D*SIN(RAD(A))
25410py1%=y3%+D*COS(RAD(A))
25420px2%=x3%+D*SIN(RAD(A+OA1))
25430py2%=y3%+D*COS(RAD(A+OA1))
25440px3%=x3%+D*SIN(RAD(A+OA1+OA2))
25450py3%=y3%+D*COS(RAD(A+OA1+OA2))
25460px4%=x3%+D*SIN(RAD(A-OA2))
25470py4%=y3%+D*COS(RAD(A-OA2))
25480MOVE px1%,py1%
25490GCOL 3,3
25500DRAW px2%,py2%
25510GCOL 3,63
25520DRAW px3%,py3%
25530DRAW px4%,py4%
25540DRAW px1%,py1%
25550ENDPROC
25560
25570DEF FNformx(xpos,ypos,upval)
25580rd=FNradius(xpos,ypos)
25590an=RAD(FNatn(xpos,ypos))
25600an=an+offset
25610=mx%+SIN(an)*rd*(xs2%/720)
25620
25630DEF FNformy(xpos,ypos,upval)
25640=my%+COS(an)*rd*(ys2%/720)*COS(lean)+upval*SIN(lean)
25650
25660DEF FNboltx(A)
25670=!(xget%+A*4)
25680DEF FNbolty(A)
25690=!(yget%+A*4)
25700
25710DEFPROCoscliaction
25720LOCAL ERROR
25730*POINTER 0
25740*FX 4,0
25750*FX 229,0
25760SYS "OS_RestoreCursors"
25770PROCreset_action
25780PROCsetsoftkeys
25790CALL uptree%
25800PRINT
25810ON ERROR LOCAL PRINT:PRINT REPORT$
25820REPEAT
25830INPUT "*"out$
25840IF LEFT$(out$,8)<>"MENU OFF" THEN OSCLI out$
25850UNTIL LEFT$(out$,8)="MENU OFF" OR MODE<>15 OR out$=""
25860IF MODE<>15 THEN MODE 15
25870*FX 229,1
25880SYS "OS_RemoveCursors"
25890!putit%=1:CALL putbackground%
25900RESTORE ERROR
25910REM VDU 21
25920*FX 4,1
25930PROCunsetsoftkeys
25940PROCpoint(0,0)
25950IF LEFT$(out$,8)="MENU OFF" THEN OSCLI MID$(out$,9)
25960IF MODE<>15 THEN MODE 15:!putit%=1:CALL putbackground%
25970CALL liftdown%
25980PROCupdate
25990ENDPROC
26000
26010DEFPROCdumpererror
26020P%=!printmenu%
26030[OPT0
26040EQUS"< Printer Dumps"
26050EQUB1:EQUB255
26060EQUS"Not Installed":EQUB 0:EQUB 33
26070]
26080ENDPROC
26090
26100DEFPROCcheckdumper
26110LOCAL ERROR
26120ON ERROR LOCAL PROCdumpererror:RESTORE ERROR:ENDPROC
26130P%=!printmenu%
26140OSCLI ("SCREENDUMPIDS &"+STR$~(P%))
26150RESTORE ERROR
26160ENDPROC
26170
26180DEFPROCgetrectangle
26190CASE step% OF
26200WHEN1:x1%=MX:y1%=MY
26210WHEN2:RECTANGLE x1%,y1%,MX-x1%,MY-y1%
26220WAIT:WAIT:RECTANGLE x1%,y1%,MX-x1%,MY-y1%
26230xs%=MX-x1%:ys%=MY-y1%
26240x2%=MX:y2%=MY
26250ENDCASE
26260ENDPROC
26270
26280DEFPROCsortcord
26290x1%=(x1%DIV2)*2
26300x2%=(x2%DIV2)*2
26310y1%=(y1%DIV4)*4
26320y2%=(y2%DIV4)*4
26330IF x1%>x2% THEN temp%=x1%:x1%=x2%:x2%=temp%
26340IF y2%>y1% THEN temp%=y2%:y2%=y1%:y1%=temp%
26350xs%=x2%-x1%+3:ys%=y2%-y1%-7
26360ENDPROC
26370
26380DEF FNgcol(xp%,yp%)
26390IF !pm%<>2 THEN
26400GCOL POINT(xp%,yp%) TINT TINT(xp%,yp%)
26410col%=POINT(xp%,yp%)+TINT(xp%,yp%)
26420=TRUE
26430ELSE
26440A%=xp%DIV2:B%=(-ys%-yp%)DIV4
26450CALL spritepix%
26460col%=!RESULTX
26470=!spritemask
26480ENDIF
26490
26500DEFPROCspritesort
26510CALL spriteinit%
26520x1%=0:y1%=4*!sprint_ysize
26530xs%=2*!sprint_xsize
26540ys%=-4*!sprint_ysize
26550x2%=xs%
26560y2%=0
26570ENDPROC
26580
26590DEFPROCcopysort
26600wedge%=0
26610CASE !pm% OF
26620WHEN0,1:REM solid,pattern
26630PROCsortcord
26640WHEN2:REM sprite
26650PROCspritesort
26660ENDCASE
26670ENDPROC
26680
26690DEFFNinstring(min,max,in$,RETURN out$,length)
26700l%=!sizex/8-2
26710*FX 4,1
26720*FX 229,1
26730OMX=-1:OMY=-1
26740XP=!startx%+6:YP=!starty%-48
26750MOVE XP,YP:VDU 5
26760out$=in$:posit%=LEN(out$)+1:of%=posit%-l%+1:IF of%<1 THEN of%=1
26770GCOL 0,5 TINT 64:PRINT">";
26780REPEAT
26790MOVE XP+16,YP:
26800GCOL 0,(BACKCOL% AND 63) TINT (BACKCOL% AND 192)
26810PRINTSTRING$(l%,CHR$(255))
26820GCOL 0,(textcol% AND 63) TINT (textcol% AND 192)
26830MOVE XP+16,YP:PRINTMID$(out$,of%,l%)
26840GCOL 3,63 TINT 192
26850RECTANGLE FILL XP+(posit%-of%+1)*16,YP,16,-28
26860REPEAT
26870MOUSE DX,DY,MB
26880IF DX<>OMX OR DY<>OMY THEN PROCpoint(0,PNkeyboard)
26890A$=INKEY$(0)
26900IF A$<>"" THEN *POINTER 0
26910UNTIL A$<>"" OR MB>0
26920OMX=DX:OMY=DY
26930RECTANGLE FILL XP+(posit%-of%+1)*16,YP,16,-28
26940MOVE XP+16,YP
26950i$="":IF ASC(A$)>min-1 AND ASC(A$)<max+1 THEN i$=A$
26960IF ASC(A$)=163 THEN i$=A$
26970IF ASC(A$)=21 THEN out$="":of%=1:posit%=1
26980IF LEN(out$)=length AND i$<>"" THEN VDU 7
26990IF i$<>"" AND LEN(out$)<length THEN out$=LEFT$(out$,posit%-1)+A$+MID$(out$,posit%):posit%=posit%+1
27000IF ASC(A$)=127 THEN
27010IF posit%>1 THEN out$=LEFT$(out$,posit%-2)+MID$(out$,posit%):posit%=posit%-1 ELSE VDU 7
27020ENDIF
27030IF ASC(A$)=136 THEN posit%=posit%-1
27040IF ASC(A$)=137 THEN posit%=posit%+1
27050IF (posit%-of%+1)>l% THEN of%+=1
27060IF (posit%-of%)<4 THEN of%=posit%-4
27070IF of%<1 THEN of%=1
27080IF posit%<1 THEN posit%=1
27090IF posit%>LEN(out$)+1 THEN posit%=LEN(out$)+1
27100IF ASC(A$)=27 THEN =FALSE
27110IF MB=1 THEN =FALSE
27120UNTIL ASC(A$)=13 OR MB=4
27130VDU 4:*FX 4,0
27140=NOT (LEN(out$)=0)
27150
27160DEFPROCsetcol
27170GCOL 0,(textcol% AND 63) TINT (textcol% AND 192)
27180GCOL 0,128+(BACKCOL% AND 63) TINT (BACKCOL% AND 192)
27190ENDPROC
27200
27210DEFPROCpoint(L,N)
27220P%=PO%+N*267
27230SYS &400D8,2,P%+11,32,32,P%?9,P%?10
27240MOUSE COLOUR 1,P%?0,P%?1,P%?2
27250MOUSE COLOUR 2,P%?3,P%?4,P%?5
27260MOUSE COLOUR 3,P%?6,P%?7,P%?8
27270OSCLI "FX 106,"+STR$(2 OR L<<7)
27280ENDPROC
27290
27300DEF FNbuild_formula(A$,pos%)
27310REM A$=eval of the formula,pos=formula number
27320LOCAL ERROR
27330ON ERROR LOCAL RESTORE ERROR:=FALSE
27340FOR Y%=0 TO 20
27350FOR X%=0 TO 20
27360XD=X%*36-360
27370YD=Y%*36-360
27380XR=RAD(XD):YR=RAD(YD)
27390A=(EVAL(A$)<<8)
27400!(skel%+pos%*1764+(X%+21*Y%)*4)=A
27410NEXT
27420NEXT
27430RESTORE ERROR
27440=TRUE
27450
27460DEFPROCformula_load(filename$)
27470REM reads and descifers a formula list
27480SYS "OS_Find",&40,filename$ TO handle%
27490formulas%=1
27500P%=formnames%
27510[OPT 0
27520EQUB 7
27530EQUB 10
27540EQUS "Defineable"
27550]
27560name$="":formulas$(formulas%-1)="":past%=FALSE
27570REPEAT
27580SYS "OS_GBPB",4,handle%,log_scale%,1 TO ,,,finish%
27590b%=?log_scale%:cr%=(b%=10 OR b%=13)
27600IF cr% THEN
27610IF past% THEN
27620IF FNbuild_formula(formulas$(formulas%-1),formulas%) THEN ?P%=LEN(name$):P%+=1:$P%=name$:P%+=LEN(name$):formulas%+=1
27630ENDIF
27640name$="":formulas$(formulas%-1)="":past%=FALSE
27650ELSE
27660IF past% THEN formulas$(formulas%-1)+=CHR$(b%)
27670IF b%=ASC("$") THEN past%=TRUE
27680IF NOT past% THEN name$+=CHR$(b%)
27690ENDIF
27700UNTIL finish%=1
27710?formnames%=formulas%
27720SYS "OS_Find",&00,handle%
27730ENDPROC
27740
27750DEFPROCupdate
27760IF (mgs AND mousegrid>2) OR mcs THEN l=1 ELSE l=0
27770CASE !Ac% OF
27780WHEN12:PROCpoint(l,PNglass)
27790WHEN13:PROCpoint(l,PNflood):CALL mousecolour%
27800WHEN21,33,34:PROCpoint(l,PNspray):CALL mousecolour%
27810WHEN37,38:PROCpoint(l,PNspriteop)
27820WHEN31,32,35:PROCpoint(l,PNbrush)
27830WHEN41:PROCpoint(0,PNspray)
27840WHEN59:PROCpoint(l,PNA)
27850OTHERWISE:PROCpoint(l,PNnormal):CALL mousecolour%
27860ENDCASE
27870ENDPROC
27880
27890DEFPROCerror_at
27900VDU 26
27910IF ERR=17 THEN
27920step%=1:PROCpoint(0,PNstopped)
27930CALL liftdown%
27940FOR R%=0 TO 20000:NEXT
27950PROCupdate
27960ENDPROC
27970ENDIF
27980IF !lastmenu=12 OR !lastmenu=30 THEN CALL uptree%
27990VDU 7
28000CASE testing OF
28010WHENFALSE:PROCerrorhandle(1,"An Error Has Occured,|"+REPORT$,"Continue",selected)
28020WHENTRUE:PROCerrorhandle(3,"An Error Has Occured,|"+REPORT$+"|At line "+STR$(ERL),"Edit This Line|Edit Last Line|Continue",selected)
28030*FX 15,0
28040IF selected=1 THEN PROCstring_to_buffer("ED. "+STR$(ERL)+CHR$(13))
28050IF selected=2 THEN PROCstring_to_buffer("ED.."+CHR$(13))
28060IF selected=1 OR selected=2 THEN END
28070ENDCASE
28080step%=1
28090IF !lastmenu<>1 AND !lastmenu<>9 THEN !presentmenu%=!lastmenu
28100ENDPROC
28110
28120DEFPROCerrorhandle(N,message$,question$,RETURN selected)
28130IF MODE<>15 THEN MODE 15:SYS "OS_RemoveCursors"
28140*FX229,1
28150PROCpoint(0,PNquestion)
28160MOUSE RECTANGLE 256,331,768,372
28170A%=N:CALL draw_error_box%
28180VDU 28,32,19,59,12
28190COLOUR 128+(BACKCOL% AND 63) TINT (BACKCOL% AND 192)
28200COLOUR (textcol% AND 63) TINT (textcol% AND 192)
28210PROCstrhandle(message$)
28220SYS "OS_PrettyPrint",BUFF%
28230COLOUR 63 TINT 192
28240PRINTTAB(0,5);
28250PROCstrhandle(question$+" ?")
28260SYS "OS_PrettyPrint",BUFF%
28270PROCBUTOFF(7)
28280REPEAT
28290MOUSE DX,DY,ChB
28300IF ChB>0 AND DX>308 AND DX<463 AND DY<653 AND DY>516 AND ChB<>2 THEN !presentmenu%=0:!lastmenu=0:ChB=2:!treepos=0:!Ac%=0
28310UNTIL ChB=2 OR (ChB>0 AND DX>300 AND DX<474 AND DY<484 AND DY>368)
28320PROCBUTOFF(7)
28330CALL undorestore%
28340PROCupdate
28350CALL liftdown%
28360VDU5:CALL helptext%
28370F%=step%:CALL helpstep%
28380selected=INT((484-DY)/120*N)+1
28390IF ChB=2 THEN enter%=10:selected=-1
28400ENDPROC
28410
28420DEFPROCstrhandle(string$)
28430out$=""
28440FOR R=1 TO LEN(string$)
28450ch$=MID$(string$,R,1)
28460IF ch$="|" THEN ch$=CHR$(13)
28470out$=out$+ch$
28480NEXT
28490$BUFF%=out$+CHR$(0)
28500ENDPROC
28510
28520DEFPROCsetlimits(LMX,LMY)
28530mrctx1%=-LMX+2
28540mrcty1%=-LMY+4
28550mrctx2%=1277+LMX
28560mrcty2%=1019+LMY
28570ENDPROC

�> <Atelier$Dir>.Atelier
3�  By Simon Clay Copyright (c) Simon Clay, 1989
:    version$="1.02"
(
2
<�:�error(�,�$,�,�)
F	�init
P�:�error(�,�$,�,�):�report
Z�normpoint
d`� �okfile_at(start_file$,-1,start_t%) � t%=start_t%:start_t%=-1:�loadfile(start_file$,-1,t%)
n
x�
�(ș "Wimp_PollIdle",,q%,1E9 � reason%
��respond(reason%)
�
�quit%
�	�quit
��
�
���respond(reason%)
��waitpoint
�Ȏreason%�
��0:
��1:
�9�2:�open(!q%,q%!4,q%!8,q%!12,q%!16,q%!20,q%!24,q%!28)
��3:�closew(!q%)
�4:
�5:
.�6:�mouse(!q%,q%!4,q%!8,q%!12,q%!16,q%!20)
"�7:�enddrag
,�8:
6�9:�menuselect
@�10
J�11
T�12
^�17,18:�umess1
h�19:�umess2
r�
|�normpoint
��
�
���quit:�normpoint
��debug:�tidy:�
�2$q%="TASK":ș "Wimp_CloseDown",taskhandle%,!q%
�Ș
�
�
��init
�� q% 2500, workbuf% 100
�appl$="Atelier"
��findmos
�waiter%=0:�waitpoint
�
testing=�
C� os%=2 � ș "OS_GetEnv" � SA$:� �SA$,7,5)<>"-quit" � testing=�
�init_at

�checkmos
&*fx229,1
0wimpsaved%=�
:$v%=�initwimp:�v%<180:�12:�err(2)
D)quit%=�:dialogue%=-1E9:stopreason%=-1
Nackpending%=�:ackref%=-1
Xdragreason%=-1:help$=""
bsavereason%=-1
l�defws:�defmenus:�version
vcheckref%=-1
�as$="Are you sure ?"
��baricon
�� find start bit
�start_file$="":start_t%=-1
�� �
�+� � � start_file$="":start_t%=-1:� �T~C
�ș "OS_GetEnv" � r0,r1,r2
�	A$=""
�&� ?r0<>0 � A$+=�(?r0):r0+=1:� �dPB
�-� �A$," ")<>0 � A$=�A$,�A$," ")+1):� �dZB
�� A$<>"" �
� ș "OS_File",5,A$ � r0,r1,r2
�� r0=1 �
>� ((r2 � &FFF00000)=&FFF00000) � start_t%=(r2 � &FFF00)>>8
start_file$=A$
�
 �
*�
4� end start bit
>�
H
R
��version
\/�T$:T$=version$:笤prod:T$+=" *UNFINISHED*"
f�seti(w_pinfo%,4,"v"+T$)
p�
z
�,ݤprod=�version$,�version$,".")+1,1)="0"
�ݤdebug=��prod ��-1��-2
�
�ݤinitwimp
�E$q%="TASK":ș "Wimp_Initialise",200,!q%,"Atelier"�!q%,taskhandle%
�=!q%
�
�
��tidy
��normpoint
��4:�0,2);:*fx4
�*fx225,1
�
*fx229
��:�:�" ";�:�
�


��baricon
$*!q%=-1:q%!4=0:q%!8=0:q%!12=64:q%!16=68
.-q%!20=%11000000000010:$(q%+24)="!Atelier"
8$ș"Wimp_CreateIcon",,q%�baricon%
B�
L
V!��error(err%,err$,erl%,quit%)
`.�normpoint:dragreason%=-1:@%=&90A:*fx229,1
j�i%,e%,t$,T$
t�debug:err$+=" ("+Þ+")"
~�
���:�error(�,�$,�,�)
�9!q%=err%:$(q%+4)=err$:ș"Wimp_ReportError",q%,1,appl$
��quit%:�quit
��
�
�*��report:�debug:�4:�:�" @ ";�:�tidy:�
��
�
�	ݤdir
� �T$:T$=�ArfVar(appl$+"$Dir")
��T$="":T$="&.!"+appl$+"."
���T$)<>".":T$+="."
=T$


ݤArfVar(A$)
�
(
��:=""
2"ș&23,A$,workbuf%,200,0,3�,,L%
<workbuf%?L%=13:=$workbuf%
F
P��umess1
Z-ref%=q%!8:task%=q%!4:�task%=taskhandle%:�
dmess%=q%!16
nȎmess%�
x�0:�quit
��1:�datasaved
��2:�savedata
��3:�dataload
��4:ackpending%=�
��5:�dataopen
��6:
��7:
��8:�prequit
��9:
�
�&502:
�-�&400C0:�submenu(q%!20,q%!24,q%!28,q%+32)
��
��

��dataopen

�s%,t%
"'file$=�zts(q%+44):s%=q%!36:t%=q%!40
,?�okfile_at(file$,s%,t%)�dataloadack:�loadfile(file$,s%,t%)
6�
@
J��dataload
T
�s%,t%
^'file$=�zts(q%+44):s%=q%!36:t%=q%!40
h?�okfile_at(file$,s%,t%)�dataloadack:�loadfile(file$,s%,t%)
r�
|
���datasaved
�
�s%,t%
�'file$=�zts(q%+44):s%=q%!36:t%=q%!40
�(�okfile_at(file$,s%,t%)�datasaveack
��
�
���template(T$)
��template1(T$,q%)
��
�
���template1(T$,q%)
�� c%:$workbuf%=T$
�Jș "Wimp_LoadTemplate",,q%,curbuf%,endbuf%,-1,workbuf%�,,curbuf%,,,,c%
.� c%=0 � � 1,"Template '"+T$+"' not found"
�

&��defws
0�I%
:bufsz%=&1000
D;� buffer% bufsz%:curbuf%=buffer%:endbuf%=buffer%+bufsz%
N'ș"Wimp_OpenTemplate",,�dir+"AtFrm"
XB�template("stopbox"):q%!64=1:ș"Wimp_CreateWindow",,q%�w_stop%
b?�template("save"):q%!64=1:ș"Wimp_CreateWindow",,q%�w_save%
l<�template("ProgInfo"):ș"Wimp_CreateWindow",,q%�w_pinfo%
vș"Wimp_CloseTemplate"
�free%=endbuf%-curbuf%
��
�
���defmenus
��t$
�� mlist% 32,function% 51
�bufsz%=&200
�C� menufree% bufsz%:menuptr%=menufree%:menuend%=menufree%+bufsz%
�menustart%=menufree%:�+2
��t$:m_save%=�crmenu(t$)
��"#Save,Compressed Screen}w_save%,System Screen}w_save%,Super Compacted Screen}w_save%,Super Compacted Sprite}w_save%,System Sprite(s)}w_save%,Brush Shapes}w_save%,Patterns}w_save%"
��t$:m_main%=�crmenu(t$)
�/�"#Atelier,Info>w_pinfo%,Save>m_save%,Quit"
�

��front(h%,X%,Y%)
 
�getw(h%)
*�X%>=0x1%+=X%-x0%:x0%=X%
4�Y%>=0y1%+=Y%-y0%:y0%=Y%
>*�open(h%,x0%,y0%,x1%,y1%,scx%,scy%,-1)
H�
R
\
��top(h%)
f6�getw(h%):�open(h%,x0%,y0%,x1%,y1%,scx%,scy%,-1):�
p
z4��open(oh%,ox0%,oy0%,ox1%,oy1%,oscx%,oscy%,obh%)
��O%
�'!q%=oh%:ș"Wimp_GetWindowState",,q%
�
�wimpopen
��
�
���wimpopen
�5!q%=oh%:q%!4=ox0%:q%!8=oy0%:q%!12=ox1%:q%!16=oy1%
�>q%!20=oscx%:q%!24=oscy%:q%!28=obh%:ș"Wimp_OpenWindow",,q%
��
�
���closew(!q%)
��I%
�ș"Wimp_CloseWindow",,q%
	.�!q%=dialogue%:dialreason%=-1:dialogue%=-1
	$�dialogue%>=0:�closew(dialogue%)
	
Ȏ!q%�
	$�w_stop%:stopreason%=-1
	.�
	8�
	B
	L*ݤia(h%,i%):�geti(h%,i%):�chkii:=q%!28
	V*ݤva(h%,i%):�geti(h%,i%):�chkii:=q%!32
	`*ݤil(h%,i%):�geti(h%,i%):�chkii:=q%!36
	j
	t3��chkii:�(q%!24�&100)=0�1,"Icon not indirected"
	~�
	�
	�<��geti(h%,i%):!q%=h%:q%!4=i%:ș"Wimp_GetIconState",,q%:�
	�
	���stop(r%,T$,U$,T%)
	�dialreason%=r%
	��-3mi%=3:�mstop:�
	�+�seti(w_stop%,0,T$):�seti(w_stop%,1,U$)
	�)�unselall(w_stop%):�dialogue(w_stop%)
	�dialreason%=r%
	��
	�
	���dialogue(h%)

�X%,Y%

$�dialogue%>=0:�closew(dialogue%)
-�nomenu:�readpointer:X%=mx%-200:Y%=my%-85

�X%<0X%=0
(�Y%<96Y%=96
22dialogue%=h%:�front(h%,X%,Y%):�setct(h%,-1,-1)
<�
F
P!��readpointer:�q%:q%=workbuf%
Zș"Wimp_GetPointerInfo",,q%
d1mx%=!q%:my%=q%!4:mb%=q%!8:mh%=q%!12:mi%=q%!16
n�
x
�ݤdialogue
�!�dialogue%>=0�mh%<>dialogue%�
��closew(dialogue%)
��
�=�
�
�$��mouse(mx%,my%,mb%,mh%,mi%,mo%)
��dragreason%>=0�mb%>255:�
��dialogue:�
�
Ȏmb%�
��2:�menu
��1,4:�select
��16,64:�startdrag
�
�

"6��seti(h%,i%,T$):T$=�T$,�il(h%,i%)):$�ia(h%,i%)=T$
,<�iconupd(h%,i%):�getct:�!q%=h%�q%!4=i%:�setct(h%,i%,�T$)
6�
@
J'��iset(h%,i%,B%,E%):�q%:q%=workbuf%
T?!q%=h%:q%!4=i%:q%!12=B%:q%!8=E%:ș"Wimp_SetIconState",,q%:�
^
h'��iconupd(h%,i%):�iset(h%,i%,0,0):�
r
|��readblock(p%)
�7x0%=!p%:y0%=p%!4:x1%=p%!8:y1%=p%!12:� physical area
�Fscx%=p%!16:scy%=p%!20:bhandle%=p%!24:� scroll offsets, stack depth
�Jbx%=x0%-scx%:by%=y1%-scy%:� calculate physical co-ords of logical area
�>ex0%=p%!40:ey0%=p%!44:ex1%=p%!48:ey1%=p%!52:� logical area
�Agx0%=p%!24:gy0%=p%!28:gx1%=p%!32:gy1%=p%!36:� graphics window
�.open%=(p%!28�&10000)<>0:� window open flag
��
�
���getw(h%)
�&!q%=h%:ș "Wimp_GetWindowInfo",,q%
��readblock(q%+4)
��
�
��select

Ȏmh%�
�-2:enter%=0:�enter_atelier
&�w_stop%:�mstop
0�w_save%:�msave
:�
D�
N
X��mstop
b�mi%<3�mi%>4�
l%�T%:T%=dialreason%:dialreason%=-1
v�mi%=3�
�	ȎT%�
��1:�quit
��
��
��closew(w_stop%):�
�
���msave
��mi%<>0�
�g�T$:T$=$�ia(w_save%,2):�T$=�leaf(T$):�99,"To save, please drag the file icon to a directory viewer"
�file$=T$:�savedata1
��
�
���startdrag

"dragreason%=-1:dragbutton%=mb%


Ȏmh%�

6�w_save%:�mi%=3:dragreason%=1:�dragicon(w_save%,3)

 �

*�

4

>
��enddrag

H�readpointer

R
�mh%<>-1�

\Ȏdragreason%�

f#�1:file$=�leaf($�ia(w_save%,2))

p-�savereq(file$,savet%,saves%,savereason%)

z�

��

�dragreason%=-1

��

�

�,��unseli(h%,i%):�iset(h%,i%,&200000,0):�

�

�0��seli(h%,i%):�iset(h%,i%,&200000,&200000):�

�

���unselall(h%)

��I%,i%:�wchi(h%)

�(I%=q%:�:i%=!I%:�i%>=0:�unseli(h%,i%)

�I%+=4:�i%<0:�

�
8��wchi(h%):ș "Wimp_WhichIcon",h%,q%,&200000,&200000
�

$
��menu
.
Ȏmh%�
8$�-2:my%=64+3*40:�pop(m_main%,-1)
B�
L�
V
`ݤpar(t$,s$,� i%):�i1%
ji1%=i%+1:i%=�t$+s$,s$,i1%)
t=�t$,i1%,i%-i1%)
~
�ݤcrmenu(menu$)
�.�menufree%+28>menuend%�99,"Menu area full"
�� m%
�menuptr%=menufree%
�i%=0
�C� �menu$,1)="#"i%=1:menutitle$=�par(menu$,",",i%)�menutitle$=""
�$menuptr%=menutitle$
�;menuptr%?12=7:menuptr%?13=2:menuptr%?14=7:menuptr%?15=0
�3menuptr%!16=196-24:menuptr%!20=40:menuptr%!24=0
�"menuptr%+=28:maxx%=�menutitle$
��item$=�par(menu$,",",i%)
��menuitem(item$)
� item$=""

$m%=menufree%:m%!16=(maxx%*8+6)*2
menufree%=menuptr%
=m%
(
2��menuitem(text$)
<.�text$=""menuptr%!-24=(menuptr%!-24)�&80:�
F.�menuptr%+24>menuend%��99,"Menu area full"
P�i%,flg%
Zflg%=&00
di%=�text$,">")
n<�i%>0subptr%=��text$,i%+1):text$=�text$,i%-1)�subptr%=-1
xi%=�text$,"}")
�;�i%>0subptr%=��text$,i%+1):text$=�text$,i%-1):flg%+=&08
�)��text$,1)="#"text$=�text$):flg%+=&02
�;menuptr%!0=flg%:menuptr%!4=subptr%:menuptr%!8=&07000021
��text$,1)="$"�
�2!menuptr%+=&04:menuptr%!8+=&100:i%=�text$,"(")
�3�i%>0�L%=��text$,i%+1):text$=�text$,i%-1)�L%=12
�8menuptr%!12=��text$,2):menuptr%!16=-1:menuptr%!20=L%
�text$=�L%," ")
��
��text$<=12�
�$(menuptr%+12)=text$
��
�%I%=�workspace(�text$+1):$I%=text$
6menuptr%!12=I%:menuptr%!16=-1:menuptr%!20=�text$+1
 menuptr%!8=menuptr%!8 � &100
�
"�text$>maxx%maxx%=�text$
,�
6menuptr%+=24
@�
J
Tݤworkspace(L%)
^2� curbuf%+L%>endbuf%�99,"No more buffer space"
hcurbuf%+=L%:=curbuf%-L%
r
|��prep(menu%,tree%)
�
�I%,T$
��clearts(menu%)
�Ȏmenu%�
��m_main%:�mp_main
��
��
�
�
��mp_main
��n%,f$,s%,t%
�
�tree%>0�
��!mlist%=1�
�>n%=mlist%!4:�setfile_at(n%,f$,s%,t%):�saveset(f$,t%,n%,s%)
��
�
�

&��pop(menu%,tree%)
0�menu%<0:�
:�prep(menu%,tree%)
D-ș "Wimp_CreateMenu",,menu%,mx%-50,my%+32
Nopenmenu%=menu%
X�
b
l��nomenu
v(ș"Wimp_CreateMenu",,-1:openmenu%=-1
��
�
���menuselect
��I%
�-I%=0:�mlist%!I%=q%!I%:I%+=4:�q%!(I%-4)=-1
��readpointer
�Ȏopenmenu%�
��m_main%:�m_main
��
��mb%=1�
�#�pop(openmenu%,mlist%):��nomenu
��
��

��m_main
Ȏ!mlist%�
 �0:�dialogue(w_pinfo%)
*!�2:�altered_at:�qquit:��quit
4�
>�
H
R��submenu(menu%,X%,Y%,q%)
\
� ;{{{{{{
f�I%
p-I%=0:�mlist%!I%=q%!I%:I%+=4:�q%!(I%-4)=-1
z�prep(openmenu%,mlist%)
�'ș"Wimp_CreateSubMenu",,menu%,X%,Y%
��
�
� ��clearts(mh%):�I%:I%=mh%+28
�"�mh%<menustart%�mh%>menuend%:�
��
�"!I%=!I%��1:I%!8=I%!8��&400000:
�I%+=24:�I%!-24�&80
��
�
���shade(mh%,I%)
�/mh%!(28+8+24*I%)=mh%!(28+8+24*I%)�&400000:�
�
��tick(mh%,I%)
'mh%!(28+24*I%)=mh%!(28+24*I%)�&01:�

$
ݤcommand
.
�T%,I%,T$
8ș"OS_GetEnv" � T$
B�strip(T$)
L=T$
V
`ݤparam
j�I%,T$:T$=�command
tI%=�T$," -quit "):�I%=0:=""
~T$=�T$,I%+7):�strip(T$)
�1I%=�T$," "):�I%>0T$=�T$,I%+1):�strip(T$):�=""
�,I%=�T$," "):�I%>0T$=�T$,I%-1):�strip(T$)
�=T$
�
�ݤfiletype(T$)
�$�T%,U%:ș "OS_File",5,T$ �U%,,T%
�
�T%=0:=-1
�=(T%�&FFF00)>>8
� 
���waitpoint
�� os%<>2 �
�waiter%+=1
ș"Hourglass_On"

�

��normpoint
(� os%<>2 �
28ȕwaiter%>0:ș"Hourglass_Off":waiter%-=1:�:waiter%=0
<�
F
P
��help
Z�
d
n��dataloadack
xq%!0=20:q%!12=ref%:q%!16=4
�$ș"Wimp_SendMessage",17,q%,task%
��
�
���datasaveack
�<�ArfVar("Wimp$Scrap")="":�99,"<Wimp$Scrap> not defined"
�A!q%=60:q%!12=ref%:q%!16=2:q%!36=-1:$(q%+44)="<Wimp$Scrap>"+�0
�1ș"Wimp_SendMessage",17,q%,task%:ackref%=q%!8
��
�
���savereq(T$,t%,s%,r%)
�savereason%=r%
�+q%!32=my%:q%!28=mx%:q%!24=mi%:q%!20=mh%
�,q%!16=1:q%!12=0:q%!36=s%:q%!40=t%:!q%=60
9$(q%+44)=T$+�0:ș"Wimp_SendMessage",17,q%,q%!20,q%!24
saveref%=q%!8:�

"��loadmess
,$(q%+44)=file$+�0:!q%=60
67q%!12=ref%:q%!16=3:ș"Wimp_SendMessage",17,q%,task%
@ackpending%=�:�
J 
Tݤzts(T%):�T$:T$=""
^ȕ?T%<>0:T$+=�?T%:T%+=1:�
h=T$
r
|+��getct:ș"Wimp_GetCaretPosition",,q%:�
�
�>��setct(h%,i%,o%):ș "Wimp_SetCaretPosition",h%,i%,,,-1,o%
��
�
�ݤleaf(T$)
�
�I%,C%
�$�((�T$,".")=0)�(�T$,":")=0))�=T$
�I%=�(T$)
��
�C%=��T$,I%,1)
�	I%-=1
��(I%<=0�C%=�"."�C%=�":")
��I%>0�=�T$,�(T$)-I%-1)
=T$

��scrsz
&H!workbuf%=4:workbuf%!4=5:workbuf%!8=11:workbuf%!12=12:workbuf%!16=-1
01ș "OS_ReadVduVariables",workbuf%,workbuf%+24
:Iq%!32=(workbuf%!32)<<(workbuf%!24):q%!36=(workbuf%!36)<<(workbuf%!28)
D�
N
X��saveset(f$,T%,r%,s%)
b0savereason%=r%:savef$=f$:savet%=T%:saves%=s%
l>�seti(w_save%,2,f$):$�va(w_save%,3)="sfile_"+�"00"+�~T%,3)
v�
�
���dragicon(h%,i%)
��x%,y%,ys%
�,�getw(h%):ys%=y1%-y0%:x%=bx%:y%=y0%-scy%
�1�geti(h%,i%):q%!8+=x%:q%!12+=y%+ys%:q%!16+=x%
�0q%!20+=y%+ys%:q%!24=0:q%!28=0:!q%=0:�drag5:�
�
���drag5:�readpointer:�scrsz
�Fq%!24-=mx%-q%!8:q%!28-=my%-q%!12:q%!32+=q%!16-mx%:q%!36+=q%!20-my%
�!q%!4=5:ș"Wimp_DragBox",,q%:�
�
���savedata
��q%!12<>saveref%:�
file$=�zts(q%+44)
�savedata1
�
 
* ��savedata1:�closew(w_save%)
4 �savefile(savereason%,file$)
>savereason%=-1:�loadmess
H�
R
\
��prequit
f�altered_at:�ackrec:�qquit
p�
z
�9��ackrec:q%!12=ref%:ș "Wimp_SendMessage",19,q%,task%
�:��qquit:�stop(1,"Lose screen and quit Atelier",as$,-1)
��
� 
���enter_atelier
� �:��:��:�restorewimp:��,�$
�#enter%=0:�run_at:�restorewimp:�
�
���savefile(n%,f$)
� �:��:��:�restorewimp:��,�$
�"�save_at(n%,f$):�restorewimp:�
�
���savewimp:�os%=1:�
� wimpsaved% � �
wimpsaved%=�
&�I%,J%:� SYS"Wimp_CommandWindow",1
$�normpoint:mode%=�:�mode15
.
*fx229
8�
B
L��restorewimp:�os%=1:�
V� � wimpsaved% � �
`wimpsaved%=�
j*fx229,1
tș "Wimp_CommandWindow",-1
~Gș "Wimp_SetMode",mode%:�:ș"Wimp_ForceRedraw",-1,-1E9,-1E9,1E9,1E9
��
�
���mode15
��
����:��:�99,"Atelier needs to use MODE 15 and there is not enough RAM! You must use the task manager to make at least 160k of screen available"
�	�15:�
�
���findmos:os%=1
��:��:��:�
��+1
�os%=2:�
�
��checkmos:os%=1

�:��:��:�mos12:�
�+1
os%=2:�
(
2��mos12
<	�15:�
F
ș &400C0
Penter%=0
Z�run_at
d�12:*desktop
n�
x
���store(� A$,f$)
��I%,C%,T$:T$=f$:�T$>""�
��I%=1��T$:C%=��T$,I%)
�"�C%>64�C%<91�T$,I%,1)=�(C%+32)
��
��
��T$,"$scrap>")=0A$=f$
��
�
�
�G� ----ATELIER BITS-------------------------------------------------
���run_at
�<� ;{{ here, copy the background screen to the foreground
>� ;{{ and do the biz. NB all ERROR traps etc MUST be LOCAL

�savewimp
�normpoint
",� 23,255,255,255,255,255,255,255,255,255
,cat%!0=148
6
cat%!4=-1
@&ș "OS_ReadVduVariables",cat%,cat%
J!topscreen%=!cat%
T�unsetsoftkeys
^ș "OS_RemoveCursors"
h�setvectors
r� undorestore%
|�enter_action
�
� colour%
�� mousecolour%
�� liftdown%
��5:� helptext%
��update
��atelier
�
� liftup%
�� undosave%
��unsetvectors
�� PROCsetsoftkeys
��restorewimp
��
�
��setvectors
� vectors_set% � �
"ș "OS_Claim",&1D,duff_call%,0
&�set_abort_traps
0vectors_set%=�
:�
D
N��unsetvectors
X� � vectors_set% � �
b$ș "OS_Release",&1D,duff_call%,0
l�unset_abort_traps
vvectors_set%=�
��
�
���enter_action
�� � �:�error_at:�
�Ȏ enter% �
��0:� no action,just enter
��1:� compacted load
�
*UnDefine
�*SetPosition 0 1023
�'G%=cat%:$cat%=f$:� com_update_info%
��"PlotFile "+f$
�$enter%=0:�store($screen_str%,f$)
�5�2:$file_str%=f$  :� sprites - handled by atelier
�3:$cat%=f$
G%=cat%
� compactedload%
 � undosave%
*enter%=0
4�
>�
H
Rݤaltered_at
\B� ;{{ return TRUE if you would lose any data if they quit just
f>� ;{{ now (ie they have altered screen/sprites/brushes etc
pC� ;{{ since last save/load. Just return FALSE if you don't care
z=� testing
�
�ݤokfile_at(f$,s%,t%)
�I� t%=&D7E � t%=&D3A � t%=&D7F � t%=&D39 � t%=&FF9 � t%=&DE2 � =� � =�
�
���loadfile(f$,s%,t%)
� �:��:��:�restorewimp:��,�$
�%�load_at(f$,s%,t%):�restorewimp:�
�
���load_at(f$,s%,t%)
�Ȏ t% �
��&D7F,&FF9,&DE2
�ș "OS_Find",&40,f$ � hdl%
�ș "OS_GBPB",4,hdl%,cat%,1
ș "OS_Find",&00,hdl%
�
Ȏ t% �
$;�&D7E:�"LOAD "+f$+" "+�~(brush%):�store($brush_str%,f$)
.E�&D3A:�"LOAD "+f$+" "+�~(brpatt%):�store($pattern_str%,f$):!pm%=1
8�&D7F:enter%=1:�run_at
B�&D39:�formula_load(f$)
L2�&FF9:enter%=2:�store($sprite_str%,f$):�run_at
V2�&DE2:enter%=3:�store($screen_str%,f$):�run_at
`�
j�
t
~��save_at(n%,f$)
�� savecheck%
�Ȏ n% �
��0,1,2,3
�=ș "OS_File",&0A,f$,&FFF,,cat%,cat%   :� saves dummy file
�
�savewimp
�cat%!0=148:cat%!4=-1
�&ș "OS_ReadVduVariables",cat%,cat%
�+!topscreen%=!cat%:ș "OS_RemoveCursors"
�� undorestore%
�Ȏ n% �
�2�0:�compressedsave(f$):�store($screen_str%,f$)
�0�1:�"SCREENSAVE "+f$:�store($screen_str%,f$)
3�2:�compactedsave(0,f$):�store($screen_str%,f$)

3�3:�compactedsave(1,f$):�store($screen_str%,f$)
�
�restorewimp
(+�4:�"SSAVE "+f$:�store($sprite_str%,f$)
2A�5:�"SAVE "+f$+" "+�~(brush%)+" +2000":�store($brush_str%,f$)
<�"SETTYPE "+f$+" D7E"
FB�6:�"SAVE "+f$+" "+�~(brpatt%)+" +2000":�store($brush_str%,f$)
P�"SETTYPE "+f$+" D3A"
Z�
d�
n
x#��setfile_at(n%,� f$,� s%,� t%)
�A� ;{{ setup up f$ to be filename, s% to estimated size and t%
�2� ;{{ to filetype for file of internal type n%
�3� ;{{ NB s%<0 means unknown size, try it anyway
�Ȏ n% �
�)�0:t%=&DE2:f$=$screen_str% :s%=&28000
�)�1:t%=&FF9:f$=$screen_str% :s%=&28000
�%�2:t%=&D7F:f$=$screen_str% :s%=-1
�%�3:t%=&D7F:f$=$screen_str% :s%=-1
�:�4:t%=&FF9:f$=$sprite_str% :ș "OS_SpriteOp",8�,,,,,s%
�(�5:t%=&D7E:f$=$brush_str%  :s%=&2000
�(�6:t%=&D3A:f$=$pattern_str%:s%=&2000
��
��

��animate_sprites
� frame%=0 � 7
"!� colour%:ȓ Ȑ 0,0,1023,1023
,/�"PlotFile AniCreate.Sprites.Frame"+�frame%
6� undosave%
@x1%=0:y1%=0
Jx2%=1023:y2%=1023
Tx3%=0:y3%=0
^x4%=x3%+63:y4%=y3%+127
h$step%=happenstep%:�screen_select
r(�"DefineBuffer "+�(STORE%)+" &28000"
|?�"Com_Save AniCreate.Sprites.Small"+�frame%+" 0 0 63 127 0"
��
��
�
�
��animate
�� frame%=45 � 64
�� !pc%=0 � 255 � 255
�!� colour%:ȓ Ȑ 0,0,1023,1023
�,�"PlotFile ShipSpr.Sprites.Ship"+�frame%
�� undosave%
�x1%=0:y1%=0
�x2%=1023:y2%=1023
�x3%=1024+!pc%�255*96:y3%=0
�x4%=x3%+95:y4%=y3%+191
�$step%=happenstep%:�screen_select
��
 (�"DefineBuffer "+�(STORE%)+" &28000"
 ?�"Com_Save ShipSpr.Small.Ship"+�frame%+" 1024 0 1215 191 0"
 �
 &�
 0
 :
��atelier
 Dangle=0
 N*FX 15,0
 X6�                    ---------MAIN LOOP-----------
 b� � � �error_at
 l�
 v�
 �
mrctx1%=0
 �
mrcty1%=0
 �mrctx2%=1279
 �mrcty2%=1023
 �
Ȏ !Ac% �
 �9�35,36:mrctx1%=32:mrcty1%=32:mrctx2%=1216:mrcty2%=960
 �(�24:� step%>2 � �setlimits(xs%,-ys%)
 �K�45:mrctx1%=-xs%-xo%:mrcty1%=-ys%-yo%:mrctx2%=1280+xs%:mrcty2%=1024+ys%
 �D�71:� step%>2 � mrctx1%=x1%:mrcty1%=y2%:mrctx2%=xs%:mrcty2%=-ys%
 �/�75:� step%>2 � mrctx2%-=xs%�2:mrcty2%+=ys%
 �a�37,40:� �sprites>0 � � locatesprite%:ș &2E,40,,!sprstr � ,,,xs%,ys%:�setlimits(xs%*2,ys%*4)
 ��
 �)ȗ ȓ mrctx1%,mrcty1%,mrctx2%,mrcty2%
!�mouse_handle
!!� MB=2 � enter% � �menucalled
!AcCODE%=?(!step_codes)
! happenstep%=(AcCODE% � 15)
!*"stepcode%=?(!step_codes+step%)
!4R� (!pm%=2) � (stepcode% � 64) � step%+=1:�copysort:F%=step%:� helpstep%:� �Tja
!>
Ȏ !Ac% �
!H�60,61,62,63,64,65
!RȎ !rect_brush_mode �
!\�0:AcCODE%=AcCODE% � 191
!f*�1:happenstep%+=1:AcCODE%=AcCODE% � 64
!p(� step%=2 � stepcode%=stepcode% � 16
!z+�2:happenstep%+=1:AcCODE%=AcCODE% � 191
!�+� step%=1 � stepcode%=stepcode% � 16+32
!��
!��
!�R� (AcCODE% � 64) � step%=happenstep% � step%=1:�BUTOFF(4):F%=step%:� helpstep%
!�O� � (AcCODE% � 64) � step%=happenstep% � step%=step%-1:F%=step%:� helpstep%
!�
Ȏ � �
!�0�(� (AcCODE% � 64)) � (step%=happenstep%-1):
!�5� (MB � 4)=4 � step%=step%+1:F%=step%:� helpstep%
!�
!�N� � select � � (MB � 4)=(step% � 1)*4 � step%=step%+1:F%=step%:� helpstep%
!�I� select � � (MB � 4) � step%=step%+1:F%=step%:� helpstep%:�BUTOFF(4)
!��
!�
*FX 229,1
"#� step%=happenstep% � *FX 229,0
"inaction=!Ac%
"!� (MB � 1)=1 � �adjustpressed
"$	E%=-1
".� stepcode% � 16 �
"8Ȏ step% �
"B�0,1:C%=MX-x0%:D%=MY-y0%
"L�2,3:C%=MX-x1%:D%=MY-y1%
"V�4,5:C%=MX-x3%:D%=MY-y3%
"`�
"jM� stepcode% � 32 � B%=C%*2:C%=D%:� calc_radius%:C%=!RESULTX/2:E%=2 � E%=0
"t�
"~A%=MX:B%=MY:� help%
"�+� step%=happenstep% � (AcCODE% � 128) �
"�Ȗ
"�
� liftup%
"�
� colour%
"�2� !pm%>0 � (AcCODE% � &20) � � bit_map_scan_A%
"��screen_select
"�3� !pm%>0 � (AcCODE% � &20) � � bit_map_pattern%
"�#� (AcCODE% � 16) � � show_thru%
"�� liftdown%
"��
"�� 3,63 Ȝ 192
"��screen_select
#�
#
.keypress%=�(0):� keypress%>0 � �keypressed
#*� inaction<>!Ac% � �process_new_action
#,� step%<>oldstep% � F%=step%:� helpstep%
#(oldstep%=step%
#2
� !Ac%=20
#<�reset_action
#F
� os%=1 �
#P� testing �
#ZS�errorhandle(3,"Where to Boss","Basic Program|Source Code|Don't Exit",selected)
#d�
#nP�errorhandle(2,"Do you really wish to exit from ATELIER","CONFIRM",selected)
#x�
#�� selected=1
#��
#�)� testing � � selected=1 � selected=2
#�� � testing � � selected=1
#�7�          -------------END OF MAIN LOOP ----------
#�� � testing � os%=2 � �
#��tidy_at
#�*FX 15,0
#�Ȏ selected �
#��1:
#�*KEY 4 SAVE|MRUN|M
#�*FX 138,0,69
#�*FX 138,0,68
$*FX 138,0,46
$*FX 138,0,46
$*FX 138,0,13
$"�
$,�2:
$6*KEY 4 RUN|M
$@K�string_to_buffer("LO. ""<Ateli*$Dir>.Sour*.Sou*"""+�(13)+"ED.."+�(13))
$J�
$T�
$^�
$h
$r��adjustpressed
$|� !Ac%=82 � !Ac%=59 �
$��reset_action
$��
$�R� (MB � 1)=1 � step%>1 � step%=step%-1:�BUTOFF(1):�update:F%=step%:� helpstep%
$��
$��
$�
$���reset_action
$�!Ac%=!oldaction%
$��
$�
$���mouse_handle
$�"ȗ MX,MY,MB:� mgs � �mousegrid
$�� !left_handed � Ȏ MB �
%�%001:MB=%100
%�%011:MB=%110
%�%100:MB=%001
%&�%110:MB=%011
%0�
%:� � �(-97) � �
%D2� �(-1) � xrst%=MX:yrst%=MY � ȗ � xrst%,yrst%
%N�
%X
%b� �mousegrid
%l1MX=((MX+mousegrid � 2) � mousegrid)*mousegrid
%v1MY=((MY+mousegrid � 2) � mousegrid)*mousegrid
%�� MX<mrctx1% � MX=mrctx1%
%�� MY<mrcty1% � MY=mrcty1%
%�� MX>mrctx2% � MX=mrctx2%
%�� MY>mrcty2% � MY=mrcty2%
%�Ȓ � MX,MY
%��
%�
%���set_action
%�
Ȏ !Ac% �
%��57,59,82,43
%�
%�!oldaction%=!Ac%
%��
&�
&
&��BUTOFF(M)
& �
&*ȗ DX,DY,MB
&4� !left_handed � Ȏ MB �
&>�%001:MB=%100
&H�%011:MB=%110
&R�%100:MB=%001
&\�%110:MB=%011
&f�
&p� (MB � M)=0
&z�
&�
&���keypressed
&�*FX 15,0
&�Ȏ �(keypress%) �
&��"*":enter%=5
&��
&�� (keypress% � 128)=0 � �
&�Ȏ keypress% �
&�+�&80,&90,&A0,&B0        :� f0-print key
&�
� liftup%
&�� undosave%
&��point(0,0)
&��(funcprint$)
'!� �<>15 � � 15:� undorestore%
'�update
'� liftdown%
'$�&B1
'.� undosave%
'8
*FX229
'B� 0
'L�2
'V� !Ac%=0 � 82
'`!rect_brush_mode=(!Ac% � 3)
'j�"Function ";!Ac%
't�
'~� helptext%
'��
'��
'��3
'�� 15
'�� undorestore%
'�9�&81,&91,&A1,&B1:� liftup%:� undorestore%:� liftdown%
'�0�&82,&92,&A2,&B2:step%=1:�set_action:!Ac%=57
'�`�&83,&93,&A3,&B3:� !Ac%<>82 � step%=1:�set_action:!Ac%=82 � !brushsel%=((!brushsel%+1) � 15)
'�:�&84,&94,&A4,&B4:!pm%=0:!pc%=�MX,MY)+Ȝ(MX,MY):�update
'��&85,&95,&A5,&B5
'�O� !helpstatus% � � helpon%:�5:� helptext%:F%=step%:� helpstep% � � helpoff%
'��&86,&96,&A6,&B6
(mgs=1-mgs:�update
(
�&87,&97,&A7,&B7
(� testing � keypress%=&A7 �
(
*FX229
(("� liftup%:�animate:� liftdown%
(2�
(<
� liftup%
(F� undosave%
(P� liftdown%
(Z�
(d�&88,&98,&A8,&B8
(nC� (testing � keypress%=&88) � (� testing) � �set_action:!Ac%=20
(x-� testing � keypress%=&98 � os%=1:!Ac%=20
(�^� testing � keypress%=&A8 � � liftup%:A%=!presentmenu%:G%=MX:H%=MY:� drawmenu%:� liftdown%
(��
(�keyin%=(keypress%�&F)-9
(�� keyin%>4 � keyin%=-1
(�� keyin%>-1 �
(�&keylevel%=(((keypress%�&F0)>>4)�4)
(�Y� �(-3) � function%(keyin%,keylevel%)=!Ac% � !Ac%=function%(keyin%,keylevel%):�update
(��
(��
(�
(���process_new_action
(�� !Ac%=33 � �reset_action
(�3�5:� helptext%:F%=1:� helpstep%:step%=1:�update
)�
)
)��menucalled
)"�set_action
),ȗ ȓ 0,0,1279,1023
)6
� liftup%
)@!mousebuts=0
)J.� ?(!actionsave)<255 � ?(!actionsave)=!Ac%
)T-� 128+(BACKCOL% � 63) Ȝ (BACKCOL% � 192)
)^Ȏ enter% �
)h!�2:A%=7:� downtree%:� sprites
)r �5:A%=28:� downtree%:� oscli
)|�
)�&� enter%=4 � !Ac%=12 � A%=9 � A%=0
)�ȗ MX,MY,MB
)�G%=MX:H%=MY:� menusystem%
)�� !Ac%=33 � �reset_action
)�step%=1:�update:�BUTOFF(7)
)�� !Ac%<>43 �
)�� liftdown%
)��5:� helptext%
)�F%=step%:� helpstep%
)��
)�5� ?(!actionsave)<255 � !oldaction%=?(!actionsave)
)�enter%=0
)��
*
*��initerror
*� �=15 � � 0
*&� 7
*0� �=17 � �"Escaped!":�
*:�$;" at line ";�
*D� � testing � �
*N*FX 15,0
*XA=�
*b(�string_to_buffer("ED. "+�(�)+�(13))
*l�
*v�
*�
*���string_to_buffer(tran$)
*��
*� �"FX 138,0,"+�(�(�tran$,1)))
*�tran$=�tran$,2)
*�� tran$=""
*��
*�
*�
��tidy_at
*��setsoftkeys
*��unsetvectors
*��
*�
+��unsetsoftkeys
+$� R=221 � 228:�"FX "+�(R)+",2":�
+
*FX 219,9
+ �
+*
+4��setsoftkeys
+>$� R=221 � 228:�"FX "+�(R)+",1":�
+H
*FX 219,9
+R�
+\
+f
��init_at
+p � testing � � � � �initerror
+z	��Dfk
+�6PNglass=2:PNbrush=3:PNflood=4:PNpencil=5:PNspray=6
+�MPNnormal=7:PNspriteop=8:PNcalculator=14:PNkeyboard=15:PNA=16:PNstopped=17
+�PNquestion=18:PNhand=19
+�5com_gx1%=0:com_gy1%=0:com_gx2%=1278:com_gy2%=1020
+��unsetsoftkeys:K=1024
+��� BLOW% 1*K,STORE% 160*K,cat% 1*K,brush% 8*K,brpatt% 8*K,cycle% 128,file_icons% 3*K,log_table% 256,log_scale% 1040,formnames% 1*K,fontlist% 1*K
+��� skel% 1764*10,sqr% &5201,sin% 360*4,tan% 90*4,numbers% &720,screen_str% 256,pattern_str% 256,brush_str% 256,sprite_str% 256,file_str% 256
+ʏ� behind% 256,flags% 4,PO% &14DC,sprstr% 30,fontstr% 45,presentfont% 80,xget% 800,yget% 800,BUFF% 1*K,BUFFER% 35328,freetable% 256,abts% 16
+�=� L(640),A%(641,1),B%(256,1),function%(4,3),formulas$(10)
+�$�"LOAD "+�dir+"POINTER "+�~(PO%)
+�� os%=1 � �point(0,1)
+�$s%=�(�dir+"code*"):sz%=�#s%:�#s%
+�0� code% sz%:�"LOAD "+�dir+"code* "+�~(code%)
,pl$="LOAD "+�dir
,�pl$+"!Brushes "+�~(brush%)
,!�pl$+"!Patterns "+�~(brpatt%)
,$#*Com_Open <Atelier$Dir>.Sprites
,.�in(file_icons%,"40 8")
,8�in(numbers%,"12 8")
,B�in(BUFFER%,"384 92")
,L*Com_Close
,V
�codevars
,`� os%=1 � �point(0,0)
,j$screen_str%="Screen"
,t$pattern_str%="Patterns"
,~$brush_str%="Brushes"
,�$sprite_str%="SpriteFile"
,�$sprstr%="new_sprite"
,�g_sprite$="new_sprite"
,�cycle%!0=16
,�
� R=0 � 3
,�� o%
,�� R1=0 � 3
,�!(cycle%+R*16+R1*4+4)=o%+R1
,��:�
,�"� R=0 � 255:?(behind%+R)=255:�
,�U� R=1 � 256:?(log_table%+R-1)=20+(R^2)/300:�:� R=0 � 5248:!(sqr%+R*4)=�(R*1024):�
,�)� R=0 � 359:!(sin%+R*4)=��(R)*65536:�
-(� R=0 � 89:!(tan%+R*4)=��(R)*65536:�
-
� 0,44,208,252
-%� 4,364,408,584,224,584,72,456,72
-
� numlist
-(!bolpoint%=numlist
-2� R=0 � !bolpoint%-1
-<	� X,Y
-F#!(xget%+R*4)=X:!(yget%+R*4)=Y+4
-P�
-Z?(flags%)=255
-d?(flags%+1)=255
-n?(flags%+2)=255
-x?(flags%+3)=255
-�!sprstr=sprstr%
-�!brpatt=brpatt%
-�!flags=flags%
-�
!cat=cat%
-�!behind=behind%
-�!brushshapes=brush%
-�!BUFF=BUFF%
-�
!FLOB=PO%
-�!bolx=xget%
-�!boly=yget%
-�!fontstr=fontstr%
-�!presentfont=presentfont%
-�!STORE=STORE%
.!freetable=freetable%
.!put=BUFFER%
.!cycle=cycle%
."!screen_str=screen_str%
.,!pattern_str=pattern_str%
.6!brush_str=brush_str%
.@!sprite_str=sprite_str%
.J!file_icons=file_icons%
.T!log_table=log_table%
.^!log_scale=log_scale%
.h!numbers=numbers%
.r
!sqr=sqr%
.|
!sin=sin%
.�
!tan=tan%
.�!file_str=file_str%
.�!formnames=formnames%
.�!skel=skel%
.�!fontlist=fontlist%
.�2*IF "<Font$Prefix>"="" THEN *SET Font$Prefix $
.�� �
.�8� � � $fontlist%="Font Disk Not Present"+�(0):� �djn
.�A%=testing
.�� initialisation%
.�� �
.��checkdumper
.�xrst%=640:yrst%=512
/x0%=0:y0%=0:x1%=0:y1%=0
/x2%=0:y2%=0:x3%=0:y3%=0
/x4%=0:y4%=0:x5%=0:y5%=0
/& actionflags%=8:actionstep%=3
/0xs%=0:ys%=0:oldstep%=0
/:step%=1:vectors_set%=�
/Dwedge%=0:col%=0
/Npsizex%=160:psizey%=160
/Xxpsize%=-1:ypsize%=-1
/bmgs=�:mcs=�
/lmousegrid=32:select=�
/vP%=formnames%
/�
[OPT 0
/�
EQUB 1
/�EQUB 10
/�EQUS "Defineable"
/�]
/�formula$="SIN(YR)*50"
/�$dummy=�build_formula(formula$,0)
/�botrad$="1"
/�(atext$="Atelier (C) Simon Clay 1989"
/��removekeymod
/�funcprint$="BYE"
/�eval$=""
/�!oldaction%=60
0�
0
0
0 ��in(b%,s$)
0*"�"Com_Sprites $ "+�(b%)+" "+s$
04�
0>
0H��removekeymod
0R� �
0\� � � �
0f!*Unplug InternationalKeyboard
0p�
0z
0���set_abort_traps
0�abts%!0=!&C
0�abts%!4=!&10
0�abts%!8=!&14
0�� PASS=0 � 2 � 2
0�	P%=&C
0�
[OPT PASS
0�<B abt1%       ;sets abort on instuction fetch error trap
0�9B abt2%       ;sets abort on data transfer error trap
0�4B abt3%       ;sets address exception error trap
0�]�
0��
0�
1��unset_abort_traps
1!&0C=abts%!0
1!&10=abts%!4
1$!&14=abts%!8
1.�
18
1B��codevars
1L
1Vvariablelocate%=code%+4*1
1`com_put%=code%+4*2
1jlocatesprite%=code%+4*3
1thelp%=code%+4*4
1~helpon%=code%+4*5
1�helpoff%=code%+4*6
1�helpstep%=code%+4*7
1�helptext%=code%+4*8
1�liftup%=code%+4*9
1�liftdown%=code%+4*10
1�colour%=code%+4*11
1�undorestore%=code%+4*12
1�undosave%=code%+4*13
1�drawmenu%=code%+4*14
1�menusystem%=code%+4*15
1�mousecolour%=code%+4*16
1�screen_select%=code%+4*17
2spriteinit%=code%+4*18
2
magnify%=code%+4*19
2uptree%=code%+4*20
2putbackground%=code%+4*21
2(com_get%=code%+4*22
22"putscreenrectangle%=code%+4*23
2<brusheor%=code%+4*24
2Fbrushdraw%=code%+4*25
2Pbrushundo%=code%+4*26
2Zspritepix%=code%+4*27
2dbrushget%=code%+4*28
2nshapeget%=code%+4*29
2xspriteputerror%=code%+4*30
2�#getspritefromscreen%=code%+4*31
2�priorityin%=code%+4*32
2�undochar%=code%+4*33
2�undobox%=code%+4*34
2�scanscreen%=code%+4*35
2�colourbyte%=code%+4*36
2�calc_intensity%=code%+4*37
2�splodgeread%=code%+4*38
2�setbord%=code%+4*39
2�abt1%=code%+4*40
2�FINDMENU%=code%+4*41
2�SKIPWORD%=code%+4*42
2�drawword%=code%+4*43
3abt2%=code%+4*44
3abt3%=code%+4*45
3COLaverage%=code%+4*46
3"COLgcol%=code%+4*47
3,"COLmode15_13resize%=code%+4*48
36show_thru%=code%+4*49
3@swap_pixels%=code%+4*50
3J#COLsmooth_rectangle%=code%+4*51
3Tcompactedsave%=code%+4*52
3^screensave%=code%+4*53
3hbit_map_scan_A%=code%+4*54
3rbit_map_scan_B%=code%+4*55
3|bit_map_pattern%=code%+4*56
3�vertical_fill%=code%+4*57
3�copy_fill%=code%+4*58
3�calc_radius%=code%+4*59
3�framedraw%=code%+4*60
3�spin_bottle%=code%+4*61
3�translate_point%=code%+4*62
3�#anti_aliased_squash%=code%+4*63
3�screenload%=code%+4*64
3�initialisation%=code%+4*65
3�formframedraw%=code%+4*66
3�form_translate%=code%+4*67
3�convertmode%=code%+4*68
3�bytecolour%=code%+4*69
4downtree%=code%+4*70
4checksprites%=code%+4*71
4compactedload%=code%+4*72
4&savecheck%=code%+4*73
40fontlistinit%=code%+4*74
4:duff_call%=code%+4*75
4Ddraw_error_box%=code%+4*76
4Ncom_update_info%=code%+4*77
4X
4b�variablelocate%
4l
4vc=!code%
4�
4�
Ac%=c+4*0
4�printmenu%=c+4*1
4�
pc%=c+4*2
4�brushsel%=c+4*3
4�helpstatus%=c+4*4
4�presentmenu%=c+4*5
4�bolpoint%=c+4*6
4�topscreen%=c+4*7
4�blowcol%=c+4*8
4�YES%=c+4*9
4�putit%=c+4*10
4�sprsel%=c+4*11
5startx%=c+4*12
5starty%=c+4*13
5compaction%=c+4*14
5 sprpos=c+4*15
5*freecol=c+4*16
54OUT=c+4*17
5>limtop=c+4*18
5Hlimbot=c+4*19
5Rstart=c+4*20
5\hlength=c+4*21
5fRESULTX=c+4*22
5pRESULTY=c+4*23
5zlastmenu=c+4*24
5�r1store=c+4*25
5�r0store=c+4*26
5�left_handed=c+4*27
5�compact3x4=c+4*28
5�inlaysed=c+4*29
5�sprstr=c+4*30
5�brpatt=c+4*31
5�flags=c+4*32
5�cat=c+4*33
5�behind=c+4*34
5�brushshapes=c+4*35
5�BUFF=c+4*36
5�FLOB=c+4*37
6bolx=c+4*38
6boly=c+4*39
6fontstr=c+4*40
6$presentfont=c+4*41
6.STORE=c+4*42
68freetable=c+4*43
6Bput=c+4*44
6Lcycle=c+4*45
6Vrect_brush=c+4*46
6`screen_str=c+4*47
6jpattern_str=c+4*48
6tbrush_str=c+4*49
6~sprite_str=c+4*50
6�help_text_data=c+4*51
6�file_icons=c+4*52
6�bit_map=c+4*53
6�fillstylepic=c+4*54
6�log_table=c+4*55
6�log_scale=c+4*56
6�
6�numbers=c+4*58
6�magnify_xpos=c+4*59
6�magnify_ypos=c+4*60
6�putpos=c+4*61
6�magputpos=c+4*62
7sizex=c+4*63
7
sizey=c+4*64
7sprsize=c+4*65
7spritex=c+4*66
7(spritey=c+4*67
72gtspritex=c+4*68
7<gtspritey=c+4*69
7Fdiskfontlistposition=c+4*70
7Pcatpos=c+4*71
7Zfontsel=c+4*72
7dpattsel=c+4*73
7ntreepos=c+4*74
7xmatrixput=c+4*75
7�barval_red=c+4*76
7�barval_grn=c+4*77
7�barval_blu=c+4*78
7�scaleval_left=c+4*79
7�scaleval_right=c+4*80
7�cycleplace=c+4*81
7�cycledirection=c+4*82
7�cyclemode=c+4*83
7�pm%=c+4*84
7�mixval_red=c+4*85
7�mixval_grn=c+4*86
7�mixval_blu=c+4*87
7�mousex=c+4*88
8mousey=c+4*89
8mousebuts=c+4*90
8magnification=c+4*91
8"magnify_xget=c+4*92
8,magnify_yget=c+4*93
86magnify_status=c+4*94
8@HANG=c+4*95
8Jrect_brush_mode=c+4*96
8Tvacant=c+4*97
8^com_x1=c+4*98
8hcom_y1=c+4*99
8rcom_x2=c+4*100
8|com_y2=c+4*101
8�sprint_xsize=c+4*102
8�sprint_ysize=c+4*103
8�spritemask=c+4*104
8�fill_style=c+4*105
8�fill_prop=c+4*106
8�fill_logr=c+4*107
8�fill_dith=c+4*108
8�step_codes=c+4*109
8�border=c+4*110
8�sqr=c+4*111
8�actionsave=c+4*112
8�bottle=c+4*113
8�bot_tilt=c+4*114
9bot_lean=c+4*115
9bot_xout=c+4*116
9bot_yout=c+4*117
9&line_selected=c+4*118
90bot_finish=c+4*119
9:bot_xscale=c+4*120
9Dbot_yscale=c+4*121
9Nhangdelay=c+4*122
9Xsin=c+4*123
9btan=c+4*124
9lfile_str=c+4*125
9vform=c+4*126
9�tilt=c+4*127
9�lean=c+4*128
9�rotation=c+4*129
9�xscale=c+4*130
9�yscale=c+4*131
9�hscale=c+4*132
9�form_list_pos=c+4*133
9�formnames=c+4*134
9�formula=c+4*135
9�skel=c+4*136
9�shade_range=c+4*137
9�min_shade=c+4*138
9�fontlist=c+4*139
:oldaction%=c+4*140
:
:
: BORDSIZE=28
:*WEDGESIZE=16
:4textcol%=0
:>BACKCOL%=202
:HTITLECOL%=0
:RBORDERCOL%=74
:\BORD1%=207
:f
BORD2%=15
:pBORD3%=138
:zBORD4%=197
:�DIRECTORYCOL%=224
:�
:��
:�
:���screen_select
:�
:�#� (!Ac%=1 � !Ac%=2) � step%=3 �
:��
:��mouse_handle
:�7D%=!Ac%:E%=step%:F%=MB:G%=MX:H%=MY:� screen_select%
:�
� MB=0
:�� !Ac%=1 � x1%=MX:y1%=MY
:��
;7D%=!Ac%:E%=step%:F%=MB:G%=MX:H%=MY:� screen_select%
;�
;
� !YES% �
;$Ȏ step% �
;.�1:x1%=MX:y1%=MY
;8�2:x2%=MX:y2%=MY
;B�3:x3%=MX:y3%=MY
;L�4:x4%=MX:y4%=MY
;V�5:x5%=MX:y5%=MY
;`�
;j�
;t� !YES% � �
;~
;�
;�Ȏ (!Ac%) �
;�
;�
� Magnify
;��12:Ȏ step% �
;��2:enter%=4
;�!magnify_xpos=MX � 2
;�!magnify_ypos=255-(MY � 4)
;��
;�
;�
� Fill
;��13:Ȏ step% �
<�2:�point(0,0)
<
col%=�MX,MY)+Ȝ(MX,MY)
<� 128+�MX,MY) Ȝ Ȝ(MX,MY)
<Ȏ !fill_style �
<(�0:
<2 � !pm%>0 � � bit_map_scan_A%
<<&� !pm%>0 � col%<>!pc% � �&85,MX,MY
<F!� !pm%>0 � � bit_map_pattern%
<P�1,2,3:
<Z� bit_map_scan_A%
<d�&85,MX,MY
<nȎ !fill_style �
<x�1,2:� vertical_fill%
<��3:A%=MX �2:B%=255-MY �4
<�� vertical_fill%
<��
<��
<��update
<��
<�
<�� Sprite Handling
<�
�14,16
<�+� 0,(textcol% � 63) Ȝ (textcol% � 192)
<�/� 0,128+(BACKCOL% � 63) Ȝ (BACKCOL% � 192)
<�ș &2E,8 � ,,,r3
<�,ș &2E,13,,sprstr%,30,!sprsel% � ,,,leng
=?(sprstr%+leng+1)=13
=errorcheat=!Ac%
="!putit%=1:�point(0,PNkeyboard)
="�reset_action:� uptree%
=,(A%=-128:B%=!starty%+56:E%=-1:� help%
=6/A%=-128:B%=!starty%-!sizey-96:E%=-1:� help%
=@2XP=!startx%+6:YP=!starty%-48:� XP,YP:� 5:�" ";
=J*step%=1:�$sprstr%:!starty%=!starty%-32
=T'old$=$sprstr%:old$=�old$,�(old$)-1)
=^#go=�instring(33,126,"",out$,12)
=h� liftup%:� putbackground%
=r
� go �
=|Ȏ errorcheat �
=�;�16:� "SCOPY "+old$+" "+out$:!sprsel%=r3+1:!sprpos=r3-5
=�"�14:� "SRENAME "+old$+" "+out$
=��
=��
=��reset_entry
=�
=�� Save Compressed Screen
=�,�15:� �text_entry(33,$screen_str%,255) �
=�7�point(0,1):�compressedsave(out$):$screen_str%=out$
=��
=��reset_entry
=�
=�� Save Brushes
>+�17:� �text_entry(33,$brush_str%,255) �
>6�point(0,1):� "SAVE "+out$+" "+�~(brush%)+" +2000"
>/�("SETTYPE "+out$+" &D7E"):$brush_str%=out$
>&�
>0�reset_entry
>:
>D� Name Sprite
>N7�18:� �text_entry(33,g_sprite$,12) � g_sprite$=out$
>X!Ac%=38:�reset_entry
>b
>l� Save Patterns
>v-�19:� �text_entry(33,$pattern_str%,255) �
>�7�point(0,1):� "SAVE "+out$+" "+�~(brpatt%)+" +2000"
>�1�("SETTYPE "+out$+" &D3A"):$pattern_str%=out$
>��
>��reset_entry
>�
>� � function 20 -- FINISH -- !
>�
>�� Set Border Colour
>��21:�reset_action
>�� setbord%
>�
>�
� Ellipse
>��22:Ȏ step% �
?�1:x1%=MX:y1%=MY
?#�2:rd%=�((MX-x1%)^2+(MY-y1%)^2)
?ȏ x1%,y1%,rd%
? Ȗ:Ȗ:ȏ x1%,y1%,rd%
?**�3:� x1%,y1%:� x1%+rd%,y1%:� &C5,MX,MY
?4-Ȗ:Ȗ:� x1%,y1%:� x1%+rd%,y1%:� &C5,MX,MY
?>*�4:� x1%,y1%:� x1%+rd%,y1%:� &C5,MX,MY
?H�
?R
?\� EllipseFill
?f�23:Ȏ step% �
?p�1:x1%=MX:y1%=MY
?z#�2:rd%=�((MX-x1%)^2+(MY-y1%)^2)
?�ȏ x1%,y1%,rd%
?�Ȗ:Ȗ:ȏ x1%,y1%,rd%
?�*�3:� x1%,y1%:� x1%+rd%,y1%:� &C5,MX,MY
?�-Ȗ:Ȗ:� x1%,y1%:� x1%+rd%,y1%:� &C5,MX,MY
?�*�4:� x1%,y1%:� x1%+rd%,y1%:� &CD,MX,MY
?��
?�
?�� fastcopy
?��24:Ȏ step% �
?��1,2:�getrectangle
?�,�3:MX=(MX � 2)*2:MY=(MY � 4)*4:�copysort
?�ȓ MX,MY,xs%-2,-(ys%+4)
?�!Ȗ:Ȗ:ȓ MX,MY,xs%-2,-(ys%+4)
@�4:
@A%=x1%�2
@B%=255-(y1%�4)
@$C%=xs%�2
@.
D%=-ys%�4
@8E%=MX �2
@BF%=255-(MY �4)+(ys%+4)�4
@LG%=!pm%
@V� putscreenrectangle%
@`�
@j
@t� smearcopy
@~�25:Ȏ step% �
@��1,2:�getrectangle
@��3:px1%=MX:py1%=MY
@��4:� px1%,py1%,MX,MY
@�Ȗ:Ȗ:� px1%,py1%,MX,MY
@�px2%=MX:py2%=MY
@�0�5:� px1%,py1%,px2%,py2%:� MX,MY:� px1%,py1%
@�3Ȗ:Ȗ:� px1%,py1%,px2%,py2%:� MX,MY:� px1%,py1%
@�px3%=MX:py3%=MY
@�<�6:� px1%,py1%,px2%,py2%:� px3%,py3%:� MX,MY:� px1%,py1%
@�?Ȗ:Ȗ:� px1%,py1%,px2%,py2%:� px3%,py3%:� MX,MY:� px1%,py1%
@�px4%=MX:py4%=MY
@��7:
A!�smearscreen(x1%,y1%,xs%,ys%)
A
�
A
A� Parrallogram
A(�26:Ȏ step% �
A2�1:px1%=MX:py1%=MY
A<�2:� px1%,py1%,MX,MY
AFȖ:Ȗ:� px1%,py1%,MX,MY
APpx2%=MX:py2%=MY
AZP�3:� px1%,py1%,px2%,py2%:� MX,MY:� px1%-(px2%-MX),py1%-(py2%-MY):� px1%,py1%
AdSȖ:Ȗ:� px1%,py1%,px2%,py2%:� MX,MY:� px1%-(px2%-MX),py1%-(py2%-MY):� px1%,py1%
AnP�4:� px1%,py1%,px2%,py2%:� MX,MY:� px1%-(px2%-MX),py1%-(py2%-MY):� px1%,py1%
Ax�
A�
A�� Parralogram fill
A��27:Ȏ step% �
A��1:px1%=MX:py1%=MY
A��2:� px1%,py1%,MX,MY
A�Ȗ:Ȗ:� px1%,py1%,MX,MY
A�px2%=MX:py2%=MY
A�P�3:� px1%,py1%,px2%,py2%:� MX,MY:� px1%-(px2%-MX),py1%-(py2%-MY):� px1%,py1%
A�SȖ:Ȗ:� px1%,py1%,px2%,py2%:� MX,MY:� px1%-(px2%-MX),py1%-(py2%-MY):� px1%,py1%
A�*�4:� px1%,py1%:� px2%,py2%:� &75,MX,MY
A��
A�
A�	� Cls
B�28:
B��errorhandle(2,"Do you really wish to clear the screen to the current colour (NOTE You can UNDO afterwards)","CONFIRM",selected)
B� selected=1 �
B"
� liftup%
B,!� colour%:ȓ Ȑ 0,0,1279,1023
B6� liftdown%
B@�
BJ�reset_action
BT�update
B^
Bh!� Filing (Believe it or not!)
Br�29,30,31,32
B|�point(0,1)
B�(errorcheat=!Ac%:filename$=$file_str%
B��reset_action:� uptree%
B�Ȏ errorcheat �
B�:�29:� "SLOAD "+filename$:$sprite_str%=filename$:!pm%=2
B�;�30:� "SMERGE "+filename$:$sprite_str%=filename$:!pm%=2
B��31
B�� liftup%:� undosave%
B�$screen_str%=filename$
B�Ȏ os% �
B�!�1:B%=file_str%:� screenload%
B� :� "SCREENLOAD "+$file_str%
B��
B�
� �<>15 �
Cș "OS_RemoveCursors"
C
Ȏ �(0) �
C�"D","d"
C&#� R=0 � 15:� R,R<<4,R<<4,R<<4:�
C0�"I","i"
C:&� R=0 � 15:� 15-R,R<<4,R<<4,R<<4:�
CD�
CN� �:err%=�
CX� � � err%=�:� �@vC
Cb� convertmode%
Cl$screen_str%=filename$
Cv�15
C�� �
C�cat%!0=148
C�
cat%!4=-1
C�&ș "OS_ReadVduVariables",cat%,cat%
C�!topscreen%=!cat%
C�ș "OS_RemoveCursors"
C�� undorestore%
C�� err% � � �,�$
C��
C�� liftdown%
C� �32:�formula_load(filename$)
C��
C��update
D
D� Function 33 = dummy
D
D � Eval Expression
D*&�34:!putit%=1:�point(0,PNkeyboard)
D4�reset_action:� uptree%
D>(A%=-128:B%=!starty%+56:E%=-1:� help%
DH/A%=-128:B%=!starty%-!sizey-96:E%=-1:� help%
DRstep%=1
D\�
Df4dummy=�instring(32,126,eval$,out$,255):� dummy �
Dp&!starty%-=32:�BUTOFF(7):eval$=out$
Dz5�eval_error_cheat:dummy=�instring(32,126,t$,t$,1)
D��
D�!starty%+=32:�BUTOFF(7)
D�
� � dummy
D�� liftup%:� putbackground%
D��reset_entry
D�
D�� Pattern & Brush get
D��35,36:Ȏ step% �
D��1:ȓ MX-32,MY-32,62,60
D�Ȗ:Ȗ:ȓ MX-32,MY-32,62,60
D�)�2:A%=(MX � 2)-16:B%=255-((MY � 4)+7)
D�
Ȏ !Ac% �
D��35:� brushget%
E�36:� shapeget%
E�
E�
E$
E.� Sprite put
E8�37:� �put_check �
EBȎ step% �
EL.�1:MX=(MX � 2)*2:MY=(MY � 4)*4:�spritesort
EVȓ MX,MY,xs%-2,-(ys%+4)
E`!Ȗ:Ȗ:ȓ MX,MY,xs%-2,-(ys%+4)
Ej�2:�spritesort
EtA%=x1%�2
E~B%=255-(y1%�4)
E�C%=xs%�2
E�
D%=-ys%�4
E�E%=MX �2
E�F%=255-(MY �4)+(ys%+4)�4
E�G%=2
E�� putscreenrectangle%
E��
E��
E�
E�� Get Sprite
E��38:Ȏ step% �
E��1,2:�getrectangle
F�3:�sortcord
F
A%=x1%:B%=y1%:C%=x2%:D%=y2%
F�point(0,0)
F$sprstr%=g_sprite$
F(� getspritefromscreen%
F2�update
F<�
FF
FP� Save Sprites
FZ,�39:� �text_entry(33,$sprite_str%,255) �
Fd1�point(0,1):� "SSAVE "+out$:$sprite_str%=out$
Fn�
Fx�reset_entry
F�
F�� Sprite smear
F��40:� �put_check �
F�Ȏ step% �
F�.�1:MX=(MX � 2)*2:MY=(MY � 4)*4:�spritesort
F�ȓ MX,MY,xs%-2,-(ys%+4)
F�!Ȗ:Ȗ:ȓ MX,MY,xs%-2,-(ys%+4)
F��2:�spritesort
F�� "SCHOOSE "+$sprstr%
F�	� 8,0
F��
F��mouse_handle
F�� &ED,MX,MY
G
� MB=0
G�
G�
G"
G,� Printer Dumps
G6�41
G@�reset_action
GJ*FX 229
GT
� liftup%
G^+A$="SCREENDUMP 0 "+�~(!line_selected-1)
Gh� A$
Gr� liftdown%
G|�update
G�
G�� Delete Sprite
G��42
G�� �sprites �
G�,ș &2E,13,,sprstr%,30,!sprsel% � ,,,leng
G�?(sprstr%+leng+1)=13
G�Z�errorhandle(2,"Do you really wish to delete the sprite "+$sprstr%,"Confirm",selected)
G�� selected=1 �
G��"SDELETE "+$sprstr%
G�+� !sprsel%>�sprites � !sprsel%=�sprites
G�� !sprsel%<1 � !sprsel%=1
G��
G��
H� 7
H�
H�reset_action:�update
H&
H0� oscli
H:�43:
HD�oscliaction
HN�checkdumper
HX
Hb!� Anti aliased text to screen
Hl�44:Ȏ step% �
Hv�1:�getrectangle
H��2:�getrectangle
H��3:�sortcord
H�tint%=((!pc% � 192) >> 2)
H� red%=tint%+((!pc% � 3) << 6)
H�!grn%=tint%+((!pc% � 12) << 4)
H�!blu%=tint%+((!pc% � 48) << 2)
H�tint2%=Ȝ(MX,MY) >> 2
H�back%=�MX,MY)
H�#red2%=tint2%+((back% � 3) << 6)
H�$grn2%=tint2%+((back% � 12) << 4)
H�$blu2%=tint2%+((back% � 48) << 2)
H�FONT$=$presentfont%+�(13)
H�3� 23,25,&FF,15,red2%,grn2%,blu2%,red%,grn%,blu%
IBș "Font_FindFont",,FONT$,320,320,0,0 � roman%  :� ;scrapsizes
I;ș "Font_StringBBox",,atext$ � ,xmin%,ymin%,xmax%,ymax%
I/xsize%=�(xmax%-xmin%):ysize%=�(ymax%-ymin%)
I 0ș "Font_ReadScaleFactor" � ,xscale%,yscale%
I**psizex%=(x2%-x1%)*320/(xsize%/xscale%)
I4*psizey%=(y1%-y2%)*320/(ysize%/yscale%)
I>#xo%=(xmin%/xscale%)*psizex%/320
IH#yo%=(ymin%/yscale%)*psizey%/320
IR:ș "Font_FindFont",,FONT$,psizex%,psizey%,0,0 � roman%
I\2ș "Font_Paint",,atext$,%10000,x1%-xo%,y2%-yo%
If� 63 Ȝ 192
Ip�
Iz
I�� Anti box text to screen
I��45:Ȏ step% �
I��1:
I�FONT$=$presentfont%+�(13)
I�Cș "Font_FindFont",,FONT$,320,320,0,0 � roman%   :� ;scrapsizes
I�;ș "Font_StringBBox",,atext$ � ,xmin%,ymin%,xmax%,ymax%
I�/xsize%=�(xmax%-xmin%):ysize%=�(ymax%-ymin%)
I�0ș "Font_ReadScaleFactor" � ,xscale%,yscale%
I�$xs%=(xsize%/xscale%)*psizex%/320
I�$ys%=(ysize%/yscale%)*psizey%/320
I�#xo%=(xmin%/xscale%)*psizex%/320
I�#yo%=(ymin%/yscale%)*psizey%/320
I�ȓ MX+xo%,MY+yo%,xs%,ys%
J	Ȗ:Ȗ
Jȓ MX+xo%,MY+yo%,xs%,ys%
J�2:
J$tint%=((!pc% � 192) >> 2)
J. red%=tint%+((!pc% � 3) << 6)
J8!grn%=tint%+((!pc% � 12) << 4)
JB!blu%=tint%+((!pc% � 48) << 2)
JLtint2%=Ȝ(MX,MY) >> 2
JVback%=�MX,MY)
J`#red2%=tint2%+((back% � 3) << 6)
Jj$grn2%=tint2%+((back% � 12) << 4)
Jt$blu2%=tint2%+((back% � 48) << 2)
J~3� 23,25,&FF,15,red2%,grn2%,blu2%,red%,grn%,blu%
J�:ș "Font_FindFont",,FONT$,psizex%,psizey%,0,0 � roman%
J�(ș "Font_Paint",,atext$,%10000,MX,MY
J�� 63 Ȝ 192
J��
J�
J�� demo function
J��46
J��reset_action
J���errorhandle(1,"This is a demonstration version of ATELIER so this function has been disabled,|CALL 0392 437756 to order a proper version of ATELIER, the ultimate art package.","||Continue",selected)
J�
J�� Bottle draw
J��47:Ȏ step% �
K�1,2:�getrectangle
K
�3
K� 29,MX;MY;
KF%=-1:� framedraw%
K(	Ȗ:Ȗ
K2� 29,MX;MY;
K<F%=-1:� framedraw%
KF� spin_bottle%
KP�4:�point(0,0)
KZ
�copysort
Kdsteps%=�(ys%)/4-1
KnPT%=(!bolpoint%)-1
KxTL=0:� R%=1 � PT%
K�FL(R%)=�(((�boltx(R%)-�boltx(R%-1))^2+(�bolty(R%)-�bolty(R%-1))^2))
K�TL=TL+L(R%)
K�� R%
K�TLP=TL/(steps%-1)
K�TLP=(TL+TLP-1)/(steps%)
K�� YP%=0 � steps%
K�FL=YP%*TLP:GP%=0:FLB=0
K�
� FL<TL �
K��
K�FLB=FLB+L(GP%)
K�
GP%=GP%+1
K�� FLB>FL
K��
L
GP%=PT%-1
L�
L
GP%=GP%-1
L"� GP%>PT% � GP%=PT%-1
L,� GP%<1 � GP%=1
L6LL=FLB-L(GP%)
L@PL=FL-LL
LJPM=PL/L(GP%)
LTBB%(YP%,0)=(((�boltx(GP%))-(�boltx(GP%-1)))*PM)+(�boltx(GP%-1))
L^<B%(YP%,1)=((�bolty(GP%)-�bolty(GP%-1))*PM)+�bolty(GP%-1)
Lh	� YP%
LrPT%=�(y1%-y2%)
L|ST%=�(xs%)
L�STCM=360/ST%
L�	SB%=0
L�#T1%=0:T2%=steps%-1:TS%=1:y1%+=1
L�6� !bot_lean<=90 � T1%=steps%-1:T2%=0:TS%=-1:y1%-=2
L�6� !bot_lean>270 � T1%=steps%-1:T2%=0:TS%=-1:y1%-=2
L�� BT%=T1% � T2% � TS%
L�wedge%=0
L�X%=B%(BT%,0):Y%=B%(BT%,1)
L�	SC%=0
L�
CT%=-1
L�� !bot_lean<=180 �
L�!deg1=-STCM:deg2=360:degs=STCM
L��
M#deg1=359+STCM:deg2=0:degs=-STCM
M�
M� Cd=deg1 � deg2 � degs*2
M&
CT%=CT%+1
M0� 26
M:
Ȏ !pm% �
MD2�0,1:plt%=�gcol(x2%-(Cd+1)/STCM+2,y1%-BT%*4+4)
MN*�2:plt%=�gcol(x2%-Cd/STCM-1,y1%-BT%*4)
MX�
Mbangle=Cd
Ml?A%=632-((632-X%)*�(botrad$)):B%=Y%:C%=Cd:� translate_point%
MvXD%=!bot_xout:YD%=!bot_yout
M�� 29,MX;MY;     :� origin
M�� SB%>0 � SC%>0 � plt% �
M�� LXD2%,LYD2%
M�� LXD%,LYD%:� &55,XD%,YD%
M��&55,A%(CT%,0),A%(CT%,1)
M��
M�	SC%=1
M�!LXD%=A%(CT%,0):LYD%=A%(CT%,1)
M�LXD2%=XD%:LYD2%=YD%
M�A%(CT%,0)=XD%:A%(CT%,1)=YD%
M�� Cd
M�� UNTIL C%*STCM>360
M�	SB%=1
N	� BT%
N�update
N� 26
N �
N*
N4� Set Mouse Grid
N>)�48:� �text_entry(33,�(mousegrid),15)
NHmousegrid=�(out$)
NR� mousegrid<1 � mousegrid=1
N\	mgs=1
Nf�
Np�reset_entry
Nz
N�� Formula Entry
N� �49:oldform$=formula$:test=�
N�"!putit%=1:�point(0,PNkeyboard)
N��reset_action:� uptree%
N�(A%=-128:B%=!starty%+56:E%=-1:� help%
N�/A%=-128:B%=!starty%-!sizey-96:E%=-1:� help%
N��
N�.go=�instring(32,126,formula$,formula$,255)
N�P%=formnames%
N�num%=?P%:P%+=1
N�F=0
N�test$=""
N�num2%=?P%:P%+=1
O� R=1 � num2%
Otest$=test$+�(?P%)
OP%+=1:�
O$5� formula$=test$ � formula$=formulas$(F-1):� �`JN
O.F+=1
O8� F<num% � � �`rN
OB6� go � �point(0,0):test=�build_formula(formula$,0)
OL� test � � go
OV� � go � formula$=oldform$
O`!formula=0
Oj� liftup%:� putbackground%
Ot�reset_entry
O~
O��50,54,53:Ȏ step% �
O�� FORMULA COPY
O��1,2:�getrectangle
O��3:
O�� 29,MX;MY;
O�F%=-1:� formframedraw%
O�	Ȗ:Ȗ
O�� 29,MX;MY;
O�F%=-1:� formframedraw%
O��4:�copysort
O�)xsteps=720/(xs%/2):ysteps=720/(ys%/4)
O�� !Ac%=53 �
P�point(0,PNcalculator)
P
max=-65536
P
min=65536
P	ofm=0
P(� XD=-360 � 360 � xsteps
P2wedge%=0
P<� YD=360 � -360 � ysteps
PFXR=�(XD)
PPYR=�(YD)
PZ?� !formula=0 � FM=�(formula$) � FM=�(formulas$(!formula-1))
Pd
FD=ofm-FM
Pn � YD<360 � � FD>max � max=FD
Px � YD<360 � � FD<min � min=FD
P�
ofm=FM
P�� YD,XD
P��
P�	YF%=0
P��point(0,0)
P�� YD=360 � -360 � ysteps
P�wedge%=0
P�� XD=-360 � 360 � xsteps
P�XR=�(XD)
P�YR=�(YD)
P�?� !formula=0 � FM=�(formula$) � FM=�(formulas$(!formula-1))
P�'A%=XD:B%=YD:C%=FM:� form_translate%
P�npx%=!bot_xout
Qnpy%=!bot_yout
Q0PX%=((360+XD)/xsteps):PY%=((360+YD)/-ysteps)
Q� 4
Q"� 26
Q,#xp%=x1%+PX%*2-2:yp%=y2%+PY%*4+3
Q6plt%=�gcol(xp%,yp%)
Q@� XD>-360 � YD<360 � plt% �
QJ� !Ac%=53 �
QT-num%=4+(((L(PX%)-FM)-min)/((max-min)/11))
Q^%� num%<4 � num%=4:� testing � � 7
Qh'� num%>15 � num%=15:� testing � � 7
Qr(A%=col%:B%=15-num%:� calc_intensity%
Q|�
Q�� 29,MX;MY;
Q�� nlpx%,nlpy%
Q�'� A%((�(PX%))-1,0),A%((�(PX%))-1,1)
Q�#� &55,A%(�(PX%),0),A%(�(PX%),1)
Q�� &55,npx%,npy%
Q�� !Ac%=54 �
Q�
� colour%
Q�� nlpx%,nlpy%
Q�'� A%((�(PX%))-1,0),A%((�(PX%))-1,1)
Q�� npx%,npy%
Q�� A%(�(PX%),0),A%(�(PX%),1)
Q�� nlpx%,nlpy%
Q��
R�
R
L(PX%)=FM
Rnlpx%=A%(�(PX%),0)
R&nlpy%=A%(�(PX%),1)
R0A%(�(PX%),0)=npx%
R:A%(�(PX%),1)=npy%
RD�
RN� XD
RX	YF%=1
Rb� YD
Rl�update
Rv� 26
R��
R�
R�� Rotate copy
R��51:Ȏ step% �
R��1,2:�getrectangle
R��3:x3%=MX:y3%=MY
R�
�4:�shape
R�Ȗ:Ȗ:�shape
R�$�5:�smearscreen(x1%,y1%,xs%,ys%)
R��
R�
R�� AA text input
R�2�52:� �text_entry(32,atext$,255) � atext$=out$
S�reset_entry
S
S� Save Compacted Screen
S ,�55:� �text_entry(33,$screen_str%,255) �
S*8�point(0,1):�compactedsave(0,out$):$screen_str%=out$
S4�
S>�reset_entry
SH
SR� Set Print Key Command
S\:�56:� �text_entry(32,funcprint$,255) � funcprint$=out$
Sf�reset_entry
Sp
Sz� undo box
S��57:Ȏ step% �
S��1,2:�getrectangle
S��3:�sortcord
S� A%=x1%:B%=y1%:C%=xs%:D%=-ys%
S�� undobox%
S��
S�!step%=1:�reset_action:�update
S��
S�
S�� Save System Screen
S�,�58:� �text_entry(33,$screen_str%,255) �
S�6�point(0,1):� "SCREENSAVE "+out$:$screen_str%=out$
S��
T�reset_entry
T
T� Title Screen
T$�59:Ȏ step% �
T."�1:� �sprites=0 � �titlesprite
T8�2:�reset_action
TB�
TL
TV
� Brushes
T`�60,61,62,63,64,65
TjA%=!Ac%-60
TtȎ !rect_brush_mode �
T~�0:Ȏ step% �
T�)�1:A%=(MX � 2)-16:B%=255-((MY � 4)+8)
T�� brusheor%
T�Ȗ:Ȗ:� brusheor%
T��2:�
T��mouse_handle
T�"B%=MX-32:C%=MY+32:� brushdraw%
T�
� MB=0
T��
T��1:Ȏ step% �
T��1,2:�getrectangle
T��3:�point(0,0)
T�
�sortcord
U$B%=x1%:C%=y1%:D%=xs%�2:E%=-ys%�4
U
� brushdraw%
U�update
U�
U(�2:Ȏ step% �
U2�1:x0%=640:y0%=512
U<'ȏ x0%,y0%,�((MX-x0%)^2+(MY-y0%)^2)
UF	Ȗ:Ȗ
UP'ȏ x0%,y0%,�((MX-x0%)^2+(MY-y0%)^2)
UZR%=�((MX-x0%)^2+(MY-y0%)^2)
Ud�3:�
Un�mouse_handle
Ux(AN=�(�(360)):RO%=�(�(�(80)))*(R%/10)
U�B%=MX+�(AN)*RO%
U�C%=MY+�(AN)*RO%
U�� brushdraw%
U�
� MB=0
U��
U��
U�
U�� Anti aliased squash
U��67:Ȏ step% �
U��1,2:�getrectangle
U��3:x3%=MX:y3%=MY
U��4:ȓ x3%,y3%,MX-x3%,MY-y3%
U�"Ȗ:Ȗ:ȓ x3%,y3%,MX-x3%,MY-y3%
Vx4%=MX:y4%=MY
V�5:�copysort
Vx3%=(x3%�2)*2
V"x4%=(x4%�2)*2
V,y3%=(y3%�4)*4
V6y4%=(y4%�4)*4
V@+� x3%>x4% � temp%=x3%:x3%=x4%:x4%=temp%
VJ+� y4%>y3% � temp%=y4%:y4%=y3%:y3%=temp%
VT!xps%=x4%-x3%+3:yps%=y4%-y3%-7
V^
A%=x1%
Vh
B%=y1%
VrC%=xs%�2
V|
D%=-ys%�4
V�
E%=x3%
V�
F%=y3%
V�
G%=xps%�2
V�H%=-yps%�4
V�� anti_aliased_squash%
V��
V�
V�
� Fuzz
V��68:Ȏ step% �
V��1:x0%=640:y0%=512
V�'ȏ x0%,y0%,�((MX-x0%)^2+(MY-y0%)^2)
V�	Ȗ:Ȗ
V�'ȏ x0%,y0%,�((MX-x0%)^2+(MY-y0%)^2)
WR%=�((MX-x0%)^2+(MY-y0%)^2)
W�3
W�
W&�mouse_handle
W0*AN1=�(�(360)):RO1%=�(�(�(80)))*(R%/10)
W:*AN2=�(�(360)):RO2%=�(�(�(80)))*(R%/10)
WDA%=MX+�(AN1)*RO1%
WNB%=MY+�(AN1)*RO1%
WXC%=MX+�(AN2)*RO2%
WbD%=MY+�(AN2)*RO2%
Wl� swap_pixels%
Wv
� MB=0
W��
W�
W�
� Options
W��69,70,78,79
W�
Ȏ !Ac% �
W��69:select=�
W��70:select=�
W��78:!left_handed=0
W��79:!left_handed=1
W��
W��reset_action
W�
W�� Pixellate
X�71:Ȏ step% �
X�1,2:�getrectangle
X�3:�sortcord
X !gsx%=�(x1%-MX):gsy%=�(y1%-MY)
X*gsx%=(gsx% � 2)*2
X4gsy%=(gsy% � 4)*4
X>� gsx%<4 � gsx%=4
XH� gsy%<8 � gsy%=8
XR�pixgrid
X\	Ȗ:Ȗ
Xf�pixgrid
Xp�4:�point(0,0)
Xz� gy%=y1% � y2% � -gsy%
X�� gx%=x1% � x2% � gsx%
X�sx%=gsx%:sy%=gsy%
X�&� gx%+sx%>x2% � sx%-=gx%+sx%-x2%-2
X�(� gy%-sy%<y2% � sy%-=y2%-(gy%-sy%)-4
X�#A%=gx%:B%=gy%:C%=sx%�2:D%=sy%�4
X�� COLaverage%
X��
X��
X�ȗ ȓ 0,0,1279,1023
X��update
X��
X�
X�� Copy Fill
Y�72:Ȏ step% �
Y�1,2:�getrectangle
Y�3:px%=MX:py%=MY
Y$�4:�copysort:�point(0,0)
Y.� 128+�MX,MY) Ȝ Ȝ(MX,MY)
Y83� !fill_style=0 � !fill_style=3 � !fill_style=2
YBȎ !fill_style �
YL�1,2,3:
YV� bit_map_scan_A%
Y`�&85,MX,MY
Yj(A%=x1%�2:B%=y1%�4:C%=xs%�2:D%=-ys%�4
YtȎ !fill_style �
Y~�1,2:� copy_fill%
Y� �3:� Should be full mapping.
Y��
Y��
Y��update
Y��
Y�
Y�� Save Compacted Sprite
Y�,�73:� �text_entry(33,$screen_str%,255) �
Y�&�point(0,1):�compactedsave(1,out$)
Y�area$=�(xs%*ys%)
Y�!per$=��(cs%/(xs%*ys%)*100),4)
Y��� �(-1) � �errorhandle(1,"Compaction Report|Size: "+�(xs%)+"x"+�(ys%)+"|Area in bytes: "+area$+"|Bytes used: "+�(cs%)+"|Percentage: "+per$," ",selected)
Z$screen_str%=out$
Z
�
Z�reset_entry
Z
Z(� Compacted Get
Z2�74:Ȏ step% �
Z<�1,2:�getrectangle
ZF�3:�sortcord
ZP!com_x1=x1%
ZZ!com_y1=y1%
Zd!com_x2=x2%
Zn!com_y2=y2%
Zx�
Z�
Z�� Mode 15 to 13 convert
Z��75:Ȏ step% �
Z��1,2:�getrectangle
Z�,�3:�sortcord:xs%-=2:ys%+=4:px%=MX:py%=MY
Z�ȓ px%,py%,xs%/2,-ys%
Z�	Ȗ:Ȗ
Z�ȓ px%,py%,xs%/2,-ys%
Z��4:�sortcord
Z�8A%=x1%:B%=y1%:C%=xs%�4:D%=-ys%�4:E%=px%:F%=py%-ys%-4
Z�� COLmode15_13resize%
Z��
Z�
[� Colour Average Area
[�76:Ȏ step% �
[�1,2:�getrectangle
["�3:�sortcord
[,$A%=x1%:B%=y1%:C%=xs%�2:D%=-ys%�4
[6� COLaverage%
[@�
[J
[T� Update Font List
[^�77
[h� fontlistinit%
[r�reset_action
[|
[�� 3 point curve
[��80:Ȏ step% �
[��1:x1%=MX:y1%=MY
[��2:x2%=MX:y2%=MY
[�� x1%,y1%:� x2%,y2%
[�	Ȗ:Ȗ
[�� x1%,y1%:� x2%,y2%
[��3:x3%=MX:y3%=MY
[��curve(20):Ȗ:Ȗ:�curve(20)
[��4:�curve(1)
[��
[�
[�� Bottle Wall Formula
\4�81:� �text_entry(32,botrad$,255) � botrad$=out$
\�reset_entry
\
\&� Undo Brush
\0�82:Ȏ step% �
\:)�1:A%=(MX � 2)-16:B%=255-((MY � 4)+8)
\D� brusheor%
\NȖ:Ȗ:� brusheor%
\X�2:�
\b�mouse_handle
\l&A%=(MX � 2)-16:B%=255-((MY � 4)+8)
\v� brushundo%
\�
� MB=0
\��
\�
\��
\��
\�
\���curve(r%)
\�� &45,x1%,y1%
\�xs%=x1%-x2%:ys%=y1%-y2%
\�-xs2%=(x1%-xs%/2)-x3%:ys2%=(y1%-ys%/2)-y3%
\�
� r%<>1 �
\�	s%=r%
\��
]#� �xs%>�ys% � s%=�xs% � s%=�ys%
]�
]� st=1/s% � 1-1/s% � 1/s%
] %x%=x1%-(xs%*st)-(xs2%*��(st*180))
]*%y%=y1%-(ys%*st)-(ys2%*��(st*180))
]4� &25,x%,y%
]>�
]H� &25,x2%,y2%
]R�
]\
]fݤtext_entry(sl%,in$,len%)
]p
!putit%=1
]z�point(0,PNkeyboard)
]��reset_action:� uptree%
]�(A%=-128:B%=!starty%+56:E%=-1:� help%
]�/A%=-128:B%=!starty%-!sizey-96:E%=-1:� help%
]�step%=1
]�'go=�instring(sl%,126,in$,out$,len%)
]�� liftup%:� putbackground%
]�=go
]�
]���reset_entry
]�&� liftdown%:�5:� helptext%:�update
]��
]�
]���eval_error_cheat
^� �
^!� � � eval$="":�7:t$=�$:� �:�
^9� �(eval$)=126 � t$=�~(�(�eval$,2))) � t$=�(�(eval$))
^$� �
^.�
^8
^B��compactedsave(t%,fn$)
^L� �
^V#� � � � undosave%:� �:� 99,�$:�
^`(�"DefineBuffer "+�(STORE%)+" &28000"
^jȎ t% �
^t*�0:�"Com_Save "+fn$+" 0 0 1279 1023 0"
^~,�1:� ?(flags%+1)=0 � tl%=behind% � tl%=0
^�[�"Com_Save "+fn$+" "+�(!com_x1)+" "+�(!com_y1)+" "+�(!com_x2)+" "+�(!com_y2)+" "+�(tl%)
^��
^�
cs%=10
^�
xs%=10
^�
ys%=10
^�� undosave%
^�� �
^��
^�
^���compressedsave(fn$)
^�� �
^�#� � � � undosave%:� �:� 99,�$:�
_
$cat%=fn$
_
� compactedsave%
_� undosave%
_� �
_(�
_2
_<
��pixgrid
_Fȓ x1%,y1%,xs%,ys%
_P� X%=x1%+gsx% � x2% � gsx%
_Z� X%,y1%,X%,y2%
_d�
_n� Y%=y1%-gsy% � y2% � -gsy%
_x� x1%,Y%,x2%,Y%
_��
_��
_�
_�
ݤsprites
_�� checksprites%
_�	=!OUT
_�
_�ݤput_check
_�� �sprites>0 � =�
_��reset_action
_�t� !Ac%=37 � !Ac%=40 � !Ac%=38:� 99,"No Sprites Present. Unable to Restore Action, Setting Action to Sprite Get."
_�=�
_�
`��titlesprite
`� �
`� � � � �:�
`"$� 52,711:� 274,932:*SGET Diamond
`,	� �:�
`6
`@� formula functions
`J
`T� �radiusR
`^=�(XR^2+YR^2)
`h
`r� �radiusD
`|=�(XD^2+YD^2)
`�
`�� �depth
`�� r%,g%,b%,t%
`�t%=(col% � 192)>> 6
`�r%=t%+(col% � 3)<<2
`�g%=t%+(col% � 12)
`�b%=t%+(col% � 48)>>2
`�	t%=r%
`�� g%>t% � t%=g%
`�� b%>t% � t%=b%
`�
=t%/15
`�
`�� �wedge(up%,down%)
a� col%=up% � wedge%+=1
a� col%=down% � wedge%-=1
a=wedge%
a&
a0"��smearscreen(x1%,y1%,xs%,ys%)
a:
�copysort
aDc1%=(px1%-px4%)
aNc2%=(py1%-py4%)
aX
c3%=(ys%)
ab
c4%=(xs%)
alc5%=(px2%-px1%)
avc6%=(py2%-py1%)
a�c7%=(px3%-px4%)-c5%
a�c8%=(py3%-py4%)-c6%
a��point(0,0)
a�"� yp%=y1% � y1%+ys% � �(ys%)*4
a�
arx%=0
a�"� xp%=x1% � x1%+xs% � �(xs%)*2
a�H� yp%=y1% � A%(arx%,0)=�npx(xp%,yp%):A%(arx%,1)=�npy(xp%,yp%):� �P`b
a�=� arx%=0 � nplx%=�npx(xp%,yp%):nply%=�npy(xp%,yp%):� �PLb
a�plt%=�gcol(xp%-2,yp%+4)
a�
� tx%,ty%
a�� A%(arx%,0),A%(arx%,1)
a�� plt% � � &55,nplx%,nply%
a�+nplx%=�npx(xp%,yp%):nply%=�npy(xp%,yp%)
b� plt% � � &55,nplx%,nply%
b!tx%=A%(arx%,0):ty%=A%(arx%,1)
b%A%(arx%,0)=nplx%:A%(arx%,1)=nply%
b arx%=arx%+1
b*
� xp%,yp%
b4step%=1
b>�
bH�update
bR�
b\
bf� �npx(PX,PY)
bpw1=((PY-y1%)/c3%)
bzw2=((PX-x1%)/c4%)
b�"=px1%-(c1%*w1)+(c5%+c7%*w1)*w2
b�
b�� �npy(PX,PY)
b�"=py1%-(c2%*w1)+(c6%+c8%*w1)*w2
b�
b�� �atn(X,Y)
b�+� �(Y)>0 � A=�(�(X/Y)) � A=90+180*(X<0)
b�� Y<0 � A=A+180
b�=A
b�
b�� �radius(X,Y)
b�=�(X^2+Y^2)
b�
c��shape
cA=�atn(MX-x3%,MY-y3%)
cD=�radius(MX-x3%,MY-y3%)
c$OA1=2*(�(�(�(xs%)/�(ys%))))
c.OA2=180-OA1
c8px1%=x3%+D*�(�(A))
cBpy1%=y3%+D*�(�(A))
cLpx2%=x3%+D*�(�(A+OA1))
cVpy2%=y3%+D*�(�(A+OA1))
c`px3%=x3%+D*�(�(A+OA1+OA2))
cjpy3%=y3%+D*�(�(A+OA1+OA2))
ctpx4%=x3%+D*�(�(A-OA2))
c~py4%=y3%+D*�(�(A-OA2))
c�� px1%,py1%
c�	� 3,3
c�� px2%,py2%
c�
� 3,63
c�� px3%,py3%
c�� px4%,py4%
c�� px1%,py1%
c��
c�
c�� �formx(xpos,ypos,upval)
c�rd=�radius(xpos,ypos)
c�an=�(�atn(xpos,ypos))
dan=an+offset
d
=mx%+�(an)*rd*(xs2%/720)
d
d� �formy(xpos,ypos,upval)
d(2=my%+�(an)*rd*(ys2%/720)*�(lean)+upval*�(lean)
d2
d<� �boltx(A)
dF=!(xget%+A*4)
dP� �bolty(A)
dZ=!(yget%+A*4)
dd
dn��oscliaction
dx� �
d�*POINTER 0
d�*FX 4,0
d�
*FX 229,0
d�ș "OS_RestoreCursors"
d��reset_action
d��setsoftkeys
d�
� uptree%
d��
d�� � � �:� �$
d��
d�
� "*"out$
d�#� �out$,8)<>"MENU OFF" � � out$
d�+� �out$,8)="MENU OFF" � �<>15 � out$=""
e� �<>15 � � 15
e
*FX 229,1
eș "OS_RemoveCursors"
e"!putit%=1:� putbackground%
e,� �
e6� VDU 21
e@*FX 4,1
eJ�unsetsoftkeys
eT�point(0,0)
e^&� �out$,8)="MENU OFF" � � �out$,9)
eh-� �<>15 � � 15:!putit%=1:� putbackground%
er� liftdown%
e|�update
e��
e�
e���dumpererror
e�P%=!printmenu%
e�	[OPT0
e�EQUS"< Printer Dumps"
e�EQUB1:EQUB255
e�&EQUS"Not Installed":EQUB 0:EQUB 33
e�]
e��
e�
e���checkdumper
e�� �
f� � � �dumpererror:� �:�
fP%=!printmenu%
f � ("SCREENDUMPIDS &"+�~(P%))
f&� �
f0�
f:
fD��getrectangle
fNȎ step% �
fX�1:x1%=MX:y1%=MY
fb�2:ȓ x1%,y1%,MX-x1%,MY-y1%
fl"Ȗ:Ȗ:ȓ x1%,y1%,MX-x1%,MY-y1%
fvxs%=MX-x1%:ys%=MY-y1%
f�x2%=MX:y2%=MY
f��
f��
f�
f���sortcord
f�x1%=(x1%�2)*2
f�x2%=(x2%�2)*2
f�y1%=(y1%�4)*4
f�y2%=(y2%�4)*4
f�+� x1%>x2% � temp%=x1%:x1%=x2%:x2%=temp%
f�+� y2%>y1% � temp%=y2%:y2%=y1%:y1%=temp%
f�xs%=x2%-x1%+3:ys%=y2%-y1%-7
f��
g
g� �gcol(xp%,yp%)
g� !pm%<>2 �
g � �xp%,yp%) Ȝ Ȝ(xp%,yp%)
g*col%=�xp%,yp%)+Ȝ(xp%,yp%)
g4=�
g>�
gHA%=xp%�2:B%=(-ys%-yp%)�4
gR� spritepix%
g\col%=!RESULTX
gf=!spritemask
gp�
gz
g���spritesort
g�� spriteinit%
g�x1%=0:y1%=4*!sprint_ysize
g�xs%=2*!sprint_xsize
g�ys%=-4*!sprint_ysize
g�x2%=xs%
g�	y2%=0
g��
g�
g���copysort
g�wedge%=0
g�
Ȏ !pm% �
g��0,1:� solid,pattern
h
�sortcord
h�2:� sprite
h�spritesort
h$�
h.�
h8
hB)ݤinstring(min,max,in$,� out$,length)
hLl%=!sizex/8-2
hV*FX 4,1
h`
*FX 229,1
hjOMX=-1:OMY=-1
ht XP=!startx%+6:YP=!starty%-48
h~� XP,YP:� 5
h�=out$=in$:posit%=�(out$)+1:of%=posit%-l%+1:� of%<1 � of%=1
h�� 0,5 Ȝ 64:�">";
h��
h�� XP+16,YP:
h�+� 0,(BACKCOL% � 63) Ȝ (BACKCOL% � 192)
h���l%,�(255))
h�+� 0,(textcol% � 63) Ȝ (textcol% � 192)
h�� XP+16,YP:�out$,of%,l%)
h�� 3,63 Ȝ 192
h�(ȓ Ȑ XP+(posit%-of%+1)*16,YP,16,-28
h��
h�ȗ DX,DY,MB
i.� DX<>OMX � DY<>OMY � �point(0,PNkeyboard)
i
A$=�(0)
i� A$<>"" � *POINTER 0
i� A$<>"" � MB>0
i(OMX=DX:OMY=DY
i2(ȓ Ȑ XP+(posit%-of%+1)*16,YP,16,-28
i<� XP+16,YP
iF-i$="":� �(A$)>min-1 � �(A$)<max+1 � i$=A$
iP� �(A$)=163 � i$=A$
iZ'� �(A$)=21 � out$="":of%=1:posit%=1
id#� �(out$)=length � i$<>"" � � 7
inU� i$<>"" � �(out$)<length � out$=�out$,posit%-1)+A$+�out$,posit%):posit%=posit%+1
ix� �(A$)=127 �
i�I� posit%>1 � out$=�out$,posit%-2)+�out$,posit%):posit%=posit%-1 � � 7
i��
i�!� �(A$)=136 � posit%=posit%-1
i�!� �(A$)=137 � posit%=posit%+1
i� � (posit%-of%+1)>l% � of%+=1
i�#� (posit%-of%)<4 � of%=posit%-4
i�� of%<1 � of%=1
i�� posit%<1 � posit%=1
i�)� posit%>�(out$)+1 � posit%=�(out$)+1
i�� �(A$)=27 � =�
i�� MB=1 � =�
i�� �(A$)=13 � MB=4
i�� 4:*FX 4,0
j=� (�(out$)=0)
j
j��setcol
j"+� 0,(textcol% � 63) Ȝ (textcol% � 192)
j,/� 0,128+(BACKCOL% � 63) Ȝ (BACKCOL% � 192)
j6�
j@
jJ��point(L,N)
jTP%=PO%+N*267
j^&ș &400D8,2,P%+11,32,32,P%?9,P%?10
jhȗ � 1,P%?0,P%?1,P%?2
jrȗ � 2,P%?3,P%?4,P%?5
j|ȗ � 3,P%?6,P%?7,P%?8
j�� "FX 106,"+�(2 � L<<7)
j��
j�
j�� �build_formula(A$,pos%)
j�/� A$=eval of the formula,pos=formula number
j�� �
j�� � � � �:=�
j�� Y%=0 � 20
j�� X%=0 � 20
j�XD=X%*36-360
j�YD=Y%*36-360
j�XR=�(XD):YR=�(YD)
j�A=(�(A$)<<8)
k%!(skel%+pos%*1764+(X%+21*Y%)*4)=A
k�
k�
k&� �
k0=�
k:
kD��formula_load(filename$)
kN(� reads and descifers a formula list
kX(ș "OS_Find",&40,filename$ � handle%
kbformulas%=1
klP%=formnames%
kv
[OPT 0
k�
EQUB 7
k�EQUB 10
k�EQUS "Defineable"
k�]
k�.name$="":formulas$(formulas%-1)="":past%=�
k��
k�4ș "OS_GBPB",4,handle%,log_scale%,1 � ,,,finish%
k�&b%=?log_scale%:cr%=(b%=10 � b%=13)
k�� cr% �
k�
� past% �
k�o� �build_formula(formulas$(formulas%-1),formulas%) � ?P%=�(name$):P%+=1:$P%=name$:P%+=�(name$):formulas%+=1
k��
k�.name$="":formulas$(formulas%-1)="":past%=�
l�
l+� past% � formulas$(formulas%-1)+=�(b%)
l� b%=�("$") � past%=�
l � � past% � name$+=�(b%)
l*�
l4� finish%=1
l>?formnames%=formulas%
lHș "OS_Find",&00,handle%
lR�
l\
lf��update
lp+� (mgs � mousegrid>2) � mcs � l=1 � l=0
lz
Ȏ !Ac% �
l��12:�point(l,PNglass)
l�(�13:�point(l,PNflood):� mousecolour%
l�.�21,33,34:�point(l,PNspray):� mousecolour%
l��37,38:�point(l,PNspriteop)
l��31,32,35:�point(l,PNbrush)
l��41:�point(0,PNspray)
l��59:�point(l,PNA)
l�':�point(l,PNnormal):� mousecolour%
l��
l��
l�
l���error_at
l�� 26
m� �=17 �
mstep%=1:�point(0,PNstopped)
m� liftdown%
m$� R%=0 � 20000:�
m.�update
m8�
mB�
mL-� !lastmenu=12 � !lastmenu=30 � � uptree%
mV� 7
m`Ȏ testing �
mjFɣ:�errorhandle(1,"An Error Has Occured,|"+�$,"Continue",selected)
mtuɹ:�errorhandle(3,"An Error Has Occured,|"+�$+"|At line "+�(�),"Edit This Line|Edit Last Line|Continue",selected)
m~*FX 15,0
m�7� selected=1 � �string_to_buffer("ED. "+�(�)+�(13))
m�2� selected=2 � �string_to_buffer("ED.."+�(13))
m�!� selected=1 � selected=2 � �
m��
m�step%=1
m�;� !lastmenu<>1 � !lastmenu<>9 � !presentmenu%=!lastmenu
m��
m�
m�2��errorhandle(N,message$,question$,� selected)
m�(� �<>15 � � 15:ș "OS_RemoveCursors"
m�*FX229,1
m��point(0,PNquestion)
nȗ ȓ 256,331,768,372
n
A%=N:� draw_error_box%
n� 28,32,19,59,12
n-� 128+(BACKCOL% � 63) Ȝ (BACKCOL% � 192)
n()� (textcol% � 63) Ȝ (textcol% � 192)
n2�strhandle(message$)
n<ș "OS_PrettyPrint",BUFF%
nF� 63 Ȝ 192
nP�0,5);
nZ�strhandle(question$+" ?")
ndș "OS_PrettyPrint",BUFF%
nn�BUTOFF(7)
nx�
n�ȗ DX,DY,ChB
n�n� ChB>0 � DX>308 � DX<463 � DY<653 � DY>516 � ChB<>2 � !presentmenu%=0:!lastmenu=0:ChB=2:!treepos=0:!Ac%=0
n�9� ChB=2 � (ChB>0 � DX>300 � DX<474 � DY<484 � DY>368)
n��BUTOFF(7)
n�� undorestore%
n��update
n�� liftdown%
n��5:� helptext%
n�F%=step%:� helpstep%
n� selected=�((484-DY)/120*N)+1
n�#� ChB=2 � enter%=10:selected=-1
n��
n�
o��strhandle(string$)
oout$=""
o� R=1 � �(string$)
o"ch$=�string$,R,1)
o,� ch$="|" � ch$=�(13)
o6out$=out$+ch$
o@�
oJ$BUFF%=out$+�(0)
oT�
o^
oh��setlimits(LMX,LMY)
ormrctx1%=-LMX+2
o|mrcty1%=-LMY+4
o�mrctx2%=1277+LMX
o�mrcty2%=1019+LMY
o��
�
00000000  0d 00 0a 1c f4 3e 20 3c  41 74 65 6c 69 65 72 24  |.....> <Atelier$|
00000010  44 69 72 3e 2e 41 74 65  6c 69 65 72 0d 00 14 33  |Dir>.Atelier...3|
00000020  f4 20 20 42 79 20 53 69  6d 6f 6e 20 43 6c 61 79  |.  By Simon Clay|
00000030  20 43 6f 70 79 72 69 67  68 74 20 28 63 29 20 53  | Copyright (c) S|
00000040  69 6d 6f 6e 20 43 6c 61  79 2c 20 31 39 38 39 0d  |imon Clay, 1989.|
00000050  00 1e 18 3a 20 20 20 20  76 65 72 73 69 6f 6e 24  |...:    version$|
00000060  3d 22 31 2e 30 32 22 0d  00 28 04 0d 00 32 04 0d  |="1.02"..(...2..|
00000070  00 3c 17 ee 85 3a f2 65  72 72 6f 72 28 9f 2c f6  |.<...:.error(.,.|
00000080  24 2c 9e 2c b9 29 0d 00  46 09 f2 69 6e 69 74 0d  |$,.,.)..F..init.|
00000090  00 50 1f ee 85 3a f2 65  72 72 6f 72 28 9f 2c f6  |.P...:.error(.,.|
000000a0  24 2c 9e 2c a3 29 3a f2  72 65 70 6f 72 74 0d 00  |$,.,.):.report..|
000000b0  5a 0e f2 6e 6f 72 6d 70  6f 69 6e 74 0d 00 64 60  |Z..normpoint..d`|
000000c0  e7 20 a4 6f 6b 66 69 6c  65 5f 61 74 28 73 74 61  |. .okfile_at(sta|
000000d0  72 74 5f 66 69 6c 65 24  2c 2d 31 2c 73 74 61 72  |rt_file$,-1,star|
000000e0  74 5f 74 25 29 20 8c 20  74 25 3d 73 74 61 72 74  |t_t%) . t%=start|
000000f0  5f 74 25 3a 73 74 61 72  74 5f 74 25 3d 2d 31 3a  |_t%:start_t%=-1:|
00000100  f2 6c 6f 61 64 66 69 6c  65 28 73 74 61 72 74 5f  |.loadfile(start_|
00000110  66 69 6c 65 24 2c 2d 31  2c 74 25 29 0d 00 6e 04  |file$,-1,t%)..n.|
00000120  0d 00 78 05 f5 0d 00 82  28 c8 99 20 22 57 69 6d  |..x.....(.. "Wim|
00000130  70 5f 50 6f 6c 6c 49 64  6c 65 22 2c 2c 71 25 2c  |p_PollIdle",,q%,|
00000140  31 45 39 20 b8 20 72 65  61 73 6f 6e 25 0d 00 8c  |1E9 . reason%...|
00000150  15 f2 72 65 73 70 6f 6e  64 28 72 65 61 73 6f 6e  |..respond(reason|
00000160  25 29 0d 00 96 0a fd 71  75 69 74 25 0d 00 a0 09  |%).....quit%....|
00000170  f2 71 75 69 74 0d 00 aa  05 e0 0d 00 b4 04 0d 00  |.quit...........|
00000180  be 16 dd f2 72 65 73 70  6f 6e 64 28 72 65 61 73  |....respond(reas|
00000190  6f 6e 25 29 0d 00 c8 0e  f2 77 61 69 74 70 6f 69  |on%).....waitpoi|
000001a0  6e 74 0d 00 d2 0e c8 8e  72 65 61 73 6f 6e 25 ca  |nt......reason%.|
000001b0  0d 00 dc 07 c9 30 3a 0d  00 e6 07 c9 31 3a 0d 00  |.....0:.....1:..|
000001c0  f0 39 c9 32 3a f2 6f 70  65 6e 28 21 71 25 2c 71  |.9.2:.open(!q%,q|
000001d0  25 21 34 2c 71 25 21 38  2c 71 25 21 31 32 2c 71  |%!4,q%!8,q%!12,q|
000001e0  25 21 31 36 2c 71 25 21  32 30 2c 71 25 21 32 34  |%!16,q%!20,q%!24|
000001f0  2c 71 25 21 32 38 29 0d  00 fa 13 c9 33 3a f2 63  |,q%!28).....3:.c|
00000200  6c 6f 73 65 77 28 21 71  25 29 0d 01 04 07 c9 34  |losew(!q%).....4|
00000210  3a 0d 01 0e 07 c9 35 3a  0d 01 18 2e c9 36 3a f2  |:.....5:.....6:.|
00000220  6d 6f 75 73 65 28 21 71  25 2c 71 25 21 34 2c 71  |mouse(!q%,q%!4,q|
00000230  25 21 38 2c 71 25 21 31  32 2c 71 25 21 31 36 2c  |%!8,q%!12,q%!16,|
00000240  71 25 21 32 30 29 0d 01  22 0f c9 37 3a f2 65 6e  |q%!20).."..7:.en|
00000250  64 64 72 61 67 0d 01 2c  07 c9 38 3a 0d 01 36 12  |ddrag..,..8:..6.|
00000260  c9 39 3a f2 6d 65 6e 75  73 65 6c 65 63 74 0d 01  |.9:.menuselect..|
00000270  40 07 c9 31 30 0d 01 4a  07 c9 31 31 0d 01 54 07  |@..10..J..11..T.|
00000280  c9 31 32 0d 01 5e 12 c9  31 37 2c 31 38 3a f2 75  |.12..^..17,18:.u|
00000290  6d 65 73 73 31 0d 01 68  0f c9 31 39 3a f2 75 6d  |mess1..h..19:.um|
000002a0  65 73 73 32 0d 01 72 05  cb 0d 01 7c 0e f2 6e 6f  |ess2..r....|..no|
000002b0  72 6d 70 6f 69 6e 74 0d  01 86 05 e1 0d 01 90 04  |rmpoint.........|
000002c0  0d 01 9a 15 dd f2 71 75  69 74 3a f2 6e 6f 72 6d  |......quit:.norm|
000002d0  70 6f 69 6e 74 0d 01 a4  13 e7 a4 64 65 62 75 67  |point......debug|
000002e0  3a f2 74 69 64 79 3a e0  0d 01 ae 32 24 71 25 3d  |:.tidy:....2$q%=|
000002f0  22 54 41 53 4b 22 3a c8  99 20 22 57 69 6d 70 5f  |"TASK":.. "Wimp_|
00000300  43 6c 6f 73 65 44 6f 77  6e 22 2c 74 61 73 6b 68  |CloseDown",taskh|
00000310  61 6e 64 6c 65 25 2c 21  71 25 0d 01 b8 06 c8 98  |andle%,!q%......|
00000320  0d 01 c2 04 0d 01 cc 0a  dd f2 69 6e 69 74 0d 01  |..........init..|
00000330  d6 1b de 20 71 25 20 32  35 30 30 2c 20 77 6f 72  |... q% 2500, wor|
00000340  6b 62 75 66 25 20 31 30  30 0d 01 e0 13 61 70 70  |kbuf% 100....app|
00000350  6c 24 3d 22 41 74 65 6c  69 65 72 22 0d 01 ea 0c  |l$="Atelier"....|
00000360  f2 66 69 6e 64 6d 6f 73  0d 01 f4 18 77 61 69 74  |.findmos....wait|
00000370  65 72 25 3d 30 3a f2 77  61 69 74 70 6f 69 6e 74  |er%=0:.waitpoint|
00000380  0d 01 fe 0d 74 65 73 74  69 6e 67 3d a3 0d 02 08  |....testing=....|
00000390  43 e7 20 6f 73 25 3d 32  20 8c 20 c8 99 20 22 4f  |C. os%=2 . .. "O|
000003a0  53 5f 47 65 74 45 6e 76  22 20 b8 20 53 41 24 3a  |S_GetEnv" . SA$:|
000003b0  e7 20 c1 53 41 24 2c 37  2c 35 29 3c 3e 22 2d 71  |. .SA$,7,5)<>"-q|
000003c0  75 69 74 22 20 8c 20 74  65 73 74 69 6e 67 3d b9  |uit" . testing=.|
000003d0  0d 02 12 0c f2 69 6e 69  74 5f 61 74 0d 02 1c 0d  |.....init_at....|
000003e0  f2 63 68 65 63 6b 6d 6f  73 0d 02 26 0c 2a 66 78  |.checkmos..&.*fx|
000003f0  32 32 39 2c 31 0d 02 30  10 77 69 6d 70 73 61 76  |229,1..0.wimpsav|
00000400  65 64 25 3d a3 0d 02 3a  24 76 25 3d a4 69 6e 69  |ed%=...:$v%=.ini|
00000410  74 77 69 6d 70 3a e7 76  25 3c 31 38 30 3a eb 31  |twimp:.v%<180:.1|
00000420  32 3a f2 65 72 72 28 32  29 0d 02 44 29 71 75 69  |2:.err(2)..D)qui|
00000430  74 25 3d a3 3a 64 69 61  6c 6f 67 75 65 25 3d 2d  |t%=.:dialogue%=-|
00000440  31 45 39 3a 73 74 6f 70  72 65 61 73 6f 6e 25 3d  |1E9:stopreason%=|
00000450  2d 31 0d 02 4e 1c 61 63  6b 70 65 6e 64 69 6e 67  |-1..N.ackpending|
00000460  25 3d a3 3a 61 63 6b 72  65 66 25 3d 2d 31 0d 02  |%=.:ackref%=-1..|
00000470  58 1b 64 72 61 67 72 65  61 73 6f 6e 25 3d 2d 31  |X.dragreason%=-1|
00000480  3a 68 65 6c 70 24 3d 22  22 0d 02 62 12 73 61 76  |:help$=""..b.sav|
00000490  65 72 65 61 73 6f 6e 25  3d 2d 31 0d 02 6c 1d f2  |ereason%=-1..l..|
000004a0  64 65 66 77 73 3a f2 64  65 66 6d 65 6e 75 73 3a  |defws:.defmenus:|
000004b0  f2 76 65 72 73 69 6f 6e  0d 02 76 10 63 68 65 63  |.version..v.chec|
000004c0  6b 72 65 66 25 3d 2d 31  0d 02 80 18 61 73 24 3d  |kref%=-1....as$=|
000004d0  22 41 72 65 20 79 6f 75  20 73 75 72 65 20 3f 22  |"Are you sure ?"|
000004e0  0d 02 8a 0c f2 62 61 72  69 63 6f 6e 0d 02 94 14  |.....baricon....|
000004f0  f4 20 66 69 6e 64 20 73  74 61 72 74 20 62 69 74  |. find start bit|
00000500  0d 02 9e 1e 73 74 61 72  74 5f 66 69 6c 65 24 3d  |....start_file$=|
00000510  22 22 3a 73 74 61 72 74  5f 74 25 3d 2d 31 0d 02  |"":start_t%=-1..|
00000520  a8 07 ea 20 85 0d 02 b2  2b ee 20 85 20 ea 20 73  |... ....+. . . s|
00000530  74 61 72 74 5f 66 69 6c  65 24 3d 22 22 3a 73 74  |tart_file$="":st|
00000540  61 72 74 5f 74 25 3d 2d  31 3a e5 20 8d 54 7e 43  |art_t%=-1:. .T~C|
00000550  0d 02 bc 1d c8 99 20 22  4f 53 5f 47 65 74 45 6e  |...... "OS_GetEn|
00000560  76 22 20 b8 20 72 30 2c  72 31 2c 72 32 0d 02 c6  |v" . r0,r1,r2...|
00000570  09 41 24 3d 22 22 0d 02  d0 26 e7 20 3f 72 30 3c  |.A$=""...&. ?r0<|
00000580  3e 30 20 8c 20 41 24 2b  3d bd 28 3f 72 30 29 3a  |>0 . A$+=.(?r0):|
00000590  72 30 2b 3d 31 3a e5 20  8d 64 50 42 0d 02 da 2d  |r0+=1:. .dPB...-|
000005a0  e7 20 a7 41 24 2c 22 20  22 29 3c 3e 30 20 8c 20  |. .A$," ")<>0 . |
000005b0  41 24 3d c1 41 24 2c a7  41 24 2c 22 20 22 29 2b  |A$=.A$,.A$," ")+|
000005c0  31 29 3a e5 20 8d 64 5a  42 0d 02 e4 0e e7 20 41  |1):. .dZB..... A|
000005d0  24 3c 3e 22 22 20 8c 0d  02 ee 20 c8 99 20 22 4f  |$<>"" .... .. "O|
000005e0  53 5f 46 69 6c 65 22 2c  35 2c 41 24 20 b8 20 72  |S_File",5,A$ . r|
000005f0  30 2c 72 31 2c 72 32 0d  02 f8 0c e7 20 72 30 3d  |0,r1,r2..... r0=|
00000600  31 20 8c 0d 03 02 3e e7  20 28 28 72 32 20 80 20  |1 ....>. ((r2 . |
00000610  26 46 46 46 30 30 30 30  30 29 3d 26 46 46 46 30  |&FFF00000)=&FFF0|
00000620  30 30 30 30 29 20 8c 20  73 74 61 72 74 5f 74 25  |0000) . start_t%|
00000630  3d 28 72 32 20 80 20 26  46 46 46 30 30 29 3e 3e  |=(r2 . &FFF00)>>|
00000640  38 0d 03 0c 12 73 74 61  72 74 5f 66 69 6c 65 24  |8....start_file$|
00000650  3d 41 24 0d 03 16 05 cd  0d 03 20 05 cd 0d 03 2a  |=A$....... ....*|
00000660  05 cd 0d 03 34 13 f4 20  65 6e 64 20 73 74 61 72  |....4.. end star|
00000670  74 20 62 69 74 0d 03 3e  05 e1 0d 03 48 04 0d 03  |t bit..>....H...|
00000680  52 0d dd f2 76 65 72 73  69 6f 6e 0d 03 5c 2f ea  |R...version..\/.|
00000690  54 24 3a 54 24 3d 76 65  72 73 69 6f 6e 24 3a e7  |T$:T$=version$:.|
000006a0  ac a4 70 72 6f 64 3a 54  24 2b 3d 22 20 2a 55 4e  |..prod:T$+=" *UN|
000006b0  46 49 4e 49 53 48 45 44  2a 22 0d 03 66 1c f2 73  |FINISHED*"..f..s|
000006c0  65 74 69 28 77 5f 70 69  6e 66 6f 25 2c 34 2c 22  |eti(w_pinfo%,4,"|
000006d0  76 22 2b 54 24 29 0d 03  70 05 e1 0d 03 7a 04 0d  |v"+T$)..p....z..|
000006e0  03 84 2c dd a4 70 72 6f  64 3d c1 76 65 72 73 69  |..,..prod=.versi|
000006f0  6f 6e 24 2c a7 76 65 72  73 69 6f 6e 24 2c 22 2e  |on$,.version$,".|
00000700  22 29 2b 31 2c 31 29 3d  22 30 22 0d 03 8e 1b dd  |")+1,1)="0".....|
00000710  a4 64 65 62 75 67 3d ac  a4 70 72 6f 64 20 80 a6  |.debug=..prod ..|
00000720  2d 31 80 a6 2d 32 0d 03  98 04 0d 03 a2 0e dd a4  |-1..-2..........|
00000730  69 6e 69 74 77 69 6d 70  0d 03 ac 45 24 71 25 3d  |initwimp...E$q%=|
00000740  22 54 41 53 4b 22 3a c8  99 20 22 57 69 6d 70 5f  |"TASK":.. "Wimp_|
00000750  49 6e 69 74 69 61 6c 69  73 65 22 2c 32 30 30 2c  |Initialise",200,|
00000760  21 71 25 2c 22 41 74 65  6c 69 65 72 22 b8 21 71  |!q%,"Atelier".!q|
00000770  25 2c 74 61 73 6b 68 61  6e 64 6c 65 25 0d 03 b6  |%,taskhandle%...|
00000780  08 3d 21 71 25 0d 03 c0  04 0d 03 ca 0a dd f2 74  |.=!q%..........t|
00000790  69 64 79 0d 03 d4 0e f2  6e 6f 72 6d 70 6f 69 6e  |idy.....normpoin|
000007a0  74 0d 03 de 13 ef 34 3a  f1 8a 30 2c 32 29 3b 3a  |t.....4:..0,2);:|
000007b0  2a 66 78 34 0d 03 e8 0c  2a 66 78 32 32 35 2c 31  |*fx4....*fx225,1|
000007c0  0d 03 f2 0a 2a 66 78 32  32 39 0d 03 fc 11 ee 85  |....*fx229......|
000007d0  3a f6 3a f1 22 20 22 3b  9e 3a e0 0d 04 06 05 e1  |:.:." ";.:......|
000007e0  0d 04 10 04 0d 04 1a 0d  dd f2 62 61 72 69 63 6f  |..........barico|
000007f0  6e 0d 04 24 2a 21 71 25  3d 2d 31 3a 71 25 21 34  |n..$*!q%=-1:q%!4|
00000800  3d 30 3a 71 25 21 38 3d  30 3a 71 25 21 31 32 3d  |=0:q%!8=0:q%!12=|
00000810  36 34 3a 71 25 21 31 36  3d 36 38 0d 04 2e 2d 71  |64:q%!16=68...-q|
00000820  25 21 32 30 3d 25 31 31  30 30 30 30 30 30 30 30  |%!20=%1100000000|
00000830  30 30 31 30 3a 24 28 71  25 2b 32 34 29 3d 22 21  |0010:$(q%+24)="!|
00000840  41 74 65 6c 69 65 72 22  0d 04 38 24 c8 99 22 57  |Atelier"..8$.."W|
00000850  69 6d 70 5f 43 72 65 61  74 65 49 63 6f 6e 22 2c  |imp_CreateIcon",|
00000860  2c 71 25 b8 62 61 72 69  63 6f 6e 25 0d 04 42 05  |,q%.baricon%..B.|
00000870  e1 0d 04 4c 04 0d 04 56  21 dd f2 65 72 72 6f 72  |...L...V!..error|
00000880  28 65 72 72 25 2c 65 72  72 24 2c 65 72 6c 25 2c  |(err%,err$,erl%,|
00000890  71 75 69 74 25 29 0d 04  60 2e f2 6e 6f 72 6d 70  |quit%)..`..normp|
000008a0  6f 69 6e 74 3a 64 72 61  67 72 65 61 73 6f 6e 25  |oint:dragreason%|
000008b0  3d 2d 31 3a 40 25 3d 26  39 30 41 3a 2a 66 78 32  |=-1:@%=&90A:*fx2|
000008c0  32 39 2c 31 0d 04 6a 10  ea 69 25 2c 65 25 2c 74  |29,1..j..i%,e%,t|
000008d0  24 2c 54 24 0d 04 74 1d  e7 a4 64 65 62 75 67 3a  |$,T$..t...debug:|
000008e0  65 72 72 24 2b 3d 22 20  28 22 2b c3 9e 2b 22 29  |err$+=" ("+..+")|
000008f0  22 0d 04 7e 06 ea 85 0d  04 88 18 ee 85 ea 3a f2  |"..~..........:.|
00000900  65 72 72 6f 72 28 9f 2c  f6 24 2c 9e 2c b9 29 0d  |error(.,.$,.,.).|
00000910  04 92 39 21 71 25 3d 65  72 72 25 3a 24 28 71 25  |..9!q%=err%:$(q%|
00000920  2b 34 29 3d 65 72 72 24  3a c8 99 22 57 69 6d 70  |+4)=err$:.."Wimp|
00000930  5f 52 65 70 6f 72 74 45  72 72 6f 72 22 2c 71 25  |_ReportError",q%|
00000940  2c 31 2c 61 70 70 6c 24  0d 04 9c 10 e7 71 75 69  |,1,appl$.....qui|
00000950  74 25 3a f2 71 75 69 74  0d 04 a6 05 e1 0d 04 b0  |t%:.quit........|
00000960  04 0d 04 ba 2a dd f2 72  65 70 6f 72 74 3a e7 a4  |....*..report:..|
00000970  64 65 62 75 67 3a ef 34  3a f6 3a f1 22 20 40 20  |debug:.4:.:." @ |
00000980  22 3b 9e 3a f2 74 69 64  79 3a e0 0d 04 c4 05 e1  |";.:.tidy:......|
00000990  0d 04 ce 04 0d 04 d8 09  dd a4 64 69 72 0d 04 e2  |..........dir...|
000009a0  20 ea 54 24 3a 54 24 3d  a4 41 72 66 56 61 72 28  | .T$:T$=.ArfVar(|
000009b0  61 70 70 6c 24 2b 22 24  44 69 72 22 29 0d 04 ec  |appl$+"$Dir")...|
000009c0  1d e7 54 24 3d 22 22 3a  54 24 3d 22 26 2e 21 22  |..T$="":T$="&.!"|
000009d0  2b 61 70 70 6c 24 2b 22  2e 22 0d 04 f6 16 e7 c2  |+appl$+"."......|
000009e0  54 24 29 3c 3e 22 2e 22  3a 54 24 2b 3d 22 2e 22  |T$)<>".":T$+="."|
000009f0  0d 05 00 07 3d 54 24 0d  05 0a 04 0d 05 14 10 dd  |....=T$.........|
00000a00  a4 41 72 66 56 61 72 28  41 24 29 0d 05 1e 06 ea  |.ArfVar(A$).....|
00000a10  85 0d 05 28 0d ee 85 ea  f7 85 3a 3d 22 22 0d 05  |...(......:=""..|
00000a20  32 22 c8 99 26 32 33 2c  41 24 2c 77 6f 72 6b 62  |2"..&23,A$,workb|
00000a30  75 66 25 2c 32 30 30 2c  30 2c 33 b8 2c 2c 4c 25  |uf%,200,0,3.,,L%|
00000a40  0d 05 3c 1d 77 6f 72 6b  62 75 66 25 3f 4c 25 3d  |..<.workbuf%?L%=|
00000a50  31 33 3a 3d 24 77 6f 72  6b 62 75 66 25 0d 05 46  |13:=$workbuf%..F|
00000a60  04 0d 05 50 0c dd f2 75  6d 65 73 73 31 0d 05 5a  |...P...umess1..Z|
00000a70  2d 72 65 66 25 3d 71 25  21 38 3a 74 61 73 6b 25  |-ref%=q%!8:task%|
00000a80  3d 71 25 21 34 3a e7 74  61 73 6b 25 3d 74 61 73  |=q%!4:.task%=tas|
00000a90  6b 68 61 6e 64 6c 65 25  3a e1 0d 05 64 0f 6d 65  |khandle%:...d.me|
00000aa0  73 73 25 3d 71 25 21 31  36 0d 05 6e 0c c8 8e 6d  |ss%=q%!16..n...m|
00000ab0  65 73 73 25 ca 0d 05 78  0c c9 30 3a f2 71 75 69  |ess%...x..0:.qui|
00000ac0  74 0d 05 82 11 c9 31 3a  f2 64 61 74 61 73 61 76  |t.....1:.datasav|
00000ad0  65 64 0d 05 8c 10 c9 32  3a f2 73 61 76 65 64 61  |ed.....2:.saveda|
00000ae0  74 61 0d 05 96 10 c9 33  3a f2 64 61 74 61 6c 6f  |ta.....3:.datalo|
00000af0  61 64 0d 05 a0 14 c9 34  3a 61 63 6b 70 65 6e 64  |ad.....4:ackpend|
00000b00  69 6e 67 25 3d a3 0d 05  aa 10 c9 35 3a f2 64 61  |ing%=......5:.da|
00000b10  74 61 6f 70 65 6e 0d 05  b4 07 c9 36 3a 0d 05 be  |taopen.....6:...|
00000b20  07 c9 37 3a 0d 05 c8 0f  c9 38 3a f2 70 72 65 71  |..7:.....8:.preq|
00000b30  75 69 74 0d 05 d2 07 c9  39 3a 0d 05 dc 0a c9 26  |uit.....9:.....&|
00000b40  35 30 32 3a 0d 05 e6 2d  c9 26 34 30 30 43 30 3a  |502:...-.&400C0:|
00000b50  f2 73 75 62 6d 65 6e 75  28 71 25 21 32 30 2c 71  |.submenu(q%!20,q|
00000b60  25 21 32 34 2c 71 25 21  32 38 2c 71 25 2b 33 32  |%!24,q%!28,q%+32|
00000b70  29 0d 05 f0 05 cb 0d 05  fa 05 e1 0d 06 04 04 0d  |)...............|
00000b80  06 0e 0e dd f2 64 61 74  61 6f 70 65 6e 0d 06 18  |.....dataopen...|
00000b90  0a ea 73 25 2c 74 25 0d  06 22 27 66 69 6c 65 24  |..s%,t%.."'file$|
00000ba0  3d a4 7a 74 73 28 71 25  2b 34 34 29 3a 73 25 3d  |=.zts(q%+44):s%=|
00000bb0  71 25 21 33 36 3a 74 25  3d 71 25 21 34 30 0d 06  |q%!36:t%=q%!40..|
00000bc0  2c 3f e7 a4 6f 6b 66 69  6c 65 5f 61 74 28 66 69  |,?..okfile_at(fi|
00000bd0  6c 65 24 2c 73 25 2c 74  25 29 f2 64 61 74 61 6c  |le$,s%,t%).datal|
00000be0  6f 61 64 61 63 6b 3a f2  6c 6f 61 64 66 69 6c 65  |oadack:.loadfile|
00000bf0  28 66 69 6c 65 24 2c 73  25 2c 74 25 29 0d 06 36  |(file$,s%,t%)..6|
00000c00  05 e1 0d 06 40 04 0d 06  4a 0e dd f2 64 61 74 61  |....@...J...data|
00000c10  6c 6f 61 64 0d 06 54 0a  ea 73 25 2c 74 25 0d 06  |load..T..s%,t%..|
00000c20  5e 27 66 69 6c 65 24 3d  a4 7a 74 73 28 71 25 2b  |^'file$=.zts(q%+|
00000c30  34 34 29 3a 73 25 3d 71  25 21 33 36 3a 74 25 3d  |44):s%=q%!36:t%=|
00000c40  71 25 21 34 30 0d 06 68  3f e7 a4 6f 6b 66 69 6c  |q%!40..h?..okfil|
00000c50  65 5f 61 74 28 66 69 6c  65 24 2c 73 25 2c 74 25  |e_at(file$,s%,t%|
00000c60  29 f2 64 61 74 61 6c 6f  61 64 61 63 6b 3a f2 6c  |).dataloadack:.l|
00000c70  6f 61 64 66 69 6c 65 28  66 69 6c 65 24 2c 73 25  |oadfile(file$,s%|
00000c80  2c 74 25 29 0d 06 72 05  e1 0d 06 7c 04 0d 06 86  |,t%)..r....|....|
00000c90  0f dd f2 64 61 74 61 73  61 76 65 64 0d 06 90 0a  |...datasaved....|
00000ca0  ea 73 25 2c 74 25 0d 06  9a 27 66 69 6c 65 24 3d  |.s%,t%...'file$=|
00000cb0  a4 7a 74 73 28 71 25 2b  34 34 29 3a 73 25 3d 71  |.zts(q%+44):s%=q|
00000cc0  25 21 33 36 3a 74 25 3d  71 25 21 34 30 0d 06 a4  |%!36:t%=q%!40...|
00000cd0  28 e7 a4 6f 6b 66 69 6c  65 5f 61 74 28 66 69 6c  |(..okfile_at(fil|
00000ce0  65 24 2c 73 25 2c 74 25  29 f2 64 61 74 61 73 61  |e$,s%,t%).datasa|
00000cf0  76 65 61 63 6b 0d 06 ae  05 e1 0d 06 b8 04 0d 06  |veack...........|
00000d00  c2 12 dd f2 74 65 6d 70  6c 61 74 65 28 54 24 29  |....template(T$)|
00000d10  0d 06 cc 15 f2 74 65 6d  70 6c 61 74 65 31 28 54  |.....template1(T|
00000d20  24 2c 71 25 29 0d 06 d6  05 e1 0d 06 e0 04 0d 06  |$,q%)...........|
00000d30  ea 16 dd f2 74 65 6d 70  6c 61 74 65 31 28 54 24  |....template1(T$|
00000d40  2c 71 25 29 0d 06 f4 15  ea 20 63 25 3a 24 77 6f  |,q%)..... c%:$wo|
00000d50  72 6b 62 75 66 25 3d 54  24 0d 06 fe 4a c8 99 20  |rkbuf%=T$...J.. |
00000d60  22 57 69 6d 70 5f 4c 6f  61 64 54 65 6d 70 6c 61  |"Wimp_LoadTempla|
00000d70  74 65 22 2c 2c 71 25 2c  63 75 72 62 75 66 25 2c  |te",,q%,curbuf%,|
00000d80  65 6e 64 62 75 66 25 2c  2d 31 2c 77 6f 72 6b 62  |endbuf%,-1,workb|
00000d90  75 66 25 b8 2c 2c 63 75  72 62 75 66 25 2c 2c 2c  |uf%.,,curbuf%,,,|
00000da0  2c 63 25 0d 07 08 2e e7  20 63 25 3d 30 20 8c 20  |,c%..... c%=0 . |
00000db0  85 20 31 2c 22 54 65 6d  70 6c 61 74 65 20 27 22  |. 1,"Template '"|
00000dc0  2b 54 24 2b 22 27 20 6e  6f 74 20 66 6f 75 6e 64  |+T$+"' not found|
00000dd0  22 0d 07 12 05 e1 0d 07  1c 04 0d 07 26 0b dd f2  |"...........&...|
00000de0  64 65 66 77 73 0d 07 30  07 ea 49 25 0d 07 3a 10  |defws..0..I%..:.|
00000df0  62 75 66 73 7a 25 3d 26  31 30 30 30 0d 07 44 3b  |bufsz%=&1000..D;|
00000e00  de 20 62 75 66 66 65 72  25 20 62 75 66 73 7a 25  |. buffer% bufsz%|
00000e10  3a 63 75 72 62 75 66 25  3d 62 75 66 66 65 72 25  |:curbuf%=buffer%|
00000e20  3a 65 6e 64 62 75 66 25  3d 62 75 66 66 65 72 25  |:endbuf%=buffer%|
00000e30  2b 62 75 66 73 7a 25 0d  07 4e 27 c8 99 22 57 69  |+bufsz%..N'.."Wi|
00000e40  6d 70 5f 4f 70 65 6e 54  65 6d 70 6c 61 74 65 22  |mp_OpenTemplate"|
00000e50  2c 2c a4 64 69 72 2b 22  41 74 46 72 6d 22 0d 07  |,,.dir+"AtFrm"..|
00000e60  58 42 f2 74 65 6d 70 6c  61 74 65 28 22 73 74 6f  |XB.template("sto|
00000e70  70 62 6f 78 22 29 3a 71  25 21 36 34 3d 31 3a c8  |pbox"):q%!64=1:.|
00000e80  99 22 57 69 6d 70 5f 43  72 65 61 74 65 57 69 6e  |."Wimp_CreateWin|
00000e90  64 6f 77 22 2c 2c 71 25  b8 77 5f 73 74 6f 70 25  |dow",,q%.w_stop%|
00000ea0  0d 07 62 3f f2 74 65 6d  70 6c 61 74 65 28 22 73  |..b?.template("s|
00000eb0  61 76 65 22 29 3a 71 25  21 36 34 3d 31 3a c8 99  |ave"):q%!64=1:..|
00000ec0  22 57 69 6d 70 5f 43 72  65 61 74 65 57 69 6e 64  |"Wimp_CreateWind|
00000ed0  6f 77 22 2c 2c 71 25 b8  77 5f 73 61 76 65 25 0d  |ow",,q%.w_save%.|
00000ee0  07 6c 3c f2 74 65 6d 70  6c 61 74 65 28 22 50 72  |.l<.template("Pr|
00000ef0  6f 67 49 6e 66 6f 22 29  3a c8 99 22 57 69 6d 70  |ogInfo"):.."Wimp|
00000f00  5f 43 72 65 61 74 65 57  69 6e 64 6f 77 22 2c 2c  |_CreateWindow",,|
00000f10  71 25 b8 77 5f 70 69 6e  66 6f 25 0d 07 76 1a c8  |q%.w_pinfo%..v..|
00000f20  99 22 57 69 6d 70 5f 43  6c 6f 73 65 54 65 6d 70  |."Wimp_CloseTemp|
00000f30  6c 61 74 65 22 0d 07 80  19 66 72 65 65 25 3d 65  |late"....free%=e|
00000f40  6e 64 62 75 66 25 2d 63  75 72 62 75 66 25 0d 07  |ndbuf%-curbuf%..|
00000f50  8a 05 e1 0d 07 94 04 0d  07 9e 0e dd f2 64 65 66  |.............def|
00000f60  6d 65 6e 75 73 0d 07 a8  07 ea 74 24 0d 07 b2 1c  |menus.....t$....|
00000f70  de 20 6d 6c 69 73 74 25  20 33 32 2c 66 75 6e 63  |. mlist% 32,func|
00000f80  74 69 6f 6e 25 20 35 31  0d 07 bc 0f 62 75 66 73  |tion% 51....bufs|
00000f90  7a 25 3d 26 32 30 30 0d  07 c6 43 de 20 6d 65 6e  |z%=&200...C. men|
00000fa0  75 66 72 65 65 25 20 62  75 66 73 7a 25 3a 6d 65  |ufree% bufsz%:me|
00000fb0  6e 75 70 74 72 25 3d 6d  65 6e 75 66 72 65 65 25  |nuptr%=menufree%|
00000fc0  3a 6d 65 6e 75 65 6e 64  25 3d 6d 65 6e 75 66 72  |:menuend%=menufr|
00000fd0  65 65 25 2b 62 75 66 73  7a 25 0d 07 d0 1c 6d 65  |ee%+bufsz%....me|
00000fe0  6e 75 73 74 61 72 74 25  3d 6d 65 6e 75 66 72 65  |nustart%=menufre|
00000ff0  65 25 3a f7 2b 32 0d 07  da 1b f3 74 24 3a 6d 5f  |e%:.+2.....t$:m_|
00001000  73 61 76 65 25 3d a4 63  72 6d 65 6e 75 28 74 24  |save%=.crmenu(t$|
00001010  29 0d 07 e4 b9 dc 22 23  53 61 76 65 2c 43 6f 6d  |)....."#Save,Com|
00001020  70 72 65 73 73 65 64 20  53 63 72 65 65 6e 7d 77  |pressed Screen}w|
00001030  5f 73 61 76 65 25 2c 53  79 73 74 65 6d 20 53 63  |_save%,System Sc|
00001040  72 65 65 6e 7d 77 5f 73  61 76 65 25 2c 53 75 70  |reen}w_save%,Sup|
00001050  65 72 20 43 6f 6d 70 61  63 74 65 64 20 53 63 72  |er Compacted Scr|
00001060  65 65 6e 7d 77 5f 73 61  76 65 25 2c 53 75 70 65  |een}w_save%,Supe|
00001070  72 20 43 6f 6d 70 61 63  74 65 64 20 53 70 72 69  |r Compacted Spri|
00001080  74 65 7d 77 5f 73 61 76  65 25 2c 53 79 73 74 65  |te}w_save%,Syste|
00001090  6d 20 53 70 72 69 74 65  28 73 29 7d 77 5f 73 61  |m Sprite(s)}w_sa|
000010a0  76 65 25 2c 42 72 75 73  68 20 53 68 61 70 65 73  |ve%,Brush Shapes|
000010b0  7d 77 5f 73 61 76 65 25  2c 50 61 74 74 65 72 6e  |}w_save%,Pattern|
000010c0  73 7d 77 5f 73 61 76 65  25 22 0d 07 ee 1b f3 74  |s}w_save%".....t|
000010d0  24 3a 6d 5f 6d 61 69 6e  25 3d a4 63 72 6d 65 6e  |$:m_main%=.crmen|
000010e0  75 28 74 24 29 0d 07 f8  2f dc 22 23 41 74 65 6c  |u(t$).../."#Atel|
000010f0  69 65 72 2c 49 6e 66 6f  3e 77 5f 70 69 6e 66 6f  |ier,Info>w_pinfo|
00001100  25 2c 53 61 76 65 3e 6d  5f 73 61 76 65 25 2c 51  |%,Save>m_save%,Q|
00001110  75 69 74 22 0d 08 02 05  e1 0d 08 0c 04 0d 08 16  |uit"............|
00001120  15 dd f2 66 72 6f 6e 74  28 68 25 2c 58 25 2c 59  |...front(h%,X%,Y|
00001130  25 29 0d 08 20 0d f2 67  65 74 77 28 68 25 29 0d  |%).. ..getw(h%).|
00001140  08 2a 1c e7 58 25 3e 3d  30 78 31 25 2b 3d 58 25  |.*..X%>=0x1%+=X%|
00001150  2d 78 30 25 3a 78 30 25  3d 58 25 0d 08 34 1c e7  |-x0%:x0%=X%..4..|
00001160  59 25 3e 3d 30 79 31 25  2b 3d 59 25 2d 79 30 25  |Y%>=0y1%+=Y%-y0%|
00001170  3a 79 30 25 3d 59 25 0d  08 3e 2a f2 6f 70 65 6e  |:y0%=Y%..>*.open|
00001180  28 68 25 2c 78 30 25 2c  79 30 25 2c 78 31 25 2c  |(h%,x0%,y0%,x1%,|
00001190  79 31 25 2c 73 63 78 25  2c 73 63 79 25 2c 2d 31  |y1%,scx%,scy%,-1|
000011a0  29 0d 08 48 05 e1 0d 08  52 04 0d 08 5c 0d dd f2  |)..H....R...\...|
000011b0  74 6f 70 28 68 25 29 0d  08 66 36 f2 67 65 74 77  |top(h%)..f6.getw|
000011c0  28 68 25 29 3a f2 6f 70  65 6e 28 68 25 2c 78 30  |(h%):.open(h%,x0|
000011d0  25 2c 79 30 25 2c 78 31  25 2c 79 31 25 2c 73 63  |%,y0%,x1%,y1%,sc|
000011e0  78 25 2c 73 63 79 25 2c  2d 31 29 3a e1 0d 08 70  |x%,scy%,-1):...p|
000011f0  04 0d 08 7a 34 dd f2 6f  70 65 6e 28 6f 68 25 2c  |...z4..open(oh%,|
00001200  6f 78 30 25 2c 6f 79 30  25 2c 6f 78 31 25 2c 6f  |ox0%,oy0%,ox1%,o|
00001210  79 31 25 2c 6f 73 63 78  25 2c 6f 73 63 79 25 2c  |y1%,oscx%,oscy%,|
00001220  6f 62 68 25 29 0d 08 84  07 ea 4f 25 0d 08 8e 27  |obh%).....O%...'|
00001230  21 71 25 3d 6f 68 25 3a  c8 99 22 57 69 6d 70 5f  |!q%=oh%:.."Wimp_|
00001240  47 65 74 57 69 6e 64 6f  77 53 74 61 74 65 22 2c  |GetWindowState",|
00001250  2c 71 25 0d 08 98 0d f2  77 69 6d 70 6f 70 65 6e  |,q%.....wimpopen|
00001260  0d 08 a2 05 e1 0d 08 ac  04 0d 08 b6 0e dd f2 77  |...............w|
00001270  69 6d 70 6f 70 65 6e 0d  08 c0 35 21 71 25 3d 6f  |impopen...5!q%=o|
00001280  68 25 3a 71 25 21 34 3d  6f 78 30 25 3a 71 25 21  |h%:q%!4=ox0%:q%!|
00001290  38 3d 6f 79 30 25 3a 71  25 21 31 32 3d 6f 78 31  |8=oy0%:q%!12=ox1|
000012a0  25 3a 71 25 21 31 36 3d  6f 79 31 25 0d 08 ca 3e  |%:q%!16=oy1%...>|
000012b0  71 25 21 32 30 3d 6f 73  63 78 25 3a 71 25 21 32  |q%!20=oscx%:q%!2|
000012c0  34 3d 6f 73 63 79 25 3a  71 25 21 32 38 3d 6f 62  |4=oscy%:q%!28=ob|
000012d0  68 25 3a c8 99 22 57 69  6d 70 5f 4f 70 65 6e 57  |h%:.."Wimp_OpenW|
000012e0  69 6e 64 6f 77 22 2c 2c  71 25 0d 08 d4 05 e1 0d  |indow",,q%......|
000012f0  08 de 04 0d 08 e8 11 dd  f2 63 6c 6f 73 65 77 28  |.........closew(|
00001300  21 71 25 29 0d 08 f2 07  ea 49 25 0d 08 fc 1c c8  |!q%).....I%.....|
00001310  99 22 57 69 6d 70 5f 43  6c 6f 73 65 57 69 6e 64  |."Wimp_CloseWind|
00001320  6f 77 22 2c 2c 71 25 0d  09 06 2e e7 21 71 25 3d  |ow",,q%.....!q%=|
00001330  64 69 61 6c 6f 67 75 65  25 3a 64 69 61 6c 72 65  |dialogue%:dialre|
00001340  61 73 6f 6e 25 3d 2d 31  3a 64 69 61 6c 6f 67 75  |ason%=-1:dialogu|
00001350  65 25 3d 2d 31 0d 09 10  24 e7 64 69 61 6c 6f 67  |e%=-1...$.dialog|
00001360  75 65 25 3e 3d 30 3a f2  63 6c 6f 73 65 77 28 64  |ue%>=0:.closew(d|
00001370  69 61 6c 6f 67 75 65 25  29 0d 09 1a 0a c8 8e 21  |ialogue%)......!|
00001380  71 25 ca 0d 09 24 1b c9  77 5f 73 74 6f 70 25 3a  |q%...$..w_stop%:|
00001390  73 74 6f 70 72 65 61 73  6f 6e 25 3d 2d 31 0d 09  |stopreason%=-1..|
000013a0  2e 05 cb 0d 09 38 05 e1  0d 09 42 04 0d 09 4c 2a  |.....8....B...L*|
000013b0  dd a4 69 61 28 68 25 2c  69 25 29 3a f2 67 65 74  |..ia(h%,i%):.get|
000013c0  69 28 68 25 2c 69 25 29  3a f2 63 68 6b 69 69 3a  |i(h%,i%):.chkii:|
000013d0  3d 71 25 21 32 38 0d 09  56 2a dd a4 76 61 28 68  |=q%!28..V*..va(h|
000013e0  25 2c 69 25 29 3a f2 67  65 74 69 28 68 25 2c 69  |%,i%):.geti(h%,i|
000013f0  25 29 3a f2 63 68 6b 69  69 3a 3d 71 25 21 33 32  |%):.chkii:=q%!32|
00001400  0d 09 60 2a dd a4 69 6c  28 68 25 2c 69 25 29 3a  |..`*..il(h%,i%):|
00001410  f2 67 65 74 69 28 68 25  2c 69 25 29 3a f2 63 68  |.geti(h%,i%):.ch|
00001420  6b 69 69 3a 3d 71 25 21  33 36 0d 09 6a 04 0d 09  |kii:=q%!36..j...|
00001430  74 33 dd f2 63 68 6b 69  69 3a e7 28 71 25 21 32  |t3..chkii:.(q%!2|
00001440  34 80 26 31 30 30 29 3d  30 85 31 2c 22 49 63 6f  |4.&100)=0.1,"Ico|
00001450  6e 20 6e 6f 74 20 69 6e  64 69 72 65 63 74 65 64  |n not indirected|
00001460  22 0d 09 7e 05 e1 0d 09  88 04 0d 09 92 3c dd f2  |"..~.........<..|
00001470  67 65 74 69 28 68 25 2c  69 25 29 3a 21 71 25 3d  |geti(h%,i%):!q%=|
00001480  68 25 3a 71 25 21 34 3d  69 25 3a c8 99 22 57 69  |h%:q%!4=i%:.."Wi|
00001490  6d 70 5f 47 65 74 49 63  6f 6e 53 74 61 74 65 22  |mp_GetIconState"|
000014a0  2c 2c 71 25 3a e1 0d 09  9c 04 0d 09 a6 17 dd f2  |,,q%:...........|
000014b0  73 74 6f 70 28 72 25 2c  54 24 2c 55 24 2c 54 25  |stop(r%,T$,U$,T%|
000014c0  29 0d 09 b0 12 64 69 61  6c 72 65 61 73 6f 6e 25  |)....dialreason%|
000014d0  3d 72 25 0d 09 ba 16 e7  a6 2d 33 6d 69 25 3d 33  |=r%......-3mi%=3|
000014e0  3a f2 6d 73 74 6f 70 3a  e1 0d 09 c4 2b f2 73 65  |:.mstop:....+.se|
000014f0  74 69 28 77 5f 73 74 6f  70 25 2c 30 2c 54 24 29  |ti(w_stop%,0,T$)|
00001500  3a f2 73 65 74 69 28 77  5f 73 74 6f 70 25 2c 31  |:.seti(w_stop%,1|
00001510  2c 55 24 29 0d 09 ce 29  f2 75 6e 73 65 6c 61 6c  |,U$)...).unselal|
00001520  6c 28 77 5f 73 74 6f 70  25 29 3a f2 64 69 61 6c  |l(w_stop%):.dial|
00001530  6f 67 75 65 28 77 5f 73  74 6f 70 25 29 0d 09 d8  |ogue(w_stop%)...|
00001540  12 64 69 61 6c 72 65 61  73 6f 6e 25 3d 72 25 0d  |.dialreason%=r%.|
00001550  09 e2 05 e1 0d 09 ec 04  0d 09 f6 12 dd f2 64 69  |..............di|
00001560  61 6c 6f 67 75 65 28 68  25 29 0d 0a 00 0a ea 58  |alogue(h%).....X|
00001570  25 2c 59 25 0d 0a 0a 24  e7 64 69 61 6c 6f 67 75  |%,Y%...$.dialogu|
00001580  65 25 3e 3d 30 3a f2 63  6c 6f 73 65 77 28 64 69  |e%>=0:.closew(di|
00001590  61 6c 6f 67 75 65 25 29  0d 0a 14 2d f2 6e 6f 6d  |alogue%)...-.nom|
000015a0  65 6e 75 3a f2 72 65 61  64 70 6f 69 6e 74 65 72  |enu:.readpointer|
000015b0  3a 58 25 3d 6d 78 25 2d  32 30 30 3a 59 25 3d 6d  |:X%=mx%-200:Y%=m|
000015c0  79 25 2d 38 35 0d 0a 1e  0d e7 58 25 3c 30 58 25  |y%-85.....X%<0X%|
000015d0  3d 30 0d 0a 28 0f e7 59  25 3c 39 36 59 25 3d 39  |=0..(..Y%<96Y%=9|
000015e0  36 0d 0a 32 32 64 69 61  6c 6f 67 75 65 25 3d 68  |6..22dialogue%=h|
000015f0  25 3a f2 66 72 6f 6e 74  28 68 25 2c 58 25 2c 59  |%:.front(h%,X%,Y|
00001600  25 29 3a f2 73 65 74 63  74 28 68 25 2c 2d 31 2c  |%):.setct(h%,-1,|
00001610  2d 31 29 0d 0a 3c 05 e1  0d 0a 46 04 0d 0a 50 21  |-1)..<....F...P!|
00001620  dd f2 72 65 61 64 70 6f  69 6e 74 65 72 3a ea 71  |..readpointer:.q|
00001630  25 3a 71 25 3d 77 6f 72  6b 62 75 66 25 0d 0a 5a  |%:q%=workbuf%..Z|
00001640  1f c8 99 22 57 69 6d 70  5f 47 65 74 50 6f 69 6e  |..."Wimp_GetPoin|
00001650  74 65 72 49 6e 66 6f 22  2c 2c 71 25 0d 0a 64 31  |terInfo",,q%..d1|
00001660  6d 78 25 3d 21 71 25 3a  6d 79 25 3d 71 25 21 34  |mx%=!q%:my%=q%!4|
00001670  3a 6d 62 25 3d 71 25 21  38 3a 6d 68 25 3d 71 25  |:mb%=q%!8:mh%=q%|
00001680  21 31 32 3a 6d 69 25 3d  71 25 21 31 36 0d 0a 6e  |!12:mi%=q%!16..n|
00001690  05 e1 0d 0a 78 04 0d 0a  82 0e dd a4 64 69 61 6c  |....x.......dial|
000016a0  6f 67 75 65 0d 0a 8c 21  e7 64 69 61 6c 6f 67 75  |ogue...!.dialogu|
000016b0  65 25 3e 3d 30 80 6d 68  25 3c 3e 64 69 61 6c 6f  |e%>=0.mh%<>dialo|
000016c0  67 75 65 25 8c 0d 0a 96  16 f2 63 6c 6f 73 65 77  |gue%......closew|
000016d0  28 64 69 61 6c 6f 67 75  65 25 29 0d 0a a0 05 cd  |(dialogue%).....|
000016e0  0d 0a aa 06 3d a3 0d 0a  b4 04 0d 0a be 24 dd f2  |....=........$..|
000016f0  6d 6f 75 73 65 28 6d 78  25 2c 6d 79 25 2c 6d 62  |mouse(mx%,my%,mb|
00001700  25 2c 6d 68 25 2c 6d 69  25 2c 6d 6f 25 29 0d 0a  |%,mh%,mi%,mo%)..|
00001710  c8 1d e7 64 72 61 67 72  65 61 73 6f 6e 25 3e 3d  |...dragreason%>=|
00001720  30 84 6d 62 25 3e 32 35  35 3a e1 0d 0a d2 10 e7  |0.mb%>255:......|
00001730  a4 64 69 61 6c 6f 67 75  65 3a e1 0d 0a dc 0a c8  |.dialogue:......|
00001740  8e 6d 62 25 ca 0d 0a e6  0c c9 32 3a f2 6d 65 6e  |.mb%......2:.men|
00001750  75 0d 0a f0 10 c9 31 2c  34 3a f2 73 65 6c 65 63  |u.....1,4:.selec|
00001760  74 0d 0a fa 15 c9 31 36  2c 36 34 3a f2 73 74 61  |t.....16,64:.sta|
00001770  72 74 64 72 61 67 0d 0b  04 05 cb 0d 0b 0e 05 e1  |rtdrag..........|
00001780  0d 0b 18 04 0d 0b 22 36  dd f2 73 65 74 69 28 68  |......"6..seti(h|
00001790  25 2c 69 25 2c 54 24 29  3a 54 24 3d c0 54 24 2c  |%,i%,T$):T$=.T$,|
000017a0  a4 69 6c 28 68 25 2c 69  25 29 29 3a 24 a4 69 61  |.il(h%,i%)):$.ia|
000017b0  28 68 25 2c 69 25 29 3d  54 24 0d 0b 2c 3c f2 69  |(h%,i%)=T$..,<.i|
000017c0  63 6f 6e 75 70 64 28 68  25 2c 69 25 29 3a f2 67  |conupd(h%,i%):.g|
000017d0  65 74 63 74 3a e7 21 71  25 3d 68 25 80 71 25 21  |etct:.!q%=h%.q%!|
000017e0  34 3d 69 25 3a f2 73 65  74 63 74 28 68 25 2c 69  |4=i%:.setct(h%,i|
000017f0  25 2c a9 54 24 29 0d 0b  36 05 e1 0d 0b 40 04 0d  |%,.T$)..6....@..|
00001800  0b 4a 27 dd f2 69 73 65  74 28 68 25 2c 69 25 2c  |.J'..iset(h%,i%,|
00001810  42 25 2c 45 25 29 3a ea  71 25 3a 71 25 3d 77 6f  |B%,E%):.q%:q%=wo|
00001820  72 6b 62 75 66 25 0d 0b  54 3f 21 71 25 3d 68 25  |rkbuf%..T?!q%=h%|
00001830  3a 71 25 21 34 3d 69 25  3a 71 25 21 31 32 3d 42  |:q%!4=i%:q%!12=B|
00001840  25 3a 71 25 21 38 3d 45  25 3a c8 99 22 57 69 6d  |%:q%!8=E%:.."Wim|
00001850  70 5f 53 65 74 49 63 6f  6e 53 74 61 74 65 22 2c  |p_SetIconState",|
00001860  2c 71 25 3a e1 0d 0b 5e  04 0d 0b 68 27 dd f2 69  |,q%:...^...h'..i|
00001870  63 6f 6e 75 70 64 28 68  25 2c 69 25 29 3a f2 69  |conupd(h%,i%):.i|
00001880  73 65 74 28 68 25 2c 69  25 2c 30 2c 30 29 3a e1  |set(h%,i%,0,0):.|
00001890  0d 0b 72 04 0d 0b 7c 13  dd f2 72 65 61 64 62 6c  |..r...|...readbl|
000018a0  6f 63 6b 28 70 25 29 0d  0b 86 37 78 30 25 3d 21  |ock(p%)...7x0%=!|
000018b0  70 25 3a 79 30 25 3d 70  25 21 34 3a 78 31 25 3d  |p%:y0%=p%!4:x1%=|
000018c0  70 25 21 38 3a 79 31 25  3d 70 25 21 31 32 3a f4  |p%!8:y1%=p%!12:.|
000018d0  20 70 68 79 73 69 63 61  6c 20 61 72 65 61 0d 0b  | physical area..|
000018e0  90 46 73 63 78 25 3d 70  25 21 31 36 3a 73 63 79  |.Fscx%=p%!16:scy|
000018f0  25 3d 70 25 21 32 30 3a  62 68 61 6e 64 6c 65 25  |%=p%!20:bhandle%|
00001900  3d 70 25 21 32 34 3a f4  20 73 63 72 6f 6c 6c 20  |=p%!24:. scroll |
00001910  6f 66 66 73 65 74 73 2c  20 73 74 61 63 6b 20 64  |offsets, stack d|
00001920  65 70 74 68 0d 0b 9a 4a  62 78 25 3d 78 30 25 2d  |epth...Jbx%=x0%-|
00001930  73 63 78 25 3a 62 79 25  3d 79 31 25 2d 73 63 79  |scx%:by%=y1%-scy|
00001940  25 3a f4 20 63 61 6c 63  75 6c 61 74 65 20 70 68  |%:. calculate ph|
00001950  79 73 69 63 61 6c 20 63  6f 2d 6f 72 64 73 20 6f  |ysical co-ords o|
00001960  66 20 6c 6f 67 69 63 61  6c 20 61 72 65 61 0d 0b  |f logical area..|
00001970  a4 3e 65 78 30 25 3d 70  25 21 34 30 3a 65 79 30  |.>ex0%=p%!40:ey0|
00001980  25 3d 70 25 21 34 34 3a  65 78 31 25 3d 70 25 21  |%=p%!44:ex1%=p%!|
00001990  34 38 3a 65 79 31 25 3d  70 25 21 35 32 3a f4 20  |48:ey1%=p%!52:. |
000019a0  6c 6f 67 69 63 61 6c 20  61 72 65 61 0d 0b ae 41  |logical area...A|
000019b0  67 78 30 25 3d 70 25 21  32 34 3a 67 79 30 25 3d  |gx0%=p%!24:gy0%=|
000019c0  70 25 21 32 38 3a 67 78  31 25 3d 70 25 21 33 32  |p%!28:gx1%=p%!32|
000019d0  3a 67 79 31 25 3d 70 25  21 33 36 3a f4 20 67 72  |:gy1%=p%!36:. gr|
000019e0  61 70 68 69 63 73 20 77  69 6e 64 6f 77 0d 0b b8  |aphics window...|
000019f0  2e 6f 70 65 6e 25 3d 28  70 25 21 32 38 80 26 31  |.open%=(p%!28.&1|
00001a00  30 30 30 30 29 3c 3e 30  3a f4 20 77 69 6e 64 6f  |0000)<>0:. windo|
00001a10  77 20 6f 70 65 6e 20 66  6c 61 67 0d 0b c2 05 e1  |w open flag.....|
00001a20  0d 0b cc 04 0d 0b d6 0e  dd f2 67 65 74 77 28 68  |..........getw(h|
00001a30  25 29 0d 0b e0 26 21 71  25 3d 68 25 3a c8 99 20  |%)...&!q%=h%:.. |
00001a40  22 57 69 6d 70 5f 47 65  74 57 69 6e 64 6f 77 49  |"Wimp_GetWindowI|
00001a50  6e 66 6f 22 2c 2c 71 25  0d 0b ea 14 f2 72 65 61  |nfo",,q%.....rea|
00001a60  64 62 6c 6f 63 6b 28 71  25 2b 34 29 0d 0b f4 05  |dblock(q%+4)....|
00001a70  e1 0d 0b fe 04 0d 0c 08  0c dd f2 73 65 6c 65 63  |...........selec|
00001a80  74 0d 0c 12 0a c8 8e 6d  68 25 ca 0d 0c 1c 1f c9  |t......mh%......|
00001a90  2d 32 3a 65 6e 74 65 72  25 3d 30 3a f2 65 6e 74  |-2:enter%=0:.ent|
00001aa0  65 72 5f 61 74 65 6c 69  65 72 0d 0c 26 13 c9 77  |er_atelier..&..w|
00001ab0  5f 73 74 6f 70 25 3a f2  6d 73 74 6f 70 0d 0c 30  |_stop%:.mstop..0|
00001ac0  13 c9 77 5f 73 61 76 65  25 3a f2 6d 73 61 76 65  |..w_save%:.msave|
00001ad0  0d 0c 3a 05 cb 0d 0c 44  05 e1 0d 0c 4e 04 0d 0c  |..:....D....N...|
00001ae0  58 0b dd f2 6d 73 74 6f  70 0d 0c 62 11 e7 6d 69  |X...mstop..b..mi|
00001af0  25 3c 33 84 6d 69 25 3e  34 e1 0d 0c 6c 25 ea 54  |%<3.mi%>4...l%.T|
00001b00  25 3a 54 25 3d 64 69 61  6c 72 65 61 73 6f 6e 25  |%:T%=dialreason%|
00001b10  3a 64 69 61 6c 72 65 61  73 6f 6e 25 3d 2d 31 0d  |:dialreason%=-1.|
00001b20  0c 76 0b e7 6d 69 25 3d  33 8c 0d 0c 80 09 c8 8e  |.v..mi%=3.......|
00001b30  54 25 ca 0d 0c 8a 0c c9  31 3a f2 71 75 69 74 0d  |T%......1:.quit.|
00001b40  0c 94 05 cb 0d 0c 9e 05  cd 0d 0c a8 16 f2 63 6c  |..............cl|
00001b50  6f 73 65 77 28 77 5f 73  74 6f 70 25 29 3a e1 0d  |osew(w_stop%):..|
00001b60  0c b2 04 0d 0c bc 0b dd  f2 6d 73 61 76 65 0d 0c  |.........msave..|
00001b70  c6 0c e7 6d 69 25 3c 3e  30 e1 0d 0c d0 67 ea 54  |...mi%<>0....g.T|
00001b80  24 3a 54 24 3d 24 a4 69  61 28 77 5f 73 61 76 65  |$:T$=$.ia(w_save|
00001b90  25 2c 32 29 3a e7 54 24  3d a4 6c 65 61 66 28 54  |%,2):.T$=.leaf(T|
00001ba0  24 29 3a 85 39 39 2c 22  54 6f 20 73 61 76 65 2c  |$):.99,"To save,|
00001bb0  20 70 6c 65 61 73 65 20  64 72 61 67 20 74 68 65  | please drag the|
00001bc0  20 66 69 6c 65 20 69 63  6f 6e 20 74 6f 20 61 20  | file icon to a |
00001bd0  64 69 72 65 63 74 6f 72  79 20 76 69 65 77 65 72  |directory viewer|
00001be0  22 0d 0c da 17 66 69 6c  65 24 3d 54 24 3a f2 73  |"....file$=T$:.s|
00001bf0  61 76 65 64 61 74 61 31  0d 0c e4 05 e1 0d 0c ee  |avedata1........|
00001c00  04 0d 0c f8 0f dd f2 73  74 61 72 74 64 72 61 67  |.......startdrag|
00001c10  0d 0d 02 22 64 72 61 67  72 65 61 73 6f 6e 25 3d  |..."dragreason%=|
00001c20  2d 31 3a 64 72 61 67 62  75 74 74 6f 6e 25 3d 6d  |-1:dragbutton%=m|
00001c30  62 25 0d 0d 0c 0a c8 8e  6d 68 25 ca 0d 0d 16 36  |b%......mh%....6|
00001c40  c9 77 5f 73 61 76 65 25  3a e7 6d 69 25 3d 33 3a  |.w_save%:.mi%=3:|
00001c50  64 72 61 67 72 65 61 73  6f 6e 25 3d 31 3a f2 64  |dragreason%=1:.d|
00001c60  72 61 67 69 63 6f 6e 28  77 5f 73 61 76 65 25 2c  |ragicon(w_save%,|
00001c70  33 29 0d 0d 20 05 cb 0d  0d 2a 05 e1 0d 0d 34 04  |3).. ....*....4.|
00001c80  0d 0d 3e 0d dd f2 65 6e  64 64 72 61 67 0d 0d 48  |..>...enddrag..H|
00001c90  10 f2 72 65 61 64 70 6f  69 6e 74 65 72 0d 0d 52  |..readpointer..R|
00001ca0  0d e7 6d 68 25 3c 3e 2d  31 8c 0d 0d 5c 12 c8 8e  |..mh%<>-1...\...|
00001cb0  64 72 61 67 72 65 61 73  6f 6e 25 ca 0d 0d 66 23  |dragreason%...f#|
00001cc0  c9 31 3a 66 69 6c 65 24  3d a4 6c 65 61 66 28 24  |.1:file$=.leaf($|
00001cd0  a4 69 61 28 77 5f 73 61  76 65 25 2c 32 29 29 0d  |.ia(w_save%,2)).|
00001ce0  0d 70 2d f2 73 61 76 65  72 65 71 28 66 69 6c 65  |.p-.savereq(file|
00001cf0  24 2c 73 61 76 65 74 25  2c 73 61 76 65 73 25 2c  |$,savet%,saves%,|
00001d00  73 61 76 65 72 65 61 73  6f 6e 25 29 0d 0d 7a 05  |savereason%)..z.|
00001d10  cb 0d 0d 84 05 cd 0d 0d  8e 12 64 72 61 67 72 65  |..........dragre|
00001d20  61 73 6f 6e 25 3d 2d 31  0d 0d 98 05 e1 0d 0d a2  |ason%=-1........|
00001d30  04 0d 0d ac 2c dd f2 75  6e 73 65 6c 69 28 68 25  |....,..unseli(h%|
00001d40  2c 69 25 29 3a f2 69 73  65 74 28 68 25 2c 69 25  |,i%):.iset(h%,i%|
00001d50  2c 26 32 30 30 30 30 30  2c 30 29 3a e1 0d 0d b6  |,&200000,0):....|
00001d60  04 0d 0d c0 30 dd f2 73  65 6c 69 28 68 25 2c 69  |....0..seli(h%,i|
00001d70  25 29 3a f2 69 73 65 74  28 68 25 2c 69 25 2c 26  |%):.iset(h%,i%,&|
00001d80  32 30 30 30 30 30 2c 26  32 30 30 30 30 30 29 3a  |200000,&200000):|
00001d90  e1 0d 0d ca 04 0d 0d d4  12 dd f2 75 6e 73 65 6c  |...........unsel|
00001da0  61 6c 6c 28 68 25 29 0d  0d de 14 ea 49 25 2c 69  |all(h%).....I%,i|
00001db0  25 3a f2 77 63 68 69 28  68 25 29 0d 0d e8 28 49  |%:.wchi(h%)...(I|
00001dc0  25 3d 71 25 3a f5 3a 69  25 3d 21 49 25 3a e7 69  |%=q%:.:i%=!I%:.i|
00001dd0  25 3e 3d 30 3a f2 75 6e  73 65 6c 69 28 68 25 2c  |%>=0:.unseli(h%,|
00001de0  69 25 29 0d 0d f2 11 49  25 2b 3d 34 3a fd 69 25  |i%)....I%+=4:.i%|
00001df0  3c 30 3a e1 0d 0d fc 04  0d 0e 06 38 dd f2 77 63  |<0:........8..wc|
00001e00  68 69 28 68 25 29 3a c8  99 20 22 57 69 6d 70 5f  |hi(h%):.. "Wimp_|
00001e10  57 68 69 63 68 49 63 6f  6e 22 2c 68 25 2c 71 25  |WhichIcon",h%,q%|
00001e20  2c 26 32 30 30 30 30 30  2c 26 32 30 30 30 30 30  |,&200000,&200000|
00001e30  0d 0e 10 05 e1 0d 0e 1a  04 0d 0e 24 0a dd f2 6d  |...........$...m|
00001e40  65 6e 75 0d 0e 2e 0a c8  8e 6d 68 25 ca 0d 0e 38  |enu......mh%...8|
00001e50  24 c9 2d 32 3a 6d 79 25  3d 36 34 2b 33 2a 34 30  |$.-2:my%=64+3*40|
00001e60  3a f2 70 6f 70 28 6d 5f  6d 61 69 6e 25 2c 2d 31  |:.pop(m_main%,-1|
00001e70  29 0d 0e 42 05 cb 0d 0e  4c 05 e1 0d 0e 56 04 0d  |)..B....L....V..|
00001e80  0e 60 1a dd a4 70 61 72  28 74 24 2c 73 24 2c f8  |.`...par(t$,s$,.|
00001e90  20 69 25 29 3a ea 69 31  25 0d 0e 6a 1e 69 31 25  | i%):.i1%..j.i1%|
00001ea0  3d 69 25 2b 31 3a 69 25  3d a7 74 24 2b 73 24 2c  |=i%+1:i%=.t$+s$,|
00001eb0  73 24 2c 69 31 25 29 0d  0e 74 14 3d c1 74 24 2c  |s$,i1%)..t.=.t$,|
00001ec0  69 31 25 2c 69 25 2d 69  31 25 29 0d 0e 7e 04 0d  |i1%,i%-i1%)..~..|
00001ed0  0e 88 13 dd a4 63 72 6d  65 6e 75 28 6d 65 6e 75  |.....crmenu(menu|
00001ee0  24 29 0d 0e 92 2e e7 6d  65 6e 75 66 72 65 65 25  |$).....menufree%|
00001ef0  2b 32 38 3e 6d 65 6e 75  65 6e 64 25 85 39 39 2c  |+28>menuend%.99,|
00001f00  22 4d 65 6e 75 20 61 72  65 61 20 66 75 6c 6c 22  |"Menu area full"|
00001f10  0d 0e 9c 08 ea 20 6d 25  0d 0e a6 16 6d 65 6e 75  |..... m%....menu|
00001f20  70 74 72 25 3d 6d 65 6e  75 66 72 65 65 25 0d 0e  |ptr%=menufree%..|
00001f30  b0 08 69 25 3d 30 0d 0e  ba 43 e7 20 c0 6d 65 6e  |..i%=0...C. .men|
00001f40  75 24 2c 31 29 3d 22 23  22 69 25 3d 31 3a 6d 65  |u$,1)="#"i%=1:me|
00001f50  6e 75 74 69 74 6c 65 24  3d a4 70 61 72 28 6d 65  |nutitle$=.par(me|
00001f60  6e 75 24 2c 22 2c 22 2c  69 25 29 8b 6d 65 6e 75  |nu$,",",i%).menu|
00001f70  74 69 74 6c 65 24 3d 22  22 0d 0e c4 18 24 6d 65  |title$=""....$me|
00001f80  6e 75 70 74 72 25 3d 6d  65 6e 75 74 69 74 6c 65  |nuptr%=menutitle|
00001f90  24 0d 0e ce 3b 6d 65 6e  75 70 74 72 25 3f 31 32  |$...;menuptr%?12|
00001fa0  3d 37 3a 6d 65 6e 75 70  74 72 25 3f 31 33 3d 32  |=7:menuptr%?13=2|
00001fb0  3a 6d 65 6e 75 70 74 72  25 3f 31 34 3d 37 3a 6d  |:menuptr%?14=7:m|
00001fc0  65 6e 75 70 74 72 25 3f  31 35 3d 30 0d 0e d8 33  |enuptr%?15=0...3|
00001fd0  6d 65 6e 75 70 74 72 25  21 31 36 3d 31 39 36 2d  |menuptr%!16=196-|
00001fe0  32 34 3a 6d 65 6e 75 70  74 72 25 21 32 30 3d 34  |24:menuptr%!20=4|
00001ff0  30 3a 6d 65 6e 75 70 74  72 25 21 32 34 3d 30 0d  |0:menuptr%!24=0.|
00002000  0e e2 22 6d 65 6e 75 70  74 72 25 2b 3d 32 38 3a  |.."menuptr%+=28:|
00002010  6d 61 78 78 25 3d a9 6d  65 6e 75 74 69 74 6c 65  |maxx%=.menutitle|
00002020  24 0d 0e ec 1d f5 69 74  65 6d 24 3d a4 70 61 72  |$.....item$=.par|
00002030  28 6d 65 6e 75 24 2c 22  2c 22 2c 69 25 29 0d 0e  |(menu$,",",i%)..|
00002040  f6 14 f2 6d 65 6e 75 69  74 65 6d 28 69 74 65 6d  |...menuitem(item|
00002050  24 29 0d 0f 00 0e fd 20  69 74 65 6d 24 3d 22 22  |$)..... item$=""|
00002060  0d 0f 0a 24 6d 25 3d 6d  65 6e 75 66 72 65 65 25  |...$m%=menufree%|
00002070  3a 6d 25 21 31 36 3d 28  6d 61 78 78 25 2a 38 2b  |:m%!16=(maxx%*8+|
00002080  36 29 2a 32 0d 0f 14 16  6d 65 6e 75 66 72 65 65  |6)*2....menufree|
00002090  25 3d 6d 65 6e 75 70 74  72 25 0d 0f 1e 07 3d 6d  |%=menuptr%....=m|
000020a0  25 0d 0f 28 04 0d 0f 32  15 dd f2 6d 65 6e 75 69  |%..(...2...menui|
000020b0  74 65 6d 28 74 65 78 74  24 29 0d 0f 3c 2e e7 74  |tem(text$)..<..t|
000020c0  65 78 74 24 3d 22 22 6d  65 6e 75 70 74 72 25 21  |ext$=""menuptr%!|
000020d0  2d 32 34 3d 28 6d 65 6e  75 70 74 72 25 21 2d 32  |-24=(menuptr%!-2|
000020e0  34 29 84 26 38 30 3a e1  0d 0f 46 2e e7 6d 65 6e  |4).&80:...F..men|
000020f0  75 70 74 72 25 2b 32 34  3e 6d 65 6e 75 65 6e 64  |uptr%+24>menuend|
00002100  25 8c 85 39 39 2c 22 4d  65 6e 75 20 61 72 65 61  |%..99,"Menu area|
00002110  20 66 75 6c 6c 22 0d 0f  50 0c ea 69 25 2c 66 6c  | full"..P..i%,fl|
00002120  67 25 0d 0f 5a 0c 66 6c  67 25 3d 26 30 30 0d 0f  |g%..Z.flg%=&00..|
00002130  64 12 69 25 3d a7 74 65  78 74 24 2c 22 3e 22 29  |d.i%=.text$,">")|
00002140  0d 0f 6e 3c e7 69 25 3e  30 73 75 62 70 74 72 25  |..n<.i%>0subptr%|
00002150  3d a0 c1 74 65 78 74 24  2c 69 25 2b 31 29 3a 74  |=..text$,i%+1):t|
00002160  65 78 74 24 3d c0 74 65  78 74 24 2c 69 25 2d 31  |ext$=.text$,i%-1|
00002170  29 8b 73 75 62 70 74 72  25 3d 2d 31 0d 0f 78 12  |).subptr%=-1..x.|
00002180  69 25 3d a7 74 65 78 74  24 2c 22 7d 22 29 0d 0f  |i%=.text$,"}")..|
00002190  82 3b e7 69 25 3e 30 73  75 62 70 74 72 25 3d a0  |.;.i%>0subptr%=.|
000021a0  c1 74 65 78 74 24 2c 69  25 2b 31 29 3a 74 65 78  |.text$,i%+1):tex|
000021b0  74 24 3d c0 74 65 78 74  24 2c 69 25 2d 31 29 3a  |t$=.text$,i%-1):|
000021c0  66 6c 67 25 2b 3d 26 30  38 0d 0f 8c 29 e7 c2 74  |flg%+=&08...)..t|
000021d0  65 78 74 24 2c 31 29 3d  22 23 22 74 65 78 74 24  |ext$,1)="#"text$|
000021e0  3d c0 74 65 78 74 24 29  3a 66 6c 67 25 2b 3d 26  |=.text$):flg%+=&|
000021f0  30 32 0d 0f 96 3b 6d 65  6e 75 70 74 72 25 21 30  |02...;menuptr%!0|
00002200  3d 66 6c 67 25 3a 6d 65  6e 75 70 74 72 25 21 34  |=flg%:menuptr%!4|
00002210  3d 73 75 62 70 74 72 25  3a 6d 65 6e 75 70 74 72  |=subptr%:menuptr|
00002220  25 21 38 3d 26 30 37 30  30 30 30 32 31 0d 0f a0  |%!8=&07000021...|
00002230  13 e7 c0 74 65 78 74 24  2c 31 29 3d 22 24 22 8c  |...text$,1)="$".|
00002240  0d 0f aa 32 21 6d 65 6e  75 70 74 72 25 2b 3d 26  |...2!menuptr%+=&|
00002250  30 34 3a 6d 65 6e 75 70  74 72 25 21 38 2b 3d 26  |04:menuptr%!8+=&|
00002260  31 30 30 3a 69 25 3d a7  74 65 78 74 24 2c 22 28  |100:i%=.text$,"(|
00002270  22 29 0d 0f b4 33 e7 69  25 3e 30 8c 4c 25 3d bb  |")...3.i%>0.L%=.|
00002280  c1 74 65 78 74 24 2c 69  25 2b 31 29 3a 74 65 78  |.text$,i%+1):tex|
00002290  74 24 3d c0 74 65 78 74  24 2c 69 25 2d 31 29 8b  |t$=.text$,i%-1).|
000022a0  4c 25 3d 31 32 0d 0f be  38 6d 65 6e 75 70 74 72  |L%=12...8menuptr|
000022b0  25 21 31 32 3d a0 c1 74  65 78 74 24 2c 32 29 3a  |%!12=..text$,2):|
000022c0  6d 65 6e 75 70 74 72 25  21 31 36 3d 2d 31 3a 6d  |menuptr%!16=-1:m|
000022d0  65 6e 75 70 74 72 25 21  32 30 3d 4c 25 0d 0f c8  |enuptr%!20=L%...|
000022e0  12 74 65 78 74 24 3d c4  4c 25 2c 22 20 22 29 0d  |.text$=.L%," ").|
000022f0  0f d2 05 cc 0d 0f dc 10  e7 a9 74 65 78 74 24 3c  |..........text$<|
00002300  3d 31 32 8c 0d 0f e6 18  24 28 6d 65 6e 75 70 74  |=12.....$(menupt|
00002310  72 25 2b 31 32 29 3d 74  65 78 74 24 0d 0f f0 05  |r%+12)=text$....|
00002320  cc 0d 0f fa 25 49 25 3d  a4 77 6f 72 6b 73 70 61  |....%I%=.workspa|
00002330  63 65 28 a9 74 65 78 74  24 2b 31 29 3a 24 49 25  |ce(.text$+1):$I%|
00002340  3d 74 65 78 74 24 0d 10  04 36 6d 65 6e 75 70 74  |=text$...6menupt|
00002350  72 25 21 31 32 3d 49 25  3a 6d 65 6e 75 70 74 72  |r%!12=I%:menuptr|
00002360  25 21 31 36 3d 2d 31 3a  6d 65 6e 75 70 74 72 25  |%!16=-1:menuptr%|
00002370  21 32 30 3d a9 74 65 78  74 24 2b 31 0d 10 0e 20  |!20=.text$+1... |
00002380  6d 65 6e 75 70 74 72 25  21 38 3d 6d 65 6e 75 70  |menuptr%!8=menup|
00002390  74 72 25 21 38 20 84 20  26 31 30 30 0d 10 18 05  |tr%!8 . &100....|
000023a0  cd 0d 10 22 1d e7 a9 74  65 78 74 24 3e 6d 61 78  |..."...text$>max|
000023b0  78 25 6d 61 78 78 25 3d  a9 74 65 78 74 24 0d 10  |x%maxx%=.text$..|
000023c0  2c 05 cd 0d 10 36 10 6d  65 6e 75 70 74 72 25 2b  |,....6.menuptr%+|
000023d0  3d 32 34 0d 10 40 05 e1  0d 10 4a 04 0d 10 54 13  |=24..@....J...T.|
000023e0  dd a4 77 6f 72 6b 73 70  61 63 65 28 4c 25 29 0d  |..workspace(L%).|
000023f0  10 5e 32 e7 20 63 75 72  62 75 66 25 2b 4c 25 3e  |.^2. curbuf%+L%>|
00002400  65 6e 64 62 75 66 25 85  39 39 2c 22 4e 6f 20 6d  |endbuf%.99,"No m|
00002410  6f 72 65 20 62 75 66 66  65 72 20 73 70 61 63 65  |ore buffer space|
00002420  22 0d 10 68 1b 63 75 72  62 75 66 25 2b 3d 4c 25  |"..h.curbuf%+=L%|
00002430  3a 3d 63 75 72 62 75 66  25 2d 4c 25 0d 10 72 04  |:=curbuf%-L%..r.|
00002440  0d 10 7c 17 dd f2 70 72  65 70 28 6d 65 6e 75 25  |..|...prep(menu%|
00002450  2c 74 72 65 65 25 29 0d  10 86 0a ea 49 25 2c 54  |,tree%).....I%,T|
00002460  24 0d 10 90 13 f2 63 6c  65 61 72 74 73 28 6d 65  |$.....clearts(me|
00002470  6e 75 25 29 0d 10 9a 0c  c8 8e 6d 65 6e 75 25 ca  |nu%)......menu%.|
00002480  0d 10 a4 15 c9 6d 5f 6d  61 69 6e 25 3a f2 6d 70  |.....m_main%:.mp|
00002490  5f 6d 61 69 6e 0d 10 ae  05 cb 0d 10 b8 05 e1 0d  |_main...........|
000024a0  10 c2 04 0d 10 cc 0d dd  f2 6d 70 5f 6d 61 69 6e  |.........mp_main|
000024b0  0d 10 d6 10 ea 6e 25 2c  66 24 2c 73 25 2c 74 25  |.....n%,f$,s%,t%|
000024c0  0d 10 e0 0d e7 74 72 65  65 25 3e 30 8c 0d 10 ea  |.....tree%>0....|
000024d0  0f e7 21 6d 6c 69 73 74  25 3d 31 8c 0d 10 f4 3e  |..!mlist%=1....>|
000024e0  6e 25 3d 6d 6c 69 73 74  25 21 34 3a f2 73 65 74  |n%=mlist%!4:.set|
000024f0  66 69 6c 65 5f 61 74 28  6e 25 2c 66 24 2c 73 25  |file_at(n%,f$,s%|
00002500  2c 74 25 29 3a f2 73 61  76 65 73 65 74 28 66 24  |,t%):.saveset(f$|
00002510  2c 74 25 2c 6e 25 2c 73  25 29 0d 10 fe 05 cd 0d  |,t%,n%,s%)......|
00002520  11 08 05 cd 0d 11 12 05  e1 0d 11 1c 04 0d 11 26  |...............&|
00002530  16 dd f2 70 6f 70 28 6d  65 6e 75 25 2c 74 72 65  |...pop(menu%,tre|
00002540  65 25 29 0d 11 30 0e e7  6d 65 6e 75 25 3c 30 3a  |e%)..0..menu%<0:|
00002550  e1 0d 11 3a 16 f2 70 72  65 70 28 6d 65 6e 75 25  |...:..prep(menu%|
00002560  2c 74 72 65 65 25 29 0d  11 44 2d c8 99 20 22 57  |,tree%)..D-.. "W|
00002570  69 6d 70 5f 43 72 65 61  74 65 4d 65 6e 75 22 2c  |imp_CreateMenu",|
00002580  2c 6d 65 6e 75 25 2c 6d  78 25 2d 35 30 2c 6d 79  |,menu%,mx%-50,my|
00002590  25 2b 33 32 0d 11 4e 13  6f 70 65 6e 6d 65 6e 75  |%+32..N.openmenu|
000025a0  25 3d 6d 65 6e 75 25 0d  11 58 05 e1 0d 11 62 04  |%=menu%..X....b.|
000025b0  0d 11 6c 0c dd f2 6e 6f  6d 65 6e 75 0d 11 76 28  |..l...nomenu..v(|
000025c0  c8 99 22 57 69 6d 70 5f  43 72 65 61 74 65 4d 65  |.."Wimp_CreateMe|
000025d0  6e 75 22 2c 2c 2d 31 3a  6f 70 65 6e 6d 65 6e 75  |nu",,-1:openmenu|
000025e0  25 3d 2d 31 0d 11 80 05  e1 0d 11 8a 04 0d 11 94  |%=-1............|
000025f0  10 dd f2 6d 65 6e 75 73  65 6c 65 63 74 0d 11 9e  |...menuselect...|
00002600  07 ea 49 25 0d 11 a8 2d  49 25 3d 30 3a f5 6d 6c  |..I%...-I%=0:.ml|
00002610  69 73 74 25 21 49 25 3d  71 25 21 49 25 3a 49 25  |ist%!I%=q%!I%:I%|
00002620  2b 3d 34 3a fd 71 25 21  28 49 25 2d 34 29 3d 2d  |+=4:.q%!(I%-4)=-|
00002630  31 0d 11 b2 10 f2 72 65  61 64 70 6f 69 6e 74 65  |1.....readpointe|
00002640  72 0d 11 bc 10 c8 8e 6f  70 65 6e 6d 65 6e 75 25  |r......openmenu%|
00002650  ca 0d 11 c6 14 c9 6d 5f  6d 61 69 6e 25 3a f2 6d  |......m_main%:.m|
00002660  5f 6d 61 69 6e 0d 11 d0  05 cb 0d 11 da 0b e7 6d  |_main..........m|
00002670  62 25 3d 31 8c 0d 11 e4  23 f2 70 6f 70 28 6f 70  |b%=1....#.pop(op|
00002680  65 6e 6d 65 6e 75 25 2c  6d 6c 69 73 74 25 29 3a  |enmenu%,mlist%):|
00002690  8b f2 6e 6f 6d 65 6e 75  0d 11 ee 05 cd 0d 11 f8  |..nomenu........|
000026a0  05 e1 0d 12 02 04 0d 12  0c 0c dd f2 6d 5f 6d 61  |............m_ma|
000026b0  69 6e 0d 12 16 0e c8 8e  21 6d 6c 69 73 74 25 ca  |in......!mlist%.|
000026c0  0d 12 20 1a c9 30 3a f2  64 69 61 6c 6f 67 75 65  |.. ..0:.dialogue|
000026d0  28 77 5f 70 69 6e 66 6f  25 29 0d 12 2a 21 c9 32  |(w_pinfo%)..*!.2|
000026e0  3a e7 a4 61 6c 74 65 72  65 64 5f 61 74 3a f2 71  |:..altered_at:.q|
000026f0  71 75 69 74 3a 8b f2 71  75 69 74 0d 12 34 05 cb  |quit:..quit..4..|
00002700  0d 12 3e 05 e1 0d 12 48  04 0d 12 52 1d dd f2 73  |..>....H...R...s|
00002710  75 62 6d 65 6e 75 28 6d  65 6e 75 25 2c 58 25 2c  |ubmenu(menu%,X%,|
00002720  59 25 2c 71 25 29 0d 12  5c 0d f4 20 3b 7b 7b 7b  |Y%,q%)..\.. ;{{{|
00002730  7b 7b 7b 0d 12 66 07 ea  49 25 0d 12 70 2d 49 25  |{{{..f..I%..p-I%|
00002740  3d 30 3a f5 6d 6c 69 73  74 25 21 49 25 3d 71 25  |=0:.mlist%!I%=q%|
00002750  21 49 25 3a 49 25 2b 3d  34 3a fd 71 25 21 28 49  |!I%:I%+=4:.q%!(I|
00002760  25 2d 34 29 3d 2d 31 0d  12 7a 1b f2 70 72 65 70  |%-4)=-1..z..prep|
00002770  28 6f 70 65 6e 6d 65 6e  75 25 2c 6d 6c 69 73 74  |(openmenu%,mlist|
00002780  25 29 0d 12 84 27 c8 99  22 57 69 6d 70 5f 43 72  |%)...'.."Wimp_Cr|
00002790  65 61 74 65 53 75 62 4d  65 6e 75 22 2c 2c 6d 65  |eateSubMenu",,me|
000027a0  6e 75 25 2c 58 25 2c 59  25 0d 12 8e 05 e1 0d 12  |nu%,X%,Y%.......|
000027b0  98 04 0d 12 a2 20 dd f2  63 6c 65 61 72 74 73 28  |..... ..clearts(|
000027c0  6d 68 25 29 3a ea 49 25  3a 49 25 3d 6d 68 25 2b  |mh%):.I%:I%=mh%+|
000027d0  32 38 0d 12 ac 22 e7 6d  68 25 3c 6d 65 6e 75 73  |28...".mh%<menus|
000027e0  74 61 72 74 25 84 6d 68  25 3e 6d 65 6e 75 65 6e  |tart%.mh%>menuen|
000027f0  64 25 3a e1 0d 12 b6 05  f5 0d 12 c0 22 21 49 25  |d%:........."!I%|
00002800  3d 21 49 25 80 ac 31 3a  49 25 21 38 3d 49 25 21  |=!I%..1:I%!8=I%!|
00002810  38 80 ac 26 34 30 30 30  30 30 3a 0d 12 ca 16 49  |8..&400000:....I|
00002820  25 2b 3d 32 34 3a fd 49  25 21 2d 32 34 80 26 38  |%+=24:.I%!-24.&8|
00002830  30 0d 12 d4 05 e1 0d 12  de 04 0d 12 e8 13 dd f2  |0...............|
00002840  73 68 61 64 65 28 6d 68  25 2c 49 25 29 0d 12 f2  |shade(mh%,I%)...|
00002850  2f 6d 68 25 21 28 32 38  2b 38 2b 32 34 2a 49 25  |/mh%!(28+8+24*I%|
00002860  29 3d 6d 68 25 21 28 32  38 2b 38 2b 32 34 2a 49  |)=mh%!(28+8+24*I|
00002870  25 29 84 26 34 30 30 30  30 30 3a e1 0d 12 fc 04  |%).&400000:.....|
00002880  0d 13 06 12 dd f2 74 69  63 6b 28 6d 68 25 2c 49  |......tick(mh%,I|
00002890  25 29 0d 13 10 27 6d 68  25 21 28 32 38 2b 32 34  |%)...'mh%!(28+24|
000028a0  2a 49 25 29 3d 6d 68 25  21 28 32 38 2b 32 34 2a  |*I%)=mh%!(28+24*|
000028b0  49 25 29 84 26 30 31 3a  e1 0d 13 1a 04 0d 13 24  |I%).&01:.......$|
000028c0  0d dd a4 63 6f 6d 6d 61  6e 64 0d 13 2e 0d ea 54  |...command.....T|
000028d0  25 2c 49 25 2c 54 24 0d  13 38 16 c8 99 22 4f 53  |%,I%,T$..8..."OS|
000028e0  5f 47 65 74 45 6e 76 22  20 b8 20 54 24 0d 13 42  |_GetEnv" . T$..B|
000028f0  0e f2 73 74 72 69 70 28  54 24 29 0d 13 4c 07 3d  |..strip(T$)..L.=|
00002900  54 24 0d 13 56 04 0d 13  60 0b dd a4 70 61 72 61  |T$..V...`...para|
00002910  6d 0d 13 6a 16 ea 49 25  2c 54 24 3a 54 24 3d a4  |m..j..I%,T$:T$=.|
00002920  63 6f 6d 6d 61 6e 64 0d  13 74 1f 49 25 3d a7 54  |command..t.I%=.T|
00002930  24 2c 22 20 2d 71 75 69  74 20 22 29 3a e7 49 25  |$," -quit "):.I%|
00002940  3d 30 3a 3d 22 22 0d 13  7e 1b 54 24 3d c1 54 24  |=0:=""..~.T$=.T$|
00002950  2c 49 25 2b 37 29 3a f2  73 74 72 69 70 28 54 24  |,I%+7):.strip(T$|
00002960  29 0d 13 88 31 49 25 3d  a7 54 24 2c 22 20 22 29  |)...1I%=.T$," ")|
00002970  3a e7 49 25 3e 30 54 24  3d c1 54 24 2c 49 25 2b  |:.I%>0T$=.T$,I%+|
00002980  31 29 3a f2 73 74 72 69  70 28 54 24 29 3a 8b 3d  |1):.strip(T$):.=|
00002990  22 22 0d 13 92 2c 49 25  3d a7 54 24 2c 22 20 22  |""...,I%=.T$," "|
000029a0  29 3a e7 49 25 3e 30 54  24 3d c0 54 24 2c 49 25  |):.I%>0T$=.T$,I%|
000029b0  2d 31 29 3a f2 73 74 72  69 70 28 54 24 29 0d 13  |-1):.strip(T$)..|
000029c0  9c 07 3d 54 24 0d 13 a6  04 0d 13 b0 12 dd a4 66  |..=T$..........f|
000029d0  69 6c 65 74 79 70 65 28  54 24 29 0d 13 ba 24 ea  |iletype(T$)...$.|
000029e0  54 25 2c 55 25 3a c8 99  20 22 4f 53 5f 46 69 6c  |T%,U%:.. "OS_Fil|
000029f0  65 22 2c 35 2c 54 24 20  b8 55 25 2c 2c 54 25 0d  |e",5,T$ .U%,,T%.|
00002a00  13 c4 0d e7 54 25 3d 30  3a 3d 2d 31 0d 13 ce 13  |....T%=0:=-1....|
00002a10  3d 28 54 25 80 26 46 46  46 30 30 29 3e 3e 38 0d  |=(T%.&FFF00)>>8.|
00002a20  13 d8 05 20 0d 13 e2 0f  dd f2 77 61 69 74 70 6f  |... ......waitpo|
00002a30  69 6e 74 0d 13 ec 0e e7  20 6f 73 25 3c 3e 32 20  |int..... os%<>2 |
00002a40  e1 0d 13 f6 0e 77 61 69  74 65 72 25 2b 3d 31 0d  |.....waiter%+=1.|
00002a50  14 00 14 c8 99 22 48 6f  75 72 67 6c 61 73 73 5f  |....."Hourglass_|
00002a60  4f 6e 22 0d 14 0a 05 e1  0d 14 14 04 0d 14 1e 0f  |On".............|
00002a70  dd f2 6e 6f 72 6d 70 6f  69 6e 74 0d 14 28 0e e7  |..normpoint..(..|
00002a80  20 6f 73 25 3c 3e 32 20  e1 0d 14 32 38 c8 95 77  | os%<>2 ...28..w|
00002a90  61 69 74 65 72 25 3e 30  3a c8 99 22 48 6f 75 72  |aiter%>0:.."Hour|
00002aa0  67 6c 61 73 73 5f 4f 66  66 22 3a 77 61 69 74 65  |glass_Off":waite|
00002ab0  72 25 2d 3d 31 3a ce 3a  77 61 69 74 65 72 25 3d  |r%-=1:.:waiter%=|
00002ac0  30 0d 14 3c 05 e1 0d 14  46 04 0d 14 50 0a dd f2  |0..<....F...P...|
00002ad0  68 65 6c 70 0d 14 5a 05  e1 0d 14 64 04 0d 14 6e  |help..Z....d...n|
00002ae0  11 dd f2 64 61 74 61 6c  6f 61 64 61 63 6b 0d 14  |...dataloadack..|
00002af0  78 1e 71 25 21 30 3d 32  30 3a 71 25 21 31 32 3d  |x.q%!0=20:q%!12=|
00002b00  72 65 66 25 3a 71 25 21  31 36 3d 34 0d 14 82 24  |ref%:q%!16=4...$|
00002b10  c8 99 22 57 69 6d 70 5f  53 65 6e 64 4d 65 73 73  |.."Wimp_SendMess|
00002b20  61 67 65 22 2c 31 37 2c  71 25 2c 74 61 73 6b 25  |age",17,q%,task%|
00002b30  0d 14 8c 05 e1 0d 14 96  04 0d 14 a0 11 dd f2 64  |...............d|
00002b40  61 74 61 73 61 76 65 61  63 6b 0d 14 aa 3c e7 a4  |atasaveack...<..|
00002b50  41 72 66 56 61 72 28 22  57 69 6d 70 24 53 63 72  |ArfVar("Wimp$Scr|
00002b60  61 70 22 29 3d 22 22 3a  85 39 39 2c 22 3c 57 69  |ap")="":.99,"<Wi|
00002b70  6d 70 24 53 63 72 61 70  3e 20 6e 6f 74 20 64 65  |mp$Scrap> not de|
00002b80  66 69 6e 65 64 22 0d 14  b4 41 21 71 25 3d 36 30  |fined"...A!q%=60|
00002b90  3a 71 25 21 31 32 3d 72  65 66 25 3a 71 25 21 31  |:q%!12=ref%:q%!1|
00002ba0  36 3d 32 3a 71 25 21 33  36 3d 2d 31 3a 24 28 71  |6=2:q%!36=-1:$(q|
00002bb0  25 2b 34 34 29 3d 22 3c  57 69 6d 70 24 53 63 72  |%+44)="<Wimp$Scr|
00002bc0  61 70 3e 22 2b bd 30 0d  14 be 31 c8 99 22 57 69  |ap>"+.0...1.."Wi|
00002bd0  6d 70 5f 53 65 6e 64 4d  65 73 73 61 67 65 22 2c  |mp_SendMessage",|
00002be0  31 37 2c 71 25 2c 74 61  73 6b 25 3a 61 63 6b 72  |17,q%,task%:ackr|
00002bf0  65 66 25 3d 71 25 21 38  0d 14 c8 05 e1 0d 14 d2  |ef%=q%!8........|
00002c00  04 0d 14 dc 1a dd f2 73  61 76 65 72 65 71 28 54  |.......savereq(T|
00002c10  24 2c 74 25 2c 73 25 2c  72 25 29 0d 14 e6 12 73  |$,t%,s%,r%)....s|
00002c20  61 76 65 72 65 61 73 6f  6e 25 3d 72 25 0d 14 f0  |avereason%=r%...|
00002c30  2b 71 25 21 33 32 3d 6d  79 25 3a 71 25 21 32 38  |+q%!32=my%:q%!28|
00002c40  3d 6d 78 25 3a 71 25 21  32 34 3d 6d 69 25 3a 71  |=mx%:q%!24=mi%:q|
00002c50  25 21 32 30 3d 6d 68 25  0d 14 fa 2c 71 25 21 31  |%!20=mh%...,q%!1|
00002c60  36 3d 31 3a 71 25 21 31  32 3d 30 3a 71 25 21 33  |6=1:q%!12=0:q%!3|
00002c70  36 3d 73 25 3a 71 25 21  34 30 3d 74 25 3a 21 71  |6=s%:q%!40=t%:!q|
00002c80  25 3d 36 30 0d 15 04 39  24 28 71 25 2b 34 34 29  |%=60...9$(q%+44)|
00002c90  3d 54 24 2b bd 30 3a c8  99 22 57 69 6d 70 5f 53  |=T$+.0:.."Wimp_S|
00002ca0  65 6e 64 4d 65 73 73 61  67 65 22 2c 31 37 2c 71  |endMessage",17,q|
00002cb0  25 2c 71 25 21 32 30 2c  71 25 21 32 34 0d 15 0e  |%,q%!20,q%!24...|
00002cc0  13 73 61 76 65 72 65 66  25 3d 71 25 21 38 3a e1  |.saveref%=q%!8:.|
00002cd0  0d 15 18 04 0d 15 22 0e  dd f2 6c 6f 61 64 6d 65  |......"...loadme|
00002ce0  73 73 0d 15 2c 1c 24 28  71 25 2b 34 34 29 3d 66  |ss..,.$(q%+44)=f|
00002cf0  69 6c 65 24 2b bd 30 3a  21 71 25 3d 36 30 0d 15  |ile$+.0:!q%=60..|
00002d00  36 37 71 25 21 31 32 3d  72 65 66 25 3a 71 25 21  |67q%!12=ref%:q%!|
00002d10  31 36 3d 33 3a c8 99 22  57 69 6d 70 5f 53 65 6e  |16=3:.."Wimp_Sen|
00002d20  64 4d 65 73 73 61 67 65  22 2c 31 37 2c 71 25 2c  |dMessage",17,q%,|
00002d30  74 61 73 6b 25 0d 15 40  13 61 63 6b 70 65 6e 64  |task%..@.ackpend|
00002d40  69 6e 67 25 3d b9 3a e1  0d 15 4a 05 20 0d 15 54  |ing%=.:...J. ..T|
00002d50  17 dd a4 7a 74 73 28 54  25 29 3a ea 54 24 3a 54  |...zts(T%):.T$:T|
00002d60  24 3d 22 22 0d 15 5e 1d  c8 95 3f 54 25 3c 3e 30  |$=""..^...?T%<>0|
00002d70  3a 54 24 2b 3d bd 3f 54  25 3a 54 25 2b 3d 31 3a  |:T$+=.?T%:T%+=1:|
00002d80  ce 0d 15 68 07 3d 54 24  0d 15 72 04 0d 15 7c 2b  |...h.=T$..r...|+|
00002d90  dd f2 67 65 74 63 74 3a  c8 99 22 57 69 6d 70 5f  |..getct:.."Wimp_|
00002da0  47 65 74 43 61 72 65 74  50 6f 73 69 74 69 6f 6e  |GetCaretPosition|
00002db0  22 2c 2c 71 25 3a e1 0d  15 86 04 0d 15 90 3e dd  |",,q%:........>.|
00002dc0  f2 73 65 74 63 74 28 68  25 2c 69 25 2c 6f 25 29  |.setct(h%,i%,o%)|
00002dd0  3a c8 99 20 22 57 69 6d  70 5f 53 65 74 43 61 72  |:.. "Wimp_SetCar|
00002de0  65 74 50 6f 73 69 74 69  6f 6e 22 2c 68 25 2c 69  |etPosition",h%,i|
00002df0  25 2c 2c 2c 2d 31 2c 6f  25 0d 15 9a 05 e1 0d 15  |%,,,-1,o%.......|
00002e00  a4 04 0d 15 ae 0e dd a4  6c 65 61 66 28 54 24 29  |........leaf(T$)|
00002e10  0d 15 b8 0a ea 49 25 2c  43 25 0d 15 c2 24 e7 28  |.....I%,C%...$.(|
00002e20  28 a7 54 24 2c 22 2e 22  29 3d 30 29 80 28 a7 54  |(.T$,".")=0).(.T|
00002e30  24 2c 22 3a 22 29 3d 30  29 29 8c 3d 54 24 0d 15  |$,":")=0)).=T$..|
00002e40  cc 0c 49 25 3d a9 28 54  24 29 0d 15 d6 05 f5 0d  |..I%=.(T$)......|
00002e50  15 e0 11 43 25 3d 97 c1  54 24 2c 49 25 2c 31 29  |...C%=..T$,I%,1)|
00002e60  0d 15 ea 09 49 25 2d 3d  31 0d 15 f4 1c fd 28 49  |....I%-=1.....(I|
00002e70  25 3c 3d 30 84 43 25 3d  97 22 2e 22 84 43 25 3d  |%<=0.C%=.".".C%=|
00002e80  97 22 3a 22 29 0d 15 fe  1a e7 49 25 3e 30 8c 3d  |.":").....I%>0.=|
00002e90  c2 54 24 2c a9 28 54 24  29 2d 49 25 2d 31 29 0d  |.T$,.(T$)-I%-1).|
00002ea0  16 08 07 3d 54 24 0d 16  12 04 0d 16 1c 0b dd f2  |...=T$..........|
00002eb0  73 63 72 73 7a 0d 16 26  48 21 77 6f 72 6b 62 75  |scrsz..&H!workbu|
00002ec0  66 25 3d 34 3a 77 6f 72  6b 62 75 66 25 21 34 3d  |f%=4:workbuf%!4=|
00002ed0  35 3a 77 6f 72 6b 62 75  66 25 21 38 3d 31 31 3a  |5:workbuf%!8=11:|
00002ee0  77 6f 72 6b 62 75 66 25  21 31 32 3d 31 32 3a 77  |workbuf%!12=12:w|
00002ef0  6f 72 6b 62 75 66 25 21  31 36 3d 2d 31 0d 16 30  |orkbuf%!16=-1..0|
00002f00  31 c8 99 20 22 4f 53 5f  52 65 61 64 56 64 75 56  |1.. "OS_ReadVduV|
00002f10  61 72 69 61 62 6c 65 73  22 2c 77 6f 72 6b 62 75  |ariables",workbu|
00002f20  66 25 2c 77 6f 72 6b 62  75 66 25 2b 32 34 0d 16  |f%,workbuf%+24..|
00002f30  3a 49 71 25 21 33 32 3d  28 77 6f 72 6b 62 75 66  |:Iq%!32=(workbuf|
00002f40  25 21 33 32 29 3c 3c 28  77 6f 72 6b 62 75 66 25  |%!32)<<(workbuf%|
00002f50  21 32 34 29 3a 71 25 21  33 36 3d 28 77 6f 72 6b  |!24):q%!36=(work|
00002f60  62 75 66 25 21 33 36 29  3c 3c 28 77 6f 72 6b 62  |buf%!36)<<(workb|
00002f70  75 66 25 21 32 38 29 0d  16 44 05 e1 0d 16 4e 04  |uf%!28)..D....N.|
00002f80  0d 16 58 1a dd f2 73 61  76 65 73 65 74 28 66 24  |..X...saveset(f$|
00002f90  2c 54 25 2c 72 25 2c 73  25 29 0d 16 62 30 73 61  |,T%,r%,s%)..b0sa|
00002fa0  76 65 72 65 61 73 6f 6e  25 3d 72 25 3a 73 61 76  |vereason%=r%:sav|
00002fb0  65 66 24 3d 66 24 3a 73  61 76 65 74 25 3d 54 25  |ef$=f$:savet%=T%|
00002fc0  3a 73 61 76 65 73 25 3d  73 25 0d 16 6c 3e f2 73  |:saves%=s%..l>.s|
00002fd0  65 74 69 28 77 5f 73 61  76 65 25 2c 32 2c 66 24  |eti(w_save%,2,f$|
00002fe0  29 3a 24 a4 76 61 28 77  5f 73 61 76 65 25 2c 33  |):$.va(w_save%,3|
00002ff0  29 3d 22 73 66 69 6c 65  5f 22 2b c2 22 30 30 22  |)="sfile_"+."00"|
00003000  2b c3 7e 54 25 2c 33 29  0d 16 76 05 e1 0d 16 80  |+.~T%,3)..v.....|
00003010  04 0d 16 8a 15 dd f2 64  72 61 67 69 63 6f 6e 28  |.......dragicon(|
00003020  68 25 2c 69 25 29 0d 16  94 0e ea 78 25 2c 79 25  |h%,i%).....x%,y%|
00003030  2c 79 73 25 0d 16 9e 2c  f2 67 65 74 77 28 68 25  |,ys%...,.getw(h%|
00003040  29 3a 79 73 25 3d 79 31  25 2d 79 30 25 3a 78 25  |):ys%=y1%-y0%:x%|
00003050  3d 62 78 25 3a 79 25 3d  79 30 25 2d 73 63 79 25  |=bx%:y%=y0%-scy%|
00003060  0d 16 a8 31 f2 67 65 74  69 28 68 25 2c 69 25 29  |...1.geti(h%,i%)|
00003070  3a 71 25 21 38 2b 3d 78  25 3a 71 25 21 31 32 2b  |:q%!8+=x%:q%!12+|
00003080  3d 79 25 2b 79 73 25 3a  71 25 21 31 36 2b 3d 78  |=y%+ys%:q%!16+=x|
00003090  25 0d 16 b2 30 71 25 21  32 30 2b 3d 79 25 2b 79  |%...0q%!20+=y%+y|
000030a0  73 25 3a 71 25 21 32 34  3d 30 3a 71 25 21 32 38  |s%:q%!24=0:q%!28|
000030b0  3d 30 3a 21 71 25 3d 30  3a f2 64 72 61 67 35 3a  |=0:!q%=0:.drag5:|
000030c0  e1 0d 16 bc 04 0d 16 c6  1f dd f2 64 72 61 67 35  |...........drag5|
000030d0  3a f2 72 65 61 64 70 6f  69 6e 74 65 72 3a f2 73  |:.readpointer:.s|
000030e0  63 72 73 7a 0d 16 d0 46  71 25 21 32 34 2d 3d 6d  |crsz...Fq%!24-=m|
000030f0  78 25 2d 71 25 21 38 3a  71 25 21 32 38 2d 3d 6d  |x%-q%!8:q%!28-=m|
00003100  79 25 2d 71 25 21 31 32  3a 71 25 21 33 32 2b 3d  |y%-q%!12:q%!32+=|
00003110  71 25 21 31 36 2d 6d 78  25 3a 71 25 21 33 36 2b  |q%!16-mx%:q%!36+|
00003120  3d 71 25 21 32 30 2d 6d  79 25 0d 16 da 21 71 25  |=q%!20-my%...!q%|
00003130  21 34 3d 35 3a c8 99 22  57 69 6d 70 5f 44 72 61  |!4=5:.."Wimp_Dra|
00003140  67 42 6f 78 22 2c 2c 71  25 3a e1 0d 16 e4 04 0d  |gBox",,q%:......|
00003150  16 ee 0e dd f2 73 61 76  65 64 61 74 61 0d 16 f8  |.....savedata...|
00003160  16 e7 71 25 21 31 32 3c  3e 73 61 76 65 72 65 66  |..q%!12<>saveref|
00003170  25 3a e1 0d 17 02 15 66  69 6c 65 24 3d a4 7a 74  |%:.....file$=.zt|
00003180  73 28 71 25 2b 34 34 29  0d 17 0c 0e f2 73 61 76  |s(q%+44).....sav|
00003190  65 64 61 74 61 31 0d 17  16 05 e1 0d 17 20 04 0d  |edata1....... ..|
000031a0  17 2a 20 dd f2 73 61 76  65 64 61 74 61 31 3a f2  |.* ..savedata1:.|
000031b0  63 6c 6f 73 65 77 28 77  5f 73 61 76 65 25 29 0d  |closew(w_save%).|
000031c0  17 34 20 f2 73 61 76 65  66 69 6c 65 28 73 61 76  |.4 .savefile(sav|
000031d0  65 72 65 61 73 6f 6e 25  2c 66 69 6c 65 24 29 0d  |ereason%,file$).|
000031e0  17 3e 1c 73 61 76 65 72  65 61 73 6f 6e 25 3d 2d  |.>.savereason%=-|
000031f0  31 3a f2 6c 6f 61 64 6d  65 73 73 0d 17 48 05 e1  |1:.loadmess..H..|
00003200  0d 17 52 04 0d 17 5c 0d  dd f2 70 72 65 71 75 69  |..R...\...prequi|
00003210  74 0d 17 66 1f e7 a4 61  6c 74 65 72 65 64 5f 61  |t..f...altered_a|
00003220  74 3a f2 61 63 6b 72 65  63 3a f2 71 71 75 69 74  |t:.ackrec:.qquit|
00003230  0d 17 70 05 e1 0d 17 7a  04 0d 17 84 39 dd f2 61  |..p....z....9..a|
00003240  63 6b 72 65 63 3a 71 25  21 31 32 3d 72 65 66 25  |ckrec:q%!12=ref%|
00003250  3a c8 99 20 22 57 69 6d  70 5f 53 65 6e 64 4d 65  |:.. "Wimp_SendMe|
00003260  73 73 61 67 65 22 2c 31  39 2c 71 25 2c 74 61 73  |ssage",19,q%,tas|
00003270  6b 25 0d 17 8e 3a dd f2  71 71 75 69 74 3a f2 73  |k%...:..qquit:.s|
00003280  74 6f 70 28 31 2c 22 4c  6f 73 65 20 73 63 72 65  |top(1,"Lose scre|
00003290  65 6e 20 61 6e 64 20 71  75 69 74 20 41 74 65 6c  |en and quit Atel|
000032a0  69 65 72 22 2c 61 73 24  2c 2d 31 29 0d 17 98 05  |ier",as$,-1)....|
000032b0  e1 0d 17 a2 05 20 0d 17  ac 13 dd f2 65 6e 74 65  |..... ......ente|
000032c0  72 5f 61 74 65 6c 69 65  72 0d 17 b6 20 ea 85 3a  |r_atelier... ..:|
000032d0  ee 85 ea 3a f7 85 3a f2  72 65 73 74 6f 72 65 77  |...:..:.restorew|
000032e0  69 6d 70 3a 85 9f 2c f6  24 0d 17 c0 23 65 6e 74  |imp:..,.$...#ent|
000032f0  65 72 25 3d 30 3a f2 72  75 6e 5f 61 74 3a f2 72  |er%=0:.run_at:.r|
00003300  65 73 74 6f 72 65 77 69  6d 70 3a e1 0d 17 ca 04  |estorewimp:.....|
00003310  0d 17 d4 15 dd f2 73 61  76 65 66 69 6c 65 28 6e  |......savefile(n|
00003320  25 2c 66 24 29 0d 17 de  20 ea 85 3a ee 85 ea 3a  |%,f$)... ..:...:|
00003330  f7 85 3a f2 72 65 73 74  6f 72 65 77 69 6d 70 3a  |..:.restorewimp:|
00003340  85 9f 2c f6 24 0d 17 e8  22 f2 73 61 76 65 5f 61  |..,.$...".save_a|
00003350  74 28 6e 25 2c 66 24 29  3a f2 72 65 73 74 6f 72  |t(n%,f$):.restor|
00003360  65 77 69 6d 70 3a e1 0d  17 f2 04 0d 17 fc 17 dd  |ewimp:..........|
00003370  f2 73 61 76 65 77 69 6d  70 3a e7 6f 73 25 3d 31  |.savewimp:.os%=1|
00003380  3a e1 0d 18 06 14 e7 20  77 69 6d 70 73 61 76 65  |:...... wimpsave|
00003390  64 25 20 8c 20 e1 0d 18  10 10 77 69 6d 70 73 61  |d% . .....wimpsa|
000033a0  76 65 64 25 3d b9 0d 18  1a 26 ea 49 25 2c 4a 25  |ved%=....&.I%,J%|
000033b0  3a f4 20 53 59 53 22 57  69 6d 70 5f 43 6f 6d 6d  |:. SYS"Wimp_Comm|
000033c0  61 6e 64 57 69 6e 64 6f  77 22 2c 31 0d 18 24 1e  |andWindow",1..$.|
000033d0  f2 6e 6f 72 6d 70 6f 69  6e 74 3a 6d 6f 64 65 25  |.normpoint:mode%|
000033e0  3d eb 3a f2 6d 6f 64 65  31 35 0d 18 2e 0a 2a 66  |=.:.mode15....*f|
000033f0  78 32 32 39 0d 18 38 05  e1 0d 18 42 04 0d 18 4c  |x229..8....B...L|
00003400  1a dd f2 72 65 73 74 6f  72 65 77 69 6d 70 3a e7  |...restorewimp:.|
00003410  6f 73 25 3d 31 3a e1 0d  18 56 16 e7 20 ac 20 77  |os%=1:...V.. . w|
00003420  69 6d 70 73 61 76 65 64  25 20 8c 20 e1 0d 18 60  |impsaved% . ...`|
00003430  10 77 69 6d 70 73 61 76  65 64 25 3d a3 0d 18 6a  |.wimpsaved%=...j|
00003440  0c 2a 66 78 32 32 39 2c  31 0d 18 74 1e c8 99 20  |.*fx229,1..t... |
00003450  22 57 69 6d 70 5f 43 6f  6d 6d 61 6e 64 57 69 6e  |"Wimp_CommandWin|
00003460  64 6f 77 22 2c 2d 31 0d  18 7e 47 c8 99 20 22 57  |dow",-1..~G.. "W|
00003470  69 6d 70 5f 53 65 74 4d  6f 64 65 22 2c 6d 6f 64  |imp_SetMode",mod|
00003480  65 25 3a 87 3a c8 99 22  57 69 6d 70 5f 46 6f 72  |e%:.:.."Wimp_For|
00003490  63 65 52 65 64 72 61 77  22 2c 2d 31 2c 2d 31 45  |ceRedraw",-1,-1E|
000034a0  39 2c 2d 31 45 39 2c 31  45 39 2c 31 45 39 0d 18  |9,-1E9,1E9,1E9..|
000034b0  88 05 e1 0d 18 92 04 0d  18 9c 0c dd f2 6d 6f 64  |.............mod|
000034c0  65 31 35 0d 18 a6 06 ea  85 0d 18 b0 92 ee 85 ea  |e15.............|
000034d0  3a f7 85 3a 85 39 39 2c  22 41 74 65 6c 69 65 72  |:..:.99,"Atelier|
000034e0  20 6e 65 65 64 73 20 74  6f 20 75 73 65 20 4d 4f  | needs to use MO|
000034f0  44 45 20 31 35 20 61 6e  64 20 74 68 65 72 65 20  |DE 15 and there |
00003500  69 73 20 6e 6f 74 20 65  6e 6f 75 67 68 20 52 41  |is not enough RA|
00003510  4d 21 20 59 6f 75 20 6d  75 73 74 20 75 73 65 20  |M! You must use |
00003520  74 68 65 20 74 61 73 6b  20 6d 61 6e 61 67 65 72  |the task manager|
00003530  20 74 6f 20 6d 61 6b 65  20 61 74 20 6c 65 61 73  | to make at leas|
00003540  74 20 31 36 30 6b 20 6f  66 20 73 63 72 65 65 6e  |t 160k of screen|
00003550  20 61 76 61 69 6c 61 62  6c 65 22 0d 18 ba 09 eb  | available".....|
00003560  31 35 3a e1 0d 18 c4 04  0d 18 ce 13 dd f2 66 69  |15:...........fi|
00003570  6e 64 6d 6f 73 3a 6f 73  25 3d 31 0d 18 d8 0f ea  |ndmos:os%=1.....|
00003580  85 3a ee 85 ea 3a f7 85  3a e1 0d 18 e2 07 f7 2b  |.:...:..:......+|
00003590  31 0d 18 ec 0b 6f 73 25  3d 32 3a e1 0d 18 f6 04  |1....os%=2:.....|
000035a0  0d 19 00 14 dd f2 63 68  65 63 6b 6d 6f 73 3a 6f  |......checkmos:o|
000035b0  73 25 3d 31 0d 19 0a 16  ea 85 3a ee 85 ea 3a f7  |s%=1......:...:.|
000035c0  85 3a f2 6d 6f 73 31 32  3a e0 0d 19 14 07 f7 2b  |.:.mos12:......+|
000035d0  31 0d 19 1e 0b 6f 73 25  3d 32 3a e1 0d 19 28 04  |1....os%=2:...(.|
000035e0  0d 19 32 0b dd f2 6d 6f  73 31 32 0d 19 3c 09 eb  |..2...mos12..<..|
000035f0  31 35 3a 87 0d 19 46 0d  c8 99 20 26 34 30 30 43  |15:...F... &400C|
00003600  30 0d 19 50 0c 65 6e 74  65 72 25 3d 30 0d 19 5a  |0..P.enter%=0..Z|
00003610  0b f2 72 75 6e 5f 61 74  0d 19 64 10 eb 31 32 3a  |..run_at..d..12:|
00003620  2a 64 65 73 6b 74 6f 70  0d 19 6e 05 e0 0d 19 78  |*desktop..n....x|
00003630  04 0d 19 82 14 dd f2 73  74 6f 72 65 28 f8 20 41  |.......store(. A|
00003640  24 2c 66 24 29 0d 19 8c  1b ea 49 25 2c 43 25 2c  |$,f$).....I%,C%,|
00003650  54 24 3a 54 24 3d 66 24  3a e7 54 24 3e 22 22 8c  |T$:T$=f$:.T$>"".|
00003660  0d 19 96 19 e3 49 25 3d  31 b8 a9 54 24 3a 43 25  |.....I%=1..T$:C%|
00003670  3d 97 c1 54 24 2c 49 25  29 0d 19 a0 22 e7 43 25  |=..T$,I%)...".C%|
00003680  3e 36 34 80 43 25 3c 39  31 c1 54 24 2c 49 25 2c  |>64.C%<91.T$,I%,|
00003690  31 29 3d bd 28 43 25 2b  33 32 29 0d 19 aa 05 ed  |1)=.(C%+32).....|
000036a0  0d 19 b4 05 cd 0d 19 be  1a e7 a7 54 24 2c 22 24  |...........T$,"$|
000036b0  73 63 72 61 70 3e 22 29  3d 30 41 24 3d 66 24 0d  |scrap>")=0A$=f$.|
000036c0  19 c8 05 e1 0d 19 d2 04  0d 19 dc 04 0d 19 e6 47  |...............G|
000036d0  f4 20 2d 2d 2d 2d 41 54  45 4c 49 45 52 20 42 49  |. ----ATELIER BI|
000036e0  54 53 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |TS--------------|
000036f0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00003710  2d 2d 2d 0d 19 f0 0c dd  f2 72 75 6e 5f 61 74 0d  |---......run_at.|
00003720  19 fa 3c f4 20 3b 7b 7b  20 68 65 72 65 2c 20 63  |..<. ;{{ here, c|
00003730  6f 70 79 20 74 68 65 20  62 61 63 6b 67 72 6f 75  |opy the backgrou|
00003740  6e 64 20 73 63 72 65 65  6e 20 74 6f 20 74 68 65  |nd screen to the|
00003750  20 66 6f 72 65 67 72 6f  75 6e 64 0d 1a 04 3e f4  | foreground...>.|
00003760  20 3b 7b 7b 20 61 6e 64  20 64 6f 20 74 68 65 20  | ;{{ and do the |
00003770  62 69 7a 2e 20 4e 42 20  61 6c 6c 20 45 52 52 4f  |biz. NB all ERRO|
00003780  52 20 74 72 61 70 73 20  65 74 63 20 4d 55 53 54  |R traps etc MUST|
00003790  20 62 65 20 4c 4f 43 41  4c 0d 1a 0e 0d f2 73 61  | be LOCAL.....sa|
000037a0  76 65 77 69 6d 70 0d 1a  18 0e f2 6e 6f 72 6d 70  |vewimp.....normp|
000037b0  6f 69 6e 74 0d 1a 22 2c  ef 20 32 33 2c 32 35 35  |oint..",. 23,255|
000037c0  2c 32 35 35 2c 32 35 35  2c 32 35 35 2c 32 35 35  |,255,255,255,255|
*
000037e0  0d 1a 2c 0e 63 61 74 25  21 30 3d 31 34 38 0d 1a  |..,.cat%!0=148..|
000037f0  36 0d 63 61 74 25 21 34  3d 2d 31 0d 1a 40 26 c8  |6.cat%!4=-1..@&.|
00003800  99 20 22 4f 53 5f 52 65  61 64 56 64 75 56 61 72  |. "OS_ReadVduVar|
00003810  69 61 62 6c 65 73 22 2c  63 61 74 25 2c 63 61 74  |iables",cat%,cat|
00003820  25 0d 1a 4a 15 21 74 6f  70 73 63 72 65 65 6e 25  |%..J.!topscreen%|
00003830  3d 21 63 61 74 25 0d 1a  54 12 f2 75 6e 73 65 74  |=!cat%..T..unset|
00003840  73 6f 66 74 6b 65 79 73  0d 1a 5e 19 c8 99 20 22  |softkeys..^... "|
00003850  4f 53 5f 52 65 6d 6f 76  65 43 75 72 73 6f 72 73  |OS_RemoveCursors|
00003860  22 0d 1a 68 0f f2 73 65  74 76 65 63 74 6f 72 73  |"..h..setvectors|
00003870  0d 1a 72 12 d6 20 75 6e  64 6f 72 65 73 74 6f 72  |..r.. undorestor|
00003880  65 25 0d 1a 7c 11 f2 65  6e 74 65 72 5f 61 63 74  |e%..|..enter_act|
00003890  69 6f 6e 0d 1a 86 0d d6  20 63 6f 6c 6f 75 72 25  |ion..... colour%|
000038a0  0d 1a 90 12 d6 20 6d 6f  75 73 65 63 6f 6c 6f 75  |..... mousecolou|
000038b0  72 25 0d 1a 9a 0f d6 20  6c 69 66 74 64 6f 77 6e  |r%..... liftdown|
000038c0  25 0d 1a a4 12 ef 35 3a  d6 20 68 65 6c 70 74 65  |%.....5:. helpte|
000038d0  78 74 25 0d 1a ae 0b f2  75 70 64 61 74 65 0d 1a  |xt%.....update..|
000038e0  b8 0c f2 61 74 65 6c 69  65 72 0d 1a c2 0d d6 20  |...atelier..... |
000038f0  6c 69 66 74 75 70 25 0d  1a cc 0f d6 20 75 6e 64  |liftup%..... und|
00003900  6f 73 61 76 65 25 0d 1a  d6 11 f2 75 6e 73 65 74  |osave%.....unset|
00003910  76 65 63 74 6f 72 73 0d  1a e0 15 f4 20 50 52 4f  |vectors..... PRO|
00003920  43 73 65 74 73 6f 66 74  6b 65 79 73 0d 1a ea 10  |Csetsoftkeys....|
00003930  f2 72 65 73 74 6f 72 65  77 69 6d 70 0d 1a f4 05  |.restorewimp....|
00003940  e1 0d 1a fe 04 0d 1b 08  10 dd f2 73 65 74 76 65  |...........setve|
00003950  63 74 6f 72 73 0d 1b 12  16 e7 20 76 65 63 74 6f  |ctors..... vecto|
00003960  72 73 5f 73 65 74 25 20  8c 20 e1 0d 1b 1c 22 c8  |rs_set% . ....".|
00003970  99 20 22 4f 53 5f 43 6c  61 69 6d 22 2c 26 31 44  |. "OS_Claim",&1D|
00003980  2c 64 75 66 66 5f 63 61  6c 6c 25 2c 30 0d 1b 26  |,duff_call%,0..&|
00003990  14 f2 73 65 74 5f 61 62  6f 72 74 5f 74 72 61 70  |..set_abort_trap|
000039a0  73 0d 1b 30 12 76 65 63  74 6f 72 73 5f 73 65 74  |s..0.vectors_set|
000039b0  25 3d b9 0d 1b 3a 05 e1  0d 1b 44 04 0d 1b 4e 12  |%=...:....D...N.|
000039c0  dd f2 75 6e 73 65 74 76  65 63 74 6f 72 73 0d 1b  |..unsetvectors..|
000039d0  58 18 e7 20 ac 20 76 65  63 74 6f 72 73 5f 73 65  |X.. . vectors_se|
000039e0  74 25 20 8c 20 e1 0d 1b  62 24 c8 99 20 22 4f 53  |t% . ...b$.. "OS|
000039f0  5f 52 65 6c 65 61 73 65  22 2c 26 31 44 2c 64 75  |_Release",&1D,du|
00003a00  66 66 5f 63 61 6c 6c 25  2c 30 0d 1b 6c 16 f2 75  |ff_call%,0..l..u|
00003a10  6e 73 65 74 5f 61 62 6f  72 74 5f 74 72 61 70 73  |nset_abort_traps|
00003a20  0d 1b 76 12 76 65 63 74  6f 72 73 5f 73 65 74 25  |..v.vectors_set%|
00003a30  3d a3 0d 1b 80 05 e1 0d  1b 8a 04 0d 1b 94 12 dd  |=...............|
00003a40  f2 65 6e 74 65 72 5f 61  63 74 69 6f 6e 0d 1b 9e  |.enter_action...|
00003a50  15 ee 20 85 20 ea 3a f2  65 72 72 6f 72 5f 61 74  |.. . .:.error_at|
00003a60  3a e1 0d 1b a8 0f c8 8e  20 65 6e 74 65 72 25 20  |:....... enter% |
00003a70  ca 0d 1b b2 1d c9 30 3a  f4 20 6e 6f 20 61 63 74  |......0:. no act|
00003a80  69 6f 6e 2c 6a 75 73 74  20 65 6e 74 65 72 0d 1b  |ion,just enter..|
00003a90  bc 17 c9 31 3a f4 20 63  6f 6d 70 61 63 74 65 64  |...1:. compacted|
00003aa0  20 6c 6f 61 64 0d 1b c6  0d 2a 55 6e 44 65 66 69  | load....*UnDefi|
00003ab0  6e 65 0d 1b d0 17 2a 53  65 74 50 6f 73 69 74 69  |ne....*SetPositi|
00003ac0  6f 6e 20 30 20 31 30 32  33 0d 1b da 27 47 25 3d  |on 0 1023...'G%=|
00003ad0  63 61 74 25 3a 24 63 61  74 25 3d 66 24 3a d6 20  |cat%:$cat%=f$:. |
00003ae0  63 6f 6d 5f 75 70 64 61  74 65 5f 69 6e 66 6f 25  |com_update_info%|
00003af0  0d 1b e4 13 ff 22 50 6c  6f 74 46 69 6c 65 20 22  |....."PlotFile "|
00003b00  2b 66 24 0d 1b ee 24 65  6e 74 65 72 25 3d 30 3a  |+f$...$enter%=0:|
00003b10  f2 73 74 6f 72 65 28 24  73 63 72 65 65 6e 5f 73  |.store($screen_s|
00003b20  74 72 25 2c 66 24 29 0d  1b f8 35 c9 32 3a 24 66  |tr%,f$)...5.2:$f|
00003b30  69 6c 65 5f 73 74 72 25  3d 66 24 20 20 3a f4 20  |ile_str%=f$  :. |
00003b40  73 70 72 69 74 65 73 20  2d 20 68 61 6e 64 6c 65  |sprites - handle|
00003b50  64 20 62 79 20 61 74 65  6c 69 65 72 0d 1c 02 0f  |d by atelier....|
00003b60  c9 33 3a 24 63 61 74 25  3d 66 24 0d 1c 0c 0b 47  |.3:$cat%=f$....G|
00003b70  25 3d 63 61 74 25 0d 1c  16 14 d6 20 63 6f 6d 70  |%=cat%..... comp|
00003b80  61 63 74 65 64 6c 6f 61  64 25 0d 1c 20 0f d6 20  |actedload%.. .. |
00003b90  75 6e 64 6f 73 61 76 65  25 0d 1c 2a 0c 65 6e 74  |undosave%..*.ent|
00003ba0  65 72 25 3d 30 0d 1c 34  05 cb 0d 1c 3e 05 e1 0d  |er%=0..4....>...|
00003bb0  1c 48 04 0d 1c 52 10 dd  a4 61 6c 74 65 72 65 64  |.H...R...altered|
00003bc0  5f 61 74 0d 1c 5c 42 f4  20 3b 7b 7b 20 72 65 74  |_at..\B. ;{{ ret|
00003bd0  75 72 6e 20 54 52 55 45  20 69 66 20 79 6f 75 20  |urn TRUE if you |
00003be0  77 6f 75 6c 64 20 6c 6f  73 65 20 61 6e 79 20 64  |would lose any d|
00003bf0  61 74 61 20 69 66 20 74  68 65 79 20 71 75 69 74  |ata if they quit|
00003c00  20 6a 75 73 74 0d 1c 66  3e f4 20 3b 7b 7b 20 6e  | just..f>. ;{{ n|
00003c10  6f 77 20 28 69 65 20 74  68 65 79 20 68 61 76 65  |ow (ie they have|
00003c20  20 61 6c 74 65 72 65 64  20 73 63 72 65 65 6e 2f  | altered screen/|
00003c30  73 70 72 69 74 65 73 2f  62 72 75 73 68 65 73 20  |sprites/brushes |
00003c40  65 74 63 0d 1c 70 43 f4  20 3b 7b 7b 20 73 69 6e  |etc..pC. ;{{ sin|
00003c50  63 65 20 6c 61 73 74 20  73 61 76 65 2f 6c 6f 61  |ce last save/loa|
00003c60  64 2e 20 4a 75 73 74 20  72 65 74 75 72 6e 20 46  |d. Just return F|
00003c70  41 4c 53 45 20 69 66 20  79 6f 75 20 64 6f 6e 27  |ALSE if you don'|
00003c80  74 20 63 61 72 65 0d 1c  7a 0e 3d ac 20 74 65 73  |t care..z.=. tes|
00003c90  74 69 6e 67 0d 1c 84 04  0d 1c 8e 19 dd a4 6f 6b  |ting..........ok|
00003ca0  66 69 6c 65 5f 61 74 28  66 24 2c 73 25 2c 74 25  |file_at(f$,s%,t%|
00003cb0  29 0d 1c 98 49 e7 20 74  25 3d 26 44 37 45 20 84  |)...I. t%=&D7E .|
00003cc0  20 74 25 3d 26 44 33 41  20 84 20 74 25 3d 26 44  | t%=&D3A . t%=&D|
00003cd0  37 46 20 84 20 74 25 3d  26 44 33 39 20 84 20 74  |7F . t%=&D39 . t|
00003ce0  25 3d 26 46 46 39 20 84  20 74 25 3d 26 44 45 32  |%=&FF9 . t%=&DE2|
00003cf0  20 8c 20 3d b9 20 8b 20  3d a3 0d 1c a2 04 0d 1c  | . =. . =.......|
00003d00  ac 18 dd f2 6c 6f 61 64  66 69 6c 65 28 66 24 2c  |....loadfile(f$,|
00003d10  73 25 2c 74 25 29 0d 1c  b6 20 ea 85 3a ee 85 ea  |s%,t%)... ..:...|
00003d20  3a f7 85 3a f2 72 65 73  74 6f 72 65 77 69 6d 70  |:..:.restorewimp|
00003d30  3a 85 9f 2c f6 24 0d 1c  c0 25 f2 6c 6f 61 64 5f  |:..,.$...%.load_|
00003d40  61 74 28 66 24 2c 73 25  2c 74 25 29 3a f2 72 65  |at(f$,s%,t%):.re|
00003d50  73 74 6f 72 65 77 69 6d  70 3a e1 0d 1c ca 04 0d  |storewimp:......|
00003d60  1c d4 17 dd f2 6c 6f 61  64 5f 61 74 28 66 24 2c  |.....load_at(f$,|
00003d70  73 25 2c 74 25 29 0d 1c  de 0b c8 8e 20 74 25 20  |s%,t%)...... t% |
00003d80  ca 0d 1c e8 13 c9 26 44  37 46 2c 26 46 46 39 2c  |......&D7F,&FF9,|
00003d90  26 44 45 32 0d 1c f2 1e  c8 99 20 22 4f 53 5f 46  |&DE2...... "OS_F|
00003da0  69 6e 64 22 2c 26 34 30  2c 66 24 20 b8 20 68 64  |ind",&40,f$ . hd|
00003db0  6c 25 0d 1c fc 1e c8 99  20 22 4f 53 5f 47 42 50  |l%...... "OS_GBP|
00003dc0  42 22 2c 34 2c 68 64 6c  25 2c 63 61 74 25 2c 31  |B",4,hdl%,cat%,1|
00003dd0  0d 1d 06 19 c8 99 20 22  4f 53 5f 46 69 6e 64 22  |...... "OS_Find"|
00003de0  2c 26 30 30 2c 68 64 6c  25 0d 1d 10 05 cb 0d 1d  |,&00,hdl%.......|
00003df0  1a 0b c8 8e 20 74 25 20  ca 0d 1d 24 3b c9 26 44  |.... t% ...$;.&D|
00003e00  37 45 3a ff 22 4c 4f 41  44 20 22 2b 66 24 2b 22  |7E:."LOAD "+f$+"|
00003e10  20 22 2b c3 7e 28 62 72  75 73 68 25 29 3a f2 73  | "+.~(brush%):.s|
00003e20  74 6f 72 65 28 24 62 72  75 73 68 5f 73 74 72 25  |tore($brush_str%|
00003e30  2c 66 24 29 0d 1d 2e 45  c9 26 44 33 41 3a ff 22  |,f$)...E.&D3A:."|
00003e40  4c 4f 41 44 20 22 2b 66  24 2b 22 20 22 2b c3 7e  |LOAD "+f$+" "+.~|
00003e50  28 62 72 70 61 74 74 25  29 3a f2 73 74 6f 72 65  |(brpatt%):.store|
00003e60  28 24 70 61 74 74 65 72  6e 5f 73 74 72 25 2c 66  |($pattern_str%,f|
00003e70  24 29 3a 21 70 6d 25 3d  31 0d 1d 38 1a c9 26 44  |$):!pm%=1..8..&D|
00003e80  37 46 3a 65 6e 74 65 72  25 3d 31 3a f2 72 75 6e  |7F:enter%=1:.run|
00003e90  5f 61 74 0d 1d 42 1b c9  26 44 33 39 3a f2 66 6f  |_at..B..&D39:.fo|
00003ea0  72 6d 75 6c 61 5f 6c 6f  61 64 28 66 24 29 0d 1d  |rmula_load(f$)..|
00003eb0  4c 32 c9 26 46 46 39 3a  65 6e 74 65 72 25 3d 32  |L2.&FF9:enter%=2|
00003ec0  3a f2 73 74 6f 72 65 28  24 73 70 72 69 74 65 5f  |:.store($sprite_|
00003ed0  73 74 72 25 2c 66 24 29  3a f2 72 75 6e 5f 61 74  |str%,f$):.run_at|
00003ee0  0d 1d 56 32 c9 26 44 45  32 3a 65 6e 74 65 72 25  |..V2.&DE2:enter%|
00003ef0  3d 33 3a f2 73 74 6f 72  65 28 24 73 63 72 65 65  |=3:.store($scree|
00003f00  6e 5f 73 74 72 25 2c 66  24 29 3a f2 72 75 6e 5f  |n_str%,f$):.run_|
00003f10  61 74 0d 1d 60 05 cb 0d  1d 6a 05 e1 0d 1d 74 04  |at..`....j....t.|
00003f20  0d 1d 7e 14 dd f2 73 61  76 65 5f 61 74 28 6e 25  |..~...save_at(n%|
00003f30  2c 66 24 29 0d 1d 88 10  d6 20 73 61 76 65 63 68  |,f$)..... savech|
00003f40  65 63 6b 25 0d 1d 92 0b  c8 8e 20 6e 25 20 ca 0d  |eck%...... n% ..|
00003f50  1d 9c 0c c9 30 2c 31 2c  32 2c 33 0d 1d a6 3d c8  |....0,1,2,3...=.|
00003f60  99 20 22 4f 53 5f 46 69  6c 65 22 2c 26 30 41 2c  |. "OS_File",&0A,|
00003f70  66 24 2c 26 46 46 46 2c  2c 63 61 74 25 2c 63 61  |f$,&FFF,,cat%,ca|
00003f80  74 25 20 20 20 3a f4 20  73 61 76 65 73 20 64 75  |t%   :. saves du|
00003f90  6d 6d 79 20 66 69 6c 65  0d 1d b0 0d f2 73 61 76  |mmy file.....sav|
00003fa0  65 77 69 6d 70 0d 1d ba  18 63 61 74 25 21 30 3d  |ewimp....cat%!0=|
00003fb0  31 34 38 3a 63 61 74 25  21 34 3d 2d 31 0d 1d c4  |148:cat%!4=-1...|
00003fc0  26 c8 99 20 22 4f 53 5f  52 65 61 64 56 64 75 56  |&.. "OS_ReadVduV|
00003fd0  61 72 69 61 62 6c 65 73  22 2c 63 61 74 25 2c 63  |ariables",cat%,c|
00003fe0  61 74 25 0d 1d ce 2b 21  74 6f 70 73 63 72 65 65  |at%...+!topscree|
00003ff0  6e 25 3d 21 63 61 74 25  3a c8 99 20 22 4f 53 5f  |n%=!cat%:.. "OS_|
00004000  52 65 6d 6f 76 65 43 75  72 73 6f 72 73 22 0d 1d  |RemoveCursors"..|
00004010  d8 12 d6 20 75 6e 64 6f  72 65 73 74 6f 72 65 25  |... undorestore%|
00004020  0d 1d e2 0b c8 8e 20 6e  25 20 ca 0d 1d ec 32 c9  |...... n% ....2.|
00004030  30 3a f2 63 6f 6d 70 72  65 73 73 65 64 73 61 76  |0:.compressedsav|
00004040  65 28 66 24 29 3a f2 73  74 6f 72 65 28 24 73 63  |e(f$):.store($sc|
00004050  72 65 65 6e 5f 73 74 72  25 2c 66 24 29 0d 1d f6  |reen_str%,f$)...|
00004060  30 c9 31 3a ff 22 53 43  52 45 45 4e 53 41 56 45  |0.1:."SCREENSAVE|
00004070  20 22 2b 66 24 3a f2 73  74 6f 72 65 28 24 73 63  | "+f$:.store($sc|
00004080  72 65 65 6e 5f 73 74 72  25 2c 66 24 29 0d 1e 00  |reen_str%,f$)...|
00004090  33 c9 32 3a f2 63 6f 6d  70 61 63 74 65 64 73 61  |3.2:.compactedsa|
000040a0  76 65 28 30 2c 66 24 29  3a f2 73 74 6f 72 65 28  |ve(0,f$):.store(|
000040b0  24 73 63 72 65 65 6e 5f  73 74 72 25 2c 66 24 29  |$screen_str%,f$)|
000040c0  0d 1e 0a 33 c9 33 3a f2  63 6f 6d 70 61 63 74 65  |...3.3:.compacte|
000040d0  64 73 61 76 65 28 31 2c  66 24 29 3a f2 73 74 6f  |dsave(1,f$):.sto|
000040e0  72 65 28 24 73 63 72 65  65 6e 5f 73 74 72 25 2c  |re($screen_str%,|
000040f0  66 24 29 0d 1e 14 05 cb  0d 1e 1e 10 f2 72 65 73  |f$)..........res|
00004100  74 6f 72 65 77 69 6d 70  0d 1e 28 2b c9 34 3a ff  |torewimp..(+.4:.|
00004110  22 53 53 41 56 45 20 22  2b 66 24 3a f2 73 74 6f  |"SSAVE "+f$:.sto|
00004120  72 65 28 24 73 70 72 69  74 65 5f 73 74 72 25 2c  |re($sprite_str%,|
00004130  66 24 29 0d 1e 32 41 c9  35 3a ff 22 53 41 56 45  |f$)..2A.5:."SAVE|
00004140  20 22 2b 66 24 2b 22 20  22 2b c3 7e 28 62 72 75  | "+f$+" "+.~(bru|
00004150  73 68 25 29 2b 22 20 2b  32 30 30 30 22 3a f2 73  |sh%)+" +2000":.s|
00004160  74 6f 72 65 28 24 62 72  75 73 68 5f 73 74 72 25  |tore($brush_str%|
00004170  2c 66 24 29 0d 1e 3c 19  ff 22 53 45 54 54 59 50  |,f$)..<.."SETTYP|
00004180  45 20 22 2b 66 24 2b 22  20 44 37 45 22 0d 1e 46  |E "+f$+" D7E"..F|
00004190  42 c9 36 3a ff 22 53 41  56 45 20 22 2b 66 24 2b  |B.6:."SAVE "+f$+|
000041a0  22 20 22 2b c3 7e 28 62  72 70 61 74 74 25 29 2b  |" "+.~(brpatt%)+|
000041b0  22 20 2b 32 30 30 30 22  3a f2 73 74 6f 72 65 28  |" +2000":.store(|
000041c0  24 62 72 75 73 68 5f 73  74 72 25 2c 66 24 29 0d  |$brush_str%,f$).|
000041d0  1e 50 19 ff 22 53 45 54  54 59 50 45 20 22 2b 66  |.P.."SETTYPE "+f|
000041e0  24 2b 22 20 44 33 41 22  0d 1e 5a 05 cb 0d 1e 64  |$+" D3A"..Z....d|
000041f0  05 e1 0d 1e 6e 04 0d 1e  78 23 dd f2 73 65 74 66  |....n...x#..setf|
00004200  69 6c 65 5f 61 74 28 6e  25 2c f8 20 66 24 2c f8  |ile_at(n%,. f$,.|
00004210  20 73 25 2c f8 20 74 25  29 0d 1e 82 41 f4 20 3b  | s%,. t%)...A. ;|
00004220  7b 7b 20 73 65 74 75 70  20 75 70 20 66 24 20 74  |{{ setup up f$ t|
00004230  6f 20 62 65 20 66 69 6c  65 6e 61 6d 65 2c 20 73  |o be filename, s|
00004240  25 20 74 6f 20 65 73 74  69 6d 61 74 65 64 20 73  |% to estimated s|
00004250  69 7a 65 20 61 6e 64 20  74 25 0d 1e 8c 32 f4 20  |ize and t%...2. |
00004260  3b 7b 7b 20 74 6f 20 66  69 6c 65 74 79 70 65 20  |;{{ to filetype |
00004270  66 6f 72 20 66 69 6c 65  20 6f 66 20 69 6e 74 65  |for file of inte|
00004280  72 6e 61 6c 20 74 79 70  65 20 6e 25 0d 1e 96 33  |rnal type n%...3|
00004290  f4 20 3b 7b 7b 20 4e 42  20 73 25 3c 30 20 6d 65  |. ;{{ NB s%<0 me|
000042a0  61 6e 73 20 75 6e 6b 6e  6f 77 6e 20 73 69 7a 65  |ans unknown size|
000042b0  2c 20 74 72 79 20 69 74  20 61 6e 79 77 61 79 0d  |, try it anyway.|
000042c0  1e a0 0b c8 8e 20 6e 25  20 ca 0d 1e aa 29 c9 30  |..... n% ....).0|
000042d0  3a 74 25 3d 26 44 45 32  3a 66 24 3d 24 73 63 72  |:t%=&DE2:f$=$scr|
000042e0  65 65 6e 5f 73 74 72 25  20 3a 73 25 3d 26 32 38  |een_str% :s%=&28|
000042f0  30 30 30 0d 1e b4 29 c9  31 3a 74 25 3d 26 46 46  |000...).1:t%=&FF|
00004300  39 3a 66 24 3d 24 73 63  72 65 65 6e 5f 73 74 72  |9:f$=$screen_str|
00004310  25 20 3a 73 25 3d 26 32  38 30 30 30 0d 1e be 25  |% :s%=&28000...%|
00004320  c9 32 3a 74 25 3d 26 44  37 46 3a 66 24 3d 24 73  |.2:t%=&D7F:f$=$s|
00004330  63 72 65 65 6e 5f 73 74  72 25 20 3a 73 25 3d 2d  |creen_str% :s%=-|
00004340  31 0d 1e c8 25 c9 33 3a  74 25 3d 26 44 37 46 3a  |1...%.3:t%=&D7F:|
00004350  66 24 3d 24 73 63 72 65  65 6e 5f 73 74 72 25 20  |f$=$screen_str% |
00004360  3a 73 25 3d 2d 31 0d 1e  d2 3a c9 34 3a 74 25 3d  |:s%=-1...:.4:t%=|
00004370  26 46 46 39 3a 66 24 3d  24 73 70 72 69 74 65 5f  |&FF9:f$=$sprite_|
00004380  73 74 72 25 20 3a c8 99  20 22 4f 53 5f 53 70 72  |str% :.. "OS_Spr|
00004390  69 74 65 4f 70 22 2c 38  b8 2c 2c 2c 2c 2c 73 25  |iteOp",8.,,,,,s%|
000043a0  0d 1e dc 28 c9 35 3a 74  25 3d 26 44 37 45 3a 66  |...(.5:t%=&D7E:f|
000043b0  24 3d 24 62 72 75 73 68  5f 73 74 72 25 20 20 3a  |$=$brush_str%  :|
000043c0  73 25 3d 26 32 30 30 30  0d 1e e6 28 c9 36 3a 74  |s%=&2000...(.6:t|
000043d0  25 3d 26 44 33 41 3a 66  24 3d 24 70 61 74 74 65  |%=&D3A:f$=$patte|
000043e0  72 6e 5f 73 74 72 25 3a  73 25 3d 26 32 30 30 30  |rn_str%:s%=&2000|
000043f0  0d 1e f0 05 cb 0d 1e fa  05 e1 0d 1f 04 04 0d 1f  |................|
00004400  0e 15 dd f2 61 6e 69 6d  61 74 65 5f 73 70 72 69  |....animate_spri|
00004410  74 65 73 0d 1f 18 12 e3  20 66 72 61 6d 65 25 3d  |tes..... frame%=|
00004420  30 20 b8 20 37 0d 1f 22  21 d6 20 63 6f 6c 6f 75  |0 . 7.."!. colou|
00004430  72 25 3a c8 93 20 c8 90  20 30 2c 30 2c 31 30 32  |r%:.. .. 0,0,102|
00004440  33 2c 31 30 32 33 0d 1f  2c 2f ff 22 50 6c 6f 74  |3,1023..,/."Plot|
00004450  46 69 6c 65 20 41 6e 69  43 72 65 61 74 65 2e 53  |File AniCreate.S|
00004460  70 72 69 74 65 73 2e 46  72 61 6d 65 22 2b c3 66  |prites.Frame"+.f|
00004470  72 61 6d 65 25 0d 1f 36  0f d6 20 75 6e 64 6f 73  |rame%..6.. undos|
00004480  61 76 65 25 0d 1f 40 0f  78 31 25 3d 30 3a 79 31  |ave%..@.x1%=0:y1|
00004490  25 3d 30 0d 1f 4a 15 78  32 25 3d 31 30 32 33 3a  |%=0..J.x2%=1023:|
000044a0  79 32 25 3d 31 30 32 33  0d 1f 54 0f 78 33 25 3d  |y2%=1023..T.x3%=|
000044b0  30 3a 79 33 25 3d 30 0d  1f 5e 1a 78 34 25 3d 78  |0:y3%=0..^.x4%=x|
000044c0  33 25 2b 36 33 3a 79 34  25 3d 79 33 25 2b 31 32  |3%+63:y4%=y3%+12|
000044d0  37 0d 1f 68 24 73 74 65  70 25 3d 68 61 70 70 65  |7..h$step%=happe|
000044e0  6e 73 74 65 70 25 3a f2  73 63 72 65 65 6e 5f 73  |nstep%:.screen_s|
000044f0  65 6c 65 63 74 0d 1f 72  28 ff 22 44 65 66 69 6e  |elect..r(."Defin|
00004500  65 42 75 66 66 65 72 20  22 2b c3 28 53 54 4f 52  |eBuffer "+.(STOR|
00004510  45 25 29 2b 22 20 26 32  38 30 30 30 22 0d 1f 7c  |E%)+" &28000"..||
00004520  3f ff 22 43 6f 6d 5f 53  61 76 65 20 41 6e 69 43  |?."Com_Save AniC|
00004530  72 65 61 74 65 2e 53 70  72 69 74 65 73 2e 53 6d  |reate.Sprites.Sm|
00004540  61 6c 6c 22 2b c3 66 72  61 6d 65 25 2b 22 20 30  |all"+.frame%+" 0|
00004550  20 30 20 36 33 20 31 32  37 20 30 22 0d 1f 86 05  | 0 63 127 0"....|
00004560  ed 0d 1f 90 05 e1 0d 1f  9a 04 0d 1f a4 0d dd f2  |................|
00004570  61 6e 69 6d 61 74 65 0d  1f ae 14 e3 20 66 72 61  |animate..... fra|
00004580  6d 65 25 3d 34 35 20 b8  20 36 34 0d 1f af 18 e3  |me%=45 . 64.....|
00004590  20 21 70 63 25 3d 30 20  b8 20 32 35 35 20 88 20  | !pc%=0 . 255 . |
000045a0  32 35 35 0d 1f b8 21 d6  20 63 6f 6c 6f 75 72 25  |255...!. colour%|
000045b0  3a c8 93 20 c8 90 20 30  2c 30 2c 31 30 32 33 2c  |:.. .. 0,0,1023,|
000045c0  31 30 32 33 0d 1f c2 2c  ff 22 50 6c 6f 74 46 69  |1023...,."PlotFi|
000045d0  6c 65 20 53 68 69 70 53  70 72 2e 53 70 72 69 74  |le ShipSpr.Sprit|
000045e0  65 73 2e 53 68 69 70 22  2b c3 66 72 61 6d 65 25  |es.Ship"+.frame%|
000045f0  0d 1f cc 0f d6 20 75 6e  64 6f 73 61 76 65 25 0d  |..... undosave%.|
00004600  1f d6 0f 78 31 25 3d 30  3a 79 31 25 3d 30 0d 1f  |...x1%=0:y1%=0..|
00004610  e0 15 78 32 25 3d 31 30  32 33 3a 79 32 25 3d 31  |..x2%=1023:y2%=1|
00004620  30 32 33 0d 1f ea 1e 78  33 25 3d 31 30 32 34 2b  |023....x3%=1024+|
00004630  21 70 63 25 81 32 35 35  2a 39 36 3a 79 33 25 3d  |!pc%.255*96:y3%=|
00004640  30 0d 1f f4 1a 78 34 25  3d 78 33 25 2b 39 35 3a  |0....x4%=x3%+95:|
00004650  79 34 25 3d 79 33 25 2b  31 39 31 0d 1f fe 24 73  |y4%=y3%+191...$s|
00004660  74 65 70 25 3d 68 61 70  70 65 6e 73 74 65 70 25  |tep%=happenstep%|
00004670  3a f2 73 63 72 65 65 6e  5f 73 65 6c 65 63 74 0d  |:.screen_select.|
00004680  1f ff 05 ed 0d 20 08 28  ff 22 44 65 66 69 6e 65  |..... .(."Define|
00004690  42 75 66 66 65 72 20 22  2b c3 28 53 54 4f 52 45  |Buffer "+.(STORE|
000046a0  25 29 2b 22 20 26 32 38  30 30 30 22 0d 20 12 3f  |%)+" &28000". .?|
000046b0  ff 22 43 6f 6d 5f 53 61  76 65 20 53 68 69 70 53  |."Com_Save ShipS|
000046c0  70 72 2e 53 6d 61 6c 6c  2e 53 68 69 70 22 2b c3  |pr.Small.Ship"+.|
000046d0  66 72 61 6d 65 25 2b 22  20 31 30 32 34 20 30 20  |frame%+" 1024 0 |
000046e0  31 32 31 35 20 31 39 31  20 30 22 0d 20 1c 05 ed  |1215 191 0". ...|
000046f0  0d 20 26 05 e1 0d 20 30  04 0d 20 3a 0d dd f2 61  |. &... 0.. :...a|
00004700  74 65 6c 69 65 72 0d 20  44 0b 61 6e 67 6c 65 3d  |telier. D.angle=|
00004710  30 0d 20 4e 0c 2a 46 58  20 31 35 2c 30 0d 20 58  |0. N.*FX 15,0. X|
00004720  36 f4 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |6.              |
00004730  20 20 20 20 20 20 2d 2d  2d 2d 2d 2d 2d 2d 2d 4d  |      ---------M|
00004740  41 49 4e 20 4c 4f 4f 50  2d 2d 2d 2d 2d 2d 2d 2d  |AIN LOOP--------|
00004750  2d 2d 2d 0d 20 62 13 ee  20 85 20 ea 20 f2 65 72  |---. b.. . . .er|
00004760  72 6f 72 5f 61 74 0d 20  6c 05 f5 0d 20 76 05 f5  |ror_at. l... v..|
00004770  0d 20 80 0d 6d 72 63 74  78 31 25 3d 30 0d 20 8a  |. ..mrctx1%=0. .|
00004780  0d 6d 72 63 74 79 31 25  3d 30 0d 20 94 10 6d 72  |.mrcty1%=0. ..mr|
00004790  63 74 78 32 25 3d 31 32  37 39 0d 20 9e 10 6d 72  |ctx2%=1279. ..mr|
000047a0  63 74 79 32 25 3d 31 30  32 33 0d 20 a8 0d c8 8e  |cty2%=1023. ....|
000047b0  20 21 41 63 25 20 ca 0d  20 b2 39 c9 33 35 2c 33  | !Ac% .. .9.35,3|
000047c0  36 3a 6d 72 63 74 78 31  25 3d 33 32 3a 6d 72 63  |6:mrctx1%=32:mrc|
000047d0  74 79 31 25 3d 33 32 3a  6d 72 63 74 78 32 25 3d  |ty1%=32:mrctx2%=|
000047e0  31 32 31 36 3a 6d 72 63  74 79 32 25 3d 39 36 30  |1216:mrcty2%=960|
000047f0  0d 20 bc 28 c9 32 34 3a  e7 20 73 74 65 70 25 3e  |. .(.24:. step%>|
00004800  32 20 8c 20 f2 73 65 74  6c 69 6d 69 74 73 28 78  |2 . .setlimits(x|
00004810  73 25 2c 2d 79 73 25 29  0d 20 c6 4b c9 34 35 3a  |s%,-ys%). .K.45:|
00004820  6d 72 63 74 78 31 25 3d  2d 78 73 25 2d 78 6f 25  |mrctx1%=-xs%-xo%|
00004830  3a 6d 72 63 74 79 31 25  3d 2d 79 73 25 2d 79 6f  |:mrcty1%=-ys%-yo|
00004840  25 3a 6d 72 63 74 78 32  25 3d 31 32 38 30 2b 78  |%:mrctx2%=1280+x|
00004850  73 25 3a 6d 72 63 74 79  32 25 3d 31 30 32 34 2b  |s%:mrcty2%=1024+|
00004860  79 73 25 0d 20 d0 44 c9  37 31 3a e7 20 73 74 65  |ys%. .D.71:. ste|
00004870  70 25 3e 32 20 8c 20 6d  72 63 74 78 31 25 3d 78  |p%>2 . mrctx1%=x|
00004880  31 25 3a 6d 72 63 74 79  31 25 3d 79 32 25 3a 6d  |1%:mrcty1%=y2%:m|
00004890  72 63 74 78 32 25 3d 78  73 25 3a 6d 72 63 74 79  |rctx2%=xs%:mrcty|
000048a0  32 25 3d 2d 79 73 25 0d  20 da 2f c9 37 35 3a e7  |2%=-ys%. ./.75:.|
000048b0  20 73 74 65 70 25 3e 32  20 8c 20 6d 72 63 74 78  | step%>2 . mrctx|
000048c0  32 25 2d 3d 78 73 25 81  32 3a 6d 72 63 74 79 32  |2%-=xs%.2:mrcty2|
000048d0  25 2b 3d 79 73 25 0d 20  e4 61 c9 33 37 2c 34 30  |%+=ys%. .a.37,40|
000048e0  3a e7 20 a4 73 70 72 69  74 65 73 3e 30 20 8c 20  |:. .sprites>0 . |
000048f0  d6 20 6c 6f 63 61 74 65  73 70 72 69 74 65 25 3a  |. locatesprite%:|
00004900  c8 99 20 26 32 45 2c 34  30 2c 2c 21 73 70 72 73  |.. &2E,40,,!sprs|
00004910  74 72 20 b8 20 2c 2c 2c  78 73 25 2c 79 73 25 3a  |tr . ,,,xs%,ys%:|
00004920  f2 73 65 74 6c 69 6d 69  74 73 28 78 73 25 2a 32  |.setlimits(xs%*2|
00004930  2c 79 73 25 2a 34 29 0d  20 ee 05 cb 0d 20 f8 29  |,ys%*4). .... .)|
00004940  c8 97 20 c8 93 20 6d 72  63 74 78 31 25 2c 6d 72  |.. .. mrctx1%,mr|
00004950  63 74 79 31 25 2c 6d 72  63 74 78 32 25 2c 6d 72  |cty1%,mrctx2%,mr|
00004960  63 74 79 32 25 0d 21 02  11 f2 6d 6f 75 73 65 5f  |cty2%.!...mouse_|
00004970  68 61 6e 64 6c 65 0d 21  0c 21 e7 20 4d 42 3d 32  |handle.!.!. MB=2|
00004980  20 84 20 65 6e 74 65 72  25 20 8c 20 f2 6d 65 6e  | . enter% . .men|
00004990  75 63 61 6c 6c 65 64 0d  21 16 1a 41 63 43 4f 44  |ucalled.!..AcCOD|
000049a0  45 25 3d 3f 28 21 73 74  65 70 5f 63 6f 64 65 73  |E%=?(!step_codes|
000049b0  29 0d 21 20 1e 68 61 70  70 65 6e 73 74 65 70 25  |).! .happenstep%|
000049c0  3d 28 41 63 43 4f 44 45  25 20 80 20 31 35 29 0d  |=(AcCODE% . 15).|
000049d0  21 2a 22 73 74 65 70 63  6f 64 65 25 3d 3f 28 21  |!*"stepcode%=?(!|
000049e0  73 74 65 70 5f 63 6f 64  65 73 2b 73 74 65 70 25  |step_codes+step%|
000049f0  29 0d 21 34 52 e7 20 28  21 70 6d 25 3d 32 29 20  |).!4R. (!pm%=2) |
00004a00  80 20 28 73 74 65 70 63  6f 64 65 25 20 80 20 36  |. (stepcode% . 6|
00004a10  34 29 20 8c 20 73 74 65  70 25 2b 3d 31 3a f2 63  |4) . step%+=1:.c|
00004a20  6f 70 79 73 6f 72 74 3a  46 25 3d 73 74 65 70 25  |opysort:F%=step%|
00004a30  3a d6 20 68 65 6c 70 73  74 65 70 25 3a e5 20 8d  |:. helpstep%:. .|
00004a40  54 6a 61 0d 21 3e 0d c8  8e 20 21 41 63 25 20 ca  |Tja.!>... !Ac% .|
00004a50  0d 21 48 16 c9 36 30 2c  36 31 2c 36 32 2c 36 33  |.!H..60,61,62,63|
00004a60  2c 36 34 2c 36 35 0d 21  52 19 c8 8e 20 21 72 65  |,64,65.!R... !re|
00004a70  63 74 5f 62 72 75 73 68  5f 6d 6f 64 65 20 ca 0d  |ct_brush_mode ..|
00004a80  21 5c 1c c9 30 3a 41 63  43 4f 44 45 25 3d 41 63  |!\..0:AcCODE%=Ac|
00004a90  43 4f 44 45 25 20 80 20  31 39 31 0d 21 66 2a c9  |CODE% . 191.!f*.|
00004aa0  31 3a 68 61 70 70 65 6e  73 74 65 70 25 2b 3d 31  |1:happenstep%+=1|
00004ab0  3a 41 63 43 4f 44 45 25  3d 41 63 43 4f 44 45 25  |:AcCODE%=AcCODE%|
00004ac0  20 84 20 36 34 0d 21 70  28 e7 20 73 74 65 70 25  | . 64.!p(. step%|
00004ad0  3d 32 20 8c 20 73 74 65  70 63 6f 64 65 25 3d 73  |=2 . stepcode%=s|
00004ae0  74 65 70 63 6f 64 65 25  20 84 20 31 36 0d 21 7a  |tepcode% . 16.!z|
00004af0  2b c9 32 3a 68 61 70 70  65 6e 73 74 65 70 25 2b  |+.2:happenstep%+|
00004b00  3d 31 3a 41 63 43 4f 44  45 25 3d 41 63 43 4f 44  |=1:AcCODE%=AcCOD|
00004b10  45 25 20 80 20 31 39 31  0d 21 84 2b e7 20 73 74  |E% . 191.!.+. st|
00004b20  65 70 25 3d 31 20 8c 20  73 74 65 70 63 6f 64 65  |ep%=1 . stepcode|
00004b30  25 3d 73 74 65 70 63 6f  64 65 25 20 84 20 31 36  |%=stepcode% . 16|
00004b40  2b 33 32 0d 21 8e 05 cb  0d 21 98 05 cb 0d 21 a2  |+32.!....!....!.|
00004b50  52 e7 20 28 41 63 43 4f  44 45 25 20 80 20 36 34  |R. (AcCODE% . 64|
00004b60  29 20 80 20 73 74 65 70  25 3d 68 61 70 70 65 6e  |) . step%=happen|
00004b70  73 74 65 70 25 20 8c 20  73 74 65 70 25 3d 31 3a  |step% . step%=1:|
00004b80  f2 42 55 54 4f 46 46 28  34 29 3a 46 25 3d 73 74  |.BUTOFF(4):F%=st|
00004b90  65 70 25 3a d6 20 68 65  6c 70 73 74 65 70 25 0d  |ep%:. helpstep%.|
00004ba0  21 ac 4f e7 20 ac 20 28  41 63 43 4f 44 45 25 20  |!.O. . (AcCODE% |
00004bb0  80 20 36 34 29 20 80 20  73 74 65 70 25 3d 68 61  |. 64) . step%=ha|
00004bc0  70 70 65 6e 73 74 65 70  25 20 8c 20 73 74 65 70  |ppenstep% . step|
00004bd0  25 3d 73 74 65 70 25 2d  31 3a 46 25 3d 73 74 65  |%=step%-1:F%=ste|
00004be0  70 25 3a d6 20 68 65 6c  70 73 74 65 70 25 0d 21  |p%:. helpstep%.!|
00004bf0  b6 0a c8 8e 20 b9 20 ca  0d 21 c0 30 c9 28 ac 20  |.... . ..!.0.(. |
00004c00  28 41 63 43 4f 44 45 25  20 80 20 36 34 29 29 20  |(AcCODE% . 64)) |
00004c10  80 20 28 73 74 65 70 25  3d 68 61 70 70 65 6e 73  |. (step%=happens|
00004c20  74 65 70 25 2d 31 29 3a  0d 21 ca 35 e7 20 28 4d  |tep%-1):.!.5. (M|
00004c30  42 20 80 20 34 29 3d 34  20 8c 20 73 74 65 70 25  |B . 4)=4 . step%|
00004c40  3d 73 74 65 70 25 2b 31  3a 46 25 3d 73 74 65 70  |=step%+1:F%=step|
00004c50  25 3a d6 20 68 65 6c 70  73 74 65 70 25 0d 21 d4  |%:. helpstep%.!.|
00004c60  05 7f 0d 21 de 4e e7 20  ac 20 73 65 6c 65 63 74  |...!.N. . select|
00004c70  20 8c 20 e7 20 28 4d 42  20 80 20 34 29 3d 28 73  | . . (MB . 4)=(s|
00004c80  74 65 70 25 20 80 20 31  29 2a 34 20 8c 20 73 74  |tep% . 1)*4 . st|
00004c90  65 70 25 3d 73 74 65 70  25 2b 31 3a 46 25 3d 73  |ep%=step%+1:F%=s|
00004ca0  74 65 70 25 3a d6 20 68  65 6c 70 73 74 65 70 25  |tep%:. helpstep%|
00004cb0  0d 21 e8 49 e7 20 73 65  6c 65 63 74 20 8c 20 e7  |.!.I. select . .|
00004cc0  20 28 4d 42 20 80 20 34  29 20 8c 20 73 74 65 70  | (MB . 4) . step|
00004cd0  25 3d 73 74 65 70 25 2b  31 3a 46 25 3d 73 74 65  |%=step%+1:F%=ste|
00004ce0  70 25 3a d6 20 68 65 6c  70 73 74 65 70 25 3a f2  |p%:. helpstep%:.|
00004cf0  42 55 54 4f 46 46 28 34  29 0d 21 f2 05 cb 0d 21  |BUTOFF(4).!....!|
00004d00  fc 0d 2a 46 58 20 32 32  39 2c 31 0d 22 06 23 e7  |..*FX 229,1.".#.|
00004d10  20 73 74 65 70 25 3d 68  61 70 70 65 6e 73 74 65  | step%=happenste|
00004d20  70 25 20 8c 20 2a 46 58  20 32 32 39 2c 30 0d 22  |p% . *FX 229,0."|
00004d30  10 11 69 6e 61 63 74 69  6f 6e 3d 21 41 63 25 0d  |..inaction=!Ac%.|
00004d40  22 1a 21 e7 20 28 4d 42  20 80 20 31 29 3d 31 20  |".!. (MB . 1)=1 |
00004d50  8c 20 f2 61 64 6a 75 73  74 70 72 65 73 73 65 64  |. .adjustpressed|
00004d60  0d 22 24 09 45 25 3d 2d  31 0d 22 2e 16 e7 20 73  |."$.E%=-1."... s|
00004d70  74 65 70 63 6f 64 65 25  20 80 20 31 36 20 8c 0d  |tepcode% . 16 ..|
00004d80  22 38 0e c8 8e 20 73 74  65 70 25 20 ca 0d 22 42  |"8... step% .."B|
00004d90  1c c9 30 2c 31 3a 43 25  3d 4d 58 2d 78 30 25 3a  |..0,1:C%=MX-x0%:|
00004da0  44 25 3d 4d 59 2d 79 30  25 0d 22 4c 1c c9 32 2c  |D%=MY-y0%."L..2,|
00004db0  33 3a 43 25 3d 4d 58 2d  78 31 25 3a 44 25 3d 4d  |3:C%=MX-x1%:D%=M|
00004dc0  59 2d 79 31 25 0d 22 56  1c c9 34 2c 35 3a 43 25  |Y-y1%."V..4,5:C%|
00004dd0  3d 4d 58 2d 78 33 25 3a  44 25 3d 4d 59 2d 79 33  |=MX-x3%:D%=MY-y3|
00004de0  25 0d 22 60 05 cb 0d 22  6a 4d e7 20 73 74 65 70  |%."`..."jM. step|
00004df0  63 6f 64 65 25 20 80 20  33 32 20 8c 20 42 25 3d  |code% . 32 . B%=|
00004e00  43 25 2a 32 3a 43 25 3d  44 25 3a d6 20 63 61 6c  |C%*2:C%=D%:. cal|
00004e10  63 5f 72 61 64 69 75 73  25 3a 43 25 3d 21 52 45  |c_radius%:C%=!RE|
00004e20  53 55 4c 54 58 2f 32 3a  45 25 3d 32 20 8b 20 45  |SULTX/2:E%=2 . E|
00004e30  25 3d 30 0d 22 74 05 cd  0d 22 7e 17 41 25 3d 4d  |%=0."t..."~.A%=M|
00004e40  58 3a 42 25 3d 4d 59 3a  d6 20 68 65 6c 70 25 0d  |X:B%=MY:. help%.|
00004e50  22 88 2b e7 20 73 74 65  70 25 3d 68 61 70 70 65  |".+. step%=happe|
00004e60  6e 73 74 65 70 25 20 80  20 28 41 63 43 4f 44 45  |nstep% . (AcCODE|
00004e70  25 20 80 20 31 32 38 29  20 8c 0d 22 92 06 c8 96  |% . 128) .."....|
00004e80  0d 22 9c 0d d6 20 6c 69  66 74 75 70 25 0d 22 a6  |."... liftup%.".|
00004e90  0d d6 20 63 6f 6c 6f 75  72 25 0d 22 b0 32 e7 20  |.. colour%.".2. |
00004ea0  21 70 6d 25 3e 30 20 80  20 28 41 63 43 4f 44 45  |!pm%>0 . (AcCODE|
00004eb0  25 20 80 20 26 32 30 29  20 8c 20 d6 20 62 69 74  |% . &20) . . bit|
00004ec0  5f 6d 61 70 5f 73 63 61  6e 5f 41 25 0d 22 ba 12  |_map_scan_A%."..|
00004ed0  f2 73 63 72 65 65 6e 5f  73 65 6c 65 63 74 0d 22  |.screen_select."|
00004ee0  c4 33 e7 20 21 70 6d 25  3e 30 20 80 20 28 41 63  |.3. !pm%>0 . (Ac|
00004ef0  43 4f 44 45 25 20 80 20  26 32 30 29 20 8c 20 d6  |CODE% . &20) . .|
00004f00  20 62 69 74 5f 6d 61 70  5f 70 61 74 74 65 72 6e  | bit_map_pattern|
00004f10  25 0d 22 ce 23 e7 20 28  41 63 43 4f 44 45 25 20  |%.".#. (AcCODE% |
00004f20  80 20 31 36 29 20 8c 20  d6 20 73 68 6f 77 5f 74  |. 16) . . show_t|
00004f30  68 72 75 25 0d 22 d8 0f  d6 20 6c 69 66 74 64 6f  |hru%."... liftdo|
00004f40  77 6e 25 0d 22 e2 05 cc  0d 22 ec 11 e6 20 33 2c  |wn%."...."... 3,|
00004f50  36 33 20 c8 9c 20 31 39  32 0d 22 f6 12 f2 73 63  |63 .. 192."...sc|
00004f60  72 65 65 6e 5f 73 65 6c  65 63 74 0d 23 00 05 cd  |reen_select.#...|
00004f70  0d 23 0a 2e 6b 65 79 70  72 65 73 73 25 3d a6 28  |.#..keypress%=.(|
00004f80  30 29 3a e7 20 6b 65 79  70 72 65 73 73 25 3e 30  |0):. keypress%>0|
00004f90  20 8c 20 f2 6b 65 79 70  72 65 73 73 65 64 0d 23  | . .keypressed.#|
00004fa0  14 2a e7 20 69 6e 61 63  74 69 6f 6e 3c 3e 21 41  |.*. inaction<>!A|
00004fb0  63 25 20 8c 20 f2 70 72  6f 63 65 73 73 5f 6e 65  |c% . .process_ne|
00004fc0  77 5f 61 63 74 69 6f 6e  0d 23 1e 2c e7 20 73 74  |w_action.#.,. st|
00004fd0  65 70 25 3c 3e 6f 6c 64  73 74 65 70 25 20 8c 20  |ep%<>oldstep% . |
00004fe0  46 25 3d 73 74 65 70 25  3a d6 20 68 65 6c 70 73  |F%=step%:. helps|
00004ff0  74 65 70 25 0d 23 28 12  6f 6c 64 73 74 65 70 25  |tep%.#(.oldstep%|
00005000  3d 73 74 65 70 25 0d 23  32 0d fd 20 21 41 63 25  |=step%.#2.. !Ac%|
00005010  3d 32 30 0d 23 3c 11 f2  72 65 73 65 74 5f 61 63  |=20.#<..reset_ac|
00005020  74 69 6f 6e 0d 23 46 0d  e7 20 6f 73 25 3d 31 20  |tion.#F.. os%=1 |
00005030  8c 0d 23 50 0f e7 20 74  65 73 74 69 6e 67 20 8c  |..#P.. testing .|
00005040  0d 23 5a 53 f2 65 72 72  6f 72 68 61 6e 64 6c 65  |.#ZS.errorhandle|
00005050  28 33 2c 22 57 68 65 72  65 20 74 6f 20 42 6f 73  |(3,"Where to Bos|
00005060  73 22 2c 22 42 61 73 69  63 20 50 72 6f 67 72 61  |s","Basic Progra|
00005070  6d 7c 53 6f 75 72 63 65  20 43 6f 64 65 7c 44 6f  |m|Source Code|Do|
00005080  6e 27 74 20 45 78 69 74  22 2c 73 65 6c 65 63 74  |n't Exit",select|
00005090  65 64 29 0d 23 64 05 cc  0d 23 6e 50 f2 65 72 72  |ed).#d...#nP.err|
000050a0  6f 72 68 61 6e 64 6c 65  28 32 2c 22 44 6f 20 79  |orhandle(2,"Do y|
000050b0  6f 75 20 72 65 61 6c 6c  79 20 77 69 73 68 20 74  |ou really wish t|
000050c0  6f 20 65 78 69 74 20 66  72 6f 6d 20 41 54 45 4c  |o exit from ATEL|
000050d0  49 45 52 22 2c 22 43 4f  4e 46 49 52 4d 22 2c 73  |IER","CONFIRM",s|
000050e0  65 6c 65 63 74 65 64 29  0d 23 78 05 cd 0d 23 82  |elected).#x...#.|
000050f0  10 cc 20 73 65 6c 65 63  74 65 64 3d 31 0d 23 8c  |.. selected=1.#.|
00005100  05 cd 0d 23 96 29 e7 20  74 65 73 74 69 6e 67 20  |...#.). testing |
00005110  8c 20 fd 20 73 65 6c 65  63 74 65 64 3d 31 20 84  |. . selected=1 .|
00005120  20 73 65 6c 65 63 74 65  64 3d 32 0d 23 a0 1e e7  | selected=2.#...|
00005130  20 ac 20 74 65 73 74 69  6e 67 20 8c 20 fd 20 73  | . testing . . s|
00005140  65 6c 65 63 74 65 64 3d  31 0d 23 aa 37 f4 20 20  |elected=1.#.7.  |
00005150  20 20 20 20 20 20 20 20  2d 2d 2d 2d 2d 2d 2d 2d  |        --------|
00005160  2d 2d 2d 2d 2d 45 4e 44  20 4f 46 20 4d 41 49 4e  |-----END OF MAIN|
00005170  20 4c 4f 4f 50 20 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  | LOOP ----------|
00005180  0d 23 b4 1b e7 20 ac 20  74 65 73 74 69 6e 67 20  |.#... . testing |
00005190  84 20 6f 73 25 3d 32 20  8c 20 e1 0d 23 be 0c f2  |. os%=2 . ..#...|
000051a0  74 69 64 79 5f 61 74 0d  23 c8 0c 2a 46 58 20 31  |tidy_at.#..*FX 1|
000051b0  35 2c 30 0d 23 d2 11 c8  8e 20 73 65 6c 65 63 74  |5,0.#.... select|
000051c0  65 64 20 ca 0d 23 dc 07  c9 31 3a 0d 23 e6 16 2a  |ed ..#...1:.#..*|
000051d0  4b 45 59 20 34 20 53 41  56 45 7c 4d 52 55 4e 7c  |KEY 4 SAVE|MRUN||
000051e0  4d 0d 23 f0 10 2a 46 58  20 31 33 38 2c 30 2c 36  |M.#..*FX 138,0,6|
000051f0  39 0d 23 fa 10 2a 46 58  20 31 33 38 2c 30 2c 36  |9.#..*FX 138,0,6|
00005200  38 0d 24 04 10 2a 46 58  20 31 33 38 2c 30 2c 34  |8.$..*FX 138,0,4|
00005210  36 0d 24 0e 10 2a 46 58  20 31 33 38 2c 30 2c 34  |6.$..*FX 138,0,4|
00005220  36 0d 24 18 10 2a 46 58  20 31 33 38 2c 30 2c 31  |6.$..*FX 138,0,1|
00005230  33 0d 24 22 05 e0 0d 24  2c 07 c9 32 3a 0d 24 36  |3.$"...$,..2:.$6|
00005240  10 2a 4b 45 59 20 34 20  52 55 4e 7c 4d 0d 24 40  |.*KEY 4 RUN|M.$@|
00005250  4b f2 73 74 72 69 6e 67  5f 74 6f 5f 62 75 66 66  |K.string_to_buff|
00005260  65 72 28 22 4c 4f 2e 20  22 22 3c 41 74 65 6c 69  |er("LO. ""<Ateli|
00005270  2a 24 44 69 72 3e 2e 53  6f 75 72 2a 2e 53 6f 75  |*$Dir>.Sour*.Sou|
00005280  2a 22 22 22 2b bd 28 31  33 29 2b 22 45 44 2e 2e  |*"""+.(13)+"ED..|
00005290  22 2b bd 28 31 33 29 29  0d 24 4a 05 e0 0d 24 54  |"+.(13)).$J...$T|
000052a0  05 cb 0d 24 5e 05 e1 0d  24 68 04 0d 24 72 13 dd  |...$^...$h..$r..|
000052b0  f2 61 64 6a 75 73 74 70  72 65 73 73 65 64 0d 24  |.adjustpressed.$|
000052c0  7c 19 e7 20 21 41 63 25  3d 38 32 20 84 20 21 41  ||.. !Ac%=82 . !A|
000052d0  63 25 3d 35 39 20 8c 0d  24 86 11 f2 72 65 73 65  |c%=59 ..$...rese|
000052e0  74 5f 61 63 74 69 6f 6e  0d 24 90 05 cc 0d 24 9a  |t_action.$....$.|
000052f0  52 e7 20 28 4d 42 20 80  20 31 29 3d 31 20 80 20  |R. (MB . 1)=1 . |
00005300  73 74 65 70 25 3e 31 20  8c 20 73 74 65 70 25 3d  |step%>1 . step%=|
00005310  73 74 65 70 25 2d 31 3a  f2 42 55 54 4f 46 46 28  |step%-1:.BUTOFF(|
00005320  31 29 3a f2 75 70 64 61  74 65 3a 46 25 3d 73 74  |1):.update:F%=st|
00005330  65 70 25 3a d6 20 68 65  6c 70 73 74 65 70 25 0d  |ep%:. helpstep%.|
00005340  24 a4 05 cd 0d 24 ae 05  e1 0d 24 b8 04 0d 24 c2  |$....$....$...$.|
00005350  12 dd f2 72 65 73 65 74  5f 61 63 74 69 6f 6e 0d  |...reset_action.|
00005360  24 cc 14 21 41 63 25 3d  21 6f 6c 64 61 63 74 69  |$..!Ac%=!oldacti|
00005370  6f 6e 25 0d 24 d6 05 e1  0d 24 e0 04 0d 24 ea 12  |on%.$....$...$..|
00005380  dd f2 6d 6f 75 73 65 5f  68 61 6e 64 6c 65 0d 24  |..mouse_handle.$|
00005390  f4 22 c8 97 20 4d 58 2c  4d 59 2c 4d 42 3a e7 20  |.".. MX,MY,MB:. |
000053a0  6d 67 73 20 8c 20 f2 6d  6f 75 73 65 67 72 69 64  |mgs . .mousegrid|
000053b0  0d 24 fe 1c e7 20 21 6c  65 66 74 5f 68 61 6e 64  |.$... !left_hand|
000053c0  65 64 20 8c 20 c8 8e 20  4d 42 20 ca 0d 25 08 11  |ed . .. MB ..%..|
000053d0  c9 25 30 30 31 3a 4d 42  3d 25 31 30 30 0d 25 12  |.%001:MB=%100.%.|
000053e0  11 c9 25 30 31 31 3a 4d  42 3d 25 31 31 30 0d 25  |..%011:MB=%110.%|
000053f0  1c 11 c9 25 31 30 30 3a  4d 42 3d 25 30 30 31 0d  |...%100:MB=%001.|
00005400  25 26 11 c9 25 31 31 30  3a 4d 42 3d 25 30 31 31  |%&..%110:MB=%011|
00005410  0d 25 30 05 cb 0d 25 3a  12 e7 20 ac 20 a6 28 2d  |.%0...%:.. . .(-|
00005420  39 37 29 20 8c 20 e1 0d  25 44 32 e7 20 a6 28 2d  |97) . ..%D2. .(-|
00005430  31 29 20 8c 20 78 72 73  74 25 3d 4d 58 3a 79 72  |1) . xrst%=MX:yr|
00005440  73 74 25 3d 4d 59 20 8b  20 c8 97 20 b8 20 78 72  |st%=MY . .. . xr|
00005450  73 74 25 2c 79 72 73 74  25 0d 25 4e 05 e1 0d 25  |st%,yrst%.%N...%|
00005460  58 04 0d 25 62 10 dd 20  f2 6d 6f 75 73 65 67 72  |X..%b.. .mousegr|
00005470  69 64 0d 25 6c 31 4d 58  3d 28 28 4d 58 2b 6d 6f  |id.%l1MX=((MX+mo|
00005480  75 73 65 67 72 69 64 20  81 20 32 29 20 81 20 6d  |usegrid . 2) . m|
00005490  6f 75 73 65 67 72 69 64  29 2a 6d 6f 75 73 65 67  |ousegrid)*mouseg|
000054a0  72 69 64 0d 25 76 31 4d  59 3d 28 28 4d 59 2b 6d  |rid.%v1MY=((MY+m|
000054b0  6f 75 73 65 67 72 69 64  20 81 20 32 29 20 81 20  |ousegrid . 2) . |
000054c0  6d 6f 75 73 65 67 72 69  64 29 2a 6d 6f 75 73 65  |mousegrid)*mouse|
000054d0  67 72 69 64 0d 25 80 1d  e7 20 4d 58 3c 6d 72 63  |grid.%... MX<mrc|
000054e0  74 78 31 25 20 8c 20 4d  58 3d 6d 72 63 74 78 31  |tx1% . MX=mrctx1|
000054f0  25 0d 25 8a 1d e7 20 4d  59 3c 6d 72 63 74 79 31  |%.%... MY<mrcty1|
00005500  25 20 8c 20 4d 59 3d 6d  72 63 74 79 31 25 0d 25  |% . MY=mrcty1%.%|
00005510  94 1d e7 20 4d 58 3e 6d  72 63 74 78 32 25 20 8c  |... MX>mrctx2% .|
00005520  20 4d 58 3d 6d 72 63 74  78 32 25 0d 25 9e 1d e7  | MX=mrctx2%.%...|
00005530  20 4d 59 3e 6d 72 63 74  79 32 25 20 8c 20 4d 59  | MY>mrcty2% . MY|
00005540  3d 6d 72 63 74 79 32 25  0d 25 a8 0e c8 92 20 b8  |=mrcty2%.%.... .|
00005550  20 4d 58 2c 4d 59 0d 25  b2 05 e1 0d 25 bc 04 0d  | MX,MY.%....%...|
00005560  25 c6 10 dd f2 73 65 74  5f 61 63 74 69 6f 6e 0d  |%....set_action.|
00005570  25 d0 0d c8 8e 20 21 41  63 25 20 ca 0d 25 da 10  |%.... !Ac% ..%..|
00005580  c9 35 37 2c 35 39 2c 38  32 2c 34 33 0d 25 e4 05  |.57,59,82,43.%..|
00005590  7f 0d 25 ee 14 21 6f 6c  64 61 63 74 69 6f 6e 25  |..%..!oldaction%|
000055a0  3d 21 41 63 25 0d 25 f8  05 cb 0d 26 02 05 e1 0d  |=!Ac%.%....&....|
000055b0  26 0c 04 0d 26 16 0f dd  f2 42 55 54 4f 46 46 28  |&...&....BUTOFF(|
000055c0  4d 29 0d 26 20 05 f5 0d  26 2a 0f c8 97 20 44 58  |M).& ...&*... DX|
000055d0  2c 44 59 2c 4d 42 0d 26  34 1c e7 20 21 6c 65 66  |,DY,MB.&4.. !lef|
000055e0  74 5f 68 61 6e 64 65 64  20 8c 20 c8 8e 20 4d 42  |t_handed . .. MB|
000055f0  20 ca 0d 26 3e 11 c9 25  30 30 31 3a 4d 42 3d 25  | ..&>..%001:MB=%|
00005600  31 30 30 0d 26 48 11 c9  25 30 31 31 3a 4d 42 3d  |100.&H..%011:MB=|
00005610  25 31 31 30 0d 26 52 11  c9 25 31 30 30 3a 4d 42  |%110.&R..%100:MB|
00005620  3d 25 30 30 31 0d 26 5c  11 c9 25 31 31 30 3a 4d  |=%001.&\..%110:M|
00005630  42 3d 25 30 31 31 0d 26  66 05 cb 0d 26 70 10 fd  |B=%011.&f...&p..|
00005640  20 28 4d 42 20 80 20 4d  29 3d 30 0d 26 7a 05 e1  | (MB . M)=0.&z..|
00005650  0d 26 84 04 0d 26 8e 10  dd f2 6b 65 79 70 72 65  |.&...&....keypre|
00005660  73 73 65 64 0d 26 98 0c  2a 46 58 20 31 35 2c 30  |ssed.&..*FX 15,0|
00005670  0d 26 a2 15 c8 8e 20 bd  28 6b 65 79 70 72 65 73  |.&.... .(keypres|
00005680  73 25 29 20 ca 0d 26 ac  11 c9 22 2a 22 3a 65 6e  |s%) ..&..."*":en|
00005690  74 65 72 25 3d 35 0d 26  b6 05 cb 0d 26 c0 1d e7  |ter%=5.&....&...|
000056a0  20 28 6b 65 79 70 72 65  73 73 25 20 80 20 31 32  | (keypress% . 12|
000056b0  38 29 3d 30 20 8c 20 e1  0d 26 ca 12 c8 8e 20 6b  |8)=0 . ..&.... k|
000056c0  65 79 70 72 65 73 73 25  20 ca 0d 26 d4 2b c9 26  |eypress% ..&.+.&|
000056d0  38 30 2c 26 39 30 2c 26  41 30 2c 26 42 30 20 20  |80,&90,&A0,&B0  |
000056e0  20 20 20 20 20 20 3a f4  20 66 30 2d 70 72 69 6e  |      :. f0-prin|
000056f0  74 20 6b 65 79 0d 26 de  0d d6 20 6c 69 66 74 75  |t key.&... liftu|
00005700  70 25 0d 26 e8 0f d6 20  75 6e 64 6f 73 61 76 65  |p%.&... undosave|
00005710  25 0d 26 f2 0f f2 70 6f  69 6e 74 28 30 2c 30 29  |%.&...point(0,0)|
00005720  0d 26 fc 11 ff 28 66 75  6e 63 70 72 69 6e 74 24  |.&...(funcprint$|
00005730  29 0d 27 06 21 e7 20 eb  3c 3e 31 35 20 8c 20 eb  |).'.!. .<>15 . .|
00005740  20 31 35 3a d6 20 75 6e  64 6f 72 65 73 74 6f 72  | 15:. undorestor|
00005750  65 25 0d 27 10 0b f2 75  70 64 61 74 65 0d 27 1a  |e%.'...update.'.|
00005760  0f d6 20 6c 69 66 74 64  6f 77 6e 25 0d 27 24 08  |.. liftdown%.'$.|
00005770  c9 26 42 31 0d 27 2e 0f  d6 20 75 6e 64 6f 73 61  |.&B1.'... undosa|
00005780  76 65 25 0d 27 38 0a 2a  46 58 32 32 39 0d 27 42  |ve%.'8.*FX229.'B|
00005790  07 eb 20 30 0d 27 4c 06  ef 32 0d 27 56 11 e3 20  |.. 0.'L..2.'V.. |
000057a0  21 41 63 25 3d 30 20 b8  20 38 32 0d 27 60 1f 21  |!Ac%=0 . 82.'`.!|
000057b0  72 65 63 74 5f 62 72 75  73 68 5f 6d 6f 64 65 3d  |rect_brush_mode=|
000057c0  28 21 41 63 25 20 83 20  33 29 0d 27 6a 15 f1 22  |(!Ac% . 3).'j.."|
000057d0  46 75 6e 63 74 69 6f 6e  20 22 3b 21 41 63 25 0d  |Function ";!Ac%.|
000057e0  27 74 05 f1 0d 27 7e 0f  d6 20 68 65 6c 70 74 65  |'t...'~.. helpte|
000057f0  78 74 25 0d 27 88 05 f1  0d 27 92 05 ed 0d 27 9c  |xt%.'....'....'.|
00005800  06 ef 33 0d 27 a6 08 eb  20 31 35 0d 27 b0 12 d6  |..3.'... 15.'...|
00005810  20 75 6e 64 6f 72 65 73  74 6f 72 65 25 0d 27 ba  | undorestore%.'.|
00005820  39 c9 26 38 31 2c 26 39  31 2c 26 41 31 2c 26 42  |9.&81,&91,&A1,&B|
00005830  31 3a d6 20 6c 69 66 74  75 70 25 3a d6 20 75 6e  |1:. liftup%:. un|
00005840  64 6f 72 65 73 74 6f 72  65 25 3a d6 20 6c 69 66  |dorestore%:. lif|
00005850  74 64 6f 77 6e 25 0d 27  c4 30 c9 26 38 32 2c 26  |tdown%.'.0.&82,&|
00005860  39 32 2c 26 41 32 2c 26  42 32 3a 73 74 65 70 25  |92,&A2,&B2:step%|
00005870  3d 31 3a f2 73 65 74 5f  61 63 74 69 6f 6e 3a 21  |=1:.set_action:!|
00005880  41 63 25 3d 35 37 0d 27  ce 60 c9 26 38 33 2c 26  |Ac%=57.'.`.&83,&|
00005890  39 33 2c 26 41 33 2c 26  42 33 3a e7 20 21 41 63  |93,&A3,&B3:. !Ac|
000058a0  25 3c 3e 38 32 20 8c 20  73 74 65 70 25 3d 31 3a  |%<>82 . step%=1:|
000058b0  f2 73 65 74 5f 61 63 74  69 6f 6e 3a 21 41 63 25  |.set_action:!Ac%|
000058c0  3d 38 32 20 8b 20 21 62  72 75 73 68 73 65 6c 25  |=82 . !brushsel%|
000058d0  3d 28 28 21 62 72 75 73  68 73 65 6c 25 2b 31 29  |=((!brushsel%+1)|
000058e0  20 80 20 31 35 29 0d 27  d8 3a c9 26 38 34 2c 26  | . 15).'.:.&84,&|
000058f0  39 34 2c 26 41 34 2c 26  42 34 3a 21 70 6d 25 3d  |94,&A4,&B4:!pm%=|
00005900  30 3a 21 70 63 25 3d b0  4d 58 2c 4d 59 29 2b c8  |0:!pc%=.MX,MY)+.|
00005910  9c 28 4d 58 2c 4d 59 29  3a f2 75 70 64 61 74 65  |.(MX,MY):.update|
00005920  0d 27 e2 14 c9 26 38 35  2c 26 39 35 2c 26 41 35  |.'...&85,&95,&A5|
00005930  2c 26 42 35 0d 27 ec 4f  e7 20 21 68 65 6c 70 73  |,&B5.'.O. !helps|
00005940  74 61 74 75 73 25 20 8c  20 d6 20 68 65 6c 70 6f  |tatus% . . helpo|
00005950  6e 25 3a ef 35 3a d6 20  68 65 6c 70 74 65 78 74  |n%:.5:. helptext|
00005960  25 3a 46 25 3d 73 74 65  70 25 3a d6 20 68 65 6c  |%:F%=step%:. hel|
00005970  70 73 74 65 70 25 20 8b  20 d6 20 68 65 6c 70 6f  |pstep% . . helpo|
00005980  66 66 25 0d 27 f6 14 c9  26 38 36 2c 26 39 36 2c  |ff%.'...&86,&96,|
00005990  26 41 36 2c 26 42 36 0d  28 00 15 6d 67 73 3d 31  |&A6,&B6.(..mgs=1|
000059a0  2d 6d 67 73 3a f2 75 70  64 61 74 65 0d 28 0a 14  |-mgs:.update.(..|
000059b0  c9 26 38 37 2c 26 39 37  2c 26 41 37 2c 26 42 37  |.&87,&97,&A7,&B7|
000059c0  0d 28 14 1f e7 20 74 65  73 74 69 6e 67 20 80 20  |.(... testing . |
000059d0  6b 65 79 70 72 65 73 73  25 3d 26 41 37 20 8c 0d  |keypress%=&A7 ..|
000059e0  28 1e 0a 2a 46 58 32 32  39 0d 28 28 22 d6 20 6c  |(..*FX229.((". l|
000059f0  69 66 74 75 70 25 3a f2  61 6e 69 6d 61 74 65 3a  |iftup%:.animate:|
00005a00  d6 20 6c 69 66 74 64 6f  77 6e 25 0d 28 32 05 cc  |. liftdown%.(2..|
00005a10  0d 28 3c 0d d6 20 6c 69  66 74 75 70 25 0d 28 46  |.(<.. liftup%.(F|
00005a20  0f d6 20 75 6e 64 6f 73  61 76 65 25 0d 28 50 0f  |.. undosave%.(P.|
00005a30  d6 20 6c 69 66 74 64 6f  77 6e 25 0d 28 5a 05 cd  |. liftdown%.(Z..|
00005a40  0d 28 64 14 c9 26 38 38  2c 26 39 38 2c 26 41 38  |.(d..&88,&98,&A8|
00005a50  2c 26 42 38 0d 28 6e 43  e7 20 28 74 65 73 74 69  |,&B8.(nC. (testi|
00005a60  6e 67 20 80 20 6b 65 79  70 72 65 73 73 25 3d 26  |ng . keypress%=&|
00005a70  38 38 29 20 84 20 28 ac  20 74 65 73 74 69 6e 67  |88) . (. testing|
00005a80  29 20 8c 20 f2 73 65 74  5f 61 63 74 69 6f 6e 3a  |) . .set_action:|
00005a90  21 41 63 25 3d 32 30 0d  28 78 2d e7 20 74 65 73  |!Ac%=20.(x-. tes|
00005aa0  74 69 6e 67 20 80 20 6b  65 79 70 72 65 73 73 25  |ting . keypress%|
00005ab0  3d 26 39 38 20 8c 20 6f  73 25 3d 31 3a 21 41 63  |=&98 . os%=1:!Ac|
00005ac0  25 3d 32 30 0d 28 82 5e  e7 20 74 65 73 74 69 6e  |%=20.(.^. testin|
00005ad0  67 20 80 20 6b 65 79 70  72 65 73 73 25 3d 26 41  |g . keypress%=&A|
00005ae0  38 20 8c 20 d6 20 6c 69  66 74 75 70 25 3a 41 25  |8 . . liftup%:A%|
00005af0  3d 21 70 72 65 73 65 6e  74 6d 65 6e 75 25 3a 47  |=!presentmenu%:G|
00005b00  25 3d 4d 58 3a 48 25 3d  4d 59 3a d6 20 64 72 61  |%=MX:H%=MY:. dra|
00005b10  77 6d 65 6e 75 25 3a d6  20 6c 69 66 74 64 6f 77  |wmenu%:. liftdow|
00005b20  6e 25 0d 28 8c 05 cb 0d  28 96 1b 6b 65 79 69 6e  |n%.(....(..keyin|
00005b30  25 3d 28 6b 65 79 70 72  65 73 73 25 80 26 46 29  |%=(keypress%.&F)|
00005b40  2d 39 0d 28 a0 1a e7 20  6b 65 79 69 6e 25 3e 34  |-9.(... keyin%>4|
00005b50  20 8c 20 6b 65 79 69 6e  25 3d 2d 31 0d 28 aa 11  | . keyin%=-1.(..|
00005b60  e7 20 6b 65 79 69 6e 25  3e 2d 31 20 8c 0d 28 b4  |. keyin%>-1 ..(.|
00005b70  26 6b 65 79 6c 65 76 65  6c 25 3d 28 28 28 6b 65  |&keylevel%=(((ke|
00005b80  79 70 72 65 73 73 25 80  26 46 30 29 3e 3e 34 29  |ypress%.&F0)>>4)|
00005b90  83 34 29 0d 28 be 59 e7  20 a6 28 2d 33 29 20 8c  |.4).(.Y. .(-3) .|
00005ba0  20 66 75 6e 63 74 69 6f  6e 25 28 6b 65 79 69 6e  | function%(keyin|
00005bb0  25 2c 6b 65 79 6c 65 76  65 6c 25 29 3d 21 41 63  |%,keylevel%)=!Ac|
00005bc0  25 20 8b 20 21 41 63 25  3d 66 75 6e 63 74 69 6f  |% . !Ac%=functio|
00005bd0  6e 25 28 6b 65 79 69 6e  25 2c 6b 65 79 6c 65 76  |n%(keyin%,keylev|
00005be0  65 6c 25 29 3a f2 75 70  64 61 74 65 0d 28 c8 05  |el%):.update.(..|
00005bf0  cd 0d 28 d2 05 e1 0d 28  dc 04 0d 28 e6 18 dd f2  |..(....(...(....|
00005c00  70 72 6f 63 65 73 73 5f  6e 65 77 5f 61 63 74 69  |process_new_acti|
00005c10  6f 6e 0d 28 f0 1d e7 20  21 41 63 25 3d 33 33 20  |on.(... !Ac%=33 |
00005c20  8c 20 f2 72 65 73 65 74  5f 61 63 74 69 6f 6e 0d  |. .reset_action.|
00005c30  28 fa 33 ef 35 3a d6 20  68 65 6c 70 74 65 78 74  |(.3.5:. helptext|
00005c40  25 3a 46 25 3d 31 3a d6  20 68 65 6c 70 73 74 65  |%:F%=1:. helpste|
00005c50  70 25 3a 73 74 65 70 25  3d 31 3a f2 75 70 64 61  |p%:step%=1:.upda|
00005c60  74 65 0d 29 04 05 e1 0d  29 0e 04 0d 29 18 10 dd  |te.)....)...)...|
00005c70  f2 6d 65 6e 75 63 61 6c  6c 65 64 0d 29 22 0f f2  |.menucalled.)"..|
00005c80  73 65 74 5f 61 63 74 69  6f 6e 0d 29 2c 17 c8 97  |set_action.),...|
00005c90  20 c8 93 20 30 2c 30 2c  31 32 37 39 2c 31 30 32  | .. 0,0,1279,102|
00005ca0  33 0d 29 36 0d d6 20 6c  69 66 74 75 70 25 0d 29  |3.)6.. liftup%.)|
00005cb0  40 10 21 6d 6f 75 73 65  62 75 74 73 3d 30 0d 29  |@.!mousebuts=0.)|
00005cc0  4a 2e e7 20 3f 28 21 61  63 74 69 6f 6e 73 61 76  |J.. ?(!actionsav|
00005cd0  65 29 3c 32 35 35 20 8c  20 3f 28 21 61 63 74 69  |e)<255 . ?(!acti|
00005ce0  6f 6e 73 61 76 65 29 3d  21 41 63 25 0d 29 54 2d  |onsave)=!Ac%.)T-|
00005cf0  e6 20 31 32 38 2b 28 42  41 43 4b 43 4f 4c 25 20  |. 128+(BACKCOL% |
00005d00  80 20 36 33 29 20 c8 9c  20 28 42 41 43 4b 43 4f  |. 63) .. (BACKCO|
00005d10  4c 25 20 80 20 31 39 32  29 0d 29 5e 0f c8 8e 20  |L% . 192).)^... |
00005d20  65 6e 74 65 72 25 20 ca  0d 29 68 21 c9 32 3a 41  |enter% ..)h!.2:A|
00005d30  25 3d 37 3a d6 20 64 6f  77 6e 74 72 65 65 25 3a  |%=7:. downtree%:|
00005d40  f4 20 73 70 72 69 74 65  73 0d 29 72 20 c9 35 3a  |. sprites.)r .5:|
00005d50  41 25 3d 32 38 3a d6 20  64 6f 77 6e 74 72 65 65  |A%=28:. downtree|
00005d60  25 3a f4 20 6f 73 63 6c  69 0d 29 7c 05 cb 0d 29  |%:. oscli.)|...)|
00005d70  86 26 e7 20 65 6e 74 65  72 25 3d 34 20 80 20 21  |.&. enter%=4 . !|
00005d80  41 63 25 3d 31 32 20 8c  20 41 25 3d 39 20 8b 20  |Ac%=12 . A%=9 . |
00005d90  41 25 3d 30 0d 29 90 0f  c8 97 20 4d 58 2c 4d 59  |A%=0.).... MX,MY|
00005da0  2c 4d 42 0d 29 9a 1d 47  25 3d 4d 58 3a 48 25 3d  |,MB.)..G%=MX:H%=|
00005db0  4d 59 3a d6 20 6d 65 6e  75 73 79 73 74 65 6d 25  |MY:. menusystem%|
00005dc0  0d 29 a4 1d e7 20 21 41  63 25 3d 33 33 20 8c 20  |.)... !Ac%=33 . |
00005dd0  f2 72 65 73 65 74 5f 61  63 74 69 6f 6e 0d 29 ae  |.reset_action.).|
00005de0  1e 73 74 65 70 25 3d 31  3a f2 75 70 64 61 74 65  |.step%=1:.update|
00005df0  3a f2 42 55 54 4f 46 46  28 37 29 0d 29 b8 10 e7  |:.BUTOFF(7).)...|
00005e00  20 21 41 63 25 3c 3e 34  33 20 8c 0d 29 c2 0f d6  | !Ac%<>43 ..)...|
00005e10  20 6c 69 66 74 64 6f 77  6e 25 0d 29 cc 12 ef 35  | liftdown%.)...5|
00005e20  3a d6 20 68 65 6c 70 74  65 78 74 25 0d 29 d6 18  |:. helptext%.)..|
00005e30  46 25 3d 73 74 65 70 25  3a d6 20 68 65 6c 70 73  |F%=step%:. helps|
00005e40  74 65 70 25 0d 29 e0 05  cd 0d 29 ea 35 e7 20 3f  |tep%.)....).5. ?|
00005e50  28 21 61 63 74 69 6f 6e  73 61 76 65 29 3c 32 35  |(!actionsave)<25|
00005e60  35 20 8c 20 21 6f 6c 64  61 63 74 69 6f 6e 25 3d  |5 . !oldaction%=|
00005e70  3f 28 21 61 63 74 69 6f  6e 73 61 76 65 29 0d 29  |?(!actionsave).)|
00005e80  f4 0c 65 6e 74 65 72 25  3d 30 0d 29 fe 05 e1 0d  |..enter%=0.)....|
00005e90  2a 08 04 0d 2a 12 0f dd  f2 69 6e 69 74 65 72 72  |*...*....initerr|
00005ea0  6f 72 0d 2a 1c 10 e7 20  eb 3d 31 35 20 8c 20 eb  |or.*... .=15 . .|
00005eb0  20 30 0d 2a 26 07 ef 20  37 0d 2a 30 1a e7 20 9f  | 0.*&.. 7.*0.. .|
00005ec0  3d 31 37 20 8c 20 f1 22  45 73 63 61 70 65 64 21  |=17 . ."Escaped!|
00005ed0  22 3a e0 0d 2a 3a 15 f1  f6 24 3b 22 20 61 74 20  |":..*:...$;" at |
00005ee0  6c 69 6e 65 20 22 3b 9e  0d 2a 44 13 e7 20 ac 20  |line ";..*D.. . |
00005ef0  74 65 73 74 69 6e 67 20  8c 20 e0 0d 2a 4e 0c 2a  |testing . ..*N.*|
00005f00  46 58 20 31 35 2c 30 0d  2a 58 07 41 3d a5 0d 2a  |FX 15,0.*X.A=..*|
00005f10  62 28 f2 73 74 72 69 6e  67 5f 74 6f 5f 62 75 66  |b(.string_to_buf|
00005f20  66 65 72 28 22 45 44 2e  20 22 2b c3 28 9e 29 2b  |fer("ED. "+.(.)+|
00005f30  bd 28 31 33 29 29 0d 2a  6c 05 e0 0d 2a 76 05 e1  |.(13)).*l...*v..|
00005f40  0d 2a 80 04 0d 2a 8a 1d  dd f2 73 74 72 69 6e 67  |.*...*....string|
00005f50  5f 74 6f 5f 62 75 66 66  65 72 28 74 72 61 6e 24  |_to_buffer(tran$|
00005f60  29 0d 2a 94 05 f5 0d 2a  9e 20 ff 22 46 58 20 31  |).*....*. ."FX 1|
00005f70  33 38 2c 30 2c 22 2b c3  28 97 28 c0 74 72 61 6e  |38,0,"+.(.(.tran|
00005f80  24 2c 31 29 29 29 0d 2a  a8 13 74 72 61 6e 24 3d  |$,1))).*..tran$=|
00005f90  c1 74 72 61 6e 24 2c 32  29 0d 2a b2 0e fd 20 74  |.tran$,2).*... t|
00005fa0  72 61 6e 24 3d 22 22 0d  2a bc 05 e1 0d 2a c6 04  |ran$="".*....*..|
00005fb0  0d 2a d0 0d dd f2 74 69  64 79 5f 61 74 0d 2a da  |.*....tidy_at.*.|
00005fc0  10 f2 73 65 74 73 6f 66  74 6b 65 79 73 0d 2a e4  |..setsoftkeys.*.|
00005fd0  11 f2 75 6e 73 65 74 76  65 63 74 6f 72 73 0d 2a  |..unsetvectors.*|
00005fe0  ee 05 e1 0d 2a f8 04 0d  2b 02 13 dd f2 75 6e 73  |....*...+....uns|
00005ff0  65 74 73 6f 66 74 6b 65  79 73 0d 2b 0c 24 e3 20  |etsoftkeys.+.$. |
00006000  52 3d 32 32 31 20 b8 20  32 32 38 3a ff 22 46 58  |R=221 . 228:."FX|
00006010  20 22 2b c3 28 52 29 2b  22 2c 32 22 3a ed 0d 2b  | "+.(R)+",2":..+|
00006020  16 0d 2a 46 58 20 32 31  39 2c 39 0d 2b 20 05 e1  |..*FX 219,9.+ ..|
00006030  0d 2b 2a 04 0d 2b 34 11  dd f2 73 65 74 73 6f 66  |.+*..+4...setsof|
00006040  74 6b 65 79 73 0d 2b 3e  24 e3 20 52 3d 32 32 31  |tkeys.+>$. R=221|
00006050  20 b8 20 32 32 38 3a ff  22 46 58 20 22 2b c3 28  | . 228:."FX "+.(|
00006060  52 29 2b 22 2c 31 22 3a  ed 0d 2b 48 0d 2a 46 58  |R)+",1":..+H.*FX|
00006070  20 32 31 39 2c 39 0d 2b  52 05 e1 0d 2b 5c 04 0d  | 219,9.+R...+\..|
00006080  2b 66 0d dd f2 69 6e 69  74 5f 61 74 0d 2b 70 20  |+f...init_at.+p |
00006090  e7 20 74 65 73 74 69 6e  67 20 8c 20 ee 20 85 20  |. testing . . . |
000060a0  ea 20 f2 69 6e 69 74 65  72 72 6f 72 0d 2b 7a 09  |. .initerror.+z.|
000060b0  f7 8d 44 66 6b 0d 2b 84  36 50 4e 67 6c 61 73 73  |..Dfk.+.6PNglass|
000060c0  3d 32 3a 50 4e 62 72 75  73 68 3d 33 3a 50 4e 66  |=2:PNbrush=3:PNf|
000060d0  6c 6f 6f 64 3d 34 3a 50  4e 70 65 6e 63 69 6c 3d  |lood=4:PNpencil=|
000060e0  35 3a 50 4e 73 70 72 61  79 3d 36 0d 2b 8e 4d 50  |5:PNspray=6.+.MP|
000060f0  4e 6e 6f 72 6d 61 6c 3d  37 3a 50 4e 73 70 72 69  |Nnormal=7:PNspri|
00006100  74 65 6f 70 3d 38 3a 50  4e 63 61 6c 63 75 6c 61  |teop=8:PNcalcula|
00006110  74 6f 72 3d 31 34 3a 50  4e 6b 65 79 62 6f 61 72  |tor=14:PNkeyboar|
00006120  64 3d 31 35 3a 50 4e 41  3d 31 36 3a 50 4e 73 74  |d=15:PNA=16:PNst|
00006130  6f 70 70 65 64 3d 31 37  0d 2b 98 1b 50 4e 71 75  |opped=17.+..PNqu|
00006140  65 73 74 69 6f 6e 3d 31  38 3a 50 4e 68 61 6e 64  |estion=18:PNhand|
00006150  3d 31 39 0d 2b a2 35 63  6f 6d 5f 67 78 31 25 3d  |=19.+.5com_gx1%=|
00006160  30 3a 63 6f 6d 5f 67 79  31 25 3d 30 3a 63 6f 6d  |0:com_gy1%=0:com|
00006170  5f 67 78 32 25 3d 31 32  37 38 3a 63 6f 6d 5f 67  |_gx2%=1278:com_g|
00006180  79 32 25 3d 31 30 32 30  0d 2b ac 19 f2 75 6e 73  |y2%=1020.+...uns|
00006190  65 74 73 6f 66 74 6b 65  79 73 3a 4b 3d 31 30 32  |etsoftkeys:K=102|
000061a0  34 0d 2b b6 93 de 20 42  4c 4f 57 25 20 31 2a 4b  |4.+... BLOW% 1*K|
000061b0  2c 53 54 4f 52 45 25 20  31 36 30 2a 4b 2c 63 61  |,STORE% 160*K,ca|
000061c0  74 25 20 31 2a 4b 2c 62  72 75 73 68 25 20 38 2a  |t% 1*K,brush% 8*|
000061d0  4b 2c 62 72 70 61 74 74  25 20 38 2a 4b 2c 63 79  |K,brpatt% 8*K,cy|
000061e0  63 6c 65 25 20 31 32 38  2c 66 69 6c 65 5f 69 63  |cle% 128,file_ic|
000061f0  6f 6e 73 25 20 33 2a 4b  2c 6c 6f 67 5f 74 61 62  |ons% 3*K,log_tab|
00006200  6c 65 25 20 32 35 36 2c  6c 6f 67 5f 73 63 61 6c  |le% 256,log_scal|
00006210  65 25 20 31 30 34 30 2c  66 6f 72 6d 6e 61 6d 65  |e% 1040,formname|
00006220  73 25 20 31 2a 4b 2c 66  6f 6e 74 6c 69 73 74 25  |s% 1*K,fontlist%|
00006230  20 31 2a 4b 0d 2b c0 8f  de 20 73 6b 65 6c 25 20  | 1*K.+... skel% |
00006240  31 37 36 34 2a 31 30 2c  73 71 72 25 20 26 35 32  |1764*10,sqr% &52|
00006250  30 31 2c 73 69 6e 25 20  33 36 30 2a 34 2c 74 61  |01,sin% 360*4,ta|
00006260  6e 25 20 39 30 2a 34 2c  6e 75 6d 62 65 72 73 25  |n% 90*4,numbers%|
00006270  20 26 37 32 30 2c 73 63  72 65 65 6e 5f 73 74 72  | &720,screen_str|
00006280  25 20 32 35 36 2c 70 61  74 74 65 72 6e 5f 73 74  |% 256,pattern_st|
00006290  72 25 20 32 35 36 2c 62  72 75 73 68 5f 73 74 72  |r% 256,brush_str|
000062a0  25 20 32 35 36 2c 73 70  72 69 74 65 5f 73 74 72  |% 256,sprite_str|
000062b0  25 20 32 35 36 2c 66 69  6c 65 5f 73 74 72 25 20  |% 256,file_str% |
000062c0  32 35 36 0d 2b ca 8f de  20 62 65 68 69 6e 64 25  |256.+... behind%|
000062d0  20 32 35 36 2c 66 6c 61  67 73 25 20 34 2c 50 4f  | 256,flags% 4,PO|
000062e0  25 20 26 31 34 44 43 2c  73 70 72 73 74 72 25 20  |% &14DC,sprstr% |
000062f0  33 30 2c 66 6f 6e 74 73  74 72 25 20 34 35 2c 70  |30,fontstr% 45,p|
00006300  72 65 73 65 6e 74 66 6f  6e 74 25 20 38 30 2c 78  |resentfont% 80,x|
00006310  67 65 74 25 20 38 30 30  2c 79 67 65 74 25 20 38  |get% 800,yget% 8|
00006320  30 30 2c 42 55 46 46 25  20 31 2a 4b 2c 42 55 46  |00,BUFF% 1*K,BUF|
00006330  46 45 52 25 20 33 35 33  32 38 2c 66 72 65 65 74  |FER% 35328,freet|
00006340  61 62 6c 65 25 20 32 35  36 2c 61 62 74 73 25 20  |able% 256,abts% |
00006350  31 36 0d 2b d4 3d de 20  4c 28 36 34 30 29 2c 41  |16.+.=. L(640),A|
00006360  25 28 36 34 31 2c 31 29  2c 42 25 28 32 35 36 2c  |%(641,1),B%(256,|
00006370  31 29 2c 66 75 6e 63 74  69 6f 6e 25 28 34 2c 33  |1),function%(4,3|
00006380  29 2c 66 6f 72 6d 75 6c  61 73 24 28 31 30 29 0d  |),formulas$(10).|
00006390  2b de 24 ff 22 4c 4f 41  44 20 22 2b a4 64 69 72  |+.$."LOAD "+.dir|
000063a0  2b 22 50 4f 49 4e 54 45  52 20 22 2b c3 7e 28 50  |+"POINTER "+.~(P|
000063b0  4f 25 29 0d 2b e8 19 e7  20 6f 73 25 3d 31 20 8c  |O%).+... os%=1 .|
000063c0  20 f2 70 6f 69 6e 74 28  30 2c 31 29 0d 2b f2 24  | .point(0,1).+.$|
000063d0  73 25 3d 8e 28 a4 64 69  72 2b 22 63 6f 64 65 2a  |s%=.(.dir+"code*|
000063e0  22 29 3a 73 7a 25 3d a2  23 73 25 3a d9 23 73 25  |"):sz%=.#s%:.#s%|
000063f0  0d 2b fc 30 de 20 63 6f  64 65 25 20 73 7a 25 3a  |.+.0. code% sz%:|
00006400  ff 22 4c 4f 41 44 20 22  2b a4 64 69 72 2b 22 63  |."LOAD "+.dir+"c|
00006410  6f 64 65 2a 20 22 2b c3  7e 28 63 6f 64 65 25 29  |ode* "+.~(code%)|
00006420  0d 2c 06 14 70 6c 24 3d  22 4c 4f 41 44 20 22 2b  |.,..pl$="LOAD "+|
00006430  a4 64 69 72 0d 2c 10 1f  ff 70 6c 24 2b 22 21 42  |.dir.,...pl$+"!B|
00006440  72 75 73 68 65 73 20 22  2b c3 7e 28 62 72 75 73  |rushes "+.~(brus|
00006450  68 25 29 0d 2c 1a 21 ff  70 6c 24 2b 22 21 50 61  |h%).,.!.pl$+"!Pa|
00006460  74 74 65 72 6e 73 20 22  2b c3 7e 28 62 72 70 61  |tterns "+.~(brpa|
00006470  74 74 25 29 0d 2c 24 23  2a 43 6f 6d 5f 4f 70 65  |tt%).,$#*Com_Ope|
00006480  6e 20 3c 41 74 65 6c 69  65 72 24 44 69 72 3e 2e  |n <Atelier$Dir>.|
00006490  53 70 72 69 74 65 73 0d  2c 2e 1b f2 69 6e 28 66  |Sprites.,...in(f|
000064a0  69 6c 65 5f 69 63 6f 6e  73 25 2c 22 34 30 20 38  |ile_icons%,"40 8|
000064b0  22 29 0d 2c 38 18 f2 69  6e 28 6e 75 6d 62 65 72  |").,8..in(number|
000064c0  73 25 2c 22 31 32 20 38  22 29 0d 2c 42 19 f2 69  |s%,"12 8").,B..i|
000064d0  6e 28 42 55 46 46 45 52  25 2c 22 33 38 34 20 39  |n(BUFFER%,"384 9|
000064e0  32 22 29 0d 2c 4c 0e 2a  43 6f 6d 5f 43 6c 6f 73  |2").,L.*Com_Clos|
000064f0  65 0d 2c 56 0d f2 63 6f  64 65 76 61 72 73 0d 2c  |e.,V..codevars.,|
00006500  60 19 e7 20 6f 73 25 3d  31 20 8c 20 f2 70 6f 69  |`.. os%=1 . .poi|
00006510  6e 74 28 30 2c 30 29 0d  2c 6a 19 24 73 63 72 65  |nt(0,0).,j.$scre|
00006520  65 6e 5f 73 74 72 25 3d  22 53 63 72 65 65 6e 22  |en_str%="Screen"|
00006530  0d 2c 74 1c 24 70 61 74  74 65 72 6e 5f 73 74 72  |.,t.$pattern_str|
00006540  25 3d 22 50 61 74 74 65  72 6e 73 22 0d 2c 7e 19  |%="Patterns".,~.|
00006550  24 62 72 75 73 68 5f 73  74 72 25 3d 22 42 72 75  |$brush_str%="Bru|
00006560  73 68 65 73 22 0d 2c 88  1d 24 73 70 72 69 74 65  |shes".,..$sprite|
00006570  5f 73 74 72 25 3d 22 53  70 72 69 74 65 46 69 6c  |_str%="SpriteFil|
00006580  65 22 0d 2c 92 19 24 73  70 72 73 74 72 25 3d 22  |e".,..$sprstr%="|
00006590  6e 65 77 5f 73 70 72 69  74 65 22 0d 2c 9c 1a 67  |new_sprite".,..g|
000065a0  5f 73 70 72 69 74 65 24  3d 22 6e 65 77 5f 73 70  |_sprite$="new_sp|
000065b0  72 69 74 65 22 0d 2c a6  0f 63 79 63 6c 65 25 21  |rite".,..cycle%!|
000065c0  30 3d 31 36 0d 2c b0 0d  e3 20 52 3d 30 20 b8 20  |0=16.,... R=0 . |
000065d0  33 0d 2c ba 08 f3 20 6f  25 0d 2c c4 0e e3 20 52  |3.,... o%.,... R|
000065e0  31 3d 30 20 b8 20 33 0d  2c ce 1f 21 28 63 79 63  |1=0 . 3.,..!(cyc|
000065f0  6c 65 25 2b 52 2a 31 36  2b 52 31 2a 34 2b 34 29  |le%+R*16+R1*4+4)|
00006600  3d 6f 25 2b 52 31 0d 2c  d8 07 ed 3a ed 0d 2c e2  |=o%+R1.,...:..,.|
00006610  22 e3 20 52 3d 30 20 b8  20 32 35 35 3a 3f 28 62  |". R=0 . 255:?(b|
00006620  65 68 69 6e 64 25 2b 52  29 3d 32 35 35 3a ed 0d  |ehind%+R)=255:..|
00006630  2c ec 55 e3 20 52 3d 31  20 b8 20 32 35 36 3a 3f  |,.U. R=1 . 256:?|
00006640  28 6c 6f 67 5f 74 61 62  6c 65 25 2b 52 2d 31 29  |(log_table%+R-1)|
00006650  3d 32 30 2b 28 52 5e 32  29 2f 33 30 30 3a ed 3a  |=20+(R^2)/300:.:|
00006660  e3 20 52 3d 30 20 b8 20  35 32 34 38 3a 21 28 73  |. R=0 . 5248:!(s|
00006670  71 72 25 2b 52 2a 34 29  3d b6 28 52 2a 31 30 32  |qr%+R*4)=.(R*102|
00006680  34 29 3a ed 0d 2c f6 29  e3 20 52 3d 30 20 b8 20  |4):..,.). R=0 . |
00006690  33 35 39 3a 21 28 73 69  6e 25 2b 52 2a 34 29 3d  |359:!(sin%+R*4)=|
000066a0  b5 b2 28 52 29 2a 36 35  35 33 36 3a ed 0d 2d 00  |..(R)*65536:..-.|
000066b0  28 e3 20 52 3d 30 20 b8  20 38 39 3a 21 28 74 61  |(. R=0 . 89:!(ta|
000066c0  6e 25 2b 52 2a 34 29 3d  b7 b2 28 52 29 2a 36 35  |n%+R*4)=..(R)*65|
000066d0  35 33 36 3a ed 0d 2d 0a  12 dc 20 30 2c 34 34 2c  |536:..-... 0,44,|
000066e0  32 30 38 2c 32 35 32 0d  2d 14 25 dc 20 34 2c 33  |208,252.-.%. 4,3|
000066f0  36 34 2c 34 30 38 2c 35  38 34 2c 32 32 34 2c 35  |64,408,584,224,5|
00006700  38 34 2c 37 32 2c 34 35  36 2c 37 32 0d 2d 1e 0d  |84,72,456,72.-..|
00006710  f3 20 6e 75 6d 6c 69 73  74 0d 2d 28 16 21 62 6f  |. numlist.-(.!bo|
00006720  6c 70 6f 69 6e 74 25 3d  6e 75 6d 6c 69 73 74 0d  |lpoint%=numlist.|
00006730  2d 32 18 e3 20 52 3d 30  20 b8 20 21 62 6f 6c 70  |-2.. R=0 . !bolp|
00006740  6f 69 6e 74 25 2d 31 0d  2d 3c 09 f3 20 58 2c 59  |oint%-1.-<.. X,Y|
00006750  0d 2d 46 23 21 28 78 67  65 74 25 2b 52 2a 34 29  |.-F#!(xget%+R*4)|
00006760  3d 58 3a 21 28 79 67 65  74 25 2b 52 2a 34 29 3d  |=X:!(yget%+R*4)=|
00006770  59 2b 34 0d 2d 50 05 ed  0d 2d 5a 11 3f 28 66 6c  |Y+4.-P...-Z.?(fl|
00006780  61 67 73 25 29 3d 32 35  35 0d 2d 64 13 3f 28 66  |ags%)=255.-d.?(f|
00006790  6c 61 67 73 25 2b 31 29  3d 32 35 35 0d 2d 6e 13  |lags%+1)=255.-n.|
000067a0  3f 28 66 6c 61 67 73 25  2b 32 29 3d 32 35 35 0d  |?(flags%+2)=255.|
000067b0  2d 78 13 3f 28 66 6c 61  67 73 25 2b 33 29 3d 32  |-x.?(flags%+3)=2|
000067c0  35 35 0d 2d 82 13 21 73  70 72 73 74 72 3d 73 70  |55.-..!sprstr=sp|
000067d0  72 73 74 72 25 0d 2d 8c  13 21 62 72 70 61 74 74  |rstr%.-..!brpatt|
000067e0  3d 62 72 70 61 74 74 25  0d 2d 96 11 21 66 6c 61  |=brpatt%.-..!fla|
000067f0  67 73 3d 66 6c 61 67 73  25 0d 2d a0 0d 21 63 61  |gs=flags%.-..!ca|
00006800  74 3d 63 61 74 25 0d 2d  aa 13 21 62 65 68 69 6e  |t=cat%.-..!behin|
00006810  64 3d 62 65 68 69 6e 64  25 0d 2d b4 17 21 62 72  |d=behind%.-..!br|
00006820  75 73 68 73 68 61 70 65  73 3d 62 72 75 73 68 25  |ushshapes=brush%|
00006830  0d 2d be 0f 21 42 55 46  46 3d 42 55 46 46 25 0d  |.-..!BUFF=BUFF%.|
00006840  2d c8 0d 21 46 4c 4f 42  3d 50 4f 25 0d 2d d2 0f  |-..!FLOB=PO%.-..|
00006850  21 62 6f 6c 78 3d 78 67  65 74 25 0d 2d dc 0f 21  |!bolx=xget%.-..!|
00006860  62 6f 6c 79 3d 79 67 65  74 25 0d 2d e6 15 21 66  |boly=yget%.-..!f|
00006870  6f 6e 74 73 74 72 3d 66  6f 6e 74 73 74 72 25 0d  |ontstr=fontstr%.|
00006880  2d f0 1d 21 70 72 65 73  65 6e 74 66 6f 6e 74 3d  |-..!presentfont=|
00006890  70 72 65 73 65 6e 74 66  6f 6e 74 25 0d 2d fa 11  |presentfont%.-..|
000068a0  21 53 54 4f 52 45 3d 53  54 4f 52 45 25 0d 2e 04  |!STORE=STORE%...|
000068b0  19 21 66 72 65 65 74 61  62 6c 65 3d 66 72 65 65  |.!freetable=free|
000068c0  74 61 62 6c 65 25 0d 2e  0e 10 21 70 75 74 3d 42  |table%....!put=B|
000068d0  55 46 46 45 52 25 0d 2e  18 11 21 63 79 63 6c 65  |UFFER%....!cycle|
000068e0  3d 63 79 63 6c 65 25 0d  2e 22 1b 21 73 63 72 65  |=cycle%..".!scre|
000068f0  65 6e 5f 73 74 72 3d 73  63 72 65 65 6e 5f 73 74  |en_str=screen_st|
00006900  72 25 0d 2e 2c 1d 21 70  61 74 74 65 72 6e 5f 73  |r%..,.!pattern_s|
00006910  74 72 3d 70 61 74 74 65  72 6e 5f 73 74 72 25 0d  |tr=pattern_str%.|
00006920  2e 36 19 21 62 72 75 73  68 5f 73 74 72 3d 62 72  |.6.!brush_str=br|
00006930  75 73 68 5f 73 74 72 25  0d 2e 40 1b 21 73 70 72  |ush_str%..@.!spr|
00006940  69 74 65 5f 73 74 72 3d  73 70 72 69 74 65 5f 73  |ite_str=sprite_s|
00006950  74 72 25 0d 2e 4a 1b 21  66 69 6c 65 5f 69 63 6f  |tr%..J.!file_ico|
00006960  6e 73 3d 66 69 6c 65 5f  69 63 6f 6e 73 25 0d 2e  |ns=file_icons%..|
00006970  54 19 21 6c 6f 67 5f 74  61 62 6c 65 3d 6c 6f 67  |T.!log_table=log|
00006980  5f 74 61 62 6c 65 25 0d  2e 5e 19 21 6c 6f 67 5f  |_table%..^.!log_|
00006990  73 63 61 6c 65 3d 6c 6f  67 5f 73 63 61 6c 65 25  |scale=log_scale%|
000069a0  0d 2e 68 15 21 6e 75 6d  62 65 72 73 3d 6e 75 6d  |..h.!numbers=num|
000069b0  62 65 72 73 25 0d 2e 72  0d 21 73 71 72 3d 73 71  |bers%..r.!sqr=sq|
000069c0  72 25 0d 2e 7c 0d 21 73  69 6e 3d 73 69 6e 25 0d  |r%..|.!sin=sin%.|
000069d0  2e 86 0d 21 74 61 6e 3d  74 61 6e 25 0d 2e 90 17  |...!tan=tan%....|
000069e0  21 66 69 6c 65 5f 73 74  72 3d 66 69 6c 65 5f 73  |!file_str=file_s|
000069f0  74 72 25 0d 2e 9a 19 21  66 6f 72 6d 6e 61 6d 65  |tr%....!formname|
00006a00  73 3d 66 6f 72 6d 6e 61  6d 65 73 25 0d 2e a4 0f  |s=formnames%....|
00006a10  21 73 6b 65 6c 3d 73 6b  65 6c 25 0d 2e ae 17 21  |!skel=skel%....!|
00006a20  66 6f 6e 74 6c 69 73 74  3d 66 6f 6e 74 6c 69 73  |fontlist=fontlis|
00006a30  74 25 0d 2e b8 32 2a 49  46 20 22 3c 46 6f 6e 74  |t%...2*IF "<Font|
00006a40  24 50 72 65 66 69 78 3e  22 3d 22 22 20 54 48 45  |$Prefix>"="" THE|
00006a50  4e 20 2a 53 45 54 20 46  6f 6e 74 24 50 72 65 66  |N *SET Font$Pref|
00006a60  69 78 20 24 0d 2e c2 07  ea 20 85 0d 2e cc 38 ee  |ix $..... ....8.|
00006a70  20 85 20 ea 20 24 66 6f  6e 74 6c 69 73 74 25 3d  | . . $fontlist%=|
00006a80  22 46 6f 6e 74 20 44 69  73 6b 20 4e 6f 74 20 50  |"Font Disk Not P|
00006a90  72 65 73 65 6e 74 22 2b  bd 28 30 29 3a e5 20 8d  |resent"+.(0):. .|
00006aa0  64 6a 6e 0d 2e d6 0e 41  25 3d 74 65 73 74 69 6e  |djn....A%=testin|
00006ab0  67 0d 2e e0 15 d6 20 69  6e 69 74 69 61 6c 69 73  |g..... initialis|
00006ac0  61 74 69 6f 6e 25 0d 2e  ea 07 f7 20 85 0d 2e f4  |ation%..... ....|
00006ad0  10 f2 63 68 65 63 6b 64  75 6d 70 65 72 0d 2e fe  |..checkdumper...|
00006ae0  17 78 72 73 74 25 3d 36  34 30 3a 79 72 73 74 25  |.xrst%=640:yrst%|
00006af0  3d 35 31 32 0d 2f 08 1b  78 30 25 3d 30 3a 79 30  |=512./..x0%=0:y0|
00006b00  25 3d 30 3a 78 31 25 3d  30 3a 79 31 25 3d 30 0d  |%=0:x1%=0:y1%=0.|
00006b10  2f 12 1b 78 32 25 3d 30  3a 79 32 25 3d 30 3a 78  |/..x2%=0:y2%=0:x|
00006b20  33 25 3d 30 3a 79 33 25  3d 30 0d 2f 1c 1b 78 34  |3%=0:y3%=0./..x4|
00006b30  25 3d 30 3a 79 34 25 3d  30 3a 78 35 25 3d 30 3a  |%=0:y4%=0:x5%=0:|
00006b40  79 35 25 3d 30 0d 2f 26  20 61 63 74 69 6f 6e 66  |y5%=0./& actionf|
00006b50  6c 61 67 73 25 3d 38 3a  61 63 74 69 6f 6e 73 74  |lags%=8:actionst|
00006b60  65 70 25 3d 33 0d 2f 30  1a 78 73 25 3d 30 3a 79  |ep%=3./0.xs%=0:y|
00006b70  73 25 3d 30 3a 6f 6c 64  73 74 65 70 25 3d 30 0d  |s%=0:oldstep%=0.|
00006b80  2f 3a 1a 73 74 65 70 25  3d 31 3a 76 65 63 74 6f  |/:.step%=1:vecto|
00006b90  72 73 5f 73 65 74 25 3d  a3 0d 2f 44 13 77 65 64  |rs_set%=../D.wed|
00006ba0  67 65 25 3d 30 3a 63 6f  6c 25 3d 30 0d 2f 4e 1b  |ge%=0:col%=0./N.|
00006bb0  70 73 69 7a 65 78 25 3d  31 36 30 3a 70 73 69 7a  |psizex%=160:psiz|
00006bc0  65 79 25 3d 31 36 30 0d  2f 58 19 78 70 73 69 7a  |ey%=160./X.xpsiz|
00006bd0  65 25 3d 2d 31 3a 79 70  73 69 7a 65 25 3d 2d 31  |e%=-1:ypsize%=-1|
00006be0  0d 2f 62 0f 6d 67 73 3d  a3 3a 6d 63 73 3d a3 0d  |./b.mgs=.:mcs=..|
00006bf0  2f 6c 19 6d 6f 75 73 65  67 72 69 64 3d 33 32 3a  |/l.mousegrid=32:|
00006c00  73 65 6c 65 63 74 3d b9  0d 2f 76 11 50 25 3d 66  |select=../v.P%=f|
00006c10  6f 72 6d 6e 61 6d 65 73  25 0d 2f 80 0a 5b 4f 50  |ormnames%./..[OP|
00006c20  54 20 30 0d 2f 8a 0a 45  51 55 42 20 31 0d 2f 94  |T 0./..EQUB 1./.|
00006c30  0b 45 51 55 42 20 31 30  0d 2f 9e 15 45 51 55 53  |.EQUB 10./..EQUS|
00006c40  20 22 44 65 66 69 6e 65  61 62 6c 65 22 0d 2f a8  | "Defineable"./.|
00006c50  05 5d 0d 2f b2 19 66 6f  72 6d 75 6c 61 24 3d 22  |.]./..formula$="|
00006c60  53 49 4e 28 59 52 29 2a  35 30 22 0d 2f bc 24 64  |SIN(YR)*50"./.$d|
00006c70  75 6d 6d 79 3d a4 62 75  69 6c 64 5f 66 6f 72 6d  |ummy=.build_form|
00006c80  75 6c 61 28 66 6f 72 6d  75 6c 61 24 2c 30 29 0d  |ula(formula$,0).|
00006c90  2f c6 0f 62 6f 74 72 61  64 24 3d 22 31 22 0d 2f  |/..botrad$="1"./|
00006ca0  d0 28 61 74 65 78 74 24  3d 22 41 74 65 6c 69 65  |.(atext$="Atelie|
00006cb0  72 20 28 43 29 20 53 69  6d 6f 6e 20 43 6c 61 79  |r (C) Simon Clay|
00006cc0  20 31 39 38 39 22 0d 2f  da 11 f2 72 65 6d 6f 76  | 1989"./...remov|
00006cd0  65 6b 65 79 6d 6f 64 0d  2f e4 14 66 75 6e 63 70  |ekeymod./..funcp|
00006ce0  72 69 6e 74 24 3d 22 42  59 45 22 0d 2f ee 0c 65  |rint$="BYE"./..e|
00006cf0  76 61 6c 24 3d 22 22 0d  2f f8 12 21 6f 6c 64 61  |val$=""./..!olda|
00006d00  63 74 69 6f 6e 25 3d 36  30 0d 30 02 05 e1 0d 30  |ction%=60.0....0|
00006d10  0c 04 0d 30 16 04 0d 30  20 0f dd f2 69 6e 28 62  |...0...0 ...in(b|
00006d20  25 2c 73 24 29 0d 30 2a  22 ff 22 43 6f 6d 5f 53  |%,s$).0*"."Com_S|
00006d30  70 72 69 74 65 73 20 24  20 22 2b c3 28 62 25 29  |prites $ "+.(b%)|
00006d40  2b 22 20 22 2b 73 24 0d  30 34 05 e1 0d 30 3e 04  |+" "+s$.04...0>.|
00006d50  0d 30 48 12 dd f2 72 65  6d 6f 76 65 6b 65 79 6d  |.0H...removekeym|
00006d60  6f 64 0d 30 52 07 ea 20  85 0d 30 5c 0b ee 20 85  |od.0R.. ..0\.. .|
00006d70  20 ea 20 e1 0d 30 66 21  2a 55 6e 70 6c 75 67 20  | . ..0f!*Unplug |
00006d80  49 6e 74 65 72 6e 61 74  69 6f 6e 61 6c 4b 65 79  |InternationalKey|
00006d90  62 6f 61 72 64 0d 30 70  05 e1 0d 30 7a 04 0d 30  |board.0p...0z..0|
00006da0  84 15 dd f2 73 65 74 5f  61 62 6f 72 74 5f 74 72  |....set_abort_tr|
00006db0  61 70 73 0d 30 8e 0f 61  62 74 73 25 21 30 3d 21  |aps.0..abts%!0=!|
00006dc0  26 43 0d 30 98 10 61 62  74 73 25 21 34 3d 21 26  |&C.0..abts%!4=!&|
00006dd0  31 30 0d 30 a2 10 61 62  74 73 25 21 38 3d 21 26  |10.0..abts%!8=!&|
00006de0  31 34 0d 30 ac 14 e3 20  50 41 53 53 3d 30 20 b8  |14.0... PASS=0 .|
00006df0  20 32 20 88 20 32 0d 30  b6 09 50 25 3d 26 43 0d  | 2 . 2.0..P%=&C.|
00006e00  30 c0 0d 5b 4f 50 54 20  50 41 53 53 0d 30 ca 3c  |0..[OPT PASS.0.<|
00006e10  42 20 61 62 74 31 25 20  20 20 20 20 20 20 3b 73  |B abt1%       ;s|
00006e20  65 74 73 20 61 62 6f 72  74 20 6f 6e 20 69 6e 73  |ets abort on ins|
00006e30  74 75 63 74 69 6f 6e 20  66 65 74 63 68 20 65 72  |tuction fetch er|
00006e40  72 6f 72 20 74 72 61 70  0d 30 d4 39 42 20 61 62  |ror trap.0.9B ab|
00006e50  74 32 25 20 20 20 20 20  20 20 3b 73 65 74 73 20  |t2%       ;sets |
00006e60  61 62 6f 72 74 20 6f 6e  20 64 61 74 61 20 74 72  |abort on data tr|
00006e70  61 6e 73 66 65 72 20 65  72 72 6f 72 20 74 72 61  |ansfer error tra|
00006e80  70 0d 30 de 34 42 20 61  62 74 33 25 20 20 20 20  |p.0.4B abt3%    |
00006e90  20 20 20 3b 73 65 74 73  20 61 64 64 72 65 73 73  |   ;sets address|
00006ea0  20 65 78 63 65 70 74 69  6f 6e 20 65 72 72 6f 72  | exception error|
00006eb0  20 74 72 61 70 0d 30 e8  06 5d ed 0d 30 f2 05 e1  | trap.0..]..0...|
00006ec0  0d 30 fc 04 0d 31 06 17  dd f2 75 6e 73 65 74 5f  |.0...1....unset_|
00006ed0  61 62 6f 72 74 5f 74 72  61 70 73 0d 31 10 10 21  |abort_traps.1..!|
00006ee0  26 30 43 3d 61 62 74 73  25 21 30 0d 31 1a 10 21  |&0C=abts%!0.1..!|
00006ef0  26 31 30 3d 61 62 74 73  25 21 34 0d 31 24 10 21  |&10=abts%!4.1$.!|
00006f00  26 31 34 3d 61 62 74 73  25 21 38 0d 31 2e 05 e1  |&14=abts%!8.1...|
00006f10  0d 31 38 04 0d 31 42 0e  dd f2 63 6f 64 65 76 61  |.18..1B...codeva|
00006f20  72 73 0d 31 4c 04 0d 31  56 1d 76 61 72 69 61 62  |rs.1L..1V.variab|
00006f30  6c 65 6c 6f 63 61 74 65  25 3d 63 6f 64 65 25 2b  |lelocate%=code%+|
00006f40  34 2a 31 0d 31 60 16 63  6f 6d 5f 70 75 74 25 3d  |4*1.1`.com_put%=|
00006f50  63 6f 64 65 25 2b 34 2a  32 0d 31 6a 1b 6c 6f 63  |code%+4*2.1j.loc|
00006f60  61 74 65 73 70 72 69 74  65 25 3d 63 6f 64 65 25  |atesprite%=code%|
00006f70  2b 34 2a 33 0d 31 74 13  68 65 6c 70 25 3d 63 6f  |+4*3.1t.help%=co|
00006f80  64 65 25 2b 34 2a 34 0d  31 7e 15 68 65 6c 70 6f  |de%+4*4.1~.helpo|
00006f90  6e 25 3d 63 6f 64 65 25  2b 34 2a 35 0d 31 88 16  |n%=code%+4*5.1..|
00006fa0  68 65 6c 70 6f 66 66 25  3d 63 6f 64 65 25 2b 34  |helpoff%=code%+4|
00006fb0  2a 36 0d 31 92 17 68 65  6c 70 73 74 65 70 25 3d  |*6.1..helpstep%=|
00006fc0  63 6f 64 65 25 2b 34 2a  37 0d 31 9c 17 68 65 6c  |code%+4*7.1..hel|
00006fd0  70 74 65 78 74 25 3d 63  6f 64 65 25 2b 34 2a 38  |ptext%=code%+4*8|
00006fe0  0d 31 a6 15 6c 69 66 74  75 70 25 3d 63 6f 64 65  |.1..liftup%=code|
00006ff0  25 2b 34 2a 39 0d 31 b0  18 6c 69 66 74 64 6f 77  |%+4*9.1..liftdow|
00007000  6e 25 3d 63 6f 64 65 25  2b 34 2a 31 30 0d 31 ba  |n%=code%+4*10.1.|
00007010  16 63 6f 6c 6f 75 72 25  3d 63 6f 64 65 25 2b 34  |.colour%=code%+4|
00007020  2a 31 31 0d 31 c4 1b 75  6e 64 6f 72 65 73 74 6f  |*11.1..undoresto|
00007030  72 65 25 3d 63 6f 64 65  25 2b 34 2a 31 32 0d 31  |re%=code%+4*12.1|
00007040  ce 18 75 6e 64 6f 73 61  76 65 25 3d 63 6f 64 65  |..undosave%=code|
00007050  25 2b 34 2a 31 33 0d 31  d8 18 64 72 61 77 6d 65  |%+4*13.1..drawme|
00007060  6e 75 25 3d 63 6f 64 65  25 2b 34 2a 31 34 0d 31  |nu%=code%+4*14.1|
00007070  e2 1a 6d 65 6e 75 73 79  73 74 65 6d 25 3d 63 6f  |..menusystem%=co|
00007080  64 65 25 2b 34 2a 31 35  0d 31 ec 1b 6d 6f 75 73  |de%+4*15.1..mous|
00007090  65 63 6f 6c 6f 75 72 25  3d 63 6f 64 65 25 2b 34  |ecolour%=code%+4|
000070a0  2a 31 36 0d 31 f6 1d 73  63 72 65 65 6e 5f 73 65  |*16.1..screen_se|
000070b0  6c 65 63 74 25 3d 63 6f  64 65 25 2b 34 2a 31 37  |lect%=code%+4*17|
000070c0  0d 32 00 1a 73 70 72 69  74 65 69 6e 69 74 25 3d  |.2..spriteinit%=|
000070d0  63 6f 64 65 25 2b 34 2a  31 38 0d 32 0a 17 6d 61  |code%+4*18.2..ma|
000070e0  67 6e 69 66 79 25 3d 63  6f 64 65 25 2b 34 2a 31  |gnify%=code%+4*1|
000070f0  39 0d 32 14 16 75 70 74  72 65 65 25 3d 63 6f 64  |9.2..uptree%=cod|
00007100  65 25 2b 34 2a 32 30 0d  32 1e 1d 70 75 74 62 61  |e%+4*20.2..putba|
00007110  63 6b 67 72 6f 75 6e 64  25 3d 63 6f 64 65 25 2b  |ckground%=code%+|
00007120  34 2a 32 31 0d 32 28 17  63 6f 6d 5f 67 65 74 25  |4*21.2(.com_get%|
00007130  3d 63 6f 64 65 25 2b 34  2a 32 32 0d 32 32 22 70  |=code%+4*22.22"p|
00007140  75 74 73 63 72 65 65 6e  72 65 63 74 61 6e 67 6c  |utscreenrectangl|
00007150  65 25 3d 63 6f 64 65 25  2b 34 2a 32 33 0d 32 3c  |e%=code%+4*23.2<|
00007160  18 62 72 75 73 68 65 6f  72 25 3d 63 6f 64 65 25  |.brusheor%=code%|
00007170  2b 34 2a 32 34 0d 32 46  19 62 72 75 73 68 64 72  |+4*24.2F.brushdr|
00007180  61 77 25 3d 63 6f 64 65  25 2b 34 2a 32 35 0d 32  |aw%=code%+4*25.2|
00007190  50 19 62 72 75 73 68 75  6e 64 6f 25 3d 63 6f 64  |P.brushundo%=cod|
000071a0  65 25 2b 34 2a 32 36 0d  32 5a 19 73 70 72 69 74  |e%+4*26.2Z.sprit|
000071b0  65 70 69 78 25 3d 63 6f  64 65 25 2b 34 2a 32 37  |epix%=code%+4*27|
000071c0  0d 32 64 18 62 72 75 73  68 67 65 74 25 3d 63 6f  |.2d.brushget%=co|
000071d0  64 65 25 2b 34 2a 32 38  0d 32 6e 18 73 68 61 70  |de%+4*28.2n.shap|
000071e0  65 67 65 74 25 3d 63 6f  64 65 25 2b 34 2a 32 39  |eget%=code%+4*29|
000071f0  0d 32 78 1e 73 70 72 69  74 65 70 75 74 65 72 72  |.2x.spriteputerr|
00007200  6f 72 25 3d 63 6f 64 65  25 2b 34 2a 33 30 0d 32  |or%=code%+4*30.2|
00007210  82 23 67 65 74 73 70 72  69 74 65 66 72 6f 6d 73  |.#getspritefroms|
00007220  63 72 65 65 6e 25 3d 63  6f 64 65 25 2b 34 2a 33  |creen%=code%+4*3|
00007230  31 0d 32 8c 1a 70 72 69  6f 72 69 74 79 69 6e 25  |1.2..priorityin%|
00007240  3d 63 6f 64 65 25 2b 34  2a 33 32 0d 32 96 18 75  |=code%+4*32.2..u|
00007250  6e 64 6f 63 68 61 72 25  3d 63 6f 64 65 25 2b 34  |ndochar%=code%+4|
00007260  2a 33 33 0d 32 a0 17 75  6e 64 6f 62 6f 78 25 3d  |*33.2..undobox%=|
00007270  63 6f 64 65 25 2b 34 2a  33 34 0d 32 aa 1a 73 63  |code%+4*34.2..sc|
00007280  61 6e 73 63 72 65 65 6e  25 3d 63 6f 64 65 25 2b  |anscreen%=code%+|
00007290  34 2a 33 35 0d 32 b4 1a  63 6f 6c 6f 75 72 62 79  |4*35.2..colourby|
000072a0  74 65 25 3d 63 6f 64 65  25 2b 34 2a 33 36 0d 32  |te%=code%+4*36.2|
000072b0  be 1e 63 61 6c 63 5f 69  6e 74 65 6e 73 69 74 79  |..calc_intensity|
000072c0  25 3d 63 6f 64 65 25 2b  34 2a 33 37 0d 32 c8 1b  |%=code%+4*37.2..|
000072d0  73 70 6c 6f 64 67 65 72  65 61 64 25 3d 63 6f 64  |splodgeread%=cod|
000072e0  65 25 2b 34 2a 33 38 0d  32 d2 17 73 65 74 62 6f  |e%+4*38.2..setbo|
000072f0  72 64 25 3d 63 6f 64 65  25 2b 34 2a 33 39 0d 32  |rd%=code%+4*39.2|
00007300  dc 14 61 62 74 31 25 3d  63 6f 64 65 25 2b 34 2a  |..abt1%=code%+4*|
00007310  34 30 0d 32 e6 18 46 49  4e 44 4d 45 4e 55 25 3d  |40.2..FINDMENU%=|
00007320  63 6f 64 65 25 2b 34 2a  34 31 0d 32 f0 18 53 4b  |code%+4*41.2..SK|
00007330  49 50 57 4f 52 44 25 3d  63 6f 64 65 25 2b 34 2a  |IPWORD%=code%+4*|
00007340  34 32 0d 32 fa 18 64 72  61 77 77 6f 72 64 25 3d  |42.2..drawword%=|
00007350  63 6f 64 65 25 2b 34 2a  34 33 0d 33 04 14 61 62  |code%+4*43.3..ab|
00007360  74 32 25 3d 63 6f 64 65  25 2b 34 2a 34 34 0d 33  |t2%=code%+4*44.3|
00007370  0e 14 61 62 74 33 25 3d  63 6f 64 65 25 2b 34 2a  |..abt3%=code%+4*|
00007380  34 35 0d 33 18 1a 43 4f  4c 61 76 65 72 61 67 65  |45.3..COLaverage|
00007390  25 3d 63 6f 64 65 25 2b  34 2a 34 36 0d 33 22 17  |%=code%+4*46.3".|
000073a0  43 4f 4c 67 63 6f 6c 25  3d 63 6f 64 65 25 2b 34  |COLgcol%=code%+4|
000073b0  2a 34 37 0d 33 2c 22 43  4f 4c 6d 6f 64 65 31 35  |*47.3,"COLmode15|
000073c0  5f 31 33 72 65 73 69 7a  65 25 3d 63 6f 64 65 25  |_13resize%=code%|
000073d0  2b 34 2a 34 38 0d 33 36  19 73 68 6f 77 5f 74 68  |+4*48.36.show_th|
000073e0  72 75 25 3d 63 6f 64 65  25 2b 34 2a 34 39 0d 33  |ru%=code%+4*49.3|
000073f0  40 1b 73 77 61 70 5f 70  69 78 65 6c 73 25 3d 63  |@.swap_pixels%=c|
00007400  6f 64 65 25 2b 34 2a 35  30 0d 33 4a 23 43 4f 4c  |ode%+4*50.3J#COL|
00007410  73 6d 6f 6f 74 68 5f 72  65 63 74 61 6e 67 6c 65  |smooth_rectangle|
00007420  25 3d 63 6f 64 65 25 2b  34 2a 35 31 0d 33 54 1d  |%=code%+4*51.3T.|
00007430  63 6f 6d 70 61 63 74 65  64 73 61 76 65 25 3d 63  |compactedsave%=c|
00007440  6f 64 65 25 2b 34 2a 35  32 0d 33 5e 1a 73 63 72  |ode%+4*52.3^.scr|
00007450  65 65 6e 73 61 76 65 25  3d 63 6f 64 65 25 2b 34  |eensave%=code%+4|
00007460  2a 35 33 0d 33 68 1e 62  69 74 5f 6d 61 70 5f 73  |*53.3h.bit_map_s|
00007470  63 61 6e 5f 41 25 3d 63  6f 64 65 25 2b 34 2a 35  |can_A%=code%+4*5|
00007480  34 0d 33 72 1e 62 69 74  5f 6d 61 70 5f 73 63 61  |4.3r.bit_map_sca|
00007490  6e 5f 42 25 3d 63 6f 64  65 25 2b 34 2a 35 35 0d  |n_B%=code%+4*55.|
000074a0  33 7c 1f 62 69 74 5f 6d  61 70 5f 70 61 74 74 65  |3|.bit_map_patte|
000074b0  72 6e 25 3d 63 6f 64 65  25 2b 34 2a 35 36 0d 33  |rn%=code%+4*56.3|
000074c0  86 1d 76 65 72 74 69 63  61 6c 5f 66 69 6c 6c 25  |..vertical_fill%|
000074d0  3d 63 6f 64 65 25 2b 34  2a 35 37 0d 33 90 19 63  |=code%+4*57.3..c|
000074e0  6f 70 79 5f 66 69 6c 6c  25 3d 63 6f 64 65 25 2b  |opy_fill%=code%+|
000074f0  34 2a 35 38 0d 33 9a 1b  63 61 6c 63 5f 72 61 64  |4*58.3..calc_rad|
00007500  69 75 73 25 3d 63 6f 64  65 25 2b 34 2a 35 39 0d  |ius%=code%+4*59.|
00007510  33 a4 19 66 72 61 6d 65  64 72 61 77 25 3d 63 6f  |3..framedraw%=co|
00007520  64 65 25 2b 34 2a 36 30  0d 33 ae 1b 73 70 69 6e  |de%+4*60.3..spin|
00007530  5f 62 6f 74 74 6c 65 25  3d 63 6f 64 65 25 2b 34  |_bottle%=code%+4|
00007540  2a 36 31 0d 33 b8 1f 74  72 61 6e 73 6c 61 74 65  |*61.3..translate|
00007550  5f 70 6f 69 6e 74 25 3d  63 6f 64 65 25 2b 34 2a  |_point%=code%+4*|
00007560  36 32 0d 33 c2 23 61 6e  74 69 5f 61 6c 69 61 73  |62.3.#anti_alias|
00007570  65 64 5f 73 71 75 61 73  68 25 3d 63 6f 64 65 25  |ed_squash%=code%|
00007580  2b 34 2a 36 33 0d 33 cc  1a 73 63 72 65 65 6e 6c  |+4*63.3..screenl|
00007590  6f 61 64 25 3d 63 6f 64  65 25 2b 34 2a 36 34 0d  |oad%=code%+4*64.|
000075a0  33 d6 1e 69 6e 69 74 69  61 6c 69 73 61 74 69 6f  |3..initialisatio|
000075b0  6e 25 3d 63 6f 64 65 25  2b 34 2a 36 35 0d 33 e0  |n%=code%+4*65.3.|
000075c0  1d 66 6f 72 6d 66 72 61  6d 65 64 72 61 77 25 3d  |.formframedraw%=|
000075d0  63 6f 64 65 25 2b 34 2a  36 36 0d 33 ea 1e 66 6f  |code%+4*66.3..fo|
000075e0  72 6d 5f 74 72 61 6e 73  6c 61 74 65 25 3d 63 6f  |rm_translate%=co|
000075f0  64 65 25 2b 34 2a 36 37  0d 33 f4 1b 63 6f 6e 76  |de%+4*67.3..conv|
00007600  65 72 74 6d 6f 64 65 25  3d 63 6f 64 65 25 2b 34  |ertmode%=code%+4|
00007610  2a 36 38 0d 33 fe 1a 62  79 74 65 63 6f 6c 6f 75  |*68.3..bytecolou|
00007620  72 25 3d 63 6f 64 65 25  2b 34 2a 36 39 0d 34 08  |r%=code%+4*69.4.|
00007630  18 64 6f 77 6e 74 72 65  65 25 3d 63 6f 64 65 25  |.downtree%=code%|
00007640  2b 34 2a 37 30 0d 34 12  1c 63 68 65 63 6b 73 70  |+4*70.4..checksp|
00007650  72 69 74 65 73 25 3d 63  6f 64 65 25 2b 34 2a 37  |rites%=code%+4*7|
00007660  31 0d 34 1c 1d 63 6f 6d  70 61 63 74 65 64 6c 6f  |1.4..compactedlo|
00007670  61 64 25 3d 63 6f 64 65  25 2b 34 2a 37 32 0d 34  |ad%=code%+4*72.4|
00007680  26 19 73 61 76 65 63 68  65 63 6b 25 3d 63 6f 64  |&.savecheck%=cod|
00007690  65 25 2b 34 2a 37 33 0d  34 30 1c 66 6f 6e 74 6c  |e%+4*73.40.fontl|
000076a0  69 73 74 69 6e 69 74 25  3d 63 6f 64 65 25 2b 34  |istinit%=code%+4|
000076b0  2a 37 34 0d 34 3a 19 64  75 66 66 5f 63 61 6c 6c  |*74.4:.duff_call|
000076c0  25 3d 63 6f 64 65 25 2b  34 2a 37 35 0d 34 44 1e  |%=code%+4*75.4D.|
000076d0  64 72 61 77 5f 65 72 72  6f 72 5f 62 6f 78 25 3d  |draw_error_box%=|
000076e0  63 6f 64 65 25 2b 34 2a  37 36 0d 34 4e 1f 63 6f  |code%+4*76.4N.co|
000076f0  6d 5f 75 70 64 61 74 65  5f 69 6e 66 6f 25 3d 63  |m_update_info%=c|
00007700  6f 64 65 25 2b 34 2a 37  37 0d 34 58 04 0d 34 62  |ode%+4*77.4X..4b|
00007710  14 d6 76 61 72 69 61 62  6c 65 6c 6f 63 61 74 65  |..variablelocate|
00007720  25 0d 34 6c 04 0d 34 76  0c 63 3d 21 63 6f 64 65  |%.4l..4v.c=!code|
00007730  25 0d 34 80 04 0d 34 8a  0d 41 63 25 3d 63 2b 34  |%.4...4..Ac%=c+4|
00007740  2a 30 0d 34 94 14 70 72  69 6e 74 6d 65 6e 75 25  |*0.4..printmenu%|
00007750  3d 63 2b 34 2a 31 0d 34  9e 0d 70 63 25 3d 63 2b  |=c+4*1.4..pc%=c+|
00007760  34 2a 32 0d 34 a8 13 62  72 75 73 68 73 65 6c 25  |4*2.4..brushsel%|
00007770  3d 63 2b 34 2a 33 0d 34  b2 15 68 65 6c 70 73 74  |=c+4*3.4..helpst|
00007780  61 74 75 73 25 3d 63 2b  34 2a 34 0d 34 bc 16 70  |atus%=c+4*4.4..p|
00007790  72 65 73 65 6e 74 6d 65  6e 75 25 3d 63 2b 34 2a  |resentmenu%=c+4*|
000077a0  35 0d 34 c6 13 62 6f 6c  70 6f 69 6e 74 25 3d 63  |5.4..bolpoint%=c|
000077b0  2b 34 2a 36 0d 34 d0 14  74 6f 70 73 63 72 65 65  |+4*6.4..topscree|
000077c0  6e 25 3d 63 2b 34 2a 37  0d 34 da 12 62 6c 6f 77  |n%=c+4*7.4..blow|
000077d0  63 6f 6c 25 3d 63 2b 34  2a 38 0d 34 e4 0e 59 45  |col%=c+4*8.4..YE|
000077e0  53 25 3d 63 2b 34 2a 39  0d 34 ee 11 70 75 74 69  |S%=c+4*9.4..puti|
000077f0  74 25 3d 63 2b 34 2a 31  30 0d 34 f8 12 73 70 72  |t%=c+4*10.4..spr|
00007800  73 65 6c 25 3d 63 2b 34  2a 31 31 0d 35 02 12 73  |sel%=c+4*11.5..s|
00007810  74 61 72 74 78 25 3d 63  2b 34 2a 31 32 0d 35 0c  |tartx%=c+4*12.5.|
00007820  12 73 74 61 72 74 79 25  3d 63 2b 34 2a 31 33 0d  |.starty%=c+4*13.|
00007830  35 16 16 63 6f 6d 70 61  63 74 69 6f 6e 25 3d 63  |5..compaction%=c|
00007840  2b 34 2a 31 34 0d 35 20  11 73 70 72 70 6f 73 3d  |+4*14.5 .sprpos=|
00007850  63 2b 34 2a 31 35 0d 35  2a 12 66 72 65 65 63 6f  |c+4*15.5*.freeco|
00007860  6c 3d 63 2b 34 2a 31 36  0d 35 34 0e 4f 55 54 3d  |l=c+4*16.54.OUT=|
00007870  63 2b 34 2a 31 37 0d 35  3e 11 6c 69 6d 74 6f 70  |c+4*17.5>.limtop|
00007880  3d 63 2b 34 2a 31 38 0d  35 48 11 6c 69 6d 62 6f  |=c+4*18.5H.limbo|
00007890  74 3d 63 2b 34 2a 31 39  0d 35 52 10 73 74 61 72  |t=c+4*19.5R.star|
000078a0  74 3d 63 2b 34 2a 32 30  0d 35 5c 12 68 6c 65 6e  |t=c+4*20.5\.hlen|
000078b0  67 74 68 3d 63 2b 34 2a  32 31 0d 35 66 12 52 45  |gth=c+4*21.5f.RE|
000078c0  53 55 4c 54 58 3d 63 2b  34 2a 32 32 0d 35 70 12  |SULTX=c+4*22.5p.|
000078d0  52 45 53 55 4c 54 59 3d  63 2b 34 2a 32 33 0d 35  |RESULTY=c+4*23.5|
000078e0  7a 13 6c 61 73 74 6d 65  6e 75 3d 63 2b 34 2a 32  |z.lastmenu=c+4*2|
000078f0  34 0d 35 84 12 72 31 73  74 6f 72 65 3d 63 2b 34  |4.5..r1store=c+4|
00007900  2a 32 35 0d 35 8e 12 72  30 73 74 6f 72 65 3d 63  |*25.5..r0store=c|
00007910  2b 34 2a 32 36 0d 35 98  16 6c 65 66 74 5f 68 61  |+4*26.5..left_ha|
00007920  6e 64 65 64 3d 63 2b 34  2a 32 37 0d 35 a2 15 63  |nded=c+4*27.5..c|
00007930  6f 6d 70 61 63 74 33 78  34 3d 63 2b 34 2a 32 38  |ompact3x4=c+4*28|
00007940  0d 35 ac 13 69 6e 6c 61  79 73 65 64 3d 63 2b 34  |.5..inlaysed=c+4|
00007950  2a 32 39 0d 35 b6 11 73  70 72 73 74 72 3d 63 2b  |*29.5..sprstr=c+|
00007960  34 2a 33 30 0d 35 c0 11  62 72 70 61 74 74 3d 63  |4*30.5..brpatt=c|
00007970  2b 34 2a 33 31 0d 35 ca  10 66 6c 61 67 73 3d 63  |+4*31.5..flags=c|
00007980  2b 34 2a 33 32 0d 35 d4  0e 63 61 74 3d 63 2b 34  |+4*32.5..cat=c+4|
00007990  2a 33 33 0d 35 de 11 62  65 68 69 6e 64 3d 63 2b  |*33.5..behind=c+|
000079a0  34 2a 33 34 0d 35 e8 16  62 72 75 73 68 73 68 61  |4*34.5..brushsha|
000079b0  70 65 73 3d 63 2b 34 2a  33 35 0d 35 f2 0f 42 55  |pes=c+4*35.5..BU|
000079c0  46 46 3d 63 2b 34 2a 33  36 0d 35 fc 0f 46 4c 4f  |FF=c+4*36.5..FLO|
000079d0  42 3d 63 2b 34 2a 33 37  0d 36 06 0f 62 6f 6c 78  |B=c+4*37.6..bolx|
000079e0  3d 63 2b 34 2a 33 38 0d  36 10 0f 62 6f 6c 79 3d  |=c+4*38.6..boly=|
000079f0  63 2b 34 2a 33 39 0d 36  1a 12 66 6f 6e 74 73 74  |c+4*39.6..fontst|
00007a00  72 3d 63 2b 34 2a 34 30  0d 36 24 16 70 72 65 73  |r=c+4*40.6$.pres|
00007a10  65 6e 74 66 6f 6e 74 3d  63 2b 34 2a 34 31 0d 36  |entfont=c+4*41.6|
00007a20  2e 10 53 54 4f 52 45 3d  63 2b 34 2a 34 32 0d 36  |..STORE=c+4*42.6|
00007a30  38 14 66 72 65 65 74 61  62 6c 65 3d 63 2b 34 2a  |8.freetable=c+4*|
00007a40  34 33 0d 36 42 0e 70 75  74 3d 63 2b 34 2a 34 34  |43.6B.put=c+4*44|
00007a50  0d 36 4c 10 63 79 63 6c  65 3d 63 2b 34 2a 34 35  |.6L.cycle=c+4*45|
00007a60  0d 36 56 15 72 65 63 74  5f 62 72 75 73 68 3d 63  |.6V.rect_brush=c|
00007a70  2b 34 2a 34 36 0d 36 60  15 73 63 72 65 65 6e 5f  |+4*46.6`.screen_|
00007a80  73 74 72 3d 63 2b 34 2a  34 37 0d 36 6a 16 70 61  |str=c+4*47.6j.pa|
00007a90  74 74 65 72 6e 5f 73 74  72 3d 63 2b 34 2a 34 38  |ttern_str=c+4*48|
00007aa0  0d 36 74 14 62 72 75 73  68 5f 73 74 72 3d 63 2b  |.6t.brush_str=c+|
00007ab0  34 2a 34 39 0d 36 7e 15  73 70 72 69 74 65 5f 73  |4*49.6~.sprite_s|
00007ac0  74 72 3d 63 2b 34 2a 35  30 0d 36 88 19 68 65 6c  |tr=c+4*50.6..hel|
00007ad0  70 5f 74 65 78 74 5f 64  61 74 61 3d 63 2b 34 2a  |p_text_data=c+4*|
00007ae0  35 31 0d 36 92 15 66 69  6c 65 5f 69 63 6f 6e 73  |51.6..file_icons|
00007af0  3d 63 2b 34 2a 35 32 0d  36 9c 12 62 69 74 5f 6d  |=c+4*52.6..bit_m|
00007b00  61 70 3d 63 2b 34 2a 35  33 0d 36 a6 17 66 69 6c  |ap=c+4*53.6..fil|
00007b10  6c 73 74 79 6c 65 70 69  63 3d 63 2b 34 2a 35 34  |lstylepic=c+4*54|
00007b20  0d 36 b0 14 6c 6f 67 5f  74 61 62 6c 65 3d 63 2b  |.6..log_table=c+|
00007b30  34 2a 35 35 0d 36 ba 14  6c 6f 67 5f 73 63 61 6c  |4*55.6..log_scal|
00007b40  65 3d 63 2b 34 2a 35 36  0d 36 c4 04 0d 36 ce 12  |e=c+4*56.6...6..|
00007b50  6e 75 6d 62 65 72 73 3d  63 2b 34 2a 35 38 0d 36  |numbers=c+4*58.6|
00007b60  d8 17 6d 61 67 6e 69 66  79 5f 78 70 6f 73 3d 63  |..magnify_xpos=c|
00007b70  2b 34 2a 35 39 0d 36 e2  17 6d 61 67 6e 69 66 79  |+4*59.6..magnify|
00007b80  5f 79 70 6f 73 3d 63 2b  34 2a 36 30 0d 36 ec 11  |_ypos=c+4*60.6..|
00007b90  70 75 74 70 6f 73 3d 63  2b 34 2a 36 31 0d 36 f6  |putpos=c+4*61.6.|
00007ba0  14 6d 61 67 70 75 74 70  6f 73 3d 63 2b 34 2a 36  |.magputpos=c+4*6|
00007bb0  32 0d 37 00 10 73 69 7a  65 78 3d 63 2b 34 2a 36  |2.7..sizex=c+4*6|
00007bc0  33 0d 37 0a 10 73 69 7a  65 79 3d 63 2b 34 2a 36  |3.7..sizey=c+4*6|
00007bd0  34 0d 37 14 12 73 70 72  73 69 7a 65 3d 63 2b 34  |4.7..sprsize=c+4|
00007be0  2a 36 35 0d 37 1e 12 73  70 72 69 74 65 78 3d 63  |*65.7..spritex=c|
00007bf0  2b 34 2a 36 36 0d 37 28  12 73 70 72 69 74 65 79  |+4*66.7(.spritey|
00007c00  3d 63 2b 34 2a 36 37 0d  37 32 14 67 74 73 70 72  |=c+4*67.72.gtspr|
00007c10  69 74 65 78 3d 63 2b 34  2a 36 38 0d 37 3c 14 67  |itex=c+4*68.7<.g|
00007c20  74 73 70 72 69 74 65 79  3d 63 2b 34 2a 36 39 0d  |tspritey=c+4*69.|
00007c30  37 46 1f 64 69 73 6b 66  6f 6e 74 6c 69 73 74 70  |7F.diskfontlistp|
00007c40  6f 73 69 74 69 6f 6e 3d  63 2b 34 2a 37 30 0d 37  |osition=c+4*70.7|
00007c50  50 11 63 61 74 70 6f 73  3d 63 2b 34 2a 37 31 0d  |P.catpos=c+4*71.|
00007c60  37 5a 12 66 6f 6e 74 73  65 6c 3d 63 2b 34 2a 37  |7Z.fontsel=c+4*7|
00007c70  32 0d 37 64 12 70 61 74  74 73 65 6c 3d 63 2b 34  |2.7d.pattsel=c+4|
00007c80  2a 37 33 0d 37 6e 12 74  72 65 65 70 6f 73 3d 63  |*73.7n.treepos=c|
00007c90  2b 34 2a 37 34 0d 37 78  14 6d 61 74 72 69 78 70  |+4*74.7x.matrixp|
00007ca0  75 74 3d 63 2b 34 2a 37  35 0d 37 82 15 62 61 72  |ut=c+4*75.7..bar|
00007cb0  76 61 6c 5f 72 65 64 3d  63 2b 34 2a 37 36 0d 37  |val_red=c+4*76.7|
00007cc0  8c 15 62 61 72 76 61 6c  5f 67 72 6e 3d 63 2b 34  |..barval_grn=c+4|
00007cd0  2a 37 37 0d 37 96 15 62  61 72 76 61 6c 5f 62 6c  |*77.7..barval_bl|
00007ce0  75 3d 63 2b 34 2a 37 38  0d 37 a0 18 73 63 61 6c  |u=c+4*78.7..scal|
00007cf0  65 76 61 6c 5f 6c 65 66  74 3d 63 2b 34 2a 37 39  |eval_left=c+4*79|
00007d00  0d 37 aa 19 73 63 61 6c  65 76 61 6c 5f 72 69 67  |.7..scaleval_rig|
00007d10  68 74 3d 63 2b 34 2a 38  30 0d 37 b4 15 63 79 63  |ht=c+4*80.7..cyc|
00007d20  6c 65 70 6c 61 63 65 3d  63 2b 34 2a 38 31 0d 37  |leplace=c+4*81.7|
00007d30  be 19 63 79 63 6c 65 64  69 72 65 63 74 69 6f 6e  |..cycledirection|
00007d40  3d 63 2b 34 2a 38 32 0d  37 c8 14 63 79 63 6c 65  |=c+4*82.7..cycle|
00007d50  6d 6f 64 65 3d 63 2b 34  2a 38 33 0d 37 d2 0e 70  |mode=c+4*83.7..p|
00007d60  6d 25 3d 63 2b 34 2a 38  34 0d 37 dc 15 6d 69 78  |m%=c+4*84.7..mix|
00007d70  76 61 6c 5f 72 65 64 3d  63 2b 34 2a 38 35 0d 37  |val_red=c+4*85.7|
00007d80  e6 15 6d 69 78 76 61 6c  5f 67 72 6e 3d 63 2b 34  |..mixval_grn=c+4|
00007d90  2a 38 36 0d 37 f0 15 6d  69 78 76 61 6c 5f 62 6c  |*86.7..mixval_bl|
00007da0  75 3d 63 2b 34 2a 38 37  0d 37 fa 11 6d 6f 75 73  |u=c+4*87.7..mous|
00007db0  65 78 3d 63 2b 34 2a 38  38 0d 38 04 11 6d 6f 75  |ex=c+4*88.8..mou|
00007dc0  73 65 79 3d 63 2b 34 2a  38 39 0d 38 0e 14 6d 6f  |sey=c+4*89.8..mo|
00007dd0  75 73 65 62 75 74 73 3d  63 2b 34 2a 39 30 0d 38  |usebuts=c+4*90.8|
00007de0  18 18 6d 61 67 6e 69 66  69 63 61 74 69 6f 6e 3d  |..magnification=|
00007df0  63 2b 34 2a 39 31 0d 38  22 17 6d 61 67 6e 69 66  |c+4*91.8".magnif|
00007e00  79 5f 78 67 65 74 3d 63  2b 34 2a 39 32 0d 38 2c  |y_xget=c+4*92.8,|
00007e10  17 6d 61 67 6e 69 66 79  5f 79 67 65 74 3d 63 2b  |.magnify_yget=c+|
00007e20  34 2a 39 33 0d 38 36 19  6d 61 67 6e 69 66 79 5f  |4*93.86.magnify_|
00007e30  73 74 61 74 75 73 3d 63  2b 34 2a 39 34 0d 38 40  |status=c+4*94.8@|
00007e40  0f 48 41 4e 47 3d 63 2b  34 2a 39 35 0d 38 4a 1a  |.HANG=c+4*95.8J.|
00007e50  72 65 63 74 5f 62 72 75  73 68 5f 6d 6f 64 65 3d  |rect_brush_mode=|
00007e60  63 2b 34 2a 39 36 0d 38  54 11 76 61 63 61 6e 74  |c+4*96.8T.vacant|
00007e70  3d 63 2b 34 2a 39 37 0d  38 5e 11 63 6f 6d 5f 78  |=c+4*97.8^.com_x|
00007e80  31 3d 63 2b 34 2a 39 38  0d 38 68 11 63 6f 6d 5f  |1=c+4*98.8h.com_|
00007e90  79 31 3d 63 2b 34 2a 39  39 0d 38 72 12 63 6f 6d  |y1=c+4*99.8r.com|
00007ea0  5f 78 32 3d 63 2b 34 2a  31 30 30 0d 38 7c 12 63  |_x2=c+4*100.8|.c|
00007eb0  6f 6d 5f 79 32 3d 63 2b  34 2a 31 30 31 0d 38 86  |om_y2=c+4*101.8.|
00007ec0  18 73 70 72 69 6e 74 5f  78 73 69 7a 65 3d 63 2b  |.sprint_xsize=c+|
00007ed0  34 2a 31 30 32 0d 38 90  18 73 70 72 69 6e 74 5f  |4*102.8..sprint_|
00007ee0  79 73 69 7a 65 3d 63 2b  34 2a 31 30 33 0d 38 9a  |ysize=c+4*103.8.|
00007ef0  16 73 70 72 69 74 65 6d  61 73 6b 3d 63 2b 34 2a  |.spritemask=c+4*|
00007f00  31 30 34 0d 38 a4 16 66  69 6c 6c 5f 73 74 79 6c  |104.8..fill_styl|
00007f10  65 3d 63 2b 34 2a 31 30  35 0d 38 ae 15 66 69 6c  |e=c+4*105.8..fil|
00007f20  6c 5f 70 72 6f 70 3d 63  2b 34 2a 31 30 36 0d 38  |l_prop=c+4*106.8|
00007f30  b8 15 66 69 6c 6c 5f 6c  6f 67 72 3d 63 2b 34 2a  |..fill_logr=c+4*|
00007f40  31 30 37 0d 38 c2 15 66  69 6c 6c 5f 64 69 74 68  |107.8..fill_dith|
00007f50  3d 63 2b 34 2a 31 30 38  0d 38 cc 16 73 74 65 70  |=c+4*108.8..step|
00007f60  5f 63 6f 64 65 73 3d 63  2b 34 2a 31 30 39 0d 38  |_codes=c+4*109.8|
00007f70  d6 12 62 6f 72 64 65 72  3d 63 2b 34 2a 31 31 30  |..border=c+4*110|
00007f80  0d 38 e0 0f 73 71 72 3d  63 2b 34 2a 31 31 31 0d  |.8..sqr=c+4*111.|
00007f90  38 ea 16 61 63 74 69 6f  6e 73 61 76 65 3d 63 2b  |8..actionsave=c+|
00007fa0  34 2a 31 31 32 0d 38 f4  12 62 6f 74 74 6c 65 3d  |4*112.8..bottle=|
00007fb0  63 2b 34 2a 31 31 33 0d  38 fe 14 62 6f 74 5f 74  |c+4*113.8..bot_t|
00007fc0  69 6c 74 3d 63 2b 34 2a  31 31 34 0d 39 08 14 62  |ilt=c+4*114.9..b|
00007fd0  6f 74 5f 6c 65 61 6e 3d  63 2b 34 2a 31 31 35 0d  |ot_lean=c+4*115.|
00007fe0  39 12 14 62 6f 74 5f 78  6f 75 74 3d 63 2b 34 2a  |9..bot_xout=c+4*|
00007ff0  31 31 36 0d 39 1c 14 62  6f 74 5f 79 6f 75 74 3d  |116.9..bot_yout=|
00008000  63 2b 34 2a 31 31 37 0d  39 26 19 6c 69 6e 65 5f  |c+4*117.9&.line_|
00008010  73 65 6c 65 63 74 65 64  3d 63 2b 34 2a 31 31 38  |selected=c+4*118|
00008020  0d 39 30 16 62 6f 74 5f  66 69 6e 69 73 68 3d 63  |.90.bot_finish=c|
00008030  2b 34 2a 31 31 39 0d 39  3a 16 62 6f 74 5f 78 73  |+4*119.9:.bot_xs|
00008040  63 61 6c 65 3d 63 2b 34  2a 31 32 30 0d 39 44 16  |cale=c+4*120.9D.|
00008050  62 6f 74 5f 79 73 63 61  6c 65 3d 63 2b 34 2a 31  |bot_yscale=c+4*1|
00008060  32 31 0d 39 4e 15 68 61  6e 67 64 65 6c 61 79 3d  |21.9N.hangdelay=|
00008070  63 2b 34 2a 31 32 32 0d  39 58 0f 73 69 6e 3d 63  |c+4*122.9X.sin=c|
00008080  2b 34 2a 31 32 33 0d 39  62 0f 74 61 6e 3d 63 2b  |+4*123.9b.tan=c+|
00008090  34 2a 31 32 34 0d 39 6c  14 66 69 6c 65 5f 73 74  |4*124.9l.file_st|
000080a0  72 3d 63 2b 34 2a 31 32  35 0d 39 76 10 66 6f 72  |r=c+4*125.9v.for|
000080b0  6d 3d 63 2b 34 2a 31 32  36 0d 39 80 10 74 69 6c  |m=c+4*126.9..til|
000080c0  74 3d 63 2b 34 2a 31 32  37 0d 39 8a 10 6c 65 61  |t=c+4*127.9..lea|
000080d0  6e 3d 63 2b 34 2a 31 32  38 0d 39 94 14 72 6f 74  |n=c+4*128.9..rot|
000080e0  61 74 69 6f 6e 3d 63 2b  34 2a 31 32 39 0d 39 9e  |ation=c+4*129.9.|
000080f0  12 78 73 63 61 6c 65 3d  63 2b 34 2a 31 33 30 0d  |.xscale=c+4*130.|
00008100  39 a8 12 79 73 63 61 6c  65 3d 63 2b 34 2a 31 33  |9..yscale=c+4*13|
00008110  31 0d 39 b2 12 68 73 63  61 6c 65 3d 63 2b 34 2a  |1.9..hscale=c+4*|
00008120  31 33 32 0d 39 bc 19 66  6f 72 6d 5f 6c 69 73 74  |132.9..form_list|
00008130  5f 70 6f 73 3d 63 2b 34  2a 31 33 33 0d 39 c6 15  |_pos=c+4*133.9..|
00008140  66 6f 72 6d 6e 61 6d 65  73 3d 63 2b 34 2a 31 33  |formnames=c+4*13|
00008150  34 0d 39 d0 13 66 6f 72  6d 75 6c 61 3d 63 2b 34  |4.9..formula=c+4|
00008160  2a 31 33 35 0d 39 da 10  73 6b 65 6c 3d 63 2b 34  |*135.9..skel=c+4|
00008170  2a 31 33 36 0d 39 e4 17  73 68 61 64 65 5f 72 61  |*136.9..shade_ra|
00008180  6e 67 65 3d 63 2b 34 2a  31 33 37 0d 39 ee 15 6d  |nge=c+4*137.9..m|
00008190  69 6e 5f 73 68 61 64 65  3d 63 2b 34 2a 31 33 38  |in_shade=c+4*138|
000081a0  0d 39 f8 14 66 6f 6e 74  6c 69 73 74 3d 63 2b 34  |.9..fontlist=c+4|
000081b0  2a 31 33 39 0d 3a 02 16  6f 6c 64 61 63 74 69 6f  |*139.:..oldactio|
000081c0  6e 25 3d 63 2b 34 2a 31  34 30 0d 3a 0c 04 0d 3a  |n%=c+4*140.:...:|
000081d0  16 04 0d 3a 20 0f 42 4f  52 44 53 49 5a 45 3d 32  |...: .BORDSIZE=2|
000081e0  38 0d 3a 2a 10 57 45 44  47 45 53 49 5a 45 3d 31  |8.:*.WEDGESIZE=1|
000081f0  36 0d 3a 34 0e 74 65 78  74 63 6f 6c 25 3d 30 0d  |6.:4.textcol%=0.|
00008200  3a 3e 10 42 41 43 4b 43  4f 4c 25 3d 32 30 32 0d  |:>.BACKCOL%=202.|
00008210  3a 48 0f 54 49 54 4c 45  43 4f 4c 25 3d 30 0d 3a  |:H.TITLECOL%=0.:|
00008220  52 11 42 4f 52 44 45 52  43 4f 4c 25 3d 37 34 0d  |R.BORDERCOL%=74.|
00008230  3a 5c 0e 42 4f 52 44 31  25 3d 32 30 37 0d 3a 66  |:\.BORD1%=207.:f|
00008240  0d 42 4f 52 44 32 25 3d  31 35 0d 3a 70 0e 42 4f  |.BORD2%=15.:p.BO|
00008250  52 44 33 25 3d 31 33 38  0d 3a 7a 0e 42 4f 52 44  |RD3%=138.:z.BORD|
00008260  34 25 3d 31 39 37 0d 3a  84 15 44 49 52 45 43 54  |4%=197.:..DIRECT|
00008270  4f 52 59 43 4f 4c 25 3d  32 32 34 0d 3a 8e 04 0d  |ORYCOL%=224.:...|
00008280  3a 98 05 e1 0d 3a a2 04  0d 3a ac 13 dd f2 73 63  |:....:...:....sc|
00008290  72 65 65 6e 5f 73 65 6c  65 63 74 0d 3a b6 04 0d  |reen_select.:...|
000082a0  3a c0 23 e7 20 28 21 41  63 25 3d 31 20 84 20 21  |:.#. (!Ac%=1 . !|
000082b0  41 63 25 3d 32 29 20 80  20 73 74 65 70 25 3d 33  |Ac%=2) . step%=3|
000082c0  20 8c 0d 3a ca 05 f5 0d  3a d4 11 f2 6d 6f 75 73  | ..:....:...mous|
000082d0  65 5f 68 61 6e 64 6c 65  0d 3a de 37 44 25 3d 21  |e_handle.:.7D%=!|
000082e0  41 63 25 3a 45 25 3d 73  74 65 70 25 3a 46 25 3d  |Ac%:E%=step%:F%=|
000082f0  4d 42 3a 47 25 3d 4d 58  3a 48 25 3d 4d 59 3a d6  |MB:G%=MX:H%=MY:.|
00008300  20 73 63 72 65 65 6e 5f  73 65 6c 65 63 74 25 0d  | screen_select%.|
00008310  3a e8 0a fd 20 4d 42 3d  30 0d 3a f2 1c e7 20 21  |:... MB=0.:... !|
00008320  41 63 25 3d 31 20 8c 20  78 31 25 3d 4d 58 3a 79  |Ac%=1 . x1%=MX:y|
00008330  31 25 3d 4d 59 0d 3a fc  05 cc 0d 3b 06 37 44 25  |1%=MY.:....;.7D%|
00008340  3d 21 41 63 25 3a 45 25  3d 73 74 65 70 25 3a 46  |=!Ac%:E%=step%:F|
00008350  25 3d 4d 42 3a 47 25 3d  4d 58 3a 48 25 3d 4d 59  |%=MB:G%=MX:H%=MY|
00008360  3a d6 20 73 63 72 65 65  6e 5f 73 65 6c 65 63 74  |:. screen_select|
00008370  25 0d 3b 10 05 cd 0d 3b  1a 0d e7 20 21 59 45 53  |%.;....;... !YES|
00008380  25 20 8c 0d 3b 24 0e c8  8e 20 73 74 65 70 25 20  |% ..;$... step% |
00008390  ca 0d 3b 2e 14 c9 31 3a  78 31 25 3d 4d 58 3a 79  |..;...1:x1%=MX:y|
000083a0  31 25 3d 4d 59 0d 3b 38  14 c9 32 3a 78 32 25 3d  |1%=MY.;8..2:x2%=|
000083b0  4d 58 3a 79 32 25 3d 4d  59 0d 3b 42 14 c9 33 3a  |MX:y2%=MY.;B..3:|
000083c0  78 33 25 3d 4d 58 3a 79  33 25 3d 4d 59 0d 3b 4c  |x3%=MX:y3%=MY.;L|
000083d0  14 c9 34 3a 78 34 25 3d  4d 58 3a 79 34 25 3d 4d  |..4:x4%=MX:y4%=M|
000083e0  59 0d 3b 56 14 c9 35 3a  78 35 25 3d 4d 58 3a 79  |Y.;V..5:x5%=MX:y|
000083f0  35 25 3d 4d 59 0d 3b 60  05 cb 0d 3b 6a 05 cd 0d  |5%=MY.;`...;j...|
00008400  3b 74 0f e7 20 21 59 45  53 25 20 8c 20 e1 0d 3b  |;t.. !YES% . ..;|
00008410  7e 04 0d 3b 88 04 0d 3b  92 0f c8 8e 20 28 21 41  |~..;...;.... (!A|
00008420  63 25 29 20 ca 0d 3b 9c  04 0d 3b a6 0d f4 20 4d  |c%) ..;...;... M|
00008430  61 67 6e 69 66 79 0d 3b  b0 12 c9 31 32 3a c8 8e  |agnify.;...12:..|
00008440  20 73 74 65 70 25 20 ca  0d 3b ba 0f c9 32 3a 65  | step% ..;...2:e|
00008450  6e 74 65 72 25 3d 34 0d  3b c4 18 21 6d 61 67 6e  |nter%=4.;..!magn|
00008460  69 66 79 5f 78 70 6f 73  3d 4d 58 20 81 20 32 0d  |ify_xpos=MX . 2.|
00008470  3b ce 1e 21 6d 61 67 6e  69 66 79 5f 79 70 6f 73  |;..!magnify_ypos|
00008480  3d 32 35 35 2d 28 4d 59  20 81 20 34 29 0d 3b d8  |=255-(MY . 4).;.|
00008490  05 cb 0d 3b e2 04 0d 3b  ec 0a f4 20 46 69 6c 6c  |...;...;... Fill|
000084a0  0d 3b f6 12 c9 31 33 3a  c8 8e 20 73 74 65 70 25  |.;...13:.. step%|
000084b0  20 ca 0d 3c 00 12 c9 32  3a f2 70 6f 69 6e 74 28  | ..<...2:.point(|
000084c0  30 2c 30 29 0d 3c 0a 1a  63 6f 6c 25 3d b0 4d 58  |0,0).<..col%=.MX|
000084d0  2c 4d 59 29 2b c8 9c 28  4d 58 2c 4d 59 29 0d 3c  |,MY)+..(MX,MY).<|
000084e0  14 1e e6 20 31 32 38 2b  b0 4d 58 2c 4d 59 29 20  |... 128+.MX,MY) |
000084f0  c8 9c 20 c8 9c 28 4d 58  2c 4d 59 29 0d 3c 1e 14  |.. ..(MX,MY).<..|
00008500  c8 8e 20 21 66 69 6c 6c  5f 73 74 79 6c 65 20 ca  |.. !fill_style .|
00008510  0d 3c 28 07 c9 30 3a 0d  3c 32 20 e7 20 21 70 6d  |.<(..0:.<2 . !pm|
00008520  25 3e 30 20 8c 20 d6 20  62 69 74 5f 6d 61 70 5f  |%>0 . . bit_map_|
00008530  73 63 61 6e 5f 41 25 0d  3c 3c 26 e7 20 21 70 6d  |scan_A%.<<&. !pm|
00008540  25 3e 30 20 84 20 63 6f  6c 25 3c 3e 21 70 63 25  |%>0 . col%<>!pc%|
00008550  20 8c 20 f0 26 38 35 2c  4d 58 2c 4d 59 0d 3c 46  | . .&85,MX,MY.<F|
00008560  21 e7 20 21 70 6d 25 3e  30 20 8c 20 d6 20 62 69  |!. !pm%>0 . . bi|
00008570  74 5f 6d 61 70 5f 70 61  74 74 65 72 6e 25 0d 3c  |t_map_pattern%.<|
00008580  50 0b c9 31 2c 32 2c 33  3a 0d 3c 5a 15 d6 20 62  |P..1,2,3:.<Z.. b|
00008590  69 74 5f 6d 61 70 5f 73  63 61 6e 5f 41 25 0d 3c  |it_map_scan_A%.<|
000085a0  64 0e f0 26 38 35 2c 4d  58 2c 4d 59 0d 3c 6e 14  |d..&85,MX,MY.<n.|
000085b0  c8 8e 20 21 66 69 6c 6c  5f 73 74 79 6c 65 20 ca  |.. !fill_style .|
000085c0  0d 3c 78 19 c9 31 2c 32  3a d6 20 76 65 72 74 69  |.<x..1,2:. verti|
000085d0  63 61 6c 5f 66 69 6c 6c  25 0d 3c 82 1c c9 33 3a  |cal_fill%.<...3:|
000085e0  41 25 3d 4d 58 20 81 32  3a 42 25 3d 32 35 35 2d  |A%=MX .2:B%=255-|
000085f0  4d 59 20 81 34 0d 3c 8c  14 d6 20 76 65 72 74 69  |MY .4.<... verti|
00008600  63 61 6c 5f 66 69 6c 6c  25 0d 3c 96 05 cb 0d 3c  |cal_fill%.<....<|
00008610  a0 05 cb 0d 3c aa 0b f2  75 70 64 61 74 65 0d 3c  |....<...update.<|
00008620  b4 05 cb 0d 3c be 04 0d  3c c8 15 f4 20 53 70 72  |....<...<... Spr|
00008630  69 74 65 20 48 61 6e 64  6c 69 6e 67 0d 3c d2 0a  |ite Handling.<..|
00008640  c9 31 34 2c 31 36 0d 3c  dc 2b e6 20 30 2c 28 74  |.14,16.<.+. 0,(t|
00008650  65 78 74 63 6f 6c 25 20  80 20 36 33 29 20 c8 9c  |extcol% . 63) ..|
00008660  20 28 74 65 78 74 63 6f  6c 25 20 80 20 31 39 32  | (textcol% . 192|
00008670  29 0d 3c e6 2f e6 20 30  2c 31 32 38 2b 28 42 41  |).<./. 0,128+(BA|
00008680  43 4b 43 4f 4c 25 20 80  20 36 33 29 20 c8 9c 20  |CKCOL% . 63) .. |
00008690  28 42 41 43 4b 43 4f 4c  25 20 80 20 31 39 32 29  |(BACKCOL% . 192)|
000086a0  0d 3c f0 14 c8 99 20 26  32 45 2c 38 20 b8 20 2c  |.<.... &2E,8 . ,|
000086b0  2c 2c 72 33 0d 3c fa 2c  c8 99 20 26 32 45 2c 31  |,,r3.<.,.. &2E,1|
000086c0  33 2c 2c 73 70 72 73 74  72 25 2c 33 30 2c 21 73  |3,,sprstr%,30,!s|
000086d0  70 72 73 65 6c 25 20 b8  20 2c 2c 2c 6c 65 6e 67  |prsel% . ,,,leng|
000086e0  0d 3d 04 18 3f 28 73 70  72 73 74 72 25 2b 6c 65  |.=..?(sprstr%+le|
000086f0  6e 67 2b 31 29 3d 31 33  0d 3d 0e 13 65 72 72 6f  |ng+1)=13.=..erro|
00008700  72 63 68 65 61 74 3d 21  41 63 25 0d 3d 18 22 21  |rcheat=!Ac%.=."!|
00008710  70 75 74 69 74 25 3d 31  3a f2 70 6f 69 6e 74 28  |putit%=1:.point(|
00008720  30 2c 50 4e 6b 65 79 62  6f 61 72 64 29 0d 3d 22  |0,PNkeyboard).="|
00008730  1b f2 72 65 73 65 74 5f  61 63 74 69 6f 6e 3a d6  |..reset_action:.|
00008740  20 75 70 74 72 65 65 25  0d 3d 2c 28 41 25 3d 2d  | uptree%.=,(A%=-|
00008750  31 32 38 3a 42 25 3d 21  73 74 61 72 74 79 25 2b  |128:B%=!starty%+|
00008760  35 36 3a 45 25 3d 2d 31  3a d6 20 68 65 6c 70 25  |56:E%=-1:. help%|
00008770  0d 3d 36 2f 41 25 3d 2d  31 32 38 3a 42 25 3d 21  |.=6/A%=-128:B%=!|
00008780  73 74 61 72 74 79 25 2d  21 73 69 7a 65 79 2d 39  |starty%-!sizey-9|
00008790  36 3a 45 25 3d 2d 31 3a  d6 20 68 65 6c 70 25 0d  |6:E%=-1:. help%.|
000087a0  3d 40 32 58 50 3d 21 73  74 61 72 74 78 25 2b 36  |=@2XP=!startx%+6|
000087b0  3a 59 50 3d 21 73 74 61  72 74 79 25 2d 34 38 3a  |:YP=!starty%-48:|
000087c0  ec 20 58 50 2c 59 50 3a  ef 20 35 3a f1 22 20 22  |. XP,YP:. 5:." "|
000087d0  3b 0d 3d 4a 2a 73 74 65  70 25 3d 31 3a f1 24 73  |;.=J*step%=1:.$s|
000087e0  70 72 73 74 72 25 3a 21  73 74 61 72 74 79 25 3d  |prstr%:!starty%=|
000087f0  21 73 74 61 72 74 79 25  2d 33 32 0d 3d 54 27 6f  |!starty%-32.=T'o|
00008800  6c 64 24 3d 24 73 70 72  73 74 72 25 3a 6f 6c 64  |ld$=$sprstr%:old|
00008810  24 3d c0 6f 6c 64 24 2c  a9 28 6f 6c 64 24 29 2d  |$=.old$,.(old$)-|
00008820  31 29 0d 3d 5e 23 67 6f  3d a4 69 6e 73 74 72 69  |1).=^#go=.instri|
00008830  6e 67 28 33 33 2c 31 32  36 2c 22 22 2c 6f 75 74  |ng(33,126,"",out|
00008840  24 2c 31 32 29 0d 3d 68  1e d6 20 6c 69 66 74 75  |$,12).=h.. liftu|
00008850  70 25 3a d6 20 70 75 74  62 61 63 6b 67 72 6f 75  |p%:. putbackgrou|
00008860  6e 64 25 0d 3d 72 0a e7  20 67 6f 20 8c 0d 3d 7c  |nd%.=r.. go ..=||
00008870  13 c8 8e 20 65 72 72 6f  72 63 68 65 61 74 20 ca  |... errorcheat .|
00008880  0d 3d 86 3b c9 31 36 3a  ff 20 22 53 43 4f 50 59  |.=.;.16:. "SCOPY|
00008890  20 22 2b 6f 6c 64 24 2b  22 20 22 2b 6f 75 74 24  | "+old$+" "+out$|
000088a0  3a 21 73 70 72 73 65 6c  25 3d 72 33 2b 31 3a 21  |:!sprsel%=r3+1:!|
000088b0  73 70 72 70 6f 73 3d 72  33 2d 35 0d 3d 90 22 c9  |sprpos=r3-5.=.".|
000088c0  31 34 3a ff 20 22 53 52  45 4e 41 4d 45 20 22 2b  |14:. "SRENAME "+|
000088d0  6f 6c 64 24 2b 22 20 22  2b 6f 75 74 24 0d 3d 9a  |old$+" "+out$.=.|
000088e0  05 cb 0d 3d a4 05 cd 0d  3d ae 10 f2 72 65 73 65  |...=....=...rese|
000088f0  74 5f 65 6e 74 72 79 0d  3d b8 04 0d 3d c2 1c f4  |t_entry.=...=...|
00008900  20 53 61 76 65 20 43 6f  6d 70 72 65 73 73 65 64  | Save Compressed|
00008910  20 53 63 72 65 65 6e 0d  3d cc 2c c9 31 35 3a e7  | Screen.=.,.15:.|
00008920  20 a4 74 65 78 74 5f 65  6e 74 72 79 28 33 33 2c  | .text_entry(33,|
00008930  24 73 63 72 65 65 6e 5f  73 74 72 25 2c 32 35 35  |$screen_str%,255|
00008940  29 20 8c 0d 3d d6 37 f2  70 6f 69 6e 74 28 30 2c  |) ..=.7.point(0,|
00008950  31 29 3a f2 63 6f 6d 70  72 65 73 73 65 64 73 61  |1):.compressedsa|
00008960  76 65 28 6f 75 74 24 29  3a 24 73 63 72 65 65 6e  |ve(out$):$screen|
00008970  5f 73 74 72 25 3d 6f 75  74 24 0d 3d e0 05 cd 0d  |_str%=out$.=....|
00008980  3d ea 10 f2 72 65 73 65  74 5f 65 6e 74 72 79 0d  |=...reset_entry.|
00008990  3d f4 04 0d 3d fe 12 f4  20 53 61 76 65 20 42 72  |=...=... Save Br|
000089a0  75 73 68 65 73 0d 3e 08  2b c9 31 37 3a e7 20 a4  |ushes.>.+.17:. .|
000089b0  74 65 78 74 5f 65 6e 74  72 79 28 33 33 2c 24 62  |text_entry(33,$b|
000089c0  72 75 73 68 5f 73 74 72  25 2c 32 35 35 29 20 8c  |rush_str%,255) .|
000089d0  0d 3e 12 36 f2 70 6f 69  6e 74 28 30 2c 31 29 3a  |.>.6.point(0,1):|
000089e0  ff 20 22 53 41 56 45 20  22 2b 6f 75 74 24 2b 22  |. "SAVE "+out$+"|
000089f0  20 22 2b c3 7e 28 62 72  75 73 68 25 29 2b 22 20  | "+.~(brush%)+" |
00008a00  2b 32 30 30 30 22 0d 3e  1c 2f ff 28 22 53 45 54  |+2000".>./.("SET|
00008a10  54 59 50 45 20 22 2b 6f  75 74 24 2b 22 20 26 44  |TYPE "+out$+" &D|
00008a20  37 45 22 29 3a 24 62 72  75 73 68 5f 73 74 72 25  |7E"):$brush_str%|
00008a30  3d 6f 75 74 24 0d 3e 26  05 cd 0d 3e 30 10 f2 72  |=out$.>&...>0..r|
00008a40  65 73 65 74 5f 65 6e 74  72 79 0d 3e 3a 04 0d 3e  |eset_entry.>:..>|
00008a50  44 11 f4 20 4e 61 6d 65  20 53 70 72 69 74 65 0d  |D.. Name Sprite.|
00008a60  3e 4e 37 c9 31 38 3a e7  20 a4 74 65 78 74 5f 65  |>N7.18:. .text_e|
00008a70  6e 74 72 79 28 33 33 2c  67 5f 73 70 72 69 74 65  |ntry(33,g_sprite|
00008a80  24 2c 31 32 29 20 8c 20  67 5f 73 70 72 69 74 65  |$,12) . g_sprite|
00008a90  24 3d 6f 75 74 24 0d 3e  58 18 21 41 63 25 3d 33  |$=out$.>X.!Ac%=3|
00008aa0  38 3a f2 72 65 73 65 74  5f 65 6e 74 72 79 0d 3e  |8:.reset_entry.>|
00008ab0  62 04 0d 3e 6c 13 f4 20  53 61 76 65 20 50 61 74  |b..>l.. Save Pat|
00008ac0  74 65 72 6e 73 0d 3e 76  2d c9 31 39 3a e7 20 a4  |terns.>v-.19:. .|
00008ad0  74 65 78 74 5f 65 6e 74  72 79 28 33 33 2c 24 70  |text_entry(33,$p|
00008ae0  61 74 74 65 72 6e 5f 73  74 72 25 2c 32 35 35 29  |attern_str%,255)|
00008af0  20 8c 0d 3e 80 37 f2 70  6f 69 6e 74 28 30 2c 31  | ..>.7.point(0,1|
00008b00  29 3a ff 20 22 53 41 56  45 20 22 2b 6f 75 74 24  |):. "SAVE "+out$|
00008b10  2b 22 20 22 2b c3 7e 28  62 72 70 61 74 74 25 29  |+" "+.~(brpatt%)|
00008b20  2b 22 20 2b 32 30 30 30  22 0d 3e 8a 31 ff 28 22  |+" +2000".>.1.("|
00008b30  53 45 54 54 59 50 45 20  22 2b 6f 75 74 24 2b 22  |SETTYPE "+out$+"|
00008b40  20 26 44 33 41 22 29 3a  24 70 61 74 74 65 72 6e  | &D3A"):$pattern|
00008b50  5f 73 74 72 25 3d 6f 75  74 24 0d 3e 94 05 cd 0d  |_str%=out$.>....|
00008b60  3e 9e 10 f2 72 65 73 65  74 5f 65 6e 74 72 79 0d  |>...reset_entry.|
00008b70  3e a8 04 0d 3e b2 20 f4  20 66 75 6e 63 74 69 6f  |>...>. . functio|
00008b80  6e 20 32 30 20 2d 2d 20  46 49 4e 49 53 48 20 2d  |n 20 -- FINISH -|
00008b90  2d 20 21 0d 3e bc 04 0d  3e c6 17 f4 20 53 65 74  |- !.>...>... Set|
00008ba0  20 42 6f 72 64 65 72 20  43 6f 6c 6f 75 72 0d 3e  | Border Colour.>|
00008bb0  d0 15 c9 32 31 3a f2 72  65 73 65 74 5f 61 63 74  |...21:.reset_act|
00008bc0  69 6f 6e 0d 3e da 0e d6  20 73 65 74 62 6f 72 64  |ion.>... setbord|
00008bd0  25 0d 3e e4 04 0d 3e ee  0d f4 20 45 6c 6c 69 70  |%.>...>... Ellip|
00008be0  73 65 0d 3e f8 12 c9 32  32 3a c8 8e 20 73 74 65  |se.>...22:.. ste|
00008bf0  70 25 20 ca 0d 3f 02 14  c9 31 3a 78 31 25 3d 4d  |p% ..?...1:x1%=M|
00008c00  58 3a 79 31 25 3d 4d 59  0d 3f 0c 23 c9 32 3a 72  |X:y1%=MY.?.#.2:r|
00008c10  64 25 3d b6 28 28 4d 58  2d 78 31 25 29 5e 32 2b  |d%=.((MX-x1%)^2+|
00008c20  28 4d 59 2d 79 31 25 29  5e 32 29 0d 3f 16 12 c8  |(MY-y1%)^2).?...|
00008c30  8f 20 78 31 25 2c 79 31  25 2c 72 64 25 0d 3f 20  |. x1%,y1%,rd%.? |
00008c40  18 c8 96 3a c8 96 3a c8  8f 20 78 31 25 2c 79 31  |...:..:.. x1%,y1|
00008c50  25 2c 72 64 25 0d 3f 2a  2a c9 33 3a ec 20 78 31  |%,rd%.?**.3:. x1|
00008c60  25 2c 79 31 25 3a ec 20  78 31 25 2b 72 64 25 2c  |%,y1%:. x1%+rd%,|
00008c70  79 31 25 3a f0 20 26 43  35 2c 4d 58 2c 4d 59 0d  |y1%:. &C5,MX,MY.|
00008c80  3f 34 2d c8 96 3a c8 96  3a ec 20 78 31 25 2c 79  |?4-..:..:. x1%,y|
00008c90  31 25 3a ec 20 78 31 25  2b 72 64 25 2c 79 31 25  |1%:. x1%+rd%,y1%|
00008ca0  3a f0 20 26 43 35 2c 4d  58 2c 4d 59 0d 3f 3e 2a  |:. &C5,MX,MY.?>*|
00008cb0  c9 34 3a ec 20 78 31 25  2c 79 31 25 3a ec 20 78  |.4:. x1%,y1%:. x|
00008cc0  31 25 2b 72 64 25 2c 79  31 25 3a f0 20 26 43 35  |1%+rd%,y1%:. &C5|
00008cd0  2c 4d 58 2c 4d 59 0d 3f  48 05 cb 0d 3f 52 04 0d  |,MX,MY.?H...?R..|
00008ce0  3f 5c 11 f4 20 45 6c 6c  69 70 73 65 46 69 6c 6c  |?\.. EllipseFill|
00008cf0  0d 3f 66 12 c9 32 33 3a  c8 8e 20 73 74 65 70 25  |.?f..23:.. step%|
00008d00  20 ca 0d 3f 70 14 c9 31  3a 78 31 25 3d 4d 58 3a  | ..?p..1:x1%=MX:|
00008d10  79 31 25 3d 4d 59 0d 3f  7a 23 c9 32 3a 72 64 25  |y1%=MY.?z#.2:rd%|
00008d20  3d b6 28 28 4d 58 2d 78  31 25 29 5e 32 2b 28 4d  |=.((MX-x1%)^2+(M|
00008d30  59 2d 79 31 25 29 5e 32  29 0d 3f 84 12 c8 8f 20  |Y-y1%)^2).?.... |
00008d40  78 31 25 2c 79 31 25 2c  72 64 25 0d 3f 8e 18 c8  |x1%,y1%,rd%.?...|
00008d50  96 3a c8 96 3a c8 8f 20  78 31 25 2c 79 31 25 2c  |.:..:.. x1%,y1%,|
00008d60  72 64 25 0d 3f 98 2a c9  33 3a ec 20 78 31 25 2c  |rd%.?.*.3:. x1%,|
00008d70  79 31 25 3a ec 20 78 31  25 2b 72 64 25 2c 79 31  |y1%:. x1%+rd%,y1|
00008d80  25 3a f0 20 26 43 35 2c  4d 58 2c 4d 59 0d 3f a2  |%:. &C5,MX,MY.?.|
00008d90  2d c8 96 3a c8 96 3a ec  20 78 31 25 2c 79 31 25  |-..:..:. x1%,y1%|
00008da0  3a ec 20 78 31 25 2b 72  64 25 2c 79 31 25 3a f0  |:. x1%+rd%,y1%:.|
00008db0  20 26 43 35 2c 4d 58 2c  4d 59 0d 3f ac 2a c9 34  | &C5,MX,MY.?.*.4|
00008dc0  3a ec 20 78 31 25 2c 79  31 25 3a ec 20 78 31 25  |:. x1%,y1%:. x1%|
00008dd0  2b 72 64 25 2c 79 31 25  3a f0 20 26 43 44 2c 4d  |+rd%,y1%:. &CD,M|
00008de0  58 2c 4d 59 0d 3f b6 05  cb 0d 3f c0 04 0d 3f ca  |X,MY.?....?...?.|
00008df0  0e f4 20 66 61 73 74 63  6f 70 79 0d 3f d4 12 c9  |.. fastcopy.?...|
00008e00  32 34 3a c8 8e 20 73 74  65 70 25 20 ca 0d 3f de  |24:.. step% ..?.|
00008e10  16 c9 31 2c 32 3a f2 67  65 74 72 65 63 74 61 6e  |..1,2:.getrectan|
00008e20  67 6c 65 0d 3f e8 2c c9  33 3a 4d 58 3d 28 4d 58  |gle.?.,.3:MX=(MX|
00008e30  20 81 20 32 29 2a 32 3a  4d 59 3d 28 4d 59 20 81  | . 2)*2:MY=(MY .|
00008e40  20 34 29 2a 34 3a f2 63  6f 70 79 73 6f 72 74 0d  | 4)*4:.copysort.|
00008e50  3f f2 1b c8 93 20 4d 58  2c 4d 59 2c 78 73 25 2d  |?.... MX,MY,xs%-|
00008e60  32 2c 2d 28 79 73 25 2b  34 29 0d 3f fc 21 c8 96  |2,-(ys%+4).?.!..|
00008e70  3a c8 96 3a c8 93 20 4d  58 2c 4d 59 2c 78 73 25  |:..:.. MX,MY,xs%|
00008e80  2d 32 2c 2d 28 79 73 25  2b 34 29 0d 40 06 07 c9  |-2,-(ys%+4).@...|
00008e90  34 3a 0d 40 10 0c 41 25  3d 78 31 25 81 32 0d 40  |4:.@..A%=x1%.2.@|
00008ea0  1a 12 42 25 3d 32 35 35  2d 28 79 31 25 81 34 29  |..B%=255-(y1%.4)|
00008eb0  0d 40 24 0c 43 25 3d 78  73 25 81 32 0d 40 2e 0d  |.@$.C%=xs%.2.@..|
00008ec0  44 25 3d 2d 79 73 25 81  34 0d 40 38 0c 45 25 3d  |D%=-ys%.4.@8.E%=|
00008ed0  4d 58 20 81 32 0d 40 42  1c 46 25 3d 32 35 35 2d  |MX .2.@B.F%=255-|
00008ee0  28 4d 59 20 81 34 29 2b  28 79 73 25 2b 34 29 81  |(MY .4)+(ys%+4).|
00008ef0  34 0d 40 4c 0b 47 25 3d  21 70 6d 25 0d 40 56 19  |4.@L.G%=!pm%.@V.|
00008f00  d6 20 70 75 74 73 63 72  65 65 6e 72 65 63 74 61  |. putscreenrecta|
00008f10  6e 67 6c 65 25 0d 40 60  05 cb 0d 40 6a 04 0d 40  |ngle%.@`...@j..@|
00008f20  74 0f f4 20 73 6d 65 61  72 63 6f 70 79 0d 40 7e  |t.. smearcopy.@~|
00008f30  12 c9 32 35 3a c8 8e 20  73 74 65 70 25 20 ca 0d  |..25:.. step% ..|
00008f40  40 88 16 c9 31 2c 32 3a  f2 67 65 74 72 65 63 74  |@...1,2:.getrect|
00008f50  61 6e 67 6c 65 0d 40 92  16 c9 33 3a 70 78 31 25  |angle.@...3:px1%|
00008f60  3d 4d 58 3a 70 79 31 25  3d 4d 59 0d 40 9c 18 c9  |=MX:py1%=MY.@...|
00008f70  34 3a 86 20 70 78 31 25  2c 70 79 31 25 2c 4d 58  |4:. px1%,py1%,MX|
00008f80  2c 4d 59 0d 40 a6 1b c8  96 3a c8 96 3a 86 20 70  |,MY.@....:..:. p|
00008f90  78 31 25 2c 70 79 31 25  2c 4d 58 2c 4d 59 0d 40  |x1%,py1%,MX,MY.@|
00008fa0  b0 13 70 78 32 25 3d 4d  58 3a 70 79 32 25 3d 4d  |..px2%=MX:py2%=M|
00008fb0  59 0d 40 ba 30 c9 35 3a  86 20 70 78 31 25 2c 70  |Y.@.0.5:. px1%,p|
00008fc0  79 31 25 2c 70 78 32 25  2c 70 79 32 25 3a df 20  |y1%,px2%,py2%:. |
00008fd0  4d 58 2c 4d 59 3a df 20  70 78 31 25 2c 70 79 31  |MX,MY:. px1%,py1|
00008fe0  25 0d 40 c4 33 c8 96 3a  c8 96 3a 86 20 70 78 31  |%.@.3..:..:. px1|
00008ff0  25 2c 70 79 31 25 2c 70  78 32 25 2c 70 79 32 25  |%,py1%,px2%,py2%|
00009000  3a df 20 4d 58 2c 4d 59  3a df 20 70 78 31 25 2c  |:. MX,MY:. px1%,|
00009010  70 79 31 25 0d 40 ce 13  70 78 33 25 3d 4d 58 3a  |py1%.@..px3%=MX:|
00009020  70 79 33 25 3d 4d 59 0d  40 d8 3c c9 36 3a 86 20  |py3%=MY.@.<.6:. |
00009030  70 78 31 25 2c 70 79 31  25 2c 70 78 32 25 2c 70  |px1%,py1%,px2%,p|
00009040  79 32 25 3a df 20 70 78  33 25 2c 70 79 33 25 3a  |y2%:. px3%,py3%:|
00009050  df 20 4d 58 2c 4d 59 3a  df 20 70 78 31 25 2c 70  |. MX,MY:. px1%,p|
00009060  79 31 25 0d 40 e2 3f c8  96 3a c8 96 3a 86 20 70  |y1%.@.?..:..:. p|
00009070  78 31 25 2c 70 79 31 25  2c 70 78 32 25 2c 70 79  |x1%,py1%,px2%,py|
00009080  32 25 3a df 20 70 78 33  25 2c 70 79 33 25 3a df  |2%:. px3%,py3%:.|
00009090  20 4d 58 2c 4d 59 3a df  20 70 78 31 25 2c 70 79  | MX,MY:. px1%,py|
000090a0  31 25 0d 40 ec 13 70 78  34 25 3d 4d 58 3a 70 79  |1%.@..px4%=MX:py|
000090b0  34 25 3d 4d 59 0d 40 f6  07 c9 37 3a 0d 41 00 21  |4%=MY.@...7:.A.!|
000090c0  f2 73 6d 65 61 72 73 63  72 65 65 6e 28 78 31 25  |.smearscreen(x1%|
000090d0  2c 79 31 25 2c 78 73 25  2c 79 73 25 29 0d 41 0a  |,y1%,xs%,ys%).A.|
000090e0  05 cb 0d 41 14 04 0d 41  1e 12 f4 20 50 61 72 72  |...A...A... Parr|
000090f0  61 6c 6c 6f 67 72 61 6d  0d 41 28 12 c9 32 36 3a  |allogram.A(..26:|
00009100  c8 8e 20 73 74 65 70 25  20 ca 0d 41 32 16 c9 31  |.. step% ..A2..1|
00009110  3a 70 78 31 25 3d 4d 58  3a 70 79 31 25 3d 4d 59  |:px1%=MX:py1%=MY|
00009120  0d 41 3c 18 c9 32 3a 86  20 70 78 31 25 2c 70 79  |.A<..2:. px1%,py|
00009130  31 25 2c 4d 58 2c 4d 59  0d 41 46 1b c8 96 3a c8  |1%,MX,MY.AF...:.|
00009140  96 3a 86 20 70 78 31 25  2c 70 79 31 25 2c 4d 58  |.:. px1%,py1%,MX|
00009150  2c 4d 59 0d 41 50 13 70  78 32 25 3d 4d 58 3a 70  |,MY.AP.px2%=MX:p|
00009160  79 32 25 3d 4d 59 0d 41  5a 50 c9 33 3a 86 20 70  |y2%=MY.AZP.3:. p|
00009170  78 31 25 2c 70 79 31 25  2c 70 78 32 25 2c 70 79  |x1%,py1%,px2%,py|
00009180  32 25 3a df 20 4d 58 2c  4d 59 3a df 20 70 78 31  |2%:. MX,MY:. px1|
00009190  25 2d 28 70 78 32 25 2d  4d 58 29 2c 70 79 31 25  |%-(px2%-MX),py1%|
000091a0  2d 28 70 79 32 25 2d 4d  59 29 3a df 20 70 78 31  |-(py2%-MY):. px1|
000091b0  25 2c 70 79 31 25 0d 41  64 53 c8 96 3a c8 96 3a  |%,py1%.AdS..:..:|
000091c0  86 20 70 78 31 25 2c 70  79 31 25 2c 70 78 32 25  |. px1%,py1%,px2%|
000091d0  2c 70 79 32 25 3a df 20  4d 58 2c 4d 59 3a df 20  |,py2%:. MX,MY:. |
000091e0  70 78 31 25 2d 28 70 78  32 25 2d 4d 58 29 2c 70  |px1%-(px2%-MX),p|
000091f0  79 31 25 2d 28 70 79 32  25 2d 4d 59 29 3a df 20  |y1%-(py2%-MY):. |
00009200  70 78 31 25 2c 70 79 31  25 0d 41 6e 50 c9 34 3a  |px1%,py1%.AnP.4:|
00009210  86 20 70 78 31 25 2c 70  79 31 25 2c 70 78 32 25  |. px1%,py1%,px2%|
00009220  2c 70 79 32 25 3a df 20  4d 58 2c 4d 59 3a df 20  |,py2%:. MX,MY:. |
00009230  70 78 31 25 2d 28 70 78  32 25 2d 4d 58 29 2c 70  |px1%-(px2%-MX),p|
00009240  79 31 25 2d 28 70 79 32  25 2d 4d 59 29 3a df 20  |y1%-(py2%-MY):. |
00009250  70 78 31 25 2c 70 79 31  25 0d 41 78 05 cb 0d 41  |px1%,py1%.Ax...A|
00009260  82 04 0d 41 8c 16 f4 20  50 61 72 72 61 6c 6f 67  |...A... Parralog|
00009270  72 61 6d 20 66 69 6c 6c  0d 41 96 12 c9 32 37 3a  |ram fill.A...27:|
00009280  c8 8e 20 73 74 65 70 25  20 ca 0d 41 a0 16 c9 31  |.. step% ..A...1|
00009290  3a 70 78 31 25 3d 4d 58  3a 70 79 31 25 3d 4d 59  |:px1%=MX:py1%=MY|
000092a0  0d 41 aa 18 c9 32 3a 86  20 70 78 31 25 2c 70 79  |.A...2:. px1%,py|
000092b0  31 25 2c 4d 58 2c 4d 59  0d 41 b4 1b c8 96 3a c8  |1%,MX,MY.A....:.|
000092c0  96 3a 86 20 70 78 31 25  2c 70 79 31 25 2c 4d 58  |.:. px1%,py1%,MX|
000092d0  2c 4d 59 0d 41 be 13 70  78 32 25 3d 4d 58 3a 70  |,MY.A..px2%=MX:p|
000092e0  79 32 25 3d 4d 59 0d 41  c8 50 c9 33 3a 86 20 70  |y2%=MY.A.P.3:. p|
000092f0  78 31 25 2c 70 79 31 25  2c 70 78 32 25 2c 70 79  |x1%,py1%,px2%,py|
00009300  32 25 3a df 20 4d 58 2c  4d 59 3a df 20 70 78 31  |2%:. MX,MY:. px1|
00009310  25 2d 28 70 78 32 25 2d  4d 58 29 2c 70 79 31 25  |%-(px2%-MX),py1%|
00009320  2d 28 70 79 32 25 2d 4d  59 29 3a df 20 70 78 31  |-(py2%-MY):. px1|
00009330  25 2c 70 79 31 25 0d 41  d2 53 c8 96 3a c8 96 3a  |%,py1%.A.S..:..:|
00009340  86 20 70 78 31 25 2c 70  79 31 25 2c 70 78 32 25  |. px1%,py1%,px2%|
00009350  2c 70 79 32 25 3a df 20  4d 58 2c 4d 59 3a df 20  |,py2%:. MX,MY:. |
00009360  70 78 31 25 2d 28 70 78  32 25 2d 4d 58 29 2c 70  |px1%-(px2%-MX),p|
00009370  79 31 25 2d 28 70 79 32  25 2d 4d 59 29 3a df 20  |y1%-(py2%-MY):. |
00009380  70 78 31 25 2c 70 79 31  25 0d 41 dc 2a c9 34 3a  |px1%,py1%.A.*.4:|
00009390  ec 20 70 78 31 25 2c 70  79 31 25 3a ec 20 70 78  |. px1%,py1%:. px|
000093a0  32 25 2c 70 79 32 25 3a  f0 20 26 37 35 2c 4d 58  |2%,py2%:. &75,MX|
000093b0  2c 4d 59 0d 41 e6 05 cb  0d 41 f0 04 0d 41 fa 09  |,MY.A....A...A..|
000093c0  f4 20 43 6c 73 0d 42 04  08 c9 32 38 3a 0d 42 0e  |. Cls.B...28:.B.|
000093d0  84 f2 65 72 72 6f 72 68  61 6e 64 6c 65 28 32 2c  |..errorhandle(2,|
000093e0  22 44 6f 20 79 6f 75 20  72 65 61 6c 6c 79 20 77  |"Do you really w|
000093f0  69 73 68 20 74 6f 20 63  6c 65 61 72 20 74 68 65  |ish to clear the|
00009400  20 73 63 72 65 65 6e 20  74 6f 20 74 68 65 20 63  | screen to the c|
00009410  75 72 72 65 6e 74 20 63  6f 6c 6f 75 72 20 28 4e  |urrent colour (N|
00009420  4f 54 45 20 59 6f 75 20  63 61 6e 20 55 4e 44 4f  |OTE You can UNDO|
00009430  20 61 66 74 65 72 77 61  72 64 73 29 22 2c 22 43  | afterwards)","C|
00009440  4f 4e 46 49 52 4d 22 2c  73 65 6c 65 63 74 65 64  |ONFIRM",selected|
00009450  29 0d 42 18 12 e7 20 73  65 6c 65 63 74 65 64 3d  |).B... selected=|
00009460  31 20 8c 0d 42 22 0d d6  20 6c 69 66 74 75 70 25  |1 ..B".. liftup%|
00009470  0d 42 2c 21 d6 20 63 6f  6c 6f 75 72 25 3a c8 93  |.B,!. colour%:..|
00009480  20 c8 90 20 30 2c 30 2c  31 32 37 39 2c 31 30 32  | .. 0,0,1279,102|
00009490  33 0d 42 36 0f d6 20 6c  69 66 74 64 6f 77 6e 25  |3.B6.. liftdown%|
000094a0  0d 42 40 05 cd 0d 42 4a  11 f2 72 65 73 65 74 5f  |.B@...BJ..reset_|
000094b0  61 63 74 69 6f 6e 0d 42  54 0b f2 75 70 64 61 74  |action.BT..updat|
000094c0  65 0d 42 5e 04 0d 42 68  21 f4 20 46 69 6c 69 6e  |e.B^..Bh!. Filin|
000094d0  67 20 28 42 65 6c 69 65  76 65 20 69 74 20 6f 72  |g (Believe it or|
000094e0  20 6e 6f 74 21 29 0d 42  72 10 c9 32 39 2c 33 30  | not!).Br..29,30|
000094f0  2c 33 31 2c 33 32 0d 42  7c 0f f2 70 6f 69 6e 74  |,31,32.B|..point|
00009500  28 30 2c 31 29 0d 42 86  28 65 72 72 6f 72 63 68  |(0,1).B.(errorch|
00009510  65 61 74 3d 21 41 63 25  3a 66 69 6c 65 6e 61 6d  |eat=!Ac%:filenam|
00009520  65 24 3d 24 66 69 6c 65  5f 73 74 72 25 0d 42 90  |e$=$file_str%.B.|
00009530  1b f2 72 65 73 65 74 5f  61 63 74 69 6f 6e 3a d6  |..reset_action:.|
00009540  20 75 70 74 72 65 65 25  0d 42 9a 13 c8 8e 20 65  | uptree%.B.... e|
00009550  72 72 6f 72 63 68 65 61  74 20 ca 0d 42 a4 3a c9  |rrorcheat ..B.:.|
00009560  32 39 3a ff 20 22 53 4c  4f 41 44 20 22 2b 66 69  |29:. "SLOAD "+fi|
00009570  6c 65 6e 61 6d 65 24 3a  24 73 70 72 69 74 65 5f  |lename$:$sprite_|
00009580  73 74 72 25 3d 66 69 6c  65 6e 61 6d 65 24 3a 21  |str%=filename$:!|
00009590  70 6d 25 3d 32 0d 42 ae  3b c9 33 30 3a ff 20 22  |pm%=2.B.;.30:. "|
000095a0  53 4d 45 52 47 45 20 22  2b 66 69 6c 65 6e 61 6d  |SMERGE "+filenam|
000095b0  65 24 3a 24 73 70 72 69  74 65 5f 73 74 72 25 3d  |e$:$sprite_str%=|
000095c0  66 69 6c 65 6e 61 6d 65  24 3a 21 70 6d 25 3d 32  |filename$:!pm%=2|
000095d0  0d 42 b8 07 c9 33 31 0d  42 c2 19 d6 20 6c 69 66  |.B...31.B... lif|
000095e0  74 75 70 25 3a d6 20 75  6e 64 6f 73 61 76 65 25  |tup%:. undosave%|
000095f0  0d 42 cc 1a 24 73 63 72  65 65 6e 5f 73 74 72 25  |.B..$screen_str%|
00009600  3d 66 69 6c 65 6e 61 6d  65 24 0d 42 d6 0c c8 8e  |=filename$.B....|
00009610  20 6f 73 25 20 ca 0d 42  e0 21 c9 31 3a 42 25 3d  | os% ..B.!.1:B%=|
00009620  66 69 6c 65 5f 73 74 72  25 3a d6 20 73 63 72 65  |file_str%:. scre|
00009630  65 6e 6c 6f 61 64 25 0d  42 ea 20 7f 3a ff 20 22  |enload%.B. .:. "|
00009640  53 43 52 45 45 4e 4c 4f  41 44 20 22 2b 24 66 69  |SCREENLOAD "+$fi|
00009650  6c 65 5f 73 74 72 25 0d  42 f4 05 cb 0d 42 fe 0d  |le_str%.B....B..|
00009660  e7 20 eb 3c 3e 31 35 20  8c 0d 43 08 19 c8 99 20  |. .<>15 ..C.... |
00009670  22 4f 53 5f 52 65 6d 6f  76 65 43 75 72 73 6f 72  |"OS_RemoveCursor|
00009680  73 22 0d 43 12 0d c8 8e  20 bf 28 30 29 20 ca 0d  |s".C.... .(0) ..|
00009690  43 1c 0c c9 22 44 22 2c  22 64 22 0d 43 26 23 e3  |C..."D","d".C&#.|
000096a0  20 52 3d 30 20 b8 20 31  35 3a fb 20 52 2c 52 3c  | R=0 . 15:. R,R<|
000096b0  3c 34 2c 52 3c 3c 34 2c  52 3c 3c 34 3a ed 0d 43  |<4,R<<4,R<<4:..C|
000096c0  30 0c c9 22 49 22 2c 22  69 22 0d 43 3a 26 e3 20  |0.."I","i".C:&. |
000096d0  52 3d 30 20 b8 20 31 35  3a fb 20 31 35 2d 52 2c  |R=0 . 15:. 15-R,|
000096e0  52 3c 3c 34 2c 52 3c 3c  34 2c 52 3c 3c 34 3a ed  |R<<4,R<<4,R<<4:.|
000096f0  0d 43 44 05 cb 0d 43 4e  0e ea 20 85 3a 65 72 72  |.CD...CN.. .:err|
00009700  25 3d a3 0d 43 58 17 ee  20 85 20 ea 20 65 72 72  |%=..CX.. . . err|
00009710  25 3d b9 3a e5 20 8d 40  76 43 0d 43 62 12 d6 20  |%=.:. .@vC.Cb.. |
00009720  63 6f 6e 76 65 72 74 6d  6f 64 65 25 0d 43 6c 1a  |convertmode%.Cl.|
00009730  24 73 63 72 65 65 6e 5f  73 74 72 25 3d 66 69 6c  |$screen_str%=fil|
00009740  65 6e 61 6d 65 24 0d 43  76 07 eb 31 35 0d 43 80  |ename$.Cv..15.C.|
00009750  07 f7 20 85 0d 43 8a 0e  63 61 74 25 21 30 3d 31  |.. ..C..cat%!0=1|
00009760  34 38 0d 43 94 0d 63 61  74 25 21 34 3d 2d 31 0d  |48.C..cat%!4=-1.|
00009770  43 9e 26 c8 99 20 22 4f  53 5f 52 65 61 64 56 64  |C.&.. "OS_ReadVd|
00009780  75 56 61 72 69 61 62 6c  65 73 22 2c 63 61 74 25  |uVariables",cat%|
00009790  2c 63 61 74 25 0d 43 a8  15 21 74 6f 70 73 63 72  |,cat%.C..!topscr|
000097a0  65 65 6e 25 3d 21 63 61  74 25 0d 43 b2 19 c8 99  |een%=!cat%.C....|
000097b0  20 22 4f 53 5f 52 65 6d  6f 76 65 43 75 72 73 6f  | "OS_RemoveCurso|
000097c0  72 73 22 0d 43 bc 12 d6  20 75 6e 64 6f 72 65 73  |rs".C... undores|
000097d0  74 6f 72 65 25 0d 43 c6  13 e7 20 65 72 72 25 20  |tore%.C... err% |
000097e0  8c 20 85 20 9f 2c f6 24  0d 43 d0 05 cd 0d 43 da  |. . .,.$.C....C.|
000097f0  0f d6 20 6c 69 66 74 64  6f 77 6e 25 0d 43 e4 20  |.. liftdown%.C. |
00009800  c9 33 32 3a f2 66 6f 72  6d 75 6c 61 5f 6c 6f 61  |.32:.formula_loa|
00009810  64 28 66 69 6c 65 6e 61  6d 65 24 29 0d 43 ee 05  |d(filename$).C..|
00009820  cb 0d 43 f8 0b f2 75 70  64 61 74 65 0d 44 02 04  |..C...update.D..|
00009830  0d 44 0c 19 f4 20 46 75  6e 63 74 69 6f 6e 20 33  |.D... Function 3|
00009840  33 20 3d 20 64 75 6d 6d  79 0d 44 16 04 0d 44 20  |3 = dummy.D...D |
00009850  15 f4 20 45 76 61 6c 20  45 78 70 72 65 73 73 69  |.. Eval Expressi|
00009860  6f 6e 0d 44 2a 26 c9 33  34 3a 21 70 75 74 69 74  |on.D*&.34:!putit|
00009870  25 3d 31 3a f2 70 6f 69  6e 74 28 30 2c 50 4e 6b  |%=1:.point(0,PNk|
00009880  65 79 62 6f 61 72 64 29  0d 44 34 1b f2 72 65 73  |eyboard).D4..res|
00009890  65 74 5f 61 63 74 69 6f  6e 3a d6 20 75 70 74 72  |et_action:. uptr|
000098a0  65 65 25 0d 44 3e 28 41  25 3d 2d 31 32 38 3a 42  |ee%.D>(A%=-128:B|
000098b0  25 3d 21 73 74 61 72 74  79 25 2b 35 36 3a 45 25  |%=!starty%+56:E%|
000098c0  3d 2d 31 3a d6 20 68 65  6c 70 25 0d 44 48 2f 41  |=-1:. help%.DH/A|
000098d0  25 3d 2d 31 32 38 3a 42  25 3d 21 73 74 61 72 74  |%=-128:B%=!start|
000098e0  79 25 2d 21 73 69 7a 65  79 2d 39 36 3a 45 25 3d  |y%-!sizey-96:E%=|
000098f0  2d 31 3a d6 20 68 65 6c  70 25 0d 44 52 0b 73 74  |-1:. help%.DR.st|
00009900  65 70 25 3d 31 0d 44 5c  05 f5 0d 44 66 34 64 75  |ep%=1.D\...Df4du|
00009910  6d 6d 79 3d a4 69 6e 73  74 72 69 6e 67 28 33 32  |mmy=.instring(32|
00009920  2c 31 32 36 2c 65 76 61  6c 24 2c 6f 75 74 24 2c  |,126,eval$,out$,|
00009930  32 35 35 29 3a e7 20 64  75 6d 6d 79 20 8c 0d 44  |255):. dummy ..D|
00009940  70 26 21 73 74 61 72 74  79 25 2d 3d 33 32 3a f2  |p&!starty%-=32:.|
00009950  42 55 54 4f 46 46 28 37  29 3a 65 76 61 6c 24 3d  |BUTOFF(7):eval$=|
00009960  6f 75 74 24 0d 44 7a 35  f2 65 76 61 6c 5f 65 72  |out$.Dz5.eval_er|
00009970  72 6f 72 5f 63 68 65 61  74 3a 64 75 6d 6d 79 3d  |ror_cheat:dummy=|
00009980  a4 69 6e 73 74 72 69 6e  67 28 33 32 2c 31 32 36  |.instring(32,126|
00009990  2c 74 24 2c 74 24 2c 31  29 0d 44 84 05 cd 0d 44  |,t$,t$,1).D....D|
000099a0  8e 1b 21 73 74 61 72 74  79 25 2b 3d 33 32 3a f2  |..!starty%+=32:.|
000099b0  42 55 54 4f 46 46 28 37  29 0d 44 98 0d fd 20 ac  |BUTOFF(7).D... .|
000099c0  20 64 75 6d 6d 79 0d 44  a2 1e d6 20 6c 69 66 74  | dummy.D... lift|
000099d0  75 70 25 3a d6 20 70 75  74 62 61 63 6b 67 72 6f  |up%:. putbackgro|
000099e0  75 6e 64 25 0d 44 ac 10  f2 72 65 73 65 74 5f 65  |und%.D...reset_e|
000099f0  6e 74 72 79 0d 44 b6 04  0d 44 c0 19 f4 20 50 61  |ntry.D...D... Pa|
00009a00  74 74 65 72 6e 20 26 20  42 72 75 73 68 20 67 65  |ttern & Brush ge|
00009a10  74 0d 44 ca 15 c9 33 35  2c 33 36 3a c8 8e 20 73  |t.D...35,36:.. s|
00009a20  74 65 70 25 20 ca 0d 44  d4 1b c9 31 3a c8 93 20  |tep% ..D...1:.. |
00009a30  4d 58 2d 33 32 2c 4d 59  2d 33 32 2c 36 32 2c 36  |MX-32,MY-32,62,6|
00009a40  30 0d 44 de 1e c8 96 3a  c8 96 3a c8 93 20 4d 58  |0.D....:..:.. MX|
00009a50  2d 33 32 2c 4d 59 2d 33  32 2c 36 32 2c 36 30 0d  |-32,MY-32,62,60.|
00009a60  44 e8 29 c9 32 3a 41 25  3d 28 4d 58 20 81 20 32  |D.).2:A%=(MX . 2|
00009a70  29 2d 31 36 3a 42 25 3d  32 35 35 2d 28 28 4d 59  |)-16:B%=255-((MY|
00009a80  20 81 20 34 29 2b 37 29  0d 44 f2 0d c8 8e 20 21  | . 4)+7).D.... !|
00009a90  41 63 25 20 ca 0d 44 fc  13 c9 33 35 3a d6 20 62  |Ac% ..D...35:. b|
00009aa0  72 75 73 68 67 65 74 25  0d 45 06 13 c9 33 36 3a  |rushget%.E...36:|
00009ab0  d6 20 73 68 61 70 65 67  65 74 25 0d 45 10 05 cb  |. shapeget%.E...|
00009ac0  0d 45 1a 05 cb 0d 45 24  04 0d 45 2e 10 f4 20 53  |.E....E$..E... S|
00009ad0  70 72 69 74 65 20 70 75  74 0d 45 38 16 c9 33 37  |prite put.E8..37|
00009ae0  3a e7 20 a4 70 75 74 5f  63 68 65 63 6b 20 8c 0d  |:. .put_check ..|
00009af0  45 42 0e c8 8e 20 73 74  65 70 25 20 ca 0d 45 4c  |EB... step% ..EL|
00009b00  2e c9 31 3a 4d 58 3d 28  4d 58 20 81 20 32 29 2a  |..1:MX=(MX . 2)*|
00009b10  32 3a 4d 59 3d 28 4d 59  20 81 20 34 29 2a 34 3a  |2:MY=(MY . 4)*4:|
00009b20  f2 73 70 72 69 74 65 73  6f 72 74 0d 45 56 1b c8  |.spritesort.EV..|
00009b30  93 20 4d 58 2c 4d 59 2c  78 73 25 2d 32 2c 2d 28  |. MX,MY,xs%-2,-(|
00009b40  79 73 25 2b 34 29 0d 45  60 21 c8 96 3a c8 96 3a  |ys%+4).E`!..:..:|
00009b50  c8 93 20 4d 58 2c 4d 59  2c 78 73 25 2d 32 2c 2d  |.. MX,MY,xs%-2,-|
00009b60  28 79 73 25 2b 34 29 0d  45 6a 12 c9 32 3a f2 73  |(ys%+4).Ej..2:.s|
00009b70  70 72 69 74 65 73 6f 72  74 0d 45 74 0c 41 25 3d  |pritesort.Et.A%=|
00009b80  78 31 25 81 32 0d 45 7e  12 42 25 3d 32 35 35 2d  |x1%.2.E~.B%=255-|
00009b90  28 79 31 25 81 34 29 0d  45 88 0c 43 25 3d 78 73  |(y1%.4).E..C%=xs|
00009ba0  25 81 32 0d 45 92 0d 44  25 3d 2d 79 73 25 81 34  |%.2.E..D%=-ys%.4|
00009bb0  0d 45 9c 0c 45 25 3d 4d  58 20 81 32 0d 45 a6 1c  |.E..E%=MX .2.E..|
00009bc0  46 25 3d 32 35 35 2d 28  4d 59 20 81 34 29 2b 28  |F%=255-(MY .4)+(|
00009bd0  79 73 25 2b 34 29 81 34  0d 45 b0 08 47 25 3d 32  |ys%+4).4.E..G%=2|
00009be0  0d 45 ba 19 d6 20 70 75  74 73 63 72 65 65 6e 72  |.E... putscreenr|
00009bf0  65 63 74 61 6e 67 6c 65  25 0d 45 c4 05 cb 0d 45  |ectangle%.E....E|
00009c00  ce 05 cd 0d 45 d8 04 0d  45 e2 10 f4 20 47 65 74  |....E...E... Get|
00009c10  20 53 70 72 69 74 65 0d  45 ec 12 c9 33 38 3a c8  | Sprite.E...38:.|
00009c20  8e 20 73 74 65 70 25 20  ca 0d 45 f6 16 c9 31 2c  |. step% ..E...1,|
00009c30  32 3a f2 67 65 74 72 65  63 74 61 6e 67 6c 65 0d  |2:.getrectangle.|
00009c40  46 00 10 c9 33 3a f2 73  6f 72 74 63 6f 72 64 0d  |F...3:.sortcord.|
00009c50  46 0a 1f 41 25 3d 78 31  25 3a 42 25 3d 79 31 25  |F..A%=x1%:B%=y1%|
00009c60  3a 43 25 3d 78 32 25 3a  44 25 3d 79 32 25 0d 46  |:C%=x2%:D%=y2%.F|
00009c70  14 0f f2 70 6f 69 6e 74  28 30 2c 30 29 0d 46 1e  |...point(0,0).F.|
00009c80  16 24 73 70 72 73 74 72  25 3d 67 5f 73 70 72 69  |.$sprstr%=g_spri|
00009c90  74 65 24 0d 46 28 1a d6  20 67 65 74 73 70 72 69  |te$.F(.. getspri|
00009ca0  74 65 66 72 6f 6d 73 63  72 65 65 6e 25 0d 46 32  |tefromscreen%.F2|
00009cb0  0b f2 75 70 64 61 74 65  0d 46 3c 05 cb 0d 46 46  |..update.F<...FF|
00009cc0  04 0d 46 50 12 f4 20 53  61 76 65 20 53 70 72 69  |..FP.. Save Spri|
00009cd0  74 65 73 0d 46 5a 2c c9  33 39 3a e7 20 a4 74 65  |tes.FZ,.39:. .te|
00009ce0  78 74 5f 65 6e 74 72 79  28 33 33 2c 24 73 70 72  |xt_entry(33,$spr|
00009cf0  69 74 65 5f 73 74 72 25  2c 32 35 35 29 20 8c 0d  |ite_str%,255) ..|
00009d00  46 64 31 f2 70 6f 69 6e  74 28 30 2c 31 29 3a ff  |Fd1.point(0,1):.|
00009d10  20 22 53 53 41 56 45 20  22 2b 6f 75 74 24 3a 24  | "SSAVE "+out$:$|
00009d20  73 70 72 69 74 65 5f 73  74 72 25 3d 6f 75 74 24  |sprite_str%=out$|
00009d30  0d 46 6e 05 cd 0d 46 78  10 f2 72 65 73 65 74 5f  |.Fn...Fx..reset_|
00009d40  65 6e 74 72 79 0d 46 82  04 0d 46 8c 12 f4 20 53  |entry.F...F... S|
00009d50  70 72 69 74 65 20 73 6d  65 61 72 0d 46 96 16 c9  |prite smear.F...|
00009d60  34 30 3a e7 20 a4 70 75  74 5f 63 68 65 63 6b 20  |40:. .put_check |
00009d70  8c 0d 46 a0 0e c8 8e 20  73 74 65 70 25 20 ca 0d  |..F.... step% ..|
00009d80  46 aa 2e c9 31 3a 4d 58  3d 28 4d 58 20 81 20 32  |F...1:MX=(MX . 2|
00009d90  29 2a 32 3a 4d 59 3d 28  4d 59 20 81 20 34 29 2a  |)*2:MY=(MY . 4)*|
00009da0  34 3a f2 73 70 72 69 74  65 73 6f 72 74 0d 46 b4  |4:.spritesort.F.|
00009db0  1b c8 93 20 4d 58 2c 4d  59 2c 78 73 25 2d 32 2c  |... MX,MY,xs%-2,|
00009dc0  2d 28 79 73 25 2b 34 29  0d 46 be 21 c8 96 3a c8  |-(ys%+4).F.!..:.|
00009dd0  96 3a c8 93 20 4d 58 2c  4d 59 2c 78 73 25 2d 32  |.:.. MX,MY,xs%-2|
00009de0  2c 2d 28 79 73 25 2b 34  29 0d 46 c8 12 c9 32 3a  |,-(ys%+4).F...2:|
00009df0  f2 73 70 72 69 74 65 73  6f 72 74 0d 46 d2 19 ff  |.spritesort.F...|
00009e00  20 22 53 43 48 4f 4f 53  45 20 22 2b 24 73 70 72  | "SCHOOSE "+$spr|
00009e10  73 74 72 25 0d 46 dc 09  e6 20 38 2c 30 0d 46 e6  |str%.F... 8,0.F.|
00009e20  05 f5 0d 46 f0 11 f2 6d  6f 75 73 65 5f 68 61 6e  |...F...mouse_han|
00009e30  64 6c 65 0d 46 fa 0f f0  20 26 45 44 2c 4d 58 2c  |dle.F... &ED,MX,|
00009e40  4d 59 0d 47 04 0a fd 20  4d 42 3d 30 0d 47 0e 05  |MY.G... MB=0.G..|
00009e50  cb 0d 47 18 05 cd 0d 47  22 04 0d 47 2c 13 f4 20  |..G....G"..G,.. |
00009e60  50 72 69 6e 74 65 72 20  44 75 6d 70 73 0d 47 36  |Printer Dumps.G6|
00009e70  07 c9 34 31 0d 47 40 11  f2 72 65 73 65 74 5f 61  |..41.G@..reset_a|
00009e80  63 74 69 6f 6e 0d 47 4a  0b 2a 46 58 20 32 32 39  |ction.GJ.*FX 229|
00009e90  0d 47 54 0d d6 20 6c 69  66 74 75 70 25 0d 47 5e  |.GT.. liftup%.G^|
00009ea0  2b 41 24 3d 22 53 43 52  45 45 4e 44 55 4d 50 20  |+A$="SCREENDUMP |
00009eb0  30 20 22 2b c3 7e 28 21  6c 69 6e 65 5f 73 65 6c  |0 "+.~(!line_sel|
00009ec0  65 63 74 65 64 2d 31 29  0d 47 68 08 ff 20 41 24  |ected-1).Gh.. A$|
00009ed0  0d 47 72 0f d6 20 6c 69  66 74 64 6f 77 6e 25 0d  |.Gr.. liftdown%.|
00009ee0  47 7c 0b f2 75 70 64 61  74 65 0d 47 86 04 0d 47  |G|..update.G...G|
00009ef0  90 13 f4 20 44 65 6c 65  74 65 20 53 70 72 69 74  |... Delete Sprit|
00009f00  65 0d 47 9a 07 c9 34 32  0d 47 a4 10 e7 20 a4 73  |e.G...42.G... .s|
00009f10  70 72 69 74 65 73 20 8c  0d 47 ae 2c c8 99 20 26  |prites ..G.,.. &|
00009f20  32 45 2c 31 33 2c 2c 73  70 72 73 74 72 25 2c 33  |2E,13,,sprstr%,3|
00009f30  30 2c 21 73 70 72 73 65  6c 25 20 b8 20 2c 2c 2c  |0,!sprsel% . ,,,|
00009f40  6c 65 6e 67 0d 47 b8 18  3f 28 73 70 72 73 74 72  |leng.G..?(sprstr|
00009f50  25 2b 6c 65 6e 67 2b 31  29 3d 31 33 0d 47 c2 5a  |%+leng+1)=13.G.Z|
00009f60  f2 65 72 72 6f 72 68 61  6e 64 6c 65 28 32 2c 22  |.errorhandle(2,"|
00009f70  44 6f 20 79 6f 75 20 72  65 61 6c 6c 79 20 77 69  |Do you really wi|
00009f80  73 68 20 74 6f 20 64 65  6c 65 74 65 20 74 68 65  |sh to delete the|
00009f90  20 73 70 72 69 74 65 20  22 2b 24 73 70 72 73 74  | sprite "+$sprst|
00009fa0  72 25 2c 22 43 6f 6e 66  69 72 6d 22 2c 73 65 6c  |r%,"Confirm",sel|
00009fb0  65 63 74 65 64 29 0d 47  cc 12 e7 20 73 65 6c 65  |ected).G... sele|
00009fc0  63 74 65 64 3d 31 20 8c  0d 47 d6 18 ff 22 53 44  |cted=1 ..G..."SD|
00009fd0  45 4c 45 54 45 20 22 2b  24 73 70 72 73 74 72 25  |ELETE "+$sprstr%|
00009fe0  0d 47 e0 2b e7 20 21 73  70 72 73 65 6c 25 3e a4  |.G.+. !sprsel%>.|
00009ff0  73 70 72 69 74 65 73 20  8c 20 21 73 70 72 73 65  |sprites . !sprse|
0000a000  6c 25 3d a4 73 70 72 69  74 65 73 0d 47 ea 1d e7  |l%=.sprites.G...|
0000a010  20 21 73 70 72 73 65 6c  25 3c 31 20 8c 20 21 73  | !sprsel%<1 . !s|
0000a020  70 72 73 65 6c 25 3d 31  0d 47 f4 05 cd 0d 47 fe  |prsel%=1.G....G.|
0000a030  05 cc 0d 48 08 07 ef 20  37 0d 48 12 05 cd 0d 48  |...H... 7.H....H|
0000a040  1c 19 f2 72 65 73 65 74  5f 61 63 74 69 6f 6e 3a  |...reset_action:|
0000a050  f2 75 70 64 61 74 65 0d  48 26 04 0d 48 30 0b f4  |.update.H&..H0..|
0000a060  20 6f 73 63 6c 69 0d 48  3a 08 c9 34 33 3a 0d 48  | oscli.H:..43:.H|
0000a070  44 10 f2 6f 73 63 6c 69  61 63 74 69 6f 6e 0d 48  |D..oscliaction.H|
0000a080  4e 10 f2 63 68 65 63 6b  64 75 6d 70 65 72 0d 48  |N..checkdumper.H|
0000a090  58 04 0d 48 62 21 f4 20  41 6e 74 69 20 61 6c 69  |X..Hb!. Anti ali|
0000a0a0  61 73 65 64 20 74 65 78  74 20 74 6f 20 73 63 72  |ased text to scr|
0000a0b0  65 65 6e 0d 48 6c 12 c9  34 34 3a c8 8e 20 73 74  |een.Hl..44:.. st|
0000a0c0  65 70 25 20 ca 0d 48 76  14 c9 31 3a f2 67 65 74  |ep% ..Hv..1:.get|
0000a0d0  72 65 63 74 61 6e 67 6c  65 0d 48 80 14 c9 32 3a  |rectangle.H...2:|
0000a0e0  f2 67 65 74 72 65 63 74  61 6e 67 6c 65 0d 48 8a  |.getrectangle.H.|
0000a0f0  10 c9 33 3a f2 73 6f 72  74 63 6f 72 64 0d 48 94  |..3:.sortcord.H.|
0000a100  1d 74 69 6e 74 25 3d 28  28 21 70 63 25 20 80 20  |.tint%=((!pc% . |
0000a110  31 39 32 29 20 3e 3e 20  32 29 0d 48 9e 20 72 65  |192) >> 2).H. re|
0000a120  64 25 3d 74 69 6e 74 25  2b 28 28 21 70 63 25 20  |d%=tint%+((!pc% |
0000a130  80 20 33 29 20 3c 3c 20  36 29 0d 48 a8 21 67 72  |. 3) << 6).H.!gr|
0000a140  6e 25 3d 74 69 6e 74 25  2b 28 28 21 70 63 25 20  |n%=tint%+((!pc% |
0000a150  80 20 31 32 29 20 3c 3c  20 34 29 0d 48 b2 21 62  |. 12) << 4).H.!b|
0000a160  6c 75 25 3d 74 69 6e 74  25 2b 28 28 21 70 63 25  |lu%=tint%+((!pc%|
0000a170  20 80 20 34 38 29 20 3c  3c 20 32 29 0d 48 bc 19  | . 48) << 2).H..|
0000a180  74 69 6e 74 32 25 3d c8  9c 28 4d 58 2c 4d 59 29  |tint2%=..(MX,MY)|
0000a190  20 3e 3e 20 32 0d 48 c6  11 62 61 63 6b 25 3d b0  | >> 2.H..back%=.|
0000a1a0  4d 58 2c 4d 59 29 0d 48  d0 23 72 65 64 32 25 3d  |MX,MY).H.#red2%=|
0000a1b0  74 69 6e 74 32 25 2b 28  28 62 61 63 6b 25 20 80  |tint2%+((back% .|
0000a1c0  20 33 29 20 3c 3c 20 36  29 0d 48 da 24 67 72 6e  | 3) << 6).H.$grn|
0000a1d0  32 25 3d 74 69 6e 74 32  25 2b 28 28 62 61 63 6b  |2%=tint2%+((back|
0000a1e0  25 20 80 20 31 32 29 20  3c 3c 20 34 29 0d 48 e4  |% . 12) << 4).H.|
0000a1f0  24 62 6c 75 32 25 3d 74  69 6e 74 32 25 2b 28 28  |$blu2%=tint2%+((|
0000a200  62 61 63 6b 25 20 80 20  34 38 29 20 3c 3c 20 32  |back% . 48) << 2|
0000a210  29 0d 48 ee 1d 46 4f 4e  54 24 3d 24 70 72 65 73  |).H..FONT$=$pres|
0000a220  65 6e 74 66 6f 6e 74 25  2b bd 28 31 33 29 0d 48  |entfont%+.(13).H|
0000a230  f8 33 ef 20 32 33 2c 32  35 2c 26 46 46 2c 31 35  |.3. 23,25,&FF,15|
0000a240  2c 72 65 64 32 25 2c 67  72 6e 32 25 2c 62 6c 75  |,red2%,grn2%,blu|
0000a250  32 25 2c 72 65 64 25 2c  67 72 6e 25 2c 62 6c 75  |2%,red%,grn%,blu|
0000a260  25 0d 49 02 42 c8 99 20  22 46 6f 6e 74 5f 46 69  |%.I.B.. "Font_Fi|
0000a270  6e 64 46 6f 6e 74 22 2c  2c 46 4f 4e 54 24 2c 33  |ndFont",,FONT$,3|
0000a280  32 30 2c 33 32 30 2c 30  2c 30 20 b8 20 72 6f 6d  |20,320,0,0 . rom|
0000a290  61 6e 25 20 20 3a f4 20  3b 73 63 72 61 70 73 69  |an%  :. ;scrapsi|
0000a2a0  7a 65 73 0d 49 0c 3b c8  99 20 22 46 6f 6e 74 5f  |zes.I.;.. "Font_|
0000a2b0  53 74 72 69 6e 67 42 42  6f 78 22 2c 2c 61 74 65  |StringBBox",,ate|
0000a2c0  78 74 24 20 b8 20 2c 78  6d 69 6e 25 2c 79 6d 69  |xt$ . ,xmin%,ymi|
0000a2d0  6e 25 2c 78 6d 61 78 25  2c 79 6d 61 78 25 0d 49  |n%,xmax%,ymax%.I|
0000a2e0  16 2f 78 73 69 7a 65 25  3d 94 28 78 6d 61 78 25  |./xsize%=.(xmax%|
0000a2f0  2d 78 6d 69 6e 25 29 3a  79 73 69 7a 65 25 3d 94  |-xmin%):ysize%=.|
0000a300  28 79 6d 61 78 25 2d 79  6d 69 6e 25 29 0d 49 20  |(ymax%-ymin%).I |
0000a310  30 c8 99 20 22 46 6f 6e  74 5f 52 65 61 64 53 63  |0.. "Font_ReadSc|
0000a320  61 6c 65 46 61 63 74 6f  72 22 20 b8 20 2c 78 73  |aleFactor" . ,xs|
0000a330  63 61 6c 65 25 2c 79 73  63 61 6c 65 25 0d 49 2a  |cale%,yscale%.I*|
0000a340  2a 70 73 69 7a 65 78 25  3d 28 78 32 25 2d 78 31  |*psizex%=(x2%-x1|
0000a350  25 29 2a 33 32 30 2f 28  78 73 69 7a 65 25 2f 78  |%)*320/(xsize%/x|
0000a360  73 63 61 6c 65 25 29 0d  49 34 2a 70 73 69 7a 65  |scale%).I4*psize|
0000a370  79 25 3d 28 79 31 25 2d  79 32 25 29 2a 33 32 30  |y%=(y1%-y2%)*320|
0000a380  2f 28 79 73 69 7a 65 25  2f 79 73 63 61 6c 65 25  |/(ysize%/yscale%|
0000a390  29 0d 49 3e 23 78 6f 25  3d 28 78 6d 69 6e 25 2f  |).I>#xo%=(xmin%/|
0000a3a0  78 73 63 61 6c 65 25 29  2a 70 73 69 7a 65 78 25  |xscale%)*psizex%|
0000a3b0  2f 33 32 30 0d 49 48 23  79 6f 25 3d 28 79 6d 69  |/320.IH#yo%=(ymi|
0000a3c0  6e 25 2f 79 73 63 61 6c  65 25 29 2a 70 73 69 7a  |n%/yscale%)*psiz|
0000a3d0  65 79 25 2f 33 32 30 0d  49 52 3a c8 99 20 22 46  |ey%/320.IR:.. "F|
0000a3e0  6f 6e 74 5f 46 69 6e 64  46 6f 6e 74 22 2c 2c 46  |ont_FindFont",,F|
0000a3f0  4f 4e 54 24 2c 70 73 69  7a 65 78 25 2c 70 73 69  |ONT$,psizex%,psi|
0000a400  7a 65 79 25 2c 30 2c 30  20 b8 20 72 6f 6d 61 6e  |zey%,0,0 . roman|
0000a410  25 0d 49 5c 32 c8 99 20  22 46 6f 6e 74 5f 50 61  |%.I\2.. "Font_Pa|
0000a420  69 6e 74 22 2c 2c 61 74  65 78 74 24 2c 25 31 30  |int",,atext$,%10|
0000a430  30 30 30 2c 78 31 25 2d  78 6f 25 2c 79 32 25 2d  |000,x1%-xo%,y2%-|
0000a440  79 6f 25 0d 49 66 0f fb  20 36 33 20 c8 9c 20 31  |yo%.If.. 63 .. 1|
0000a450  39 32 0d 49 70 05 cb 0d  49 7a 04 0d 49 84 1d f4  |92.Ip...Iz..I...|
0000a460  20 41 6e 74 69 20 62 6f  78 20 74 65 78 74 20 74  | Anti box text t|
0000a470  6f 20 73 63 72 65 65 6e  0d 49 8e 12 c9 34 35 3a  |o screen.I...45:|
0000a480  c8 8e 20 73 74 65 70 25  20 ca 0d 49 98 07 c9 31  |.. step% ..I...1|
0000a490  3a 0d 49 a2 1d 46 4f 4e  54 24 3d 24 70 72 65 73  |:.I..FONT$=$pres|
0000a4a0  65 6e 74 66 6f 6e 74 25  2b bd 28 31 33 29 0d 49  |entfont%+.(13).I|
0000a4b0  ac 43 c8 99 20 22 46 6f  6e 74 5f 46 69 6e 64 46  |.C.. "Font_FindF|
0000a4c0  6f 6e 74 22 2c 2c 46 4f  4e 54 24 2c 33 32 30 2c  |ont",,FONT$,320,|
0000a4d0  33 32 30 2c 30 2c 30 20  b8 20 72 6f 6d 61 6e 25  |320,0,0 . roman%|
0000a4e0  20 20 20 3a f4 20 3b 73  63 72 61 70 73 69 7a 65  |   :. ;scrapsize|
0000a4f0  73 0d 49 b6 3b c8 99 20  22 46 6f 6e 74 5f 53 74  |s.I.;.. "Font_St|
0000a500  72 69 6e 67 42 42 6f 78  22 2c 2c 61 74 65 78 74  |ringBBox",,atext|
0000a510  24 20 b8 20 2c 78 6d 69  6e 25 2c 79 6d 69 6e 25  |$ . ,xmin%,ymin%|
0000a520  2c 78 6d 61 78 25 2c 79  6d 61 78 25 0d 49 c0 2f  |,xmax%,ymax%.I./|
0000a530  78 73 69 7a 65 25 3d 94  28 78 6d 61 78 25 2d 78  |xsize%=.(xmax%-x|
0000a540  6d 69 6e 25 29 3a 79 73  69 7a 65 25 3d 94 28 79  |min%):ysize%=.(y|
0000a550  6d 61 78 25 2d 79 6d 69  6e 25 29 0d 49 ca 30 c8  |max%-ymin%).I.0.|
0000a560  99 20 22 46 6f 6e 74 5f  52 65 61 64 53 63 61 6c  |. "Font_ReadScal|
0000a570  65 46 61 63 74 6f 72 22  20 b8 20 2c 78 73 63 61  |eFactor" . ,xsca|
0000a580  6c 65 25 2c 79 73 63 61  6c 65 25 0d 49 d4 24 78  |le%,yscale%.I.$x|
0000a590  73 25 3d 28 78 73 69 7a  65 25 2f 78 73 63 61 6c  |s%=(xsize%/xscal|
0000a5a0  65 25 29 2a 70 73 69 7a  65 78 25 2f 33 32 30 0d  |e%)*psizex%/320.|
0000a5b0  49 de 24 79 73 25 3d 28  79 73 69 7a 65 25 2f 79  |I.$ys%=(ysize%/y|
0000a5c0  73 63 61 6c 65 25 29 2a  70 73 69 7a 65 79 25 2f  |scale%)*psizey%/|
0000a5d0  33 32 30 0d 49 e8 23 78  6f 25 3d 28 78 6d 69 6e  |320.I.#xo%=(xmin|
0000a5e0  25 2f 78 73 63 61 6c 65  25 29 2a 70 73 69 7a 65  |%/xscale%)*psize|
0000a5f0  78 25 2f 33 32 30 0d 49  f2 23 79 6f 25 3d 28 79  |x%/320.I.#yo%=(y|
0000a600  6d 69 6e 25 2f 79 73 63  61 6c 65 25 29 2a 70 73  |min%/yscale%)*ps|
0000a610  69 7a 65 79 25 2f 33 32  30 0d 49 fc 1c c8 93 20  |izey%/320.I.... |
0000a620  4d 58 2b 78 6f 25 2c 4d  59 2b 79 6f 25 2c 78 73  |MX+xo%,MY+yo%,xs|
0000a630  25 2c 79 73 25 0d 4a 06  09 c8 96 3a c8 96 0d 4a  |%,ys%.J....:...J|
0000a640  10 1c c8 93 20 4d 58 2b  78 6f 25 2c 4d 59 2b 79  |.... MX+xo%,MY+y|
0000a650  6f 25 2c 78 73 25 2c 79  73 25 0d 4a 1a 07 c9 32  |o%,xs%,ys%.J...2|
0000a660  3a 0d 4a 24 1d 74 69 6e  74 25 3d 28 28 21 70 63  |:.J$.tint%=((!pc|
0000a670  25 20 80 20 31 39 32 29  20 3e 3e 20 32 29 0d 4a  |% . 192) >> 2).J|
0000a680  2e 20 72 65 64 25 3d 74  69 6e 74 25 2b 28 28 21  |. red%=tint%+((!|
0000a690  70 63 25 20 80 20 33 29  20 3c 3c 20 36 29 0d 4a  |pc% . 3) << 6).J|
0000a6a0  38 21 67 72 6e 25 3d 74  69 6e 74 25 2b 28 28 21  |8!grn%=tint%+((!|
0000a6b0  70 63 25 20 80 20 31 32  29 20 3c 3c 20 34 29 0d  |pc% . 12) << 4).|
0000a6c0  4a 42 21 62 6c 75 25 3d  74 69 6e 74 25 2b 28 28  |JB!blu%=tint%+((|
0000a6d0  21 70 63 25 20 80 20 34  38 29 20 3c 3c 20 32 29  |!pc% . 48) << 2)|
0000a6e0  0d 4a 4c 19 74 69 6e 74  32 25 3d c8 9c 28 4d 58  |.JL.tint2%=..(MX|
0000a6f0  2c 4d 59 29 20 3e 3e 20  32 0d 4a 56 11 62 61 63  |,MY) >> 2.JV.bac|
0000a700  6b 25 3d b0 4d 58 2c 4d  59 29 0d 4a 60 23 72 65  |k%=.MX,MY).J`#re|
0000a710  64 32 25 3d 74 69 6e 74  32 25 2b 28 28 62 61 63  |d2%=tint2%+((bac|
0000a720  6b 25 20 80 20 33 29 20  3c 3c 20 36 29 0d 4a 6a  |k% . 3) << 6).Jj|
0000a730  24 67 72 6e 32 25 3d 74  69 6e 74 32 25 2b 28 28  |$grn2%=tint2%+((|
0000a740  62 61 63 6b 25 20 80 20  31 32 29 20 3c 3c 20 34  |back% . 12) << 4|
0000a750  29 0d 4a 74 24 62 6c 75  32 25 3d 74 69 6e 74 32  |).Jt$blu2%=tint2|
0000a760  25 2b 28 28 62 61 63 6b  25 20 80 20 34 38 29 20  |%+((back% . 48) |
0000a770  3c 3c 20 32 29 0d 4a 7e  33 ef 20 32 33 2c 32 35  |<< 2).J~3. 23,25|
0000a780  2c 26 46 46 2c 31 35 2c  72 65 64 32 25 2c 67 72  |,&FF,15,red2%,gr|
0000a790  6e 32 25 2c 62 6c 75 32  25 2c 72 65 64 25 2c 67  |n2%,blu2%,red%,g|
0000a7a0  72 6e 25 2c 62 6c 75 25  0d 4a 88 3a c8 99 20 22  |rn%,blu%.J.:.. "|
0000a7b0  46 6f 6e 74 5f 46 69 6e  64 46 6f 6e 74 22 2c 2c  |Font_FindFont",,|
0000a7c0  46 4f 4e 54 24 2c 70 73  69 7a 65 78 25 2c 70 73  |FONT$,psizex%,ps|
0000a7d0  69 7a 65 79 25 2c 30 2c  30 20 b8 20 72 6f 6d 61  |izey%,0,0 . roma|
0000a7e0  6e 25 0d 4a 92 28 c8 99  20 22 46 6f 6e 74 5f 50  |n%.J.(.. "Font_P|
0000a7f0  61 69 6e 74 22 2c 2c 61  74 65 78 74 24 2c 25 31  |aint",,atext$,%1|
0000a800  30 30 30 30 2c 4d 58 2c  4d 59 0d 4a 9c 0f fb 20  |0000,MX,MY.J... |
0000a810  36 33 20 c8 9c 20 31 39  32 0d 4a a6 05 cb 0d 4a  |63 .. 192.J....J|
0000a820  b0 04 0d 4a ba 13 f4 20  64 65 6d 6f 20 66 75 6e  |...J... demo fun|
0000a830  63 74 69 6f 6e 0d 4a c4  07 c9 34 36 0d 4a ce 11  |ction.J...46.J..|
0000a840  f2 72 65 73 65 74 5f 61  63 74 69 6f 6e 0d 4a d8  |.reset_action.J.|
0000a850  cb f2 65 72 72 6f 72 68  61 6e 64 6c 65 28 31 2c  |..errorhandle(1,|
0000a860  22 54 68 69 73 20 69 73  20 61 20 64 65 6d 6f 6e  |"This is a demon|
0000a870  73 74 72 61 74 69 6f 6e  20 76 65 72 73 69 6f 6e  |stration version|
0000a880  20 6f 66 20 41 54 45 4c  49 45 52 20 73 6f 20 74  | of ATELIER so t|
0000a890  68 69 73 20 66 75 6e 63  74 69 6f 6e 20 68 61 73  |his function has|
0000a8a0  20 62 65 65 6e 20 64 69  73 61 62 6c 65 64 2c 7c  | been disabled,||
0000a8b0  43 41 4c 4c 20 30 33 39  32 20 34 33 37 37 35 36  |CALL 0392 437756|
0000a8c0  20 74 6f 20 6f 72 64 65  72 20 61 20 70 72 6f 70  | to order a prop|
0000a8d0  65 72 20 76 65 72 73 69  6f 6e 20 6f 66 20 41 54  |er version of AT|
0000a8e0  45 4c 49 45 52 2c 20 74  68 65 20 75 6c 74 69 6d  |ELIER, the ultim|
0000a8f0  61 74 65 20 61 72 74 20  70 61 63 6b 61 67 65 2e  |ate art package.|
0000a900  22 2c 22 7c 7c 43 6f 6e  74 69 6e 75 65 22 2c 73  |","||Continue",s|
0000a910  65 6c 65 63 74 65 64 29  0d 4a e2 04 0d 4a ec 11  |elected).J...J..|
0000a920  f4 20 42 6f 74 74 6c 65  20 64 72 61 77 0d 4a f6  |. Bottle draw.J.|
0000a930  12 c9 34 37 3a c8 8e 20  73 74 65 70 25 20 ca 0d  |..47:.. step% ..|
0000a940  4b 00 16 c9 31 2c 32 3a  f2 67 65 74 72 65 63 74  |K...1,2:.getrect|
0000a950  61 6e 67 6c 65 0d 4b 0a  06 c9 33 0d 4b 14 0f ef  |angle.K...3.K...|
0000a960  20 32 39 2c 4d 58 3b 4d  59 3b 0d 4b 1e 16 46 25  | 29,MX;MY;.K..F%|
0000a970  3d 2d 31 3a d6 20 66 72  61 6d 65 64 72 61 77 25  |=-1:. framedraw%|
0000a980  0d 4b 28 09 c8 96 3a c8  96 0d 4b 32 0f ef 20 32  |.K(...:...K2.. 2|
0000a990  39 2c 4d 58 3b 4d 59 3b  0d 4b 3c 16 46 25 3d 2d  |9,MX;MY;.K<.F%=-|
0000a9a0  31 3a d6 20 66 72 61 6d  65 64 72 61 77 25 0d 4b  |1:. framedraw%.K|
0000a9b0  46 12 d6 20 73 70 69 6e  5f 62 6f 74 74 6c 65 25  |F.. spin_bottle%|
0000a9c0  0d 4b 50 12 c9 34 3a f2  70 6f 69 6e 74 28 30 2c  |.KP..4:.point(0,|
0000a9d0  30 29 0d 4b 5a 0d f2 63  6f 70 79 73 6f 72 74 0d  |0).KZ..copysort.|
0000a9e0  4b 64 15 73 74 65 70 73  25 3d 94 28 79 73 25 29  |Kd.steps%=.(ys%)|
0000a9f0  2f 34 2d 31 0d 4b 6e 16  50 54 25 3d 28 21 62 6f  |/4-1.Kn.PT%=(!bo|
0000aa00  6c 70 6f 69 6e 74 25 29  2d 31 0d 4b 78 15 54 4c  |lpoint%)-1.Kx.TL|
0000aa10  3d 30 3a e3 20 52 25 3d  31 20 b8 20 50 54 25 0d  |=0:. R%=1 . PT%.|
0000aa20  4b 82 46 4c 28 52 25 29  3d b6 28 28 28 a4 62 6f  |K.FL(R%)=.(((.bo|
0000aa30  6c 74 78 28 52 25 29 2d  a4 62 6f 6c 74 78 28 52  |ltx(R%)-.boltx(R|
0000aa40  25 2d 31 29 29 5e 32 2b  28 a4 62 6f 6c 74 79 28  |%-1))^2+(.bolty(|
0000aa50  52 25 29 2d a4 62 6f 6c  74 79 28 52 25 2d 31 29  |R%)-.bolty(R%-1)|
0000aa60  29 5e 32 29 29 0d 4b 8c  0f 54 4c 3d 54 4c 2b 4c  |)^2)).K..TL=TL+L|
0000aa70  28 52 25 29 0d 4b 96 08  ed 20 52 25 0d 4b a0 15  |(R%).K... R%.K..|
0000aa80  54 4c 50 3d 54 4c 2f 28  73 74 65 70 73 25 2d 31  |TLP=TL/(steps%-1|
0000aa90  29 0d 4b aa 1b 54 4c 50  3d 28 54 4c 2b 54 4c 50  |).K..TLP=(TL+TLP|
0000aaa0  2d 31 29 2f 28 73 74 65  70 73 25 29 0d 4b b4 14  |-1)/(steps%).K..|
0000aab0  e3 20 59 50 25 3d 30 20  b8 20 73 74 65 70 73 25  |. YP%=0 . steps%|
0000aac0  0d 4b be 1a 46 4c 3d 59  50 25 2a 54 4c 50 3a 47  |.K..FL=YP%*TLP:G|
0000aad0  50 25 3d 30 3a 46 4c 42  3d 30 0d 4b c8 0d e7 20  |P%=0:FLB=0.K... |
0000aae0  46 4c 3c 54 4c 20 8c 0d  4b d2 05 f5 0d 4b dc 12  |FL<TL ..K....K..|
0000aaf0  46 4c 42 3d 46 4c 42 2b  4c 28 47 50 25 29 0d 4b  |FLB=FLB+L(GP%).K|
0000ab00  e6 0d 47 50 25 3d 47 50  25 2b 31 0d 4b f0 0c fd  |..GP%=GP%+1.K...|
0000ab10  20 46 4c 42 3e 46 4c 0d  4b fa 05 cc 0d 4c 04 0d  | FLB>FL.K....L..|
0000ab20  47 50 25 3d 50 54 25 2d  31 0d 4c 0e 05 cd 0d 4c  |GP%=PT%-1.L....L|
0000ab30  18 0d 47 50 25 3d 47 50  25 2d 31 0d 4c 22 19 e7  |..GP%=GP%-1.L"..|
0000ab40  20 47 50 25 3e 50 54 25  20 8c 20 47 50 25 3d 50  | GP%>PT% . GP%=P|
0000ab50  54 25 2d 31 0d 4c 2c 13  e7 20 47 50 25 3c 31 20  |T%-1.L,.. GP%<1 |
0000ab60  8c 20 47 50 25 3d 31 0d  4c 36 11 4c 4c 3d 46 4c  |. GP%=1.L6.LL=FL|
0000ab70  42 2d 4c 28 47 50 25 29  0d 4c 40 0c 50 4c 3d 46  |B-L(GP%).L@.PL=F|
0000ab80  4c 2d 4c 4c 0d 4c 4a 10  50 4d 3d 50 4c 2f 4c 28  |L-LL.LJ.PM=PL/L(|
0000ab90  47 50 25 29 0d 4c 54 42  42 25 28 59 50 25 2c 30  |GP%).LTBB%(YP%,0|
0000aba0  29 3d 28 28 28 a4 62 6f  6c 74 78 28 47 50 25 29  |)=(((.boltx(GP%)|
0000abb0  29 2d 28 a4 62 6f 6c 74  78 28 47 50 25 2d 31 29  |)-(.boltx(GP%-1)|
0000abc0  29 29 2a 50 4d 29 2b 28  a4 62 6f 6c 74 78 28 47  |))*PM)+(.boltx(G|
0000abd0  50 25 2d 31 29 29 0d 4c  5e 3c 42 25 28 59 50 25  |P%-1)).L^<B%(YP%|
0000abe0  2c 31 29 3d 28 28 a4 62  6f 6c 74 79 28 47 50 25  |,1)=((.bolty(GP%|
0000abf0  29 2d a4 62 6f 6c 74 79  28 47 50 25 2d 31 29 29  |)-.bolty(GP%-1))|
0000ac00  2a 50 4d 29 2b a4 62 6f  6c 74 79 28 47 50 25 2d  |*PM)+.bolty(GP%-|
0000ac10  31 29 0d 4c 68 09 ed 20  59 50 25 0d 4c 72 12 50  |1).Lh.. YP%.Lr.P|
0000ac20  54 25 3d 94 28 79 31 25  2d 79 32 25 29 0d 4c 7c  |T%=.(y1%-y2%).L||
0000ac30  0e 53 54 25 3d 94 28 78  73 25 29 0d 4c 86 10 53  |.ST%=.(xs%).L..S|
0000ac40  54 43 4d 3d 33 36 30 2f  53 54 25 0d 4c 90 09 53  |TCM=360/ST%.L..S|
0000ac50  42 25 3d 30 0d 4c 9a 23  54 31 25 3d 30 3a 54 32  |B%=0.L.#T1%=0:T2|
0000ac60  25 3d 73 74 65 70 73 25  2d 31 3a 54 53 25 3d 31  |%=steps%-1:TS%=1|
0000ac70  3a 79 31 25 2b 3d 31 0d  4c a4 36 e7 20 21 62 6f  |:y1%+=1.L.6. !bo|
0000ac80  74 5f 6c 65 61 6e 3c 3d  39 30 20 8c 20 54 31 25  |t_lean<=90 . T1%|
0000ac90  3d 73 74 65 70 73 25 2d  31 3a 54 32 25 3d 30 3a  |=steps%-1:T2%=0:|
0000aca0  54 53 25 3d 2d 31 3a 79  31 25 2d 3d 32 0d 4c ae  |TS%=-1:y1%-=2.L.|
0000acb0  36 e7 20 21 62 6f 74 5f  6c 65 61 6e 3e 32 37 30  |6. !bot_lean>270|
0000acc0  20 8c 20 54 31 25 3d 73  74 65 70 73 25 2d 31 3a  | . T1%=steps%-1:|
0000acd0  54 32 25 3d 30 3a 54 53  25 3d 2d 31 3a 79 31 25  |T2%=0:TS%=-1:y1%|
0000ace0  2d 3d 32 0d 4c b8 19 e3  20 42 54 25 3d 54 31 25  |-=2.L... BT%=T1%|
0000acf0  20 b8 20 54 32 25 20 88  20 54 53 25 0d 4c c2 0c  | . T2% . TS%.L..|
0000ad00  77 65 64 67 65 25 3d 30  0d 4c cc 1d 58 25 3d 42  |wedge%=0.L..X%=B|
0000ad10  25 28 42 54 25 2c 30 29  3a 59 25 3d 42 25 28 42  |%(BT%,0):Y%=B%(B|
0000ad20  54 25 2c 31 29 0d 4c d6  09 53 43 25 3d 30 0d 4c  |T%,1).L..SC%=0.L|
0000ad30  e0 0a 43 54 25 3d 2d 31  0d 4c ea 16 e7 20 21 62  |..CT%=-1.L... !b|
0000ad40  6f 74 5f 6c 65 61 6e 3c  3d 31 38 30 20 8c 0d 4c  |ot_lean<=180 ..L|
0000ad50  f4 21 64 65 67 31 3d 2d  53 54 43 4d 3a 64 65 67  |.!deg1=-STCM:deg|
0000ad60  32 3d 33 36 30 3a 64 65  67 73 3d 53 54 43 4d 0d  |2=360:degs=STCM.|
0000ad70  4c fe 05 cc 0d 4d 08 23  64 65 67 31 3d 33 35 39  |L....M.#deg1=359|
0000ad80  2b 53 54 43 4d 3a 64 65  67 32 3d 30 3a 64 65 67  |+STCM:deg2=0:deg|
0000ad90  73 3d 2d 53 54 43 4d 0d  4d 12 05 cd 0d 4d 1c 1d  |s=-STCM.M....M..|
0000ada0  e3 20 43 64 3d 64 65 67  31 20 b8 20 64 65 67 32  |. Cd=deg1 . deg2|
0000adb0  20 88 20 64 65 67 73 2a  32 0d 4d 26 0d 43 54 25  | . degs*2.M&.CT%|
0000adc0  3d 43 54 25 2b 31 0d 4d  30 08 ef 20 32 36 0d 4d  |=CT%+1.M0.. 26.M|
0000add0  3a 0d c8 8e 20 21 70 6d  25 20 ca 0d 4d 44 32 c9  |:... !pm% ..MD2.|
0000ade0  30 2c 31 3a 70 6c 74 25  3d a4 67 63 6f 6c 28 78  |0,1:plt%=.gcol(x|
0000adf0  32 25 2d 28 43 64 2b 31  29 2f 53 54 43 4d 2b 32  |2%-(Cd+1)/STCM+2|
0000ae00  2c 79 31 25 2d 42 54 25  2a 34 2b 34 29 0d 4d 4e  |,y1%-BT%*4+4).MN|
0000ae10  2a c9 32 3a 70 6c 74 25  3d a4 67 63 6f 6c 28 78  |*.2:plt%=.gcol(x|
0000ae20  32 25 2d 43 64 2f 53 54  43 4d 2d 31 2c 79 31 25  |2%-Cd/STCM-1,y1%|
0000ae30  2d 42 54 25 2a 34 29 0d  4d 58 05 cb 0d 4d 62 0c  |-BT%*4).MX...Mb.|
0000ae40  61 6e 67 6c 65 3d 43 64  0d 4d 6c 3f 41 25 3d 36  |angle=Cd.Ml?A%=6|
0000ae50  33 32 2d 28 28 36 33 32  2d 58 25 29 2a a0 28 62  |32-((632-X%)*.(b|
0000ae60  6f 74 72 61 64 24 29 29  3a 42 25 3d 59 25 3a 43  |otrad$)):B%=Y%:C|
0000ae70  25 3d 43 64 3a d6 20 74  72 61 6e 73 6c 61 74 65  |%=Cd:. translate|
0000ae80  5f 70 6f 69 6e 74 25 0d  4d 76 1f 58 44 25 3d 21  |_point%.Mv.XD%=!|
0000ae90  62 6f 74 5f 78 6f 75 74  3a 59 44 25 3d 21 62 6f  |bot_xout:YD%=!bo|
0000aea0  74 5f 79 6f 75 74 0d 4d  80 1d ef 20 32 39 2c 4d  |t_yout.M... 29,M|
0000aeb0  58 3b 4d 59 3b 20 20 20  20 20 3a f4 20 6f 72 69  |X;MY;     :. ori|
0000aec0  67 69 6e 0d 4d 8a 1c e7  20 53 42 25 3e 30 20 80  |gin.M... SB%>0 .|
0000aed0  20 53 43 25 3e 30 20 80  20 70 6c 74 25 20 8c 0d  | SC%>0 . plt% ..|
0000aee0  4d 94 11 ec 20 4c 58 44  32 25 2c 4c 59 44 32 25  |M... LXD2%,LYD2%|
0000aef0  0d 4d 9e 1d ec 20 4c 58  44 25 2c 4c 59 44 25 3a  |.M... LXD%,LYD%:|
0000af00  f0 20 26 35 35 2c 58 44  25 2c 59 44 25 0d 4d a8  |. &55,XD%,YD%.M.|
0000af10  1c f0 26 35 35 2c 41 25  28 43 54 25 2c 30 29 2c  |..&55,A%(CT%,0),|
0000af20  41 25 28 43 54 25 2c 31  29 0d 4d b2 05 cd 0d 4d  |A%(CT%,1).M....M|
0000af30  bc 09 53 43 25 3d 31 0d  4d c6 21 4c 58 44 25 3d  |..SC%=1.M.!LXD%=|
0000af40  41 25 28 43 54 25 2c 30  29 3a 4c 59 44 25 3d 41  |A%(CT%,0):LYD%=A|
0000af50  25 28 43 54 25 2c 31 29  0d 4d d0 17 4c 58 44 32  |%(CT%,1).M..LXD2|
0000af60  25 3d 58 44 25 3a 4c 59  44 32 25 3d 59 44 25 0d  |%=XD%:LYD2%=YD%.|
0000af70  4d da 1f 41 25 28 43 54  25 2c 30 29 3d 58 44 25  |M..A%(CT%,0)=XD%|
0000af80  3a 41 25 28 43 54 25 2c  31 29 3d 59 44 25 0d 4d  |:A%(CT%,1)=YD%.M|
0000af90  e4 08 ed 20 43 64 0d 4d  ee 17 f4 20 55 4e 54 49  |... Cd.M... UNTI|
0000afa0  4c 20 43 25 2a 53 54 43  4d 3e 33 36 30 0d 4d f8  |L C%*STCM>360.M.|
0000afb0  09 53 42 25 3d 31 0d 4e  02 09 ed 20 42 54 25 0d  |.SB%=1.N... BT%.|
0000afc0  4e 0c 0b f2 75 70 64 61  74 65 0d 4e 16 08 ef 20  |N...update.N... |
0000afd0  32 36 0d 4e 20 05 cb 0d  4e 2a 04 0d 4e 34 14 f4  |26.N ...N*..N4..|
0000afe0  20 53 65 74 20 4d 6f 75  73 65 20 47 72 69 64 0d  | Set Mouse Grid.|
0000aff0  4e 3e 29 c9 34 38 3a e7  20 a4 74 65 78 74 5f 65  |N>).48:. .text_e|
0000b000  6e 74 72 79 28 33 33 2c  c3 28 6d 6f 75 73 65 67  |ntry(33,.(mouseg|
0000b010  72 69 64 29 2c 31 35 29  0d 4e 48 15 6d 6f 75 73  |rid),15).NH.mous|
0000b020  65 67 72 69 64 3d a0 28  6f 75 74 24 29 0d 4e 52  |egrid=.(out$).NR|
0000b030  1f e7 20 6d 6f 75 73 65  67 72 69 64 3c 31 20 8c  |.. mousegrid<1 .|
0000b040  20 6d 6f 75 73 65 67 72  69 64 3d 31 0d 4e 5c 09  | mousegrid=1.N\.|
0000b050  6d 67 73 3d 31 0d 4e 66  05 cd 0d 4e 70 10 f2 72  |mgs=1.Nf...Np..r|
0000b060  65 73 65 74 5f 65 6e 74  72 79 0d 4e 7a 04 0d 4e  |eset_entry.Nz..N|
0000b070  84 13 f4 20 46 6f 72 6d  75 6c 61 20 45 6e 74 72  |... Formula Entr|
0000b080  79 0d 4e 8e 20 c9 34 39  3a 6f 6c 64 66 6f 72 6d  |y.N. .49:oldform|
0000b090  24 3d 66 6f 72 6d 75 6c  61 24 3a 74 65 73 74 3d  |$=formula$:test=|
0000b0a0  a3 0d 4e 98 22 21 70 75  74 69 74 25 3d 31 3a f2  |..N."!putit%=1:.|
0000b0b0  70 6f 69 6e 74 28 30 2c  50 4e 6b 65 79 62 6f 61  |point(0,PNkeyboa|
0000b0c0  72 64 29 0d 4e a2 1b f2  72 65 73 65 74 5f 61 63  |rd).N...reset_ac|
0000b0d0  74 69 6f 6e 3a d6 20 75  70 74 72 65 65 25 0d 4e  |tion:. uptree%.N|
0000b0e0  ac 28 41 25 3d 2d 31 32  38 3a 42 25 3d 21 73 74  |.(A%=-128:B%=!st|
0000b0f0  61 72 74 79 25 2b 35 36  3a 45 25 3d 2d 31 3a d6  |arty%+56:E%=-1:.|
0000b100  20 68 65 6c 70 25 0d 4e  b6 2f 41 25 3d 2d 31 32  | help%.N./A%=-12|
0000b110  38 3a 42 25 3d 21 73 74  61 72 74 79 25 2d 21 73  |8:B%=!starty%-!s|
0000b120  69 7a 65 79 2d 39 36 3a  45 25 3d 2d 31 3a d6 20  |izey-96:E%=-1:. |
0000b130  68 65 6c 70 25 0d 4e c0  05 f5 0d 4e ca 2e 67 6f  |help%.N....N..go|
0000b140  3d a4 69 6e 73 74 72 69  6e 67 28 33 32 2c 31 32  |=.instring(32,12|
0000b150  36 2c 66 6f 72 6d 75 6c  61 24 2c 66 6f 72 6d 75  |6,formula$,formu|
0000b160  6c 61 24 2c 32 35 35 29  0d 4e d4 11 50 25 3d 66  |la$,255).N..P%=f|
0000b170  6f 72 6d 6e 61 6d 65 73  25 0d 4e de 12 6e 75 6d  |ormnames%.N..num|
0000b180  25 3d 3f 50 25 3a 50 25  2b 3d 31 0d 4e e8 07 46  |%=?P%:P%+=1.N..F|
0000b190  3d 30 0d 4e f2 0c 74 65  73 74 24 3d 22 22 0d 4e  |=0.N..test$="".N|
0000b1a0  fc 13 6e 75 6d 32 25 3d  3f 50 25 3a 50 25 2b 3d  |..num2%=?P%:P%+=|
0000b1b0  31 0d 4f 06 11 e3 20 52  3d 31 20 b8 20 6e 75 6d  |1.O... R=1 . num|
0000b1c0  32 25 0d 4f 10 16 74 65  73 74 24 3d 74 65 73 74  |2%.O..test$=test|
0000b1d0  24 2b bd 28 3f 50 25 29  0d 4f 1a 0b 50 25 2b 3d  |$+.(?P%).O..P%+=|
0000b1e0  31 3a ed 0d 4f 24 35 e7  20 66 6f 72 6d 75 6c 61  |1:..O$5. formula|
0000b1f0  24 3d 74 65 73 74 24 20  8c 20 66 6f 72 6d 75 6c  |$=test$ . formul|
0000b200  61 24 3d 66 6f 72 6d 75  6c 61 73 24 28 46 2d 31  |a$=formulas$(F-1|
0000b210  29 3a e5 20 8d 60 4a 4e  0d 4f 2e 08 46 2b 3d 31  |):. .`JN.O..F+=1|
0000b220  0d 4f 38 15 e7 20 46 3c  6e 75 6d 25 20 8c 20 e5  |.O8.. F<num% . .|
0000b230  20 8d 60 72 4e 0d 4f 42  36 e7 20 67 6f 20 8c 20  | .`rN.OB6. go . |
0000b240  f2 70 6f 69 6e 74 28 30  2c 30 29 3a 74 65 73 74  |.point(0,0):test|
0000b250  3d a4 62 75 69 6c 64 5f  66 6f 72 6d 75 6c 61 28  |=.build_formula(|
0000b260  66 6f 72 6d 75 6c 61 24  2c 30 29 0d 4f 4c 11 fd  |formula$,0).OL..|
0000b270  20 74 65 73 74 20 84 20  ac 20 67 6f 0d 4f 56 1e  | test . . go.OV.|
0000b280  e7 20 ac 20 67 6f 20 8c  20 66 6f 72 6d 75 6c 61  |. . go . formula|
0000b290  24 3d 6f 6c 64 66 6f 72  6d 24 0d 4f 60 0e 21 66  |$=oldform$.O`.!f|
0000b2a0  6f 72 6d 75 6c 61 3d 30  0d 4f 6a 1e d6 20 6c 69  |ormula=0.Oj.. li|
0000b2b0  66 74 75 70 25 3a d6 20  70 75 74 62 61 63 6b 67  |ftup%:. putbackg|
0000b2c0  72 6f 75 6e 64 25 0d 4f  74 10 f2 72 65 73 65 74  |round%.Ot..reset|
0000b2d0  5f 65 6e 74 72 79 0d 4f  7e 04 0d 4f 88 18 c9 35  |_entry.O~..O...5|
0000b2e0  30 2c 35 34 2c 35 33 3a  c8 8e 20 73 74 65 70 25  |0,54,53:.. step%|
0000b2f0  20 ca 0d 4f 92 12 f4 20  46 4f 52 4d 55 4c 41 20  | ..O... FORMULA |
0000b300  43 4f 50 59 0d 4f 9c 16  c9 31 2c 32 3a f2 67 65  |COPY.O...1,2:.ge|
0000b310  74 72 65 63 74 61 6e 67  6c 65 0d 4f a6 07 c9 33  |trectangle.O...3|
0000b320  3a 0d 4f b0 0f ef 20 32  39 2c 4d 58 3b 4d 59 3b  |:.O... 29,MX;MY;|
0000b330  0d 4f ba 1a 46 25 3d 2d  31 3a d6 20 66 6f 72 6d  |.O..F%=-1:. form|
0000b340  66 72 61 6d 65 64 72 61  77 25 0d 4f c4 09 c8 96  |framedraw%.O....|
0000b350  3a c8 96 0d 4f ce 0f ef  20 32 39 2c 4d 58 3b 4d  |:...O... 29,MX;M|
0000b360  59 3b 0d 4f d8 1a 46 25  3d 2d 31 3a d6 20 66 6f  |Y;.O..F%=-1:. fo|
0000b370  72 6d 66 72 61 6d 65 64  72 61 77 25 0d 4f e2 10  |rmframedraw%.O..|
0000b380  c9 34 3a f2 63 6f 70 79  73 6f 72 74 0d 4f ec 29  |.4:.copysort.O.)|
0000b390  78 73 74 65 70 73 3d 37  32 30 2f 28 78 73 25 2f  |xsteps=720/(xs%/|
0000b3a0  32 29 3a 79 73 74 65 70  73 3d 37 32 30 2f 28 79  |2):ysteps=720/(y|
0000b3b0  73 25 2f 34 29 0d 4f f6  0f e7 20 21 41 63 25 3d  |s%/4).O... !Ac%=|
0000b3c0  35 33 20 8c 0d 50 00 1a  f2 70 6f 69 6e 74 28 30  |53 ..P...point(0|
0000b3d0  2c 50 4e 63 61 6c 63 75  6c 61 74 6f 72 29 0d 50  |,PNcalculator).P|
0000b3e0  0a 0e 6d 61 78 3d 2d 36  35 35 33 36 0d 50 14 0d  |..max=-65536.P..|
0000b3f0  6d 69 6e 3d 36 35 35 33  36 0d 50 1e 09 6f 66 6d  |min=65536.P..ofm|
0000b400  3d 30 0d 50 28 1c e3 20  58 44 3d 2d 33 36 30 20  |=0.P(.. XD=-360 |
0000b410  b8 20 33 36 30 20 88 20  78 73 74 65 70 73 0d 50  |. 360 . xsteps.P|
0000b420  32 0c 77 65 64 67 65 25  3d 30 0d 50 3c 1c e3 20  |2.wedge%=0.P<.. |
0000b430  59 44 3d 33 36 30 20 b8  20 2d 33 36 30 20 88 20  |YD=360 . -360 . |
0000b440  79 73 74 65 70 73 0d 50  46 0c 58 52 3d b2 28 58  |ysteps.PF.XR=.(X|
0000b450  44 29 0d 50 50 0c 59 52  3d b2 28 59 44 29 0d 50  |D).PP.YR=.(YD).P|
0000b460  5a 3f e7 20 21 66 6f 72  6d 75 6c 61 3d 30 20 8c  |Z?. !formula=0 .|
0000b470  20 46 4d 3d a0 28 66 6f  72 6d 75 6c 61 24 29 20  | FM=.(formula$) |
0000b480  8b 20 46 4d 3d a0 28 66  6f 72 6d 75 6c 61 73 24  |. FM=.(formulas$|
0000b490  28 21 66 6f 72 6d 75 6c  61 2d 31 29 29 0d 50 64  |(!formula-1)).Pd|
0000b4a0  0d 46 44 3d 6f 66 6d 2d  46 4d 0d 50 6e 20 e7 20  |.FD=ofm-FM.Pn . |
0000b4b0  59 44 3c 33 36 30 20 8c  20 e7 20 46 44 3e 6d 61  |YD<360 . . FD>ma|
0000b4c0  78 20 8c 20 6d 61 78 3d  46 44 0d 50 78 20 e7 20  |x . max=FD.Px . |
0000b4d0  59 44 3c 33 36 30 20 8c  20 e7 20 46 44 3c 6d 69  |YD<360 . . FD<mi|
0000b4e0  6e 20 8c 20 6d 69 6e 3d  46 44 0d 50 82 0a 6f 66  |n . min=FD.P..of|
0000b4f0  6d 3d 46 4d 0d 50 8c 0b  ed 20 59 44 2c 58 44 0d  |m=FM.P... YD,XD.|
0000b500  50 96 05 cd 0d 50 a0 09  59 46 25 3d 30 0d 50 aa  |P....P..YF%=0.P.|
0000b510  0f f2 70 6f 69 6e 74 28  30 2c 30 29 0d 50 b4 1c  |..point(0,0).P..|
0000b520  e3 20 59 44 3d 33 36 30  20 b8 20 2d 33 36 30 20  |. YD=360 . -360 |
0000b530  88 20 79 73 74 65 70 73  0d 50 be 0c 77 65 64 67  |. ysteps.P..wedg|
0000b540  65 25 3d 30 0d 50 c8 1c  e3 20 58 44 3d 2d 33 36  |e%=0.P... XD=-36|
0000b550  30 20 b8 20 33 36 30 20  88 20 78 73 74 65 70 73  |0 . 360 . xsteps|
0000b560  0d 50 d2 0c 58 52 3d b2  28 58 44 29 0d 50 dc 0c  |.P..XR=.(XD).P..|
0000b570  59 52 3d b2 28 59 44 29  0d 50 e6 3f e7 20 21 66  |YR=.(YD).P.?. !f|
0000b580  6f 72 6d 75 6c 61 3d 30  20 8c 20 46 4d 3d a0 28  |ormula=0 . FM=.(|
0000b590  66 6f 72 6d 75 6c 61 24  29 20 8b 20 46 4d 3d a0  |formula$) . FM=.|
0000b5a0  28 66 6f 72 6d 75 6c 61  73 24 28 21 66 6f 72 6d  |(formulas$(!form|
0000b5b0  75 6c 61 2d 31 29 29 0d  50 f0 27 41 25 3d 58 44  |ula-1)).P.'A%=XD|
0000b5c0  3a 42 25 3d 59 44 3a 43  25 3d 46 4d 3a d6 20 66  |:B%=YD:C%=FM:. f|
0000b5d0  6f 72 6d 5f 74 72 61 6e  73 6c 61 74 65 25 0d 50  |orm_translate%.P|
0000b5e0  fa 12 6e 70 78 25 3d 21  62 6f 74 5f 78 6f 75 74  |..npx%=!bot_xout|
0000b5f0  0d 51 04 12 6e 70 79 25  3d 21 62 6f 74 5f 79 6f  |.Q..npy%=!bot_yo|
0000b600  75 74 0d 51 0e 30 50 58  25 3d 28 28 33 36 30 2b  |ut.Q.0PX%=((360+|
0000b610  58 44 29 2f 78 73 74 65  70 73 29 3a 50 59 25 3d  |XD)/xsteps):PY%=|
0000b620  28 28 33 36 30 2b 59 44  29 2f 2d 79 73 74 65 70  |((360+YD)/-ystep|
0000b630  73 29 0d 51 18 07 ef 20  34 0d 51 22 08 ef 20 32  |s).Q... 4.Q".. 2|
0000b640  36 0d 51 2c 23 78 70 25  3d 78 31 25 2b 50 58 25  |6.Q,#xp%=x1%+PX%|
0000b650  2a 32 2d 32 3a 79 70 25  3d 79 32 25 2b 50 59 25  |*2-2:yp%=y2%+PY%|
0000b660  2a 34 2b 33 0d 51 36 17  70 6c 74 25 3d a4 67 63  |*4+3.Q6.plt%=.gc|
0000b670  6f 6c 28 78 70 25 2c 79  70 25 29 0d 51 40 1f e7  |ol(xp%,yp%).Q@..|
0000b680  20 58 44 3e 2d 33 36 30  20 80 20 59 44 3c 33 36  | XD>-360 . YD<36|
0000b690  30 20 80 20 70 6c 74 25  20 8c 0d 51 4a 0f e7 20  |0 . plt% ..QJ.. |
0000b6a0  21 41 63 25 3d 35 33 20  8c 0d 51 54 2d 6e 75 6d  |!Ac%=53 ..QT-num|
0000b6b0  25 3d 34 2b 28 28 28 4c  28 50 58 25 29 2d 46 4d  |%=4+(((L(PX%)-FM|
0000b6c0  29 2d 6d 69 6e 29 2f 28  28 6d 61 78 2d 6d 69 6e  |)-min)/((max-min|
0000b6d0  29 2f 31 31 29 29 0d 51  5e 25 e7 20 6e 75 6d 25  |)/11)).Q^%. num%|
0000b6e0  3c 34 20 8c 20 6e 75 6d  25 3d 34 3a e7 20 74 65  |<4 . num%=4:. te|
0000b6f0  73 74 69 6e 67 20 8c 20  ef 20 37 0d 51 68 27 e7  |sting . . 7.Qh'.|
0000b700  20 6e 75 6d 25 3e 31 35  20 8c 20 6e 75 6d 25 3d  | num%>15 . num%=|
0000b710  31 35 3a e7 20 74 65 73  74 69 6e 67 20 8c 20 ef  |15:. testing . .|
0000b720  20 37 0d 51 72 28 41 25  3d 63 6f 6c 25 3a 42 25  | 7.Qr(A%=col%:B%|
0000b730  3d 31 35 2d 6e 75 6d 25  3a d6 20 63 61 6c 63 5f  |=15-num%:. calc_|
0000b740  69 6e 74 65 6e 73 69 74  79 25 0d 51 7c 05 cd 0d  |intensity%.Q|...|
0000b750  51 86 0f ef 20 32 39 2c  4d 58 3b 4d 59 3b 0d 51  |Q... 29,MX;MY;.Q|
0000b760  90 11 ec 20 6e 6c 70 78  25 2c 6e 6c 70 79 25 0d  |... nlpx%,nlpy%.|
0000b770  51 9a 27 ec 20 41 25 28  28 94 28 50 58 25 29 29  |Q.'. A%((.(PX%))|
0000b780  2d 31 2c 30 29 2c 41 25  28 28 94 28 50 58 25 29  |-1,0),A%((.(PX%)|
0000b790  29 2d 31 2c 31 29 0d 51  a4 23 f0 20 26 35 35 2c  |)-1,1).Q.#. &55,|
0000b7a0  41 25 28 94 28 50 58 25  29 2c 30 29 2c 41 25 28  |A%(.(PX%),0),A%(|
0000b7b0  94 28 50 58 25 29 2c 31  29 0d 51 ae 13 f0 20 26  |.(PX%),1).Q... &|
0000b7c0  35 35 2c 6e 70 78 25 2c  6e 70 79 25 0d 51 b8 0f  |55,npx%,npy%.Q..|
0000b7d0  e7 20 21 41 63 25 3d 35  34 20 8c 0d 51 c2 0d d6  |. !Ac%=54 ..Q...|
0000b7e0  20 63 6f 6c 6f 75 72 25  0d 51 cc 11 ec 20 6e 6c  | colour%.Q... nl|
0000b7f0  70 78 25 2c 6e 6c 70 79  25 0d 51 d6 27 df 20 41  |px%,nlpy%.Q.'. A|
0000b800  25 28 28 94 28 50 58 25  29 29 2d 31 2c 30 29 2c  |%((.(PX%))-1,0),|
0000b810  41 25 28 28 94 28 50 58  25 29 29 2d 31 2c 31 29  |A%((.(PX%))-1,1)|
0000b820  0d 51 e0 0f df 20 6e 70  78 25 2c 6e 70 79 25 0d  |.Q... npx%,npy%.|
0000b830  51 ea 1f df 20 41 25 28  94 28 50 58 25 29 2c 30  |Q... A%(.(PX%),0|
0000b840  29 2c 41 25 28 94 28 50  58 25 29 2c 31 29 0d 51  |),A%(.(PX%),1).Q|
0000b850  f4 11 df 20 6e 6c 70 78  25 2c 6e 6c 70 79 25 0d  |... nlpx%,nlpy%.|
0000b860  51 fe 05 cd 0d 52 08 05  cd 0d 52 12 0d 4c 28 50  |Q....R....R..L(P|
0000b870  58 25 29 3d 46 4d 0d 52  1c 16 6e 6c 70 78 25 3d  |X%)=FM.R..nlpx%=|
0000b880  41 25 28 94 28 50 58 25  29 2c 30 29 0d 52 26 16  |A%(.(PX%),0).R&.|
0000b890  6e 6c 70 79 25 3d 41 25  28 94 28 50 58 25 29 2c  |nlpy%=A%(.(PX%),|
0000b8a0  31 29 0d 52 30 15 41 25  28 94 28 50 58 25 29 2c  |1).R0.A%(.(PX%),|
0000b8b0  30 29 3d 6e 70 78 25 0d  52 3a 15 41 25 28 94 28  |0)=npx%.R:.A%(.(|
0000b8c0  50 58 25 29 2c 31 29 3d  6e 70 79 25 0d 52 44 05  |PX%),1)=npy%.RD.|
0000b8d0  cd 0d 52 4e 08 ed 20 58  44 0d 52 58 09 59 46 25  |..RN.. XD.RX.YF%|
0000b8e0  3d 31 0d 52 62 08 ed 20  59 44 0d 52 6c 0b f2 75  |=1.Rb.. YD.Rl..u|
0000b8f0  70 64 61 74 65 0d 52 76  08 ef 20 32 36 0d 52 80  |pdate.Rv.. 26.R.|
0000b900  05 cb 0d 52 8a 04 0d 52  94 11 f4 20 52 6f 74 61  |...R...R... Rota|
0000b910  74 65 20 63 6f 70 79 0d  52 9e 12 c9 35 31 3a c8  |te copy.R...51:.|
0000b920  8e 20 73 74 65 70 25 20  ca 0d 52 a8 16 c9 31 2c  |. step% ..R...1,|
0000b930  32 3a f2 67 65 74 72 65  63 74 61 6e 67 6c 65 0d  |2:.getrectangle.|
0000b940  52 b2 14 c9 33 3a 78 33  25 3d 4d 58 3a 79 33 25  |R...3:x3%=MX:y3%|
0000b950  3d 4d 59 0d 52 bc 0d c9  34 3a f2 73 68 61 70 65  |=MY.R...4:.shape|
0000b960  0d 52 c6 10 c8 96 3a c8  96 3a f2 73 68 61 70 65  |.R....:..:.shape|
0000b970  0d 52 d0 24 c9 35 3a f2  73 6d 65 61 72 73 63 72  |.R.$.5:.smearscr|
0000b980  65 65 6e 28 78 31 25 2c  79 31 25 2c 78 73 25 2c  |een(x1%,y1%,xs%,|
0000b990  79 73 25 29 0d 52 da 05  cb 0d 52 e4 04 0d 52 ee  |ys%).R....R...R.|
0000b9a0  13 f4 20 41 41 20 74 65  78 74 20 69 6e 70 75 74  |.. AA text input|
0000b9b0  0d 52 f8 32 c9 35 32 3a  e7 20 a4 74 65 78 74 5f  |.R.2.52:. .text_|
0000b9c0  65 6e 74 72 79 28 33 32  2c 61 74 65 78 74 24 2c  |entry(32,atext$,|
0000b9d0  32 35 35 29 20 8c 20 61  74 65 78 74 24 3d 6f 75  |255) . atext$=ou|
0000b9e0  74 24 0d 53 02 10 f2 72  65 73 65 74 5f 65 6e 74  |t$.S...reset_ent|
0000b9f0  72 79 0d 53 0c 04 0d 53  16 1b f4 20 53 61 76 65  |ry.S...S... Save|
0000ba00  20 43 6f 6d 70 61 63 74  65 64 20 53 63 72 65 65  | Compacted Scree|
0000ba10  6e 0d 53 20 2c c9 35 35  3a e7 20 a4 74 65 78 74  |n.S ,.55:. .text|
0000ba20  5f 65 6e 74 72 79 28 33  33 2c 24 73 63 72 65 65  |_entry(33,$scree|
0000ba30  6e 5f 73 74 72 25 2c 32  35 35 29 20 8c 0d 53 2a  |n_str%,255) ..S*|
0000ba40  38 f2 70 6f 69 6e 74 28  30 2c 31 29 3a f2 63 6f  |8.point(0,1):.co|
0000ba50  6d 70 61 63 74 65 64 73  61 76 65 28 30 2c 6f 75  |mpactedsave(0,ou|
0000ba60  74 24 29 3a 24 73 63 72  65 65 6e 5f 73 74 72 25  |t$):$screen_str%|
0000ba70  3d 6f 75 74 24 0d 53 34  05 cd 0d 53 3e 10 f2 72  |=out$.S4...S>..r|
0000ba80  65 73 65 74 5f 65 6e 74  72 79 0d 53 48 04 0d 53  |eset_entry.SH..S|
0000ba90  52 1b f4 20 53 65 74 20  50 72 69 6e 74 20 4b 65  |R.. Set Print Ke|
0000baa0  79 20 43 6f 6d 6d 61 6e  64 0d 53 5c 3a c9 35 36  |y Command.S\:.56|
0000bab0  3a e7 20 a4 74 65 78 74  5f 65 6e 74 72 79 28 33  |:. .text_entry(3|
0000bac0  32 2c 66 75 6e 63 70 72  69 6e 74 24 2c 32 35 35  |2,funcprint$,255|
0000bad0  29 20 8c 20 66 75 6e 63  70 72 69 6e 74 24 3d 6f  |) . funcprint$=o|
0000bae0  75 74 24 0d 53 66 10 f2  72 65 73 65 74 5f 65 6e  |ut$.Sf..reset_en|
0000baf0  74 72 79 0d 53 70 04 0d  53 7a 0e f4 20 75 6e 64  |try.Sp..Sz.. und|
0000bb00  6f 20 62 6f 78 0d 53 84  12 c9 35 37 3a c8 8e 20  |o box.S...57:.. |
0000bb10  73 74 65 70 25 20 ca 0d  53 8e 16 c9 31 2c 32 3a  |step% ..S...1,2:|
0000bb20  f2 67 65 74 72 65 63 74  61 6e 67 6c 65 0d 53 98  |.getrectangle.S.|
0000bb30  10 c9 33 3a f2 73 6f 72  74 63 6f 72 64 0d 53 a2  |..3:.sortcord.S.|
0000bb40  20 41 25 3d 78 31 25 3a  42 25 3d 79 31 25 3a 43  | A%=x1%:B%=y1%:C|
0000bb50  25 3d 78 73 25 3a 44 25  3d 2d 79 73 25 0d 53 ac  |%=xs%:D%=-ys%.S.|
0000bb60  0e d6 20 75 6e 64 6f 62  6f 78 25 0d 53 b6 05 cd  |.. undobox%.S...|
0000bb70  0d 53 c0 21 73 74 65 70  25 3d 31 3a f2 72 65 73  |.S.!step%=1:.res|
0000bb80  65 74 5f 61 63 74 69 6f  6e 3a f2 75 70 64 61 74  |et_action:.updat|
0000bb90  65 0d 53 ca 05 cb 0d 53  d4 04 0d 53 de 18 f4 20  |e.S....S...S... |
0000bba0  53 61 76 65 20 53 79 73  74 65 6d 20 53 63 72 65  |Save System Scre|
0000bbb0  65 6e 0d 53 e8 2c c9 35  38 3a e7 20 a4 74 65 78  |en.S.,.58:. .tex|
0000bbc0  74 5f 65 6e 74 72 79 28  33 33 2c 24 73 63 72 65  |t_entry(33,$scre|
0000bbd0  65 6e 5f 73 74 72 25 2c  32 35 35 29 20 8c 0d 53  |en_str%,255) ..S|
0000bbe0  f2 36 f2 70 6f 69 6e 74  28 30 2c 31 29 3a ff 20  |.6.point(0,1):. |
0000bbf0  22 53 43 52 45 45 4e 53  41 56 45 20 22 2b 6f 75  |"SCREENSAVE "+ou|
0000bc00  74 24 3a 24 73 63 72 65  65 6e 5f 73 74 72 25 3d  |t$:$screen_str%=|
0000bc10  6f 75 74 24 0d 53 fc 05  cd 0d 54 06 10 f2 72 65  |out$.S....T...re|
0000bc20  73 65 74 5f 65 6e 74 72  79 0d 54 10 04 0d 54 1a  |set_entry.T...T.|
0000bc30  12 f4 20 54 69 74 6c 65  20 53 63 72 65 65 6e 0d  |.. Title Screen.|
0000bc40  54 24 12 c9 35 39 3a c8  8e 20 73 74 65 70 25 20  |T$..59:.. step% |
0000bc50  ca 0d 54 2e 22 c9 31 3a  e7 20 a4 73 70 72 69 74  |..T.".1:. .sprit|
0000bc60  65 73 3d 30 20 8c 20 f2  74 69 74 6c 65 73 70 72  |es=0 . .titlespr|
0000bc70  69 74 65 0d 54 38 14 c9  32 3a f2 72 65 73 65 74  |ite.T8..2:.reset|
0000bc80  5f 61 63 74 69 6f 6e 0d  54 42 05 cb 0d 54 4c 04  |_action.TB...TL.|
0000bc90  0d 54 56 0d f4 20 42 72  75 73 68 65 73 0d 54 60  |.TV.. Brushes.T`|
0000bca0  16 c9 36 30 2c 36 31 2c  36 32 2c 36 33 2c 36 34  |..60,61,62,63,64|
0000bcb0  2c 36 35 0d 54 6a 0e 41  25 3d 21 41 63 25 2d 36  |,65.Tj.A%=!Ac%-6|
0000bcc0  30 0d 54 74 19 c8 8e 20  21 72 65 63 74 5f 62 72  |0.Tt... !rect_br|
0000bcd0  75 73 68 5f 6d 6f 64 65  20 ca 0d 54 7e 11 c9 30  |ush_mode ..T~..0|
0000bce0  3a c8 8e 20 73 74 65 70  25 20 ca 0d 54 88 29 c9  |:.. step% ..T.).|
0000bcf0  31 3a 41 25 3d 28 4d 58  20 81 20 32 29 2d 31 36  |1:A%=(MX . 2)-16|
0000bd00  3a 42 25 3d 32 35 35 2d  28 28 4d 59 20 81 20 34  |:B%=255-((MY . 4|
0000bd10  29 2b 38 29 0d 54 92 0f  d6 20 62 72 75 73 68 65  |)+8).T... brushe|
0000bd20  6f 72 25 0d 54 9c 15 c8  96 3a c8 96 3a d6 20 62  |or%.T....:..:. b|
0000bd30  72 75 73 68 65 6f 72 25  0d 54 a6 08 c9 32 3a f5  |rusheor%.T...2:.|
0000bd40  0d 54 b0 11 f2 6d 6f 75  73 65 5f 68 61 6e 64 6c  |.T...mouse_handl|
0000bd50  65 0d 54 ba 22 42 25 3d  4d 58 2d 33 32 3a 43 25  |e.T."B%=MX-32:C%|
0000bd60  3d 4d 59 2b 33 32 3a d6  20 62 72 75 73 68 64 72  |=MY+32:. brushdr|
0000bd70  61 77 25 0d 54 c4 0a fd  20 4d 42 3d 30 0d 54 ce  |aw%.T... MB=0.T.|
0000bd80  05 cb 0d 54 d8 11 c9 31  3a c8 8e 20 73 74 65 70  |...T...1:.. step|
0000bd90  25 20 ca 0d 54 e2 16 c9  31 2c 32 3a f2 67 65 74  |% ..T...1,2:.get|
0000bda0  72 65 63 74 61 6e 67 6c  65 0d 54 ec 12 c9 33 3a  |rectangle.T...3:|
0000bdb0  f2 70 6f 69 6e 74 28 30  2c 30 29 0d 54 f6 0d f2  |.point(0,0).T...|
0000bdc0  73 6f 72 74 63 6f 72 64  0d 55 00 24 42 25 3d 78  |sortcord.U.$B%=x|
0000bdd0  31 25 3a 43 25 3d 79 31  25 3a 44 25 3d 78 73 25  |1%:C%=y1%:D%=xs%|
0000bde0  81 32 3a 45 25 3d 2d 79  73 25 81 34 0d 55 0a 10  |.2:E%=-ys%.4.U..|
0000bdf0  d6 20 62 72 75 73 68 64  72 61 77 25 0d 55 14 0b  |. brushdraw%.U..|
0000be00  f2 75 70 64 61 74 65 0d  55 1e 05 cb 0d 55 28 11  |.update.U....U(.|
0000be10  c9 32 3a c8 8e 20 73 74  65 70 25 20 ca 0d 55 32  |.2:.. step% ..U2|
0000be20  16 c9 31 3a 78 30 25 3d  36 34 30 3a 79 30 25 3d  |..1:x0%=640:y0%=|
0000be30  35 31 32 0d 55 3c 27 c8  8f 20 78 30 25 2c 79 30  |512.U<'.. x0%,y0|
0000be40  25 2c b6 28 28 4d 58 2d  78 30 25 29 5e 32 2b 28  |%,.((MX-x0%)^2+(|
0000be50  4d 59 2d 79 30 25 29 5e  32 29 0d 55 46 09 c8 96  |MY-y0%)^2).UF...|
0000be60  3a c8 96 0d 55 50 27 c8  8f 20 78 30 25 2c 79 30  |:...UP'.. x0%,y0|
0000be70  25 2c b6 28 28 4d 58 2d  78 30 25 29 5e 32 2b 28  |%,.((MX-x0%)^2+(|
0000be80  4d 59 2d 79 30 25 29 5e  32 29 0d 55 5a 1f 52 25  |MY-y0%)^2).UZ.R%|
0000be90  3d b6 28 28 4d 58 2d 78  30 25 29 5e 32 2b 28 4d  |=.((MX-x0%)^2+(M|
0000bea0  59 2d 79 30 25 29 5e 32  29 0d 55 64 08 c9 33 3a  |Y-y0%)^2).Ud..3:|
0000beb0  f5 0d 55 6e 11 f2 6d 6f  75 73 65 5f 68 61 6e 64  |..Un..mouse_hand|
0000bec0  6c 65 0d 55 78 28 41 4e  3d b2 28 b3 28 33 36 30  |le.Ux(AN=.(.(360|
0000bed0  29 29 3a 52 4f 25 3d b7  28 b2 28 b3 28 38 30 29  |)):RO%=.(.(.(80)|
0000bee0  29 29 2a 28 52 25 2f 31  30 29 0d 55 82 13 42 25  |))*(R%/10).U..B%|
0000bef0  3d 4d 58 2b b5 28 41 4e  29 2a 52 4f 25 0d 55 8c  |=MX+.(AN)*RO%.U.|
0000bf00  13 43 25 3d 4d 59 2b 9b  28 41 4e 29 2a 52 4f 25  |.C%=MY+.(AN)*RO%|
0000bf10  0d 55 96 10 d6 20 62 72  75 73 68 64 72 61 77 25  |.U... brushdraw%|
0000bf20  0d 55 a0 0a fd 20 4d 42  3d 30 0d 55 aa 05 cb 0d  |.U... MB=0.U....|
0000bf30  55 b4 05 cb 0d 55 be 04  0d 55 c8 19 f4 20 41 6e  |U....U...U... An|
0000bf40  74 69 20 61 6c 69 61 73  65 64 20 73 71 75 61 73  |ti aliased squas|
0000bf50  68 0d 55 d2 12 c9 36 37  3a c8 8e 20 73 74 65 70  |h.U...67:.. step|
0000bf60  25 20 ca 0d 55 dc 16 c9  31 2c 32 3a f2 67 65 74  |% ..U...1,2:.get|
0000bf70  72 65 63 74 61 6e 67 6c  65 0d 55 e6 14 c9 33 3a  |rectangle.U...3:|
0000bf80  78 33 25 3d 4d 58 3a 79  33 25 3d 4d 59 0d 55 f0  |x3%=MX:y3%=MY.U.|
0000bf90  1f c9 34 3a c8 93 20 78  33 25 2c 79 33 25 2c 4d  |..4:.. x3%,y3%,M|
0000bfa0  58 2d 78 33 25 2c 4d 59  2d 79 33 25 0d 55 fa 22  |X-x3%,MY-y3%.U."|
0000bfb0  c8 96 3a c8 96 3a c8 93  20 78 33 25 2c 79 33 25  |..:..:.. x3%,y3%|
0000bfc0  2c 4d 58 2d 78 33 25 2c  4d 59 2d 79 33 25 0d 56  |,MX-x3%,MY-y3%.V|
0000bfd0  04 11 78 34 25 3d 4d 58  3a 79 34 25 3d 4d 59 0d  |..x4%=MX:y4%=MY.|
0000bfe0  56 0e 10 c9 35 3a f2 63  6f 70 79 73 6f 72 74 0d  |V...5:.copysort.|
0000bff0  56 18 11 78 33 25 3d 28  78 33 25 81 32 29 2a 32  |V..x3%=(x3%.2)*2|
0000c000  0d 56 22 11 78 34 25 3d  28 78 34 25 81 32 29 2a  |.V".x4%=(x4%.2)*|
0000c010  32 0d 56 2c 11 79 33 25  3d 28 79 33 25 81 34 29  |2.V,.y3%=(y3%.4)|
0000c020  2a 34 0d 56 36 11 79 34  25 3d 28 79 34 25 81 34  |*4.V6.y4%=(y4%.4|
0000c030  29 2a 34 0d 56 40 2b e7  20 78 33 25 3e 78 34 25  |)*4.V@+. x3%>x4%|
0000c040  20 8c 20 74 65 6d 70 25  3d 78 33 25 3a 78 33 25  | . temp%=x3%:x3%|
0000c050  3d 78 34 25 3a 78 34 25  3d 74 65 6d 70 25 0d 56  |=x4%:x4%=temp%.V|
0000c060  4a 2b e7 20 79 34 25 3e  79 33 25 20 8c 20 74 65  |J+. y4%>y3% . te|
0000c070  6d 70 25 3d 79 34 25 3a  79 34 25 3d 79 33 25 3a  |mp%=y4%:y4%=y3%:|
0000c080  79 33 25 3d 74 65 6d 70  25 0d 56 54 21 78 70 73  |y3%=temp%.VT!xps|
0000c090  25 3d 78 34 25 2d 78 33  25 2b 33 3a 79 70 73 25  |%=x4%-x3%+3:yps%|
0000c0a0  3d 79 34 25 2d 79 33 25  2d 37 0d 56 5e 0a 41 25  |=y4%-y3%-7.V^.A%|
0000c0b0  3d 78 31 25 0d 56 68 0a  42 25 3d 79 31 25 0d 56  |=x1%.Vh.B%=y1%.V|
0000c0c0  72 0c 43 25 3d 78 73 25  81 32 0d 56 7c 0d 44 25  |r.C%=xs%.2.V|.D%|
0000c0d0  3d 2d 79 73 25 81 34 0d  56 86 0a 45 25 3d 78 33  |=-ys%.4.V..E%=x3|
0000c0e0  25 0d 56 90 0a 46 25 3d  79 33 25 0d 56 9a 0d 47  |%.V..F%=y3%.V..G|
0000c0f0  25 3d 78 70 73 25 81 32  0d 56 a4 0e 48 25 3d 2d  |%=xps%.2.V..H%=-|
0000c100  79 70 73 25 81 34 0d 56  ae 1a d6 20 61 6e 74 69  |yps%.4.V... anti|
0000c110  5f 61 6c 69 61 73 65 64  5f 73 71 75 61 73 68 25  |_aliased_squash%|
0000c120  0d 56 b8 05 cb 0d 56 c2  04 0d 56 cc 0a f4 20 46  |.V....V...V... F|
0000c130  75 7a 7a 0d 56 d6 12 c9  36 38 3a c8 8e 20 73 74  |uzz.V...68:.. st|
0000c140  65 70 25 20 ca 0d 56 e0  16 c9 31 3a 78 30 25 3d  |ep% ..V...1:x0%=|
0000c150  36 34 30 3a 79 30 25 3d  35 31 32 0d 56 ea 27 c8  |640:y0%=512.V.'.|
0000c160  8f 20 78 30 25 2c 79 30  25 2c b6 28 28 4d 58 2d  |. x0%,y0%,.((MX-|
0000c170  78 30 25 29 5e 32 2b 28  4d 59 2d 79 30 25 29 5e  |x0%)^2+(MY-y0%)^|
0000c180  32 29 0d 56 f4 09 c8 96  3a c8 96 0d 56 fe 27 c8  |2).V....:...V.'.|
0000c190  8f 20 78 30 25 2c 79 30  25 2c b6 28 28 4d 58 2d  |. x0%,y0%,.((MX-|
0000c1a0  78 30 25 29 5e 32 2b 28  4d 59 2d 79 30 25 29 5e  |x0%)^2+(MY-y0%)^|
0000c1b0  32 29 0d 57 08 1f 52 25  3d b6 28 28 4d 58 2d 78  |2).W..R%=.((MX-x|
0000c1c0  30 25 29 5e 32 2b 28 4d  59 2d 79 30 25 29 5e 32  |0%)^2+(MY-y0%)^2|
0000c1d0  29 0d 57 12 06 c9 33 0d  57 1c 05 f5 0d 57 26 11  |).W...3.W....W&.|
0000c1e0  f2 6d 6f 75 73 65 5f 68  61 6e 64 6c 65 0d 57 30  |.mouse_handle.W0|
0000c1f0  2a 41 4e 31 3d b2 28 b3  28 33 36 30 29 29 3a 52  |*AN1=.(.(360)):R|
0000c200  4f 31 25 3d b7 28 b2 28  b3 28 38 30 29 29 29 2a  |O1%=.(.(.(80)))*|
0000c210  28 52 25 2f 31 30 29 0d  57 3a 2a 41 4e 32 3d b2  |(R%/10).W:*AN2=.|
0000c220  28 b3 28 33 36 30 29 29  3a 52 4f 32 25 3d b7 28  |(.(360)):RO2%=.(|
0000c230  b2 28 b3 28 38 30 29 29  29 2a 28 52 25 2f 31 30  |.(.(80)))*(R%/10|
0000c240  29 0d 57 44 15 41 25 3d  4d 58 2b b5 28 41 4e 31  |).WD.A%=MX+.(AN1|
0000c250  29 2a 52 4f 31 25 0d 57  4e 15 42 25 3d 4d 59 2b  |)*RO1%.WN.B%=MY+|
0000c260  9b 28 41 4e 31 29 2a 52  4f 31 25 0d 57 58 15 43  |.(AN1)*RO1%.WX.C|
0000c270  25 3d 4d 58 2b b5 28 41  4e 32 29 2a 52 4f 32 25  |%=MX+.(AN2)*RO2%|
0000c280  0d 57 62 15 44 25 3d 4d  59 2b 9b 28 41 4e 32 29  |.Wb.D%=MY+.(AN2)|
0000c290  2a 52 4f 32 25 0d 57 6c  12 d6 20 73 77 61 70 5f  |*RO2%.Wl.. swap_|
0000c2a0  70 69 78 65 6c 73 25 0d  57 76 0a fd 20 4d 42 3d  |pixels%.Wv.. MB=|
0000c2b0  30 0d 57 80 05 cb 0d 57  8a 04 0d 57 94 0d f4 20  |0.W....W...W... |
0000c2c0  4f 70 74 69 6f 6e 73 0d  57 9e 10 c9 36 39 2c 37  |Options.W...69,7|
0000c2d0  30 2c 37 38 2c 37 39 0d  57 a8 0d c8 8e 20 21 41  |0,78,79.W.... !A|
0000c2e0  63 25 20 ca 0d 57 b2 10  c9 36 39 3a 73 65 6c 65  |c% ..W...69:sele|
0000c2f0  63 74 3d b9 0d 57 bc 10  c9 37 30 3a 73 65 6c 65  |ct=..W...70:sele|
0000c300  63 74 3d a3 0d 57 c6 16  c9 37 38 3a 21 6c 65 66  |ct=..W...78:!lef|
0000c310  74 5f 68 61 6e 64 65 64  3d 30 0d 57 d0 16 c9 37  |t_handed=0.W...7|
0000c320  39 3a 21 6c 65 66 74 5f  68 61 6e 64 65 64 3d 31  |9:!left_handed=1|
0000c330  0d 57 da 05 cb 0d 57 e4  11 f2 72 65 73 65 74 5f  |.W....W...reset_|
0000c340  61 63 74 69 6f 6e 0d 57  ee 04 0d 57 f8 0f f4 20  |action.W...W... |
0000c350  50 69 78 65 6c 6c 61 74  65 0d 58 02 12 c9 37 31  |Pixellate.X...71|
0000c360  3a c8 8e 20 73 74 65 70  25 20 ca 0d 58 0c 16 c9  |:.. step% ..X...|
0000c370  31 2c 32 3a f2 67 65 74  72 65 63 74 61 6e 67 6c  |1,2:.getrectangl|
0000c380  65 0d 58 16 10 c9 33 3a  f2 73 6f 72 74 63 6f 72  |e.X...3:.sortcor|
0000c390  64 0d 58 20 21 67 73 78  25 3d 94 28 78 31 25 2d  |d.X !gsx%=.(x1%-|
0000c3a0  4d 58 29 3a 67 73 79 25  3d 94 28 79 31 25 2d 4d  |MX):gsy%=.(y1%-M|
0000c3b0  59 29 0d 58 2a 15 67 73  78 25 3d 28 67 73 78 25  |Y).X*.gsx%=(gsx%|
0000c3c0  20 81 20 32 29 2a 32 0d  58 34 15 67 73 79 25 3d  | . 2)*2.X4.gsy%=|
0000c3d0  28 67 73 79 25 20 81 20  34 29 2a 34 0d 58 3e 15  |(gsy% . 4)*4.X>.|
0000c3e0  e7 20 67 73 78 25 3c 34  20 8c 20 67 73 78 25 3d  |. gsx%<4 . gsx%=|
0000c3f0  34 0d 58 48 15 e7 20 67  73 79 25 3c 38 20 8c 20  |4.XH.. gsy%<8 . |
0000c400  67 73 79 25 3d 38 0d 58  52 0c f2 70 69 78 67 72  |gsy%=8.XR..pixgr|
0000c410  69 64 0d 58 5c 09 c8 96  3a c8 96 0d 58 66 0c f2  |id.X\...:...Xf..|
0000c420  70 69 78 67 72 69 64 0d  58 70 12 c9 34 3a f2 70  |pixgrid.Xp..4:.p|
0000c430  6f 69 6e 74 28 30 2c 30  29 0d 58 7a 1b e3 20 67  |oint(0,0).Xz.. g|
0000c440  79 25 3d 79 31 25 20 b8  20 79 32 25 20 88 20 2d  |y%=y1% . y2% . -|
0000c450  67 73 79 25 0d 58 84 1a  e3 20 67 78 25 3d 78 31  |gsy%.X... gx%=x1|
0000c460  25 20 b8 20 78 32 25 20  88 20 67 73 78 25 0d 58  |% . x2% . gsx%.X|
0000c470  8e 15 73 78 25 3d 67 73  78 25 3a 73 79 25 3d 67  |..sx%=gsx%:sy%=g|
0000c480  73 79 25 0d 58 98 26 e7  20 67 78 25 2b 73 78 25  |sy%.X.&. gx%+sx%|
0000c490  3e 78 32 25 20 8c 20 73  78 25 2d 3d 67 78 25 2b  |>x2% . sx%-=gx%+|
0000c4a0  73 78 25 2d 78 32 25 2d  32 0d 58 a2 28 e7 20 67  |sx%-x2%-2.X.(. g|
0000c4b0  79 25 2d 73 79 25 3c 79  32 25 20 8c 20 73 79 25  |y%-sy%<y2% . sy%|
0000c4c0  2d 3d 79 32 25 2d 28 67  79 25 2d 73 79 25 29 2d  |-=y2%-(gy%-sy%)-|
0000c4d0  34 0d 58 ac 23 41 25 3d  67 78 25 3a 42 25 3d 67  |4.X.#A%=gx%:B%=g|
0000c4e0  79 25 3a 43 25 3d 73 78  25 81 32 3a 44 25 3d 73  |y%:C%=sx%.2:D%=s|
0000c4f0  79 25 81 34 0d 58 b6 11  d6 20 43 4f 4c 61 76 65  |y%.4.X... COLave|
0000c500  72 61 67 65 25 0d 58 c0  05 ed 0d 58 ca 05 ed 0d  |rage%.X....X....|
0000c510  58 d4 17 c8 97 20 c8 93  20 30 2c 30 2c 31 32 37  |X.... .. 0,0,127|
0000c520  39 2c 31 30 32 33 0d 58  de 0b f2 75 70 64 61 74  |9,1023.X...updat|
0000c530  65 0d 58 e8 05 cb 0d 58  f2 04 0d 58 fc 0f f4 20  |e.X....X...X... |
0000c540  43 6f 70 79 20 46 69 6c  6c 0d 59 06 12 c9 37 32  |Copy Fill.Y...72|
0000c550  3a c8 8e 20 73 74 65 70  25 20 ca 0d 59 10 16 c9  |:.. step% ..Y...|
0000c560  31 2c 32 3a f2 67 65 74  72 65 63 74 61 6e 67 6c  |1,2:.getrectangl|
0000c570  65 0d 59 1a 14 c9 33 3a  70 78 25 3d 4d 58 3a 70  |e.Y...3:px%=MX:p|
0000c580  79 25 3d 4d 59 0d 59 24  1c c9 34 3a f2 63 6f 70  |y%=MY.Y$..4:.cop|
0000c590  79 73 6f 72 74 3a f2 70  6f 69 6e 74 28 30 2c 30  |ysort:.point(0,0|
0000c5a0  29 0d 59 2e 1e e6 20 31  32 38 2b b0 4d 58 2c 4d  |).Y... 128+.MX,M|
0000c5b0  59 29 20 c8 9c 20 c8 9c  28 4d 58 2c 4d 59 29 0d  |Y) .. ..(MX,MY).|
0000c5c0  59 38 33 e7 20 21 66 69  6c 6c 5f 73 74 79 6c 65  |Y83. !fill_style|
0000c5d0  3d 30 20 84 20 21 66 69  6c 6c 5f 73 74 79 6c 65  |=0 . !fill_style|
0000c5e0  3d 33 20 8c 20 21 66 69  6c 6c 5f 73 74 79 6c 65  |=3 . !fill_style|
0000c5f0  3d 32 0d 59 42 14 c8 8e  20 21 66 69 6c 6c 5f 73  |=2.YB... !fill_s|
0000c600  74 79 6c 65 20 ca 0d 59  4c 0b c9 31 2c 32 2c 33  |tyle ..YL..1,2,3|
0000c610  3a 0d 59 56 15 d6 20 62  69 74 5f 6d 61 70 5f 73  |:.YV.. bit_map_s|
0000c620  63 61 6e 5f 41 25 0d 59  60 0e f0 26 38 35 2c 4d  |can_A%.Y`..&85,M|
0000c630  58 2c 4d 59 0d 59 6a 28  41 25 3d 78 31 25 81 32  |X,MY.Yj(A%=x1%.2|
0000c640  3a 42 25 3d 79 31 25 81  34 3a 43 25 3d 78 73 25  |:B%=y1%.4:C%=xs%|
0000c650  81 32 3a 44 25 3d 2d 79  73 25 81 34 0d 59 74 14  |.2:D%=-ys%.4.Yt.|
0000c660  c8 8e 20 21 66 69 6c 6c  5f 73 74 79 6c 65 20 ca  |.. !fill_style .|
0000c670  0d 59 7e 15 c9 31 2c 32  3a d6 20 63 6f 70 79 5f  |.Y~..1,2:. copy_|
0000c680  66 69 6c 6c 25 0d 59 88  20 c9 33 3a f4 20 53 68  |fill%.Y. .3:. Sh|
0000c690  6f 75 6c 64 20 62 65 20  66 75 6c 6c 20 6d 61 70  |ould be full map|
0000c6a0  70 69 6e 67 2e 0d 59 92  05 cb 0d 59 9c 05 cb 0d  |ping..Y....Y....|
0000c6b0  59 a6 0b f2 75 70 64 61  74 65 0d 59 b0 05 cb 0d  |Y...update.Y....|
0000c6c0  59 ba 04 0d 59 c4 1b f4  20 53 61 76 65 20 43 6f  |Y...Y... Save Co|
0000c6d0  6d 70 61 63 74 65 64 20  53 70 72 69 74 65 0d 59  |mpacted Sprite.Y|
0000c6e0  ce 2c c9 37 33 3a e7 20  a4 74 65 78 74 5f 65 6e  |.,.73:. .text_en|
0000c6f0  74 72 79 28 33 33 2c 24  73 63 72 65 65 6e 5f 73  |try(33,$screen_s|
0000c700  74 72 25 2c 32 35 35 29  20 8c 0d 59 d8 26 f2 70  |tr%,255) ..Y.&.p|
0000c710  6f 69 6e 74 28 30 2c 31  29 3a f2 63 6f 6d 70 61  |oint(0,1):.compa|
0000c720  63 74 65 64 73 61 76 65  28 31 2c 6f 75 74 24 29  |ctedsave(1,out$)|
0000c730  0d 59 e2 14 61 72 65 61  24 3d c3 28 78 73 25 2a  |.Y..area$=.(xs%*|
0000c740  79 73 25 29 0d 59 ec 21  70 65 72 24 3d c0 c3 28  |ys%).Y.!per$=..(|
0000c750  63 73 25 2f 28 78 73 25  2a 79 73 25 29 2a 31 30  |cs%/(xs%*ys%)*10|
0000c760  30 29 2c 34 29 0d 59 f6  9c e7 20 a6 28 2d 31 29  |0),4).Y... .(-1)|
0000c770  20 8c 20 f2 65 72 72 6f  72 68 61 6e 64 6c 65 28  | . .errorhandle(|
0000c780  31 2c 22 43 6f 6d 70 61  63 74 69 6f 6e 20 52 65  |1,"Compaction Re|
0000c790  70 6f 72 74 7c 53 69 7a  65 3a 20 22 2b c3 28 78  |port|Size: "+.(x|
0000c7a0  73 25 29 2b 22 78 22 2b  c3 28 79 73 25 29 2b 22  |s%)+"x"+.(ys%)+"|
0000c7b0  7c 41 72 65 61 20 69 6e  20 62 79 74 65 73 3a 20  ||Area in bytes: |
0000c7c0  22 2b 61 72 65 61 24 2b  22 7c 42 79 74 65 73 20  |"+area$+"|Bytes |
0000c7d0  75 73 65 64 3a 20 22 2b  c3 28 63 73 25 29 2b 22  |used: "+.(cs%)+"|
0000c7e0  7c 50 65 72 63 65 6e 74  61 67 65 3a 20 22 2b 70  ||Percentage: "+p|
0000c7f0  65 72 24 2c 22 20 22 2c  73 65 6c 65 63 74 65 64  |er$," ",selected|
0000c800  29 0d 5a 00 15 24 73 63  72 65 65 6e 5f 73 74 72  |).Z..$screen_str|
0000c810  25 3d 6f 75 74 24 0d 5a  0a 05 cd 0d 5a 14 10 f2  |%=out$.Z....Z...|
0000c820  72 65 73 65 74 5f 65 6e  74 72 79 0d 5a 1e 04 0d  |reset_entry.Z...|
0000c830  5a 28 13 f4 20 43 6f 6d  70 61 63 74 65 64 20 47  |Z(.. Compacted G|
0000c840  65 74 0d 5a 32 12 c9 37  34 3a c8 8e 20 73 74 65  |et.Z2..74:.. ste|
0000c850  70 25 20 ca 0d 5a 3c 16  c9 31 2c 32 3a f2 67 65  |p% ..Z<..1,2:.ge|
0000c860  74 72 65 63 74 61 6e 67  6c 65 0d 5a 46 10 c9 33  |trectangle.ZF..3|
0000c870  3a f2 73 6f 72 74 63 6f  72 64 0d 5a 50 0f 21 63  |:.sortcord.ZP.!c|
0000c880  6f 6d 5f 78 31 3d 78 31  25 0d 5a 5a 0f 21 63 6f  |om_x1=x1%.ZZ.!co|
0000c890  6d 5f 79 31 3d 79 31 25  0d 5a 64 0f 21 63 6f 6d  |m_y1=y1%.Zd.!com|
0000c8a0  5f 78 32 3d 78 32 25 0d  5a 6e 0f 21 63 6f 6d 5f  |_x2=x2%.Zn.!com_|
0000c8b0  79 32 3d 79 32 25 0d 5a  78 05 cb 0d 5a 82 04 0d  |y2=y2%.Zx...Z...|
0000c8c0  5a 8c 1b f4 20 4d 6f 64  65 20 31 35 20 74 6f 20  |Z... Mode 15 to |
0000c8d0  31 33 20 63 6f 6e 76 65  72 74 0d 5a 96 12 c9 37  |13 convert.Z...7|
0000c8e0  35 3a c8 8e 20 73 74 65  70 25 20 ca 0d 5a a0 16  |5:.. step% ..Z..|
0000c8f0  c9 31 2c 32 3a f2 67 65  74 72 65 63 74 61 6e 67  |.1,2:.getrectang|
0000c900  6c 65 0d 5a aa 2c c9 33  3a f2 73 6f 72 74 63 6f  |le.Z.,.3:.sortco|
0000c910  72 64 3a 78 73 25 2d 3d  32 3a 79 73 25 2b 3d 34  |rd:xs%-=2:ys%+=4|
0000c920  3a 70 78 25 3d 4d 58 3a  70 79 25 3d 4d 59 0d 5a  |:px%=MX:py%=MY.Z|
0000c930  b4 19 c8 93 20 70 78 25  2c 70 79 25 2c 78 73 25  |.... px%,py%,xs%|
0000c940  2f 32 2c 2d 79 73 25 0d  5a be 09 c8 96 3a c8 96  |/2,-ys%.Z....:..|
0000c950  0d 5a c8 19 c8 93 20 70  78 25 2c 70 79 25 2c 78  |.Z.... px%,py%,x|
0000c960  73 25 2f 32 2c 2d 79 73  25 0d 5a d2 10 c9 34 3a  |s%/2,-ys%.Z...4:|
0000c970  f2 73 6f 72 74 63 6f 72  64 0d 5a dc 38 41 25 3d  |.sortcord.Z.8A%=|
0000c980  78 31 25 3a 42 25 3d 79  31 25 3a 43 25 3d 78 73  |x1%:B%=y1%:C%=xs|
0000c990  25 81 34 3a 44 25 3d 2d  79 73 25 81 34 3a 45 25  |%.4:D%=-ys%.4:E%|
0000c9a0  3d 70 78 25 3a 46 25 3d  70 79 25 2d 79 73 25 2d  |=px%:F%=py%-ys%-|
0000c9b0  34 0d 5a e6 19 d6 20 43  4f 4c 6d 6f 64 65 31 35  |4.Z... COLmode15|
0000c9c0  5f 31 33 72 65 73 69 7a  65 25 0d 5a f0 05 cb 0d  |_13resize%.Z....|
0000c9d0  5a fa 04 0d 5b 04 19 f4  20 43 6f 6c 6f 75 72 20  |Z...[... Colour |
0000c9e0  41 76 65 72 61 67 65 20  41 72 65 61 0d 5b 0e 12  |Average Area.[..|
0000c9f0  c9 37 36 3a c8 8e 20 73  74 65 70 25 20 ca 0d 5b  |.76:.. step% ..[|
0000ca00  18 16 c9 31 2c 32 3a f2  67 65 74 72 65 63 74 61  |...1,2:.getrecta|
0000ca10  6e 67 6c 65 0d 5b 22 10  c9 33 3a f2 73 6f 72 74  |ngle.["..3:.sort|
0000ca20  63 6f 72 64 0d 5b 2c 24  41 25 3d 78 31 25 3a 42  |cord.[,$A%=x1%:B|
0000ca30  25 3d 79 31 25 3a 43 25  3d 78 73 25 81 32 3a 44  |%=y1%:C%=xs%.2:D|
0000ca40  25 3d 2d 79 73 25 81 34  0d 5b 36 11 d6 20 43 4f  |%=-ys%.4.[6.. CO|
0000ca50  4c 61 76 65 72 61 67 65  25 0d 5b 40 05 cb 0d 5b  |Laverage%.[@...[|
0000ca60  4a 04 0d 5b 54 16 f4 20  55 70 64 61 74 65 20 46  |J..[T.. Update F|
0000ca70  6f 6e 74 20 4c 69 73 74  0d 5b 5e 07 c9 37 37 0d  |ont List.[^..77.|
0000ca80  5b 68 13 d6 20 66 6f 6e  74 6c 69 73 74 69 6e 69  |[h.. fontlistini|
0000ca90  74 25 0d 5b 72 11 f2 72  65 73 65 74 5f 61 63 74  |t%.[r..reset_act|
0000caa0  69 6f 6e 0d 5b 7c 04 0d  5b 86 13 f4 20 33 20 70  |ion.[|..[... 3 p|
0000cab0  6f 69 6e 74 20 63 75 72  76 65 0d 5b 90 12 c9 38  |oint curve.[...8|
0000cac0  30 3a c8 8e 20 73 74 65  70 25 20 ca 0d 5b 9a 14  |0:.. step% ..[..|
0000cad0  c9 31 3a 78 31 25 3d 4d  58 3a 79 31 25 3d 4d 59  |.1:x1%=MX:y1%=MY|
0000cae0  0d 5b a4 14 c9 32 3a 78  32 25 3d 4d 58 3a 79 32  |.[...2:x2%=MX:y2|
0000caf0  25 3d 4d 59 0d 5b ae 17  ec 20 78 31 25 2c 79 31  |%=MY.[... x1%,y1|
0000cb00  25 3a df 20 78 32 25 2c  79 32 25 0d 5b b8 09 c8  |%:. x2%,y2%.[...|
0000cb10  96 3a c8 96 0d 5b c2 17  ec 20 78 31 25 2c 79 31  |.:...[... x1%,y1|
0000cb20  25 3a df 20 78 32 25 2c  79 32 25 0d 5b cc 14 c9  |%:. x2%,y2%.[...|
0000cb30  33 3a 78 33 25 3d 4d 58  3a 79 33 25 3d 4d 59 0d  |3:x3%=MX:y3%=MY.|
0000cb40  5b d6 1f f2 63 75 72 76  65 28 32 30 29 3a c8 96  |[...curve(20):..|
0000cb50  3a c8 96 3a f2 63 75 72  76 65 28 32 30 29 0d 5b  |:..:.curve(20).[|
0000cb60  e0 10 c9 34 3a f2 63 75  72 76 65 28 31 29 0d 5b  |...4:.curve(1).[|
0000cb70  ea 05 cb 0d 5b f4 04 0d  5b fe 19 f4 20 42 6f 74  |....[...[... Bot|
0000cb80  74 6c 65 20 57 61 6c 6c  20 46 6f 72 6d 75 6c 61  |tle Wall Formula|
0000cb90  0d 5c 08 34 c9 38 31 3a  e7 20 a4 74 65 78 74 5f  |.\.4.81:. .text_|
0000cba0  65 6e 74 72 79 28 33 32  2c 62 6f 74 72 61 64 24  |entry(32,botrad$|
0000cbb0  2c 32 35 35 29 20 8c 20  62 6f 74 72 61 64 24 3d  |,255) . botrad$=|
0000cbc0  6f 75 74 24 0d 5c 12 10  f2 72 65 73 65 74 5f 65  |out$.\...reset_e|
0000cbd0  6e 74 72 79 0d 5c 1c 04  0d 5c 26 10 f4 20 55 6e  |ntry.\...\&.. Un|
0000cbe0  64 6f 20 42 72 75 73 68  0d 5c 30 12 c9 38 32 3a  |do Brush.\0..82:|
0000cbf0  c8 8e 20 73 74 65 70 25  20 ca 0d 5c 3a 29 c9 31  |.. step% ..\:).1|
0000cc00  3a 41 25 3d 28 4d 58 20  81 20 32 29 2d 31 36 3a  |:A%=(MX . 2)-16:|
0000cc10  42 25 3d 32 35 35 2d 28  28 4d 59 20 81 20 34 29  |B%=255-((MY . 4)|
0000cc20  2b 38 29 0d 5c 44 0f d6  20 62 72 75 73 68 65 6f  |+8).\D.. brusheo|
0000cc30  72 25 0d 5c 4e 15 c8 96  3a c8 96 3a d6 20 62 72  |r%.\N...:..:. br|
0000cc40  75 73 68 65 6f 72 25 0d  5c 58 08 c9 32 3a f5 0d  |usheor%.\X..2:..|
0000cc50  5c 62 11 f2 6d 6f 75 73  65 5f 68 61 6e 64 6c 65  |\b..mouse_handle|
0000cc60  0d 5c 6c 26 41 25 3d 28  4d 58 20 81 20 32 29 2d  |.\l&A%=(MX . 2)-|
0000cc70  31 36 3a 42 25 3d 32 35  35 2d 28 28 4d 59 20 81  |16:B%=255-((MY .|
0000cc80  20 34 29 2b 38 29 0d 5c  76 10 d6 20 62 72 75 73  | 4)+8).\v.. brus|
0000cc90  68 75 6e 64 6f 25 0d 5c  80 0a fd 20 4d 42 3d 30  |hundo%.\... MB=0|
0000cca0  0d 5c 8a 05 cb 0d 5c 94  04 0d 5c 9e 05 cb 0d 5c  |.\....\...\....\|
0000ccb0  a8 05 e1 0d 5c b2 04 0d  5c bc 0f dd f2 63 75 72  |....\...\....cur|
0000ccc0  76 65 28 72 25 29 0d 5c  c6 11 f0 20 26 34 35 2c  |ve(r%).\... &45,|
0000ccd0  78 31 25 2c 79 31 25 0d  5c d0 1b 78 73 25 3d 78  |x1%,y1%.\..xs%=x|
0000cce0  31 25 2d 78 32 25 3a 79  73 25 3d 79 31 25 2d 79  |1%-x2%:ys%=y1%-y|
0000ccf0  32 25 0d 5c da 2d 78 73  32 25 3d 28 78 31 25 2d  |2%.\.-xs2%=(x1%-|
0000cd00  78 73 25 2f 32 29 2d 78  33 25 3a 79 73 32 25 3d  |xs%/2)-x3%:ys2%=|
0000cd10  28 79 31 25 2d 79 73 25  2f 32 29 2d 79 33 25 0d  |(y1%-ys%/2)-y3%.|
0000cd20  5c e4 0d e7 20 72 25 3c  3e 31 20 8c 0d 5c ee 09  |\... r%<>1 ..\..|
0000cd30  73 25 3d 72 25 0d 5c f8  05 cc 0d 5d 02 23 e7 20  |s%=r%.\....].#. |
0000cd40  94 78 73 25 3e 94 79 73  25 20 8c 20 73 25 3d 94  |.xs%>.ys% . s%=.|
0000cd50  78 73 25 20 8b 20 73 25  3d 94 79 73 25 0d 5d 0c  |xs% . s%=.ys%.].|
0000cd60  05 cd 0d 5d 16 1d e3 20  73 74 3d 31 2f 73 25 20  |...]... st=1/s% |
0000cd70  b8 20 31 2d 31 2f 73 25  20 88 20 31 2f 73 25 0d  |. 1-1/s% . 1/s%.|
0000cd80  5d 20 25 78 25 3d 78 31  25 2d 28 78 73 25 2a 73  |] %x%=x1%-(xs%*s|
0000cd90  74 29 2d 28 78 73 32 25  2a b5 b2 28 73 74 2a 31  |t)-(xs2%*..(st*1|
0000cda0  38 30 29 29 0d 5d 2a 25  79 25 3d 79 31 25 2d 28  |80)).]*%y%=y1%-(|
0000cdb0  79 73 25 2a 73 74 29 2d  28 79 73 32 25 2a b5 b2  |ys%*st)-(ys2%*..|
0000cdc0  28 73 74 2a 31 38 30 29  29 0d 5d 34 0f f0 20 26  |(st*180)).]4.. &|
0000cdd0  32 35 2c 78 25 2c 79 25  0d 5d 3e 05 ed 0d 5d 48  |25,x%,y%.]>...]H|
0000cde0  11 f0 20 26 32 35 2c 78  32 25 2c 79 32 25 0d 5d  |.. &25,x2%,y2%.]|
0000cdf0  52 05 e1 0d 5d 5c 04 0d  5d 66 1e dd a4 74 65 78  |R...]\..]f...tex|
0000ce00  74 5f 65 6e 74 72 79 28  73 6c 25 2c 69 6e 24 2c  |t_entry(sl%,in$,|
0000ce10  6c 65 6e 25 29 0d 5d 70  0d 21 70 75 74 69 74 25  |len%).]p.!putit%|
0000ce20  3d 31 0d 5d 7a 18 f2 70  6f 69 6e 74 28 30 2c 50  |=1.]z..point(0,P|
0000ce30  4e 6b 65 79 62 6f 61 72  64 29 0d 5d 84 1b f2 72  |Nkeyboard).]...r|
0000ce40  65 73 65 74 5f 61 63 74  69 6f 6e 3a d6 20 75 70  |eset_action:. up|
0000ce50  74 72 65 65 25 0d 5d 8e  28 41 25 3d 2d 31 32 38  |tree%.].(A%=-128|
0000ce60  3a 42 25 3d 21 73 74 61  72 74 79 25 2b 35 36 3a  |:B%=!starty%+56:|
0000ce70  45 25 3d 2d 31 3a d6 20  68 65 6c 70 25 0d 5d 98  |E%=-1:. help%.].|
0000ce80  2f 41 25 3d 2d 31 32 38  3a 42 25 3d 21 73 74 61  |/A%=-128:B%=!sta|
0000ce90  72 74 79 25 2d 21 73 69  7a 65 79 2d 39 36 3a 45  |rty%-!sizey-96:E|
0000cea0  25 3d 2d 31 3a d6 20 68  65 6c 70 25 0d 5d a2 0b  |%=-1:. help%.]..|
0000ceb0  73 74 65 70 25 3d 31 0d  5d ac 27 67 6f 3d a4 69  |step%=1.].'go=.i|
0000cec0  6e 73 74 72 69 6e 67 28  73 6c 25 2c 31 32 36 2c  |nstring(sl%,126,|
0000ced0  69 6e 24 2c 6f 75 74 24  2c 6c 65 6e 25 29 0d 5d  |in$,out$,len%).]|
0000cee0  b6 1e d6 20 6c 69 66 74  75 70 25 3a d6 20 70 75  |... liftup%:. pu|
0000cef0  74 62 61 63 6b 67 72 6f  75 6e 64 25 0d 5d c0 07  |tbackground%.]..|
0000cf00  3d 67 6f 0d 5d ca 04 0d  5d d4 11 dd f2 72 65 73  |=go.]...]....res|
0000cf10  65 74 5f 65 6e 74 72 79  0d 5d de 26 d6 20 6c 69  |et_entry.].&. li|
0000cf20  66 74 64 6f 77 6e 25 3a  ef 35 3a d6 20 68 65 6c  |ftdown%:.5:. hel|
0000cf30  70 74 65 78 74 25 3a f2  75 70 64 61 74 65 0d 5d  |ptext%:.update.]|
0000cf40  e8 05 e1 0d 5d f2 04 0d  5d fc 16 dd f2 65 76 61  |....]...]....eva|
0000cf50  6c 5f 65 72 72 6f 72 5f  63 68 65 61 74 0d 5e 06  |l_error_cheat.^.|
0000cf60  07 ea 20 85 0d 5e 10 21  ee 20 85 20 ea 20 65 76  |.. ..^.!. . . ev|
0000cf70  61 6c 24 3d 22 22 3a ef  37 3a 74 24 3d f6 24 3a  |al$="":.7:t$=.$:|
0000cf80  f7 20 85 3a e1 0d 5e 1a  39 e7 20 97 28 65 76 61  |. .:..^.9. .(eva|
0000cf90  6c 24 29 3d 31 32 36 20  8c 20 74 24 3d c3 7e 28  |l$)=126 . t$=.~(|
0000cfa0  a0 28 c1 65 76 61 6c 24  2c 32 29 29 29 20 8b 20  |.(.eval$,2))) . |
0000cfb0  74 24 3d c3 28 a0 28 65  76 61 6c 24 29 29 0d 5e  |t$=.(.(eval$)).^|
0000cfc0  24 07 f7 20 85 0d 5e 2e  05 e1 0d 5e 38 04 0d 5e  |$.. ..^....^8..^|
0000cfd0  42 1b dd f2 63 6f 6d 70  61 63 74 65 64 73 61 76  |B...compactedsav|
0000cfe0  65 28 74 25 2c 66 6e 24  29 0d 5e 4c 07 ea 20 85  |e(t%,fn$).^L.. .|
0000cff0  0d 5e 56 23 ee 20 85 20  ea 20 d6 20 75 6e 64 6f  |.^V#. . . . undo|
0000d000  73 61 76 65 25 3a f7 20  85 3a 85 20 39 39 2c f6  |save%:. .:. 99,.|
0000d010  24 3a e1 0d 5e 60 28 ff  22 44 65 66 69 6e 65 42  |$:..^`(."DefineB|
0000d020  75 66 66 65 72 20 22 2b  c3 28 53 54 4f 52 45 25  |uffer "+.(STORE%|
0000d030  29 2b 22 20 26 32 38 30  30 30 22 0d 5e 6a 0b c8  |)+" &28000".^j..|
0000d040  8e 20 74 25 20 ca 0d 5e  74 2a c9 30 3a ff 22 43  |. t% ..^t*.0:."C|
0000d050  6f 6d 5f 53 61 76 65 20  22 2b 66 6e 24 2b 22 20  |om_Save "+fn$+" |
0000d060  30 20 30 20 31 32 37 39  20 31 30 32 33 20 30 22  |0 0 1279 1023 0"|
0000d070  0d 5e 7e 2c c9 31 3a e7  20 3f 28 66 6c 61 67 73  |.^~,.1:. ?(flags|
0000d080  25 2b 31 29 3d 30 20 8c  20 74 6c 25 3d 62 65 68  |%+1)=0 . tl%=beh|
0000d090  69 6e 64 25 20 8b 20 74  6c 25 3d 30 0d 5e 88 5b  |ind% . tl%=0.^.[|
0000d0a0  ff 22 43 6f 6d 5f 53 61  76 65 20 22 2b 66 6e 24  |."Com_Save "+fn$|
0000d0b0  2b 22 20 22 2b c3 28 21  63 6f 6d 5f 78 31 29 2b  |+" "+.(!com_x1)+|
0000d0c0  22 20 22 2b c3 28 21 63  6f 6d 5f 79 31 29 2b 22  |" "+.(!com_y1)+"|
0000d0d0  20 22 2b c3 28 21 63 6f  6d 5f 78 32 29 2b 22 20  | "+.(!com_x2)+" |
0000d0e0  22 2b c3 28 21 63 6f 6d  5f 79 32 29 2b 22 20 22  |"+.(!com_y2)+" "|
0000d0f0  2b c3 28 74 6c 25 29 0d  5e 92 05 cb 0d 5e 9c 0a  |+.(tl%).^....^..|
0000d100  63 73 25 3d 31 30 0d 5e  a6 0a 78 73 25 3d 31 30  |cs%=10.^..xs%=10|
0000d110  0d 5e b0 0a 79 73 25 3d  31 30 0d 5e ba 0f d6 20  |.^..ys%=10.^... |
0000d120  75 6e 64 6f 73 61 76 65  25 0d 5e c4 07 f7 20 85  |undosave%.^... .|
0000d130  0d 5e ce 05 e1 0d 5e d8  04 0d 5e e2 19 dd f2 63  |.^....^...^....c|
0000d140  6f 6d 70 72 65 73 73 65  64 73 61 76 65 28 66 6e  |ompressedsave(fn|
0000d150  24 29 0d 5e ec 07 ea 20  85 0d 5e f6 23 ee 20 85  |$).^... ..^.#. .|
0000d160  20 ea 20 d6 20 75 6e 64  6f 73 61 76 65 25 3a f7  | . . undosave%:.|
0000d170  20 85 3a 85 20 39 39 2c  f6 24 3a e1 0d 5f 00 0d  | .:. 99,.$:.._..|
0000d180  24 63 61 74 25 3d 66 6e  24 0d 5f 0a 14 d6 20 63  |$cat%=fn$._... c|
0000d190  6f 6d 70 61 63 74 65 64  73 61 76 65 25 0d 5f 14  |ompactedsave%._.|
0000d1a0  0f d6 20 75 6e 64 6f 73  61 76 65 25 0d 5f 1e 07  |.. undosave%._..|
0000d1b0  f7 20 85 0d 5f 28 05 e1  0d 5f 32 04 0d 5f 3c 0d  |. .._(..._2.._<.|
0000d1c0  dd f2 70 69 78 67 72 69  64 0d 5f 46 16 c8 93 20  |..pixgrid._F... |
0000d1d0  78 31 25 2c 79 31 25 2c  78 73 25 2c 79 73 25 0d  |x1%,y1%,xs%,ys%.|
0000d1e0  5f 50 1e e3 20 58 25 3d  78 31 25 2b 67 73 78 25  |_P.. X%=x1%+gsx%|
0000d1f0  20 b8 20 78 32 25 20 88  20 67 73 78 25 0d 5f 5a  | . x2% . gsx%._Z|
0000d200  13 86 20 58 25 2c 79 31  25 2c 58 25 2c 79 32 25  |.. X%,y1%,X%,y2%|
0000d210  0d 5f 64 05 ed 0d 5f 6e  1f e3 20 59 25 3d 79 31  |._d..._n.. Y%=y1|
0000d220  25 2d 67 73 79 25 20 b8  20 79 32 25 20 88 20 2d  |%-gsy% . y2% . -|
0000d230  67 73 79 25 0d 5f 78 13  86 20 78 31 25 2c 59 25  |gsy%._x.. x1%,Y%|
0000d240  2c 78 32 25 2c 59 25 0d  5f 82 05 ed 0d 5f 8c 05  |,x2%,Y%._...._..|
0000d250  e1 0d 5f 96 04 0d 5f a0  0d dd a4 73 70 72 69 74  |.._..._....sprit|
0000d260  65 73 0d 5f aa 13 d6 20  63 68 65 63 6b 73 70 72  |es._... checkspr|
0000d270  69 74 65 73 25 0d 5f b4  09 3d 21 4f 55 54 0d 5f  |ites%._..=!OUT._|
0000d280  be 04 0d 5f c8 0f dd a4  70 75 74 5f 63 68 65 63  |..._....put_chec|
0000d290  6b 0d 5f d2 15 e7 20 a4  73 70 72 69 74 65 73 3e  |k._... .sprites>|
0000d2a0  30 20 8c 20 3d b9 0d 5f  dc 11 f2 72 65 73 65 74  |0 . =.._...reset|
0000d2b0  5f 61 63 74 69 6f 6e 0d  5f e6 74 e7 20 21 41 63  |_action._.t. !Ac|
0000d2c0  25 3d 33 37 20 84 20 21  41 63 25 3d 34 30 20 8c  |%=37 . !Ac%=40 .|
0000d2d0  20 21 41 63 25 3d 33 38  3a 85 20 39 39 2c 22 4e  | !Ac%=38:. 99,"N|
0000d2e0  6f 20 53 70 72 69 74 65  73 20 50 72 65 73 65 6e  |o Sprites Presen|
0000d2f0  74 2e 20 55 6e 61 62 6c  65 20 74 6f 20 52 65 73  |t. Unable to Res|
0000d300  74 6f 72 65 20 41 63 74  69 6f 6e 2c 20 53 65 74  |tore Action, Set|
0000d310  74 69 6e 67 20 41 63 74  69 6f 6e 20 74 6f 20 53  |ting Action to S|
0000d320  70 72 69 74 65 20 47 65  74 2e 22 0d 5f f0 06 3d  |prite Get."._..=|
0000d330  a3 0d 5f fa 04 0d 60 04  11 dd f2 74 69 74 6c 65  |.._...`....title|
0000d340  73 70 72 69 74 65 0d 60  0e 07 ea 20 85 0d 60 18  |sprite.`... ..`.|
0000d350  0f ee 20 85 20 ea 20 f7  20 85 3a e1 0d 60 22 24  |.. . . . .:..`"$|
0000d360  ec 20 35 32 2c 37 31 31  3a ec 20 32 37 34 2c 39  |. 52,711:. 274,9|
0000d370  33 32 3a 2a 53 47 45 54  20 44 69 61 6d 6f 6e 64  |32:*SGET Diamond|
0000d380  0d 60 2c 09 f7 20 85 3a  e1 0d 60 36 04 0d 60 40  |.`,.. .:..`6..`@|
0000d390  17 f4 20 66 6f 72 6d 75  6c 61 20 66 75 6e 63 74  |.. formula funct|
0000d3a0  69 6f 6e 73 0d 60 4a 04  0d 60 54 0e dd 20 a4 72  |ions.`J..`T.. .r|
0000d3b0  61 64 69 75 73 52 0d 60  5e 11 3d b6 28 58 52 5e  |adiusR.`^.=.(XR^|
0000d3c0  32 2b 59 52 5e 32 29 0d  60 68 04 0d 60 72 0e dd  |2+YR^2).`h..`r..|
0000d3d0  20 a4 72 61 64 69 75 73  44 0d 60 7c 11 3d b6 28  | .radiusD.`|.=.(|
0000d3e0  58 44 5e 32 2b 59 44 5e  32 29 0d 60 86 04 0d 60  |XD^2+YD^2).`...`|
0000d3f0  90 0c dd 20 a4 64 65 70  74 68 0d 60 9a 11 ea 20  |... .depth.`... |
0000d400  72 25 2c 67 25 2c 62 25  2c 74 25 0d 60 a4 17 74  |r%,g%,b%,t%.`..t|
0000d410  25 3d 28 63 6f 6c 25 20  80 20 31 39 32 29 3e 3e  |%=(col% . 192)>>|
0000d420  20 36 0d 60 ae 17 72 25  3d 74 25 2b 28 63 6f 6c  | 6.`..r%=t%+(col|
0000d430  25 20 80 20 33 29 3c 3c  32 0d 60 b8 15 67 25 3d  |% . 3)<<2.`..g%=|
0000d440  74 25 2b 28 63 6f 6c 25  20 80 20 31 32 29 0d 60  |t%+(col% . 12).`|
0000d450  c2 18 62 25 3d 74 25 2b  28 63 6f 6c 25 20 80 20  |..b%=t%+(col% . |
0000d460  34 38 29 3e 3e 32 0d 60  cc 09 74 25 3d 72 25 0d  |48)>>2.`..t%=r%.|
0000d470  60 d6 13 e7 20 67 25 3e  74 25 20 8c 20 74 25 3d  |`... g%>t% . t%=|
0000d480  67 25 0d 60 e0 13 e7 20  62 25 3e 74 25 20 8c 20  |g%.`... b%>t% . |
0000d490  74 25 3d 62 25 0d 60 ea  0a 3d 74 25 2f 31 35 0d  |t%=b%.`..=t%/15.|
0000d4a0  60 f4 04 0d 60 fe 17 dd  20 a4 77 65 64 67 65 28  |`...`... .wedge(|
0000d4b0  75 70 25 2c 64 6f 77 6e  25 29 0d 61 08 1a e7 20  |up%,down%).a... |
0000d4c0  63 6f 6c 25 3d 75 70 25  20 8c 20 77 65 64 67 65  |col%=up% . wedge|
0000d4d0  25 2b 3d 31 0d 61 12 1c  e7 20 63 6f 6c 25 3d 64  |%+=1.a... col%=d|
0000d4e0  6f 77 6e 25 20 8c 20 77  65 64 67 65 25 2d 3d 31  |own% . wedge%-=1|
0000d4f0  0d 61 1c 0b 3d 77 65 64  67 65 25 0d 61 26 04 0d  |.a..=wedge%.a&..|
0000d500  61 30 22 dd f2 73 6d 65  61 72 73 63 72 65 65 6e  |a0"..smearscreen|
0000d510  28 78 31 25 2c 79 31 25  2c 78 73 25 2c 79 73 25  |(x1%,y1%,xs%,ys%|
0000d520  29 0d 61 3a 0d f2 63 6f  70 79 73 6f 72 74 0d 61  |).a:..copysort.a|
0000d530  44 13 63 31 25 3d 28 70  78 31 25 2d 70 78 34 25  |D.c1%=(px1%-px4%|
0000d540  29 0d 61 4e 13 63 32 25  3d 28 70 79 31 25 2d 70  |).aN.c2%=(py1%-p|
0000d550  79 34 25 29 0d 61 58 0d  63 33 25 3d 28 79 73 25  |y4%).aX.c3%=(ys%|
0000d560  29 0d 61 62 0d 63 34 25  3d 28 78 73 25 29 0d 61  |).ab.c4%=(xs%).a|
0000d570  6c 13 63 35 25 3d 28 70  78 32 25 2d 70 78 31 25  |l.c5%=(px2%-px1%|
0000d580  29 0d 61 76 13 63 36 25  3d 28 70 79 32 25 2d 70  |).av.c6%=(py2%-p|
0000d590  79 31 25 29 0d 61 80 17  63 37 25 3d 28 70 78 33  |y1%).a..c7%=(px3|
0000d5a0  25 2d 70 78 34 25 29 2d  63 35 25 0d 61 8a 17 63  |%-px4%)-c5%.a..c|
0000d5b0  38 25 3d 28 70 79 33 25  2d 70 79 34 25 29 2d 63  |8%=(py3%-py4%)-c|
0000d5c0  36 25 0d 61 94 0f f2 70  6f 69 6e 74 28 30 2c 30  |6%.a...point(0,0|
0000d5d0  29 0d 61 9e 22 e3 20 79  70 25 3d 79 31 25 20 b8  |).a.". yp%=y1% .|
0000d5e0  20 79 31 25 2b 79 73 25  20 88 20 b4 28 79 73 25  | y1%+ys% . .(ys%|
0000d5f0  29 2a 34 0d 61 a8 0a 61  72 78 25 3d 30 0d 61 b2  |)*4.a..arx%=0.a.|
0000d600  22 e3 20 78 70 25 3d 78  31 25 20 b8 20 78 31 25  |". xp%=x1% . x1%|
0000d610  2b 78 73 25 20 88 20 b4  28 78 73 25 29 2a 32 0d  |+xs% . .(xs%)*2.|
0000d620  61 bc 48 e7 20 79 70 25  3d 79 31 25 20 8c 20 41  |a.H. yp%=y1% . A|
0000d630  25 28 61 72 78 25 2c 30  29 3d a4 6e 70 78 28 78  |%(arx%,0)=.npx(x|
0000d640  70 25 2c 79 70 25 29 3a  41 25 28 61 72 78 25 2c  |p%,yp%):A%(arx%,|
0000d650  31 29 3d a4 6e 70 79 28  78 70 25 2c 79 70 25 29  |1)=.npy(xp%,yp%)|
0000d660  3a e5 20 8d 50 60 62 0d  61 c6 3d e7 20 61 72 78  |:. .P`b.a.=. arx|
0000d670  25 3d 30 20 8c 20 6e 70  6c 78 25 3d a4 6e 70 78  |%=0 . nplx%=.npx|
0000d680  28 78 70 25 2c 79 70 25  29 3a 6e 70 6c 79 25 3d  |(xp%,yp%):nply%=|
0000d690  a4 6e 70 79 28 78 70 25  2c 79 70 25 29 3a e5 20  |.npy(xp%,yp%):. |
0000d6a0  8d 50 4c 62 0d 61 d0 1b  70 6c 74 25 3d a4 67 63  |.PLb.a..plt%=.gc|
0000d6b0  6f 6c 28 78 70 25 2d 32  2c 79 70 25 2b 34 29 0d  |ol(xp%-2,yp%+4).|
0000d6c0  61 da 0d ec 20 74 78 25  2c 74 79 25 0d 61 e4 1b  |a... tx%,ty%.a..|
0000d6d0  ec 20 41 25 28 61 72 78  25 2c 30 29 2c 41 25 28  |. A%(arx%,0),A%(|
0000d6e0  61 72 78 25 2c 31 29 0d  61 ee 1e e7 20 70 6c 74  |arx%,1).a... plt|
0000d6f0  25 20 8c 20 f0 20 26 35  35 2c 6e 70 6c 78 25 2c  |% . . &55,nplx%,|
0000d700  6e 70 6c 79 25 0d 61 f8  2b 6e 70 6c 78 25 3d a4  |nply%.a.+nplx%=.|
0000d710  6e 70 78 28 78 70 25 2c  79 70 25 29 3a 6e 70 6c  |npx(xp%,yp%):npl|
0000d720  79 25 3d a4 6e 70 79 28  78 70 25 2c 79 70 25 29  |y%=.npy(xp%,yp%)|
0000d730  0d 62 02 1e e7 20 70 6c  74 25 20 8c 20 f0 20 26  |.b... plt% . . &|
0000d740  35 35 2c 6e 70 6c 78 25  2c 6e 70 6c 79 25 0d 62  |55,nplx%,nply%.b|
0000d750  0c 21 74 78 25 3d 41 25  28 61 72 78 25 2c 30 29  |.!tx%=A%(arx%,0)|
0000d760  3a 74 79 25 3d 41 25 28  61 72 78 25 2c 31 29 0d  |:ty%=A%(arx%,1).|
0000d770  62 16 25 41 25 28 61 72  78 25 2c 30 29 3d 6e 70  |b.%A%(arx%,0)=np|
0000d780  6c 78 25 3a 41 25 28 61  72 78 25 2c 31 29 3d 6e  |lx%:A%(arx%,1)=n|
0000d790  70 6c 79 25 0d 62 20 0f  61 72 78 25 3d 61 72 78  |ply%.b .arx%=arx|
0000d7a0  25 2b 31 0d 62 2a 0d ed  20 78 70 25 2c 79 70 25  |%+1.b*.. xp%,yp%|
0000d7b0  0d 62 34 0b 73 74 65 70  25 3d 31 0d 62 3e 05 cb  |.b4.step%=1.b>..|
0000d7c0  0d 62 48 0b f2 75 70 64  61 74 65 0d 62 52 05 e1  |.bH..update.bR..|
0000d7d0  0d 62 5c 04 0d 62 66 11  dd 20 a4 6e 70 78 28 50  |.b\..bf.. .npx(P|
0000d7e0  58 2c 50 59 29 0d 62 70  15 77 31 3d 28 28 50 59  |X,PY).bp.w1=((PY|
0000d7f0  2d 79 31 25 29 2f 63 33  25 29 0d 62 7a 15 77 32  |-y1%)/c3%).bz.w2|
0000d800  3d 28 28 50 58 2d 78 31  25 29 2f 63 34 25 29 0d  |=((PX-x1%)/c4%).|
0000d810  62 84 22 3d 70 78 31 25  2d 28 63 31 25 2a 77 31  |b."=px1%-(c1%*w1|
0000d820  29 2b 28 63 35 25 2b 63  37 25 2a 77 31 29 2a 77  |)+(c5%+c7%*w1)*w|
0000d830  32 0d 62 8e 04 0d 62 98  11 dd 20 a4 6e 70 79 28  |2.b...b... .npy(|
0000d840  50 58 2c 50 59 29 0d 62  a2 22 3d 70 79 31 25 2d  |PX,PY).b."=py1%-|
0000d850  28 63 32 25 2a 77 31 29  2b 28 63 36 25 2b 63 38  |(c2%*w1)+(c6%+c8|
0000d860  25 2a 77 31 29 2a 77 32  0d 62 ac 04 0d 62 b6 0f  |%*w1)*w2.b...b..|
0000d870  dd 20 a4 61 74 6e 28 58  2c 59 29 0d 62 c0 2b e7  |. .atn(X,Y).b.+.|
0000d880  20 94 28 59 29 3e 30 20  8c 20 41 3d 9d 28 99 28  | .(Y)>0 . A=.(.(|
0000d890  58 2f 59 29 29 20 8b 20  41 3d 39 30 2b 31 38 30  |X/Y)) . A=90+180|
0000d8a0  2a 28 58 3c 30 29 0d 62  ca 13 e7 20 59 3c 30 20  |*(X<0).b... Y<0 |
0000d8b0  8c 20 41 3d 41 2b 31 38  30 0d 62 d4 06 3d 41 0d  |. A=A+180.b..=A.|
0000d8c0  62 de 04 0d 62 e8 12 dd  20 a4 72 61 64 69 75 73  |b...b... .radius|
0000d8d0  28 58 2c 59 29 0d 62 f2  0f 3d b6 28 58 5e 32 2b  |(X,Y).b..=.(X^2+|
0000d8e0  59 5e 32 29 0d 62 fc 04  0d 63 06 0b dd f2 73 68  |Y^2).b...c....sh|
0000d8f0  61 70 65 0d 63 10 19 41  3d a4 61 74 6e 28 4d 58  |ape.c..A=.atn(MX|
0000d900  2d 78 33 25 2c 4d 59 2d  79 33 25 29 0d 63 1a 1c  |-x3%,MY-y3%).c..|
0000d910  44 3d a4 72 61 64 69 75  73 28 4d 58 2d 78 33 25  |D=.radius(MX-x3%|
0000d920  2c 4d 59 2d 79 33 25 29  0d 63 24 1f 4f 41 31 3d  |,MY-y3%).c$.OA1=|
0000d930  32 2a 28 9d 28 99 28 94  28 78 73 25 29 2f 94 28  |2*(.(.(.(xs%)/.(|
0000d940  79 73 25 29 29 29 29 0d  63 2e 0f 4f 41 32 3d 31  |ys%)))).c..OA2=1|
0000d950  38 30 2d 4f 41 31 0d 63  38 16 70 78 31 25 3d 78  |80-OA1.c8.px1%=x|
0000d960  33 25 2b 44 2a b5 28 b2  28 41 29 29 0d 63 42 16  |3%+D*.(.(A)).cB.|
0000d970  70 79 31 25 3d 79 33 25  2b 44 2a 9b 28 b2 28 41  |py1%=y3%+D*.(.(A|
0000d980  29 29 0d 63 4c 1a 70 78  32 25 3d 78 33 25 2b 44  |)).cL.px2%=x3%+D|
0000d990  2a b5 28 b2 28 41 2b 4f  41 31 29 29 0d 63 56 1a  |*.(.(A+OA1)).cV.|
0000d9a0  70 79 32 25 3d 79 33 25  2b 44 2a 9b 28 b2 28 41  |py2%=y3%+D*.(.(A|
0000d9b0  2b 4f 41 31 29 29 0d 63  60 1e 70 78 33 25 3d 78  |+OA1)).c`.px3%=x|
0000d9c0  33 25 2b 44 2a b5 28 b2  28 41 2b 4f 41 31 2b 4f  |3%+D*.(.(A+OA1+O|
0000d9d0  41 32 29 29 0d 63 6a 1e  70 79 33 25 3d 79 33 25  |A2)).cj.py3%=y3%|
0000d9e0  2b 44 2a 9b 28 b2 28 41  2b 4f 41 31 2b 4f 41 32  |+D*.(.(A+OA1+OA2|
0000d9f0  29 29 0d 63 74 1a 70 78  34 25 3d 78 33 25 2b 44  |)).ct.px4%=x3%+D|
0000da00  2a b5 28 b2 28 41 2d 4f  41 32 29 29 0d 63 7e 1a  |*.(.(A-OA2)).c~.|
0000da10  70 79 34 25 3d 79 33 25  2b 44 2a 9b 28 b2 28 41  |py4%=y3%+D*.(.(A|
0000da20  2d 4f 41 32 29 29 0d 63  88 0f ec 20 70 78 31 25  |-OA2)).c... px1%|
0000da30  2c 70 79 31 25 0d 63 92  09 e6 20 33 2c 33 0d 63  |,py1%.c... 3,3.c|
0000da40  9c 0f df 20 70 78 32 25  2c 70 79 32 25 0d 63 a6  |... px2%,py2%.c.|
0000da50  0a e6 20 33 2c 36 33 0d  63 b0 0f df 20 70 78 33  |.. 3,63.c... px3|
0000da60  25 2c 70 79 33 25 0d 63  ba 0f df 20 70 78 34 25  |%,py3%.c... px4%|
0000da70  2c 70 79 34 25 0d 63 c4  0f df 20 70 78 31 25 2c  |,py4%.c... px1%,|
0000da80  70 79 31 25 0d 63 ce 05  e1 0d 63 d8 04 0d 63 e2  |py1%.c....c...c.|
0000da90  1d dd 20 a4 66 6f 72 6d  78 28 78 70 6f 73 2c 79  |.. .formx(xpos,y|
0000daa0  70 6f 73 2c 75 70 76 61  6c 29 0d 63 ec 19 72 64  |pos,upval).c..rd|
0000dab0  3d a4 72 61 64 69 75 73  28 78 70 6f 73 2c 79 70  |=.radius(xpos,yp|
0000dac0  6f 73 29 0d 63 f6 19 61  6e 3d b2 28 a4 61 74 6e  |os).c..an=.(.atn|
0000dad0  28 78 70 6f 73 2c 79 70  6f 73 29 29 0d 64 00 10  |(xpos,ypos)).d..|
0000dae0  61 6e 3d 61 6e 2b 6f 66  66 73 65 74 0d 64 0a 1c  |an=an+offset.d..|
0000daf0  3d 6d 78 25 2b b5 28 61  6e 29 2a 72 64 2a 28 78  |=mx%+.(an)*rd*(x|
0000db00  73 32 25 2f 37 32 30 29  0d 64 14 04 0d 64 1e 1d  |s2%/720).d...d..|
0000db10  dd 20 a4 66 6f 72 6d 79  28 78 70 6f 73 2c 79 70  |. .formy(xpos,yp|
0000db20  6f 73 2c 75 70 76 61 6c  29 0d 64 28 32 3d 6d 79  |os,upval).d(2=my|
0000db30  25 2b 9b 28 61 6e 29 2a  72 64 2a 28 79 73 32 25  |%+.(an)*rd*(ys2%|
0000db40  2f 37 32 30 29 2a 9b 28  6c 65 61 6e 29 2b 75 70  |/720)*.(lean)+up|
0000db50  76 61 6c 2a b5 28 6c 65  61 6e 29 0d 64 32 04 0d  |val*.(lean).d2..|
0000db60  64 3c 0f dd 20 a4 62 6f  6c 74 78 28 41 29 0d 64  |d<.. .boltx(A).d|
0000db70  46 11 3d 21 28 78 67 65  74 25 2b 41 2a 34 29 0d  |F.=!(xget%+A*4).|
0000db80  64 50 0f dd 20 a4 62 6f  6c 74 79 28 41 29 0d 64  |dP.. .bolty(A).d|
0000db90  5a 11 3d 21 28 79 67 65  74 25 2b 41 2a 34 29 0d  |Z.=!(yget%+A*4).|
0000dba0  64 64 04 0d 64 6e 11 dd  f2 6f 73 63 6c 69 61 63  |dd..dn...oscliac|
0000dbb0  74 69 6f 6e 0d 64 78 07  ea 20 85 0d 64 82 0e 2a  |tion.dx.. ..d..*|
0000dbc0  50 4f 49 4e 54 45 52 20  30 0d 64 8c 0b 2a 46 58  |POINTER 0.d..*FX|
0000dbd0  20 34 2c 30 0d 64 96 0d  2a 46 58 20 32 32 39 2c  | 4,0.d..*FX 229,|
0000dbe0  30 0d 64 a0 1a c8 99 20  22 4f 53 5f 52 65 73 74  |0.d.... "OS_Rest|
0000dbf0  6f 72 65 43 75 72 73 6f  72 73 22 0d 64 aa 11 f2  |oreCursors".d...|
0000dc00  72 65 73 65 74 5f 61 63  74 69 6f 6e 0d 64 b4 10  |reset_action.d..|
0000dc10  f2 73 65 74 73 6f 66 74  6b 65 79 73 0d 64 be 0d  |.setsoftkeys.d..|
0000dc20  d6 20 75 70 74 72 65 65  25 0d 64 c8 05 f1 0d 64  |. uptree%.d....d|
0000dc30  d2 10 ee 20 85 20 ea 20  f1 3a f1 20 f6 24 0d 64  |... . . .:. .$.d|
0000dc40  dc 05 f5 0d 64 e6 0d e8  20 22 2a 22 6f 75 74 24  |....d... "*"out$|
0000dc50  0d 64 f0 23 e7 20 c0 6f  75 74 24 2c 38 29 3c 3e  |.d.#. .out$,8)<>|
0000dc60  22 4d 45 4e 55 20 4f 46  46 22 20 8c 20 ff 20 6f  |"MENU OFF" . . o|
0000dc70  75 74 24 0d 64 fa 2b fd  20 c0 6f 75 74 24 2c 38  |ut$.d.+. .out$,8|
0000dc80  29 3d 22 4d 45 4e 55 20  4f 46 46 22 20 84 20 eb  |)="MENU OFF" . .|
0000dc90  3c 3e 31 35 20 84 20 6f  75 74 24 3d 22 22 0d 65  |<>15 . out$="".e|
0000dca0  04 12 e7 20 eb 3c 3e 31  35 20 8c 20 eb 20 31 35  |... .<>15 . . 15|
0000dcb0  0d 65 0e 0d 2a 46 58 20  32 32 39 2c 31 0d 65 18  |.e..*FX 229,1.e.|
0000dcc0  19 c8 99 20 22 4f 53 5f  52 65 6d 6f 76 65 43 75  |... "OS_RemoveCu|
0000dcd0  72 73 6f 72 73 22 0d 65  22 1e 21 70 75 74 69 74  |rsors".e".!putit|
0000dce0  25 3d 31 3a d6 20 70 75  74 62 61 63 6b 67 72 6f  |%=1:. putbackgro|
0000dcf0  75 6e 64 25 0d 65 2c 07  f7 20 85 0d 65 36 0c f4  |und%.e,.. ..e6..|
0000dd00  20 56 44 55 20 32 31 0d  65 40 0b 2a 46 58 20 34  | VDU 21.e@.*FX 4|
0000dd10  2c 31 0d 65 4a 12 f2 75  6e 73 65 74 73 6f 66 74  |,1.eJ..unsetsoft|
0000dd20  6b 65 79 73 0d 65 54 0f  f2 70 6f 69 6e 74 28 30  |keys.eT..point(0|
0000dd30  2c 30 29 0d 65 5e 26 e7  20 c0 6f 75 74 24 2c 38  |,0).e^&. .out$,8|
0000dd40  29 3d 22 4d 45 4e 55 20  4f 46 46 22 20 8c 20 ff  |)="MENU OFF" . .|
0000dd50  20 c1 6f 75 74 24 2c 39  29 0d 65 68 2d e7 20 eb  | .out$,9).eh-. .|
0000dd60  3c 3e 31 35 20 8c 20 eb  20 31 35 3a 21 70 75 74  |<>15 . . 15:!put|
0000dd70  69 74 25 3d 31 3a d6 20  70 75 74 62 61 63 6b 67  |it%=1:. putbackg|
0000dd80  72 6f 75 6e 64 25 0d 65  72 0f d6 20 6c 69 66 74  |round%.er.. lift|
0000dd90  64 6f 77 6e 25 0d 65 7c  0b f2 75 70 64 61 74 65  |down%.e|..update|
0000dda0  0d 65 86 05 e1 0d 65 90  04 0d 65 9a 11 dd f2 64  |.e....e...e....d|
0000ddb0  75 6d 70 65 72 65 72 72  6f 72 0d 65 a4 12 50 25  |umpererror.e..P%|
0000ddc0  3d 21 70 72 69 6e 74 6d  65 6e 75 25 0d 65 ae 09  |=!printmenu%.e..|
0000ddd0  5b 4f 50 54 30 0d 65 b8  19 45 51 55 53 22 3c 20  |[OPT0.e..EQUS"< |
0000dde0  50 72 69 6e 74 65 72 20  44 75 6d 70 73 22 0d 65  |Printer Dumps".e|
0000ddf0  c2 11 45 51 55 42 31 3a  45 51 55 42 32 35 35 0d  |..EQUB1:EQUB255.|
0000de00  65 cc 26 45 51 55 53 22  4e 6f 74 20 49 6e 73 74  |e.&EQUS"Not Inst|
0000de10  61 6c 6c 65 64 22 3a 45  51 55 42 20 30 3a 45 51  |alled":EQUB 0:EQ|
0000de20  55 42 20 33 33 0d 65 d6  05 5d 0d 65 e0 05 e1 0d  |UB 33.e..].e....|
0000de30  65 ea 04 0d 65 f4 11 dd  f2 63 68 65 63 6b 64 75  |e...e....checkdu|
0000de40  6d 70 65 72 0d 65 fe 07  ea 20 85 0d 66 08 1c ee  |mper.e... ..f...|
0000de50  20 85 20 ea 20 f2 64 75  6d 70 65 72 65 72 72 6f  | . . .dumpererro|
0000de60  72 3a f7 20 85 3a e1 0d  66 12 12 50 25 3d 21 70  |r:. .:..f..P%=!p|
0000de70  72 69 6e 74 6d 65 6e 75  25 0d 66 1c 20 ff 20 28  |rintmenu%.f. . (|
0000de80  22 53 43 52 45 45 4e 44  55 4d 50 49 44 53 20 26  |"SCREENDUMPIDS &|
0000de90  22 2b c3 7e 28 50 25 29  29 0d 66 26 07 f7 20 85  |"+.~(P%)).f&.. .|
0000dea0  0d 66 30 05 e1 0d 66 3a  04 0d 66 44 12 dd f2 67  |.f0...f:..fD...g|
0000deb0  65 74 72 65 63 74 61 6e  67 6c 65 0d 66 4e 0e c8  |etrectangle.fN..|
0000dec0  8e 20 73 74 65 70 25 20  ca 0d 66 58 14 c9 31 3a  |. step% ..fX..1:|
0000ded0  78 31 25 3d 4d 58 3a 79  31 25 3d 4d 59 0d 66 62  |x1%=MX:y1%=MY.fb|
0000dee0  1f c9 32 3a c8 93 20 78  31 25 2c 79 31 25 2c 4d  |..2:.. x1%,y1%,M|
0000def0  58 2d 78 31 25 2c 4d 59  2d 79 31 25 0d 66 6c 22  |X-x1%,MY-y1%.fl"|
0000df00  c8 96 3a c8 96 3a c8 93  20 78 31 25 2c 79 31 25  |..:..:.. x1%,y1%|
0000df10  2c 4d 58 2d 78 31 25 2c  4d 59 2d 79 31 25 0d 66  |,MX-x1%,MY-y1%.f|
0000df20  76 19 78 73 25 3d 4d 58  2d 78 31 25 3a 79 73 25  |v.xs%=MX-x1%:ys%|
0000df30  3d 4d 59 2d 79 31 25 0d  66 80 11 78 32 25 3d 4d  |=MY-y1%.f..x2%=M|
0000df40  58 3a 79 32 25 3d 4d 59  0d 66 8a 05 cb 0d 66 94  |X:y2%=MY.f....f.|
0000df50  05 e1 0d 66 9e 04 0d 66  a8 0e dd f2 73 6f 72 74  |...f...f....sort|
0000df60  63 6f 72 64 0d 66 b2 11  78 31 25 3d 28 78 31 25  |cord.f..x1%=(x1%|
0000df70  81 32 29 2a 32 0d 66 bc  11 78 32 25 3d 28 78 32  |.2)*2.f..x2%=(x2|
0000df80  25 81 32 29 2a 32 0d 66  c6 11 79 31 25 3d 28 79  |%.2)*2.f..y1%=(y|
0000df90  31 25 81 34 29 2a 34 0d  66 d0 11 79 32 25 3d 28  |1%.4)*4.f..y2%=(|
0000dfa0  79 32 25 81 34 29 2a 34  0d 66 da 2b e7 20 78 31  |y2%.4)*4.f.+. x1|
0000dfb0  25 3e 78 32 25 20 8c 20  74 65 6d 70 25 3d 78 31  |%>x2% . temp%=x1|
0000dfc0  25 3a 78 31 25 3d 78 32  25 3a 78 32 25 3d 74 65  |%:x1%=x2%:x2%=te|
0000dfd0  6d 70 25 0d 66 e4 2b e7  20 79 32 25 3e 79 31 25  |mp%.f.+. y2%>y1%|
0000dfe0  20 8c 20 74 65 6d 70 25  3d 79 32 25 3a 79 32 25  | . temp%=y2%:y2%|
0000dff0  3d 79 31 25 3a 79 31 25  3d 74 65 6d 70 25 0d 66  |=y1%:y1%=temp%.f|
0000e000  ee 1f 78 73 25 3d 78 32  25 2d 78 31 25 2b 33 3a  |..xs%=x2%-x1%+3:|
0000e010  79 73 25 3d 79 32 25 2d  79 31 25 2d 37 0d 66 f8  |ys%=y2%-y1%-7.f.|
0000e020  05 e1 0d 67 02 04 0d 67  0c 14 dd 20 a4 67 63 6f  |...g...g... .gco|
0000e030  6c 28 78 70 25 2c 79 70  25 29 0d 67 16 0f e7 20  |l(xp%,yp%).g... |
0000e040  21 70 6d 25 3c 3e 32 20  8c 0d 67 20 1e e6 20 b0  |!pm%<>2 ..g .. .|
0000e050  78 70 25 2c 79 70 25 29  20 c8 9c 20 c8 9c 28 78  |xp%,yp%) .. ..(x|
0000e060  70 25 2c 79 70 25 29 0d  67 2a 1e 63 6f 6c 25 3d  |p%,yp%).g*.col%=|
0000e070  b0 78 70 25 2c 79 70 25  29 2b c8 9c 28 78 70 25  |.xp%,yp%)+..(xp%|
0000e080  2c 79 70 25 29 0d 67 34  06 3d b9 0d 67 3e 05 cc  |,yp%).g4.=..g>..|
0000e090  0d 67 48 1c 41 25 3d 78  70 25 81 32 3a 42 25 3d  |.gH.A%=xp%.2:B%=|
0000e0a0  28 2d 79 73 25 2d 79 70  25 29 81 34 0d 67 52 10  |(-ys%-yp%).4.gR.|
0000e0b0  d6 20 73 70 72 69 74 65  70 69 78 25 0d 67 5c 11  |. spritepix%.g\.|
0000e0c0  63 6f 6c 25 3d 21 52 45  53 55 4c 54 58 0d 67 66  |col%=!RESULTX.gf|
0000e0d0  10 3d 21 73 70 72 69 74  65 6d 61 73 6b 0d 67 70  |.=!spritemask.gp|
0000e0e0  05 cd 0d 67 7a 04 0d 67  84 10 dd f2 73 70 72 69  |...gz..g....spri|
0000e0f0  74 65 73 6f 72 74 0d 67  8e 11 d6 20 73 70 72 69  |tesort.g... spri|
0000e100  74 65 69 6e 69 74 25 0d  67 98 1d 78 31 25 3d 30  |teinit%.g..x1%=0|
0000e110  3a 79 31 25 3d 34 2a 21  73 70 72 69 6e 74 5f 79  |:y1%=4*!sprint_y|
0000e120  73 69 7a 65 0d 67 a2 17  78 73 25 3d 32 2a 21 73  |size.g..xs%=2*!s|
0000e130  70 72 69 6e 74 5f 78 73  69 7a 65 0d 67 ac 18 79  |print_xsize.g..y|
0000e140  73 25 3d 2d 34 2a 21 73  70 72 69 6e 74 5f 79 73  |s%=-4*!sprint_ys|
0000e150  69 7a 65 0d 67 b6 0b 78  32 25 3d 78 73 25 0d 67  |ize.g..x2%=xs%.g|
0000e160  c0 09 79 32 25 3d 30 0d  67 ca 05 e1 0d 67 d4 04  |..y2%=0.g....g..|
0000e170  0d 67 de 0e dd f2 63 6f  70 79 73 6f 72 74 0d 67  |.g....copysort.g|
0000e180  e8 0c 77 65 64 67 65 25  3d 30 0d 67 f2 0d c8 8e  |..wedge%=0.g....|
0000e190  20 21 70 6d 25 20 ca 0d  67 fc 18 c9 30 2c 31 3a  | !pm% ..g...0,1:|
0000e1a0  f4 20 73 6f 6c 69 64 2c  70 61 74 74 65 72 6e 0d  |. solid,pattern.|
0000e1b0  68 06 0d f2 73 6f 72 74  63 6f 72 64 0d 68 10 0f  |h...sortcord.h..|
0000e1c0  c9 32 3a f4 20 73 70 72  69 74 65 0d 68 1a 0f f2  |.2:. sprite.h...|
0000e1d0  73 70 72 69 74 65 73 6f  72 74 0d 68 24 05 cb 0d  |spritesort.h$...|
0000e1e0  68 2e 05 e1 0d 68 38 04  0d 68 42 29 dd a4 69 6e  |h....h8..hB)..in|
0000e1f0  73 74 72 69 6e 67 28 6d  69 6e 2c 6d 61 78 2c 69  |string(min,max,i|
0000e200  6e 24 2c f8 20 6f 75 74  24 2c 6c 65 6e 67 74 68  |n$,. out$,length|
0000e210  29 0d 68 4c 11 6c 25 3d  21 73 69 7a 65 78 2f 38  |).hL.l%=!sizex/8|
0000e220  2d 32 0d 68 56 0b 2a 46  58 20 34 2c 31 0d 68 60  |-2.hV.*FX 4,1.h`|
0000e230  0d 2a 46 58 20 32 32 39  2c 31 0d 68 6a 11 4f 4d  |.*FX 229,1.hj.OM|
0000e240  58 3d 2d 31 3a 4f 4d 59  3d 2d 31 0d 68 74 20 58  |X=-1:OMY=-1.ht X|
0000e250  50 3d 21 73 74 61 72 74  78 25 2b 36 3a 59 50 3d  |P=!startx%+6:YP=|
0000e260  21 73 74 61 72 74 79 25  2d 34 38 0d 68 7e 0f ec  |!starty%-48.h~..|
0000e270  20 58 50 2c 59 50 3a ef  20 35 0d 68 88 3d 6f 75  | XP,YP:. 5.h.=ou|
0000e280  74 24 3d 69 6e 24 3a 70  6f 73 69 74 25 3d a9 28  |t$=in$:posit%=.(|
0000e290  6f 75 74 24 29 2b 31 3a  6f 66 25 3d 70 6f 73 69  |out$)+1:of%=posi|
0000e2a0  74 25 2d 6c 25 2b 31 3a  e7 20 6f 66 25 3c 31 20  |t%-l%+1:. of%<1 |
0000e2b0  8c 20 6f 66 25 3d 31 0d  68 92 15 e6 20 30 2c 35  |. of%=1.h... 0,5|
0000e2c0  20 c8 9c 20 36 34 3a f1  22 3e 22 3b 0d 68 9c 05  | .. 64:.">";.h..|
0000e2d0  f5 0d 68 a6 0f ec 20 58  50 2b 31 36 2c 59 50 3a  |..h... XP+16,YP:|
0000e2e0  0d 68 b0 2b e6 20 30 2c  28 42 41 43 4b 43 4f 4c  |.h.+. 0,(BACKCOL|
0000e2f0  25 20 80 20 36 33 29 20  c8 9c 20 28 42 41 43 4b  |% . 63) .. (BACK|
0000e300  43 4f 4c 25 20 80 20 31  39 32 29 0d 68 ba 10 f1  |COL% . 192).h...|
0000e310  c4 6c 25 2c bd 28 32 35  35 29 29 0d 68 c4 2b e6  |.l%,.(255)).h.+.|
0000e320  20 30 2c 28 74 65 78 74  63 6f 6c 25 20 80 20 36  | 0,(textcol% . 6|
0000e330  33 29 20 c8 9c 20 28 74  65 78 74 63 6f 6c 25 20  |3) .. (textcol% |
0000e340  80 20 31 39 32 29 0d 68  ce 1d ec 20 58 50 2b 31  |. 192).h... XP+1|
0000e350  36 2c 59 50 3a f1 c1 6f  75 74 24 2c 6f 66 25 2c  |6,YP:..out$,of%,|
0000e360  6c 25 29 0d 68 d8 11 e6  20 33 2c 36 33 20 c8 9c  |l%).h... 3,63 ..|
0000e370  20 31 39 32 0d 68 e2 28  c8 93 20 c8 90 20 58 50  | 192.h.(.. .. XP|
0000e380  2b 28 70 6f 73 69 74 25  2d 6f 66 25 2b 31 29 2a  |+(posit%-of%+1)*|
0000e390  31 36 2c 59 50 2c 31 36  2c 2d 32 38 0d 68 ec 05  |16,YP,16,-28.h..|
0000e3a0  f5 0d 68 f6 0f c8 97 20  44 58 2c 44 59 2c 4d 42  |..h.... DX,DY,MB|
0000e3b0  0d 69 00 2e e7 20 44 58  3c 3e 4f 4d 58 20 84 20  |.i... DX<>OMX . |
0000e3c0  44 59 3c 3e 4f 4d 59 20  8c 20 f2 70 6f 69 6e 74  |DY<>OMY . .point|
0000e3d0  28 30 2c 50 4e 6b 65 79  62 6f 61 72 64 29 0d 69  |(0,PNkeyboard).i|
0000e3e0  0a 0b 41 24 3d bf 28 30  29 0d 69 14 19 e7 20 41  |..A$=.(0).i... A|
0000e3f0  24 3c 3e 22 22 20 8c 20  2a 50 4f 49 4e 54 45 52  |$<>"" . *POINTER|
0000e400  20 30 0d 69 1e 13 fd 20  41 24 3c 3e 22 22 20 84  | 0.i... A$<>"" .|
0000e410  20 4d 42 3e 30 0d 69 28  11 4f 4d 58 3d 44 58 3a  | MB>0.i(.OMX=DX:|
0000e420  4f 4d 59 3d 44 59 0d 69  32 28 c8 93 20 c8 90 20  |OMY=DY.i2(.. .. |
0000e430  58 50 2b 28 70 6f 73 69  74 25 2d 6f 66 25 2b 31  |XP+(posit%-of%+1|
0000e440  29 2a 31 36 2c 59 50 2c  31 36 2c 2d 32 38 0d 69  |)*16,YP,16,-28.i|
0000e450  3c 0e ec 20 58 50 2b 31  36 2c 59 50 0d 69 46 2d  |<.. XP+16,YP.iF-|
0000e460  69 24 3d 22 22 3a e7 20  97 28 41 24 29 3e 6d 69  |i$="":. .(A$)>mi|
0000e470  6e 2d 31 20 80 20 97 28  41 24 29 3c 6d 61 78 2b  |n-1 . .(A$)<max+|
0000e480  31 20 8c 20 69 24 3d 41  24 0d 69 50 17 e7 20 97  |1 . i$=A$.iP.. .|
0000e490  28 41 24 29 3d 31 36 33  20 8c 20 69 24 3d 41 24  |(A$)=163 . i$=A$|
0000e4a0  0d 69 5a 27 e7 20 97 28  41 24 29 3d 32 31 20 8c  |.iZ'. .(A$)=21 .|
0000e4b0  20 6f 75 74 24 3d 22 22  3a 6f 66 25 3d 31 3a 70  | out$="":of%=1:p|
0000e4c0  6f 73 69 74 25 3d 31 0d  69 64 23 e7 20 a9 28 6f  |osit%=1.id#. .(o|
0000e4d0  75 74 24 29 3d 6c 65 6e  67 74 68 20 80 20 69 24  |ut$)=length . i$|
0000e4e0  3c 3e 22 22 20 8c 20 ef  20 37 0d 69 6e 55 e7 20  |<>"" . . 7.inU. |
0000e4f0  69 24 3c 3e 22 22 20 80  20 a9 28 6f 75 74 24 29  |i$<>"" . .(out$)|
0000e500  3c 6c 65 6e 67 74 68 20  8c 20 6f 75 74 24 3d c0  |<length . out$=.|
0000e510  6f 75 74 24 2c 70 6f 73  69 74 25 2d 31 29 2b 41  |out$,posit%-1)+A|
0000e520  24 2b c1 6f 75 74 24 2c  70 6f 73 69 74 25 29 3a  |$+.out$,posit%):|
0000e530  70 6f 73 69 74 25 3d 70  6f 73 69 74 25 2b 31 0d  |posit%=posit%+1.|
0000e540  69 78 11 e7 20 97 28 41  24 29 3d 31 32 37 20 8c  |ix.. .(A$)=127 .|
0000e550  0d 69 82 49 e7 20 70 6f  73 69 74 25 3e 31 20 8c  |.i.I. posit%>1 .|
0000e560  20 6f 75 74 24 3d c0 6f  75 74 24 2c 70 6f 73 69  | out$=.out$,posi|
0000e570  74 25 2d 32 29 2b c1 6f  75 74 24 2c 70 6f 73 69  |t%-2)+.out$,posi|
0000e580  74 25 29 3a 70 6f 73 69  74 25 3d 70 6f 73 69 74  |t%):posit%=posit|
0000e590  25 2d 31 20 8b 20 ef 20  37 0d 69 8c 05 cd 0d 69  |%-1 . . 7.i....i|
0000e5a0  96 21 e7 20 97 28 41 24  29 3d 31 33 36 20 8c 20  |.!. .(A$)=136 . |
0000e5b0  70 6f 73 69 74 25 3d 70  6f 73 69 74 25 2d 31 0d  |posit%=posit%-1.|
0000e5c0  69 a0 21 e7 20 97 28 41  24 29 3d 31 33 37 20 8c  |i.!. .(A$)=137 .|
0000e5d0  20 70 6f 73 69 74 25 3d  70 6f 73 69 74 25 2b 31  | posit%=posit%+1|
0000e5e0  0d 69 aa 20 e7 20 28 70  6f 73 69 74 25 2d 6f 66  |.i. . (posit%-of|
0000e5f0  25 2b 31 29 3e 6c 25 20  8c 20 6f 66 25 2b 3d 31  |%+1)>l% . of%+=1|
0000e600  0d 69 b4 23 e7 20 28 70  6f 73 69 74 25 2d 6f 66  |.i.#. (posit%-of|
0000e610  25 29 3c 34 20 8c 20 6f  66 25 3d 70 6f 73 69 74  |%)<4 . of%=posit|
0000e620  25 2d 34 0d 69 be 13 e7  20 6f 66 25 3c 31 20 8c  |%-4.i... of%<1 .|
0000e630  20 6f 66 25 3d 31 0d 69  c8 19 e7 20 70 6f 73 69  | of%=1.i... posi|
0000e640  74 25 3c 31 20 8c 20 70  6f 73 69 74 25 3d 31 0d  |t%<1 . posit%=1.|
0000e650  69 d2 29 e7 20 70 6f 73  69 74 25 3e a9 28 6f 75  |i.). posit%>.(ou|
0000e660  74 24 29 2b 31 20 8c 20  70 6f 73 69 74 25 3d a9  |t$)+1 . posit%=.|
0000e670  28 6f 75 74 24 29 2b 31  0d 69 dc 13 e7 20 97 28  |(out$)+1.i... .(|
0000e680  41 24 29 3d 32 37 20 8c  20 3d a3 0d 69 e6 0f e7  |A$)=27 . =..i...|
0000e690  20 4d 42 3d 31 20 8c 20  3d a3 0d 69 f0 15 fd 20  | MB=1 . =..i... |
0000e6a0  97 28 41 24 29 3d 31 33  20 84 20 4d 42 3d 34 0d  |.(A$)=13 . MB=4.|
0000e6b0  69 fa 0f ef 20 34 3a 2a  46 58 20 34 2c 30 0d 6a  |i... 4:*FX 4,0.j|
0000e6c0  04 12 3d ac 20 28 a9 28  6f 75 74 24 29 3d 30 29  |..=. (.(out$)=0)|
0000e6d0  0d 6a 0e 04 0d 6a 18 0c  dd f2 73 65 74 63 6f 6c  |.j...j....setcol|
0000e6e0  0d 6a 22 2b e6 20 30 2c  28 74 65 78 74 63 6f 6c  |.j"+. 0,(textcol|
0000e6f0  25 20 80 20 36 33 29 20  c8 9c 20 28 74 65 78 74  |% . 63) .. (text|
0000e700  63 6f 6c 25 20 80 20 31  39 32 29 0d 6a 2c 2f e6  |col% . 192).j,/.|
0000e710  20 30 2c 31 32 38 2b 28  42 41 43 4b 43 4f 4c 25  | 0,128+(BACKCOL%|
0000e720  20 80 20 36 33 29 20 c8  9c 20 28 42 41 43 4b 43  | . 63) .. (BACKC|
0000e730  4f 4c 25 20 80 20 31 39  32 29 0d 6a 36 05 e1 0d  |OL% . 192).j6...|
0000e740  6a 40 04 0d 6a 4a 10 dd  f2 70 6f 69 6e 74 28 4c  |j@..jJ...point(L|
0000e750  2c 4e 29 0d 6a 54 10 50  25 3d 50 4f 25 2b 4e 2a  |,N).jT.P%=PO%+N*|
0000e760  32 36 37 0d 6a 5e 26 c8  99 20 26 34 30 30 44 38  |267.j^&.. &400D8|
0000e770  2c 32 2c 50 25 2b 31 31  2c 33 32 2c 33 32 2c 50  |,2,P%+11,32,32,P|
0000e780  25 3f 39 2c 50 25 3f 31  30 0d 6a 68 19 c8 97 20  |%?9,P%?10.jh... |
0000e790  fb 20 31 2c 50 25 3f 30  2c 50 25 3f 31 2c 50 25  |. 1,P%?0,P%?1,P%|
0000e7a0  3f 32 0d 6a 72 19 c8 97  20 fb 20 32 2c 50 25 3f  |?2.jr... . 2,P%?|
0000e7b0  33 2c 50 25 3f 34 2c 50  25 3f 35 0d 6a 7c 19 c8  |3,P%?4,P%?5.j|..|
0000e7c0  97 20 fb 20 33 2c 50 25  3f 36 2c 50 25 3f 37 2c  |. . 3,P%?6,P%?7,|
0000e7d0  50 25 3f 38 0d 6a 86 1b  ff 20 22 46 58 20 31 30  |P%?8.j... "FX 10|
0000e7e0  36 2c 22 2b c3 28 32 20  84 20 4c 3c 3c 37 29 0d  |6,"+.(2 . L<<7).|
0000e7f0  6a 90 05 e1 0d 6a 9a 04  0d 6a a4 1d dd 20 a4 62  |j....j...j... .b|
0000e800  75 69 6c 64 5f 66 6f 72  6d 75 6c 61 28 41 24 2c  |uild_formula(A$,|
0000e810  70 6f 73 25 29 0d 6a ae  2f f4 20 41 24 3d 65 76  |pos%).j./. A$=ev|
0000e820  61 6c 20 6f 66 20 74 68  65 20 66 6f 72 6d 75 6c  |al of the formul|
0000e830  61 2c 70 6f 73 3d 66 6f  72 6d 75 6c 61 20 6e 75  |a,pos=formula nu|
0000e840  6d 62 65 72 0d 6a b8 07  ea 20 85 0d 6a c2 10 ee  |mber.j... ..j...|
0000e850  20 85 20 ea 20 f7 20 85  3a 3d a3 0d 6a cc 0f e3  | . . . .:=..j...|
0000e860  20 59 25 3d 30 20 b8 20  32 30 0d 6a d6 0f e3 20  | Y%=0 . 20.j... |
0000e870  58 25 3d 30 20 b8 20 32  30 0d 6a e0 10 58 44 3d  |X%=0 . 20.j..XD=|
0000e880  58 25 2a 33 36 2d 33 36  30 0d 6a ea 10 59 44 3d  |X%*36-360.j..YD=|
0000e890  59 25 2a 33 36 2d 33 36  30 0d 6a f4 15 58 52 3d  |Y%*36-360.j..XR=|
0000e8a0  b2 28 58 44 29 3a 59 52  3d b2 28 59 44 29 0d 6a  |.(XD):YR=.(YD).j|
0000e8b0  fe 10 41 3d 28 a0 28 41  24 29 3c 3c 38 29 0d 6b  |..A=(.(A$)<<8).k|
0000e8c0  08 25 21 28 73 6b 65 6c  25 2b 70 6f 73 25 2a 31  |.%!(skel%+pos%*1|
0000e8d0  37 36 34 2b 28 58 25 2b  32 31 2a 59 25 29 2a 34  |764+(X%+21*Y%)*4|
0000e8e0  29 3d 41 0d 6b 12 05 ed  0d 6b 1c 05 ed 0d 6b 26  |)=A.k....k....k&|
0000e8f0  07 f7 20 85 0d 6b 30 06  3d b9 0d 6b 3a 04 0d 6b  |.. ..k0.=..k:..k|
0000e900  44 1d dd f2 66 6f 72 6d  75 6c 61 5f 6c 6f 61 64  |D...formula_load|
0000e910  28 66 69 6c 65 6e 61 6d  65 24 29 0d 6b 4e 28 f4  |(filename$).kN(.|
0000e920  20 72 65 61 64 73 20 61  6e 64 20 64 65 73 63 69  | reads and desci|
0000e930  66 65 72 73 20 61 20 66  6f 72 6d 75 6c 61 20 6c  |fers a formula l|
0000e940  69 73 74 0d 6b 58 28 c8  99 20 22 4f 53 5f 46 69  |ist.kX(.. "OS_Fi|
0000e950  6e 64 22 2c 26 34 30 2c  66 69 6c 65 6e 61 6d 65  |nd",&40,filename|
0000e960  24 20 b8 20 68 61 6e 64  6c 65 25 0d 6b 62 0f 66  |$ . handle%.kb.f|
0000e970  6f 72 6d 75 6c 61 73 25  3d 31 0d 6b 6c 11 50 25  |ormulas%=1.kl.P%|
0000e980  3d 66 6f 72 6d 6e 61 6d  65 73 25 0d 6b 76 0a 5b  |=formnames%.kv.[|
0000e990  4f 50 54 20 30 0d 6b 80  0a 45 51 55 42 20 37 0d  |OPT 0.k..EQUB 7.|
0000e9a0  6b 8a 0b 45 51 55 42 20  31 30 0d 6b 94 15 45 51  |k..EQUB 10.k..EQ|
0000e9b0  55 53 20 22 44 65 66 69  6e 65 61 62 6c 65 22 0d  |US "Defineable".|
0000e9c0  6b 9e 05 5d 0d 6b a8 2e  6e 61 6d 65 24 3d 22 22  |k..].k..name$=""|
0000e9d0  3a 66 6f 72 6d 75 6c 61  73 24 28 66 6f 72 6d 75  |:formulas$(formu|
0000e9e0  6c 61 73 25 2d 31 29 3d  22 22 3a 70 61 73 74 25  |las%-1)="":past%|
0000e9f0  3d a3 0d 6b b2 05 f5 0d  6b bc 34 c8 99 20 22 4f  |=..k....k.4.. "O|
0000ea00  53 5f 47 42 50 42 22 2c  34 2c 68 61 6e 64 6c 65  |S_GBPB",4,handle|
0000ea10  25 2c 6c 6f 67 5f 73 63  61 6c 65 25 2c 31 20 b8  |%,log_scale%,1 .|
0000ea20  20 2c 2c 2c 66 69 6e 69  73 68 25 0d 6b c6 26 62  | ,,,finish%.k.&b|
0000ea30  25 3d 3f 6c 6f 67 5f 73  63 61 6c 65 25 3a 63 72  |%=?log_scale%:cr|
0000ea40  25 3d 28 62 25 3d 31 30  20 84 20 62 25 3d 31 33  |%=(b%=10 . b%=13|
0000ea50  29 0d 6b d0 0b e7 20 63  72 25 20 8c 0d 6b da 0d  |).k... cr% ..k..|
0000ea60  e7 20 70 61 73 74 25 20  8c 0d 6b e4 6f e7 20 a4  |. past% ..k.o. .|
0000ea70  62 75 69 6c 64 5f 66 6f  72 6d 75 6c 61 28 66 6f  |build_formula(fo|
0000ea80  72 6d 75 6c 61 73 24 28  66 6f 72 6d 75 6c 61 73  |rmulas$(formulas|
0000ea90  25 2d 31 29 2c 66 6f 72  6d 75 6c 61 73 25 29 20  |%-1),formulas%) |
0000eaa0  8c 20 3f 50 25 3d a9 28  6e 61 6d 65 24 29 3a 50  |. ?P%=.(name$):P|
0000eab0  25 2b 3d 31 3a 24 50 25  3d 6e 61 6d 65 24 3a 50  |%+=1:$P%=name$:P|
0000eac0  25 2b 3d a9 28 6e 61 6d  65 24 29 3a 66 6f 72 6d  |%+=.(name$):form|
0000ead0  75 6c 61 73 25 2b 3d 31  0d 6b ee 05 cd 0d 6b f8  |ulas%+=1.k....k.|
0000eae0  2e 6e 61 6d 65 24 3d 22  22 3a 66 6f 72 6d 75 6c  |.name$="":formul|
0000eaf0  61 73 24 28 66 6f 72 6d  75 6c 61 73 25 2d 31 29  |as$(formulas%-1)|
0000eb00  3d 22 22 3a 70 61 73 74  25 3d a3 0d 6c 02 05 cc  |="":past%=..l...|
0000eb10  0d 6c 0c 2b e7 20 70 61  73 74 25 20 8c 20 66 6f  |.l.+. past% . fo|
0000eb20  72 6d 75 6c 61 73 24 28  66 6f 72 6d 75 6c 61 73  |rmulas$(formulas|
0000eb30  25 2d 31 29 2b 3d bd 28  62 25 29 0d 6c 16 19 e7  |%-1)+=.(b%).l...|
0000eb40  20 62 25 3d 97 28 22 24  22 29 20 8c 20 70 61 73  | b%=.("$") . pas|
0000eb50  74 25 3d b9 0d 6c 20 1c  e7 20 ac 20 70 61 73 74  |t%=..l .. . past|
0000eb60  25 20 8c 20 6e 61 6d 65  24 2b 3d bd 28 62 25 29  |% . name$+=.(b%)|
0000eb70  0d 6c 2a 05 cd 0d 6c 34  0f fd 20 66 69 6e 69 73  |.l*...l4.. finis|
0000eb80  68 25 3d 31 0d 6c 3e 19  3f 66 6f 72 6d 6e 61 6d  |h%=1.l>.?formnam|
0000eb90  65 73 25 3d 66 6f 72 6d  75 6c 61 73 25 0d 6c 48  |es%=formulas%.lH|
0000eba0  1c c8 99 20 22 4f 53 5f  46 69 6e 64 22 2c 26 30  |... "OS_Find",&0|
0000ebb0  30 2c 68 61 6e 64 6c 65  25 0d 6c 52 05 e1 0d 6c  |0,handle%.lR...l|
0000ebc0  5c 04 0d 6c 66 0c dd f2  75 70 64 61 74 65 0d 6c  |\..lf...update.l|
0000ebd0  70 2b e7 20 28 6d 67 73  20 80 20 6d 6f 75 73 65  |p+. (mgs . mouse|
0000ebe0  67 72 69 64 3e 32 29 20  84 20 6d 63 73 20 8c 20  |grid>2) . mcs . |
0000ebf0  6c 3d 31 20 8b 20 6c 3d  30 0d 6c 7a 0d c8 8e 20  |l=1 . l=0.lz... |
0000ec00  21 41 63 25 20 ca 0d 6c  84 19 c9 31 32 3a f2 70  |!Ac% ..l...12:.p|
0000ec10  6f 69 6e 74 28 6c 2c 50  4e 67 6c 61 73 73 29 0d  |oint(l,PNglass).|
0000ec20  6c 8e 28 c9 31 33 3a f2  70 6f 69 6e 74 28 6c 2c  |l.(.13:.point(l,|
0000ec30  50 4e 66 6c 6f 6f 64 29  3a d6 20 6d 6f 75 73 65  |PNflood):. mouse|
0000ec40  63 6f 6c 6f 75 72 25 0d  6c 98 2e c9 32 31 2c 33  |colour%.l...21,3|
0000ec50  33 2c 33 34 3a f2 70 6f  69 6e 74 28 6c 2c 50 4e  |3,34:.point(l,PN|
0000ec60  73 70 72 61 79 29 3a d6  20 6d 6f 75 73 65 63 6f  |spray):. mouseco|
0000ec70  6c 6f 75 72 25 0d 6c a2  1f c9 33 37 2c 33 38 3a  |lour%.l...37,38:|
0000ec80  f2 70 6f 69 6e 74 28 6c  2c 50 4e 73 70 72 69 74  |.point(l,PNsprit|
0000ec90  65 6f 70 29 0d 6c ac 1f  c9 33 31 2c 33 32 2c 33  |eop).l...31,32,3|
0000eca0  35 3a f2 70 6f 69 6e 74  28 6c 2c 50 4e 62 72 75  |5:.point(l,PNbru|
0000ecb0  73 68 29 0d 6c b6 19 c9  34 31 3a f2 70 6f 69 6e  |sh).l...41:.poin|
0000ecc0  74 28 30 2c 50 4e 73 70  72 61 79 29 0d 6c c0 15  |t(0,PNspray).l..|
0000ecd0  c9 35 39 3a f2 70 6f 69  6e 74 28 6c 2c 50 4e 41  |.59:.point(l,PNA|
0000ece0  29 0d 6c ca 27 7f 3a f2  70 6f 69 6e 74 28 6c 2c  |).l.'.:.point(l,|
0000ecf0  50 4e 6e 6f 72 6d 61 6c  29 3a d6 20 6d 6f 75 73  |PNnormal):. mous|
0000ed00  65 63 6f 6c 6f 75 72 25  0d 6c d4 05 cb 0d 6c de  |ecolour%.l....l.|
0000ed10  05 e1 0d 6c e8 04 0d 6c  f2 0e dd f2 65 72 72 6f  |...l...l....erro|
0000ed20  72 5f 61 74 0d 6c fc 08  ef 20 32 36 0d 6d 06 0c  |r_at.l... 26.m..|
0000ed30  e7 20 9f 3d 31 37 20 8c  0d 6d 10 1f 73 74 65 70  |. .=17 ..m..step|
0000ed40  25 3d 31 3a f2 70 6f 69  6e 74 28 30 2c 50 4e 73  |%=1:.point(0,PNs|
0000ed50  74 6f 70 70 65 64 29 0d  6d 1a 0f d6 20 6c 69 66  |topped).m... lif|
0000ed60  74 64 6f 77 6e 25 0d 6d  24 14 e3 20 52 25 3d 30  |tdown%.m$.. R%=0|
0000ed70  20 b8 20 32 30 30 30 30  3a ed 0d 6d 2e 0b f2 75  | . 20000:..m...u|
0000ed80  70 64 61 74 65 0d 6d 38  05 e1 0d 6d 42 05 cd 0d  |pdate.m8...mB...|
0000ed90  6d 4c 2d e7 20 21 6c 61  73 74 6d 65 6e 75 3d 31  |mL-. !lastmenu=1|
0000eda0  32 20 84 20 21 6c 61 73  74 6d 65 6e 75 3d 33 30  |2 . !lastmenu=30|
0000edb0  20 8c 20 d6 20 75 70 74  72 65 65 25 0d 6d 56 07  | . . uptree%.mV.|
0000edc0  ef 20 37 0d 6d 60 10 c8  8e 20 74 65 73 74 69 6e  |. 7.m`... testin|
0000edd0  67 20 ca 0d 6d 6a 46 c9  a3 3a f2 65 72 72 6f 72  |g ..mjF..:.error|
0000ede0  68 61 6e 64 6c 65 28 31  2c 22 41 6e 20 45 72 72  |handle(1,"An Err|
0000edf0  6f 72 20 48 61 73 20 4f  63 63 75 72 65 64 2c 7c  |or Has Occured,||
0000ee00  22 2b f6 24 2c 22 43 6f  6e 74 69 6e 75 65 22 2c  |"+.$,"Continue",|
0000ee10  73 65 6c 65 63 74 65 64  29 0d 6d 74 75 c9 b9 3a  |selected).mtu..:|
0000ee20  f2 65 72 72 6f 72 68 61  6e 64 6c 65 28 33 2c 22  |.errorhandle(3,"|
0000ee30  41 6e 20 45 72 72 6f 72  20 48 61 73 20 4f 63 63  |An Error Has Occ|
0000ee40  75 72 65 64 2c 7c 22 2b  f6 24 2b 22 7c 41 74 20  |ured,|"+.$+"|At |
0000ee50  6c 69 6e 65 20 22 2b c3  28 9e 29 2c 22 45 64 69  |line "+.(.),"Edi|
0000ee60  74 20 54 68 69 73 20 4c  69 6e 65 7c 45 64 69 74  |t This Line|Edit|
0000ee70  20 4c 61 73 74 20 4c 69  6e 65 7c 43 6f 6e 74 69  | Last Line|Conti|
0000ee80  6e 75 65 22 2c 73 65 6c  65 63 74 65 64 29 0d 6d  |nue",selected).m|
0000ee90  7e 0c 2a 46 58 20 31 35  2c 30 0d 6d 88 37 e7 20  |~.*FX 15,0.m.7. |
0000eea0  73 65 6c 65 63 74 65 64  3d 31 20 8c 20 f2 73 74  |selected=1 . .st|
0000eeb0  72 69 6e 67 5f 74 6f 5f  62 75 66 66 65 72 28 22  |ring_to_buffer("|
0000eec0  45 44 2e 20 22 2b c3 28  9e 29 2b bd 28 31 33 29  |ED. "+.(.)+.(13)|
0000eed0  29 0d 6d 92 32 e7 20 73  65 6c 65 63 74 65 64 3d  |).m.2. selected=|
0000eee0  32 20 8c 20 f2 73 74 72  69 6e 67 5f 74 6f 5f 62  |2 . .string_to_b|
0000eef0  75 66 66 65 72 28 22 45  44 2e 2e 22 2b bd 28 31  |uffer("ED.."+.(1|
0000ef00  33 29 29 0d 6d 9c 21 e7  20 73 65 6c 65 63 74 65  |3)).m.!. selecte|
0000ef10  64 3d 31 20 84 20 73 65  6c 65 63 74 65 64 3d 32  |d=1 . selected=2|
0000ef20  20 8c 20 e0 0d 6d a6 05  cb 0d 6d b0 0b 73 74 65  | . ..m....m..ste|
0000ef30  70 25 3d 31 0d 6d ba 3b  e7 20 21 6c 61 73 74 6d  |p%=1.m.;. !lastm|
0000ef40  65 6e 75 3c 3e 31 20 80  20 21 6c 61 73 74 6d 65  |enu<>1 . !lastme|
0000ef50  6e 75 3c 3e 39 20 8c 20  21 70 72 65 73 65 6e 74  |nu<>9 . !present|
0000ef60  6d 65 6e 75 25 3d 21 6c  61 73 74 6d 65 6e 75 0d  |menu%=!lastmenu.|
0000ef70  6d c4 05 e1 0d 6d ce 04  0d 6d d8 32 dd f2 65 72  |m....m...m.2..er|
0000ef80  72 6f 72 68 61 6e 64 6c  65 28 4e 2c 6d 65 73 73  |rorhandle(N,mess|
0000ef90  61 67 65 24 2c 71 75 65  73 74 69 6f 6e 24 2c f8  |age$,question$,.|
0000efa0  20 73 65 6c 65 63 74 65  64 29 0d 6d e2 28 e7 20  | selected).m.(. |
0000efb0  eb 3c 3e 31 35 20 8c 20  eb 20 31 35 3a c8 99 20  |.<>15 . . 15:.. |
0000efc0  22 4f 53 5f 52 65 6d 6f  76 65 43 75 72 73 6f 72  |"OS_RemoveCursor|
0000efd0  73 22 0d 6d ec 0c 2a 46  58 32 32 39 2c 31 0d 6d  |s".m..*FX229,1.m|
0000efe0  f6 18 f2 70 6f 69 6e 74  28 30 2c 50 4e 71 75 65  |...point(0,PNque|
0000eff0  73 74 69 6f 6e 29 0d 6e  00 19 c8 97 20 c8 93 20  |stion).n.... .. |
0000f000  32 35 36 2c 33 33 31 2c  37 36 38 2c 33 37 32 0d  |256,331,768,372.|
0000f010  6e 0a 1a 41 25 3d 4e 3a  d6 20 64 72 61 77 5f 65  |n..A%=N:. draw_e|
0000f020  72 72 6f 72 5f 62 6f 78  25 0d 6e 14 14 ef 20 32  |rror_box%.n... 2|
0000f030  38 2c 33 32 2c 31 39 2c  35 39 2c 31 32 0d 6e 1e  |8,32,19,59,12.n.|
0000f040  2d fb 20 31 32 38 2b 28  42 41 43 4b 43 4f 4c 25  |-. 128+(BACKCOL%|
0000f050  20 80 20 36 33 29 20 c8  9c 20 28 42 41 43 4b 43  | . 63) .. (BACKC|
0000f060  4f 4c 25 20 80 20 31 39  32 29 0d 6e 28 29 fb 20  |OL% . 192).n(). |
0000f070  28 74 65 78 74 63 6f 6c  25 20 80 20 36 33 29 20  |(textcol% . 63) |
0000f080  c8 9c 20 28 74 65 78 74  63 6f 6c 25 20 80 20 31  |.. (textcol% . 1|
0000f090  39 32 29 0d 6e 32 18 f2  73 74 72 68 61 6e 64 6c  |92).n2..strhandl|
0000f0a0  65 28 6d 65 73 73 61 67  65 24 29 0d 6e 3c 1d c8  |e(message$).n<..|
0000f0b0  99 20 22 4f 53 5f 50 72  65 74 74 79 50 72 69 6e  |. "OS_PrettyPrin|
0000f0c0  74 22 2c 42 55 46 46 25  0d 6e 46 0f fb 20 36 33  |t",BUFF%.nF.. 63|
0000f0d0  20 c8 9c 20 31 39 32 0d  6e 50 0b f1 8a 30 2c 35  | .. 192.nP...0,5|
0000f0e0  29 3b 0d 6e 5a 1e f2 73  74 72 68 61 6e 64 6c 65  |);.nZ..strhandle|
0000f0f0  28 71 75 65 73 74 69 6f  6e 24 2b 22 20 3f 22 29  |(question$+" ?")|
0000f100  0d 6e 64 1d c8 99 20 22  4f 53 5f 50 72 65 74 74  |.nd... "OS_Prett|
0000f110  79 50 72 69 6e 74 22 2c  42 55 46 46 25 0d 6e 6e  |yPrint",BUFF%.nn|
0000f120  0e f2 42 55 54 4f 46 46  28 37 29 0d 6e 78 05 f5  |..BUTOFF(7).nx..|
0000f130  0d 6e 82 10 c8 97 20 44  58 2c 44 59 2c 43 68 42  |.n.... DX,DY,ChB|
0000f140  0d 6e 8c 6e e7 20 43 68  42 3e 30 20 80 20 44 58  |.n.n. ChB>0 . DX|
0000f150  3e 33 30 38 20 80 20 44  58 3c 34 36 33 20 80 20  |>308 . DX<463 . |
0000f160  44 59 3c 36 35 33 20 80  20 44 59 3e 35 31 36 20  |DY<653 . DY>516 |
0000f170  80 20 43 68 42 3c 3e 32  20 8c 20 21 70 72 65 73  |. ChB<>2 . !pres|
0000f180  65 6e 74 6d 65 6e 75 25  3d 30 3a 21 6c 61 73 74  |entmenu%=0:!last|
0000f190  6d 65 6e 75 3d 30 3a 43  68 42 3d 32 3a 21 74 72  |menu=0:ChB=2:!tr|
0000f1a0  65 65 70 6f 73 3d 30 3a  21 41 63 25 3d 30 0d 6e  |eepos=0:!Ac%=0.n|
0000f1b0  96 39 fd 20 43 68 42 3d  32 20 84 20 28 43 68 42  |.9. ChB=2 . (ChB|
0000f1c0  3e 30 20 80 20 44 58 3e  33 30 30 20 80 20 44 58  |>0 . DX>300 . DX|
0000f1d0  3c 34 37 34 20 80 20 44  59 3c 34 38 34 20 80 20  |<474 . DY<484 . |
0000f1e0  44 59 3e 33 36 38 29 0d  6e a0 0e f2 42 55 54 4f  |DY>368).n...BUTO|
0000f1f0  46 46 28 37 29 0d 6e aa  12 d6 20 75 6e 64 6f 72  |FF(7).n... undor|
0000f200  65 73 74 6f 72 65 25 0d  6e b4 0b f2 75 70 64 61  |estore%.n...upda|
0000f210  74 65 0d 6e be 0f d6 20  6c 69 66 74 64 6f 77 6e  |te.n... liftdown|
0000f220  25 0d 6e c8 12 ef 35 3a  d6 20 68 65 6c 70 74 65  |%.n...5:. helpte|
0000f230  78 74 25 0d 6e d2 18 46  25 3d 73 74 65 70 25 3a  |xt%.n..F%=step%:|
0000f240  d6 20 68 65 6c 70 73 74  65 70 25 0d 6e dc 20 73  |. helpstep%.n. s|
0000f250  65 6c 65 63 74 65 64 3d  a8 28 28 34 38 34 2d 44  |elected=.((484-D|
0000f260  59 29 2f 31 32 30 2a 4e  29 2b 31 0d 6e e6 23 e7  |Y)/120*N)+1.n.#.|
0000f270  20 43 68 42 3d 32 20 8c  20 65 6e 74 65 72 25 3d  | ChB=2 . enter%=|
0000f280  31 30 3a 73 65 6c 65 63  74 65 64 3d 2d 31 0d 6e  |10:selected=-1.n|
0000f290  f0 05 e1 0d 6e fa 04 0d  6f 04 18 dd f2 73 74 72  |....n...o....str|
0000f2a0  68 61 6e 64 6c 65 28 73  74 72 69 6e 67 24 29 0d  |handle(string$).|
0000f2b0  6f 0e 0b 6f 75 74 24 3d  22 22 0d 6f 18 16 e3 20  |o..out$="".o... |
0000f2c0  52 3d 31 20 b8 20 a9 28  73 74 72 69 6e 67 24 29  |R=1 . .(string$)|
0000f2d0  0d 6f 22 15 63 68 24 3d  c1 73 74 72 69 6e 67 24  |.o".ch$=.string$|
0000f2e0  2c 52 2c 31 29 0d 6f 2c  19 e7 20 63 68 24 3d 22  |,R,1).o,.. ch$="|
0000f2f0  7c 22 20 8c 20 63 68 24  3d bd 28 31 33 29 0d 6f  ||" . ch$=.(13).o|
0000f300  36 11 6f 75 74 24 3d 6f  75 74 24 2b 63 68 24 0d  |6.out$=out$+ch$.|
0000f310  6f 40 05 ed 0d 6f 4a 14  24 42 55 46 46 25 3d 6f  |o@...oJ.$BUFF%=o|
0000f320  75 74 24 2b bd 28 30 29  0d 6f 54 05 e1 0d 6f 5e  |ut$+.(0).oT...o^|
0000f330  04 0d 6f 68 18 dd f2 73  65 74 6c 69 6d 69 74 73  |..oh...setlimits|
0000f340  28 4c 4d 58 2c 4c 4d 59  29 0d 6f 72 12 6d 72 63  |(LMX,LMY).or.mrc|
0000f350  74 78 31 25 3d 2d 4c 4d  58 2b 32 0d 6f 7c 12 6d  |tx1%=-LMX+2.o|.m|
0000f360  72 63 74 79 31 25 3d 2d  4c 4d 59 2b 34 0d 6f 86  |rcty1%=-LMY+4.o.|
0000f370  14 6d 72 63 74 78 32 25  3d 31 32 37 37 2b 4c 4d  |.mrctx2%=1277+LM|
0000f380  58 0d 6f 90 14 6d 72 63  74 79 32 25 3d 31 30 31  |X.o..mrcty2%=101|
0000f390  39 2b 4c 4d 59 0d 6f 9a  05 e1 0d ff              |9+LMY.o.....|
0000f39c