home *** CD-ROM | disk | FTP | other *** search
/ EuroCD 3 / EuroCD 3.iso / Programming / BlitzBasic / pal.remap.bb < prev    next >
Unknown  |  1998-06-24  |  4.8 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was not able to be converted.
This format is not currently supported by dexvert.

ConfidenceProgramDetectionMatch TypeSupport
100% file data default
100% gt2 Kopftext: ';Palette Remapping example' default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 3b 50 61 6c 65 74 74 65 | 20 52 65 6d 61 70 70 69 |;Palette| Remappi|
|00000010| 6e 67 20 65 78 61 6d 70 | 6c 65 00 3b 62 79 20 43 |ng examp|le.;by C|
|00000020| 75 72 74 20 45 73 73 65 | 72 20 20 20 63 61 6d 67 |urt Esse|r camg|
|00000030| 65 40 69 78 2e 6e 65 74 | 63 6f 6d 2e 63 6f 6d 00 |e@ix.net|com.com.|
|00000040| 3b 75 73 65 20 69 6e 20 | 61 6e 79 20 77 61 79 20 |;use in |any way |
|00000050| 79 6f 75 20 6c 69 6b 65 | 00 3b 4e 4f 54 45 20 3a |you like|.;NOTE :|
|00000060| 20 4e 45 45 44 53 20 20 | 42 44 47 46 58 20 6c 69 | NEEDS |BDGFX li|
|00000070| 62 72 61 72 79 21 00 3b | 79 6f 75 20 63 61 6e 20 |brary!.;|you can |
|00000080| 66 69 6e 64 20 74 68 69 | 73 20 73 6d 61 6c 6c 20 |find thi|s small |
|00000090| 28 6f 6e 65 20 63 6f 6d | 6d 61 6e 64 29 20 6c 69 |(one com|mand) li|
|000000a0| 62 72 61 72 79 20 69 6e | 20 41 6d 69 6e 65 74 2f |brary in| Aminet/|
|000000b0| 64 65 76 2f 62 61 73 69 | 63 00 00 80 c3 20 20 20 |dev/basi|c.... |
|000000c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000000d0| 20 20 20 20 3b 6a 75 73 | 74 20 69 6e 20 63 61 73 | ;jus|t in cas|
|000000e0| 65 21 00 ff b5 20 20 20 | 20 20 20 20 20 20 20 20 |e!... | |
|000000f0| 20 20 20 20 20 20 20 3b | 6d 61 6b 65 20 73 75 72 | ;|make sur|
|00000100| 65 20 69 74 20 73 68 6f | 77 73 00 cf 02 20 30 20 |e it sho|ws... 0 |
|00000110| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000120| 20 20 20 3b 67 72 61 62 | 20 74 68 65 20 77 62 20 | ;grab| the wb |
|00000130| 73 63 72 65 65 6e 00 d0 | 03 20 30 2c 30 00 80 cc |screen..|. 0,0...|
|00000140| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000150| 20 20 20 20 20 20 20 20 | 20 20 20 3b 64 6f 6e 27 | | ;don'|
|00000160| 74 20 6e 65 65 64 20 74 | 68 61 74 21 00 00 00 3b |t need t|hat!...;|
|00000170| 3d 3d 3d 3d 20 47 65 74 | 20 69 6e 66 6f 20 61 62 |==== Get| info ab|
|00000180| 6f 75 74 20 63 75 72 72 | 65 6e 74 20 57 6f 72 6b |out curr|ent Work|
|00000190| 62 65 6e 63 68 20 53 63 | 72 65 65 6e 20 61 6e 64 |bench Sc|reen and|
|000001a0| 20 67 72 61 62 20 69 74 | 27 73 20 70 61 6c 65 74 | grab it|'s palet|
|000001b0| 74 65 20 3d 3d 3d 3d 3d | 3d 3d 00 00 6d 61 78 77 |te =====|==..maxw|
|000001c0| 3d e0 81 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |=.. | |
|000001d0| 20 20 20 20 20 20 20 3b | 74 68 65 73 65 20 61 72 | ;|these ar|
|000001e0| 65 20 75 73 65 64 20 74 | 6f 20 73 65 74 20 6f 75 |e used t|o set ou|
|000001f0| 72 20 77 69 6e 64 6f 77 | 00 6d 61 78 68 3d e0 82 |r window|.maxh=..|
|00000200| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000210| 20 20 20 3b 73 69 7a 65 | 20 6c 61 74 65 72 00 77 | ;size| later.w|
|00000220| 64 2e 77 3d e0 83 20 20 | 20 20 20 20 20 20 20 20 |d.w=.. | |
|00000230| 20 20 20 20 20 20 20 20 | 20 20 3b 6e 75 6d 62 65 | | ;numbe|
|00000240| 72 20 6f 66 20 62 69 74 | 70 6c 61 6e 65 73 20 6f |r of bit|planes o|
|00000250| 66 20 57 42 00 57 42 63 | 6f 6c 6f 72 73 3d 32 5e |f WB.WBc|olors=2^|
|00000260| 77 64 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |wd | |
|00000270| 20 20 20 20 20 3b 63 6f | 6e 76 65 72 74 20 74 68 | ;co|nvert th|
|00000280| 69 73 20 74 6f 20 6e 75 | 6d 62 65 72 20 6f 66 20 |is to nu|mber of |
|00000290| 63 6f 6c 6f 75 72 73 00 | 61 67 61 2e 62 3d b3 87 |colours.|aga.b=..|
|000002a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000002b0| 20 20 3b 73 65 65 20 69 | 66 20 73 79 73 74 65 6d | ;see i|f system|
|000002c0| 20 69 73 20 41 47 41 00 | 80 32 20 66 69 24 3d 32 | is AGA.|.2 fi$=2|
|000002d0| 30 30 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |00 | |
|000002e0| 20 20 20 20 3b 74 68 65 | 73 65 20 61 72 65 20 6e | ;the|se are n|
|000002f0| 65 65 64 65 64 20 66 6f | 72 20 74 68 65 00 80 32 |eeded fo|r the..2|
|00000300| 20 70 61 24 3d 32 30 30 | 20 20 20 20 20 20 20 20 | pa$=200| |
|00000310| 20 20 20 20 20 20 20 20 | 20 20 3b 41 53 4c 20 72 | | ;ASL r|
|00000320| 65 71 75 65 73 74 6f 72 | 00 61 63 63 75 72 61 63 |equestor|.accurac|
|00000330| 79 2e 77 3d 30 20 20 20 | 20 20 20 20 20 20 20 20 |y.w=0 | |
|00000340| 20 20 20 20 20 20 20 20 | 20 3b 61 63 63 75 72 61 | | ;accura|
|00000350| 63 79 20 6f 66 20 72 65 | 6d 61 70 70 69 6e 67 20 |cy of re|mapping |
|00000360| 2d 20 30 2d 32 35 35 00 | 20 20 20 20 20 20 20 20 |- 0-255.| |
|00000370| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000380| 20 20 20 20 20 20 20 20 | 3b 68 69 67 68 65 72 20 | |;higher |
|00000390| 3d 20 66 61 73 74 65 72 | 20 62 75 74 20 6c 65 73 |= faster| but les|
|000003a0| 73 20 61 63 63 75 72 61 | 74 65 00 00 3b 2d 2d 2d |s accura|te..;---|
|000003b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 20 53 74 6f 72 65 |--------|-- Store|
|000003c0| 20 74 68 65 20 57 42 20 | 70 61 6c 65 74 74 65 20 | the WB |palette |
|000003d0| 61 73 20 70 61 6c 65 74 | 74 65 20 23 30 20 2d 2d |as palet|te #0 --|
|000003e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000003f0| 2d 2d 2d 2d 2d 2d 2d 00 | 00 ce 17 20 30 2c 57 42 |-------.|... 0,WB|
|00000400| 63 6f 6c 6f 72 73 20 20 | 20 20 20 20 20 20 20 20 |colors | |
|00000410| 3b 73 65 74 20 75 70 20 | 70 61 6c 65 74 74 65 20 |;set up |palette |
|00000420| 30 20 74 6f 20 57 42 20 | 64 65 70 74 68 00 00 80 |0 to WB |depth...|
|00000430| 0b 20 61 67 61 3d bc 0e | 20 20 20 20 20 20 20 20 |. aga=..| |
|00000440| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3b 75 73 | | ;us|
|00000450| 65 20 41 47 41 20 63 6f | 6c 6f 75 72 20 63 6f 6d |e AGA co|lour com|
|00000460| 6d 61 6e 64 73 20 6f 6e | 20 41 47 41 20 73 79 73 |mands on| AGA sys|
|00000470| 74 65 6d 00 20 80 16 20 | 69 3d 30 20 80 18 20 57 |tem. .. |i=0 .. W|
|00000480| 42 63 6f 6c 6f 72 73 2d | 31 00 20 20 20 ce 0e 20 |Bcolors-|1. .. |
|00000490| 30 2c 69 2c ce 10 28 69 | 29 2c ce 11 28 69 29 2c |0,i,..(i|),..(i),|
|000004a0| ce 12 28 69 29 00 20 80 | 17 00 80 22 20 20 20 20 |..(i). .|..." |
|000004b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000004c0| 20 20 20 20 20 20 20 20 | 3b 69 66 20 6e 6f 74 20 | |;if not |
|000004d0| 41 47 41 2c 20 75 73 65 | 20 4f 43 53 20 63 6f 6c |AGA, use| OCS col|
|000004e0| 6f 75 72 20 63 6f 6d 6d | 61 6e 64 73 00 20 80 16 |our comm|ands. ..|
|000004f0| 20 69 3d 30 20 80 18 20 | 57 42 63 6f 6c 6f 72 73 | i=0 .. |WBcolors|
|00000500| 2d 31 00 20 20 20 ce 0a | 20 30 2c 69 2c ce 06 28 |-1. ..| 0,i,..(|
|00000510| 69 29 2c ce 07 28 69 29 | 2c ce 08 28 69 29 00 20 |i),..(i)|,..(i). |
|00000520| 80 17 00 80 c0 00 00 3b | 2b 2b 2b 2b 2b 2b 2b 2b |.......;|++++++++|
|00000530| 2b 2b 2b 2b 2b 2b 2b 2b | 2b 2b 2b 2b 2b 2b 2b 2b |++++++++|++++++++|
|00000540| 2b 2b 2b 2b 2b 2b 2b 2b | 2b 2b 2b 2b 2b 2b 2b 2b |++++++++|++++++++|
|00000550| 2b 2b 2b 2b 2b 2b 2b 2b | 2b 2b 2b 2b 2b 2b 2b 2b |++++++++|++++++++|
|00000560| 2b 2b 2b 2b 2b 2b 2b 2b | 2b 2b 2b 2b 2b 2b 2b 2b |++++++++|++++++++|
|00000570| 2b 2b 00 00 80 bb 20 20 | 20 20 20 20 20 20 20 20 |++.... | |
|00000580| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000590| 3b 54 45 53 54 20 4c 4f | 4f 50 20 53 54 41 52 54 |;TEST LO|OP START|
|000005a0| 53 20 48 45 52 45 21 00 | 00 20 20 c5 01 20 30 2c |S HERE!.|. .. 0,|
|000005b0| 30 2c 30 2c 31 2c 31 2c | 24 31 30 30 30 2c 22 22 |0,0,1,1,|$1000,""|
|000005c0| 2c 31 2c 30 20 3b 6e 65 | 65 64 65 64 20 66 6f 72 |,1,0 ;ne|eded for|
|000005d0| 20 72 65 71 75 65 73 74 | 6f 72 73 00 20 20 c5 38 | request|ors. .8|
|000005e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000005f0| 20 20 3b 73 68 6f 77 20 | 72 65 71 75 65 73 74 6f | ;show |requesto|
|00000600| 72 73 20 68 65 72 65 21 | 00 00 20 20 70 69 63 70 |rs here!|.. picp|
|00000610| 61 74 68 24 3d a8 01 28 | 22 53 65 6c 65 63 74 20 |ath$=..(|"Select |
|00000620| 49 46 46 20 70 69 63 74 | 75 72 65 22 2c 70 61 24 |IFF pict|ure",pa$|
|00000630| 2c 66 69 24 29 00 20 20 | 80 0b 20 70 69 63 70 61 |,fi$). |.. picpa|
|00000640| 74 68 24 3d 22 22 20 80 | 21 20 80 02 20 20 20 20 |th$="" .|! .. |
|00000650| 20 20 20 3b 65 78 69 74 | 20 70 72 6f 67 72 61 6d | ;exit| program|
|00000660| 20 77 68 65 6e 20 22 63 | 61 6e 63 65 6c 22 20 69 | when "c|ancel" i|
|00000670| 73 20 73 65 6c 65 63 74 | 65 64 00 00 20 20 65 72 |s select|ed.. er|
|00000680| 72 6f 72 24 3d 22 22 00 | 20 20 80 0b 20 be 11 28 |ror$="".| .. ..(|
|00000690| 30 2c 70 69 63 70 61 74 | 68 24 29 20 20 20 20 20 |0,picpat|h$) |
|000006a0| 20 20 3b 6d 61 6b 65 20 | 73 75 72 65 20 69 74 20 | ;make |sure it |
|000006b0| 69 73 20 61 20 76 61 6c | 69 64 20 69 66 66 20 70 |is a val|id iff p|
|000006c0| 69 63 74 75 72 65 20 66 | 69 6c 65 21 00 20 20 20 |icture f|ile!. |
|000006d0| 20 be 08 20 30 00 20 20 | 20 20 68 65 61 64 65 72 | .. 0. | header|
|000006e0| 24 20 3d 20 dd 02 28 32 | 30 30 30 29 20 20 20 20 |$ = ..(2|000) |
|000006f0| 20 20 3b 52 65 61 64 20 | 32 30 30 30 20 62 79 74 | ;Read |2000 byt|
|00000700| 65 73 20 6f 66 20 74 68 | 65 20 68 65 61 64 65 72 |es of th|e header|
|00000710| 00 20 20 20 20 be 02 20 | 30 00 20 20 20 20 c5 11 |. .. |0. ..|
|00000720| 20 30 00 00 20 20 20 20 | 3b 49 46 46 20 70 69 63 | 0.. |;IFF pic|
|00000730| 74 75 72 65 20 68 65 61 | 64 65 72 20 73 68 6f 75 |ture hea|der shou|
|00000740| 6c 64 20 72 65 61 64 3a | 20 46 4f 52 4d 2e 2e 2e |ld read:| FORM...|
|00000750| 2e 49 4c 42 4d 00 00 20 | 20 20 20 80 0b 20 dc 81 |.ILBM.. | .. ..|
|00000760| 28 68 65 61 64 65 72 24 | 2c 34 29 3c 3e 20 22 46 |(header$|,4)<> "F|
|00000770| 4f 52 4d 22 20 80 8a 20 | dc 83 28 68 65 61 64 65 |ORM" .. |..(heade|
|00000780| 72 24 2c 39 2c 34 29 20 | 3c 3e 20 22 49 4c 42 4d |r$,9,4) |<> "ILBM|
|00000790| 22 00 20 20 20 20 20 20 | 80 0b 20 dc 81 28 68 65 |". |.. ..(he|
|000007a0| 61 64 65 72 24 2c 33 29 | 3d 22 47 49 46 22 20 80 |ader$,3)|="GIF" .|
|000007b0| 21 20 65 72 72 6f 72 24 | 3d 22 47 49 46 20 22 00 |! error$|="GIF ".|
|000007c0| 20 20 20 20 20 20 80 0b | 20 dc 83 28 68 65 61 64 | ..| ..(head|
|000007d0| 65 72 24 2c 37 2c 34 29 | 3d 22 4a 46 49 46 22 20 |er$,7,4)|="JFIF" |
|000007e0| 80 21 20 65 72 72 6f 72 | 24 3d 22 4a 50 45 47 22 |.! error|$="JPEG"|
|000007f0| 00 20 20 20 20 20 20 80 | 0b 20 dc 83 28 68 65 61 |. .|. ..(hea|
|00000800| 64 65 72 24 2c 39 2c 34 | 29 3d 22 41 4e 49 4d 22 |der$,9,4|)="ANIM"|
|00000810| 20 80 21 20 65 72 72 6f | 72 24 3d 22 41 4e 49 4d | .! erro|r$="ANIM|
|00000820| 22 00 20 20 20 20 20 20 | 80 0b 20 65 72 72 6f 72 |". |.. error|
|00000830| 24 3d 22 22 20 80 21 20 | 65 72 72 6f 72 24 3d 22 |$="" .! |error$="|
|00000840| 45 52 52 4f 52 22 00 00 | 20 20 20 20 80 22 20 20 |ERROR"..| ." |
|00000850| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000860| 20 20 20 20 20 20 3b 56 | 61 6c 69 64 20 49 46 46 | ;V|alid IFF|
|00000870| 20 68 65 61 64 65 72 20 | 66 6f 75 6e 64 21 00 20 | header |found!. |
|00000880| 20 20 20 20 20 68 61 6d | 3d bc 0f 20 20 20 20 20 | ham|=.. |
|00000890| 20 20 20 20 20 20 20 20 | 20 20 20 20 3b 77 65 20 | | ;we |
|000008a0| 63 61 6e 27 74 20 72 65 | 6d 61 70 20 48 41 4d 20 |can't re|map HAM |
|000008b0| 70 69 63 2c 20 73 6f 20 | 63 68 65 63 6b 00 20 20 |pic, so |check. |
|000008c0| 20 20 20 20 78 2e 77 3d | dc 89 28 68 65 61 64 65 | x.w=|..(heade|
|000008d0| 72 24 2c 22 43 41 4d 47 | 22 29 00 20 20 20 20 20 |r$,"CAMG|"). |
|000008e0| 20 80 0b 20 78 3c 3e 30 | 00 20 20 20 20 20 20 20 | .. x<>0|. |
|000008f0| 20 61 24 3d dc 81 28 dc | 82 28 dc 84 28 da 02 2e | a$=..(.|.(..(...|
|00000900| 6c 28 26 68 65 61 64 65 | 72 24 2b 78 2b 37 29 20 |l(&heade|r$+x+7) |
|00000910| 80 42 20 24 38 38 41 34 | 29 2c 33 29 2c 31 29 00 |.B $88A4|),3),1).|
|00000920| 20 20 20 20 20 20 20 20 | 80 0b 20 61 24 3d 22 38 | |.. a$="8|
|00000930| 22 20 80 21 20 65 72 72 | 6f 72 24 3d 22 48 41 4d |" .! err|or$="HAM|
|00000940| 20 22 00 20 20 20 20 20 | 20 80 c0 00 20 20 20 20 | ". | ... |
|00000950| 20 20 78 3d dc 89 28 68 | 65 61 64 65 72 24 2c 22 | x=..(h|eader$,"|
|00000960| 43 4d 41 50 22 29 20 20 | 20 3b 32 34 20 62 69 74 |CMAP") | ;24 bit|
|00000970| 20 70 69 63 73 20 77 69 | 6c 6c 20 63 72 61 73 68 | pics wi|ll crash|
|00000980| 21 00 20 20 20 20 20 20 | 80 0b 20 78 3d 30 20 80 |!. |.. x=0 .|
|00000990| 21 20 65 72 72 6f 72 24 | 3d 22 54 72 75 65 20 43 |! error$|="True C|
|000009a0| 6f 6c 6f 72 20 28 32 34 | 20 62 69 74 29 22 00 20 |olor (24| bit)". |
|000009b0| 20 20 20 80 c0 00 20 20 | 80 22 20 20 20 20 20 20 | ... |." |
|000009c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000009d0| 20 20 20 20 3b 63 6f 75 | 6c 64 6e 27 74 20 65 76 | ;cou|ldn't ev|
|000009e0| 65 6e 20 66 69 6e 64 20 | 74 68 65 20 66 69 6c 65 |en find |the file|
|000009f0| 21 00 20 20 20 20 65 72 | 72 6f 72 24 3d 22 4e 46 |!. er|ror$="NF|
|00000a00| 22 00 20 20 80 c0 00 00 | 20 20 80 0b 20 65 72 72 |". ....| .. err|
|00000a10| 6f 72 24 3d 22 22 20 20 | 20 20 20 20 20 20 20 20 |or$="" | |
|00000a20| 20 20 20 20 20 20 20 20 | 3b 56 61 6c 69 64 20 69 | |;Valid i|
|00000a30| 66 66 20 70 69 63 74 75 | 72 65 20 73 65 6c 65 63 |ff pictu|re selec|
|00000a40| 74 65 64 21 00 00 3b 20 | 2d 2d 2d 2d 2d 2d 20 63 |ted!..; |------ c|
|00000a50| 68 65 63 6b 20 66 6f 72 | 20 65 6e 6f 75 67 68 20 |heck for| enough |
|00000a60| 63 68 69 70 20 6d 65 6d | 6f 72 79 20 66 6f 72 20 |chip mem|ory for |
|00000a70| 74 68 65 20 63 6f 6e 76 | 65 72 73 69 6f 6e 20 2d |the conv|ersion -|
|00000a80| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000a90| 00 00 20 20 20 20 d0 84 | 20 70 69 63 70 61 74 68 |.. ..| picpath|
|00000aa0| 24 20 20 20 20 20 20 20 | 20 20 20 20 3b 72 65 61 |$ | ;rea|
|00000ab0| 64 20 74 68 65 20 70 69 | 63 74 75 72 65 73 20 73 |d the pi|ctures s|
|00000ac0| 69 7a 65 20 69 6e 66 6f | 72 6d 61 74 69 6f 6e 00 |ize info|rmation.|
|00000ad0| 00 20 20 20 20 73 64 2e | 77 3d d0 87 00 20 20 20 |. sd.|w=... |
|00000ae0| 20 73 68 2e 77 3d d0 86 | 00 20 20 20 20 73 77 2e | sh.w=..|. sw.|
|00000af0| 77 3d d0 85 00 20 20 20 | 20 67 64 3d 77 64 00 20 |w=... | gd=wd. |
|00000b00| 20 20 20 80 0b 20 73 64 | 3e 77 64 20 80 21 20 67 | .. sd|>wd .! g|
|00000b10| 64 3d 73 64 00 00 20 20 | 20 20 70 6c 61 6e 65 6d |d=sd.. | planem|
|00000b20| 65 6d 2e 6c 3d 73 68 2a | 73 77 2f 38 20 20 20 20 |em.l=sh*|sw/8 |
|00000b30| 20 20 20 20 20 20 3b 62 | 79 74 65 73 20 6e 65 65 | ;b|ytes nee|
|00000b40| 64 65 64 20 66 6f 72 20 | 31 20 62 69 74 70 6c 61 |ded for |1 bitpla|
|00000b50| 6e 65 20 6f 66 20 74 68 | 69 73 20 70 69 63 00 20 |ne of th|is pic. |
|00000b60| 20 20 20 70 6c 61 6e 65 | 73 2e 62 3d 67 64 2b 77 | plane|s.b=gd+w|
|00000b70| 64 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 3b |d | ;|
|00000b80| 74 6f 74 61 6c 20 62 69 | 74 70 6c 61 6e 65 73 20 |total bi|tplanes |
|00000b90| 6e 65 65 64 65 64 00 20 | 20 20 20 6d 65 6d 2e 6c |needed. | mem.l|
|00000ba0| 3d 70 6c 61 6e 65 73 2a | 70 6c 61 6e 65 6d 65 6d |=planes*|planemem|
|00000bb0| 2b 32 30 30 30 30 20 3b | 74 6f 74 61 6c 20 63 68 |+20000 ;|total ch|
|00000bc0| 69 70 6d 65 6d 20 72 65 | 71 75 69 72 65 64 20 26 |ipmem re|quired &|
|00000bd0| 20 73 6f 6d 65 20 70 61 | 64 64 69 6e 67 00 20 20 | some pa|dding. |
|00000be0| 20 20 6d 65 6d 63 68 69 | 70 2e 6c 3d fe 9a 28 31 | memchi|p.l=..(1|
|00000bf0| 33 31 30 37 34 29 20 3b | 23 4d 45 4d 46 5f 43 48 |31074) ;|#MEMF_CH|
|00000c00| 49 50 7c 23 4d 45 4d 46 | 5f 4c 41 52 47 45 53 54 |IP|#MEMF|_LARGEST|
|00000c10| 00 20 20 20 20 80 0b 20 | 6d 65 6d 3e 6d 65 6d 63 |. .. |mem>memc|
|00000c20| 68 69 70 00 20 20 20 20 | 20 20 65 72 72 6f 72 24 |hip. | error$|
|00000c30| 3d 22 4d 45 4d 22 00 20 | 20 20 20 80 c0 00 20 20 |="MEM". | ... |
|00000c40| 80 c0 00 00 20 20 80 0b | 20 65 72 72 6f 72 24 3d |.... ..| error$=|
|00000c50| 22 22 00 00 20 20 20 20 | d0 01 20 31 2c 73 77 2c |"".. |.. 1,sw,|
|00000c60| 73 68 2c 77 64 00 20 20 | 20 20 d0 01 20 32 2c 73 |sh,wd. | .. 2,s|
|00000c70| 77 2c 73 68 2c 73 64 00 | 20 20 20 20 d0 02 20 32 |w,sh,sd.| .. 2|
|00000c80| 2c 70 69 63 70 61 74 68 | 24 2c 31 20 20 20 20 20 |,picpath|$,1 |
|00000c90| 3b 6e 6f 77 20 6c 6f 61 | 64 20 74 68 65 20 70 69 |;now loa|d the pi|
|00000ca0| 63 20 26 20 69 74 27 73 | 20 70 61 6c 65 74 74 65 |c & it's| palette|
|00000cb0| 00 20 20 20 20 73 68 61 | 70 65 63 6f 6c 6f 72 73 |. sha|pecolors|
|00000cc0| 3d 32 5e 73 64 20 20 20 | 20 20 20 20 20 20 20 20 |=2^sd | |
|00000cd0| 20 3b 63 6f 6e 76 65 72 | 74 20 64 65 70 74 68 20 | ;conver|t depth |
|00000ce0| 74 6f 20 6e 75 6d 62 65 | 72 20 6f 66 20 63 6f 6c |to numbe|r of col|
|00000cf0| 6f 75 72 73 00 20 20 20 | 20 dd 84 20 22 23 23 23 |ours. | .. "###|
|00000d00| 22 00 20 20 20 20 69 24 | 3d 22 52 65 6d 61 70 70 |". i$|="Remapp|
|00000d10| 69 6e 67 20 22 2b dd 83 | 28 73 68 61 70 65 63 6f |ing "+..|(shapeco|
|00000d20| 6c 6f 72 73 29 2b 22 20 | 63 6f 6c 6f 75 72 20 70 |lors)+" |colour p|
|00000d30| 69 63 74 75 72 65 22 00 | 20 20 20 20 61 3d 9b 81 |icture".| a=..|
|00000d40| 28 69 24 2c 30 2c 73 68 | 61 70 65 63 6f 6c 6f 72 |(i$,0,sh|apecolor|
|00000d50| 73 2c 31 29 00 00 3b 2d | 2d 2d 2d 2d 2d 2d 2d 2d |s,1)..;-|--------|
|00000d60| 2d 2d 2d 2d 52 65 6d 61 | 70 20 74 68 65 20 70 69 |----Rema|p the pi|
|00000d70| 63 74 75 72 65 27 73 20 | 70 61 6c 65 74 74 65 20 |cture's |palette |
|00000d80| 74 6f 20 57 42 20 70 61 | 6c 65 74 74 65 2d 2d 2d |to WB pa|lette---|
|00000d90| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000da0| 2d 00 00 20 20 20 20 a0 | 84 20 31 00 20 20 20 20 |-.. .|. 1. |
|00000db0| 80 0b 20 61 67 61 3d bc | 0e 00 20 20 20 20 20 20 |.. aga=.|.. |
|00000dc0| 80 16 20 69 20 3d 20 30 | 20 80 18 20 73 68 61 70 |.. i = 0| .. shap|
|00000dd0| 65 63 6f 6c 6f 72 73 2d | 31 20 20 20 3b 72 65 6d |ecolors-|1 ;rem|
|00000de0| 61 70 20 74 68 65 20 73 | 68 61 70 65 20 74 6f 20 |ap the s|hape to |
|00000df0| 77 62 20 73 63 72 65 65 | 6e 00 20 20 20 20 20 20 |wb scree|n. |
|00000e00| 20 20 6d 61 74 63 68 3d | 84 81 28 30 2c a0 85 28 | match=|..(0,..(|
|00000e10| 69 29 2c a0 86 28 69 29 | 2c a0 87 28 69 29 2c 61 |i),..(i)|,..(i),a|
|00000e20| 63 63 75 72 61 63 79 29 | 00 20 20 20 20 20 20 20 |ccuracy)|. |
|00000e30| 20 bb 88 20 69 2c 6d 61 | 74 63 68 2c 31 00 20 20 | .. i,ma|tch,1. |
|00000e40| 20 20 20 20 20 20 61 3d | 9b 83 28 69 29 00 20 20 | a=|..(i). |
|00000e50| 20 20 20 20 80 17 00 20 | 20 20 20 80 22 00 20 20 | ... | .". |
|00000e60| 20 20 20 20 80 16 20 69 | 20 3d 20 30 20 80 18 20 | .. i| = 0 .. |
|00000e70| 73 68 61 70 65 63 6f 6c | 6f 72 73 2d 31 00 20 20 |shapecol|ors-1. |
|00000e80| 20 20 20 20 20 20 6d 61 | 74 63 68 3d 84 81 28 30 | ma|tch=..(0|
|00000e90| 2c a0 81 28 69 29 2c a0 | 82 28 69 29 2c a0 83 28 |,..(i),.|.(i),..(|
|00000ea0| 69 29 2c 61 63 63 75 72 | 61 63 79 29 00 20 20 20 |i),accur|acy). |
|00000eb0| 20 20 20 20 20 bb 88 20 | 69 2c 6d 61 74 63 68 2c | .. |i,match,|
|00000ec0| 31 00 20 20 20 20 20 20 | 20 20 61 3d 9b 83 28 69 |1. | a=..(i|
|00000ed0| 29 00 20 20 20 20 20 20 | 80 17 00 20 20 20 20 80 |). |... .|
|00000ee0| c0 00 20 20 20 20 80 2b | 20 d0 01 20 32 00 20 20 |.. .+| .. 2. |
|00000ef0| 20 20 80 37 00 20 20 20 | 20 9b 82 00 00 3b 2d 2d | .7. | ....;--|
|00000f00| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 4f 70 65 6e 20 61 |--------|--Open a|
|00000f10| 20 77 69 6e 64 6f 77 20 | 61 6e 64 20 70 75 74 20 | window |and put |
|00000f20| 74 68 65 20 70 69 63 74 | 75 72 65 20 6f 6e 20 69 |the pict|ure on i|
|00000f30| 74 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |t-------|--------|
|00000f40| 2d 2d 2d 2d 2d 2d 2d 2d | 00 00 20 20 20 20 77 69 |--------|.. wi|
|00000f50| 6e 77 69 64 3d 73 77 00 | 20 20 20 20 80 0b 20 77 |nwid=sw.| .. w|
|00000f60| 69 6e 77 69 64 3e 6d 61 | 78 77 20 80 21 20 77 69 |inwid>ma|xw .! wi|
|00000f70| 6e 77 69 64 3d 6d 61 78 | 77 00 20 20 20 20 77 69 |nwid=max|w. wi|
|00000f80| 6e 68 69 3d 73 68 00 20 | 20 20 20 80 0b 20 77 69 |nhi=sh. | .. wi|
|00000f90| 6e 68 69 3e 6d 61 78 68 | 20 80 21 20 77 69 6e 68 |nhi>maxh| .! winh|
|00000fa0| 69 3d 6d 61 78 68 00 20 | 20 20 20 77 69 6e 78 3d |i=maxh. | winx=|
|00000fb0| 6d 61 78 77 2f 32 2d 77 | 69 6e 77 69 64 2f 32 00 |maxw/2-w|inwid/2.|
|00000fc0| 20 20 20 20 77 69 6e 79 | 3d 6d 61 78 68 2f 32 2d | winy|=maxh/2-|
|00000fd0| 77 69 6e 68 69 2f 32 00 | 00 20 20 20 20 80 2b 20 |winhi/2.|. .+ |
|00000fe0| c5 01 20 30 00 20 20 20 | 20 c5 01 20 30 2c 77 69 |.. 0. | .. 0,wi|
|00000ff0| 6e 78 2c 77 69 6e 79 2c | 77 69 6e 77 69 64 2c 77 |nx,winy,|winwid,w|
|00001000| 69 6e 68 69 2c 24 38 30 | 30 7c 24 31 30 30 30 2c |inhi,$80|0|$1000,|
|00001010| 22 22 2c 31 2c 30 00 20 | 20 20 20 c5 3f 20 31 2c |"",1,0. | .? 1,|
|00001020| 30 2c 30 2c 30 2c 30 2c | 30 2c 77 69 6e 77 69 64 |0,0,0,0,|0,winwid|
|00001030| 2c 77 69 6e 68 69 00 20 | 20 20 20 80 2b 20 d0 01 |,winhi. | .+ ..|
|00001040| 20 31 00 20 20 20 20 80 | 2b 20 ce 09 20 31 00 00 | 1. .|+ .. 1..|
|00001050| 20 20 80 22 20 20 20 20 | 20 20 20 20 20 20 20 20 | ." | |
|00001060| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 3b 57 | | ;W|
|00001070| 65 20 63 61 6e 27 74 20 | 75 73 65 20 74 68 65 20 |e can't |use the |
|00001080| 66 69 6c 65 20 2d 20 74 | 65 6c 6c 20 27 65 6d 20 |file - t|ell 'em |
|00001090| 77 68 79 21 00 20 20 20 | 20 20 20 52 71 24 3d 22 |why!. | Rq$="|
|000010a0| 22 00 20 20 20 20 20 20 | 80 0b 20 65 72 72 6f 72 |". |.. error|
|000010b0| 24 3d 22 4d 45 4d 22 00 | 20 20 20 20 20 20 20 20 |$="MEM".| |
|000010c0| dd 84 20 22 23 2c 23 23 | 30 2c 30 30 30 22 00 20 |.. "#,##|0,000". |
|000010d0| 20 20 20 20 20 20 20 52 | 71 24 3d 22 4e 6f 74 20 | R|q$="Not |
|000010e0| 65 6e 6f 75 67 68 20 63 | 68 69 70 20 6d 65 6d 6f |enough c|hip memo|
|000010f0| 72 79 7c 4e 65 65 64 3a | 22 2b dd 83 28 6d 65 6d |ry|Need:|"+..(mem|
|00001100| 29 2b 22 20 62 79 74 65 | 73 7c 48 61 76 65 3a 22 |)+" byte|s|Have:"|
|00001110| 2b dd 83 28 6d 65 6d 63 | 68 69 70 29 2b 22 20 62 |+..(memc|hip)+" b|
|00001120| 79 74 65 73 22 00 20 20 | 20 20 20 20 80 c0 00 20 |ytes". | ... |
|00001130| 20 20 20 20 20 80 0b 20 | 65 72 72 6f 72 24 3d 22 | .. |error$="|
|00001140| 45 52 52 4f 52 22 20 80 | 21 20 52 71 24 3d 22 55 |ERROR" .|! Rq$="U|
|00001150| 6e 72 65 63 6f 67 6e 69 | 7a 65 64 20 66 69 6c 65 |nrecogni|zed file|
|00001160| 20 74 79 70 65 7c 22 00 | 20 20 20 20 20 20 80 0b | type|".| ..|
|00001170| 20 52 71 24 3d 22 22 00 | 20 20 20 20 20 20 20 20 | Rq$="".| |
|00001180| 52 71 24 3d 22 43 61 6e | 27 74 20 70 72 6f 63 65 |Rq$="Can|'t proce|
|00001190| 73 73 20 73 65 6c 65 63 | 74 65 64 20 66 69 6c 65 |ss selec|ted file|
|000011a0| 7c 22 00 20 20 20 20 20 | 20 20 20 80 0b 20 65 72 ||". | .. er|
|000011b0| 72 6f 72 24 3d 22 4e 46 | 22 00 20 20 20 20 20 20 |ror$="NF|". |
|000011c0| 20 20 20 20 52 71 24 3d | 52 71 24 2b 22 46 69 6c | Rq$=|Rq$+"Fil|
|000011d0| 65 20 6e 6f 74 20 66 6f | 75 6e 64 21 22 00 20 20 |e not fo|und!". |
|000011e0| 20 20 20 20 20 20 80 22 | 00 20 20 20 20 20 20 20 | ."|. |
|000011f0| 20 20 20 52 71 24 3d 52 | 71 24 2b 65 72 72 6f 72 | Rq$=R|q$+error|
|00001200| 24 2b 22 20 70 69 63 74 | 75 72 65 73 20 6e 6f 74 |$+" pict|ures not|
|00001210| 20 73 75 70 70 6f 72 74 | 65 64 7c 22 00 20 20 20 | support|ed|". |
|00001220| 20 20 20 20 20 80 c0 00 | 20 20 20 20 20 20 80 c0 | ...| ..|
|00001230| 00 20 20 20 20 20 20 80 | 0b 20 65 72 72 6f 72 24 |. .|. error$|
|00001240| 3c 3e 22 4e 46 22 20 80 | 42 20 65 72 72 6f 72 24 |<>"NF" .|B error$|
|00001250| 3c 3e 22 4d 45 4d 22 20 | 80 21 20 52 71 24 3d 52 |<>"MEM" |.! Rq$=R|
|00001260| 71 24 2b 22 50 69 63 74 | 75 72 65 73 20 6d 75 73 |q$+"Pict|ures mus|
|00001270| 74 20 62 65 20 49 46 46 | 20 2d 20 49 4c 42 4d 22 |t be IFF| - ILBM"|
|00001280| 00 20 20 20 20 20 20 b5 | 8d 20 22 47 72 61 70 68 |. .|. "Graph|
|00001290| 69 63 20 6c 6f 61 64 20 | 65 72 72 6f 72 22 2c 52 |ic load |error",R|
|000012a0| 71 24 2c 22 43 61 6e 63 | 65 6c 22 00 20 20 80 c0 |q$,"Canc|el". ..|
|000012b0| 00 00 00 00 00 3b 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |.....;--|--------|
|000012c0| 2d 2d 57 61 69 74 20 75 | 6e 74 69 6c 20 74 68 65 |--Wait u|ntil the|
|000012d0| 20 63 6c 6f 73 65 20 67 | 61 64 67 65 74 20 69 73 | close g|adget is|
|000012e0| 20 70 72 65 73 73 65 64 | 2d 2d 2d 2d 2d 2d 2d 2d | pressed|--------|
|000012f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001300| 00 20 20 80 0b 20 65 72 | 72 6f 72 24 3d 22 22 20 |. .. er|ror$="" |
|00001310| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001320| 20 3b 69 66 20 61 20 70 | 69 63 74 75 72 65 20 77 | ;if a p|icture w|
|00001330| 61 73 20 73 68 6f 77 6e | 2c 20 77 61 69 74 20 66 |as shown|, wait f|
|00001340| 6f 72 20 63 6c 6f 73 65 | 20 67 61 64 00 20 20 20 |or close| gad. |
|00001350| 20 c5 02 00 20 20 80 c0 | 00 80 c7 00 00 80 02 00 | ... ..|........|
|00001360| 00 00 00 | |... | |
+--------+-------------------------+-------------------------+--------+--------+