Home » Archimedes archive » Archimedes World » AW-1996-06-Disc 1.adf » !SwiftJPEG_SwiftJPEG » !SwiftJPEG/Resources/Source
!SwiftJPEG/Resources/Source
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Archimedes archive » Archimedes World » AW-1996-06-Disc 1.adf » !SwiftJPEG_SwiftJPEG |
Filename: | !SwiftJPEG/Resources/Source |
Read OK: | ✔ |
File size: | 73DA bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
1REM > !RunImage for !SwiftJPEG 2REM 3REM A fast JPEG viewer using Acorn's 4REM SpriteExtend module from RISC OS 5REM v3.6 or later (module version 6REM 0.99 or later). 7REM 8REM This source code may not run with 9REM the WimpSlot allocated to the 10REM crunched !RunImage; you may need 11REM to increase the slot by the 12REM difference in file size, rounded 13REM up to a 4K block. 14REM 15REM (C) Hipposoft 1995 16 17ON ERROR:ON ERROR OFF:PROCclosechoices:PROCrestoremode:SYS "Hourglass_Smash":PROCexit:ERROR ERR,REPORT$+" (at line "+STR$(ERL)+")":END 18 19choicefh%=0 20returnto%=-1 21DIM b% 256 22!b%=3 23b%!4=5 24b%!8=&400C1 25b%!12=0 26SYS "Wimp_Initialise",350,&4B534154,"SwiftJPEG",b% TO wimp%,task% 27 28IF wimp%<350 THEN ERROR 490,"SwiftJPEG requires RISC OS 3.50 or later to run" 29 30SYS "Hourglass_Start",50 31 32version$="0.06 (09 Nov 95)" 33 34PROCinitialisemain 35PROCiconbar 36 37SYS "Hourglass_Off" 38 39PROCgetp(a$) 40IF a$<>"" THEN 41!b%=-1 42b%!40=FNfiletype(a$) 43$(b%+44)=a$ 44PROCloadpicture 45ENDIF 46 47REPEAT 48PROCpoll 49UNTIL quit% 50 51PROCexit 52END 53: 54 55 56REM -- General WIMP procedures 57 58 59DEF PROCexit 60SYS "XWimp_CloseDown",task%,&4B534154 61ENDPROC 62: 63DEF PROCmemusage 64MODE MODE 65PRINT "Memory free : ";HIMEM-END 66PRINT "Could decrease slot by: ";(((HIMEM-END) DIV 4096)*4);"K" 67PRINT "That would leave free : ";(HIMEM-END)-(((HIMEM-END) DIV 4096)*4096);" bytes" 68ENDPROC 69 70: 71DEF PROCpoll 72SYS "OS_ReadMonotonicTime" TO a% 73SYS "Wimp_PollIdle",1,b%,a%+10000 TO reason% 74 75IF (returnto%<>-1) AND (reason%=1) THEN 76PROCrestoremode 77abortmul%=FALSE 78IF closedis%=0 THEN 79!fr%=displayh% 80SYS "Wimp_GetWindowInfo",,fr% 81fr%!4=0 82fr%!8=0 83fr%!12=&7FFFFFF 84fr%!16=&7FFFFFF 85SYS "Wimp_OpenWindow",,fr% 86PROCopencentered(displayh%) 87ELSE 88reason%=3 89!b%=displayh% 90ENDIF 91ENDIF 92 93CASE reason% OF 94WHEN 1:PROCredraw 95WHEN 2:SYS "Wimp_OpenWindow",,b% 96WHEN 3 97CASE !b% OF 98WHEN displayh% 99SYS "OS_Byte",121 TO ,a% 100IF (a%<>0) THEN SYS "Wimp_CloseWindow",,b% 101PROCsetslotsize(basislot%,a%) 102PROCgreyoutmenu(mainmenuaddr%,2) 103PROCgreyoutmenu(mainmenuaddr%,3) 104MOUSE a%,c%,d% 105IF (d% MOD 2) THEN 106c%=FALSE 107FOR a%=LEN(jpegname$) TO 1 STEP -1 108IF MID$(jpegname$,a%,1)="." THEN jpegname$=LEFT$(jpegname$,a%-1):a%=0:c%=TRUE 109NEXT 110IF c%<>FALSE AND jpegname$<>"" THEN OSCLI "Filer_OpenDir "+jpegname$ 111ENDIF 112WHEN choicesh% 113iconh%=12 114adju%=0 115PROCsetopt(choicesh%,iconh%,TRUE) 116PROCchoicesclick 117PROCsetopt(choicesh%,iconh%,FALSE) 118OTHERWISE 119SYS "Wimp_CloseWindow",,b% 120ENDCASE 121WHEN 6:PROCclick 122WHEN 8:PROCkeyboard 123WHEN 9:PROCmenuselect 124WHEN 17,18,19:PROCmessage 125ENDCASE 126ENDPROC 127: 128DEF PROCclick 129windh%=b%!12 130iconh%=b%!16 131adju%=(b%!8) AND 1 132menu%=(b%!8) AND 2 133sele%=(b%!8) AND 4 134 135CASE windh% OF 136 137WHEN -2 138IF FNopen(displayh%) AND adju%<>0 THEN 139PROCfullscreen 140ELSE 141PROCopenmainmenu(FALSE) 142ENDIF 143WHEN displayh%:PROCopenmainmenu(TRUE) 144WHEN zoomh%:PROCzoomclick 145WHEN choicesh%:PROCchoicesclick 146 147ENDCASE 148 149ENDPROC 150: 151DEF PROCkeyboard 152LOCAL a% 153a%=FALSE 154windh%=!b% 155iconh%=b%!4 156 157CASE windh% OF 158 159WHEN zoomh% 160CASE b%!24 OF 161WHEN &00D 162a%=TRUE 163IF VAL(FNtextuntil(!(zow%+108+32*iconh%),33))>20 THEN $(!(zow%+108+32*iconh%))="20":PROCforceredraw(zoomh%,iconh%) 164IF VAL(FNtextuntil(!(zow%+108+32*iconh%),33))<1 THEN $(!(zow%+108+32*iconh%))="1":PROCforceredraw(zoomh%,iconh%) 165IF iconh%=2 THEN 166iconh%=4 167SYS "Wimp_SetCaretPosition",zoomh%,4,b%!8,b%!12,b%!16,LEN(FNtextuntil(!(zow%+236),33)) 168ELSE 169iconh%=2 170SYS "Wimp_CreateMenu",-1 171ENDIF 172PROCkeyzoom 173IF iconh%=4 THEN 174SYS "Wimp_GetCaretPosition",,fr% 175PROCshowmenu(topmenu%,topx%,topy%) 176SYS "Wimp_SetCaretPosition",!fr%,fr%!4,fr%!8,fr%!12,fr%!16,fr%!20 177ENDIF 178ENDCASE 179 180ENDCASE 181 182IF a%=FALSE THEN SYS "Wimp_ProcessKey",b%!24 183ENDPROC 184: 185DEF PROCmessage 186 187CASE b%!16 OF 188 189WHEN 0:quit%=TRUE 190WHEN 3,5:PROCloadpicture 191WHEN &400C1:IF FNopen(displayh%) THEN PROCresizemainwindow 192 193ENDCASE 194 195ENDPROC 196: 197DEF PROCsetslotsize(a%,RETURN e%) 198REM Pass the absolute slot size you want to set, and a variable 199REM into which the slot size on exit from the procedure 200REM is passed. 201 202LOCAL c%,d% 203 204REM Read the size of the Current slot and Free pool. The total 205REM free space is then in d% since the Free pool is the global 206REM free space rather than the Wimp definition which is the 207REM global free space minus the space in the Next slot. 208 209SYS "Wimp_SlotSize",-1,-1 TO c%,,d% 210 211REM If the current slot isn't the size requested already, and if the 212REM size of the free memory plus the basic slot is greater than or 213REM equal to the amount we want to claim (i.e., if there is enough free!) 214REM then the memory is claimed. 215 216SYS "Wimp_SlotSize",a%,-1 217 218REM Now read the Current slot again. This will return either an amount 219REM greater than basislot% in which case the allocation was successful, or 220REM it will return basislot% directly, in which case there was not enough 221REM memory. The error for this is handled by the caller of the procedure. 222 223SYS "Wimp_SlotSize",-1,-1 TO e% 224ENDPROC 225: 226DEF PROCredraw 227LOCAL a% 228SYS "Wimp_RedrawWindow",,b% TO a% 229WHILE a% 230REM SYS "JPEG_PlotScaled",basememo%,b%!4-b%!20,b%!16-windheig%-b%!24,0,jpegleng%,df% 231SYS "JPEG_PlotScaled",basememo%,b%!4-b%!20,b%!16-windheig%-b%!24,sc%,jpegleng%,df% 232SYS "Wimp_GetRectangle",,b% TO a% 233ENDWHILE 234ENDPROC 235: 236DEF PROCforceredraw(a%,c%) 237REM Pass a window and icon handle. Performs a 'true' redraw 238REM of the icon (so it might flicker a bit). 239 240!fr%=a% 241fr%!4=c% 242SYS "Wimp_GetIconState",,fr% 243SYS "Wimp_ForceRedraw",!fr%,fr%!8,fr%!12,fr%!16,fr%!20 244ENDPROC 245: 246 247 248REM -- Initialisation procedures 249 250 251DEF PROCinitialisemain 252REM Initialise fundamental variables and dimension arrays. 253 254quit%=FALSE 255returnto%=-1 256abortmul%=FALSE 257 258isp%=1024 259DIM ib% 32 260DIM s% 1024,fr% 1024 261DIM i% isp%,m% 512,mi% 1024 262DIM inw% 768,diw% 192,zow% 768,jiw% 512,chw% 1280 263DIM mos% 128,sc% 16 264 265REM Load choices and sprites relevant to current display 266REM resolution. 267 268PROCloadchoices 269PROCloadsprites 270 271REM xbig%, ybig% and bbpp% are eventually set globally to the 272REM x and y size of the largest available screenmode; xclr%, 273REM yclr% AND cbpp% to the most colourful. This can be done 274REM here, or when the actual function is requested (the check 275REM is made to see if xbig% or xclr% are zero, and if so, work 276REM out the biggest or most colourful). 277 278xbig%=0 279ybig%=0 280bbpp%=0 281 282xclr%=0 283yclr%=0 284cbpp%=0 285 286IF modesons%<>0 THEN 287PROCfindbiggest(xbig%,ybig%,bbpp%) 288PROCfindcolours(xclr%,yclr%,cbpp%) 289ENDIF 290 291REM Find out Current slot size and record it in 292REM basislot% for use by the wimp slot sizing procedure. 293 294SYS "Wimp_SlotSize",-1,-1 TO basislot% 295 296REM Now the usual initialisation, loading 297REM templates, making menus, adding submenus 298REM and so on. 299 300PROCtemplates 301 302zoomm%=1 303zoomd%=1 304 305$(!(zow%+172))="1" 306$(!(zow%+236))="1" 307 308PROCcreatemainmenu 309PROCattach(mainmenuaddr%,0,infoh%) 310PROCattach(mainmenuaddr%,1,zoomh%) 311PROCattach(mainmenuaddr%,2,jpeginfoh%) 312PROCgreyoutmenu(mainmenuaddr%,2) 313PROCgreyoutmenu(mainmenuaddr%,3) 314 315PROCsetopt(choicesh%,2+ditherit%,TRUE) 316IF fullscrn%>0 THEN PROCsetopt(choicesh%,6+fullscrn%,TRUE) 317IF autofull%<>0 THEN PROCsetopt(choicesh%,16,TRUE) 318IF modesons%<>0 THEN PROCsetopt(choicesh%,17,TRUE) 319IF closedis%<>0 THEN PROCsetopt(choicesh%,18,TRUE) 320ENDPROC 321: 322DEF PROCloadchoices 323LOCAL a%,c%,a$ 324SYS "XOS_ReadVarVal","SwiftJPEG$Dir",fr%,256 TO ,,a% 325IF a%=0 THEN ERROR 490,"System variable 'SwiftJPEG$Dir' not defined; ensure you double-click on !SwiftJPEG to run it, and not one of its component files" 326choipath$=LEFT$(FNtextuntil(fr%,32),a%)+".!Choices" 327 328choicefh%=OPENIN(choipath$) 329IF choicefh%=0 THEN ERROR 490,"Can't find the !Choices file" 330 331PROCgetchoice("Dithering","012",ditherit%) 332df%=ditherit%-(ditherit%=2) 333PROCgetchoice("Full Screen","0123",fullscrn%) 334PROCgetchoice("Auto Full Screen","01",autofull%) 335PROCgetchoice("Modes On Startup","01",modesons%) 336PROCgetchoice("Close Display","01",closedis%) 337 338CLOSE#choicefh% 339choicefh%=0 340ENDPROC 341: 342DEF PROCclosechoices 343IF choicefh%<>0 THEN CLOSE#choicefh% 344ENDPROC 345: 346DEF PROCrestoremode 347IF returnto%<>-1 THEN 348SYS "Wimp_SetMode",returnto% 349returnto%=-1 350ENDIF 351ENDPROC 352: 353DEF PROCgetchoice(b$,a$,RETURN a%) 354LOCAL c%,c$ 355c%=FALSE 356REPEAT 357IF FNupper(GET$#choicefh%)=FNupper(b$) THEN c%=TRUE 358UNTIL (c%=TRUE) OR (EOF#choicefh%) 359IF c%=FALSE THEN ERROR 490,"Can't find '"+b$+"' entry in !Choices file" 360c$=GET$#choicefh% 361IF (INSTR(a$,c$)=0) OR (LEN(c$)<>1) THEN ERROR 490,b$+" option not understood in !Choices file" 362a%=VAL(c$) 363ENDPROC 364: 365DEF PROCputchoice(a$,a%) 366LOCAL c%,b$ 367c%=FALSE 368REPEAT 369c$=FNupper(GET$#choicefh%) 370IF c$=FNupper(a$) THEN c%=TRUE 371UNTIL (c%=TRUE) OR (EOF#choicefh%) 372IF c%=FALSE THEN ERROR 490,"Can't find 'Dithering' entry in !Choices file" 373BPUT#choicefh%,a%+48 374ENDPROC 375: 376DEF PROCloadsprites 377LOCAL a%,a$ 378SYS "OS_ReadModeVariable",-1,4 TO ,,xeig% 379SYS "OS_ReadModeVariable",-1,5 TO ,,yeig% 380 381a$="<SwiftJPEG$Dir>." 382 383IF xeig%>1 OR yeig%>1 THEN a$+="Sprites" ELSE a$+="Sprites22" 384 385a%=FNfiletype(a$) 386IF a%<0 THEN ERROR (1<<30)+2,"Can't find Sprites file" 387IF a%<>&FF9 THEN ERROR (1<<30)+2,"Sprites file doesn't have Sprite filetype &FF9" 388a%=FNfilelength(a$) 389IF a%=-1 THEN ERROR (1<<30)+2,"Can't find the Sprites file" 390 391DIM sprites% a%+1024 392!sprites%=0 393sprites%!4=16 394 395SYS "OS_SpriteOp",265,sprites% 396SYS "OS_SpriteOp",266,sprites%,a$ 397ENDPROC 398: 399DEF PROCiconbar 400$(ib%)="iconbar" 401!b%=-1 402b%!4=0 403b%!8=0 404b%!12=68 405b%!16=68 406b%!20=&3102 407b%!24=ib% 408b%!28=sprites% 409b%!32=11 410SYS "Wimp_CreateIcon",,b% TO iconbarh% 411ENDPROC 412: 413DEF PROCgetp(RETURN a$) 414LOCAL a% 415 416SYS "OS_GetEnv" TO a% 417a$=FNtextuntil(a%,32) 418 419a%=INSTR(a$,"""") 420IF a%<>0 THEN a$=MID$(a$,a%+1) 421a%=INSTR(a$,""" ") 422IF a%<>0 THEN a$=MID$(a$,a%+2) ELSE a$="" 423ENDPROC 424: 425 426 427REM -- Template and window handling procedures 428 429 430DEF FNopen(a%) 431LOCAL c% 432IF a%=-1 THEN c%=FALSE 433!fr%=a% 434SYS "Wimp_GetWindowState",,fr% 435IF ((fr%!32) AND &10000)<>0 THEN c%=TRUE ELSE c%=FALSE 436=c% 437: 438DEF PROCloadtemp(a%,a$,RETURN c%) 439SYS "Wimp_LoadTemplate",,a%,i%,io%+isp%,-1,a$,0 TO ,,i% 440a%!64=sprites% 441SYS "Wimp_CreateWindow",,a% TO c% 442ENDPROC 443: 444DEF PROCtemplates 445LOCAL a% 446 447SYS "Wimp_OpenTemplate",,"<SwiftJPEG$Dir>.Templates" 448io%=i% 449 450PROCloadtemp(inw%,"Info",infoh%) 451$(!(inw%+332))=version$ 452PROCloadtemp(diw%,"Display",displayh%) 453PROCloadtemp(zow%,"Zoom",zoomh%) 454PROCloadtemp(jiw%,"JPEG info",jpeginfoh%) 455PROCloadtemp(chw%,"Choices",choicesh%) 456 457SYS "Wimp_CloseTemplate" 458ENDPROC 459: 460DEF PROCopencentered(f%) 461LOCAL a%,c%,d%,e% 462PROCreadscreensize(a%,c%) 463!fr%=f% 464SYS "Wimp_GetWindowState",,fr% 465d%=fr%!12-fr%!4 466e%=fr%!16-fr%!8 467xpo%=(a%-d%)/2 468ypo%=(c%-e%)/2+68 469IF (fr%!32) AND &4000000 THEN ypo%-=20 470IF (fr%!32) AND &40000000 THEN ypo%+=20 471IF (fr%!32) AND &10000000 THEN xpo%-=20 472fr%!4=xpo% 473fr%!8=ypo% 474fr%!12=xpo%+d% 475fr%!16=ypo%+e% 476fr%!28=-1 477SYS "Wimp_OpenWindow",,fr% 478ENDPROC 479: 480DEF PROCzoomclick 481LOCAL a%,c% 482a%=zoomm% 483c%=zoomd% 484 485IF adju% THEN 486CASE iconh% OF 487WHEN 0:iconh%=1 488WHEN 1:iconh%=0 489WHEN 5:iconh%=6 490WHEN 6:iconh%=5 491ENDCASE 492ENDIF 493 494CASE iconh% OF 495WHEN 0 496zoomm%=VAL(FNtextuntil(!(zow%+172),33))+1 497IF zoomm%>20 THEN zoomm%=20 498IF FNtextuntil(!(zow%+172),33)<>STR$(zoomm%) THEN $(!(zow%+172))=STR$(zoomm%):PROCforceredraw(zoomh%,2) 499WHEN 1 500zoomm%=VAL(FNtextuntil(!(zow%+172),33))-1 501IF zoomm%<1 THEN zoomm%=1 502IF FNtextuntil(!(zow%+172),33)<>STR$(zoomm%) THEN $(!(zow%+172))=STR$(zoomm%):PROCforceredraw(zoomh%,2) 503WHEN 5 504zoomd%=VAL(FNtextuntil(!(zow%+236),33))+1 505IF zoomd%>20 THEN zoomd%=20 506IF FNtextuntil(!(zow%+236),33)<>STR$(zoomd%) THEN $(!(zow%+236))=STR$(zoomd%):PROCforceredraw(zoomh%,4) 507WHEN 6 508zoomd%=VAL(FNtextuntil(!(zow%+236),33))-1 509IF zoomd%<1 THEN zoomd%=1 510IF FNtextuntil(!(zow%+236),33)<>STR$(zoomd%) THEN $(!(zow%+236))=STR$(zoomd%):PROCforceredraw(zoomh%,4) 511ENDCASE 512 513IF a%<>zoomm% OR c%<>zoomd% THEN 514IF FNopen(displayh%) THEN 515PROCresizemainwindow 516!fr%=displayh% 517SYS "Wimp_CloseWindow",,fr% 518SYS "Wimp_GetWindowState",,fr% 519SYS "Wimp_OpenWindow",,fr% 520PROCshowmenu(topmenu%,topx%,topy%) 521ENDIF 522ENDIF 523ENDPROC 524: 525DEF PROCkeyzoom 526LOCAL a%,c% 527a%=zoomm% 528c%=zoomd% 529 530zoomm%=VAL(FNtextuntil(!(zow%+172),33)) 531zoomd%=VAL(FNtextuntil(!(zow%+236),33)) 532 533IF zoomm%<1 THEN zoomm%=1 534IF zoomm%>20 THEN zoomm%=20 535IF zoomd%<1 THEN zoomd%=1 536IF zoomd%>20 THEN zoomd%=20 537 538IF zoomm%<>a% THEN $(!(zow%+172))=STR$(zoomm%):PROCforceredraw(zoomh%,2) 539IF zoomd%<>c% THEN $(!(zow%+236))=STR$(zoomd%):PROCforceredraw(zoomh%,4) 540 541IF a%<>zoomm% OR c%<>zoomd% THEN 542IF FNopen(displayh%) THEN 543PROCresizemainwindow 544!fr%=displayh% 545SYS "Wimp_CloseWindow",,fr% 546SYS "Wimp_GetWindowState",,fr% 547SYS "Wimp_OpenWindow",,fr% 548ENDIF 549ENDIF 550ENDPROC 551: 552DEF PROCchoicesclick 553LOCAL a%,c%,a$ 554 555CASE iconh% OF 556 557WHEN 2,3,4 558IF FNgetopt(choicesh%,iconh%)=FALSE THEN 559IF FNgetopt(choicesh%,2) THEN PROCsetopt(choicesh%,2,FALSE) 560IF FNgetopt(choicesh%,3) THEN PROCsetopt(choicesh%,3,FALSE) 561IF FNgetopt(choicesh%,4) THEN PROCsetopt(choicesh%,4,FALSE) 562PROCsetopt(choicesh%,iconh%,TRUE) 563ENDIF 564WHEN 7,8,9 565IF FNgetopt(choicesh%,iconh%)=FALSE THEN 566IF FNgetopt(choicesh%,7) THEN PROCsetopt(choicesh%,7,FALSE) 567IF FNgetopt(choicesh%,8) THEN PROCsetopt(choicesh%,8,FALSE) 568IF FNgetopt(choicesh%,9) THEN PROCsetopt(choicesh%,9,FALSE) 569PROCsetopt(choicesh%,iconh%,TRUE) 570ELSE 571PROCsetopt(choicesh%,iconh%,FALSE) 572ENDIF 573 574WHEN 10 575REM 'Save'; store the choices *as displayed in the window* - 576REM an 'OK' is needed to make those the current internal 577REM choices. 578 579choicefh%=OPENUP(choipath$) 580IF choicefh%=0 THEN ERROR 490,"Can't find the !Choices file" 581 582IF FNgetopt(choicesh%,2) THEN a%=0 583IF FNgetopt(choicesh%,3) THEN a%=1 584IF FNgetopt(choicesh%,4) THEN a%=2 585PROCputchoice("Dithering",a%) 586 587a%=0 588IF FNgetopt(choicesh%,7) THEN a%=1 589IF FNgetopt(choicesh%,8) THEN a%=2 590IF FNgetopt(choicesh%,9) THEN a%=3 591PROCputchoice("Full Screen",a%) 592 593IF FNgetopt(choicesh%,16) THEN a%=1 ELSE a%=0 594PROCputchoice("Auto Full Screen",a%) 595 596IF FNgetopt(choicesh%,17) THEN a%=1 ELSE a%=0 597PROCputchoice("Modes On Startup",a%) 598 599IF FNgetopt(choicesh%,18) THEN a%=1 ELSE a%=0 600PROCputchoice("Close Display",a%) 601 602CLOSE#choicefh% 603choicefh%=0 604 605WHEN 11 606REM 'Default' (Accurate dithering and Best Fit for 607REM Full Screen option). 608 609IF FNgetopt(choicesh%,4)=FALSE THEN 610IF FNgetopt(choicesh%,2) THEN PROCsetopt(choicesh%,2,FALSE) 611IF FNgetopt(choicesh%,3) THEN PROCsetopt(choicesh%,3,FALSE) 612IF FNgetopt(choicesh%,4) THEN PROCsetopt(choicesh%,4,FALSE) 613PROCsetopt(choicesh%,4,TRUE) 614ENDIF 615 616IF FNgetopt(choicesh%,7)=FALSE THEN 617IF FNgetopt(choicesh%,7) THEN PROCsetopt(choicesh%,7,FALSE) 618IF FNgetopt(choicesh%,8) THEN PROCsetopt(choicesh%,8,FALSE) 619IF FNgetopt(choicesh%,9) THEN PROCsetopt(choicesh%,9,FALSE) 620PROCsetopt(choicesh%,7,TRUE) 621ENDIF 622 623IF FNgetopt(choicesh%,16) THEN PROCsetopt(choicesh%,16,FALSE) 624IF FNgetopt(choicesh%,17) THEN PROCsetopt(choicesh%,17,FALSE) 625IF FNgetopt(choicesh%,18) THEN PROCsetopt(choicesh%,18,FALSE) 626 627WHEN 12 628REM 'Cancel'; reset choices to as they were when 629REM the window opened. 630 631IF FNgetopt(choicesh%,ditherit%+2)=FALSE THEN 632IF FNgetopt(choicesh%,2) THEN PROCsetopt(choicesh%,2,FALSE) 633IF FNgetopt(choicesh%,3) THEN PROCsetopt(choicesh%,3,FALSE) 634IF FNgetopt(choicesh%,4) THEN PROCsetopt(choicesh%,4,FALSE) 635PROCsetopt(choicesh%,ditherit%+2,TRUE) 636ENDIF 637 638IF fullscrn%>0 THEN 639IF FNgetopt(choicesh%,fullscrn%+6)=FALSE THEN 640IF FNgetopt(choicesh%,7) THEN PROCsetopt(choicesh%,7,FALSE) 641IF FNgetopt(choicesh%,8) THEN PROCsetopt(choicesh%,8,FALSE) 642IF FNgetopt(choicesh%,9) THEN PROCsetopt(choicesh%,9,FALSE) 643PROCsetopt(choicesh%,fullscrn%+6,TRUE) 644ENDIF 645ELSE 646IF FNgetopt(choicesh%,7) THEN PROCsetopt(choicesh%,7,FALSE) 647IF FNgetopt(choicesh%,8) THEN PROCsetopt(choicesh%,8,FALSE) 648IF FNgetopt(choicesh%,9) THEN PROCsetopt(choicesh%,9,FALSE) 649ENDIF 650 651IF autofull%=0 AND FNgetopt(choicesh%,16) THEN PROCsetopt(choicesh%,16,FALSE) 652IF autofull%=1 AND FNgetopt(choicesh%,16)=FALSE THEN PROCsetopt(choicesh%,16,TRUE) 653IF modesons%=0 AND FNgetopt(choicesh%,17) THEN PROCsetopt(choicesh%,17,FALSE) 654IF modesons%=1 AND FNgetopt(choicesh%,17)=FALSE THEN PROCsetopt(choicesh%,17,TRUE) 655IF closedis%=0 AND FNgetopt(choicesh%,18) THEN PROCsetopt(choicesh%,18,FALSE) 656IF closedis%=1 AND FNgetopt(choicesh%,18)=FALSE THEN PROCsetopt(choicesh%,18,TRUE) 657 658IF adju%=0 THEN 659PROCwaitforrelease 660!fr%=choicesh% 661SYS "Wimp_CloseWindow",,fr% 662ENDIF 663 664WHEN 13 665REM 'OK'; store choices internally and force the display window 666REM to redraw if it is open, if the dithering method has changed. 667 668a%=ditherit% 669IF FNgetopt(choicesh%,2) THEN ditherit%=0 670IF FNgetopt(choicesh%,3) THEN ditherit%=1 671IF FNgetopt(choicesh%,4) THEN ditherit%=2 672df%=ditherit%-(ditherit%=2) 673 674fullscrn%=0 675IF FNgetopt(choicesh%,7) THEN fullscrn%=1 676IF FNgetopt(choicesh%,8) THEN fullscrn%=2 677IF FNgetopt(choicesh%,9) THEN fullscrn%=3 678 679IF FNgetopt(choicesh%,16) THEN autofull%=1 ELSE autofull%=0 680IF FNgetopt(choicesh%,17) THEN modesons%=1 ELSE modesons%=0 681IF FNgetopt(choicesh%,18) THEN closedis%=1 ELSE closedis%=0 682 683PROCwaitforrelease 684!fr%=choicesh% 685SYS "Wimp_CloseWindow",,fr% 686 687IF FNopen(displayh%) AND (a%<>ditherit%) THEN 688!fr%=displayh% 689SYS "Wimp_GetWindowState",,fr% 690SYS "Wimp_CloseWindow",,fr% 691SYS "Wimp_OpenWindow",,fr% 692ENDIF 693 694ENDCASE 695ENDPROC 696: 697 698 699REM -- Icon handling procedures 700 701 702DEF PROCsetopt(a%,c%,d%) 703IF FNgetopt(a%,c%)<>d%THEN 704!s%=a% 705s%!4=c% 706SYS "Wimp_GetIconState",,s% 707IF d%=FALSE THEN s%!8=0 ELSE s%!8=&200000 708!s%=a% 709s%!4=c% 710s%!12=&200000 711SYS "Wimp_SetIconState",,s% 712ENDIF 713ENDPROC 714: 715 716 717REM -- Menu handling procedures 718 719 720DEF PROCcreatemainmenu 721datapntr%=s% 722$s%="SwiftJPEG" 723$(s%+10)="Info" 724$(s%+15)="Zoom" 725$(s%+20)="Picture" 726$(s%+28)="Full screen..." 727$(s%+43)="Choices...�D" 728$(s%+56)="Quit" 729$(s%+61)="*"+CHR$(0)+"*" 730mainmenuaddr%=FNmakemenu(m%,mi%) 731ENDPROC 732: 733DEF PROCopenmainmenu(a%) 734IF a%=FALSE THEN PROCshowmenu(mainmenuaddr%,!b%-116,140+5*44+24) ELSE PROCshowmenu(mainmenuaddr%,!b%-116,b%!4+22) 735ENDPROC 736: 737DEF PROCattach(a%,c%,d%) 738!(a%+28+c%*24+4)=d% 739ENDPROC 740: 741DEF PROCshowmenu(a%,x%,y%) 742topmenu%=a%:topx%=x%:topy%=y% 743SYS "Wimp_CreateMenu",,a%,x%,y% 744ENDPROC 745: 746DEF PROCsettick(a%,c%,d%) 747IF d%=TRUE THEN a%!(28+c%*24)=a%!(28+c%*24)OR1:ELSE a%!(28+c%*24)=a%!(28+c%*24)AND&FFFFFFFE 748ENDPROC 749: 750DEF PROCgreyoutmenu(a%,c%) 751a%!(28+c%*24+8)=(a%!(28+c%*24+8)) OR (1<<22) 752ENDPROC 753: 754DEF PROCungreymenu(a%,c%) 755a%!(28+c%*24+8)=(a%!(28+c%*24+8)) AND (NOT (1<<22)) 756ENDPROC 757: 758DEF PROCmenuselect 759LOCAL a%,c%,d%,a$ 760SYS "Wimp_GetPointerInfo",,s% 761adju%=(s%!8 AND 1) 762SYS "Wimp_DecodeMenu",,topmenu%,b%,s% 763 764CASE $s% OF 765 766WHEN "Info" 767SYS "Wimp_GetPointerInfo",,fr% 768SYS "Wimp_CreateMenu",,infoh%,!fr%-22,fr%!4-22 769WHEN "Zoom" 770SYS "Wimp_GetPointerInfo",,fr% 771PROCshowmenu(zoomh%,!fr%-30,fr%!4+36) 772WHEN "Picture" 773SYS "Wimp_GetPointerInfo",,fr% 774SYS "Wimp_CreateMenu",,jpeginfoh%,!fr%-20,fr%!4-20 775WHEN "Choices..." 776PROCopencentered(choicesh%) 777WHEN "Full screen..." 778PROCfullscreen 779WHEN "Quit" 780quit%=TRUE 781 782ENDCASE 783 784IF adju% THEN PROCshowmenu(topmenu%,topx%,topy%) 785ENDPROC 786: 787 788 789REM -- Full Screen handling procedures 790 791 792DEF PROCfullscreen 793LOCAL a%,c%,x%,y%,x1%,y1% 794 795MOUSE OFF 796 797x1%=xpic%*zoomm%/zoomd% 798y1%=ypic%*zoomm%/zoomd% 799 800IF returnto%=-1 THEN c%=TRUE ELSE c%=FALSE 801 802IF returnto%=-1 THEN 803returnto%=MODE 804IF returnto%>127 THEN 805FOR a%=0 TO 127 STEP 4 806mos%!a%=returnto%!a% 807NEXT 808returnto%=mos% 809ENDIF 810ENDIF 811 812IF c%=TRUE THEN SYS "Hourglass_Start",5 813 814CASE fullscrn% OF 815WHEN 0 816SYS "OS_ReadModeVariable",-1,11 TO ,,x% 817SYS "OS_ReadModeVariable",-1,12 TO ,,y% 818x%+=1 819y%+=1 820WHEN 1 821PROCfindbestfit(x1%,y1%,x%,y%,a%) 822WHEN 2 823IF xbig%=0 THEN PROCfindbiggest(xbig%,ybig%,bbpp%) 824x%=xbig% 825y%=ybig% 826a%=bbpp% 827WHEN 3 828IF xclr%=0 THEN PROCfindcolours(xclr%,yclr%,cbpp%) 829x%=xclr% 830y%=yclr% 831a%=cbpp% 832ENDCASE 833 834SYS "Wimp_SetColour",7 835RECTANGLE FILL0,0,32767 836 837IF c%=TRUE THEN SYS "Hourglass_Off" 838 839IF fullscrn%<>0 THEN 840!fr%=1 841fr%!4=x% 842fr%!8=y% 843fr%!12=a% 844fr%!16=-1 845fr%!20=-1 846IF MODE>127 THEN 847IF fr%!4<>!(MODE+4) OR fr%!8<>!(MODE+8) OR fr%!12<>!(MODE+12) THEN 848MODE fr% 849SYS "Wimp_SetPalette" 850OFF 851ENDIF 852ELSE 853MODE fr% 854SYS "Wimp_SetPalette" 855OFF 856ENDIF 857ENDIF 858 859SYS "Wimp_SetColour",7 860RECTANGLE FILL0,0,32767 861 862x%=x%-x1% 863y%=y%-y1% 864!fr%=zoomm% 865fr%!4=zoomm% 866fr%!8=zoomd% 867fr%!12=zoomd% 868SYS "XJPEG_PlotScaled",basememo%,x%,y%,fr%,jpegleng%,df% 869 870REPEAT 871SYS "OS_Byte",121 TO ,a% 872UNTIL a%=255 873 874REPEAT 875SYS "OS_Byte",121 TO ,a% 876UNTIL a%<>255 877 878IF (a%=112) AND (autofull%<>0) THEN abortmul%=TRUE 879 880RECTANGLE FILL0,0,32767 881 882SYS "Hourglass_Start",15 883REPEAT 884MOUSE d%,d%,a% 885UNTIL a%=0 886SYS "XOS_CLI","FX 15" 887SYS "Hourglass_Off" 888 889REM Force a redraw of the display window. Even if it's subsequently 890REM closed before we get back to polling, this will force just one 891REM return from the Wimp with reason code 1. If you don't do this, 892REM then since Wimp_PollIdle is used, the polling code doesn't get 893REM called for ages, and the Desktop screen mode isn't returned to. 894REM Yes, I know, it's a horrible kludge. Well, sort of; it isn't 895REM that bad really, and the benefits of Wimp_PollIdle outweigh 896REM this little stumbling block... 897 898!fr%=displayh% 899SYS "Wimp_GetWindowState",,fr% 900SYS "Wimp_CloseWindow",,fr% 901SYS "Wimp_OpenWindow",,fr% 902 903ENDPROC 904: 905DEF PROCfindbiggest(RETURN x%,RETURN y%,RETURN c%) 906REM Pass three variables into which will be 907REM passed the x and y sizes of a screen mode, 908REM and it's colour depth (as in a mode selector 909REM block; 0=1 bpp, 1=2bpp, 2=4bpp, 3=8bpp etc). 910REM The routine passes the largest mode, with 911REM the best colour depth available for the 912REM size. 913REM 914REM Modes where the y size is bigger than the 915REM x size, or where the y size when doubled is 916REM larger than the x size are not chosen as 917REM these are assumed to be in the first case, 918REM of undesirable aspect ratio and in the 919REM second case, of medium resolution (like 920REM mode 12, 640x256x16 colours). 921REM 922REM To avoid stupid resolutions like 320x250, 923REM which for many people will have no advantages 924REM over, say, 320x256 though at least the 925REM latter may have a 100Hz equivalent for those 926REM with monitors that would otherwise letterbox 927REM things, the x and y coordinates must both 928REM be divisible by 4. 929 930LOCAL a%,d%,e% 931 932SYS "OS_ScreenMode",2 TO ,,d% 933 934x%=0 935y%=0 936c%=1 937e%=0 938 939FOR e%=0 TO (-d%)-1 940SYS "OS_ScreenMode",2,,e%,,,,b%,64 941IF (b%!8>b%!12) AND ((b%!12)*2>b%!8) AND (b%!8 MOD 4=0) AND (b%!12 MOD 4=0) THEN 942IF (b%!8>=x%) AND (b%!12>=y%) THEN x%=b%!8:y%=b%!12:c%=b%!16 943ENDIF 944NEXT 945ENDPROC 946: 947DEF PROCfindcolours(RETURN x%,RETURN y%,RETURN c%) 948REM As PROCbiggest, but returns the largest mode 949REM available from the list of those with the 950REM highest colour depth available (e.g. 640x480 951REM by 16.7M with 1Mb VRAM, 800x600 by 16.7M with 952REM 2Mb). 953 954LOCAL a%,d% 955 956SYS "OS_ScreenMode",2 TO ,,d% 957 958x%=0 959y%=0 960c%=0 961 962e%=0 963 964FOR e%=0 TO (-d%)-1 965SYS "OS_ScreenMode",2,,e%,,,,b%,64 966IF (b%!8>b%!12) AND ((b%!12)*2>b%!8) AND (b%!8 MOD 4=0) AND (b%!12 MOD 4=0) THEN 967IF (b%!16>=c%) AND (b%!8>=x%) AND (b%!12>=y%) THEN x%=b%!8:y%=b%!12:c%=b%!16 968ENDIF 969NEXT 970ENDPROC 971: 972DEF PROCfindbestfit(x1%,y1%,RETURN x%,RETURN y%,RETURN c%) 973REM Pass an x and y size and three variables as for 974REM PROCbiggest and PROCcolours. This routine returns 975REM the mode which is of greater or equal size to the 976REM x and y coordinates you pass. 977REM 978REM If no mode will is big enough, PROCbiggest is called 979REM and those values returned. If it's important, then, 980REM check that the returned x and y sizes really are both 981REM bigger than the passed x and y sizes. 982 983LOCAL a%,d%,e%,x2%,y2% 984 985SYS "OS_ScreenMode",2 TO ,,d% 986 987x2%=0 988y2%=0 989x%=1E9 990y%=1E9 991c%=1 992e%=0 993 994FOR e%=0 TO (-d%)-1 995SYS "OS_ScreenMode",2,,e%,,,,b%,64 996IF (b%!8>b%!12) AND ((b%!12)*2>b%!8) AND (b%!8 MOD 4=0) AND (b%!12 MOD 4=0) THEN 997 998IF (b%!8>=x1%) AND (b%!12>=y1%) THEN 999IF ((b%!8-x1%)<=x%) AND ((b%!12-y1%)<=y%) THEN x2%=b%!8:y2%=b%!12:x%=x2%-x1%:y%=y2%-y1%:c%=b%!16 1000ENDIF 1001 1002ENDIF 1003NEXT 1004 1005IF x2%=0 THEN PROCfindbiggest(x2%,y2%,c%) 1006 1007x%=x2% 1008y%=y2% 1009 1010ENDPROC 1011: 1012 1013 1014REM -- Miscellaneous procedures 1015 1016 1017DEF PROCreadscreensize(RETURN d%,RETURN e%) 1018LOCAL a%,c% 1019SYS "OS_ReadModeVariable",-1,11 TO ,,d% 1020SYS "OS_ReadModeVariable",-1,12 TO ,,e% 1021d%+=1 1022e%+=1 1023SYS "OS_ReadModeVariable",-1,4 TO ,,a% 1024SYS "OS_ReadModeVariable",-1,5 TO ,,c% 1025d%=d%<<a% 1026e%=e%<<c% 1027ENDPROC 1028: 1029DEF PROCread(RETURN a$) 1030LOCAL a%,b$ 1031b$="" 1032REPEAT 1033a%=?datapntr% 1034IF a%>31 THEN b$+=CHR$ a% 1035datapntr%+=1 1036UNTIL a%<32 1037a$=b$ 1038ENDPROC 1039: 1040DEF PROCwaitforrelease 1041LOCAL a%,c%,d% 1042SYS "Hourglass_On" 1043REPEAT 1044MOUSE a%,c%,d% 1045UNTIL d%=0 1046SYS "Hourglass_Off" 1047ENDPROC 1048: 1049DEF PROCwait(a%) 1050WHILE a%>0 1051WAIT 1052a%-=1 1053ENDWHILE 1054ENDPROC 1055: 1056 1057 1058REM Miscellaneous functions 1059 1060 1061DEF FNtext(c%,d%,f%) 1062REM Pass an address, a text string length, and 1063REM a threshold. A string is returned of the specified 1064REM length minus characters omitted which had an ASCII 1065REM code LESS THAN the threshold. That is, pass 32 to 1066REM include spaces and anything with higher codes, say. 1067 1068LOCAL a%,b$ 1069 1070b$="" 1071FOR a%=c% TO c%+d%-1 1072IF ?a%>=f% THEN b$=b$+CHR$(?a%) 1073NEXT 1074=b$ 1075: 1076DEF FNtextuntil(c%,d%) 1077REM Pass an address, and a threshold. A string 1078REM is returned of consecutive bytes from the 1079REM address. The function exits when a byte LESS 1080REM THAN the threshold you specified. 1081 1082LOCAL a%,b$ 1083 1084b$="" 1085a%=c% 1086REPEAT 1087IF ?a%>=d% THEN b$=b$+CHR$(?a%):a%+=1 1088UNTIL ?a%<d% OR LEN b$=255 1089=b$ 1090: 1091DEF FNupper(a$) 1092REM Pass a string; returns the same string, all 1093REM in upper case characters. 1094 1095LOCAL a%,b$ 1096 1097b$="" 1098 1099FOR a%=1 TO LEN(a$) 1100IF MID$(a$,a%,1)>="a" AND MID$(a$,a%,1)<="z" THEN b$+=CHR$(ASC(MID$(a$,a%,1))-32) ELSE b$+=MID$(a$,a%,1) 1101NEXT 1102 1103=b$ 1104: 1105 1106 1107REM -- Icon handling functions 1108 1109 1110DEF FNgetopt(a%,c%) 1111!fr%=a%:fr%!4=c% 1112SYS "Wimp_GetIconState",,fr% 1113=((fr%!24) AND (1<<21))<>0 1114: 1115 1116 1117REM -- Menu handling functions 1118 1119 1120DEF FNmakemenu(p1%,p2%) 1121LOCAL a%,c%,d%,e%,a$,b$,c$ 1122IF p1%=m% AND p2%=mi% THEN e%=TRUE ELSE e%=FALSE 1123a%=p1% 1124PROCread(a$) 1125$(a%)=a$ 1126a%?12=7 1127a%?13=2 1128a%?14=7 1129a%?15=0 1130a%!20=44 1131a%!24=0 1132d%=LEN(a$)-3 1133p1%+=28 1134REPEAT 1135PROCread(c$) 1136IF c$<>"*" THEN 1137p1%!8=&07000021 1138!p1%=0 1139c%=FALSE 1140ul%=INSTR(c$,"�") 1141IF ul% THEN 1142b$=RIGHT$(c$,LEN(c$)-ul%) 1143IF INSTR(b$,"T") THEN !p1%=!p1% OR 1 1144IF INSTR(b$,"D") THEN !p1%=!p1% OR 2 1145IF INSTR(b$,"W") THEN 1146!p1%=!p1% OR 4 1147c%=TRUE 1148PROCread(a$) 1149buffer%=EVAL(a$) 1150PROCread(a$) 1151buflen%=EVAL(a$) 1152ENDIF 1153IF INSTR(b$,"M") THEN !p1%=!p1% OR 8 1154c$=LEFT$(c$,ul%-1) 1155ENDIF 1156IF LEN c$>d% THEN d%=LEN c$ 1157p1%!4=-1 1158IF c% THEN 1159p1%!8=&0700F121 1160p1%!12=buffer% 1161p1%!16=-1 1162p1%!20=buflen% 1163$buffer%=c$ 1164ELSE 1165IF LEN c$<12 THEN 1166p1%!8=&07000021 1167$(p1%+12)=c$ 1168ELSE 1169p1%!8=&07000121 1170p1%!12=p2% 1171p1%!16=-1 1172p1%!20=LEN c$+1 1173$p2%=c$ 1174p2%+=LEN c$+1 1175ENDIF 1176ENDIF 1177p1%+=24 1178ENDIF 1179UNTIL c$="*" 1180a%!16=d%*16+32 1181!(p1%-24)=!(p1%-24) OR &80 1182IF e%=TRUE THEN m%=p1%:mi%=p2% 1183=a% 1184: 1185DEF FNreadtick(a%,c%) 1186LOCAL d% 1187IF a%!(28+c%*24)=a%!(28+c%*24) AND &FFFFFFFE THEN d%=TRUE ELSE d%=FALSE 1188=d% 1189: 1190 1191 1192REM -- File I/O functions 1193 1194 1195DEF FNfiletype(a$) 1196LOCAL a%,c%,d% 1197SYS "OS_File",17,a$ TO c%,,a% 1198IF c%<>1 THEN d%=-2 1199IF (a%>>>20)=&FFF THEN d%=(a%>>>8)AND&FFF ELSE d%=-1 1200=d% 1201: 1202DEF FNfilelength(a$) 1203LOCAL a% 1204IF FNfiletype(a$)<>-2 THEN SYS "OS_File",5,a$ TO ,,,,a% ELSE a%=-1 1205=a% 1206: 1207 1208 1209REM -- JPEG handling procedures 1210 1211 1212DEF PROCloadpicture 1213LOCAL a%,c% 1214 1215IF abortmul%=FALSE THEN 1216 1217REM Only start a load if the file is settyped as a JPEG. 1218 1219IF b%!40=&C85 THEN 1220 1221jpegname$=FNtextuntil(b%+44,33) 1222jpegleng%=FNfilelength(jpegname$) 1223 1224REM Send DataLoadAck message, if !b%<>-1 (in which case 1225REM this routine was called because the entire application 1226REM was launched from a double-click on a JPEG file, and 1227REM there is no DataLoad message to reply to. 1228 1229IF !b%<>-1 THEN 1230a%=b%!4 1231b%!4=task% 1232b%!12=b%!8 1233b%!16=4 1234SYS "Wimp_SendMessage",17,b%,a% 1235ENDIF 1236 1237workspce%=256 1238PROCsetslotsize(basislot%+jpegleng%+workspce%,a%) 1239 1240IF a%>=basislot%+jpegleng%+workspce% THEN 1241 1242SYS "Hourglass_On" 1243 1244basememo%=HIMEM 1245REM sc%=basememo%+jpegleng%+16 1246 1247OSCLI "Load "+jpegname$+" "+STR$~basememo% 1248 1249SYS "Hourglass_Off" 1250 1251REM Kill scrapfile if it was used. 1252 1253IF FNtextuntil(b%+44,33)="<Wimp$Scrap>" THEN SYS "XOS_File",6,"<Wimp$Scrap>" 1254 1255IF FNopen(displayh%) THEN a%=TRUE ELSE a%=FALSE 1256!fr%=displayh% 1257SYS "Wimp_CloseWindow",,fr% 1258PROCresizemainwindow 1259!fr%=displayh% 1260SYS "Wimp_GetWindowInfo",,fr% 1261IF a%=FALSE THEN 1262fr%!4=0 1263fr%!8=0 1264fr%!12=&7FFFFFF 1265fr%!16=&7FFFFFF 1266ENDIF 1267SYS "Wimp_OpenWindow",,fr% 1268IF a%=FALSE THEN PROCopencentered(displayh%) 1269 1270PROCfillininfo 1271 1272IF autofull%<>0 THEN PROCfullscreen 1273 1274REM ENDIF from check to see if there was enough memory 1275REM to load the file. 1276ENDIF 1277 1278REM ENDIF from check to see if the file had the JPEG 1279REM filetype (&C85). 1280ENDIF 1281 1282REM ELSE from check to see if abortmul% was FALSE; if the below 1283REM code is executed it was. 1284ELSE 1285 1286REM Send DataLoadAck if the file was a JPEG, but don't 1287REM actually do anything with it. 1288 1289IF b%!40=&C85 THEN 1290a%=b%!4 1291b%!4=task% 1292b%!12=b%!8 1293b%!16=4 1294SYS "Wimp_SendMessage",17,b%,a% 1295ENDIF 1296 1297REM ENDIF from check to see if abortmul% was TRUE or not. 1298ENDIF 1299ENDPROC 1300: 1301DEF PROCresizemainwindow 1302SYS "OS_ReadModeVariable",-1,4 TO ,,xeig% 1303SYS "OS_ReadModeVariable",-1,5 TO ,,yeig% 1304 1305IF xeig%>0 THEN 1306!sc%=1 1307sc%!8=xeig% 1308ELSE 1309!sc%=2 1310sc%!8=1 1311ENDIF 1312IF yeig%>0 THEN 1313sc%!4=1 1314sc%!12=yeig% 1315ELSE 1316sc%!4=2 1317sc%!12=1 1318ENDIF 1319 1320!sc%=(!sc%)*zoomm% 1321sc%!4=(sc%!4)*zoomm% 1322sc%!8=(sc%!8)*zoomd% 1323sc%!12=(sc%!12)*zoomd% 1324 1325SYS "XJPEG_Info",,basememo%,jpegleng% TO ,,xpic%,ypic%,xdpi%,ydpi%,mem% 1326REM IF mem%<>0 THEN ERROR 490,"JPEG requires extra workspace to plot - can't allocate it" 1327 1328!fr%=0 1329fr%!4=((-ypic%*2)*zoomm%)/zoomd% 1330fr%!8=((xpic%*2)*zoomm%)/zoomd% 1331fr%!12=0 1332IF ((fr%!4) MOD 2)<>0 THEN fr%!4=(((fr%!4) DIV 2)-1)*2 1333IF ((fr%!8) MOD 2)<>0 THEN fr%!8=(((fr%!8) DIV 2)+1)*2 1334SYS "Wimp_SetExtent",displayh%,fr% 1335windheig%=-fr%!4 1336ENDPROC 1337: 1338DEF PROCfillininfo 1339LOCAL a$ 1340 1341IF LEN(jpegname$)>27 THEN a$="..."+RIGHT$(jpegname$,24) ELSE a$=jpegname$ 1342REM Line below - If the pathname is >27 characters, then the '...' is put 1343REM in front of the last 24. But what happens if those 24, by chance, 1344REM start with a '.' of a directory separator? The line below should remove 1345REM one dot should the string start with four of them, which indicates 1346REM that the used 24 characters did indeed start with a dot. 1347IF LEFT$(a$,4)="...." THEN a$=MID$(a$,2) 1348$(!(jiw%+108))=a$ 1349 1350a$=STR$(jpegleng%) 1351IF LEN(a$)>7 THEN a$=">9.5Mb!" 1352$(!(jiw%+236))=a$ 1353 1354a$=STR$(xpic%) 1355IF LEN(a$)>6 THEN a$="V.Wide" 1356$(!(jiw%+268))=a$ 1357 1358a$=STR$(ypic%) 1359IF LEN(a$)>6 THEN a$="V.Tall" 1360$(!(jiw%+300))=a$ 1361 1362PROCungreymenu(mainmenuaddr%,2) 1363PROCungreymenu(mainmenuaddr%,3) 1364ENDPROC 1365:
� > !RunImage for !SwiftJPEG � &� A fast JPEG viewer using Acorn's &� SpriteExtend module from RISC OS #� v3.6 or later (module version � 0.99 or later). � '� This source code may not run with #� the WimpSlot allocated to the &� crunched !RunImage; you may need !� to increase the slot by the &� difference in file size, rounded � up to a 4K block. � � (C) Hipposoft 1995 b� �:� � �:�closechoices:�restoremode:ș "Hourglass_Smash":�exit:� �,�$+" (at line "+�(�)+")":� choicefh%=0 returnto%=-1 � b% 256 !b%=3 b%!4=5 b%!8=&400C1 b%!12=0 Cș "Wimp_Initialise",350,&4B534154,"SwiftJPEG",b% � wimp%,task% I� wimp%<350 � � 490,"SwiftJPEG requires RISC OS 3.50 or later to run" ș "Hourglass_Start",50 version$="0.06 (09 Nov 95)" ! "�initialisemain #�iconbar $ %ș "Hourglass_Off" & ' �getp(a$) (� a$<>"" � ) !b%=-1 *b%!40=�filetype(a$) +$(b%+44)=a$ ,�loadpicture -� . /� 0 �poll 1� quit% 2 3 �exit 4� 5: 6 7 8 � -- General WIMP procedures 9 : ;� �exit <(ș "XWimp_CloseDown",task%,&4B534154 =� >: ?� �memusage @� � A$� "Memory free : ";�-� B7� "Could decrease slot by: ";(((�-�) � 4096)*4);"K" CE� "That would leave free : ";(�-�)-(((�-�) � 4096)*4096);" bytes" D� E F: G� �poll H"ș "OS_ReadMonotonicTime" � a% I.ș "Wimp_PollIdle",1,b%,a%+10000 � reason% J K%� (returnto%<>-1) � (reason%=1) � L�restoremode Mabortmul%=� N� closedis%=0 � O!fr%=displayh% P ș "Wimp_GetWindowInfo",,fr% Qfr%!4=0 Rfr%!8=0 Sfr%!12=&7FFFFFF Tfr%!16=&7FFFFFF Uș "Wimp_OpenWindow",,fr% V�opencentered(displayh%) W� X reason%=3 Y!b%=displayh% Z� [� \ ]Ȏ reason% � ^� 1:�redraw _ � 2:ș "Wimp_OpenWindow",,b% `� 3 aȎ !b% � b� displayh% cș "OS_Byte",121 � ,a% d)� (a%<>0) � ș "Wimp_CloseWindow",,b% e�setslotsize(basislot%,a%) f!�greyoutmenu(mainmenuaddr%,2) g!�greyoutmenu(mainmenuaddr%,3) hȗ a%,c%,d% i� (d% � 2) � jc%=� k� a%=�(jpegname$) � 1 � -1 lA� �jpegname$,a%,1)="." � jpegname$=�jpegname$,a%-1):a%=0:c%=� m� n:� c%<>� � jpegname$<>"" � � "Filer_OpenDir "+jpegname$ o� p� choicesh% q iconh%=12 radju%=0 s�setopt(choicesh%,iconh%,�) t�choicesclick u�setopt(choicesh%,iconh%,�) v wș "Wimp_CloseWindow",,b% x� y� 6:�click z� 8:�keyboard {� 9:�menuselect |� 17,18,19:�message }� ~� : �� �click �windh%=b%!12 �iconh%=b%!16 �adju%=(b%!8) � 1 �menu%=(b%!8) � 2 �sele%=(b%!8) � 4 � �Ȏ windh% � � �� -2 �#� �open(displayh%) � adju%<>0 � ��fullscreen �� ��openmainmenu(�) �� � � displayh%:�openmainmenu(�) �� zoomh%:�zoomclick �� choicesh%:�choicesclick � �� � �� �: �� �keyboard �� a% �a%=� �windh%=!b% �iconh%=b%!4 � �Ȏ windh% � � �� zoomh% �Ȏ b%!24 � � � &00D �a%=� �l� �(�textuntil(!(zow%+108+32*iconh%),33))>20 � $(!(zow%+108+32*iconh%))="20":�forceredraw(zoomh%,iconh%) �j� �(�textuntil(!(zow%+108+32*iconh%),33))<1 � $(!(zow%+108+32*iconh%))="1":�forceredraw(zoomh%,iconh%) �� iconh%=2 � �iconh%=4 �Vș "Wimp_SetCaretPosition",zoomh%,4,b%!8,b%!12,b%!16,�(�textuntil(!(zow%+236),33)) �� �iconh%=2 �ș "Wimp_CreateMenu",-1 �� ��keyzoom �� iconh%=4 � �#ș "Wimp_GetCaretPosition",,fr% �#�showmenu(topmenu%,topx%,topy%) �Dș "Wimp_SetCaretPosition",!fr%,fr%!4,fr%!8,fr%!12,fr%!16,fr%!20 �� �� � �� � �'� a%=� � ș "Wimp_ProcessKey",b%!24 �� �: �� �message � �Ȏ b%!16 � � �� 0:quit%=� �� 3,5:�loadpicture �3� &400C1:� �open(displayh%) � �resizemainwindow � �� � �� �: �� �setslotsize(a%,� e%) �A� Pass the absolute slot size you want to set, and a variable �9� into which the slot size on exit from the procedure �� is passed. � �� c%,d% � �@� Read the size of the Current slot and Free pool. The total �@� free space is then in d% since the Free pool is the global �=� free space rather than the Wimp definition which is the �9� global free space minus the space in the Next slot. � �%ș "Wimp_SlotSize",-1,-1 � c%,,d% � �F� If the current slot isn't the size requested already, and if the �D� size of the free memory plus the basic slot is greater than or �K� equal to the amount we want to claim (i.e., if there is enough free!) �!� then the memory is claimed. � �ș "Wimp_SlotSize",a%,-1 � �H� Now read the Current slot again. This will return either an amount �L� greater than basislot% in which case the allocation was successful, or �K� it will return basislot% directly, in which case there was not enough �K� memory. The error for this is handled by the caller of the procedure. � �!ș "Wimp_SlotSize",-1,-1 � e% �� �: � � �redraw �� a% �#ș "Wimp_RedrawWindow",,b% � a% � ȕ a% �V� SYS "JPEG_PlotScaled",basememo%,b%!4-b%!20,b%!16-windheig%-b%!24,0,jpegleng%,df% �Uș "JPEG_PlotScaled",basememo%,b%!4-b%!20,b%!16-windheig%-b%!24,sc%,jpegleng%,df% �#ș "Wimp_GetRectangle",,b% � a% �� �� �: �� �forceredraw(a%,c%) �=� Pass a window and icon handle. Performs a 'true' redraw �.� of the icon (so it might flicker a bit). � �!fr%=a% �fr%!4=c% �ș "Wimp_GetIconState",,fr% �9ș "Wimp_ForceRedraw",!fr%,fr%!8,fr%!12,fr%!16,fr%!20 �� �: � � �"� -- Initialisation procedures � � �� �initialisemain �<� Initialise fundamental variables and dimension arrays. � �quit%=� �returnto%=-1 abortmul%=� isp%=1024 � ib% 32 � s% 1024,fr% 1024 � i% isp%,m% 512,mi% 1024 3� inw% 768,diw% 192,zow% 768,jiw% 512,chw% 1280 � mos% 128,sc% 16 :� Load choices and sprites relevant to current display � resolution. �loadchoices �loadsprites ?� xbig%, ybig% and bbpp% are eventually set globally to the >� x and y size of the largest available screenmode; xclr%, =� yclr% AND cbpp% to the most colourful. This can be done ?� here, or when the actual function is requested (the check @� is made to see if xbig% or xclr% are zero, and if so, work )� out the biggest or most colourful). xbig%=0 ybig%=0 bbpp%=0 xclr%=0 yclr%=0 cbpp%=0 � modesons%<>0 � #�findbiggest(xbig%,ybig%,bbpp%) #�findcolours(xclr%,yclr%,cbpp%) !� " #1� Find out Current slot size and record it in $:� basislot% for use by the wimp slot sizing procedure. % &(ș "Wimp_SlotSize",-1,-1 � basislot% ' (+� Now the usual initialisation, loading ).� templates, making menus, adding submenus *� and so on. + ,�templates - .zoomm%=1 /zoomd%=1 0 1$(!(zow%+172))="1" 2$(!(zow%+236))="1" 3 4�createmainmenu 5#�attach(mainmenuaddr%,0,infoh%) 6#�attach(mainmenuaddr%,1,zoomh%) 7'�attach(mainmenuaddr%,2,jpeginfoh%) 8!�greyoutmenu(mainmenuaddr%,2) 9!�greyoutmenu(mainmenuaddr%,3) : ;$�setopt(choicesh%,2+ditherit%,�) <4� fullscrn%>0 � �setopt(choicesh%,6+fullscrn%,�) =,� autofull%<>0 � �setopt(choicesh%,16,�) >,� modesons%<>0 � �setopt(choicesh%,17,�) ?,� closedis%<>0 � �setopt(choicesh%,18,�) @� A: B� �loadchoices C� a%,c%,a$ D6ș "XOS_ReadVarVal","SwiftJPEG$Dir",fr%,256 � ,,a% E�� a%=0 � � 490,"System variable 'SwiftJPEG$Dir' not defined; ensure you double-click on !SwiftJPEG to run it, and not one of its component files" F1choipath$=��textuntil(fr%,32),a%)+".!Choices" G Hchoicefh%=�(choipath$) I8� choicefh%=0 � � 490,"Can't find the !Choices file" J K+�getchoice("Dithering","012",ditherit%) Ldf%=ditherit%-(ditherit%=2) M.�getchoice("Full Screen","0123",fullscrn%) N1�getchoice("Auto Full Screen","01",autofull%) O1�getchoice("Modes On Startup","01",modesons%) P.�getchoice("Close Display","01",closedis%) Q R�#choicefh% Schoicefh%=0 T� U: V� �closechoices W � choicefh%<>0 � �#choicefh% X� Y: Z� �restoremode [� returnto%<>-1 � \ș "Wimp_SetMode",returnto% ]returnto%=-1 ^� _� `: a� �getchoice(b$,a$,� a%) b� c%,c$ cc%=� d� e+� �upper(�#choicefh%)=�upper(b$) � c%=� f� (c%=�) � (�#choicefh%) g?� c%=� � � 490,"Can't find '"+b$+"' entry in !Choices file" hc$=�#choicefh% iS� (�a$,c$)=0) � (�(c$)<>1) � � 490,b$+" option not understood in !Choices file" ja%=�(c$) k� l: m� �putchoice(a$,a%) n� c%,b$ oc%=� p� qc$=�upper(�#choicefh%) r� c$=�upper(a$) � c%=� s� (c%=�) � (�#choicefh%) tB� c%=� � � 490,"Can't find 'Dithering' entry in !Choices file" u�#choicefh%,a%+48 v� w: x� �loadsprites y� a%,a$ z+ș "OS_ReadModeVariable",-1,4 � ,,xeig% {+ș "OS_ReadModeVariable",-1,5 � ,,yeig% | }a$="<SwiftJPEG$Dir>." ~ 9� xeig%>1 � yeig%>1 � a$+="Sprites" � a$+="Sprites22" � �a%=�filetype(a$) �2� a%<0 � � (1<<30)+2,"Can't find Sprites file" �M� a%<>&FF9 � � (1<<30)+2,"Sprites file doesn't have Sprite filetype &FF9" �a%=�filelength(a$) �7� a%=-1 � � (1<<30)+2,"Can't find the Sprites file" � �� sprites% a%+1024 �!sprites%=0 �sprites%!4=16 � �!ș "OS_SpriteOp",265,sprites% �$ș "OS_SpriteOp",266,sprites%,a$ �� �: �� �iconbar �$(ib%)="iconbar" � !b%=-1 � b%!4=0 � b%!8=0 �b%!12=68 �b%!16=68 �b%!20=&3102 � b%!24=ib% �b%!28=sprites% �b%!32=11 �(ș "Wimp_CreateIcon",,b% � iconbarh% �� �: �� �getp(� a$) �� a% � �ș "OS_GetEnv" � a% �a$=�textuntil(a%,32) � �a%=�a$,"""") �� a%<>0 � a$=�a$,a%+1) �a%=�a$,""" ") �"� a%<>0 � a$=�a$,a%+2) � a$="" �� �: � � �0� -- Template and window handling procedures � � �� �open(a%) �� c% �� a%=-1 � c%=� �!fr%=a% �!ș "Wimp_GetWindowState",,fr% �*� ((fr%!32) � &10000)<>0 � c%=� � c%=� �=c% �: �� �loadtemp(a%,a$,� c%) �9ș "Wimp_LoadTemplate",,a%,i%,io%+isp%,-1,a$,0 � ,,i% �a%!64=sprites% �#ș "Wimp_CreateWindow",,a% � c% �� �: �� �templates �� a% � �7ș "Wimp_OpenTemplate",,"<SwiftJPEG$Dir>.Templates" � io%=i% � �!�loadtemp(inw%,"Info",infoh%) �$(!(inw%+332))=version$ �'�loadtemp(diw%,"Display",displayh%) �!�loadtemp(zow%,"Zoom",zoomh%) �*�loadtemp(jiw%,"JPEG info",jpeginfoh%) �'�loadtemp(chw%,"Choices",choicesh%) � �ș "Wimp_CloseTemplate" �� �: �� �opencentered(f%) �� a%,c%,d%,e% ��readscreensize(a%,c%) �!fr%=f% �!ș "Wimp_GetWindowState",,fr% �d%=fr%!12-fr%!4 �e%=fr%!16-fr%!8 �xpo%=(a%-d%)/2 �ypo%=(c%-e%)/2+68 �$� (fr%!32) � &4000000 � ypo%-=20 �%� (fr%!32) � &40000000 � ypo%+=20 �%� (fr%!32) � &10000000 � xpo%-=20 �fr%!4=xpo% �fr%!8=ypo% �fr%!12=xpo%+d% �fr%!16=ypo%+e% � fr%!28=-1 �ș "Wimp_OpenWindow",,fr% �� �: �� �zoomclick �� a%,c% � a%=zoomm% � c%=zoomd% � � � adju% � �Ȏ iconh% � �� 0:iconh%=1 �� 1:iconh%=0 �� 5:iconh%=6 �� 6:iconh%=5 �� �� � �Ȏ iconh% � �� 0 �*zoomm%=�(�textuntil(!(zow%+172),33))+1 �� zoomm%>20 � zoomm%=20 �]� �textuntil(!(zow%+172),33)<>�(zoomm%) � $(!(zow%+172))=�(zoomm%):�forceredraw(zoomh%,2) �� 1 �*zoomm%=�(�textuntil(!(zow%+172),33))-1 �� zoomm%<1 � zoomm%=1 �]� �textuntil(!(zow%+172),33)<>�(zoomm%) � $(!(zow%+172))=�(zoomm%):�forceredraw(zoomh%,2) �� 5 �*zoomd%=�(�textuntil(!(zow%+236),33))+1 �� zoomd%>20 � zoomd%=20 �]� �textuntil(!(zow%+236),33)<>�(zoomd%) � $(!(zow%+236))=�(zoomd%):�forceredraw(zoomh%,4) �� 6 �*zoomd%=�(�textuntil(!(zow%+236),33))-1 �� zoomd%<1 � zoomd%=1 �]� �textuntil(!(zow%+236),33)<>�(zoomd%) � $(!(zow%+236))=�(zoomd%):�forceredraw(zoomh%,4) �� � a%<>zoomm% � c%<>zoomd% � � �open(displayh%) � �resizemainwindow !fr%=displayh% ș "Wimp_CloseWindow",,fr% !ș "Wimp_GetWindowState",,fr% ș "Wimp_OpenWindow",,fr% #�showmenu(topmenu%,topx%,topy%) � � � : � �keyzoom � a%,c% a%=zoomm% c%=zoomd% (zoomm%=�(�textuntil(!(zow%+172),33)) (zoomd%=�(�textuntil(!(zow%+236),33)) � zoomm%<1 � zoomm%=1 � zoomm%>20 � zoomm%=20 � zoomd%<1 � zoomd%=1 � zoomd%>20 � zoomd%=20 B� zoomm%<>a% � $(!(zow%+172))=�(zoomm%):�forceredraw(zoomh%,2) B� zoomd%<>c% � $(!(zow%+236))=�(zoomd%):�forceredraw(zoomh%,4) � a%<>zoomm% � c%<>zoomd% � � �open(displayh%) � �resizemainwindow !fr%=displayh% !ș "Wimp_CloseWindow",,fr% "!ș "Wimp_GetWindowState",,fr% #ș "Wimp_OpenWindow",,fr% $� %� &� ': (� �choicesclick )� a%,c%,a$ * +Ȏ iconh% � , -� 2,3,4 .#� �getopt(choicesh%,iconh%)=� � /3� �getopt(choicesh%,2) � �setopt(choicesh%,2,�) 03� �getopt(choicesh%,3) � �setopt(choicesh%,3,�) 13� �getopt(choicesh%,4) � �setopt(choicesh%,4,�) 2�setopt(choicesh%,iconh%,�) 3� 4� 7,8,9 5#� �getopt(choicesh%,iconh%)=� � 63� �getopt(choicesh%,7) � �setopt(choicesh%,7,�) 73� �getopt(choicesh%,8) � �setopt(choicesh%,8,�) 83� �getopt(choicesh%,9) � �setopt(choicesh%,9,�) 9�setopt(choicesh%,iconh%,�) :� ;�setopt(choicesh%,iconh%,�) <� = >� 10 ?>� 'Save'; store the choices *as displayed in the window* - @:� an 'OK' is needed to make those the current internal A� choices. B Cchoicefh%=�(choipath$) D8� choicefh%=0 � � 490,"Can't find the !Choices file" E F!� �getopt(choicesh%,2) � a%=0 G!� �getopt(choicesh%,3) � a%=1 H!� �getopt(choicesh%,4) � a%=2 I�putchoice("Dithering",a%) J Ka%=0 L!� �getopt(choicesh%,7) � a%=1 M!� �getopt(choicesh%,8) � a%=2 N!� �getopt(choicesh%,9) � a%=3 O �putchoice("Full Screen",a%) P Q)� �getopt(choicesh%,16) � a%=1 � a%=0 R%�putchoice("Auto Full Screen",a%) S T)� �getopt(choicesh%,17) � a%=1 � a%=0 U%�putchoice("Modes On Startup",a%) V W)� �getopt(choicesh%,18) � a%=1 � a%=0 X"�putchoice("Close Display",a%) Y Z�#choicefh% [choicefh%=0 \ ]� 11 ^4� 'Default' (Accurate dithering and Best Fit for _� Full Screen option). ` a� �getopt(choicesh%,4)=� � b3� �getopt(choicesh%,2) � �setopt(choicesh%,2,�) c3� �getopt(choicesh%,3) � �setopt(choicesh%,3,�) d3� �getopt(choicesh%,4) � �setopt(choicesh%,4,�) e�setopt(choicesh%,4,�) f� g h� �getopt(choicesh%,7)=� � i3� �getopt(choicesh%,7) � �setopt(choicesh%,7,�) j3� �getopt(choicesh%,8) � �setopt(choicesh%,8,�) k3� �getopt(choicesh%,9) � �setopt(choicesh%,9,�) l�setopt(choicesh%,7,�) m� n o5� �getopt(choicesh%,16) � �setopt(choicesh%,16,�) p5� �getopt(choicesh%,17) � �setopt(choicesh%,17,�) q5� �getopt(choicesh%,18) � �setopt(choicesh%,18,�) r s� 12 t2� 'Cancel'; reset choices to as they were when u� the window opened. v w(� �getopt(choicesh%,ditherit%+2)=� � x3� �getopt(choicesh%,2) � �setopt(choicesh%,2,�) y3� �getopt(choicesh%,3) � �setopt(choicesh%,3,�) z3� �getopt(choicesh%,4) � �setopt(choicesh%,4,�) {$�setopt(choicesh%,ditherit%+2,�) |� } ~� fullscrn%>0 � (� �getopt(choicesh%,fullscrn%+6)=� � �3� �getopt(choicesh%,7) � �setopt(choicesh%,7,�) �3� �getopt(choicesh%,8) � �setopt(choicesh%,8,�) �3� �getopt(choicesh%,9) � �setopt(choicesh%,9,�) �$�setopt(choicesh%,fullscrn%+6,�) �� �� �3� �getopt(choicesh%,7) � �setopt(choicesh%,7,�) �3� �getopt(choicesh%,8) � �setopt(choicesh%,8,�) �3� �getopt(choicesh%,9) � �setopt(choicesh%,9,�) �� � �C� autofull%=0 � �getopt(choicesh%,16) � �setopt(choicesh%,16,�) �E� autofull%=1 � �getopt(choicesh%,16)=� � �setopt(choicesh%,16,�) �C� modesons%=0 � �getopt(choicesh%,17) � �setopt(choicesh%,17,�) �E� modesons%=1 � �getopt(choicesh%,17)=� � �setopt(choicesh%,17,�) �C� closedis%=0 � �getopt(choicesh%,18) � �setopt(choicesh%,18,�) �E� closedis%=1 � �getopt(choicesh%,18)=� � �setopt(choicesh%,18,�) � �� adju%=0 � ��waitforrelease �!fr%=choicesh% �ș "Wimp_CloseWindow",,fr% �� � �� 13 �A� 'OK'; store choices internally and force the display window �C� to redraw if it is open, if the dithering method has changed. � �a%=ditherit% �(� �getopt(choicesh%,2) � ditherit%=0 �(� �getopt(choicesh%,3) � ditherit%=1 �(� �getopt(choicesh%,4) � ditherit%=2 �df%=ditherit%-(ditherit%=2) � �fullscrn%=0 �(� �getopt(choicesh%,7) � fullscrn%=1 �(� �getopt(choicesh%,8) � fullscrn%=2 �(� �getopt(choicesh%,9) � fullscrn%=3 � �7� �getopt(choicesh%,16) � autofull%=1 � autofull%=0 �7� �getopt(choicesh%,17) � modesons%=1 � modesons%=0 �7� �getopt(choicesh%,18) � closedis%=1 � closedis%=0 � ��waitforrelease �!fr%=choicesh% �ș "Wimp_CloseWindow",,fr% � �*� �open(displayh%) � (a%<>ditherit%) � �!fr%=displayh% �!ș "Wimp_GetWindowState",,fr% �ș "Wimp_CloseWindow",,fr% �ș "Wimp_OpenWindow",,fr% �� � �� �� �: � � �!� -- Icon handling procedures � � �� �setopt(a%,c%,d%) �� �getopt(a%,c%)<>d%� � !s%=a% �s%!4=c% �ș "Wimp_GetIconState",,s% �"� d%=� � s%!8=0 � s%!8=&200000 � !s%=a% �s%!4=c% �s%!12=&200000 �ș "Wimp_SetIconState",,s% �� �� �: � � �!� -- Menu handling procedures � � �� �createmainmenu �datapntr%=s% �$s%="SwiftJPEG" �$(s%+10)="Info" �$(s%+15)="Zoom" �$(s%+20)="Picture" �$(s%+28)="Full screen..." �$(s%+43)="Choices...�D" �$(s%+56)="Quit" �$(s%+61)="*"+�(0)+"*" �#mainmenuaddr%=�makemenu(m%,mi%) �� �: �� �openmainmenu(a%) �d� a%=� � �showmenu(mainmenuaddr%,!b%-116,140+5*44+24) � �showmenu(mainmenuaddr%,!b%-116,b%!4+22) �� �: �� �attach(a%,c%,d%) �!(a%+28+c%*24+4)=d% �� �: �� �showmenu(a%,x%,y%) �!topmenu%=a%:topx%=x%:topy%=y% �"ș "Wimp_CreateMenu",,a%,x%,y% �� �: �� �settick(a%,c%,d%) �R� d%=� � a%!(28+c%*24)=a%!(28+c%*24)�1:� a%!(28+c%*24)=a%!(28+c%*24)�&FFFFFFFE �� �: �� �greyoutmenu(a%,c%) �/a%!(28+c%*24+8)=(a%!(28+c%*24+8)) � (1<<22) �� �: �� �ungreymenu(a%,c%) �3a%!(28+c%*24+8)=(a%!(28+c%*24+8)) � (� (1<<22)) �� �: �� �menuselect �� a%,c%,d%,a$ � ș "Wimp_GetPointerInfo",,s% �adju%=(s%!8 � 1) �(ș "Wimp_DecodeMenu",,topmenu%,b%,s% � �Ȏ $s% � � �� "Info" �!ș "Wimp_GetPointerInfo",,fr% 1ș "Wimp_CreateMenu",,infoh%,!fr%-22,fr%!4-22 � "Zoom" !ș "Wimp_GetPointerInfo",,fr% &�showmenu(zoomh%,!fr%-30,fr%!4+36) � "Picture" !ș "Wimp_GetPointerInfo",,fr% 5ș "Wimp_CreateMenu",,jpeginfoh%,!fr%-20,fr%!4-20 � "Choices..." �opencentered(choicesh%) � "Full screen..." �fullscreen � "Quit" quit%=� � -� adju% � �showmenu(topmenu%,topx%,topy%) � : (� -- Full Screen handling procedures � �fullscreen � a%,c%,x%,y%,x1%,y1% ȗ � x1%=xpic%*zoomm%/zoomd% y1%=ypic%*zoomm%/zoomd% � returnto%=-1 � c%=� � c%=� ! "� returnto%=-1 � #returnto%=� $� returnto%>127 � %� a%=0 � 127 � 4 &mos%!a%=returnto%!a% '� (returnto%=mos% )� *� + ,#� c%=� � ș "Hourglass_Start",5 - .Ȏ fullscrn% � /� 0 0)ș "OS_ReadModeVariable",-1,11 � ,,x% 1)ș "OS_ReadModeVariable",-1,12 � ,,y% 2 x%+=1 3 y%+=1 4� 1 5"�findbestfit(x1%,y1%,x%,y%,a%) 6� 2 7/� xbig%=0 � �findbiggest(xbig%,ybig%,bbpp%) 8x%=xbig% 9y%=ybig% :a%=bbpp% ;� 3 </� xclr%=0 � �findcolours(xclr%,yclr%,cbpp%) =x%=xclr% >y%=yclr% ?a%=cbpp% @� A Bș "Wimp_SetColour",7 Cȓ Ȑ0,0,32767 D E� c%=� � ș "Hourglass_Off" F G� fullscrn%<>0 � H !fr%=1 Ifr%!4=x% Jfr%!8=y% K fr%!12=a% L fr%!16=-1 M fr%!20=-1 N � �>127 � O7� fr%!4<>!(�+4) � fr%!8<>!(�+8) � fr%!12<>!(�+12) � P � fr% Qș "Wimp_SetPalette" R� S� T� U � fr% Vș "Wimp_SetPalette" W� X� Y� Z [ș "Wimp_SetColour",7 \ȓ Ȑ0,0,32767 ] ^ x%=x%-x1% _ y%=y%-y1% `!fr%=zoomm% afr%!4=zoomm% bfr%!8=zoomd% cfr%!12=zoomd% d;ș "XJPEG_PlotScaled",basememo%,x%,y%,fr%,jpegleng%,df% e f� gș "OS_Byte",121 � ,a% h� a%=255 i j� kș "OS_Byte",121 � ,a% l � a%<>255 m n-� (a%=112) � (autofull%<>0) � abortmul%=� o pȓ Ȑ0,0,32767 q rș "Hourglass_Start",15 s� tȗ d%,d%,a% u � a%=0 vș "XOS_CLI","FX 15" wș "Hourglass_Off" x yE� Force a redraw of the display window. Even if it's subsequently zD� closed before we get back to polling, this will force just one {D� return from the Wimp with reason code 1. If you don't do this, |D� then since Wimp_PollIdle is used, the polling code doesn't get }E� called for ages, and the Desktop screen mode isn't returned to. ~B� Yes, I know, it's a horrible kludge. Well, sort of; it isn't A� that bad really, and the benefits of Wimp_PollIdle outweigh �$� this little stumbling block... � �!fr%=displayh% �!ș "Wimp_GetWindowState",,fr% �ș "Wimp_CloseWindow",,fr% �ș "Wimp_OpenWindow",,fr% � �� �: �"� �findbiggest(� x%,� y%,� c%) �-� Pass three variables into which will be �0� passed the x and y sizes of a screen mode, �2� and it's colour depth (as in a mode selector �2� block; 0=1 bpp, 1=2bpp, 2=4bpp, 3=8bpp etc). �/� The routine passes the largest mode, with �-� the best colour depth available for the �� size. �� �/� Modes where the y size is bigger than the �1� x size, or where the y size when doubled is �.� larger than the x size are not chosen as �0� these are assumed to be in the first case, �,� of undesirable aspect ratio and in the �-� second case, of medium resolution (like �#� mode 12, 640x256x16 colours). �� �/� To avoid stupid resolutions like 320x250, �3� which for many people will have no advantages �,� over, say, 320x256 though at least the �2� latter may have a 100Hz equivalent for those �2� with monitors that would otherwise letterbox �/� things, the x and y coordinates must both �� be divisible by 4. � �� a%,d%,e% � �ș "OS_ScreenMode",2 � ,,d% � �x%=0 �y%=0 �c%=1 �e%=0 � �� e%=0 � (-d%)-1 �%ș "OS_ScreenMode",2,,e%,,,,b%,64 �F� (b%!8>b%!12) � ((b%!12)*2>b%!8) � (b%!8 � 4=0) � (b%!12 � 4=0) � �:� (b%!8>=x%) � (b%!12>=y%) � x%=b%!8:y%=b%!12:c%=b%!16 �� �� �� �: �"� �findcolours(� x%,� y%,� c%) �2� As PROCbiggest, but returns the largest mode �/� available from the list of those with the �2� highest colour depth available (e.g. 640x480 �3� by 16.7M with 1Mb VRAM, 800x600 by 16.7M with �� 2Mb). � �� a%,d% � �ș "OS_ScreenMode",2 � ,,d% � �x%=0 �y%=0 �c%=0 � �e%=0 � �� e%=0 � (-d%)-1 �%ș "OS_ScreenMode",2,,e%,,,,b%,64 �F� (b%!8>b%!12) � ((b%!12)*2>b%!8) � (b%!8 � 4=0) � (b%!12 � 4=0) � �H� (b%!16>=c%) � (b%!8>=x%) � (b%!12>=y%) � x%=b%!8:y%=b%!12:c%=b%!16 �� �� �� �: �*� �findbestfit(x1%,y1%,� x%,� y%,� c%) �5� Pass an x and y size and three variables as for �7� PROCbiggest and PROCcolours. This routine returns �7� the mode which is of greater or equal size to the �#� x and y coordinates you pass. �� �:� If no mode will is big enough, PROCbiggest is called �9� and those values returned. If it's important, then, �;� check that the returned x and y sizes really are both �+� bigger than the passed x and y sizes. � �� a%,d%,e%,x2%,y2% � �ș "OS_ScreenMode",2 � ,,d% � � x2%=0 � y2%=0 � x%=1E9 � y%=1E9 �c%=1 �e%=0 � �� e%=0 � (-d%)-1 �%ș "OS_ScreenMode",2,,e%,,,,b%,64 �F� (b%!8>b%!12) � ((b%!12)*2>b%!8) � (b%!8 � 4=0) � (b%!12 � 4=0) � � �"� (b%!8>=x1%) � (b%!12>=y1%) � �^� ((b%!8-x1%)<=x%) � ((b%!12-y1%)<=y%) � x2%=b%!8:y2%=b%!12:x%=x2%-x1%:y%=y2%-y1%:c%=b%!16 �� � �� �� � �&� x2%=0 � �findbiggest(x2%,y2%,c%) � � x%=x2% � y%=y2% � �� �: � � �!� -- Miscellaneous procedures � � � � �readscreensize(� d%,� e%) �� a%,c% �)ș "OS_ReadModeVariable",-1,11 � ,,d% �)ș "OS_ReadModeVariable",-1,12 � ,,e% � d%+=1 � e%+=1 �(ș "OS_ReadModeVariable",-1,4 � ,,a% (ș "OS_ReadModeVariable",-1,5 � ,,c% d%=d%<<a% e%=e%<<c% � : � �read(� a$) � a%,b$ b$="" � a%=?datapntr% � a%>31 � b$+=� a% datapntr%+=1 � a%<32 a$=b$ � : � �waitforrelease � a%,c%,d% ș "Hourglass_On" � ȗ a%,c%,d% � d%=0 ș "Hourglass_Off" � : � �wait(a%) ȕ a%>0 Ȗ a%-=1 � � : ! "� Miscellaneous functions # $ %� �text(c%,d%,f%) &0� Pass an address, a text string length, and '8� a threshold. A string is returned of the specified (8� length minus characters omitted which had an ASCII )7� code LESS THAN the threshold. That is, pass 32 to *9� include spaces and anything with higher codes, say. + ,� a%,b$ - . b$="" /� a%=c% � c%+d%-1 0� ?a%>=f% � b$=b$+�(?a%) 1� 2=b$ 3: 4� �textuntil(c%,d%) 50� Pass an address, and a threshold. A string 6/� is returned of consecutive bytes from the 72� address. The function exits when a byte LESS 8'� THAN the threshold you specified. 9 :� a%,b$ ; < b$="" = a%=c% >� ?"� ?a%>=d% � b$=b$+�(?a%):a%+=1 @� ?a%<d% � � b$=255 A=b$ B: C� �upper(a$) D1� Pass a string; returns the same string, all E� in upper case characters. F G� a%,b$ H I b$="" J K� a%=1 � �(a$) LN� �a$,a%,1)>="a" � �a$,a%,1)<="z" � b$+=�(�(�a$,a%,1))-32) � b$+=�a$,a%,1) M� N O=b$ P: Q R S � -- Icon handling functions T U V� �getopt(a%,c%) W!fr%=a%:fr%!4=c% Xș "Wimp_GetIconState",,fr% Y=((fr%!24) � (1<<21))<>0 Z: [ \ ] � -- Menu handling functions ^ _ `� �makemenu(p1%,p2%) a� a%,c%,d%,e%,a$,b$,c$ b$� p1%=m% � p2%=mi% � e%=� � e%=� c a%=p1% d �read(a$) e$(a%)=a$ fa%?12=7 ga%?13=2 ha%?14=7 ia%?15=0 ja%!20=44 ka%!24=0 ld%=�(a$)-3 mp1%+=28 n� o �read(c$) p� c$<>"*" � qp1%!8=&07000021 r !p1%=0 sc%=� tul%=�c$,"�") u� ul% � vb$=�c$,�(c$)-ul%) w� �b$,"T") � !p1%=!p1% � 1 x� �b$,"D") � !p1%=!p1% � 2 y� �b$,"W") � z!p1%=!p1% � 4 {c%=� | �read(a$) }buffer%=�(a$) ~ �read(a$) buflen%=�(a$) �� �� �b$,"M") � !p1%=!p1% � 8 �c$=�c$,ul%-1) �� �� � c$>d% � d%=� c$ �p1%!4=-1 � � c% � �p1%!8=&0700F121 �p1%!12=buffer% � p1%!16=-1 �p1%!20=buflen% �$buffer%=c$ �� �� � c$<12 � �p1%!8=&07000021 �$(p1%+12)=c$ �� �p1%!8=&07000121 �p1%!12=p2% � p1%!16=-1 �p1%!20=� c$+1 �$p2%=c$ �p2%+=� c$+1 �� �� �p1%+=24 �� �� c$="*" �a%!16=d%*16+32 �!(p1%-24)=!(p1%-24) � &80 �� e%=� � m%=p1%:mi%=p2% �=a% �: �� �readtick(a%,c%) �� d% �;� a%!(28+c%*24)=a%!(28+c%*24) � &FFFFFFFE � d%=� � d%=� �=d% �: � � �� -- File I/O functions � � �� �filetype(a$) �� a%,c%,d% �ș "OS_File",17,a$ � c%,,a% �� c%<>1 � d%=-2 �/� (a%>>>20)=&FFF � d%=(a%>>>8)�&FFF � d%=-1 �=d% �: �� �filelength(a$) �� a% �<� �filetype(a$)<>-2 � ș "OS_File",5,a$ � ,,,,a% � a%=-1 �=a% �: � � �!� -- JPEG handling procedures � � �� �loadpicture �� a%,c% � �� abortmul%=� � � �:� Only start a load if the file is settyped as a JPEG. � �� b%!40=&C85 � � �"jpegname$=�textuntil(b%+44,33) �$jpegleng%=�filelength(jpegname$) � �9� Send DataLoadAck message, if !b%<>-1 (in which case �<� this routine was called because the entire application �:� was launched from a double-click on a JPEG file, and �/� there is no DataLoad message to reply to. � �� !b%<>-1 � �a%=b%!4 �b%!4=task% �b%!12=b%!8 �b%!16=4 �"ș "Wimp_SendMessage",17,b%,a% �� � �workspce%=256 �2�setslotsize(basislot%+jpegleng%+workspce%,a%) � �)� a%>=basislot%+jpegleng%+workspce% � � �ș "Hourglass_On" � �basememo%=� � � sc%=basememo%+jpegleng%+16 � �'� "Load "+jpegname$+" "+�~basememo% � �ș "Hourglass_Off" � �$� Kill scrapfile if it was used. � �J� �textuntil(b%+44,33)="<Wimp$Scrap>" � ș "XOS_File",6,"<Wimp$Scrap>" � �$� �open(displayh%) � a%=� � a%=� �!fr%=displayh% �ș "Wimp_CloseWindow",,fr% ��resizemainwindow �!fr%=displayh% � ș "Wimp_GetWindowInfo",,fr% �� a%=� � �fr%!4=0 �fr%!8=0 �fr%!12=&7FFFFFF �fr%!16=&7FFFFFF �� �ș "Wimp_OpenWindow",,fr% �%� a%=� � �opencentered(displayh%) � ��fillininfo � � � autofull%<>0 � �fullscreen � �8� ENDIF from check to see if there was enough memory �� to load the file. �� � �6� ENDIF from check to see if the file had the JPEG �� filetype (&C85). � A� ELSE from check to see if abortmul% was FALSE; if the below � code is executed it was. � 8� Send DataLoadAck if the file was a JPEG, but don't #� actually do anything with it. � b%!40=&C85 � a%=b%!4 b%!4=task% b%!12=b%!8 b%!16=4 "ș "Wimp_SendMessage",17,b%,a% � ;� ENDIF from check to see if abortmul% was TRUE or not. � � : � �resizemainwindow +ș "OS_ReadModeVariable",-1,4 � ,,xeig% +ș "OS_ReadModeVariable",-1,5 � ,,yeig% � xeig%>0 � !sc%=1 sc%!8=xeig% � !sc%=2 sc%!8=1 � � yeig%>0 � !sc%!4=1 "sc%!12=yeig% #� $sc%!4=2 %sc%!12=1 &� ' (!sc%=(!sc%)*zoomm% )sc%!4=(sc%!4)*zoomm% *sc%!8=(sc%!8)*zoomd% +sc%!12=(sc%!12)*zoomd% , -Iș "XJPEG_Info",,basememo%,jpegleng% � ,,xpic%,ypic%,xdpi%,ydpi%,mem% .[� IF mem%<>0 THEN ERROR 490,"JPEG requires extra workspace to plot - can't allocate it" / 0 !fr%=0 1$fr%!4=((-ypic%*2)*zoomm%)/zoomd% 2#fr%!8=((xpic%*2)*zoomm%)/zoomd% 3fr%!12=0 42� ((fr%!4) � 2)<>0 � fr%!4=(((fr%!4) � 2)-1)*2 52� ((fr%!8) � 2)<>0 � fr%!8=(((fr%!8) � 2)+1)*2 6%ș "Wimp_SetExtent",displayh%,fr% 7windheig%=-fr%!4 8� 9: :� �fillininfo ;� a$ < =>� �(jpegname$)>27 � a$="..."+�jpegname$,24) � a$=jpegname$ >K� Line below - If the pathname is >27 characters, then the '...' is put ?G� in front of the last 24. But what happens if those 24, by chance, @M� start with a '.' of a directory separator? The line below should remove AH� one dot should the string start with four of them, which indicates B>� that the used 24 characters did indeed start with a dot. C� �a$,4)="...." � a$=�a$,2) D$(!(jiw%+108))=a$ E Fa$=�(jpegleng%) G� �(a$)>7 � a$=">9.5Mb!" H$(!(jiw%+236))=a$ I Ja$=�(xpic%) K� �(a$)>6 � a$="V.Wide" L$(!(jiw%+268))=a$ M Na$=�(ypic%) O� �(a$)>6 � a$="V.Tall" P$(!(jiw%+300))=a$ Q R �ungreymenu(mainmenuaddr%,2) S �ungreymenu(mainmenuaddr%,3) T� U: �
00000000 0d 00 01 20 f4 20 3e 20 21 52 75 6e 49 6d 61 67 |... . > !RunImag| 00000010 65 20 66 6f 72 20 21 53 77 69 66 74 4a 50 45 47 |e for !SwiftJPEG| 00000020 0d 00 02 05 f4 0d 00 03 26 f4 20 41 20 66 61 73 |........&. A fas| 00000030 74 20 4a 50 45 47 20 76 69 65 77 65 72 20 75 73 |t JPEG viewer us| 00000040 69 6e 67 20 41 63 6f 72 6e 27 73 0d 00 04 26 f4 |ing Acorn's...&.| 00000050 20 53 70 72 69 74 65 45 78 74 65 6e 64 20 6d 6f | SpriteExtend mo| 00000060 64 75 6c 65 20 66 72 6f 6d 20 52 49 53 43 20 4f |dule from RISC O| 00000070 53 0d 00 05 23 f4 20 76 33 2e 36 20 6f 72 20 6c |S...#. v3.6 or l| 00000080 61 74 65 72 20 28 6d 6f 64 75 6c 65 20 76 65 72 |ater (module ver| 00000090 73 69 6f 6e 0d 00 06 15 f4 20 30 2e 39 39 20 6f |sion..... 0.99 o| 000000a0 72 20 6c 61 74 65 72 29 2e 0d 00 07 05 f4 0d 00 |r later)........| 000000b0 08 27 f4 20 54 68 69 73 20 73 6f 75 72 63 65 20 |.'. This source | 000000c0 63 6f 64 65 20 6d 61 79 20 6e 6f 74 20 72 75 6e |code may not run| 000000d0 20 77 69 74 68 0d 00 09 23 f4 20 74 68 65 20 57 | with...#. the W| 000000e0 69 6d 70 53 6c 6f 74 20 61 6c 6c 6f 63 61 74 65 |impSlot allocate| 000000f0 64 20 74 6f 20 74 68 65 0d 00 0a 26 f4 20 63 72 |d to the...&. cr| 00000100 75 6e 63 68 65 64 20 21 52 75 6e 49 6d 61 67 65 |unched !RunImage| 00000110 3b 20 79 6f 75 20 6d 61 79 20 6e 65 65 64 0d 00 |; you may need..| 00000120 0b 21 f4 20 74 6f 20 69 6e 63 72 65 61 73 65 20 |.!. to increase | 00000130 74 68 65 20 73 6c 6f 74 20 62 79 20 74 68 65 0d |the slot by the.| 00000140 00 0c 26 f4 20 64 69 66 66 65 72 65 6e 63 65 20 |..&. difference | 00000150 69 6e 20 66 69 6c 65 20 73 69 7a 65 2c 20 72 6f |in file size, ro| 00000160 75 6e 64 65 64 0d 00 0d 17 f4 20 75 70 20 74 6f |unded..... up to| 00000170 20 61 20 34 4b 20 62 6c 6f 63 6b 2e 0d 00 0e 05 | a 4K block.....| 00000180 f4 0d 00 0f 18 f4 20 28 43 29 20 48 69 70 70 6f |...... (C) Hippo| 00000190 73 6f 66 74 20 31 39 39 35 0d 00 10 04 0d 00 11 |soft 1995.......| 000001a0 62 ee 20 85 3a ee 20 85 20 87 3a f2 63 6c 6f 73 |b. .:. . .:.clos| 000001b0 65 63 68 6f 69 63 65 73 3a f2 72 65 73 74 6f 72 |echoices:.restor| 000001c0 65 6d 6f 64 65 3a c8 99 20 22 48 6f 75 72 67 6c |emode:.. "Hourgl| 000001d0 61 73 73 5f 53 6d 61 73 68 22 3a f2 65 78 69 74 |ass_Smash":.exit| 000001e0 3a 85 20 9f 2c f6 24 2b 22 20 28 61 74 20 6c 69 |:. .,.$+" (at li| 000001f0 6e 65 20 22 2b c3 28 9e 29 2b 22 29 22 3a e0 0d |ne "+.(.)+")":..| 00000200 00 12 04 0d 00 13 0f 63 68 6f 69 63 65 66 68 25 |.......choicefh%| 00000210 3d 30 0d 00 14 10 72 65 74 75 72 6e 74 6f 25 3d |=0....returnto%=| 00000220 2d 31 0d 00 15 0c de 20 62 25 20 32 35 36 0d 00 |-1..... b% 256..| 00000230 16 09 21 62 25 3d 33 0d 00 17 0a 62 25 21 34 3d |..!b%=3....b%!4=| 00000240 35 0d 00 18 0f 62 25 21 38 3d 26 34 30 30 43 31 |5....b%!8=&400C1| 00000250 0d 00 19 0b 62 25 21 31 32 3d 30 0d 00 1a 43 c8 |....b%!12=0...C.| 00000260 99 20 22 57 69 6d 70 5f 49 6e 69 74 69 61 6c 69 |. "Wimp_Initiali| 00000270 73 65 22 2c 33 35 30 2c 26 34 42 35 33 34 31 35 |se",350,&4B53415| 00000280 34 2c 22 53 77 69 66 74 4a 50 45 47 22 2c 62 25 |4,"SwiftJPEG",b%| 00000290 20 b8 20 77 69 6d 70 25 2c 74 61 73 6b 25 0d 00 | . wimp%,task%..| 000002a0 1b 04 0d 00 1c 49 e7 20 77 69 6d 70 25 3c 33 35 |.....I. wimp%<35| 000002b0 30 20 8c 20 85 20 34 39 30 2c 22 53 77 69 66 74 |0 . . 490,"Swift| 000002c0 4a 50 45 47 20 72 65 71 75 69 72 65 73 20 52 49 |JPEG requires RI| 000002d0 53 43 20 4f 53 20 33 2e 35 30 20 6f 72 20 6c 61 |SC OS 3.50 or la| 000002e0 74 65 72 20 74 6f 20 72 75 6e 22 0d 00 1d 04 0d |ter to run".....| 000002f0 00 1e 1b c8 99 20 22 48 6f 75 72 67 6c 61 73 73 |..... "Hourglass| 00000300 5f 53 74 61 72 74 22 2c 35 30 0d 00 1f 04 0d 00 |_Start",50......| 00000310 20 1f 76 65 72 73 69 6f 6e 24 3d 22 30 2e 30 36 | .version$="0.06| 00000320 20 28 30 39 20 4e 6f 76 20 39 35 29 22 0d 00 21 | (09 Nov 95)"..!| 00000330 04 0d 00 22 13 f2 69 6e 69 74 69 61 6c 69 73 65 |..."..initialise| 00000340 6d 61 69 6e 0d 00 23 0c f2 69 63 6f 6e 62 61 72 |main..#..iconbar| 00000350 0d 00 24 04 0d 00 25 16 c8 99 20 22 48 6f 75 72 |..$...%... "Hour| 00000360 67 6c 61 73 73 5f 4f 66 66 22 0d 00 26 04 0d 00 |glass_Off"..&...| 00000370 27 0d f2 67 65 74 70 28 61 24 29 0d 00 28 0e e7 |'..getp(a$)..(..| 00000380 20 61 24 3c 3e 22 22 20 8c 0d 00 29 0a 21 62 25 | a$<>"" ...).!b%| 00000390 3d 2d 31 0d 00 2a 17 62 25 21 34 30 3d a4 66 69 |=-1..*.b%!40=.fi| 000003a0 6c 65 74 79 70 65 28 61 24 29 0d 00 2b 0f 24 28 |letype(a$)..+.$(| 000003b0 62 25 2b 34 34 29 3d 61 24 0d 00 2c 10 f2 6c 6f |b%+44)=a$..,..lo| 000003c0 61 64 70 69 63 74 75 72 65 0d 00 2d 05 cd 0d 00 |adpicture..-....| 000003d0 2e 04 0d 00 2f 05 f5 0d 00 30 09 f2 70 6f 6c 6c |..../....0..poll| 000003e0 0d 00 31 0b fd 20 71 75 69 74 25 0d 00 32 04 0d |..1.. quit%..2..| 000003f0 00 33 09 f2 65 78 69 74 0d 00 34 05 e0 0d 00 35 |.3..exit..4....5| 00000400 05 3a 0d 00 36 04 0d 00 37 04 0d 00 38 20 f4 20 |.:..6...7...8 . | 00000410 2d 2d 20 47 65 6e 65 72 61 6c 20 57 49 4d 50 20 |-- General WIMP | 00000420 70 72 6f 63 65 64 75 72 65 73 0d 00 39 04 0d 00 |procedures..9...| 00000430 3a 04 0d 00 3b 0b dd 20 f2 65 78 69 74 0d 00 3c |:...;.. .exit..<| 00000440 28 c8 99 20 22 58 57 69 6d 70 5f 43 6c 6f 73 65 |(.. "XWimp_Close| 00000450 44 6f 77 6e 22 2c 74 61 73 6b 25 2c 26 34 42 35 |Down",task%,&4B5| 00000460 33 34 31 35 34 0d 00 3d 05 e1 0d 00 3e 05 3a 0d |34154..=....>.:.| 00000470 00 3f 0f dd 20 f2 6d 65 6d 75 73 61 67 65 0d 00 |.?.. .memusage..| 00000480 40 07 eb 20 eb 0d 00 41 24 f1 20 22 4d 65 6d 6f |@.. ...A$. "Memo| 00000490 72 79 20 66 72 65 65 20 20 20 20 20 20 20 20 20 |ry free | 000004a0 20 20 3a 20 22 3b 93 2d e0 0d 00 42 37 f1 20 22 | : ";.-...B7. "| 000004b0 43 6f 75 6c 64 20 64 65 63 72 65 61 73 65 20 73 |Could decrease s| 000004c0 6c 6f 74 20 62 79 3a 20 22 3b 28 28 28 93 2d e0 |lot by: ";(((.-.| 000004d0 29 20 81 20 34 30 39 36 29 2a 34 29 3b 22 4b 22 |) . 4096)*4);"K"| 000004e0 0d 00 43 45 f1 20 22 54 68 61 74 20 77 6f 75 6c |..CE. "That woul| 000004f0 64 20 6c 65 61 76 65 20 66 72 65 65 20 3a 20 22 |d leave free : "| 00000500 3b 28 93 2d e0 29 2d 28 28 28 93 2d e0 29 20 81 |;(.-.)-(((.-.) .| 00000510 20 34 30 39 36 29 2a 34 30 39 36 29 3b 22 20 62 | 4096)*4096);" b| 00000520 79 74 65 73 22 0d 00 44 05 e1 0d 00 45 04 0d 00 |ytes"..D....E...| 00000530 46 05 3a 0d 00 47 0b dd 20 f2 70 6f 6c 6c 0d 00 |F.:..G.. .poll..| 00000540 48 22 c8 99 20 22 4f 53 5f 52 65 61 64 4d 6f 6e |H".. "OS_ReadMon| 00000550 6f 74 6f 6e 69 63 54 69 6d 65 22 20 b8 20 61 25 |otonicTime" . a%| 00000560 0d 00 49 2e c8 99 20 22 57 69 6d 70 5f 50 6f 6c |..I... "Wimp_Pol| 00000570 6c 49 64 6c 65 22 2c 31 2c 62 25 2c 61 25 2b 31 |lIdle",1,b%,a%+1| 00000580 30 30 30 30 20 b8 20 72 65 61 73 6f 6e 25 0d 00 |0000 . reason%..| 00000590 4a 04 0d 00 4b 25 e7 20 28 72 65 74 75 72 6e 74 |J...K%. (returnt| 000005a0 6f 25 3c 3e 2d 31 29 20 80 20 28 72 65 61 73 6f |o%<>-1) . (reaso| 000005b0 6e 25 3d 31 29 20 8c 0d 00 4c 10 f2 72 65 73 74 |n%=1) ...L..rest| 000005c0 6f 72 65 6d 6f 64 65 0d 00 4d 0f 61 62 6f 72 74 |oremode..M.abort| 000005d0 6d 75 6c 25 3d a3 0d 00 4e 13 e7 20 63 6c 6f 73 |mul%=...N.. clos| 000005e0 65 64 69 73 25 3d 30 20 8c 0d 00 4f 12 21 66 72 |edis%=0 ...O.!fr| 000005f0 25 3d 64 69 73 70 6c 61 79 68 25 0d 00 50 20 c8 |%=displayh%..P .| 00000600 99 20 22 57 69 6d 70 5f 47 65 74 57 69 6e 64 6f |. "Wimp_GetWindo| 00000610 77 49 6e 66 6f 22 2c 2c 66 72 25 0d 00 51 0b 66 |wInfo",,fr%..Q.f| 00000620 72 25 21 34 3d 30 0d 00 52 0b 66 72 25 21 38 3d |r%!4=0..R.fr%!8=| 00000630 30 0d 00 53 13 66 72 25 21 31 32 3d 26 37 46 46 |0..S.fr%!12=&7FF| 00000640 46 46 46 46 0d 00 54 13 66 72 25 21 31 36 3d 26 |FFFF..T.fr%!16=&| 00000650 37 46 46 46 46 46 46 0d 00 55 1d c8 99 20 22 57 |7FFFFFF..U... "W| 00000660 69 6d 70 5f 4f 70 65 6e 57 69 6e 64 6f 77 22 2c |imp_OpenWindow",| 00000670 2c 66 72 25 0d 00 56 1c f2 6f 70 65 6e 63 65 6e |,fr%..V..opencen| 00000680 74 65 72 65 64 28 64 69 73 70 6c 61 79 68 25 29 |tered(displayh%)| 00000690 0d 00 57 05 cc 0d 00 58 0d 72 65 61 73 6f 6e 25 |..W....X.reason%| 000006a0 3d 33 0d 00 59 11 21 62 25 3d 64 69 73 70 6c 61 |=3..Y.!b%=displa| 000006b0 79 68 25 0d 00 5a 05 cd 0d 00 5b 05 cd 0d 00 5c |yh%..Z....[....\| 000006c0 04 0d 00 5d 10 c8 8e 20 72 65 61 73 6f 6e 25 20 |...]... reason% | 000006d0 ca 0d 00 5e 0f c9 20 31 3a f2 72 65 64 72 61 77 |...^.. 1:.redraw| 000006e0 0d 00 5f 20 c9 20 32 3a c8 99 20 22 57 69 6d 70 |.._ . 2:.. "Wimp| 000006f0 5f 4f 70 65 6e 57 69 6e 64 6f 77 22 2c 2c 62 25 |_OpenWindow",,b%| 00000700 0d 00 60 07 c9 20 33 0d 00 61 0c c8 8e 20 21 62 |..`.. 3..a... !b| 00000710 25 20 ca 0d 00 62 0f c9 20 64 69 73 70 6c 61 79 |% ...b.. display| 00000720 68 25 0d 00 63 1a c8 99 20 22 4f 53 5f 42 79 74 |h%..c... "OS_Byt| 00000730 65 22 2c 31 32 31 20 b8 20 2c 61 25 0d 00 64 29 |e",121 . ,a%..d)| 00000740 e7 20 28 61 25 3c 3e 30 29 20 8c 20 c8 99 20 22 |. (a%<>0) . .. "| 00000750 57 69 6d 70 5f 43 6c 6f 73 65 57 69 6e 64 6f 77 |Wimp_CloseWindow| 00000760 22 2c 2c 62 25 0d 00 65 1e f2 73 65 74 73 6c 6f |",,b%..e..setslo| 00000770 74 73 69 7a 65 28 62 61 73 69 73 6c 6f 74 25 2c |tsize(basislot%,| 00000780 61 25 29 0d 00 66 21 f2 67 72 65 79 6f 75 74 6d |a%)..f!.greyoutm| 00000790 65 6e 75 28 6d 61 69 6e 6d 65 6e 75 61 64 64 72 |enu(mainmenuaddr| 000007a0 25 2c 32 29 0d 00 67 21 f2 67 72 65 79 6f 75 74 |%,2)..g!.greyout| 000007b0 6d 65 6e 75 28 6d 61 69 6e 6d 65 6e 75 61 64 64 |menu(mainmenuadd| 000007c0 72 25 2c 33 29 0d 00 68 0f c8 97 20 61 25 2c 63 |r%,3)..h... a%,c| 000007d0 25 2c 64 25 0d 00 69 10 e7 20 28 64 25 20 83 20 |%,d%..i.. (d% . | 000007e0 32 29 20 8c 0d 00 6a 08 63 25 3d a3 0d 00 6b 1e |2) ...j.c%=...k.| 000007f0 e3 20 61 25 3d a9 28 6a 70 65 67 6e 61 6d 65 24 |. a%=.(jpegname$| 00000800 29 20 b8 20 31 20 88 20 2d 31 0d 00 6c 41 e7 20 |) . 1 . -1..lA. | 00000810 c1 6a 70 65 67 6e 61 6d 65 24 2c 61 25 2c 31 29 |.jpegname$,a%,1)| 00000820 3d 22 2e 22 20 8c 20 6a 70 65 67 6e 61 6d 65 24 |="." . jpegname$| 00000830 3d c0 6a 70 65 67 6e 61 6d 65 24 2c 61 25 2d 31 |=.jpegname$,a%-1| 00000840 29 3a 61 25 3d 30 3a 63 25 3d b9 0d 00 6d 05 ed |):a%=0:c%=...m..| 00000850 0d 00 6e 3a e7 20 63 25 3c 3e a3 20 80 20 6a 70 |..n:. c%<>. . jp| 00000860 65 67 6e 61 6d 65 24 3c 3e 22 22 20 8c 20 ff 20 |egname$<>"" . . | 00000870 22 46 69 6c 65 72 5f 4f 70 65 6e 44 69 72 20 22 |"Filer_OpenDir "| 00000880 2b 6a 70 65 67 6e 61 6d 65 24 0d 00 6f 05 cd 0d |+jpegname$..o...| 00000890 00 70 0f c9 20 63 68 6f 69 63 65 73 68 25 0d 00 |.p.. choicesh%..| 000008a0 71 0d 69 63 6f 6e 68 25 3d 31 32 0d 00 72 0b 61 |q.iconh%=12..r.a| 000008b0 64 6a 75 25 3d 30 0d 00 73 1f f2 73 65 74 6f 70 |dju%=0..s..setop| 000008c0 74 28 63 68 6f 69 63 65 73 68 25 2c 69 63 6f 6e |t(choicesh%,icon| 000008d0 68 25 2c b9 29 0d 00 74 11 f2 63 68 6f 69 63 65 |h%,.)..t..choice| 000008e0 73 63 6c 69 63 6b 0d 00 75 1f f2 73 65 74 6f 70 |sclick..u..setop| 000008f0 74 28 63 68 6f 69 63 65 73 68 25 2c 69 63 6f 6e |t(choicesh%,icon| 00000900 68 25 2c a3 29 0d 00 76 05 7f 0d 00 77 1d c8 99 |h%,.)..v....w...| 00000910 20 22 57 69 6d 70 5f 43 6c 6f 73 65 57 69 6e 64 | "Wimp_CloseWind| 00000920 6f 77 22 2c 2c 62 25 0d 00 78 05 cb 0d 00 79 0e |ow",,b%..x....y.| 00000930 c9 20 36 3a f2 63 6c 69 63 6b 0d 00 7a 11 c9 20 |. 6:.click..z.. | 00000940 38 3a f2 6b 65 79 62 6f 61 72 64 0d 00 7b 13 c9 |8:.keyboard..{..| 00000950 20 39 3a f2 6d 65 6e 75 73 65 6c 65 63 74 0d 00 | 9:.menuselect..| 00000960 7c 17 c9 20 31 37 2c 31 38 2c 31 39 3a f2 6d 65 ||.. 17,18,19:.me| 00000970 73 73 61 67 65 0d 00 7d 05 cb 0d 00 7e 05 e1 0d |ssage..}....~...| 00000980 00 7f 05 3a 0d 00 80 0c dd 20 f2 63 6c 69 63 6b |...:..... .click| 00000990 0d 00 81 10 77 69 6e 64 68 25 3d 62 25 21 31 32 |....windh%=b%!12| 000009a0 0d 00 82 10 69 63 6f 6e 68 25 3d 62 25 21 31 36 |....iconh%=b%!16| 000009b0 0d 00 83 14 61 64 6a 75 25 3d 28 62 25 21 38 29 |....adju%=(b%!8)| 000009c0 20 80 20 31 0d 00 84 14 6d 65 6e 75 25 3d 28 62 | . 1....menu%=(b| 000009d0 25 21 38 29 20 80 20 32 0d 00 85 14 73 65 6c 65 |%!8) . 2....sele| 000009e0 25 3d 28 62 25 21 38 29 20 80 20 34 0d 00 86 04 |%=(b%!8) . 4....| 000009f0 0d 00 87 0f c8 8e 20 77 69 6e 64 68 25 20 ca 0d |...... windh% ..| 00000a00 00 88 04 0d 00 89 08 c9 20 2d 32 0d 00 8a 23 e7 |........ -2...#.| 00000a10 20 a4 6f 70 65 6e 28 64 69 73 70 6c 61 79 68 25 | .open(displayh%| 00000a20 29 20 80 20 61 64 6a 75 25 3c 3e 30 20 8c 0d 00 |) . adju%<>0 ...| 00000a30 8b 0f f2 66 75 6c 6c 73 63 72 65 65 6e 0d 00 8c |...fullscreen...| 00000a40 05 cc 0d 00 8d 14 f2 6f 70 65 6e 6d 61 69 6e 6d |.......openmainm| 00000a50 65 6e 75 28 a3 29 0d 00 8e 05 cd 0d 00 8f 20 c9 |enu(.)........ .| 00000a60 20 64 69 73 70 6c 61 79 68 25 3a f2 6f 70 65 6e | displayh%:.open| 00000a70 6d 61 69 6e 6d 65 6e 75 28 b9 29 0d 00 90 17 c9 |mainmenu(.).....| 00000a80 20 7a 6f 6f 6d 68 25 3a f2 7a 6f 6f 6d 63 6c 69 | zoomh%:.zoomcli| 00000a90 63 6b 0d 00 91 1d c9 20 63 68 6f 69 63 65 73 68 |ck..... choicesh| 00000aa0 25 3a f2 63 68 6f 69 63 65 73 63 6c 69 63 6b 0d |%:.choicesclick.| 00000ab0 00 92 04 0d 00 93 05 cb 0d 00 94 04 0d 00 95 05 |................| 00000ac0 e1 0d 00 96 05 3a 0d 00 97 0f dd 20 f2 6b 65 79 |.....:..... .key| 00000ad0 62 6f 61 72 64 0d 00 98 08 ea 20 61 25 0d 00 99 |board..... a%...| 00000ae0 08 61 25 3d a3 0d 00 9a 0e 77 69 6e 64 68 25 3d |.a%=.....windh%=| 00000af0 21 62 25 0d 00 9b 0f 69 63 6f 6e 68 25 3d 62 25 |!b%....iconh%=b%| 00000b00 21 34 0d 00 9c 04 0d 00 9d 0f c8 8e 20 77 69 6e |!4.......... win| 00000b10 64 68 25 20 ca 0d 00 9e 04 0d 00 9f 0c c9 20 7a |dh% .......... z| 00000b20 6f 6f 6d 68 25 0d 00 a0 0e c8 8e 20 62 25 21 32 |oomh%...... b%!2| 00000b30 34 20 ca 0d 00 a1 0a c9 20 26 30 30 44 0d 00 a2 |4 ...... &00D...| 00000b40 08 61 25 3d b9 0d 00 a3 6c e7 20 bb 28 a4 74 65 |.a%=....l. .(.te| 00000b50 78 74 75 6e 74 69 6c 28 21 28 7a 6f 77 25 2b 31 |xtuntil(!(zow%+1| 00000b60 30 38 2b 33 32 2a 69 63 6f 6e 68 25 29 2c 33 33 |08+32*iconh%),33| 00000b70 29 29 3e 32 30 20 8c 20 24 28 21 28 7a 6f 77 25 |))>20 . $(!(zow%| 00000b80 2b 31 30 38 2b 33 32 2a 69 63 6f 6e 68 25 29 29 |+108+32*iconh%))| 00000b90 3d 22 32 30 22 3a f2 66 6f 72 63 65 72 65 64 72 |="20":.forceredr| 00000ba0 61 77 28 7a 6f 6f 6d 68 25 2c 69 63 6f 6e 68 25 |aw(zoomh%,iconh%| 00000bb0 29 0d 00 a4 6a e7 20 bb 28 a4 74 65 78 74 75 6e |)...j. .(.textun| 00000bc0 74 69 6c 28 21 28 7a 6f 77 25 2b 31 30 38 2b 33 |til(!(zow%+108+3| 00000bd0 32 2a 69 63 6f 6e 68 25 29 2c 33 33 29 29 3c 31 |2*iconh%),33))<1| 00000be0 20 8c 20 24 28 21 28 7a 6f 77 25 2b 31 30 38 2b | . $(!(zow%+108+| 00000bf0 33 32 2a 69 63 6f 6e 68 25 29 29 3d 22 31 22 3a |32*iconh%))="1":| 00000c00 f2 66 6f 72 63 65 72 65 64 72 61 77 28 7a 6f 6f |.forceredraw(zoo| 00000c10 6d 68 25 2c 69 63 6f 6e 68 25 29 0d 00 a5 10 e7 |mh%,iconh%).....| 00000c20 20 69 63 6f 6e 68 25 3d 32 20 8c 0d 00 a6 0c 69 | iconh%=2 .....i| 00000c30 63 6f 6e 68 25 3d 34 0d 00 a7 56 c8 99 20 22 57 |conh%=4...V.. "W| 00000c40 69 6d 70 5f 53 65 74 43 61 72 65 74 50 6f 73 69 |imp_SetCaretPosi| 00000c50 74 69 6f 6e 22 2c 7a 6f 6f 6d 68 25 2c 34 2c 62 |tion",zoomh%,4,b| 00000c60 25 21 38 2c 62 25 21 31 32 2c 62 25 21 31 36 2c |%!8,b%!12,b%!16,| 00000c70 a9 28 a4 74 65 78 74 75 6e 74 69 6c 28 21 28 7a |.(.textuntil(!(z| 00000c80 6f 77 25 2b 32 33 36 29 2c 33 33 29 29 0d 00 a8 |ow%+236),33))...| 00000c90 05 cc 0d 00 a9 0c 69 63 6f 6e 68 25 3d 32 0d 00 |......iconh%=2..| 00000ca0 aa 1b c8 99 20 22 57 69 6d 70 5f 43 72 65 61 74 |.... "Wimp_Creat| 00000cb0 65 4d 65 6e 75 22 2c 2d 31 0d 00 ab 05 cd 0d 00 |eMenu",-1.......| 00000cc0 ac 0c f2 6b 65 79 7a 6f 6f 6d 0d 00 ad 10 e7 20 |...keyzoom..... | 00000cd0 69 63 6f 6e 68 25 3d 34 20 8c 0d 00 ae 23 c8 99 |iconh%=4 ....#..| 00000ce0 20 22 57 69 6d 70 5f 47 65 74 43 61 72 65 74 50 | "Wimp_GetCaretP| 00000cf0 6f 73 69 74 69 6f 6e 22 2c 2c 66 72 25 0d 00 af |osition",,fr%...| 00000d00 23 f2 73 68 6f 77 6d 65 6e 75 28 74 6f 70 6d 65 |#.showmenu(topme| 00000d10 6e 75 25 2c 74 6f 70 78 25 2c 74 6f 70 79 25 29 |nu%,topx%,topy%)| 00000d20 0d 00 b0 44 c8 99 20 22 57 69 6d 70 5f 53 65 74 |...D.. "Wimp_Set| 00000d30 43 61 72 65 74 50 6f 73 69 74 69 6f 6e 22 2c 21 |CaretPosition",!| 00000d40 66 72 25 2c 66 72 25 21 34 2c 66 72 25 21 38 2c |fr%,fr%!4,fr%!8,| 00000d50 66 72 25 21 31 32 2c 66 72 25 21 31 36 2c 66 72 |fr%!12,fr%!16,fr| 00000d60 25 21 32 30 0d 00 b1 05 cd 0d 00 b2 05 cb 0d 00 |%!20............| 00000d70 b3 04 0d 00 b4 05 cb 0d 00 b5 04 0d 00 b6 27 e7 |..............'.| 00000d80 20 61 25 3d a3 20 8c 20 c8 99 20 22 57 69 6d 70 | a%=. . .. "Wimp| 00000d90 5f 50 72 6f 63 65 73 73 4b 65 79 22 2c 62 25 21 |_ProcessKey",b%!| 00000da0 32 34 0d 00 b7 05 e1 0d 00 b8 05 3a 0d 00 b9 0e |24.........:....| 00000db0 dd 20 f2 6d 65 73 73 61 67 65 0d 00 ba 04 0d 00 |. .message......| 00000dc0 bb 0e c8 8e 20 62 25 21 31 36 20 ca 0d 00 bc 04 |.... b%!16 .....| 00000dd0 0d 00 bd 0f c9 20 30 3a 71 75 69 74 25 3d b9 0d |..... 0:quit%=..| 00000de0 00 be 16 c9 20 33 2c 35 3a f2 6c 6f 61 64 70 69 |.... 3,5:.loadpi| 00000df0 63 74 75 72 65 0d 00 bf 33 c9 20 26 34 30 30 43 |cture...3. &400C| 00000e00 31 3a e7 20 a4 6f 70 65 6e 28 64 69 73 70 6c 61 |1:. .open(displa| 00000e10 79 68 25 29 20 8c 20 f2 72 65 73 69 7a 65 6d 61 |yh%) . .resizema| 00000e20 69 6e 77 69 6e 64 6f 77 0d 00 c0 04 0d 00 c1 05 |inwindow........| 00000e30 cb 0d 00 c2 04 0d 00 c3 05 e1 0d 00 c4 05 3a 0d |..............:.| 00000e40 00 c5 1b dd 20 f2 73 65 74 73 6c 6f 74 73 69 7a |.... .setslotsiz| 00000e50 65 28 61 25 2c f8 20 65 25 29 0d 00 c6 41 f4 20 |e(a%,. e%)...A. | 00000e60 50 61 73 73 20 74 68 65 20 61 62 73 6f 6c 75 74 |Pass the absolut| 00000e70 65 20 73 6c 6f 74 20 73 69 7a 65 20 79 6f 75 20 |e slot size you | 00000e80 77 61 6e 74 20 74 6f 20 73 65 74 2c 20 61 6e 64 |want to set, and| 00000e90 20 61 20 76 61 72 69 61 62 6c 65 0d 00 c7 39 f4 | a variable...9.| 00000ea0 20 69 6e 74 6f 20 77 68 69 63 68 20 74 68 65 20 | into which the | 00000eb0 73 6c 6f 74 20 73 69 7a 65 20 6f 6e 20 65 78 69 |slot size on exi| 00000ec0 74 20 66 72 6f 6d 20 74 68 65 20 70 72 6f 63 65 |t from the proce| 00000ed0 64 75 72 65 0d 00 c8 10 f4 20 69 73 20 70 61 73 |dure..... is pas| 00000ee0 73 65 64 2e 0d 00 c9 04 0d 00 ca 0b ea 20 63 25 |sed.......... c%| 00000ef0 2c 64 25 0d 00 cb 04 0d 00 cc 40 f4 20 52 65 61 |,d%.......@. Rea| 00000f00 64 20 74 68 65 20 73 69 7a 65 20 6f 66 20 74 68 |d the size of th| 00000f10 65 20 43 75 72 72 65 6e 74 20 73 6c 6f 74 20 61 |e Current slot a| 00000f20 6e 64 20 46 72 65 65 20 70 6f 6f 6c 2e 20 54 68 |nd Free pool. Th| 00000f30 65 20 74 6f 74 61 6c 0d 00 cd 40 f4 20 66 72 65 |e total...@. fre| 00000f40 65 20 73 70 61 63 65 20 69 73 20 74 68 65 6e 20 |e space is then | 00000f50 69 6e 20 64 25 20 73 69 6e 63 65 20 74 68 65 20 |in d% since the | 00000f60 46 72 65 65 20 70 6f 6f 6c 20 69 73 20 74 68 65 |Free pool is the| 00000f70 20 67 6c 6f 62 61 6c 0d 00 ce 3d f4 20 66 72 65 | global...=. fre| 00000f80 65 20 73 70 61 63 65 20 72 61 74 68 65 72 20 74 |e space rather t| 00000f90 68 61 6e 20 74 68 65 20 57 69 6d 70 20 64 65 66 |han the Wimp def| 00000fa0 69 6e 69 74 69 6f 6e 20 77 68 69 63 68 20 69 73 |inition which is| 00000fb0 20 74 68 65 0d 00 cf 39 f4 20 67 6c 6f 62 61 6c | the...9. global| 00000fc0 20 66 72 65 65 20 73 70 61 63 65 20 6d 69 6e 75 | free space minu| 00000fd0 73 20 74 68 65 20 73 70 61 63 65 20 69 6e 20 74 |s the space in t| 00000fe0 68 65 20 4e 65 78 74 20 73 6c 6f 74 2e 0d 00 d0 |he Next slot....| 00000ff0 04 0d 00 d1 25 c8 99 20 22 57 69 6d 70 5f 53 6c |....%.. "Wimp_Sl| 00001000 6f 74 53 69 7a 65 22 2c 2d 31 2c 2d 31 20 b8 20 |otSize",-1,-1 . | 00001010 63 25 2c 2c 64 25 0d 00 d2 04 0d 00 d3 46 f4 20 |c%,,d%.......F. | 00001020 49 66 20 74 68 65 20 63 75 72 72 65 6e 74 20 73 |If the current s| 00001030 6c 6f 74 20 69 73 6e 27 74 20 74 68 65 20 73 69 |lot isn't the si| 00001040 7a 65 20 72 65 71 75 65 73 74 65 64 20 61 6c 72 |ze requested alr| 00001050 65 61 64 79 2c 20 61 6e 64 20 69 66 20 74 68 65 |eady, and if the| 00001060 0d 00 d4 44 f4 20 73 69 7a 65 20 6f 66 20 74 68 |...D. size of th| 00001070 65 20 66 72 65 65 20 6d 65 6d 6f 72 79 20 70 6c |e free memory pl| 00001080 75 73 20 74 68 65 20 62 61 73 69 63 20 73 6c 6f |us the basic slo| 00001090 74 20 69 73 20 67 72 65 61 74 65 72 20 74 68 61 |t is greater tha| 000010a0 6e 20 6f 72 0d 00 d5 4b f4 20 65 71 75 61 6c 20 |n or...K. equal | 000010b0 74 6f 20 74 68 65 20 61 6d 6f 75 6e 74 20 77 65 |to the amount we| 000010c0 20 77 61 6e 74 20 74 6f 20 63 6c 61 69 6d 20 28 | want to claim (| 000010d0 69 2e 65 2e 2c 20 69 66 20 74 68 65 72 65 20 69 |i.e., if there i| 000010e0 73 20 65 6e 6f 75 67 68 20 66 72 65 65 21 29 0d |s enough free!).| 000010f0 00 d6 21 f4 20 74 68 65 6e 20 74 68 65 20 6d 65 |..!. then the me| 00001100 6d 6f 72 79 20 69 73 20 63 6c 61 69 6d 65 64 2e |mory is claimed.| 00001110 0d 00 d7 04 0d 00 d8 1c c8 99 20 22 57 69 6d 70 |.......... "Wimp| 00001120 5f 53 6c 6f 74 53 69 7a 65 22 2c 61 25 2c 2d 31 |_SlotSize",a%,-1| 00001130 0d 00 d9 04 0d 00 da 48 f4 20 4e 6f 77 20 72 65 |.......H. Now re| 00001140 61 64 20 74 68 65 20 43 75 72 72 65 6e 74 20 73 |ad the Current s| 00001150 6c 6f 74 20 61 67 61 69 6e 2e 20 54 68 69 73 20 |lot again. This | 00001160 77 69 6c 6c 20 72 65 74 75 72 6e 20 65 69 74 68 |will return eith| 00001170 65 72 20 61 6e 20 61 6d 6f 75 6e 74 0d 00 db 4c |er an amount...L| 00001180 f4 20 67 72 65 61 74 65 72 20 74 68 61 6e 20 62 |. greater than b| 00001190 61 73 69 73 6c 6f 74 25 20 69 6e 20 77 68 69 63 |asislot% in whic| 000011a0 68 20 63 61 73 65 20 74 68 65 20 61 6c 6c 6f 63 |h case the alloc| 000011b0 61 74 69 6f 6e 20 77 61 73 20 73 75 63 63 65 73 |ation was succes| 000011c0 73 66 75 6c 2c 20 6f 72 0d 00 dc 4b f4 20 69 74 |sful, or...K. it| 000011d0 20 77 69 6c 6c 20 72 65 74 75 72 6e 20 62 61 73 | will return bas| 000011e0 69 73 6c 6f 74 25 20 64 69 72 65 63 74 6c 79 2c |islot% directly,| 000011f0 20 69 6e 20 77 68 69 63 68 20 63 61 73 65 20 74 | in which case t| 00001200 68 65 72 65 20 77 61 73 20 6e 6f 74 20 65 6e 6f |here was not eno| 00001210 75 67 68 0d 00 dd 4b f4 20 6d 65 6d 6f 72 79 2e |ugh...K. memory.| 00001220 20 54 68 65 20 65 72 72 6f 72 20 66 6f 72 20 74 | The error for t| 00001230 68 69 73 20 69 73 20 68 61 6e 64 6c 65 64 20 62 |his is handled b| 00001240 79 20 74 68 65 20 63 61 6c 6c 65 72 20 6f 66 20 |y the caller of | 00001250 74 68 65 20 70 72 6f 63 65 64 75 72 65 2e 0d 00 |the procedure...| 00001260 de 04 0d 00 df 21 c8 99 20 22 57 69 6d 70 5f 53 |.....!.. "Wimp_S| 00001270 6c 6f 74 53 69 7a 65 22 2c 2d 31 2c 2d 31 20 b8 |lotSize",-1,-1 .| 00001280 20 65 25 0d 00 e0 05 e1 0d 00 e1 05 3a 0d 00 e2 | e%.........:...| 00001290 0d dd 20 f2 72 65 64 72 61 77 0d 00 e3 08 ea 20 |.. .redraw..... | 000012a0 61 25 0d 00 e4 23 c8 99 20 22 57 69 6d 70 5f 52 |a%...#.. "Wimp_R| 000012b0 65 64 72 61 77 57 69 6e 64 6f 77 22 2c 2c 62 25 |edrawWindow",,b%| 000012c0 20 b8 20 61 25 0d 00 e5 09 c8 95 20 61 25 0d 00 | . a%...... a%..| 000012d0 e6 56 f4 20 53 59 53 20 22 4a 50 45 47 5f 50 6c |.V. SYS "JPEG_Pl| 000012e0 6f 74 53 63 61 6c 65 64 22 2c 62 61 73 65 6d 65 |otScaled",baseme| 000012f0 6d 6f 25 2c 62 25 21 34 2d 62 25 21 32 30 2c 62 |mo%,b%!4-b%!20,b| 00001300 25 21 31 36 2d 77 69 6e 64 68 65 69 67 25 2d 62 |%!16-windheig%-b| 00001310 25 21 32 34 2c 30 2c 6a 70 65 67 6c 65 6e 67 25 |%!24,0,jpegleng%| 00001320 2c 64 66 25 0d 00 e7 55 c8 99 20 22 4a 50 45 47 |,df%...U.. "JPEG| 00001330 5f 50 6c 6f 74 53 63 61 6c 65 64 22 2c 62 61 73 |_PlotScaled",bas| 00001340 65 6d 65 6d 6f 25 2c 62 25 21 34 2d 62 25 21 32 |ememo%,b%!4-b%!2| 00001350 30 2c 62 25 21 31 36 2d 77 69 6e 64 68 65 69 67 |0,b%!16-windheig| 00001360 25 2d 62 25 21 32 34 2c 73 63 25 2c 6a 70 65 67 |%-b%!24,sc%,jpeg| 00001370 6c 65 6e 67 25 2c 64 66 25 0d 00 e8 23 c8 99 20 |leng%,df%...#.. | 00001380 22 57 69 6d 70 5f 47 65 74 52 65 63 74 61 6e 67 |"Wimp_GetRectang| 00001390 6c 65 22 2c 2c 62 25 20 b8 20 61 25 0d 00 e9 05 |le",,b% . a%....| 000013a0 ce 0d 00 ea 05 e1 0d 00 eb 05 3a 0d 00 ec 19 dd |..........:.....| 000013b0 20 f2 66 6f 72 63 65 72 65 64 72 61 77 28 61 25 | .forceredraw(a%| 000013c0 2c 63 25 29 0d 00 ed 3d f4 20 50 61 73 73 20 61 |,c%)...=. Pass a| 000013d0 20 77 69 6e 64 6f 77 20 61 6e 64 20 69 63 6f 6e | window and icon| 000013e0 20 68 61 6e 64 6c 65 2e 20 50 65 72 66 6f 72 6d | handle. Perform| 000013f0 73 20 61 20 27 74 72 75 65 27 20 72 65 64 72 61 |s a 'true' redra| 00001400 77 0d 00 ee 2e f4 20 6f 66 20 74 68 65 20 69 63 |w..... of the ic| 00001410 6f 6e 20 28 73 6f 20 69 74 20 6d 69 67 68 74 20 |on (so it might | 00001420 66 6c 69 63 6b 65 72 20 61 20 62 69 74 29 2e 0d |flicker a bit)..| 00001430 00 ef 04 0d 00 f0 0b 21 66 72 25 3d 61 25 0d 00 |.......!fr%=a%..| 00001440 f1 0c 66 72 25 21 34 3d 63 25 0d 00 f2 1f c8 99 |..fr%!4=c%......| 00001450 20 22 57 69 6d 70 5f 47 65 74 49 63 6f 6e 53 74 | "Wimp_GetIconSt| 00001460 61 74 65 22 2c 2c 66 72 25 0d 00 f3 39 c8 99 20 |ate",,fr%...9.. | 00001470 22 57 69 6d 70 5f 46 6f 72 63 65 52 65 64 72 61 |"Wimp_ForceRedra| 00001480 77 22 2c 21 66 72 25 2c 66 72 25 21 38 2c 66 72 |w",!fr%,fr%!8,fr| 00001490 25 21 31 32 2c 66 72 25 21 31 36 2c 66 72 25 21 |%!12,fr%!16,fr%!| 000014a0 32 30 0d 00 f4 05 e1 0d 00 f5 05 3a 0d 00 f6 04 |20.........:....| 000014b0 0d 00 f7 04 0d 00 f8 22 f4 20 2d 2d 20 49 6e 69 |.......". -- Ini| 000014c0 74 69 61 6c 69 73 61 74 69 6f 6e 20 70 72 6f 63 |tialisation proc| 000014d0 65 64 75 72 65 73 0d 00 f9 04 0d 00 fa 04 0d 00 |edures..........| 000014e0 fb 15 dd 20 f2 69 6e 69 74 69 61 6c 69 73 65 6d |... .initialisem| 000014f0 61 69 6e 0d 00 fc 3c f4 20 49 6e 69 74 69 61 6c |ain...<. Initial| 00001500 69 73 65 20 66 75 6e 64 61 6d 65 6e 74 61 6c 20 |ise fundamental | 00001510 76 61 72 69 61 62 6c 65 73 20 61 6e 64 20 64 69 |variables and di| 00001520 6d 65 6e 73 69 6f 6e 20 61 72 72 61 79 73 2e 0d |mension arrays..| 00001530 00 fd 04 0d 00 fe 0b 71 75 69 74 25 3d a3 0d 00 |.......quit%=...| 00001540 ff 10 72 65 74 75 72 6e 74 6f 25 3d 2d 31 0d 01 |..returnto%=-1..| 00001550 00 0f 61 62 6f 72 74 6d 75 6c 25 3d a3 0d 01 01 |..abortmul%=....| 00001560 04 0d 01 02 0d 69 73 70 25 3d 31 30 32 34 0d 01 |.....isp%=1024..| 00001570 03 0c de 20 69 62 25 20 33 32 0d 01 04 16 de 20 |... ib% 32..... | 00001580 73 25 20 31 30 32 34 2c 66 72 25 20 31 30 32 34 |s% 1024,fr% 1024| 00001590 0d 01 05 1d de 20 69 25 20 69 73 70 25 2c 6d 25 |..... i% isp%,m%| 000015a0 20 35 31 32 2c 6d 69 25 20 31 30 32 34 0d 01 06 | 512,mi% 1024...| 000015b0 33 de 20 69 6e 77 25 20 37 36 38 2c 64 69 77 25 |3. inw% 768,diw%| 000015c0 20 31 39 32 2c 7a 6f 77 25 20 37 36 38 2c 6a 69 | 192,zow% 768,ji| 000015d0 77 25 20 35 31 32 2c 63 68 77 25 20 31 32 38 30 |w% 512,chw% 1280| 000015e0 0d 01 07 15 de 20 6d 6f 73 25 20 31 32 38 2c 73 |..... mos% 128,s| 000015f0 63 25 20 31 36 0d 01 08 04 0d 01 09 3a f4 20 4c |c% 16.......:. L| 00001600 6f 61 64 20 63 68 6f 69 63 65 73 20 61 6e 64 20 |oad choices and | 00001610 73 70 72 69 74 65 73 20 72 65 6c 65 76 61 6e 74 |sprites relevant| 00001620 20 74 6f 20 63 75 72 72 65 6e 74 20 64 69 73 70 | to current disp| 00001630 6c 61 79 0d 01 0a 11 f4 20 72 65 73 6f 6c 75 74 |lay..... resolut| 00001640 69 6f 6e 2e 0d 01 0b 04 0d 01 0c 10 f2 6c 6f 61 |ion..........loa| 00001650 64 63 68 6f 69 63 65 73 0d 01 0d 10 f2 6c 6f 61 |dchoices.....loa| 00001660 64 73 70 72 69 74 65 73 0d 01 0e 04 0d 01 0f 3f |dsprites.......?| 00001670 f4 20 78 62 69 67 25 2c 20 79 62 69 67 25 20 61 |. xbig%, ybig% a| 00001680 6e 64 20 62 62 70 70 25 20 61 72 65 20 65 76 65 |nd bbpp% are eve| 00001690 6e 74 75 61 6c 6c 79 20 73 65 74 20 67 6c 6f 62 |ntually set glob| 000016a0 61 6c 6c 79 20 74 6f 20 74 68 65 0d 01 10 3e f4 |ally to the...>.| 000016b0 20 78 20 61 6e 64 20 79 20 73 69 7a 65 20 6f 66 | x and y size of| 000016c0 20 74 68 65 20 6c 61 72 67 65 73 74 20 61 76 61 | the largest ava| 000016d0 69 6c 61 62 6c 65 20 73 63 72 65 65 6e 6d 6f 64 |ilable screenmod| 000016e0 65 3b 20 78 63 6c 72 25 2c 0d 01 11 3d f4 20 79 |e; xclr%,...=. y| 000016f0 63 6c 72 25 20 41 4e 44 20 63 62 70 70 25 20 74 |clr% AND cbpp% t| 00001700 6f 20 74 68 65 20 6d 6f 73 74 20 63 6f 6c 6f 75 |o the most colou| 00001710 72 66 75 6c 2e 20 54 68 69 73 20 63 61 6e 20 62 |rful. This can b| 00001720 65 20 64 6f 6e 65 0d 01 12 3f f4 20 68 65 72 65 |e done...?. here| 00001730 2c 20 6f 72 20 77 68 65 6e 20 74 68 65 20 61 63 |, or when the ac| 00001740 74 75 61 6c 20 66 75 6e 63 74 69 6f 6e 20 69 73 |tual function is| 00001750 20 72 65 71 75 65 73 74 65 64 20 28 74 68 65 20 | requested (the | 00001760 63 68 65 63 6b 0d 01 13 40 f4 20 69 73 20 6d 61 |check...@. is ma| 00001770 64 65 20 74 6f 20 73 65 65 20 69 66 20 78 62 69 |de to see if xbi| 00001780 67 25 20 6f 72 20 78 63 6c 72 25 20 61 72 65 20 |g% or xclr% are | 00001790 7a 65 72 6f 2c 20 61 6e 64 20 69 66 20 73 6f 2c |zero, and if so,| 000017a0 20 77 6f 72 6b 0d 01 14 29 f4 20 6f 75 74 20 74 | work...). out t| 000017b0 68 65 20 62 69 67 67 65 73 74 20 6f 72 20 6d 6f |he biggest or mo| 000017c0 73 74 20 63 6f 6c 6f 75 72 66 75 6c 29 2e 0d 01 |st colourful)...| 000017d0 15 04 0d 01 16 0b 78 62 69 67 25 3d 30 0d 01 17 |......xbig%=0...| 000017e0 0b 79 62 69 67 25 3d 30 0d 01 18 0b 62 62 70 70 |.ybig%=0....bbpp| 000017f0 25 3d 30 0d 01 19 04 0d 01 1a 0b 78 63 6c 72 25 |%=0........xclr%| 00001800 3d 30 0d 01 1b 0b 79 63 6c 72 25 3d 30 0d 01 1c |=0....yclr%=0...| 00001810 0b 63 62 70 70 25 3d 30 0d 01 1d 04 0d 01 1e 14 |.cbpp%=0........| 00001820 e7 20 6d 6f 64 65 73 6f 6e 73 25 3c 3e 30 20 8c |. modesons%<>0 .| 00001830 0d 01 1f 23 f2 66 69 6e 64 62 69 67 67 65 73 74 |...#.findbiggest| 00001840 28 78 62 69 67 25 2c 79 62 69 67 25 2c 62 62 70 |(xbig%,ybig%,bbp| 00001850 70 25 29 0d 01 20 23 f2 66 69 6e 64 63 6f 6c 6f |p%).. #.findcolo| 00001860 75 72 73 28 78 63 6c 72 25 2c 79 63 6c 72 25 2c |urs(xclr%,yclr%,| 00001870 63 62 70 70 25 29 0d 01 21 05 cd 0d 01 22 04 0d |cbpp%)..!...."..| 00001880 01 23 31 f4 20 46 69 6e 64 20 6f 75 74 20 43 75 |.#1. Find out Cu| 00001890 72 72 65 6e 74 20 73 6c 6f 74 20 73 69 7a 65 20 |rrent slot size | 000018a0 61 6e 64 20 72 65 63 6f 72 64 20 69 74 20 69 6e |and record it in| 000018b0 0d 01 24 3a f4 20 62 61 73 69 73 6c 6f 74 25 20 |..$:. basislot% | 000018c0 66 6f 72 20 75 73 65 20 62 79 20 74 68 65 20 77 |for use by the w| 000018d0 69 6d 70 20 73 6c 6f 74 20 73 69 7a 69 6e 67 20 |imp slot sizing | 000018e0 70 72 6f 63 65 64 75 72 65 2e 0d 01 25 04 0d 01 |procedure...%...| 000018f0 26 28 c8 99 20 22 57 69 6d 70 5f 53 6c 6f 74 53 |&(.. "Wimp_SlotS| 00001900 69 7a 65 22 2c 2d 31 2c 2d 31 20 b8 20 62 61 73 |ize",-1,-1 . bas| 00001910 69 73 6c 6f 74 25 0d 01 27 04 0d 01 28 2b f4 20 |islot%..'...(+. | 00001920 4e 6f 77 20 74 68 65 20 75 73 75 61 6c 20 69 6e |Now the usual in| 00001930 69 74 69 61 6c 69 73 61 74 69 6f 6e 2c 20 6c 6f |itialisation, lo| 00001940 61 64 69 6e 67 0d 01 29 2e f4 20 74 65 6d 70 6c |ading..).. templ| 00001950 61 74 65 73 2c 20 6d 61 6b 69 6e 67 20 6d 65 6e |ates, making men| 00001960 75 73 2c 20 61 64 64 69 6e 67 20 73 75 62 6d 65 |us, adding subme| 00001970 6e 75 73 0d 01 2a 10 f4 20 61 6e 64 20 73 6f 20 |nus..*.. and so | 00001980 6f 6e 2e 0d 01 2b 04 0d 01 2c 0e f2 74 65 6d 70 |on...+...,..temp| 00001990 6c 61 74 65 73 0d 01 2d 04 0d 01 2e 0c 7a 6f 6f |lates..-.....zoo| 000019a0 6d 6d 25 3d 31 0d 01 2f 0c 7a 6f 6f 6d 64 25 3d |mm%=1../.zoomd%=| 000019b0 31 0d 01 30 04 0d 01 31 16 24 28 21 28 7a 6f 77 |1..0...1.$(!(zow| 000019c0 25 2b 31 37 32 29 29 3d 22 31 22 0d 01 32 16 24 |%+172))="1"..2.$| 000019d0 28 21 28 7a 6f 77 25 2b 32 33 36 29 29 3d 22 31 |(!(zow%+236))="1| 000019e0 22 0d 01 33 04 0d 01 34 13 f2 63 72 65 61 74 65 |"..3...4..create| 000019f0 6d 61 69 6e 6d 65 6e 75 0d 01 35 23 f2 61 74 74 |mainmenu..5#.att| 00001a00 61 63 68 28 6d 61 69 6e 6d 65 6e 75 61 64 64 72 |ach(mainmenuaddr| 00001a10 25 2c 30 2c 69 6e 66 6f 68 25 29 0d 01 36 23 f2 |%,0,infoh%)..6#.| 00001a20 61 74 74 61 63 68 28 6d 61 69 6e 6d 65 6e 75 61 |attach(mainmenua| 00001a30 64 64 72 25 2c 31 2c 7a 6f 6f 6d 68 25 29 0d 01 |ddr%,1,zoomh%)..| 00001a40 37 27 f2 61 74 74 61 63 68 28 6d 61 69 6e 6d 65 |7'.attach(mainme| 00001a50 6e 75 61 64 64 72 25 2c 32 2c 6a 70 65 67 69 6e |nuaddr%,2,jpegin| 00001a60 66 6f 68 25 29 0d 01 38 21 f2 67 72 65 79 6f 75 |foh%)..8!.greyou| 00001a70 74 6d 65 6e 75 28 6d 61 69 6e 6d 65 6e 75 61 64 |tmenu(mainmenuad| 00001a80 64 72 25 2c 32 29 0d 01 39 21 f2 67 72 65 79 6f |dr%,2)..9!.greyo| 00001a90 75 74 6d 65 6e 75 28 6d 61 69 6e 6d 65 6e 75 61 |utmenu(mainmenua| 00001aa0 64 64 72 25 2c 33 29 0d 01 3a 04 0d 01 3b 24 f2 |ddr%,3)..:...;$.| 00001ab0 73 65 74 6f 70 74 28 63 68 6f 69 63 65 73 68 25 |setopt(choicesh%| 00001ac0 2c 32 2b 64 69 74 68 65 72 69 74 25 2c b9 29 0d |,2+ditherit%,.).| 00001ad0 01 3c 34 e7 20 66 75 6c 6c 73 63 72 6e 25 3e 30 |.<4. fullscrn%>0| 00001ae0 20 8c 20 f2 73 65 74 6f 70 74 28 63 68 6f 69 63 | . .setopt(choic| 00001af0 65 73 68 25 2c 36 2b 66 75 6c 6c 73 63 72 6e 25 |esh%,6+fullscrn%| 00001b00 2c b9 29 0d 01 3d 2c e7 20 61 75 74 6f 66 75 6c |,.)..=,. autoful| 00001b10 6c 25 3c 3e 30 20 8c 20 f2 73 65 74 6f 70 74 28 |l%<>0 . .setopt(| 00001b20 63 68 6f 69 63 65 73 68 25 2c 31 36 2c b9 29 0d |choicesh%,16,.).| 00001b30 01 3e 2c e7 20 6d 6f 64 65 73 6f 6e 73 25 3c 3e |.>,. modesons%<>| 00001b40 30 20 8c 20 f2 73 65 74 6f 70 74 28 63 68 6f 69 |0 . .setopt(choi| 00001b50 63 65 73 68 25 2c 31 37 2c b9 29 0d 01 3f 2c e7 |cesh%,17,.)..?,.| 00001b60 20 63 6c 6f 73 65 64 69 73 25 3c 3e 30 20 8c 20 | closedis%<>0 . | 00001b70 f2 73 65 74 6f 70 74 28 63 68 6f 69 63 65 73 68 |.setopt(choicesh| 00001b80 25 2c 31 38 2c b9 29 0d 01 40 05 e1 0d 01 41 05 |%,18,.)..@....A.| 00001b90 3a 0d 01 42 12 dd 20 f2 6c 6f 61 64 63 68 6f 69 |:..B.. .loadchoi| 00001ba0 63 65 73 0d 01 43 0e ea 20 61 25 2c 63 25 2c 61 |ces..C.. a%,c%,a| 00001bb0 24 0d 01 44 36 c8 99 20 22 58 4f 53 5f 52 65 61 |$..D6.. "XOS_Rea| 00001bc0 64 56 61 72 56 61 6c 22 2c 22 53 77 69 66 74 4a |dVarVal","SwiftJ| 00001bd0 50 45 47 24 44 69 72 22 2c 66 72 25 2c 32 35 36 |PEG$Dir",fr%,256| 00001be0 20 b8 20 2c 2c 61 25 0d 01 45 95 e7 20 61 25 3d | . ,,a%..E.. a%=| 00001bf0 30 20 8c 20 85 20 34 39 30 2c 22 53 79 73 74 65 |0 . . 490,"Syste| 00001c00 6d 20 76 61 72 69 61 62 6c 65 20 27 53 77 69 66 |m variable 'Swif| 00001c10 74 4a 50 45 47 24 44 69 72 27 20 6e 6f 74 20 64 |tJPEG$Dir' not d| 00001c20 65 66 69 6e 65 64 3b 20 65 6e 73 75 72 65 20 79 |efined; ensure y| 00001c30 6f 75 20 64 6f 75 62 6c 65 2d 63 6c 69 63 6b 20 |ou double-click | 00001c40 6f 6e 20 21 53 77 69 66 74 4a 50 45 47 20 74 6f |on !SwiftJPEG to| 00001c50 20 72 75 6e 20 69 74 2c 20 61 6e 64 20 6e 6f 74 | run it, and not| 00001c60 20 6f 6e 65 20 6f 66 20 69 74 73 20 63 6f 6d 70 | one of its comp| 00001c70 6f 6e 65 6e 74 20 66 69 6c 65 73 22 0d 01 46 31 |onent files"..F1| 00001c80 63 68 6f 69 70 61 74 68 24 3d c0 a4 74 65 78 74 |choipath$=..text| 00001c90 75 6e 74 69 6c 28 66 72 25 2c 33 32 29 2c 61 25 |until(fr%,32),a%| 00001ca0 29 2b 22 2e 21 43 68 6f 69 63 65 73 22 0d 01 47 |)+".!Choices"..G| 00001cb0 04 0d 01 48 1a 63 68 6f 69 63 65 66 68 25 3d 8e |...H.choicefh%=.| 00001cc0 28 63 68 6f 69 70 61 74 68 24 29 0d 01 49 38 e7 |(choipath$)..I8.| 00001cd0 20 63 68 6f 69 63 65 66 68 25 3d 30 20 8c 20 85 | choicefh%=0 . .| 00001ce0 20 34 39 30 2c 22 43 61 6e 27 74 20 66 69 6e 64 | 490,"Can't find| 00001cf0 20 74 68 65 20 21 43 68 6f 69 63 65 73 20 66 69 | the !Choices fi| 00001d00 6c 65 22 0d 01 4a 04 0d 01 4b 2b f2 67 65 74 63 |le"..J...K+.getc| 00001d10 68 6f 69 63 65 28 22 44 69 74 68 65 72 69 6e 67 |hoice("Dithering| 00001d20 22 2c 22 30 31 32 22 2c 64 69 74 68 65 72 69 74 |","012",ditherit| 00001d30 25 29 0d 01 4c 1f 64 66 25 3d 64 69 74 68 65 72 |%)..L.df%=dither| 00001d40 69 74 25 2d 28 64 69 74 68 65 72 69 74 25 3d 32 |it%-(ditherit%=2| 00001d50 29 0d 01 4d 2e f2 67 65 74 63 68 6f 69 63 65 28 |)..M..getchoice(| 00001d60 22 46 75 6c 6c 20 53 63 72 65 65 6e 22 2c 22 30 |"Full Screen","0| 00001d70 31 32 33 22 2c 66 75 6c 6c 73 63 72 6e 25 29 0d |123",fullscrn%).| 00001d80 01 4e 31 f2 67 65 74 63 68 6f 69 63 65 28 22 41 |.N1.getchoice("A| 00001d90 75 74 6f 20 46 75 6c 6c 20 53 63 72 65 65 6e 22 |uto Full Screen"| 00001da0 2c 22 30 31 22 2c 61 75 74 6f 66 75 6c 6c 25 29 |,"01",autofull%)| 00001db0 0d 01 4f 31 f2 67 65 74 63 68 6f 69 63 65 28 22 |..O1.getchoice("| 00001dc0 4d 6f 64 65 73 20 4f 6e 20 53 74 61 72 74 75 70 |Modes On Startup| 00001dd0 22 2c 22 30 31 22 2c 6d 6f 64 65 73 6f 6e 73 25 |","01",modesons%| 00001de0 29 0d 01 50 2e f2 67 65 74 63 68 6f 69 63 65 28 |)..P..getchoice(| 00001df0 22 43 6c 6f 73 65 20 44 69 73 70 6c 61 79 22 2c |"Close Display",| 00001e00 22 30 31 22 2c 63 6c 6f 73 65 64 69 73 25 29 0d |"01",closedis%).| 00001e10 01 51 04 0d 01 52 0f d9 23 63 68 6f 69 63 65 66 |.Q...R..#choicef| 00001e20 68 25 0d 01 53 0f 63 68 6f 69 63 65 66 68 25 3d |h%..S.choicefh%=| 00001e30 30 0d 01 54 05 e1 0d 01 55 05 3a 0d 01 56 13 dd |0..T....U.:..V..| 00001e40 20 f2 63 6c 6f 73 65 63 68 6f 69 63 65 73 0d 01 | .closechoices..| 00001e50 57 20 e7 20 63 68 6f 69 63 65 66 68 25 3c 3e 30 |W . choicefh%<>0| 00001e60 20 8c 20 d9 23 63 68 6f 69 63 65 66 68 25 0d 01 | . .#choicefh%..| 00001e70 58 05 e1 0d 01 59 05 3a 0d 01 5a 12 dd 20 f2 72 |X....Y.:..Z.. .r| 00001e80 65 73 74 6f 72 65 6d 6f 64 65 0d 01 5b 15 e7 20 |estoremode..[.. | 00001e90 72 65 74 75 72 6e 74 6f 25 3c 3e 2d 31 20 8c 0d |returnto%<>-1 ..| 00001ea0 01 5c 1f c8 99 20 22 57 69 6d 70 5f 53 65 74 4d |.\... "Wimp_SetM| 00001eb0 6f 64 65 22 2c 72 65 74 75 72 6e 74 6f 25 0d 01 |ode",returnto%..| 00001ec0 5d 10 72 65 74 75 72 6e 74 6f 25 3d 2d 31 0d 01 |].returnto%=-1..| 00001ed0 5e 05 cd 0d 01 5f 05 e1 0d 01 60 05 3a 0d 01 61 |^...._....`.:..a| 00001ee0 1c dd 20 f2 67 65 74 63 68 6f 69 63 65 28 62 24 |.. .getchoice(b$| 00001ef0 2c 61 24 2c f8 20 61 25 29 0d 01 62 0b ea 20 63 |,a$,. a%)..b.. c| 00001f00 25 2c 63 24 0d 01 63 08 63 25 3d a3 0d 01 64 05 |%,c$..c.c%=...d.| 00001f10 f5 0d 01 65 2b e7 20 a4 75 70 70 65 72 28 be 23 |...e+. .upper(.#| 00001f20 63 68 6f 69 63 65 66 68 25 29 3d a4 75 70 70 65 |choicefh%)=.uppe| 00001f30 72 28 62 24 29 20 8c 20 63 25 3d b9 0d 01 66 1c |r(b$) . c%=...f.| 00001f40 fd 20 28 63 25 3d b9 29 20 84 20 28 c5 23 63 68 |. (c%=.) . (.#ch| 00001f50 6f 69 63 65 66 68 25 29 0d 01 67 3f e7 20 63 25 |oicefh%)..g?. c%| 00001f60 3d a3 20 8c 20 85 20 34 39 30 2c 22 43 61 6e 27 |=. . . 490,"Can'| 00001f70 74 20 66 69 6e 64 20 27 22 2b 62 24 2b 22 27 20 |t find '"+b$+"' | 00001f80 65 6e 74 72 79 20 69 6e 20 21 43 68 6f 69 63 65 |entry in !Choice| 00001f90 73 20 66 69 6c 65 22 0d 01 68 12 63 24 3d be 23 |s file"..h.c$=.#| 00001fa0 63 68 6f 69 63 65 66 68 25 0d 01 69 53 e7 20 28 |choicefh%..iS. (| 00001fb0 a7 61 24 2c 63 24 29 3d 30 29 20 84 20 28 a9 28 |.a$,c$)=0) . (.(| 00001fc0 63 24 29 3c 3e 31 29 20 8c 20 85 20 34 39 30 2c |c$)<>1) . . 490,| 00001fd0 62 24 2b 22 20 6f 70 74 69 6f 6e 20 6e 6f 74 20 |b$+" option not | 00001fe0 75 6e 64 65 72 73 74 6f 6f 64 20 69 6e 20 21 43 |understood in !C| 00001ff0 68 6f 69 63 65 73 20 66 69 6c 65 22 0d 01 6a 0c |hoices file"..j.| 00002000 61 25 3d bb 28 63 24 29 0d 01 6b 05 e1 0d 01 6c |a%=.(c$)..k....l| 00002010 05 3a 0d 01 6d 17 dd 20 f2 70 75 74 63 68 6f 69 |.:..m.. .putchoi| 00002020 63 65 28 61 24 2c 61 25 29 0d 01 6e 0b ea 20 63 |ce(a$,a%)..n.. c| 00002030 25 2c 62 24 0d 01 6f 08 63 25 3d a3 0d 01 70 05 |%,b$..o.c%=...p.| 00002040 f5 0d 01 71 1a 63 24 3d a4 75 70 70 65 72 28 be |...q.c$=.upper(.| 00002050 23 63 68 6f 69 63 65 66 68 25 29 0d 01 72 1a e7 |#choicefh%)..r..| 00002060 20 63 24 3d a4 75 70 70 65 72 28 61 24 29 20 8c | c$=.upper(a$) .| 00002070 20 63 25 3d b9 0d 01 73 1c fd 20 28 63 25 3d b9 | c%=...s.. (c%=.| 00002080 29 20 84 20 28 c5 23 63 68 6f 69 63 65 66 68 25 |) . (.#choicefh%| 00002090 29 0d 01 74 42 e7 20 63 25 3d a3 20 8c 20 85 20 |)..tB. c%=. . . | 000020a0 34 39 30 2c 22 43 61 6e 27 74 20 66 69 6e 64 20 |490,"Can't find | 000020b0 27 44 69 74 68 65 72 69 6e 67 27 20 65 6e 74 72 |'Dithering' entr| 000020c0 79 20 69 6e 20 21 43 68 6f 69 63 65 73 20 66 69 |y in !Choices fi| 000020d0 6c 65 22 0d 01 75 15 d5 23 63 68 6f 69 63 65 66 |le"..u..#choicef| 000020e0 68 25 2c 61 25 2b 34 38 0d 01 76 05 e1 0d 01 77 |h%,a%+48..v....w| 000020f0 05 3a 0d 01 78 12 dd 20 f2 6c 6f 61 64 73 70 72 |.:..x.. .loadspr| 00002100 69 74 65 73 0d 01 79 0b ea 20 61 25 2c 61 24 0d |ites..y.. a%,a$.| 00002110 01 7a 2b c8 99 20 22 4f 53 5f 52 65 61 64 4d 6f |.z+.. "OS_ReadMo| 00002120 64 65 56 61 72 69 61 62 6c 65 22 2c 2d 31 2c 34 |deVariable",-1,4| 00002130 20 b8 20 2c 2c 78 65 69 67 25 0d 01 7b 2b c8 99 | . ,,xeig%..{+..| 00002140 20 22 4f 53 5f 52 65 61 64 4d 6f 64 65 56 61 72 | "OS_ReadModeVar| 00002150 69 61 62 6c 65 22 2c 2d 31 2c 35 20 b8 20 2c 2c |iable",-1,5 . ,,| 00002160 79 65 69 67 25 0d 01 7c 04 0d 01 7d 19 61 24 3d |yeig%..|...}.a$=| 00002170 22 3c 53 77 69 66 74 4a 50 45 47 24 44 69 72 3e |"<SwiftJPEG$Dir>| 00002180 2e 22 0d 01 7e 04 0d 01 7f 39 e7 20 78 65 69 67 |."..~....9. xeig| 00002190 25 3e 31 20 84 20 79 65 69 67 25 3e 31 20 8c 20 |%>1 . yeig%>1 . | 000021a0 61 24 2b 3d 22 53 70 72 69 74 65 73 22 20 8b 20 |a$+="Sprites" . | 000021b0 61 24 2b 3d 22 53 70 72 69 74 65 73 32 32 22 0d |a$+="Sprites22".| 000021c0 01 80 04 0d 01 81 14 61 25 3d a4 66 69 6c 65 74 |.......a%=.filet| 000021d0 79 70 65 28 61 24 29 0d 01 82 32 e7 20 61 25 3c |ype(a$)...2. a%<| 000021e0 30 20 8c 20 85 20 28 31 3c 3c 33 30 29 2b 32 2c |0 . . (1<<30)+2,| 000021f0 22 43 61 6e 27 74 20 66 69 6e 64 20 53 70 72 69 |"Can't find Spri| 00002200 74 65 73 20 66 69 6c 65 22 0d 01 83 4d e7 20 61 |tes file"...M. a| 00002210 25 3c 3e 26 46 46 39 20 8c 20 85 20 28 31 3c 3c |%<>&FF9 . . (1<<| 00002220 33 30 29 2b 32 2c 22 53 70 72 69 74 65 73 20 66 |30)+2,"Sprites f| 00002230 69 6c 65 20 64 6f 65 73 6e 27 74 20 68 61 76 65 |ile doesn't have| 00002240 20 53 70 72 69 74 65 20 66 69 6c 65 74 79 70 65 | Sprite filetype| 00002250 20 26 46 46 39 22 0d 01 84 16 61 25 3d a4 66 69 | &FF9"....a%=.fi| 00002260 6c 65 6c 65 6e 67 74 68 28 61 24 29 0d 01 85 37 |lelength(a$)...7| 00002270 e7 20 61 25 3d 2d 31 20 8c 20 85 20 28 31 3c 3c |. a%=-1 . . (1<<| 00002280 33 30 29 2b 32 2c 22 43 61 6e 27 74 20 66 69 6e |30)+2,"Can't fin| 00002290 64 20 74 68 65 20 53 70 72 69 74 65 73 20 66 69 |d the Sprites fi| 000022a0 6c 65 22 0d 01 86 04 0d 01 87 16 de 20 73 70 72 |le"......... spr| 000022b0 69 74 65 73 25 20 61 25 2b 31 30 32 34 0d 01 88 |ites% a%+1024...| 000022c0 0f 21 73 70 72 69 74 65 73 25 3d 30 0d 01 89 11 |.!sprites%=0....| 000022d0 73 70 72 69 74 65 73 25 21 34 3d 31 36 0d 01 8a |sprites%!4=16...| 000022e0 04 0d 01 8b 21 c8 99 20 22 4f 53 5f 53 70 72 69 |....!.. "OS_Spri| 000022f0 74 65 4f 70 22 2c 32 36 35 2c 73 70 72 69 74 65 |teOp",265,sprite| 00002300 73 25 0d 01 8c 24 c8 99 20 22 4f 53 5f 53 70 72 |s%...$.. "OS_Spr| 00002310 69 74 65 4f 70 22 2c 32 36 36 2c 73 70 72 69 74 |iteOp",266,sprit| 00002320 65 73 25 2c 61 24 0d 01 8d 05 e1 0d 01 8e 05 3a |es%,a$.........:| 00002330 0d 01 8f 0e dd 20 f2 69 63 6f 6e 62 61 72 0d 01 |..... .iconbar..| 00002340 90 14 24 28 69 62 25 29 3d 22 69 63 6f 6e 62 61 |..$(ib%)="iconba| 00002350 72 22 0d 01 91 0a 21 62 25 3d 2d 31 0d 01 92 0a |r"....!b%=-1....| 00002360 62 25 21 34 3d 30 0d 01 93 0a 62 25 21 38 3d 30 |b%!4=0....b%!8=0| 00002370 0d 01 94 0c 62 25 21 31 32 3d 36 38 0d 01 95 0c |....b%!12=68....| 00002380 62 25 21 31 36 3d 36 38 0d 01 96 0f 62 25 21 32 |b%!16=68....b%!2| 00002390 30 3d 26 33 31 30 32 0d 01 97 0d 62 25 21 32 34 |0=&3102....b%!24| 000023a0 3d 69 62 25 0d 01 98 12 62 25 21 32 38 3d 73 70 |=ib%....b%!28=sp| 000023b0 72 69 74 65 73 25 0d 01 99 0c 62 25 21 33 32 3d |rites%....b%!32=| 000023c0 31 31 0d 01 9a 28 c8 99 20 22 57 69 6d 70 5f 43 |11...(.. "Wimp_C| 000023d0 72 65 61 74 65 49 63 6f 6e 22 2c 2c 62 25 20 b8 |reateIcon",,b% .| 000023e0 20 69 63 6f 6e 62 61 72 68 25 0d 01 9b 05 e1 0d | iconbarh%......| 000023f0 01 9c 05 3a 0d 01 9d 11 dd 20 f2 67 65 74 70 28 |...:..... .getp(| 00002400 f8 20 61 24 29 0d 01 9e 08 ea 20 61 25 0d 01 9f |. a$)..... a%...| 00002410 04 0d 01 a0 17 c8 99 20 22 4f 53 5f 47 65 74 45 |....... "OS_GetE| 00002420 6e 76 22 20 b8 20 61 25 0d 01 a1 18 61 24 3d a4 |nv" . a%....a$=.| 00002430 74 65 78 74 75 6e 74 69 6c 28 61 25 2c 33 32 29 |textuntil(a%,32)| 00002440 0d 01 a2 04 0d 01 a3 10 61 25 3d a7 61 24 2c 22 |........a%=.a$,"| 00002450 22 22 22 29 0d 01 a4 1a e7 20 61 25 3c 3e 30 20 |""")..... a%<>0 | 00002460 8c 20 61 24 3d c1 61 24 2c 61 25 2b 31 29 0d 01 |. a$=.a$,a%+1)..| 00002470 a5 11 61 25 3d a7 61 24 2c 22 22 22 20 22 29 0d |..a%=.a$,""" ").| 00002480 01 a6 22 e7 20 61 25 3c 3e 30 20 8c 20 61 24 3d |..". a%<>0 . a$=| 00002490 c1 61 24 2c 61 25 2b 32 29 20 8b 20 61 24 3d 22 |.a$,a%+2) . a$="| 000024a0 22 0d 01 a7 05 e1 0d 01 a8 05 3a 0d 01 a9 04 0d |".........:.....| 000024b0 01 aa 04 0d 01 ab 30 f4 20 2d 2d 20 54 65 6d 70 |......0. -- Temp| 000024c0 6c 61 74 65 20 61 6e 64 20 77 69 6e 64 6f 77 20 |late and window | 000024d0 68 61 6e 64 6c 69 6e 67 20 70 72 6f 63 65 64 75 |handling procedu| 000024e0 72 65 73 0d 01 ac 04 0d 01 ad 04 0d 01 ae 0f dd |res.............| 000024f0 20 a4 6f 70 65 6e 28 61 25 29 0d 01 af 08 ea 20 | .open(a%)..... | 00002500 63 25 0d 01 b0 12 e7 20 61 25 3d 2d 31 20 8c 20 |c%..... a%=-1 . | 00002510 63 25 3d a3 0d 01 b1 0b 21 66 72 25 3d 61 25 0d |c%=.....!fr%=a%.| 00002520 01 b2 21 c8 99 20 22 57 69 6d 70 5f 47 65 74 57 |..!.. "Wimp_GetW| 00002530 69 6e 64 6f 77 53 74 61 74 65 22 2c 2c 66 72 25 |indowState",,fr%| 00002540 0d 01 b3 2a e7 20 28 28 66 72 25 21 33 32 29 20 |...*. ((fr%!32) | 00002550 80 20 26 31 30 30 30 30 29 3c 3e 30 20 8c 20 63 |. &10000)<>0 . c| 00002560 25 3d b9 20 8b 20 63 25 3d a3 0d 01 b4 07 3d 63 |%=. . c%=.....=c| 00002570 25 0d 01 b5 05 3a 0d 01 b6 1b dd 20 f2 6c 6f 61 |%....:..... .loa| 00002580 64 74 65 6d 70 28 61 25 2c 61 24 2c f8 20 63 25 |dtemp(a%,a$,. c%| 00002590 29 0d 01 b7 39 c8 99 20 22 57 69 6d 70 5f 4c 6f |)...9.. "Wimp_Lo| 000025a0 61 64 54 65 6d 70 6c 61 74 65 22 2c 2c 61 25 2c |adTemplate",,a%,| 000025b0 69 25 2c 69 6f 25 2b 69 73 70 25 2c 2d 31 2c 61 |i%,io%+isp%,-1,a| 000025c0 24 2c 30 20 b8 20 2c 2c 69 25 0d 01 b8 12 61 25 |$,0 . ,,i%....a%| 000025d0 21 36 34 3d 73 70 72 69 74 65 73 25 0d 01 b9 23 |!64=sprites%...#| 000025e0 c8 99 20 22 57 69 6d 70 5f 43 72 65 61 74 65 57 |.. "Wimp_CreateW| 000025f0 69 6e 64 6f 77 22 2c 2c 61 25 20 b8 20 63 25 0d |indow",,a% . c%.| 00002600 01 ba 05 e1 0d 01 bb 05 3a 0d 01 bc 10 dd 20 f2 |........:..... .| 00002610 74 65 6d 70 6c 61 74 65 73 0d 01 bd 08 ea 20 61 |templates..... a| 00002620 25 0d 01 be 04 0d 01 bf 37 c8 99 20 22 57 69 6d |%.......7.. "Wim| 00002630 70 5f 4f 70 65 6e 54 65 6d 70 6c 61 74 65 22 2c |p_OpenTemplate",| 00002640 2c 22 3c 53 77 69 66 74 4a 50 45 47 24 44 69 72 |,"<SwiftJPEG$Dir| 00002650 3e 2e 54 65 6d 70 6c 61 74 65 73 22 0d 01 c0 0a |>.Templates"....| 00002660 69 6f 25 3d 69 25 0d 01 c1 04 0d 01 c2 21 f2 6c |io%=i%.......!.l| 00002670 6f 61 64 74 65 6d 70 28 69 6e 77 25 2c 22 49 6e |oadtemp(inw%,"In| 00002680 66 6f 22 2c 69 6e 66 6f 68 25 29 0d 01 c3 1b 24 |fo",infoh%)....$| 00002690 28 21 28 69 6e 77 25 2b 33 33 32 29 29 3d 76 65 |(!(inw%+332))=ve| 000026a0 72 73 69 6f 6e 24 0d 01 c4 27 f2 6c 6f 61 64 74 |rsion$...'.loadt| 000026b0 65 6d 70 28 64 69 77 25 2c 22 44 69 73 70 6c 61 |emp(diw%,"Displa| 000026c0 79 22 2c 64 69 73 70 6c 61 79 68 25 29 0d 01 c5 |y",displayh%)...| 000026d0 21 f2 6c 6f 61 64 74 65 6d 70 28 7a 6f 77 25 2c |!.loadtemp(zow%,| 000026e0 22 5a 6f 6f 6d 22 2c 7a 6f 6f 6d 68 25 29 0d 01 |"Zoom",zoomh%)..| 000026f0 c6 2a f2 6c 6f 61 64 74 65 6d 70 28 6a 69 77 25 |.*.loadtemp(jiw%| 00002700 2c 22 4a 50 45 47 20 69 6e 66 6f 22 2c 6a 70 65 |,"JPEG info",jpe| 00002710 67 69 6e 66 6f 68 25 29 0d 01 c7 27 f2 6c 6f 61 |ginfoh%)...'.loa| 00002720 64 74 65 6d 70 28 63 68 77 25 2c 22 43 68 6f 69 |dtemp(chw%,"Choi| 00002730 63 65 73 22 2c 63 68 6f 69 63 65 73 68 25 29 0d |ces",choicesh%).| 00002740 01 c8 04 0d 01 c9 1b c8 99 20 22 57 69 6d 70 5f |......... "Wimp_| 00002750 43 6c 6f 73 65 54 65 6d 70 6c 61 74 65 22 0d 01 |CloseTemplate"..| 00002760 ca 05 e1 0d 01 cb 05 3a 0d 01 cc 17 dd 20 f2 6f |.......:..... .o| 00002770 70 65 6e 63 65 6e 74 65 72 65 64 28 66 25 29 0d |pencentered(f%).| 00002780 01 cd 11 ea 20 61 25 2c 63 25 2c 64 25 2c 65 25 |.... a%,c%,d%,e%| 00002790 0d 01 ce 1a f2 72 65 61 64 73 63 72 65 65 6e 73 |.....readscreens| 000027a0 69 7a 65 28 61 25 2c 63 25 29 0d 01 cf 0b 21 66 |ize(a%,c%)....!f| 000027b0 72 25 3d 66 25 0d 01 d0 21 c8 99 20 22 57 69 6d |r%=f%...!.. "Wim| 000027c0 70 5f 47 65 74 57 69 6e 64 6f 77 53 74 61 74 65 |p_GetWindowState| 000027d0 22 2c 2c 66 72 25 0d 01 d1 13 64 25 3d 66 72 25 |",,fr%....d%=fr%| 000027e0 21 31 32 2d 66 72 25 21 34 0d 01 d2 13 65 25 3d |!12-fr%!4....e%=| 000027f0 66 72 25 21 31 36 2d 66 72 25 21 38 0d 01 d3 12 |fr%!16-fr%!8....| 00002800 78 70 6f 25 3d 28 61 25 2d 64 25 29 2f 32 0d 01 |xpo%=(a%-d%)/2..| 00002810 d4 15 79 70 6f 25 3d 28 63 25 2d 65 25 29 2f 32 |..ypo%=(c%-e%)/2| 00002820 2b 36 38 0d 01 d5 24 e7 20 28 66 72 25 21 33 32 |+68...$. (fr%!32| 00002830 29 20 80 20 26 34 30 30 30 30 30 30 20 8c 20 79 |) . &4000000 . y| 00002840 70 6f 25 2d 3d 32 30 0d 01 d6 25 e7 20 28 66 72 |po%-=20...%. (fr| 00002850 25 21 33 32 29 20 80 20 26 34 30 30 30 30 30 30 |%!32) . &4000000| 00002860 30 20 8c 20 79 70 6f 25 2b 3d 32 30 0d 01 d7 25 |0 . ypo%+=20...%| 00002870 e7 20 28 66 72 25 21 33 32 29 20 80 20 26 31 30 |. (fr%!32) . &10| 00002880 30 30 30 30 30 30 20 8c 20 78 70 6f 25 2d 3d 32 |000000 . xpo%-=2| 00002890 30 0d 01 d8 0e 66 72 25 21 34 3d 78 70 6f 25 0d |0....fr%!4=xpo%.| 000028a0 01 d9 0e 66 72 25 21 38 3d 79 70 6f 25 0d 01 da |...fr%!8=ypo%...| 000028b0 12 66 72 25 21 31 32 3d 78 70 6f 25 2b 64 25 0d |.fr%!12=xpo%+d%.| 000028c0 01 db 12 66 72 25 21 31 36 3d 79 70 6f 25 2b 65 |...fr%!16=ypo%+e| 000028d0 25 0d 01 dc 0d 66 72 25 21 32 38 3d 2d 31 0d 01 |%....fr%!28=-1..| 000028e0 dd 1d c8 99 20 22 57 69 6d 70 5f 4f 70 65 6e 57 |.... "Wimp_OpenW| 000028f0 69 6e 64 6f 77 22 2c 2c 66 72 25 0d 01 de 05 e1 |indow",,fr%.....| 00002900 0d 01 df 05 3a 0d 01 e0 10 dd 20 f2 7a 6f 6f 6d |....:..... .zoom| 00002910 63 6c 69 63 6b 0d 01 e1 0b ea 20 61 25 2c 63 25 |click..... a%,c%| 00002920 0d 01 e2 0d 61 25 3d 7a 6f 6f 6d 6d 25 0d 01 e3 |....a%=zoomm%...| 00002930 0d 63 25 3d 7a 6f 6f 6d 64 25 0d 01 e4 04 0d 01 |.c%=zoomd%......| 00002940 e5 0d e7 20 61 64 6a 75 25 20 8c 0d 01 e6 0f c8 |... adju% ......| 00002950 8e 20 69 63 6f 6e 68 25 20 ca 0d 01 e7 10 c9 20 |. iconh% ...... | 00002960 30 3a 69 63 6f 6e 68 25 3d 31 0d 01 e8 10 c9 20 |0:iconh%=1..... | 00002970 31 3a 69 63 6f 6e 68 25 3d 30 0d 01 e9 10 c9 20 |1:iconh%=0..... | 00002980 35 3a 69 63 6f 6e 68 25 3d 36 0d 01 ea 10 c9 20 |5:iconh%=6..... | 00002990 36 3a 69 63 6f 6e 68 25 3d 35 0d 01 eb 05 cb 0d |6:iconh%=5......| 000029a0 01 ec 05 cd 0d 01 ed 04 0d 01 ee 0f c8 8e 20 69 |.............. i| 000029b0 63 6f 6e 68 25 20 ca 0d 01 ef 07 c9 20 30 0d 01 |conh% ...... 0..| 000029c0 f0 2a 7a 6f 6f 6d 6d 25 3d bb 28 a4 74 65 78 74 |.*zoomm%=.(.text| 000029d0 75 6e 74 69 6c 28 21 28 7a 6f 77 25 2b 31 37 32 |until(!(zow%+172| 000029e0 29 2c 33 33 29 29 2b 31 0d 01 f1 1b e7 20 7a 6f |),33))+1..... zo| 000029f0 6f 6d 6d 25 3e 32 30 20 8c 20 7a 6f 6f 6d 6d 25 |omm%>20 . zoomm%| 00002a00 3d 32 30 0d 01 f2 5d e7 20 a4 74 65 78 74 75 6e |=20...]. .textun| 00002a10 74 69 6c 28 21 28 7a 6f 77 25 2b 31 37 32 29 2c |til(!(zow%+172),| 00002a20 33 33 29 3c 3e c3 28 7a 6f 6f 6d 6d 25 29 20 8c |33)<>.(zoomm%) .| 00002a30 20 24 28 21 28 7a 6f 77 25 2b 31 37 32 29 29 3d | $(!(zow%+172))=| 00002a40 c3 28 7a 6f 6f 6d 6d 25 29 3a f2 66 6f 72 63 65 |.(zoomm%):.force| 00002a50 72 65 64 72 61 77 28 7a 6f 6f 6d 68 25 2c 32 29 |redraw(zoomh%,2)| 00002a60 0d 01 f3 07 c9 20 31 0d 01 f4 2a 7a 6f 6f 6d 6d |..... 1...*zoomm| 00002a70 25 3d bb 28 a4 74 65 78 74 75 6e 74 69 6c 28 21 |%=.(.textuntil(!| 00002a80 28 7a 6f 77 25 2b 31 37 32 29 2c 33 33 29 29 2d |(zow%+172),33))-| 00002a90 31 0d 01 f5 19 e7 20 7a 6f 6f 6d 6d 25 3c 31 20 |1..... zoomm%<1 | 00002aa0 8c 20 7a 6f 6f 6d 6d 25 3d 31 0d 01 f6 5d e7 20 |. zoomm%=1...]. | 00002ab0 a4 74 65 78 74 75 6e 74 69 6c 28 21 28 7a 6f 77 |.textuntil(!(zow| 00002ac0 25 2b 31 37 32 29 2c 33 33 29 3c 3e c3 28 7a 6f |%+172),33)<>.(zo| 00002ad0 6f 6d 6d 25 29 20 8c 20 24 28 21 28 7a 6f 77 25 |omm%) . $(!(zow%| 00002ae0 2b 31 37 32 29 29 3d c3 28 7a 6f 6f 6d 6d 25 29 |+172))=.(zoomm%)| 00002af0 3a f2 66 6f 72 63 65 72 65 64 72 61 77 28 7a 6f |:.forceredraw(zo| 00002b00 6f 6d 68 25 2c 32 29 0d 01 f7 07 c9 20 35 0d 01 |omh%,2)..... 5..| 00002b10 f8 2a 7a 6f 6f 6d 64 25 3d bb 28 a4 74 65 78 74 |.*zoomd%=.(.text| 00002b20 75 6e 74 69 6c 28 21 28 7a 6f 77 25 2b 32 33 36 |until(!(zow%+236| 00002b30 29 2c 33 33 29 29 2b 31 0d 01 f9 1b e7 20 7a 6f |),33))+1..... zo| 00002b40 6f 6d 64 25 3e 32 30 20 8c 20 7a 6f 6f 6d 64 25 |omd%>20 . zoomd%| 00002b50 3d 32 30 0d 01 fa 5d e7 20 a4 74 65 78 74 75 6e |=20...]. .textun| 00002b60 74 69 6c 28 21 28 7a 6f 77 25 2b 32 33 36 29 2c |til(!(zow%+236),| 00002b70 33 33 29 3c 3e c3 28 7a 6f 6f 6d 64 25 29 20 8c |33)<>.(zoomd%) .| 00002b80 20 24 28 21 28 7a 6f 77 25 2b 32 33 36 29 29 3d | $(!(zow%+236))=| 00002b90 c3 28 7a 6f 6f 6d 64 25 29 3a f2 66 6f 72 63 65 |.(zoomd%):.force| 00002ba0 72 65 64 72 61 77 28 7a 6f 6f 6d 68 25 2c 34 29 |redraw(zoomh%,4)| 00002bb0 0d 01 fb 07 c9 20 36 0d 01 fc 2a 7a 6f 6f 6d 64 |..... 6...*zoomd| 00002bc0 25 3d bb 28 a4 74 65 78 74 75 6e 74 69 6c 28 21 |%=.(.textuntil(!| 00002bd0 28 7a 6f 77 25 2b 32 33 36 29 2c 33 33 29 29 2d |(zow%+236),33))-| 00002be0 31 0d 01 fd 19 e7 20 7a 6f 6f 6d 64 25 3c 31 20 |1..... zoomd%<1 | 00002bf0 8c 20 7a 6f 6f 6d 64 25 3d 31 0d 01 fe 5d e7 20 |. zoomd%=1...]. | 00002c00 a4 74 65 78 74 75 6e 74 69 6c 28 21 28 7a 6f 77 |.textuntil(!(zow| 00002c10 25 2b 32 33 36 29 2c 33 33 29 3c 3e c3 28 7a 6f |%+236),33)<>.(zo| 00002c20 6f 6d 64 25 29 20 8c 20 24 28 21 28 7a 6f 77 25 |omd%) . $(!(zow%| 00002c30 2b 32 33 36 29 29 3d c3 28 7a 6f 6f 6d 64 25 29 |+236))=.(zoomd%)| 00002c40 3a f2 66 6f 72 63 65 72 65 64 72 61 77 28 7a 6f |:.forceredraw(zo| 00002c50 6f 6d 68 25 2c 34 29 0d 01 ff 05 cb 0d 02 00 04 |omh%,4).........| 00002c60 0d 02 01 1f e7 20 61 25 3c 3e 7a 6f 6f 6d 6d 25 |..... a%<>zoomm%| 00002c70 20 84 20 63 25 3c 3e 7a 6f 6f 6d 64 25 20 8c 0d | . c%<>zoomd% ..| 00002c80 02 02 18 e7 20 a4 6f 70 65 6e 28 64 69 73 70 6c |.... .open(displ| 00002c90 61 79 68 25 29 20 8c 0d 02 03 15 f2 72 65 73 69 |ayh%) ......resi| 00002ca0 7a 65 6d 61 69 6e 77 69 6e 64 6f 77 0d 02 04 12 |zemainwindow....| 00002cb0 21 66 72 25 3d 64 69 73 70 6c 61 79 68 25 0d 02 |!fr%=displayh%..| 00002cc0 05 1e c8 99 20 22 57 69 6d 70 5f 43 6c 6f 73 65 |.... "Wimp_Close| 00002cd0 57 69 6e 64 6f 77 22 2c 2c 66 72 25 0d 02 06 21 |Window",,fr%...!| 00002ce0 c8 99 20 22 57 69 6d 70 5f 47 65 74 57 69 6e 64 |.. "Wimp_GetWind| 00002cf0 6f 77 53 74 61 74 65 22 2c 2c 66 72 25 0d 02 07 |owState",,fr%...| 00002d00 1d c8 99 20 22 57 69 6d 70 5f 4f 70 65 6e 57 69 |... "Wimp_OpenWi| 00002d10 6e 64 6f 77 22 2c 2c 66 72 25 0d 02 08 23 f2 73 |ndow",,fr%...#.s| 00002d20 68 6f 77 6d 65 6e 75 28 74 6f 70 6d 65 6e 75 25 |howmenu(topmenu%| 00002d30 2c 74 6f 70 78 25 2c 74 6f 70 79 25 29 0d 02 09 |,topx%,topy%)...| 00002d40 05 cd 0d 02 0a 05 cd 0d 02 0b 05 e1 0d 02 0c 05 |................| 00002d50 3a 0d 02 0d 0e dd 20 f2 6b 65 79 7a 6f 6f 6d 0d |:..... .keyzoom.| 00002d60 02 0e 0b ea 20 61 25 2c 63 25 0d 02 0f 0d 61 25 |.... a%,c%....a%| 00002d70 3d 7a 6f 6f 6d 6d 25 0d 02 10 0d 63 25 3d 7a 6f |=zoomm%....c%=zo| 00002d80 6f 6d 64 25 0d 02 11 04 0d 02 12 28 7a 6f 6f 6d |omd%.......(zoom| 00002d90 6d 25 3d bb 28 a4 74 65 78 74 75 6e 74 69 6c 28 |m%=.(.textuntil(| 00002da0 21 28 7a 6f 77 25 2b 31 37 32 29 2c 33 33 29 29 |!(zow%+172),33))| 00002db0 0d 02 13 28 7a 6f 6f 6d 64 25 3d bb 28 a4 74 65 |...(zoomd%=.(.te| 00002dc0 78 74 75 6e 74 69 6c 28 21 28 7a 6f 77 25 2b 32 |xtuntil(!(zow%+2| 00002dd0 33 36 29 2c 33 33 29 29 0d 02 14 04 0d 02 15 19 |36),33))........| 00002de0 e7 20 7a 6f 6f 6d 6d 25 3c 31 20 8c 20 7a 6f 6f |. zoomm%<1 . zoo| 00002df0 6d 6d 25 3d 31 0d 02 16 1b e7 20 7a 6f 6f 6d 6d |mm%=1..... zoomm| 00002e00 25 3e 32 30 20 8c 20 7a 6f 6f 6d 6d 25 3d 32 30 |%>20 . zoomm%=20| 00002e10 0d 02 17 19 e7 20 7a 6f 6f 6d 64 25 3c 31 20 8c |..... zoomd%<1 .| 00002e20 20 7a 6f 6f 6d 64 25 3d 31 0d 02 18 1b e7 20 7a | zoomd%=1..... z| 00002e30 6f 6f 6d 64 25 3e 32 30 20 8c 20 7a 6f 6f 6d 64 |oomd%>20 . zoomd| 00002e40 25 3d 32 30 0d 02 19 04 0d 02 1a 42 e7 20 7a 6f |%=20.......B. zo| 00002e50 6f 6d 6d 25 3c 3e 61 25 20 8c 20 24 28 21 28 7a |omm%<>a% . $(!(z| 00002e60 6f 77 25 2b 31 37 32 29 29 3d c3 28 7a 6f 6f 6d |ow%+172))=.(zoom| 00002e70 6d 25 29 3a f2 66 6f 72 63 65 72 65 64 72 61 77 |m%):.forceredraw| 00002e80 28 7a 6f 6f 6d 68 25 2c 32 29 0d 02 1b 42 e7 20 |(zoomh%,2)...B. | 00002e90 7a 6f 6f 6d 64 25 3c 3e 63 25 20 8c 20 24 28 21 |zoomd%<>c% . $(!| 00002ea0 28 7a 6f 77 25 2b 32 33 36 29 29 3d c3 28 7a 6f |(zow%+236))=.(zo| 00002eb0 6f 6d 64 25 29 3a f2 66 6f 72 63 65 72 65 64 72 |omd%):.forceredr| 00002ec0 61 77 28 7a 6f 6f 6d 68 25 2c 34 29 0d 02 1c 04 |aw(zoomh%,4)....| 00002ed0 0d 02 1d 1f e7 20 61 25 3c 3e 7a 6f 6f 6d 6d 25 |..... a%<>zoomm%| 00002ee0 20 84 20 63 25 3c 3e 7a 6f 6f 6d 64 25 20 8c 0d | . c%<>zoomd% ..| 00002ef0 02 1e 18 e7 20 a4 6f 70 65 6e 28 64 69 73 70 6c |.... .open(displ| 00002f00 61 79 68 25 29 20 8c 0d 02 1f 15 f2 72 65 73 69 |ayh%) ......resi| 00002f10 7a 65 6d 61 69 6e 77 69 6e 64 6f 77 0d 02 20 12 |zemainwindow.. .| 00002f20 21 66 72 25 3d 64 69 73 70 6c 61 79 68 25 0d 02 |!fr%=displayh%..| 00002f30 21 1e c8 99 20 22 57 69 6d 70 5f 43 6c 6f 73 65 |!... "Wimp_Close| 00002f40 57 69 6e 64 6f 77 22 2c 2c 66 72 25 0d 02 22 21 |Window",,fr%.."!| 00002f50 c8 99 20 22 57 69 6d 70 5f 47 65 74 57 69 6e 64 |.. "Wimp_GetWind| 00002f60 6f 77 53 74 61 74 65 22 2c 2c 66 72 25 0d 02 23 |owState",,fr%..#| 00002f70 1d c8 99 20 22 57 69 6d 70 5f 4f 70 65 6e 57 69 |... "Wimp_OpenWi| 00002f80 6e 64 6f 77 22 2c 2c 66 72 25 0d 02 24 05 cd 0d |ndow",,fr%..$...| 00002f90 02 25 05 cd 0d 02 26 05 e1 0d 02 27 05 3a 0d 02 |.%....&....'.:..| 00002fa0 28 13 dd 20 f2 63 68 6f 69 63 65 73 63 6c 69 63 |(.. .choicesclic| 00002fb0 6b 0d 02 29 0e ea 20 61 25 2c 63 25 2c 61 24 0d |k..).. a%,c%,a$.| 00002fc0 02 2a 04 0d 02 2b 0f c8 8e 20 69 63 6f 6e 68 25 |.*...+... iconh%| 00002fd0 20 ca 0d 02 2c 04 0d 02 2d 0b c9 20 32 2c 33 2c | ...,...-.. 2,3,| 00002fe0 34 0d 02 2e 23 e7 20 a4 67 65 74 6f 70 74 28 63 |4...#. .getopt(c| 00002ff0 68 6f 69 63 65 73 68 25 2c 69 63 6f 6e 68 25 29 |hoicesh%,iconh%)| 00003000 3d a3 20 8c 0d 02 2f 33 e7 20 a4 67 65 74 6f 70 |=. .../3. .getop| 00003010 74 28 63 68 6f 69 63 65 73 68 25 2c 32 29 20 8c |t(choicesh%,2) .| 00003020 20 f2 73 65 74 6f 70 74 28 63 68 6f 69 63 65 73 | .setopt(choices| 00003030 68 25 2c 32 2c a3 29 0d 02 30 33 e7 20 a4 67 65 |h%,2,.)..03. .ge| 00003040 74 6f 70 74 28 63 68 6f 69 63 65 73 68 25 2c 33 |topt(choicesh%,3| 00003050 29 20 8c 20 f2 73 65 74 6f 70 74 28 63 68 6f 69 |) . .setopt(choi| 00003060 63 65 73 68 25 2c 33 2c a3 29 0d 02 31 33 e7 20 |cesh%,3,.)..13. | 00003070 a4 67 65 74 6f 70 74 28 63 68 6f 69 63 65 73 68 |.getopt(choicesh| 00003080 25 2c 34 29 20 8c 20 f2 73 65 74 6f 70 74 28 63 |%,4) . .setopt(c| 00003090 68 6f 69 63 65 73 68 25 2c 34 2c a3 29 0d 02 32 |hoicesh%,4,.)..2| 000030a0 1f f2 73 65 74 6f 70 74 28 63 68 6f 69 63 65 73 |..setopt(choices| 000030b0 68 25 2c 69 63 6f 6e 68 25 2c b9 29 0d 02 33 05 |h%,iconh%,.)..3.| 000030c0 cd 0d 02 34 0b c9 20 37 2c 38 2c 39 0d 02 35 23 |...4.. 7,8,9..5#| 000030d0 e7 20 a4 67 65 74 6f 70 74 28 63 68 6f 69 63 65 |. .getopt(choice| 000030e0 73 68 25 2c 69 63 6f 6e 68 25 29 3d a3 20 8c 0d |sh%,iconh%)=. ..| 000030f0 02 36 33 e7 20 a4 67 65 74 6f 70 74 28 63 68 6f |.63. .getopt(cho| 00003100 69 63 65 73 68 25 2c 37 29 20 8c 20 f2 73 65 74 |icesh%,7) . .set| 00003110 6f 70 74 28 63 68 6f 69 63 65 73 68 25 2c 37 2c |opt(choicesh%,7,| 00003120 a3 29 0d 02 37 33 e7 20 a4 67 65 74 6f 70 74 28 |.)..73. .getopt(| 00003130 63 68 6f 69 63 65 73 68 25 2c 38 29 20 8c 20 f2 |choicesh%,8) . .| 00003140 73 65 74 6f 70 74 28 63 68 6f 69 63 65 73 68 25 |setopt(choicesh%| 00003150 2c 38 2c a3 29 0d 02 38 33 e7 20 a4 67 65 74 6f |,8,.)..83. .geto| 00003160 70 74 28 63 68 6f 69 63 65 73 68 25 2c 39 29 20 |pt(choicesh%,9) | 00003170 8c 20 f2 73 65 74 6f 70 74 28 63 68 6f 69 63 65 |. .setopt(choice| 00003180 73 68 25 2c 39 2c a3 29 0d 02 39 1f f2 73 65 74 |sh%,9,.)..9..set| 00003190 6f 70 74 28 63 68 6f 69 63 65 73 68 25 2c 69 63 |opt(choicesh%,ic| 000031a0 6f 6e 68 25 2c b9 29 0d 02 3a 05 cc 0d 02 3b 1f |onh%,.)..:....;.| 000031b0 f2 73 65 74 6f 70 74 28 63 68 6f 69 63 65 73 68 |.setopt(choicesh| 000031c0 25 2c 69 63 6f 6e 68 25 2c a3 29 0d 02 3c 05 cd |%,iconh%,.)..<..| 000031d0 0d 02 3d 04 0d 02 3e 08 c9 20 31 30 0d 02 3f 3e |..=...>.. 10..?>| 000031e0 f4 20 27 53 61 76 65 27 3b 20 73 74 6f 72 65 20 |. 'Save'; store | 000031f0 74 68 65 20 63 68 6f 69 63 65 73 20 2a 61 73 20 |the choices *as | 00003200 64 69 73 70 6c 61 79 65 64 20 69 6e 20 74 68 65 |displayed in the| 00003210 20 77 69 6e 64 6f 77 2a 20 2d 0d 02 40 3a f4 20 | window* -..@:. | 00003220 61 6e 20 27 4f 4b 27 20 69 73 20 6e 65 65 64 65 |an 'OK' is neede| 00003230 64 20 74 6f 20 6d 61 6b 65 20 74 68 6f 73 65 20 |d to make those | 00003240 74 68 65 20 63 75 72 72 65 6e 74 20 69 6e 74 65 |the current inte| 00003250 72 6e 61 6c 0d 02 41 0e f4 20 63 68 6f 69 63 65 |rnal..A.. choice| 00003260 73 2e 0d 02 42 04 0d 02 43 1a 63 68 6f 69 63 65 |s...B...C.choice| 00003270 66 68 25 3d ad 28 63 68 6f 69 70 61 74 68 24 29 |fh%=.(choipath$)| 00003280 0d 02 44 38 e7 20 63 68 6f 69 63 65 66 68 25 3d |..D8. choicefh%=| 00003290 30 20 8c 20 85 20 34 39 30 2c 22 43 61 6e 27 74 |0 . . 490,"Can't| 000032a0 20 66 69 6e 64 20 74 68 65 20 21 43 68 6f 69 63 | find the !Choic| 000032b0 65 73 20 66 69 6c 65 22 0d 02 45 04 0d 02 46 21 |es file"..E...F!| 000032c0 e7 20 a4 67 65 74 6f 70 74 28 63 68 6f 69 63 65 |. .getopt(choice| 000032d0 73 68 25 2c 32 29 20 8c 20 61 25 3d 30 0d 02 47 |sh%,2) . a%=0..G| 000032e0 21 e7 20 a4 67 65 74 6f 70 74 28 63 68 6f 69 63 |!. .getopt(choic| 000032f0 65 73 68 25 2c 33 29 20 8c 20 61 25 3d 31 0d 02 |esh%,3) . a%=1..| 00003300 48 21 e7 20 a4 67 65 74 6f 70 74 28 63 68 6f 69 |H!. .getopt(choi| 00003310 63 65 73 68 25 2c 34 29 20 8c 20 61 25 3d 32 0d |cesh%,4) . a%=2.| 00003320 02 49 1e f2 70 75 74 63 68 6f 69 63 65 28 22 44 |.I..putchoice("D| 00003330 69 74 68 65 72 69 6e 67 22 2c 61 25 29 0d 02 4a |ithering",a%)..J| 00003340 04 0d 02 4b 08 61 25 3d 30 0d 02 4c 21 e7 20 a4 |...K.a%=0..L!. .| 00003350 67 65 74 6f 70 74 28 63 68 6f 69 63 65 73 68 25 |getopt(choicesh%| 00003360 2c 37 29 20 8c 20 61 25 3d 31 0d 02 4d 21 e7 20 |,7) . a%=1..M!. | 00003370 a4 67 65 74 6f 70 74 28 63 68 6f 69 63 65 73 68 |.getopt(choicesh| 00003380 25 2c 38 29 20 8c 20 61 25 3d 32 0d 02 4e 21 e7 |%,8) . a%=2..N!.| 00003390 20 a4 67 65 74 6f 70 74 28 63 68 6f 69 63 65 73 | .getopt(choices| 000033a0 68 25 2c 39 29 20 8c 20 61 25 3d 33 0d 02 4f 20 |h%,9) . a%=3..O | 000033b0 f2 70 75 74 63 68 6f 69 63 65 28 22 46 75 6c 6c |.putchoice("Full| 000033c0 20 53 63 72 65 65 6e 22 2c 61 25 29 0d 02 50 04 | Screen",a%)..P.| 000033d0 0d 02 51 29 e7 20 a4 67 65 74 6f 70 74 28 63 68 |..Q). .getopt(ch| 000033e0 6f 69 63 65 73 68 25 2c 31 36 29 20 8c 20 61 25 |oicesh%,16) . a%| 000033f0 3d 31 20 8b 20 61 25 3d 30 0d 02 52 25 f2 70 75 |=1 . a%=0..R%.pu| 00003400 74 63 68 6f 69 63 65 28 22 41 75 74 6f 20 46 75 |tchoice("Auto Fu| 00003410 6c 6c 20 53 63 72 65 65 6e 22 2c 61 25 29 0d 02 |ll Screen",a%)..| 00003420 53 04 0d 02 54 29 e7 20 a4 67 65 74 6f 70 74 28 |S...T). .getopt(| 00003430 63 68 6f 69 63 65 73 68 25 2c 31 37 29 20 8c 20 |choicesh%,17) . | 00003440 61 25 3d 31 20 8b 20 61 25 3d 30 0d 02 55 25 f2 |a%=1 . a%=0..U%.| 00003450 70 75 74 63 68 6f 69 63 65 28 22 4d 6f 64 65 73 |putchoice("Modes| 00003460 20 4f 6e 20 53 74 61 72 74 75 70 22 2c 61 25 29 | On Startup",a%)| 00003470 0d 02 56 04 0d 02 57 29 e7 20 a4 67 65 74 6f 70 |..V...W). .getop| 00003480 74 28 63 68 6f 69 63 65 73 68 25 2c 31 38 29 20 |t(choicesh%,18) | 00003490 8c 20 61 25 3d 31 20 8b 20 61 25 3d 30 0d 02 58 |. a%=1 . a%=0..X| 000034a0 22 f2 70 75 74 63 68 6f 69 63 65 28 22 43 6c 6f |".putchoice("Clo| 000034b0 73 65 20 44 69 73 70 6c 61 79 22 2c 61 25 29 0d |se Display",a%).| 000034c0 02 59 04 0d 02 5a 0f d9 23 63 68 6f 69 63 65 66 |.Y...Z..#choicef| 000034d0 68 25 0d 02 5b 0f 63 68 6f 69 63 65 66 68 25 3d |h%..[.choicefh%=| 000034e0 30 0d 02 5c 04 0d 02 5d 08 c9 20 31 31 0d 02 5e |0..\...].. 11..^| 000034f0 34 f4 20 27 44 65 66 61 75 6c 74 27 20 28 41 63 |4. 'Default' (Ac| 00003500 63 75 72 61 74 65 20 64 69 74 68 65 72 69 6e 67 |curate dithering| 00003510 20 61 6e 64 20 42 65 73 74 20 46 69 74 20 66 6f | and Best Fit fo| 00003520 72 0d 02 5f 1a f4 20 46 75 6c 6c 20 53 63 72 65 |r.._.. Full Scre| 00003530 65 6e 20 6f 70 74 69 6f 6e 29 2e 0d 02 60 04 0d |en option)...`..| 00003540 02 61 1e e7 20 a4 67 65 74 6f 70 74 28 63 68 6f |.a.. .getopt(cho| 00003550 69 63 65 73 68 25 2c 34 29 3d a3 20 8c 0d 02 62 |icesh%,4)=. ...b| 00003560 33 e7 20 a4 67 65 74 6f 70 74 28 63 68 6f 69 63 |3. .getopt(choic| 00003570 65 73 68 25 2c 32 29 20 8c 20 f2 73 65 74 6f 70 |esh%,2) . .setop| 00003580 74 28 63 68 6f 69 63 65 73 68 25 2c 32 2c a3 29 |t(choicesh%,2,.)| 00003590 0d 02 63 33 e7 20 a4 67 65 74 6f 70 74 28 63 68 |..c3. .getopt(ch| 000035a0 6f 69 63 65 73 68 25 2c 33 29 20 8c 20 f2 73 65 |oicesh%,3) . .se| 000035b0 74 6f 70 74 28 63 68 6f 69 63 65 73 68 25 2c 33 |topt(choicesh%,3| 000035c0 2c a3 29 0d 02 64 33 e7 20 a4 67 65 74 6f 70 74 |,.)..d3. .getopt| 000035d0 28 63 68 6f 69 63 65 73 68 25 2c 34 29 20 8c 20 |(choicesh%,4) . | 000035e0 f2 73 65 74 6f 70 74 28 63 68 6f 69 63 65 73 68 |.setopt(choicesh| 000035f0 25 2c 34 2c a3 29 0d 02 65 1a f2 73 65 74 6f 70 |%,4,.)..e..setop| 00003600 74 28 63 68 6f 69 63 65 73 68 25 2c 34 2c b9 29 |t(choicesh%,4,.)| 00003610 0d 02 66 05 cd 0d 02 67 04 0d 02 68 1e e7 20 a4 |..f....g...h.. .| 00003620 67 65 74 6f 70 74 28 63 68 6f 69 63 65 73 68 25 |getopt(choicesh%| 00003630 2c 37 29 3d a3 20 8c 0d 02 69 33 e7 20 a4 67 65 |,7)=. ...i3. .ge| 00003640 74 6f 70 74 28 63 68 6f 69 63 65 73 68 25 2c 37 |topt(choicesh%,7| 00003650 29 20 8c 20 f2 73 65 74 6f 70 74 28 63 68 6f 69 |) . .setopt(choi| 00003660 63 65 73 68 25 2c 37 2c a3 29 0d 02 6a 33 e7 20 |cesh%,7,.)..j3. | 00003670 a4 67 65 74 6f 70 74 28 63 68 6f 69 63 65 73 68 |.getopt(choicesh| 00003680 25 2c 38 29 20 8c 20 f2 73 65 74 6f 70 74 28 63 |%,8) . .setopt(c| 00003690 68 6f 69 63 65 73 68 25 2c 38 2c a3 29 0d 02 6b |hoicesh%,8,.)..k| 000036a0 33 e7 20 a4 67 65 74 6f 70 74 28 63 68 6f 69 63 |3. .getopt(choic| 000036b0 65 73 68 25 2c 39 29 20 8c 20 f2 73 65 74 6f 70 |esh%,9) . .setop| 000036c0 74 28 63 68 6f 69 63 65 73 68 25 2c 39 2c a3 29 |t(choicesh%,9,.)| 000036d0 0d 02 6c 1a f2 73 65 74 6f 70 74 28 63 68 6f 69 |..l..setopt(choi| 000036e0 63 65 73 68 25 2c 37 2c b9 29 0d 02 6d 05 cd 0d |cesh%,7,.)..m...| 000036f0 02 6e 04 0d 02 6f 35 e7 20 a4 67 65 74 6f 70 74 |.n...o5. .getopt| 00003700 28 63 68 6f 69 63 65 73 68 25 2c 31 36 29 20 8c |(choicesh%,16) .| 00003710 20 f2 73 65 74 6f 70 74 28 63 68 6f 69 63 65 73 | .setopt(choices| 00003720 68 25 2c 31 36 2c a3 29 0d 02 70 35 e7 20 a4 67 |h%,16,.)..p5. .g| 00003730 65 74 6f 70 74 28 63 68 6f 69 63 65 73 68 25 2c |etopt(choicesh%,| 00003740 31 37 29 20 8c 20 f2 73 65 74 6f 70 74 28 63 68 |17) . .setopt(ch| 00003750 6f 69 63 65 73 68 25 2c 31 37 2c a3 29 0d 02 71 |oicesh%,17,.)..q| 00003760 35 e7 20 a4 67 65 74 6f 70 74 28 63 68 6f 69 63 |5. .getopt(choic| 00003770 65 73 68 25 2c 31 38 29 20 8c 20 f2 73 65 74 6f |esh%,18) . .seto| 00003780 70 74 28 63 68 6f 69 63 65 73 68 25 2c 31 38 2c |pt(choicesh%,18,| 00003790 a3 29 0d 02 72 04 0d 02 73 08 c9 20 31 32 0d 02 |.)..r...s.. 12..| 000037a0 74 32 f4 20 27 43 61 6e 63 65 6c 27 3b 20 72 65 |t2. 'Cancel'; re| 000037b0 73 65 74 20 63 68 6f 69 63 65 73 20 74 6f 20 61 |set choices to a| 000037c0 73 20 74 68 65 79 20 77 65 72 65 20 77 68 65 6e |s they were when| 000037d0 0d 02 75 18 f4 20 74 68 65 20 77 69 6e 64 6f 77 |..u.. the window| 000037e0 20 6f 70 65 6e 65 64 2e 0d 02 76 04 0d 02 77 28 | opened...v...w(| 000037f0 e7 20 a4 67 65 74 6f 70 74 28 63 68 6f 69 63 65 |. .getopt(choice| 00003800 73 68 25 2c 64 69 74 68 65 72 69 74 25 2b 32 29 |sh%,ditherit%+2)| 00003810 3d a3 20 8c 0d 02 78 33 e7 20 a4 67 65 74 6f 70 |=. ...x3. .getop| 00003820 74 28 63 68 6f 69 63 65 73 68 25 2c 32 29 20 8c |t(choicesh%,2) .| 00003830 20 f2 73 65 74 6f 70 74 28 63 68 6f 69 63 65 73 | .setopt(choices| 00003840 68 25 2c 32 2c a3 29 0d 02 79 33 e7 20 a4 67 65 |h%,2,.)..y3. .ge| 00003850 74 6f 70 74 28 63 68 6f 69 63 65 73 68 25 2c 33 |topt(choicesh%,3| 00003860 29 20 8c 20 f2 73 65 74 6f 70 74 28 63 68 6f 69 |) . .setopt(choi| 00003870 63 65 73 68 25 2c 33 2c a3 29 0d 02 7a 33 e7 20 |cesh%,3,.)..z3. | 00003880 a4 67 65 74 6f 70 74 28 63 68 6f 69 63 65 73 68 |.getopt(choicesh| 00003890 25 2c 34 29 20 8c 20 f2 73 65 74 6f 70 74 28 63 |%,4) . .setopt(c| 000038a0 68 6f 69 63 65 73 68 25 2c 34 2c a3 29 0d 02 7b |hoicesh%,4,.)..{| 000038b0 24 f2 73 65 74 6f 70 74 28 63 68 6f 69 63 65 73 |$.setopt(choices| 000038c0 68 25 2c 64 69 74 68 65 72 69 74 25 2b 32 2c b9 |h%,ditherit%+2,.| 000038d0 29 0d 02 7c 05 cd 0d 02 7d 04 0d 02 7e 13 e7 20 |)..|....}...~.. | 000038e0 66 75 6c 6c 73 63 72 6e 25 3e 30 20 8c 0d 02 7f |fullscrn%>0 ....| 000038f0 28 e7 20 a4 67 65 74 6f 70 74 28 63 68 6f 69 63 |(. .getopt(choic| 00003900 65 73 68 25 2c 66 75 6c 6c 73 63 72 6e 25 2b 36 |esh%,fullscrn%+6| 00003910 29 3d a3 20 8c 0d 02 80 33 e7 20 a4 67 65 74 6f |)=. ....3. .geto| 00003920 70 74 28 63 68 6f 69 63 65 73 68 25 2c 37 29 20 |pt(choicesh%,7) | 00003930 8c 20 f2 73 65 74 6f 70 74 28 63 68 6f 69 63 65 |. .setopt(choice| 00003940 73 68 25 2c 37 2c a3 29 0d 02 81 33 e7 20 a4 67 |sh%,7,.)...3. .g| 00003950 65 74 6f 70 74 28 63 68 6f 69 63 65 73 68 25 2c |etopt(choicesh%,| 00003960 38 29 20 8c 20 f2 73 65 74 6f 70 74 28 63 68 6f |8) . .setopt(cho| 00003970 69 63 65 73 68 25 2c 38 2c a3 29 0d 02 82 33 e7 |icesh%,8,.)...3.| 00003980 20 a4 67 65 74 6f 70 74 28 63 68 6f 69 63 65 73 | .getopt(choices| 00003990 68 25 2c 39 29 20 8c 20 f2 73 65 74 6f 70 74 28 |h%,9) . .setopt(| 000039a0 63 68 6f 69 63 65 73 68 25 2c 39 2c a3 29 0d 02 |choicesh%,9,.)..| 000039b0 83 24 f2 73 65 74 6f 70 74 28 63 68 6f 69 63 65 |.$.setopt(choice| 000039c0 73 68 25 2c 66 75 6c 6c 73 63 72 6e 25 2b 36 2c |sh%,fullscrn%+6,| 000039d0 b9 29 0d 02 84 05 cd 0d 02 85 05 cc 0d 02 86 33 |.).............3| 000039e0 e7 20 a4 67 65 74 6f 70 74 28 63 68 6f 69 63 65 |. .getopt(choice| 000039f0 73 68 25 2c 37 29 20 8c 20 f2 73 65 74 6f 70 74 |sh%,7) . .setopt| 00003a00 28 63 68 6f 69 63 65 73 68 25 2c 37 2c a3 29 0d |(choicesh%,7,.).| 00003a10 02 87 33 e7 20 a4 67 65 74 6f 70 74 28 63 68 6f |..3. .getopt(cho| 00003a20 69 63 65 73 68 25 2c 38 29 20 8c 20 f2 73 65 74 |icesh%,8) . .set| 00003a30 6f 70 74 28 63 68 6f 69 63 65 73 68 25 2c 38 2c |opt(choicesh%,8,| 00003a40 a3 29 0d 02 88 33 e7 20 a4 67 65 74 6f 70 74 28 |.)...3. .getopt(| 00003a50 63 68 6f 69 63 65 73 68 25 2c 39 29 20 8c 20 f2 |choicesh%,9) . .| 00003a60 73 65 74 6f 70 74 28 63 68 6f 69 63 65 73 68 25 |setopt(choicesh%| 00003a70 2c 39 2c a3 29 0d 02 89 05 cd 0d 02 8a 04 0d 02 |,9,.)...........| 00003a80 8b 43 e7 20 61 75 74 6f 66 75 6c 6c 25 3d 30 20 |.C. autofull%=0 | 00003a90 80 20 a4 67 65 74 6f 70 74 28 63 68 6f 69 63 65 |. .getopt(choice| 00003aa0 73 68 25 2c 31 36 29 20 8c 20 f2 73 65 74 6f 70 |sh%,16) . .setop| 00003ab0 74 28 63 68 6f 69 63 65 73 68 25 2c 31 36 2c a3 |t(choicesh%,16,.| 00003ac0 29 0d 02 8c 45 e7 20 61 75 74 6f 66 75 6c 6c 25 |)...E. autofull%| 00003ad0 3d 31 20 80 20 a4 67 65 74 6f 70 74 28 63 68 6f |=1 . .getopt(cho| 00003ae0 69 63 65 73 68 25 2c 31 36 29 3d a3 20 8c 20 f2 |icesh%,16)=. . .| 00003af0 73 65 74 6f 70 74 28 63 68 6f 69 63 65 73 68 25 |setopt(choicesh%| 00003b00 2c 31 36 2c b9 29 0d 02 8d 43 e7 20 6d 6f 64 65 |,16,.)...C. mode| 00003b10 73 6f 6e 73 25 3d 30 20 80 20 a4 67 65 74 6f 70 |sons%=0 . .getop| 00003b20 74 28 63 68 6f 69 63 65 73 68 25 2c 31 37 29 20 |t(choicesh%,17) | 00003b30 8c 20 f2 73 65 74 6f 70 74 28 63 68 6f 69 63 65 |. .setopt(choice| 00003b40 73 68 25 2c 31 37 2c a3 29 0d 02 8e 45 e7 20 6d |sh%,17,.)...E. m| 00003b50 6f 64 65 73 6f 6e 73 25 3d 31 20 80 20 a4 67 65 |odesons%=1 . .ge| 00003b60 74 6f 70 74 28 63 68 6f 69 63 65 73 68 25 2c 31 |topt(choicesh%,1| 00003b70 37 29 3d a3 20 8c 20 f2 73 65 74 6f 70 74 28 63 |7)=. . .setopt(c| 00003b80 68 6f 69 63 65 73 68 25 2c 31 37 2c b9 29 0d 02 |hoicesh%,17,.)..| 00003b90 8f 43 e7 20 63 6c 6f 73 65 64 69 73 25 3d 30 20 |.C. closedis%=0 | 00003ba0 80 20 a4 67 65 74 6f 70 74 28 63 68 6f 69 63 65 |. .getopt(choice| 00003bb0 73 68 25 2c 31 38 29 20 8c 20 f2 73 65 74 6f 70 |sh%,18) . .setop| 00003bc0 74 28 63 68 6f 69 63 65 73 68 25 2c 31 38 2c a3 |t(choicesh%,18,.| 00003bd0 29 0d 02 90 45 e7 20 63 6c 6f 73 65 64 69 73 25 |)...E. closedis%| 00003be0 3d 31 20 80 20 a4 67 65 74 6f 70 74 28 63 68 6f |=1 . .getopt(cho| 00003bf0 69 63 65 73 68 25 2c 31 38 29 3d a3 20 8c 20 f2 |icesh%,18)=. . .| 00003c00 73 65 74 6f 70 74 28 63 68 6f 69 63 65 73 68 25 |setopt(choicesh%| 00003c10 2c 31 38 2c b9 29 0d 02 91 04 0d 02 92 0f e7 20 |,18,.)......... | 00003c20 61 64 6a 75 25 3d 30 20 8c 0d 02 93 13 f2 77 61 |adju%=0 ......wa| 00003c30 69 74 66 6f 72 72 65 6c 65 61 73 65 0d 02 94 12 |itforrelease....| 00003c40 21 66 72 25 3d 63 68 6f 69 63 65 73 68 25 0d 02 |!fr%=choicesh%..| 00003c50 95 1e c8 99 20 22 57 69 6d 70 5f 43 6c 6f 73 65 |.... "Wimp_Close| 00003c60 57 69 6e 64 6f 77 22 2c 2c 66 72 25 0d 02 96 05 |Window",,fr%....| 00003c70 cd 0d 02 97 04 0d 02 98 08 c9 20 31 33 0d 02 99 |.......... 13...| 00003c80 41 f4 20 27 4f 4b 27 3b 20 73 74 6f 72 65 20 63 |A. 'OK'; store c| 00003c90 68 6f 69 63 65 73 20 69 6e 74 65 72 6e 61 6c 6c |hoices internall| 00003ca0 79 20 61 6e 64 20 66 6f 72 63 65 20 74 68 65 20 |y and force the | 00003cb0 64 69 73 70 6c 61 79 20 77 69 6e 64 6f 77 0d 02 |display window..| 00003cc0 9a 43 f4 20 74 6f 20 72 65 64 72 61 77 20 69 66 |.C. to redraw if| 00003cd0 20 69 74 20 69 73 20 6f 70 65 6e 2c 20 69 66 20 | it is open, if | 00003ce0 74 68 65 20 64 69 74 68 65 72 69 6e 67 20 6d 65 |the dithering me| 00003cf0 74 68 6f 64 20 68 61 73 20 63 68 61 6e 67 65 64 |thod has changed| 00003d00 2e 0d 02 9b 04 0d 02 9c 10 61 25 3d 64 69 74 68 |.........a%=dith| 00003d10 65 72 69 74 25 0d 02 9d 28 e7 20 a4 67 65 74 6f |erit%...(. .geto| 00003d20 70 74 28 63 68 6f 69 63 65 73 68 25 2c 32 29 20 |pt(choicesh%,2) | 00003d30 8c 20 64 69 74 68 65 72 69 74 25 3d 30 0d 02 9e |. ditherit%=0...| 00003d40 28 e7 20 a4 67 65 74 6f 70 74 28 63 68 6f 69 63 |(. .getopt(choic| 00003d50 65 73 68 25 2c 33 29 20 8c 20 64 69 74 68 65 72 |esh%,3) . dither| 00003d60 69 74 25 3d 31 0d 02 9f 28 e7 20 a4 67 65 74 6f |it%=1...(. .geto| 00003d70 70 74 28 63 68 6f 69 63 65 73 68 25 2c 34 29 20 |pt(choicesh%,4) | 00003d80 8c 20 64 69 74 68 65 72 69 74 25 3d 32 0d 02 a0 |. ditherit%=2...| 00003d90 1f 64 66 25 3d 64 69 74 68 65 72 69 74 25 2d 28 |.df%=ditherit%-(| 00003da0 64 69 74 68 65 72 69 74 25 3d 32 29 0d 02 a1 04 |ditherit%=2)....| 00003db0 0d 02 a2 0f 66 75 6c 6c 73 63 72 6e 25 3d 30 0d |....fullscrn%=0.| 00003dc0 02 a3 28 e7 20 a4 67 65 74 6f 70 74 28 63 68 6f |..(. .getopt(cho| 00003dd0 69 63 65 73 68 25 2c 37 29 20 8c 20 66 75 6c 6c |icesh%,7) . full| 00003de0 73 63 72 6e 25 3d 31 0d 02 a4 28 e7 20 a4 67 65 |scrn%=1...(. .ge| 00003df0 74 6f 70 74 28 63 68 6f 69 63 65 73 68 25 2c 38 |topt(choicesh%,8| 00003e00 29 20 8c 20 66 75 6c 6c 73 63 72 6e 25 3d 32 0d |) . fullscrn%=2.| 00003e10 02 a5 28 e7 20 a4 67 65 74 6f 70 74 28 63 68 6f |..(. .getopt(cho| 00003e20 69 63 65 73 68 25 2c 39 29 20 8c 20 66 75 6c 6c |icesh%,9) . full| 00003e30 73 63 72 6e 25 3d 33 0d 02 a6 04 0d 02 a7 37 e7 |scrn%=3.......7.| 00003e40 20 a4 67 65 74 6f 70 74 28 63 68 6f 69 63 65 73 | .getopt(choices| 00003e50 68 25 2c 31 36 29 20 8c 20 61 75 74 6f 66 75 6c |h%,16) . autoful| 00003e60 6c 25 3d 31 20 8b 20 61 75 74 6f 66 75 6c 6c 25 |l%=1 . autofull%| 00003e70 3d 30 0d 02 a8 37 e7 20 a4 67 65 74 6f 70 74 28 |=0...7. .getopt(| 00003e80 63 68 6f 69 63 65 73 68 25 2c 31 37 29 20 8c 20 |choicesh%,17) . | 00003e90 6d 6f 64 65 73 6f 6e 73 25 3d 31 20 8b 20 6d 6f |modesons%=1 . mo| 00003ea0 64 65 73 6f 6e 73 25 3d 30 0d 02 a9 37 e7 20 a4 |desons%=0...7. .| 00003eb0 67 65 74 6f 70 74 28 63 68 6f 69 63 65 73 68 25 |getopt(choicesh%| 00003ec0 2c 31 38 29 20 8c 20 63 6c 6f 73 65 64 69 73 25 |,18) . closedis%| 00003ed0 3d 31 20 8b 20 63 6c 6f 73 65 64 69 73 25 3d 30 |=1 . closedis%=0| 00003ee0 0d 02 aa 04 0d 02 ab 13 f2 77 61 69 74 66 6f 72 |.........waitfor| 00003ef0 72 65 6c 65 61 73 65 0d 02 ac 12 21 66 72 25 3d |release....!fr%=| 00003f00 63 68 6f 69 63 65 73 68 25 0d 02 ad 1e c8 99 20 |choicesh%...... | 00003f10 22 57 69 6d 70 5f 43 6c 6f 73 65 57 69 6e 64 6f |"Wimp_CloseWindo| 00003f20 77 22 2c 2c 66 72 25 0d 02 ae 04 0d 02 af 2a e7 |w",,fr%.......*.| 00003f30 20 a4 6f 70 65 6e 28 64 69 73 70 6c 61 79 68 25 | .open(displayh%| 00003f40 29 20 80 20 28 61 25 3c 3e 64 69 74 68 65 72 69 |) . (a%<>ditheri| 00003f50 74 25 29 20 8c 0d 02 b0 12 21 66 72 25 3d 64 69 |t%) .....!fr%=di| 00003f60 73 70 6c 61 79 68 25 0d 02 b1 21 c8 99 20 22 57 |splayh%...!.. "W| 00003f70 69 6d 70 5f 47 65 74 57 69 6e 64 6f 77 53 74 61 |imp_GetWindowSta| 00003f80 74 65 22 2c 2c 66 72 25 0d 02 b2 1e c8 99 20 22 |te",,fr%...... "| 00003f90 57 69 6d 70 5f 43 6c 6f 73 65 57 69 6e 64 6f 77 |Wimp_CloseWindow| 00003fa0 22 2c 2c 66 72 25 0d 02 b3 1d c8 99 20 22 57 69 |",,fr%...... "Wi| 00003fb0 6d 70 5f 4f 70 65 6e 57 69 6e 64 6f 77 22 2c 2c |mp_OpenWindow",,| 00003fc0 66 72 25 0d 02 b4 05 cd 0d 02 b5 04 0d 02 b6 05 |fr%.............| 00003fd0 cb 0d 02 b7 05 e1 0d 02 b8 05 3a 0d 02 b9 04 0d |..........:.....| 00003fe0 02 ba 04 0d 02 bb 21 f4 20 2d 2d 20 49 63 6f 6e |......!. -- Icon| 00003ff0 20 68 61 6e 64 6c 69 6e 67 20 70 72 6f 63 65 64 | handling proced| 00004000 75 72 65 73 0d 02 bc 04 0d 02 bd 04 0d 02 be 17 |ures............| 00004010 dd 20 f2 73 65 74 6f 70 74 28 61 25 2c 63 25 2c |. .setopt(a%,c%,| 00004020 64 25 29 0d 02 bf 19 e7 20 a4 67 65 74 6f 70 74 |d%)..... .getopt| 00004030 28 61 25 2c 63 25 29 3c 3e 64 25 8c 0d 02 c0 0a |(a%,c%)<>d%.....| 00004040 21 73 25 3d 61 25 0d 02 c1 0b 73 25 21 34 3d 63 |!s%=a%....s%!4=c| 00004050 25 0d 02 c2 1e c8 99 20 22 57 69 6d 70 5f 47 65 |%...... "Wimp_Ge| 00004060 74 49 63 6f 6e 53 74 61 74 65 22 2c 2c 73 25 0d |tIconState",,s%.| 00004070 02 c3 22 e7 20 64 25 3d a3 20 8c 20 73 25 21 38 |..". d%=. . s%!8| 00004080 3d 30 20 8b 20 73 25 21 38 3d 26 32 30 30 30 30 |=0 . s%!8=&20000| 00004090 30 0d 02 c4 0a 21 73 25 3d 61 25 0d 02 c5 0b 73 |0....!s%=a%....s| 000040a0 25 21 34 3d 63 25 0d 02 c6 11 73 25 21 31 32 3d |%!4=c%....s%!12=| 000040b0 26 32 30 30 30 30 30 0d 02 c7 1e c8 99 20 22 57 |&200000...... "W| 000040c0 69 6d 70 5f 53 65 74 49 63 6f 6e 53 74 61 74 65 |imp_SetIconState| 000040d0 22 2c 2c 73 25 0d 02 c8 05 cd 0d 02 c9 05 e1 0d |",,s%...........| 000040e0 02 ca 05 3a 0d 02 cb 04 0d 02 cc 04 0d 02 cd 21 |...:...........!| 000040f0 f4 20 2d 2d 20 4d 65 6e 75 20 68 61 6e 64 6c 69 |. -- Menu handli| 00004100 6e 67 20 70 72 6f 63 65 64 75 72 65 73 0d 02 ce |ng procedures...| 00004110 04 0d 02 cf 04 0d 02 d0 15 dd 20 f2 63 72 65 61 |.......... .crea| 00004120 74 65 6d 61 69 6e 6d 65 6e 75 0d 02 d1 10 64 61 |temainmenu....da| 00004130 74 61 70 6e 74 72 25 3d 73 25 0d 02 d2 13 24 73 |tapntr%=s%....$s| 00004140 25 3d 22 53 77 69 66 74 4a 50 45 47 22 0d 02 d3 |%="SwiftJPEG"...| 00004150 13 24 28 73 25 2b 31 30 29 3d 22 49 6e 66 6f 22 |.$(s%+10)="Info"| 00004160 0d 02 d4 13 24 28 73 25 2b 31 35 29 3d 22 5a 6f |....$(s%+15)="Zo| 00004170 6f 6d 22 0d 02 d5 16 24 28 73 25 2b 32 30 29 3d |om"....$(s%+20)=| 00004180 22 50 69 63 74 75 72 65 22 0d 02 d6 1d 24 28 73 |"Picture"....$(s| 00004190 25 2b 32 38 29 3d 22 46 75 6c 6c 20 73 63 72 65 |%+28)="Full scre| 000041a0 65 6e 2e 2e 2e 22 0d 02 d7 1b 24 28 73 25 2b 34 |en..."....$(s%+4| 000041b0 33 29 3d 22 43 68 6f 69 63 65 73 2e 2e 2e a4 44 |3)="Choices....D| 000041c0 22 0d 02 d8 13 24 28 73 25 2b 35 36 29 3d 22 51 |"....$(s%+56)="Q| 000041d0 75 69 74 22 0d 02 d9 19 24 28 73 25 2b 36 31 29 |uit"....$(s%+61)| 000041e0 3d 22 2a 22 2b bd 28 30 29 2b 22 2a 22 0d 02 da |="*"+.(0)+"*"...| 000041f0 23 6d 61 69 6e 6d 65 6e 75 61 64 64 72 25 3d a4 |#mainmenuaddr%=.| 00004200 6d 61 6b 65 6d 65 6e 75 28 6d 25 2c 6d 69 25 29 |makemenu(m%,mi%)| 00004210 0d 02 db 05 e1 0d 02 dc 05 3a 0d 02 dd 17 dd 20 |.........:..... | 00004220 f2 6f 70 65 6e 6d 61 69 6e 6d 65 6e 75 28 61 25 |.openmainmenu(a%| 00004230 29 0d 02 de 64 e7 20 61 25 3d a3 20 8c 20 f2 73 |)...d. a%=. . .s| 00004240 68 6f 77 6d 65 6e 75 28 6d 61 69 6e 6d 65 6e 75 |howmenu(mainmenu| 00004250 61 64 64 72 25 2c 21 62 25 2d 31 31 36 2c 31 34 |addr%,!b%-116,14| 00004260 30 2b 35 2a 34 34 2b 32 34 29 20 8b 20 f2 73 68 |0+5*44+24) . .sh| 00004270 6f 77 6d 65 6e 75 28 6d 61 69 6e 6d 65 6e 75 61 |owmenu(mainmenua| 00004280 64 64 72 25 2c 21 62 25 2d 31 31 36 2c 62 25 21 |ddr%,!b%-116,b%!| 00004290 34 2b 32 32 29 0d 02 df 05 e1 0d 02 e0 05 3a 0d |4+22).........:.| 000042a0 02 e1 17 dd 20 f2 61 74 74 61 63 68 28 61 25 2c |.... .attach(a%,| 000042b0 63 25 2c 64 25 29 0d 02 e2 17 21 28 61 25 2b 32 |c%,d%)....!(a%+2| 000042c0 38 2b 63 25 2a 32 34 2b 34 29 3d 64 25 0d 02 e3 |8+c%*24+4)=d%...| 000042d0 05 e1 0d 02 e4 05 3a 0d 02 e5 19 dd 20 f2 73 68 |......:..... .sh| 000042e0 6f 77 6d 65 6e 75 28 61 25 2c 78 25 2c 79 25 29 |owmenu(a%,x%,y%)| 000042f0 0d 02 e6 21 74 6f 70 6d 65 6e 75 25 3d 61 25 3a |...!topmenu%=a%:| 00004300 74 6f 70 78 25 3d 78 25 3a 74 6f 70 79 25 3d 79 |topx%=x%:topy%=y| 00004310 25 0d 02 e7 22 c8 99 20 22 57 69 6d 70 5f 43 72 |%...".. "Wimp_Cr| 00004320 65 61 74 65 4d 65 6e 75 22 2c 2c 61 25 2c 78 25 |eateMenu",,a%,x%| 00004330 2c 79 25 0d 02 e8 05 e1 0d 02 e9 05 3a 0d 02 ea |,y%.........:...| 00004340 18 dd 20 f2 73 65 74 74 69 63 6b 28 61 25 2c 63 |.. .settick(a%,c| 00004350 25 2c 64 25 29 0d 02 eb 52 e7 20 64 25 3d b9 20 |%,d%)...R. d%=. | 00004360 8c 20 61 25 21 28 32 38 2b 63 25 2a 32 34 29 3d |. a%!(28+c%*24)=| 00004370 61 25 21 28 32 38 2b 63 25 2a 32 34 29 84 31 3a |a%!(28+c%*24).1:| 00004380 8b 20 61 25 21 28 32 38 2b 63 25 2a 32 34 29 3d |. a%!(28+c%*24)=| 00004390 61 25 21 28 32 38 2b 63 25 2a 32 34 29 80 26 46 |a%!(28+c%*24).&F| 000043a0 46 46 46 46 46 46 45 0d 02 ec 05 e1 0d 02 ed 05 |FFFFFFE.........| 000043b0 3a 0d 02 ee 19 dd 20 f2 67 72 65 79 6f 75 74 6d |:..... .greyoutm| 000043c0 65 6e 75 28 61 25 2c 63 25 29 0d 02 ef 2f 61 25 |enu(a%,c%).../a%| 000043d0 21 28 32 38 2b 63 25 2a 32 34 2b 38 29 3d 28 61 |!(28+c%*24+8)=(a| 000043e0 25 21 28 32 38 2b 63 25 2a 32 34 2b 38 29 29 20 |%!(28+c%*24+8)) | 000043f0 84 20 28 31 3c 3c 32 32 29 0d 02 f0 05 e1 0d 02 |. (1<<22).......| 00004400 f1 05 3a 0d 02 f2 18 dd 20 f2 75 6e 67 72 65 79 |..:..... .ungrey| 00004410 6d 65 6e 75 28 61 25 2c 63 25 29 0d 02 f3 33 61 |menu(a%,c%)...3a| 00004420 25 21 28 32 38 2b 63 25 2a 32 34 2b 38 29 3d 28 |%!(28+c%*24+8)=(| 00004430 61 25 21 28 32 38 2b 63 25 2a 32 34 2b 38 29 29 |a%!(28+c%*24+8))| 00004440 20 80 20 28 ac 20 28 31 3c 3c 32 32 29 29 0d 02 | . (. (1<<22))..| 00004450 f4 05 e1 0d 02 f5 05 3a 0d 02 f6 11 dd 20 f2 6d |.......:..... .m| 00004460 65 6e 75 73 65 6c 65 63 74 0d 02 f7 11 ea 20 61 |enuselect..... a| 00004470 25 2c 63 25 2c 64 25 2c 61 24 0d 02 f8 20 c8 99 |%,c%,d%,a$... ..| 00004480 20 22 57 69 6d 70 5f 47 65 74 50 6f 69 6e 74 65 | "Wimp_GetPointe| 00004490 72 49 6e 66 6f 22 2c 2c 73 25 0d 02 f9 14 61 64 |rInfo",,s%....ad| 000044a0 6a 75 25 3d 28 73 25 21 38 20 80 20 31 29 0d 02 |ju%=(s%!8 . 1)..| 000044b0 fa 28 c8 99 20 22 57 69 6d 70 5f 44 65 63 6f 64 |.(.. "Wimp_Decod| 000044c0 65 4d 65 6e 75 22 2c 2c 74 6f 70 6d 65 6e 75 25 |eMenu",,topmenu%| 000044d0 2c 62 25 2c 73 25 0d 02 fb 04 0d 02 fc 0c c8 8e |,b%,s%..........| 000044e0 20 24 73 25 20 ca 0d 02 fd 04 0d 02 fe 0c c9 20 | $s% .......... | 000044f0 22 49 6e 66 6f 22 0d 02 ff 21 c8 99 20 22 57 69 |"Info"...!.. "Wi| 00004500 6d 70 5f 47 65 74 50 6f 69 6e 74 65 72 49 6e 66 |mp_GetPointerInf| 00004510 6f 22 2c 2c 66 72 25 0d 03 00 31 c8 99 20 22 57 |o",,fr%...1.. "W| 00004520 69 6d 70 5f 43 72 65 61 74 65 4d 65 6e 75 22 2c |imp_CreateMenu",| 00004530 2c 69 6e 66 6f 68 25 2c 21 66 72 25 2d 32 32 2c |,infoh%,!fr%-22,| 00004540 66 72 25 21 34 2d 32 32 0d 03 01 0c c9 20 22 5a |fr%!4-22..... "Z| 00004550 6f 6f 6d 22 0d 03 02 21 c8 99 20 22 57 69 6d 70 |oom"...!.. "Wimp| 00004560 5f 47 65 74 50 6f 69 6e 74 65 72 49 6e 66 6f 22 |_GetPointerInfo"| 00004570 2c 2c 66 72 25 0d 03 03 26 f2 73 68 6f 77 6d 65 |,,fr%...&.showme| 00004580 6e 75 28 7a 6f 6f 6d 68 25 2c 21 66 72 25 2d 33 |nu(zoomh%,!fr%-3| 00004590 30 2c 66 72 25 21 34 2b 33 36 29 0d 03 04 0f c9 |0,fr%!4+36).....| 000045a0 20 22 50 69 63 74 75 72 65 22 0d 03 05 21 c8 99 | "Picture"...!..| 000045b0 20 22 57 69 6d 70 5f 47 65 74 50 6f 69 6e 74 65 | "Wimp_GetPointe| 000045c0 72 49 6e 66 6f 22 2c 2c 66 72 25 0d 03 06 35 c8 |rInfo",,fr%...5.| 000045d0 99 20 22 57 69 6d 70 5f 43 72 65 61 74 65 4d 65 |. "Wimp_CreateMe| 000045e0 6e 75 22 2c 2c 6a 70 65 67 69 6e 66 6f 68 25 2c |nu",,jpeginfoh%,| 000045f0 21 66 72 25 2d 32 30 2c 66 72 25 21 34 2d 32 30 |!fr%-20,fr%!4-20| 00004600 0d 03 07 12 c9 20 22 43 68 6f 69 63 65 73 2e 2e |..... "Choices..| 00004610 2e 22 0d 03 08 1c f2 6f 70 65 6e 63 65 6e 74 65 |.".....opencente| 00004620 72 65 64 28 63 68 6f 69 63 65 73 68 25 29 0d 03 |red(choicesh%)..| 00004630 09 16 c9 20 22 46 75 6c 6c 20 73 63 72 65 65 6e |... "Full screen| 00004640 2e 2e 2e 22 0d 03 0a 0f f2 66 75 6c 6c 73 63 72 |...".....fullscr| 00004650 65 65 6e 0d 03 0b 0c c9 20 22 51 75 69 74 22 0d |een..... "Quit".| 00004660 03 0c 0b 71 75 69 74 25 3d b9 0d 03 0d 04 0d 03 |...quit%=.......| 00004670 0e 05 cb 0d 03 0f 04 0d 03 10 2d e7 20 61 64 6a |..........-. adj| 00004680 75 25 20 8c 20 f2 73 68 6f 77 6d 65 6e 75 28 74 |u% . .showmenu(t| 00004690 6f 70 6d 65 6e 75 25 2c 74 6f 70 78 25 2c 74 6f |opmenu%,topx%,to| 000046a0 70 79 25 29 0d 03 11 05 e1 0d 03 12 05 3a 0d 03 |py%).........:..| 000046b0 13 04 0d 03 14 04 0d 03 15 28 f4 20 2d 2d 20 46 |.........(. -- F| 000046c0 75 6c 6c 20 53 63 72 65 65 6e 20 68 61 6e 64 6c |ull Screen handl| 000046d0 69 6e 67 20 70 72 6f 63 65 64 75 72 65 73 0d 03 |ing procedures..| 000046e0 16 04 0d 03 17 04 0d 03 18 11 dd 20 f2 66 75 6c |........... .ful| 000046f0 6c 73 63 72 65 65 6e 0d 03 19 19 ea 20 61 25 2c |lscreen..... a%,| 00004700 63 25 2c 78 25 2c 79 25 2c 78 31 25 2c 79 31 25 |c%,x%,y%,x1%,y1%| 00004710 0d 03 1a 04 0d 03 1b 08 c8 97 20 87 0d 03 1c 04 |.......... .....| 00004720 0d 03 1d 1b 78 31 25 3d 78 70 69 63 25 2a 7a 6f |....x1%=xpic%*zo| 00004730 6f 6d 6d 25 2f 7a 6f 6f 6d 64 25 0d 03 1e 1b 79 |omm%/zoomd%....y| 00004740 31 25 3d 79 70 69 63 25 2a 7a 6f 6f 6d 6d 25 2f |1%=ypic%*zoomm%/| 00004750 7a 6f 6f 6d 64 25 0d 03 1f 04 0d 03 20 20 e7 20 |zoomd%...... . | 00004760 72 65 74 75 72 6e 74 6f 25 3d 2d 31 20 8c 20 63 |returnto%=-1 . c| 00004770 25 3d b9 20 8b 20 63 25 3d a3 0d 03 21 04 0d 03 |%=. . c%=...!...| 00004780 22 14 e7 20 72 65 74 75 72 6e 74 6f 25 3d 2d 31 |".. returnto%=-1| 00004790 20 8c 0d 03 23 0f 72 65 74 75 72 6e 74 6f 25 3d | ...#.returnto%=| 000047a0 eb 0d 03 24 15 e7 20 72 65 74 75 72 6e 74 6f 25 |...$.. returnto%| 000047b0 3e 31 32 37 20 8c 0d 03 25 14 e3 20 61 25 3d 30 |>127 ...%.. a%=0| 000047c0 20 b8 20 31 32 37 20 88 20 34 0d 03 26 18 6d 6f | . 127 . 4..&.mo| 000047d0 73 25 21 61 25 3d 72 65 74 75 72 6e 74 6f 25 21 |s%!a%=returnto%!| 000047e0 61 25 0d 03 27 05 ed 0d 03 28 12 72 65 74 75 72 |a%..'....(.retur| 000047f0 6e 74 6f 25 3d 6d 6f 73 25 0d 03 29 05 cd 0d 03 |nto%=mos%..)....| 00004800 2a 05 cd 0d 03 2b 04 0d 03 2c 23 e7 20 63 25 3d |*....+...,#. c%=| 00004810 b9 20 8c 20 c8 99 20 22 48 6f 75 72 67 6c 61 73 |. . .. "Hourglas| 00004820 73 5f 53 74 61 72 74 22 2c 35 0d 03 2d 04 0d 03 |s_Start",5..-...| 00004830 2e 12 c8 8e 20 66 75 6c 6c 73 63 72 6e 25 20 ca |.... fullscrn% .| 00004840 0d 03 2f 07 c9 20 30 0d 03 30 29 c8 99 20 22 4f |../.. 0..0).. "O| 00004850 53 5f 52 65 61 64 4d 6f 64 65 56 61 72 69 61 62 |S_ReadModeVariab| 00004860 6c 65 22 2c 2d 31 2c 31 31 20 b8 20 2c 2c 78 25 |le",-1,11 . ,,x%| 00004870 0d 03 31 29 c8 99 20 22 4f 53 5f 52 65 61 64 4d |..1).. "OS_ReadM| 00004880 6f 64 65 56 61 72 69 61 62 6c 65 22 2c 2d 31 2c |odeVariable",-1,| 00004890 31 32 20 b8 20 2c 2c 79 25 0d 03 32 09 78 25 2b |12 . ,,y%..2.x%+| 000048a0 3d 31 0d 03 33 09 79 25 2b 3d 31 0d 03 34 07 c9 |=1..3.y%+=1..4..| 000048b0 20 31 0d 03 35 22 f2 66 69 6e 64 62 65 73 74 66 | 1..5".findbestf| 000048c0 69 74 28 78 31 25 2c 79 31 25 2c 78 25 2c 79 25 |it(x1%,y1%,x%,y%| 000048d0 2c 61 25 29 0d 03 36 07 c9 20 32 0d 03 37 2f e7 |,a%)..6.. 2..7/.| 000048e0 20 78 62 69 67 25 3d 30 20 8c 20 f2 66 69 6e 64 | xbig%=0 . .find| 000048f0 62 69 67 67 65 73 74 28 78 62 69 67 25 2c 79 62 |biggest(xbig%,yb| 00004900 69 67 25 2c 62 62 70 70 25 29 0d 03 38 0c 78 25 |ig%,bbpp%)..8.x%| 00004910 3d 78 62 69 67 25 0d 03 39 0c 79 25 3d 79 62 69 |=xbig%..9.y%=ybi| 00004920 67 25 0d 03 3a 0c 61 25 3d 62 62 70 70 25 0d 03 |g%..:.a%=bbpp%..| 00004930 3b 07 c9 20 33 0d 03 3c 2f e7 20 78 63 6c 72 25 |;.. 3..</. xclr%| 00004940 3d 30 20 8c 20 f2 66 69 6e 64 63 6f 6c 6f 75 72 |=0 . .findcolour| 00004950 73 28 78 63 6c 72 25 2c 79 63 6c 72 25 2c 63 62 |s(xclr%,yclr%,cb| 00004960 70 70 25 29 0d 03 3d 0c 78 25 3d 78 63 6c 72 25 |pp%)..=.x%=xclr%| 00004970 0d 03 3e 0c 79 25 3d 79 63 6c 72 25 0d 03 3f 0c |..>.y%=yclr%..?.| 00004980 61 25 3d 63 62 70 70 25 0d 03 40 05 cb 0d 03 41 |a%=cbpp%..@....A| 00004990 04 0d 03 42 19 c8 99 20 22 57 69 6d 70 5f 53 65 |...B... "Wimp_Se| 000049a0 74 43 6f 6c 6f 75 72 22 2c 37 0d 03 43 12 c8 93 |tColour",7..C...| 000049b0 20 c8 90 30 2c 30 2c 33 32 37 36 37 0d 03 44 04 | ..0,0,32767..D.| 000049c0 0d 03 45 1f e7 20 63 25 3d b9 20 8c 20 c8 99 20 |..E.. c%=. . .. | 000049d0 22 48 6f 75 72 67 6c 61 73 73 5f 4f 66 66 22 0d |"Hourglass_Off".| 000049e0 03 46 04 0d 03 47 14 e7 20 66 75 6c 6c 73 63 72 |.F...G.. fullscr| 000049f0 6e 25 3c 3e 30 20 8c 0d 03 48 0a 21 66 72 25 3d |n%<>0 ...H.!fr%=| 00004a00 31 0d 03 49 0c 66 72 25 21 34 3d 78 25 0d 03 4a |1..I.fr%!4=x%..J| 00004a10 0c 66 72 25 21 38 3d 79 25 0d 03 4b 0d 66 72 25 |.fr%!8=y%..K.fr%| 00004a20 21 31 32 3d 61 25 0d 03 4c 0d 66 72 25 21 31 36 |!12=a%..L.fr%!16| 00004a30 3d 2d 31 0d 03 4d 0d 66 72 25 21 32 30 3d 2d 31 |=-1..M.fr%!20=-1| 00004a40 0d 03 4e 0d e7 20 eb 3e 31 32 37 20 8c 0d 03 4f |..N.. .>127 ...O| 00004a50 37 e7 20 66 72 25 21 34 3c 3e 21 28 eb 2b 34 29 |7. fr%!4<>!(.+4)| 00004a60 20 84 20 66 72 25 21 38 3c 3e 21 28 eb 2b 38 29 | . fr%!8<>!(.+8)| 00004a70 20 84 20 66 72 25 21 31 32 3c 3e 21 28 eb 2b 31 | . fr%!12<>!(.+1| 00004a80 32 29 20 8c 0d 03 50 09 eb 20 66 72 25 0d 03 51 |2) ...P.. fr%..Q| 00004a90 18 c8 99 20 22 57 69 6d 70 5f 53 65 74 50 61 6c |... "Wimp_SetPal| 00004aa0 65 74 74 65 22 0d 03 52 05 87 0d 03 53 05 cd 0d |ette"..R....S...| 00004ab0 03 54 05 cc 0d 03 55 09 eb 20 66 72 25 0d 03 56 |.T....U.. fr%..V| 00004ac0 18 c8 99 20 22 57 69 6d 70 5f 53 65 74 50 61 6c |... "Wimp_SetPal| 00004ad0 65 74 74 65 22 0d 03 57 05 87 0d 03 58 05 cd 0d |ette"..W....X...| 00004ae0 03 59 05 cd 0d 03 5a 04 0d 03 5b 19 c8 99 20 22 |.Y....Z...[... "| 00004af0 57 69 6d 70 5f 53 65 74 43 6f 6c 6f 75 72 22 2c |Wimp_SetColour",| 00004b00 37 0d 03 5c 12 c8 93 20 c8 90 30 2c 30 2c 33 32 |7..\... ..0,0,32| 00004b10 37 36 37 0d 03 5d 04 0d 03 5e 0d 78 25 3d 78 25 |767..]...^.x%=x%| 00004b20 2d 78 31 25 0d 03 5f 0d 79 25 3d 79 25 2d 79 31 |-x1%.._.y%=y%-y1| 00004b30 25 0d 03 60 0f 21 66 72 25 3d 7a 6f 6f 6d 6d 25 |%..`.!fr%=zoomm%| 00004b40 0d 03 61 10 66 72 25 21 34 3d 7a 6f 6f 6d 6d 25 |..a.fr%!4=zoomm%| 00004b50 0d 03 62 10 66 72 25 21 38 3d 7a 6f 6f 6d 64 25 |..b.fr%!8=zoomd%| 00004b60 0d 03 63 11 66 72 25 21 31 32 3d 7a 6f 6f 6d 64 |..c.fr%!12=zoomd| 00004b70 25 0d 03 64 3b c8 99 20 22 58 4a 50 45 47 5f 50 |%..d;.. "XJPEG_P| 00004b80 6c 6f 74 53 63 61 6c 65 64 22 2c 62 61 73 65 6d |lotScaled",basem| 00004b90 65 6d 6f 25 2c 78 25 2c 79 25 2c 66 72 25 2c 6a |emo%,x%,y%,fr%,j| 00004ba0 70 65 67 6c 65 6e 67 25 2c 64 66 25 0d 03 65 04 |pegleng%,df%..e.| 00004bb0 0d 03 66 05 f5 0d 03 67 1a c8 99 20 22 4f 53 5f |..f....g... "OS_| 00004bc0 42 79 74 65 22 2c 31 32 31 20 b8 20 2c 61 25 0d |Byte",121 . ,a%.| 00004bd0 03 68 0c fd 20 61 25 3d 32 35 35 0d 03 69 04 0d |.h.. a%=255..i..| 00004be0 03 6a 05 f5 0d 03 6b 1a c8 99 20 22 4f 53 5f 42 |.j....k... "OS_B| 00004bf0 79 74 65 22 2c 31 32 31 20 b8 20 2c 61 25 0d 03 |yte",121 . ,a%..| 00004c00 6c 0d fd 20 61 25 3c 3e 32 35 35 0d 03 6d 04 0d |l.. a%<>255..m..| 00004c10 03 6e 2d e7 20 28 61 25 3d 31 31 32 29 20 80 20 |.n-. (a%=112) . | 00004c20 28 61 75 74 6f 66 75 6c 6c 25 3c 3e 30 29 20 8c |(autofull%<>0) .| 00004c30 20 61 62 6f 72 74 6d 75 6c 25 3d b9 0d 03 6f 04 | abortmul%=...o.| 00004c40 0d 03 70 12 c8 93 20 c8 90 30 2c 30 2c 33 32 37 |..p... ..0,0,327| 00004c50 36 37 0d 03 71 04 0d 03 72 1b c8 99 20 22 48 6f |67..q...r... "Ho| 00004c60 75 72 67 6c 61 73 73 5f 53 74 61 72 74 22 2c 31 |urglass_Start",1| 00004c70 35 0d 03 73 05 f5 0d 03 74 0f c8 97 20 64 25 2c |5..s....t... d%,| 00004c80 64 25 2c 61 25 0d 03 75 0a fd 20 61 25 3d 30 0d |d%,a%..u.. a%=0.| 00004c90 03 76 18 c8 99 20 22 58 4f 53 5f 43 4c 49 22 2c |.v... "XOS_CLI",| 00004ca0 22 46 58 20 31 35 22 0d 03 77 16 c8 99 20 22 48 |"FX 15"..w... "H| 00004cb0 6f 75 72 67 6c 61 73 73 5f 4f 66 66 22 0d 03 78 |ourglass_Off"..x| 00004cc0 04 0d 03 79 45 f4 20 46 6f 72 63 65 20 61 20 72 |...yE. Force a r| 00004cd0 65 64 72 61 77 20 6f 66 20 74 68 65 20 64 69 73 |edraw of the dis| 00004ce0 70 6c 61 79 20 77 69 6e 64 6f 77 2e 20 45 76 65 |play window. Eve| 00004cf0 6e 20 69 66 20 69 74 27 73 20 73 75 62 73 65 71 |n if it's subseq| 00004d00 75 65 6e 74 6c 79 0d 03 7a 44 f4 20 63 6c 6f 73 |uently..zD. clos| 00004d10 65 64 20 62 65 66 6f 72 65 20 77 65 20 67 65 74 |ed before we get| 00004d20 20 62 61 63 6b 20 74 6f 20 70 6f 6c 6c 69 6e 67 | back to polling| 00004d30 2c 20 74 68 69 73 20 77 69 6c 6c 20 66 6f 72 63 |, this will forc| 00004d40 65 20 6a 75 73 74 20 6f 6e 65 0d 03 7b 44 f4 20 |e just one..{D. | 00004d50 72 65 74 75 72 6e 20 66 72 6f 6d 20 74 68 65 20 |return from the | 00004d60 57 69 6d 70 20 77 69 74 68 20 72 65 61 73 6f 6e |Wimp with reason| 00004d70 20 63 6f 64 65 20 31 2e 20 49 66 20 79 6f 75 20 | code 1. If you | 00004d80 64 6f 6e 27 74 20 64 6f 20 74 68 69 73 2c 0d 03 |don't do this,..| 00004d90 7c 44 f4 20 74 68 65 6e 20 73 69 6e 63 65 20 57 ||D. then since W| 00004da0 69 6d 70 5f 50 6f 6c 6c 49 64 6c 65 20 69 73 20 |imp_PollIdle is | 00004db0 75 73 65 64 2c 20 74 68 65 20 70 6f 6c 6c 69 6e |used, the pollin| 00004dc0 67 20 63 6f 64 65 20 64 6f 65 73 6e 27 74 20 67 |g code doesn't g| 00004dd0 65 74 0d 03 7d 45 f4 20 63 61 6c 6c 65 64 20 66 |et..}E. called f| 00004de0 6f 72 20 61 67 65 73 2c 20 61 6e 64 20 74 68 65 |or ages, and the| 00004df0 20 44 65 73 6b 74 6f 70 20 73 63 72 65 65 6e 20 | Desktop screen | 00004e00 6d 6f 64 65 20 69 73 6e 27 74 20 72 65 74 75 72 |mode isn't retur| 00004e10 6e 65 64 20 74 6f 2e 0d 03 7e 42 f4 20 59 65 73 |ned to...~B. Yes| 00004e20 2c 20 49 20 6b 6e 6f 77 2c 20 69 74 27 73 20 61 |, I know, it's a| 00004e30 20 68 6f 72 72 69 62 6c 65 20 6b 6c 75 64 67 65 | horrible kludge| 00004e40 2e 20 57 65 6c 6c 2c 20 73 6f 72 74 20 6f 66 3b |. Well, sort of;| 00004e50 20 69 74 20 69 73 6e 27 74 0d 03 7f 41 f4 20 74 | it isn't...A. t| 00004e60 68 61 74 20 62 61 64 20 72 65 61 6c 6c 79 2c 20 |hat bad really, | 00004e70 61 6e 64 20 74 68 65 20 62 65 6e 65 66 69 74 73 |and the benefits| 00004e80 20 6f 66 20 57 69 6d 70 5f 50 6f 6c 6c 49 64 6c | of Wimp_PollIdl| 00004e90 65 20 6f 75 74 77 65 69 67 68 0d 03 80 24 f4 20 |e outweigh...$. | 00004ea0 74 68 69 73 20 6c 69 74 74 6c 65 20 73 74 75 6d |this little stum| 00004eb0 62 6c 69 6e 67 20 62 6c 6f 63 6b 2e 2e 2e 0d 03 |bling block.....| 00004ec0 81 04 0d 03 82 12 21 66 72 25 3d 64 69 73 70 6c |......!fr%=displ| 00004ed0 61 79 68 25 0d 03 83 21 c8 99 20 22 57 69 6d 70 |ayh%...!.. "Wimp| 00004ee0 5f 47 65 74 57 69 6e 64 6f 77 53 74 61 74 65 22 |_GetWindowState"| 00004ef0 2c 2c 66 72 25 0d 03 84 1e c8 99 20 22 57 69 6d |,,fr%...... "Wim| 00004f00 70 5f 43 6c 6f 73 65 57 69 6e 64 6f 77 22 2c 2c |p_CloseWindow",,| 00004f10 66 72 25 0d 03 85 1d c8 99 20 22 57 69 6d 70 5f |fr%...... "Wimp_| 00004f20 4f 70 65 6e 57 69 6e 64 6f 77 22 2c 2c 66 72 25 |OpenWindow",,fr%| 00004f30 0d 03 86 04 0d 03 87 05 e1 0d 03 88 05 3a 0d 03 |.............:..| 00004f40 89 22 dd 20 f2 66 69 6e 64 62 69 67 67 65 73 74 |.". .findbiggest| 00004f50 28 f8 20 78 25 2c f8 20 79 25 2c f8 20 63 25 29 |(. x%,. y%,. c%)| 00004f60 0d 03 8a 2d f4 20 50 61 73 73 20 74 68 72 65 65 |...-. Pass three| 00004f70 20 76 61 72 69 61 62 6c 65 73 20 69 6e 74 6f 20 | variables into | 00004f80 77 68 69 63 68 20 77 69 6c 6c 20 62 65 0d 03 8b |which will be...| 00004f90 30 f4 20 70 61 73 73 65 64 20 74 68 65 20 78 20 |0. passed the x | 00004fa0 61 6e 64 20 79 20 73 69 7a 65 73 20 6f 66 20 61 |and y sizes of a| 00004fb0 20 73 63 72 65 65 6e 20 6d 6f 64 65 2c 0d 03 8c | screen mode,...| 00004fc0 32 f4 20 61 6e 64 20 69 74 27 73 20 63 6f 6c 6f |2. and it's colo| 00004fd0 75 72 20 64 65 70 74 68 20 28 61 73 20 69 6e 20 |ur depth (as in | 00004fe0 61 20 6d 6f 64 65 20 73 65 6c 65 63 74 6f 72 0d |a mode selector.| 00004ff0 03 8d 32 f4 20 62 6c 6f 63 6b 3b 20 30 3d 31 20 |..2. block; 0=1 | 00005000 62 70 70 2c 20 31 3d 32 62 70 70 2c 20 32 3d 34 |bpp, 1=2bpp, 2=4| 00005010 62 70 70 2c 20 33 3d 38 62 70 70 20 65 74 63 29 |bpp, 3=8bpp etc)| 00005020 2e 0d 03 8e 2f f4 20 54 68 65 20 72 6f 75 74 69 |..../. The routi| 00005030 6e 65 20 70 61 73 73 65 73 20 74 68 65 20 6c 61 |ne passes the la| 00005040 72 67 65 73 74 20 6d 6f 64 65 2c 20 77 69 74 68 |rgest mode, with| 00005050 0d 03 8f 2d f4 20 74 68 65 20 62 65 73 74 20 63 |...-. the best c| 00005060 6f 6c 6f 75 72 20 64 65 70 74 68 20 61 76 61 69 |olour depth avai| 00005070 6c 61 62 6c 65 20 66 6f 72 20 74 68 65 0d 03 90 |lable for the...| 00005080 0b f4 20 73 69 7a 65 2e 0d 03 91 05 f4 0d 03 92 |.. size.........| 00005090 2f f4 20 4d 6f 64 65 73 20 77 68 65 72 65 20 74 |/. Modes where t| 000050a0 68 65 20 79 20 73 69 7a 65 20 69 73 20 62 69 67 |he y size is big| 000050b0 67 65 72 20 74 68 61 6e 20 74 68 65 0d 03 93 31 |ger than the...1| 000050c0 f4 20 78 20 73 69 7a 65 2c 20 6f 72 20 77 68 65 |. x size, or whe| 000050d0 72 65 20 74 68 65 20 79 20 73 69 7a 65 20 77 68 |re the y size wh| 000050e0 65 6e 20 64 6f 75 62 6c 65 64 20 69 73 0d 03 94 |en doubled is...| 000050f0 2e f4 20 6c 61 72 67 65 72 20 74 68 61 6e 20 74 |.. larger than t| 00005100 68 65 20 78 20 73 69 7a 65 20 61 72 65 20 6e 6f |he x size are no| 00005110 74 20 63 68 6f 73 65 6e 20 61 73 0d 03 95 30 f4 |t chosen as...0.| 00005120 20 74 68 65 73 65 20 61 72 65 20 61 73 73 75 6d | these are assum| 00005130 65 64 20 74 6f 20 62 65 20 69 6e 20 74 68 65 20 |ed to be in the | 00005140 66 69 72 73 74 20 63 61 73 65 2c 0d 03 96 2c f4 |first case,...,.| 00005150 20 6f 66 20 75 6e 64 65 73 69 72 61 62 6c 65 20 | of undesirable | 00005160 61 73 70 65 63 74 20 72 61 74 69 6f 20 61 6e 64 |aspect ratio and| 00005170 20 69 6e 20 74 68 65 0d 03 97 2d f4 20 73 65 63 | in the...-. sec| 00005180 6f 6e 64 20 63 61 73 65 2c 20 6f 66 20 6d 65 64 |ond case, of med| 00005190 69 75 6d 20 72 65 73 6f 6c 75 74 69 6f 6e 20 28 |ium resolution (| 000051a0 6c 69 6b 65 0d 03 98 23 f4 20 6d 6f 64 65 20 31 |like...#. mode 1| 000051b0 32 2c 20 36 34 30 78 32 35 36 78 31 36 20 63 6f |2, 640x256x16 co| 000051c0 6c 6f 75 72 73 29 2e 0d 03 99 05 f4 0d 03 9a 2f |lours)........./| 000051d0 f4 20 54 6f 20 61 76 6f 69 64 20 73 74 75 70 69 |. To avoid stupi| 000051e0 64 20 72 65 73 6f 6c 75 74 69 6f 6e 73 20 6c 69 |d resolutions li| 000051f0 6b 65 20 33 32 30 78 32 35 30 2c 0d 03 9b 33 f4 |ke 320x250,...3.| 00005200 20 77 68 69 63 68 20 66 6f 72 20 6d 61 6e 79 20 | which for many | 00005210 70 65 6f 70 6c 65 20 77 69 6c 6c 20 68 61 76 65 |people will have| 00005220 20 6e 6f 20 61 64 76 61 6e 74 61 67 65 73 0d 03 | no advantages..| 00005230 9c 2c f4 20 6f 76 65 72 2c 20 73 61 79 2c 20 33 |.,. over, say, 3| 00005240 32 30 78 32 35 36 20 74 68 6f 75 67 68 20 61 74 |20x256 though at| 00005250 20 6c 65 61 73 74 20 74 68 65 0d 03 9d 32 f4 20 | least the...2. | 00005260 6c 61 74 74 65 72 20 6d 61 79 20 68 61 76 65 20 |latter may have | 00005270 61 20 31 30 30 48 7a 20 65 71 75 69 76 61 6c 65 |a 100Hz equivale| 00005280 6e 74 20 66 6f 72 20 74 68 6f 73 65 0d 03 9e 32 |nt for those...2| 00005290 f4 20 77 69 74 68 20 6d 6f 6e 69 74 6f 72 73 20 |. with monitors | 000052a0 74 68 61 74 20 77 6f 75 6c 64 20 6f 74 68 65 72 |that would other| 000052b0 77 69 73 65 20 6c 65 74 74 65 72 62 6f 78 0d 03 |wise letterbox..| 000052c0 9f 2f f4 20 74 68 69 6e 67 73 2c 20 74 68 65 20 |./. things, the | 000052d0 78 20 61 6e 64 20 79 20 63 6f 6f 72 64 69 6e 61 |x and y coordina| 000052e0 74 65 73 20 6d 75 73 74 20 62 6f 74 68 0d 03 a0 |tes must both...| 000052f0 18 f4 20 62 65 20 64 69 76 69 73 69 62 6c 65 20 |.. be divisible | 00005300 62 79 20 34 2e 0d 03 a1 04 0d 03 a2 0e ea 20 61 |by 4.......... a| 00005310 25 2c 64 25 2c 65 25 0d 03 a3 04 0d 03 a4 1f c8 |%,d%,e%.........| 00005320 99 20 22 4f 53 5f 53 63 72 65 65 6e 4d 6f 64 65 |. "OS_ScreenMode| 00005330 22 2c 32 20 b8 20 2c 2c 64 25 0d 03 a5 04 0d 03 |",2 . ,,d%......| 00005340 a6 08 78 25 3d 30 0d 03 a7 08 79 25 3d 30 0d 03 |..x%=0....y%=0..| 00005350 a8 08 63 25 3d 31 0d 03 a9 08 65 25 3d 30 0d 03 |..c%=1....e%=0..| 00005360 aa 04 0d 03 ab 14 e3 20 65 25 3d 30 20 b8 20 28 |....... e%=0 . (| 00005370 2d 64 25 29 2d 31 0d 03 ac 25 c8 99 20 22 4f 53 |-d%)-1...%.. "OS| 00005380 5f 53 63 72 65 65 6e 4d 6f 64 65 22 2c 32 2c 2c |_ScreenMode",2,,| 00005390 65 25 2c 2c 2c 2c 62 25 2c 36 34 0d 03 ad 46 e7 |e%,,,,b%,64...F.| 000053a0 20 28 62 25 21 38 3e 62 25 21 31 32 29 20 80 20 | (b%!8>b%!12) . | 000053b0 28 28 62 25 21 31 32 29 2a 32 3e 62 25 21 38 29 |((b%!12)*2>b%!8)| 000053c0 20 80 20 28 62 25 21 38 20 83 20 34 3d 30 29 20 | . (b%!8 . 4=0) | 000053d0 80 20 28 62 25 21 31 32 20 83 20 34 3d 30 29 20 |. (b%!12 . 4=0) | 000053e0 8c 0d 03 ae 3a e7 20 28 62 25 21 38 3e 3d 78 25 |....:. (b%!8>=x%| 000053f0 29 20 80 20 28 62 25 21 31 32 3e 3d 79 25 29 20 |) . (b%!12>=y%) | 00005400 8c 20 78 25 3d 62 25 21 38 3a 79 25 3d 62 25 21 |. x%=b%!8:y%=b%!| 00005410 31 32 3a 63 25 3d 62 25 21 31 36 0d 03 af 05 cd |12:c%=b%!16.....| 00005420 0d 03 b0 05 ed 0d 03 b1 05 e1 0d 03 b2 05 3a 0d |..............:.| 00005430 03 b3 22 dd 20 f2 66 69 6e 64 63 6f 6c 6f 75 72 |..". .findcolour| 00005440 73 28 f8 20 78 25 2c f8 20 79 25 2c f8 20 63 25 |s(. x%,. y%,. c%| 00005450 29 0d 03 b4 32 f4 20 41 73 20 50 52 4f 43 62 69 |)...2. As PROCbi| 00005460 67 67 65 73 74 2c 20 62 75 74 20 72 65 74 75 72 |ggest, but retur| 00005470 6e 73 20 74 68 65 20 6c 61 72 67 65 73 74 20 6d |ns the largest m| 00005480 6f 64 65 0d 03 b5 2f f4 20 61 76 61 69 6c 61 62 |ode.../. availab| 00005490 6c 65 20 66 72 6f 6d 20 74 68 65 20 6c 69 73 74 |le from the list| 000054a0 20 6f 66 20 74 68 6f 73 65 20 77 69 74 68 20 74 | of those with t| 000054b0 68 65 0d 03 b6 32 f4 20 68 69 67 68 65 73 74 20 |he...2. highest | 000054c0 63 6f 6c 6f 75 72 20 64 65 70 74 68 20 61 76 61 |colour depth ava| 000054d0 69 6c 61 62 6c 65 20 28 65 2e 67 2e 20 36 34 30 |ilable (e.g. 640| 000054e0 78 34 38 30 0d 03 b7 33 f4 20 62 79 20 31 36 2e |x480...3. by 16.| 000054f0 37 4d 20 77 69 74 68 20 31 4d 62 20 56 52 41 4d |7M with 1Mb VRAM| 00005500 2c 20 38 30 30 78 36 30 30 20 62 79 20 31 36 2e |, 800x600 by 16.| 00005510 37 4d 20 77 69 74 68 0d 03 b8 0b f4 20 32 4d 62 |7M with..... 2Mb| 00005520 29 2e 0d 03 b9 04 0d 03 ba 0b ea 20 61 25 2c 64 |).......... a%,d| 00005530 25 0d 03 bb 04 0d 03 bc 1f c8 99 20 22 4f 53 5f |%.......... "OS_| 00005540 53 63 72 65 65 6e 4d 6f 64 65 22 2c 32 20 b8 20 |ScreenMode",2 . | 00005550 2c 2c 64 25 0d 03 bd 04 0d 03 be 08 78 25 3d 30 |,,d%........x%=0| 00005560 0d 03 bf 08 79 25 3d 30 0d 03 c0 08 63 25 3d 30 |....y%=0....c%=0| 00005570 0d 03 c1 04 0d 03 c2 08 65 25 3d 30 0d 03 c3 04 |........e%=0....| 00005580 0d 03 c4 14 e3 20 65 25 3d 30 20 b8 20 28 2d 64 |..... e%=0 . (-d| 00005590 25 29 2d 31 0d 03 c5 25 c8 99 20 22 4f 53 5f 53 |%)-1...%.. "OS_S| 000055a0 63 72 65 65 6e 4d 6f 64 65 22 2c 32 2c 2c 65 25 |creenMode",2,,e%| 000055b0 2c 2c 2c 2c 62 25 2c 36 34 0d 03 c6 46 e7 20 28 |,,,,b%,64...F. (| 000055c0 62 25 21 38 3e 62 25 21 31 32 29 20 80 20 28 28 |b%!8>b%!12) . ((| 000055d0 62 25 21 31 32 29 2a 32 3e 62 25 21 38 29 20 80 |b%!12)*2>b%!8) .| 000055e0 20 28 62 25 21 38 20 83 20 34 3d 30 29 20 80 20 | (b%!8 . 4=0) . | 000055f0 28 62 25 21 31 32 20 83 20 34 3d 30 29 20 8c 0d |(b%!12 . 4=0) ..| 00005600 03 c7 48 e7 20 28 62 25 21 31 36 3e 3d 63 25 29 |..H. (b%!16>=c%)| 00005610 20 80 20 28 62 25 21 38 3e 3d 78 25 29 20 80 20 | . (b%!8>=x%) . | 00005620 28 62 25 21 31 32 3e 3d 79 25 29 20 8c 20 78 25 |(b%!12>=y%) . x%| 00005630 3d 62 25 21 38 3a 79 25 3d 62 25 21 31 32 3a 63 |=b%!8:y%=b%!12:c| 00005640 25 3d 62 25 21 31 36 0d 03 c8 05 cd 0d 03 c9 05 |%=b%!16.........| 00005650 ed 0d 03 ca 05 e1 0d 03 cb 05 3a 0d 03 cc 2a dd |..........:...*.| 00005660 20 f2 66 69 6e 64 62 65 73 74 66 69 74 28 78 31 | .findbestfit(x1| 00005670 25 2c 79 31 25 2c f8 20 78 25 2c f8 20 79 25 2c |%,y1%,. x%,. y%,| 00005680 f8 20 63 25 29 0d 03 cd 35 f4 20 50 61 73 73 20 |. c%)...5. Pass | 00005690 61 6e 20 78 20 61 6e 64 20 79 20 73 69 7a 65 20 |an x and y size | 000056a0 61 6e 64 20 74 68 72 65 65 20 76 61 72 69 61 62 |and three variab| 000056b0 6c 65 73 20 61 73 20 66 6f 72 0d 03 ce 37 f4 20 |les as for...7. | 000056c0 50 52 4f 43 62 69 67 67 65 73 74 20 61 6e 64 20 |PROCbiggest and | 000056d0 50 52 4f 43 63 6f 6c 6f 75 72 73 2e 20 54 68 69 |PROCcolours. Thi| 000056e0 73 20 72 6f 75 74 69 6e 65 20 72 65 74 75 72 6e |s routine return| 000056f0 73 0d 03 cf 37 f4 20 74 68 65 20 6d 6f 64 65 20 |s...7. the mode | 00005700 77 68 69 63 68 20 69 73 20 6f 66 20 67 72 65 61 |which is of grea| 00005710 74 65 72 20 6f 72 20 65 71 75 61 6c 20 73 69 7a |ter or equal siz| 00005720 65 20 74 6f 20 74 68 65 0d 03 d0 23 f4 20 78 20 |e to the...#. x | 00005730 61 6e 64 20 79 20 63 6f 6f 72 64 69 6e 61 74 65 |and y coordinate| 00005740 73 20 79 6f 75 20 70 61 73 73 2e 0d 03 d1 05 f4 |s you pass......| 00005750 0d 03 d2 3a f4 20 49 66 20 6e 6f 20 6d 6f 64 65 |...:. If no mode| 00005760 20 77 69 6c 6c 20 69 73 20 62 69 67 20 65 6e 6f | will is big eno| 00005770 75 67 68 2c 20 50 52 4f 43 62 69 67 67 65 73 74 |ugh, PROCbiggest| 00005780 20 69 73 20 63 61 6c 6c 65 64 0d 03 d3 39 f4 20 | is called...9. | 00005790 61 6e 64 20 74 68 6f 73 65 20 76 61 6c 75 65 73 |and those values| 000057a0 20 72 65 74 75 72 6e 65 64 2e 20 49 66 20 69 74 | returned. If it| 000057b0 27 73 20 69 6d 70 6f 72 74 61 6e 74 2c 20 74 68 |'s important, th| 000057c0 65 6e 2c 0d 03 d4 3b f4 20 63 68 65 63 6b 20 74 |en,...;. check t| 000057d0 68 61 74 20 74 68 65 20 72 65 74 75 72 6e 65 64 |hat the returned| 000057e0 20 78 20 61 6e 64 20 79 20 73 69 7a 65 73 20 72 | x and y sizes r| 000057f0 65 61 6c 6c 79 20 61 72 65 20 62 6f 74 68 0d 03 |eally are both..| 00005800 d5 2b f4 20 62 69 67 67 65 72 20 74 68 61 6e 20 |.+. bigger than | 00005810 74 68 65 20 70 61 73 73 65 64 20 78 20 61 6e 64 |the passed x and| 00005820 20 79 20 73 69 7a 65 73 2e 0d 03 d6 04 0d 03 d7 | y sizes........| 00005830 16 ea 20 61 25 2c 64 25 2c 65 25 2c 78 32 25 2c |.. a%,d%,e%,x2%,| 00005840 79 32 25 0d 03 d8 04 0d 03 d9 1f c8 99 20 22 4f |y2%.......... "O| 00005850 53 5f 53 63 72 65 65 6e 4d 6f 64 65 22 2c 32 20 |S_ScreenMode",2 | 00005860 b8 20 2c 2c 64 25 0d 03 da 04 0d 03 db 09 78 32 |. ,,d%........x2| 00005870 25 3d 30 0d 03 dc 09 79 32 25 3d 30 0d 03 dd 0a |%=0....y2%=0....| 00005880 78 25 3d 31 45 39 0d 03 de 0a 79 25 3d 31 45 39 |x%=1E9....y%=1E9| 00005890 0d 03 df 08 63 25 3d 31 0d 03 e0 08 65 25 3d 30 |....c%=1....e%=0| 000058a0 0d 03 e1 04 0d 03 e2 14 e3 20 65 25 3d 30 20 b8 |......... e%=0 .| 000058b0 20 28 2d 64 25 29 2d 31 0d 03 e3 25 c8 99 20 22 | (-d%)-1...%.. "| 000058c0 4f 53 5f 53 63 72 65 65 6e 4d 6f 64 65 22 2c 32 |OS_ScreenMode",2| 000058d0 2c 2c 65 25 2c 2c 2c 2c 62 25 2c 36 34 0d 03 e4 |,,e%,,,,b%,64...| 000058e0 46 e7 20 28 62 25 21 38 3e 62 25 21 31 32 29 20 |F. (b%!8>b%!12) | 000058f0 80 20 28 28 62 25 21 31 32 29 2a 32 3e 62 25 21 |. ((b%!12)*2>b%!| 00005900 38 29 20 80 20 28 62 25 21 38 20 83 20 34 3d 30 |8) . (b%!8 . 4=0| 00005910 29 20 80 20 28 62 25 21 31 32 20 83 20 34 3d 30 |) . (b%!12 . 4=0| 00005920 29 20 8c 0d 03 e5 04 0d 03 e6 22 e7 20 28 62 25 |) ........". (b%| 00005930 21 38 3e 3d 78 31 25 29 20 80 20 28 62 25 21 31 |!8>=x1%) . (b%!1| 00005940 32 3e 3d 79 31 25 29 20 8c 0d 03 e7 5e e7 20 28 |2>=y1%) ....^. (| 00005950 28 62 25 21 38 2d 78 31 25 29 3c 3d 78 25 29 20 |(b%!8-x1%)<=x%) | 00005960 80 20 28 28 62 25 21 31 32 2d 79 31 25 29 3c 3d |. ((b%!12-y1%)<=| 00005970 79 25 29 20 8c 20 78 32 25 3d 62 25 21 38 3a 79 |y%) . x2%=b%!8:y| 00005980 32 25 3d 62 25 21 31 32 3a 78 25 3d 78 32 25 2d |2%=b%!12:x%=x2%-| 00005990 78 31 25 3a 79 25 3d 79 32 25 2d 79 31 25 3a 63 |x1%:y%=y2%-y1%:c| 000059a0 25 3d 62 25 21 31 36 0d 03 e8 05 cd 0d 03 e9 04 |%=b%!16.........| 000059b0 0d 03 ea 05 cd 0d 03 eb 05 ed 0d 03 ec 04 0d 03 |................| 000059c0 ed 26 e7 20 78 32 25 3d 30 20 8c 20 f2 66 69 6e |.&. x2%=0 . .fin| 000059d0 64 62 69 67 67 65 73 74 28 78 32 25 2c 79 32 25 |dbiggest(x2%,y2%| 000059e0 2c 63 25 29 0d 03 ee 04 0d 03 ef 0a 78 25 3d 78 |,c%)........x%=x| 000059f0 32 25 0d 03 f0 0a 79 25 3d 79 32 25 0d 03 f1 04 |2%....y%=y2%....| 00005a00 0d 03 f2 05 e1 0d 03 f3 05 3a 0d 03 f4 04 0d 03 |.........:......| 00005a10 f5 04 0d 03 f6 21 f4 20 2d 2d 20 4d 69 73 63 65 |.....!. -- Misce| 00005a20 6c 6c 61 6e 65 6f 75 73 20 70 72 6f 63 65 64 75 |llaneous procedu| 00005a30 72 65 73 0d 03 f7 04 0d 03 f8 04 0d 03 f9 20 dd |res........... .| 00005a40 20 f2 72 65 61 64 73 63 72 65 65 6e 73 69 7a 65 | .readscreensize| 00005a50 28 f8 20 64 25 2c f8 20 65 25 29 0d 03 fa 0b ea |(. d%,. e%).....| 00005a60 20 61 25 2c 63 25 0d 03 fb 29 c8 99 20 22 4f 53 | a%,c%...).. "OS| 00005a70 5f 52 65 61 64 4d 6f 64 65 56 61 72 69 61 62 6c |_ReadModeVariabl| 00005a80 65 22 2c 2d 31 2c 31 31 20 b8 20 2c 2c 64 25 0d |e",-1,11 . ,,d%.| 00005a90 03 fc 29 c8 99 20 22 4f 53 5f 52 65 61 64 4d 6f |..).. "OS_ReadMo| 00005aa0 64 65 56 61 72 69 61 62 6c 65 22 2c 2d 31 2c 31 |deVariable",-1,1| 00005ab0 32 20 b8 20 2c 2c 65 25 0d 03 fd 09 64 25 2b 3d |2 . ,,e%....d%+=| 00005ac0 31 0d 03 fe 09 65 25 2b 3d 31 0d 03 ff 28 c8 99 |1....e%+=1...(..| 00005ad0 20 22 4f 53 5f 52 65 61 64 4d 6f 64 65 56 61 72 | "OS_ReadModeVar| 00005ae0 69 61 62 6c 65 22 2c 2d 31 2c 34 20 b8 20 2c 2c |iable",-1,4 . ,,| 00005af0 61 25 0d 04 00 28 c8 99 20 22 4f 53 5f 52 65 61 |a%...(.. "OS_Rea| 00005b00 64 4d 6f 64 65 56 61 72 69 61 62 6c 65 22 2c 2d |dModeVariable",-| 00005b10 31 2c 35 20 b8 20 2c 2c 63 25 0d 04 01 0d 64 25 |1,5 . ,,c%....d%| 00005b20 3d 64 25 3c 3c 61 25 0d 04 02 0d 65 25 3d 65 25 |=d%<<a%....e%=e%| 00005b30 3c 3c 63 25 0d 04 03 05 e1 0d 04 04 05 3a 0d 04 |<<c%.........:..| 00005b40 05 11 dd 20 f2 72 65 61 64 28 f8 20 61 24 29 0d |... .read(. a$).| 00005b50 04 06 0b ea 20 61 25 2c 62 24 0d 04 07 09 62 24 |.... a%,b$....b$| 00005b60 3d 22 22 0d 04 08 05 f5 0d 04 09 11 61 25 3d 3f |="".........a%=?| 00005b70 64 61 74 61 70 6e 74 72 25 0d 04 0a 16 e7 20 61 |datapntr%..... a| 00005b80 25 3e 33 31 20 8c 20 62 24 2b 3d bd 20 61 25 0d |%>31 . b$+=. a%.| 00005b90 04 0b 10 64 61 74 61 70 6e 74 72 25 2b 3d 31 0d |...datapntr%+=1.| 00005ba0 04 0c 0b fd 20 61 25 3c 33 32 0d 04 0d 09 61 24 |.... a%<32....a$| 00005bb0 3d 62 24 0d 04 0e 05 e1 0d 04 0f 05 3a 0d 04 10 |=b$.........:...| 00005bc0 15 dd 20 f2 77 61 69 74 66 6f 72 72 65 6c 65 61 |.. .waitforrelea| 00005bd0 73 65 0d 04 11 0e ea 20 61 25 2c 63 25 2c 64 25 |se..... a%,c%,d%| 00005be0 0d 04 12 15 c8 99 20 22 48 6f 75 72 67 6c 61 73 |...... "Hourglas| 00005bf0 73 5f 4f 6e 22 0d 04 13 05 f5 0d 04 14 0f c8 97 |s_On"...........| 00005c00 20 61 25 2c 63 25 2c 64 25 0d 04 15 0a fd 20 64 | a%,c%,d%..... d| 00005c10 25 3d 30 0d 04 16 16 c8 99 20 22 48 6f 75 72 67 |%=0...... "Hourg| 00005c20 6c 61 73 73 5f 4f 66 66 22 0d 04 17 05 e1 0d 04 |lass_Off".......| 00005c30 18 05 3a 0d 04 19 0f dd 20 f2 77 61 69 74 28 61 |..:..... .wait(a| 00005c40 25 29 0d 04 1a 0b c8 95 20 61 25 3e 30 0d 04 1b |%)...... a%>0...| 00005c50 06 c8 96 0d 04 1c 09 61 25 2d 3d 31 0d 04 1d 05 |.......a%-=1....| 00005c60 ce 0d 04 1e 05 e1 0d 04 1f 05 3a 0d 04 20 04 0d |..........:.. ..| 00005c70 04 21 04 0d 04 22 1d f4 20 4d 69 73 63 65 6c 6c |.!...".. Miscell| 00005c80 61 6e 65 6f 75 73 20 66 75 6e 63 74 69 6f 6e 73 |aneous functions| 00005c90 0d 04 23 04 0d 04 24 04 0d 04 25 15 dd 20 a4 74 |..#...$...%.. .t| 00005ca0 65 78 74 28 63 25 2c 64 25 2c 66 25 29 0d 04 26 |ext(c%,d%,f%)..&| 00005cb0 30 f4 20 50 61 73 73 20 61 6e 20 61 64 64 72 65 |0. Pass an addre| 00005cc0 73 73 2c 20 61 20 74 65 78 74 20 73 74 72 69 6e |ss, a text strin| 00005cd0 67 20 6c 65 6e 67 74 68 2c 20 61 6e 64 0d 04 27 |g length, and..'| 00005ce0 38 f4 20 61 20 74 68 72 65 73 68 6f 6c 64 2e 20 |8. a threshold. | 00005cf0 41 20 73 74 72 69 6e 67 20 69 73 20 72 65 74 75 |A string is retu| 00005d00 72 6e 65 64 20 6f 66 20 74 68 65 20 73 70 65 63 |rned of the spec| 00005d10 69 66 69 65 64 0d 04 28 38 f4 20 6c 65 6e 67 74 |ified..(8. lengt| 00005d20 68 20 6d 69 6e 75 73 20 63 68 61 72 61 63 74 65 |h minus characte| 00005d30 72 73 20 6f 6d 69 74 74 65 64 20 77 68 69 63 68 |rs omitted which| 00005d40 20 68 61 64 20 61 6e 20 41 53 43 49 49 0d 04 29 | had an ASCII..)| 00005d50 37 f4 20 63 6f 64 65 20 4c 45 53 53 20 54 48 41 |7. code LESS THA| 00005d60 4e 20 74 68 65 20 74 68 72 65 73 68 6f 6c 64 2e |N the threshold.| 00005d70 20 54 68 61 74 20 69 73 2c 20 70 61 73 73 20 33 | That is, pass 3| 00005d80 32 20 74 6f 0d 04 2a 39 f4 20 69 6e 63 6c 75 64 |2 to..*9. includ| 00005d90 65 20 73 70 61 63 65 73 20 61 6e 64 20 61 6e 79 |e spaces and any| 00005da0 74 68 69 6e 67 20 77 69 74 68 20 68 69 67 68 65 |thing with highe| 00005db0 72 20 63 6f 64 65 73 2c 20 73 61 79 2e 0d 04 2b |r codes, say...+| 00005dc0 04 0d 04 2c 0b ea 20 61 25 2c 62 24 0d 04 2d 04 |...,.. a%,b$..-.| 00005dd0 0d 04 2e 09 62 24 3d 22 22 0d 04 2f 15 e3 20 61 |....b$=""../.. a| 00005de0 25 3d 63 25 20 b8 20 63 25 2b 64 25 2d 31 0d 04 |%=c% . c%+d%-1..| 00005df0 30 1c e7 20 3f 61 25 3e 3d 66 25 20 8c 20 62 24 |0.. ?a%>=f% . b$| 00005e00 3d 62 24 2b bd 28 3f 61 25 29 0d 04 31 05 ed 0d |=b$+.(?a%)..1...| 00005e10 04 32 07 3d 62 24 0d 04 33 05 3a 0d 04 34 17 dd |.2.=b$..3.:..4..| 00005e20 20 a4 74 65 78 74 75 6e 74 69 6c 28 63 25 2c 64 | .textuntil(c%,d| 00005e30 25 29 0d 04 35 30 f4 20 50 61 73 73 20 61 6e 20 |%)..50. Pass an | 00005e40 61 64 64 72 65 73 73 2c 20 61 6e 64 20 61 20 74 |address, and a t| 00005e50 68 72 65 73 68 6f 6c 64 2e 20 41 20 73 74 72 69 |hreshold. A stri| 00005e60 6e 67 0d 04 36 2f f4 20 69 73 20 72 65 74 75 72 |ng..6/. is retur| 00005e70 6e 65 64 20 6f 66 20 63 6f 6e 73 65 63 75 74 69 |ned of consecuti| 00005e80 76 65 20 62 79 74 65 73 20 66 72 6f 6d 20 74 68 |ve bytes from th| 00005e90 65 0d 04 37 32 f4 20 61 64 64 72 65 73 73 2e 20 |e..72. address. | 00005ea0 54 68 65 20 66 75 6e 63 74 69 6f 6e 20 65 78 69 |The function exi| 00005eb0 74 73 20 77 68 65 6e 20 61 20 62 79 74 65 20 4c |ts when a byte L| 00005ec0 45 53 53 0d 04 38 27 f4 20 54 48 41 4e 20 74 68 |ESS..8'. THAN th| 00005ed0 65 20 74 68 72 65 73 68 6f 6c 64 20 79 6f 75 20 |e threshold you | 00005ee0 73 70 65 63 69 66 69 65 64 2e 0d 04 39 04 0d 04 |specified...9...| 00005ef0 3a 0b ea 20 61 25 2c 62 24 0d 04 3b 04 0d 04 3c |:.. a%,b$..;...<| 00005f00 09 62 24 3d 22 22 0d 04 3d 09 61 25 3d 63 25 0d |.b$=""..=.a%=c%.| 00005f10 04 3e 05 f5 0d 04 3f 22 e7 20 3f 61 25 3e 3d 64 |.>....?". ?a%>=d| 00005f20 25 20 8c 20 62 24 3d 62 24 2b bd 28 3f 61 25 29 |% . b$=b$+.(?a%)| 00005f30 3a 61 25 2b 3d 31 0d 04 40 17 fd 20 3f 61 25 3c |:a%+=1..@.. ?a%<| 00005f40 64 25 20 84 20 a9 20 62 24 3d 32 35 35 0d 04 41 |d% . . b$=255..A| 00005f50 07 3d 62 24 0d 04 42 05 3a 0d 04 43 10 dd 20 a4 |.=b$..B.:..C.. .| 00005f60 75 70 70 65 72 28 61 24 29 0d 04 44 31 f4 20 50 |upper(a$)..D1. P| 00005f70 61 73 73 20 61 20 73 74 72 69 6e 67 3b 20 72 65 |ass a string; re| 00005f80 74 75 72 6e 73 20 74 68 65 20 73 61 6d 65 20 73 |turns the same s| 00005f90 74 72 69 6e 67 2c 20 61 6c 6c 0d 04 45 1f f4 20 |tring, all..E.. | 00005fa0 69 6e 20 75 70 70 65 72 20 63 61 73 65 20 63 68 |in upper case ch| 00005fb0 61 72 61 63 74 65 72 73 2e 0d 04 46 04 0d 04 47 |aracters...F...G| 00005fc0 0b ea 20 61 25 2c 62 24 0d 04 48 04 0d 04 49 09 |.. a%,b$..H...I.| 00005fd0 62 24 3d 22 22 0d 04 4a 04 0d 04 4b 12 e3 20 61 |b$=""..J...K.. a| 00005fe0 25 3d 31 20 b8 20 a9 28 61 24 29 0d 04 4c 4e e7 |%=1 . .(a$)..LN.| 00005ff0 20 c1 61 24 2c 61 25 2c 31 29 3e 3d 22 61 22 20 | .a$,a%,1)>="a" | 00006000 80 20 c1 61 24 2c 61 25 2c 31 29 3c 3d 22 7a 22 |. .a$,a%,1)<="z"| 00006010 20 8c 20 62 24 2b 3d bd 28 97 28 c1 61 24 2c 61 | . b$+=.(.(.a$,a| 00006020 25 2c 31 29 29 2d 33 32 29 20 8b 20 62 24 2b 3d |%,1))-32) . b$+=| 00006030 c1 61 24 2c 61 25 2c 31 29 0d 04 4d 05 ed 0d 04 |.a$,a%,1)..M....| 00006040 4e 04 0d 04 4f 07 3d 62 24 0d 04 50 05 3a 0d 04 |N...O.=b$..P.:..| 00006050 51 04 0d 04 52 04 0d 04 53 20 f4 20 2d 2d 20 49 |Q...R...S . -- I| 00006060 63 6f 6e 20 68 61 6e 64 6c 69 6e 67 20 66 75 6e |con handling fun| 00006070 63 74 69 6f 6e 73 0d 04 54 04 0d 04 55 04 0d 04 |ctions..T...U...| 00006080 56 14 dd 20 a4 67 65 74 6f 70 74 28 61 25 2c 63 |V.. .getopt(a%,c| 00006090 25 29 0d 04 57 14 21 66 72 25 3d 61 25 3a 66 72 |%)..W.!fr%=a%:fr| 000060a0 25 21 34 3d 63 25 0d 04 58 1f c8 99 20 22 57 69 |%!4=c%..X... "Wi| 000060b0 6d 70 5f 47 65 74 49 63 6f 6e 53 74 61 74 65 22 |mp_GetIconState"| 000060c0 2c 2c 66 72 25 0d 04 59 1c 3d 28 28 66 72 25 21 |,,fr%..Y.=((fr%!| 000060d0 32 34 29 20 80 20 28 31 3c 3c 32 31 29 29 3c 3e |24) . (1<<21))<>| 000060e0 30 0d 04 5a 05 3a 0d 04 5b 04 0d 04 5c 04 0d 04 |0..Z.:..[...\...| 000060f0 5d 20 f4 20 2d 2d 20 4d 65 6e 75 20 68 61 6e 64 |] . -- Menu hand| 00006100 6c 69 6e 67 20 66 75 6e 63 74 69 6f 6e 73 0d 04 |ling functions..| 00006110 5e 04 0d 04 5f 04 0d 04 60 18 dd 20 a4 6d 61 6b |^..._...`.. .mak| 00006120 65 6d 65 6e 75 28 70 31 25 2c 70 32 25 29 0d 04 |emenu(p1%,p2%)..| 00006130 61 1a ea 20 61 25 2c 63 25 2c 64 25 2c 65 25 2c |a.. a%,c%,d%,e%,| 00006140 61 24 2c 62 24 2c 63 24 0d 04 62 24 e7 20 70 31 |a$,b$,c$..b$. p1| 00006150 25 3d 6d 25 20 80 20 70 32 25 3d 6d 69 25 20 8c |%=m% . p2%=mi% .| 00006160 20 65 25 3d b9 20 8b 20 65 25 3d a3 0d 04 63 0a | e%=. . e%=...c.| 00006170 61 25 3d 70 31 25 0d 04 64 0d f2 72 65 61 64 28 |a%=p1%..d..read(| 00006180 61 24 29 0d 04 65 0c 24 28 61 25 29 3d 61 24 0d |a$)..e.$(a%)=a$.| 00006190 04 66 0b 61 25 3f 31 32 3d 37 0d 04 67 0b 61 25 |.f.a%?12=7..g.a%| 000061a0 3f 31 33 3d 32 0d 04 68 0b 61 25 3f 31 34 3d 37 |?13=2..h.a%?14=7| 000061b0 0d 04 69 0b 61 25 3f 31 35 3d 30 0d 04 6a 0c 61 |..i.a%?15=0..j.a| 000061c0 25 21 32 30 3d 34 34 0d 04 6b 0b 61 25 21 32 34 |%!20=44..k.a%!24| 000061d0 3d 30 0d 04 6c 0e 64 25 3d a9 28 61 24 29 2d 33 |=0..l.d%=.(a$)-3| 000061e0 0d 04 6d 0b 70 31 25 2b 3d 32 38 0d 04 6e 05 f5 |..m.p1%+=28..n..| 000061f0 0d 04 6f 0d f2 72 65 61 64 28 63 24 29 0d 04 70 |..o..read(c$)..p| 00006200 0f e7 20 63 24 3c 3e 22 2a 22 20 8c 0d 04 71 13 |.. c$<>"*" ...q.| 00006210 70 31 25 21 38 3d 26 30 37 30 30 30 30 32 31 0d |p1%!8=&07000021.| 00006220 04 72 0a 21 70 31 25 3d 30 0d 04 73 08 63 25 3d |.r.!p1%=0..s.c%=| 00006230 a3 0d 04 74 10 75 6c 25 3d a7 63 24 2c 22 a4 22 |...t.ul%=.c$,"."| 00006240 29 0d 04 75 0b e7 20 75 6c 25 20 8c 0d 04 76 15 |)..u.. ul% ...v.| 00006250 62 24 3d c2 63 24 2c a9 28 63 24 29 2d 75 6c 25 |b$=.c$,.(c$)-ul%| 00006260 29 0d 04 77 1e e7 20 a7 62 24 2c 22 54 22 29 20 |)..w.. .b$,"T") | 00006270 8c 20 21 70 31 25 3d 21 70 31 25 20 84 20 31 0d |. !p1%=!p1% . 1.| 00006280 04 78 1e e7 20 a7 62 24 2c 22 44 22 29 20 8c 20 |.x.. .b$,"D") . | 00006290 21 70 31 25 3d 21 70 31 25 20 84 20 32 0d 04 79 |!p1%=!p1% . 2..y| 000062a0 10 e7 20 a7 62 24 2c 22 57 22 29 20 8c 0d 04 7a |.. .b$,"W") ...z| 000062b0 11 21 70 31 25 3d 21 70 31 25 20 84 20 34 0d 04 |.!p1%=!p1% . 4..| 000062c0 7b 08 63 25 3d b9 0d 04 7c 0d f2 72 65 61 64 28 |{.c%=...|..read(| 000062d0 61 24 29 0d 04 7d 11 62 75 66 66 65 72 25 3d a0 |a$)..}.buffer%=.| 000062e0 28 61 24 29 0d 04 7e 0d f2 72 65 61 64 28 61 24 |(a$)..~..read(a$| 000062f0 29 0d 04 7f 11 62 75 66 6c 65 6e 25 3d a0 28 61 |)....buflen%=.(a| 00006300 24 29 0d 04 80 05 cd 0d 04 81 1e e7 20 a7 62 24 |$).......... .b$| 00006310 2c 22 4d 22 29 20 8c 20 21 70 31 25 3d 21 70 31 |,"M") . !p1%=!p1| 00006320 25 20 84 20 38 0d 04 82 11 63 24 3d c0 63 24 2c |% . 8....c$=.c$,| 00006330 75 6c 25 2d 31 29 0d 04 83 05 cd 0d 04 84 17 e7 |ul%-1)..........| 00006340 20 a9 20 63 24 3e 64 25 20 8c 20 64 25 3d a9 20 | . c$>d% . d%=. | 00006350 63 24 0d 04 85 0c 70 31 25 21 34 3d 2d 31 0d 04 |c$....p1%!4=-1..| 00006360 86 0a e7 20 63 25 20 8c 0d 04 87 13 70 31 25 21 |... c% .....p1%!| 00006370 38 3d 26 30 37 30 30 46 31 32 31 0d 04 88 12 70 |8=&0700F121....p| 00006380 31 25 21 31 32 3d 62 75 66 66 65 72 25 0d 04 89 |1%!12=buffer%...| 00006390 0d 70 31 25 21 31 36 3d 2d 31 0d 04 8a 12 70 31 |.p1%!16=-1....p1| 000063a0 25 21 32 30 3d 62 75 66 6c 65 6e 25 0d 04 8b 0f |%!20=buflen%....| 000063b0 24 62 75 66 66 65 72 25 3d 63 24 0d 04 8c 05 cc |$buffer%=c$.....| 000063c0 0d 04 8d 0f e7 20 a9 20 63 24 3c 31 32 20 8c 0d |..... . c$<12 ..| 000063d0 04 8e 13 70 31 25 21 38 3d 26 30 37 30 30 30 30 |...p1%!8=&070000| 000063e0 32 31 0d 04 8f 10 24 28 70 31 25 2b 31 32 29 3d |21....$(p1%+12)=| 000063f0 63 24 0d 04 90 05 cc 0d 04 91 13 70 31 25 21 38 |c$.........p1%!8| 00006400 3d 26 30 37 30 30 30 31 32 31 0d 04 92 0e 70 31 |=&07000121....p1| 00006410 25 21 31 32 3d 70 32 25 0d 04 93 0d 70 31 25 21 |%!12=p2%....p1%!| 00006420 31 36 3d 2d 31 0d 04 94 11 70 31 25 21 32 30 3d |16=-1....p1%!20=| 00006430 a9 20 63 24 2b 31 0d 04 95 0b 24 70 32 25 3d 63 |. c$+1....$p2%=c| 00006440 24 0d 04 96 0f 70 32 25 2b 3d a9 20 63 24 2b 31 |$....p2%+=. c$+1| 00006450 0d 04 97 05 cd 0d 04 98 05 cd 0d 04 99 0b 70 31 |..............p1| 00006460 25 2b 3d 32 34 0d 04 9a 05 cd 0d 04 9b 0c fd 20 |%+=24.......... | 00006470 63 24 3d 22 2a 22 0d 04 9c 12 61 25 21 31 36 3d |c$="*"....a%!16=| 00006480 64 25 2a 31 36 2b 33 32 0d 04 9d 1d 21 28 70 31 |d%*16+32....!(p1| 00006490 25 2d 32 34 29 3d 21 28 70 31 25 2d 32 34 29 20 |%-24)=!(p1%-24) | 000064a0 84 20 26 38 30 0d 04 9e 1b e7 20 65 25 3d b9 20 |. &80..... e%=. | 000064b0 8c 20 6d 25 3d 70 31 25 3a 6d 69 25 3d 70 32 25 |. m%=p1%:mi%=p2%| 000064c0 0d 04 9f 07 3d 61 25 0d 04 a0 05 3a 0d 04 a1 16 |....=a%....:....| 000064d0 dd 20 a4 72 65 61 64 74 69 63 6b 28 61 25 2c 63 |. .readtick(a%,c| 000064e0 25 29 0d 04 a2 08 ea 20 64 25 0d 04 a3 3b e7 20 |%)..... d%...;. | 000064f0 61 25 21 28 32 38 2b 63 25 2a 32 34 29 3d 61 25 |a%!(28+c%*24)=a%| 00006500 21 28 32 38 2b 63 25 2a 32 34 29 20 80 20 26 46 |!(28+c%*24) . &F| 00006510 46 46 46 46 46 46 45 20 8c 20 64 25 3d b9 20 8b |FFFFFFE . d%=. .| 00006520 20 64 25 3d a3 0d 04 a4 07 3d 64 25 0d 04 a5 05 | d%=.....=d%....| 00006530 3a 0d 04 a6 04 0d 04 a7 04 0d 04 a8 1b f4 20 2d |:............. -| 00006540 2d 20 46 69 6c 65 20 49 2f 4f 20 66 75 6e 63 74 |- File I/O funct| 00006550 69 6f 6e 73 0d 04 a9 04 0d 04 aa 04 0d 04 ab 13 |ions............| 00006560 dd 20 a4 66 69 6c 65 74 79 70 65 28 61 24 29 0d |. .filetype(a$).| 00006570 04 ac 0e ea 20 61 25 2c 63 25 2c 64 25 0d 04 ad |.... a%,c%,d%...| 00006580 1f c8 99 20 22 4f 53 5f 46 69 6c 65 22 2c 31 37 |... "OS_File",17| 00006590 2c 61 24 20 b8 20 63 25 2c 2c 61 25 0d 04 ae 13 |,a$ . c%,,a%....| 000065a0 e7 20 63 25 3c 3e 31 20 8c 20 64 25 3d 2d 32 0d |. c%<>1 . d%=-2.| 000065b0 04 af 2f e7 20 28 61 25 3e 3e 3e 32 30 29 3d 26 |../. (a%>>>20)=&| 000065c0 46 46 46 20 8c 20 64 25 3d 28 61 25 3e 3e 3e 38 |FFF . d%=(a%>>>8| 000065d0 29 80 26 46 46 46 20 8b 20 64 25 3d 2d 31 0d 04 |).&FFF . d%=-1..| 000065e0 b0 07 3d 64 25 0d 04 b1 05 3a 0d 04 b2 15 dd 20 |..=d%....:..... | 000065f0 a4 66 69 6c 65 6c 65 6e 67 74 68 28 61 24 29 0d |.filelength(a$).| 00006600 04 b3 08 ea 20 61 25 0d 04 b4 3c e7 20 a4 66 69 |.... a%...<. .fi| 00006610 6c 65 74 79 70 65 28 61 24 29 3c 3e 2d 32 20 8c |letype(a$)<>-2 .| 00006620 20 c8 99 20 22 4f 53 5f 46 69 6c 65 22 2c 35 2c | .. "OS_File",5,| 00006630 61 24 20 b8 20 2c 2c 2c 2c 61 25 20 8b 20 61 25 |a$ . ,,,,a% . a%| 00006640 3d 2d 31 0d 04 b5 07 3d 61 25 0d 04 b6 05 3a 0d |=-1....=a%....:.| 00006650 04 b7 04 0d 04 b8 04 0d 04 b9 21 f4 20 2d 2d 20 |..........!. -- | 00006660 4a 50 45 47 20 68 61 6e 64 6c 69 6e 67 20 70 72 |JPEG handling pr| 00006670 6f 63 65 64 75 72 65 73 0d 04 ba 04 0d 04 bb 04 |ocedures........| 00006680 0d 04 bc 12 dd 20 f2 6c 6f 61 64 70 69 63 74 75 |..... .loadpictu| 00006690 72 65 0d 04 bd 0b ea 20 61 25 2c 63 25 0d 04 be |re..... a%,c%...| 000066a0 04 0d 04 bf 13 e7 20 61 62 6f 72 74 6d 75 6c 25 |...... abortmul%| 000066b0 3d a3 20 8c 0d 04 c0 04 0d 04 c1 3a f4 20 4f 6e |=. ........:. On| 000066c0 6c 79 20 73 74 61 72 74 20 61 20 6c 6f 61 64 20 |ly start a load | 000066d0 69 66 20 74 68 65 20 66 69 6c 65 20 69 73 20 73 |if the file is s| 000066e0 65 74 74 79 70 65 64 20 61 73 20 61 20 4a 50 45 |ettyped as a JPE| 000066f0 47 2e 0d 04 c2 04 0d 04 c3 12 e7 20 62 25 21 34 |G.......... b%!4| 00006700 30 3d 26 43 38 35 20 8c 0d 04 c4 04 0d 04 c5 22 |0=&C85 ........"| 00006710 6a 70 65 67 6e 61 6d 65 24 3d a4 74 65 78 74 75 |jpegname$=.textu| 00006720 6e 74 69 6c 28 62 25 2b 34 34 2c 33 33 29 0d 04 |ntil(b%+44,33)..| 00006730 c6 24 6a 70 65 67 6c 65 6e 67 25 3d a4 66 69 6c |.$jpegleng%=.fil| 00006740 65 6c 65 6e 67 74 68 28 6a 70 65 67 6e 61 6d 65 |elength(jpegname| 00006750 24 29 0d 04 c7 04 0d 04 c8 39 f4 20 53 65 6e 64 |$).......9. Send| 00006760 20 44 61 74 61 4c 6f 61 64 41 63 6b 20 6d 65 73 | DataLoadAck mes| 00006770 73 61 67 65 2c 20 69 66 20 21 62 25 3c 3e 2d 31 |sage, if !b%<>-1| 00006780 20 28 69 6e 20 77 68 69 63 68 20 63 61 73 65 0d | (in which case.| 00006790 04 c9 3c f4 20 74 68 69 73 20 72 6f 75 74 69 6e |..<. this routin| 000067a0 65 20 77 61 73 20 63 61 6c 6c 65 64 20 62 65 63 |e was called bec| 000067b0 61 75 73 65 20 74 68 65 20 65 6e 74 69 72 65 20 |ause the entire | 000067c0 61 70 70 6c 69 63 61 74 69 6f 6e 0d 04 ca 3a f4 |application...:.| 000067d0 20 77 61 73 20 6c 61 75 6e 63 68 65 64 20 66 72 | was launched fr| 000067e0 6f 6d 20 61 20 64 6f 75 62 6c 65 2d 63 6c 69 63 |om a double-clic| 000067f0 6b 20 6f 6e 20 61 20 4a 50 45 47 20 66 69 6c 65 |k on a JPEG file| 00006800 2c 20 61 6e 64 0d 04 cb 2f f4 20 74 68 65 72 65 |, and.../. there| 00006810 20 69 73 20 6e 6f 20 44 61 74 61 4c 6f 61 64 20 | is no DataLoad | 00006820 6d 65 73 73 61 67 65 20 74 6f 20 72 65 70 6c 79 |message to reply| 00006830 20 74 6f 2e 0d 04 cc 04 0d 04 cd 0f e7 20 21 62 | to.......... !b| 00006840 25 3c 3e 2d 31 20 8c 0d 04 ce 0b 61 25 3d 62 25 |%<>-1 .....a%=b%| 00006850 21 34 0d 04 cf 0e 62 25 21 34 3d 74 61 73 6b 25 |!4....b%!4=task%| 00006860 0d 04 d0 0e 62 25 21 31 32 3d 62 25 21 38 0d 04 |....b%!12=b%!8..| 00006870 d1 0b 62 25 21 31 36 3d 34 0d 04 d2 22 c8 99 20 |..b%!16=4...".. | 00006880 22 57 69 6d 70 5f 53 65 6e 64 4d 65 73 73 61 67 |"Wimp_SendMessag| 00006890 65 22 2c 31 37 2c 62 25 2c 61 25 0d 04 d3 05 cd |e",17,b%,a%.....| 000068a0 0d 04 d4 04 0d 04 d5 11 77 6f 72 6b 73 70 63 65 |........workspce| 000068b0 25 3d 32 35 36 0d 04 d6 32 f2 73 65 74 73 6c 6f |%=256...2.setslo| 000068c0 74 73 69 7a 65 28 62 61 73 69 73 6c 6f 74 25 2b |tsize(basislot%+| 000068d0 6a 70 65 67 6c 65 6e 67 25 2b 77 6f 72 6b 73 70 |jpegleng%+worksp| 000068e0 63 65 25 2c 61 25 29 0d 04 d7 04 0d 04 d8 29 e7 |ce%,a%).......).| 000068f0 20 61 25 3e 3d 62 61 73 69 73 6c 6f 74 25 2b 6a | a%>=basislot%+j| 00006900 70 65 67 6c 65 6e 67 25 2b 77 6f 72 6b 73 70 63 |pegleng%+workspc| 00006910 65 25 20 8c 0d 04 d9 04 0d 04 da 15 c8 99 20 22 |e% ........... "| 00006920 48 6f 75 72 67 6c 61 73 73 5f 4f 6e 22 0d 04 db |Hourglass_On"...| 00006930 04 0d 04 dc 0f 62 61 73 65 6d 65 6d 6f 25 3d 93 |.....basememo%=.| 00006940 0d 04 dd 20 f4 20 73 63 25 3d 62 61 73 65 6d 65 |... . sc%=baseme| 00006950 6d 6f 25 2b 6a 70 65 67 6c 65 6e 67 25 2b 31 36 |mo%+jpegleng%+16| 00006960 0d 04 de 04 0d 04 df 27 ff 20 22 4c 6f 61 64 20 |.......'. "Load | 00006970 22 2b 6a 70 65 67 6e 61 6d 65 24 2b 22 20 22 2b |"+jpegname$+" "+| 00006980 c3 7e 62 61 73 65 6d 65 6d 6f 25 0d 04 e0 04 0d |.~basememo%.....| 00006990 04 e1 16 c8 99 20 22 48 6f 75 72 67 6c 61 73 73 |..... "Hourglass| 000069a0 5f 4f 66 66 22 0d 04 e2 04 0d 04 e3 24 f4 20 4b |_Off".......$. K| 000069b0 69 6c 6c 20 73 63 72 61 70 66 69 6c 65 20 69 66 |ill scrapfile if| 000069c0 20 69 74 20 77 61 73 20 75 73 65 64 2e 0d 04 e4 | it was used....| 000069d0 04 0d 04 e5 4a e7 20 a4 74 65 78 74 75 6e 74 69 |....J. .textunti| 000069e0 6c 28 62 25 2b 34 34 2c 33 33 29 3d 22 3c 57 69 |l(b%+44,33)="<Wi| 000069f0 6d 70 24 53 63 72 61 70 3e 22 20 8c 20 c8 99 20 |mp$Scrap>" . .. | 00006a00 22 58 4f 53 5f 46 69 6c 65 22 2c 36 2c 22 3c 57 |"XOS_File",6,"<W| 00006a10 69 6d 70 24 53 63 72 61 70 3e 22 0d 04 e6 04 0d |imp$Scrap>".....| 00006a20 04 e7 24 e7 20 a4 6f 70 65 6e 28 64 69 73 70 6c |..$. .open(displ| 00006a30 61 79 68 25 29 20 8c 20 61 25 3d b9 20 8b 20 61 |ayh%) . a%=. . a| 00006a40 25 3d a3 0d 04 e8 12 21 66 72 25 3d 64 69 73 70 |%=.....!fr%=disp| 00006a50 6c 61 79 68 25 0d 04 e9 1e c8 99 20 22 57 69 6d |layh%...... "Wim| 00006a60 70 5f 43 6c 6f 73 65 57 69 6e 64 6f 77 22 2c 2c |p_CloseWindow",,| 00006a70 66 72 25 0d 04 ea 15 f2 72 65 73 69 7a 65 6d 61 |fr%.....resizema| 00006a80 69 6e 77 69 6e 64 6f 77 0d 04 eb 12 21 66 72 25 |inwindow....!fr%| 00006a90 3d 64 69 73 70 6c 61 79 68 25 0d 04 ec 20 c8 99 |=displayh%... ..| 00006aa0 20 22 57 69 6d 70 5f 47 65 74 57 69 6e 64 6f 77 | "Wimp_GetWindow| 00006ab0 49 6e 66 6f 22 2c 2c 66 72 25 0d 04 ed 0c e7 20 |Info",,fr%..... | 00006ac0 61 25 3d a3 20 8c 0d 04 ee 0b 66 72 25 21 34 3d |a%=. .....fr%!4=| 00006ad0 30 0d 04 ef 0b 66 72 25 21 38 3d 30 0d 04 f0 13 |0....fr%!8=0....| 00006ae0 66 72 25 21 31 32 3d 26 37 46 46 46 46 46 46 0d |fr%!12=&7FFFFFF.| 00006af0 04 f1 13 66 72 25 21 31 36 3d 26 37 46 46 46 46 |...fr%!16=&7FFFF| 00006b00 46 46 0d 04 f2 05 cd 0d 04 f3 1d c8 99 20 22 57 |FF........... "W| 00006b10 69 6d 70 5f 4f 70 65 6e 57 69 6e 64 6f 77 22 2c |imp_OpenWindow",| 00006b20 2c 66 72 25 0d 04 f4 25 e7 20 61 25 3d a3 20 8c |,fr%...%. a%=. .| 00006b30 20 f2 6f 70 65 6e 63 65 6e 74 65 72 65 64 28 64 | .opencentered(d| 00006b40 69 73 70 6c 61 79 68 25 29 0d 04 f5 04 0d 04 f6 |isplayh%).......| 00006b50 0f f2 66 69 6c 6c 69 6e 69 6e 66 6f 0d 04 f7 04 |..fillininfo....| 00006b60 0d 04 f8 20 e7 20 61 75 74 6f 66 75 6c 6c 25 3c |... . autofull%<| 00006b70 3e 30 20 8c 20 f2 66 75 6c 6c 73 63 72 65 65 6e |>0 . .fullscreen| 00006b80 0d 04 f9 04 0d 04 fa 38 f4 20 45 4e 44 49 46 20 |.......8. ENDIF | 00006b90 66 72 6f 6d 20 63 68 65 63 6b 20 74 6f 20 73 65 |from check to se| 00006ba0 65 20 69 66 20 74 68 65 72 65 20 77 61 73 20 65 |e if there was e| 00006bb0 6e 6f 75 67 68 20 6d 65 6d 6f 72 79 0d 04 fb 17 |nough memory....| 00006bc0 f4 20 74 6f 20 6c 6f 61 64 20 74 68 65 20 66 69 |. to load the fi| 00006bd0 6c 65 2e 0d 04 fc 05 cd 0d 04 fd 04 0d 04 fe 36 |le.............6| 00006be0 f4 20 45 4e 44 49 46 20 66 72 6f 6d 20 63 68 65 |. ENDIF from che| 00006bf0 63 6b 20 74 6f 20 73 65 65 20 69 66 20 74 68 65 |ck to see if the| 00006c00 20 66 69 6c 65 20 68 61 64 20 74 68 65 20 4a 50 | file had the JP| 00006c10 45 47 0d 04 ff 16 f4 20 66 69 6c 65 74 79 70 65 |EG..... filetype| 00006c20 20 28 26 43 38 35 29 2e 0d 05 00 05 cd 0d 05 01 | (&C85).........| 00006c30 04 0d 05 02 41 f4 20 45 4c 53 45 20 66 72 6f 6d |....A. ELSE from| 00006c40 20 63 68 65 63 6b 20 74 6f 20 73 65 65 20 69 66 | check to see if| 00006c50 20 61 62 6f 72 74 6d 75 6c 25 20 77 61 73 20 46 | abortmul% was F| 00006c60 41 4c 53 45 3b 20 69 66 20 74 68 65 20 62 65 6c |ALSE; if the bel| 00006c70 6f 77 0d 05 03 1e f4 20 63 6f 64 65 20 69 73 20 |ow..... code is | 00006c80 65 78 65 63 75 74 65 64 20 69 74 20 77 61 73 2e |executed it was.| 00006c90 0d 05 04 05 cc 0d 05 05 04 0d 05 06 38 f4 20 53 |............8. S| 00006ca0 65 6e 64 20 44 61 74 61 4c 6f 61 64 41 63 6b 20 |end DataLoadAck | 00006cb0 69 66 20 74 68 65 20 66 69 6c 65 20 77 61 73 20 |if the file was | 00006cc0 61 20 4a 50 45 47 2c 20 62 75 74 20 64 6f 6e 27 |a JPEG, but don'| 00006cd0 74 0d 05 07 23 f4 20 61 63 74 75 61 6c 6c 79 20 |t...#. actually | 00006ce0 64 6f 20 61 6e 79 74 68 69 6e 67 20 77 69 74 68 |do anything with| 00006cf0 20 69 74 2e 0d 05 08 04 0d 05 09 12 e7 20 62 25 | it.......... b%| 00006d00 21 34 30 3d 26 43 38 35 20 8c 0d 05 0a 0b 61 25 |!40=&C85 .....a%| 00006d10 3d 62 25 21 34 0d 05 0b 0e 62 25 21 34 3d 74 61 |=b%!4....b%!4=ta| 00006d20 73 6b 25 0d 05 0c 0e 62 25 21 31 32 3d 62 25 21 |sk%....b%!12=b%!| 00006d30 38 0d 05 0d 0b 62 25 21 31 36 3d 34 0d 05 0e 22 |8....b%!16=4..."| 00006d40 c8 99 20 22 57 69 6d 70 5f 53 65 6e 64 4d 65 73 |.. "Wimp_SendMes| 00006d50 73 61 67 65 22 2c 31 37 2c 62 25 2c 61 25 0d 05 |sage",17,b%,a%..| 00006d60 0f 05 cd 0d 05 10 04 0d 05 11 3b f4 20 45 4e 44 |..........;. END| 00006d70 49 46 20 66 72 6f 6d 20 63 68 65 63 6b 20 74 6f |IF from check to| 00006d80 20 73 65 65 20 69 66 20 61 62 6f 72 74 6d 75 6c | see if abortmul| 00006d90 25 20 77 61 73 20 54 52 55 45 20 6f 72 20 6e 6f |% was TRUE or no| 00006da0 74 2e 0d 05 12 05 cd 0d 05 13 05 e1 0d 05 14 05 |t...............| 00006db0 3a 0d 05 15 17 dd 20 f2 72 65 73 69 7a 65 6d 61 |:..... .resizema| 00006dc0 69 6e 77 69 6e 64 6f 77 0d 05 16 2b c8 99 20 22 |inwindow...+.. "| 00006dd0 4f 53 5f 52 65 61 64 4d 6f 64 65 56 61 72 69 61 |OS_ReadModeVaria| 00006de0 62 6c 65 22 2c 2d 31 2c 34 20 b8 20 2c 2c 78 65 |ble",-1,4 . ,,xe| 00006df0 69 67 25 0d 05 17 2b c8 99 20 22 4f 53 5f 52 65 |ig%...+.. "OS_Re| 00006e00 61 64 4d 6f 64 65 56 61 72 69 61 62 6c 65 22 2c |adModeVariable",| 00006e10 2d 31 2c 35 20 b8 20 2c 2c 79 65 69 67 25 0d 05 |-1,5 . ,,yeig%..| 00006e20 18 04 0d 05 19 0f e7 20 78 65 69 67 25 3e 30 20 |....... xeig%>0 | 00006e30 8c 0d 05 1a 0a 21 73 63 25 3d 31 0d 05 1b 0f 73 |.....!sc%=1....s| 00006e40 63 25 21 38 3d 78 65 69 67 25 0d 05 1c 05 cc 0d |c%!8=xeig%......| 00006e50 05 1d 0a 21 73 63 25 3d 32 0d 05 1e 0b 73 63 25 |...!sc%=2....sc%| 00006e60 21 38 3d 31 0d 05 1f 05 cd 0d 05 20 0f e7 20 79 |!8=1....... .. y| 00006e70 65 69 67 25 3e 30 20 8c 0d 05 21 0b 73 63 25 21 |eig%>0 ...!.sc%!| 00006e80 34 3d 31 0d 05 22 10 73 63 25 21 31 32 3d 79 65 |4=1..".sc%!12=ye| 00006e90 69 67 25 0d 05 23 05 cc 0d 05 24 0b 73 63 25 21 |ig%..#....$.sc%!| 00006ea0 34 3d 32 0d 05 25 0c 73 63 25 21 31 32 3d 31 0d |4=2..%.sc%!12=1.| 00006eb0 05 26 05 cd 0d 05 27 04 0d 05 28 16 21 73 63 25 |.&....'...(.!sc%| 00006ec0 3d 28 21 73 63 25 29 2a 7a 6f 6f 6d 6d 25 0d 05 |=(!sc%)*zoomm%..| 00006ed0 29 18 73 63 25 21 34 3d 28 73 63 25 21 34 29 2a |).sc%!4=(sc%!4)*| 00006ee0 7a 6f 6f 6d 6d 25 0d 05 2a 18 73 63 25 21 38 3d |zoomm%..*.sc%!8=| 00006ef0 28 73 63 25 21 38 29 2a 7a 6f 6f 6d 64 25 0d 05 |(sc%!8)*zoomd%..| 00006f00 2b 1a 73 63 25 21 31 32 3d 28 73 63 25 21 31 32 |+.sc%!12=(sc%!12| 00006f10 29 2a 7a 6f 6f 6d 64 25 0d 05 2c 04 0d 05 2d 49 |)*zoomd%..,...-I| 00006f20 c8 99 20 22 58 4a 50 45 47 5f 49 6e 66 6f 22 2c |.. "XJPEG_Info",| 00006f30 2c 62 61 73 65 6d 65 6d 6f 25 2c 6a 70 65 67 6c |,basememo%,jpegl| 00006f40 65 6e 67 25 20 b8 20 2c 2c 78 70 69 63 25 2c 79 |eng% . ,,xpic%,y| 00006f50 70 69 63 25 2c 78 64 70 69 25 2c 79 64 70 69 25 |pic%,xdpi%,ydpi%| 00006f60 2c 6d 65 6d 25 0d 05 2e 5b f4 20 49 46 20 6d 65 |,mem%...[. IF me| 00006f70 6d 25 3c 3e 30 20 54 48 45 4e 20 45 52 52 4f 52 |m%<>0 THEN ERROR| 00006f80 20 34 39 30 2c 22 4a 50 45 47 20 72 65 71 75 69 | 490,"JPEG requi| 00006f90 72 65 73 20 65 78 74 72 61 20 77 6f 72 6b 73 70 |res extra worksp| 00006fa0 61 63 65 20 74 6f 20 70 6c 6f 74 20 2d 20 63 61 |ace to plot - ca| 00006fb0 6e 27 74 20 61 6c 6c 6f 63 61 74 65 20 69 74 22 |n't allocate it"| 00006fc0 0d 05 2f 04 0d 05 30 0a 21 66 72 25 3d 30 0d 05 |../...0.!fr%=0..| 00006fd0 31 24 66 72 25 21 34 3d 28 28 2d 79 70 69 63 25 |1$fr%!4=((-ypic%| 00006fe0 2a 32 29 2a 7a 6f 6f 6d 6d 25 29 2f 7a 6f 6f 6d |*2)*zoomm%)/zoom| 00006ff0 64 25 0d 05 32 23 66 72 25 21 38 3d 28 28 78 70 |d%..2#fr%!8=((xp| 00007000 69 63 25 2a 32 29 2a 7a 6f 6f 6d 6d 25 29 2f 7a |ic%*2)*zoomm%)/z| 00007010 6f 6f 6d 64 25 0d 05 33 0c 66 72 25 21 31 32 3d |oomd%..3.fr%!12=| 00007020 30 0d 05 34 32 e7 20 28 28 66 72 25 21 34 29 20 |0..42. ((fr%!4) | 00007030 83 20 32 29 3c 3e 30 20 8c 20 66 72 25 21 34 3d |. 2)<>0 . fr%!4=| 00007040 28 28 28 66 72 25 21 34 29 20 81 20 32 29 2d 31 |(((fr%!4) . 2)-1| 00007050 29 2a 32 0d 05 35 32 e7 20 28 28 66 72 25 21 38 |)*2..52. ((fr%!8| 00007060 29 20 83 20 32 29 3c 3e 30 20 8c 20 66 72 25 21 |) . 2)<>0 . fr%!| 00007070 38 3d 28 28 28 66 72 25 21 38 29 20 81 20 32 29 |8=(((fr%!8) . 2)| 00007080 2b 31 29 2a 32 0d 05 36 25 c8 99 20 22 57 69 6d |+1)*2..6%.. "Wim| 00007090 70 5f 53 65 74 45 78 74 65 6e 74 22 2c 64 69 73 |p_SetExtent",dis| 000070a0 70 6c 61 79 68 25 2c 66 72 25 0d 05 37 14 77 69 |playh%,fr%..7.wi| 000070b0 6e 64 68 65 69 67 25 3d 2d 66 72 25 21 34 0d 05 |ndheig%=-fr%!4..| 000070c0 38 05 e1 0d 05 39 05 3a 0d 05 3a 11 dd 20 f2 66 |8....9.:..:.. .f| 000070d0 69 6c 6c 69 6e 69 6e 66 6f 0d 05 3b 08 ea 20 61 |illininfo..;.. a| 000070e0 24 0d 05 3c 04 0d 05 3d 3e e7 20 a9 28 6a 70 65 |$..<...=>. .(jpe| 000070f0 67 6e 61 6d 65 24 29 3e 32 37 20 8c 20 61 24 3d |gname$)>27 . a$=| 00007100 22 2e 2e 2e 22 2b c2 6a 70 65 67 6e 61 6d 65 24 |"..."+.jpegname$| 00007110 2c 32 34 29 20 8b 20 61 24 3d 6a 70 65 67 6e 61 |,24) . a$=jpegna| 00007120 6d 65 24 0d 05 3e 4b f4 20 4c 69 6e 65 20 62 65 |me$..>K. Line be| 00007130 6c 6f 77 20 2d 20 49 66 20 74 68 65 20 70 61 74 |low - If the pat| 00007140 68 6e 61 6d 65 20 69 73 20 3e 32 37 20 63 68 61 |hname is >27 cha| 00007150 72 61 63 74 65 72 73 2c 20 74 68 65 6e 20 74 68 |racters, then th| 00007160 65 20 27 2e 2e 2e 27 20 69 73 20 70 75 74 0d 05 |e '...' is put..| 00007170 3f 47 f4 20 69 6e 20 66 72 6f 6e 74 20 6f 66 20 |?G. in front of | 00007180 74 68 65 20 6c 61 73 74 20 32 34 2e 20 42 75 74 |the last 24. But| 00007190 20 77 68 61 74 20 68 61 70 70 65 6e 73 20 69 66 | what happens if| 000071a0 20 74 68 6f 73 65 20 32 34 2c 20 62 79 20 63 68 | those 24, by ch| 000071b0 61 6e 63 65 2c 0d 05 40 4d f4 20 73 74 61 72 74 |ance,..@M. start| 000071c0 20 77 69 74 68 20 61 20 27 2e 27 20 6f 66 20 61 | with a '.' of a| 000071d0 20 64 69 72 65 63 74 6f 72 79 20 73 65 70 61 72 | directory separ| 000071e0 61 74 6f 72 3f 20 54 68 65 20 6c 69 6e 65 20 62 |ator? The line b| 000071f0 65 6c 6f 77 20 73 68 6f 75 6c 64 20 72 65 6d 6f |elow should remo| 00007200 76 65 0d 05 41 48 f4 20 6f 6e 65 20 64 6f 74 20 |ve..AH. one dot | 00007210 73 68 6f 75 6c 64 20 74 68 65 20 73 74 72 69 6e |should the strin| 00007220 67 20 73 74 61 72 74 20 77 69 74 68 20 66 6f 75 |g start with fou| 00007230 72 20 6f 66 20 74 68 65 6d 2c 20 77 68 69 63 68 |r of them, which| 00007240 20 69 6e 64 69 63 61 74 65 73 0d 05 42 3e f4 20 | indicates..B>. | 00007250 74 68 61 74 20 74 68 65 20 75 73 65 64 20 32 34 |that the used 24| 00007260 20 63 68 61 72 61 63 74 65 72 73 20 64 69 64 20 | characters did | 00007270 69 6e 64 65 65 64 20 73 74 61 72 74 20 77 69 74 |indeed start wit| 00007280 68 20 61 20 64 6f 74 2e 0d 05 43 1f e7 20 c0 61 |h a dot...C.. .a| 00007290 24 2c 34 29 3d 22 2e 2e 2e 2e 22 20 8c 20 61 24 |$,4)="...." . a$| 000072a0 3d c1 61 24 2c 32 29 0d 05 44 15 24 28 21 28 6a |=.a$,2)..D.$(!(j| 000072b0 69 77 25 2b 31 30 38 29 29 3d 61 24 0d 05 45 04 |iw%+108))=a$..E.| 000072c0 0d 05 46 13 61 24 3d c3 28 6a 70 65 67 6c 65 6e |..F.a$=.(jpeglen| 000072d0 67 25 29 0d 05 47 1c e7 20 a9 28 61 24 29 3e 37 |g%)..G.. .(a$)>7| 000072e0 20 8c 20 61 24 3d 22 3e 39 2e 35 4d 62 21 22 0d | . a$=">9.5Mb!".| 000072f0 05 48 15 24 28 21 28 6a 69 77 25 2b 32 33 36 29 |.H.$(!(jiw%+236)| 00007300 29 3d 61 24 0d 05 49 04 0d 05 4a 0f 61 24 3d c3 |)=a$..I...J.a$=.| 00007310 28 78 70 69 63 25 29 0d 05 4b 1b e7 20 a9 28 61 |(xpic%)..K.. .(a| 00007320 24 29 3e 36 20 8c 20 61 24 3d 22 56 2e 57 69 64 |$)>6 . a$="V.Wid| 00007330 65 22 0d 05 4c 15 24 28 21 28 6a 69 77 25 2b 32 |e"..L.$(!(jiw%+2| 00007340 36 38 29 29 3d 61 24 0d 05 4d 04 0d 05 4e 0f 61 |68))=a$..M...N.a| 00007350 24 3d c3 28 79 70 69 63 25 29 0d 05 4f 1b e7 20 |$=.(ypic%)..O.. | 00007360 a9 28 61 24 29 3e 36 20 8c 20 61 24 3d 22 56 2e |.(a$)>6 . a$="V.| 00007370 54 61 6c 6c 22 0d 05 50 15 24 28 21 28 6a 69 77 |Tall"..P.$(!(jiw| 00007380 25 2b 33 30 30 29 29 3d 61 24 0d 05 51 04 0d 05 |%+300))=a$..Q...| 00007390 52 20 f2 75 6e 67 72 65 79 6d 65 6e 75 28 6d 61 |R .ungreymenu(ma| 000073a0 69 6e 6d 65 6e 75 61 64 64 72 25 2c 32 29 0d 05 |inmenuaddr%,2)..| 000073b0 53 20 f2 75 6e 67 72 65 79 6d 65 6e 75 28 6d 61 |S .ungreymenu(ma| 000073c0 69 6e 6d 65 6e 75 61 64 64 72 25 2c 33 29 0d 05 |inmenuaddr%,3)..| 000073d0 54 05 e1 0d 05 55 05 3a 0d ff |T....U.:..| 000073da