home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1999-02-23 | 18.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: ZoopUtilities.cpp
Confidence | Program | Detection | Match Type | Support
|
---|
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Tue Feb 23 15:58:52 1999, modified Tue Feb 23 15:58:52 1999, creator 'CWIE', type ASCII, 17795 bytes "ZoopUtilities.cpp" , at 0x4603 428 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 11 5a 6f 6f 70 55 74 | 69 6c 69 74 69 65 73 2e |..ZoopUt|ilities.|
|00000010| 63 70 70 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |cpp.....|........|
|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 45 83 00 | 00 01 ac b2 f8 c7 0c b2 |.....E..|........|
|00000060| f8 c7 0c 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 6a 7b 00 00 |........|....j{..|
|00000080| 2f 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |/*******|********|
|00000090| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000d0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000e0| 2a 2a 0d 2a 0d 2a 0d 2a | 09 09 09 4d 61 63 5a 6f |**.*.*.*|...MacZo|
|000000f0| 6f 70 20 32 2e 30 20 2d | 20 22 74 68 65 20 66 72 |op 2.0 -| "the fr|
|00000100| 61 6d 65 77 6f 72 6b 20 | 66 6f 72 20 74 68 65 20 |amework |for the |
|00000110| 72 65 73 74 20 6f 66 20 | 75 73 22 09 09 20 0d 2a |rest of |us".. .*|
|00000120| 0d 2a 0d 2a 0d 2a 09 09 | 09 5a 6f 6f 70 55 74 69 |.*.*.*..|.ZoopUti|
|00000130| 6c 69 74 69 65 73 2e 63 | 70 70 09 09 2d 2d 20 67 |lities.c|pp..-- g|
|00000140| 65 6e 65 72 61 6c 20 75 | 74 69 6c 69 74 69 65 73 |eneral u|tilities|
|00000150| 0d 2a 0d 2a 0d 2a 0d 2a | 0d 2a 0d 2a 09 09 09 a9 |.*.*.*.*|.*.*....|
|00000160| 20 31 39 39 39 2c 20 47 | 72 61 68 61 6d 20 43 6f | 1999, G|raham Co|
|00000170| 78 0d 2a 0d 2a 0d 2a 0d | 2a 0d 2a 2a 2a 2a 2a 2a |x.*.*.*.|*.******|
|00000180| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000190| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000001a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000001b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000001c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000001d0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2f 0d 0d 23 69 |********|***/..#i|
|000001e0| 6e 63 6c 75 64 65 09 22 | 4d 61 63 5a 6f 6f 70 2e |nclude."|MacZoop.|
|000001f0| 68 22 0d 23 69 6e 63 6c | 75 64 65 09 3c 46 69 78 |h".#incl|ude.<Fix|
|00000200| 4d 61 74 68 2e 68 3e 0d | 23 69 6e 63 6c 75 64 65 |Math.h>.|#include|
|00000210| 09 3c 66 70 2e 68 3e 0d | 23 69 6e 63 6c 75 64 65 |.<fp.h>.|#include|
|00000220| 09 3c 70 61 6c 65 74 74 | 65 73 2e 68 3e 0d 0d 0d |.<palett|es.h>...|
|00000230| 0d 52 65 63 74 09 09 09 | 09 67 5a 6f 6f 6d 46 58 |.Rect...|.gZoomFX|
|00000240| 53 6f 75 72 63 65 52 65 | 63 74 20 3d 20 7b 20 30 |SourceRe|ct = { 0|
|00000250| 2c 20 30 2c 20 30 2c 20 | 30 20 7d 3b 0d 0d 0d 2f |, 0, 0, |0 };.../|
|00000260| 2a 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |*-------|--------|
|00000270| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000280| 2d 2a 2a 2a 20 20 43 4f | 50 59 50 53 54 52 49 4e |-*** CO|PYPSTRIN|
|00000290| 47 20 20 2a 2a 2a 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |G ***--|--------|
|000002a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000002b0| 2d 2d 2d 2d 2d 2d 2d 2a | 2f 0d 2f 2a 09 0d 63 6f |-------*|/./*..co|
|000002c0| 70 79 20 3c 73 72 63 53 | 74 72 69 6e 67 3e 20 74 |py <srcS|tring> t|
|000002d0| 6f 20 3c 64 65 73 74 53 | 74 72 69 6e 67 3e 0d 2d |o <destS|tring>.-|
|000002e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000002f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000300| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000310| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000320| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000330| 2d 2d 2d 2d 2d 2d 2d 2a | 2f 0d 0d 76 6f 69 64 09 |-------*|/..void.|
|00000340| 43 6f 70 79 50 53 74 72 | 69 6e 67 28 20 43 6f 6e |CopyPStr|ing( Con|
|00000350| 73 74 53 74 72 32 35 35 | 50 61 72 61 6d 20 73 72 |stStr255|Param sr|
|00000360| 63 53 74 72 69 6e 67 2c | 20 53 74 72 32 35 35 20 |cString,| Str255 |
|00000370| 64 65 73 74 53 74 72 69 | 6e 67 20 29 0d 7b 0d 09 |destStri|ng ).{..|
|00000380| 42 6c 6f 63 6b 4d 6f 76 | 65 44 61 74 61 28 20 73 |BlockMov|eData( s|
|00000390| 72 63 53 74 72 69 6e 67 | 2c 20 64 65 73 74 53 74 |rcString|, destSt|
|000003a0| 72 69 6e 67 2c 20 4d 49 | 4e 28 20 73 72 63 53 74 |ring, MI|N( srcSt|
|000003b0| 72 69 6e 67 5b 30 5d 20 | 2b 20 31 2c 20 32 35 35 |ring[0] |+ 1, 255|
|000003c0| 20 29 29 3b 0d 7d 0d 0d | 0d 2f 2a 2d 2d 2d 2d 2d | ));.}..|./*-----|
|000003d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000003e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2a 2a 2a 20 20 43 4f |--------|-*** CO|
|000003f0| 4e 43 41 54 50 53 54 52 | 49 4e 47 53 20 20 2a 2a |NCATPSTR|INGS **|
|00000400| 2a 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |*-------|--------|
|00000410| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000420| 2d 2a 2f 0d 2f 2a 09 0d | 63 6f 6e 63 61 74 65 6e |-*/./*..|concaten|
|00000430| 61 74 65 20 3c 61 70 70 | 65 6e 64 3e 20 74 6f 20 |ate <app|end> to |
|00000440| 3c 72 6f 6f 74 3e 0d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |<root>.-|--------|
|00000450| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000460| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000470| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000480| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000490| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2a |--------|-------*|
|000004a0| 2f 0d 0d 76 6f 69 64 09 | 43 6f 6e 63 61 74 50 53 |/..void.|ConcatPS|
|000004b0| 74 72 69 6e 67 73 28 20 | 53 74 72 32 35 35 20 72 |trings( |Str255 r|
|000004c0| 6f 6f 74 2c 20 43 6f 6e | 73 74 53 74 72 32 35 35 |oot, Con|stStr255|
|000004d0| 50 61 72 61 6d 20 61 70 | 70 65 6e 64 20 29 0d 7b |Param ap|pend ).{|
|000004e0| 0d 20 20 20 20 73 68 6f | 72 74 20 63 68 61 72 73 |. sho|rt chars|
|000004f0| 54 6f 43 6f 70 79 3b 0d | 0d 20 20 20 20 2f 2f 20 |ToCopy;.|. // |
|00000500| 54 72 75 6e 63 61 74 65 | 20 69 66 20 63 6f 6e 63 |Truncate| if conc|
|00000510| 61 74 65 6e 61 74 65 64 | 20 73 74 72 69 6e 67 20 |atenated| string |
|00000520| 77 6f 75 6c 64 20 62 65 | 20 6c 6f 6e 67 65 72 20 |would be| longer |
|00000530| 74 68 61 6e 20 32 35 35 | 20 63 68 61 72 73 2e 0d |than 255| chars..|
|00000540| 0d 20 20 20 20 63 68 61 | 72 73 54 6f 43 6f 70 79 |. cha|rsToCopy|
|00000550| 20 3d 20 4d 49 4e 28 20 | 61 70 70 65 6e 64 5b 30 | = MIN( |append[0|
|00000560| 5d 2c 20 32 35 35 20 2d | 20 72 6f 6f 74 5b 30 5d |], 255 -| root[0]|
|00000570| 29 3b 0d 20 20 20 20 42 | 6c 6f 63 6b 4d 6f 76 65 |);. B|lockMove|
|00000580| 44 61 74 61 28 20 61 70 | 70 65 6e 64 20 2b 20 31 |Data( ap|pend + 1|
|00000590| 2c 20 72 6f 6f 74 20 2b | 20 72 6f 6f 74 5b 30 5d |, root +| root[0]|
|000005a0| 20 2b 20 31 2c 20 28 6c | 6f 6e 67 29 20 63 68 61 | + 1, (l|ong) cha|
|000005b0| 72 73 54 6f 43 6f 70 79 | 29 3b 0d 20 20 20 20 72 |rsToCopy|);. r|
|000005c0| 6f 6f 74 5b 30 5d 20 2b | 3d 20 63 68 61 72 73 54 |oot[0] +|= charsT|
|000005d0| 6f 43 6f 70 79 3b 0d 7d | 0d 0d 0d 2f 2a 2d 2d 2d |oCopy;.}|.../*---|
|000005e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000005f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2a 2a 2a 20 20 43 |--------|--*** C|
|00000600| 4f 50 59 50 53 54 52 49 | 4e 47 54 52 55 4e 43 20 |OPYPSTRI|NGTRUNC |
|00000610| 20 2a 2a 2a 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d | ***----|--------|
|00000620| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000630| 2d 2d 2d 2a 2f 0d 2f 2a | 09 0d 43 6f 70 79 20 3c |---*/./*|..Copy <|
|00000640| 73 72 63 53 74 72 69 6e | 67 3e 20 74 6f 20 3c 64 |srcStrin|g> to <d|
|00000650| 65 73 74 53 74 72 69 6e | 67 3e 2c 20 6c 69 6d 69 |estStrin|g>, limi|
|00000660| 74 69 6e 67 20 6d 61 78 | 69 6d 75 6d 20 6c 65 6e |ting max|imum len|
|00000670| 67 74 68 20 6f 66 20 64 | 65 73 74 53 74 72 69 6e |gth of d|estStrin|
|00000680| 67 20 74 6f 20 3c 63 63 | 4c 69 6d 3e 0d 2d 2d 2d |g to <cc|Lim>.---|
|00000690| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000006a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000006b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000006c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000006d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000006e0| 2d 2d 2d 2d 2d 2a 2f 0d | 0d 76 6f 69 64 09 43 6f |-----*/.|.void.Co|
|000006f0| 70 79 50 53 74 72 69 6e | 67 54 72 75 6e 63 28 20 |pyPStrin|gTrunc( |
|00000700| 43 6f 6e 73 74 53 74 72 | 32 35 35 50 61 72 61 6d |ConstStr|255Param|
|00000710| 20 73 72 63 53 74 72 69 | 6e 67 2c 20 53 74 72 32 | srcStri|ng, Str2|
|00000720| 35 35 20 64 65 73 74 53 | 74 72 69 6e 67 2c 20 75 |55 destS|tring, u|
|00000730| 6e 73 69 67 6e 65 64 20 | 63 68 61 72 20 63 63 4c |nsigned |char ccL|
|00000740| 69 6d 20 29 0d 7b 0d 09 | 42 6c 6f 63 6b 4d 6f 76 |im ).{..|BlockMov|
|00000750| 65 44 61 74 61 28 20 73 | 72 63 53 74 72 69 6e 67 |eData( s|rcString|
|00000760| 2c 20 64 65 73 74 53 74 | 72 69 6e 67 2c 20 4d 49 |, destSt|ring, MI|
|00000770| 4e 28 20 73 72 63 53 74 | 72 69 6e 67 5b 30 5d 20 |N( srcSt|ring[0] |
|00000780| 2b 20 31 2c 20 63 63 4c | 69 6d 20 2b 20 31 20 29 |+ 1, ccL|im + 1 )|
|00000790| 29 3b 0d 09 64 65 73 74 | 53 74 72 69 6e 67 5b 30 |);..dest|String[0|
|000007a0| 5d 20 3d 20 4d 49 4e 28 | 20 73 72 63 53 74 72 69 |] = MIN(| srcStri|
|000007b0| 6e 67 5b 30 5d 2c 20 63 | 63 4c 69 6d 20 29 3b 0d |ng[0], c|cLim );.|
|000007c0| 7d 0d 0d 0d 2f 2a 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |}.../*--|--------|
|000007d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000007e0| 2d 2a 2a 2a 20 20 43 4f | 4e 43 41 54 50 53 54 52 |-*** CO|NCATPSTR|
|000007f0| 49 4e 47 53 54 52 55 4e | 43 20 20 2a 2a 2a 2d 2d |INGSTRUN|C ***--|
|00000800| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000810| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2a 2f 0d 2f |--------|----*/./|
|00000820| 2a 09 0d 43 6f 6e 63 61 | 74 65 6e 61 74 65 20 3c |*..Conca|tenate <|
|00000830| 61 70 70 65 6e 64 3e 20 | 74 6f 20 3c 72 6f 6f 74 |append> |to <root|
|00000840| 3e 2c 20 62 75 74 20 6c | 69 6d 69 74 69 6e 67 20 |>, but l|imiting |
|00000850| 74 6f 74 61 6c 20 73 74 | 72 69 6e 67 20 6c 65 6e |total st|ring len|
|00000860| 67 74 68 20 74 6f 20 61 | 20 6d 61 78 69 6d 75 6d |gth to a| maximum|
|00000870| 20 6f 66 20 3c 63 63 4c | 69 6d 3e 0d 2d 2d 2d 2d | of <ccL|im>.----|
|00000880| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000890| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000008a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000008b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000008c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000008d0| 2d 2d 2d 2d 2a 2f 0d 0d | 76 6f 69 64 09 43 6f 6e |----*/..|void.Con|
|000008e0| 63 61 74 50 53 74 72 69 | 6e 67 73 54 72 75 6e 63 |catPStri|ngsTrunc|
|000008f0| 28 20 53 74 72 32 35 35 | 20 72 6f 6f 74 2c 20 43 |( Str255| root, C|
|00000900| 6f 6e 73 74 53 74 72 32 | 35 35 50 61 72 61 6d 20 |onstStr2|55Param |
|00000910| 61 70 70 65 6e 64 2c 20 | 75 6e 73 69 67 6e 65 64 |append, |unsigned|
|00000920| 20 63 68 61 72 20 63 63 | 4c 69 6d 20 29 0d 7b 0d | char cc|Lim ).{.|
|00000930| 20 20 20 20 73 68 6f 72 | 74 20 63 68 61 72 73 54 | shor|t charsT|
|00000940| 6f 43 6f 70 79 3b 0d 0d | 20 20 20 20 2f 2f 20 54 |oCopy;..| // T|
|00000950| 72 75 6e 63 61 74 65 20 | 69 66 20 63 6f 6e 63 61 |runcate |if conca|
|00000960| 74 65 6e 61 74 65 64 20 | 73 74 72 69 6e 67 20 77 |tenated |string w|
|00000970| 6f 75 6c 64 20 62 65 20 | 6c 6f 6e 67 65 72 20 74 |ould be |longer t|
|00000980| 68 61 6e 20 3c 63 63 4c | 69 6d 3e 20 63 68 61 72 |han <ccL|im> char|
|00000990| 73 2e 0d 0d 20 20 20 20 | 63 68 61 72 73 54 6f 43 |s... |charsToC|
|000009a0| 6f 70 79 20 3d 20 4d 49 | 4e 28 20 61 70 70 65 6e |opy = MI|N( appen|
|000009b0| 64 5b 30 5d 2c 20 63 63 | 4c 69 6d 20 2d 20 72 6f |d[0], cc|Lim - ro|
|000009c0| 6f 74 5b 30 5d 29 3b 0d | 20 20 20 20 42 6c 6f 63 |ot[0]);.| Bloc|
|000009d0| 6b 4d 6f 76 65 44 61 74 | 61 28 20 61 70 70 65 6e |kMoveDat|a( appen|
|000009e0| 64 20 2b 20 31 2c 20 72 | 6f 6f 74 20 2b 20 72 6f |d + 1, r|oot + ro|
|000009f0| 6f 74 5b 30 5d 20 2b 20 | 31 2c 20 28 6c 6f 6e 67 |ot[0] + |1, (long|
|00000a00| 29 20 63 68 61 72 73 54 | 6f 43 6f 70 79 29 3b 0d |) charsT|oCopy);.|
|00000a10| 20 20 20 20 72 6f 6f 74 | 5b 30 5d 20 2b 3d 20 63 | root|[0] += c|
|00000a20| 68 61 72 73 54 6f 43 6f | 70 79 3b 0d 7d 0d 0d 0d |harsToCo|py;.}...|
|00000a30| 2f 2a 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |/*------|--------|
|00000a40| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000a50| 2a 2a 2a 20 20 43 4f 50 | 59 43 54 4f 50 53 54 52 |*** COP|YCTOPSTR|
|00000a60| 49 4e 47 20 20 2a 2a 2a | 2d 2d 2d 2d 2d 2d 2d 2d |ING ***|--------|
|00000a70| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000a80| 2d 2d 2d 2d 2d 2d 2d 2d | 2a 2f 0d 2f 2a 09 0d 63 |--------|*/./*..c|
|00000a90| 6f 6e 76 65 72 74 73 20 | 61 20 27 43 27 20 6e 75 |onverts |a 'C' nu|
|00000aa0| 6c 6c 2d 74 65 72 6d 69 | 6e 61 74 65 64 20 73 74 |ll-termi|nated st|
|00000ab0| 72 69 6e 67 20 75 70 20 | 74 6f 20 32 35 35 20 63 |ring up |to 255 c|
|00000ac0| 68 61 72 73 20 6c 6f 6e | 67 20 74 6f 20 61 20 4d |hars lon|g to a M|
|00000ad0| 61 63 2d 73 74 79 6c 65 | 20 70 61 73 63 61 6c 20 |ac-style| pascal |
|00000ae0| 73 74 72 69 6e 67 2e 0d | 4e 6f 74 65 20 74 68 61 |string..|Note tha|
|00000af0| 74 20 75 6e 6c 69 6b 65 | 20 63 32 70 73 74 72 2c |t unlike| c2pstr,|
|00000b00| 20 65 74 63 2c 20 74 68 | 69 73 20 64 6f 65 73 20 | etc, th|is does |
|00000b10| 6e 6f 74 20 6d 6f 64 69 | 66 79 20 74 68 65 20 6f |not modi|fy the o|
|00000b20| 72 69 67 69 6e 61 6c 20 | 73 74 72 69 6e 67 2e 0d |riginal |string..|
|00000b30| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000b40| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000b50| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000b60| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000b70| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000b80| 2d 2d 2d 2d 2d 2d 2d 2d | 2a 2f 0d 0d 76 6f 69 64 |--------|*/..void|
|00000b90| 09 43 6f 70 79 43 54 6f | 50 53 74 72 69 6e 67 28 |.CopyCTo|PString(|
|00000ba0| 20 63 68 61 72 2a 20 63 | 53 74 72 69 6e 67 49 6e | char* c|StringIn|
|00000bb0| 2c 20 53 74 72 32 35 35 | 20 70 53 74 72 69 6e 67 |, Str255| pString|
|00000bc0| 4f 75 74 20 29 0d 7b 0d | 09 75 6e 73 69 67 6e 65 |Out ).{.|.unsigne|
|00000bd0| 64 20 63 68 61 72 20 75 | 20 3d 20 30 3b 0d 09 0d |d char u| = 0;...|
|00000be0| 09 77 68 69 6c 65 28 20 | 63 53 74 72 69 6e 67 49 |.while( |cStringI|
|00000bf0| 6e 5b 75 2b 2b 5d 20 29 | 7b 7d 3b 09 2f 2f 20 6e |n[u++] )|{};.// n|
|00000c00| 6f 20 65 72 72 6f 72 20 | 68 65 72 65 2c 20 69 67 |o error |here, ig|
|00000c10| 6e 6f 72 65 20 77 61 72 | 6e 69 6e 67 2e 0d 09 0d |nore war|ning....|
|00000c20| 09 69 66 20 28 20 75 20 | 3e 20 32 35 35 20 29 0d |.if ( u |> 255 ).|
|00000c30| 09 09 75 20 3d 20 32 35 | 35 3b 0d 09 09 0d 09 42 |..u = 25|5;.....B|
|00000c40| 6c 6f 63 6b 4d 6f 76 65 | 44 61 74 61 28 20 63 53 |lockMove|Data( cS|
|00000c50| 74 72 69 6e 67 49 6e 2c | 20 26 70 53 74 72 69 6e |tringIn,| &pStrin|
|00000c60| 67 4f 75 74 5b 31 5d 2c | 20 75 20 29 3b 0d 09 0d |gOut[1],| u );...|
|00000c70| 09 70 53 74 72 69 6e 67 | 4f 75 74 5b 30 5d 20 3d |.pString|Out[0] =|
|00000c80| 20 75 3b 0d 7d 0d 0d 0d | 2f 2a 2d 2d 2d 2d 2d 2d | u;.}...|/*------|
|00000c90| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000ca0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2a 2a 2a 20 20 49 |--------|--*** I|
|00000cb0| 53 43 4f 4c 4f 55 52 50 | 4f 52 54 20 20 2a 2a 2a |SCOLOURP|ORT ***|
|00000cc0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000cd0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000ce0| 2a 2f 0d 2f 2a 09 0d 72 | 65 74 75 72 6e 73 20 54 |*/./*..r|eturns T|
|00000cf0| 52 55 45 20 69 66 20 74 | 68 65 20 67 72 61 66 70 |RUE if t|he grafp|
|00000d00| 6f 72 74 20 70 61 73 73 | 65 64 20 69 73 20 63 6f |ort pass|ed is co|
|00000d10| 6c 6f 75 72 2c 20 6f 74 | 68 65 72 77 69 73 65 20 |lour, ot|herwise |
|00000d20| 46 41 4c 53 45 0d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |FALSE.--|--------|
|00000d30| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000d40| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000d50| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000d60| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000d70| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2a 2f |--------|------*/|
|00000d80| 0d 0d 42 6f 6f 6c 65 61 | 6e 09 49 73 43 6f 6c 6f |..Boolea|n.IsColo|
|00000d90| 75 72 50 6f 72 74 28 20 | 47 72 61 66 50 74 72 20 |urPort( |GrafPtr |
|00000da0| 61 50 6f 72 74 20 29 0d | 7b 0d 09 72 65 74 75 72 |aPort ).|{..retur|
|00000db0| 6e 20 28 28 20 61 50 6f | 72 74 2d 3e 70 6f 72 74 |n (( aPo|rt->port|
|00000dc0| 42 69 74 73 2e 72 6f 77 | 42 79 74 65 73 20 26 20 |Bits.row|Bytes & |
|00000dd0| 30 78 38 30 30 30 20 29 | 20 21 3d 20 30 20 29 3b |0x8000 )| != 0 );|
|00000de0| 0d 7d 0d 0d 0d 2f 2a 2d | 2d 2d 2d 2d 2d 2d 2d 2d |.}.../*-|--------|
|00000df0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000e00| 2d 2d 2d 2d 2d 2a 2a 2a | 20 20 53 45 54 50 4f 52 |-----***| SETPOR|
|00000e10| 54 42 4c 41 43 4b 57 48 | 49 54 45 20 20 2a 2a 2a |TBLACKWH|ITE ***|
|00000e20| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000e30| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2a 2f 0d |--------|-----*/.|
|00000e40| 2f 2a 09 0d 73 65 74 73 | 20 74 68 65 20 63 75 72 |/*..sets| the cur|
|00000e50| 72 65 6e 74 20 70 6f 72 | 74 20 74 6f 20 62 6c 61 |rent por|t to bla|
|00000e60| 63 6b 20 26 20 77 68 69 | 74 65 0d 2d 2d 2d 2d 2d |ck & whi|te.-----|
|00000e70| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000e80| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000e90| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000ea0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000eb0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000ec0| 2d 2d 2d 2a 2f 0d 0d 76 | 6f 69 64 09 53 65 74 50 |---*/..v|oid.SetP|
|00000ed0| 6f 72 74 42 6c 61 63 6b | 57 68 69 74 65 28 29 0d |ortBlack|White().|
|00000ee0| 7b 0d 09 52 47 42 46 6f | 72 65 43 6f 6c 6f 72 28 |{..RGBFo|reColor(|
|00000ef0| 20 26 67 42 6c 61 63 6b | 20 29 3b 0d 09 52 47 42 | &gBlack| );..RGB|
|00000f00| 42 61 63 6b 43 6f 6c 6f | 72 28 20 26 67 57 68 69 |BackColo|r( &gWhi|
|00000f10| 74 65 20 29 3b 0d 7d 0d | 0d 0d 2f 2a 2d 2d 2d 2d |te );.}.|../*----|
|00000f20| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000f30| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2a 2a 2a 20 20 |--------|---*** |
|00000f40| 53 45 54 48 49 4c 49 54 | 45 4d 4f 44 45 20 20 2a |SETHILIT|EMODE *|
|00000f50| 2a 2a 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |**------|--------|
|00000f60| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000f70| 2d 2d 2a 2f 0d 2f 2a 09 | 0d 73 65 74 20 75 70 20 |--*/./*.|.set up |
|00000f80| 68 69 6c 69 74 69 6e 67 | 20 6d 6f 64 65 20 66 6f |hiliting| mode fo|
|00000f90| 72 20 69 6e 76 65 72 73 | 69 6f 6e 20 6f 70 65 72 |r invers|ion oper|
|00000fa0| 61 74 69 6f 6e 0d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |ation.--|--------|
|00000fb0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000fc0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000fd0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000fe0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000ff0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2a 2f |--------|------*/|
|00001000| 0d 0d 76 6f 69 64 09 53 | 65 74 48 69 6c 69 74 65 |..void.S|etHilite|
|00001010| 4d 6f 64 65 28 29 0d 7b | 0d 09 4c 4d 53 65 74 48 |Mode().{|..LMSetH|
|00001020| 69 6c 69 74 65 4d 6f 64 | 65 28 20 4c 4d 47 65 74 |iliteMod|e( LMGet|
|00001030| 48 69 6c 69 74 65 4d 6f | 64 65 28 29 20 26 20 70 |HiliteMo|de() & p|
|00001040| 48 69 6c 69 74 65 42 69 | 74 20 29 3b 0d 7d 0d 0d |HiliteBi|t );.}..|
|00001050| 0d 2f 2a 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |./*-----|--------|
|00001060| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001070| 2d 2d 2d 2d 2d 2a 2a 2a | 20 20 4d 41 43 48 41 53 |-----***| MACHAS|
|00001080| 44 4d 20 20 2a 2a 2a 2d | 2d 2d 2d 2d 2d 2d 2d 2d |DM ***-|--------|
|00001090| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000010a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2a 2f 0d 2f 2a 09 0d |--------|-*/./*..|
|000010b0| 0d 73 74 61 74 69 63 20 | 66 75 6e 63 74 69 6f 6e |.static |function|
|000010c0| 20 72 65 74 75 72 6e 73 | 20 54 52 55 45 20 69 66 | returns| TRUE if|
|000010d0| 20 44 72 61 67 20 4d 61 | 6e 61 67 65 72 20 69 73 | Drag Ma|nager is|
|000010e0| 20 70 72 65 73 65 6e 74 | 2e 20 43 68 65 63 6b 73 | present|. Checks|
|000010f0| 20 6c 69 6e 6b 20 6f 6e | 20 50 6f 77 65 72 4d 61 | link on| PowerMa|
|00001100| 63 73 2e 0d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |cs..----|--------|
|00001110| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001120| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001130| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001140| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001150| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2a 2f 0d 0d |--------|----*/..|
|00001160| 42 6f 6f 6c 65 61 6e 09 | 09 4d 61 63 48 61 73 44 |Boolean.|.MacHasD|
|00001170| 4d 28 29 0d 7b 0d 09 2f | 2f 20 72 65 74 75 72 6e |M().{../|/ return|
|00001180| 73 20 54 52 55 45 20 69 | 66 20 64 72 61 67 20 6d |s TRUE i|f drag m|
|00001190| 61 6e 61 67 65 72 20 69 | 73 20 69 6e 73 74 61 6c |anager i|s instal|
|000011a0| 6c 65 64 20 6f 6e 20 74 | 68 69 73 20 6d 61 63 20 |led on t|his mac |
|000011b0| 61 6e 64 20 69 73 20 6c | 6f 61 64 65 64 20 62 79 |and is l|oaded by|
|000011c0| 20 74 68 65 20 43 46 4d | 2e 0d 09 0d 09 42 6f 6f | the CFM|.....Boo|
|000011d0| 6c 65 61 6e 20 68 61 73 | 44 4d 20 3d 20 67 4d 61 |lean has|DM = gMa|
|000011e0| 63 49 6e 66 6f 2e 68 61 | 73 44 72 61 67 4d 61 6e |cInfo.ha|sDragMan|
|000011f0| 61 67 65 72 3b 0d 09 0d | 09 23 69 66 20 47 45 4e |ager;...|.#if GEN|
|00001200| 45 52 41 54 49 4e 47 43 | 46 4d 20 0d 09 09 2f 2f |ERATINGC|FM ...//|
|00001210| 20 63 68 65 63 6b 20 74 | 68 61 74 20 74 68 65 20 | check t|hat the |
|00001220| 64 72 61 67 4c 69 62 20 | 69 73 20 61 63 74 75 61 |dragLib |is actua|
|00001230| 6c 6c 79 20 6c 6f 61 64 | 65 64 20 61 6e 64 20 6c |lly load|ed and l|
|00001240| 69 6e 6b 65 64 0d 09 09 | 0d 09 09 68 61 73 44 4d |inked...|...hasDM|
|00001250| 20 3d 20 68 61 73 44 4d | 20 26 26 20 28 20 4e 65 | = hasDM| && ( Ne|
|00001260| 77 44 72 61 67 20 21 3d | 20 28 76 6f 69 64 2a 29 |wDrag !=| (void*)|
|00001270| 20 6b 55 6e 72 65 73 6f | 6c 76 65 64 43 46 72 61 | kUnreso|lvedCFra|
|00001280| 67 53 79 6d 62 6f 6c 41 | 64 64 72 65 73 73 20 29 |gSymbolA|ddress )|
|00001290| 3b 0d 0d 09 23 65 6e 64 | 69 66 0d 0d 09 72 65 74 |;...#end|if...ret|
|000012a0| 75 72 6e 20 68 61 73 44 | 4d 3b 0d 7d 0d 0d 0d 0d |urn hasD|M;.}....|
|000012b0| 2f 2a 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |/*------|--------|
|000012c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000012d0| 2d 2d 2a 2a 2a 20 20 4e | 4f 54 49 46 59 41 4c 45 |--*** N|OTIFYALE|
|000012e0| 52 54 20 20 2a 2a 2a 2d | 2d 2d 2d 2d 2d 2d 2d 2d |RT ***-|--------|
|000012f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001300| 2d 2d 2d 2d 2d 2d 2d 2d | 2a 2f 0d 2f 2a 09 0d 57 |--------|*/./*..W|
|00001310| 6f 72 6b 73 20 6a 75 73 | 74 20 6c 69 6b 65 20 41 |orks jus|t like A|
|00001320| 6c 65 72 74 28 29 2c 20 | 65 78 63 65 70 74 20 74 |lert(), |except t|
|00001330| 68 61 74 20 69 66 20 74 | 68 65 20 61 70 70 20 69 |hat if t|he app i|
|00001340| 73 20 69 6e 20 74 68 65 | 20 62 61 63 6b 67 72 6f |s in the| backgro|
|00001350| 75 6e 64 2c 20 74 68 65 | 20 6e 6f 74 69 66 69 63 |und, the| notific|
|00001360| 61 74 69 6f 6e 0d 6d 61 | 6e 61 67 65 72 20 69 73 |ation.ma|nager is|
|00001370| 20 75 73 65 64 20 74 6f | 20 69 6e 66 6f 72 6d 20 | used to| inform |
|00001380| 74 68 65 20 75 73 65 72 | 20 74 68 61 74 20 74 68 |the user| that th|
|00001390| 65 20 61 70 70 20 72 65 | 71 75 69 72 65 73 20 61 |e app re|quires a|
|000013a0| 74 74 65 6e 74 69 6f 6e | 2e 0d 2d 2d 2d 2d 2d 2d |ttention|..------|
|000013b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000013c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000013d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000013e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000013f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001400| 2d 2d 2a 2f 0d 0d 73 74 | 61 74 69 63 20 4e 4d 52 |--*/..st|atic NMR|
|00001410| 65 63 09 67 4e 6f 74 69 | 66 69 63 61 74 69 6f 6e |ec.gNoti|fication|
|00001420| 3b 0d 73 74 61 74 69 63 | 20 53 74 72 32 35 35 09 |;.static| Str255.|
|00001430| 67 4e 6f 74 69 66 79 4d | 65 73 73 61 67 65 3b 0d |gNotifyM|essage;.|
|00001440| 73 74 61 74 69 63 20 42 | 6f 6f 6c 65 61 6e 09 67 |static B|oolean.g|
|00001450| 4e 6f 74 69 66 69 63 61 | 74 69 6f 6e 50 6f 73 74 |Notifica|tionPost|
|00001460| 65 64 20 3d 20 46 41 4c | 53 45 3b 0d 0d 73 68 6f |ed = FAL|SE;..sho|
|00001470| 72 74 09 09 4e 6f 74 69 | 66 79 41 6c 65 72 74 28 |rt..Noti|fyAlert(|
|00001480| 20 63 6f 6e 73 74 20 73 | 68 6f 72 74 20 61 6c 65 | const s|hort ale|
|00001490| 72 74 49 44 2c 20 4e 54 | 41 6c 65 72 74 46 6c 61 |rtID, NT|AlertFla|
|000014a0| 67 73 20 6e 74 46 6c 61 | 67 73 20 29 0d 7b 0d 09 |gs ntFla|gs ).{..|
|000014b0| 2f 2f 20 62 61 73 69 63 | 61 6c 6c 79 3a 20 69 66 |// basic|ally: if|
|000014c0| 20 28 20 62 61 63 6b 67 | 72 6f 75 6e 64 20 29 3a | ( backg|round ):|
|000014d0| 0d 09 2f 2f 09 09 09 09 | 69 6e 73 74 61 6c 6c 20 |..//....|install |
|000014e0| 6e 6f 74 69 66 69 63 61 | 74 69 6f 6e 0d 09 2f 2f |notifica|tion..//|
|000014f0| 09 09 09 09 77 61 69 74 | 20 66 6f 72 20 61 70 70 |....wait| for app|
|00001500| 20 66 6f 72 65 67 72 6f | 75 6e 64 0d 09 2f 2f 09 | foregro|und..//.|
|00001510| 09 09 09 64 65 6c 65 74 | 65 20 6e 6f 74 69 66 69 |...delet|e notifi|
|00001520| 63 61 74 69 6f 6e 0d 09 | 0d 09 69 66 20 28 20 21 |cation..|..if ( !|
|00001530| 20 67 4e 6f 74 69 66 69 | 63 61 74 69 6f 6e 50 6f | gNotifi|cationPo|
|00001540| 73 74 65 64 20 29 0d 09 | 7b 0d 09 09 69 66 20 28 |sted )..|{...if (|
|00001550| 20 67 41 70 70 6c 69 63 | 61 74 69 6f 6e 2d 3e 49 | gApplic|ation->I|
|00001560| 6e 42 61 63 6b 67 72 6f | 75 6e 64 28 29 29 0d 09 |nBackgro|und())..|
|00001570| 09 7b 0d 09 09 09 2f 2f | 20 69 66 20 61 6e 20 61 |.{....//| if an a|
|00001580| 6c 65 72 74 20 69 73 20 | 74 6f 20 62 65 20 64 69 |lert is |to be di|
|00001590| 73 70 6c 61 79 65 64 2c | 20 73 65 74 20 69 74 20 |splayed,| set it |
|000015a0| 75 70 0d 09 09 09 0d 09 | 09 09 69 66 20 28 20 6e |up......|..if ( n|
|000015b0| 74 46 6c 61 67 73 20 26 | 20 6e 74 41 6c 65 72 74 |tFlags &| ntAlert|
|000015c0| 44 69 73 70 6c 61 79 4d | 65 73 73 61 67 65 20 29 |DisplayM|essage )|
|000015d0| 0d 09 09 09 7b 0d 09 09 | 09 09 2f 2f 20 62 75 69 |....{...|..// bui|
|000015e0| 6c 64 20 61 20 73 74 72 | 69 6e 67 20 74 68 61 74 |ld a str|ing that|
|000015f0| 20 73 61 79 73 20 22 54 | 68 65 20 61 70 70 6c 69 | says "T|he appli|
|00001600| 63 61 74 69 6f 6e 20 d2 | 3c 6e 61 6d 65 3e d3 20 |cation .|<name>. |
|00001610| 72 65 71 75 69 72 65 73 | 20 79 6f 75 72 20 61 74 |requires| your at|
|00001620| 74 65 6e 74 69 6f 6e 2e | 0d 09 09 09 09 2f 2f 20 |tention.|.....// |
|00001630| 50 6c 65 61 73 65 20 62 | 72 69 6e 67 20 69 74 20 |Please b|ring it |
|00001640| 74 6f 20 74 68 65 20 66 | 72 6f 6e 74 2e 0d 09 09 |to the f|ront....|
|00001650| 09 09 0d 09 09 09 09 53 | 74 72 32 35 35 09 61 70 |.......S|tr255.ap|
|00001660| 70 4e 61 6d 65 3b 0d 09 | 09 09 09 0d 09 09 09 09 |pName;..|........|
|00001670| 47 65 74 49 6e 64 53 74 | 72 69 6e 67 28 20 67 4e |GetIndSt|ring( gN|
|00001680| 6f 74 69 66 79 4d 65 73 | 73 61 67 65 2c 20 6b 4d |otifyMes|sage, kM|
|00001690| 69 73 63 53 74 72 4c 69 | 73 74 49 44 2c 20 31 37 |iscStrLi|stID, 17|
|000016a0| 20 29 3b 0d 09 09 09 09 | 67 41 70 70 6c 69 63 61 | );.....|gApplica|
|000016b0| 74 69 6f 6e 2d 3e 47 65 | 74 4e 61 6d 65 28 20 61 |tion->Ge|tName( a|
|000016c0| 70 70 4e 61 6d 65 20 29 | 3b 0d 09 09 09 09 43 6f |ppName )|;.....Co|
|000016d0| 6e 63 61 74 50 53 74 72 | 69 6e 67 73 28 20 67 4e |ncatPStr|ings( gN|
|000016e0| 6f 74 69 66 79 4d 65 73 | 73 61 67 65 2c 20 61 70 |otifyMes|sage, ap|
|000016f0| 70 4e 61 6d 65 20 29 3b | 0d 09 09 09 09 47 65 74 |pName );|.....Get|
|00001700| 49 6e 64 53 74 72 69 6e | 67 28 20 61 70 70 4e 61 |IndStrin|g( appNa|
|00001710| 6d 65 2c 20 6b 4d 69 73 | 63 53 74 72 4c 69 73 74 |me, kMis|cStrList|
|00001720| 49 44 2c 20 31 38 20 29 | 3b 0d 09 09 09 09 43 6f |ID, 18 )|;.....Co|
|00001730| 6e 63 61 74 50 53 74 72 | 69 6e 67 73 28 20 67 4e |ncatPStr|ings( gN|
|00001740| 6f 74 69 66 79 4d 65 73 | 73 61 67 65 2c 20 61 70 |otifyMes|sage, ap|
|00001750| 70 4e 61 6d 65 20 29 3b | 0d 09 09 09 09 0d 09 09 |pName );|........|
|00001760| 09 09 67 4e 6f 74 69 66 | 69 63 61 74 69 6f 6e 2e |..gNotif|ication.|
|00001770| 6e 6d 53 74 72 20 3d 20 | 67 4e 6f 74 69 66 79 4d |nmStr = |gNotifyM|
|00001780| 65 73 73 61 67 65 3b 0d | 09 09 09 7d 0d 09 09 09 |essage;.|...}....|
|00001790| 65 6c 73 65 0d 09 09 09 | 09 67 4e 6f 74 69 66 69 |else....|.gNotifi|
|000017a0| 63 61 74 69 6f 6e 2e 6e | 6d 53 74 72 20 3d 20 4e |cation.n|mStr = N|
|000017b0| 55 4c 4c 3b 0d 09 09 09 | 0d 09 09 09 2f 2f 20 73 |ULL;....|....// s|
|000017c0| 65 74 20 75 70 20 61 6e | 79 20 73 6f 75 6e 64 3a |et up an|y sound:|
|000017d0| 0d 09 09 09 0d 09 09 09 | 69 66 20 28 20 6e 74 46 |........|if ( ntF|
|000017e0| 6c 61 67 73 20 26 20 6e | 74 41 6c 65 72 74 50 6c |lags & n|tAlertPl|
|000017f0| 61 79 53 6f 75 6e 64 20 | 29 0d 09 09 09 09 67 4e |aySound |).....gN|
|00001800| 6f 74 69 66 69 63 61 74 | 69 6f 6e 2e 6e 6d 53 6f |otificat|ion.nmSo|
|00001810| 75 6e 64 20 3d 20 28 20 | 48 61 6e 64 6c 65 20 29 |und = ( |Handle )|
|00001820| 20 2d 31 4c 3b 0d 09 09 | 09 65 6c 73 65 0d 09 09 | -1L;...|.else...|
|00001830| 09 09 67 4e 6f 74 69 66 | 69 63 61 74 69 6f 6e 2e |..gNotif|ication.|
|00001840| 6e 6d 53 6f 75 6e 64 20 | 3d 20 4e 55 4c 4c 3b 0d |nmSound |= NULL;.|
|00001850| 09 09 09 0d 09 09 09 48 | 61 6e 64 6c 65 09 61 70 |.......H|andle.ap|
|00001860| 70 49 63 6f 6e 53 75 69 | 74 65 48 3b 0d 09 09 09 |pIconSui|teH;....|
|00001870| 4f 53 45 72 72 09 74 68 | 65 45 72 72 3b 0d 09 09 |OSErr.th|eErr;...|
|00001880| 09 09 0d 09 09 09 2f 2f | 20 73 65 74 20 75 70 20 |......//| set up |
|00001890| 69 63 6f 6e 20 61 6e 64 | 20 6d 65 6e 75 20 6d 61 |icon and| menu ma|
|000018a0| 72 6b 0d 09 09 09 0d 09 | 09 09 67 4e 6f 74 69 66 |rk......|..gNotif|
|000018b0| 69 63 61 74 69 6f 6e 2e | 71 54 79 70 65 20 3d 20 |ication.|qType = |
|000018c0| 38 3b 0d 09 09 09 67 4e | 6f 74 69 66 69 63 61 74 |8;....gN|otificat|
|000018d0| 69 6f 6e 2e 6e 6d 4d 61 | 72 6b 20 3d 20 54 52 55 |ion.nmMa|rk = TRU|
|000018e0| 45 3b 0d 09 09 09 67 4e | 6f 74 69 66 69 63 61 74 |E;....gN|otificat|
|000018f0| 69 6f 6e 2e 6e 6d 52 65 | 73 70 20 3d 20 4e 55 4c |ion.nmRe|sp = NUL|
|00001900| 4c 3b 0d 09 09 09 67 4e | 6f 74 69 66 69 63 61 74 |L;....gN|otificat|
|00001910| 69 6f 6e 2e 6e 6d 52 65 | 66 43 6f 6e 20 3d 20 4e |ion.nmRe|fCon = N|
|00001920| 55 4c 4c 3b 0d 09 09 09 | 0d 09 09 09 74 68 65 45 |ULL;....|....theE|
|00001930| 72 72 20 3d 20 47 65 74 | 49 63 6f 6e 53 75 69 74 |rr = Get|IconSuit|
|00001940| 65 28 20 26 61 70 70 49 | 63 6f 6e 53 75 69 74 65 |e( &appI|conSuite|
|00001950| 48 2c 20 6b 41 70 70 6c | 69 63 61 74 69 6f 6e 49 |H, kAppl|icationI|
|00001960| 63 6f 6e 53 75 69 74 65 | 49 44 2c 20 73 76 41 6c |conSuite|ID, svAl|
|00001970| 6c 41 76 61 69 6c 61 62 | 6c 65 44 61 74 61 20 29 |lAvailab|leData )|
|00001980| 3b 0d 09 09 09 0d 09 09 | 09 69 66 20 28 20 74 68 |;.......|.if ( th|
|00001990| 65 45 72 72 20 3d 3d 20 | 6e 6f 45 72 72 20 29 0d |eErr == |noErr ).|
|000019a0| 09 09 09 09 67 4e 6f 74 | 69 66 69 63 61 74 69 6f |....gNot|ificatio|
|000019b0| 6e 2e 6e 6d 49 63 6f 6e | 20 3d 20 61 70 70 49 63 |n.nmIcon| = appIc|
|000019c0| 6f 6e 53 75 69 74 65 48 | 3b 0d 09 09 09 65 6c 73 |onSuiteH|;....els|
|000019d0| 65 0d 09 09 09 09 67 4e | 6f 74 69 66 69 63 61 74 |e.....gN|otificat|
|000019e0| 69 6f 6e 2e 6e 6d 49 63 | 6f 6e 20 3d 20 4e 55 4c |ion.nmIc|on = NUL|
|000019f0| 4c 3b 0d 09 09 09 09 0d | 09 09 09 2f 2f 20 69 6e |L;......|...// in|
|00001a00| 73 74 61 6c 6c 20 6e 6f | 74 69 66 69 63 61 74 69 |stall no|tificati|
|00001a10| 6f 6e 3a 0d 0d 09 09 09 | 4e 4d 49 6e 73 74 61 6c |on:.....|NMInstal|
|00001a20| 6c 28 20 26 67 4e 6f 74 | 69 66 69 63 61 74 69 6f |l( &gNot|ificatio|
|00001a30| 6e 20 29 3b 0d 09 09 09 | 09 0d 09 09 09 67 4e 6f |n );....|.....gNo|
|00001a40| 74 69 66 69 63 61 74 69 | 6f 6e 50 6f 73 74 65 64 |tificati|onPosted|
|00001a50| 20 3d 20 54 52 55 45 3b | 0d 09 09 09 0d 09 09 09 | = TRUE;|........|
|00001a60| 2f 2f 20 68 61 6e 64 6c | 65 20 65 76 65 6e 74 73 |// handl|e events|
|00001a70| 20 75 6e 74 69 6c 20 77 | 65 20 63 6f 6d 65 20 62 | until w|e come b|
|00001a80| 61 63 6b 20 74 6f 20 74 | 68 65 20 66 72 6f 6e 74 |ack to t|he front|
|00001a90| 3a 0d 09 09 0d 09 09 09 | 67 41 70 70 6c 69 63 61 |:.......|gApplica|
|00001aa0| 74 69 6f 6e 2d 3e 57 61 | 69 74 41 70 70 6c 69 63 |tion->Wa|itApplic|
|00001ab0| 61 74 69 6f 6e 46 6f 72 | 65 67 72 6f 75 6e 64 28 |ationFor|eground(|
|00001ac0| 29 3b 0d 09 09 09 0d 09 | 09 09 2f 2f 20 77 65 27 |);......|..// we'|
|00001ad0| 72 65 20 62 61 63 6b 2c | 20 73 6f 20 64 65 6c 65 |re back,| so dele|
|00001ae0| 74 65 20 74 68 65 20 6e | 6f 74 69 66 69 63 61 74 |te the n|otificat|
|00001af0| 69 6f 6e 0d 09 09 09 0d | 09 09 09 4e 4d 52 65 6d |ion.....|...NMRem|
|00001b00| 6f 76 65 28 20 26 67 4e | 6f 74 69 66 69 63 61 74 |ove( &gN|otificat|
|00001b10| 69 6f 6e 20 29 3b 0d 09 | 09 09 67 4e 6f 74 69 66 |ion );..|..gNotif|
|00001b20| 69 63 61 74 69 6f 6e 50 | 6f 73 74 65 64 20 3d 20 |icationP|osted = |
|00001b30| 46 41 4c 53 45 3b 0d 09 | 09 09 0d 09 09 09 69 66 |FALSE;..|......if|
|00001b40| 20 28 20 61 70 70 49 63 | 6f 6e 53 75 69 74 65 48 | ( appIc|onSuiteH|
|00001b50| 20 29 0d 09 09 09 09 44 | 69 73 70 6f 73 65 49 63 | ).....D|isposeIc|
|00001b60| 6f 6e 53 75 69 74 65 28 | 20 61 70 70 49 63 6f 6e |onSuite(| appIcon|
|00001b70| 53 75 69 74 65 48 2c 20 | 46 41 4c 53 45 20 29 3b |SuiteH, |FALSE );|
|00001b80| 0d 09 09 7d 0d 09 09 0d | 09 09 69 66 20 28 20 61 |...}....|..if ( a|
|00001b90| 6c 65 72 74 49 44 20 3e | 20 30 20 29 0d 09 09 7b |lertID >| 0 )...{|
|00001ba0| 0d 09 09 09 53 74 6f 70 | 43 75 72 73 6f 72 41 6e |....Stop|CursorAn|
|00001bb0| 69 6d 61 74 69 6f 6e 28 | 29 3b 0d 09 09 09 53 65 |imation(|);....Se|
|00001bc0| 74 43 75 72 73 6f 72 53 | 68 61 70 65 28 20 41 52 |tCursorS|hape( AR|
|00001bd0| 52 4f 57 5f 43 55 52 53 | 4f 52 20 29 3b 0d 09 09 |ROW_CURS|OR );...|
|00001be0| 09 0d 09 09 09 72 65 74 | 75 72 6e 20 41 6c 65 72 |.....ret|urn Aler|
|00001bf0| 74 28 20 61 6c 65 72 74 | 49 44 2c 20 4e 55 4c 4c |t( alert|ID, NULL|
|00001c00| 20 29 3b 0d 09 09 7d 0d | 09 09 65 6c 73 65 0d 09 | );...}.|..else..|
|00001c10| 09 09 72 65 74 75 72 6e | 20 6f 6b 3b 0d 09 7d 0d |..return| ok;..}.|
|00001c20| 09 65 6c 73 65 0d 09 7b | 0d 09 09 2f 2f 20 77 68 |.else..{|...// wh|
|00001c30| 61 74 20 63 61 6e 20 77 | 65 20 64 6f 3f 20 54 68 |at can w|e do? Th|
|00001c40| 69 73 20 73 68 6f 75 6c | 64 6e 27 74 20 61 72 69 |is shoul|dn't ari|
|00001c50| 73 65 20 69 6e 20 6e 6f | 72 6d 61 6c 20 75 73 65 |se in no|rmal use|
|00001c60| 2c 20 62 75 74 20 6a 75 | 73 74 20 69 6e 20 63 61 |, but ju|st in ca|
|00001c70| 73 65 2c 20 77 65 20 61 | 63 74 20 61 73 0d 09 09 |se, we a|ct as...|
|00001c80| 2f 2f 20 74 68 6f 75 67 | 68 20 74 68 65 20 75 73 |// thoug|h the us|
|00001c90| 65 72 20 73 61 77 20 61 | 6e 20 61 6c 65 72 74 20 |er saw a|n alert |
|00001ca0| 61 6e 64 20 63 6c 69 63 | 6b 65 64 20 4f 4b 2e 20 |and clic|ked OK. |
|00001cb0| 4e 6f 74 20 69 64 65 61 | 6c 2c 20 62 75 74 20 73 |Not idea|l, but s|
|00001cc0| 69 6e 63 65 20 61 20 6e | 6f 74 69 66 69 63 61 74 |ince a n|otificat|
|00001cd0| 69 6f 6e 0d 09 09 2f 2f | 20 63 61 6e 27 74 20 69 |ion...//| can't i|
|00001ce0| 6e 74 65 72 72 75 70 74 | 20 61 6e 6f 74 68 65 72 |nterrupt| another|
|00001cf0| 2c 20 74 68 65 72 65 27 | 73 20 6c 69 74 74 6c 65 |, there'|s little|
|00001d00| 20 63 68 6f 69 63 65 2e | 0d 09 09 0d 09 09 53 79 | choice.|......Sy|
|00001d10| 73 42 65 65 70 28 20 31 | 20 29 3b 0d 09 09 72 65 |sBeep( 1| );...re|
|00001d20| 74 75 72 6e 20 6f 6b 3b | 0d 09 7d 0d 7d 0d 0d 0d |turn ok;|..}.}...|
|00001d30| 2f 2a 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |/*------|--------|
|00001d40| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001d50| 2d 2d 2d 2a 2a 2a 20 20 | 4d 5a 44 45 4c 41 59 20 |---*** |MZDELAY |
|00001d60| 20 2a 2a 2a 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d | ***----|--------|
|00001d70| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001d80| 2d 2d 2d 2d 2d 2d 2d 2d | 2a 2f 0d 2f 2a 09 0d 64 |--------|*/./*..d|
|00001d90| 65 6c 61 79 20 66 6f 72 | 20 3c 74 69 63 6b 73 3e |elay for| <ticks>|
|00001da0| 2e 20 48 65 61 64 65 72 | 20 69 6e 76 61 72 69 61 |. Header| invaria|
|00001db0| 6e 74 20 76 65 72 73 69 | 6f 6e 20 6f 66 20 74 6f |nt versi|on of to|
|00001dc0| 6f 6c 62 6f 78 20 44 65 | 6c 61 79 28 29 0d 2d 2d |olbox De|lay().--|
|00001dd0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001de0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001df0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001e00| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001e10| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001e20| 2d 2d 2d 2d 2d 2d 2a 2f | 0d 0d 76 6f 69 64 09 4d |------*/|..void.M|
|00001e30| 5a 44 65 6c 61 79 28 20 | 73 68 6f 72 74 20 74 69 |ZDelay( |short ti|
|00001e40| 63 6b 73 20 29 0d 7b 0d | 09 23 69 66 64 65 66 20 |cks ).{.|.#ifdef |
|00001e50| 5f 5f 43 4f 4d 50 41 54 | 49 42 49 4c 49 54 59 5f |__COMPAT|IBILITY_|
|00001e60| 5f 0d 09 09 6c 6f 6e 67 | 20 69 67 6e 6f 72 65 64 |_...long| ignored|
|00001e70| 3b 0d 09 23 65 6c 73 65 | 0d 09 09 75 6e 73 69 67 |;..#else|...unsig|
|00001e80| 6e 65 64 20 6c 6f 6e 67 | 20 69 67 6e 6f 72 65 64 |ned long| ignored|
|00001e90| 3b 0d 09 23 65 6e 64 69 | 66 0d 09 0d 09 44 65 6c |;..#endi|f....Del|
|00001ea0| 61 79 28 20 74 69 63 6b | 73 2c 20 26 69 67 6e 6f |ay( tick|s, &igno|
|00001eb0| 72 65 64 20 29 3b 0d 7d | 0d 0d 0d 2f 2a 2d 2d 2d |red );.}|.../*---|
|00001ec0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001ed0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2a |--------|-------*|
|00001ee0| 2a 2a 20 20 4d 5a 57 41 | 49 54 20 20 2a 2a 2a 2d |** MZWA|IT ***-|
|00001ef0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001f00| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001f10| 2d 2d 2d 2a 2f 0d 2f 2a | 09 0d 57 61 69 74 20 66 |---*/./*|..Wait f|
|00001f20| 6f 72 20 3c 74 69 63 6b | 73 3e 2e 20 54 68 69 73 |or <tick|s>. This|
|00001f30| 20 63 6f 6e 74 69 6e 75 | 65 73 20 74 6f 20 70 72 | continu|es to pr|
|00001f40| 6f 63 65 73 73 20 65 76 | 65 6e 74 73 20 64 75 72 |ocess ev|ents dur|
|00001f50| 69 6e 67 74 68 65 20 77 | 61 69 74 20 70 65 72 69 |ingthe w|ait peri|
|00001f60| 6f 64 0d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |od.-----|--------|
|00001f70| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001f80| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001f90| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001fa0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001fb0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2a 2f 0d 0d 76 |--------|---*/..v|
|00001fc0| 6f 69 64 09 4d 5a 57 61 | 69 74 28 20 75 6e 73 69 |oid.MZWa|it( unsi|
|00001fd0| 67 6e 65 64 20 73 68 6f | 72 74 20 74 69 63 6b 73 |gned sho|rt ticks|
|00001fe0| 20 29 0d 7b 0d 09 6c 6f | 6e 67 09 74 63 20 3d 20 | ).{..lo|ng.tc = |
|00001ff0| 54 69 63 6b 43 6f 75 6e | 74 28 29 20 2b 20 74 69 |TickCoun|t() + ti|
|00002000| 63 6b 73 3b 0d 09 0d 09 | 77 68 69 6c 65 28 20 54 |cks;....|while( T|
|00002010| 69 63 6b 43 6f 75 6e 74 | 28 29 20 3c 20 74 63 20 |ickCount|() < tc |
|00002020| 29 0d 09 09 67 41 70 70 | 6c 69 63 61 74 69 6f 6e |)...gApp|lication|
|00002030| 2d 3e 50 72 6f 63 65 73 | 73 31 45 76 65 6e 74 28 |->Proces|s1Event(|
|00002040| 29 3b 0d 7d 0d 0d 0d 2f | 2a 2d 2d 2d 2d 2d 2d 2d |);.}.../|*-------|
|00002050| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002060| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2a 2a 2a 20 20 41 |--------|--*** A|
|00002070| 53 53 45 52 54 45 52 52 | 20 20 2a 2a 2a 2d 2d 2d |SSERTERR| ***---|
|00002080| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002090| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2a |--------|-------*|
|000020a0| 2f 0d 2f 2a 09 0d 72 65 | 70 6f 72 74 20 61 6e 20 |/./*..re|port an |
|000020b0| 61 73 73 65 72 74 69 6f | 6e 20 65 72 72 6f 72 20 |assertio|n error |
|000020c0| 74 6f 20 74 68 65 20 75 | 73 65 72 20 76 69 61 20 |to the u|ser via |
|000020d0| 61 6e 20 61 6c 65 72 74 | 0d 2d 2d 2d 2d 2d 2d 2d |an alert|.-------|
|000020e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000020f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002100| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002110| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002120| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002130| 2d 2a 2f 0d 0d 76 6f 69 | 64 09 41 73 73 65 72 74 |-*/..voi|d.Assert|
|00002140| 45 72 72 28 20 6c 6f 6e | 67 20 6c 69 6e 65 4e 6f |Err( lon|g lineNo|
|00002150| 2c 20 63 68 61 72 2a 20 | 73 72 63 46 69 6c 65 2c |, char* |srcFile,|
|00002160| 20 63 68 61 72 2a 20 72 | 65 61 73 6f 6e 2c 20 6c | char* r|eason, l|
|00002170| 6f 6e 67 20 76 61 6c 20 | 29 0d 7b 0d 23 69 66 20 |ong val |).{.#if |
|00002180| 5f 44 45 42 55 47 5f 0d | 09 0d 09 53 74 72 31 35 |_DEBUG_.|...Str15|
|00002190| 09 09 09 6c 69 6e 65 53 | 74 72 2c 20 76 61 6c 53 |...lineS|tr, valS|
|000021a0| 74 72 3b 0d 09 53 74 72 | 32 35 35 09 09 20 09 66 |tr;..Str|255.. .f|
|000021b0| 69 6c 65 53 74 72 2c 20 | 72 65 61 73 6f 6e 53 74 |ileStr, |reasonSt|
|000021c0| 72 3b 0d 09 0d 09 4e 75 | 6d 54 6f 53 74 72 69 6e |r;....Nu|mToStrin|
|000021d0| 67 28 20 6c 69 6e 65 4e | 6f 2c 20 6c 69 6e 65 53 |g( lineN|o, lineS|
|000021e0| 74 72 20 29 3b 0d 09 4e | 75 6d 54 6f 53 74 72 69 |tr );..N|umToStri|
|000021f0| 6e 67 28 20 76 61 6c 2c | 20 76 61 6c 53 74 72 20 |ng( val,| valStr |
|00002200| 29 3b 0d 09 0d 09 43 6f | 70 79 43 54 6f 50 53 74 |);....Co|pyCToPSt|
|00002210| 72 69 6e 67 28 20 73 72 | 63 46 69 6c 65 2c 20 66 |ring( sr|cFile, f|
|00002220| 69 6c 65 53 74 72 20 29 | 3b 0d 09 43 6f 70 79 43 |ileStr )|;..CopyC|
|00002230| 54 6f 50 53 74 72 69 6e | 67 28 20 72 65 61 73 6f |ToPStrin|g( reaso|
|00002240| 6e 2c 20 72 65 61 73 6f | 6e 53 74 72 20 29 3b 0d |n, reaso|nStr );.|
|00002250| 09 09 0d 09 50 61 72 61 | 6d 54 65 78 74 28 20 6c |....Para|mText( l|
|00002260| 69 6e 65 53 74 72 2c 20 | 66 69 6c 65 53 74 72 2c |ineStr, |fileStr,|
|00002270| 20 72 65 61 73 6f 6e 53 | 74 72 2c 20 76 61 6c 53 | reasonS|tr, valS|
|00002280| 74 72 20 29 3b 0d 09 53 | 74 6f 70 43 75 72 73 6f |tr );..S|topCurso|
|00002290| 72 41 6e 69 6d 61 74 69 | 6f 6e 28 29 3b 0d 09 0d |rAnimati|on();...|
|000022a0| 09 28 76 6f 69 64 29 20 | 41 6c 65 72 74 28 20 6b |.(void) |Alert( k|
|000022b0| 41 73 73 65 72 74 69 6f | 6e 41 6c 65 72 74 49 44 |Assertio|nAlertID|
|000022c0| 2c 20 4e 55 4c 4c 20 29 | 3b 0d 09 0d 09 46 61 69 |, NULL )|;....Fai|
|000022d0| 6c 4f 53 45 72 72 28 20 | 6b 53 69 6c 65 6e 74 45 |lOSErr( |kSilentE|
|000022e0| 72 72 20 29 3b 0d 09 0d | 23 65 6e 64 69 66 0d 7d |rr );...|#endif.}|
|000022f0| 0d 0d 2f 2a 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |../*----|--------|
|00002300| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002310| 2a 2a 2a 20 20 53 45 54 | 47 4c 4f 42 41 4c 5a 4f |*** SET|GLOBALZO|
|00002320| 4f 4d 53 4f 55 52 43 45 | 20 20 2a 2a 2a 2d 2d 2d |OMSOURCE| ***---|
|00002330| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002340| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2a 2f 0d 2f 2a 09 |--------|--*/./*.|
|00002350| 0d 73 65 74 20 74 68 65 | 20 7a 6f 6f 6d 20 73 6f |.set the| zoom so|
|00002360| 75 72 63 65 20 74 6f 20 | 74 68 65 20 70 61 73 73 |urce to |the pass|
|00002370| 65 64 20 67 6c 6f 62 61 | 6c 20 72 65 63 74 0d 2d |ed globa|l rect.-|
|00002380| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002390| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000023a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000023b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000023c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000023d0| 2d 2d 2d 2d 2d 2d 2d 2a | 2f 0d 0d 76 6f 69 64 09 |-------*|/..void.|
|000023e0| 53 65 74 47 6c 6f 62 61 | 6c 5a 6f 6f 6d 53 6f 75 |SetGloba|lZoomSou|
|000023f0| 72 63 65 28 20 52 65 63 | 74 2a 20 61 47 6c 6f 62 |rce( Rec|t* aGlob|
|00002400| 61 6c 52 65 63 74 20 29 | 0d 7b 0d 09 67 5a 6f 6f |alRect )|.{..gZoo|
|00002410| 6d 46 58 53 6f 75 72 63 | 65 52 65 63 74 20 3d 20 |mFXSourc|eRect = |
|00002420| 2a 61 47 6c 6f 62 61 6c | 52 65 63 74 3b 0d 7d 0d |*aGlobal|Rect;.}.|
|00002430| 0d 0d 2f 2a 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |../*----|--------|
|00002440| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002450| 2d 2a 2a 2a 20 20 53 45 | 54 4c 4f 43 41 4c 5a 4f |-*** SE|TLOCALZO|
|00002460| 4f 4d 53 4f 55 52 43 45 | 20 20 2a 2a 2a 2d 2d 2d |OMSOURCE| ***---|
|00002470| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002480| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2a 2f 0d 2f 2a 09 |--------|--*/./*.|
|00002490| 0d 73 65 74 20 74 68 65 | 20 7a 6f 6f 6d 20 73 6f |.set the| zoom so|
|000024a0| 75 72 63 65 20 74 6f 20 | 74 68 65 20 70 61 73 73 |urce to |the pass|
|000024b0| 65 64 20 6c 6f 63 61 6c | 20 72 65 63 74 61 6e 67 |ed local| rectang|
|000024c0| 6c 65 0d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |le.-----|--------|
|000024d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000024e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000024f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002500| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002510| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2a 2f 0d 0d 76 |--------|---*/..v|
|00002520| 6f 69 64 09 53 65 74 4c | 6f 63 61 6c 5a 6f 6f 6d |oid.SetL|ocalZoom|
|00002530| 53 6f 75 72 63 65 28 20 | 52 65 63 74 2a 20 61 4c |Source( |Rect* aL|
|00002540| 6f 63 61 6c 52 65 63 74 | 20 29 0d 7b 0d 09 52 65 |ocalRect| ).{..Re|
|00002550| 63 74 09 72 20 3d 20 2a | 61 4c 6f 63 61 6c 52 65 |ct.r = *|aLocalRe|
|00002560| 63 74 3b 0d 09 0d 09 4c | 6f 63 61 6c 54 6f 47 6c |ct;....L|ocalToGl|
|00002570| 6f 62 61 6c 28 20 26 74 | 6f 70 4c 65 66 74 28 20 |obal( &t|opLeft( |
|00002580| 72 20 29 29 3b 0d 09 4c | 6f 63 61 6c 54 6f 47 6c |r ));..L|ocalToGl|
|00002590| 6f 62 61 6c 28 20 26 62 | 6f 74 52 69 67 68 74 28 |obal( &b|otRight(|
|000025a0| 20 72 20 29 29 3b 0d 09 | 0d 09 53 65 74 47 6c 6f | r ));..|..SetGlo|
|000025b0| 62 61 6c 5a 6f 6f 6d 53 | 6f 75 72 63 65 28 20 26 |balZoomS|ource( &|
|000025c0| 72 20 29 3b 0d 7d 0d 0d | 0d 2f 2a 2d 2d 2d 2d 2d |r );.}..|./*-----|
|000025d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000025e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2a 2a 2a |--------|-----***|
|000025f0| 20 20 45 51 55 41 4c 4d | 45 4d 20 20 2a 2a 2a 2d | EQUALM|EM ***-|
|00002600| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002610| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002620| 2d 2a 2f 0d 2f 2a 09 0d | 63 6f 6d 70 61 72 65 20 |-*/./*..|compare |
|00002630| 74 77 6f 20 62 6c 6f 63 | 6b 73 20 6f 66 20 6d 65 |two bloc|ks of me|
|00002640| 6d 6f 72 79 20 61 6e 64 | 20 72 65 74 75 72 6e 20 |mory and| return |
|00002650| 54 52 55 45 20 69 66 20 | 74 68 65 79 20 61 72 65 |TRUE if |they are|
|00002660| 20 65 71 75 61 6c 2e 20 | 5a 65 72 6f 2d 6c 65 6e | equal. |Zero-len|
|00002670| 67 74 68 20 64 61 74 61 | 20 69 73 20 6e 6f 74 0d |gth data| is not.|
|00002680| 63 6f 6e 73 69 64 65 72 | 65 64 20 65 71 75 61 6c |consider|ed equal|
|00002690| 2e 0d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |..------|--------|
|000026a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000026b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000026c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000026d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000026e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2a 2f 0d 0d 42 6f |--------|--*/..Bo|
|000026f0| 6f 6c 65 61 6e 09 09 45 | 71 75 61 6c 4d 65 6d 28 |olean..E|qualMem(|
|00002700| 20 76 6f 69 64 2a 20 61 | 2c 20 76 6f 69 64 2a 20 | void* a|, void* |
|00002710| 62 2c 20 63 6f 6e 73 74 | 20 75 6e 73 69 67 6e 65 |b, const| unsigne|
|00002720| 64 20 6c 6f 6e 67 20 6c | 65 6e 67 74 68 20 29 0d |d long l|ength ).|
|00002730| 7b 0d 09 42 6f 6f 6c 65 | 61 6e 09 09 72 65 73 75 |{..Boole|an..resu|
|00002740| 6c 74 20 3d 20 28 6c 65 | 6e 67 74 68 20 3e 20 30 |lt = (le|ngth > 0|
|00002750| 29 3b 0d 09 50 74 72 09 | 09 09 61 61 2c 20 62 62 |);..Ptr.|..aa, bb|
|00002760| 3b 0d 09 0d 09 72 65 67 | 69 73 74 65 72 20 75 6e |;....reg|ister un|
|00002770| 73 69 67 6e 65 64 20 6c | 6f 6e 67 09 6c 65 6e 20 |signed l|ong.len |
|00002780| 3d 20 6c 65 6e 67 74 68 | 3b 0d 09 0d 09 61 61 20 |= length|;....aa |
|00002790| 3d 20 28 50 74 72 29 20 | 61 3b 0d 09 62 62 20 3d |= (Ptr) |a;..bb =|
|000027a0| 20 28 50 74 72 29 20 62 | 3b 0d 09 0d 09 77 68 69 | (Ptr) b|;....whi|
|000027b0| 6c 65 28 20 6c 65 6e 2d | 2d 20 29 0d 09 7b 0d 09 |le( len-|- )..{..|
|000027c0| 09 69 66 20 28 20 2a 61 | 61 2b 2b 20 21 3d 20 2a |.if ( *a|a++ != *|
|000027d0| 62 62 2b 2b 20 29 0d 09 | 09 7b 0d 09 09 09 72 65 |bb++ )..|.{....re|
|000027e0| 73 75 6c 74 20 3d 20 46 | 41 4c 53 45 3b 0d 09 09 |sult = F|ALSE;...|
|000027f0| 09 62 72 65 61 6b 3b 0d | 09 09 7d 0d 09 7d 0d 0d |.break;.|..}..}..|
|00002800| 09 72 65 74 75 72 6e 20 | 72 65 73 75 6c 74 3b 0d |.return |result;.|
|00002810| 7d 0d 0d 0d 2f 2a 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |}.../*--|--------|
|00002820| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002830| 2d 2d 2d 2d 2d 2d 2a 2a | 2a 20 20 45 51 55 41 4c |------**|* EQUAL|
|00002840| 48 41 4e 44 4c 45 20 20 | 2a 2a 2a 2d 2d 2d 2d 2d |HANDLE |***-----|
|00002850| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002860| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2a 2f 0d 2f |--------|----*/./|
|00002870| 2a 09 0d 63 6f 6d 70 61 | 72 65 20 74 68 65 20 63 |*..compa|re the c|
|00002880| 6f 6e 74 65 6e 74 73 20 | 6f 66 20 74 77 6f 20 68 |ontents |of two h|
|00002890| 61 6e 64 6c 65 73 20 61 | 6e 64 20 72 65 74 75 72 |andles a|nd retur|
|000028a0| 6e 20 54 52 55 45 20 69 | 66 20 74 68 65 79 27 72 |n TRUE i|f they'r|
|000028b0| 65 20 65 71 75 61 6c 2e | 20 49 66 20 6f 6e 65 20 |e equal.| If one |
|000028c0| 6f 72 20 62 6f 74 68 0d | 68 61 6e 64 6c 65 73 20 |or both.|handles |
|000028d0| 61 72 65 20 4e 55 4c 4c | 2c 20 74 68 69 73 20 72 |are NULL|, this r|
|000028e0| 65 74 75 72 6e 73 20 46 | 41 4c 53 45 2e 20 48 61 |eturns F|ALSE. Ha|
|000028f0| 6e 64 6c 65 73 20 77 69 | 74 68 20 64 69 66 66 65 |ndles wi|th diffe|
|00002900| 72 69 6e 67 20 73 69 7a | 65 73 20 61 72 65 20 6e |ring siz|es are n|
|00002910| 6f 74 20 63 6f 6e 73 69 | 64 65 72 65 64 0d 65 71 |ot consi|dered.eq|
|00002920| 75 61 6c 20 65 76 65 6e | 20 69 66 20 74 68 65 20 |ual even| if the |
|00002930| 73 6d 61 6c 6c 65 72 20 | 68 61 6e 64 6c 65 27 73 |smaller |handle's|
|00002940| 20 64 61 74 61 20 6d 61 | 74 63 68 65 73 20 74 68 | data ma|tches th|
|00002950| 65 20 6f 74 68 65 72 20 | 68 61 6e 64 6c 65 27 73 |e other |handle's|
|00002960| 20 64 61 74 61 20 65 78 | 61 63 74 6c 79 20 66 6f | data ex|actly fo|
|00002970| 72 20 69 74 73 0d 6c 65 | 6e 67 74 68 2e 20 49 6e |r its.le|ngth. In|
|00002980| 74 65 72 6e 61 6c 6c 79 | 20 74 68 69 73 20 63 61 |ternally| this ca|
|00002990| 6c 6c 73 20 45 71 75 61 | 6c 4d 65 6d 20 61 62 6f |lls Equa|lMem abo|
|000029a0| 76 65 2e 20 49 66 20 62 | 6f 74 68 20 68 61 6e 64 |ve. If b|oth hand|
|000029b0| 6c 65 73 20 61 72 65 20 | 65 6d 70 74 79 20 6f 72 |les are |empty or|
|000029c0| 20 7a 65 72 6f 20 73 69 | 7a 65 64 2c 0d 74 68 69 | zero si|zed,.thi|
|000029d0| 73 20 77 69 6c 6c 20 72 | 65 74 75 72 6e 20 46 41 |s will r|eturn FA|
|000029e0| 4c 53 45 2c 20 65 76 65 | 6e 20 74 68 6f 75 67 68 |LSE, eve|n though|
|000029f0| 20 74 68 65 79 20 61 72 | 65 20 22 65 71 75 61 6c | they ar|e "equal|
|00002a00| 22 20 69 6e 20 6f 6e 65 | 20 73 65 6e 73 65 2e 0d |" in one| sense..|
|00002a10| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002a20| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002a30| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002a40| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002a50| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002a60| 2d 2d 2d 2d 2d 2d 2d 2d | 2a 2f 0d 0d 42 6f 6f 6c |--------|*/..Bool|
|00002a70| 65 61 6e 09 09 45 71 75 | 61 6c 48 61 6e 64 6c 65 |ean..Equ|alHandle|
|00002a80| 28 20 48 61 6e 64 6c 65 | 20 61 2c 20 48 61 6e 64 |( Handle| a, Hand|
|00002a90| 6c 65 20 62 20 29 0d 7b | 0d 09 6c 6f 6e 67 09 73 |le b ).{|..long.s|
|00002aa0| 69 7a 61 2c 20 73 69 7a | 62 3b 0d 09 0d 09 69 66 |iza, siz|b;....if|
|00002ab0| 20 28 20 61 20 3d 3d 20 | 4e 55 4c 4c 20 7c 7c 20 | ( a == |NULL || |
|00002ac0| 62 20 3d 3d 20 4e 55 4c | 4c 20 29 0d 09 09 72 65 |b == NUL|L )...re|
|00002ad0| 74 75 72 6e 20 46 41 4c | 53 45 3b 0d 09 09 0d 09 |turn FAL|SE;.....|
|00002ae0| 73 69 7a 61 20 3d 20 47 | 65 74 48 61 6e 64 6c 65 |siza = G|etHandle|
|00002af0| 53 69 7a 65 28 20 61 20 | 29 3b 0d 09 73 69 7a 62 |Size( a |);..sizb|
|00002b00| 20 3d 20 47 65 74 48 61 | 6e 64 6c 65 53 69 7a 65 | = GetHa|ndleSize|
|00002b10| 28 20 62 09 29 3b 0d 09 | 0d 09 69 66 20 28 20 73 |( b.);..|..if ( s|
|00002b20| 69 7a 61 20 21 3d 20 73 | 69 7a 62 20 29 0d 09 09 |iza != s|izb )...|
|00002b30| 72 65 74 75 72 6e 20 46 | 41 4c 53 45 3b 0d 09 0d |return F|ALSE;...|
|00002b40| 09 2f 2f 20 6e 2e 62 2d | 2d 20 6e 6f 20 6e 65 65 |.// n.b-|- no nee|
|00002b50| 64 20 74 6f 20 6c 6f 63 | 6b 20 68 61 6e 64 6c 65 |d to loc|k handle|
|00002b60| 73 2d 20 45 71 75 61 6c | 4d 65 6d 20 63 61 6e 6e |s- Equal|Mem cann|
|00002b70| 6f 74 20 6d 6f 76 65 20 | 6d 65 6d 6f 72 79 2e 0d |ot move |memory..|
|00002b80| 09 09 0d 09 72 65 74 75 | 72 6e 09 45 71 75 61 6c |....retu|rn.Equal|
|00002b90| 4d 65 6d 28 20 2a 61 2c | 20 2a 62 2c 20 73 69 7a |Mem( *a,| *b, siz|
|00002ba0| 61 20 29 3b 0d 7d 0d 0d | 0d 2f 2a 2d 2d 2d 2d 2d |a );.}..|./*-----|
|00002bb0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002bc0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2a 2a 2a 20 20 |--------|---*** |
|00002bd0| 53 43 41 4c 45 32 52 45 | 43 54 53 20 20 2a 2a 2a |SCALE2RE|CTS ***|
|00002be0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002bf0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002c00| 2d 2a 2f 0d 2f 2a 09 0d | 74 68 69 73 20 66 75 6e |-*/./*..|this fun|
|00002c10| 63 74 69 6f 6e 20 72 65 | 73 69 7a 65 73 20 3c 74 |ction re|sizes <t|
|00002c20| 68 65 52 65 63 74 3e 20 | 73 6f 20 74 68 61 74 20 |heRect> |so that |
|00002c30| 69 74 20 77 69 6c 6c 20 | 66 69 74 20 69 6e 74 6f |it will |fit into|
|00002c40| 20 3c 72 65 66 52 65 63 | 74 3e 2c 20 62 75 74 20 | <refRec|t>, but |
|00002c50| 70 72 65 73 65 72 76 69 | 6e 67 20 69 74 73 0d 6f |preservi|ng its.o|
|00002c60| 72 69 67 69 6e 61 6c 20 | 61 73 70 65 63 74 20 72 |riginal |aspect r|
|00002c70| 61 74 69 6f 2e 20 54 68 | 69 73 20 69 73 20 75 73 |atio. Th|is is us|
|00002c80| 65 66 75 6c 20 66 6f 72 | 20 70 72 65 76 65 6e 74 |eful for| prevent|
|00002c90| 69 6e 67 20 75 6e 77 61 | 6e 74 65 64 20 73 74 72 |ing unwa|nted str|
|00002ca0| 65 74 63 68 69 6e 67 20 | 6f 66 20 70 69 63 74 75 |etching |of pictu|
|00002cb0| 72 65 73 0d 62 6f 74 68 | 20 66 6f 72 20 63 72 65 |res.both| for cre|
|00002cc0| 61 74 69 6f 6e 20 61 6e | 64 20 64 69 73 70 6c 61 |ation an|d displa|
|00002cd0| 79 20 6f 66 20 70 72 65 | 76 69 65 77 20 69 6d 61 |y of pre|view ima|
|00002ce0| 67 65 73 2e 20 4e 6f 74 | 65 20 74 68 69 73 20 61 |ges. Not|e this a|
|00002cf0| 6c 73 6f 20 63 65 6e 74 | 72 65 73 20 74 68 65 20 |lso cent|res the |
|00002d00| 72 65 63 74 20 77 69 74 | 68 69 6e 0d 74 68 65 20 |rect wit|hin.the |
|00002d10| 72 65 66 52 65 63 74 20 | 66 6f 72 20 74 68 65 20 |refRect |for the |
|00002d20| 73 68 6f 72 74 65 72 20 | 64 69 6d 65 6e 73 69 6f |shorter |dimensio|
|00002d30| 6e 2e 20 54 68 69 73 20 | 69 73 20 74 68 65 20 6d |n. This |is the m|
|00002d40| 6f 72 65 20 69 6e 74 75 | 69 74 69 76 65 6c 79 20 |ore intu|itively |
|00002d50| 63 6f 72 72 65 63 74 20 | 62 65 68 61 76 69 6f 75 |correct |behaviou|
|00002d60| 72 0d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |r.------|--------|
|00002d70| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002d80| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002d90| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002da0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002db0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2a 2f 0d 0d 76 6f |--------|--*/..vo|
|00002dc0| 69 64 09 53 63 61 6c 65 | 32 52 65 63 74 73 28 20 |id.Scale|2Rects( |
|00002dd0| 52 65 63 74 20 2a 74 68 | 65 52 65 63 74 2c 20 52 |Rect *th|eRect, R|
|00002de0| 65 63 74 20 2a 72 65 66 | 52 65 63 74 20 29 0d 7b |ect *ref|Rect ).{|
|00002df0| 0d 09 46 69 78 65 64 20 | 09 61 73 70 65 63 74 52 |..Fixed |.aspectR|
|00002e00| 61 74 69 6f 3b 0d 09 52 | 65 63 74 09 64 65 73 74 |atio;..R|ect.dest|
|00002e10| 46 72 61 6d 65 3b 0d 09 | 73 68 6f 72 74 09 72 65 |Frame;..|short.re|
|00002e20| 66 57 69 64 74 68 2c 72 | 65 66 48 65 69 67 68 74 |fWidth,r|efHeight|
|00002e30| 3b 0d 09 0d 09 64 65 73 | 74 46 72 61 6d 65 2e 74 |;....des|tFrame.t|
|00002e40| 6f 70 20 3d 20 64 65 73 | 74 46 72 61 6d 65 2e 6c |op = des|tFrame.l|
|00002e50| 65 66 74 20 3d 20 30 3b | 0d 09 4f 66 66 73 65 74 |eft = 0;|..Offset|
|00002e60| 52 65 63 74 28 74 68 65 | 52 65 63 74 2c 2d 74 68 |Rect(the|Rect,-th|
|00002e70| 65 52 65 63 74 2d 3e 6c | 65 66 74 2c 2d 74 68 65 |eRect->l|eft,-the|
|00002e80| 52 65 63 74 2d 3e 74 6f | 70 29 3b 0d 09 0d 09 72 |Rect->to|p);....r|
|00002e90| 65 66 57 69 64 74 68 20 | 3d 20 72 65 66 52 65 63 |efWidth |= refRec|
|00002ea0| 74 2d 3e 72 69 67 68 74 | 20 2d 20 72 65 66 52 65 |t->right| - refRe|
|00002eb0| 63 74 2d 3e 6c 65 66 74 | 3b 0d 09 72 65 66 48 65 |ct->left|;..refHe|
|00002ec0| 69 67 68 74 20 3d 20 72 | 65 66 52 65 63 74 2d 3e |ight = r|efRect->|
|00002ed0| 62 6f 74 74 6f 6d 20 2d | 20 72 65 66 52 65 63 74 |bottom -| refRect|
|00002ee0| 2d 3e 74 6f 70 3b 0d 09 | 0d 09 69 66 20 28 74 68 |->top;..|..if (th|
|00002ef0| 65 52 65 63 74 2d 3e 72 | 69 67 68 74 20 3c 20 74 |eRect->r|ight < t|
|00002f00| 68 65 52 65 63 74 2d 3e | 62 6f 74 74 6f 6d 29 0d |heRect->|bottom).|
|00002f10| 09 7b 0d 09 09 2f 2f 20 | 74 68 65 20 72 65 63 74 |.{...// |the rect|
|00002f20| 20 69 73 20 74 61 6c 6c | 65 72 20 74 68 61 6e 20 | is tall|er than |
|00002f30| 69 74 20 69 73 20 77 69 | 64 65 2c 20 73 6f 20 77 |it is wi|de, so w|
|00002f40| 65 20 63 65 6e 74 72 65 | 20 68 6f 72 69 7a 6f 6e |e centre| horizon|
|00002f50| 74 61 6c 6c 79 0d 09 09 | 0d 09 09 61 73 70 65 63 |tally...|...aspec|
|00002f60| 74 52 61 74 69 6f 20 3d | 20 46 69 78 52 61 74 69 |tRatio =| FixRati|
|00002f70| 6f 28 74 68 65 52 65 63 | 74 2d 3e 72 69 67 68 74 |o(theRec|t->right|
|00002f80| 2c 74 68 65 52 65 63 74 | 2d 3e 62 6f 74 74 6f 6d |,theRect|->bottom|
|00002f90| 29 3b 0d 09 09 64 65 73 | 74 46 72 61 6d 65 2e 72 |);...des|tFrame.r|
|00002fa0| 69 67 68 74 20 3d 20 46 | 69 78 52 6f 75 6e 64 28 |ight = F|ixRound(|
|00002fb0| 46 69 78 4d 75 6c 28 61 | 73 70 65 63 74 52 61 74 |FixMul(a|spectRat|
|00002fc0| 69 6f 2c 46 69 78 52 61 | 74 69 6f 28 72 65 66 48 |io,FixRa|tio(refH|
|00002fd0| 65 69 67 68 74 2c 31 29 | 29 29 3b 0d 09 09 64 65 |eight,1)|));...de|
|00002fe0| 73 74 46 72 61 6d 65 2e | 62 6f 74 74 6f 6d 20 3d |stFrame.|bottom =|
|00002ff0| 20 72 65 66 48 65 69 67 | 68 74 3b 0d 09 09 0d 09 | refHeig|ht;.....|
|00003000| 09 4f 66 66 73 65 74 52 | 65 63 74 28 26 64 65 73 |.OffsetR|ect(&des|
|00003010| 74 46 72 61 6d 65 2c 72 | 65 66 52 65 63 74 2d 3e |tFrame,r|efRect->|
|00003020| 6c 65 66 74 20 2b 20 28 | 28 72 65 66 57 69 64 74 |left + (|(refWidt|
|00003030| 68 20 2d 20 64 65 73 74 | 46 72 61 6d 65 2e 72 69 |h - dest|Frame.ri|
|00003040| 67 68 74 29 20 2f 20 32 | 29 2c 72 65 66 52 65 63 |ght) / 2|),refRec|
|00003050| 74 2d 3e 74 6f 70 29 3b | 0d 09 7d 0d 09 65 6c 73 |t->top);|..}..els|
|00003060| 65 0d 09 7b 0d 09 09 2f | 2f 20 74 68 65 20 72 65 |e..{.../|/ the re|
|00003070| 63 74 20 69 73 20 77 69 | 64 65 72 20 74 68 61 6e |ct is wi|der than|
|00003080| 20 69 74 20 69 73 20 74 | 61 6c 6c 2c 20 73 6f 20 | it is t|all, so |
|00003090| 77 65 20 63 65 6e 74 72 | 65 20 76 65 72 74 69 63 |we centr|e vertic|
|000030a0| 61 6c 6c 79 20 0d 09 09 | 0d 09 09 61 73 70 65 63 |ally ...|...aspec|
|000030b0| 74 52 61 74 69 6f 20 3d | 20 46 69 78 52 61 74 69 |tRatio =| FixRati|
|000030c0| 6f 28 74 68 65 52 65 63 | 74 2d 3e 62 6f 74 74 6f |o(theRec|t->botto|
|000030d0| 6d 2c 74 68 65 52 65 63 | 74 2d 3e 72 69 67 68 74 |m,theRec|t->right|
|000030e0| 29 3b 0d 09 09 64 65 73 | 74 46 72 61 6d 65 2e 62 |);...des|tFrame.b|
|000030f0| 6f 74 74 6f 6d 20 3d 20 | 46 69 78 52 6f 75 6e 64 |ottom = |FixRound|
|00003100| 28 46 69 78 4d 75 6c 28 | 61 73 70 65 63 74 52 61 |(FixMul(|aspectRa|
|00003110| 74 69 6f 2c 46 69 78 52 | 61 74 69 6f 28 72 65 66 |tio,FixR|atio(ref|
|00003120| 57 69 64 74 68 2c 31 29 | 29 29 3b 0d 09 09 64 65 |Width,1)|));...de|
|00003130| 73 74 46 72 61 6d 65 2e | 72 69 67 68 74 20 3d 20 |stFrame.|right = |
|00003140| 72 65 66 57 69 64 74 68 | 3b 0d 09 09 0d 09 09 4f |refWidth|;......O|
|00003150| 66 66 73 65 74 52 65 63 | 74 28 26 64 65 73 74 46 |ffsetRec|t(&destF|
|00003160| 72 61 6d 65 2c 72 65 66 | 52 65 63 74 2d 3e 6c 65 |rame,ref|Rect->le|
|00003170| 66 74 2c 72 65 66 52 65 | 63 74 2d 3e 74 6f 70 20 |ft,refRe|ct->top |
|00003180| 2b 20 28 28 72 65 66 48 | 65 69 67 68 74 20 2d 20 |+ ((refH|eight - |
|00003190| 64 65 73 74 46 72 61 6d | 65 2e 62 6f 74 74 6f 6d |destFram|e.bottom|
|000031a0| 29 20 2f 20 32 29 29 3b | 0d 09 7d 0d 09 2a 74 68 |) / 2));|..}..*th|
|000031b0| 65 52 65 63 74 20 3d 20 | 64 65 73 74 46 72 61 6d |eRect = |destFram|
|000031c0| 65 3b 0d 7d 0d 0d 0d 2f | 2a 2d 2d 2d 2d 2d 2d 2d |e;.}.../|*-------|
|000031d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000031e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2a 2a 2a 20 20 52 45 41 |--------|*** REA|
|000031f0| 4c 54 4f 53 54 52 49 4e | 47 20 20 2a 2a 2a 2d 2d |LTOSTRIN|G ***--|
|00003200| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003210| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2a |--------|-------*|
|00003220| 2f 0d 2f 2a 09 0d 63 6f | 6e 76 65 72 74 61 20 72 |/./*..co|nverta r|
|00003230| 65 61 6c 20 76 61 6c 75 | 65 20 3c 6e 75 6d 3e 2c |eal valu|e <num>,|
|00003240| 20 69 6e 74 6f 20 61 20 | 70 61 73 63 61 6c 20 73 | into a |pascal s|
|00003250| 74 72 69 6e 67 2c 20 74 | 6f 20 3c 64 65 63 50 6c |tring, t|o <decPl|
|00003260| 61 63 65 73 3e 20 61 63 | 63 75 72 61 63 79 0d 2d |aces> ac|curacy.-|
|00003270| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003280| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003290| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000032a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000032b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000032c0| 2d 2d 2d 2d 2d 2d 2d 2a | 2f 0d 0d 0d 76 6f 69 64 |-------*|/...void|
|000032d0| 20 52 65 61 6c 54 6f 53 | 74 72 69 6e 67 28 20 63 | RealToS|tring( c|
|000032e0| 6f 6e 73 74 20 64 6f 75 | 62 6c 65 20 6e 75 6d 2c |onst dou|ble num,|
|000032f0| 20 53 74 72 32 35 35 26 | 20 73 74 72 2c 20 73 68 | Str255&| str, sh|
|00003300| 6f 72 74 20 64 65 63 50 | 6c 61 63 65 73 20 29 0d |ort decP|laces ).|
|00003310| 7b 0d 09 64 65 63 69 6d | 61 6c 20 09 64 3b 0d 09 |{..decim|al .d;..|
|00003320| 64 65 63 66 6f 72 6d 09 | 09 64 66 3b 0d 09 0d 09 |decform.|.df;....|
|00003330| 64 66 2e 73 74 79 6c 65 | 20 3d 20 46 49 58 45 44 |df.style| = FIXED|
|00003340| 44 45 43 49 4d 41 4c 3b | 0d 09 64 66 2e 64 69 67 |DECIMAL;|..df.dig|
|00003350| 69 74 73 20 3d 20 64 65 | 63 50 6c 61 63 65 73 3b |its = de|cPlaces;|
|00003360| 0d 09 0d 09 6e 75 6d 32 | 64 65 63 28 20 26 64 66 |....num2|dec( &df|
|00003370| 2c 20 6e 75 6d 2c 20 26 | 64 20 29 3b 0d 09 64 65 |, num, &|d );..de|
|00003380| 63 32 73 74 72 28 20 26 | 64 66 2c 20 26 64 2c 20 |c2str( &|df, &d, |
|00003390| 28 63 68 61 72 2a 29 20 | 26 73 74 72 5b 31 5d 20 |(char*) |&str[1] |
|000033a0| 29 3b 0d 09 0d 09 2f 2f | 20 73 65 74 20 6c 65 6e |);....//| set len|
|000033b0| 67 74 68 20 6f 66 20 70 | 61 73 63 61 6c 20 73 74 |gth of p|ascal st|
|000033c0| 72 69 6e 67 20 62 79 20 | 73 63 61 6e 6e 69 6e 67 |ring by |scanning|
|000033d0| 20 75 6e 74 69 6c 20 77 | 65 20 72 65 61 63 68 20 | until w|e reach |
|000033e0| 6e 75 6c 6c 20 74 65 72 | 6d 69 6e 61 74 6f 72 0d |null ter|minator.|
|000033f0| 09 0d 09 73 74 72 5b 30 | 5d 20 3d 20 30 3b 0d 09 |...str[0|] = 0;..|
|00003400| 77 68 69 6c 65 28 20 73 | 74 72 5b 2b 2b 73 74 72 |while( s|tr[++str|
|00003410| 5b 30 5d 5d 20 29 7b 7d | 3b 09 09 2f 2f 20 6e 6f |[0]] ){}|;..// no|
|00003420| 20 65 72 72 6f 72 20 68 | 65 72 65 2c 20 69 67 6e | error h|ere, ign|
|00003430| 6f 72 65 20 77 61 72 6e | 69 6e 67 2e 0d 7d 0d 0d |ore warn|ing..}..|
|00003440| 0d 2f 2a 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |./*-----|--------|
|00003450| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003460| 2d 2d 2a 2a 2a 20 20 46 | 52 41 4d 45 47 52 41 59 |--*** F|RAMEGRAY|
|00003470| 52 45 43 54 20 20 2a 2a | 2a 2d 2d 2d 2d 2d 2d 2d |RECT **|*-------|
|00003480| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003490| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2a 2f 0d 2f 2a 09 |--------|--*/./*.|
|000034a0| 0d 64 72 61 77 20 61 20 | 33 44 20 65 66 66 65 63 |.draw a |3D effec|
|000034b0| 74 20 66 72 61 6d 65 20 | 61 72 6f 75 6e 64 20 3c |t frame |around <|
|000034c0| 61 52 65 63 74 3e 0d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |aRect>.-|--------|
|000034d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000034e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000034f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003500| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003510| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2a |--------|-------*|
|00003520| 2f 0d 0d 0d 0d 76 6f 69 | 64 09 46 72 61 6d 65 47 |/....voi|d.FrameG|
|00003530| 72 61 79 52 65 63 74 28 | 20 52 65 63 74 2a 20 61 |rayRect(| Rect* a|
|00003540| 52 65 63 74 20 29 0d 7b | 0d 09 52 65 63 74 09 09 |Rect ).{|..Rect..|
|00003550| 67 6c 6f 62 52 65 63 74 | 3b 0d 09 47 44 48 61 6e |globRect|;..GDHan|
|00003560| 64 6c 65 09 61 44 65 76 | 3b 0d 09 52 47 42 43 6f |dle.aDev|;..RGBCo|
|00003570| 6c 6f 72 09 61 43 6f 6c | 6f 75 72 3b 0d 09 52 47 |lor.aCol|our;..RG|
|00003580| 42 43 6f 6c 6f 72 09 62 | 43 6f 6c 6f 75 72 3b 0d |BColor.b|Colour;.|
|00003590| 09 0d 09 2f 2f 20 66 72 | 61 6d 65 73 20 61 20 72 |...// fr|ames a r|
|000035a0| 65 63 74 61 6e 67 6c 65 | 20 75 73 69 6e 67 20 74 |ectangle| using t|
|000035b0| 77 6f 20 73 68 61 64 65 | 73 20 6f 66 20 67 72 61 |wo shade|s of gra|
|000035c0| 79 20 73 6f 20 74 68 61 | 74 20 74 68 65 20 72 65 |y so tha|t the re|
|000035d0| 63 74 61 6e 67 6c 65 20 | 61 70 70 65 61 72 73 20 |ctangle |appears |
|000035e0| 74 6f 0d 09 2f 2f 20 62 | 65 20 72 65 63 65 73 73 |to..// b|e recess|
|000035f0| 65 64 20 69 6e 74 6f 20 | 61 20 67 72 61 79 20 73 |ed into |a gray s|
|00003600| 75 72 66 61 63 65 2e 20 | 54 68 69 73 20 61 63 74 |urface. |This act|
|00003610| 75 61 6c 6c 79 20 64 72 | 61 77 73 20 31 20 70 69 |ually dr|aws 1 pi|
|00003620| 78 65 6c 20 6f 75 74 73 | 69 64 65 20 74 68 65 0d |xel outs|ide the.|
|00003630| 09 2f 2f 20 70 61 73 73 | 65 64 20 72 65 63 74 61 |.// pass|ed recta|
|00003640| 6e 67 6c 65 2c 20 73 6f | 20 74 68 61 74 20 6e 6f |ngle, so| that no|
|00003650| 72 6d 61 6c 20 46 72 61 | 6d 65 52 65 63 74 20 63 |rmal Fra|meRect c|
|00003660| 61 6c 6c 73 20 77 6f 72 | 6b 20 61 73 20 65 78 70 |alls wor|k as exp|
|00003670| 65 63 74 65 64 20 69 6e | 20 61 64 64 69 74 69 6f |ected in| additio|
|00003680| 6e 2e 0d 09 0d 09 50 65 | 6e 4e 6f 72 6d 61 6c 28 |n.....Pe|nNormal(|
|00003690| 29 3b 0d 09 0d 09 67 6c | 6f 62 52 65 63 74 20 3d |);....gl|obRect =|
|000036a0| 20 2a 61 52 65 63 74 3b | 0d 09 4c 6f 63 61 6c 54 | *aRect;|..LocalT|
|000036b0| 6f 47 6c 6f 62 61 6c 28 | 20 26 74 6f 70 4c 65 66 |oGlobal(| &topLef|
|000036c0| 74 28 20 67 6c 6f 62 52 | 65 63 74 20 29 29 3b 0d |t( globR|ect ));.|
|000036d0| 09 4c 6f 63 61 6c 54 6f | 47 6c 6f 62 61 6c 28 20 |.LocalTo|Global( |
|000036e0| 26 62 6f 74 52 69 67 68 | 74 28 20 67 6c 6f 62 52 |&botRigh|t( globR|
|000036f0| 65 63 74 20 29 29 3b 0d | 09 61 44 65 76 20 3d 20 |ect ));.|.aDev = |
|00003700| 47 65 74 4d 61 78 44 65 | 76 69 63 65 28 20 26 67 |GetMaxDe|vice( &g|
|00003710| 6c 6f 62 52 65 63 74 20 | 29 3b 0d 09 0d 09 47 65 |lobRect |);....Ge|
|00003720| 74 42 61 63 6b 43 6f 6c | 6f 72 28 20 26 61 43 6f |tBackCol|or( &aCo|
|00003730| 6c 6f 75 72 20 29 3b 0d | 09 62 43 6f 6c 6f 75 72 |lour );.|.bColour|
|00003740| 2e 72 65 64 20 3d 20 62 | 43 6f 6c 6f 75 72 2e 67 |.red = b|Colour.g|
|00003750| 72 65 65 6e 20 3d 20 62 | 43 6f 6c 6f 75 72 2e 62 |reen = b|Colour.b|
|00003760| 6c 75 65 20 3d 20 30 78 | 46 46 46 46 3b 0d 09 2f |lue = 0x|FFFF;../|
|00003770| 2f 47 65 74 47 72 61 79 | 28 20 61 44 65 76 2c 20 |/GetGray|( aDev, |
|00003780| 26 61 43 6f 6c 6f 75 72 | 2c 20 26 62 43 6f 6c 6f |&aColour|, &bColo|
|00003790| 75 72 20 29 3b 0d 09 0d | 09 52 47 42 46 6f 72 65 |ur );...|.RGBFore|
|000037a0| 43 6f 6c 6f 72 28 20 26 | 62 43 6f 6c 6f 75 72 20 |Color( &|bColour |
|000037b0| 29 3b 0d 09 4d 6f 76 65 | 54 6f 28 20 61 52 65 63 |);..Move|To( aRec|
|000037c0| 74 2d 3e 6c 65 66 74 2c | 20 61 52 65 63 74 2d 3e |t->left,| aRect->|
|000037d0| 62 6f 74 74 6f 6d 20 29 | 3b 0d 09 4c 69 6e 65 54 |bottom )|;..LineT|
|000037e0| 6f 28 20 61 52 65 63 74 | 2d 3e 72 69 67 68 74 2c |o( aRect|->right,|
|000037f0| 20 61 52 65 63 74 2d 3e | 62 6f 74 74 6f 6d 20 29 | aRect->|bottom )|
|00003800| 3b 0d 09 4c 69 6e 65 54 | 6f 28 20 61 52 65 63 74 |;..LineT|o( aRect|
|00003810| 2d 3e 72 69 67 68 74 2c | 20 61 52 65 63 74 2d 3e |->right,| aRect->|
|00003820| 74 6f 70 20 29 3b 0d 09 | 0d 09 62 43 6f 6c 6f 75 |top );..|..bColou|
|00003830| 72 2e 72 65 64 20 3d 20 | 62 43 6f 6c 6f 75 72 2e |r.red = |bColour.|
|00003840| 67 72 65 65 6e 20 3d 20 | 62 43 6f 6c 6f 75 72 2e |green = |bColour.|
|00003850| 62 6c 75 65 20 3d 20 30 | 3b 0d 09 47 65 74 47 72 |blue = 0|;..GetGr|
|00003860| 61 79 28 20 61 44 65 76 | 2c 20 26 61 43 6f 6c 6f |ay( aDev|, &aColo|
|00003870| 75 72 2c 20 26 62 43 6f | 6c 6f 75 72 20 29 3b 0d |ur, &bCo|lour );.|
|00003880| 09 52 47 42 46 6f 72 65 | 43 6f 6c 6f 72 28 20 26 |.RGBFore|Color( &|
|00003890| 62 43 6f 6c 6f 75 72 20 | 29 3b 0d 09 0d 09 4d 6f |bColour |);....Mo|
|000038a0| 76 65 28 20 30 2c 20 2d | 31 20 29 3b 0d 09 4c 69 |ve( 0, -|1 );..Li|
|000038b0| 6e 65 54 6f 28 20 61 52 | 65 63 74 2d 3e 6c 65 66 |neTo( aR|ect->lef|
|000038c0| 74 20 2d 20 31 2c 20 61 | 52 65 63 74 2d 3e 74 6f |t - 1, a|Rect->to|
|000038d0| 70 20 2d 20 31 20 29 3b | 0d 09 4c 69 6e 65 54 6f |p - 1 );|..LineTo|
|000038e0| 28 20 61 52 65 63 74 2d | 3e 6c 65 66 74 20 2d 20 |( aRect-|>left - |
|000038f0| 31 2c 20 61 52 65 63 74 | 2d 3e 62 6f 74 74 6f 6d |1, aRect|->bottom|
|00003900| 20 29 3b 0d 09 0d 09 46 | 6f 72 65 43 6f 6c 6f 72 | );....F|oreColor|
|00003910| 28 20 62 6c 61 63 6b 43 | 6f 6c 6f 72 20 29 3b 0d |( blackC|olor );.|
|00003920| 7d 0d 0d 0d 0d 2f 2a 2d | 2d 2d 2d 2d 2d 2d 2d 2d |}..../*-|--------|
|00003930| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003940| 2d 2d 2d 2d 2d 2d 2a 2a | 2a 20 20 45 54 43 48 47 |------**|* ETCHG|
|00003950| 52 41 59 52 45 43 54 20 | 20 2a 2a 2a 2d 2d 2d 2d |RAYRECT | ***----|
|00003960| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003970| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2a 2f 0d |--------|-----*/.|
|00003980| 2f 2a 09 0d 64 72 61 77 | 20 61 20 33 44 20 22 65 |/*..draw| a 3D "e|
|00003990| 74 63 68 65 64 22 20 66 | 72 61 6d 65 20 61 72 6f |tched" f|rame aro|
|000039a0| 75 6e 64 20 3c 61 52 65 | 63 74 3e 0d 2d 2d 2d 2d |und <aRe|ct>.----|
|000039b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000039c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000039d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000039e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000039f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003a00| 2d 2d 2d 2d 2a 2f 0d 0d | 76 6f 69 64 09 45 74 63 |----*/..|void.Etc|
|00003a10| 68 47 72 61 79 52 65 63 | 74 28 20 52 65 63 74 2a |hGrayRec|t( Rect*|
|00003a20| 20 61 52 65 63 74 20 29 | 0d 7b 0d 09 52 65 63 74 | aRect )|.{..Rect|
|00003a30| 09 09 72 2c 20 67 6c 6f | 62 52 65 63 74 3b 0d 09 |..r, glo|bRect;..|
|00003a40| 47 44 48 61 6e 64 6c 65 | 09 61 44 65 76 3b 0d 09 |GDHandle|.aDev;..|
|00003a50| 52 47 42 43 6f 6c 6f 72 | 09 61 43 6f 6c 6f 75 72 |RGBColor|.aColour|
|00003a60| 3b 0d 09 52 47 42 43 6f | 6c 6f 72 09 62 43 6f 6c |;..RGBCo|lor.bCol|
|00003a70| 6f 75 72 3b 0d 09 0d 09 | 2f 2f 20 66 72 61 6d 65 |our;....|// frame|
|00003a80| 73 20 61 20 72 65 63 74 | 61 6e 67 6c 65 20 75 73 |s a rect|angle us|
|00003a90| 69 6e 67 20 74 77 6f 20 | 73 68 61 64 65 73 20 6f |ing two |shades o|
|00003aa0| 66 20 67 72 61 79 20 73 | 6f 20 74 68 61 74 20 74 |f gray s|o that t|
|00003ab0| 68 65 20 72 65 63 74 61 | 6e 67 6c 65 20 61 70 70 |he recta|ngle app|
|00003ac0| 65 61 72 73 20 74 6f 0d | 09 2f 2f 20 62 65 20 72 |ears to.|.// be r|
|00003ad0| 65 63 65 73 73 65 64 20 | 69 6e 74 6f 20 61 20 67 |ecessed |into a g|
|00003ae0| 72 61 79 20 73 75 72 66 | 61 63 65 2e 20 54 68 69 |ray surf|ace. Thi|
|00003af0| 73 20 64 69 66 66 65 72 | 73 20 66 72 6f 6d 20 46 |s differ|s from F|
|00003b00| 72 61 6d 65 47 72 61 79 | 52 65 63 74 20 69 6e 20 |rameGray|Rect in |
|00003b10| 74 68 61 74 20 69 74 20 | 64 72 61 77 73 0d 09 2f |that it |draws../|
|00003b20| 2f 61 20 32 2d 70 69 78 | 65 6c 20 72 65 63 74 20 |/a 2-pix|el rect |
|00003b30| 74 68 61 74 20 61 70 70 | 65 61 72 73 20 74 6f 20 |that app|ears to |
|00003b40| 72 65 63 65 73 73 20 69 | 6e 74 6f 20 74 68 65 20 |recess i|nto the |
|00003b50| 73 75 72 66 61 63 65 2c | 20 66 6f 72 20 64 65 63 |surface,| for dec|
|00003b60| 6f 72 61 74 69 76 65 20 | 70 75 72 70 6f 73 65 73 |orative |purposes|
|00003b70| 2e 0d 09 0d 09 50 65 6e | 4e 6f 72 6d 61 6c 28 29 |.....Pen|Normal()|
|00003b80| 3b 0d 09 0d 09 67 6c 6f | 62 52 65 63 74 20 3d 20 |;....glo|bRect = |
|00003b90| 72 20 3d 20 2a 61 52 65 | 63 74 3b 0d 09 4c 6f 63 |r = *aRe|ct;..Loc|
|00003ba0| 61 6c 54 6f 47 6c 6f 62 | 61 6c 28 20 26 74 6f 70 |alToGlob|al( &top|
|00003bb0| 4c 65 66 74 28 20 67 6c | 6f 62 52 65 63 74 20 29 |Left( gl|obRect )|
|00003bc0| 29 3b 0d 09 4c 6f 63 61 | 6c 54 6f 47 6c 6f 62 61 |);..Loca|lToGloba|
|00003bd0| 6c 28 20 26 62 6f 74 52 | 69 67 68 74 28 20 67 6c |l( &botR|ight( gl|
|00003be0| 6f 62 52 65 63 74 20 29 | 29 3b 0d 09 61 44 65 76 |obRect )|);..aDev|
|00003bf0| 20 3d 20 47 65 74 4d 61 | 78 44 65 76 69 63 65 28 | = GetMa|xDevice(|
|00003c00| 20 26 67 6c 6f 62 52 65 | 63 74 20 29 3b 0d 09 0d | &globRe|ct );...|
|00003c10| 09 47 65 74 42 61 63 6b | 43 6f 6c 6f 72 28 20 26 |.GetBack|Color( &|
|00003c20| 61 43 6f 6c 6f 75 72 20 | 29 3b 0d 09 62 43 6f 6c |aColour |);..bCol|
|00003c30| 6f 75 72 2e 72 65 64 20 | 3d 20 62 43 6f 6c 6f 75 |our.red |= bColou|
|00003c40| 72 2e 67 72 65 65 6e 20 | 3d 20 62 43 6f 6c 6f 75 |r.green |= bColou|
|00003c50| 72 2e 62 6c 75 65 20 3d | 20 30 78 46 46 46 46 3b |r.blue =| 0xFFFF;|
|00003c60| 0d 09 2f 2f 47 65 74 47 | 72 61 79 28 20 61 44 65 |..//GetG|ray( aDe|
|00003c70| 76 2c 20 26 61 43 6f 6c | 6f 75 72 2c 20 26 62 43 |v, &aCol|our, &bC|
|00003c80| 6f 6c 6f 75 72 20 29 3b | 0d 09 0d 09 52 47 42 46 |olour );|....RGBF|
|00003c90| 6f 72 65 43 6f 6c 6f 72 | 28 20 26 62 43 6f 6c 6f |oreColor|( &bColo|
|00003ca0| 75 72 20 29 3b 0d 09 46 | 72 61 6d 65 52 65 63 74 |ur );..F|rameRect|
|00003cb0| 28 20 26 72 20 29 3b 0d | 09 0d 09 62 43 6f 6c 6f |( &r );.|...bColo|
|00003cc0| 75 72 2e 72 65 64 20 3d | 20 62 43 6f 6c 6f 75 72 |ur.red =| bColour|
|00003cd0| 2e 67 72 65 65 6e 20 3d | 20 62 43 6f 6c 6f 75 72 |.green =| bColour|
|00003ce0| 2e 62 6c 75 65 20 3d 20 | 30 3b 0d 09 47 65 74 47 |.blue = |0;..GetG|
|00003cf0| 72 61 79 28 20 61 44 65 | 76 2c 20 26 61 43 6f 6c |ray( aDe|v, &aCol|
|00003d00| 6f 75 72 2c 20 26 62 43 | 6f 6c 6f 75 72 20 29 3b |our, &bC|olour );|
|00003d10| 0d 09 52 47 42 46 6f 72 | 65 43 6f 6c 6f 72 28 20 |..RGBFor|eColor( |
|00003d20| 26 62 43 6f 6c 6f 75 72 | 20 29 3b 0d 09 0d 09 4f |&bColour| );....O|
|00003d30| 66 66 73 65 74 52 65 63 | 74 28 20 26 72 2c 20 2d |ffsetRec|t( &r, -|
|00003d40| 31 2c 20 2d 31 20 29 3b | 0d 09 46 72 61 6d 65 52 |1, -1 );|..FrameR|
|00003d50| 65 63 74 28 20 26 72 20 | 29 3b 0d 09 0d 09 46 6f |ect( &r |);....Fo|
|00003d60| 72 65 43 6f 6c 6f 72 28 | 20 62 6c 61 63 6b 43 6f |reColor(| blackCo|
|00003d70| 6c 6f 72 20 29 3b 0d 7d | 0d 0d 0d 2f 2a 2d 2d 2d |lor );.}|.../*---|
|00003d80| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003d90| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2a 2a 2a 20 20 47 45 |--------|-*** GE|
|00003da0| 54 4d 41 49 4e 53 43 52 | 45 45 4e 44 45 50 54 48 |TMAINSCR|EENDEPTH|
|00003db0| 20 20 2a 2a 2a 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d | ***---|--------|
|00003dc0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003dd0| 2d 2d 2d 2a 2f 0d 2f 2a | 09 0d 72 65 74 75 72 6e |---*/./*|..return|
|00003de0| 20 70 69 78 65 6c 20 64 | 65 70 74 68 20 6f 66 20 | pixel d|epth of |
|00003df0| 6d 61 69 6e 20 28 73 74 | 61 72 74 75 70 29 20 73 |main (st|artup) s|
|00003e00| 63 72 65 65 6e 0d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |creen.--|--------|
|00003e10| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003e20| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003e30| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003e40| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003e50| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2a 2f |--------|------*/|
|00003e60| 0d 0d 73 68 6f 72 74 09 | 47 65 74 4d 61 69 6e 53 |..short.|GetMainS|
|00003e70| 63 72 65 65 6e 44 65 70 | 74 68 28 29 0d 7b 0d 09 |creenDep|th().{..|
|00003e80| 47 44 48 61 6e 64 6c 65 | 09 6d 73 3b 0d 09 0d 09 |GDHandle|.ms;....|
|00003e90| 6d 73 20 3d 20 47 65 74 | 4d 61 69 6e 44 65 76 69 |ms = Get|MainDevi|
|00003ea0| 63 65 28 29 3b 0d 09 0d | 09 72 65 74 75 72 6e 20 |ce();...|.return |
|00003eb0| 28 2a 28 2a 6d 73 29 2d | 3e 67 64 50 4d 61 70 29 |(*(*ms)-|>gdPMap)|
|00003ec0| 2d 3e 70 69 78 65 6c 53 | 69 7a 65 3b 0d 7d 0d 0d |->pixelS|ize;.}..|
|00003ed0| 0d 2f 2a 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |./*-----|--------|
|00003ee0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003ef0| 2d 2d 2a 2a 2a 20 20 53 | 48 49 46 54 50 41 54 54 |--*** S|HIFTPATT|
|00003f00| 45 52 4e 20 20 2a 2a 2a | 2d 2d 2d 2d 2d 2d 2d 2d |ERN ***|--------|
|00003f10| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003f20| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2a 2f 0d 2f 2a 09 0d |--------|-*/./*..|
|00003f30| 63 79 63 6c 65 20 61 20 | 62 6c 61 63 6b 20 61 6e |cycle a |black an|
|00003f40| 64 20 77 68 69 74 65 20 | 70 61 74 74 65 72 6e 0d |d white |pattern.|
|00003f50| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003f60| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003f70| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003f80| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003f90| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003fa0| 2d 2d 2d 2d 2d 2d 2d 2d | 2a 2f 0d 0d 76 6f 69 64 |--------|*/..void|
|00003fb0| 09 53 68 69 66 74 50 61 | 74 74 65 72 6e 28 20 50 |.ShiftPa|ttern( P|
|00003fc0| 61 74 74 65 72 6e 2a 20 | 61 50 61 74 20 29 0d 7b |attern* |aPat ).{|
|00003fd0| 0d 09 75 6e 73 69 67 6e | 65 64 20 63 68 61 72 20 |..unsign|ed char |
|00003fe0| 74 6f 70 52 6f 77 2c 20 | 69 3b 0d 09 0d 09 74 6f |topRow, |i;....to|
|00003ff0| 70 52 6f 77 20 3d 20 61 | 50 61 74 2d 3e 70 61 74 |pRow = a|Pat->pat|
|00004000| 5b 30 5d 3b 0d 09 0d 09 | 66 6f 72 28 20 69 20 3d |[0];....|for( i =|
|00004010| 20 30 3b 20 69 20 3c 20 | 37 3b 20 69 2b 2b 20 29 | 0; i < |7; i++ )|
|00004020| 0d 09 09 61 50 61 74 2d | 3e 70 61 74 5b 69 5d 20 |...aPat-|>pat[i] |
|00004030| 3d 20 61 50 61 74 2d 3e | 70 61 74 5b 69 20 2b 20 |= aPat->|pat[i + |
|00004040| 31 5d 3b 0d 09 09 0d 09 | 61 50 61 74 2d 3e 70 61 |1];.....|aPat->pa|
|00004050| 74 5b 37 5d 20 3d 20 74 | 6f 70 52 6f 77 3b 0d 7d |t[7] = t|opRow;.}|
|00004060| 0d 0d 0d 2f 2a 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |.../*---|--------|
|00004070| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004080| 2d 2d 2d 2d 2d 2a 2a 2a | 20 20 41 4e 54 53 52 45 |-----***| ANTSRE|
|00004090| 47 49 4f 4e 20 20 2a 2a | 2a 2d 2d 2d 2d 2d 2d 2d |GION **|*-------|
|000040a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000040b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2a 2f 0d 2f 2a |--------|---*/./*|
|000040c0| 09 0d 69 6d 70 6c 65 6d | 65 6e 74 20 6d 61 72 63 |..implem|ent marc|
|000040d0| 68 69 6e 67 20 61 6e 74 | 73 20 62 79 20 66 72 61 |hing ant|s by fra|
|000040e0| 6d 69 6e 67 20 74 68 65 | 20 72 65 67 69 6f 6e 20 |ming the| region |
|000040f0| 69 6e 20 61 20 66 69 78 | 65 64 20 73 74 72 69 70 |in a fix|ed strip|
|00004100| 65 64 20 70 61 74 74 65 | 72 6e 2e 20 54 68 65 20 |ed patte|rn. The |
|00004110| 70 61 74 74 65 72 6e 20 | 69 73 0d 63 79 63 6c 65 |pattern |is.cycle|
|00004120| 64 20 6f 6e 63 65 20 65 | 61 63 68 20 74 69 6d 65 |d once e|ach time|
|00004130| 20 74 68 69 73 20 69 73 | 20 63 61 6c 6c 65 64 2c | this is| called,|
|00004140| 20 61 6e 64 20 61 20 74 | 69 6d 65 72 20 69 73 20 | and a t|imer is |
|00004150| 75 73 65 64 20 74 6f 20 | 6b 65 65 70 20 74 68 65 |used to |keep the|
|00004160| 20 72 61 74 65 20 63 6f | 6e 73 74 61 6e 74 2d 20 | rate co|nstant- |
|00004170| 79 6f 75 0d 63 61 6e 20 | 74 68 75 73 20 63 61 6c |you.can |thus cal|
|00004180| 6c 20 74 68 69 73 20 72 | 65 70 65 61 74 65 64 6c |l this r|epeatedl|
|00004190| 79 20 74 6f 20 61 6e 69 | 6d 61 74 65 20 6d 61 72 |y to ani|mate mar|
|000041a0| 63 68 69 6e 67 20 61 6e | 74 73 20 61 72 6f 75 6e |ching an|ts aroun|
|000041b0| 64 20 61 20 72 65 67 69 | 6f 6e 2e 20 42 65 20 63 |d a regi|on. Be c|
|000041c0| 61 72 65 66 75 6c 20 6e | 6f 74 0d 74 6f 20 6d 61 |areful n|ot.to ma|
|000041d0| 6b 65 20 74 68 65 20 72 | 65 67 69 6f 6e 20 74 6f |ke the r|egion to|
|000041e0| 6f 20 63 6f 6d 70 6c 65 | 78 2e 0d 2d 2d 2d 2d 2d |o comple|x..-----|
|000041f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004200| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004210| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004220| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004230| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004240| 2d 2d 2d 2a 2f 0d 0d 23 | 64 65 66 69 6e 65 09 09 |---*/..#|define..|
|00004250| 6b 41 6e 74 73 52 61 74 | 65 09 32 0d 0d 76 6f 69 |kAntsRat|e.2..voi|
|00004260| 64 09 41 6e 74 73 52 65 | 67 69 6f 6e 28 20 52 67 |d.AntsRe|gion( Rg|
|00004270| 6e 48 61 6e 64 6c 65 20 | 61 52 67 6e 20 29 0d 7b |nHandle |aRgn ).{|
|00004280| 0d 09 73 74 61 74 69 63 | 20 50 61 74 74 65 72 6e |..static| Pattern|
|00004290| 09 09 09 61 6e 74 73 50 | 61 74 20 3d 20 7b 20 30 |...antsP|at = { 0|
|000042a0| 78 30 46 2c 20 30 78 31 | 45 2c 20 30 78 33 43 2c |x0F, 0x1|E, 0x3C,|
|000042b0| 20 30 78 37 38 2c 20 30 | 78 46 30 2c 20 30 78 45 | 0x78, 0|xF0, 0xE|
|000042c0| 31 2c 20 30 78 43 33 2c | 20 30 78 38 37 20 7d 3b |1, 0xC3,| 0x87 };|
|000042d0| 0d 09 73 74 61 74 69 63 | 20 75 6e 73 69 67 6e 65 |..static| unsigne|
|000042e0| 64 20 6c 6f 6e 67 20 09 | 61 6e 74 73 54 69 6d 65 |d long .|antsTime|
|000042f0| 20 3d 20 54 69 63 6b 43 | 6f 75 6e 74 28 29 3b 0d | = TickC|ount();.|
|00004300| 09 75 6e 73 69 67 6e 65 | 64 20 6c 6f 6e 67 09 09 |.unsigne|d long..|
|00004310| 09 74 3b 0d 09 50 65 6e | 53 74 61 74 65 09 09 09 |.t;..Pen|State...|
|00004320| 09 70 73 3b 0d 09 0d 09 | 74 20 3d 20 54 69 63 6b |.ps;....|t = Tick|
|00004330| 43 6f 75 6e 74 28 29 3b | 0d 09 0d 09 69 66 20 28 |Count();|....if (|
|00004340| 20 74 20 3e 3d 20 28 20 | 61 6e 74 73 54 69 6d 65 | t >= ( |antsTime|
|00004350| 20 2b 20 6b 41 6e 74 73 | 52 61 74 65 20 29 29 0d | + kAnts|Rate )).|
|00004360| 09 7b 0d 09 09 61 6e 74 | 73 54 69 6d 65 20 3d 20 |.{...ant|sTime = |
|00004370| 74 3b 0d 09 09 0d 09 09 | 47 65 74 50 65 6e 53 74 |t;......|GetPenSt|
|00004380| 61 74 65 28 20 26 70 73 | 20 29 3b 0d 09 09 0d 09 |ate( &ps| );.....|
|00004390| 09 53 68 69 66 74 50 61 | 74 74 65 72 6e 28 20 26 |.ShiftPa|ttern( &|
|000043a0| 61 6e 74 73 50 61 74 20 | 29 3b 0d 09 09 50 65 6e |antsPat |);...Pen|
|000043b0| 50 61 74 28 20 26 61 6e | 74 73 50 61 74 20 29 3b |Pat( &an|tsPat );|
|000043c0| 09 0d 09 09 50 65 6e 53 | 69 7a 65 28 20 31 2c 20 |....PenS|ize( 1, |
|000043d0| 31 20 29 3b 0d 09 09 50 | 65 6e 4d 6f 64 65 28 20 |1 );...P|enMode( |
|000043e0| 70 61 74 43 6f 70 79 20 | 29 3b 0d 09 0d 09 09 46 |patCopy |);.....F|
|000043f0| 72 61 6d 65 52 67 6e 28 | 20 61 52 67 6e 20 29 3b |rameRgn(| aRgn );|
|00004400| 0d 09 09 0d 09 09 53 65 | 74 50 65 6e 53 74 61 74 |......Se|tPenStat|
|00004410| 65 28 20 26 70 73 20 29 | 3b 0d 09 7d 0d 7d 0d 0d |e( &ps )|;..}.}..|
|00004420| 0d 2f 2a 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |./*-----|--------|
|00004430| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2a |--------|-------*|
|00004440| 2a 2a 20 20 42 41 4c 4c | 4f 4f 4e 48 45 4c 50 52 |** BALL|OONHELPR|
|00004450| 45 46 52 45 53 48 20 20 | 2a 2a 2a 2d 2d 2d 2d 2d |EFRESH |***-----|
|00004460| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004470| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2a 2f 0d 2f 2a 09 0d |--------|-*/./*..|
|00004480| 66 6f 72 63 65 20 62 61 | 6c 6c 6f 6f 6e 20 68 65 |force ba|lloon he|
|00004490| 6c 70 20 74 6f 20 75 70 | 64 61 74 65 20 62 79 20 |lp to up|date by |
|000044a0| 68 69 64 69 6e 67 20 61 | 6e 79 20 76 69 73 69 62 |hiding a|ny visib|
|000044b0| 6c 65 20 62 61 6c 6c 6f | 6f 6e 2e 20 49 66 20 74 |le ballo|on. If t|
|000044c0| 68 65 20 62 61 6c 6c 6f | 6f 6e 20 69 73 20 73 74 |he ballo|on is st|
|000044d0| 69 6c 6c 20 6e 65 65 64 | 65 64 2c 0d 69 74 20 77 |ill need|ed,.it w|
|000044e0| 69 6c 6c 20 62 65 20 72 | 65 62 75 69 6c 74 20 61 |ill be r|ebuilt a|
|000044f0| 6e 64 20 72 65 64 69 73 | 70 6c 61 79 65 64 2c 20 |nd redis|played, |
|00004500| 73 6f 20 79 6f 75 20 63 | 61 6e 20 63 61 6c 6c 20 |so you c|an call |
|00004510| 74 68 69 73 20 69 66 20 | 74 68 65 20 69 74 65 6d |this if |the item|
|00004520| 20 74 68 65 20 62 61 6c | 6c 6f 6f 6e 20 69 73 0d | the bal|loon is.|
|00004530| 70 6f 69 6e 74 69 6e 67 | 20 74 6f 20 63 68 61 6e |pointing| to chan|
|00004540| 67 65 73 20 73 74 61 74 | 65 2e 0d 2d 2d 2d 2d 2d |ges stat|e..-----|
|00004550| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004560| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004570| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004580| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004590| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000045a0| 2d 2d 2d 2a 2f 0d 0d 76 | 6f 69 64 09 09 42 61 6c |---*/..v|oid..Bal|
|000045b0| 6c 6f 6f 6e 48 65 6c 70 | 52 65 66 72 65 73 68 28 |loonHelp|Refresh(|
|000045c0| 29 0d 7b 0d 09 69 66 20 | 28 20 48 4d 49 73 42 61 |).{..if |( HMIsBa|
|000045d0| 6c 6c 6f 6f 6e 28 29 20 | 26 26 20 48 4d 47 65 74 |lloon() |&& HMGet|
|000045e0| 42 61 6c 6c 6f 6f 6e 73 | 28 29 29 0d 09 09 48 4d |Balloons|())...HM|
|000045f0| 52 65 6d 6f 76 65 42 61 | 6c 6c 6f 6f 6e 28 29 3b |RemoveBa|lloon();|
|00004600| 0d 7d 0d 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.}......|........|
|00004610| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004620| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004630| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004640| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004650| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004660| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004670| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004680| 00 00 01 00 00 00 01 5a | 00 00 00 5a 00 00 00 52 |.......Z|...Z...R|
|00004690| 90 00 00 00 0e 6a c0 01 | 00 00 7d 98 07 98 e3 81 |.....j..|..}.....|
|000046a0| 91 00 00 00 0f 8a 09 c0 | 01 00 00 7d 99 e5 9a a0 |........|...}....|
|000046b0| 11 5a 6f 6f 70 55 74 69 | 6c 69 74 69 65 73 2e 63 |.ZoopUti|lities.c|
|000046c0| 70 70 02 00 00 00 50 61 | 72 74 53 49 54 21 00 00 |pp....Pa|rtSIT!..|
|000046d0| 00 00 50 61 72 74 53 49 | 54 21 00 00 00 00 00 00 |..PartSI|T!......|
|000046e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000046f0| 00 00 b3 41 d6 35 00 00 | 00 00 00 00 01 ac 00 00 |...A.5..|........|
|00004700| 80 8a bc 8b 48 81 97 00 | 00 00 0f 87 50 c0 01 00 |....H...|....P...|
|00004710| 00 80 8b fc 8c 72 81 98 | 00 00 00 0f 85 72 c0 01 |.....r..|.....r..|
|00004720| 00 00 82 81 4c 81 63 81 | 99 00 00 00 0f 81 1a c0 |....L.c.|........|
|00004730| 01 00 00 82 86 d9 86 f9 | 81 9a 00 00 00 0f 87 bb |........|........|
|00004740| c0 01 00 00 82 86 fa 87 | 1b 81 9b 00 00 00 0f 84 |........|........|
|00004750| a1 c0 01 00 00 36 82 1c | 82 2d 81 9c 00 00 00 0f |.....6..|.-......|
|00004760| 87 09 c0 01 00 00 36 82 | 37 82 57 81 9d 00 00 00 |......6.|7.W.....|
|00004770| 0f 87 2e c0 01 00 00 36 | 82 58 82 78 81 ae 00 00 |.......6|.X.x....|
|00004780| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 00 |...H..Mo|naco....|
|00004790| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000047a0| 00 00 00 00 00 00 00 02 | 00 04 00 9e 01 6c 02 ca |........|.....l..|
|000047b0| 03 c2 00 9e 01 6c 02 ca | 03 c2 b2 f8 80 be 00 00 |.....l..|........|
|000047c0| 44 ca 00 00 44 ca 00 00 | 40 9b 01 00 00 00 00 02 |D...D...|@.......|
|000047d0| 00 00 00 00 00 04 00 01 | 00 01 00 00 01 00 00 00 |........|........|
|000047e0| 01 5a 00 00 00 5a 00 00 | 00 52 04 63 6a d8 37 d2 |.Z...Z..|.R.cj.7.|
|000047f0| 00 00 00 1c 00 52 00 01 | 4d 50 53 52 00 01 00 12 |.....R..|MPSR....|
|00004800| 4d 57 42 42 00 00 00 2a | 03 ed ff ff 00 00 00 00 |MWBB...*|........|
|00004810| 00 00 00 00 03 ef ff ff | 00 00 00 4c 00 00 00 00 |........|...L....|
|00004820| 03 f0 ff ff 00 00 00 52 | 00 00 00 00 00 00 00 00 |.......R|........|
|00004830| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004840| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004850| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004860| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004870| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+