home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1995-07-27 | 11.3 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: SetOnePixel.c
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| Compact Compressed (Unix) (archive/compact)
| ext
| Supported |
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Thu Jul 27 01:59:06 1995, modified Thu Jul 27 01:59:06 1995, creator 'CWIE', type ASCII, 10476 bytes "SetOnePixel.c" , at 0x296c 796 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 0d 53 65 74 4f 6e 65 | 50 69 78 65 6c 2e 63 00 |..SetOne|Pixel.c.|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 43 57 49 | 45 01 00 00 00 00 00 00 |.TEXTCWI|E.......|
|00000050| 00 00 00 00 00 28 ec 00 | 00 03 1c ac 3c db aa ac |.....(..|....<...|
|00000060| 3c db aa 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 2e a5 00 00 |........|........|
|00000080| 2f 2a 0d 53 65 74 4f 6e | 65 50 69 78 65 6c 2e 63 |/*.SetOn|ePixel.c|
|00000090| 0d 4e 4f 54 45 3a 20 54 | 68 65 73 65 20 72 6f 75 |.NOTE: T|hese rou|
|000000a0| 74 69 6e 65 73 20 61 72 | 65 20 6f 62 73 6f 6c 65 |tines ar|e obsole|
|000000b0| 74 65 2c 20 72 65 74 61 | 69 6e 65 64 20 73 6f 6c |te, reta|ined sol|
|000000c0| 65 6c 79 20 66 6f 72 20 | 62 61 63 6b 77 61 72 64 |ely for |backward|
|000000d0| 20 63 6f 6d 70 61 74 69 | 62 69 6c 69 74 79 2e 20 | compati|bility. |
|000000e0| 0d 55 73 65 20 53 65 74 | 50 69 78 65 6c 73 51 75 |.Use Set|PixelsQu|
|000000f0| 69 63 6b 6c 79 2e 63 20 | 69 6e 73 74 65 61 64 2c |ickly.c |instead,|
|00000100| 20 73 69 6e 63 65 20 69 | 74 27 73 20 6d 6f 72 65 | since i|t's more|
|00000110| 20 74 68 61 6e 20 74 65 | 6e 20 74 69 6d 65 73 20 | than te|n times |
|00000120| 66 61 73 74 65 72 20 69 | 6e 20 0d 6d 6f 73 74 20 |faster i|n .most |
|00000130| 61 70 70 6c 69 63 61 74 | 69 6f 6e 73 2e 0d 0d 54 |applicat|ions...T|
|00000140| 68 65 73 65 20 61 72 65 | 20 72 65 70 6c 61 63 65 |hese are| replace|
|00000150| 6d 65 6e 74 73 20 66 6f | 72 20 74 68 65 20 6f 66 |ments fo|r the of|
|00000160| 66 69 63 69 61 6c 20 41 | 70 70 6c 65 20 53 65 74 |ficial A|pple Set|
|00000170| 43 50 69 78 65 6c 2c 20 | 65 74 63 2e 20 54 68 65 |CPixel, |etc. The|
|00000180| 69 72 20 76 69 72 74 75 | 65 20 69 73 0d 74 68 61 |ir virtu|e is.tha|
|00000190| 74 20 74 68 65 79 27 72 | 65 20 66 61 73 74 65 72 |t they'r|e faster|
|000001a0| 20 28 62 75 74 20 73 74 | 69 6c 6c 20 73 6c 6f 77 | (but st|ill slow|
|000001b0| 29 20 61 6e 64 20 64 6f | 6e 27 74 20 74 72 61 6e |) and do|n't tran|
|000001c0| 73 6c 61 74 65 20 79 6f | 75 72 20 69 6e 64 65 78 |slate yo|ur index|
|000001d0| 20 76 69 61 20 74 68 65 | 0d 63 6f 6c 6f 72 20 74 | via the|.color t|
|000001e0| 61 62 6c 65 2e 20 47 65 | 74 78 78 78 50 69 78 65 |able. Ge|txxxPixe|
|000001f0| 6c 20 26 20 53 65 74 78 | 78 78 50 69 78 65 6c 20 |l & Setx|xxPixel |
|00000200| 61 6c 6c 20 69 67 6e 6f | 72 65 20 74 68 65 20 63 |all igno|re the c|
|00000210| 6f 6c 6f 72 20 73 70 65 | 63 20 61 72 72 61 79 73 |olor spe|c arrays|
|00000220| 2c 20 67 69 76 69 6e 67 | 0d 79 6f 75 20 64 69 72 |, giving|.you dir|
|00000230| 65 63 74 20 61 63 63 65 | 73 73 20 74 6f 20 74 68 |ect acce|ss to th|
|00000240| 65 20 75 6e 73 69 67 6e | 65 64 20 6e 75 6d 62 65 |e unsign|ed numbe|
|00000250| 72 20 73 74 6f 72 65 64 | 20 69 6e 20 74 68 65 20 |r stored| in the |
|00000260| 70 69 78 65 6c 20 28 77 | 68 65 74 68 65 72 20 31 |pixel (w|hether 1|
|00000270| 2c 20 32 2c 20 34 2c 0d | 38 2c 20 31 36 2c 20 6f |, 2, 4,.|8, 16, o|
|00000280| 72 20 33 32 20 62 69 74 | 73 29 2e 2e 0d 0d 53 65 |r 32 bit|s)....Se|
|00000290| 74 4f 6e 65 50 69 78 65 | 6c 28 78 2c 79 2c 76 61 |tOnePixe|l(x,y,va|
|000002a0| 6c 75 65 29 3b 0d 76 61 | 6c 75 65 3d 47 65 74 4f |lue);.va|lue=GetO|
|000002b0| 6e 65 50 69 78 65 6c 28 | 78 2c 79 29 3b 0d 54 68 |nePixel(|x,y);.Th|
|000002c0| 65 79 20 75 73 65 20 74 | 68 65 20 63 75 72 72 65 |ey use t|he curre|
|000002d0| 6e 74 20 70 6f 72 74 2e | 20 78 20 61 6e 64 20 79 |nt port.| x and y|
|000002e0| 20 61 72 65 20 6c 6f 63 | 61 6c 20 63 6f 6f 72 64 | are loc|al coord|
|000002f0| 69 6e 61 74 65 73 2e 0d | 0d 53 65 74 50 69 78 6d |inates..|.SetPixm|
|00000300| 61 70 50 69 78 65 6c 28 | 29 20 61 6e 64 20 47 65 |apPixel(|) and Ge|
|00000310| 74 50 69 78 6d 61 70 50 | 69 78 65 6c 28 29 20 75 |tPixmapP|ixel() u|
|00000320| 73 65 20 74 68 65 20 73 | 70 65 63 69 66 69 65 64 |se the s|pecified|
|00000330| 20 70 69 78 6d 61 70 20 | 6f 72 20 62 69 74 6d 61 | pixmap |or bitma|
|00000340| 70 2e 0d 0d 53 65 74 44 | 65 76 69 63 65 50 69 78 |p...SetD|evicePix|
|00000350| 65 6c 28 29 20 61 6e 64 | 20 47 65 74 44 65 76 69 |el() and| GetDevi|
|00000360| 63 65 50 69 78 65 6c 28 | 29 20 75 73 65 20 74 68 |cePixel(|) use th|
|00000370| 65 20 73 70 65 63 69 66 | 69 65 64 20 67 72 61 70 |e specif|ied grap|
|00000380| 68 69 63 73 20 64 65 76 | 69 63 65 20 28 69 2e 65 |hics dev|ice (i.e|
|00000390| 2e 0d 6d 6f 6e 69 74 6f | 72 29 2e 0d 0d 4e 4f 54 |..monito|r)...NOT|
|000003a0| 45 3a 0d 49 66 20 79 6f | 75 20 61 72 65 20 73 65 |E:.If yo|u are se|
|000003b0| 74 74 69 6e 67 20 6d 61 | 6e 79 20 63 6f 6e 74 69 |tting ma|ny conti|
|000003c0| 67 75 6f 75 73 20 70 69 | 78 65 6c 73 20 79 6f 75 |guous pi|xels you|
|000003d0| 20 77 69 6c 6c 20 62 65 | 20 77 61 73 74 69 6e 67 | will be| wasting|
|000003e0| 20 6d 6f 73 74 20 6f 66 | 20 79 6f 75 72 20 74 69 | most of| your ti|
|000003f0| 6d 65 0d 6f 6e 20 74 68 | 65 20 63 61 6c 6c 20 6f |me.on th|e call o|
|00000400| 76 65 72 68 65 61 64 20 | 28 6f 6e 63 65 20 70 65 |verhead |(once pe|
|00000410| 72 20 70 69 78 65 6c 29 | 2e 20 54 68 61 74 27 73 |r pixel)|. That's|
|00000420| 20 77 68 79 20 79 6f 75 | 20 73 68 6f 75 6c 64 20 | why you| should |
|00000430| 75 73 65 0d 53 65 74 50 | 69 78 65 6c 73 51 75 69 |use.SetP|ixelsQui|
|00000440| 63 6b 6c 79 2e 63 20 69 | 6e 73 74 65 61 64 2e 0d |ckly.c i|nstead..|
|00000450| 0d 54 68 65 73 65 20 72 | 6f 75 74 69 6e 65 73 20 |.These r|outines |
|00000460| 28 61 6e 64 20 52 65 63 | 74 54 6f 41 64 64 72 65 |(and Rec|tToAddre|
|00000470| 73 73 29 20 64 6f 20 6e | 6f 74 20 22 6d 6f 76 65 |ss) do n|ot "move|
|00000480| 20 6d 65 6d 6f 72 79 22 | 2c 20 69 2e 65 2e 20 74 | memory"|, i.e. t|
|00000490| 68 65 79 20 64 6f 6e 27 | 74 20 67 69 76 65 20 74 |hey don'|t give t|
|000004a0| 68 65 0d 4d 65 6d 6f 72 | 79 20 4d 61 6e 61 67 65 |he.Memor|y Manage|
|000004b0| 72 20 61 6e 79 20 70 72 | 65 74 65 78 74 20 66 6f |r any pr|etext fo|
|000004c0| 72 20 73 68 75 66 66 6c | 69 6e 67 20 61 72 6f 75 |r shuffl|ing arou|
|000004d0| 6e 64 20 74 68 65 20 6d | 65 6d 6f 72 79 20 61 6c |nd the m|emory al|
|000004e0| 6c 6f 63 61 74 69 6f 6e | 73 2c 20 61 6e 64 0d 63 |location|s, and.c|
|000004f0| 68 61 6e 67 65 20 69 74 | 73 20 6d 61 73 74 65 72 |hange it|s master|
|00000500| 20 70 6f 69 6e 74 65 72 | 73 2e 20 54 68 61 74 27 | pointer|s. That'|
|00000510| 73 20 77 68 79 20 69 74 | 27 73 20 4f 4b 20 74 6f |s why it|'s OK to|
|00000520| 20 64 65 72 65 66 65 72 | 65 6e 63 65 20 74 68 65 | derefer|ence the|
|00000530| 20 70 69 78 6d 61 70 20 | 68 61 6e 64 6c 65 2c 0d | pixmap |handle,.|
|00000540| 69 2e 65 2e 20 75 73 65 | 20 61 20 6c 6f 63 61 6c |i.e. use| a local|
|00000550| 20 63 6f 70 79 20 6f 66 | 20 74 68 65 20 70 69 78 | copy of| the pix|
|00000560| 6d 61 70 27 73 20 6d 61 | 73 74 65 72 20 70 6f 69 |map's ma|ster poi|
|00000570| 6e 74 65 72 2e 0d 0d 41 | 6c 6c 20 74 68 65 20 72 |nter...A|ll the r|
|00000580| 6f 75 74 69 6e 65 73 20 | 69 6e 20 74 68 69 73 20 |outines |in this |
|00000590| 66 69 6c 65 20 63 61 6c | 6c 20 65 69 74 68 65 72 |file cal|l either|
|000005a0| 20 53 65 74 50 69 78 6d | 61 70 50 69 78 65 6c 20 | SetPixm|apPixel |
|000005b0| 6f 72 20 47 65 74 50 69 | 78 6d 61 70 50 69 78 65 |or GetPi|xmapPixe|
|000005c0| 6c 2e 20 42 6f 74 68 0d | 72 75 6e 20 66 61 73 74 |l. Both.|run fast|
|000005d0| 20 62 79 20 63 61 63 68 | 69 6e 67 20 74 68 65 20 | by cach|ing the |
|000005e0| 69 6e 66 6f 72 6d 61 74 | 69 6f 6e 20 74 68 61 74 |informat|ion that|
|000005f0| 20 74 68 65 79 20 67 65 | 74 20 61 62 6f 75 74 20 | they ge|t about |
|00000600| 79 6f 75 72 20 42 69 74 | 2f 50 69 78 6d 61 70 20 |your Bit|/Pixmap |
|00000610| 66 72 6f 6d 0d 52 65 63 | 74 54 6f 41 64 64 72 65 |from.Rec|tToAddre|
|00000620| 73 73 2e 20 53 65 74 50 | 69 78 6d 61 70 50 69 78 |ss. SetP|ixmapPix|
|00000630| 65 6c 20 61 6e 64 20 47 | 65 74 50 69 78 6d 61 70 |el and G|etPixmap|
|00000640| 50 69 78 65 6c 20 65 61 | 63 68 20 68 61 76 65 20 |Pixel ea|ch have |
|00000650| 74 68 65 69 72 20 6f 77 | 6e 20 63 61 63 68 65 2e |their ow|n cache.|
|00000660| 0d 0d 48 49 53 54 4f 52 | 59 3a 0d 34 2f 34 2f 38 |..HISTOR|Y:.4/4/8|
|00000670| 39 09 64 67 70 20 77 72 | 6f 74 65 20 69 74 20 61 |9.dgp wr|ote it a|
|00000680| 73 20 53 65 74 49 50 69 | 78 65 6c 2e 63 0d 39 2f |s SetIPi|xel.c.9/|
|00000690| 38 2f 39 30 09 64 67 70 | 20 75 70 64 61 74 65 64 |8/90.dgp| updated|
|000006a0| 20 74 6f 20 77 6f 72 6b | 20 77 69 74 68 20 33 32 | to work| with 32|
|000006b0| 20 62 69 74 20 51 75 69 | 63 6b 44 72 61 77 2c 20 | bit Qui|ckDraw, |
|000006c0| 69 66 20 70 72 65 73 65 | 6e 74 2e 0d 31 30 2f 31 |if prese|nt..10/1|
|000006d0| 35 2f 39 30 20 62 66 20 | 72 65 6e 61 6d 65 64 20 |5/90 bf |renamed |
|000006e0| 53 65 74 49 50 69 78 65 | 6c 47 57 2e 63 20 61 6e |SetIPixe|lGW.c an|
|000006f0| 64 20 6d 6f 64 69 66 69 | 65 64 20 66 6f 72 20 64 |d modifi|ed for d|
|00000700| 72 61 77 69 6e 67 20 74 | 6f 20 6f 66 66 20 73 63 |rawing t|o off sc|
|00000710| 72 65 65 6e 20 70 69 78 | 20 6d 61 70 73 2e 0d 34 |reen pix| maps..4|
|00000720| 2f 32 36 2f 39 32 09 64 | 67 70 09 4d 65 72 67 65 |/26/92.d|gp.Merge|
|00000730| 64 20 74 68 65 20 74 77 | 6f 20 76 61 72 69 61 6e |d the tw|o varian|
|00000740| 74 73 3a 20 53 65 74 49 | 50 69 78 65 6c 2e 63 20 |ts: SetI|Pixel.c |
|00000750| 61 6e 64 20 53 65 74 49 | 50 69 78 65 6c 47 57 2e |and SetI|PixelGW.|
|00000760| 63 20 74 6f 20 70 72 6f | 64 75 63 65 20 74 68 65 |c to pro|duce the|
|00000770| 0d 09 09 09 6e 65 77 20 | 66 69 6c 65 20 53 65 74 |....new |file Set|
|00000780| 4f 6e 65 50 69 78 65 6c | 2e 63 2e 20 0d 09 09 09 |OnePixel|.c. ....|
|00000790| 52 65 6e 61 6d 65 64 20 | 53 65 74 49 50 69 78 65 |Renamed |SetIPixe|
|000007a0| 6c 47 57 20 74 6f 20 53 | 65 74 50 69 78 6d 61 70 |lGW to S|etPixmap|
|000007b0| 50 69 78 65 6c 2e 0d 09 | 09 09 52 65 6e 61 6d 65 |Pixel...|..Rename|
|000007c0| 64 20 47 65 74 49 50 69 | 78 65 6c 47 57 20 74 6f |d GetIPi|xelGW to|
|000007d0| 20 47 65 74 50 69 78 6d | 61 70 50 69 78 65 6c 2e | GetPixm|apPixel.|
|000007e0| 0d 09 09 09 52 65 6e 61 | 6d 65 64 20 53 65 74 49 |....Rena|med SetI|
|000007f0| 50 69 78 65 6c 20 74 6f | 20 53 65 74 44 65 76 69 |Pixel to| SetDevi|
|00000800| 63 65 50 69 78 65 6c 2e | 0d 09 09 09 52 65 6e 61 |cePixel.|....Rena|
|00000810| 6d 65 64 20 47 65 74 49 | 50 69 78 65 6c 20 74 6f |med GetI|Pixel to|
|00000820| 20 47 65 74 44 65 76 69 | 63 65 50 69 78 65 6c 2e | GetDevi|cePixel.|
|00000830| 0d 09 09 09 41 64 64 65 | 64 20 53 65 74 4f 6e 65 |....Adde|d SetOne|
|00000840| 50 69 78 65 6c 20 61 6e | 64 20 47 65 74 4f 6e 65 |Pixel an|d GetOne|
|00000850| 50 69 78 65 6c 2e 0d 09 | 09 09 47 65 6e 65 72 61 |Pixel...|..Genera|
|00000860| 6c 69 7a 65 64 20 74 6f | 20 68 61 6e 64 6c 65 20 |lized to| handle |
|00000870| 61 6e 79 20 70 69 78 65 | 6c 53 69 7a 65 2c 20 61 |any pixe|lSize, a|
|00000880| 6e 64 20 61 63 63 65 70 | 74 20 62 69 74 6d 61 70 |nd accep|t bitmap|
|00000890| 73 20 61 73 20 77 65 6c | 6c 0d 09 09 09 61 73 20 |s as wel|l....as |
|000008a0| 70 69 78 6d 61 70 73 2e | 0d 31 32 2f 32 33 2f 39 |pixmaps.|.12/23/9|
|000008b0| 32 20 64 67 70 20 44 6f | 75 62 6c 65 64 20 74 68 |2 dgp Do|ubled th|
|000008c0| 65 20 73 70 65 65 64 20 | 6f 66 20 53 65 74 50 69 |e speed |of SetPi|
|000008d0| 78 6d 61 70 50 69 78 65 | 6c 20 61 6e 64 20 47 65 |xmapPixe|l and Ge|
|000008e0| 74 50 69 78 6d 61 70 50 | 69 78 65 6c 20 28 61 6e |tPixmapP|ixel (an|
|000008f0| 64 20 74 68 75 73 20 73 | 70 65 64 20 75 70 0d 09 |d thus s|ped up..|
|00000900| 09 09 61 6c 6c 20 74 68 | 65 20 72 6f 75 74 69 6e |..all th|e routin|
|00000910| 65 73 20 74 68 61 74 20 | 63 61 6c 6c 20 74 68 65 |es that |call the|
|00000920| 6d 29 20 62 79 20 63 61 | 63 68 69 6e 67 20 74 68 |m) by ca|ching th|
|00000930| 65 20 61 6e 73 77 65 72 | 73 20 66 72 6f 6d 20 52 |e answer|s from R|
|00000940| 65 63 74 54 6f 41 64 64 | 72 65 73 73 2e 20 0d 09 |ectToAdd|ress. ..|
|00000950| 09 09 54 68 65 20 63 61 | 63 68 65 20 64 6f 75 62 |..The ca|che doub|
|00000960| 6c 65 73 20 74 68 65 20 | 73 70 65 65 64 2c 20 62 |les the |speed, b|
|00000970| 75 74 20 73 65 65 20 43 | 41 55 54 49 4f 4e 20 61 |ut see C|AUTION a|
|00000980| 62 6f 76 65 2e 49 6e 74 | 72 6f 64 75 63 65 64 20 |bove.Int|roduced |
|00000990| 63 6f 6d 70 69 6c 65 2d | 74 69 6d 65 20 0d 09 09 |compile-|time ...|
|000009a0| 09 66 6c 61 67 20 74 6f | 20 6f 70 74 69 6f 6e 61 |.flag to| optiona|
|000009b0| 6c 6c 79 20 64 69 73 61 | 62 6c 65 20 74 68 69 73 |lly disa|ble this|
|000009c0| 20 6e 65 77 20 63 61 63 | 68 65 2e 0d 31 2f 36 2f | new cac|he..1/6/|
|000009d0| 39 33 20 64 67 70 09 46 | 69 78 65 64 20 74 69 6e |93 dgp.F|ixed tin|
|000009e0| 79 20 62 75 74 20 64 69 | 73 61 73 74 72 6f 75 73 |y but di|sastrous|
|000009f0| 20 62 75 67 20 69 6e 20 | 47 65 74 50 69 78 6d 61 | bug in |GetPixma|
|00000a00| 70 50 69 78 65 6c 20 28 | 77 61 73 6e 27 74 20 73 |pPixel (|wasn't s|
|00000a10| 61 76 69 6e 67 20 6f 6c | 64 20 78 20 61 6e 64 20 |aving ol|d x and |
|00000a20| 79 29 2e 0d 31 2f 32 32 | 2f 39 33 09 64 67 70 09 |y)..1/22|/93.dgp.|
|00000a30| 43 68 65 63 6b 20 6d 6f | 72 65 20 50 69 78 4d 61 |Check mo|re PixMa|
|00000a40| 70 20 66 69 65 6c 64 73 | 20 74 6f 20 6d 61 6b 65 |p fields| to make|
|00000a50| 20 73 75 72 65 20 63 61 | 63 68 65 20 69 73 20 6e | sure ca|che is n|
|00000a60| 6f 74 20 73 74 61 6c 65 | 2e 20 44 65 6c 65 74 65 |ot stale|. Delete|
|00000a70| 64 20 74 68 65 0d 09 09 | 09 77 61 72 6e 69 6e 67 |d the...|.warning|
|00000a80| 20 61 62 6f 75 74 20 73 | 74 61 6c 65 20 63 61 63 | about s|tale cac|
|00000a90| 68 65 73 20 66 72 6f 6d | 20 74 68 65 20 64 6f 63 |hes from| the doc|
|00000aa0| 75 6d 65 6e 74 61 74 69 | 6f 6e 2e 0d 32 2f 37 2f |umentati|on..2/7/|
|00000ab0| 39 33 09 64 67 70 20 57 | 72 6f 74 65 20 53 65 74 |93.dgp W|rote Set|
|00000ac0| 50 69 78 65 6c 73 51 75 | 69 63 6b 6c 79 2e 63 2e |PixelsQu|ickly.c.|
|00000ad0| 0d 37 2f 39 2f 39 33 09 | 64 67 70 20 63 68 65 63 |.7/9/93.|dgp chec|
|00000ae0| 6b 20 66 6f 72 20 33 32 | 2d 62 69 74 20 61 64 64 |k for 32|-bit add|
|00000af0| 72 65 73 73 69 6e 67 20 | 63 61 70 61 62 69 6c 69 |ressing |capabili|
|00000b00| 74 79 2e 0d 36 2f 31 38 | 2f 39 34 09 64 67 70 09 |ty..6/18|/94.dgp.|
|00000b10| 63 61 6e 33 32 20 69 73 | 20 6e 6f 77 20 63 6f 6d |can32 is| now com|
|00000b20| 70 75 74 65 64 20 62 79 | 20 63 61 6c 6c 69 6e 67 |puted by| calling|
|00000b30| 20 54 72 61 70 41 76 61 | 69 6c 61 62 6c 65 28 5f | TrapAva|ilable(_|
|00000b40| 53 77 61 70 4d 4d 55 4d | 6f 64 65 29 2c 20 77 68 |SwapMMUM|ode), wh|
|00000b50| 69 63 68 20 0d 09 09 09 | 72 65 74 75 72 6e 73 20 |ich ....|returns |
|00000b60| 74 68 65 20 63 6f 72 72 | 65 63 74 20 61 6e 73 77 |the corr|ect answ|
|00000b70| 65 72 20 65 76 65 6e 20 | 6f 6e 20 4d 61 63 73 20 |er even |on Macs |
|00000b80| 77 69 74 68 20 64 69 72 | 74 79 20 52 4f 4d 73 2e |with dir|ty ROMs.|
|00000b90| 0d 35 2f 32 33 2f 39 35 | 20 64 67 70 20 41 70 70 |.5/23/95| dgp App|
|00000ba0| 6c 65 20 63 68 61 6e 67 | 65 64 20 74 68 65 20 70 |le chang|ed the p|
|00000bb0| 72 6f 74 6f 74 79 70 65 | 20 69 6e 20 74 68 65 20 |rototype| in the |
|00000bc0| 68 65 61 64 65 72 20 66 | 69 6c 65 20 66 72 6f 6d |header f|ile from|
|00000bd0| 20 53 77 61 70 4d 4d 55 | 4d 6f 64 65 28 63 68 61 | SwapMMU|Mode(cha|
|00000be0| 72 20 2a 29 20 74 6f 20 | 0d 09 09 09 53 77 61 70 |r *) to |....Swap|
|00000bf0| 4d 4d 55 4d 6f 64 65 28 | 73 69 67 6e 65 64 20 63 |MMUMode(|signed c|
|00000c00| 68 61 72 20 2a 29 2e 20 | 54 6f 20 72 65 74 61 69 |har *). |To retai|
|00000c10| 6e 20 63 6f 6d 70 61 74 | 69 62 69 6c 69 74 79 20 |n compat|ibility |
|00000c20| 77 69 74 68 20 62 6f 74 | 68 20 6f 6c 64 20 61 6e |with bot|h old an|
|00000c30| 64 20 6e 65 77 0d 09 09 | 09 68 65 61 64 65 72 73 |d new...|.headers|
|00000c40| 2c 20 49 20 63 61 73 74 | 20 74 68 65 20 61 72 67 |, I cast| the arg|
|00000c50| 75 6d 65 6e 74 20 28 76 | 6f 69 64 20 2a 29 2e 0d |ument (v|oid *)..|
|00000c60| 2a 2f 0d 23 69 6e 63 6c | 75 64 65 20 22 56 69 64 |*/.#incl|ude "Vid|
|00000c70| 65 6f 54 6f 6f 6c 62 6f | 78 2e 68 22 0d 23 69 66 |eoToolbo|x.h".#if|
|00000c80| 6e 64 65 66 20 5f 5f 54 | 52 41 50 53 5f 5f 0d 09 |ndef __T|RAPS__..|
|00000c90| 23 69 6e 63 6c 75 64 65 | 20 3c 54 72 61 70 73 2e |#include| <Traps.|
|00000ca0| 68 3e 09 09 2f 2f 20 5f | 53 77 61 70 4d 4d 55 4d |h>..// _|SwapMMUM|
|00000cb0| 6f 64 65 0d 23 65 6e 64 | 69 66 0d 23 64 65 66 69 |ode.#end|if.#defi|
|00000cc0| 6e 65 20 55 53 45 5f 43 | 41 43 48 45 20 31 09 2f |ne USE_C|ACHE 1./|
|00000cd0| 2f 20 74 72 75 65 20 6f | 72 20 66 61 6c 73 65 0d |/ true o|r false.|
|00000ce0| 0d 76 6f 69 64 20 53 65 | 74 4f 6e 65 50 69 78 65 |.void Se|tOnePixe|
|00000cf0| 6c 28 69 6e 74 20 78 2c | 69 6e 74 20 79 2c 75 6e |l(int x,|int y,un|
|00000d00| 73 69 67 6e 65 64 20 6c | 6f 6e 67 20 76 61 6c 75 |signed l|ong valu|
|00000d10| 65 29 0d 2f 2f 20 41 73 | 73 75 6d 65 73 20 28 78 |e).// As|sumes (x|
|00000d20| 2c 79 29 20 69 73 20 69 | 6e 20 74 68 65 20 6c 6f |,y) is i|n the lo|
|00000d30| 63 61 6c 20 63 6f 6f 72 | 64 69 6e 61 74 65 20 73 |cal coor|dinate s|
|00000d40| 79 73 74 65 6d 20 6f 66 | 20 74 68 65 20 63 75 72 |ystem of| the cur|
|00000d50| 72 65 6e 74 20 70 6f 72 | 74 2e 0d 7b 0d 09 57 69 |rent por|t..{..Wi|
|00000d60| 6e 64 6f 77 50 74 72 20 | 77 69 6e 64 6f 77 3b 0d |ndowPtr |window;.|
|00000d70| 09 50 69 78 4d 61 70 50 | 74 72 20 70 6d 3b 0d 09 |.PixMapP|tr pm;..|
|00000d80| 0d 09 47 65 74 50 6f 72 | 74 28 26 77 69 6e 64 6f |..GetPor|t(&windo|
|00000d90| 77 29 3b 0d 09 69 66 28 | 78 3c 77 69 6e 64 6f 77 |w);..if(|x<window|
|00000da0| 2d 3e 70 6f 72 74 52 65 | 63 74 2e 6c 65 66 74 20 |->portRe|ct.left |
|00000db0| 7c 7c 20 78 3e 3d 77 69 | 6e 64 6f 77 2d 3e 70 6f ||| x>=wi|ndow->po|
|00000dc0| 72 74 52 65 63 74 2e 72 | 69 67 68 74 0d 09 09 7c |rtRect.r|ight...||
|00000dd0| 7c 20 79 3c 77 69 6e 64 | 6f 77 2d 3e 70 6f 72 74 || y<wind|ow->port|
|00000de0| 52 65 63 74 2e 74 6f 70 | 20 7c 7c 20 79 3e 3d 77 |Rect.top| || y>=w|
|00000df0| 69 6e 64 6f 77 2d 3e 70 | 6f 72 74 52 65 63 74 2e |indow->p|ortRect.|
|00000e00| 62 6f 74 74 6f 6d 29 72 | 65 74 75 72 6e 3b 0d 09 |bottom)r|eturn;..|
|00000e10| 2f 2f 20 49 73 20 69 74 | 20 61 20 43 47 72 61 66 |// Is it| a CGraf|
|00000e20| 50 6f 72 74 20 6f 72 20 | 61 20 47 72 61 66 50 6f |Port or |a GrafPo|
|00000e30| 72 74 3f 0d 09 69 66 28 | 28 28 43 47 72 61 66 50 |rt?..if(|((CGrafP|
|00000e40| 74 72 29 77 69 6e 64 6f | 77 29 2d 3e 70 6f 72 74 |tr)windo|w)->port|
|00000e50| 56 65 72 73 69 6f 6e 3c | 30 29 09 09 2f 2f 20 49 |Version<|0)..// I|
|00000e60| 74 27 73 20 61 20 43 47 | 72 61 66 50 6f 72 74 2c |t's a CG|rafPort,|
|00000e70| 0d 09 09 70 6d 20 3d 20 | 2a 28 28 43 47 72 61 66 |...pm = |*((CGraf|
|00000e80| 50 74 72 29 77 69 6e 64 | 6f 77 29 2d 3e 70 6f 72 |Ptr)wind|ow)->por|
|00000e90| 74 50 69 78 4d 61 70 3b | 09 2f 2f 20 70 61 73 73 |tPixMap;|.// pass|
|00000ea0| 20 70 69 78 6d 61 70 20 | 70 74 72 2e 0d 09 65 6c | pixmap |ptr...el|
|00000eb0| 73 65 20 09 09 09 09 09 | 09 09 09 09 09 2f 2f 20 |se .....|.....// |
|00000ec0| 49 74 27 73 20 61 20 47 | 72 61 66 50 6f 72 74 2c |It's a G|rafPort,|
|00000ed0| 0d 09 09 70 6d 20 3d 20 | 28 50 69 78 4d 61 70 50 |...pm = |(PixMapP|
|00000ee0| 74 72 29 20 26 77 69 6e | 64 6f 77 2d 3e 70 6f 72 |tr) &win|dow->por|
|00000ef0| 74 42 69 74 73 3b 09 09 | 2f 2f 20 70 61 73 73 20 |tBits;..|// pass |
|00000f00| 62 69 74 6d 61 70 20 70 | 74 72 2e 0d 09 53 65 74 |bitmap p|tr...Set|
|00000f10| 50 69 78 6d 61 70 50 69 | 78 65 6c 28 70 6d 2c 78 |PixmapPi|xel(pm,x|
|00000f20| 2c 79 2c 76 61 6c 75 65 | 29 3b 0d 7d 0d 0d 75 6e |,y,value|);.}..un|
|00000f30| 73 69 67 6e 65 64 20 6c | 6f 6e 67 20 47 65 74 4f |signed l|ong GetO|
|00000f40| 6e 65 50 69 78 65 6c 28 | 69 6e 74 20 78 2c 69 6e |nePixel(|int x,in|
|00000f50| 74 20 79 29 0d 2f 2f 20 | 41 73 73 75 6d 65 73 20 |t y).// |Assumes |
|00000f60| 28 78 2c 79 29 20 69 73 | 20 69 6e 20 74 68 65 20 |(x,y) is| in the |
|00000f70| 6c 6f 63 61 6c 20 63 6f | 6f 72 64 69 6e 61 74 65 |local co|ordinate|
|00000f80| 20 73 79 73 74 65 6d 20 | 6f 66 20 74 68 65 20 63 | system |of the c|
|00000f90| 75 72 72 65 6e 74 20 70 | 6f 72 74 2e 0d 7b 0d 09 |urrent p|ort..{..|
|00000fa0| 57 69 6e 64 6f 77 50 74 | 72 20 77 69 6e 64 6f 77 |WindowPt|r window|
|00000fb0| 3b 0d 09 50 69 78 4d 61 | 70 50 74 72 20 70 6d 3b |;..PixMa|pPtr pm;|
|00000fc0| 0d 09 0d 09 47 65 74 50 | 6f 72 74 28 26 77 69 6e |....GetP|ort(&win|
|00000fd0| 64 6f 77 29 3b 0d 09 69 | 66 28 78 3c 77 69 6e 64 |dow);..i|f(x<wind|
|00000fe0| 6f 77 2d 3e 70 6f 72 74 | 52 65 63 74 2e 6c 65 66 |ow->port|Rect.lef|
|00000ff0| 74 20 7c 7c 20 78 3e 3d | 77 69 6e 64 6f 77 2d 3e |t || x>=|window->|
|00001000| 70 6f 72 74 52 65 63 74 | 2e 72 69 67 68 74 0d 09 |portRect|.right..|
|00001010| 09 7c 7c 20 79 3c 77 69 | 6e 64 6f 77 2d 3e 70 6f |.|| y<wi|ndow->po|
|00001020| 72 74 52 65 63 74 2e 74 | 6f 70 20 7c 7c 20 79 3e |rtRect.t|op || y>|
|00001030| 3d 77 69 6e 64 6f 77 2d | 3e 70 6f 72 74 52 65 63 |=window-|>portRec|
|00001040| 74 2e 62 6f 74 74 6f 6d | 29 72 65 74 75 72 6e 20 |t.bottom|)return |
|00001050| 30 3b 0d 09 2f 2f 20 49 | 73 20 69 74 20 61 20 43 |0;..// I|s it a C|
|00001060| 47 72 61 66 50 6f 72 74 | 20 6f 72 20 61 20 47 72 |GrafPort| or a Gr|
|00001070| 61 66 50 6f 72 74 3f 0d | 09 69 66 28 28 28 43 47 |afPort?.|.if(((CG|
|00001080| 72 61 66 50 74 72 29 77 | 69 6e 64 6f 77 29 2d 3e |rafPtr)w|indow)->|
|00001090| 70 6f 72 74 56 65 72 73 | 69 6f 6e 3c 30 29 09 09 |portVers|ion<0)..|
|000010a0| 2f 2f 20 49 74 27 73 20 | 61 20 43 47 72 61 66 50 |// It's |a CGrafP|
|000010b0| 6f 72 74 2c 0d 09 09 70 | 6d 20 3d 20 2a 28 28 43 |ort,...p|m = *((C|
|000010c0| 47 72 61 66 50 74 72 29 | 77 69 6e 64 6f 77 29 2d |GrafPtr)|window)-|
|000010d0| 3e 70 6f 72 74 50 69 78 | 4d 61 70 3b 09 2f 2f 20 |>portPix|Map;.// |
|000010e0| 70 61 73 73 20 70 69 78 | 6d 61 70 20 70 74 72 2e |pass pix|map ptr.|
|000010f0| 0d 09 65 6c 73 65 20 09 | 09 09 09 09 09 09 09 09 |..else .|........|
|00001100| 09 2f 2f 20 49 74 27 73 | 20 61 20 47 72 61 66 50 |.// It's| a GrafP|
|00001110| 6f 72 74 2c 0d 09 09 70 | 6d 20 3d 20 28 50 69 78 |ort,...p|m = (Pix|
|00001120| 4d 61 70 50 74 72 29 20 | 26 77 69 6e 64 6f 77 2d |MapPtr) |&window-|
|00001130| 3e 70 6f 72 74 42 69 74 | 73 3b 09 09 2f 2f 20 70 |>portBit|s;..// p|
|00001140| 61 73 73 20 62 69 74 6d | 61 70 20 70 74 72 2e 0d |ass bitm|ap ptr..|
|00001150| 09 72 65 74 75 72 6e 20 | 47 65 74 50 69 78 6d 61 |.return |GetPixma|
|00001160| 70 50 69 78 65 6c 28 70 | 6d 2c 78 2c 79 29 3b 0d |pPixel(p|m,x,y);.|
|00001170| 7d 0d 0d 76 6f 69 64 20 | 53 65 74 50 69 78 6d 61 |}..void |SetPixma|
|00001180| 70 50 69 78 65 6c 28 72 | 65 67 69 73 74 65 72 20 |pPixel(r|egister |
|00001190| 50 69 78 4d 61 70 50 74 | 72 20 70 6d 50 74 72 2c |PixMapPt|r pmPtr,|
|000011a0| 69 6e 74 20 78 2c 69 6e | 74 20 79 2c 75 6e 73 69 |int x,in|t y,unsi|
|000011b0| 67 6e 65 64 20 6c 6f 6e | 67 20 76 61 6c 75 65 29 |gned lon|g value)|
|000011c0| 0d 2f 2f 20 50 6f 6b 65 | 73 20 61 20 76 61 6c 75 |.// Poke|s a valu|
|000011d0| 65 20 69 6e 74 6f 20 61 | 20 70 69 78 65 6c 20 6f |e into a| pixel o|
|000011e0| 66 20 61 6e 79 20 73 69 | 7a 65 2e 20 41 63 63 65 |f any si|ze. Acce|
|000011f0| 70 74 73 20 65 69 74 68 | 65 72 20 70 69 78 6d 61 |pts eith|er pixma|
|00001200| 70 20 6f 72 20 62 69 74 | 6d 61 70 2e 0d 2f 2f 20 |p or bit|map..// |
|00001210| 41 73 73 75 6d 65 73 20 | 28 78 2c 79 29 20 69 73 |Assumes |(x,y) is|
|00001220| 20 69 6e 20 74 68 65 20 | 63 6f 6f 72 64 69 6e 61 | in the |coordina|
|00001230| 74 65 20 73 79 73 74 65 | 6d 20 6f 66 20 74 68 65 |te syste|m of the|
|00001240| 20 62 69 74 2f 70 69 78 | 6d 61 70 2e 0d 2f 2f 20 | bit/pix|map..// |
|00001250| 53 70 65 65 64 20 69 73 | 20 65 6e 68 61 6e 63 65 |Speed is| enhance|
|00001260| 64 20 62 79 20 72 65 75 | 73 69 6e 67 20 74 68 65 |d by reu|sing the|
|00001270| 20 63 61 63 68 65 64 20 | 69 6e 66 6f 72 6d 61 74 | cached |informat|
|00001280| 69 6f 6e 20 66 72 6f 6d | 20 6c 61 73 74 20 74 69 |ion from| last ti|
|00001290| 6d 65 20 69 66 20 69 74 | 27 73 20 74 68 65 0d 2f |me if it|'s the./|
|000012a0| 2f 20 73 61 6d 65 20 50 | 69 78 2f 42 69 74 6d 61 |/ same P|ix/Bitma|
|000012b0| 70 20 61 73 20 6c 61 73 | 74 20 74 69 6d 65 2c 20 |p as las|t time, |
|000012c0| 69 2e 65 2e 20 73 61 6d | 65 20 61 64 64 72 65 73 |i.e. sam|e addres|
|000012d0| 73 2c 20 62 61 73 65 41 | 64 64 72 2c 72 6f 77 42 |s, baseA|ddr,rowB|
|000012e0| 79 74 65 73 2c 20 61 6e | 64 20 62 6f 75 6e 64 73 |ytes, an|d bounds|
|000012f0| 2e 0d 2f 2f 20 59 6f 75 | 20 63 61 6e 20 66 6f 72 |..// You| can for|
|00001300| 63 65 20 69 74 20 74 6f | 20 66 6c 75 73 68 20 69 |ce it to| flush i|
|00001310| 74 73 20 63 61 63 68 65 | 20 62 79 20 70 61 73 73 |ts cache| by pass|
|00001320| 69 6e 67 20 61 20 4e 55 | 4c 4c 20 50 69 78 4d 61 |ing a NU|LL PixMa|
|00001330| 70 20 61 64 64 72 65 73 | 73 2e 0d 7b 0d 09 73 74 |p addres|s..{..st|
|00001340| 61 74 69 63 20 50 69 78 | 4d 61 70 50 74 72 20 6f |atic Pix|MapPtr o|
|00001350| 6c 64 50 6d 50 74 72 3d | 28 50 69 78 4d 61 70 50 |ldPmPtr=|(PixMapP|
|00001360| 74 72 29 2d 31 3b 0d 09 | 73 74 61 74 69 63 20 69 |tr)-1;..|static i|
|00001370| 6e 74 20 6f 6c 64 58 2c | 6f 6c 64 59 3b 0d 09 73 |nt oldX,|oldY;..s|
|00001380| 74 61 74 69 63 20 73 68 | 6f 72 74 20 72 6f 77 42 |tatic sh|ort rowB|
|00001390| 79 74 65 73 2c 6c 6f 67 | 50 69 78 65 6c 53 69 7a |ytes,log|PixelSiz|
|000013a0| 65 2c 62 69 74 73 4f 66 | 66 73 65 74 3b 0d 09 73 |e,bitsOf|fset;..s|
|000013b0| 74 61 74 69 63 20 75 6e | 73 69 67 6e 65 64 20 63 |tatic un|signed c|
|000013c0| 68 61 72 20 2a 70 69 78 | 65 6c 50 74 72 3b 0d 09 |har *pix|elPtr;..|
|000013d0| 73 74 61 74 69 63 20 42 | 69 74 4d 61 70 20 6f 6c |static B|itMap ol|
|000013e0| 64 4d 61 70 3b 0d 09 69 | 6e 74 20 73 68 69 66 74 |dMap;..i|nt shift|
|000013f0| 3b 0d 09 75 6e 73 69 67 | 6e 65 64 20 63 68 61 72 |;..unsig|ned char|
|00001400| 20 6d 61 73 6b 3b 0d 09 | 73 69 67 6e 65 64 20 63 | mask;..|signed c|
|00001410| 68 61 72 20 6d 6f 64 65 | 33 32 3d 74 72 75 65 33 |har mode|32=true3|
|00001420| 32 62 3b 0d 09 52 65 63 | 74 20 72 3b 0d 09 42 6f |2b;..Rec|t r;..Bo|
|00001430| 6f 6c 65 61 6e 20 63 61 | 6e 33 32 3b 0d 0d 09 63 |olean ca|n32;...c|
|00001440| 61 6e 33 32 3d 54 72 61 | 70 41 76 61 69 6c 61 62 |an32=Tra|pAvailab|
|00001450| 6c 65 28 5f 53 77 61 70 | 4d 4d 55 4d 6f 64 65 29 |le(_Swap|MMUMode)|
|00001460| 3b 0d 09 69 66 28 21 55 | 53 45 5f 43 41 43 48 45 |;..if(!U|SE_CACHE|
|00001470| 20 7c 7c 20 70 6d 50 74 | 72 21 3d 6f 6c 64 50 6d | || pmPt|r!=oldPm|
|00001480| 50 74 72 0d 09 09 7c 7c | 20 70 6d 50 74 72 2d 3e |Ptr...||| pmPtr->|
|00001490| 62 61 73 65 41 64 64 72 | 21 3d 6f 6c 64 4d 61 70 |baseAddr|!=oldMap|
|000014a0| 2e 62 61 73 65 41 64 64 | 72 20 0d 09 09 7c 7c 20 |.baseAdd|r ...|| |
|000014b0| 70 6d 50 74 72 2d 3e 72 | 6f 77 42 79 74 65 73 21 |pmPtr->r|owBytes!|
|000014c0| 3d 6f 6c 64 4d 61 70 2e | 72 6f 77 42 79 74 65 73 |=oldMap.|rowBytes|
|000014d0| 20 0d 09 09 7c 7c 20 2a | 28 6c 6f 6e 67 20 2a 29 | ...|| *|(long *)|
|000014e0| 26 70 6d 50 74 72 2d 3e | 62 6f 75 6e 64 73 2e 74 |&pmPtr->|bounds.t|
|000014f0| 6f 70 21 3d 2a 28 6c 6f | 6e 67 20 2a 29 26 6f 6c |op!=*(lo|ng *)&ol|
|00001500| 64 4d 61 70 2e 62 6f 75 | 6e 64 73 2e 74 6f 70 0d |dMap.bou|nds.top.|
|00001510| 09 09 7c 7c 20 2a 28 6c | 6f 6e 67 20 2a 29 26 70 |..|| *(l|ong *)&p|
|00001520| 6d 50 74 72 2d 3e 62 6f | 75 6e 64 73 2e 62 6f 74 |mPtr->bo|unds.bot|
|00001530| 74 6f 6d 21 3d 2a 28 6c | 6f 6e 67 20 2a 29 26 6f |tom!=*(l|ong *)&o|
|00001540| 6c 64 4d 61 70 2e 62 6f | 75 6e 64 73 2e 62 6f 74 |ldMap.bo|unds.bot|
|00001550| 74 6f 6d 29 7b 0d 09 09 | 2f 2f 20 43 61 63 68 65 |tom){...|// Cache|
|00001560| 20 69 73 20 73 74 61 6c | 65 2e 20 47 65 74 20 66 | is stal|e. Get f|
|00001570| 72 65 73 68 20 76 61 6c | 75 65 73 2e 0d 09 09 73 |resh val|ues....s|
|00001580| 68 6f 72 74 20 70 69 78 | 65 6c 53 69 7a 65 3b 0d |hort pix|elSize;.|
|00001590| 09 09 53 65 74 52 65 63 | 74 28 26 72 2c 78 2c 79 |..SetRec|t(&r,x,y|
|000015a0| 2c 78 2b 31 2c 79 2b 31 | 29 3b 0d 09 09 70 69 78 |,x+1,y+1|);...pix|
|000015b0| 65 6c 50 74 72 3d 52 65 | 63 74 54 6f 41 64 64 72 |elPtr=Re|ctToAddr|
|000015c0| 65 73 73 28 70 6d 50 74 | 72 2c 26 72 2c 26 72 6f |ess(pmPt|r,&r,&ro|
|000015d0| 77 42 79 74 65 73 2c 26 | 70 69 78 65 6c 53 69 7a |wBytes,&|pixelSiz|
|000015e0| 65 2c 26 62 69 74 73 4f | 66 66 73 65 74 29 3b 0d |e,&bitsO|ffset);.|
|000015f0| 09 09 69 66 28 70 69 78 | 65 6c 50 74 72 3d 3d 4e |..if(pix|elPtr==N|
|00001600| 55 4c 4c 29 7b 0d 09 09 | 09 6f 6c 64 50 6d 50 74 |ULL){...|.oldPmPt|
|00001610| 72 3d 28 50 69 78 4d 61 | 70 50 74 72 29 2d 31 3b |r=(PixMa|pPtr)-1;|
|00001620| 09 2f 2f 20 69 6e 76 61 | 6c 69 64 61 74 65 20 63 |.// inva|lidate c|
|00001630| 61 63 68 65 0d 09 09 09 | 72 65 74 75 72 6e 3b 0d |ache....|return;.|
|00001640| 09 09 7d 0d 09 09 6f 6c | 64 50 6d 50 74 72 3d 70 |..}...ol|dPmPtr=p|
|00001650| 6d 50 74 72 3b 0d 09 09 | 6f 6c 64 4d 61 70 3d 2a |mPtr;...|oldMap=*|
|00001660| 28 42 69 74 4d 61 70 20 | 2a 29 70 6d 50 74 72 3b |(BitMap |*)pmPtr;|
|00001670| 0d 09 09 6c 6f 67 50 69 | 78 65 6c 53 69 7a 65 3d |...logPi|xelSize=|
|00001680| 4c 6f 67 32 4c 28 70 69 | 78 65 6c 53 69 7a 65 29 |Log2L(pi|xelSize)|
|00001690| 3b 0d 09 7d 65 6c 73 65 | 7b 0d 09 09 2f 2f 20 43 |;..}else|{...// C|
|000016a0| 61 63 68 65 20 69 73 20 | 66 72 65 73 68 2e 20 4d |ache is |fresh. M|
|000016b0| 65 72 65 6c 79 20 63 6f | 72 72 65 63 74 20 66 6f |erely co|rrect fo|
|000016c0| 72 20 63 68 61 6e 67 65 | 73 20 69 6e 20 78 20 61 |r change|s in x a|
|000016d0| 6e 64 20 79 2e 0d 09 09 | 69 66 28 70 69 78 65 6c |nd y....|if(pixel|
|000016e0| 50 74 72 3d 3d 4e 55 4c | 4c 29 72 65 74 75 72 6e |Ptr==NUL|L)return|
|000016f0| 3b 0d 09 09 69 66 28 6c | 6f 67 50 69 78 65 6c 53 |;...if(l|ogPixelS|
|00001700| 69 7a 65 3c 33 29 7b 0d | 09 09 09 72 65 67 69 73 |ize<3){.|...regis|
|00001710| 74 65 72 20 6c 6f 6e 67 | 20 62 69 74 73 3b 0d 09 |ter long| bits;..|
|00001720| 09 09 62 69 74 73 3d 62 | 69 74 73 4f 66 66 73 65 |..bits=b|itsOffse|
|00001730| 74 2b 28 6c 6f 6e 67 29 | 28 78 2d 6f 6c 64 58 29 |t+(long)|(x-oldX)|
|00001740| 3c 3c 6c 6f 67 50 69 78 | 65 6c 53 69 7a 65 3b 0d |<<logPix|elSize;.|
|00001750| 09 09 09 70 69 78 65 6c | 50 74 72 2b 3d 62 69 74 |...pixel|Ptr+=bit|
|00001760| 73 3e 3e 33 3b 0d 09 09 | 09 62 69 74 73 4f 66 66 |s>>3;...|.bitsOff|
|00001770| 73 65 74 3d 62 69 74 73 | 26 37 3b 0d 09 09 7d 65 |set=bits|&7;...}e|
|00001780| 6c 73 65 20 70 69 78 65 | 6c 50 74 72 2b 3d 28 78 |lse pixe|lPtr+=(x|
|00001790| 2d 6f 6c 64 58 29 3c 3c | 28 6c 6f 67 50 69 78 65 |-oldX)<<|(logPixe|
|000017a0| 6c 53 69 7a 65 2d 33 29 | 3b 0d 09 09 69 66 28 79 |lSize-3)|;...if(y|
|000017b0| 21 3d 6f 6c 64 59 29 70 | 69 78 65 6c 50 74 72 2b |!=oldY)p|ixelPtr+|
|000017c0| 3d 28 6c 6f 6e 67 29 28 | 79 2d 6f 6c 64 59 29 2a |=(long)(|y-oldY)*|
|000017d0| 72 6f 77 42 79 74 65 73 | 3b 0d 09 7d 0d 09 69 66 |rowBytes|;..}..if|
|000017e0| 28 63 61 6e 33 32 29 53 | 77 61 70 4d 4d 55 4d 6f |(can32)S|wapMMUMo|
|000017f0| 64 65 28 28 76 6f 69 64 | 20 2a 29 26 6d 6f 64 65 |de((void| *)&mode|
|00001800| 33 32 29 3b 0d 09 73 77 | 69 74 63 68 28 6c 6f 67 |32);..sw|itch(log|
|00001810| 50 69 78 65 6c 53 69 7a | 65 29 7b 0d 09 09 72 65 |PixelSiz|e){...re|
|00001820| 67 69 73 74 65 72 20 75 | 6e 73 69 67 6e 65 64 20 |gister u|nsigned |
|00001830| 63 68 61 72 20 76 61 6c | 3b 0d 09 63 61 73 65 20 |char val|;..case |
|00001840| 30 3a 0d 09 09 73 68 69 | 66 74 3d 38 2d 31 2d 62 |0:...shi|ft=8-1-b|
|00001850| 69 74 73 4f 66 66 73 65 | 74 3b 09 2f 2f 20 66 72 |itsOffse|t;.// fr|
|00001860| 6f 6d 20 72 69 67 68 74 | 2c 20 69 6e 73 74 65 61 |om right|, instea|
|00001870| 64 20 6f 66 20 66 72 6f | 6d 20 6c 65 66 74 0d 09 |d of fro|m left..|
|00001880| 09 6d 61 73 6b 3d 31 3c | 3c 73 68 69 66 74 3b 0d |.mask=1<|<shift;.|
|00001890| 09 09 76 61 6c 3d 28 28 | 75 6e 73 69 67 6e 65 64 |..val=((|unsigned|
|000018a0| 20 63 68 61 72 29 76 61 | 6c 75 65 3c 3c 73 68 69 | char)va|lue<<shi|
|000018b0| 66 74 29 26 6d 61 73 6b | 3b 0d 09 09 6d 61 73 6b |ft)&mask|;...mask|
|000018c0| 3d 7e 6d 61 73 6b 3b 0d | 09 09 2a 70 69 78 65 6c |=~mask;.|..*pixel|
|000018d0| 50 74 72 3d 20 2a 70 69 | 78 65 6c 50 74 72 20 26 |Ptr= *pi|xelPtr &|
|000018e0| 20 6d 61 73 6b 20 7c 20 | 28 75 6e 73 69 67 6e 65 | mask | |(unsigne|
|000018f0| 64 20 63 68 61 72 29 76 | 61 6c 3b 0d 09 09 62 72 |d char)v|al;...br|
|00001900| 65 61 6b 3b 0d 09 63 61 | 73 65 20 31 3a 0d 09 09 |eak;..ca|se 1:...|
|00001910| 73 68 69 66 74 3d 38 2d | 32 2d 62 69 74 73 4f 66 |shift=8-|2-bitsOf|
|00001920| 66 73 65 74 3b 09 2f 2f | 20 66 72 6f 6d 20 72 69 |fset;.//| from ri|
|00001930| 67 68 74 2c 20 69 6e 73 | 74 65 61 64 20 6f 66 20 |ght, ins|tead of |
|00001940| 66 72 6f 6d 20 6c 65 66 | 74 0d 09 09 6d 61 73 6b |from lef|t...mask|
|00001950| 3d 33 3c 3c 73 68 69 66 | 74 3b 0d 09 09 76 61 6c |=3<<shif|t;...val|
|00001960| 3d 28 28 75 6e 73 69 67 | 6e 65 64 20 63 68 61 72 |=((unsig|ned char|
|00001970| 29 76 61 6c 75 65 3c 3c | 73 68 69 66 74 29 26 6d |)value<<|shift)&m|
|00001980| 61 73 6b 3b 0d 09 09 6d | 61 73 6b 3d 7e 6d 61 73 |ask;...m|ask=~mas|
|00001990| 6b 3b 0d 09 09 2a 70 69 | 78 65 6c 50 74 72 3d 20 |k;...*pi|xelPtr= |
|000019a0| 2a 70 69 78 65 6c 50 74 | 72 20 26 20 6d 61 73 6b |*pixelPt|r & mask|
|000019b0| 20 7c 20 28 75 6e 73 69 | 67 6e 65 64 20 63 68 61 | | (unsi|gned cha|
|000019c0| 72 29 76 61 6c 3b 0d 09 | 09 62 72 65 61 6b 3b 0d |r)val;..|.break;.|
|000019d0| 09 63 61 73 65 20 32 3a | 0d 09 09 73 68 69 66 74 |.case 2:|...shift|
|000019e0| 3d 38 2d 34 2d 62 69 74 | 73 4f 66 66 73 65 74 3b |=8-4-bit|sOffset;|
|000019f0| 09 2f 2f 20 66 72 6f 6d | 20 72 69 67 68 74 2c 20 |.// from| right, |
|00001a00| 69 6e 73 74 65 61 64 20 | 6f 66 20 66 72 6f 6d 20 |instead |of from |
|00001a10| 6c 65 66 74 0d 09 09 6d | 61 73 6b 3d 31 35 3c 3c |left...m|ask=15<<|
|00001a20| 73 68 69 66 74 3b 0d 09 | 09 76 61 6c 3d 28 28 75 |shift;..|.val=((u|
|00001a30| 6e 73 69 67 6e 65 64 20 | 63 68 61 72 29 76 61 6c |nsigned |char)val|
|00001a40| 75 65 3c 3c 73 68 69 66 | 74 29 26 6d 61 73 6b 3b |ue<<shif|t)&mask;|
|00001a50| 0d 09 09 6d 61 73 6b 3d | 7e 6d 61 73 6b 3b 0d 09 |...mask=|~mask;..|
|00001a60| 09 2a 70 69 78 65 6c 50 | 74 72 3d 20 2a 70 69 78 |.*pixelP|tr= *pix|
|00001a70| 65 6c 50 74 72 20 26 20 | 6d 61 73 6b 20 7c 20 28 |elPtr & |mask | (|
|00001a80| 75 6e 73 69 67 6e 65 64 | 20 63 68 61 72 29 76 61 |unsigned| char)va|
|00001a90| 6c 3b 0d 09 09 62 72 65 | 61 6b 3b 0d 09 63 61 73 |l;...bre|ak;..cas|
|00001aa0| 65 20 33 3a 0d 09 09 2a | 70 69 78 65 6c 50 74 72 |e 3:...*|pixelPtr|
|00001ab0| 3d 76 61 6c 75 65 3b 0d | 09 09 62 72 65 61 6b 3b |=value;.|..break;|
|00001ac0| 0d 09 63 61 73 65 20 34 | 3a 0d 09 09 2a 28 75 6e |..case 4|:...*(un|
|00001ad0| 73 69 67 6e 65 64 20 73 | 68 6f 72 74 20 2a 29 70 |signed s|hort *)p|
|00001ae0| 69 78 65 6c 50 74 72 3d | 76 61 6c 75 65 3b 0d 09 |ixelPtr=|value;..|
|00001af0| 09 62 72 65 61 6b 3b 0d | 09 63 61 73 65 20 35 3a |.break;.|.case 5:|
|00001b00| 0d 09 09 2a 28 75 6e 73 | 69 67 6e 65 64 20 6c 6f |...*(uns|igned lo|
|00001b10| 6e 67 20 2a 29 70 69 78 | 65 6c 50 74 72 3d 76 61 |ng *)pix|elPtr=va|
|00001b20| 6c 75 65 3b 0d 09 09 62 | 72 65 61 6b 3b 0d 09 7d |lue;...b|reak;..}|
|00001b30| 0d 09 69 66 28 63 61 6e | 33 32 29 53 77 61 70 4d |..if(can|32)SwapM|
|00001b40| 4d 55 4d 6f 64 65 28 28 | 76 6f 69 64 20 2a 29 26 |MUMode((|void *)&|
|00001b50| 6d 6f 64 65 33 32 29 3b | 0d 09 6f 6c 64 58 3d 78 |mode32);|..oldX=x|
|00001b60| 3b 0d 09 6f 6c 64 59 3d | 79 3b 0d 7d 0d 0d 75 6e |;..oldY=|y;.}..un|
|00001b70| 73 69 67 6e 65 64 20 6c | 6f 6e 67 20 47 65 74 50 |signed l|ong GetP|
|00001b80| 69 78 6d 61 70 50 69 78 | 65 6c 28 72 65 67 69 73 |ixmapPix|el(regis|
|00001b90| 74 65 72 20 50 69 78 4d | 61 70 50 74 72 20 70 6d |ter PixM|apPtr pm|
|00001ba0| 50 74 72 2c 69 6e 74 20 | 78 2c 69 6e 74 20 79 29 |Ptr,int |x,int y)|
|00001bb0| 0d 2f 2f 20 52 65 74 75 | 72 6e 73 20 74 68 65 20 |.// Retu|rns the |
|00001bc0| 63 6f 6e 74 65 6e 74 73 | 20 6f 66 20 61 20 70 69 |contents| of a pi|
|00001bd0| 78 65 6c 20 6f 66 20 61 | 6e 79 20 73 69 7a 65 2e |xel of a|ny size.|
|00001be0| 20 41 63 63 65 70 74 73 | 20 65 69 74 68 65 72 20 | Accepts| either |
|00001bf0| 70 69 78 6d 61 70 20 6f | 72 20 62 69 74 6d 61 70 |pixmap o|r bitmap|
|00001c00| 2e 0d 2f 2f 20 41 73 73 | 75 6d 65 73 20 28 78 2c |..// Ass|umes (x,|
|00001c10| 79 29 20 69 73 20 69 6e | 20 74 68 65 20 63 6f 6f |y) is in| the coo|
|00001c20| 72 64 69 6e 61 74 65 20 | 73 79 73 74 65 6d 20 6f |rdinate |system o|
|00001c30| 66 20 74 68 65 20 62 69 | 74 2f 70 69 78 6d 61 70 |f the bi|t/pixmap|
|00001c40| 2e 0d 2f 2f 20 53 70 65 | 65 64 20 69 73 20 65 6e |..// Spe|ed is en|
|00001c50| 68 61 6e 63 65 64 20 62 | 79 20 72 65 75 73 69 6e |hanced b|y reusin|
|00001c60| 67 20 74 68 65 20 63 61 | 63 68 65 64 20 69 6e 66 |g the ca|ched inf|
|00001c70| 6f 72 6d 61 74 69 6f 6e | 20 66 72 6f 6d 20 6c 61 |ormation| from la|
|00001c80| 73 74 20 74 69 6d 65 20 | 69 66 20 69 74 27 73 20 |st time |if it's |
|00001c90| 74 68 65 0d 2f 2f 20 73 | 61 6d 65 20 50 69 78 2f |the.// s|ame Pix/|
|00001ca0| 42 69 74 6d 61 70 20 61 | 73 20 6c 61 73 74 20 74 |Bitmap a|s last t|
|00001cb0| 69 6d 65 2c 20 69 2e 65 | 2e 20 73 61 6d 65 20 61 |ime, i.e|. same a|
|00001cc0| 64 64 72 65 73 73 2c 20 | 62 61 73 65 41 64 64 72 |ddress, |baseAddr|
|00001cd0| 2c 72 6f 77 42 79 74 65 | 73 2c 20 61 6e 64 20 62 |,rowByte|s, and b|
|00001ce0| 6f 75 6e 64 73 2e 0d 2f | 2f 20 59 6f 75 20 63 61 |ounds../|/ You ca|
|00001cf0| 6e 20 66 6f 72 63 65 20 | 69 74 20 74 6f 20 66 6c |n force |it to fl|
|00001d00| 75 73 68 20 69 74 73 20 | 63 61 63 68 65 20 62 79 |ush its |cache by|
|00001d10| 20 70 61 73 73 69 6e 67 | 20 61 20 4e 55 4c 4c 20 | passing| a NULL |
|00001d20| 50 69 78 4d 61 70 20 61 | 64 64 72 65 73 73 2e 0d |PixMap a|ddress..|
|00001d30| 7b 0d 09 73 74 61 74 69 | 63 20 50 69 78 4d 61 70 |{..stati|c PixMap|
|00001d40| 50 74 72 20 6f 6c 64 50 | 6d 50 74 72 3d 28 50 69 |Ptr oldP|mPtr=(Pi|
|00001d50| 78 4d 61 70 50 74 72 29 | 2d 31 3b 0d 09 73 74 61 |xMapPtr)|-1;..sta|
|00001d60| 74 69 63 20 69 6e 74 20 | 6f 6c 64 58 2c 6f 6c 64 |tic int |oldX,old|
|00001d70| 59 3b 0d 09 73 74 61 74 | 69 63 20 73 68 6f 72 74 |Y;..stat|ic short|
|00001d80| 20 72 6f 77 42 79 74 65 | 73 2c 6c 6f 67 50 69 78 | rowByte|s,logPix|
|00001d90| 65 6c 53 69 7a 65 2c 62 | 69 74 73 4f 66 66 73 65 |elSize,b|itsOffse|
|00001da0| 74 3b 0d 09 73 74 61 74 | 69 63 20 75 6e 73 69 67 |t;..stat|ic unsig|
|00001db0| 6e 65 64 20 63 68 61 72 | 20 2a 70 69 78 65 6c 50 |ned char| *pixelP|
|00001dc0| 74 72 3b 0d 09 73 74 61 | 74 69 63 20 42 69 74 4d |tr;..sta|tic BitM|
|00001dd0| 61 70 20 6f 6c 64 4d 61 | 70 3b 0d 09 69 6e 74 20 |ap oldMa|p;..int |
|00001de0| 73 68 69 66 74 3b 0d 09 | 73 69 67 6e 65 64 20 63 |shift;..|signed c|
|00001df0| 68 61 72 20 6d 6f 64 65 | 33 32 3d 74 72 75 65 33 |har mode|32=true3|
|00001e00| 32 62 3b 0d 09 52 65 63 | 74 20 72 3b 0d 09 75 6e |2b;..Rec|t r;..un|
|00001e10| 73 69 67 6e 65 64 20 6c | 6f 6e 67 20 76 61 6c 75 |signed l|ong valu|
|00001e20| 65 3b 0d 09 42 6f 6f 6c | 65 61 6e 20 63 61 6e 33 |e;..Bool|ean can3|
|00001e30| 32 3b 0d 0d 09 63 61 6e | 33 32 3d 54 72 61 70 41 |2;...can|32=TrapA|
|00001e40| 76 61 69 6c 61 62 6c 65 | 28 5f 53 77 61 70 4d 4d |vailable|(_SwapMM|
|00001e50| 55 4d 6f 64 65 29 3b 0d | 09 69 66 28 21 55 53 45 |UMode);.|.if(!USE|
|00001e60| 5f 43 41 43 48 45 20 7c | 7c 20 70 6d 50 74 72 21 |_CACHE ||| pmPtr!|
|00001e70| 3d 6f 6c 64 50 6d 50 74 | 72 0d 09 09 7c 7c 20 70 |=oldPmPt|r...|| p|
|00001e80| 6d 50 74 72 2d 3e 62 61 | 73 65 41 64 64 72 21 3d |mPtr->ba|seAddr!=|
|00001e90| 6f 6c 64 4d 61 70 2e 62 | 61 73 65 41 64 64 72 20 |oldMap.b|aseAddr |
|00001ea0| 0d 09 09 7c 7c 20 70 6d | 50 74 72 2d 3e 72 6f 77 |...|| pm|Ptr->row|
|00001eb0| 42 79 74 65 73 21 3d 6f | 6c 64 4d 61 70 2e 72 6f |Bytes!=o|ldMap.ro|
|00001ec0| 77 42 79 74 65 73 20 0d | 09 09 7c 7c 20 2a 28 6c |wBytes .|..|| *(l|
|00001ed0| 6f 6e 67 20 2a 29 26 70 | 6d 50 74 72 2d 3e 62 6f |ong *)&p|mPtr->bo|
|00001ee0| 75 6e 64 73 2e 74 6f 70 | 21 3d 2a 28 6c 6f 6e 67 |unds.top|!=*(long|
|00001ef0| 20 2a 29 26 6f 6c 64 4d | 61 70 2e 62 6f 75 6e 64 | *)&oldM|ap.bound|
|00001f00| 73 2e 74 6f 70 0d 09 09 | 7c 7c 20 2a 28 6c 6f 6e |s.top...||| *(lon|
|00001f10| 67 20 2a 29 26 70 6d 50 | 74 72 2d 3e 62 6f 75 6e |g *)&pmP|tr->boun|
|00001f20| 64 73 2e 62 6f 74 74 6f | 6d 21 3d 2a 28 6c 6f 6e |ds.botto|m!=*(lon|
|00001f30| 67 20 2a 29 26 6f 6c 64 | 4d 61 70 2e 62 6f 75 6e |g *)&old|Map.boun|
|00001f40| 64 73 2e 62 6f 74 74 6f | 6d 29 7b 0d 09 09 2f 2f |ds.botto|m){...//|
|00001f50| 20 43 61 63 68 65 20 69 | 73 20 73 74 61 6c 65 2e | Cache i|s stale.|
|00001f60| 20 47 65 74 20 66 72 65 | 73 68 20 76 61 6c 75 65 | Get fre|sh value|
|00001f70| 73 2e 0d 09 09 73 68 6f | 72 74 20 70 69 78 65 6c |s....sho|rt pixel|
|00001f80| 53 69 7a 65 3b 0d 09 09 | 0d 09 09 53 65 74 52 65 |Size;...|...SetRe|
|00001f90| 63 74 28 26 72 2c 78 2c | 79 2c 78 2b 31 2c 79 2b |ct(&r,x,|y,x+1,y+|
|00001fa0| 31 29 3b 0d 09 09 70 69 | 78 65 6c 50 74 72 3d 52 |1);...pi|xelPtr=R|
|00001fb0| 65 63 74 54 6f 41 64 64 | 72 65 73 73 28 70 6d 50 |ectToAdd|ress(pmP|
|00001fc0| 74 72 2c 26 72 2c 26 72 | 6f 77 42 79 74 65 73 2c |tr,&r,&r|owBytes,|
|00001fd0| 26 70 69 78 65 6c 53 69 | 7a 65 2c 26 62 69 74 73 |&pixelSi|ze,&bits|
|00001fe0| 4f 66 66 73 65 74 29 3b | 0d 09 09 69 66 28 70 69 |Offset);|...if(pi|
|00001ff0| 78 65 6c 50 74 72 3d 3d | 4e 55 4c 4c 29 7b 0d 09 |xelPtr==|NULL){..|
|00002000| 09 09 6f 6c 64 50 6d 50 | 74 72 3d 28 50 69 78 4d |..oldPmP|tr=(PixM|
|00002010| 61 70 50 74 72 29 2d 31 | 3b 09 2f 2f 20 69 6e 76 |apPtr)-1|;.// inv|
|00002020| 61 6c 69 64 61 74 65 20 | 63 61 63 68 65 0d 09 09 |alidate |cache...|
|00002030| 09 72 65 74 75 72 6e 20 | 30 3b 0d 09 09 7d 0d 09 |.return |0;...}..|
|00002040| 09 6f 6c 64 50 6d 50 74 | 72 3d 70 6d 50 74 72 3b |.oldPmPt|r=pmPtr;|
|00002050| 0d 09 09 6f 6c 64 4d 61 | 70 3d 2a 28 42 69 74 4d |...oldMa|p=*(BitM|
|00002060| 61 70 20 2a 29 70 6d 50 | 74 72 3b 0d 09 09 6c 6f |ap *)pmP|tr;...lo|
|00002070| 67 50 69 78 65 6c 53 69 | 7a 65 3d 4c 6f 67 32 4c |gPixelSi|ze=Log2L|
|00002080| 28 70 69 78 65 6c 53 69 | 7a 65 29 3b 0d 09 7d 65 |(pixelSi|ze);..}e|
|00002090| 6c 73 65 7b 0d 09 09 2f | 2f 20 49 73 20 61 6c 72 |lse{.../|/ Is alr|
|000020a0| 65 61 64 79 20 69 6e 20 | 63 61 63 68 65 2e 20 4d |eady in |cache. M|
|000020b0| 65 72 65 6c 79 20 63 6f | 72 72 65 63 74 20 66 6f |erely co|rrect fo|
|000020c0| 72 20 63 68 61 6e 67 65 | 73 20 69 6e 20 78 20 61 |r change|s in x a|
|000020d0| 6e 64 20 79 2e 0d 09 09 | 69 66 28 70 69 78 65 6c |nd y....|if(pixel|
|000020e0| 50 74 72 3d 3d 4e 55 4c | 4c 29 72 65 74 75 72 6e |Ptr==NUL|L)return|
|000020f0| 20 30 3b 0d 09 09 69 66 | 28 6c 6f 67 50 69 78 65 | 0;...if|(logPixe|
|00002100| 6c 53 69 7a 65 3c 33 29 | 7b 0d 09 09 09 72 65 67 |lSize<3)|{....reg|
|00002110| 69 73 74 65 72 20 6c 6f | 6e 67 20 62 69 74 73 3b |ister lo|ng bits;|
|00002120| 0d 09 09 09 62 69 74 73 | 3d 62 69 74 73 4f 66 66 |....bits|=bitsOff|
|00002130| 73 65 74 2b 28 6c 6f 6e | 67 29 28 78 2d 6f 6c 64 |set+(lon|g)(x-old|
|00002140| 58 29 3c 3c 6c 6f 67 50 | 69 78 65 6c 53 69 7a 65 |X)<<logP|ixelSize|
|00002150| 3b 0d 09 09 09 70 69 78 | 65 6c 50 74 72 2b 3d 62 |;....pix|elPtr+=b|
|00002160| 69 74 73 3e 3e 33 3b 0d | 09 09 09 62 69 74 73 4f |its>>3;.|...bitsO|
|00002170| 66 66 73 65 74 3d 62 69 | 74 73 26 37 3b 0d 09 09 |ffset=bi|ts&7;...|
|00002180| 7d 65 6c 73 65 20 70 69 | 78 65 6c 50 74 72 2b 3d |}else pi|xelPtr+=|
|00002190| 28 78 2d 6f 6c 64 58 29 | 3c 3c 28 6c 6f 67 50 69 |(x-oldX)|<<(logPi|
|000021a0| 78 65 6c 53 69 7a 65 2d | 33 29 3b 0d 09 09 69 66 |xelSize-|3);...if|
|000021b0| 28 79 21 3d 6f 6c 64 59 | 29 70 69 78 65 6c 50 74 |(y!=oldY|)pixelPt|
|000021c0| 72 2b 3d 28 6c 6f 6e 67 | 29 28 79 2d 6f 6c 64 59 |r+=(long|)(y-oldY|
|000021d0| 29 2a 72 6f 77 42 79 74 | 65 73 3b 0d 09 7d 0d 09 |)*rowByt|es;..}..|
|000021e0| 69 66 28 63 61 6e 33 32 | 29 53 77 61 70 4d 4d 55 |if(can32|)SwapMMU|
|000021f0| 4d 6f 64 65 28 28 76 6f | 69 64 20 2a 29 26 6d 6f |Mode((vo|id *)&mo|
|00002200| 64 65 33 32 29 3b 0d 09 | 73 77 69 74 63 68 28 6c |de32);..|switch(l|
|00002210| 6f 67 50 69 78 65 6c 53 | 69 7a 65 29 7b 0d 09 63 |ogPixelS|ize){..c|
|00002220| 61 73 65 20 30 3a 0d 09 | 09 73 68 69 66 74 3d 38 |ase 0:..|.shift=8|
|00002230| 2d 31 2d 62 69 74 73 4f | 66 66 73 65 74 3b 09 2f |-1-bitsO|ffset;./|
|00002240| 2f 20 66 72 6f 6d 20 72 | 69 67 68 74 2c 20 69 6e |/ from r|ight, in|
|00002250| 73 74 65 61 64 20 6f 66 | 20 66 72 6f 6d 20 6c 65 |stead of| from le|
|00002260| 66 74 0d 09 09 76 61 6c | 75 65 3d 2a 70 69 78 65 |ft...val|ue=*pixe|
|00002270| 6c 50 74 72 3e 3e 73 68 | 69 66 74 20 26 20 31 3b |lPtr>>sh|ift & 1;|
|00002280| 0d 09 09 62 72 65 61 6b | 3b 0d 09 63 61 73 65 20 |...break|;..case |
|00002290| 31 3a 0d 09 09 73 68 69 | 66 74 3d 38 2d 32 2d 62 |1:...shi|ft=8-2-b|
|000022a0| 69 74 73 4f 66 66 73 65 | 74 3b 09 2f 2f 20 66 72 |itsOffse|t;.// fr|
|000022b0| 6f 6d 20 72 69 67 68 74 | 2c 20 69 6e 73 74 65 61 |om right|, instea|
|000022c0| 64 20 6f 66 20 66 72 6f | 6d 20 6c 65 66 74 0d 09 |d of fro|m left..|
|000022d0| 09 76 61 6c 75 65 3d 2a | 70 69 78 65 6c 50 74 72 |.value=*|pixelPtr|
|000022e0| 3e 3e 73 68 69 66 74 20 | 26 20 33 3b 0d 09 09 62 |>>shift |& 3;...b|
|000022f0| 72 65 61 6b 3b 0d 09 63 | 61 73 65 20 32 3a 0d 09 |reak;..c|ase 2:..|
|00002300| 09 73 68 69 66 74 3d 38 | 2d 34 2d 62 69 74 73 4f |.shift=8|-4-bitsO|
|00002310| 66 66 73 65 74 3b 09 2f | 2f 20 66 72 6f 6d 20 72 |ffset;./|/ from r|
|00002320| 69 67 68 74 2c 20 69 6e | 73 74 65 61 64 20 6f 66 |ight, in|stead of|
|00002330| 20 66 72 6f 6d 20 6c 65 | 66 74 0d 09 09 76 61 6c | from le|ft...val|
|00002340| 75 65 3d 2a 70 69 78 65 | 6c 50 74 72 3e 3e 73 68 |ue=*pixe|lPtr>>sh|
|00002350| 69 66 74 20 26 20 31 35 | 3b 0d 09 09 62 72 65 61 |ift & 15|;...brea|
|00002360| 6b 3b 0d 09 63 61 73 65 | 20 33 3a 0d 09 09 76 61 |k;..case| 3:...va|
|00002370| 6c 75 65 3d 2a 70 69 78 | 65 6c 50 74 72 3b 0d 09 |lue=*pix|elPtr;..|
|00002380| 09 62 72 65 61 6b 3b 0d | 09 63 61 73 65 20 34 3a |.break;.|.case 4:|
|00002390| 0d 09 09 76 61 6c 75 65 | 3d 2a 28 75 6e 73 69 67 |...value|=*(unsig|
|000023a0| 6e 65 64 20 73 68 6f 72 | 74 20 2a 29 70 69 78 65 |ned shor|t *)pixe|
|000023b0| 6c 50 74 72 3b 0d 09 09 | 62 72 65 61 6b 3b 0d 09 |lPtr;...|break;..|
|000023c0| 63 61 73 65 20 35 3a 0d | 09 09 76 61 6c 75 65 3d |case 5:.|..value=|
|000023d0| 2a 28 75 6e 73 69 67 6e | 65 64 20 6c 6f 6e 67 20 |*(unsign|ed long |
|000023e0| 2a 29 70 69 78 65 6c 50 | 74 72 3b 0d 09 09 62 72 |*)pixelP|tr;...br|
|000023f0| 65 61 6b 3b 0d 09 7d 0d | 09 69 66 28 63 61 6e 33 |eak;..}.|.if(can3|
|00002400| 32 29 53 77 61 70 4d 4d | 55 4d 6f 64 65 28 28 76 |2)SwapMM|UMode((v|
|00002410| 6f 69 64 20 2a 29 26 6d | 6f 64 65 33 32 29 3b 0d |oid *)&m|ode32);.|
|00002420| 09 6f 6c 64 58 3d 78 3b | 0d 09 6f 6c 64 59 3d 79 |.oldX=x;|..oldY=y|
|00002430| 3b 0d 09 72 65 74 75 72 | 6e 20 76 61 6c 75 65 3b |;..retur|n value;|
|00002440| 0d 7d 0d 0d 76 6f 69 64 | 20 53 65 74 44 65 76 69 |.}..void| SetDevi|
|00002450| 63 65 50 69 78 65 6c 28 | 47 44 48 61 6e 64 6c 65 |cePixel(|GDHandle|
|00002460| 20 64 65 76 69 63 65 2c | 69 6e 74 20 78 2c 69 6e | device,|int x,in|
|00002470| 74 20 79 2c 75 6e 73 69 | 67 6e 65 64 20 6c 6f 6e |t y,unsi|gned lon|
|00002480| 67 20 76 61 6c 75 65 29 | 0d 2f 2f 20 41 73 73 75 |g value)|.// Assu|
|00002490| 6d 65 73 20 28 78 2c 79 | 29 20 69 73 20 72 65 6c |mes (x,y|) is rel|
|000024a0| 61 74 69 76 65 20 74 6f | 20 74 68 65 20 75 70 70 |ative to| the upp|
|000024b0| 65 72 20 6c 65 66 74 20 | 68 61 6e 64 20 63 6f 72 |er left |hand cor|
|000024c0| 6e 65 72 20 6f 66 20 74 | 68 65 20 73 63 72 65 65 |ner of t|he scree|
|000024d0| 6e 2e 0d 7b 0d 09 69 66 | 28 64 65 76 69 63 65 3d |n..{..if|(device=|
|000024e0| 3d 4e 55 4c 4c 29 72 65 | 74 75 72 6e 3b 0d 09 78 |=NULL)re|turn;..x|
|000024f0| 2b 3d 28 2a 28 2a 64 65 | 76 69 63 65 29 2d 3e 67 |+=(*(*de|vice)->g|
|00002500| 64 50 4d 61 70 29 2d 3e | 62 6f 75 6e 64 73 2e 6c |dPMap)->|bounds.l|
|00002510| 65 66 74 3b 0d 09 79 2b | 3d 28 2a 28 2a 64 65 76 |eft;..y+|=(*(*dev|
|00002520| 69 63 65 29 2d 3e 67 64 | 50 4d 61 70 29 2d 3e 62 |ice)->gd|PMap)->b|
|00002530| 6f 75 6e 64 73 2e 74 6f | 70 3b 0d 09 53 65 74 50 |ounds.to|p;..SetP|
|00002540| 69 78 6d 61 70 50 69 78 | 65 6c 28 2a 28 2a 64 65 |ixmapPix|el(*(*de|
|00002550| 76 69 63 65 29 2d 3e 67 | 64 50 4d 61 70 2c 78 2c |vice)->g|dPMap,x,|
|00002560| 79 2c 76 61 6c 75 65 29 | 3b 0d 7d 0d 0d 75 6e 73 |y,value)|;.}..uns|
|00002570| 69 67 6e 65 64 20 6c 6f | 6e 67 20 47 65 74 44 65 |igned lo|ng GetDe|
|00002580| 76 69 63 65 50 69 78 65 | 6c 28 47 44 48 61 6e 64 |vicePixe|l(GDHand|
|00002590| 6c 65 20 64 65 76 69 63 | 65 2c 69 6e 74 20 78 2c |le devic|e,int x,|
|000025a0| 69 6e 74 20 79 29 0d 2f | 2f 20 41 73 73 75 6d 65 |int y)./|/ Assume|
|000025b0| 73 20 28 78 2c 79 29 20 | 69 73 20 72 65 6c 61 74 |s (x,y) |is relat|
|000025c0| 69 76 65 20 74 6f 20 74 | 68 65 20 75 70 70 65 72 |ive to t|he upper|
|000025d0| 20 6c 65 66 74 20 68 61 | 6e 64 20 63 6f 72 6e 65 | left ha|nd corne|
|000025e0| 72 20 6f 66 20 74 68 65 | 20 73 63 72 65 65 6e 2e |r of the| screen.|
|000025f0| 0d 7b 0d 09 69 66 28 64 | 65 76 69 63 65 3d 3d 4e |.{..if(d|evice==N|
|00002600| 55 4c 4c 29 72 65 74 75 | 72 6e 20 30 3b 0d 09 78 |ULL)retu|rn 0;..x|
|00002610| 2b 3d 28 2a 28 2a 64 65 | 76 69 63 65 29 2d 3e 67 |+=(*(*de|vice)->g|
|00002620| 64 50 4d 61 70 29 2d 3e | 62 6f 75 6e 64 73 2e 6c |dPMap)->|bounds.l|
|00002630| 65 66 74 3b 0d 09 79 2b | 3d 28 2a 28 2a 64 65 76 |eft;..y+|=(*(*dev|
|00002640| 69 63 65 29 2d 3e 67 64 | 50 4d 61 70 29 2d 3e 62 |ice)->gd|PMap)->b|
|00002650| 6f 75 6e 64 73 2e 74 6f | 70 3b 0d 09 72 65 74 75 |ounds.to|p;..retu|
|00002660| 72 6e 20 47 65 74 50 69 | 78 6d 61 70 50 69 78 65 |rn GetPi|xmapPixe|
|00002670| 6c 28 2a 28 2a 64 65 76 | 69 63 65 29 2d 3e 67 64 |l(*(*dev|ice)->gd|
|00002680| 50 4d 61 70 2c 78 2c 79 | 29 3b 0d 7d 0d 0d 2f 2a |PMap,x,y|);.}../*|
|00002690| 0d 2f 2f 20 53 6c 69 67 | 68 74 6c 79 20 66 61 73 |.// Slig|htly fas|
|000026a0| 74 65 72 20 74 68 61 6e | 20 52 65 63 74 54 6f 41 |ter than| RectToA|
|000026b0| 64 64 72 65 73 73 2c 20 | 62 75 74 20 6d 75 63 68 |ddress, |but much|
|000026c0| 20 6c 65 73 73 20 67 65 | 6e 65 72 61 6c 2e 20 0d | less ge|neral. .|
|000026d0| 2f 2f 20 52 65 71 75 69 | 72 65 73 20 38 2d 62 69 |// Requi|res 8-bi|
|000026e0| 74 20 70 69 78 65 6c 53 | 69 7a 65 2e 20 49 74 20 |t pixelS|ize. It |
|000026f0| 77 69 6c 6c 20 67 69 76 | 65 20 77 72 6f 6e 67 20 |will giv|e wrong |
|00002700| 61 6e 73 77 65 72 20 77 | 68 65 6e 0d 2f 2f 20 74 |answer w|hen.// t|
|00002710| 68 65 20 70 69 78 6d 61 | 70 20 69 73 20 64 65 72 |he pixma|p is der|
|00002720| 69 76 65 64 20 66 72 6f | 6d 20 61 20 77 69 6e 64 |ived fro|m a wind|
|00002730| 6f 77 20 69 6e 20 61 20 | 6d 75 6c 74 69 2d 73 63 |ow in a |multi-sc|
|00002740| 72 65 65 6e 20 65 6e 76 | 69 72 6f 6e 6d 65 6e 74 |reen env|ironment|
|00002750| 2e 0d 75 6e 73 69 67 6e | 65 64 20 63 68 61 72 20 |..unsign|ed char |
|00002760| 2a 47 65 74 50 69 78 6d | 61 70 50 69 78 65 6c 41 |*GetPixm|apPixelA|
|00002770| 64 64 72 65 73 73 28 50 | 69 78 4d 61 70 50 74 72 |ddress(P|ixMapPtr|
|00002780| 20 70 6d 50 74 72 2c 69 | 6e 74 20 78 2c 69 6e 74 | pmPtr,i|nt x,int|
|00002790| 20 79 29 0d 7b 0d 09 72 | 65 67 69 73 74 65 72 20 | y).{..r|egister |
|000027a0| 75 6e 73 69 67 6e 65 64 | 20 63 68 61 72 20 2a 70 |unsigned| char *p|
|000027b0| 69 78 65 6c 50 74 72 3b | 0d 09 0d 09 69 66 28 21 |ixelPtr;|....if(!|
|000027c0| 28 70 6d 50 74 72 2d 3e | 72 6f 77 42 79 74 65 73 |(pmPtr->|rowBytes|
|000027d0| 20 26 20 30 78 38 30 30 | 30 29 20 7c 7c 20 70 6d | & 0x800|0) || pm|
|000027e0| 50 74 72 2d 3e 70 69 78 | 65 6c 53 69 7a 65 20 21 |Ptr->pix|elSize !|
|000027f0| 3d 20 38 29 20 7b 0d 09 | 09 50 72 69 6e 74 66 45 |= 8) {..|.PrintfE|
|00002800| 78 69 74 28 22 47 65 74 | 50 69 78 6d 61 70 50 69 |xit("Get|PixmapPi|
|00002810| 78 65 6c 41 64 64 72 65 | 73 73 28 29 3a 20 73 6f |xelAddre|ss(): so|
|00002820| 72 72 79 2c 20 49 20 72 | 65 71 75 69 72 65 20 38 |rry, I r|equire 8|
|00002830| 20 62 69 74 73 2f 70 69 | 78 65 6c 2e 5c 30 30 37 | bits/pi|xel.\007|
|00002840| 5c 6e 22 29 3b 0d 09 7d | 0d 09 69 66 28 78 3c 70 |\n");..}|..if(x<p|
|00002850| 6d 50 74 72 2d 3e 62 6f | 75 6e 64 73 2e 6c 65 66 |mPtr->bo|unds.lef|
|00002860| 74 20 7c 7c 20 78 3e 3d | 70 6d 50 74 72 2d 3e 62 |t || x>=|pmPtr->b|
|00002870| 6f 75 6e 64 73 2e 72 69 | 67 68 74 0d 09 09 7c 7c |ounds.ri|ght...|||
|00002880| 20 79 3c 70 6d 50 74 72 | 2d 3e 62 6f 75 6e 64 73 | y<pmPtr|->bounds|
|00002890| 2e 74 6f 70 20 7c 7c 20 | 79 3e 3d 70 6d 50 74 72 |.top || |y>=pmPtr|
|000028a0| 2d 3e 62 6f 75 6e 64 73 | 2e 62 6f 74 74 6f 6d 29 |->bounds|.bottom)|
|000028b0| 72 65 74 75 72 6e 20 4e | 55 4c 4c 3b 0d 09 78 2d |return N|ULL;..x-|
|000028c0| 3d 70 6d 50 74 72 2d 3e | 62 6f 75 6e 64 73 2e 6c |=pmPtr->|bounds.l|
|000028d0| 65 66 74 3b 0d 09 79 2d | 3d 70 6d 50 74 72 2d 3e |eft;..y-|=pmPtr->|
|000028e0| 62 6f 75 6e 64 73 2e 74 | 6f 70 3b 0d 09 70 69 78 |bounds.t|op;..pix|
|000028f0| 65 6c 50 74 72 3d 28 75 | 6e 73 69 67 6e 65 64 20 |elPtr=(u|nsigned |
|00002900| 63 68 61 72 20 2a 29 70 | 6d 50 74 72 2d 3e 62 61 |char *)p|mPtr->ba|
|00002910| 73 65 41 64 64 72 3b 0d | 09 70 69 78 65 6c 50 74 |seAddr;.|.pixelPt|
|00002920| 72 2b 3d 79 2a 28 6c 6f | 6e 67 29 28 70 6d 50 74 |r+=y*(lo|ng)(pmPt|
|00002930| 72 2d 3e 72 6f 77 42 79 | 74 65 73 20 26 20 30 78 |r->rowBy|tes & 0x|
|00002940| 31 66 66 66 29 3b 0d 09 | 70 69 78 65 6c 50 74 72 |1fff);..|pixelPtr|
|00002950| 2b 3d 78 3b 0d 09 72 65 | 74 75 72 6e 20 70 69 78 |+=x;..re|turn pix|
|00002960| 65 6c 50 74 72 3b 0d 7d | 0d 2a 2f 0d 00 00 00 00 |elPtr;.}|.*/.....|
|00002970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002980| 00 00 01 00 00 00 02 aa | 00 00 01 aa 00 00 00 72 |........|.......r|
|00002990| 00 00 02 9e 00 08 a5 f0 | fb 52 00 00 23 0b 00 00 |........|.R..#...|
|000029a0| 02 9e 00 08 a5 f0 fb 52 | 00 00 23 0d 00 00 02 b7 |.......R|..#.....|
|000029b0| 0d 53 65 74 4f 6e 65 50 | 69 78 65 6c 2e 63 02 00 |.SetOneP|ixel.c..|
|000029c0| 00 00 54 45 58 54 43 57 | 49 45 01 00 00 28 05 40 |..TEXTCW|IE...(.@|
|000029d0| 00 00 54 45 58 54 43 57 | 49 45 01 00 00 28 05 40 |..TEXTCW|IE...(.@|
|000029e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000029f0| 00 00 a6 20 93 ee 00 00 | 28 ec 00 00 03 1c 31 a4 |... ....|(.....1.|
|00002a00| 00 00 02 cf 00 08 a5 f0 | fb 5a 00 00 23 3d 00 00 |........|.Z..#=..|
|00002a10| 02 9e 00 08 a5 f0 fb 5a | 00 00 23 41 00 00 02 9e |.......Z|..#A....|
|00002a20| 00 08 a5 f0 fb 5b 00 00 | 23 47 00 00 02 9e 00 08 |.....[..|#G......|
|00002a30| a5 f0 fb 5a 00 00 2e 3d | 00 00 02 c1 00 08 a5 f0 |...Z...=|........|
|00002a40| fb 5b 00 00 23 61 00 00 | 02 c1 00 08 a5 f0 fb 5b |.[..#a..|.......[|
|00002a50| 00 00 2a 10 00 00 02 c3 | 00 08 a5 f0 fb 5b 00 00 |..*.....|.....[..|
|00002a60| 23 63 00 00 02 c3 00 08 | a5 f0 fb 5d 00 00 2a 11 |#c......|...]..*.|
|00002a70| 00 00 02 c3 00 08 a5 f0 | fb 5d 00 00 2a 12 00 00 |........|.]..*...|
|00002a80| 00 00 00 a2 00 06 00 10 | 00 00 14 8c 00 7e 00 56 |........|.....~.V|
|00002a90| 38 a0 00 00 01 78 00 10 | 00 00 14 8c 00 7e 00 56 |8....x..|.....~.V|
|00002aa0| 38 b0 00 00 01 79 00 2e | 00 00 14 a7 00 7f 00 56 |8....y..|.......V|
|00002ab0| 36 e0 80 00 00 b7 fd 8b | 01 8c fe cb 94 20 00 00 |6.......|..... ..|
|00002ac0| 00 00 00 00 0f 28 2a 70 | 6d 50 74 72 29 2e 62 6f |.....(*p|mPtr).bo|
|00002ad0| 75 6e 64 73 00 26 00 00 | 14 a7 00 7f 00 56 37 b0 |unds.&..|.....V7.|
|00002ae0| 80 00 00 51 fe af 01 26 | ff ef 94 20 00 00 00 00 |...Q...&|... ....|
|00002af0| 00 00 07 2a 70 6d 50 74 | 72 20 00 14 00 00 14 a7 |...*pmPt|r ......|
|00002b00| 00 7f 00 56 37 98 00 00 | 05 70 6d 50 74 72 00 18 |...V7...|.pmPtr..|
|00002b10| 00 00 14 a7 00 7f 00 56 | 35 f8 00 00 09 70 69 78 |.......V|5....pix|
|00002b20| 65 6c 50 74 72 20 00 00 | 00 1e 00 50 00 20 01 8d |elPtr ..|...P. ..|
|00002b30| 02 3d 00 50 00 20 01 8d | 02 3d 00 00 00 00 00 00 |.=.P. ..|.=......|
|00002b40| 00 00 00 00 00 00 00 00 | 00 00 00 8a 00 06 00 00 |........|........|
|00002b50| 23 e3 00 00 23 f1 0f 47 | 65 74 44 65 76 69 63 65 |#...#..G|etDevice|
|00002b60| 50 69 78 65 6c 00 00 00 | 0d d2 00 00 0d dd 0b 47 |Pixel...|.......G|
|00002b70| 65 74 4f 6e 65 50 69 78 | 65 6c 00 00 19 fb 00 00 |etOnePix|el......|
|00002b80| 1a 09 0f 47 65 74 50 69 | 78 6d 61 70 50 69 78 65 |...GetPi|xmapPixe|
|00002b90| 6c 00 00 00 22 b1 00 00 | 22 bf 0f 53 65 74 44 65 |l..."...|"..SetDe|
|00002ba0| 76 69 63 65 50 69 78 65 | 6c 00 00 00 0b 7c 00 00 |vicePixe|l....|..|
|00002bb0| 0b 87 0b 53 65 74 4f 6e | 65 50 69 78 65 6c 00 00 |...SetOn|ePixel..|
|00002bc0| 10 0e 00 00 10 1c 0f 53 | 65 74 50 69 78 6d 61 70 |.......S|etPixmap|
|00002bd0| 50 69 78 65 6c 00 00 00 | 00 48 00 09 4d 6f 6e 61 |Pixel...|.H..Mona|
|00002be0| 63 6f 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |co......|........|
|00002bf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 03 00 04 |........|........|
|00002c00| 00 86 00 18 01 89 02 77 | 00 86 00 18 01 89 02 77 |.......w|.......w|
|00002c10| ac 3c a3 ce 00 00 0c 3b | 00 00 0c 3b 00 00 0a 2c |.<.....;|...;...,|
|00002c20| 00 00 00 00 00 04 00 01 | 00 01 00 00 01 00 00 00 |........|........|
|00002c30| 02 aa 00 00 01 aa 00 00 | 00 72 01 99 5f e8 1f 96 |........|.r.._...|
|00002c40| 00 00 00 1c 00 72 00 02 | 44 54 56 55 00 00 00 1a |.....r..|DTVU....|
|00002c50| 4d 50 53 52 00 02 00 26 | 4d 57 42 42 00 00 00 4a |MPSR...&|MWBB...J|
|00002c60| 78 dd ff ff 00 00 00 00 | 00 00 00 00 03 f0 ff ff |x.......|........|
|00002c70| 00 00 00 a6 00 00 00 00 | 03 ef ff ff 00 00 00 c8 |........|........|
|00002c80| 00 00 00 00 03 ed ff ff | 00 00 01 56 00 00 00 00 |........|...V....|
|00002c90| 03 f0 ff ff 00 00 01 a2 | 00 00 00 00 00 00 00 00 |........|........|
|00002ca0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002cb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002cc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002cd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ce0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002cf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+