>!RunImage taskname$="Solutions" dirname$="" iconname$="!Solutions" menuname$="Solns" nagg( $+" at line "+ taskid% 8:$taskid%="TASK" "Wimp_Initialise",200,!taskid%,taskname$ version%,taskhand% block% 1024,menu% 127,command% 80,wblk% 2048 "Hourglass_On" sprites templates setupmenu initsol iconid%= "Hourglass_Off" "Wimp_Poll",1,block% reason% reason% 2 : "Wimp_OpenWindow",,block% 1 : "Wimp_RedrawWindow",,block% 3 : "Wimp_CloseWindow",,block% 9 : !block%=1 block%!4=-1 savestatus: 6 : iconclicked(block%!12,block%!16) 8 : keypressed(block%!24) 17,18: keypressed(code%) "Wimp_ProcessKey",code% nagg(nagg$) "Wimp_ReportError"," "+nagg$,1<<4,taskname$ iconclicked(window%,icon%) window%<0 icon%=iconid% click_type: (block%!8)=2 popupmenu((icon%=iconid%) (window%=-2)): window%<>main% icon%>7 icon%<10 move(icon%=9) block%!0=-1 block%!4=0 block%!8=0 : Y DIRECTION 7 block%!12=74 : X DIRECTION block%!16=96 block%!20=&2002 $(block%+24)=iconname$ "Wimp_CreateIcon",,block% icon% =icon% nagg("Error in death throes!"): b%=1 (b%?fontarray%)>0 B i%=1 (b%?fontarray%) "Font_LoseFont",b% D "Wimp_CloseDown",taskhand%,!taskid% click_type c%=block%!8 c%=4 select c%=2 popupmenu( c%=1 adjust block%!16=0 savestatus: file(where%) file$="" ?where% file$+= (?where%) where%+=1 =file$ setupmenu _4$menu%=menuname$: : menu title `Emenu%?12=7:menu%?13=2 : title foreground & background aEmenu%?14=7:menu%?15=0 : menu foreground & background (menuname$)>5 c" menu%!16=( (menuname$)+1)*16 menu%!16=6*16 g2menu%!20=44 : width & height of items h@menu%!24=0 : vertical gap twixt items menu%!28=0 menu%!32=inf_win% menu%!36=&7000021 $(menu%+40)="Info" menu%!52=128 menu%!56=-1 menu%!60=&7000021 $(menu%+64)="Quit" popupmenu(bar%) "Wimp_GetPointerInfo",,block% q=!block%:w=block%!4 bar% w=96+44+44 w+=22 "Wimp_CreateMenu",,menu%,q-64,w templates fontarray% 256 b%=0 252 b%!fontarray%=0 infb% 600,infi% 200 mainb% 1024,maini% 512 "Wimp_OpenTemplate",,dirname$+"." :inf_win%= template("info",infb%,infi%,200,-1,sprites%) line$<>"" sys$(solnum%)+= line$,1) line$= line$, (line$)-1) . line$= line$, (line$)-1) : skip the TAB plan$(solnum%)="" line$,1)<> line$<>"" ! plan$(solnum%)+= line$,1) line$= line$, (line$)-1) ; line$= line$, (line$)-1) : skip the TAB (if present) line$<>"" shape$(solnum%)=line$ shape$(solnum%)="n/a" #file% file%= (dirname$+".notedat") file%=0 nagg("Where're my resources!"): #file% line$= #file% !* notenum%= (line$):note$(notenum%)="" note$= #file% $$ note$(notenum%)+=(note$+" ") #file% note$="" note$(solnum%),1)=" " '; note$(solnum%)= note$(solnum%), (note$(solnum%))-1) #file% file%= (dirname$+".status") file% currentclue%= #file%: #file% clue(currentclue%) clue(num%) pii(main%,7, (num%)) pii(main%,2,sys$(num%)) pii(main%,11,shape$(num%)) pii(main%,4,plan$(num%)) contents(main%,6)<>note$(num%) pii(main%,6,note$(num%)) savestatus ?block%=currentclue% "XOS_CLI","SAVE "+dirname$+".status "+ ~block%+" +1" "XOS_CLI","STAMP "+dirname$+".status" move(dir%) dir%=0 dir%=1 currentclue%+dir%>0 currentclue%+dir%<101 currentclue%+=dir%: clue(currentclue%)