home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1996-03-05 | 13.1 KB | [TEXT/CWIE] |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
You can browse this item here: Sandstorm.c
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| Compact Compressed (Unix) (archive/compact)
| ext
| Supported |
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Tue Mar 5 02:01:14 1996, modified Tue Mar 5 02:01:14 1996, creator 'CWIE', type ASCII, 11910 bytes "Sandstorm.c" , at 0x2f06 1228 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [CWIE] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0b 53 61 6e 64 73 74 | 6f 72 6d 2e 63 00 00 00 |..Sandst|orm.c...|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 43 57 49 | 45 01 00 00 00 00 00 00 |.TEXTCWI|E.......|
|00000050| 00 00 00 00 00 2e 86 00 | 00 04 cc ad 61 97 3a ad |........|....a.:.|
|00000060| 61 97 3a 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |a.:.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 54 b4 00 00 |........|....T...|
|00000080| 2f 2a 0d 53 61 6e 64 73 | 74 6f 72 6d 2e 63 0d 43 |/*.Sands|torm.c.C|
|00000090| 6f 70 79 72 69 67 68 74 | 20 a9 20 31 39 38 39 2d |opyright| . 1989-|
|000000a0| 31 39 39 35 20 44 65 6e | 69 73 20 50 65 6c 6c 69 |1995 Den|is Pelli|
|000000b0| 0d 54 68 69 73 20 70 72 | 6f 67 72 61 6d 20 73 68 |.This pr|ogram sh|
|000000c0| 6f 77 73 20 61 20 6e 6f | 69 73 65 20 6d 6f 76 69 |ows a no|ise movi|
|000000d0| 65 2c 20 61 20 64 79 6e | 61 6d 69 63 20 72 61 6e |e, a dyn|amic ran|
|000000e0| 64 6f 6d 20 63 68 65 63 | 6b 65 72 62 6f 61 72 64 |dom chec|kerboard|
|000000f0| 20 61 74 20 77 68 61 74 | 65 76 65 72 20 79 6f 75 | at what|ever you|
|00000100| 72 0d 64 69 73 70 6c 61 | 79 27 73 20 66 72 61 6d |r.displa|y's fram|
|00000110| 65 20 72 61 74 65 20 69 | 73 2c 20 65 2e 67 2e 20 |e rate i|s, e.g. |
|00000120| 36 37 20 48 7a 21 0d 54 | 68 65 20 6b 65 79 20 72 |67 Hz!.T|he key r|
|00000130| 6f 75 74 69 6e 65 2c 20 | 77 68 69 63 68 20 73 68 |outine, |which sh|
|00000140| 6f 77 73 20 65 61 63 68 | 20 66 72 61 6d 65 2c 20 |ows each| frame, |
|00000150| 69 73 20 74 68 65 20 56 | 69 64 65 6f 54 6f 6f 6c |is the V|ideoTool|
|00000160| 62 6f 78 20 72 6f 75 74 | 69 6e 65 20 43 6f 70 79 |box rout|ine Copy|
|00000170| 42 69 74 73 51 75 69 63 | 6b 6c 79 28 29 2e 0d 0d |BitsQuic|kly()...|
|00000180| 54 6f 20 67 65 74 20 61 | 20 74 72 75 65 20 69 6d |To get a| true im|
|00000190| 70 72 65 73 73 69 6f 6e | 20 6f 66 20 77 68 69 74 |pression| of whit|
|000001a0| 65 20 6e 6f 69 73 65 20 | 79 6f 75 20 6e 65 65 64 |e noise |you need|
|000001b0| 20 74 6f 20 63 6f 6d 70 | 75 74 65 20 6c 6f 74 73 | to comp|ute lots|
|000001c0| 20 6f 66 20 6e 6f 69 73 | 65 0d 66 72 61 6d 65 73 | of nois|e.frames|
|000001d0| 2c 20 73 6f 20 67 69 76 | 65 20 69 74 20 61 73 20 |, so giv|e it as |
|000001e0| 6d 75 63 68 20 6d 65 6d | 6f 72 79 20 61 73 20 79 |much mem|ory as y|
|000001f0| 6f 75 20 63 61 6e 2c 20 | 65 2e 67 2e 20 33 20 4d |ou can, |e.g. 3 M|
|00000200| 42 2e 20 28 55 73 65 20 | 74 68 65 20 46 69 6e 64 |B. (Use |the Find|
|00000210| 65 72 20 47 65 74 0d 49 | 6e 66 6f 20 63 6f 6d 6d |er Get.I|nfo comm|
|00000220| 61 6e 64 2e 29 20 53 61 | 6e 64 73 74 6f 72 6d 20 |and.) Sa|ndstorm |
|00000230| 66 69 6c 6c 73 20 61 6c | 6c 20 74 68 65 20 6d 65 |fills al|l the me|
|00000240| 6d 6f 72 79 20 79 6f 75 | 20 67 69 76 65 20 69 74 |mory you| give it|
|00000250| 20 77 69 74 68 20 70 72 | 65 2d 63 6f 6d 70 75 74 | with pr|e-comput|
|00000260| 65 64 0d 6e 6f 69 73 65 | 2c 20 77 68 69 63 68 20 |ed.noise|, which |
|00000270| 64 6f 65 73 20 74 61 6b | 65 20 73 6f 6d 65 20 74 |does tak|e some t|
|00000280| 69 6d 65 2e 20 45 61 63 | 68 20 64 69 73 70 6c 61 |ime. Eac|h displa|
|00000290| 79 65 64 20 66 72 61 6d | 65 20 69 73 20 74 61 6b |yed fram|e is tak|
|000002a0| 65 6e 20 66 72 6f 6d 20 | 61 20 72 61 6e 64 6f 6d |en from |a random|
|000002b0| 0d 6f 66 66 73 65 74 20 | 77 69 74 68 69 6e 20 74 |.offset |within t|
|000002c0| 68 61 74 20 6e 6f 69 73 | 65 2e 0d 0d 4e 6f 74 65 |hat nois|e...Note|
|000002d0| 3a 20 74 68 65 20 61 6d | 6f 75 6e 74 20 6f 66 20 |: the am|ount of |
|000002e0| 64 61 74 61 20 74 68 61 | 74 20 68 61 73 20 74 6f |data tha|t has to|
|000002f0| 20 62 65 20 74 72 61 6e | 73 66 65 72 65 64 20 62 | be tran|sfered b|
|00000300| 79 20 43 6f 70 79 42 69 | 74 73 51 75 69 63 6b 6c |y CopyBi|tsQuickl|
|00000310| 79 28 29 20 69 6e 20 65 | 61 63 68 0d 66 72 61 6d |y() in e|ach.fram|
|00000320| 65 20 69 73 20 70 72 6f | 70 6f 72 74 69 6f 6e 61 |e is pro|portiona|
|00000330| 6c 20 74 6f 20 77 69 6e | 64 6f 77 20 61 72 65 61 |l to win|dow area|
|00000340| 20 61 6e 64 20 74 68 65 | 20 62 69 74 73 2f 70 69 | and the| bits/pi|
|00000350| 78 65 6c 20 6f 66 20 74 | 68 65 20 64 69 73 70 6c |xel of t|he displ|
|00000360| 61 79 2c 20 61 73 20 73 | 65 74 20 62 79 0d 43 6f |ay, as s|et by.Co|
|00000370| 6e 74 72 6f 6c 20 50 61 | 6e 65 6c 20 4d 6f 6e 69 |ntrol Pa|nel Moni|
|00000380| 74 6f 72 73 2e 20 0d 0d | 53 61 6e 64 73 74 6f 72 |tors. ..|Sandstor|
|00000390| 6d 2d 2d 6e 6f 74 20 43 | 6f 70 79 42 69 74 73 51 |m--not C|opyBitsQ|
|000003a0| 75 69 63 6b 6c 79 2d 2d | 63 61 6c 6c 73 20 57 61 |uickly--|calls Wa|
|000003b0| 69 74 4e 65 78 74 45 76 | 65 6e 74 28 29 20 62 65 |itNextEv|ent() be|
|000003c0| 66 6f 72 65 20 65 61 63 | 68 0d 66 72 61 6d 65 2c |fore eac|h.frame,|
|000003d0| 20 69 6e 20 6f 72 64 65 | 72 20 74 6f 20 62 65 20 | in orde|r to be |
|000003e0| 72 65 73 70 6f 6e 73 69 | 76 65 20 74 6f 20 74 68 |responsi|ve to th|
|000003f0| 65 20 6d 6f 75 73 65 2c | 20 61 6e 64 20 74 68 69 |e mouse,| and thi|
|00000400| 73 20 72 65 73 75 6c 74 | 73 20 69 6e 20 6f 63 63 |s result|s in occ|
|00000410| 61 73 69 6f 6e 61 6c 0d | 70 61 75 73 65 73 20 61 |asional.|pauses a|
|00000420| 73 20 74 68 65 20 4d 61 | 63 20 74 61 6b 65 73 20 |s the Ma|c takes |
|00000430| 74 69 6d 65 20 6f 75 74 | 20 74 6f 20 64 6f 20 76 |time out| to do v|
|00000440| 61 72 69 6f 75 73 20 63 | 68 6f 72 65 73 2e 0d 0d |arious c|hores...|
|00000450| 4e 4f 54 45 3a 0d 54 68 | 69 73 20 70 72 6f 67 72 |NOTE:.Th|is progr|
|00000460| 61 6d 20 69 73 20 77 72 | 69 74 74 65 6e 20 74 6f |am is wr|itten to|
|00000470| 20 77 6f 72 6b 20 6f 6e | 20 65 76 65 72 79 20 4d | work on| every M|
|00000480| 61 63 20 69 6e 20 65 78 | 69 73 74 65 6e 63 65 20 |ac in ex|istence |
|00000490| 75 6e 64 65 72 20 74 68 | 65 20 77 69 64 65 73 74 |under th|e widest|
|000004a0| 20 70 6f 73 73 69 62 6c | 65 0d 72 61 6e 67 65 20 | possibl|e.range |
|000004b0| 6f 66 20 4d 61 63 20 4f | 53 20 76 65 72 73 69 6f |of Mac O|S versio|
|000004c0| 6e 73 2e 20 54 68 75 73 | 20 69 74 20 64 6f 65 73 |ns. Thus| it does|
|000004d0| 6e 27 74 20 75 73 65 20 | 47 57 6f 72 6c 64 73 2c |n't use |GWorlds,|
|000004e0| 20 77 68 69 63 68 20 72 | 65 71 75 69 72 65 73 20 | which r|equires |
|000004f0| 53 79 73 74 65 6d 20 37 | 2c 20 74 68 6f 75 67 68 |System 7|, though|
|00000500| 0d 74 68 65 79 20 77 6f | 75 6c 64 20 6d 61 6b 65 |.they wo|uld make|
|00000510| 20 74 68 65 20 63 6f 64 | 65 20 73 68 6f 72 74 65 | the cod|e shorte|
|00000520| 72 20 61 6e 64 20 65 61 | 73 69 65 72 20 74 6f 20 |r and ea|sier to |
|00000530| 72 65 61 64 2e 20 53 6f | 20 44 4f 4e 27 54 20 72 |read. So| DON'T r|
|00000540| 65 61 64 20 74 68 69 73 | 20 70 72 6f 67 72 61 6d |ead this| program|
|00000550| 0d 61 73 20 61 20 6d 6f | 64 65 6c 20 66 6f 72 20 |.as a mo|del for |
|00000560| 79 6f 75 72 20 63 6f 64 | 65 2e 20 4d 6f 73 74 20 |your cod|e. Most |
|00000570| 70 72 6f 67 72 61 6d 73 | 20 73 68 6f 75 6c 64 20 |programs| should |
|00000580| 52 65 71 75 69 72 65 28 | 67 65 73 74 61 6c 74 33 |Require(|gestalt3|
|00000590| 32 42 69 74 51 44 29 3b | 20 61 6e 64 20 75 73 65 |2BitQD);| and use|
|000005a0| 20 47 57 6f 72 6c 64 73 | 20 61 6e 64 0d 43 6f 70 | GWorlds| and.Cop|
|000005b0| 79 57 69 6e 64 6f 77 73 | 2e 20 54 68 65 79 27 6c |yWindows|. They'l|
|000005c0| 6c 20 6d 61 6b 65 20 79 | 6f 75 72 20 6c 69 66 65 |l make y|our life|
|000005d0| 20 6d 75 63 68 20 65 61 | 73 69 65 72 2e 20 45 2e | much ea|sier. E.|
|000005e0| 67 2e 20 73 65 65 20 74 | 68 65 20 64 65 6d 6f 20 |g. see t|he demo |
|000005f0| 4e 6f 69 73 65 56 42 4c | 2e 63 2e 0d 0d 4e 4f 54 |NoiseVBL|.c...NOT|
|00000600| 20 4d 55 4c 54 49 46 49 | 4e 44 45 52 20 46 52 49 | MULTIFI|NDER FRI|
|00000610| 45 4e 44 4c 59 3a 0d 57 | 61 6c 74 20 4d 61 6b 6f |ENDLY:.W|alt Mako|
|00000620| 75 73 20 77 72 69 74 65 | 73 2c 20 22 49 20 72 61 |us write|s, "I ra|
|00000630| 6e 20 53 61 6e 64 73 74 | 6f 72 6d 20 62 79 20 63 |n Sandst|orm by c|
|00000640| 6c 69 63 6b 69 6e 67 20 | 6f 6e 20 74 68 65 20 69 |licking |on the i|
|00000650| 63 6f 6e 20 66 6f 72 20 | 74 68 65 20 61 70 70 6c |con for |the appl|
|00000660| 69 63 61 74 69 6f 6e 2c | 20 0d 69 6e 74 65 72 72 |ication,| .interr|
|00000670| 75 70 74 65 64 20 69 74 | 20 62 79 20 63 6c 69 63 |upted it| by clic|
|00000680| 6b 69 6e 67 20 6f 75 74 | 73 69 64 65 20 74 68 65 |king out|side the|
|00000690| 20 77 69 6e 64 6f 77 2c | 20 61 6e 64 20 74 68 65 | window,| and the|
|000006a0| 6e 20 72 65 73 75 6d 65 | 64 20 69 74 20 62 79 20 |n resume|d it by |
|000006b0| 63 6c 69 63 6b 69 6e 67 | 20 0d 6f 6e 20 74 68 65 |clicking| .on the|
|000006c0| 20 77 69 6e 64 6f 77 20 | 61 67 61 69 6e 2e 20 20 | window |again. |
|000006d0| 54 68 69 73 20 6c 6f 63 | 6b 73 20 74 68 65 20 6b |This loc|ks the k|
|000006e0| 65 79 62 6f 61 72 64 20 | 73 6f 20 74 68 61 74 20 |eyboard |so that |
|000006f0| 74 68 65 20 6f 6e 6c 79 | 20 77 61 79 20 49 20 63 |the only| way I c|
|00000700| 61 6e 20 67 65 74 20 62 | 61 63 6b 20 0d 63 6f 6e |an get b|ack .con|
|00000710| 74 72 6f 6c 20 69 73 20 | 62 79 20 75 73 69 6e 67 |trol is |by using|
|00000720| 20 74 68 65 20 70 72 6f | 67 72 61 6d 6d 65 72 27 | the pro|grammer'|
|00000730| 73 20 73 77 69 74 63 68 | 2e 22 20 52 45 50 4c 59 |s switch|." REPLY|
|00000740| 3a 20 41 6c 61 73 2c 20 | 49 27 76 65 20 6e 65 76 |: Alas, |I've nev|
|00000750| 65 72 20 68 61 64 20 61 | 6e 79 20 6e 65 65 64 20 |er had a|ny need |
|00000760| 0d 74 6f 20 77 72 69 74 | 65 20 70 6f 6c 69 74 65 |.to writ|e polite|
|00000770| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 73 20 74 68 | applica|tions th|
|00000780| 61 74 20 67 72 61 63 65 | 66 75 6c 6c 79 20 73 68 |at grace|fully sh|
|00000790| 61 72 65 20 74 68 65 20 | 63 6f 6d 70 75 74 65 72 |are the |computer|
|000007a0| 20 77 69 74 68 20 6f 74 | 68 65 72 20 61 70 70 6c | with ot|her appl|
|000007b0| 69 63 61 74 69 6f 6e 73 | 2e 20 0d 45 78 70 65 72 |ications|. .Exper|
|000007c0| 69 6d 65 6e 74 73 20 61 | 6c 77 61 79 73 20 73 65 |iments a|lways se|
|000007d0| 65 6d 20 74 6f 20 64 65 | 73 65 72 76 65 20 68 6f |em to de|serve ho|
|000007e0| 67 67 69 6e 67 20 69 74 | 20 61 6c 6c 2e 20 54 68 |gging it| all. Th|
|000007f0| 65 20 53 61 6e 64 73 74 | 6f 72 6d 20 64 65 6d 6f |e Sandst|orm demo|
|00000800| 20 61 6c 6c 6f 77 73 20 | 79 6f 75 20 74 6f 20 0d | allows |you to .|
|00000810| 69 6e 76 6f 6b 65 20 6f | 74 68 65 72 20 61 70 70 |invoke o|ther app|
|00000820| 6c 69 63 61 74 69 6f 6e | 73 2c 20 62 65 63 61 75 |lication|s, becau|
|00000830| 73 65 20 69 74 20 64 6f | 65 73 6e 27 74 20 6f 62 |se it do|esn't ob|
|00000840| 73 63 75 72 65 20 74 68 | 65 20 77 68 6f 6c 65 20 |scure th|e whole |
|00000850| 77 69 6e 64 6f 77 2c 20 | 62 75 74 20 69 74 20 64 |window, |but it d|
|00000860| 6f 65 73 6e 27 74 20 0d | 61 63 74 20 6c 69 6b 65 |oesn't .|act like|
|00000870| 20 61 20 67 6f 6f 64 20 | 63 69 74 69 7a 65 6e 20 | a good |citizen |
|00000880| 69 6e 20 70 61 79 69 6e | 67 20 61 74 74 65 6e 74 |in payin|g attent|
|00000890| 69 6f 6e 20 74 6f 20 74 | 68 65 20 6d 65 73 73 61 |ion to t|he messa|
|000008a0| 67 65 73 20 69 74 20 67 | 65 74 73 20 66 72 6f 6d |ges it g|ets from|
|000008b0| 20 74 68 65 20 46 69 6e | 64 65 72 20 0d 61 62 6f | the Fin|der .abo|
|000008c0| 75 74 20 77 68 61 74 20 | 68 61 70 70 65 6e 65 64 |ut what |happened|
|000008d0| 2e 20 28 49 20 77 6f 75 | 6c 64 20 67 6f 20 61 68 |. (I wou|ld go ah|
|000008e0| 65 61 64 20 61 6e 64 20 | 6d 61 6b 65 20 74 68 65 |ead and |make the|
|000008f0| 20 64 65 6d 6f 73 20 6d | 75 6c 74 69 66 69 6e 64 | demos m|ultifind|
|00000900| 65 72 2d 66 72 69 65 6e | 64 6c 79 20 69 66 20 49 |er-frien|dly if I|
|00000910| 20 0d 6b 6e 65 77 20 68 | 6f 77 2c 20 62 75 74 20 | .knew h|ow, but |
|00000920| 69 74 20 68 61 73 6e 27 | 74 20 73 65 65 6d 65 64 |it hasn'|t seemed|
|00000930| 20 77 6f 72 74 68 20 6c | 65 61 72 6e 69 6e 67 20 | worth l|earning |
|00000940| 6a 75 73 74 20 66 6f 72 | 20 74 68 65 20 73 61 6b |just for| the sak|
|00000950| 65 20 6f 66 20 74 68 65 | 20 64 65 6d 6f 73 2e 29 |e of the| demos.)|
|00000960| 20 0d 0d 48 49 53 54 4f | 52 59 3a 0d 31 31 2f 32 | ..HISTO|RY:.11/2|
|00000970| 33 2f 38 38 20 64 67 70 | 20 64 65 72 69 76 65 64 |3/88 dgp| derived|
|00000980| 20 66 72 6f 6d 20 74 72 | 75 65 6e 6f 69 73 65 44 | from tr|uenoiseD|
|00000990| 65 6d 6f 32 2e 63 0d 34 | 2f 37 2f 38 39 20 64 67 |emo2.c.4|/7/89 dg|
|000009a0| 70 20 09 49 20 72 65 6d | 6f 76 65 64 20 6e 65 61 |p .I rem|oved nea|
|000009b0| 72 6c 79 20 61 6c 6c 20 | 74 68 65 20 68 61 72 64 |rly all |the hard|
|000009c0| 77 61 72 65 20 64 65 70 | 65 6e 64 65 6e 63 69 65 |ware dep|endencie|
|000009d0| 73 2e 20 54 68 65 20 6f | 6e 6c 79 20 72 65 6d 61 |s. The o|nly rema|
|000009e0| 69 6e 69 6e 67 20 6f 6e | 65 0d 09 09 09 69 73 20 |ining on|e....is |
|000009f0| 74 68 65 20 63 61 6c 6c | 20 74 6f 20 4e 65 77 46 |the call| to NewF|
|00000a00| 69 65 6c 64 54 46 42 28 | 29 2e 20 49 20 64 6f 6e |ieldTFB(|). I don|
|00000a10| 27 74 20 6b 6e 6f 77 20 | 68 6f 77 20 74 6f 20 67 |'t know |how to g|
|00000a20| 65 74 20 72 69 64 20 6f | 66 20 74 68 61 74 2c 20 |et rid o|f that, |
|00000a30| 73 68 6f 72 74 0d 09 09 | 09 6f 66 20 77 72 69 74 |short...|.of writ|
|00000a40| 69 6e 67 20 61 20 56 42 | 4c 20 74 61 73 6b 2e 0d |ing a VB|L task..|
|00000a50| 39 2f 32 39 2f 38 39 20 | 64 67 70 20 49 27 76 65 |9/29/89 |dgp I've|
|00000a60| 20 6e 65 61 72 6c 79 20 | 75 70 64 61 74 65 64 20 | nearly |updated |
|00000a70| 74 68 69 73 20 74 6f 20 | 54 48 49 4e 4b 20 43 20 |this to |THINK C |
|00000a80| 34 2e 30 2c 20 62 75 74 | 20 74 68 65 20 63 61 6c |4.0, but| the cal|
|00000a90| 6c 20 74 6f 20 54 69 63 | 6b 43 6f 75 6e 74 2c 20 |l to Tic|kCount, |
|00000aa0| 0d 09 09 09 72 65 66 65 | 72 73 20 74 6f 20 74 68 |....refe|rs to th|
|00000ab0| 65 20 6f 6c 64 20 70 72 | 6f 66 69 6c 65 72 2c 20 |e old pr|ofiler, |
|00000ac0| 61 6e 64 20 49 20 64 6f | 6e 27 74 20 68 61 76 65 |and I do|n't have|
|00000ad0| 20 74 69 6d 65 20 74 6f | 20 66 69 67 75 72 65 20 | time to| figure |
|00000ae0| 74 68 69 73 20 6f 75 74 | 20 6e 6f 77 2e 0d 31 30 |this out| now..10|
|00000af0| 2f 32 38 2f 38 39 20 64 | 67 70 20 49 20 72 65 70 |/28/89 d|gp I rep|
|00000b00| 6c 61 63 65 64 20 74 68 | 65 20 63 61 6c 6c 20 74 |laced th|e call t|
|00000b10| 6f 20 4e 65 77 46 69 65 | 6c 64 54 46 42 28 29 20 |o NewFie|ldTFB() |
|00000b20| 62 79 20 61 20 63 61 6c | 6c 20 74 6f 20 47 44 53 |by a cal|l to GDS|
|00000b30| 65 74 45 6e 74 72 69 65 | 73 28 29 20 77 68 69 63 |etEntrie|s() whic|
|00000b40| 68 0d 09 09 09 69 73 20 | 61 20 64 65 76 69 63 65 |h....is |a device|
|00000b50| 2d 69 6e 64 65 70 65 6e | 64 65 6e 74 20 77 61 79 |-indepen|dent way|
|00000b60| 20 74 6f 20 77 61 69 74 | 20 66 6f 72 20 74 68 65 | to wait| for the|
|00000b70| 20 65 6e 64 20 6f 66 20 | 66 72 61 6d 65 2e 0d 37 | end of |frame..7|
|00000b80| 2f 31 39 2f 39 30 20 64 | 67 70 20 55 6e 66 6f 72 |/19/90 d|gp Unfor|
|00000b90| 74 75 6e 61 74 65 6c 79 | 20 74 68 65 20 62 75 69 |tunately| the bui|
|00000ba0| 6c 74 2d 69 6e 20 76 69 | 64 65 6f 20 6f 6e 20 74 |lt-in vi|deo on t|
|00000bb0| 68 65 20 4d 61 63 20 49 | 49 63 69 20 69 73 20 62 |he Mac I|Ici is b|
|00000bc0| 75 67 67 79 20 61 6e 64 | 20 64 6f 65 73 6e 27 74 |uggy and| doesn't|
|00000bd0| 0d 09 09 09 73 75 70 70 | 6f 72 74 20 74 68 65 20 |....supp|ort the |
|00000be0| 63 73 63 53 65 74 45 6e | 74 72 69 65 73 20 63 61 |cscSetEn|tries ca|
|00000bf0| 6c 6c 2e 0d 31 30 2f 31 | 37 2f 39 30 20 64 67 70 |ll..10/1|7/90 dgp|
|00000c00| 20 59 61 79 2e 20 46 69 | 6e 61 6c 6c 79 20 72 65 | Yay. Fi|nally re|
|00000c10| 6d 6f 76 65 64 20 6c 61 | 73 74 20 62 75 67 73 21 |moved la|st bugs!|
|00000c20| 20 52 65 70 6c 61 63 65 | 64 20 53 6c 6f 74 54 6f | Replace|d SlotTo|
|00000c30| 53 63 72 65 65 6e 44 65 | 76 69 63 65 28 29 20 62 |ScreenDe|vice() b|
|00000c40| 79 0d 09 09 09 41 64 64 | 72 65 73 73 54 6f 53 63 |y....Add|ressToSc|
|00000c50| 72 65 65 6e 44 65 76 69 | 63 65 28 29 20 69 6e 20 |reenDevi|ce() in |
|00000c60| 6f 72 64 65 72 20 74 6f | 20 6d 61 6b 65 20 69 74 |order to| make it|
|00000c70| 20 63 6f 6d 70 61 74 69 | 62 6c 65 20 77 69 74 68 | compati|ble with|
|00000c80| 20 62 75 69 6c 74 2d 69 | 6e 20 76 69 64 65 6f 0d | built-i|n video.|
|00000c90| 09 09 09 6f 6e 20 4d 61 | 63 20 49 49 63 69 2c 20 |...on Ma|c IIci, |
|00000ca0| 49 49 73 69 2c 20 61 6e | 64 20 4c 43 2e 20 52 65 |IIsi, an|d LC. Re|
|00000cb0| 6d 6f 76 65 64 20 74 68 | 65 20 63 73 63 53 65 74 |moved th|e cscSet|
|00000cc0| 45 6e 74 72 69 65 73 20 | 63 61 6c 6c 20 66 6f 72 |Entries |call for|
|00000cd0| 20 63 6f 6d 70 61 74 69 | 62 69 6c 69 74 79 0d 09 | compati|bility..|
|00000ce0| 09 09 77 69 74 68 20 4d | 61 63 20 49 49 63 69 20 |..with M|ac IIci |
|00000cf0| 62 75 69 6c 74 2d 69 6e | 20 76 69 64 65 6f 2e 28 |built-in| video.(|
|00000d00| 41 70 70 6c 65 20 68 61 | 73 20 61 63 6b 6e 6f 77 |Apple ha|s acknow|
|00000d10| 6c 65 64 67 65 64 20 62 | 75 67 2c 20 62 75 74 20 |ledged b|ug, but |
|00000d20| 62 75 67 20 69 73 0d 09 | 09 09 73 74 69 6c 6c 20 |bug is..|..still |
|00000d30| 70 72 65 73 65 6e 74 20 | 69 6e 20 53 79 73 74 65 |present |in Syste|
|00000d40| 6d 20 36 2e 30 37 2e 29 | 20 46 69 78 65 64 20 62 |m 6.07.)| Fixed b|
|00000d50| 75 67 20 77 68 65 72 65 | 62 79 20 72 65 73 69 7a |ug where|by resiz|
|00000d60| 69 6e 67 20 77 69 6e 64 | 6f 77 20 6f 6e 20 6f 74 |ing wind|ow on ot|
|00000d70| 68 65 72 0d 09 09 09 74 | 68 61 6e 20 74 68 65 20 |her....t|han the |
|00000d80| 6d 61 69 6e 20 73 63 72 | 65 65 6e 20 6c 65 66 74 |main scr|een left|
|00000d90| 20 77 69 6e 64 6f 77 20 | 62 6c 61 6e 6b 20 75 6e | window |blank un|
|00000da0| 74 69 6c 20 69 74 20 77 | 61 73 20 64 72 61 67 67 |til it w|as dragg|
|00000db0| 65 64 20 61 67 61 69 6e | 2e 20 0d 09 09 09 52 65 |ed again|. ....Re|
|00000dc0| 6d 6f 76 65 64 20 75 6e | 75 73 65 64 20 76 61 72 |moved un|used var|
|00000dd0| 69 61 62 6c 65 73 2e 20 | 41 64 64 65 64 20 7a 6f |iables. |Added zo|
|00000de0| 6f 6d 20 62 6f 78 2e 0d | 31 30 2f 31 38 2f 39 30 |om box..|10/18/90|
|00000df0| 20 64 67 70 20 54 69 64 | 69 65 64 20 75 70 2e 20 | dgp Tid|ied up. |
|00000e00| 4e 6f 77 20 7a 6f 6f 6d | 73 20 6f 6e 74 6f 20 73 |Now zoom|s onto s|
|00000e10| 63 72 65 65 6e 20 77 69 | 74 68 20 6c 61 72 67 65 |creen wi|th large|
|00000e20| 73 74 20 69 6e 74 65 72 | 73 65 63 74 69 6f 6e 2c |st inter|section,|
|00000e30| 20 61 6e 64 20 7a 6f 6f | 6d 73 20 62 61 63 6b 0d | and zoo|ms back.|
|00000e40| 09 09 09 74 6f 20 6f 72 | 69 67 69 6e 61 6c 20 73 |...to or|iginal s|
|00000e50| 69 7a 65 2e 20 55 73 65 | 73 20 61 73 20 6d 75 63 |ize. Use|s as muc|
|00000e60| 68 20 6d 65 6d 6f 72 79 | 20 61 73 20 75 73 65 72 |h memory| as user|
|00000e70| 20 61 6c 6c 6f 63 61 74 | 65 73 20 74 6f 20 70 72 | allocat|es to pr|
|00000e80| 6f 67 72 61 6d 2e 20 0d | 09 09 09 57 69 6e 64 6f |ogram. .|...Windo|
|00000e90| 77 20 6e 6f 77 20 61 6c | 77 61 79 73 20 63 6f 6e |w now al|ways con|
|00000ea0| 66 69 6e 65 73 20 69 74 | 73 65 6c 66 20 74 6f 20 |fines it|self to |
|00000eb0| 61 20 73 69 6e 67 6c 65 | 20 73 63 72 65 65 6e 2c |a single| screen,|
|00000ec0| 20 62 75 74 20 63 61 6e | 20 62 65 20 64 72 61 67 | but can| be drag|
|00000ed0| 67 65 64 0d 09 09 09 61 | 6e 79 77 68 65 72 65 2e |ged....a|nywhere.|
|00000ee0| 0d 31 30 2f 32 30 2f 39 | 30 20 64 67 70 20 43 6f |.10/20/9|0 dgp Co|
|00000ef0| 70 69 65 64 20 63 6f 64 | 65 20 66 72 6f 6d 20 56 |pied cod|e from V|
|00000f00| 69 64 65 6f 54 65 73 74 | 20 74 6f 20 63 6c 6f 73 |ideoTest| to clos|
|00000f10| 65 20 77 69 6e 64 6f 77 | 20 61 6e 64 20 71 75 69 |e window| and qui|
|00000f20| 74 20 6f 6e 20 43 6f 6d | 6d 61 6e 64 2d 57 20 6f |t on Com|mand-W o|
|00000f30| 72 0d 09 09 09 43 6f 6d | 6d 61 6e 64 2d 2e 20 50 |r....Com|mand-. P|
|00000f40| 72 65 76 65 6e 74 65 64 | 20 77 69 6e 64 6f 77 20 |revented| window |
|00000f50| 74 69 74 6c 65 20 62 61 | 72 20 66 72 6f 6d 20 62 |title ba|r from b|
|00000f60| 65 69 6e 67 20 68 69 64 | 64 65 6e 20 62 65 68 69 |eing hid|den behi|
|00000f70| 6e 64 20 74 68 65 20 6d | 65 6e 75 0d 09 09 09 62 |nd the m|enu....b|
|00000f80| 61 72 2e 0d 37 2f 32 32 | 2f 39 31 09 64 67 70 09 |ar..7/22|/91.dgp.|
|00000f90| 4d 61 64 65 20 63 6f 6d | 70 61 74 69 62 6c 65 20 |Made com|patible |
|00000fa0| 77 69 74 68 20 4d 50 57 | 20 43 2e 20 54 68 69 73 |with MPW| C. This|
|00000fb0| 20 72 65 71 75 69 72 65 | 64 20 63 68 61 6e 67 69 | require|d changi|
|00000fc0| 6e 67 20 49 4e 54 5f 4d | 41 58 20 74 6f 20 53 48 |ng INT_M|AX to SH|
|00000fd0| 52 54 5f 4d 41 58 2e 0d | 09 09 09 48 6f 77 65 76 |RT_MAX..|...Howev|
|00000fe0| 65 72 2c 20 70 65 72 66 | 6f 72 6d 61 6e 63 65 20 |er, perf|ormance |
|00000ff0| 69 73 20 73 6c 6f 77 2c | 20 73 69 6e 63 65 20 43 |is slow,| since C|
|00001000| 6f 70 79 42 69 74 73 51 | 75 69 63 6b 6c 79 2e 63 |opyBitsQ|uickly.c|
|00001010| 20 64 6f 65 73 6e 27 74 | 20 67 65 6e 65 72 61 74 | doesn't| generat|
|00001020| 65 0d 09 09 09 68 61 6e | 64 2d 74 75 6e 65 64 20 |e....han|d-tuned |
|00001030| 61 73 73 65 6d 62 6c 79 | 20 63 6f 64 65 20 77 68 |assembly| code wh|
|00001040| 65 6e 20 75 73 69 6e 67 | 20 4d 50 57 20 43 2e 0d |en using| MPW C..|
|00001050| 38 2f 36 2f 39 31 09 64 | 67 70 09 52 65 70 6c 61 |8/6/91.d|gp.Repla|
|00001060| 63 65 64 20 72 61 6e 64 | 55 28 29 20 62 79 20 52 |ced rand|U() by R|
|00001070| 61 6e 64 46 69 6c 6c 28 | 29 2c 20 77 68 69 63 68 |andFill(|), which|
|00001080| 20 72 75 6e 73 20 74 77 | 69 63 65 20 61 73 20 66 | runs tw|ice as f|
|00001090| 61 73 74 2e 0d 38 2f 32 | 34 2f 39 31 09 64 67 70 |ast..8/2|4/91.dgp|
|000010a0| 09 4d 61 64 65 20 63 6f | 6d 70 61 74 69 62 6c 65 |.Made co|mpatible|
|000010b0| 20 77 69 74 68 20 54 48 | 49 4e 4b 20 43 20 35 2e | with TH|INK C 5.|
|000010c0| 30 2e 0d 37 2f 32 30 2f | 39 32 09 64 67 70 09 74 |0..7/20/|92.dgp.t|
|000010d0| 69 64 69 65 64 20 75 70 | 20 74 68 65 20 63 6f 6d |idied up| the com|
|000010e0| 6d 65 6e 74 73 20 73 6c | 69 67 68 74 6c 79 2e 20 |ments sl|ightly. |
|000010f0| 43 6f 6e 66 69 72 6d 65 | 64 20 63 6f 6d 70 61 74 |Confirme|d compat|
|00001100| 69 62 69 6c 69 74 79 20 | 77 69 74 68 20 33 32 2d |ibility |with 32-|
|00001110| 62 69 74 0d 09 09 09 61 | 64 64 72 65 73 73 69 6e |bit....a|ddressin|
|00001120| 67 2e 0d 38 2f 32 37 2f | 39 32 09 64 67 70 09 72 |g..8/27/|92.dgp.r|
|00001130| 65 70 6c 61 63 65 20 53 | 79 73 45 6e 76 69 72 6f |eplace S|ysEnviro|
|00001140| 6e 73 28 29 20 62 79 20 | 47 65 73 74 61 6c 74 28 |ns() by |Gestalt(|
|00001150| 29 0d 31 2f 31 33 2f 39 | 33 20 64 67 70 09 63 68 |).1/13/9|3 dgp.ch|
|00001160| 61 6e 67 65 64 20 64 65 | 66 61 75 6c 74 73 20 74 |anged de|faults t|
|00001170| 6f 20 6d 61 78 69 6d 69 | 7a 65 20 73 70 65 65 64 |o maximi|ze speed|
|00001180| 2e 0d 39 2f 33 2f 39 33 | 09 64 67 70 09 61 64 64 |..9/3/93|.dgp.add|
|00001190| 65 64 20 63 61 6c 6c 20 | 74 6f 20 53 68 69 65 6c |ed call |to Shiel|
|000011a0| 64 43 75 72 73 6f 72 28 | 29 20 66 6f 72 20 63 6f |dCursor(|) for co|
|000011b0| 6d 70 61 74 69 62 69 6c | 69 74 79 20 77 69 74 68 |mpatibil|ity with|
|000011c0| 20 6e 6f 6e 73 74 61 6e | 64 61 72 64 0d 09 09 09 | nonstan|dard....|
|000011d0| 76 69 64 65 6f 20 64 65 | 76 69 63 65 73 2c 20 65 |video de|vices, e|
|000011e0| 2e 67 2e 20 52 61 64 69 | 75 73 20 50 6f 77 65 72 |.g. Radi|us Power|
|000011f0| 56 69 65 77 2e 0d 36 2f | 33 2f 39 34 09 64 67 70 |View..6/|3/94.dgp|
|00001200| 09 72 65 70 6c 61 63 65 | 64 20 6c 6f 77 2d 6d 65 |.replace|d low-me|
|00001210| 6d 6f 72 79 20 67 6c 6f | 62 61 6c 20 4d 42 61 72 |mory glo|bal MBar|
|00001220| 48 65 69 67 68 74 20 62 | 79 20 47 65 74 4d 42 61 |Height b|y GetMBa|
|00001230| 72 48 65 69 67 68 74 28 | 29 2e 0d 39 2f 35 2f 39 |rHeight(|)..9/5/9|
|00001240| 34 20 64 67 70 20 72 65 | 6d 6f 76 65 64 20 61 73 |4 dgp re|moved as|
|00001250| 73 75 6d 70 74 69 6f 6e | 20 69 6e 20 70 72 69 6e |sumption| in prin|
|00001260| 74 66 27 73 20 74 68 61 | 74 20 69 6e 74 3d 3d 73 |tf's tha|t int==s|
|00001270| 68 6f 72 74 2e 0d 2a 2f | 0d 23 69 6e 63 6c 75 64 |hort..*/|.#includ|
|00001280| 65 20 22 56 69 64 65 6f | 54 6f 6f 6c 62 6f 78 2e |e "Video|Toolbox.|
|00001290| 68 22 0d 23 69 66 20 55 | 4e 49 56 45 52 53 41 4c |h".#if U|NIVERSAL|
|000012a0| 5f 48 45 41 44 45 52 53 | 0d 09 23 69 6e 63 6c 75 |_HEADERS|..#inclu|
|000012b0| 64 65 20 3c 4c 6f 77 4d | 65 6d 2e 68 3e 0d 23 65 |de <LowM|em.h>.#e|
|000012c0| 6c 73 65 0d 09 23 64 65 | 66 69 6e 65 20 4c 4d 47 |lse..#de|fine LMG|
|000012d0| 65 74 4d 42 61 72 48 65 | 69 67 68 74 28 29 20 28 |etMBarHe|ight() (|
|000012e0| 2a 20 28 73 68 6f 72 74 | 20 2a 29 20 30 78 30 42 |* (short| *) 0x0B|
|000012f0| 41 41 29 0d 09 23 64 65 | 66 69 6e 65 20 4c 4d 53 |AA)..#de|fine LMS|
|00001300| 65 74 4d 42 61 72 48 65 | 69 67 68 74 28 4d 42 61 |etMBarHe|ight(MBa|
|00001310| 72 48 65 69 67 68 74 56 | 61 6c 75 65 29 20 28 28 |rHeightV|alue) ((|
|00001320| 2a 20 28 73 68 6f 72 74 | 20 2a 29 20 30 78 30 42 |* (short| *) 0x0B|
|00001330| 41 41 29 20 3d 20 28 4d | 42 61 72 48 65 69 67 68 |AA) = (M|BarHeigh|
|00001340| 74 56 61 6c 75 65 29 29 | 0d 23 65 6e 64 69 66 0d |tValue))|.#endif.|
|00001350| 76 6f 69 64 20 6d 61 69 | 6e 28 76 6f 69 64 29 3b |void mai|n(void);|
|00001360| 0d 42 6f 6f 6c 65 61 6e | 20 5a 6f 6f 6d 65 64 4f |.Boolean| ZoomedO|
|00001370| 75 74 28 57 69 6e 64 6f | 77 50 74 72 20 77 29 3b |ut(Windo|wPtr w);|
|00001380| 0d 23 64 65 66 69 6e 65 | 20 52 41 49 53 45 5f 50 |.#define| RAISE_P|
|00001390| 52 49 4f 52 49 54 59 09 | 30 09 2f 2a 20 4f 70 74 |RIORITY.|0./* Opt|
|000013a0| 69 6f 6e 61 6c 2e 20 43 | 6f 6e 74 72 61 72 79 20 |ional. C|ontrary |
|000013b0| 74 6f 20 41 70 70 6c 65 | 27 73 20 72 75 6c 65 73 |to Apple|'s rules|
|000013c0| 2c 09 2a 2f 0d 09 09 09 | 09 09 09 09 2f 2a 20 62 |,.*/....|..../* b|
|000013d0| 75 74 20 73 70 65 65 64 | 73 20 75 70 20 74 68 65 |ut speed|s up the|
|000013e0| 20 64 69 73 70 6c 61 79 | 2e 20 2a 2f 0d 23 64 65 | display|. */.#de|
|000013f0| 66 69 6e 65 20 53 43 52 | 4f 4c 4c 5f 42 41 52 20 |fine SCR|OLL_BAR |
|00001400| 31 35 09 09 2f 2a 20 53 | 74 61 6e 64 61 72 64 20 |15../* S|tandard |
|00001410| 77 69 64 74 68 20 6f 66 | 20 73 63 72 6f 6c 6c 20 |width of| scroll |
|00001420| 62 61 72 20 2a 2f 0d 23 | 64 65 66 69 6e 65 20 57 |bar */.#|define W|
|00001430| 41 49 54 5f 4e 45 58 54 | 5f 45 56 45 4e 54 20 30 |AIT_NEXT|_EVENT 0|
|00001440| 0d 0d 76 6f 69 64 20 53 | 61 6e 64 73 74 6f 72 6d |..void S|andstorm|
|00001450| 28 76 6f 69 64 29 3b 0d | 0d 76 6f 69 64 20 6d 61 |(void);.|.void ma|
|00001460| 69 6e 28 76 6f 69 64 29 | 0d 7b 0d 09 53 74 61 63 |in(void)|.{..Stac|
|00001470| 6b 47 72 6f 77 28 34 30 | 30 30 29 3b 0d 09 52 65 |kGrow(40|00);..Re|
|00001480| 71 75 69 72 65 28 67 65 | 73 74 61 6c 74 38 42 69 |quire(ge|stalt8Bi|
|00001490| 74 51 44 29 3b 0d 09 53 | 61 6e 64 73 74 6f 72 6d |tQD);..S|andstorm|
|000014a0| 28 29 3b 0d 7d 0d 76 6f | 69 64 20 53 61 6e 64 73 |();.}.vo|id Sands|
|000014b0| 74 6f 72 6d 28 29 0d 7b | 0d 09 72 65 67 69 73 74 |torm().{|..regist|
|000014c0| 65 72 20 73 68 6f 72 74 | 20 2a 62 75 66 66 65 72 |er short| *buffer|
|000014d0| 50 74 72 3b 0d 09 69 6e | 74 20 69 3b 0d 09 63 68 |Ptr;..in|t i;..ch|
|000014e0| 61 72 20 73 74 72 69 6e | 67 5b 34 30 5d 3b 0d 09 |ar strin|g[40];..|
|000014f0| 50 69 78 4d 61 70 20 73 | 61 6e 64 3b 0d 09 52 65 |PixMap s|and;..Re|
|00001500| 63 74 20 72 2c 75 6e 7a | 6f 6f 6d 65 64 52 65 63 |ct r,unz|oomedRec|
|00001510| 74 2c 67 64 52 65 63 74 | 3b 0d 09 47 44 48 61 6e |t,gdRect|;..GDHan|
|00001520| 64 6c 65 20 64 65 76 69 | 63 65 3b 0d 09 57 69 6e |dle devi|ce;..Win|
|00001530| 64 6f 77 50 74 72 20 77 | 69 6e 64 6f 77 2c 61 57 |dowPtr w|indow,aW|
|00001540| 69 6e 64 6f 77 2c 6f 6c | 64 50 6f 72 74 3b 0d 09 |indow,ol|dPort;..|
|00001550| 50 69 78 4d 61 70 20 2a | 2a 6d 79 50 69 78 4d 61 |PixMap *|*myPixMa|
|00001560| 70 48 61 6e 64 6c 65 3b | 0d 09 42 69 74 4d 61 70 |pHandle;|..BitMap|
|00001570| 20 62 75 66 66 65 72 3b | 0d 09 6c 6f 6e 67 20 62 | buffer;|..long b|
|00001580| 75 66 66 65 72 42 79 74 | 65 73 3b 0d 09 73 69 7a |ufferByt|es;..siz|
|00001590| 65 5f 74 20 73 61 6e 64 | 42 79 74 65 73 3b 0d 09 |e_t sand|Bytes;..|
|000015a0| 42 6f 6f 6c 65 61 6e 20 | 64 6f 6e 65 3d 30 2c 75 |Boolean |done=0,u|
|000015b0| 70 64 61 74 65 3b 0d 09 | 6c 6f 6e 67 20 72 65 53 |pdate;..|long reS|
|000015c0| 69 7a 65 3b 0d 09 69 6e | 74 20 77 69 6e 64 6f 77 |ize;..in|t window|
|000015d0| 45 76 65 6e 74 3d 69 6e | 44 65 73 6b 3b 0d 09 42 |Event=in|Desk;..B|
|000015e0| 6f 6f 6c 65 61 6e 20 7a | 6f 6f 6d 65 64 4f 75 74 |oolean z|oomedOut|
|000015f0| 3b 0d 09 57 53 74 61 74 | 65 44 61 74 61 20 2a 77 |;..WStat|eData *w|
|00001600| 53 74 61 74 65 44 61 74 | 61 3b 0d 09 52 67 6e 48 |StateDat|a;..RgnH|
|00001610| 61 6e 64 6c 65 20 69 67 | 6e 6f 72 65 52 67 6e 3b |andle ig|noreRgn;|
|00001620| 0d 09 69 6e 74 20 70 69 | 78 65 6c 53 69 7a 65 3b |..int pi|xelSize;|
|00001630| 0d 09 50 6f 69 6e 74 20 | 70 74 3b 0d 09 45 76 65 |..Point |pt;..Eve|
|00001640| 6e 74 52 65 63 6f 72 64 | 20 65 76 65 6e 74 3b 0d |ntRecord| event;.|
|00001650| 09 0d 09 61 73 73 65 72 | 74 28 53 74 61 63 6b 53 |...asser|t(StackS|
|00001660| 70 61 63 65 28 29 3e 34 | 30 30 30 29 3b 0d 09 0d |pace()>4|000);...|
|00001670| 09 2f 2a 20 49 4e 49 54 | 49 41 4c 49 5a 45 20 51 |./* INIT|IALIZE Q|
|00001680| 75 69 63 6b 44 72 61 77 | 20 2a 2f 0d 09 4d 61 78 |uickDraw| */..Max|
|00001690| 41 70 70 6c 5a 6f 6e 65 | 28 29 3b 09 09 09 09 09 |ApplZone|();.....|
|000016a0| 09 2f 2a 20 45 78 70 61 | 6e 64 20 68 65 61 70 20 |./* Expa|nd heap |
|000016b0| 74 6f 20 74 68 65 20 6c | 69 6d 69 74 2e 20 2a 2f |to the l|imit. */|
|000016c0| 0d 09 49 6e 69 74 47 72 | 61 66 28 26 71 64 2e 74 |..InitGr|af(&qd.t|
|000016d0| 68 65 50 6f 72 74 29 3b | 0d 09 49 6e 69 74 46 6f |hePort);|..InitFo|
|000016e0| 6e 74 73 28 29 3b 0d 09 | 49 6e 69 74 57 69 6e 64 |nts();..|InitWind|
|000016f0| 6f 77 73 28 29 3b 0d 09 | 49 6e 69 74 43 75 72 73 |ows();..|InitCurs|
|00001700| 6f 72 28 29 3b 0d 09 47 | 65 74 50 6f 72 74 28 26 |or();..G|etPort(&|
|00001710| 6f 6c 64 50 6f 72 74 29 | 3b 0d 09 64 65 76 69 63 |oldPort)|;..devic|
|00001720| 65 3d 47 65 74 4d 61 69 | 6e 44 65 76 69 63 65 28 |e=GetMai|nDevice(|
|00001730| 29 3b 0d 0d 09 2f 2a 20 | 6f 70 65 6e 20 61 20 77 |);.../* |open a w|
|00001740| 69 6e 64 6f 77 20 6f 6e | 20 74 68 65 20 64 65 76 |indow on| the dev|
|00001750| 69 63 65 20 2a 2f 0d 09 | 69 67 6e 6f 72 65 52 67 |ice */..|ignoreRg|
|00001760| 6e 3d 4e 65 77 52 67 6e | 28 29 3b 0d 09 53 65 74 |n=NewRgn|();..Set|
|00001770| 52 65 63 74 28 26 72 2c | 30 2c 30 2c 31 39 32 2b |Rect(&r,|0,0,192+|
|00001780| 53 43 52 4f 4c 4c 5f 42 | 41 52 2c 31 39 32 2b 53 |SCROLL_B|AR,192+S|
|00001790| 43 52 4f 4c 4c 5f 42 41 | 52 29 3b 0d 09 43 65 6e |CROLL_BA|R);..Cen|
|000017a0| 74 65 72 52 65 63 74 49 | 6e 52 65 63 74 28 26 72 |terRectI|nRect(&r|
|000017b0| 2c 26 28 2a 64 65 76 69 | 63 65 29 2d 3e 67 64 52 |,&(*devi|ce)->gdR|
|000017c0| 65 63 74 29 3b 0d 09 77 | 69 6e 64 6f 77 3d 4e 65 |ect);..w|indow=Ne|
|000017d0| 77 43 57 69 6e 64 6f 77 | 28 4e 55 4c 4c 0d 09 09 |wCWindow|(NULL...|
|000017e0| 2c 26 72 2c 22 5c 70 4e | 6f 77 20 63 6f 6d 70 75 |,&r,"\pN|ow compu|
|000017f0| 74 69 6e 67 20 6e 6f 69 | 73 65 20 2e 2e 2e 22 2c |ting noi|se ...",|
|00001800| 54 52 55 45 2c 7a 6f 6f | 6d 44 6f 63 50 72 6f 63 |TRUE,zoo|mDocProc|
|00001810| 2c 28 57 69 6e 64 6f 77 | 50 74 72 29 20 2d 31 4c |,(Window|Ptr) -1L|
|00001820| 2c 54 52 55 45 2c 30 4c | 29 3b 0d 09 6d 79 50 69 |,TRUE,0L|);..myPi|
|00001830| 78 4d 61 70 48 61 6e 64 | 6c 65 20 3d 20 28 28 43 |xMapHand|le = ((C|
|00001840| 47 72 61 66 50 74 72 29 | 77 69 6e 64 6f 77 29 2d |GrafPtr)|window)-|
|00001850| 3e 70 6f 72 74 50 69 78 | 4d 61 70 3b 0d 09 4d 6f |>portPix|Map;..Mo|
|00001860| 76 65 48 48 69 28 28 48 | 61 6e 64 6c 65 29 20 6d |veHHi((H|andle) m|
|00001870| 79 50 69 78 4d 61 70 48 | 61 6e 64 6c 65 29 3b 0d |yPixMapH|andle);.|
|00001880| 09 48 4c 6f 63 6b 28 28 | 48 61 6e 64 6c 65 29 20 |.HLock((|Handle) |
|00001890| 6d 79 50 69 78 4d 61 70 | 48 61 6e 64 6c 65 29 3b |myPixMap|Handle);|
|000018a0| 0d 0d 09 2f 2a 20 43 6f | 6d 70 75 74 65 20 6e 6f |.../* Co|mpute no|
|000018b0| 69 73 65 20 2a 2f 0d 09 | 2f 2a 20 61 6c 6c 6f 63 |ise */..|/* alloc|
|000018c0| 61 74 65 20 62 75 66 66 | 65 72 20 42 69 74 4d 61 |ate buff|er BitMa|
|000018d0| 70 20 2a 2f 0d 09 62 75 | 66 66 65 72 2e 72 6f 77 |p */..bu|ffer.row|
|000018e0| 42 79 74 65 73 3d 31 30 | 32 34 3b 0d 09 4d 61 78 |Bytes=10|24;..Max|
|000018f0| 41 70 70 6c 5a 6f 6e 65 | 28 29 3b 0d 09 62 75 66 |ApplZone|();..buf|
|00001900| 66 65 72 42 79 74 65 73 | 20 3d 20 46 72 65 65 4d |ferBytes| = FreeM|
|00001910| 65 6d 28 29 3b 0d 09 62 | 75 66 66 65 72 42 79 74 |em();..b|ufferByt|
|00001920| 65 73 2d 3d 31 30 30 30 | 30 30 4c 3b 09 2f 2a 20 |es-=1000|00L;./* |
|00001930| 47 72 61 62 20 6d 6f 73 | 74 20 6f 66 20 61 76 61 |Grab mos|t of ava|
|00001940| 69 6c 61 62 6c 65 20 73 | 70 61 63 65 2e 20 2a 2f |ilable s|pace. */|
|00001950| 0d 09 62 75 66 66 65 72 | 42 79 74 65 73 20 2d 3d |..buffer|Bytes -=|
|00001960| 20 62 75 66 66 65 72 42 | 79 74 65 73 25 62 75 66 | bufferB|ytes%buf|
|00001970| 66 65 72 2e 72 6f 77 42 | 79 74 65 73 3b 0d 09 62 |fer.rowB|ytes;..b|
|00001980| 75 66 66 65 72 2e 62 61 | 73 65 41 64 64 72 3d 4e |uffer.ba|seAddr=N|
|00001990| 55 4c 4c 3b 0d 09 66 6f | 72 28 3b 62 75 66 66 65 |ULL;..fo|r(;buffe|
|000019a0| 72 42 79 74 65 73 3e 30 | 3b 62 75 66 66 65 72 42 |rBytes>0|;bufferB|
|000019b0| 79 74 65 73 20 2d 3d 20 | 62 75 66 66 65 72 2e 72 |ytes -= |buffer.r|
|000019c0| 6f 77 42 79 74 65 73 29 | 7b 0d 09 09 62 75 66 66 |owBytes)|{...buff|
|000019d0| 65 72 2e 62 61 73 65 41 | 64 64 72 20 3d 20 4e 65 |er.baseA|ddr = Ne|
|000019e0| 77 50 74 72 28 62 75 66 | 66 65 72 42 79 74 65 73 |wPtr(buf|ferBytes|
|000019f0| 29 3b 0d 09 09 69 66 20 | 28 62 75 66 66 65 72 2e |);...if |(buffer.|
|00001a00| 62 61 73 65 41 64 64 72 | 21 3d 4e 55 4c 4c 29 62 |baseAddr|!=NULL)b|
|00001a10| 72 65 61 6b 3b 0d 09 7d | 0d 09 69 66 28 62 75 66 |reak;..}|..if(buf|
|00001a20| 66 65 72 2e 62 61 73 65 | 41 64 64 72 3d 3d 4e 55 |fer.base|Addr==NU|
|00001a30| 4c 4c 29 50 72 69 6e 74 | 66 45 78 69 74 28 22 5c |LL)Print|fExit("\|
|00001a40| 30 30 37 53 6f 72 72 79 | 2c 20 6e 6f 74 20 65 6e |007Sorry|, not en|
|00001a50| 6f 75 67 68 20 6d 65 6d | 6f 72 79 20 66 6f 72 20 |ough mem|ory for |
|00001a60| 62 75 66 66 65 72 73 2e | 5c 6e 22 29 3b 0d 09 53 |buffers.|\n");..S|
|00001a70| 65 74 52 65 63 74 28 26 | 62 75 66 66 65 72 2e 62 |etRect(&|buffer.b|
|00001a80| 6f 75 6e 64 73 2c 30 2c | 30 2c 62 75 66 66 65 72 |ounds,0,|0,buffer|
|00001a90| 2e 72 6f 77 42 79 74 65 | 73 2a 38 4c 2c 62 75 66 |.rowByte|s*8L,buf|
|00001aa0| 66 65 72 42 79 74 65 73 | 2f 62 75 66 66 65 72 2e |ferBytes|/buffer.|
|00001ab0| 72 6f 77 42 79 74 65 73 | 29 3b 0d 0d 09 2f 2a 20 |rowBytes|);.../* |
|00001ac0| 46 69 6c 6c 20 62 75 66 | 66 65 72 20 77 69 74 68 |Fill buf|fer with|
|00001ad0| 20 6e 6f 69 73 65 2e 20 | 2a 2f 0d 09 62 75 66 66 | noise. |*/..buff|
|00001ae0| 65 72 50 74 72 20 3d 20 | 28 73 68 6f 72 74 20 2a |erPtr = |(short *|
|00001af0| 29 20 62 75 66 66 65 72 | 2e 62 61 73 65 41 64 64 |) buffer|.baseAdd|
|00001b00| 72 3b 0d 09 52 61 6e 64 | 46 69 6c 6c 28 62 75 66 |r;..Rand|Fill(buf|
|00001b10| 66 65 72 2e 62 61 73 65 | 41 64 64 72 2c 62 75 66 |fer.base|Addr,buf|
|00001b20| 66 65 72 42 79 74 65 73 | 29 3b 0d 0d 09 2f 2a 20 |ferBytes|);.../* |
|00001b30| 53 68 6f 77 20 6e 6f 69 | 73 65 20 2a 2f 0d 09 53 |Show noi|se */..S|
|00001b40| 65 74 50 6f 72 74 28 77 | 69 6e 64 6f 77 29 3b 0d |etPort(w|indow);.|
|00001b50| 09 72 65 53 69 7a 65 3d | 30 3b 0d 09 77 68 69 6c |.reSize=|0;..whil|
|00001b60| 65 20 28 31 29 20 7b 0d | 09 09 77 53 74 61 74 65 |e (1) {.|..wState|
|00001b70| 44 61 74 61 3d 28 2a 28 | 28 57 53 74 61 74 65 44 |Data=(*(|(WStateD|
|00001b80| 61 74 61 20 2a 2a 29 28 | 28 57 69 6e 64 6f 77 50 |ata **)(|(WindowP|
|00001b90| 65 65 6b 29 77 69 6e 64 | 6f 77 29 2d 3e 64 61 74 |eek)wind|ow)->dat|
|00001ba0| 61 48 61 6e 64 6c 65 29 | 29 3b 0d 09 09 75 6e 7a |aHandle)|);...unz|
|00001bb0| 6f 6f 6d 65 64 52 65 63 | 74 3d 77 53 74 61 74 65 |oomedRec|t=wState|
|00001bc0| 44 61 74 61 2d 3e 75 73 | 65 72 53 74 61 74 65 3b |Data->us|erState;|
|00001bd0| 0d 09 09 7a 6f 6f 6d 65 | 64 4f 75 74 3d 5a 6f 6f |...zoome|dOut=Zoo|
|00001be0| 6d 65 64 4f 75 74 28 77 | 69 6e 64 6f 77 29 3b 0d |medOut(w|indow);.|
|00001bf0| 09 09 69 66 28 72 65 53 | 69 7a 65 29 7b 0d 09 09 |..if(reS|ize){...|
|00001c00| 09 53 69 7a 65 57 69 6e | 64 6f 77 28 77 69 6e 64 |.SizeWin|dow(wind|
|00001c10| 6f 77 2c 4c 6f 57 6f 72 | 64 28 72 65 53 69 7a 65 |ow,LoWor|d(reSize|
|00001c20| 29 2c 48 69 57 6f 72 64 | 28 72 65 53 69 7a 65 29 |),HiWord|(reSize)|
|00001c30| 2c 54 52 55 45 29 3b 0d | 09 09 09 72 65 53 69 7a |,TRUE);.|...reSiz|
|00001c40| 65 3d 30 4c 3b 0d 09 09 | 7d 0d 09 09 64 65 76 69 |e=0L;...|}...devi|
|00001c50| 63 65 3d 47 65 74 57 69 | 6e 64 6f 77 44 65 76 69 |ce=GetWi|ndowDevi|
|00001c60| 63 65 28 77 69 6e 64 6f | 77 29 3b 0d 09 09 69 66 |ce(windo|w);...if|
|00001c70| 28 64 65 76 69 63 65 3d | 3d 4e 55 4c 4c 29 7b 0d |(device=|=NULL){.|
|00001c80| 09 09 09 64 6f 6e 65 3d | 31 3b 0d 09 09 09 62 72 |...done=|1;....br|
|00001c90| 65 61 6b 3b 0d 09 09 7d | 0d 09 09 72 3d 77 69 6e |eak;...}|...r=win|
|00001ca0| 64 6f 77 2d 3e 70 6f 72 | 74 52 65 63 74 3b 0d 09 |dow->por|tRect;..|
|00001cb0| 09 4c 6f 63 61 6c 54 6f | 47 6c 6f 62 61 6c 52 65 |.LocalTo|GlobalRe|
|00001cc0| 63 74 28 26 72 29 3b 0d | 09 09 67 64 52 65 63 74 |ct(&r);.|..gdRect|
|00001cd0| 3d 28 2a 64 65 76 69 63 | 65 29 2d 3e 67 64 52 65 |=(*devic|e)->gdRe|
|00001ce0| 63 74 3b 0d 09 09 2f 2a | 20 6c 65 61 76 65 20 72 |ct;.../*| leave r|
|00001cf0| 6f 6f 6d 20 66 6f 72 20 | 77 69 6e 64 6f 77 27 73 |oom for |window's|
|00001d00| 20 74 69 74 6c 65 20 62 | 61 72 20 2a 2f 0d 09 09 | title b|ar */...|
|00001d10| 67 64 52 65 63 74 2e 74 | 6f 70 2b 3d 72 2e 74 6f |gdRect.t|op+=r.to|
|00001d20| 70 2d 31 2d 28 2a 28 28 | 57 69 6e 64 6f 77 50 65 |p-1-(*((|WindowPe|
|00001d30| 65 6b 29 77 69 6e 64 6f | 77 29 2d 3e 73 74 72 75 |ek)windo|w)->stru|
|00001d40| 63 52 67 6e 29 2d 3e 72 | 67 6e 42 42 6f 78 2e 74 |cRgn)->r|gnBBox.t|
|00001d50| 6f 70 3b 0d 09 09 2f 2a | 20 6c 65 61 76 65 20 72 |op;.../*| leave r|
|00001d60| 6f 6f 6d 20 66 6f 72 20 | 6d 65 6e 75 20 62 61 72 |oom for |menu bar|
|00001d70| 20 2a 2f 0d 09 09 69 66 | 28 64 65 76 69 63 65 3d | */...if|(device=|
|00001d80| 3d 47 65 74 4d 61 69 6e | 44 65 76 69 63 65 28 29 |=GetMain|Device()|
|00001d90| 29 67 64 52 65 63 74 2e | 74 6f 70 2b 3d 4c 4d 47 |)gdRect.|top+=LMG|
|00001da0| 65 74 4d 42 61 72 48 65 | 69 67 68 74 28 29 3b 0d |etMBarHe|ight();.|
|00001db0| 09 09 53 65 63 74 52 65 | 63 74 28 26 67 64 52 65 |..SectRe|ct(&gdRe|
|00001dc0| 63 74 2c 26 72 2c 26 72 | 29 3b 0d 09 09 70 69 78 |ct,&r,&r|);...pix|
|00001dd0| 65 6c 53 69 7a 65 3d 28 | 2a 2a 28 2a 2a 64 65 76 |elSize=(|**(**dev|
|00001de0| 69 63 65 29 2e 67 64 50 | 4d 61 70 29 2e 70 69 78 |ice).gdP|Map).pix|
|00001df0| 65 6c 53 69 7a 65 3b 0d | 09 09 69 3d 72 2e 6c 65 |elSize;.|..i=r.le|
|00001e00| 66 74 2d 28 2a 64 65 76 | 69 63 65 29 2d 3e 67 64 |ft-(*dev|ice)->gd|
|00001e10| 52 65 63 74 2e 6c 65 66 | 74 3b 0d 09 09 69 3d 28 |Rect.lef|t;...i=(|
|00001e20| 69 2a 70 69 78 65 6c 53 | 69 7a 65 2b 31 36 20 26 |i*pixelS|ize+16 &|
|00001e30| 20 7e 33 31 29 2f 70 69 | 78 65 6c 53 69 7a 65 2d | ~31)/pi|xelSize-|
|00001e40| 69 3b 09 2f 2a 20 6d 6f | 76 65 20 74 6f 20 6e 65 |i;./* mo|ve to ne|
|00001e50| 61 72 65 73 74 20 33 32 | 2d 62 69 74 20 62 6f 75 |arest 32|-bit bou|
|00001e60| 6e 64 61 72 79 20 2a 2f | 0d 09 09 4f 66 66 73 65 |ndary */|...Offse|
|00001e70| 74 52 65 63 74 28 26 72 | 2c 69 2c 30 29 3b 09 09 |tRect(&r|,i,0);..|
|00001e80| 09 09 09 09 2f 2a 20 41 | 73 73 75 6d 65 73 20 77 |..../* A|ssumes w|
|00001e90| 69 6e 64 6f 77 20 69 73 | 20 3e 31 36 20 62 69 74 |indow is| >16 bit|
|00001ea0| 73 20 77 69 64 65 20 2a | 2f 0d 09 09 53 65 63 74 |s wide *|/...Sect|
|00001eb0| 52 65 63 74 28 26 67 64 | 52 65 63 74 2c 26 72 2c |Rect(&gd|Rect,&r,|
|00001ec0| 26 72 29 3b 0d 09 09 4d | 6f 76 65 57 69 6e 64 6f |&r);...M|oveWindo|
|00001ed0| 77 28 77 69 6e 64 6f 77 | 2c 72 2e 6c 65 66 74 2c |w(window|,r.left,|
|00001ee0| 72 2e 74 6f 70 2c 54 52 | 55 45 29 3b 0d 09 09 4f |r.top,TR|UE);...O|
|00001ef0| 66 66 73 65 74 52 65 63 | 74 28 26 72 2c 2d 72 2e |ffsetRec|t(&r,-r.|
|00001f00| 6c 65 66 74 2c 2d 72 2e | 74 6f 70 29 3b 0d 09 09 |left,-r.|top);...|
|00001f10| 73 61 6e 64 20 3d 20 2a | 2a 28 2a 64 65 76 69 63 |sand = *|*(*devic|
|00001f20| 65 29 2d 3e 67 64 50 4d | 61 70 3b 09 2f 2a 20 49 |e)->gdPM|ap;./* I|
|00001f30| 6e 69 74 69 61 6c 69 7a | 65 20 50 69 78 4d 61 70 |nitializ|e PixMap|
|00001f40| 20 66 69 65 6c 64 73 20 | 66 72 6f 6d 20 73 63 72 | fields |from scr|
|00001f50| 65 65 6e 20 2a 2f 0d 09 | 09 73 61 6e 64 2e 62 6f |een */..|.sand.bo|
|00001f60| 75 6e 64 73 3d 72 3b 0d | 09 09 73 61 6e 64 2e 62 |unds=r;.|..sand.b|
|00001f70| 6f 75 6e 64 73 2e 72 69 | 67 68 74 20 20 2d 3d 53 |ounds.ri|ght -=S|
|00001f80| 43 52 4f 4c 4c 5f 42 41 | 52 3b 09 2f 2a 20 4c 65 |CROLL_BA|R;./* Le|
|00001f90| 61 76 65 20 72 6f 6f 6d | 20 66 6f 72 20 74 68 65 |ave room| for the|
|00001fa0| 20 73 63 72 6f 6c 6c 20 | 62 61 72 73 20 2a 2f 0d | scroll |bars */.|
|00001fb0| 09 09 73 61 6e 64 2e 62 | 6f 75 6e 64 73 2e 62 6f |..sand.b|ounds.bo|
|00001fc0| 74 74 6f 6d 20 2d 3d 53 | 43 52 4f 4c 4c 5f 42 41 |ttom -=S|CROLL_BA|
|00001fd0| 52 3b 0d 09 09 73 61 6e | 64 2e 62 6f 75 6e 64 73 |R;...san|d.bounds|
|00001fe0| 2e 72 69 67 68 74 3d 28 | 73 61 6e 64 2e 62 6f 75 |.right=(|sand.bou|
|00001ff0| 6e 64 73 2e 72 69 67 68 | 74 2a 73 61 6e 64 2e 70 |nds.righ|t*sand.p|
|00002000| 69 78 65 6c 53 69 7a 65 | 2b 31 34 20 26 20 7e 33 |ixelSize|+14 & ~3|
|00002010| 31 29 2f 73 61 6e 64 2e | 70 69 78 65 6c 53 69 7a |1)/sand.|pixelSiz|
|00002020| 65 3b 0d 09 09 09 2f 2a | 20 72 6f 75 6e 64 20 74 |e;..../*| round t|
|00002030| 6f 20 6d 75 6c 74 69 70 | 6c 65 20 6f 66 20 33 32 |o multip|le of 32|
|00002040| 20 62 69 74 73 20 2a 2f | 0d 09 09 69 66 28 73 61 | bits */|...if(sa|
|00002050| 6e 64 2e 62 6f 75 6e 64 | 73 2e 72 69 67 68 74 3c |nd.bound|s.right<|
|00002060| 33 32 29 73 61 6e 64 2e | 62 6f 75 6e 64 73 2e 72 |32)sand.|bounds.r|
|00002070| 69 67 68 74 3d 33 32 3b | 0d 09 09 73 61 6e 64 2e |ight=32;|...sand.|
|00002080| 72 6f 77 42 79 74 65 73 | 20 3d 20 28 73 61 6e 64 |rowBytes| = (sand|
|00002090| 2e 62 6f 75 6e 64 73 2e | 72 69 67 68 74 2a 73 61 |.bounds.|right*sa|
|000020a0| 6e 64 2e 70 69 78 65 6c | 53 69 7a 65 20 2b 20 33 |nd.pixel|Size + 3|
|000020b0| 31 20 26 20 7e 33 31 29 | 2f 38 3b 0d 09 09 09 2f |1 & ~31)|/8;..../|
|000020c0| 2a 20 72 6f 75 6e 64 20 | 75 70 20 74 6f 20 6d 75 |* round |up to mu|
|000020d0| 6c 74 69 70 6c 65 20 6f | 66 20 33 32 20 62 69 74 |ltiple o|f 32 bit|
|000020e0| 73 20 28 72 65 64 75 6e | 64 61 6e 74 29 20 2a 2f |s (redun|dant) */|
|000020f0| 0d 09 09 73 61 6e 64 42 | 79 74 65 73 20 3d 20 28 |...sandB|ytes = (|
|00002100| 73 69 7a 65 5f 74 29 20 | 73 61 6e 64 2e 72 6f 77 |size_t) |sand.row|
|00002110| 42 79 74 65 73 20 2a 20 | 28 73 69 7a 65 5f 74 29 |Bytes * |(size_t)|
|00002120| 20 73 61 6e 64 2e 62 6f | 75 6e 64 73 2e 62 6f 74 | sand.bo|unds.bot|
|00002130| 74 6f 6d 3b 0d 09 09 69 | 66 28 62 75 66 66 65 72 |tom;...i|f(buffer|
|00002140| 42 79 74 65 73 2f 32 20 | 3c 20 73 61 6e 64 42 79 |Bytes/2 |< sandBy|
|00002150| 74 65 73 29 0d 09 09 7b | 0d 09 09 09 2f 2a 20 72 |tes)...{|..../* r|
|00002160| 65 73 74 72 69 63 74 20 | 68 65 69 67 68 74 20 62 |estrict |height b|
|00002170| 79 20 61 6d 6f 75 6e 74 | 20 6f 66 20 6e 6f 69 73 |y amount| of nois|
|00002180| 65 20 61 76 61 69 6c 61 | 62 6c 65 20 2a 2f 0d 09 |e availa|ble */..|
|00002190| 09 09 73 61 6e 64 2e 62 | 6f 75 6e 64 73 2e 62 6f |..sand.b|ounds.bo|
|000021a0| 74 74 6f 6d 3d 62 75 66 | 66 65 72 42 79 74 65 73 |ttom=buf|ferBytes|
|000021b0| 2f 73 61 6e 64 2e 72 6f | 77 42 79 74 65 73 2f 32 |/sand.ro|wBytes/2|
|000021c0| 3b 0d 09 09 09 73 61 6e | 64 42 79 74 65 73 20 3d |;....san|dBytes =|
|000021d0| 20 28 73 69 7a 65 5f 74 | 29 20 73 61 6e 64 2e 72 | (size_t|) sand.r|
|000021e0| 6f 77 42 79 74 65 73 20 | 2a 20 28 73 69 7a 65 5f |owBytes |* (size_|
|000021f0| 74 29 20 73 61 6e 64 2e | 62 6f 75 6e 64 73 2e 62 |t) sand.|bounds.b|
|00002200| 6f 74 74 6f 6d 3b 0d 09 | 09 7d 09 0d 09 09 73 61 |ottom;..|.}....sa|
|00002210| 6e 64 2e 72 6f 77 42 79 | 74 65 73 20 7c 3d 20 30 |nd.rowBy|tes |= 0|
|00002220| 78 38 30 30 30 3b 09 2f | 2a 20 4d 61 72 6b 20 69 |x8000;./|* Mark i|
|00002230| 74 20 61 73 20 61 20 50 | 69 78 4d 61 70 20 2a 2f |t as a P|ixMap */|
|00002240| 0d 09 09 73 61 6e 64 2e | 70 6d 56 65 72 73 69 6f |...sand.|pmVersio|
|00002250| 6e 3d 30 3b 0d 09 09 73 | 61 6e 64 2e 70 61 63 6b |n=0;...s|and.pack|
|00002260| 54 79 70 65 3d 30 3b 0d | 09 09 73 61 6e 64 2e 70 |Type=0;.|..sand.p|
|00002270| 61 63 6b 53 69 7a 65 3d | 30 3b 0d 09 09 73 61 6e |ackSize=|0;...san|
|00002280| 64 2e 70 6c 61 6e 65 42 | 79 74 65 73 3d 30 3b 0d |d.planeB|ytes=0;.|
|00002290| 09 09 73 61 6e 64 2e 70 | 6d 52 65 73 65 72 76 65 |..sand.p|mReserve|
|000022a0| 64 3d 30 3b 0d 09 09 53 | 69 7a 65 57 69 6e 64 6f |d=0;...S|izeWindo|
|000022b0| 77 28 77 69 6e 64 6f 77 | 0d 09 09 09 2c 73 61 6e |w(window|....,san|
|000022c0| 64 2e 62 6f 75 6e 64 73 | 2e 72 69 67 68 74 2b 53 |d.bounds|.right+S|
|000022d0| 43 52 4f 4c 4c 5f 42 41 | 52 2c 73 61 6e 64 2e 62 |CROLL_BA|R,sand.b|
|000022e0| 6f 75 6e 64 73 2e 62 6f | 74 74 6f 6d 2b 53 43 52 |ounds.bo|ttom+SCR|
|000022f0| 4f 4c 4c 5f 42 41 52 2c | 54 52 55 45 29 3b 0d 09 |OLL_BAR,|TRUE);..|
|00002300| 09 45 72 61 73 65 52 65 | 63 74 28 26 77 69 6e 64 |.EraseRe|ct(&wind|
|00002310| 6f 77 2d 3e 70 6f 72 74 | 52 65 63 74 29 3b 0d 09 |ow->port|Rect);..|
|00002320| 09 44 72 61 77 47 72 6f | 77 49 63 6f 6e 28 77 69 |.DrawGro|wIcon(wi|
|00002330| 6e 64 6f 77 29 3b 0d 09 | 09 69 66 28 7a 6f 6f 6d |ndow);..|.if(zoom|
|00002340| 65 64 4f 75 74 20 26 26 | 20 77 69 6e 64 6f 77 45 |edOut &&| windowE|
|00002350| 76 65 6e 74 21 3d 69 6e | 47 72 6f 77 20 26 26 20 |vent!=in|Grow && |
|00002360| 77 69 6e 64 6f 77 45 76 | 65 6e 74 21 3d 69 6e 44 |windowEv|ent!=inD|
|00002370| 72 61 67 29 7b 0d 09 09 | 09 77 53 74 61 74 65 44 |rag){...|.wStateD|
|00002380| 61 74 61 3d 28 2a 28 28 | 57 53 74 61 74 65 44 61 |ata=(*((|WStateDa|
|00002390| 74 61 20 2a 2a 29 28 28 | 57 69 6e 64 6f 77 50 65 |ta **)((|WindowPe|
|000023a0| 65 6b 29 77 69 6e 64 6f | 77 29 2d 3e 64 61 74 61 |ek)windo|w)->data|
|000023b0| 48 61 6e 64 6c 65 29 29 | 3b 0d 09 09 09 72 3d 77 |Handle))|;....r=w|
|000023c0| 69 6e 64 6f 77 2d 3e 70 | 6f 72 74 52 65 63 74 3b |indow->p|ortRect;|
|000023d0| 0d 09 09 09 4c 6f 63 61 | 6c 54 6f 47 6c 6f 62 61 |....Loca|lToGloba|
|000023e0| 6c 52 65 63 74 28 26 72 | 29 3b 0d 09 09 09 72 2e |lRect(&r|);....r.|
|000023f0| 6c 65 66 74 2d 3d 31 3b | 0d 09 09 09 72 2e 72 69 |left-=1;|....r.ri|
|00002400| 67 68 74 2d 3d 32 3b 0d | 09 09 09 77 53 74 61 74 |ght-=2;.|...wStat|
|00002410| 65 44 61 74 61 2d 3e 73 | 74 64 53 74 61 74 65 3d |eData->s|tdState=|
|00002420| 72 3b 09 09 0d 09 09 09 | 77 53 74 61 74 65 44 61 |r;......|wStateDa|
|00002430| 74 61 2d 3e 75 73 65 72 | 53 74 61 74 65 3d 75 6e |ta->user|State=un|
|00002440| 7a 6f 6f 6d 65 64 52 65 | 63 74 3b 0d 09 09 7d 0d |zoomedRe|ct;...}.|
|00002450| 09 09 73 70 72 69 6e 74 | 66 28 73 74 72 69 6e 67 |..sprint|f(string|
|00002460| 2c 22 25 64 78 25 64 78 | 25 64 20 62 69 74 73 22 |,"%dx%dx|%d bits"|
|00002470| 0d 09 09 09 2c 28 69 6e | 74 29 73 61 6e 64 2e 62 |....,(in|t)sand.b|
|00002480| 6f 75 6e 64 73 2e 72 69 | 67 68 74 2c 28 69 6e 74 |ounds.ri|ght,(int|
|00002490| 29 73 61 6e 64 2e 62 6f | 75 6e 64 73 2e 62 6f 74 |)sand.bo|unds.bot|
|000024a0| 74 6f 6d 2c 28 69 6e 74 | 29 73 61 6e 64 2e 70 69 |tom,(int|)sand.pi|
|000024b0| 78 65 6c 53 69 7a 65 29 | 3b 0d 09 09 53 65 74 57 |xelSize)|;...SetW|
|000024c0| 54 69 74 6c 65 28 77 69 | 6e 64 6f 77 2c 63 32 70 |Title(wi|ndow,c2p|
|000024d0| 73 74 72 28 73 74 72 69 | 6e 67 29 29 3b 0d 09 09 |str(stri|ng));...|
|000024e0| 46 6c 75 73 68 45 76 65 | 6e 74 73 28 65 76 65 72 |FlushEve|nts(ever|
|000024f0| 79 45 76 65 6e 74 2c 30 | 29 3b 0d 09 09 44 69 66 |yEvent,0|);...Dif|
|00002500| 66 52 67 6e 28 47 65 74 | 47 72 61 79 52 67 6e 28 |fRgn(Get|GrayRgn(|
|00002510| 29 2c 28 28 57 69 6e 64 | 6f 77 50 65 65 6b 29 77 |),((Wind|owPeek)w|
|00002520| 69 6e 64 6f 77 29 2d 3e | 73 74 72 75 63 52 67 6e |indow)->|strucRgn|
|00002530| 2c 69 67 6e 6f 72 65 52 | 67 6e 29 3b 0d 09 09 77 |,ignoreR|gn);...w|
|00002540| 68 69 6c 65 20 28 31 29 | 20 7b 0d 09 09 09 75 70 |hile (1)| {....up|
|00002550| 64 61 74 65 3d 30 3b 09 | 09 09 2f 2a 20 64 6f 6e |date=0;.|../* don|
|00002560| 27 74 20 75 70 64 61 74 | 65 20 77 69 6e 64 6f 77 |'t updat|e window|
|00002570| 20 66 72 61 6d 65 20 75 | 6e 6c 65 73 73 20 6e 65 | frame u|nless ne|
|00002580| 63 65 73 73 61 72 79 20 | 2a 2f 0d 09 09 09 23 69 |cessary |*/....#i|
|00002590| 66 20 52 41 49 53 45 5f | 50 52 49 4f 52 49 54 59 |f RAISE_|PRIORITY|
|000025a0| 0d 09 09 09 09 53 65 74 | 50 72 69 6f 72 69 74 79 |.....Set|Priority|
|000025b0| 28 32 29 3b 09 2f 2a 20 | 47 65 74 20 6d 6f 72 65 |(2);./* |Get more|
|000025c0| 20 73 70 65 65 64 20 62 | 79 20 73 75 70 70 72 65 | speed b|y suppre|
|000025d0| 73 73 69 6e 67 20 6b 65 | 79 62 6f 61 72 64 2c 20 |ssing ke|yboard, |
|000025e0| 6d 6f 75 73 65 2c 20 61 | 6e 64 20 74 69 63 6b 73 |mouse, a|nd ticks|
|000025f0| 2e 20 2a 2f 0d 09 09 09 | 23 65 6e 64 69 66 0d 09 |. */....|#endif..|
|00002600| 09 09 73 61 6e 64 2e 62 | 61 73 65 41 64 64 72 20 |..sand.b|aseAddr |
|00002610| 3d 20 62 75 66 66 65 72 | 2e 62 61 73 65 41 64 64 |= buffer|.baseAdd|
|00002620| 72 3b 0d 09 09 09 2f 2a | 20 63 68 6f 6f 73 65 20 |r;..../*| choose |
|00002630| 67 72 61 69 6e 20 74 68 | 61 74 20 77 6f 6e 27 74 |grain th|at won't|
|00002640| 20 6f 76 65 72 66 6c 6f | 77 20 73 68 6f 72 74 20 | overflo|w short |
|00002650| 61 72 67 75 6d 65 6e 74 | 20 74 6f 20 6e 72 61 6e |argument| to nran|
|00002660| 64 28 29 20 2a 2f 0d 09 | 09 09 69 3d 28 62 75 66 |d() */..|..i=(buf|
|00002670| 66 65 72 42 79 74 65 73 | 2f 53 48 52 54 5f 4d 41 |ferBytes|/SHRT_MA|
|00002680| 58 2b 33 29 26 7e 33 3b | 09 2f 2a 20 72 6f 75 6e |X+3)&~3;|./* roun|
|00002690| 64 20 75 70 20 74 6f 20 | 6d 75 6c 74 69 70 6c 65 |d up to |multiple|
|000026a0| 20 6f 66 20 34 20 2a 2f | 0d 09 09 09 73 61 6e 64 | of 4 */|....sand|
|000026b0| 2e 62 61 73 65 41 64 64 | 72 20 2b 3d 20 6e 72 61 |.baseAdd|r += nra|
|000026c0| 6e 64 28 28 62 75 66 66 | 65 72 42 79 74 65 73 2d |nd((buff|erBytes-|
|000026d0| 73 61 6e 64 42 79 74 65 | 73 29 2f 69 29 2a 28 6c |sandByte|s)/i)*(l|
|000026e0| 6f 6e 67 29 69 3b 0d 09 | 09 09 69 66 28 28 28 57 |ong)i;..|..if(((W|
|000026f0| 69 6e 64 6f 77 50 65 65 | 6b 29 77 69 6e 64 6f 77 |indowPee|k)window|
|00002700| 29 2d 3e 68 69 6c 69 74 | 65 64 29 7b 0d 09 09 09 |)->hilit|ed){....|
|00002710| 09 2f 2f 20 53 68 69 65 | 6c 64 43 75 72 73 6f 72 |.// Shie|ldCursor|
|00002720| 20 74 65 6c 6c 73 20 6e | 6f 6e 73 74 61 6e 64 61 | tells n|onstanda|
|00002730| 72 64 20 76 69 64 65 6f | 20 64 65 76 69 63 65 73 |rd video| devices|
|00002740| 20 77 68 69 63 68 20 70 | 69 78 65 6c 73 20 6d 61 | which p|ixels ma|
|00002750| 79 20 63 68 61 6e 67 65 | 2e 0d 09 09 09 09 70 74 |y change|......pt|
|00002760| 2e 68 3d 70 74 2e 76 3d | 30 3b 0d 09 09 09 09 4c |.h=pt.v=|0;.....L|
|00002770| 6f 63 61 6c 54 6f 47 6c | 6f 62 61 6c 28 26 70 74 |ocalToGl|obal(&pt|
|00002780| 29 3b 0d 09 09 09 09 53 | 68 69 65 6c 64 43 75 72 |);.....S|hieldCur|
|00002790| 73 6f 72 28 26 73 61 6e | 64 2e 62 6f 75 6e 64 73 |sor(&san|d.bounds|
|000027a0| 2c 70 74 29 3b 0d 09 09 | 09 09 43 6f 70 79 42 69 |,pt);...|..CopyBi|
|000027b0| 74 73 51 75 69 63 6b 6c | 79 28 28 42 69 74 4d 61 |tsQuickl|y((BitMa|
|000027c0| 70 20 2a 29 26 73 61 6e | 64 2c 28 42 69 74 4d 61 |p *)&san|d,(BitMa|
|000027d0| 70 20 2a 29 2a 6d 79 50 | 69 78 4d 61 70 48 61 6e |p *)*myP|ixMapHan|
|000027e0| 64 6c 65 0d 09 09 09 09 | 09 2c 26 73 61 6e 64 2e |dle.....|.,&sand.|
|000027f0| 62 6f 75 6e 64 73 2c 26 | 73 61 6e 64 2e 62 6f 75 |bounds,&|sand.bou|
|00002800| 6e 64 73 2c 73 72 63 43 | 6f 70 79 2c 4e 55 4c 4c |nds,srcC|opy,NULL|
|00002810| 29 3b 0d 09 09 09 09 53 | 68 6f 77 43 75 72 73 6f |);.....S|howCurso|
|00002820| 72 28 29 3b 0d 09 09 09 | 7d 0d 09 09 09 23 69 66 |r();....|}....#if|
|00002830| 20 52 41 49 53 45 5f 50 | 52 49 4f 52 49 54 59 0d | RAISE_P|RIORITY.|
|00002840| 09 09 09 09 53 65 74 50 | 72 69 6f 72 69 74 79 28 |....SetP|riority(|
|00002850| 30 29 3b 09 2f 2a 20 52 | 65 76 69 76 65 20 6b 65 |0);./* R|evive ke|
|00002860| 79 62 6f 61 72 64 20 61 | 6e 64 20 6d 6f 75 73 65 |yboard a|nd mouse|
|00002870| 2e 20 2a 2f 0d 09 09 09 | 23 65 6e 64 69 66 0d 09 |. */....|#endif..|
|00002880| 09 09 23 69 66 20 57 41 | 49 54 5f 4e 45 58 54 5f |..#if WA|IT_NEXT_|
|00002890| 45 56 45 4e 54 0d 20 20 | 20 09 09 09 69 66 28 57 |EVENT. | ...if(W|
|000028a0| 61 69 74 4e 65 78 74 45 | 76 65 6e 74 28 6d 44 6f |aitNextE|vent(mDo|
|000028b0| 77 6e 4d 61 73 6b 2b 6b | 65 79 44 6f 77 6e 4d 61 |wnMask+k|eyDownMa|
|000028c0| 73 6b 2c 26 65 76 65 6e | 74 2c 30 2c 69 67 6e 6f |sk,&even|t,0,igno|
|000028d0| 72 65 52 67 6e 29 29 7b | 0d 20 20 20 09 09 09 23 |reRgn)){|. ...#|
|000028e0| 65 6c 73 65 0d 20 20 20 | 09 09 09 69 66 28 47 65 |else. |...if(Ge|
|000028f0| 74 4e 65 78 74 45 76 65 | 6e 74 28 6d 44 6f 77 6e |tNextEve|nt(mDown|
|00002900| 4d 61 73 6b 2b 6b 65 79 | 44 6f 77 6e 4d 61 73 6b |Mask+key|DownMask|
|00002910| 2c 26 65 76 65 6e 74 29 | 29 7b 0d 20 20 20 09 09 |,&event)|){. ..|
|00002920| 09 23 65 6e 64 69 66 0d | 09 09 09 09 73 77 69 74 |.#endif.|....swit|
|00002930| 63 68 28 65 76 65 6e 74 | 2e 77 68 61 74 29 7b 0d |ch(event|.what){.|
|00002940| 09 09 09 09 63 61 73 65 | 20 6b 65 79 44 6f 77 6e |....case| keyDown|
|00002950| 3a 0d 09 09 09 09 09 69 | 66 28 65 76 65 6e 74 2e |:......i|f(event.|
|00002960| 6d 6f 64 69 66 69 65 72 | 73 20 26 20 63 6d 64 4b |modifier|s & cmdK|
|00002970| 65 79 29 20 73 77 69 74 | 63 68 28 65 76 65 6e 74 |ey) swit|ch(event|
|00002980| 2e 6d 65 73 73 61 67 65 | 20 26 20 63 68 61 72 43 |.message| & charC|
|00002990| 6f 64 65 4d 61 73 6b 29 | 20 7b 0d 09 09 09 09 09 |odeMask)| {......|
|000029a0| 09 63 61 73 65 20 27 2e | 27 3a 0d 09 09 09 09 09 |.case '.|':......|
|000029b0| 09 63 61 73 65 20 27 77 | 27 3a 0d 09 09 09 09 09 |.case 'w|':......|
|000029c0| 09 64 6f 6e 65 3d 31 3b | 0d 09 09 09 09 09 7d 0d |.done=1;|......}.|
|000029d0| 09 09 09 09 09 62 72 65 | 61 6b 3b 0d 09 09 09 09 |.....bre|ak;.....|
|000029e0| 63 61 73 65 20 6d 6f 75 | 73 65 44 6f 77 6e 3a 0d |case mou|seDown:.|
|000029f0| 09 09 09 09 09 75 70 64 | 61 74 65 3d 31 3b 0d 09 |.....upd|ate=1;..|
|00002a00| 09 09 09 09 77 69 6e 64 | 6f 77 45 76 65 6e 74 3d |....wind|owEvent=|
|00002a10| 46 69 6e 64 57 69 6e 64 | 6f 77 28 65 76 65 6e 74 |FindWind|ow(event|
|00002a20| 2e 77 68 65 72 65 2c 26 | 61 57 69 6e 64 6f 77 29 |.where,&|aWindow)|
|00002a30| 3b 0d 09 09 09 09 09 69 | 66 28 61 57 69 6e 64 6f |;......i|f(aWindo|
|00002a40| 77 3d 3d 77 69 6e 64 6f | 77 29 7b 0d 09 09 09 09 |w==windo|w){.....|
|00002a50| 09 09 73 77 69 74 63 68 | 28 77 69 6e 64 6f 77 45 |..switch|(windowE|
|00002a60| 76 65 6e 74 29 7b 0d 09 | 09 09 09 09 09 63 61 73 |vent){..|.....cas|
|00002a70| 65 20 69 6e 44 72 61 67 | 3a 0d 09 09 09 09 09 09 |e inDrag|:.......|
|00002a80| 09 44 72 61 67 57 69 6e | 64 6f 77 28 77 69 6e 64 |.DragWin|dow(wind|
|00002a90| 6f 77 2c 65 76 65 6e 74 | 2e 77 68 65 72 65 2c 26 |ow,event|.where,&|
|00002aa0| 71 64 2e 73 63 72 65 65 | 6e 42 69 74 73 2e 62 6f |qd.scree|nBits.bo|
|00002ab0| 75 6e 64 73 29 3b 0d 09 | 09 09 09 09 09 09 62 72 |unds);..|......br|
|00002ac0| 65 61 6b 3b 0d 09 09 09 | 09 09 09 63 61 73 65 20 |eak;....|...case |
|00002ad0| 69 6e 47 6f 41 77 61 79 | 3a 0d 09 09 09 09 09 09 |inGoAway|:.......|
|00002ae0| 09 64 6f 6e 65 3d 54 72 | 61 63 6b 47 6f 41 77 61 |.done=Tr|ackGoAwa|
|00002af0| 79 28 77 69 6e 64 6f 77 | 2c 65 76 65 6e 74 2e 77 |y(window|,event.w|
|00002b00| 68 65 72 65 29 3b 0d 09 | 09 09 09 09 09 09 62 72 |here);..|......br|
|00002b10| 65 61 6b 3b 0d 09 09 09 | 09 09 09 63 61 73 65 20 |eak;....|...case |
|00002b20| 69 6e 47 72 6f 77 3a 0d | 09 09 09 09 09 09 09 72 |inGrow:.|.......r|
|00002b30| 2e 74 6f 70 3d 72 2e 6c | 65 66 74 3d 33 32 2b 53 |.top=r.l|eft=32+S|
|00002b40| 43 52 4f 4c 4c 5f 42 41 | 52 3b 09 2f 2a 20 6d 69 |CROLL_BA|R;./* mi|
|00002b50| 6e 69 6d 75 6d 20 73 69 | 7a 65 20 2a 2f 0d 09 09 |nimum si|ze */...|
|00002b60| 09 09 09 09 09 72 2e 62 | 6f 74 74 6f 6d 3d 72 2e |.....r.b|ottom=r.|
|00002b70| 72 69 67 68 74 3d 31 30 | 32 34 2b 53 43 52 4f 4c |right=10|24+SCROL|
|00002b80| 4c 5f 42 41 52 3b 09 2f | 2a 20 6d 61 78 20 73 69 |L_BAR;./|* max si|
|00002b90| 7a 65 20 2a 2f 0d 09 09 | 09 09 09 09 09 72 65 53 |ze */...|.....reS|
|00002ba0| 69 7a 65 20 3d 20 47 72 | 6f 77 57 69 6e 64 6f 77 |ize = Gr|owWindow|
|00002bb0| 28 77 69 6e 64 6f 77 2c | 65 76 65 6e 74 2e 77 68 |(window,|event.wh|
|00002bc0| 65 72 65 2c 26 72 29 3b | 0d 09 09 09 09 09 09 09 |ere,&r);|........|
|00002bd0| 62 72 65 61 6b 3b 0d 09 | 09 09 09 09 09 63 61 73 |break;..|.....cas|
|00002be0| 65 20 69 6e 5a 6f 6f 6d | 49 6e 3a 0d 09 09 09 09 |e inZoom|In:.....|
|00002bf0| 09 09 63 61 73 65 20 69 | 6e 5a 6f 6f 6d 4f 75 74 |..case i|nZoomOut|
|00002c00| 3a 0d 09 09 09 09 09 09 | 09 5a 6f 6f 6d 28 77 69 |:.......|.Zoom(wi|
|00002c10| 6e 64 6f 77 2c 77 69 6e | 64 6f 77 45 76 65 6e 74 |ndow,win|dowEvent|
|00002c20| 2c 26 65 76 65 6e 74 29 | 3b 0d 09 09 09 09 09 09 |,&event)|;.......|
|00002c30| 09 62 72 65 61 6b 3b 0d | 09 09 09 09 09 09 63 61 |.break;.|......ca|
|00002c40| 73 65 20 69 6e 43 6f 6e | 74 65 6e 74 3a 0d 09 09 |se inCon|tent:...|
|00002c50| 09 09 09 09 09 62 72 65 | 61 6b 3b 0d 09 09 09 09 |.....bre|ak;.....|
|00002c60| 09 09 64 65 66 61 75 6c | 74 3a 0d 09 09 09 09 09 |..defaul|t:......|
|00002c70| 09 09 75 70 64 61 74 65 | 3d 30 3b 0d 09 09 09 09 |..update|=0;.....|
|00002c80| 09 09 09 62 72 65 61 6b | 3b 0d 09 09 09 09 09 09 |...break|;.......|
|00002c90| 7d 0d 09 09 09 09 09 09 | 62 72 65 61 6b 3b 0d 09 |}.......|break;..|
|00002ca0| 09 09 09 09 7d 0d 09 09 | 09 09 09 62 72 65 61 6b |....}...|...break|
|00002cb0| 3b 0d 09 09 09 09 7d 0d | 09 09 09 7d 09 09 09 0d |;.....}.|...}....|
|00002cc0| 09 09 09 69 66 28 75 70 | 64 61 74 65 20 7c 7c 20 |...if(up|date || |
|00002cd0| 64 6f 6e 65 29 62 72 65 | 61 6b 3b 0d 09 09 7d 0d |done)bre|ak;...}.|
|00002ce0| 09 09 69 66 28 64 6f 6e | 65 29 62 72 65 61 6b 3b |..if(don|e)break;|
|00002cf0| 0d 09 7d 0d 09 53 65 74 | 50 6f 72 74 28 6f 6c 64 |..}..Set|Port(old|
|00002d00| 50 6f 72 74 29 3b 0d 09 | 44 69 73 70 6f 73 65 52 |Port);..|DisposeR|
|00002d10| 67 6e 28 69 67 6e 6f 72 | 65 52 67 6e 29 3b 0d 09 |gn(ignor|eRgn);..|
|00002d20| 44 69 73 70 6f 73 50 74 | 72 28 62 75 66 66 65 72 |DisposPt|r(buffer|
|00002d30| 2e 62 61 73 65 41 64 64 | 72 29 3b 0d 09 44 69 73 |.baseAdd|r);..Dis|
|00002d40| 70 6f 73 65 57 69 6e 64 | 6f 77 28 77 69 6e 64 6f |poseWind|ow(windo|
|00002d50| 77 29 3b 0d 7d 0d 0d 42 | 6f 6f 6c 65 61 6e 20 5a |w);.}..B|oolean Z|
|00002d60| 6f 6f 6d 65 64 4f 75 74 | 28 57 69 6e 64 6f 77 50 |oomedOut|(WindowP|
|00002d70| 74 72 20 77 29 0d 2f 2a | 20 44 65 74 65 72 6d 69 |tr w)./*| Determi|
|00002d80| 6e 65 20 77 68 65 74 68 | 65 72 20 77 69 6e 64 6f |ne wheth|er windo|
|00002d90| 77 20 69 73 20 22 73 74 | 61 6e 64 61 72 64 22 20 |w is "st|andard" |
|00002da0| 73 69 7a 65 2c 20 69 2e | 65 2e 20 7a 6f 6f 6d 65 |size, i.|e. zoome|
|00002db0| 64 20 6f 75 74 2e 20 2a | 2f 0d 7b 0d 09 50 6f 69 |d out. *|/.{..Poi|
|00002dc0| 6e 74 20 70 74 3b 0d 09 | 52 65 63 74 20 72 2c 6d |nt pt;..|Rect r,m|
|00002dd0| 79 52 65 63 74 3b 0d 09 | 42 6f 6f 6c 65 61 6e 20 |yRect;..|Boolean |
|00002de0| 7a 6f 6f 6d 65 64 4f 75 | 74 3b 0d 09 0d 09 6d 79 |zoomedOu|t;....my|
|00002df0| 52 65 63 74 3d 28 2a 28 | 28 57 53 74 61 74 65 44 |Rect=(*(|(WStateD|
|00002e00| 61 74 61 20 2a 2a 29 28 | 28 57 69 6e 64 6f 77 50 |ata **)(|(WindowP|
|00002e10| 65 65 6b 29 77 29 2d 3e | 64 61 74 61 48 61 6e 64 |eek)w)->|dataHand|
|00002e20| 6c 65 29 29 2d 3e 73 74 | 64 53 74 61 74 65 3b 0d |le))->st|dState;.|
|00002e30| 09 70 74 2e 68 3d 30 3b | 0d 09 70 74 2e 76 3d 30 |.pt.h=0;|..pt.v=0|
|00002e40| 3b 0d 09 4c 6f 63 61 6c | 54 6f 47 6c 6f 62 61 6c |;..Local|ToGlobal|
|00002e50| 28 26 70 74 29 3b 0d 09 | 72 3d 77 2d 3e 70 6f 72 |(&pt);..|r=w->por|
|00002e60| 74 52 65 63 74 3b 0d 09 | 4f 66 66 73 65 74 52 65 |tRect;..|OffsetRe|
|00002e70| 63 74 28 26 72 2c 70 74 | 2e 68 2c 70 74 2e 76 29 |ct(&r,pt|.h,pt.v)|
|00002e80| 3b 0d 09 7a 6f 6f 6d 65 | 64 4f 75 74 3d 20 72 2e |;..zoome|dOut= r.|
|00002e90| 74 6f 70 3d 3d 6d 79 52 | 65 63 74 2e 74 6f 70 0d |top==myR|ect.top.|
|00002ea0| 09 09 26 26 20 72 2e 6c | 65 66 74 3d 3d 6d 79 52 |..&& r.l|eft==myR|
|00002eb0| 65 63 74 2e 6c 65 66 74 | 0d 09 09 26 26 20 72 2e |ect.left|...&& r.|
|00002ec0| 62 6f 74 74 6f 6d 3d 3d | 6d 79 52 65 63 74 2e 62 |bottom==|myRect.b|
|00002ed0| 6f 74 74 6f 6d 0d 09 09 | 26 26 20 72 2e 72 69 67 |ottom...|&& r.rig|
|00002ee0| 68 74 3d 3d 6d 79 52 65 | 63 74 2e 72 69 67 68 74 |ht==myRe|ct.right|
|00002ef0| 3b 0d 09 72 65 74 75 72 | 6e 20 7a 6f 6f 6d 65 64 |;..retur|n zoomed|
|00002f00| 4f 75 74 3b 0d 7d 00 00 | 00 00 00 00 00 00 00 00 |Out;.}..|........|
|00002f10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002f80| 00 00 01 00 00 00 04 46 | 00 00 03 46 00 00 00 86 |.......F|...F....|
|00002f90| 6e 00 18 fe aa 42 6e fe | b0 42 67 48 6e fe 94 42 |n....Bn.|.BgHn..B|
|00002fa0| 67 4e ba 04 72 3d 5f fe | 92 4a 6e fe 92 66 0a 20 |gN..r=_.|.Jn..f. |
|00002fb0| 0b 53 61 6e 64 73 74 6f | 72 6d 2e 63 02 00 00 00 |.Sandsto|rm.c....|
|00002fc0| 54 45 58 54 43 57 49 45 | 01 00 00 3c 00 60 00 00 |TEXTCWIE|...<.`..|
|00002fd0| 00 00 54 45 58 54 43 57 | 49 45 01 00 00 3c 00 60 |..TEXTCW|IE...<.`|
|00002fe0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ff0| 00 00 a0 74 26 80 00 00 | 2e 86 00 00 04 cc 01 42 |...t&...|.......B|
|00003000| 2e fe f6 41 ee fe f6 2d | 48 fe 9c 3d 7c ff ff fe |...A...-|H..=|...|
|00003010| a0 3d 46 fe a6 2d 6e ff | f6 fe ba 42 67 48 6e fe |.=F..-n.|...BgHn.|
|00003020| 8a 42 67 4e ba 03 f0 3a | 1f 4a 45 57 c0 2f 00 42 |.BgN...:|.JEW./.B|
|00003030| 67 48 6e fe a8 72 03 2f | 01 a8 5d 12 1f 20 1f 0a |gHn..r./|..].. ..|
|00003040| 01 00 01 c0 01 41 ee fe | aa 43 fa 00 72 72 03 b1 |.....A..|.C..rr..|
|00003050| 09 56 c9 ff fc 57 c1 c0 | 01 67 48 2f 0c 48 7a 00 |.V...W..|.gH/.Hz.|
|00003060| 5a a9 33 2f 0b 48 7a 00 | 52 a9 33 2f 0c 3f 07 48 |Z.3/.Hz.|R.3/.?.H|
|00003070| 6e fe f6 a9 47 2f 0b 3f | 07 48 6e fe f6 a9 47 70 |n...G/.?|.Hn...Gp|
|00003080| 00 00 00 1e 00 3c 00 24 | 01 8d 02 3d 00 3c 00 24 |.....<.$|...=.<.$|
|00003090| 01 8d 02 3d 00 00 0e b7 | 00 00 00 00 00 00 00 00 |...=....|........|
|000030a0| 00 00 00 00 00 14 00 00 | 0f 04 00 4b 00 00 00 00 |........|...K....|
|000030b0| 00 00 21 43 ff ff 00 00 | 00 00 00 00 02 8e 00 0f |..!C....|........|
|000030c0| 00 16 00 00 21 91 00 df | 00 bd d9 5c 00 00 07 73 |....!...|...\...s|
|000030d0| 72 63 43 6f 70 79 00 22 | 00 00 22 c8 00 e5 00 bd |rcCopy."|..".....|
|000030e0| d9 4c 80 00 00 2a 03 d2 | 01 0a 04 ec 94 20 00 00 |.L...*..|..... ..|
|000030f0| 00 00 00 00 03 70 74 20 | 00 2e 00 00 22 c8 00 e5 |.....pt |...."...|
|00003100| 00 bd d8 f4 00 00 1f 28 | 2a 28 43 57 69 6e 64 6f |.......(|*(CWindo|
|00003110| 77 50 74 72 29 77 69 6e | 64 6f 77 29 2e 70 6f 72 |wPtr)win|dow).por|
|00003120| 74 52 65 63 74 20 00 3a | 00 00 22 c8 00 e5 00 bd |tRect .:|..".....|
|00003130| d8 e4 00 00 2b 28 2a 2a | 28 2a 28 43 57 69 6e 64 |....+(**|(*(CWind|
|00003140| 6f 77 50 74 72 29 77 69 | 6e 64 6f 77 29 2e 70 6f |owPtr)wi|ndow).po|
|00003150| 72 74 50 69 78 4d 61 70 | 29 2e 62 6f 75 6e 64 73 |rtPixMap|).bounds|
|00003160| 00 32 00 00 22 c8 00 e5 | 00 bd d8 d4 00 00 23 2a |.2.."...|......#*|
|00003170| 2a 28 2a 28 43 57 69 6e | 64 6f 77 50 74 72 29 77 |*(*(CWin|dowPtr)w|
|00003180| 69 6e 64 6f 77 29 2e 70 | 6f 72 74 50 69 78 4d 61 |indow).p|ortPixMa|
|00003190| 70 20 00 30 00 00 22 c8 | 00 e5 00 bd d8 c4 00 00 |p .0..".|........|
|000031a0| 21 2a 28 2a 28 43 57 69 | 6e 64 6f 77 50 74 72 29 |!*(*(CWi|ndowPtr)|
|000031b0| 77 69 6e 64 6f 77 29 2e | 70 6f 72 74 50 69 78 4d |window).|portPixM|
|000031c0| 61 70 00 38 00 00 22 c8 | 00 e5 00 bd d8 b4 00 00 |ap.8..".|........|
|000031d0| 29 28 2a 2a 28 2a 28 43 | 57 69 6e 64 6f 77 50 74 |)(**(*(C|WindowPt|
|000031e0| 72 29 77 69 6e 64 6f 77 | 29 2e 76 69 73 52 67 6e |r)window|).visRgn|
|000031f0| 29 2e 72 67 6e 42 42 6f | 78 20 00 2e 00 00 22 c8 |).rgnBBo|x ....".|
|00003200| 00 e5 00 bd d8 a4 00 00 | 1f 2a 2a 28 2a 28 43 57 |........|.**(*(CW|
|00003210| 69 6e 64 6f 77 50 74 72 | 29 77 69 6e 64 6f 77 29 |indowPtr|)window)|
|00003220| 2e 76 69 73 52 67 6e 20 | 00 2c 00 00 22 c8 00 e5 |.visRgn |.,.."...|
|00003230| 00 bd d8 94 00 00 1d 2a | 28 2a 28 43 57 69 6e 64 |.......*|(*(CWind|
|00003240| 6f 77 50 74 72 29 77 69 | 6e 64 6f 77 29 2e 76 69 |owPtr)wi|ndow).vi|
|00003250| 73 52 67 6e 00 32 00 00 | 22 c8 00 e5 00 bd d8 84 |sRgn.2..|".......|
|00003260| 80 00 00 3e 03 d5 01 d9 | 04 fc 94 20 00 00 00 00 |...>....|... ....|
|00003270| 00 00 13 2a 28 43 57 69 | 6e 64 6f 77 50 74 72 29 |...*(CWi|ndowPtr)|
|00003280| 77 69 6e 64 6f 77 00 22 | 00 00 22 c8 00 e5 00 bd |window."|..".....|
|00003290| d7 9c 00 00 13 28 43 57 | 69 6e 64 6f 77 50 74 72 |.....(CW|indowPtr|
|000032a0| 29 77 69 6e 64 6f 77 20 | 00 38 00 00 22 c8 00 e5 |)window |.8.."...|
|000032b0| 00 bd d6 20 80 00 00 66 | 03 de 01 46 04 f8 94 20 |... ...f|...F... |
|000032c0| 00 00 00 00 00 00 19 28 | 2a 2a 6d 79 50 69 78 4d |.......(|**myPixM|
|000032d0| 61 70 48 61 6e 64 6c 65 | 29 2e 62 6f 75 6e 64 73 |apHandle|).bounds|
|000032e0| 00 30 00 00 22 c8 00 e5 | 00 bd d6 d4 80 00 00 52 |.0.."...|.......R|
|000032f0| 03 da 01 32 04 f4 94 20 | 00 00 00 00 00 00 11 2a |...2... |.......*|
|00003300| 2a 6d 79 50 69 78 4d 61 | 70 48 61 6e 64 6c 65 20 |*myPixMa|pHandle |
|00003310| 00 1e 00 00 22 c8 00 e5 | 00 bd d6 80 00 00 0f 2a |...."...|.......*|
|00003320| 6d 79 50 69 78 4d 61 70 | 48 61 6e 64 6c 65 00 1e |myPixMap|Handle..|
|00003330| 00 00 22 c8 00 e5 00 bd | d7 10 00 00 0f 6d 79 50 |..".....|.....myP|
|00003340| 69 78 4d 61 70 48 61 6e | 64 6c 65 20 00 00 00 22 |ixMapHan|dle ..."|
|00003350| 00 02 00 00 0f 19 00 00 | 0f 1d 05 6d 61 69 6e 00 |........|...main.|
|00003360| 00 00 0f 54 00 00 0f 5d | 09 53 61 6e 64 73 74 6f |...T...]|.Sandsto|
|00003370| 72 6d 00 00 00 48 00 09 | 4d 6f 6e 61 63 6f 00 00 |rm...H..|Monaco..|
|00003380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003390| 00 00 00 00 00 00 00 00 | 00 03 00 04 00 79 00 2a |........|.....y.*|
|000033a0| 01 dc 02 a4 00 79 00 2a | 01 dc 02 a4 ad 61 5f 5b |.....y.*|.....a_[|
|000033b0| 00 00 0c 3a 00 00 0c 47 | 00 00 06 e1 00 00 00 00 |...:...G|........|
|000033c0| 00 04 00 01 00 01 00 00 | 01 00 00 00 04 46 00 00 |........|.....F..|
|000033d0| 03 46 00 00 00 86 01 4c | 4d d8 28 c4 00 00 00 1c |.F.....L|M.(.....|
|000033e0| 00 86 00 03 4d 50 53 52 | 00 02 00 22 42 4b 50 54 |....MPSR|..."BKPT|
|000033f0| 00 00 00 46 44 54 56 55 | 00 00 00 52 4d 57 42 42 |...FDTVU|...RMWBB|
|00003400| 00 00 00 5e 03 f0 ff ff | 00 00 00 00 00 00 00 00 |...^....|........|
|00003410| 03 ef ff ff 00 00 02 cc | 00 00 00 00 03 ed ff ff |........|........|
|00003420| 00 00 02 f2 00 00 00 00 | 5a 80 ff ff 00 00 00 22 |........|Z......"|
|00003430| 00 00 00 00 57 bc ff ff | 00 00 00 3a 00 00 00 00 |....W...|...:....|
|00003440| 03 f0 ff ff 00 00 03 3e | 00 00 00 00 00 00 00 00 |.......>|........|
|00003450| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003460| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003470| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+