From a14a7a0ccc9de76aeab0b2e4bbf58f1a79deedc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Wed, 3 Jul 2024 10:19:30 +0200 Subject: New upstream version 5.3.0GA --- .hgignore | 2 + .hgtags | 15 + .hgtags.orig | 116 - CMake/CMakeDefaults.cmake | 22 + CMake/FindCMocka.cmake | 5 +- CMake/FindFreeImage.cmake | 74 +- CMake/FindGTKUnixPrint.cmake | 7 +- CMake/FindInkscape.cmake | 47 + CMake/FindLibzip.cmake | 105 +- CMake/FindMiniXML.cmake | 121 +- CMake/FindPandoc.cmake | 2 +- CMake/FindZlib.cmake | 70 +- CMakeLists.txt | 244 +- PlatformSettings.cmake | 61 + ProgramVersion.cmake | 7 + README | 0 app/CMakeLists.txt | 33 +- app/COPYING | 96 +- app/bin/CMakeLists.txt | 631 +- app/bin/acclkeys.h | 4 +- app/bin/appdefaults.c | 349 +- app/bin/archive.c | 477 +- app/bin/archive.h | 6 +- app/bin/bdf2xtp.c | 620 +- app/bin/bitmaps/16pix/bridge.png | Bin 209 -> 0 bytes app/bin/bitmaps/16pix/circle-center.png | Bin 249 -> 0 bytes app/bin/bitmaps/16pix/circle-tangent.png | Bin 244 -> 0 bytes app/bin/bitmaps/16pix/circle.png | Bin 242 -> 0 bytes app/bin/bitmaps/16pix/curved-chord.png | Bin 244 -> 0 bytes app/bin/bitmaps/16pix/curved-end.png | Bin 239 -> 0 bytes app/bin/bitmaps/16pix/curved-middle.png | Bin 239 -> 0 bytes app/bin/bitmaps/16pix/curved-tangent.png | Bin 241 -> 0 bytes app/bin/bitmaps/16pix/description.png | Bin 228 -> 0 bytes app/bin/bitmaps/16pix/elevation.png | Bin 216 -> 0 bytes app/bin/bitmaps/16pix/exit.png | Bin 203 -> 0 bytes app/bin/bitmaps/16pix/palette.png | Bin 179 -> 0 bytes app/bin/bitmaps/16pix/pan-zoom.png | Bin 229 -> 0 bytes app/bin/bitmaps/16pix/select.png | Bin 220 -> 0 bytes app/bin/bitmaps/16pix/snap-curs.png | Bin 222 -> 0 bytes app/bin/bitmaps/16pix/snap-grid.png | Bin 191 -> 0 bytes app/bin/bitmaps/24pix/description.png | Bin 253 -> 0 bytes app/bin/bitmaps/24pix/exit.png | Bin 236 -> 0 bytes app/bin/bitmaps/24pix/pan-zoom.png | Bin 273 -> 0 bytes app/bin/bitmaps/24pix/snap-curs.png | Bin 265 -> 0 bytes app/bin/bitmaps/24pix/snap-grid.png | Bin 183 -> 0 bytes app/bin/bitmaps/CMakeLists.txt | 100 + app/bin/bitmaps/Info.xpm | 116 - app/bin/bitmaps/SVG/Info.svg | 69 - app/bin/bitmaps/SVG/NotUsed/ease-broad.svg | 66 - app/bin/bitmaps/SVG/NotUsed/ease-cornu.svg | 61 - app/bin/bitmaps/SVG/NotUsed/ease-gt-broad.svg | 69 - app/bin/bitmaps/SVG/NotUsed/ease-gt-sharp.svg | 66 - app/bin/bitmaps/SVG/NotUsed/ease-lt-broad.svg | 67 - app/bin/bitmaps/SVG/NotUsed/ease-lt-sharp.svg | 66 - app/bin/bitmaps/SVG/NotUsed/ease-none.svg | 66 - app/bin/bitmaps/SVG/NotUsed/ease-normal.svg | 66 - app/bin/bitmaps/SVG/NotUsed/ease-sharp.svg | 66 - app/bin/bitmaps/SVG/background.svg | 153 - app/bin/bitmaps/SVG/benchwork.svg | 100 - app/bin/bitmaps/SVG/bezier-line.svg | 92 - app/bin/bitmaps/SVG/bezier-track.svg | 424 - app/bin/bitmaps/SVG/block.svg | 95 - app/bin/bitmaps/SVG/blockdel.svg | 202 - app/bin/bitmaps/SVG/blockedit.svg | 239 - app/bin/bitmaps/SVG/blocknew.svg | 216 - app/bin/bitmaps/SVG/bottom.svg | 62 - app/bin/bitmaps/SVG/box.svg | 72 - app/bin/bitmaps/SVG/bridge.svg | 162 - app/bin/bitmaps/SVG/building.svg | 85 - app/bin/bitmaps/SVG/car-inventory.svg | 146 - app/bin/bitmaps/SVG/change-grid.svg | 136 - app/bin/bitmaps/SVG/circle-center.svg | 283 - app/bin/bitmaps/SVG/circle-filled-center.svg | 72 - app/bin/bitmaps/SVG/circle-filled-tangent.svg | 78 - app/bin/bitmaps/SVG/circle-line-center.svg | 78 - app/bin/bitmaps/SVG/circle-line-tangent.svg | 78 - app/bin/bitmaps/SVG/circle-line.svg | 228 - app/bin/bitmaps/SVG/circle-tangent.svg | 272 - app/bin/bitmaps/SVG/circle.svg | 301 - app/bin/bitmaps/SVG/connect.svg | 159 - app/bin/bitmaps/SVG/control.svg | 84 - app/bin/bitmaps/SVG/convert-from.svg | 110 - app/bin/bitmaps/SVG/convert-to.svg | 107 - app/bin/bitmaps/SVG/copy.svg | 57 - app/bin/bitmaps/SVG/cornu.svg | 275 - app/bin/bitmaps/SVG/curved-chord.svg | 172 - app/bin/bitmaps/SVG/curved-end.svg | 160 - app/bin/bitmaps/SVG/curved-line-chord.svg | 114 - app/bin/bitmaps/SVG/curved-line-end.svg | 108 - app/bin/bitmaps/SVG/curved-line-middle.svg | 99 - app/bin/bitmaps/SVG/curved-line-tangent.svg | 190 - app/bin/bitmaps/SVG/curved-middle.svg | 202 - app/bin/bitmaps/SVG/curved-tangent.svg | 191 - app/bin/bitmaps/SVG/cut.svg | 64 - app/bin/bitmaps/SVG/delete.svg | 143 - app/bin/bitmaps/SVG/describe.svg | 144 - app/bin/bitmaps/SVG/description.svg | 143 - app/bin/bitmaps/SVG/dimension.svg | 148 - app/bin/bitmaps/SVG/doc-export-bmap.svg | 97 - app/bin/bitmaps/SVG/doc-export-dxf.svg | 114 - app/bin/bitmaps/SVG/doc-export-svg.svg | 76 - app/bin/bitmaps/SVG/doc-export-xtc.svg | 60 - app/bin/bitmaps/SVG/doc-export.svg | 66 - app/bin/bitmaps/SVG/doc-import-xtc.svg | 60 - app/bin/bitmaps/SVG/doc-import.svg | 66 - app/bin/bitmaps/SVG/doc-new.svg | 63 - app/bin/bitmaps/SVG/doc-open.svg | 72 - app/bin/bitmaps/SVG/doc-print.svg | 94 - app/bin/bitmaps/SVG/doc-revert.svg | 55 - app/bin/bitmaps/SVG/doc-save-as.svg | 99 - app/bin/bitmaps/SVG/doc-save.svg | 90 - app/bin/bitmaps/SVG/doc-setup.svg | 101 - app/bin/bitmaps/SVG/down.svg | 56 - app/bin/bitmaps/SVG/elevation.svg | 139 - app/bin/bitmaps/SVG/exit.svg | 88 - app/bin/bitmaps/SVG/extend.svg | 154 - app/bin/bitmaps/SVG/filled-box.svg | 72 - app/bin/bitmaps/SVG/filled-polygon.svg | 59 - app/bin/bitmaps/SVG/go.svg | 106 - app/bin/bitmaps/SVG/grid.svg | 18 - app/bin/bitmaps/SVG/helix.svg | 170 - app/bin/bitmaps/SVG/join-line.svg | 94 - app/bin/bitmaps/SVG/join.svg | 154 - app/bin/bitmaps/SVG/layers.svg | 98 - app/bin/bitmaps/SVG/magnet.svg | 83 - app/bin/bitmaps/SVG/manage.svg | 77 - app/bin/bitmaps/SVG/map.svg | 146 - app/bin/bitmaps/SVG/move.svg | 231 - app/bin/bitmaps/SVG/new-car.svg | 136 - app/bin/bitmaps/SVG/ok.svg | 55 - app/bin/bitmaps/SVG/pan-zoom.svg | 89 - app/bin/bitmaps/SVG/parallel-line.svg | 155 - app/bin/bitmaps/SVG/parallel.svg | 221 - app/bin/bitmaps/SVG/parameter.svg | 76 - app/bin/bitmaps/SVG/paste.svg | 64 - app/bin/bitmaps/SVG/polygon.svg | 57 - app/bin/bitmaps/SVG/polyline.svg | 56 - app/bin/bitmaps/SVG/profile.svg | 176 - app/bin/bitmaps/SVG/protractor.svg | 68 - app/bin/bitmaps/SVG/redo.svg | 52 - app/bin/bitmaps/SVG/reflect.svg | 71 - app/bin/bitmaps/SVG/rotate.svg | 222 - app/bin/bitmaps/SVG/ruler.svg | 81 - app/bin/bitmaps/SVG/select.svg | 153 - app/bin/bitmaps/SVG/sensor.svg | 71 - app/bin/bitmaps/SVG/signal.svg | 78 - app/bin/bitmaps/SVG/snap-curs.svg | 130 - app/bin/bitmaps/SVG/snap-grid.svg | 128 - app/bin/bitmaps/SVG/split-draw.svg | 97 - app/bin/bitmaps/SVG/split.svg | 153 - app/bin/bitmaps/SVG/star.svg | 124 - app/bin/bitmaps/SVG/sticky-doc.svg | 72 - app/bin/bitmaps/SVG/sticky-link.svg | 76 - app/bin/bitmaps/SVG/sticky-note.svg | 88 - app/bin/bitmaps/SVG/stop.svg | 106 - app/bin/bitmaps/SVG/straight-line.svg | 126 - app/bin/bitmaps/SVG/straight.svg | 160 - app/bin/bitmaps/SVG/switch-ai.svg | 89 - app/bin/bitmaps/SVG/switchm.svg | 116 - app/bin/bitmaps/SVG/switchmdel.svg | 191 - app/bin/bitmaps/SVG/switchmedit.svg | 214 - app/bin/bitmaps/SVG/switchmnew.svg | 172 - app/bin/bitmaps/SVG/table-edge.svg | 80 - app/bin/bitmaps/SVG/text.svg | 56 - app/bin/bitmaps/SVG/tipofday.svg | 1176 - app/bin/bitmaps/SVG/top.svg | 62 - app/bin/bitmaps/SVG/train.svg | 173 - app/bin/bitmaps/SVG/trim.svg | 91 - app/bin/bitmaps/SVG/tunnel.svg | 164 - app/bin/bitmaps/SVG/turnout-designer.svg | 179 - app/bin/bitmaps/SVG/turnout.svg | 168 - app/bin/bitmaps/SVG/turntable.svg | 175 - app/bin/bitmaps/SVG/undo.svg | 53 - app/bin/bitmaps/SVG/zoom-choose.svg | 359 - app/bin/bitmaps/SVG/zoom-extent.svg | 247 - app/bin/bitmaps/SVG/zoom-in.svg | 222 - app/bin/bitmaps/SVG/zoom-out.svg | 215 - app/bin/bitmaps/background.xpm | 157 - app/bin/bitmaps/benchwork.xpm | 112 - app/bin/bitmaps/bezier-line.xpm | 98 - app/bin/bitmaps/bezier-track.xpm | 130 - app/bin/bitmaps/block.xpm | 138 - app/bin/bitmaps/bottom.xpm | 101 - app/bin/bitmaps/box.xpm | 93 - app/bin/bitmaps/bridge.xpm | 105 - app/bin/bitmaps/building.xpm | 125 - app/bin/bitmaps/car-inventory.xpm | 103 - app/bin/bitmaps/change-grid.xpm | 118 - app/bin/bitmaps/circle-center.xpm | 114 - app/bin/bitmaps/circle-filled-center.xpm | 145 - app/bin/bitmaps/circle-filled-tangent.xpm | 148 - app/bin/bitmaps/circle-line-center.xpm | 93 - app/bin/bitmaps/circle-line-tangent.xpm | 93 - app/bin/bitmaps/circle-line.xpm | 95 - app/bin/bitmaps/circle-tangent.xpm | 110 - app/bin/bitmaps/circle.xpm | 115 - app/bin/bitmaps/connect.xpm | 116 - app/bin/bitmaps/control.xpm | 129 - app/bin/bitmaps/convert-from.xpm | 99 - app/bin/bitmaps/convert-to.xpm | 99 - app/bin/bitmaps/copy.xpm | 95 - app/bin/bitmaps/cornu.xpm | 117 - app/bin/bitmaps/curved-chord.xpm | 109 - app/bin/bitmaps/curved-end.xpm | 107 - app/bin/bitmaps/curved-line-chord.xpm | 92 - app/bin/bitmaps/curved-line-end.xpm | 94 - app/bin/bitmaps/curved-line-middle.xpm | 95 - app/bin/bitmaps/curved-line-tangent.xpm | 98 - app/bin/bitmaps/curved-middle.xpm | 108 - app/bin/bitmaps/curved-tangent.xpm | 116 - app/bin/bitmaps/cut.xpm | 92 - app/bin/bitmaps/delete.xpm | 114 - app/bin/bitmaps/describe.xpm | 111 - app/bin/bitmaps/description.xpm | 101 - app/bin/bitmaps/dimension.xpm | 94 - app/bin/bitmaps/doc-export-bmap.xpm | 162 - app/bin/bitmaps/doc-export-dxf.xpm | 100 - app/bin/bitmaps/doc-export-svg.xpm | 114 - app/bin/bitmaps/doc-export-xtc.xpm | 108 - app/bin/bitmaps/doc-export.xpm | 119 - app/bin/bitmaps/doc-import-xtc.xpm | 123 - app/bin/bitmaps/doc-import.xpm | 123 - app/bin/bitmaps/doc-new.xpm | 127 - app/bin/bitmaps/doc-open.xpm | 136 - app/bin/bitmaps/doc-print.xpm | 108 - app/bin/bitmaps/doc-revert.xpm | 134 - app/bin/bitmaps/doc-save-as.xpm | 135 - app/bin/bitmaps/doc-save.xpm | 116 - app/bin/bitmaps/doc-setup.xpm | 110 - app/bin/bitmaps/down.xpm | 89 - app/bin/bitmaps/ease-broad.xpm | 89 - app/bin/bitmaps/ease-cornu.xpm | 96 - app/bin/bitmaps/ease-gt-broad.xpm | 89 - app/bin/bitmaps/ease-gt-sharp.xpm | 89 - app/bin/bitmaps/ease-lt-broad.xpm | 89 - app/bin/bitmaps/ease-lt-sharp.xpm | 89 - app/bin/bitmaps/ease-none.xpm | 89 - app/bin/bitmaps/ease-normal.xpm | 89 - app/bin/bitmaps/ease-sharp.xpm | 89 - app/bin/bitmaps/elevation.xpm | 117 - app/bin/bitmaps/exit.xpm | 94 - app/bin/bitmaps/extend.xpm | 143 - app/bin/bitmaps/filled-box.xpm | 120 - app/bin/bitmaps/filled-polygon.xpm | 121 - app/bin/bitmaps/go.xpm | 135 - app/bin/bitmaps/helix.xpm | 95 - app/bin/bitmaps/join-line.xpm | 99 - app/bin/bitmaps/join.xpm | 117 - app/bin/bitmaps/l1.xbm | 78 - app/bin/bitmaps/l10.xbm | 78 - app/bin/bitmaps/l11.xbm | 78 - app/bin/bitmaps/l12.xbm | 78 - app/bin/bitmaps/l13.xbm | 78 - app/bin/bitmaps/l14.xbm | 78 - app/bin/bitmaps/l15.xbm | 78 - app/bin/bitmaps/l16.xbm | 78 - app/bin/bitmaps/l17.xbm | 78 - app/bin/bitmaps/l18.xbm | 78 - app/bin/bitmaps/l19.xbm | 78 - app/bin/bitmaps/l2.xbm | 78 - app/bin/bitmaps/l20.xbm | 78 - app/bin/bitmaps/l21.xbm | 78 - app/bin/bitmaps/l22.xbm | 78 - app/bin/bitmaps/l23.xbm | 78 - app/bin/bitmaps/l24.xbm | 78 - app/bin/bitmaps/l25.xbm | 78 - app/bin/bitmaps/l26.xbm | 78 - app/bin/bitmaps/l27.xbm | 78 - app/bin/bitmaps/l28.xbm | 78 - app/bin/bitmaps/l29.xbm | 78 - app/bin/bitmaps/l3.xbm | 78 - app/bin/bitmaps/l30.xbm | 78 - app/bin/bitmaps/l31.xbm | 78 - app/bin/bitmaps/l32.xbm | 78 - app/bin/bitmaps/l33.xbm | 78 - app/bin/bitmaps/l34.xbm | 78 - app/bin/bitmaps/l35.xbm | 78 - app/bin/bitmaps/l36.xbm | 78 - app/bin/bitmaps/l37.xbm | 78 - app/bin/bitmaps/l38.xbm | 78 - app/bin/bitmaps/l39.xbm | 78 - app/bin/bitmaps/l4.xbm | 78 - app/bin/bitmaps/l40.xbm | 78 - app/bin/bitmaps/l41.xbm | 78 - app/bin/bitmaps/l42.xbm | 78 - app/bin/bitmaps/l43.xbm | 78 - app/bin/bitmaps/l44.xbm | 78 - app/bin/bitmaps/l45.xbm | 78 - app/bin/bitmaps/l46.xbm | 78 - app/bin/bitmaps/l47.xbm | 78 - app/bin/bitmaps/l48.xbm | 78 - app/bin/bitmaps/l49.xbm | 78 - app/bin/bitmaps/l5.xbm | 78 - app/bin/bitmaps/l50.xbm | 78 - app/bin/bitmaps/l51.xbm | 78 - app/bin/bitmaps/l52.xbm | 78 - app/bin/bitmaps/l53.xbm | 78 - app/bin/bitmaps/l54.xbm | 78 - app/bin/bitmaps/l55.xbm | 78 - app/bin/bitmaps/l56.xbm | 78 - app/bin/bitmaps/l57.xbm | 78 - app/bin/bitmaps/l58.xbm | 78 - app/bin/bitmaps/l59.xbm | 78 - app/bin/bitmaps/l6.xbm | 78 - app/bin/bitmaps/l60.xbm | 78 - app/bin/bitmaps/l61.xbm | 78 - app/bin/bitmaps/l62.xbm | 78 - app/bin/bitmaps/l63.xbm | 78 - app/bin/bitmaps/l64.xbm | 78 - app/bin/bitmaps/l65.xbm | 78 - app/bin/bitmaps/l66.xbm | 78 - app/bin/bitmaps/l67.xbm | 78 - app/bin/bitmaps/l68.xbm | 78 - app/bin/bitmaps/l69.xbm | 78 - app/bin/bitmaps/l7.xbm | 78 - app/bin/bitmaps/l70.xbm | 78 - app/bin/bitmaps/l71.xbm | 78 - app/bin/bitmaps/l72.xbm | 78 - app/bin/bitmaps/l73.xbm | 78 - app/bin/bitmaps/l74.xbm | 78 - app/bin/bitmaps/l75.xbm | 78 - app/bin/bitmaps/l76.xbm | 78 - app/bin/bitmaps/l77.xbm | 78 - app/bin/bitmaps/l78.xbm | 78 - app/bin/bitmaps/l79.xbm | 78 - app/bin/bitmaps/l8.xbm | 78 - app/bin/bitmaps/l80.xbm | 78 - app/bin/bitmaps/l81.xbm | 78 - app/bin/bitmaps/l82.xbm | 78 - app/bin/bitmaps/l83.xbm | 78 - app/bin/bitmaps/l84.xbm | 78 - app/bin/bitmaps/l85.xbm | 78 - app/bin/bitmaps/l86.xbm | 78 - app/bin/bitmaps/l87.xbm | 78 - app/bin/bitmaps/l88.xbm | 78 - app/bin/bitmaps/l89.xbm | 78 - app/bin/bitmaps/l9.xbm | 78 - app/bin/bitmaps/l90.xbm | 78 - app/bin/bitmaps/l91.xbm | 78 - app/bin/bitmaps/l92.xbm | 78 - app/bin/bitmaps/l93.xbm | 78 - app/bin/bitmaps/l94.xbm | 78 - app/bin/bitmaps/l95.xbm | 78 - app/bin/bitmaps/l96.xbm | 78 - app/bin/bitmaps/l97.xbm | 78 - app/bin/bitmaps/l98.xbm | 78 - app/bin/bitmaps/l99.xbm | 78 - app/bin/bitmaps/layer_num.inc | 515 + app/bin/bitmaps/layers.xpm | 110 - app/bin/bitmaps/loosen.xpm | 183 + app/bin/bitmaps/magnet.xpm | 139 - app/bin/bitmaps/manage.xpm | 110 - app/bin/bitmaps/map.xpm | 169 - app/bin/bitmaps/move.xpm | 119 - app/bin/bitmaps/new-car.xpm | 100 - app/bin/bitmaps/ok.xpm | 92 - app/bin/bitmaps/pan-zoom.xpm | 94 - app/bin/bitmaps/parallel-line.xpm | 108 - app/bin/bitmaps/parallel.xpm | 116 - app/bin/bitmaps/parameter.xpm | 104 - app/bin/bitmaps/paste.xpm | 107 - app/bin/bitmaps/png/circle-center16.png | Bin 0 -> 249 bytes app/bin/bitmaps/png/circle-tangent16.png | Bin 0 -> 244 bytes app/bin/bitmaps/png/circle16.png | Bin 0 -> 242 bytes app/bin/bitmaps/png/curved-chord16.png | Bin 0 -> 244 bytes app/bin/bitmaps/png/curved-end16.png | Bin 0 -> 239 bytes app/bin/bitmaps/png/curved-middle16.png | Bin 0 -> 239 bytes app/bin/bitmaps/png/curved-tangent16.png | Bin 0 -> 241 bytes app/bin/bitmaps/png/description16.png | Bin 0 -> 228 bytes app/bin/bitmaps/png/description24.png | Bin 0 -> 253 bytes app/bin/bitmaps/png/down16.png | Bin 0 -> 170 bytes app/bin/bitmaps/png/down24.png | Bin 0 -> 180 bytes app/bin/bitmaps/png/ease-broad16.png | Bin 0 -> 263 bytes app/bin/bitmaps/png/ease-broad24.png | Bin 0 -> 332 bytes app/bin/bitmaps/png/ease-broad32.png | Bin 0 -> 389 bytes app/bin/bitmaps/png/ease-cornu16.png | Bin 0 -> 322 bytes app/bin/bitmaps/png/ease-cornu24.png | Bin 0 -> 378 bytes app/bin/bitmaps/png/ease-cornu32.png | Bin 0 -> 481 bytes app/bin/bitmaps/png/ease-gt-broad16.png | Bin 0 -> 275 bytes app/bin/bitmaps/png/ease-gt-broad24.png | Bin 0 -> 342 bytes app/bin/bitmaps/png/ease-gt-broad32.png | Bin 0 -> 422 bytes app/bin/bitmaps/png/ease-gt-sharp16.png | Bin 0 -> 276 bytes app/bin/bitmaps/png/ease-gt-sharp24.png | Bin 0 -> 346 bytes app/bin/bitmaps/png/ease-gt-sharp32.png | Bin 0 -> 407 bytes app/bin/bitmaps/png/ease-lt-broad16.png | Bin 0 -> 275 bytes app/bin/bitmaps/png/ease-lt-broad24.png | Bin 0 -> 344 bytes app/bin/bitmaps/png/ease-lt-broad32.png | Bin 0 -> 420 bytes app/bin/bitmaps/png/ease-lt-sharp16.png | Bin 0 -> 274 bytes app/bin/bitmaps/png/ease-lt-sharp24.png | Bin 0 -> 346 bytes app/bin/bitmaps/png/ease-lt-sharp32.png | Bin 0 -> 407 bytes app/bin/bitmaps/png/ease-none16.png | Bin 0 -> 260 bytes app/bin/bitmaps/png/ease-none24.png | Bin 0 -> 318 bytes app/bin/bitmaps/png/ease-none32.png | Bin 0 -> 371 bytes app/bin/bitmaps/png/ease-normal16.png | Bin 0 -> 268 bytes app/bin/bitmaps/png/ease-normal24.png | Bin 0 -> 326 bytes app/bin/bitmaps/png/ease-normal32.png | Bin 0 -> 384 bytes app/bin/bitmaps/png/ease-sharp16.png | Bin 0 -> 267 bytes app/bin/bitmaps/png/ease-sharp24.png | Bin 0 -> 336 bytes app/bin/bitmaps/png/ease-sharp32.png | Bin 0 -> 393 bytes app/bin/bitmaps/png/elevation16.png | Bin 0 -> 216 bytes app/bin/bitmaps/png/exit16.png | Bin 0 -> 203 bytes app/bin/bitmaps/png/exit24.png | Bin 0 -> 236 bytes app/bin/bitmaps/png/extend16.png | Bin 0 -> 165 bytes app/bin/bitmaps/png/palette.png | Bin 0 -> 179 bytes app/bin/bitmaps/png/pan-zoom16.png | Bin 0 -> 229 bytes app/bin/bitmaps/png/pan-zoom24.png | Bin 0 -> 273 bytes app/bin/bitmaps/png/ruler16.png | Bin 0 -> 134 bytes app/bin/bitmaps/png/select16.png | Bin 0 -> 220 bytes app/bin/bitmaps/png/snap-curs16.png | Bin 0 -> 222 bytes app/bin/bitmaps/png/snap-curs24.png | Bin 0 -> 265 bytes app/bin/bitmaps/png/snap-grid16.png | Bin 0 -> 191 bytes app/bin/bitmaps/png/snap-grid24.png | Bin 0 -> 183 bytes app/bin/bitmaps/png/straight16.png | Bin 0 -> 155 bytes app/bin/bitmaps/png/turntable16.png | Bin 0 -> 132 bytes app/bin/bitmaps/polygon.xpm | 89 - app/bin/bitmaps/polyline.xpm | 92 - app/bin/bitmaps/profile.xpm | 121 - app/bin/bitmaps/protractor.xpm | 99 - app/bin/bitmaps/redo.xpm | 104 - app/bin/bitmaps/reflect.xpm | 115 - app/bin/bitmaps/rotate.xpm | 148 - app/bin/bitmaps/ruler.xpm | 89 - app/bin/bitmaps/select.xpm | 106 - app/bin/bitmaps/sensor.xpm | 138 - app/bin/bitmaps/signal.xpm | 106 - app/bin/bitmaps/snap-curs.xpm | 102 - app/bin/bitmaps/snap-grid.xpm | 92 - app/bin/bitmaps/split-draw.xpm | 95 - app/bin/bitmaps/split.xpm | 107 - app/bin/bitmaps/sticky-doc.xpm | 130 - app/bin/bitmaps/sticky-link.xpm | 138 - app/bin/bitmaps/sticky-note.xpm | 124 - app/bin/bitmaps/stop.xpm | 128 - app/bin/bitmaps/straight-line.xpm | 96 - app/bin/bitmaps/straight.xpm | 133 - app/bin/bitmaps/svg/background.svg | 153 + app/bin/bitmaps/svg/benchwork.svg | 100 + app/bin/bitmaps/svg/bezier-line.svg | 92 + app/bin/bitmaps/svg/bezier-track.svg | 424 + app/bin/bitmaps/svg/block.svg | 95 + app/bin/bitmaps/svg/blockdel.svg | 202 + app/bin/bitmaps/svg/blockedit.svg | 239 + app/bin/bitmaps/svg/blocknew.svg | 216 + app/bin/bitmaps/svg/bottom.svg | 62 + app/bin/bitmaps/svg/box.svg | 72 + app/bin/bitmaps/svg/bridge.svg | 152 + app/bin/bitmaps/svg/building.svg | 85 + app/bin/bitmaps/svg/car-inventory.svg | 146 + app/bin/bitmaps/svg/change-grid.svg | 136 + app/bin/bitmaps/svg/circle-center.svg | 283 + app/bin/bitmaps/svg/circle-filled-center.svg | 72 + app/bin/bitmaps/svg/circle-filled-tangent.svg | 78 + app/bin/bitmaps/svg/circle-line-center.svg | 78 + app/bin/bitmaps/svg/circle-line-tangent.svg | 78 + app/bin/bitmaps/svg/circle-line.svg | 228 + app/bin/bitmaps/svg/circle-tangent.svg | 272 + app/bin/bitmaps/svg/circle.svg | 301 + app/bin/bitmaps/svg/clone.svg | 69 + app/bin/bitmaps/svg/connect.svg | 160 + app/bin/bitmaps/svg/control.svg | 84 + app/bin/bitmaps/svg/convert-from.svg | 110 + app/bin/bitmaps/svg/convert-to.svg | 107 + app/bin/bitmaps/svg/copy.svg | 57 + app/bin/bitmaps/svg/cornu.svg | 275 + app/bin/bitmaps/svg/curved-chord.svg | 172 + app/bin/bitmaps/svg/curved-end.svg | 160 + app/bin/bitmaps/svg/curved-line-chord.svg | 114 + app/bin/bitmaps/svg/curved-line-end.svg | 108 + app/bin/bitmaps/svg/curved-line-middle.svg | 99 + app/bin/bitmaps/svg/curved-line-tangent.svg | 190 + app/bin/bitmaps/svg/curved-middle.svg | 202 + app/bin/bitmaps/svg/curved-tangent.svg | 191 + app/bin/bitmaps/svg/cut.svg | 64 + app/bin/bitmaps/svg/delete.svg | 143 + app/bin/bitmaps/svg/describe.svg | 144 + app/bin/bitmaps/svg/description.svg | 143 + app/bin/bitmaps/svg/dimension.svg | 148 + app/bin/bitmaps/svg/doc-export-bmap.svg | 91 + app/bin/bitmaps/svg/doc-export-dxf.svg | 107 + app/bin/bitmaps/svg/doc-export-svg.svg | 70 + app/bin/bitmaps/svg/doc-export.svg | 66 + app/bin/bitmaps/svg/doc-import-mod.svg | 66 + app/bin/bitmaps/svg/doc-import.svg | 60 + app/bin/bitmaps/svg/doc-new.svg | 63 + app/bin/bitmaps/svg/doc-open.svg | 72 + app/bin/bitmaps/svg/doc-print.svg | 94 + app/bin/bitmaps/svg/doc-recent.svg | 63 + app/bin/bitmaps/svg/doc-revert.svg | 55 + app/bin/bitmaps/svg/doc-save-as.svg | 99 + app/bin/bitmaps/svg/doc-save.svg | 90 + app/bin/bitmaps/svg/doc-setup.svg | 101 + app/bin/bitmaps/svg/down.svg | 56 + app/bin/bitmaps/svg/elevation.svg | 139 + app/bin/bitmaps/svg/exit.svg | 88 + app/bin/bitmaps/svg/extend.svg | 154 + app/bin/bitmaps/svg/filled-box.svg | 72 + app/bin/bitmaps/svg/filled-polygon.svg | 59 + app/bin/bitmaps/svg/go.svg | 106 + app/bin/bitmaps/svg/grid.svg | 18 + app/bin/bitmaps/svg/helix.svg | 170 + app/bin/bitmaps/svg/info.svg | 69 + app/bin/bitmaps/svg/join-line.svg | 94 + app/bin/bitmaps/svg/join.svg | 154 + app/bin/bitmaps/svg/layers.svg | 98 + app/bin/bitmaps/svg/loosen.svg | 146 + app/bin/bitmaps/svg/magnet.svg | 83 + app/bin/bitmaps/svg/manage.svg | 77 + app/bin/bitmaps/svg/map.svg | 146 + app/bin/bitmaps/svg/move.svg | 231 + app/bin/bitmaps/svg/new-car.svg | 136 + app/bin/bitmaps/svg/ok.svg | 55 + app/bin/bitmaps/svg/pan-zoom.svg | 89 + app/bin/bitmaps/svg/parallel-line.svg | 155 + app/bin/bitmaps/svg/parallel.svg | 221 + app/bin/bitmaps/svg/parameter.svg | 76 + app/bin/bitmaps/svg/paste.svg | 64 + app/bin/bitmaps/svg/polygon.svg | 57 + app/bin/bitmaps/svg/polyline.svg | 56 + app/bin/bitmaps/svg/profile.svg | 176 + app/bin/bitmaps/svg/protractor.svg | 68 + app/bin/bitmaps/svg/redo.svg | 52 + app/bin/bitmaps/svg/reflect.svg | 71 + app/bin/bitmaps/svg/roadbed.svg | 121 + app/bin/bitmaps/svg/rotate.svg | 222 + app/bin/bitmaps/svg/ruler.svg | 81 + app/bin/bitmaps/svg/select.svg | 153 + app/bin/bitmaps/svg/sensor.svg | 71 + app/bin/bitmaps/svg/signal.svg | 82 + app/bin/bitmaps/svg/snap-curs.svg | 130 + app/bin/bitmaps/svg/snap-grid.svg | 128 + app/bin/bitmaps/svg/split-draw.svg | 97 + app/bin/bitmaps/svg/split.svg | 153 + app/bin/bitmaps/svg/star.svg | 124 + app/bin/bitmaps/svg/sticky-doc.svg | 72 + app/bin/bitmaps/svg/sticky-link.svg | 76 + app/bin/bitmaps/svg/sticky-note.svg | 88 + app/bin/bitmaps/svg/stop.svg | 106 + app/bin/bitmaps/svg/straight-line.svg | 126 + app/bin/bitmaps/svg/straight.svg | 160 + app/bin/bitmaps/svg/switch-motor.svg | 89 + app/bin/bitmaps/svg/switchm.svg | 116 + app/bin/bitmaps/svg/switchmdel.svg | 191 + app/bin/bitmaps/svg/switchmedit.svg | 214 + app/bin/bitmaps/svg/switchmnew.svg | 172 + app/bin/bitmaps/svg/table-edge.svg | 80 + app/bin/bitmaps/svg/text.svg | 56 + app/bin/bitmaps/svg/ties.svg | 97 + app/bin/bitmaps/svg/tipofday.svg | 1176 + app/bin/bitmaps/svg/top.svg | 62 + app/bin/bitmaps/svg/train.svg | 173 + app/bin/bitmaps/svg/trim.svg | 91 + app/bin/bitmaps/svg/tunnel.svg | 164 + app/bin/bitmaps/svg/turnout-design.svg | 183 + app/bin/bitmaps/svg/turnout.svg | 168 + app/bin/bitmaps/svg/turntable.svg | 175 + app/bin/bitmaps/svg/undo.svg | 53 + app/bin/bitmaps/svg/zoom-choose.svg | 318 + app/bin/bitmaps/svg/zoom-extent.svg | 247 + app/bin/bitmaps/svg/zoom-in.svg | 222 + app/bin/bitmaps/svg/zoom-out.svg | 215 + app/bin/bitmaps/switch-ai.xpm | 96 - app/bin/bitmaps/switchm.xpm | 30 - app/bin/bitmaps/table-edge.xpm | 114 - app/bin/bitmaps/text.xpm | 89 - app/bin/bitmaps/top.xpm | 111 - app/bin/bitmaps/train.xpm | 118 - app/bin/bitmaps/trim.xpm | 99 - app/bin/bitmaps/tunnel.xpm | 118 - app/bin/bitmaps/turnout-designer.xpm | 129 - app/bin/bitmaps/turnout.xpm | 107 - app/bin/bitmaps/turntable.xpm | 133 - app/bin/bitmaps/undo.xpm | 103 - app/bin/bitmaps/zoom-choose.xpm | 127 - app/bin/bitmaps/zoom-extent.xpm | 125 - app/bin/bitmaps/zoom-in.xpm | 128 - app/bin/bitmaps/zoom-out.xpm | 127 - app/bin/cJSON.c | 2932 -- app/bin/cJSON.h | 285 - app/bin/cbezier.c | 1066 +- app/bin/cbezier.h | 12 +- app/bin/cblock.c | 641 +- app/bin/ccontrol.c | 785 +- app/bin/ccornu.c | 2151 +- app/bin/ccornu.h | 9 +- app/bin/ccurve.c | 655 +- app/bin/ccurve.h | 29 +- app/bin/cdraw.c | 2932 +- app/bin/celev.c | 181 +- app/bin/cgroup.c | 984 +- app/bin/chndldto.c | 155 +- app/bin/chotbar.c | 365 +- app/bin/cjoin.c | 1020 +- app/bin/cjoin.h | 29 +- app/bin/cmisc.c | 890 +- app/bin/cmisc2.c | 54 - app/bin/cmodify.c | 585 +- app/bin/cnote.c | 113 +- app/bin/cnvdsgn.c | 54 +- app/bin/command.c | 800 + app/bin/command.h | 150 + app/bin/common-ui.h | 4 +- app/bin/common.h | 125 +- app/bin/compound.c | 828 +- app/bin/compound.h | 167 +- app/bin/cparalle.c | 363 +- app/bin/cprint.c | 975 +- app/bin/cprofile.c | 2161 +- app/bin/cpull.c | 331 +- app/bin/cruler.c | 142 +- app/bin/cselect.c | 2828 +- app/bin/cselect.h | 11 +- app/bin/csensor.c | 720 +- app/bin/csignal.c | 1242 +- app/bin/csnap.c | 351 +- app/bin/csplit.c | 185 +- app/bin/cstraigh.c | 112 +- app/bin/cstraigh.h | 12 +- app/bin/cstruct.c | 609 +- app/bin/cswitchmotor.c | 612 +- app/bin/ctext.c | 105 +- app/bin/ctie.c | 53 + app/bin/ctodesgn.c | 2898 +- app/bin/ctrain.c | 4851 +-- app/bin/ctrain.h | 32 +- app/bin/cturnout.c | 3647 +- app/bin/cturntbl.c | 548 +- app/bin/cundo.c | 499 +- app/bin/cundo.h | 7 +- app/bin/custom.c | 102 +- app/bin/custom.h | 32 +- app/bin/dbench.c | 202 +- app/bin/dbitmap.c | 11 +- app/bin/dcar.c | 3088 +- app/bin/dcmpnd.c | 294 +- app/bin/dcontmgm.c | 208 +- app/bin/dcustmgm.c | 197 +- app/bin/dease.c | 97 +- app/bin/denum.c | 83 +- app/bin/directory.c | 172 +- app/bin/directory.h | 8 +- app/bin/dlayer.c | 4161 ++- app/bin/dlayer.h | 69 + app/bin/doption.c | 216 +- app/bin/dpricels.c | 63 +- app/bin/dprmfile.c | 348 +- app/bin/draw.c | 2498 +- app/bin/draw.h | 87 +- app/bin/drawgeom.c | 2591 +- app/bin/drawgeom.h | 128 +- app/bin/dxfformat.c | 246 +- app/bin/dxfformat.h | 20 +- app/bin/dxfoutput.c | 264 +- app/bin/elev.c | 513 +- app/bin/file2uri.c | 51 +- app/bin/file2uri.h | 47 +- app/bin/fileio.c | 711 +- app/bin/fileio.h | 23 +- app/bin/filenoteui.c | 237 +- app/bin/helphelper.c | 123 +- app/bin/i18n.c | 16 +- app/bin/i18n.h | 26 +- app/bin/include/dirent.h | 1655 +- app/bin/include/levenshtein.h | 3 +- app/bin/include/paramfile.h | 52 +- app/bin/include/paramfilelist.h | 62 +- app/bin/include/partcatalog.h | 67 +- app/bin/include/problemrep.h | 37 + app/bin/include/stringxtc.h | 9 +- app/bin/include/svgformat.h | 4 +- app/bin/include/utf8convert.h | 2 +- app/bin/layout.c | 847 +- app/bin/layout.h | 14 +- app/bin/levenshtein.c | 95 +- app/bin/linknoteui.c | 209 +- app/bin/lprintf.c | 31 +- app/bin/macro.c | 772 +- app/bin/manifest.c | 84 +- app/bin/manifest.h | 8 +- app/bin/menu.c | 1486 + app/bin/menu.h | 69 + app/bin/misc.c | 2968 +- app/bin/misc.h | 444 +- app/bin/misc2.c | 898 - app/bin/misc2.h | 124 - app/bin/note.h | 72 +- app/bin/param.c | 2201 +- app/bin/param.h | 203 +- app/bin/paramfile.c | 102 +- app/bin/paramfilelist.c | 549 +- app/bin/paramfilesearch_ui.c | 369 +- app/bin/partcatalog.c | 1209 +- app/bin/paths.c | 165 +- app/bin/paths.h | 2 +- app/bin/problemrep.c | 635 + app/bin/problemrepui.c | 109 + app/bin/scale.c | 1154 + app/bin/scale.h | 63 + app/bin/shortentext.c | 52 +- app/bin/shortentext.h | 38 +- app/bin/shrtpath.c | 187 +- app/bin/shrtpath.h | 21 +- app/bin/smalldlg.c | 134 +- app/bin/smalldlg.h | 6 +- app/bin/stringxtc.c | 241 +- app/bin/svgformat.c | 559 +- app/bin/svgoutput.c | 462 +- app/bin/tbezier.c | 1726 +- app/bin/tbezier.h | 52 +- app/bin/tcornu.c | 1123 +- app/bin/tcornu.h | 66 +- app/bin/tcurve.c | 1061 +- app/bin/tease.c | 1147 +- app/bin/textnoteui.c | 210 +- app/bin/track.c | 2289 +- app/bin/track.h | 600 +- app/bin/trackx.h | 39 +- app/bin/trkendpt.c | 648 + app/bin/trkendpt.h | 54 + app/bin/trkendptx.h | 51 + app/bin/trknote.c | 478 +- app/bin/trkseg.c | 1699 +- app/bin/trkseg.h | 252 + app/bin/tstraigh.c | 669 +- app/bin/turnout.c | 2157 ++ app/bin/unittest/CMakeLists.txt | 78 +- app/bin/unittest/catalogtest.c | 63 +- app/bin/unittest/defaultstest.c | 18 +- app/bin/unittest/dxfformattest.c | 40 +- app/bin/unittest/pathstest.c | 56 +- app/bin/unittest/shortentest.c | 8 +- app/bin/utf8convert.c | 40 +- app/bin/uthash.h | 102 +- app/bin/utility.c | 328 +- app/bin/utility.h | 11 +- app/bin/validator.c | 8 +- app/bin/validator.h | 22 +- app/bin/version.h | 20 +- app/bin/xtrkcad.ico | Bin 22486 -> 22486 bytes app/bin/xtrkcad.rc | 14 +- app/cJSON/CMakeLists.txt | 13 + app/cJSON/LICENSE | 20 + app/cJSON/cJSON.c | 3110 ++ app/cJSON/cJSON.h | 293 + app/cornu/CMakeLists.txt | 54 +- app/cornu/bezctx_xtrkcad.c | 35 +- app/doc/CMakeLists.txt | 161 +- app/doc/addm.but | 107 +- app/doc/appendix.but | 29 +- app/doc/changem.but | 60 +- app/doc/clean-html.cmake | 6 + app/doc/clean-html.cmake.in | 6 - app/doc/drawm.but | 66 +- app/doc/editm.but | 90 +- app/doc/filem.but | 124 +- app/doc/helpm.but | 11 +- app/doc/hhc.cmake.in | 12 +- app/doc/hotbar.but | 22 +- app/doc/intro.but.in | 19 +- app/doc/managem.but | 115 +- app/doc/mk-xtrkcad-manual-html | 93 + app/doc/navigation.but | 13 +- app/doc/optionm.but | 28 +- app/doc/png.d/bangle.png | Bin 4818 -> 761 bytes app/doc/png.d/bblock.png | Bin 389 -> 1093 bytes app/doc/png.d/bbridge.png | Bin 0 -> 1043 bytes app/doc/png.d/bcircl1.png | Bin 433 -> 1729 bytes app/doc/png.d/bcircl2.png | Bin 531 -> 1628 bytes app/doc/png.d/bcircl3.png | Bin 520 -> 1584 bytes app/doc/png.d/bcircle.png | Bin 475 -> 1718 bytes app/doc/png.d/bconnect.png | Bin 415 -> 746 bytes app/doc/png.d/bcontrol.png | Bin 303 -> 945 bytes app/doc/png.d/bcornu.png | Bin 4358 -> 1417 bytes app/doc/png.d/bcurve.png | Bin 355 -> 1342 bytes app/doc/png.d/bcurve1.png | Bin 304 -> 1246 bytes app/doc/png.d/bcurve2.png | Bin 302 -> 1234 bytes app/doc/png.d/bcurve3.png | Bin 298 -> 1331 bytes app/doc/png.d/bcurve4.png | Bin 303 -> 1414 bytes app/doc/png.d/bcurvelin.png | Bin 0 -> 744 bytes app/doc/png.d/bdelete.png | Bin 285 -> 863 bytes app/doc/png.d/bdescrib.png | Bin 273 -> 811 bytes app/doc/png.d/bdraw.png | Bin 936 -> 1988 bytes app/doc/png.d/bdrawsplit.png | Bin 0 -> 605 bytes app/doc/png.d/belev.png | Bin 268 -> 898 bytes app/doc/png.d/bexport.png | Bin 0 -> 439 bytes app/doc/png.d/bexportbmap.png | Bin 0 -> 1298 bytes app/doc/png.d/bexportdxf.png | Bin 0 -> 654 bytes app/doc/png.d/bexportsvg.png | Bin 0 -> 1274 bytes app/doc/png.d/bezier.png | Bin 3866 -> 1359 bytes app/doc/png.d/bfile.png | Bin 757 -> 801 bytes app/doc/png.d/bflip.png | Bin 296 -> 767 bytes app/doc/png.d/bgsnap.png | Bin 378 -> 2304 bytes app/doc/png.d/bgundo.png | Bin 310 -> 1352 bytes app/doc/png.d/bgzoom.png | Bin 521 -> 2140 bytes app/doc/png.d/bhelix.png | Bin 262 -> 1436 bytes app/doc/png.d/bhndldto.png | Bin 275 -> 932 bytes app/doc/png.d/bimport.png | Bin 0 -> 457 bytes app/doc/png.d/bimportmod.png | Bin 0 -> 463 bytes app/doc/png.d/bitmap.png.orig | Bin 0 -> 1298 bytes app/doc/png.d/bjoin.png | Bin 4433 -> 1060 bytes app/doc/png.d/bjoinline.png | Bin 4329 -> 733 bytes app/doc/png.d/blayer.png | Bin 70247 -> 2835 bytes app/doc/png.d/blink.png | Bin 626 -> 776 bytes app/doc/png.d/bmenu.png | Bin 221 -> 339 bytes app/doc/png.d/bmodify.png | Bin 296 -> 1169 bytes app/doc/png.d/bmove.png | Bin 296 -> 784 bytes app/doc/png.d/bmovedes.png | Bin 311 -> 845 bytes app/doc/png.d/bnew.png | Bin 793 -> 427 bytes app/doc/png.d/bnewcar.png | Bin 305 -> 561 bytes app/doc/png.d/bnote.png | Bin 684 -> 507 bytes app/doc/png.d/bopen.png | Bin 889 -> 743 bytes app/doc/png.d/bparallel.png | Bin 4402 -> 802 bytes app/doc/png.d/bparalleline.png | Bin 4357 -> 721 bytes app/doc/png.d/bparam.png | Bin 0 -> 772 bytes app/doc/png.d/bprint.png | Bin 0 -> 450 bytes app/doc/png.d/brevert.png | Bin 0 -> 694 bytes app/doc/png.d/broadbed.png | Bin 0 -> 841 bytes app/doc/png.d/brotate.png | Bin 291 -> 1117 bytes app/doc/png.d/bruler.png | Bin 250 -> 674 bytes app/doc/png.d/bsave.png | Bin 938 -> 636 bytes app/doc/png.d/bsaveas.png | Bin 0 -> 839 bytes app/doc/png.d/bselect.png | Bin 273 -> 687 bytes app/doc/png.d/bsensor.png | Bin 281 -> 1224 bytes app/doc/png.d/bsetup.png | Bin 0 -> 420 bytes app/doc/png.d/bsignal.png | Bin 256 -> 581 bytes app/doc/png.d/bsplit.png | Bin 326 -> 919 bytes app/doc/png.d/bstraigh.png | Bin 329 -> 1100 bytes app/doc/png.d/bstruct.png | Bin 338 -> 777 bytes app/doc/png.d/bswitchmotor.png | Bin 316 -> 805 bytes app/doc/png.d/btext.png | Bin 374 -> 670 bytes app/doc/png.d/bties.png | Bin 0 -> 727 bytes app/doc/png.d/btop_bottom.png | Bin 375 -> 837 bytes app/doc/png.d/btrain.png | Bin 261 -> 883 bytes app/doc/png.d/btunnel.png | Bin 428 -> 652 bytes app/doc/png.d/bturnout.png | Bin 456 -> 897 bytes app/doc/png.d/bturntbl.png | Bin 357 -> 1151 bytes app/doc/png.d/cgroup.png | Bin 7967 -> 32372 bytes app/doc/png.d/colorw.png | Bin 4684 -> 5299 bytes app/doc/png.d/convertfrom.png | Bin 4169 -> 874 bytes app/doc/png.d/convertto.png | Bin 3940 -> 814 bytes app/doc/png.d/dbench.png | Bin 289 -> 691 bytes app/doc/png.d/dbezier.png | Bin 3776 -> 837 bytes app/doc/png.d/dbox.png | Bin 271 -> 570 bytes app/doc/png.d/dcircle1.png | Bin 0 -> 1078 bytes app/doc/png.d/dcircle2.png | Bin 296 -> 908 bytes app/doc/png.d/dcircle3.png | Bin 496 -> 886 bytes app/doc/png.d/dcurve1.png | Bin 280 -> 728 bytes app/doc/png.d/dcurve2.png | Bin 295 -> 793 bytes app/doc/png.d/dcurve3.png | Bin 288 -> 780 bytes app/doc/png.d/dcurve4.png | Bin 302 -> 801 bytes app/doc/png.d/ddimlin.png | Bin 284 -> 802 bytes app/doc/png.d/dentermove.png | Bin 0 -> 2592 bytes app/doc/png.d/dfilbox.png | Bin 262 -> 573 bytes app/doc/png.d/dfilpoly.png | Bin 316 -> 852 bytes app/doc/png.d/dflcrcl2.png | Bin 303 -> 1022 bytes app/doc/png.d/dflcrcl3.png | Bin 297 -> 983 bytes app/doc/png.d/dlayer.png | Bin 9268 -> 0 bytes app/doc/png.d/dlayers.png | Bin 89877 -> 51754 bytes app/doc/png.d/dline.png | Bin 260 -> 444 bytes app/doc/png.d/dpoly.png | Bin 313 -> 722 bytes app/doc/png.d/dpolylin.png | Bin 0 -> 716 bytes app/doc/png.d/dtbledge.png | Bin 270 -> 631 bytes app/doc/png.d/exportfile.png | Bin 22136 -> 28238 bytes app/doc/png.d/exportfiledxf.png | Bin 19413 -> 24605 bytes app/doc/png.d/exportfilesvg.png | Bin 0 -> 29333 bytes app/doc/png.d/iconlink.PNG | Bin 230 -> 0 bytes app/doc/png.d/iconlink.png | Bin 0 -> 230 bytes app/doc/png.d/import.png | Bin 22302 -> 22986 bytes app/doc/png.d/importmod.png | Bin 0 -> 22835 bytes app/doc/png.d/map.png | Bin 3868 -> 1430 bytes app/doc/png.d/medit.png | Bin 5981 -> 6233 bytes app/doc/png.d/mentermove.png | Bin 0 -> 6641 bytes app/doc/png.d/mhelp.png | Bin 2240 -> 4789 bytes app/doc/png.d/pan.png | Bin 3929 -> 788 bytes app/doc/png.d/paramsearch.png | Bin 124132 -> 34767 bytes app/doc/png.d/problemdata.png | Bin 0 -> 9536 bytes app/doc/png.d/statusbarparallel.png | Bin 12964 -> 4002 bytes app/doc/png.d/statustext.png | Bin 12102 -> 3860 bytes app/doc/png.d/turnsel.png | Bin 18373 -> 50207 bytes app/doc/view_winm.but | 15 +- app/doc/warranty.but | 68 +- app/doc/xtrkcad-manual-5.3.0.html | 19625 +++++++++++ app/dynstring/CMakeLists.txt | 18 +- app/dynstring/dynstring.c | 7 +- app/dynstring/dynstring.h | 2 +- app/dynstring/unittest/CMakeLists.txt | 13 +- app/help/CMakeLists.txt | 78 +- app/help/cJSON.c | 2932 -- app/help/cJSON.h | 285 - app/help/genhelp.c | 4 +- app/help/genhelp.json | 96 +- app/help/genmessages.c | 4 +- app/help/messages.in | 104 +- app/i18n/CMakeLists.txt | 246 +- app/i18n/cy_GB.po | 17167 +++++----- app/i18n/de_DE.po | 17821 +++++----- app/i18n/fi.po | 32830 ++++++++++--------- app/i18n/fr_FR.po | 17784 +++++----- app/i18n/pt_BR.po | 14639 +++++---- app/i18n/ru.po | 14712 +++++---- app/i18n/stripmsg.c | 2 +- app/lib/CHANGELOG.md | 169 + app/lib/CMakeLists.txt | 34 +- app/lib/COPYING | 39 +- app/lib/Readme.md | 47 +- app/lib/demos/CMakeLists.txt | 5 - app/lib/demos/dmadjend.xtr | 20 +- app/lib/demos/dmcancel.xtr | 10 +- app/lib/demos/dmconn1.xtr | 12 +- app/lib/demos/dmconn2.xtr | 24 +- app/lib/demos/dmctlpnl.xtr | 45 +- app/lib/demos/dmdelund.xtr | 2 +- app/lib/demos/dmexcept.xtr | 4 +- app/lib/demos/dmgroup.xtr | 6 +- app/lib/demos/dmhelix.xtr | 8 +- app/lib/demos/dmlines.xtr | 2 +- app/lib/demos/dmlines2.xtr | 4 +- app/lib/demos/dmnotes.xtr | 53 +- app/lib/demos/dmrescal.xtr | 8 +- app/lib/demos/dmrotate.xtr | 6 +- app/lib/demos/dmselect.xtr | 34 +- app/lib/demos/dmtosel.xtr | 66 +- app/lib/demos/dmtoyard.xtr | 53 +- app/lib/examples/CMakeLists.txt | 6 - app/lib/examples/G Scale Folded Dogbone.xtc | 15282 +++++++++ app/lib/examples/Mianne Benchwork.xtc | 818 + .../Ondaville Franklin and Carolina RR.xtc | 22474 +++++++++++++ app/lib/examples/PrinterMarginTest-A4.xtc | 207 + app/lib/examples/PrinterMarginTest-Letter.xtc | 167 + app/lib/params/1-mrkln.xtp | 281 + app/lib/params/Any-DCC-Concepts Point Motors.xtp | 115 + app/lib/params/Any-ModelRailroadBenchwork.xtp | 975 + app/lib/params/Any-Sievers-Benchwork.xtp | 539 + app/lib/params/CMakeLists.txt | 116 +- app/lib/params/G-Bachmann.xtp | 113 + app/lib/params/G-Lionel Ready-To-Play Track.xtp | 37 + app/lib/params/G-Piko.xtp | 517 +- app/lib/params/G-Playmobil RC Track.xtp | 2 +- app/lib/params/G-USA.xtp | 74 +- .../HO - Atlas Custom Line Track Assemblies.xtp | 80 + app/lib/params/HO-Atlas Code 100 Track.xtp | 679 + app/lib/params/HO-AtlasTrainKidsTrk.xtp | 99 + app/lib/params/HO-Bachmann EZ.xtp | 1410 +- app/lib/params/HO-Busch.xtp | 10 + app/lib/params/HO-ITLA Modular Building System.xtp | 75 + app/lib/params/HO-Jouef(Hornby)HO.xtp | 242 + app/lib/params/HO-Kato.xtp | 1289 +- app/lib/params/HO-Lionel MagLock FasTrack.xtp | 95 + app/lib/params/HO-Mehano.xtp | 270 +- app/lib/params/HO-Peco-Code100Setrack.xtp | 111 +- app/lib/params/HO-Peco-Code100Streamline.xtp | 163 +- app/lib/params/HO-Peco-Code70USA.xtp | 54 + app/lib/params/HO-Peco70USA.xtp | 32 - app/lib/params/HO-Roco HO Code 83.xtp | 946 +- app/lib/params/HO-WalthCornerstone 1.xtp | 4385 --- app/lib/params/HO-Walthers Cornerstone 1.xtp | 4455 +++ app/lib/params/HO-Walthers DCC Code 100.xtp | 297 +- app/lib/params/HO-Walthers DCC Code 70.xtp | 68 + app/lib/params/HO-Walthers DCC Code 83.xtp | 498 +- app/lib/params/HO-Walthers-Power-Loc.xtp | 145 + app/lib/params/HO-Weinert-Code75.xtp | 410 +- app/lib/params/HO-atl100ho.xtp | 676 - app/lib/params/HO-fl-model.xtp | 847 + app/lib/params/HO-fl-profi.xtp | 558 + app/lib/params/HOn30_Minitrains.xtp | 200 +- app/lib/params/JouefHO.xtp | 215 - app/lib/params/Mianne-Bench.xtp | 134 + app/lib/params/N-Atlas Code 80 Track.xtp | 1743 +- app/lib/params/N-Bachmann EZ.xtp | 1266 +- ...eservation Models Modular Custom Structures.xtp | 372 + app/lib/params/N-ITLA Modular Building System.xtp | 62 + app/lib/params/N-Kato Track and Structures.xtp | 3518 +- app/lib/params/N-Kato-Unitram.xtp | 32 +- .../N-MiniTrix Code 60 Concrete Tie Track.xtp | 256 + app/lib/params/N-MiniTrix Track (De).xtp | 644 +- app/lib/params/N-ModellbahnUnion.xtp | 117 + app/lib/params/N-PecoCode55Finescale.xtp | 354 +- app/lib/params/N-StreetTemplate2LaneCurves.xtp | 1256 + .../params/N-StreetTemplate2LaneIntersections.xtp | 693 + app/lib/params/N-StreetTemplate2LaneStraight.xtp | 152 + app/lib/params/N-Tomix Track.xtp | 3539 +- app/lib/params/N-walth-n.xtp | 3049 -- app/lib/params/N-walthers-n.xtp | 3977 +++ app/lib/params/NTrak.xtp | 1510 + app/lib/params/Newqida.xtp | 4 +- app/lib/params/O-LionelFasTrack.xtp | 573 + app/lib/params/O-Peco-Bullhead.xtp | 117 + app/lib/params/O-Peco-Code 124 Setrack.xtp | 49 + app/lib/params/O-Peco-Code 143 FlatBottom.xtp | 39 + app/lib/params/O-Ross.xtp | 3526 +- .../OO-DCC Concepts Legacy Realistic Track.xtp | 236 + app/lib/params/OO-HornbyOO.xtp | 526 + app/lib/params/OO-HornbyPlayTrainsTrk.xtp | 95 + app/lib/params/OO-Peco-Code75Bullhead.xtp | 90 + app/lib/params/S_ACG_All Aboard Panels.xtp | 199 + app/lib/params/S_ACG_American Flyer Track.xtp | 150 + app/lib/params/S_ACG_Pike-Master Track.xtp | 88 + app/lib/params/Sn3-Fast Tracks.xtp | 260 + app/lib/params/TT-Berliner.xtp | 456 +- app/lib/params/TT-Hornby.xtp | 256 + app/lib/params/TT-ModellbahnUnion.xtp | 55 + app/lib/params/TT-Peco.xtp | 84 + app/lib/params/TT-Roco.xtp | 215 + app/lib/params/TT-Zeuke.xtp | 288 +- app/lib/params/Z-Micro-Trains.xtp | 266 + app/lib/params/Z-Rokuhan.xtp | 2361 +- app/lib/params/atlaso2rail.xtp | 313 - app/lib/params/fl-model.xtp | 500 - app/lib/params/fl-profi.xtp | 603 - app/lib/params/mkcarpart.c | 12 +- app/lib/params/mkstruct.c | 4 +- app/lib/params/mrkln1.xtp | 82 - app/lib/params/mtl-z.xtp | 253 - app/lib/params/peco-O-Bullhead.xtp | 82 - app/lib/params/proto-ng-3-foot.xtp | 2 +- app/lib/params/protoam.xtp | 3 +- app/lib/params/protosteam.xtp | 8 +- app/lib/xtrkcad-beta.desktop | 9 + app/lib/xtrkcad-setup | 16 +- app/lib/xtrkcad.upd | 27 +- app/lib/xtrkcad.xtq | 4 +- app/tools/CMakeLists.txt | 13 +- app/tools/HACKING | 2 +- app/tools/TurnoutDesigner.xtr | 918 + app/tools/halibut/CMakeLists.txt | 15 +- app/tools/halibut/bk_paper.c | 12 +- app/tools/halibut/charset/CMakeLists.txt | 16 +- app/tools/halibut/deflate.c | 8 +- app/tools/halibut/in_afm.c | 4 +- app/tools/halibut/input.c | 2 +- app/tools/halibut/tree234.c | 2 +- app/tools/halibut/ustring.c | 4 +- app/tools/halibut/wcwidth.c | 5 +- app/tools/lib/linux/libzip.a | Bin 0 -> 264078 bytes app/tools/listxtp.c | 6 +- app/tools/pngtoxpm/CMakeLists.txt | 16 + app/tools/pngtoxpm/pngtoxpm.c | 721 + app/wlib/CMakeLists.txt | 23 +- app/wlib/gtklib/CMakeLists.txt | 101 +- app/wlib/gtklib/bitmap.c | 38 +- app/wlib/gtklib/boxes.c | 194 +- app/wlib/gtklib/browserhelp.c | 65 +- app/wlib/gtklib/button.c | 903 +- app/wlib/gtklib/color.c | 512 +- app/wlib/gtklib/control.c | 248 +- app/wlib/gtklib/droplist.c | 441 +- app/wlib/gtklib/dynarr.h | 10 +- app/wlib/gtklib/filesel.c | 201 +- app/wlib/gtklib/font.c | 362 +- app/wlib/gtklib/gtkdraw-cairo.c | 1276 +- app/wlib/gtklib/gtkint.h | 299 +- app/wlib/gtklib/help.c | 40 +- app/wlib/gtklib/ixhelp.c | 424 +- app/wlib/gtklib/lines.c | 132 +- app/wlib/gtklib/list.c | 522 +- app/wlib/gtklib/liststore.c | 219 +- app/wlib/gtklib/main.c | 30 +- app/wlib/gtklib/menu.c | 487 +- app/wlib/gtklib/message.c | 220 +- app/wlib/gtklib/notice.c | 344 +- app/wlib/gtklib/opendocument.c | 88 +- app/wlib/gtklib/osxhelp.c | 167 +- app/wlib/gtklib/pixbuf.c | 96 +- app/wlib/gtklib/print.c | 1067 +- app/wlib/gtklib/single.c | 244 +- app/wlib/gtklib/splash.c | 112 +- app/wlib/gtklib/statusbar.c | 201 +- app/wlib/gtklib/sysinfo.c | 137 + app/wlib/gtklib/text.c | 592 +- app/wlib/gtklib/timer.c | 95 +- app/wlib/gtklib/tooltip.c | 237 +- app/wlib/gtklib/treeview.c | 424 +- app/wlib/gtklib/uthash.h | 102 +- app/wlib/gtklib/util.c | 827 +- app/wlib/gtklib/window.c | 1339 +- app/wlib/gtklib/wpref.c | 310 +- app/wlib/gtklib/writebitmap.c | 94 +- app/wlib/include/CMakeLists.txt | 12 + app/wlib/include/getline.h | 132 + app/wlib/include/getopt.h | 2 +- app/wlib/include/wlib.h | 313 +- app/wlib/mswlib/CMakeLists.txt | 90 +- app/wlib/mswlib/backgnd.c | 2 +- app/wlib/mswlib/checksum.c | 14 +- app/wlib/mswlib/dynarr.h | 8 +- app/wlib/mswlib/getline/LICENSE | 25 + app/wlib/mswlib/getline/README.md | 5 + app/wlib/mswlib/getline/getline.c | 73 + app/wlib/mswlib/getopt.c | 87 +- app/wlib/mswlib/gwin32.c | 153 +- app/wlib/mswlib/mswbitmap.c | 240 +- app/wlib/mswlib/mswbox.c | 43 +- app/wlib/mswlib/mswbutt.c | 346 +- app/wlib/mswlib/mswchoic.c | 320 +- app/wlib/mswlib/mswcolor.c | 124 +- app/wlib/mswlib/mswdraw.c | 1682 +- app/wlib/mswlib/mswedit.c | 539 +- app/wlib/mswlib/mswint.h | 4 +- app/wlib/mswlib/mswlines.c | 51 +- app/wlib/mswlib/mswlist.c | 1211 +- app/wlib/mswlib/mswmenu.c | 674 +- app/wlib/mswlib/mswmisc.c | 766 +- app/wlib/mswlib/mswmsg.c | 103 +- app/wlib/mswlib/mswpref.c | 453 +- app/wlib/mswlib/mswprint.c | 135 +- app/wlib/mswlib/mswsplash.c | 191 +- app/wlib/mswlib/mswstatus.c | 32 +- app/wlib/mswlib/mswtext.c | 560 +- app/wlib/mswlib/simple-gettext.c | 600 +- app/wlib/mswlib/sysinfo.c | 138 + app/wlib/mswlib/unittest/CMakeLists.txt | 16 +- app/wlib/mswlib/utf8conv.c | 277 +- app/wlib/test/testapp.c | 2 +- distribution/CMakeLists.txt | 6 +- distribution/fedora/README | 26 + .../fedora/xtrkcad-5.2.2GA-xtrkcad.desktop.patch | 106 + distribution/fedora/xtrkcad.spec | 87 +- distribution/posix/CMakeLists.txt | 12 +- distribution/posix/postinst | 9 +- distribution/posix/prerm | 9 +- docs/CMakeLists.txt | 6 +- docs/DevGuide.docx | Bin 0 -> 64905 bytes docs/doxygen/CMakeLists.txt | 23 +- docs/doxygen/Doxyfile.in | 2587 +- xtrkcad-config.h.in | 2 +- 1124 files changed, 241001 insertions(+), 175290 deletions(-) delete mode 100644 .hgtags.orig create mode 100644 CMake/CMakeDefaults.cmake create mode 100644 CMake/FindInkscape.cmake create mode 100644 PlatformSettings.cmake create mode 100644 ProgramVersion.cmake create mode 100644 README delete mode 100644 app/bin/bitmaps/16pix/bridge.png delete mode 100644 app/bin/bitmaps/16pix/circle-center.png delete mode 100644 app/bin/bitmaps/16pix/circle-tangent.png delete mode 100644 app/bin/bitmaps/16pix/circle.png delete mode 100644 app/bin/bitmaps/16pix/curved-chord.png delete mode 100644 app/bin/bitmaps/16pix/curved-end.png delete mode 100644 app/bin/bitmaps/16pix/curved-middle.png delete mode 100644 app/bin/bitmaps/16pix/curved-tangent.png delete mode 100644 app/bin/bitmaps/16pix/description.png delete mode 100644 app/bin/bitmaps/16pix/elevation.png delete mode 100644 app/bin/bitmaps/16pix/exit.png delete mode 100644 app/bin/bitmaps/16pix/palette.png delete mode 100644 app/bin/bitmaps/16pix/pan-zoom.png delete mode 100644 app/bin/bitmaps/16pix/select.png delete mode 100644 app/bin/bitmaps/16pix/snap-curs.png delete mode 100644 app/bin/bitmaps/16pix/snap-grid.png delete mode 100644 app/bin/bitmaps/24pix/description.png delete mode 100644 app/bin/bitmaps/24pix/exit.png delete mode 100644 app/bin/bitmaps/24pix/pan-zoom.png delete mode 100644 app/bin/bitmaps/24pix/snap-curs.png delete mode 100644 app/bin/bitmaps/24pix/snap-grid.png create mode 100644 app/bin/bitmaps/CMakeLists.txt delete mode 100644 app/bin/bitmaps/Info.xpm delete mode 100644 app/bin/bitmaps/SVG/Info.svg delete mode 100644 app/bin/bitmaps/SVG/NotUsed/ease-broad.svg delete mode 100644 app/bin/bitmaps/SVG/NotUsed/ease-cornu.svg delete mode 100644 app/bin/bitmaps/SVG/NotUsed/ease-gt-broad.svg delete mode 100644 app/bin/bitmaps/SVG/NotUsed/ease-gt-sharp.svg delete mode 100644 app/bin/bitmaps/SVG/NotUsed/ease-lt-broad.svg delete mode 100644 app/bin/bitmaps/SVG/NotUsed/ease-lt-sharp.svg delete mode 100644 app/bin/bitmaps/SVG/NotUsed/ease-none.svg delete mode 100644 app/bin/bitmaps/SVG/NotUsed/ease-normal.svg delete mode 100644 app/bin/bitmaps/SVG/NotUsed/ease-sharp.svg delete mode 100644 app/bin/bitmaps/SVG/background.svg delete mode 100644 app/bin/bitmaps/SVG/benchwork.svg delete mode 100644 app/bin/bitmaps/SVG/bezier-line.svg delete mode 100644 app/bin/bitmaps/SVG/bezier-track.svg delete mode 100755 app/bin/bitmaps/SVG/block.svg delete mode 100755 app/bin/bitmaps/SVG/blockdel.svg delete mode 100755 app/bin/bitmaps/SVG/blockedit.svg delete mode 100755 app/bin/bitmaps/SVG/blocknew.svg delete mode 100644 app/bin/bitmaps/SVG/bottom.svg delete mode 100644 app/bin/bitmaps/SVG/box.svg delete mode 100644 app/bin/bitmaps/SVG/bridge.svg delete mode 100644 app/bin/bitmaps/SVG/building.svg delete mode 100644 app/bin/bitmaps/SVG/car-inventory.svg delete mode 100644 app/bin/bitmaps/SVG/change-grid.svg delete mode 100644 app/bin/bitmaps/SVG/circle-center.svg delete mode 100644 app/bin/bitmaps/SVG/circle-filled-center.svg delete mode 100644 app/bin/bitmaps/SVG/circle-filled-tangent.svg delete mode 100644 app/bin/bitmaps/SVG/circle-line-center.svg delete mode 100644 app/bin/bitmaps/SVG/circle-line-tangent.svg delete mode 100644 app/bin/bitmaps/SVG/circle-line.svg delete mode 100644 app/bin/bitmaps/SVG/circle-tangent.svg delete mode 100644 app/bin/bitmaps/SVG/circle.svg delete mode 100644 app/bin/bitmaps/SVG/connect.svg delete mode 100644 app/bin/bitmaps/SVG/control.svg delete mode 100644 app/bin/bitmaps/SVG/convert-from.svg delete mode 100644 app/bin/bitmaps/SVG/convert-to.svg delete mode 100644 app/bin/bitmaps/SVG/copy.svg delete mode 100644 app/bin/bitmaps/SVG/cornu.svg delete mode 100644 app/bin/bitmaps/SVG/curved-chord.svg delete mode 100644 app/bin/bitmaps/SVG/curved-end.svg delete mode 100644 app/bin/bitmaps/SVG/curved-line-chord.svg delete mode 100644 app/bin/bitmaps/SVG/curved-line-end.svg delete mode 100644 app/bin/bitmaps/SVG/curved-line-middle.svg delete mode 100644 app/bin/bitmaps/SVG/curved-line-tangent.svg delete mode 100644 app/bin/bitmaps/SVG/curved-middle.svg delete mode 100644 app/bin/bitmaps/SVG/curved-tangent.svg delete mode 100644 app/bin/bitmaps/SVG/cut.svg delete mode 100644 app/bin/bitmaps/SVG/delete.svg delete mode 100644 app/bin/bitmaps/SVG/describe.svg delete mode 100644 app/bin/bitmaps/SVG/description.svg delete mode 100644 app/bin/bitmaps/SVG/dimension.svg delete mode 100644 app/bin/bitmaps/SVG/doc-export-bmap.svg delete mode 100644 app/bin/bitmaps/SVG/doc-export-dxf.svg delete mode 100644 app/bin/bitmaps/SVG/doc-export-svg.svg delete mode 100644 app/bin/bitmaps/SVG/doc-export-xtc.svg delete mode 100644 app/bin/bitmaps/SVG/doc-export.svg delete mode 100644 app/bin/bitmaps/SVG/doc-import-xtc.svg delete mode 100644 app/bin/bitmaps/SVG/doc-import.svg delete mode 100644 app/bin/bitmaps/SVG/doc-new.svg delete mode 100644 app/bin/bitmaps/SVG/doc-open.svg delete mode 100644 app/bin/bitmaps/SVG/doc-print.svg delete mode 100644 app/bin/bitmaps/SVG/doc-revert.svg delete mode 100644 app/bin/bitmaps/SVG/doc-save-as.svg delete mode 100644 app/bin/bitmaps/SVG/doc-save.svg delete mode 100644 app/bin/bitmaps/SVG/doc-setup.svg delete mode 100644 app/bin/bitmaps/SVG/down.svg delete mode 100644 app/bin/bitmaps/SVG/elevation.svg delete mode 100644 app/bin/bitmaps/SVG/exit.svg delete mode 100644 app/bin/bitmaps/SVG/extend.svg delete mode 100644 app/bin/bitmaps/SVG/filled-box.svg delete mode 100644 app/bin/bitmaps/SVG/filled-polygon.svg delete mode 100644 app/bin/bitmaps/SVG/go.svg delete mode 100644 app/bin/bitmaps/SVG/grid.svg delete mode 100644 app/bin/bitmaps/SVG/helix.svg delete mode 100644 app/bin/bitmaps/SVG/join-line.svg delete mode 100644 app/bin/bitmaps/SVG/join.svg delete mode 100644 app/bin/bitmaps/SVG/layers.svg delete mode 100644 app/bin/bitmaps/SVG/magnet.svg delete mode 100644 app/bin/bitmaps/SVG/manage.svg delete mode 100644 app/bin/bitmaps/SVG/map.svg delete mode 100644 app/bin/bitmaps/SVG/move.svg delete mode 100644 app/bin/bitmaps/SVG/new-car.svg delete mode 100644 app/bin/bitmaps/SVG/ok.svg delete mode 100644 app/bin/bitmaps/SVG/pan-zoom.svg delete mode 100644 app/bin/bitmaps/SVG/parallel-line.svg delete mode 100644 app/bin/bitmaps/SVG/parallel.svg delete mode 100644 app/bin/bitmaps/SVG/parameter.svg delete mode 100644 app/bin/bitmaps/SVG/paste.svg delete mode 100644 app/bin/bitmaps/SVG/polygon.svg delete mode 100644 app/bin/bitmaps/SVG/polyline.svg delete mode 100644 app/bin/bitmaps/SVG/profile.svg delete mode 100644 app/bin/bitmaps/SVG/protractor.svg delete mode 100644 app/bin/bitmaps/SVG/redo.svg delete mode 100644 app/bin/bitmaps/SVG/reflect.svg delete mode 100644 app/bin/bitmaps/SVG/rotate.svg delete mode 100644 app/bin/bitmaps/SVG/ruler.svg delete mode 100644 app/bin/bitmaps/SVG/select.svg delete mode 100644 app/bin/bitmaps/SVG/sensor.svg delete mode 100644 app/bin/bitmaps/SVG/signal.svg delete mode 100644 app/bin/bitmaps/SVG/snap-curs.svg delete mode 100644 app/bin/bitmaps/SVG/snap-grid.svg delete mode 100644 app/bin/bitmaps/SVG/split-draw.svg delete mode 100644 app/bin/bitmaps/SVG/split.svg delete mode 100644 app/bin/bitmaps/SVG/star.svg delete mode 100644 app/bin/bitmaps/SVG/sticky-doc.svg delete mode 100644 app/bin/bitmaps/SVG/sticky-link.svg delete mode 100644 app/bin/bitmaps/SVG/sticky-note.svg delete mode 100644 app/bin/bitmaps/SVG/stop.svg delete mode 100644 app/bin/bitmaps/SVG/straight-line.svg delete mode 100644 app/bin/bitmaps/SVG/straight.svg delete mode 100644 app/bin/bitmaps/SVG/switch-ai.svg delete mode 100644 app/bin/bitmaps/SVG/switchm.svg delete mode 100644 app/bin/bitmaps/SVG/switchmdel.svg delete mode 100644 app/bin/bitmaps/SVG/switchmedit.svg delete mode 100644 app/bin/bitmaps/SVG/switchmnew.svg delete mode 100644 app/bin/bitmaps/SVG/table-edge.svg delete mode 100644 app/bin/bitmaps/SVG/text.svg delete mode 100644 app/bin/bitmaps/SVG/tipofday.svg delete mode 100644 app/bin/bitmaps/SVG/top.svg delete mode 100644 app/bin/bitmaps/SVG/train.svg delete mode 100644 app/bin/bitmaps/SVG/trim.svg delete mode 100644 app/bin/bitmaps/SVG/tunnel.svg delete mode 100644 app/bin/bitmaps/SVG/turnout-designer.svg delete mode 100644 app/bin/bitmaps/SVG/turnout.svg delete mode 100644 app/bin/bitmaps/SVG/turntable.svg delete mode 100644 app/bin/bitmaps/SVG/undo.svg delete mode 100644 app/bin/bitmaps/SVG/zoom-choose.svg delete mode 100644 app/bin/bitmaps/SVG/zoom-extent.svg delete mode 100644 app/bin/bitmaps/SVG/zoom-in.svg delete mode 100644 app/bin/bitmaps/SVG/zoom-out.svg delete mode 100644 app/bin/bitmaps/background.xpm delete mode 100644 app/bin/bitmaps/benchwork.xpm delete mode 100644 app/bin/bitmaps/bezier-line.xpm delete mode 100644 app/bin/bitmaps/bezier-track.xpm delete mode 100644 app/bin/bitmaps/block.xpm delete mode 100644 app/bin/bitmaps/bottom.xpm delete mode 100644 app/bin/bitmaps/box.xpm delete mode 100644 app/bin/bitmaps/bridge.xpm delete mode 100644 app/bin/bitmaps/building.xpm delete mode 100644 app/bin/bitmaps/car-inventory.xpm delete mode 100644 app/bin/bitmaps/change-grid.xpm delete mode 100644 app/bin/bitmaps/circle-center.xpm delete mode 100644 app/bin/bitmaps/circle-filled-center.xpm delete mode 100644 app/bin/bitmaps/circle-filled-tangent.xpm delete mode 100644 app/bin/bitmaps/circle-line-center.xpm delete mode 100644 app/bin/bitmaps/circle-line-tangent.xpm delete mode 100644 app/bin/bitmaps/circle-line.xpm delete mode 100644 app/bin/bitmaps/circle-tangent.xpm delete mode 100644 app/bin/bitmaps/circle.xpm delete mode 100644 app/bin/bitmaps/connect.xpm delete mode 100644 app/bin/bitmaps/control.xpm delete mode 100644 app/bin/bitmaps/convert-from.xpm delete mode 100644 app/bin/bitmaps/convert-to.xpm delete mode 100644 app/bin/bitmaps/copy.xpm delete mode 100644 app/bin/bitmaps/cornu.xpm delete mode 100644 app/bin/bitmaps/curved-chord.xpm delete mode 100644 app/bin/bitmaps/curved-end.xpm delete mode 100644 app/bin/bitmaps/curved-line-chord.xpm delete mode 100644 app/bin/bitmaps/curved-line-end.xpm delete mode 100644 app/bin/bitmaps/curved-line-middle.xpm delete mode 100644 app/bin/bitmaps/curved-line-tangent.xpm delete mode 100644 app/bin/bitmaps/curved-middle.xpm delete mode 100644 app/bin/bitmaps/curved-tangent.xpm delete mode 100644 app/bin/bitmaps/cut.xpm delete mode 100644 app/bin/bitmaps/delete.xpm delete mode 100644 app/bin/bitmaps/describe.xpm delete mode 100644 app/bin/bitmaps/description.xpm delete mode 100644 app/bin/bitmaps/dimension.xpm delete mode 100644 app/bin/bitmaps/doc-export-bmap.xpm delete mode 100644 app/bin/bitmaps/doc-export-dxf.xpm delete mode 100644 app/bin/bitmaps/doc-export-svg.xpm delete mode 100644 app/bin/bitmaps/doc-export-xtc.xpm delete mode 100644 app/bin/bitmaps/doc-export.xpm delete mode 100644 app/bin/bitmaps/doc-import-xtc.xpm delete mode 100644 app/bin/bitmaps/doc-import.xpm delete mode 100644 app/bin/bitmaps/doc-new.xpm delete mode 100644 app/bin/bitmaps/doc-open.xpm delete mode 100644 app/bin/bitmaps/doc-print.xpm delete mode 100644 app/bin/bitmaps/doc-revert.xpm delete mode 100644 app/bin/bitmaps/doc-save-as.xpm delete mode 100644 app/bin/bitmaps/doc-save.xpm delete mode 100644 app/bin/bitmaps/doc-setup.xpm delete mode 100644 app/bin/bitmaps/down.xpm delete mode 100644 app/bin/bitmaps/ease-broad.xpm delete mode 100644 app/bin/bitmaps/ease-cornu.xpm delete mode 100644 app/bin/bitmaps/ease-gt-broad.xpm delete mode 100644 app/bin/bitmaps/ease-gt-sharp.xpm delete mode 100644 app/bin/bitmaps/ease-lt-broad.xpm delete mode 100644 app/bin/bitmaps/ease-lt-sharp.xpm delete mode 100644 app/bin/bitmaps/ease-none.xpm delete mode 100644 app/bin/bitmaps/ease-normal.xpm delete mode 100644 app/bin/bitmaps/ease-sharp.xpm delete mode 100644 app/bin/bitmaps/elevation.xpm delete mode 100644 app/bin/bitmaps/exit.xpm delete mode 100644 app/bin/bitmaps/extend.xpm delete mode 100644 app/bin/bitmaps/filled-box.xpm delete mode 100644 app/bin/bitmaps/filled-polygon.xpm delete mode 100644 app/bin/bitmaps/go.xpm delete mode 100644 app/bin/bitmaps/helix.xpm delete mode 100644 app/bin/bitmaps/join-line.xpm delete mode 100644 app/bin/bitmaps/join.xpm delete mode 100644 app/bin/bitmaps/l1.xbm delete mode 100644 app/bin/bitmaps/l10.xbm delete mode 100644 app/bin/bitmaps/l11.xbm delete mode 100644 app/bin/bitmaps/l12.xbm delete mode 100644 app/bin/bitmaps/l13.xbm delete mode 100644 app/bin/bitmaps/l14.xbm delete mode 100644 app/bin/bitmaps/l15.xbm delete mode 100644 app/bin/bitmaps/l16.xbm delete mode 100644 app/bin/bitmaps/l17.xbm delete mode 100644 app/bin/bitmaps/l18.xbm delete mode 100644 app/bin/bitmaps/l19.xbm delete mode 100644 app/bin/bitmaps/l2.xbm delete mode 100644 app/bin/bitmaps/l20.xbm delete mode 100644 app/bin/bitmaps/l21.xbm delete mode 100644 app/bin/bitmaps/l22.xbm delete mode 100644 app/bin/bitmaps/l23.xbm delete mode 100644 app/bin/bitmaps/l24.xbm delete mode 100644 app/bin/bitmaps/l25.xbm delete mode 100644 app/bin/bitmaps/l26.xbm delete mode 100644 app/bin/bitmaps/l27.xbm delete mode 100644 app/bin/bitmaps/l28.xbm delete mode 100644 app/bin/bitmaps/l29.xbm delete mode 100644 app/bin/bitmaps/l3.xbm delete mode 100644 app/bin/bitmaps/l30.xbm delete mode 100644 app/bin/bitmaps/l31.xbm delete mode 100644 app/bin/bitmaps/l32.xbm delete mode 100644 app/bin/bitmaps/l33.xbm delete mode 100644 app/bin/bitmaps/l34.xbm delete mode 100644 app/bin/bitmaps/l35.xbm delete mode 100644 app/bin/bitmaps/l36.xbm delete mode 100644 app/bin/bitmaps/l37.xbm delete mode 100644 app/bin/bitmaps/l38.xbm delete mode 100644 app/bin/bitmaps/l39.xbm delete mode 100644 app/bin/bitmaps/l4.xbm delete mode 100644 app/bin/bitmaps/l40.xbm delete mode 100644 app/bin/bitmaps/l41.xbm delete mode 100644 app/bin/bitmaps/l42.xbm delete mode 100644 app/bin/bitmaps/l43.xbm delete mode 100644 app/bin/bitmaps/l44.xbm delete mode 100644 app/bin/bitmaps/l45.xbm delete mode 100644 app/bin/bitmaps/l46.xbm delete mode 100644 app/bin/bitmaps/l47.xbm delete mode 100644 app/bin/bitmaps/l48.xbm delete mode 100644 app/bin/bitmaps/l49.xbm delete mode 100644 app/bin/bitmaps/l5.xbm delete mode 100644 app/bin/bitmaps/l50.xbm delete mode 100644 app/bin/bitmaps/l51.xbm delete mode 100644 app/bin/bitmaps/l52.xbm delete mode 100644 app/bin/bitmaps/l53.xbm delete mode 100644 app/bin/bitmaps/l54.xbm delete mode 100644 app/bin/bitmaps/l55.xbm delete mode 100644 app/bin/bitmaps/l56.xbm delete mode 100644 app/bin/bitmaps/l57.xbm delete mode 100644 app/bin/bitmaps/l58.xbm delete mode 100644 app/bin/bitmaps/l59.xbm delete mode 100644 app/bin/bitmaps/l6.xbm delete mode 100644 app/bin/bitmaps/l60.xbm delete mode 100644 app/bin/bitmaps/l61.xbm delete mode 100644 app/bin/bitmaps/l62.xbm delete mode 100644 app/bin/bitmaps/l63.xbm delete mode 100644 app/bin/bitmaps/l64.xbm delete mode 100644 app/bin/bitmaps/l65.xbm delete mode 100644 app/bin/bitmaps/l66.xbm delete mode 100644 app/bin/bitmaps/l67.xbm delete mode 100644 app/bin/bitmaps/l68.xbm delete mode 100644 app/bin/bitmaps/l69.xbm delete mode 100644 app/bin/bitmaps/l7.xbm delete mode 100644 app/bin/bitmaps/l70.xbm delete mode 100644 app/bin/bitmaps/l71.xbm delete mode 100644 app/bin/bitmaps/l72.xbm delete mode 100644 app/bin/bitmaps/l73.xbm delete mode 100644 app/bin/bitmaps/l74.xbm delete mode 100644 app/bin/bitmaps/l75.xbm delete mode 100644 app/bin/bitmaps/l76.xbm delete mode 100644 app/bin/bitmaps/l77.xbm delete mode 100644 app/bin/bitmaps/l78.xbm delete mode 100644 app/bin/bitmaps/l79.xbm delete mode 100644 app/bin/bitmaps/l8.xbm delete mode 100644 app/bin/bitmaps/l80.xbm delete mode 100644 app/bin/bitmaps/l81.xbm delete mode 100644 app/bin/bitmaps/l82.xbm delete mode 100644 app/bin/bitmaps/l83.xbm delete mode 100644 app/bin/bitmaps/l84.xbm delete mode 100644 app/bin/bitmaps/l85.xbm delete mode 100644 app/bin/bitmaps/l86.xbm delete mode 100644 app/bin/bitmaps/l87.xbm delete mode 100644 app/bin/bitmaps/l88.xbm delete mode 100644 app/bin/bitmaps/l89.xbm delete mode 100644 app/bin/bitmaps/l9.xbm delete mode 100644 app/bin/bitmaps/l90.xbm delete mode 100644 app/bin/bitmaps/l91.xbm delete mode 100644 app/bin/bitmaps/l92.xbm delete mode 100644 app/bin/bitmaps/l93.xbm delete mode 100644 app/bin/bitmaps/l94.xbm delete mode 100644 app/bin/bitmaps/l95.xbm delete mode 100644 app/bin/bitmaps/l96.xbm delete mode 100644 app/bin/bitmaps/l97.xbm delete mode 100644 app/bin/bitmaps/l98.xbm delete mode 100644 app/bin/bitmaps/l99.xbm create mode 100644 app/bin/bitmaps/layer_num.inc delete mode 100644 app/bin/bitmaps/layers.xpm create mode 100644 app/bin/bitmaps/loosen.xpm delete mode 100644 app/bin/bitmaps/magnet.xpm delete mode 100644 app/bin/bitmaps/manage.xpm delete mode 100644 app/bin/bitmaps/map.xpm delete mode 100644 app/bin/bitmaps/move.xpm delete mode 100644 app/bin/bitmaps/new-car.xpm delete mode 100644 app/bin/bitmaps/ok.xpm delete mode 100644 app/bin/bitmaps/pan-zoom.xpm delete mode 100644 app/bin/bitmaps/parallel-line.xpm delete mode 100644 app/bin/bitmaps/parallel.xpm delete mode 100644 app/bin/bitmaps/parameter.xpm delete mode 100644 app/bin/bitmaps/paste.xpm create mode 100644 app/bin/bitmaps/png/circle-center16.png create mode 100644 app/bin/bitmaps/png/circle-tangent16.png create mode 100644 app/bin/bitmaps/png/circle16.png create mode 100644 app/bin/bitmaps/png/curved-chord16.png create mode 100644 app/bin/bitmaps/png/curved-end16.png create mode 100644 app/bin/bitmaps/png/curved-middle16.png create mode 100644 app/bin/bitmaps/png/curved-tangent16.png create mode 100644 app/bin/bitmaps/png/description16.png create mode 100644 app/bin/bitmaps/png/description24.png create mode 100644 app/bin/bitmaps/png/down16.png create mode 100644 app/bin/bitmaps/png/down24.png create mode 100644 app/bin/bitmaps/png/ease-broad16.png create mode 100644 app/bin/bitmaps/png/ease-broad24.png create mode 100644 app/bin/bitmaps/png/ease-broad32.png create mode 100644 app/bin/bitmaps/png/ease-cornu16.png create mode 100644 app/bin/bitmaps/png/ease-cornu24.png create mode 100644 app/bin/bitmaps/png/ease-cornu32.png create mode 100644 app/bin/bitmaps/png/ease-gt-broad16.png create mode 100644 app/bin/bitmaps/png/ease-gt-broad24.png create mode 100644 app/bin/bitmaps/png/ease-gt-broad32.png create mode 100644 app/bin/bitmaps/png/ease-gt-sharp16.png create mode 100644 app/bin/bitmaps/png/ease-gt-sharp24.png create mode 100644 app/bin/bitmaps/png/ease-gt-sharp32.png create mode 100644 app/bin/bitmaps/png/ease-lt-broad16.png create mode 100644 app/bin/bitmaps/png/ease-lt-broad24.png create mode 100644 app/bin/bitmaps/png/ease-lt-broad32.png create mode 100644 app/bin/bitmaps/png/ease-lt-sharp16.png create mode 100644 app/bin/bitmaps/png/ease-lt-sharp24.png create mode 100644 app/bin/bitmaps/png/ease-lt-sharp32.png create mode 100644 app/bin/bitmaps/png/ease-none16.png create mode 100644 app/bin/bitmaps/png/ease-none24.png create mode 100644 app/bin/bitmaps/png/ease-none32.png create mode 100644 app/bin/bitmaps/png/ease-normal16.png create mode 100644 app/bin/bitmaps/png/ease-normal24.png create mode 100644 app/bin/bitmaps/png/ease-normal32.png create mode 100644 app/bin/bitmaps/png/ease-sharp16.png create mode 100644 app/bin/bitmaps/png/ease-sharp24.png create mode 100644 app/bin/bitmaps/png/ease-sharp32.png create mode 100644 app/bin/bitmaps/png/elevation16.png create mode 100644 app/bin/bitmaps/png/exit16.png create mode 100644 app/bin/bitmaps/png/exit24.png create mode 100644 app/bin/bitmaps/png/extend16.png create mode 100644 app/bin/bitmaps/png/palette.png create mode 100644 app/bin/bitmaps/png/pan-zoom16.png create mode 100644 app/bin/bitmaps/png/pan-zoom24.png create mode 100644 app/bin/bitmaps/png/ruler16.png create mode 100644 app/bin/bitmaps/png/select16.png create mode 100644 app/bin/bitmaps/png/snap-curs16.png create mode 100644 app/bin/bitmaps/png/snap-curs24.png create mode 100644 app/bin/bitmaps/png/snap-grid16.png create mode 100644 app/bin/bitmaps/png/snap-grid24.png create mode 100644 app/bin/bitmaps/png/straight16.png create mode 100644 app/bin/bitmaps/png/turntable16.png delete mode 100644 app/bin/bitmaps/polygon.xpm delete mode 100644 app/bin/bitmaps/polyline.xpm delete mode 100644 app/bin/bitmaps/profile.xpm delete mode 100644 app/bin/bitmaps/protractor.xpm delete mode 100644 app/bin/bitmaps/redo.xpm delete mode 100644 app/bin/bitmaps/reflect.xpm delete mode 100644 app/bin/bitmaps/rotate.xpm delete mode 100644 app/bin/bitmaps/ruler.xpm delete mode 100644 app/bin/bitmaps/select.xpm delete mode 100644 app/bin/bitmaps/sensor.xpm delete mode 100644 app/bin/bitmaps/signal.xpm delete mode 100644 app/bin/bitmaps/snap-curs.xpm delete mode 100644 app/bin/bitmaps/snap-grid.xpm delete mode 100644 app/bin/bitmaps/split-draw.xpm delete mode 100644 app/bin/bitmaps/split.xpm delete mode 100644 app/bin/bitmaps/sticky-doc.xpm delete mode 100644 app/bin/bitmaps/sticky-link.xpm delete mode 100644 app/bin/bitmaps/sticky-note.xpm delete mode 100644 app/bin/bitmaps/stop.xpm delete mode 100644 app/bin/bitmaps/straight-line.xpm delete mode 100644 app/bin/bitmaps/straight.xpm create mode 100644 app/bin/bitmaps/svg/background.svg create mode 100644 app/bin/bitmaps/svg/benchwork.svg create mode 100644 app/bin/bitmaps/svg/bezier-line.svg create mode 100644 app/bin/bitmaps/svg/bezier-track.svg create mode 100755 app/bin/bitmaps/svg/block.svg create mode 100755 app/bin/bitmaps/svg/blockdel.svg create mode 100755 app/bin/bitmaps/svg/blockedit.svg create mode 100755 app/bin/bitmaps/svg/blocknew.svg create mode 100644 app/bin/bitmaps/svg/bottom.svg create mode 100644 app/bin/bitmaps/svg/box.svg create mode 100644 app/bin/bitmaps/svg/bridge.svg create mode 100644 app/bin/bitmaps/svg/building.svg create mode 100644 app/bin/bitmaps/svg/car-inventory.svg create mode 100644 app/bin/bitmaps/svg/change-grid.svg create mode 100644 app/bin/bitmaps/svg/circle-center.svg create mode 100644 app/bin/bitmaps/svg/circle-filled-center.svg create mode 100644 app/bin/bitmaps/svg/circle-filled-tangent.svg create mode 100644 app/bin/bitmaps/svg/circle-line-center.svg create mode 100644 app/bin/bitmaps/svg/circle-line-tangent.svg create mode 100644 app/bin/bitmaps/svg/circle-line.svg create mode 100644 app/bin/bitmaps/svg/circle-tangent.svg create mode 100644 app/bin/bitmaps/svg/circle.svg create mode 100644 app/bin/bitmaps/svg/clone.svg create mode 100644 app/bin/bitmaps/svg/connect.svg create mode 100644 app/bin/bitmaps/svg/control.svg create mode 100644 app/bin/bitmaps/svg/convert-from.svg create mode 100644 app/bin/bitmaps/svg/convert-to.svg create mode 100644 app/bin/bitmaps/svg/copy.svg create mode 100644 app/bin/bitmaps/svg/cornu.svg create mode 100644 app/bin/bitmaps/svg/curved-chord.svg create mode 100644 app/bin/bitmaps/svg/curved-end.svg create mode 100644 app/bin/bitmaps/svg/curved-line-chord.svg create mode 100644 app/bin/bitmaps/svg/curved-line-end.svg create mode 100644 app/bin/bitmaps/svg/curved-line-middle.svg create mode 100644 app/bin/bitmaps/svg/curved-line-tangent.svg create mode 100644 app/bin/bitmaps/svg/curved-middle.svg create mode 100644 app/bin/bitmaps/svg/curved-tangent.svg create mode 100644 app/bin/bitmaps/svg/cut.svg create mode 100644 app/bin/bitmaps/svg/delete.svg create mode 100644 app/bin/bitmaps/svg/describe.svg create mode 100644 app/bin/bitmaps/svg/description.svg create mode 100644 app/bin/bitmaps/svg/dimension.svg create mode 100644 app/bin/bitmaps/svg/doc-export-bmap.svg create mode 100644 app/bin/bitmaps/svg/doc-export-dxf.svg create mode 100644 app/bin/bitmaps/svg/doc-export-svg.svg create mode 100644 app/bin/bitmaps/svg/doc-export.svg create mode 100644 app/bin/bitmaps/svg/doc-import-mod.svg create mode 100644 app/bin/bitmaps/svg/doc-import.svg create mode 100644 app/bin/bitmaps/svg/doc-new.svg create mode 100644 app/bin/bitmaps/svg/doc-open.svg create mode 100644 app/bin/bitmaps/svg/doc-print.svg create mode 100644 app/bin/bitmaps/svg/doc-recent.svg create mode 100644 app/bin/bitmaps/svg/doc-revert.svg create mode 100644 app/bin/bitmaps/svg/doc-save-as.svg create mode 100644 app/bin/bitmaps/svg/doc-save.svg create mode 100644 app/bin/bitmaps/svg/doc-setup.svg create mode 100644 app/bin/bitmaps/svg/down.svg create mode 100644 app/bin/bitmaps/svg/elevation.svg create mode 100644 app/bin/bitmaps/svg/exit.svg create mode 100644 app/bin/bitmaps/svg/extend.svg create mode 100644 app/bin/bitmaps/svg/filled-box.svg create mode 100644 app/bin/bitmaps/svg/filled-polygon.svg create mode 100644 app/bin/bitmaps/svg/go.svg create mode 100644 app/bin/bitmaps/svg/grid.svg create mode 100644 app/bin/bitmaps/svg/helix.svg create mode 100644 app/bin/bitmaps/svg/info.svg create mode 100644 app/bin/bitmaps/svg/join-line.svg create mode 100644 app/bin/bitmaps/svg/join.svg create mode 100644 app/bin/bitmaps/svg/layers.svg create mode 100644 app/bin/bitmaps/svg/loosen.svg create mode 100644 app/bin/bitmaps/svg/magnet.svg create mode 100644 app/bin/bitmaps/svg/manage.svg create mode 100644 app/bin/bitmaps/svg/map.svg create mode 100644 app/bin/bitmaps/svg/move.svg create mode 100644 app/bin/bitmaps/svg/new-car.svg create mode 100644 app/bin/bitmaps/svg/ok.svg create mode 100644 app/bin/bitmaps/svg/pan-zoom.svg create mode 100644 app/bin/bitmaps/svg/parallel-line.svg create mode 100644 app/bin/bitmaps/svg/parallel.svg create mode 100644 app/bin/bitmaps/svg/parameter.svg create mode 100644 app/bin/bitmaps/svg/paste.svg create mode 100644 app/bin/bitmaps/svg/polygon.svg create mode 100644 app/bin/bitmaps/svg/polyline.svg create mode 100644 app/bin/bitmaps/svg/profile.svg create mode 100644 app/bin/bitmaps/svg/protractor.svg create mode 100644 app/bin/bitmaps/svg/redo.svg create mode 100644 app/bin/bitmaps/svg/reflect.svg create mode 100644 app/bin/bitmaps/svg/roadbed.svg create mode 100644 app/bin/bitmaps/svg/rotate.svg create mode 100644 app/bin/bitmaps/svg/ruler.svg create mode 100644 app/bin/bitmaps/svg/select.svg create mode 100644 app/bin/bitmaps/svg/sensor.svg create mode 100644 app/bin/bitmaps/svg/signal.svg create mode 100644 app/bin/bitmaps/svg/snap-curs.svg create mode 100644 app/bin/bitmaps/svg/snap-grid.svg create mode 100644 app/bin/bitmaps/svg/split-draw.svg create mode 100644 app/bin/bitmaps/svg/split.svg create mode 100644 app/bin/bitmaps/svg/star.svg create mode 100644 app/bin/bitmaps/svg/sticky-doc.svg create mode 100644 app/bin/bitmaps/svg/sticky-link.svg create mode 100644 app/bin/bitmaps/svg/sticky-note.svg create mode 100644 app/bin/bitmaps/svg/stop.svg create mode 100644 app/bin/bitmaps/svg/straight-line.svg create mode 100644 app/bin/bitmaps/svg/straight.svg create mode 100644 app/bin/bitmaps/svg/switch-motor.svg create mode 100644 app/bin/bitmaps/svg/switchm.svg create mode 100644 app/bin/bitmaps/svg/switchmdel.svg create mode 100644 app/bin/bitmaps/svg/switchmedit.svg create mode 100644 app/bin/bitmaps/svg/switchmnew.svg create mode 100644 app/bin/bitmaps/svg/table-edge.svg create mode 100644 app/bin/bitmaps/svg/text.svg create mode 100644 app/bin/bitmaps/svg/ties.svg create mode 100644 app/bin/bitmaps/svg/tipofday.svg create mode 100644 app/bin/bitmaps/svg/top.svg create mode 100644 app/bin/bitmaps/svg/train.svg create mode 100644 app/bin/bitmaps/svg/trim.svg create mode 100644 app/bin/bitmaps/svg/tunnel.svg create mode 100644 app/bin/bitmaps/svg/turnout-design.svg create mode 100644 app/bin/bitmaps/svg/turnout.svg create mode 100644 app/bin/bitmaps/svg/turntable.svg create mode 100644 app/bin/bitmaps/svg/undo.svg create mode 100644 app/bin/bitmaps/svg/zoom-choose.svg create mode 100644 app/bin/bitmaps/svg/zoom-extent.svg create mode 100644 app/bin/bitmaps/svg/zoom-in.svg create mode 100644 app/bin/bitmaps/svg/zoom-out.svg delete mode 100644 app/bin/bitmaps/switch-ai.xpm delete mode 100644 app/bin/bitmaps/switchm.xpm delete mode 100644 app/bin/bitmaps/table-edge.xpm delete mode 100644 app/bin/bitmaps/text.xpm delete mode 100644 app/bin/bitmaps/top.xpm delete mode 100644 app/bin/bitmaps/train.xpm delete mode 100644 app/bin/bitmaps/trim.xpm delete mode 100644 app/bin/bitmaps/tunnel.xpm delete mode 100644 app/bin/bitmaps/turnout-designer.xpm delete mode 100644 app/bin/bitmaps/turnout.xpm delete mode 100644 app/bin/bitmaps/turntable.xpm delete mode 100644 app/bin/bitmaps/undo.xpm delete mode 100644 app/bin/bitmaps/zoom-choose.xpm delete mode 100644 app/bin/bitmaps/zoom-extent.xpm delete mode 100644 app/bin/bitmaps/zoom-in.xpm delete mode 100644 app/bin/bitmaps/zoom-out.xpm delete mode 100755 app/bin/cJSON.c delete mode 100755 app/bin/cJSON.h delete mode 100644 app/bin/cmisc2.c create mode 100644 app/bin/command.c create mode 100644 app/bin/command.h create mode 100644 app/bin/ctie.c create mode 100644 app/bin/dlayer.h create mode 100644 app/bin/include/problemrep.h create mode 100644 app/bin/menu.c create mode 100644 app/bin/menu.h delete mode 100644 app/bin/misc2.c delete mode 100644 app/bin/misc2.h create mode 100644 app/bin/problemrep.c create mode 100644 app/bin/problemrepui.c create mode 100644 app/bin/scale.c create mode 100644 app/bin/scale.h create mode 100644 app/bin/trkendpt.c create mode 100644 app/bin/trkendpt.h create mode 100644 app/bin/trkendptx.h create mode 100644 app/bin/trkseg.h create mode 100644 app/bin/turnout.c create mode 100644 app/cJSON/CMakeLists.txt create mode 100644 app/cJSON/LICENSE create mode 100644 app/cJSON/cJSON.c create mode 100644 app/cJSON/cJSON.h create mode 100644 app/doc/clean-html.cmake delete mode 100644 app/doc/clean-html.cmake.in create mode 100755 app/doc/mk-xtrkcad-manual-html create mode 100644 app/doc/png.d/bbridge.png create mode 100644 app/doc/png.d/bcurvelin.png create mode 100644 app/doc/png.d/bdrawsplit.png create mode 100644 app/doc/png.d/bexport.png create mode 100644 app/doc/png.d/bexportbmap.png create mode 100644 app/doc/png.d/bexportdxf.png create mode 100644 app/doc/png.d/bexportsvg.png create mode 100644 app/doc/png.d/bimport.png create mode 100644 app/doc/png.d/bimportmod.png create mode 100644 app/doc/png.d/bitmap.png.orig create mode 100644 app/doc/png.d/bparam.png create mode 100644 app/doc/png.d/bprint.png create mode 100644 app/doc/png.d/brevert.png create mode 100644 app/doc/png.d/broadbed.png create mode 100644 app/doc/png.d/bsaveas.png create mode 100644 app/doc/png.d/bsetup.png create mode 100644 app/doc/png.d/bties.png create mode 100644 app/doc/png.d/dcircle1.png create mode 100644 app/doc/png.d/dentermove.png delete mode 100644 app/doc/png.d/dlayer.png create mode 100644 app/doc/png.d/dpolylin.png create mode 100644 app/doc/png.d/exportfilesvg.png delete mode 100644 app/doc/png.d/iconlink.PNG create mode 100644 app/doc/png.d/iconlink.png create mode 100644 app/doc/png.d/importmod.png create mode 100644 app/doc/png.d/mentermove.png create mode 100644 app/doc/png.d/problemdata.png create mode 100644 app/doc/xtrkcad-manual-5.3.0.html delete mode 100644 app/help/cJSON.c delete mode 100644 app/help/cJSON.h delete mode 100644 app/lib/demos/CMakeLists.txt delete mode 100644 app/lib/examples/CMakeLists.txt create mode 100644 app/lib/examples/G Scale Folded Dogbone.xtc create mode 100644 app/lib/examples/Mianne Benchwork.xtc create mode 100644 app/lib/examples/Ondaville Franklin and Carolina RR.xtc create mode 100644 app/lib/examples/PrinterMarginTest-A4.xtc create mode 100644 app/lib/examples/PrinterMarginTest-Letter.xtc create mode 100644 app/lib/params/1-mrkln.xtp create mode 100644 app/lib/params/Any-DCC-Concepts Point Motors.xtp create mode 100644 app/lib/params/Any-ModelRailroadBenchwork.xtp create mode 100644 app/lib/params/Any-Sievers-Benchwork.xtp create mode 100644 app/lib/params/G-Bachmann.xtp create mode 100644 app/lib/params/G-Lionel Ready-To-Play Track.xtp create mode 100644 app/lib/params/HO - Atlas Custom Line Track Assemblies.xtp create mode 100644 app/lib/params/HO-Atlas Code 100 Track.xtp create mode 100644 app/lib/params/HO-AtlasTrainKidsTrk.xtp create mode 100644 app/lib/params/HO-Busch.xtp create mode 100644 app/lib/params/HO-ITLA Modular Building System.xtp create mode 100644 app/lib/params/HO-Jouef(Hornby)HO.xtp create mode 100644 app/lib/params/HO-Lionel MagLock FasTrack.xtp create mode 100644 app/lib/params/HO-Peco-Code70USA.xtp delete mode 100644 app/lib/params/HO-Peco70USA.xtp delete mode 100644 app/lib/params/HO-WalthCornerstone 1.xtp create mode 100644 app/lib/params/HO-Walthers Cornerstone 1.xtp create mode 100644 app/lib/params/HO-Walthers DCC Code 70.xtp create mode 100644 app/lib/params/HO-Walthers-Power-Loc.xtp delete mode 100644 app/lib/params/HO-atl100ho.xtp create mode 100644 app/lib/params/HO-fl-model.xtp create mode 100644 app/lib/params/HO-fl-profi.xtp delete mode 100644 app/lib/params/JouefHO.xtp create mode 100644 app/lib/params/Mianne-Bench.xtp create mode 100644 app/lib/params/N-Design Preservation Models Modular Custom Structures.xtp create mode 100644 app/lib/params/N-ITLA Modular Building System.xtp create mode 100644 app/lib/params/N-MiniTrix Code 60 Concrete Tie Track.xtp create mode 100644 app/lib/params/N-ModellbahnUnion.xtp create mode 100644 app/lib/params/N-StreetTemplate2LaneCurves.xtp create mode 100644 app/lib/params/N-StreetTemplate2LaneIntersections.xtp create mode 100644 app/lib/params/N-StreetTemplate2LaneStraight.xtp delete mode 100644 app/lib/params/N-walth-n.xtp create mode 100644 app/lib/params/N-walthers-n.xtp create mode 100644 app/lib/params/NTrak.xtp create mode 100644 app/lib/params/O-LionelFasTrack.xtp create mode 100644 app/lib/params/O-Peco-Bullhead.xtp create mode 100644 app/lib/params/O-Peco-Code 124 Setrack.xtp create mode 100644 app/lib/params/O-Peco-Code 143 FlatBottom.xtp create mode 100644 app/lib/params/OO-DCC Concepts Legacy Realistic Track.xtp create mode 100644 app/lib/params/OO-HornbyOO.xtp create mode 100644 app/lib/params/OO-HornbyPlayTrainsTrk.xtp create mode 100644 app/lib/params/OO-Peco-Code75Bullhead.xtp create mode 100644 app/lib/params/S_ACG_All Aboard Panels.xtp create mode 100644 app/lib/params/S_ACG_American Flyer Track.xtp create mode 100644 app/lib/params/S_ACG_Pike-Master Track.xtp create mode 100644 app/lib/params/Sn3-Fast Tracks.xtp create mode 100644 app/lib/params/TT-Hornby.xtp create mode 100644 app/lib/params/TT-ModellbahnUnion.xtp create mode 100644 app/lib/params/TT-Peco.xtp create mode 100644 app/lib/params/TT-Roco.xtp create mode 100644 app/lib/params/Z-Micro-Trains.xtp delete mode 100644 app/lib/params/atlaso2rail.xtp delete mode 100644 app/lib/params/fl-model.xtp delete mode 100644 app/lib/params/fl-profi.xtp delete mode 100644 app/lib/params/mrkln1.xtp delete mode 100644 app/lib/params/mtl-z.xtp delete mode 100644 app/lib/params/peco-O-Bullhead.xtp create mode 100644 app/lib/xtrkcad-beta.desktop create mode 100644 app/tools/TurnoutDesigner.xtr create mode 100644 app/tools/lib/linux/libzip.a create mode 100644 app/tools/pngtoxpm/CMakeLists.txt create mode 100644 app/tools/pngtoxpm/pngtoxpm.c create mode 100644 app/wlib/gtklib/sysinfo.c create mode 100644 app/wlib/include/CMakeLists.txt create mode 100644 app/wlib/include/getline.h create mode 100644 app/wlib/mswlib/getline/LICENSE create mode 100644 app/wlib/mswlib/getline/README.md create mode 100644 app/wlib/mswlib/getline/getline.c create mode 100644 app/wlib/mswlib/sysinfo.c create mode 100644 distribution/fedora/README create mode 100644 distribution/fedora/xtrkcad-5.2.2GA-xtrkcad.desktop.patch create mode 100644 docs/DevGuide.docx diff --git a/.hgignore b/.hgignore index 1fb243c..45b3ed7 100644 --- a/.hgignore +++ b/.hgignore @@ -5,3 +5,5 @@ build/ syntax: glob *.mo +.vscode/launch.json +.vscode/c_cpp_properties.json diff --git a/.hgtags b/.hgtags index aeb580a..17f8df6 100644 --- a/.hgtags +++ b/.hgtags @@ -118,3 +118,18 @@ a926b2fbe2a62877ec90bb0ba7b6e96beac82438 V5.2.2 Beta 2 78067f56454632058cc12bed22f4ff8e8a204244 V5.2.2 Beta3 35b056b43144129e0aec461403999682dea5d285 V5.2.2 Beta3 3bc84c7f38d15bd1ff0579723c42b09d2c58840b V5.2.2 GA +cd2a3a174a69a50a74c19c8b4b69e3159bd3fba0 V5.3.0 Beta1 +cd2a3a174a69a50a74c19c8b4b69e3159bd3fba0 V5.3.0 Beta1 +0000000000000000000000000000000000000000 V5.3.0 Beta1 +0000000000000000000000000000000000000000 V5.3.0 Beta1 +5248ba8ae4e9d24e6b10569e973cc3ab1c9095f7 V5.3.0 Beta1 +5248ba8ae4e9d24e6b10569e973cc3ab1c9095f7 V5.3.0 Beta1 +c5ffaa4aece14cdff6f965f42010a48d7c6fb7ae V5.3.0 Beta1 +d2bceede7986a46839b67ca759319c924301dcc5 V5.3.0 Beta2 +a1bc40ece644d314131042b40427b7796887e785 V5.3.0 +a1bc40ece644d314131042b40427b7796887e785 GA +dd46dfec7ede6206463bdaf03a2a8c953460fcba V5.3.0 GA +a1bc40ece644d314131042b40427b7796887e785 V5.3.0 +0000000000000000000000000000000000000000 V5.3.0 +a1bc40ece644d314131042b40427b7796887e785 GA +0000000000000000000000000000000000000000 GA diff --git a/.hgtags.orig b/.hgtags.orig deleted file mode 100644 index 3b50af4..0000000 --- a/.hgtags.orig +++ /dev/null @@ -1,116 +0,0 @@ -94c2cf3d9771e319277a8d56c36be25957648f56 Release_4_0_3a -882f15968b0abf4df60bf040e77f60286aac3bf4 Release_4_2_0beta1 -c07643cf9248a12e61cfbbfdc0ea443a8669d008 Release_4_2_0 -25dab80e5244b867c018381f34656ffba91d0e34 Release_4_2_1 -8485a3d22fbf500ddff7738cc263d884b8b2af0b Release_4_2_2 -5603bb19687491e39078eda424929d194909c48d Release_4_2_3 -3397423bf220a4dccdd4deb4c83faccad86e4bd2 Release_4_2_3a -66aa9bf23b5beb89aa2590200e5de382b0fd3796 Release_4_2_3b -66aa9bf23b5beb89aa2590200e5de382b0fd3796 Release_4_2_3b -0000000000000000000000000000000000000000 Release_4_2_3b -0000000000000000000000000000000000000000 Release_4_2_3b -66aa9bf23b5beb89aa2590200e5de382b0fd3796 Release_4_2_3b -19e42ff003fdf435c256041bb27c0a211917ee1e Release_4_2_4 -c0c1c81628cd366a1eb8f7ba081d06ea2688cdc5 Release_4_2_4a -c0c1c81628cd366a1eb8f7ba081d06ea2688cdc5 Release_4_2_4a -73cf3917555f849308dfe3fe16a4efc647fe841e Release_4_2_4a -73cf3917555f849308dfe3fe16a4efc647fe841e Release_4_2_4a -b6314f08196d771538a560bb91f6b5193c8a8521 Release_4_2_4a -753a8c625e8ec767fc39f88cb2d0cc0e82f95406 Release_4_3_beta1 -f933e0890de0b04e49d9711e8a77dc70d44604e4 Release_4_3_beta2 -f933e0890de0b04e49d9711e8a77dc70d44604e4 Release_4_3_beta2 -0000000000000000000000000000000000000000 Release_4_3_beta2 -0000000000000000000000000000000000000000 Release_4_3_beta2 -a007fdefb63a50a72fd95af90fb587ca2e6c12d0 Release_4_3_beta2 -38a5202a3ab8249a18974c65a23d16cc55a69bf1 Release_4_3_0 -38a5202a3ab8249a18974c65a23d16cc55a69bf1 Release_4_3_0 -0873300a21fbc1d30b34906150a78a35bc5d40f7 Release_4_3_0 -ec3abbb4643e1c65edb47f7350de7ca3e3982a19 Release_4_4_0beta1 -b2b1e44a7fa86bd5889c7ba712203b78b351db8e Release_4_4_0_beta2 -3fdc2079f872e33957c9d79931a75449173921a3 Release_5_0_0beta3 -0442cf435f6f48e9e965f4a5a3394af779ddded4 Release_5_0_0beta4 -1baa674535fd6b17e308473754ca46f3f4f3b891 Release_5_0_0beta5 -46cae9394dd578414f9024cae92fc61e0917acea Release_5_1_0beta -22542aade3e14343abbe3ef0051bb352a12e67e4 Release_5_1_0 -22542aade3e14343abbe3ef0051bb352a12e67e4 Release_5_1_0 -43883c4baad01bc21c3adf3026d809b862c8deb7 Release_5_1_0 -ff3eb7eadadae951cb63fe770ca51cf89ec3d53d Release_5_1_0 -17fd7114b39b9fc396190840293038e6f8da9e94 Release_5_1_0 -17fd7114b39b9fc396190840293038e6f8da9e94 Release_5_1_0 -14093504c8c0525a20f92ae18610b03ecfed389c Release_5_1_0 -14093504c8c0525a20f92ae18610b03ecfed389c Release_5_1_0 -0000000000000000000000000000000000000000 Release_5_1_0 -0000000000000000000000000000000000000000 Release_5_1_0 -095ec69a4d185c0c47d7e6bd8393774a597b26a7 Release_5_1_0 -0bf03c3b7d1ef02e4c4a3c32549187ef5636c7a8 Release_5_1_1 -e93612ade2a32f2ba0fe8fdcfb92e59c14265466 Release_5_1_2 -e93612ade2a32f2ba0fe8fdcfb92e59c14265466 Release_5_1_2 -4562e9b122b2b2e58ce9355a83b9cd23e17ed138 Release_5_1_2 -0000000000000000000000000000000000000000 Release_5_1_2a -41d5525d954622bedb12bc9eb9516e3d8848a9d6 Release_5_1_2a -fc632b33222d1cd00c15342fe2ce91466a27a2b4 V5.2 Beta 1.0 Release -2111ec67392603645062dff2b3b2c76ff9d6e1a7 V5.2 Beta 2.0 Release -2111ec67392603645062dff2b3b2c76ff9d6e1a7 V5.2 Beta 2.0 Release -7b4f25593473721116c49a4cd426482eb8cf1655 V5.2 Beta 2.0 Release -7b4f25593473721116c49a4cd426482eb8cf1655 V5.2 Beta 2.0 Release -a7fd6e03aa2680a5c958d103e13aa38ef5b0dde3 V5.2 Beta 2.0 Release -a7fd6e03aa2680a5c958d103e13aa38ef5b0dde3 V5.2 Beta 2.0 Release -f47114e7bba8af38f1a9228ff619ba88cee01709 V5.2 Beta 2.0 Release -f47114e7bba8af38f1a9228ff619ba88cee01709 V5.2 Beta 2.0 Release -f605edb2081daf4882dd8eb2d25b1830e4521400 V5.2 Beta 2.0 Release -f605edb2081daf4882dd8eb2d25b1830e4521400 V5.2 Beta 2.0 Release -3e5f9ebcc29acb009fd3a04950761bef568ee8bf V5.2 Beta 2.0 Release -3e5f9ebcc29acb009fd3a04950761bef568ee8bf V5.2 Beta 2.0 Release -a5a2221e59d57cb7227de4df566fb49643c4799b V5.2 Beta 2.0 Release -a5a2221e59d57cb7227de4df566fb49643c4799b V5.2 Beta 2.0 Release -1f1e18e8765d75150651a0cf33fadaf1050c8f16 V5.2 Beta 2.0 Release -1f1e18e8765d75150651a0cf33fadaf1050c8f16 V5.2 Beta 2.0 Release -4541599c0b238eb62d848c65f340bfa7059e8d4f V5.2 Beta 2.0 Release -2959e327915b2c1573da0bd817f9cc5a27f0e9d6 V5.2 Beta 2.1 Release -2959e327915b2c1573da0bd817f9cc5a27f0e9d6 V5.2 Beta 2.1 Release -19b72cf126d107f3f499d3bff0f231a6089b7115 V5.2 Beta 2.1 Release -19b72cf126d107f3f499d3bff0f231a6089b7115 V5.2 Beta 2.1 Release -a9688ed807416e3a239268e05f2a26940f96eea7 V5.2 Beta 2.1 Release -a9688ed807416e3a239268e05f2a26940f96eea7 V5.2 Beta 2.1 Release -33627b1df2f6f96acecb26f402c918dd4c9ff3e0 V5.2 Beta 2.1 Release -33627b1df2f6f96acecb26f402c918dd4c9ff3e0 V5.2 Beta 2.1 Release -f000c6c8133bfa2048d827390b29cb425b21d45e V5.2 Beta 2.1 Release -f000c6c8133bfa2048d827390b29cb425b21d45e V5.2 Beta 2.1 Release -db53b5963eabf8b1826bb5d81292c9b800b69594 V5.2 Beta 2.1 Release -1e8e89390a2f41daa5dc9150d21b7d25b57e25c6 V5.2 Beta 3.0 Release -1e8e89390a2f41daa5dc9150d21b7d25b57e25c6 V5.2 Beta 3.0 Release -635782edaba554c1799d022bffb1156141d97163 V5.2 Beta 3.0 Release -635782edaba554c1799d022bffb1156141d97163 V5.2 Beta 3.0 Release -3f76204dab88a44da829c6c73fa1738264a7a7ad V5.2 Beta 3.0 Release -3f76204dab88a44da829c6c73fa1738264a7a7ad V5.2 Beta 3.0 Release -9a2f95ba79f15a32b327504b6b24360133a23040 V5.2 Beta 3.0 Release -9a2f95ba79f15a32b327504b6b24360133a23040 V5.2 Beta 3.0 Release -a7b63a40ae8e627c3497ced304f188174ee99135 V5.2 Beta 3.0 Release -fa8f70e41ffeac9e1a4fd9b30357cd6507c5b12e V5.2.0 GA Release -fa8f70e41ffeac9e1a4fd9b30357cd6507c5b12e V5.2.0 GA Release -07573f2b2fa101cfc852219b3f74dcb5d7023f79 V5.2.0 GA Release -07573f2b2fa101cfc852219b3f74dcb5d7023f79 V5.2.0 GA Release -110d992c3ca0158de78d09a9396c79159b7eaf08 V5.2.0 GA Release -110d992c3ca0158de78d09a9396c79159b7eaf08 V5.2.0 GA Release -96f7e3255dc2644bf44deaaa9b85cd898bed18ae V5.2.0 GA Release -3337cc2abe22941114aeda2d9f2a1bd7ac65631e V5.2.1 GA Release -2a23c333fbbd6c7f52ece6a6de087bb97213c9b5 V5.2.1 GA Release -2a23c333fbbd6c7f52ece6a6de087bb97213c9b5 V5.2.1 GA Release -04e33df10082be61feab5158c0905f099cc7e4cc V5.2.1 GA Release -04e33df10082be61feab5158c0905f099cc7e4cc V5.2.1 GA Release -88a438984fc2c6e9a0ed054db2b4c4abfe86adde V5.2.1 GA Release -b247e6845a1c3306fc9dec7f607c02afc2e863c1 V5.2.1 Hotfix a Release -b247e6845a1c3306fc9dec7f607c02afc2e863c1 V5.2.1 Hotfix a Release -94ffe4a99fafda76eca76f83ffedd0274ce753b8 V5.2.1 Hotfix a Release -94ffe4a99fafda76eca76f83ffedd0274ce753b8 V5.2.1 Hotfix a Release -31686443927091c46337f73245750acb05d4e3bb V5.2.1 Hotfix a Release -9a6a869e90ef8d437674b2a0d50408f4cf9ef2b1 V5.2.2 Release Candidate -9a6a869e90ef8d437674b2a0d50408f4cf9ef2b1 V5.2.2 Release Candidate -21bddd7f1d353ea3115253cd6def90cf82f115cb V5.2.2 Release Candidate -21bddd7f1d353ea3115253cd6def90cf82f115cb V5.2.2 Beta 1 -ca04617d5211da2c79e4ec9952bb8b15255f9aab V5.2.2 Beta 2 -21bddd7f1d353ea3115253cd6def90cf82f115cb V5.2.2 Release Candidate -0000000000000000000000000000000000000000 V5.2.2 Release Candidate -ca04617d5211da2c79e4ec9952bb8b15255f9aab V5.2.2 Beta 2 -f7ca5abb27264e3bd2ea3743272e73de859fd8c0 V5.2.2 Beta 2 -a926b2fbe2a62877ec90bb0ba7b6e96beac82438 V5.2.2 Beta 2 diff --git a/CMake/CMakeDefaults.cmake b/CMake/CMakeDefaults.cmake new file mode 100644 index 0000000..4f143f8 --- /dev/null +++ b/CMake/CMakeDefaults.cmake @@ -0,0 +1,22 @@ +# Always include srcdir and builddir in include path +# This saves typing ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY} in +# about every subdir +# since cmake 2.4.0 +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +# Put the include dirs which are in the source or build tree +# before all other include dirs, so the headers in the sources +# are prefered over the already installed ones +# since cmake 2.4.1 +set(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON) + +# Use colored output +# since cmake 2.4.0 +set(CMAKE_COLOR_MAKEFILE ON) + +# Use folders to organize targets +set_property(GLOBAL PROPERTY USE_FOLDERS ON) + +# +# Print Installing but not Up-to-date messages +set(CMAKE_INSTALL_MESSAGE LAZY) diff --git a/CMake/FindCMocka.cmake b/CMake/FindCMocka.cmake index 6a5484e..79ebeb8 100644 --- a/CMake/FindCMocka.cmake +++ b/CMake/FindCMocka.cmake @@ -21,9 +21,8 @@ #============================================================================= # - -set (CMOCKA_ROOT_DIR - "../../external/x86/cmocka") +set(CMOCKA_ROOT_DIR + "$ENV{XTCEXTERNALROOT}/${XTRKCAD_ARCH_SUBDIR}/cmocka") find_path(CMOCKA_INCLUDE_DIR NAMES diff --git a/CMake/FindFreeImage.cmake b/CMake/FindFreeImage.cmake index b24f98d..58afdac 100644 --- a/CMake/FindFreeImage.cmake +++ b/CMake/FindFreeImage.cmake @@ -11,40 +11,21 @@ # XTrackCAD specific directory tree is assumed # -if (WIN32) +if(WIN32) # Folders for x86/x64 - if (WIN64) + set( FREEIMAGEBASEDIR "$ENV{XTCEXTERNALROOT}/${XTRKCAD_ARCH_SUBDIR}/FreeImage" ) find_path( FREEIMAGE_INCLUDE_PATH FreeImage.h - PATHS - $ENV{XTCEXTERNALROOT}/x64/FreeImage + PATHS ${FREEIMAGEBASEDIR} DOC "The directory where FreeImage.h resides") find_library( FREEIMAGE_LIBRARY NAMES FreeImage freeimage - PATHS - $ENV{XTCEXTERNALROOT}/x64/FreeImage + PATHS ${FREEIMAGEBASEDIR} DOC "The FreeImage library") find_file( FREEIMAGE_SHAREDLIB NAMES freeimage.DLL - PATHS - $ENV{XTCEXTERNALROOT}/x64/FreeImage + PATHS ${FREEIMAGEBASEDIR} ) - else (WIN64) - find_path( FREEIMAGE_INCLUDE_PATH FreeImage.h - PATHS - $ENV{XTCEXTERNALROOT}/x86/FreeImage - DOC "The directory where FreeImage.h resides") - find_library( FREEIMAGE_LIBRARY - NAMES FreeImage freeimage - PATHS - $ENV{XTCEXTERNALROOT}/x86/FreeImage - DOC "The FreeImage library") - find_file( FREEIMAGE_SHAREDLIB - NAMES freeimage.DLL - PATHS - $ENV{XTCEXTERNALROOT}/x86/FreeImage - ) - endif (WIN64) -else (WIN32) +else() find_path( FREEIMAGE_INCLUDE_PATH FreeImage.h /usr/include /usr/local/include @@ -61,16 +42,45 @@ else (WIN32) /sw/lib /opt/local/lib DOC "The FreeImage library") -endif (WIN32) +endif() +include(FindPackageHandleStandardArgs) find_package_handle_standard_args( FreeImage - DEFAULT_MSG + REQUIRED_VARS FREEIMAGE_LIBRARY FREEIMAGE_INCLUDE_PATH ) -mark_as_advanced( - FREEIMAGE_FOUND - FREEIMAGE_LIBRARY - FREEIMAGE_INCLUDE_PATH - FREEIMAGE_SHAREDLIB) +if(FreeImage_FOUND) + mark_as_advanced( + FREEIMAGE_FOUND + FREEIMAGE_LIBRARY + FREEIMAGE_INCLUDE_PATH + FREEIMAGE_SHAREDLIB + ) +endif() + +if(FreeImage_FOUND AND NOT TARGET FreeImage::FreeImage) + add_library(FreeImage::FreeImage UNKNOWN IMPORTED) + set_property(TARGET FreeImage::FreeImage PROPERTY IMPORTED_LOCATION ${FREEIMAGE_LIBRARY}) + target_include_directories(FreeImage::FreeImage INTERFACE ${FREEIMAGE_INCLUDE_PATH}) + + set(FreeImage_VERSION_MAJOR) + set(FreeImage_VERSION_MINOR) + set(FreeImage_VERSION_PATCH) + file(READ "${FREEIMAGE_INCLUDE_PATH}/FreeImage.h" _FreeImage_H_CONTENTS) + + string(REGEX MATCH "#define[ \t]+FREEIMAGE_MAJOR_VERSION[ \t]+[0-9]+" FreeImage_VERSION_MAJOR "${_FreeImage_H_CONTENTS}") + string(REGEX MATCH "[0-9]+$" FreeImage_VERSION_MAJOR ${FreeImage_VERSION_MAJOR}) + + string(REGEX MATCH "#define[ \t]+FREEIMAGE_MINOR_VERSION[ \t]+[0-9]+" FreeImage_VERSION_MINOR "${_FreeImage_H_CONTENTS}") + string(REGEX MATCH "[0-9]+$" FreeImage_VERSION_MINOR ${FreeImage_VERSION_MINOR}) + + string(REGEX MATCH "#define[ \t]+FREEIMAGE_RELEASE_SERIAL[ \t]+[0-9]+" FreeImage_VERSION_PATCH + "${_FreeImage_H_CONTENTS}") + string(REGEX MATCH "[0-9]+$" FreeImage_VERSION_PATCH ${FreeImage_VERSION_PATCH}) + + set(FreeImage_VERSION "${FreeImage_VERSION_MAJOR}.${FreeImage_VERSION_MINOR}.${FreeImage_VERSION_PATCH}" + CACHE STRING + "Version number of FreeImage") +endif() diff --git a/CMake/FindGTKUnixPrint.cmake b/CMake/FindGTKUnixPrint.cmake index 06bc548..dd9baab 100644 --- a/CMake/FindGTKUnixPrint.cmake +++ b/CMake/FindGTKUnixPrint.cmake @@ -46,4 +46,9 @@ if (GTK_UNIX_PRINT_VERSION) endif () include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(GTK_UNIX_PRINT DEFAULT_MSG GTK_UNIX_PRINT_INCLUDE_DIRS GTK_UNIX_PRINT_LIBRARIES VERSION_OK) +find_package_handle_standard_args(GTKUnixPrint + DEFAULT_MSG + GTK_UNIX_PRINT_INCLUDE_DIRS + GTK_UNIX_PRINT_LIBRARIES + VERSION_OK +) diff --git a/CMake/FindInkscape.cmake b/CMake/FindInkscape.cmake new file mode 100644 index 0000000..0ed7034 --- /dev/null +++ b/CMake/FindInkscape.cmake @@ -0,0 +1,47 @@ + +# Try to find the Inkscape command-line SVG rasterizer +# Once done this will define +# +# Inkscape_FOUND +# Inkscape_EXECUTABLE Where to find Inkscape +# Inkscape_VERSION The Inkscape version number +# Inkscape_EXPORT Option to specify the destination file +# Inkscape_GUI Option to disable the GUI if needed +# +# Module is from https://github.com/arx/ArxLibertatis + +find_program( + Inkscape_EXECUTABLE + NAMES inkscape + HINTS "C:/Program Files/Inkscape/bin" + DOC "Inkscape command-line SVG rasterizer" +) + +execute_process(COMMAND ${Inkscape_EXECUTABLE} "--version" OUTPUT_VARIABLE _Inkscape_VERSION ERROR_QUIET) +STRING(REGEX MATCH "[1-9]\.[0-9\+\.[0-9]+" _Inkscape_VERSION ${_Inkscape_VERSION}) + +set(Inkscape_VERSION ${_Inkscape_VERSION} CACHE STRING "Inkscape Version") + +execute_process(COMMAND ${Inkscape_EXECUTABLE} "--help" OUTPUT_VARIABLE _Inkscape_HELP ERROR_QUIET) + +if(_Inkscape_HELP MATCHES "--without-gui") + set(Inkscape_GUI "--without-gui" CACHE STRING "Inkscape option to disable the GUI if needed") +endif() + +if(NOT DEFINED Inkscape_EXPORT) + foreach(option IN ITEMS "--export-filename=" "--export-file=" "--export-png=") + if(_Inkscape_HELP MATCHES "${option}") + set(Inkscape_EXPORT "${option}" CACHE STRING "Inkscape option to specify the export filename") + break() + endif() + endforeach() + if(NOT DEFINED Inkscape_EXPORT) + message(WARNING "Could not determine Inkscape export file option, assuming -o") + set(Inkscape_EXPORT "-o " CACHE STRING "Inkscape option to specify the export filename") + endif() +endif() + +# handle the QUIETLY and REQUIRED arguments and set Inkscape_FOUND to TRUE if +# all listed variables are TRUE +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Inkscape REQUIRED_VARS Inkscape_EXECUTABLE) \ No newline at end of file diff --git a/CMake/FindLibzip.cmake b/CMake/FindLibzip.cmake index 004a88d..8838a86 100644 --- a/CMake/FindLibzip.cmake +++ b/CMake/FindLibzip.cmake @@ -4,50 +4,26 @@ # LIBZIP_INCLUDE_DIR_ZIP # LIBZIP_INCLUDE_DIR_ZIPCONF # LIBZIP_LIBRARY +# LIBZIP_VERSION +# +# Target Libzip::Libzip is exported # # There is no default installation for libzip on Windows so a # XTrackCAD specific directory tree is assumed # if(WIN32) - # Folders for x86/x64 - if (WIN64) - find_path( LIBZIP_INCLUDE_DIR_ZIP zip.h - PATHS - $ENV{XTCEXTERNALROOT}/x64/libzip - DOC "The directory where zip.h resides") - find_path( LIBZIP_INCLUDE_DIR_ZIPCONF zipconf.h - PATHS - $ENV{XTCEXTERNALROOT}/x64/libzip - DOC "The directory where zip.h resides") - find_library( LIBZIP_LIBRARY - NAMES zip Zip - PATHS - $ENV{XTCEXTERNALROOT}/x64/libzip - DOC "The libzip library") - find_file( LIBZIP_SHAREDLIB - NAMES zip.dll Zip.dll - PATHS - $ENV{XTCEXTERNALROOT}/x64/libzip) - else (WIN64) - find_path( LIBZIP_INCLUDE_DIR_ZIP zip.h - PATHS - $ENV{XTCEXTERNALROOT}/x86/libzip + set(LIBZIPBASEDIR "$ENV{XTCEXTERNALROOT}/${XTRKCAD_ARCH_SUBDIR}/libzip" ) + find_path( LIBZIP_INCLUDE_DIR_ZIP zip.h + PATHS ${LIBZIPBASEDIR} "${LIBZIPBASEDIR}/include" DOC "The directory where zip.h resides") - find_path( LIBZIP_INCLUDE_DIR_ZIPCONF zipconf.h - PATHS - $ENV{XTCEXTERNALROOT}/x86/libzip + find_path( LIBZIP_INCLUDE_DIR_ZIPCONF zipconf.h + PATHS ${LIBZIPBASEDIR} "${LIBZIPBASEDIR}/include" DOC "The directory where zip.h resides") - find_library( LIBZIP_LIBRARY - NAMES zip Zip - PATHS - $ENV{XTCEXTERNALROOT}/x86/libzip + find_library( LIBZIP_LIBRARY + NAMES zip Zip + PATHS ${LIBZIPBASEDIR} "${LIBZIPBASEDIR}/lib" DOC "The libzip library") - find_file( LIBZIP_SHAREDLIB - NAMES zip.dll Zip.dll - PATHS - $ENV{XTCEXTERNALROOT}/x86/libzip) - endif (WIN64) else(WIN32) find_package(PkgConfig) pkg_check_modules(PC_LIBZIP QUIET libzip) @@ -60,28 +36,51 @@ else(WIN32) NAMES zipconf.h HINTS ${PC_LIBZIP_INCLUDE_DIRS}) -if(UNIX AND NOT APPLE) - find_library(LIBZIP_LIBRARY - NAMES libzip.a zip) -else(UNIX AND NOT APPLE) - find_library(LIBZIP_LIBRARY - NAMES zip) -endif(UNIX AND NOT APPLE) + if(UNIX AND NOT APPLE) + find_library(LIBZIP_LIBRARY + NAMES libzip.a zip + PATHS + /usr/lib64 + /usr/lib + /usr/local/lib64 + /usr/local/lib + /sw/lib + /opt/local/lib + ${CMAKE_CURRENT_SOURCE_DIR}/app/tools/lib/linux + ) + else() + find_library(LIBZIP_LIBRARY + NAMES zip) + endif() endif(WIN32) include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS( - LIBZIP DEFAULT_MSG - LIBZIP_LIBRARY LIBZIP_INCLUDE_DIR_ZIP LIBZIP_INCLUDE_DIR_ZIPCONF) +find_package_handle_standard_args( + Libzip + REQUIRED_VARS + LIBZIP_LIBRARY LIBZIP_INCLUDE_DIR_ZIP LIBZIP_INCLUDE_DIR_ZIPCONF +) + +if(Libzip_FOUND) + mark_as_advanced( + LIBZIP_LIBRARY + LIBZIP_INCLUDE_DIR_ZIP + LIBZIP_INCLUDE_DIR_ZIPCONF + ) +endif() set(LIBZIP_VERSION 0) -if (LIBZIP_INCLUDE_DIR_ZIPCONF) - FILE(READ "${LIBZIP_INCLUDE_DIR_ZIPCONF}/zipconf.h" _LIBZIP_VERSION_CONTENTS) - if (_LIBZIP_VERSION_CONTENTS) - STRING(REGEX REPLACE ".*#define LIBZIP_VERSION \"([0-9a-z.]+)\".*" "\\1" LIBZIP_VERSION "${_LIBZIP_VERSION_CONTENTS}") - endif () -endif () +if(Libzip_FOUND AND NOT TARGET Libzip::Libzip) + add_library(Libzip::Libzip UNKNOWN IMPORTED) + set_property(TARGET Libzip::Libzip PROPERTY IMPORTED_LOCATION ${LIBZIP_LIBRARY}) + target_include_directories(Libzip::Libzip INTERFACE ${LIBZIP_INCLUDE_DIR_ZIP}) -set(LIBZIP_VERSION ${LIBZIP_VERSION} CACHE STRING "Version number of libzip") -mark_as_advanced(LIBZIP_LIBRARY LIBZIP_INCLUDE_DIR_ZIP LIBZIP_INCLUDE_DIR_ZIPCONF LIBZIP_SHAREDLIB) + if (LIBZIP_INCLUDE_DIR_ZIPCONF) + file(READ "${LIBZIP_INCLUDE_DIR_ZIPCONF}/zipconf.h" _LIBZIP_VERSION_CONTENTS) + if (_LIBZIP_VERSION_CONTENTS) + string(REGEX REPLACE ".*#define LIBZIP_VERSION \"([0-9a-z.]+)\".*" "\\1" LIBZIP_VERSION "${_LIBZIP_VERSION_CONTENTS}") + endif () + endif () + set(LIBZIP_VERSION ${LIBZIP_VERSION} CACHE STRING "Version number of libzip") +endif() diff --git a/CMake/FindMiniXML.cmake b/CMake/FindMiniXML.cmake index 927430d..cded8d4 100644 --- a/CMake/FindMiniXML.cmake +++ b/CMake/FindMiniXML.cmake @@ -5,72 +5,50 @@ # MINIXML_FOUND # MINIXML_INCLUDE_PATH # MINIXML_LIBRARY -# MINIXML_SHAREDLIB (Win32 only) # -# There is no default installation for mini-xml on Windows so a +# There is no default installation for minixml on Windows so a # XTrackCAD specific directory tree is assumed -# +# Windows build uses the static library for minixml if (WIN32) - # Folders for x86/x64 - if (WIN64) - find_path( MINIXML_INCLUDE_PATH mxml.h - PATHS - $ENV{XTCEXTERNALROOT}/x64/mxml - DOC "The directory where mxml.h resides") - find_library( MINIXML_LIBRARY - NAMES mxml1 - PATHS - $ENV{XTCEXTERNALROOT}/x64/mxml - DOC "The Mini XML shared library") - find_file( MINIXML_SHAREDLIB - NAMES mxml1.DLL - PATHS - $ENV{XTCEXTERNALROOT}/x64/mxml - DOC "The Mini XML DLL" ) - find_library( MINIXML_STATIC_LIBRARY - NAMES mxmlstat.lib - PATHS - $ENV{XTCEXTERNALROOT}/x64/mxml - DOC "The Mini XML static library") - else (WIN64) + set(MXMLBASEDIR "$ENV{XTCEXTERNALROOT}/${XTRKCAD_ARCH_SUBDIR}/mxml" ) find_path( MINIXML_INCLUDE_PATH mxml.h - PATHS - $ENV{XTCEXTERNALROOT}/x86/mxml + PATHS ${MXMLBASEDIR} DOC "The directory where mxml.h resides") find_library( MINIXML_LIBRARY - NAMES mxml1 - PATHS - $ENV{XTCEXTERNALROOT}/x86/mxml - DOC "The Mini XML shared library") - find_file( MINIXML_SHAREDLIB - NAMES mxml1.DLL - PATHS - $ENV{XTCEXTERNALROOT}/x86/mxml - DOC "The Mini XML DLL" ) - find_library( MINIXML_STATIC_LIBRARY NAMES mxmlstat.lib - PATHS - $ENV{XTCEXTERNALROOT}/x86/mxml + PATHS ${MXMLBASEDIR} DOC "The Mini XML static library") - endif (WIN64) -else (WIN32) +else () find_path( MINIXML_INCLUDE_PATH mxml.h /usr/include /usr/local/include /sw/include /opt/local/include DOC "The directory where mxml.h resides") - find_library( MINIXML_LIBRARY - NAMES mxml1 mxml - PATHS - /usr/lib64 - /usr/lib - /usr/local/lib64 - /usr/local/lib - /sw/lib - /opt/local/lib - DOC "The Mini XML library") + if(UNIX AND NOT APPLE) + find_library( MINIXML_LIBRARY + NAMES libmxml.a mxml1 mxml + PATHS + /usr/lib64 + /usr/lib + /usr/local/lib64 + /usr/local/lib + /sw/lib + /opt/local/lib + DOC "The Mini XML library") + else() + find_library( MINIXML_LIBRARY + NAMES mxml1 mxml + PATHS + /usr/lib64 + /usr/lib + /usr/local/lib64 + /usr/local/lib + /sw/lib + /opt/local/lib + DOC "The Mini XML library") + endif() find_library( MINIXML_STATIC_LIBRARY NAMES libmxml.a PATHS @@ -83,15 +61,38 @@ else (WIN32) DOC "The Mini XML static library") endif (WIN32) -find_package_handle_standard_args( MiniXML - DEFAULT_MSG +include(FindPackageHandleStandardArgs) + +find_package_handle_standard_args( + MiniXML + REQUIRED_VARS + MINIXML_LIBRARY + MINIXML_INCLUDE_PATH +) + +if(MiniXML_FOUND) + mark_as_advanced( + MINIXML_FOUND MINIXML_LIBRARY MINIXML_INCLUDE_PATH -) + ) +endif() -mark_as_advanced( - MINIXML_FOUND - MINIXML_LIBRARY - MINIXML_SHAREDLIB - MINIXML_STATIC_LIBRARY -MINIXML_INCLUDE_PATH) +if (MiniXML_FOUND AND NOT TARGET MiniXML::MiniXML) + add_library(MiniXML::mxml UNKNOWN IMPORTED) + set_property(TARGET MiniXML::mxml PROPERTY IMPORTED_LOCATION ${MINIXML_LIBRARY}) + target_include_directories(MiniXML::mxml INTERFACE ${MINIXML_INCLUDE_PATH}) + + set(MXML_VERSION_MAJOR) + set(MXML_VERSION_MINOR) + file(READ "${MINIXML_INCLUDE_PATH}/mxml.h" _mxml_H_CONTENTS) + + string(REGEX MATCH "#[ \t]*define[ \t]+MXML_MAJOR_VERSION[ \t]+[0-9]+" MXML_VERSION_MAJOR "${_mxml_H_CONTENTS}") + string(REGEX MATCH "[0-9]+$" MXML_VERSION_MAJOR ${MXML_VERSION_MAJOR}) + + string(REGEX MATCH "#[ \t]*define[ \t]+MXML_MINOR_VERSION[ \t]+[0-9]+" MXML_VERSION_MINOR "${_mxml_H_CONTENTS}") + string(REGEX MATCH "[0-9]+$" MXML_VERSION_MINOR ${MXML_VERSION_MINOR}) + set(MiniXML_VERSION "${MXML_VERSION_MAJOR}.${MXML_VERSION_MINOR}" + CACHE STRING + "Version number of MiniXML") +endif() diff --git a/CMake/FindPandoc.cmake b/CMake/FindPandoc.cmake index 1a076ff..c5ea5ed 100644 --- a/CMake/FindPandoc.cmake +++ b/CMake/FindPandoc.cmake @@ -13,6 +13,6 @@ find_program(PANDOC_EXECUTABLE NAMES pandoc DOC "Pandoc - a universal document converter") -FIND_PACKAGE_HANDLE_STANDARD_ARGS(Pandoc REQUIRED_VARS PANDOC_EXECUTABLE) +find_package_handle_standard_args(Pandoc REQUIRED_VARS PANDOC_EXECUTABLE) mark_as_advanced(PANDOC_EXECUTABLE) \ No newline at end of file diff --git a/CMake/FindZlib.cmake b/CMake/FindZlib.cmake index 3ad5b6c..e7785b6 100644 --- a/CMake/FindZlib.cmake +++ b/CMake/FindZlib.cmake @@ -1,46 +1,23 @@ # Finds zlib. # # This module defines: -# zlib_INCLUDE_DIR_ZIP -# zlib_INCLUDE_DIR_ZIPCONF -# zlib_LIBRARY +# ZLIB_INCLUDE_DIR +# ZLIB_LIBRARY # # There is no default installation for zlib on Windows so a # XTrackCAD specific directory tree is assumed # if(WIN32) - # Folders for x86/x64 - if (WIN64) + set(ZLIBBASEDIR "$ENV{XTCEXTERNALROOT}/${XTRKCAD_ARCH_SUBDIR}/zlib" ) find_path( ZLIB_INCLUDE_DIR zlib.h - PATHS - $ENV{XTCEXTERNALROOT}/x64/zlib + PATHS ${ZLIBBASEDIR} "${ZLIBBASEDIR}/include" DOC "The directory where zlib.h resides") find_library( ZLIB_LIBRARY - NAMES zlib Zlib - PATHS - $ENV{XTCEXTERNALROOT}/x64/zlib + NAMES zlibstatic + PATHS ${ZLIBBASEDIR} "${ZLIBBASEDIR}/lib" DOC "The zlib library") - find_file( ZLIB_SHAREDLIB - NAMES zlib.dll Zlib.dll - PATHS - $ENV{XTCEXTERNALROOT}/x64/zlib) - else (WIN64) - find_path( ZLIB_INCLUDE_DIR zlib.h - PATHS - $ENV{XTCEXTERNALROOT}/x86/zlib - DOC "The directory where zlib.h resides") - find_library( ZLIB_LIBRARY - NAMES zlib Zlib - PATHS - $ENV{XTCEXTERNALROOT}/x86/zlib - DOC "The zlib library") - find_file( ZLIB_SHAREDLIB - NAMES zlib.dll Zlib.dll - PATHS - $ENV{XTCEXTERNALROOT}/x86/zlib) - endif (WIN64) -else(WIN32) +else() find_package(PkgConfig) pkg_check_modules(PC_ZLIB QUIET zlib) @@ -50,11 +27,34 @@ else(WIN32) find_library(ZLIB_LIBRARY NAMES z) -endif(WIN32) +endif() include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS( - ZLIB DEFAULT_MSG - ZLIB_LIBRARY ZLIB_INCLUDE_DIR) -mark_as_advanced(ZLIB_LIBRARY ZLIB_INCLUDE_DIR) +find_package_handle_standard_args( + Zlib + REQUIRED_VARS + ZLIB_LIBRARY + ZLIB_INCLUDE_DIR +) + +if(Zlib_FOUND) + mark_as_advanced( + ZLIB_LIBRARY + ZLIB_INCLUDE_DIR + ) +endif() + +if(Zlib_FOUND AND NOT TARGET Zlib::Zlib) + add_library(Zlib::Zlib UNKNOWN IMPORTED) + set_property(TARGET Zlib::Zlib PROPERTY IMPORTED_LOCATION ${ZLIB_LIBRARY}) + target_include_directories(Zlib::Zlib INTERFACE ${ZLIB_INCLUDE_DIR}) + + if (ZLIB_INCLUDE_DIR) + file(READ "${ZLIB_INCLUDE_DIR}/zlib.h" _ZLIB_VERSION_CONTENTS) + if (_ZLIB_VERSION_CONTENTS) + string(REGEX REPLACE ".*#define ZLIB_VERSION \"([0-9a-z.]+)\".*" "\\1" ZLIB_VERSION "${_ZLIB_VERSION_CONTENTS}") + endif () + endif () + set(ZLIB_VERSION ${ZLIB_VERSION} CACHE STRING "Version number of zlib") +endif() diff --git a/CMakeLists.txt b/CMakeLists.txt index a9b083e..845c847 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,187 +1,165 @@ -PROJECT(XTrkCAD) -enable_testing() -cmake_minimum_required(VERSION 2.8) -set(CMAKE_MACOSX_RPATH 0) +# Main CMake file for XTrackCAD -# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked +cmake_minimum_required(VERSION 3.20.0) +project(XTrkCAD) + +cmake_policy(SET CMP0076 NEW) +cmake_policy(SET CMP0079 NEW) +# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked # additional CMake modules can be found here set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/CMake") -# Setup high-level build options ... -if(UNIX) - include(FindPkgConfig) - set(XTRKCAD_USE_GTK_DEFAULT ON) - if(APPLE) - SET(XTRKCAD_USE_GETTEXT_DEFAULT OFF) - SET(XTRKCAD_USE_APPLEHELP_DEFAULT ON) - PKG_CHECK_MODULES(GTK_WEBKIT "webkit-1.0" QUIET) - if(GTK_WEBKIT_FOUND) - set(XTRKCAD_USE_BROWSER_DEFAULT OFF) - else() - set(XTRKCAD_USE_BROWSER_DEFAULT ON) - endif() - else() - set(XTRKCAD_USE_BROWSER_DEFAULT ON) - set(XTRKCAD_PACKAGE_GA_RELEASE_DEFAULT OFF) - endif(APPLE) -endif(UNIX) +# Include CMake defaults +include(CMakeDefaults) + +include(CheckIncludeFiles) + +include(ProgramVersion.cmake) +include(PlatformSettings.cmake) + +enable_testing() -# Set Win64 flag -IF(WIN32) - if (CMAKE_SIZEOF_VOID_P EQUAL 8) - SET(WIN64 ON CACHE BOOL "Win x64") - IF (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - SET(CMAKE_INSTALL_PREFIX "C:/Program Files/XTrkCAD" CACHE PATH "WIN64 Install" FORCE) - ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - else (CMAKE_SIZEOF_VOID_P EQUAL 8) - SET(WIN64 OFF CACHE BOOL "Win x86") - endif (CMAKE_SIZEOF_VOID_P EQUAL 8) -ENDIF(WIN32) +# Find all dependencies +# +# Additional libraries find_package(Libzip) find_package(Zlib) -find_package(MiniXML) -if(MINIXML_FOUND) +# Optionally enable SVG export +find_package(MiniXML) +if(MiniXML_FOUND) set(XTRKCAD_CREATE_SVG 1) message( STATUS "MiniXML found: SVG export is enabled") -else(MINIXML_FOUND) +else() message( STATUS "MiniXML not found: no SVG export") -endif(MINIXML_FOUND) +endif() + +# Find unit testing framework +find_package(CMocka) +if(CMOCKA_FOUND) + include_directories(${CMOCKA_INCLUDE_DIR}) + set(LIBS ${LIBS} ${CMOCKA_LIBRARIES}) + option(XTRKCAD_TESTING "Build unittests" ON) +endif() + +# Tools +# Find document conversion tool +find_package(Pandoc) -IF(WIN32) - SET(XTRKCAD_USE_GTK_DEFAULT OFF) - SET(XTRKCAD_USE_GETTEXT_DEFAULT ON) +# For handling and creation of bitmaps the FreeImage library is required +find_package(FreeImage REQUIRED) - SET(CMAKE_C_FLAGS_DEBUG "/D_DEBUG /MT /Zi /Ob0 /Od /RTC1" CACHE STRING "Flags used by the compiler during debug builds" FORCE) - SET(CMAKE_C_FLAGS_MINSIZEREL "/MT /O1 /Ob1 /D NDEBUG" CACHE STRING "Flags used by the compiler during release minumum size builds" FORCE) - SET(CMAKE_C_FLAGS_RELEASE "/MT /O2 /Ob2 /D NDEBUG" CACHE STRING "Flags used by the compiler during release builds" FORCE) - SET(CMAKE_C_FLAGS_RELWITHDEBINFO "/MT /Zi /O2 /Ob1 /D NDEBUG" CACHE STRING "Flags used by the compiler during release with debug info builds" FORCE) +# check for GTK+ 2.0 +if(UNIX) + pkg_check_modules(GTK REQUIRED "gtk+-2.0") + set(XTRKCAD_USE_GTK_DEFAULT ON) +endif(UNIX) - ADD_DEFINITIONS(-DWINDOWS) - ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS) -ENDIF(WIN32) +if(WIN32 AND NOT XTRKCAD_USE_GTK) + # use the Windows HTMLHelp tool + find_package(HTMLHelp REQUIRED) +endif(WIN32 AND NOT XTRKCAD_USE_GTK) -if(COMMAND cmake_policy) - cmake_policy(SET CMP0003 NEW) - if( POLICY CMP0026 ) - cmake_policy(SET CMP0026 NEW) - endif( POLICY CMP0026 ) -endif(COMMAND cmake_policy) +# +# Configure options +# -SET(XTRKCAD_USE_DOXYGEN_DEFAULT OFF) +option(XTRKCAD_USE_GTK "Use GTK for the graphical user interface back-end" ${XTRKCAD_USE_GTK_DEFAULT}) +option(XTRKCAD_USE_GETTEXT "Use gettext for internationalization" ${XTRKCAD_USE_GETTEXT_DEFAULT}) +option(XTRKCAD_USE_DOXYGEN "Generate internals documentation using doxygen" OFF) -OPTION(XTRKCAD_USE_GTK "Use GTK for the graphical user interface back-end" ${XTRKCAD_USE_GTK_DEFAULT}) -OPTION(XTRKCAD_USE_GETTEXT "Use gettext for internationalization" ${XTRKCAD_USE_GETTEXT_DEFAULT}) -OPTION(XTRKCAD_USE_DOXYGEN "Generate internals documentation using doxygen" ${XTRKCAD_USE_DOXYGEN_DEFAULT}) if(UNIX AND NOT APPLE) option(XTRKCAD_USE_BROWSER "Show help in default browser" ${XTRKCAD_USE_BROWSER_DEFAULT}) - option(XTRKCAD_PACKAGE_GA_RELEASE "Package for a Beta (OFF/Default) or GA (ON) release" ${XTRKCAD_PACKAGE_GA_RELEASE_DEFAULT}) endif() if(APPLE) option(XTRKCAD_USE_APPLEHELP "Show help in Apple Help" ${XTRKCAD_USE_APPLEHELP_DEFAULT}) option(XTRKCAD_USE_BROWSER "Show help in default browser" ${XTRKCAD_USE_BROWSER_DEFAULT}) + option(XTRKCAD_USE_PACKAGEMAKER "Generate an OSX PackageMaker package for distribution." OFF) endif() -IF(UNIX) - PKG_CHECK_MODULES(GTK REQUIRED "gtk+-2.0") -ENDIF() +# Hide the advanced stuff ... +mark_as_advanced(CMAKE_BACKWARDS_COMPATIBILITY) +mark_as_advanced(CMAKE_EXECUTABLE_FORMAT) +mark_as_advanced(CMAKE_OSX_ARCHITECTURES) +mark_as_advanced(CMAKE_OSX_SYSROOT) +mark_as_advanced(CMAKE_USE_CHRPATH) +mark_as_advanced(EXECUTABLE_OUTPUT_PATH) +mark_as_advanced(LIBRARY_OUTPUT_PATH) -IF(APPLE) - OPTION(XTRKCAD_USE_PACKAGEMAKER "Generate an OSX PackageMaker package for distribution." OFF) -ENDIF(APPLE) +# Test for headers and libraries for portability ... +# check_include_files (malloc.h HAVE_MALLOC_H) +# if(HAVE_MALLOC_H) +# add_definitions(-DHAVE_MALLOC_H) +# endif() -# Hide the advanced stuff ... -MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY) -MARK_AS_ADVANCED(CMAKE_EXECUTABLE_FORMAT) -MARK_AS_ADVANCED(CMAKE_OSX_ARCHITECTURES) -MARK_AS_ADVANCED(CMAKE_OSX_SYSROOT) -MARK_AS_ADVANCED(CMAKE_USE_CHRPATH) -MARK_AS_ADVANCED(EXECUTABLE_OUTPUT_PATH) -MARK_AS_ADVANCED(LIBRARY_OUTPUT_PATH) - -# Test for dependencies ... -IF(WIN32 AND NOT XTRKCAD_USE_GTK) - FIND_PACKAGE(HTMLHelp REQUIRED) -ENDIF(WIN32 AND NOT XTRKCAD_USE_GTK) - -IF(XTRKCAD_USE_PACKAGEMAKER) - IF(NOT CMAKE_INSTALL_PREFIX STREQUAL "/usr") - MESSAGE(SEND_ERROR "XTRKCAD_USE_PACKAGEMAKER requires CMAKE_INSTALL_PREFIX set to /usr.") - ENDIF(NOT CMAKE_INSTALL_PREFIX STREQUAL "/usr") -ENDIF(XTRKCAD_USE_PACKAGEMAKER) +#packaging related stuff -# Find unit testing framework -find_package(CMocka) -if(CMOCKA_FOUND) - include_directories(${CMOCKA_INCLUDE_DIR}) - set(LIBS ${LIBS} ${CMOCKA_LIBRARIES}) - option( XTRKCAD_TESTING "Build unittests" ON) +if(XTRKCAD_USE_PACKAGEMAKER) + if(NOT CMAKE_INSTALL_PREFIX STREQUAL "/usr") + message(SEND_ERROR "XTRKCAD_USE_PACKAGEMAKER requires CMAKE_INSTALL_PREFIX set to /usr.") + endif() endif() -# Find document conversion tool -find_package(Pandoc) - -# Test for headers and libraries for portability ... +# +# configure installation directories +if(WIN32) + set( CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX} ${XTRKCAD_VERSION}" ) +endif() -INCLUDE (CheckIncludeFiles) -CHECK_INCLUDE_FILES (malloc.h HAVE_MALLOC_H) -if(HAVE_MALLOC_H) - add_definitions(-DHAVE_MALLOC_H) -endif(HAVE_MALLOC_H) - -# Setup some global options for installation ... -SET(XTRKCAD_MAJOR_VERSION "5") -SET(XTRKCAD_MINOR_VERSION "2") -SET(XTRKCAD_RELEASE_VERSION "2") -SET(XTRKCAD_VERSION_MODIFIER "GA") -SET(XTRKCAD_VERSION "${XTRKCAD_MAJOR_VERSION}.${XTRKCAD_MINOR_VERSION}.${XTRKCAD_RELEASE_VERSION}${XTRKCAD_VERSION_MODIFIER}") - -IF(WIN32) - SET( CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX} ${XTRKCAD_VERSION}" ) -ENDIF(WIN32) -SET(XTRKCAD_BIN_INSTALL_DIR "bin") -SET(XTRKCAD_LOCALE_INSTALL_DIR "share/locale") -SET(XTRKCAD_PACKAGE "xtrkcad") -SET(XTRKCAD_SHARE_INSTALL_DIR "share/xtrkcad") +set(XTRKCAD_BIN_INSTALL_DIR "bin") +set(XTRKCAD_LOCALE_INSTALL_DIR "share/locale") +set(XTRKCAD_PACKAGE "xtrkcad") +set(XTRKCAD_BETA "") +if(UNIX AND NOT APPLE) + if(XTRKCAD_VERSION_MODIFIER MATCHES "^Beta") + set(XTRKCAD_BETA "-beta") + endif() +endif() +set(XTRKCAD_SHARE_INSTALL_DIR "share/xtrkcad${XTRKCAD_BETA}") # Enable use of a configuration file ... -ADD_DEFINITIONS(-DXTRKCAD_CMAKE_BUILD) -CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/xtrkcad-config.h.in ${CMAKE_CURRENT_BINARY_DIR}/xtrkcad-config.h) +add_definitions(-DXTRKCAD_CMAKE_BUILD) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/xtrkcad-config.h.in ${CMAKE_CURRENT_BINARY_DIR}/xtrkcad-config.h) + +# find the config.h include file +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} +) + +# +# I18N related dependencies -IF(XTRKCAD_USE_GETTEXT) - SET(GENHELP_OPTS "-bhi") +if(XTRKCAD_USE_GETTEXT) # # Find the GnuWin32 installation directory, the gettext include should be located in subdir include # - IF(WIN32) + if(WIN32) if(MSVC) # use supplied gettext library for Visual Studio message( STATUS "Use simple_gettext module included with XTrackCAD" ) - ADD_DEFINITIONS(-DUSE_SIMPLE_GETTEXT ) + add_definitions(-DUSE_SIMPLE_GETTEXT ) else() # for mingw & co. find libintl.h and use it find_path ( INTL_PATH libintl.h ) if(INTL_PATH) message( STATUS "Use installed gettext module" ) - INCLUDE_DIRECTORIES(${INTL_PATH}) - endif(INTL_PATH) + include_directories(${INTL_PATH}) + endif() endif() - ENDIF(WIN32) - iF(APPLE) + endif() + if(APPLE) find_path ( INTL_PATH libintl.h ) if(INTL_PATH) message( STATUS "Use installed gettext module" ) - INCLUDE_DIRECTORIES(${INTL_PATH}) - endif(INTL_PATH) - ENDIF(APPLE) -ELSE(XTRKCAD_USE_GETTEXT) - SET(GENHELP_OPTS "-bh") -ENDIF(XTRKCAD_USE_GETTEXT) + include_directories(${INTL_PATH}) + endif() + endif() +endif() # Setup the rest of the build ... -ADD_SUBDIRECTORY(app) -ADD_SUBDIRECTORY(distribution) -ADD_SUBDIRECTORY(docs) +add_subdirectory(app) +add_subdirectory(distribution) +add_subdirectory(docs) diff --git a/PlatformSettings.cmake b/PlatformSettings.cmake new file mode 100644 index 0000000..272af37 --- /dev/null +++ b/PlatformSettings.cmake @@ -0,0 +1,61 @@ +# Configure the platform specific settings +# +# Setup high-level build options ... +if(UNIX) + include(FindPkgConfig) + set(XTRKCAD_USE_GTK_DEFAULT ON) + + # Configure help display and i18n + if(APPLE) + set(CMAKE_MACOSX_RPATH 0) + set(XTRKCAD_USE_GETTEXT_DEFAULT OFF) + set(XTRKCAD_USE_APPLEHELP_DEFAULT ON) + set(CMAKE_FIND_APPBUNDLE LAST) + pkg_check_modules(GTK_WEBKIT "webkit-1.0" QUIET) + if(GTK_WEBKIT_FOUND) + set(XTRKCAD_USE_BROWSER_DEFAULT OFF) + else() + set(XTRKCAD_USE_BROWSER_DEFAULT ON) + endif() + else() + set(XTRKCAD_USE_GETTEXT_DEFAULT ON) + set(XTRKCAD_USE_BROWSER_DEFAULT ON) + add_compile_options("-pthread") + add_link_options("-pthread") + endif() + + # glib 2.0 deprecated GTypeDebugFlags and GTimeVal, gtk2 has not been updated + add_compile_options("-Wno-deprecated-declarations") +endif() + +# Set Win64 flag when a 64 bit build is selected +if(WIN32) + set(XTRKCAD_USE_GETTEXT_DEFAULT ON) + set(XTRKCAD_USE_GTK_DEFAULT OFF) + + # determine processor target architecture + if (CMAKE_SIZEOF_VOID_P EQUAL 8) + set(Win64Bit ON CACHE BOOL "Target Architecture: x64") + else () + set(Win64Bit OFF CACHE BOOL "Target Architecture: x86") + endif () + + mark_as_advanced(Win64Bit) + + if (Win64Bit) + set(XTRKCAD_ARCH_SUBDIR "x64") + if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + set(CMAKE_INSTALL_PREFIX "C:/Program Files/XTrkCAD" CACHE PATH "WIN64 Install" FORCE) + endif() + else () + set( XTRKCAD_ARCH_SUBDIR "x86") + endif () + + set(CMAKE_C_FLAGS_DEBUG "/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1" CACHE STRING "Flags used by the compiler during debug builds" FORCE) + set(CMAKE_C_FLAGS_MINSIZEREL "/MD /O1 /Ob1 /D NDEBUG" CACHE STRING "Flags used by the compiler during release minumum size builds" FORCE) + set(CMAKE_C_FLAGS_RELEASE "/MD /O2 /Ob2 /D NDEBUG" CACHE STRING "Flags used by the compiler during release builds" FORCE) + set(CMAKE_C_FLAGS_RELWITHDEBINFO "/MDd /Zi /O2 /Ob1 /D NDEBUG" CACHE STRING "Flags used by the compiler during release with debug info builds" FORCE) + + add_definitions(-DWINDOWS) + add_definitions(-D_CRT_SECURE_NO_WARNINGS) +endif() diff --git a/ProgramVersion.cmake b/ProgramVersion.cmake new file mode 100644 index 0000000..01e4d34 --- /dev/null +++ b/ProgramVersion.cmake @@ -0,0 +1,7 @@ +# Define program version + +set(XTRKCAD_MAJOR_VERSION "5") +set(XTRKCAD_MINOR_VERSION "3") +set(XTRKCAD_RELEASE_VERSION "0") +set(XTRKCAD_VERSION_MODIFIER "GA") +set(XTRKCAD_VERSION "${XTRKCAD_MAJOR_VERSION}.${XTRKCAD_MINOR_VERSION}.${XTRKCAD_RELEASE_VERSION}${XTRKCAD_VERSION_MODIFIER}") diff --git a/README b/README new file mode 100644 index 0000000..e69de29 diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index 72ca170..33e105a 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -1,20 +1,23 @@ -# "bin/i18n.h" is widely used -INCLUDE_DIRECTORIES(bin) -include_directories(dynstring) -include_directories(cornu) -include_directories(libzip) + + # Setup the rest of the build ... +add_subdirectory(tools) +add_subdirectory(help) +add_subdirectory(bin) +add_subdirectory(cornu) add_subdirectory(dynstring) -ADD_SUBDIRECTORY(wlib) -ADD_SUBDIRECTORY(tools) -ADD_SUBDIRECTORY(help) -ADD_SUBDIRECTORY(doc) -ADD_SUBDIRECTORY(bin) -ADD_SUBDIRECTORY(lib) -ADD_SUBDIRECTORY(cornu) +add_subdirectory(cJSON) +add_subdirectory(wlib) +add_subdirectory(doc) +add_subdirectory(lib) + +# i18n can be found here +include_directories( + ${xtrkcad-lib_SOURCE_DIR} +) -IF(XTRKCAD_USE_GETTEXT) - ADD_SUBDIRECTORY(i18n) -ENDIF(XTRKCAD_USE_GETTEXT) \ No newline at end of file +if(XTRKCAD_USE_GETTEXT) + add_subdirectory(i18n) +endif() \ No newline at end of file diff --git a/app/COPYING b/app/COPYING index b66da73..d159169 100644 --- a/app/COPYING +++ b/app/COPYING @@ -1,12 +1,12 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - Preamble + Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public @@ -15,7 +15,7 @@ software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to +the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not @@ -55,19 +55,19 @@ patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. - - GNU GENERAL PUBLIC LICENSE + + GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The 'Program', below, -refers to any such program or work, and a 'work based on the Program' +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in -the term 'modification'.) Each licensee is addressed as 'you'. +the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of @@ -110,7 +110,7 @@ above, provided that you also meet all of these conditions: License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) - + These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in @@ -168,7 +168,7 @@ access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. - + 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is @@ -240,8 +240,8 @@ be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and 'any -later version', you have the option of following the terms and conditions +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software @@ -255,12 +255,12 @@ make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. - NO WARRANTY + NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM 'AS IS' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE @@ -277,5 +277,63 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - END OF TERMS AND CONDITIONS - + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/app/bin/CMakeLists.txt b/app/bin/CMakeLists.txt index 8d28205..48a0b72 100644 --- a/app/bin/CMakeLists.txt +++ b/app/bin/CMakeLists.txt @@ -1,18 +1,64 @@ +project(xtrkcad-lib) + include( CheckSymbolExists ) +# +# Create line symbols for turnouts from src definitions +# +# 1. Build converter cnvdsgn +# 2. define target "lines" for all symols +# 3. create .lin-files using converter +# 4. add individual .lin-files as dependency to "lines" +# + +# build GA or Beta executable +set( XTRKCAD_BIN "xtrkcad${XTRKCAD_BETA}" ) + +add_subdirectory(bitmaps) + +add_executable(cnvdsgn cnvdsgn.c utility.c) + +target_link_libraries(cnvdsgn xtrkcad-wlib) + +if(NOT WIN32) + target_link_libraries(cnvdsgn m) +endif() + +add_custom_target(lines + DEPENDS cnvdsgn +) + +# +# macro to copy DLLs into build directory +# eases debugging on Windows +# +if(WIN32) + macro(COPYDLLTOBUILD dllname) + add_custom_command( + TARGET xtrkcad POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy + ${dllname} + ${CMAKE_CURRENT_BINARY_DIR} + ) + endmacro(COPYDLLTOBUILD) +endif() -ADD_EXECUTABLE(cnvdsgn cnvdsgn.c utility.c) -IF(NOT WIN32) - TARGET_LINK_LIBRARIES(cnvdsgn m) -ENDIF(NOT WIN32) +# +# macro creates lin files and adds the result as dependency +# -MACRO(GENERATE_LIN lin_name) - ADD_CUSTOM_COMMAND( +macro(GENERATE_LIN lin_name) + add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${lin_name}.lin - DEPENDS cnvdsgn ${CMAKE_CURRENT_SOURCE_DIR}/${lin_name}.src + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${lin_name}.src COMMAND cnvdsgn < ${CMAKE_CURRENT_SOURCE_DIR}/${lin_name}.src > ${CMAKE_CURRENT_BINARY_DIR}/${lin_name}.lin - ) -ENDMACRO(GENERATE_LIN) + ) + + target_sources(lines + PRIVATE + ${CMAKE_CURRENT_BINARY_DIR}/${lin_name}.lin + ) +endmacro(GENERATE_LIN) GENERATE_LIN(to3way) GENERATE_LIN(tocrv) @@ -30,314 +76,341 @@ GENERATE_LIN(tocornu) GENERATE_LIN(tocornuwye) GENERATE_LIN(tocornu3way) -SET(LIN_SOURCES - ${CMAKE_CURRENT_BINARY_DIR}/to3way.lin - ${CMAKE_CURRENT_BINARY_DIR}/tocrv.lin - ${CMAKE_CURRENT_BINARY_DIR}/tocrvsct.lin - ${CMAKE_CURRENT_BINARY_DIR}/todcross.lin - ${CMAKE_CURRENT_BINARY_DIR}/todslip.lin - ${CMAKE_CURRENT_BINARY_DIR}/tolcross.lin - ${CMAKE_CURRENT_BINARY_DIR}/torcross.lin - ${CMAKE_CURRENT_BINARY_DIR}/toreg.lin - ${CMAKE_CURRENT_BINARY_DIR}/tosslip.lin - ${CMAKE_CURRENT_BINARY_DIR}/tostrsct.lin - ${CMAKE_CURRENT_BINARY_DIR}/towye.lin - ${CMAKE_CURRENT_BINARY_DIR}/toxing.lin - ${CMAKE_CURRENT_BINARY_DIR}/tocornu.lin - ${CMAKE_CURRENT_BINARY_DIR}/tocornuwye.lin - ${CMAKE_CURRENT_BINARY_DIR}/tocornu3way.lin - ) - -ADD_CUSTOM_COMMAND( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/bllnhlp.c - DEPENDS genhelp ${help_SOURCE_DIR}/genhelp.json - COMMAND genhelp ${GENHELP_OPTS} ${help_SOURCE_DIR}/genhelp.json ${CMAKE_CURRENT_BINARY_DIR}/bllnhlp.c - ) - -ADD_EXECUTABLE(xtrkcad WIN32 - misc.c - xtrkcad.rc +# put these targets into the folder LineSymbols +set_target_properties(lines cnvdsgn PROPERTIES FOLDER LineSymbols) + +add_library(xtrkcad-lib "") + +target_sources(xtrkcad-lib + PRIVATE + appdefaults.c + archive.c + archive.h + cbezier.c + cbezier.h + cblock.c + ccornu.c + ccornu.h + ccurve.c + ccurve.h + ccontrol.c + cdraw.c + celev.c + cgroup.c + chndldto.c + chotbar.c + cjoin.c + cjoin.h + cmisc.c + cmodify.c + cnote.c + command.c + command.h + common.h + common-ui.h + compound.c + compound.h + cparalle.c + cprint.c + cprofile.c + cpull.c + cruler.c + cselect.c + cselect.h + csensor.c + csnap.c + csplit.c + csignal.c + cstraigh.c + cstraigh.h + cstruct.c + cswitchmotor.c + ctext.c + ctodesgn.c + ctrain.c + ctrain.h + cturnout.c + cturntbl.c + cundo.c + cundo.h + custom.c + custom.h + dbench.c + dbitmap.c + dcar.c + dcmpnd.c + dcustmgm.c + dcontmgm.c + dease.c + denum.c + directory.c + directory.h + dlayer.c + dlayer.h + doption.c + dpricels.c + dprmfile.c + draw.c + draw.h + drawgeom.c + drawgeom.h + dxfformat.c + dxfformat.h + dxfoutput.c + elev.c + file2uri.c + file2uri.h + fileio.c + fileio.h + filenoteui.c + i18n.c + layout.c + layout.h + levenshtein.c + linknoteui.c + lprintf.c + macro.c + manifest.c + manifest.h + menu.h + menu.c + misc.c + misc.h + note.h + param.c + param.h + paramfile.c + paramfilelist.c + paramfilesearch_ui.c + partcatalog.c + paths.c + paths.h + problemrep.c + problemrepui.c + scale.c + scale.h + shortentext.c + shortentext.h + shrtpath.c + shrtpath.h + smalldlg.c + smalldlg.h + stringxtc.c + tbezier.c + tbezier.h + tcornu.c + tcornu.h + tcurve.c + tease.c + textnoteui.c + track.c + track.h + trackx.h + trkendpt.c + trkendpt.h + trkendptx.h + trknote.c + trkseg.h + trkseg.c + tstraigh.c + turnout.c + uthash.h + utility.c + utility.h + validator.c + validator.h + include/dirent.h + include/levenshtein.h + include/paramfile.h + include/paramfilelist.h + include/partcatalog.h + include/problemrep.h + include/stringxtc.h + include/utlist.h ) -SET(SOURCES - ${LIN_SOURCES} - appdefaults.c - archive.c - archive.h - bllnhlp.c - cbezier.c - cbezier.h - cblock.c - ccornu.c - ccornu.h - ccurve.c - ccurve.h - ccontrol.c - cdraw.c - celev.c - cgroup.c - chndldto.c - chotbar.c - cjoin.c - cjoin.h - cmisc.c - cmodify.c - cnote.c - common.h - common-ui.h - compound.c - compound.h - cparalle.c - cprint.c - cprofile.c - cpull.c - cruler.c - cselect.c - cselect.h - csensor.c - csnap.c - csplit.c - csignal.c - cstraigh.c - cstraigh.h - cstruct.c - cswitchmotor.c - ctext.c - ctodesgn.c - ctrain.c - cturnout.c - cturntbl.c - cundo.c - custom.c - custom.h - dbench.c - dbitmap.c - dcar.c - dcmpnd.c - dcustmgm.c - dcontmgm.c - dease.c - denum.c - directory.c - dlayer.c - doption.c - dpricels.c - dprmfile.c - draw.c - draw.h - drawgeom.c - dxfformat.c - dxfformat.h - dxfoutput.c - elev.c - file2uri.c - file2uri.h - fileio.c - filenoteui.c - i18n.c - layout.c - layout.h - levenshtein.c - linknoteui.c - lprintf.c - macro.c - manifest.c - misc.c - misc.h - misc2.c - param.c - paramfile.c - paramfilelist.c - paramfilesearch_ui.c - partcatalog.c - paths.c - shortentext.c - shrtpath.c - smalldlg.c - stringxtc.c - tbezier.c - tcornu.c - tcurve.c - tease.c - textnoteui.c - track.c - track.h - trackx.h - trknote.c - trkseg.c - tstraigh.c - utility.c - utility.h - validator.c - cJSON.c - archive.h - directory.h - manifest.h - validator.h - ) - # add UTF-8 conversion utilities on Windows + if(WIN32) - set( SOURCES - ${SOURCES} - utf8convert.c - include/utf8convert.h + target_sources(xtrkcad-lib + PRIVATE + utf8convert.c + include/utf8convert.h ) -endif(WIN32) - -set (SOURCES - ${SOURCES} - include/dirent.h - include/levenshtein.h - include/paramfile.h - include/paramfilelist.h - include/partcatalog.h - include/stringxtc.h - include/utlist.h +endif() + +# This ensures that messages.h has been generated before we build xtrkcad-lib +add_dependencies(xtrkcad-lib + msgfiles + lines + genbitmaps ) -if(XTRKCAD_CREATE_SVG) - set (SOURCES - ${SOURCES} - svgformat.c - svgoutput.c - ) - include_directories(${MINIXML_INCLUDE_PATH}) - if(WIN32) - add_custom_command( - TARGET xtrkcad POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy - ${MINIXML_SHAREDLIB} - ${CMAKE_CURRENT_BINARY_DIR} - ) +target_include_directories(xtrkcad-lib + PUBLIC + ${messagefile_BINARY_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} +) - # add dll to install package - install(FILES ${MINIXML_SHAREDLIB} - DESTINATION ${XTRKCAD_BIN_INSTALL_DIR} - ) - endif(WIN32) +target_link_libraries(xtrkcad-lib + PRIVATE + cJSON + dynstring + xtrkcad-cornu + xtrkcad-wlib +) -endif(XTRKCAD_CREATE_SVG) +if(UNIX AND NOT APPLE) + target_link_libraries(xtrkcad-lib PRIVATE ${LIBZIP_LIBRARY} ${LIBZIP_LIBRARIES} ${ZLIB_LIBRARY}) +else() + target_link_libraries(xtrkcad-lib + PRIVATE + Libzip::Libzip + FreeImage::FreeImage + Zlib::Zlib) +endif() -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) -INCLUDE_DIRECTORIES(${XTrkCAD_BINARY_DIR}) -INCLUDE_DIRECTORIES(${help_BINARY_DIR}) -INCLUDE_DIRECTORIES(${wlib_SOURCE_DIR}/include) -include_directories(${FREEIMAGE_INCLUDE_PATH}) -INCLUDE_DIRECTORIES(${LIBZIP_INCLUDE_DIR_ZIP}) -INCLUDE_DIRECTORIES(${CJSON_INCLUDE}) +# +# Start building the main program itself +# +add_executable(${XTRKCAD_BIN} WIN32 "" ) -LINK_DIRECTORIES(${GTK_LIBRARY_DIRS}) -LINK_DIRECTORIES(${GTK_WEBKIT_LIBRARY_DIRS}) -LINK_DIRECTORIES(${LIBZIP_LIBZIP_LIBRARY}) +# if SVG export is built and source files and dependency on MiniXML -ADD_LIBRARY(xtrkcad-lib ${SOURCES}) +if(XTRKCAD_CREATE_SVG) + target_sources(xtrkcad-lib + PRIVATE + svgformat.c + svgoutput.c + ) -# This ensures that messages.h has been generated before we build xtrkcad-lib -ADD_DEPENDENCIES(xtrkcad-lib Help) + if(WIN32) + target_link_libraries(xtrkcad-lib + PRIVATE + MiniXML::mxml + ) + endif() + if(UNIX) + if (APPLE OR NOT ${MINIXML_STATIC_LIBRARY}) + target_link_libraries(xtrkcad-lib + PRIVATE + MiniXML::mxml + ) + else() + target_link_libraries(xtrkcad ${MINIXML_STATIC_LIBRARY}) + target_link_libraries(xtrkcad "pthread") + endif() + endif() +endif() -TARGET_LINK_LIBRARIES(xtrkcad xtrkcad-lib) -TARGET_LINK_LIBRARIES(xtrkcad xtrkcad-wlib) -TARGET_LINK_LIBRARIES(xtrkcad xtrkcad-cornu) -TARGET_LINK_LIBRARIES(xtrkcad dynstring) -if(XTRKCAD_CREATE_SVG) -IF(UNIX) - if (NOT APPLE) - target_link_libraries(xtrkcad ${MINIXML_STATIC_LIBRARY}) - target_link_libraries(xtrkcad "pthread") - else(NOT APPLE) - target_link_libraries(xtrkcad ${MINIXML_LIBRARY}) - endif(NOT APPLE) -ELSE(UNIX) - target_link_libraries(xtrkcad ${MINIXML_STATIC_LIBRARY}) -ENDIF(UNIX) -endif(XTRKCAD_CREATE_SVG) - -IF(UNIX AND NOT APPLE) -target_link_libraries(xtrkcad ${LIBZIP_LIBRARY} ${LIBZIP_LIBRARIES} ${ZLIB_LIBRARY}) -ELSE(UNIX AND NOT APPLE) -target_link_libraries(xtrkcad ${LIBZIP_LIBRARY} ${LIBZIP_LIBRARIES}) -ENDIF(UNIX AND NOT APPLE) - -ADD_EXECUTABLE(mkturnout - ${LIN_SOURCES} - ctodesgn.c +target_sources(${XTRKCAD_BIN} + PRIVATE + misc.c + ${messagefile_BINARY_DIR}/bllnhlp.c + xtrkcad.rc +) +add_dependencies(${XTRKCAD_BIN} + balloonhelp + msgfiles + genbitmaps) + +target_include_directories(${XTRKCAD_BIN} + PRIVATE + ${messagefile_BINARY_DIR} +) + +target_link_libraries(${XTRKCAD_BIN} + PRIVATE + xtrkcad-wlib + xtrkcad-lib +) + +# +# Create mkturnout utility +# +add_executable(mkturnout + ctodesgn.c utility.c + trkendpt.c +) +set_target_properties(mkturnout PROPERTIES COMPILE_FLAGS -DMKTURNOUT) +set_target_properties(mkturnout PROPERTIES FOLDER "Param Files" ) - ) -SET_TARGET_PROPERTIES(mkturnout PROPERTIES COMPILE_FLAGS -DMKTURNOUT) +target_include_directories(mkturnout + PRIVATE + ${messagefile_BINARY_DIR} +) -TARGET_LINK_LIBRARIES(mkturnout xtrkcad-cornu) +target_link_libraries(mkturnout + PRIVATE + xtrkcad-wlib +) -IF(NOT WIN32) - TARGET_LINK_LIBRARIES(mkturnout m) - TARGET_LINK_LIBRARIES(xtrkcad m) +add_dependencies(mkturnout + msgfiles + lines +) + +if(NOT WIN32) + target_link_libraries(mkturnout + PRIVATE + m + ) + target_link_libraries(${XTRKCAD_BIN} + PRIVATE + m + ) # Link libintl for systems where it is a separate library find_library( INTL_LIBRARY intl ) if(INTL_LIBRARY) - target_link_libraries( mkturnout ${INTL_LIBRARY} ) - endif(INTL_LIBRARY) -ELSE(NOT WIN32) - TARGET_LINK_LIBRARIES(mkturnout xtrkcad-wlib) - + target_link_libraries( mkturnout + PRIVATE + ${INTL_LIBRARY} + ) + endif() +else() # copy dlls into the build dir for easier debugging - add_custom_command( - TARGET xtrkcad POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy - ${FREEIMAGE_SHAREDLIB} - ${CMAKE_CURRENT_BINARY_DIR} - ) - - add_custom_command( - TARGET xtrkcad POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy - ${LIBZIP_SHAREDLIB} - ${CMAKE_CURRENT_BINARY_DIR} - ) - - add_custom_command( - TARGET xtrkcad POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy - ${ZLIB_SHAREDLIB} - ${CMAKE_CURRENT_BINARY_DIR} - ) - + COPYDLLTOBUILD(${FREEIMAGE_SHAREDLIB}) +# COPYDLLTOBUILD(${LIBZIP_SHAREDLIB}) +# COPYDLLTOBUILD(${ZLIB_SHAREDLIB}) + set(ENV{path} "${CMAKE_CURRENT_BINARY_DIR};$ENV{PATH}") # add dll to install package - INSTALL( - FILES - ${LIBZIP_SHAREDLIB} + install( + FILES ${LIBZIP_SHAREDLIB} DESTINATION ${XTRKCAD_BIN_INSTALL_DIR} ) - INSTALL(FILES - ${ZLIB_SHAREDLIB} + install( + FILES ${ZLIB_SHAREDLIB} DESTINATION ${XTRKCAD_BIN_INSTALL_DIR} ) - # Copy program PDB file - INSTALL( - FILES $ - DESTINATION ${XTRKCAD_BIN_INSTALL_DIR} OPTIONAL + # Copy program PDB file + install( + FILES $ + DESTINATION ${XTRKCAD_BIN_INSTALL_DIR} + OPTIONAL ) -ENDIF(NOT WIN32) +endif() # for testing only, should be IF(APPLE) ... -IF(APPLE) - ADD_EXECUTABLE( helphelper helphelper.c ) - FIND_LIBRARY(COREFOUNDATION_LIBRARY CoreFoundation) - FIND_LIBRARY(CARBON_LIBRARY Carbon) - TARGET_lINK_LIBRARIES(helphelper ${COREFOUNDATION_LIBRARY} ${CARBON_LIBRARY}) - INSTALL( +if(APPLE) + add_executable( helphelper helphelper.c ) + find_library(COREFOUNDATION_LIBRARY CoreFoundation) + find_library(CARBON_LIBRARY Carbon) + target_link_libraries(helphelper ${COREFOUNDATION_LIBRARY} ${CARBON_LIBRARY}) + install( TARGETS helphelper RUNTIME DESTINATION ${XTRKCAD_BIN_INSTALL_DIR} ) -ENDIF(APPLE) +endif() -INSTALL( - TARGETS xtrkcad +install( + TARGETS ${XTRKCAD_BIN} RUNTIME DESTINATION ${XTRKCAD_BIN_INSTALL_DIR} - ) +) if(XTRKCAD_TESTING AND CMOCKA_FOUND) add_subdirectory( unittest ) diff --git a/app/bin/acclkeys.h b/app/bin/acclkeys.h index d8c59d3..48ef6bb 100644 --- a/app/bin/acclkeys.h +++ b/app/bin/acclkeys.h @@ -17,7 +17,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* @@ -62,6 +62,7 @@ #define ACCL_DELETE (WCTL+'d') #define ACCL_TUNNEL (WCTL+WSHIFT+'t') #define ACCL_BRIDGE (0) +#define ACCL_ROADBED (0) #define ACCL_TIES (0) #define ACCL_HNDLDTO (WCTL+WSHIFT+'i') #define ACCL_TEXT (WCTL+WSHIFT+'x') @@ -124,6 +125,7 @@ #define ACCL_IMPORT (WALT+WCTL+'i') #define ACCL_IMPORT_MOD (0) #define ACCL_EXPORTDXF (0) +#define ACCL_EXPORTSVG (0) #define ACCL_LOOSEN (WCTL+WSHIFT+'k') #define ACCL_GROUP (WCTL+WSHIFT+'g') #define ACCL_UNGROUP (WCTL+WSHIFT+'u') diff --git a/app/bin/appdefaults.c b/app/bin/appdefaults.c index e5cff8b..0e1898d 100644 --- a/app/bin/appdefaults.c +++ b/app/bin/appdefaults.c @@ -17,7 +17,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software -* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include @@ -28,28 +28,28 @@ #include "paths.h" enum defaultTypes { - INTEGERCONSTANT, - FLOATCONSTANT, - STRINGCONSTANT, - INTEGERFUNCTION, - FLOATFUNCTION, - STRINGFUNCTION + INTEGERCONSTANT, + FLOATCONSTANT, + STRINGCONSTANT, + INTEGERFUNCTION, + FLOATFUNCTION, + STRINGFUNCTION }; struct appDefault { - char *defaultKey; /**< the key used to access the value */ - bool wasUsed; /**< value has already been used on this run */ - enum defaultTypes - valueType; /**< type of default, constant or pointer to a function */ - union { - int intValue; - double floatValue; - char *stringValue; - int (*intFunction)(struct appDefault *, void *); - double (*floatFunction)(struct appDefault *, void *); - char *(*stringFunction)(struct appDefault *, void *); - } defaultValue; - void *additionalData; + char *defaultKey; /**< the key used to access the value */ + bool wasUsed; /**< value has already been used on this run */ + enum defaultTypes + valueType; /**< type of default, constant or pointer to a function */ + union { + int intValue; + double floatValue; + char *stringValue; + int (*intFunction)(struct appDefault *, void *); + double (*floatFunction)(struct appDefault *, void *); + char *(*stringFunction)(struct appDefault *, void *); + } defaultValue; + void *additionalData; }; static int GetLocalMeasureSystem(struct appDefault *ptrDefault, @@ -63,7 +63,7 @@ static double GetLocalRoomSize(struct appDefault *ptrDefault, static char *GetParamFullPath(struct appDefault *ptrDefault, void *additionalData); static char *GetParamPrototype(struct appDefault *ptrDefault, - void *additionalData); + void *additionalData); /** * List of application default settings. As this is searched by binary search, the list has to be kept sorted @@ -73,46 +73,51 @@ static char *GetParamPrototype(struct appDefault *ptrDefault, struct appDefault xtcDefaults[] = { { "DialogItem.cmdopt-preselect", 0, INTEGERCONSTANT,{ .intValue = 1 } }, /**< default command is select */ - { "DialogItem.cmdopt-rightclickmode", 0, INTEGERCONSTANT,{ .intValue = 1 } }, /**< swap default to context */ + { "DialogItem.cmdopt-rightclickmode", 0, INTEGERCONSTANT,{ .intValue = 1 } }, /**< swap default to context */ { "DialogItem.cmdopt-selectmode", 0, INTEGERCONSTANT,{ .intValue = 0 } }, /**< 'Only' mode */ { "DialogItem.cmdopt-selectzero", 0, INTEGERCONSTANT,{ .intValue = 1 } }, /**< 'On' mode */ { "DialogItem.grid-horzenable", 0, INTEGERCONSTANT, { .intValue = 0 }}, { "DialogItem.grid-vertenable", 0, INTEGERCONSTANT,{ .intValue = 0 } }, { "DialogItem.pref-dstfmt", 0, INTEGERFUNCTION,{ .intFunction = GetLocalDistanceFormat } }, /**< number format for distances */ - { "DialogItem.pref-units", 0, INTEGERFUNCTION,{ .intFunction = GetLocalMeasureSystem } }, /**< default unit depends on region */ + { "DialogItem.pref-units", 0, INTEGERFUNCTION,{ .intFunction = GetLocalMeasureSystem } }, /**< default unit depends on region */ { "DialogItem.rgbcolor-exception", 0, INTEGERCONSTANT, { .intValue = 15923462 }}, /**< rich yellow as exception color */ { "Parameter File Map.British stock", 0, STRINGFUNCTION,{ .stringFunction = GetParamFullPath }, "br.xtp" }, { "Parameter File Map.European stock", 0, STRINGFUNCTION,{ .stringFunction = GetParamFullPath }, "eu.xtp" }, - { "Parameter File Map.NMRA RP12-25 Feb 2015 O scale Turnouts", 0, STRINGFUNCTION,{ .stringFunction = GetParamFullPath }, "nmra-o.xtp" }, - { "Parameter File Map.NMRA RP12-27 Feb 2015 S Scale Turnouts", 0, STRINGFUNCTION,{ .stringFunction = GetParamFullPath }, "nmra-s.xtp" }, - { "Parameter File Map.NMRA RP12-31 Feb 2015 HO Scale Turnouts", 0, STRINGFUNCTION,{ .stringFunction = GetParamFullPath }, "nmra-ho.xtp" }, - { "Parameter File Map.NMRA RP12-33 Feb 2015 TT Scale Turnouts", 0, STRINGFUNCTION,{ .stringFunction = GetParamFullPath }, "nmra-tt.xtp" }, - { "Parameter File Map.NMRA RP12-35 Feb 2015 N Scale Turnouts", 0, STRINGFUNCTION,{ .stringFunction = GetParamFullPath }, "nmra-n.xtp" }, - { "Parameter File Map.NMRA RP12-37 Feb 2015 Z scale Turnouts", 0, STRINGFUNCTION,{ .stringFunction = GetParamFullPath }, "nmra-z.xtp" }, + { "Parameter File Map.NMRA RP-12.25 Feb 2015 O scale Turnouts", 0, STRINGFUNCTION,{ .stringFunction = GetParamFullPath }, "nmra-o.xtp" }, + { "Parameter File Map.NMRA RP-12.27 Feb 2015 S Scale Turnouts", 0, STRINGFUNCTION,{ .stringFunction = GetParamFullPath }, "nmra-s.xtp" }, + { "Parameter File Map.NMRA RP-12.31 Feb 2015 HO Scale Turnouts", 0, STRINGFUNCTION,{ .stringFunction = GetParamFullPath }, "nmra-ho.xtp" }, + { "Parameter File Map.NMRA RP-12.33 Feb 2015 TT Scale Turnouts", 0, STRINGFUNCTION,{ .stringFunction = GetParamFullPath }, "nmra-tt.xtp" }, + { "Parameter File Map.NMRA RP-12.35 Feb 2015 N Scale Turnouts", 0, STRINGFUNCTION,{ .stringFunction = GetParamFullPath }, "nmra-n.xtp" }, + { "Parameter File Map.NMRA RP-12.37 Feb 2015 Z scale Turnouts", 0, STRINGFUNCTION,{ .stringFunction = GetParamFullPath }, "nmra-z.xtp" }, { "Parameter File Map.North American Prototypes", 0, STRINGFUNCTION,{ .stringFunction = GetParamFullPath }, "protoam.xtp" }, - { "Parameter File Map.Trees", 0, STRINGFUNCTION,{ .stringFunction = GetParamFullPath } , "trees.xtp" }, + { "Parameter File Map.Trees", 0, STRINGFUNCTION,{ .stringFunction = GetParamFullPath }, "trees.xtp" }, { "Parameter File Names.File1", 0, STRINGFUNCTION,{ .stringFunction = GetParamPrototype }}, { "Parameter File Names.File2", 0, STRINGCONSTANT,{ .stringValue = "Trees" } }, - { "Parameter File Names.File3", 0, STRINGCONSTANT,{ .stringValue = "NMRA RP12-37 Feb 2015 Z scale Turnouts" } }, - { "Parameter File Names.File4", 0, STRINGCONSTANT,{ .stringValue = "NMRA RP12-35 Feb 2015 N Scale Turnouts" } }, - { "Parameter File Names.File5", 0, STRINGCONSTANT,{ .stringValue = "NMRA RP12-33 Feb 2015 TT Scale Turnouts" } }, - { "Parameter File Names.File6", 0, STRINGCONSTANT,{ .stringValue = "NMRA RP12-31 Feb 2015 HO Scale Turnouts" } }, - { "Parameter File Names.File7", 0, STRINGCONSTANT,{ .stringValue = "NMRA RP12-27 Feb 2015 S Scale Turnouts" } }, - { "Parameter File Names.File8", 0, STRINGCONSTANT,{ .stringValue = "NMRA RP12-25 Feb 2015 O scale Turnouts" } }, - { "draw.roomsizeX", 0, FLOATFUNCTION, {.floatFunction = GetLocalRoomSize }}, /**< layout width */ - { "draw.roomsizeY", 0, FLOATFUNCTION,{ .floatFunction = GetLocalRoomSize } }, /**< layout depth */ - { "misc.scale", 0, STRINGFUNCTION, { .stringFunction = GetLocalPopularScale}}, /**< the (probably) most popular scale for a region */ + { "Parameter File Names.File3", 0, STRINGCONSTANT,{ .stringValue = "NMRA RP-12.37 Feb 2015 Z scale Turnouts" } }, + { "Parameter File Names.File4", 0, STRINGCONSTANT,{ .stringValue = "NMRA RP-12.35 Feb 2015 N Scale Turnouts" } }, + { "Parameter File Names.File5", 0, STRINGCONSTANT,{ .stringValue = "NMRA RP-12.33 Feb 2015 TT Scale Turnouts" } }, + { "Parameter File Names.File6", 0, STRINGCONSTANT,{ .stringValue = "NMRA RP-12.31 Feb 2015 HO Scale Turnouts" } }, + { "Parameter File Names.File7", 0, STRINGCONSTANT,{ .stringValue = "NMRA RP-12.27 Feb 2015 S Scale Turnouts" } }, + { "Parameter File Names.File8", 0, STRINGCONSTANT,{ .stringValue = "NMRA RP-12.25 Feb 2015 O scale Turnouts" } }, + { "draw.roomsizeX", 0, FLOATFUNCTION, {.floatFunction = GetLocalRoomSize }}, /**< layout width */ + { "draw.roomsizeY", 0, FLOATFUNCTION,{ .floatFunction = GetLocalRoomSize } }, /**< layout depth */ + { "misc.scale", 0, STRINGFUNCTION, { .stringFunction = GetLocalPopularScale}}, /**< the (probably) most popular scale for a region */ }; #define DEFAULTCOUNT COUNT(xtcDefaults) static long bFirstRun; /**< TRUE if appl is run the first time */ -static char regionCode[3]; /**< will be initialized to the locale's region code */ +static char +regionCode[3]; /**< will be initialized to the locale's region code */ -static wBool_t(*GetIntegerPref)(const char *, const char *, long *, long) = wPrefGetIntegerExt; /**< pointer to active integer pref getter */ -static wBool_t(*GetFloatPref)(const char *, const char *, double *, double) = wPrefGetFloatExt; /**< pointer to active float pref getter */ -static char *(*GetStringPref)(const char *, const char *) = wPrefGetStringExt; /**< pointer to active string pref getter */ +static wBool_t(*GetIntegerPref)(const char *, const char *, long *, + long) = wPrefGetIntegerExt; /**< pointer to active integer pref getter */ +static wBool_t(*GetFloatPref)(const char *, const char *, double *, + double) = wPrefGetFloatExt; /**< pointer to active float pref getter */ +static char *(*GetStringPref)(const char *, + const char *) = + wPrefGetStringExt; /**< pointer to active string pref getter */ /** * A recursive binary search function. It returns location of x in @@ -128,32 +133,32 @@ static char *(*GetStringPref)(const char *, const char *) = wPrefGetStringExt; static int binarySearch(struct appDefault arr[], int l, int r, char *key) { - if (r >= l) { - int mid = l + (r - l) / 2; - int res = strcmp(key, arr[mid].defaultKey); - - // If the element is present at the middle itself - if (!res) { - return mid; - } - - // If the array size is 1 - if (r == 0) { - return -1; - } - - // If element is smaller than mid, then it can only be present - // in left subarray - if (res < 0) { - return binarySearch(arr, l, mid - 1, key); - } - - // Else the element can only be present in right subarray - return binarySearch(arr, mid + 1, r, key); - } - - // We reach here when element is not present in array - return -1; + if (r >= l) { + int mid = l + (r - l) / 2; + int res = strcmp(key, arr[mid].defaultKey); + + // If the element is present at the middle itself + if (!res) { + return mid; + } + + // If the array size is 1 + if (r == 0) { + return -1; + } + + // If element is smaller than mid, then it can only be present + // in left subarray + if (res < 0) { + return binarySearch(arr, l, mid - 1, key); + } + + // Else the element can only be present in right subarray + return binarySearch(arr, mid + 1, r, key); + } + + // We reach here when element is not present in array + return -1; } /** @@ -168,20 +173,20 @@ struct appDefault * FindDefault(struct appDefault *defaultValues, const char *section, const char *name) { - char *searchString = malloc(strlen(section) + strlen(name) + - 2); //includes separator and terminating \0 - int res; - sprintf(searchString, "%s.%s", section, name); - - res = binarySearch(defaultValues, 0, DEFAULTCOUNT-1, searchString); - free(searchString); - - if (res != -1 && defaultValues[res].wasUsed == FALSE) { - defaultValues[res].wasUsed = TRUE; - return (defaultValues + res); - } else { - return (NULL); - } + char *searchString = malloc(strlen(section) + strlen(name) + + 2); //includes separator and terminating \0 + int res; + sprintf(searchString, "%s.%s", section, name); + + res = binarySearch(defaultValues, 0, DEFAULTCOUNT-1, searchString); + free(searchString); + + if (res != -1 && defaultValues[res].wasUsed == FALSE) { + defaultValues[res].wasUsed = TRUE; + return (defaultValues + res); + } else { + return (NULL); + } } /** * Get the application's default region code. On Windows, the system's API is used. @@ -191,32 +196,32 @@ FindDefault(struct appDefault *defaultValues, const char *section, static void InitializeRegionCode(void) { - strcpy(regionCode, "US"); + strcpy(regionCode, "US"); // TODO Move this to wlib #ifdef WINDOWS - { - LCID lcid; - char iso3166[10]; - - lcid = GetThreadLocale(); - GetLocaleInfo(lcid, LOCALE_SISO3166CTRYNAME, iso3166, sizeof(iso3166)); - strncpy(regionCode, iso3166, 2); - } + { + LCID lcid; + char iso3166[10]; + + lcid = GetThreadLocale(); + GetLocaleInfo(lcid, LOCALE_SISO3166CTRYNAME, iso3166, sizeof(iso3166)); + strncpy(regionCode, iso3166, 2); + } #else - { - char *pLang; - pLang = getenv("LANG"); - - if (pLang) { - char *ptr; - ptr = strpbrk(pLang, "_-"); - - if (ptr) { - strncpy(regionCode, ptr + 1, 2); - } - } - } + { + char *pLang; + pLang = getenv("LANG"); + + if (pLang) { + char *ptr; + ptr = strpbrk(pLang, "_-"); + + if (ptr) { + strncpy(regionCode, ptr + 1, 2); + } + } + } #endif } @@ -226,7 +231,7 @@ InitializeRegionCode(void) static bool UseMetric() { return ( strcmp( regionCode, "US" ) != 0 && - strcmp( regionCode, "CA" ) != 0 ); + strcmp( regionCode, "CA" ) != 0 ); } /** * For the US the classical 4x8 sheet is used as default size. in the metric world 1,25x2,0m is used. @@ -235,15 +240,15 @@ static bool UseMetric() static double GetLocalRoomSize(struct appDefault *ptrDefault, void *data) { - if (!strcmp(ptrDefault->defaultKey, "draw.roomsizeY")) { - return (UseMetric() ? 125.0/2.54 : 48); - } + if (!strcmp(ptrDefault->defaultKey, "draw.roomsizeY")) { + return (UseMetric() ? 125.0/2.54 : 48); + } - if (!strcmp(ptrDefault->defaultKey, "draw.roomsizeX")) { - return (UseMetric() ? 200.0 / 2.54 : 96); - } + if (!strcmp(ptrDefault->defaultKey, "draw.roomsizeX")) { + return (UseMetric() ? 200.0 / 2.54 : 96); + } - return (0.0); // should never get here + return (0.0); // should never get here } /** @@ -253,7 +258,7 @@ GetLocalRoomSize(struct appDefault *ptrDefault, void *data) static char * GetLocalPopularScale(struct appDefault *ptrDefault, void *data) { - return (strcmp(regionCode, "GB") ? "HO" : "OO"); + return (strcmp(regionCode, "GB") ? "HO" : "OO"); } /** @@ -262,7 +267,7 @@ GetLocalPopularScale(struct appDefault *ptrDefault, void *data) static int GetLocalMeasureSystem(struct appDefault *ptrDefault, void *data) { - return (UseMetric() ? 1 : 0); + return (UseMetric() ? 1 : 0); } /** @@ -271,18 +276,19 @@ GetLocalMeasureSystem(struct appDefault *ptrDefault, void *data) static int GetLocalDistanceFormat(struct appDefault *ptrDefault, void *data) { - return (UseMetric() ? 8 : 4); + return (UseMetric() ? 8 : 4); } /** -* Prototype definitions currently only exist for US and British. So US -* is assumed to be the default. +* Prototype definitions currently only exist for US and British. So US +* is assumed to be the default. */ static char* GetParamPrototype(struct appDefault *ptrDefault, void *additionalData) { - return (strcmp(regionCode, "GB") ? "North American Prototypes" : "British stock"); + return (strcmp(regionCode, + "GB") ? "North American Prototypes" : "British stock"); } /** @@ -291,9 +297,9 @@ GetParamPrototype(struct appDefault *ptrDefault, void *additionalData) static char * GetParamFullPath(struct appDefault *ptrDefault, void *additionalData) { - char *str; - MakeFullpath(&str, libDir, PARAM_SUBDIR, (char*)additionalData, I2VP(0)); - return str; + char *str; + MakeFullpath(&str, libDir, PARAM_SUBDIR, (char*)additionalData, I2VP(0)); + return str; } @@ -302,19 +308,21 @@ GetParamFullPath(struct appDefault *ptrDefault, void *additionalData) * allows to switch from the extended default version to the basic implementation. */ -wBool_t -wPrefGetInteger(const char *section, const char *name, long *result, long defaultValue) +wBool_t +wPrefGetInteger(const char *section, const char *name, long *result, + long defaultValue) { return GetIntegerPref(section, name, result, defaultValue); } wBool_t -wPrefGetFloat(const char *section, const char *name, double *result, double defaultValue) +wPrefGetFloat(const char *section, const char *name, double *result, + double defaultValue) { return GetFloatPref(section, name, result, defaultValue); } -char * +char * wPrefGetString(const char *section, const char *name) { return GetStringPref(section, name); @@ -334,20 +342,20 @@ wBool_t wPrefGetIntegerExt(const char *section, const char *name, long *result, long defaultValue) { - struct appDefault *thisDefault; + struct appDefault *thisDefault; - thisDefault = FindDefault(xtcDefaults, section, name); + thisDefault = FindDefault(xtcDefaults, section, name); - if (thisDefault) { - if (thisDefault->valueType == INTEGERCONSTANT) { - defaultValue = thisDefault->defaultValue.intValue; - } else { - defaultValue = (thisDefault->defaultValue.intFunction)(thisDefault, - thisDefault->additionalData); - } - } + if (thisDefault) { + if (thisDefault->valueType == INTEGERCONSTANT) { + defaultValue = thisDefault->defaultValue.intValue; + } else { + defaultValue = (thisDefault->defaultValue.intFunction)(thisDefault, + thisDefault->additionalData); + } + } - return (wPrefGetIntegerBasic(section, name, result, defaultValue)); + return (wPrefGetIntegerBasic(section, name, result, defaultValue)); } /** @@ -365,20 +373,20 @@ wBool_t wPrefGetFloatExt(const char *section, const char *name, double *result, double defaultValue) { - struct appDefault *thisDefault; + struct appDefault *thisDefault; - thisDefault = FindDefault(xtcDefaults, section, name); + thisDefault = FindDefault(xtcDefaults, section, name); - if (thisDefault) { - if (thisDefault->valueType == FLOATCONSTANT) { - defaultValue = thisDefault->defaultValue.floatValue; - } else { - defaultValue = (thisDefault->defaultValue.floatFunction)(thisDefault, - thisDefault->additionalData); - } - } + if (thisDefault) { + if (thisDefault->valueType == FLOATCONSTANT) { + defaultValue = thisDefault->defaultValue.floatValue; + } else { + defaultValue = (thisDefault->defaultValue.floatFunction)(thisDefault, + thisDefault->additionalData); + } + } - return (wPrefGetFloatBasic(section, name, result, defaultValue)); + return (wPrefGetFloatBasic(section, name, result, defaultValue)); } /** @@ -392,37 +400,38 @@ wPrefGetFloatExt(const char *section, const char *name, double *result, char * wPrefGetStringExt(const char *section, const char *name) { - struct appDefault *thisDefault; - - thisDefault = FindDefault(xtcDefaults, section, name); - - if (thisDefault) { - char *prefString; - char *defaultValue; - - if (thisDefault->valueType == STRINGCONSTANT) { - defaultValue = thisDefault->defaultValue.stringValue; - } else { - defaultValue = (thisDefault->defaultValue.stringFunction)(thisDefault, - thisDefault->additionalData); - } - - prefString = (char *)wPrefGetStringBasic(section, name); - return (prefString ? prefString : defaultValue); - } else { - return ((char *)wPrefGetStringBasic(section, name)); - } + struct appDefault *thisDefault; + + thisDefault = FindDefault(xtcDefaults, section, name); + + if ( thisDefault == NULL ) { + // Either we don't have a default value or we've already fetched it + return ((char *)wPrefGetStringBasic(section, name)); + } + + char *prefString; + char *defaultValue; + + if (thisDefault->valueType == STRINGCONSTANT) { + defaultValue = thisDefault->defaultValue.stringValue; + } else { + defaultValue = (thisDefault->defaultValue.stringFunction)(thisDefault, + thisDefault->additionalData); + } + // Next call will get value from Prefs + wPrefSetString( section, name, defaultValue ); + return (defaultValue); } /** * Initialize the application default system. The flag firstrun is used to find * out whether the application was run before. This is accomplished by trying - * to read it from the configuration file. As it is only written after this + * to read it from the configuration file. As it is only written after this * test, it can never be found on the first run of the application ie. when the * configuration file does not exist yet. */ -void +void InitAppDefaults(void) { wPrefGetIntegerBasic( "misc", "firstrun", &bFirstRun, TRUE); diff --git a/app/bin/archive.c b/app/bin/archive.c index 430db49..7b9d0e5 100644 --- a/app/bin/archive.c +++ b/app/bin/archive.c @@ -17,7 +17,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include @@ -28,10 +28,10 @@ #include "directory.h" #include "dynstring.h" #include "misc.h" -#include "misc2.h" #include "paths.h" #include "include/utf8convert.h" #include "common-ui.h" +#include "fileio.h" int log_zip = 0; @@ -45,7 +45,7 @@ int log_zip = 0; // char *tempBuffer = MyMalloc( cnt ); // char *destBuffer = MyMalloc( cnt ); // -// //// find the +// //// find the // //cnt = MultiByteToWideChar(CP_ACP, // // 0, // // nativeString, @@ -91,33 +91,33 @@ int log_zip = 0; char * GetZipDirectoryName(enum ArchiveOps op) { - char *opDesc; - char *directory; - DynString zipDirectory; + char *opDesc; + char *directory; + DynString zipDirectory; DynStringMalloc(&zipDirectory, 0); - switch (op) { - case ARCHIVE_READ: - opDesc = "in"; - break; - case ARCHIVE_WRITE: - opDesc = "out"; - break; - default: - opDesc = "err"; - break; - } - - DynStringPrintf(&zipDirectory, - "%s" FILE_SEP_CHAR "zip_%s.%d", - workingDir, - opDesc, - getpid()); - - directory = strdup(DynStringToCStr(&zipDirectory)); - DynStringFree(&zipDirectory); - return (directory); + switch (op) { + case ARCHIVE_READ: + opDesc = "in"; + break; + case ARCHIVE_WRITE: + opDesc = "out"; + break; + default: + opDesc = "err"; + break; + } + + DynStringPrintf(&zipDirectory, + "%s" FILE_SEP_CHAR "zip_%s.%d", + workingDir, + opDesc, + getpid()); + + directory = strdup(DynStringToCStr(&zipDirectory)); + DynStringFree(&zipDirectory); + return (directory); } /***************************************************************************** @@ -131,76 +131,76 @@ GetZipDirectoryName(enum ArchiveOps op) */ BOOL_T AddDirectoryToArchive( - struct zip * za, - const char * dir_path, - const char * prefix) + struct zip * za, + const char * dir_path, + const char * prefix) { - char *full_path; - char *arch_path; - DIR *dir; - const char * buf; - struct stat stat_path, stat_entry; - struct dirent *entry; - - zip_source_t * zt; - - // stat for the path - stat(dir_path, &stat_path); - - // if path does not exists or is not dir - exit with status -1 - if (S_ISDIR(stat_path.st_mode) == 0) { - NoticeMessage(MSG_NOT_DIR_FAIL, - _("Continue"), NULL, dir_path); - return FALSE; - } - - // if not possible to read the directory for this user - if ((dir = opendir(dir_path)) == NULL) { - NoticeMessage(MSG_OPEN_DIR_FAIL, - _("Continue"), NULL, dir_path); - return FALSE; - } - - // iteration through entries in the directory - while ((entry = readdir(dir)) != NULL) { - // skip entries "." and ".." - if (!strcmp(entry->d_name, ".") || !strcmp(entry->d_name, "..")) { - continue; - } - - // determinate a full path of an entry - MakeFullpath(&full_path, dir_path, entry->d_name, NULL); - - // stat for the entry - stat(full_path, &stat_entry); - - if (prefix && prefix[0]) { - MakeFullpath(&arch_path, prefix, entry->d_name, NULL); - } else { - MakeFullpath(&arch_path, entry->d_name, NULL); - } - - // recursively add a nested directory - if (S_ISDIR(stat_entry.st_mode) != 0) { - if (zip_dir_add(za, arch_path, 0) < 0) { - zip_error_t *ziperr = zip_get_error(za); - buf = zip_error_strerror(ziperr); - NoticeMessage(MSG_ZIP_DIR_ADD_FAIL, - _("Continue"), NULL, arch_path, buf); + char *full_path; + char *arch_path; + DIR *dir; + const char * buf; + struct stat stat_path, stat_entry; + struct dirent *entry; + + zip_source_t * zt; + + // stat for the path + stat(dir_path, &stat_path); + + // if path does not exists or is not dir - exit with status -1 + if (S_ISDIR(stat_path.st_mode) == 0) { + NoticeMessage(MSG_NOT_DIR_FAIL, + _("Continue"), NULL, dir_path); + return FALSE; + } + + // if not possible to read the directory for this user + if ((dir = opendir(dir_path)) == NULL) { + NoticeMessage(MSG_OPEN_DIR_FAIL, + _("Continue"), NULL, dir_path); + return FALSE; + } + + // iteration through entries in the directory + while ((entry = readdir(dir)) != NULL) { + // skip entries "." and ".." + if (!strcmp(entry->d_name, ".") || !strcmp(entry->d_name, "..")) { + continue; + } + + // determinate a full path of an entry + MakeFullpath(&full_path, dir_path, entry->d_name, NULL); + + // stat for the entry + stat(full_path, &stat_entry); + + if (prefix && prefix[0]) { + MakeFullpath(&arch_path, prefix, entry->d_name, NULL); + } else { + MakeFullpath(&arch_path, entry->d_name, NULL); + } + + // recursively add a nested directory + if (S_ISDIR(stat_entry.st_mode) != 0) { + if (zip_dir_add(za, arch_path, 0) < 0) { + zip_error_t *ziperr = zip_get_error(za); + buf = zip_error_strerror(ziperr); + NoticeMessage(MSG_ZIP_DIR_ADD_FAIL, + _("Continue"), NULL, arch_path, buf); #if DEBUG - printf("Added Directory %s \n", arch_path); + printf("Added Directory %s \n", arch_path); #endif - } - - if (AddDirectoryToArchive(za, full_path, arch_path) != TRUE) { - free(full_path); - free(arch_path); - return FALSE; - } - free(arch_path); - continue; - } else { + } + + if (AddDirectoryToArchive(za, full_path, arch_path) != TRUE) { + free(full_path); + free(arch_path); + return FALSE; + } + free(arch_path); + continue; + } else { char *archPathUtf8 = MyStrdup(arch_path); char *fullPathUtf8 = MyStrdup(full_path); #ifdef UTFCONVERT @@ -208,30 +208,30 @@ BOOL_T AddDirectoryToArchive( fullPathUtf8 = Convert2UTF8(fullPathUtf8); ConvertPathForward(archPathUtf8); #endif // UTFCONVERT - zt = zip_source_file(za, fullPathUtf8, 0, -1); - if (zip_file_add(za, archPathUtf8, zt, ZIP_FL_ENC_UTF_8) == -1) { - zip_error_t *ziperr = zip_get_error(za); - buf = zip_error_strerror(ziperr); - NoticeMessage(MSG_ZIP_FILE_ADD_FAIL, _("Continue"), NULL, full_path, arch_path, - buf); - free(full_path); - free(arch_path); + zt = zip_source_file(za, fullPathUtf8, 0, -1); + if (zip_file_add(za, archPathUtf8, zt, ZIP_FL_ENC_UTF_8) == -1) { + zip_error_t *ziperr = zip_get_error(za); + buf = zip_error_strerror(ziperr); + NoticeMessage(MSG_ZIP_FILE_ADD_FAIL, _("Continue"), NULL, full_path, arch_path, + buf); + free(full_path); + free(arch_path); MyFree(fullPathUtf8); MyFree(archPathUtf8); - return FALSE; - } + return FALSE; + } MyFree(fullPathUtf8); MyFree(archPathUtf8); #if DEBUG - printf("Added File %s", full_path); + printf("Added File %s", full_path); #endif - } - free(arch_path); - free(full_path); - } + } + free(arch_path); + free(full_path); + } - closedir(dir); - return TRUE; + closedir(dir); + return TRUE; } /*********************************************************************** @@ -244,20 +244,20 @@ BOOL_T AddDirectoryToArchive( */ BOOL_T CreateArchive( - const char * dir_path, - const char * fileName) + const char * dir_path, + const char * fileName) { - struct zip *za; - int err; - char buf[100]; + struct zip *za; + int err; + zip_error_t error; - char * archive = MyStrdup(fileName); // Because of const char - char * archive_name = FindFilename(archive); - char * archive_path; + char * archive = MyStrdup(fileName); // Because of const char + char * archive_name = FindFilename(archive); + char * archive_path; char * archiveUtf8; - MakeFullpath(&archive_path, workingDir, archive_name, NULL); - + MakeFullpath(&archive_path, workingDir, archive_name, NULL); + archiveUtf8 = MyStrdup(archive_path); #ifdef UTFCONVERT archiveUtf8 = Convert2UTF8(archiveUtf8); @@ -265,43 +265,51 @@ BOOL_T CreateArchive( MyFree(archive); - if ((za = zip_open(archiveUtf8, ZIP_CREATE, &err)) == NULL) { - zip_error_to_str(buf, sizeof(buf), err, errno); - NoticeMessage(MSG_ZIP_CREATE_FAIL, _("Continue"), NULL, archiveUtf8, buf); - MyFree(archiveUtf8); - return FALSE; - } + if ((za = zip_open(archiveUtf8, ZIP_CREATE, &err)) == NULL) { + zip_error_init_with_code(&error, err); + NoticeMessage(MSG_ZIP_CREATE_FAIL, _("Continue"), NULL, archiveUtf8, + zip_error_strerror(&error)); + zip_error_fini(&error); + MyFree(archiveUtf8); + return FALSE; + } #if DEBUG - printf("====================== \n"); - printf("Started Archive %s", archive_path); + printf("====================== \n"); + printf("Started Archive %s", archive_path); #endif - AddDirectoryToArchive(za, dir_path, ""); - - if (zip_close(za) == -1) { - zip_error_to_str(buf, sizeof(buf), err, errno); - NoticeMessage(MSG_ZIP_CLOSE_FAIL, _("Continue"), NULL, archiveUtf8, buf); - free(archive_path); - MyFree(archiveUtf8); - return FALSE; - } + AddDirectoryToArchive(za, dir_path, ""); - unlink(fileName); //Delete Old - if (rename(archive_path, fileName) == -1) { //Move zip into place - NoticeMessage(MSG_ZIP_RENAME_FAIL, _("Continue"), NULL, archiveUtf8, fileName, - strerror(errno)); + if (zip_close(za) == -1) { + zip_error_init_with_code(&error, err); + NoticeMessage(MSG_ZIP_CLOSE_FAIL, _("Continue"), NULL, archiveUtf8, + zip_error_strerror(&error)); + zip_error_fini(&error); free(archive_path); MyFree(archiveUtf8); - return FALSE; - } + return FALSE; + } + + unlink(fileName); //Delete Old + if (rename(archive_path, fileName) == -1) { //Move zip into place + if ( Copyfile( archive_path, fileName ) == -1 ) { + NoticeMessage(MSG_ZIP_RENAME_FAIL, _("Continue"), NULL, archiveUtf8, + fileName, strerror(errno)); + free(archive_path); + MyFree(archiveUtf8); + return FALSE; + } else { + unlink( archive_path ); + } + } free(archive_path); MyFree(archiveUtf8); #if DEBUG - printf("Moved Archive to %s", fileName); - printf("====================== \n"); + printf("Moved Archive to %s", fileName); + printf("====================== \n"); #endif - return TRUE; + return TRUE; } /************************************************************************** @@ -314,21 +322,22 @@ BOOL_T CreateArchive( * \returns TRUE if all worked */ BOOL_T UnpackArchiveFor( - const char * pathName, /*Full name of archive*/ - const char * fileName, /*Layout name and extension */ - const char * tempDir, /*Directory to unpack into */ - BOOL_T file_only) + const char * pathName, /*Full name of archive*/ + const char * fileName, /*Layout name and extension */ + const char * tempDir, /*Directory to unpack into */ + BOOL_T file_only) { - char *dirName; - struct zip *za; - struct zip_file *zf; - struct zip_stat sb; - char buf[100]; - int err; - int i; - int64_t len; - FILE *fd; - long long sum; + char *dirName; + struct zip *za; + struct zip_file *zf; + struct zip_stat sb; + char buf[100]; + zip_error_t error; + int err; + int i; + int64_t len; + FILE *fd; + long long sum; char *destBuffer = MyStrdup(pathName); #ifdef UTFCONVERT @@ -336,95 +345,97 @@ BOOL_T UnpackArchiveFor( #endif // UTFCONVERT - if ((za = zip_open(destBuffer, 0, &err)) == NULL) { - zip_error_to_str(buf, sizeof(buf), err, errno); - NoticeMessage(MSG_ZIP_OPEN_FAIL, _("Continue"), NULL, pathName, buf); - fprintf(stderr, "xtrkcad: can't open xtrkcad zip archive `%s': %s \n", - pathName, buf); + if ((za = zip_open(destBuffer, 0, &err)) == NULL) { + zip_error_init_with_code(&error, err); + NoticeMessage(MSG_ZIP_OPEN_FAIL, _("Continue"), NULL, pathName, + zip_error_strerror(&error)); + fprintf(stderr, "xtrkcad: can't open xtrkcad zip archive `%s': %s \n", + pathName, zip_error_strerror(&error)); + zip_error_fini(&error); MyFree(destBuffer); - return FALSE; - } + return FALSE; + } - for (i = 0; i < zip_get_num_entries(za, 0); i++) { - if (zip_stat_index(za, i, 0, &sb) == 0) { - len = strlen(sb.name); + for (i = 0; i < zip_get_num_entries(za, 0); i++) { + if (zip_stat_index(za, i, 0, &sb) == 0) { + len = strlen(sb.name); #if DEBUG - printf("==================\n"); - printf("Name: [%s], ", sb.name); - printf("Size: [%llu], ", sb.size); - printf("mtime: [%u]\n", (unsigned int)sb.mtime); - printf("mtime: [%u]\n", (unsigned int)sb.mtime); + printf("==================\n"); + printf("Name: [%s], ", sb.name); + printf("Size: [%llu], ", sb.size); + printf("mtime: [%u]\n", (unsigned int)sb.mtime); + printf("mtime: [%u]\n", (unsigned int)sb.mtime); #endif - LOG(log_zip, 1, ("================= \n")) - LOG(log_zip, 1, ("Zip-Name [%s] \n", sb.name)) - LOG(log_zip, 1, ("Zip-Size [%llu] \n", sb.size)) - LOG(log_zip, 1, ("Zip-mtime [%u] \n", (unsigned int)sb.mtime)) - - if (sb.name[len - 1] == '/' && !file_only) { - MakeFullpath(&dirName, tempDir, &sb.name[0], NULL); - if (SafeCreateDir(dirName) != TRUE) { - free(dirName); - return FALSE; - } - free(dirName); - } else { - zf = zip_fopen_index(za, i, 0); - if (!zf) { - NoticeMessage(MSG_ZIP_INDEX_FAIL, _("Continue"), NULL); - fprintf(stderr, "xtrkcad zip archive open index error \n"); - return FALSE; - } - - if (file_only) { - if (strncmp(sb.name, fileName, strlen(fileName)) != 0) { - continue; /* Ignore any other files than the one we asked for */ - } - } - MakeFullpath(&dirName, tempDir, &sb.name[0], NULL); + LOG(log_zip, 1, ("================= \n")) + LOG(log_zip, 1, ("Zip-Name [%s] \n", sb.name)) + LOG(log_zip, 1, ("Zip-Size [%llu] \n", sb.size)) + LOG(log_zip, 1, ("Zip-mtime [%u] \n", (unsigned int)sb.mtime)) + + if (sb.name[len - 1] == '/' && !file_only) { + MakeFullpath(&dirName, tempDir, &sb.name[0], NULL); + if (SafeCreateDir(dirName) != TRUE) { + free(dirName); + return FALSE; + } + free(dirName); + } else { + zf = zip_fopen_index(za, i, 0); + if (!zf) { + NoticeMessage(MSG_ZIP_INDEX_FAIL, _("Continue"), NULL); + fprintf(stderr, "xtrkcad zip archive open index error \n"); + return FALSE; + } + + if (file_only) { + if (strncmp(sb.name, fileName, strlen(fileName)) != 0) { + continue; /* Ignore any other files than the one we asked for */ + } + } + MakeFullpath(&dirName, tempDir, &sb.name[0], NULL); #ifdef UTFCONVERT ConvertUTF8ToSystem(dirName); #endif // UTFCONVERT fd = fopen(dirName, "wb"); - if (!fd) { - NoticeMessage(MSG_ZIP_FILE_OPEN_FAIL, _("Continue"), NULL, dirName, - strerror(errno)); - free(dirName); - return FALSE; - } - - sum = 0; - while (sum != sb.size) { - len = zip_fread(zf, buf, 100); - if (len < 0) { - NoticeMessage(MSG_ZIP_READ_FAIL, _("Continue"), NULL, dirName, &sb.name[0]); - free(dirName); + if (!fd) { + NoticeMessage(MSG_ZIP_FILE_OPEN_FAIL, _("Continue"), NULL, dirName, + strerror(errno)); + free(dirName); + return FALSE; + } + + sum = 0; + while (sum != sb.size) { + len = zip_fread(zf, buf, 100); + if (len < 0) { + NoticeMessage(MSG_ZIP_READ_FAIL, _("Continue"), NULL, dirName, &sb.name[0]); + free(dirName); fclose(fd); - return FALSE; - } - fwrite(buf, 1, (unsigned int)len, fd); - sum += len; - } - fclose(fd); - free(dirName); - zip_fclose(zf); - } - } else { - LOG(log_zip, 1, ("Zip-Unknown File[%s] Line[%d] \n", __FILE__, __LINE__)) + return FALSE; + } + fwrite(buf, 1, (unsigned int)len, fd); + sum += len; + } + fclose(fd); + free(dirName); + zip_fclose(zf); + } + } else { + LOG(log_zip, 1, ("Zip-Unknown File[%s] Line[%d] \n", __FILE__, __LINE__)) #if DEBUG - printf("File[%s] Line[%d]\n", __FILE__, __LINE__); + printf("File[%s] Line[%d]\n", __FILE__, __LINE__); #endif - } - } + } + } MyFree(destBuffer); - if (zip_close(za) == -1) { - NoticeMessage(MSG_ZIP_CLOSE_FAIL, _("Continue"), NULL, dirName, &sb.name[0]); - return FALSE; - } - return TRUE; + if (zip_close(za) == -1) { + NoticeMessage(MSG_ZIP_CLOSE_FAIL, _("Continue"), NULL, dirName, &sb.name[0]); + return FALSE; + } + return TRUE; } diff --git a/app/bin/archive.h b/app/bin/archive.h index 7977bc6..8c938b2 100644 --- a/app/bin/archive.h +++ b/app/bin/archive.h @@ -9,7 +9,9 @@ extern const char *workingDir; struct zip; char *GetZipDirectoryName(enum ArchiveOps op); -BOOL_T AddDirectoryToArchive(struct zip * za, const char * dir_path, const char * prefix); +BOOL_T AddDirectoryToArchive(struct zip * za, const char * dir_path, + const char * prefix); BOOL_T CreateArchive(const char * dir_path, const char * fileName); -BOOL_T UnpackArchiveFor(const char * pathName, const char * fileName, const char * tempDir, BOOL_T file_only); +BOOL_T UnpackArchiveFor(const char * pathName, const char * fileName, + const char * tempDir, BOOL_T file_only); #endif diff --git a/app/bin/bdf2xtp.c b/app/bin/bdf2xtp.c index f19ceb8..20cea11 100644 --- a/app/bin/bdf2xtp.c +++ b/app/bin/bdf2xtp.c @@ -17,30 +17,30 @@ #include char helpStr[] = -"Bdf2xtp translates .bdf files (which are source files for Winrail track\n" -"libraries) to .xtp files (which are XTrkCad parameter files).\n" -"Bdf2xtp is a MS-DOS command and must be in run in a DOS box under MS-Windows.\n" -"\n" -"Usage: bdf2xtp OPTIONS SOURCE.BDF TARGET.XTP\n" -"\n" -"OPTIONS:\n" -" -c CONTENTS description of contents\n" -" -k COLOR color of non-track segments\n" -" -s SCALE scale of turnouts (ie. HO HOn3 N O S ... )\n" -" -v verbose - include .bdf source as comments in .xtp file\n" -"\n" -"For example:\n" -" bdf2xtp -c \"Faller HO Structures\" -k ff0000 -s HO fallerh0.bdf fallerh0.xtp\n" -"\n" -"Turnouts are composed of rails (which are Black) and lines. Structures are\n" -"composed of only lines. By default lines are Purple but you change this with\n" -"the -k optioon. The color is specified as a 6 digit hexidecimal value, where\n" -"the first 2 digits are the Red value, the middle 2 digits are the Green value\n" -"and the last 2 digits are the Blue value\n" -" ff0000 Red\n" -" 00ff00 Green\n" -" 00ffff Yellow\n" -; + "Bdf2xtp translates .bdf files (which are source files for Winrail track\n" + "libraries) to .xtp files (which are XTrkCad parameter files).\n" + "Bdf2xtp is a MS-DOS command and must be in run in a DOS box under MS-Windows.\n" + "\n" + "Usage: bdf2xtp OPTIONS SOURCE.BDF TARGET.XTP\n" + "\n" + "OPTIONS:\n" + " -c CONTENTS description of contents\n" + " -k COLOR color of non-track segments\n" + " -s SCALE scale of turnouts (ie. HO HOn3 N O S ... )\n" + " -v verbose - include .bdf source as comments in .xtp file\n" + "\n" + "For example:\n" + " bdf2xtp -c \"Faller HO Structures\" -k ff0000 -s HO fallerh0.bdf fallerh0.xtp\n" + "\n" + "Turnouts are composed of rails (which are Black) and lines. Structures are\n" + "composed of only lines. By default lines are Purple but you change this with\n" + "the -k optioon. The color is specified as a 6 digit hexidecimal value, where\n" + "the first 2 digits are the Red value, the middle 2 digits are the Green value\n" + "and the last 2 digits are the Blue value\n" + " ff0000 Red\n" + " 00ff00 Green\n" + " 00ffff Yellow\n" + ; /* NOTES: BDF files have a number of constructors for different types of turnouts @@ -89,9 +89,9 @@ Then the list of segments is written out to the output file. #define MAXSEG (40) /* Maximum number of segments in an object */ typedef struct { /* a co-ordinate */ - double x; - double y; - } coOrd; + double x; + double y; +} coOrd; FILE * fin; /* input file */ FILE * fout; /* output file */ @@ -107,8 +107,8 @@ long color = 0x00FF00FF;/* default color */ double normalizeAngle( double angle ) /* make sure is >= 0.0 and < 360.0 */ { - while (angle<0) angle += 360.0; - while (angle>=360) angle -= 360.0; + while (angle<0) { angle += 360.0; } + while (angle>=360) { angle -= 360.0; } return angle; } @@ -143,8 +143,8 @@ double findAngle( coOrd p0, coOrd p1 ) { double dx = p1.x-p0.x, dy = p1.y-p0.y; if (small(dx) && small(dy)) { - if (dy >=0.0) return 0.0; - else return 180.0; + if (dy >=0.0) { return 0.0; } + else { return 180.0; } } return R2D(atan2( dx,dy )); } @@ -152,156 +152,157 @@ double findAngle( coOrd p0, coOrd p1 ) /* Where do we expect each input line? */ typedef enum { - CLS_NULL, - CLS_START, - CLS_END, - CLS_BODY - } class_e; + CLS_NULL, + CLS_START, + CLS_END, + CLS_BODY +} class_e; /* Type of input line */ typedef enum { - ACT_UNKNOWN, - ACT_DONE, - ACT_STRAIGHT, - ACT_CURVE, - ACT_TURNOUT_LEFT, - ACT_TURNOUT_RIGHT, - ACT_CURVEDTURNOUT_LEFT, - ACT_CURVEDTURNOUT_RIGHT, - ACT_THREEWAYTURNOUT, - ACT_CROSSING_LEFT, - ACT_CROSSING_RIGHT, - ACT_DOUBLESLIP_LEFT, - ACT_DOUBLESLIP_RIGHT, - ACT_CROSSING_SYMMETRIC, - ACT_DOUBLESLIP_SYMMETRIC, - ACT_TURNTABLE, - ACT_ENDTURNTABLE, - ACT_TRANSFERTABLE, - ACT_ENDTRANSFERTABLE, - ACT_TRACK, - ACT_STRUCTURE, - ACT_ENDSTRUCTURE, - - ACT_FILL_POINT, - ACT_LINE, - ACT_CURVEDLINE, - ACT_CIRCLE, - ACT_DESCRIPTIONPOS, - ACT_ARTICLENOPOS, - ACT_CONNECTINGPOINT, - ACT_STRAIGHTTRACK, - ACT_CURVEDTRACK, - ACT_STRAIGHT_BODY, - ACT_CURVE_BODY, - ACT_PRICE - } action_e; + ACT_UNKNOWN, + ACT_DONE, + ACT_STRAIGHT, + ACT_CURVE, + ACT_TURNOUT_LEFT, + ACT_TURNOUT_RIGHT, + ACT_CURVEDTURNOUT_LEFT, + ACT_CURVEDTURNOUT_RIGHT, + ACT_THREEWAYTURNOUT, + ACT_CROSSING_LEFT, + ACT_CROSSING_RIGHT, + ACT_DOUBLESLIP_LEFT, + ACT_DOUBLESLIP_RIGHT, + ACT_CROSSING_SYMMETRIC, + ACT_DOUBLESLIP_SYMMETRIC, + ACT_TURNTABLE, + ACT_ENDTURNTABLE, + ACT_TRANSFERTABLE, + ACT_ENDTRANSFERTABLE, + ACT_TRACK, + ACT_STRUCTURE, + ACT_ENDSTRUCTURE, + + ACT_FILL_POINT, + ACT_LINE, + ACT_CURVEDLINE, + ACT_CIRCLE, + ACT_DESCRIPTIONPOS, + ACT_ARTICLENOPOS, + ACT_CONNECTINGPOINT, + ACT_STRAIGHTTRACK, + ACT_CURVEDTRACK, + ACT_STRAIGHT_BODY, + ACT_CURVE_BODY, + ACT_PRICE +} action_e; /* input line description */ typedef struct { - char * name; /* first token on line */ - class_e class; /* where do we expect this? */ - action_e action;/* what type of line is it */ - char *args; /* what else is on the line */ - } tokenDesc_t; + char * name; /* first token on line */ + class_e class; /* where do we expect this? */ + action_e action;/* what type of line is it */ + char *args; /* what else is on the line */ +} tokenDesc_t; /* first token on each line tells what kind of line it is */ tokenDesc_t tokens[] = { - { "Straight", CLS_START, ACT_STRAIGHT, "SSNN" }, - { "EndStraight", CLS_END, ACT_DONE, NULL }, - { "Curve", CLS_START, ACT_CURVE, "SSNNN" }, - { "EndCurve", CLS_END, ACT_DONE, NULL }, - { "Turnout_Left", CLS_START, ACT_TURNOUT_LEFT, "SSN" }, - { "Turnout_Right", CLS_START, ACT_TURNOUT_RIGHT, "SSN" }, - { "EndTurnout", CLS_END, ACT_DONE, NULL }, - { "CurvedTurnout_Left", CLS_START, ACT_CURVEDTURNOUT_LEFT, "SSN" }, - { "CurvedTurnout_Right", CLS_START, ACT_CURVEDTURNOUT_RIGHT, "SSN" }, - { "ThreeWayTurnout", CLS_START, ACT_THREEWAYTURNOUT, "SSN" }, - { "Crossing_Left", CLS_START, ACT_CROSSING_LEFT, "SSNNNN" }, - { "Crossing_Right", CLS_START, ACT_CROSSING_RIGHT, "SSNNNN" }, - { "DoubleSlip_Left", CLS_START, ACT_DOUBLESLIP_LEFT, "SSNNNNN" }, - { "DoubleSlip_Right", CLS_START, ACT_DOUBLESLIP_RIGHT, "SSNNNNN" }, - { "Crossing_Symetric", CLS_START, ACT_CROSSING_SYMMETRIC, "SSNNN" }, - { "DoubleSlip_Symetric", CLS_START, ACT_DOUBLESLIP_SYMMETRIC, "SSNNNN" }, - { "EndCrossing", CLS_END, ACT_DONE, NULL }, - { "Turntable", CLS_START, ACT_TURNTABLE, "SSNNNN" }, - { "EndTurntable", CLS_END, ACT_ENDTURNTABLE, NULL }, - { "TravellingPlatform", CLS_START, ACT_TRANSFERTABLE, "SSNNNNN" }, - { "EndTravellingPlatform", CLS_END, ACT_ENDTRANSFERTABLE, NULL }, - { "Track", CLS_START, ACT_TRACK, "SSN" }, - { "EndTrack", CLS_END, ACT_DONE, NULL }, - { "Structure", CLS_START, ACT_STRUCTURE, "SS" }, - { "EndStructure", CLS_END, ACT_ENDSTRUCTURE, NULL }, - - { "FillPoint", CLS_BODY, ACT_FILL_POINT, "NNI" }, - { "Line", CLS_BODY, ACT_LINE, "NNNN" }, - { "CurvedLine", CLS_BODY, ACT_CURVEDLINE, "NNNNN" }, - { "CurveLine", CLS_BODY, ACT_CURVEDLINE, "NNNNN" }, - { "Circle", CLS_BODY, ACT_CIRCLE, "NNN" }, - { "DescriptionPos", CLS_BODY, ACT_DESCRIPTIONPOS, "NN" }, - { "ArticleNoPos", CLS_BODY, ACT_DESCRIPTIONPOS, "NN" }, - { "ConnectingPoint", CLS_BODY, ACT_CONNECTINGPOINT, "NNN" }, - { "StraightTrack", CLS_BODY, ACT_STRAIGHTTRACK, "NNNN" }, - { "CurvedTrack", CLS_BODY, ACT_CURVEDTRACK, "NNNNN" }, - { "Straight", CLS_BODY, ACT_STRAIGHT_BODY, "N" }, - { "Curve", CLS_BODY, ACT_CURVE_BODY, "NNN" }, - { "Price", CLS_BODY, ACT_PRICE, "N" }, - - { "Gerade", CLS_START, ACT_STRAIGHT, "SSNN" }, - { "EndGerade", CLS_END, ACT_DONE, NULL }, - { "Bogen", CLS_START, ACT_CURVE, "SSNNN" }, - { "EndBogen", CLS_END, ACT_DONE, NULL }, - { "Weiche_links", CLS_START, ACT_TURNOUT_LEFT, "SSN" }, - { "Weiche_Rechts", CLS_START, ACT_TURNOUT_RIGHT, "SSN" }, - { "EndWeiche", CLS_END, ACT_DONE, NULL }, - { "Bogenweiche_Links", CLS_START, ACT_CURVEDTURNOUT_LEFT, "SSN" }, - { "Bogenweiche_Rechts", CLS_START, ACT_CURVEDTURNOUT_RIGHT, "SSN" }, - { "Dreiwegweiche", CLS_START, ACT_THREEWAYTURNOUT, "SSN" }, - { "Kreuzung_Links", CLS_START, ACT_CROSSING_LEFT, "SSNNNN" }, - { "Kreuzung_Rechts", CLS_START, ACT_CROSSING_RIGHT, "SSNNNN" }, - { "DKW_Links", CLS_START, ACT_DOUBLESLIP_LEFT, "SSNNNNN" }, - { "DKW_Rechts", CLS_START, ACT_DOUBLESLIP_RIGHT, "SSNNNNN" }, - { "Kreuzung_Symmetrisch", CLS_START, ACT_CROSSING_SYMMETRIC, "SSNNN" }, - { "DKW_Symmetrisch", CLS_START, ACT_DOUBLESLIP_SYMMETRIC, "SSNNNN" }, - { "EndKreuzung", CLS_END, ACT_DONE, NULL }, - { "Drehscheibe", CLS_START, ACT_TURNTABLE, "SSNNNN" }, - { "EndDrehscheibe", CLS_END, ACT_ENDTURNTABLE, NULL }, - { "Schiebebuehne", CLS_START, ACT_TRANSFERTABLE, "SSNNNNN" }, - { "EndSchiebebuehne", CLS_END, ACT_ENDTRANSFERTABLE, NULL }, - { "Schiene", CLS_START, ACT_TRACK, "SSN" }, - { "EndSchiene", CLS_END, ACT_DONE, NULL }, - { "Haus", CLS_START, ACT_STRUCTURE, "SS" }, - { "EndHaus", CLS_END, ACT_ENDSTRUCTURE, NULL }, - - { "FuellPunkt", CLS_BODY, ACT_FILL_POINT, "NNI" }, - { "Linie", CLS_BODY, ACT_LINE, "NNNN" }, - { "Bogenlinie", CLS_BODY, ACT_CURVEDLINE, "NNNNN" }, - { "Kreislinie", CLS_BODY, ACT_CIRCLE, "NNN" }, - { "BezeichnungsPos", CLS_BODY, ACT_DESCRIPTIONPOS, "NN" }, - { "ArtikelNrPos", CLS_BODY, ACT_DESCRIPTIONPOS, "NN" }, - { "Anschlusspunkt", CLS_BODY, ACT_CONNECTINGPOINT, "NNN" }, - { "GeradesGleis", CLS_BODY, ACT_STRAIGHTTRACK, "NNNN" }, - { "BogenGleis", CLS_BODY, ACT_CURVEDTRACK, "NNNNN" }, - { "Gerade", CLS_BODY, ACT_STRAIGHT_BODY, "N" }, - { "Bogen", CLS_BODY, ACT_CURVE_BODY, "NNN" }, - { "Preis", CLS_BODY, ACT_PRICE, "N" } }; + { "Straight", CLS_START, ACT_STRAIGHT, "SSNN" }, + { "EndStraight", CLS_END, ACT_DONE, NULL }, + { "Curve", CLS_START, ACT_CURVE, "SSNNN" }, + { "EndCurve", CLS_END, ACT_DONE, NULL }, + { "Turnout_Left", CLS_START, ACT_TURNOUT_LEFT, "SSN" }, + { "Turnout_Right", CLS_START, ACT_TURNOUT_RIGHT, "SSN" }, + { "EndTurnout", CLS_END, ACT_DONE, NULL }, + { "CurvedTurnout_Left", CLS_START, ACT_CURVEDTURNOUT_LEFT, "SSN" }, + { "CurvedTurnout_Right", CLS_START, ACT_CURVEDTURNOUT_RIGHT, "SSN" }, + { "ThreeWayTurnout", CLS_START, ACT_THREEWAYTURNOUT, "SSN" }, + { "Crossing_Left", CLS_START, ACT_CROSSING_LEFT, "SSNNNN" }, + { "Crossing_Right", CLS_START, ACT_CROSSING_RIGHT, "SSNNNN" }, + { "DoubleSlip_Left", CLS_START, ACT_DOUBLESLIP_LEFT, "SSNNNNN" }, + { "DoubleSlip_Right", CLS_START, ACT_DOUBLESLIP_RIGHT, "SSNNNNN" }, + { "Crossing_Symetric", CLS_START, ACT_CROSSING_SYMMETRIC, "SSNNN" }, + { "DoubleSlip_Symetric", CLS_START, ACT_DOUBLESLIP_SYMMETRIC, "SSNNNN" }, + { "EndCrossing", CLS_END, ACT_DONE, NULL }, + { "Turntable", CLS_START, ACT_TURNTABLE, "SSNNNN" }, + { "EndTurntable", CLS_END, ACT_ENDTURNTABLE, NULL }, + { "TravellingPlatform", CLS_START, ACT_TRANSFERTABLE, "SSNNNNN" }, + { "EndTravellingPlatform", CLS_END, ACT_ENDTRANSFERTABLE, NULL }, + { "Track", CLS_START, ACT_TRACK, "SSN" }, + { "EndTrack", CLS_END, ACT_DONE, NULL }, + { "Structure", CLS_START, ACT_STRUCTURE, "SS" }, + { "EndStructure", CLS_END, ACT_ENDSTRUCTURE, NULL }, + + { "FillPoint", CLS_BODY, ACT_FILL_POINT, "NNI" }, + { "Line", CLS_BODY, ACT_LINE, "NNNN" }, + { "CurvedLine", CLS_BODY, ACT_CURVEDLINE, "NNNNN" }, + { "CurveLine", CLS_BODY, ACT_CURVEDLINE, "NNNNN" }, + { "Circle", CLS_BODY, ACT_CIRCLE, "NNN" }, + { "DescriptionPos", CLS_BODY, ACT_DESCRIPTIONPOS, "NN" }, + { "ArticleNoPos", CLS_BODY, ACT_DESCRIPTIONPOS, "NN" }, + { "ConnectingPoint", CLS_BODY, ACT_CONNECTINGPOINT, "NNN" }, + { "StraightTrack", CLS_BODY, ACT_STRAIGHTTRACK, "NNNN" }, + { "CurvedTrack", CLS_BODY, ACT_CURVEDTRACK, "NNNNN" }, + { "Straight", CLS_BODY, ACT_STRAIGHT_BODY, "N" }, + { "Curve", CLS_BODY, ACT_CURVE_BODY, "NNN" }, + { "Price", CLS_BODY, ACT_PRICE, "N" }, + + { "Gerade", CLS_START, ACT_STRAIGHT, "SSNN" }, + { "EndGerade", CLS_END, ACT_DONE, NULL }, + { "Bogen", CLS_START, ACT_CURVE, "SSNNN" }, + { "EndBogen", CLS_END, ACT_DONE, NULL }, + { "Weiche_links", CLS_START, ACT_TURNOUT_LEFT, "SSN" }, + { "Weiche_Rechts", CLS_START, ACT_TURNOUT_RIGHT, "SSN" }, + { "EndWeiche", CLS_END, ACT_DONE, NULL }, + { "Bogenweiche_Links", CLS_START, ACT_CURVEDTURNOUT_LEFT, "SSN" }, + { "Bogenweiche_Rechts", CLS_START, ACT_CURVEDTURNOUT_RIGHT, "SSN" }, + { "Dreiwegweiche", CLS_START, ACT_THREEWAYTURNOUT, "SSN" }, + { "Kreuzung_Links", CLS_START, ACT_CROSSING_LEFT, "SSNNNN" }, + { "Kreuzung_Rechts", CLS_START, ACT_CROSSING_RIGHT, "SSNNNN" }, + { "DKW_Links", CLS_START, ACT_DOUBLESLIP_LEFT, "SSNNNNN" }, + { "DKW_Rechts", CLS_START, ACT_DOUBLESLIP_RIGHT, "SSNNNNN" }, + { "Kreuzung_Symmetrisch", CLS_START, ACT_CROSSING_SYMMETRIC, "SSNNN" }, + { "DKW_Symmetrisch", CLS_START, ACT_DOUBLESLIP_SYMMETRIC, "SSNNNN" }, + { "EndKreuzung", CLS_END, ACT_DONE, NULL }, + { "Drehscheibe", CLS_START, ACT_TURNTABLE, "SSNNNN" }, + { "EndDrehscheibe", CLS_END, ACT_ENDTURNTABLE, NULL }, + { "Schiebebuehne", CLS_START, ACT_TRANSFERTABLE, "SSNNNNN" }, + { "EndSchiebebuehne", CLS_END, ACT_ENDTRANSFERTABLE, NULL }, + { "Schiene", CLS_START, ACT_TRACK, "SSN" }, + { "EndSchiene", CLS_END, ACT_DONE, NULL }, + { "Haus", CLS_START, ACT_STRUCTURE, "SS" }, + { "EndHaus", CLS_END, ACT_ENDSTRUCTURE, NULL }, + + { "FuellPunkt", CLS_BODY, ACT_FILL_POINT, "NNI" }, + { "Linie", CLS_BODY, ACT_LINE, "NNNN" }, + { "Bogenlinie", CLS_BODY, ACT_CURVEDLINE, "NNNNN" }, + { "Kreislinie", CLS_BODY, ACT_CIRCLE, "NNN" }, + { "BezeichnungsPos", CLS_BODY, ACT_DESCRIPTIONPOS, "NN" }, + { "ArtikelNrPos", CLS_BODY, ACT_DESCRIPTIONPOS, "NN" }, + { "Anschlusspunkt", CLS_BODY, ACT_CONNECTINGPOINT, "NNN" }, + { "GeradesGleis", CLS_BODY, ACT_STRAIGHTTRACK, "NNNN" }, + { "BogenGleis", CLS_BODY, ACT_CURVEDTRACK, "NNNNN" }, + { "Gerade", CLS_BODY, ACT_STRAIGHT_BODY, "N" }, + { "Bogen", CLS_BODY, ACT_CURVE_BODY, "NNN" }, + { "Preis", CLS_BODY, ACT_PRICE, "N" } +}; /* argument description */ typedef union { - char * string; - double number; - long integer; - } arg_t; + char * string; + double number; + long integer; +} arg_t; /* description of a curve */ typedef struct { - char type; - coOrd pos[2]; - double radius, a0, a1; - coOrd center; - } line_t; + char type; + coOrd pos[2]; + double radius, a0, a1; + coOrd center; +} line_t; /* state info for the current object */ int curAction; @@ -314,30 +315,30 @@ int right = 0; /* A XTrkCad End-Point */ typedef struct { - int busy; - coOrd pos; - double a; - } endPoint_t; + int busy; + coOrd pos; + double a; +} endPoint_t; endPoint_t endPoints[MAXSEG]; endPoint_t *endPoint_p; /* the segments */ typedef struct { - double radius; - coOrd pos[2]; - int mark; - endPoint_t * ep[2]; - } segs_t; + double radius; + coOrd pos[2]; + int mark; + endPoint_t * ep[2]; +} segs_t; segs_t segs[MAXSEG]; segs_t *seg_p; /* the segment paths */ typedef struct { - int index; - int count; - int segs[MAXSEG]; - } paths_t; + int index; + int count; + int segs[MAXSEG]; +} paths_t; paths_t paths[MAXSEG]; paths_t *paths_p; @@ -345,16 +346,18 @@ int curPath[MAXSEG]; int curPathInx; char * pathNames[] = { - "Normal", - "Reverse" }; + "Normal", + "Reverse" +}; int isclose( coOrd a, coOrd b ) { if ( fabs(a.x-b.x) < 0.1 && - fabs(a.y-b.y) < 0.1 ) + fabs(a.y-b.y) < 0.1 ) { return 1; - else + } else { return 0; + } } @@ -373,22 +376,25 @@ void searchSegs( segs_t * sp, int ep ) curPath[curPathInx] = (ep==0?-((sp-segs)+1):((sp-segs)+1)); if (sp->ep[ep] != NULL) { inx = abs(curPath[0]); - if ( (sp-segs)+1 < inx ) + if ( (sp-segs)+1 < inx ) { return; + } paths_p->index = 0; paths_p->count = curPathInx+1; - for (inx=0;inx<=curPathInx;inx++) + for (inx=0; inx<=curPathInx; inx++) { paths_p->segs[inx] = curPath[inx]; + } paths_p++; return; } curPathInx++; for ( sp1 = segs; sp1mark) { - if ( isclose( sp->pos[ep], sp1->pos[0] ) ) + if ( isclose( sp->pos[ep], sp1->pos[0] ) ) { searchSegs( sp1, 1 ); - else if ( isclose( sp->pos[ep], sp1->pos[1] ) ) + } else if ( isclose( sp->pos[ep], sp1->pos[1] ) ) { searchSegs( sp1, 0 ); + } } } curPathInx--; @@ -424,8 +430,9 @@ void computePaths( void ) } } for ( sp = segs; spmark = 0; + } curPathInx = 0; if ( sp->ep[0] ) { searchSegs( sp, 1 ); @@ -436,10 +443,11 @@ void computePaths( void ) pathIndex = 0; pathCount = paths_p-paths; while (pathCount>0) { - if (pathIndex < 2) + if (pathIndex < 2) { fprintf( fout, "\tP \"%s\"", pathNames[pathIndex] ); - else + } else { fprintf( fout, "\tP \"%d\"", pathIndex+1 ); + } pathIndex++; firstPath = 1; memset( bitmap, 0, sizeof bitmap ); @@ -447,8 +455,9 @@ void computePaths( void ) ep->busy = 0; } for (pp = paths; pp < paths_p; pp++) { - if (pp->count == 0) + if (pp->count == 0) { continue; + } segNo = pp->segs[0]; epNo = (segNo>0?0:1); ep = segs[abs(segNo)-1].ep[epNo]; @@ -458,12 +467,13 @@ void computePaths( void ) if ( (ep && ep->busy) || (ep2 && ep2->busy) ) { goto nextPath; } - if (ep) ep->busy = 1; - if (ep2) ep2->busy = 1; + if (ep) { ep->busy = 1; } + if (ep2) { ep2->busy = 1; } for (inx=0; inxcount; inx++) { segNo = abs(pp->segs[inx]); - if (bitmap[segNo]) + if (bitmap[segNo]) { goto nextPath; + } } if (!firstPath) { fprintf( fout, " 0"); @@ -478,7 +488,7 @@ void computePaths( void ) pp->count = 0; pathCount--; nextPath: - ; + ; } fprintf( fout, "\n" ); } @@ -492,7 +502,8 @@ void translate( coOrd *res, coOrd orig, double a, double d ) } -static void computeCurve( coOrd pos0, coOrd pos1, double radius, coOrd * center, double * a0, double * a1 ) +static void computeCurve( coOrd pos0, coOrd pos1, double radius, coOrd * center, + double * a0, double * a1 ) /* translate between curves described by 2 end-points and a radius to a curve described by a center, radius and angles. */ @@ -502,8 +513,9 @@ static void computeCurve( coOrd pos0, coOrd pos1, double radius, coOrd * center, d = findDistance( pos0, pos1 )/2.0; a = findAngle( pos0, pos1 ); s = fabs(d/radius); - if (s > 1.0) + if (s > 1.0) { s = 1.0; + } aa = R2D(asin( s )); if (radius > 0) { aaa = a + (90.0 - aa); @@ -520,10 +532,11 @@ static void computeCurve( coOrd pos0, coOrd pos1, double radius, coOrd * center, double X( double v ) { - if ( -0.000001 < v && v < 0.000001 ) + if ( -0.000001 < v && v < 0.000001 ) { return 0.0; - else + } else { return v; + } } @@ -542,27 +555,27 @@ void generateTurnout( void ) computePaths(); for (ep=endPoints; eppos.x), X(ep->pos.y), X(ep->a) ); + X(ep->pos.x), X(ep->pos.y), X(ep->a) ); for (lp=lines; lptype) { case 'L': fprintf( fout, "\tL %ld 0 %0.6f %0.6f %0.6f %0.6f\n", color, - X(lp->pos[0].x), X(lp->pos[0].y), X(lp->pos[1].x), X(lp->pos[1].y) ); + X(lp->pos[0].x), X(lp->pos[0].y), X(lp->pos[1].x), X(lp->pos[1].y) ); break; case 'A': fprintf( fout, "\tA %ld 0 %0.6f %0.6f %0.6f %0.6f %0.6f\n", color, - X(lp->radius), X(lp->center.x), X(lp->center.y), X(lp->a0), X(lp->a1) ); + X(lp->radius), X(lp->center.x), X(lp->center.y), X(lp->a0), X(lp->a1) ); break; } } for (sp=segs; spradius == 0.0) { fprintf( fout, "\tS 0 0 %0.6f %0.6f %0.6f %0.6f\n", - X(sp->pos[0].x), X(sp->pos[0].y), X(sp->pos[1].x), X(sp->pos[1].y) ); + X(sp->pos[0].x), X(sp->pos[0].y), X(sp->pos[1].x), X(sp->pos[1].y) ); } else { computeCurve( sp->pos[0], sp->pos[1], sp->radius, ¢er, &a0, &a1 ); fprintf( fout, "\tC 0 0 %0.6f %0.6f %0.6f %0.6f %0.6f\n", - X(sp->radius), X(center.x), X(center.y), X(a0), X(a1) ); + X(sp->radius), X(center.x), X(center.y), X(a0), X(a1) ); } fprintf( fout, "\t%s\n", END_SEGS ); } @@ -572,23 +585,25 @@ void reset( tokenDesc_t * tp, arg_t *args ) /* Start of a new turnout or structure */ { int inx; - curAction = tp->action; - line_p = lines; - seg_p = segs; - endPoint_p = endPoints; - partNo = strdup( args[0].string ); - name = strdup( args[1].string ); - for (inx=2; tp->args[inx]; inx++) - params[inx-2] = args[inx].number; + curAction = tp->action; + line_p = lines; + seg_p = segs; + endPoint_p = endPoints; + partNo = strdup( args[0].string ); + name = strdup( args[1].string ); + for (inx=2; tp->args[inx]; inx++) { + params[inx-2] = args[inx].number; + } } double getDim( double value ) /* convert to inches from tenths of a an inch or millimeters. */ { - if (inch) + if (inch) { return value/10.0; - else + } else { return value/25.4; + } } @@ -597,8 +612,9 @@ char * getLine( void ) { char * cp; while (1) { - if (fgets(line, sizeof line, fin) == NULL) + if (fgets(line, sizeof line, fin) == NULL) { return NULL; + } lineCount++; lineLen = strlen(line); if (lineLen > 0 && line[lineLen-1] == '\n') { @@ -619,10 +635,12 @@ char * getLine( void ) cp++; lineLen--; } - if (lineLen <= 0) + if (lineLen <= 0) { continue; - if (verbose) + } + if (verbose) { fprintf( fout, "# %s\n", line ); + } return cp; } } @@ -633,8 +651,9 @@ void flushInput( void ) { char *cp; while (cp=getLine()) { - if (strncasecmp( cp, "End", 3 ) == 0 ) + if (strncasecmp( cp, "End", 3 ) == 0 ) { break; + } } inBody = 0; } @@ -711,8 +730,9 @@ void process( tokenDesc_t * tp, arg_t *args ) endPoint_p->pos.x = 0.0; endPoint_p->a = 270.0; endPoint_p++; - if ((cp=getLine())==NULL) + if ((cp=getLine())==NULL) { return; + } if ((rc=sscanf( line, "%lf %lf", &radius, &angle ) ) != 2) { fprintf( stderr, "syntax error: %d: %s\n", lineCount, line ); flushInput(); @@ -728,8 +748,9 @@ void process( tokenDesc_t * tp, arg_t *args ) seg_p->radius = -radius; endPoint_p++; seg_p++; - if ((cp=getLine())==NULL) + if ((cp=getLine())==NULL) { return; + } if ((rc=sscanf( line, "%lf %lf", &radius2, &angle ) ) != 2) { fprintf( stderr, "syntax error: %d: %s\n", lineCount, line ); flushInput(); @@ -789,7 +810,7 @@ void process( tokenDesc_t * tp, arg_t *args ) seg_p++; length /= 2.0; if (tp->action == ACT_CROSSING_SYMMETRIC || - tp->action == ACT_DOUBLESLIP_SYMMETRIC) { + tp->action == ACT_DOUBLESLIP_SYMMETRIC) { length2 = length; } else { length2 = getDim( args[5].number )/2.0; @@ -805,7 +826,7 @@ void process( tokenDesc_t * tp, arg_t *args ) endPoint_p++; seg_p++; if (tp->action == ACT_CROSSING_RIGHT || - tp->action == ACT_DOUBLESLIP_RIGHT ) { + tp->action == ACT_DOUBLESLIP_RIGHT ) { endPoint_p[-1].pos.y = -endPoint_p[-1].pos.y; endPoint_p[-2].pos.y = -endPoint_p[-2].pos.y; seg_p[-1].pos[0].y = -seg_p[-1].pos[0].y; @@ -817,8 +838,9 @@ void process( tokenDesc_t * tp, arg_t *args ) case ACT_TURNTABLE: reset( tp, args ); - if ((cp=getLine())==NULL) + if ((cp=getLine())==NULL) { return; + } if ((rc=sscanf( line, "%lf %s", &angle, bits ) ) != 2) { fprintf( stderr, "syntax error: %d: %s\n", lineCount, line ); flushInput(); @@ -828,8 +850,9 @@ void process( tokenDesc_t * tp, arg_t *args ) count = 360.0/angle; angle = 0; length = strlen( bits ); - if (length < count) + if (length < count) { count = length; + } length = getDim( args[3].number ); length2 = getDim( args[5].number ); endNo = 1; @@ -843,24 +866,24 @@ void process( tokenDesc_t * tp, arg_t *args ) angle = normalizeAngle( 90.0 - inx * ( 360.0 / count ) ); if (bits[inx]!='0') fprintf( fout, "\tE %0.6f %0.6f %0.6f\n", - X(length * sin(D2R(angle))), - X(length * cos(D2R(angle))), - X(angle) ); + X(length * sin(D2R(angle))), + X(length * cos(D2R(angle))), + X(angle) ); } for ( inx=0; inxtype) { case 'L': fprintf( fout, "\tL %ld 0 %0.6f %0.6f %0.6f %0.6f\n", color, - X(lp->pos[0].x), X(lp->pos[0].y), X(lp->pos[1].x), X(lp->pos[1].y) ); + X(lp->pos[0].x), X(lp->pos[0].y), X(lp->pos[1].x), X(lp->pos[1].y) ); break; case 'A': fprintf( fout, "\tA %ld 0 %0.6f %0.6f %0.6f %0.6f %0.6f\n", color, - X(lp->radius), X(lp->center.x), X(lp->center.y), X(lp->a0), X(lp->a1) ); + X(lp->radius), X(lp->center.x), X(lp->center.y), X(lp->a0), X(lp->a1) ); break; } } @@ -886,15 +909,18 @@ void process( tokenDesc_t * tp, arg_t *args ) width2 = getDim(args[5].number); length = getDim( args[6].number); fprintf( fout, "\tL %ld 0 0.0000000 0.000000 0.000000 %0.6f\n", color, length ); - fprintf( fout, "\tL %ld 0 0.0000000 %0.6f %0.6f %0.6f\n", color, length, width, length ); - fprintf( fout, "\tL %ld 0 %0.6f %0.6f %0.6f 0.000000\n", color, width, length, width ); + fprintf( fout, "\tL %ld 0 0.0000000 %0.6f %0.6f %0.6f\n", color, length, width, + length ); + fprintf( fout, "\tL %ld 0 %0.6f %0.6f %0.6f 0.000000\n", color, width, length, + width ); fprintf( fout, "\tL %ld 0 %0.6f 0.0000000 0.000000 0.000000\n", color, width ); fprintf( fout, "\tL %ld 0 %0.6f %0.6f %0.6f %0.6f\n", color, - (width-width2)/2.0, 0.0, (width-width2)/2.0, length ); + (width-width2)/2.0, 0.0, (width-width2)/2.0, length ); fprintf( fout, "\tL %ld 0 %0.6f %0.6f %0.6f %0.6f\n", color, - width-(width-width2)/2.0, 0.0, width-(width-width2)/2.0, length ); - if ((cp=getLine())==NULL) + width-(width-width2)/2.0, 0.0, width-(width-width2)/2.0, length ); + if ((cp=getLine())==NULL) { return; + } if ((rc=sscanf( line, "%lf %lf %s", &length2, &offset, bits ) ) != 3) { fprintf( stderr, "syntax error: %d: %s\n", lineCount, line ); flushInput(); @@ -905,14 +931,15 @@ void process( tokenDesc_t * tp, arg_t *args ) for (inx=0; bits[inx]; inx++) { if (bits[inx]=='1') { fprintf( fout, "\tE 0.000000 %0.6f 270.0\n", - offset ); + offset ); fprintf( fout, "\tS 0 0 0.000000 %0.6f %0.6f %0.6f\n", - offset, (width-width2)/2.0, offset ); + offset, (width-width2)/2.0, offset ); } offset += length2; } - if ((cp=getLine())==NULL) + if ((cp=getLine())==NULL) { return; + } if ((rc=sscanf( line, "%lf %lf %s", &length2, &offset, bits ) ) != 3) { fprintf( stderr, "syntax error: %d: %s\n", lineCount, line ); flushInput(); @@ -923,9 +950,9 @@ void process( tokenDesc_t * tp, arg_t *args ) for (inx=0; bits[inx]; inx++) { if (bits[inx]=='1') { fprintf( fout, "\tE %0.6f %0.6f 90.0\n", - width, offset ); + width, offset ); fprintf( fout, "\tS 0 0 %0.6f %0.6f %0.6f %0.6f\n", - width-(width-width2)/2.0, offset, width, offset ); + width-(width-width2)/2.0, offset, width, offset ); } offset += length2; } @@ -949,11 +976,11 @@ void process( tokenDesc_t * tp, arg_t *args ) switch (lp->type) { case 'L': fprintf( fout, "\tL %ld 0 %0.6f %0.6f %0.6f %0.6f\n", color, - X(lp->pos[0].x), X(lp->pos[0].y), X(lp->pos[1].x), X(lp->pos[1].y) ); + X(lp->pos[0].x), X(lp->pos[0].y), X(lp->pos[1].x), X(lp->pos[1].y) ); break; case 'A': fprintf( fout, "\tA %ld 0 %0.6f %0.6f %0.6f %0.6f %0.6f\n", color, - X(lp->radius), X(lp->center.x), X(lp->center.y), X(lp->a0), X(lp->a1) ); + X(lp->radius), X(lp->center.x), X(lp->center.y), X(lp->a0), X(lp->a1) ); break; } } @@ -981,7 +1008,8 @@ void process( tokenDesc_t * tp, arg_t *args ) angle = args[3].number/2.0 + args[4].number; pos1.x = pos0.x + length2*cos(D2R(angle)); pos1.y = pos0.y + length2*sin(D2R(angle)); - computeCurve( pos0, pos1, line_p->radius, &line_p->center, &line_p->a0, &line_p->a1 ); + computeCurve( pos0, pos1, line_p->radius, &line_p->center, &line_p->a0, + &line_p->a1 ); line_p++; break; @@ -1096,71 +1124,74 @@ void parse( void ) inch++; continue; } - for ( tp=tokens; tp<&tokens[COUNT( tokens )]; tp++ ){ + for ( tp=tokens; tp<&tokens[COUNT( tokens )]; tp++ ) { tlen = strlen(tp->name); - if ( strncasecmp( cp, tp->name, tlen) != 0 ) + if ( strncasecmp( cp, tp->name, tlen) != 0 ) { continue; - if ( cp[tlen] != '\0' && cp[tlen] != ' ' && cp[tlen] != ',' ) + } + if ( cp[tlen] != '\0' && cp[tlen] != ' ' && cp[tlen] != ',' ) { continue; + } if ( (inBody) == (tp->class==CLS_START) ) { continue; } cp += tlen+1; if (tp->args) - for ( inx=0, sp=strings; tp->args[inx]; inx++ ) { - if (*cp == '\0') { - fprintf( stderr, "%d: unexpected end of line\n", lineCount ); - goto nextLine; - } - switch( tp->args[inx] ) { - case 'S': - args[inx].string = sp; - while (isspace((unsigned char)*cp)) cp++; - if (*cp != '"') { - fprintf( stderr, "%d: expected a \": %s\n", lineCount, cp ); + for ( inx=0, sp=strings; tp->args[inx]; inx++ ) { + if (*cp == '\0') { + fprintf( stderr, "%d: unexpected end of line\n", lineCount ); goto nextLine; } - cp++; - while ( *cp ) { - if ( *cp != '"' ) { - *sp++ = *cp++; - } else if ( cp[1] == '"' ) { - *sp++ = '"'; - *sp++ = '"'; - cp += 2; - } else { - cp++; - *sp++ = '\0'; - break; + switch( tp->args[inx] ) { + case 'S': + args[inx].string = sp; + while (isspace((unsigned char)*cp)) { cp++; } + if (*cp != '"') { + fprintf( stderr, "%d: expected a \": %s\n", lineCount, cp ); + goto nextLine; } - } - break; + cp++; + while ( *cp ) { + if ( *cp != '"' ) { + *sp++ = *cp++; + } else if ( cp[1] == '"' ) { + *sp++ = '"'; + *sp++ = '"'; + cp += 2; + } else { + cp++; + *sp++ = '\0'; + break; + } + } + break; - case 'N': - args[inx].number = strtod( cp, &cpp ); - if (cpp == cp) { - fprintf( stderr, "%d: expected a number: %s\n", lineCount, cp ); - goto nextLine; - } - cp = cpp; - break; + case 'N': + args[inx].number = strtod( cp, &cpp ); + if (cpp == cp) { + fprintf( stderr, "%d: expected a number: %s\n", lineCount, cp ); + goto nextLine; + } + cp = cpp; + break; + + case 'I': + args[inx].integer = strtol( cp, &cpp, 10 ); + if (cpp == cp) { + fprintf( stderr, "%d: expected an integer: %s\n", lineCount, cp ); + goto nextLine; + } + cp = cpp; + break; - case 'I': - args[inx].integer = strtol( cp, &cpp, 10 ); - if (cpp == cp) { - fprintf( stderr, "%d: expected an integer: %s\n", lineCount, cp ); - goto nextLine; } - cp = cpp; - break; - } - } process( tp, args ); - if (tp->class == CLS_START) + if (tp->class == CLS_START) { inBody = 1; - else if (tp->class == CLS_END) + } else if (tp->class == CLS_END) { inBody = 0; + } tp = NULL; break; } @@ -1222,7 +1253,8 @@ int main ( int argc, char * argv[] ) perror(*argv); exit(1); } - if (contents) + if (contents) { fprintf( fout, "CONTENTS %s\n", contents ); + } parse(); } diff --git a/app/bin/bitmaps/16pix/bridge.png b/app/bin/bitmaps/16pix/bridge.png deleted file mode 100644 index ebcde0a..0000000 Binary files a/app/bin/bitmaps/16pix/bridge.png and /dev/null differ diff --git a/app/bin/bitmaps/16pix/circle-center.png b/app/bin/bitmaps/16pix/circle-center.png deleted file mode 100644 index 062560d..0000000 Binary files a/app/bin/bitmaps/16pix/circle-center.png and /dev/null differ diff --git a/app/bin/bitmaps/16pix/circle-tangent.png b/app/bin/bitmaps/16pix/circle-tangent.png deleted file mode 100644 index 0dc831b..0000000 Binary files a/app/bin/bitmaps/16pix/circle-tangent.png and /dev/null differ diff --git a/app/bin/bitmaps/16pix/circle.png b/app/bin/bitmaps/16pix/circle.png deleted file mode 100644 index eaecd31..0000000 Binary files a/app/bin/bitmaps/16pix/circle.png and /dev/null differ diff --git a/app/bin/bitmaps/16pix/curved-chord.png b/app/bin/bitmaps/16pix/curved-chord.png deleted file mode 100644 index 0068d1a..0000000 Binary files a/app/bin/bitmaps/16pix/curved-chord.png and /dev/null differ diff --git a/app/bin/bitmaps/16pix/curved-end.png b/app/bin/bitmaps/16pix/curved-end.png deleted file mode 100644 index 49dcee3..0000000 Binary files a/app/bin/bitmaps/16pix/curved-end.png and /dev/null differ diff --git a/app/bin/bitmaps/16pix/curved-middle.png b/app/bin/bitmaps/16pix/curved-middle.png deleted file mode 100644 index d23a6a2..0000000 Binary files a/app/bin/bitmaps/16pix/curved-middle.png and /dev/null differ diff --git a/app/bin/bitmaps/16pix/curved-tangent.png b/app/bin/bitmaps/16pix/curved-tangent.png deleted file mode 100644 index 6d8fcfe..0000000 Binary files a/app/bin/bitmaps/16pix/curved-tangent.png and /dev/null differ diff --git a/app/bin/bitmaps/16pix/description.png b/app/bin/bitmaps/16pix/description.png deleted file mode 100644 index 9bd679c..0000000 Binary files a/app/bin/bitmaps/16pix/description.png and /dev/null differ diff --git a/app/bin/bitmaps/16pix/elevation.png b/app/bin/bitmaps/16pix/elevation.png deleted file mode 100644 index 9121d56..0000000 Binary files a/app/bin/bitmaps/16pix/elevation.png and /dev/null differ diff --git a/app/bin/bitmaps/16pix/exit.png b/app/bin/bitmaps/16pix/exit.png deleted file mode 100644 index ba227c3..0000000 Binary files a/app/bin/bitmaps/16pix/exit.png and /dev/null differ diff --git a/app/bin/bitmaps/16pix/palette.png b/app/bin/bitmaps/16pix/palette.png deleted file mode 100644 index efcf3d3..0000000 Binary files a/app/bin/bitmaps/16pix/palette.png and /dev/null differ diff --git a/app/bin/bitmaps/16pix/pan-zoom.png b/app/bin/bitmaps/16pix/pan-zoom.png deleted file mode 100644 index 04d18f7..0000000 Binary files a/app/bin/bitmaps/16pix/pan-zoom.png and /dev/null differ diff --git a/app/bin/bitmaps/16pix/select.png b/app/bin/bitmaps/16pix/select.png deleted file mode 100644 index 39605d1..0000000 Binary files a/app/bin/bitmaps/16pix/select.png and /dev/null differ diff --git a/app/bin/bitmaps/16pix/snap-curs.png b/app/bin/bitmaps/16pix/snap-curs.png deleted file mode 100644 index acf8f66..0000000 Binary files a/app/bin/bitmaps/16pix/snap-curs.png and /dev/null differ diff --git a/app/bin/bitmaps/16pix/snap-grid.png b/app/bin/bitmaps/16pix/snap-grid.png deleted file mode 100644 index 381b451..0000000 Binary files a/app/bin/bitmaps/16pix/snap-grid.png and /dev/null differ diff --git a/app/bin/bitmaps/24pix/description.png b/app/bin/bitmaps/24pix/description.png deleted file mode 100644 index e273ed5..0000000 Binary files a/app/bin/bitmaps/24pix/description.png and /dev/null differ diff --git a/app/bin/bitmaps/24pix/exit.png b/app/bin/bitmaps/24pix/exit.png deleted file mode 100644 index d3ebf2f..0000000 Binary files a/app/bin/bitmaps/24pix/exit.png and /dev/null differ diff --git a/app/bin/bitmaps/24pix/pan-zoom.png b/app/bin/bitmaps/24pix/pan-zoom.png deleted file mode 100644 index 67ab631..0000000 Binary files a/app/bin/bitmaps/24pix/pan-zoom.png and /dev/null differ diff --git a/app/bin/bitmaps/24pix/snap-curs.png b/app/bin/bitmaps/24pix/snap-curs.png deleted file mode 100644 index 15154a2..0000000 Binary files a/app/bin/bitmaps/24pix/snap-curs.png and /dev/null differ diff --git a/app/bin/bitmaps/24pix/snap-grid.png b/app/bin/bitmaps/24pix/snap-grid.png deleted file mode 100644 index 3073985..0000000 Binary files a/app/bin/bitmaps/24pix/snap-grid.png and /dev/null differ diff --git a/app/bin/bitmaps/CMakeLists.txt b/app/bin/bitmaps/CMakeLists.txt new file mode 100644 index 0000000..0a68722 --- /dev/null +++ b/app/bin/bitmaps/CMakeLists.txt @@ -0,0 +1,100 @@ +# Generate XPM bitmaps from SVG files + +PROJECT(genbitmaps) + +# Find the conversion tool + +find_package(Inkscape) + +if( NOT Inkscape_FOUND ) + message( STATUS "Inkscape not found." ) +else() + message(STATUS "Inkscape is: ${Inkscape_EXECUTABLE}") + message(STATUS "Export option is: ${Inkscape_EXPORT}") + + set (XPMS + background benchwork bezier-line bezier-track block bottom box + bridge building car-inventory change-grid circle-center + circle-filled-center circle-filled-tangent circle-line-center + circle-line-tangent circle-line circle-tangent circle clone + connect control convert-from convert-to copy cornu curved-chord + curved-end curved-line-chord curved-line-end curved-line-middle + curved-line-tangent curved-middle curved-tangent cut delete + describe description dimension doc-export-bmap doc-export-dxf + doc-export-svg doc-export doc-import-mod doc-import doc-new doc-open + doc-print doc-recent doc-revert doc-save-as doc-save doc-setup down + ease-broad ease-cornu ease-gt-broad ease-gt-sharp ease-lt-broad + ease-lt-sharp ease-none ease-normal ease-sharp + elevation exit extend filled-box filled-polygon go helix + info join-line join layers magnet manage map move + new-car ok pan-zoom parallel-line parallel parameter paste + polygon polyline profile protractor redo reflect roadbed + rotate ruler select sensor signal snap-curs snap-grid + split-draw split sticky-doc sticky-link sticky-note stop + straight-line straight switch-motor table-edge text ties top + train trim tunnel turnout-design turnout turntable undo + zoom-choose zoom-extent zoom-in zoom-out + ) + set( PIXS 16 24 32 ) + + foreach(xpm ${XPMS}) + foreach(pix ${PIXS}) + if ( EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/png/${xpm}${pix}.png" ) + # MESSAGE( STATUS "Custom ${CMAKE_CURRENT_SOURCE_DIR}/png/${xpm}${pix}.png" ) + add_custom_command( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/png/${xpm}${pix}.png + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/png/${xpm}${pix}.png + COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/png/ + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/png/${xpm}${pix}.png ${CMAKE_CURRENT_BINARY_DIR}/png/${xpm}${pix}.png + ) + else() + # MESSAGE( STATUS "SVG ${CMAKE_CURRENT_SOURCE_DIR}/svg/${xpm}.svg" ) + add_custom_command( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/png/${xpm}${pix}.png + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/svg/${xpm}.svg + COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/png/ + COMMAND ${Inkscape_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/svg/${xpm}.svg -h ${pix} ${Inkscape_EXPORT}${CMAKE_CURRENT_BINARY_DIR}/png/${xpm}${pix}.png + ) + endif() + # build a list of all the depends + list(APPEND PNG_RESULTS ${CMAKE_CURRENT_BINARY_DIR}/png/${xpm}${pix}.png) + endforeach() + add_custom_command( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${xpm}.xpm3 + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/png/${xpm}16.png + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/png/${xpm}24.png + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/png/${xpm}32.png + COMMAND pngtoxpm ${CMAKE_CURRENT_BINARY_DIR}/${xpm}.xpm3 +# COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/${xpm}.xpm3 ${CMAKE_CURRENT_SOURCE_DIR}/${xpm}.xpm3 + ) + # build a list of all the depends + list(APPEND XPM_RESULTS ${xpm}.xpm3) + endforeach() + + add_custom_target ( + genbitmaps + DEPENDS ${XPM_RESULTS} + DEPENDS ${PNG_RESULTS} + ) + + if(WIN32) + # Temporarily the FreeImage dll is copied to the build directory + add_custom_command( + TARGET genbitmaps PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E copy ${FREEIMAGE_SHAREDLIB} ${CMAKE_CURRENT_BINARY_DIR} + ) + cmake_path(GET FREEIMAGE_SHAREDLIB FILENAME filename) + add_custom_command( + TARGET genbitmaps POST_BUILD + COMMAND ${CMAKE_COMMAND} -E rm ${CMAKE_CURRENT_BINARY_DIR}/${filename} + ) +# + + endif() +endif() + +#MESSAGE (STATUS "SVG Converter: ${SVG_CONVERTER}") +#MESSAGE (STATUS "Source Dir: ${CMAKE_CURRENT_SOURCE_DIR}") +#MESSAGE (STATUS "XPMs: ${XPMS}") +#MESSAGE (STATUS "XPM_RESULTS: ${XPM_RESULTS}") +#MESSAGE (STATUS "PNG_RESULTS: ${PNG_RESULTS}") diff --git a/app/bin/bitmaps/Info.xpm b/app/bin/bitmaps/Info.xpm deleted file mode 100644 index c4fa897..0000000 --- a/app/bin/bitmaps/Info.xpm +++ /dev/null @@ -1,116 +0,0 @@ -static char *Info_x16[] = { - "16 16 11 1", - " c None", - "0 c #000000", - "1 c #0066FF", - "2 c #3366FF", - "3 c #6666FF", - "4 c #6699FF", - "5 c #9999FF", - "6 c #99CCFF", - "7 c #CCCCFF", - "8 c #CCFFFF", - "9 c #FFFFFF", - " ", - " 122221 ", - " 25799763 ", - " 3899999994 ", - " 289994299993 ", - " 15999922999973 ", - " 27999912999992 ", - " 29999942999992 ", - " 29999954999992 ", - " 27999976999992 ", - " 26999999999972 ", - " 299994299994 ", - " 149997699952 ", - " 2379999833 ", - " 223312 ", - " "}; - -static char *Info_x24[] = { - "24 24 11 1", - " c None", - "0 c #000000", - "1 c #0066FF", - "2 c #3366FF", - "3 c #6666FF", - "4 c #6699FF", - "5 c #9999FF", - "6 c #99CCFF", - "7 c #CCCCFF", - "8 c #CCFFFF", - "9 c #FFFFFF", - " ", - " 111111 ", - " 1111111111 ", - " 11115777762111 ", - " 1114999999995111 ", - " 11799994499997211 ", - " 116999971179999811 ", - " 11499999611599999511 ", - " 119999995114999999211 ", - " 1159999996114999999611 ", - " 1179999996114999999711 ", - " 1179999997115999999911 ", - " 1179999999117999999911 ", - " 1179999999117999999811 ", - " 1159999999529999999711 ", - " 129999999779999999511 ", - " 11599999711599999711 ", - " 1179999211199999211 ", - " 114999971149999511 ", - " 1127999779997311 ", - " 11157999975111 ", - " 111111111111 ", - " 11111111 ", - " "}; - -static char *Info_x32[] = { - "32 32 11 1", - " c None", - "0 c #000000", - "1 c #0066FF", - "2 c #3366FF", - "3 c #6666FF", - "4 c #6699FF", - "5 c #9999FF", - "6 c #99CCFF", - "7 c #CCCCFF", - "8 c #CCFFFF", - "9 c #FFFFFF", - " ", - " 11 ", - " 111111111111 ", - " 1111111111111111 ", - " 111111577775211111 ", - " 11114799999999751111 ", - " 1111799999779999972111 ", - " 111279999971179999994111 ", - " 1117999999411299999992111 ", - " 11179999999111199999997111 ", - " 113999999971111799999994111 ", - " 1117999999971111799999997111 ", - " 1119999999991111799999999411 ", - " 11499999999911117999999996111 ", - " 11599999999911117999999997111 ", - " 111799999999931119999999997111 ", - " 11799999999951119999999999111 ", - " 11699999999971149999999997111 ", - " 11599999999971159999999997111 ", - " 1129999999999317999999999511 ", - " 1117999999999979999999999111 ", - " 1114999999995114999999997111 ", - " 11179999997111179999999211 ", - " 11139999997111159999995111 ", - " 111499999911117999996111 ", - " 1114999997557999995111 ", - " 111279999999999731111 ", - " 111126799998731111 ", - " 1111111111111111 ", - " 111111111111 ", - " 11111111 ", - " "}; - -static char **Info_xpm[3] = { Info_x16, Info_x24, Info_x32 }; - diff --git a/app/bin/bitmaps/SVG/Info.svg b/app/bin/bitmaps/SVG/Info.svg deleted file mode 100644 index 979601d..0000000 --- a/app/bin/bitmaps/SVG/Info.svg +++ /dev/null @@ -1,69 +0,0 @@ - -image/svg+xml - - - - - diff --git a/app/bin/bitmaps/SVG/NotUsed/ease-broad.svg b/app/bin/bitmaps/SVG/NotUsed/ease-broad.svg deleted file mode 100644 index fadc6df..0000000 --- a/app/bin/bitmaps/SVG/NotUsed/ease-broad.svg +++ /dev/null @@ -1,66 +0,0 @@ - -image/svg+xml - -Easement Broad - diff --git a/app/bin/bitmaps/SVG/NotUsed/ease-cornu.svg b/app/bin/bitmaps/SVG/NotUsed/ease-cornu.svg deleted file mode 100644 index df906a9..0000000 --- a/app/bin/bitmaps/SVG/NotUsed/ease-cornu.svg +++ /dev/null @@ -1,61 +0,0 @@ - -image/svg+xml - - - - - diff --git a/app/bin/bitmaps/SVG/NotUsed/ease-gt-broad.svg b/app/bin/bitmaps/SVG/NotUsed/ease-gt-broad.svg deleted file mode 100644 index 9b2f26d..0000000 --- a/app/bin/bitmaps/SVG/NotUsed/ease-gt-broad.svg +++ /dev/null @@ -1,69 +0,0 @@ - -image/svg+xml - - -> BroadEasement diff --git a/app/bin/bitmaps/SVG/NotUsed/ease-gt-sharp.svg b/app/bin/bitmaps/SVG/NotUsed/ease-gt-sharp.svg deleted file mode 100644 index 77031f6..0000000 --- a/app/bin/bitmaps/SVG/NotUsed/ease-gt-sharp.svg +++ /dev/null @@ -1,66 +0,0 @@ - -image/svg+xml - -Easement Sharp - diff --git a/app/bin/bitmaps/SVG/NotUsed/ease-lt-broad.svg b/app/bin/bitmaps/SVG/NotUsed/ease-lt-broad.svg deleted file mode 100644 index 3022616..0000000 --- a/app/bin/bitmaps/SVG/NotUsed/ease-lt-broad.svg +++ /dev/null @@ -1,67 +0,0 @@ - -image/svg+xml - - -Easement < Broad diff --git a/app/bin/bitmaps/SVG/NotUsed/ease-lt-sharp.svg b/app/bin/bitmaps/SVG/NotUsed/ease-lt-sharp.svg deleted file mode 100644 index 77031f6..0000000 --- a/app/bin/bitmaps/SVG/NotUsed/ease-lt-sharp.svg +++ /dev/null @@ -1,66 +0,0 @@ - -image/svg+xml - -Easement Sharp - diff --git a/app/bin/bitmaps/SVG/NotUsed/ease-none.svg b/app/bin/bitmaps/SVG/NotUsed/ease-none.svg deleted file mode 100644 index 75fa776..0000000 --- a/app/bin/bitmaps/SVG/NotUsed/ease-none.svg +++ /dev/null @@ -1,66 +0,0 @@ - -image/svg+xml - -Easement None - diff --git a/app/bin/bitmaps/SVG/NotUsed/ease-normal.svg b/app/bin/bitmaps/SVG/NotUsed/ease-normal.svg deleted file mode 100644 index 3e94707..0000000 --- a/app/bin/bitmaps/SVG/NotUsed/ease-normal.svg +++ /dev/null @@ -1,66 +0,0 @@ - -image/svg+xml - -Easement Normal - diff --git a/app/bin/bitmaps/SVG/NotUsed/ease-sharp.svg b/app/bin/bitmaps/SVG/NotUsed/ease-sharp.svg deleted file mode 100644 index 77031f6..0000000 --- a/app/bin/bitmaps/SVG/NotUsed/ease-sharp.svg +++ /dev/null @@ -1,66 +0,0 @@ - -image/svg+xml - -Easement Sharp - diff --git a/app/bin/bitmaps/SVG/background.svg b/app/bin/bitmaps/SVG/background.svg deleted file mode 100644 index 4856eac..0000000 --- a/app/bin/bitmaps/SVG/background.svg +++ /dev/null @@ -1,153 +0,0 @@ - -image/svg+xml - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/benchwork.svg b/app/bin/bitmaps/SVG/benchwork.svg deleted file mode 100644 index 1562ae3..0000000 --- a/app/bin/bitmaps/SVG/benchwork.svg +++ /dev/null @@ -1,100 +0,0 @@ - -image/svg+xml - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/bezier-line.svg b/app/bin/bitmaps/SVG/bezier-line.svg deleted file mode 100644 index df4232b..0000000 --- a/app/bin/bitmaps/SVG/bezier-line.svg +++ /dev/null @@ -1,92 +0,0 @@ - -image/svg+xml - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/bezier-track.svg b/app/bin/bitmaps/SVG/bezier-track.svg deleted file mode 100644 index 4f3cf33..0000000 --- a/app/bin/bitmaps/SVG/bezier-track.svg +++ /dev/null @@ -1,424 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/block.svg b/app/bin/bitmaps/SVG/block.svg deleted file mode 100755 index 9d306d7..0000000 --- a/app/bin/bitmaps/SVG/block.svg +++ /dev/null @@ -1,95 +0,0 @@ - -image/svg+xml diff --git a/app/bin/bitmaps/SVG/blockdel.svg b/app/bin/bitmaps/SVG/blockdel.svg deleted file mode 100755 index 014101e..0000000 --- a/app/bin/bitmaps/SVG/blockdel.svg +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/blockedit.svg b/app/bin/bitmaps/SVG/blockedit.svg deleted file mode 100755 index 3ed69c3..0000000 --- a/app/bin/bitmaps/SVG/blockedit.svg +++ /dev/null @@ -1,239 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/blocknew.svg b/app/bin/bitmaps/SVG/blocknew.svg deleted file mode 100755 index e8c51e3..0000000 --- a/app/bin/bitmaps/SVG/blocknew.svg +++ /dev/null @@ -1,216 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/bottom.svg b/app/bin/bitmaps/SVG/bottom.svg deleted file mode 100644 index e529c66..0000000 --- a/app/bin/bitmaps/SVG/bottom.svg +++ /dev/null @@ -1,62 +0,0 @@ - -image/svg+xml - - - - diff --git a/app/bin/bitmaps/SVG/box.svg b/app/bin/bitmaps/SVG/box.svg deleted file mode 100644 index e936fa4..0000000 --- a/app/bin/bitmaps/SVG/box.svg +++ /dev/null @@ -1,72 +0,0 @@ - -image/svg+xml - - - - - diff --git a/app/bin/bitmaps/SVG/bridge.svg b/app/bin/bitmaps/SVG/bridge.svg deleted file mode 100644 index af55093..0000000 --- a/app/bin/bitmaps/SVG/bridge.svg +++ /dev/null @@ -1,162 +0,0 @@ - -image/svg+xml diff --git a/app/bin/bitmaps/SVG/building.svg b/app/bin/bitmaps/SVG/building.svg deleted file mode 100644 index 4b63286..0000000 --- a/app/bin/bitmaps/SVG/building.svg +++ /dev/null @@ -1,85 +0,0 @@ - -image/svg+xml - - - - - - - diff --git a/app/bin/bitmaps/SVG/car-inventory.svg b/app/bin/bitmaps/SVG/car-inventory.svg deleted file mode 100644 index 27d805d..0000000 --- a/app/bin/bitmaps/SVG/car-inventory.svg +++ /dev/null @@ -1,146 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/change-grid.svg b/app/bin/bitmaps/SVG/change-grid.svg deleted file mode 100644 index 0962f5f..0000000 --- a/app/bin/bitmaps/SVG/change-grid.svg +++ /dev/null @@ -1,136 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/circle-center.svg b/app/bin/bitmaps/SVG/circle-center.svg deleted file mode 100644 index dc1b0fc..0000000 --- a/app/bin/bitmaps/SVG/circle-center.svg +++ /dev/null @@ -1,283 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/circle-filled-center.svg b/app/bin/bitmaps/SVG/circle-filled-center.svg deleted file mode 100644 index 252ce43..0000000 --- a/app/bin/bitmaps/SVG/circle-filled-center.svg +++ /dev/null @@ -1,72 +0,0 @@ - -image/svg+xml - - - - - - diff --git a/app/bin/bitmaps/SVG/circle-filled-tangent.svg b/app/bin/bitmaps/SVG/circle-filled-tangent.svg deleted file mode 100644 index afbf7ea..0000000 --- a/app/bin/bitmaps/SVG/circle-filled-tangent.svg +++ /dev/null @@ -1,78 +0,0 @@ - -image/svg+xml - - - - - - diff --git a/app/bin/bitmaps/SVG/circle-line-center.svg b/app/bin/bitmaps/SVG/circle-line-center.svg deleted file mode 100644 index 18e05df..0000000 --- a/app/bin/bitmaps/SVG/circle-line-center.svg +++ /dev/null @@ -1,78 +0,0 @@ - -image/svg+xml - - - - - - diff --git a/app/bin/bitmaps/SVG/circle-line-tangent.svg b/app/bin/bitmaps/SVG/circle-line-tangent.svg deleted file mode 100644 index 02f8c39..0000000 --- a/app/bin/bitmaps/SVG/circle-line-tangent.svg +++ /dev/null @@ -1,78 +0,0 @@ - -image/svg+xml - - - - - - diff --git a/app/bin/bitmaps/SVG/circle-line.svg b/app/bin/bitmaps/SVG/circle-line.svg deleted file mode 100644 index 2aa4811..0000000 --- a/app/bin/bitmaps/SVG/circle-line.svg +++ /dev/null @@ -1,228 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -36 diff --git a/app/bin/bitmaps/SVG/circle-tangent.svg b/app/bin/bitmaps/SVG/circle-tangent.svg deleted file mode 100644 index 3e970c6..0000000 --- a/app/bin/bitmaps/SVG/circle-tangent.svg +++ /dev/null @@ -1,272 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/circle.svg b/app/bin/bitmaps/SVG/circle.svg deleted file mode 100644 index 660e7fd..0000000 --- a/app/bin/bitmaps/SVG/circle.svg +++ /dev/null @@ -1,301 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - -30 diff --git a/app/bin/bitmaps/SVG/connect.svg b/app/bin/bitmaps/SVG/connect.svg deleted file mode 100644 index 91578a6..0000000 --- a/app/bin/bitmaps/SVG/connect.svg +++ /dev/null @@ -1,159 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/control.svg b/app/bin/bitmaps/SVG/control.svg deleted file mode 100644 index 051e57f..0000000 --- a/app/bin/bitmaps/SVG/control.svg +++ /dev/null @@ -1,84 +0,0 @@ - -image/svg+xml diff --git a/app/bin/bitmaps/SVG/convert-from.svg b/app/bin/bitmaps/SVG/convert-from.svg deleted file mode 100644 index 259abd8..0000000 --- a/app/bin/bitmaps/SVG/convert-from.svg +++ /dev/null @@ -1,110 +0,0 @@ - -image/svg+xml diff --git a/app/bin/bitmaps/SVG/convert-to.svg b/app/bin/bitmaps/SVG/convert-to.svg deleted file mode 100644 index 5876444..0000000 --- a/app/bin/bitmaps/SVG/convert-to.svg +++ /dev/null @@ -1,107 +0,0 @@ - -image/svg+xml diff --git a/app/bin/bitmaps/SVG/copy.svg b/app/bin/bitmaps/SVG/copy.svg deleted file mode 100644 index a865437..0000000 --- a/app/bin/bitmaps/SVG/copy.svg +++ /dev/null @@ -1,57 +0,0 @@ - -image/svg+xml diff --git a/app/bin/bitmaps/SVG/cornu.svg b/app/bin/bitmaps/SVG/cornu.svg deleted file mode 100644 index be91077..0000000 --- a/app/bin/bitmaps/SVG/cornu.svg +++ /dev/null @@ -1,275 +0,0 @@ - -image/svg+xml diff --git a/app/bin/bitmaps/SVG/curved-chord.svg b/app/bin/bitmaps/SVG/curved-chord.svg deleted file mode 100644 index 5db0f01..0000000 --- a/app/bin/bitmaps/SVG/curved-chord.svg +++ /dev/null @@ -1,172 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/curved-end.svg b/app/bin/bitmaps/SVG/curved-end.svg deleted file mode 100644 index 4c76cb4..0000000 --- a/app/bin/bitmaps/SVG/curved-end.svg +++ /dev/null @@ -1,160 +0,0 @@ - -image/svg+xml diff --git a/app/bin/bitmaps/SVG/curved-line-chord.svg b/app/bin/bitmaps/SVG/curved-line-chord.svg deleted file mode 100644 index b1cc041..0000000 --- a/app/bin/bitmaps/SVG/curved-line-chord.svg +++ /dev/null @@ -1,114 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/curved-line-end.svg b/app/bin/bitmaps/SVG/curved-line-end.svg deleted file mode 100644 index 365e1bd..0000000 --- a/app/bin/bitmaps/SVG/curved-line-end.svg +++ /dev/null @@ -1,108 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/curved-line-middle.svg b/app/bin/bitmaps/SVG/curved-line-middle.svg deleted file mode 100644 index 237b453..0000000 --- a/app/bin/bitmaps/SVG/curved-line-middle.svg +++ /dev/null @@ -1,99 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/curved-line-tangent.svg b/app/bin/bitmaps/SVG/curved-line-tangent.svg deleted file mode 100644 index dbac2e2..0000000 --- a/app/bin/bitmaps/SVG/curved-line-tangent.svg +++ /dev/null @@ -1,190 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/curved-middle.svg b/app/bin/bitmaps/SVG/curved-middle.svg deleted file mode 100644 index 011b402..0000000 --- a/app/bin/bitmaps/SVG/curved-middle.svg +++ /dev/null @@ -1,202 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/curved-tangent.svg b/app/bin/bitmaps/SVG/curved-tangent.svg deleted file mode 100644 index e9aee6b..0000000 --- a/app/bin/bitmaps/SVG/curved-tangent.svg +++ /dev/null @@ -1,191 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/cut.svg b/app/bin/bitmaps/SVG/cut.svg deleted file mode 100644 index 8b8d9f0..0000000 --- a/app/bin/bitmaps/SVG/cut.svg +++ /dev/null @@ -1,64 +0,0 @@ - -image/svg+xml diff --git a/app/bin/bitmaps/SVG/delete.svg b/app/bin/bitmaps/SVG/delete.svg deleted file mode 100644 index 55d6471..0000000 --- a/app/bin/bitmaps/SVG/delete.svg +++ /dev/null @@ -1,143 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/describe.svg b/app/bin/bitmaps/SVG/describe.svg deleted file mode 100644 index 495a3b8..0000000 --- a/app/bin/bitmaps/SVG/describe.svg +++ /dev/null @@ -1,144 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/description.svg b/app/bin/bitmaps/SVG/description.svg deleted file mode 100644 index 15f43e2..0000000 --- a/app/bin/bitmaps/SVG/description.svg +++ /dev/null @@ -1,143 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - -DESC diff --git a/app/bin/bitmaps/SVG/dimension.svg b/app/bin/bitmaps/SVG/dimension.svg deleted file mode 100644 index 7443b8a..0000000 --- a/app/bin/bitmaps/SVG/dimension.svg +++ /dev/null @@ -1,148 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - - - - - - - - -36 - diff --git a/app/bin/bitmaps/SVG/doc-export-bmap.svg b/app/bin/bitmaps/SVG/doc-export-bmap.svg deleted file mode 100644 index 90a88b0..0000000 --- a/app/bin/bitmaps/SVG/doc-export-bmap.svg +++ /dev/null @@ -1,97 +0,0 @@ - -image/svg+xml diff --git a/app/bin/bitmaps/SVG/doc-export-dxf.svg b/app/bin/bitmaps/SVG/doc-export-dxf.svg deleted file mode 100644 index 30e6e79..0000000 --- a/app/bin/bitmaps/SVG/doc-export-dxf.svg +++ /dev/null @@ -1,114 +0,0 @@ - -image/svg+xml diff --git a/app/bin/bitmaps/SVG/doc-export-svg.svg b/app/bin/bitmaps/SVG/doc-export-svg.svg deleted file mode 100644 index fcde438..0000000 --- a/app/bin/bitmaps/SVG/doc-export-svg.svg +++ /dev/null @@ -1,76 +0,0 @@ - -image/svg+xml diff --git a/app/bin/bitmaps/SVG/doc-export-xtc.svg b/app/bin/bitmaps/SVG/doc-export-xtc.svg deleted file mode 100644 index dab12aa..0000000 --- a/app/bin/bitmaps/SVG/doc-export-xtc.svg +++ /dev/null @@ -1,60 +0,0 @@ - -image/svg+xml diff --git a/app/bin/bitmaps/SVG/doc-export.svg b/app/bin/bitmaps/SVG/doc-export.svg deleted file mode 100644 index 6954caf..0000000 --- a/app/bin/bitmaps/SVG/doc-export.svg +++ /dev/null @@ -1,66 +0,0 @@ - -image/svg+xml diff --git a/app/bin/bitmaps/SVG/doc-import-xtc.svg b/app/bin/bitmaps/SVG/doc-import-xtc.svg deleted file mode 100644 index 01f2275..0000000 --- a/app/bin/bitmaps/SVG/doc-import-xtc.svg +++ /dev/null @@ -1,60 +0,0 @@ - -image/svg+xml diff --git a/app/bin/bitmaps/SVG/doc-import.svg b/app/bin/bitmaps/SVG/doc-import.svg deleted file mode 100644 index e2bfc72..0000000 --- a/app/bin/bitmaps/SVG/doc-import.svg +++ /dev/null @@ -1,66 +0,0 @@ - -image/svg+xml diff --git a/app/bin/bitmaps/SVG/doc-new.svg b/app/bin/bitmaps/SVG/doc-new.svg deleted file mode 100644 index 6aac25e..0000000 --- a/app/bin/bitmaps/SVG/doc-new.svg +++ /dev/null @@ -1,63 +0,0 @@ - -image/svg+xml diff --git a/app/bin/bitmaps/SVG/doc-open.svg b/app/bin/bitmaps/SVG/doc-open.svg deleted file mode 100644 index ede9909..0000000 --- a/app/bin/bitmaps/SVG/doc-open.svg +++ /dev/null @@ -1,72 +0,0 @@ - -image/svg+xml diff --git a/app/bin/bitmaps/SVG/doc-print.svg b/app/bin/bitmaps/SVG/doc-print.svg deleted file mode 100644 index 1926edf..0000000 --- a/app/bin/bitmaps/SVG/doc-print.svg +++ /dev/null @@ -1,94 +0,0 @@ - -image/svg+xml diff --git a/app/bin/bitmaps/SVG/doc-revert.svg b/app/bin/bitmaps/SVG/doc-revert.svg deleted file mode 100644 index f5b6290..0000000 --- a/app/bin/bitmaps/SVG/doc-revert.svg +++ /dev/null @@ -1,55 +0,0 @@ - -image/svg+xml diff --git a/app/bin/bitmaps/SVG/doc-save-as.svg b/app/bin/bitmaps/SVG/doc-save-as.svg deleted file mode 100644 index cf9244d..0000000 --- a/app/bin/bitmaps/SVG/doc-save-as.svg +++ /dev/null @@ -1,99 +0,0 @@ - -image/svg+xml diff --git a/app/bin/bitmaps/SVG/doc-save.svg b/app/bin/bitmaps/SVG/doc-save.svg deleted file mode 100644 index 3a553dd..0000000 --- a/app/bin/bitmaps/SVG/doc-save.svg +++ /dev/null @@ -1,90 +0,0 @@ - -image/svg+xml diff --git a/app/bin/bitmaps/SVG/doc-setup.svg b/app/bin/bitmaps/SVG/doc-setup.svg deleted file mode 100644 index 1219b1e..0000000 --- a/app/bin/bitmaps/SVG/doc-setup.svg +++ /dev/null @@ -1,101 +0,0 @@ - -image/svg+xml diff --git a/app/bin/bitmaps/SVG/down.svg b/app/bin/bitmaps/SVG/down.svg deleted file mode 100644 index 41f83fb..0000000 --- a/app/bin/bitmaps/SVG/down.svg +++ /dev/null @@ -1,56 +0,0 @@ - -image/svg+xml - - - - diff --git a/app/bin/bitmaps/SVG/elevation.svg b/app/bin/bitmaps/SVG/elevation.svg deleted file mode 100644 index b6f9813..0000000 --- a/app/bin/bitmaps/SVG/elevation.svg +++ /dev/null @@ -1,139 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - -Z - diff --git a/app/bin/bitmaps/SVG/exit.svg b/app/bin/bitmaps/SVG/exit.svg deleted file mode 100644 index 210bdb9..0000000 --- a/app/bin/bitmaps/SVG/exit.svg +++ /dev/null @@ -1,88 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - -EXIT diff --git a/app/bin/bitmaps/SVG/extend.svg b/app/bin/bitmaps/SVG/extend.svg deleted file mode 100644 index eac7840..0000000 --- a/app/bin/bitmaps/SVG/extend.svg +++ /dev/null @@ -1,154 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/filled-box.svg b/app/bin/bitmaps/SVG/filled-box.svg deleted file mode 100644 index 2d8e2dd..0000000 --- a/app/bin/bitmaps/SVG/filled-box.svg +++ /dev/null @@ -1,72 +0,0 @@ - -image/svg+xml - - - - - diff --git a/app/bin/bitmaps/SVG/filled-polygon.svg b/app/bin/bitmaps/SVG/filled-polygon.svg deleted file mode 100644 index 6fe8cce..0000000 --- a/app/bin/bitmaps/SVG/filled-polygon.svg +++ /dev/null @@ -1,59 +0,0 @@ - -image/svg+xml - - - - diff --git a/app/bin/bitmaps/SVG/go.svg b/app/bin/bitmaps/SVG/go.svg deleted file mode 100644 index 943e561..0000000 --- a/app/bin/bitmaps/SVG/go.svg +++ /dev/null @@ -1,106 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/grid.svg b/app/bin/bitmaps/SVG/grid.svg deleted file mode 100644 index 23b9b93..0000000 --- a/app/bin/bitmaps/SVG/grid.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/helix.svg b/app/bin/bitmaps/SVG/helix.svg deleted file mode 100644 index c88f470..0000000 --- a/app/bin/bitmaps/SVG/helix.svg +++ /dev/null @@ -1,170 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/join-line.svg b/app/bin/bitmaps/SVG/join-line.svg deleted file mode 100644 index feb8a93..0000000 --- a/app/bin/bitmaps/SVG/join-line.svg +++ /dev/null @@ -1,94 +0,0 @@ - -image/svg+xml diff --git a/app/bin/bitmaps/SVG/join.svg b/app/bin/bitmaps/SVG/join.svg deleted file mode 100644 index c441656..0000000 --- a/app/bin/bitmaps/SVG/join.svg +++ /dev/null @@ -1,154 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/layers.svg b/app/bin/bitmaps/SVG/layers.svg deleted file mode 100644 index b261d30..0000000 --- a/app/bin/bitmaps/SVG/layers.svg +++ /dev/null @@ -1,98 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/magnet.svg b/app/bin/bitmaps/SVG/magnet.svg deleted file mode 100644 index 9d0b3a6..0000000 --- a/app/bin/bitmaps/SVG/magnet.svg +++ /dev/null @@ -1,83 +0,0 @@ - -image/svg+xml diff --git a/app/bin/bitmaps/SVG/manage.svg b/app/bin/bitmaps/SVG/manage.svg deleted file mode 100644 index 2791e15..0000000 --- a/app/bin/bitmaps/SVG/manage.svg +++ /dev/null @@ -1,77 +0,0 @@ - -image/svg+xml diff --git a/app/bin/bitmaps/SVG/map.svg b/app/bin/bitmaps/SVG/map.svg deleted file mode 100644 index 69686be..0000000 --- a/app/bin/bitmaps/SVG/map.svg +++ /dev/null @@ -1,146 +0,0 @@ - -image/svg+xml diff --git a/app/bin/bitmaps/SVG/move.svg b/app/bin/bitmaps/SVG/move.svg deleted file mode 100644 index 9c1e906..0000000 --- a/app/bin/bitmaps/SVG/move.svg +++ /dev/null @@ -1,231 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/new-car.svg b/app/bin/bitmaps/SVG/new-car.svg deleted file mode 100644 index 6b0d579..0000000 --- a/app/bin/bitmaps/SVG/new-car.svg +++ /dev/null @@ -1,136 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/ok.svg b/app/bin/bitmaps/SVG/ok.svg deleted file mode 100644 index 21e0640..0000000 --- a/app/bin/bitmaps/SVG/ok.svg +++ /dev/null @@ -1,55 +0,0 @@ - -image/svg+xml - - - diff --git a/app/bin/bitmaps/SVG/pan-zoom.svg b/app/bin/bitmaps/SVG/pan-zoom.svg deleted file mode 100644 index 7597072..0000000 --- a/app/bin/bitmaps/SVG/pan-zoom.svg +++ /dev/null @@ -1,89 +0,0 @@ - -image/svg+xml - - - - - - - - diff --git a/app/bin/bitmaps/SVG/parallel-line.svg b/app/bin/bitmaps/SVG/parallel-line.svg deleted file mode 100644 index ad96c16..0000000 --- a/app/bin/bitmaps/SVG/parallel-line.svg +++ /dev/null @@ -1,155 +0,0 @@ - -image/svg+xml diff --git a/app/bin/bitmaps/SVG/parallel.svg b/app/bin/bitmaps/SVG/parallel.svg deleted file mode 100644 index 9ff2898..0000000 --- a/app/bin/bitmaps/SVG/parallel.svg +++ /dev/null @@ -1,221 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/parameter.svg b/app/bin/bitmaps/SVG/parameter.svg deleted file mode 100644 index b686804..0000000 --- a/app/bin/bitmaps/SVG/parameter.svg +++ /dev/null @@ -1,76 +0,0 @@ - -image/svg+xml diff --git a/app/bin/bitmaps/SVG/paste.svg b/app/bin/bitmaps/SVG/paste.svg deleted file mode 100644 index 7d089d6..0000000 --- a/app/bin/bitmaps/SVG/paste.svg +++ /dev/null @@ -1,64 +0,0 @@ - -image/svg+xml diff --git a/app/bin/bitmaps/SVG/polygon.svg b/app/bin/bitmaps/SVG/polygon.svg deleted file mode 100644 index f8aa925..0000000 --- a/app/bin/bitmaps/SVG/polygon.svg +++ /dev/null @@ -1,57 +0,0 @@ - -image/svg+xml - - - - diff --git a/app/bin/bitmaps/SVG/polyline.svg b/app/bin/bitmaps/SVG/polyline.svg deleted file mode 100644 index 695bad9..0000000 --- a/app/bin/bitmaps/SVG/polyline.svg +++ /dev/null @@ -1,56 +0,0 @@ - -image/svg+xml diff --git a/app/bin/bitmaps/SVG/profile.svg b/app/bin/bitmaps/SVG/profile.svg deleted file mode 100644 index 9f76546..0000000 --- a/app/bin/bitmaps/SVG/profile.svg +++ /dev/null @@ -1,176 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/protractor.svg b/app/bin/bitmaps/SVG/protractor.svg deleted file mode 100644 index 6e7d141..0000000 --- a/app/bin/bitmaps/SVG/protractor.svg +++ /dev/null @@ -1,68 +0,0 @@ - -image/svg+xml diff --git a/app/bin/bitmaps/SVG/redo.svg b/app/bin/bitmaps/SVG/redo.svg deleted file mode 100644 index 77c8cb8..0000000 --- a/app/bin/bitmaps/SVG/redo.svg +++ /dev/null @@ -1,52 +0,0 @@ - -image/svg+xml - - - diff --git a/app/bin/bitmaps/SVG/reflect.svg b/app/bin/bitmaps/SVG/reflect.svg deleted file mode 100644 index 837743c..0000000 --- a/app/bin/bitmaps/SVG/reflect.svg +++ /dev/null @@ -1,71 +0,0 @@ - -image/svg+xml - - - - - - diff --git a/app/bin/bitmaps/SVG/rotate.svg b/app/bin/bitmaps/SVG/rotate.svg deleted file mode 100644 index 2c788f2..0000000 --- a/app/bin/bitmaps/SVG/rotate.svg +++ /dev/null @@ -1,222 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/ruler.svg b/app/bin/bitmaps/SVG/ruler.svg deleted file mode 100644 index 8cb140b..0000000 --- a/app/bin/bitmaps/SVG/ruler.svg +++ /dev/null @@ -1,81 +0,0 @@ - -image/svg+xml1 diff --git a/app/bin/bitmaps/SVG/select.svg b/app/bin/bitmaps/SVG/select.svg deleted file mode 100644 index bb81e69..0000000 --- a/app/bin/bitmaps/SVG/select.svg +++ /dev/null @@ -1,153 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/sensor.svg b/app/bin/bitmaps/SVG/sensor.svg deleted file mode 100644 index 4188f0e..0000000 --- a/app/bin/bitmaps/SVG/sensor.svg +++ /dev/null @@ -1,71 +0,0 @@ - -image/svg+xml diff --git a/app/bin/bitmaps/SVG/signal.svg b/app/bin/bitmaps/SVG/signal.svg deleted file mode 100644 index ad01427..0000000 --- a/app/bin/bitmaps/SVG/signal.svg +++ /dev/null @@ -1,78 +0,0 @@ - -image/svg+xml diff --git a/app/bin/bitmaps/SVG/snap-curs.svg b/app/bin/bitmaps/SVG/snap-curs.svg deleted file mode 100644 index fa700ce..0000000 --- a/app/bin/bitmaps/SVG/snap-curs.svg +++ /dev/null @@ -1,130 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/snap-grid.svg b/app/bin/bitmaps/SVG/snap-grid.svg deleted file mode 100644 index f6650a7..0000000 --- a/app/bin/bitmaps/SVG/snap-grid.svg +++ /dev/null @@ -1,128 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/split-draw.svg b/app/bin/bitmaps/SVG/split-draw.svg deleted file mode 100644 index d74ee25..0000000 --- a/app/bin/bitmaps/SVG/split-draw.svg +++ /dev/null @@ -1,97 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/split.svg b/app/bin/bitmaps/SVG/split.svg deleted file mode 100644 index 2bc28cb..0000000 --- a/app/bin/bitmaps/SVG/split.svg +++ /dev/null @@ -1,153 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/star.svg b/app/bin/bitmaps/SVG/star.svg deleted file mode 100644 index 13f0914..0000000 --- a/app/bin/bitmaps/SVG/star.svg +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - diff --git a/app/bin/bitmaps/SVG/sticky-doc.svg b/app/bin/bitmaps/SVG/sticky-doc.svg deleted file mode 100644 index 20ea76f..0000000 --- a/app/bin/bitmaps/SVG/sticky-doc.svg +++ /dev/null @@ -1,72 +0,0 @@ - -image/svg+xml diff --git a/app/bin/bitmaps/SVG/sticky-link.svg b/app/bin/bitmaps/SVG/sticky-link.svg deleted file mode 100644 index f403661..0000000 --- a/app/bin/bitmaps/SVG/sticky-link.svg +++ /dev/null @@ -1,76 +0,0 @@ - -image/svg+xml diff --git a/app/bin/bitmaps/SVG/sticky-note.svg b/app/bin/bitmaps/SVG/sticky-note.svg deleted file mode 100644 index 1fe3d30..0000000 --- a/app/bin/bitmaps/SVG/sticky-note.svg +++ /dev/null @@ -1,88 +0,0 @@ - -image/svg+xml diff --git a/app/bin/bitmaps/SVG/stop.svg b/app/bin/bitmaps/SVG/stop.svg deleted file mode 100644 index 4bd5fa0..0000000 --- a/app/bin/bitmaps/SVG/stop.svg +++ /dev/null @@ -1,106 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/straight-line.svg b/app/bin/bitmaps/SVG/straight-line.svg deleted file mode 100644 index 32a01a3..0000000 --- a/app/bin/bitmaps/SVG/straight-line.svg +++ /dev/null @@ -1,126 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/straight.svg b/app/bin/bitmaps/SVG/straight.svg deleted file mode 100644 index 6c5f37b..0000000 --- a/app/bin/bitmaps/SVG/straight.svg +++ /dev/null @@ -1,160 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/switch-ai.svg b/app/bin/bitmaps/SVG/switch-ai.svg deleted file mode 100644 index 9c842e3..0000000 --- a/app/bin/bitmaps/SVG/switch-ai.svg +++ /dev/null @@ -1,89 +0,0 @@ - -image/svg+xml diff --git a/app/bin/bitmaps/SVG/switchm.svg b/app/bin/bitmaps/SVG/switchm.svg deleted file mode 100644 index 5064f4e..0000000 --- a/app/bin/bitmaps/SVG/switchm.svg +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/switchmdel.svg b/app/bin/bitmaps/SVG/switchmdel.svg deleted file mode 100644 index cdf6d81..0000000 --- a/app/bin/bitmaps/SVG/switchmdel.svg +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/switchmedit.svg b/app/bin/bitmaps/SVG/switchmedit.svg deleted file mode 100644 index 9a2008a..0000000 --- a/app/bin/bitmaps/SVG/switchmedit.svg +++ /dev/null @@ -1,214 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/switchmnew.svg b/app/bin/bitmaps/SVG/switchmnew.svg deleted file mode 100644 index 4f8a2e6..0000000 --- a/app/bin/bitmaps/SVG/switchmnew.svg +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/table-edge.svg b/app/bin/bitmaps/SVG/table-edge.svg deleted file mode 100644 index e2663ac..0000000 --- a/app/bin/bitmaps/SVG/table-edge.svg +++ /dev/null @@ -1,80 +0,0 @@ - -image/svg+xml - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/text.svg b/app/bin/bitmaps/SVG/text.svg deleted file mode 100644 index c5e5c32..0000000 --- a/app/bin/bitmaps/SVG/text.svg +++ /dev/null @@ -1,56 +0,0 @@ - -image/svg+xml - -A - diff --git a/app/bin/bitmaps/SVG/tipofday.svg b/app/bin/bitmaps/SVG/tipofday.svg deleted file mode 100644 index c83540d..0000000 --- a/app/bin/bitmaps/SVG/tipofday.svg +++ /dev/null @@ -1,1176 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - Info - - - Jakub Steiner - - - - - dialog - info - - - http://jimmac.musichall.cz - - - - Garrett LeSage - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/top.svg b/app/bin/bitmaps/SVG/top.svg deleted file mode 100644 index ccf60ad..0000000 --- a/app/bin/bitmaps/SVG/top.svg +++ /dev/null @@ -1,62 +0,0 @@ - -image/svg+xml - - - - diff --git a/app/bin/bitmaps/SVG/train.svg b/app/bin/bitmaps/SVG/train.svg deleted file mode 100644 index e2d2a71..0000000 --- a/app/bin/bitmaps/SVG/train.svg +++ /dev/null @@ -1,173 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/trim.svg b/app/bin/bitmaps/SVG/trim.svg deleted file mode 100644 index 553d08f..0000000 --- a/app/bin/bitmaps/SVG/trim.svg +++ /dev/null @@ -1,91 +0,0 @@ - -image/svg+xml diff --git a/app/bin/bitmaps/SVG/tunnel.svg b/app/bin/bitmaps/SVG/tunnel.svg deleted file mode 100644 index c31fabe..0000000 --- a/app/bin/bitmaps/SVG/tunnel.svg +++ /dev/null @@ -1,164 +0,0 @@ - -image/svg+xml diff --git a/app/bin/bitmaps/SVG/turnout-designer.svg b/app/bin/bitmaps/SVG/turnout-designer.svg deleted file mode 100644 index f11cbf6..0000000 --- a/app/bin/bitmaps/SVG/turnout-designer.svg +++ /dev/null @@ -1,179 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/turnout.svg b/app/bin/bitmaps/SVG/turnout.svg deleted file mode 100644 index 35b8260..0000000 --- a/app/bin/bitmaps/SVG/turnout.svg +++ /dev/null @@ -1,168 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/turntable.svg b/app/bin/bitmaps/SVG/turntable.svg deleted file mode 100644 index 8dbb510..0000000 --- a/app/bin/bitmaps/SVG/turntable.svg +++ /dev/null @@ -1,175 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/undo.svg b/app/bin/bitmaps/SVG/undo.svg deleted file mode 100644 index 290e251..0000000 --- a/app/bin/bitmaps/SVG/undo.svg +++ /dev/null @@ -1,53 +0,0 @@ - -image/svg+xml - - - diff --git a/app/bin/bitmaps/SVG/zoom-choose.svg b/app/bin/bitmaps/SVG/zoom-choose.svg deleted file mode 100644 index 1f41ba8..0000000 --- a/app/bin/bitmaps/SVG/zoom-choose.svg +++ /dev/null @@ -1,359 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/zoom-extent.svg b/app/bin/bitmaps/SVG/zoom-extent.svg deleted file mode 100644 index 9ee2521..0000000 --- a/app/bin/bitmaps/SVG/zoom-extent.svg +++ /dev/null @@ -1,247 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/zoom-in.svg b/app/bin/bitmaps/SVG/zoom-in.svg deleted file mode 100644 index 8c9a883..0000000 --- a/app/bin/bitmaps/SVG/zoom-in.svg +++ /dev/null @@ -1,222 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/bin/bitmaps/SVG/zoom-out.svg b/app/bin/bitmaps/SVG/zoom-out.svg deleted file mode 100644 index a476985..0000000 --- a/app/bin/bitmaps/SVG/zoom-out.svg +++ /dev/null @@ -1,215 +0,0 @@ - -image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/bin/bitmaps/background.xpm b/app/bin/bitmaps/background.xpm deleted file mode 100644 index 2e8a141..0000000 --- a/app/bin/bitmaps/background.xpm +++ /dev/null @@ -1,157 +0,0 @@ -static char *background_x16[] = { - "16 16 23 1", - " c None", - "0 c #000000", - "1 c #003300", - "2 c #333300", - "3 c #333333", - "4 c #336666", - "5 c #336699", - "6 c #339933", - "7 c #339966", - "8 c #33CC33", - "9 c #669966", - "A c #66CC66", - "B c #66CCFF", - "C c #999966", - "D c #999999", - "E c #99CC66", - "F c #99CC99", - "G c #99CCCC", - "H c #CC9999", - "I c #CCCC99", - "J c #FFCC99", - "K c #FFCCCC", - "L c #C0C0C0", - "3333333333333333", - "5BBBBBBBBDCCCCC0", - "5BBBBBBBBHC69HH0", - "5BBBBBBBBH966CH0", - "5BBBBBBBFED99HH0", - "5BBBBBGD88AHHHH0", - "5BBGLHHD88AIHHH0", - "5BGDCHHHIEIIIIH0", - "4GH77CHIIIIIIII0", - "2HH77CIIIJKKIII0", - "2HHDCFIIKKKKIIH0", - "2HHHE88EKKKJIIH0", - "2C9CE88EIKJIIIH0", - "2666CAAIIIIIIHH0", - "2969HHHHIIIHHHH0", - "2011000000000000"}; - -static char *background_x24[] = { - "24 24 23 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #333333", - "3 c #339933", - "4 c #339966", - "5 c #33CC33", - "6 c #666666", - "7 c #669966", - "8 c #6699CC", - "9 c #66CC66", - "A c #66CCFF", - "B c #996666", - "C c #999966", - "D c #999999", - "E c #99CC66", - "F c #99CC99", - "G c #99CCCC", - "H c #CC9999", - "I c #CCCC99", - "J c #FFCC99", - "K c #FFCCCC", - "L c #C0C0C0", - " 0000000000000000000000 ", - "28888888888888BBBBBBBB62", - "2AAAAAAAAAAAAAHHHHCHHHC2", - "2AAAAAAAAAAAAGHH733CHHC2", - "2AAAAAAAAAAAALH73337HHC2", - "2AAAAAAAAAAAAHHC3333HHC2", - "2AAAAAAAAAAAFDEH733CHHC2", - "2AAAAAAAAAGH9559HDHHHHC2", - "2AAAAAAAAGHE5555HHHHHHC2", - "2AAAAAGHHHHE5555IIHHHHC2", - "2AAAGHHHHHHHE55IIIIIHHC2", - "2AAGH77HHHHIIIIIIIIIIHC2", - "2AGH7444HHIIIIIIIIIIIIC2", - "2CHH7444HHIIIIIKKKIIIIC2", - "2CHHC447HIIIIJKKKKIIIIC2", - "2CHHHCCCHIIIJKKKKKIIIIC2", - "2CHHHHHE55EIKKKKKJIIIHC2", - "2CHHHHE5555IKKKKKIIIIHC2", - "2CC73HH5555IIKKKIIIIHHC2", - "2C3333C9559IIIIIIIIIHHC2", - "2C3333CH9EIIIIIIIIIHHHC2", - "2C3337DHHHHIIIIIIHHHHHC2", - "2BC77CCCCCCCCCCCCCCCCCC2", - "122222222222222222222222"}; - -static char *background_x32[] = { - "32 32 28 1", - " c None", - "0 c #000000", - "1 c #333333", - "2 c #336666", - "3 c #339933", - "4 c #339966", - "5 c #33CC33", - "6 c #33CC66", - "7 c #663333", - "8 c #666633", - "9 c #666666", - "A c #666699", - "B c #669966", - "C c #6699CC", - "D c #66CC66", - "E c #66CCFF", - "F c #996666", - "G c #999966", - "H c #999999", - "I c #99CC66", - "J c #99CC99", - "K c #99CCCC", - "L c #CC9999", - "M c #CCCC99", - "N c #FFCC99", - "O c #FFCCCC", - "P c #C0C0C0", - "Q c #808080", - " ", - "02AAAAAAAAAAAAAAAA97777777777710", - "0CEEEEEEEEEEEEEEEEKLLLLLLLLLLLF0", - "0CEEEEEEEEEEEEEEEELLLLGGGLLLLLF0", - "0CEEEEEEEEEEEEEEEELLLG333GLLLLF0", - "0CEEEEEEEEEEEEEEEELLG33333GLLLF0", - "0CEEEEEEEEEEEEEEEKLLG33333GLLLF0", - "0CEEEEEEEEEEEEEEELLLG33333BLLLF0", - "0CEEEEEEEEEEEEEEJLLILB333BLLLLF0", - "0CEEEEEEEEEEEEELI555ILBGGGLLLLF0", - "0CEEEEEEEEEEEKLI55555ILLLLLLLLF0", - "0CEEEEEEEEEEPLLD55555ILLLLLLLLF0", - "0CEEEEEEKPLLLLLI55555DMMLLLLLLF0", - "0CEEEELLLLLLLLLID555DMMMMMLLLLF0", - "0CEEEKLLLLLLLLLLM6IIMMMMMMMLLLF0", - "0CEEKLG44BLLLLLMMMMMMMMMMMMMMLF0", - "0CEKLHB4444LLLMMMMMMMMMMMMMMMLF0", - "0QLLLG4444BLLMMMMMMMNOOMMMMMMLF0", - "09LLLH44444LMMMMMMMOOOOOMMMMMLF0", - "09LLLLB444GLMMMMMMOOOOOOMMMMMLF0", - "09LLLLL4BBLMMMMMMOOOOOOOMMMMMLF0", - "09LLLLLLLLDD5IMMOOOOOOONMMMMLLF0", - "09LLLLLLLI5555IMOOOOOOOMMMMMLLF0", - "09LLLLLLL55555DMOOOOOONMMMMMLLF0", - "09LGBBBLLD5555DMMOOOOMMMMMMLLLF0", - "09H3333BH55555DMMMMMMMMMMMMLLLF0", - "09333333GHD555MMMMMMMMMMMMLLLLF0", - "09B33333GLHIMMMMMMMMMMMMMLLLLLF0", - "09B33333GLLLLLMMMMMMMMMLLLLLLLF0", - "09LG333GLLLLLLLLLLLLLLLLLLLLLLF0", - "07FFBFFFFFFFFFFFFFFFFFFFFFFFFF80", - " 000000000000000000000000000000 "}; - -static char **background_xpm[3] = { background_x16, background_x24, background_x32 }; - diff --git a/app/bin/bitmaps/benchwork.xpm b/app/bin/bitmaps/benchwork.xpm deleted file mode 100644 index a94b1fa..0000000 --- a/app/bin/bitmaps/benchwork.xpm +++ /dev/null @@ -1,112 +0,0 @@ -static char *benchwork_x16[] = { - "16 16 9 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #663300", - "3 c #993300", - "4 c #996600", - "5 c #CC6600", - "6 c #FF6600", - "7 c #FF9900", - " 2 3 ", - " 126743 ", - " 1476257 ", - " 026752677 ", - " 1366247777 ", - " 00001677777 ", - " 07772777777 ", - " 07772777777 ", - " 07772777777 ", - " 07772777777 ", - " 07772777775 ", - " 07772777742 ", - " 0777277622 ", - " 07772762 ", - " 0777252 ", - " 000012 "}; - -static char *benchwork_x24[] = { - "24 24 10 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #333300", - "3 c #663300", - "4 c #993300", - "5 c #996600", - "6 c #CC6600", - "7 c #FF6600", - "8 c #FF9900", - " ", - " 03788843 ", - " 147887368 ", - " 02688863788 ", - " 147887358888 ", - " 01688863788888 ", - " 137887447888888 ", - " 0000003688888888 ", - " 0888807888888888 ", - " 0888808888888888 ", - " 0888808888888888 ", - " 0888808888888888 ", - " 0888808888888888 ", - " 0888808888888888 ", - " 0888808888888888 ", - " 0888808888888886 ", - " 0888808888888743 ", - " 088880888888733 ", - " 0888808888863 ", - " 088880888853 ", - " 08888088733 ", - " 088880873 ", - " 08888053 ", - " 0000001 "}; - -static char *benchwork_x32[] = { - "32 32 10 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #333300", - "3 c #663300", - "4 c #993300", - "5 c #996600", - "6 c #CC6600", - "7 c #FF6600", - "8 c #FF9900", - " ", - " 027888874 ", - " 3478888736 ", - " 026888885378 ", - " 1478888736888 ", - " 16888886378888 ", - " 1378888734888888 ", - " 16888886268888888 ", - " 0378888743788888888 ", - " 16888887368888888888 ", - " 000000001788888888888 ", - " 088888884888888888888 ", - " 088888884888888888888 ", - " 088888884888888888888 ", - " 088888884888888888888 ", - " 088888884888888888888 ", - " 088888884888888888888 ", - " 088888884888888888888 ", - " 088888884888888888888 ", - " 088888884888888888888 ", - " 088888884888888888888 ", - " 088888884888888888873 ", - " 08888888488888888863 ", - " 0888888848888888863 ", - " 088888884888888743 ", - " 08888888488888733 ", - " 088888884888863 ", - " 08888888488853 ", - " 0888888848733 ", - " 08888888463 ", - " 0000000033 ", - " 0 "}; - -static char **benchwork_xpm[3] = { benchwork_x16, benchwork_x24, benchwork_x32 }; - diff --git a/app/bin/bitmaps/bezier-line.xpm b/app/bin/bitmaps/bezier-line.xpm deleted file mode 100644 index 2aea754..0000000 --- a/app/bin/bitmaps/bezier-line.xpm +++ /dev/null @@ -1,98 +0,0 @@ -static char *bezier_line_x16[] = { - "16 16 5 1", - " c None", - "0 c #000000", - "1 c #990000", - "2 c #CC0000", - "3 c #800000", - " 2 ", - " 2222222222221", - " 22222222221111", - " 22 00 ", - " 00 ", - " 0 ", - " 0 ", - " 00 ", - " 0 ", - " 00 ", - " 0 ", - " 0 ", - " 00 2 ", - " 13331 2222 ", - "12222222222 2 ", - " 222 "}; - -static char *bezier_line_x24[] = { - "24 24 4 1", - " c None", - "0 c #000000", - "1 c #990000", - "2 c #CC0000", - " ", - " 222 ", - " 22 2222222222222221 ", - " 2 2222222222221111 ", - " 2222 00 ", - " 0 ", - " 0 ", - " 00 ", - " 00 ", - " 0 ", - " 00 ", - " 0 ", - " 00 ", - " 0 ", - " 0 ", - " 00 ", - " 0 ", - " 0 ", - " 0 ", - " 00 2222 ", - " 000 22 2 ", - " 222222222222222 2 ", - " 2222 ", - " 22 "}; - -static char *bezier_line_x32[] = { - "32 32 6 1", - " c None", - "0 c #000000", - "1 c #660000", - "2 c #990000", - "3 c #CC0000", - "4 c #800000", - " ", - " 33333 ", - " 3333333 ", - " 33 333333333333333333332 ", - " 33 333333333333333333334 ", - " 3333333 0000 ", - " 33333 0000 ", - " 00 ", - " 00 ", - " 000 ", - " 000 ", - " 00 ", - " 000 ", - " 00 ", - " 000 ", - " 00 ", - " 00 ", - " 000 ", - " 00 ", - " 000 ", - " 00 ", - " 00 ", - " 000 ", - " 000 ", - " 000 ", - " 000 3333 ", - " 0000 333333 ", - " 24441142 33333333 33 ", - " 23333333333333333333 33 ", - " 233333 333 333 ", - " 33333 ", - " 333 "}; - -static char **bezier_line_xpm[3] = { bezier_line_x16, bezier_line_x24, bezier_line_x32 }; - diff --git a/app/bin/bitmaps/bezier-track.xpm b/app/bin/bitmaps/bezier-track.xpm deleted file mode 100644 index a8b7d92..0000000 --- a/app/bin/bitmaps/bezier-track.xpm +++ /dev/null @@ -1,130 +0,0 @@ -static char *bezier_track_x16[] = { - "16 16 9 1", - " c None", - "0 c #000000", - "1 c #996666", - "2 c #999999", - "3 c #CC0000", - "4 c #CC6666", - "5 c #CC9966", - "6 c #FFCCCC", - "7 c #808080", - " ", - " 434 200", - " 3 33333333333", - " 434 07 5 5", - " 0 5 700", - " 05 602 ", - " 06 50 ", - " 06160 ", - " 05 60 ", - " 06 50 ", - " 206160 ", - "0075 60 ", - " 5 570 434 ", - "3333333333 3 ", - "002 434 ", - " "}; - -static char *bezier_track_x24[] = { - "24 24 18 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #333300", - "3 c #333333", - "4 c #663333", - "5 c #666633", - "6 c #990000", - "7 c #993300", - "8 c #996633", - "9 c #999933", - "A c #999966", - "B c #CC0000", - "C c #CC3300", - "D c #CC3333", - "E c #CC6633", - "F c #CC9966", - "G c #CCCC66", - " ", - " FF ", - " BBBB G 00000", - " BB BBBBBBBBBBD76BEEB", - " BB BBBBBBBBB66ECBEEB", - " BBBB GF0 FF0100", - " 4F 244 G ", - " 0 GF20FF ", - " G4 2F ", - " 18G 00 ", - " 0 A5 ", - " F48 0F ", - " 05GG10 ", - " F50 A5 ", - " A5F 0 F ", - " F 0 GG20 ", - " 854 58G ", - " G G808G 00 ", - " 9218 F0 BB ", - "084 GF 02F BBBB ", - "BBBBBBBBBBBBBBBBB B ", - "083008 BBBB ", - "088 FF BBB ", - " G "}; - -static char *bezier_track_x32[] = { - "32 32 20 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #333300", - "3 c #333333", - "4 c #663333", - "5 c #666633", - "6 c #990000", - "7 c #993300", - "8 c #996633", - "9 c #999933", - "A c #999966", - "B c #CC0000", - "C c #CC3300", - "D c #CC3333", - "E c #CC6633", - "F c #CC9933", - "G c #CC9966", - "H c #CCCC66", - "I c #800000", - " ", - " HH ", - " BBB AG80", - " BBBBBB H 0002540", - " BBB BBBBBBBBBBBBBCE76BBEFE ", - " BB BBBBBBBBBBBBBBBBBBBBBBB", - " BBB BBB EDBI6CGGC EGE ", - " BBBBB HG2 GH800340", - " BBB G5GH 484 HH ", - " 0GHHG00AH ", - " H 0 H95 ", - " H88 35H ", - " 85HH 0 ", - " 0 HHG3 ", - " HH2 H5GH ", - " HA8H 02H ", - " 2GHHG0 ", - " 0 HH8A ", - " H84 45HH ", - " 88HH 0 ", - " 0 HHH10 ", - " HG2 HG8H ", - " H 85GH 2GH ", - " HG20GHHH 0 ", - " HG0448 HG2 BBB ", - "00400GH 85GH BBBBB ", - " EFBBEFEB66DEEBBBBBBBBB BBB ", - " BBBBBBBBBBBBBBBBBBBBB BB ", - " EG7III8E BBB BBB ", - "04520 HH BBBBB ", - " HH BB ", - " "}; - -static char **bezier_track_xpm[3] = { bezier_track_x16, bezier_track_x24, bezier_track_x32 }; - diff --git a/app/bin/bitmaps/block.xpm b/app/bin/bitmaps/block.xpm deleted file mode 100644 index e3a6937..0000000 --- a/app/bin/bitmaps/block.xpm +++ /dev/null @@ -1,138 +0,0 @@ -static char *block_x16[] = { - "16 16 18 1", - " c None", - "0 c #000000", - "1 c #003300", - "2 c #003333", - "3 c #006600", - "4 c #006666", - "5 c #009900", - "6 c #009999", - "7 c #00CC00", - "8 c #00FF00", - "9 c #330000", - "A c #660000", - "B c #990000", - "C c #990033", - "D c #CC0033", - "E c #FF0033", - "F c #008000", - "G c #008080", - " ", - " 0 ", - " 0 1111 ", - " 0 6 1577F1 ", - " G6 088880 ", - " 66 188881 ", - " 6 66 178871 ", - " 66 1FF3 ", - " 099966 00 ", - " 0ADDB966 66 ", - " 9DEEE9 6666 ", - " 9EEEE9 66 ", - " 9CEED9 6640 ", - " 99A9 6 0 ", - " 0 ", - " 0"}; - -static char *block_x24[] = { - "24 24 18 1", - " c None", - "0 c #000000", - "1 c #003300", - "2 c #006600", - "3 c #006666", - "4 c #009900", - "5 c #009999", - "6 c #00CC00", - "7 c #00FF00", - "8 c #330000", - "9 c #660000", - "A c #990000", - "B c #990033", - "C c #CC0033", - "D c #FF0033", - "E c #800000", - "F c #008000", - "G c #008080", - " ", - " 00 ", - " 000 ", - " 000 110 ", - " 000 5 1266421 ", - " 000 555 2777772 ", - " 03555 167777761 ", - " 555 177777761 ", - " 55555 177777761 ", - " 555 555 167777741 ", - " 5 555 2677761 ", - " 555 12F21 ", - " 080 555 ", - " 8BCC98 555 ", - " 8DDDDD9 555 55 ", - " 0BDDDDDC8 555555 ", - " 8CDDDDDC8 5555 ", - " 8CDDDDDC8 55G0 ", - " 9DDDDDA8 555000 ", - " 9ECDDB9 55 000 ", - " 08088 000 ", - " 000 ", - " 000", - " 0 "}; - -static char *block_x32[] = { - "32 32 19 1", - " c None", - "0 c #000000", - "1 c #003300", - "2 c #003333", - "3 c #006600", - "4 c #006666", - "5 c #009900", - "6 c #009999", - "7 c #00CC00", - "8 c #00FF00", - "9 c #330000", - "A c #660000", - "B c #990000", - "C c #990033", - "D c #CC0033", - "E c #FF0033", - "F c #800000", - "G c #008000", - "H c #008080", - " ", - " 00 ", - " 000 ", - " 0000 ", - " 0000 00 ", - " 0000 6 135531 ", - " 0000 666 137888871 ", - " 0000 6666 1888888871 ", - " 000H666 1588888888G ", - " 26666 178888888850 ", - " 66666 178888888871 ", - " 6666666 178888888850 ", - " 6666 6666 05888888883 ", - " 66 6666 1788888851 ", - " 6666 17888851 ", - " 6666 103111 ", - " 00 6666 ", - " 99FBA9 6666 ", - " 9DEEEEDA 6666 6 ", - " 9DEEEEEED9 6666 666 ", - " 9EEEEEEEEB0 6666 666 ", - " 0FEEEEEEEED9 666666 ", - " 0FEEEEEEEED9 6666 ", - " AEEEEEEEEC0 66640 ", - " 9DEEEEEEEA 6664000 ", - " AEEEEEEB9 666 0000 ", - " 9DDDDA9 6 0000 ", - " 0999 0000 ", - " 0000 ", - " 000 ", - " 00 ", - " "}; - -static char **block_xpm[3] = { block_x16, block_x24, block_x32 }; - diff --git a/app/bin/bitmaps/bottom.xpm b/app/bin/bitmaps/bottom.xpm deleted file mode 100644 index dd50a6c..0000000 --- a/app/bin/bitmaps/bottom.xpm +++ /dev/null @@ -1,101 +0,0 @@ -static char *bottom_x16[] = { - "16 16 6 1", - " c None", - "0 c #000000", - "1 c #990000", - "2 c #CC0000", - "3 c #FF0000", - "4 c #808080", - " ", - " ", - " 000000000 ", - " 104444444440", - " 11204444444440", - " 123304444444440", - " 233304444444440", - "1233304444444440", - "1233304444444440", - "1233304444444440", - " 133304444444440", - " 13304444444440", - " 1104444444440", - " 0000000000", - " ", - " "}; - -static char *bottom_x24[] = { - "24 24 6 1", - " c None", - "0 c #000000", - "1 c #990000", - "2 c #CC0000", - "3 c #FF0000", - "4 c #808080", - " ", - " ", - " ", - " ", - " 000000000000000 ", - " 111044444444444440 ", - " 1223044444444444440 ", - " 13333044444444444440 ", - " 133333044444444444440 ", - " 1333333044444444444440 ", - " 1333333044444444444440 ", - " 1333333044444444444440 ", - " 2333333044444444444440 ", - " 1333333044444444444440 ", - " 1333333044444444444440 ", - " 1233333044444444444440 ", - " 123333044444444444440 ", - " 12333044444444444440 ", - " 1112044444444444440 ", - " 000000000000000 ", - " ", - " ", - " ", - " "}; - -static char *bottom_x32[] = { - "32 32 6 1", - " c None", - "0 c #000000", - "1 c #990000", - "2 c #CC0000", - "3 c #FF0000", - "4 c #808080", - " ", - " ", - " ", - " ", - " ", - " 00000000000000000000 ", - " 04444444444444444440 ", - " 11104444444444444444440 ", - " 1223304444444444444444440 ", - " 113333304444444444444444440 ", - " 1233333304444444444444444440 ", - " 2333333304444444444444444440 ", - " 13333333304444444444444444440 ", - " 123333333304444444444444444440 ", - " 123333333304444444444444444440 ", - " 133333333304444444444444444440 ", - " 133333333304444444444444444440 ", - " 133333333304444444444444444440 ", - " 123333333304444444444444444440 ", - " 123333333304444444444444444440 ", - " 13333333304444444444444444440 ", - " 1333333304444444444444444440 ", - " 133333304444444444444444440 ", - " 12333304444444444444444440 ", - " 1112204444444444444444440 ", - " 1104444444444444444440 ", - " 00000000000000000000 ", - " ", - " ", - " ", - " ", - " "}; - -static char **bottom_xpm[3] = { bottom_x16, bottom_x24, bottom_x32 }; - diff --git a/app/bin/bitmaps/box.xpm b/app/bin/bitmaps/box.xpm deleted file mode 100644 index 610fb5a..0000000 --- a/app/bin/bitmaps/box.xpm +++ /dev/null @@ -1,93 +0,0 @@ -static char *box_x16[] = { - "16 16 4 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #CC0000", - " ", - " 00000000000000 ", - " 0 0 ", - " 0 22220 ", - " 0 2220 ", - " 0 22 20 ", - " 0 22 20 ", - " 0 22 0 ", - " 0 22 0 ", - " 0 2 0 ", - " 0 2 0 ", - " 0 2 0 ", - " 0 2 0 ", - " 12 0 ", - " 00000000000000 ", - " "}; - -static char *box_x24[] = { - "24 24 3 1", - " c None", - "0 c #000000", - "1 c #CC0000", - " ", - " ", - " 000000000000000000000 ", - " 0 0 ", - " 0 1111111 0 ", - " 0 111111 0 ", - " 0 1111 0 ", - " 0 11 11 0 ", - " 0 11 11 0 ", - " 0 11 11 0 ", - " 0 11 0 ", - " 0 11 0 ", - " 0 11 0 ", - " 0 1 0 ", - " 0 1 0 ", - " 0 1 0 ", - " 0 1 0 ", - " 0 11 0 ", - " 0 11 0 ", - " 0 11 0 ", - " 0 0 ", - " 0000000000000000000000 ", - " ", - " "}; - -static char *box_x32[] = { - "32 32 3 1", - " c None", - "0 c #000000", - "1 c #CC0000", - " ", - " ", - " ", - " 0000000000000000000000000000 ", - " 0 0 ", - " 0 11111111 0 ", - " 0 111111111 0 ", - " 0 11111 0 ", - " 0 111111 0 ", - " 0 1111111 0 ", - " 0 1111 11 0 ", - " 0 1111 11 0 ", - " 0 1111 11 0 ", - " 0 1111 11 0 ", - " 0 1111 0 ", - " 0 111 0 ", - " 0 111 0 ", - " 0 111 0 ", - " 0 111 0 ", - " 0 111 0 ", - " 0 111 0 ", - " 0 1111 0 ", - " 0 1111 0 ", - " 0 1111 0 ", - " 0 1111 0 ", - " 0 1111 0 ", - " 0 111 0 ", - " 0 0 ", - " 0000000000000000000000000000 ", - " ", - " ", - " "}; - -static char **box_xpm[3] = { box_x16, box_x24, box_x32 }; - diff --git a/app/bin/bitmaps/bridge.xpm b/app/bin/bitmaps/bridge.xpm deleted file mode 100644 index 089542d..0000000 --- a/app/bin/bitmaps/bridge.xpm +++ /dev/null @@ -1,105 +0,0 @@ -static char *bridge_x16[] = { - "16 16 5 1", - " c None", - "0 c #000000", - "1 c #333300", - "2 c #333333", - "3 c #CC6600", - " ", - " ", - "2 2 ", - "22 22 ", - " 2222222222222 ", - " 3 3 3 3 3 3 3 ", - "000000000000000 ", - " 3 3 3 3 3 3 3 ", - "010000000000000 ", - " 3 3 3 3 3 3 3 ", - " 2222222222222 ", - "22 22 ", - "2 2 ", - " ", - " ", - " "}; - -static char *bridge_x24[] = { - "24 24 8 1", - " c None", - "0 c #000000", - "1 c #333300", - "2 c #663300", - "3 c #996600", - "4 c #996666", - "5 c #CC6600", - "6 c #CC9900", - " ", - " ", - "444 44", - " 44 44 ", - " 44 44 ", - " 444444444444444444 ", - " 444444444444444444 ", - " ", - " 6 6 6 66 6 66 6 ", - "032023003103300300320130", - "032023003103300300320130", - " 6 6 6 66 6 66 6 ", - " 6 6 6 66 6 66 6 ", - " 6 6 6 66 6 66 6 ", - "000000000000000000000000", - " 6 6 6 66 6 66 6 ", - " ", - " ", - " 444444444444444444 ", - " 44444444444444444444 ", - " 44 44 ", - "444 444", - " 4 44", - " "}; - -static char *bridge_x32[] = { - "32 32 9 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #333300", - "3 c #663300", - "4 c #996600", - "5 c #996666", - "6 c #CC6600", - "7 c #CC9900", - " ", - " ", - " 55 55", - " 55 555", - " 555 555 ", - " 555 555 ", - " 55555555555555555555555555 ", - " 555555555555555555555555 ", - " 55555555555555555555555 ", - " ", - " ", - " 77 77 777 77 77 77 77 ", - "03320033002320033002330033101330", - "00000000000000000000000000000000", - " 77 77 777 77 77 77 77 ", - " 77 77 777 77 77 77 77 ", - " 77 77 777 77 77 77 77 ", - " 77 77 777 77 77 77 77 ", - " 4430044003430044003440044202440", - "00000000000000000000000000000000", - " 77 77 777 77 77 77 77 ", - " ", - " ", - " 5555555555555555555555 ", - " 555555555555555555555555 ", - " 55555555555555555555555555 ", - " 555 555 ", - " 555 555 ", - " 55 5555", - "555 555", - " ", - " "}; - -static char **bridge_xpm[3] = { bridge_x16, bridge_x24, bridge_x32 }; - diff --git a/app/bin/bitmaps/building.xpm b/app/bin/bitmaps/building.xpm deleted file mode 100644 index 044e3f8..0000000 --- a/app/bin/bitmaps/building.xpm +++ /dev/null @@ -1,125 +0,0 @@ -static char *building_x16[] = { - "16 16 13 1", - " c None", - "0 c #000000", - "1 c #333300", - "2 c #333333", - "3 c #666600", - "4 c #666633", - "5 c #666666", - "6 c #996666", - "7 c #999966", - "8 c #999999", - "9 c #CCCCCC", - "A c #C0C0C0", - "B c #808080", - " ", - " 011111111110 ", - " 137888888841 ", - " 448AAAAAA844 ", - " 4448AAAAA634 ", - " 4846AAAA84B4 ", - " 4884333334A4 ", - " 48B5AAAA8484 ", - " 4B4999999B44 ", - " 448999999944 ", - " 159999999981 ", - "0550000000000050", - "0999999999999992", - "0999999999999992", - "0555555555555550", - " "}; - -static char *building_x24[] = { - "24 24 15 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #333300", - "3 c #333333", - "4 c #663333", - "5 c #666600", - "6 c #666633", - "7 c #666666", - "8 c #996666", - "9 c #999966", - "A c #999999", - "B c #CCCCCC", - "C c #C0C0C0", - "D c #808080", - " ", - " ", - " 12222222222222220 ", - " 066777DAAAAAAAAD50 ", - " 156CCCCCCCCCCCCD62 ", - " 156DCCCCCCCCCCA652 ", - " 1686ACCCCCCCCCD662 ", - " 16A66CCCCCCCCA6982 ", - " 16CA6ACCCCCCCD6C82 ", - " 16CC66777777769B82 ", - " 16CC7377777774AB82 ", - " 16CA6BBBBBBBBA6B82 ", - " 16A6ABBBBBBBBB6D82 ", - " 1677BBBBBBBBBBC662 ", - " 156BBBBBBBBBBBB752 ", - " 06ABBBBBBBBBBBBB41 ", - "333000000000000000000333", - "3ACCBBBBBBBBBBBBBBBBCCC0", - "3BBBBBBBBBBBBBBBBBBBBBB0", - "3BBBBBBBBBBBBBBBBBBBBBB0", - "3BBBBBBBBBBBBBBBBBBBBBB0", - "3ACCCCCCCCCCCCCCCCCCCCC0", - "333333333333333333333333", - " "}; - -static char *building_x32[] = { - "32 32 14 1", - " c None", - "0 c #000000", - "1 c #333300", - "2 c #333333", - "3 c #663333", - "4 c #666600", - "5 c #666633", - "6 c #666666", - "7 c #996666", - "8 c #999966", - "9 c #999999", - "A c #CCCCCC", - "B c #C0C0C0", - "C c #808080", - " ", - " ", - " ", - " 0111111111111111111110 ", - " 0456666C99999999999951 ", - " 358BBBBBBBBBBBBBBBB951 ", - " 5559BBBBBBBBBBBBBBB655 ", - " 5756BBBBBBBBBBBBBB9555 ", - " 59559BBBBBBBBBBBBB7595 ", - " 59955BBBBBBBBBBBB955A5 ", - " 59B649BBBBBBBBBBBC59A5 ", - " 59B9559BBBBBBBBB955AA5 ", - " 59BB956999999999659AA5 ", - " 59BB94111111111115AAA5 ", - " 59BBC5AAAAAAAAAAA59AA5 ", - " 59B959AAAAAAAAAAA95AA5 ", - " 59B56AAAAAAAAAAAAA2CA5 ", - " 59C5AAAAAAAAAAAAAA95B5 ", - " 5959AAAAAAAAAAAAAAA555 ", - " 556AAAAAAAAAAAAAAAAB55 ", - " 33AAAAAAAAAAAAAAAAAA65 ", - " 09AAAAAAAAAAAAAAAAAAB0 ", - "20006000000000000000000000062002", - "29AAAAAAAAAAAAAAAAAAAAAAAAAAAAB2", - "29AAAAAAAAAAAAAAAAAAAAAAAAAAAAB2", - "29AAAAAAAAAAAAAAAAAAAAAAAAAAAAB2", - "29AAAAAAAAAAAAAAAAAAAAAAAAAAAAB2", - "29AAAAAAAAAAAAAAAAAAAAAAAAAAAAB2", - "29AAAAAAAAAAAAAAAAAAAAAAAAAAAAB2", - "20000000000000000000000000000002", - " ", - " "}; - -static char **building_xpm[3] = { building_x16, building_x24, building_x32 }; - diff --git a/app/bin/bitmaps/car-inventory.xpm b/app/bin/bitmaps/car-inventory.xpm deleted file mode 100644 index 45ceb2c..0000000 --- a/app/bin/bitmaps/car-inventory.xpm +++ /dev/null @@ -1,103 +0,0 @@ -static char *car_inventory_x16[] = { - "16 16 6 1", - " c None", - "0 c #000000", - "1 c #003366", - "2 c #006600", - "3 c #663300", - "4 c #999999", - " ", - " 33333333 ", - " 33333333 ", - " 33333333 ", - " 4 ", - " 0411111111 ", - " 11111111 ", - " 11111111 ", - " 4 ", - " 0422222222 ", - " 22222222 ", - " 22222222 ", - " 4 4 4 4 ", - " 040 040 ", - " ", - " "}; - -static char *car_inventory_x24[] = { - "24 24 6 1", - " c None", - "0 c #000000", - "1 c #003366", - "2 c #006600", - "3 c #663300", - "4 c #CCCCCC", - "44444444444444444 ", - "43333333333333334 ", - "43333333333333334 ", - "43333333333333334 ", - "43333333333333334 ", - "43333333333333334 ", - "44444444444444444 ", - " 00 4444444444444444 ", - " 00041111111111111114 ", - " 0 41111111111111114 ", - " 41111111111111114 ", - " 41111111111111114 ", - " 41111111111111114 ", - " 44444444444444444 ", - " 0044444444444444444", - " 0042222222222222224", - " 0042222222222222224", - " 42222222222222224", - " 42222222222222224", - " 42222222222222224", - " 44444444444444444", - " 00 00 00 00 ", - " 00000 00000 ", - " 00 00 00 00 "}; - -static char *car_inventory_x32[] = { - "32 32 8 1", - " c None", - "0 c #000000", - "1 c #003366", - "2 c #006600", - "3 c #663300", - "4 c #999999", - "5 c #CCCCCC", - "6 c #C0C0C0", - " 555555555555555555555 ", - "53333333333333333333335 ", - "53333333333333333333335 ", - "53333333333333333333335 ", - "53333333333333333333335 ", - "53333333333333333333335 ", - "53333333333333333333335 ", - "53333333333333333333335 ", - "53333333333333333333335 ", - " 564555555555555555555 ", - " 0005555555555555555555555 ", - " 0005111111111111111111115 ", - " 00 5111111111111111111115 ", - " 5111111111111111111115 ", - " 5111111111111111111115 ", - " 5111111111111111111115 ", - " 5111111111111111111115 ", - " 5111111111111111111115 ", - " 5555555555555555555555 ", - " 000 5555555555555555555555", - " 00052222222222222222222225", - " 00052222222222222222222225", - " 52222222222222222222225", - " 52222222222222222222225", - " 52222222222222222222225", - " 52222222222222222222225", - " 52222222222222222222225", - " 55555555555555555555555", - " 00 00 000 00 ", - " 00000000 0000000 ", - " 0000000 0000000 ", - " 0 00 0 00 "}; - -static char **car_inventory_xpm[3] = { car_inventory_x16, car_inventory_x24, car_inventory_x32 }; - diff --git a/app/bin/bitmaps/change-grid.xpm b/app/bin/bitmaps/change-grid.xpm deleted file mode 100644 index 0287f34..0000000 --- a/app/bin/bitmaps/change-grid.xpm +++ /dev/null @@ -1,118 +0,0 @@ -static char *change_grid_x16[] = { - "16 16 12 1", - " c None", - "0 c #000000", - "1 c #00CC00", - "2 c #00CC33", - "3 c #339933", - "4 c #666666", - "5 c #669933", - "6 c #669966", - "7 c #996666", - "8 c #999966", - "9 c #CC9966", - "A c #FFCC66", - "1111111111111111", - "1111111111111111", - "1 1 11 3 1", - "1 1 11 484 1", - "11111111159A8311", - "1 1 169A94 1", - "1 1 69A962 1", - "11111148A9411111", - "1111168794211111", - "1 14994 1 1", - "1 14462 1 1", - "1111111111111111", - "11 11 11 11 11", - "1 1 11 1 1", - "11 11 11 11 11", - "1111111111111111"}; - -static char *change_grid_x24[] = { - "24 24 12 1", - " c None", - "0 c #000000", - "1 c #00CC00", - "2 c #33CC33", - "3 c #666666", - "4 c #669933", - "5 c #669966", - "6 c #996666", - "7 c #999966", - "8 c #CC9966", - "9 c #FF9966", - "A c #FFCC66", - " 1 1 11 1 1 ", - "111111111111111111111111", - "11 1 11 1 11", - "11 1 11 1 11", - "11 1 11 33 11", - "11 1 11 3796 11", - "1111111111111147AA932111", - "11 11 1157AAA83 11", - "11 1 147AAA83 11", - "11 1 47AAA85 11", - "11 1 37AAA831 11", - "11111111156AAA8511111111", - "111111114787A85111111111", - "11 1 39A863 1 11", - "11 1 39A83 1 11", - "11 1 33351 1 11", - "11 1 11 1 11", - "111111111111111111111111", - "11 1 11 1 11", - "11 1 11 1 11", - "11 1 11 1 11", - "11 1 11 1 11", - "111111111111111111111111", - "111111111111111111111111"}; - -static char *change_grid_x32[] = { - "32 32 11 1", - " c None", - "0 c #000000", - "1 c #00CC00", - "2 c #33CC33", - "3 c #666666", - "4 c #669933", - "5 c #669966", - "6 c #996666", - "7 c #999966", - "8 c #CC9966", - "9 c #FFCC66", - " ", - "11111111111111111111111111111111", - "11111111111111111111111111111111", - " 1 11 11 11 11", - " 1 11 11 11 11", - " 1 11 11 44 11", - " 1 11 11 3775 11", - " 1 11 11 379973 11", - " 1111111111111111112799997411111", - " 1111111111111111127999997411111", - " 1 11 11379999973 11", - " 1 11 1279999975 11", - " 1 11 279999974 11", - " 1 11 3799999751 11", - " 1 11 37999997311 11", - " 1111111111123899998511111111111", - " 1111111111279789984111111111111", - " 1 11 39997883 11 11", - " 1 11 3999963 11 11", - " 1 11 399985 11 11", - " 1 11 333351 11 11", - " 1 11 11 11 11", - " 1111111111111111111111111111111", - " 1111111111111111111111111111111", - " 1 11 11 11 11", - " 1 11 11 11 11", - " 1 11 11 11 11", - " 1 11 11 11 11", - " 1 11 11 11 11", - "111 11 11 111 111", - "11111111111111111111111111111111", - " "}; - -static char **change_grid_xpm[3] = { change_grid_x16, change_grid_x24, change_grid_x32 }; - diff --git a/app/bin/bitmaps/circle-center.xpm b/app/bin/bitmaps/circle-center.xpm deleted file mode 100644 index e58036a..0000000 --- a/app/bin/bitmaps/circle-center.xpm +++ /dev/null @@ -1,114 +0,0 @@ -static char *circle_center_x16[] = { - "16 16 6 1", - " c None", - "0 c #000000", - "1 c #CC0000", - "2 c #CC9966", - "3 c #FF0000", - "4 c #808080", - " 000000 ", - " 40 2 2 04 ", - " 0 2 0000 2 0 ", - " 4 00 00 4 ", - " 020 020 ", - "0 0 0 0", - "020 020", - "0 0 0 0", - "0 0 3 0 0", - "020 3 020", - "0 3 1 0", - " 020 31 0 ", - " 4 00 111 4 ", - " 0 2 0000 0 ", - " 40 2 2 04 ", - " 000000 "}; - -static char *circle_center_x24[] = { - "24 24 13 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #333300", - "3 c #663300", - "4 c #666600", - "5 c #990000", - "6 c #993300", - "7 c #996600", - "8 c #CC0000", - "9 c #CC3300", - "A c #CC6600", - "B c #CC9900", - " B ", - " 07700 B ", - " B7000770017 ", - " 07A A7 B30 BB ", - " B30 B70033017 17 ", - " 33 077 BB A303B10 ", - " 0 A2 B 36 0 ", - " 00 0A BA0 33B ", - " A2B00 23B30 ", - " 13B1B B2 00 ", - " 0 0 00 0 ", - " 0 00 33A0 ", - "B3A77B 8 B77B1B", - " 2772 8 00 0 ", - " 00 0B 8 90 00 ", - " 1B37 8 A93B10 ", - " B37 0 8857A3B ", - " 0 33 8985 0 ", - " 02B307B A856B00 ", - " 31 31077022 33 ", - " B 007B 0770 B 00BB ", - " 320 77 032 ", - " B 0033007B ", - " BB "}; - -static char *circle_center_x32[] = { - "32 32 12 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #333300", - "3 c #663300", - "4 c #990000", - "5 c #993300", - "6 c #996600", - "7 c #CC0000", - "8 c #CC3300", - "9 c #CC6600", - "A c #CC9900", - " A ", - " AA ", - " A 00000000 A ", - " 6100 AA 0220 ", - " 039 AA A900 A ", - " A 0 A 00000001A 06A ", - " A60 6200 AA 0320 31 ", - " 2A 00A A A 00 A 00 ", - " 0 A10 336 0 ", - " 00 19 A60 00AA ", - " 0 00 00 A39 ", - " A66A 0 29A20 ", - " 06A66 A91 0 ", - " 0 09A 0 0 ", - " 0 0 0 00 ", - " 00 0 7 33 33 ", - "A63A93AA 777 A36A66A", - " 62 61 777 00 00 ", - " 0 0 777 0 0 ", - " 0 03A 777 7740 0 ", - " 00A93A 777 8756 00 ", - " 63A 00 777773AA36 ", - " AA20 06A 7777 2AA ", - " 0 636 777777 00 ", - " 00 A300 A 777789 00 ", - " 36 036 AA 620 A60 ", - " AA10 9000320039 03A ", - " 000AA 96 A 000 AA ", - " 022 AA 520 ", - " A900003200029 ", - " A 96 A ", - " A "}; - -static char **circle_center_xpm[3] = { circle_center_x16, circle_center_x24, circle_center_x32 }; - diff --git a/app/bin/bitmaps/circle-filled-center.xpm b/app/bin/bitmaps/circle-filled-center.xpm deleted file mode 100644 index 91f7764..0000000 --- a/app/bin/bitmaps/circle-filled-center.xpm +++ /dev/null @@ -1,145 +0,0 @@ -static char *circle_filled_center_x16[] = { - "16 16 19 1", - " c None", - "0 c #000000", - "1 c #003333", - "2 c #333333", - "3 c #333366", - "4 c #336666", - "5 c #336699", - "6 c #339999", - "7 c #669999", - "8 c #6699CC", - "9 c #66CCCC", - "A c #66CCFF", - "B c #9999CC", - "C c #99CCCC", - "D c #99CCFF", - "E c #99FFFF", - "F c #CC0000", - "G c #CC6666", - "H c #CC6699", - " 00 ", - " 11488413 ", - " 28AEEEEE93 ", - " 3AEEEEEEEEA3 ", - " 38EEEEEEEEEE93 ", - " 2AEEEEEEEEEEE4 ", - "05EEEEEEEEEEEE80", - "18EEEEEBDEEEEE92", - "18EEEEEDHDEEEE92", - "06EEEEEEDHDECE81", - " 4EEEEEEEDHDFE60", - " 29EEEEEEEDHGA2 ", - " 3AEEEEEBGFH4 ", - " 14AEEEEDDA43 ", - " 268AA973 ", - " 012210 "}; - -static char *circle_filled_center_x24[] = { - "24 24 20 1", - " c None", - "0 c #000000", - "1 c #003333", - "2 c #333333", - "3 c #333366", - "4 c #336666", - "5 c #336699", - "6 c #339999", - "7 c #669999", - "8 c #6699CC", - "9 c #66CCCC", - "A c #66CCFF", - "B c #9999CC", - "C c #99CCCC", - "D c #99CCFF", - "E c #99FFFF", - "F c #CC0000", - "G c #CC6666", - "H c #CC6699", - "I c #CC9999", - " ", - " 11044011 ", - " 238AEEEEA942 ", - " 26AEEEEEEEEE83 ", - " 29EEEEEEEEEEEEA4 ", - " 2AEEEEEEEEEEEEEEA3 ", - " 27EEEEEEEEEEEEEEEE93 ", - " 4AEEEEEEEEEEEEEEEEE50 ", - " 19EEEEEEEEEEEEEEEEEEA2 ", - " 1AEEEEEEEEEEEEEEEEEEE1 ", - " 3EEEEEEEEEEEEEEEEEEEE50", - " 4EEEEEEEEDIDEEEEEEEEE60", - " 4EEEEEEEEECIDEEEEEEEE60", - " 3EEEEEEEEEECIDEEEEEEE50", - " 1AEEEEEEEEEECIDEEHCEE4 ", - " 29EEEEEEEEEEECIDDFBEA1 ", - " 05EEEEEEEEEEEECIDFCE71 ", - " 39EEEEEEEEEEEECHFDA2 ", - " 2AEEEEEEEEDIGFFFD4 ", - " 04AEEEEEEEDHIBCC62 ", - " 139EEEEEEEEEEA42 ", - " 26AEEEEEEA82 ", - " 2146886411 ", - " 0000 "}; - -static char *circle_filled_center_x32[] = { - "32 32 23 1", - " c None", - "0 c #000000", - "1 c #000033", - "2 c #003333", - "3 c #333333", - "4 c #333366", - "5 c #336666", - "6 c #336699", - "7 c #339999", - "8 c #669999", - "9 c #6699CC", - "A c #66CCCC", - "B c #66CCFF", - "C c #9999CC", - "D c #99CCCC", - "E c #99CCFF", - "F c #99FFFF", - "G c #CC0000", - "H c #CC3333", - "I c #CC3366", - "J c #CC6666", - "K c #CC6699", - "L c #CC9999", - " ", - " 00333300 ", - " 3169ABBA97230 ", - " 35AFFFFFFFFFFB63 ", - " 4AFFFFFFFFFFFFFFB52 ", - " 5BFFFFFFFFFFFFFFFFB64 ", - " 5BFFFFFFFFFFFFFFFFFFF62 ", - " 5BFFFFFFFFFFFFFFFFFFFFB5 ", - " 3AFFFFFFFFFFFFFFFFFFFFFFB3 ", - " 5FFFFFFFFFFFFFFFFFFFFFFFF82 ", - " 3AFFFFFFFFFFFFFFFFFFFFFFFFB2 ", - " 2FFFFFFFFFFFFFFFFFFFFFFFFFF5 ", - " 07FFFFFFFFFFFFFFFFFFFFFFFFFF92 ", - " 2AFFFFFFFFFFFFFFFFFFFFFFFFFFB3 ", - " 3AFFFFFFFFFFFFEFFFFFFFFFFFFFB2 ", - " 3BFFFFFFFFFFFDHLFFFFFFFFFFFFF0 ", - " 2BFFFFFFFFFFFDHGLFFFFFFFFFFFF0 ", - " 3BFFFFFFFFFFFFDHGLFFFFFFFFFFB2 ", - " 3AFFFFFFFFFFFFFDHGLFFFFEEFFFB3 ", - " 08FFFFFFFFFFFFFFDHGLFFFIHFFFA3 ", - " 4FFFFFFFFFFFFFFFDHGLFEGHFFF60 ", - " 2BFFFFFFFFFFFFFFFDHGLEGJFFB2 ", - " 28FFFFFFFFFFFFFFFFDHGKGLFF92 ", - " 3BFFFFFFFFFFFFFFFFDHGGCFB3 ", - " 6BFFFFFFFFFFFFEKJGGGGDF73 ", - " 47FFFFFFFFFFFFLGGGHKLE94 ", - " 57FFFFFFFFFFFEEEFFFF94 ", - " 36BFFFFFFFFFFFFFFB74 ", - " 239BFFFFFFFFFFFA33 ", - " 227ABFFFFBA723 ", - " 0330000230 ", - " "}; - -static char **circle_filled_center_xpm[3] = { circle_filled_center_x16, circle_filled_center_x24, circle_filled_center_x32 }; - diff --git a/app/bin/bitmaps/circle-filled-tangent.xpm b/app/bin/bitmaps/circle-filled-tangent.xpm deleted file mode 100644 index f20856e..0000000 --- a/app/bin/bitmaps/circle-filled-tangent.xpm +++ /dev/null @@ -1,148 +0,0 @@ -static char *circle_filled_tangent_x16[] = { - "16 16 20 1", - " c None", - "0 c #000000", - "1 c #003333", - "2 c #333333", - "3 c #333366", - "4 c #336666", - "5 c #336699", - "6 c #339999", - "7 c #666699", - "8 c #669999", - "9 c #6699CC", - "A c #66CCCC", - "B c #66CCFF", - "C c #9999CC", - "D c #99CCFF", - "E c #99FFFF", - "F c #CC3333", - "G c #CC6699", - "H c #CC9999", - "I c #CC99CC", - " 0110 ", - " 3469A842 ", - " 3AEEEEEEA31 ", - " 2BEEEEEEEEB4 ", - " 3AEEEEEEEEEEB3 ", - " 4EEEEEEEEEEEE60", - "08EEEEEEEEEEEEA1", - "2AEEEEEDCIHEEEB2", - "2AEEEEECFCDEEEB1", - "09EEEEEHCGDEEEA2", - "05EEEEEHDDGDEE90", - " 3BEEEEEEEDGDB3 ", - " 4BEEEEEEEDG71 ", - " 34BEEEEEEB74 ", - " 39ABBB931 ", - " 021120 "}; - -static char *circle_filled_tangent_x24[] = { - "24 24 22 1", - " c None", - "0 c #000000", - "1 c #000033", - "2 c #003333", - "3 c #333333", - "4 c #333366", - "5 c #336666", - "6 c #336699", - "7 c #339999", - "8 c #669999", - "9 c #6699CC", - "A c #66CCCC", - "B c #66CCFF", - "C c #9999CC", - "D c #99CCCC", - "E c #99CCFF", - "F c #99FFFF", - "G c #CC0000", - "H c #CC6666", - "I c #CC6699", - "J c #CC9999", - "K c #CC99CC", - " ", - " 0315555230 ", - " 46AFFFFFFB73 ", - " 03AFFFFFFFFFFA42 ", - " 05BFFFFFFFFFFFFB73 ", - " 3BFFFFFFFFFFFFFFB5 ", - " 4AFFFFFFFFFFFFFFFFB4 ", - " 26FFFFFFFFFFFFFFFFFF94 ", - " 3BFFFFFFFFFFFFFFFFFFB2 ", - " 2FFFFFFFFFFFFFFFFFFFF5 ", - " 5FFFFFFFFFFFFFEFFFFFF80", - "07FFFFFFFFFDIHGGCFFFFF92", - "08FFFFFFFFFIGJCDEFFFFFA2", - "06FFFFFFFFFHIIEFFFFFFF90", - " 5FFFFFFFFEGKEIEFFFFFF60", - " 2BFFFFFFFEGDFEIEFFFFB2 ", - " 29FFFFFFFFEEFFEIEFFFA3 ", - " 4BFFFFFFFFFFFFEIEFB4 ", - " 5BFFFFFFFFFFFFEIE72 ", - " 48FFFFFFFFFFFFFEC4 ", - " 35BFFFFFFFFFFB74 ", - " 3AFFFFFFFFA42 ", - " 3179AA9723 ", - " 003300 "}; - -static char *circle_filled_tangent_x32[] = { - "32 32 23 1", - " c None", - "0 c #000000", - "1 c #000033", - "2 c #003333", - "3 c #333333", - "4 c #333366", - "5 c #336666", - "6 c #336699", - "7 c #339999", - "8 c #669999", - "9 c #6699CC", - "A c #66CCCC", - "B c #66CCFF", - "C c #9999CC", - "D c #99CCCC", - "E c #99CCFF", - "F c #99FFFF", - "G c #CC0000", - "H c #CC3333", - "I c #CC6666", - "J c #CC6699", - "K c #CC9999", - "L c #CC99CC", - " ", - " 233003320 ", - " 2259BBFFBB9622 ", - " 28BFFFFFFFFFFB920 ", - " 25BFFFFFFFFFFFFFFB63 ", - " 37BFFFFFFFFFFFFFFFFF84 ", - " 27FFFFFFFFFFFFFFFFFFFF94 ", - " 5BFFFFFFFFFFFFFFFFFFFFF74 ", - " 4BFFFFFFFFFFFFFFFFFFFFFFB3 ", - " 28FFFFFFFFFFFFFFFFFFFFFFFFA3 ", - " 2BFFFFFFFFFFFFFFFFFFFFFFFFF4 ", - " 5FFFFFFFFFFFFFFFFFFFFFFFFFF80 ", - " 29FFFFFFFFFFFFFFFFFFFFFFFFFFB3 ", - " 3BFFFFFFFFFFFFFFFFFFFFFFFFFFB1 ", - " 2BFFFFFFFFFFFFFFEEDCDFFFFFFFF2 ", - " 0FFFFFFFFFFFFFLHGGGGGEFFFFFFF5 ", - " 1FFFFFFFFFFFFFHGGJLCEFFFFFFFF5 ", - " 2BFFFFFFFFFFFEGGGIEFFFFFFFFFF4 ", - " 3BFFFFFFFFFFFEGIJGIEFFFFFFFFF0 ", - " 3AFFFFFFFFFFFDGKEJGHEFFFFFFFB3 ", - " 07FFFFFFFFFFFCGCFEJGHEFFFFFF92 ", - " 2FFFFFFFFFFFEJEFFEJGHEFFFFF5 ", - " 29FFFFFFFFFFFFFFFFEJGHEFFFB3 ", - " 4BFFFFFFFFFFFFFFFFEJGHEFF5 ", - " 27FFFFFFFFFFFFFFFFFEJGHEA4 ", - " 49FFFFFFFFFFFFFFFFFEJDB4 ", - " 4AFFFFFFFFFFFFFFFFFFB5 ", - " 49FFFFFFFFFFFFFFFFA4 ", - " 45AFFFFFFFFFFFFB54 ", - " 359BFFFFFFB953 ", - " 2305555022 ", - " "}; - -static char **circle_filled_tangent_xpm[3] = { circle_filled_tangent_x16, circle_filled_tangent_x24, circle_filled_tangent_x32 }; - diff --git a/app/bin/bitmaps/circle-line-center.xpm b/app/bin/bitmaps/circle-line-center.xpm deleted file mode 100644 index 24a41f6..0000000 --- a/app/bin/bitmaps/circle-line-center.xpm +++ /dev/null @@ -1,93 +0,0 @@ -static char *circle_line_center_x16[] = { - "16 16 3 1", - " c None", - "0 c #000000", - "1 c #CC0000", - " 00 ", - " 00000000 ", - " 00 00 ", - " 0 0 ", - " 00 00 ", - " 0 0 ", - "00 00", - "00 00", - "00 1 00", - "00 1 00", - " 0 1 1 00", - " 00 11 0 ", - " 0 1110 ", - " 00 00 ", - " 000 000 ", - " 000000 "}; - -static char *circle_line_center_x24[] = { - "24 24 3 1", - " c None", - "0 c #000000", - "1 c #CC0000", - " ", - " 00000000 ", - " 000 000 ", - " 00 00 ", - " 00 0 ", - " 0 0 ", - " 00 00 ", - " 0 0 ", - " 00 0 ", - " 0 0 ", - " 0 0 ", - " 0 1 00", - " 0 11 00", - " 0 11 00", - " 0 11 0 ", - " 00 11 1 0 ", - " 00 11 1 00 ", - " 00 111 0 ", - " 0 1111 0 ", - " 00 1 00 ", - " 000 00 ", - " 00 00 ", - " 0000000000 ", - " 000 "}; - -static char *circle_line_center_x32[] = { - "32 32 4 1", - " c None", - "0 c #000000", - "1 c #990000", - "2 c #CC0000", - " ", - " 0000000000 ", - " 00000000000000 ", - " 00000 00000 ", - " 0000 0000 ", - " 000 000 ", - " 000 000 ", - " 000 000 ", - " 00 000 ", - " 000 00 ", - " 00 000 ", - " 000 00 ", - " 00 00 ", - " 00 00 ", - " 00 000", - " 00 2 000", - " 00 222 000", - " 00 2222 000", - " 00 2222 00 ", - " 00 2222 00 ", - " 000 2222 22 00 ", - " 00 2222 22 000 ", - " 00 222222 00 ", - " 000 22222 000 ", - " 000 2222222000 ", - " 000 2222221000 ", - " 000 0000 ", - " 0000 0000 ", - " 0000 00000 ", - " 0000000 0000000 ", - " 000000000000 ", - " 0000 "}; - -static char **circle_line_center_xpm[3] = { circle_line_center_x16, circle_line_center_x24, circle_line_center_x32 }; - diff --git a/app/bin/bitmaps/circle-line-tangent.xpm b/app/bin/bitmaps/circle-line-tangent.xpm deleted file mode 100644 index 0a5a52d..0000000 --- a/app/bin/bitmaps/circle-line-tangent.xpm +++ /dev/null @@ -1,93 +0,0 @@ -static char *circle_line_tangent_x16[] = { - "16 16 3 1", - " c None", - "0 c #000000", - "1 c #CC0000", - " 00 ", - " 00000000 ", - " 00 00 ", - " 00 0 ", - " 00 00 ", - " 0 0 ", - " 0 00", - "00 1111 00", - "00 11 00", - "00 1 1 00", - " 0 1 1 00", - " 00 1 0 ", - " 0 10 ", - " 00 00 ", - " 0000 000 ", - " 00000 "}; - -static char *circle_line_tangent_x24[] = { - "24 24 4 1", - " c None", - "0 c #000000", - "1 c #990000", - "2 c #CC0000", - " ", - " 00000000 ", - " 000 000 ", - " 00 00 ", - " 00 0 ", - " 00 0 ", - " 0 00 ", - " 0 0 ", - " 00 00 ", - " 0 0 ", - " 0 2222 0 ", - " 0 22222 00", - " 0 222 00", - " 0 22 22 0 ", - " 0 22 22 0 ", - " 00 22 22 0 ", - " 0 22 00 ", - " 00 22 0 ", - " 0 2 0 ", - " 0 00 ", - " 000 00 ", - " 00 00 ", - " 0000000000 ", - " 00 "}; - -static char *circle_line_tangent_x32[] = { - "32 32 3 1", - " c None", - "0 c #000000", - "1 c #CC0000", - " ", - " 000000000 ", - " 00000000000000 ", - " 000000 000000 ", - " 0000 0000 ", - " 0000 000 ", - " 000 000 ", - " 000 000 ", - " 000 00 ", - " 000 000 ", - " 00 00 ", - " 00 000 ", - " 000 00 ", - " 00 00 ", - " 00 1111111 00 ", - " 00 1111111 000", - " 00 11111 000", - " 00 111111 00 ", - " 00 11 1111 00 ", - " 00 11 1111 00 ", - " 000 11 1111 00 ", - " 00 1111 000 ", - " 000 1111 00 ", - " 00 1111 000 ", - " 000 111000 ", - " 000 1000 ", - " 000 0000 ", - " 000 0000 ", - " 0000 0000 ", - " 0000000000000000 ", - " 000000000000 ", - " 00 "}; - -static char **circle_line_tangent_xpm[3] = { circle_line_tangent_x16, circle_line_tangent_x24, circle_line_tangent_x32 }; - diff --git a/app/bin/bitmaps/circle-line.xpm b/app/bin/bitmaps/circle-line.xpm deleted file mode 100644 index 1f6de11..0000000 --- a/app/bin/bitmaps/circle-line.xpm +++ /dev/null @@ -1,95 +0,0 @@ -static char *circle_line_x16[] = { - "16 16 5 1", - " c None", - "0 c #000000", - "1 c #990000", - "2 c #CC0000", - "3 c #800000", - " 00 ", - " 00000000 ", - " 00 00 ", - " 0 22 22 0 ", - " 00 2 222 00 ", - " 0 22222 0 ", - "00 2 222222 2 00", - "0022 2200", - "0322222222222210", - "0022 2 00", - " 0 00", - " 00 0 ", - " 0 0 ", - " 00 00 ", - " 000 000 ", - " 000000 "}; - -static char *circle_line_x24[] = { - "24 24 3 1", - " c None", - "0 c #000000", - "1 c #CC0000", - " ", - " 00000000 ", - " 000 000 ", - " 00 00 ", - " 00 0 ", - " 00 1111 111 0 ", - " 00 11 11 00 ", - " 0 11 1111 0 ", - " 00 1111 11 00 ", - " 0 1111 1111 0 ", - " 0 1 11 1 11 0 ", - " 0 11 11 00", - " 0 111111111111111111 00", - " 0 11 11 0 ", - " 0 1 1 0 ", - " 00 0 ", - " 0 00 ", - " 00 0 ", - " 0 0 ", - " 0 00 ", - " 000 00 ", - " 00 00 ", - " 0000000000 ", - " 00 "}; - -static char *circle_line_x32[] = { - "32 32 4 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #CC0000", - " ", - " 0000000000 ", - " 00000000000000 ", - " 00000 00000 ", - " 0000 0000 ", - " 000 000 ", - " 000 222 222 000 ", - " 000 22222 22222 000 ", - " 00 2 22 22 000 ", - " 000 22 22222 00 ", - " 00 222 222 22 000 ", - " 000 22 22 22 000 ", - " 00 2 22222 222222 00 ", - " 00 222 2222 2222 222 00 ", - " 00 222 2222 00 ", - " 0022222222222222222222222222000", - " 0022222222222222222222222222100", - " 00 222 222 000", - " 00 222 222 00 ", - " 00 222 22 00 ", - " 000 00 ", - " 00 000 ", - " 00 00 ", - " 000 000 ", - " 000 000 ", - " 000 000 ", - " 000 0000 ", - " 0000 0000 ", - " 0000 00000 ", - " 0000000000000000 ", - " 000000000000 ", - " 0000 "}; - -static char **circle_line_xpm[3] = { circle_line_x16, circle_line_x24, circle_line_x32 }; - diff --git a/app/bin/bitmaps/circle-tangent.xpm b/app/bin/bitmaps/circle-tangent.xpm deleted file mode 100644 index 4ae8c69..0000000 --- a/app/bin/bitmaps/circle-tangent.xpm +++ /dev/null @@ -1,110 +0,0 @@ -static char *circle_tangent_x16[] = { - "16 16 5 1", - " c None", - "0 c #000000", - "1 c #CC0000", - "2 c #CC9966", - "3 c #808080", - " 000000 ", - " 30 2 2 03 ", - " 0 2 0000 2 0 ", - " 3 00 00 3 ", - " 020 020 ", - "0 0 0 0", - "020 020", - "0 0 0 0", - "0 0 111 0 0", - "020 11 020", - "0 0 1 1 0", - " 020 1 20 ", - " 3 00 1 3 ", - " 0 2 0000 2 0 ", - " 30 2 2 03 ", - " 000000 "}; - -static char *circle_tangent_x24[] = { - "24 24 11 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #333300", - "3 c #663300", - "4 c #990000", - "5 c #996600", - "6 c #CC0000", - "7 c #CC3300", - "8 c #CC6600", - "9 c #CC9900", - " 99 ", - " 9 00330059 ", - " 5000550023 ", - " 0059 85 93009 ", - " 930 80023025 25 ", - " 139 035 99 8305900 ", - " 0 920 335 0 ", - " 00 059 950 539 ", - " 83930 3591 ", - " 03938 90 00 ", - " 0 0 0 0 ", - " 0 0 6666 2551 ", - "928839 66666 955829", - " 15 0 6666 0 0 ", - " 00 05 66666 0 00 ", - " 01953 66 666983900 ", - " 839 0 66608939 ", - " 920 38 764 029 ", - " 0395029 9316800 ", - " 35 31053022 82 ", - " 9500 9 055059 0089 ", - " 025 99 520 ", - " 8100330038 ", - " 55 9 "}; - -static char *circle_tangent_x32[] = { - "32 32 11 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #333300", - "3 c #663300", - "4 c #993300", - "5 c #996600", - "6 c #CC0000", - "7 c #CC6600", - "8 c #CC9900", - "9 c #800000", - " 8 ", - " 75 8 ", - " 8 00003200018 ", - " 3200 88 0320 ", - " 0028 88 8 00 8 ", - " 8 00 88000100038 058 ", - " 52 300 78 032 830 ", - " 018 0058 8 8 0088 0 ", - " 0 830 23 0 ", - " 00 138 830 038 ", - " 850 0 0 8835 ", - " 8558 00 538 00 ", - " 058828 830 0 ", - " 0 028 0 0 ", - " 0 00 0 0 ", - " 00 0 6666666 07 25 ", - "85488378 666666 8278458", - " 52 25 6666 0 0 ", - " 0 00 66666 0 0 ", - " 0 18 6666666 00 0 ", - " 00 837 666 6666 8835 00 ", - " 3388 0 6 6666 138833 ", - " 881 018 66660 288 ", - " 00 35 6666 00 ", - " 0 8700 8 8 0967 00 ", - " 17 015 8 510 870 ", - " 71 8200320037 37 ", - " 00 88 75 8 00 8 ", - " 005 88 8500 ", - " 53000 55 0003 ", - " 88 00033000 8 ", - " 88 "}; - -static char **circle_tangent_xpm[3] = { circle_tangent_x16, circle_tangent_x24, circle_tangent_x32 }; - diff --git a/app/bin/bitmaps/circle.xpm b/app/bin/bitmaps/circle.xpm deleted file mode 100644 index 0be3fe9..0000000 --- a/app/bin/bitmaps/circle.xpm +++ /dev/null @@ -1,115 +0,0 @@ -static char *circle_x16[] = { - "16 16 5 1", - " c None", - "0 c #000000", - "1 c #CC0000", - "2 c #CC9966", - "3 c #808080", - " 000000 ", - " 30 2 2 03 ", - " 0 2 0000 2 0 ", - " 3 00 00 3 ", - " 020 020 ", - "0 0 0 0", - "0 00 303 0", - "0 1 0 0 0 1 0", - "311110 0 011113", - "0 1 00 303 1 0", - "0 0", - " 020 020 ", - " 3 00 00 3 ", - " 0 2 0000 2 0 ", - " 30 2 2 03 ", - " 000000 "}; - -static char *circle_x24[] = { - "24 24 13 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #333300", - "3 c #660000", - "4 c #663300", - "5 c #990000", - "6 c #996600", - "7 c #CC0000", - "8 c #CC3300", - "9 c #CC6600", - "A c #CC9900", - "B c #800000", - " AA ", - " 004400 A ", - " 6000660014 ", - " 06A 69 A600 A ", - " A40 60024006 24 ", - " 44A 066 A A601A40 ", - " 0 92 44 0 ", - " 00 09 AA0 64A ", - " A2A00 64A40 ", - " 14AB8 000 000 971 0 ", - " 00577 0 0000 00 777 0 ", - " 03777 000 00 007777816", - "A497787 000000 017887829", - " 26878 0000 00 77 0 ", - " 00 57 0000 000 773 0 ", - " 0A46 A4920 ", - " A49 0 04A49 ", - " A 0 24A A60 00A ", - " 01A40 A A 04A 0 ", - " 44 240660420 64 ", - " A 00 A404404A 006A ", - " 240 AA 620 ", - " A40000004A ", - " A AA A "}; - -static char *circle_x32[] = { - "32 32 14 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #333300", - "3 c #660000", - "4 c #663300", - "5 c #990000", - "6 c #993300", - "7 c #996600", - "8 c #CC0000", - "9 c #CC3300", - "A c #CC6600", - "B c #CC9900", - "C c #800000", - " BB ", - " BB ", - " B 0000000000AB ", - " 7100 BB 0240 ", - " 02B BB BB000 B ", - " B 0 BA00000000A 04B ", - " A1 4400 BB 420 72 ", - " 1B 00BB B BB00 B 00 ", - " 0 B10 47 00 ", - " 00 17B BB0 0BB ", - " B 0 00 0 B77 ", - " B77B 0 47B 0 ", - " 07B799 0000 000 A93 0 ", - " 0 588 00000 00000 888C 00 ", - " 0 8888 00 00 00 888 00 ", - " 0 88888 0000 00 00 88888862 ", - "B74A88888 0000 00 00 888889A4B", - "BA2B9889 00000 00 888 00 ", - " 0 888 0 000 00 00 8885 00 ", - " 0 189 00000 0000 88C 00 ", - " 00 A4B BB74 0 ", - " 74BB00 2BB74 ", - " BB40 0 B 00 2AB ", - " 0 44A B40 00 ", - " 00 B700 B B 07B 0 ", - " 27 02A BB A40 BA0 ", - " B20 A100440017 2A ", - " B 00 BB 77 B 00 BB ", - " 044 BB 7700 ", - " A00004700007 ", - " BB 0470 BB ", - " BB "}; - -static char **circle_xpm[3] = { circle_x16, circle_x24, circle_x32 }; - diff --git a/app/bin/bitmaps/connect.xpm b/app/bin/bitmaps/connect.xpm deleted file mode 100644 index 3853635..0000000 --- a/app/bin/bitmaps/connect.xpm +++ /dev/null @@ -1,116 +0,0 @@ -static char *connect_x16[] = { - "16 16 12 1", - " c None", - "0 c #000000", - "1 c #003399", - "2 c #336699", - "3 c #3366CC", - "4 c #3366FF", - "5 c #3399FF", - "6 c #6699FF", - "7 c #9966CC", - "8 c #CC0000", - "9 c #CC3366", - "A c #CC3399", - " ", - " ", - " ", - " 5 4333 3435 5 ", - "1313121 1313131", - " 6 6 66 6 6 6 ", - " 313233 3313133", - "1313233 2313132", - " 6 6 9 A 6 6 ", - " 88 88 ", - "8888888888888888", - " 8 8 ", - " 8 8 ", - " ", - " ", - " "}; - -static char *connect_x24[] = { - "24 24 11 1", - " c None", - "0 c #000000", - "1 c #003399", - "2 c #336699", - "3 c #3366CC", - "4 c #3366FF", - "5 c #3399FF", - "6 c #6699FF", - "7 c #CC0000", - "8 c #CC3366", - "9 c #CC6699", - " ", - " ", - " ", - " ", - " 6 6 6 6 6 6 ", - " 35 5 53 35 53 43 ", - "11311311311 11311311211", - " 6 6 6 6 6 66 ", - " 6 6 6 6 6 66 ", - " 6 6 6 6 6 66 ", - "11111111111 11111111111", - " 6 6 6 6 6 66 ", - " 8 8 ", - " 77 777 ", - " 777 777 ", - " 7777777777777777777777 ", - " 7777777777 77777777777 ", - " 777 777 ", - " 777 777 ", - " 7 7 ", - " ", - " ", - " ", - " "}; - -static char *connect_x32[] = { - "32 32 10 1", - " c None", - "0 c #000000", - "1 c #003399", - "2 c #336699", - "3 c #3366CC", - "4 c #3366FF", - "5 c #3399FF", - "6 c #6699FF", - "7 c #CC0000", - "8 c #CC3366", - " ", - " ", - " ", - " ", - " ", - " ", - " 66 6 6 6 6 66 ", - " 33 35 53 35 53 34 ", - " 1111113111311 1131113111121 ", - " 66 6 6 6 6 66 ", - " 66 6 6 6 6 66 ", - " 66 6 6 6 6 66 ", - " 66 6 6 6 6 66 ", - " 1331113111321 1131113211331 ", - " 1331113111321 1131113211331 ", - " 66 6 6 6 6 66 ", - " 78 87 ", - " 777 777 ", - " 7777 7777 ", - " 7777 7777 ", - " 77777777777777 777777777777777 ", - " 777777777777777777777777777777 ", - " 7777 7777 ", - " 777 777 ", - " 777 777 ", - " 77 77 ", - " ", - " ", - " ", - " ", - " ", - " "}; - -static char **connect_xpm[3] = { connect_x16, connect_x24, connect_x32 }; - diff --git a/app/bin/bitmaps/control.xpm b/app/bin/bitmaps/control.xpm deleted file mode 100644 index 45d1f9b..0000000 --- a/app/bin/bitmaps/control.xpm +++ /dev/null @@ -1,129 +0,0 @@ -static char *control_x16[] = { - "16 16 16 1", - " c None", - "0 c #000000", - "1 c #003300", - "2 c #006600", - "3 c #009900", - "4 c #00CC00", - "5 c #00FF00", - "6 c #330000", - "7 c #333300", - "8 c #660000", - "9 c #663300", - "A c #990000", - "B c #CC0000", - "C c #FF0000", - "D c #800000", - "E c #008000", - " ", - " 0 00", - " 0 00 ", - " 0 00 ", - " 0 8ABD 00 ", - " 07CCCCA0 ", - " E49CCCCD ", - " 4549CCCB ", - " 45549CCB0 ", - " 355549CA ", - " 04555496 ", - " 01455420 ", - " 0 00 0 ", - " 0 0 ", - " 0 0 ", - "0 0"}; - -static char *control_x24[] = { - "24 24 15 1", - " c None", - "0 c #000000", - "1 c #006600", - "2 c #009900", - "3 c #00CC00", - "4 c #00FF00", - "5 c #330000", - "6 c #339900", - "7 c #660000", - "8 c #663300", - "9 c #990000", - "A c #CC0000", - "B c #FF0000", - "C c #800000", - "D c #008000", - " ", - " 00 00 ", - " 000 000 ", - " 000 000 ", - " 000 000 ", - " 000 000 ", - " 000005CC700000 ", - " 007ABBBBA500 ", - " 018BBBBBBA50 ", - " 0338BBBBBBA0 ", - " 014438BBBBBB70 ", - " 0244438BBBBB90 ", - " 03444438BBBB90 ", - " 0D4444438BBB90 ", - " 0044444438BB5 ", - " 0D4444443890 ", - " 002444444600 ", - " 00001333310000 ", - " 000 000000 000 ", - " 000 000 ", - " 000 000 ", - " 000 000 ", - " 00 000", - " "}; - -static char *control_x32[] = { - "32 32 15 1", - " c None", - "0 c #000000", - "1 c #003300", - "2 c #006600", - "3 c #009900", - "4 c #00CC00", - "5 c #00FF00", - "6 c #330000", - "7 c #660000", - "8 c #663300", - "9 c #990000", - "A c #CC0000", - "B c #FF0000", - "C c #800000", - "D c #008000", - " ", - " 0 0 ", - " 000 000 ", - " 000 0000 ", - " 000 0000 ", - " 000 0000 ", - " 000 0000 ", - " 000 00 0000 ", - " 000 00077000 0000 ", - " 0000CABBBBAC00000 ", - " 06ABBBBBBBB9000 ", - " 0038BBBBBBBBB90 ", - " 0D548BBBBBBBBB70 ", - " 0045548BBBBBBBBA0 ", - " 02555548BBBBBBBB60 ", - " 035555548BBBBBBBC0 ", - " 0355555548BBBBBBC0 ", - " 0D555555548BBBBB70 ", - " 005555555548BBBB00 ", - " 035555555548BB90 ", - " 0045555555548B60 ", - " 02455555555480 ", - " 000145555554D000 ", - " 00000024444200 000 ", - " 000 00000000 000 ", - " 000 000 ", - " 000 000 ", - " 000 000 ", - " 000 000 ", - " 000 000 ", - " 00 00 ", - " "}; - -static char **control_xpm[3] = { control_x16, control_x24, control_x32 }; - diff --git a/app/bin/bitmaps/convert-from.xpm b/app/bin/bitmaps/convert-from.xpm deleted file mode 100644 index ed72d8a..0000000 --- a/app/bin/bitmaps/convert-from.xpm +++ /dev/null @@ -1,99 +0,0 @@ -static char *convert_from_x16[] = { - "16 16 8 1", - " c None", - "0 c #000000", - "1 c #999999", - "2 c #CC0000", - "3 c #CCCCCC", - "4 c #FF0000", - "5 c #FFFFFF", - "6 c #808080", - " 363 363 ", - "5060 10601 ", - "36 1 6006 03", - "30 101 1 63", - " 10601 060 ", - " 363 2 363 ", - " 2 ", - " 2 ", - " 42224 ", - " 424 ", - " 4 ", - " 00000 ", - " 00 ", - " 0000 ", - " 00 ", - " 00 "}; - -static char *convert_from_x24[] = { - "24 24 4 1", - " c None", - "0 c #000000", - "1 c #CC0000", - "2 c #CC0033", - " ", - " 00 0000 ", - " 0000 00000 00 ", - " 00 00 0000 0 00 ", - " 0 00 000 00 0 ", - " 00 00 00 0 0 ", - " 0 000 0 00 ", - " 000000 22 0000 ", - " 22 ", - " 22 ", - " 2 22 ", - " 2 22 22 ", - " 2222 ", - " 22 ", - " 2 ", - " 000000 ", - " 00 ", - " 0 ", - " 00000 ", - " 00 ", - " 0 ", - " 0 ", - " 0 ", - " "}; - -static char *convert_from_x32[] = { - "32 32 4 1", - " c None", - "0 c #000000", - "1 c #CC0000", - "2 c #CC0033", - " ", - " ", - " 00000 0000000 ", - " 00 0 0000 00 ", - " 0 00 0000 0 ", - " 0 00 000 000 00 ", - " 0 0 000 0 00 ", - " 0 000 00 00 00 ", - " 00 00 0 0 ", - " 00 0000 22 00 00 ", - " 00000 22 0000 ", - " 22 ", - " 22 ", - " 2 22 ", - " 22 22 22 ", - " 222 22 222 ", - " 22222222 ", - " 222222 ", - " 222 ", - " 2 ", - " 00000000 ", - " 00 ", - " 00 ", - " 00 ", - " 000000 ", - " 000000 ", - " 00 ", - " 00 ", - " 00 ", - " 00 ", - " ", - " "}; - -static char **convert_from_xpm[3] = { convert_from_x16, convert_from_x24, convert_from_x32 }; - diff --git a/app/bin/bitmaps/convert-to.xpm b/app/bin/bitmaps/convert-to.xpm deleted file mode 100644 index 5f5c94e..0000000 --- a/app/bin/bitmaps/convert-to.xpm +++ /dev/null @@ -1,99 +0,0 @@ -static char *convert_to_x16[] = { - "16 16 8 1", - " c None", - "0 c #000000", - "1 c #999999", - "2 c #CC0000", - "3 c #CCCCCC", - "4 c #FF0000", - "5 c #FFFFFF", - "6 c #808080", - " 00000 ", - " 00 ", - " 0000 ", - " 00 ", - " 00 ", - " 2 ", - " 2 ", - " 2 ", - " 42224 ", - " 424 ", - " 363 4 363 ", - "5060 10601 ", - "36 1 6006 03", - "30 101 1 63", - " 10601 060 ", - " 363 363 "}; - -static char *convert_to_x24[] = { - "24 24 4 1", - " c None", - "0 c #000000", - "1 c #CC0000", - "2 c #CC0033", - " ", - " 000000 ", - " 000000 ", - " 00 ", - " 00000 ", - " 00000 ", - " 00 ", - " 00 ", - " 00 ", - " 2 ", - " 2 ", - " 2 ", - " 22 2 2 ", - " 22 2 2 ", - " 2222 ", - " 22 ", - " 0000 00000 ", - " 00 0 0000 0 ", - " 0 00 0000 00 00 ", - " 0 0 00 0 0 ", - " 00 00 00 00 0 ", - " 00 000 0 0 ", - " 0000 000 ", - " "}; - -static char *convert_to_x32[] = { - "32 32 4 1", - " c None", - "0 c #000000", - "1 c #CC0000", - "2 c #CC0033", - " ", - " ", - " 00000000 ", - " 0 ", - " 0 ", - " 0 ", - " 000000 ", - " 0 ", - " 0 ", - " 0 ", - " 0 ", - " 0 ", - " 22 ", - " 22 ", - " 22 ", - " 22 ", - " 22 22 22 ", - " 222 22 222 ", - " 22222222 ", - " 222222 ", - " 2222 ", - " 000 22 00000 ", - " 000 00 00000 000 ", - " 0 0 0000 00 ", - " 00 00 000 00 0 ", - " 00 0 000 00 00 ", - " 00 000 000 00 00 ", - " 0 00 00 0 ", - " 00 00 0 00 ", - " 0000000 00000 ", - " 00 ", - " "}; - -static char **convert_to_xpm[3] = { convert_to_x16, convert_to_x24, convert_to_x32 }; - diff --git a/app/bin/bitmaps/copy.xpm b/app/bin/bitmaps/copy.xpm deleted file mode 100644 index 1812343..0000000 --- a/app/bin/bitmaps/copy.xpm +++ /dev/null @@ -1,95 +0,0 @@ -static char *copy_x16[] = { - "16 16 4 1", - " c None", - "0 c #000000", - "1 c #666666", - "2 c #FFFFFF", - "111111111111 ", - "1222222222221 ", - "1222222222221 ", - "1221111111111111", - "1221222222222221", - "1221222222222221", - "1221222222222221", - "1221222222222221", - "1221222222222221", - "1221222222222221", - "1221222222222221", - "1221222222222221", - "1111222222222221", - " 1222222222221", - " 1222222222221", - " 1111111111111"}; - -static char *copy_x24[] = { - "24 24 4 1", - " c None", - "0 c #000000", - "1 c #666666", - "2 c #FFFFFF", - " 11111111111111111 ", - "1222222222222222221 ", - "1222222222222222221 ", - "1222222222222222221 ", - "12222211111111111111111 ", - "122221222222222222222221", - "122221222222222222222221", - "122221222222222222222221", - "122221222222222222222221", - "122221222222222222222221", - "122221222222222222222221", - "122221222222222222222221", - "122221222222222222222221", - "122221222222222222222221", - "122221222222222222222221", - "122221222222222222222221", - "122221222222222222222221", - "122221222222222222222221", - "122221222222222222222221", - " 11111222222222222222221", - " 1222222222222222221", - " 1222222222222222221", - " 1222222222222222221", - " 11111111111111111 "}; - -static char *copy_x32[] = { - "32 32 4 1", - " c None", - "0 c #000000", - "1 c #666666", - "2 c #FFFFFF", - " ", - " 111111111111111111111111 ", - " 122222222222222222222221 ", - " 122222222222222222222221 ", - " 122222222222222222222221 ", - " 122222222222222222222221 ", - " 122222111111111111111111111111 ", - " 122222122222222222222222222221 ", - " 122222122222222222222222222221 ", - " 122222122222222222222222222221 ", - " 122222122222222222222222222221 ", - " 122222122222222222222222222221 ", - " 122222122222222222222222222221 ", - " 122222122222222222222222222221 ", - " 122222122222222222222222222221 ", - " 122222122222222222222222222221 ", - " 122222122222222222222222222221 ", - " 122222122222222222222222222221 ", - " 122222122222222222222222222221 ", - " 122222122222222222222222222221 ", - " 122222122222222222222222222221 ", - " 122222122222222222222222222221 ", - " 122222122222222222222222222221 ", - " 122222122222222222222222222221 ", - " 122222122222222222222222222221 ", - " 111111122222222222222222222221 ", - " 122222222222222222222221 ", - " 122222222222222222222221 ", - " 122222222222222222222221 ", - " 122222222222222222222221 ", - " 111111111111111111111111 ", - " "}; - -static char **copy_xpm[3] = { copy_x16, copy_x24, copy_x32 }; - diff --git a/app/bin/bitmaps/cornu.xpm b/app/bin/bitmaps/cornu.xpm deleted file mode 100644 index d1bffcb..0000000 --- a/app/bin/bitmaps/cornu.xpm +++ /dev/null @@ -1,117 +0,0 @@ -static char *cornu_x16[] = { - "16 16 10 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #333300", - "3 c #663300", - "4 c #993300", - "5 c #996600", - "6 c #CC0000", - "7 c #CC6600", - "8 c #CC9900", - " 5 ", - " 5303022 ", - " 8307353733 ", - " 03523552566 ", - " 8233 84666 ", - " 0327 66 ", - "8353 ", - " 153 ", - " 253 ", - " 3518 ", - " 34528 ", - " 832538 6 ", - " 3552555753666", - " 232523335666", - " 85301331246 ", - " 7557 "}; - -static char *cornu_x24[] = { - "24 24 12 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #333300", - "3 c #663300", - "4 c #666600", - "5 c #990000", - "6 c #996600", - "7 c #CC0000", - "8 c #CC6600", - "9 c #CC9900", - "A c #800000", - " ", - " 9 66009 ", - " 300360320 ", - " 91069 99 99018 ", - " 36 6100023 915 ", - " 099038 9 8138777 ", - " 92 28 9657 7 ", - " 3392 5777 ", - " 00339 77 ", - " 91826 ", - " 91928 ", - " 0 0 ", - " 61938 ", - " 91963 ", - " 00 19 ", - " 03962 ", - " 93 069 ", - " 0 9309 7 ", - " 33 3209 9 98A777 ", - " 93049 32032330377 7 ", - " 32099 8368 98777 ", - " 9002308166022A7 ", - " 90130160 9 ", - " 9 9 "}; - -static char *cornu_x32[] = { - "32 32 12 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #333300", - "3 c #663300", - "4 c #990000", - "5 c #993300", - "6 c #996600", - "7 c #CC0000", - "8 c #CC6600", - "9 c #CC9900", - "A c #800000", - " ", - " 9 9 ", - " 98000000038 ", - " 1300 9 6300 ", - " 9 00099 99 9 039 ", - " 61 9 033039 60 ", - " 029 021086062039 47 ", - " 0 80089 9 9 13577477 ", - " 9920 28 9917 7 ", - " 639 0 7 77 ", - " 00966 777 ", - " 0 08 ", - " 0 0 ", - " 9869839 ", - " 00 62 ", - " 00 0 ", - " 00 629 ", - " 9669928 ", - " 60 00 ", - " 0 19 ", - " 019932 ", - " 839 0 9 ", - " 930 38 ", - " 00 98009 7 ", - " 26 33 9 9 99 4777 ", - " 9920 93016 69 903317 77 ", - " 008 85010002008 7 77 ", - " 8300 9 99 9 997777 ", - " 9 00060 99 960220A7 ", - " 96000000020089 ", - " 9 99 99 ", - " "}; - -static char **cornu_xpm[3] = { cornu_x16, cornu_x24, cornu_x32 }; - diff --git a/app/bin/bitmaps/curved-chord.xpm b/app/bin/bitmaps/curved-chord.xpm deleted file mode 100644 index b8c1d9d..0000000 --- a/app/bin/bitmaps/curved-chord.xpm +++ /dev/null @@ -1,109 +0,0 @@ -static char *curved_chord_x16[] = { - "16 16 5 1", - " c None", - "0 c #000000", - "1 c #CC0000", - "2 c #CC9966", - "3 c #FF6666", - " 2 2 ", - " 2 0000 ", - " 2 00 2 2 ", - " 2 00 2 000 ", - " 0 2 002 2 ", - " 2 0 2002 ", - " 0 ", - " 20 2 1111 ", - " 020 113 ", - " 20 0 1313 ", - " 0202 1 313 1 ", - " 0 0 31311 ", - "20202 311 ", - " 0 0 11 ", - "20202 11 ", - " "}; - -static char *curved_chord_x24[] = { - "24 24 11 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #333300", - "3 c #663300", - "4 c #993300", - "5 c #996600", - "6 c #CC0000", - "7 c #CC3300", - "8 c #CC6600", - "9 c #CC9900", - " 9 ", - " 9100300", - " 0130 89 ", - " 820089 99 ", - " 018 930200", - " 9500 99 013059 ", - " 135 500 9 ", - " 9900 9 039 ", - " 53 81 9 ", - " 099 019 ", - " 9 0 950 ", - " 938 39 ", - " 029990 766666 ", - " 0 38 666666 ", - " 953 00 6666 ", - " 19990 66 66 ", - " 00 559 66 66 ", - " 00 0 66 66 66", - " 929930 66 66 ", - " 3299559 6666 ", - " 00 0 66 ", - " 00 0 66 ", - "9459829 66 ", - " 25 539 6 "}; - -static char *curved_chord_x32[] = { - "32 32 10 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #333300", - "3 c #663300", - "4 c #993300", - "5 c #996600", - "6 c #CC0000", - "7 c #CC6600", - "8 c #CC9900", - " 8 ", - " 88 000330 ", - " 250000000 ", - " 8 000020 88 ", - " 85000058 8 ", - " 00010 8 00130 ", - " 00038 3200000 ", - " 87000 88 00022 8 ", - " 0000 5000088 ", - " 00078 003 ", - " 8500 88000088 ", - " 503 500 ", - " 0288 0037 ", - " 00 888100 8 ", - " 88000 8501 ", - " 405 0038 ", - " 00888 0076666666 ", - " 00 820 66666666 ", - " 00 0058 66666 ", - " 830 00 66666 ", - " 0388800 66 666 ", - " 00 8703 66 6666 ", - " 00 007 66 6666 66 ", - " 00 00 66 6666 6666", - " 8505 000 6 6666 6666 ", - " 1188831 6666666 ", - " 00 5038 66666 ", - " 00 000 666 ", - " 00 00 666 ", - " 503 00 666 ", - "850788318 666 ", - " 0 00 6 "}; - -static char **curved_chord_xpm[3] = { curved_chord_x16, curved_chord_x24, curved_chord_x32 }; - diff --git a/app/bin/bitmaps/curved-end.xpm b/app/bin/bitmaps/curved-end.xpm deleted file mode 100644 index 6c91543..0000000 --- a/app/bin/bitmaps/curved-end.xpm +++ /dev/null @@ -1,107 +0,0 @@ -static char *curved_end_x16[] = { - "16 16 5 1", - " c None", - "0 c #000000", - "1 c #CC0000", - "2 c #CC9966", - "3 c #FF6666", - " 111 ", - " 11 ", - " 2 133 ", - " 2 0 1 ", - " 2 00 2 331", - " 0 2 00 11", - " 2 0 2002 111", - " 0 02 ", - " 20 20 ", - " 0202 ", - " 20 0 ", - " 0202 ", - " 0 0 ", - "20202 ", - " 0 0 ", - "20202 "}; - -static char *curved_end_x24[] = { - "24 24 10 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #333300", - "3 c #663300", - "4 c #666600", - "5 c #996600", - "6 c #CC0000", - "7 c #CC6600", - "8 c #CC9900", - " ", - " 66 ", - " 66666 ", - " 6 6 ", - " 8 6 ", - " 750 66 ", - " 85005 66 ", - " 8 0130 8 6 ", - " 730 88 530 6 6 ", - " 058 7015 66666 ", - " 70 87035 8 666 ", - " 18 532 ", - " 870 83078 ", - " 35 33 ", - " 008850 ", - " 881 38 ", - " 35880 ", - " 0 53 ", - " 71 05 ", - " 55871 ", - " 00 338 ", - " 0 00 ", - "837835 ", - " 17 35 "}; - -static char *curved_end_x32[] = { - "32 32 9 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #333300", - "3 c #663300", - "4 c #996600", - "5 c #CC0000", - "6 c #CC6600", - "7 c #CC9900", - " ", - " 555 ", - " 555555 ", - " 55555555 ", - " 55555 5 ", - " 55 55 ", - " 77 55 ", - " 6400 555 ", - " 7700367 55 ", - " 420 77 55 ", - " 7700377 77 55 55", - " 743 77 64215 55555 ", - " 047 760046 5555555 ", - " 740 77 333 77 55555 ", - " 636 774037 5555 ", - " 1777 347 ", - " 7 0 777017 ", - " 734 734 ", - " 3477 077 ", - " 0 7772 ", - " 7730 447 ", - " 6377 007 ", - " 047772 ", - " 0 447 ", - " 740 067 ", - " 7447740 ", - " 1677447 ", - " 0 16 ", - " 0 0 ", - " 437 41 ", - "76477637 ", - " 00 42 "}; - -static char **curved_end_xpm[3] = { curved_end_x16, curved_end_x24, curved_end_x32 }; - diff --git a/app/bin/bitmaps/curved-line-chord.xpm b/app/bin/bitmaps/curved-line-chord.xpm deleted file mode 100644 index 779cc67..0000000 --- a/app/bin/bitmaps/curved-line-chord.xpm +++ /dev/null @@ -1,92 +0,0 @@ -static char *curved_line_chord_x16[] = { - "16 16 3 1", - " c None", - "0 c #000000", - "1 c #CC0000", - " ", - " 0000 ", - " 0000 ", - " 00 ", - " 0 ", - " 00 ", - " 01111 ", - " 0 111 ", - " 00 1111 ", - " 0 1 11 ", - " 00 11 11", - " 0 11 11 ", - " 0 111 ", - " 0 11 ", - " 0 11 ", - " "}; - -static char *curved_line_chord_x24[] = { - "24 24 3 1", - " c None", - "0 c #000000", - "1 c #CC0000", - " ", - " ", - " 00000 ", - " 0000 ", - " 000 ", - " 00 ", - " 00 ", - " 0 ", - " 0 ", - " 0 11111 ", - " 00 111 ", - " 00 111 ", - " 0 1 11 ", - " 00 1 11 ", - " 0 1 11 ", - " 00 11 1 ", - " 0 11 1 ", - " 0 11 1 ", - " 00 111 ", - " 00 11 ", - " 00 11 ", - " 00 11 ", - " 11 ", - " "}; - -static char *curved_line_chord_x32[] = { - "32 32 3 1", - " c None", - "0 c #000000", - "1 c #CC0000", - " ", - " ", - " 00000 ", - " 00000000 ", - " 000000 ", - " 00000 ", - " 0000 ", - " 000 ", - " 000 ", - " 0000 ", - " 000 ", - " 000 ", - " 0011111111 ", - " 00011111111 ", - " 000 1111 ", - " 000 11111 ", - " 00 11 111 ", - " 000 11 111 ", - " 00 11 111 ", - " 000 11 111 ", - " 00 111 1 ", - " 00 111 111 ", - " 000 11 111 ", - " 00 111 111 ", - " 00 11111 ", - " 00 111 ", - " 00 111 ", - " 00 111 ", - " 00 111 ", - " 11 ", - " ", - " "}; - -static char **curved_line_chord_xpm[3] = { curved_line_chord_x16, curved_line_chord_x24, curved_line_chord_x32 }; - diff --git a/app/bin/bitmaps/curved-line-end.xpm b/app/bin/bitmaps/curved-line-end.xpm deleted file mode 100644 index 0e967ab..0000000 --- a/app/bin/bitmaps/curved-line-end.xpm +++ /dev/null @@ -1,94 +0,0 @@ -static char *curved_line_end_x16[] = { - "16 16 3 1", - " c None", - "0 c #000000", - "1 c #CC0000", - " ", - " 11 ", - " 1111 ", - " 11 ", - " 00011 ", - " 0000 11 ", - " 000 1111 ", - " 00 11 ", - " 00 ", - " 00 ", - " 0 ", - " 0 ", - " 00 ", - " 00 ", - " 00 ", - " 0 "}; - -static char *curved_line_end_x24[] = { - "24 24 4 1", - " c None", - "0 c #000000", - "1 c #660000", - "2 c #CC0000", - " ", - " 2 ", - " 2222 ", - " 222222 ", - " 22 ", - " 22 ", - " 00012 ", - " 00000 2 ", - " 000 2 ", - " 000 22222 ", - " 00 222 ", - " 00 ", - " 00 ", - " 00 ", - " 0 ", - " 00 ", - " 0 ", - " 0 ", - " 00 ", - " 00 ", - " 0 ", - " 0 ", - " 0 ", - " 0 "}; - -static char *curved_line_end_x32[] = { - "32 32 4 1", - " c None", - "0 c #000000", - "1 c #660000", - "2 c #CC0000", - " ", - " ", - " 222 ", - " 22222 ", - " 2222222 ", - " 22222 22 ", - " 222 ", - " 222 ", - " 0000122 ", - " 0000000 22 ", - " 000000 22 ", - " 00000 22 22 ", - " 0000 22222222 ", - " 000 2222222 ", - " 0000 2222 ", - " 000 2 ", - " 000 ", - " 000 ", - " 000 ", - " 00 ", - " 000 ", - " 00 ", - " 00 ", - " 000 ", - " 00 ", - " 00 ", - " 00 ", - " 00 ", - " 000 ", - " 000 ", - " 00 ", - " "}; - -static char **curved_line_end_xpm[3] = { curved_line_end_x16, curved_line_end_x24, curved_line_end_x32 }; - diff --git a/app/bin/bitmaps/curved-line-middle.xpm b/app/bin/bitmaps/curved-line-middle.xpm deleted file mode 100644 index fceb7d6..0000000 --- a/app/bin/bitmaps/curved-line-middle.xpm +++ /dev/null @@ -1,95 +0,0 @@ -static char *curved_line_middle_x16[] = { - "16 16 4 1", - " c None", - "0 c #000000", - "1 c #CC0000", - "2 c #800000", - " ", - " 00000", - " 0000 ", - " 000 ", - " 00 ", - " 00 ", - " 02111 ", - " 00111 ", - " 0 1111 ", - " 00 11 ", - " 0 11 ", - " 00 11 ", - " 00 11 ", - " 0 1 ", - " 0 ", - " 0 "}; - -static char *curved_line_middle_x24[] = { - "24 24 4 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #CC0000", - " ", - " 0 ", - " 000000 ", - " 0000 ", - " 00 ", - " 00 ", - " 00 ", - " 00 ", - " 0 ", - " 0 ", - " 0022222 ", - " 00 222 ", - " 0 22 2 ", - " 00 22 2 ", - " 00 22 ", - " 00 22 ", - " 0 22 ", - " 00 22 ", - " 00 22 ", - " 0 22 ", - " 0 2 ", - " 0 ", - " 0 ", - " "}; - -static char *curved_line_middle_x32[] = { - "32 32 4 1", - " c None", - "0 c #000000", - "1 c #CC0000", - "2 c #800000", - " ", - " ", - " 000000 ", - " 000000000 ", - " 000000 ", - " 00000 ", - " 00000 ", - " 0000 ", - " 000 ", - " 000 ", - " 000 ", - " 000 ", - " 002 ", - " 000111111 ", - " 000 111111 ", - " 00 11111 ", - " 00 11 111 ", - " 000 11 111 ", - " 00 11 111 ", - " 000 111 ", - " 00 111 ", - " 00 111 ", - " 000 111 ", - " 00 111 ", - " 00 1111 ", - " 000 111 ", - " 00 111 ", - " 00 111 ", - " 00 1 ", - " 00 ", - " 00 ", - " "}; - -static char **curved_line_middle_xpm[3] = { curved_line_middle_x16, curved_line_middle_x24, curved_line_middle_x32 }; - diff --git a/app/bin/bitmaps/curved-line-tangent.xpm b/app/bin/bitmaps/curved-line-tangent.xpm deleted file mode 100644 index e184d3a..0000000 --- a/app/bin/bitmaps/curved-line-tangent.xpm +++ /dev/null @@ -1,98 +0,0 @@ -static char *curved_line_tangent_x16[] = { - "16 16 4 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #CC0000", - " ", - " 00000", - " 0000 ", - " 000 ", - " 00 ", - " 10 ", - " 022 ", - " 00 22 ", - " 00 22 ", - " 0 22 ", - " 00 22 ", - " 00 22 2 ", - " 0 22 2 ", - " 0 222 ", - "00 2222 ", - " 0 "}; - -static char *curved_line_tangent_x24[] = { - "24 24 5 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #660000", - "3 c #CC0000", - " ", - " ", - " 000000 ", - " 0000 ", - " 000 ", - " 000 ", - " 00 ", - " 00 ", - " 01 ", - " 23 ", - " 0 3 ", - " 0 3 ", - " 00 3 ", - " 0 3 ", - " 0 33 ", - " 0 33 ", - " 00 33 ", - " 0 33 3 ", - " 00 33 3 ", - " 00 33 3 ", - " 00 333 ", - " 00 33333 ", - " 0 3 ", - " "}; - -static char *curved_line_tangent_x32[] = { - "32 32 6 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #990000", - "3 c #CC0000", - "4 c #800000", - " ", - " ", - " 00000 ", - " 00000000 ", - " 0000000 ", - " 00000 ", - " 00000 ", - " 0000 ", - " 000 ", - " 000 ", - " 0000 ", - " 001 ", - " 0043 ", - " 002333 ", - " 00 333 ", - " 000 333 ", - " 000 333 ", - " 00 333 ", - " 000 333 ", - " 00 333 ", - " 000 333 ", - " 00 333 ", - " 00 333 3 ", - " 00 333 33 ", - " 00 333 33 ", - " 00 333 33 ", - " 00 333333 ", - " 000 3333 ", - " 000 33333333 ", - " 00 33333333 ", - " ", - " "}; - -static char **curved_line_tangent_xpm[3] = { curved_line_tangent_x16, curved_line_tangent_x24, curved_line_tangent_x32 }; - diff --git a/app/bin/bitmaps/curved-middle.xpm b/app/bin/bitmaps/curved-middle.xpm deleted file mode 100644 index 70fc4de..0000000 --- a/app/bin/bitmaps/curved-middle.xpm +++ /dev/null @@ -1,108 +0,0 @@ -static char *curved_middle_x16[] = { - "16 16 5 1", - " c None", - "0 c #000000", - "1 c #CC0000", - "2 c #CC9966", - "3 c #FF6666", - " 2 2 ", - " 2 0000 ", - " 2 00 2 2 ", - " 2 00 2 000 ", - " 0 2 002 2 ", - " 2 0 2 ", - " 0 1111 ", - " 20 113 ", - " 02 1313 ", - " 20 1 313 ", - " 0202 313 ", - " 0 0 313 ", - "20202 313 ", - " 0 0 313 ", - "20202 31 ", - " "}; - -static char *curved_middle_x24[] = { - "24 24 9 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #333300", - "3 c #663300", - "4 c #996600", - "5 c #CC0000", - "6 c #CC6600", - "7 c #CC9900", - " 7 ", - " 7 430", - " 4300340", - " 7 0026 77 ", - " 320 730210", - " 7 00077 013037 ", - " 41 400 7 7 ", - " 037 037 ", - " 720 60 7 ", - " 167 027 ", - " 00 740 7 ", - " 743 37 ", - " 17740 655555 ", - " 00 736 55555 ", - " 742 00 555 ", - " 26760 5 55 ", - " 0 367 5 55 ", - " 00 0 5 55 ", - "7726720 5 ", - " 277277 5 ", - " 00 0 5 ", - " 00 00 5 ", - "7447447 5 ", - " 01 34 "}; - -static char *curved_middle_x32[] = { - "32 32 11 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #333300", - "3 c #663300", - "4 c #666600", - "5 c #996600", - "6 c #CC0000", - "7 c #CC3300", - "8 c #CC6600", - "9 c #CC9900", - " ", - " 99 ", - " 9 002300", - " 5200038 ", - " 99 00038 9 ", - " 810 9 820", - " 028 8500033 ", - " 99 000 99 005 99 ", - " 930 9200 99 ", - " 059 015 ", - " 99 0 9 00 99 ", - " 983 920 ", - " 399 08 ", - " 0 99950 9 ", - " 99 0 9938 ", - " 935 299 ", - " 02999 0 97666666 ", - " 0 953 66666666 ", - " 00 0299 6666666 ", - " 9991 0 666666 ", - " 3599 00 6666666 ", - " 0 9839 666 6666 ", - " 00 0399 666 6666 ", - " 00 0 6666 ", - " 9919 00 666 ", - " 5399928 666 ", - " 00 3299 666 ", - " 00 00 666 ", - " 0 00 666 ", - "99289 15 666 ", - "990999199 66 ", - " 0 0 "}; - -static char **curved_middle_xpm[3] = { curved_middle_x16, curved_middle_x24, curved_middle_x32 }; - diff --git a/app/bin/bitmaps/curved-tangent.xpm b/app/bin/bitmaps/curved-tangent.xpm deleted file mode 100644 index 6332785..0000000 --- a/app/bin/bitmaps/curved-tangent.xpm +++ /dev/null @@ -1,116 +0,0 @@ -static char *curved_tangent_x16[] = { - "16 16 5 1", - " c None", - "0 c #000000", - "1 c #CC0000", - "2 c #CC9966", - "3 c #FF6666", - " 2 2 ", - " 2 0000 ", - " 2 00 2 2 ", - " 2 00 2 000 ", - " 0 2 002 2 ", - " 2 0 002 ", - " 0 13 ", - " 20 313 ", - " 020 313 ", - " 20 0 313 ", - " 0202 313 ", - " 0 0 313 1 ", - "20202 3131 ", - " 0 0 311 ", - "20202 1111 ", - " "}; - -static char *curved_tangent_x24[] = { - "24 24 13 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #333300", - "3 c #663300", - "4 c #996600", - "5 c #CC0000", - "6 c #CC6600", - "7 c #CC6666", - "8 c #CC9900", - "9 c #CCCCCC", - "A c #FFCCCC", - "B c #FFFFFF", - " ", - " 8 440 ", - " 2400340 ", - " 830048 8 ", - " 014 88 8 ", - " 8600 88 80030 ", - " 34 80022 4 ", - " 00 8 33 ", - " 63 81048 ", - " 08BA 34 ", - " 60 95A0 ", - " 26 B755 ", - " 00 880B555 ", - " 60 43 555 ", - " 448 0 555 ", - " 0 8830 555 ", - " 00 438 555 ", - " 10 00 555 5 ", - " 828881 555 55 ", - " 0 8438 55555 ", - " 00 00 5555 ", - " 33 23 55555 ", - " 448836 55555 ", - " 0 0 "}; - -static char *curved_tangent_x32[] = { - "32 32 15 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #333300", - "3 c #663300", - "4 c #993300", - "5 c #996600", - "6 c #CC0000", - "7 c #CC3333", - "8 c #CC6600", - "9 c #CC6666", - "A c #CC9900", - "B c #CC9999", - "C c #FFCCCC", - "D c #FFFFFF", - " ", - " AA ", - " AA 003200 ", - " 320005A ", - " A0000A A ", - " 32 AA A ", - " 005A AA A3 ", - " A 00 AA A000010 ", - " 33 A 0023 A ", - " 00AA 8200A ", - " A 00 A 018 ", - " 33 A500 A ", - " 02AADD 53 ", - " 00 D9BD08 ", - " A82 DC76BD ", - " 1AA DC766 ", - " 00 AA 0C666 ", - " 0 A3 666 ", - " A1 05A 666 ", - " 54A 00 666 ", - " 0 AAA0 666 ", - " 0 55 666 ", - " 00 0 666 ", - " 0 00 666 6 ", - " A3AAA 00 666 666 ", - " 00 AAA2A 6666666 ", - " 00 00 666666 ", - " 00 00 66666 ", - " 0 00 6666666 ", - " A3AAAA38 6666666 ", - " 0 08 ", - " "}; - -static char **curved_tangent_xpm[3] = { curved_tangent_x16, curved_tangent_x24, curved_tangent_x32 }; - diff --git a/app/bin/bitmaps/cut.xpm b/app/bin/bitmaps/cut.xpm deleted file mode 100644 index 6dcae39..0000000 --- a/app/bin/bitmaps/cut.xpm +++ /dev/null @@ -1,92 +0,0 @@ -static char *cut_x16[] = { - "16 16 3 1", - " c None", - "0 c #000000", - "1 c #333333", - " ", - " ", - " 1 ", - " 1111 ", - " 11 11 ", - " 1111 ", - " 11 ", - " 11 11111 ", - " 11111111111111 ", - " 11111 1111 ", - " 1 11 111 ", - " 111 111 ", - " 111 ", - " 111 ", - " ", - " "}; - -static char *cut_x24[] = { - "24 24 3 1", - " c None", - "0 c #000000", - "1 c #333333", - " ", - " ", - " ", - " ", - " 1111 ", - " 11 11 ", - " 111 11 ", - " 111 1 ", - " 1111 ", - " 1111 ", - " 1111 ", - " 1111 1111111 ", - " 11111111111111111111 ", - " 111111111111111111111 ", - " 1111111 111 ", - " 11 11 1111 ", - " 11 111 1111 ", - " 111 1111 ", - " 1111 ", - " 1111 ", - " 111 ", - " ", - " ", - " "}; - -static char *cut_x32[] = { - "32 32 3 1", - " c None", - "0 c #000000", - "1 c #333333", - " ", - " ", - " ", - " ", - " ", - " 11111 ", - " 1111111 ", - " 111 111 ", - " 111 11 ", - " 1111 111 ", - " 111111111 ", - " 1111111 ", - " 1111 ", - " 11111 ", - " 11111 ", - " 11111 1111111111 ", - " 111111111111111111111111 ", - " 1111111111111111111111111111 ", - " 111111111111111111 ", - " 111 111 1111 ", - " 11 111 1111 ", - " 111 111 11111 ", - " 1111111 11111 ", - " 11111 1111 ", - " 1111 ", - " 11111 ", - " 11111 ", - " 111 ", - " ", - " ", - " ", - " "}; - -static char **cut_xpm[3] = { cut_x16, cut_x24, cut_x32 }; - diff --git a/app/bin/bitmaps/delete.xpm b/app/bin/bitmaps/delete.xpm deleted file mode 100644 index 9002046..0000000 --- a/app/bin/bitmaps/delete.xpm +++ /dev/null @@ -1,114 +0,0 @@ -static char *delete_x16[] = { - "16 16 9 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #990000", - "3 c #CC0000", - "4 c #CC3300", - "5 c #CC6600", - "6 c #CC9900", - "7 c #800000", - " ", - " ", - " 33 33 ", - " 33 333 ", - " 33 333 ", - " 6 6 533534 6 6 ", - "0000007333100000", - " 6 6 663346 6 6 ", - " 6 6 663356 6 6 ", - "0000007332000000", - " 6 6 633435 6 6 ", - " 333 33 ", - " 333 33 ", - " 33 333 ", - " 3 ", - " "}; - -static char *delete_x24[] = { - "24 24 11 1", - " c None", - "0 c #000000", - "1 c #333300", - "2 c #663300", - "3 c #993300", - "4 c #996600", - "5 c #CC0000", - "6 c #CC3300", - "7 c #CC6600", - "8 c #CC9900", - "9 c #800000", - " ", - " ", - " ", - " 555 555 ", - " 5555 555 ", - " 5555 555 ", - " 5555 5555 ", - " 555 5555 ", - " 8 8 75557556 8 8 ", - "01200200295555520020021 ", - " 47 7 74555567 7 74 ", - " 8 8 8 555578 8 8 ", - " 8 8 8 5555 8 8 8 ", - " 47 7 74555537 7 74 ", - "012002002255555200200210", - " 8 8 85556557 8 8 ", - " 5555 555 ", - " 555 555 ", - " 555 5555 ", - " 555 5555 ", - " 555 555 ", - " 5 5 ", - " ", - " "}; - -static char *delete_x32[] = { - "32 32 11 1", - " c None", - "0 c #000000", - "1 c #333300", - "2 c #663300", - "3 c #990000", - "4 c #993300", - "5 c #996600", - "6 c #CC0000", - "7 c #CC3300", - "8 c #CC6600", - "9 c #CC9900", - " ", - " ", - " ", - " 6 6 ", - " 666 666 ", - " 66666 66666 ", - " 66666 66666 ", - " 66666 6666 ", - " 66666 6666 ", - " 66666 66666 ", - " 66666 66666 ", - " 99 99 9766686667 99 99 ", - " 055005510254666666651025500550 ", - " 055005510255366666751025500550 ", - " 99 99 99 6666699 99 99 ", - " 99 99 99 6666699 99 99 ", - " 99 99 99 6666699 99 99 ", - " 99 99 99 6666699 99 99 ", - " 055005510255666666551025500550 ", - " 055005510254666666751025500550 ", - " 99 99 9766686668 99 99 ", - " 66666 6666 ", - " 6666 6666 ", - " 6666 66666 ", - " 66666 66666 ", - " 66666 66666 ", - " 6666 66666 ", - " 6666 666 ", - " 66 6 ", - " ", - " ", - " "}; - -static char **delete_xpm[3] = { delete_x16, delete_x24, delete_x32 }; - diff --git a/app/bin/bitmaps/describe.xpm b/app/bin/bitmaps/describe.xpm deleted file mode 100644 index 1cbeb20..0000000 --- a/app/bin/bitmaps/describe.xpm +++ /dev/null @@ -1,111 +0,0 @@ -static char *describe_x16[] = { - "16 16 5 1", - " c None", - "0 c #000000", - "1 c #CC0000", - "2 c #CC9966", - "3 c #FF6666", - " ", - " 331133 ", - " 31111113 ", - " 113 311 ", - " 11 ", - " 2 2 2 3113 2 ", - "000000 3113 0000", - " 2 2 2 113 2 2 ", - " 2 2 2 11 2 2 2 ", - "000000 11 000000", - " 2 2 2 11 2 2 2 ", - " ", - " 11 ", - " 11 ", - " ", - " "}; - -static char *describe_x24[] = { - "24 24 10 1", - " c None", - "0 c #000000", - "1 c #333300", - "2 c #660000", - "3 c #663300", - "4 c #990000", - "5 c #996600", - "6 c #CC0000", - "7 c #CC6600", - "8 c #CC9900", - " ", - " ", - " ", - " 66666666 ", - " 6666666666 ", - " 66666666666 ", - " 6666 6666 ", - " 66 6666 ", - " 6666 ", - " 8 8 88 66666 8 88 ", - " 00000000046666620000000", - " 8 8 88666667 8 88 ", - " 8 8 886666 8 8 88 ", - " 8 8 886666 8 8 88 ", - " 1500510536664150051053 ", - " 1500510536664150051053 ", - " 8 8 8 6666 8 8 8 ", - " 666 ", - " 6 ", - " 66 ", - " 666 ", - " ", - " ", - " "}; - -static char *describe_x32[] = { - "32 32 13 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #333300", - "3 c #663300", - "4 c #990000", - "5 c #993300", - "6 c #996600", - "7 c #CC0000", - "8 c #CC3300", - "9 c #CC6600", - "A c #CC9900", - "B c #800000", - " ", - " ", - " ", - " 7777 ", - " 7777777777 ", - " 777777777777 ", - " 77777777777777 ", - " 77777 77777 ", - " 7777 77777 ", - " 7777 77777 ", - " 77 7777 ", - " 77777 ", - " AA AA AA 777777 AA AA ", - " 066006630266B77777777106600660 ", - " 066006630266B77777785006600660 ", - " AA AA AA 777778AA AA AA ", - " AA AA AA 7777 AAA AA AA ", - " AA AA AA 7777 AAA AA AA ", - " AA AA AA 7777 AAA AA AA ", - " 033003320133B77770232003300330 ", - " 99 696 39947777 696 99 99 ", - " AA AA AA 7777 AAA AA AA ", - " 7777 ", - " 7777 ", - " 7 ", - " 77 ", - " 7777 ", - " 7777 ", - " 77 ", - " ", - " ", - " "}; - -static char **describe_xpm[3] = { describe_x16, describe_x24, describe_x32 }; - diff --git a/app/bin/bitmaps/description.xpm b/app/bin/bitmaps/description.xpm deleted file mode 100644 index 47941b0..0000000 --- a/app/bin/bitmaps/description.xpm +++ /dev/null @@ -1,101 +0,0 @@ -static char *description_x16[] = { - "16 16 5 1", - " c None", - "0 c #000000", - "1 c #0066CC", - "2 c #0099FF", - "3 c #FF0000", - " ", - "00 000 00 00 ", - "0 0 0 0 0 ", - "0 0 00 0 0 ", - "0 0 0 0 0 ", - "00 000 00 00 ", - " 3 ", - " 333 ", - " 33333 ", - " 3 ", - " 2 2 2 3 2 2 2 ", - " 11111 3 11111 ", - " 2 2 2 2 2 2 ", - " 1111111111111 ", - " 2 2 2 2 2 2 2 ", - " "}; - -static char *description_x24[] = { - "24 24 5 1", - " c None", - "0 c #000000", - "1 c #0066CC", - "2 c #0099FF", - "3 c #FF0000", - " ", - " ", - " ", - " 000 0000 000 00 ", - " 0 0 0 0 0 0 ", - " 0 0 000 00 0 ", - " 0 0 0 0 0 0 ", - " 000 0000 000 00 ", - " ", - " 33 ", - " 3333 ", - " 333333 ", - " 33 ", - " 33 ", - " 2 2 2 33 2 2 2 ", - " 111111111 33 11111111 ", - " 2 2 2 33 2 2 2 ", - " 2 2 2 33 2 2 2 ", - " 2 2 2 2 2 2 ", - " 111111111111111111111 ", - " 2 2 2 2 2 2 2 ", - " ", - " ", - " "}; - -static char *description_x32[] = { - "32 32 8 1", - " c None", - "0 c #000000", - "1 c #0000CC", - "2 c #0033CC", - "3 c #0066CC", - "4 c #0066FF", - "5 c #0099FF", - "6 c #CC0000", - " ", - " 0000 00000 000 000 ", - " 000000 00000 00000 00000 ", - " 00 000 00 00 00 ", - " 00 00 00000 0000 00 ", - " 00 000 00 0000 00 ", - " 00 000 00 0 00 000 0 ", - " 000000 00000 00000 00000 ", - " ", - " 66 ", - " 6666 ", - " 666666 ", - " 66666666 ", - " 6 66 66 ", - " 66 ", - " 66 ", - " 66 ", - " 66 ", - " 66 ", - " 66 ", - " ", - " 55 5 5 55 5 5 55 ", - " 55 35 53 55 35 53 45 ", - " 111111111111111111111111111111 ", - " 55 35 53 55 35 53 45 ", - " 55 5 5 55 5 5 55 ", - " 55 5 5 55 5 5 55 ", - " 55 35 53 55 35 53 45 ", - " 111111111111111111111111111111 ", - " 133112311133113311231113311331 ", - " 55 5 5 55 5 5 55 ", - " "}; - -static char **description_xpm[3] = { description_x16, description_x24, description_x32 }; - diff --git a/app/bin/bitmaps/dimension.xpm b/app/bin/bitmaps/dimension.xpm deleted file mode 100644 index faceac6..0000000 --- a/app/bin/bitmaps/dimension.xpm +++ /dev/null @@ -1,94 +0,0 @@ -static char *dimension_x16[] = { - "16 16 4 1", - " c None", - "0 c #000000", - "1 c #990000", - "2 c #999999", - " 1111", - " 111", - " 1111", - " 111 1", - " 11 ", - " 002 200 ", - " 0 0 ", - " 02 002 ", - " 0 0 0 ", - " 002 202 ", - " ", - " 11 ", - "1 111 ", - "1111 ", - "111 ", - "1111 "}; - -static char *dimension_x24[] = { - "24 24 4 1", - " c None", - "0 c #000000", - "1 c #990000", - "2 c #CC0000", - " ", - " 222222 ", - " 22222 ", - " 22222", - " 222222", - " 222 22", - " 222 2 ", - " 22 ", - " 2 ", - " 000 0000 ", - " 0 00 0 0 ", - " 00 0000 ", - " 0000 00 ", - " 0 0 0 0 ", - " 0000 0000 ", - " 0 0 ", - " 22 ", - " 22 222 ", - " 22 222 ", - " 22222 ", - " 2222 ", - " 222222 ", - " 222222 ", - " "}; - -static char *dimension_x32[] = { - "32 32 3 1", - " c None", - "0 c #000000", - "1 c #CC0000", - " ", - " 1111111 ", - " 11111111 ", - " 1111111 ", - " 11111 ", - " 111111 ", - " 1111 11 ", - " 1111 11 ", - " 1111 11 ", - " 1111 ", - " 111 ", - " ", - " 00000 00000 ", - " 00 00 00 00 ", - " 00 00 ", - " 000 000000 ", - " 000 00 00 ", - " 0000 00 ", - " 00 00 0 00 ", - " 00000 00000 ", - " 0 00 ", - " 11 ", - " 1 111 ", - " 111 1111 ", - " 111 1111 ", - " 111 1111 ", - " 1111111 ", - " 111111 ", - " 11111111 ", - " 11111111 ", - " 11111111 ", - " "}; - -static char **dimension_xpm[3] = { dimension_x16, dimension_x24, dimension_x32 }; - diff --git a/app/bin/bitmaps/doc-export-bmap.xpm b/app/bin/bitmaps/doc-export-bmap.xpm deleted file mode 100644 index 543cc1a..0000000 --- a/app/bin/bitmaps/doc-export-bmap.xpm +++ /dev/null @@ -1,162 +0,0 @@ -static char *doc_export_bmap_x16[] = { - "16 16 23 1", - " c None", - "0 c #000000", - "1 c #333300", - "2 c #333333", - "3 c #336666", - "4 c #336699", - "5 c #3399CC", - "6 c #663333", - "7 c #666633", - "8 c #666666", - "9 c #669933", - "A c #6699CC", - "B c #996633", - "C c #996666", - "D c #999966", - "E c #999999", - "F c #CC0000", - "G c #CC9966", - "H c #CC9999", - "I c #CCCC99", - "J c #CCCCCC", - "K c #FFCCCC", - "L c #808080", - "2888888888872 ", - "8KH2788881JI2 ", - "8DIJKEJKKKHI2 ", - "8E99I8KKKKK82 ", - "8I99DHKKKKK22 ", - "8CII7JKKKKKHF ", - "8J2K7JKKKKKKFF ", - "8KKD2KKKIHHGFFFF", - "4LKK0KKKHHHGFFFF", - "4AAK2KKKKKKKFF ", - "4AAH2KIHHHK8F ", - "4AA32KCBBBI02 ", - "4AA4LKCBBBI62 ", - "4AAAKDIHHHKH2 ", - "4AAAKK88C2EI2 ", - "45558EEEEEED2 "}; - -static char *doc_export_bmap_x24[] = { - "24 24 30 1", - " c None", - "0 c #000000", - "1 c #000033", - "2 c #003333", - "3 c #330000", - "4 c #333300", - "5 c #333333", - "6 c #336699", - "7 c #339933", - "8 c #3399CC", - "9 c #663333", - "A c #666633", - "B c #666666", - "C c #666699", - "D c #669933", - "E c #6699CC", - "F c #996633", - "G c #996666", - "H c #999966", - "I c #999999", - "J c #CC0000", - "K c #CC3333", - "L c #CC6666", - "M c #CC9966", - "N c #CC9999", - "O c #CCCC99", - "P c #CCCCCC", - "Q c #FFCC99", - "R c #FFCCCC", - "S c #808080", - "3000000000000000005 ", - "5RRRROOOOOOOOPRRRP5 ", - "5RRN5SSNNNNNNB5IRP5 ", - "5RGNRRRRORRRRRROBP5 ", - "5OSOHOROBRRRRRRRGO5 ", - "5BR77DOBORRRRRRROI5 ", - "5AOD7DOBRRRRRRRROS5 ", - "5BRODHINRRRRRRRRP5 ", - "5OHRRRHNRRRRRRRRRP J ", - "5RI9PRHNRRRRRRRRRRJJJ ", - "5RRRAIGORRRRRRRRRR JJJJ ", - "5RRRRHBORRRRQLLLLKJJJJJJ", - "5SORRR0ORRRRQLLLLKJJJJJJ", - "5EEBRR4ORRRRRRRRRR JJJJ ", - "5EEECRBPRRRRRRRRRRJJJ ", - "5EEE8RBPRRRRRRRRPG J ", - "5EEEENGPRO9999FRR5 ", - "5EEEEHGPRNFMMMFPRB5 ", - "5EEEESONRNFMMMFPOH5 ", - "5EEEECR9RO9999FRIN5 ", - "5EEEE6RIBRRRRRRR4P5 ", - "5EEEE8RRO3BNNNB0PP5 ", - "5EEEEEIRRRROOOPRRP5 ", - "2111110BBBBBBBBBBB5 "}; - -static char *doc_export_bmap_x32[] = { - "32 32 26 1", - " c None", - "0 c #000000", - "1 c #003333", - "2 c #333333", - "3 c #336666", - "4 c #336699", - "5 c #339933", - "6 c #339999", - "7 c #3399CC", - "8 c #663333", - "9 c #666633", - "A c #666666", - "B c #669933", - "C c #669966", - "D c #6699CC", - "E c #996633", - "F c #996666", - "G c #999966", - "H c #999999", - "I c #CC0000", - "J c #CC9966", - "K c #CC9999", - "L c #CCCC99", - "M c #CCCCCC", - "N c #FFCCCC", - "O c #808080", - "2000000000000000000000002 ", - "0NNNNNNNNNNNNNNNNNNNNNNN0 ", - "0NNNNMHFFFFFFFFFFOHLNNNN0 ", - "0NNNH2GKKKLLLLLLLKH9ALNN0 ", - "0NNFAMNNNNNMNNNNNNNNK2LN0 ", - "0NHANNLNNNLANNNNNNNNNHAN0 ", - "0N2LG5BLNNALNNNNNNNNNN2M0 ", - "0KANB55BMKHNNNNNNNNNNNAL0 ", - "0KOLB55BN9MNNNNNNNNNNNFK0 ", - "0LANLBBCL9NNNNNNNNNNNNFA2 ", - "0M2MNLMNKGNNNNNNNNNNNNKA ", - "0NAHNNNNKGNNNNNNNNNNNNNN II ", - "0NLAALNNKGNNNNNNNNNNNNN IIII ", - "0NNNK2HNHHNNNNNNNNNNNNN IIII ", - "0NNNNMFAHHNNNNNNNNNNNNN IIIII ", - "0NNNNNNGAHNNNNNNNIIIIIIIIIIIIIII", - "13LNNNNN2GNNNNNNNIIIIIIIIIIIIIII", - "1DD3KNNNAFNNNNNNNNNNNNN IIIII ", - "1DDDDHNNGHNNNNNNNNNNNNN IIII ", - "1DDDDDKNHHNNNNNNNNNNNNN IIII ", - "1DDDDDANHHNNNNNNNNNNNNM II ", - "1DDDDD4MHHNNNKKKKKKKNNH2 ", - "1DDDDD7LHHNNMEEEEEE8NNGF2 ", - "1DDDDDDLHGNNMEJJJJJ8NNGK0 ", - "1DDDDDDKL8NNMEJJJJJ8NNFK0 ", - "1DDDDDDHN2LNMEEEEEE8NNAL0 ", - "1DDDDDDANHANNKKKKKKLNL2M0 ", - "1DDDDDD3NNAFMNNNNNNNMAHN0 ", - "1DDDDDD6LNNH2FKLLLLH2ONN0 ", - "1DDDDDDDKNNNMKFAAAAGLNNN0 ", - "1DDDDDDD3NNNNNNNNNNNNNNN0 ", - "122222222AAAAAAAAAAAAAAA0 "}; - -static char **doc_export_bmap_xpm[3] = { doc_export_bmap_x16, doc_export_bmap_x24, doc_export_bmap_x32 }; - diff --git a/app/bin/bitmaps/doc-export-dxf.xpm b/app/bin/bitmaps/doc-export-dxf.xpm deleted file mode 100644 index 7ac2c54..0000000 --- a/app/bin/bitmaps/doc-export-dxf.xpm +++ /dev/null @@ -1,100 +0,0 @@ -static char *doc_export_dxf_x16[] = { - "16 16 7 1", - " c None", - "0 c #000000", - "1 c #666666", - "2 c #993333", - "3 c #996666", - "4 c #CC0000", - "5 c #CC3333", - "1111111111111 ", - "11 11 11 11 1 ", - "1 1 1 1 1 ", - "1111111111111 ", - "11 11 11 11 1 ", - "1 1 1 1 2 ", - "11111111111144 ", - "11 11 112325 44 ", - "1 1 1 44444444", - "11111111111144 ", - "1 1 1 1 4 ", - "1 1 1 1 1 ", - "1111111111111 ", - "1 1 1 1 1 ", - "1 1 1 1 1 ", - "1111111111111 "}; - -static char *doc_export_dxf_x24[] = { - "24 24 5 1", - " c None", - "0 c #000000", - "1 c #666666", - "2 c #996666", - "3 c #CC0000", - "11111111111111111111 ", - "11111111111111111111 ", - "11 1 11 1 11 ", - "11 1 11 1 11 ", - "11 1 11 1 11 ", - "11111111111111111111 ", - "11 1 11 1 11 ", - "11 1 11 1 1 ", - "11 1 11 1 33 ", - "111111111111111112333 ", - "11111111111111111 333 ", - "11 1 11 33333333333 ", - "11 1 11 33333333333 ", - "11 1 11 1 333 ", - "111111111111111112333 ", - "11 1 11 1 33 ", - "11 1 11 1 1 ", - "11 1 11 1 11 ", - "11111111111111111111 ", - "11 1 11 1 11 ", - "11 1 11 1 11 ", - "11 1 11 1 11 ", - "11 1 11 1 11 ", - "11111111111111111111 "}; - -static char *doc_export_dxf_x32[] = { - "32 32 5 1", - " c None", - "0 c #000000", - "1 c #666666", - "2 c #993333", - "3 c #CC0000", - " 1 11 11 11 11 ", - "11111111111111111111111111 ", - " 1 1 1 11 11 ", - " 1 1 1 11 11 ", - " 1 1 1 11 11 ", - " 1 1 1 11 11 ", - " 1 11 11 11 11 ", - "11111111111111111111111111 ", - " 1 1 1 11 11 ", - " 1 1 1 11 11 ", - " 1 1 1 11 ", - " 1 1 1 11 33 ", - " 1 11 11 11 333 ", - "11111111111111111111111 33333 ", - " 1 1 1 1 3333 ", - " 1 1 1 333333333333333 ", - " 1 1 1 333333333333333 ", - " 1 1 1 32 33333 ", - " 1 11 11 11 3333 ", - "1111111111111111111111123333 ", - " 1 1 1 1 33 ", - " 1 1 1 1 ", - " 1 1 1 1 11 ", - " 1 1 1 1 11 ", - "11111111111111111111111111 ", - "11111111111111111111111111 ", - " 1 1 1 1 11 ", - " 1 1 1 1 11 ", - " 1 1 1 1 11 ", - " 1 1 1 1 11 ", - " 1111111111111111111111111 ", - " 1111111111111111111111111 "}; - -static char **doc_export_dxf_xpm[3] = { doc_export_dxf_x16, doc_export_dxf_x24, doc_export_dxf_x32 }; - diff --git a/app/bin/bitmaps/doc-export-svg.xpm b/app/bin/bitmaps/doc-export-svg.xpm deleted file mode 100644 index 72c85d3..0000000 --- a/app/bin/bitmaps/doc-export-svg.xpm +++ /dev/null @@ -1,114 +0,0 @@ -static char *doc_export_svg_x16[] = { - "16 16 10 1", - " c None", - "0 c #000000", - "1 c #003300", - "2 c #003366", - "3 c #003399", - "4 c #006600", - "5 c #0066CC", - "6 c #0066FF", - "7 c #CC0000", - "8 c #008000", - " 888 ", - " 888888400000 ", - " 8 011 ", - "88 00 88 ", - "88 00 88 ", - "8800 88 7 ", - " 41 8 77 ", - " 048888 77777777", - " 0 77777777", - " 00 6 77 ", - " 00 666 7 ", - " 036 6 ", - " 300 6 ", - " 6 00230000 ", - " 66 32000 ", - " 666666666 "}; - -static char *doc_export_svg_x24[] = { - "24 24 10 1", - " c None", - "0 c #000000", - "1 c #003300", - "2 c #003366", - "3 c #003399", - "4 c #006600", - "5 c #0066CC", - "6 c #0066FF", - "7 c #CC0000", - "8 c #008000", - " 888 ", - " 88888888 ", - " 888 88840000000 ", - " 888 0111 ", - " 88 000 88 ", - "88 00 88 ", - "88 00 88 ", - "88 0 88 ", - " 8800 88 7 ", - " 880 88 777 ", - " 448 888 7777 ", - " 048888888 77777777777", - " 0 8888 77777777777", - " 0 7777 ", - " 0 66 7777 ", - " 00 66 7 ", - " 0 6 6 ", - " 056 66 ", - " 520 6 ", - " 6 000026 ", - " 6 00002000000 ", - " 66 5300000 ", - " 6666666666666 ", - " 6666666666666 "}; - -static char *doc_export_svg_x32[] = { - "32 32 11 1", - " c None", - "0 c #000000", - "1 c #000033", - "2 c #003300", - "3 c #003366", - "4 c #003399", - "5 c #006600", - "6 c #0066CC", - "7 c #0066FF", - "8 c #CC0000", - "9 c #008000", - " 99 ", - " 99999999 ", - " 999999999999 00000000 ", - " 9999 9950000000000 ", - " 999 0000000 ", - " 999 0000299 ", - " 99 00000 99 ", - "999 0000 99 ", - "999 0000 99 ", - "999 000 99 ", - " 99 000 99 ", - " 995000 999 88 ", - " 99200 999 8888 ", - " 9005 9999 88888 ", - " 029999999999 88888 ", - " 002999999999 888888888888888", - " 000 99999 888888888888888", - " 000 88888 ", - " 000 7 88888 ", - " 000 777 88888 ", - " 00 77777 88 ", - " 000 777777 ", - " 000677 777 ", - " 0036 777 ", - " 63000 777 ", - " 76300000677 ", - " 777 00000146 ", - " 777 00000000000000 ", - " 777 3431000000 ", - " 777 777 ", - " 7777777777777777777 ", - "777777777777777777777 "}; - -static char **doc_export_svg_xpm[3] = { doc_export_svg_x16, doc_export_svg_x24, doc_export_svg_x32 }; - diff --git a/app/bin/bitmaps/doc-export-xtc.xpm b/app/bin/bitmaps/doc-export-xtc.xpm deleted file mode 100644 index 6afb7c7..0000000 --- a/app/bin/bitmaps/doc-export-xtc.xpm +++ /dev/null @@ -1,108 +0,0 @@ -static char *doc_export_xtc_x16[] = { - "16 16 9 1", - " c None", - "0 c #000000", - "1 c #666666", - "2 c #996666", - "3 c #CC0000", - "4 c #CC3333", - "5 c #CC9999", - "6 c #FFCCCC", - "7 c #FFFFFF", - "111111111111 ", - "177777777771 ", - "177777777771 ", - "177777777771 ", - "177777777771 ", - "1777777777713 ", - "17777777777133 ", - "1777777755543333", - "177777776662 33 ", - "17777777777133 ", - "1777777777713 ", - "177777777771 ", - "177777777771 ", - "177777777771 ", - "177777777771 ", - "111111111111 "}; - -static char *doc_export_xtc_x24[] = { - "24 24 7 1", - " c None", - "0 c #000000", - "1 c #666666", - "2 c #993333", - "3 c #CC0000", - "4 c #FFCCCC", - "5 c #FFFFFF", - " 1111111111111111 ", - "15555555555555551 ", - "15555555555555551 ", - "15555555555555551 ", - "15555555555555551 ", - "15555555555555551 ", - "15555555555555551 ", - "15555555555555551 ", - "15555555555555551 33 ", - "15555555555555551 3333 ", - "15555555555555551 3333 ", - "155555555555433333333333", - "15555555555544442333333 ", - "15555555555555551 333 ", - "15555555555555551 333 ", - "15555555555555551 3 ", - "15555555555555551 ", - "15555555555555551 ", - "15555555555555551 ", - "15555555555555551 ", - "15555555555555551 ", - "15555555555555551 ", - "15555555555555551 ", - " 1111111111111111 "}; - -static char *doc_export_xtc_x32[] = { - "32 32 9 1", - " c None", - "0 c #000000", - "1 c #666666", - "2 c #993333", - "3 c #CC0000", - "4 c #CC3333", - "5 c #CC9999", - "6 c #FFCCCC", - "7 c #FFFFFF", - " ", - " 1111111111111111111111 ", - " 1777777777777777777771 ", - " 1777777777777777777771 ", - " 1777777777777777777771 ", - " 1777777777777777777771 ", - " 1777777777777777777771 ", - " 1777777777777777777771 ", - " 1777777777777777777771 ", - " 1777777777777777777771 ", - " 1777777777777777777771 ", - " 1777777777777777777771 333 ", - " 1777777777777777777771 3333 ", - " 1777777777777777777771 33333 ", - " 177777777777777766666233333333 ", - " 1777777777777776333333333333333", - " 177777777777777655555433333333 ", - " 1777777777777777777771 3333 ", - " 1777777777777777777771 33333 ", - " 1777777777777777777771 333 ", - " 1777777777777777777771 3 ", - " 1777777777777777777771 ", - " 1777777777777777777771 ", - " 1777777777777777777771 ", - " 1777777777777777777771 ", - " 1777777777777777777771 ", - " 1777777777777777777771 ", - " 1777777777777777777771 ", - " 1777777777777777777771 ", - " 1777777777777777777771 ", - " 1111111111111111111111 ", - " "}; - -static char **doc_export_xtc_xpm[3] = { doc_export_xtc_x16, doc_export_xtc_x24, doc_export_xtc_x32 }; - diff --git a/app/bin/bitmaps/doc-export.xpm b/app/bin/bitmaps/doc-export.xpm deleted file mode 100644 index e594e38..0000000 --- a/app/bin/bitmaps/doc-export.xpm +++ /dev/null @@ -1,119 +0,0 @@ -static char *doc_export_x16[] = { - "16 16 12 1", - " c None", - "0 c #000000", - "1 c #666666", - "2 c #993333", - "3 c #999999", - "4 c #CC0000", - "5 c #CC6666", - "6 c #CC9999", - "7 c #CCCCCC", - "8 c #FFCCCC", - "9 c #FFFFFF", - "A c #C0C0C0", - "111111111111 ", - "199999999991 ", - "199999999991 ", - "193333333391 ", - "193777777391 ", - "1937777773914 ", - "19377777739144 ", - "1937777765824444", - "19377777A582444 ", - "19377777739144 ", - "1937777773914 ", - "193333333391 ", - "199999999991 ", - "199999999991 ", - "199999999991 ", - "111111111111 "}; - -static char *doc_export_x24[] = { - "24 24 12 1", - " c None", - "0 c #000000", - "1 c #666666", - "2 c #993333", - "3 c #999999", - "4 c #CC0000", - "5 c #CC6666", - "6 c #CC9999", - "7 c #CCCCCC", - "8 c #FFCCCC", - "9 c #FFFFFF", - "A c #C0C0C0", - " 1111111111111111 ", - "199999999999999991 ", - "199999999999999991 ", - "199999999999999991 ", - "199999999999999991 ", - "199333333333333991 ", - "199377777777773991 ", - "199377777777773991 ", - "19937777777777399144 ", - "199377777777773991444 ", - "199377777777773991 4444 ", - "199377777777A44444444444", - "19937777777776588244444 ", - "199377777777773991 444 ", - "199377777777773991444 ", - "199377777777773991 4 ", - "199377777777773991 ", - "199333333333333991 ", - "199999999999999991 ", - "199999999999999991 ", - "199999999999999991 ", - "199999999999999991 ", - "199999999999999991 ", - " 1111111111111111 "}; - -static char *doc_export_x32[] = { - "32 32 12 1", - " c None", - "0 c #000000", - "1 c #666666", - "2 c #993333", - "3 c #999999", - "4 c #CC0000", - "5 c #CC3333", - "6 c #CC6666", - "7 c #CC9999", - "8 c #CCCCCC", - "9 c #FFCCCC", - "A c #FFFFFF", - " ", - " 1111111111111111111111 ", - " 1AAAAAAAAAAAAAAAAAAAA1 ", - " 1AAAAAAAAAAAAAAAAAAAA1 ", - " 1AAAAAAAAAAAAAAAAAAAA1 ", - " 1AAAAAAAAAAAAAAAAAAAA1 ", - " 1AAAAAAAAAAAAAAAAAAAA1 ", - " 1AAA33333333333333AAA1 ", - " 1AA3888888888888883AA1 ", - " 1AA3888888888888883AA1 ", - " 1AA3888888888888883AA1 ", - " 1AA3888888888888883AA1 444 ", - " 1AA3888888888888883AA1 4444 ", - " 1AA3888888888888883AA1 44444 ", - " 1AA388888888888877699244444444 ", - " 1AA3888888888888444444444444444", - " 1AA388888888888866677544444444 ", - " 1AA3888888888888883AA1 4444 ", - " 1AA3888888888888883AA1 44444 ", - " 1AA3888888888888883AA1 444 ", - " 1AA3888888888888883AA1 4 ", - " 1AA3888888888888883AA1 ", - " 1AA3888888888888883AA1 ", - " 1AA3333333333333333AA1 ", - " 1AAAAAAAAAAAAAAAAAAAA1 ", - " 1AAAAAAAAAAAAAAAAAAAA1 ", - " 1AAAAAAAAAAAAAAAAAAAA1 ", - " 1AAAAAAAAAAAAAAAAAAAA1 ", - " 1AAAAAAAAAAAAAAAAAAAA1 ", - " 1AAAAAAAAAAAAAAAAAAAA1 ", - " 1111111111111111111111 ", - " "}; - -static char **doc_export_xpm[3] = { doc_export_x16, doc_export_x24, doc_export_x32 }; - diff --git a/app/bin/bitmaps/doc-import-xtc.xpm b/app/bin/bitmaps/doc-import-xtc.xpm deleted file mode 100644 index 4b00631..0000000 --- a/app/bin/bitmaps/doc-import-xtc.xpm +++ /dev/null @@ -1,123 +0,0 @@ -static char *doc_import_xtc_x16[] = { - "16 16 13 1", - " c None", - "0 c #000000", - "1 c #009933", - "2 c #336666", - "3 c #339966", - "4 c #666666", - "5 c #669966", - "6 c #999999", - "7 c #99CC99", - "8 c #99CCCC", - "9 c #CCCCCC", - "A c #FFFFFF", - "B c #C0C0C0", - " 4444444444444", - " 4AAAAAAAAAAA4", - " 4AAAAAAAAAAA4", - " 4AAAAAAAAAAA4", - " 4AAAAAAAAAAA4", - " 49AAAAAAAAAA4", - " 486AAAAAAAAA4", - "1112B739AAAAAAA4", - "1112B759AAAAAAA4", - " 496AAAAAAAAA4", - " 4BAAAAAAAAAA4", - " 4AAAAAAAAAAA4", - " 4AAAAAAAAAAA4", - " 4AAAAAAAAAAA4", - " 4AAAAAAAAAAA4", - " 4444444444444"}; - -static char *doc_import_xtc_x24[] = { - "24 24 13 1", - " c None", - "0 c #000000", - "1 c #009933", - "2 c #336633", - "3 c #339966", - "4 c #666666", - "5 c #669966", - "6 c #669999", - "7 c #999999", - "8 c #99CC99", - "9 c #CCCCCC", - "A c #FFFFFF", - "B c #C0C0C0", - " 444444444444444444", - " 4AAAAAAAAAAAAAAAAA4", - " 4AAAAAAAAAAAAAAAAA4", - " 4AAAAAAAAAAAAAAAAA4", - " 4AAAAAAAAAAAAAAAAA4", - " 4AAAAAAAAAAAAAAAAA4", - " 4AAAAAAAAAAAAAAAAA4", - " 4AAAAAAAAAAAAAAAAA4", - " 498AAAAAAAAAAAAAAA4", - " 4516AAAAAAAAAAAAAA4", - " 4A8139AAAAAAAAAAAA4", - "111111111119AAAAAAAAAAA4", - "111112775119AAAAAAAAAAA4", - " 4A7159AAAAAAAAAAAA4", - " 4517AAAAAAAAAAAAAA4", - " 49BAAAAAAAAAAAAAAA4", - " 4AAAAAAAAAAAAAAAAA4", - " 4AAAAAAAAAAAAAAAAA4", - " 4AAAAAAAAAAAAAAAAA4", - " 4AAAAAAAAAAAAAAAAA4", - " 4AAAAAAAAAAAAAAAAA4", - " 4AAAAAAAAAAAAAAAAA4", - " 4AAAAAAAAAAAAAAAAA4", - " 4444444444444444444"}; - -static char *doc_import_xtc_x32[] = { - "32 32 14 1", - " c None", - "0 c #000000", - "1 c #006633", - "2 c #009933", - "3 c #339933", - "4 c #339966", - "5 c #666666", - "6 c #669966", - "7 c #669999", - "8 c #99CC99", - "9 c #CCCCCC", - "A c #CCFFCC", - "B c #CCFFFF", - "C c #FFFFFF", - " 55555555555555555555555 ", - " 5CCCCCCCCCCCCCCCCCCCCCCC5", - " 5CCCCCCCCCCCCCCCCCCCCCCC5", - " 5CCCCCCCCCCCCCCCCCCCCCCC5", - " 5CCCCCCCCCCCCCCCCCCCCCCC5", - " 5CCCCCCCCCCCCCCCCCCCCCCC5", - " 5CCCCCCCCCCCCCCCCCCCCCCC5", - " 5CCCCCCCCCCCCCCCCCCCCCCC5", - " 5CCCCCCCCCCCCCCCCCCCCCCC5", - " 5CCCCCCCCCCCCCCCCCCCCCCC5", - " 5CCCCCCCCCCCCCCCCCCCCCCC5", - " 5939CCCCCCCCCCCCCCCCCCCC5", - " 56228CCCCCCCCCCCCCCCCCCC5", - " 5C6226CCCCCCCCCCCCCCCCCC5", - " 59982239CCCCCCCCCCCCCCCC5", - " 22222222222222BCCCCCCCCCCCCCCC5", - " 22222222222223CCCCCCCCCCCCCCCC5", - " 5CC7226ACCCCCCCCCCCCCCCC5", - " 594228CCCCCCCCCCCCCCCCCC5", - " 56239CCCCCCCCCCCCCCCCCCC5", - " 596ACCCCCCCCCCCCCCCCCCCC5", - " 5CCCCCCCCCCCCCCCCCCCCCCC5", - " 5CCCCCCCCCCCCCCCCCCCCCCC5", - " 5CCCCCCCCCCCCCCCCCCCCCCC5", - " 5CCCCCCCCCCCCCCCCCCCCCCC5", - " 5CCCCCCCCCCCCCCCCCCCCCCC5", - " 5CCCCCCCCCCCCCCCCCCCCCCC5", - " 5CCCCCCCCCCCCCCCCCCCCCCC5", - " 5CCCCCCCCCCCCCCCCCCCCCCC5", - " 5CCCCCCCCCCCCCCCCCCCCCCC5", - " 5CCCCCCCCCCCCCCCCCCCCCCC5", - " 55555555555555555555555 "}; - -static char **doc_import_xtc_xpm[3] = { doc_import_xtc_x16, doc_import_xtc_x24, doc_import_xtc_x32 }; - diff --git a/app/bin/bitmaps/doc-import.xpm b/app/bin/bitmaps/doc-import.xpm deleted file mode 100644 index 0b10537..0000000 --- a/app/bin/bitmaps/doc-import.xpm +++ /dev/null @@ -1,123 +0,0 @@ -static char *doc_import_x16[] = { - "16 16 13 1", - " c None", - "0 c #000000", - "1 c #009933", - "2 c #336666", - "3 c #339966", - "4 c #666666", - "5 c #669966", - "6 c #999999", - "7 c #99CC99", - "8 c #99CCCC", - "9 c #CCCCCC", - "A c #FFFFFF", - "B c #C0C0C0", - " 4444444444444", - " 4AAAAAAAAAAA4", - " 4AAAAAAAAAAA4", - " 4AAAAAAAAAAA4", - " 4A666666666A4", - " 49699999996A4", - " 48599999996A4", - "1112B537999996A4", - "1112B537999996A4", - " 49399999996A4", - " 4B699999996A4", - " 4A699999996A4", - " 4AA66666666A4", - " 4AAAAAAAAAAA4", - " 4AAAAAAAAAAA4", - " 4444444444444"}; - -static char *doc_import_x24[] = { - "24 24 12 1", - " c None", - "0 c #000000", - "1 c #009933", - "2 c #336633", - "3 c #339966", - "4 c #666666", - "5 c #669966", - "6 c #999999", - "7 c #99CC99", - "8 c #CCCCCC", - "9 c #FFFFFF", - "A c #C0C0C0", - " 444444444444444444", - " 4999999999999999994", - " 4999999999999999994", - " 4999999999999999994", - " 4999999999999999994", - " 4999999999999999994", - " 4996666666666666994", - " 4996888888888886994", - " 4876888888888886994", - " 4613888888888886994", - " 49713A8888888886994", - "11111111111A888888886994", - "11111266311A888888886994", - " 49613A8888888886994", - " 4515888888888886994", - " 48A6888888888886994", - " 4996888888888886994", - " 4996888888888886994", - " 4999666666666666994", - " 4999999999999999994", - " 4999999999999999994", - " 4999999999999999994", - " 4999999999999999994", - " 4444444444444444444"}; - -static char *doc_import_x32[] = { - "32 32 15 1", - " c None", - "0 c #000000", - "1 c #006633", - "2 c #009933", - "3 c #339933", - "4 c #339966", - "5 c #666666", - "6 c #669966", - "7 c #669999", - "8 c #999999", - "9 c #99CC99", - "A c #CCCCCC", - "B c #CCFFCC", - "C c #FFFFFF", - "D c #C0C0C0", - " 55555555555555555555555 ", - " 5CCCCCCCCCCCCCCCCCCCCCCC5", - " 5CCCCCCCCCCCCCCCCCCCCCCC5", - " 5CCCCCCCCCCCCCCCCCCCCCCC5", - " 5CCCCCCCCCCCCCCCCCCCCCCC5", - " 5CCCCCCCCCCCCCCCCCCCCCCC5", - " 5CCCCCCCCCCCCCCCCCCCCCCC5", - " 5CCCCCCCCCCCCCCCCCCCCCCC5", - " 5CCC88888888888888888CCC5", - " 5CCC8AAAAAAAAAAAAAAA8CCC5", - " 5CCC8AAAAAAAAAAAAAAA8CCC5", - " 5B4A8AAAAAAAAAAAAAAA8CCC5", - " 56226AAAAAAAAAAAAAAA8CCC5", - " 5C7226DAAAAAAAAAAAAA8CCC5", - " 5AA92239AAAAAAAAAAAA8CCC5", - " 22222222222222DAAAAAAAAAAA8CCC5", - " 22222222222222DAAAAAAAAAAA8CCC5", - " 5CC7224DAAAAAAAAAAAA8CCC5", - " 5A4226AAAAAAAAAAAAAA8CCC5", - " 56226AAAAAAAAAAAAAAA8CCC5", - " 5A6B8AAAAAAAAAAAAAAA8CCC5", - " 5CCC8AAAAAAAAAAAAAAA8CCC5", - " 5CCC8AAAAAAAAAAAAAAA8CCC5", - " 5CCC8AAAAAAAAAAAAAAA8CCC5", - " 5CCC88888888888888888CCC5", - " 5CCCCCCCCCCCCCCCCCCCCCCC5", - " 5CCCCCCCCCCCCCCCCCCCCCCC5", - " 5CCCCCCCCCCCCCCCCCCCCCCC5", - " 5CCCCCCCCCCCCCCCCCCCCCCC5", - " 5CCCCCCCCCCCCCCCCCCCCCCC5", - " 5CCCCCCCCCCCCCCCCCCCCCCC5", - " 55555555555555555555555 "}; - -static char **doc_import_xpm[3] = { doc_import_x16, doc_import_x24, doc_import_x32 }; - diff --git a/app/bin/bitmaps/doc-new.xpm b/app/bin/bitmaps/doc-new.xpm deleted file mode 100644 index cd4dbc1..0000000 --- a/app/bin/bitmaps/doc-new.xpm +++ /dev/null @@ -1,127 +0,0 @@ -static char *doc_new_x16[] = { - "16 16 15 1", - " c None", - "0 c #000000", - "1 c #009933", - "2 c #00CC33", - "3 c #00CC66", - "4 c #00FF66", - "5 c #33CC66", - "6 c #666666", - "7 c #669966", - "8 c #66CC99", - "9 c #99CC99", - "A c #CCCCCC", - "B c #CCFFCC", - "C c #FFFFFF", - "D c #C0C0C0", - " 666666666666 ", - " 6CCA9CCCCCC6 ", - " 6CC52ACCCCC6 ", - " 6D71278CCCC6 ", - " 6544444BCCC6 ", - " 6AD139DCCCC6 ", - " 6CC12ACCCCC6 ", - " 6CCA9CCCCCC6 ", - " 6CCCCCCCCCC6 ", - " 6CCCCCCCCCC6 ", - " 6CCCCCCCCCC6 ", - " 6CCCCCCCCCC6 ", - " 6CCCCCCCCCC6 ", - " 6CCCCCCCCCC6 ", - " 6CCCCCCCCCC6 ", - " 666666666666 "}; - -static char *doc_new_x24[] = { - "24 24 14 1", - " c None", - "0 c #000000", - "1 c #009933", - "2 c #00CC33", - "3 c #00CC66", - "4 c #00FF66", - "5 c #33CC66", - "6 c #666666", - "7 c #66CC66", - "8 c #66CC99", - "9 c #99CC99", - "A c #CCCCCC", - "B c #CCFFCC", - "C c #FFFFFF", - " 666666666666666666 ", - " 6CCCCCCCCCCCCCCCC6 ", - " 6CCCC87ACCCCCCCCC6 ", - " 6CCCC347CCCCCCCCC6 ", - " 6CCCC547CCCCCCCCC6 ", - " 6C87734211ACCCCCC6 ", - " 6C344444449CCCCCC6 ", - " 6C522342229CCCCCC6 ", - " 6CCCB547CCCCCCCCC6 ", - " 6CCCB547CCCCCCCCC6 ", - " 6CCCC779CCCCCCCCC6 ", - " 6CCCCCCCCCCCCCCCC6 ", - " 6CCCCCCCCCCCCCCCC6 ", - " 6CCCCCCCCCCCCCCCC6 ", - " 6CCCCCCCCCCCCCCCC6 ", - " 6CCCCCCCCCCCCCCCC6 ", - " 6CCCCCCCCCCCCCCCC6 ", - " 6CCCCCCCCCCCCCCCC6 ", - " 6CCCCCCCCCCCCCCCC6 ", - " 6CCCCCCCCCCCCCCCC6 ", - " 6CCCCCCCCCCCCCCCC6 ", - " 6CCCCCCCCCCCCCCCC6 ", - " 6CCCCCCCCCCCCCCCC6 ", - " 666666666666666666 "}; - -static char *doc_new_x32[] = { - "32 32 15 1", - " c None", - "0 c #000000", - "1 c #009933", - "2 c #00CC33", - "3 c #00FF66", - "4 c #339933", - "5 c #666666", - "6 c #669966", - "7 c #66CC99", - "8 c #99CC99", - "9 c #CCCCCC", - "A c #CCFFCC", - "B c #CCFFFF", - "C c #FFFFFF", - "D c #C0C0C0", - " 555555555555555555555555 ", - " 5CCCCCCCCCCCCCCCCCCCCCC5 ", - " 5CCCCCCCCCCCCCCCCCCCCCC5 ", - " 5CCCCC8111DCCCCCCCCCCCC5 ", - " 5CCCCC8232DCCCCCCCCCCCC5 ", - " 5CCCCC8232DCCCCCCCCCCCC5 ", - " 5CCAAA82328AAACCCCCCCCC5 ", - " 5C822223322221ACCCCCCCC5 ", - " 5C823333333332ACCCCCCCC5 ", - " 5C823333333332ACCCCCCCC5 ", - " 5C988842326888BCCCCCCCC5 ", - " 5CCCCC62329CCCCCCCCCCCC5 ", - " 5CCCCC72329CCCCCCCCCCCC5 ", - " 5CCCCC82229CCCCCCCCCCCC5 ", - " 5CCCCC9DDDBCCCCCCCCCCCC5 ", - " 5CCCCCCCCCCCCCCCCCCCCCC5 ", - " 5CCCCCCCCCCCCCCCCCCCCCC5 ", - " 5CCCCCCCCCCCCCCCCCCCCCC5 ", - " 5CCCCCCCCCCCCCCCCCCCCCC5 ", - " 5CCCCCCCCCCCCCCCCCCCCCC5 ", - " 5CCCCCCCCCCCCCCCCCCCCCC5 ", - " 5CCCCCCCCCCCCCCCCCCCCCC5 ", - " 5CCCCCCCCCCCCCCCCCCCCCC5 ", - " 5CCCCCCCCCCCCCCCCCCCCCC5 ", - " 5CCCCCCCCCCCCCCCCCCCCCC5 ", - " 5CCCCCCCCCCCCCCCCCCCCCC5 ", - " 5CCCCCCCCCCCCCCCCCCCCCC5 ", - " 5CCCCCCCCCCCCCCCCCCCCCC5 ", - " 5CCCCCCCCCCCCCCCCCCCCCC5 ", - " 5CCCCCCCCCCCCCCCCCCCCCC5 ", - " 5CCCCCCCCCCCCCCCCCCCCCC5 ", - " 555555555555555555555555 "}; - -static char **doc_new_xpm[3] = { doc_new_x16, doc_new_x24, doc_new_x32 }; - diff --git a/app/bin/bitmaps/doc-open.xpm b/app/bin/bitmaps/doc-open.xpm deleted file mode 100644 index 992c9bf..0000000 --- a/app/bin/bitmaps/doc-open.xpm +++ /dev/null @@ -1,136 +0,0 @@ -static char *doc_open_x16[] = { - "16 16 17 1", - " c None", - "0 c #000000", - "1 c #663300", - "2 c #666600", - "3 c #666633", - "4 c #996633", - "5 c #996666", - "6 c #999966", - "7 c #999999", - "8 c #CC9966", - "9 c #CCCC66", - "A c #CCCC99", - "B c #CCCCCC", - "C c #FFCC99", - "D c #FFFFFF", - "E c #C0C0C0", - "F c #808080", - " ", - " ", - "2466666677F ", - "3C7BBBBBBBE7431 ", - "3C7DDDDDDDDBA61 ", - "3C7DDDDDDDDD761 ", - "3C51111111111113", - "3A3CCCCCCCCCCCC3", - "386CCCCCCCCCCC93", - "369CCCCCCCCCCC81", - "33CCCCCCCCCCCC4 ", - "24CCCCCCCCCCCC2 ", - "28CCCCCCCCCCCC3 ", - "368888888888862 ", - "222222222222221 ", - " "}; - -static char *doc_open_x24[] = { - "24 24 18 1", - " c None", - "0 c #000000", - "1 c #663300", - "2 c #666600", - "3 c #666633", - "4 c #666666", - "5 c #996633", - "6 c #996666", - "7 c #999933", - "8 c #999966", - "9 c #999999", - "A c #CC9966", - "B c #CC9999", - "C c #CCCC66", - "D c #CCCC99", - "E c #FFCC99", - "F c #FFFFFF", - "G c #C0C0C0", - " ", - " ", - " ", - "355888888869 ", - "3CE9GGGGGGGGGGG941111 ", - "3CE9FFFFFFFFFFFFBBAA51 ", - "3CE9FFFFFFFFFFFFFGDE81 ", - "3CE9FFFFFFFFFFFFFFGE81 ", - "3CE9FFFFFFFFFFFFFFGE81 ", - "3CE988888888888888675333", - "3CE5CDDDDDDDDDDDDDDDDDA3", - "3CE3EEEEEEEEEEEEEEEEEEA1", - "3CC8EEEEEEEEEEEEEEEEEE5 ", - "3CACEEEEEEEEEEEEEEEEEE2 ", - "3C5EEEEEEEEEEEEEEEEEEE3 ", - "3A5EEEEEEEEEEEEEEEEEEA3 ", - "3A8EEEEEEEEEEEEEEEEEE71 ", - "37CEEEEEEEEEEEEEEEEEE3 ", - "33EEEEEEEEEEEEEEEEEEE3 ", - "35EEEEEEEEEEEEEEEEEEC3 ", - "25AAAAAAAAAAAAAAAAAA71 ", - "222222222222222222222 ", - " ", - " "}; - -static char *doc_open_x32[] = { - "32 32 18 1", - " c None", - "0 c #000000", - "1 c #663300", - "2 c #666600", - "3 c #666633", - "4 c #996633", - "5 c #996666", - "6 c #999933", - "7 c #999966", - "8 c #999999", - "9 c #CC9966", - "A c #CC9999", - "B c #CCCC66", - "C c #CCCC99", - "D c #CCCCCC", - "E c #FFCC99", - "F c #FFFFFF", - "G c #C0C0C0", - " ", - " ", - " ", - " ", - "134444444444433 ", - "17EECGGGGGGGGG8888888 ", - "17EEGDFFFFFFFFFFFFFFD8311112 ", - "17EEGFFFFFFFFFFFFFFFFFAEEEE4 ", - "17EEGFFFFFFFFFFFFFFFFFFAEEE4 ", - "17EEGFFFFFFFFFFFFFFFFFFFGEE4 ", - "17EEGFFFFFFFFFFFFFFFFFFFDCE4 ", - "17EEGFFFFFFFFFFFFFFFFFFFDCE4 ", - "17EEGGGGGGGGGGGGGGGGGGGG8793111 ", - "17EE7799999999999999999999999941", - "17EE5CEEEEEEEEEEEEEEEEEEEEEEEE4 ", - "17EE3EEEEEEEEEEEEEEEEEEEEEEEEE2 ", - "17EC6EEEEEEEEEEEEEEEEEEEEEEEEE3 ", - "17E99EEEEEEEEEEEEEEEEEEEEEEEEB3 ", - "17E4EEEEEEEEEEEEEEEEEEEEEEEEE71 ", - "17E3EEEEEEEEEEEEEEEEEEEEEEEEE4 ", - "17B7EEEEEEEEEEEEEEEEEEEEEEEEE2 ", - "1799EEEEEEEEEEEEEEEEEEEEEEEEB3 ", - "174EEEEEEEEEEEEEEEEEEEEEEEEE92 ", - "174EEEEEEEEEEEEEEEEEEEEEEEEE61 ", - "147EEEEEEEEEEEEEEEEEEEEEEEEE2 ", - "14BEEEEEEEEEEEEEEEEEEEEEEEEE3 ", - "13EEEEEEEEEEEEEEEEEEEEEEEEEB3 ", - "12999999999999999999999999941 ", - " 222222222222222222222222222 ", - " ", - " ", - " "}; - -static char **doc_open_xpm[3] = { doc_open_x16, doc_open_x24, doc_open_x32 }; - diff --git a/app/bin/bitmaps/doc-print.xpm b/app/bin/bitmaps/doc-print.xpm deleted file mode 100644 index 853014f..0000000 --- a/app/bin/bitmaps/doc-print.xpm +++ /dev/null @@ -1,108 +0,0 @@ -static char *doc_print_x16[] = { - "16 16 8 1", - " c None", - "0 c #000000", - "1 c #666666", - "2 c #999999", - "3 c #CCCCCC", - "4 c #FFFFFF", - "5 c #C0C0C0", - "6 c #808080", - " 111111111111 ", - " 144444444441 ", - " 144444444441 ", - " 144444444441 ", - " 144444444441 ", - " 666666666666666", - "6255555555555556", - "6333333333333336", - "6333333333333336", - "6333333333333336", - "6311111111111136", - "6316111111654136", - "6512666666624136", - "6616111111165166", - " 166666666341 ", - " 111111111111 "}; - -static char *doc_print_x24[] = { - "24 24 8 1", - " c None", - "0 c #000000", - "1 c #666666", - "2 c #999999", - "3 c #CCCCCC", - "4 c #FFFFFF", - "5 c #C0C0C0", - "6 c #808080", - " 1111111111111111 ", - " 144444444444444441 ", - " 144444444444444441 ", - " 144444444444444441 ", - " 144444444444444441 ", - " 144444444444444441 ", - " 144444444444444441 ", - " 144444444444444441 ", - " 6666666666666666666666 ", - "625555555555555555555526", - "653333333333333333333356", - "653333333333333333333356", - "653333333333333333333356", - "653333333333333333333356", - "653333333333333333333356", - "653111111111111111111356", - "653136666666666634441356", - "653142222222222255441356", - "653142222222222225441356", - "662136666666666664441266", - " 136666666666666241 ", - " 142222222222233441 ", - " 145555555555544441 ", - " 1111111111111111 "}; - -static char *doc_print_x32[] = { - "32 32 9 1", - " c None", - "0 c #000000", - "1 c #333333", - "2 c #666666", - "3 c #999999", - "4 c #CCCCCC", - "5 c #FFFFFF", - "6 c #C0C0C0", - "7 c #808080", - " ", - " 2222222222222222222222 ", - " 2555555555555555555552 ", - " 2555555555555555555552 ", - " 2555555555555555555552 ", - " 2555555555555555555552 ", - " 2555555555555555555552 ", - " 2555555555555555555552 ", - " 2555555555555555555552 ", - " 2555555555555555555552 ", - " 2555555555555555555552 ", - " 777777777777777777777777777777 ", - " 7666666666666666666666666666677", - " 3444444444444444444444444444437", - " 3444444444444444444444444444437", - " 3444444444444444444444444444437", - " 3444444444444444444444444444437", - " 3444444444444444444444444444437", - " 3444444444444444444444444444437", - " 3444444444444444444444444444437", - " 3444222222222222222222222244437", - " 3444254444444444444455555244437", - " 3444267777777777777765555244437", - " 3444246666666666666666655244437", - " 3444246666666666666666655244437", - " 7444267777777777777773555244437", - " 777725444444444444444555527777 ", - " 2311111111111111111152 ", - " 2544444444444444555552 ", - " 2377777777777777455552 ", - " 2222222222222222222222 ", - " "}; - -static char **doc_print_xpm[3] = { doc_print_x16, doc_print_x24, doc_print_x32 }; - diff --git a/app/bin/bitmaps/doc-revert.xpm b/app/bin/bitmaps/doc-revert.xpm deleted file mode 100644 index 4af778a..0000000 --- a/app/bin/bitmaps/doc-revert.xpm +++ /dev/null @@ -1,134 +0,0 @@ -static char *doc_revert_x16[] = { - "16 16 17 1", - " c None", - "0 c #000000", - "1 c #666666", - "2 c #996633", - "3 c #CC6633", - "4 c #CC9900", - "5 c #CC9933", - "6 c #CC9966", - "7 c #CC9999", - "8 c #CCCC33", - "9 c #CCCC99", - "A c #CCCCCC", - "B c #FFCC00", - "C c #FFCC33", - "D c #FFCCCC", - "E c #FFFFCC", - "F c #FFFFFF", - " 111111111111 ", - " 1FFFFFFFFFF1 ", - " 1FFFFFFFFFF1 ", - " 1FFFADFFFFF1 ", - " 1FF639FFFFF1 ", - " 1D5BB529FFF1 ", - " 1F65B5B86FF1 ", - " 1FF93665C7F1 ", - " 1FFFDAFA55E1 ", - " 1FFFFFFF7491 ", - " 1FFFFFFFD561 ", - " 1FFFFFFFF251 ", - " 1FFFFFFFF621 ", - " 1FFFFFFFFFF1 ", - " 1FFFFFFFFFF1 ", - " 111111111111 "}; - -static char *doc_revert_x24[] = { - "24 24 17 1", - " c None", - "0 c #000000", - "1 c #666666", - "2 c #996600", - "3 c #996633", - "4 c #CC6633", - "5 c #CC9900", - "6 c #CC9933", - "7 c #CC9966", - "8 c #CC9999", - "9 c #CCCC99", - "A c #CCCCCC", - "B c #FFCC00", - "C c #FFCC33", - "D c #FFCCCC", - "E c #FFFFCC", - "F c #FFFFFF", - " 111111111111111111 ", - " 1FFFFFFFFFFFFFFFF1 ", - " 1FFFFFFFFFFFFFFFF1 ", - " 1FFFFFFFFFFFFFFFF1 ", - " 1FFFFFFFFFFFFFFFF1 ", - " 1FFFFFD8FFFFFFFFF1 ", - " 1FFFF863FFFFFFFFF1 ", - " 1FFD6CB37AFFFFFFF1 ", - " 1FA6BBBBB568FFFFF1 ", - " 1FF76BBBBBBB7FFFF1 ", - " 1FFFA6B2736BB7FFF1 ", - " 1FFFFE72FF96B69FF1 ", - " 1FFFFFF9FFF96B3FF1 ", - " 1FFFFFFFFFFF7B6DF1 ", - " 1FFFFFFFFFFFD6B8F1 ", - " 1FFFFFFFFFFFF7B3F1 ", - " 1FFFFFFFFFFFFA62F1 ", - " 1FFFFFFFFFFFFE66F1 ", - " 1FFFFFFFFFFFFF34E1 ", - " 1FFFFFFFFFFFFFAAF1 ", - " 1FFFFFFFFFFFFFFFF1 ", - " 1FFFFFFFFFFFFFFFF1 ", - " 1FFFFFFFFFFFFFFFF1 ", - " 111111111111111111 "}; - -static char *doc_revert_x32[] = { - "32 32 17 1", - " c None", - "0 c #000000", - "1 c #666666", - "2 c #996600", - "3 c #996633", - "4 c #CC6633", - "5 c #CC9900", - "6 c #CC9933", - "7 c #CC9966", - "8 c #CC9999", - "9 c #CCCC99", - "A c #CCCCCC", - "B c #FFCC00", - "C c #FFCC33", - "D c #FFCCCC", - "E c #FFFFCC", - "F c #FFFFFF", - " 111111111111111111111111 ", - " 1FFFFFFFFFFFFFFFFFFFFFF1 ", - " 1FFFFFFFFFFFFFFFFFFFFFF1 ", - " 1FFFFFFFFFFFFFFFFFFFFFF1 ", - " 1FFFFFFFFFFFFFFFFFFFFFF1 ", - " 1FFFFFFFFFFFFFFFFFFFFFF1 ", - " 1FFFFFFFFFFFFFFFFFFFFFF1 ", - " 1FFFFFFFE7DFFFFFFFFFFFF1 ", - " 1FFFFFF965AFFFFFFFFFFFF1 ", - " 1FFFFE76B59FFFFFFFFFFFF1 ", - " 1FFF96BBBB6328FFFFFFFFF1 ", - " 1FF86BBBBBBBBB68FFFFFFF1 ", - " 1FFF76BBBBBBBBBC7FFFFFF1 ", - " 1FFFFA6BB5266BBBB7FFFFF1 ", - " 1FFFFFF7C5AFA66BBC8FFFF1 ", - " 1FFFFFFF849FFF96BB6DFFF1 ", - " 1FFFFFFFFAAFFFF96BB7FFF1 ", - " 1FFFFFFFFFFFFFFF7BB6FFF1 ", - " 1FFFFFFFFFFFFFFFF6B6AFF1 ", - " 1FFFFFFFFFFFFFFFF7BB7FF1 ", - " 1FFFFFFFFFFFFFFFFD6B3FF1 ", - " 1FFFFFFFFFFFFFFFFF3B3FF1 ", - " 1FFFFFFFFFFFFFFFFF8B6FF1 ", - " 1FFFFFFFFFFFFFFFFFA66DF1 ", - " 1FFFFFFFFFFFFFFFFFD66AF1 ", - " 1FFFFFFFFFFFFFFFFFF87EF1 ", - " 1FFFFFFFFFFFFFFFFFFFFFF1 ", - " 1FFFFFFFFFFFFFFFFFFFFFF1 ", - " 1FFFFFFFFFFFFFFFFFFFFFF1 ", - " 1FFFFFFFFFFFFFFFFFFFFFF1 ", - " 1FFFFFFFFFFFFFFFFFFFFFF1 ", - " 111111111111111111111111 "}; - -static char **doc_revert_xpm[3] = { doc_revert_x16, doc_revert_x24, doc_revert_x32 }; - diff --git a/app/bin/bitmaps/doc-save-as.xpm b/app/bin/bitmaps/doc-save-as.xpm deleted file mode 100644 index 2ded960..0000000 --- a/app/bin/bitmaps/doc-save-as.xpm +++ /dev/null @@ -1,135 +0,0 @@ -static char *doc_save_as_x16[] = { - "16 16 15 1", - " c None", - "0 c #000000", - "1 c #0066FF", - "2 c #333333", - "3 c #333366", - "4 c #336666", - "5 c #666666", - "6 c #666699", - "7 c #669999", - "8 c #6699CC", - "9 c #996666", - "A c #999966", - "B c #9999CC", - "C c #CC9966", - "D c #FFCC66", - " ", - "111111 ", - "11111111 ", - "111111111 ", - " 1111 1 ", - " 111111 95 ", - " 111111 9DC5", - " 1111 9DD9 ", - " 1169DD9 ", - "2222222235DD9222", - "267B67B65CA98772", - "236736735C557442", - "2367367356547442", - "2367367367447442", - "2222222222222222", - " "}; - -static char *doc_save_as_x24[] = { - "24 24 18 1", - " c None", - "0 c #000000", - "1 c #0066FF", - "2 c #333333", - "3 c #333366", - "4 c #336666", - "5 c #666666", - "6 c #666699", - "7 c #669999", - "8 c #6699CC", - "9 c #996666", - "A c #999966", - "B c #9999CC", - "C c #99CCCC", - "D c #CC9966", - "E c #FF9966", - "F c #FFCC66", - "G c #808080", - " ", - " ", - "11111111111 ", - "111111111111 ", - "1111111111111 ", - " 11111 ", - " 1111 ", - " 1111111111 55 ", - " 1111111111 5DA5 ", - " 11111111 5DFFA5", - " 111111 5DFFE9 ", - " 11111 5DFFE9 ", - " 1111 5DFFF9 ", - " 11 5DFFF9 ", - "22222222222225AFFF922222", - "2C7C7C6C7C88GDDAF9C7CC72", - "286B4C0C4B775FFDG4C68862", - "286B4C0C4B775DD9C3C68862", - "286B4C0C4B777574C3C68862", - "286B4C0C4B77B4C3C3C68862", - "287C5C2C5C77C5C4C4C78872", - "222222222222222222222222", - " ", - " "}; - -static char *doc_save_as_x32[] = { - "32 32 19 1", - " c None", - "0 c #000000", - "1 c #0066FF", - "2 c #333333", - "3 c #333366", - "4 c #336666", - "5 c #666666", - "6 c #666699", - "7 c #669999", - "8 c #6699CC", - "9 c #996666", - "A c #999966", - "B c #999999", - "C c #9999CC", - "D c #99CCCC", - "E c #CC9966", - "F c #FF9966", - "G c #FFCC66", - "H c #808080", - " ", - " ", - " 111111 ", - " 1111111111111 ", - " 111111111111111 ", - " 1111111111111111 ", - " 1111111111111111 ", - " 111111 ", - " 11111 ", - " 111 1111 111 5 ", - " 111111111111 5A5 ", - " 111111111111 5EGE5 ", - " 1111111111 5EGGGE5 ", - " 1111111111 5EGGGGF9 ", - " 11111111 5EGGGGF9 ", - " 111111 5EGGGGF9 ", - " 11111 5EGGGGF9 ", - " 1111 5EGGGGF9 ", - " 222222222222222325EGGGGF922222 ", - "2DDDDDDDDDDDDDDDDB9EGGGFHDDDDDD2", - "2D8DD8DD8DD7DD7DBEGEEGFHDD7DD7D2", - "2D4CD4CD4CD3DD3DHFGGEEH2DD0DD0D2", - "2D4CD4CD4CD3DD3DHFGGFHD0DD0DD0D2", - "2D4CD4CD4CD3DD3DHEEE5DD0DD0DD0D2", - "2D4CD4CD4CD3DD3DC57B2DD0DD0DD0D2", - "2D4CD4CD4CD3DD3DD3DD0DD0DD0DD0D2", - "2D4CD4CD4CD3DD3DD3DD0DD0DD0DD0D2", - "2D6DD6DD6DD4DD4DD4DD3DD3DD3DD3D2", - "2DDDDDDDDDDDDDDDDDDDDDDDDDDDDDD2", - "22222222222222222222222222222222", - " ", - " "}; - -static char **doc_save_as_xpm[3] = { doc_save_as_x16, doc_save_as_x24, doc_save_as_x32 }; - diff --git a/app/bin/bitmaps/doc-save.xpm b/app/bin/bitmaps/doc-save.xpm deleted file mode 100644 index f775f95..0000000 --- a/app/bin/bitmaps/doc-save.xpm +++ /dev/null @@ -1,116 +0,0 @@ -static char *doc_save_x16[] = { - "16 16 10 1", - " c None", - "0 c #000000", - "1 c #0066FF", - "2 c #333333", - "3 c #333366", - "4 c #336666", - "5 c #666699", - "6 c #669999", - "7 c #6699CC", - "8 c #9999CC", - " ", - "111111 ", - "11111111 ", - "111111111 ", - " 1111 1 ", - " 111111 ", - " 111111 ", - " 1111 ", - " 11 ", - "2222222232222222", - "2568568567668662", - "2356356356446442", - "2356356356446442", - "2356356356446442", - "2222222222222222", - " "}; - -static char *doc_save_x24[] = { - "24 24 12 1", - " c None", - "0 c #000000", - "1 c #0066FF", - "2 c #333333", - "3 c #333366", - "4 c #336666", - "5 c #666666", - "6 c #666699", - "7 c #669999", - "8 c #6699CC", - "9 c #9999CC", - "A c #99CCCC", - " ", - " ", - "11111111111 ", - "111111111111 ", - "1111111111111 ", - " 11111 ", - " 1111 ", - " 1111111111 ", - " 1111111111 ", - " 11111111 ", - " 111111 ", - " 11111 ", - " 1111 ", - " 11 ", - "222222222222222222222222", - "2A7A7A6A7A88A7A7A7A7AA72", - "28694A0A497794A3A3A68862", - "28694A0A497794A3A3A68862", - "28694A0A497794A3A3A68862", - "28694A0A497794A3A3A68862", - "287A5A2A5A77A5A4A4A78872", - "222222222222222222222222", - " ", - " "}; - -static char *doc_save_x32[] = { - "32 32 11 1", - " c None", - "0 c #000000", - "1 c #0066FF", - "2 c #333333", - "3 c #333366", - "4 c #336666", - "5 c #666699", - "6 c #669999", - "7 c #6699CC", - "8 c #9999CC", - "9 c #99CCCC", - " ", - " ", - " 111111 ", - " 1111111111111 ", - " 111111111111111 ", - " 1111111111111111 ", - " 1111111111111111 ", - " 111111 ", - " 11111 ", - " 111 1111 111 ", - " 111111111111 ", - " 111111111111 ", - " 1111111111 ", - " 1111111111 ", - " 11111111 ", - " 111111 ", - " 11111 ", - " 1111 ", - " 222222222222222322222222222222 ", - "29999999999999999999999999999992", - "29799799799699699699699699699692", - "29489489489399399399099099099092", - "29489489489399399399099099099092", - "29489489489399399399099099099092", - "29489489489399399399099099099092", - "29489489489399399399099099099092", - "29489489489399399399099099099092", - "29599599599499499499399399399392", - "29999999999999999999999999999992", - "22222222222222222222222222222222", - " ", - " "}; - -static char **doc_save_xpm[3] = { doc_save_x16, doc_save_x24, doc_save_x32 }; - diff --git a/app/bin/bitmaps/doc-setup.xpm b/app/bin/bitmaps/doc-setup.xpm deleted file mode 100644 index c6c8e48..0000000 --- a/app/bin/bitmaps/doc-setup.xpm +++ /dev/null @@ -1,110 +0,0 @@ -static char *doc_setup_x16[] = { - "16 16 9 1", - " c None", - "0 c #000000", - "1 c #333333", - "2 c #666666", - "3 c #999999", - "4 c #CCCCCC", - "5 c #FFFFFF", - "6 c #C0C0C0", - "7 c #808080", - "22222222222 ", - "25555555552 ", - "25555555552 ", - "25555555552 ", - "25555555552 ", - "25555555552 ", - "255555552222222 ", - "255555552555552 ", - "255555552555552 ", - "2555555477777777", - "2555554366666667", - "2555554644444443", - "2555554622222223", - "2222227311111723", - " 711111227", - " 1111122 "}; - -static char *doc_setup_x24[] = { - "24 24 9 1", - " c None", - "0 c #000000", - "1 c #333333", - "2 c #666666", - "3 c #999999", - "4 c #CCCCCC", - "5 c #FFFFFF", - "6 c #C0C0C0", - "7 c #808080", - "2222222222222222 ", - "2555555555555552 ", - "2555555555555552 ", - "2555555555555552 ", - "2555555555555552 ", - "2555555555555552 ", - "2555555555555552 ", - "2555555555555552 ", - "2555555555555552 ", - "2555555555552222222222 ", - "2555555555552555555552 ", - "2555555555552555555552 ", - "2555555555552555555552 ", - "2555555555552555555552 ", - "255555555544777777777777", - "255555555576666666666667", - "255555555574444444444443", - "255555555574444444444443", - "255555555574222222222243", - "255555555574277777735243", - "222222222274111111112247", - " 77222222223277", - " 1222222762 ", - " 2222222222 "}; - -static char *doc_setup_x32[] = { - "32 32 9 1", - " c None", - "0 c #000000", - "1 c #333333", - "2 c #666666", - "3 c #999999", - "4 c #CCCCCC", - "5 c #FFFFFF", - "6 c #C0C0C0", - "7 c #808080", - " 22222222222222222222 ", - "2555555555555555555552 ", - "2555555555555555555552 ", - "2555555555555555555552 ", - "2555555555555555555552 ", - "2555555555555555555552 ", - "2555555555555555555552 ", - "2555555555555555555552 ", - "2555555555555555555552 ", - "2555555555555555555552 ", - "2555555555555555555552 ", - "2555555555555555555552 ", - "2555555555555555555552 ", - "255555555555555522222222222222 ", - "255555555555555525555555555552 ", - "255555555555555525555555555552 ", - "255555555555555525555555555552 ", - "255555555555555525555555555552 ", - "255555555555555525555555555552 ", - "25555555555554447777777777777777", - "25555555555556366666666666666667", - "25555555555556644444444444444447", - "25555555555556644444444444444447", - "25555555555556644444444444444447", - "25555555555556642222222222222447", - "25555555555556642444444444555247", - "25555555555556642777777777455247", - " 2222222222227342777777777735247", - " 7772777777777745277", - " 27777777777742 ", - " 21111111125552 ", - " 22222222222222 "}; - -static char **doc_setup_xpm[3] = { doc_setup_x16, doc_setup_x24, doc_setup_x32 }; - diff --git a/app/bin/bitmaps/down.xpm b/app/bin/bitmaps/down.xpm deleted file mode 100644 index 8edaca4..0000000 --- a/app/bin/bitmaps/down.xpm +++ /dev/null @@ -1,89 +0,0 @@ -static char *down_x16[] = { - "8 16 2 1", - " c None", - "0 c #000000", - " ", - " ", - " ", - " ", - " ", - " ", - " 000000 ", - " 000000 ", - " 0000 ", - " 00 ", - " ", - " ", - " ", - " ", - " ", - " "}; - -static char *down_x24[] = { - "12 24 2 1", - " c None", - "0 c #000000", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " 0000000000 ", - " 0000000000 ", - " 0000000000 ", - " 00000000 ", - " 000000 ", - " 0000 ", - " 00 ", - " 0 ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " "}; - -static char *down_x32[] = { - "16 32 2 1", - " c None", - "0 c #000000", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " 0000000000000 ", - " 0000000000000 ", - " 0000000000000 ", - " 000000000000 ", - " 0000000000 ", - " 00000000 ", - " 000000 ", - " 0000 ", - " 000 ", - " 00 ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " "}; - -static char **down_xpm[3] = { down_x16, down_x24, down_x32 }; - diff --git a/app/bin/bitmaps/ease-broad.xpm b/app/bin/bitmaps/ease-broad.xpm deleted file mode 100644 index 646791e..0000000 --- a/app/bin/bitmaps/ease-broad.xpm +++ /dev/null @@ -1,89 +0,0 @@ -/* XPM */ -static char * ease_broad_x16[] = { -"41 16 2 1", -" c None", -"x c #000000000000", -"xxxxx x ", -"x xxx", -"x xx xxx xx xxx xx xx xxx x ", -"xxxx x x x x x x x x x x x x x ", -"x x x xx xxxx x x x xxxx x x x ", -"x x xx x x x x x x x x x ", -"xxxxx x x xxx xxx x x x xxx x x x", -" ", -" xxxx x ", -" x x x ", -" x x xxx xx xx xxx ", -" xxxx x x x x x x x x ", -" x x x x x x x x x ", -" x x x x x x xx x x ", -" xxxx x xx x x xxx ", -" "}; - -static char* ease_broad_x24[] = { -"56 24 2 1", -" c None", -"x c #000000", -" ", -"xxxxxx ", -"xx ", -"xx x ", -"xx xx ", -"xxxx xxxxx xxxxx xxxx xxx xx xxxx xx xx xxxxxx", -"xx xx xx xx xx xx xxxxxxxx xx xx xxx xx xx ", -"xx xx xx xxx xx xx xx xx xx xx xx xx xx xx ", -"xx xx xx xxxx xxxxxx xx xx xx xxxxxx xx xx xx ", -"xx xx xx xx xx xx xx xx xx xx xx xx ", -"xxxxxx xxx x xxxxx xxxxx xx xx xx xxxxx xx xx xxx", -" ", -" xxxxxx xx ", -" xx xx xx ", -" xx xx xx ", -" xx xx xx ", -" xxxxxx xx xxx xxxxx xxxxxx xxxxxx ", -" xx xx xxx xx xx xx xx xx xx xx ", -" xx xx xx xx xx xx xx xx xx xx ", -" xx xx xx xx xx xx xx xx xx ", -" xx xx xx xx xx xx xx xx xx ", -" xxxxxx xx xxxxx xxxx x xxxxxx ", -" ", -" "}; - -static char* ease_broad_x32[] = { -"66 32 2 1", -" c None", -"x c #000000", -" ", -"xxxxxxx ", -"xxxxxxx ", -"xx x ", -"xx xx ", -"xx xx ", -"xxxxx xxxxx xxxxxx xxxx xxxx xxx xxxx xx xx xxxxxx", -"xxxxx xxxxxx xxxxxxx xxxxxx xxxxxxxxxx xxxxxx xxxxxx xxxxxx", -"xx xx xx xxx xx xx xx xx xx xx xx xxx xx xx ", -"xx xx xx xxx xxxxxxx xx xx xx xxxxxxx xx xx xx ", -"xx xx xx xxx xxxxxxx xx xx xx xxxxxxx xx xx xx ", -"xx xx xx xxx xx xx xx xx xx xx xx xx ", -"xxxxxxx xxxxxxx xxxxxxx xxxxxxx xx xx xx xxxxxx xx xx xxxx", -"xxxxxxx xxx xx xxxxxx xxxxxx xx xx xx xxxxxx xx xx xxx", -" ", -" xxxxxxx xx ", -" xxxxxxxx xx ", -" xx xx xx ", -" xx xx xx ", -" xx xx xx ", -" xxxxxxxx xx xxx xxxxxx xxxxxxx xxxxxx ", -" xxxxxxxx xx xxxx xxxxxxxx xxxxxxxx xxxxxxx ", -" xx xx xxx xx xx xx xx xx xx xx ", -" xx xx xx xx xx xx xx xx xx xx ", -" xx xx xx xx xx xx xx xx xx ", -" xx xx xx xx xx xx xx xx xx ", -" xxxxxxxx xx xxxxxxxx xxxxxxxx xxxxxxx ", -" xxxxxxx xx xxxxxx xxxx xx xxxxxx ", -" ", -" ", -" ", -" "}; - -static char **ease_broad_xpm[3] = { ease_broad_x16, ease_broad_x24, ease_broad_x32 }; diff --git a/app/bin/bitmaps/ease-cornu.xpm b/app/bin/bitmaps/ease-cornu.xpm deleted file mode 100644 index 745f436..0000000 --- a/app/bin/bitmaps/ease-cornu.xpm +++ /dev/null @@ -1,96 +0,0 @@ -/* XPM */ -static char * ease_cornu_x16[] = { -"41 16 4 1", -" c None", -"x c #000000", -"# c #009999", -"$ c #FF9900", -"xxxxx x ", -"x xxx", -"x xx xxx xx xxx xx xx xxx x ", -"xxxx x x x x x x x x x x x x x ", -"x x x xx xxxx x x x xxxx x x x ", -"x x x x x x x x x x x x ", -"xxxxx xxx xxx xxx x x x xxx x x x", -" ", -" $$$ ### $$$$$ ", -" $ $ # # $$$$ $ ", -" $ $ $# ## ### ###$$# # $$$ $ ", -"$ $ $ # # # #$$#$# # # #$ $ $", -"$ $ $# #$$#$# # # # # $ $ $", -" $ $$$ # $#$# # # # # # #$ $ $ ", -" $ $### ## # # # ## $ $ ", -" $$$$$ $$$ "}; - -static char* ease_cornu_x24[] = { -"56 24 4 1", -" c None", -"x c #000000", -"# c #009999", -"- c #FF9900", -" ", -"xxxxxx ", -"xx ", -"xx x ", -"xx xx ", -"xxxx xxxxx xxxxx xxxx xxx xx xxxx xx xx xxxxxx", -"xx xx xx xx xx xx xxxxxxxx xx xx xxx xx xx ", -"xx xx xx xxx xx xx xx xx xx xx xx xx xx xx ", -"xx xx xx xxxx xxxxxx xx xx xx xxxxxx xx xx xx ", -"xx xx xx xx xx xx xx xx xx xx xx xx ", -"xxxxxx xxx x xxxxx xxxxx xx xx xx xxxxx xx xx xxx", -" --- ", -" ------ ##### ", -" --- -## ## ----- ", -" -- --- ## ----------- ", -" -- ---- ## ------ --- ", -" -- ---- ## ##### ## ### -##-### ## ## - -- ", -" -- ---- ## ## ## ###--##-### ## ## ## -- -- ", -" --- --- ## ## -##-##-- ## ## ## ## --- -- ", -" --- ## ## ##---## ## ## ## ## ## -- -- ", -" ----- #####---##### ## ## ## #### # --- ", -" ----- ------- ", -" ----- ", -" "}; - -static char* ease_cornu_x32[] = { -"66 32 4 1", -" c None", -"x c #000000", -"# c #009999", -"- c #FF9900", -" ", -"xxxxxxx ", -"xxxxxxx ", -"xx x ", -"xx xx ", -"xx xx ", -"xxxxx xxxxx xxxxxx xxxx xxxx xxx xxxx xx xx xxxxxx", -"xxxxx xxxxxx xxxxxxx xxxxxx xxxxxxxxxx xxxxxx xxxxxx xxxxxx", -"xx xx xx xxx xx xx xx xxx xxx xx xx xxx xx xx ", -"xx xx xx xxx xxxxxxx xx xx xx xxxxxxx xx xx xx ", -"xx xx xx xxx xxxxxxx xx xx xx xxxxxxx xx xx xx ", -"xx xx xx xxx xx xx xx xx xx xx xx xx ", -"xxxxxxx xxxxxxx xxxxxxx xxxxxxx xx xx xx xxxxxx xx xx xxxx", -"xxxxxxx xxx xx xxxxxx xxxxxx xx xx xx xxxxxx xx xx xxx", -" ", -" ----- ###### ", -" ------ ######## ", -" -- ## ## -------- ", -" -- ----## ------------- ", -" -- ----##-- ###### ## ### ## #### ## ## ---- ", -" -- -----## -- ######## ######## ######## ## ## --- ", -" -- -----## -- ## ## ### ## ### - ## ## ##-- -- ", -" -- -----## - ## ## ## -- ## -- ## ## ##--- -- ", -" -- ----## ## ## ## ----- ## ## ## ##---- -- ", -" -- ---## ## ## ## ## --- ## ## ## -##---- -- ", -" -- ######## ######## ## ## ## ########---- -- ", -" --- ###### - ###### ## ## ## ##### #---- --- ", -" ---- -------- -- ---- -- ", -" ------------ --- --- ", -" --- ---- ---- ", -" ------ ", -" "}; - -static char **ease_cornu_xpm[3] = { ease_cornu_x16, ease_cornu_x24, ease_cornu_x32 }; - diff --git a/app/bin/bitmaps/ease-gt-broad.xpm b/app/bin/bitmaps/ease-gt-broad.xpm deleted file mode 100644 index b2dc1cc..0000000 --- a/app/bin/bitmaps/ease-gt-broad.xpm +++ /dev/null @@ -1,89 +0,0 @@ -/* XPM */ -static char * ease_gtbroad_x16[] = { -"41 16 2 1", -" c None", -"x c #000000000000", -"xxxxx x ", -"x xxx", -"x xx xxx xx xxx xx xx xxx x ", -"xxxx x x x x x x x x x x x x x ", -"x x x xx xxxx x x x xxxx x x x ", -"x x xx x x x x x x x x x ", -"xxxxx x x xxx xxx x x x xxx x x x", -" ", -" ", -" x xxxx x ", -" x x x x ", -" x x x xxx xx xx xxx ", -" x xxxx x x x x x x x x ", -" x x x x x x x x x x ", -" x x x x x x x xx x x ", -" x xxxx x xx xx x xx "}; - -static char* ease_gtbroad_x24[] = { -"56 24 2 1", -" c None", -"x c #000000", -" ", -"xxxxxx ", -"xx ", -"xx x ", -"xx xx ", -"xxxx xxxxx xxxxx xxxx xxx xx xxxx xx xx xxxxxx", -"xx xx xx xx xx xx xxxxxxxx xx xx xxx xx xx ", -"xx xx xx xxx xx xx xx xx xx xx xx xx xx xx ", -"xx xx xx xxxx xxxxxx xx xx xx xxxxxx xx xx xx ", -"xx xx xx xx xx xx xx xx xx xx xx xx ", -"xxxxxx xxx x xxxxx xxxxx xx xx xx xxxxx xx xx xxx", -" ", -" xx xxxxxx xx ", -" xx xx xx xx ", -" xx xx xx xx ", -" xx xx xx xx ", -" xx xxxxxx xx xxx xxxxx xxxxxx xxxxxx ", -" xx xx xx xxx xx xx xx xx xx xx xx ", -" xx xx xx xx xx xx xx xx xx xx xx ", -" xx xx xx xx xx xx xx xx xx xx ", -" xx xx xx xx xx xx xx xx xx xx ", -" xx xxxxxx xx xxxxx xxxx x xxxxxx ", -" ", -" "}; - -static char* ease_gtbroad_x32[] = { -"66 32 2 1", -" c None", -"x c #000000", -" ", -"xxxxxxx ", -"xxxxxxx ", -"xx x ", -"xx xx ", -"xx xx ", -"xxxxx xxxxx xxxxxx xxxx xxxx xxx xxxx xx xx xxxxxx", -"xxxxx xxxxxx xxxxxxx xxxxxx xxxxxxxxxx xxxxxx xxxxxx xxxxxx", -"xx xx xx xxx xx xx xx xxx xxx xx xx xxx xx xx ", -"xx xx xx xxx xxxxxxx xx xx xx xxxxxxx xx xx xx ", -"xx xx xx xxx xxxxxxx xx xx xx xxxxxxx xx xx xx ", -"xx xx xx xxx xx xx xx xx xx xx xx xx ", -"xxxxxxx xxxxxxx xxxxxxx xxxxxxx xx xx xx xxxxxx xx xx xxxx", -"xxxxxxx xxx xx xxxxxx xxxxxx xx xx xx xxxxxx xx xx xxx", -" ", -" xx xxxxxxx xx ", -" xx xxxxxxxx xx ", -" xx xx xx xx ", -" xx xx xx xx ", -" xx xx xx xx ", -" xx xxxxxxxx xx xxx xxxxxx xxxxxxx xxxxxx ", -" xx xxxxxxxx xx xxxx xxxxxxxx xxxxxxxx xxxxxxx ", -" xx xx xx xxx xx xx xx xx xx xx xx ", -" xx xx xx xx xx xx xx xx xx xx xx ", -" xx xx xx xx xx xx xx xx xx xx ", -" xx xx xx xx xx xx xx xx xx xx ", -" xx xxxxxxxx xx xxxxxxxx xxxxxxxx xxxxxxx ", -" xx xxxxxxx xx xxxxxx xxxx xx xxxxxx ", -" ", -" ", -" ", -" "}; - -static char **ease_gtbroad_xpm[3] = { ease_gtbroad_x16, ease_gtbroad_x24, ease_gtbroad_x32 }; diff --git a/app/bin/bitmaps/ease-gt-sharp.xpm b/app/bin/bitmaps/ease-gt-sharp.xpm deleted file mode 100644 index bd12492..0000000 --- a/app/bin/bitmaps/ease-gt-sharp.xpm +++ /dev/null @@ -1,89 +0,0 @@ -/* XPM */ -static char * ease_gtsharp_x16[] = { -"41 16 2 1", -" c None", -"x c #000000000000", -"xxxxx x ", -"x xxx", -"x xx xxx xx xxx xx xx xxx x ", -"xxxx x x x x x x x x x x x x x ", -"x x x xx xxxx x x x xxxx x x x ", -"x x xx x x x x x x x x x ", -"xxxxx x x xxx xxx x x x xxx x x x", -" ", -" x xxxxx x ", -" x x x ", -" x x xxx xx xxx xxx ", -" x xxxxx x x x x x x x x ", -" x x x x x x x x x ", -" x x x x x xx x xxx ", -" x xxxxx x x x x x x ", -" x "}; - -static char* ease_gtsharp_x24[] = { -"56 24 2 1", -" c None", -"x c #000000", -" ", -"xxxxxx ", -"xx ", -"xx x ", -"xx xx ", -"xxxx xxxxx xxxxx xxxx xxx xx xxxx xx xx xxxxxx", -"xx xx xx xx xx xx xxxxxxxx xx xx xxx xx xx ", -"xx xx xx xxx xx xx xx xx xx xx xx xx xx xx ", -"xx xx xx xxxx xxxxxx xx xx xx xxxxxx xx xx xx ", -"xx xx xx xx xx xx xx xx xx xx xx xx ", -"xxxxxx xxx x xxxxx xxxxx xx xx xx xxxxx xx xx xxx", -" ", -" xx xxxxxx xx ", -" xx xx xx ", -" xx xx xx ", -" xx xx xx ", -" xx xxxxx xx xxx xxxxxx xx xxx xxxxxx ", -" xx xx xxx xx xx xx xxx xx xx xx ", -" xx xx xx xx xx xx xx xx xx ", -" xx xx xx xx xx xx xx xx xx ", -" xx xx xx xx xx xx xx xxx xx ", -" xx xxxxxx xx xx xxxx x xx xx xxx ", -" xx ", -" xx "}; - -static char* ease_gtsharp_x32[] = { -"66 32 2 1", -" c None", -"x c #000000", -" ", -"xxxxxxx ", -"xxxxxxx ", -"xx x ", -"xx xx ", -"xx xx ", -"xxxxx xxxxx xxxxxx xxxx xxxx xxx xxxx xx xx xxxxxx", -"xxxxx xxxxxx xxxxxxx xxxxxx xxxxxxxxxx xxxxxx xxxxxx xxxxxx", -"xx xx xx xxx xx xx xx xxx xxx xx xx xxx xx xx ", -"xx xx xx xxx xxxxxxx xx xx xx xxxxxxx xx xx xx ", -"xx xx xx xxx xxxxxxx xx xx xx xxxxxxx xx xx xx ", -"xx xx xx xxx xx xx xx xx xx xx xx xx ", -"xxxxxxx xxxxxxx xxxxxxx xxxxxxx xx xx xx xxxxxx xx xx xxxx", -"xxxxxxx xxx xx xxxxxx xxxxxx xx xx xx xxxxxx xx xx xxx", -" ", -" xx xxxxxxx xx ", -" xx xxxxxxxx xx ", -" xx xx xx ", -" xx xx xx ", -" xx xx xx ", -" xx xxxxxx xx xxx xxxxxxx xx xxx xxxxxx ", -" xx xxxxxx xxxxxxx xxxxxxxx xx xxxx xxxxxxx ", -" xx xx xxx xx xx xx xxx xx xx xx ", -" xx xx xx xx xx xx xx xx xx xx ", -" xx xx xx xx xx xx xx xx xx ", -" xx xx xx xx xx xx xx xx xx ", -" xx xxxxxxxx xx xx xxxxxxxx xx xxxxxxxx ", -" xx xxxxxxx xx xx xxxx xx xx xxxxxxx ", -" xx ", -" xx ", -" xx ", -" "}; - -static char **ease_gtsharp_xpm[3] = { ease_gtsharp_x16, ease_gtsharp_x24, ease_gtsharp_x32 }; diff --git a/app/bin/bitmaps/ease-lt-broad.xpm b/app/bin/bitmaps/ease-lt-broad.xpm deleted file mode 100644 index ab043ee..0000000 --- a/app/bin/bitmaps/ease-lt-broad.xpm +++ /dev/null @@ -1,89 +0,0 @@ -/* XPM */ -static char * ease_ltbroad_x16[] = { -"41 16 2 1", -" c None", -"x c #000000000000", -"xxxxx x ", -"x xxx", -"x xx xxx xx xxx xx xx xxx x ", -"xxxx x x x x x x x x x x x x x ", -"x x x xx xxxx x x x xxxx x x x ", -"x x xx x x x x x x x x x ", -"xxxxx x x xxx xxx x x x xxx x x x", -" ", -" ", -" x xxxx x ", -" x x x x ", -" x x x xxx xx xx xxx ", -" x xxxx x x x x x x x x ", -" x x x x x x x x x x ", -" x x x x x x x xx x x ", -" x xxxx x xx xx x xx "}; - -static char* ease_ltbroad_x24[] = { -"56 24 2 1", -" c None", -"x c #000000", -" ", -"xxxxxx ", -"xx ", -"xx x ", -"xx xx ", -"xxxx xxxxx xxxxx xxxx xxx xx xxxx xx xx xxxxxx", -"xx xx xx xx xx xx xxxxxxxx xx xx xxx xx xx ", -"xx xx xx xxx xx xx xx xx xx xx xx xx xx xx ", -"xx xx xx xxxx xxxxxx xx xx xx xxxxxx xx xx xx ", -"xx xx xx xx xx xx xx xx xx xx xx xx ", -"xxxxxx xxx x xxxxx xxxxx xx xx xx xxxxx xx xx xxx", -" ", -" xx xxxxxx xx ", -" xx xx xx xx ", -" xx xx xx xx ", -" xx xx xx xx ", -" xx xxxxxx xx xxx xxxxx xxxxxx xxxxxx ", -" xx xx xx xxx xx xx xx xx xx xx xx ", -" xx xx xx xx xx xx xx xx xx xx xx ", -" xx xx xx xx xx xx xx xx xx xx ", -" xx xx xx xx xx xx xx xx xx xx ", -" xx xxxxxx xx xxxxx xxxx x xxxxxx ", -" ", -" "}; - -static char* ease_ltbroad_x32[] = { -"66 32 2 1", -" c None", -"x c #000000", -" ", -"xxxxxxx ", -"xxxxxxx ", -"xx x ", -"xx xx ", -"xx xx ", -"xxxxx xxxxx xxxxxx xxxx xxxx xxx xxxx xx xx xxxxxx", -"xxxxx xxxxxx xxxxxxx xxxxxx xxxxxxxxxx xxxxxx xxxxxx xxxxxx", -"xx xx xx xxx xx xx xx xxx xxx xx xx xxx xx xx ", -"xx xx xx xxx xxxxxxx xx xx xx xxxxxxx xx xx xx ", -"xx xx xx xxx xxxxxxx xx xx xx xxxxxxx xx xx xx ", -"xx xx xx xxx xx xx xx xx xx xx xx xx ", -"xxxxxxx xxxxxxx xxxxxxx xxxxxxx xx xx xx xxxxxx xx xx xxxx", -"xxxxxxx xxx xx xxxxxx xxxxxx xx xx xx xxxxxx xx xx xxx", -" ", -" xx xxxxxxx xx ", -" xx xxxxxxxx xx ", -" xx xx xx xx ", -" xx xx xx xx ", -" xx xx xx xx ", -" xx xxxxxxxx xx xxx xxxxxx xxxxxxx xxxxxx ", -" xx xxxxxxxx xx xxxx xxxxxxxx xxxxxxxx xxxxxxx ", -" xx xx xx xxx xx xx xx xx xx xx xx ", -" xx xx xx xx xx xx xx xx xx xx xx ", -" xx xx xx xx xx xx xx xx xx xx ", -" xx xx xx xx xx xx xx xx xx xx ", -" xx xxxxxxxx xx xxxxxxxx xxxxxxxx xxxxxxx ", -" xx xxxxxxx xx xxxxxx xxxx xx xxxxxx ", -" ", -" ", -" ", -" "}; - -static char **ease_ltbroad_xpm[3] = { ease_ltbroad_x16, ease_ltbroad_x24, ease_ltbroad_x32 }; diff --git a/app/bin/bitmaps/ease-lt-sharp.xpm b/app/bin/bitmaps/ease-lt-sharp.xpm deleted file mode 100644 index 93faf60..0000000 --- a/app/bin/bitmaps/ease-lt-sharp.xpm +++ /dev/null @@ -1,89 +0,0 @@ -/* XPM */ -static char * ease_ltsharp_x16[] = { -"41 16 2 1", -" c None", -"x c #000000000000", -"xxxxx x ", -"x xxx", -"x xx xxx xx xxx xx xx xxx x ", -"xxxx x x x x x x x x x x x x x ", -"x x x xx xxxx x x x xxxx x x x ", -"x x xx x x x x x x x x x ", -"xxxxx x x xxx xxx x x x xxx x x x", -" ", -" x xxxxx x ", -" x x x ", -" x x xxx xx xxx xxx ", -" x xxxxx x x x x x x x x ", -" x x x x x x x x x ", -" x x x x x xx x xxx ", -" x xxxxx x x x x x x ", -" x "}; - -static char* ease_ltsharp_x24[] = { -"56 24 2 1", -" c None", -"x c #000000", -" ", -"xxxxxx ", -"xx ", -"xx x ", -"xx xx ", -"xxxx xxxxx xxxxx xxxx xxx xx xxxx xx xx xxxxxx", -"xx xx xx xx xx xx xxxxxxxx xx xx xxx xx xx ", -"xx xx xx xxx xx xx xx xx xx xx xx xx xx xx ", -"xx xx xx xxxx xxxxxx xx xx xx xxxxxx xx xx xx ", -"xx xx xx xx xx xx xx xx xx xx xx xx ", -"xxxxxx xxx x xxxxx xxxxx xx xx xx xxxxx xx xx xxx", -" ", -" xx xxxxxx xx ", -" xx xx xx ", -" xx xx xx ", -" xx xx xx ", -" xx xxxxx xx xxx xxxxxx xx xxx xxxxxx ", -" xx xx xxx xx xx xx xxx xx xx xx ", -" xx xx xx xx xx xx xx xx xx ", -" xx xx xx xx xx xx xx xx xx ", -" xx xx xx xx xx xx xx xxx xx ", -" xx xxxxxx xx xx xxxx x xx xx xxx ", -" xx ", -" xx "}; - -static char* ease_ltsharp_x32[] = { -"66 32 2 1", -" c None", -"x c #000000", -" ", -"xxxxxxx ", -"xxxxxxx ", -"xx x ", -"xx xx ", -"xx xx ", -"xxxxx xxxxx xxxxxx xxxx xxxx xxx xxxx xx xx xxxxxx", -"xxxxx xxxxxx xxxxxxx xxxxxx xxxxxxxxxx xxxxxx xxxxxx xxxxxx", -"xx xx xx xxx xx xx xx xxx xxx xx xx xxx xx xx ", -"xx xx xx xxx xxxxxxx xx xx xx xxxxxxx xx xx xx ", -"xx xx xx xxx xxxxxxx xx xx xx xxxxxxx xx xx xx ", -"xx xx xx xxx xx xx xx xx xx xx xx xx ", -"xxxxxxx xxxxxxx xxxxxxx xxxxxxx xx xx xx xxxxxx xx xx xxxx", -"xxxxxxx xxx xx xxxxxx xxxxxx xx xx xx xxxxxx xx xx xxx", -" ", -" xx xxxxxxx xx ", -" xx xxxxxxxx xx ", -" xx xx xx ", -" xx xx xx ", -" xx xx xx ", -" xx xxxxxx xx xxx xxxxxxx xx xxx xxxxxx ", -" xx xxxxxx xxxxxxx xxxxxxxx xx xxxx xxxxxxx ", -" xx xx xxx xx xx xx xxx xx xx xx ", -" xx xx xx xx xx xx xx xx xx xx ", -" xx xx xx xx xx xx xx xx xx ", -" xx xx xx xx xx xx xx xx xx ", -" xx xxxxxxxx xx xx xxxxxxxx xx xxxxxxxx ", -" xx xxxxxxx xx xx xxxx xx xx xxxxxxx ", -" xx ", -" xx ", -" xx ", -" "}; - -static char **ease_ltsharp_xpm[3] = { ease_ltsharp_x16, ease_ltsharp_x24, ease_ltsharp_x32 }; diff --git a/app/bin/bitmaps/ease-none.xpm b/app/bin/bitmaps/ease-none.xpm deleted file mode 100644 index b2fe985..0000000 --- a/app/bin/bitmaps/ease-none.xpm +++ /dev/null @@ -1,89 +0,0 @@ -/* XPM */ -static char * ease_none_x16[] = { -"41 16 2 1", -" c None", -"x c #000000000000", -"xxxxx x ", -"x xxx", -"x xx xxx xx xxx xx xx xxx x ", -"xxxx x x x x x x x x x x x x x ", -"x x x xx xxxx x x x xxxx x x x ", -"x x x x x x x x x x x x ", -"xxxxx xxx xxx xxx x x x xxx x x x", -" ", -" x x ", -" xx x ", -" xxx x xx xxx xx ", -" x x x x x x x x x ", -" x xxx x x x x xxx ", -" x xx x x x x x ", -" x x xx x x xxx ", -" "}; - -static char* ease_none_x24[] = { -"56 24 2 1", -" c None", -"x c #000000", -" ", -"xxxxxx ", -"xx ", -"xx x ", -"xx xx ", -"xxxx xxxxx xxxxx xxxx xxx xx xxxx xx xx xxxxxx", -"xx xx xx xx xx xx xxxxxxxx xx xx xxx xx xx ", -"xx xx xx xxx xx xx xx xx xx xx xx xx xx xx ", -"xx xx xx xxxx xxxxxx xx xx xx xxxxxx xx xx xx ", -"xx xx xx xx xx xx xx xx xx xx xx xx ", -"xxxxxx xxx x xxxxx xxxxx xx xx xx xxxxx xx xx xxx", -" ", -" xx xx ", -" xx xx ", -" xxx xx ", -" xxxx xx ", -" xxxxxxx xxxxx xx xxx xxxxx ", -" xx xxxx xx xx xxx xx xx xx ", -" xx xxx xx xx xx xx xx xx ", -" xx xx xx xx xx xx xxxxxxx ", -" xx xx xx xx xx xx xx ", -" xx xx xxxxx xx xx xxxxxx ", -" ", -" "}; - -static char* ease_none_x32[] = { -"66 32 2 1", -" c None", -"x c #000000", -" ", -"xxxxxxx ", -"xxxxxxx ", -"xx x ", -"xx xx ", -"xx xx ", -"xxxxx xxxxx xxxxxx xxxx xxxx xxx xxxx xx xx xxxxxx", -"xxxxx xxxxxx xxxxxxx xxxxxx xxxxxxxxxx xxxxxx xxxxxx xxxxxx", -"xx xx xx xxx xx xx xx xxx xxx xx xx xxx xx xx ", -"xx xx xx xxx xxxxxxx xx xx xx xxxxxxx xx xx xx ", -"xx xx xx xxx xxxxxxx xx xx xx xxxxxxx xx xx xx ", -"xx xx xx xxx xx xx xx xx xx xx xx xx ", -"xxxxxxx xxxxxxx xxxxxxx xxxxxxx xx xx xx xxxxxx xx xx xxxx", -"xxxxxxx xxx xx xxxxxx xxxxxx xx xx xx xxxxxx xx xx xxx", -" ", -" xx xx ", -" xx xx ", -" xx xx ", -" xxx xx ", -" xxxx xx ", -" xxxxx xx xxxxxx xx xxxx xxxxxx ", -" xx xxx xx xxxxxxxx xxxxxxxx xxxxxxxx ", -" xx xxxxx xx xx xxx xx xx xx ", -" xx xxxx xx xx xx xx xxxxxxxx ", -" xx xxx xx xx xx xx xxxxxxxx ", -" xx xx xx xx xx xx xx ", -" xx xx xxxxxxxx xx xx xxxxxxxx ", -" xx xx xxxxxx xx xx xxxxxxx ", -" ", -" ", -" ", -" "}; - -static char **ease_none_xpm[3] = { ease_none_x16, ease_none_x24, ease_none_x32 }; diff --git a/app/bin/bitmaps/ease-normal.xpm b/app/bin/bitmaps/ease-normal.xpm deleted file mode 100644 index 411a036..0000000 --- a/app/bin/bitmaps/ease-normal.xpm +++ /dev/null @@ -1,89 +0,0 @@ -/* XPM */ -static char * ease_normal_x16[] = { -"41 16 2 1", -" c None", -"x c #000000000000", -"xxxxx x ", -"x xxx", -"x xx xxx xx xxx xx xx xxx x ", -"xxxx x x x x x x x x x x x x x ", -"x x x xx xxxx x x x xxxx x x x ", -"x x x x x x x x x x x x ", -"xxxxx xxx xxx xxx x x x xxx x x x", -" ", -" x x x ", -" xx x x ", -" xxx x xx xxx xxx xx xx x ", -" x x x x x x x x x x x x x ", -" x xxx x x x x x x x x x ", -" x xx x x x x x x x x x ", -" x x xx x x x x xxx x ", -" "}; - -static char* ease_normal_x24[] = { -"56 24 2 1", -" c None", -"x c #000000", -" ", -"xxxxxx ", -"xx ", -"xx x ", -"xx xx ", -"xxxx xxxxx xxxxx xxxx xxx xx xxxx xx xx xxxxxx", -"xx xx xx xx xx xx xxxxxxxx xx xx xxx xx xx ", -"xx xx xx xxx xx xx xx xx xx xx xx xx xx xx ", -"xx xx xx xxxx xxxxxx xx xx xx xxxxxx xx xx xx ", -"xx xx xx xx xx xx xx xx xx xx xx xx ", -"xxxxxx xxx x xxxxx xxxxx xx xx xx xxxxx xx xx xxx", -" ", -" xx xx xx ", -" xx xx xx ", -" xxx xx xx ", -" xxxx xx xx ", -" xxxxxxx xxxxx xx xxx xx xx xx xxxxxx xx ", -" xx xxxx xx xx xxx xx xxxxxxxx xx xx xx ", -" xx xxx xx xx xx xx xx xx xx xx xx ", -" xx xx xx xx xx xx xx xx xx xx xx ", -" xx xx xx xx xx xx xx xx xx xx xx ", -" xx xx xxxxx xx xx xx xx xxxx x xx ", -" ", -" "}; - -static char* ease_normal_x32[] = { -"66 32 2 1", -" c None", -"x c #000000", -" ", -"xxxxxxx ", -"xxxxxxx ", -"xx x ", -"xx xx ", -"xx xx ", -"xxxxx xxxxx xxxxxx xxxx xxxx xxx xxxx xx xx xxxxxx", -"xxxxx xxxxxx xxxxxxx xxxxxx xxxxxxxxxx xxxxxx xxxxxx xxxxxx", -"xx xx xx xxx xx xx xx xxx xxx xx xx xxx xx xx ", -"xx xx xx xxx xxxxxxx xx xx xx xxxxxxx xx xx xx ", -"xx xx xx xxx xxxxxxx xx xx xx xxxxxxx xx xx xx ", -"xx xx xx xxx xx xx xx xx xx xx xx xx ", -"xxxxxxx xxxxxxx xxxxxxx xxxxxxx xx xx xx xxxxxx xx xx xxxx", -"xxxxxxx xxx xx xxxxxx xxxxxx xx xx xx xxxxxx xx xx xxx", -" ", -" xx xx xx ", -" xx xx xx ", -" xx xx xx ", -" xxx xx xx ", -" xxxx xx xx ", -" xxxxx xx xxxxxx xx xxx xx xx xx xxxxxxx xx ", -" xx xxx xx xxxxxxxx xxxxxxx xxxxxxxxxx xxxxxxxx xx ", -" xx xxxxx xx xx xxx xx xx xxx xxx xx xx xx ", -" xx xxxx xx xx xx xx xx xx xx xx xx ", -" xx xxx xx xx xx xx xx xx xx xx xx ", -" xx xx xx xx xx xx xx xx xx xx xx ", -" xx xx xxxxxxxx xx xx xx xx xxxxxxxx xxx ", -" xx xx xxxxxx xx xx xx xx xxxx xx xxx ", -" ", -" ", -" ", -" "}; - -static char **ease_normal_xpm[3] = { ease_normal_x16, ease_normal_x24, ease_normal_x32 }; diff --git a/app/bin/bitmaps/ease-sharp.xpm b/app/bin/bitmaps/ease-sharp.xpm deleted file mode 100644 index 05c5c3b..0000000 --- a/app/bin/bitmaps/ease-sharp.xpm +++ /dev/null @@ -1,89 +0,0 @@ -/* XPM */ -static char * ease_sharp_x16[] = { -"41 16 2 1", -" c None", -"x c #000000000000", -"xxxxx x ", -"x xxx", -"x xx xxx xx xxx xx xx xxx x ", -"xxxx x x x x x x x x x x x x x ", -"x x x xx xxxx x x x xxxx x x x ", -"x x xx x x x x x x x x x ", -"xxxxx x x xxx xxx x x x xxx x x x", -" ", -" xxxxx x ", -" x x ", -" x xxx xx xxx xxx ", -" xxxx x x x x x x x x ", -" x x x x x x x x ", -" x x x x xx x xxx ", -" xxxxx x x x x x x ", -" x "}; - -static char* ease_sharp_x24[] = { -"56 24 2 1", -" c None", -"x c #000000", -" ", -"xxxxxx ", -"xx ", -"xx x ", -"xx xx ", -"xxxx xxxxx xxxxx xxxx xxx xx xxxx xx xx xxxxxx", -"xx xx xx xx xx xx xxxxxxxx xx xx xxx xx xx ", -"xx xx xx xxx xx xx xx xx xx xx xx xx xx xx ", -"xx xx xx xxxx xxxxxx xx xx xx xxxxxx xx xx xx ", -"xx xx xx xx xx xx xx xx xx xx xx xx ", -"xxxxxx xxx x xxxxx xxxxx xx xx xx xxxxx xx xx xxx", -" ", -" xxxxxx xx ", -" xx xx ", -" xx xx ", -" xx xx ", -" xxxxx xx xxx xxxxxx xx xxx xxxxxx ", -" xx xxx xx xx xx xxx xx xx xx ", -" xx xx xx xx xx xx xx xx ", -" xx xx xx xx xx xx xx xx ", -" xx xx xx xx xx xx xxx xx ", -" xxxxxx xx xx xxxx x xx xx xxx ", -" xx ", -" xx "}; - -static char* ease_sharp_x32[] = { -"66 32 2 1", -" c None", -"x c #000000", -" ", -"xxxxxxx ", -"xxxxxxx ", -"xx x ", -"xx xx ", -"xx xx ", -"xxxxx xxxxx xxxxxx xxxx xxxx xxx xxxx xx xx xxxxxx", -"xxxxx xxxxxx xxxxxxx xxxxxx xxxxxxxxxx xxxxxx xxxxxx xxxxxx", -"xx xx xx xxx xx xx xx xxx xxx xx xx xxx xx xx ", -"xx xx xx xxx xxxxxxx xx xx xx xxxxxxx xx xx xx ", -"xx xx xx xxx xxxxxxx xx xx xx xxxxxxx xx xx xx ", -"xx xx xx xxx xx xx xx xx xx xx xx xx ", -"xxxxxxx xxxxxxx xxxxxxx xxxxxxx xx xx xx xxxxxx xx xx xxxx", -"xxxxxxx xxx xx xxxxxx xxxxxx xx xx xx xxxxxx xx xx xxx", -" ", -" xxxxxxx xx ", -" xxxxxxxx xx ", -" xx xx ", -" xx xx ", -" xx xx ", -" xxxxxx xx xxx xxxxxxx xx xxx xxxxxx ", -" xxxxxx xxxxxxx xxxxxxxx xx xxxx xxxxxxx ", -" xx xxx xx xx xx xxx xx xx xx ", -" xx xx xx xx xx xx xx xx xx ", -" xx xx xx xx xx xx xx xx ", -" xx xx xx xx xx xx xx xx ", -" xxxxxxxx xx xx xxxxxxxx xx xxxxxxxx ", -" xxxxxxx xx xx xxxx xx xx xxxxxxx ", -" xx ", -" xx ", -" xx ", -" "}; - -static char **ease_sharp_xpm[3] = { ease_sharp_x16, ease_sharp_x24, ease_sharp_x32 }; diff --git a/app/bin/bitmaps/elevation.xpm b/app/bin/bitmaps/elevation.xpm deleted file mode 100644 index ab65147..0000000 --- a/app/bin/bitmaps/elevation.xpm +++ /dev/null @@ -1,117 +0,0 @@ -static char *elevation_x16[] = { - "16 16 5 1", - " c None", - "0 c #000000", - "1 c #CC0000", - "2 c #CC6600", - "3 c #FF0000", - " ", - " 1 11111 ", - " 131 33 ", - " 13331 33 ", - " 1 33 ", - " 1 33 ", - " 1 11111 ", - " 1 ", - " ", - " 2 2 2 2 2 2 2 ", - " 00000000000000 ", - " 2 2 2 2 2 2 2 ", - " 00000000000000 ", - " 2 2 2 2 2 2 2 ", - " ", - " "}; - -static char *elevation_x24[] = { - "24 24 14 1", - " c None", - "0 c #000000", - "1 c #663300", - "2 c #666600", - "3 c #996600", - "4 c #996633", - "5 c #CC0000", - "6 c #CC3300", - "7 c #CC6600", - "8 c #CC6633", - "9 c #CC9933", - "A c #FF6633", - "B c #FF9933", - "C c #FFCC33", - " ", - " ", - " 5555555 ", - " 55555555 ", - " 555 ", - " 55 555 ", - " 5555 555 ", - " 555555 55 ", - " 5555555 555 ", - " 5 55 5 55555555 ", - " 55 55555555 ", - " 55 ", - " 55 ", - " 55 ", - " 55 ", - " 440440345640180090081 ", - " 0440440345640180090081 ", - " BB BB BC57C C C C ", - " BB BB BC5AC C C C ", - " BB BB BC C C C C ", - " 440440340240180090081 ", - " 0440440340240180090081 ", - " ", - " "}; - -static char *elevation_x32[] = { - "32 32 15 1", - " c None", - "0 c #000000", - "1 c #333300", - "2 c #663300", - "3 c #666600", - "4 c #990000", - "5 c #996600", - "6 c #996633", - "7 c #CC0000", - "8 c #CC3300", - "9 c #CC6600", - "A c #CC6633", - "B c #CC9933", - "C c #FF9933", - "D c #FFCC33", - " ", - " ", - " ", - " 777777777 ", - " 777777777 ", - " 777 ", - " 777 ", - " 77 7777 ", - " 7777 777 ", - " 777777 777 ", - " 77777777 777 ", - " 777777777 777 ", - " 77 777 77 7777777777 ", - " 777 7777777777 ", - " 777 7777777777 ", - " 777 ", - " 777 ", - " 777 ", - " 777 ", - " 777 ", - " BB BB 6B778B B B5 B6 ", - " 02200220013474500050005100310 ", - " DC CC D778D D D D ", - " DC CC D778D D D D ", - " DC CC D779D D D D ", - " DC CC D D D D D ", - " DC CC D D D D D ", - " 06500660036002A000B000A200630 ", - " 06500660036002A000B000A200630 ", - " D D D C D D ", - " ", - " "}; - -static char **elevation_xpm[3] = { elevation_x16, elevation_x24, elevation_x32 }; - diff --git a/app/bin/bitmaps/exit.xpm b/app/bin/bitmaps/exit.xpm deleted file mode 100644 index 7daf3ab..0000000 --- a/app/bin/bitmaps/exit.xpm +++ /dev/null @@ -1,94 +0,0 @@ -static char *exit_x16[] = { - "16 16 3 1", - " c None", - "0 c #000000", - "1 c #FF0000", - " ", - " 1 ", - " 111 ", - " 11111 ", - " 1 ", - " 1 ", - " 1 ", - " 1 ", - " ", - " ", - " 000 0 0 0 000 ", - " 0 0 0 0 0 ", - " 00 0 0 0 ", - " 0 0 0 0 0 ", - " 000 0 0 0 0 ", - " "}; - -static char *exit_x24[] = { - "24 24 5 1", - " c None", - "0 c #000000", - "1 c #333333", - "2 c #CC0000", - "3 c #808080", - " ", - " ", - " 22 ", - " 2222 ", - " 222222 ", - " 22222222 ", - " 22 ", - " 22 ", - " 22 ", - " 22 ", - " 22 ", - " 22 ", - " ", - " ", - " 00000 0 0 00 000000 ", - " 00 01 10 00 00 ", - " 00 030 00 00 ", - " 0000 303 00 00 ", - " 00 030 00 00 ", - " 00 01 10 00 00 ", - " 00000 0 0 00 00 ", - " ", - " ", - " "}; - -static char *exit_x32[] = { - "32 32 3 1", - " c None", - "0 c #000000", - "1 c #CC0000", - " ", - " 11 ", - " 1111 ", - " 111111 ", - " 111111111 ", - " 11111111111 ", - " 11111111111111 ", - " 1111 1111 1111 ", - " 111 1111 111 ", - " 1111 1 ", - " 1111 ", - " 1111 ", - " 1111 ", - " 1111 ", - " 1111 ", - " 1111 ", - " 1111 ", - " 111 ", - " ", - " ", - " ", - " 00000000 000 00 00 000000000", - " 00000000 000 000 00 00000000 ", - " 00 000000 00 000 ", - " 000 00000 00 000 ", - " 0000000 000 00 000 ", - " 0000000 0000 00 000 ", - " 00 00000 00 000 ", - " 00 000 000 00 000 ", - " 00000000 000 000 00 000 ", - " 00000000 00 000 00 000 ", - " "}; - -static char **exit_xpm[3] = { exit_x16, exit_x24, exit_x32 }; - diff --git a/app/bin/bitmaps/extend.xpm b/app/bin/bitmaps/extend.xpm deleted file mode 100644 index 43490a0..0000000 --- a/app/bin/bitmaps/extend.xpm +++ /dev/null @@ -1,143 +0,0 @@ -static char *extend_x16[] = { - "16 16 21 1", - " c None", - "0 c #000000", - "1 c #0066FF", - "2 c #3366CC", - "3 c #3366FF", - "4 c #3399FF", - "5 c #666666", - "6 c #6666CC", - "7 c #6699FF", - "8 c #66CCFF", - "9 c #993333", - "A c #996666", - "B c #999999", - "C c #9999CC", - "D c #CC0000", - "E c #CC3333", - "F c #CC6633", - "G c #CC6666", - "H c #CCCCCC", - "I c #C0C0C0", - "J c #808080", - " D ", - " DDD ", - " GAE9 ", - " BJEJI ", - " BJD5 ", - " BBGJH ", - " HJFE5 ", - " BJEJB ", - " CJGEJH ", - " 46FJI ", - " 734832 ", - " 884438814 ", - " 343448 34 ", - " 8 8441 ", - " 411338 ", - " 44 8 "}; - -static char *extend_x24[] = { - "24 24 21 1", - " c None", - "0 c #000000", - "1 c #0066FF", - "2 c #3366FF", - "3 c #3399FF", - "4 c #666666", - "5 c #6666CC", - "6 c #6699FF", - "7 c #66CCFF", - "8 c #993333", - "9 c #999999", - "A c #CC0000", - "B c #CC3300", - "C c #CC3333", - "D c #CC6633", - "E c #CC6666", - "F c #CC6699", - "G c #CC9999", - "H c #CCCCCC", - "I c #C0C0C0", - "J c #808080", - " ", - " AA ", - " AAAAA ", - " B AA ", - " 99EGJI ", - " J9DG4H ", - " 44A 4 ", - " HJIC94 ", - " 4GE99H ", - " H94AA44 ", - " JICG4 ", - " H44CE99 ", - " 9JGA 4I ", - " 75 EGJ4 ", - " 37 A9JH ", - " 62 7732 ", - " 77227 32 ", - " 7776223 7 1 7 ", - " 23323277 32 ", - " 236 7 76117 ", - " 77 77112 ", - " 76111117 ", - " 112117 ", - " 77 "}; - -static char *extend_x32[] = { - "32 32 18 1", - " c None", - "0 c #000000", - "1 c #0066FF", - "2 c #3366CC", - "3 c #3366FF", - "4 c #3399FF", - "5 c #666666", - "6 c #6699FF", - "7 c #66CCFF", - "8 c #999999", - "9 c #CC0000", - "A c #CC3300", - "B c #CC3333", - "C c #CC6666", - "D c #CC9999", - "E c #CCCCCC", - "F c #C0C0C0", - "G c #808080", - " ", - " 99 ", - " 999999 ", - " 99999999 ", - " 99 99 99 ", - " 5 99 5 ", - " EGECBEGE ", - " 5 998G ", - " 5 9955 ", - " E8G 9955 ", - " E88D9FG8 ", - " 559AEGFE ", - " EF5 99 5 ", - " E88D9 55 ", - " 5 CBE5 ", - " EE55 9B8GE ", - " 8G 99 5 ", - " 5ED9B55 ", - " 73 9CF5 ", - " 377 5FE ", - " 763 77 12 ", - " 7 347 741 ", - " 7633 7 147 ", - " 7 77334 7 11 ", - " 463333 7 431 ", - " 334337 77 1147 ", - " 7 77 711 ", - " 7 7 1136 ", - " 7 411 7 ", - " 11311147 ", - " 37 7 ", - " 7 "}; - -static char **extend_xpm[3] = { extend_x16, extend_x24, extend_x32 }; - diff --git a/app/bin/bitmaps/filled-box.xpm b/app/bin/bitmaps/filled-box.xpm deleted file mode 100644 index cd85179..0000000 --- a/app/bin/bitmaps/filled-box.xpm +++ /dev/null @@ -1,120 +0,0 @@ -static char *filled_box_x16[] = { - "16 16 12 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #9999CC", - "3 c #99CCCC", - "4 c #99CCFF", - "5 c #99FFFF", - "6 c #CC0000", - "7 c #CC6666", - "8 c #CC6699", - "9 c #CC9999", - "A c #CC99CC", - " ", - " 00000000000000 ", - " 05555555542220 ", - " 05555555542860 ", - " 0555555555A271 ", - " 05555555592581 ", - " 05555554935540 ", - " 05555549355550 ", - " 05555483555550 ", - " 05554845555550 ", - " 05548455555550 ", - " 05484555555550 ", - " 04845555555550 ", - " 18455555555550 ", - " 00000000000000 ", - " "}; - -static char *filled_box_x24[] = { - "24 24 12 1", - " c None", - "0 c #000000", - "1 c #9999CC", - "2 c #99CCCC", - "3 c #99CCFF", - "4 c #99FFFF", - "5 c #CC0000", - "6 c #CC3333", - "7 c #CC6666", - "8 c #CC6699", - "9 c #CC9999", - "A c #CC99CC", - " ", - " ", - " 0000000000000000000000 ", - " 0444444444444433333340 ", - " 0444444444444415555640 ", - " 0444444444444433317540 ", - " 0444444444444444292530 ", - " 0444444444444441942530 ", - " 04444444444444A1443530 ", - " 0444444444444914443230 ", - " 0444444444439244444440 ", - " 0444444444392444444440 ", - " 0444444443824444444440 ", - " 0444444438344444444440 ", - " 0444444383444444444440 ", - " 0444443834444444444440 ", - " 0444438344444444444440 ", - " 0444283444444444444440 ", - " 0442934444444444444440 ", - " 0429344444444444444440 ", - " 0314444444444444444440 ", - " 0000000000000000000000 ", - " ", - " "}; - -static char *filled_box_x32[] = { - "32 32 13 1", - " c None", - "0 c #000000", - "1 c #9999CC", - "2 c #99CCCC", - "3 c #99CCFF", - "4 c #99FFFF", - "5 c #CC0000", - "6 c #CC3333", - "7 c #CC3366", - "8 c #CC6666", - "9 c #CC6699", - "A c #CC9999", - "B c #CC99CC", - " ", - " ", - " 000000000000000000000000000000 ", - " 000000000000000000000000000000 ", - " 004444444444444444444444444400 ", - " 004444444444444444436555558400 ", - " 004444444444444444436555556400 ", - " 004444444444444444444436555400 ", - " 004444444444444444444265A85300 ", - " 00444444444444444444265A485300 ", - " 0044444444444444444255B4495300 ", - " 0044444444444444441551444A5300 ", - " 004444444444444441552444431300 ", - " 0044444444444444A5524444444400 ", - " 004444444444444A56244444444400 ", - " 00444444444443A562444444444400 ", - " 0044444444443A5634444444444400 ", - " 004444444443857344444444444400 ", - " 004444444438583444444444444400 ", - " 004444444385834444444444444400 ", - " 004444443758344444444444444400 ", - " 004444436593444444444444444400 ", - " 004444265A34444444444444444400 ", - " 00444265A344444444444444444400 ", - " 0044255A4444444444444444444400 ", - " 004155144444444444444444444400 ", - " 003651444444444444444444444400 ", - " 004224444444444444444444444400 ", - " 000000000000000000000000000000 ", - " 000000000000000000000000000000 ", - " ", - " "}; - -static char **filled_box_xpm[3] = { filled_box_x16, filled_box_x24, filled_box_x32 }; - diff --git a/app/bin/bitmaps/filled-polygon.xpm b/app/bin/bitmaps/filled-polygon.xpm deleted file mode 100644 index 2620b74..0000000 --- a/app/bin/bitmaps/filled-polygon.xpm +++ /dev/null @@ -1,121 +0,0 @@ -static char *filled_polygon_x16[] = { - "16 16 12 1", - " c None", - "0 c #000000", - "1 c #003333", - "2 c #333333", - "3 c #333366", - "4 c #336666", - "5 c #336699", - "6 c #669999", - "7 c #6699CC", - "8 c #66CCCC", - "9 c #66CCFF", - "A c #99FFFF", - " ", - " 01220144 ", - " 17799AAA93 ", - " 17AAAAAAAA84 ", - " 29AAAAAAAAA83 ", - " 4AAAAAAAAAAA83 ", - "06AAAAAAAAAAAA71", - " 4AAAAAAAAAAAA82", - " 19AAAAAAAAAAA82", - " 17AAAAAAAAAAA82", - " 4AAAAAAAAAAA82", - " 19AAAAAAAAAA92", - " 1179AAAAAAAA92", - " 1279AAAA9752", - " 227640210 ", - " 00 "}; - -static char *filled_polygon_x24[] = { - "24 24 14 1", - " c None", - "0 c #000000", - "1 c #000033", - "2 c #003333", - "3 c #333333", - "4 c #333366", - "5 c #336666", - "6 c #336699", - "7 c #339999", - "8 c #669999", - "9 c #6699CC", - "A c #66CCCC", - "B c #66CCFF", - "C c #99FFFF", - " ", - " 0032 ", - " 0033105599A62 ", - " 299ABBCCCCCCB62 ", - " 06CCCCCCCCCCCCB5 ", - " 3ACCCCCCCCCCCCCB5 ", - " 2BCCCCCCCCCCCCCCB5 ", - " 07CCCCCCCCCCCCCCCCB5 ", - " 3ACCCCCCCCCCCCCCCCCB4 ", - " 1BCCCCCCCCCCCCCCCCCCB4 ", - " 3BCCCCCCCCCCCCCCCCCCC4 ", - " 08CCCCCCCCCCCCCCCCCCC4 ", - " 2CCCCCCCCCCCCCCCCCCC4 ", - " 3BCCCCCCCCCCCCCCCCCC5 ", - " 07CCCCCCCCCCCCCCCCCC5 ", - " 2BCCCCCCCCCCCCCCCCC5 ", - " 3ACCCCCCCCCCCCCCCCC5 ", - " 07CCCCCCCCCCCCCCCCC5 ", - " 45BCCCCCCCCCCCCCCC5 ", - " 35BCCCCCCCCCCCCC5 ", - " 36BCCCCCCCBA850 ", - " 028BBA952230 ", - " 22230 ", - " "}; - -static char *filled_polygon_x32[] = { - "32 32 12 1", - " c None", - "0 c #000000", - "1 c #003333", - "2 c #333366", - "3 c #336666", - "4 c #336699", - "5 c #339999", - "6 c #669999", - "7 c #6699CC", - "8 c #66CCCC", - "9 c #66CCFF", - "A c #99FFFF", - " ", - " 0000 ", - " 000000000000 ", - " 0000000000447789300 ", - " 004477999AAAAAAA9300 ", - " 008AAAAAAAAAAAAAAA9100 ", - " 019AAAAAAAAAAAAAAAA9100 ", - " 05AAAAAAAAAAAAAAAAAA9100 ", - " 008AAAAAAAAAAAAAAAAAAA810 ", - " 029AAAAAAAAAAAAAAAAAAAA800 ", - " 006AAAAAAAAAAAAAAAAAAAAAA800 ", - " 009AAAAAAAAAAAAAAAAAAAAAAA700 ", - " 02AAAAAAAAAAAAAAAAAAAAAAAAA700 ", - " 009AAAAAAAAAAAAAAAAAAAAAAAAA30 ", - " 008AAAAAAAAAAAAAAAAAAAAAAAAA40 ", - " 04AAAAAAAAAAAAAAAAAAAAAAAAA40 ", - " 009AAAAAAAAAAAAAAAAAAAAAAAA50 ", - " 008AAAAAAAAAAAAAAAAAAAAAAAA60 ", - " 04AAAAAAAAAAAAAAAAAAAAAAAA60 ", - " 009AAAAAAAAAAAAAAAAAAAAAAA60 ", - " 007AAAAAAAAAAAAAAAAAAAAAAA60 ", - " 04AAAAAAAAAAAAAAAAAAAAAAA60 ", - " 009AAAAAAAAAAAAAAAAAAAAAA60 ", - " 0069AAAAAAAAAAAAAAAAAAAAA60 ", - " 0027AAAAAAAAAAAAAAAAAAAA70 ", - " 00038AAAAAAAAAAAAAAAAAA70 ", - " 00038AAAAAAAAAAAAAA9840 ", - " 00049AAAAAAA997520000 ", - " 00059A98630000000 ", - " 00010000000 ", - " 0000 ", - " "}; - -static char **filled_polygon_xpm[3] = { filled_polygon_x16, filled_polygon_x24, filled_polygon_x32 }; - diff --git a/app/bin/bitmaps/go.xpm b/app/bin/bitmaps/go.xpm deleted file mode 100644 index deb8a81..0000000 --- a/app/bin/bitmaps/go.xpm +++ /dev/null @@ -1,135 +0,0 @@ -static char *go_x16[] = { - "16 16 16 1", - " c None", - "0 c #000000", - "1 c #003300", - "2 c #006600", - "3 c #006633", - "4 c #009933", - "5 c #339933", - "6 c #33CC33", - "7 c #33CC66", - "8 c #66CC66", - "9 c #66CC99", - "A c #99CC99", - "B c #99FF99", - "C c #99FFCC", - "D c #CCFFCC", - "E c #008000", - " 00 ", - " 1221 ", - " 11577511 ", - " 015788887510 ", - " 12678898887620 ", - " 14788AAAA877E0 ", - " 1478AACCA98740 ", - " 1478ACDDB98740 ", - " 1478ABCCA98740 ", - " 14789ABBA887E0 ", - " 147789AA9876E0 ", - " 11578888877410 ", - " 1377777631 ", - " 01476410 ", - " 1111 ", - " "}; - -static char *go_x24[] = { - "24 24 18 1", - " c None", - "0 c #000000", - "1 c #003300", - "2 c #006600", - "3 c #006633", - "4 c #009900", - "5 c #009933", - "6 c #00CC33", - "7 c #339933", - "8 c #33CC33", - "9 c #33CC66", - "A c #66CC66", - "B c #66CC99", - "C c #99CC99", - "D c #99FF99", - "E c #99FFCC", - "F c #CCFFCC", - "G c #008000", - " ", - " 0110 ", - " 138721 ", - " 1279999711 ", - " 11799999999510 ", - " 015899AAAAAA99821 ", - " 125899AAABBAAA998510 ", - " 15899AABCCCBBAA986G0 ", - " 1589AABCCCCCCAA998G0 ", - " 1589AACCEEECCBAA98G0 ", - " 1599ABCCEFEECCAA9850 ", - " 1599ABCEEFFECCAA9850 ", - " 1599ABCDEFFECCAA9850 ", - " 1599AACCEEEECBAA9850 ", - " 1589AABCCCCCCBAA98G0 ", - " 15899AABCCCCBAA996G0 ", - " 14689AAABBBBAA9986G0 ", - " 1G899AAAAAAA9986G1 ", - " 117999AAAA998511 ", - " 128999999711 ", - " 015888821 ", - " 115G10 ", - " 10 ", - " "}; - -static char *go_x32[] = { - "32 32 18 1", - " c None", - "0 c #000000", - "1 c #003300", - "2 c #006600", - "3 c #006633", - "4 c #009900", - "5 c #009933", - "6 c #00CC33", - "7 c #339933", - "8 c #33CC33", - "9 c #33CC66", - "A c #66CC66", - "B c #66CC99", - "C c #99CC99", - "D c #99FF99", - "E c #99FFCC", - "F c #CCFFCC", - "G c #008000", - " ", - " 11 ", - " 115310 ", - " 015888721 ", - " 138999998711 ", - " 1179999999998511 ", - " 1158999AAAAA9999831 ", - " 01G8899AAAAAAAAA9998511 ", - " 1258899AAAAAAAAAAA99986G1 ", - " 146899AAAABCCCBBAAA99886G0 ", - " 156899AAABCCCCCCBAAA9986G0 ", - " 15899AAABCCCCCCCCBAA9986G0 ", - " 15899AABCCCEEEDCCBAAA988G0 ", - " 15899AABCCEEEEEDCCBAA998G0 ", - " 1589AAACCCEEFFEECCBAA998G0 ", - " 1589AAACCDEFFFEECCBAA99850 ", - " 1589AAACCCEFFFEECCBAA998G0 ", - " 15899AABCCEEEEEDCCBAA998G0 ", - " 15899AABCCCEEEECCCAAA988G0 ", - " 15899AAABCCCCCCCCBAA9986G0 ", - " 156899AABCCCCCCCBAAA9986G0 ", - " 156899AAAABCCCBBAAA99886G0 ", - " 1G68899AAAAABAAAAAA9986520 ", - " 1158899AAAAAAAAA99986511 ", - " 1G88999AAAAAA9998711 ", - " 11589999999999821 ", - " 11789999998510 ", - " 1278888511 ", - " 0136511 ", - " 111 ", - " ", - " "}; - -static char **go_xpm[3] = { go_x16, go_x24, go_x32 }; - diff --git a/app/bin/bitmaps/helix.xpm b/app/bin/bitmaps/helix.xpm deleted file mode 100644 index d02bb29..0000000 --- a/app/bin/bitmaps/helix.xpm +++ /dev/null @@ -1,95 +0,0 @@ -static char *helix_x16[] = { - "16 16 4 1", - " c None", - "0 c #000000", - "1 c #333333", - "2 c #666666", - " 1111 ", - " 1111111111 ", - " 11 11 11 ", - " 11 111111111 1 ", - "11111 1111", - "111 2222222 11", - "11 2222 22111", - "112 11111", - "111 1111 12", - "22111 1112", - "221 111111111 22", - "2211 1 22 ", - " 2 11111222222 ", - " 22 1122 ", - " 2222 ", - " 2222 "}; - -static char *helix_x24[] = { - "24 24 4 1", - " c None", - "0 c #000000", - "1 c #333333", - "2 c #666666", - " 11 ", - " 11111111111 ", - " 111 1111 ", - " 11 11 ", - " 11 11111111 1 ", - " 1 1111 11 11111 1 ", - " 11 111 111 1 ", - " 1 11 22 111 ", - " 111 22222222222 11 ", - " 11 222 222111 ", - " 11 22 1111 ", - " 112 1111 21 ", - " 111 1111111 11 ", - " 1211 1122", - " 22 111 111 2 ", - " 21 1111111111111 2 ", - " 221 1111111 2 ", - " 22 11 22 ", - " 2 1111 2222 ", - " 22 11111222222 ", - " 22 ", - " 22 ", - " 222222 ", - " 22 "}; - -static char *helix_x32[] = { - "32 32 4 1", - " c None", - "0 c #000000", - "1 c #333333", - "2 c #666666", - " 1 ", - " 1111111111111 ", - " 111111111111111111 ", - " 11111 11111 ", - " 111 1111 ", - " 111 1111111 111 ", - " 111 111111111111111 11 ", - " 11 1111111 11 11111111 11 ", - " 111 11111 11111 11 ", - " 11 111 11111 ", - " 11111 22222222222 1111 ", - " 1111 22222222222222222 111 ", - " 111 222222 2222221111 ", - " 111 2222 211111 ", - " 111222 1111211 ", - " 11122 1111111 211 ", - " 1111 1111111111 111 ", - " 12111 111111 1112 ", - " 2121111 111122 ", - " 211 11111 11111 22 ", - " 2211 1111111111111111111 22 ", - " 22111 111111111111111 222 ", - " 22 111 11 222 ", - " 222 1111 22222 ", - " 22 111111 222222 ", - " 22 11111111222222222 ", - " 222 11111222222 ", - " 2222 ", - " 22222 ", - " 2222222 ", - " 22222222 ", - " 2222 "}; - -static char **helix_xpm[3] = { helix_x16, helix_x24, helix_x32 }; - diff --git a/app/bin/bitmaps/join-line.xpm b/app/bin/bitmaps/join-line.xpm deleted file mode 100644 index 1912e9a..0000000 --- a/app/bin/bitmaps/join-line.xpm +++ /dev/null @@ -1,99 +0,0 @@ -static char *join_line_x16[] = { - "16 16 5 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #CC0000", - "3 c #800000", - " ", - " 00", - " 0 ", - " 0 ", - " 0 ", - " 223 ", - " 222 ", - " 222 ", - " 2 ", - " 2 ", - " 2 ", - " 2 2 ", - " 222 ", - " 022 ", - " 00000 22 ", - " 000 "}; - -static char *join_line_x24[] = { - "24 24 5 1", - " c None", - "0 c #000000", - "1 c #990000", - "2 c #CC0000", - "3 c #800000", - " ", - " 0 ", - " 00 ", - " 00 ", - " 00 ", - " 00 ", - " 0 ", - " 00 ", - " 2223 ", - " 2222 ", - " 2222 ", - " 22 ", - " 2 ", - " 22 ", - " 22 ", - " 22 ", - " 22 ", - " 2 22 ", - " 22222 ", - " 222 ", - " 0122 ", - " 0000 22 ", - " 000000 ", - " "}; - -static char *join_line_x32[] = { - "32 32 6 1", - " c None", - "0 c #000000", - "1 c #660000", - "2 c #990000", - "3 c #CC0000", - "4 c #800000", - " ", - " 0 ", - " 0 ", - " 0 ", - " 0 ", - " 0 ", - " 00 ", - " 00 ", - " 0 ", - " 0 ", - " 21 ", - " 333333 ", - " 3333333 ", - " 33333 ", - " 33 33 ", - " 333 ", - " 33 ", - " 33 ", - " 333 ", - " 333 ", - " 333 ", - " 333 ", - " 333 ", - " 33 333 ", - " 33 3333 ", - " 33333 ", - " 3333 ", - " 04333 ", - " 0000 333 ", - " 0000000 3 ", - " 00000 ", - " "}; - -static char **join_line_xpm[3] = { join_line_x16, join_line_x24, join_line_x32 }; - diff --git a/app/bin/bitmaps/join.xpm b/app/bin/bitmaps/join.xpm deleted file mode 100644 index 944e443..0000000 --- a/app/bin/bitmaps/join.xpm +++ /dev/null @@ -1,117 +0,0 @@ -static char *join_x16[] = { - "16 16 13 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #333300", - "3 c #660000", - "4 c #663300", - "5 c #990000", - "6 c #996600", - "7 c #CC0000", - "8 c #CC3300", - "9 c #CC6600", - "A c #CC9900", - "B c #800000", - " 66 0 ", - " 66A2A", - " 20 0 ", - " A4964 ", - " 3 46 ", - " 7777B ", - " 777 ", - " 77 ", - " 7 ", - " 7 ", - " 7 77 ", - " 9161777 ", - "0406977 ", - " A A6157 ", - "04006 ", - " 9 A "}; - -static char *join_x24[] = { - "24 24 10 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #333300", - "3 c #663300", - "4 c #990000", - "5 c #996600", - "6 c #CC0000", - "7 c #CC6600", - "8 c #CC9900", - " 0 ", - " 8558827 ", - " 338818 ", - " 00 0 ", - " 825 0 ", - " 7288538 ", - " 00 158 ", - " 6666660 ", - " 6666664 ", - " 66666 ", - " 66 666 ", - " 666 6 ", - " 666 ", - " 666 ", - " 6 666 ", - " 66 666 ", - " 666666 ", - " 7 33066666 ", - " 02007 666 ", - " 8 8866666 ", - " 8 8500466 ", - " 350005 ", - " 15 8 ", - " 8 "}; - -static char *join_x32[] = { - "32 32 11 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #333300", - "3 c #663300", - "4 c #990000", - "5 c #996600", - "6 c #CC0000", - "7 c #CC6600", - "8 c #CC9900", - "9 c #800000", - " ", - " 20 00 ", - " 855888558 ", - " 00 05 ", - " 0 0 ", - " 0 0 ", - " 88388 0 ", - " 03888758 ", - " 0 038 ", - " 64666 0 ", - " 666666660 ", - " 666666664 ", - " 666666 ", - " 666 666 ", - " 666 666 ", - " 6666 ", - " 6666 ", - " 6666 ", - " 6666 ", - " 66 6666 ", - " 66 6666 ", - " 666 66666 ", - " 87096666666 ", - " 88 0320666666 ", - " 0100038 66666 ", - " 78 8 666666 ", - " 88 88 46666 ", - " 88 7000 666 ", - " 57000033 ", - " 02300 88 ", - " 8 8 ", - " 8 "}; - -static char **join_xpm[3] = { join_x16, join_x24, join_x32 }; - diff --git a/app/bin/bitmaps/l1.xbm b/app/bin/bitmaps/l1.xbm deleted file mode 100644 index 031edd1..0000000 --- a/app/bin/bitmaps/l1.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l1_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x80, 0x03, - 0xC0, 0x03, - 0xE0, 0x03, - 0x80, 0x03, - 0x80, 0x03, - 0x80, 0x03, - 0x80, 0x03, - 0x80, 0x03, - 0x80, 0x03, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l1_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x1C, 0x00, - 0x00, 0x1E, 0x00, - 0x00, 0x1E, 0x00, - 0x00, 0x1F, 0x00, - 0x80, 0x1D, 0x00, - 0x00, 0x1C, 0x00, - 0x00, 0x1C, 0x00, - 0x00, 0x1C, 0x00, - 0x00, 0x1C, 0x00, - 0x00, 0x1C, 0x00, - 0x00, 0x1C, 0x00, - 0x00, 0x1C, 0x00, - 0x00, 0x1C, 0x00, - 0x00, 0x1C, 0x00, - 0x00, 0x1C, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l1_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0xE0, 0x00, 0x00, - 0x00, 0xE0, 0x00, 0x00, - 0x00, 0xF0, 0x00, 0x00, - 0x00, 0xF8, 0x00, 0x00, - 0x00, 0xFC, 0x00, 0x00, - 0x00, 0xFE, 0x00, 0x00, - 0x00, 0xE6, 0x00, 0x00, - 0x00, 0xE0, 0x00, 0x00, - 0x00, 0xE0, 0x00, 0x00, - 0x00, 0xE0, 0x00, 0x00, - 0x00, 0xE0, 0x00, 0x00, - 0x00, 0xE0, 0x00, 0x00, - 0x00, 0xE0, 0x00, 0x00, - 0x00, 0xE0, 0x00, 0x00, - 0x00, 0xE0, 0x00, 0x00, - 0x00, 0xE0, 0x00, 0x00, - 0x00, 0xE0, 0x00, 0x00, - 0x00, 0xE0, 0x00, 0x00, - 0x00, 0xE0, 0x00, 0x00, - 0x00, 0xE0, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l10.xbm b/app/bin/bitmaps/l10.xbm deleted file mode 100644 index 10920b9..0000000 --- a/app/bin/bitmaps/l10.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l10_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x70, 0x1E, - 0x78, 0x3F, - 0x7C, 0x33, - 0x70, 0x33, - 0x70, 0x33, - 0x70, 0x33, - 0x70, 0x33, - 0x70, 0x3F, - 0x70, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l10_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xC0, 0xE1, 0x03, - 0xE0, 0x71, 0x07, - 0xE0, 0x31, 0x07, - 0xF0, 0x39, 0x06, - 0xD8, 0x39, 0x06, - 0xC0, 0x39, 0x0E, - 0xC0, 0x39, 0x0E, - 0xC0, 0x39, 0x0E, - 0xC0, 0x39, 0x0E, - 0xC0, 0x39, 0x0E, - 0xC0, 0x39, 0x06, - 0xC0, 0x39, 0x06, - 0xC0, 0x31, 0x07, - 0xC0, 0x71, 0x07, - 0xC0, 0xE1, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l10_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x80, 0x03, 0x7E, 0x00, - 0x80, 0x03, 0xFF, 0x00, - 0xC0, 0x03, 0xEF, 0x01, - 0xE0, 0x83, 0xC7, 0x01, - 0xF0, 0x83, 0xC3, 0x03, - 0xF8, 0x83, 0xC3, 0x03, - 0x98, 0xC3, 0x83, 0x03, - 0x80, 0xC3, 0x83, 0x03, - 0x80, 0xC3, 0x83, 0x03, - 0x80, 0xC3, 0x83, 0x03, - 0x80, 0xC3, 0x83, 0x03, - 0x80, 0xC3, 0x83, 0x03, - 0x80, 0xC3, 0x83, 0x03, - 0x80, 0xC3, 0x83, 0x03, - 0x80, 0x83, 0xC3, 0x03, - 0x80, 0x83, 0xC3, 0x03, - 0x80, 0x83, 0xC7, 0x01, - 0x80, 0x03, 0xEF, 0x01, - 0x80, 0x03, 0xFF, 0x00, - 0x80, 0x03, 0x7E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l11.xbm b/app/bin/bitmaps/l11.xbm deleted file mode 100644 index ce82cfe..0000000 --- a/app/bin/bitmaps/l11.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l11_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x70, 0x1C, - 0x78, 0x1E, - 0x7C, 0x1F, - 0x70, 0x1C, - 0x70, 0x1C, - 0x70, 0x1C, - 0x70, 0x1C, - 0x70, 0x1C, - 0x70, 0x1C, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l11_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xC0, 0x81, 0x03, - 0xE0, 0xC1, 0x03, - 0xE0, 0xC1, 0x03, - 0xF0, 0xE1, 0x03, - 0xD8, 0xB1, 0x03, - 0xC0, 0x81, 0x03, - 0xC0, 0x81, 0x03, - 0xC0, 0x81, 0x03, - 0xC0, 0x81, 0x03, - 0xC0, 0x81, 0x03, - 0xC0, 0x81, 0x03, - 0xC0, 0x81, 0x03, - 0xC0, 0x81, 0x03, - 0xC0, 0x81, 0x03, - 0xC0, 0x81, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l11_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x80, 0x03, 0x70, 0x00, - 0x80, 0x03, 0x70, 0x00, - 0xC0, 0x03, 0x78, 0x00, - 0xE0, 0x03, 0x7C, 0x00, - 0xF0, 0x03, 0x7E, 0x00, - 0xF8, 0x03, 0x7F, 0x00, - 0x98, 0x03, 0x73, 0x00, - 0x80, 0x03, 0x70, 0x00, - 0x80, 0x03, 0x70, 0x00, - 0x80, 0x03, 0x70, 0x00, - 0x80, 0x03, 0x70, 0x00, - 0x80, 0x03, 0x70, 0x00, - 0x80, 0x03, 0x70, 0x00, - 0x80, 0x03, 0x70, 0x00, - 0x80, 0x03, 0x70, 0x00, - 0x80, 0x03, 0x70, 0x00, - 0x80, 0x03, 0x70, 0x00, - 0x80, 0x03, 0x70, 0x00, - 0x80, 0x03, 0x70, 0x00, - 0x80, 0x03, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l12.xbm b/app/bin/bitmaps/l12.xbm deleted file mode 100644 index e660ef3..0000000 --- a/app/bin/bitmaps/l12.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l12_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x70, 0x1E, - 0x78, 0x3F, - 0x7C, 0x33, - 0x70, 0x30, - 0x70, 0x38, - 0x70, 0x1C, - 0x70, 0x0E, - 0x70, 0x07, - 0x70, 0x3F, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l12_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xC0, 0xE1, 0x03, - 0xE0, 0x71, 0x07, - 0xE0, 0x39, 0x06, - 0xF0, 0x39, 0x0E, - 0xD8, 0x01, 0x0E, - 0xC0, 0x01, 0x0E, - 0xC0, 0x01, 0x07, - 0xC0, 0x81, 0x07, - 0xC0, 0x81, 0x03, - 0xC0, 0xC1, 0x01, - 0xC0, 0xE1, 0x01, - 0xC0, 0xF1, 0x00, - 0xC0, 0x71, 0x00, - 0xC0, 0x79, 0x00, - 0xC0, 0xF9, 0x0F, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l12_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x80, 0x03, 0xFE, 0x00, - 0x80, 0x03, 0xFF, 0x01, - 0xC0, 0x83, 0xE7, 0x03, - 0xE0, 0x83, 0xC3, 0x03, - 0xF0, 0xC3, 0x83, 0x03, - 0xF8, 0xC3, 0x83, 0x03, - 0x98, 0x03, 0x80, 0x03, - 0x80, 0x03, 0xC0, 0x03, - 0x80, 0x03, 0xC0, 0x03, - 0x80, 0x03, 0xE0, 0x01, - 0x80, 0x03, 0xF0, 0x01, - 0x80, 0x03, 0xF8, 0x00, - 0x80, 0x03, 0x78, 0x00, - 0x80, 0x03, 0x3C, 0x00, - 0x80, 0x03, 0x1E, 0x00, - 0x80, 0x03, 0x0F, 0x00, - 0x80, 0x83, 0x07, 0x00, - 0x80, 0x83, 0x07, 0x00, - 0x80, 0xC3, 0xFF, 0x03, - 0x80, 0xC3, 0xFF, 0x03, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l13.xbm b/app/bin/bitmaps/l13.xbm deleted file mode 100644 index a11c7f7..0000000 --- a/app/bin/bitmaps/l13.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l13_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x70, 0x1E, - 0x78, 0x3B, - 0x7C, 0x38, - 0x70, 0x18, - 0x70, 0x3C, - 0x70, 0x38, - 0x70, 0x33, - 0x70, 0x3F, - 0x70, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l13_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xC0, 0xE1, 0x03, - 0xE0, 0x71, 0x07, - 0xE0, 0x39, 0x07, - 0xF0, 0x01, 0x07, - 0xD8, 0x01, 0x07, - 0xC0, 0x01, 0x07, - 0xC0, 0x81, 0x03, - 0xC0, 0xC1, 0x07, - 0xC0, 0x01, 0x07, - 0xC0, 0x01, 0x0E, - 0xC0, 0x01, 0x0E, - 0xC0, 0x39, 0x0E, - 0xC0, 0x39, 0x07, - 0xC0, 0x71, 0x07, - 0xC0, 0xE1, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l13_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x80, 0x03, 0x7E, 0x00, - 0x80, 0x03, 0xFF, 0x00, - 0xC0, 0x83, 0xE7, 0x01, - 0xE0, 0x83, 0xC7, 0x01, - 0xF0, 0x83, 0xC3, 0x03, - 0xF8, 0x03, 0xC0, 0x03, - 0x98, 0x03, 0xC0, 0x01, - 0x80, 0x03, 0xE0, 0x01, - 0x80, 0x03, 0xFC, 0x00, - 0x80, 0x03, 0xFC, 0x00, - 0x80, 0x03, 0xE0, 0x01, - 0x80, 0x03, 0xC0, 0x03, - 0x80, 0x03, 0x80, 0x03, - 0x80, 0x03, 0x80, 0x03, - 0x80, 0xC3, 0x83, 0x03, - 0x80, 0xC3, 0x83, 0x03, - 0x80, 0x83, 0xC7, 0x03, - 0x80, 0x83, 0xE7, 0x01, - 0x80, 0x03, 0xFF, 0x01, - 0x80, 0x03, 0x7E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l14.xbm b/app/bin/bitmaps/l14.xbm deleted file mode 100644 index 765ca93..0000000 --- a/app/bin/bitmaps/l14.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l14_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x70, 0x1C, - 0x78, 0x1C, - 0x7C, 0x1E, - 0x70, 0x1E, - 0x70, 0x1F, - 0x70, 0x1B, - 0xF0, 0x3F, - 0x70, 0x18, - 0x70, 0x18, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l14_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xC0, 0x81, 0x03, - 0xE0, 0x81, 0x03, - 0xE0, 0xC1, 0x03, - 0xF0, 0xC1, 0x03, - 0xD8, 0xE1, 0x03, - 0xC0, 0xE1, 0x03, - 0xC0, 0xF1, 0x03, - 0xC0, 0xB1, 0x03, - 0xC0, 0xB9, 0x03, - 0xC0, 0x99, 0x03, - 0xC0, 0xFD, 0x0F, - 0xC0, 0x81, 0x03, - 0xC0, 0x81, 0x03, - 0xC0, 0x81, 0x03, - 0xC0, 0x81, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l14_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x80, 0x03, 0xF0, 0x00, - 0x80, 0x03, 0xF0, 0x00, - 0xC0, 0x03, 0xF8, 0x00, - 0xE0, 0x03, 0xF8, 0x00, - 0xF0, 0x03, 0xFC, 0x00, - 0xF8, 0x03, 0xFC, 0x00, - 0x98, 0x03, 0xFE, 0x00, - 0x80, 0x03, 0xEE, 0x00, - 0x80, 0x03, 0xEF, 0x00, - 0x80, 0x83, 0xE7, 0x00, - 0x80, 0x83, 0xE7, 0x00, - 0x80, 0xC3, 0xE3, 0x00, - 0x80, 0xC3, 0xE1, 0x00, - 0x80, 0xE3, 0xFF, 0x03, - 0x80, 0xE3, 0xFF, 0x03, - 0x80, 0x03, 0xE0, 0x00, - 0x80, 0x03, 0xE0, 0x00, - 0x80, 0x03, 0xE0, 0x00, - 0x80, 0x03, 0xE0, 0x00, - 0x80, 0x03, 0xE0, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l15.xbm b/app/bin/bitmaps/l15.xbm deleted file mode 100644 index 7850754..0000000 --- a/app/bin/bitmaps/l15.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l15_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x70, 0x3F, - 0x78, 0x07, - 0x7C, 0x07, - 0x70, 0x1F, - 0x70, 0x3B, - 0x70, 0x30, - 0x70, 0x33, - 0x70, 0x3F, - 0x70, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l15_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xC0, 0xF1, 0x07, - 0xE0, 0x71, 0x00, - 0xE0, 0x71, 0x00, - 0xF0, 0x31, 0x00, - 0xD8, 0x31, 0x00, - 0xC0, 0xF9, 0x03, - 0xC0, 0x79, 0x07, - 0xC0, 0x39, 0x07, - 0xC0, 0x01, 0x0E, - 0xC0, 0x01, 0x0E, - 0xC0, 0x01, 0x0E, - 0xC0, 0x39, 0x06, - 0xC0, 0x39, 0x07, - 0xC0, 0x71, 0x07, - 0xC0, 0xE1, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l15_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x80, 0x03, 0xFF, 0x03, - 0x80, 0x03, 0xFF, 0x03, - 0xC0, 0x03, 0x07, 0x00, - 0xE0, 0x03, 0x07, 0x00, - 0xF0, 0x83, 0x07, 0x00, - 0xF8, 0x83, 0x07, 0x00, - 0x98, 0x83, 0x7F, 0x00, - 0x80, 0x83, 0xFF, 0x01, - 0x80, 0x83, 0xE7, 0x01, - 0x80, 0x83, 0xC3, 0x03, - 0x80, 0x03, 0xC0, 0x03, - 0x80, 0x03, 0x80, 0x03, - 0x80, 0x03, 0x80, 0x03, - 0x80, 0x03, 0x80, 0x03, - 0x80, 0xC3, 0x83, 0x03, - 0x80, 0xC3, 0xC3, 0x03, - 0x80, 0x83, 0xC3, 0x03, - 0x80, 0x83, 0xE7, 0x01, - 0x80, 0x03, 0xFF, 0x00, - 0x80, 0x03, 0x7E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l16.xbm b/app/bin/bitmaps/l16.xbm deleted file mode 100644 index 88e94f6..0000000 --- a/app/bin/bitmaps/l16.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l16_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x70, 0x1E, - 0x78, 0x3F, - 0x7C, 0x03, - 0x70, 0x1F, - 0x70, 0x3F, - 0x70, 0x33, - 0x70, 0x33, - 0x70, 0x3F, - 0x70, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l16_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xC0, 0xE1, 0x03, - 0xE0, 0x71, 0x07, - 0xE0, 0x31, 0x07, - 0xF0, 0x39, 0x00, - 0xD8, 0x39, 0x00, - 0xC0, 0x39, 0x00, - 0xC0, 0xF9, 0x03, - 0xC0, 0x79, 0x07, - 0xC0, 0x39, 0x07, - 0xC0, 0x39, 0x0E, - 0xC0, 0x39, 0x0E, - 0xC0, 0x39, 0x0E, - 0xC0, 0x31, 0x07, - 0xC0, 0x71, 0x07, - 0xC0, 0xE1, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l16_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x80, 0x03, 0xFC, 0x00, - 0x80, 0x03, 0xFF, 0x01, - 0xC0, 0x03, 0xEF, 0x01, - 0xE0, 0x83, 0xC7, 0x03, - 0xF0, 0x83, 0xC3, 0x03, - 0xF8, 0x83, 0x03, 0x00, - 0x98, 0xC3, 0x03, 0x00, - 0x80, 0xC3, 0x7F, 0x00, - 0x80, 0xC3, 0xFF, 0x01, - 0x80, 0xC3, 0xEF, 0x01, - 0x80, 0xC3, 0xC7, 0x03, - 0x80, 0xC3, 0x83, 0x03, - 0x80, 0xC3, 0x83, 0x03, - 0x80, 0xC3, 0x83, 0x03, - 0x80, 0xC3, 0x83, 0x03, - 0x80, 0x83, 0x83, 0x03, - 0x80, 0x83, 0xC7, 0x03, - 0x80, 0x83, 0xEF, 0x01, - 0x80, 0x03, 0xFF, 0x01, - 0x80, 0x03, 0x7C, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l17.xbm b/app/bin/bitmaps/l17.xbm deleted file mode 100644 index df3fb94..0000000 --- a/app/bin/bitmaps/l17.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l17_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x70, 0x3F, - 0x78, 0x38, - 0x7C, 0x18, - 0x70, 0x1C, - 0x70, 0x0C, - 0x70, 0x0E, - 0x70, 0x0E, - 0x70, 0x06, - 0x70, 0x06, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l17_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xC0, 0xF9, 0x0F, - 0xE0, 0x01, 0x0F, - 0xE0, 0x01, 0x07, - 0xF0, 0x81, 0x03, - 0xD8, 0x81, 0x03, - 0xC0, 0xC1, 0x01, - 0xC0, 0xC1, 0x01, - 0xC0, 0xC1, 0x01, - 0xC0, 0xE1, 0x00, - 0xC0, 0xE1, 0x00, - 0xC0, 0xE1, 0x00, - 0xC0, 0xE1, 0x00, - 0xC0, 0xE1, 0x00, - 0xC0, 0x71, 0x00, - 0xC0, 0x71, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l17_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x80, 0xC3, 0xFF, 0x03, - 0x80, 0xC3, 0xFF, 0x03, - 0xC0, 0x03, 0xC0, 0x03, - 0xE0, 0x03, 0xE0, 0x01, - 0xF0, 0x03, 0xE0, 0x01, - 0xF8, 0x03, 0xF0, 0x00, - 0x98, 0x03, 0xF0, 0x00, - 0x80, 0x03, 0x78, 0x00, - 0x80, 0x03, 0x78, 0x00, - 0x80, 0x03, 0x38, 0x00, - 0x80, 0x03, 0x3C, 0x00, - 0x80, 0x03, 0x3C, 0x00, - 0x80, 0x03, 0x1C, 0x00, - 0x80, 0x03, 0x1E, 0x00, - 0x80, 0x03, 0x1E, 0x00, - 0x80, 0x03, 0x1E, 0x00, - 0x80, 0x03, 0x1E, 0x00, - 0x80, 0x03, 0x0E, 0x00, - 0x80, 0x03, 0x0E, 0x00, - 0x80, 0x03, 0x0E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l18.xbm b/app/bin/bitmaps/l18.xbm deleted file mode 100644 index 7ab0b30..0000000 --- a/app/bin/bitmaps/l18.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l18_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x70, 0x1E, - 0x78, 0x3F, - 0x7C, 0x3B, - 0x70, 0x3F, - 0x70, 0x1E, - 0x70, 0x3F, - 0x70, 0x33, - 0x70, 0x3F, - 0x70, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l18_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xC0, 0xE1, 0x03, - 0xE0, 0x71, 0x07, - 0xE0, 0x31, 0x07, - 0xF0, 0x39, 0x07, - 0xD8, 0x39, 0x07, - 0xC0, 0x39, 0x07, - 0xC0, 0x71, 0x07, - 0xC0, 0xE1, 0x03, - 0xC0, 0x71, 0x07, - 0xC0, 0x39, 0x06, - 0xC0, 0x39, 0x0E, - 0xC0, 0x39, 0x0E, - 0xC0, 0x39, 0x06, - 0xC0, 0x71, 0x07, - 0xC0, 0xE1, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l18_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x80, 0x03, 0x7E, 0x00, - 0x80, 0x03, 0xFF, 0x00, - 0xC0, 0x83, 0xEF, 0x01, - 0xE0, 0x83, 0xC7, 0x01, - 0xF0, 0x83, 0xC3, 0x03, - 0xF8, 0x83, 0xC3, 0x03, - 0x98, 0x83, 0xC7, 0x01, - 0x80, 0x03, 0xEF, 0x01, - 0x80, 0x03, 0xFE, 0x00, - 0x80, 0x03, 0xFF, 0x00, - 0x80, 0x83, 0xE7, 0x01, - 0x80, 0x83, 0xC3, 0x03, - 0x80, 0xC3, 0x83, 0x03, - 0x80, 0xC3, 0x83, 0x03, - 0x80, 0xC3, 0x83, 0x03, - 0x80, 0xC3, 0x83, 0x03, - 0x80, 0x83, 0xC3, 0x03, - 0x80, 0x83, 0xE7, 0x01, - 0x80, 0x03, 0xFF, 0x01, - 0x80, 0x03, 0x7E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l19.xbm b/app/bin/bitmaps/l19.xbm deleted file mode 100644 index 08aee34..0000000 --- a/app/bin/bitmaps/l19.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l19_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x70, 0x1E, - 0x78, 0x3F, - 0x7C, 0x33, - 0x70, 0x33, - 0x70, 0x3F, - 0x70, 0x3E, - 0x70, 0x30, - 0x70, 0x3B, - 0x70, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l19_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xC0, 0xE1, 0x01, - 0xE0, 0x71, 0x07, - 0xE0, 0x39, 0x07, - 0xF0, 0x39, 0x06, - 0xD8, 0x39, 0x0E, - 0xC0, 0x39, 0x0E, - 0xC0, 0x39, 0x0F, - 0xC0, 0x71, 0x0F, - 0xC0, 0xE1, 0x0F, - 0xC0, 0x01, 0x0E, - 0xC0, 0x01, 0x06, - 0xC0, 0x01, 0x06, - 0xC0, 0x39, 0x07, - 0xC0, 0x71, 0x03, - 0xC0, 0xF1, 0x01, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l19_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x80, 0x03, 0x7E, 0x00, - 0x80, 0x03, 0xFF, 0x00, - 0xC0, 0x83, 0xEF, 0x01, - 0xE0, 0x83, 0xC7, 0x01, - 0xF0, 0xC3, 0x83, 0x03, - 0xF8, 0xC3, 0x83, 0x03, - 0x98, 0xC3, 0x83, 0x03, - 0x80, 0xC3, 0x83, 0x03, - 0x80, 0xC3, 0x83, 0x03, - 0x80, 0x83, 0xC3, 0x03, - 0x80, 0x83, 0xE7, 0x03, - 0x80, 0x03, 0xFF, 0x03, - 0x80, 0x03, 0xFE, 0x03, - 0x80, 0x03, 0x80, 0x03, - 0x80, 0x03, 0x80, 0x03, - 0x80, 0x83, 0xC3, 0x03, - 0x80, 0x83, 0xC3, 0x01, - 0x80, 0x83, 0xE7, 0x01, - 0x80, 0x03, 0xFF, 0x00, - 0x80, 0x03, 0x7E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l2.xbm b/app/bin/bitmaps/l2.xbm deleted file mode 100644 index 4ab709c..0000000 --- a/app/bin/bitmaps/l2.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l2_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0xC0, 0x03, - 0xE0, 0x07, - 0x60, 0x06, - 0x00, 0x06, - 0x00, 0x07, - 0x80, 0x03, - 0xC0, 0x01, - 0xE0, 0x00, - 0xE0, 0x07, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l2_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x1F, 0x00, - 0x80, 0x3B, 0x00, - 0xC0, 0x31, 0x00, - 0xC0, 0x71, 0x00, - 0x00, 0x70, 0x00, - 0x00, 0x70, 0x00, - 0x00, 0x38, 0x00, - 0x00, 0x3C, 0x00, - 0x00, 0x1C, 0x00, - 0x00, 0x0E, 0x00, - 0x00, 0x0F, 0x00, - 0x80, 0x07, 0x00, - 0x80, 0x03, 0x00, - 0xC0, 0x03, 0x00, - 0xC0, 0x7F, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l2_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0xFC, 0x01, 0x00, - 0x00, 0xFE, 0x03, 0x00, - 0x00, 0xCF, 0x07, 0x00, - 0x00, 0x87, 0x07, 0x00, - 0x80, 0x07, 0x07, 0x00, - 0x80, 0x07, 0x07, 0x00, - 0x00, 0x00, 0x07, 0x00, - 0x00, 0x80, 0x07, 0x00, - 0x00, 0x80, 0x07, 0x00, - 0x00, 0xC0, 0x03, 0x00, - 0x00, 0xE0, 0x03, 0x00, - 0x00, 0xF0, 0x01, 0x00, - 0x00, 0xF0, 0x00, 0x00, - 0x00, 0x78, 0x00, 0x00, - 0x00, 0x3C, 0x00, 0x00, - 0x00, 0x1E, 0x00, 0x00, - 0x00, 0x0F, 0x00, 0x00, - 0x00, 0x0F, 0x00, 0x00, - 0x80, 0xFF, 0x07, 0x00, - 0x80, 0xFF, 0x07, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l20.xbm b/app/bin/bitmaps/l20.xbm deleted file mode 100644 index 9da3bef..0000000 --- a/app/bin/bitmaps/l20.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l20_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x78, 0x1E, - 0xFC, 0x3F, - 0xCC, 0x33, - 0xC0, 0x33, - 0xE0, 0x33, - 0x70, 0x33, - 0x38, 0x33, - 0x1C, 0x3F, - 0xFC, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l20_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF0, 0xE1, 0x03, - 0xB8, 0x73, 0x07, - 0x1C, 0x33, 0x07, - 0x1C, 0x3F, 0x06, - 0x00, 0x3F, 0x06, - 0x00, 0x3F, 0x0E, - 0x80, 0x3B, 0x0E, - 0xC0, 0x3B, 0x0E, - 0xC0, 0x39, 0x0E, - 0xE0, 0x38, 0x0E, - 0xF0, 0x38, 0x06, - 0x78, 0x38, 0x06, - 0x38, 0x30, 0x07, - 0x3C, 0x70, 0x07, - 0xFC, 0xE7, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l20_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xF0, 0x07, 0x7E, 0x00, - 0xF8, 0x0F, 0xFF, 0x00, - 0x3C, 0x1F, 0xEF, 0x01, - 0x1C, 0x9E, 0xC7, 0x01, - 0x1E, 0x9C, 0xC3, 0x03, - 0x1E, 0x9C, 0xC3, 0x03, - 0x00, 0xDC, 0x83, 0x03, - 0x00, 0xDE, 0x83, 0x03, - 0x00, 0xDE, 0x83, 0x03, - 0x00, 0xCF, 0x83, 0x03, - 0x80, 0xCF, 0x83, 0x03, - 0xC0, 0xC7, 0x83, 0x03, - 0xC0, 0xC3, 0x83, 0x03, - 0xE0, 0xC1, 0x83, 0x03, - 0xF0, 0x80, 0xC3, 0x03, - 0x78, 0x80, 0xC3, 0x03, - 0x3C, 0x80, 0xC7, 0x01, - 0x3C, 0x00, 0xEF, 0x01, - 0xFE, 0x1F, 0xFF, 0x00, - 0xFE, 0x1F, 0x7E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l21.xbm b/app/bin/bitmaps/l21.xbm deleted file mode 100644 index 32d81cc..0000000 --- a/app/bin/bitmaps/l21.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l21_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x78, 0x1C, - 0xFC, 0x1E, - 0xCC, 0x1F, - 0xC0, 0x1C, - 0xE0, 0x1C, - 0x70, 0x1C, - 0x38, 0x1C, - 0x1C, 0x1C, - 0xFC, 0x1C, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l21_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF0, 0x81, 0x03, - 0xB8, 0xC3, 0x03, - 0x1C, 0xC3, 0x03, - 0x1C, 0xE7, 0x03, - 0x00, 0xB7, 0x03, - 0x00, 0x87, 0x03, - 0x80, 0x83, 0x03, - 0xC0, 0x83, 0x03, - 0xC0, 0x81, 0x03, - 0xE0, 0x80, 0x03, - 0xF0, 0x80, 0x03, - 0x78, 0x80, 0x03, - 0x38, 0x80, 0x03, - 0x3C, 0x80, 0x03, - 0xFC, 0x87, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l21_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xF0, 0x07, 0x70, 0x00, - 0xF8, 0x0F, 0x70, 0x00, - 0x3C, 0x1F, 0x78, 0x00, - 0x1C, 0x1E, 0x7C, 0x00, - 0x1E, 0x1C, 0x7E, 0x00, - 0x1E, 0x1C, 0x7F, 0x00, - 0x00, 0x1C, 0x73, 0x00, - 0x00, 0x1E, 0x70, 0x00, - 0x00, 0x1E, 0x70, 0x00, - 0x00, 0x0F, 0x70, 0x00, - 0x80, 0x0F, 0x70, 0x00, - 0xC0, 0x07, 0x70, 0x00, - 0xC0, 0x03, 0x70, 0x00, - 0xE0, 0x01, 0x70, 0x00, - 0xF0, 0x00, 0x70, 0x00, - 0x78, 0x00, 0x70, 0x00, - 0x3C, 0x00, 0x70, 0x00, - 0x3C, 0x00, 0x70, 0x00, - 0xFE, 0x1F, 0x70, 0x00, - 0xFE, 0x1F, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l22.xbm b/app/bin/bitmaps/l22.xbm deleted file mode 100644 index 9cfc394..0000000 --- a/app/bin/bitmaps/l22.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l22_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x78, 0x1E, - 0xFC, 0x3F, - 0xCC, 0x33, - 0xC0, 0x30, - 0xE0, 0x38, - 0x70, 0x1C, - 0x38, 0x0E, - 0x1C, 0x07, - 0xFC, 0x3F, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l22_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF0, 0xE1, 0x03, - 0xB8, 0x73, 0x07, - 0x1C, 0x3B, 0x06, - 0x1C, 0x3F, 0x0E, - 0x00, 0x07, 0x0E, - 0x00, 0x07, 0x0E, - 0x80, 0x03, 0x07, - 0xC0, 0x83, 0x07, - 0xC0, 0x81, 0x03, - 0xE0, 0xC0, 0x01, - 0xF0, 0xE0, 0x01, - 0x78, 0xF0, 0x00, - 0x38, 0x70, 0x00, - 0x3C, 0x78, 0x00, - 0xFC, 0xFF, 0x0F, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l22_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xF0, 0x07, 0xFE, 0x00, - 0xF8, 0x0F, 0xFF, 0x01, - 0x3C, 0x9F, 0xE7, 0x03, - 0x1C, 0x9E, 0xC3, 0x03, - 0x1E, 0xDC, 0x83, 0x03, - 0x1E, 0xDC, 0x83, 0x03, - 0x00, 0x1C, 0x80, 0x03, - 0x00, 0x1E, 0xC0, 0x03, - 0x00, 0x1E, 0xC0, 0x03, - 0x00, 0x0F, 0xE0, 0x01, - 0x80, 0x0F, 0xF0, 0x01, - 0xC0, 0x07, 0xF8, 0x00, - 0xC0, 0x03, 0x78, 0x00, - 0xE0, 0x01, 0x3C, 0x00, - 0xF0, 0x00, 0x1E, 0x00, - 0x78, 0x00, 0x0F, 0x00, - 0x3C, 0x80, 0x07, 0x00, - 0x3C, 0x80, 0x07, 0x00, - 0xFE, 0xDF, 0xFF, 0x03, - 0xFE, 0xDF, 0xFF, 0x03, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l23.xbm b/app/bin/bitmaps/l23.xbm deleted file mode 100644 index efb4ac4..0000000 --- a/app/bin/bitmaps/l23.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l23_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x78, 0x1E, - 0xFC, 0x3B, - 0xCC, 0x38, - 0xC0, 0x18, - 0xE0, 0x3C, - 0x70, 0x38, - 0x38, 0x33, - 0x1C, 0x3F, - 0xFC, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l23_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF0, 0xE1, 0x03, - 0xB8, 0x73, 0x07, - 0x1C, 0x3B, 0x07, - 0x1C, 0x07, 0x07, - 0x00, 0x07, 0x07, - 0x00, 0x07, 0x07, - 0x80, 0x83, 0x03, - 0xC0, 0xC3, 0x07, - 0xC0, 0x01, 0x07, - 0xE0, 0x00, 0x0E, - 0xF0, 0x00, 0x0E, - 0x78, 0x38, 0x0E, - 0x38, 0x38, 0x07, - 0x3C, 0x70, 0x07, - 0xFC, 0xE7, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l23_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xF0, 0x07, 0x7E, 0x00, - 0xF8, 0x0F, 0xFF, 0x00, - 0x3C, 0x9F, 0xE7, 0x01, - 0x1C, 0x9E, 0xC7, 0x01, - 0x1E, 0x9C, 0xC3, 0x03, - 0x1E, 0x1C, 0xC0, 0x03, - 0x00, 0x1C, 0xC0, 0x01, - 0x00, 0x1E, 0xE0, 0x01, - 0x00, 0x1E, 0xFC, 0x00, - 0x00, 0x0F, 0xFC, 0x00, - 0x80, 0x0F, 0xE0, 0x01, - 0xC0, 0x07, 0xC0, 0x03, - 0xC0, 0x03, 0x80, 0x03, - 0xE0, 0x01, 0x80, 0x03, - 0xF0, 0xC0, 0x83, 0x03, - 0x78, 0xC0, 0x83, 0x03, - 0x3C, 0x80, 0xC7, 0x03, - 0x3C, 0x80, 0xE7, 0x01, - 0xFE, 0x1F, 0xFF, 0x01, - 0xFE, 0x1F, 0x7E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l24.xbm b/app/bin/bitmaps/l24.xbm deleted file mode 100644 index 8fd49ae..0000000 --- a/app/bin/bitmaps/l24.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l24_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x78, 0x1C, - 0xFC, 0x1C, - 0xCC, 0x1E, - 0xC0, 0x1E, - 0xE0, 0x1F, - 0x70, 0x1B, - 0xB8, 0x3F, - 0x1C, 0x18, - 0xFC, 0x18, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l24_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF0, 0x81, 0x03, - 0xB8, 0x83, 0x03, - 0x1C, 0xC3, 0x03, - 0x1C, 0xC7, 0x03, - 0x00, 0xE7, 0x03, - 0x00, 0xE7, 0x03, - 0x80, 0xF3, 0x03, - 0xC0, 0xB3, 0x03, - 0xC0, 0xB9, 0x03, - 0xE0, 0x98, 0x03, - 0xF0, 0xFC, 0x0F, - 0x78, 0x80, 0x03, - 0x38, 0x80, 0x03, - 0x3C, 0x80, 0x03, - 0xFC, 0x87, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l24_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xF0, 0x07, 0xF0, 0x00, - 0xF8, 0x0F, 0xF0, 0x00, - 0x3C, 0x1F, 0xF8, 0x00, - 0x1C, 0x1E, 0xF8, 0x00, - 0x1E, 0x1C, 0xFC, 0x00, - 0x1E, 0x1C, 0xFC, 0x00, - 0x00, 0x1C, 0xFE, 0x00, - 0x00, 0x1E, 0xEE, 0x00, - 0x00, 0x1E, 0xEF, 0x00, - 0x00, 0x8F, 0xE7, 0x00, - 0x80, 0x8F, 0xE7, 0x00, - 0xC0, 0xC7, 0xE3, 0x00, - 0xC0, 0xC3, 0xE1, 0x00, - 0xE0, 0xE1, 0xFF, 0x03, - 0xF0, 0xE0, 0xFF, 0x03, - 0x78, 0x00, 0xE0, 0x00, - 0x3C, 0x00, 0xE0, 0x00, - 0x3C, 0x00, 0xE0, 0x00, - 0xFE, 0x1F, 0xE0, 0x00, - 0xFE, 0x1F, 0xE0, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l25.xbm b/app/bin/bitmaps/l25.xbm deleted file mode 100644 index 6bf1e2b..0000000 --- a/app/bin/bitmaps/l25.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l25_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x78, 0x3F, - 0xFC, 0x07, - 0xCC, 0x07, - 0xC0, 0x1F, - 0xE0, 0x3B, - 0x70, 0x30, - 0x38, 0x33, - 0x1C, 0x3F, - 0xFC, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l25_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF0, 0xF1, 0x07, - 0xB8, 0x73, 0x00, - 0x1C, 0x73, 0x00, - 0x1C, 0x37, 0x00, - 0x00, 0x37, 0x00, - 0x00, 0xFF, 0x03, - 0x80, 0x7B, 0x07, - 0xC0, 0x3B, 0x07, - 0xC0, 0x01, 0x0E, - 0xE0, 0x00, 0x0E, - 0xF0, 0x00, 0x0E, - 0x78, 0x38, 0x06, - 0x38, 0x38, 0x07, - 0x3C, 0x70, 0x07, - 0xFC, 0xE7, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l25_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xF0, 0x07, 0xFF, 0x03, - 0xF8, 0x0F, 0xFF, 0x03, - 0x3C, 0x1F, 0x07, 0x00, - 0x1C, 0x1E, 0x07, 0x00, - 0x1E, 0x9C, 0x07, 0x00, - 0x1E, 0x9C, 0x07, 0x00, - 0x00, 0x9C, 0x7F, 0x00, - 0x00, 0x9E, 0xFF, 0x01, - 0x00, 0x9E, 0xE7, 0x01, - 0x00, 0x8F, 0xC3, 0x03, - 0x80, 0x0F, 0xC0, 0x03, - 0xC0, 0x07, 0x80, 0x03, - 0xC0, 0x03, 0x80, 0x03, - 0xE0, 0x01, 0x80, 0x03, - 0xF0, 0xC0, 0x83, 0x03, - 0x78, 0xC0, 0xC3, 0x03, - 0x3C, 0x80, 0xC3, 0x03, - 0x3C, 0x80, 0xE7, 0x01, - 0xFE, 0x1F, 0xFF, 0x00, - 0xFE, 0x1F, 0x7E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l26.xbm b/app/bin/bitmaps/l26.xbm deleted file mode 100644 index ebed83b..0000000 --- a/app/bin/bitmaps/l26.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l26_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x78, 0x1E, - 0xFC, 0x3F, - 0xCC, 0x03, - 0xC0, 0x1F, - 0xE0, 0x3F, - 0x70, 0x33, - 0x38, 0x33, - 0x1C, 0x3F, - 0xFC, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l26_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF0, 0xE1, 0x03, - 0xB8, 0x73, 0x07, - 0x1C, 0x33, 0x07, - 0x1C, 0x3F, 0x00, - 0x00, 0x3F, 0x00, - 0x00, 0x3F, 0x00, - 0x80, 0xFB, 0x03, - 0xC0, 0x7B, 0x07, - 0xC0, 0x39, 0x07, - 0xE0, 0x38, 0x0E, - 0xF0, 0x38, 0x0E, - 0x78, 0x38, 0x0E, - 0x38, 0x30, 0x07, - 0x3C, 0x70, 0x07, - 0xFC, 0xE7, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l26_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xF0, 0x07, 0xFC, 0x00, - 0xF8, 0x0F, 0xFF, 0x01, - 0x3C, 0x1F, 0xEF, 0x01, - 0x1C, 0x9E, 0xC7, 0x03, - 0x1E, 0x9C, 0xC3, 0x03, - 0x1E, 0x9C, 0x03, 0x00, - 0x00, 0xDC, 0x03, 0x00, - 0x00, 0xDE, 0x7F, 0x00, - 0x00, 0xDE, 0xFF, 0x01, - 0x00, 0xCF, 0xEF, 0x01, - 0x80, 0xCF, 0xC7, 0x03, - 0xC0, 0xC7, 0x83, 0x03, - 0xC0, 0xC3, 0x83, 0x03, - 0xE0, 0xC1, 0x83, 0x03, - 0xF0, 0xC0, 0x83, 0x03, - 0x78, 0x80, 0x83, 0x03, - 0x3C, 0x80, 0xC7, 0x03, - 0x3C, 0x80, 0xEF, 0x01, - 0xFE, 0x1F, 0xFF, 0x01, - 0xFE, 0x1F, 0x7C, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l27.xbm b/app/bin/bitmaps/l27.xbm deleted file mode 100644 index d611f65..0000000 --- a/app/bin/bitmaps/l27.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l27_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x78, 0x3F, - 0xFC, 0x38, - 0xCC, 0x18, - 0xC0, 0x1C, - 0xE0, 0x0C, - 0x70, 0x0E, - 0x38, 0x0E, - 0x1C, 0x06, - 0xFC, 0x06, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l27_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF0, 0xF9, 0x0F, - 0xB8, 0x03, 0x0F, - 0x1C, 0x03, 0x07, - 0x1C, 0x87, 0x03, - 0x00, 0x87, 0x03, - 0x00, 0xC7, 0x01, - 0x80, 0xC3, 0x01, - 0xC0, 0xC3, 0x01, - 0xC0, 0xE1, 0x00, - 0xE0, 0xE0, 0x00, - 0xF0, 0xE0, 0x00, - 0x78, 0xE0, 0x00, - 0x38, 0xE0, 0x00, - 0x3C, 0x70, 0x00, - 0xFC, 0x77, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l27_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xF0, 0xC7, 0xFF, 0x03, - 0xF8, 0xCF, 0xFF, 0x03, - 0x3C, 0x1F, 0xC0, 0x03, - 0x1C, 0x1E, 0xE0, 0x01, - 0x1E, 0x1C, 0xE0, 0x01, - 0x1E, 0x1C, 0xF0, 0x00, - 0x00, 0x1C, 0xF0, 0x00, - 0x00, 0x1E, 0x78, 0x00, - 0x00, 0x1E, 0x78, 0x00, - 0x00, 0x0F, 0x38, 0x00, - 0x80, 0x0F, 0x3C, 0x00, - 0xC0, 0x07, 0x3C, 0x00, - 0xC0, 0x03, 0x1C, 0x00, - 0xE0, 0x01, 0x1E, 0x00, - 0xF0, 0x00, 0x1E, 0x00, - 0x78, 0x00, 0x1E, 0x00, - 0x3C, 0x00, 0x1E, 0x00, - 0x3C, 0x00, 0x0E, 0x00, - 0xFE, 0x1F, 0x0E, 0x00, - 0xFE, 0x1F, 0x0E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l28.xbm b/app/bin/bitmaps/l28.xbm deleted file mode 100644 index d5ae122..0000000 --- a/app/bin/bitmaps/l28.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l28_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x78, 0x1E, - 0xFC, 0x3F, - 0xCC, 0x3B, - 0xC0, 0x3F, - 0xE0, 0x1E, - 0x70, 0x3F, - 0x38, 0x33, - 0x1C, 0x3F, - 0xFC, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l28_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF0, 0xE1, 0x03, - 0xB8, 0x73, 0x07, - 0x1C, 0x33, 0x07, - 0x1C, 0x3F, 0x07, - 0x00, 0x3F, 0x07, - 0x00, 0x3F, 0x07, - 0x80, 0x73, 0x07, - 0xC0, 0xE3, 0x03, - 0xC0, 0x71, 0x07, - 0xE0, 0x38, 0x06, - 0xF0, 0x38, 0x0E, - 0x78, 0x38, 0x0E, - 0x38, 0x38, 0x06, - 0x3C, 0x70, 0x07, - 0xFC, 0xE7, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l28_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xF0, 0x07, 0x7E, 0x00, - 0xF8, 0x0F, 0xFF, 0x00, - 0x3C, 0x9F, 0xEF, 0x01, - 0x1C, 0x9E, 0xC7, 0x01, - 0x1E, 0x9C, 0xC3, 0x03, - 0x1E, 0x9C, 0xC3, 0x03, - 0x00, 0x9C, 0xC7, 0x01, - 0x00, 0x1E, 0xEF, 0x01, - 0x00, 0x1E, 0xFE, 0x00, - 0x00, 0x0F, 0xFF, 0x00, - 0x80, 0x8F, 0xE7, 0x01, - 0xC0, 0x87, 0xC3, 0x03, - 0xC0, 0xC3, 0x83, 0x03, - 0xE0, 0xC1, 0x83, 0x03, - 0xF0, 0xC0, 0x83, 0x03, - 0x78, 0xC0, 0x83, 0x03, - 0x3C, 0x80, 0xC3, 0x03, - 0x3C, 0x80, 0xE7, 0x01, - 0xFE, 0x1F, 0xFF, 0x01, - 0xFE, 0x1F, 0x7E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l29.xbm b/app/bin/bitmaps/l29.xbm deleted file mode 100644 index 7b23c07..0000000 --- a/app/bin/bitmaps/l29.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l29_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x78, 0x1E, - 0xFC, 0x3F, - 0xCC, 0x33, - 0xC0, 0x33, - 0xE0, 0x3F, - 0x70, 0x3E, - 0x38, 0x30, - 0x1C, 0x3B, - 0xFC, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l29_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF0, 0xE1, 0x01, - 0xB8, 0x73, 0x07, - 0x1C, 0x3B, 0x07, - 0x1C, 0x3F, 0x06, - 0x00, 0x3F, 0x0E, - 0x00, 0x3F, 0x0E, - 0x80, 0x3B, 0x0F, - 0xC0, 0x73, 0x0F, - 0xC0, 0xE1, 0x0F, - 0xE0, 0x00, 0x0E, - 0xF0, 0x00, 0x06, - 0x78, 0x00, 0x06, - 0x38, 0x38, 0x07, - 0x3C, 0x70, 0x03, - 0xFC, 0xF7, 0x01, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l29_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xF0, 0x07, 0x7E, 0x00, - 0xF8, 0x0F, 0xFF, 0x00, - 0x3C, 0x9F, 0xEF, 0x01, - 0x1C, 0x9E, 0xC7, 0x01, - 0x1E, 0xDC, 0x83, 0x03, - 0x1E, 0xDC, 0x83, 0x03, - 0x00, 0xDC, 0x83, 0x03, - 0x00, 0xDE, 0x83, 0x03, - 0x00, 0xDE, 0x83, 0x03, - 0x00, 0x8F, 0xC3, 0x03, - 0x80, 0x8F, 0xE7, 0x03, - 0xC0, 0x07, 0xFF, 0x03, - 0xC0, 0x03, 0xFE, 0x03, - 0xE0, 0x01, 0x80, 0x03, - 0xF0, 0x00, 0x80, 0x03, - 0x78, 0x80, 0xC3, 0x03, - 0x3C, 0x80, 0xC3, 0x01, - 0x3C, 0x80, 0xE7, 0x01, - 0xFE, 0x1F, 0xFF, 0x00, - 0xFE, 0x1F, 0x7E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l3.xbm b/app/bin/bitmaps/l3.xbm deleted file mode 100644 index 070b9bb..0000000 --- a/app/bin/bitmaps/l3.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l3_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0xC0, 0x03, - 0x60, 0x07, - 0x00, 0x07, - 0x00, 0x03, - 0x80, 0x07, - 0x00, 0x07, - 0x60, 0x06, - 0xE0, 0x07, - 0xC0, 0x03, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l3_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x1F, 0x00, - 0x80, 0x3B, 0x00, - 0xC0, 0x39, 0x00, - 0x00, 0x38, 0x00, - 0x00, 0x38, 0x00, - 0x00, 0x38, 0x00, - 0x00, 0x1C, 0x00, - 0x00, 0x3E, 0x00, - 0x00, 0x38, 0x00, - 0x00, 0x70, 0x00, - 0x00, 0x70, 0x00, - 0xC0, 0x71, 0x00, - 0xC0, 0x39, 0x00, - 0x80, 0x3B, 0x00, - 0x00, 0x1F, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l3_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0xFC, 0x00, 0x00, - 0x00, 0xFE, 0x01, 0x00, - 0x00, 0xCF, 0x03, 0x00, - 0x00, 0x8F, 0x03, 0x00, - 0x00, 0x87, 0x07, 0x00, - 0x00, 0x80, 0x07, 0x00, - 0x00, 0x80, 0x03, 0x00, - 0x00, 0xC0, 0x03, 0x00, - 0x00, 0xF8, 0x01, 0x00, - 0x00, 0xF8, 0x01, 0x00, - 0x00, 0xC0, 0x03, 0x00, - 0x00, 0x80, 0x07, 0x00, - 0x00, 0x00, 0x07, 0x00, - 0x00, 0x00, 0x07, 0x00, - 0x80, 0x07, 0x07, 0x00, - 0x80, 0x07, 0x07, 0x00, - 0x00, 0x8F, 0x07, 0x00, - 0x00, 0xCF, 0x03, 0x00, - 0x00, 0xFE, 0x03, 0x00, - 0x00, 0xFC, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l30.xbm b/app/bin/bitmaps/l30.xbm deleted file mode 100644 index 324f979..0000000 --- a/app/bin/bitmaps/l30.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l30_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x78, 0x1E, - 0xEC, 0x3F, - 0xE0, 0x33, - 0x60, 0x33, - 0xF0, 0x33, - 0xE0, 0x33, - 0xCC, 0x33, - 0xFC, 0x3F, - 0x78, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l30_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF0, 0xE1, 0x03, - 0xB8, 0x73, 0x07, - 0x9C, 0x33, 0x07, - 0x80, 0x3B, 0x06, - 0x80, 0x3B, 0x06, - 0x80, 0x3B, 0x0E, - 0xC0, 0x39, 0x0E, - 0xE0, 0x3B, 0x0E, - 0x80, 0x3B, 0x0E, - 0x00, 0x3F, 0x0E, - 0x00, 0x3F, 0x06, - 0x1C, 0x3F, 0x06, - 0x9C, 0x33, 0x07, - 0xB8, 0x73, 0x07, - 0xF0, 0xE1, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l30_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xF0, 0x03, 0x7E, 0x00, - 0xF8, 0x07, 0xFF, 0x00, - 0x3C, 0x0F, 0xEF, 0x01, - 0x3C, 0x8E, 0xC7, 0x01, - 0x1C, 0x9E, 0xC3, 0x03, - 0x00, 0x9E, 0xC3, 0x03, - 0x00, 0xCE, 0x83, 0x03, - 0x00, 0xCF, 0x83, 0x03, - 0xE0, 0xC7, 0x83, 0x03, - 0xE0, 0xC7, 0x83, 0x03, - 0x00, 0xCF, 0x83, 0x03, - 0x00, 0xDE, 0x83, 0x03, - 0x00, 0xDC, 0x83, 0x03, - 0x00, 0xDC, 0x83, 0x03, - 0x1E, 0x9C, 0xC3, 0x03, - 0x1E, 0x9C, 0xC3, 0x03, - 0x3C, 0x9E, 0xC7, 0x01, - 0x3C, 0x0F, 0xEF, 0x01, - 0xF8, 0x0F, 0xFF, 0x00, - 0xF0, 0x03, 0x7E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l31.xbm b/app/bin/bitmaps/l31.xbm deleted file mode 100644 index e379ca6..0000000 --- a/app/bin/bitmaps/l31.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l31_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x78, 0x1C, - 0xEC, 0x1E, - 0xE0, 0x1F, - 0x60, 0x1C, - 0xF0, 0x1C, - 0xE0, 0x1C, - 0xCC, 0x1C, - 0xFC, 0x1C, - 0x78, 0x1C, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l31_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF0, 0x81, 0x03, - 0xB8, 0xC3, 0x03, - 0x9C, 0xC3, 0x03, - 0x80, 0xE3, 0x03, - 0x80, 0xB3, 0x03, - 0x80, 0x83, 0x03, - 0xC0, 0x81, 0x03, - 0xE0, 0x83, 0x03, - 0x80, 0x83, 0x03, - 0x00, 0x87, 0x03, - 0x00, 0x87, 0x03, - 0x1C, 0x87, 0x03, - 0x9C, 0x83, 0x03, - 0xB8, 0x83, 0x03, - 0xF0, 0x81, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l31_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xF0, 0x03, 0x70, 0x00, - 0xF8, 0x07, 0x70, 0x00, - 0x3C, 0x0F, 0x78, 0x00, - 0x3C, 0x0E, 0x7C, 0x00, - 0x1C, 0x1E, 0x7E, 0x00, - 0x00, 0x1E, 0x7F, 0x00, - 0x00, 0x0E, 0x73, 0x00, - 0x00, 0x0F, 0x70, 0x00, - 0xE0, 0x07, 0x70, 0x00, - 0xE0, 0x07, 0x70, 0x00, - 0x00, 0x0F, 0x70, 0x00, - 0x00, 0x1E, 0x70, 0x00, - 0x00, 0x1C, 0x70, 0x00, - 0x00, 0x1C, 0x70, 0x00, - 0x1E, 0x1C, 0x70, 0x00, - 0x1E, 0x1C, 0x70, 0x00, - 0x3C, 0x1E, 0x70, 0x00, - 0x3C, 0x0F, 0x70, 0x00, - 0xF8, 0x0F, 0x70, 0x00, - 0xF0, 0x03, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l32.xbm b/app/bin/bitmaps/l32.xbm deleted file mode 100644 index 3cbaaac..0000000 --- a/app/bin/bitmaps/l32.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l32_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x78, 0x1E, - 0xEC, 0x3F, - 0xE0, 0x33, - 0x60, 0x30, - 0xF0, 0x38, - 0xE0, 0x1C, - 0xCC, 0x0E, - 0xFC, 0x07, - 0x78, 0x3F, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l32_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF0, 0xE1, 0x03, - 0xB8, 0x73, 0x07, - 0x9C, 0x3B, 0x06, - 0x80, 0x3B, 0x0E, - 0x80, 0x03, 0x0E, - 0x80, 0x03, 0x0E, - 0xC0, 0x01, 0x07, - 0xE0, 0x83, 0x07, - 0x80, 0x83, 0x03, - 0x00, 0xC7, 0x01, - 0x00, 0xE7, 0x01, - 0x1C, 0xF7, 0x00, - 0x9C, 0x73, 0x00, - 0xB8, 0x7B, 0x00, - 0xF0, 0xF9, 0x0F, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l32_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xF0, 0x03, 0xFE, 0x00, - 0xF8, 0x07, 0xFF, 0x01, - 0x3C, 0x8F, 0xE7, 0x03, - 0x3C, 0x8E, 0xC3, 0x03, - 0x1C, 0xDE, 0x83, 0x03, - 0x00, 0xDE, 0x83, 0x03, - 0x00, 0x0E, 0x80, 0x03, - 0x00, 0x0F, 0xC0, 0x03, - 0xE0, 0x07, 0xC0, 0x03, - 0xE0, 0x07, 0xE0, 0x01, - 0x00, 0x0F, 0xF0, 0x01, - 0x00, 0x1E, 0xF8, 0x00, - 0x00, 0x1C, 0x78, 0x00, - 0x00, 0x1C, 0x3C, 0x00, - 0x1E, 0x1C, 0x1E, 0x00, - 0x1E, 0x1C, 0x0F, 0x00, - 0x3C, 0x9E, 0x07, 0x00, - 0x3C, 0x8F, 0x07, 0x00, - 0xF8, 0xCF, 0xFF, 0x03, - 0xF0, 0xC3, 0xFF, 0x03, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l33.xbm b/app/bin/bitmaps/l33.xbm deleted file mode 100644 index 8d318c6..0000000 --- a/app/bin/bitmaps/l33.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l33_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x78, 0x1E, - 0xEC, 0x3B, - 0xE0, 0x38, - 0x60, 0x18, - 0xF0, 0x3C, - 0xE0, 0x38, - 0xCC, 0x33, - 0xFC, 0x3F, - 0x78, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l33_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF0, 0xE1, 0x03, - 0xB8, 0x73, 0x07, - 0x9C, 0x3B, 0x07, - 0x80, 0x03, 0x07, - 0x80, 0x03, 0x07, - 0x80, 0x03, 0x07, - 0xC0, 0x81, 0x03, - 0xE0, 0xC3, 0x07, - 0x80, 0x03, 0x07, - 0x00, 0x07, 0x0E, - 0x00, 0x07, 0x0E, - 0x1C, 0x3F, 0x0E, - 0x9C, 0x3B, 0x07, - 0xB8, 0x73, 0x07, - 0xF0, 0xE1, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l33_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xF0, 0x03, 0x7E, 0x00, - 0xF8, 0x07, 0xFF, 0x00, - 0x3C, 0x8F, 0xE7, 0x01, - 0x3C, 0x8E, 0xC7, 0x01, - 0x1C, 0x9E, 0xC3, 0x03, - 0x00, 0x1E, 0xC0, 0x03, - 0x00, 0x0E, 0xC0, 0x01, - 0x00, 0x0F, 0xE0, 0x01, - 0xE0, 0x07, 0xFC, 0x00, - 0xE0, 0x07, 0xFC, 0x00, - 0x00, 0x0F, 0xE0, 0x01, - 0x00, 0x1E, 0xC0, 0x03, - 0x00, 0x1C, 0x80, 0x03, - 0x00, 0x1C, 0x80, 0x03, - 0x1E, 0xDC, 0x83, 0x03, - 0x1E, 0xDC, 0x83, 0x03, - 0x3C, 0x9E, 0xC7, 0x03, - 0x3C, 0x8F, 0xE7, 0x01, - 0xF8, 0x0F, 0xFF, 0x01, - 0xF0, 0x03, 0x7E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l34.xbm b/app/bin/bitmaps/l34.xbm deleted file mode 100644 index 4e90020..0000000 --- a/app/bin/bitmaps/l34.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l34_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x78, 0x1C, - 0xEC, 0x1C, - 0xE0, 0x1E, - 0x60, 0x1E, - 0xF0, 0x1F, - 0xE0, 0x1B, - 0xCC, 0x3F, - 0xFC, 0x18, - 0x78, 0x18, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l34_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF0, 0x81, 0x03, - 0xB8, 0x83, 0x03, - 0x9C, 0xC3, 0x03, - 0x80, 0xC3, 0x03, - 0x80, 0xE3, 0x03, - 0x80, 0xE3, 0x03, - 0xC0, 0xF1, 0x03, - 0xE0, 0xB3, 0x03, - 0x80, 0xBB, 0x03, - 0x00, 0x9F, 0x03, - 0x00, 0xFF, 0x0F, - 0x1C, 0x87, 0x03, - 0x9C, 0x83, 0x03, - 0xB8, 0x83, 0x03, - 0xF0, 0x81, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l34_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xF0, 0x03, 0xF0, 0x00, - 0xF8, 0x07, 0xF0, 0x00, - 0x3C, 0x0F, 0xF8, 0x00, - 0x3C, 0x0E, 0xF8, 0x00, - 0x1C, 0x1E, 0xFC, 0x00, - 0x00, 0x1E, 0xFC, 0x00, - 0x00, 0x0E, 0xFE, 0x00, - 0x00, 0x0F, 0xEE, 0x00, - 0xE0, 0x07, 0xEF, 0x00, - 0xE0, 0x87, 0xE7, 0x00, - 0x00, 0x8F, 0xE7, 0x00, - 0x00, 0xDE, 0xE3, 0x00, - 0x00, 0xDC, 0xE1, 0x00, - 0x00, 0xFC, 0xFF, 0x03, - 0x1E, 0xFC, 0xFF, 0x03, - 0x1E, 0x1C, 0xE0, 0x00, - 0x3C, 0x1E, 0xE0, 0x00, - 0x3C, 0x0F, 0xE0, 0x00, - 0xF8, 0x0F, 0xE0, 0x00, - 0xF0, 0x03, 0xE0, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l35.xbm b/app/bin/bitmaps/l35.xbm deleted file mode 100644 index f8de169..0000000 --- a/app/bin/bitmaps/l35.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l35_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x78, 0x3F, - 0xEC, 0x07, - 0xE0, 0x07, - 0x60, 0x1F, - 0xF0, 0x3B, - 0xE0, 0x30, - 0xCC, 0x33, - 0xFC, 0x3F, - 0x78, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l35_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF0, 0xF1, 0x07, - 0xB8, 0x73, 0x00, - 0x9C, 0x73, 0x00, - 0x80, 0x33, 0x00, - 0x80, 0x33, 0x00, - 0x80, 0xFB, 0x03, - 0xC0, 0x79, 0x07, - 0xE0, 0x3B, 0x07, - 0x80, 0x03, 0x0E, - 0x00, 0x07, 0x0E, - 0x00, 0x07, 0x0E, - 0x1C, 0x3F, 0x06, - 0x9C, 0x3B, 0x07, - 0xB8, 0x73, 0x07, - 0xF0, 0xE1, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l35_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xF0, 0x03, 0xFF, 0x03, - 0xF8, 0x07, 0xFF, 0x03, - 0x3C, 0x0F, 0x07, 0x00, - 0x3C, 0x0E, 0x07, 0x00, - 0x1C, 0x9E, 0x07, 0x00, - 0x00, 0x9E, 0x07, 0x00, - 0x00, 0x8E, 0x7F, 0x00, - 0x00, 0x8F, 0xFF, 0x01, - 0xE0, 0x87, 0xE7, 0x01, - 0xE0, 0x87, 0xC3, 0x03, - 0x00, 0x0F, 0xC0, 0x03, - 0x00, 0x1E, 0x80, 0x03, - 0x00, 0x1C, 0x80, 0x03, - 0x00, 0x1C, 0x80, 0x03, - 0x1E, 0xDC, 0x83, 0x03, - 0x1E, 0xDC, 0xC3, 0x03, - 0x3C, 0x9E, 0xC3, 0x03, - 0x3C, 0x8F, 0xE7, 0x01, - 0xF8, 0x0F, 0xFF, 0x00, - 0xF0, 0x03, 0x7E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l36.xbm b/app/bin/bitmaps/l36.xbm deleted file mode 100644 index c3c19eb..0000000 --- a/app/bin/bitmaps/l36.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l36_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x78, 0x1E, - 0xEC, 0x3F, - 0xE0, 0x03, - 0x60, 0x1F, - 0xF0, 0x3F, - 0xE0, 0x33, - 0xCC, 0x33, - 0xFC, 0x3F, - 0x78, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l36_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF0, 0xE1, 0x03, - 0xB8, 0x73, 0x07, - 0x9C, 0x33, 0x07, - 0x80, 0x3B, 0x00, - 0x80, 0x3B, 0x00, - 0x80, 0x3B, 0x00, - 0xC0, 0xF9, 0x03, - 0xE0, 0x7B, 0x07, - 0x80, 0x3B, 0x07, - 0x00, 0x3F, 0x0E, - 0x00, 0x3F, 0x0E, - 0x1C, 0x3F, 0x0E, - 0x9C, 0x33, 0x07, - 0xB8, 0x73, 0x07, - 0xF0, 0xE1, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l36_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xF0, 0x03, 0xFC, 0x00, - 0xF8, 0x07, 0xFF, 0x01, - 0x3C, 0x0F, 0xEF, 0x01, - 0x3C, 0x8E, 0xC7, 0x03, - 0x1C, 0x9E, 0xC3, 0x03, - 0x00, 0x9E, 0x03, 0x00, - 0x00, 0xCE, 0x03, 0x00, - 0x00, 0xCF, 0x7F, 0x00, - 0xE0, 0xC7, 0xFF, 0x01, - 0xE0, 0xC7, 0xEF, 0x01, - 0x00, 0xCF, 0xC7, 0x03, - 0x00, 0xDE, 0x83, 0x03, - 0x00, 0xDC, 0x83, 0x03, - 0x00, 0xDC, 0x83, 0x03, - 0x1E, 0xDC, 0x83, 0x03, - 0x1E, 0x9C, 0x83, 0x03, - 0x3C, 0x9E, 0xC7, 0x03, - 0x3C, 0x8F, 0xEF, 0x01, - 0xF8, 0x0F, 0xFF, 0x01, - 0xF0, 0x03, 0x7C, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l37.xbm b/app/bin/bitmaps/l37.xbm deleted file mode 100644 index df579f5..0000000 --- a/app/bin/bitmaps/l37.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l37_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x78, 0x3F, - 0xEC, 0x38, - 0xE0, 0x18, - 0x60, 0x1C, - 0xF0, 0x0C, - 0xE0, 0x0E, - 0xCC, 0x0E, - 0xFC, 0x06, - 0x78, 0x06, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l37_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF0, 0xF9, 0x0F, - 0xB8, 0x03, 0x0F, - 0x9C, 0x03, 0x07, - 0x80, 0x83, 0x03, - 0x80, 0x83, 0x03, - 0x80, 0xC3, 0x01, - 0xC0, 0xC1, 0x01, - 0xE0, 0xC3, 0x01, - 0x80, 0xE3, 0x00, - 0x00, 0xE7, 0x00, - 0x00, 0xE7, 0x00, - 0x1C, 0xE7, 0x00, - 0x9C, 0xE3, 0x00, - 0xB8, 0x73, 0x00, - 0xF0, 0x71, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l37_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xF0, 0xC3, 0xFF, 0x03, - 0xF8, 0xC7, 0xFF, 0x03, - 0x3C, 0x0F, 0xC0, 0x03, - 0x3C, 0x0E, 0xE0, 0x01, - 0x1C, 0x1E, 0xE0, 0x01, - 0x00, 0x1E, 0xF0, 0x00, - 0x00, 0x0E, 0xF0, 0x00, - 0x00, 0x0F, 0x78, 0x00, - 0xE0, 0x07, 0x78, 0x00, - 0xE0, 0x07, 0x38, 0x00, - 0x00, 0x0F, 0x3C, 0x00, - 0x00, 0x1E, 0x3C, 0x00, - 0x00, 0x1C, 0x1C, 0x00, - 0x00, 0x1C, 0x1E, 0x00, - 0x1E, 0x1C, 0x1E, 0x00, - 0x1E, 0x1C, 0x1E, 0x00, - 0x3C, 0x1E, 0x1E, 0x00, - 0x3C, 0x0F, 0x0E, 0x00, - 0xF8, 0x0F, 0x0E, 0x00, - 0xF0, 0x03, 0x0E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l38.xbm b/app/bin/bitmaps/l38.xbm deleted file mode 100644 index 424b263..0000000 --- a/app/bin/bitmaps/l38.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l38_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x78, 0x1E, - 0xEC, 0x3F, - 0xE0, 0x3B, - 0x60, 0x3F, - 0xF0, 0x1E, - 0xE0, 0x3F, - 0xCC, 0x33, - 0xFC, 0x3F, - 0x78, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l38_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF0, 0xE1, 0x03, - 0xB8, 0x73, 0x07, - 0x9C, 0x33, 0x07, - 0x80, 0x3B, 0x07, - 0x80, 0x3B, 0x07, - 0x80, 0x3B, 0x07, - 0xC0, 0x71, 0x07, - 0xE0, 0xE3, 0x03, - 0x80, 0x73, 0x07, - 0x00, 0x3F, 0x06, - 0x00, 0x3F, 0x0E, - 0x1C, 0x3F, 0x0E, - 0x9C, 0x3B, 0x06, - 0xB8, 0x73, 0x07, - 0xF0, 0xE1, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l38_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xF0, 0x03, 0x7E, 0x00, - 0xF8, 0x07, 0xFF, 0x00, - 0x3C, 0x8F, 0xEF, 0x01, - 0x3C, 0x8E, 0xC7, 0x01, - 0x1C, 0x9E, 0xC3, 0x03, - 0x00, 0x9E, 0xC3, 0x03, - 0x00, 0x8E, 0xC7, 0x01, - 0x00, 0x0F, 0xEF, 0x01, - 0xE0, 0x07, 0xFE, 0x00, - 0xE0, 0x07, 0xFF, 0x00, - 0x00, 0x8F, 0xE7, 0x01, - 0x00, 0x9E, 0xC3, 0x03, - 0x00, 0xDC, 0x83, 0x03, - 0x00, 0xDC, 0x83, 0x03, - 0x1E, 0xDC, 0x83, 0x03, - 0x1E, 0xDC, 0x83, 0x03, - 0x3C, 0x9E, 0xC3, 0x03, - 0x3C, 0x8F, 0xE7, 0x01, - 0xF8, 0x0F, 0xFF, 0x01, - 0xF0, 0x03, 0x7E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l39.xbm b/app/bin/bitmaps/l39.xbm deleted file mode 100644 index 51d14ab..0000000 --- a/app/bin/bitmaps/l39.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l39_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x78, 0x1E, - 0xEC, 0x3F, - 0xE0, 0x33, - 0x60, 0x33, - 0xF0, 0x3F, - 0xE0, 0x3E, - 0xCC, 0x30, - 0xFC, 0x3B, - 0x78, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l39_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF0, 0xE1, 0x01, - 0xB8, 0x73, 0x07, - 0x9C, 0x3B, 0x07, - 0x80, 0x3B, 0x06, - 0x80, 0x3B, 0x0E, - 0x80, 0x3B, 0x0E, - 0xC0, 0x39, 0x0F, - 0xE0, 0x73, 0x0F, - 0x80, 0xE3, 0x0F, - 0x00, 0x07, 0x0E, - 0x00, 0x07, 0x06, - 0x1C, 0x07, 0x06, - 0x9C, 0x3B, 0x07, - 0xB8, 0x73, 0x03, - 0xF0, 0xF1, 0x01, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l39_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xF0, 0x03, 0x7E, 0x00, - 0xF8, 0x07, 0xFF, 0x00, - 0x3C, 0x8F, 0xEF, 0x01, - 0x3C, 0x8E, 0xC7, 0x01, - 0x1C, 0xDE, 0x83, 0x03, - 0x00, 0xDE, 0x83, 0x03, - 0x00, 0xCE, 0x83, 0x03, - 0x00, 0xCF, 0x83, 0x03, - 0xE0, 0xC7, 0x83, 0x03, - 0xE0, 0x87, 0xC3, 0x03, - 0x00, 0x8F, 0xE7, 0x03, - 0x00, 0x1E, 0xFF, 0x03, - 0x00, 0x1C, 0xFE, 0x03, - 0x00, 0x1C, 0x80, 0x03, - 0x1E, 0x1C, 0x80, 0x03, - 0x1E, 0x9C, 0xC3, 0x03, - 0x3C, 0x9E, 0xC3, 0x01, - 0x3C, 0x8F, 0xE7, 0x01, - 0xF8, 0x0F, 0xFF, 0x00, - 0xF0, 0x03, 0x7E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l4.xbm b/app/bin/bitmaps/l4.xbm deleted file mode 100644 index 411ad63..0000000 --- a/app/bin/bitmaps/l4.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l4_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x80, 0x03, - 0x80, 0x03, - 0xC0, 0x03, - 0xC0, 0x03, - 0xE0, 0x03, - 0x60, 0x03, - 0xF0, 0x07, - 0x00, 0x03, - 0x00, 0x03, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l4_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x1C, 0x00, - 0x00, 0x1C, 0x00, - 0x00, 0x1E, 0x00, - 0x00, 0x1E, 0x00, - 0x00, 0x1F, 0x00, - 0x00, 0x1F, 0x00, - 0x80, 0x1F, 0x00, - 0x80, 0x1D, 0x00, - 0xC0, 0x1D, 0x00, - 0xC0, 0x1C, 0x00, - 0xE0, 0x7F, 0x00, - 0x00, 0x1C, 0x00, - 0x00, 0x1C, 0x00, - 0x00, 0x1C, 0x00, - 0x00, 0x1C, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l4_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0xE0, 0x01, 0x00, - 0x00, 0xE0, 0x01, 0x00, - 0x00, 0xF0, 0x01, 0x00, - 0x00, 0xF0, 0x01, 0x00, - 0x00, 0xF8, 0x01, 0x00, - 0x00, 0xF8, 0x01, 0x00, - 0x00, 0xFC, 0x01, 0x00, - 0x00, 0xDC, 0x01, 0x00, - 0x00, 0xDE, 0x01, 0x00, - 0x00, 0xCF, 0x01, 0x00, - 0x00, 0xCF, 0x01, 0x00, - 0x80, 0xC7, 0x01, 0x00, - 0x80, 0xC3, 0x01, 0x00, - 0xC0, 0xFF, 0x07, 0x00, - 0xC0, 0xFF, 0x07, 0x00, - 0x00, 0xC0, 0x01, 0x00, - 0x00, 0xC0, 0x01, 0x00, - 0x00, 0xC0, 0x01, 0x00, - 0x00, 0xC0, 0x01, 0x00, - 0x00, 0xC0, 0x01, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l40.xbm b/app/bin/bitmaps/l40.xbm deleted file mode 100644 index 8ee8e0f..0000000 --- a/app/bin/bitmaps/l40.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l40_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x70, 0x1E, - 0x70, 0x3F, - 0x78, 0x33, - 0x78, 0x33, - 0x7C, 0x33, - 0x6C, 0x33, - 0xFE, 0x33, - 0x60, 0x3F, - 0x60, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l40_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xC0, 0xE1, 0x03, - 0xC0, 0x71, 0x07, - 0xE0, 0x31, 0x07, - 0xE0, 0x39, 0x06, - 0xF0, 0x39, 0x06, - 0xF0, 0x39, 0x0E, - 0xF8, 0x39, 0x0E, - 0xD8, 0x39, 0x0E, - 0xDC, 0x39, 0x0E, - 0xCC, 0x39, 0x0E, - 0xFE, 0x3F, 0x06, - 0xC0, 0x39, 0x06, - 0xC0, 0x31, 0x07, - 0xC0, 0x71, 0x07, - 0xC0, 0xE1, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l40_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x80, 0x07, 0x7E, 0x00, - 0x80, 0x07, 0xFF, 0x00, - 0xC0, 0x07, 0xEF, 0x01, - 0xC0, 0x87, 0xC7, 0x01, - 0xE0, 0x87, 0xC3, 0x03, - 0xE0, 0x87, 0xC3, 0x03, - 0xF0, 0xC7, 0x83, 0x03, - 0x70, 0xC7, 0x83, 0x03, - 0x78, 0xC7, 0x83, 0x03, - 0x3C, 0xC7, 0x83, 0x03, - 0x3C, 0xC7, 0x83, 0x03, - 0x1E, 0xC7, 0x83, 0x03, - 0x0E, 0xC7, 0x83, 0x03, - 0xFF, 0xDF, 0x83, 0x03, - 0xFF, 0x9F, 0xC3, 0x03, - 0x00, 0x87, 0xC3, 0x03, - 0x00, 0x87, 0xC7, 0x01, - 0x00, 0x07, 0xEF, 0x01, - 0x00, 0x07, 0xFF, 0x00, - 0x00, 0x07, 0x7E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l41.xbm b/app/bin/bitmaps/l41.xbm deleted file mode 100644 index 8535fda..0000000 --- a/app/bin/bitmaps/l41.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l41_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x70, 0x1C, - 0x70, 0x1E, - 0x78, 0x1F, - 0x78, 0x1C, - 0x7C, 0x1C, - 0x6C, 0x1C, - 0xFE, 0x1C, - 0x60, 0x1C, - 0x60, 0x1C, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l41_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xC0, 0x81, 0x03, - 0xC0, 0xC1, 0x03, - 0xE0, 0xC1, 0x03, - 0xE0, 0xE1, 0x03, - 0xF0, 0xB1, 0x03, - 0xF0, 0x81, 0x03, - 0xF8, 0x81, 0x03, - 0xD8, 0x81, 0x03, - 0xDC, 0x81, 0x03, - 0xCC, 0x81, 0x03, - 0xFE, 0x87, 0x03, - 0xC0, 0x81, 0x03, - 0xC0, 0x81, 0x03, - 0xC0, 0x81, 0x03, - 0xC0, 0x81, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l41_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x80, 0x07, 0x70, 0x00, - 0x80, 0x07, 0x70, 0x00, - 0xC0, 0x07, 0x78, 0x00, - 0xC0, 0x07, 0x7C, 0x00, - 0xE0, 0x07, 0x7E, 0x00, - 0xE0, 0x07, 0x7F, 0x00, - 0xF0, 0x07, 0x73, 0x00, - 0x70, 0x07, 0x70, 0x00, - 0x78, 0x07, 0x70, 0x00, - 0x3C, 0x07, 0x70, 0x00, - 0x3C, 0x07, 0x70, 0x00, - 0x1E, 0x07, 0x70, 0x00, - 0x0E, 0x07, 0x70, 0x00, - 0xFF, 0x1F, 0x70, 0x00, - 0xFF, 0x1F, 0x70, 0x00, - 0x00, 0x07, 0x70, 0x00, - 0x00, 0x07, 0x70, 0x00, - 0x00, 0x07, 0x70, 0x00, - 0x00, 0x07, 0x70, 0x00, - 0x00, 0x07, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l42.xbm b/app/bin/bitmaps/l42.xbm deleted file mode 100644 index 1b1b742..0000000 --- a/app/bin/bitmaps/l42.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l42_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x70, 0x1E, - 0x70, 0x3F, - 0x78, 0x33, - 0x78, 0x30, - 0x7C, 0x38, - 0x6C, 0x1C, - 0xFE, 0x0E, - 0x60, 0x07, - 0x60, 0x3F, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l42_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xC0, 0xE1, 0x03, - 0xC0, 0x71, 0x07, - 0xE0, 0x39, 0x06, - 0xE0, 0x39, 0x0E, - 0xF0, 0x01, 0x0E, - 0xF0, 0x01, 0x0E, - 0xF8, 0x01, 0x07, - 0xD8, 0x81, 0x07, - 0xDC, 0x81, 0x03, - 0xCC, 0xC1, 0x01, - 0xFE, 0xE7, 0x01, - 0xC0, 0xF1, 0x00, - 0xC0, 0x71, 0x00, - 0xC0, 0x79, 0x00, - 0xC0, 0xF9, 0x0F, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l42_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x80, 0x07, 0xFE, 0x00, - 0x80, 0x07, 0xFF, 0x01, - 0xC0, 0x87, 0xE7, 0x03, - 0xC0, 0x87, 0xC3, 0x03, - 0xE0, 0xC7, 0x83, 0x03, - 0xE0, 0xC7, 0x83, 0x03, - 0xF0, 0x07, 0x80, 0x03, - 0x70, 0x07, 0xC0, 0x03, - 0x78, 0x07, 0xC0, 0x03, - 0x3C, 0x07, 0xE0, 0x01, - 0x3C, 0x07, 0xF0, 0x01, - 0x1E, 0x07, 0xF8, 0x00, - 0x0E, 0x07, 0x78, 0x00, - 0xFF, 0x1F, 0x3C, 0x00, - 0xFF, 0x1F, 0x1E, 0x00, - 0x00, 0x07, 0x0F, 0x00, - 0x00, 0x87, 0x07, 0x00, - 0x00, 0x87, 0x07, 0x00, - 0x00, 0xC7, 0xFF, 0x03, - 0x00, 0xC7, 0xFF, 0x03, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l43.xbm b/app/bin/bitmaps/l43.xbm deleted file mode 100644 index 1512650..0000000 --- a/app/bin/bitmaps/l43.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l43_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x70, 0x1E, - 0x70, 0x3B, - 0x78, 0x38, - 0x78, 0x18, - 0x7C, 0x3C, - 0x6C, 0x38, - 0xFE, 0x33, - 0x60, 0x3F, - 0x60, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l43_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xC0, 0xE1, 0x03, - 0xC0, 0x71, 0x07, - 0xE0, 0x39, 0x07, - 0xE0, 0x01, 0x07, - 0xF0, 0x01, 0x07, - 0xF0, 0x01, 0x07, - 0xF8, 0x81, 0x03, - 0xD8, 0xC1, 0x07, - 0xDC, 0x01, 0x07, - 0xCC, 0x01, 0x0E, - 0xFE, 0x07, 0x0E, - 0xC0, 0x39, 0x0E, - 0xC0, 0x39, 0x07, - 0xC0, 0x71, 0x07, - 0xC0, 0xE1, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l43_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x80, 0x07, 0x7E, 0x00, - 0x80, 0x07, 0xFF, 0x00, - 0xC0, 0x87, 0xE7, 0x01, - 0xC0, 0x87, 0xC7, 0x01, - 0xE0, 0x87, 0xC3, 0x03, - 0xE0, 0x07, 0xC0, 0x03, - 0xF0, 0x07, 0xC0, 0x01, - 0x70, 0x07, 0xE0, 0x01, - 0x78, 0x07, 0xFC, 0x00, - 0x3C, 0x07, 0xFC, 0x00, - 0x3C, 0x07, 0xE0, 0x01, - 0x1E, 0x07, 0xC0, 0x03, - 0x0E, 0x07, 0x80, 0x03, - 0xFF, 0x1F, 0x80, 0x03, - 0xFF, 0xDF, 0x83, 0x03, - 0x00, 0xC7, 0x83, 0x03, - 0x00, 0x87, 0xC7, 0x03, - 0x00, 0x87, 0xE7, 0x01, - 0x00, 0x07, 0xFF, 0x01, - 0x00, 0x07, 0x7E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l44.xbm b/app/bin/bitmaps/l44.xbm deleted file mode 100644 index 7a96e04..0000000 --- a/app/bin/bitmaps/l44.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l44_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x70, 0x1C, - 0x70, 0x1C, - 0x78, 0x1E, - 0x78, 0x1E, - 0x7C, 0x1F, - 0x6C, 0x1B, - 0xFE, 0x3F, - 0x60, 0x18, - 0x60, 0x18, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l44_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xC0, 0x81, 0x03, - 0xC0, 0x81, 0x03, - 0xE0, 0xC1, 0x03, - 0xE0, 0xC1, 0x03, - 0xF0, 0xE1, 0x03, - 0xF0, 0xE1, 0x03, - 0xF8, 0xF1, 0x03, - 0xD8, 0xB1, 0x03, - 0xDC, 0xB9, 0x03, - 0xCC, 0x99, 0x03, - 0xFE, 0xFF, 0x0F, - 0xC0, 0x81, 0x03, - 0xC0, 0x81, 0x03, - 0xC0, 0x81, 0x03, - 0xC0, 0x81, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l44_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x80, 0x07, 0xF0, 0x00, - 0x80, 0x07, 0xF0, 0x00, - 0xC0, 0x07, 0xF8, 0x00, - 0xC0, 0x07, 0xF8, 0x00, - 0xE0, 0x07, 0xFC, 0x00, - 0xE0, 0x07, 0xFC, 0x00, - 0xF0, 0x07, 0xFE, 0x00, - 0x70, 0x07, 0xEE, 0x00, - 0x78, 0x07, 0xEF, 0x00, - 0x3C, 0x87, 0xE7, 0x00, - 0x3C, 0x87, 0xE7, 0x00, - 0x1E, 0xC7, 0xE3, 0x00, - 0x0E, 0xC7, 0xE1, 0x00, - 0xFF, 0xFF, 0xFF, 0x03, - 0xFF, 0xFF, 0xFF, 0x03, - 0x00, 0x07, 0xE0, 0x00, - 0x00, 0x07, 0xE0, 0x00, - 0x00, 0x07, 0xE0, 0x00, - 0x00, 0x07, 0xE0, 0x00, - 0x00, 0x07, 0xE0, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l45.xbm b/app/bin/bitmaps/l45.xbm deleted file mode 100644 index d326cc1..0000000 --- a/app/bin/bitmaps/l45.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l45_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x70, 0x3F, - 0x70, 0x07, - 0x78, 0x07, - 0x78, 0x1F, - 0x7C, 0x3B, - 0x6C, 0x30, - 0xFE, 0x33, - 0x60, 0x3F, - 0x60, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l45_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xC0, 0xF1, 0x07, - 0xC0, 0x71, 0x00, - 0xE0, 0x71, 0x00, - 0xE0, 0x31, 0x00, - 0xF0, 0x31, 0x00, - 0xF0, 0xF9, 0x03, - 0xF8, 0x79, 0x07, - 0xD8, 0x39, 0x07, - 0xDC, 0x01, 0x0E, - 0xCC, 0x01, 0x0E, - 0xFE, 0x07, 0x0E, - 0xC0, 0x39, 0x06, - 0xC0, 0x39, 0x07, - 0xC0, 0x71, 0x07, - 0xC0, 0xE1, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l45_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x80, 0x07, 0xFF, 0x03, - 0x80, 0x07, 0xFF, 0x03, - 0xC0, 0x07, 0x07, 0x00, - 0xC0, 0x07, 0x07, 0x00, - 0xE0, 0x87, 0x07, 0x00, - 0xE0, 0x87, 0x07, 0x00, - 0xF0, 0x87, 0x7F, 0x00, - 0x70, 0x87, 0xFF, 0x01, - 0x78, 0x87, 0xE7, 0x01, - 0x3C, 0x87, 0xC3, 0x03, - 0x3C, 0x07, 0xC0, 0x03, - 0x1E, 0x07, 0x80, 0x03, - 0x0E, 0x07, 0x80, 0x03, - 0xFF, 0x1F, 0x80, 0x03, - 0xFF, 0xDF, 0x83, 0x03, - 0x00, 0xC7, 0xC3, 0x03, - 0x00, 0x87, 0xC3, 0x03, - 0x00, 0x87, 0xE7, 0x01, - 0x00, 0x07, 0xFF, 0x00, - 0x00, 0x07, 0x7E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l46.xbm b/app/bin/bitmaps/l46.xbm deleted file mode 100644 index 5313ab6..0000000 --- a/app/bin/bitmaps/l46.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l46_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x70, 0x1E, - 0x70, 0x3F, - 0x78, 0x03, - 0x78, 0x1F, - 0x7C, 0x3F, - 0x6C, 0x33, - 0xFE, 0x33, - 0x60, 0x3F, - 0x60, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l46_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xC0, 0xE1, 0x03, - 0xC0, 0x71, 0x07, - 0xE0, 0x31, 0x07, - 0xE0, 0x39, 0x00, - 0xF0, 0x39, 0x00, - 0xF0, 0x39, 0x00, - 0xF8, 0xF9, 0x03, - 0xD8, 0x79, 0x07, - 0xDC, 0x39, 0x07, - 0xCC, 0x39, 0x0E, - 0xFE, 0x3F, 0x0E, - 0xC0, 0x39, 0x0E, - 0xC0, 0x31, 0x07, - 0xC0, 0x71, 0x07, - 0xC0, 0xE1, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l46_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x80, 0x07, 0xFC, 0x00, - 0x80, 0x07, 0xFF, 0x01, - 0xC0, 0x07, 0xEF, 0x01, - 0xC0, 0x87, 0xC7, 0x03, - 0xE0, 0x87, 0xC3, 0x03, - 0xE0, 0x87, 0x03, 0x00, - 0xF0, 0xC7, 0x03, 0x00, - 0x70, 0xC7, 0x7F, 0x00, - 0x78, 0xC7, 0xFF, 0x01, - 0x3C, 0xC7, 0xEF, 0x01, - 0x3C, 0xC7, 0xC7, 0x03, - 0x1E, 0xC7, 0x83, 0x03, - 0x0E, 0xC7, 0x83, 0x03, - 0xFF, 0xDF, 0x83, 0x03, - 0xFF, 0xDF, 0x83, 0x03, - 0x00, 0x87, 0x83, 0x03, - 0x00, 0x87, 0xC7, 0x03, - 0x00, 0x87, 0xEF, 0x01, - 0x00, 0x07, 0xFF, 0x01, - 0x00, 0x07, 0x7C, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l47.xbm b/app/bin/bitmaps/l47.xbm deleted file mode 100644 index e635d03..0000000 --- a/app/bin/bitmaps/l47.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l47_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x70, 0x3F, - 0x70, 0x38, - 0x78, 0x18, - 0x78, 0x1C, - 0x7C, 0x0C, - 0x6C, 0x0E, - 0xFE, 0x0E, - 0x60, 0x06, - 0x60, 0x06, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l47_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xC0, 0xF9, 0x0F, - 0xC0, 0x01, 0x0F, - 0xE0, 0x01, 0x07, - 0xE0, 0x81, 0x03, - 0xF0, 0x81, 0x03, - 0xF0, 0xC1, 0x01, - 0xF8, 0xC1, 0x01, - 0xD8, 0xC1, 0x01, - 0xDC, 0xE1, 0x00, - 0xCC, 0xE1, 0x00, - 0xFE, 0xE7, 0x00, - 0xC0, 0xE1, 0x00, - 0xC0, 0xE1, 0x00, - 0xC0, 0x71, 0x00, - 0xC0, 0x71, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l47_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x80, 0xC7, 0xFF, 0x03, - 0x80, 0xC7, 0xFF, 0x03, - 0xC0, 0x07, 0xC0, 0x03, - 0xC0, 0x07, 0xE0, 0x01, - 0xE0, 0x07, 0xE0, 0x01, - 0xE0, 0x07, 0xF0, 0x00, - 0xF0, 0x07, 0xF0, 0x00, - 0x70, 0x07, 0x78, 0x00, - 0x78, 0x07, 0x78, 0x00, - 0x3C, 0x07, 0x38, 0x00, - 0x3C, 0x07, 0x3C, 0x00, - 0x1E, 0x07, 0x3C, 0x00, - 0x0E, 0x07, 0x1C, 0x00, - 0xFF, 0x1F, 0x1E, 0x00, - 0xFF, 0x1F, 0x1E, 0x00, - 0x00, 0x07, 0x1E, 0x00, - 0x00, 0x07, 0x1E, 0x00, - 0x00, 0x07, 0x0E, 0x00, - 0x00, 0x07, 0x0E, 0x00, - 0x00, 0x07, 0x0E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l48.xbm b/app/bin/bitmaps/l48.xbm deleted file mode 100644 index 977b660..0000000 --- a/app/bin/bitmaps/l48.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l48_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x70, 0x1E, - 0x70, 0x3F, - 0x78, 0x3B, - 0x78, 0x3F, - 0x7C, 0x1E, - 0x6C, 0x3F, - 0xFE, 0x33, - 0x60, 0x3F, - 0x60, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l48_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xC0, 0xE1, 0x03, - 0xC0, 0x71, 0x07, - 0xE0, 0x31, 0x07, - 0xE0, 0x39, 0x07, - 0xF0, 0x39, 0x07, - 0xF0, 0x39, 0x07, - 0xF8, 0x71, 0x07, - 0xD8, 0xE1, 0x03, - 0xDC, 0x71, 0x07, - 0xCC, 0x39, 0x06, - 0xFE, 0x3F, 0x0E, - 0xC0, 0x39, 0x0E, - 0xC0, 0x39, 0x06, - 0xC0, 0x71, 0x07, - 0xC0, 0xE1, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l48_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x80, 0x07, 0x7E, 0x00, - 0x80, 0x07, 0xFF, 0x00, - 0xC0, 0x87, 0xEF, 0x01, - 0xC0, 0x87, 0xC7, 0x01, - 0xE0, 0x87, 0xC3, 0x03, - 0xE0, 0x87, 0xC3, 0x03, - 0xF0, 0x87, 0xC7, 0x01, - 0x70, 0x07, 0xEF, 0x01, - 0x78, 0x07, 0xFE, 0x00, - 0x3C, 0x07, 0xFF, 0x00, - 0x3C, 0x87, 0xE7, 0x01, - 0x1E, 0x87, 0xC3, 0x03, - 0x0E, 0xC7, 0x83, 0x03, - 0xFF, 0xDF, 0x83, 0x03, - 0xFF, 0xDF, 0x83, 0x03, - 0x00, 0xC7, 0x83, 0x03, - 0x00, 0x87, 0xC3, 0x03, - 0x00, 0x87, 0xE7, 0x01, - 0x00, 0x07, 0xFF, 0x01, - 0x00, 0x07, 0x7E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l49.xbm b/app/bin/bitmaps/l49.xbm deleted file mode 100644 index e930612..0000000 --- a/app/bin/bitmaps/l49.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l49_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x70, 0x1E, - 0x70, 0x3F, - 0x78, 0x33, - 0x78, 0x33, - 0x7C, 0x3F, - 0x6C, 0x3E, - 0xFE, 0x30, - 0x60, 0x3B, - 0x60, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l49_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xC0, 0xE1, 0x01, - 0xC0, 0x71, 0x07, - 0xE0, 0x39, 0x07, - 0xE0, 0x39, 0x06, - 0xF0, 0x39, 0x0E, - 0xF0, 0x39, 0x0E, - 0xF8, 0x39, 0x0F, - 0xD8, 0x71, 0x0F, - 0xDC, 0xE1, 0x0F, - 0xCC, 0x01, 0x0E, - 0xFE, 0x07, 0x06, - 0xC0, 0x01, 0x06, - 0xC0, 0x39, 0x07, - 0xC0, 0x71, 0x03, - 0xC0, 0xF1, 0x01, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l49_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x80, 0x07, 0x7E, 0x00, - 0x80, 0x07, 0xFF, 0x00, - 0xC0, 0x87, 0xEF, 0x01, - 0xC0, 0x87, 0xC7, 0x01, - 0xE0, 0xC7, 0x83, 0x03, - 0xE0, 0xC7, 0x83, 0x03, - 0xF0, 0xC7, 0x83, 0x03, - 0x70, 0xC7, 0x83, 0x03, - 0x78, 0xC7, 0x83, 0x03, - 0x3C, 0x87, 0xC3, 0x03, - 0x3C, 0x87, 0xE7, 0x03, - 0x1E, 0x07, 0xFF, 0x03, - 0x0E, 0x07, 0xFE, 0x03, - 0xFF, 0x1F, 0x80, 0x03, - 0xFF, 0x1F, 0x80, 0x03, - 0x00, 0x87, 0xC3, 0x03, - 0x00, 0x87, 0xC3, 0x01, - 0x00, 0x87, 0xE7, 0x01, - 0x00, 0x07, 0xFF, 0x00, - 0x00, 0x07, 0x7E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l5.xbm b/app/bin/bitmaps/l5.xbm deleted file mode 100644 index 4d43af0..0000000 --- a/app/bin/bitmaps/l5.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l5_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0xE0, 0x07, - 0xE0, 0x00, - 0xE0, 0x00, - 0xE0, 0x03, - 0x60, 0x07, - 0x00, 0x06, - 0x60, 0x06, - 0xE0, 0x07, - 0xC0, 0x03, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l5_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x80, 0x3F, 0x00, - 0x80, 0x03, 0x00, - 0x80, 0x03, 0x00, - 0x80, 0x01, 0x00, - 0x80, 0x01, 0x00, - 0xC0, 0x1F, 0x00, - 0xC0, 0x3B, 0x00, - 0xC0, 0x39, 0x00, - 0x00, 0x70, 0x00, - 0x00, 0x70, 0x00, - 0x00, 0x70, 0x00, - 0xC0, 0x31, 0x00, - 0xC0, 0x39, 0x00, - 0x80, 0x3B, 0x00, - 0x00, 0x1F, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l5_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0xFE, 0x07, 0x00, - 0x00, 0xFE, 0x07, 0x00, - 0x00, 0x0E, 0x00, 0x00, - 0x00, 0x0E, 0x00, 0x00, - 0x00, 0x0F, 0x00, 0x00, - 0x00, 0x0F, 0x00, 0x00, - 0x00, 0xFF, 0x00, 0x00, - 0x00, 0xFF, 0x03, 0x00, - 0x00, 0xCF, 0x03, 0x00, - 0x00, 0x87, 0x07, 0x00, - 0x00, 0x80, 0x07, 0x00, - 0x00, 0x00, 0x07, 0x00, - 0x00, 0x00, 0x07, 0x00, - 0x00, 0x00, 0x07, 0x00, - 0x80, 0x07, 0x07, 0x00, - 0x80, 0x87, 0x07, 0x00, - 0x00, 0x87, 0x07, 0x00, - 0x00, 0xCF, 0x03, 0x00, - 0x00, 0xFE, 0x01, 0x00, - 0x00, 0xFC, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l50.xbm b/app/bin/bitmaps/l50.xbm deleted file mode 100644 index 834ab8f..0000000 --- a/app/bin/bitmaps/l50.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l50_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0xFC, 0x1E, - 0x1C, 0x3F, - 0x1C, 0x33, - 0x7C, 0x33, - 0xEC, 0x33, - 0xC0, 0x33, - 0xCC, 0x33, - 0xFC, 0x3F, - 0x78, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l50_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF8, 0xE3, 0x03, - 0x38, 0x70, 0x07, - 0x38, 0x30, 0x07, - 0x18, 0x38, 0x06, - 0x18, 0x38, 0x06, - 0xFC, 0x39, 0x0E, - 0xBC, 0x3B, 0x0E, - 0x9C, 0x3B, 0x0E, - 0x00, 0x3F, 0x0E, - 0x00, 0x3F, 0x0E, - 0x00, 0x3F, 0x06, - 0x1C, 0x3B, 0x06, - 0x9C, 0x33, 0x07, - 0xB8, 0x73, 0x07, - 0xF0, 0xE1, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l50_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xF8, 0x1F, 0x7E, 0x00, - 0xF8, 0x1F, 0xFF, 0x00, - 0x38, 0x00, 0xEF, 0x01, - 0x38, 0x80, 0xC7, 0x01, - 0x3C, 0x80, 0xC3, 0x03, - 0x3C, 0x80, 0xC3, 0x03, - 0xFC, 0xC3, 0x83, 0x03, - 0xFC, 0xCF, 0x83, 0x03, - 0x3C, 0xCF, 0x83, 0x03, - 0x1C, 0xDE, 0x83, 0x03, - 0x00, 0xDE, 0x83, 0x03, - 0x00, 0xDC, 0x83, 0x03, - 0x00, 0xDC, 0x83, 0x03, - 0x00, 0xDC, 0x83, 0x03, - 0x1E, 0x9C, 0xC3, 0x03, - 0x1E, 0x9E, 0xC3, 0x03, - 0x1C, 0x9E, 0xC7, 0x01, - 0x3C, 0x0F, 0xEF, 0x01, - 0xF8, 0x07, 0xFF, 0x00, - 0xF0, 0x03, 0x7E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l51.xbm b/app/bin/bitmaps/l51.xbm deleted file mode 100644 index 8081e2f..0000000 --- a/app/bin/bitmaps/l51.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l51_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0xFC, 0x1C, - 0x1C, 0x1E, - 0x1C, 0x1F, - 0x7C, 0x1C, - 0xEC, 0x1C, - 0xC0, 0x1C, - 0xCC, 0x1C, - 0xFC, 0x1C, - 0x78, 0x1C, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l51_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF8, 0x83, 0x03, - 0x38, 0xC0, 0x03, - 0x38, 0xC0, 0x03, - 0x18, 0xE0, 0x03, - 0x18, 0xB0, 0x03, - 0xFC, 0x81, 0x03, - 0xBC, 0x83, 0x03, - 0x9C, 0x83, 0x03, - 0x00, 0x87, 0x03, - 0x00, 0x87, 0x03, - 0x00, 0x87, 0x03, - 0x1C, 0x83, 0x03, - 0x9C, 0x83, 0x03, - 0xB8, 0x83, 0x03, - 0xF0, 0x81, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l51_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xF8, 0x1F, 0x70, 0x00, - 0xF8, 0x1F, 0x70, 0x00, - 0x38, 0x00, 0x78, 0x00, - 0x38, 0x00, 0x7C, 0x00, - 0x3C, 0x00, 0x7E, 0x00, - 0x3C, 0x00, 0x7F, 0x00, - 0xFC, 0x03, 0x73, 0x00, - 0xFC, 0x0F, 0x70, 0x00, - 0x3C, 0x0F, 0x70, 0x00, - 0x1C, 0x1E, 0x70, 0x00, - 0x00, 0x1E, 0x70, 0x00, - 0x00, 0x1C, 0x70, 0x00, - 0x00, 0x1C, 0x70, 0x00, - 0x00, 0x1C, 0x70, 0x00, - 0x1E, 0x1C, 0x70, 0x00, - 0x1E, 0x1E, 0x70, 0x00, - 0x1C, 0x1E, 0x70, 0x00, - 0x3C, 0x0F, 0x70, 0x00, - 0xF8, 0x07, 0x70, 0x00, - 0xF0, 0x03, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l52.xbm b/app/bin/bitmaps/l52.xbm deleted file mode 100644 index 1547b10..0000000 --- a/app/bin/bitmaps/l52.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l52_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0xFC, 0x1E, - 0x1C, 0x3F, - 0x1C, 0x33, - 0x7C, 0x30, - 0xEC, 0x38, - 0xC0, 0x1C, - 0xCC, 0x0E, - 0xFC, 0x07, - 0x78, 0x3F, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l52_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF8, 0xE3, 0x03, - 0x38, 0x70, 0x07, - 0x38, 0x38, 0x06, - 0x18, 0x38, 0x0E, - 0x18, 0x00, 0x0E, - 0xFC, 0x01, 0x0E, - 0xBC, 0x03, 0x07, - 0x9C, 0x83, 0x07, - 0x00, 0x87, 0x03, - 0x00, 0xC7, 0x01, - 0x00, 0xE7, 0x01, - 0x1C, 0xF3, 0x00, - 0x9C, 0x73, 0x00, - 0xB8, 0x7B, 0x00, - 0xF0, 0xF9, 0x0F, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l52_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xF8, 0x1F, 0xFE, 0x00, - 0xF8, 0x1F, 0xFF, 0x01, - 0x38, 0x80, 0xE7, 0x03, - 0x38, 0x80, 0xC3, 0x03, - 0x3C, 0xC0, 0x83, 0x03, - 0x3C, 0xC0, 0x83, 0x03, - 0xFC, 0x03, 0x80, 0x03, - 0xFC, 0x0F, 0xC0, 0x03, - 0x3C, 0x0F, 0xC0, 0x03, - 0x1C, 0x1E, 0xE0, 0x01, - 0x00, 0x1E, 0xF0, 0x01, - 0x00, 0x1C, 0xF8, 0x00, - 0x00, 0x1C, 0x78, 0x00, - 0x00, 0x1C, 0x3C, 0x00, - 0x1E, 0x1C, 0x1E, 0x00, - 0x1E, 0x1E, 0x0F, 0x00, - 0x1C, 0x9E, 0x07, 0x00, - 0x3C, 0x8F, 0x07, 0x00, - 0xF8, 0xC7, 0xFF, 0x03, - 0xF0, 0xC3, 0xFF, 0x03, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l53.xbm b/app/bin/bitmaps/l53.xbm deleted file mode 100644 index a9620b9..0000000 --- a/app/bin/bitmaps/l53.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l53_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0xFC, 0x1E, - 0x1C, 0x3B, - 0x1C, 0x38, - 0x7C, 0x18, - 0xEC, 0x3C, - 0xC0, 0x38, - 0xCC, 0x33, - 0xFC, 0x3F, - 0x78, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l53_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF8, 0xE3, 0x03, - 0x38, 0x70, 0x07, - 0x38, 0x38, 0x07, - 0x18, 0x00, 0x07, - 0x18, 0x00, 0x07, - 0xFC, 0x01, 0x07, - 0xBC, 0x83, 0x03, - 0x9C, 0xC3, 0x07, - 0x00, 0x07, 0x07, - 0x00, 0x07, 0x0E, - 0x00, 0x07, 0x0E, - 0x1C, 0x3B, 0x0E, - 0x9C, 0x3B, 0x07, - 0xB8, 0x73, 0x07, - 0xF0, 0xE1, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l53_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xF8, 0x1F, 0x7E, 0x00, - 0xF8, 0x1F, 0xFF, 0x00, - 0x38, 0x80, 0xE7, 0x01, - 0x38, 0x80, 0xC7, 0x01, - 0x3C, 0x80, 0xC3, 0x03, - 0x3C, 0x00, 0xC0, 0x03, - 0xFC, 0x03, 0xC0, 0x01, - 0xFC, 0x0F, 0xE0, 0x01, - 0x3C, 0x0F, 0xFC, 0x00, - 0x1C, 0x1E, 0xFC, 0x00, - 0x00, 0x1E, 0xE0, 0x01, - 0x00, 0x1C, 0xC0, 0x03, - 0x00, 0x1C, 0x80, 0x03, - 0x00, 0x1C, 0x80, 0x03, - 0x1E, 0xDC, 0x83, 0x03, - 0x1E, 0xDE, 0x83, 0x03, - 0x1C, 0x9E, 0xC7, 0x03, - 0x3C, 0x8F, 0xE7, 0x01, - 0xF8, 0x07, 0xFF, 0x01, - 0xF0, 0x03, 0x7E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l54.xbm b/app/bin/bitmaps/l54.xbm deleted file mode 100644 index 68a392e..0000000 --- a/app/bin/bitmaps/l54.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l54_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0xFC, 0x1C, - 0x1C, 0x1C, - 0x1C, 0x1E, - 0x7C, 0x1E, - 0xEC, 0x1F, - 0xC0, 0x1B, - 0xCC, 0x3F, - 0xFC, 0x18, - 0x78, 0x18, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l54_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF8, 0x83, 0x03, - 0x38, 0x80, 0x03, - 0x38, 0xC0, 0x03, - 0x18, 0xC0, 0x03, - 0x18, 0xE0, 0x03, - 0xFC, 0xE1, 0x03, - 0xBC, 0xF3, 0x03, - 0x9C, 0xB3, 0x03, - 0x00, 0xBF, 0x03, - 0x00, 0x9F, 0x03, - 0x00, 0xFF, 0x0F, - 0x1C, 0x83, 0x03, - 0x9C, 0x83, 0x03, - 0xB8, 0x83, 0x03, - 0xF0, 0x81, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l54_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xF8, 0x1F, 0xF0, 0x00, - 0xF8, 0x1F, 0xF0, 0x00, - 0x38, 0x00, 0xF8, 0x00, - 0x38, 0x00, 0xF8, 0x00, - 0x3C, 0x00, 0xFC, 0x00, - 0x3C, 0x00, 0xFC, 0x00, - 0xFC, 0x03, 0xFE, 0x00, - 0xFC, 0x0F, 0xEE, 0x00, - 0x3C, 0x0F, 0xEF, 0x00, - 0x1C, 0x9E, 0xE7, 0x00, - 0x00, 0x9E, 0xE7, 0x00, - 0x00, 0xDC, 0xE3, 0x00, - 0x00, 0xDC, 0xE1, 0x00, - 0x00, 0xFC, 0xFF, 0x03, - 0x1E, 0xFC, 0xFF, 0x03, - 0x1E, 0x1E, 0xE0, 0x00, - 0x1C, 0x1E, 0xE0, 0x00, - 0x3C, 0x0F, 0xE0, 0x00, - 0xF8, 0x07, 0xE0, 0x00, - 0xF0, 0x03, 0xE0, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l55.xbm b/app/bin/bitmaps/l55.xbm deleted file mode 100644 index 8c35927..0000000 --- a/app/bin/bitmaps/l55.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l55_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0xFC, 0x3F, - 0x1C, 0x07, - 0x1C, 0x07, - 0x7C, 0x1F, - 0xEC, 0x3B, - 0xC0, 0x30, - 0xCC, 0x33, - 0xFC, 0x3F, - 0x78, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l55_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF8, 0xF3, 0x07, - 0x38, 0x70, 0x00, - 0x38, 0x70, 0x00, - 0x18, 0x30, 0x00, - 0x18, 0x30, 0x00, - 0xFC, 0xF9, 0x03, - 0xBC, 0x7B, 0x07, - 0x9C, 0x3B, 0x07, - 0x00, 0x07, 0x0E, - 0x00, 0x07, 0x0E, - 0x00, 0x07, 0x0E, - 0x1C, 0x3B, 0x06, - 0x9C, 0x3B, 0x07, - 0xB8, 0x73, 0x07, - 0xF0, 0xE1, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l55_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xF8, 0x1F, 0xFF, 0x03, - 0xF8, 0x1F, 0xFF, 0x03, - 0x38, 0x00, 0x07, 0x00, - 0x38, 0x00, 0x07, 0x00, - 0x3C, 0x80, 0x07, 0x00, - 0x3C, 0x80, 0x07, 0x00, - 0xFC, 0x83, 0x7F, 0x00, - 0xFC, 0x8F, 0xFF, 0x01, - 0x3C, 0x8F, 0xE7, 0x01, - 0x1C, 0x9E, 0xC3, 0x03, - 0x00, 0x1E, 0xC0, 0x03, - 0x00, 0x1C, 0x80, 0x03, - 0x00, 0x1C, 0x80, 0x03, - 0x00, 0x1C, 0x80, 0x03, - 0x1E, 0xDC, 0x83, 0x03, - 0x1E, 0xDE, 0xC3, 0x03, - 0x1C, 0x9E, 0xC3, 0x03, - 0x3C, 0x8F, 0xE7, 0x01, - 0xF8, 0x07, 0xFF, 0x00, - 0xF0, 0x03, 0x7E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l56.xbm b/app/bin/bitmaps/l56.xbm deleted file mode 100644 index e8f4d59..0000000 --- a/app/bin/bitmaps/l56.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l56_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0xFC, 0x1E, - 0x1C, 0x3F, - 0x1C, 0x03, - 0x7C, 0x1F, - 0xEC, 0x3F, - 0xC0, 0x33, - 0xCC, 0x33, - 0xFC, 0x3F, - 0x78, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l56_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF8, 0xE3, 0x03, - 0x38, 0x70, 0x07, - 0x38, 0x30, 0x07, - 0x18, 0x38, 0x00, - 0x18, 0x38, 0x00, - 0xFC, 0x39, 0x00, - 0xBC, 0xFB, 0x03, - 0x9C, 0x7B, 0x07, - 0x00, 0x3F, 0x07, - 0x00, 0x3F, 0x0E, - 0x00, 0x3F, 0x0E, - 0x1C, 0x3B, 0x0E, - 0x9C, 0x33, 0x07, - 0xB8, 0x73, 0x07, - 0xF0, 0xE1, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l56_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xF8, 0x1F, 0xFC, 0x00, - 0xF8, 0x1F, 0xFF, 0x01, - 0x38, 0x00, 0xEF, 0x01, - 0x38, 0x80, 0xC7, 0x03, - 0x3C, 0x80, 0xC3, 0x03, - 0x3C, 0x80, 0x03, 0x00, - 0xFC, 0xC3, 0x03, 0x00, - 0xFC, 0xCF, 0x7F, 0x00, - 0x3C, 0xCF, 0xFF, 0x01, - 0x1C, 0xDE, 0xEF, 0x01, - 0x00, 0xDE, 0xC7, 0x03, - 0x00, 0xDC, 0x83, 0x03, - 0x00, 0xDC, 0x83, 0x03, - 0x00, 0xDC, 0x83, 0x03, - 0x1E, 0xDC, 0x83, 0x03, - 0x1E, 0x9E, 0x83, 0x03, - 0x1C, 0x9E, 0xC7, 0x03, - 0x3C, 0x8F, 0xEF, 0x01, - 0xF8, 0x07, 0xFF, 0x01, - 0xF0, 0x03, 0x7C, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l57.xbm b/app/bin/bitmaps/l57.xbm deleted file mode 100644 index 5149c54..0000000 --- a/app/bin/bitmaps/l57.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l57_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0xFC, 0x3F, - 0x1C, 0x38, - 0x1C, 0x18, - 0x7C, 0x1C, - 0xEC, 0x0C, - 0xC0, 0x0E, - 0xCC, 0x0E, - 0xFC, 0x06, - 0x78, 0x06, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l57_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF8, 0xFB, 0x0F, - 0x38, 0x00, 0x0F, - 0x38, 0x00, 0x07, - 0x18, 0x80, 0x03, - 0x18, 0x80, 0x03, - 0xFC, 0xC1, 0x01, - 0xBC, 0xC3, 0x01, - 0x9C, 0xC3, 0x01, - 0x00, 0xE7, 0x00, - 0x00, 0xE7, 0x00, - 0x00, 0xE7, 0x00, - 0x1C, 0xE3, 0x00, - 0x9C, 0xE3, 0x00, - 0xB8, 0x73, 0x00, - 0xF0, 0x71, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l57_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xF8, 0xDF, 0xFF, 0x03, - 0xF8, 0xDF, 0xFF, 0x03, - 0x38, 0x00, 0xC0, 0x03, - 0x38, 0x00, 0xE0, 0x01, - 0x3C, 0x00, 0xE0, 0x01, - 0x3C, 0x00, 0xF0, 0x00, - 0xFC, 0x03, 0xF0, 0x00, - 0xFC, 0x0F, 0x78, 0x00, - 0x3C, 0x0F, 0x78, 0x00, - 0x1C, 0x1E, 0x38, 0x00, - 0x00, 0x1E, 0x3C, 0x00, - 0x00, 0x1C, 0x3C, 0x00, - 0x00, 0x1C, 0x1C, 0x00, - 0x00, 0x1C, 0x1E, 0x00, - 0x1E, 0x1C, 0x1E, 0x00, - 0x1E, 0x1E, 0x1E, 0x00, - 0x1C, 0x1E, 0x1E, 0x00, - 0x3C, 0x0F, 0x0E, 0x00, - 0xF8, 0x07, 0x0E, 0x00, - 0xF0, 0x03, 0x0E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l58.xbm b/app/bin/bitmaps/l58.xbm deleted file mode 100644 index 3fe4ad7..0000000 --- a/app/bin/bitmaps/l58.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l58_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0xFC, 0x1E, - 0x1C, 0x3F, - 0x1C, 0x3B, - 0x7C, 0x3F, - 0xEC, 0x1E, - 0xC0, 0x3F, - 0xCC, 0x33, - 0xFC, 0x3F, - 0x78, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l58_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF8, 0xE3, 0x03, - 0x38, 0x70, 0x07, - 0x38, 0x30, 0x07, - 0x18, 0x38, 0x07, - 0x18, 0x38, 0x07, - 0xFC, 0x39, 0x07, - 0xBC, 0x73, 0x07, - 0x9C, 0xE3, 0x03, - 0x00, 0x77, 0x07, - 0x00, 0x3F, 0x06, - 0x00, 0x3F, 0x0E, - 0x1C, 0x3B, 0x0E, - 0x9C, 0x3B, 0x06, - 0xB8, 0x73, 0x07, - 0xF0, 0xE1, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l58_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xF8, 0x1F, 0x7E, 0x00, - 0xF8, 0x1F, 0xFF, 0x00, - 0x38, 0x80, 0xEF, 0x01, - 0x38, 0x80, 0xC7, 0x01, - 0x3C, 0x80, 0xC3, 0x03, - 0x3C, 0x80, 0xC3, 0x03, - 0xFC, 0x83, 0xC7, 0x01, - 0xFC, 0x0F, 0xEF, 0x01, - 0x3C, 0x0F, 0xFE, 0x00, - 0x1C, 0x1E, 0xFF, 0x00, - 0x00, 0x9E, 0xE7, 0x01, - 0x00, 0x9C, 0xC3, 0x03, - 0x00, 0xDC, 0x83, 0x03, - 0x00, 0xDC, 0x83, 0x03, - 0x1E, 0xDC, 0x83, 0x03, - 0x1E, 0xDE, 0x83, 0x03, - 0x1C, 0x9E, 0xC3, 0x03, - 0x3C, 0x8F, 0xE7, 0x01, - 0xF8, 0x07, 0xFF, 0x01, - 0xF0, 0x03, 0x7E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l59.xbm b/app/bin/bitmaps/l59.xbm deleted file mode 100644 index 9459753..0000000 --- a/app/bin/bitmaps/l59.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l59_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0xFC, 0x1E, - 0x1C, 0x3F, - 0x1C, 0x33, - 0x7C, 0x33, - 0xEC, 0x3F, - 0xC0, 0x3E, - 0xCC, 0x30, - 0xFC, 0x3B, - 0x78, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l59_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF8, 0xE3, 0x01, - 0x38, 0x70, 0x07, - 0x38, 0x38, 0x07, - 0x18, 0x38, 0x06, - 0x18, 0x38, 0x0E, - 0xFC, 0x39, 0x0E, - 0xBC, 0x3B, 0x0F, - 0x9C, 0x73, 0x0F, - 0x00, 0xE7, 0x0F, - 0x00, 0x07, 0x0E, - 0x00, 0x07, 0x06, - 0x1C, 0x03, 0x06, - 0x9C, 0x3B, 0x07, - 0xB8, 0x73, 0x03, - 0xF0, 0xF1, 0x01, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l59_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xF8, 0x1F, 0x7E, 0x00, - 0xF8, 0x1F, 0xFF, 0x00, - 0x38, 0x80, 0xEF, 0x01, - 0x38, 0x80, 0xC7, 0x01, - 0x3C, 0xC0, 0x83, 0x03, - 0x3C, 0xC0, 0x83, 0x03, - 0xFC, 0xC3, 0x83, 0x03, - 0xFC, 0xCF, 0x83, 0x03, - 0x3C, 0xCF, 0x83, 0x03, - 0x1C, 0x9E, 0xC3, 0x03, - 0x00, 0x9E, 0xE7, 0x03, - 0x00, 0x1C, 0xFF, 0x03, - 0x00, 0x1C, 0xFE, 0x03, - 0x00, 0x1C, 0x80, 0x03, - 0x1E, 0x1C, 0x80, 0x03, - 0x1E, 0x9E, 0xC3, 0x03, - 0x1C, 0x9E, 0xC3, 0x01, - 0x3C, 0x8F, 0xE7, 0x01, - 0xF8, 0x07, 0xFF, 0x00, - 0xF0, 0x03, 0x7E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l6.xbm b/app/bin/bitmaps/l6.xbm deleted file mode 100644 index 325c80c..0000000 --- a/app/bin/bitmaps/l6.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l6_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0xC0, 0x03, - 0xE0, 0x07, - 0x60, 0x00, - 0xE0, 0x03, - 0xE0, 0x07, - 0x60, 0x06, - 0x60, 0x06, - 0xE0, 0x07, - 0xC0, 0x03, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l6_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x1F, 0x00, - 0x80, 0x3B, 0x00, - 0x80, 0x39, 0x00, - 0xC0, 0x01, 0x00, - 0xC0, 0x01, 0x00, - 0xC0, 0x01, 0x00, - 0xC0, 0x1F, 0x00, - 0xC0, 0x3B, 0x00, - 0xC0, 0x39, 0x00, - 0xC0, 0x71, 0x00, - 0xC0, 0x71, 0x00, - 0xC0, 0x71, 0x00, - 0x80, 0x39, 0x00, - 0x80, 0x3B, 0x00, - 0x00, 0x1F, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l6_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0xF8, 0x01, 0x00, - 0x00, 0xFE, 0x03, 0x00, - 0x00, 0xDE, 0x03, 0x00, - 0x00, 0x8F, 0x07, 0x00, - 0x00, 0x87, 0x07, 0x00, - 0x00, 0x07, 0x00, 0x00, - 0x80, 0x07, 0x00, 0x00, - 0x80, 0xFF, 0x00, 0x00, - 0x80, 0xFF, 0x03, 0x00, - 0x80, 0xDF, 0x03, 0x00, - 0x80, 0x8F, 0x07, 0x00, - 0x80, 0x07, 0x07, 0x00, - 0x80, 0x07, 0x07, 0x00, - 0x80, 0x07, 0x07, 0x00, - 0x80, 0x07, 0x07, 0x00, - 0x00, 0x07, 0x07, 0x00, - 0x00, 0x8F, 0x07, 0x00, - 0x00, 0xDF, 0x03, 0x00, - 0x00, 0xFE, 0x03, 0x00, - 0x00, 0xF8, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l60.xbm b/app/bin/bitmaps/l60.xbm deleted file mode 100644 index 11b9cc7..0000000 --- a/app/bin/bitmaps/l60.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l60_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x78, 0x1E, - 0xFC, 0x3F, - 0x0C, 0x33, - 0x7C, 0x33, - 0xFC, 0x33, - 0xCC, 0x33, - 0xCC, 0x33, - 0xFC, 0x3F, - 0x78, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l60_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF0, 0xE1, 0x03, - 0xB8, 0x73, 0x07, - 0x98, 0x33, 0x07, - 0x1C, 0x38, 0x06, - 0x1C, 0x38, 0x06, - 0x1C, 0x38, 0x0E, - 0xFC, 0x39, 0x0E, - 0xBC, 0x3B, 0x0E, - 0x9C, 0x3B, 0x0E, - 0x1C, 0x3F, 0x0E, - 0x1C, 0x3F, 0x06, - 0x1C, 0x3F, 0x06, - 0x98, 0x33, 0x07, - 0xB8, 0x73, 0x07, - 0xF0, 0xE1, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l60_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xE0, 0x07, 0x7E, 0x00, - 0xF8, 0x0F, 0xFF, 0x00, - 0x78, 0x0F, 0xEF, 0x01, - 0x3C, 0x9E, 0xC7, 0x01, - 0x1C, 0x9E, 0xC3, 0x03, - 0x1C, 0x80, 0xC3, 0x03, - 0x1E, 0xC0, 0x83, 0x03, - 0xFE, 0xC3, 0x83, 0x03, - 0xFE, 0xCF, 0x83, 0x03, - 0x7E, 0xCF, 0x83, 0x03, - 0x3E, 0xDE, 0x83, 0x03, - 0x1E, 0xDC, 0x83, 0x03, - 0x1E, 0xDC, 0x83, 0x03, - 0x1E, 0xDC, 0x83, 0x03, - 0x1E, 0x9C, 0xC3, 0x03, - 0x1C, 0x9C, 0xC3, 0x03, - 0x3C, 0x9E, 0xC7, 0x01, - 0x7C, 0x0F, 0xEF, 0x01, - 0xF8, 0x0F, 0xFF, 0x00, - 0xE0, 0x03, 0x7E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l61.xbm b/app/bin/bitmaps/l61.xbm deleted file mode 100644 index 1983790..0000000 --- a/app/bin/bitmaps/l61.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l61_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x78, 0x1C, - 0xFC, 0x1E, - 0x0C, 0x1F, - 0x7C, 0x1C, - 0xFC, 0x1C, - 0xCC, 0x1C, - 0xCC, 0x1C, - 0xFC, 0x1C, - 0x78, 0x1C, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l61_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF0, 0x81, 0x03, - 0xB8, 0xC3, 0x03, - 0x98, 0xC3, 0x03, - 0x1C, 0xE0, 0x03, - 0x1C, 0xB0, 0x03, - 0x1C, 0x80, 0x03, - 0xFC, 0x81, 0x03, - 0xBC, 0x83, 0x03, - 0x9C, 0x83, 0x03, - 0x1C, 0x87, 0x03, - 0x1C, 0x87, 0x03, - 0x1C, 0x87, 0x03, - 0x98, 0x83, 0x03, - 0xB8, 0x83, 0x03, - 0xF0, 0x81, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l61_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xE0, 0x07, 0x70, 0x00, - 0xF8, 0x0F, 0x70, 0x00, - 0x78, 0x0F, 0x78, 0x00, - 0x3C, 0x1E, 0x7C, 0x00, - 0x1C, 0x1E, 0x7E, 0x00, - 0x1C, 0x00, 0x7F, 0x00, - 0x1E, 0x00, 0x73, 0x00, - 0xFE, 0x03, 0x70, 0x00, - 0xFE, 0x0F, 0x70, 0x00, - 0x7E, 0x0F, 0x70, 0x00, - 0x3E, 0x1E, 0x70, 0x00, - 0x1E, 0x1C, 0x70, 0x00, - 0x1E, 0x1C, 0x70, 0x00, - 0x1E, 0x1C, 0x70, 0x00, - 0x1E, 0x1C, 0x70, 0x00, - 0x1C, 0x1C, 0x70, 0x00, - 0x3C, 0x1E, 0x70, 0x00, - 0x7C, 0x0F, 0x70, 0x00, - 0xF8, 0x0F, 0x70, 0x00, - 0xE0, 0x03, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l62.xbm b/app/bin/bitmaps/l62.xbm deleted file mode 100644 index 93573ec..0000000 --- a/app/bin/bitmaps/l62.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l62_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x78, 0x1E, - 0xFC, 0x3F, - 0x0C, 0x33, - 0x7C, 0x30, - 0xFC, 0x38, - 0xCC, 0x1C, - 0xCC, 0x0E, - 0xFC, 0x07, - 0x78, 0x3F, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l62_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF0, 0xE1, 0x03, - 0xB8, 0x73, 0x07, - 0x98, 0x3B, 0x06, - 0x1C, 0x38, 0x0E, - 0x1C, 0x00, 0x0E, - 0x1C, 0x00, 0x0E, - 0xFC, 0x01, 0x07, - 0xBC, 0x83, 0x07, - 0x9C, 0x83, 0x03, - 0x1C, 0xC7, 0x01, - 0x1C, 0xE7, 0x01, - 0x1C, 0xF7, 0x00, - 0x98, 0x73, 0x00, - 0xB8, 0x7B, 0x00, - 0xF0, 0xF9, 0x0F, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l62_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xE0, 0x07, 0xFE, 0x00, - 0xF8, 0x0F, 0xFF, 0x01, - 0x78, 0x8F, 0xE7, 0x03, - 0x3C, 0x9E, 0xC3, 0x03, - 0x1C, 0xDE, 0x83, 0x03, - 0x1C, 0xC0, 0x83, 0x03, - 0x1E, 0x00, 0x80, 0x03, - 0xFE, 0x03, 0xC0, 0x03, - 0xFE, 0x0F, 0xC0, 0x03, - 0x7E, 0x0F, 0xE0, 0x01, - 0x3E, 0x1E, 0xF0, 0x01, - 0x1E, 0x1C, 0xF8, 0x00, - 0x1E, 0x1C, 0x78, 0x00, - 0x1E, 0x1C, 0x3C, 0x00, - 0x1E, 0x1C, 0x1E, 0x00, - 0x1C, 0x1C, 0x0F, 0x00, - 0x3C, 0x9E, 0x07, 0x00, - 0x7C, 0x8F, 0x07, 0x00, - 0xF8, 0xCF, 0xFF, 0x03, - 0xE0, 0xC3, 0xFF, 0x03, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l63.xbm b/app/bin/bitmaps/l63.xbm deleted file mode 100644 index 6b95b4d..0000000 --- a/app/bin/bitmaps/l63.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l63_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x78, 0x1E, - 0xFC, 0x3B, - 0x0C, 0x38, - 0x7C, 0x18, - 0xFC, 0x3C, - 0xCC, 0x38, - 0xCC, 0x33, - 0xFC, 0x3F, - 0x78, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l63_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF0, 0xE1, 0x03, - 0xB8, 0x73, 0x07, - 0x98, 0x3B, 0x07, - 0x1C, 0x00, 0x07, - 0x1C, 0x00, 0x07, - 0x1C, 0x00, 0x07, - 0xFC, 0x81, 0x03, - 0xBC, 0xC3, 0x07, - 0x9C, 0x03, 0x07, - 0x1C, 0x07, 0x0E, - 0x1C, 0x07, 0x0E, - 0x1C, 0x3F, 0x0E, - 0x98, 0x3B, 0x07, - 0xB8, 0x73, 0x07, - 0xF0, 0xE1, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l63_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xE0, 0x07, 0x7E, 0x00, - 0xF8, 0x0F, 0xFF, 0x00, - 0x78, 0x8F, 0xE7, 0x01, - 0x3C, 0x9E, 0xC7, 0x01, - 0x1C, 0x9E, 0xC3, 0x03, - 0x1C, 0x00, 0xC0, 0x03, - 0x1E, 0x00, 0xC0, 0x01, - 0xFE, 0x03, 0xE0, 0x01, - 0xFE, 0x0F, 0xFC, 0x00, - 0x7E, 0x0F, 0xFC, 0x00, - 0x3E, 0x1E, 0xE0, 0x01, - 0x1E, 0x1C, 0xC0, 0x03, - 0x1E, 0x1C, 0x80, 0x03, - 0x1E, 0x1C, 0x80, 0x03, - 0x1E, 0xDC, 0x83, 0x03, - 0x1C, 0xDC, 0x83, 0x03, - 0x3C, 0x9E, 0xC7, 0x03, - 0x7C, 0x8F, 0xE7, 0x01, - 0xF8, 0x0F, 0xFF, 0x01, - 0xE0, 0x03, 0x7E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l64.xbm b/app/bin/bitmaps/l64.xbm deleted file mode 100644 index e2a6cc5..0000000 --- a/app/bin/bitmaps/l64.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l64_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x78, 0x1C, - 0xFC, 0x1C, - 0x0C, 0x1E, - 0x7C, 0x1E, - 0xFC, 0x1F, - 0xCC, 0x1B, - 0xCC, 0x3F, - 0xFC, 0x18, - 0x78, 0x18, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l64_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF0, 0x81, 0x03, - 0xB8, 0x83, 0x03, - 0x98, 0xC3, 0x03, - 0x1C, 0xC0, 0x03, - 0x1C, 0xE0, 0x03, - 0x1C, 0xE0, 0x03, - 0xFC, 0xF1, 0x03, - 0xBC, 0xB3, 0x03, - 0x9C, 0xBB, 0x03, - 0x1C, 0x9F, 0x03, - 0x1C, 0xFF, 0x0F, - 0x1C, 0x87, 0x03, - 0x98, 0x83, 0x03, - 0xB8, 0x83, 0x03, - 0xF0, 0x81, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l64_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xE0, 0x07, 0xF0, 0x00, - 0xF8, 0x0F, 0xF0, 0x00, - 0x78, 0x0F, 0xF8, 0x00, - 0x3C, 0x1E, 0xF8, 0x00, - 0x1C, 0x1E, 0xFC, 0x00, - 0x1C, 0x00, 0xFC, 0x00, - 0x1E, 0x00, 0xFE, 0x00, - 0xFE, 0x03, 0xEE, 0x00, - 0xFE, 0x0F, 0xEF, 0x00, - 0x7E, 0x8F, 0xE7, 0x00, - 0x3E, 0x9E, 0xE7, 0x00, - 0x1E, 0xDC, 0xE3, 0x00, - 0x1E, 0xDC, 0xE1, 0x00, - 0x1E, 0xFC, 0xFF, 0x03, - 0x1E, 0xFC, 0xFF, 0x03, - 0x1C, 0x1C, 0xE0, 0x00, - 0x3C, 0x1E, 0xE0, 0x00, - 0x7C, 0x0F, 0xE0, 0x00, - 0xF8, 0x0F, 0xE0, 0x00, - 0xE0, 0x03, 0xE0, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l65.xbm b/app/bin/bitmaps/l65.xbm deleted file mode 100644 index 3ab1ce6..0000000 --- a/app/bin/bitmaps/l65.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l65_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x78, 0x3F, - 0xFC, 0x07, - 0x0C, 0x07, - 0x7C, 0x1F, - 0xFC, 0x3B, - 0xCC, 0x30, - 0xCC, 0x33, - 0xFC, 0x3F, - 0x78, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l65_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF0, 0xF1, 0x07, - 0xB8, 0x73, 0x00, - 0x98, 0x73, 0x00, - 0x1C, 0x30, 0x00, - 0x1C, 0x30, 0x00, - 0x1C, 0xF8, 0x03, - 0xFC, 0x79, 0x07, - 0xBC, 0x3B, 0x07, - 0x9C, 0x03, 0x0E, - 0x1C, 0x07, 0x0E, - 0x1C, 0x07, 0x0E, - 0x1C, 0x3F, 0x06, - 0x98, 0x3B, 0x07, - 0xB8, 0x73, 0x07, - 0xF0, 0xE1, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l65_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xE0, 0x07, 0xFF, 0x03, - 0xF8, 0x0F, 0xFF, 0x03, - 0x78, 0x0F, 0x07, 0x00, - 0x3C, 0x1E, 0x07, 0x00, - 0x1C, 0x9E, 0x07, 0x00, - 0x1C, 0x80, 0x07, 0x00, - 0x1E, 0x80, 0x7F, 0x00, - 0xFE, 0x83, 0xFF, 0x01, - 0xFE, 0x8F, 0xE7, 0x01, - 0x7E, 0x8F, 0xC3, 0x03, - 0x3E, 0x1E, 0xC0, 0x03, - 0x1E, 0x1C, 0x80, 0x03, - 0x1E, 0x1C, 0x80, 0x03, - 0x1E, 0x1C, 0x80, 0x03, - 0x1E, 0xDC, 0x83, 0x03, - 0x1C, 0xDC, 0xC3, 0x03, - 0x3C, 0x9E, 0xC3, 0x03, - 0x7C, 0x8F, 0xE7, 0x01, - 0xF8, 0x0F, 0xFF, 0x00, - 0xE0, 0x03, 0x7E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l66.xbm b/app/bin/bitmaps/l66.xbm deleted file mode 100644 index 1abbf7c..0000000 --- a/app/bin/bitmaps/l66.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l66_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x78, 0x1E, - 0xFC, 0x3F, - 0x0C, 0x03, - 0x7C, 0x1F, - 0xFC, 0x3F, - 0xCC, 0x33, - 0xCC, 0x33, - 0xFC, 0x3F, - 0x78, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l66_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF0, 0xE1, 0x03, - 0xB8, 0x73, 0x07, - 0x98, 0x33, 0x07, - 0x1C, 0x38, 0x00, - 0x1C, 0x38, 0x00, - 0x1C, 0x38, 0x00, - 0xFC, 0xF9, 0x03, - 0xBC, 0x7B, 0x07, - 0x9C, 0x3B, 0x07, - 0x1C, 0x3F, 0x0E, - 0x1C, 0x3F, 0x0E, - 0x1C, 0x3F, 0x0E, - 0x98, 0x33, 0x07, - 0xB8, 0x73, 0x07, - 0xF0, 0xE1, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l66_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xE0, 0x07, 0xFC, 0x00, - 0xF8, 0x0F, 0xFF, 0x01, - 0x78, 0x0F, 0xEF, 0x01, - 0x3C, 0x9E, 0xC7, 0x03, - 0x1C, 0x9E, 0xC3, 0x03, - 0x1C, 0x80, 0x03, 0x00, - 0x1E, 0xC0, 0x03, 0x00, - 0xFE, 0xC3, 0x7F, 0x00, - 0xFE, 0xCF, 0xFF, 0x01, - 0x7E, 0xCF, 0xEF, 0x01, - 0x3E, 0xDE, 0xC7, 0x03, - 0x1E, 0xDC, 0x83, 0x03, - 0x1E, 0xDC, 0x83, 0x03, - 0x1E, 0xDC, 0x83, 0x03, - 0x1E, 0xDC, 0x83, 0x03, - 0x1C, 0x9C, 0x83, 0x03, - 0x3C, 0x9E, 0xC7, 0x03, - 0x7C, 0x8F, 0xEF, 0x01, - 0xF8, 0x0F, 0xFF, 0x01, - 0xE0, 0x03, 0x7C, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l67.xbm b/app/bin/bitmaps/l67.xbm deleted file mode 100644 index 8cce97c..0000000 --- a/app/bin/bitmaps/l67.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l67_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x78, 0x3F, - 0xFC, 0x38, - 0x0C, 0x18, - 0x7C, 0x1C, - 0xFC, 0x0C, - 0xCC, 0x0E, - 0xCC, 0x0E, - 0xFC, 0x06, - 0x78, 0x06, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l67_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF0, 0xF9, 0x0F, - 0xB8, 0x03, 0x0F, - 0x98, 0x03, 0x07, - 0x1C, 0x80, 0x03, - 0x1C, 0x80, 0x03, - 0x1C, 0xC0, 0x01, - 0xFC, 0xC1, 0x01, - 0xBC, 0xC3, 0x01, - 0x9C, 0xE3, 0x00, - 0x1C, 0xE7, 0x00, - 0x1C, 0xE7, 0x00, - 0x1C, 0xE7, 0x00, - 0x98, 0xE3, 0x00, - 0xB8, 0x73, 0x00, - 0xF0, 0x71, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l67_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xE0, 0xC7, 0xFF, 0x03, - 0xF8, 0xCF, 0xFF, 0x03, - 0x78, 0x0F, 0xC0, 0x03, - 0x3C, 0x1E, 0xE0, 0x01, - 0x1C, 0x1E, 0xE0, 0x01, - 0x1C, 0x00, 0xF0, 0x00, - 0x1E, 0x00, 0xF0, 0x00, - 0xFE, 0x03, 0x78, 0x00, - 0xFE, 0x0F, 0x78, 0x00, - 0x7E, 0x0F, 0x38, 0x00, - 0x3E, 0x1E, 0x3C, 0x00, - 0x1E, 0x1C, 0x3C, 0x00, - 0x1E, 0x1C, 0x1C, 0x00, - 0x1E, 0x1C, 0x1E, 0x00, - 0x1E, 0x1C, 0x1E, 0x00, - 0x1C, 0x1C, 0x1E, 0x00, - 0x3C, 0x1E, 0x1E, 0x00, - 0x7C, 0x0F, 0x0E, 0x00, - 0xF8, 0x0F, 0x0E, 0x00, - 0xE0, 0x03, 0x0E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l68.xbm b/app/bin/bitmaps/l68.xbm deleted file mode 100644 index e32b8c2..0000000 --- a/app/bin/bitmaps/l68.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l68_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x78, 0x1E, - 0xFC, 0x3F, - 0x0C, 0x3B, - 0x7C, 0x3F, - 0xFC, 0x1E, - 0xCC, 0x3F, - 0xCC, 0x33, - 0xFC, 0x3F, - 0x78, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l68_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF0, 0xE1, 0x03, - 0xB8, 0x73, 0x07, - 0x98, 0x33, 0x07, - 0x1C, 0x38, 0x07, - 0x1C, 0x38, 0x07, - 0x1C, 0x38, 0x07, - 0xFC, 0x71, 0x07, - 0xBC, 0xE3, 0x03, - 0x9C, 0x73, 0x07, - 0x1C, 0x3F, 0x06, - 0x1C, 0x3F, 0x0E, - 0x1C, 0x3F, 0x0E, - 0x98, 0x3B, 0x06, - 0xB8, 0x73, 0x07, - 0xF0, 0xE1, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l68_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xE0, 0x07, 0x7E, 0x00, - 0xF8, 0x0F, 0xFF, 0x00, - 0x78, 0x8F, 0xEF, 0x01, - 0x3C, 0x9E, 0xC7, 0x01, - 0x1C, 0x9E, 0xC3, 0x03, - 0x1C, 0x80, 0xC3, 0x03, - 0x1E, 0x80, 0xC7, 0x01, - 0xFE, 0x03, 0xEF, 0x01, - 0xFE, 0x0F, 0xFE, 0x00, - 0x7E, 0x0F, 0xFF, 0x00, - 0x3E, 0x9E, 0xE7, 0x01, - 0x1E, 0x9C, 0xC3, 0x03, - 0x1E, 0xDC, 0x83, 0x03, - 0x1E, 0xDC, 0x83, 0x03, - 0x1E, 0xDC, 0x83, 0x03, - 0x1C, 0xDC, 0x83, 0x03, - 0x3C, 0x9E, 0xC3, 0x03, - 0x7C, 0x8F, 0xE7, 0x01, - 0xF8, 0x0F, 0xFF, 0x01, - 0xE0, 0x03, 0x7E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l69.xbm b/app/bin/bitmaps/l69.xbm deleted file mode 100644 index 8df10ca..0000000 --- a/app/bin/bitmaps/l69.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l69_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x78, 0x1E, - 0xFC, 0x3F, - 0x0C, 0x33, - 0x7C, 0x33, - 0xFC, 0x3F, - 0xCC, 0x3E, - 0xCC, 0x30, - 0xFC, 0x3B, - 0x78, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l69_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF0, 0xE1, 0x01, - 0xB8, 0x73, 0x07, - 0x98, 0x3B, 0x07, - 0x1C, 0x38, 0x06, - 0x1C, 0x38, 0x0E, - 0x1C, 0x38, 0x0E, - 0xFC, 0x39, 0x0F, - 0xBC, 0x73, 0x0F, - 0x9C, 0xE3, 0x0F, - 0x1C, 0x07, 0x0E, - 0x1C, 0x07, 0x06, - 0x1C, 0x07, 0x06, - 0x98, 0x3B, 0x07, - 0xB8, 0x73, 0x03, - 0xF0, 0xF1, 0x01, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l69_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xE0, 0x07, 0x7E, 0x00, - 0xF8, 0x0F, 0xFF, 0x00, - 0x78, 0x8F, 0xEF, 0x01, - 0x3C, 0x9E, 0xC7, 0x01, - 0x1C, 0xDE, 0x83, 0x03, - 0x1C, 0xC0, 0x83, 0x03, - 0x1E, 0xC0, 0x83, 0x03, - 0xFE, 0xC3, 0x83, 0x03, - 0xFE, 0xCF, 0x83, 0x03, - 0x7E, 0x8F, 0xC3, 0x03, - 0x3E, 0x9E, 0xE7, 0x03, - 0x1E, 0x1C, 0xFF, 0x03, - 0x1E, 0x1C, 0xFE, 0x03, - 0x1E, 0x1C, 0x80, 0x03, - 0x1E, 0x1C, 0x80, 0x03, - 0x1C, 0x9C, 0xC3, 0x03, - 0x3C, 0x9E, 0xC3, 0x01, - 0x7C, 0x8F, 0xE7, 0x01, - 0xF8, 0x0F, 0xFF, 0x00, - 0xE0, 0x03, 0x7E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l7.xbm b/app/bin/bitmaps/l7.xbm deleted file mode 100644 index a86a7cc..0000000 --- a/app/bin/bitmaps/l7.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l7_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0xE0, 0x07, - 0x00, 0x07, - 0x00, 0x03, - 0x80, 0x03, - 0x80, 0x01, - 0xC0, 0x01, - 0xC0, 0x01, - 0xC0, 0x00, - 0xC0, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l7_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xC0, 0x7F, 0x00, - 0x00, 0x78, 0x00, - 0x00, 0x38, 0x00, - 0x00, 0x1C, 0x00, - 0x00, 0x1C, 0x00, - 0x00, 0x0E, 0x00, - 0x00, 0x0E, 0x00, - 0x00, 0x0E, 0x00, - 0x00, 0x07, 0x00, - 0x00, 0x07, 0x00, - 0x00, 0x07, 0x00, - 0x00, 0x07, 0x00, - 0x00, 0x07, 0x00, - 0x80, 0x03, 0x00, - 0x80, 0x03, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l7_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x80, 0xFF, 0x07, 0x00, - 0x80, 0xFF, 0x07, 0x00, - 0x00, 0x80, 0x07, 0x00, - 0x00, 0xC0, 0x03, 0x00, - 0x00, 0xC0, 0x03, 0x00, - 0x00, 0xE0, 0x01, 0x00, - 0x00, 0xE0, 0x01, 0x00, - 0x00, 0xF0, 0x00, 0x00, - 0x00, 0xF0, 0x00, 0x00, - 0x00, 0x70, 0x00, 0x00, - 0x00, 0x78, 0x00, 0x00, - 0x00, 0x78, 0x00, 0x00, - 0x00, 0x38, 0x00, 0x00, - 0x00, 0x3C, 0x00, 0x00, - 0x00, 0x3C, 0x00, 0x00, - 0x00, 0x3C, 0x00, 0x00, - 0x00, 0x3C, 0x00, 0x00, - 0x00, 0x1C, 0x00, 0x00, - 0x00, 0x1C, 0x00, 0x00, - 0x00, 0x1C, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l70.xbm b/app/bin/bitmaps/l70.xbm deleted file mode 100644 index cfa65e6..0000000 --- a/app/bin/bitmaps/l70.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l70_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0xFC, 0x1E, - 0xE0, 0x3F, - 0x60, 0x33, - 0x70, 0x33, - 0x30, 0x33, - 0x38, 0x33, - 0x38, 0x33, - 0x18, 0x3F, - 0x18, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l70_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xFC, 0xE7, 0x03, - 0x80, 0x77, 0x07, - 0x80, 0x33, 0x07, - 0xC0, 0x39, 0x06, - 0xC0, 0x39, 0x06, - 0xE0, 0x38, 0x0E, - 0xE0, 0x38, 0x0E, - 0xE0, 0x38, 0x0E, - 0x70, 0x38, 0x0E, - 0x70, 0x38, 0x0E, - 0x70, 0x38, 0x06, - 0x70, 0x38, 0x06, - 0x70, 0x30, 0x07, - 0x38, 0x70, 0x07, - 0x38, 0xE0, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l70_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xFE, 0x1F, 0x7E, 0x00, - 0xFE, 0x1F, 0xFF, 0x00, - 0x00, 0x1E, 0xEF, 0x01, - 0x00, 0x8F, 0xC7, 0x01, - 0x00, 0x8F, 0xC3, 0x03, - 0x80, 0x87, 0xC3, 0x03, - 0x80, 0xC7, 0x83, 0x03, - 0xC0, 0xC3, 0x83, 0x03, - 0xC0, 0xC3, 0x83, 0x03, - 0xC0, 0xC1, 0x83, 0x03, - 0xE0, 0xC1, 0x83, 0x03, - 0xE0, 0xC1, 0x83, 0x03, - 0xE0, 0xC0, 0x83, 0x03, - 0xF0, 0xC0, 0x83, 0x03, - 0xF0, 0x80, 0xC3, 0x03, - 0xF0, 0x80, 0xC3, 0x03, - 0xF0, 0x80, 0xC7, 0x01, - 0x70, 0x00, 0xEF, 0x01, - 0x70, 0x00, 0xFF, 0x00, - 0x70, 0x00, 0x7E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l71.xbm b/app/bin/bitmaps/l71.xbm deleted file mode 100644 index eeb2d63..0000000 --- a/app/bin/bitmaps/l71.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l71_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0xFC, 0x1C, - 0xE0, 0x1E, - 0x60, 0x1F, - 0x70, 0x1C, - 0x30, 0x1C, - 0x38, 0x1C, - 0x38, 0x1C, - 0x18, 0x1C, - 0x18, 0x1C, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l71_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xFC, 0x87, 0x03, - 0x80, 0xC7, 0x03, - 0x80, 0xC3, 0x03, - 0xC0, 0xE1, 0x03, - 0xC0, 0xB1, 0x03, - 0xE0, 0x80, 0x03, - 0xE0, 0x80, 0x03, - 0xE0, 0x80, 0x03, - 0x70, 0x80, 0x03, - 0x70, 0x80, 0x03, - 0x70, 0x80, 0x03, - 0x70, 0x80, 0x03, - 0x70, 0x80, 0x03, - 0x38, 0x80, 0x03, - 0x38, 0x80, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l71_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xFE, 0x1F, 0x70, 0x00, - 0xFE, 0x1F, 0x70, 0x00, - 0x00, 0x1E, 0x78, 0x00, - 0x00, 0x0F, 0x7C, 0x00, - 0x00, 0x0F, 0x7E, 0x00, - 0x80, 0x07, 0x7F, 0x00, - 0x80, 0x07, 0x73, 0x00, - 0xC0, 0x03, 0x70, 0x00, - 0xC0, 0x03, 0x70, 0x00, - 0xC0, 0x01, 0x70, 0x00, - 0xE0, 0x01, 0x70, 0x00, - 0xE0, 0x01, 0x70, 0x00, - 0xE0, 0x00, 0x70, 0x00, - 0xF0, 0x00, 0x70, 0x00, - 0xF0, 0x00, 0x70, 0x00, - 0xF0, 0x00, 0x70, 0x00, - 0xF0, 0x00, 0x70, 0x00, - 0x70, 0x00, 0x70, 0x00, - 0x70, 0x00, 0x70, 0x00, - 0x70, 0x00, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l72.xbm b/app/bin/bitmaps/l72.xbm deleted file mode 100644 index 9ff206f..0000000 --- a/app/bin/bitmaps/l72.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l72_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0xFC, 0x1E, - 0xE0, 0x3F, - 0x60, 0x33, - 0x70, 0x30, - 0x30, 0x38, - 0x38, 0x1C, - 0x38, 0x0E, - 0x18, 0x07, - 0x18, 0x3F, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l72_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xFC, 0xE7, 0x03, - 0x80, 0x77, 0x07, - 0x80, 0x3B, 0x06, - 0xC0, 0x39, 0x0E, - 0xC0, 0x01, 0x0E, - 0xE0, 0x00, 0x0E, - 0xE0, 0x00, 0x07, - 0xE0, 0x80, 0x07, - 0x70, 0x80, 0x03, - 0x70, 0xC0, 0x01, - 0x70, 0xE0, 0x01, - 0x70, 0xF0, 0x00, - 0x70, 0x70, 0x00, - 0x38, 0x78, 0x00, - 0x38, 0xF8, 0x0F, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l72_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xFE, 0x1F, 0xFE, 0x00, - 0xFE, 0x1F, 0xFF, 0x01, - 0x00, 0x9E, 0xE7, 0x03, - 0x00, 0x8F, 0xC3, 0x03, - 0x00, 0xCF, 0x83, 0x03, - 0x80, 0xC7, 0x83, 0x03, - 0x80, 0x07, 0x80, 0x03, - 0xC0, 0x03, 0xC0, 0x03, - 0xC0, 0x03, 0xC0, 0x03, - 0xC0, 0x01, 0xE0, 0x01, - 0xE0, 0x01, 0xF0, 0x01, - 0xE0, 0x01, 0xF8, 0x00, - 0xE0, 0x00, 0x78, 0x00, - 0xF0, 0x00, 0x3C, 0x00, - 0xF0, 0x00, 0x1E, 0x00, - 0xF0, 0x00, 0x0F, 0x00, - 0xF0, 0x80, 0x07, 0x00, - 0x70, 0x80, 0x07, 0x00, - 0x70, 0xC0, 0xFF, 0x03, - 0x70, 0xC0, 0xFF, 0x03, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l73.xbm b/app/bin/bitmaps/l73.xbm deleted file mode 100644 index 64dfbb4..0000000 --- a/app/bin/bitmaps/l73.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l73_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0xFC, 0x1E, - 0xE0, 0x3B, - 0x60, 0x38, - 0x70, 0x18, - 0x30, 0x3C, - 0x38, 0x38, - 0x38, 0x33, - 0x18, 0x3F, - 0x18, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l73_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xFC, 0xE7, 0x03, - 0x80, 0x77, 0x07, - 0x80, 0x3B, 0x07, - 0xC0, 0x01, 0x07, - 0xC0, 0x01, 0x07, - 0xE0, 0x00, 0x07, - 0xE0, 0x80, 0x03, - 0xE0, 0xC0, 0x07, - 0x70, 0x00, 0x07, - 0x70, 0x00, 0x0E, - 0x70, 0x00, 0x0E, - 0x70, 0x38, 0x0E, - 0x70, 0x38, 0x07, - 0x38, 0x70, 0x07, - 0x38, 0xE0, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l73_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xFE, 0x1F, 0x7E, 0x00, - 0xFE, 0x1F, 0xFF, 0x00, - 0x00, 0x9E, 0xE7, 0x01, - 0x00, 0x8F, 0xC7, 0x01, - 0x00, 0x8F, 0xC3, 0x03, - 0x80, 0x07, 0xC0, 0x03, - 0x80, 0x07, 0xC0, 0x01, - 0xC0, 0x03, 0xE0, 0x01, - 0xC0, 0x03, 0xFC, 0x00, - 0xC0, 0x01, 0xFC, 0x00, - 0xE0, 0x01, 0xE0, 0x01, - 0xE0, 0x01, 0xC0, 0x03, - 0xE0, 0x00, 0x80, 0x03, - 0xF0, 0x00, 0x80, 0x03, - 0xF0, 0xC0, 0x83, 0x03, - 0xF0, 0xC0, 0x83, 0x03, - 0xF0, 0x80, 0xC7, 0x03, - 0x70, 0x80, 0xE7, 0x01, - 0x70, 0x00, 0xFF, 0x01, - 0x70, 0x00, 0x7E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l74.xbm b/app/bin/bitmaps/l74.xbm deleted file mode 100644 index c41ea54..0000000 --- a/app/bin/bitmaps/l74.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l74_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0xFC, 0x1C, - 0xE0, 0x1C, - 0x60, 0x1E, - 0x70, 0x1E, - 0x30, 0x1F, - 0x38, 0x1B, - 0xB8, 0x3F, - 0x18, 0x18, - 0x18, 0x18, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l74_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xFC, 0x87, 0x03, - 0x80, 0x87, 0x03, - 0x80, 0xC3, 0x03, - 0xC0, 0xC1, 0x03, - 0xC0, 0xE1, 0x03, - 0xE0, 0xE0, 0x03, - 0xE0, 0xF0, 0x03, - 0xE0, 0xB0, 0x03, - 0x70, 0xB8, 0x03, - 0x70, 0x98, 0x03, - 0x70, 0xFC, 0x0F, - 0x70, 0x80, 0x03, - 0x70, 0x80, 0x03, - 0x38, 0x80, 0x03, - 0x38, 0x80, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l74_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xFE, 0x1F, 0xF0, 0x00, - 0xFE, 0x1F, 0xF0, 0x00, - 0x00, 0x1E, 0xF8, 0x00, - 0x00, 0x0F, 0xF8, 0x00, - 0x00, 0x0F, 0xFC, 0x00, - 0x80, 0x07, 0xFC, 0x00, - 0x80, 0x07, 0xFE, 0x00, - 0xC0, 0x03, 0xEE, 0x00, - 0xC0, 0x03, 0xEF, 0x00, - 0xC0, 0x81, 0xE7, 0x00, - 0xE0, 0x81, 0xE7, 0x00, - 0xE0, 0xC1, 0xE3, 0x00, - 0xE0, 0xC0, 0xE1, 0x00, - 0xF0, 0xE0, 0xFF, 0x03, - 0xF0, 0xE0, 0xFF, 0x03, - 0xF0, 0x00, 0xE0, 0x00, - 0xF0, 0x00, 0xE0, 0x00, - 0x70, 0x00, 0xE0, 0x00, - 0x70, 0x00, 0xE0, 0x00, - 0x70, 0x00, 0xE0, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l75.xbm b/app/bin/bitmaps/l75.xbm deleted file mode 100644 index 58a6c52..0000000 --- a/app/bin/bitmaps/l75.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l75_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0xFC, 0x3F, - 0xE0, 0x07, - 0x60, 0x07, - 0x70, 0x1F, - 0x30, 0x3B, - 0x38, 0x30, - 0x38, 0x33, - 0x18, 0x3F, - 0x18, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l75_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xFC, 0xF7, 0x07, - 0x80, 0x77, 0x00, - 0x80, 0x73, 0x00, - 0xC0, 0x31, 0x00, - 0xC0, 0x31, 0x00, - 0xE0, 0xF8, 0x03, - 0xE0, 0x78, 0x07, - 0xE0, 0x38, 0x07, - 0x70, 0x00, 0x0E, - 0x70, 0x00, 0x0E, - 0x70, 0x00, 0x0E, - 0x70, 0x38, 0x06, - 0x70, 0x38, 0x07, - 0x38, 0x70, 0x07, - 0x38, 0xE0, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l75_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xFE, 0x1F, 0xFF, 0x03, - 0xFE, 0x1F, 0xFF, 0x03, - 0x00, 0x1E, 0x07, 0x00, - 0x00, 0x0F, 0x07, 0x00, - 0x00, 0x8F, 0x07, 0x00, - 0x80, 0x87, 0x07, 0x00, - 0x80, 0x87, 0x7F, 0x00, - 0xC0, 0x83, 0xFF, 0x01, - 0xC0, 0x83, 0xE7, 0x01, - 0xC0, 0x81, 0xC3, 0x03, - 0xE0, 0x01, 0xC0, 0x03, - 0xE0, 0x01, 0x80, 0x03, - 0xE0, 0x00, 0x80, 0x03, - 0xF0, 0x00, 0x80, 0x03, - 0xF0, 0xC0, 0x83, 0x03, - 0xF0, 0xC0, 0xC3, 0x03, - 0xF0, 0x80, 0xC3, 0x03, - 0x70, 0x80, 0xE7, 0x01, - 0x70, 0x00, 0xFF, 0x00, - 0x70, 0x00, 0x7E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l76.xbm b/app/bin/bitmaps/l76.xbm deleted file mode 100644 index 9b385dc..0000000 --- a/app/bin/bitmaps/l76.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l76_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0xFC, 0x1E, - 0xE0, 0x3F, - 0x60, 0x03, - 0x70, 0x1F, - 0x30, 0x3F, - 0x38, 0x33, - 0x38, 0x33, - 0x18, 0x3F, - 0x18, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l76_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xFC, 0xE7, 0x03, - 0x80, 0x77, 0x07, - 0x80, 0x33, 0x07, - 0xC0, 0x39, 0x00, - 0xC0, 0x39, 0x00, - 0xE0, 0x38, 0x00, - 0xE0, 0xF8, 0x03, - 0xE0, 0x78, 0x07, - 0x70, 0x38, 0x07, - 0x70, 0x38, 0x0E, - 0x70, 0x38, 0x0E, - 0x70, 0x38, 0x0E, - 0x70, 0x30, 0x07, - 0x38, 0x70, 0x07, - 0x38, 0xE0, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l76_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xFE, 0x1F, 0xFC, 0x00, - 0xFE, 0x1F, 0xFF, 0x01, - 0x00, 0x1E, 0xEF, 0x01, - 0x00, 0x8F, 0xC7, 0x03, - 0x00, 0x8F, 0xC3, 0x03, - 0x80, 0x87, 0x03, 0x00, - 0x80, 0xC7, 0x03, 0x00, - 0xC0, 0xC3, 0x7F, 0x00, - 0xC0, 0xC3, 0xFF, 0x01, - 0xC0, 0xC1, 0xEF, 0x01, - 0xE0, 0xC1, 0xC7, 0x03, - 0xE0, 0xC1, 0x83, 0x03, - 0xE0, 0xC0, 0x83, 0x03, - 0xF0, 0xC0, 0x83, 0x03, - 0xF0, 0xC0, 0x83, 0x03, - 0xF0, 0x80, 0x83, 0x03, - 0xF0, 0x80, 0xC7, 0x03, - 0x70, 0x80, 0xEF, 0x01, - 0x70, 0x00, 0xFF, 0x01, - 0x70, 0x00, 0x7C, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l77.xbm b/app/bin/bitmaps/l77.xbm deleted file mode 100644 index c406f2d..0000000 --- a/app/bin/bitmaps/l77.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l77_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0xFC, 0x3F, - 0xE0, 0x38, - 0x60, 0x18, - 0x70, 0x1C, - 0x30, 0x0C, - 0x38, 0x0E, - 0x38, 0x0E, - 0x18, 0x06, - 0x18, 0x06, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l77_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xFC, 0xFF, 0x0F, - 0x80, 0x07, 0x0F, - 0x80, 0x03, 0x07, - 0xC0, 0x81, 0x03, - 0xC0, 0x81, 0x03, - 0xE0, 0xC0, 0x01, - 0xE0, 0xC0, 0x01, - 0xE0, 0xC0, 0x01, - 0x70, 0xE0, 0x00, - 0x70, 0xE0, 0x00, - 0x70, 0xE0, 0x00, - 0x70, 0xE0, 0x00, - 0x70, 0xE0, 0x00, - 0x38, 0x70, 0x00, - 0x38, 0x70, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l77_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xFE, 0xDF, 0xFF, 0x03, - 0xFE, 0xDF, 0xFF, 0x03, - 0x00, 0x1E, 0xC0, 0x03, - 0x00, 0x0F, 0xE0, 0x01, - 0x00, 0x0F, 0xE0, 0x01, - 0x80, 0x07, 0xF0, 0x00, - 0x80, 0x07, 0xF0, 0x00, - 0xC0, 0x03, 0x78, 0x00, - 0xC0, 0x03, 0x78, 0x00, - 0xC0, 0x01, 0x38, 0x00, - 0xE0, 0x01, 0x3C, 0x00, - 0xE0, 0x01, 0x3C, 0x00, - 0xE0, 0x00, 0x1C, 0x00, - 0xF0, 0x00, 0x1E, 0x00, - 0xF0, 0x00, 0x1E, 0x00, - 0xF0, 0x00, 0x1E, 0x00, - 0xF0, 0x00, 0x1E, 0x00, - 0x70, 0x00, 0x0E, 0x00, - 0x70, 0x00, 0x0E, 0x00, - 0x70, 0x00, 0x0E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l78.xbm b/app/bin/bitmaps/l78.xbm deleted file mode 100644 index 0674918..0000000 --- a/app/bin/bitmaps/l78.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l78_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0xFC, 0x1E, - 0xE0, 0x3F, - 0x60, 0x3B, - 0x70, 0x3F, - 0x30, 0x1E, - 0x38, 0x3F, - 0x38, 0x33, - 0x18, 0x3F, - 0x18, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l78_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xFC, 0xE7, 0x03, - 0x80, 0x77, 0x07, - 0x80, 0x33, 0x07, - 0xC0, 0x39, 0x07, - 0xC0, 0x39, 0x07, - 0xE0, 0x38, 0x07, - 0xE0, 0x70, 0x07, - 0xE0, 0xE0, 0x03, - 0x70, 0x70, 0x07, - 0x70, 0x38, 0x06, - 0x70, 0x38, 0x0E, - 0x70, 0x38, 0x0E, - 0x70, 0x38, 0x06, - 0x38, 0x70, 0x07, - 0x38, 0xE0, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l78_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xFE, 0x1F, 0x7E, 0x00, - 0xFE, 0x1F, 0xFF, 0x00, - 0x00, 0x9E, 0xEF, 0x01, - 0x00, 0x8F, 0xC7, 0x01, - 0x00, 0x8F, 0xC3, 0x03, - 0x80, 0x87, 0xC3, 0x03, - 0x80, 0x87, 0xC7, 0x01, - 0xC0, 0x03, 0xEF, 0x01, - 0xC0, 0x03, 0xFE, 0x00, - 0xC0, 0x01, 0xFF, 0x00, - 0xE0, 0x81, 0xE7, 0x01, - 0xE0, 0x81, 0xC3, 0x03, - 0xE0, 0xC0, 0x83, 0x03, - 0xF0, 0xC0, 0x83, 0x03, - 0xF0, 0xC0, 0x83, 0x03, - 0xF0, 0xC0, 0x83, 0x03, - 0xF0, 0x80, 0xC3, 0x03, - 0x70, 0x80, 0xE7, 0x01, - 0x70, 0x00, 0xFF, 0x01, - 0x70, 0x00, 0x7E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l79.xbm b/app/bin/bitmaps/l79.xbm deleted file mode 100644 index c1d909b..0000000 --- a/app/bin/bitmaps/l79.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l79_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0xFC, 0x1E, - 0xE0, 0x3F, - 0x60, 0x33, - 0x70, 0x33, - 0x30, 0x3F, - 0x38, 0x3E, - 0x38, 0x30, - 0x18, 0x3B, - 0x18, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l79_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xFC, 0xE7, 0x01, - 0x80, 0x77, 0x07, - 0x80, 0x3B, 0x07, - 0xC0, 0x39, 0x06, - 0xC0, 0x39, 0x0E, - 0xE0, 0x38, 0x0E, - 0xE0, 0x38, 0x0F, - 0xE0, 0x70, 0x0F, - 0x70, 0xE0, 0x0F, - 0x70, 0x00, 0x0E, - 0x70, 0x00, 0x06, - 0x70, 0x00, 0x06, - 0x70, 0x38, 0x07, - 0x38, 0x70, 0x03, - 0x38, 0xF0, 0x01, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l79_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xFE, 0x1F, 0x7E, 0x00, - 0xFE, 0x1F, 0xFF, 0x00, - 0x00, 0x9E, 0xEF, 0x01, - 0x00, 0x8F, 0xC7, 0x01, - 0x00, 0xCF, 0x83, 0x03, - 0x80, 0xC7, 0x83, 0x03, - 0x80, 0xC7, 0x83, 0x03, - 0xC0, 0xC3, 0x83, 0x03, - 0xC0, 0xC3, 0x83, 0x03, - 0xC0, 0x81, 0xC3, 0x03, - 0xE0, 0x81, 0xE7, 0x03, - 0xE0, 0x01, 0xFF, 0x03, - 0xE0, 0x00, 0xFE, 0x03, - 0xF0, 0x00, 0x80, 0x03, - 0xF0, 0x00, 0x80, 0x03, - 0xF0, 0x80, 0xC3, 0x03, - 0xF0, 0x80, 0xC3, 0x01, - 0x70, 0x80, 0xE7, 0x01, - 0x70, 0x00, 0xFF, 0x00, - 0x70, 0x00, 0x7E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l8.xbm b/app/bin/bitmaps/l8.xbm deleted file mode 100644 index 1054bfd..0000000 --- a/app/bin/bitmaps/l8.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l8_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0xC0, 0x03, - 0xE0, 0x07, - 0x60, 0x07, - 0xE0, 0x07, - 0xC0, 0x03, - 0xE0, 0x07, - 0x60, 0x06, - 0xE0, 0x07, - 0xC0, 0x03, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l8_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x1F, 0x00, - 0x80, 0x3B, 0x00, - 0x80, 0x39, 0x00, - 0xC0, 0x39, 0x00, - 0xC0, 0x39, 0x00, - 0xC0, 0x39, 0x00, - 0x80, 0x3B, 0x00, - 0x00, 0x1F, 0x00, - 0x80, 0x3B, 0x00, - 0xC0, 0x31, 0x00, - 0xC0, 0x71, 0x00, - 0xC0, 0x71, 0x00, - 0xC0, 0x31, 0x00, - 0x80, 0x3B, 0x00, - 0x00, 0x1F, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l8_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0xFC, 0x00, 0x00, - 0x00, 0xFE, 0x01, 0x00, - 0x00, 0xDF, 0x03, 0x00, - 0x00, 0x8F, 0x03, 0x00, - 0x00, 0x87, 0x07, 0x00, - 0x00, 0x87, 0x07, 0x00, - 0x00, 0x8F, 0x03, 0x00, - 0x00, 0xDE, 0x03, 0x00, - 0x00, 0xFC, 0x01, 0x00, - 0x00, 0xFE, 0x01, 0x00, - 0x00, 0xCF, 0x03, 0x00, - 0x00, 0x87, 0x07, 0x00, - 0x80, 0x07, 0x07, 0x00, - 0x80, 0x07, 0x07, 0x00, - 0x80, 0x07, 0x07, 0x00, - 0x80, 0x07, 0x07, 0x00, - 0x00, 0x87, 0x07, 0x00, - 0x00, 0xCF, 0x03, 0x00, - 0x00, 0xFE, 0x03, 0x00, - 0x00, 0xFC, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l80.xbm b/app/bin/bitmaps/l80.xbm deleted file mode 100644 index 8dc12d0..0000000 --- a/app/bin/bitmaps/l80.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l80_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x78, 0x1E, - 0xFC, 0x3F, - 0xEC, 0x33, - 0xFC, 0x33, - 0x78, 0x33, - 0xFC, 0x33, - 0xCC, 0x33, - 0xFC, 0x3F, - 0x78, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l80_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF0, 0xE1, 0x03, - 0xB8, 0x73, 0x07, - 0x98, 0x33, 0x07, - 0x9C, 0x3B, 0x06, - 0x9C, 0x3B, 0x06, - 0x9C, 0x3B, 0x0E, - 0xB8, 0x3B, 0x0E, - 0xF0, 0x39, 0x0E, - 0xB8, 0x3B, 0x0E, - 0x1C, 0x3B, 0x0E, - 0x1C, 0x3F, 0x06, - 0x1C, 0x3F, 0x06, - 0x1C, 0x33, 0x07, - 0xB8, 0x73, 0x07, - 0xF0, 0xE1, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l80_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xF0, 0x03, 0x7E, 0x00, - 0xF8, 0x07, 0xFF, 0x00, - 0x7C, 0x0F, 0xEF, 0x01, - 0x3C, 0x8E, 0xC7, 0x01, - 0x1C, 0x9E, 0xC3, 0x03, - 0x1C, 0x9E, 0xC3, 0x03, - 0x3C, 0xCE, 0x83, 0x03, - 0x78, 0xCF, 0x83, 0x03, - 0xF0, 0xC7, 0x83, 0x03, - 0xF8, 0xC7, 0x83, 0x03, - 0x3C, 0xCF, 0x83, 0x03, - 0x1C, 0xDE, 0x83, 0x03, - 0x1E, 0xDC, 0x83, 0x03, - 0x1E, 0xDC, 0x83, 0x03, - 0x1E, 0x9C, 0xC3, 0x03, - 0x1E, 0x9C, 0xC3, 0x03, - 0x1C, 0x9E, 0xC7, 0x01, - 0x3C, 0x0F, 0xEF, 0x01, - 0xF8, 0x0F, 0xFF, 0x00, - 0xF0, 0x03, 0x7E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l81.xbm b/app/bin/bitmaps/l81.xbm deleted file mode 100644 index 118901b..0000000 --- a/app/bin/bitmaps/l81.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l81_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x78, 0x1C, - 0xFC, 0x1E, - 0xEC, 0x1F, - 0xFC, 0x1C, - 0x78, 0x1C, - 0xFC, 0x1C, - 0xCC, 0x1C, - 0xFC, 0x1C, - 0x78, 0x1C, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l81_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF0, 0x81, 0x03, - 0xB8, 0xC3, 0x03, - 0x98, 0xC3, 0x03, - 0x9C, 0xE3, 0x03, - 0x9C, 0xB3, 0x03, - 0x9C, 0x83, 0x03, - 0xB8, 0x83, 0x03, - 0xF0, 0x81, 0x03, - 0xB8, 0x83, 0x03, - 0x1C, 0x83, 0x03, - 0x1C, 0x87, 0x03, - 0x1C, 0x87, 0x03, - 0x1C, 0x83, 0x03, - 0xB8, 0x83, 0x03, - 0xF0, 0x81, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l81_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xF0, 0x03, 0x70, 0x00, - 0xF8, 0x07, 0x70, 0x00, - 0x7C, 0x0F, 0x78, 0x00, - 0x3C, 0x0E, 0x7C, 0x00, - 0x1C, 0x1E, 0x7E, 0x00, - 0x1C, 0x1E, 0x7F, 0x00, - 0x3C, 0x0E, 0x73, 0x00, - 0x78, 0x0F, 0x70, 0x00, - 0xF0, 0x07, 0x70, 0x00, - 0xF8, 0x07, 0x70, 0x00, - 0x3C, 0x0F, 0x70, 0x00, - 0x1C, 0x1E, 0x70, 0x00, - 0x1E, 0x1C, 0x70, 0x00, - 0x1E, 0x1C, 0x70, 0x00, - 0x1E, 0x1C, 0x70, 0x00, - 0x1E, 0x1C, 0x70, 0x00, - 0x1C, 0x1E, 0x70, 0x00, - 0x3C, 0x0F, 0x70, 0x00, - 0xF8, 0x0F, 0x70, 0x00, - 0xF0, 0x03, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l82.xbm b/app/bin/bitmaps/l82.xbm deleted file mode 100644 index 74edb5d..0000000 --- a/app/bin/bitmaps/l82.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l82_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x78, 0x1E, - 0xFC, 0x3F, - 0xEC, 0x33, - 0xFC, 0x30, - 0x78, 0x38, - 0xFC, 0x1C, - 0xCC, 0x0E, - 0xFC, 0x07, - 0x78, 0x3F, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l82_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF0, 0xE1, 0x03, - 0xB8, 0x73, 0x07, - 0x98, 0x3B, 0x06, - 0x9C, 0x3B, 0x0E, - 0x9C, 0x03, 0x0E, - 0x9C, 0x03, 0x0E, - 0xB8, 0x03, 0x07, - 0xF0, 0x81, 0x07, - 0xB8, 0x83, 0x03, - 0x1C, 0xC3, 0x01, - 0x1C, 0xE7, 0x01, - 0x1C, 0xF7, 0x00, - 0x1C, 0x73, 0x00, - 0xB8, 0x7B, 0x00, - 0xF0, 0xF9, 0x0F, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l82_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xF0, 0x03, 0xFE, 0x00, - 0xF8, 0x07, 0xFF, 0x01, - 0x7C, 0x8F, 0xE7, 0x03, - 0x3C, 0x8E, 0xC3, 0x03, - 0x1C, 0xDE, 0x83, 0x03, - 0x1C, 0xDE, 0x83, 0x03, - 0x3C, 0x0E, 0x80, 0x03, - 0x78, 0x0F, 0xC0, 0x03, - 0xF0, 0x07, 0xC0, 0x03, - 0xF8, 0x07, 0xE0, 0x01, - 0x3C, 0x0F, 0xF0, 0x01, - 0x1C, 0x1E, 0xF8, 0x00, - 0x1E, 0x1C, 0x78, 0x00, - 0x1E, 0x1C, 0x3C, 0x00, - 0x1E, 0x1C, 0x1E, 0x00, - 0x1E, 0x1C, 0x0F, 0x00, - 0x1C, 0x9E, 0x07, 0x00, - 0x3C, 0x8F, 0x07, 0x00, - 0xF8, 0xCF, 0xFF, 0x03, - 0xF0, 0xC3, 0xFF, 0x03, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l83.xbm b/app/bin/bitmaps/l83.xbm deleted file mode 100644 index 3f7a1a0..0000000 --- a/app/bin/bitmaps/l83.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l83_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x78, 0x1E, - 0xFC, 0x3B, - 0xEC, 0x38, - 0xFC, 0x18, - 0x78, 0x3C, - 0xFC, 0x38, - 0xCC, 0x33, - 0xFC, 0x3F, - 0x78, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l83_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF0, 0xE1, 0x03, - 0xB8, 0x73, 0x07, - 0x98, 0x3B, 0x07, - 0x9C, 0x03, 0x07, - 0x9C, 0x03, 0x07, - 0x9C, 0x03, 0x07, - 0xB8, 0x83, 0x03, - 0xF0, 0xC1, 0x07, - 0xB8, 0x03, 0x07, - 0x1C, 0x03, 0x0E, - 0x1C, 0x07, 0x0E, - 0x1C, 0x3F, 0x0E, - 0x1C, 0x3B, 0x07, - 0xB8, 0x73, 0x07, - 0xF0, 0xE1, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l83_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xF0, 0x03, 0x7E, 0x00, - 0xF8, 0x07, 0xFF, 0x00, - 0x7C, 0x8F, 0xE7, 0x01, - 0x3C, 0x8E, 0xC7, 0x01, - 0x1C, 0x9E, 0xC3, 0x03, - 0x1C, 0x1E, 0xC0, 0x03, - 0x3C, 0x0E, 0xC0, 0x01, - 0x78, 0x0F, 0xE0, 0x01, - 0xF0, 0x07, 0xFC, 0x00, - 0xF8, 0x07, 0xFC, 0x00, - 0x3C, 0x0F, 0xE0, 0x01, - 0x1C, 0x1E, 0xC0, 0x03, - 0x1E, 0x1C, 0x80, 0x03, - 0x1E, 0x1C, 0x80, 0x03, - 0x1E, 0xDC, 0x83, 0x03, - 0x1E, 0xDC, 0x83, 0x03, - 0x1C, 0x9E, 0xC7, 0x03, - 0x3C, 0x8F, 0xE7, 0x01, - 0xF8, 0x0F, 0xFF, 0x01, - 0xF0, 0x03, 0x7E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l84.xbm b/app/bin/bitmaps/l84.xbm deleted file mode 100644 index 0cce4be..0000000 --- a/app/bin/bitmaps/l84.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l84_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x78, 0x1C, - 0xFC, 0x1C, - 0xEC, 0x1E, - 0xFC, 0x1E, - 0x78, 0x1F, - 0xFC, 0x1B, - 0xCC, 0x3F, - 0xFC, 0x18, - 0x78, 0x18, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l84_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF0, 0x81, 0x03, - 0xB8, 0x83, 0x03, - 0x98, 0xC3, 0x03, - 0x9C, 0xC3, 0x03, - 0x9C, 0xE3, 0x03, - 0x9C, 0xE3, 0x03, - 0xB8, 0xF3, 0x03, - 0xF0, 0xB1, 0x03, - 0xB8, 0xBB, 0x03, - 0x1C, 0x9B, 0x03, - 0x1C, 0xFF, 0x0F, - 0x1C, 0x87, 0x03, - 0x1C, 0x83, 0x03, - 0xB8, 0x83, 0x03, - 0xF0, 0x81, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l84_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xF0, 0x03, 0xF0, 0x00, - 0xF8, 0x07, 0xF0, 0x00, - 0x7C, 0x0F, 0xF8, 0x00, - 0x3C, 0x0E, 0xF8, 0x00, - 0x1C, 0x1E, 0xFC, 0x00, - 0x1C, 0x1E, 0xFC, 0x00, - 0x3C, 0x0E, 0xFE, 0x00, - 0x78, 0x0F, 0xEE, 0x00, - 0xF0, 0x07, 0xEF, 0x00, - 0xF8, 0x87, 0xE7, 0x00, - 0x3C, 0x8F, 0xE7, 0x00, - 0x1C, 0xDE, 0xE3, 0x00, - 0x1E, 0xDC, 0xE1, 0x00, - 0x1E, 0xFC, 0xFF, 0x03, - 0x1E, 0xFC, 0xFF, 0x03, - 0x1E, 0x1C, 0xE0, 0x00, - 0x1C, 0x1E, 0xE0, 0x00, - 0x3C, 0x0F, 0xE0, 0x00, - 0xF8, 0x0F, 0xE0, 0x00, - 0xF0, 0x03, 0xE0, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l85.xbm b/app/bin/bitmaps/l85.xbm deleted file mode 100644 index 420ea67..0000000 --- a/app/bin/bitmaps/l85.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l85_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x78, 0x3F, - 0xFC, 0x07, - 0xEC, 0x07, - 0xFC, 0x1F, - 0x78, 0x3B, - 0xFC, 0x30, - 0xCC, 0x33, - 0xFC, 0x3F, - 0x78, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l85_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF0, 0xF1, 0x07, - 0xB8, 0x73, 0x00, - 0x98, 0x73, 0x00, - 0x9C, 0x33, 0x00, - 0x9C, 0x33, 0x00, - 0x9C, 0xFB, 0x03, - 0xB8, 0x7B, 0x07, - 0xF0, 0x39, 0x07, - 0xB8, 0x03, 0x0E, - 0x1C, 0x03, 0x0E, - 0x1C, 0x07, 0x0E, - 0x1C, 0x3F, 0x06, - 0x1C, 0x3B, 0x07, - 0xB8, 0x73, 0x07, - 0xF0, 0xE1, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l85_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xF0, 0x03, 0xFF, 0x03, - 0xF8, 0x07, 0xFF, 0x03, - 0x7C, 0x0F, 0x07, 0x00, - 0x3C, 0x0E, 0x07, 0x00, - 0x1C, 0x9E, 0x07, 0x00, - 0x1C, 0x9E, 0x07, 0x00, - 0x3C, 0x8E, 0x7F, 0x00, - 0x78, 0x8F, 0xFF, 0x01, - 0xF0, 0x87, 0xE7, 0x01, - 0xF8, 0x87, 0xC3, 0x03, - 0x3C, 0x0F, 0xC0, 0x03, - 0x1C, 0x1E, 0x80, 0x03, - 0x1E, 0x1C, 0x80, 0x03, - 0x1E, 0x1C, 0x80, 0x03, - 0x1E, 0xDC, 0x83, 0x03, - 0x1E, 0xDC, 0xC3, 0x03, - 0x1C, 0x9E, 0xC3, 0x03, - 0x3C, 0x8F, 0xE7, 0x01, - 0xF8, 0x0F, 0xFF, 0x00, - 0xF0, 0x03, 0x7E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l86.xbm b/app/bin/bitmaps/l86.xbm deleted file mode 100644 index 31ee6f1..0000000 --- a/app/bin/bitmaps/l86.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l86_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x78, 0x1E, - 0xFC, 0x3F, - 0xEC, 0x03, - 0xFC, 0x1F, - 0x78, 0x3F, - 0xFC, 0x33, - 0xCC, 0x33, - 0xFC, 0x3F, - 0x78, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l86_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF0, 0xE1, 0x03, - 0xB8, 0x73, 0x07, - 0x98, 0x33, 0x07, - 0x9C, 0x3B, 0x00, - 0x9C, 0x3B, 0x00, - 0x9C, 0x3B, 0x00, - 0xB8, 0xFB, 0x03, - 0xF0, 0x79, 0x07, - 0xB8, 0x3B, 0x07, - 0x1C, 0x3B, 0x0E, - 0x1C, 0x3F, 0x0E, - 0x1C, 0x3F, 0x0E, - 0x1C, 0x33, 0x07, - 0xB8, 0x73, 0x07, - 0xF0, 0xE1, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l86_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xF0, 0x03, 0xFC, 0x00, - 0xF8, 0x07, 0xFF, 0x01, - 0x7C, 0x0F, 0xEF, 0x01, - 0x3C, 0x8E, 0xC7, 0x03, - 0x1C, 0x9E, 0xC3, 0x03, - 0x1C, 0x9E, 0x03, 0x00, - 0x3C, 0xCE, 0x03, 0x00, - 0x78, 0xCF, 0x7F, 0x00, - 0xF0, 0xC7, 0xFF, 0x01, - 0xF8, 0xC7, 0xEF, 0x01, - 0x3C, 0xCF, 0xC7, 0x03, - 0x1C, 0xDE, 0x83, 0x03, - 0x1E, 0xDC, 0x83, 0x03, - 0x1E, 0xDC, 0x83, 0x03, - 0x1E, 0xDC, 0x83, 0x03, - 0x1E, 0x9C, 0x83, 0x03, - 0x1C, 0x9E, 0xC7, 0x03, - 0x3C, 0x8F, 0xEF, 0x01, - 0xF8, 0x0F, 0xFF, 0x01, - 0xF0, 0x03, 0x7C, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l87.xbm b/app/bin/bitmaps/l87.xbm deleted file mode 100644 index dcd52b5..0000000 --- a/app/bin/bitmaps/l87.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l87_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x78, 0x3F, - 0xFC, 0x38, - 0xEC, 0x18, - 0xFC, 0x1C, - 0x78, 0x0C, - 0xFC, 0x0E, - 0xCC, 0x0E, - 0xFC, 0x06, - 0x78, 0x06, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l87_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF0, 0xF9, 0x0F, - 0xB8, 0x03, 0x0F, - 0x98, 0x03, 0x07, - 0x9C, 0x83, 0x03, - 0x9C, 0x83, 0x03, - 0x9C, 0xC3, 0x01, - 0xB8, 0xC3, 0x01, - 0xF0, 0xC1, 0x01, - 0xB8, 0xE3, 0x00, - 0x1C, 0xE3, 0x00, - 0x1C, 0xE7, 0x00, - 0x1C, 0xE7, 0x00, - 0x1C, 0xE3, 0x00, - 0xB8, 0x73, 0x00, - 0xF0, 0x71, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l87_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xF0, 0xC3, 0xFF, 0x03, - 0xF8, 0xC7, 0xFF, 0x03, - 0x7C, 0x0F, 0xC0, 0x03, - 0x3C, 0x0E, 0xE0, 0x01, - 0x1C, 0x1E, 0xE0, 0x01, - 0x1C, 0x1E, 0xF0, 0x00, - 0x3C, 0x0E, 0xF0, 0x00, - 0x78, 0x0F, 0x78, 0x00, - 0xF0, 0x07, 0x78, 0x00, - 0xF8, 0x07, 0x38, 0x00, - 0x3C, 0x0F, 0x3C, 0x00, - 0x1C, 0x1E, 0x3C, 0x00, - 0x1E, 0x1C, 0x1C, 0x00, - 0x1E, 0x1C, 0x1E, 0x00, - 0x1E, 0x1C, 0x1E, 0x00, - 0x1E, 0x1C, 0x1E, 0x00, - 0x1C, 0x1E, 0x1E, 0x00, - 0x3C, 0x0F, 0x0E, 0x00, - 0xF8, 0x0F, 0x0E, 0x00, - 0xF0, 0x03, 0x0E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l88.xbm b/app/bin/bitmaps/l88.xbm deleted file mode 100644 index 4d06b28..0000000 --- a/app/bin/bitmaps/l88.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l88_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x78, 0x1E, - 0xFC, 0x3F, - 0xEC, 0x3B, - 0xFC, 0x3F, - 0x78, 0x1E, - 0xFC, 0x3F, - 0xCC, 0x33, - 0xFC, 0x3F, - 0x78, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l88_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF0, 0xE1, 0x03, - 0xB8, 0x73, 0x07, - 0x98, 0x33, 0x07, - 0x9C, 0x3B, 0x07, - 0x9C, 0x3B, 0x07, - 0x9C, 0x3B, 0x07, - 0xB8, 0x73, 0x07, - 0xF0, 0xE1, 0x03, - 0xB8, 0x73, 0x07, - 0x1C, 0x3B, 0x06, - 0x1C, 0x3F, 0x0E, - 0x1C, 0x3F, 0x0E, - 0x1C, 0x3B, 0x06, - 0xB8, 0x73, 0x07, - 0xF0, 0xE1, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l88_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xF0, 0x03, 0x7E, 0x00, - 0xF8, 0x07, 0xFF, 0x00, - 0x7C, 0x8F, 0xEF, 0x01, - 0x3C, 0x8E, 0xC7, 0x01, - 0x1C, 0x9E, 0xC3, 0x03, - 0x1C, 0x9E, 0xC3, 0x03, - 0x3C, 0x8E, 0xC7, 0x01, - 0x78, 0x0F, 0xEF, 0x01, - 0xF0, 0x07, 0xFE, 0x00, - 0xF8, 0x07, 0xFF, 0x00, - 0x3C, 0x8F, 0xE7, 0x01, - 0x1C, 0x9E, 0xC3, 0x03, - 0x1E, 0xDC, 0x83, 0x03, - 0x1E, 0xDC, 0x83, 0x03, - 0x1E, 0xDC, 0x83, 0x03, - 0x1E, 0xDC, 0x83, 0x03, - 0x1C, 0x9E, 0xC3, 0x03, - 0x3C, 0x8F, 0xE7, 0x01, - 0xF8, 0x0F, 0xFF, 0x01, - 0xF0, 0x03, 0x7E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l89.xbm b/app/bin/bitmaps/l89.xbm deleted file mode 100644 index 74b1448..0000000 --- a/app/bin/bitmaps/l89.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l89_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x78, 0x1E, - 0xFC, 0x3F, - 0xEC, 0x33, - 0xFC, 0x33, - 0x78, 0x3F, - 0xFC, 0x3E, - 0xCC, 0x30, - 0xFC, 0x3B, - 0x78, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l89_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF0, 0xE1, 0x01, - 0xB8, 0x73, 0x07, - 0x98, 0x3B, 0x07, - 0x9C, 0x3B, 0x06, - 0x9C, 0x3B, 0x0E, - 0x9C, 0x3B, 0x0E, - 0xB8, 0x3B, 0x0F, - 0xF0, 0x71, 0x0F, - 0xB8, 0xE3, 0x0F, - 0x1C, 0x03, 0x0E, - 0x1C, 0x07, 0x06, - 0x1C, 0x07, 0x06, - 0x1C, 0x3B, 0x07, - 0xB8, 0x73, 0x03, - 0xF0, 0xF1, 0x01, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l89_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xF0, 0x03, 0x7E, 0x00, - 0xF8, 0x07, 0xFF, 0x00, - 0x7C, 0x8F, 0xEF, 0x01, - 0x3C, 0x8E, 0xC7, 0x01, - 0x1C, 0xDE, 0x83, 0x03, - 0x1C, 0xDE, 0x83, 0x03, - 0x3C, 0xCE, 0x83, 0x03, - 0x78, 0xCF, 0x83, 0x03, - 0xF0, 0xC7, 0x83, 0x03, - 0xF8, 0x87, 0xC3, 0x03, - 0x3C, 0x8F, 0xE7, 0x03, - 0x1C, 0x1E, 0xFF, 0x03, - 0x1E, 0x1C, 0xFE, 0x03, - 0x1E, 0x1C, 0x80, 0x03, - 0x1E, 0x1C, 0x80, 0x03, - 0x1E, 0x9C, 0xC3, 0x03, - 0x1C, 0x9E, 0xC3, 0x01, - 0x3C, 0x8F, 0xE7, 0x01, - 0xF8, 0x0F, 0xFF, 0x00, - 0xF0, 0x03, 0x7E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l9.xbm b/app/bin/bitmaps/l9.xbm deleted file mode 100644 index 281474c..0000000 --- a/app/bin/bitmaps/l9.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l9_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0xC0, 0x03, - 0xE0, 0x07, - 0x60, 0x06, - 0x60, 0x06, - 0xE0, 0x07, - 0xC0, 0x07, - 0x00, 0x06, - 0x60, 0x07, - 0xC0, 0x03, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l9_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x0F, 0x00, - 0x80, 0x3B, 0x00, - 0xC0, 0x39, 0x00, - 0xC0, 0x31, 0x00, - 0xC0, 0x71, 0x00, - 0xC0, 0x71, 0x00, - 0xC0, 0x79, 0x00, - 0x80, 0x7B, 0x00, - 0x00, 0x7F, 0x00, - 0x00, 0x70, 0x00, - 0x00, 0x30, 0x00, - 0x00, 0x30, 0x00, - 0xC0, 0x39, 0x00, - 0x80, 0x1B, 0x00, - 0x80, 0x0F, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l9_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0xFC, 0x00, 0x00, - 0x00, 0xFE, 0x01, 0x00, - 0x00, 0xDF, 0x03, 0x00, - 0x00, 0x8F, 0x03, 0x00, - 0x80, 0x07, 0x07, 0x00, - 0x80, 0x07, 0x07, 0x00, - 0x80, 0x07, 0x07, 0x00, - 0x80, 0x07, 0x07, 0x00, - 0x80, 0x07, 0x07, 0x00, - 0x00, 0x87, 0x07, 0x00, - 0x00, 0xCF, 0x07, 0x00, - 0x00, 0xFE, 0x07, 0x00, - 0x00, 0xFC, 0x07, 0x00, - 0x00, 0x00, 0x07, 0x00, - 0x00, 0x00, 0x07, 0x00, - 0x00, 0x87, 0x07, 0x00, - 0x00, 0x87, 0x03, 0x00, - 0x00, 0xCF, 0x03, 0x00, - 0x00, 0xFE, 0x01, 0x00, - 0x00, 0xFC, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l90.xbm b/app/bin/bitmaps/l90.xbm deleted file mode 100644 index d56c618..0000000 --- a/app/bin/bitmaps/l90.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l90_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x78, 0x1E, - 0xFC, 0x3F, - 0xCC, 0x33, - 0xCC, 0x33, - 0xFC, 0x33, - 0xF8, 0x33, - 0xC0, 0x33, - 0xEC, 0x3F, - 0x78, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l90_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF0, 0xE0, 0x03, - 0xB8, 0x73, 0x07, - 0x9C, 0x33, 0x07, - 0x1C, 0x3B, 0x06, - 0x1C, 0x3F, 0x06, - 0x1C, 0x3F, 0x0E, - 0x9C, 0x3F, 0x0E, - 0xB8, 0x3F, 0x0E, - 0xF0, 0x3F, 0x0E, - 0x00, 0x3F, 0x0E, - 0x00, 0x3B, 0x06, - 0x00, 0x3B, 0x06, - 0x9C, 0x33, 0x07, - 0xB8, 0x71, 0x07, - 0xF8, 0xE0, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l90_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xF0, 0x03, 0x7E, 0x00, - 0xF8, 0x07, 0xFF, 0x00, - 0x7C, 0x0F, 0xEF, 0x01, - 0x3C, 0x8E, 0xC7, 0x01, - 0x1E, 0x9C, 0xC3, 0x03, - 0x1E, 0x9C, 0xC3, 0x03, - 0x1E, 0xDC, 0x83, 0x03, - 0x1E, 0xDC, 0x83, 0x03, - 0x1E, 0xDC, 0x83, 0x03, - 0x1C, 0xDE, 0x83, 0x03, - 0x3C, 0xDF, 0x83, 0x03, - 0xF8, 0xDF, 0x83, 0x03, - 0xF0, 0xDF, 0x83, 0x03, - 0x00, 0xDC, 0x83, 0x03, - 0x00, 0x9C, 0xC3, 0x03, - 0x1C, 0x9E, 0xC3, 0x03, - 0x1C, 0x8E, 0xC7, 0x01, - 0x3C, 0x0F, 0xEF, 0x01, - 0xF8, 0x07, 0xFF, 0x00, - 0xF0, 0x03, 0x7E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l91.xbm b/app/bin/bitmaps/l91.xbm deleted file mode 100644 index cb63233..0000000 --- a/app/bin/bitmaps/l91.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l91_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x78, 0x1C, - 0xFC, 0x1E, - 0xCC, 0x1F, - 0xCC, 0x1C, - 0xFC, 0x1C, - 0xF8, 0x1C, - 0xC0, 0x1C, - 0xEC, 0x1C, - 0x78, 0x1C, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l91_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF0, 0x80, 0x03, - 0xB8, 0xC3, 0x03, - 0x9C, 0xC3, 0x03, - 0x1C, 0xE3, 0x03, - 0x1C, 0xB7, 0x03, - 0x1C, 0x87, 0x03, - 0x9C, 0x87, 0x03, - 0xB8, 0x87, 0x03, - 0xF0, 0x87, 0x03, - 0x00, 0x87, 0x03, - 0x00, 0x83, 0x03, - 0x00, 0x83, 0x03, - 0x9C, 0x83, 0x03, - 0xB8, 0x81, 0x03, - 0xF8, 0x80, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l91_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xF0, 0x03, 0x70, 0x00, - 0xF8, 0x07, 0x70, 0x00, - 0x7C, 0x0F, 0x78, 0x00, - 0x3C, 0x0E, 0x7C, 0x00, - 0x1E, 0x1C, 0x7E, 0x00, - 0x1E, 0x1C, 0x7F, 0x00, - 0x1E, 0x1C, 0x73, 0x00, - 0x1E, 0x1C, 0x70, 0x00, - 0x1E, 0x1C, 0x70, 0x00, - 0x1C, 0x1E, 0x70, 0x00, - 0x3C, 0x1F, 0x70, 0x00, - 0xF8, 0x1F, 0x70, 0x00, - 0xF0, 0x1F, 0x70, 0x00, - 0x00, 0x1C, 0x70, 0x00, - 0x00, 0x1C, 0x70, 0x00, - 0x1C, 0x1E, 0x70, 0x00, - 0x1C, 0x0E, 0x70, 0x00, - 0x3C, 0x0F, 0x70, 0x00, - 0xF8, 0x07, 0x70, 0x00, - 0xF0, 0x03, 0x70, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l92.xbm b/app/bin/bitmaps/l92.xbm deleted file mode 100644 index 8323e42..0000000 --- a/app/bin/bitmaps/l92.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l92_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x78, 0x1E, - 0xFC, 0x3F, - 0xCC, 0x33, - 0xCC, 0x30, - 0xFC, 0x38, - 0xF8, 0x1C, - 0xC0, 0x0E, - 0xEC, 0x07, - 0x78, 0x3F, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l92_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF0, 0xE0, 0x03, - 0xB8, 0x73, 0x07, - 0x9C, 0x3B, 0x06, - 0x1C, 0x3B, 0x0E, - 0x1C, 0x07, 0x0E, - 0x1C, 0x07, 0x0E, - 0x9C, 0x07, 0x07, - 0xB8, 0x87, 0x07, - 0xF0, 0x87, 0x03, - 0x00, 0xC7, 0x01, - 0x00, 0xE3, 0x01, - 0x00, 0xF3, 0x00, - 0x9C, 0x73, 0x00, - 0xB8, 0x79, 0x00, - 0xF8, 0xF8, 0x0F, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l92_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xF0, 0x03, 0xFE, 0x00, - 0xF8, 0x07, 0xFF, 0x01, - 0x7C, 0x8F, 0xE7, 0x03, - 0x3C, 0x8E, 0xC3, 0x03, - 0x1E, 0xDC, 0x83, 0x03, - 0x1E, 0xDC, 0x83, 0x03, - 0x1E, 0x1C, 0x80, 0x03, - 0x1E, 0x1C, 0xC0, 0x03, - 0x1E, 0x1C, 0xC0, 0x03, - 0x1C, 0x1E, 0xE0, 0x01, - 0x3C, 0x1F, 0xF0, 0x01, - 0xF8, 0x1F, 0xF8, 0x00, - 0xF0, 0x1F, 0x78, 0x00, - 0x00, 0x1C, 0x3C, 0x00, - 0x00, 0x1C, 0x1E, 0x00, - 0x1C, 0x1E, 0x0F, 0x00, - 0x1C, 0x8E, 0x07, 0x00, - 0x3C, 0x8F, 0x07, 0x00, - 0xF8, 0xC7, 0xFF, 0x03, - 0xF0, 0xC3, 0xFF, 0x03, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l93.xbm b/app/bin/bitmaps/l93.xbm deleted file mode 100644 index 4be9859..0000000 --- a/app/bin/bitmaps/l93.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l93_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x78, 0x1E, - 0xFC, 0x3B, - 0xCC, 0x38, - 0xCC, 0x18, - 0xFC, 0x3C, - 0xF8, 0x38, - 0xC0, 0x33, - 0xEC, 0x3F, - 0x78, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l93_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF0, 0xE0, 0x03, - 0xB8, 0x73, 0x07, - 0x9C, 0x3B, 0x07, - 0x1C, 0x03, 0x07, - 0x1C, 0x07, 0x07, - 0x1C, 0x07, 0x07, - 0x9C, 0x87, 0x03, - 0xB8, 0xC7, 0x07, - 0xF0, 0x07, 0x07, - 0x00, 0x07, 0x0E, - 0x00, 0x03, 0x0E, - 0x00, 0x3B, 0x0E, - 0x9C, 0x3B, 0x07, - 0xB8, 0x71, 0x07, - 0xF8, 0xE0, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l93_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xF0, 0x03, 0x7E, 0x00, - 0xF8, 0x07, 0xFF, 0x00, - 0x7C, 0x8F, 0xE7, 0x01, - 0x3C, 0x8E, 0xC7, 0x01, - 0x1E, 0x9C, 0xC3, 0x03, - 0x1E, 0x1C, 0xC0, 0x03, - 0x1E, 0x1C, 0xC0, 0x01, - 0x1E, 0x1C, 0xE0, 0x01, - 0x1E, 0x1C, 0xFC, 0x00, - 0x1C, 0x1E, 0xFC, 0x00, - 0x3C, 0x1F, 0xE0, 0x01, - 0xF8, 0x1F, 0xC0, 0x03, - 0xF0, 0x1F, 0x80, 0x03, - 0x00, 0x1C, 0x80, 0x03, - 0x00, 0xDC, 0x83, 0x03, - 0x1C, 0xDE, 0x83, 0x03, - 0x1C, 0x8E, 0xC7, 0x03, - 0x3C, 0x8F, 0xE7, 0x01, - 0xF8, 0x07, 0xFF, 0x01, - 0xF0, 0x03, 0x7E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l94.xbm b/app/bin/bitmaps/l94.xbm deleted file mode 100644 index 65f4306..0000000 --- a/app/bin/bitmaps/l94.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l94_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x78, 0x1C, - 0xFC, 0x1C, - 0xCC, 0x1E, - 0xCC, 0x1E, - 0xFC, 0x1F, - 0xF8, 0x1B, - 0xC0, 0x3F, - 0xEC, 0x18, - 0x78, 0x18, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l94_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF0, 0x80, 0x03, - 0xB8, 0x83, 0x03, - 0x9C, 0xC3, 0x03, - 0x1C, 0xC3, 0x03, - 0x1C, 0xE7, 0x03, - 0x1C, 0xE7, 0x03, - 0x9C, 0xF7, 0x03, - 0xB8, 0xB7, 0x03, - 0xF0, 0xBF, 0x03, - 0x00, 0x9F, 0x03, - 0x00, 0xFF, 0x0F, - 0x00, 0x83, 0x03, - 0x9C, 0x83, 0x03, - 0xB8, 0x81, 0x03, - 0xF8, 0x80, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l94_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xF0, 0x03, 0xF0, 0x00, - 0xF8, 0x07, 0xF0, 0x00, - 0x7C, 0x0F, 0xF8, 0x00, - 0x3C, 0x0E, 0xF8, 0x00, - 0x1E, 0x1C, 0xFC, 0x00, - 0x1E, 0x1C, 0xFC, 0x00, - 0x1E, 0x1C, 0xFE, 0x00, - 0x1E, 0x1C, 0xEE, 0x00, - 0x1E, 0x1C, 0xEF, 0x00, - 0x1C, 0x9E, 0xE7, 0x00, - 0x3C, 0x9F, 0xE7, 0x00, - 0xF8, 0xDF, 0xE3, 0x00, - 0xF0, 0xDF, 0xE1, 0x00, - 0x00, 0xFC, 0xFF, 0x03, - 0x00, 0xFC, 0xFF, 0x03, - 0x1C, 0x1E, 0xE0, 0x00, - 0x1C, 0x0E, 0xE0, 0x00, - 0x3C, 0x0F, 0xE0, 0x00, - 0xF8, 0x07, 0xE0, 0x00, - 0xF0, 0x03, 0xE0, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l95.xbm b/app/bin/bitmaps/l95.xbm deleted file mode 100644 index e8ab2c2..0000000 --- a/app/bin/bitmaps/l95.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l95_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x78, 0x3F, - 0xFC, 0x07, - 0xCC, 0x07, - 0xCC, 0x1F, - 0xFC, 0x3B, - 0xF8, 0x30, - 0xC0, 0x33, - 0xEC, 0x3F, - 0x78, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l95_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF0, 0xF0, 0x07, - 0xB8, 0x73, 0x00, - 0x9C, 0x73, 0x00, - 0x1C, 0x33, 0x00, - 0x1C, 0x37, 0x00, - 0x1C, 0xFF, 0x03, - 0x9C, 0x7F, 0x07, - 0xB8, 0x3F, 0x07, - 0xF0, 0x07, 0x0E, - 0x00, 0x07, 0x0E, - 0x00, 0x03, 0x0E, - 0x00, 0x3B, 0x06, - 0x9C, 0x3B, 0x07, - 0xB8, 0x71, 0x07, - 0xF8, 0xE0, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l95_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xF0, 0x03, 0xFF, 0x03, - 0xF8, 0x07, 0xFF, 0x03, - 0x7C, 0x0F, 0x07, 0x00, - 0x3C, 0x0E, 0x07, 0x00, - 0x1E, 0x9C, 0x07, 0x00, - 0x1E, 0x9C, 0x07, 0x00, - 0x1E, 0x9C, 0x7F, 0x00, - 0x1E, 0x9C, 0xFF, 0x01, - 0x1E, 0x9C, 0xE7, 0x01, - 0x1C, 0x9E, 0xC3, 0x03, - 0x3C, 0x1F, 0xC0, 0x03, - 0xF8, 0x1F, 0x80, 0x03, - 0xF0, 0x1F, 0x80, 0x03, - 0x00, 0x1C, 0x80, 0x03, - 0x00, 0xDC, 0x83, 0x03, - 0x1C, 0xDE, 0xC3, 0x03, - 0x1C, 0x8E, 0xC3, 0x03, - 0x3C, 0x8F, 0xE7, 0x01, - 0xF8, 0x07, 0xFF, 0x00, - 0xF0, 0x03, 0x7E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l96.xbm b/app/bin/bitmaps/l96.xbm deleted file mode 100644 index b114e81..0000000 --- a/app/bin/bitmaps/l96.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l96_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x78, 0x1E, - 0xFC, 0x3F, - 0xCC, 0x03, - 0xCC, 0x1F, - 0xFC, 0x3F, - 0xF8, 0x33, - 0xC0, 0x33, - 0xEC, 0x3F, - 0x78, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l96_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF0, 0xE0, 0x03, - 0xB8, 0x73, 0x07, - 0x9C, 0x33, 0x07, - 0x1C, 0x3B, 0x00, - 0x1C, 0x3F, 0x00, - 0x1C, 0x3F, 0x00, - 0x9C, 0xFF, 0x03, - 0xB8, 0x7F, 0x07, - 0xF0, 0x3F, 0x07, - 0x00, 0x3F, 0x0E, - 0x00, 0x3B, 0x0E, - 0x00, 0x3B, 0x0E, - 0x9C, 0x33, 0x07, - 0xB8, 0x71, 0x07, - 0xF8, 0xE0, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l96_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xF0, 0x03, 0xFC, 0x00, - 0xF8, 0x07, 0xFF, 0x01, - 0x7C, 0x0F, 0xEF, 0x01, - 0x3C, 0x8E, 0xC7, 0x03, - 0x1E, 0x9C, 0xC3, 0x03, - 0x1E, 0x9C, 0x03, 0x00, - 0x1E, 0xDC, 0x03, 0x00, - 0x1E, 0xDC, 0x7F, 0x00, - 0x1E, 0xDC, 0xFF, 0x01, - 0x1C, 0xDE, 0xEF, 0x01, - 0x3C, 0xDF, 0xC7, 0x03, - 0xF8, 0xDF, 0x83, 0x03, - 0xF0, 0xDF, 0x83, 0x03, - 0x00, 0xDC, 0x83, 0x03, - 0x00, 0xDC, 0x83, 0x03, - 0x1C, 0x9E, 0x83, 0x03, - 0x1C, 0x8E, 0xC7, 0x03, - 0x3C, 0x8F, 0xEF, 0x01, - 0xF8, 0x07, 0xFF, 0x01, - 0xF0, 0x03, 0x7C, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l97.xbm b/app/bin/bitmaps/l97.xbm deleted file mode 100644 index 75ab190..0000000 --- a/app/bin/bitmaps/l97.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l97_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x78, 0x3F, - 0xFC, 0x38, - 0xCC, 0x18, - 0xCC, 0x1C, - 0xFC, 0x0C, - 0xF8, 0x0E, - 0xC0, 0x0E, - 0xEC, 0x06, - 0x78, 0x06, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l97_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF0, 0xF8, 0x0F, - 0xB8, 0x03, 0x0F, - 0x9C, 0x03, 0x07, - 0x1C, 0x83, 0x03, - 0x1C, 0x87, 0x03, - 0x1C, 0xC7, 0x01, - 0x9C, 0xC7, 0x01, - 0xB8, 0xC7, 0x01, - 0xF0, 0xE7, 0x00, - 0x00, 0xE7, 0x00, - 0x00, 0xE3, 0x00, - 0x00, 0xE3, 0x00, - 0x9C, 0xE3, 0x00, - 0xB8, 0x71, 0x00, - 0xF8, 0x70, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l97_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xF0, 0xC3, 0xFF, 0x03, - 0xF8, 0xC7, 0xFF, 0x03, - 0x7C, 0x0F, 0xC0, 0x03, - 0x3C, 0x0E, 0xE0, 0x01, - 0x1E, 0x1C, 0xE0, 0x01, - 0x1E, 0x1C, 0xF0, 0x00, - 0x1E, 0x1C, 0xF0, 0x00, - 0x1E, 0x1C, 0x78, 0x00, - 0x1E, 0x1C, 0x78, 0x00, - 0x1C, 0x1E, 0x38, 0x00, - 0x3C, 0x1F, 0x3C, 0x00, - 0xF8, 0x1F, 0x3C, 0x00, - 0xF0, 0x1F, 0x1C, 0x00, - 0x00, 0x1C, 0x1E, 0x00, - 0x00, 0x1C, 0x1E, 0x00, - 0x1C, 0x1E, 0x1E, 0x00, - 0x1C, 0x0E, 0x1E, 0x00, - 0x3C, 0x0F, 0x0E, 0x00, - 0xF8, 0x07, 0x0E, 0x00, - 0xF0, 0x03, 0x0E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l98.xbm b/app/bin/bitmaps/l98.xbm deleted file mode 100644 index 744aad6..0000000 --- a/app/bin/bitmaps/l98.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l98_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x78, 0x1E, - 0xFC, 0x3F, - 0xCC, 0x3B, - 0xCC, 0x3F, - 0xFC, 0x1E, - 0xF8, 0x3F, - 0xC0, 0x33, - 0xEC, 0x3F, - 0x78, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l98_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF0, 0xE0, 0x03, - 0xB8, 0x73, 0x07, - 0x9C, 0x33, 0x07, - 0x1C, 0x3B, 0x07, - 0x1C, 0x3F, 0x07, - 0x1C, 0x3F, 0x07, - 0x9C, 0x77, 0x07, - 0xB8, 0xE7, 0x03, - 0xF0, 0x77, 0x07, - 0x00, 0x3F, 0x06, - 0x00, 0x3B, 0x0E, - 0x00, 0x3B, 0x0E, - 0x9C, 0x3B, 0x06, - 0xB8, 0x71, 0x07, - 0xF8, 0xE0, 0x03, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l98_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xF0, 0x03, 0x7E, 0x00, - 0xF8, 0x07, 0xFF, 0x00, - 0x7C, 0x8F, 0xEF, 0x01, - 0x3C, 0x8E, 0xC7, 0x01, - 0x1E, 0x9C, 0xC3, 0x03, - 0x1E, 0x9C, 0xC3, 0x03, - 0x1E, 0x9C, 0xC7, 0x01, - 0x1E, 0x1C, 0xEF, 0x01, - 0x1E, 0x1C, 0xFE, 0x00, - 0x1C, 0x1E, 0xFF, 0x00, - 0x3C, 0x9F, 0xE7, 0x01, - 0xF8, 0x9F, 0xC3, 0x03, - 0xF0, 0xDF, 0x83, 0x03, - 0x00, 0xDC, 0x83, 0x03, - 0x00, 0xDC, 0x83, 0x03, - 0x1C, 0xDE, 0x83, 0x03, - 0x1C, 0x8E, 0xC3, 0x03, - 0x3C, 0x8F, 0xE7, 0x01, - 0xF8, 0x07, 0xFF, 0x01, - 0xF0, 0x03, 0x7E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/l99.xbm b/app/bin/bitmaps/l99.xbm deleted file mode 100644 index b7d956a..0000000 --- a/app/bin/bitmaps/l99.xbm +++ /dev/null @@ -1,78 +0,0 @@ -static char l99_x16[] = { - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x78, 0x1E, - 0xFC, 0x3F, - 0xCC, 0x33, - 0xCC, 0x33, - 0xFC, 0x3F, - 0xF8, 0x3E, - 0xC0, 0x30, - 0xEC, 0x3B, - 0x78, 0x1E, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, }; - -static char l99_x24[] = { - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0xF0, 0xE0, 0x01, - 0xB8, 0x73, 0x07, - 0x9C, 0x3B, 0x07, - 0x1C, 0x3B, 0x06, - 0x1C, 0x3F, 0x0E, - 0x1C, 0x3F, 0x0E, - 0x9C, 0x3F, 0x0F, - 0xB8, 0x77, 0x0F, - 0xF0, 0xE7, 0x0F, - 0x00, 0x07, 0x0E, - 0x00, 0x03, 0x06, - 0x00, 0x03, 0x06, - 0x9C, 0x3B, 0x07, - 0xB8, 0x71, 0x03, - 0xF8, 0xF0, 0x01, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, }; - -static char l99_x32[] = { - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xF0, 0x03, 0x7E, 0x00, - 0xF8, 0x07, 0xFF, 0x00, - 0x7C, 0x8F, 0xEF, 0x01, - 0x3C, 0x8E, 0xC7, 0x01, - 0x1E, 0xDC, 0x83, 0x03, - 0x1E, 0xDC, 0x83, 0x03, - 0x1E, 0xDC, 0x83, 0x03, - 0x1E, 0xDC, 0x83, 0x03, - 0x1E, 0xDC, 0x83, 0x03, - 0x1C, 0x9E, 0xC3, 0x03, - 0x3C, 0x9F, 0xE7, 0x03, - 0xF8, 0x1F, 0xFF, 0x03, - 0xF0, 0x1F, 0xFE, 0x03, - 0x00, 0x1C, 0x80, 0x03, - 0x00, 0x1C, 0x80, 0x03, - 0x1C, 0x9E, 0xC3, 0x03, - 0x1C, 0x8E, 0xC3, 0x01, - 0x3C, 0x8F, 0xE7, 0x01, - 0xF8, 0x07, 0xFF, 0x00, - 0xF0, 0x03, 0x7E, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, }; - diff --git a/app/bin/bitmaps/layer_num.inc b/app/bin/bitmaps/layer_num.inc new file mode 100644 index 0000000..e8104f9 --- /dev/null +++ b/app/bin/bitmaps/layer_num.inc @@ -0,0 +1,515 @@ +// Define digits for layer buttons + +static char* n0_x16[] = { + " #### " + "######" + "## ##" + "## ##" + "## ##" + "## ##" + "## ##" + "## ##" + "######" + " #### "}; + +static char* n1_x16[] = { + " ##" + " ###" + "####" + " ##" + " ##" + " ##" + " ##" + " ##" + " ##" + " ##"}; + +static char* n2_x16[] = { + " #### " + "######" + "## ##" + " ##" + " ###" + " ### " + " ### " + "### " + "######" + "######"}; + +static char* n3_x16[] = { + " #### " + "######" + "## ##" + " ##" + " #### " + " #### " + " ##" + "## ##" + "######" + " #### "}; + +static char* n4_x16[] = { + " ##" + " ###" + " ####" + " ## ##" + "## ##" + "######" + "######" + " ##" + " ##" + " ##"}; + +static char* n5_x16[] = { + "######" + "######" + "## " + "## " + "#### " + " ####" + " ##" + "## ##" + "######" + " #### "}; + +static char* n6_x16[] = { + " #### " + "######" + "## " + "## " + "##### " + "######" + "## ##" + "## ##" + "######" + " #### "}; + +static char* n7_x16[] = { + "######" + "######" + " ##" + " ##" + " ## " + " ## " + " ## " + " ## " + " ## " + " ## "}; + +static char* n8_x16[] = { + " #### " + "######" + "## ##" + "## ##" + " #### " + " #### " + "## ##" + "## ##" + "######" + " #### "}; + +static char* n9_x16[] = { + " #### " + "######" + "## ##" + "## ##" + "######" + " #####" + " ##" + " ##" + "######" + " #### "}; + +/* ***************** */ + +static char* n0_x24[] = { + " ###### " + " ######## " + "### ###" + "### ###" + "### ###" + "### ###" + "### ###" + "### ###" + "### ###" + "### ###" + "### ###" + "### ###" + "### ###" + " ######## " + " ###### "}; + +static char* n1_x24[] = { + " ###" + " ####" + "#####" + " ###" + " ###" + " ###" + " ###" + " ###" + " ###" + " ###" + " ###" + " ###" + " ###" + " ###" + " ###"}; + +static char* n2_x24[] = { + " #### " + " ######## " + "#### ####" + "### ###" + " ###" + " ####" + " #### " + " #### " + " #### " + " #### " + " #### " + "#### " + "### ###" + "##########" + "##########"}; + +static char* n3_x24[] = { + " #### " + " ######## " + "#### ####" + "### ###" + " ###" + " ####" + " ###### " + " ##### " + " #### " + " ####" + " ###" + "### ###" + "#### ####" + " ######## " + " #### "}; + +static char* n4_x24[] = { + " ##### " + " ##### " + " ###### " + " ###### " + " ### ### " + " ### ### " + " ### ### " + "### ### " + "### ### " + "##########" + "##########" + " ### " + " ### " + " ### " + " ### "}; + +static char* n5_x24[] = { + "##########" + "##########" + "### " + "### " + "### " + "### " + "######## " + " ######## " + " ###" + " ###" + " ###" + " ###" + "### ###" + "######### " + " ####### "}; + +static char* n6_x24[] = { + " #### " + " ######## " + "#### ####" + "### ###" + "### " + "### " + "####### " + "######### " + "### ####" + "### ###" + "### ###" + "### ###" + "#### ####" + " ######## " + " #### "}; + +static char* n7_x24[] = { + "##########" + "##########" + "### ###" + " ###" + " ### " + " ### " + " ### " + " ### " + " ### " + " ### " + " ### " + " ### " + " ### " + " ### " + " ### "}; + +static char* n8_x24[] = { + " #### " + " ######## " + "#### ####" + "### ###" + "### ###" + "#### ####" + " ######## " + " ######## " + "#### ####" + "### ###" + "### ###" + "### ###" + "#### ####" + " ######## " + " #### "}; + +static char* n9_x24[] = { + " #### " + " ######## " + "#### ####" + "### ###" + "### ###" + "#### ###" + " #########" + " #######" + " ###" + " ###" + " ###" + "### ###" + "#### ####" + " ######## " + " #### "}; + +/* ***************** */ + +static char* n0_x32[] = { + " ###### " + " ########## " + " ############ " + "##### #####" + "#### ####" + "#### ####" + "#### ####" + "#### ####" + "#### ####" + "#### ####" + "#### ####" + "#### ####" + "#### ####" + "#### ####" + "#### ####" + "#### ####" + "##### #####" + " ############ " + " ########## " + " ###### "}; + +static char* n1_x32[] = { + " ####" + " #####" + "######" + "######" + " ####" + " ####" + " ####" + " ####" + " ####" + " ####" + " ####" + " ####" + " ####" + " ####" + " ####" + " ####" + " ####" + " ####" + " ####" + " ####"}; + +static char* n2_x32[] = { + " ###### " + " ########## " + " ############ " + "##### #####" + "#### ####" + " ####" + " ####" + " ####" + " ##### " + " ##### " + " ##### " + " ##### " + " ##### " + " ##### " + " ##### " + " ##### " + "##### ####" + "##############" + "##############" + "##############"}; + +static char* n3_x32[] = { + " ###### " + " ########## " + " ############ " + "##### #####" + "#### ####" + " ####" + " ####" + " #### " + " ####### " + " ###### " + " ####### " + " #### " + " ####" + " ####" + " ####" + "#### ####" + "##### #####" + " ############ " + " ########## " + " ###### "}; + +static char* n4_x32[] = { + " ####### " + " ####### " + " ######## " + " ######## " + " #### #### " + " #### #### " + " #### #### " + " #### #### " + " #### #### " + " #### #### " + "#### #### " + "#### #### " + "##############" + "##############" + "##############" + " #### " + " #### " + " #### " + " #### " + " #### "}; + +static char* n5_x32[] = { + "##############" + "##############" + "##############" + "#### " + "#### " + "#### " + "#### " + "#### " + "########## " + "############ " + "############# " + " #####" + " ####" + " ####" + " ####" + "#### ####" + "##### #####" + " ############ " + " ########## " + " ###### "}; + +static char* n6_x32[] = { + " ###### " + " ########## " + " ############ " + "##### #####" + "#### ####" + "#### " + "#### " + "#### " + "########## " + "############ " + "############# " + "#### #####" + "#### ####" + "#### ####" + "#### ####" + "#### ####" + "##### #####" + " ############ " + " ########## " + " ###### "}; + +static char* n7_x32[] = { + "##############" + "##############" + "##############" + "#### ####" + "#### #### " + " #### " + " #### " + " #### " + " #### " + " #### " + " #### " + " #### " + " #### " + " #### " + " #### " + " #### " + " #### " + " #### " + " #### " + " #### "}; + +static char* n8_x32[] = { + " ###### " + " ########## " + " ############ " + "##### #####" + "#### ####" + "#### ####" + "#### ####" + " #### #### " + " ########## " + " ######## " + " ########## " + " #### #### " + "#### ####" + "#### ####" + "#### ####" + "#### ####" + "##### #####" + " ############ " + " ########## " + " ###### "}; + +static char* n9_x32[] = { + " ###### " + " ########## " + " ############ " + "##### #####" + "#### ####" + "#### ####" + "#### ####" + "#### ####" + "##### ####" + " #############" + " ############" + " ##########" + " ####" + " ####" + " ####" + "#### ####" + "##### #####" + " ############ " + " ########## " + " ###### "}; diff --git a/app/bin/bitmaps/layers.xpm b/app/bin/bitmaps/layers.xpm deleted file mode 100644 index 60e1761..0000000 --- a/app/bin/bitmaps/layers.xpm +++ /dev/null @@ -1,110 +0,0 @@ -static char *layers_x16[] = { - "16 16 9 1", - " c None", - "0 c #000000", - "1 c #333333", - "2 c #666666", - "3 c #999999", - "4 c #CCCCCC", - "5 c #FFFFFF", - "6 c #C0C0C0", - "7 c #808080", - " ", - " ", - " 177777777771 ", - " 0755555555541 ", - " 1455555555570 ", - " 13555555555411 ", - " 13333333333231 ", - " 01777777777371 ", - " 1666666666610 ", - " 17333333333720 ", - " 11122222222271 ", - " 133333333331 ", - " 0233333333371 ", - " 011111111111 ", - " ", - " "}; - -static char *layers_x24[] = { - "24 24 9 1", - " c None", - "0 c #000000", - "1 c #333333", - "2 c #666666", - "3 c #999999", - "4 c #CCCCCC", - "5 c #FFFFFF", - "6 c #C0C0C0", - "7 c #808080", - " ", - " ", - " ", - " 100000000000000001 ", - " 165555555555555552 ", - " 155555555555555541 ", - " 165555555555555552 ", - " 155555555555555561 ", - " 165555555555555551001 ", - " 14444444444444443761 ", - " 11122222222222227631 ", - " 136666666666666661 ", - " 166666666666666631 ", - " 136666666666666661001 ", - " 133333333333333372320 ", - " 11122222222222222371 ", - " 0233333333333333320 ", - " 173333333333333371 ", - " 0233333333333333320 ", - " 173333333333333371 ", - " 00000000000000000 ", - " ", - " ", - " "}; - -static char *layers_x32[] = { - "32 32 9 1", - " c None", - "0 c #000000", - "1 c #333333", - "2 c #666666", - "3 c #999999", - "4 c #CCCCCC", - "5 c #FFFFFF", - "6 c #C0C0C0", - "7 c #808080", - " ", - " ", - " ", - " ", - " 10000000000000000000001 ", - " 135555555555555555555561 ", - " 14555555555555555555551 ", - " 135555555555555555555561 ", - " 15555555555555555555551 ", - " 165555555555555555555561 ", - " 155555555555555555555410 ", - " 165555555555555555555531221 ", - " 155555555555555555555416671 ", - " 117277777777777777777727631 ", - " 173333333333333333336620 ", - " 026666666666666666666631 ", - " 136666666666666666666620 ", - " 026666666666666666666631000 ", - " 136666666666666666666622720 ", - " 1266666666666666666666313370 ", - " 100000000000000000000017330 ", - " 173333333333333333333320 ", - " 013333333333333333333330 ", - " 173333333333333333333320 ", - " 013333333333333333333330 ", - " 173333333333333333333320 ", - " 017777777777777777777770 ", - " 111111111111111111111110 ", - " ", - " ", - " ", - " "}; - -static char **layers_xpm[3] = { layers_x16, layers_x24, layers_x32 }; - diff --git a/app/bin/bitmaps/loosen.xpm b/app/bin/bitmaps/loosen.xpm new file mode 100644 index 0000000..9a92872 --- /dev/null +++ b/app/bin/bitmaps/loosen.xpm @@ -0,0 +1,183 @@ +static char *loosen_x16[] = { + "16 16 24 1", + " c None", + "0 c #4878c8", + "1 c #c80000", + "2 c #c86868", + "3 c #6890c8", + "4 c #78a8e8", + "5 c #c82020", + "6 c #5880c8", + "7 c #7890b0", + "8 c #c83838", + "9 c #c81010", + "A c #8090b8", + "B c #88b0e8", + "C c #c87070", + "D c #5888d0", + "E c #c82828", + "F c #7090b8", + "G c #5078c0", + "H c #6088d0", + "I c #c87878", + "J c #c83030", + "K c #c84040", + "L c #6890d0", + "M c #7890b8", + " ", + " ", + " ", + " D D 3 3 D D ", + " 0A0A6M M6A0A0 ", + " 4 4 B B 4 4 ", + " 0707GF FG7070 ", + " H H L L H H ", + " EC2E ", + " 89 9J ", + " 1I 1C ", + " K9 98 ", + " 5C2E ", + " ", + " ", + " "}; +static char *loosen_x24[] = { + "24 24 38 1", + " c None", + "0 c #084098", + "1 c #c80000", + "2 c #3870c8", + "3 c #c84848", + "4 c #4888e8", + "5 c #2058c0", + "6 c #c81818", + "7 c #78a8e8", + "8 c #6080b8", + "9 c #4870b0", + "A c #c86868", + "B c #6090e8", + "C c #4068b0", + "D c #90a8d0", + "E c #5878a8", + "F c #c82828", + "G c #c80808", + "H c #3068b8", + "I c #5890f8", + "J c #7088b0", + "K c #6898f0", + "L c #5880b8", + "M c #c85858", + "N c #c87070", + "O c #88a8e8", + "P c #104098", + "Q c #3068c8", + "R c #2860b8", + "S c #6898e0", + "T c #c81010", + "U c #4070c0", + "V c #5070a8", + "W c #104898", + "X c #c83030", + "Y c #c82020", + "Z c #c85050", + "a c #c87878", + " ", + " ", + " ", + " ", + " ", + " LUJJQJJ28 82JJQJJUL ", + " CHEV5EER9 9REE5VEHC ", + " 7 I K K I 7 ", + " 7 I K K I 7 ", + " DS 4 B B 4 SD ", + " P0PW0PP0P P0PP0WP0P ", + " O K 7 7 K O ", + " ZG 1M ", + " N1G 11A ", + " 11 11a ", + " G1M A11 ", + " 316 Y1X ", + " F1X X1Y ", + " T1 1T ", + " A M ", + " ", + " ", + " ", + " "}; +static char *loosen_x32[] = { + "32 32 41 1", + " c None", + "0 c #0840a0", + "1 c #c80000", + "2 c #7088b0", + "3 c #c82828", + "4 c #3068c0", + "5 c #5090f8", + "6 c #2058bc", + "7 c #80a8e8", + "8 c #c85050", + "9 c #6078b0", + "A c #c81010", + "B c #3058a0", + "C c #689df0", + "D c #486ca8", + "E c #205098", + "F c #c83838", + "G c #95b0e0", + "H c #4068a0", + "I c #c86060", + "J c #1648a0", + "K c #4870b8", + "L c #3d68b0", + "M c #2860b8", + "N c #2050a4", + "O c #1048a8", + "P c #c84343", + "Q c #c80808", + "R c #c81919", + "S c #5070a9", + "T c #70a0f0", + "U c #c86c6c", + "V c #6480b0", + "W c #4070b8", + "X c #5890f8", + "Y c #2860c4", + "Z c #3860a0", + "a c #c83030", + "b c #2850a0", + "c c #1850a8", + "d c #88a8e8", + " ", + " ", + " ", + " ", + " ", + " ", + " 7G T C C T G7 ", + " VMLSSL6SSS6LV VL6SSS6LSSLMV ", + " DcNBBNOBBBObD DbOBBBONBBNcD ", + " Cd GX 5 5 XG dC ", + " Cd GX 5 5 XG dC ", + " Cd GX 5 5 XG dC ", + " Cd GX 5 5 XG dC ", + " ZJJEEJ0EEE0JH HJ0EEE0JEEJJZ ", + " 24W99KY999YS2 2SY999YK99W42 ", + " 7G T C C T G7 ", + " QF R1 ", + " 111 11Q ", + " A11U I11Q ", + " 311P 811R ", + " P113 P11R ", + " 8113 F113 ", + " a11P P11R ", + " A11U I11A ", + " 111 11Q ", + " 1a R1 ", + " ", + " ", + " ", + " ", + " ", + " "}; + +static char **loosen_xpm[3] = { loosen_x16, loosen_x24, loosen_x32 }; diff --git a/app/bin/bitmaps/magnet.xpm b/app/bin/bitmaps/magnet.xpm deleted file mode 100644 index 3d9a5ac..0000000 --- a/app/bin/bitmaps/magnet.xpm +++ /dev/null @@ -1,139 +0,0 @@ -static char *magnet_x16[] = { - "16 16 18 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #333300", - "3 c #660000", - "4 c #663300", - "5 c #666600", - "6 c #990000", - "7 c #999900", - "8 c #CC0000", - "9 c #CC3300", - "A c #CC9900", - "B c #CCCC00", - "C c #FF0000", - "D c #FF6600", - "E c #FFCC00", - "F c #FFFF00", - "G c #800000", - " 1110 ", - " 11888610 ", - " 16CCCCCCG0 ", - " 08CC836CCC30", - " 06CC83 13CC81", - " 3CC83 GCC1", - " 1CCC3 3CC1", - " 5DCC3 38C81", - "5BEDG1 38CC3 ", - " 5EA4 38CCG0 ", - " 55 18CC61 ", - " 18CC81 ", - " 5ACC83 ", - " 27FE93 ", - " 5AB5 ", - " 55 "}; - -static char *magnet_x24[] = { - "24 24 19 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #333300", - "3 c #660000", - "4 c #663300", - "5 c #666600", - "6 c #990000", - "7 c #996600", - "8 c #999900", - "9 c #CC0000", - "A c #CC9900", - "B c #FF0000", - "C c #FF6600", - "D c #FF9900", - "E c #FFCC00", - "F c #FFFF00", - "G c #800000", - "H c #808000", - " 000 ", - " 3399G310 ", - " 019BBBBBBG1 ", - " 0GBBBBBBBBB91 ", - " 0GBBBBBBBBBBBB1 ", - " 06BBBBBG319BBBBB1 ", - " 03BBBBB31 GGBBBBG0", - " 3BBBBB3 6GBBB91", - " 1BBBBB3 G9BBB1", - " 19BBBBG 39BBB1", - " 29BBBB6G G9BBB60", - " 48DBBB93 GGBBBB1 ", - "58FFDB91 GBBBBG0 ", - " 5EFFE3 GBBBB91 ", - " 5EE72 3BBBBB1 ", - " 5H4 3BBBBB3 ", - " 2 3BBBBB3 ", - " 13BBBBBG1 ", - " HCBBBBG1 ", - " 5EECBB63 ", - " 48FFFD61 ", - " 5HEFA2 ", - " 45A5 ", - " 5 "}; - -static char *magnet_x32[] = { - "32 32 19 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #333300", - "3 c #660000", - "4 c #663300", - "5 c #666600", - "6 c #990000", - "7 c #996600", - "8 c #CC0000", - "9 c #CC9900", - "A c #CCCC00", - "B c #FF0000", - "C c #FF3300", - "D c #FF6600", - "E c #FFCC00", - "F c #FFFF00", - "G c #800000", - "H c #808000", - " ", - " 013GGG010 ", - " 16BBBBBB8G00 ", - " 38BBBBBBBBBB30 ", - " 03BBBBBBBBBBBBB80 ", - " 03BBBBBBBBBBBBBBB80 ", - " 0GBBBBBBB88BBBBBBBB80 ", - " 03BBBBBBB83G3GBBBBBBBG0 ", - " 1BBBBBBB61 G38BBBBBB0 ", - " 1BBBBBBB61 G8BBBBBG0", - " 1BBBBBBB63 3BBBBB80", - " 08BBBBBB63 6GBBBB80", - " 06BBBBBB63 68BBBB81", - " 03BBBBBB83 8GBBBBBG0", - " 5CBBBBB83 3BBBBBB1 ", - " 5EECBBBB3 G8BBBBBG0 ", - " 5EFFECBBG1 G8BBBBB81 ", - " 5EFFFED81 G8BBBBBB1 ", - " 5EFFFE4 38BBBBBBG0 ", - " 5EFE5 38BBBBBB81 ", - " 5A5 18BBBBBB81 ", - " 5 18BBBBBB81 ", - " 08BBBBBBB3 ", - " 08BBBBBBB3 ", - " 59CBBBBBB3 ", - " 5AFECBBBB3 ", - " 59FFFECBBG ", - " 45EFFFEDG0 ", - " 5EFFE70 ", - " 5EE74 ", - " 5H2 ", - " 2 "}; - -static char **magnet_xpm[3] = { magnet_x16, magnet_x24, magnet_x32 }; - diff --git a/app/bin/bitmaps/manage.xpm b/app/bin/bitmaps/manage.xpm deleted file mode 100644 index 12264cf..0000000 --- a/app/bin/bitmaps/manage.xpm +++ /dev/null @@ -1,110 +0,0 @@ -static char *manage_x16[] = { - "16 16 9 1", - " c None", - "0 c #000000", - "1 c #333333", - "2 c #666666", - "3 c #999999", - "4 c #CCCCCC", - "5 c #FFFFFF", - "6 c #C0C0C0", - "7 c #808080", - " 11 ", - " 1370 ", - " 101 1361 111 ", - " 247074432742 ", - " 134444444431 ", - " 24432734470 ", - " 1743744734310 ", - "1274424555144330", - "1344414555144630", - "111347355674611 ", - " 14471274470 ", - " 24444644431 ", - " 1463644677470 ", - " 171013410121 ", - " 0 0761 ", - " 101 "}; - -static char *manage_x24[] = { - "24 24 9 1", - " c None", - "0 c #000000", - "1 c #333333", - "2 c #666666", - "3 c #999999", - "4 c #CCCCCC", - "5 c #FFFFFF", - "6 c #C0C0C0", - "7 c #808080", - " 00 ", - " 1331 ", - " 2440 ", - " 11 02441 111 ", - " 173100164431102431 ", - " 144473444444334441 ", - " 134444444444444421 ", - " 1644444444444431 ", - " 1344462102644431 ", - " 14446745547644410 ", - " 11134442455554244447201", - "076644442555555764444461", - "134444462555555734444461", - "013344441455555244447101", - " 0024443755553344420 ", - " 1344431732344461 ", - " 0744444336444461 ", - " 16444444444444471 ", - " 134466444444634442 ", - " 164311164447112441 ", - " 171 14431 11 ", - " 0 14470 ", - " 13620 ", - " 111 "}; - -static char *manage_x32[] = { - "32 32 9 1", - " c None", - "0 c #000000", - "1 c #333333", - "2 c #666666", - "3 c #999999", - "4 c #CCCCCC", - "5 c #FFFFFF", - "6 c #C0C0C0", - "7 c #808080", - " ", - " 11221 ", - " 164430 ", - " 164430 ", - " 11 164431 11 ", - " 1331 02444410 2461 ", - " 164431112444444701244461 ", - " 144446364444444446444461 ", - " 13444444444444444444441 ", - " 134444444444444444441 ", - " 14444444373344444461 ", - " 14444431011003444441 ", - " 0744443074554707444431 ", - " 016444417555555306444421111 ", - " 1227644443045555555174444466620", - "02444444447255555555324444444430", - "07444444447255555555324444444430", - " 244444444305555555527444443332 ", - " 100074444603555555403444471000 ", - " 1344447065555412444431 ", - " 14444470233702444442 ", - " 13444443710234444440 ", - " 164444444444444444421 ", - " 13444444444444444444421 ", - " 174444444444444444444441 ", - " 164443123444444620164441 ", - " 14431 12444431 13471 ", - " 1121 174441 111 ", - " 074441 ", - " 074440 ", - " 13371 ", - " 000 "}; - -static char **manage_xpm[3] = { manage_x16, manage_x24, manage_x32 }; - diff --git a/app/bin/bitmaps/map.xpm b/app/bin/bitmaps/map.xpm deleted file mode 100644 index e123f7f..0000000 --- a/app/bin/bitmaps/map.xpm +++ /dev/null @@ -1,169 +0,0 @@ -static char *map_x16[] = { - "16 16 28 1", - " c None", - "0 c #000000", - "1 c #003333", - "2 c #003366", - "3 c #0099CC", - "4 c #00CCFF", - "5 c #330000", - "6 c #330033", - "7 c #333300", - "8 c #333366", - "9 c #660033", - "A c #663300", - "B c #666699", - "C c #990066", - "D c #993300", - "E c #993399", - "F c #996600", - "G c #CC0099", - "H c #CC3399", - "I c #CC6600", - "J c #CC9900", - "K c #CC9933", - "L c #CC99CC", - "M c #FF0099", - "N c #FF00CC", - "O c #FF33CC", - "P c #FF6699", - "Q c #FF9900", - "0 0 ", - "000 00000 ", - "00000 000 0 000 ", - "00 000 0QQ 00", - "0AQQ 0 Q0 QQ 0", - "DIQQQ7JQQ 0 Q70", - "50 7KP 0 QF0", - "00 5MNN 0 QJA", - "5CNNN9G NN044 0", - "6EN 0 N04 4B6", - "2344 1 40L OH8", - "00 4424 440NNN81", - "00 034 00 0", - "000 0 000000 0", - " 000000 000", - " 00 00"}; - -static char *map_x24[] = { - "24 24 29 1", - " c None", - "0 c #000000", - "1 c #003333", - "2 c #003366", - "3 c #006666", - "4 c #006699", - "5 c #0099CC", - "6 c #00CCFF", - "7 c #330000", - "8 c #330033", - "9 c #333300", - "A c #336699", - "B c #660033", - "C c #660066", - "D c #663300", - "E c #6699CC", - "F c #66CCFF", - "G c #990066", - "H c #996600", - "I c #CC0099", - "J c #CC3399", - "K c #CC6600", - "L c #FF0099", - "M c #FF00CC", - "N c #FF3399", - "O c #FF33CC", - "P c #FF66CC", - "Q c #FF9900", - "R c #FF9933", - " ", - " 00 000 ", - " 0000 0000000 ", - " 0 000 000 0 00 ", - " 0 00000 DK 000 ", - " 0 00 QDKQQ 00", - " 0 QQ 0 Q7 QQ 00", - " 9QQQQQ 0 Q 0 QQ 00", - "HDQ QQ9QQQQ 0 Q 00", - " 0 9QRN 0 Q 00", - " 0 0MMMM 0 QQD0", - " 0 8MMMMM 0 QQHD", - " 0 MMMMLBM MMM0 666 00", - " BMMMM I0 MMC46 66 00", - " 1 0 MGE 6FB0", - " 3666 0 FGJ MOG8", - " 0 666662 66CIMMMMMA2", - " 0 6516 66 0GMMM 00", - " 0 0 66 00 00", - " 00 0 00000 00", - " 000 0 00 000 00", - " 000 0 00 00000", - " 00000 000", - " 0 "}; - -static char *map_x32[] = { - "32 32 29 1", - " c None", - "0 c #000000", - "1 c #006666", - "2 c #006699", - "3 c #0099CC", - "4 c #00CCCC", - "5 c #00CCFF", - "6 c #330000", - "7 c #333300", - "8 c #333366", - "9 c #663300", - "A c #666699", - "B c #66CCFF", - "C c #990066", - "D c #993399", - "E c #996600", - "F c #996699", - "G c #9999CC", - "H c #9999FF", - "I c #CC0099", - "J c #CC6600", - "K c #CC66CC", - "L c #CC9900", - "M c #FF0099", - "N c #FF00CC", - "O c #FF33CC", - "P c #FF6699", - "Q c #FF9900", - "R c #FF9933", - " ", - " 0 00 ", - " 000 000000 ", - " 0 000 00 00 000 ", - " 0 000 00 00 000 ", - " 0 000 00 EE 00 ", - " 0 00000 JJQQ 00 ", - " 0 00 QJEQQQQ 0 ", - " 0 QQQ 0 QQE0 QQQQ 0 ", - " 0 QQQQQQ 0 QQQ00 QQQ 0 ", - " 9QQQQQQQQJ0 QQQQQ 00 QQ 0 ", - " 7QQ QQLEQQQQQQ 00 QQ 0 ", - " 0 LEQQRP 00 QQQ 0 ", - " 0 6 NNNN 00 QQQ 0 ", - " 0 6NNNNNN 00 QQQ0 ", - " 0 ICNN NNNN 00 55 QQQ0 ", - " 0 NNNNNNICN NNNN00 555 0 ", - " 0MNNNNNNNI6 NNNC0555555 0 ", - " 0MNN 0 NNIA55 5555 0 ", - " 045 0 NIF5 55BK0 ", - " 055555 0 HIIB KON0 ", - " 03555555531 55DIN NNNOG0 ", - " 0 55555325 55558CNNNNNN 0 ", - " 0 55315555555 00NNNN 0 ", - " 0 055555 00 0 ", - " 00 0 55 0000 0 ", - " 000 0 000 000 0 ", - " 000 0 00 000 0 ", - " 000 0 00 000 0 ", - " 0000000 000 ", - " 000 0 ", - " "}; - -static char **map_xpm[3] = { map_x16, map_x24, map_x32 }; - diff --git a/app/bin/bitmaps/move.xpm b/app/bin/bitmaps/move.xpm deleted file mode 100644 index 5482a6b..0000000 --- a/app/bin/bitmaps/move.xpm +++ /dev/null @@ -1,119 +0,0 @@ -static char *move_x16[] = { - "16 16 7 1", - " c None", - "0 c #000000", - "1 c #0066CC", - "2 c #0099FF", - "3 c #CC0000", - "4 c #CCCCCC", - "5 c #808080", - " 1 1 5 5 ", - "21212 45454", - " 1 1 5 5 ", - "21212 45454", - " 1 1 5 5 ", - "21212 3 45454", - " 1 1 33 5 5 ", - "21212 333333 454", - " 1 1 33 5 5 ", - "21212 3 45454", - " 1 1 5 5 ", - "21212 45454", - " 1 1 5 5 ", - "21212 45454", - " 1 1 5 5 ", - " "}; - -static char *move_x24[] = { - "24 24 15 1", - " c None", - "0 c #000000", - "1 c #006699", - "2 c #009999", - "3 c #0099CC", - "4 c #00CCCC", - "5 c #666666", - "6 c #996666", - "7 c #999999", - "8 c #CC0000", - "9 c #CC3333", - "A c #CC6666", - "B c #CC9999", - "C c #C0C0C0", - "D c #808080", - " ", - " 1 1 55 5 ", - " 44144424 CD7CCD7C ", - " 1 1 55 5 ", - " 1 1 55 5 ", - " 44144424 CD7CCD7C ", - " 31 31 DD 5D ", - " 1 1 55 5 ", - " 44144314 B6DCCD7C ", - " 4144314 A86CCD7 ", - " 1 1 98 5 ", - " 4147666888888AA89BD7 ", - " 44147666988889A698BD7C ", - " 1 1 988 5 ", - " 31 31 A89 5D ", - " 44144424 B67CCD7C ", - " 1 1 55 5 ", - " 1 1 55 5 ", - " 44144424 CD7CCD7C ", - " 1 1 55 5 ", - " 1 1 55 5 ", - " 44144424 CD7CCD7C ", - " 31 31 DD 5D ", - " 1 1 5 "}; - -static char *move_x32[] = { - "32 32 14 1", - " c None", - "0 c #000000", - "1 c #006699", - "2 c #0099CC", - "3 c #00CCCC", - "4 c #666666", - "5 c #996666", - "6 c #999999", - "7 c #CC0000", - "8 c #CC3333", - "9 c #CC6666", - "A c #CC9999", - "B c #C0C0C0", - "C c #808080", - " ", - " 1 1 4 4 ", - " 1 12 4 46 ", - " 3313333133 BB4BBBBC6B ", - " 1 1 4 4 ", - " 1 1 4 4 ", - " 1 1 4 4 ", - " 3313333133 BB4BBBBC6B ", - " 1 1 4 4 ", - " 1 1 4 4 ", - " 1 1 4 4 ", - " 3313333133 BA4BBBBC6B ", - " 1 12 977A 46 ", - " 1 1 777 4 ", - " 1 1 877 4 ", - " 331368777777777777777779B46B ", - " 331367777777777777777778B46B ", - " 1 1 877 4 ", - " 1 1 777 4 ", - " 1 1 77 4 ", - " 3313333133 A95BBBBC6B ", - " 1 1 4 4 ", - " 1 1 4 4 ", - " 1 1 4 4 ", - " 3313333133 BB4BBBBC6B ", - " 1 12 4 46 ", - " 1 1 4 4 ", - " 1 1 4 4 ", - " 3313333133 BB4BBBB46B ", - " 3313333133 BB4BBBB46B ", - " 1 1 4 4 ", - " "}; - -static char **move_xpm[3] = { move_x16, move_x24, move_x32 }; - diff --git a/app/bin/bitmaps/new-car.xpm b/app/bin/bitmaps/new-car.xpm deleted file mode 100644 index c2fd649..0000000 --- a/app/bin/bitmaps/new-car.xpm +++ /dev/null @@ -1,100 +0,0 @@ -static char *new_car_x16[] = { - "16 16 5 1", - " c None", - "0 c #000000", - "1 c #339900", - "2 c #663300", - "3 c #808080", - " 11 ", - " 11 ", - " 111111 ", - " 111111 ", - " 11 ", - " 11 ", - " ", - " 22222222222222 ", - " 22222222222222 ", - " 22222222222222 ", - " 22222222222222 ", - " 22222222222222 ", - " 3 3 3 3 ", - " 30303 30303 ", - " 3 3 3 3 ", - " "}; - -static char *new_car_x24[] = { - "24 24 6 1", - " c None", - "0 c #000000", - "1 c #009933", - "2 c #00CC33", - "3 c #00FF66", - "4 c #663300", - " ", - " 221 ", - " 231 ", - " 1231 ", - " 222332221 ", - " 233333331 ", - " 11123111 ", - " 1231 ", - " 1231 ", - " 11 ", - " ", - "444444444444444444444444", - "444444444444444444444444", - "444444444444444444444444", - "444444444444444444444444", - "444444444444444444444444", - "444444444444444444444444", - "444444444444444444444444", - "444444444444444444444444", - "444444444444444444444444", - " 00 0 00 0 ", - " 0000000 000 000 ", - " 000 000 000 000 ", - " 0 "}; - -static char *new_car_x32[] = { - "32 32 6 1", - " c None", - "0 c #000000", - "1 c #009933", - "2 c #00CC33", - "3 c #00FF66", - "4 c #663300", - " ", - " 11111 ", - " 2331 ", - " 2331 ", - " 12331 ", - " 111123321111 ", - " 233333333331 ", - " 233333333331 ", - " 111123311111 ", - " 12331 ", - " 12331 ", - " 2221 ", - " 1111 ", - " ", - " ", - "4444444444444444444444444444444 ", - "4444444444444444444444444444444 ", - "4444444444444444444444444444444 ", - "4444444444444444444444444444444 ", - "4444444444444444444444444444444 ", - "4444444444444444444444444444444 ", - "4444444444444444444444444444444 ", - "4444444444444444444444444444444 ", - "4444444444444444444444444444444 ", - "4444444444444444444444444444444 ", - "4444444444444444444444444444444 ", - "4444444444444444444444444444444 ", - " 00 000 00 00 ", - " 00000000 00000000 ", - " 00000000 00000000 ", - " 000 000 000 000 ", - " "}; - -static char **new_car_xpm[3] = { new_car_x16, new_car_x24, new_car_x32 }; - diff --git a/app/bin/bitmaps/ok.xpm b/app/bin/bitmaps/ok.xpm deleted file mode 100644 index 1671eae..0000000 --- a/app/bin/bitmaps/ok.xpm +++ /dev/null @@ -1,92 +0,0 @@ -static char *ok_x16[] = { - "16 16 3 1", - " c None", - "0 c #000000", - "1 c #008000", - " ", - " 1 ", - " 11 ", - " 111 ", - " 1111 ", - " 1111 ", - " 1111 ", - " 1111 ", - " 1 1111 ", - " 11 1111 ", - " 1111111 ", - " 111111 ", - " 1111 ", - " 111 ", - " 1 ", - " "}; - -static char *ok_x24[] = { - "24 24 3 1", - " c None", - "0 c #000000", - "1 c #008000", - " ", - " ", - " 1 ", - " 1111 ", - " 1111 ", - " 1111 ", - " 1111 ", - " 11111 ", - " 11111 ", - " 11111 ", - " 11111 ", - " 11111 ", - " 11111 ", - " 11 11111 ", - " 1111 11111 ", - " 11111 11111 ", - " 111111111 ", - " 11111111 ", - " 111111 ", - " 1111 ", - " 111 ", - " 1 ", - " ", - " "}; - -static char *ok_x32[] = { - "32 32 3 1", - " c None", - "0 c #000000", - "1 c #008000", - " ", - " ", - " ", - " 111 ", - " 1111 ", - " 11111 ", - " 11111 ", - " 11111 ", - " 11111 ", - " 11111 ", - " 11111 ", - " 11111 ", - " 11111 ", - " 11111 ", - " 111111 ", - " 111111 ", - " 1111111 ", - " 1 1111111 ", - " 111 1111111 ", - " 1111 1111111 ", - " 11111 1111111 ", - " 111111111111 ", - " 11111111111 ", - " 111111111 ", - " 11111111 ", - " 111111 ", - " 11111 ", - " 111 ", - " 11 ", - " ", - " ", - " "}; - -static char **ok_xpm[3] = { ok_x16, ok_x24, ok_x32 }; - diff --git a/app/bin/bitmaps/pan-zoom.xpm b/app/bin/bitmaps/pan-zoom.xpm deleted file mode 100644 index a42beee..0000000 --- a/app/bin/bitmaps/pan-zoom.xpm +++ /dev/null @@ -1,94 +0,0 @@ -static char *pan_zoom_x16[] = { - "16 16 4 1", - " c None", - "0 c #000000", - "1 c #FF0000", - "2 c #FF3333", - " ", - " 11 ", - " 1211 ", - " 111111 ", - " 11 ", - " 1 11 1 ", - " 11 11 11 ", - " 11111111111111 ", - " 11111111111111 ", - " 11 11 11 ", - " 1 11 1 ", - " 11 ", - " 122111 ", - " 1111 ", - " 11 ", - " "}; - -static char *pan_zoom_x24[] = { - "24 24 4 1", - " c None", - "0 c #000000", - "1 c #FF0000", - "2 c #FF3333", - " ", - " ", - " 11 ", - " 1111 ", - " 111111 ", - " 11111211 ", - " 11 ", - " 11 ", - " 1 11 1 ", - " 11 11 11 ", - " 111 11 111 ", - " 11111111111111111111 ", - " 11111111111111111111 ", - " 111 11 111 ", - " 11 11 11 ", - " 1 11 1 ", - " 11 ", - " 11 ", - " 11111111 ", - " 111111 ", - " 1111 ", - " 11 ", - " ", - " "}; - -static char *pan_zoom_x32[] = { - "32 32 3 1", - " c None", - "0 c #000000", - "1 c #CC0000", - " ", - " ", - " 11 ", - " 111111 ", - " 1111111111 ", - " 111111111111 ", - " 1111 111 111 ", - " 111 ", - " 111 ", - " 111 ", - " 11 111 11 ", - " 111 111 111 ", - " 1111 111 1111 ", - " 111 111 111 ", - " 1111111111111111111111111111 ", - " 11111111111111111111111111111 ", - " 1111111111111111111111111111 ", - " 111 111 111 ", - " 1111 111 1111 ", - " 111 111 111 ", - " 11 111 111 ", - " 111 ", - " 111 ", - " 111 ", - " 111 111 1 ", - " 1111 111 111 ", - " 11111111111 ", - " 111111111 ", - " 11111 ", - " 111 ", - " ", - " "}; - -static char **pan_zoom_xpm[3] = { pan_zoom_x16, pan_zoom_x24, pan_zoom_x32 }; - diff --git a/app/bin/bitmaps/parallel-line.xpm b/app/bin/bitmaps/parallel-line.xpm deleted file mode 100644 index b490c84..0000000 --- a/app/bin/bitmaps/parallel-line.xpm +++ /dev/null @@ -1,108 +0,0 @@ -static char *parallel_line_x16[] = { - "16 16 4 1", - " c None", - "0 c #000000", - "1 c #CC0000", - "2 c #CC9966", - " ", - "000000000000000 ", - " ", - " 1 ", - " 111 ", - " 11111 ", - " 1 ", - " 1 ", - " 1 ", - " 2 2 2 2 2 2 ", - "000000000000000 ", - " 2 2 2 2 2 2 2 ", - " 2 2 2 2 2 2 2 ", - "000000000000000 ", - " 2 2 2 2 2 2 2 ", - " "}; - -static char *parallel_line_x24[] = { - "24 24 11 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #333300", - "3 c #663300", - "4 c #666666", - "5 c #996600", - "6 c #CC0000", - "7 c #CC3300", - "8 c #CC6600", - "9 c #CC9900", - " ", - " ", - " ", - " 4444444444444444444444 ", - " ", - " 66 ", - " 6666 ", - " 6666 6 ", - " 66 ", - " 66 ", - " 66 ", - " 66 ", - " 66 ", - " 7 ", - " 9 9 99 99 9 9 9 ", - " 0000000000000000000000 ", - " 9 9 99 99 9 9 9 ", - " 9 9 99 99 9 9 9 ", - " 9 9 99 99 9 9 9 ", - " 0300320320230230130031 ", - " 8 85 85 58 58 38 83 ", - " 9 9 9 9 9 9 9 ", - " ", - " "}; - -static char *parallel_line_x32[] = { - "32 32 10 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #333300", - "3 c #663300", - "4 c #666666", - "5 c #996600", - "6 c #CC0000", - "7 c #CC6600", - "8 c #CC9900", - " ", - " ", - " ", - " ", - " 444444444444444444444444444444 ", - " ", - " ", - " 66 ", - " 6666 ", - " 66 6 66 ", - " 6 6 6 ", - " 6 ", - " 6 ", - " 6 ", - " 6 ", - " 6 ", - " 6 ", - " 6 ", - " ", - " 88 88 88 88 88 88 88 ", - " 000000000000000000000000000000 ", - " 88 88 88 88 88 88 88 ", - " 88 88 88 88 88 88 88 ", - " 88 88 88 88 88 88 88 ", - " 88 88 88 88 88 88 88 ", - " 575 575 77 77 573 575 377 ", - " 033202330033003300331023201330 ", - " 88 88 88 88 88 88 88 ", - " ", - " ", - " ", - " "}; - -static char **parallel_line_xpm[3] = { parallel_line_x16, parallel_line_x24, parallel_line_x32 }; - diff --git a/app/bin/bitmaps/parallel.xpm b/app/bin/bitmaps/parallel.xpm deleted file mode 100644 index a19f797..0000000 --- a/app/bin/bitmaps/parallel.xpm +++ /dev/null @@ -1,116 +0,0 @@ -static char *parallel_x16[] = { - "16 16 6 1", - " c None", - "0 c #000000", - "1 c #CC0000", - "2 c #CC9966", - "3 c #CCCCCC", - "4 c #808080", - " 3 3 3 3 3 3 3 ", - "444444444444444 ", - " 3 3 3 3 3 3 3 ", - " 3 3 3 3 3 3 3 ", - "4444444 4444444 ", - " 3 3 3 1 3 3 3 ", - " 111 ", - " 11111 ", - " 1 ", - " 1 ", - " 2 2 2 1 2 2 2 ", - "0000000 0000000 ", - " 2 2 2 2 2 2 2 ", - " 2 2 2 2 2 2 2 ", - "000000000000000 ", - " 2 2 2 2 2 2 2 "}; - -static char *parallel_x24[] = { - "24 24 14 1", - " c None", - "0 c #000000", - "1 c #333300", - "2 c #663300", - "3 c #666666", - "4 c #996600", - "5 c #999999", - "6 c #CC0000", - "7 c #CC3300", - "8 c #CC6600", - "9 c #CC9900", - "A c #CC9999", - "B c #C0C0C0", - "C c #808080", - " B B B ", - " 55 5 5C 55 C5 5C 55 ", - "3CC33C33C33CC33C33C33CC3", - " BB B B BB B B BB ", - " BB B B BB B B BB ", - " BB B B BB B B BB ", - "3CC33C33C33CC33C33C33CC3", - " 55 5 5C 55 C5 5C 55 ", - " B B B AA B B ", - " 666 ", - " 666666 ", - " 666666 ", - " 66 ", - " 66 ", - " 66 ", - " 77 ", - " 99 9 9 99 9 9 99 ", - "000000000000000000000000", - " 99 9 9 99 9 9 99 ", - " 99 9 9 99 9 9 99 ", - " 99 9 9 99 9 9 99 ", - " 2400400420440140041044 ", - " 2400400420440140041044 ", - " 9 9 9 99 9 9 99 "}; - -static char *parallel_x32[] = { - "32 32 13 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #333300", - "3 c #663300", - "4 c #666666", - "5 c #996600", - "6 c #999999", - "7 c #CC0000", - "8 c #CC6600", - "9 c #CC9900", - "A c #C0C0C0", - "B c #808080", - " ", - " AA AA AA AA AAA AA AA ", - " 46B44B6B4B6B446644B6B446B44B6B ", - " 46B44B6B4B6B446644B6B446B44B6B ", - " AA AA AA AA AAA AA AA ", - " AA AA AA AA AAA AA AA ", - " AA AA AA AA AAA AA AA ", - " AA AA AA AA AAA AA AA ", - " 46B44B6B4B6B446644B6B446B44B6B ", - " 46B44B6B4B6B446644B6B446B44B6B ", - " AA AA AA AA AAA AA AA ", - " ", - " 7777 ", - " 777777 ", - " 77777777 ", - " 77 77 777 ", - " 77 ", - " 77 ", - " 77 ", - " 77 ", - " 77 ", - " 99 99 9 99 9 99 99 ", - " 88 883 585 88 585 88 883 ", - " 0330033102330033002320033003310", - " 99 99 99 99 999 99 99 ", - " 99 99 99 99 999 99 99 ", - " 99 99 99 99 999 99 99 ", - " 99 99 99 99 999 99 99 ", - " 88 883 585 88 585 88 883 ", - " 0330033102330033002320033003310", - " 99 99 99 99 999 99 99 ", - " "}; - -static char **parallel_xpm[3] = { parallel_x16, parallel_x24, parallel_x32 }; - diff --git a/app/bin/bitmaps/parameter.xpm b/app/bin/bitmaps/parameter.xpm deleted file mode 100644 index 7a58a6f..0000000 --- a/app/bin/bitmaps/parameter.xpm +++ /dev/null @@ -1,104 +0,0 @@ -static char *parameter_x16[] = { - "16 16 3 1", - " c None", - "0 c #000000", - "1 c #999999", - " 11111111111 ", - " 1 11 ", - " 1 11 ", - " 1 00000000 11 ", - " 1 1 ", - " 1 0 1 ", - " 1 00 1 ", - " 1 00 1 ", - " 1 000 1 ", - " 1 1 ", - " 1 00000000 1 ", - " 1 00 1 ", - " 1 00 1 ", - " 1 00 1 ", - " 1 1 ", - " 11111111111111 "}; - -static char *parameter_x24[] = { - "24 24 9 1", - " c None", - "0 c #000000", - "1 c #333333", - "2 c #666666", - "3 c #999999", - "4 c #CCCCCC", - "5 c #FFFFFF", - "6 c #C0C0C0", - "7 c #808080", - " 7777777777777777 ", - " 234444444444444447 ", - " 2355555555555555537 ", - " 2355100000000000757 ", - " 23555555555555555557 ", - " 235555555555555445547 ", - " 2355555555555437455537 ", - " 2355555555432745555547 ", - " 2355377202765555555547 ", - " 2355544555555555555547 ", - " 2355455555555555555547 ", - " 2355323455555472455547 ", - " 2355554724532345555547 ", - " 355555562074555555547 ", - " 355556234547745555547 ", - " 355323555555432455547 ", - " 355455555555555555547 ", - " 355466336666666455547 ", - " 355666321366666655547 ", - " 355555555326555555547 ", - " 355555555553265555547 ", - " 355555555555562455547 ", - " 355555555555555555547 ", - " 222222222222222222227 "}; - -static char *parameter_x32[] = { - "32 32 9 1", - " c None", - "0 c #000000", - "1 c #333333", - "2 c #666666", - "3 c #999999", - "4 c #CCCCCC", - "5 c #FFFFFF", - "6 c #C0C0C0", - "7 c #808080", - " 222222222222222222222 ", - " 73666666666666666666637 ", - " 74555555555555555555557 ", - " 745555555555555555555547 ", - " 7455500000000000000004547 ", - " 74555777777777777777745537 ", - " 74555555555555555555555557 ", - " 745555555555555555547555557 ", - " 7455555555555555547004555547 ", - " 7455555555555543100355555557 ", - " 7455554666637000265555555557 ", - " 7455530000001765555555555557 ", - " 7455546444455555555555555557 ", - " 7455555555555555555555555557 ", - " 7455537455555555554375555557 ", - " 7455531023555555420075555557 ", - " 7455555420074431013555555557 ", - " 7455555554300007455555555557 ", - " 7455555553101100345555555557 ", - " 7455554700245547002655555557 ", - " 7455570134555555532015555557 ", - " 7455544555555555555465555557 ", - " 7455555555555555555555555557 ", - " 7455537777227777777774555557 ", - " 7455570000000000000006555557 ", - " 7455555555531016555555555557 ", - " 7455555555555610135555555557 ", - " 7455555555555556200345555557 ", - " 7455555555555555542005555557 ", - " 7455555555555555555435555557 ", - " 7644444444444444444444444447 ", - " 7777777777777777777777777777 "}; - -static char **parameter_xpm[3] = { parameter_x16, parameter_x24, parameter_x32 }; - diff --git a/app/bin/bitmaps/paste.xpm b/app/bin/bitmaps/paste.xpm deleted file mode 100644 index c820a4e..0000000 --- a/app/bin/bitmaps/paste.xpm +++ /dev/null @@ -1,107 +0,0 @@ -static char *paste_x16[] = { - "16 16 8 1", - " c None", - "0 c #000000", - "1 c #666666", - "2 c #999999", - "3 c #CCCCCC", - "4 c #FFFFFF", - "5 c #C0C0C0", - "6 c #808080", - " 6116 ", - " 666623326666 ", - "63333222233356 ", - "6444411111111111", - "6444144444444441", - "6444144444444441", - "6444144444444441", - "6444144444444441", - "6444144444444441", - "6444144444444441", - "6444144444444441", - "6444144444444441", - "6444144444444441", - "6444144444444441", - "6255144444444441", - " 111111111111111"}; - -static char *paste_x24[] = { - "24 24 8 1", - " c None", - "0 c #000000", - "1 c #666666", - "2 c #999999", - "3 c #CCCCCC", - "4 c #FFFFFF", - "5 c #C0C0C0", - "6 c #808080", - " 66666 ", - " 6533336 ", - " 6111111333336111166 ", - "12444444522224444441 ", - "15444444444444444446 ", - "15444441111111111111111 ", - "154444144444444444444441", - "154444144444444444444441", - "154444144444444444444441", - "154444144444444444444441", - "154444144444444444444441", - "154444144444444444444441", - "154444144444444444444441", - "154444144444444444444441", - "154444144444444444444441", - "154444144444444444444441", - "154444144444444444444441", - "154444144444444444444441", - "154444144444444444444441", - "154444144444444444444441", - "154444144444444444444441", - "124444144444444444444441", - " 61111144444444444444441", - " 1111111111111111 "}; - -static char *paste_x32[] = { - "32 32 8 1", - " c None", - "0 c #000000", - "1 c #666666", - "2 c #999999", - "3 c #CCCCCC", - "4 c #FFFFFF", - "5 c #C0C0C0", - "6 c #808080", - " 111111 ", - " 62555556 ", - " 6244444436 ", - " 6622222266333333662222266 ", - " 64444444442222223444444451 ", - " 64444444444444444444444436 ", - " 24444444444444444444444436 ", - " 244444441111111111111111111111 ", - " 244444441444444444444444444441 ", - " 244444441444444444444444444441 ", - " 244444441444444444444444444441 ", - " 244444441444444444444444444441 ", - " 244444441444444444444444444441 ", - " 244444441444444444444444444441 ", - " 244444441444444444444444444441 ", - " 244444441444444444444444444441 ", - " 244444441444444444444444444441 ", - " 244444441444444444444444444441 ", - " 244444441444444444444444444441 ", - " 244444441444444444444444444441 ", - " 244444441444444444444444444441 ", - " 244444441444444444444444444441 ", - " 244444441444444444444444444441 ", - " 244444441444444444444444444441 ", - " 244444441444444444444444444441 ", - " 244444441444444444444444444441 ", - " 244444441444444444444444444441 ", - " 244444441444444444444444444441 ", - " 644444441444444444444444444441 ", - " 665555551444444444444444444441 ", - " 1111111444444444444444444441 ", - " 1111111111111111111111 "}; - -static char **paste_xpm[3] = { paste_x16, paste_x24, paste_x32 }; - diff --git a/app/bin/bitmaps/png/circle-center16.png b/app/bin/bitmaps/png/circle-center16.png new file mode 100644 index 0000000..062560d Binary files /dev/null and b/app/bin/bitmaps/png/circle-center16.png differ diff --git a/app/bin/bitmaps/png/circle-tangent16.png b/app/bin/bitmaps/png/circle-tangent16.png new file mode 100644 index 0000000..0dc831b Binary files /dev/null and b/app/bin/bitmaps/png/circle-tangent16.png differ diff --git a/app/bin/bitmaps/png/circle16.png b/app/bin/bitmaps/png/circle16.png new file mode 100644 index 0000000..eaecd31 Binary files /dev/null and b/app/bin/bitmaps/png/circle16.png differ diff --git a/app/bin/bitmaps/png/curved-chord16.png b/app/bin/bitmaps/png/curved-chord16.png new file mode 100644 index 0000000..0068d1a Binary files /dev/null and b/app/bin/bitmaps/png/curved-chord16.png differ diff --git a/app/bin/bitmaps/png/curved-end16.png b/app/bin/bitmaps/png/curved-end16.png new file mode 100644 index 0000000..49dcee3 Binary files /dev/null and b/app/bin/bitmaps/png/curved-end16.png differ diff --git a/app/bin/bitmaps/png/curved-middle16.png b/app/bin/bitmaps/png/curved-middle16.png new file mode 100644 index 0000000..d23a6a2 Binary files /dev/null and b/app/bin/bitmaps/png/curved-middle16.png differ diff --git a/app/bin/bitmaps/png/curved-tangent16.png b/app/bin/bitmaps/png/curved-tangent16.png new file mode 100644 index 0000000..6d8fcfe Binary files /dev/null and b/app/bin/bitmaps/png/curved-tangent16.png differ diff --git a/app/bin/bitmaps/png/description16.png b/app/bin/bitmaps/png/description16.png new file mode 100644 index 0000000..9bd679c Binary files /dev/null and b/app/bin/bitmaps/png/description16.png differ diff --git a/app/bin/bitmaps/png/description24.png b/app/bin/bitmaps/png/description24.png new file mode 100644 index 0000000..e273ed5 Binary files /dev/null and b/app/bin/bitmaps/png/description24.png differ diff --git a/app/bin/bitmaps/png/down16.png b/app/bin/bitmaps/png/down16.png new file mode 100644 index 0000000..e272de2 Binary files /dev/null and b/app/bin/bitmaps/png/down16.png differ diff --git a/app/bin/bitmaps/png/down24.png b/app/bin/bitmaps/png/down24.png new file mode 100644 index 0000000..0b72634 Binary files /dev/null and b/app/bin/bitmaps/png/down24.png differ diff --git a/app/bin/bitmaps/png/ease-broad16.png b/app/bin/bitmaps/png/ease-broad16.png new file mode 100644 index 0000000..f2bd685 Binary files /dev/null and b/app/bin/bitmaps/png/ease-broad16.png differ diff --git a/app/bin/bitmaps/png/ease-broad24.png b/app/bin/bitmaps/png/ease-broad24.png new file mode 100644 index 0000000..bf29e0f Binary files /dev/null and b/app/bin/bitmaps/png/ease-broad24.png differ diff --git a/app/bin/bitmaps/png/ease-broad32.png b/app/bin/bitmaps/png/ease-broad32.png new file mode 100644 index 0000000..43e45ea Binary files /dev/null and b/app/bin/bitmaps/png/ease-broad32.png differ diff --git a/app/bin/bitmaps/png/ease-cornu16.png b/app/bin/bitmaps/png/ease-cornu16.png new file mode 100644 index 0000000..acdd269 Binary files /dev/null and b/app/bin/bitmaps/png/ease-cornu16.png differ diff --git a/app/bin/bitmaps/png/ease-cornu24.png b/app/bin/bitmaps/png/ease-cornu24.png new file mode 100644 index 0000000..e64ea53 Binary files /dev/null and b/app/bin/bitmaps/png/ease-cornu24.png differ diff --git a/app/bin/bitmaps/png/ease-cornu32.png b/app/bin/bitmaps/png/ease-cornu32.png new file mode 100644 index 0000000..a5e0d29 Binary files /dev/null and b/app/bin/bitmaps/png/ease-cornu32.png differ diff --git a/app/bin/bitmaps/png/ease-gt-broad16.png b/app/bin/bitmaps/png/ease-gt-broad16.png new file mode 100644 index 0000000..715e2dd Binary files /dev/null and b/app/bin/bitmaps/png/ease-gt-broad16.png differ diff --git a/app/bin/bitmaps/png/ease-gt-broad24.png b/app/bin/bitmaps/png/ease-gt-broad24.png new file mode 100644 index 0000000..1db1640 Binary files /dev/null and b/app/bin/bitmaps/png/ease-gt-broad24.png differ diff --git a/app/bin/bitmaps/png/ease-gt-broad32.png b/app/bin/bitmaps/png/ease-gt-broad32.png new file mode 100644 index 0000000..f7ae18e Binary files /dev/null and b/app/bin/bitmaps/png/ease-gt-broad32.png differ diff --git a/app/bin/bitmaps/png/ease-gt-sharp16.png b/app/bin/bitmaps/png/ease-gt-sharp16.png new file mode 100644 index 0000000..b642ad5 Binary files /dev/null and b/app/bin/bitmaps/png/ease-gt-sharp16.png differ diff --git a/app/bin/bitmaps/png/ease-gt-sharp24.png b/app/bin/bitmaps/png/ease-gt-sharp24.png new file mode 100644 index 0000000..1d45db8 Binary files /dev/null and b/app/bin/bitmaps/png/ease-gt-sharp24.png differ diff --git a/app/bin/bitmaps/png/ease-gt-sharp32.png b/app/bin/bitmaps/png/ease-gt-sharp32.png new file mode 100644 index 0000000..a33306c Binary files /dev/null and b/app/bin/bitmaps/png/ease-gt-sharp32.png differ diff --git a/app/bin/bitmaps/png/ease-lt-broad16.png b/app/bin/bitmaps/png/ease-lt-broad16.png new file mode 100644 index 0000000..7343b9e Binary files /dev/null and b/app/bin/bitmaps/png/ease-lt-broad16.png differ diff --git a/app/bin/bitmaps/png/ease-lt-broad24.png b/app/bin/bitmaps/png/ease-lt-broad24.png new file mode 100644 index 0000000..3154ae1 Binary files /dev/null and b/app/bin/bitmaps/png/ease-lt-broad24.png differ diff --git a/app/bin/bitmaps/png/ease-lt-broad32.png b/app/bin/bitmaps/png/ease-lt-broad32.png new file mode 100644 index 0000000..862fedc Binary files /dev/null and b/app/bin/bitmaps/png/ease-lt-broad32.png differ diff --git a/app/bin/bitmaps/png/ease-lt-sharp16.png b/app/bin/bitmaps/png/ease-lt-sharp16.png new file mode 100644 index 0000000..a4e7a12 Binary files /dev/null and b/app/bin/bitmaps/png/ease-lt-sharp16.png differ diff --git a/app/bin/bitmaps/png/ease-lt-sharp24.png b/app/bin/bitmaps/png/ease-lt-sharp24.png new file mode 100644 index 0000000..100756d Binary files /dev/null and b/app/bin/bitmaps/png/ease-lt-sharp24.png differ diff --git a/app/bin/bitmaps/png/ease-lt-sharp32.png b/app/bin/bitmaps/png/ease-lt-sharp32.png new file mode 100644 index 0000000..557e3a1 Binary files /dev/null and b/app/bin/bitmaps/png/ease-lt-sharp32.png differ diff --git a/app/bin/bitmaps/png/ease-none16.png b/app/bin/bitmaps/png/ease-none16.png new file mode 100644 index 0000000..70bbadf Binary files /dev/null and b/app/bin/bitmaps/png/ease-none16.png differ diff --git a/app/bin/bitmaps/png/ease-none24.png b/app/bin/bitmaps/png/ease-none24.png new file mode 100644 index 0000000..35cc7d9 Binary files /dev/null and b/app/bin/bitmaps/png/ease-none24.png differ diff --git a/app/bin/bitmaps/png/ease-none32.png b/app/bin/bitmaps/png/ease-none32.png new file mode 100644 index 0000000..93db06f Binary files /dev/null and b/app/bin/bitmaps/png/ease-none32.png differ diff --git a/app/bin/bitmaps/png/ease-normal16.png b/app/bin/bitmaps/png/ease-normal16.png new file mode 100644 index 0000000..1051cc6 Binary files /dev/null and b/app/bin/bitmaps/png/ease-normal16.png differ diff --git a/app/bin/bitmaps/png/ease-normal24.png b/app/bin/bitmaps/png/ease-normal24.png new file mode 100644 index 0000000..e8c7136 Binary files /dev/null and b/app/bin/bitmaps/png/ease-normal24.png differ diff --git a/app/bin/bitmaps/png/ease-normal32.png b/app/bin/bitmaps/png/ease-normal32.png new file mode 100644 index 0000000..6dde86d Binary files /dev/null and b/app/bin/bitmaps/png/ease-normal32.png differ diff --git a/app/bin/bitmaps/png/ease-sharp16.png b/app/bin/bitmaps/png/ease-sharp16.png new file mode 100644 index 0000000..5c79b51 Binary files /dev/null and b/app/bin/bitmaps/png/ease-sharp16.png differ diff --git a/app/bin/bitmaps/png/ease-sharp24.png b/app/bin/bitmaps/png/ease-sharp24.png new file mode 100644 index 0000000..537050e Binary files /dev/null and b/app/bin/bitmaps/png/ease-sharp24.png differ diff --git a/app/bin/bitmaps/png/ease-sharp32.png b/app/bin/bitmaps/png/ease-sharp32.png new file mode 100644 index 0000000..48c7d39 Binary files /dev/null and b/app/bin/bitmaps/png/ease-sharp32.png differ diff --git a/app/bin/bitmaps/png/elevation16.png b/app/bin/bitmaps/png/elevation16.png new file mode 100644 index 0000000..9121d56 Binary files /dev/null and b/app/bin/bitmaps/png/elevation16.png differ diff --git a/app/bin/bitmaps/png/exit16.png b/app/bin/bitmaps/png/exit16.png new file mode 100644 index 0000000..ba227c3 Binary files /dev/null and b/app/bin/bitmaps/png/exit16.png differ diff --git a/app/bin/bitmaps/png/exit24.png b/app/bin/bitmaps/png/exit24.png new file mode 100644 index 0000000..d3ebf2f Binary files /dev/null and b/app/bin/bitmaps/png/exit24.png differ diff --git a/app/bin/bitmaps/png/extend16.png b/app/bin/bitmaps/png/extend16.png new file mode 100644 index 0000000..957c8f4 Binary files /dev/null and b/app/bin/bitmaps/png/extend16.png differ diff --git a/app/bin/bitmaps/png/palette.png b/app/bin/bitmaps/png/palette.png new file mode 100644 index 0000000..efcf3d3 Binary files /dev/null and b/app/bin/bitmaps/png/palette.png differ diff --git a/app/bin/bitmaps/png/pan-zoom16.png b/app/bin/bitmaps/png/pan-zoom16.png new file mode 100644 index 0000000..04d18f7 Binary files /dev/null and b/app/bin/bitmaps/png/pan-zoom16.png differ diff --git a/app/bin/bitmaps/png/pan-zoom24.png b/app/bin/bitmaps/png/pan-zoom24.png new file mode 100644 index 0000000..67ab631 Binary files /dev/null and b/app/bin/bitmaps/png/pan-zoom24.png differ diff --git a/app/bin/bitmaps/png/ruler16.png b/app/bin/bitmaps/png/ruler16.png new file mode 100644 index 0000000..ec94bf3 Binary files /dev/null and b/app/bin/bitmaps/png/ruler16.png differ diff --git a/app/bin/bitmaps/png/select16.png b/app/bin/bitmaps/png/select16.png new file mode 100644 index 0000000..39605d1 Binary files /dev/null and b/app/bin/bitmaps/png/select16.png differ diff --git a/app/bin/bitmaps/png/snap-curs16.png b/app/bin/bitmaps/png/snap-curs16.png new file mode 100644 index 0000000..acf8f66 Binary files /dev/null and b/app/bin/bitmaps/png/snap-curs16.png differ diff --git a/app/bin/bitmaps/png/snap-curs24.png b/app/bin/bitmaps/png/snap-curs24.png new file mode 100644 index 0000000..15154a2 Binary files /dev/null and b/app/bin/bitmaps/png/snap-curs24.png differ diff --git a/app/bin/bitmaps/png/snap-grid16.png b/app/bin/bitmaps/png/snap-grid16.png new file mode 100644 index 0000000..381b451 Binary files /dev/null and b/app/bin/bitmaps/png/snap-grid16.png differ diff --git a/app/bin/bitmaps/png/snap-grid24.png b/app/bin/bitmaps/png/snap-grid24.png new file mode 100644 index 0000000..3073985 Binary files /dev/null and b/app/bin/bitmaps/png/snap-grid24.png differ diff --git a/app/bin/bitmaps/png/straight16.png b/app/bin/bitmaps/png/straight16.png new file mode 100644 index 0000000..d96aff7 Binary files /dev/null and b/app/bin/bitmaps/png/straight16.png differ diff --git a/app/bin/bitmaps/png/turntable16.png b/app/bin/bitmaps/png/turntable16.png new file mode 100644 index 0000000..181abf3 Binary files /dev/null and b/app/bin/bitmaps/png/turntable16.png differ diff --git a/app/bin/bitmaps/polygon.xpm b/app/bin/bitmaps/polygon.xpm deleted file mode 100644 index cce796a..0000000 --- a/app/bin/bitmaps/polygon.xpm +++ /dev/null @@ -1,89 +0,0 @@ -static char *polygon_x16[] = { - "16 16 2 1", - " c None", - "0 c #000000", - " ", - " 000000000 ", - " 000 00 ", - " 00 00 ", - " 0 00 ", - " 0 00 ", - "00 00", - " 0 00", - " 0 00", - " 00 00", - " 0 00", - " 0 00", - " 000 00", - " 000 000", - " 000000000 ", - " 00 "}; - -static char *polygon_x24[] = { - "24 24 2 1", - " c None", - "0 c #000000", - " ", - " 00000 ", - " 0000000000 00 ", - " 000 00 ", - " 0 0 ", - " 00 0 ", - " 0 0 ", - " 00 0 ", - " 00 0 ", - " 0 0 ", - " 0 0 ", - " 00 0 ", - " 0 0 ", - " 0 0 ", - " 00 0 ", - " 0 0 ", - " 0 0 ", - " 00 0 ", - " 00 0 ", - " 00 0 ", - " 000 0000 ", - " 000 000000 ", - " 000000 ", - " "}; - -static char *polygon_x32[] = { - "32 32 2 1", - " c None", - "0 c #000000", - " ", - " 000 ", - " 000000000000 ", - " 00000000000000 000 ", - " 000000 000 ", - " 000 000 ", - " 00 000 ", - " 00 00 ", - " 000 000 ", - " 00 000 ", - " 00 000 ", - " 00 000 ", - " 00 000 ", - " 00 00 ", - " 000 00 ", - " 00 00 ", - " 00 00 ", - " 000 00 ", - " 00 00 ", - " 00 00 ", - " 000 00 ", - " 00 00 ", - " 00 00 ", - " 000 00 ", - " 0000 00 ", - " 00000 00 ", - " 0000 00 ", - " 0000 0000000 ", - " 0000 0000000000 ", - " 00000000000 ", - " 0000 ", - " "}; - -static char **polygon_xpm[3] = { polygon_x16, polygon_x24, polygon_x32 }; - diff --git a/app/bin/bitmaps/polyline.xpm b/app/bin/bitmaps/polyline.xpm deleted file mode 100644 index 6611f44..0000000 --- a/app/bin/bitmaps/polyline.xpm +++ /dev/null @@ -1,92 +0,0 @@ -static char *polyline_x16[] = { - "16 16 3 1", - " c None", - "0 c #000000", - "1 c #0000FF", - " ", - " 1 ", - " 1 1 ", - "11111 11 ", - " 1 1111 11 ", - " 1 11 1 ", - " 1 11", - " 11 11", - " 11 11", - " 1 1 ", - " 11 11 ", - " 11 1 ", - " 11 11 ", - " 1 11111 ", - " 11111 ", - " "}; - -static char *polyline_x24[] = { - "24 24 3 1", - " c None", - "0 c #000000", - "1 c #0000FF", - " ", - " ", - " 1 ", - " 11 ", - " 111 1 ", - " 111111 11 ", - " 11 1111 11 ", - " 11 1111 1 ", - " 1 1 11 ", - " 1 11 ", - " 1 1 ", - " 11 1 ", - " 11 1 ", - " 1 11 ", - " 1 1 ", - " 1 11 ", - " 1 1 ", - " 11 11 ", - " 11 1 ", - " 11 1 ", - " 1 111111 ", - " 111111 ", - " ", - " "}; - -static char *polyline_x32[] = { - "32 32 3 1", - " c None", - "0 c #000000", - "1 c #0000FF", - " ", - " ", - " ", - " 11 ", - " 111 ", - " 111 11 ", - " 111111 11 ", - " 111111111 11 ", - " 11 11111 11 ", - " 11 111111 11 ", - " 11 1111 11 ", - " 11 1 11 ", - " 11 11 ", - " 11 11 ", - " 11 11 ", - " 11 11 ", - " 11 11 ", - " 11 11 ", - " 11 11 ", - " 11 111 ", - " 11 11 ", - " 111 111 ", - " 111 11 ", - " 111 11 ", - " 11 11 ", - " 11 11 ", - " 11 1111 ", - " 111 1111111111 ", - " 1111111111 ", - " 11 ", - " ", - " "}; - -static char **polyline_xpm[3] = { polyline_x16, polyline_x24, polyline_x32 }; - diff --git a/app/bin/bitmaps/profile.xpm b/app/bin/bitmaps/profile.xpm deleted file mode 100644 index d446bb4..0000000 --- a/app/bin/bitmaps/profile.xpm +++ /dev/null @@ -1,121 +0,0 @@ -static char *profile_x16[] = { - "16 16 12 1", - " c None", - "0 c #000000", - "1 c #003333", - "2 c #333333", - "3 c #336666", - "4 c #336699", - "5 c #339999", - "6 c #669999", - "7 c #6699CC", - "8 c #66CCCC", - "9 c #66CCFF", - "A c #99CCFF", - " ", - " 0 ", - " 262 ", - " 05A71 ", - " 05A92 20120 ", - "004AA82238A98300", - " 05AAA58AAAAA50 ", - "005AAAAAAAAAA500", - "004AAAAAAAAAA400", - " 05AAAAAAAAAA50 ", - "004AAAAAAAAAA400", - " 05AAAAAAAAAA50 ", - " 00000000000000 ", - " 0 00 0 0 0 ", - " 0 0 0 ", - " "}; - -static char *profile_x24[] = { - "24 24 13 1", - " c None", - "0 c #000000", - "1 c #003333", - "2 c #333333", - "3 c #333366", - "4 c #336666", - "5 c #336699", - "6 c #339999", - "7 c #669999", - "8 c #6699CC", - "9 c #66CCCC", - "A c #66CCFF", - "B c #99CCFF", - " ", - " ", - " 0 ", - " 1481 ", - " 04AB81 ", - " 06BBA4 ", - " 06BBB92 11210 ", - " 006BBBB50 128AA8630000", - "0006BBBBA3128ABBBBBB5000", - " 06BBBBB87ABBBBBBBB60 ", - " 06BBBBBBBBBBBBBBBB60 ", - " 006BBBBBBBBBBBBBBBB5000", - " 006BBBBBBBBBBBBBBBB5000", - " 06BBBBBBBBBBBBBBBB60 ", - " 06BBBBBBBBBBBBBBBB60 ", - "0006BBBBBBBBBBBBBBBB5000", - " 06BBBBBBBBBBBBBBBB60 ", - " 06BBBBBBBBBBBBBBBB60 ", - " 01444444444444444410 ", - " 000000000000000000 ", - " 0 00 0 0 00 ", - " 0 0 00 ", - " ", - " "}; - -static char *profile_x32[] = { - "32 32 13 1", - " c None", - "0 c #000000", - "1 c #003333", - "2 c #333333", - "3 c #333366", - "4 c #336666", - "5 c #336699", - "6 c #339999", - "7 c #669999", - "8 c #6699CC", - "9 c #66CCCC", - "A c #66CCFF", - "B c #99CCFF", - " ", - " ", - " ", - " 00 ", - " 2683 ", - " 029BB82 ", - " 06BBBB4 ", - " 06BBBBA2 ", - " 06BBBBB50 11200 ", - " 06BBBBBA1 017AA8511200 ", - " 0006BBBBBB83 016ABBBBBBA93000 ", - " 0006BBBBBBA2025ABBBBBBBBBB4000 ", - " 06BBBBBBB94ABBBBBBBBBBBB40 ", - " 06BBBBBBBBBBBBBBBBBBBBBB40 ", - " 06BBBBBBBBBBBBBBBBBBBBBB40 ", - " 0006BBBBBBBBBBBBBBBBBBBBBB4000 ", - " 0006BBBBBBBBBBBBBBBBBBBBBB4000 ", - " 06BBBBBBBBBBBBBBBBBBBBBB40 ", - " 06BBBBBBBBBBBBBBBBBBBBBB40 ", - " 06BBBBBBBBBBBBBBBBBBBBBB40 ", - " 0006BBBBBBBBBBBBBBBBBBBBBB4000 ", - " 0006BBBBBBBBBBBBBBBBBBBBBB4000 ", - " 06BBBBBBBBBBBBBBBBBBBBBB40 ", - " 06BBBBBBBBBBBBBBBBBBBBBB40 ", - " 04888888888888888888888830 ", - " 00000000000000000000000000 ", - " 00 00 00 00 00 ", - " 00 0 00 0 00 ", - " 00 00 00 ", - " ", - " ", - " "}; - -static char **profile_xpm[3] = { profile_x16, profile_x24, profile_x32 }; - diff --git a/app/bin/bitmaps/protractor.xpm b/app/bin/bitmaps/protractor.xpm deleted file mode 100644 index 43fa250..0000000 --- a/app/bin/bitmaps/protractor.xpm +++ /dev/null @@ -1,99 +0,0 @@ -static char *protractor_x16[] = { - "16 16 5 1", - " c None", - "0 c #000000", - "1 c #660000", - "2 c #990000", - "3 c #CC0000", - " ", - " 00 ", - " 00 ", - " 00 ", - " 0 ", - " 0 ", - " 01 ", - " 0033 ", - " 00 3 ", - " 00 33 ", - " 0 3 ", - " 000 3 ", - " 00000023 ", - " 000000 ", - " 00000 ", - " 0 "}; - -static char *protractor_x24[] = { - "24 24 6 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #660000", - "3 c #CC0000", - "4 c #800000", - " ", - " 00 ", - " 000 ", - " 000 ", - " 00 ", - " 000 ", - " 000 ", - " 000 ", - " 000 ", - " 010 ", - " 00033 ", - " 000 3 ", - " 000 33 ", - " 000 3 ", - " 000 3 ", - " 000 33 ", - " 000 33 ", - " 000000 33 ", - " 00000000 33 ", - " 00000042 ", - " 00000000 ", - " 0000000 ", - " 0000 ", - " "}; - -static char *protractor_x32[] = { - "32 32 5 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #990000", - "3 c #CC0000", - " ", - " 0 ", - " 000 ", - " 000 ", - " 000 ", - " 0000 ", - " 0000 ", - " 0000 ", - " 000 ", - " 000 ", - " 0000 ", - " 0000 ", - " 0001 ", - " 00033 ", - " 000 33 ", - " 0000 33 ", - " 0000 33 ", - " 0000 333 ", - " 0000 33 ", - " 000 33 ", - " 000 333 ", - " 0000 333 ", - " 00000 33 ", - " 000000000 33 ", - " 0000000000 333 ", - " 00000000023 ", - " 0000000000 ", - " 000000000 ", - " 000000000 ", - " 0000000 ", - " 00 ", - " "}; - -static char **protractor_xpm[3] = { protractor_x16, protractor_x24, protractor_x32 }; - diff --git a/app/bin/bitmaps/redo.xpm b/app/bin/bitmaps/redo.xpm deleted file mode 100644 index 045a8f2..0000000 --- a/app/bin/bitmaps/redo.xpm +++ /dev/null @@ -1,104 +0,0 @@ -static char *redo_x16[] = { - "16 16 7 1", - " c None", - "0 c #000000", - "1 c #006600", - "2 c #009900", - "3 c #00CC00", - "4 c #00FF00", - "5 c #008000", - " ", - " 1 ", - " 151 ", - " 11425 ", - " 1553344355 ", - " 5244444435 ", - " 5344511425 ", - " 5435 151 ", - " 5345 1 ", - " 145 ", - " 1235 ", - " 135 ", - " 525 ", - " 521 ", - " 51 ", - " "}; - -static char *redo_x24[] = { - "24 24 7 1", - " c None", - "0 c #000000", - "1 c #006600", - "2 c #009900", - "3 c #00CC00", - "4 c #00FF00", - "5 c #008000", - " ", - " ", - " 1 ", - " 151 ", - " 5425 ", - " 11544351 ", - " 552234444425 ", - " 553444444444425 ", - " 524444444444455 ", - " 52444421124435 ", - " 5444351 2455 ", - " 544425 55 ", - " 54421 5 ", - " 53435 ", - " 1445 ", - " 12435 ", - " 5345 ", - " 5335 ", - " 5421 ", - " 545 ", - " 141 ", - " 155 ", - " ", - " "}; - -static char *redo_x32[] = { - "32 32 7 1", - " c None", - "0 c #000000", - "1 c #006600", - "2 c #009900", - "3 c #00CC00", - "4 c #00FF00", - "5 c #008000", - " ", - " ", - " ", - " 1 ", - " 151 ", - " 2425 ", - " 244351 ", - " 1152444425 ", - " 552233444444355 ", - " 553444444444444425 ", - " 534444444444444435 ", - " 1244444444444444425 ", - " 5244444435113444351 ", - " 544444211 134425 ", - " 53444451 13351 ", - " 1244445 155 ", - " 544445 15 ", - " 54442 ", - " 534435 ", - " 14445 ", - " 54431 ", - " 13441 ", - " 53435 ", - " 5445 ", - " 1445 ", - " 5435 ", - " 5431 ", - " 542 ", - " 531 ", - " 111 ", - " ", - " "}; - -static char **redo_xpm[3] = { redo_x16, redo_x24, redo_x32 }; - diff --git a/app/bin/bitmaps/reflect.xpm b/app/bin/bitmaps/reflect.xpm deleted file mode 100644 index 47adaad..0000000 --- a/app/bin/bitmaps/reflect.xpm +++ /dev/null @@ -1,115 +0,0 @@ -static char *reflect_x16[] = { - "16 16 12 1", - " c None", - "0 c #000000", - "1 c #003333", - "2 c #006699", - "3 c #0099CC", - "4 c #333333", - "5 c #3399CC", - "6 c #33CCCC", - "7 c #33CCFF", - "8 c #666666", - "9 c #66CCFF", - "A c #99CCFF", - " ", - " 00 ", - " 00 ", - "33 00 00", - "3553 00 0040", - "36965 00 04840", - "36AA95 00 048840", - "36AAA95200888840", - "36AAA95100488840", - "36AA75 00 048840", - "36955 00 04840", - "3553 00 040", - "33 00 00", - " 00 ", - " 00 ", - " "}; - -static char *reflect_x24[] = { - "24 24 10 1", - " c None", - "0 c #000000", - "1 c #0099CC", - "2 c #333333", - "3 c #3399CC", - "4 c #33CCCC", - "5 c #33CCFF", - "6 c #666666", - "7 c #66CCFF", - "8 c #99CCFF", - " ", - " ", - " 00 ", - " 00 ", - " 1 00 0 ", - " 13 00 00 ", - " 1733 00 0060 ", - " 17753 00 02660 ", - " 178873 00 066660 ", - " 17888733 00 02666660 ", - " 178888773 00 026666660 ", - " 1788888873000266666660 ", - " 178888873 00 066666660 ", - " 17888873 00 02666660 ", - " 1788873 00 0266660 ", - " 178743 00 026660 ", - " 17731 00 0660 ", - " 173 00 060 ", - " 13 00 00 ", - " 1 00 0 ", - " 00 ", - " 00 ", - " ", - " "}; - -static char *reflect_x32[] = { - "32 32 10 1", - " c None", - "0 c #000000", - "1 c #0099CC", - "2 c #333333", - "3 c #3399CC", - "4 c #33CCCC", - "5 c #33CCFF", - "6 c #666666", - "7 c #66CCFF", - "8 c #99CCFF", - " ", - " ", - " ", - " 00 ", - " 00 ", - " 00 ", - " 1 00 00 ", - " 133 00 020 ", - " 14733 00 02620 ", - " 148753 00 026620 ", - " 1488873 00 0666620 ", - " 148888733 00 026666620 ", - " 1488888773 00 0266666620 ", - " 14888888873 00 006666666620 ", - " 1488888888733 00 0266666666620 ", - " 1488888888871 0002666666666620 ", - " 148888888873 00 0266666666620 ", - " 14888888873 00 06666666620 ", - " 1488888873 00 0266666620 ", - " 148888873 00 026666620 ", - " 14888743 00 02666620 ", - " 1488731 00 266620 ", - " 14873 00 06620 ", - " 1473 00 0220 ", - " 133 00 000 ", - " 3 00 00 ", - " 00 ", - " 00 ", - " 00 ", - " ", - " ", - " "}; - -static char **reflect_xpm[3] = { reflect_x16, reflect_x24, reflect_x32 }; - diff --git a/app/bin/bitmaps/rotate.xpm b/app/bin/bitmaps/rotate.xpm deleted file mode 100644 index d41ca61..0000000 --- a/app/bin/bitmaps/rotate.xpm +++ /dev/null @@ -1,148 +0,0 @@ -static char *rotate_x16[] = { - "16 16 24 1", - " c None", - "0 c #000000", - "1 c #0066CC", - "2 c #0099CC", - "3 c #00CCCC", - "4 c #00CCFF", - "5 c #00FFFF", - "6 c #336699", - "7 c #3399CC", - "8 c #33CCCC", - "9 c #33CCFF", - "A c #6699CC", - "B c #66CCCC", - "C c #66CCFF", - "D c #996666", - "E c #999999", - "F c #99CCCC", - "G c #CC0000", - "H c #CC3333", - "I c #CC3366", - "J c #CC6666", - "K c #CC9999", - "L c #C0C0C0", - "M c #808080", - " 1 ", - "525435 ", - " 2437HG ", - "52543KGGG ", - " 1 11 GG ", - "52543 GG ", - " 2432 GGG ", - "52543 GG G ", - " 2432 G G ", - "52543BGG GGGG ", - " 298AH GGJ ", - "52BAJEEMEMEMEDE ", - " 2BIAEEMEMEMEME ", - " 2CB7FLLL L L L ", - " MMMMMMMMMMMMMM", - " LLLL L L L L "}; - -static char *rotate_x24[] = { - "24 24 19 1", - " c None", - "0 c #000000", - "1 c #0066CC", - "2 c #0099CC", - "3 c #00CCCC", - "4 c #00CCFF", - "5 c #00FFFF", - "6 c #33CCFF", - "7 c #33FFFF", - "8 c #669999", - "9 c #6699CC", - "A c #66FFFF", - "B c #996699", - "C c #999999", - "D c #CC0000", - "E c #CC3333", - "F c #CC9999", - "G c #C0C0C0", - "H c #808080", - " ", - " 1 1 ", - " 5155525 ", - " 1 1 ", - " 1 32FDDDDD ", - " 5155525 DDD ", - " 1 1 DD ", - " 1 32 DD ", - " 5155525 DDDD ", - " 1 1 DD D ", - " 5155425 D ", - " 5155425 DD DD ", - " 1 1 DD ", - " 5155525 DD D DD ", - " 1 32 DD DD DDD ", - " 1 1 D DDD ", - " 515752FD G G G FEDG ", - " 18CCBCHHCHHCHCCHCHHCH ", - " 1HCEBCHHCHHCHCCHCHHCH ", - " 515562A G GG GG GG G ", - " 1 G91G G GG GG GG G ", - " HHHHHHHHHHHHHHHHHHHH ", - " CH C HC CC CC CC CC ", - " "}; - -static char *rotate_x32[] = { - "32 32 22 1", - " c None", - "0 c #000000", - "1 c #0066CC", - "2 c #0099CC", - "3 c #00CCCC", - "4 c #00CCFF", - "5 c #00FFFF", - "6 c #3399CC", - "7 c #33FFFF", - "8 c #66CCCC", - "9 c #66FFFF", - "A c #996666", - "B c #996699", - "C c #999999", - "D c #99CCCC", - "E c #CC0000", - "F c #CC3333", - "G c #CC3366", - "H c #CC6666", - "I c #CC9999", - "J c #C0C0C0", - "K c #808080", - " ", - " 1 1 ", - " 32 32 ", - " 552555525 ", - " 1 1 ", - " 1 1 EEEEEE ", - " 542555425FEEEEEEE ", - " 542555425 EEEEE ", - " 1 1 EEEE ", - " 1 1 EEE ", - " 552555525 EEE ", - " 32 32 EEEEE ", - " 1 1 EEE EEE ", - " 1 1 E EE ", - " 552555525 EE EEE ", - " 1 1 EEE EE ", - " 1 1 E EEE ", - " 1 1 EE EE E ", - " 552555525 EEE EE EE EEE ", - " 1 1 E EEEEEEEE ", - " 1 1 EE EEEEEE ", - " 32 732CEE EEEE ", - " 552577567C J J J JIE JJ ", - " 1KKCAGCCKKCKKKCKKKCKKKCKKCKK ", - " 1KKHEBCCKKCKKKCKKKCKKKCKKCK ", - " 542598C29D J J J JJ JJ ", - " 542599429D J J J JJ JJ ", - " 1 JJ 1JJ J J J JJ JJ ", - " KKKKKKKKKKKKKKKKKKKKKKKKKKK ", - " CC CC CC C KC CC CC ", - " J JJ J J J JJ JJ ", - " "}; - -static char **rotate_xpm[3] = { rotate_x16, rotate_x24, rotate_x32 }; - diff --git a/app/bin/bitmaps/ruler.xpm b/app/bin/bitmaps/ruler.xpm deleted file mode 100644 index 11dbde8..0000000 --- a/app/bin/bitmaps/ruler.xpm +++ /dev/null @@ -1,89 +0,0 @@ -static char *ruler_x16[] = { - "16 16 2 1", - " c None", - "0 c #000000", - " ", - " ", - " 0 ", - " 00 ", - " 0 ", - " 0 0 ", - " 0 0 ", - " 00 ", - " 0 00 0 00", - " 0 00 00 0 0 ", - " 0000 00 0 0 ", - " 000000 00 00 ", - " 000000 00 ", - " 0000 ", - " ", - " "}; - -static char *ruler_x24[] = { - "24 24 2 1", - " c None", - "0 c #000000", - " ", - " ", - " ", - " 0 ", - " 000 ", - " 000 ", - " 0 ", - " 0 ", - " 0 0 ", - " 0 0 ", - " 00 ", - " 00 ", - " 0 0 0 ", - " 0 0 0 0 ", - " 00 00 00 00 00 ", - " 000 00 00 00 0 ", - " 00000 0 0 0 ", - " 00000 0 00 ", - " 0000000 00 ", - " 0000000 ", - " 000 ", - " ", - " ", - " "}; - -static char *ruler_x32[] = { - "32 32 2 1", - " c None", - "0 c #000000", - " ", - " ", - " ", - " ", - " 00 ", - " 000 ", - " 00000 ", - " 00000 ", - " 000 ", - " 000 ", - " 00 000 ", - " 00 000 ", - " 000 000 ", - " 00 ", - " 00 ", - " 00 0 ", - " 000 0 ", - " 00 00 0 00 ", - " 00 0 0 000 ", - " 000 0 00 0 00 ", - " 0000 00 00 0 00 ", - " 00000000 0 00 00 ", - " 00000000 0 00 000 ", - " 00000000 0 00 ", - " 000000000 00 ", - " 00000000 000 ", - " 00000000 ", - " 000 ", - " ", - " ", - " ", - " "}; - -static char **ruler_xpm[3] = { ruler_x16, ruler_x24, ruler_x32 }; - diff --git a/app/bin/bitmaps/select.xpm b/app/bin/bitmaps/select.xpm deleted file mode 100644 index bd118c6..0000000 --- a/app/bin/bitmaps/select.xpm +++ /dev/null @@ -1,106 +0,0 @@ -static char *select_x16[] = { - "16 16 6 1", - " c None", - "0 c #000000", - "1 c #333300", - "2 c #CC0000", - "3 c #CC6600", - "4 c #FF9999", - " ", - " ", - " ", - " 3 3 3 3 3 3 3 ", - "000000000000000 ", - " 3 3 3 3 3 ", - " 3 3 3 3 3 ", - "010000 222 0000 ", - " 3 3 3 224 3 3 ", - " 2424 ", - " 424 ", - " 424 ", - " 424 ", - " 4 ", - " ", - " "}; - -static char *select_x24[] = { - "24 24 9 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #663300", - "3 c #996600", - "4 c #CC0000", - "5 c #CC3300", - "6 c #CC6600", - "7 c #CC9900", - " ", - " ", - " ", - " ", - " 7 7 7 7 ", - " 33 26 62 33 26 62 33 ", - "022012002102201200210220", - " 77 7 7 77 7 7 77 ", - " 77 7 7 56 56 7 77 ", - " 77 7 7 4444444 7 77 ", - "022012002144444440210220", - " 33 26 6344444 62 33 ", - " 7 7 44 444 7 ", - " 44 444 ", - " 44 444 ", - " 4 444 ", - " 444 ", - " 444 ", - " 44 ", - " ", - " ", - " ", - " ", - " "}; - -static char *select_x32[] = { - "32 32 8 1", - " c None", - "0 c #000000", - "1 c #333300", - "2 c #663300", - "3 c #996600", - "4 c #CC0000", - "5 c #CC6600", - "6 c #CC9900", - " ", - " ", - " ", - " ", - " ", - " ", - " 6 66 6 66 6 66 6 ", - " 031002300030003300332003200130 ", - " 000000000000000000000000000000 ", - " 52 35 5 55 353 53 25 ", - " 6 66 6 66 666 66 6 ", - " 6 66 6 44444444 66 6 ", - " 6 66 6 4444444444 66 6 ", - " 031002300030444444444403200130 ", - " 000000000000444444 00000000 ", - " 6 66 6 4444444 53 25 ", - " 6 6 6 444 4444 6 6 ", - " 444 4444 ", - " 444 4444 ", - " 44 4444 ", - " 4 4444 ", - " 4444 ", - " 4444 ", - " 4444 ", - " 444 ", - " 4 ", - " ", - " ", - " ", - " ", - " ", - " "}; - -static char **select_xpm[3] = { select_x16, select_x24, select_x32 }; - diff --git a/app/bin/bitmaps/sensor.xpm b/app/bin/bitmaps/sensor.xpm deleted file mode 100644 index 207f4c4..0000000 --- a/app/bin/bitmaps/sensor.xpm +++ /dev/null @@ -1,138 +0,0 @@ -static char *sensor_x16[] = { - "16 16 18 1", - " c None", - "0 c #000000", - "1 c #00CCCC", - "2 c #336666", - "3 c #339966", - "4 c #339999", - "5 c #33CC99", - "6 c #33CCCC", - "7 c #666666", - "8 c #669966", - "9 c #669999", - "A c #66CCCC", - "B c #999999", - "C c #99CCCC", - "D c #CCCCCC", - "E c #CCFFCC", - "F c #CCFFFF", - "G c #FFFFFF", - " 77 ", - " 27444478 ", - " 941111114B ", - " 9GA111111AG9 ", - " 34AGA1111AGA43 ", - " 311AGA116GA114 ", - "74111AGA6GC11147", - "741111AGFC111143", - "7411111FGA111153", - "741111FCAGA11147", - " 3111EE11AGA1147", - " 341DF1111AGA53 ", - " 3CF111111AG9 ", - " 2D51111115BB ", - " 34455443 ", - " 773377 "}; - -static char *sensor_x24[] = { - "24 24 17 1", - " c None", - "0 c #000000", - "1 c #00CCCC", - "2 c #336666", - "3 c #339966", - "4 c #339999", - "5 c #33CC99", - "6 c #33CCCC", - "7 c #666666", - "8 c #669999", - "9 c #66CCCC", - "A c #999999", - "B c #99CCCC", - "C c #CCCCCC", - "D c #CCFFCC", - "E c #CCFFFF", - "F c #FFFFFF", - " ", - " 72777727 ", - " 734511115432 ", - " 34111111111143 ", - " 8D111111111111BC ", - " 3BFE11111111119F63 ", - " 241BFE111111119F6143 ", - " 3111BFE1111119F91114 ", - " 741111BFE11116F9111153 ", - " 7111111BFE116F91111112 ", - " 71111111DFE6EB11111114 ", - " 311111111DFFB1111111147", - " 3111111111FFD1111111147", - " 311111111EBDFD111111147", - " 71111111DD11DFD1111113 ", - " 2411111DD1111DFD111152 ", - " 741111BE111111DFD11147 ", - " 3411BE11111111DFD153 ", - " 31BE6111111111DFD3 ", - " 7AE611111111111DC2 ", - " 8841111111111532 ", - " 345111111543 ", - " 7234444327 ", - " 77 "}; - -static char *sensor_x32[] = { - "32 32 20 1", - " c None", - "0 c #000000", - "1 c #00CCCC", - "2 c #336666", - "3 c #339966", - "4 c #339999", - "5 c #33CC99", - "6 c #33CCCC", - "7 c #666666", - "8 c #669999", - "9 c #66CC99", - "A c #66CCCC", - "B c #999999", - "C c #99CC99", - "D c #99CCCC", - "E c #CCCCCC", - "F c #CCFFCC", - "G c #CCFFFF", - "H c #FFFFFF", - "I c #C0C0C0", - " ", - " 7777777777 ", - " 77777344477777 ", - " 777744111111543777 ", - " 77741111111111114377 ", - " 7B81111111111111111CB7 ", - " 77GHA11111111111111AHHB7 ", - " 774GHHA111111111111AHHG477 ", - " 7711GHHA1111111111AHHG11477 ", - " 774111GHHA111111116HHG111577 ", - " 7311111GHHA1111116HHG61111477 ", - " 774111111GHHA11116GHH611111577 ", - " 7751111116GHHA111GHH6111111177 ", - " 77111111116GHH61GHHA1111111147 ", - " 741111111116GHHGHHA11111111147 ", - " 7411111111116GHHHA1111111111477", - " 7411111111111DHHH61111111111477", - " 741111111111DHHHHH6111111111477", - " 73111111111DHHD6GHH61111111147 ", - " 7711111111DHHD116GHH6111111137 ", - " 774111111AHHE11116GHH611111577 ", - " 7411111AHHF1111116HHH61111477 ", - " 774111AHHG111111116HHG611177 ", - " 774116HHG11111111116HHG61477 ", - " 7746HHG6111111111116HHG577 ", - " 77GHG611111111111116HHB77 ", - " 7BG61111111111111119I77 ", - " 7774511111111111114777 ", - " 7774511111111547777 ", - " 7777344444437777 ", - " 777777777777 ", - " 7777 "}; - -static char **sensor_xpm[3] = { sensor_x16, sensor_x24, sensor_x32 }; - diff --git a/app/bin/bitmaps/signal.xpm b/app/bin/bitmaps/signal.xpm deleted file mode 100644 index 66f55c7..0000000 --- a/app/bin/bitmaps/signal.xpm +++ /dev/null @@ -1,106 +0,0 @@ -static char *signal_x16[] = { - "16 16 7 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #660000", - "3 c #CC0033", - "4 c #FF0033", - "5 c #800000", - " 00 ", - " 23321 ", - " 144441 ", - " 144445 ", - " 144441 ", - " 23321 ", - " 00 ", - " 00 ", - " 00 ", - " 00 ", - " 00 ", - " 00 ", - " 00 ", - " 00 ", - " 00 ", - " 0000000000 "}; - -static char *signal_x24[] = { - "24 24 8 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #660000", - "3 c #990033", - "4 c #CC0033", - "5 c #FF0033", - "6 c #800000", - " ", - " 11110 ", - " 12555562 ", - " 15555552 ", - " 0655555541 ", - " 0355555541 ", - " 155555560 ", - " 13555541 ", - " 123321 ", - " 00 ", - " 00 ", - " 00 ", - " 00 ", - " 00 ", - " 00 ", - " 00 ", - " 00 ", - " 00 ", - " 00 ", - " 00 ", - " 00 ", - " 00 ", - " 00000000000000 ", - " 00000000000000 "}; - -static char *signal_x32[] = { - "32 32 8 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #660000", - "3 c #990033", - "4 c #CC0033", - "5 c #FF0033", - "6 c #800000", - " ", - " 000000 ", - " 0001662000 ", - " 00355554100 ", - " 003555555400 ", - " 015555555560 ", - " 0655555555400 ", - " 0655555555300 ", - " 005555555520 ", - " 006555555300 ", - " 0064554600 ", - " 00000000 ", - " 000000 ", - " 00 ", - " 00 ", - " 00 ", - " 00 ", - " 00 ", - " 00 ", - " 00 ", - " 00 ", - " 00 ", - " 00 ", - " 00 ", - " 00 ", - " 00 ", - " 00 ", - " 00 ", - " 00 ", - " 000000000000000000 ", - " 000000000000000000 ", - " 000000000000000000 "}; - -static char **signal_xpm[3] = { signal_x16, signal_x24, signal_x32 }; - diff --git a/app/bin/bitmaps/snap-curs.xpm b/app/bin/bitmaps/snap-curs.xpm deleted file mode 100644 index 08b93d0..0000000 --- a/app/bin/bitmaps/snap-curs.xpm +++ /dev/null @@ -1,102 +0,0 @@ -static char *snap_curs_x16[] = { - "16 16 4 1", - " c None", - "0 c #000000", - "1 c #00CC00", - "2 c #808080", - " 1 1 1 1 ", - "1 1 1 1 1 1 1 1 ", - " 10000 1 1 ", - " 002 ", - " 0202 1 1 ", - "1 0 202 1 1 1 1 ", - " 1 202 1 1 ", - " 202 ", - " 1 1 201 1 ", - "1 1 1 1 1 1 1 1 ", - " 1 1 1 1 ", - " ", - " 1 1 1 1 ", - "1 1 1 1 1 1 1 1 ", - " 1 1 1 1 ", - " "}; - -static char *snap_curs_x24[] = { - "24 24 5 1", - " c None", - "0 c #000000", - "1 c #00CC00", - "2 c #330033", - "3 c #808080", - " ", - " ", - " ", - " 11 11 11 11 ", - " 1 1 1 1 1 1 1 1 ", - " 1 1 1 1 1 1 1 1 ", - " 11222222 11 11 ", - " 022223 ", - " 22223 ", - " 02223 ", - " 11023303 11 11 ", - " 1 031 3031 1 1 1 ", - " 1 1 303 1 1 1 ", - " 11 11 3031 11 ", - " 303 ", - " 30 ", - " ", - " 11 11 11 11 ", - " 1 1 1 1 1 1 1 1 ", - " 1 1 1 1 1 1 1 1 ", - " 11 11 11 11 ", - " ", - " ", - " "}; - -static char *snap_curs_x32[] = { - "32 32 10 1", - " c None", - "0 c #000000", - "1 c #006600", - "2 c #009900", - "3 c #00CC00", - "4 c #330000", - "5 c #330033", - "6 c #333300", - "7 c #333333", - "8 c #008000", - " ", - " 333 33 333 ", - " 33333 333333 33333 ", - " 33 33 3 3 33 3 ", - " 3 4413 33 33 33 3 ", - " 3 5555555555554 33 33 3 ", - " 33 455555555555 3 3 3 ", - " 33355555555583333 33333 ", - " 3555555555 ", - " 55555555 ", - " 555555554 ", - " 5555555554 ", - " 45555455551 ", - " 33335554 555583 33333 ", - " 33 554 155563 3 33 ", - " 3 68 33555513 33 3 ", - " 3 83 33 55556 33 3 ", - " 3 33 3 45555 33 3 ", - " 33 33 333327555 33 33 ", - " 333 3333455554 333 ", - " 55554 ", - " 55554 ", - " 555 ", - " 54 ", - " 3333 3333 3333 ", - " 33 3 33 33 33 33 ", - " 3 3 3 33 33 3 ", - " 3 3 33 33 33 3 ", - " 3 3 3 33 33 3 ", - " 3 3 33 33 33 33 ", - " 333 3333 3333 ", - " "}; - -static char **snap_curs_xpm[3] = { snap_curs_x16, snap_curs_x24, snap_curs_x32 }; - diff --git a/app/bin/bitmaps/snap-grid.xpm b/app/bin/bitmaps/snap-grid.xpm deleted file mode 100644 index 1139051..0000000 --- a/app/bin/bitmaps/snap-grid.xpm +++ /dev/null @@ -1,92 +0,0 @@ -static char *snap_grid_x16[] = { - "16 16 3 1", - " c None", - "0 c #000000", - "1 c #00CC00", - " ", - " 1111111111111 ", - " 1 1 1 1 1 ", - " 1 1 1 1 1 ", - " 1111111111111 ", - " 1 1 1 1 1 ", - " 1 1 1 1 1 ", - " 1111111111111 ", - " 1 1 1 1 1 ", - " 1 1 1 1 1 ", - " 1111111111111 ", - " 1 1 1 1 1 ", - " 1 1 1 1 1 ", - " 1111111111111 ", - " ", - " "}; - -static char *snap_grid_x24[] = { - "24 24 3 1", - " c None", - "0 c #000000", - "1 c #00CC00", - " ", - " 111111111111111111111 ", - " 1 1 1 1 1 ", - " 1 1 1 1 1 ", - " 1 1 1 1 1 ", - " 1 1 1 1 1 ", - " 111111111111111111111 ", - " 1 1 1 1 1 ", - " 1 1 1 1 1 ", - " 1 1 1 1 1 ", - " 1 1 1 1 1 ", - " 111111111111111111111 ", - " 1 1 1 1 1 ", - " 1 1 1 1 1 ", - " 1 1 1 1 1 ", - " 1 1 1 1 1 ", - " 111111111111111111111 ", - " 1 1 1 1 1 ", - " 1 1 1 1 1 ", - " 1 1 1 1 1 ", - " 1 1 1 1 1 ", - " 111111111111111111111 ", - " ", - " "}; - -static char *snap_grid_x32[] = { - "32 32 3 1", - " c None", - "0 c #000000", - "1 c #00CC00", - " ", - " 1111111111111111111111111111111", - " 11 11 11 11 1 ", - " 1 11 11 1 1 ", - " 1 11 11 1 1 ", - " 1 11 11 1 1 ", - " 1 11 11 1 1 ", - " 1 11 11 1 1 ", - " 111111111111111111111111111111 ", - " 111111111111111111111111111111 ", - " 1 11 11 1 1 ", - " 1 11 11 1 1 ", - " 1 11 11 1 1 ", - " 1 11 11 1 1 ", - " 1 11 11 1 1 ", - " 11 11 11 11 1 ", - " 111111111111111111111111111111 ", - " 1 11 11 1 1 ", - " 1 11 11 1 1 ", - " 1 11 11 1 1 ", - " 1 11 11 1 1 ", - " 1 11 11 1 1 ", - " 11 11 11 11 1 ", - " 111111111111111111111111111111 ", - " 1 11 11 1 1 ", - " 1 11 11 1 1 ", - " 1 11 11 1 1 ", - " 1 11 11 1 1 ", - " 1 11 11 1 1 ", - " 1 11 11 1 1 ", - " 1111111111111111111111111111111", - " "}; - -static char **snap_grid_xpm[3] = { snap_grid_x16, snap_grid_x24, snap_grid_x32 }; - diff --git a/app/bin/bitmaps/split-draw.xpm b/app/bin/bitmaps/split-draw.xpm deleted file mode 100644 index 3e94832..0000000 --- a/app/bin/bitmaps/split-draw.xpm +++ /dev/null @@ -1,95 +0,0 @@ -static char *split_draw_x16[] = { - "16 16 4 1", - " c None", - "0 c #000000", - "1 c #CC0000", - "2 c #808080", - " ", - " 2 ", - " 2 ", - " 2 ", - " 1 2 ", - " 11 2 ", - " 11 2 ", - " 111122 ", - " 2 111 ", - " 221111 ", - " 22 11 ", - " 22 11 ", - " 22 ", - " 22 ", - " 22 ", - " "}; - -static char *split_draw_x24[] = { - "24 24 4 1", - " c None", - "0 c #000000", - "1 c #CC0000", - "2 c #808080", - " ", - " 2 ", - " 22 ", - " 22 ", - " 2 ", - " 2 ", - " 11 2 ", - " 11 2 ", - " 11 2 ", - " 11 2 ", - " 111111 2 ", - " 11111 ", - " 11 ", - " 2 111111 ", - " 22 11 ", - " 22 1 ", - " 22 1 ", - " 22 1 ", - " 22 1 ", - " 22 ", - " 22 ", - " 22 ", - " 2 ", - " "}; - -static char *split_draw_x32[] = { - "32 32 4 1", - " c None", - "0 c #000000", - "1 c #CC0000", - "2 c #808080", - " ", - " ", - " 2 ", - " 222 ", - " 222 ", - " 222 ", - " 222 ", - " 222 ", - " 11 222 ", - " 11 222 ", - " 11 222 ", - " 11 222 ", - " 11 222 ", - " 11111 222 ", - " 11111111 22 ", - " 1111111 ", - " ", - " 22 11111111 ", - " 222 11111111 ", - " 222 11 ", - " 222 11 ", - " 22 11 ", - " 222 11 ", - " 222 11 ", - " 222 11 ", - " 222 ", - " 222 ", - " 222 ", - " 222 ", - " 22 ", - " ", - " "}; - -static char **split_draw_xpm[3] = { split_draw_x16, split_draw_x24, split_draw_x32 }; - diff --git a/app/bin/bitmaps/split.xpm b/app/bin/bitmaps/split.xpm deleted file mode 100644 index 1e0386a..0000000 --- a/app/bin/bitmaps/split.xpm +++ /dev/null @@ -1,107 +0,0 @@ -static char *split_x16[] = { - "16 16 10 1", - " c None", - "0 c #000000", - "1 c #666666", - "2 c #996666", - "3 c #999999", - "4 c #CC0000", - "5 c #CC3333", - "6 c #CC6666", - "7 c #C0C0C0", - "8 c #808080", - " ", - " 781 ", - " 71371 ", - " 4 83 88 ", - " 4 887317 ", - " 47887887 ", - " 444418718 ", - " 562 38 ", - " 38 17 ", - " 7317314444 ", - " 7887 834 ", - " 88 38 74 ", - " 38 313 4 ", - " 13313 ", - " 83 ", - " 7 "}; - -static char *split_x24[] = { - "24 24 7 1", - " c None", - "0 c #000000", - "1 c #666666", - "2 c #999999", - "3 c #CC0000", - "4 c #C0C0C0", - "5 c #808080", - " ", - " 4 1 ", - " 251 ", - " 4 124 ", - " 3 451 4211 ", - " 33 4 124 52 ", - " 33 451 44114 ", - " 334 154 55 ", - " 33451 44114 ", - " 333333154 52 ", - " 3333333 441144 ", - " 4 55 ", - " 421 144 ", - " 12 333 ", - " 21 44513333333 ", - " 12 55 33 ", - " 21 451 433 ", - " 12 55 33 ", - " 21 421 4 33 ", - " 12 52 3 ", - " 1 421 4 ", - " 52 ", - " 1 4 ", - " "}; - -static char *split_x32[] = { - "32 32 7 1", - " c None", - "0 c #000000", - "1 c #666666", - "2 c #999999", - "3 c #CC0000", - "4 c #C0C0C0", - "5 c #808080", - " ", - " ", - " 44 1 ", - " 25 ", - " 124 ", - " 4411 44 1 ", - " 33 55 421 ", - " 33 4 1144 52 ", - " 33 451 44 1 44 ", - " 33 15 25 ", - " 33 4 11 44 124 ", - " 33 421 421 4 ", - " 33333333 114 52 ", - " 33333333 1 4 1 44 ", - " 33333 411 ", - " 4 12 ", - " 421 11 4 ", - " 52 ", - " 4 1 44 333333333 ", - " 21 4411 33333333 ", - " 124 25 333 ", - " 4 11 44 1124 33 ", - " 55 421 33 ", - " 4 154 152 33 ", - " 4411 4 1 4 33 ", - " 55 21 33 ", - " 11 4 12 ", - " 4 1 4 ", - " 25 ", - " 1 4 ", - " 1 ", - " "}; - -static char **split_xpm[3] = { split_x16, split_x24, split_x32 }; - diff --git a/app/bin/bitmaps/sticky-doc.xpm b/app/bin/bitmaps/sticky-doc.xpm deleted file mode 100644 index 7b0e4cb..0000000 --- a/app/bin/bitmaps/sticky-doc.xpm +++ /dev/null @@ -1,130 +0,0 @@ -static char *sticky_doc_x16[] = { - "16 16 15 1", - " c None", - "0 c #000000", - "1 c #0066CC", - "2 c #666699", - "3 c #669999", - "4 c #996633", - "5 c #999999", - "6 c #CC6633", - "7 c #CC9900", - "8 c #CC9933", - "9 c #CC9999", - "A c #CCCC66", - "B c #FFCC00", - "C c #FFCC33", - "D c #FFCC66", - " ", - " ", - "4888888888884 ", - "4BBBBBBCBBBB764 ", - "4BBD59B99BBB7774", - "4BC2D95C95CBBBB4", - "4BC2CBA5CA5CBBB4", - "4BBC5ABD5CD5CBB4", - "4BBBC59BCABC3CB4", - "4BBBBB95CBBB5DB4", - "4BBBBBBA2ABD2CB4", - "4BBBBBBBC513DBB4", - "4BBBBBBBBBBBBBB4", - "4777777777777774", - " 444444444444444", - " "}; - -static char *sticky_doc_x24[] = { - "24 24 17 1", - " c None", - "0 c #000000", - "1 c #0066CC", - "2 c #3366CC", - "3 c #666699", - "4 c #669999", - "5 c #996633", - "6 c #999999", - "7 c #CC6633", - "8 c #CC9900", - "9 c #CC9933", - "A c #CC9966", - "B c #CC9999", - "C c #CCCC66", - "D c #FFCC00", - "E c #FFCC33", - "F c #FFCC66", - " ", - " ", - " ", - "5555555555555555555 ", - "58DDDDDDDDDDDDDDDD85 ", - "58DDDDDDDDDDEDDDDD8875 ", - "58DDDC26ADD64EDDDD88885 ", - "58DDA13216EB13FDDDDDDD85", - "58DD32EE616EC22CDDDDDD95", - "58DD42CDDB13EF21ADDDDD95", - "58DDF21BDDA12FE316EDDD95", - "58DDDE316EDC22EE616EDD95", - "58DDDDE614EDFBDDE616DD95", - "58DDDDDDB12FDDDDDD61ED95", - "58DDDDDDDC21BDDDDD61ED95", - "58DDDDDDDDE316EDDF16DD95", - "58DDDDDDDDDE612BB21FDD95", - "58DDDDDDDDDDDC3112CDDD95", - "58DDDDDDDDDDDDDFFDDDDD95", - "58DDDDDDDDDDDDDDDDDDDD95", - "579999999999999999999955", - " 5555555555555555555555 ", - " ", - " "}; - -static char *sticky_doc_x32[] = { - "32 32 15 1", - " c None", - "0 c #000000", - "1 c #0066CC", - "2 c #3366CC", - "3 c #666699", - "4 c #996633", - "5 c #999999", - "6 c #CC6633", - "7 c #CC9900", - "8 c #CC9966", - "9 c #CC9999", - "A c #CCCC66", - "B c #FFCC00", - "C c #FFCC33", - "D c #FFCC66", - " ", - " ", - " ", - " ", - " 444444444444444444444444 ", - " 4BBBBBBBBBBBBBBBBBBBBB764 ", - " 4BBBBBBBBBBBBBBBBBBBBBB7744 ", - " 4BBBBBBBBBBBBBCCBBBBBBB77744 ", - " 4BBBBBA315DBBB53DBBBBBB777774 ", - " 4BBBB511112ABC212ABBBBB7777774 ", - " 4BBBA115A3119BC3118BBBBBBBBBB4 ", - " 4BBB915BBC5115CC5119BBBBBBBBB4 ", - " 4BBB812DBBB5115CC5115CBBBBBBB4 ", - " 4BBBC3118BBB8113CB9115CBBBBBB4 ", - " 4BBBBC3119CBBA212DBA213DBBBBB4 ", - " 4BBBBBC5115CBBD313CBD212ABBBB4 ", - " 4BBBBBBB9113DBBC5DBBBC311CBBB4 ", - " 4BBBBBBBBA2128BBBBBBBBC319BBB4 ", - " 4BBBBBBBBBC3115CBBBBBBB915BBB4 ", - " 4BBBBBBBBBBC5115CBBBBBB915BBB4 ", - " 4BBBBBBBBBBBB9113DBBBBC219BBB4 ", - " 4BBBBBBBBBBBBBA2115CBA313CBBB4 ", - " 4BBBBBBBBBBBBBBC51111112DBBBB4 ", - " 4BBBBBBBBBBBBBBBBA31115CBBBBB4 ", - " 4BBBBBBBBBBBBBBBBBCDDCBBBBBBB4 ", - " 4BBBBBBBBBBBBBBBBBBBBBBBBBBBB4 ", - " 4BBBBBBBBBBBBBBBBBBBBBBBBBBBB4 ", - " 444444444444444444444444444444 ", - " ", - " ", - " ", - " "}; - -static char **sticky_doc_xpm[3] = { sticky_doc_x16, sticky_doc_x24, sticky_doc_x32 }; - diff --git a/app/bin/bitmaps/sticky-link.xpm b/app/bin/bitmaps/sticky-link.xpm deleted file mode 100644 index b2a027b..0000000 --- a/app/bin/bitmaps/sticky-link.xpm +++ /dev/null @@ -1,138 +0,0 @@ -static char *sticky_link_x16[] = { - "16 16 18 1", - " c None", - "0 c #000000", - "1 c #3366CC", - "2 c #666699", - "3 c #6666CC", - "4 c #669999", - "5 c #996600", - "6 c #996633", - "7 c #999999", - "8 c #CC6633", - "9 c #CC9900", - "A c #CC9933", - "B c #CC9966", - "C c #CC9999", - "D c #CCCC66", - "E c #FFCC00", - "F c #FFCC33", - "G c #FFCC66", - " ", - " ", - "68AAAAAAAAAA6 ", - "6EEEEEEEEEEE986 ", - "6EEEEEEEEEEE9996", - "6EEGCGEEEEFCGEE6", - "6ED7C4CEED2C7BE6", - "6E4GEEB777FEF1F6", - "6E1FEEF22GEEE3F6", - "6E77GC4FF77GB7E6", - "6EEC7BFEEEB77FE6", - "6EEEEEEEEEEEEEE6", - "6EEEEEEEEEEEEEE6", - "6A99999999999996", - " 666666666666666", - " "}; - -static char *sticky_link_x24[] = { - "24 24 19 1", - " c None", - "0 c #000000", - "1 c #0066CC", - "2 c #3366CC", - "3 c #666699", - "4 c #6666CC", - "5 c #669999", - "6 c #996600", - "7 c #996633", - "8 c #999999", - "9 c #CC6633", - "A c #CC9900", - "B c #CC9933", - "C c #CC9966", - "D c #CC9999", - "E c #CCCC66", - "F c #FFCC00", - "G c #FFCC33", - "H c #FFCC66", - " ", - " ", - " ", - "7777777777777777777 ", - "7BFFFFFFFFFFFFFFFFA7 ", - "7BFFFFFFFFFFFFFFFFAA97 ", - "7BFFFFFFFFFFFFFFFFAAAA7 ", - "7BFFFFFFFFFFFFFFFFFFFFA7", - "7BFFH888EFFFFFFG888HFFA7", - "7BFG228418GFFGD12822HFA7", - "7BFD2GFFC22HG818GFG38FA7", - "7BF88FFFFG3142EFFFFD2GA7", - "7BF3DFFFFFD118GFFFFE1GA7", - "7BF83FFFG818D13HFFF85FA7", - "7BFE18D822CFFE218D81DFA7", - "7BFFD1118HFFFFGD2118GFA7", - "7BFFFGHFFFFFFFFFFGGFFFA7", - "7BFFFFFFFFFFFFFFFFFFFFA7", - "7BFFFFFFFFFFFFFFFFFFFFA7", - "7BFFFFFFFFFFFFFFFFFFFFA7", - "77BBBBBBBBBBBBBBBBBBBB97", - " 7777777777777777777777 ", - " ", - " "}; - -static char *sticky_link_x32[] = { - "32 32 18 1", - " c None", - "0 c #000000", - "1 c #0066CC", - "2 c #3366CC", - "3 c #666699", - "4 c #6666CC", - "5 c #669999", - "6 c #996600", - "7 c #996633", - "8 c #999999", - "9 c #CC9900", - "A c #CC9933", - "B c #CC9966", - "C c #CC9999", - "D c #CCCC66", - "E c #FFCC00", - "F c #FFCC33", - "G c #FFCC66", - " ", - " ", - " ", - " ", - " 777777777777777777777777 ", - " 7EEEEEEEEEEEEEEEEEEEEEEA7 ", - " 7EEEEEEEEEEEEEEEEEEEEEE9977 ", - " 7EEEEEEEEEEEEEEEEEEEEEE99977 ", - " 7EEEEEEEEEEEEEEEEEEEEEE999997 ", - " 7EEEEEEEEEEEEEEEEEEEEEE9999997 ", - " 7EEEEEFFEEEEEEEEEEEEEEFFEEEEE7 ", - " 7EEEF82115DFEEEEEEEG81118FEEE7 ", - " 7EEF81111113FEEEEF81111115FEE7 ", - " 7EED12DEFB412BEEG3118GEG51CEE7 ", - " 7EE81DEEEEF811CD213GEEEEG12EE7 ", - " 7EE42EEEEEEEC11118FEEEEEE81FE7 ", - " 7EE22EEEEEEEF8112FEEEEEEE81GE7 ", - " 7EE51FEEEEEG312312DEEEEEE31FE7 ", - " 7EEC18EEEF8113GF8118FEEEB18EE7 ", - " 7EEF21488111CFEEEC21188811DEE7 ", - " 7EEEG411118GEEEEEEF811111BEEE7 ", - " 7EEEEFDCDFEEEEEEEEEEFCCCFEEEE7 ", - " 7EEEEEEEEEEEEEEEEEEEEEEEEEEEE7 ", - " 7EEEEEEEEEEEEEEEEEEEEEEEEEEEE7 ", - " 7EEEEEEEEEEEEEEEEEEEEEEEEEEEE7 ", - " 7EEEEEEEEEEEEEEEEEEEEEEEEEEEE7 ", - " 7EEEEEEEEEEEEEEEEEEEEEEEEEEEE7 ", - " 777777777777777777777777777777 ", - " ", - " ", - " ", - " "}; - -static char **sticky_link_xpm[3] = { sticky_link_x16, sticky_link_x24, sticky_link_x32 }; - diff --git a/app/bin/bitmaps/sticky-note.xpm b/app/bin/bitmaps/sticky-note.xpm deleted file mode 100644 index fbd12e1..0000000 --- a/app/bin/bitmaps/sticky-note.xpm +++ /dev/null @@ -1,124 +0,0 @@ -static char *sticky_note_x16[] = { - "16 16 14 1", - " c None", - "0 c #000000", - "1 c #996600", - "2 c #996633", - "3 c #999999", - "4 c #CC6633", - "5 c #CC9900", - "6 c #CC9933", - "7 c #CC9966", - "8 c #CC9999", - "9 c #CCCC66", - "A c #FFCC00", - "B c #FFCC33", - "C c #FFCC66", - " ", - " ", - "2466666666662 ", - "2AAAAAAAAAAA542 ", - "2733333333375552", - "2BCCCCCCCCCBAAA2", - "2B88888888888CA2", - "2B88888888888CA2", - "2BCCCCCCCCCCBAA2", - "2733333333338AA2", - "2AAAAAAAAAAAAAA2", - "2733333333333392", - "2BCCCCCCCCCCCCB2", - "2655555555555552", - " 222222222222222", - " "}; - -static char *sticky_note_x24[] = { - "24 24 14 1", - " c None", - "0 c #000000", - "1 c #0066CC", - "2 c #996600", - "3 c #996633", - "4 c #999999", - "5 c #CC6633", - "6 c #CC9900", - "7 c #CC9933", - "8 c #CC9999", - "9 c #CCCC66", - "A c #FFCC00", - "B c #FFCC33", - "C c #FFCC66", - " ", - " ", - " ", - "3333333333333333333 ", - "37AAAAAAAAAAAAAAAA63 ", - "37AAAAAAAAAAAAAAAA6653 ", - "37B11111111111114A66663 ", - "37B44444444444448AAAAA63", - "37AAAAAAAAAAAAAAAAAAAA63", - "37B88888888888888889AA63", - "37B11111111111111114AA63", - "37BCCCCCCCCCCCCCCCCCAA63", - "37AAAAAAAAAAAAAAAAAAAA63", - "37B1111111111111118AAA63", - "37B4444444444444449AAA63", - "37AAAAAAAAAAAAAAAAAAAA63", - "37B888888888888888888A63", - "37B111111111111111111A63", - "37BCCCCCCCCCCCCCCCCCCA63", - "37AAAAAAAAAAAAAAAAAAAA63", - "337777777777777777777753", - " 3333333333333333333333 ", - " ", - " "}; - -static char *sticky_note_x32[] = { - "32 32 13 1", - " c None", - "0 c #000000", - "1 c #0066CC", - "2 c #996600", - "3 c #996633", - "4 c #999999", - "5 c #CC9900", - "6 c #CC9933", - "7 c #CC9999", - "8 c #CCCC66", - "9 c #FFCC00", - "A c #FFCC33", - "B c #FFCC66", - " ", - " ", - " ", - " ", - " 333333333333333333333333 ", - " 3999999999999999999999963 ", - " 399999999999999999999995533 ", - " 3999999999999999999999955533 ", - " 39A111111111111111111B9555553 ", - " 39A111111111111111111B95555553 ", - " 39ABBBBBBBBBBBBBBBBBBA99999993 ", - " 399999999999999999999999999993 ", - " 39ABBBBBBBBBBBBBBBBBBBBBBA9993 ", - " 39A1111111111111111111111B9993 ", - " 39A1111111111111111111111B9993 ", - " 399999999999999999999999999993 ", - " 399999999999999999999999999993 ", - " 39A777777777777777777778999993 ", - " 39B111111111111111111114999993 ", - " 39B444444444444444444447999993 ", - " 399999999999999999999999999993 ", - " 399999999999999999999999999993 ", - " 39A111111111111111111111111993 ", - " 39A111111111111111111111111993 ", - " 39ABBBBBBBBBBBBBBBBBBBBBBBB993 ", - " 399999999999999999999999999993 ", - " 399999999999999999999999999993 ", - " 333333333333333333333333333333 ", - " ", - " ", - " ", - " "}; - -static char **sticky_note_xpm[3] = { sticky_note_x16, sticky_note_x24, sticky_note_x32 }; - diff --git a/app/bin/bitmaps/stop.xpm b/app/bin/bitmaps/stop.xpm deleted file mode 100644 index 78fb1fc..0000000 --- a/app/bin/bitmaps/stop.xpm +++ /dev/null @@ -1,128 +0,0 @@ -static char *stop_x16[] = { - "16 16 14 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #660000", - "3 c #990000", - "4 c #993300", - "5 c #993333", - "6 c #CC3333", - "7 c #CC6633", - "8 c #CC6666", - "9 c #CC9966", - "A c #CC9999", - "B c #FF9999", - "C c #800000", - " 00 ", - " 1221 ", - " 11566511 ", - " 015788886510 ", - " 12678888886620 ", - " 13688AAA9876C0 ", - " 14689ABAA886C0 ", - " 1478AABBA886C0 ", - " 14789ABBA886C0 ", - " 14688AAAA886C0 ", - " 136788A98876C0 ", - " 11568888876410 ", - " 1C677776C1 ", - " 11566411 ", - " 1111 ", - " "}; - -static char *stop_x24[] = { - "24 24 15 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #660000", - "3 c #990000", - "4 c #993300", - "5 c #993333", - "6 c #CC3300", - "7 c #CC3333", - "8 c #CC6633", - "9 c #CC6666", - "A c #CC9966", - "B c #CC9999", - "C c #FF9999", - "D c #800000", - " ", - " 0110 ", - " 1D7721 ", - " 1277777511 ", - " 11578888877410 ", - " 01D77899999987721 ", - " 12677899999999877310 ", - " 13778999ABA9999776D0 ", - " 1377899BBBBBA99877D0 ", - " 147899ABBBBBB99977D0 ", - " 147899BBCCCBBA9977D0 ", - " 147899BBCCCCBA9987D0 ", - " 147899BBCCCCBA9977D0 ", - " 147899ABBCCBB99977D0 ", - " 1377999BBBBBA99877D0 ", - " 13778999BBBA999876D0 ", - " 136779999999998776D0 ", - " 1D77789999998776D1 ", - " 1157788998877411 ", - " 127777777511 ", - " 014777721 ", - " 113D10 ", - " 10 ", - " "}; - -static char *stop_x32[] = { - "32 32 16 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #660000", - "3 c #990000", - "4 c #993300", - "5 c #993333", - "6 c #CC0000", - "7 c #CC3300", - "8 c #CC3333", - "9 c #CC6633", - "A c #CC6666", - "B c #CC9966", - "C c #CC9999", - "D c #FF9999", - "E c #800000", - " ", - " 11 ", - " 113E10 ", - " 014888821 ", - " 128888888511 ", - " 1158889999888411 ", - " 11488999AAA999888E1 ", - " 01E88899AAAAAAAA9888411 ", - " 12388899AAAAAAAAAA98887E1 ", - " 1378899AAAABBBAAAAA98886E0 ", - " 137889AAAABCCCCBAAAA9887E0 ", - " 138899AAACCCCCCCBAAA9887E0 ", - " 14889AAABCCCCCCCCAAA9888E0 ", - " 14889AAACCCDDDDCCBAAA988E0 ", - " 14889AABCCDDDDDCCCAAA988E0 ", - " 14889AABCCDDDDDCCCAAA988E0 ", - " 17889AABCCDDDDDCCCAAA988E0 ", - " 17889AAACCCDDDDCCBAAA988E0 ", - " 17889AAABCCCCCCCCBAA9888E0 ", - " 138899AAACCCCCCCBAAA9887E0 ", - " 137889AAABCCCCCBAAAA9887E0 ", - " 1378899AAAABBBAAAAA98887E0 ", - " 1E78889AAAAAAAAAAA98887620 ", - " 11488899AAAAAAAA99887311 ", - " 1E888999AAAA99888521 ", - " 11488899999888821 ", - " 11588888888410 ", - " 1288888411 ", - " 01E7411 ", - " 111 ", - " ", - " "}; - -static char **stop_xpm[3] = { stop_x16, stop_x24, stop_x32 }; - diff --git a/app/bin/bitmaps/straight-line.xpm b/app/bin/bitmaps/straight-line.xpm deleted file mode 100644 index 9808d8d..0000000 --- a/app/bin/bitmaps/straight-line.xpm +++ /dev/null @@ -1,96 +0,0 @@ -static char *straight_line_x16[] = { - "16 16 4 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #CC0000", - " ", - " 222 ", - " 222 ", - " 2 2 ", - " 22 ", - " 22 ", - " 22 ", - " 01 ", - " 00 ", - " 00 ", - " 00 ", - " 00 ", - " 00 ", - " 00 ", - " 00 ", - " "}; - -static char *straight_line_x24[] = { - "24 24 5 1", - " c None", - "0 c #000000", - "1 c #990000", - "2 c #CC0000", - "3 c #800000", - " ", - " ", - " 2222 ", - " 22 ", - " 2 2 ", - " 2 2 ", - " 2 ", - " 22 ", - " 22 ", - " 22 ", - " 03 ", - " 00 ", - " 00 ", - " 00 ", - " 00 ", - " 00 ", - " 00 ", - " 00 ", - " 00 ", - " 00 ", - " 00 ", - " 00 ", - " ", - " "}; - -static char *straight_line_x32[] = { - "32 32 4 1", - " c None", - "0 c #000000", - "1 c #990000", - "2 c #CC0000", - " ", - " ", - " 22222 ", - " 2222222 ", - " 2222 ", - " 22222 ", - " 222 22 ", - " 222 22 ", - " 222 22 ", - " 222 ", - " 222 ", - " 222 ", - " 122 ", - " 002 ", - " 000 ", - " 000 ", - " 000 ", - " 000 ", - " 000 ", - " 000 ", - " 000 ", - " 000 ", - " 000 ", - " 000 ", - " 000 ", - " 000 ", - " 000 ", - " 000 ", - " 000 ", - " 0 ", - " ", - " "}; - -static char **straight_line_xpm[3] = { straight_line_x16, straight_line_x24, straight_line_x32 }; - diff --git a/app/bin/bitmaps/straight.xpm b/app/bin/bitmaps/straight.xpm deleted file mode 100644 index 83e2f67..0000000 --- a/app/bin/bitmaps/straight.xpm +++ /dev/null @@ -1,133 +0,0 @@ -static char *straight_x16[] = { - "16 16 18 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #333300", - "3 c #663300", - "4 c #666666", - "5 c #993333", - "6 c #996600", - "7 c #996633", - "8 c #996666", - "9 c #999999", - "A c #CC0000", - "B c #CC3333", - "C c #CC6600", - "D c #CC6666", - "E c #CC9900", - "F c #C0C0C0", - "G c #808080", - " AAA ", - " AAAA", - " 945AAA", - " G9A8AA", - " G8B94 ", - " FG8D8GF ", - " E49B8G ", - " 37A9G ", - " 62EC49 ", - " E32E 2E ", - " E13E 3 ", - " 63 E2 E ", - " C1EE0C ", - " 2E 2C ", - " 33 ", - " 03E "}; - -static char *straight_x24[] = { - "24 24 15 1", - " c None", - "0 c #000000", - "1 c #333300", - "2 c #333333", - "3 c #663300", - "4 c #666666", - "5 c #996600", - "6 c #999999", - "7 c #CC0000", - "8 c #CC3333", - "9 c #CC6600", - "A c #CC9900", - "B c #CC9999", - "C c #C0C0C0", - "D c #808080", - " ", - " 77777 ", - " 777 ", - " C 4 7777 ", - " 6D 77 7 ", - " C 4DB7 4 7 ", - " 6D4 8B44 ", - " C 4DB7 DD ", - " CD4 8B44CC ", - " A 4DB7 DD ", - " A52 8B44CC ", - " A 03A7 DD ", - " A50 AA246C ", - " 03A 53 ", - " A50 AA 0AA ", - " 3A 93 ", - " A90 AA 09A ", - " 1A 93 ", - " A90 AA 05A ", - " 39 A3 ", - " 0 AA 05A ", - " A30 ", - " 05A ", - " 0 "}; - -static char *straight_x32[] = { - "32 32 17 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #333300", - "3 c #333333", - "4 c #663300", - "5 c #666666", - "6 c #996600", - "7 c #999999", - "8 c #CC0000", - "9 c #CC3333", - "A c #CC6600", - "B c #CC6666", - "C c #CC9900", - "D c #CC9999", - "E c #C0C0C0", - "F c #808080", - " ", - " 888888 ", - " 8888888 ", - " 8888 ", - " E 5 88888 ", - " E75 888 88 ", - " F7 888 88 ", - " EE 5 D988 5 88 ", - " 7F5 88D 5 ", - " 57D8887F ", - " E 55 988 57E ", - " EF5 88D755 E ", - " 5FD888 FF ", - " CC35 989 55EE ", - " 64 889E55 ", - " 00CC 8 FF ", - " C40 CC 55 E ", - " 44 C60 ", - " C 0 C 04C ", - " CA0 C 00 CC ", - " 2A A2 ", - " CC 0 CC 0C ", - " C2 CC 0 C ", - " 0AC 64 ", - " C 00 CC 06C ", - " 44 CC0 ", - " 04C 46 ", - " 0 C 0 CC ", - " C20 ", - " 1A ", - " 00 C ", - " "}; - -static char **straight_xpm[3] = { straight_x16, straight_x24, straight_x32 }; - diff --git a/app/bin/bitmaps/svg/background.svg b/app/bin/bitmaps/svg/background.svg new file mode 100644 index 0000000..b168f0b --- /dev/null +++ b/app/bin/bitmaps/svg/background.svg @@ -0,0 +1,153 @@ + +image/svg+xml + + + + + + + + + diff --git a/app/bin/bitmaps/svg/benchwork.svg b/app/bin/bitmaps/svg/benchwork.svg new file mode 100644 index 0000000..1562ae3 --- /dev/null +++ b/app/bin/bitmaps/svg/benchwork.svg @@ -0,0 +1,100 @@ + +image/svg+xml + + + + + + + + + diff --git a/app/bin/bitmaps/svg/bezier-line.svg b/app/bin/bitmaps/svg/bezier-line.svg new file mode 100644 index 0000000..df4232b --- /dev/null +++ b/app/bin/bitmaps/svg/bezier-line.svg @@ -0,0 +1,92 @@ + +image/svg+xml + + + + + + + + + diff --git a/app/bin/bitmaps/svg/bezier-track.svg b/app/bin/bitmaps/svg/bezier-track.svg new file mode 100644 index 0000000..4f3cf33 --- /dev/null +++ b/app/bin/bitmaps/svg/bezier-track.svg @@ -0,0 +1,424 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + diff --git a/app/bin/bitmaps/svg/block.svg b/app/bin/bitmaps/svg/block.svg new file mode 100755 index 0000000..9d306d7 --- /dev/null +++ b/app/bin/bitmaps/svg/block.svg @@ -0,0 +1,95 @@ + +image/svg+xml diff --git a/app/bin/bitmaps/svg/blockdel.svg b/app/bin/bitmaps/svg/blockdel.svg new file mode 100755 index 0000000..014101e --- /dev/null +++ b/app/bin/bitmaps/svg/blockdel.svg @@ -0,0 +1,202 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/bin/bitmaps/svg/blockedit.svg b/app/bin/bitmaps/svg/blockedit.svg new file mode 100755 index 0000000..3ed69c3 --- /dev/null +++ b/app/bin/bitmaps/svg/blockedit.svg @@ -0,0 +1,239 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/bin/bitmaps/svg/blocknew.svg b/app/bin/bitmaps/svg/blocknew.svg new file mode 100755 index 0000000..e8c51e3 --- /dev/null +++ b/app/bin/bitmaps/svg/blocknew.svg @@ -0,0 +1,216 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + diff --git a/app/bin/bitmaps/svg/bottom.svg b/app/bin/bitmaps/svg/bottom.svg new file mode 100644 index 0000000..e529c66 --- /dev/null +++ b/app/bin/bitmaps/svg/bottom.svg @@ -0,0 +1,62 @@ + +image/svg+xml + + + + diff --git a/app/bin/bitmaps/svg/box.svg b/app/bin/bitmaps/svg/box.svg new file mode 100644 index 0000000..49054b5 --- /dev/null +++ b/app/bin/bitmaps/svg/box.svg @@ -0,0 +1,72 @@ + +image/svg+xml + + + + + diff --git a/app/bin/bitmaps/svg/bridge.svg b/app/bin/bitmaps/svg/bridge.svg new file mode 100644 index 0000000..c05e827 --- /dev/null +++ b/app/bin/bitmaps/svg/bridge.svg @@ -0,0 +1,152 @@ + +image/svg+xml diff --git a/app/bin/bitmaps/svg/building.svg b/app/bin/bitmaps/svg/building.svg new file mode 100644 index 0000000..4b63286 --- /dev/null +++ b/app/bin/bitmaps/svg/building.svg @@ -0,0 +1,85 @@ + +image/svg+xml + + + + + + + diff --git a/app/bin/bitmaps/svg/car-inventory.svg b/app/bin/bitmaps/svg/car-inventory.svg new file mode 100644 index 0000000..27d805d --- /dev/null +++ b/app/bin/bitmaps/svg/car-inventory.svg @@ -0,0 +1,146 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/bin/bitmaps/svg/change-grid.svg b/app/bin/bitmaps/svg/change-grid.svg new file mode 100644 index 0000000..0962f5f --- /dev/null +++ b/app/bin/bitmaps/svg/change-grid.svg @@ -0,0 +1,136 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/bin/bitmaps/svg/circle-center.svg b/app/bin/bitmaps/svg/circle-center.svg new file mode 100644 index 0000000..dc1b0fc --- /dev/null +++ b/app/bin/bitmaps/svg/circle-center.svg @@ -0,0 +1,283 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/bin/bitmaps/svg/circle-filled-center.svg b/app/bin/bitmaps/svg/circle-filled-center.svg new file mode 100644 index 0000000..252ce43 --- /dev/null +++ b/app/bin/bitmaps/svg/circle-filled-center.svg @@ -0,0 +1,72 @@ + +image/svg+xml + + + + + + diff --git a/app/bin/bitmaps/svg/circle-filled-tangent.svg b/app/bin/bitmaps/svg/circle-filled-tangent.svg new file mode 100644 index 0000000..afbf7ea --- /dev/null +++ b/app/bin/bitmaps/svg/circle-filled-tangent.svg @@ -0,0 +1,78 @@ + +image/svg+xml + + + + + + diff --git a/app/bin/bitmaps/svg/circle-line-center.svg b/app/bin/bitmaps/svg/circle-line-center.svg new file mode 100644 index 0000000..18e05df --- /dev/null +++ b/app/bin/bitmaps/svg/circle-line-center.svg @@ -0,0 +1,78 @@ + +image/svg+xml + + + + + + diff --git a/app/bin/bitmaps/svg/circle-line-tangent.svg b/app/bin/bitmaps/svg/circle-line-tangent.svg new file mode 100644 index 0000000..02f8c39 --- /dev/null +++ b/app/bin/bitmaps/svg/circle-line-tangent.svg @@ -0,0 +1,78 @@ + +image/svg+xml + + + + + + diff --git a/app/bin/bitmaps/svg/circle-line.svg b/app/bin/bitmaps/svg/circle-line.svg new file mode 100644 index 0000000..2aa4811 --- /dev/null +++ b/app/bin/bitmaps/svg/circle-line.svg @@ -0,0 +1,228 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +36 diff --git a/app/bin/bitmaps/svg/circle-tangent.svg b/app/bin/bitmaps/svg/circle-tangent.svg new file mode 100644 index 0000000..3e970c6 --- /dev/null +++ b/app/bin/bitmaps/svg/circle-tangent.svg @@ -0,0 +1,272 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/bin/bitmaps/svg/circle.svg b/app/bin/bitmaps/svg/circle.svg new file mode 100644 index 0000000..660e7fd --- /dev/null +++ b/app/bin/bitmaps/svg/circle.svg @@ -0,0 +1,301 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + +30 diff --git a/app/bin/bitmaps/svg/clone.svg b/app/bin/bitmaps/svg/clone.svg new file mode 100644 index 0000000..31c63bb --- /dev/null +++ b/app/bin/bitmaps/svg/clone.svg @@ -0,0 +1,69 @@ + +image/svg+xml diff --git a/app/bin/bitmaps/svg/connect.svg b/app/bin/bitmaps/svg/connect.svg new file mode 100644 index 0000000..0fd3065 --- /dev/null +++ b/app/bin/bitmaps/svg/connect.svg @@ -0,0 +1,160 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + diff --git a/app/bin/bitmaps/svg/control.svg b/app/bin/bitmaps/svg/control.svg new file mode 100644 index 0000000..051e57f --- /dev/null +++ b/app/bin/bitmaps/svg/control.svg @@ -0,0 +1,84 @@ + +image/svg+xml diff --git a/app/bin/bitmaps/svg/convert-from.svg b/app/bin/bitmaps/svg/convert-from.svg new file mode 100644 index 0000000..ed1ac55 --- /dev/null +++ b/app/bin/bitmaps/svg/convert-from.svg @@ -0,0 +1,110 @@ + +image/svg+xml diff --git a/app/bin/bitmaps/svg/convert-to.svg b/app/bin/bitmaps/svg/convert-to.svg new file mode 100644 index 0000000..5876444 --- /dev/null +++ b/app/bin/bitmaps/svg/convert-to.svg @@ -0,0 +1,107 @@ + +image/svg+xml diff --git a/app/bin/bitmaps/svg/copy.svg b/app/bin/bitmaps/svg/copy.svg new file mode 100644 index 0000000..a865437 --- /dev/null +++ b/app/bin/bitmaps/svg/copy.svg @@ -0,0 +1,57 @@ + +image/svg+xml diff --git a/app/bin/bitmaps/svg/cornu.svg b/app/bin/bitmaps/svg/cornu.svg new file mode 100644 index 0000000..be91077 --- /dev/null +++ b/app/bin/bitmaps/svg/cornu.svg @@ -0,0 +1,275 @@ + +image/svg+xml diff --git a/app/bin/bitmaps/svg/curved-chord.svg b/app/bin/bitmaps/svg/curved-chord.svg new file mode 100644 index 0000000..5db0f01 --- /dev/null +++ b/app/bin/bitmaps/svg/curved-chord.svg @@ -0,0 +1,172 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/bin/bitmaps/svg/curved-end.svg b/app/bin/bitmaps/svg/curved-end.svg new file mode 100644 index 0000000..4c76cb4 --- /dev/null +++ b/app/bin/bitmaps/svg/curved-end.svg @@ -0,0 +1,160 @@ + +image/svg+xml diff --git a/app/bin/bitmaps/svg/curved-line-chord.svg b/app/bin/bitmaps/svg/curved-line-chord.svg new file mode 100644 index 0000000..b1cc041 --- /dev/null +++ b/app/bin/bitmaps/svg/curved-line-chord.svg @@ -0,0 +1,114 @@ + +image/svg+xml + + + + + + + + + + + + + diff --git a/app/bin/bitmaps/svg/curved-line-end.svg b/app/bin/bitmaps/svg/curved-line-end.svg new file mode 100644 index 0000000..365e1bd --- /dev/null +++ b/app/bin/bitmaps/svg/curved-line-end.svg @@ -0,0 +1,108 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/bin/bitmaps/svg/curved-line-middle.svg b/app/bin/bitmaps/svg/curved-line-middle.svg new file mode 100644 index 0000000..237b453 --- /dev/null +++ b/app/bin/bitmaps/svg/curved-line-middle.svg @@ -0,0 +1,99 @@ + +image/svg+xml + + + + + + + + + + + + diff --git a/app/bin/bitmaps/svg/curved-line-tangent.svg b/app/bin/bitmaps/svg/curved-line-tangent.svg new file mode 100644 index 0000000..dbac2e2 --- /dev/null +++ b/app/bin/bitmaps/svg/curved-line-tangent.svg @@ -0,0 +1,190 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/bin/bitmaps/svg/curved-middle.svg b/app/bin/bitmaps/svg/curved-middle.svg new file mode 100644 index 0000000..011b402 --- /dev/null +++ b/app/bin/bitmaps/svg/curved-middle.svg @@ -0,0 +1,202 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + diff --git a/app/bin/bitmaps/svg/curved-tangent.svg b/app/bin/bitmaps/svg/curved-tangent.svg new file mode 100644 index 0000000..e9aee6b --- /dev/null +++ b/app/bin/bitmaps/svg/curved-tangent.svg @@ -0,0 +1,191 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/bin/bitmaps/svg/cut.svg b/app/bin/bitmaps/svg/cut.svg new file mode 100644 index 0000000..8b8d9f0 --- /dev/null +++ b/app/bin/bitmaps/svg/cut.svg @@ -0,0 +1,64 @@ + +image/svg+xml diff --git a/app/bin/bitmaps/svg/delete.svg b/app/bin/bitmaps/svg/delete.svg new file mode 100644 index 0000000..55d6471 --- /dev/null +++ b/app/bin/bitmaps/svg/delete.svg @@ -0,0 +1,143 @@ + +image/svg+xml + + + + + + + + + + + + + diff --git a/app/bin/bitmaps/svg/describe.svg b/app/bin/bitmaps/svg/describe.svg new file mode 100644 index 0000000..495a3b8 --- /dev/null +++ b/app/bin/bitmaps/svg/describe.svg @@ -0,0 +1,144 @@ + +image/svg+xml + + + + + + + + + + + + + + + + diff --git a/app/bin/bitmaps/svg/description.svg b/app/bin/bitmaps/svg/description.svg new file mode 100644 index 0000000..15f43e2 --- /dev/null +++ b/app/bin/bitmaps/svg/description.svg @@ -0,0 +1,143 @@ + +image/svg+xml + + + + + + + + + + + + + +DESC diff --git a/app/bin/bitmaps/svg/dimension.svg b/app/bin/bitmaps/svg/dimension.svg new file mode 100644 index 0000000..7443b8a --- /dev/null +++ b/app/bin/bitmaps/svg/dimension.svg @@ -0,0 +1,148 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + +36 + diff --git a/app/bin/bitmaps/svg/doc-export-bmap.svg b/app/bin/bitmaps/svg/doc-export-bmap.svg new file mode 100644 index 0000000..f6dd9c6 --- /dev/null +++ b/app/bin/bitmaps/svg/doc-export-bmap.svg @@ -0,0 +1,91 @@ + +image/svg+xml diff --git a/app/bin/bitmaps/svg/doc-export-dxf.svg b/app/bin/bitmaps/svg/doc-export-dxf.svg new file mode 100644 index 0000000..d22f028 --- /dev/null +++ b/app/bin/bitmaps/svg/doc-export-dxf.svg @@ -0,0 +1,107 @@ + +image/svg+xml diff --git a/app/bin/bitmaps/svg/doc-export-svg.svg b/app/bin/bitmaps/svg/doc-export-svg.svg new file mode 100644 index 0000000..6872f3c --- /dev/null +++ b/app/bin/bitmaps/svg/doc-export-svg.svg @@ -0,0 +1,70 @@ + +image/svg+xml diff --git a/app/bin/bitmaps/svg/doc-export.svg b/app/bin/bitmaps/svg/doc-export.svg new file mode 100644 index 0000000..6954caf --- /dev/null +++ b/app/bin/bitmaps/svg/doc-export.svg @@ -0,0 +1,66 @@ + +image/svg+xml diff --git a/app/bin/bitmaps/svg/doc-import-mod.svg b/app/bin/bitmaps/svg/doc-import-mod.svg new file mode 100644 index 0000000..28bd818 --- /dev/null +++ b/app/bin/bitmaps/svg/doc-import-mod.svg @@ -0,0 +1,66 @@ + +image/svg+xml diff --git a/app/bin/bitmaps/svg/doc-import.svg b/app/bin/bitmaps/svg/doc-import.svg new file mode 100644 index 0000000..9a7eaa2 --- /dev/null +++ b/app/bin/bitmaps/svg/doc-import.svg @@ -0,0 +1,60 @@ + +image/svg+xml diff --git a/app/bin/bitmaps/svg/doc-new.svg b/app/bin/bitmaps/svg/doc-new.svg new file mode 100644 index 0000000..e324191 --- /dev/null +++ b/app/bin/bitmaps/svg/doc-new.svg @@ -0,0 +1,63 @@ + +image/svg+xml diff --git a/app/bin/bitmaps/svg/doc-open.svg b/app/bin/bitmaps/svg/doc-open.svg new file mode 100644 index 0000000..ede9909 --- /dev/null +++ b/app/bin/bitmaps/svg/doc-open.svg @@ -0,0 +1,72 @@ + +image/svg+xml diff --git a/app/bin/bitmaps/svg/doc-print.svg b/app/bin/bitmaps/svg/doc-print.svg new file mode 100644 index 0000000..1926edf --- /dev/null +++ b/app/bin/bitmaps/svg/doc-print.svg @@ -0,0 +1,94 @@ + +image/svg+xml diff --git a/app/bin/bitmaps/svg/doc-recent.svg b/app/bin/bitmaps/svg/doc-recent.svg new file mode 100644 index 0000000..5718a2f --- /dev/null +++ b/app/bin/bitmaps/svg/doc-recent.svg @@ -0,0 +1,63 @@ + +image/svg+xml diff --git a/app/bin/bitmaps/svg/doc-revert.svg b/app/bin/bitmaps/svg/doc-revert.svg new file mode 100644 index 0000000..f5b6290 --- /dev/null +++ b/app/bin/bitmaps/svg/doc-revert.svg @@ -0,0 +1,55 @@ + +image/svg+xml diff --git a/app/bin/bitmaps/svg/doc-save-as.svg b/app/bin/bitmaps/svg/doc-save-as.svg new file mode 100644 index 0000000..cf9244d --- /dev/null +++ b/app/bin/bitmaps/svg/doc-save-as.svg @@ -0,0 +1,99 @@ + +image/svg+xml diff --git a/app/bin/bitmaps/svg/doc-save.svg b/app/bin/bitmaps/svg/doc-save.svg new file mode 100644 index 0000000..3a553dd --- /dev/null +++ b/app/bin/bitmaps/svg/doc-save.svg @@ -0,0 +1,90 @@ + +image/svg+xml diff --git a/app/bin/bitmaps/svg/doc-setup.svg b/app/bin/bitmaps/svg/doc-setup.svg new file mode 100644 index 0000000..1219b1e --- /dev/null +++ b/app/bin/bitmaps/svg/doc-setup.svg @@ -0,0 +1,101 @@ + +image/svg+xml diff --git a/app/bin/bitmaps/svg/down.svg b/app/bin/bitmaps/svg/down.svg new file mode 100644 index 0000000..41f83fb --- /dev/null +++ b/app/bin/bitmaps/svg/down.svg @@ -0,0 +1,56 @@ + +image/svg+xml + + + + diff --git a/app/bin/bitmaps/svg/elevation.svg b/app/bin/bitmaps/svg/elevation.svg new file mode 100644 index 0000000..b6f9813 --- /dev/null +++ b/app/bin/bitmaps/svg/elevation.svg @@ -0,0 +1,139 @@ + +image/svg+xml + + + + + + + + + + + + +Z + diff --git a/app/bin/bitmaps/svg/exit.svg b/app/bin/bitmaps/svg/exit.svg new file mode 100644 index 0000000..210bdb9 --- /dev/null +++ b/app/bin/bitmaps/svg/exit.svg @@ -0,0 +1,88 @@ + +image/svg+xml + + + + + + + + + + + + + +EXIT diff --git a/app/bin/bitmaps/svg/extend.svg b/app/bin/bitmaps/svg/extend.svg new file mode 100644 index 0000000..eac7840 --- /dev/null +++ b/app/bin/bitmaps/svg/extend.svg @@ -0,0 +1,154 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + diff --git a/app/bin/bitmaps/svg/filled-box.svg b/app/bin/bitmaps/svg/filled-box.svg new file mode 100644 index 0000000..2d8e2dd --- /dev/null +++ b/app/bin/bitmaps/svg/filled-box.svg @@ -0,0 +1,72 @@ + +image/svg+xml + + + + + diff --git a/app/bin/bitmaps/svg/filled-polygon.svg b/app/bin/bitmaps/svg/filled-polygon.svg new file mode 100644 index 0000000..6fe8cce --- /dev/null +++ b/app/bin/bitmaps/svg/filled-polygon.svg @@ -0,0 +1,59 @@ + +image/svg+xml + + + + diff --git a/app/bin/bitmaps/svg/go.svg b/app/bin/bitmaps/svg/go.svg new file mode 100644 index 0000000..943e561 --- /dev/null +++ b/app/bin/bitmaps/svg/go.svg @@ -0,0 +1,106 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + diff --git a/app/bin/bitmaps/svg/grid.svg b/app/bin/bitmaps/svg/grid.svg new file mode 100644 index 0000000..23b9b93 --- /dev/null +++ b/app/bin/bitmaps/svg/grid.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + diff --git a/app/bin/bitmaps/svg/helix.svg b/app/bin/bitmaps/svg/helix.svg new file mode 100644 index 0000000..c88f470 --- /dev/null +++ b/app/bin/bitmaps/svg/helix.svg @@ -0,0 +1,170 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/bin/bitmaps/svg/info.svg b/app/bin/bitmaps/svg/info.svg new file mode 100644 index 0000000..979601d --- /dev/null +++ b/app/bin/bitmaps/svg/info.svg @@ -0,0 +1,69 @@ + +image/svg+xml + + + + + diff --git a/app/bin/bitmaps/svg/join-line.svg b/app/bin/bitmaps/svg/join-line.svg new file mode 100644 index 0000000..feb8a93 --- /dev/null +++ b/app/bin/bitmaps/svg/join-line.svg @@ -0,0 +1,94 @@ + +image/svg+xml diff --git a/app/bin/bitmaps/svg/join.svg b/app/bin/bitmaps/svg/join.svg new file mode 100644 index 0000000..c441656 --- /dev/null +++ b/app/bin/bitmaps/svg/join.svg @@ -0,0 +1,154 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/bin/bitmaps/svg/layers.svg b/app/bin/bitmaps/svg/layers.svg new file mode 100644 index 0000000..b261d30 --- /dev/null +++ b/app/bin/bitmaps/svg/layers.svg @@ -0,0 +1,98 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/bin/bitmaps/svg/loosen.svg b/app/bin/bitmaps/svg/loosen.svg new file mode 100644 index 0000000..eb3d0a6 --- /dev/null +++ b/app/bin/bitmaps/svg/loosen.svg @@ -0,0 +1,146 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + diff --git a/app/bin/bitmaps/svg/magnet.svg b/app/bin/bitmaps/svg/magnet.svg new file mode 100644 index 0000000..9d0b3a6 --- /dev/null +++ b/app/bin/bitmaps/svg/magnet.svg @@ -0,0 +1,83 @@ + +image/svg+xml diff --git a/app/bin/bitmaps/svg/manage.svg b/app/bin/bitmaps/svg/manage.svg new file mode 100644 index 0000000..2791e15 --- /dev/null +++ b/app/bin/bitmaps/svg/manage.svg @@ -0,0 +1,77 @@ + +image/svg+xml diff --git a/app/bin/bitmaps/svg/map.svg b/app/bin/bitmaps/svg/map.svg new file mode 100644 index 0000000..69686be --- /dev/null +++ b/app/bin/bitmaps/svg/map.svg @@ -0,0 +1,146 @@ + +image/svg+xml diff --git a/app/bin/bitmaps/svg/move.svg b/app/bin/bitmaps/svg/move.svg new file mode 100644 index 0000000..9c1e906 --- /dev/null +++ b/app/bin/bitmaps/svg/move.svg @@ -0,0 +1,231 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/bin/bitmaps/svg/new-car.svg b/app/bin/bitmaps/svg/new-car.svg new file mode 100644 index 0000000..6b0d579 --- /dev/null +++ b/app/bin/bitmaps/svg/new-car.svg @@ -0,0 +1,136 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/bin/bitmaps/svg/ok.svg b/app/bin/bitmaps/svg/ok.svg new file mode 100644 index 0000000..21e0640 --- /dev/null +++ b/app/bin/bitmaps/svg/ok.svg @@ -0,0 +1,55 @@ + +image/svg+xml + + + diff --git a/app/bin/bitmaps/svg/pan-zoom.svg b/app/bin/bitmaps/svg/pan-zoom.svg new file mode 100644 index 0000000..7597072 --- /dev/null +++ b/app/bin/bitmaps/svg/pan-zoom.svg @@ -0,0 +1,89 @@ + +image/svg+xml + + + + + + + + diff --git a/app/bin/bitmaps/svg/parallel-line.svg b/app/bin/bitmaps/svg/parallel-line.svg new file mode 100644 index 0000000..ad96c16 --- /dev/null +++ b/app/bin/bitmaps/svg/parallel-line.svg @@ -0,0 +1,155 @@ + +image/svg+xml diff --git a/app/bin/bitmaps/svg/parallel.svg b/app/bin/bitmaps/svg/parallel.svg new file mode 100644 index 0000000..9ff2898 --- /dev/null +++ b/app/bin/bitmaps/svg/parallel.svg @@ -0,0 +1,221 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/bin/bitmaps/svg/parameter.svg b/app/bin/bitmaps/svg/parameter.svg new file mode 100644 index 0000000..b686804 --- /dev/null +++ b/app/bin/bitmaps/svg/parameter.svg @@ -0,0 +1,76 @@ + +image/svg+xml diff --git a/app/bin/bitmaps/svg/paste.svg b/app/bin/bitmaps/svg/paste.svg new file mode 100644 index 0000000..7d089d6 --- /dev/null +++ b/app/bin/bitmaps/svg/paste.svg @@ -0,0 +1,64 @@ + +image/svg+xml diff --git a/app/bin/bitmaps/svg/polygon.svg b/app/bin/bitmaps/svg/polygon.svg new file mode 100644 index 0000000..f8aa925 --- /dev/null +++ b/app/bin/bitmaps/svg/polygon.svg @@ -0,0 +1,57 @@ + +image/svg+xml + + + + diff --git a/app/bin/bitmaps/svg/polyline.svg b/app/bin/bitmaps/svg/polyline.svg new file mode 100644 index 0000000..695bad9 --- /dev/null +++ b/app/bin/bitmaps/svg/polyline.svg @@ -0,0 +1,56 @@ + +image/svg+xml diff --git a/app/bin/bitmaps/svg/profile.svg b/app/bin/bitmaps/svg/profile.svg new file mode 100644 index 0000000..9f76546 --- /dev/null +++ b/app/bin/bitmaps/svg/profile.svg @@ -0,0 +1,176 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + diff --git a/app/bin/bitmaps/svg/protractor.svg b/app/bin/bitmaps/svg/protractor.svg new file mode 100644 index 0000000..6e7d141 --- /dev/null +++ b/app/bin/bitmaps/svg/protractor.svg @@ -0,0 +1,68 @@ + +image/svg+xml diff --git a/app/bin/bitmaps/svg/redo.svg b/app/bin/bitmaps/svg/redo.svg new file mode 100644 index 0000000..77c8cb8 --- /dev/null +++ b/app/bin/bitmaps/svg/redo.svg @@ -0,0 +1,52 @@ + +image/svg+xml + + + diff --git a/app/bin/bitmaps/svg/reflect.svg b/app/bin/bitmaps/svg/reflect.svg new file mode 100644 index 0000000..837743c --- /dev/null +++ b/app/bin/bitmaps/svg/reflect.svg @@ -0,0 +1,71 @@ + +image/svg+xml + + + + + + diff --git a/app/bin/bitmaps/svg/roadbed.svg b/app/bin/bitmaps/svg/roadbed.svg new file mode 100644 index 0000000..0a2f264 --- /dev/null +++ b/app/bin/bitmaps/svg/roadbed.svg @@ -0,0 +1,121 @@ + +image/svg+xml diff --git a/app/bin/bitmaps/svg/rotate.svg b/app/bin/bitmaps/svg/rotate.svg new file mode 100644 index 0000000..2c788f2 --- /dev/null +++ b/app/bin/bitmaps/svg/rotate.svg @@ -0,0 +1,222 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/bin/bitmaps/svg/ruler.svg b/app/bin/bitmaps/svg/ruler.svg new file mode 100644 index 0000000..8cb140b --- /dev/null +++ b/app/bin/bitmaps/svg/ruler.svg @@ -0,0 +1,81 @@ + +image/svg+xml1 diff --git a/app/bin/bitmaps/svg/select.svg b/app/bin/bitmaps/svg/select.svg new file mode 100644 index 0000000..bb81e69 --- /dev/null +++ b/app/bin/bitmaps/svg/select.svg @@ -0,0 +1,153 @@ + +image/svg+xml + + + + + + + + + + + + + + diff --git a/app/bin/bitmaps/svg/sensor.svg b/app/bin/bitmaps/svg/sensor.svg new file mode 100644 index 0000000..4188f0e --- /dev/null +++ b/app/bin/bitmaps/svg/sensor.svg @@ -0,0 +1,71 @@ + +image/svg+xml diff --git a/app/bin/bitmaps/svg/signal.svg b/app/bin/bitmaps/svg/signal.svg new file mode 100644 index 0000000..c0e11be --- /dev/null +++ b/app/bin/bitmaps/svg/signal.svg @@ -0,0 +1,82 @@ + +image/svg+xml diff --git a/app/bin/bitmaps/svg/snap-curs.svg b/app/bin/bitmaps/svg/snap-curs.svg new file mode 100644 index 0000000..fa700ce --- /dev/null +++ b/app/bin/bitmaps/svg/snap-curs.svg @@ -0,0 +1,130 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/bin/bitmaps/svg/snap-grid.svg b/app/bin/bitmaps/svg/snap-grid.svg new file mode 100644 index 0000000..f6650a7 --- /dev/null +++ b/app/bin/bitmaps/svg/snap-grid.svg @@ -0,0 +1,128 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/bin/bitmaps/svg/split-draw.svg b/app/bin/bitmaps/svg/split-draw.svg new file mode 100644 index 0000000..d74ee25 --- /dev/null +++ b/app/bin/bitmaps/svg/split-draw.svg @@ -0,0 +1,97 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + diff --git a/app/bin/bitmaps/svg/split.svg b/app/bin/bitmaps/svg/split.svg new file mode 100644 index 0000000..2bc28cb --- /dev/null +++ b/app/bin/bitmaps/svg/split.svg @@ -0,0 +1,153 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + diff --git a/app/bin/bitmaps/svg/star.svg b/app/bin/bitmaps/svg/star.svg new file mode 100644 index 0000000..13f0914 --- /dev/null +++ b/app/bin/bitmaps/svg/star.svg @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + diff --git a/app/bin/bitmaps/svg/sticky-doc.svg b/app/bin/bitmaps/svg/sticky-doc.svg new file mode 100644 index 0000000..20ea76f --- /dev/null +++ b/app/bin/bitmaps/svg/sticky-doc.svg @@ -0,0 +1,72 @@ + +image/svg+xml diff --git a/app/bin/bitmaps/svg/sticky-link.svg b/app/bin/bitmaps/svg/sticky-link.svg new file mode 100644 index 0000000..f403661 --- /dev/null +++ b/app/bin/bitmaps/svg/sticky-link.svg @@ -0,0 +1,76 @@ + +image/svg+xml diff --git a/app/bin/bitmaps/svg/sticky-note.svg b/app/bin/bitmaps/svg/sticky-note.svg new file mode 100644 index 0000000..1fe3d30 --- /dev/null +++ b/app/bin/bitmaps/svg/sticky-note.svg @@ -0,0 +1,88 @@ + +image/svg+xml diff --git a/app/bin/bitmaps/svg/stop.svg b/app/bin/bitmaps/svg/stop.svg new file mode 100644 index 0000000..4bd5fa0 --- /dev/null +++ b/app/bin/bitmaps/svg/stop.svg @@ -0,0 +1,106 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + diff --git a/app/bin/bitmaps/svg/straight-line.svg b/app/bin/bitmaps/svg/straight-line.svg new file mode 100644 index 0000000..32a01a3 --- /dev/null +++ b/app/bin/bitmaps/svg/straight-line.svg @@ -0,0 +1,126 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + diff --git a/app/bin/bitmaps/svg/straight.svg b/app/bin/bitmaps/svg/straight.svg new file mode 100644 index 0000000..6c5f37b --- /dev/null +++ b/app/bin/bitmaps/svg/straight.svg @@ -0,0 +1,160 @@ + +image/svg+xml + + + + + + + + + + + + + + + diff --git a/app/bin/bitmaps/svg/switch-motor.svg b/app/bin/bitmaps/svg/switch-motor.svg new file mode 100644 index 0000000..9c842e3 --- /dev/null +++ b/app/bin/bitmaps/svg/switch-motor.svg @@ -0,0 +1,89 @@ + +image/svg+xml diff --git a/app/bin/bitmaps/svg/switchm.svg b/app/bin/bitmaps/svg/switchm.svg new file mode 100644 index 0000000..5064f4e --- /dev/null +++ b/app/bin/bitmaps/svg/switchm.svg @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + diff --git a/app/bin/bitmaps/svg/switchmdel.svg b/app/bin/bitmaps/svg/switchmdel.svg new file mode 100644 index 0000000..cdf6d81 --- /dev/null +++ b/app/bin/bitmaps/svg/switchmdel.svg @@ -0,0 +1,191 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + diff --git a/app/bin/bitmaps/svg/switchmedit.svg b/app/bin/bitmaps/svg/switchmedit.svg new file mode 100644 index 0000000..9a2008a --- /dev/null +++ b/app/bin/bitmaps/svg/switchmedit.svg @@ -0,0 +1,214 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + diff --git a/app/bin/bitmaps/svg/switchmnew.svg b/app/bin/bitmaps/svg/switchmnew.svg new file mode 100644 index 0000000..4f8a2e6 --- /dev/null +++ b/app/bin/bitmaps/svg/switchmnew.svg @@ -0,0 +1,172 @@ + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + diff --git a/app/bin/bitmaps/svg/table-edge.svg b/app/bin/bitmaps/svg/table-edge.svg new file mode 100644 index 0000000..e2663ac --- /dev/null +++ b/app/bin/bitmaps/svg/table-edge.svg @@ -0,0 +1,80 @@ + +image/svg+xml + + + + + + + + + diff --git a/app/bin/bitmaps/svg/text.svg b/app/bin/bitmaps/svg/text.svg new file mode 100644 index 0000000..c5e5c32 --- /dev/null +++ b/app/bin/bitmaps/svg/text.svg @@ -0,0 +1,56 @@ + +image/svg+xml + +A + diff --git a/app/bin/bitmaps/svg/ties.svg b/app/bin/bitmaps/svg/ties.svg new file mode 100644 index 0000000..b8e8c35 --- /dev/null +++ b/app/bin/bitmaps/svg/ties.svg @@ -0,0 +1,97 @@ + +image/svg+xml diff --git a/app/bin/bitmaps/svg/tipofday.svg b/app/bin/bitmaps/svg/tipofday.svg new file mode 100644 index 0000000..c83540d --- /dev/null +++ b/app/bin/bitmaps/svg/tipofday.svg @@ -0,0 +1,1176 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + Info + + + Jakub Steiner + + + + + dialog + info + + + http://jimmac.musichall.cz + + + + Garrett LeSage + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/bin/bitmaps/svg/top.svg b/app/bin/bitmaps/svg/top.svg new file mode 100644 index 0000000..ccf60ad --- /dev/null +++ b/app/bin/bitmaps/svg/top.svg @@ -0,0 +1,62 @@ + +image/svg+xml + + + + diff --git a/app/bin/bitmaps/svg/train.svg b/app/bin/bitmaps/svg/train.svg new file mode 100644 index 0000000..e2d2a71 --- /dev/null +++ b/app/bin/bitmaps/svg/train.svg @@ -0,0 +1,173 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/bin/bitmaps/svg/trim.svg b/app/bin/bitmaps/svg/trim.svg new file mode 100644 index 0000000..553d08f --- /dev/null +++ b/app/bin/bitmaps/svg/trim.svg @@ -0,0 +1,91 @@ + +image/svg+xml diff --git a/app/bin/bitmaps/svg/tunnel.svg b/app/bin/bitmaps/svg/tunnel.svg new file mode 100644 index 0000000..c31fabe --- /dev/null +++ b/app/bin/bitmaps/svg/tunnel.svg @@ -0,0 +1,164 @@ + +image/svg+xml diff --git a/app/bin/bitmaps/svg/turnout-design.svg b/app/bin/bitmaps/svg/turnout-design.svg new file mode 100644 index 0000000..0c394e1 --- /dev/null +++ b/app/bin/bitmaps/svg/turnout-design.svg @@ -0,0 +1,183 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/bin/bitmaps/svg/turnout.svg b/app/bin/bitmaps/svg/turnout.svg new file mode 100644 index 0000000..35b8260 --- /dev/null +++ b/app/bin/bitmaps/svg/turnout.svg @@ -0,0 +1,168 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/bin/bitmaps/svg/turntable.svg b/app/bin/bitmaps/svg/turntable.svg new file mode 100644 index 0000000..8dbb510 --- /dev/null +++ b/app/bin/bitmaps/svg/turntable.svg @@ -0,0 +1,175 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + diff --git a/app/bin/bitmaps/svg/undo.svg b/app/bin/bitmaps/svg/undo.svg new file mode 100644 index 0000000..290e251 --- /dev/null +++ b/app/bin/bitmaps/svg/undo.svg @@ -0,0 +1,53 @@ + +image/svg+xml + + + diff --git a/app/bin/bitmaps/svg/zoom-choose.svg b/app/bin/bitmaps/svg/zoom-choose.svg new file mode 100644 index 0000000..a78a425 --- /dev/null +++ b/app/bin/bitmaps/svg/zoom-choose.svg @@ -0,0 +1,318 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/bin/bitmaps/svg/zoom-extent.svg b/app/bin/bitmaps/svg/zoom-extent.svg new file mode 100644 index 0000000..9ee2521 --- /dev/null +++ b/app/bin/bitmaps/svg/zoom-extent.svg @@ -0,0 +1,247 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/bin/bitmaps/svg/zoom-in.svg b/app/bin/bitmaps/svg/zoom-in.svg new file mode 100644 index 0000000..8c9a883 --- /dev/null +++ b/app/bin/bitmaps/svg/zoom-in.svg @@ -0,0 +1,222 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/bin/bitmaps/svg/zoom-out.svg b/app/bin/bitmaps/svg/zoom-out.svg new file mode 100644 index 0000000..a476985 --- /dev/null +++ b/app/bin/bitmaps/svg/zoom-out.svg @@ -0,0 +1,215 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/bin/bitmaps/switch-ai.xpm b/app/bin/bitmaps/switch-ai.xpm deleted file mode 100644 index 34213ba..0000000 --- a/app/bin/bitmaps/switch-ai.xpm +++ /dev/null @@ -1,96 +0,0 @@ -static char *switch_ai_x16[] = { - "16 16 4 1", - " c None", - "0 c #000000", - "1 c #990000", - "2 c #CC0000", - " ", - " 2 ", - " 2 ", - " 2222 ", - " 2222 ", - " 2222 ", - " 2221 ", - " 2 00 ", - " 00 ", - " 0 ", - " 0 000 ", - " 00000 ", - " 00 00 ", - " 00 000 ", - " 00 000 ", - " 00000000"}; - -static char *switch_ai_x24[] = { - "24 24 4 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #CC0000", - " ", - "222 ", - " 222 ", - " 222 ", - " 222 ", - " 22222 ", - " 222222 ", - " 222222 ", - " 222222 ", - " 222222 ", - " 222210 ", - " 000 ", - " 000 ", - " 000 ", - " 000 ", - " 000 000 ", - " 00000000 ", - " 000 00 ", - " 000 00 ", - " 00000 00 ", - " 0 00000 ", - " 0 0000 ", - " 00000000000 ", - " 00 00 "}; - -static char *switch_ai_x32[] = { - "32 32 5 1", - " c None", - "0 c #000000", - "1 c #990000", - "2 c #CC0000", - "3 c #800000", - " ", - " 22 ", - " 222 ", - " 222 ", - " 2222 ", - " 2222 ", - " 2222 ", - " 2222222 ", - " 2222222 ", - " 22222222 ", - " 22222222 ", - " 22222222 ", - " 22222221 ", - " 2222230 ", - " 2221000 ", - " 0000 ", - " 0000 ", - " 0000 ", - " 0000 ", - " 0000 ", - " 0000 0000 ", - " 000 000000 ", - " 0000000000 ", - " 0000 00 ", - " 0000 00 ", - " 000000 00 ", - " 000 0000 00 ", - " 000 000000 ", - " 00 00000 ", - " 000000000000000 ", - " 00000000000000000", - " 000000000000000 "}; - -static char **switch_ai_xpm[3] = { switch_ai_x16, switch_ai_x24, switch_ai_x32 }; - diff --git a/app/bin/bitmaps/switchm.xpm b/app/bin/bitmaps/switchm.xpm deleted file mode 100644 index 0230351..0000000 --- a/app/bin/bitmaps/switchm.xpm +++ /dev/null @@ -1,30 +0,0 @@ -/* XPM */ -static char * switchm_xpm[] = { -"16 16 11 1", -" c None", -". c #EE2828", -"+ c #EF2828", -"@ c #EF2929", -"# c #ED2828", -"$ c #EE2929", -"% c #EC2828", -"& c #E92C2C", -"* c #D5403F", -"= c #2E3436", -"- c #898A83", -" ", -" .+@ ", -" ..@# ", -" $@$ ", -" .@@. ", -" @@. ", -" .@%. ", -" &*. ", -" = ", -" === ", -" == == ", -" == == ", -" == = ", -" == == ", -" === - === ", -" == == "}; diff --git a/app/bin/bitmaps/table-edge.xpm b/app/bin/bitmaps/table-edge.xpm deleted file mode 100644 index 1983460..0000000 --- a/app/bin/bitmaps/table-edge.xpm +++ /dev/null @@ -1,114 +0,0 @@ -static char *table_edge_x16[] = { - "16 16 11 1", - " c None", - "0 c #000000", - "1 c #003300", - "2 c #006600", - "3 c #333333", - "4 c #336633", - "5 c #339933", - "6 c #33CC33", - "7 c #666666", - "8 c #999999", - "9 c #808080", - " ", - " 5 ", - " 666666666666630", - " 666666666666430", - " 666666666664770", - " 666666666647970", - " 666666666479970", - " 666666664799970", - "122222222399993 ", - " 8888888979993 ", - " 888888897993 ", - " 88888889793 ", - " 8888888973 ", - " 888888870 ", - " 000000000 ", - " "}; - -static char *table_edge_x24[] = { - "24 24 10 1", - " c None", - "0 c #000000", - "1 c #333333", - "2 c #336633", - "3 c #339933", - "4 c #33CC33", - "5 c #666633", - "6 c #666666", - "7 c #999999", - "8 c #808080", - " ", - " ", - " 2 ", - " 4444444444444444444430 ", - " 4444444444444444444310 ", - " 4444444444444444443180 ", - " 4444444444444444431880 ", - " 4444444444444444318880 ", - " 4444444444444443188880 ", - " 4444444444444431888880 ", - " 4444444444444418888880 ", - " 4444444444444188888881 ", - " 333333333333188888881 ", - " 77777777777718888881 ", - " 7777777777771888881 ", - " 777777777777188881 ", - " 777777777777188810 ", - " 77777777777718851 ", - " 7777777777771861 ", - " 777777777777161 ", - " 77777777777701 ", - " 0000000000000 ", - " ", - " "}; - -static char *table_edge_x32[] = { - "32 32 10 1", - " c None", - "0 c #000000", - "1 c #333333", - "2 c #336633", - "3 c #339933", - "4 c #33CC33", - "5 c #666633", - "6 c #666666", - "7 c #999999", - "8 c #808080", - " ", - " ", - " ", - " 4444444444444444444444444443 ", - " 444444444444444444444444444310 ", - " 444444444444444444444444444110 ", - " 444444444444444444444444441860 ", - " 444444444444444444444444428860 ", - " 444444444444444444444444268860 ", - " 444444444444444444444442688860 ", - " 444444444444444444444426888860 ", - " 444444444444444444444268888860 ", - " 444444444444444444443588888860 ", - " 444444444444444444431888888860 ", - " 444444444444444444318888888860 ", - " 44444444444444444318888888881 ", - " 2333333333333333318888888881 ", - " 888888888888888668888888810 ", - " 77777777777777766888888851 ", - " 7777777777777776688888861 ", - " 777777777777777668888861 ", - " 77777777777777766888861 ", - " 7777777777777776688861 ", - " 777777777777777688881 ", - " 77777777777777768881 ", - " 7777777777777776881 ", - " 777777777777777661 ", - " 77777777777777711 ", - " 000000000000000000 ", - " ", - " ", - " "}; - -static char **table_edge_xpm[3] = { table_edge_x16, table_edge_x24, table_edge_x32 }; - diff --git a/app/bin/bitmaps/text.xpm b/app/bin/bitmaps/text.xpm deleted file mode 100644 index 12bc092..0000000 --- a/app/bin/bitmaps/text.xpm +++ /dev/null @@ -1,89 +0,0 @@ -static char *text_x16[] = { - "16 16 2 1", - " c None", - "0 c #000000", - " ", - " 0000 ", - " 000000 ", - " 000000 ", - " 0000000 ", - " 00000000 ", - " 000 000 ", - " 0000 0000 ", - " 0000 0000 ", - " 0000 00000 ", - " 000000000000 ", - " 000000000000 ", - " 0000 0000 ", - " 0000 0000 ", - "0000 0000", - "0000 0000"}; - -static char *text_x24[] = { - "24 24 2 1", - " c None", - "0 c #000000", - " ", - " 000000 ", - " 000000 ", - " 00000000 ", - " 00000000 ", - " 0000000000 ", - " 0000000000 ", - " 0000000000 ", - " 00000 00000 ", - " 00000 00000 ", - " 000000 000000 ", - " 00000 00000 ", - " 00000 000000 ", - " 00000 00000 ", - " 0000000000000000 ", - " 000000000000000000 ", - " 000000000000000000 ", - " 0000000000000000000 ", - " 000000 000000 ", - " 00000 00000 ", - " 000000 000000 ", - " 00000 00000 ", - "000000 000000", - " "}; - -static char *text_x32[] = { - "32 32 2 1", - " c None", - "0 c #000000", - " ", - " 00000000 ", - " 00000000 ", - " 000000000 ", - " 0000000000 ", - " 0000000000 ", - " 000000000000 ", - " 000000000000 ", - " 00000000000000 ", - " 00000000000000 ", - " 000000 000000 ", - " 0000000 0000000 ", - " 000000 0000000 ", - " 0000000 0000000 ", - " 0000000 0000000 ", - " 000000 0000000 ", - " 0000000 0000000 ", - " 0000000 0000000 ", - " 0000000 0000000 ", - " 0000000000000000000000 ", - " 00000000000000000000000 ", - " 000000000000000000000000 ", - " 000000000000000000000000 ", - " 00000000000000000000000000 ", - " 0000000 0000000 ", - " 0000000 00000000 ", - " 0000000 0000000 ", - " 0000000 0000000 ", - " 0000000 0000000 ", - " 0000000 0000000 ", - "00000000 00000000", - " "}; - -static char **text_xpm[3] = { text_x16, text_x24, text_x32 }; - diff --git a/app/bin/bitmaps/top.xpm b/app/bin/bitmaps/top.xpm deleted file mode 100644 index 84d2152..0000000 --- a/app/bin/bitmaps/top.xpm +++ /dev/null @@ -1,111 +0,0 @@ -static char *top_x16[] = { - "16 16 9 1", - " c None", - "0 c #000000", - "1 c #660000", - "2 c #990000", - "3 c #993333", - "4 c #996666", - "5 c #CC0000", - "6 c #FF0000", - "7 c #808080", - " ", - " ", - " 000000000 ", - " 214777777770", - " 22555377777770", - " 256666637777770", - " 566666663777770", - "2566666662777770", - "2566666662777770", - "2566666662777770", - " 266666654777770", - " 26666537777770", - " 2222477777770", - " 0000000000", - " ", - " "}; - -static char *top_x24[] = { - "24 24 10 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #990000", - "3 c #993333", - "4 c #996666", - "5 c #CC0000", - "6 c #FF0000", - "7 c #808080", - "8 c #800000", - " ", - " ", - " ", - " ", - " 000000000000000 ", - " 222847777777777770 ", - " 2556552377777777770 ", - " 26666666537777777770 ", - " 266666666663777777770 ", - " 2666666666665477777770 ", - " 2666666666666377777770 ", - " 2666666666666277777770 ", - "25666666666666277777770 ", - " 2666666666666377777770 ", - " 2666666666665377777770 ", - " 2566666666662777777770 ", - " 256666666654777777770 ", - " 25666666247777777770 ", - " 2225223777777777770 ", - " 100000000000000 ", - " ", - " ", - " ", - " "}; - -static char *top_x32[] = { - "32 32 9 1", - " c None", - "0 c #000000", - "1 c #660000", - "2 c #990000", - "3 c #993333", - "4 c #996666", - "5 c #CC0000", - "6 c #FF0000", - "7 c #808080", - " ", - " ", - " ", - " ", - " ", - " 00000000000000000000 ", - " 07777777777777777770 ", - " 222223477777777777777770 ", - " 2556666537777777777777770 ", - " 226666666662477777777777770 ", - " 2566666666666547777777777770 ", - " 25666666666666654777777777770 ", - " 26666666666666663777777777770 ", - " 256666666666666665477777777770 ", - " 266666666666666666377777777770 ", - " 266666666666666666377777777770 ", - " 266666666666666666377777777770 ", - " 266666666666666666377777777770 ", - " 256666666666666665377777777770 ", - " 256666666666666665477777777770 ", - " 26666666666666663777777777770 ", - " 2666666666666637777777777770 ", - " 2566666666666347777777777770 ", - " 225666666653777777777777770 ", - " 2225552247777777777777770 ", - " 2217777777777777777770 ", - " 00000000000000000000 ", - " ", - " ", - " ", - " ", - " "}; - -static char **top_xpm[3] = { top_x16, top_x24, top_x32 }; - diff --git a/app/bin/bitmaps/train.xpm b/app/bin/bitmaps/train.xpm deleted file mode 100644 index bc9a846..0000000 --- a/app/bin/bitmaps/train.xpm +++ /dev/null @@ -1,118 +0,0 @@ -static char *train_x16[] = { - "16 16 12 1", - " c None", - "0 c #000000", - "1 c #003300", - "2 c #003333", - "3 c #006633", - "4 c #006666", - "5 c #009966", - "6 c #669933", - "7 c #999933", - "8 c #99CC33", - "9 c #CCCC33", - "A c #808080", - " ", - " AAAAAAAAA ", - " AAAAAAAAAAA ", - " AAAAAAAAAAAA ", - " AAAAAAAAAAAA ", - " AAAAA A ", - " 0 A ", - " 0000 0 ", - " 0 0 0 ", - " 3761111111111 ", - " 3985555555555 ", - " 3984444444444 ", - " 3971221221221 ", - " 000000000 00 ", - " 0000000000000 0", - " 0 0 0 "}; - -static char *train_x24[] = { - "24 24 11 1", - " c None", - "0 c #000000", - "1 c #003300", - "2 c #003333", - "3 c #006633", - "4 c #009966", - "5 c #669933", - "6 c #999933", - "7 c #99CC33", - "8 c #FFFF33", - "9 c #808080", - " ", - " 9999999999 ", - " 999999999999999 ", - " 99999999999999999 ", - " 999999999999999999 ", - " 999999999999999999 ", - " 99999999999999999 ", - " 99999999999 99 ", - " 99 99 ", - " 99 ", - " 0000000 00 ", - " 0 00 ", - " 0 00 00 ", - " 0 00 00 ", - " 33573322222222222222 ", - " 33683344444444444444 ", - " 33683344444444444444 ", - " 33683333333333333333 ", - " 33683322222222222222 ", - " 333521000000000000000 ", - " 00000000 0000 00 ", - " 00 00000000 0000 00 00", - " 00 000 000 000 00 ", - " "}; - -static char *train_x32[] = { - "32 32 12 1", - " c None", - "0 c #000000", - "1 c #003300", - "2 c #003333", - "3 c #006633", - "4 c #009966", - "5 c #336633", - "6 c #669933", - "7 c #999933", - "8 c #CCCC33", - "9 c #FFFF33", - "A c #808080", - " ", - " ", - " AAAAAAAAAAAAAAAA ", - " AAAAAAAAAAAAAAAAAAAA ", - " AAAAAAAAAAAAAAAAAAAAAAA ", - " AAAAAAAAAAAAAAAAAAAAAAAA ", - " AAAAAAAAAAAAAAAAAAAAAAAA ", - " AAAAAAAAAAAAAAAAAAAAAAAAA ", - " AAAAAAAAAAAAAAAAAAAAAAAA ", - " AAAAAAAAAAAAAAAAA AAA ", - " AAAAAAAAAAA AA ", - " AA ", - " AA ", - " 0000 ", - " 00000000 0000 ", - " 00 0000 ", - " 00 000 0000 ", - " 00 000 0000 ", - " 33333330000000000000000000 ", - " 33587332222222222222222222 ", - " 33698333333333333333333333 ", - " 33698334444444444444444444 ", - " 33698334444444444444444444 ", - " 33698333333333333333333333 ", - " 33698332222222222222222222 ", - " 33333320011000011000011100 ", - " 0000 0000 0000 00 ", - " 0 000000000000000000 0 00 ", - " 000 000000000000000000 000 00 ", - " 000 00000 0000 0000 000 ", - " 000 00 00 0 ", - " "}; - -static char **train_xpm[3] = { train_x16, train_x24, train_x32 }; - diff --git a/app/bin/bitmaps/trim.xpm b/app/bin/bitmaps/trim.xpm deleted file mode 100644 index ac679d6..0000000 --- a/app/bin/bitmaps/trim.xpm +++ /dev/null @@ -1,99 +0,0 @@ -static char *trim_x16[] = { - "16 16 6 1", - " c None", - "0 c #000000", - "1 c #666666", - "2 c #CC0000", - "3 c #808080", - "4 c #800000", - " ", - " 3 ", - " 22 3 ", - " 22 3 ", - " 22 2 3 ", - " 222 3 ", - " 22 3 ", - " 222221 ", - " 42222 ", - " 0 2222 ", - " 0 222 ", - " 00 2 2 ", - " 00 2 ", - " 00 2 ", - " 00 2 ", - " "}; - -static char *trim_x24[] = { - "24 24 5 1", - " c None", - "0 c #000000", - "1 c #990000", - "2 c #CC0000", - "3 c #808080", - " ", - " ", - " 3 ", - " 2 3 ", - " 2 3 ", - " 2 2 3 ", - " 22 22 3 ", - " 22 22 3 ", - " 2222 3 ", - " 222 3 ", - " 222222 3 ", - " 2222222 ", - " 122 222 ", - " 0 2222222 ", - " 0 2222 ", - " 0 22 2 ", - " 0 22 2 ", - " 00 22 2 ", - " 00 22 2 ", - " 00 22 ", - " 00 22 ", - " 00 2 ", - " 0 ", - " "}; - -static char *trim_x32[] = { - "32 32 5 1", - " c None", - "0 c #000000", - "1 c #CC0000", - "2 c #808080", - "3 c #800000", - " ", - " ", - " 2 ", - " 222 ", - " 11 222 ", - " 111 222 ", - " 111 222 ", - " 111 1 222 ", - " 111 111 222 ", - " 111 111 222 ", - " 111 111 222 ", - " 111111 222 ", - " 11111 222 ", - " 11111111 222 ", - " 1111111111 2 ", - " 111 1111 ", - " 3111 ", - " 003111111111 ", - " 000 11111111 ", - " 000 11111 ", - " 000 111111 ", - " 000 111 111 ", - " 000 111 111 ", - " 000 111 111 ", - " 000 11 111 ", - " 0000 111 ", - " 0000 111 ", - " 0000 1111 ", - " 000 11 ", - " 00 ", - " ", - " "}; - -static char **trim_xpm[3] = { trim_x16, trim_x24, trim_x32 }; - diff --git a/app/bin/bitmaps/tunnel.xpm b/app/bin/bitmaps/tunnel.xpm deleted file mode 100644 index 9b70b28..0000000 --- a/app/bin/bitmaps/tunnel.xpm +++ /dev/null @@ -1,118 +0,0 @@ -static char *tunnel_x16[] = { - "16 16 11 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #333333", - "3 c #663300", - "4 c #666666", - "5 c #993300", - "6 c #996600", - "7 c #999999", - "8 c #CC6600", - "9 c #808080", - " ", - " ", - " ", - " ", - " 00 ", - " 8 8 007 7 7 7 ", - "0303102999949499", - " 6 63027797 7 79", - " 8 8 0077 7 7 7 ", - "0000002444444444", - " 8 8 0077 7 7 7 ", - " 00 ", - " 0 ", - " ", - " ", - " "}; - -static char *tunnel_x24[] = { - "24 24 11 1", - " c None", - "0 c #000000", - "1 c #333300", - "2 c #333333", - "3 c #663300", - "4 c #666666", - "5 c #993300", - "6 c #996600", - "7 c #999999", - "8 c #CC6600", - "9 c #808080", - " ", - " ", - " ", - " ", - " ", - " ", - " 00 ", - " 00 ", - " 8 8 00 7 7 7 77 ", - " 35006000449949944994994", - " 35006000449949944994994", - " 88 8 0 77 7 7 77 ", - " 88 8 0 77 7 7 77 ", - " 66 6 02 79 97 79 77 ", - "013003000449949944994994", - " 88 8 0 77 7 7 77 ", - " 00 ", - " 00 ", - " 0 ", - " ", - " ", - " ", - " ", - " "}; - -static char *tunnel_x32[] = { - "32 32 13 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #333300", - "3 c #333333", - "4 c #663300", - "5 c #663333", - "6 c #666666", - "7 c #993300", - "8 c #996600", - "9 c #999999", - "A c #CC6600", - "B c #808080", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " 00 ", - " 000 ", - " 00 ", - " AA AA 00 99 99 99 99 ", - " 488 884 003 99 99B 99 99B ", - " 14400441000566BB66BBB66BB66BBB6", - " AA AA 00 99 99 99 99 ", - " AA AA 00 99 99 99 99 ", - " AA AA 00 99 99 99 99 ", - " AA AA 00 99 99 99 99 ", - " 28700782000366BB66BBB66BB66BBB ", - " 28700782000366BB66BBB66BB66BBB ", - " AA AA 00 99 99 99 99 ", - " 000 ", - " 000 ", - " 0000 ", - " 0 ", - " ", - " ", - " ", - " ", - " ", - " ", - " "}; - -static char **tunnel_xpm[3] = { tunnel_x16, tunnel_x24, tunnel_x32 }; - diff --git a/app/bin/bitmaps/turnout-designer.xpm b/app/bin/bitmaps/turnout-designer.xpm deleted file mode 100644 index 00db9be..0000000 --- a/app/bin/bitmaps/turnout-designer.xpm +++ /dev/null @@ -1,129 +0,0 @@ -static char *turnout_designer_x16[] = { - "16 16 15 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #333300", - "3 c #333333", - "4 c #663300", - "5 c #666666", - "6 c #996600", - "7 c #999999", - "8 c #CC6600", - "9 c #CC9900", - "A c #CC9966", - "B c #CCCCCC", - "C c #C0C0C0", - "D c #808080", - " ", - " ", - " BBBBBBB ", - " B777777CB ", - " BC5500557B ", - " BBBBD3BBBB ", - " BD3B99640 ", - " BD3B64169 ", - " CD3B669 60", - " 9 9667D3B9 6168", - "10000077DB000000", - " 9 999ACC76 9 9 ", - "4424101244414240", - " 86646866684868 ", - " ", - " "}; - -static char *turnout_designer_x24[] = { - "24 24 17 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #333300", - "3 c #333333", - "4 c #663300", - "5 c #666666", - "6 c #996600", - "7 c #999966", - "8 c #999999", - "9 c #CC6600", - "A c #CC9900", - "B c #CC9999", - "C c #CCCC99", - "D c #CCCCCC", - "E c #C0C0C0", - "F c #808080", - " ", - " ", - " ", - " ", - " DDEEEEEEEEEDD ", - " D50000000008D ", - " DE00000000008D ", - " DDEEE8005EEEDD ", - " DD008D ", - " D008D A40 ", - " D008DAAA016 ", - " D008D9424 AA ", - " D008846AA A0 ", - " A D008EAA AA024 ", - " AA A 925D008DAA 4409A ", - "0000000003D0088000000000", - " AA A A DEED826 AA A ", - " AA A A 7FF7 AA AA A ", - " 66 96040040 9 66 66 96 ", - "044041041140040440440420", - " AA A A A A AA AA A ", - " ", - " ", - " "}; - -static char *turnout_designer_x32[] = { - "32 32 14 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #333300", - "3 c #333333", - "4 c #663300", - "5 c #666666", - "6 c #993300", - "7 c #996600", - "8 c #999999", - "9 c #CC6600", - "A c #CC9900", - "B c #CCCCCC", - "C c #C0C0C0", - " ", - " ", - " ", - " ", - " ", - " BBBBBBBBBBBBBBBBB ", - " BB5555555555555BB ", - " B80000000000000BB ", - " BB30000000000000BB ", - " BC55555500355555BB ", - " BBBBBBBB8003BBBBBBB ", - " B8003BB ", - " B8003BB A00 ", - " B8003BB AA 044 ", - " B8003BB A97007A ", - " B8003BB76077 AA ", - " B8003B827 AA A ", - " B8003BC A A 920 ", - " AA B8003BB A AA 019 ", - " A A 9700B8003BB A 0410AA ", - " 041014000200B8003B824000440440 ", - " 94 490079 BC888B8210079 77 ", - " A A AA BBBBCC87A A AA ", - " A A AA 74007A A A AA ", - " A A 770047 AA A A AA ", - " 000000000000000000000000000000 ", - " A A AA AA AA A A AA ", - " A A A A A A A A ", - " ", - " ", - " ", - " "}; - -static char **turnout_designer_xpm[3] = { turnout_designer_x16, turnout_designer_x24, turnout_designer_x32 }; - diff --git a/app/bin/bitmaps/turnout.xpm b/app/bin/bitmaps/turnout.xpm deleted file mode 100644 index dc60fdb..0000000 --- a/app/bin/bitmaps/turnout.xpm +++ /dev/null @@ -1,107 +0,0 @@ -static char *turnout_x16[] = { - "16 16 8 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #333300", - "3 c #663300", - "4 c #996600", - "5 c #CC6600", - "6 c #CC9900", - " ", - " ", - " ", - " ", - " 64 ", - " 6414 ", - " 53236650", - " 541346 5234", - "2323002232301231", - " 54545543133535 ", - " 54533124453535 ", - "2323123232313130", - " ", - " ", - " ", - " "}; - -static char *turnout_x24[] = { - "24 24 8 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #333300", - "3 c #663300", - "4 c #996600", - "5 c #CC6600", - "6 c #CC9900", - " ", - " ", - " ", - " ", - " ", - " ", - " 6 ", - " 6 32 ", - " 643036 ", - " 6602346 66 ", - " 6 32056 6 40 ", - " 6 33046 66 64035 ", - " 3404302014034043003243 ", - " 3404304224034030043043 ", - " 66 66 6 6 32046 66 6 ", - " 66 66 6322035 66 66 6 ", - "02303200003023032032032 ", - " 45 5405335 45 54 54 54 ", - " ", - " ", - " ", - " ", - " ", - " "}; - -static char *turnout_x32[] = { - "32 32 8 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #333300", - "3 c #663300", - "4 c #996600", - "5 c #CC6600", - "6 c #CC9900", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " 6 ", - " 50 ", - " 6660035 ", - " 66121 6 ", - " 6 32056 66 ", - " 6 50046 6 6 0 ", - " 64004 66 66 32 ", - " 6 6 66 0310 6 66 62046 ", - " 54 500320044 5 45 0113054 ", - " 032003001300320030022002320320 ", - " 6 6 66 6 63014 66 66 ", - " 6 6 66 6 021066 66 66 ", - " 6 6 66 41006 66 66 66 ", - " 54 500330044 53 45 45 54 ", - " 032003001300320031023002300320 ", - " 6 6 66 6 6 66 66 66 ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " "}; - -static char **turnout_xpm[3] = { turnout_x16, turnout_x24, turnout_x32 }; - diff --git a/app/bin/bitmaps/turntable.xpm b/app/bin/bitmaps/turntable.xpm deleted file mode 100644 index c6e6375..0000000 --- a/app/bin/bitmaps/turntable.xpm +++ /dev/null @@ -1,133 +0,0 @@ -static char *turntable_x16[] = { - "16 16 17 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #333300", - "3 c #333333", - "4 c #663300", - "5 c #663333", - "6 c #666633", - "7 c #666666", - "8 c #996600", - "9 c #999999", - "A c #CC6600", - "B c #CC9900", - "C c #CCCCCC", - "D c #FFFFFF", - "E c #C0C0C0", - "F c #808080", - " 1B ", - " 0 82B 000 ", - " 84 85033303 ", - " B446FF397793 ", - " B39DF3977DC3 ", - " 7DDF3977DDF3", - "88A5EDDF3977DDC3", - "4443CDDF3977DDD0", - "BBB3CDDF3977DDD3", - "1000EDDF3977DDC3", - "BBB49DDF3977DDE3", - " B3CDF3977DD3 ", - " B483CF3977CF3 ", - " 84 837373330 ", - " 0B82B03330 ", - " 04B "}; - -static char *turntable_x24[] = { - "24 24 17 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #333300", - "3 c #333333", - "4 c #663300", - "5 c #666600", - "6 c #666633", - "7 c #666666", - "8 c #996600", - "9 c #999999", - "A c #CC6600", - "B c #CC9900", - "C c #CCCCCC", - "D c #FFFFFF", - "E c #C0C0C0", - "F c #808080", - " 0 B ", - " 48 ", - " 0 B20B 000 ", - " 2A 48300000030 ", - " B1 B8397799939F3 ", - " 467CD779993EDE3 ", - " B83CDD779993EDDC3 ", - " 3CDDD779993EDDD93 ", - " 0FDDDD779993EDDDD3 ", - " B B3EDDDD779993EDDDD90", - "040243CDDDD779993EDDDDC3", - " A 8A0DDDDD779993EDDDDC3", - " B BB3DDDDD779993EDDDDC3", - " A 8A3CDDDD779993EDDDDE3", - "040243CDDDD779993EDDDD90", - " B B39DDDD779993EDDDD7 ", - " 3CDDD779993EDDDC3 ", - " B2FDDD779993EDDD3 ", - " 443EDD779993EDDF3 ", - " B40 B37C779993EC73 ", - " 24 B41333777073 ", - " 0 B 08B 0300330 ", - " 48 ", - " 04B "}; - -static char *turntable_x32[] = { - "32 32 16 1", - " c None", - "0 c #000000", - "1 c #330000", - "2 c #333300", - "3 c #333333", - "4 c #663300", - "5 c #663333", - "6 c #666666", - "7 c #996600", - "8 c #999999", - "9 c #CC6600", - "A c #CC9900", - "B c #CCCCCC", - "C c #FFFFFF", - "D c #C0C0C0", - "E c #808080", - " 0 ", - " 04A ", - " 72 ", - " 0 AA 00AA 0000 ", - " 04A 47 3000000033 ", - " A71 A903D668888E3D33 ", - " A 02AA38BC668888E3CC83 ", - " 443BCCC668888E3CCCB6 ", - " A 08CCCC668888E3CCCCB3 ", - " 3ECCCCC668888E3CCCCCD3 ", - " 3BCCCCC668888E3CCCCCC6 ", - " 08CCCCCC668888E3CCCCCCD3 ", - " AA A 3BCCCCCC668888E3CCCCCCB3 ", - " 77 903CCCCCCC668888E3CCCCCCC6 ", - "04400403CCCCCCC668888E3CCCCCCC80", - " AA A0ECCCCCCC668888E3CCCCCCC83", - " AA A0ECCCCCCC668888E3CCCCCCCD3", - " AA A 6CCCCCCC668888E3CCCCCCC80", - "04400403CCCCCCC668888E3CCCCCCC80", - " 77 9 3BCCCCCC668888E3CCCCCCC6 ", - " AA A 3DCCCCCC668888E3CCCCCCB3 ", - " 6CCCCCC668888E3CCCCCC83 ", - " 3BCCCCC668888E3CCCCCB3 ", - " A13BCCCC668888E3CCCCC6 ", - " 743ECCCC668888E3CCCC83 ", - " A 09A5EBCC668888E3CCC86 ", - " 91 AA33DC668888E3CB63 ", - " 2A 74 363366666363 ", - " 0 A 09A 03000033 ", - " 90 ", - " 29 ", - " 0 AA "}; - -static char **turntable_xpm[3] = { turntable_x16, turntable_x24, turntable_x32 }; - diff --git a/app/bin/bitmaps/undo.xpm b/app/bin/bitmaps/undo.xpm deleted file mode 100644 index 2450967..0000000 --- a/app/bin/bitmaps/undo.xpm +++ /dev/null @@ -1,103 +0,0 @@ -static char *undo_x16[] = { - "16 16 6 1", - " c None", - "0 c #000000", - "1 c #996600", - "2 c #CC6600", - "3 c #CC9900", - "4 c #FFCC00", - " ", - " 1 ", - " 11 ", - " 13411 ", - " 134443311 ", - " 1344444432 ", - " 1342114431 ", - " 11 1443 ", - " 1 1441 ", - " 141 ", - " 1331 ", - " 131 ", - " 131 ", - " 131 ", - " 11 ", - " "}; - -static char *undo_x24[] = { - "24 24 7 1", - " c None", - "0 c #000000", - "1 c #996600", - "2 c #CC6600", - "3 c #CC9900", - "4 c #FF9900", - "5 c #FFCC00", - " ", - " ", - " 1 ", - " 11 ", - " 12531 ", - " 1355311 ", - " 135555533311 ", - " 15555555555411 ", - " 13555555555531 ", - " 13553113555531 ", - " 2531 135552 ", - " 111 135551 ", - " 1 3553 ", - " 13551 ", - " 1551 ", - " 1353 ", - " 1531 ", - " 1551 ", - " 1351 ", - " 151 ", - " 151 ", - " 131 ", - " 11 ", - " "}; - -static char *undo_x32[] = { - "32 32 7 1", - " c None", - "0 c #000000", - "1 c #996600", - "2 c #CC6600", - "3 c #CC9900", - "4 c #FF9900", - "5 c #FFCC00", - " ", - " ", - " ", - " 1 ", - " 121 ", - " 12531 ", - " 135531 ", - " 13555551111 ", - " 135555555433211 ", - " 15555555555555531 ", - " 1355555555555555531 ", - " 255555555555555531 ", - " 135555112355555531 ", - " 125551 113555552 ", - " 1351 12555551 ", - " 121 2555531 ", - " 11 255551 ", - " 35552 ", - " 135531 ", - " 15551 ", - " 13551 ", - " 15531 ", - " 14531 ", - " 3551 ", - " 1551 ", - " 1551 ", - " 1351 ", - " 1351 ", - " 151 ", - " 111 ", - " ", - " "}; - -static char **undo_xpm[3] = { undo_x16, undo_x24, undo_x32 }; - diff --git a/app/bin/bitmaps/zoom-choose.xpm b/app/bin/bitmaps/zoom-choose.xpm deleted file mode 100644 index 4066455..0000000 --- a/app/bin/bitmaps/zoom-choose.xpm +++ /dev/null @@ -1,127 +0,0 @@ -static char *zoom_choose_x16[] = { - "16 16 13 1", - " c None", - "0 c #000000", - "1 c #333333", - "2 c #333366", - "3 c #336666", - "4 c #666666", - "5 c #669999", - "6 c #6699CC", - "7 c #9999CC", - "8 c #99CCCC", - "9 c #99CCFF", - "A c #99FFFF", - "B c #CCFFFF", - " ", - " 13421 ", - " 249BBB93 ", - " 3BBBBBB92 ", - " 18500000650 ", - " 19934443981 ", - " 19B73438B81 ", - " 18BB415BB50 ", - " 3BBA5BBA3 ", - " 15ABBB931 ", - " 014431141 ", - " 0140 ", - " 0140 ", - " 0110 ", - " 010 ", - " "}; - -static char *zoom_choose_x24[] = { - "24 24 15 1", - " c None", - "0 c #000000", - "1 c #003333", - "2 c #333333", - "3 c #333366", - "4 c #336666", - "5 c #666666", - "6 c #666699", - "7 c #669999", - "8 c #6699CC", - "9 c #9999CC", - "A c #99CCCC", - "B c #99CCFF", - "C c #99FFFF", - "D c #CCFFFF", - " ", - " 02220 ", - " 227ABA832 ", - " 37DDDDDDC93 ", - " 29DDDDDDDDDA3 ", - " 4DDDDDDDDDDD72 ", - " 2AD755555556CB2 ", - " 2CD725555525DD2 ", - " 0DDD4555554BDD4 ", - " 2DDDB45554ADDD4 ", - " 2BDDDA4557DDDD1 ", - " 2ADDDD754CDDDB2 ", - " 4DDDDC4BDDDD72 ", - " 27DDDDDDDDDA2 ", - " 37CDDDDDD7350 ", - " 0279AA6222520 ", - " 00220 05520 ", - " 05520 ", - " 2552 ", - " 2552 ", - " 02550 ", - " 0220 ", - " 0 ", - " "}; - -static char *zoom_choose_x32[] = { - "32 32 16 1", - " c None", - "0 c #000000", - "1 c #000033", - "2 c #003333", - "3 c #333333", - "4 c #333366", - "5 c #336666", - "6 c #666666", - "7 c #666699", - "8 c #669999", - "9 c #6699CC", - "A c #9999CC", - "B c #99CCCC", - "C c #99CCFF", - "D c #99FFFF", - "E c #CCFFFF", - " ", - " ", - " 31560130 ", - " 36BEEEEEC83 ", - " 3AEEEEEEEEEC64 ", - " 4CEEEEEEEEEEEE83 ", - " 4BEEEEEEEEEEEEED5 ", - " 5EEEEEEEEEEEEEEEC3 ", - " 3CEDAAAAAAAAAAABEE5 ", - " 2EED333333333339EEB3 ", - " 4EEEC4666666666EEEB3 ", - " 6EEEE956666665CEEEC3 ", - " 08EEEEE6666665BEEEEC3 ", - " 5EEEEEC566668EEEEEB3 ", - " 3EEEEEEB5665EEEEEE80 ", - " 3BEEEEEE865CEEEEEE5 ", - " 5EEEEEEE5AEEEEEEB3 ", - " 38EEEEEEDEEEEEED3 ", - " 4BEEEEEEEEEEED530 ", - " 38DEEEEEEEEB36630 ", - " 33BCCEECB7336663 ", - " 33300330 036660 ", - " 036660 ", - " 036663 ", - " 066630 ", - " 066630 ", - " 366630 ", - " 36660 ", - " 03630 ", - " 000 ", - " ", - " "}; - -static char **zoom_choose_xpm[3] = { zoom_choose_x16, zoom_choose_x24, zoom_choose_x32 }; - diff --git a/app/bin/bitmaps/zoom-extent.xpm b/app/bin/bitmaps/zoom-extent.xpm deleted file mode 100644 index 17688da..0000000 --- a/app/bin/bitmaps/zoom-extent.xpm +++ /dev/null @@ -1,125 +0,0 @@ -static char *zoom_extent_x16[] = { - "16 16 15 1", - " c None", - "0 c #000000", - "1 c #003333", - "2 c #333333", - "3 c #333366", - "4 c #336666", - "5 c #666666", - "6 c #669999", - "7 c #990000", - "8 c #9999CC", - "9 c #99CCCC", - "A c #99CCFF", - "B c #CC0000", - "C c #CCFFFF", - "D c #800000", - " B BBB ", - "BBBBB BBBBB", - "BBB BBB", - "BB B B BB", - " B B B BB", - " D2523 ", - " 2ACC60 ", - " 06CCC92 ", - " 4CCC81 ", - " 36A93 ", - " 2220 ", - " B 00 B ", - "BB BB 000 B BB", - "BBBB 00 BBB", - "BBB BBB", - "BBBBB BBBBB"}; - -static char *zoom_extent_x24[] = { - "24 24 12 1", - " c None", - "0 c #000000", - "1 c #333333", - "2 c #336666", - "3 c #666666", - "4 c #666699", - "5 c #669999", - "6 c #99CCCC", - "7 c #99CCFF", - "8 c #99FFFF", - "9 c #CC0000", - "A c #CCFFFF", - " ", - " 999999 999999 ", - " 999 99 ", - " 999 9 9 ", - " 9 9 9 9 ", - " 9 9 9 9 ", - " 9 9 9 9 ", - " 9 111 9 ", - " 1267621 ", - " 28AAA82 ", - " 16AAAAA61 ", - " 17AAAAA71 ", - " 16AAAAA61 ", - " 3AAAAA50 ", - " 147A752 ", - " 01010 ", - " 010 ", - " 9 99 010 9 9 ", - " 9 99 01 9 9 ", - " 9 99 010 9 9 ", - " 9 99 000 9 9 ", - " 999 99 ", - " 999999 999999 ", - " "}; - -static char *zoom_extent_x32[] = { - "32 32 15 1", - " c None", - "0 c #000000", - "1 c #000033", - "2 c #333333", - "3 c #333366", - "4 c #336666", - "5 c #666666", - "6 c #666699", - "7 c #669999", - "8 c #6699CC", - "9 c #99CCCC", - "A c #99CCFF", - "B c #99FFFF", - "C c #CC0000", - "D c #CCFFFF", - " ", - " CCCCCCCC CCCCCCCC ", - " CCCCCCCC CCCCCCCC ", - " CCCCC CCCC ", - " CCCCC CCCCC ", - " CCCCCC CCC CC ", - " CC CCC CCC CC ", - " CC CCC CCC CC ", - " CC CCC CCC CC ", - " CC CC ", - " 20012 ", - " 369DDD94 ", - " 06DDDDDDA4 ", - " 2ADDDDDDD82 ", - " 4DDDDDDDDA2 ", - " 5DDDDDDDDA2 ", - " 3DDDDDDDDA2 ", - " 2ADDDDDDD72 ", - " 4BDDDDDA3 ", - " 49DDA84 ", - " 210210 ", - " 050 ", - " CC 0220 CC ", - " CC CCC 050 CCC CC ", - " CC CCC 050 CCC CC ", - " CC CCC 0220 CCC CC ", - " CC CCC 020 CCC CC ", - " CCCCC 00 CCCCC ", - " CCCC CCCC ", - " CCCCCCCC CCCCCCCC ", - " CCCCCCCC CCCCCCCC ", - " "}; - -static char **zoom_extent_xpm[3] = { zoom_extent_x16, zoom_extent_x24, zoom_extent_x32 }; - diff --git a/app/bin/bitmaps/zoom-in.xpm b/app/bin/bitmaps/zoom-in.xpm deleted file mode 100644 index 8f66a29..0000000 --- a/app/bin/bitmaps/zoom-in.xpm +++ /dev/null @@ -1,128 +0,0 @@ -static char *zoom_in_x16[] = { - "16 16 15 1", - " c None", - "0 c #000000", - "1 c #003333", - "2 c #333333", - "3 c #333366", - "4 c #336666", - "5 c #666666", - "6 c #666699", - "7 c #669999", - "8 c #6699CC", - "9 c #9999CC", - "A c #99CCCC", - "B c #99CCFF", - "C c #99FFFF", - "D c #CCFFFF", - " 00 ", - " 227752 ", - " 37DB9CB5 ", - " 5DDA0BDC3 ", - " 2ADDA0BDD70 ", - " 2B6000007A2 ", - " 2BA97089AA1 ", - " 2ADDA0BDD70 ", - " 4CDA0BDB2 ", - " 4ADDCA22 ", - " 20022252 ", - " 0250 ", - " 0250 ", - " 0520 ", - " 022 ", - " 0 "}; - -static char *zoom_in_x24[] = { - "24 24 14 1", - " c None", - "0 c #000000", - "1 c #003333", - "2 c #333333", - "3 c #333366", - "4 c #336666", - "5 c #666666", - "6 c #666699", - "7 c #669999", - "8 c #9999CC", - "9 c #99CCCC", - "A c #99CCFF", - "B c #99FFFF", - "C c #CCFFFF", - " ", - " 0220220 ", - " 379BCA962 ", - " 39CCAAACC93 ", - " 2ACCC706CCC93 ", - " 27CCCC706CCCC70 ", - " 2ACCCC706CCCC92 ", - " 0CA888504888AB1 ", - " 3CA0000000009C3 ", - " 2CA6664026669C1 ", - " 2ACCCC706CCCCA2 ", - " 29CCCC706CCCC93 ", - " 3ACCC706CCCB4 ", - " 5CCCAAACCB52 ", - " 329CCCCB93250 ", - " 225541205520 ", - " 05520 ", - " 2552 ", - " 2552 ", - " 02550 ", - " 02550 ", - " 0520 ", - " 00 ", - " "}; - -static char *zoom_in_x32[] = { - "32 32 16 1", - " c None", - "0 c #000000", - "1 c #000033", - "2 c #003333", - "3 c #333333", - "4 c #333366", - "5 c #336666", - "6 c #666666", - "7 c #666699", - "8 c #669999", - "9 c #6699CC", - "A c #9999CC", - "B c #99CCCC", - "C c #99CCFF", - "D c #99FFFF", - "E c #CCFFFF", - " ", - " 0000 ", - " 338AA9653 ", - " 4BEEEEEEEB53 ", - " 35CEEEEEEEEEEB4 ", - " 07EEEEE700CEEEE83 ", - " 3CEEEEE700CEEEEE7 ", - " 38EEEEEE700CEEEEEC3 ", - " 1EEEEEEE700CEEEEEE5 ", - " 4EEEEEEE700CEEEEEE90 ", - " 6EE8000000000000CEB3 ", - " 08EE8000000000000CEB3 ", - " 08EE8000000000000CEB3 ", - " 5EEEEEEE700CEEEEEEA2 ", - " 3DEEEEEE700CEEEEEE6 ", - " 3BEEEEEE700CEEEEEC4 ", - " 4CEEEEE700CEEEEE5 ", - " 6EEEEE977CEEEEB3 ", - " 38DEEEEEEEEEE8330 ", - " 33BEEEEEEEC63663 ", - " 3469AA853036663 ", - " 0000 036660 ", - " 036660 ", - " 066630 ", - " 066630 ", - " 36663 ", - " 36660 ", - " 036660 ", - " 03660 ", - " 030 ", - " 0 ", - " "}; - -static char **zoom_in_xpm[3] = { zoom_in_x16, zoom_in_x24, zoom_in_x32 }; - diff --git a/app/bin/bitmaps/zoom-out.xpm b/app/bin/bitmaps/zoom-out.xpm deleted file mode 100644 index c37242d..0000000 --- a/app/bin/bitmaps/zoom-out.xpm +++ /dev/null @@ -1,127 +0,0 @@ -static char *zoom_out_x16[] = { - "16 16 14 1", - " c None", - "0 c #000000", - "1 c #003333", - "2 c #333333", - "3 c #333366", - "4 c #336666", - "5 c #666666", - "6 c #666699", - "7 c #669999", - "8 c #9999CC", - "9 c #99CCCC", - "A c #99CCFF", - "B c #99FFFF", - "C c #CCFFFF", - " 00 ", - " 227752 ", - " 37CCCCA5 ", - " 5CCCCCCB3 ", - " 29CCCCCCC70 ", - " 2A600000792 ", - " 2A988888991 ", - " 29CCCCCCC70 ", - " 4BCCCCCA2 ", - " 49CCB922 ", - " 20022252 ", - " 0250 ", - " 0250 ", - " 0520 ", - " 022 ", - " 0 "}; - -static char *zoom_out_x24[] = { - "24 24 14 1", - " c None", - "0 c #000000", - "1 c #003333", - "2 c #333333", - "3 c #333366", - "4 c #336666", - "5 c #666666", - "6 c #666699", - "7 c #669999", - "8 c #9999CC", - "9 c #99CCCC", - "A c #99CCFF", - "B c #99FFFF", - "C c #CCFFFF", - " ", - " 0220220 ", - " 379BCA962 ", - " 39CCCCCCC93 ", - " 2ACCCCCCCCC93 ", - " 27CCCCCCCCCCC70 ", - " 2ACCCCCCCCCCC92 ", - " 0CA888888888AB1 ", - " 3CA0000000009C3 ", - " 2CA6666666669C1 ", - " 2ACCCCCCCCCCCA2 ", - " 29CCCCCCCCCCC93 ", - " 3ACCCCCCCCCB4 ", - " 5CCCCCCCCB52 ", - " 329CCCCB93250 ", - " 225541205520 ", - " 05520 ", - " 2552 ", - " 2552 ", - " 02550 ", - " 02550 ", - " 0520 ", - " 00 ", - " "}; - -static char *zoom_out_x32[] = { - "32 32 16 1", - " c None", - "0 c #000000", - "1 c #000033", - "2 c #003333", - "3 c #333333", - "4 c #333366", - "5 c #336666", - "6 c #666666", - "7 c #666699", - "8 c #669999", - "9 c #6699CC", - "A c #9999CC", - "B c #99CCCC", - "C c #99CCFF", - "D c #99FFFF", - "E c #CCFFFF", - " ", - " 0000 ", - " 338AA9653 ", - " 4BEEEEEEEB53 ", - " 35CEEEEEEEEEEB4 ", - " 07EEEEEEEEEEEEE83 ", - " 3CEEEEEEEEEEEEEE7 ", - " 38EEEEEEEEEEEEEEEC3 ", - " 1EEEEEEEEEEEEEEEEE5 ", - " 4EEEEEEEEEEEEEEEEE90 ", - " 6EE8000000000000CEB3 ", - " 08EE8000000000000CEB3 ", - " 08EE8000000000000CEB3 ", - " 5EEEEEEEEEEEEEEEEEA2 ", - " 3DEEEEEEEEEEEEEEEE6 ", - " 3BEEEEEEEEEEEEEEEC4 ", - " 4CEEEEEEEEEEEEEE5 ", - " 6EEEEEEEEEEEEEB3 ", - " 38DEEEEEEEEEE8330 ", - " 33BEEEEEEEC63663 ", - " 3469AA853036663 ", - " 0000 036660 ", - " 036660 ", - " 066630 ", - " 066630 ", - " 36663 ", - " 36660 ", - " 036660 ", - " 03660 ", - " 030 ", - " 0 ", - " "}; - -static char **zoom_out_xpm[3] = { zoom_out_x16, zoom_out_x24, zoom_out_x32 }; - diff --git a/app/bin/cJSON.c b/app/bin/cJSON.c deleted file mode 100755 index ee641fc..0000000 --- a/app/bin/cJSON.c +++ /dev/null @@ -1,2932 +0,0 @@ -/** - Copyright (c) 2009-2017 Dave Gamble and cJSON contributors - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. -*/ - -/* cJSON */ -/* JSON parser in C. */ - -/* disable warnings about old C89 functions in MSVC */ -#if !defined(_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) -#define _CRT_SECURE_NO_DEPRECATE -#endif - -#ifdef __GNUC__ -#pragma GCC visibility push(default) -#endif -#if defined(_MSC_VER) -#pragma warning (push) -/* disable warning about single line comments in system headers */ -#pragma warning (disable : 4001) -#endif - -#include -#include -#include -#include -#include -#include - -#ifdef ENABLE_LOCALES -#include -#endif - -#if defined(_MSC_VER) -#pragma warning (pop) -#endif -#ifdef __GNUC__ -#pragma GCC visibility pop -#endif - -#include "cJSON.h" - -/* define our own boolean type */ -#define true ((cJSON_bool)1) -#define false ((cJSON_bool)0) - -typedef struct { - const unsigned char *json; - size_t position; -} error; -static error global_error = { NULL, 0 }; - -CJSON_PUBLIC(const char *) cJSON_GetErrorPtr(void) -{ - return (const char*) (global_error.json + global_error.position); -} - -CJSON_PUBLIC(char *) cJSON_GetStringValue(cJSON *item) { - if (!cJSON_IsString(item)) { - return NULL; - } - - return item->valuestring; -} - -/* This is a safeguard to prevent copy-pasters from using incompatible C and header files */ -#if (CJSON_VERSION_MAJOR != 1) || (CJSON_VERSION_MINOR != 7) || (CJSON_VERSION_PATCH != 8) - #error cJSON.h and cJSON.c have different versions. Make sure that both have the same. -#endif - -CJSON_PUBLIC(const char*) cJSON_Version(void) -{ - static char version[15]; - sprintf(version, "%i.%i.%i", CJSON_VERSION_MAJOR, CJSON_VERSION_MINOR, CJSON_VERSION_PATCH); - - return version; -} - -/* Case insensitive string comparison, doesn't consider two NULL pointers equal though */ -static int case_insensitive_strcmp(const unsigned char *string1, const unsigned char *string2) -{ - if ((string1 == NULL) || (string2 == NULL)) - { - return 1; - } - - if (string1 == string2) - { - return 0; - } - - for(; tolower(*string1) == tolower(*string2); (void)string1++, string2++) - { - if (*string1 == '\0') - { - return 0; - } - } - - return tolower(*string1) - tolower(*string2); -} - -typedef struct internal_hooks -{ - void *(CJSON_CDECL *allocate)(size_t size); - void (CJSON_CDECL *deallocate)(void *pointer); - void *(CJSON_CDECL *reallocate)(void *pointer, size_t size); -} internal_hooks; - -#if defined(_MSC_VER) -/* work around MSVC error C2322: '...' address of dillimport '...' is not static */ -static void * CJSON_CDECL internal_malloc(size_t size) -{ - return malloc(size); -} -static void CJSON_CDECL internal_free(void *pointer) -{ - free(pointer); -} -static void * CJSON_CDECL internal_realloc(void *pointer, size_t size) -{ - return realloc(pointer, size); -} -#else -#define internal_malloc malloc -#define internal_free free -#define internal_realloc realloc -#endif - -static internal_hooks global_hooks = { internal_malloc, internal_free, internal_realloc }; - -static unsigned char* cJSON_strdup(const unsigned char* string, const internal_hooks * const hooks) -{ - size_t length = 0; - unsigned char *copy = NULL; - - if (string == NULL) - { - return NULL; - } - - length = strlen((const char*)string) + sizeof(""); - copy = (unsigned char*)hooks->allocate(length); - if (copy == NULL) - { - return NULL; - } - memcpy(copy, string, length); - - return copy; -} - -CJSON_PUBLIC(void) cJSON_InitHooks(cJSON_Hooks* hooks) -{ - if (hooks == NULL) - { - /* Reset hooks */ - global_hooks.allocate = malloc; - global_hooks.deallocate = free; - global_hooks.reallocate = realloc; - return; - } - - global_hooks.allocate = malloc; - if (hooks->malloc_fn != NULL) - { - global_hooks.allocate = hooks->malloc_fn; - } - - global_hooks.deallocate = free; - if (hooks->free_fn != NULL) - { - global_hooks.deallocate = hooks->free_fn; - } - - /* use realloc only if both free and malloc are used */ - global_hooks.reallocate = NULL; - if ((global_hooks.allocate == malloc) && (global_hooks.deallocate == free)) - { - global_hooks.reallocate = realloc; - } -} - -/* Internal constructor. */ -static cJSON *cJSON_New_Item(const internal_hooks * const hooks) -{ - cJSON* node = (cJSON*)hooks->allocate(sizeof(cJSON)); - if (node) - { - memset(node, '\0', sizeof(cJSON)); - } - - return node; -} - -/* Delete a cJSON structure. */ -CJSON_PUBLIC(void) cJSON_Delete(cJSON *item) -{ - cJSON *next = NULL; - while (item != NULL) - { - next = item->next; - if (!(item->type & cJSON_IsReference) && (item->child != NULL)) - { - cJSON_Delete(item->child); - } - if (!(item->type & cJSON_IsReference) && (item->valuestring != NULL)) - { - global_hooks.deallocate(item->valuestring); - } - if (!(item->type & cJSON_StringIsConst) && (item->string != NULL)) - { - global_hooks.deallocate(item->string); - } - global_hooks.deallocate(item); - item = next; - } -} - -/* get the decimal point character of the current locale */ -static unsigned char get_decimal_point(void) -{ -#ifdef ENABLE_LOCALES - struct lconv *lconv = localeconv(); - return (unsigned char) lconv->decimal_point[0]; -#else - return '.'; -#endif -} - -typedef struct -{ - const unsigned char *content; - size_t length; - size_t offset; - size_t depth; /* How deeply nested (in arrays/objects) is the input at the current offset. */ - internal_hooks hooks; -} parse_buffer; - -/* check if the given size is left to read in a given parse buffer (starting with 1) */ -#define can_read(buffer, size) ((buffer != NULL) && (((buffer)->offset + size) <= (buffer)->length)) -/* check if the buffer can be accessed at the given index (starting with 0) */ -#define can_access_at_index(buffer, index) ((buffer != NULL) && (((buffer)->offset + index) < (buffer)->length)) -#define cannot_access_at_index(buffer, index) (!can_access_at_index(buffer, index)) -/* get a pointer to the buffer at the position */ -#define buffer_at_offset(buffer) ((buffer)->content + (buffer)->offset) - -/* Parse the input text to generate a number, and populate the result into item. */ -static cJSON_bool parse_number(cJSON * const item, parse_buffer * const input_buffer) -{ - double number = 0; - unsigned char *after_end = NULL; - unsigned char number_c_string[64]; - unsigned char decimal_point = get_decimal_point(); - size_t i = 0; - - if ((input_buffer == NULL) || (input_buffer->content == NULL)) - { - return false; - } - - /* copy the number into a temporary buffer and replace '.' with the decimal point - * of the current locale (for strtod) - * This also takes care of '\0' not necessarily being available for marking the end of the input */ - for (i = 0; (i < (sizeof(number_c_string) - 1)) && can_access_at_index(input_buffer, i); i++) - { - switch (buffer_at_offset(input_buffer)[i]) - { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - case '+': - case '-': - case 'e': - case 'E': - number_c_string[i] = buffer_at_offset(input_buffer)[i]; - break; - - case '.': - number_c_string[i] = decimal_point; - break; - - default: - goto loop_end; - } - } -loop_end: - number_c_string[i] = '\0'; - - number = strtod((const char*)number_c_string, (char**)&after_end); - if (number_c_string == after_end) - { - return false; /* parse_error */ - } - - item->valuedouble = number; - - /* use saturation in case of overflow */ - if (number >= INT_MAX) - { - item->valueint = INT_MAX; - } - else if (number <= (double)INT_MIN) - { - item->valueint = INT_MIN; - } - else - { - item->valueint = (int)number; - } - - item->type = cJSON_Number; - - input_buffer->offset += (size_t)(after_end - number_c_string); - return true; -} - -/* don't ask me, but the original cJSON_SetNumberValue returns an integer or double */ -CJSON_PUBLIC(double) cJSON_SetNumberHelper(cJSON *object, double number) -{ - if (number >= INT_MAX) - { - object->valueint = INT_MAX; - } - else if (number <= (double)INT_MIN) - { - object->valueint = INT_MIN; - } - else - { - object->valueint = (int)number; - } - - return object->valuedouble = number; -} - -typedef struct -{ - unsigned char *buffer; - size_t length; - size_t offset; - size_t depth; /* current nesting depth (for formatted printing) */ - cJSON_bool noalloc; - cJSON_bool format; /* is this print a formatted print */ - internal_hooks hooks; -} printbuffer; - -/* realloc printbuffer if necessary to have at least "needed" bytes more */ -static unsigned char* ensure(printbuffer * const p, size_t needed) -{ - unsigned char *newbuffer = NULL; - size_t newsize = 0; - - if ((p == NULL) || (p->buffer == NULL)) - { - return NULL; - } - - if ((p->length > 0) && (p->offset >= p->length)) - { - /* make sure that offset is valid */ - return NULL; - } - - if (needed > INT_MAX) - { - /* sizes bigger than INT_MAX are currently not supported */ - return NULL; - } - - needed += p->offset + 1; - if (needed <= p->length) - { - return p->buffer + p->offset; - } - - if (p->noalloc) { - return NULL; - } - - /* calculate new buffer size */ - if (needed > (INT_MAX / 2)) - { - /* overflow of int, use INT_MAX if possible */ - if (needed <= INT_MAX) - { - newsize = INT_MAX; - } - else - { - return NULL; - } - } - else - { - newsize = needed * 2; - } - - if (p->hooks.reallocate != NULL) - { - /* reallocate with realloc if available */ - newbuffer = (unsigned char*)p->hooks.reallocate(p->buffer, newsize); - if (newbuffer == NULL) - { - p->hooks.deallocate(p->buffer); - p->length = 0; - p->buffer = NULL; - - return NULL; - } - } - else - { - /* otherwise reallocate manually */ - newbuffer = (unsigned char*)p->hooks.allocate(newsize); - if (!newbuffer) - { - p->hooks.deallocate(p->buffer); - p->length = 0; - p->buffer = NULL; - - return NULL; - } - if (newbuffer) - { - memcpy(newbuffer, p->buffer, p->offset + 1); - } - p->hooks.deallocate(p->buffer); - } - p->length = newsize; - p->buffer = newbuffer; - - return newbuffer + p->offset; -} - -/* calculate the new length of the string in a printbuffer and update the offset */ -static void update_offset(printbuffer * const buffer) -{ - const unsigned char *buffer_pointer = NULL; - if ((buffer == NULL) || (buffer->buffer == NULL)) - { - return; - } - buffer_pointer = buffer->buffer + buffer->offset; - - buffer->offset += strlen((const char*)buffer_pointer); -} - -/* Render the number nicely from the given item into a string. */ -static cJSON_bool print_number(const cJSON * const item, printbuffer * const output_buffer) -{ - unsigned char *output_pointer = NULL; - double d = item->valuedouble; - int length = 0; - size_t i = 0; - unsigned char number_buffer[26]; /* temporary buffer to print the number into */ - unsigned char decimal_point = get_decimal_point(); - double test; - - if (output_buffer == NULL) - { - return false; - } - - /* This checks for NaN and Infinity */ - if ((d * 0) != 0) - { - length = sprintf((char*)number_buffer, "null"); - } - else - { - /* Try 15 decimal places of precision to avoid nonsignificant nonzero digits */ - length = sprintf((char*)number_buffer, "%1.15g", d); - - /* Check whether the original double can be recovered */ - if ((sscanf((char*)number_buffer, "%lg", &test) != 1) || ((double)test != d)) - { - /* If not, print with 17 decimal places of precision */ - length = sprintf((char*)number_buffer, "%1.17g", d); - } - } - - /* sprintf failed or buffer overrun occured */ - if ((length < 0) || (length > (int)(sizeof(number_buffer) - 1))) - { - return false; - } - - /* reserve appropriate space in the output */ - output_pointer = ensure(output_buffer, (size_t)length + sizeof("")); - if (output_pointer == NULL) - { - return false; - } - - /* copy the printed number to the output and replace locale - * dependent decimal point with '.' */ - for (i = 0; i < ((size_t)length); i++) - { - if (number_buffer[i] == decimal_point) - { - output_pointer[i] = '.'; - continue; - } - - output_pointer[i] = number_buffer[i]; - } - output_pointer[i] = '\0'; - - output_buffer->offset += (size_t)length; - - return true; -} - -/* parse 4 digit hexadecimal number */ -static unsigned parse_hex4(const unsigned char * const input) -{ - unsigned int h = 0; - size_t i = 0; - - for (i = 0; i < 4; i++) - { - /* parse digit */ - if ((input[i] >= '0') && (input[i] <= '9')) - { - h += (unsigned int) input[i] - '0'; - } - else if ((input[i] >= 'A') && (input[i] <= 'F')) - { - h += (unsigned int) 10 + input[i] - 'A'; - } - else if ((input[i] >= 'a') && (input[i] <= 'f')) - { - h += (unsigned int) 10 + input[i] - 'a'; - } - else /* invalid */ - { - return 0; - } - - if (i < 3) - { - /* shift left to make place for the next nibble */ - h = h << 4; - } - } - - return h; -} - -/* converts a UTF-16 literal to UTF-8 - * A literal can be one or two sequences of the form \uXXXX */ -static unsigned char utf16_literal_to_utf8(const unsigned char * const input_pointer, const unsigned char * const input_end, unsigned char **output_pointer) -{ - long unsigned int codepoint = 0; - unsigned int first_code = 0; - const unsigned char *first_sequence = input_pointer; - unsigned char utf8_length = 0; - unsigned char utf8_position = 0; - unsigned char sequence_length = 0; - unsigned char first_byte_mark = 0; - - if ((input_end - first_sequence) < 6) - { - /* input ends unexpectedly */ - goto fail; - } - - /* get the first utf16 sequence */ - first_code = parse_hex4(first_sequence + 2); - - /* check that the code is valid */ - if (((first_code >= 0xDC00) && (first_code <= 0xDFFF))) - { - goto fail; - } - - /* UTF16 surrogate pair */ - if ((first_code >= 0xD800) && (first_code <= 0xDBFF)) - { - const unsigned char *second_sequence = first_sequence + 6; - unsigned int second_code = 0; - sequence_length = 12; /* \uXXXX\uXXXX */ - - if ((input_end - second_sequence) < 6) - { - /* input ends unexpectedly */ - goto fail; - } - - if ((second_sequence[0] != '\\') || (second_sequence[1] != 'u')) - { - /* missing second half of the surrogate pair */ - goto fail; - } - - /* get the second utf16 sequence */ - second_code = parse_hex4(second_sequence + 2); - /* check that the code is valid */ - if ((second_code < 0xDC00) || (second_code > 0xDFFF)) - { - /* invalid second half of the surrogate pair */ - goto fail; - } - - - /* calculate the unicode codepoint from the surrogate pair */ - codepoint = 0x10000 + (((first_code & 0x3FF) << 10) | (second_code & 0x3FF)); - } - else - { - sequence_length = 6; /* \uXXXX */ - codepoint = first_code; - } - - /* encode as UTF-8 - * takes at maximum 4 bytes to encode: - * 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx */ - if (codepoint < 0x80) - { - /* normal ascii, encoding 0xxxxxxx */ - utf8_length = 1; - } - else if (codepoint < 0x800) - { - /* two bytes, encoding 110xxxxx 10xxxxxx */ - utf8_length = 2; - first_byte_mark = 0xC0; /* 11000000 */ - } - else if (codepoint < 0x10000) - { - /* three bytes, encoding 1110xxxx 10xxxxxx 10xxxxxx */ - utf8_length = 3; - first_byte_mark = 0xE0; /* 11100000 */ - } - else if (codepoint <= 0x10FFFF) - { - /* four bytes, encoding 1110xxxx 10xxxxxx 10xxxxxx 10xxxxxx */ - utf8_length = 4; - first_byte_mark = 0xF0; /* 11110000 */ - } - else - { - /* invalid unicode codepoint */ - goto fail; - } - - /* encode as utf8 */ - for (utf8_position = (unsigned char)(utf8_length - 1); utf8_position > 0; utf8_position--) - { - /* 10xxxxxx */ - (*output_pointer)[utf8_position] = (unsigned char)((codepoint | 0x80) & 0xBF); - codepoint >>= 6; - } - /* encode first byte */ - if (utf8_length > 1) - { - (*output_pointer)[0] = (unsigned char)((codepoint | first_byte_mark) & 0xFF); - } - else - { - (*output_pointer)[0] = (unsigned char)(codepoint & 0x7F); - } - - *output_pointer += utf8_length; - - return sequence_length; - -fail: - return 0; -} - -/* Parse the input text into an unescaped cinput, and populate item. */ -static cJSON_bool parse_string(cJSON * const item, parse_buffer * const input_buffer) -{ - const unsigned char *input_pointer = buffer_at_offset(input_buffer) + 1; - const unsigned char *input_end = buffer_at_offset(input_buffer) + 1; - unsigned char *output_pointer = NULL; - unsigned char *output = NULL; - - /* not a string */ - if (buffer_at_offset(input_buffer)[0] != '\"') - { - goto fail; - } - - { - /* calculate approximate size of the output (overestimate) */ - size_t allocation_length = 0; - size_t skipped_bytes = 0; - while (((size_t)(input_end - input_buffer->content) < input_buffer->length) && (*input_end != '\"')) - { - /* is escape sequence */ - if (input_end[0] == '\\') - { - if ((size_t)(input_end + 1 - input_buffer->content) >= input_buffer->length) - { - /* prevent buffer overflow when last input character is a backslash */ - goto fail; - } - skipped_bytes++; - input_end++; - } - input_end++; - } - if (((size_t)(input_end - input_buffer->content) >= input_buffer->length) || (*input_end != '\"')) - { - goto fail; /* string ended unexpectedly */ - } - - /* This is at most how much we need for the output */ - allocation_length = (size_t) (input_end - buffer_at_offset(input_buffer)) - skipped_bytes; - output = (unsigned char*)input_buffer->hooks.allocate(allocation_length + sizeof("")); - if (output == NULL) - { - goto fail; /* allocation failure */ - } - } - - output_pointer = output; - /* loop through the string literal */ - while (input_pointer < input_end) - { - if (*input_pointer != '\\') - { - *output_pointer++ = *input_pointer++; - } - /* escape sequence */ - else - { - unsigned char sequence_length = 2; - if ((input_end - input_pointer) < 1) - { - goto fail; - } - - switch (input_pointer[1]) - { - case 'b': - *output_pointer++ = '\b'; - break; - case 'f': - *output_pointer++ = '\f'; - break; - case 'n': - *output_pointer++ = '\n'; - break; - case 'r': - *output_pointer++ = '\r'; - break; - case 't': - *output_pointer++ = '\t'; - break; - case '\"': - case '\\': - case '/': - *output_pointer++ = input_pointer[1]; - break; - - /* UTF-16 literal */ - case 'u': - sequence_length = utf16_literal_to_utf8(input_pointer, input_end, &output_pointer); - if (sequence_length == 0) - { - /* failed to convert UTF16-literal to UTF-8 */ - goto fail; - } - break; - - default: - goto fail; - } - input_pointer += sequence_length; - } - } - - /* zero terminate the output */ - *output_pointer = '\0'; - - item->type = cJSON_String; - item->valuestring = (char*)output; - - input_buffer->offset = (size_t) (input_end - input_buffer->content); - input_buffer->offset++; - - return true; - -fail: - if (output != NULL) - { - input_buffer->hooks.deallocate(output); - } - - if (input_pointer != NULL) - { - input_buffer->offset = (size_t)(input_pointer - input_buffer->content); - } - - return false; -} - -/* Render the cstring provided to an escaped version that can be printed. */ -static cJSON_bool print_string_ptr(const unsigned char * const input, printbuffer * const output_buffer) -{ - const unsigned char *input_pointer = NULL; - unsigned char *output = NULL; - unsigned char *output_pointer = NULL; - size_t output_length = 0; - /* numbers of additional characters needed for escaping */ - size_t escape_characters = 0; - - if (output_buffer == NULL) - { - return false; - } - - /* empty string */ - if (input == NULL) - { - output = ensure(output_buffer, sizeof("\"\"")); - if (output == NULL) - { - return false; - } - strcpy((char*)output, "\"\""); - - return true; - } - - /* set "flag" to 1 if something needs to be escaped */ - for (input_pointer = input; *input_pointer; input_pointer++) - { - switch (*input_pointer) - { - case '\"': - case '\\': - case '\b': - case '\f': - case '\n': - case '\r': - case '\t': - /* one character escape sequence */ - escape_characters++; - break; - default: - if (*input_pointer < 32) - { - /* UTF-16 escape sequence uXXXX */ - escape_characters += 5; - } - break; - } - } - output_length = (size_t)(input_pointer - input) + escape_characters; - - output = ensure(output_buffer, output_length + sizeof("\"\"")); - if (output == NULL) - { - return false; - } - - /* no characters have to be escaped */ - if (escape_characters == 0) - { - output[0] = '\"'; - memcpy(output + 1, input, output_length); - output[output_length + 1] = '\"'; - output[output_length + 2] = '\0'; - - return true; - } - - output[0] = '\"'; - output_pointer = output + 1; - /* copy the string */ - for (input_pointer = input; *input_pointer != '\0'; (void)input_pointer++, output_pointer++) - { - if ((*input_pointer > 31) && (*input_pointer != '\"') && (*input_pointer != '\\')) - { - /* normal character, copy */ - *output_pointer = *input_pointer; - } - else - { - /* character needs to be escaped */ - *output_pointer++ = '\\'; - switch (*input_pointer) - { - case '\\': - *output_pointer = '\\'; - break; - case '\"': - *output_pointer = '\"'; - break; - case '\b': - *output_pointer = 'b'; - break; - case '\f': - *output_pointer = 'f'; - break; - case '\n': - *output_pointer = 'n'; - break; - case '\r': - *output_pointer = 'r'; - break; - case '\t': - *output_pointer = 't'; - break; - default: - /* escape and print as unicode codepoint */ - sprintf((char*)output_pointer, "u%04x", *input_pointer); - output_pointer += 4; - break; - } - } - } - output[output_length + 1] = '\"'; - output[output_length + 2] = '\0'; - - return true; -} - -/* Invoke print_string_ptr (which is useful) on an item. */ -static cJSON_bool print_string(const cJSON * const item, printbuffer * const p) -{ - return print_string_ptr((unsigned char*)item->valuestring, p); -} - -/* Predeclare these prototypes. */ -static cJSON_bool parse_value(cJSON * const item, parse_buffer * const input_buffer); -static cJSON_bool print_value(const cJSON * const item, printbuffer * const output_buffer); -static cJSON_bool parse_array(cJSON * const item, parse_buffer * const input_buffer); -static cJSON_bool print_array(const cJSON * const item, printbuffer * const output_buffer); -static cJSON_bool parse_object(cJSON * const item, parse_buffer * const input_buffer); -static cJSON_bool print_object(const cJSON * const item, printbuffer * const output_buffer); - -/* Utility to jump whitespace and cr/lf */ -static parse_buffer *buffer_skip_whitespace(parse_buffer * const buffer) -{ - if ((buffer == NULL) || (buffer->content == NULL)) - { - return NULL; - } - - while (can_access_at_index(buffer, 0) && (buffer_at_offset(buffer)[0] <= 32)) - { - buffer->offset++; - } - - if (buffer->offset == buffer->length) - { - buffer->offset--; - } - - return buffer; -} - -/* skip the UTF-8 BOM (byte order mark) if it is at the beginning of a buffer */ -static parse_buffer *skip_utf8_bom(parse_buffer * const buffer) -{ - if ((buffer == NULL) || (buffer->content == NULL) || (buffer->offset != 0)) - { - return NULL; - } - - if (can_access_at_index(buffer, 4) && (strncmp((const char*)buffer_at_offset(buffer), "\xEF\xBB\xBF", 3) == 0)) - { - buffer->offset += 3; - } - - return buffer; -} - -/* Parse an object - create a new root, and populate. */ -CJSON_PUBLIC(cJSON *) cJSON_ParseWithOpts(const char *value, const char **return_parse_end, cJSON_bool require_null_terminated) -{ - parse_buffer buffer = { 0, 0, 0, 0, { 0, 0, 0 } }; - cJSON *item = NULL; - - /* reset error position */ - global_error.json = NULL; - global_error.position = 0; - - if (value == NULL) - { - goto fail; - } - - buffer.content = (const unsigned char*)value; - buffer.length = strlen((const char*)value) + sizeof(""); - buffer.offset = 0; - buffer.hooks = global_hooks; - - item = cJSON_New_Item(&global_hooks); - if (item == NULL) /* memory fail */ - { - goto fail; - } - - if (!parse_value(item, buffer_skip_whitespace(skip_utf8_bom(&buffer)))) - { - /* parse failure. ep is set. */ - goto fail; - } - - /* if we require null-terminated JSON without appended garbage, skip and then check for a null terminator */ - if (require_null_terminated) - { - buffer_skip_whitespace(&buffer); - if ((buffer.offset >= buffer.length) || buffer_at_offset(&buffer)[0] != '\0') - { - goto fail; - } - } - if (return_parse_end) - { - *return_parse_end = (const char*)buffer_at_offset(&buffer); - } - - return item; - -fail: - if (item != NULL) - { - cJSON_Delete(item); - } - - if (value != NULL) - { - error local_error; - local_error.json = (const unsigned char*)value; - local_error.position = 0; - - if (buffer.offset < buffer.length) - { - local_error.position = buffer.offset; - } - else if (buffer.length > 0) - { - local_error.position = buffer.length - 1; - } - - if (return_parse_end != NULL) - { - *return_parse_end = (const char*)local_error.json + local_error.position; - } - - global_error = local_error; - } - - return NULL; -} - -/* Default options for cJSON_Parse */ -CJSON_PUBLIC(cJSON *) cJSON_Parse(const char *value) -{ - return cJSON_ParseWithOpts(value, 0, 0); -} - -#define cjson_min(a, b) ((a < b) ? a : b) - -static unsigned char *print(const cJSON * const item, cJSON_bool format, const internal_hooks * const hooks) -{ - static const size_t default_buffer_size = 256; - printbuffer buffer[1]; - unsigned char *printed = NULL; - - memset(buffer, 0, sizeof(buffer)); - - /* create buffer */ - buffer->buffer = (unsigned char*) hooks->allocate(default_buffer_size); - buffer->length = default_buffer_size; - buffer->format = format; - buffer->hooks = *hooks; - if (buffer->buffer == NULL) - { - goto fail; - } - - /* print the value */ - if (!print_value(item, buffer)) - { - goto fail; - } - update_offset(buffer); - - /* check if reallocate is available */ - if (hooks->reallocate != NULL) - { - printed = (unsigned char*) hooks->reallocate(buffer->buffer, buffer->offset + 1); - if (printed == NULL) { - goto fail; - } - buffer->buffer = NULL; - } - else /* otherwise copy the JSON over to a new buffer */ - { - printed = (unsigned char*) hooks->allocate(buffer->offset + 1); - if (printed == NULL) - { - goto fail; - } - memcpy(printed, buffer->buffer, cjson_min(buffer->length, buffer->offset + 1)); - printed[buffer->offset] = '\0'; /* just to be sure */ - - /* free the buffer */ - hooks->deallocate(buffer->buffer); - } - - return printed; - -fail: - if (buffer->buffer != NULL) - { - hooks->deallocate(buffer->buffer); - } - - if (printed != NULL) - { - hooks->deallocate(printed); - } - - return NULL; -} - -/* Render a cJSON item/entity/structure to text. */ -CJSON_PUBLIC(char *) cJSON_Print(const cJSON *item) -{ - return (char*)print(item, true, &global_hooks); -} - -CJSON_PUBLIC(char *) cJSON_PrintUnformatted(const cJSON *item) -{ - return (char*)print(item, false, &global_hooks); -} - -CJSON_PUBLIC(char *) cJSON_PrintBuffered(const cJSON *item, int prebuffer, cJSON_bool fmt) -{ - printbuffer p = { 0, 0, 0, 0, 0, 0, { 0, 0, 0 } }; - - if (prebuffer < 0) - { - return NULL; - } - - p.buffer = (unsigned char*)global_hooks.allocate((size_t)prebuffer); - if (!p.buffer) - { - return NULL; - } - - p.length = (size_t)prebuffer; - p.offset = 0; - p.noalloc = false; - p.format = fmt; - p.hooks = global_hooks; - - if (!print_value(item, &p)) - { - global_hooks.deallocate(p.buffer); - return NULL; - } - - return (char*)p.buffer; -} - -CJSON_PUBLIC(cJSON_bool) cJSON_PrintPreallocated(cJSON *item, char *buf, const int len, const cJSON_bool fmt) -{ - printbuffer p = { 0, 0, 0, 0, 0, 0, { 0, 0, 0 } }; - - if ((len < 0) || (buf == NULL)) - { - return false; - } - - p.buffer = (unsigned char*)buf; - p.length = (size_t)len; - p.offset = 0; - p.noalloc = true; - p.format = fmt; - p.hooks = global_hooks; - - return print_value(item, &p); -} - -/* Parser core - when encountering text, process appropriately. */ -static cJSON_bool parse_value(cJSON * const item, parse_buffer * const input_buffer) -{ - if ((input_buffer == NULL) || (input_buffer->content == NULL)) - { - return false; /* no input */ - } - - /* parse the different types of values */ - /* null */ - if (can_read(input_buffer, 4) && (strncmp((const char*)buffer_at_offset(input_buffer), "null", 4) == 0)) - { - item->type = cJSON_NULL; - input_buffer->offset += 4; - return true; - } - /* false */ - if (can_read(input_buffer, 5) && (strncmp((const char*)buffer_at_offset(input_buffer), "false", 5) == 0)) - { - item->type = cJSON_False; - input_buffer->offset += 5; - return true; - } - /* true */ - if (can_read(input_buffer, 4) && (strncmp((const char*)buffer_at_offset(input_buffer), "true", 4) == 0)) - { - item->type = cJSON_True; - item->valueint = 1; - input_buffer->offset += 4; - return true; - } - /* string */ - if (can_access_at_index(input_buffer, 0) && (buffer_at_offset(input_buffer)[0] == '\"')) - { - return parse_string(item, input_buffer); - } - /* number */ - if (can_access_at_index(input_buffer, 0) && ((buffer_at_offset(input_buffer)[0] == '-') || ((buffer_at_offset(input_buffer)[0] >= '0') && (buffer_at_offset(input_buffer)[0] <= '9')))) - { - return parse_number(item, input_buffer); - } - /* array */ - if (can_access_at_index(input_buffer, 0) && (buffer_at_offset(input_buffer)[0] == '[')) - { - return parse_array(item, input_buffer); - } - /* object */ - if (can_access_at_index(input_buffer, 0) && (buffer_at_offset(input_buffer)[0] == '{')) - { - return parse_object(item, input_buffer); - } - - return false; -} - -/* Render a value to text. */ -static cJSON_bool print_value(const cJSON * const item, printbuffer * const output_buffer) -{ - unsigned char *output = NULL; - - if ((item == NULL) || (output_buffer == NULL)) - { - return false; - } - - switch ((item->type) & 0xFF) - { - case cJSON_NULL: - output = ensure(output_buffer, 5); - if (output == NULL) - { - return false; - } - strcpy((char*)output, "null"); - return true; - - case cJSON_False: - output = ensure(output_buffer, 6); - if (output == NULL) - { - return false; - } - strcpy((char*)output, "false"); - return true; - - case cJSON_True: - output = ensure(output_buffer, 5); - if (output == NULL) - { - return false; - } - strcpy((char*)output, "true"); - return true; - - case cJSON_Number: - return print_number(item, output_buffer); - - case cJSON_Raw: - { - size_t raw_length = 0; - if (item->valuestring == NULL) - { - return false; - } - - raw_length = strlen(item->valuestring) + sizeof(""); - output = ensure(output_buffer, raw_length); - if (output == NULL) - { - return false; - } - memcpy(output, item->valuestring, raw_length); - return true; - } - - case cJSON_String: - return print_string(item, output_buffer); - - case cJSON_Array: - return print_array(item, output_buffer); - - case cJSON_Object: - return print_object(item, output_buffer); - - default: - return false; - } -} - -/* Build an array from input text. */ -static cJSON_bool parse_array(cJSON * const item, parse_buffer * const input_buffer) -{ - cJSON *head = NULL; /* head of the linked list */ - cJSON *current_item = NULL; - - if (input_buffer->depth >= CJSON_NESTING_LIMIT) - { - return false; /* to deeply nested */ - } - input_buffer->depth++; - - if (buffer_at_offset(input_buffer)[0] != '[') - { - /* not an array */ - goto fail; - } - - input_buffer->offset++; - buffer_skip_whitespace(input_buffer); - if (can_access_at_index(input_buffer, 0) && (buffer_at_offset(input_buffer)[0] == ']')) - { - /* empty array */ - goto success; - } - - /* check if we skipped to the end of the buffer */ - if (cannot_access_at_index(input_buffer, 0)) - { - input_buffer->offset--; - goto fail; - } - - /* step back to character in front of the first element */ - input_buffer->offset--; - /* loop through the comma separated array elements */ - do - { - /* allocate next item */ - cJSON *new_item = cJSON_New_Item(&(input_buffer->hooks)); - if (new_item == NULL) - { - goto fail; /* allocation failure */ - } - - /* attach next item to list */ - if (head == NULL) - { - /* start the linked list */ - current_item = head = new_item; - } - else - { - /* add to the end and advance */ - current_item->next = new_item; - new_item->prev = current_item; - current_item = new_item; - } - - /* parse next value */ - input_buffer->offset++; - buffer_skip_whitespace(input_buffer); - if (!parse_value(current_item, input_buffer)) - { - goto fail; /* failed to parse value */ - } - buffer_skip_whitespace(input_buffer); - } - while (can_access_at_index(input_buffer, 0) && (buffer_at_offset(input_buffer)[0] == ',')); - - if (cannot_access_at_index(input_buffer, 0) || buffer_at_offset(input_buffer)[0] != ']') - { - goto fail; /* expected end of array */ - } - -success: - input_buffer->depth--; - - item->type = cJSON_Array; - item->child = head; - - input_buffer->offset++; - - return true; - -fail: - if (head != NULL) - { - cJSON_Delete(head); - } - - return false; -} - -/* Render an array to text */ -static cJSON_bool print_array(const cJSON * const item, printbuffer * const output_buffer) -{ - unsigned char *output_pointer = NULL; - size_t length = 0; - cJSON *current_element = item->child; - - if (output_buffer == NULL) - { - return false; - } - - /* Compose the output array. */ - /* opening square bracket */ - output_pointer = ensure(output_buffer, 1); - if (output_pointer == NULL) - { - return false; - } - - *output_pointer = '['; - output_buffer->offset++; - output_buffer->depth++; - - while (current_element != NULL) - { - if (!print_value(current_element, output_buffer)) - { - return false; - } - update_offset(output_buffer); - if (current_element->next) - { - length = (size_t) (output_buffer->format ? 2 : 1); - output_pointer = ensure(output_buffer, length + 1); - if (output_pointer == NULL) - { - return false; - } - *output_pointer++ = ','; - if(output_buffer->format) - { - *output_pointer++ = ' '; - } - *output_pointer = '\0'; - output_buffer->offset += length; - } - current_element = current_element->next; - } - - output_pointer = ensure(output_buffer, 2); - if (output_pointer == NULL) - { - return false; - } - *output_pointer++ = ']'; - *output_pointer = '\0'; - output_buffer->depth--; - - return true; -} - -/* Build an object from the text. */ -static cJSON_bool parse_object(cJSON * const item, parse_buffer * const input_buffer) -{ - cJSON *head = NULL; /* linked list head */ - cJSON *current_item = NULL; - - if (input_buffer->depth >= CJSON_NESTING_LIMIT) - { - return false; /* to deeply nested */ - } - input_buffer->depth++; - - if (cannot_access_at_index(input_buffer, 0) || (buffer_at_offset(input_buffer)[0] != '{')) - { - goto fail; /* not an object */ - } - - input_buffer->offset++; - buffer_skip_whitespace(input_buffer); - if (can_access_at_index(input_buffer, 0) && (buffer_at_offset(input_buffer)[0] == '}')) - { - goto success; /* empty object */ - } - - /* check if we skipped to the end of the buffer */ - if (cannot_access_at_index(input_buffer, 0)) - { - input_buffer->offset--; - goto fail; - } - - /* step back to character in front of the first element */ - input_buffer->offset--; - /* loop through the comma separated array elements */ - do - { - /* allocate next item */ - cJSON *new_item = cJSON_New_Item(&(input_buffer->hooks)); - if (new_item == NULL) - { - goto fail; /* allocation failure */ - } - - /* attach next item to list */ - if (head == NULL) - { - /* start the linked list */ - current_item = head = new_item; - } - else - { - /* add to the end and advance */ - current_item->next = new_item; - new_item->prev = current_item; - current_item = new_item; - } - - /* parse the name of the child */ - input_buffer->offset++; - buffer_skip_whitespace(input_buffer); - if (!parse_string(current_item, input_buffer)) - { - goto fail; /* faile to parse name */ - } - buffer_skip_whitespace(input_buffer); - - /* swap valuestring and string, because we parsed the name */ - current_item->string = current_item->valuestring; - current_item->valuestring = NULL; - - if (cannot_access_at_index(input_buffer, 0) || (buffer_at_offset(input_buffer)[0] != ':')) - { - goto fail; /* invalid object */ - } - - /* parse the value */ - input_buffer->offset++; - buffer_skip_whitespace(input_buffer); - if (!parse_value(current_item, input_buffer)) - { - goto fail; /* failed to parse value */ - } - buffer_skip_whitespace(input_buffer); - } - while (can_access_at_index(input_buffer, 0) && (buffer_at_offset(input_buffer)[0] == ',')); - - if (cannot_access_at_index(input_buffer, 0) || (buffer_at_offset(input_buffer)[0] != '}')) - { - goto fail; /* expected end of object */ - } - -success: - input_buffer->depth--; - - item->type = cJSON_Object; - item->child = head; - - input_buffer->offset++; - return true; - -fail: - if (head != NULL) - { - cJSON_Delete(head); - } - - return false; -} - -/* Render an object to text. */ -static cJSON_bool print_object(const cJSON * const item, printbuffer * const output_buffer) -{ - unsigned char *output_pointer = NULL; - size_t length = 0; - cJSON *current_item = item->child; - - if (output_buffer == NULL) - { - return false; - } - - /* Compose the output: */ - length = (size_t) (output_buffer->format ? 2 : 1); /* fmt: {\n */ - output_pointer = ensure(output_buffer, length + 1); - if (output_pointer == NULL) - { - return false; - } - - *output_pointer++ = '{'; - output_buffer->depth++; - if (output_buffer->format) - { - *output_pointer++ = '\n'; - } - output_buffer->offset += length; - - while (current_item) - { - if (output_buffer->format) - { - size_t i; - output_pointer = ensure(output_buffer, output_buffer->depth); - if (output_pointer == NULL) - { - return false; - } - for (i = 0; i < output_buffer->depth; i++) - { - *output_pointer++ = '\t'; - } - output_buffer->offset += output_buffer->depth; - } - - /* print key */ - if (!print_string_ptr((unsigned char*)current_item->string, output_buffer)) - { - return false; - } - update_offset(output_buffer); - - length = (size_t) (output_buffer->format ? 2 : 1); - output_pointer = ensure(output_buffer, length); - if (output_pointer == NULL) - { - return false; - } - *output_pointer++ = ':'; - if (output_buffer->format) - { - *output_pointer++ = '\t'; - } - output_buffer->offset += length; - - /* print value */ - if (!print_value(current_item, output_buffer)) - { - return false; - } - update_offset(output_buffer); - - /* print comma if not last */ - length = ((size_t)(output_buffer->format ? 1 : 0) + (size_t)(current_item->next ? 1 : 0)); - output_pointer = ensure(output_buffer, length + 1); - if (output_pointer == NULL) - { - return false; - } - if (current_item->next) - { - *output_pointer++ = ','; - } - - if (output_buffer->format) - { - *output_pointer++ = '\n'; - } - *output_pointer = '\0'; - output_buffer->offset += length; - - current_item = current_item->next; - } - - output_pointer = ensure(output_buffer, output_buffer->format ? (output_buffer->depth + 1) : 2); - if (output_pointer == NULL) - { - return false; - } - if (output_buffer->format) - { - size_t i; - for (i = 0; i < (output_buffer->depth - 1); i++) - { - *output_pointer++ = '\t'; - } - } - *output_pointer++ = '}'; - *output_pointer = '\0'; - output_buffer->depth--; - - return true; -} - -/* Get Array size/item / object item. */ -CJSON_PUBLIC(int) cJSON_GetArraySize(const cJSON *array) -{ - cJSON *child = NULL; - size_t size = 0; - - if (array == NULL) - { - return 0; - } - - child = array->child; - - while(child != NULL) - { - size++; - child = child->next; - } - - /* FIXME: Can overflow here. Cannot be fixed without breaking the API */ - - return (int)size; -} - -static cJSON* get_array_item(const cJSON *array, size_t index) -{ - cJSON *current_child = NULL; - - if (array == NULL) - { - return NULL; - } - - current_child = array->child; - while ((current_child != NULL) && (index > 0)) - { - index--; - current_child = current_child->next; - } - - return current_child; -} - -CJSON_PUBLIC(cJSON *) cJSON_GetArrayItem(const cJSON *array, int index) -{ - if (index < 0) - { - return NULL; - } - - return get_array_item(array, (size_t)index); -} - -static cJSON *get_object_item(const cJSON * const object, const char * const name, const cJSON_bool case_sensitive) -{ - cJSON *current_element = NULL; - - if ((object == NULL) || (name == NULL)) - { - return NULL; - } - - current_element = object->child; - if (case_sensitive) - { - while ((current_element != NULL) && (strcmp(name, current_element->string) != 0)) - { - current_element = current_element->next; - } - } - else - { - while ((current_element != NULL) && (case_insensitive_strcmp((const unsigned char*)name, (const unsigned char*)(current_element->string)) != 0)) - { - current_element = current_element->next; - } - } - - return current_element; -} - -CJSON_PUBLIC(cJSON *) cJSON_GetObjectItem(const cJSON * const object, const char * const string) -{ - return get_object_item(object, string, false); -} - -CJSON_PUBLIC(cJSON *) cJSON_GetObjectItemCaseSensitive(const cJSON * const object, const char * const string) -{ - return get_object_item(object, string, true); -} - -CJSON_PUBLIC(cJSON_bool) cJSON_HasObjectItem(const cJSON *object, const char *string) -{ - return cJSON_GetObjectItem(object, string) ? 1 : 0; -} - -/* Utility for array list handling. */ -static void suffix_object(cJSON *prev, cJSON *item) -{ - prev->next = item; - item->prev = prev; -} - -/* Utility for handling references. */ -static cJSON *create_reference(const cJSON *item, const internal_hooks * const hooks) -{ - cJSON *reference = NULL; - if (item == NULL) - { - return NULL; - } - - reference = cJSON_New_Item(hooks); - if (reference == NULL) - { - return NULL; - } - - memcpy(reference, item, sizeof(cJSON)); - reference->string = NULL; - reference->type |= cJSON_IsReference; - reference->next = reference->prev = NULL; - return reference; -} - -static cJSON_bool add_item_to_array(cJSON *array, cJSON *item) -{ - cJSON *child = NULL; - - if ((item == NULL) || (array == NULL)) - { - return false; - } - - child = array->child; - - if (child == NULL) - { - /* list is empty, start new one */ - array->child = item; - } - else - { - /* append to the end */ - while (child->next) - { - child = child->next; - } - suffix_object(child, item); - } - - return true; -} - -/* Add item to array/object. */ -CJSON_PUBLIC(void) cJSON_AddItemToArray(cJSON *array, cJSON *item) -{ - add_item_to_array(array, item); -} - -#if defined(__clang__) || (defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5)))) - #pragma GCC diagnostic push -#endif -#ifdef __GNUC__ -#pragma GCC diagnostic ignored "-Wcast-qual" -#endif -/* helper function to cast away const */ -static void* cast_away_const(const void* string) -{ - return (void*)string; -} -#if defined(__clang__) || (defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5)))) - #pragma GCC diagnostic pop -#endif - - -static cJSON_bool add_item_to_object(cJSON * const object, const char * const string, cJSON * const item, const internal_hooks * const hooks, const cJSON_bool constant_key) -{ - char *new_key = NULL; - int new_type = cJSON_Invalid; - - if ((object == NULL) || (string == NULL) || (item == NULL)) - { - return false; - } - - if (constant_key) - { - new_key = (char*)cast_away_const(string); - new_type = item->type | cJSON_StringIsConst; - } - else - { - new_key = (char*)cJSON_strdup((const unsigned char*)string, hooks); - if (new_key == NULL) - { - return false; - } - - new_type = item->type & ~cJSON_StringIsConst; - } - - if (!(item->type & cJSON_StringIsConst) && (item->string != NULL)) - { - hooks->deallocate(item->string); - } - - item->string = new_key; - item->type = new_type; - - return add_item_to_array(object, item); -} - -CJSON_PUBLIC(void) cJSON_AddItemToObject(cJSON *object, const char *string, cJSON *item) -{ - add_item_to_object(object, string, item, &global_hooks, false); -} - -/* Add an item to an object with constant string as key */ -CJSON_PUBLIC(void) cJSON_AddItemToObjectCS(cJSON *object, const char *string, cJSON *item) -{ - add_item_to_object(object, string, item, &global_hooks, true); -} - -CJSON_PUBLIC(void) cJSON_AddItemReferenceToArray(cJSON *array, cJSON *item) -{ - if (array == NULL) - { - return; - } - - add_item_to_array(array, create_reference(item, &global_hooks)); -} - -CJSON_PUBLIC(void) cJSON_AddItemReferenceToObject(cJSON *object, const char *string, cJSON *item) -{ - if ((object == NULL) || (string == NULL)) - { - return; - } - - add_item_to_object(object, string, create_reference(item, &global_hooks), &global_hooks, false); -} - -CJSON_PUBLIC(cJSON*) cJSON_AddNullToObject(cJSON * const object, const char * const name) -{ - cJSON *null = cJSON_CreateNull(); - if (add_item_to_object(object, name, null, &global_hooks, false)) - { - return null; - } - - cJSON_Delete(null); - return NULL; -} - -CJSON_PUBLIC(cJSON*) cJSON_AddTrueToObject(cJSON * const object, const char * const name) -{ - cJSON *true_item = cJSON_CreateTrue(); - if (add_item_to_object(object, name, true_item, &global_hooks, false)) - { - return true_item; - } - - cJSON_Delete(true_item); - return NULL; -} - -CJSON_PUBLIC(cJSON*) cJSON_AddFalseToObject(cJSON * const object, const char * const name) -{ - cJSON *false_item = cJSON_CreateFalse(); - if (add_item_to_object(object, name, false_item, &global_hooks, false)) - { - return false_item; - } - - cJSON_Delete(false_item); - return NULL; -} - -CJSON_PUBLIC(cJSON*) cJSON_AddBoolToObject(cJSON * const object, const char * const name, const cJSON_bool boolean) -{ - cJSON *bool_item = cJSON_CreateBool(boolean); - if (add_item_to_object(object, name, bool_item, &global_hooks, false)) - { - return bool_item; - } - - cJSON_Delete(bool_item); - return NULL; -} - -CJSON_PUBLIC(cJSON*) cJSON_AddNumberToObject(cJSON * const object, const char * const name, const double number) -{ - cJSON *number_item = cJSON_CreateNumber(number); - if (add_item_to_object(object, name, number_item, &global_hooks, false)) - { - return number_item; - } - - cJSON_Delete(number_item); - return NULL; -} - -CJSON_PUBLIC(cJSON*) cJSON_AddStringToObject(cJSON * const object, const char * const name, const char * const string) -{ - cJSON *string_item = cJSON_CreateString(string); - if (add_item_to_object(object, name, string_item, &global_hooks, false)) - { - return string_item; - } - - cJSON_Delete(string_item); - return NULL; -} - -CJSON_PUBLIC(cJSON*) cJSON_AddRawToObject(cJSON * const object, const char * const name, const char * const raw) -{ - cJSON *raw_item = cJSON_CreateRaw(raw); - if (add_item_to_object(object, name, raw_item, &global_hooks, false)) - { - return raw_item; - } - - cJSON_Delete(raw_item); - return NULL; -} - -CJSON_PUBLIC(cJSON*) cJSON_AddObjectToObject(cJSON * const object, const char * const name) -{ - cJSON *object_item = cJSON_CreateObject(); - if (add_item_to_object(object, name, object_item, &global_hooks, false)) - { - return object_item; - } - - cJSON_Delete(object_item); - return NULL; -} - -CJSON_PUBLIC(cJSON*) cJSON_AddArrayToObject(cJSON * const object, const char * const name) -{ - cJSON *array = cJSON_CreateArray(); - if (add_item_to_object(object, name, array, &global_hooks, false)) - { - return array; - } - - cJSON_Delete(array); - return NULL; -} - -CJSON_PUBLIC(cJSON *) cJSON_DetachItemViaPointer(cJSON *parent, cJSON * const item) -{ - if ((parent == NULL) || (item == NULL)) - { - return NULL; - } - - if (item->prev != NULL) - { - /* not the first element */ - item->prev->next = item->next; - } - if (item->next != NULL) - { - /* not the last element */ - item->next->prev = item->prev; - } - - if (item == parent->child) - { - /* first element */ - parent->child = item->next; - } - /* make sure the detached item doesn't point anywhere anymore */ - item->prev = NULL; - item->next = NULL; - - return item; -} - -CJSON_PUBLIC(cJSON *) cJSON_DetachItemFromArray(cJSON *array, int which) -{ - if (which < 0) - { - return NULL; - } - - return cJSON_DetachItemViaPointer(array, get_array_item(array, (size_t)which)); -} - -CJSON_PUBLIC(void) cJSON_DeleteItemFromArray(cJSON *array, int which) -{ - cJSON_Delete(cJSON_DetachItemFromArray(array, which)); -} - -CJSON_PUBLIC(cJSON *) cJSON_DetachItemFromObject(cJSON *object, const char *string) -{ - cJSON *to_detach = cJSON_GetObjectItem(object, string); - - return cJSON_DetachItemViaPointer(object, to_detach); -} - -CJSON_PUBLIC(cJSON *) cJSON_DetachItemFromObjectCaseSensitive(cJSON *object, const char *string) -{ - cJSON *to_detach = cJSON_GetObjectItemCaseSensitive(object, string); - - return cJSON_DetachItemViaPointer(object, to_detach); -} - -CJSON_PUBLIC(void) cJSON_DeleteItemFromObject(cJSON *object, const char *string) -{ - cJSON_Delete(cJSON_DetachItemFromObject(object, string)); -} - -CJSON_PUBLIC(void) cJSON_DeleteItemFromObjectCaseSensitive(cJSON *object, const char *string) -{ - cJSON_Delete(cJSON_DetachItemFromObjectCaseSensitive(object, string)); -} - -/* Replace array/object items with new ones. */ -CJSON_PUBLIC(void) cJSON_InsertItemInArray(cJSON *array, int which, cJSON *newitem) -{ - cJSON *after_inserted = NULL; - - if (which < 0) - { - return; - } - - after_inserted = get_array_item(array, (size_t)which); - if (after_inserted == NULL) - { - add_item_to_array(array, newitem); - return; - } - - newitem->next = after_inserted; - newitem->prev = after_inserted->prev; - after_inserted->prev = newitem; - if (after_inserted == array->child) - { - array->child = newitem; - } - else - { - newitem->prev->next = newitem; - } -} - -CJSON_PUBLIC(cJSON_bool) cJSON_ReplaceItemViaPointer(cJSON * const parent, cJSON * const item, cJSON * replacement) -{ - if ((parent == NULL) || (replacement == NULL) || (item == NULL)) - { - return false; - } - - if (replacement == item) - { - return true; - } - - replacement->next = item->next; - replacement->prev = item->prev; - - if (replacement->next != NULL) - { - replacement->next->prev = replacement; - } - if (replacement->prev != NULL) - { - replacement->prev->next = replacement; - } - if (parent->child == item) - { - parent->child = replacement; - } - - item->next = NULL; - item->prev = NULL; - cJSON_Delete(item); - - return true; -} - -CJSON_PUBLIC(void) cJSON_ReplaceItemInArray(cJSON *array, int which, cJSON *newitem) -{ - if (which < 0) - { - return; - } - - cJSON_ReplaceItemViaPointer(array, get_array_item(array, (size_t)which), newitem); -} - -static cJSON_bool replace_item_in_object(cJSON *object, const char *string, cJSON *replacement, cJSON_bool case_sensitive) -{ - if ((replacement == NULL) || (string == NULL)) - { - return false; - } - - /* replace the name in the replacement */ - if (!(replacement->type & cJSON_StringIsConst) && (replacement->string != NULL)) - { - cJSON_free(replacement->string); - } - replacement->string = (char*)cJSON_strdup((const unsigned char*)string, &global_hooks); - replacement->type &= ~cJSON_StringIsConst; - - cJSON_ReplaceItemViaPointer(object, get_object_item(object, string, case_sensitive), replacement); - - return true; -} - -CJSON_PUBLIC(void) cJSON_ReplaceItemInObject(cJSON *object, const char *string, cJSON *newitem) -{ - replace_item_in_object(object, string, newitem, false); -} - -CJSON_PUBLIC(void) cJSON_ReplaceItemInObjectCaseSensitive(cJSON *object, const char *string, cJSON *newitem) -{ - replace_item_in_object(object, string, newitem, true); -} - -/* Create basic types: */ -CJSON_PUBLIC(cJSON *) cJSON_CreateNull(void) -{ - cJSON *item = cJSON_New_Item(&global_hooks); - if(item) - { - item->type = cJSON_NULL; - } - - return item; -} - -CJSON_PUBLIC(cJSON *) cJSON_CreateTrue(void) -{ - cJSON *item = cJSON_New_Item(&global_hooks); - if(item) - { - item->type = cJSON_True; - } - - return item; -} - -CJSON_PUBLIC(cJSON *) cJSON_CreateFalse(void) -{ - cJSON *item = cJSON_New_Item(&global_hooks); - if(item) - { - item->type = cJSON_False; - } - - return item; -} - -CJSON_PUBLIC(cJSON *) cJSON_CreateBool(cJSON_bool b) -{ - cJSON *item = cJSON_New_Item(&global_hooks); - if(item) - { - item->type = b ? cJSON_True : cJSON_False; - } - - return item; -} - -CJSON_PUBLIC(cJSON *) cJSON_CreateNumber(double num) -{ - cJSON *item = cJSON_New_Item(&global_hooks); - if(item) - { - item->type = cJSON_Number; - item->valuedouble = num; - - /* use saturation in case of overflow */ - if (num >= INT_MAX) - { - item->valueint = INT_MAX; - } - else if (num <= (double)INT_MIN) - { - item->valueint = INT_MIN; - } - else - { - item->valueint = (int)num; - } - } - - return item; -} - -CJSON_PUBLIC(cJSON *) cJSON_CreateString(const char *string) -{ - cJSON *item = cJSON_New_Item(&global_hooks); - if(item) - { - item->type = cJSON_String; - item->valuestring = (char*)cJSON_strdup((const unsigned char*)string, &global_hooks); - if(!item->valuestring) - { - cJSON_Delete(item); - return NULL; - } - } - - return item; -} - -CJSON_PUBLIC(cJSON *) cJSON_CreateStringReference(const char *string) -{ - cJSON *item = cJSON_New_Item(&global_hooks); - if (item != NULL) - { - item->type = cJSON_String | cJSON_IsReference; - item->valuestring = (char*)cast_away_const(string); - } - - return item; -} - -CJSON_PUBLIC(cJSON *) cJSON_CreateObjectReference(const cJSON *child) -{ - cJSON *item = cJSON_New_Item(&global_hooks); - if (item != NULL) { - item->type = cJSON_Object | cJSON_IsReference; - item->child = (cJSON*)cast_away_const(child); - } - - return item; -} - -CJSON_PUBLIC(cJSON *) cJSON_CreateArrayReference(const cJSON *child) { - cJSON *item = cJSON_New_Item(&global_hooks); - if (item != NULL) { - item->type = cJSON_Array | cJSON_IsReference; - item->child = (cJSON*)cast_away_const(child); - } - - return item; -} - -CJSON_PUBLIC(cJSON *) cJSON_CreateRaw(const char *raw) -{ - cJSON *item = cJSON_New_Item(&global_hooks); - if(item) - { - item->type = cJSON_Raw; - item->valuestring = (char*)cJSON_strdup((const unsigned char*)raw, &global_hooks); - if(!item->valuestring) - { - cJSON_Delete(item); - return NULL; - } - } - - return item; -} - -CJSON_PUBLIC(cJSON *) cJSON_CreateArray(void) -{ - cJSON *item = cJSON_New_Item(&global_hooks); - if(item) - { - item->type=cJSON_Array; - } - - return item; -} - -CJSON_PUBLIC(cJSON *) cJSON_CreateObject(void) -{ - cJSON *item = cJSON_New_Item(&global_hooks); - if (item) - { - item->type = cJSON_Object; - } - - return item; -} - -/* Create Arrays: */ -CJSON_PUBLIC(cJSON *) cJSON_CreateIntArray(const int *numbers, int count) -{ - size_t i = 0; - cJSON *n = NULL; - cJSON *p = NULL; - cJSON *a = NULL; - - if ((count < 0) || (numbers == NULL)) - { - return NULL; - } - - a = cJSON_CreateArray(); - for(i = 0; a && (i < (size_t)count); i++) - { - n = cJSON_CreateNumber(numbers[i]); - if (!n) - { - cJSON_Delete(a); - return NULL; - } - if(!i) - { - a->child = n; - } - else - { - suffix_object(p, n); - } - p = n; - } - - return a; -} - -CJSON_PUBLIC(cJSON *) cJSON_CreateFloatArray(const float *numbers, int count) -{ - size_t i = 0; - cJSON *n = NULL; - cJSON *p = NULL; - cJSON *a = NULL; - - if ((count < 0) || (numbers == NULL)) - { - return NULL; - } - - a = cJSON_CreateArray(); - - for(i = 0; a && (i < (size_t)count); i++) - { - n = cJSON_CreateNumber((double)numbers[i]); - if(!n) - { - cJSON_Delete(a); - return NULL; - } - if(!i) - { - a->child = n; - } - else - { - suffix_object(p, n); - } - p = n; - } - - return a; -} - -CJSON_PUBLIC(cJSON *) cJSON_CreateDoubleArray(const double *numbers, int count) -{ - size_t i = 0; - cJSON *n = NULL; - cJSON *p = NULL; - cJSON *a = NULL; - - if ((count < 0) || (numbers == NULL)) - { - return NULL; - } - - a = cJSON_CreateArray(); - - for(i = 0;a && (i < (size_t)count); i++) - { - n = cJSON_CreateNumber(numbers[i]); - if(!n) - { - cJSON_Delete(a); - return NULL; - } - if(!i) - { - a->child = n; - } - else - { - suffix_object(p, n); - } - p = n; - } - - return a; -} - -CJSON_PUBLIC(cJSON *) cJSON_CreateStringArray(const char **strings, int count) -{ - size_t i = 0; - cJSON *n = NULL; - cJSON *p = NULL; - cJSON *a = NULL; - - if ((count < 0) || (strings == NULL)) - { - return NULL; - } - - a = cJSON_CreateArray(); - - for (i = 0; a && (i < (size_t)count); i++) - { - n = cJSON_CreateString(strings[i]); - if(!n) - { - cJSON_Delete(a); - return NULL; - } - if(!i) - { - a->child = n; - } - else - { - suffix_object(p,n); - } - p = n; - } - - return a; -} - -/* Duplication */ -CJSON_PUBLIC(cJSON *) cJSON_Duplicate(const cJSON *item, cJSON_bool recurse) -{ - cJSON *newitem = NULL; - cJSON *child = NULL; - cJSON *next = NULL; - cJSON *newchild = NULL; - - /* Bail on bad ptr */ - if (!item) - { - goto fail; - } - /* Create new item */ - newitem = cJSON_New_Item(&global_hooks); - if (!newitem) - { - goto fail; - } - /* Copy over all vars */ - newitem->type = item->type & (~cJSON_IsReference); - newitem->valueint = item->valueint; - newitem->valuedouble = item->valuedouble; - if (item->valuestring) - { - newitem->valuestring = (char*)cJSON_strdup((unsigned char*)item->valuestring, &global_hooks); - if (!newitem->valuestring) - { - goto fail; - } - } - if (item->string) - { - newitem->string = (item->type&cJSON_StringIsConst) ? item->string : (char*)cJSON_strdup((unsigned char*)item->string, &global_hooks); - if (!newitem->string) - { - goto fail; - } - } - /* If non-recursive, then we're done! */ - if (!recurse) - { - return newitem; - } - /* Walk the ->next chain for the child. */ - child = item->child; - while (child != NULL) - { - newchild = cJSON_Duplicate(child, true); /* Duplicate (with recurse) each item in the ->next chain */ - if (!newchild) - { - goto fail; - } - if (next != NULL) - { - /* If newitem->child already set, then crosswire ->prev and ->next and move on */ - next->next = newchild; - newchild->prev = next; - next = newchild; - } - else - { - /* Set newitem->child and move to it */ - newitem->child = newchild; - next = newchild; - } - child = child->next; - } - - return newitem; - -fail: - if (newitem != NULL) - { - cJSON_Delete(newitem); - } - - return NULL; -} - -CJSON_PUBLIC(void) cJSON_Minify(char *json) -{ - unsigned char *into = (unsigned char*)json; - - if (json == NULL) - { - return; - } - - while (*json) - { - if (*json == ' ') - { - json++; - } - else if (*json == '\t') - { - /* Whitespace characters. */ - json++; - } - else if (*json == '\r') - { - json++; - } - else if (*json=='\n') - { - json++; - } - else if ((*json == '/') && (json[1] == '/')) - { - /* double-slash comments, to end of line. */ - while (*json && (*json != '\n')) - { - json++; - } - } - else if ((*json == '/') && (json[1] == '*')) - { - /* multiline comments. */ - while (*json && !((*json == '*') && (json[1] == '/'))) - { - json++; - } - json += 2; - } - else if (*json == '\"') - { - /* string literals, which are \" sensitive. */ - *into++ = (unsigned char)*json++; - while (*json && (*json != '\"')) - { - if (*json == '\\') - { - *into++ = (unsigned char)*json++; - } - *into++ = (unsigned char)*json++; - } - *into++ = (unsigned char)*json++; - } - else - { - /* All other characters. */ - *into++ = (unsigned char)*json++; - } - } - - /* and null-terminate. */ - *into = '\0'; -} - -CJSON_PUBLIC(cJSON_bool) cJSON_IsInvalid(const cJSON * const item) -{ - if (item == NULL) - { - return false; - } - - return (item->type & 0xFF) == cJSON_Invalid; -} - -CJSON_PUBLIC(cJSON_bool) cJSON_IsFalse(const cJSON * const item) -{ - if (item == NULL) - { - return false; - } - - return (item->type & 0xFF) == cJSON_False; -} - -CJSON_PUBLIC(cJSON_bool) cJSON_IsTrue(const cJSON * const item) -{ - if (item == NULL) - { - return false; - } - - return (item->type & 0xff) == cJSON_True; -} - - -CJSON_PUBLIC(cJSON_bool) cJSON_IsBool(const cJSON * const item) -{ - if (item == NULL) - { - return false; - } - - return (item->type & (cJSON_True | cJSON_False)) != 0; -} -CJSON_PUBLIC(cJSON_bool) cJSON_IsNull(const cJSON * const item) -{ - if (item == NULL) - { - return false; - } - - return (item->type & 0xFF) == cJSON_NULL; -} - -CJSON_PUBLIC(cJSON_bool) cJSON_IsNumber(const cJSON * const item) -{ - if (item == NULL) - { - return false; - } - - return (item->type & 0xFF) == cJSON_Number; -} - -CJSON_PUBLIC(cJSON_bool) cJSON_IsString(const cJSON * const item) -{ - if (item == NULL) - { - return false; - } - - return (item->type & 0xFF) == cJSON_String; -} - -CJSON_PUBLIC(cJSON_bool) cJSON_IsArray(const cJSON * const item) -{ - if (item == NULL) - { - return false; - } - - return (item->type & 0xFF) == cJSON_Array; -} - -CJSON_PUBLIC(cJSON_bool) cJSON_IsObject(const cJSON * const item) -{ - if (item == NULL) - { - return false; - } - - return (item->type & 0xFF) == cJSON_Object; -} - -CJSON_PUBLIC(cJSON_bool) cJSON_IsRaw(const cJSON * const item) -{ - if (item == NULL) - { - return false; - } - - return (item->type & 0xFF) == cJSON_Raw; -} - -CJSON_PUBLIC(cJSON_bool) cJSON_Compare(const cJSON * const a, const cJSON * const b, const cJSON_bool case_sensitive) -{ - if ((a == NULL) || (b == NULL) || ((a->type & 0xFF) != (b->type & 0xFF)) || cJSON_IsInvalid(a)) - { - return false; - } - - /* check if type is valid */ - switch (a->type & 0xFF) - { - case cJSON_False: - case cJSON_True: - case cJSON_NULL: - case cJSON_Number: - case cJSON_String: - case cJSON_Raw: - case cJSON_Array: - case cJSON_Object: - break; - - default: - return false; - } - - /* identical objects are equal */ - if (a == b) - { - return true; - } - - switch (a->type & 0xFF) - { - /* in these cases and equal type is enough */ - case cJSON_False: - case cJSON_True: - case cJSON_NULL: - return true; - - case cJSON_Number: - if (a->valuedouble == b->valuedouble) - { - return true; - } - return false; - - case cJSON_String: - case cJSON_Raw: - if ((a->valuestring == NULL) || (b->valuestring == NULL)) - { - return false; - } - if (strcmp(a->valuestring, b->valuestring) == 0) - { - return true; - } - - return false; - - case cJSON_Array: - { - cJSON *a_element = a->child; - cJSON *b_element = b->child; - - for (; (a_element != NULL) && (b_element != NULL);) - { - if (!cJSON_Compare(a_element, b_element, case_sensitive)) - { - return false; - } - - a_element = a_element->next; - b_element = b_element->next; - } - - /* one of the arrays is longer than the other */ - if (a_element != b_element) { - return false; - } - - return true; - } - - case cJSON_Object: - { - cJSON *a_element = NULL; - cJSON *b_element = NULL; - cJSON_ArrayForEach(a_element, a) - { - /* TODO This has O(n^2) runtime, which is horrible! */ - b_element = get_object_item(b, a_element->string, case_sensitive); - if (b_element == NULL) - { - return false; - } - - if (!cJSON_Compare(a_element, b_element, case_sensitive)) - { - return false; - } - } - - /* doing this twice, once on a and b to prevent true comparison if a subset of b - * TODO: Do this the proper way, this is just a fix for now */ - cJSON_ArrayForEach(b_element, b) - { - a_element = get_object_item(a, b_element->string, case_sensitive); - if (a_element == NULL) - { - return false; - } - - if (!cJSON_Compare(b_element, a_element, case_sensitive)) - { - return false; - } - } - - return true; - } - - default: - return false; - } -} - -CJSON_PUBLIC(void *) cJSON_malloc(size_t size) -{ - return global_hooks.allocate(size); -} - -CJSON_PUBLIC(void) cJSON_free(void *object) -{ - global_hooks.deallocate(object); -} diff --git a/app/bin/cJSON.h b/app/bin/cJSON.h deleted file mode 100755 index 291d694..0000000 --- a/app/bin/cJSON.h +++ /dev/null @@ -1,285 +0,0 @@ -/** - Copyright (c) 2009-2017 Dave Gamble and cJSON contributors - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. -*/ - -#ifndef cJSON__h -#define cJSON__h - -#ifdef __cplusplus -extern "C" -{ -#endif - -#if !defined(__WINDOWS__) && (defined(WIN32) || defined(WIN64) || defined(_MSC_VER) || defined(_WIN32)) -#define __WINDOWS__ -#endif - -#ifdef __WINDOWS__ - -/* When compiling for windows, we specify a specific calling convention to avoid issues where we are being called from a project with a different default calling convention. For windows you have 3 define options: - -CJSON_HIDE_SYMBOLS - Define this in the case where you don't want to ever dllexport symbols -CJSON_EXPORT_SYMBOLS - Define this on library build when you want to dllexport symbols (default) -CJSON_IMPORT_SYMBOLS - Define this if you want to dllimport symbol - -For *nix builds that support visibility attribute, you can define similar behavior by - -setting default visibility to hidden by adding --fvisibility=hidden (for gcc) -or --xldscope=hidden (for sun cc) -to CFLAGS - -then using the CJSON_API_VISIBILITY flag to "export" the same symbols the way CJSON_EXPORT_SYMBOLS does - -*/ - -#define CJSON_CDECL __cdecl -#define CJSON_STDCALL __stdcall - -/* export symbols by default, this is necessary for copy pasting the C and header file */ -#if !defined(CJSON_HIDE_SYMBOLS) && !defined(CJSON_IMPORT_SYMBOLS) && !defined(CJSON_EXPORT_SYMBOLS) -#define CJSON_EXPORT_SYMBOLS -#endif - -#if defined(CJSON_HIDE_SYMBOLS) -#define CJSON_PUBLIC(type) type CJSON_STDCALL -#elif defined(CJSON_EXPORT_SYMBOLS) -#define CJSON_PUBLIC(type) __declspec(dllexport) type CJSON_STDCALL -#elif defined(CJSON_IMPORT_SYMBOLS) -#define CJSON_PUBLIC(type) __declspec(dllimport) type CJSON_STDCALL -#endif -#else /* !__WINDOWS__ */ -#define CJSON_CDECL -#define CJSON_STDCALL - -#if (defined(__GNUC__) || defined(__SUNPRO_CC) || defined (__SUNPRO_C)) && defined(CJSON_API_VISIBILITY) -#define CJSON_PUBLIC(type) __attribute__((visibility("default"))) type -#else -#define CJSON_PUBLIC(type) type -#endif -#endif - -/* project version */ -#define CJSON_VERSION_MAJOR 1 -#define CJSON_VERSION_MINOR 7 -#define CJSON_VERSION_PATCH 8 - -#include - -/* cJSON Types: */ -#define cJSON_Invalid (0) -#define cJSON_False (1 << 0) -#define cJSON_True (1 << 1) -#define cJSON_NULL (1 << 2) -#define cJSON_Number (1 << 3) -#define cJSON_String (1 << 4) -#define cJSON_Array (1 << 5) -#define cJSON_Object (1 << 6) -#define cJSON_Raw (1 << 7) /* raw json */ - -#define cJSON_IsReference 256 -#define cJSON_StringIsConst 512 - -/* The cJSON structure: */ -typedef struct cJSON -{ - /* next/prev allow you to walk array/object chains. Alternatively, use GetArraySize/GetArrayItem/GetObjectItem */ - struct cJSON *next; - struct cJSON *prev; - /* An array or object item will have a child pointer pointing to a chain of the items in the array/object. */ - struct cJSON *child; - - /* The type of the item, as above. */ - int type; - - /* The item's string, if type==cJSON_String and type == cJSON_Raw */ - char *valuestring; - /* writing to valueint is DEPRECATED, use cJSON_SetNumberValue instead */ - int valueint; - /* The item's number, if type==cJSON_Number */ - double valuedouble; - - /* The item's name string, if this item is the child of, or is in the list of subitems of an object. */ - char *string; -} cJSON; - -typedef struct cJSON_Hooks -{ - /* malloc/free are CDECL on Windows regardless of the default calling convention of the compiler, so ensure the hooks allow passing those functions directly. */ - void *(CJSON_CDECL *malloc_fn)(size_t sz); - void (CJSON_CDECL *free_fn)(void *ptr); -} cJSON_Hooks; - -typedef int cJSON_bool; - -/* Limits how deeply nested arrays/objects can be before cJSON rejects to parse them. - * This is to prevent stack overflows. */ -#ifndef CJSON_NESTING_LIMIT -#define CJSON_NESTING_LIMIT 1000 -#endif - -/* returns the version of cJSON as a string */ -CJSON_PUBLIC(const char*) cJSON_Version(void); - -/* Supply malloc, realloc and free functions to cJSON */ -CJSON_PUBLIC(void) cJSON_InitHooks(cJSON_Hooks* hooks); - -/* Memory Management: the caller is always responsible to free the results from all variants of cJSON_Parse (with cJSON_Delete) and cJSON_Print (with stdlib free, cJSON_Hooks.free_fn, or cJSON_free as appropriate). The exception is cJSON_PrintPreallocated, where the caller has full responsibility of the buffer. */ -/* Supply a block of JSON, and this returns a cJSON object you can interrogate. */ -CJSON_PUBLIC(cJSON *) cJSON_Parse(const char *value); -/* ParseWithOpts allows you to require (and check) that the JSON is null terminated, and to retrieve the pointer to the final byte parsed. */ -/* If you supply a ptr in return_parse_end and parsing fails, then return_parse_end will contain a pointer to the error so will match cJSON_GetErrorPtr(). */ -CJSON_PUBLIC(cJSON *) cJSON_ParseWithOpts(const char *value, const char **return_parse_end, cJSON_bool require_null_terminated); - -/* Render a cJSON entity to text for transfer/storage. */ -CJSON_PUBLIC(char *) cJSON_Print(const cJSON *item); -/* Render a cJSON entity to text for transfer/storage without any formatting. */ -CJSON_PUBLIC(char *) cJSON_PrintUnformatted(const cJSON *item); -/* Render a cJSON entity to text using a buffered strategy. prebuffer is a guess at the final size. guessing well reduces reallocation. fmt=0 gives unformatted, =1 gives formatted */ -CJSON_PUBLIC(char *) cJSON_PrintBuffered(const cJSON *item, int prebuffer, cJSON_bool fmt); -/* Render a cJSON entity to text using a buffer already allocated in memory with given length. Returns 1 on success and 0 on failure. */ -/* NOTE: cJSON is not always 100% accurate in estimating how much memory it will use, so to be safe allocate 5 bytes more than you actually need */ -CJSON_PUBLIC(cJSON_bool) cJSON_PrintPreallocated(cJSON *item, char *buffer, const int length, const cJSON_bool format); -/* Delete a cJSON entity and all subentities. */ -CJSON_PUBLIC(void) cJSON_Delete(cJSON *c); - -/* Returns the number of items in an array (or object). */ -CJSON_PUBLIC(int) cJSON_GetArraySize(const cJSON *array); -/* Retrieve item number "index" from array "array". Returns NULL if unsuccessful. */ -CJSON_PUBLIC(cJSON *) cJSON_GetArrayItem(const cJSON *array, int index); -/* Get item "string" from object. Case insensitive. */ -CJSON_PUBLIC(cJSON *) cJSON_GetObjectItem(const cJSON * const object, const char * const string); -CJSON_PUBLIC(cJSON *) cJSON_GetObjectItemCaseSensitive(const cJSON * const object, const char * const string); -CJSON_PUBLIC(cJSON_bool) cJSON_HasObjectItem(const cJSON *object, const char *string); -/* For analysing failed parses. This returns a pointer to the parse error. You'll probably need to look a few chars back to make sense of it. Defined when cJSON_Parse() returns 0. 0 when cJSON_Parse() succeeds. */ -CJSON_PUBLIC(const char *) cJSON_GetErrorPtr(void); - -/* Check if the item is a string and return its valuestring */ -CJSON_PUBLIC(char *) cJSON_GetStringValue(cJSON *item); - -/* These functions check the type of an item */ -CJSON_PUBLIC(cJSON_bool) cJSON_IsInvalid(const cJSON * const item); -CJSON_PUBLIC(cJSON_bool) cJSON_IsFalse(const cJSON * const item); -CJSON_PUBLIC(cJSON_bool) cJSON_IsTrue(const cJSON * const item); -CJSON_PUBLIC(cJSON_bool) cJSON_IsBool(const cJSON * const item); -CJSON_PUBLIC(cJSON_bool) cJSON_IsNull(const cJSON * const item); -CJSON_PUBLIC(cJSON_bool) cJSON_IsNumber(const cJSON * const item); -CJSON_PUBLIC(cJSON_bool) cJSON_IsString(const cJSON * const item); -CJSON_PUBLIC(cJSON_bool) cJSON_IsArray(const cJSON * const item); -CJSON_PUBLIC(cJSON_bool) cJSON_IsObject(const cJSON * const item); -CJSON_PUBLIC(cJSON_bool) cJSON_IsRaw(const cJSON * const item); - -/* These calls create a cJSON item of the appropriate type. */ -CJSON_PUBLIC(cJSON *) cJSON_CreateNull(void); -CJSON_PUBLIC(cJSON *) cJSON_CreateTrue(void); -CJSON_PUBLIC(cJSON *) cJSON_CreateFalse(void); -CJSON_PUBLIC(cJSON *) cJSON_CreateBool(cJSON_bool boolean); -CJSON_PUBLIC(cJSON *) cJSON_CreateNumber(double num); -CJSON_PUBLIC(cJSON *) cJSON_CreateString(const char *string); -/* raw json */ -CJSON_PUBLIC(cJSON *) cJSON_CreateRaw(const char *raw); -CJSON_PUBLIC(cJSON *) cJSON_CreateArray(void); -CJSON_PUBLIC(cJSON *) cJSON_CreateObject(void); - -/* Create a string where valuestring references a string so - * it will not be freed by cJSON_Delete */ -CJSON_PUBLIC(cJSON *) cJSON_CreateStringReference(const char *string); -/* Create an object/arrray that only references it's elements so - * they will not be freed by cJSON_Delete */ -CJSON_PUBLIC(cJSON *) cJSON_CreateObjectReference(const cJSON *child); -CJSON_PUBLIC(cJSON *) cJSON_CreateArrayReference(const cJSON *child); - -/* These utilities create an Array of count items. */ -CJSON_PUBLIC(cJSON *) cJSON_CreateIntArray(const int *numbers, int count); -CJSON_PUBLIC(cJSON *) cJSON_CreateFloatArray(const float *numbers, int count); -CJSON_PUBLIC(cJSON *) cJSON_CreateDoubleArray(const double *numbers, int count); -CJSON_PUBLIC(cJSON *) cJSON_CreateStringArray(const char **strings, int count); - -/* Append item to the specified array/object. */ -CJSON_PUBLIC(void) cJSON_AddItemToArray(cJSON *array, cJSON *item); -CJSON_PUBLIC(void) cJSON_AddItemToObject(cJSON *object, const char *string, cJSON *item); -/* Use this when string is definitely const (i.e. a literal, or as good as), and will definitely survive the cJSON object. - * WARNING: When this function was used, make sure to always check that (item->type & cJSON_StringIsConst) is zero before - * writing to `item->string` */ -CJSON_PUBLIC(void) cJSON_AddItemToObjectCS(cJSON *object, const char *string, cJSON *item); -/* Append reference to item to the specified array/object. Use this when you want to add an existing cJSON to a new cJSON, but don't want to corrupt your existing cJSON. */ -CJSON_PUBLIC(void) cJSON_AddItemReferenceToArray(cJSON *array, cJSON *item); -CJSON_PUBLIC(void) cJSON_AddItemReferenceToObject(cJSON *object, const char *string, cJSON *item); - -/* Remove/Detatch items from Arrays/Objects. */ -CJSON_PUBLIC(cJSON *) cJSON_DetachItemViaPointer(cJSON *parent, cJSON * const item); -CJSON_PUBLIC(cJSON *) cJSON_DetachItemFromArray(cJSON *array, int which); -CJSON_PUBLIC(void) cJSON_DeleteItemFromArray(cJSON *array, int which); -CJSON_PUBLIC(cJSON *) cJSON_DetachItemFromObject(cJSON *object, const char *string); -CJSON_PUBLIC(cJSON *) cJSON_DetachItemFromObjectCaseSensitive(cJSON *object, const char *string); -CJSON_PUBLIC(void) cJSON_DeleteItemFromObject(cJSON *object, const char *string); -CJSON_PUBLIC(void) cJSON_DeleteItemFromObjectCaseSensitive(cJSON *object, const char *string); - -/* Update array items. */ -CJSON_PUBLIC(void) cJSON_InsertItemInArray(cJSON *array, int which, cJSON *newitem); /* Shifts pre-existing items to the right. */ -CJSON_PUBLIC(cJSON_bool) cJSON_ReplaceItemViaPointer(cJSON * const parent, cJSON * const item, cJSON * replacement); -CJSON_PUBLIC(void) cJSON_ReplaceItemInArray(cJSON *array, int which, cJSON *newitem); -CJSON_PUBLIC(void) cJSON_ReplaceItemInObject(cJSON *object,const char *string,cJSON *newitem); -CJSON_PUBLIC(void) cJSON_ReplaceItemInObjectCaseSensitive(cJSON *object,const char *string,cJSON *newitem); - -/* Duplicate a cJSON item */ -CJSON_PUBLIC(cJSON *) cJSON_Duplicate(const cJSON *item, cJSON_bool recurse); -/* Duplicate will create a new, identical cJSON item to the one you pass, in new memory that will -need to be released. With recurse!=0, it will duplicate any children connected to the item. -The item->next and ->prev pointers are always zero on return from Duplicate. */ -/* Recursively compare two cJSON items for equality. If either a or b is NULL or invalid, they will be considered unequal. - * case_sensitive determines if object keys are treated case sensitive (1) or case insensitive (0) */ -CJSON_PUBLIC(cJSON_bool) cJSON_Compare(const cJSON * const a, const cJSON * const b, const cJSON_bool case_sensitive); - - -CJSON_PUBLIC(void) cJSON_Minify(char *json); - -/* Helper functions for creating and adding items to an object at the same time. - * They return the added item or NULL on failure. */ -CJSON_PUBLIC(cJSON*) cJSON_AddNullToObject(cJSON * const object, const char * const name); -CJSON_PUBLIC(cJSON*) cJSON_AddTrueToObject(cJSON * const object, const char * const name); -CJSON_PUBLIC(cJSON*) cJSON_AddFalseToObject(cJSON * const object, const char * const name); -CJSON_PUBLIC(cJSON*) cJSON_AddBoolToObject(cJSON * const object, const char * const name, const cJSON_bool boolean); -CJSON_PUBLIC(cJSON*) cJSON_AddNumberToObject(cJSON * const object, const char * const name, const double number); -CJSON_PUBLIC(cJSON*) cJSON_AddStringToObject(cJSON * const object, const char * const name, const char * const string); -CJSON_PUBLIC(cJSON*) cJSON_AddRawToObject(cJSON * const object, const char * const name, const char * const raw); -CJSON_PUBLIC(cJSON*) cJSON_AddObjectToObject(cJSON * const object, const char * const name); -CJSON_PUBLIC(cJSON*) cJSON_AddArrayToObject(cJSON * const object, const char * const name); - -/* When assigning an integer value, it needs to be propagated to valuedouble too. */ -#define cJSON_SetIntValue(object, number) ((object) ? (object)->valueint = (object)->valuedouble = (number) : (number)) -/* helper for the cJSON_SetNumberValue macro */ -CJSON_PUBLIC(double) cJSON_SetNumberHelper(cJSON *object, double number); -#define cJSON_SetNumberValue(object, number) ((object != NULL) ? cJSON_SetNumberHelper(object, (double)number) : (number)) - -/* Macro for iterating over an array or object */ -#define cJSON_ArrayForEach(element, array) for(element = (array != NULL) ? (array)->child : NULL; element != NULL; element = element->next) - -/* malloc/free objects using the malloc/free functions that have been set with cJSON_InitHooks */ -CJSON_PUBLIC(void *) cJSON_malloc(size_t size); -CJSON_PUBLIC(void) cJSON_free(void *object); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/app/bin/cbezier.c b/app/bin/cbezier.c index 22c95ba..1e09e5d 100644 --- a/app/bin/cbezier.c +++ b/app/bin/cbezier.c @@ -1,45 +1,45 @@ /** \file cbezier.c * Bezier Command. Draw or modify a Bezier (Track or Line). */ - /* XTrkCad - Model Railroad CAD - * - * Cubic Bezier curves have a definitional representation as an a set of four points. - * The first and fourth are the end points, while the middle two are control points. - * The control points positions define the angle at the ends and by their relative positions the overall - * curvature. This representation is a familiar approach for those who know drawing programs such as Adobe - * Illustrator or CorelDraw. - * - * In XTrackCAD, the Bezier form is also represented and drawn as a set of - * joined circular arcs that approximate the Bezier form within a small tolerance. This is because - * many of the operations we need to do are either computationally difficult or - * impossible using the Bezier equations. For example, creating a parallel Bezier - * which is necessary to draw a track with two lines or sleepers has no easy, stable solution. - * But the program is already able to do these tasks for straight lines and curves. - * - * Note that every time we change the Bezier points we have to recalculate the arc approximation, - * but that means that the majority of the time we are using the simpler approximation. - * - * We do not allow Bezier curves that have loops or cusps as they make no sense for tracks and - * can easily be approximated for lines with multiple unaligned Bezier curves. - * - * This program borrows from particular ideas about converting Bezier curves that Pomax placed into - * open source. The originals in Javascript can be found at github.com/Pomax. - * The web pages that explain many other techniques are located at https://pomax.github.io/bezierinfo - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ +/* XTrkCad - Model Railroad CAD +* +* Cubic Bezier curves have a definitional representation as an a set of four points. +* The first and fourth are the end points, while the middle two are control points. +* The control points positions define the angle at the ends and by their relative positions the overall +* curvature. This representation is a familiar approach for those who know drawing programs such as Adobe +* Illustrator or CorelDraw. +* +* In XTrackCAD, the Bezier form is also represented and drawn as a set of +* joined circular arcs that approximate the Bezier form within a small tolerance. This is because +* many of the operations we need to do are either computationally difficult or +* impossible using the Bezier equations. For example, creating a parallel Bezier +* which is necessary to draw a track with two lines or sleepers has no easy, stable solution. +* But the program is already able to do these tasks for straight lines and curves. +* +* Note that every time we change the Bezier points we have to recalculate the arc approximation, +* but that means that the majority of the time we are using the simpler approximation. +* +* We do not allow Bezier curves that have loops or cusps as they make no sense for tracks and +* can easily be approximated for lines with multiple unaligned Bezier curves. +* +* This program borrows from particular ideas about converting Bezier curves that Pomax placed into +* open source. The originals in Javascript can be found at github.com/Pomax. +* The web pages that explain many other techniques are located at https://pomax.github.io/bezierinfo +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ #include "common.h" @@ -59,49 +59,47 @@ #include "cundo.h" #include "compound.h" -extern drawCmd_t tempD; /* * STATE INFO */ enum Bezier_States { NONE, - POS_1, - CONTROL_ARM_1, - POS_2, - CONTROL_ARM_2, - PICK_POINT, - POINT_PICKED, - TRACK_SELECTED }; + POS_1, + CONTROL_ARM_1, + POS_2, + CONTROL_ARM_2, + PICK_POINT, + POINT_PICKED, + TRACK_SELECTED + }; typedef struct { - curveData_t curveData; - double start; - double end; - coOrd pos0; - coOrd pos1; - } bCurveData_t; + curveData_t curveData; + double start; + double end; + coOrd pos0; + coOrd pos1; +} bCurveData_t; static struct { - enum Bezier_States state; - coOrd pos[4]; - int selectPoint; - wDrawColor color; - DIST_T width; - track_p trk[2]; - EPINX_T ep[2]; - dynArr_t crvSegs_da; - int crvSegs_da_cnt; - trkSeg_t cp1Segs_da[4]; - int cp1Segs_da_cnt; - trkSeg_t cp2Segs_da[4]; - int cp2Segs_da_cnt; - BOOL_T unlocked; - track_p selectTrack; - BOOL_T track; - DIST_T minRadius; - DIST_T trackGauge; - } Da; + enum Bezier_States state; + coOrd pos[4]; + int selectPoint; + track_p trk[2]; + EPINX_T ep[2]; + dynArr_t crvSegs_da; + int crvSegs_da_cnt; + trkSeg_t cp1Segs_da[4]; + int cp1Segs_da_cnt; + trkSeg_t cp2Segs_da[4]; + int cp2Segs_da_cnt; + BOOL_T unlocked; + track_p selectTrack; + BOOL_T track; + DIST_T minRadius; + DIST_T trackGauge; +} Da; static dynArr_t anchors_da; #define anchors(N) DYNARR_N(trkSeg_t,anchors_da,N) @@ -114,46 +112,47 @@ static dynArr_t anchors_da; * A red color indicates that this arm, end or control point is "active" as it was selected. */ int createControlArm( - trkSeg_t sp[], //seg pointer for up to 3 trkSegs (ends and line) - coOrd pos0, //end on curve - coOrd pos1, // control point at other end of line - BOOL_T track, // isTrack()? (otherwise Line) - BOOL_T selectable, // can this arm be selected? - BOOL_T cp_direction_locked, //isFixed to track - int point_selected, //number of point 0, 1 or -1 - wDrawColor color //drawColorBlack or drawColorWhite - ) + trkSeg_t sp[], //seg pointer for up to 3 trkSegs (ends and line) + coOrd pos0, //end on curve + coOrd pos1, // control point at other end of line + BOOL_T track, // isTrack()? (otherwise Line) + BOOL_T selectable, // can this arm be selected? + BOOL_T cp_direction_locked, //isFixed to track + int point_selected, //number of point 0, 1 or -1 + wDrawColor color //drawColorBlack or drawColorWhite +) { - DIST_T d, w; - d = tempD.scale*0.25; - w = tempD.scale/tempD.dpi; /*double width*/ - sp[0].u.l.pos[0] = pos0; - sp[0].u.l.pos[1] = pos1; - sp[0].type = SEG_STRLIN; - sp[0].width = w; - sp[0].color = (point_selected>=0)?drawColorRed:drawColorBlack; - int n = 0; - if (selectable) { - for (int j=0;j<2;j++) { - if (j==0 && cp_direction_locked) continue; //Don't show select circle if end locked - n++; - sp[n].u.c.center = j==0?pos0:pos1; - sp[n].u.c.radius = d/4; - sp[n].width = w; - sp[n].color = (j==point_selected)?drawColorRed:drawColorBlack; - if (j==point_selected && cp_direction_locked) { - sp[n].type = SEG_FILCRCL; - } else { - sp[n].type = SEG_CRVLIN; - sp[n].u.c.a0 = 0.0; - sp[n].u.c.a1 = 360.0; - } - } - } - return n+1; + DIST_T d, w; + d = tempD.scale*0.25; + w = tempD.scale/tempD.dpi; /*double width*/ + sp[0].u.l.pos[0] = pos0; + sp[0].u.l.pos[1] = pos1; + sp[0].type = SEG_STRLIN; + sp[0].lineWidth = w; + sp[0].color = (point_selected>=0)?drawColorRed:drawColorBlack; + int n = 0; + if (selectable) { + for (int j=0; j<2; j++) { + if (j==0 && cp_direction_locked) { continue; } //Don't show select circle if end locked + n++; + sp[n].u.c.center = j==0?pos0:pos1; + sp[n].u.c.radius = d/4; + sp[n].lineWidth = w; + sp[n].color = (j==point_selected)?drawColorRed:drawColorBlack; + if (j==point_selected && cp_direction_locked) { + sp[n].type = SEG_FILCRCL; + } else { + sp[n].type = SEG_CRVLIN; + sp[n].u.c.a0 = 0.0; + sp[n].u.c.a1 = 360.0; + } + } + } + return n+1; } -coOrd getPoint(coOrd pos[4], double s) { +coOrd getPoint(coOrd pos[4], double s) +{ double mt = 1-s; double a = mt*mt*mt; double b = mt*mt*s*3; @@ -172,48 +171,53 @@ coOrd getPoint(coOrd pos[4], double s) { * than 0.5 pixels - that will mean it is not a good fit. * */ -double BezError(coOrd pos[4], coOrd center, coOrd start_point, double start, double end) { +double BezError(coOrd pos[4], coOrd center, coOrd start_point, double start, + double end) +{ double quarter = (end - start) / 4; // take point at 1/4 and 3/4 and check coOrd c1 = getPoint(pos, start + quarter); coOrd c2 = getPoint(pos, end - quarter); double ref = FindDistance(center, start_point); //radius double d1 = FindDistance(center, c1); // distance to quarter double d2 = FindDistance(center, c2); // distance to three quarters - return fabs(d1-ref) + fabs(d2-ref); //total error at quarter points + return fabs(d1-ref) + fabs(d2 + -ref); //total error at quarter points }; /* * Get distance between a point and a line segment */ -double DistanceToLineSegment(coOrd p, coOrd l1, coOrd l2) { +double DistanceToLineSegment(coOrd p, coOrd l1, coOrd l2) +{ double A = p.x - l1.x; - double B = p.y - l1.y; - double C = l2.x - l1.x; - double D = l2.y - l1.y; - - double dot = A * C + B * D; - double len_sq = C * C + D * D; - double param = -1; - if (len_sq != 0) //non 0 length line - param = dot / len_sq; - - double xx, yy; - - if (param < 0) { // zero length line or beyond end use point 1 - xx = l1.x; - yy = l1.y; - } else if (param > 1) { // beyond point 2 end of line segment - xx = l2.x; - yy = l2.y; - } else { // In the middle - xx = l1.x + param * C; - yy = l1.y + param * D; - } - - double dx = p.x - xx; //distance to perpendicular (or end point) - double dy = p.y - yy; - return sqrt(dx * dx + dy * dy); + double B = p.y - l1.y; + double C = l2.x - l1.x; + double D = l2.y - l1.y; + + double dot = A * C + B * D; + double len_sq = C * C + D * D; + double param = -1; + if (len_sq != 0) { //non 0 length line + param = dot / len_sq; + } + + double xx, yy; + + if (param < 0) { // zero length line or beyond end use point 1 + xx = l1.x; + yy = l1.y; + } else if (param > 1) { // beyond point 2 end of line segment + xx = l2.x; + yy = l2.y; + } else { // In the middle + xx = l1.x + param * C; + yy = l1.y + param * D; + } + + double dx = p.x - xx; //distance to perpendicular (or end point) + double dy = p.y - yy; + return sqrt(dx * dx + dy * dy); } /* @@ -221,7 +225,9 @@ double DistanceToLineSegment(coOrd p, coOrd l1, coOrd l2) { * Sum distance to straight line of quarter points. */ -double BezErrorLine(coOrd pos[4], coOrd start_point, coOrd end_point, double start, double end) { +double BezErrorLine(coOrd pos[4], coOrd start_point, coOrd end_point, + double start, double end) +{ double quarter = (end - start) / 4; // take point at 1/4 and 3/4 and check coOrd c1 = getPoint(pos, start + quarter); coOrd c2 = getPoint(pos, end - quarter); @@ -233,7 +239,8 @@ double BezErrorLine(coOrd pos[4], coOrd start_point, coOrd end_point, double sta /* * Add element to DYNARR pointed to by caller from segment handed in */ -void addSegBezier(dynArr_t * array_p, trkSeg_p seg) { +void addSegBezier(dynArr_t * array_p, trkSeg_p seg) +{ trkSeg_p s; @@ -241,23 +248,21 @@ void addSegBezier(dynArr_t * array_p, trkSeg_p seg) { s = &DYNARR_N(trkSeg_t,*array_p,(array_p->cnt)-1); s->type = seg->type; s->color = seg->color; - s->width = seg->width; - s->bezSegs.cnt = 0; - s->bezSegs.ptr=NULL; - s->bezSegs.max = 0; + s->lineWidth = seg->lineWidth; + DYNARR_INIT( trkSeg_t, s->bezSegs ); if ((s->type == SEG_BEZLIN || s->type == SEG_BEZTRK) && seg->bezSegs.cnt) { s->u.b.angle0 = seg->u.b.angle0; //Copy all the rest s->u.b.angle3 = seg->u.b.angle3; s->u.b.length = seg->u.b.length; s->u.b.minRadius = seg->u.b.minRadius; - for (int i=0;i<4;i++) s->u.b.pos[i] = seg->u.b.pos[i]; + for (int i=0; i<4; i++) { s->u.b.pos[i] = seg->u.b.pos[i]; } s->u.b.radius0 = seg->u.b.radius3; - s->bezSegs.cnt = 0; - if (s->bezSegs.ptr) MyFree(s->bezSegs.ptr); - s->bezSegs.max = 0; - s->bezSegs.ptr = NULL; //Make sure new space as addr copied in earlier from seg + // TODO we init'd the DA above, why free it now? + DYNARR_FREE( trkSeg_t, s->bezSegs ); + //Make sure new space as addr copied in earlier from seg for (int i = 0; ibezSegs.cnt; i++) { - addSegBezier(&s->bezSegs,(((trkSeg_p)seg->bezSegs.ptr)+i)); //recurse for copying embedded Beziers as in Cornu joint + //recurse for copying embedded Beziers as in Cornu joint + addSegBezier(&s->bezSegs, &DYNARR_N( trkSeg_t, seg->bezSegs, i ) ); } } else { s->u = seg->u; @@ -274,7 +279,9 @@ enum BezierType {PLAIN, LOOP, CUSP, INFLECTION, DOUBLEINFLECTION, LINE, ENDS, CO * We will eliminate cusps and loops as not useful forms. Line, Plain, Inflection and DoubleInflection are ok. * */ -EXPORT enum BezierType AnalyseCurve(coOrd inpos[4], double *Rfx, double *Rfy, double *cusp) { +EXPORT enum BezierType AnalyseCurve(coOrd inpos[4], double *Rfx, double *Rfy, + double *cusp) +{ *Rfx = *Rfy = 0; if (Da.track && inpos[0].x == inpos[3].x && inpos[0].y == inpos[3].y ) { @@ -287,14 +294,14 @@ EXPORT enum BezierType AnalyseCurve(coOrd inpos[4], double *Rfx, double *Rfy, do if (d01+d12 == d02) { //straight DIST_T d23 = FindDistance(inpos[2],inpos[3]); DIST_T d03 = FindDistance(inpos[0],inpos[3]); - if (d02+d23 == d03) return LINE; + if (d02+d23 == d03) { return LINE; } } int common_points = 0; - for (int i=0;i<3;i++) { - if (inpos[i].x == inpos[i+1].x && inpos[i].y == inpos[i+1].y) common_points++; + for (int i=0; i<3; i++) { + if (inpos[i].x == inpos[i+1].x && inpos[i].y == inpos[i+1].y) { common_points++; } } - for (int i=0;i<2;i++) { - if (inpos[i].x == inpos[i+2].x && inpos[i].y == inpos[i+2].y) common_points++; + for (int i=0; i<2; i++) { + if (inpos[i].x == inpos[i+2].x && inpos[i].y == inpos[i+2].y) { common_points++; } } if (common_points>2) { @@ -304,7 +311,7 @@ EXPORT enum BezierType AnalyseCurve(coOrd inpos[4], double *Rfx, double *Rfy, do coOrd pos[4]; coOrd offset2, offset = inpos[0]; - for (int i=0;i<4;i++) { //move to zero origin + for (int i=0; i<4; i++) { //move to zero origin pos[i].x = inpos[i].x-offset.x; pos[i].y = inpos[i].y-offset.y; } @@ -312,31 +319,32 @@ EXPORT enum BezierType AnalyseCurve(coOrd inpos[4], double *Rfx, double *Rfy, do offset2.x = -offset.x + pos[3].x; offset2.y = -offset.y + pos[3].y; if (pos[1].y == 0.0) { //flip order of points - for (int i=0;i<4;i++) { + for (int i=0; i<4; i++) { coOrd temp_pos = pos[i]; pos[i].x = pos[3-i].x - offset2.x; pos[i].y = pos[3-i].y - offset2.y; pos[3-i] = temp_pos; } - if (pos[1].y == 0.0) { //Both ways round the second point has no y left after translation + if (pos[1].y == + 0.0) { //Both ways round the second point has no y left after translation return PLAIN; } } double f21 = (pos[2].y)/(pos[1].y); double f31 = (pos[3].y)/(pos[1].y); - if (fabs(pos[2].x-(pos[1].x*f21)) <0.0001) return PLAIN; //defend against divide by zero + if (fabs(pos[2].x-(pos[1].x*f21)) <0.0001) { return PLAIN; } //defend against divide by zero double fx = (pos[3].x-(pos[1].x*f31))/(pos[2].x-(pos[1].x*f21)); double fy = f31+(1-f21)*fx; *Rfx = fx; *Rfy = fy; *cusp = fabs(fy - (-(fx*fx)+2*fx+3)/4); - if (fy > 1.0) return INFLECTION; - if (fx >= 1.0) return PLAIN; - if (fabs(fy - (-(fx*fx)+2*fx+3)/4) <0.100) return CUSP; + if (fy > 1.0) { return INFLECTION; } + if (fx >= 1.0) { return PLAIN; } + if (fabs(fy - (-(fx*fx)+2*fx+3)/4) <0.100) { return CUSP; } if (fy < (-(fx*fx)+2*fx+3)/4) { - if (fx <= 0.0 && fy >= (3*fx-(fx*fx))/3) return LOOP; - if (fx > 0.0 && fy >= (sqrt(3*(4*fx-fx*fx))-fx)/2) return LOOP; + if (fx <= 0.0 && fy >= (3*fx-(fx*fx))/3) { return LOOP; } + if (fx > 0.0 && fy >= (sqrt(3*(4*fx-fx*fx))-fx)/2) { return LOOP; } return PLAIN; } @@ -352,130 +360,138 @@ EXPORT enum BezierType AnalyseCurve(coOrd inpos[4], double *Rfx, double *Rfy, do * to perform actions on the Bezier and also to export it to DXF. * */ -EXPORT BOOL_T ConvertToArcs (coOrd pos[4], dynArr_t * segs, BOOL_T track, wDrawColor color, DIST_T width) { - double t_s = 0.0, t_e = 1.0; - double errorThreshold = 0.05; - bCurveData_t prev_arc; - prev_arc.end = 0.0; - bCurveData_t arc; - segs->cnt = 0; //wipe out - BOOL_T safety; - int col = 0; - - double prev_e = 0.0; - // we do a binary search to find the "good `t` closest to no-longer-good" - do { - safety=FALSE; - // step 1: start with the maximum possible arc length - t_e = 1.0; - // points: - coOrd start_point, mid_point, end_point; - // booleans: - BOOL_T curr_good = FALSE, prev_good = FALSE, done = FALSE; - // numbers: - double t_m, step = 0; - // step 2: find the best possible arc - do { // !done - prev_good = curr_good; //remember last time - t_m = (t_s + t_e)/2; - step++; - start_point = getPoint(pos, t_s); //Start of arc - mid_point = getPoint(pos, t_m); //Middle of trial arc - end_point = getPoint(pos, t_e); //End of trial Arc - - PlotCurve( crvCmdFromChord, start_point, end_point, mid_point, - &(arc.curveData), FALSE, 0.0 ); //Find Arc through three points - - arc.start = t_s; //remember start - arc.end = t_e; //remember end - arc.pos0 = start_point; //remember start point (used for Straight) - arc.pos1 = end_point; // Remember end point (used for Straight) - - if (arc.curveData.type == curveTypeStraight) { - double error = BezErrorLine(pos,start_point,end_point, t_s, t_e); - curr_good = (error <= errorThreshold/4); - //arc.curveData.a0 = FindAngle(start_point,end_point); - //arc.curveData.a1 = FindAngle(end_point,start_point); - - } else if (arc.curveData.type == curveTypeNone) { - return FALSE; //Something wrong - } else { - double error = BezError(pos, arc.curveData.curvePos, start_point, t_s, t_e); - curr_good = (error <= errorThreshold/4); - }; - - done = prev_good && !curr_good; //Was better than this last time? - if(!done) { - // this arc is fine: we can move 'e' up to see if we can find a wider arc - if(curr_good) { - prev_e = t_e; //remember good end only - prev_arc = arc; - // if e is already at max, then we're done for this arc. - if (t_e >= 1.0) { - // make sure we cap at t=1 - arc.end = prev_e = 1.0; - // if we capped the arc segment to t=1 we also need to make sure that - // the arc's end angle is correct with respect to the bezier end point. - if (t_e > 1.0) { - if (arc.curveData.type != curveTypeStraight) { - coOrd d; - d.x = arc.curveData.curvePos.x + fabs(arc.curveData.curveRadius) * cos(D2R(arc.curveData.a1)); - d.y = arc.curveData.curvePos.y + fabs(arc.curveData.curveRadius) * sin(D2R(arc.curveData.a1)); - - arc.curveData.a1 += FindAngle(d, getPoint(pos,1.0)); - t_e = 1.0; - } - } - prev_arc = arc; - done = TRUE; - break; - } - // if not, move it up by half the iteration distance or to end - t_e = t_e + (t_e-t_s)/2; - if (t_e > 1.0) t_e = 1.0; - } - // this is a bad arc: we need to move 'e' down to find a good arc - else { - t_e = t_m; - } - } // If !Done end - } while(!done && safety++<100); - if(safety>=100) { - return FALSE; //Failed to make into arcs - } - prev_arc = prev_arc.end==0.0?arc:prev_arc; - trkSeg_t curveSeg; //Now set up tempSeg to copy into array - curveSeg.width = track?0:width; - if ( prev_arc.curveData.type == curveTypeCurve ) { - if (track) - curveSeg.color = (fabs(prev_arc.curveData.curveRadius)<(GetLayoutMinTrackRadius()-EPSILON))?exceptionColor:normalColor; - else - curveSeg.color = color; - curveSeg.type = track?SEG_CRVTRK:SEG_CRVLIN; - curveSeg.u.c.a0 = prev_arc.curveData.a0; - curveSeg.u.c.a1 = prev_arc.curveData.a1; - curveSeg.u.c.center = prev_arc.curveData.curvePos; - if (prev_arc.curveData.negative) - curveSeg.u.c.radius = -prev_arc.curveData.curveRadius; - else - curveSeg.u.c.radius = prev_arc.curveData.curveRadius; - } else { //Straight Line because all points co-linear - curveSeg.type = track?SEG_STRTRK:SEG_STRLIN; - if (track) - curveSeg.color = wDrawColorBlack; - else - curveSeg.color = color; - curveSeg.u.l.angle = FindAngle(prev_arc.pos0,prev_arc.pos1); - curveSeg.u.l.pos[0] = prev_arc.pos0; - curveSeg.u.l.pos[1] = prev_arc.pos1; - curveSeg.u.l.option = 0; - } - addSegBezier(segs, &curveSeg); //Add to array of segs used - t_s = prev_e; - col++; - } while(prev_e < 1.0); - - return TRUE; +EXPORT BOOL_T ConvertToArcs (coOrd pos[4], dynArr_t * segs, BOOL_T track, + wDrawColor color, LWIDTH_T lineWidth) +{ + double t_s = 0.0, t_e = 1.0; + double errorThreshold = 0.05; + bCurveData_t prev_arc; + prev_arc.end = 0.0; + bCurveData_t arc; + DYNARR_RESET( trkSeg_t, *segs ); // wipe out + BOOL_T safety; + int col = 0; + + double prev_e = 0.0; + // we do a binary search to find the "good `t` closest to no-longer-good" + do { + safety=FALSE; + // step 1: start with the maximum possible arc length + t_e = 1.0; + // points: + coOrd start_point, mid_point, end_point; + // booleans: + BOOL_T curr_good = FALSE, prev_good = FALSE, done = FALSE; + // numbers: + double t_m, step = 0; + // step 2: find the best possible arc + do { // !done + prev_good = curr_good; //remember last time + t_m = (t_s + t_e)/2; + step++; + start_point = getPoint(pos, t_s); //Start of arc + mid_point = getPoint(pos, t_m); //Middle of trial arc + end_point = getPoint(pos, t_e); //End of trial Arc + + PlotCurve( crvCmdFromChord, start_point, end_point, mid_point, + &(arc.curveData), FALSE, 0.0 ); //Find Arc through three points + + arc.start = t_s; //remember start + arc.end = t_e; //remember end + arc.pos0 = start_point; //remember start point (used for Straight) + arc.pos1 = end_point; // Remember end point (used for Straight) + + if (arc.curveData.type == curveTypeStraight) { + double error = BezErrorLine(pos,start_point,end_point, t_s, t_e); + curr_good = (error <= errorThreshold/4); + //arc.curveData.a0 = FindAngle(start_point,end_point); + //arc.curveData.a1 = FindAngle(end_point,start_point); + + } else if (arc.curveData.type == curveTypeNone) { + return FALSE; //Something wrong + } else { + double error = BezError(pos, arc.curveData.curvePos, start_point, t_s, t_e); + curr_good = (error <= errorThreshold/4); + }; + + done = prev_good && !curr_good; //Was better than this last time? + if(!done) { + // this arc is fine: we can move 'e' up to see if we can find a wider arc + if(curr_good) { + prev_e = t_e; //remember good end only + prev_arc = arc; + // if e is already at max, then we're done for this arc. + if (t_e >= 1.0) { + // make sure we cap at t=1 + arc.end = prev_e = 1.0; + // if we capped the arc segment to t=1 we also need to make sure that + // the arc's end angle is correct with respect to the bezier end point. + if (t_e > 1.0) { + if (arc.curveData.type != curveTypeStraight) { + coOrd d; + d.x = arc.curveData.curvePos.x + fabs(arc.curveData.curveRadius) * cos(D2R( + arc.curveData.a1)); + d.y = arc.curveData.curvePos.y + fabs(arc.curveData.curveRadius) * sin(D2R( + arc.curveData.a1)); + + arc.curveData.a1 += FindAngle(d, getPoint(pos,1.0)); + t_e = 1.0; + } + } + prev_arc = arc; + done = TRUE; + break; + } + // if not, move it up by half the iteration distance or to end + t_e = t_e + (t_e-t_s)/2; + if (t_e > 1.0) { t_e = 1.0; } + } + // this is a bad arc: we need to move 'e' down to find a good arc + else { + t_e = t_m; + } + } // If !Done end + } while(!done && safety++<100); + if(safety>=100) { + return FALSE; //Failed to make into arcs + } + prev_arc = prev_arc.end==0.0?arc:prev_arc; + trkSeg_t curveSeg; //Now set up tempSeg to copy into array + curveSeg.lineWidth = track?0:lineWidth; + if ( prev_arc.curveData.type == curveTypeCurve ) { + if (track) { + curveSeg.color = (fabs(prev_arc.curveData.curveRadius)< + (GetLayoutMinTrackRadius()-EPSILON))?exceptionColor:normalColor; + } else { + curveSeg.color = color; + } + curveSeg.type = track?SEG_CRVTRK:SEG_CRVLIN; + curveSeg.u.c.a0 = prev_arc.curveData.a0; + curveSeg.u.c.a1 = prev_arc.curveData.a1; + curveSeg.u.c.center = prev_arc.curveData.curvePos; + if (prev_arc.curveData.negative) { + curveSeg.u.c.radius = -prev_arc.curveData.curveRadius; + } else { + curveSeg.u.c.radius = prev_arc.curveData.curveRadius; + } + } else { //Straight Line because all points co-linear + curveSeg.type = track?SEG_STRTRK:SEG_STRLIN; + if (track) { + curveSeg.color = wDrawColorBlack; + } else { + curveSeg.color = color; + } + curveSeg.u.l.angle = FindAngle(prev_arc.pos0,prev_arc.pos1); + curveSeg.u.l.pos[0] = prev_arc.pos0; + curveSeg.u.l.pos[1] = prev_arc.pos1; + curveSeg.u.l.option = 0; + } + addSegBezier(segs, &curveSeg); //Add to array of segs used + t_s = prev_e; + col++; + } while(prev_e < 1.0); + + return TRUE; }; /* * Draw Bezier while editing it. It consists of three elements - the curve and one or two control arms. @@ -483,19 +499,25 @@ EXPORT BOOL_T ConvertToArcs (coOrd pos[4], dynArr_t * segs, BOOL_T track, wDrawC */ static void DrawBezCurve(trkSeg_p control_arm1, - int cp1Segs_cnt, - trkSeg_p control_arm2, - int cp2Segs_cnt, - trkSeg_p curveSegs, - int crvSegs_cnt, - wDrawColor color - ) { - if (crvSegs_cnt && curveSegs) + int cp1Segs_cnt, + trkSeg_p control_arm2, + int cp2Segs_cnt, + trkSeg_p curveSegs, + int crvSegs_cnt, + wDrawColor color + ) +{ + if (crvSegs_cnt && curveSegs) { DrawSegs( &tempD, zero, 0.0, curveSegs, crvSegs_cnt, Da.trackGauge, color ); - if (cp1Segs_cnt && control_arm1) - DrawSegs( &tempD, zero, 0.0, control_arm1, cp1Segs_cnt, Da.trackGauge, drawColorBlack ); - if (cp2Segs_cnt && control_arm2) - DrawSegs( &tempD, zero, 0.0, control_arm2, cp2Segs_cnt, Da.trackGauge, drawColorBlack ); + } + if (cp1Segs_cnt && control_arm1) { + DrawSegs( &tempD, zero, 0.0, control_arm1, cp1Segs_cnt, Da.trackGauge, + drawColorBlack ); + } + if (cp2Segs_cnt && control_arm2) { + DrawSegs( &tempD, zero, 0.0, control_arm2, cp2Segs_cnt, Da.trackGauge, + drawColorBlack ); + } } @@ -506,45 +528,55 @@ static void DrawBezCurve(trkSeg_p control_arm1, /* * If Track, make it red if the radius is below minimum */ -void DrawTempBezier(BOOL_T track) { - if (track) DrawBezCurve(Da.cp1Segs_da,Da.cp1Segs_da_cnt,Da.cp2Segs_da,Da.cp2Segs_da_cnt, (trkSeg_t *)Da.crvSegs_da.ptr,Da.crvSegs_da_cnt,fabs(Da.minRadius)<(GetLayoutMinTrackRadius()-EPSILON)?exceptionColor:normalColor); - else - DrawBezCurve(Da.cp1Segs_da,Da.cp1Segs_da_cnt,Da.cp2Segs_da,Da.cp2Segs_da_cnt, (trkSeg_t *)Da.crvSegs_da.ptr,Da.crvSegs_da_cnt,drawColorBlack); //Add Second Arm +void DrawTempBezier(BOOL_T track) +{ + if (track) { + DrawBezCurve(Da.cp1Segs_da,Da.cp1Segs_da_cnt,Da.cp2Segs_da,Da.cp2Segs_da_cnt, + &DYNARR_N(trkSeg_t,Da.crvSegs_da,0),Da.crvSegs_da_cnt, + fabs(Da.minRadius)<(GetLayoutMinTrackRadius()-EPSILON)?exceptionColor: + normalColor); + } else { + DrawBezCurve(Da.cp1Segs_da,Da.cp1Segs_da_cnt,Da.cp2Segs_da,Da.cp2Segs_da_cnt, + &DYNARR_N(trkSeg_t,Da.crvSegs_da,0),Da.crvSegs_da_cnt, + drawColorBlack); //Add Second Arm + } } -void CreateBothControlArms(int selectPoint, BOOL_T track) { +void CreateBothControlArms(int selectPoint, BOOL_T track) +{ if (selectPoint == -1) { Da.cp1Segs_da_cnt = createControlArm(Da.cp1Segs_da, Da.pos[0], - Da.pos[1], track, TRUE, Da.trk[0]!=NULL, -1, - drawColorBlack); + Da.pos[1], track, TRUE, Da.trk[0]!=NULL, -1, + drawColorBlack); Da.cp2Segs_da_cnt = createControlArm(Da.cp2Segs_da, Da.pos[3], - Da.pos[2], track, TRUE, Da.trk[1]!=NULL, -1, - drawColorBlack); + Da.pos[2], track, TRUE, Da.trk[1]!=NULL, -1, + drawColorBlack); } else if (selectPoint == 0 || selectPoint == 1) { Da.cp1Segs_da_cnt = createControlArm(Da.cp1Segs_da, Da.pos[0], - Da.pos[1], track, TRUE, Da.trk[0]!=NULL, selectPoint, - drawColorBlack); + Da.pos[1], track, TRUE, Da.trk[0]!=NULL, selectPoint, + drawColorBlack); Da.cp2Segs_da_cnt = createControlArm(Da.cp2Segs_da, Da.pos[3], - Da.pos[2], track, FALSE, Da.trk[1]!=NULL, -1, - drawColorBlack); + Da.pos[2], track, FALSE, Da.trk[1]!=NULL, -1, + drawColorBlack); } else { Da.cp1Segs_da_cnt = createControlArm(Da.cp1Segs_da, Da.pos[0], - Da.pos[1], track, FALSE, Da.trk[0]!=NULL, -1, - drawColorBlack); + Da.pos[1], track, FALSE, Da.trk[0]!=NULL, -1, + drawColorBlack); Da.cp2Segs_da_cnt = createControlArm(Da.cp2Segs_da, Da.pos[3], - Da.pos[2], track, TRUE, Da.trk[1]!=NULL, - 3-selectPoint, drawColorBlack); + Da.pos[2], track, TRUE, Da.trk[1]!=NULL, + 3-selectPoint, drawColorBlack); } } -void CreateMoveAnchor(coOrd pos,BOOL_T fill) { +void CreateMoveAnchor(coOrd pos,BOOL_T fill) +{ double d = tempD.scale*0.15; DYNARR_APPEND(trkSeg_t,anchors_da,1); int inx = anchors_da.cnt-1; anchors(inx).type = fill?SEG_FILCRCL:SEG_CRVLIN; anchors(inx).u.c.a0 = 0.0; anchors(inx).u.c.a1 = 360.0; - anchors(inx).width = 0; + anchors(inx).lineWidth = 0; anchors(inx).color = wDrawColorBlue; anchors(inx).u.c.radius = d/4; anchors(inx).u.c.center = pos; @@ -566,67 +598,69 @@ void CreateMoveAnchor(coOrd pos,BOOL_T fill) { * */ EXPORT STATUS_T AdjustBezCurve( - wAction_t action, - coOrd pos, - BOOL_T track, - wDrawColor color, - DIST_T width, - bezMessageProc message ) + wAction_t action, + coOrd pos, + BOOL_T track, + wDrawColor color, + LWIDTH_T lineWidth, + bezMessageProc message ) { track_p t; DIST_T d; ANGLE_T angle1, angle2; - static coOrd pos0, pos3, p; + static coOrd pos0, /* pos3,*/ p; enum BezierType b; DIST_T dd; EPINX_T ep; double fx, fy, cusp; - int controlArm = -1; +// int controlArm = -1; - if (Da.state != PICK_POINT && Da.state != POINT_PICKED && Da.state != TRACK_SELECTED) return C_CONTINUE; + if (Da.state != PICK_POINT && Da.state != POINT_PICKED + && Da.state != TRACK_SELECTED) { return C_CONTINUE; } switch ( action & 0xFF) { case C_START: - Da.selectPoint = -1; - CreateBothControlArms(Da.selectPoint, track); - if (ConvertToArcs(Da.pos,&Da.crvSegs_da,track,color,Da.width)) Da.crvSegs_da_cnt = Da.crvSegs_da.cnt; - Da.minRadius = BezierMinRadius(Da.pos,Da.crvSegs_da); - Da.unlocked = FALSE; - if (track) - InfoMessage( _("Select End-Point - Ctrl unlocks end-point") ); - else - InfoMessage( _("Select End-Point") ); - return C_CONTINUE; + Da.selectPoint = -1; + CreateBothControlArms(Da.selectPoint, track); + if (ConvertToArcs(Da.pos,&Da.crvSegs_da,track,color,lineWidth)) { Da.crvSegs_da_cnt = Da.crvSegs_da.cnt; } + Da.minRadius = BezierMinRadius(Da.pos,Da.crvSegs_da); + Da.unlocked = FALSE; + if (track) { + InfoMessage( _("Select End-Point - Ctrl unlocks end-point") ); + } else { + InfoMessage( _("Select End-Point") ); + } + return C_CONTINUE; case wActionMove: DYNARR_RESET(trkSeg_t,anchors_da); - if (Da.state != PICK_POINT) return C_CONTINUE; - if (Da.state != PICK_POINT) return C_CONTINUE; - for (int i=0;i<4;i++) { - if (i==0 && Da.trk[0]) continue; - if (i==3 && Da.trk[1]) continue; //ignore locked points + if (Da.state != PICK_POINT) { return C_CONTINUE; } + if (Da.state != PICK_POINT) { return C_CONTINUE; } + for (int i=0; i<4; i++) { + if (i==0 && Da.trk[0]) { continue; } + if (i==3 && Da.trk[1]) { continue; } //ignore locked points d = FindDistance(Da.pos[i],pos); - if (IsClose(d)) CreateMoveAnchor(Da.pos[i],TRUE); + if (IsClose(d)) { CreateMoveAnchor(Da.pos[i],TRUE); } } break; case C_DOWN: - if (Da.state != PICK_POINT) return C_CONTINUE; + if (Da.state != PICK_POINT) { return C_CONTINUE; } dd = DIST_INF; Da.selectPoint = -1; - for (int i=0;i<4;i++) { + for (int i=0; i<4; i++) { d = FindDistance(Da.pos[i],pos); if (d < dd) { - if (i==0 && Da.trk[0]) continue; - if (i==3 && Da.trk[1]) continue; //ignore locked points + if (i==0 && Da.trk[0]) { continue; } + if (i==3 && Da.trk[1]) { continue; } //ignore locked points dd = d; Da.selectPoint = i; } } - if (!IsClose(dd) ) Da.selectPoint = -1; + if (!IsClose(dd) ) { Da.selectPoint = -1; } DYNARR_RESET(trkSeg_t,anchors_da); if (Da.selectPoint == -1) { InfoMessage( _("Not close enough to any valid, selectable point, reselect") ); @@ -635,10 +669,11 @@ EXPORT STATUS_T AdjustBezCurve( pos = Da.pos[Da.selectPoint]; CreateMoveAnchor(pos,TRUE); Da.state = POINT_PICKED; - InfoMessage( _("Drag point %d to new location and release it"),Da.selectPoint+1 ); + InfoMessage( _("Drag point %d to new location and release it"), + Da.selectPoint+1 ); } CreateBothControlArms(Da.selectPoint, track); - if (ConvertToArcs(Da.pos, &Da.crvSegs_da, track, color,Da.width)) Da.crvSegs_da_cnt = Da.crvSegs_da.cnt; + if (ConvertToArcs(Da.pos, &Da.crvSegs_da, track, color,lineWidth)) { Da.crvSegs_da_cnt = Da.crvSegs_da.cnt; } Da.minRadius = BezierMinRadius(Da.pos, Da.crvSegs_da); return C_CONTINUE; @@ -654,41 +689,47 @@ EXPORT STATUS_T AdjustBezCurve( if (Da.trk[controlArm]) { angle1 = NormalizeAngle(GetTrkEndAngle(Da.trk[controlArm], Da.ep[controlArm])); angle2 = NormalizeAngle(FindAngle(pos, Da.pos[Da.selectPoint==1?0:3])-angle1); - if (angle2 > 90.0 && angle2 < 270.0) - Translate( &pos, Da.pos[Da.selectPoint==1?0:3], angle1, -FindDistance( Da.pos[Da.selectPoint==1?0:3], pos )*cos(D2R(angle2)) ); - else pos = Da.pos[Da.selectPoint==1?0:3]; + if (angle2 > 90.0 && angle2 < 270.0) { + Translate( &pos, Da.pos[Da.selectPoint==1?0:3], angle1, + -FindDistance( Da.pos[Da.selectPoint==1?0:3], pos )*cos(D2R(angle2)) ); + } else { pos = Da.pos[Da.selectPoint==1?0:3]; } } // Dont Snap control points - } else SnapPos(&pos); + } else { SnapPos(&pos); } Da.pos[Da.selectPoint] = pos; CreateMoveAnchor(pos,TRUE); CreateBothControlArms(Da.selectPoint, track); - if (ConvertToArcs(Da.pos,&Da.crvSegs_da,track, color, Da.width)) Da.crvSegs_da_cnt = Da.crvSegs_da.cnt; + if (ConvertToArcs(Da.pos,&Da.crvSegs_da,track, color, lineWidth)) { Da.crvSegs_da_cnt = Da.crvSegs_da.cnt; } Da.minRadius = BezierMinRadius(Da.pos,Da.crvSegs_da); if (Da.track) { b = AnalyseCurve(Da.pos,&fx,&fy,&cusp); if (b==ENDS) { wBeep(); - InfoMessage(_("Bezier Curve Invalid has identical end points Change End Point"),b==CUSP?"Cusp":"Loop"); + InfoMessage(_("Bezier Curve Invalid has identical end points Change End Point"), + b==CUSP?"Cusp":"Loop"); } else if ( b == CUSP || b == LOOP) { wBeep(); - InfoMessage(_("Bezier Curve Invalid has %s Change End Point"),b==CUSP?"Cusp":"Loop"); + InfoMessage(_("Bezier Curve Invalid has %s Change End Point"), + b==CUSP?"Cusp":"Loop"); } else if ( b == COINCIDENT ) { wBeep(); - InfoMessage(_("Bezier Curve Invalid has three co-incident points"),b==CUSP?"Cusp":"Loop"); + InfoMessage(_("Bezier Curve Invalid has three co-incident points"), + b==CUSP?"Cusp":"Loop"); } else if ( b == LINE ) { InfoMessage(_("Bezier is Straight Line")); } else - InfoMessage( _("Bezier %s : Min Radius=%s Length=%s fx=%0.3f fy=%0.3f cusp=%0.3f"),track?"Track":"Line", - FormatDistance(Da.minRadius>=100000?0:Da.minRadius), - FormatDistance(BezierLength(Da.pos,Da.crvSegs_da)),fx,fy,cusp); + InfoMessage( + _("Bezier %s : Min Radius=%s Length=%s fx=%0.3f fy=%0.3f cusp=%0.3f"), + track?"Track":"Line", + FormatDistance(Da.minRadius>=100000?0:Da.minRadius), + FormatDistance(BezierLength(Da.pos,Da.crvSegs_da)),fx,fy,cusp); } else - InfoMessage( _("Bezier %s : Min Radius=%s Length=%s"),track?"Track":"Line", - FormatDistance(Da.minRadius>=100000?0:Da.minRadius), - FormatDistance(BezierLength(Da.pos,Da.crvSegs_da))); + InfoMessage( _("Bezier %s : Min Radius=%s Length=%s"),track?"Track":"Line", + FormatDistance(Da.minRadius>=100000?0:Da.minRadius), + FormatDistance(BezierLength(Da.pos,Da.crvSegs_da))); return C_CONTINUE; case C_UP: - if (Da.state != POINT_PICKED) return C_CONTINUE; + if (Da.state != POINT_PICKED) { return C_CONTINUE; } //Take last pos and decide if it should be snapped to a track because SHIFT is held (pos0 and pos3) ep = 0; BOOL_T found = FALSE; @@ -696,7 +737,8 @@ EXPORT STATUS_T AdjustBezCurve( p = pos; if (track && (Da.selectPoint == 0 || Da.selectPoint == 3)) { //EPs if ((MyGetKeyState() & WKEY_SHIFT) != 0) { //Snap Track - if ((t = OnTrackIgnore(&p, FALSE, TRUE, Da.selectTrack)) != NULL) { //Snap to endPoint + if ((t = OnTrackIgnore(&p, FALSE, TRUE, + Da.selectTrack)) != NULL) { //Snap to endPoint ep = PickUnconnectedEndPointSilent(p, t); if (ep != -1) { Da.trk[Da.selectPoint/3] = t; @@ -712,39 +754,46 @@ EXPORT STATUS_T AdjustBezCurve( } } if (found) { - angle1 = NormalizeAngle(GetTrkEndAngle(Da.trk[Da.selectPoint/3], Da.ep[Da.selectPoint/3])); + angle1 = NormalizeAngle(GetTrkEndAngle(Da.trk[Da.selectPoint/3], + Da.ep[Da.selectPoint/3])); angle2 = NormalizeAngle(FindAngle(pos, pos0)-angle1); - Translate(&Da.pos[Da.selectPoint==0?1:2], Da.pos[Da.selectPoint==0?0:3], angle1, FindDistance(Da.pos[Da.selectPoint==0?1:2],pos)*cos(D2R(angle2))); + Translate(&Da.pos[Da.selectPoint==0?1:2], Da.pos[Da.selectPoint==0?0:3], angle1, + FindDistance(Da.pos[Da.selectPoint==0?1:2],pos)*cos(D2R(angle2))); } Da.selectPoint = -1; CreateBothControlArms(Da.selectPoint,track); - if (ConvertToArcs(Da.pos,&Da.crvSegs_da,track,color,Da.width)) Da.crvSegs_da_cnt = Da.crvSegs_da.cnt; + if (ConvertToArcs(Da.pos,&Da.crvSegs_da,track,color,lineWidth)) { Da.crvSegs_da_cnt = Da.crvSegs_da.cnt; } Da.minRadius = BezierMinRadius(Da.pos,Da.crvSegs_da); if (Da.track) { b = AnalyseCurve(Da.pos,&fx,&fy,&cusp); if (b==ENDS) { wBeep(); - InfoMessage(_("Bezier curve invalid has identical end points Change End Point"),b==CUSP?"Cusp":"Loop"); + InfoMessage(_("Bezier curve invalid has identical end points Change End Point"), + b==CUSP?"Cusp":"Loop"); } else if ( b == CUSP || b == LOOP) { wBeep(); - InfoMessage(_("Bezier curve invalid has %s Change End Point"),b==CUSP?"Cusp":"Loop"); + InfoMessage(_("Bezier curve invalid has %s Change End Point"), + b==CUSP?"Cusp":"Loop"); } else if ( b == COINCIDENT ) { wBeep(); - InfoMessage(_("Bezier curve invalid has three co-incident points"),b==CUSP?"Cusp":"Loop"); + InfoMessage(_("Bezier curve invalid has three co-incident points"), + b==CUSP?"Cusp":"Loop"); } else if ( b == LINE) { InfoMessage(_("Bezier curve is straight line")); } - InfoMessage(_("Pick any circle to adjust it - Enter to confirm, ESC to abort")); - } else InfoMessage(_("Pick any circle to adjust it - Enter to confirm, ESC to abort")); + } else { + InfoMessage( + _("Pick any circle to adjust it - Enter to confirm, ESC to abort")); + } Da.state = PICK_POINT; return C_CONTINUE; case C_OK: //C_OK is not called by Modify. if ( Da.state == PICK_POINT ) { - char c = (unsigned char)(action >> 8); +// char c = (unsigned char)(action >> 8); if (Da.track && Da.pos[0].x == Da.pos[3].x && Da.pos[0].y == Da.pos[3].y ) { wBeep(); ErrorMessage(_("Invalid Bezier Track - end points are identical")); @@ -768,17 +817,14 @@ EXPORT STATUS_T AdjustBezCurve( Da.minRadius = BezierMinRadius(Da.pos,Da.crvSegs_da); UndoStart( _("Create Bezier"), "newBezier - CR" ); if (Da.track) { - t = NewBezierTrack( Da.pos, (trkSeg_p)Da.crvSegs_da.ptr, Da.crvSegs_da.cnt); - for (int i=0;i<2;i++) - if (Da.trk[i] != NULL) ConnectAbuttingTracks(t,i,Da.trk[i],Da.ep[i]); - } - else t = NewBezierLine(Da.pos, (trkSeg_p)Da.crvSegs_da.ptr, Da.crvSegs_da.cnt,color,width); + t = NewBezierTrack( Da.pos, &DYNARR_N(trkSeg_t,Da.crvSegs_da,0), + Da.crvSegs_da.cnt); + for (int i=0; i<2; i++) + if (Da.trk[i] != NULL) { ConnectAbuttingTracks(t,i,Da.trk[i],Da.ep[i]); } + } else { t = NewBezierLine(Da.pos, &DYNARR_N(trkSeg_t,Da.crvSegs_da,0), Da.crvSegs_da.cnt,color,lineWidth); } UndoEnd(); - if (Da.crvSegs_da.ptr) MyFree(Da.crvSegs_da.ptr); DYNARR_RESET(trkSeg_t,anchors_da); - Da.crvSegs_da.ptr = NULL; - Da.crvSegs_da.cnt = 0; - Da.crvSegs_da.max = 0; + DYNARR_FREE( trkSeg_t, Da.crvSegs_da ); DrawNewTrack(t); Da.state = NONE; return C_TERMINATE; @@ -787,10 +833,11 @@ EXPORT STATUS_T AdjustBezCurve( return C_CONTINUE; case C_REDRAW: - if (Da.state != NONE) + if (Da.state != NONE) { DrawTempBezier(Da.track); - if (anchors_da.cnt>0) - DrawSegs( &tempD, zero, 0.0, &anchors(0), anchors_da.cnt, trackGauge, wDrawColorBlack ); + } + DrawSegsDA( &tempD, NULL, zero, 0.0, &anchors_da, trackGauge, wDrawColorBlack, + 0 ); return C_CONTINUE; default: @@ -818,14 +865,16 @@ EXPORT STATUS_T AdjustBezCurve( * Note: Available points are shown - if a Bezier track is attached to its neighbor, only the control point on that side is selectable. * Any free end-point can be locked to a unconnected end point using SHIFT during drag. */ -STATUS_T CmdBezModify (track_p trk, wAction_t action, coOrd pos, DIST_T trackG) { +STATUS_T CmdBezModify (track_p trk, wAction_t action, coOrd pos, DIST_T trackG) +{ BOOL_T track = TRUE; - double width = 1.0; - long mode = 0; - long cmd; +// double width = 1.0; +// long mode = 0; +// long cmd; - struct extraDataBezier_t *xx = GET_EXTRA_DATA(trk, T_NOTRACK, extraDataBezier_t); - cmd = VP2L(commandContext); + struct extraDataBezier_t *xx = GET_EXTRA_DATA(trk, T_NOTRACK, + extraDataBezier_t); +// cmd = VP2L(commandContext); Da.trackGauge = trackG; switch (action&0xFF) { @@ -840,43 +889,51 @@ STATUS_T CmdBezModify (track_p trk, wAction_t action, coOrd pos, DIST_T trackG) if (IsTrack(trk)) { Da.track = TRUE; Da.trk[0] = GetTrkEndTrk( trk, 0 ); - if (Da.trk[0]) Da.ep[0] = GetEndPtConnectedToMe(Da.trk[0],trk); + if (Da.trk[0]) { Da.ep[0] = GetEndPtConnectedToMe(Da.trk[0],trk); } Da.trk[1] = GetTrkEndTrk( trk, 1 ); - if (Da.trk[1]) Da.ep[1] = GetEndPtConnectedToMe(Da.trk[1],trk); - } - else Da.track = FALSE; + if (Da.trk[1]) { Da.ep[1] = GetEndPtConnectedToMe(Da.trk[1],trk); } + } else { Da.track = FALSE; } Da.selectTrack = trk; - for (int i=0;i<4;i++) Da.pos[i] = xx->pos[i]; //Copy parms from old trk + for (int i=0; i<4; i++) { Da.pos[i] = xx->pos[i]; } //Copy parms from old trk InfoMessage(_("%s picked - now select a Point"),track?"Track":"Line"); Da.state = TRACK_SELECTED; - DrawTrack(Da.selectTrack,&mainD,wDrawColorWhite); //Wipe out real track, draw replacement - return AdjustBezCurve(C_START, pos, Da.track, xx->segsColor, xx->segsWidth, InfoMessage); + DrawTrack(Da.selectTrack,&mainD, + wDrawColorWhite); //Wipe out real track, draw replacement + return AdjustBezCurve(C_START, pos, Da.track, xx->segsColor, xx->segsLineWidth, + InfoMessage); case wActionMove: - if (Da.state == NONE) return C_CONTINUE; - return AdjustBezCurve(wActionMove, pos, Da.track, xx->segsColor, xx->segsWidth, InfoMessage); + if (Da.state == NONE) { return C_CONTINUE; } + return AdjustBezCurve(wActionMove, pos, Da.track, xx->segsColor, + xx->segsLineWidth, + InfoMessage); case C_DOWN: - if (Da.state == TRACK_SELECTED) return C_CONTINUE; //Ignore until first up + if (Da.state == TRACK_SELECTED) { return C_CONTINUE; } //Ignore until first up UndrawNewTrack( Da.selectTrack ); - return AdjustBezCurve(C_DOWN, pos, Da.track, xx->segsColor, xx->segsWidth, InfoMessage); + return AdjustBezCurve(C_DOWN, pos, Da.track, xx->segsColor, xx->segsLineWidth, + InfoMessage); case C_MOVE: - if (Da.state == TRACK_SELECTED) return C_CONTINUE; //Ignore until first up and down - return AdjustBezCurve(C_MOVE, pos, Da.track, xx->segsColor, xx->segsWidth, InfoMessage); + if (Da.state == TRACK_SELECTED) { return C_CONTINUE; } //Ignore until first up and down + return AdjustBezCurve(C_MOVE, pos, Da.track, xx->segsColor, xx->segsLineWidth, + InfoMessage); case C_UP: if (Da.state == TRACK_SELECTED) { - Da.state = PICK_POINT; //First time up, next time pick a point + Da.state = + PICK_POINT; //First time up, next time pick a point } - return AdjustBezCurve(C_UP, pos, Da.track, xx->segsColor, xx->segsWidth, InfoMessage); //Run Adjust + return AdjustBezCurve(C_UP, pos, Da.track, xx->segsColor, xx->segsLineWidth, + InfoMessage); //Run Adjust case C_TEXT: - if ((action>>8) != 32) + if ((action>>8) != 32) { return C_CONTINUE; - /* no break */ + } + /* no break */ case C_OK: if (Da.state != PICK_POINT) { //Too early - abandon InfoMessage(_("No changes made")); @@ -887,13 +944,13 @@ STATUS_T CmdBezModify (track_p trk, wAction_t action, coOrd pos, DIST_T trackG) UndoModify( trk ); Da.state = NONE; - wDrawColor color = wDrawColorBlack; - DIST_T width = 0; - if ( !Da.track ) { - color = xx->segsColor; - width = xx->segsWidth; - } - SetBezierData( trk, Da.pos, xx->segsColor, xx->segsWidth ); +// wDrawColor color = wDrawColorBlack; +// LWIDTH_T lineWidth = 0; +// if ( !Da.track ) { +// color = xx->segsColor; +// lineWidth = xx->segsLineWidth; +// } + SetBezierData( trk, Da.pos, xx->segsColor, xx->segsLineWidth ); DrawNewTrack( trk ); UndoEnd(); @@ -906,7 +963,8 @@ STATUS_T CmdBezModify (track_p trk, wAction_t action, coOrd pos, DIST_T trackG) return C_TERMINATE; case C_REDRAW: - return AdjustBezCurve(C_REDRAW, pos, Da.track, xx->segsColor, xx->segsWidth, InfoMessage); + return AdjustBezCurve(C_REDRAW, pos, Da.track, xx->segsColor, xx->segsLineWidth, + InfoMessage); } return C_CONTINUE; @@ -916,11 +974,12 @@ STATUS_T CmdBezModify (track_p trk, wAction_t action, coOrd pos, DIST_T trackG) /* * Find length by adding up the underlying segments. The segments can be straights, curves or bezier. */ -DIST_T BezierLength(coOrd pos[4],dynArr_t segs) { +DIST_T BezierLength(coOrd pos[4],dynArr_t segs) +{ DIST_T dd = 0.0; - if (segs.cnt == 0 ) return dd; - for (int i = 0;i0?offset:-offset))*D2R(t.u.c.a1)); @@ -950,22 +1010,24 @@ DIST_T BezierOffsetLength(dynArr_t segs, double offset) { } -DIST_T BezierMinRadius(coOrd pos[4],dynArr_t segs) { +DIST_T BezierMinRadius(coOrd pos[4],dynArr_t segs) +{ DIST_T r = DIST_INF, rr; - if (segs.cnt == 0 ) return r; - for (int i = 0;i>8) { cmd = action>>8; - } else cmd = VP2L(commandContext); - - Da.width = (double)lineWidth/mainD.dpi; + } else { cmd = VP2L(commandContext); } Da.trackGauge = trackGauge; @@ -1011,14 +1071,13 @@ STATUS_T CmdBezCurve( wAction_t action, coOrd pos ) case C_START: Da.track = (cmd == bezCmdModifyTrack || cmd == bezCmdCreateTrack)?TRUE:FALSE; - if (Da.track ) - Da.color = wDrawColorBlack; - else - Da.color = lineColor; + if (Da.track ) { + lineColor = wDrawColorBlack; + } Da.state = POS_1; Da. selectPoint = -1; - for (int i=0;i<4;i++) { + for (int i=0; i<4; i++) { Da.pos[i] = zero; } Da.trk[0] = Da.trk[1] = NULL; @@ -1027,7 +1086,8 @@ STATUS_T CmdBezCurve( wAction_t action, coOrd pos ) DYNARR_RESET(trkSeg_t,Da.crvSegs_da); Da.cp1Segs_da_cnt = 0; Da.cp2Segs_da_cnt = 0; - InfoMessage( _("Place 1st endpoint of Bezier - snap to %s"), Da.track?"unconnected Track":"line" ); + InfoMessage( _("Place 1st endpoint of Bezier - snap to %s"), + Da.track?"unconnected Track":"line" ); return C_CONTINUE; @@ -1035,7 +1095,7 @@ STATUS_T CmdBezCurve( wAction_t action, coOrd pos ) DYNARR_RESET(trkSeg_t,anchors_da); if ( Da.state == POS_1 || Da.state == POS_2) { //Set the first or third point coOrd p = pos; - BOOL_T found = FALSE; +// BOOL_T found = FALSE; int end = Da.state==POS_1?0:1; EPINX_T ep; if (Da.track) { @@ -1053,14 +1113,15 @@ STATUS_T CmdBezCurve( wAction_t action, coOrd pos ) Da.trk[end] = t; Da.ep[end] = ep; pos = GetTrkEndPos(t, ep); - found = TRUE; +// found = TRUE; } } } } } else { //Snap Bez Line to Lines - if (lock) + if (lock) { pos = movePos; + } } if (Da.state == POS_1) { Da.pos[0] = pos; @@ -1068,27 +1129,31 @@ STATUS_T CmdBezCurve( wAction_t action, coOrd pos ) Da.state = CONTROL_ARM_1; //Draw the first control arm Da.selectPoint = 1; InfoMessage( _("Drag end of first control arm") ); - Da.cp1Segs_da_cnt = createControlArm(Da.cp1Segs_da, Da.pos[0], Da.pos[1], Da.track,TRUE,Da.trk[1]!=NULL,1,wDrawColorBlack); - } else { + Da.cp1Segs_da_cnt = createControlArm(Da.cp1Segs_da, Da.pos[0], Da.pos[1], + Da.track,TRUE,Da.trk[1]!=NULL,1,wDrawColorBlack); + } else { Da.pos[3] = pos; //2nd End Point Da.pos[2] = pos; //2nd Ctl Point Da.state = POINT_PICKED; // Drag out the second control arm Da.selectPoint = 2; InfoMessage( _("Drag end of second control arm") ); - Da.cp1Segs_da_cnt = createControlArm(Da.cp1Segs_da, Da.pos[0], Da.pos[1], Da.track,FALSE,Da.trk[0]!=NULL,-1,wDrawColorBlack); - Da.cp2Segs_da_cnt = createControlArm(Da.cp2Segs_da, Da.pos[3], Da.pos[2], Da.track,TRUE,Da.trk[1]!=NULL,1,wDrawColorBlack); - if (ConvertToArcs(Da.pos,&Da.crvSegs_da,Da.track,Da.color,Da.width)) Da.crvSegs_da_cnt = Da.crvSegs_da.cnt; + Da.cp1Segs_da_cnt = createControlArm(Da.cp1Segs_da, Da.pos[0], Da.pos[1], + Da.track,FALSE,Da.trk[0]!=NULL,-1,wDrawColorBlack); + Da.cp2Segs_da_cnt = createControlArm(Da.cp2Segs_da, Da.pos[3], Da.pos[2], + Da.track,TRUE,Da.trk[1]!=NULL,1,wDrawColorBlack); + if (ConvertToArcs(Da.pos,&Da.crvSegs_da,Da.track,lineColor,lineWidth)) { Da.crvSegs_da_cnt = Da.crvSegs_da.cnt; } } return C_CONTINUE; } else { - return AdjustBezCurve( action&0xFF, pos, Da.track, Da.color, Da.width, InfoMessage ); + return AdjustBezCurve( action&0xFF, pos, Da.track, lineColor, lineWidth, + InfoMessage ); } return C_CONTINUE; case wActionMove: DYNARR_RESET(trkSeg_t,anchors_da); lock = FALSE; - if ( Da.state != POS_1 && Da.state != POS_2) return C_CONTINUE; //Don't snap CPs + if ( Da.state != POS_1 && Da.state != POS_2) { return C_CONTINUE; } //Don't snap CPs if (Da.track) { if (((MyGetKeyState() & WKEY_ALT) == 0) == magneticSnap) { if ((t = OnTrack(&pos, FALSE, TRUE)) != NULL) { @@ -1117,43 +1182,49 @@ STATUS_T CmdBezCurve( wAction_t action, coOrd pos ) lock = TRUE; movePos = pos; } - if (anchors_da.cnt) return C_CONTINUE; - /* no break */ + if (anchors_da.cnt) { return C_CONTINUE; } + /* no break */ case C_MOVE: if (Da.state == POS_1) { - InfoMessage( _("Place 1st endpoint of Bezier - snap to %s"), Da.track?"unconnected track":"line" ); + InfoMessage( _("Place 1st endpoint of Bezier - snap to %s"), + Da.track?"unconnected track":"line" ); return C_CONTINUE; } if (Da.state == POS_2) { - InfoMessage( _("Select other end of Bezier - snap to %s end"), Da.track?"unconnected track":"line" ); + InfoMessage( _("Select other end of Bezier - snap to %s end"), + Da.track?"unconnected track":"line" ); } if (Da.state == CONTROL_ARM_1 ) { if (Da.trk[0]) { - EPINX_T ep = 0; +// EPINX_T ep = 0; ANGLE_T angle1,angle2; angle1 = NormalizeAngle(GetTrkEndAngle(Da.trk[0],Da.ep[0])); angle2 = NormalizeAngle(FindAngle(pos, Da.pos[0])-angle1); - if (angle2 > 90.0 && angle2 < 270.0) - Translate( &pos, Da.pos[0], angle1, -FindDistance( Da.pos[0], pos )*cos(D2R(angle2))); - else pos = Da.pos[0]; + if (angle2 > 90.0 && angle2 < 270.0) { + Translate( &pos, Da.pos[0], angle1, -FindDistance( Da.pos[0], + pos )*cos(D2R(angle2))); + } else { pos = Da.pos[0]; } } // Don't Snap control points Da.pos[1] = pos; - Da.cp1Segs_da_cnt = createControlArm(Da.cp1Segs_da, Da.pos[0], Da.pos[1], Da.track, TRUE, Da.trk[0]!=NULL, 1, wDrawColorBlack); + Da.cp1Segs_da_cnt = createControlArm(Da.cp1Segs_da, Da.pos[0], Da.pos[1], + Da.track, TRUE, Da.trk[0]!=NULL, 1, wDrawColorBlack); } else { - return AdjustBezCurve( action&0xFF, pos, Da.track, Da.color, Da.width, InfoMessage ); + return AdjustBezCurve( action&0xFF, pos, Da.track, lineColor, lineWidth, + InfoMessage ); } return C_CONTINUE; case C_UP: if (Da.state == CONTROL_ARM_1) { if (Da.trk[0]) { - EPINX_T ep = Da.ep[0]; +// EPINX_T ep = Da.ep[0]; ANGLE_T angle1,angle2; angle1 = NormalizeAngle(GetTrkEndAngle(Da.trk[0],Da.ep[0])); angle2 = NormalizeAngle(FindAngle(pos, Da.pos[0])-angle1); - if (angle2 > 90.0 && angle2 < 270.0) - Translate( &pos, Da.pos[0], angle1, -FindDistance( Da.pos[0], pos )*cos(D2R(angle2))); - else pos = Da.pos[0]; + if (angle2 > 90.0 && angle2 < 270.0) { + Translate( &pos, Da.pos[0], angle1, -FindDistance( Da.pos[0], + pos )*cos(D2R(angle2))); + } else { pos = Da.pos[0]; } } // Don't Snap control points Da.pos[1] = pos; if (FindDistance(Da.pos[0],Da.pos[1]) <=minLength) { @@ -1162,26 +1233,32 @@ STATUS_T CmdBezCurve( wAction_t action, coOrd pos ) return C_CONTINUE; } Da.state = POS_2; - InfoMessage( _("Select other end of Bezier - snap to %s end"), Da.track?"Unconnected Track":"Line" ); - Da.cp1Segs_da_cnt = createControlArm(Da.cp1Segs_da, Da.pos[0], Da.pos[1], Da.track, FALSE, Da.trk[0]!=NULL, -1, wDrawColorBlack); + InfoMessage( _("Select other end of Bezier - snap to %s end"), + Da.track?"Unconnected Track":"Line" ); + Da.cp1Segs_da_cnt = createControlArm(Da.cp1Segs_da, Da.pos[0], Da.pos[1], + Da.track, FALSE, Da.trk[0]!=NULL, -1, wDrawColorBlack); return C_CONTINUE; } else { - return AdjustBezCurve( action&0xFF, pos, Da.track, Da.color, Da.width, InfoMessage ); + return AdjustBezCurve( action&0xFF, pos, Da.track, lineColor, lineWidth, + InfoMessage ); } case C_TEXT: - if (Da.state != PICK_POINT || (action>>8) != ' ') //Space is same as Enter. - return C_CONTINUE; - /* no break */ - case C_OK: - if (Da.state != PICK_POINT) return C_CONTINUE; - return AdjustBezCurve( C_OK, pos, Da.track, Da.color, Da.width, InfoMessage); + if (Da.state != PICK_POINT || (action>>8) != ' ') { //Space is same as Enter. + return C_CONTINUE; + } + /* no break */ + case C_OK: + if (Da.state != PICK_POINT) { return C_CONTINUE; } + return AdjustBezCurve( C_OK, pos, Da.track, lineColor, lineWidth, InfoMessage); case C_REDRAW: if ( Da.state != NONE ) { - DrawBezCurve(Da.cp1Segs_da,Da.cp1Segs_da_cnt,Da.cp2Segs_da,Da.cp2Segs_da_cnt,(trkSeg_t *)Da.crvSegs_da.ptr,Da.crvSegs_da.cnt, Da.color); + DrawBezCurve(Da.cp1Segs_da,Da.cp1Segs_da_cnt,Da.cp2Segs_da,Da.cp2Segs_da_cnt, + &DYNARR_N( trkSeg_t, Da.crvSegs_da, 0 ), + Da.crvSegs_da.cnt, lineColor); } - if (anchors_da.cnt) - DrawSegs( &tempD, zero, 0.0, &anchors(0), anchors_da.cnt, trackGauge, wDrawColorBlack ); + DrawSegsDA( &tempD, NULL, zero, 0.0, &anchors_da, trackGauge, wDrawColorBlack, + 0 ); return C_CONTINUE; case C_CANCEL: @@ -1189,40 +1266,27 @@ STATUS_T CmdBezCurve( wAction_t action, coOrd pos ) Da.cp1Segs_da_cnt = 0; Da.cp2Segs_da_cnt = 0; Da.crvSegs_da_cnt = 0; - for (int i=0;i<2;i++) { + for (int i=0; i<2; i++) { Da.trk[i] = NULL; Da.ep[i] = -1; } - if (Da.crvSegs_da.ptr) MyFree(Da.crvSegs_da.ptr); - Da.crvSegs_da.ptr = NULL; - Da.crvSegs_da.cnt = 0; - Da.crvSegs_da.max = 0; + DYNARR_FREE( trkSeg_t, Da.crvSegs_da ); } Da.state = NONE; return C_CONTINUE; - - default: - - return C_CONTINUE; - } -} + default: -void UpdateParms(wDrawColor color,long width) { - Da.color = lineColor; - Da.width = (double)lineWidth/mainD.dpi; - if (Da.crvSegs_da.cnt) { - ConvertToArcs(Da.pos,&Da.crvSegs_da,Da.track,Da.color,Da.width); + return C_CONTINUE; } - DrawTempBezier(Da.track); } -#include "bitmaps/bezier-track.xpm" -#include "bitmaps/bezier-line.xpm" +//#include "bitmaps/bezier-track.xpm" +//#include "bitmaps/bezier-line.xpm" EXPORT void InitCmdBezier( wMenu_p menu ) -{ +{ } diff --git a/app/bin/cbezier.h b/app/bin/cbezier.h index 74ef51f..2cd72d9 100644 --- a/app/bin/cbezier.h +++ b/app/bin/cbezier.h @@ -17,7 +17,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "common.h" @@ -32,23 +32,21 @@ extern dynArr_t tempEndPts_da; #define bezCmdCreateTrack (3) #define bezCmdCreateLine (4) -extern wDrawColor lineColor; -extern long lineWidth; - typedef void (*bezMessageProc)( const char *, ... ); STATUS_T CmdBezCurve( wAction_t, coOrd); STATUS_T CmdBezModify(track_p, wAction_t, coOrd, DIST_T); -STATUS_T CreateBezier( wAction_t, coOrd, BOOL_T, wDrawColor, DIST_T, long, bezMessageProc ); +STATUS_T CreateBezier( wAction_t, coOrd, BOOL_T, wDrawColor, DIST_T, long, + bezMessageProc ); DIST_T BezierDescriptionDistance( coOrd, track_p, coOrd *, BOOL_T, BOOL_T * ); STATUS_T BezierDescriptionMove( track_p, wAction_t, coOrd ); -BOOL_T ConvertToArcs (coOrd[4], dynArr_t *, BOOL_T, wDrawColor, DIST_T); +BOOL_T ConvertToArcs (coOrd[4], dynArr_t *, BOOL_T, wDrawColor, LWIDTH_T); track_p NewBezierTrack(coOrd[4], trkSeg_p, int); double BezierLength(coOrd[4], dynArr_t); double BezierOffsetLength(dynArr_t,double offset); double BezierMinRadius(coOrd[4],dynArr_t); -void UpdateParms(wDrawColor color,long width); +void UpdateParms(wDrawColor color,LWIDTH_T lineWidth); void addSegBezier(dynArr_t * array_p, trkSeg_p seg); diff --git a/app/bin/cblock.c b/app/bin/cblock.c index 0291b4a..bc23e14 100644 --- a/app/bin/cblock.c +++ b/app/bin/cblock.c @@ -40,7 +40,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * T_BLOCK * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/cblock.c,v 1.5 2009-11-23 19:46:16 rheller Exp $ @@ -53,7 +53,7 @@ #include "fileio.h" #include "param.h" #include "track.h" -#include "trackx.h" +#include "trkendpt.h" #include "common-ui.h" #ifdef UTFCONVERT @@ -65,19 +65,20 @@ EXPORT TRKTYP_T T_BLOCK = -1; static int log_block = 0; static void NoDrawLine(drawCmd_p d, coOrd p0, coOrd p1, wDrawWidth width, - wDrawColor color ) {} + wDrawColor color ) {} static void NoDrawArc(drawCmd_p d, coOrd p, DIST_T r, ANGLE_T angle0, - ANGLE_T angle1, BOOL_T drawCenter, wDrawWidth width, - wDrawColor color ) {} + ANGLE_T angle1, BOOL_T drawCenter, wDrawWidth width, + wDrawColor color ) {} static void NoDrawString( drawCmd_p d, coOrd p, ANGLE_T a, char * s, - wFont_p fp, FONTSIZE_T fontSize, wDrawColor color ) {} + wFont_p fp, FONTSIZE_T fontSize, wDrawColor color ) {} static void NoDrawBitMap( drawCmd_p d, coOrd p, wDrawBitMap_p bm, - wDrawColor color) {} + wDrawColor color) {} static void NoDrawPoly( drawCmd_p d, int cnt, coOrd * pts, int * types, - wDrawColor color, wDrawWidth width, drawFill_e eFillOpt ) {} + wDrawColor color, wDrawWidth width, drawFill_e eFillOpt ) {} static void NoDrawFillCircle( drawCmd_p d, coOrd p, DIST_T r, - wDrawColor color ) {} -static void NoDrawRectangle( drawCmd_p d, coOrd orig, coOrd size, wDrawColor color, drawFill_e eFill ) {} + wDrawColor color ) {} +static void NoDrawRectangle( drawCmd_p d, coOrd orig, coOrd size, + wDrawColor color, drawFill_e eFill ) {} static drawFuncs_t noDrawFuncs = { NoDrawLine, @@ -86,7 +87,8 @@ static drawFuncs_t noDrawFuncs = { NoDrawBitMap, NoDrawPoly, NoDrawFillCircle, - NoDrawRectangle}; + NoDrawRectangle +}; static drawCmd_t blockD = { NULL, @@ -95,7 +97,8 @@ static drawCmd_t blockD = { 1.0, 0.0, {0.0,0.0}, {0.0,0.0}, - Pix2CoOrd, CoOrd2Pix }; + Pix2CoOrd, CoOrd2Pix +}; static char blockName[STR_SHORT_SIZE]; static char blockScript[STR_LONG_SIZE]; @@ -104,8 +107,8 @@ static track_p first_block; static track_p last_block; static paramData_t blockPLs[] = { -/*0*/ { PD_STRING, blockName, "name", PDO_NOPREF | PDO_NOTBLANK, I2VP(200), N_("Name"), 0, 0, sizeof( blockName )}, -/*1*/ { PD_STRING, blockScript, "script", PDO_NOPREF, I2VP(350), N_("Script"), 0, 0, sizeof( blockScript)} + /*0*/ { PD_STRING, blockName, "name", PDO_NOPREF | PDO_NOTBLANK, I2VP(200), N_("Name"), 0, 0, sizeof( blockName )}, + /*1*/ { PD_STRING, blockScript, "script", PDO_NOPREF, I2VP(350), N_("Script"), 0, 0, sizeof( blockScript)} }; static paramGroup_t blockPG = { "block", 0, blockPLs, COUNT( blockPLs ) }; static wWin_p blockW; @@ -116,16 +119,16 @@ static char blockEditSegs[STR_LONG_SIZE]; static track_p blockEditTrack; static paramData_t blockEditPLs[] = { -/*0*/ { PD_STRING, blockEditName, "name", PDO_NOPREF | PDO_NOTBLANK, I2VP(200), N_("Name"), 0, 0, sizeof(blockEditName)}, -/*1*/ { PD_STRING, blockEditScript, "script", PDO_NOPREF, I2VP(350), N_("Script"), 0, 0, sizeof(blockEditScript)}, -/*2*/ { PD_STRING, blockEditSegs, "segments", PDO_NOPREF, I2VP(350), N_("Segments"), BO_READONLY, 0, sizeof(blockEditSegs) }, + /*0*/ { PD_STRING, blockEditName, "name", PDO_NOPREF | PDO_NOTBLANK, I2VP(200), N_("Name"), 0, 0, sizeof(blockEditName)}, + /*1*/ { PD_STRING, blockEditScript, "script", PDO_NOPREF, I2VP(350), N_("Script"), 0, 0, sizeof(blockEditScript)}, + /*2*/ { PD_STRING, blockEditSegs, "segments", PDO_NOPREF, I2VP(350), N_("Segments"), BO_READONLY, 0, sizeof(blockEditSegs) }, }; static paramGroup_t blockEditPG = { "block", 0, blockEditPLs, COUNT( blockEditPLs ) }; static wWin_p blockEditW; typedef struct btrackinfo_t { - track_p t; - TRKINX_T i; + track_p t; + TRKINX_T i; } btrackinfo_t, *btrackinfo_p; static dynArr_t blockTrk_da; @@ -136,13 +139,13 @@ static dynArr_t blockTrk_da; typedef struct blockData_t { - extraDataBase_t base; - char * name; - char * script; - BOOL_T IsHilite; - track_p next_block; - wIndex_t numTracks; - btrackinfo_t trackList; + extraDataBase_t base; + char * name; + char * script; + BOOL_T IsHilite; + track_p next_block; + wIndex_t numTracks; + btrackinfo_t trackList; } blockData_t, *blockData_p; static blockData_p GetblockData ( track_p trk ) @@ -163,14 +166,16 @@ static struct { typedef enum { NM, SC, LN, E0, E1 } blockDesc_e; static descData_t blockDesc[] = { -/*NM*/ { DESC_STRING, N_("Name"), &blockData.name, sizeof(blockData.name) }, -/*SC*/ { DESC_STRING, N_("Script"), &blockData.script, sizeof(blockData.script) }, -/*LN*/ { DESC_DIM, N_("Length"), &blockData.length }, -/*E0*/ { DESC_POS, N_("End Pt 1: X,Y"), &blockData.endPt[0] }, -/*E1*/ { DESC_POS, N_("End Pt 2: X,Y"), &blockData.endPt[1] }, - { DESC_NULL } }; - -static void UpdateBlock (track_p trk, int inx, descData_p descUpd, BOOL_T needUndoStart ) + /*NM*/ { DESC_STRING, N_("Name"), &blockData.name, sizeof(blockData.name) }, + /*SC*/ { DESC_STRING, N_("Script"), &blockData.script, sizeof(blockData.script) }, + /*LN*/ { DESC_DIM, N_("Length"), &blockData.length }, + /*E0*/ { DESC_POS, N_("End Pt 1: X,Y"), &blockData.endPt[0] }, + /*E1*/ { DESC_POS, N_("End Pt 2: X,Y"), &blockData.endPt[1] }, + { DESC_NULL } +}; + +static void UpdateBlock (track_p trk, int inx, descData_p descUpd, + BOOL_T needUndoStart ) { blockData_p xx = GetblockData(trk); const char * thename, *thescript; @@ -191,7 +196,7 @@ static void UpdateBlock (track_p trk, int inx, descData_p descUpd, BOOL_T needUn strncpy(newName, thename, max_str - 1); newName[max_str-1] = '\0'; NoticeMessage2(0, MSG_ENTERED_STRING_TRUNCATED, _("Ok"), NULL, max_str-1); - } else newName = MyStrdup(thename); + } else { newName = MyStrdup(thename); } } thescript = wStringGetValue( (wString_p)blockDesc[SC].control0 ); @@ -203,18 +208,19 @@ static void UpdateBlock (track_p trk, int inx, descData_p descUpd, BOOL_T needUn strncpy(newScript, thescript, max_str - 1); newScript[max_str-1] = '\0'; NoticeMessage2(0, MSG_ENTERED_STRING_TRUNCATED, _("Ok"), NULL, max_str-1); - } else newScript = MyStrdup(thescript); + } else { newScript = MyStrdup(thescript); } } - if ( ! changed ) return; - if ( needUndoStart ) + if ( ! changed ) { return; } + if ( needUndoStart ) { UndoStart( _("Change block"), "Change block" ); + } UndoModify( trk ); if (nChanged) { - if (xx->name) MyFree(xx->name); + if (xx->name) { MyFree(xx->name); } xx->name = newName; } if (sChanged) { - if (xx->script) MyFree(xx->script); + if (xx->script) { MyFree(xx->script); } xx->script = newScript; } return; @@ -231,7 +237,7 @@ static DIST_T DistanceBlock (track_p t, coOrd * p ) coOrd best_pos = pos; for (iTrk = 0; iTrk < xx->numTracks; iTrk++) { pos = *p; - if ((&(xx->trackList))[iTrk].t == NULL) continue; + if ((&(xx->trackList))[iTrk].t == NULL) { continue; } current = GetTrkDistance ((&(xx->trackList))[iTrk].t, &pos); if (current < closest) { closest = current; @@ -246,13 +252,14 @@ static void DescribeBlock (track_p trk, char * str, CSIZE_T len ) { blockData_p xx = GetblockData(trk); wIndex_t tcount = 0; - track_p lastTrk = NULL; +// track_p lastTrk = NULL; long listLabelsOption = listLabels; LOG( log_block, 1, ("*** DescribeBlock(): trk is T%d\n",GetTrkIndex(trk))) FormatCompoundTitle( listLabelsOption, xx->name ); - if (message[0] == '\0') + if (message[0] == '\0') { FormatCompoundTitle( listLabelsOption|LABEL_DESCR, xx->name ); + } strcpy( str, _(GetTrkTypeName( trk )) ); str++; while (*str) { @@ -260,7 +267,7 @@ static void DescribeBlock (track_p trk, char * str, CSIZE_T len ) str++; } sprintf( str, _("(%d): Layer=%u %s"), - GetTrkIndex(trk), GetTrkLayer(trk)+1, message ); + GetTrkIndex(trk), GetTrkLayer(trk)+1, message ); blockData.name[0] = '\0'; strncat(blockData.name,xx->name,STR_SHORT_SIZE-1); blockData.script[0] = '\0'; @@ -268,21 +275,21 @@ static void DescribeBlock (track_p trk, char * str, CSIZE_T len ) blockData.length = 0; BOOL_T first = TRUE; for (tcount = 0; tcount < xx->numTracks; tcount++) { - if ((&(xx->trackList))[tcount].t == NULL) continue; - if (first) { - blockData.endPt[0] = GetTrkEndPos((&(xx->trackList))[tcount].t,0); - first = FALSE; - } - blockData.endPt[1] = GetTrkEndPos((&(xx->trackList))[tcount].t,1); - blockData.length += GetTrkLength((&(xx->trackList))[tcount].t,0,1); - tcount++; - break; + if ((&(xx->trackList))[tcount].t == NULL) { continue; } + if (first) { + blockData.endPt[0] = GetTrkEndPos((&(xx->trackList))[tcount].t,0); + first = FALSE; + } + blockData.endPt[1] = GetTrkEndPos((&(xx->trackList))[tcount].t,1); + blockData.length += GetTrkLength((&(xx->trackList))[tcount].t,0,1); + tcount++; + break; } blockDesc[E0].mode = - blockDesc[E1].mode = - blockDesc[LN].mode = DESC_RO; + blockDesc[E1].mode = + blockDesc[LN].mode = DESC_RO; blockDesc[NM].mode = - blockDesc[SC].mode = DESC_NOREDRAW; + blockDesc[SC].mode = DESC_NOREDRAW; DoDescribe(_("Block"), trk, blockDesc, UpdateBlock ); } @@ -297,25 +304,26 @@ static int blockDebug (track_p trk) LOG( log_block, 1, ("*** blockDebug(): script = \"%s\"\n",xx->script)) LOG( log_block, 1, ("*** blockDebug(): numTracks = %d\n",xx->numTracks)) for (iTrack = 0; iTrack < xx->numTracks; iTrack++) { - if ((&(xx->trackList))[iTrack].t == NULL) continue; - LOG( log_block, 1, ("*** blockDebug(): trackList[%d] = T%d, ",iTrack,GetTrkIndex((&(xx->trackList))[iTrack].t))) + if ((&(xx->trackList))[iTrack].t == NULL) { continue; } + LOG( log_block, 1, ("*** blockDebug(): trackList[%d] = T%d, ",iTrack, + GetTrkIndex((&(xx->trackList))[iTrack].t))) LOG( log_block, 1, ("%s\n",GetTrkTypeName((&(xx->trackList))[iTrack].t))) } return(0); } -static BOOL_T blockCheckContigiousPath() +static BOOL_T blockCheckContiguousPath() { EPINX_T ep, epCnt, epN; int inx; track_p trk, trk1; DIST_T dist; ANGLE_T angle; - /*int pathElemStart = 0;*/ + /*int pathElemStart = 0;*/ coOrd endPtOrig = zero; BOOL_T IsConnectedP; trkEndPt_p endPtP; - DYNARR_RESET( trkEndPt_t, tempEndPts_da ); + TempEndPtsReset(); for ( inx=0; inx=tempEndPts_da.cnt ) { - DYNARR_APPEND( trkEndPt_t, tempEndPts_da, 10 ); - endPtP = &tempEndPts(tempEndPts_da.cnt-1); - memset( endPtP, 0, sizeof *endPtP ); - endPtP->pos = GetTrkEndPos(trk,ep); - endPtP->angle = GetTrkEndAngle(trk,ep); + if ( epN>=TempEndPtsCount() ) { + endPtP = TempEndPtsAppend(); + SetEndPt( endPtP, GetTrkEndPos(trk,ep), GetTrkEndAngle(trk,ep) ); /*endPtP->track = trk1;*/ /* These End Points are dummies -- we don't want DeleteTrack to look at them. */ - endPtP->track = NULL; - endPtP->index = (trk1?GetEndPtConnectedToMe(trk1,trk):-1); - endPtOrig.x += endPtP->pos.x; - endPtOrig.y += endPtP->pos.y; + SetEndPtTrack( endPtP, NULL ); + // TODO-EPP What is this for? + SetEndPtEndPt( endPtP, (trk1?GetEndPtConnectedToMe(trk1,trk):-1) ); + endPtOrig.x += GetEndPtPos(endPtP).x; + endPtOrig.y += GetEndPtPos(endPtP).y; } } else { IsConnectedP = TRUE; } } - if (!IsConnectedP && blockTrk_da.cnt > 1) return FALSE; + if (!IsConnectedP && blockTrk_da.cnt > 1) { return FALSE; } } return TRUE; } static void DeleteBlock ( track_p t ) { - track_p trk1; - blockData_p xx1; + track_p trk1; + blockData_p xx1; LOG( log_block, 1, ("*** DeleteBlock(%p)\n",t)) blockData_p xx = GetblockData(t); LOG( log_block, 1, ("*** DeleteBlock(): index is %d\n",GetTrkIndex(t))) - LOG( log_block, 1, ("*** DeleteBlock(): xx = %p, xx->name = %p, xx->script = %p\n", - xx,xx->name,xx->script)) + LOG( log_block, 1, + ("*** DeleteBlock(): xx = %p, xx->name = %p, xx->script = %p\n", + xx,xx->name,xx->script)) MyFree(xx->name); xx->name = NULL; MyFree(xx->script); xx->script = NULL; - if (first_block == t) - first_block = xx->next_block; + if (first_block == t) { + first_block = xx->next_block; + } trk1 = first_block; while(trk1) { xx1 = GetblockData (trk1); @@ -379,8 +390,9 @@ static void DeleteBlock ( track_p t ) } trk1 = xx1->next_block; } - if (t == last_block) + if (t == last_block) { last_block = trk1; + } } @@ -396,11 +408,11 @@ static BOOL_T WriteBlock ( track_p t, FILE * f ) #endif // UTFCONVERT rc &= fprintf(f, "BLOCK %d \"%s\" \"%s\"\n", - GetTrkIndex(t), blockName, xx->script)>0; + GetTrkIndex(t), blockName, xx->script)>0; for (iTrack = 0; iTrack < xx->numTracks && rc; iTrack++) { - if ((&(xx->trackList))[iTrack].t == NULL) continue; + if ((&(xx->trackList))[iTrack].t == NULL) { continue; } rc &= fprintf(f, "\tTRK %d\n", - GetTrkIndex((&(xx->trackList))[iTrack].t))>0; + GetTrkIndex((&(xx->trackList))[iTrack].t))>0; } rc &= fprintf( f, "\t%s\n", END_BLOCK )>0; MyFree(blockName); @@ -429,37 +441,39 @@ static BOOL_T ReadBlock ( char * line ) #endif // UTFCONVERT - DYNARR_RESET( btrackinfo_t , blockTrk_da ); + DYNARR_RESET( btrackinfo_t, blockTrk_da ); while ( (cp = GetNextLine()) != NULL ) { if ( IsEND( END_BLOCK ) ) { break; } - while (isspace((unsigned char)*cp)) cp++; + while (isspace((unsigned char)*cp)) { cp++; } if ( *cp == '\n' || *cp == '#' ) { continue; } if ( strncmp( cp, "TRK", 3 ) == 0 ) { - if (!GetArgs(cp+4,"d",&trkindex)) return FALSE; + if (!GetArgs(cp+4,"d",&trkindex)) { return FALSE; } /*trk = FindTrack(trkindex);*/ DYNARR_APPEND( btrackinfo_t, blockTrk_da, 10 ); DYNARR_LAST( btrackinfo_t, blockTrk_da ).i = trkindex; } } /*blockCheckContigiousPath(); save for ResolveBlockTracks */ - trk = NewTrack(index, T_BLOCK, tempEndPts_da.cnt, sizeof(blockData_t)+(sizeof(btrackinfo_t)*(blockTrk_da.cnt))+1); - for ( ep=0; eppos, endPtP->angle ); + trk = NewTrack(index, T_BLOCK, TempEndPtsCount(), + sizeof(blockData_t)+(sizeof(btrackinfo_t)*(blockTrk_da.cnt))+1); + for ( ep=0; epname = name; xx->script = script; xx->IsHilite = FALSE; xx->numTracks = blockTrk_da.cnt; trk1 = last_block; - if (!trk1) first_block = trk; + if (!trk1) { first_block = trk; } else { xx1 = GetblockData(trk1); xx1->next_block = trk; @@ -477,21 +491,23 @@ static BOOL_T ReadBlock ( char * line ) EXPORT void ResolveBlockTrack ( track_p trk ) { - LOG( log_block, 1, ("*** ResolveBlockTrack(%p)\n",trk)) - blockData_p xx; - track_p t_trk; - wIndex_t iTrack; - if (GetTrkType(trk) != T_BLOCK) return; - LOG( log_block, 1, ("*** ResolveBlockTrack(%d)\n",GetTrkIndex(trk))) - xx = GetblockData(trk); - for (iTrack = 0; iTrack < xx->numTracks; iTrack++) { - t_trk = FindTrack(tracklist(iTrack).i); - if (t_trk == NULL) { - NoticeMessage( _("resolveBlockTrack: T%d[%d]: T%d doesn't exist"), _("Continue"), NULL, GetTrkIndex(trk), iTrack, tracklist(iTrack).i,t_trk ); - } - tracklist(iTrack).t = t_trk; - LOG( log_block, 1, ("*** ResolveBlockTrack(): %d (%d): %p\n",iTrack,tracklist(iTrack).i,t_trk)) - } + LOG( log_block, 1, ("*** ResolveBlockTrack(%p)\n",trk)) + blockData_p xx; + track_p t_trk; + wIndex_t iTrack; + if (GetTrkType(trk) != T_BLOCK) { return; } + LOG( log_block, 1, ("*** ResolveBlockTrack(%d)\n",GetTrkIndex(trk))) + xx = GetblockData(trk); + for (iTrack = 0; iTrack < xx->numTracks; iTrack++) { + t_trk = FindTrack(tracklist(iTrack).i); + if (t_trk == NULL) { + NoticeMessage( _("resolveBlockTrack: T%d[%d]: T%d doesn't exist"), + _("Continue"), NULL, GetTrkIndex(trk), iTrack, tracklist(iTrack).i,t_trk ); + } + tracklist(iTrack).t = t_trk; + LOG( log_block, 1, ("*** ResolveBlockTrack(): %d (%d): %p\n",iTrack, + tracklist(iTrack).i,t_trk)) + } } static void MoveBlock (track_p trk, coOrd orig ) {} @@ -533,24 +549,26 @@ static trackCmd_t blockCmds = { -static BOOL_T TrackInBlock (track_p trk, track_p blk) { +static BOOL_T TrackInBlock (track_p trk, track_p blk) +{ wIndex_t iTrack; blockData_p xx = GetblockData(blk); for (iTrack = 0; iTrack < xx->numTracks; iTrack++) { - if (trk == (&(xx->trackList))[iTrack].t) return TRUE; + if (trk == (&(xx->trackList))[iTrack].t) { return TRUE; } } return FALSE; } -static track_p FindBlock (track_p trk) { +static track_p FindBlock (track_p trk) +{ track_p a_trk; blockData_p xx; - if (!first_block) return NULL; + if (!first_block) { return NULL; } a_trk = first_block; while (a_trk) { if (!IsTrackDeleted(a_trk)) { if (GetTrkType(a_trk) == T_BLOCK && - TrackInBlock(trk,a_trk)) return a_trk; + TrackInBlock(trk,a_trk)) { return a_trk; } } xx = GetblockData(a_trk); a_trk = xx->next_block; @@ -599,8 +617,8 @@ static void BlockOk ( void * junk ) } /* Need to check that all block elements are connected to each other... */ - if (!blockCheckContigiousPath()) { - NoticeMessage( _("Block is discontigious!"), _("Ok"), NULL ); + if (!blockCheckContiguousPath()) { + NoticeMessage( _("Block is discontiguous!"), _("Ok"), NULL ); wDrawDelayUpdate( mainD.d, FALSE ); wHide( blockW ); return; @@ -608,23 +626,24 @@ static void BlockOk ( void * junk ) UndoStart( _("Create block"), "Create block" ); /* Create a block object */ LOG( log_block, 1, ("*** BlockOk(): %d tracks in block\n",blockTrk_da.cnt)) - trk = NewTrack(0, T_BLOCK, tempEndPts_da.cnt, sizeof(blockData_t)+(sizeof(btrackinfo_t)*(blockTrk_da.cnt-1))+1); - for ( ep=0; eppos, endPtP->angle ); + trk = NewTrack(0, T_BLOCK, TempEndPtsCount(), + sizeof(blockData_t)+(sizeof(btrackinfo_t)*(blockTrk_da.cnt-1))+1); + for ( ep=0; epname = MyStrdup(blockName); xx->script = MyStrdup(blockScript); - xx->IsHilite = FALSE; + xx->IsHilite = FALSE; xx->numTracks = blockTrk_da.cnt; trk1 = last_block; if (!trk1) { first_block = trk; - } - else { + } else { xx1 = GetblockData(trk1); xx1->next_block = trk; } @@ -667,10 +686,11 @@ static void NewBlockDialog() ErrorMessage( MSG_NO_SELECTED_TRK ); return; } - if ( log_block < 0 ) log_block = LogFindIndex( "block" ); + if ( log_block < 0 ) { log_block = LogFindIndex( "block" ); } if ( !blockW ) { ParamRegister( &blockPG ); - blockW = ParamCreateDialog (&blockPG, MakeWindowTitle(_("Create Block")), _("Ok"), BlockOk, wHide, TRUE, NULL, F_BLOCK, NULL ); + blockW = ParamCreateDialog (&blockPG, MakeWindowTitle(_("Create Block")), + _("Ok"), BlockOk, wHide, TRUE, NULL, F_BLOCK, NULL ); blockD.dpi = mainD.dpi; } ParamLoadControls( &blockPG ); @@ -682,7 +702,7 @@ static STATUS_T CmdBlockCreate( wAction_t action, coOrd pos ) LOG( log_block, 1, ("*** CmdBlockAction(%08x,{%f,%f})\n",action,pos.x,pos.y)) switch (action & 0xFF) { case C_START: - LOG( log_block, 1,("*** CmdBlockCreate(): C_START\n")) + LOG( log_block, 1,("*** CmdBlockCreate(): C_START\n")) NewBlockDialog(); return C_TERMINATE; default: @@ -691,7 +711,6 @@ static STATUS_T CmdBlockCreate( wAction_t action, coOrd pos ) } #if 0 -extern BOOL_T inDescribeCmd; static STATUS_T CmdBlockEdit( wAction_t action, coOrd pos ) { @@ -745,7 +764,8 @@ static STATUS_T CmdBlockDelete( wAction_t action, coOrd pos ) } /* Confirm Delete Block */ xx = GetblockData(btrk); - if ( NoticeMessage( _("Really delete block %s?"), _("Yes"), _("No"), xx->name) ) { + if ( NoticeMessage( _("Really delete block %s?"), _("Yes"), _("No"), + xx->name) ) { UndoStart( _("Delete Block"), "delete" ); DeleteTrack (btrk, FALSE); UndoEnd(); @@ -781,74 +801,74 @@ static STATUS_T CmdBlock (wAction_t action, coOrd pos ) void CheckDeleteBlock(track_p t) { - track_p blk; - blockData_p xx; - if (!IsTrack(t)) { - return; - } - blk = FindBlock(t); - if (blk == NULL) { - return; - } - xx = GetblockData(blk); - NoticeMessage(_("Deleting block %s"),_("Ok"),NULL,xx->name); - DeleteTrack(blk,FALSE); + track_p blk; + blockData_p xx; + if (!IsTrack(t)) { + return; + } + blk = FindBlock(t); + if (blk == NULL) { + return; + } + xx = GetblockData(blk); + NoticeMessage(_("Deleting block %s"),_("Ok"),NULL,xx->name); + DeleteTrack(blk,FALSE); } static void BlockEditOk ( void * junk ) { - blockData_p xx; - track_p trk; - - LOG( log_block, 1, ("*** BlockEditOk()\n")) - ParamUpdate (&blockEditPG ); - if ( blockEditName[0]==0 ) { - NoticeMessage( _("Block must have a name!"), _("Ok"), NULL); - return; - } - wDrawDelayUpdate( mainD.d, TRUE ); - UndoStart( _("Modify Block"), "Modify Block" ); - trk = blockEditTrack; - xx = GetblockData( trk ); - xx->name = MyStrdup(blockEditName); - xx->script = MyStrdup(blockEditScript); - blockDebug(trk); - UndoEnd(); - wHide( blockEditW ); + blockData_p xx; + track_p trk; + + LOG( log_block, 1, ("*** BlockEditOk()\n")) + ParamUpdate (&blockEditPG ); + if ( blockEditName[0]==0 ) { + NoticeMessage( _("Block must have a name!"), _("Ok"), NULL); + return; + } + wDrawDelayUpdate( mainD.d, TRUE ); + UndoStart( _("Modify Block"), "Modify Block" ); + trk = blockEditTrack; + xx = GetblockData( trk ); + xx->name = MyStrdup(blockEditName); + xx->script = MyStrdup(blockEditScript); + blockDebug(trk); + UndoEnd(); + wHide( blockEditW ); } static void EditBlock (track_p trk) { - blockData_p xx = GetblockData(trk); - wIndex_t iTrack; - BOOL_T needComma = FALSE; - char temp[32]; + blockData_p xx = GetblockData(trk); + wIndex_t iTrack; + BOOL_T needComma = FALSE; + char temp[32]; strncpy(blockEditName, xx->name, STR_SHORT_SIZE - 1); blockEditName[STR_SHORT_SIZE-1] = '\0'; strncpy(blockEditScript, xx->script, STR_LONG_SIZE - 1); blockEditScript[STR_LONG_SIZE-1] = '\0'; - blockEditSegs[0] = '\0'; - for (iTrack = 0; iTrack < xx->numTracks ; iTrack++) { - if ((&(xx->trackList))[iTrack].t == NULL) continue; - sprintf(temp,"%d",GetTrkIndex((&(xx->trackList))[iTrack].t)); - if (needComma) strcat(blockEditSegs,", "); - strcat(blockEditSegs,temp); - needComma = TRUE; - } - blockEditTrack = trk; - if ( !blockEditW ) { - ParamRegister( &blockEditPG ); - blockEditW = ParamCreateDialog (&blockEditPG, - MakeWindowTitle(_("Edit block")), - _("Ok"), BlockEditOk, - wHide, TRUE, NULL, F_BLOCK, - NULL ); - } - ParamLoadControls( &blockEditPG ); - sprintf( message, _("Edit block %d"), GetTrkIndex(trk) ); - wWinSetTitle( blockEditW, message ); - wShow (blockEditW); + blockEditSegs[0] = '\0'; + for (iTrack = 0; iTrack < xx->numTracks ; iTrack++) { + if ((&(xx->trackList))[iTrack].t == NULL) { continue; } + sprintf(temp,"%d",GetTrkIndex((&(xx->trackList))[iTrack].t)); + if (needComma) { strcat(blockEditSegs,", "); } + strcat(blockEditSegs,temp); + needComma = TRUE; + } + blockEditTrack = trk; + if ( !blockEditW ) { + ParamRegister( &blockEditPG ); + blockEditW = ParamCreateDialog (&blockEditPG, + MakeWindowTitle(_("Edit block")), + _("Ok"), BlockEditOk, + wHide, TRUE, NULL, F_BLOCK, + NULL ); + } + ParamLoadControls( &blockEditPG ); + sprintf( message, _("Edit block %d"), GetTrkIndex(trk) ); + wWinSetTitle( blockEditW, message ); + wShow (blockEditW); } static coOrd blkhiliteOrig, blkhiliteSize; @@ -856,146 +876,157 @@ static POS_T blkhiliteBorder; static wDrawColor blkhiliteColor = 0; static void DrawBlockTrackHilite( void ) { - if (blkhiliteColor==0) + if (blkhiliteColor==0) { blkhiliteColor = wDrawColorGray(87); + } // This is incomplete. We should be in temp drawing mode and clearing temp draw on UN_HILIGHT - DrawRectangle( &tempD, blkhiliteOrig, blkhiliteSize, blkhiliteColor, DRAW_TRANSPARENT ); + DrawRectangle( &tempD, blkhiliteOrig, blkhiliteSize, blkhiliteColor, + DRAW_TRANSPARENT ); } static int BlockMgmProc ( int cmd, void * data ) { - track_p trk = (track_p) data; - blockData_p xx = GetblockData(trk); - wIndex_t iTrack; - BOOL_T needComma = FALSE; - char temp[32]; - /*char msg[STR_SIZE];*/ - coOrd tempOrig, tempSize; - BOOL_T first = TRUE; - - switch ( cmd ) { - case CONTMGM_CAN_EDIT: - return TRUE; - break; - case CONTMGM_DO_EDIT: - EditBlock (trk); - /*inDescribeCmd = TRUE;*/ - /*DescribeTrack (trk, msg, sizeof msg );*/ - /*InfoMessage( msg );*/ - return TRUE; - break; - case CONTMGM_CAN_DELETE: - return TRUE; - break; - case CONTMGM_DO_DELETE: - DeleteTrack (trk, FALSE); - return TRUE; - break; - case CONTMGM_DO_HILIGHT: - if (!xx->IsHilite) { - blkhiliteBorder = mainD.scale*0.1; - if ( blkhiliteBorder < trackGauge ) blkhiliteBorder = trackGauge; - first = TRUE; - for (iTrack = 0; iTrack < xx->numTracks ; iTrack++) { - if ((&(xx->trackList))[iTrack].t == NULL) continue; - GetBoundingBox( (&(xx->trackList))[iTrack].t, &tempSize, &tempOrig ); - if (first) { - blkhiliteOrig = tempOrig; - blkhiliteSize = tempSize; - first = FALSE; - } else { - if (tempSize.x > blkhiliteSize.x) - blkhiliteSize.x = tempSize.x; - if (tempSize.y > blkhiliteSize.y) - blkhiliteSize.y = tempSize.y; - if (tempOrig.x < blkhiliteOrig.x) - blkhiliteOrig.x = tempOrig.x; - if (tempOrig.y < blkhiliteOrig.y) - blkhiliteOrig.y = tempOrig.y; - } - } - blkhiliteOrig.x -= blkhiliteBorder; - blkhiliteOrig.y -= blkhiliteBorder; - blkhiliteSize.x -= blkhiliteOrig.x-blkhiliteBorder; - blkhiliteSize.y -= blkhiliteOrig.y-blkhiliteBorder; - DrawBlockTrackHilite(); - xx->IsHilite = TRUE; - } - break; - case CONTMGM_UN_HILIGHT: - if (xx->IsHilite) { - blkhiliteBorder = mainD.scale*0.1; - if ( blkhiliteBorder < trackGauge ) blkhiliteBorder = trackGauge; - first = TRUE; - for (iTrack = 0; iTrack < xx->numTracks ; iTrack++) { - if ((&(xx->trackList))[iTrack].t == NULL) continue; - GetBoundingBox( (&(xx->trackList))[iTrack].t, &tempSize, &tempOrig ); - if (first) { - blkhiliteOrig = tempOrig; - blkhiliteSize = tempSize; - first = FALSE; - } else { - if (tempSize.x > blkhiliteSize.x) - blkhiliteSize.x = tempSize.x; - if (tempSize.y > blkhiliteSize.y) - blkhiliteSize.y = tempSize.y; - if (tempOrig.x < blkhiliteOrig.x) - blkhiliteOrig.x = tempOrig.x; - if (tempOrig.y < blkhiliteOrig.y) - blkhiliteOrig.y = tempOrig.y; - } - } - blkhiliteOrig.x -= blkhiliteBorder; - blkhiliteOrig.y -= blkhiliteBorder; - blkhiliteSize.x -= blkhiliteOrig.x-blkhiliteBorder; - blkhiliteSize.y -= blkhiliteOrig.y-blkhiliteBorder; - DrawBlockTrackHilite(); - xx->IsHilite = FALSE; - } - break; - case CONTMGM_GET_TITLE: - sprintf( message, "\t%s\t", xx->name); - for (iTrack = 0; iTrack < xx->numTracks ; iTrack++) { - if ((&(xx->trackList))[iTrack].t == NULL) continue; - sprintf(temp,"%d",GetTrkIndex((&(xx->trackList))[iTrack].t)); - if (needComma) strcat(message,", "); - strcat(message,temp); - needComma = TRUE; - } - break; - } - return FALSE; + track_p trk = (track_p) data; + blockData_p xx = GetblockData(trk); + wIndex_t iTrack; + BOOL_T needComma = FALSE; + char temp[32]; + /*char msg[STR_SIZE];*/ + coOrd tempOrig, tempSize; + BOOL_T first = TRUE; + + switch ( cmd ) { + case CONTMGM_CAN_EDIT: + return TRUE; + break; + case CONTMGM_DO_EDIT: + EditBlock (trk); + /*inDescribeCmd = TRUE;*/ + /*DescribeTrack (trk, msg, sizeof msg );*/ + /*InfoMessage( msg );*/ + return TRUE; + break; + case CONTMGM_CAN_DELETE: + return TRUE; + break; + case CONTMGM_DO_DELETE: + DeleteTrack (trk, FALSE); + return TRUE; + break; + case CONTMGM_DO_HILIGHT: + if (!xx->IsHilite) { + blkhiliteBorder = mainD.scale*0.1; + if ( blkhiliteBorder < trackGauge ) { blkhiliteBorder = trackGauge; } + first = TRUE; + for (iTrack = 0; iTrack < xx->numTracks ; iTrack++) { + if ((&(xx->trackList))[iTrack].t == NULL) { continue; } + GetBoundingBox( (&(xx->trackList))[iTrack].t, &tempSize, &tempOrig ); + if (first) { + blkhiliteOrig = tempOrig; + blkhiliteSize = tempSize; + first = FALSE; + } else { + if (tempSize.x > blkhiliteSize.x) { + blkhiliteSize.x = tempSize.x; + } + if (tempSize.y > blkhiliteSize.y) { + blkhiliteSize.y = tempSize.y; + } + if (tempOrig.x < blkhiliteOrig.x) { + blkhiliteOrig.x = tempOrig.x; + } + if (tempOrig.y < blkhiliteOrig.y) { + blkhiliteOrig.y = tempOrig.y; + } + } + } + blkhiliteOrig.x -= blkhiliteBorder; + blkhiliteOrig.y -= blkhiliteBorder; + blkhiliteSize.x -= blkhiliteOrig.x-blkhiliteBorder; + blkhiliteSize.y -= blkhiliteOrig.y-blkhiliteBorder; + DrawBlockTrackHilite(); + xx->IsHilite = TRUE; + } + break; + case CONTMGM_UN_HILIGHT: + if (xx->IsHilite) { + blkhiliteBorder = mainD.scale*0.1; + if ( blkhiliteBorder < trackGauge ) { blkhiliteBorder = trackGauge; } + first = TRUE; + for (iTrack = 0; iTrack < xx->numTracks ; iTrack++) { + if ((&(xx->trackList))[iTrack].t == NULL) { continue; } + GetBoundingBox( (&(xx->trackList))[iTrack].t, &tempSize, &tempOrig ); + if (first) { + blkhiliteOrig = tempOrig; + blkhiliteSize = tempSize; + first = FALSE; + } else { + if (tempSize.x > blkhiliteSize.x) { + blkhiliteSize.x = tempSize.x; + } + if (tempSize.y > blkhiliteSize.y) { + blkhiliteSize.y = tempSize.y; + } + if (tempOrig.x < blkhiliteOrig.x) { + blkhiliteOrig.x = tempOrig.x; + } + if (tempOrig.y < blkhiliteOrig.y) { + blkhiliteOrig.y = tempOrig.y; + } + } + } + blkhiliteOrig.x -= blkhiliteBorder; + blkhiliteOrig.y -= blkhiliteBorder; + blkhiliteSize.x -= blkhiliteOrig.x-blkhiliteBorder; + blkhiliteSize.y -= blkhiliteOrig.y-blkhiliteBorder; + DrawBlockTrackHilite(); + xx->IsHilite = FALSE; + } + break; + case CONTMGM_GET_TITLE: + sprintf( message, "\t%s\t", xx->name); + for (iTrack = 0; iTrack < xx->numTracks ; iTrack++) { + if ((&(xx->trackList))[iTrack].t == NULL) { continue; } + sprintf(temp,"%d",GetTrkIndex((&(xx->trackList))[iTrack].t)); + if (needComma) { strcat(message,", "); } + strcat(message,temp); + needComma = TRUE; + } + break; + } + return FALSE; } //#include "bitmaps/blocknew.xpm" //#include "bitmaps/blockedit.xpm" //#include "bitmaps/blockdel.xpm" -#include "bitmaps/block.xpm" +#include "bitmaps/block.xpm3" EXPORT void BlockMgmLoad( void ) { - track_p trk; - static wIcon_p blockI = NULL; - - if ( blockI == NULL) - blockI = wIconCreatePixMap( block_xpm[iconSize] ); - - TRK_ITERATE(trk) { - if (GetTrkType(trk) != T_BLOCK) continue; - ContMgmLoad( blockI, BlockMgmProc, trk ); - } - + track_p trk; + static wIcon_p blockI = NULL; + + if ( blockI == NULL) { + blockI = wIconCreatePixMap( block_xpm3[iconSize] ); + } + + TRK_ITERATE(trk) { + if (GetTrkType(trk) != T_BLOCK) { continue; } + ContMgmLoad( blockI, BlockMgmProc, trk ); + } + } EXPORT void InitCmdBlock( wMenu_p menu ) { blockName[0] = '\0'; blockScript[0] = '\0'; - AddMenuButton( menu, CmdBlockCreate, "cmdBlockCreate", _("Block"), - wIconCreatePixMap( block_xpm[iconSize] ), LEVEL0_50, - IC_STICKY|IC_POPUP2, ACCL_BLOCK1, NULL ); + AddMenuButton( menu, CmdBlockCreate, "cmdBlockCreate", _("Block"), + wIconCreatePixMap( block_xpm3[iconSize] ), LEVEL0_50, + IC_STICKY|IC_POPUP2, ACCL_BLOCK1, NULL ); ParamRegister( &blockPG ); } @@ -1004,9 +1035,7 @@ EXPORT void InitTrkBlock( void ) { T_BLOCK = InitObject ( &blockCmds ); log_block = LogFindIndex ( "block" ); - blockTrk_da.max = 0; - blockTrk_da.cnt = 0; - blockTrk_da.ptr = NULL; + DYNARR_INIT( btrackinfo_t, blockTrk_da ); last_block = NULL; } diff --git a/app/bin/ccontrol.c b/app/bin/ccontrol.c index a4f9b27..90c4fb2 100644 --- a/app/bin/ccontrol.c +++ b/app/bin/ccontrol.c @@ -4,8 +4,8 @@ /* -*- C -*- **************************************************************** * - * System : - * Module : + * System : + * Module : * Object Name : $RCSfile$ * Revision : $Revision$ * Date : $Date$ @@ -14,12 +14,12 @@ * Created : Sun Mar 5 16:01:37 2017 * Last Modified : <170314.1418> * - * Description + * Description * * Notes * * History - * + * **************************************************************************** * * Copyright (C) 2017 Robert Heller D/B/A Deepwoods Software @@ -38,13 +38,13 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * * - * * ****************************************************************************/ -static const char rcsid[] = "@(#) : $Id$"; +//static const char rcsid[] = "@(#) : $Id$"; #include "compound.h" #include "cselect.h" @@ -54,7 +54,6 @@ static const char rcsid[] = "@(#) : $Id$"; #include "layout.h" #include "param.h" #include "track.h" -#include "trackx.h" #include "common-ui.h" #ifdef UTFCONVERT #include "include/utf8convert.h" @@ -73,7 +72,8 @@ static drawCmd_t controlD = { 1.0, 0.0, {0.0,0.0}, {0.0,0.0}, - Pix2CoOrd, CoOrd2Pix }; + Pix2CoOrd, CoOrd2Pix +}; static char controlName[STR_SHORT_SIZE]; static char controlOnScript[STR_LONG_SIZE]; @@ -81,17 +81,17 @@ static char controlOffScript[STR_LONG_SIZE]; #endif typedef struct controlData_t { - extraDataBase_t base; - coOrd orig; - BOOL_T IsHilite; - char * name; - char * onscript; - char * offscript; + extraDataBase_t base; + coOrd orig; + BOOL_T IsHilite; + char * name; + char * onscript; + char * offscript; } controlData_t, *controlData_p; static controlData_p GetcontrolData ( track_p trk ) { - return GET_EXTRA_DATA( trk, T_CONTROL, controlData_t ); + return GET_EXTRA_DATA( trk, T_CONTROL, controlData_t ); } #define RADIUS 6 @@ -99,267 +99,270 @@ static controlData_p GetcontrolData ( track_p trk ) #define control_SF (3.0) -static void DDrawControl(drawCmd_p d, coOrd orig, DIST_T scaleRatio, +static void DDrawControl(drawCmd_p d, coOrd orig, DIST_T scaleRatio, wDrawColor color ) { - coOrd p1, p2; - - p1 = orig; - DrawFillCircle(d,p1, RADIUS * control_SF / scaleRatio,color); - Translate (&p1, orig, 45, RADIUS * control_SF / scaleRatio); - Translate (&p2, p1, 45, LINE * control_SF / scaleRatio); - DrawLine(d, p1, p2, 2, color); - Translate (&p1, orig, 45+90, RADIUS * control_SF / scaleRatio); - Translate (&p2, p1, 45+90, LINE * control_SF / scaleRatio); - DrawLine(d, p1, p2, 2, color); - Translate (&p1, orig, 45+180, RADIUS * control_SF / scaleRatio); - Translate (&p2, p1, 45+180, LINE * control_SF / scaleRatio); - DrawLine(d, p1, p2, 2, color); - Translate (&p1, orig, 45+270, RADIUS * control_SF / scaleRatio); - Translate (&p2, p1, 45+270, LINE * control_SF / scaleRatio); - DrawLine(d, p1, p2, 2, color); + coOrd p1, p2; + + p1 = orig; + DrawFillCircle(d,p1, RADIUS * control_SF / scaleRatio,color); + Translate (&p1, orig, 45, RADIUS * control_SF / scaleRatio); + Translate (&p2, p1, 45, LINE * control_SF / scaleRatio); + DrawLine(d, p1, p2, 2, color); + Translate (&p1, orig, 45+90, RADIUS * control_SF / scaleRatio); + Translate (&p2, p1, 45+90, LINE * control_SF / scaleRatio); + DrawLine(d, p1, p2, 2, color); + Translate (&p1, orig, 45+180, RADIUS * control_SF / scaleRatio); + Translate (&p2, p1, 45+180, LINE * control_SF / scaleRatio); + DrawLine(d, p1, p2, 2, color); + Translate (&p1, orig, 45+270, RADIUS * control_SF / scaleRatio); + Translate (&p2, p1, 45+270, LINE * control_SF / scaleRatio); + DrawLine(d, p1, p2, 2, color); } static void DrawControl (track_p t, drawCmd_p d, wDrawColor color ) { - controlData_p xx = GetcontrolData(t); - DDrawControl(d,xx->orig,GetScaleRatio(GetTrkScale(t)),color); + controlData_p xx = GetcontrolData(t); + DDrawControl(d,xx->orig,GetScaleRatio(GetTrkScale(t)),color); } -static void ControlBoundingBox (coOrd orig, DIST_T scaleRatio, coOrd *hi, +static void ControlBoundingBox (coOrd orig, DIST_T scaleRatio, coOrd *hi, coOrd *lo) { - coOrd p1, p2; - - p1 = orig; - Translate (&p1, orig, 0, -(RADIUS+LINE) * control_SF / scaleRatio); - Translate (&p2, orig, 0, (RADIUS+LINE) * control_SF / scaleRatio); - *hi = p1; *lo = p1; - if (p2.x > hi->x) hi->x = p2.x; - if (p2.x < lo->x) lo->x = p2.x; - if (p2.y > hi->y) hi->y = p2.y; - if (p2.y < lo->y) lo->y = p2.y; -} + coOrd p1, p2; + + p1 = orig; + Translate (&p1, orig, 0, -(RADIUS+LINE) * control_SF / scaleRatio); + Translate (&p2, orig, 0, (RADIUS+LINE) * control_SF / scaleRatio); + *hi = p1; *lo = p1; + if (p2.x > hi->x) { hi->x = p2.x; } + if (p2.x < lo->x) { lo->x = p2.x; } + if (p2.y > hi->y) { hi->y = p2.y; } + if (p2.y < lo->y) { lo->y = p2.y; } +} static void ComputeControlBoundingBox (track_p t ) { - coOrd lo, hi; - controlData_p xx = GetcontrolData(t); - ControlBoundingBox(xx->orig, GetScaleRatio(GetTrkScale(t)), &hi, &lo); - SetBoundingBox(t, hi, lo); + coOrd lo, hi; + controlData_p xx = GetcontrolData(t); + ControlBoundingBox(xx->orig, GetScaleRatio(GetTrkScale(t)), &hi, &lo); + SetBoundingBox(t, hi, lo); } static DIST_T DistanceControl (track_p t, coOrd * p ) { - controlData_p xx = GetcontrolData(t); - return FindDistance(xx->orig, *p); + controlData_p xx = GetcontrolData(t); + return FindDistance(xx->orig, *p); } static struct { - char name[STR_SHORT_SIZE]; - coOrd pos; - char onscript[STR_LONG_SIZE]; - char offscript[STR_LONG_SIZE]; + char name[STR_SHORT_SIZE]; + coOrd pos; + char onscript[STR_LONG_SIZE]; + char offscript[STR_LONG_SIZE]; } controlProperties; typedef enum { NM, PS, ON, OF } controlDesc_e; static descData_t controlDesc[] = { - /* NM */ { DESC_STRING, N_("Name"), &controlProperties.name, sizeof(controlProperties.name) }, - /* PS */ { DESC_POS, N_("Position"), &controlProperties.pos }, - /* ON */ { DESC_STRING, N_("On Script"), &controlProperties.onscript, sizeof(controlProperties.onscript) }, - /* OF */ { DESC_STRING, N_("Off Script"),&controlProperties.offscript, sizeof(controlProperties.offscript) }, - { DESC_NULL } }; + /* NM */ { DESC_STRING, N_("Name"), &controlProperties.name, sizeof(controlProperties.name) }, + /* PS */ { DESC_POS, N_("Position"), &controlProperties.pos }, + /* ON */ { DESC_STRING, N_("On Script"), &controlProperties.onscript, sizeof(controlProperties.onscript) }, + /* OF */ { DESC_STRING, N_("Off Script"),&controlProperties.offscript, sizeof(controlProperties.offscript) }, + { DESC_NULL } +}; static void UpdateControlProperties ( track_p trk, int inx, descData_p - descUpd, BOOL_T needUndoStart ) + descUpd, BOOL_T needUndoStart ) { - controlData_p xx = GetcontrolData(trk); - const char *thename, *theonscript, *theoffscript; - unsigned int max_str; - char *newName, *newOnScript, *newOffScript; - BOOL_T changed, nChanged, pChanged, onChanged, offChanged; - - switch (inx) { - case NM: - break; - case PS: - break; - case ON: - break; - case OF: - break; - case -1: - changed = nChanged = pChanged = onChanged = offChanged = FALSE; - thename = wStringGetValue( (wString_p) controlDesc[NM].control0 ); - if (strcmp(thename,xx->name) != 0) { - nChanged = changed = TRUE; - max_str = controlDesc[NM].max_string; + controlData_p xx = GetcontrolData(trk); + const char *thename, *theonscript, *theoffscript; + unsigned int max_str; + char *newName, *newOnScript, *newOffScript=NULL; + BOOL_T changed, nChanged, pChanged, onChanged, offChanged; + + switch (inx) { + case NM: + break; + case PS: + break; + case ON: + break; + case OF: + break; + case -1: + changed = nChanged = pChanged = onChanged = offChanged = FALSE; + thename = wStringGetValue( (wString_p) controlDesc[NM].control0 ); + if (strcmp(thename,xx->name) != 0) { + nChanged = changed = TRUE; + max_str = controlDesc[NM].max_string; if (max_str && strlen(thename)>max_str-1) { newName = MyMalloc(max_str); newName[0] = '\0'; strncat(newName,thename,max_str-1); NoticeMessage2(0, MSG_ENTERED_STRING_TRUNCATED, _("Ok"), NULL, max_str-1); - } else newName = MyStrdup(thename); - } + } else { newName = MyStrdup(thename); } + } - theonscript = wStringGetValue( (wString_p) controlDesc[ON].control0 ); - if (strcmp(theonscript,xx->onscript) != 0) { - onChanged = changed = TRUE; - max_str = controlDesc[ON].max_string; + theonscript = wStringGetValue( (wString_p) controlDesc[ON].control0 ); + if (strcmp(theonscript,xx->onscript) != 0) { + onChanged = changed = TRUE; + max_str = controlDesc[ON].max_string; if (max_str && strlen(theonscript)>max_str-1) { newOnScript = MyMalloc(max_str); newOnScript[0] = '\0'; strncat(newOnScript,theonscript,max_str-1); NoticeMessage2(0, MSG_ENTERED_STRING_TRUNCATED, _("Ok"), NULL, max_str-1); - } else newOnScript = MyStrdup(theonscript); - } + } else { newOnScript = MyStrdup(theonscript); } + } - theoffscript = wStringGetValue( (wString_p) controlDesc[OF].control0 ); - if (strcmp(theoffscript,xx->offscript) != 0) { - offChanged = changed = TRUE; - max_str = controlDesc[OF].max_string; + theoffscript = wStringGetValue( (wString_p) controlDesc[OF].control0 ); + if (strcmp(theoffscript,xx->offscript) != 0) { + offChanged = changed = TRUE; + max_str = controlDesc[OF].max_string; if (max_str && strlen(theoffscript)>max_str-1) { newOffScript = MyMalloc(max_str); newOffScript[max_str-1] = '\0'; strncat(newOffScript,theoffscript,max_str-1); NoticeMessage2(0, MSG_ENTERED_STRING_TRUNCATED, _("Ok"), NULL, max_str); - } else newOffScript = MyStrdup(theoffscript); - } - - if (controlProperties.pos.x != xx->orig.x || - controlProperties.pos.y != xx->orig.y) { - pChanged = changed = TRUE; - } - if (!changed) break; - if (needUndoStart) - UndoStart( _("Change Control"), "Change Control" ); - UndoModify( trk ); - if (nChanged) { - MyFree(xx->name); - xx->name = newName; - } - if (pChanged) { - UndrawNewTrack( trk ); - } - if (pChanged) { - xx->orig = controlProperties.pos; - } - if (onChanged) { - MyFree(xx->onscript); - xx->onscript = newOnScript; - } - if (offChanged) { - MyFree(xx->offscript); - xx->offscript = newOffScript; - } - if (pChanged) { - ComputeControlBoundingBox( trk ); - DrawNewTrack( trk ); - } - break; - } + } else { newOffScript = MyStrdup(theoffscript); } + } + + if (controlProperties.pos.x != xx->orig.x || + controlProperties.pos.y != xx->orig.y) { + pChanged = changed = TRUE; + } + if (!changed) { break; } + if (needUndoStart) { + UndoStart( _("Change Control"), "Change Control" ); + } + UndoModify( trk ); + if (nChanged) { + MyFree(xx->name); + xx->name = newName; + } + if (pChanged) { + UndrawNewTrack( trk ); + } + if (pChanged) { + xx->orig = controlProperties.pos; + } + if (onChanged) { + MyFree(xx->onscript); + xx->onscript = newOnScript; + } + if (offChanged) { + MyFree(xx->offscript); + xx->offscript = newOffScript; + } + if (pChanged) { + ComputeControlBoundingBox( trk ); + DrawNewTrack( trk ); + } + break; + } } - + static void DescribeControl (track_p trk, char * str, CSIZE_T len ) { - controlData_p xx = GetcontrolData(trk); - - strcpy( str, _(GetTrkTypeName( trk )) ); - str++; - while (*str) { - *str = tolower((unsigned char)*str); - str++; - } - sprintf( str, _("(%d [%s]): Layer=%u, at %0.3f,%0.3f"), - GetTrkIndex(trk), - xx->name,GetTrkLayer(trk)+1, xx->orig.x, xx->orig.y); - strncpy(controlProperties.name,xx->name,STR_SHORT_SIZE-1); - controlProperties.name[STR_SHORT_SIZE-1] = '\0'; - strncpy(controlProperties.onscript,xx->onscript,STR_LONG_SIZE-1); - controlProperties.onscript[STR_LONG_SIZE-1] = '\0'; - strncpy(controlProperties.offscript,xx->offscript,STR_LONG_SIZE-1); - controlProperties.offscript[STR_LONG_SIZE-1] = '\0'; - controlProperties.pos = xx->orig; - controlDesc[NM].mode = - controlDesc[ON].mode = - controlDesc[OF].mode = DESC_NOREDRAW; - DoDescribe( _("Control"), trk, controlDesc, UpdateControlProperties ); - + controlData_p xx = GetcontrolData(trk); + + strcpy( str, _(GetTrkTypeName( trk )) ); + str++; + while (*str) { + *str = tolower((unsigned char)*str); + str++; + } + sprintf( str, _("(%d [%s]): Layer=%u, at %0.3f,%0.3f"), + GetTrkIndex(trk), + xx->name,GetTrkLayer(trk)+1, xx->orig.x, xx->orig.y); + strncpy(controlProperties.name,xx->name,STR_SHORT_SIZE-1); + controlProperties.name[STR_SHORT_SIZE-1] = '\0'; + strncpy(controlProperties.onscript,xx->onscript,STR_LONG_SIZE-1); + controlProperties.onscript[STR_LONG_SIZE-1] = '\0'; + strncpy(controlProperties.offscript,xx->offscript,STR_LONG_SIZE-1); + controlProperties.offscript[STR_LONG_SIZE-1] = '\0'; + controlProperties.pos = xx->orig; + controlDesc[NM].mode = + controlDesc[ON].mode = + controlDesc[OF].mode = DESC_NOREDRAW; + DoDescribe( _("Control"), trk, controlDesc, UpdateControlProperties ); + } -static void DeleteControl ( track_p trk ) +static void DeleteControl ( track_p trk ) { - controlData_p xx = GetcontrolData(trk); - MyFree(xx->name); xx->name = NULL; - MyFree(xx->onscript); xx->onscript = NULL; - MyFree(xx->offscript); xx->offscript = NULL; + controlData_p xx = GetcontrolData(trk); + MyFree(xx->name); xx->name = NULL; + MyFree(xx->onscript); xx->onscript = NULL; + MyFree(xx->offscript); xx->offscript = NULL; } static BOOL_T WriteControl ( track_p t, FILE * f ) { - BOOL_T rc = TRUE; - controlData_p xx = GetcontrolData(t); + BOOL_T rc = TRUE; + controlData_p xx = GetcontrolData(t); char *controlName = MyStrdup(xx->name); #ifdef UTFCONVERT controlName = Convert2UTF8(controlName); #endif // UTFCONVERT - rc &= fprintf(f, "CONTROL %d %u %s %d %0.6f %0.6f \"%s\" \"%s\" \"%s\"\n", - GetTrkIndex(t), GetTrkLayer(t), GetTrkScaleName(t), - GetTrkVisible(t), xx->orig.x, xx->orig.y, controlName, - xx->onscript, xx->offscript)>0; + rc &= fprintf(f, "CONTROL %d %u %s %d %0.6f %0.6f \"%s\" \"%s\" \"%s\"\n", + GetTrkIndex(t), GetTrkLayer(t), GetTrkScaleName(t), + GetTrkVisible(t), xx->orig.x, xx->orig.y, controlName, + xx->onscript, xx->offscript)>0; MyFree(controlName); - return rc; + return rc; } static BOOL_T ReadControl ( char * line ) { - wIndex_t index; - /*TRKINX_T trkindex;*/ - track_p trk; - /*char * cp = NULL;*/ - char *name; - char *onscript, *offscript; - coOrd orig; - BOOL_T visible; - char scale[10]; - wIndex_t layer; - controlData_p xx; - if (!GetArgs(line+7,"dLsdpqqq",&index,&layer,scale, &visible, &orig,&name,&onscript,&offscript)) { - return FALSE; - } + wIndex_t index; + /*TRKINX_T trkindex;*/ + track_p trk; + /*char * cp = NULL;*/ + char *name; + char *onscript, *offscript; + coOrd orig; + BOOL_T visible; + char scale[10]; + wIndex_t layer; + controlData_p xx; + if (!GetArgs(line+7,"dLsdpqqq",&index,&layer,scale, &visible, &orig,&name, + &onscript,&offscript)) { + return FALSE; + } #ifdef UTFCONVERT ConvertUTF8ToSystem(name); #endif // UTFCONVERT - trk = NewTrack(index, T_CONTROL, 0, sizeof(controlData_t)); - SetTrkVisible(trk, visible); - SetTrkScale(trk, LookupScale( scale )); - SetTrkLayer(trk, layer); - xx = GetcontrolData ( trk ); - xx->name = name; - xx->orig = orig; - xx->onscript = onscript; - xx->offscript = offscript; - ComputeControlBoundingBox(trk); - return TRUE; + trk = NewTrack(index, T_CONTROL, 0, sizeof(controlData_t)); + SetTrkVisible(trk, visible); + SetTrkScale(trk, LookupScale( scale )); + SetTrkLayer(trk, layer); + xx = GetcontrolData ( trk ); + xx->name = name; + xx->orig = orig; + xx->onscript = onscript; + xx->offscript = offscript; + ComputeControlBoundingBox(trk); + return TRUE; } static void MoveControl (track_p trk, coOrd orig ) { - controlData_p xx = GetcontrolData ( trk ); - xx->orig.x += orig.x; - xx->orig.y += orig.y; - ComputeControlBoundingBox(trk); + controlData_p xx = GetcontrolData ( trk ); + xx->orig.x += orig.x; + xx->orig.y += orig.y; + ComputeControlBoundingBox(trk); } static void RotateControl (track_p trk, coOrd orig, ANGLE_T angle ) @@ -370,44 +373,44 @@ static void RescaleControl (track_p trk, FLOAT_T ratio ) { } -static void FlipControl (track_p trk, coOrd orig, ANGLE_T angle ) +static void FlipControl (track_p trk, coOrd orig, ANGLE_T angle ) { - controlData_p xx = GetcontrolData ( trk ); - FlipPoint(&(xx->orig), orig, angle); - ComputeControlBoundingBox(trk); + controlData_p xx = GetcontrolData ( trk ); + FlipPoint(&(xx->orig), orig, angle); + ComputeControlBoundingBox(trk); } static trackCmd_t controlCmds = { - "CONTROL", - DrawControl, - DistanceControl, - DescribeControl, - DeleteControl, - WriteControl, - ReadControl, - MoveControl, - RotateControl, - RescaleControl, - NULL, /* audit */ - NULL, /* getAngle */ - NULL, /* split */ - NULL, /* traverse */ - NULL, /* enumerate */ - NULL, /* redraw */ - NULL, /* trim */ - NULL, /* merge */ - NULL, /* modify */ - NULL, /* getLength */ - NULL, /* getTrkParams */ - NULL, /* moveEndPt */ - NULL, /* query */ - NULL, /* ungroup */ - FlipControl, /* flip */ - NULL, /* drawPositionIndicator */ - NULL, /* advancePositionIndicator */ - NULL, /* checkTraverse */ - NULL, /* makeParallel */ - NULL /* drawDesc */ + "CONTROL", + DrawControl, + DistanceControl, + DescribeControl, + DeleteControl, + WriteControl, + ReadControl, + MoveControl, + RotateControl, + RescaleControl, + NULL, /* audit */ + NULL, /* getAngle */ + NULL, /* split */ + NULL, /* traverse */ + NULL, /* enumerate */ + NULL, /* redraw */ + NULL, /* trim */ + NULL, /* merge */ + NULL, /* modify */ + NULL, /* getLength */ + NULL, /* getTrkParams */ + NULL, /* moveEndPt */ + NULL, /* query */ + NULL, /* ungroup */ + FlipControl, /* flip */ + NULL, /* drawPositionIndicator */ + NULL, /* advancePositionIndicator */ + NULL, /* checkTraverse */ + NULL, /* makeParallel */ + NULL /* drawDesc */ }; static coOrd controlEditOrig; @@ -419,15 +422,15 @@ static char controlEditOffScript[STR_LONG_SIZE]; static paramFloatRange_t r_1000_1000 = { -1000.0, 1000.0, 80 }; static paramData_t controlEditPLs[] = { #define I_CONTROLNAME (0) - /*0*/ { PD_STRING, controlEditName, "name", PDO_NOPREF | PDO_NOTBLANK, I2VP(200), N_("Name"), 0, 0, sizeof(controlEditName) }, + /*0*/ { PD_STRING, controlEditName, "name", PDO_NOPREF | PDO_NOTBLANK, I2VP(200), N_("Name"), 0, 0, sizeof(controlEditName) }, #define I_ORIGX (1) - /*1*/ { PD_FLOAT, &controlEditOrig.x, "origx", PDO_DIM, &r_1000_1000, N_("Origin X") }, + /*1*/ { PD_FLOAT, &controlEditOrig.x, "origx", PDO_DIM, &r_1000_1000, N_("Origin X") }, #define I_ORIGY (2) - /*2*/ { PD_FLOAT, &controlEditOrig.y, "origy", PDO_DIM, &r_1000_1000, N_("Origin Y") }, + /*2*/ { PD_FLOAT, &controlEditOrig.y, "origy", PDO_DIM, &r_1000_1000, N_("Origin Y") }, #define I_CONTROLONSCRIPT (3) - /*3*/ { PD_STRING, controlEditOnScript, "script", PDO_NOPREF, I2VP(350), N_("On Script"), 0, 0, sizeof(controlEditOnScript)}, + /*3*/ { PD_STRING, controlEditOnScript, "script", PDO_NOPREF, I2VP(350), N_("On Script"), 0, 0, sizeof(controlEditOnScript)}, #define I_CONTROLOFFSCRIPT (4) - /*4*/ { PD_STRING, controlEditOffScript, "script", PDO_NOPREF, I2VP(350), N_("Off Script"), 0, 0, sizeof(controlEditOffScript)}, + /*4*/ { PD_STRING, controlEditOffScript, "script", PDO_NOPREF, I2VP(350), N_("Off Script"), 0, 0, sizeof(controlEditOffScript)}, }; static paramGroup_t controlEditPG = { "controlEdit", 0, controlEditPLs, COUNT( controlEditPLs ) }; @@ -435,115 +438,120 @@ static wWin_p controlEditW; static void ControlEditOk ( void * junk ) { - track_p trk; - controlData_p xx; - - if (controlEditTrack == NULL) { - UndoStart( _("Create Control"), "Create Control"); - trk = NewTrack(0, T_CONTROL, 0, sizeof(controlData_t)); - } else { - UndoStart( _("Modify Control"), "Modify Control"); - trk = controlEditTrack; - } - xx = GetcontrolData(trk); - xx->orig = controlEditOrig; - if ( xx->name == NULL || strncmp (xx->name, controlEditName, STR_SHORT_SIZE) != 0) { - MyFree(xx->name); - xx->name = MyStrdup(controlEditName); - } - if ( xx->onscript == NULL || strncmp (xx->onscript, controlEditOnScript, STR_LONG_SIZE) != 0) { - MyFree(xx->onscript); - xx->onscript = MyStrdup(controlEditOnScript); - } - if ( xx->offscript == NULL || strncmp (xx->offscript, controlEditOffScript, STR_LONG_SIZE) != 0) { - MyFree(xx->offscript); - xx->offscript = MyStrdup(controlEditOffScript); - } - UndoEnd(); - ComputeControlBoundingBox(trk); - DoRedraw(); - wHide( controlEditW ); + track_p trk; + controlData_p xx; + + if (controlEditTrack == NULL) { + UndoStart( _("Create Control"), "Create Control"); + trk = NewTrack(0, T_CONTROL, 0, sizeof(controlData_t)); + } else { + UndoStart( _("Modify Control"), "Modify Control"); + trk = controlEditTrack; + } + xx = GetcontrolData(trk); + xx->orig = controlEditOrig; + if ( xx->name == NULL + || strncmp (xx->name, controlEditName, STR_SHORT_SIZE) != 0) { + MyFree(xx->name); + xx->name = MyStrdup(controlEditName); + } + if ( xx->onscript == NULL + || strncmp (xx->onscript, controlEditOnScript, STR_LONG_SIZE) != 0) { + MyFree(xx->onscript); + xx->onscript = MyStrdup(controlEditOnScript); + } + if ( xx->offscript == NULL + || strncmp (xx->offscript, controlEditOffScript, STR_LONG_SIZE) != 0) { + MyFree(xx->offscript); + xx->offscript = MyStrdup(controlEditOffScript); + } + UndoEnd(); + ComputeControlBoundingBox(trk); + DoRedraw(); + wHide( controlEditW ); } #if 0 static void ControlEditCancel ( wWin_p junk ) { - wHide( controlEditW ); + wHide( controlEditW ); } #endif static void EditControlDialog() { - controlData_p xx; - - if ( !controlEditW ) { - ParamRegister( &controlEditPG ); - controlEditW = ParamCreateDialog (&controlEditPG, - MakeWindowTitle(_("Edit control")), - _("Ok"), ControlEditOk, - wHide, TRUE, NULL, - F_BLOCK, - NULL ); - } - if (controlEditTrack == NULL) { - controlEditName[0] = '\0'; - controlEditOnScript[0] = '\0'; - controlEditOffScript[0] = '\0'; - } else { - xx = GetcontrolData ( controlEditTrack ); - strncpy(controlEditName,xx->name,STR_SHORT_SIZE); - strncpy(controlEditOnScript,xx->onscript,STR_LONG_SIZE); - strncpy(controlEditOffScript,xx->offscript,STR_LONG_SIZE); - controlEditOrig = xx->orig; - } - ParamLoadControls( &controlEditPG ); - wShow( controlEditW ); + controlData_p xx; + + if ( !controlEditW ) { + ParamRegister( &controlEditPG ); + controlEditW = ParamCreateDialog (&controlEditPG, + MakeWindowTitle(_("Edit control")), + _("Ok"), ControlEditOk, + wHide, TRUE, NULL, + F_BLOCK, + NULL ); + } + if (controlEditTrack == NULL) { + controlEditName[0] = '\0'; + controlEditOnScript[0] = '\0'; + controlEditOffScript[0] = '\0'; + } else { + xx = GetcontrolData ( controlEditTrack ); + strncpy(controlEditName,xx->name,STR_SHORT_SIZE-1); + strncpy(controlEditOnScript,xx->onscript,STR_LONG_SIZE-1); + strncpy(controlEditOffScript,xx->offscript,STR_LONG_SIZE-1); + controlEditOrig = xx->orig; + } + ParamLoadControls( &controlEditPG ); + wShow( controlEditW ); } static void EditControl (track_p trk) { - controlEditTrack = trk; - EditControlDialog(); + controlEditTrack = trk; + EditControlDialog(); } static void CreateNewControl (coOrd orig) { - controlEditOrig = orig; - controlEditTrack = NULL; - EditControlDialog(); + controlEditOrig = orig; + controlEditTrack = NULL; + EditControlDialog(); } static STATUS_T CmdControl ( wAction_t action, coOrd pos ) { - - static coOrd control_pos; - static BOOL_T create; - switch (action) { - case C_START: - InfoMessage(_("Place control")); - SetAllTrackSelect( FALSE ); - create = FALSE; - return C_CONTINUE; - case C_DOWN: - create = TRUE; - /* no break */ + + static coOrd control_pos; + static BOOL_T create; + switch (action) { + case C_START: + InfoMessage(_("Place control")); + SetAllTrackSelect( FALSE ); + create = FALSE; + return C_CONTINUE; + case C_DOWN: + create = TRUE; + /* no break */ case C_MOVE: SnapPos(&pos); control_pos = pos; - return C_CONTINUE; - case C_UP: - SnapPos(&pos); - CreateNewControl(pos); - return C_TERMINATE; - case C_REDRAW: - if (create) - DDrawControl( &tempD, control_pos, GetScaleRatio(GetLayoutCurScale()), wDrawColorBlack ); - return C_CONTINUE; - case C_CANCEL: - return C_CONTINUE; - default: - return C_CONTINUE; - } + return C_CONTINUE; + case C_UP: + SnapPos(&pos); + CreateNewControl(pos); + return C_TERMINATE; + case C_REDRAW: + if (create) { + DDrawControl( &tempD, control_pos, GetScaleRatio(GetLayoutCurScale()), + wDrawColorBlack ); + } + return C_CONTINUE; + case C_CANCEL: + return C_CONTINUE; + default: + return C_CONTINUE; + } } static coOrd ctlhiliteOrig, ctlhiliteSize; @@ -551,92 +559,95 @@ static POS_T ctlhiliteBorder; static wDrawColor ctlhiliteColor = 0; static void DrawControlTrackHilite( void ) { - if (ctlhiliteColor==0) + if (ctlhiliteColor==0) { ctlhiliteColor = wDrawColorGray(87); - DrawRectangle( &tempD, ctlhiliteOrig, ctlhiliteSize, ctlhiliteColor, DRAW_TRANSPARENT ); + } + DrawRectangle( &tempD, ctlhiliteOrig, ctlhiliteSize, ctlhiliteColor, + DRAW_TRANSPARENT ); } static int ControlMgmProc ( int cmd, void * data ) { - track_p trk = (track_p) data; - controlData_p xx = GetcontrolData(trk); - /*char msg[STR_SIZE];*/ - - switch ( cmd ) { - case CONTMGM_CAN_EDIT: - return TRUE; - break; - case CONTMGM_DO_EDIT: - EditControl(trk); - return TRUE; - break; - case CONTMGM_CAN_DELETE: - return TRUE; - break; - case CONTMGM_DO_DELETE: - DeleteTrack(trk, FALSE); - return TRUE; - break; - case CONTMGM_DO_HILIGHT: - if (!xx->IsHilite) { - ctlhiliteBorder = mainD.scale*0.1; - if ( ctlhiliteBorder < trackGauge ) ctlhiliteBorder = trackGauge; - GetBoundingBox( trk, &ctlhiliteSize, &ctlhiliteOrig ); - ctlhiliteOrig.x -= ctlhiliteBorder; - ctlhiliteOrig.y -= ctlhiliteBorder; - ctlhiliteSize.x -= ctlhiliteOrig.x-ctlhiliteBorder; - ctlhiliteSize.y -= ctlhiliteOrig.y-ctlhiliteBorder; - DrawControlTrackHilite(); - xx->IsHilite = TRUE; - } - break; - case CONTMGM_UN_HILIGHT: - if (xx->IsHilite) { - ctlhiliteBorder = mainD.scale*0.1; - if ( ctlhiliteBorder < trackGauge ) ctlhiliteBorder = trackGauge; - GetBoundingBox( trk, &ctlhiliteSize, &ctlhiliteOrig ); - ctlhiliteOrig.x -= ctlhiliteBorder; - ctlhiliteOrig.y -= ctlhiliteBorder; - ctlhiliteSize.x -= ctlhiliteOrig.x-ctlhiliteBorder; - ctlhiliteSize.y -= ctlhiliteOrig.y-ctlhiliteBorder; - DrawControlTrackHilite(); - xx->IsHilite = FALSE; - } - break; - case CONTMGM_GET_TITLE: - sprintf(message,"\t%s\t",xx->name); - break; - } - return FALSE; + track_p trk = (track_p) data; + controlData_p xx = GetcontrolData(trk); + /*char msg[STR_SIZE];*/ + + switch ( cmd ) { + case CONTMGM_CAN_EDIT: + return TRUE; + break; + case CONTMGM_DO_EDIT: + EditControl(trk); + return TRUE; + break; + case CONTMGM_CAN_DELETE: + return TRUE; + break; + case CONTMGM_DO_DELETE: + DeleteTrack(trk, FALSE); + return TRUE; + break; + case CONTMGM_DO_HILIGHT: + if (!xx->IsHilite) { + ctlhiliteBorder = mainD.scale*0.1; + if ( ctlhiliteBorder < trackGauge ) { ctlhiliteBorder = trackGauge; } + GetBoundingBox( trk, &ctlhiliteSize, &ctlhiliteOrig ); + ctlhiliteOrig.x -= ctlhiliteBorder; + ctlhiliteOrig.y -= ctlhiliteBorder; + ctlhiliteSize.x -= ctlhiliteOrig.x-ctlhiliteBorder; + ctlhiliteSize.y -= ctlhiliteOrig.y-ctlhiliteBorder; + DrawControlTrackHilite(); + xx->IsHilite = TRUE; + } + break; + case CONTMGM_UN_HILIGHT: + if (xx->IsHilite) { + ctlhiliteBorder = mainD.scale*0.1; + if ( ctlhiliteBorder < trackGauge ) { ctlhiliteBorder = trackGauge; } + GetBoundingBox( trk, &ctlhiliteSize, &ctlhiliteOrig ); + ctlhiliteOrig.x -= ctlhiliteBorder; + ctlhiliteOrig.y -= ctlhiliteBorder; + ctlhiliteSize.x -= ctlhiliteOrig.x-ctlhiliteBorder; + ctlhiliteSize.y -= ctlhiliteOrig.y-ctlhiliteBorder; + DrawControlTrackHilite(); + xx->IsHilite = FALSE; + } + break; + case CONTMGM_GET_TITLE: + sprintf(message,"\t%s\t",xx->name); + break; + } + return FALSE; } -#include "bitmaps/control.xpm" +#include "bitmaps/control.xpm3" EXPORT void ControlMgmLoad ( void ) { - track_p trk; - static wIcon_p controlI = NULL; - - if (controlI == NULL) { - controlI = wIconCreatePixMap( control_xpm[iconSize] ); - } - - TRK_ITERATE(trk) { - if (GetTrkType(trk) != T_CONTROL) continue; - ContMgmLoad (controlI, ControlMgmProc, trk ); - } + track_p trk; + static wIcon_p controlI = NULL; + + if (controlI == NULL) { + controlI = wIconCreatePixMap( control_xpm3[iconSize] ); + } + + TRK_ITERATE(trk) { + if (GetTrkType(trk) != T_CONTROL) { continue; } + ContMgmLoad (controlI, ControlMgmProc, trk ); + } } #define ACCL_CONTROL 0 EXPORT void InitCmdControl ( wMenu_p menu ) { - AddMenuButton( menu, CmdControl, "cmdControl", _("Control"), - wIconCreatePixMap( control_xpm[iconSize] ), LEVEL0_50, IC_STICKY|IC_POPUP2, ACCL_CONTROL, NULL ); + AddMenuButton( menu, CmdControl, "cmdControl", _("Control"), + wIconCreatePixMap( control_xpm3[iconSize] ), LEVEL0_50, IC_STICKY|IC_POPUP2, + ACCL_CONTROL, NULL ); } EXPORT void InitTrkControl ( void ) { - T_CONTROL = InitObject ( &controlCmds ); - log_control = LogFindIndex ( "control" ); + T_CONTROL = InitObject ( &controlCmds ); + log_control = LogFindIndex ( "control" ); } diff --git a/app/bin/ccornu.c b/app/bin/ccornu.c index f447d64..9e721d8 100644 --- a/app/bin/ccornu.c +++ b/app/bin/ccornu.c @@ -63,7 +63,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -87,9 +87,6 @@ #include "fileio.h" #include "common-ui.h" -extern drawCmd_t tempD; -extern TRKTYP_T T_BEZIER; -extern TRKTYP_T T_CORNU; typedef struct { coOrd end_center; @@ -106,66 +103,67 @@ typedef struct { * STATE INFO */ enum Cornu_States { NONE, - POS_1, - LOC_2, - POS_2, - PICK_POINT, - POINT_PICKED, - TRACK_SELECTED }; + POS_1, + LOC_2, + POS_2, + PICK_POINT, + POINT_PICKED, + TRACK_SELECTED + }; typedef enum {CORNU_MODIFY, CORNU_CREATE} cornuCmdType_e; static struct { - enum Cornu_States state; - coOrd pos[2]; - int number_of_points; - int selectEndPoint; - int selectMidPoint; - int selectEndHandle; - int prevSelected; - int prevEndPoint; - DIST_T width; - track_p trk[2]; - EPINX_T ep[2]; - DIST_T radius[2]; - ANGLE_T angle[2]; - ANGLE_T arcA0[2]; - ANGLE_T arcA1[2]; - coOrd center[2]; - curveType_e trackType[2]; - - BOOL_T extend[2]; - trkSeg_t extendSeg[2]; - - trkSeg_t ep1Segs[11]; - int ep1Segs_da_cnt; - trkSeg_t ep2Segs[11]; - int ep2Segs_da_cnt; - dynArr_t crvSegs_da; - int crvSegs_da_cnt; - trkSeg_t trk1Seg; - trkSeg_t trk2Seg; - track_p selectTrack; - DIST_T minRadius; - BOOL_T circleorHelix[2]; - DIST_T trackGauge; - - int cmdType; - - dynArr_t midSegs; - - dynArr_t mid_points; - dynArr_t tracks; - BOOL_T ends[2]; - - endHandle endHandle[2]; - - bezctx * bezc; - - cornuCmdType_e commandType; - - } Da; + enum Cornu_States state; + coOrd pos[4]; + int number_of_points; + int selectEndPoint; + int selectMidPoint; + int selectEndHandle; + int prevSelected; + int prevEndPoint; + LWIDTH_T lineWidth; + track_p trk[2]; + EPINX_T ep[2]; + DIST_T radius[2]; + ANGLE_T angle[2]; + ANGLE_T arcA0[2]; + ANGLE_T arcA1[2]; + coOrd center[2]; + curveType_e trackType[2]; + + BOOL_T extend[2]; + trkSeg_t extendSeg[2]; + + trkSeg_t ep1Segs[11]; + int ep1Segs_da_cnt; + trkSeg_t ep2Segs[11]; + int ep2Segs_da_cnt; + dynArr_t crvSegs_da; + int crvSegs_da_cnt; + trkSeg_t trk1Seg; + trkSeg_t trk2Seg; + track_p selectTrack; + DIST_T minRadius; + BOOL_T circleorHelix[2]; + DIST_T trackGauge; + + int cmdType; + + dynArr_t midSegs; + + dynArr_t mid_points; + dynArr_t tracks; + BOOL_T ends[2]; + + endHandle endHandle[2]; + + bezctx * bezc; + + cornuCmdType_e commandType; + +} Da; static trkSeg_p curCornu; static wIndex_t cornuHotBarCmdInx; @@ -179,10 +177,10 @@ static struct { static char * CmdCornuHotBarProc( - hotBarProc_e op, - void * data, - drawCmd_p d, - coOrd * origP ) + hotBarProc_e op, + void * data, + drawCmd_p d, + coOrd * origP ) { trkSeg_p trkseg = &hotB.st; switch ( op ) { @@ -259,15 +257,16 @@ EXPORT void AddHotBarCornu( void ) //end.y = 21.25; hotB.count = 3; //hotB.st.u.l.pos[1] = end; - AddHotBarElement( label, end, zero, TRUE, TRUE, curBarScale>0?curBarScale:-1, &hotB, CmdCornuHotBarProc ); + AddHotBarElement( label, end, zero, TRUE, TRUE, curBarScale>0?curBarScale:-1, + &hotB, CmdCornuHotBarProc ); } int createMidPoint(dynArr_t * ap, - coOrd pos0, //end on curve - BOOL_T point_selected, - BOOL_T point_selectable, - BOOL_T track_modifyable - ) + coOrd pos0, //end on curve + BOOL_T point_selected, + BOOL_T point_selectable, + BOOL_T track_modifyable + ) { DIST_T d, w; d = tempD.scale*0.25; @@ -282,7 +281,7 @@ int createMidPoint(dynArr_t * ap, sp->u.c.a1 = 360.0; sp->u.c.radius = d/2; sp->type = point_selected?SEG_FILCRCL:SEG_CRVLIN; - sp->width = w; + sp->lineWidth = w; sp->color = drawColorBlack; return 1; @@ -295,87 +294,97 @@ int createMidPoint(dynArr_t * ap, * A Cornu end Point has a filled circle surrounded by another circle for endpoint */ int createEndPoint( - trkSeg_t sp[], //seg pointer for up to 2 trkSegs (ends and line) - coOrd pos0, //end on curve - BOOL_T point_selected, - BOOL_T point_selectable, - BOOL_T track_modifyable, - BOOL_T track_present, - ANGLE_T angle, - DIST_T radius, - coOrd centert, - endHandle * endHandle - ) + trkSeg_t sp[], //seg pointer for up to 2 trkSegs (ends and line) + coOrd pos0, //end on curve + BOOL_T point_selected, + BOOL_T point_selectable, + BOOL_T track_modifyable, + BOOL_T track_present, + ANGLE_T angle, + DIST_T radius, + coOrd centert, + endHandle * endHandle +) { - DIST_T d, w; - int num =0; - d = tempD.scale*0.25; - w = tempD.scale/tempD.dpi; /*double width*/ - num = 1; - if (point_selectable) { + DIST_T d, w; + int num =0; + d = tempD.scale*0.25; + w = tempD.scale/tempD.dpi; /*double width*/ + num = 1; + if (point_selectable) { sp[1].u.c.center = pos0; sp[1].u.c.a0 = 0.0; sp[1].u.c.a1 = 360.0; sp[1].u.c.radius = d/2; sp[1].type = SEG_CRVLIN; - sp[1].width = w; + sp[1].lineWidth = w; sp[1].color = point_selected?drawColorBlue:drawColorRed; num = 2; - } - sp[0].u.c.center = pos0; - sp[0].u.c.a0 = 0.0; - sp[0].u.c.a1 = 360.0; - sp[0].width = w; - sp[0].u.c.radius = d/4; - sp[0].color = point_selected?drawColorBlue:drawColorRed; - if (track_modifyable) - sp[0].type = SEG_CRVLIN; - else - sp[0].type = SEG_FILCRCL; - if (!track_present && endHandle ) { - endHandle->end_center = zero; - endHandle->end_curve = zero; - endHandle->end_valid = TRUE; - endHandle->mid_disp = 0.0; - DIST_T end_length = tempD.scale*2.0; - Translate(&endHandle->end_curve,pos0,angle,end_length); - Translate(&endHandle->end_center,pos0,angle,end_length/2); - if (radius>0.0) { - ANGLE_T a1 = R2D(end_length/radius); - if (DifferenceBetweenAngles(angle,FindAngle(centert,pos0))>0.0) { - a1 = -a1; - } - PointOnCircle( &endHandle->end_curve, centert,radius,NormalizeAngle(FindAngle(centert,pos0)+a1)); - PointOnCircle( &endHandle->end_center,centert,radius,NormalizeAngle(FindAngle(centert,pos0)+(a1/2.0))); + } + sp[0].u.c.center = pos0; + sp[0].u.c.a0 = 0.0; + sp[0].u.c.a1 = 360.0; + sp[0].lineWidth = w; + sp[0].u.c.radius = d/4; + sp[0].color = point_selected?drawColorBlue:drawColorRed; + if (track_modifyable) { + sp[0].type = SEG_CRVLIN; + } else { + sp[0].type = SEG_FILCRCL; + } + if (!track_present && endHandle ) { + endHandle->end_center = zero; + endHandle->end_curve = zero; + endHandle->end_valid = TRUE; + endHandle->mid_disp = 0.0; + DIST_T end_length = tempD.scale*2.0; + Translate(&endHandle->end_curve,pos0,angle,end_length); + Translate(&endHandle->end_center,pos0,angle,end_length/2); + if (radius>0.0) { + ANGLE_T a1 = R2D(end_length/radius); + if (DifferenceBetweenAngles(angle,FindAngle(centert,pos0))>0.0) { + a1 = -a1; + } + PointOnCircle( &endHandle->end_curve, centert,radius, + NormalizeAngle(FindAngle(centert,pos0)+a1)); + PointOnCircle( &endHandle->end_center,centert,radius, + NormalizeAngle(FindAngle(centert,pos0)+(a1/2.0))); coOrd cm; cm = endHandle->end_center; ANGLE_T a = FindAngle(endHandle->end_curve,pos0); Rotate(&cm,endHandle->end_curve,-a ); endHandle->mid_disp = cm.x-endHandle->end_curve.x; curveData_t curveData; - PlotCurve(crvCmdFromCenter,pos0,endHandle->end_center, endHandle->end_curve, &curveData, FALSE, 0.0); + PlotCurve(crvCmdFromCenter,pos0,endHandle->end_center, endHandle->end_curve, + &curveData, FALSE, 0.0); if (curveData.type == curveTypeStraight) { coOrd pos_line[2]; - Translate(&pos_line[0],pos0,FindAngle(pos0,endHandle->end_curve)+90,trackGauge/2); - Translate(&pos_line[1],endHandle->end_curve,FindAngle(pos0,endHandle->end_curve)+90,trackGauge/2); + Translate(&pos_line[0],pos0,FindAngle(pos0,endHandle->end_curve)+90, + trackGauge/2); + Translate(&pos_line[1],endHandle->end_curve,FindAngle(pos0, + endHandle->end_curve)+90,trackGauge/2); sp[num].type = SEG_STRLIN; - sp[num].width = w; + sp[num].lineWidth = w; sp[num].u.l.pos[0] = pos_line[0]; sp[num].u.l.pos[1] = pos_line[1]; - sp[num].color = (endHandle->last_selected||endHandle->radius_selected)?drawColorBlue:drawColorRed; + sp[num].color = (endHandle->last_selected + ||endHandle->radius_selected)?drawColorBlue:drawColorRed; num++; - Translate(&pos_line[0],pos0,FindAngle(pos0,endHandle->end_curve)-90,trackGauge/2); - Translate(&pos_line[1],endHandle->end_curve,FindAngle(pos0,endHandle->end_curve)-90,trackGauge/2); + Translate(&pos_line[0],pos0,FindAngle(pos0,endHandle->end_curve)-90, + trackGauge/2); + Translate(&pos_line[1],endHandle->end_curve,FindAngle(pos0, + endHandle->end_curve)-90,trackGauge/2); sp[num].type = SEG_STRLIN; - sp[num].width = w; + sp[num].lineWidth = w; sp[num].u.l.pos[0] = pos_line[0]; sp[num].u.l.pos[1] = pos_line[1]; - sp[num].color = (endHandle->last_selected||endHandle->radius_selected)?drawColorBlue:drawColorRed; + sp[num].color = (endHandle->last_selected + ||endHandle->radius_selected)?drawColorBlue:drawColorRed; num++; pos_line[0]= pos0; Translate(&pos_line[1],pos0,-FindAngle(pos0,endHandle->end_curve),end_length); sp[num].type = SEG_STRLIN; - sp[num].width = w; + sp[num].lineWidth = w; sp[num].u.l.pos[0] = pos_line[0]; sp[num].u.l.pos[1] = pos_line[1]; sp[num].color = drawColorRed; @@ -384,7 +393,7 @@ int createEndPoint( DIST_T pos_rad; pos_rad = radius+trackGauge/2; sp[num].type = SEG_CRVLIN; - sp[num].width = w; + sp[num].lineWidth = w; sp[num].u.c.center = centert; sp[num].u.c.radius = pos_rad; ANGLE_T an0 = FindAngle(centert,pos0); @@ -397,43 +406,51 @@ int createEndPoint( sp[num].u.c.a0 = an1; } endHandle->arc_angle = sp[num].u.c.a1; - sp[num].color = (endHandle->last_selected||endHandle->radius_selected)?drawColorBlue:drawColorRed; + sp[num].color = (endHandle->last_selected + ||endHandle->radius_selected)?drawColorBlue:drawColorRed; num++; pos_rad = radius-trackGauge/2; sp[num].type = SEG_CRVLIN; - sp[num].width = w; + sp[num].lineWidth = w; sp[num].u.c.center = centert; sp[num].u.c.radius = pos_rad; sp[num].u.c.a1 = sp[num-1].u.c.a1; sp[num].u.c.a0 = sp[num-1].u.c.a0; - sp[num].color = (endHandle->last_selected||endHandle->radius_selected)?drawColorBlue:drawColorRed; + sp[num].color = (endHandle->last_selected + ||endHandle->radius_selected)?drawColorBlue:drawColorRed; num++; } - } else { - coOrd pos_line[2]; - Translate(&pos_line[0],pos0,FindAngle(pos0,endHandle->end_curve)+90,trackGauge/2); - Translate(&pos_line[1],endHandle->end_curve,FindAngle(pos0,endHandle->end_curve)+90,trackGauge/2); - sp[num].type = SEG_STRLIN; - sp[num].width = w; + } else { + coOrd pos_line[2]; + Translate(&pos_line[0],pos0,FindAngle(pos0,endHandle->end_curve)+90, + trackGauge/2); + Translate(&pos_line[1],endHandle->end_curve,FindAngle(pos0, + endHandle->end_curve)+90,trackGauge/2); + sp[num].type = SEG_STRLIN; + sp[num].lineWidth = w; sp[num].u.l.pos[0] = pos_line[0]; sp[num].u.l.pos[1] = pos_line[1]; - sp[num].color = (endHandle->last_selected||endHandle->radius_selected)?drawColorBlue:drawColorRed; + sp[num].color = (endHandle->last_selected + ||endHandle->radius_selected)?drawColorBlue:drawColorRed; num++; - Translate(&pos_line[0],pos0,FindAngle(pos0,endHandle->end_curve)-90,trackGauge/2); - Translate(&pos_line[1],endHandle->end_curve,FindAngle(pos0,endHandle->end_curve)-90,trackGauge/2); + Translate(&pos_line[0],pos0,FindAngle(pos0,endHandle->end_curve)-90, + trackGauge/2); + Translate(&pos_line[1],endHandle->end_curve,FindAngle(pos0, + endHandle->end_curve)-90,trackGauge/2); sp[num].type = SEG_STRLIN; - sp[num].width = w; + sp[num].lineWidth = w; sp[num].u.l.pos[0] = pos_line[0]; sp[num].u.l.pos[1] = pos_line[1]; - sp[num].color = (endHandle->last_selected||endHandle->radius_selected)?drawColorBlue:drawColorRed; + sp[num].color = (endHandle->last_selected + ||endHandle->radius_selected)?drawColorBlue:drawColorRed; num++; - } - coOrd pos_line[2]; - pos_line[0]= pos0; + } + coOrd pos_line[2]; + pos_line[0]= pos0; Translate(&pos_line[1],pos0,angle+180,end_length); sp[num].type = SEG_STRLIN; - sp[num].width = w; + sp[num].lineWidth = w; sp[num].u.l.pos[0] = pos_line[0]; sp[num].u.l.pos[1] = pos_line[1]; sp[num].color = drawColorRed; @@ -442,25 +459,30 @@ int createEndPoint( sp[num].u.c.center = endHandle->end_curve; sp[num].u.c.a0 = 0.0; sp[num].u.c.a1 = 360.0; - sp[num].width = w; + sp[num].lineWidth = w; sp[num].u.c.radius = d/4; sp[num].color = endHandle->angle_selected?drawColorBlue:drawColorRed; num++; - if (radius<=0.0) - DrawArrowHeads(&sp[num],endHandle->end_center,angle+90.0,TRUE,endHandle->radius_selected?drawColorBlue:drawColorRed); - else - DrawArrowHeads(&sp[num],endHandle->end_center,FindAngle(centert,endHandle->end_center),TRUE,endHandle->radius_selected?drawColorBlue:drawColorRed); + if (radius<=0.0) { + DrawArrowHeads(&sp[num],endHandle->end_center,angle+90.0,TRUE, + endHandle->radius_selected?drawColorBlue:drawColorRed); + } else { + DrawArrowHeads(&sp[num],endHandle->end_center,FindAngle(centert, + endHandle->end_center),TRUE, + endHandle->radius_selected?drawColorBlue:drawColorRed); + } num=num+5; - } else if (endHandle) { - endHandle->end_valid=FALSE; - } - return num; + } else if (endHandle) { + endHandle->end_valid=FALSE; + } + return num; } static dynArr_t anchors_da; #define anchors(N) DYNARR_N(trkSeg_t,anchors_da,N) -static void CreateCornuEndAnchor(coOrd p, wBool_t lock) { +static void CreateCornuEndAnchor(coOrd p, wBool_t lock) +{ DIST_T d = tempD.scale*0.15; DYNARR_APPEND(trkSeg_t,anchors_da,1); @@ -471,7 +493,7 @@ static void CreateCornuEndAnchor(coOrd p, wBool_t lock) { anchors(i).u.c.radius = d/2; anchors(i).u.c.a0 = 0.0; anchors(i).u.c.a1 = 360.0; - anchors(i).width = 0; + anchors(i).lineWidth = 0; DYNARR_APPEND(trkSeg_t,anchors_da,1); i = anchors_da.cnt-1; anchors(i).type = SEG_CRVLIN; @@ -480,15 +502,18 @@ static void CreateCornuEndAnchor(coOrd p, wBool_t lock) { anchors(i).u.c.radius = d; anchors(i).u.c.a0 = 0.0; anchors(i).u.c.a1 = 360.0; - anchors(i).width = 0; + anchors(i).lineWidth = 0; } -static void CreateCornuExtendAnchor(coOrd p, ANGLE_T a, wBool_t selected) { +static void CreateCornuExtendAnchor(coOrd p, ANGLE_T a, wBool_t selected) +{ DYNARR_SET(trkSeg_t,anchors_da,anchors_da.cnt+5); - DrawArrowHeads(&DYNARR_N(trkSeg_t,anchors_da,anchors_da.cnt-5),p,a,FALSE,wDrawColorBlue); + DrawArrowHeads(&DYNARR_N(trkSeg_t,anchors_da,anchors_da.cnt-5),p,a,FALSE, + wDrawColorBlue); } -static void CreateCornuAnchor(coOrd p, wBool_t open) { +static void CreateCornuAnchor(coOrd p, wBool_t open) +{ DIST_T d = tempD.scale*0.15; DYNARR_APPEND(trkSeg_t,anchors_da,1); int i = anchors_da.cnt-1; @@ -498,39 +523,40 @@ static void CreateCornuAnchor(coOrd p, wBool_t open) { anchors(i).u.c.radius = d/2; anchors(i).u.c.a0 = 0.0; anchors(i).u.c.a1 = 360.0; - anchors(i).width = 0; + anchors(i).lineWidth = 0; } /* * Add element to DYNARR pointed to by caller from segment handed in */ -void addSegCornu(dynArr_t * const array_p, trkSeg_p seg) { +void addSegCornu(dynArr_t * const array_p, trkSeg_p seg) +{ trkSeg_p s; DYNARR_APPEND(trkSeg_t, * array_p, 10); //Adds 1 to cnt s = &DYNARR_N(trkSeg_t,* array_p,array_p->cnt-1); s->type = seg->type; - s->bezSegs.max = 0; - s->bezSegs.cnt = 0; - if (s->bezSegs.ptr) MyFree(s->bezSegs.ptr); - s->bezSegs.ptr = NULL; + DYNARR_FREE( trkSeg, s->bezSegs ); s->color = seg->color; - s->width = seg->width; + s->lineWidth = seg->lineWidth; if ((s->type == SEG_BEZLIN || s->type == SEG_BEZTRK) && seg->bezSegs.cnt) { s->u.b.angle0 = seg->u.b.angle0; //Copy all the rest s->u.b.angle3 = seg->u.b.angle3; s->u.b.length = seg->u.b.length; s->u.b.minRadius = seg->u.b.minRadius; - for (int i=0;i<4;i++) s->u.b.pos[i] = seg->u.b.pos[i]; + for (int i=0; i<4; i++) { s->u.b.pos[i] = seg->u.b.pos[i]; } s->u.b.radius0 = seg->u.b.radius3; for (int i = 0; ibezSegs.cnt; i++) { - addSegCornu(&s->bezSegs, (((trkSeg_p)seg->bezSegs.ptr) + i)); //recurse for copying embedded Beziers as in Cornu joint + //recurse for copying embedded Beziers as in Cornu joint + addSegCornu(&s->bezSegs, + &DYNARR_N(trkSeg_t,seg->bezSegs,i)); } } else { s->u = seg->u; } } -EXPORT void SetKnots(spiro_cp knots[], coOrd posk[], char type[], int count) { +EXPORT void SetKnots(spiro_cp knots[], coOrd posk[], char type[], int count) +{ for (int i = 0; i < count; i++) { knots[i].x = posk[i].x; knots[i].y = posk[i].y; @@ -547,8 +573,10 @@ typedef struct { // G2 (position only k1'' = k2'' = 0); Also Cornu <-> Cornu // G4 (position only - splitable for Cornu - a G4 point) k1''= k2'' -BOOL_T CallCornuM(dynArr_t extra_points, BOOL_T end[2], coOrd pos[2], cornuParm_t * cp, dynArr_t * array_p, BOOL_T spots) { - array_p->cnt = 0; +BOOL_T CallCornuM(dynArr_t extra_points, BOOL_T end[2], coOrd pos[2], + cornuParm_t * cp, dynArr_t * array_p, BOOL_T spots) +{ + DYNARR_RESET( trkSeg_t, *array_p ); //Create LH knots //Find remote end point of track, create start knot int ends[2]; @@ -562,7 +590,7 @@ BOOL_T CallCornuM(dynArr_t extra_points, BOOL_T end[2], coOrd pos[2], cornuParm_ BOOL_T back; ANGLE_T angle1; - if (Da.bezc) free(Da.bezc); + if (Da.bezc) { free(Da.bezc); } Da.bezc = new_bezctx_xtrkcad(array_p,ends,spots,tempD.scale*0.15/4); @@ -577,8 +605,8 @@ BOOL_T CallCornuM(dynArr_t extra_points, BOOL_T end[2], coOrd pos[2], cornuParm_ Translate(&posk[1],pos0,cp->angle[0],5); } else { angle1 = FindAngle(cp->center[0],pos[0]); - if (NormalizeAngle(angle1 - cp->angle[0])<180) back = TRUE; - else back = FALSE; + if (NormalizeAngle(angle1 - cp->angle[0])<180) { back = TRUE; } + else { back = FALSE; } posk[0] = pos[0]; Rotate(&posk[0],cp->center[0],(back)?-10:10); posk[1] = pos[0]; @@ -590,12 +618,12 @@ BOOL_T CallCornuM(dynArr_t extra_points, BOOL_T end[2], coOrd pos[2], cornuParm_ posk[0] = pos[0]; } - for (int i=0;iangle[1],10); } else { angle1 = FindAngle(cp->center[1],pos[1]); - if (NormalizeAngle(angle1 - cp->angle[1])>180) back = TRUE; - else back = FALSE; + if (NormalizeAngle(angle1 - cp->angle[1])>180) { back = TRUE; } + else { back = FALSE; } posk[(end[0]?3:1)+extra_points.cnt+1] = pos[1]; Rotate(&posk[(end[0]?3:1)+extra_points.cnt+1],cp->center[1],(back)?5:-5); posk[(end[0]?3:1)+extra_points.cnt+2] = pos[1]; @@ -628,8 +656,10 @@ BOOL_T CallCornuM(dynArr_t extra_points, BOOL_T end[2], coOrd pos[2], cornuParm_ return TRUE; } -EXPORT BOOL_T CallCornu0(coOrd pos[2], coOrd center[2], ANGLE_T angle[2], DIST_T radius[2], dynArr_t * array_p, BOOL_T spots) { - array_p->cnt = 0; +EXPORT BOOL_T CallCornu0(coOrd pos[2], coOrd center[2], ANGLE_T angle[2], + DIST_T radius[2], dynArr_t * array_p, BOOL_T spots) +{ + DYNARR_RESET( trkSeg_t, *array_p ); //Create LH knots //Find remote end point of track, create start knot int ends[2]; @@ -640,7 +670,7 @@ EXPORT BOOL_T CallCornu0(coOrd pos[2], coOrd center[2], ANGLE_T angle[2], DIST_T BOOL_T back; ANGLE_T angle1; - if (Da.bezc) free(Da.bezc); + if (Da.bezc) { free(Da.bezc); } Da.bezc = new_bezctx_xtrkcad(array_p,ends,spots,tempD.scale*0.15/4); @@ -653,8 +683,8 @@ EXPORT BOOL_T CallCornu0(coOrd pos[2], coOrd center[2], ANGLE_T angle[2], DIST_T Translate(&posk[1],pos0,angle[0],5); } else { angle1 = FindAngle(center[0],pos[0]); - if (NormalizeAngle(angle1 - angle[0])<180) back = TRUE; - else back = FALSE; + if (NormalizeAngle(angle1 - angle[0])<180) { back = TRUE; } + else { back = FALSE; } posk[0] = pos[0]; Rotate(&posk[0],center[0],(back)?-10:10); posk[1] = pos[0]; @@ -674,8 +704,8 @@ EXPORT BOOL_T CallCornu0(coOrd pos[2], coOrd center[2], ANGLE_T angle[2], DIST_T Translate(&posk[5],pos1,angle[1],10); } else { angle1 = FindAngle(center[1],pos[1]); - if (NormalizeAngle(angle1 - angle[1])>180) back = TRUE; - else back = FALSE; + if (NormalizeAngle(angle1 - angle[1])>180) { back = TRUE; } + else { back = FALSE; } posk[4] = pos[1]; Rotate(&posk[4],center[1],(back)?5:-5); posk[5] = pos[1]; @@ -695,36 +725,41 @@ EXPORT BOOL_T CallCornu0(coOrd pos[2], coOrd center[2], ANGLE_T angle[2], DIST_T /* * Set up the call to Cornu0. Take the conditions of the two ends from the connected tracks. */ -BOOL_T CallCornu(coOrd pos[2], track_p trk[2], EPINX_T ep[2], dynArr_t * array_p, cornuParm_t * cp) { +BOOL_T CallCornu(coOrd pos[2], track_p trk[2], EPINX_T ep[2], + dynArr_t * array_p, cornuParm_t * cp) +{ trackParams_t params; ANGLE_T angle; - for (int i=0;i<2;i++) { + for (int i=0; i<2; i++) { if (trk[i]) { - if (!GetTrackParams(PARAMS_CORNU,trk[i],pos[i],¶ms)) return FALSE; + if (!GetTrackParams(PARAMS_CORNU,trk[i],pos[i],¶ms)) { return FALSE; } cp->pos[i] = pos[i]; - if (ep && ep[i]>=0) angle = GetTrkEndAngle(trk[i],ep[i]); - else angle = params.angle; //Turntable only + if (ep && ep[i]>=0) { angle = GetTrkEndAngle(trk[i],ep[i]); } + else { angle = params.angle; } //Turntable only if (Da.circleorHelix[i]) { //Helix/Circle only cp->radius[i] = params.arcR; cp->center[i] = params.arcP; - if (ep && ep[i]>=0) cp->angle[i] = NormalizeAngle(params.track_angle+(ep[i]?180:0)); + if (ep && ep[i]>=0) { cp->angle[i] = NormalizeAngle(params.track_angle+(ep[i]?180:0)); } } else if (params.type == curveTypeStraight) { cp->angle[i] = NormalizeAngle(angle+180); //Because end always backwards cp->radius[i] = 0.0; - } else if ((params.type == curveTypeCornu || params.type == curveTypeBezier) && params.arcR == 0.0 ) { + } else if ((params.type == curveTypeCornu || params.type == curveTypeBezier) + && params.arcR == 0.0 ) { cp->radius[i] = 0.0; - if (ep && ep[i]>=0) cp->angle[i] = NormalizeAngle(params.track_angle+(ep[i]?180:0)); //Use point not end + if (ep && ep[i]>=0) { cp->angle[i] = NormalizeAngle(params.track_angle+(ep[i]?180:0)); } //Use point not end } else if (params.type == curveTypeCurve) { - if (ep && ep[i]>=0) cp->angle[i] = NormalizeAngle(params.track_angle+(ep[i]?180:0)); + if (ep && ep[i]>=0) { cp->angle[i] = NormalizeAngle(params.track_angle+(ep[i]?180:0)); } cp->radius[i] = params.arcR; cp->center[i] = params.arcP; - } else if ((params.type == curveTypeCornu || params.type == curveTypeBezier) && params.arcR != 0.0 ){ - if (ep && ep[i]>=0) cp->angle[i] = NormalizeAngle(params.track_angle+(ep[i]?180:0)); + } else if ((params.type == curveTypeCornu || params.type == curveTypeBezier) + && params.arcR != 0.0 ) { + if (ep && ep[i]>=0) { cp->angle[i] = NormalizeAngle(params.track_angle+(ep[i]?180:0)); } cp->radius[i] = params.arcR; cp->center[i] = params.arcP; } else { - cp->angle[i] = NormalizeAngle(angle+180); //Unknown - treat like straight + cp->angle[i] = NormalizeAngle(angle + +180); //Unknown - treat like straight cp->radius[i] = params.arcR; cp->center[i] = params.arcP; } @@ -742,67 +777,85 @@ BOOL_T CallCornu(coOrd pos[2], track_p trk[2], EPINX_T ep[2], dynArr_t * array_p */ EXPORT void DrawCornuCurve( - trkSeg_p first_trk, - trkSeg_p point1, - int ep1Segs_cnt, - trkSeg_p curveSegs, - int crvSegs_cnt, - trkSeg_p point2, - int ep2Segs_cnt, - trkSeg_p second_trk, - trkSeg_p extend1_trk, - trkSeg_p extend2_trk, - trkSeg_p mids, - int midSegs_cnt, - wDrawColor color - ) { - if (first_trk) + trkSeg_p first_trk, + trkSeg_p point1, + int ep1Segs_cnt, + trkSeg_p curveSegs, + int crvSegs_cnt, + trkSeg_p point2, + int ep2Segs_cnt, + trkSeg_p second_trk, + trkSeg_p extend1_trk, + trkSeg_p extend2_trk, + trkSeg_p mids, + int midSegs_cnt, + wDrawColor color +) +{ + if (first_trk) { DrawSegs( &tempD, zero, 0.0, first_trk, 1, Da.trackGauge, drawColorBlack ); - if (crvSegs_cnt>0 && curveSegs) + } + if (crvSegs_cnt>0 && curveSegs) { DrawSegs( &tempD, zero, 0.0, curveSegs, crvSegs_cnt, Da.trackGauge, color ); - if (second_trk) + } + if (second_trk) { DrawSegs( &tempD, zero, 0.0, second_trk, 1, Da.trackGauge, drawColorBlack ); - if (ep1Segs_cnt>0 && point1) - DrawSegs( &tempD, zero, 0.0, point1, ep1Segs_cnt, Da.trackGauge, drawColorBlack ); - if (ep2Segs_cnt>0 && point2) - DrawSegs( &tempD, zero, 0.0, point2, ep2Segs_cnt, Da.trackGauge, drawColorBlack ); - if (midSegs_cnt>0 && mids) - DrawSegs( &tempD, zero, 0.0, mids, midSegs_cnt, Da.trackGauge, drawColorBlack ); - if (extend1_trk) + } + if (ep1Segs_cnt>0 && point1) { + DrawSegs( &tempD, zero, 0.0, point1, ep1Segs_cnt, Da.trackGauge, + drawColorBlack ); + } + if (ep2Segs_cnt>0 && point2) { + DrawSegs( &tempD, zero, 0.0, point2, ep2Segs_cnt, Da.trackGauge, + drawColorBlack ); + } + if (midSegs_cnt>0 && mids) { + DrawSegs( &tempD, zero, 0.0, mids, midSegs_cnt, Da.trackGauge, + drawColorBlack ); + } + if (extend1_trk) { DrawSegs( &tempD, zero, 0.0, extend1_trk, 1, Da.trackGauge, drawColorBlack); - if (extend2_trk) + } + if (extend2_trk) { DrawSegs( &tempD, zero, 0.0, extend2_trk, 1, Da.trackGauge, drawColorBlack); + } } /* * If Track, make it red if the radius is below minimum */ -void DrawTempCornu() { +void DrawTempCornu() +{ - DrawCornuCurve(&Da.trk1Seg, - &Da.ep1Segs[0],Da.ep1Segs_da_cnt, - (trkSeg_t *)Da.crvSegs_da.ptr,Da.crvSegs_da_cnt, - &Da.ep2Segs[0],Da.ep2Segs_da_cnt, - &Da.trk2Seg, - Da.extend[0]?&Da.extendSeg[0]:NULL, - Da.extend[1]?&Da.extendSeg[1]:NULL, - (trkSeg_t *)Da.midSegs.ptr,Da.midSegs.cnt, - fabs(Da.minRadius)<(GetLayoutMinTrackRadius()-EPSILON)?exceptionColor:normalColor); + DrawCornuCurve(&Da.trk1Seg, + &Da.ep1Segs[0],Da.ep1Segs_da_cnt, + &DYNARR_N(trkSeg_t,Da.crvSegs_da,0),Da.crvSegs_da_cnt, + &Da.ep2Segs[0],Da.ep2Segs_da_cnt, + &Da.trk2Seg, + Da.extend[0]?&Da.extendSeg[0]:NULL, + Da.extend[1]?&Da.extendSeg[1]:NULL, + &DYNARR_N(trkSeg_t,Da.midSegs,0),Da.midSegs.cnt, + fabs(Da.minRadius)<(GetLayoutMinTrackRadius()-EPSILON)?exceptionColor: + normalColor); } -void CreateBothEnds(int selectEndPoint, int selectMidPoint, int selectEndHandle, int lastSelected ) { +void CreateBothEnds(int selectEndPoint, int selectMidPoint, int selectEndHandle, + int lastSelected ) +{ BOOL_T selectable[2],modifyable[2]; selectable[0] = !Da.trk[0] || ( - Da.trk[0] && !QueryTrack(Da.trk[0],Q_IS_CORNU) && !QueryTrack(Da.trk[0],Q_CAN_MODIFY_CONTROL_POINTS)); + Da.trk[0] && !QueryTrack(Da.trk[0],Q_IS_CORNU) + && !QueryTrack(Da.trk[0],Q_CAN_MODIFY_CONTROL_POINTS)); modifyable[0] = !Da.trk[0] || ( - Da.trk[0] && QueryTrack(Da.trk[0],Q_CORNU_CAN_MODIFY)); + Da.trk[0] && QueryTrack(Da.trk[0],Q_CORNU_CAN_MODIFY)); selectable[1] = !Da.trk[1] || ( - Da.trk[1] && !QueryTrack(Da.trk[1],Q_IS_CORNU) && !QueryTrack(Da.trk[1],Q_CAN_MODIFY_CONTROL_POINTS)); + Da.trk[1] && !QueryTrack(Da.trk[1],Q_IS_CORNU) + && !QueryTrack(Da.trk[1],Q_CAN_MODIFY_CONTROL_POINTS)); modifyable[1] = !Da.trk[1] || ( - Da.trk[1] && QueryTrack(Da.trk[1],Q_CORNU_CAN_MODIFY)); + Da.trk[1] && QueryTrack(Da.trk[1],Q_CORNU_CAN_MODIFY)); Da.endHandle[0].angle_selected = (selectEndHandle==1)?TRUE:FALSE; Da.endHandle[0].radius_selected = (selectEndHandle==0)?TRUE:FALSE; @@ -811,30 +864,41 @@ void CreateBothEnds(int selectEndPoint, int selectMidPoint, int selectEndHandle, Da.endHandle[0].last_selected = lastSelected==0?TRUE:FALSE; Da.endHandle[1].last_selected = lastSelected==1?TRUE:FALSE; if (selectEndPoint == -1) { - Da.ep1Segs_da_cnt = createEndPoint(Da.ep1Segs, Da.pos[0],FALSE,selectable[0],modifyable[0],Da.trk[0]!=NULL,Da.angle[0],Da.radius[0],Da.center[0],Da.extend[0]?NULL:&Da.endHandle[0]); - Da.ep2Segs_da_cnt = createEndPoint(Da.ep2Segs, Da.pos[1],FALSE,selectable[1],modifyable[1],Da.trk[1]!=NULL,Da.angle[1],Da.radius[1],Da.center[1],Da.extend[1]?NULL:&Da.endHandle[1]); + Da.ep1Segs_da_cnt = createEndPoint(Da.ep1Segs, Da.pos[0],FALSE,selectable[0], + modifyable[0],Da.trk[0]!=NULL,Da.angle[0],Da.radius[0],Da.center[0], + Da.extend[0]?NULL:&Da.endHandle[0]); + Da.ep2Segs_da_cnt = createEndPoint(Da.ep2Segs, Da.pos[1],FALSE,selectable[1], + modifyable[1],Da.trk[1]!=NULL,Da.angle[1],Da.radius[1],Da.center[1], + Da.extend[1]?NULL:&Da.endHandle[1]); } else { - Da.ep1Segs_da_cnt = createEndPoint(Da.ep1Segs, Da.pos[0],selectEndPoint == 0,selectable[0],modifyable[0],Da.trk[0]!=NULL,Da.angle[0],Da.radius[0],Da.center[0],Da.extend[0]?NULL:&Da.endHandle[0]); - Da.ep2Segs_da_cnt = createEndPoint(Da.ep2Segs, Da.pos[1],selectEndPoint == 1,selectable[1],modifyable[1],Da.trk[1]!=NULL,Da.angle[1],Da.radius[1],Da.center[1],Da.extend[1]?NULL:&Da.endHandle[1]); + Da.ep1Segs_da_cnt = createEndPoint(Da.ep1Segs, Da.pos[0],selectEndPoint == 0, + selectable[0],modifyable[0],Da.trk[0]!=NULL,Da.angle[0],Da.radius[0], + Da.center[0],Da.extend[0]?NULL:&Da.endHandle[0]); + Da.ep2Segs_da_cnt = createEndPoint(Da.ep2Segs, Da.pos[1],selectEndPoint == 1, + selectable[1],modifyable[1],Da.trk[1]!=NULL,Da.angle[1],Da.radius[1], + Da.center[1],Da.extend[1]?NULL:&Da.endHandle[1]); } Da.endHandle[0].end_valid = !Da.extend[0]; Da.endHandle[1].end_valid = !Da.extend[1]; DYNARR_RESET(trkSeg_t,Da.midSegs); - for (int i=0;i=0.0) Da.ends[0] = TRUE; - else Da.ends[0] = FALSE; - if (Da.radius[1] >=0.0) Da.ends[1] = TRUE; - else Da.ends[1] = FALSE; + if (Da.radius[0] >=0.0) { Da.ends[0] = TRUE; } + else { Da.ends[0] = FALSE; } + if (Da.radius[1] >=0.0) { Da.ends[1] = TRUE; } + else { Da.ends[1] = FALSE; } } -BOOL_T GetConnectedTrackParms(track_p t, const coOrd pos, int end, EPINX_T track_end, wBool_t extend) { +BOOL_T GetConnectedTrackParms(track_p t, const coOrd pos, int end, + EPINX_T track_end, wBool_t extend) +{ trackParams_t trackParams; coOrd pos1; - if ((track_end>=0) && extend) pos1 = GetTrkEndPos(t,track_end); - else pos1 = pos; - if (!GetTrackParams(PARAMS_CORNU, t, pos1, &trackParams)) return FALSE; + if ((track_end>=0) && extend) { pos1 = GetTrkEndPos(t,track_end); } + else { pos1 = pos; } + if (!GetTrackParams(PARAMS_CORNU, t, pos1, &trackParams)) { return FALSE; } Da.radius[end] = 0.0; Da.center[end] = zero; Da.circleorHelix[end] = FALSE; @@ -869,9 +933,10 @@ BOOL_T GetConnectedTrackParms(track_p t, const coOrd pos, int end, EPINX_T track Da.pos[end] = trackParams.cornuEnd[ep]; Da.center[end] = trackParams.cornuCenter[ep]; } else if (trackParams.type == curveTypeStraight) { - if (trackParams.ep>=0) - Da.angle[end] = NormalizeAngle(GetTrkEndAngle(t,track_end)+180); //Ignore params.angle because it gives from nearest end - else { + if (trackParams.ep>=0) { + Da.angle[end] = NormalizeAngle(GetTrkEndAngle(t, + track_end)+180); //Ignore params.angle because it gives from nearest end + } else { Da.angle[end] = NormalizeAngle(trackParams.angle+180); //Turntable Da.pos[end] = trackParams.lineEnd; //End moved to constrain angle } @@ -879,18 +944,20 @@ BOOL_T GetConnectedTrackParms(track_p t, const coOrd pos, int end, EPINX_T track return TRUE; } -void CorrectHelixAngles() { +void CorrectHelixAngles() +{ if ( Da.circleorHelix[0] ) { Da.ep[0] = PickArcEndPt( Da.center[0], Da.pos[0], Da.pos[1] ); - if (Da.ep[0] == 1) Da.angle[0] = NormalizeAngle(Da.angle[0]+180); + if (Da.ep[0] == 1) { Da.angle[0] = NormalizeAngle(Da.angle[0]+180); } } if ( Da.circleorHelix[1] ) { Da.ep[1] = PickArcEndPt( Da.center[1], Da.pos[1], Da.pos[0] ); - if (Da.ep[1] == 1) Da.angle[1] = NormalizeAngle(Da.angle[1]+180); + if (Da.ep[1] == 1) { Da.angle[1] = NormalizeAngle(Da.angle[1]+180); } } } -BOOL_T CheckHelix(track_p trk) { +BOOL_T CheckHelix(track_p trk) +{ if ( Da.trk[0] && QueryTrack(Da.trk[0],Q_HAS_VARIABLE_ENDPOINTS)) { track_p t = GetTrkEndTrk(Da.trk[0],Da.ep[0]); if ( t != NULL && t != trk) { @@ -908,86 +975,92 @@ BOOL_T CheckHelix(track_p trk) { return TRUE; } -void SetUpCornuParms(cornuParm_t * cp) { - cp->center[0] = Da.center[0]; - cp->angle[0] = Da.angle[0]; - cp->radius[0] = Da.radius[0]; - cp->center[1] = Da.center[1]; - cp->angle[1] = Da.angle[1]; - cp->radius[1] = Da.radius[1]; +void SetUpCornuParms(cornuParm_t * cp) +{ + cp->center[0] = Da.center[0]; + cp->angle[0] = Da.angle[0]; + cp->radius[0] = Da.radius[0]; + cp->center[1] = Da.center[1]; + cp->angle[1] = Da.angle[1]; + cp->radius[1] = Da.radius[1]; } -track_p CreateCornuFromPoints(coOrd pos[2],BOOL_T track_end[2]) { - coOrd center[2]; - DIST_T radius[2]; - ANGLE_T angle[2]; - BOOL_T back, neg; - cornuParm_t new; - int inx,subinx; - coOrd pos_temp[2]; - - for (int i=0;i<2;i++) { - pos_temp[i] = pos[i]; +track_p CreateCornuFromPoints(coOrd pos[2],BOOL_T track_end[2]) +{ + coOrd center[2]; + DIST_T radius[2]; + ANGLE_T angle[2]; + BOOL_T back, neg; + cornuParm_t new; + int inx,subinx; + coOrd pos_temp[2]; - if (!track_end[i] || (Da.radius[i]==-1.0)) { + for (int i=0; i<2; i++) { + pos_temp[i] = pos[i]; - angle[i] = GetAngleSegs(Da.crvSegs_da.cnt,(trkSeg_t *)(Da.crvSegs_da.ptr),&pos_temp[i],&inx,NULL,&back,&subinx,&neg); + if (!track_end[i] || (Da.radius[i]==-1.0)) { - trkSeg_p segPtr = &DYNARR_N(trkSeg_t, Da.crvSegs_da, inx); + angle[i] = GetAngleSegs(Da.crvSegs_da.cnt,&DYNARR_N(trkSeg_t,Da.crvSegs_da,0), + &pos_temp[i],&inx,NULL,&back,&subinx,&neg); - if (segPtr->type == SEG_BEZTRK) - segPtr = &DYNARR_N(trkSeg_t, segPtr->bezSegs, subinx); + trkSeg_p segPtr = &DYNARR_N(trkSeg_t, Da.crvSegs_da, inx); - if (i==0) { - if (neg==back) angle[i] = NormalizeAngle(angle[i]+180); - } else { - if (!(neg==back)) angle[i] = NormalizeAngle(angle[i]+180); - } + if (segPtr->type == SEG_BEZTRK) { + segPtr = &DYNARR_N(trkSeg_t, segPtr->bezSegs, subinx); + } - if (segPtr->type == SEG_STRTRK) { - radius[i] = 0.0; - center[i] = zero; - } else if (segPtr->type == SEG_CRVTRK) { - center[i] = segPtr->u.c.center; - radius[i] = fabs(segPtr->u.c.radius); - } + if (i==0) { + if (neg==back) { angle[i] = NormalizeAngle(angle[i]+180); } } else { - pos[i] = Da.pos[i]; - radius[i] = Da.radius[i]; - center[i] = Da.center[i]; - angle[i] = Da.angle[i]; - neg = FALSE; - back = FALSE; - } - } - new.pos[0] = pos[0]; - new.pos[1] = pos[1]; - new.angle[0] = angle[0]; - new.angle[1] = angle[1]; - new.center[0] = center[0]; - new.center[1] = center[1]; - new.radius[0] = radius[0]; - new.radius[1] = radius[1]; - - track_p trk1 = NewCornuTrack(new.pos,new.center,new.angle,new.radius,NULL,0); - if (trk1==NULL) { - wBeep(); - InfoMessage(_("Cornu Create Failed for p1[%0.3f,%0.3f] p2[%0.3f,%0.3f], c1[%0.3f,%0.3f] c2[%0.3f,%0.3f], a1=%0.3f a2=%0.3f, r1=%s r2=%s"), - new.pos[0].x,new.pos[0].y, - new.pos[1].x,new.pos[1].y, - new.center[0].x,new.center[0].y, - new.center[1].x,new.center[1].y, - new.angle[0],new.angle[1], - FormatDistance(new.radius[0]),FormatDistance(new.radius[1])); - UndoEnd(); - return NULL; + if (!(neg==back)) { angle[i] = NormalizeAngle(angle[i]+180); } + } + + if (segPtr->type == SEG_STRTRK) { + radius[i] = 0.0; + center[i] = zero; + } else if (segPtr->type == SEG_CRVTRK) { + center[i] = segPtr->u.c.center; + radius[i] = fabs(segPtr->u.c.radius); + } + } else { + pos[i] = Da.pos[i]; + radius[i] = Da.radius[i]; + center[i] = Da.center[i]; + angle[i] = Da.angle[i]; + neg = FALSE; + back = FALSE; } - return trk1; + } + new.pos[0] = pos[0]; + new.pos[1] = pos[1]; + new.angle[0] = angle[0]; + new.angle[1] = angle[1]; + new.center[0] = center[0]; + new.center[1] = center[1]; + new.radius[0] = radius[0]; + new.radius[1] = radius[1]; + + track_p trk1 = NewCornuTrack(new.pos,new.center,new.angle,new.radius,NULL,0); + if (trk1==NULL) { + wBeep(); + InfoMessage( + _("Cornu Create Failed for p1[%0.3f,%0.3f] p2[%0.3f,%0.3f], c1[%0.3f,%0.3f] c2[%0.3f,%0.3f], a1=%0.3f a2=%0.3f, r1=%s r2=%s"), + new.pos[0].x,new.pos[0].y, + new.pos[1].x,new.pos[1].y, + new.center[0].x,new.center[0].y, + new.center[1].x,new.center[1].y, + new.angle[0],new.angle[1], + FormatDistance(new.radius[0]),FormatDistance(new.radius[1])); + UndoEnd(); + return NULL; + } + return trk1; } -ANGLE_T GetOpenAngle(coOrd pos[2],ANGLE_T angle[2],int moved) { +ANGLE_T GetOpenAngle(coOrd pos[2],ANGLE_T angle[2],int moved) +{ ANGLE_T a = FindAngle(pos[1-moved],pos[moved]); ANGLE_T diff = (180+a)-angle[1-moved]; //Difference between input and line return a+diff; //Change to line plus this at the other end @@ -1028,9 +1101,9 @@ static paramGroup_t cornuModPG = { "cornuMod", 0, cornuModPLs, COUNT( cornuModPL * */ EXPORT STATUS_T AdjustCornuCurve( - wAction_t action, - coOrd pos, - cornuMessageProc message ) + wAction_t action, + coOrd pos, + cornuMessageProc message ) { track_p t; DIST_T d; @@ -1044,7 +1117,8 @@ EXPORT STATUS_T AdjustCornuCurve( Da.cmdType = VP2L(commandContext); - if (Da.state != PICK_POINT && Da.state != POINT_PICKED && Da.state != TRACK_SELECTED) return C_CONTINUE; + if (Da.state != PICK_POINT && Da.state != POINT_PICKED + && Da.state != TRACK_SELECTED) { return C_CONTINUE; } switch ( action & 0xFF) { @@ -1058,28 +1132,31 @@ EXPORT STATUS_T AdjustCornuCurve( Da.prevEndPoint = -1; Da.extend[0] = FALSE; Da.extend[1] = FALSE; - CreateBothEnds(Da.selectEndPoint, Da.selectMidPoint,Da.selectEndHandle,Da.prevSelected); - Da.crvSegs_da.cnt = 0; + CreateBothEnds(Da.selectEndPoint, Da.selectMidPoint,Da.selectEndHandle, + Da.prevSelected); + DYNARR_RESET( trkSeg_t, Da.crvSegs_da ); SetUpCornuParms(&cp); - if (CallCornuM(Da.mid_points,Da.ends,Da.pos,&cp,&Da.crvSegs_da,TRUE)) Da.crvSegs_da_cnt = Da.crvSegs_da.cnt; - else Da.crvSegs_da_cnt = 0; + if (CallCornuM(Da.mid_points,Da.ends,Da.pos,&cp,&Da.crvSegs_da,TRUE)) { Da.crvSegs_da_cnt = Da.crvSegs_da.cnt; } + else { Da.crvSegs_da_cnt = 0; } Da.minRadius = CornuMinRadius(Da.pos,Da.crvSegs_da); InfoMessage( _("Select Point, or Add Point") ); TempRedraw(); // AdjustCornuCurve C_START return C_CONTINUE; case C_UPDATE: - if (Da.state != PICK_POINT && Da.prevSelected>-1) return C_CONTINUE; + if (Da.state != PICK_POINT && Da.prevSelected>-1) { return C_CONTINUE; } int sel = Da.prevSelected; - if (Da.trk[sel]) return C_CONTINUE; //Track Here - should never happen + if (Da.trk[sel]) { return C_CONTINUE; } //Track Here - should never happen Da.radius[sel] = fabs(cornuModCmdContext.radius); Da.angle[sel] = cornuModCmdContext.angle; - if (cornuModCmdContext.radius!=0) - Translate(&Da.center[sel],Da.pos[sel],Da.angle[sel]+90,cornuModCmdContext.radius); + if (cornuModCmdContext.radius!=0) { + Translate(&Da.center[sel],Da.pos[sel],Da.angle[sel]+90, + cornuModCmdContext.radius); + } CreateBothEnds(Da.prevSelected,-1,-1,Da.prevSelected); SetUpCornuParms(&cp); - if (CallCornuM(Da.mid_points,Da.ends,Da.pos,&cp,&Da.crvSegs_da,TRUE)) Da.crvSegs_da_cnt = Da.crvSegs_da.cnt; - else Da.crvSegs_da_cnt = 0; + if (CallCornuM(Da.mid_points,Da.ends,Da.pos,&cp,&Da.crvSegs_da,TRUE)) { Da.crvSegs_da_cnt = Da.crvSegs_da.cnt; } + else { Da.crvSegs_da_cnt = 0; } Da.minRadius = CornuMinRadius(Da.pos,Da.crvSegs_da); return C_CONTINUE; break; @@ -1088,7 +1165,7 @@ EXPORT STATUS_T AdjustCornuCurve( if (Da.state == NONE || Da.state == PICK_POINT) { wSetCursor(mainD.d,defaultCursor); DYNARR_RESET(trkSeg_t,anchors_da); - for(int i=0;i<2;i++) { + for(int i=0; i<2; i++) { if (IsClose(FindDistance(pos,Da.pos[i]))) { if (((MyGetKeyState() & WKEY_SHIFT) != 0) && Da.selectTrack) { CreateCornuExtendAnchor(Da.pos[i], Da.angle[i], FALSE); @@ -1099,9 +1176,10 @@ EXPORT STATUS_T AdjustCornuCurve( } } } - CreateBothEnds(Da.selectEndPoint,Da.selectMidPoint,Da.selectEndHandle,Da.prevSelected); + CreateBothEnds(Da.selectEndPoint,Da.selectMidPoint,Da.selectEndHandle, + Da.prevSelected); Da.selectEndPoint = -1; - for (int i=0;i Extend + if (!Da.trk[Da.selectEndPoint] && ((MyGetKeyState() & WKEY_SHIFT) != 0) + && Da.selectTrack) { //With Shift no track -> Extend Da.extend[Da.selectEndPoint] = TRUE; //Adding to end Point DYNARR_RESET(trkSeg_t,anchors_da); - CreateCornuExtendAnchor(Da.pos[Da.selectEndPoint], Da.angle[Da.selectEndPoint], FALSE); + CreateCornuExtendAnchor(Da.pos[Da.selectEndPoint], Da.angle[Da.selectEndPoint], + FALSE); } } - if (Da.selectMidPoint ==-1 && Da.selectEndPoint ==-1 && Da.selectEndHandle ==-1) { + if (Da.selectMidPoint ==-1 && Da.selectEndPoint ==-1 + && Da.selectEndHandle ==-1) { coOrd temp_pos = pos; wIndex_t index; - if (IsClose(DistanceSegs(zero,0.0,Da.crvSegs_da.cnt,(trkSeg_p)Da.crvSegs_da.ptr,&temp_pos,&index))) { + if (IsClose(DistanceSegs(zero,0.0,Da.crvSegs_da.cnt,&DYNARR_N(trkSeg_t, + Da.crvSegs_da,0),&temp_pos,&index))) { //Add Point between two other points //Find closest two points along Track int closest = -1; wIndex_t pIndex, nIndex; temp_pos = Da.pos[0]; - DistanceSegs(zero,0.0,Da.crvSegs_da.cnt,(trkSeg_p)Da.crvSegs_da.ptr,&temp_pos,&pIndex); + DistanceSegs(zero,0.0,Da.crvSegs_da.cnt,&DYNARR_N(trkSeg_t,Da.crvSegs_da,0), + &temp_pos,&pIndex); if (Da.mid_points.cnt>0) { - for (int i=0;i=index))) { closest = i; break; @@ -1217,14 +1302,16 @@ EXPORT STATUS_T AdjustCornuCurve( pIndex = nIndex; } temp_pos = Da.pos[1]; - DistanceSegs(zero,0.0,Da.crvSegs_da.cnt,(trkSeg_p)Da.crvSegs_da.ptr,&temp_pos,&nIndex); - if (index == nIndex) closest = Da.mid_points.cnt; - if (closest == -1) + DistanceSegs(zero,0.0,Da.crvSegs_da.cnt,&DYNARR_N(trkSeg_t,Da.crvSegs_da,0), + &temp_pos,&nIndex); + if (index == nIndex) { closest = Da.mid_points.cnt; } + if (closest == -1) { closest = Da.mid_points.cnt; - } else closest = 0; + } + } else { closest = 0; } DYNARR_APPEND(coOrd,Da.mid_points,1); - for (int i=Da.mid_points.cnt-1;i>closest;i--) { - DYNARR_N(coOrd,Da.mid_points,i) = DYNARR_N(coOrd ,Da.mid_points,i-1); + for (int i=Da.mid_points.cnt-1; i>closest; i--) { + DYNARR_N(coOrd,Da.mid_points,i) = DYNARR_N(coOrd,Da.mid_points,i-1); } DYNARR_N(coOrd,Da.mid_points,closest) = pos; Da.selectMidPoint = closest; @@ -1237,19 +1324,21 @@ EXPORT STATUS_T AdjustCornuCurve( return C_CONTINUE; } } - if (Da.selectEndPoint == -1 && Da.selectMidPoint == -1 && Da.selectEndHandle ==-1) { + if (Da.selectEndPoint == -1 && Da.selectMidPoint == -1 + && Da.selectEndHandle ==-1) { wBeep(); InfoMessage( _("Not close enough to track or point, reselect") ); return C_CONTINUE; } else { if (Da.selectEndPoint >=0 ) { pos = Da.pos[Da.selectEndPoint]; - if (Da.extend[Da.selectEndPoint]) + if (Da.extend[Da.selectEndPoint]) { InfoMessage( _("Drag out end of Cornu")); - else if (Da.trk[Da.selectEndPoint]) { + } else if (Da.trk[Da.selectEndPoint]) { InfoMessage( _("Drag along end of track")); - } else + } else { InfoMessage( _("Drag to move")); + } } else if (Da.selectMidPoint >=0 ) { pos = DYNARR_N(coOrd,Da.mid_points,Da.selectMidPoint); InfoMessage( _("Drag point to new location, Delete to remove")); @@ -1264,17 +1353,19 @@ EXPORT STATUS_T AdjustCornuCurve( } Da.state = POINT_PICKED; } - CreateBothEnds(Da.selectEndPoint,Da.selectMidPoint,Da.selectEndHandle,Da.prevSelected); + CreateBothEnds(Da.selectEndPoint,Da.selectMidPoint,Da.selectEndHandle, + Da.prevSelected); SetUpCornuParms(&cp); - if (CallCornuM(Da.mid_points,Da.ends,Da.pos,&cp,&Da.crvSegs_da,TRUE)) Da.crvSegs_da_cnt = Da.crvSegs_da.cnt; - else Da.crvSegs_da_cnt = 0; + if (CallCornuM(Da.mid_points,Da.ends,Da.pos,&cp,&Da.crvSegs_da,TRUE)) { Da.crvSegs_da_cnt = Da.crvSegs_da.cnt; } + else { Da.crvSegs_da_cnt = 0; } Da.minRadius = CornuMinRadius(Da.pos, Da.crvSegs_da); return C_CONTINUE; case C_MOVE: DYNARR_RESET(trkSeg_t,anchors_da); if (Da.state != POINT_PICKED) { - InfoMessage(_("Pick any circle to adjust or add - Enter to accept, Esc to cancel")); + InfoMessage( + _("Pick any circle to adjust or add - Enter to accept, Esc to cancel")); return C_CONTINUE; } if (Da.selectEndPoint >= 0) { @@ -1291,16 +1382,16 @@ EXPORT STATUS_T AdjustCornuCurve( if (Da.ep[sel]>=0) { //If not turntable Da.pos[sel] = pos = GetTrkEndPos(Da.trk[sel],Da.ep[sel]); } else { - if (QueryTrack(Da.trk[sel],Q_CAN_ADD_ENDPOINTS)){ //Turntable + if (QueryTrack(Da.trk[sel],Q_CAN_ADD_ENDPOINTS)) { //Turntable trackParams_t tp; - if (!GetTrackParams(PARAMS_CORNU, Da.trk[sel], pos, &tp)) return C_CONTINUE; + if (!GetTrackParams(PARAMS_CORNU, Da.trk[sel], pos, &tp)) { return C_CONTINUE; } ANGLE_T a = tp.angle; Translate(&pos,tp.ttcenter,a,tp.ttradius); Da.angle[sel] = NormalizeAngle(a+180); SetUpCornuParms(&cp); - if (CallCornuM(Da.mid_points,Da.ends,Da.pos,&cp,&Da.crvSegs_da,TRUE)) Da.crvSegs_da_cnt = Da.crvSegs_da.cnt; - else Da.crvSegs_da_cnt = 0; - } else return C_CONTINUE; + if (CallCornuM(Da.mid_points,Da.ends,Da.pos,&cp,&Da.crvSegs_da,TRUE)) { Da.crvSegs_da_cnt = Da.crvSegs_da.cnt; } + else { Da.crvSegs_da_cnt = 0; } + } else { return C_CONTINUE; } } } } else { @@ -1308,16 +1399,19 @@ EXPORT STATUS_T AdjustCornuCurve( } if (!inside) { if (Da.ep[sel]>=0) { //Track defined end point - ANGLE_T diff = NormalizeAngle(GetTrkEndAngle(Da.trk[sel],Da.ep[sel])-FindAngle(GetTrkEndPos(Da.trk[sel],Da.ep[sel]),pos)); - if (diff>90.0 && diff<270.0) { //The point is not on track but outside cone of end angle+/-90 + ANGLE_T diff = NormalizeAngle(GetTrkEndAngle(Da.trk[sel], + Da.ep[sel])-FindAngle(GetTrkEndPos(Da.trk[sel],Da.ep[sel]),pos)); + if (diff>90.0 + && diff<270.0) { //The point is not on track but outside cone of end angle+/-90 Da.pos[sel] = pos = GetTrkEndPos(Da.trk[sel],Da.ep[sel]); - CreateBothEnds(Da.selectEndPoint,Da.selectMidPoint,Da.selectEndHandle,Da.prevSelected); + CreateBothEnds(Da.selectEndPoint,Da.selectMidPoint,Da.selectEndHandle, + Da.prevSelected); return C_CONTINUE; } } else { //Not an end point - if (QueryTrack(Da.trk[sel],Q_CAN_ADD_ENDPOINTS)){ //Turntable + if (QueryTrack(Da.trk[sel],Q_CAN_ADD_ENDPOINTS)) { //Turntable trackParams_t tp; - if (!GetTrackParams(PARAMS_CORNU, Da.trk[sel], pos, &tp)) return C_CONTINUE; + if (!GetTrackParams(PARAMS_CORNU, Da.trk[sel], pos, &tp)) { return C_CONTINUE; } ANGLE_T a = tp.angle; coOrd edge; Translate(&edge,tp.ttcenter,a,tp.ttradius); @@ -1326,25 +1420,30 @@ EXPORT STATUS_T AdjustCornuCurve( Translate(&pos,edge,a,d); Da.angle[sel] = NormalizeAngle(a+180); Da.pos[sel] = pos; - CreateBothEnds(Da.selectEndPoint,Da.selectMidPoint,Da.selectEndHandle,Da.prevSelected); + CreateBothEnds(Da.selectEndPoint,Da.selectMidPoint,Da.selectEndHandle, + Da.prevSelected); Da.extendSeg[sel].type = SEG_STRTRK; - Da.extendSeg[sel].width = 0; + Da.extendSeg[sel].lineWidth = 0; Da.extendSeg[sel].color = wDrawColorBlack; Da.extendSeg[sel].u.l.pos[1-sel] = pos; Da.extendSeg[sel].u.l.pos[sel] = edge; Da.extend[sel] = TRUE; SetUpCornuParms(&cp); - if (CallCornuM(Da.mid_points,Da.ends,Da.pos,&cp,&Da.crvSegs_da,TRUE)) Da.crvSegs_da_cnt = Da.crvSegs_da.cnt; - else Da.crvSegs_da_cnt = 0; + if (CallCornuM(Da.mid_points,Da.ends,Da.pos,&cp,&Da.crvSegs_da,TRUE)) { Da.crvSegs_da_cnt = Da.crvSegs_da.cnt; } + else { Da.crvSegs_da_cnt = 0; } return C_CONTINUE; //Stop moving end point - } else return C_CONTINUE; + } else { return C_CONTINUE; } } } // Stop the user extending right through the other track - if (Da.ep[sel]>=0 && QueryTrack(Da.trk[sel],Q_CORNU_CAN_MODIFY)) { //For non-turnouts - if ((!QueryTrack(Da.trk[sel],Q_CAN_ADD_ENDPOINTS)) // Not Turntable - may not be needed - && (!QueryTrack(Da.trk[sel],Q_HAS_VARIABLE_ENDPOINTS))) { // Not Helix or a Circle - DIST_T ab = FindDistance(GetTrkEndPos(Da.trk[sel],Da.ep[sel]),GetTrkEndPos(Da.trk[sel],1-Da.ep[sel])); + if (Da.ep[sel]>=0 + && QueryTrack(Da.trk[sel],Q_CORNU_CAN_MODIFY)) { //For non-turnouts + if ((!QueryTrack(Da.trk[sel], + Q_CAN_ADD_ENDPOINTS)) // Not Turntable - may not be needed + && (!QueryTrack(Da.trk[sel], + Q_HAS_VARIABLE_ENDPOINTS))) { // Not Helix or a Circle + DIST_T ab = FindDistance(GetTrkEndPos(Da.trk[sel],Da.ep[sel]), + GetTrkEndPos(Da.trk[sel],1-Da.ep[sel])); DIST_T ac = FindDistance(GetTrkEndPos(Da.trk[sel],Da.ep[sel]),pos); DIST_T cb = FindDistance(GetTrkEndPos(Da.trk[sel],1-Da.ep[sel]),pos); if (cb=0 && inside) { //Has a point and inside track - InfoMessage(_("Can't move end inside a turnout")); //Turnouts are stuck to end-point + } else if (Da.ep[sel]>=0 + && inside) { //Has a point and inside track + InfoMessage( + _("Can't move end inside a turnout")); //Turnouts are stuck to end-point Da.pos[sel] = pos = GetTrkEndPos(Da.trk[sel],Da.ep[sel]); - CreateBothEnds(Da.selectEndPoint,Da.selectMidPoint,Da.selectEndHandle,Da.prevSelected); + CreateBothEnds(Da.selectEndPoint,Da.selectMidPoint,Da.selectEndHandle, + Da.prevSelected); return C_CONTINUE; } } if(!Da.trk[sel]) { //Cornu with no end - if (((MyGetKeyState() & WKEY_SHIFT) != 0) && Da.selectTrack) { //Extend end locked + if (((MyGetKeyState() & WKEY_SHIFT) != 0) + && Da.selectTrack) { //Extend end locked SetUpCornuParms(&cp); CallCornuM(Da.mid_points,Da.ends,Da.pos,&cp,&Da.crvSegs_da,FALSE); if (Da.radius[sel] == 0) { //Straight - Da.extendSeg[sel].type = SEG_STRTRK; - Da.extendSeg[sel].width = 0; - Da.extendSeg[sel].color = wDrawColorBlack; - Da.extendSeg[sel].u.l.pos[1-sel] = Da.pos[sel]; - d = FindDistance( Da.extendSeg[sel].u.l.pos[1-sel], pos ); - a = NormalizeAngle(Da.angle[sel]-FindAngle(pos,Da.pos[sel])); - if (cos(D2R(a))<=0) { - Translate( &Da.extendSeg[sel].u.l.pos[sel], - Da.extendSeg[sel].u.l.pos[1-sel], - Da.angle[sel], - d * cos(D2R(a))); - pos = Da.extendSeg[sel].u.l.pos[sel]; - Da.extend[sel] = TRUE; - } else Da.extend[sel] = FALSE; + Da.extendSeg[sel].type = SEG_STRTRK; + Da.extendSeg[sel].lineWidth = 0; + Da.extendSeg[sel].color = wDrawColorBlack; + Da.extendSeg[sel].u.l.pos[1-sel] = Da.pos[sel]; + d = FindDistance( Da.extendSeg[sel].u.l.pos[1-sel], pos ); + a = NormalizeAngle(Da.angle[sel]-FindAngle(pos,Da.pos[sel])); + if (cos(D2R(a))<=0) { + Translate( &Da.extendSeg[sel].u.l.pos[sel], + Da.extendSeg[sel].u.l.pos[1-sel], + Da.angle[sel], - d * cos(D2R(a))); + pos = Da.extendSeg[sel].u.l.pos[sel]; + Da.extend[sel] = TRUE; + } else { Da.extend[sel] = FALSE; } } else { //Curve Da.extendSeg[sel].type = SEG_CRVTRK; - Da.extendSeg[sel].width = 0; + Da.extendSeg[sel].lineWidth = 0; Da.extendSeg[sel].color = wDrawColorBlack; Da.extendSeg[sel].u.c.center = Da.center[sel]; Da.extendSeg[sel].u.c.radius = Da.radius[sel]; @@ -1390,17 +1493,18 @@ EXPORT STATUS_T AdjustCornuCurve( PointOnCircle( &pos, Da.extendSeg[sel].u.c.center, Da.radius[sel], a ); a2 = FindAngle(Da.extendSeg[sel].u.c.center,Da.pos[sel]); if (((Da.angle[sel] < 180) && (a2>90 && a2<270)) || - ((Da.angle[sel] > 180) && (a2<90 || a2>270))) { + ((Da.angle[sel] > 180) && (a2<90 || a2>270))) { Da.extendSeg[sel].u.c.a0 = a; Da.extendSeg[sel].u.c.a1 = NormalizeAngle(a2-a); } else { Da.extendSeg[sel].u.c.a0 = a2; Da.extendSeg[sel].u.c.a1 = NormalizeAngle(a-a2); } - if (Da.extendSeg[sel].u.c.a1 == 0 || Da.extendSeg[sel].u.c.a1 >180 ) + if (Da.extendSeg[sel].u.c.a1 == 0 || Da.extendSeg[sel].u.c.a1 >180 ) { Da.extend[sel] = FALSE; - else + } else { Da.extend[sel] = TRUE; + } } } else { Da.extend[sel] = FALSE; @@ -1413,7 +1517,8 @@ EXPORT STATUS_T AdjustCornuCurve( Da.center[sel].y += offset.y; } if (Da.selectTrack) { //We have track - if (!Da.trk[sel] && ((t = OnTrackIgnore(&pos,FALSE,TRUE,Da.selectTrack))!= NULL) ) { + if (!Da.trk[sel] + && ((t = OnTrackIgnore(&pos,FALSE,TRUE,Da.selectTrack))!= NULL) ) { if ((ep = PickUnconnectedEndPointSilent(pos,t))>=0) { pos = GetTrkEndPos(t,ep); if (IsClose(FindDistance(pos,pos)/2)) { @@ -1435,7 +1540,7 @@ EXPORT STATUS_T AdjustCornuCurve( } } } else { //Cornu with ends - if (inside) Da.pos[sel] = pos; + if (inside) { Da.pos[sel] = pos; } if (!GetConnectedTrackParms(Da.trk[sel],pos,sel,Da.ep[sel],inside?FALSE:TRUE)) { wBeep(); return C_CONTINUE; //Stop drawing @@ -1444,32 +1549,34 @@ EXPORT STATUS_T AdjustCornuCurve( if (!inside) { //Extend the track if (Da.trackType[sel] == curveTypeStraight) { //Extend with a straight Da.extendSeg[sel].type = SEG_STRTRK; - Da.extendSeg[sel].width = 0; + Da.extendSeg[sel].lineWidth = 0; Da.extendSeg[sel].color = wDrawColorBlack; if (Da.ep[sel]>=0) { Da.extendSeg[sel].u.l.pos[0] = GetTrkEndPos( Da.trk[sel], Da.ep[sel] ); - a = NormalizeAngle(Da.angle[sel]-FindAngle(pos,GetTrkEndPos(Da.trk[sel],Da.ep[sel]))); + a = NormalizeAngle(Da.angle[sel]-FindAngle(pos,GetTrkEndPos(Da.trk[sel], + Da.ep[sel]))); } else { //Turntable when unconnected Da.extendSeg[sel].u.l.pos[0] = Da.pos[sel]; a = NormalizeAngle(Da.angle[sel]-FindAngle(pos,Da.pos[sel])); } // Remove any extend in opposite direction for Turntable/Turnouts if ((QueryTrack(Da.trk[sel],Q_CAN_ADD_ENDPOINTS) && Da.ep[sel]>=0) - && (!QueryTrack(Da.trk[sel],Q_CORNU_CAN_MODIFY)) - && (a>90 && a<270)) { - Da.extend[sel] = FALSE; //Turntable with point and extension is other side of well + && (!QueryTrack(Da.trk[sel],Q_CORNU_CAN_MODIFY)) + && (a>90 && a<270)) { + Da.extend[sel] = + FALSE; //Turntable with point and extension is other side of well Da.pos[sel] = GetTrkEndPos(Da.trk[sel],Da.ep[sel]); } else { Da.extend[sel] = TRUE; d = FindDistance( Da.extendSeg[sel].u.l.pos[0], pos ); Translate( &Da.extendSeg[sel].u.l.pos[1], - Da.extendSeg[sel].u.l.pos[0], - Da.angle[sel], -d * cos(D2R(a))); + Da.extendSeg[sel].u.l.pos[0], + Da.angle[sel], -d * cos(D2R(a))); Da.pos[sel] = pos = Da.extendSeg[sel].u.l.pos[1]; } } else if (Da.trackType[sel] == curveTypeCurve) { //Extend with temp curve Da.extendSeg[sel].type = SEG_CRVTRK; - Da.extendSeg[sel].width = 0; + Da.extendSeg[sel].lineWidth = 0; Da.extendSeg[sel].color = wDrawColorBlack; Da.extendSeg[sel].u.c.center = Da.center[sel]; Da.extendSeg[sel].u.c.radius = Da.radius[sel]; @@ -1477,7 +1584,7 @@ EXPORT STATUS_T AdjustCornuCurve( PointOnCircle( &pos, Da.center[sel], Da.radius[sel], a ); a2 = FindAngle(Da.center[sel],GetTrkEndPos(Da.trk[sel],Da.ep[sel])); if ((Da.angle[sel] < 180 && (a2>90 && a2 <270)) || - (Da.angle[sel] > 180 && (a2<90 || a2 >270))) { + (Da.angle[sel] > 180 && (a2<90 || a2 >270))) { Da.extendSeg[sel].u.c.a0 = a2; Da.extendSeg[sel].u.c.a1 = NormalizeAngle(a-a2); } else { @@ -1485,9 +1592,11 @@ EXPORT STATUS_T AdjustCornuCurve( Da.extendSeg[sel].u.c.a1 = NormalizeAngle(a2-a); } if (Da.extendSeg[sel].u.c.a1 == 0.0 || Da.extendSeg[sel].u.c.a1 >180 - || (Da.extendSeg[sel].u.c.a0 >= Da.arcA0[sel] && Da.extendSeg[sel].u.c.a0 < Da.arcA0[sel]+Da.arcA1[sel] - && Da.extendSeg[sel].u.c.a0 + Da.extendSeg[sel].u.c.a1 <= Da.arcA0[sel] + Da.arcA1[sel]) - ) { + || (Da.extendSeg[sel].u.c.a0 >= Da.arcA0[sel] + && Da.extendSeg[sel].u.c.a0 < Da.arcA0[sel]+Da.arcA1[sel] + && Da.extendSeg[sel].u.c.a0 + Da.extendSeg[sel].u.c.a1 <= Da.arcA0[sel] + + Da.arcA1[sel]) + ) { Da.extend[sel] = FALSE; Da.pos[sel] = pos; } else { @@ -1501,9 +1610,9 @@ EXPORT STATUS_T AdjustCornuCurve( pos = GetTrkEndPos(Da.trk[sel],Da.ep[sel]); return C_CONTINUE; } - } else Da.pos[sel] = pos; + } else { Da.pos[sel] = pos; } } - } else if (Da.selectMidPoint >=0){ + } else if (Da.selectMidPoint >=0) { DYNARR_N(coOrd,Da.mid_points,Da.selectMidPoint) = pos; } else if (Da.selectEndHandle >=0) { //Cornu has no end, so has handles int end = Da.selectEndHandle/2; @@ -1511,7 +1620,8 @@ EXPORT STATUS_T AdjustCornuCurve( coOrd p0 = Da.pos[end]; //Start coOrd p1 = Da.endHandle[end].end_curve; //End ANGLE_T a0 = FindAngle( p1, p0 ); - DIST_T d0 = FindDistance( p0, p1 )/2.0; //Distance to Middle of Chord + DIST_T d0 = FindDistance( p0, + p1 )/2.0; //Distance to Middle of Chord coOrd pos2 = pos; //New pos Rotate( &pos2, p1, -a0 ); pos2.x -= p1.x; //Deflection at right angles to Chord @@ -1543,37 +1653,46 @@ EXPORT STATUS_T AdjustCornuCurve( Da.radius[end] = 0.0; Da.angle[end] = FindAngle(Da.pos[end],Da.endHandle[end].end_curve); } else { - Translate( &pc, posx, a0, fabs(r) - fabs(pos2.x) ); //Move Radius less Deflection to get to center + Translate( &pc, posx, a0, + fabs(r) - fabs(pos2.x) ); //Move Radius less Deflection to get to center Da.center[end] = pc; - if (DifferenceBetweenAngles(FindAngle(Da.center[end],Da.pos[end]),FindAngle(Da.center[end],Da.endHandle[end].end_curve))>0.0) + if (DifferenceBetweenAngles(FindAngle(Da.center[end],Da.pos[end]), + FindAngle(Da.center[end],Da.endHandle[end].end_curve))>0.0) { Da.angle[end] = NormalizeAngle(FindAngle(Da.center[end],Da.pos[end])+90.0); - else + } else { Da.angle[end] = NormalizeAngle(FindAngle(Da.center[end],Da.pos[end])-90.0); + } Da.radius[end] = fabs(r); } } else { Da.angle[end] = FindAngle(Da.pos[end],pos); Da.radius[end] = 0.0; - Translate(&Da.center[end],Da.pos[end],NormalizeAngle(Da.angle[end]+90.0),Da.radius[end]); + Translate(&Da.center[end],Da.pos[end],NormalizeAngle(Da.angle[end]+90.0), + Da.radius[end]); } } - CreateBothEnds(Da.selectEndPoint,Da.selectMidPoint,Da.selectEndHandle,Da.prevSelected); - SetUpCornuParms(&cp); //In case we want to use these because the ends are not on the track - if (CallCornuM(Da.mid_points,Da.ends,Da.pos,&cp,&Da.crvSegs_da,TRUE)) Da.crvSegs_da_cnt = Da.crvSegs_da.cnt; - else Da.crvSegs_da_cnt = 0; - for (int i=0;i<2;i++) { - if (Da.trk[i] || Da.ends[i]) continue; + CreateBothEnds(Da.selectEndPoint,Da.selectMidPoint,Da.selectEndHandle, + Da.prevSelected); + SetUpCornuParms( + &cp); //In case we want to use these because the ends are not on the track + if (CallCornuM(Da.mid_points,Da.ends,Da.pos,&cp,&Da.crvSegs_da,TRUE)) { Da.crvSegs_da_cnt = Da.crvSegs_da.cnt; } + else { Da.crvSegs_da_cnt = 0; } + for (int i=0; i<2; i++) { + if (Da.trk[i] || Da.ends[i]) { continue; } coOrd p = Da.pos[i]; - Da.angle[i] = NormalizeAngle((i?0:180)+GetAngleSegs( Da.crvSegs_da_cnt, Da.crvSegs_da.ptr, &p, NULL, NULL, NULL, NULL, NULL)); + Da.angle[i] = NormalizeAngle((i?0:180)+GetAngleSegs( Da.crvSegs_da_cnt, + &DYNARR_N(trkSeg_t,Da.crvSegs_da,0), &p, NULL, NULL, NULL, NULL, NULL)); Da.radius[i] = 0.0; } Da.minRadius = CornuMinRadius(Da.pos,Da.crvSegs_da); DIST_T rin = Da.radius[0]; - InfoMessage( _("Cornu : Min Radius=%s MaxRateofCurveChange/Scale=%s Length=%s Winding Arc=%s"), - FormatDistance(Da.minRadius), - FormatFloat(CornuMaxRateofChangeofCurvature(Da.pos,Da.crvSegs_da,&rin)*GetScaleRatio(GetLayoutCurScale())), - FormatDistance(CornuLength(Da.pos,Da.crvSegs_da)), - FormatDistance(CornuTotalWindingArc(Da.pos,Da.crvSegs_da))); + InfoMessage( + _("Cornu : Min Radius=%s MaxRateofCurveChange/Scale=%s Length=%s Winding Arc=%s"), + FormatDistance(Da.minRadius), + FormatFloat(CornuMaxRateofChangeofCurvature(Da.pos,Da.crvSegs_da, + &rin)*GetScaleRatio(GetLayoutCurScale())), + FormatDistance(CornuLength(Da.pos,Da.crvSegs_da)), + FormatDistance(CornuTotalWindingArc(Da.pos,Da.crvSegs_da))); return C_CONTINUE; case C_UP: @@ -1583,27 +1702,30 @@ EXPORT STATUS_T AdjustCornuCurve( return C_CONTINUE; } ep = 0; - if (Da.selectMidPoint!=-1) Da.prevSelected = Da.selectMidPoint; + if (Da.selectMidPoint!=-1) { Da.prevSelected = Da.selectMidPoint; } else if (Da.selectEndPoint!=-1) { if (!Da.trk[Da.selectEndPoint] && - (t=OnTrack(&pos,FALSE,TRUE)) != NULL && t != Da.selectTrack ) { + (t=OnTrack(&pos,FALSE,TRUE)) != NULL && t != Da.selectTrack ) { EPINX_T ep = PickUnconnectedEndPoint(pos,t); if (ep>=0) { - if (QueryTrack(t,Q_HAS_VARIABLE_ENDPOINTS)) { //Circle/Helix find if there is an open slot and where - if ((GetTrkEndTrk(t,0) != NULL) && (GetTrkEndTrk(t,1) != NULL)) { - InfoMessage(_("Helix Already Connected")); - return C_CONTINUE; - } - ep = -1; //Not a real ep yet - } else ep = PickUnconnectedEndPointSilent(pos, t); //EP + if (QueryTrack(t, + Q_HAS_VARIABLE_ENDPOINTS)) { //Circle/Helix find if there is an open slot and where + if ((GetTrkEndTrk(t,0) != NULL) && (GetTrkEndTrk(t,1) != NULL)) { + InfoMessage(_("Helix Already Connected")); + return C_CONTINUE; + } + ep = -1; //Not a real ep yet + } else { ep = PickUnconnectedEndPointSilent(pos, t); } //EP if (ep>=0 && QueryTrack(t,Q_CAN_ADD_ENDPOINTS)) { ep=-1; //Don't attach to Turntable trackParams_t tp; - if (!GetTrackParams(PARAMS_CORNU, t, pos, &tp)) return C_CONTINUE; + if (!GetTrackParams(PARAMS_CORNU, t, pos, &tp)) { return C_CONTINUE; } ANGLE_T a = tp.angle; Translate(&pos,tp.ttcenter,a,tp.ttradius); } - if ( ep==-1 && (!QueryTrack(t,Q_CAN_ADD_ENDPOINTS) && !QueryTrack(t,Q_HAS_VARIABLE_ENDPOINTS))) { //No endpoints and not Turntable or Helix/Circle + if ( ep==-1 && (!QueryTrack(t,Q_CAN_ADD_ENDPOINTS) + && !QueryTrack(t, + Q_HAS_VARIABLE_ENDPOINTS))) { //No endpoints and not Turntable or Helix/Circle wBeep(); InfoMessage(_("No Valid end point on that track")); return C_CONTINUE; @@ -1619,13 +1741,15 @@ EXPORT STATUS_T AdjustCornuCurve( Da.ep[Da.selectEndPoint] = ep; // Note: -1 for Turntable or Circle pos = GetTrkEndPos(t,ep); Da.pos[Da.selectEndPoint] = pos; - if (!GetConnectedTrackParms(t,pos,Da.selectEndPoint,ep,FALSE)) return C_CONTINUE; + if (!GetConnectedTrackParms(t,pos,Da.selectEndPoint,ep,FALSE)) { return C_CONTINUE; } } } else { cornuModCmdContext.angle = NormalizeAngle(Da.angle[Da.selectEndPoint]); cornuModCmdContext.radius = Da.radius[Da.selectEndPoint]; - if (DifferenceBetweenAngles(FindAngle(Da.center[Da.selectEndPoint],Da.pos[Da.selectEndPoint]),Da.angle[Da.selectEndPoint])<0.0) + if (DifferenceBetweenAngles(FindAngle(Da.center[Da.selectEndPoint], + Da.pos[Da.selectEndPoint]),Da.angle[Da.selectEndPoint])<0.0) { cornuModCmdContext.radius = -cornuModCmdContext.radius; + } controls[0] = cornuModEndRadiusPD.control; controls[1] = cornuModEndAnglePD.control; controls[2] = NULL; @@ -1643,8 +1767,10 @@ EXPORT STATUS_T AdjustCornuCurve( Da.prevSelected = Da.selectEndHandle>2?1:0; cornuModCmdContext.angle = NormalizeAngle(Da.angle[Da.prevSelected]); cornuModCmdContext.radius = Da.radius[Da.prevSelected]; - if (DifferenceBetweenAngles(FindAngle(Da.center[Da.prevSelected],Da.pos[Da.prevSelected]),Da.angle[Da.prevSelected])<0.0) + if (DifferenceBetweenAngles(FindAngle(Da.center[Da.prevSelected], + Da.pos[Da.prevSelected]),Da.angle[Da.prevSelected])<0.0) { cornuModCmdContext.radius = -cornuModCmdContext.radius; + } controls[0] = cornuModEndRadiusPD.control; controls[1] = cornuModEndAnglePD.control; controls[2] = NULL; @@ -1658,12 +1784,14 @@ EXPORT STATUS_T AdjustCornuCurve( Da.selectEndHandle = -1; } Da.selectEndPoint = -1; Da.selectMidPoint = -1; - CreateBothEnds(Da.selectEndPoint,Da.selectMidPoint,Da.selectEndHandle,Da.prevSelected); + CreateBothEnds(Da.selectEndPoint,Da.selectMidPoint,Da.selectEndHandle, + Da.prevSelected); SetUpCornuParms(&cp); - if (CallCornuM(Da.mid_points,Da.ends,Da.pos,&cp,&Da.crvSegs_da,TRUE)) Da.crvSegs_da_cnt = Da.crvSegs_da.cnt; - else Da.crvSegs_da_cnt = 0; + if (CallCornuM(Da.mid_points,Da.ends,Da.pos,&cp,&Da.crvSegs_da,TRUE)) { Da.crvSegs_da_cnt = Da.crvSegs_da.cnt; } + else { Da.crvSegs_da_cnt = 0; } Da.minRadius = CornuMinRadius(Da.pos,Da.crvSegs_da); - InfoMessage(_("Pick on point to adjust it along track - Delete to remove, Enter to confirm, ESC to abort")); + InfoMessage( + _("Pick on point to adjust it along track - Delete to remove, Enter to confirm, ESC to abort")); Da.state = PICK_POINT; return C_CONTINUE; @@ -1672,17 +1800,18 @@ EXPORT STATUS_T AdjustCornuCurve( //Delete or backspace deletes last selected index if (action>>8 == 127 || action>>8 == 8) { if ((Da.state == PICK_POINT) && Da.prevSelected !=-1) { - for (int i=Da.prevSelected;i=0) + SetCornuEndPt(i==0?first_trk:trk1,i,GetTrkEndPos(Da.trk[i],Da.ep[i]), + Da.center[i],endAngle,Da.radius[i]); + if (Da.ep[i]>=0) { ConnectTracks(Da.trk[i],Da.ep[i],i==0?first_trk:trk1,i); + } } } UndoEnd(); @@ -1775,12 +1910,11 @@ EXPORT STATUS_T AdjustCornuCurve( return C_CONTINUE; case C_REDRAW: - if (Da.state == NONE) return C_CONTINUE; + if (Da.state == NONE) { return C_CONTINUE; } DrawTempCornu(); - if (anchors_da.cnt) { - DrawSegs( &tempD, zero, 0.0, &anchors(0), anchors_da.cnt, trackGauge, wDrawColorBlack ); - } - if (Da.state == POINT_PICKED) wSetCursor(mainD.d,wCursorNone); + DrawSegsDA( &tempD, NULL, zero, 0.0, &anchors_da, trackGauge, wDrawColorBlack, + 0 ); + if (Da.state == POINT_PICKED) { wSetCursor(mainD.d,wCursorNone); } return C_CONTINUE; case C_CANCEL: case C_FINISH: @@ -1795,14 +1929,14 @@ EXPORT STATUS_T AdjustCornuCurve( } static void cornuModDlgUpdate( - paramGroup_p pg, - int inx, - void * valueP ) + paramGroup_p pg, + int inx, + void * valueP ) { - AdjustCornuCurve(C_UPDATE, zero, InfoMessage); - ParamLoadControl(&cornuModPG,cornuModEndRadius); // Make sure Radius updated - ParamLoadControl(&cornuModPG,cornuModEndAngle); //Relative Angle as well - TempRedraw(); + AdjustCornuCurve(C_UPDATE, zero, InfoMessage); + ParamLoadControl(&cornuModPG,cornuModEndRadius); // Make sure Radius updated + ParamLoadControl(&cornuModPG,cornuModEndAngle); //Relative Angle as well + TempRedraw(); } @@ -1820,7 +1954,9 @@ static void cornuModDlgUpdate( * - C_CANCEL (Esc) sets the state to NONE and reshows the original track unchanged. * */ -STATUS_T CmdCornuModify (track_p trk, wAction_t action, coOrd pos, DIST_T trackG ) { +STATUS_T CmdCornuModify (track_p trk, wAction_t action, coOrd pos, + DIST_T trackG ) +{ Da.trackGauge = trackG; @@ -1833,9 +1969,9 @@ STATUS_T CmdCornuModify (track_p trk, wAction_t action, coOrd pos, DIST_T trackG Da.ep1Segs_da_cnt = 0; Da.ep2Segs_da_cnt = 0; Da.crvSegs_da_cnt = 0; - Da.midSegs.cnt = 0; + DYNARR_RESET( trkSeg_t*, Da.midSegs ); Da.extend[0] = FALSE; - Da.extend[1] = FALSE; + Da.extend[1] = FALSE; Da.selectEndPoint = -1; Da.selectTrack = NULL; DYNARR_RESET(coOrd,Da.mid_points); @@ -1845,9 +1981,9 @@ STATUS_T CmdCornuModify (track_p trk, wAction_t action, coOrd pos, DIST_T trackG Da.selectTrack = trk; DYNARR_APPEND(track_p,Da.tracks,1); DYNARR_LAST(track_p,Da.tracks) = trk; - Da.trk[0] = GetTrkEndTrk( trk, 0 ); - track_p prior = trk; - if (Da.trk[0]) Da.ep[0] = GetEndPtConnectedToMe(Da.trk[0],trk); + Da.trk[0] = GetTrkEndTrk( trk, 0 ); + track_p prior = trk; + if (Da.trk[0]) { Da.ep[0] = GetEndPtConnectedToMe(Da.trk[0],trk); } EPINX_T ep0 = 0; //Move down the LHS adding tracks until no more Cornu while (Da.trk[0] && QueryTrack(Da.trk[0],Q_IS_CORNU)) { @@ -1856,13 +1992,13 @@ STATUS_T CmdCornuModify (track_p trk, wAction_t action, coOrd pos, DIST_T trackG DYNARR_APPEND(track_p,Da.tracks,1); DYNARR_LAST(track_p,Da.tracks) = prior; DYNARR_APPEND(coOrd,Da.mid_points,1); - for (int i=Da.mid_points.cnt-1;i>0;i--) { + for (int i=Da.mid_points.cnt-1; i>0; i--) { DYNARR_N(coOrd,Da.mid_points,i) = DYNARR_N(coOrd,Da.mid_points,i-1); } DYNARR_N(coOrd,Da.mid_points,0) = GetTrkEndPos(prior,1-ep0); Da.trk[0] = GetTrkEndTrk( prior, ep0 ); - if (Da.trk[0]) Da.ep[0] = GetEndPtConnectedToMe(Da.trk[0],prior); - else Da.ep[0] = -1; + if (Da.trk[0]) { Da.ep[0] = GetEndPtConnectedToMe(Da.trk[0],prior); } + else { Da.ep[0] = -1; } } if (prior) { struct extraDataCornu_t *xx0 = GET_EXTRA_DATA(prior, T_CORNU, extraDataCornu_t); @@ -1877,7 +2013,7 @@ STATUS_T CmdCornuModify (track_p trk, wAction_t action, coOrd pos, DIST_T trackG Da.trk[1] = GetTrkEndTrk( trk, 1 ); track_p next = trk; EPINX_T ep1 = 1; - if (Da.trk[1]) Da.ep[1] = GetEndPtConnectedToMe(Da.trk[1],trk); + if (Da.trk[1]) { Da.ep[1] = GetEndPtConnectedToMe(Da.trk[1],trk); } //Move down RHS adding tracks until no more Cornu while (Da.trk[1] && QueryTrack(Da.trk[1],Q_IS_CORNU)) { next = Da.trk[1]; @@ -1887,7 +2023,7 @@ STATUS_T CmdCornuModify (track_p trk, wAction_t action, coOrd pos, DIST_T trackG DYNARR_APPEND(coOrd,Da.mid_points,1); DYNARR_LAST(coOrd,Da.mid_points) = GetTrkEndPos(next,1-ep1); Da.trk[1] = GetTrkEndTrk( next, ep1 ); - if (Da.trk[1]) Da.ep[1] = GetEndPtConnectedToMe(Da.trk[1],next); + if (Da.trk[1]) { Da.ep[1] = GetEndPtConnectedToMe(Da.trk[1],next); } } if (next) { @@ -1900,8 +2036,9 @@ STATUS_T CmdCornuModify (track_p trk, wAction_t action, coOrd pos, DIST_T trackG InfoMessage(_("Now Select or Add (+Shift) a Point")); Da.state = TRACK_SELECTED; - for (int i=0;i>8 != ' ') && (action>>8 != 13) ) + if ( (action>>8 != ' ') && (action>>8 != 13) ) { return C_CONTINUE; - /* no break */ + } + /* no break */ case C_OK: if (infoSubst) { InfoSubstituteControls( NULL, NULL ); @@ -1952,28 +2091,31 @@ STATUS_T CmdCornuModify (track_p trk, wAction_t action, coOrd pos, DIST_T trackG wBeep(); return C_CONTINUE; } - for (int i=0;i<2;i++) { + for (int i=0; i<2; i++) { if (Da.trk[i] && - !(QueryTrack(Da.trk[i],Q_CAN_ADD_ENDPOINTS))) { // Not Turntable + !(QueryTrack(Da.trk[i],Q_CAN_ADD_ENDPOINTS))) { // Not Turntable if (FindDistance(Da.pos[i],GetTrkEndPos(Da.trk[i],1-Da.ep[i])) < minLength) { wBeep(); - InfoMessage(_("Cornu end %d too close to other end of connect track - reposition it"),i+1); + InfoMessage( + _("Cornu end %d too close to other end of connect track - reposition it"),i+1); return C_CONTINUE; } } } UndoStart( _("Modify Cornu"), "newCornu - CR" ); - for (int i=0;i<2;i++) { + for (int i=0; i<2; i++) { if (!Da.trk[i] && Da.extend[i]) { if (Da.extendSeg[i].type == SEG_STRTRK) { - Da.trk[i] = NewStraightTrack(Da.extendSeg[i].u.l.pos[0],Da.extendSeg[i].u.l.pos[1]); - if (Da.trk[i]) Da.ep[i] = 1-i; + Da.trk[i] = NewStraightTrack(Da.extendSeg[i].u.l.pos[0], + Da.extendSeg[i].u.l.pos[1]); + if (Da.trk[i]) { Da.ep[i] = 1-i; } } else { - Da.trk[i] = NewCurvedTrack(Da.extendSeg[i].u.c.center,fabs(Da.extendSeg[i].u.c.radius), - Da.extendSeg[i].u.c.a0,Da.extendSeg[i].u.c.a1,FALSE); + Da.trk[i] = NewCurvedTrack(Da.extendSeg[i].u.c.center, + fabs(Da.extendSeg[i].u.c.radius), + Da.extendSeg[i].u.c.a0,Da.extendSeg[i].u.c.a1,FALSE); if (FindDistance(GetTrkEndPos(Da.trk[i],0),Da.pos[i])<=connectDistance) { Da.ep[i] = 0; - } else Da.ep[i] = 1; + } else { Da.ep[i] = 1; } } if (!Da.trk[i]) { wBeep(); @@ -1991,17 +2133,18 @@ STATUS_T CmdCornuModify (track_p trk, wAction_t action, coOrd pos, DIST_T trackG sub_pos[0] = Da.pos[0]; track_p first_trk= NULL,trk1=NULL,trk2 = NULL; - for (int i=0;i= 0) + SetCornuEndPt(i==0?first_trk:trk1,i,GetTrkEndPos(Da.trk[i],Da.ep[i]), + Da.center[i],endAngle,Da.radius[i]); + if (Da.ep[i]>= 0) { ConnectTracks(i==0?first_trk:trk1,i,Da.trk[i],Da.ep[i]); + } } else { UndoUndo(NULL); wBeep(); @@ -2100,11 +2247,12 @@ STATUS_T CmdCornuModify (track_p trk, wAction_t action, coOrd pos, DIST_T trackG /* * Find length by adding up the underlying segments. The segments can be straights, curves or bezier. */ -DIST_T CornuLength(coOrd pos[4],dynArr_t segs) { +DIST_T CornuLength(coOrd pos[4],dynArr_t segs) +{ DIST_T dd = 0.0; - if (segs.cnt == 0 ) return dd; - for (int i = 0;i0?offset:-offset))*D2R(t.u.c.a1)); @@ -2133,25 +2282,27 @@ DIST_T CornuOffsetLength(dynArr_t segs, double offset) { return dd; } -DIST_T CornuMinRadius(coOrd pos[4],dynArr_t segs) { +DIST_T CornuMinRadius(coOrd pos[4],dynArr_t segs) +{ DIST_T r = DIST_INF, rr; - if (segs.cnt == 0 ) return r; - for (int i = 0;i r_max) r_max = rc; + if (rc > r_max) { r_max = rc; } } * last_c = lc; return r_max; @@ -2206,7 +2359,7 @@ STATUS_T CmdCornu( wAction_t action, coOrd pos ) Da.commandType = CORNU_CREATE; - Da.width = (double)lineWidth/mainD.dpi; + Da.lineWidth = (double)lineWidth; Da.trackGauge = trackGauge; Da.selectTrack = NULL; @@ -2221,7 +2374,7 @@ STATUS_T CmdCornu( wAction_t action, coOrd pos ) Da.selectMidPoint = -1; Da.endHandle[0].end_valid = FALSE; Da.endHandle[1].end_valid = FALSE; - for (int i=0;i<2;i++) { + for (int i=0; i<2; i++) { Da.ends[i] = FALSE; Da.pos[i] = zero; Da.angle[i] = 0.0; @@ -2233,21 +2386,23 @@ STATUS_T CmdCornu( wAction_t action, coOrd pos ) Da.ep1Segs_da_cnt = 0; Da.ep2Segs_da_cnt = 0; Da.crvSegs_da_cnt = 0; - Da.midSegs.cnt = 0; + DYNARR_RESET( trkSeg_t*, Da.midSegs ); DYNARR_RESET(coOrd,Da.mid_points); DYNARR_RESET(track_p,Da.tracks); DYNARR_RESET(trkSeg_t,anchors_da); Da.extend[0] = FALSE; Da.extend[1] = FALSE; - if (Da.cmdType == cornuCmdCreateTrack) + if (Da.cmdType == cornuCmdCreateTrack) { InfoMessage( _("Left click - Start Cornu track") ); - else if (Da.cmdType == cornuCmdHotBar) { + } else if (Da.cmdType == cornuCmdHotBar) { InfoMessage( _("Left click - Place Flextrack") ); } else { - if (selectedTrackCount==0) + if (selectedTrackCount==0) { InfoMessage( _("Left click - join with Cornu track") ); - else - InfoMessage( _("Left click - join with Cornu track, Shift Left click - move to join") ); + } else { + InfoMessage( + _("Left click - join with Cornu track, Shift Left click - move to join") ); + } } return C_CONTINUE; @@ -2257,11 +2412,12 @@ STATUS_T CmdCornu( wAction_t action, coOrd pos ) coOrd p = pos; t = NULL; int end = 0; - if (Da.state != NONE) end=1; + if (Da.state != NONE) { end=1; } EPINX_T ep = -1; //Lock to endpoint if one is available and under pointer if ((t = OnTrack(&p, FALSE, TRUE)) != NULL && t != Da.selectTrack) { - if (QueryTrack(t,Q_HAS_VARIABLE_ENDPOINTS)) { //Circle/Helix find if there is an open slot and where + if (QueryTrack(t, + Q_HAS_VARIABLE_ENDPOINTS)) { //Circle/Helix find if there is an open slot and where if ((GetTrkEndTrk(t,0) != NULL) && (GetTrkEndTrk(t,1) != NULL)) { wBeep(); InfoMessage(_("Helix Already Connected")); @@ -2271,12 +2427,14 @@ STATUS_T CmdCornu( wAction_t action, coOrd pos ) } else if (QueryTrack(t,Q_CAN_ADD_ENDPOINTS)) { ep=-1; //Don't attach to existing Turntable ep trackParams_t tp; - if (!GetTrackParams(PARAMS_CORNU, t, pos, &tp)) return C_CONTINUE; + if (!GetTrackParams(PARAMS_CORNU, t, pos, &tp)) { return C_CONTINUE; } ANGLE_T a = tp.angle; Translate(&pos,tp.ttcenter,a,tp.ttradius); p = pos; //Fix to wall of turntable initially - } else ep = PickUnconnectedEndPointSilent(p, t); //EP - if ( t && ep==-1 && (!QueryTrack(t,Q_CAN_ADD_ENDPOINTS) && !QueryTrack(t,Q_HAS_VARIABLE_ENDPOINTS))) { //No endpoints and not Turntable or Helix/Circle + } else { ep = PickUnconnectedEndPointSilent(p, t); } //EP + if ( t && ep==-1 && (!QueryTrack(t,Q_CAN_ADD_ENDPOINTS) + && !QueryTrack(t, + Q_HAS_VARIABLE_ENDPOINTS))) { //No endpoints and not Turntable or Helix/Circle wBeep(); InfoMessage(_("No valid open endpoint on that track")); t = NULL; @@ -2293,9 +2451,10 @@ STATUS_T CmdCornu( wAction_t action, coOrd pos ) pos = GetTrkEndPos(t,ep); Da.pos[end] = pos; Da.angle[end] = GetTrkEndAngle(t,ep); - } else if (t == NULL) { //end not on Track, OK for CreateCornu -> empty end point + } else if (t == + NULL) { //end not on Track, OK for CreateCornu -> empty end point pos = p; //Reset to initial - if (lock) SnapPos( &pos ); //Only snap if snapped in move + if (lock) { SnapPos( &pos ); } //Only snap if snapped in move if (Da.cmdType == cornuCmdCreateTrack || Da.cmdType == cornuCmdHotBar) { Da.trk[end] = NULL; Da.pos[end] = pos; @@ -2304,25 +2463,28 @@ STATUS_T CmdCornu( wAction_t action, coOrd pos ) Da.state = POS_1; Da.angle[0] = 270.0; Da.radius[0] = 0.0; - Da.ep1Segs_da_cnt = createEndPoint(Da.ep1Segs, Da.pos[0], FALSE,TRUE,TRUE,FALSE,Da.angle[0],Da.radius[0],zero,&Da.endHandle[0]); + Da.ep1Segs_da_cnt = createEndPoint(Da.ep1Segs, Da.pos[0], FALSE,TRUE,TRUE,FALSE, + Da.angle[0],Da.radius[0],zero,&Da.endHandle[0]); Da.ep2Segs_da_cnt = 0; InfoMessage( _("Drag arm in the direction of track") ); return C_CONTINUE; } Da.state = POS_2; //Now this is second end and it is open Da.selectEndPoint = 1; - Da.mid_points.cnt=0; + DYNARR_RESET( trkSeg_t*, Da.midSegs ); Da.angle[1] = GetOpenAngle(Da.pos,Da.angle,1); Da.radius[1] = 0.0; CreateBothEnds(1,-1,-1,-1); SetUpCornuParms(&cp); - if (CallCornuM(Da.mid_points,Da.ends,Da.pos,&cp,&Da.crvSegs_da,TRUE)) - Da.crvSegs_da_cnt = Da.crvSegs_da.cnt; + if (CallCornuM(Da.mid_points,Da.ends,Da.pos,&cp,&Da.crvSegs_da,TRUE)) { + Da.crvSegs_da_cnt = Da.crvSegs_da.cnt; + } InfoMessage( _("Drag arm in the direction of track") ); return C_CONTINUE; } wBeep(); - InfoMessage(_("No Unconnected Track End there")); //Not creating a Cornu - Join can't be open + InfoMessage( + _("No Unconnected Track End there")); //Not creating a Cornu - Join can't be open return C_CONTINUE; } else { Da.pos[end] = p; @@ -2343,16 +2505,17 @@ STATUS_T CmdCornu( wAction_t action, coOrd pos ) } Da.state = POS_1; Da.selectEndPoint = 0; //Select first end point - Da.ep1Segs_da_cnt = createEndPoint(Da.ep1Segs, Da.pos[0], FALSE, !QueryTrack(Da.trk[0],Q_IS_CORNU),QueryTrack(Da.trk[0],Q_CORNU_CAN_MODIFY), - Da.trk[0]!=NULL,Da.angle[0],Da.radius[0],Da.center[0],NULL); + Da.ep1Segs_da_cnt = createEndPoint(Da.ep1Segs, Da.pos[0], FALSE, + !QueryTrack(Da.trk[0],Q_IS_CORNU),QueryTrack(Da.trk[0],Q_CORNU_CAN_MODIFY), + Da.trk[0]!=NULL,Da.angle[0],Da.radius[0],Da.center[0],NULL); InfoMessage( _("Locked - Move 1st end point of Cornu track along track 1") ); return C_CONTINUE; } else { //Second Point if (Da.trk[0] == t) { - ErrorMessage( MSG_JOIN_CORNU_SAME ); - Da.trk[1] = NULL; - Da.ep[1] = -1; - return C_CONTINUE; + ErrorMessage( MSG_JOIN_CORNU_SAME ); + Da.trk[1] = NULL; + Da.ep[1] = -1; + return C_CONTINUE; } if (!GetConnectedTrackParms(t, pos, 1, Da.ep[1],FALSE)) { Da.trk[1] = NULL; //Turntable Fail @@ -2373,8 +2536,9 @@ STATUS_T CmdCornu( wAction_t action, coOrd pos ) } CreateBothEnds(1,-1,-1,-1); SetUpCornuParms(&cp); - if (CallCornuM(Da.mid_points,Da.ends,Da.pos,&cp,&Da.crvSegs_da,TRUE)) + if (CallCornuM(Da.mid_points,Da.ends,Da.pos,&cp,&Da.crvSegs_da,TRUE)) { Da.crvSegs_da_cnt = Da.crvSegs_da.cnt; + } return C_CONTINUE; } else { //This is after both ends exist return AdjustCornuCurve( action&0xFF, pos, InfoMessage ); @@ -2384,27 +2548,30 @@ STATUS_T CmdCornu( wAction_t action, coOrd pos ) case wActionMove: lock = FALSE; DYNARR_RESET(trkSeg_t,anchors_da); - if (Da.state != NONE && Da.state != LOC_2) return C_CONTINUE; - if (Da.trk[0] && Da.trk[1]) return C_CONTINUE; + if (Da.state != NONE && Da.state != LOC_2) { return C_CONTINUE; } + if (Da.trk[0] && Da.trk[1]) { return C_CONTINUE; } EPINX_T ep = -1; t = NULL; if (((MyGetKeyState() & WKEY_ALT) == 0) == magneticSnap) { //Lock to endpoint if one is available and under pointer if ((t = OnTrack(&pos, FALSE, TRUE)) != NULL && t != Da.selectTrack) { - if (QueryTrack(t,Q_HAS_VARIABLE_ENDPOINTS)) { //Circle/Helix find if there is an open slot and where + if (QueryTrack(t, + Q_HAS_VARIABLE_ENDPOINTS)) { //Circle/Helix find if there is an open slot and where if ((GetTrkEndTrk(t,0) != NULL) && (GetTrkEndTrk(t,1) != NULL)) { return C_CONTINUE; } ep = -1; //Not a real ep yet - } else ep = PickUnconnectedEndPointSilent(pos, t); //EP - if (ep>=0 && QueryTrack(t,Q_CAN_ADD_ENDPOINTS)) ep=-1; //Don't attach to Turntable - if ( ep==-1 && (!QueryTrack(t,Q_CAN_ADD_ENDPOINTS) && !QueryTrack(t,Q_HAS_VARIABLE_ENDPOINTS))) { //No endpoints and not Turntable or Helix/Circle + } else { ep = PickUnconnectedEndPointSilent(pos, t); } //EP + if (ep>=0 && QueryTrack(t,Q_CAN_ADD_ENDPOINTS)) { ep=-1; } //Don't attach to Turntable + if ( ep==-1 && (!QueryTrack(t,Q_CAN_ADD_ENDPOINTS) + && !QueryTrack(t, + Q_HAS_VARIABLE_ENDPOINTS))) { //No endpoints and not Turntable or Helix/Circle return C_CONTINUE; } if (GetTrkGauge(t) != GetScaleTrackGauge(GetLayoutCurScale())) { return C_CONTINUE; } - if (Da.state != NONE && t==Da.trk[0]) return C_CONTINUE; + if (Da.state != NONE && t==Da.trk[0]) { return C_CONTINUE; } } } if (ep>=0 && t) { @@ -2412,41 +2579,47 @@ STATUS_T CmdCornu( wAction_t action, coOrd pos ) CreateCornuEndAnchor(pos,TRUE); } else if (t) { trackParams_t tp; //Turntable or extendable track - if (!GetTrackParams(PARAMS_CORNU, t, pos, &tp)) return C_CONTINUE; + if (!GetTrackParams(PARAMS_CORNU, t, pos, &tp)) { return C_CONTINUE; } if (QueryTrack(t,Q_CAN_ADD_ENDPOINTS)) { - if (!GetTrackParams(PARAMS_CORNU, t, pos, &tp)) return C_CONTINUE; + if (!GetTrackParams(PARAMS_CORNU, t, pos, &tp)) { return C_CONTINUE; } ANGLE_T a = tp.angle; Translate(&pos,tp.ttcenter,a,tp.ttradius); CreateCornuEndAnchor(pos,TRUE); - } else CreateCornuEndAnchor(pos,TRUE); + } else { CreateCornuEndAnchor(pos,TRUE); } } else if (SnapPos(&pos)) { CreateCornuEndAnchor(pos,FALSE); lock = TRUE; } return C_CONTINUE; - + case C_MOVE: if (Da.state == NONE) { //First point not created if (Da.cmdType == cornuCmdCreateTrack || Da.cmdType == cornuCmdHotBar) { InfoMessage("Place 1st end point of Cornu track"); - } else + } else if (Da.cmdType == cornuJoinTrack) { + return C_CONTINUE; + } else { InfoMessage("Place 1st end point of Cornu track on unconnected end-point"); + } return C_CONTINUE; } if (Da.state == POS_1) { //First point has been created - if ((Da.cmdType == cornuCmdCreateTrack || Da.cmdType == cornuCmdHotBar) && !Da.trk[0]) { //OK for CreateCornu -> No track selected - if (IsClose(FindDistance(pos,Da.pos[0]))) return C_CONTINUE; + if ((Da.cmdType == cornuCmdCreateTrack || Da.cmdType == cornuCmdHotBar) + && !Da.trk[0]) { //OK for CreateCornu -> No track selected + if (IsClose(FindDistance(pos,Da.pos[0]))) { return C_CONTINUE; } Da.selectEndPoint = 0; Da.angle[0] = NormalizeAngle(FindAngle(Da.pos[0],pos)+180); - Da.ep1Segs_da_cnt = createEndPoint(Da.ep1Segs, Da.pos[0],TRUE,TRUE,TRUE,FALSE,Da.angle[0],0.0,zero,&Da.endHandle[0]); + Da.ep1Segs_da_cnt = createEndPoint(Da.ep1Segs, Da.pos[0],TRUE,TRUE,TRUE,FALSE, + Da.angle[0],0.0,zero,&Da.endHandle[0]); Da.radius[1] = -1.0; /*No end*/ return C_CONTINUE; } EPINX_T ep = 0; - BOOL_T found = FALSE; - int end = Da.state==POS_1?0:1; - if(!QueryTrack(Da.trk[0],Q_CORNU_CAN_MODIFY) && !QueryTrack(Da.trk[0],Q_CAN_ADD_ENDPOINTS)) { +// BOOL_T found = FALSE; +// int end = Da.state==POS_1?0:1; + if(!QueryTrack(Da.trk[0],Q_CORNU_CAN_MODIFY) + && !QueryTrack(Da.trk[0],Q_CAN_ADD_ENDPOINTS)) { InfoMessage(_("Track can't be split - so locked to endpoint")); return C_CONTINUE; } @@ -2464,18 +2637,21 @@ STATUS_T CmdCornu( wAction_t action, coOrd pos ) return C_CONTINUE; } Da.pos[ep] = pos; - Da.ep1Segs_da_cnt = createEndPoint(Da.ep1Segs,Da.pos[0],TRUE,!QueryTrack(Da.trk[0],Q_IS_CORNU),QueryTrack(Da.trk[0],Q_CORNU_CAN_MODIFY), - Da.trk[0]!=NULL,Da.angle[0],Da.radius[0],Da.center[0],NULL); + Da.ep1Segs_da_cnt = createEndPoint(Da.ep1Segs,Da.pos[0],TRUE, + !QueryTrack(Da.trk[0],Q_IS_CORNU),QueryTrack(Da.trk[0],Q_CORNU_CAN_MODIFY), + Da.trk[0]!=NULL,Da.angle[0],Da.radius[0],Da.center[0],NULL); } else if (Da.state == POS_2 && - (Da.cmdType == cornuCmdCreateTrack || Da.cmdType == cornuCmdHotBar) && !Da.trk[1]) { //OK for CreateCornu -> No track selected - if (IsClose(FindDistance(pos,Da.pos[1]))) return C_CONTINUE; + (Da.cmdType == cornuCmdCreateTrack || Da.cmdType == cornuCmdHotBar) + && !Da.trk[1]) { //OK for CreateCornu -> No track selected + if (IsClose(FindDistance(pos,Da.pos[1]))) { return C_CONTINUE; } Da.selectEndPoint = 1; Da.angle[1] = NormalizeAngle(FindAngle(Da.pos[1],pos)+180); Da.radius[1] = 0.0; /*No end*/ - Da.ep1Segs_da_cnt = createEndPoint(Da.ep2Segs,Da.pos[1],TRUE,TRUE,TRUE,FALSE,Da.angle[1],0.0,zero,&Da.endHandle[1]); + Da.ep1Segs_da_cnt = createEndPoint(Da.ep2Segs,Da.pos[1],TRUE,TRUE,TRUE,FALSE, + Da.angle[1],0.0,zero,&Da.endHandle[1]); SetUpCornuParms(&cp); - if (CallCornuM(Da.mid_points,Da.ends,Da.pos,&cp,&Da.crvSegs_da,TRUE)) Da.crvSegs_da_cnt = Da.crvSegs_da.cnt; - else Da.crvSegs_da_cnt = 0; + if (CallCornuM(Da.mid_points,Da.ends,Da.pos,&cp,&Da.crvSegs_da,TRUE)) { Da.crvSegs_da_cnt = Da.crvSegs_da.cnt; } + else { Da.crvSegs_da_cnt = 0; } CreateBothEnds(-1,-1,-1,-1); Da.minRadius = CornuMinRadius(Da.pos,Da.crvSegs_da); return C_CONTINUE; @@ -2485,32 +2661,41 @@ STATUS_T CmdCornu( wAction_t action, coOrd pos ) return C_CONTINUE; case C_UP: - if (Da.state == POS_1 && (Da.cmdType == cornuCmdCreateTrack || Da.cmdType == cornuCmdHotBar || Da.trk[0])) { + if (Da.state == POS_1 && (Da.cmdType == cornuCmdCreateTrack + || Da.cmdType == cornuCmdHotBar || Da.trk[0])) { Da.state = LOC_2; Da.selectEndPoint = -1; if (Da.cmdType == cornuCmdCreateTrack || Da.cmdType == cornuCmdHotBar) { - if (Da.cmdType == cornuCmdCreateTrack) + if (Da.cmdType == cornuCmdCreateTrack) { InfoMessage( _("Pick other end of Cornu") ); - else - InfoMessage( _("Select flextrack ends or anchors and drag, Enter to approve, Esc to Cancel") ); - Da.ep1Segs_da_cnt = createEndPoint(Da.ep1Segs, Da.pos[0],FALSE,TRUE,TRUE,FALSE,0.0,0.0,zero,NULL); + } else { + InfoMessage( + _("Select flextrack ends or anchors and drag, Enter to approve, Esc to Cancel") ); + } + Da.ep1Segs_da_cnt = createEndPoint(Da.ep1Segs, Da.pos[0],FALSE,TRUE,TRUE,FALSE, + 0.0,0.0,zero,NULL); return C_CONTINUE; } - InfoMessage( _("Put other end of Cornu on a track with an unconnected end point") ); + InfoMessage( + _("Put other end of Cornu on a track with an unconnected end point") ); if (Da.trk[0]) - Da.ep1Segs_da_cnt = createEndPoint(Da.ep1Segs, Da.pos[0], FALSE,!QueryTrack(Da.trk[0],Q_IS_CORNU),QueryTrack(Da.trk[0],Q_CORNU_CAN_MODIFY), - Da.trk[0]!=NULL,Da.angle[0],Da.radius[0],Da.center[0],NULL); - else - Da.ep1Segs_da_cnt = createEndPoint(Da.ep1Segs, Da.pos[0], FALSE,TRUE,TRUE,FALSE, Da.angle[0],Da.radius[0],Da.center[0],&Da.endHandle[0]); + Da.ep1Segs_da_cnt = createEndPoint(Da.ep1Segs, Da.pos[0], FALSE, + !QueryTrack(Da.trk[0],Q_IS_CORNU),QueryTrack(Da.trk[0],Q_CORNU_CAN_MODIFY), + Da.trk[0]!=NULL,Da.angle[0],Da.radius[0],Da.center[0],NULL); + else { + Da.ep1Segs_da_cnt = createEndPoint(Da.ep1Segs, Da.pos[0], FALSE,TRUE,TRUE,FALSE, + Da.angle[0],Da.radius[0],Da.center[0],&Da.endHandle[0]); + } return C_CONTINUE; - } else if (Da.state == POS_2 && (Da.cmdType == cornuCmdCreateTrack || Da.cmdType == cornuCmdHotBar || Da.trk[1] )){ + } else if (Da.state == POS_2 && (Da.cmdType == cornuCmdCreateTrack + || Da.cmdType == cornuCmdHotBar || Da.trk[1] )) { Da.state = PICK_POINT; Da.selectEndPoint = -1; Da.prevEndPoint = 1; Da.prevSelected = -1; SetUpCornuParms(&cp); - if (CallCornuM(Da.mid_points,Da.ends,Da.pos,&cp,&Da.crvSegs_da,TRUE)) Da.crvSegs_da_cnt = Da.crvSegs_da.cnt; - else Da.crvSegs_da_cnt = 0; + if (CallCornuM(Da.mid_points,Da.ends,Da.pos,&cp,&Da.crvSegs_da,TRUE)) { Da.crvSegs_da_cnt = Da.crvSegs_da.cnt; } + else { Da.crvSegs_da_cnt = 0; } CreateBothEnds(-1,-1,-1,-1); Da.minRadius = CornuMinRadius(Da.pos,Da.crvSegs_da); return C_CONTINUE; @@ -2520,21 +2705,23 @@ STATUS_T CmdCornu( wAction_t action, coOrd pos ) return C_CONTINUE; break; case C_TEXT: - if (Da.state != PICK_POINT) return C_CONTINUE; - if ((action>>8 == 127) || (action>>8 == 8)) // - return AdjustCornuCurve(action, pos, InfoMessage); - if (!(action>>8 == 32 )) //Space is same as Enter. - return C_CONTINUE; - /* no break */ - case C_OK: - if (Da.state != PICK_POINT) return C_CONTINUE; - STATUS_T rc = AdjustCornuCurve( C_OK, pos, InfoMessage); - if (rc == C_TERMINATE) { - Da.state = NONE; - Da.ep1Segs_da_cnt = 0; + if (Da.state != PICK_POINT) { return C_CONTINUE; } + if ((action>>8 == 127) || (action>>8 == 8)) { // + return AdjustCornuCurve(action, pos, InfoMessage); + } + if (!(action>>8 == 32 )) { //Space is same as Enter. + return C_CONTINUE; + } + /* no break */ + case C_OK: + if (Da.state != PICK_POINT) { return C_CONTINUE; } + STATUS_T rc = AdjustCornuCurve( C_OK, pos, InfoMessage); + if (rc == C_TERMINATE) { + Da.state = NONE; + Da.ep1Segs_da_cnt = 0; Da.ep2Segs_da_cnt = 0; Da.crvSegs_da_cnt = 0; - for (int i=0;i<2;i++) { + for (int i=0; i<2; i++) { Da.radius[i] = 0.0; Da.angle[i] = 0.0; Da.center[i] = zero; @@ -2544,22 +2731,24 @@ STATUS_T CmdCornu( wAction_t action, coOrd pos ) Da.endHandle[i].end_valid = FALSE; } SetAllTrackSelect( FALSE ); - } - return rc; + } + return rc; case C_REDRAW: wSetCursor(mainD.d,defaultCursor); DrawHighlightBoxes(FALSE,FALSE,NULL); HighlightSelectedTracks(NULL, TRUE, TRUE); if ( Da.state != NONE ) { - DrawCornuCurve(NULL,Da.ep1Segs,Da.ep1Segs_da_cnt,Da.ep2Segs,Da.ep2Segs_da_cnt,(trkSeg_t *)Da.crvSegs_da.ptr,Da.crvSegs_da_cnt, NULL, - Da.extend[0]?&Da.extendSeg[0]:NULL,Da.extend[1]?&Da.extendSeg[1]:NULL,(trkSeg_t *)Da.midSegs.ptr,Da.midSegs.cnt,wDrawColorBlack); + DrawCornuCurve(NULL,Da.ep1Segs,Da.ep1Segs_da_cnt,Da.ep2Segs,Da.ep2Segs_da_cnt, + &DYNARR_N(trkSeg_t,Da.crvSegs_da,0),Da.crvSegs_da_cnt, NULL, + Da.extend[0]?&Da.extendSeg[0]:NULL,Da.extend[1]?&Da.extendSeg[1]:NULL, + &DYNARR_N(trkSeg_t,Da.midSegs,0),Da.midSegs.cnt,wDrawColorBlack); } - if (anchors_da.cnt) - DrawSegs( &tempD, zero, 0.0, &anchors(0), anchors_da.cnt, trackGauge, wDrawColorBlack ); - if (MyGetKeyState()&WKEY_SHIFT) DrawHighlightBoxes(FALSE,FALSE,NULL); + DrawSegsDA( &tempD, NULL, zero, 0.0, &anchors_da, trackGauge, wDrawColorBlack, + 0 ); + if (MyGetKeyState()&WKEY_SHIFT) { DrawHighlightBoxes(FALSE,FALSE,NULL); } - if (Da.state == POINT_PICKED) wSetCursor(mainD.d,wCursorNone); + if (Da.state == POINT_PICKED) { wSetCursor(mainD.d,wCursorNone); } return C_CONTINUE; @@ -2568,7 +2757,7 @@ STATUS_T CmdCornu( wAction_t action, coOrd pos ) Da.ep1Segs_da_cnt = 0; Da.ep2Segs_da_cnt = 0; Da.crvSegs_da_cnt = 0; - for (int i=0;i<2;i++) { + for (int i=0; i<2; i++) { Da.radius[i] = 0.0; Da.angle[i] = 0.0; Da.center[i] = zero; @@ -2586,20 +2775,21 @@ STATUS_T CmdCornu( wAction_t action, coOrd pos ) infoSubst = FALSE; } return C_CONTINUE; - + default: - return C_CONTINUE; + return C_CONTINUE; } return C_CONTINUE; } -BOOL_T GetTracksFromCornuTrack(track_p trk, track_p newTracks[2]) { +BOOL_T GetTracksFromCornuTrack(track_p trk, track_p newTracks[2]) +{ track_p trk_old = NULL; newTracks[0] = NULL, newTracks[1] = NULL; struct extraDataCornu_t * xx = GET_EXTRA_DATA(trk, T_CORNU, extraDataCornu_t); - if (!IsTrack(trk)) return FALSE; - for (int i=0; iarcSegs.cnt;i++) { + if (!IsTrack(trk)) { return FALSE; } + for (int i=0; iarcSegs.cnt; i++) { track_p bezTrack[2]; bezTrack[0] = NULL, bezTrack[1] = NULL; trkSeg_p seg = &DYNARR_N(trkSeg_t,xx->arcSegs,i); @@ -2607,15 +2797,17 @@ BOOL_T GetTracksFromCornuTrack(track_p trk, track_p newTracks[2]) { DYNARR_RESET(trkSeg_t,seg->bezSegs); FixUpBezierSeg(seg->u.b.pos,seg,TRUE); GetTracksFromBezierSegment(seg, bezTrack, trk); - if (newTracks[0] == NULL) newTracks[0] = bezTrack[0]; + if (newTracks[0] == NULL) { newTracks[0] = bezTrack[0]; } newTracks[1] = bezTrack[1]; if (trk_old) { - for (int i=0;i<2;i++) { + for (int i=0; i<2; i++) { if (GetTrkEndTrk(trk_old,i)==NULL) { coOrd pos = GetTrkEndPos(trk_old,i); EPINX_T ep_n = PickUnconnectedEndPoint(pos,bezTrack[0]); - if ((connectDistance >= FindDistance(GetTrkEndPos(trk_old,i),GetTrkEndPos(bezTrack[0],ep_n))) && - (connectAngle >= fabs(DifferenceBetweenAngles(GetTrkEndAngle(trk_old,i),GetTrkEndAngle(bezTrack[0],ep_n)+180))) ) { + if ((connectDistance >= FindDistance(GetTrkEndPos(trk_old,i), + GetTrkEndPos(bezTrack[0],ep_n))) && + (connectAngle >= fabs(DifferenceBetweenAngles(GetTrkEndAngle(trk_old,i), + GetTrkEndAngle(bezTrack[0],ep_n)+180))) ) { ConnectTracks(trk_old,i,bezTrack[0],ep_n); break; } @@ -2624,21 +2816,25 @@ BOOL_T GetTracksFromCornuTrack(track_p trk, track_p newTracks[2]) { } trk_old = newTracks[1]; } else { - track_p new_trk; - if (seg->type == SEG_CRVTRK) - new_trk = NewCurvedTrack(seg->u.c.center,seg->u.c.radius,seg->u.c.a0,seg->u.c.a1,0); - else if (seg->type == SEG_STRTRK) + track_p new_trk = NULL; + if (seg->type == SEG_CRVTRK) { + new_trk = NewCurvedTrack(seg->u.c.center,seg->u.c.radius,seg->u.c.a0, + seg->u.c.a1,0); + } else if (seg->type == SEG_STRTRK) { new_trk = NewStraightTrack(seg->u.l.pos[0],seg->u.l.pos[1]); - if (newTracks[0] == NULL) newTracks[0] = new_trk; + } + if (newTracks[0] == NULL) { newTracks[0] = new_trk; } CopyAttributes( trk, new_trk ); newTracks[1] = new_trk; if (trk_old) { - for (int i=0;i<2;i++) { + for (int i=0; i<2; i++) { if (GetTrkEndTrk(trk_old,i)==NULL) { coOrd pos = GetTrkEndPos(trk_old,i); EPINX_T ep_n = PickUnconnectedEndPoint(pos,new_trk); - if ((connectDistance >= FindDistance(GetTrkEndPos(trk_old,i),GetTrkEndPos(new_trk,ep_n))) && - (connectAngle >= fabs(DifferenceBetweenAngles(GetTrkEndAngle(trk_old,i),GetTrkEndAngle(new_trk,ep_n)+180)))) { + if ((connectDistance >= FindDistance(GetTrkEndPos(trk_old,i), + GetTrkEndPos(new_trk,ep_n))) && + (connectAngle >= fabs(DifferenceBetweenAngles(GetTrkEndAngle(trk_old,i), + GetTrkEndAngle(new_trk,ep_n)+180)))) { ConnectTracks(trk_old,i,new_trk,ep_n); break; } @@ -2653,8 +2849,9 @@ BOOL_T GetTracksFromCornuTrack(track_p trk, track_p newTracks[2]) { } static STATUS_T cmdCornuCreate( - wAction_t action, - coOrd pos ) { + wAction_t action, + coOrd pos ) +{ static int createState = 0; int rc = 0; @@ -2669,8 +2866,9 @@ static STATUS_T cmdCornuCreate( if (createState != 0 ) { createState = 0; CmdCornu( C_OK, pos ); - } else + } else { CmdCornu( C_CANCEL, pos ); + } Da.prevSelected = -1; Da.selectEndHandle = -1; Da.selectEndPoint = -1; @@ -2683,9 +2881,10 @@ static STATUS_T cmdCornuCreate( Da.endHandle[0].end_valid = Da.endHandle[1].end_valid = FALSE; return C_TERMINATE; case C_TEXT: - if ((action>>8) != ' ' && (action>>8) != 32) + if ((action>>8) != ' ' && (action>>8) != 32) { return CmdCornu(action,pos); - /*no break*/ + } + /*no break*/ case C_OK: CmdCornu(C_OK,pos); MainRedraw(); @@ -2695,7 +2894,7 @@ static STATUS_T cmdCornuCreate( CmdCornu(C_CANCEL, pos); createState = 0; rc = C_TERMINATE; - /* no break */ + /* no break */ case C_START: createState = 0; commandContext = I2VP(cornuCmdHotBar); @@ -2718,344 +2917,364 @@ static STATUS_T cmdCornuCreate( } static STATUS_T CmdConvertTo( - wAction_t action, - coOrd pos ) + wAction_t action, + coOrd pos ) { static track_p trk; cornuParm_t cp; switch (action) { case wActionMove: - if ((trk = OnTrack(&pos,FALSE,TRUE)) == NULL) return C_CONTINUE; + if ((trk = OnTrack(&pos,FALSE,TRUE)) == NULL) { return C_CONTINUE; } if (!QueryTrack(trk, Q_CORNU_CAN_MODIFY) && //Not Fixed Track/Turnout/Turntable - !QueryTrack(trk, Q_IGNORE_EASEMENT_ON_EXTEND )) + !QueryTrack(trk, Q_IGNORE_EASEMENT_ON_EXTEND )) { trk = NULL; + } return C_CONTINUE; case C_LCLICK: - if ((trk = OnTrack(&pos,FALSE,TRUE))!=NULL) { - SetTrkBits(trk,TB_SELECTED); - selectedTrackCount = 1; - } else { - wBeep(); - InfoMessage( _("Not on a Track") ); - return C_CONTINUE; - } - trk = NULL; + if ((trk = OnTrack(&pos,FALSE,TRUE))!=NULL) { + SetTrkBits(trk,TB_SELECTED); + selectedTrackCount = 1; + } else { + wBeep(); + InfoMessage( _("Not on a Track") ); + return C_CONTINUE; + } + trk = NULL; - /* no break */ + /* no break */ case C_START: - if (selectedTrackCount==0) { - InfoMessage( _("Select a Track To Convert") ); - return C_CONTINUE; + if (selectedTrackCount==0) { + InfoMessage( _("Select a Track To Convert") ); + return C_CONTINUE; + } else if (selectedTrackCount>1) { + if (NoticeMessage(_("Convert all Selected Tracks to Cornu Tracks?"), _("Yes"), + _("No"))<=0) { + SetAllTrackSelect(FALSE); + return C_TERMINATE; } - else if (selectedTrackCount>1) { - if (NoticeMessage(_("Convert all Selected Tracks to Cornu Tracks?"), _("Yes"), _("No"))<=0) { - SetAllTrackSelect(FALSE); - return C_TERMINATE; - } + } + UndoStart( _("Convert Cornu"),"newCornu curves"); + trk = NULL; + int converted=0, not_convertable = 0, created=0, deleted=0; + DYNARR_RESET(track_p,Da.tracks); + while ( TrackIterate( &trk ) ) { + if (!GetTrkSelected( trk )) { continue; } //Only selected + if (!QueryTrack(trk, Q_CORNU_CAN_MODIFY) && //Not Fixed Track/Turnout/Turntable + !QueryTrack( trk, Q_IGNORE_EASEMENT_ON_EXTEND )) { //But Yes to Easement + not_convertable++; + continue; } - UndoStart( _("Convert Cornu"),"newCornu curves"); - trk = NULL; - int converted=0, not_convertable = 0, created=0, deleted=0; - DYNARR_RESET(track_p,Da.tracks); - while ( TrackIterate( &trk ) ) { - if (!GetTrkSelected( trk )) continue; //Only selected - if (!QueryTrack(trk, Q_CORNU_CAN_MODIFY) && //Not Fixed Track/Turnout/Turntable - !QueryTrack( trk, Q_IGNORE_EASEMENT_ON_EXTEND )) { //But Yes to Easement - not_convertable++; - continue; + converted++; + DYNARR_RESET(trkSeg_t,Da.crvSegs_da); + Da.ep1Segs_da_cnt = 0; + Da.ep2Segs_da_cnt = 0; + DYNARR_RESET( trkSeg_t*, Da.midSegs ); + Da.extend[0] = FALSE; + Da.extend[1] = FALSE; + Da.selectEndPoint = -1; + Da.selectTrack = NULL; + DYNARR_RESET(coOrd,Da.mid_points); + ClrTrkBits( trk, TB_SELECTED ); //Done with this one + Da.selectTrack = trk; + DYNARR_APPEND(track_p,Da.tracks,1); + DYNARR_LAST(track_p,Da.tracks) = trk; + Da.trk[0] = GetTrkEndTrk( trk, 0 ); + track_p prior = trk; + if (Da.trk[0]) { Da.ep[0] = GetEndPtConnectedToMe(Da.trk[0],trk); } + else { Da.ep[0] = -1; } + EPINX_T ep0 = 0; + //Move down the LHS adding tracks until no more Selected or not modifyable + while (Da.trk[0] && GetTrkSelected( Da.trk[0]) && IsTrack(Da.trk[0]) + && (QueryTrack(Da.trk[0], Q_CORNU_CAN_MODIFY) + || QueryTrack(Da.trk[0], Q_IS_CORNU)) ) { + prior = Da.trk[0]; + ep0 = 1-Da.ep[0]; + ClrTrkBits( Da.trk[0], TB_SELECTED ); //Done with this one + if (selectedTrackCount>0) { selectedTrackCount--; } + DYNARR_APPEND(track_p,Da.tracks,1); + DYNARR_LAST(track_p,Da.tracks) = prior; + DYNARR_APPEND(coOrd,Da.mid_points,1); + for (int i=Da.mid_points.cnt-1; i>1; i--) { + DYNARR_N(coOrd,Da.mid_points,i) = DYNARR_N(coOrd,Da.mid_points,i-1); } + DYNARR_N(coOrd,Da.mid_points,0) = GetTrkEndPos(prior,1-ep0); + Da.trk[0] = GetTrkEndTrk( prior, ep0 ); + if (Da.trk[0]) { Da.ep[0] = GetEndPtConnectedToMe(Da.trk[0],prior); } + else { Da.ep[0] = -1; } converted++; - DYNARR_RESET(trkSeg_t,Da.crvSegs_da); - Da.ep1Segs_da_cnt = 0; - Da.ep2Segs_da_cnt = 0; - Da.midSegs.cnt = 0; - Da.extend[0] = FALSE; - Da.extend[1] = FALSE; - Da.selectEndPoint = -1; - Da.selectTrack = NULL; - DYNARR_RESET(coOrd,Da.mid_points); - ClrTrkBits( trk, TB_SELECTED ); //Done with this one - Da.selectTrack = trk; + } + Da.radius[0] = -1.0; //Initialize with no end + Da.ends[0] = FALSE; + Da.center[0] = zero; + Da.pos[0] = GetTrkEndPos(prior,ep0); + if (Da.trk[0] && Da.ep[0]>=0) { + GetConnectedTrackParms(Da.trk[0],GetTrkEndPos(Da.trk[0],Da.ep[0]),0,Da.ep[0], + FALSE); + } + + //Move to RHS + + Da.trk[1] = GetTrkEndTrk( trk, 1 ); + track_p next = trk; + EPINX_T ep1 = 1; + if (Da.trk[1]) { Da.ep[1] = GetEndPtConnectedToMe(Da.trk[1],trk); } + else { Da.ep[1] = -1; } + //Move down RHS adding tracks until no more Selected or not modifyable + while (Da.trk[1] && GetTrkSelected( Da.trk[1]) + && (QueryTrack(Da.trk[1], Q_CORNU_CAN_MODIFY) + || QueryTrack(Da.trk[1], Q_IS_CORNU))) { + next = Da.trk[1]; + ep1 = 1-Da.ep[1]; + if (selectedTrackCount>0) { selectedTrackCount--; } + ClrTrkBits( Da.trk[1], TB_SELECTED ); //Done with this one DYNARR_APPEND(track_p,Da.tracks,1); - DYNARR_LAST(track_p,Da.tracks) = trk; - Da.trk[0] = GetTrkEndTrk( trk, 0 ); - track_p prior = trk; - if (Da.trk[0]) Da.ep[0] = GetEndPtConnectedToMe(Da.trk[0],trk); - else Da.ep[0] = -1; - EPINX_T ep0 = 0; - //Move down the LHS adding tracks until no more Selected or not modifyable - while (Da.trk[0] && GetTrkSelected( Da.trk[0]) && IsTrack(Da.trk[0]) && (QueryTrack(Da.trk[0], Q_CORNU_CAN_MODIFY) || QueryTrack(Da.trk[0], Q_IS_CORNU)) ) { - prior = Da.trk[0]; - ep0 = 1-Da.ep[0]; - ClrTrkBits( Da.trk[0], TB_SELECTED ); //Done with this one - if (selectedTrackCount>0) selectedTrackCount--; - DYNARR_APPEND(track_p,Da.tracks,1); - DYNARR_LAST(track_p,Da.tracks) = prior; - DYNARR_APPEND(coOrd,Da.mid_points,1); - for (int i=Da.mid_points.cnt-1;i>1;i--) { - DYNARR_N(coOrd,Da.mid_points,i) = DYNARR_N(coOrd,Da.mid_points,i-1); - } - DYNARR_N(coOrd,Da.mid_points,0) = GetTrkEndPos(prior,1-ep0); - Da.trk[0] = GetTrkEndTrk( prior, ep0 ); - if (Da.trk[0]) Da.ep[0] = GetEndPtConnectedToMe(Da.trk[0],prior); - else Da.ep[0] = -1; - converted++; - } - Da.radius[0] = -1.0; //Initialize with no end - Da.ends[0] = FALSE; - Da.center[0] = zero; - Da.pos[0] = GetTrkEndPos(prior,ep0); - if (Da.trk[0] && Da.ep[0]>=0) { - GetConnectedTrackParms(Da.trk[0],GetTrkEndPos(Da.trk[0],Da.ep[0]),0,Da.ep[0],FALSE); - } + DYNARR_LAST(track_p,Da.tracks) = next; + DYNARR_APPEND(coOrd,Da.mid_points,1); + DYNARR_LAST(coOrd,Da.mid_points) = GetTrkEndPos(next,1-ep1); + Da.trk[1] = GetTrkEndTrk( next, ep1 ); + if (Da.trk[1]) { Da.ep[1] = GetEndPtConnectedToMe(Da.trk[1],next); } + converted++; + } + Da.radius[1] = -1.0; //Initialize with no end + Da.ends[1] = FALSE; + Da.center[1] = zero; + Da.pos[1] = GetTrkEndPos(next,ep1); + if (Da.trk[1] && Da.ep[1]>=0) { + GetConnectedTrackParms(Da.trk[1],GetTrkEndPos(Da.trk[1],Da.ep[1]),1,Da.ep[1], + FALSE); + } + SetUpCornuParms(&cp); + if (CallCornuM(Da.mid_points,Da.ends,Da.pos,&cp,&Da.crvSegs_da,TRUE)) { Da.crvSegs_da_cnt = Da.crvSegs_da.cnt; } + else { continue; } //Checks that a solution can be found - //Move to RHS - - Da.trk[1] = GetTrkEndTrk( trk, 1 ); - track_p next = trk; - EPINX_T ep1 = 1; - if (Da.trk[1]) Da.ep[1] = GetEndPtConnectedToMe(Da.trk[1],trk); - else Da.ep[1] = -1; - //Move down RHS adding tracks until no more Selected or not modifyable - while (Da.trk[1] && GetTrkSelected( Da.trk[1]) && (QueryTrack(Da.trk[1], Q_CORNU_CAN_MODIFY) || QueryTrack(Da.trk[1], Q_IS_CORNU))) { - next = Da.trk[1]; - ep1 = 1-Da.ep[1]; - if (selectedTrackCount>0) selectedTrackCount--; - ClrTrkBits( Da.trk[1], TB_SELECTED ); //Done with this one - DYNARR_APPEND(track_p,Da.tracks,1); - DYNARR_LAST(track_p,Da.tracks) = next; - DYNARR_APPEND(coOrd,Da.mid_points,1); - DYNARR_LAST(coOrd,Da.mid_points) = GetTrkEndPos(next,1-ep1); - Da.trk[1] = GetTrkEndTrk( next, ep1 ); - if (Da.trk[1]) Da.ep[1] = GetEndPtConnectedToMe(Da.trk[1],next); - converted++; - } - Da.radius[1] = -1.0; //Initialize with no end - Da.ends[1] = FALSE; - Da.center[1] = zero; - Da.pos[1] = GetTrkEndPos(next,ep1); - if (Da.trk[1] && Da.ep[1]>=0) { - GetConnectedTrackParms(Da.trk[1],GetTrkEndPos(Da.trk[1],Da.ep[1]),1,Da.ep[1],FALSE); - } - SetUpCornuParms(&cp); - if (CallCornuM(Da.mid_points,Da.ends,Da.pos,&cp,&Da.crvSegs_da,TRUE)) Da.crvSegs_da_cnt = Da.crvSegs_da.cnt; - else continue; //Checks that a solution can be found - - // Do the deed - Create a replacement Cornu - - BOOL_T end_point[2]; - end_point[0] = TRUE; - end_point[1] = FALSE; - coOrd sub_pos[2]; - sub_pos[0] = Da.pos[0]; - if (Da.radius[0] == -1) end_point[0] = FALSE; - track_p first_trk= NULL,trk1=NULL,trk2 = NULL; - - for (int i=0;i=0 && Da.trk[i]) { + track_p trk_old = GetTrkEndTrk(Da.trk[i],Da.ep[i]); + EPINX_T old_ep = GetEndPtConnectedToMe(trk_old,Da.trk[i]); + DisconnectTracks(Da.trk[i],Da.ep[i],trk_old,old_ep); if (Da.ep[i]>=0 && Da.trk[i]) { - track_p trk_old = GetTrkEndTrk(Da.trk[i],Da.ep[i]); - EPINX_T old_ep = GetEndPtConnectedToMe(trk_old,Da.trk[i]); - DisconnectTracks(Da.trk[i],Da.ep[i],trk_old,old_ep); - if (Da.ep[i]>=0 && Da.trk[i]) - ConnectTracks(Da.trk[i],Da.ep[i],i==0?first_trk:trk1,i); + ConnectTracks(Da.trk[i],Da.ep[i],i==0?first_trk:trk1,i); } } - - } //Find next track - SetAllTrackSelect(FALSE); - //Get rid of old tracks - for (int i = 0; i1) { + if (NoticeMessage(_("Convert all Selected Tracks to Fixed Tracks?"), _("Yes"), + _("No"))<=0) { + SetAllTrackSelect(FALSE); + return C_TERMINATE; } - else if (selectedTrackCount>1) { - if (NoticeMessage(_("Convert all Selected Tracks to Fixed Tracks?"), _("Yes"), _("No"))<=0) { - SetAllTrackSelect(FALSE); - return C_TERMINATE; + } +// dynArr_t trackSegs_da; +// DYNARR_RESET(trkSeg_t,trackSegs_da); + trk1 = NULL; +// trk2 = NULL; + trk = NULL; + UndoStart( _("Convert Bezier and Cornu"),"Try to convert all selected tracks"); + track_p tracks[2]; + DYNARR_RESET(track_p,Da.tracks); + int converted=0, not_convertable = 0, deleted=0; +// int created=0; + while ( TrackIterate( &trk1 ) ) { + if ( GetTrkSelected( trk1 ) && IsTrack( trk1 ) ) { + //Only Cornu or Bezier + tracks[0] = NULL, tracks[1] = NULL; + if (selectedTrackCount>0) { selectedTrackCount--; } + ClrTrkBits( trk1, TB_SELECTED ); //Done with this one + if (GetTrkType(trk1) == T_CORNU) { + GetTracksFromCornuTrack(trk1,tracks); + DYNARR_APPEND(track_p,Da.tracks,1); + DYNARR_LAST(track_p,Da.tracks) = trk1; + converted++; + } else if (GetTrkType(trk1) == T_BEZIER) { + GetTracksFromBezierTrack(trk1,tracks); + DYNARR_APPEND(track_p,Da.tracks,1); + DYNARR_LAST(track_p,Da.tracks) = trk1; + converted++; + } else { + not_convertable++; + continue; } - } - dynArr_t trackSegs_da; - DYNARR_RESET(trkSeg_t,trackSegs_da); - trk1 = NULL; - trk2 = NULL; - trk = NULL; - UndoStart( _("Convert Bezier and Cornu"),"Try to convert all selected tracks"); - track_p tracks[2]; - DYNARR_RESET(track_p,Da.tracks); - int converted=0, not_convertable = 0, created=0, deleted=0; - while ( TrackIterate( &trk1 ) ) { - if ( GetTrkSelected( trk1 ) && IsTrack( trk1 ) ) { - //Only Cornu or Bezier - tracks[0] = NULL, tracks[1] = NULL; - if (selectedTrackCount>0) selectedTrackCount--; - ClrTrkBits( trk1, TB_SELECTED ); //Done with this one - if (GetTrkType(trk1) == T_CORNU) { - GetTracksFromCornuTrack(trk1,tracks); - DYNARR_APPEND(track_p,Da.tracks,1); - DYNARR_LAST(track_p,Da.tracks) = trk1; - converted++; - } else if (GetTrkType(trk1) == T_BEZIER) { - GetTracksFromBezierTrack(trk1,tracks); - DYNARR_APPEND(track_p,Da.tracks,1); - DYNARR_LAST(track_p,Da.tracks) = trk1; - converted++; - } else { - not_convertable++; - continue; - } - for (int i=0;i<2;i++) { - track_p trk2 = GetTrkEndTrk(trk1,i); - if (trk2) { - EPINX_T ep1 = GetEndPtConnectedToMe( trk2, trk1 ); - DisconnectTracks(trk2,ep1,trk1,i); - pos = GetTrkEndPos(trk2,ep1); - for (int j=0;j<2;j++) { - EPINX_T ep2 = PickUnconnectedEndPointSilent( pos, tracks[j] ); - coOrd ep_pos; - if (ep2<0) continue; - ep_pos = GetTrkEndPos(tracks[j],ep2); - if (connectDistance>=FindDistance(pos,ep_pos) && - connectAngle >= fabs(DifferenceBetweenAngles(GetTrkEndAngle(tracks[j],ep2),GetTrkEndAngle(trk2,ep1)+180))) { - ConnectTracks(trk2,ep1,tracks[j],ep2); - break; - } + for (int i=0; i<2; i++) { + track_p trk2 = GetTrkEndTrk(trk1,i); + if (trk2) { + EPINX_T ep1 = GetEndPtConnectedToMe( trk2, trk1 ); + DisconnectTracks(trk2,ep1,trk1,i); + pos = GetTrkEndPos(trk2,ep1); + for (int j=0; j<2; j++) { + EPINX_T ep2 = PickUnconnectedEndPointSilent( pos, tracks[j] ); + coOrd ep_pos; + if (ep2<0) { continue; } + ep_pos = GetTrkEndPos(tracks[j],ep2); + if (connectDistance>=FindDistance(pos,ep_pos) && + connectAngle >= fabs(DifferenceBetweenAngles(GetTrkEndAngle(tracks[j],ep2), + GetTrkEndAngle(trk2,ep1)+180))) { + ConnectTracks(trk2,ep1,tracks[j],ep2); + break; } } } } } - SetAllTrackSelect(FALSE); - for (int i = 0; i 90.0 && angle2 < 270.0) - Translate( &pos, Da.pos0, angle1, -FindDistance( Da.pos0, pos )*cos(D2R(angle2)) ); - else pos = Da.pos0; + if (angle2 > 90.0 && angle2 < 270.0) { + Translate( &pos, Da.pos0, angle1, -FindDistance( Da.pos0, + pos )*cos(D2R(angle2)) ); + } else { pos = Da.pos0; } } else if ( mode == crvCmdFromChord ) { DIST_T dp = -FindDistance(Da.pos0, pos)*sin(D2R(angle2)); - if (DifferenceBetweenAngles(FindAngle(Da.pos0,pos),angle1)>0) + if (DifferenceBetweenAngles(FindAngle(Da.pos0,pos),angle1)>0) { Translate( &pos, Da.pos0, angle1+90, dp ); - else + } else { Translate( &pos, Da.pos0, angle1-90, -dp ); + } } else if (mode == crvCmdFromCenter) { DIST_T dp = -FindDistance(Da.pos0, pos)*sin(D2R(angle2)); - if (angle2 > 90 && angle2 < 270.0) + if (angle2 > 90 && angle2 < 270.0) { Translate( &pos, Da.pos0, angle1+90.0, dp ); - else + } else { Translate( &pos, Da.pos0, angle1-90.0, dp ); + } } else if (mode == crvCmdFromTangent) { DIST_T dp = FindDistance(Da.pos0, pos)*sin(D2R(angle2)); Translate( &pos, Da.pos0, angle1-90.0, dp ); } - } else if (track) SnapPos(&pos); - tempSegs_da.cnt =1; + } else if (track) { SnapPos(&pos); } + DYNARR_SET( trkSeg_t, tempSegs_da, 1 ); if (Da.trk && mode == crvCmdFromChord) { tempSegs(0).type = SEG_CRVTRK; tempSegs(0).u.c.center.x = (pos.x+Da.pos0.x)/2.0; tempSegs(0).u.c.center.y = (pos.y+Da.pos0.y)/2.0; tempSegs(0).u.c.radius = FindDistance(pos,Da.pos0)/2; ANGLE_T a0 = FindAngle(tempSegs(0).u.c.center,Da.pos0); - ANGLE_T a1 = FindAngle(tempSegs(0).u.c.center,pos); - if (NormalizeAngle(a0+90-GetTrkEndAngle(Da.trk,Da.ep))<90) { - tempSegs(0).u.c.a0 = a0; - } else { - tempSegs(0).u.c.a0 = a1; + if ( NormalizeAngle( GetTrkEndAngle(Da.trk,Da.ep) - a0 ) > 180.0 ) { + a0 = NormalizeAngle( a0 + 180.0 ); } + tempSegs(0).u.c.a0 = a0; tempSegs(0).u.c.a1 = 180.0; - } else tempSegs(0).u.l.pos[1] = pos; + } else { tempSegs(0).u.l.pos[1] = pos; } Da.pos1 = pos; d = FindDistance( Da.pos0, Da.pos1 ); a = FindAngle( Da.pos0, Da.pos1 ); switch ( mode ) { case crvCmdFromEP1: - if (Da.trk) message( _("Start Locked: Drag out curve start - Angle=%0.3f"), PutAngle(a)); - else message( _("Drag out curve start - Angle=%0.3f"), PutAngle(a) ); + if (Da.trk) { message( _("Start Locked: Drag out curve start - Angle=%0.3f"), PutAngle(a)); } + else { message( _("Drag out curve start - Angle=%0.3f"), PutAngle(a) ); } CreateEndAnchor(Da.pos0,anchor_array,Da.lock0); - DrawArrowHeadsArray( anchor_array, pos, FindAngle(Da.pos0,Da.pos1)+90, TRUE, wDrawColorBlue ); - tempSegs_da.cnt = 1; + DrawArrowHeadsArray( anchor_array, pos, FindAngle(Da.pos0,Da.pos1)+90, TRUE, + wDrawColorBlue ); + DYNARR_SET( trkSeg_t, tempSegs_da, 1 ); break; case crvCmdFromTangent: - if (Da.trk) message( _("Tangent locked: Drag out center - Radius=%s Angle=%0.3f"), FormatDistance(d), PutAngle(a) ); - else message( _("Drag out center - Radius=%s Angle=%0.3f"), FormatDistance(d), PutAngle(a) ); + if (Da.trk) { message( _("Tangent locked: Drag out center - Radius=%s Angle=%0.3f"), FormatDistance(d), PutAngle(a) ); } + else { message( _("Drag out center - Radius=%s Angle=%0.3f"), FormatDistance(d), PutAngle(a) ); } CreateEndAnchor(Da.pos1,anchor_array,TRUE); - DrawArrowHeadsArray( anchor_array, Da.pos0, FindAngle(Da.pos0,Da.pos1)+90, TRUE, wDrawColorBlue ); - tempSegs_da.cnt = 1; + DrawArrowHeadsArray( anchor_array, Da.pos0, FindAngle(Da.pos0,Da.pos1)+90, TRUE, + wDrawColorBlue ); + DYNARR_SET( trkSeg_t, tempSegs_da, 1 ); break; case crvCmdFromCenter: - message( _("Drag to Edge: Radius=%s Angle=%0.3f"), FormatDistance(d), PutAngle(a) ); + message( _("Drag to Edge: Radius=%s Angle=%0.3f"), FormatDistance(d), + PutAngle(a) ); CreateEndAnchor(Da.pos0,anchor_array,Da.lock0); - DrawArrowHeadsArray( anchor_array, Da.pos1, FindAngle(Da.pos1,Da.pos0)+90, TRUE, wDrawColorBlue ); - tempSegs_da.cnt = 1; + DrawArrowHeadsArray( anchor_array, Da.pos1, FindAngle(Da.pos1,Da.pos0)+90, TRUE, + wDrawColorBlue ); + DYNARR_SET( trkSeg_t, tempSegs_da, 1 ); break; case crvCmdFromChord: - if (Da.trk) message( _("Start locked: Drag out chord length=%s angle=%0.3f"), FormatDistance(d), PutAngle(a) ); - else message( _("Drag out chord length=%s angle=%0.3f"), FormatDistance(d), PutAngle(a) ); + if (Da.trk) { message( _("Start locked: Drag out chord length=%s angle=%0.3f"), FormatDistance(d), PutAngle(a) ); } + else { message( _("Drag out chord length=%s angle=%0.3f"), FormatDistance(d), PutAngle(a) ); } Da.middle.x = (Da.pos1.x+Da.pos0.x)/2.0; Da.middle.y = (Da.pos1.y+Da.pos0.y)/2.0; if (track && Da.trk) { @@ -349,20 +363,23 @@ EXPORT STATUS_T CreateCurve( } CreateEndAnchor(Da.pos0,anchor_array,TRUE); CreateEndAnchor(Da.pos1,anchor_array,FALSE); - if (!track || !Da.trk) - DrawArrowHeadsArray( anchor_array, Da.middle, FindAngle(Da.pos0,Da.pos1)+90, TRUE, wDrawColorBlue ); + if (!track || !Da.trk) { + DrawArrowHeadsArray( anchor_array, Da.middle, FindAngle(Da.pos0,Da.pos1)+90, + TRUE, wDrawColorBlue ); + } break; } return C_CONTINUE; case C_UP: /* Note - no anchor reset - assumes run after Down/Move */ - if (!Da.down) return C_CONTINUE; + if (!Da.down) { return C_CONTINUE; } if (Da.trk) { angle1 = NormalizeAngle(GetTrkEndAngle(Da.trk, Da.ep)); angle2 = NormalizeAngle(FindAngle(pos, Da.pos0)-angle1); if (mode == crvCmdFromEP1) { - if (angle2 > 90.0 && angle2 < 270.0) { - Translate( &pos, Da.pos0, angle1, -FindDistance( Da.pos0, pos )*cos(D2R(angle2)) ); + if (angle2 > 90.0 && angle2 < 270.0) { + Translate( &pos, Da.pos0, angle1, -FindDistance( Da.pos0, + pos )*cos(D2R(angle2)) ); Da.pos1 = pos; } else { ErrorMessage( MSG_TRK_TOO_SHORT, "Curved ", PutDim(0.0) ); @@ -374,23 +391,25 @@ EXPORT STATUS_T CreateCurve( Da.pos1 = pos; } else { DIST_T dp = -FindDistance(Da.pos0, pos)*sin(D2R(angle2)); - if (angle2 > 180.0) + if (angle2 > 180.0) { Translate( &pos, Da.pos0, angle1+90.0, dp ); - else + } else { Translate( &pos, Da.pos0, angle1-90.0, dp ); + } Da.pos1 = pos; } if (FindDistance(Da.pos0,Da.pos1) mapD.size.x+mapD.size.y ) { ErrorMessage( MSG_CURVE_TOO_LARGE ); - tempSegs_da.cnt = 0; + DYNARR_RESET( trkSeg_t, tempSegs_da ); Da.curveData.type = curveTypeNone; return C_CONTINUE; } InfoMessage( _("Curved Track: Radius=%s Angle=%0.3f Length=%s"), - FormatDistance(Da.curveData.curveRadius), Da.curveData.a1, - FormatDistance(Da.curveData.curveRadius*d) ); + FormatDistance(Da.curveData.curveRadius), Da.curveData.a1, + FormatDistance(Da.curveData.curveRadius*d) ); coOrd pos1; - Translate(&pos1,Da.curveData.curvePos,Da.curveData.a0+Da.curveData.a1,Da.curveData.curveRadius); - if (curveMode == crvCmdFromEP1 || curveMode == crvCmdFromChord) - DrawArrowHeadsArray(&anchors_da,pos,FindAngle(Da.curveData.curvePos,pos),TRUE,wDrawColorRed); - else if (curveMode == crvCmdFromTangent || curveMode == crvCmdFromCenter) { - if (Da.curveData.curveRadius == desired_radius) + Translate(&pos1,Da.curveData.curvePos,Da.curveData.a0+Da.curveData.a1, + Da.curveData.curveRadius); + if (curveMode == crvCmdFromEP1 || curveMode == crvCmdFromChord) { + DrawArrowHeadsArray(&anchors_da,pos,FindAngle(Da.curveData.curvePos,pos),TRUE, + wDrawColorRed); + } else if (curveMode == crvCmdFromTangent || curveMode == crvCmdFromCenter) { + if (Da.curveData.curveRadius == desired_radius) { CreateEndAnchor(Da.curveData.pos2,&anchors_da,TRUE); - else + } else { CreateEndAnchor(Da.curveData.pos2,&anchors_da,FALSE); - DrawArrowHeadsArray(&anchors_da,Da.curveData.pos2,FindAngle(Da.curveData.curvePos,Da.curveData.pos2)+90,TRUE,wDrawColorRed); + } + DrawArrowHeadsArray(&anchors_da,Da.curveData.pos2, + FindAngle(Da.curveData.curvePos,Da.curveData.pos2)+90,TRUE,wDrawColorRed); } - if (Da.curveData.curveRadius == desired_radius) + if (Da.curveData.curveRadius == desired_radius) { CreateEndAnchor(Da.curveData.curvePos,&anchors_da,TRUE); - else + } else { CreateEndAnchor(Da.curveData.curvePos,&anchors_da,FALSE); + } } } return rc; case C_TEXT: - if ( Da.state == 0 ) - return CreateCurve( action, pos, TRUE, wDrawColorBlack, 0, curveMode, &anchors_da, InfoMessage ); - /*no break*/ + if ( Da.state == 0 ) { + return CreateCurve( action, pos, TRUE, wDrawColorBlack, 0, curveMode, + &anchors_da, InfoMessage ); + } + /*no break*/ case C_UP: - if (Da.state<0) return C_CONTINUE; - if (Da.state == 0 && ((curveMode != crvCmdFromChord) || (curveMode == crvCmdFromChord && !Da.trk))) { + if (Da.state<0) { return C_CONTINUE; } + if (Da.state == 0 && ((curveMode != crvCmdFromChord) + || (curveMode == crvCmdFromChord && !Da.trk))) { //SnapPos( &pos ); //Da.pos1 = pos; if ((d = FindDistance(Da.pos0,Da.pos1))= 0 ) { - DrawSegs( &tempD, zero, 0.0, &tempSegs(0), tempSegs_da.cnt, trackGauge, wDrawColorBlack ); + DrawSegsDA( &tempD, NULL, zero, 0.0, &tempSegs_da, trackGauge, wDrawColorBlack, + 0 ); } - if (anchors_da.cnt) - DrawSegs( &tempD, zero, 0.0, &anchors(0), anchors_da.cnt, trackGauge, wDrawColorBlack ); + DrawSegsDA( &tempD, NULL, zero, 0.0, &anchors_da, trackGauge, wDrawColorBlack, + 0 ); return C_CONTINUE; case C_CANCEL: if (Da.state == 1) { - tempSegs_da.cnt = 0; Da.trk = NULL; } DYNARR_RESET(trkSeg_t,anchors_da); @@ -695,24 +730,27 @@ static paramData_t helixPLs[] = { { PD_FLOAT, &helixGrade, "grade", 0, &r0_100, N_("Grade") }, { PD_FLOAT, &helixVertSep, "vertSep", PDO_DIM, &r0_1000000, N_("Vertical Separation") }, #define I_HELIXMSG (6) - { PD_MESSAGE, N_("Total Length"), NULL, PDO_DLGRESETMARGIN, I2VP(200) } }; + { PD_MESSAGE, N_("Total Length"), NULL, PDO_DLGRESETMARGIN, I2VP(200) } +}; static paramGroup_t helixPG = { "helix", PGO_PREFMISCGROUP, helixPLs, COUNT( helixPLs ) }; static paramData_t circleRadiusPLs[] = { - { PD_FLOAT, &circleRadius, "radius", PDO_DIM, &r1_10000 } }; + { PD_FLOAT, &circleRadius, "radius", PDO_DIM, &r1_10000 } +}; static paramGroup_t circleRadiusPG = { "circle", 0, circleRadiusPLs, COUNT( circleRadiusPLs ) }; static void ComputeHelix( - paramGroup_p pg, - int h_inx, - void * data ) + paramGroup_p pg, + int h_inx, + void * data ) { DIST_T totTurns; DIST_T length; long updates = 0; - if ( h_inx < 0 || h_inx >= COUNT( h_orders ) ) + if ( h_inx < 0 || h_inx >= COUNT( h_orders ) ) { return; + } ParamLoadData( &helixPG ); totTurns = helixTurns + helixAngSep/360.0; length = totTurns * helixRadius * (2 * M_PI); @@ -720,7 +758,7 @@ static void ComputeHelix( switch ( h_inx ) { case H_ELEV: if (h_orders[H_TURNS] 0.0) { + origVertSep > 0.0) { helixTurns = (int)floor(helixElev/origVertSep - helixAngSep/360.0); totTurns = helixTurns + helixAngSep/360.0; updates |= (1< 0.0 ) { if ( h_orders[H_RADIUS]>=h_orders[H_GRADE] || - (helixGrade==0.0 && totTurns>0 && helixRadius>0) ) { + (helixGrade==0.0 && totTurns>0 && helixRadius>0) ) { if ( helixRadius > 0.0 ) { helixGrade = helixElev/(totTurns*helixRadius*(2*M_PI))*100.0; updates |= (1<>=1 ) { - if ( (updates&1) ) + if ( (updates&1) ) { ParamLoadControl( &helixPG, h_inx ); + } } - if (length > 0.0) + if (length > 0.0) { sprintf( message, _("Total Length %s"), FormatDistance(length) ); - else + } else { strcpy( message, " " ); + } ParamLoadMessage( &helixPG, I_HELIXMSG, message ); } @@ -787,8 +827,8 @@ static void HelixCancel( wWin_p win ) static void ChangeHelixW( long changes ) { if ( (changes & CHANGE_UNITS) && - helixW != NULL && - wWinIsVisible(helixW) ) { + helixW != NULL && + wWinIsVisible(helixW) ) { ParamLoadControls( &helixPG ); ComputeHelix( NULL, 6, NULL ); } @@ -808,8 +848,10 @@ static STATUS_T CmdCircleCommon( wAction_t action, coOrd pos, BOOL_T helix ) case C_START: if (helix) { - if (helixW == NULL) - helixW = ParamCreateDialog(&helixPG, MakeWindowTitle(_("Helix")), NULL, NULL, HelixCancel, TRUE, NULL, 0, ComputeHelix); + if (helixW == NULL) { + helixW = ParamCreateDialog(&helixPG, MakeWindowTitle(_("Helix")), NULL, NULL, + HelixCancel, TRUE, NULL, 0, ComputeHelix); + } ParamLoadControls(&helixPG); ParamGroupRecord(&helixPG); ComputeHelix(NULL, 6, NULL); @@ -837,12 +879,10 @@ static STATUS_T CmdCircleCommon( wAction_t action, coOrd pos, BOOL_T helix ) } } SetAllTrackSelect( FALSE ); - tempSegs_da.cnt = 0; + DYNARR_RESET( trkSeg_t, tempSegs_da ); return C_CONTINUE; case C_DOWN: - DYNARR_SET(trkSeg_t, tempSegs_da, 1); - tempSegs_da.cnt = 0; if (helix) { if (helixRadius <= 0.0) { ErrorMessage(MSG_RADIUS_GTR_0); @@ -873,13 +913,14 @@ static STATUS_T CmdCircleCommon( wAction_t action, coOrd pos, BOOL_T helix ) } } SnapPos(&pos); - tempSegs(0).u.c.center = pos0 = pos; - tempSegs(0).color = wDrawColorBlack; - tempSegs(0).width = 0; + DYNARR_RESET(trkSeg_t, tempSegs_da); + pos0 = pos; return C_CONTINUE; case C_MOVE: SnapPos(&pos); + DYNARR_SET( trkSeg_t, tempSegs_da, 1 ); + tempSegs(0).type = SEG_CRVTRK; tempSegs(0).u.c.center = pos; if (!helix) { switch (circleMode) { @@ -896,11 +937,11 @@ static STATUS_T CmdCircleCommon( wAction_t action, coOrd pos, BOOL_T helix ) break; } } - tempSegs(0).type = SEG_CRVTRK; + tempSegs(0).color = wDrawColorBlack; + tempSegs(0).lineWidth = 0; tempSegs(0).u.c.radius = helix ? helixRadius : circleRadius; tempSegs(0).u.c.a0 = 0.0; tempSegs(0).u.c.a1 = 360.0; - tempSegs_da.cnt = 1; return C_CONTINUE; case C_UP: @@ -933,22 +974,25 @@ static STATUS_T CmdCircleCommon( wAction_t action, coOrd pos, BOOL_T helix ) } UndoEnd(); DrawNewTrack(t); - if (helix) + if (helix) { wHide( helixW ); - else + } else { InfoSubstituteControls( NULL, NULL ); - tempSegs_da.cnt = 0; + } + DYNARR_RESET( trkSeg_t, tempSegs_da ); return C_TERMINATE; case C_REDRAW: - DrawSegs( &tempD, zero, 0.0, &tempSegs(0), tempSegs_da.cnt, trackGauge, wDrawColorBlack ); + DrawSegsDA( &tempD, NULL, zero, 0.0, &tempSegs_da, trackGauge, wDrawColorBlack, + 0 ); return C_CONTINUE; case C_CANCEL: - if (helix) + if (helix) { wHide( helixW ); - else + } else { InfoSubstituteControls( NULL, NULL ); + } return C_CONTINUE; default: @@ -971,31 +1015,50 @@ static STATUS_T CmdHelix( wAction_t action, coOrd pos ) return CmdCircleCommon( action, pos, TRUE ); } -#include "bitmaps/curved-end.xpm" -#include "bitmaps/curved-tangent.xpm" -#include "bitmaps/curved-middle.xpm" -#include "bitmaps/curved-chord.xpm" -#include "bitmaps/bezier-track.xpm" -#include "bitmaps/cornu.xpm" -#include "bitmaps/circle.xpm" -#include "bitmaps/circle-tangent.xpm" -#include "bitmaps/circle-center.xpm" +#include "bitmaps/curved-end.xpm3" +#include "bitmaps/curved-tangent.xpm3" +#include "bitmaps/curved-middle.xpm3" +#include "bitmaps/curved-chord.xpm3" +#include "bitmaps/bezier-track.xpm3" +#include "bitmaps/cornu.xpm3" +#include "bitmaps/circle.xpm3" +#include "bitmaps/circle-tangent.xpm3" +#include "bitmaps/circle-center.xpm3" +// #include "bitmaps/helix.xpm" EXPORT void InitCmdCurve( wMenu_p menu ) { ButtonGroupBegin( _("Curve Track"), "cmdCurveSetCmd", _("Curve Tracks") ); - AddMenuButton( menu, CmdCurve, "cmdCurveEndPt", _("Curve from End-Pt"), wIconCreatePixMap( curved_end_xpm[iconSize] ), LEVEL0_50, IC_STICKY|IC_POPUP2|IC_WANT_MOVE, ACCL_CURVE1, I2VP(0) ); - AddMenuButton( menu, CmdCurve, "cmdCurveTangent", _("Curve from Tangent"), wIconCreatePixMap( curved_tangent_xpm[iconSize] ), LEVEL0_50, IC_STICKY|IC_POPUP2|IC_WANT_MOVE, ACCL_CURVE2, I2VP(1) ); - AddMenuButton( menu, CmdCurve, "cmdCurveCenter", _("Curve from Center"), wIconCreatePixMap( curved_middle_xpm[iconSize] ), LEVEL0_50, IC_STICKY|IC_POPUP2|IC_WANT_MOVE, ACCL_CURVE3, I2VP(2) ); - AddMenuButton( menu, CmdCurve, "cmdCurveChord", _("Curve from Chord"), wIconCreatePixMap( curved_chord_xpm[iconSize] ), LEVEL0_50, IC_STICKY|IC_POPUP2|IC_WANT_MOVE, ACCL_CURVE4, I2VP(3) ); - AddMenuButton( menu, CmdBezCurve, "cmdBezier", _("Bezier Curve"), wIconCreatePixMap( bezier_track_xpm[iconSize] ), LEVEL0_50, IC_STICKY|IC_POPUP2|IC_WANT_MOVE, ACCL_BEZIER, I2VP(bezCmdCreateTrack) ); - AddMenuButton( menu, CmdCornu, "cmdCornu", _("Cornu Curve"), wIconCreatePixMap( cornu_xpm[iconSize] ), LEVEL0_50, IC_STICKY|IC_POPUP2|IC_WANT_MOVE, ACCL_CORNU, I2VP(cornuCmdCreateTrack)); + AddMenuButton( menu, CmdCurve, "cmdCurveEndPt", _("Curve from End-Pt"), + wIconCreatePixMap( curved_end_xpm3[iconSize] ), LEVEL0_50, + IC_STICKY|IC_POPUP2|IC_WANT_MOVE, ACCL_CURVE1, I2VP(0) ); + AddMenuButton( menu, CmdCurve, "cmdCurveTangent", _("Curve from Tangent"), + wIconCreatePixMap( curved_tangent_xpm3[iconSize] ), LEVEL0_50, + IC_STICKY|IC_POPUP2|IC_WANT_MOVE, ACCL_CURVE2, I2VP(1) ); + AddMenuButton( menu, CmdCurve, "cmdCurveCenter", _("Curve from Center"), + wIconCreatePixMap( curved_middle_xpm3[iconSize] ), LEVEL0_50, + IC_STICKY|IC_POPUP2|IC_WANT_MOVE, ACCL_CURVE3, I2VP(2) ); + AddMenuButton( menu, CmdCurve, "cmdCurveChord", _("Curve from Chord"), + wIconCreatePixMap( curved_chord_xpm3[iconSize] ), LEVEL0_50, + IC_STICKY|IC_POPUP2|IC_WANT_MOVE, ACCL_CURVE4, I2VP(3) ); + AddMenuButton( menu, CmdBezCurve, "cmdBezier", _("Bezier Curve"), + wIconCreatePixMap( bezier_track_xpm3[iconSize] ), LEVEL0_50, + IC_STICKY|IC_POPUP2|IC_WANT_MOVE, ACCL_BEZIER, I2VP(bezCmdCreateTrack) ); + AddMenuButton( menu, CmdCornu, "cmdCornu", _("Cornu Curve"), + wIconCreatePixMap( cornu_xpm3[iconSize] ), LEVEL0_50, + IC_STICKY|IC_POPUP2|IC_WANT_MOVE, ACCL_CORNU, I2VP(cornuCmdCreateTrack)); ButtonGroupEnd(); ButtonGroupBegin( _("Circle Track"), "cmdCircleSetCmd", _("Circle Tracks") ); - AddMenuButton( menu, CmdCircle, "cmdCircleFixedRadius", _("Fixed Radius Circle"), wIconCreatePixMap( circle_xpm[iconSize] ), LEVEL0_50, IC_STICKY|IC_POPUP2, ACCL_CIRCLE1, I2VP(0) ); - AddMenuButton( menu, CmdCircle, "cmdCircleTangent", _("Circle from Tangent"), wIconCreatePixMap( circle_tangent_xpm[iconSize] ), LEVEL0_50, IC_STICKY|IC_POPUP2, ACCL_CIRCLE2, I2VP(1) ); - AddMenuButton( menu, CmdCircle, "cmdCircleCenter", _("Circle from Center"), wIconCreatePixMap( circle_center_xpm[iconSize] ), LEVEL0_50, IC_STICKY|IC_POPUP2, ACCL_CIRCLE3, I2VP(2) ); + AddMenuButton( menu, CmdCircle, "cmdCircleFixedRadius", + _("Fixed Radius Circle"), wIconCreatePixMap( circle_xpm3[iconSize] ), LEVEL0_50, + IC_STICKY|IC_POPUP2, ACCL_CIRCLE1, I2VP(0) ); + AddMenuButton( menu, CmdCircle, "cmdCircleTangent", _("Circle from Tangent"), + wIconCreatePixMap( circle_tangent_xpm3[iconSize] ), LEVEL0_50, + IC_STICKY|IC_POPUP2, ACCL_CIRCLE2, I2VP(1) ); + AddMenuButton( menu, CmdCircle, "cmdCircleCenter", _("Circle from Center"), + wIconCreatePixMap( circle_center_xpm3[iconSize] ), LEVEL0_50, + IC_STICKY|IC_POPUP2, ACCL_CIRCLE3, I2VP(2) ); ButtonGroupEnd(); ParamRegister( &circleRadiusPG ); @@ -1013,8 +1076,8 @@ EXPORT void InitCmdCurve( wMenu_p menu ) void InitCmdHelix(wMenu_p menu) { - AddMenuButton(menu, CmdHelix, "cmdHelix", _("Helix"), NULL, LEVEL0_50, - IC_STICKY|IC_INITNOTSTICKY|IC_POPUP2, ACCL_HELIX, NULL); - ParamRegister(&helixPG); - RegisterChangeNotification(ChangeHelixW); + AddMenuButton(menu, CmdHelix, "cmdHelix", _("Helix"), NULL, LEVEL0_50, + IC_STICKY|IC_INITNOTSTICKY|IC_POPUP2, ACCL_HELIX, NULL); + ParamRegister(&helixPG); + RegisterChangeNotification(ChangeHelixW); } diff --git a/app/bin/ccurve.h b/app/bin/ccurve.h index 7ae4227..07122f9 100644 --- a/app/bin/ccurve.h +++ b/app/bin/ccurve.h @@ -17,7 +17,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef HAVE_CCURVE_H @@ -27,14 +27,14 @@ #include "track.h" //- curveType_e typedef struct { - curveType_e type; - coOrd curvePos; - coOrd pos1; - coOrd pos2; - DIST_T curveRadius; - ANGLE_T a0, a1; - BOOL_T negative; - } curveData_t; + curveType_e type; + coOrd curvePos; + coOrd pos1; + coOrd pos2; + DIST_T curveRadius; + ANGLE_T a0, a1; + BOOL_T negative; +} curveData_t; #define crvCmdFromEP1 (0) #define crvCmdFromTangent (1) @@ -47,14 +47,17 @@ typedef struct { #define circleCmdFromCenter (2) typedef void (*curveMessageProc)( const char *, ... ); -STATUS_T CreateCurve( wAction_t, coOrd, BOOL_T, wDrawColor, DIST_T, long, dynArr_t *,curveMessageProc ); +STATUS_T CreateCurve( wAction_t, coOrd, BOOL_T, wDrawColor, DIST_T, long, + dynArr_t *,curveMessageProc ); int IsCurveCircle( track_p ); void PlotCurve( long, coOrd, coOrd, coOrd, curveData_t *, BOOL_T, DIST_T ); track_p NewCurvedTrack( coOrd, DIST_T, ANGLE_T, ANGLE_T, long ); DIST_T CurveDescriptionDistance( coOrd, track_p, coOrd *, BOOL_T, BOOL_T * ); STATUS_T CurveDescriptionMove( track_p, wAction_t, coOrd ); -BOOL_T GetCurveMiddle( track_p , coOrd * ); -int DrawArrowHeads(trkSeg_p sp, coOrd pos, ANGLE_T angle, BOOL_T bidirectional, wDrawColor color ); -int DrawArrowHeadsArray(dynArr_t *anchor_array,coOrd pos,ANGLE_T angle,BOOL_T bidirectional,wDrawColor color ); +BOOL_T GetCurveMiddle( track_p, coOrd * ); +int DrawArrowHeads(trkSeg_p sp, coOrd pos, ANGLE_T angle, BOOL_T bidirectional, + wDrawColor color ); +int DrawArrowHeadsArray(dynArr_t *anchor_array,coOrd pos,ANGLE_T angle, + BOOL_T bidirectional,wDrawColor color ); #endif // !HAVE_CCURVE_H diff --git a/app/bin/cdraw.c b/app/bin/cdraw.c index b6cc035..4d52408 100644 --- a/app/bin/cdraw.c +++ b/app/bin/cdraw.c @@ -2,23 +2,23 @@ * Drawing of geometric elements */ - /* XTrkCad - Model Railroad CAD - * Copyright (C) 2005 Dave Bullis - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ +/* XTrkCad - Model Railroad CAD + * Copyright (C) 2005 Dave Bullis + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ #include "common.h" #include "ccurve.h" @@ -27,10 +27,11 @@ #include "fileio.h" #include "param.h" #include "track.h" +#include "tbezier.h" #include "misc.h" #include "cselect.h" +#include "cundo.h" #include "common-ui.h" -extern TRKTYP_T T_BZRLIN; static wMenu_p drawModDelMI; static wMenu_p drawModLinMI; @@ -56,35 +57,32 @@ static wMenuPush_p drawModCenterDot; static wMenuPush_p drawModPhantom; -extern void wSetSelectedFontSize(wFontSize_t size); - static long fontSizeList[] = { - 4, 5, 6, 7, 8, 10, 12, 14, 16, 18, 20, 24, 28, 32, 36, - 40, 48, 56, 64, 72, 80, 90, 100, 120, 140, 160, 180, - 200, 250, 300, 350, 400, 450, 500 }; + 4, 5, 6, 7, 8, 10, 12, 14, 16, 18, 20, 24, 28, 32, 36, + 40, 48, 56, 64, 72, 80, 90, 100, 120, 140, 160, 180, + 200, 250, 300, 350, 400, 450, 500 +}; EXPORT void LoadFontSizeList( - wList_p list, - long curFontSize) + wList_p list, + long curFontSize) { wIndex_t curInx = 0, inx1; int inx; wListClear(list); - for (inx = 0; inx < COUNT( fontSizeList ); inx++) - { + for (inx = 0; inx < COUNT( fontSizeList ); inx++) { if ((inx == 0 || curFontSize > fontSizeList[inx - 1]) && - (curFontSize < fontSizeList[inx])) - { + (curFontSize < fontSizeList[inx])) { sprintf(message, "%ld", curFontSize); curInx = wListAddValue(list, message, NULL, I2VP(curFontSize)); } sprintf(message, "%ld", fontSizeList[inx]); inx1 = wListAddValue(list, message, NULL, I2VP(fontSizeList[inx])); - if (curFontSize == fontSizeList[inx]) + if (curFontSize == fontSizeList[inx]) { curInx = inx1; + } } - if (curFontSize > fontSizeList[ COUNT( fontSizeList ) - 1]) - { + if (curFontSize > fontSizeList[ COUNT( fontSizeList ) - 1]) { sprintf(message, "%ld", curFontSize); curInx = wListAddValue(list, message, NULL, I2VP(curFontSize)); } @@ -100,20 +98,22 @@ long GetFontSize(wIndex_t inx) long GetFontSizeIndex(long size) { int i; - for (i = 0; i < COUNT( fontSizeList ); i++) - { - if (fontSizeList[i] == size) + for (i = 0; i < COUNT( fontSizeList ); i++) { + if (fontSizeList[i] == size) { return(i); + } } return(-1); } EXPORT void UpdateFontSizeList( - long * fontSizeR, - wList_p list, - wIndex_t listInx ) + long * fontSizeR, + wList_p list, + wIndex_t listInx ) { long fontSize; + long largeFontSize; + wPrefGetInteger( "misc", "large-font-size", &largeFontSize, 500 ); if ( listInx >= 0 ) { *fontSizeR = VP2L( wListGetItemContext( list, listInx )); @@ -126,8 +126,13 @@ EXPORT void UpdateFontSizeList( sprintf( message, "%ld", *fontSizeR ); wListSetValue( list, message ); } else { - if ( fontSize <= 500 || NoticeMessage( MSG_LARGE_FONT, _("Yes"), _("No") ) > 0 ) { - + if ( fontSize <= largeFontSize + || NoticeMessage( MSG_LARGE_FONT, _("Yes"), _("No") ) > 0 ) { + + if ( fontSize > largeFontSize ) { + largeFontSize = fontSize; + wPrefSetInteger( "misc", "large-font-size", largeFontSize ); + } *fontSizeR = fontSize; /* inform gtkfont dialog from change */ wSetSelectedFontSize((wFontSize_t)fontSize); @@ -149,13 +154,13 @@ EXPORT void UpdateFontSizeList( typedef struct extraDataDraw_t { - extraDataBase_t base; - coOrd orig; - ANGLE_T angle; - drawLineType_e lineType; - wIndex_t segCnt; - trkSeg_t segs[1]; - } extraDataDraw_t; + extraDataBase_t base; + coOrd orig; + ANGLE_T angle; + drawLineType_e lineType; + wIndex_t segCnt; + trkSeg_t segs[1]; +} extraDataDraw_t; static TRKTYP_T T_DRAW = -1; static track_p ignoredTableEdge; @@ -175,17 +180,26 @@ static void ComputeDrawBoundingBox( track_p t ) static track_p MakeDrawFromSeg1( - wIndex_t index, - coOrd pos, - ANGLE_T angle, - trkSeg_p sp ) + wIndex_t index, + coOrd pos, + ANGLE_T angle, + trkSeg_p sp ) { struct extraDataDraw_t * xx; track_p trk; - if ( sp->type == ' ' ) + if ( sp->type == ' ' ) { return NULL; + } + if (sp->type == SEG_BEZLIN) { + trk = NewBezierLine(sp->u.l.pos, NULL, 0, sp->color, sp->lineWidth); + trkSeg_p spb = &DYNARR_N(trkSeg_t, sp->bezSegs, 0); + FixUpBezierSegs(spb, sp->bezSegs.cnt); + MoveBezier(trk, pos); + RotateBezier(trk, pos, angle); + return trk; + } trk = NewTrack( index, T_DRAW, 0, sizeof *xx ); - xx = GET_EXTRA_DATA( trk, T_DRAW, extraDataDraw_t ); + xx = GET_EXTRA_DATA(trk, T_DRAW, extraDataDraw_t); xx->orig = pos; xx->angle = angle; xx->segCnt = 1; @@ -193,7 +207,7 @@ static track_p MakeDrawFromSeg1( memcpy( xx->segs, sp, sizeof *(trkSeg_p)0 ); if (xx->segs[0].type == SEG_POLY || - xx->segs[0].type == SEG_FILPOLY ) { + xx->segs[0].type == SEG_FILPOLY ) { xx->segs[0].u.p.pts = (pts_t*)MyMalloc( (sp->u.p.cnt) * sizeof (pts_t) ); memcpy(xx->segs[0].u.p.pts, sp->u.p.pts, sp->u.p.cnt * sizeof (pts_t) ); } @@ -205,25 +219,26 @@ static track_p MakeDrawFromSeg1( } EXPORT track_p MakeDrawFromSeg( - coOrd pos, - ANGLE_T angle, - trkSeg_p sp ) + coOrd pos, + ANGLE_T angle, + trkSeg_p sp ) { return MakeDrawFromSeg1( 0, pos, angle, sp ); } -int SliceCuts(ANGLE_T a, DIST_T radius) { +int SliceCuts(ANGLE_T a, DIST_T radius) +{ double Error = 0.05; double Error_angle = acos(1-(Error/fabs(radius))); - if (Error_angle <0.0001) return 0; + if (Error_angle <0.0001) { return 0; } return (int)(floor(D2R(a)/(2*Error_angle))); } /* Only straight, curved and PolyLine */ EXPORT track_p MakePolyLineFromSegs( - coOrd pos, - ANGLE_T angle, - dynArr_t * segsArr) + coOrd pos, + ANGLE_T angle, + dynArr_t * segsArr) { struct extraDataDraw_t * xx; track_p trk; @@ -234,72 +249,77 @@ EXPORT track_p MakePolyLineFromSegs( xx->lineType = DRAWLINESOLID; xx->segCnt = 1; xx->segs[0].type = SEG_POLY; - xx->segs[0].width = 0; + xx->segs[0].lineWidth = 0; xx->segs[0].u.p.polyType = POLYLINE; xx->segs[0].color = wDrawColorBlack; coOrd last; BOOL_T first = TRUE; int cnt = 0; - for (int i=0;icnt;i++) { + for (int i=0; icnt; i++) { trkSeg_p sp = &DYNARR_N(trkSeg_t,*segsArr,i); if (sp->type == SEG_BEZLIN || sp->type == SEG_BEZTRK ) { - for (int j=0;jbezSegs.cnt;j++) { + for (int j=0; jbezSegs.cnt; j++) { trkSeg_p spb = &DYNARR_N(trkSeg_t,sp->bezSegs,j); if (spb->type == SEG_STRLIN || spb->type == SEG_STRTRK) { - if (!first && IsClose(FindDistance(spb->u.l.pos[0], last))) + if (!first && IsClose(FindDistance(spb->u.l.pos[0], last))) { cnt++; - else + } else { cnt=cnt+2; + } last = spb->u.l.pos[1]; first = FALSE; - } - else if (spb->type == SEG_CRVLIN || spb->type == SEG_CRVTRK) { + } else if (spb->type == SEG_CRVLIN || spb->type == SEG_CRVTRK) { coOrd this; - if (spb->u.c.radius >= 0.0) + if (spb->u.c.radius >= 0.0) { Translate(&this, spb->u.c.center, spb->u.c.a0, fabs(spb->u.c.radius)); - else - Translate(&this, spb->u.c.center, spb->u.c.a0+spb->u.c.a1, fabs(spb->u.c.radius)); + } else { + Translate(&this, spb->u.c.center, spb->u.c.a0+spb->u.c.a1, + fabs(spb->u.c.radius)); + } if (first || !IsClose(FindDistance(this, last))) { cnt++; //Add first point } cnt += 1 + SliceCuts(spb->u.c.a1,spb->u.c.radius); - if (spb->u.c.radius >= 0.0) - Translate(&last, spb->u.c.center, spb->u.c.a0+spb->u.c.a1, fabs(spb->u.c.radius)); - else + if (spb->u.c.radius >= 0.0) { + Translate(&last, spb->u.c.center, spb->u.c.a0+spb->u.c.a1, + fabs(spb->u.c.radius)); + } else { Translate(&last, spb->u.c.center, spb->u.c.a0, fabs(spb->u.c.radius)); + } first = FALSE; } } - } - else if (sp->type == SEG_STRLIN || sp->type == SEG_STRTRK) { - if (!first && IsClose(FindDistance(sp->u.l.pos[0], last))) + } else if (sp->type == SEG_STRLIN || sp->type == SEG_STRTRK) { + if (!first && IsClose(FindDistance(sp->u.l.pos[0], last))) { cnt++; - else + } else { cnt=cnt+2; + } last = sp->u.l.pos[1]; first = FALSE; - } - else if (sp->type == SEG_CRVLIN || sp->type == SEG_CRVTRK) { + } else if (sp->type == SEG_CRVLIN || sp->type == SEG_CRVTRK) { coOrd this; - if (sp->u.c.radius >= 0.0) + if (sp->u.c.radius >= 0.0) { Translate(&this, sp->u.c.center, sp->u.c.a0, fabs(sp->u.c.radius)); - else + } else { Translate(&this, sp->u.c.center, sp->u.c.a0+sp->u.c.a1, fabs(sp->u.c.radius)); + } if (first || !IsClose(FindDistance(this, last))) { cnt++; //Add first point } cnt += 1+ SliceCuts(sp->u.c.a1,sp->u.c.radius); - if (sp->u.c.radius >= 0.0) + if (sp->u.c.radius >= 0.0) { Translate(&last, sp->u.c.center, sp->u.c.a0+sp->u.c.a1, fabs(sp->u.c.radius)); - else + } else { Translate(&last, sp->u.c.center, sp->u.c.a0, fabs(sp->u.c.radius)); + } first = FALSE; - } - else if (sp->type == SEG_POLY) { - if (!first && IsClose(FindDistance(sp->u.p.pts[0].pt, last))) + } else if (sp->type == SEG_POLY) { + if (!first && IsClose(FindDistance(sp->u.p.pts[0].pt, last))) { cnt = cnt + sp->u.p.cnt-1; - else + } else { cnt = cnt + sp->u.p.cnt; + } last = sp->u.p.pts[sp->u.p.cnt-1].pt; first = FALSE; } @@ -308,10 +328,10 @@ EXPORT track_p MakePolyLineFromSegs( xx->segs[0].u.p.pts = (pts_t*)MyMalloc( (cnt) * sizeof (pts_t) ); first = TRUE; int j =0; - for (int i=0;icnt;i++) { + for (int i=0; icnt; i++) { trkSeg_p sp = &DYNARR_N(trkSeg_t,*segsArr,i); if (sp->type == SEG_BEZLIN || sp->type == SEG_BEZTRK ) { - for (int l=0;lbezSegs.cnt;l++) { + for (int l=0; lbezSegs.cnt; l++) { trkSeg_p spb = &DYNARR_N(trkSeg_t,sp->bezSegs,l); if (spb->type == SEG_STRLIN || spb->type == SEG_STRTRK) { if (first || !IsClose(FindDistance(spb->u.l.pos[0], last))) { @@ -327,28 +347,36 @@ EXPORT track_p MakePolyLineFromSegs( } if (spb->type == SEG_CRVLIN || spb->type == SEG_CRVTRK) { coOrd this; - if (spb->u.c.radius>=0.0) + if (spb->u.c.radius>=0.0) { Translate(&this, spb->u.c.center, spb->u.c.a0, fabs(spb->u.c.radius)); - else - Translate(&this, spb->u.c.center, spb->u.c.a0+spb->u.c.a1, fabs(spb->u.c.radius)); + } else { + Translate(&this, spb->u.c.center, spb->u.c.a0+spb->u.c.a1, + fabs(spb->u.c.radius)); + } if (first || !IsClose(FindDistance(this, last))) { xx->segs[0].u.p.pts[j].pt= this; xx->segs[0].u.p.pts[j].pt_type = wPolyLineStraight; j++; } int slices = SliceCuts(spb->u.c.a1,spb->u.c.radius); - for (int k=1; ku.c.radius>=0.0) - Translate(&xx->segs[0].u.p.pts[j].pt, spb->u.c.center, spb->u.c.a0+(k*(spb->u.c.a1/(slices))), fabs(spb->u.c.radius)); - else - Translate(&xx->segs[0].u.p.pts[j].pt, spb->u.c.center, spb->u.c.a0+((slices-k)*(spb->u.c.a1/(slices))), fabs(spb->u.c.radius)); + for (int k=1; ku.c.radius>=0.0) { + Translate(&xx->segs[0].u.p.pts[j].pt, spb->u.c.center, + spb->u.c.a0+(k*(spb->u.c.a1/(slices))), fabs(spb->u.c.radius)); + } else { + Translate(&xx->segs[0].u.p.pts[j].pt, spb->u.c.center, + spb->u.c.a0+((slices-k)*(spb->u.c.a1/(slices))), fabs(spb->u.c.radius)); + } xx->segs[0].u.p.pts[j].pt_type = wPolyLineSmooth; j++; } - if (spb->u.c.radius>=0.0) - Translate(&xx->segs[0].u.p.pts[j].pt, spb->u.c.center, spb->u.c.a0+spb->u.c.a1, fabs(spb->u.c.radius)); - else - Translate(&xx->segs[0].u.p.pts[j].pt, spb->u.c.center, spb->u.c.a0, fabs(spb->u.c.radius)); + if (spb->u.c.radius>=0.0) { + Translate(&xx->segs[0].u.p.pts[j].pt, spb->u.c.center, spb->u.c.a0+spb->u.c.a1, + fabs(spb->u.c.radius)); + } else { + Translate(&xx->segs[0].u.p.pts[j].pt, spb->u.c.center, spb->u.c.a0, + fabs(spb->u.c.radius)); + } xx->segs[0].u.p.pts[j].pt_type = wPolyLineStraight; last = xx->segs[0].u.p.pts[j].pt; @@ -371,10 +399,11 @@ EXPORT track_p MakePolyLineFromSegs( } if (sp->type == SEG_CRVLIN || sp->type == SEG_CRVTRK) { coOrd this; - if (sp->u.c.radius>0) + if (sp->u.c.radius>0) { Translate(&this, sp->u.c.center, sp->u.c.a0, fabs(sp->u.c.radius)); - else + } else { Translate(&this, sp->u.c.center, sp->u.c.a0+sp->u.c.a1, fabs(sp->u.c.radius)); + } if (first || !IsClose(FindDistance(this, last))) { xx->segs[0].u.p.pts[j].pt= this; xx->segs[0].u.p.pts[j].pt_type = wPolyLineStraight; @@ -382,18 +411,24 @@ EXPORT track_p MakePolyLineFromSegs( } int slices = SliceCuts(sp->u.c.a1,sp->u.c.radius); - for (int k=1; ku.c.radius>0) - Translate(&xx->segs[0].u.p.pts[j].pt, sp->u.c.center, sp->u.c.a0+(k*(sp->u.c.a1/(slices))), fabs(sp->u.c.radius)); - else - Translate(&xx->segs[0].u.p.pts[j].pt, sp->u.c.center, sp->u.c.a0+((slices-k)*(sp->u.c.a1/(slices))), fabs(sp->u.c.radius)); + for (int k=1; ku.c.radius>0) { + Translate(&xx->segs[0].u.p.pts[j].pt, sp->u.c.center, + sp->u.c.a0+(k*(sp->u.c.a1/(slices))), fabs(sp->u.c.radius)); + } else { + Translate(&xx->segs[0].u.p.pts[j].pt, sp->u.c.center, + sp->u.c.a0+((slices-k)*(sp->u.c.a1/(slices))), fabs(sp->u.c.radius)); + } xx->segs[0].u.p.pts[j].pt_type = wPolyLineSmooth; j++; } - if (sp->u.c.radius>0) - Translate(&xx->segs[0].u.p.pts[j].pt, sp->u.c.center, sp->u.c.a0+sp->u.c.a1, fabs(sp->u.c.radius)); - else - Translate(&xx->segs[0].u.p.pts[j].pt, sp->u.c.center, sp->u.c.a0, fabs(sp->u.c.radius)); + if (sp->u.c.radius>0) { + Translate(&xx->segs[0].u.p.pts[j].pt, sp->u.c.center, sp->u.c.a0+sp->u.c.a1, + fabs(sp->u.c.radius)); + } else { + Translate(&xx->segs[0].u.p.pts[j].pt, sp->u.c.center, sp->u.c.a0, + fabs(sp->u.c.radius)); + } xx->segs[0].u.p.pts[j].pt_type = wPolyLineStraight; last = xx->segs[0].u.p.pts[j].pt; @@ -405,17 +440,18 @@ EXPORT track_p MakePolyLineFromSegs( xx->segs[0].u.p.pts[j] = sp->u.p.pts[0]; j++; } - memcpy(&xx->segs[0].u.p.pts[j],&sp->u.p.pts[1], (sp->u.p.cnt-1) * sizeof (pts_t)); + memcpy(&xx->segs[0].u.p.pts[j],&sp->u.p.pts[1], + (sp->u.p.cnt-1) * sizeof (pts_t)); last = xx->segs[0].u.p.pts[sp->u.p.cnt-1].pt; j +=sp->u.p.cnt-1; first = FALSE; } - ASSERT(j<=cnt); - + CHECK(j<=cnt); } xx->segs[0].u.p.cnt = j; - if (IsClose(FindDistance(xx->segs[0].u.p.pts[0].pt,xx->segs[0].u.p.pts[xx->segs[0].u.p.cnt-1].pt))) { + if (IsClose(FindDistance(xx->segs[0].u.p.pts[0].pt, + xx->segs[0].u.p.pts[xx->segs[0].u.p.cnt-1].pt))) { xx->segs[0].u.p.polyType = FREEFORM; xx->segs[0].u.p.cnt = xx->segs[0].u.p.cnt-1; } @@ -428,36 +464,38 @@ EXPORT track_p MakePolyLineFromSegs( static dynArr_t anchors_da; #define anchors(N) DYNARR_N(trkSeg_t,anchors_da,N) -void static CreateOriginAnchor(coOrd origin, wBool_t trans_selected) { - double d = tempD.scale*0.15; - DYNARR_APPEND(trkSeg_t,anchors_da,2); - int i = anchors_da.cnt-1; - coOrd p0,p1; - Translate(&p0,origin,0,d*4); - Translate(&p1,origin,0,-d*4); - anchors(i).type = SEG_STRLIN; - anchors(i).u.l.pos[0] = p0; - anchors(i).u.l.pos[1] = p1; - anchors(i).color = wDrawColorBlue; - anchors(i).width = 0; - DYNARR_APPEND(trkSeg_t,anchors_da,1); - Translate(&p0,origin,90,d*4); - Translate(&p1,origin,90,-d*4); - i = anchors_da.cnt-1; - anchors(i).type = SEG_STRLIN; - anchors(i).u.l.pos[0] = p0; - anchors(i).u.l.pos[1] = p1; - anchors(i).color = wDrawColorBlue; - anchors(i).width = 0; +void static CreateOriginAnchor(coOrd origin, wBool_t trans_selected) +{ + double d = tempD.scale*0.15; + DYNARR_APPEND(trkSeg_t,anchors_da,2); + int i = anchors_da.cnt-1; + coOrd p0,p1; + Translate(&p0,origin,0,d*4); + Translate(&p1,origin,0,-d*4); + anchors(i).type = SEG_STRLIN; + anchors(i).u.l.pos[0] = p0; + anchors(i).u.l.pos[1] = p1; + anchors(i).color = wDrawColorBlue; + anchors(i).lineWidth = 0; + DYNARR_APPEND(trkSeg_t,anchors_da,1); + Translate(&p0,origin,90,d*4); + Translate(&p1,origin,90,-d*4); + i = anchors_da.cnt-1; + anchors(i).type = SEG_STRLIN; + anchors(i).u.l.pos[0] = p0; + anchors(i).u.l.pos[1] = p1; + anchors(i).color = wDrawColorBlue; + anchors(i).lineWidth = 0; } -EXPORT void DrawOriginAnchor(track_p trk) { - if (!trk || GetTrkType(trk) != T_DRAW) return; +EXPORT void DrawOriginAnchor(track_p trk) +{ + if (!trk || GetTrkType(trk) != T_DRAW) { return; } struct extraDataDraw_t * xx = GET_EXTRA_DATA(trk, T_DRAW, extraDataDraw_t); if ((xx->orig.x != 0.0) || (xx->orig.y !=0.0) ) { DYNARR_RESET(trkSeg_t,anchors_da); CreateOriginAnchor(xx->orig,FALSE); - DrawSegs(&tempD, zero, 0.0, anchors_da.ptr, anchors_da.cnt, trackGauge, wDrawColorBlue); + DrawSegsDA(&tempD, NULL, zero, 0.0, &anchors_da, trackGauge, wDrawColorBlue, 0); } } @@ -466,80 +504,83 @@ EXPORT void DrawOriginAnchor(track_p trk) { static DIST_T DistanceDraw( track_p t, coOrd * p ) { struct extraDataDraw_t * xx = GET_EXTRA_DATA(t, T_DRAW, extraDataDraw_t); - if ( ignoredTableEdge == t && xx->segs[0].type == SEG_TBLEDGE ) + if ( ignoredTableEdge == t && xx->segs[0].type == SEG_TBLEDGE ) { return DIST_INF; - if ( ignoredDraw == t ) + } + if ( ignoredDraw == t ) { return DIST_INF; + } return DistanceSegs( xx->orig, xx->angle, xx->segCnt, xx->segs, p, NULL ); } static struct { - coOrd endPt[4]; - coOrd origin; - coOrd oldOrigin; - coOrd oldE0; - coOrd oldE1; - FLOAT_T length; - FLOAT_T height; - FLOAT_T width; - coOrd center; - DIST_T radius; - ANGLE_T angle0; - ANGLE_T angle1; - ANGLE_T angle; - ANGLE_T rotate_angle; - ANGLE_T oldAngle; - long pointCount; - long lineWidth; - BOOL_T boxed; - BOOL_T filled; - BOOL_T open; - BOOL_T lock_origin; - wDrawColor color; - wIndex_t benchChoice; - wIndex_t benchOrient; - wIndex_t dimenSize; - descPivot_t pivot; - wIndex_t fontSizeInx; - char text[STR_HUGE_SIZE]; - unsigned int layer; - wIndex_t lineType; - } drawData; + coOrd endPt[4]; + coOrd origin; + coOrd oldOrigin; + coOrd oldE0; + coOrd oldE1; + FLOAT_T length; + FLOAT_T height; + FLOAT_T width; + coOrd center; + DIST_T radius; + ANGLE_T angle0; + ANGLE_T angle1; + ANGLE_T angle; + ANGLE_T rotate_angle; + ANGLE_T oldAngle; + long pointCount; + LWIDTH_T lineWidth; + BOOL_T boxed; + BOOL_T filled; + BOOL_T open; + BOOL_T lock_origin; + wDrawColor color; + wIndex_t benchChoice; + wIndex_t benchOrient; + wIndex_t dimenSize; + descPivot_t pivot; + wIndex_t fontSizeInx; + char text[STR_HUGE_SIZE]; + unsigned int layer; + wIndex_t lineType; +} drawData; typedef enum { E0, E1, PP, CE, AL, LA, A1, A2, RD, LN, HT, WT, PV, VC, LW, LT, CO, FL, OP, BX, BE, OR, DS, TP, TA, TS, TX, LK, OI, RA, LY } drawDesc_e; static descData_t drawDesc[] = { -/*E0*/ { DESC_POS, N_("End Pt 1: X,Y"), &drawData.endPt[0] }, -/*E1*/ { DESC_POS, N_("End Pt 2: X,Y"), &drawData.endPt[1] }, -/*PP*/ { DESC_POS, N_("First Point: X,Y"), &drawData.endPt[0] }, -/*CE*/ { DESC_POS, N_("Center: X,Y"), &drawData.center }, -/*AL*/ { DESC_FLOAT, N_("Angular Length"), &drawData.angle }, -/*LA*/ { DESC_FLOAT, N_("Line Angle"), &drawData.angle }, -/*A1*/ { DESC_ANGLE, N_("CCW Angle"), &drawData.angle0 }, -/*A2*/ { DESC_ANGLE, N_("CW Angle"), &drawData.angle1 }, -/*RD*/ { DESC_DIM, N_("Radius"), &drawData.radius }, -/*LN*/ { DESC_DIM, N_("Length"), &drawData.length }, -/*HT*/ { DESC_DIM, N_("Height"), &drawData.height }, -/*WT*/ { DESC_DIM, N_("Width"), &drawData.width }, -/*PV*/ { DESC_PIVOT, N_("Pivot"), &drawData.pivot }, -/*VC*/ { DESC_LONG, N_("Point Count"), &drawData.pointCount }, -/*LW*/ { DESC_LONG, N_("Line Width"), &drawData.lineWidth }, -/*LT*/ { DESC_LIST, N_("Line Type"), &drawData.lineType }, -/*CO*/ { DESC_COLOR, N_("Color"), &drawData.color }, -/*FL*/ { DESC_BOXED, N_("Filled"), &drawData.filled }, -/*OP*/ { DESC_BOXED, N_("Open End"), &drawData.open }, -/*BX*/ { DESC_BOXED, N_("Boxed"), &drawData.boxed }, -/*BE*/ { DESC_LIST, N_("Lumber"), &drawData.benchChoice }, -/*OR*/ { DESC_LIST, N_("Orientation"), &drawData.benchOrient }, -/*DS*/ { DESC_LIST, N_("Size"), &drawData.dimenSize }, -/*TP*/ { DESC_POS, N_("Text Origin: X,Y"), &drawData.endPt[0] }, -/*TA*/ { DESC_FLOAT, N_("Text Angle"), &drawData.angle }, -/*TS*/ { DESC_EDITABLELIST, N_("Font Size"), &drawData.fontSizeInx }, -/*TX*/ { DESC_TEXT, N_("Text"), &drawData.text }, -/*LK*/ { DESC_BOXED, N_("Lock To Origin"), &drawData.lock_origin}, -/*OI*/ { DESC_POS, N_("Rot Origin: X,Y"), &drawData.origin }, -/*RA*/ { DESC_FLOAT, N_("Rotate By"), &drawData.rotate_angle }, -/*LY*/ { DESC_LAYER, N_("Layer"), &drawData.layer }, - { DESC_NULL } }; + /*E0*/ { DESC_POS, N_("End Pt 1: X,Y"), &drawData.endPt[0] }, + /*E1*/ { DESC_POS, N_("End Pt 2: X,Y"), &drawData.endPt[1] }, + /*PP*/ { DESC_POS, N_("First Point: X,Y"), &drawData.endPt[0] }, + /*CE*/ { DESC_POS, N_("Center: X,Y"), &drawData.center }, + /*AL*/ { DESC_FLOAT, N_("Angular Length"), &drawData.angle }, + /*LA*/ { DESC_FLOAT, N_("Line Angle"), &drawData.angle }, + /*A1*/ { DESC_ANGLE, N_("CCW Angle"), &drawData.angle0 }, + /*A2*/ { DESC_ANGLE, N_("CW Angle"), &drawData.angle1 }, + /*RD*/ { DESC_DIM, N_("Radius"), &drawData.radius }, + /*LN*/ { DESC_DIM, N_("Length"), &drawData.length }, + /*HT*/ { DESC_DIM, N_("Height"), &drawData.height }, + /*WT*/ { DESC_DIM, N_("Width"), &drawData.width }, + /*PV*/ { DESC_PIVOT, N_("Pivot"), &drawData.pivot }, + /*VC*/ { DESC_LONG, N_("Point Count"), &drawData.pointCount }, + /*LW*/ { DESC_FLOAT, N_("Line Width"), &drawData.lineWidth }, + /*LT*/ { DESC_LIST, N_("Line Type"), &drawData.lineType }, + /*CO*/ { DESC_COLOR, N_("Color"), &drawData.color }, + /*FL*/ { DESC_BOXED, N_("Filled"), &drawData.filled }, + /*OP*/ { DESC_BOXED, N_("Open End"), &drawData.open }, + /*BX*/ { DESC_BOXED, N_("Boxed"), &drawData.boxed }, + /*BE*/ { DESC_LIST, N_("Lumber"), &drawData.benchChoice }, + /*OR*/ { DESC_LIST, N_("Orientation"), &drawData.benchOrient }, + /*DS*/ { DESC_LIST, N_("Size"), &drawData.dimenSize }, + /*TP*/ { DESC_POS, N_("Text Origin: X,Y"), &drawData.endPt[0] }, + /*TA*/ { DESC_FLOAT, N_("Text Angle"), &drawData.angle }, + /*TS*/ { DESC_EDITABLELIST, N_("Font Size"), &drawData.fontSizeInx }, + /*TX*/ { DESC_TEXT, N_("Text"), &drawData.text }, + /*LK*/ { DESC_BOXED, N_("Lock To Origin"), &drawData.lock_origin}, + /*OI*/ { DESC_POS, N_("Rot Origin: X,Y"), &drawData.origin }, + /*RA*/ { DESC_FLOAT, N_("Rotate By"), &drawData.rotate_angle }, + /*LY*/ { DESC_LAYER, N_("Layer"), &drawData.layer }, + { DESC_NULL } +}; static int drawSegInx; #define UNREORIGIN( Q, P, A, O ) { \ @@ -577,22 +618,20 @@ static void UpdateDraw( track_p trk, int inx, descData_p descUpd, BOOL_T final ) coOrd mid; long fontSize; - if ( drawSegInx==-1 ) + if ( drawSegInx==-1 ) { return; + } segPtr = &xx->segs[drawSegInx]; if ( inx == -1 ) { - if (segPtr->type != SEG_TEXT) return; - else inx = TX; //Always look at TextField for SEG_TEXT on "Done" + if (segPtr->type != SEG_TEXT) { return; } + else { inx = TX; } //Always look at TextField for SEG_TEXT on "Done" } UndrawNewTrack( trk ); coOrd pt; coOrd off; switch ( inx ) { case LW: - if (drawData.lineWidth<0) - segPtr->width = drawData.lineWidth; - else - segPtr->width = drawData.lineWidth/75.0; //Replace with absolute pixel + segPtr->lineWidth = drawData.lineWidth; break; case CO: segPtr->color = drawData.color; @@ -604,24 +643,24 @@ static void UpdateDraw( track_p trk, int inx, descData_p descUpd, BOOL_T final ) off.x = drawData.endPt[0].x - drawData.oldE0.x; off.y = drawData.endPt[0].y - drawData.oldE0.y; switch(segPtr->type) { //E0 does not alter length - translates - case SEG_STRLIN: - case SEG_DIMLIN: - case SEG_BENCH: - case SEG_TBLEDGE: - UNREORIGIN( segPtr->u.l.pos[0], drawData.endPt[0], 0.0, xx->orig ); - drawData.endPt[1].x = off.x+drawData.endPt[1].x; - drawData.endPt[1].y = off.y+drawData.endPt[1].y; - UNREORIGIN( segPtr->u.l.pos[1], drawData.endPt[1], 0.0, xx->orig ); - drawDesc[E1].mode |= DESC_CHANGE; - break; - case SEG_CRVLIN: - case SEG_FILCRCL: - UNREORIGIN( segPtr->u.c.center, drawData.endPt[0], 0.0, xx->orig ); - break; - case SEG_POLY: - case SEG_FILPOLY: - break; //Note not used by POLYGONS - default:; + case SEG_STRLIN: + case SEG_DIMLIN: + case SEG_BENCH: + case SEG_TBLEDGE: + UNREORIGIN( segPtr->u.l.pos[0], drawData.endPt[0], 0.0, xx->orig ); + drawData.endPt[1].x = off.x+drawData.endPt[1].x; + drawData.endPt[1].y = off.y+drawData.endPt[1].y; + UNREORIGIN( segPtr->u.l.pos[1], drawData.endPt[1], 0.0, xx->orig ); + drawDesc[E1].mode |= DESC_CHANGE; + break; + case SEG_CRVLIN: + case SEG_FILCRCL: + UNREORIGIN( segPtr->u.c.center, drawData.endPt[0], 0.0, xx->orig ); + break; + case SEG_POLY: + case SEG_FILPOLY: + break; //Note not used by POLYGONS + default:; } } else { UNREORIGIN( segPtr->u.l.pos[1], drawData.endPt[1], 0.0, xx->orig ); @@ -635,54 +674,54 @@ static void UpdateDraw( track_p trk, int inx, descData_p descUpd, BOOL_T final ) xx->orig = drawData.origin; if (!drawData.lock_origin) { //Move the points so that the object is not moved switch(segPtr->type) { - case SEG_POLY: - case SEG_FILPOLY: - for (int i=0;iu.p.cnt;i++) { - UNREORIGIN( segPtr->u.p.pts[i].pt, segPtr->u.p.pts[i].pt, 0.0, off ); - } + case SEG_POLY: + case SEG_FILPOLY: + for (int i=0; iu.p.cnt; i++) { + UNREORIGIN( segPtr->u.p.pts[i].pt, segPtr->u.p.pts[i].pt, 0.0, off ); + } break; - case SEG_STRLIN: - case SEG_DIMLIN: - case SEG_BENCH: - case SEG_TBLEDGE: - for (int i=0;i<2;i++) { - UNREORIGIN( segPtr->u.l.pos[i], segPtr->u.l.pos[i], 0.0, off ); - } - break; - case SEG_CRVLIN: - case SEG_FILCRCL: - UNREORIGIN( segPtr->u.c.center, segPtr->u.c.center, 0.0, off ); - break; - case SEG_TEXT: - UNREORIGIN( segPtr->u.t.pos, segPtr->u.t.pos, 0.0, off ); - default:; + case SEG_STRLIN: + case SEG_DIMLIN: + case SEG_BENCH: + case SEG_TBLEDGE: + for (int i=0; i<2; i++) { + UNREORIGIN( segPtr->u.l.pos[i], segPtr->u.l.pos[i], 0.0, off ); + } + break; + case SEG_CRVLIN: + case SEG_FILCRCL: + UNREORIGIN( segPtr->u.c.center, segPtr->u.c.center, 0.0, off ); + break; + case SEG_TEXT: + UNREORIGIN( segPtr->u.t.pos, segPtr->u.t.pos, 0.0, off ); + default:; } } else { switch(segPtr->type) { - case SEG_STRLIN: - case SEG_DIMLIN: - case SEG_BENCH: - case SEG_TBLEDGE: - REORIGIN( drawData.endPt[0], segPtr->u.l.pos[0], 0.0, xx->orig ); - REORIGIN( drawData.endPt[1], segPtr->u.l.pos[1], 0.0, xx->orig ); - drawDesc[E0].mode |= DESC_CHANGE; - drawDesc[E1].mode |= DESC_CHANGE; - break; - case SEG_CRVLIN: - case SEG_FILCRCL: - REORIGIN( drawData.center, segPtr->u.c.center, 0.0, xx->orig ); - drawDesc[CE].mode |= DESC_CHANGE; - break; - case SEG_TEXT: - REORIGIN( drawData.endPt[0], segPtr->u.t.pos, 0.0, xx->orig ); - drawDesc[TP].mode |= DESC_CHANGE; - break; - case SEG_POLY: - case SEG_FILPOLY: - REORIGIN(drawData.endPt[0], segPtr->u.p.pts[0].pt, 0.0, xx->orig); - drawDesc[PP].mode |= DESC_CHANGE; - break; - default:; + case SEG_STRLIN: + case SEG_DIMLIN: + case SEG_BENCH: + case SEG_TBLEDGE: + REORIGIN( drawData.endPt[0], segPtr->u.l.pos[0], 0.0, xx->orig ); + REORIGIN( drawData.endPt[1], segPtr->u.l.pos[1], 0.0, xx->orig ); + drawDesc[E0].mode |= DESC_CHANGE; + drawDesc[E1].mode |= DESC_CHANGE; + break; + case SEG_CRVLIN: + case SEG_FILCRCL: + REORIGIN( drawData.center, segPtr->u.c.center, 0.0, xx->orig ); + drawDesc[CE].mode |= DESC_CHANGE; + break; + case SEG_TEXT: + REORIGIN( drawData.endPt[0], segPtr->u.t.pos, 0.0, xx->orig ); + drawDesc[TP].mode |= DESC_CHANGE; + break; + case SEG_POLY: + case SEG_FILPOLY: + REORIGIN(drawData.endPt[0], segPtr->u.p.pts[0].pt, 0.0, xx->orig); + drawDesc[PP].mode |= DESC_CHANGE; + break; + default:; } } break; @@ -713,17 +752,18 @@ static void UpdateDraw( track_p trk, int inx, descData_p descUpd, BOOL_T final ) switch(segPtr->type) { case SEG_POLY: case SEG_FILPOLY: - for (int i=0;iu.p.cnt;i++) { + for (int i=0; iu.p.cnt; i++) { UNREORIGIN(pt, segPtr->u.p.pts[i].pt, angle, drawData.origin); REORIGIN(segPtr->u.p.pts[i].pt, pt, 0.0, drawData.origin); - if (i == 0) drawData.endPt[0] = pt; + if (i == 0) { drawData.endPt[0] = pt; } } drawDesc[PP].mode |= DESC_CHANGE; break; case SEG_CRVLIN:; coOrd end0, end1; Translate(&end0,segPtr->u.c.center,segPtr->u.c.a0,segPtr->u.c.radius); - Translate(&end1,segPtr->u.c.center,segPtr->u.c.a0+segPtr->u.c.a1,segPtr->u.c.radius); + Translate(&end1,segPtr->u.c.center,segPtr->u.c.a0+segPtr->u.c.a1, + segPtr->u.c.radius); REORIGIN(drawData.center, segPtr->u.c.center, angle, drawData.origin); REORIGIN(end0, end0, angle, drawData.origin); REORIGIN(end1, end1, angle, drawData.origin); @@ -732,9 +772,10 @@ static void UpdateDraw( track_p trk, int inx, descData_p descUpd, BOOL_T final ) UNREORIGIN(segPtr->u.c.center,drawData.center,0.0,drawData.origin); drawDesc[CE].mode |= DESC_CHANGE; drawDesc[A1].mode |= DESC_CHANGE; - /*no break*/ + /*no break*/ case SEG_FILCRCL: - REORIGIN(drawData.center, segPtr->u.c.center, angle, drawData.origin); //Remove angle + REORIGIN(drawData.center, segPtr->u.c.center, angle, + drawData.origin); //Remove angle UNREORIGIN(segPtr->u.c.center, drawData.center, 0.0, drawData.origin); drawDesc[CE].mode |= DESC_CHANGE; break; @@ -742,7 +783,7 @@ static void UpdateDraw( track_p trk, int inx, descData_p descUpd, BOOL_T final ) case SEG_DIMLIN: case SEG_BENCH: case SEG_TBLEDGE: - for (int i=0;i<2;i++) { + for (int i=0; i<2; i++) { REORIGIN( drawData.endPt[i], segPtr->u.l.pos[i], angle, drawData.origin ); UNREORIGIN( segPtr->u.l.pos[i], drawData.endPt[i], 0.0, drawData.origin ); } @@ -762,80 +803,83 @@ static void UpdateDraw( track_p trk, int inx, descData_p descUpd, BOOL_T final ) } } xx->angle = drawData.rotate_angle = 0.0; - if (!drawData.lock_origin) drawDesc[RA].mode = DESC_RO; + if (!drawData.lock_origin) { drawDesc[RA].mode = DESC_RO; } drawDesc[RA].mode |= DESC_CHANGE; break; case AL: //Uses Pivot Point case LA:; ANGLE_T angle = NormalizeAngle(drawData.angle); switch(segPtr->type) { - case SEG_POLY: - case SEG_FILPOLY: - break; //Doesn't Use - case SEG_CRVLIN: //Uses as swept angle - switch ( drawData.pivot ) { - case DESC_PIVOT_FIRST: - segPtr->u.c.a1 = drawData.angle; - drawData.angle1 = NormalizeAngle( drawData.angle0+segPtr->u.c.a1 ); - drawDesc[A2].mode |= DESC_CHANGE; - break; - case DESC_PIVOT_SECOND: - segPtr->u.c.a0 = NormalizeAngle( segPtr->u.c.a1+segPtr->u.c.a0-drawData.angle); - segPtr->u.c.a1 = drawData.angle; - drawData.angle0 = NormalizeAngle( segPtr->u.c.a0 ); - drawData.angle1 = NormalizeAngle( drawData.angle0+segPtr->u.c.a1 ); - drawDesc[A1].mode |= DESC_CHANGE; - drawDesc[A2].mode |= DESC_CHANGE; - break; - case DESC_PIVOT_MID: - segPtr->u.c.a0 = NormalizeAngle( segPtr->u.c.a0+segPtr->u.c.a1/2.0-drawData.angle/2.0); - segPtr->u.c.a1 = drawData.angle; - drawData.angle0 = NormalizeAngle( segPtr->u.c.a0 ); - drawData.angle1 = NormalizeAngle( drawData.angle0+segPtr->u.c.a1 ); - drawDesc[A1].mode |= DESC_CHANGE; - drawDesc[A2].mode |= DESC_CHANGE; - break; - default: - break; - } - drawData.length = 2*M_PI*segPtr->u.c.radius*segPtr->u.c.a1/360; - drawDesc[LN].mode = DESC_RO|DESC_CHANGE; + case SEG_POLY: + case SEG_FILPOLY: + break; //Doesn't Use + case SEG_CRVLIN: //Uses as swept angle + switch ( drawData.pivot ) { + case DESC_PIVOT_FIRST: + segPtr->u.c.a1 = drawData.angle; + drawData.angle1 = NormalizeAngle( drawData.angle0+segPtr->u.c.a1 ); + drawDesc[A2].mode |= DESC_CHANGE; break; - case SEG_FILCRCL: - break; //Doesn't Use - case SEG_STRLIN: - case SEG_DIMLIN: - case SEG_BENCH: - case SEG_TBLEDGE: - switch ( drawData.pivot ) { - case DESC_PIVOT_FIRST: - Translate(&drawData.endPt[1],drawData.endPt[0],angle,drawData.length); - UNREORIGIN(segPtr->u.l.pos[1], drawData.endPt[1], 0.0, xx->orig ); - drawDesc[E1].mode |= DESC_CHANGE; - break; - case DESC_PIVOT_MID:; - coOrd middle; - middle.x = (drawData.endPt[1].x+drawData.endPt[0].x)/2; - middle.y = (drawData.endPt[1].y+drawData.endPt[0].y)/2; - Translate(&drawData.endPt[0],middle,NormalizeAngle(angle+180),drawData.length/2); - Translate(&drawData.endPt[1],middle,angle,drawData.length/2); - UNREORIGIN(segPtr->u.l.pos[0], drawData.endPt[0], 0.0, xx->orig ); - UNREORIGIN(segPtr->u.l.pos[1], drawData.endPt[1], 0.0, xx->orig ); - drawDesc[E0].mode |= DESC_CHANGE; - drawDesc[E1].mode |= DESC_CHANGE; - break; - case DESC_PIVOT_SECOND: - Translate(&drawData.endPt[0],drawData.endPt[1],NormalizeAngle(angle+180),drawData.length); - UNREORIGIN(segPtr->u.l.pos[0], drawData.endPt[0], 0.0, xx->orig ); - drawDesc[E0].mode |= DESC_CHANGE; - break; - default: - break; - } + case DESC_PIVOT_SECOND: + segPtr->u.c.a0 = NormalizeAngle( segPtr->u.c.a1+segPtr->u.c.a0-drawData.angle); + segPtr->u.c.a1 = drawData.angle; + drawData.angle0 = NormalizeAngle( segPtr->u.c.a0 ); + drawData.angle1 = NormalizeAngle( drawData.angle0+segPtr->u.c.a1 ); + drawDesc[A1].mode |= DESC_CHANGE; + drawDesc[A2].mode |= DESC_CHANGE; break; - case SEG_TEXT: - break; //Doesnt Use - default:; + case DESC_PIVOT_MID: + segPtr->u.c.a0 = NormalizeAngle( segPtr->u.c.a0+segPtr->u.c.a1/2.0 + -drawData.angle/2.0); + segPtr->u.c.a1 = drawData.angle; + drawData.angle0 = NormalizeAngle( segPtr->u.c.a0 ); + drawData.angle1 = NormalizeAngle( drawData.angle0+segPtr->u.c.a1 ); + drawDesc[A1].mode |= DESC_CHANGE; + drawDesc[A2].mode |= DESC_CHANGE; + break; + default: + break; + } + drawData.length = 2*M_PI*segPtr->u.c.radius*segPtr->u.c.a1/360; + drawDesc[LN].mode = DESC_RO|DESC_CHANGE; + break; + case SEG_FILCRCL: + break; //Doesn't Use + case SEG_STRLIN: + case SEG_DIMLIN: + case SEG_BENCH: + case SEG_TBLEDGE: + switch ( drawData.pivot ) { + case DESC_PIVOT_FIRST: + Translate(&drawData.endPt[1],drawData.endPt[0],angle,drawData.length); + UNREORIGIN(segPtr->u.l.pos[1], drawData.endPt[1], 0.0, xx->orig ); + drawDesc[E1].mode |= DESC_CHANGE; + break; + case DESC_PIVOT_MID:; + coOrd middle; + middle.x = (drawData.endPt[1].x+drawData.endPt[0].x)/2; + middle.y = (drawData.endPt[1].y+drawData.endPt[0].y)/2; + Translate(&drawData.endPt[0],middle,NormalizeAngle(angle+180), + drawData.length/2); + Translate(&drawData.endPt[1],middle,angle,drawData.length/2); + UNREORIGIN(segPtr->u.l.pos[0], drawData.endPt[0], 0.0, xx->orig ); + UNREORIGIN(segPtr->u.l.pos[1], drawData.endPt[1], 0.0, xx->orig ); + drawDesc[E0].mode |= DESC_CHANGE; + drawDesc[E1].mode |= DESC_CHANGE; + break; + case DESC_PIVOT_SECOND: + Translate(&drawData.endPt[0],drawData.endPt[1],NormalizeAngle(angle+180), + drawData.length); + UNREORIGIN(segPtr->u.l.pos[0], drawData.endPt[0], 0.0, xx->orig ); + drawDesc[E0].mode |= DESC_CHANGE; + break; + default: + break; + } + break; + case SEG_TEXT: + break; //Doesnt Use + default:; } break; case LN: @@ -848,12 +892,14 @@ static void UpdateDraw( track_p trk, int inx, descData_p descUpd, BOOL_T final ) if ( segPtr->type != SEG_CRVLIN ) { switch ( drawData.pivot ) { case DESC_PIVOT_FIRST: - Translate( &drawData.endPt[1], drawData.endPt[0], drawData.angle, drawData.length ); + Translate( &drawData.endPt[1], drawData.endPt[0], drawData.angle, + drawData.length ); UNREORIGIN( segPtr->u.l.pos[1], drawData.endPt[1], 0.0, xx->orig ); drawDesc[E1].mode |= DESC_CHANGE; break; case DESC_PIVOT_SECOND: - Translate( &drawData.endPt[0], drawData.endPt[1], drawData.angle+180.0, drawData.length ); + Translate( &drawData.endPt[0], drawData.endPt[1], drawData.angle+180.0, + drawData.length ); UNREORIGIN( segPtr->u.l.pos[0], drawData.endPt[0], 0.0, xx->orig ); drawDesc[E0].mode |= DESC_CHANGE; break; @@ -877,15 +923,19 @@ static void UpdateDraw( track_p trk, int inx, descData_p descUpd, BOOL_T final ) break; case RD: if ( drawData.pivot == DESC_PIVOT_FIRST ) { - Translate( &segPtr->u.c.center, segPtr->u.c.center, segPtr->u.c.a0, segPtr->u.c.radius-drawData.radius ); + Translate( &segPtr->u.c.center, segPtr->u.c.center, segPtr->u.c.a0, + segPtr->u.c.radius-drawData.radius ); } else if ( drawData.pivot == DESC_PIVOT_SECOND ) { - Translate( &segPtr->u.c.center, segPtr->u.c.center, segPtr->u.c.a0+segPtr->u.c.a1, segPtr->u.c.radius-drawData.radius ); + Translate( &segPtr->u.c.center, segPtr->u.c.center, + segPtr->u.c.a0+segPtr->u.c.a1, segPtr->u.c.radius-drawData.radius ); } else { - Translate( &segPtr->u.c.center, segPtr->u.c.center, (segPtr->u.c.a0+segPtr->u.c.a1)/2.0, segPtr->u.c.radius-drawData.radius ); + Translate( &segPtr->u.c.center, segPtr->u.c.center, + (segPtr->u.c.a0+segPtr->u.c.a1)/2.0, segPtr->u.c.radius-drawData.radius ); } drawDesc[CE].mode |= DESC_CHANGE; segPtr->u.c.radius = drawData.radius; - drawData.length = 2*M_PI*segPtr->u.c.radius*(segPtr->type==SEG_CRVLIN?segPtr->u.c.a1/360:1.0); + drawData.length = 2*M_PI*segPtr->u.c.radius*(segPtr->type==SEG_CRVLIN + ?segPtr->u.c.a1/360:1.0); drawDesc[LN].mode = DESC_RO|DESC_CHANGE; break; case A1: //Angle of first point of curve @@ -899,15 +949,19 @@ static void UpdateDraw( track_p trk, int inx, descData_p descUpd, BOOL_T final ) drawDesc[A1].mode |= DESC_CHANGE; break; case BE: - BenchUpdateOrientationList( VP2L( wListGetItemContext((wList_p)drawDesc[BE].control0, drawData.benchChoice)), (wList_p)drawDesc[OR].control0 ); - if ( drawData.benchOrient < wListGetCount( (wList_p)drawDesc[OR].control0 ) ) + BenchUpdateOrientationList( VP2L( wListGetItemContext((wList_p) + drawDesc[BE].control0, drawData.benchChoice)), (wList_p)drawDesc[OR].control0 ); + if ( drawData.benchOrient < wListGetCount( (wList_p)drawDesc[OR].control0 ) ) { wListSetIndex( (wList_p)drawDesc[OR].control0, drawData.benchOrient ); - else + } else { drawData.benchOrient = 0; - segPtr->u.l.option = GetBenchData( VP2L(wListGetItemContext((wList_p)drawDesc[BE].control0, drawData.benchChoice)), drawData.benchOrient ); + } + segPtr->u.l.option = GetBenchData( VP2L(wListGetItemContext(( + wList_p)drawDesc[BE].control0, drawData.benchChoice)), drawData.benchOrient ); break; case OR: - segPtr->u.l.option = GetBenchData( VP2L(wListGetItemContext((wList_p)drawDesc[BE].control0, drawData.benchChoice)), drawData.benchOrient ); + segPtr->u.l.option = GetBenchData( VP2L(wListGetItemContext(( + wList_p)drawDesc[BE].control0, drawData.benchChoice)), drawData.benchOrient ); break; case DS: segPtr->u.l.option = drawData.dimenSize; @@ -918,7 +972,7 @@ static void UpdateDraw( track_p trk, int inx, descData_p descUpd, BOOL_T final ) case PP: off.x = drawData.endPt[0].x - drawData.oldE0.x; off.y = drawData.endPt[0].y - drawData.oldE0.y; - for (int i=0;iu.p.cnt;i++) { + for (int i=0; iu.p.cnt; i++) { REORIGIN( pt, segPtr->u.p.pts[i].pt, 0.0, xx->orig ); pt.x += off.x; pt.y += off.y; @@ -933,7 +987,8 @@ static void UpdateDraw( track_p trk, int inx, descData_p descUpd, BOOL_T final ) break; case TS: fontSize = (long)segPtr->u.t.fontSize; - UpdateFontSizeList( &fontSize, (wList_p)drawDesc[TS].control0, drawData.fontSizeInx ); + UpdateFontSizeList( &fontSize, (wList_p)drawDesc[TS].control0, + drawData.fontSizeInx ); segPtr->u.t.fontSize = fontSize; break; case FL: @@ -946,7 +1001,6 @@ static void UpdateDraw( track_p trk, int inx, descData_p descUpd, BOOL_T final ) if(drawData.filled) { if (segPtr->type == SEG_POLY) { segPtr->type = SEG_FILPOLY; - segPtr->u.p.polyType = FREEFORM; drawData.open = FALSE; drawDesc[OP].mode = DESC_RO|DESC_CHANGE; } @@ -958,7 +1012,6 @@ static void UpdateDraw( track_p trk, int inx, descData_p descUpd, BOOL_T final ) } else { if (segPtr->type == SEG_FILPOLY) { segPtr->type = SEG_POLY; - segPtr->u.p.polyType = FREEFORM; drawData.open = FALSE; drawDesc[OP].mode = DESC_CHANGE; } @@ -995,9 +1048,16 @@ static void UpdateDraw( track_p trk, int inx, descData_p descUpd, BOOL_T final ) segPtr->u.t.boxed = drawData.boxed; break; case TX: - if ( wTextGetModified((wText_p)drawDesc[TX].control0 )) { + if ( wTextGetModified((wText_p)drawDesc[TX].control0 ) || + inPlayback ) { int len = wTextGetSize((wText_p)drawDesc[TX].control0); - MyFree( segPtr->u.t.string ); + // TODO - minor memory leak, but this allows Undo on text object. See BUG-527 + // MyFree( segPtr->u.t.string ); + if ( !descUndoStarted ) { + UndoStart( _("Change Track"), "Change Track"); + descUndoStarted = TRUE; + } + UndoModify( trk ); if (len>STR_HUGE_SIZE-8) { //Truncate string to max len = STR_HUGE_SIZE-8; ErrorMessage( MSG_TEXT_TOO_LONG ); @@ -1024,7 +1084,7 @@ static void UpdateDraw( track_p trk, int inx, descData_p descUpd, BOOL_T final ) xx->lineType = drawData.lineType; break; default: - AbortProg( "bad op" ); + CHECKMSG( FALSE, ( "bad op: %d", inx ) ); } drawData.oldE0 = drawData.endPt[0]; drawData.oldE1 = drawData.endPt[1]; @@ -1035,7 +1095,6 @@ static void UpdateDraw( track_p trk, int inx, descData_p descUpd, BOOL_T final ) TempRedraw(); // UpdateDraw } -extern BOOL_T inDescribeCmd; static void DescribeDraw( track_p trk, char * str, CSIZE_T len ) { @@ -1044,12 +1103,13 @@ static void DescribeDraw( track_p trk, char * str, CSIZE_T len ) trkSeg_p segPtr; int inx; char * title = NULL; - char * polyType = NULL; +// char * polyType = NULL; DistanceSegs( xx->orig, xx->angle, xx->segCnt, xx->segs, &pos, &drawSegInx ); - if ( drawSegInx==-1 ) + if ( drawSegInx==-1 ) { return; + } segPtr = &xx->segs[drawSegInx]; for ( inx=0; inxcolor; drawData.layer = GetTrkLayer(trk); drawDesc[CO].mode = 0; - if (drawData.lineWidth<0) - drawData.lineWidth = (long)segPtr->width; - else - drawData.lineWidth = (long)floor(segPtr->width*75.0+0.5); + drawData.lineWidth = segPtr->lineWidth; drawDesc[LW].mode = 0; drawDesc[LY].mode = DESC_NOREDRAW; drawDesc[BE].mode = - drawDesc[OR].mode = - drawDesc[LT].mode = - drawDesc[DS].mode = DESC_IGNORE; + drawDesc[OR].mode = + drawDesc[LT].mode = + drawDesc[DS].mode = DESC_IGNORE; drawData.pivot = DESC_PIVOT_MID; - if ((xx->orig.x == 0.0) && (xx->orig.y == 0.0)) drawData.lock_origin = FALSE; - else drawData.lock_origin = TRUE; + if ((xx->orig.x == 0.0) && (xx->orig.y == 0.0)) { drawData.lock_origin = FALSE; } + else { drawData.lock_origin = TRUE; } drawData.rotate_angle = 0.0; @@ -1092,14 +1149,14 @@ static void DescribeDraw( track_p trk, char * str, CSIZE_T len ) UNREORIGIN(segPtr->u.l.pos[1], drawData.endPt[1], 0.0, xx->orig); xx->angle = 0.0; drawDesc[LN].mode = - drawDesc[LA].mode = - drawDesc[PV].mode = 0; + drawDesc[LA].mode = + drawDesc[PV].mode = 0; drawDesc[E0].mode = - drawDesc[OI].mode = 0; + drawDesc[OI].mode = 0; drawDesc[E1].mode = 0; drawDesc[RA].mode = 0; - if (!drawData.lock_origin) drawDesc[RA].mode = DESC_RO; - else drawDesc[RA].mode = 0; + if (!drawData.lock_origin) { drawDesc[RA].mode = DESC_RO; } + else { drawDesc[RA].mode = 0; } switch (segPtr->type) { case SEG_STRLIN: title = _("Straight Line"); @@ -1109,29 +1166,29 @@ static void DescribeDraw( track_p trk, char * str, CSIZE_T len ) case SEG_DIMLIN: title = _("Dimension Line"); drawDesc[CO].mode = - drawDesc[LW].mode = - drawDesc[LK].mode = - drawDesc[OI].mode = - drawDesc[RA].mode = DESC_IGNORE; + drawDesc[LW].mode = + drawDesc[LK].mode = + drawDesc[OI].mode = + drawDesc[RA].mode = DESC_IGNORE; drawData.dimenSize = (wIndex_t)segPtr->u.l.option; drawDesc[DS].mode = 0; break; case SEG_BENCH: title = _("Lumber"); drawDesc[LK].mode = - drawDesc[OI].mode = - drawDesc[RA].mode = - drawDesc[LW].mode = DESC_IGNORE; + drawDesc[OI].mode = + drawDesc[RA].mode = + drawDesc[LW].mode = DESC_IGNORE; drawDesc[BE].mode = - drawDesc[OR].mode = 0; + drawDesc[OR].mode = 0; drawData.benchChoice = GetBenchListIndex( segPtr->u.l.option ); drawData.benchOrient = (wIndex_t)(segPtr->u.l.option&0xFF); break; case SEG_TBLEDGE: title = _("Table Edge"); drawDesc[LK].mode = - drawDesc[OI].mode = - drawDesc[RA].mode = DESC_IGNORE; + drawDesc[OI].mode = + drawDesc[RA].mode = DESC_IGNORE; drawDesc[CO].mode = DESC_IGNORE; drawDesc[LW].mode = DESC_IGNORE; break; @@ -1141,14 +1198,14 @@ static void DescribeDraw( track_p trk, char * str, CSIZE_T len ) REORIGIN( drawData.center, segPtr->u.c.center, xx->angle, xx->orig ); //Remove input Angle (if any) UNREORIGIN(segPtr->u.c.center, drawData.center, 0.0, xx->orig); - xx->angle = 0.0; + xx->angle = 0.0; drawData.radius = fabs(segPtr->u.c.radius); drawData.origin = xx->orig; drawDesc[OI].mode = 0; drawDesc[CE].mode = - drawDesc[RD].mode = 0; - if (!drawData.lock_origin) drawDesc[RA].mode = DESC_RO; - else drawDesc[RA].mode = 0; + drawDesc[RD].mode = 0; + if (!drawData.lock_origin) { drawDesc[RA].mode = DESC_RO; } + else { drawDesc[RA].mode = 0; } drawDesc[LT].mode = 0; drawData.lineType = (wIndex_t)xx->lineType; if ( segPtr->u.c.a1 >= 360.0 ) { @@ -1164,8 +1221,8 @@ static void DescribeDraw( track_p trk, char * str, CSIZE_T len ) drawDesc[LN].mode = DESC_RO; drawData.length = 2*M_PI*segPtr->u.c.radius*segPtr->u.c.a1/360; drawDesc[AL].mode = - drawDesc[A1].mode = - drawDesc[A2].mode = 0; + drawDesc[A1].mode = + drawDesc[A2].mode = 0; drawDesc[PV].mode = 0; title = _("Curved Line"); } @@ -1174,18 +1231,18 @@ static void DescribeDraw( track_p trk, char * str, CSIZE_T len ) REORIGIN( drawData.center, segPtr->u.c.center, xx->angle, xx->orig ); //Remove input Angle (if any) UNREORIGIN(segPtr->u.c.center, drawData.center, 0.0, xx->orig); - xx->angle = 0.0; + xx->angle = 0.0; drawData.radius = fabs(segPtr->u.c.radius); drawData.origin = xx->orig; drawDesc[OI].mode = - drawDesc[FL].mode = 0; - if (!drawData.lock_origin) drawDesc[RA].mode = DESC_RO; - else drawDesc[RA].mode = 0; + drawDesc[FL].mode = 0; + if (!drawData.lock_origin) { drawDesc[RA].mode = DESC_RO; } + else { drawDesc[RA].mode = 0; } drawData.filled = TRUE; drawData.length = 0.0; drawDesc[LN].mode = DESC_RO; drawDesc[CE].mode = - drawDesc[RD].mode = 0; + drawDesc[RD].mode = 0; drawDesc[PV].mode = 0; drawDesc[OI].mode = 0; drawDesc[LW].mode = DESC_IGNORE; @@ -1194,10 +1251,10 @@ static void DescribeDraw( track_p trk, char * str, CSIZE_T len ) case SEG_POLY: case SEG_FILPOLY:; BOOL_T filled = FALSE; - if (segPtr->type == SEG_FILPOLY) filled = TRUE; + if (segPtr->type == SEG_FILPOLY) { filled = TRUE; } REORIGIN(drawData.endPt[0],segPtr->u.p.pts[0].pt, xx->angle, xx->orig); //Remove input Angle (if any) - for (int i=0;iu.p.cnt;i++) { + for (int i=0; iu.p.cnt; i++) { coOrd pt; REORIGIN(pt,segPtr->u.p.pts[i].pt, xx->angle, xx->orig); UNREORIGIN(segPtr->u.p.pts[i].pt, pt, 0.0, xx->orig); @@ -1209,8 +1266,8 @@ static void DescribeDraw( track_p trk, char * str, CSIZE_T len ) drawData.filled = filled; drawDesc[FL].mode = 0; drawData.angle = 0.0; - if (!drawData.lock_origin) drawDesc[RA].mode = DESC_RO; - else drawDesc[RA].mode = 0; + if (!drawData.lock_origin) { drawDesc[RA].mode = DESC_RO; } + else { drawDesc[RA].mode = 0; } drawData.origin = xx->orig; drawDesc[OI].mode = 0; drawData.open= FALSE; @@ -1218,29 +1275,29 @@ static void DescribeDraw( track_p trk, char * str, CSIZE_T len ) drawDesc[LT].mode = 0; drawData.lineType = (wIndex_t)xx->lineType; switch (segPtr->u.p.polyType) { - case RECTANGLE: - title = filled?_("Filled Rectangle"):_("Rectangle"); - drawDesc[OP].mode = DESC_IGNORE; - drawDesc[VC].mode = DESC_IGNORE; - drawData.width = FindDistance(segPtr->u.p.pts[0].pt, segPtr->u.p.pts[1].pt); - drawDesc[WT].mode = 0; - drawData.height = FindDistance(segPtr->u.p.pts[0].pt, segPtr->u.p.pts[3].pt); - drawDesc[HT].mode = 0; - for(int i=0;i<4;i++) { - REORIGIN( drawData.endPt[i], segPtr->u.p.pts[i].pt, xx->angle, xx->orig ); - } - drawDesc[E0].mode = DESC_IGNORE; - drawData.origin = xx->orig; - break; - case POLYLINE: - title = _("Polyline"); - drawData.open=TRUE; - drawData.filled= FALSE; - drawDesc[FL].mode = DESC_RO; - drawDesc[OP].mode = 0; - break; - default: - title = filled?_("Filled Polygon"):_("Polygon"); + case RECTANGLE: + title = filled?_("Filled Rectangle"):_("Rectangle"); + drawDesc[OP].mode = DESC_IGNORE; + drawDesc[VC].mode = DESC_IGNORE; + drawData.width = FindDistance(segPtr->u.p.pts[0].pt, segPtr->u.p.pts[1].pt); + drawDesc[WT].mode = 0; + drawData.height = FindDistance(segPtr->u.p.pts[0].pt, segPtr->u.p.pts[3].pt); + drawDesc[HT].mode = 0; + for(int i=0; i<4; i++) { + REORIGIN( drawData.endPt[i], segPtr->u.p.pts[i].pt, xx->angle, xx->orig ); + } + drawDesc[E0].mode = DESC_IGNORE; + drawData.origin = xx->orig; + break; + case POLYLINE: + title = _("Polyline"); + drawData.open=TRUE; + drawData.filled= FALSE; + drawDesc[FL].mode = DESC_RO; + drawDesc[OP].mode = 0; + break; + default: + title = filled?_("Filled Polygon"):_("Polygon"); } break; case SEG_TEXT: @@ -1253,16 +1310,16 @@ static void DescribeDraw( track_p trk, char * str, CSIZE_T len ) drawData.text[sizeof drawData.text-1] ='\0'; drawData.boxed = segPtr->u.t.boxed; drawDesc[TP].mode = - drawDesc[TS].mode = - drawDesc[TX].mode = - drawDesc[TA].mode = - drawDesc[LK].mode = - drawDesc[OI].mode = - drawDesc[BX].mode = 0; - if (!drawData.lock_origin) drawDesc[RA].mode = DESC_RO; - else drawDesc[RA].mode = 0; + drawDesc[TS].mode = + drawDesc[TX].mode = + drawDesc[TA].mode = + drawDesc[LK].mode = + drawDesc[OI].mode = + drawDesc[BX].mode = 0; + if (!drawData.lock_origin) { drawDesc[RA].mode = DESC_RO; } + else { drawDesc[RA].mode = 0; } drawDesc[E0].mode = DESC_IGNORE; - drawDesc[CO].mode = 0; /*Allow Text color setting*/ + drawDesc[CO].mode = 0; /*Allow Text color setting*/ drawDesc[LW].mode = DESC_IGNORE; title = _("Text"); break; @@ -1270,9 +1327,10 @@ static void DescribeDraw( track_p trk, char * str, CSIZE_T len ) ; } - snprintf( str, len, _("%s(%d) Layer=%d"), title, GetTrkIndex(trk), GetTrkLayer(trk)+1 ); + snprintf( str, len, _("%s(%d) Layer=%d"), title, GetTrkIndex(trk), + GetTrkLayer(trk)+1 ); - if (!inDescribeCmd) return; + if (!inDescribeCmd) { return; } drawData.oldE0 = drawData.endPt[0]; drawData.oldE1 = drawData.endPt[1]; @@ -1282,13 +1340,17 @@ static void DescribeDraw( track_p trk, char * str, CSIZE_T len ) DoDescribe( title, trk, drawDesc, UpdateDraw ); - if ( segPtr->type==SEG_BENCH && drawDesc[BE].control0!=NULL && drawDesc[OR].control0!=NULL) { - BenchLoadLists( (wList_p)drawDesc[BE].control0, (wList_p)drawDesc[OR].control0 ); + if ( segPtr->type==SEG_BENCH && drawDesc[BE].control0!=NULL + && drawDesc[OR].control0!=NULL) { + BenchLoadLists( (wList_p)drawDesc[BE].control0, + (wList_p)drawDesc[OR].control0 ); wListSetIndex( (wList_p)drawDesc[BE].control0, drawData.benchChoice ); - BenchUpdateOrientationList( VP2L(wListGetItemContext((wList_p)drawDesc[BE].control0, drawData.benchChoice)), (wList_p)drawDesc[OR].control0 ); + BenchUpdateOrientationList( VP2L(wListGetItemContext((wList_p) + drawDesc[BE].control0, drawData.benchChoice)), (wList_p)drawDesc[OR].control0 ); wListSetIndex( (wList_p)drawDesc[OR].control0, drawData.benchOrient ); } - if ( (segPtr->type==SEG_STRLIN || segPtr->type==SEG_CRVLIN || segPtr->type==SEG_POLY) && drawDesc[LT].control0!=NULL) { + if ( (segPtr->type==SEG_STRLIN || segPtr->type==SEG_CRVLIN + || segPtr->type==SEG_POLY) && drawDesc[LT].control0!=NULL) { wListClear( (wList_p)drawDesc[LT].control0 ); wListAddValue( (wList_p)drawDesc[LT].control0, _("Solid"), NULL, I2VP(0 )); wListAddValue( (wList_p)drawDesc[LT].control0, _("Dash"), NULL, I2VP(1 )); @@ -1319,12 +1381,12 @@ static void DrawDraw( track_p t, drawCmd_p d, wDrawColor color ) unsigned long NotSolid = ~(DC_NOTSOLIDLINE); d->options &= NotSolid; if (xx->lineType == DRAWLINESOLID) {} - else if (xx->lineType == DRAWLINEDASH) d->options |= DC_DASH; - else if (xx->lineType == DRAWLINEDOT) d->options |= DC_DOT; - else if (xx->lineType == DRAWLINEDASHDOT) d->options |= DC_DASHDOT; - else if (xx->lineType == DRAWLINEDASHDOTDOT) d->options |= DC_DASHDOTDOT; - else if (xx->lineType == DRAWLINECENTER) d->options |= DC_CENTER; - else if (xx->lineType == DRAWLINEPHANTOM) d->options |= DC_PHANTOM; + else if (xx->lineType == DRAWLINEDASH) { d->options |= DC_DASH; } + else if (xx->lineType == DRAWLINEDOT) { d->options |= DC_DOT; } + else if (xx->lineType == DRAWLINEDASHDOT) { d->options |= DC_DASHDOT; } + else if (xx->lineType == DRAWLINEDASHDOTDOT) { d->options |= DC_DASHDOTDOT; } + else if (xx->lineType == DRAWLINECENTER) { d->options |= DC_CENTER; } + else if (xx->lineType == DRAWLINEPHANTOM) { d->options |= DC_PHANTOM; } DrawSegs( d, xx->orig, xx->angle, xx->segs, xx->segCnt, 0.0, color ); d->options = d->options&~(DC_NOTSOLIDLINE); } @@ -1335,7 +1397,7 @@ static void DeleteDraw( track_p t ) /* Get rid of points if specified */ struct extraDataDraw_t * xx = GET_EXTRA_DATA(t, T_DRAW, extraDataDraw_t); if (xx->segs[0].type == SEG_POLY || - xx->segs[0].type == SEG_FILPOLY) { + xx->segs[0].type == SEG_FILPOLY) { MyFree(xx->segs[0].u.p.pts); xx->segs[0].u.p.pts = NULL; } @@ -1346,9 +1408,10 @@ static BOOL_T WriteDraw( track_p t, FILE * f ) { struct extraDataDraw_t * xx = GET_EXTRA_DATA(t, T_DRAW, extraDataDraw_t); BOOL_T rc = TRUE; - rc &= fprintf(f, "DRAW %d %d %d 0 0 %0.6f %0.6f 0 %0.6f\n", GetTrkIndex(t), GetTrkLayer(t), - xx->lineType, - xx->orig.x, xx->orig.y, xx->angle )>0; + rc &= fprintf(f, "DRAW %d %d %d 0 0 %0.6f %0.6f 0 %0.6f\n", GetTrkIndex(t), + GetTrkLayer(t), + xx->lineType, + xx->orig.x, xx->orig.y, xx->angle )>0; rc &= WriteSegs( f, xx->segCnt, xx->segs ); return rc; } @@ -1365,25 +1428,29 @@ static BOOL_T ReadDraw( char * header ) int lineType; struct extraDataDraw_t * xx; - if ( !GetArgs( header+5, paramVersion<3?"dXXpYf":paramVersion<9?"dLX00pYf":"dLd00pff", - &index, &layer, &lineType, &orig, &elev, &angle ) ) + if ( !GetArgs( header+5, + paramVersion<3?"dXXpYf":paramVersion<9?"dLX00pYf":"dLd00pff", + &index, &layer, &lineType, &orig, &elev, &angle ) ) { return FALSE; - if ( !ReadSegs() ) + } + if ( !ReadSegs() ) { return FALSE; + } if (tempSegs_da.cnt == 1) { trk = MakeDrawFromSeg1( index, orig, angle, &tempSegs(0) ); xx = GET_EXTRA_DATA(trk, T_DRAW, extraDataDraw_t); xx->lineType = lineType; SetTrkLayer( trk, layer ); } else { - trk = NewTrack( index, T_DRAW, 0, sizeof *xx + (tempSegs_da.cnt-1) * sizeof *(trkSeg_p)0 ); + trk = NewTrack( index, T_DRAW, 0, + sizeof *xx + (tempSegs_da.cnt-1) * sizeof *(trkSeg_p)0 ); SetTrkLayer( trk, layer ); xx = GET_EXTRA_DATA(trk, T_DRAW, extraDataDraw_t); xx->orig = orig; xx->angle = angle; xx->segCnt = tempSegs_da.cnt; xx->lineType = lineType; - memcpy( xx->segs, tempSegs_da.ptr, tempSegs_da.cnt * sizeof *(trkSeg_p)0 ); + memcpy( xx->segs, &tempSegs(0), tempSegs_da.cnt * sizeof *(trkSeg_p)0 ); ComputeDrawBoundingBox( trk ); } return TRUE; @@ -1398,28 +1465,28 @@ static void MoveDraw( track_p trk, coOrd off ) if (xx->orig.x == 0.0 && xx->orig.y == 0.0) { //No origin set switch(segPtr->type) { - case SEG_POLY: - case SEG_FILPOLY: - for (int i=0;iu.p.cnt;i++) { - REORIGIN( segPtr->u.p.pts[i].pt, segPtr->u.p.pts[i].pt, 0.0, off ); - } + case SEG_POLY: + case SEG_FILPOLY: + for (int i=0; iu.p.cnt; i++) { + REORIGIN( segPtr->u.p.pts[i].pt, segPtr->u.p.pts[i].pt, 0.0, off ); + } break; - case SEG_STRLIN: - case SEG_DIMLIN: - case SEG_BENCH: - case SEG_TBLEDGE: - for (int i=0;i<2;i++) { - REORIGIN( segPtr->u.l.pos[i], segPtr->u.l.pos[i], 0.0, off ); - } - break; - case SEG_CRVLIN: - case SEG_FILCRCL: - REORIGIN( segPtr->u.c.center, segPtr->u.c.center, 0.0, off ); - break; - case SEG_TEXT: - REORIGIN( segPtr->u.t.pos, segPtr->u.t.pos, 0.0, off ); - break; - default:; + case SEG_STRLIN: + case SEG_DIMLIN: + case SEG_BENCH: + case SEG_TBLEDGE: + for (int i=0; i<2; i++) { + REORIGIN( segPtr->u.l.pos[i], segPtr->u.l.pos[i], 0.0, off ); + } + break; + case SEG_CRVLIN: + case SEG_FILCRCL: + REORIGIN( segPtr->u.c.center, segPtr->u.c.center, 0.0, off ); + break; + case SEG_TEXT: + REORIGIN( segPtr->u.t.pos, segPtr->u.t.pos, 0.0, off ); + break; + default:; } } else { @@ -1436,30 +1503,30 @@ static void RotateDraw( track_p trk, coOrd orig, ANGLE_T angle ) trkSeg_p segPtr = &xx->segs[0]; if (xx->orig.x == 0.0 && xx->orig.y == 0.0) { //No origin set switch(segPtr->type) { - case SEG_POLY: - case SEG_FILPOLY: - for (int i=0;iu.p.cnt;i++) { - Rotate(&segPtr->u.p.pts[i].pt, orig, angle ); - } + case SEG_POLY: + case SEG_FILPOLY: + for (int i=0; iu.p.cnt; i++) { + Rotate(&segPtr->u.p.pts[i].pt, orig, angle ); + } break; - case SEG_STRLIN: - case SEG_DIMLIN: - case SEG_BENCH: - case SEG_TBLEDGE: - for (int i=0;i<2;i++) { - Rotate( &segPtr->u.l.pos[i], orig, angle ); - } - break; - case SEG_CRVLIN: - case SEG_FILCRCL: - Rotate( &segPtr->u.c.center, orig, angle ); - segPtr->u.c.a0 = NormalizeAngle(segPtr->u.c.a0 + angle); - break; - case SEG_TEXT: - Rotate( &segPtr->u.t.pos, orig, angle ); - segPtr->u.t.angle = NormalizeAngle(segPtr->u.t.angle+angle+xx->angle); - break; - default:; + case SEG_STRLIN: + case SEG_DIMLIN: + case SEG_BENCH: + case SEG_TBLEDGE: + for (int i=0; i<2; i++) { + Rotate( &segPtr->u.l.pos[i], orig, angle ); + } + break; + case SEG_CRVLIN: + case SEG_FILCRCL: + Rotate( &segPtr->u.c.center, orig, angle ); + segPtr->u.c.a0 = NormalizeAngle(segPtr->u.c.a0 + angle); + break; + case SEG_TEXT: + Rotate( &segPtr->u.t.pos, orig, angle ); + segPtr->u.t.angle = NormalizeAngle(segPtr->u.t.angle+angle+xx->angle); + break; + default:; } } else { Rotate( &xx->orig, orig, angle ); @@ -1477,23 +1544,27 @@ static void RescaleDraw( track_p trk, FLOAT_T ratio ) RescaleSegs( xx->segCnt, xx->segs, ratio, ratio, ratio ); } -static void DoConvertFill(void) { +#if 0 +static void DoConvertFill(void) +{ } +#endif static drawModContext_t drawModCmdContext = { - InfoMessage, - DoRedraw, - &mainD}; + InfoMessage, + DoRedraw, + &mainD +}; static BOOL_T infoSubst = FALSE; -static paramIntegerRange_t i100_100 = { -100, 100, 25 }; //Allow negative numbers +static paramFloatRange_t r100_100 = { -100.0, 100.0, 50 }; //Allow negative numbers static paramFloatRange_t r0d001_10000 = { 0.001, 10000 }; -static paramFloatRange_t r1_10000 = { 1, 10000 }; +//static paramFloatRange_t r1_10000 = { 1, 10000 }; static paramFloatRange_t r0_10000 = { 0, 10000 }; -static paramFloatRange_t r10000_10000 = {-10000, 10000}; +//static paramFloatRange_t r10000_10000 = {-10000, 10000}; static paramFloatRange_t r360_360 = { -360, 360, 80 }; static paramFloatRange_t r0_360 = { 0, 360, 80 }; static paramData_t drawModPLs[] = { @@ -1526,15 +1597,16 @@ static paramData_t drawModPLs[] = { static paramGroup_t drawModPG = { "drawMod", 0, drawModPLs, COUNT( drawModPLs ) }; static void DrawModDlgUpdate( - paramGroup_p pg, - int inx, - void * valueP ) + paramGroup_p pg, + int inx, + void * valueP ) { - DrawGeomModify(C_UPDATE,zero,&drawModCmdContext); - ParamLoadControl(&drawModPG,drawModRotCenterInx-1); //Make sure the angle is updated in case center moved - ParamLoadControl(&drawModPG,drawModRadius); // Make sure Radius updated - ParamLoadControl(&drawModPG,drawModRelAngle); //Relative Angle as well - MainRedraw(); + DrawGeomModify(C_UPDATE,zero,&drawModCmdContext); + ParamLoadControl(&drawModPG, + drawModRotCenterInx-1); //Make sure the angle is updated in case center moved + ParamLoadControl(&drawModPG,drawModRadius); // Make sure Radius updated + ParamLoadControl(&drawModPG,drawModRelAngle); //Relative Angle as well + MainRedraw(); } @@ -1556,20 +1628,23 @@ static STATUS_T ModifyDraw( track_p trk, wAction_t action, coOrd pos ) switch(action&0xFF) { //Remove Text value case C_START: + for (int inx = 0; inx < COUNT(drawModPLs); ++inx ) { + drawModPLs[inx].option |= PDO_DLGIGNORE; + } drawModCmdContext.type = xx->segs[0].type; switch(drawModCmdContext.type) { - case SEG_POLY: - case SEG_FILPOLY: - drawModCmdContext.filled = (drawModCmdContext.type==SEG_FILPOLY)?TRUE:FALSE; - drawModCmdContext.subtype = xx->segs[0].u.p.polyType; - drawModCmdContext.open = (drawModCmdContext.subtype==POLYLINE)?TRUE:FALSE; - break; - case SEG_TEXT: - InfoMessage("Text can only be modified in Describe Mode"); - wBeep(); - return C_ERROR; - default: - break; + case SEG_POLY: + case SEG_FILPOLY: + drawModCmdContext.filled = (drawModCmdContext.type==SEG_FILPOLY)?TRUE:FALSE; + drawModCmdContext.subtype = xx->segs[0].u.p.polyType; + drawModCmdContext.open = (drawModCmdContext.subtype==POLYLINE)?TRUE:FALSE; + break; + case SEG_TEXT: + InfoMessage("Text can only be modified in Describe Mode"); + wBeep(); + return C_ERROR; + default: + break; } drawModCmdContext.rot_moved = FALSE; @@ -1616,6 +1691,8 @@ static STATUS_T ModifyDraw( track_p trk, wAction_t action, coOrd pos ) if (drawModCmdContext.prev_inx >= 0) { controls[0] = drawModLengthPD.control; controls[1] = drawModRelAnglePD.control; + drawModLengthPD.option &= ~PDO_DLGIGNORE; + drawModRelAnglePD.option &= ~PDO_DLGIGNORE; controls[2] = NULL; labels[0] = N_("Seg Lth"); labels[1] = N_("Rel Ang"); @@ -1628,6 +1705,8 @@ static STATUS_T ModifyDraw( track_p trk, wAction_t action, coOrd pos ) } else { controls[0] = drawModWidthPD.control; controls[1] = drawModHeightPD.control; + drawModWidthPD.option &= ~PDO_DLGIGNORE; + drawModHeightPD.option &= ~PDO_DLGIGNORE; controls[2] = NULL; labels[0] = N_("Width"); labels[1] = N_("Height"); @@ -1637,13 +1716,15 @@ static STATUS_T ModifyDraw( track_p trk, wAction_t action, coOrd pos ) drawModHeightPD.option &= ~PDO_NORECORD; infoSubst = TRUE; } - break; + break; case SEG_STRLIN: case SEG_BENCH: case SEG_DIMLIN: case SEG_TBLEDGE: controls[0] = drawModLengthPD.control; controls[1] = drawModAnglePD.control; + drawModLengthPD.option &= ~PDO_DLGIGNORE; + drawModAnglePD.option &= ~PDO_DLGIGNORE; controls[2] = NULL; labels[0] = N_("Length"); labels[1] = N_("Angle"); @@ -1652,13 +1733,15 @@ static STATUS_T ModifyDraw( track_p trk, wAction_t action, coOrd pos ) drawModLengthPD.option &= ~PDO_NORECORD; drawModAnglePD.option &= ~PDO_NORECORD; infoSubst = TRUE; - break; + break; case SEG_CRVLIN: case SEG_FILCRCL: controls[0] = drawModRadiusPD.control; + drawModRadiusPD.option &= ~PDO_DLGIGNORE; controls[1] = NULL; labels[0] = N_("Radius"); - if ((drawModCmdContext.type == SEG_CRVLIN) && xx->segs[0].u.c.a1>0.0 && xx->segs[0].u.c.a1 <360.0) { + if ((drawModCmdContext.type == SEG_CRVLIN) && xx->segs[0].u.c.a1>0.0 + && xx->segs[0].u.c.a1 <360.0) { controls[1] = drawModArcAnglePD.control; controls[2] = NULL; labels[1] = N_("Arc Angle"); @@ -1666,14 +1749,15 @@ static STATUS_T ModifyDraw( track_p trk, wAction_t action, coOrd pos ) ParamLoadControls( &drawModPG ); InfoSubstituteControls( controls, labels ); drawModArcAnglePD.option &= ~PDO_NORECORD; - if (drawModCmdContext.type == SEG_CRVLIN) + if (drawModCmdContext.type == SEG_CRVLIN) { drawModArcAnglePD.option &= ~PDO_NORECORD; + } infoSubst = TRUE; break; default: InfoSubstituteControls( NULL, NULL ); infoSubst = FALSE; - break; + break; } } else { InfoSubstituteControls( NULL, NULL ); @@ -1700,21 +1784,28 @@ static STATUS_T ModifyDraw( track_p trk, wAction_t action, coOrd pos ) wMenuPushEnable( drawModDashDotDot, TRUE); wMenuPushEnable( drawModCenterDot, TRUE); wMenuPushEnable( drawModPhantom, TRUE); - if (!drawModCmdContext.rotate_state && (drawModCmdContext.type == SEG_POLY || drawModCmdContext.type == SEG_FILPOLY)) { - wMenuPushEnable( drawModDel,drawModCmdContext.prev_inx>=0); - if ((!drawModCmdContext.open && drawModCmdContext.prev_inx>=0) || - ((drawModCmdContext.prev_inx>0) && (drawModCmdContext.prev_inx=0); + if ((!drawModCmdContext.open && drawModCmdContext.prev_inx>=0) || + ((drawModCmdContext.prev_inx>0) + && (drawModCmdContext.prev_inx=0)); + wMenuPushEnable( drawModLast,drawModCmdContext.rotate_state + && (drawModCmdContext.prev_inx>=0)); wMenuPushEnable( drawModCenter,drawModCmdContext.rotate_state); break; case wActionExtKey: @@ -1722,12 +1813,12 @@ static STATUS_T ModifyDraw( track_p trk, wAction_t action, coOrd pos ) ignoredDraw = trk ; rc = DrawGeomModify( action, pos, &drawModCmdContext ); if ( infoSubst ) { - InfoSubstituteControls( NULL, NULL ); - infoSubst = FALSE; + InfoSubstituteControls( NULL, NULL ); + infoSubst = FALSE; } ignoredDraw = NULL; - if (rc == C_CONTINUE) break; - /* no break*/ + if (rc == C_CONTINUE) { break; } + /* no break*/ case C_FINISH: ignoredDraw = trk; rc = DrawGeomModify( C_FINISH, pos, &drawModCmdContext ); @@ -1771,8 +1862,9 @@ static void UngroupDraw( track_p trk ) { struct extraDataDraw_t * xx = GET_EXTRA_DATA(trk, T_DRAW, extraDataDraw_t); int inx; - if ( xx->segCnt <= 1 ) + if ( xx->segCnt <= 1 ) { return; + } DeleteTrack( trk, FALSE ); for ( inx=0; inxsegCnt; inx++ ) { trk = MakeDrawFromSeg( xx->orig, xx->angle, &xx->segs[inx] ); @@ -1785,10 +1877,10 @@ static void UngroupDraw( track_p trk ) static ANGLE_T GetAngleDraw( - track_p trk, - coOrd pos, - EPINX_T * ep0, - EPINX_T * ep1 ) + track_p trk, + coOrd pos, + EPINX_T * ep0, + EPINX_T * ep1 ) { struct extraDataDraw_t * xx = GET_EXTRA_DATA(trk, T_DRAW, extraDataDraw_t); ANGLE_T angle; @@ -1797,15 +1889,15 @@ static ANGLE_T GetAngleDraw( pos.y -= xx->orig.y; Rotate( &pos, zero, -xx->angle ); angle = GetAngleSegs( xx->segCnt, xx->segs, &pos, NULL, NULL, NULL, NULL, NULL); - if ( ep0 ) *ep0 = -1; - if ( ep1 ) *ep1 = -1; + if ( ep0 ) { *ep0 = -1; } + if ( ep1 ) { *ep1 = -1; } return NormalizeAngle( angle + xx->angle ); } static BOOL_T EnumerateDraw( - track_p trk ) + track_p trk ) { struct extraDataDraw_t * xx; int inx; @@ -1813,13 +1905,15 @@ static BOOL_T EnumerateDraw( if ( trk ) { xx = GET_EXTRA_DATA(trk, T_DRAW, extraDataDraw_t); - if ( xx->segCnt < 1 ) + if ( xx->segCnt < 1 ) { return FALSE; + } BOOL_T content = FALSE; for ( inx=0; inxsegCnt; inx++ ) { segPtr = &xx->segs[inx]; if ( segPtr->type == SEG_BENCH ) { - CountBench( segPtr->u.l.option, FindDistance( segPtr->u.l.pos[0], segPtr->u.l.pos[1] ) ); + CountBench( segPtr->u.l.option, FindDistance( segPtr->u.l.pos[0], + segPtr->u.l.pos[1] ) ); content = TRUE; } } @@ -1832,9 +1926,9 @@ static BOOL_T EnumerateDraw( static void FlipDraw( - track_p trk, - coOrd orig, - ANGLE_T angle ) + track_p trk, + coOrd orig, + ANGLE_T angle ) { struct extraDataDraw_t * xx = GET_EXTRA_DATA(trk, T_DRAW, extraDataDraw_t); @@ -1850,29 +1944,29 @@ static void FlipDraw( if (reorigin) { switch(segPtr->type) { - case SEG_POLY: - case SEG_FILPOLY: - for (int i=0;iu.p.cnt;i++) { - REORIGIN( segPtr->u.p.pts[i].pt, segPtr->u.p.pts[i].pt, xx->angle, xx->orig); - } + case SEG_POLY: + case SEG_FILPOLY: + for (int i=0; iu.p.cnt; i++) { + REORIGIN( segPtr->u.p.pts[i].pt, segPtr->u.p.pts[i].pt, xx->angle, xx->orig); + } break; - case SEG_STRLIN: - case SEG_DIMLIN: - case SEG_BENCH: - case SEG_TBLEDGE: - for (int i=0;i<2;i++) { - REORIGIN( segPtr->u.l.pos[i], segPtr->u.l.pos[i], xx->angle, xx->orig); - } - break; - case SEG_CRVLIN: - case SEG_FILCRCL: - REORIGIN( segPtr->u.c.center, segPtr->u.c.center, xx->angle, xx->orig); - segPtr->u.c.a0 = NormalizeAngle(segPtr->u.c.a0 + xx->angle); - break; - case SEG_TEXT: - REORIGIN( segPtr->u.t.pos, segPtr->u.t.pos, xx->angle, xx->orig ); - break; - default:; + case SEG_STRLIN: + case SEG_DIMLIN: + case SEG_BENCH: + case SEG_TBLEDGE: + for (int i=0; i<2; i++) { + REORIGIN( segPtr->u.l.pos[i], segPtr->u.l.pos[i], xx->angle, xx->orig); + } + break; + case SEG_CRVLIN: + case SEG_FILCRCL: + REORIGIN( segPtr->u.c.center, segPtr->u.c.center, xx->angle, xx->orig); + segPtr->u.c.a0 = NormalizeAngle(segPtr->u.c.a0 + xx->angle); + break; + case SEG_TEXT: + REORIGIN( segPtr->u.t.pos, segPtr->u.t.pos, xx->angle, xx->orig ); + break; + default:; } xx->orig.x = 0.0, xx->orig.y = 0.0, xx->angle = 0.0; } @@ -1881,13 +1975,13 @@ static void FlipDraw( } static BOOL_T StoreDraw( - track_p trk, - void **data, - long * len) + track_p trk, + void **data, + long * len) { struct extraDataDraw_t * xx = GET_EXTRA_DATA(trk, T_DRAW, extraDataDraw_t); if (xx->segs[0].type == SEG_POLY || - xx->segs[0].type == SEG_FILPOLY) { + xx->segs[0].type == SEG_FILPOLY) { *data = xx->segs[0].u.p.pts; *len = xx->segs[0].u.p.cnt* sizeof (pts_t); return TRUE; @@ -1896,13 +1990,13 @@ static BOOL_T StoreDraw( } static BOOL_T ReplayDraw( - track_p trk, - void * data, - long len) + track_p trk, + void * data, + long len) { struct extraDataDraw_t * xx = GET_EXTRA_DATA(trk, T_DRAW, extraDataDraw_t); if (xx->segs[0].type == SEG_POLY || - xx->segs[0].type == SEG_FILPOLY) { + xx->segs[0].type == SEG_FILPOLY) { xx->segs[0].u.p.pts = MyMalloc(len); memcpy(xx->segs[0].u.p.pts,data,len); return TRUE; @@ -1919,26 +2013,26 @@ static BOOL_T QueryDraw( track_p trk, int query ) case Q_IS_POLY: if ((xx->segs[0].type == SEG_POLY) || (xx->segs[0].type == SEG_FILPOLY) ) { return TRUE; - } - else + } else { return FALSE; + } case Q_IS_TEXT: - if (xx->segs[0].type== SEG_TEXT) return TRUE; - else return FALSE; + if (xx->segs[0].type== SEG_TEXT) { return TRUE; } + else { return FALSE; } case Q_GET_NODES: return TRUE; case Q_CAN_PARALLEL: case Q_MODIFY_CAN_SPLIT: if ((xx->segs[0].type == SEG_STRLIN) || - (xx->segs[0].type == SEG_CRVLIN) || - (xx->segs[0].type == SEG_BEZLIN) || - (xx->segs[0].type == SEG_FILCRCL) || - (xx->segs[0].type == SEG_FILPOLY) || - (xx->segs[0].type == SEG_POLY) || - (xx->segs[0].type == SEG_BENCH) || - (xx->segs[0].type == SEG_TBLEDGE) - ) return TRUE; - else return FALSE; + (xx->segs[0].type == SEG_CRVLIN) || + (xx->segs[0].type == SEG_BEZLIN) || + (xx->segs[0].type == SEG_FILCRCL) || + (xx->segs[0].type == SEG_FILPOLY) || + (xx->segs[0].type == SEG_POLY) || + (xx->segs[0].type == SEG_BENCH) || + (xx->segs[0].type == SEG_TBLEDGE) + ) { return TRUE; } + else { return FALSE; } default: return FALSE; } @@ -1955,454 +2049,489 @@ static wBool_t CompareDraw( track_cp trk1, track_cp trk2 ) return CompareSegs( xx1->segs, xx1->segCnt, xx2->segs, xx2->segCnt ); } -static BOOL_T GetParamsDraw( int inx, track_p trk, coOrd pos, trackParams_t * params ) { +static BOOL_T GetParamsDraw( int inx, track_p trk, coOrd pos, + trackParams_t * params ) +{ struct extraDataDraw_t * xx = GET_EXTRA_DATA(trk, T_DRAW, extraDataDraw_t); - if (inx != PARAMS_NODES ) return FALSE; + if (inx != PARAMS_NODES ) { return FALSE; } DYNARR_RESET(coOrd,params->nodes); BOOL_T back = FALSE; coOrd start,end; switch (xx->segs[0].type) { - case SEG_POLY: - if (xx->segs[0].u.p.polyType != POLYLINE) return FALSE; - REORIGIN(start,xx->segs[0].u.p.pts[0].pt,xx->angle,xx->orig); - REORIGIN(end,xx->segs[0].u.p.pts[xx->segs[0].u.p.cnt-1].pt,xx->angle,xx->orig); - params->ep = 1; - if (FindDistance(pos,start)>FindDistance(pos,end)) back = TRUE; - for (int i=0;isegs[0].u.p.cnt;i++) { - DYNARR_APPEND(coOrd,params->nodes,xx->segs[0].u.p.cnt); - if (back) - DYNARR_LAST(coOrd,params->nodes) = xx->segs[0].u.p.pts[xx->segs[0].u.p.cnt-1-i].pt; - else - DYNARR_LAST(coOrd,params->nodes) = xx->segs[0].u.p.pts[i].pt; - REORIGIN(DYNARR_LAST(coOrd,params->nodes),DYNARR_LAST(coOrd,params->nodes),xx->angle,xx->orig); - } - params->lineOrig = DYNARR_N(coOrd,params->nodes,0); - params->lineEnd = DYNARR_LAST(coOrd,params->nodes); - return TRUE; - - case SEG_STRLIN:; - REORIGIN(start,xx->segs[0].u.l.pos[0],xx->angle,xx->orig); - REORIGIN(end,xx->segs[0].u.l.pos[1],xx->angle,xx->orig); - params->ep = 1; - if (FindDistance(pos,start)>FindDistance(pos,end)) { - back = TRUE; - } - for (int i=0;i<2;i++) { - DYNARR_APPEND(coOrd,params->nodes,2); - REORIGIN(DYNARR_LAST(coOrd,params->nodes),xx->segs[0].u.l.pos[back?1-i:i],xx->angle,xx->orig); + case SEG_POLY: + if (xx->segs[0].u.p.polyType != POLYLINE) { return FALSE; } + REORIGIN(start,xx->segs[0].u.p.pts[0].pt,xx->angle,xx->orig); + REORIGIN(end,xx->segs[0].u.p.pts[xx->segs[0].u.p.cnt-1].pt,xx->angle,xx->orig); + params->ep = 1; + if (FindDistance(pos,start)>FindDistance(pos,end)) { back = TRUE; } + for (int i=0; isegs[0].u.p.cnt; i++) { + DYNARR_APPEND(coOrd,params->nodes,xx->segs[0].u.p.cnt); + if (back) { + DYNARR_LAST(coOrd,params->nodes) = xx->segs[0].u.p.pts[xx->segs[0].u.p.cnt-1 + -i].pt; + } else { + DYNARR_LAST(coOrd,params->nodes) = xx->segs[0].u.p.pts[i].pt; } - params->lineOrig = DYNARR_N(coOrd,params->nodes,0); - params->lineEnd = DYNARR_LAST(coOrd,params->nodes); - return TRUE; + REORIGIN(DYNARR_LAST(coOrd,params->nodes),DYNARR_LAST(coOrd,params->nodes), + xx->angle,xx->orig); + } + params->lineOrig = DYNARR_N(coOrd,params->nodes,0); + params->lineEnd = DYNARR_LAST(coOrd,params->nodes); + return TRUE; - case SEG_CRVLIN:; - Translate(&start,xx->segs[0].u.c.center,xx->segs[0].u.c.a0,fabs(xx->segs[0].u.c.radius)); - REORIGIN(start,start,xx->angle,xx->orig); - Translate(&end,xx->segs[0].u.c.center,xx->segs[0].u.c.a0+xx->segs[0].u.c.a1,fabs(xx->segs[0].u.c.radius)); - REORIGIN(end,end,xx->angle,xx->orig); - if (FindDistance(start,pos) > FindDistance(end,pos)) back = TRUE; - if (fabs(xx->segs[0].u.c.radius) > 0.5) { - double min_angle = R2D(2*acos(1.0-(0.1/fabs(xx->segs[0].u.c.radius)))); //Error max is 0.1" - int number = (int) ceil(xx->segs[0].u.c.a1/min_angle); - double arc_size = xx->segs[0].u.c.a1/number; - for (int i=0;i<=number;i++) { - DYNARR_APPEND(coOrd,params->nodes,number); - if (back) - Translate(&DYNARR_LAST(coOrd,params->nodes),xx->segs[0].u.c.center,xx->segs[0].u.c.a0+xx->segs[0].u.c.a1-(i*arc_size),fabs(xx->segs[0].u.c.radius)); - else - Translate(&DYNARR_LAST(coOrd,params->nodes),xx->segs[0].u.c.center,xx->segs[0].u.c.a0+(i*arc_size),fabs(xx->segs[0].u.c.radius)); - REORIGIN(DYNARR_LAST(coOrd,params->nodes),DYNARR_LAST(coOrd,params->nodes),xx->angle,xx->orig); + case SEG_STRLIN:; + REORIGIN(start,xx->segs[0].u.l.pos[0],xx->angle,xx->orig); + REORIGIN(end,xx->segs[0].u.l.pos[1],xx->angle,xx->orig); + params->ep = 1; + if (FindDistance(pos,start)>FindDistance(pos,end)) { + back = TRUE; + } + for (int i=0; i<2; i++) { + DYNARR_APPEND(coOrd,params->nodes,2); + REORIGIN(DYNARR_LAST(coOrd,params->nodes),xx->segs[0].u.l.pos[back?1-i:i], + xx->angle,xx->orig); + } + params->lineOrig = DYNARR_N(coOrd,params->nodes,0); + params->lineEnd = DYNARR_LAST(coOrd,params->nodes); + return TRUE; + + case SEG_CRVLIN:; + Translate(&start,xx->segs[0].u.c.center,xx->segs[0].u.c.a0, + fabs(xx->segs[0].u.c.radius)); + REORIGIN(start,start,xx->angle,xx->orig); + Translate(&end,xx->segs[0].u.c.center,xx->segs[0].u.c.a0+xx->segs[0].u.c.a1, + fabs(xx->segs[0].u.c.radius)); + REORIGIN(end,end,xx->angle,xx->orig); + if (FindDistance(start,pos) > FindDistance(end,pos)) { back = TRUE; } + if (fabs(xx->segs[0].u.c.radius) > 0.5) { + double min_angle = R2D(2*acos(1.0-(0.1/fabs( + xx->segs[0].u.c.radius)))); //Error max is 0.1" + int number = (int) ceil(xx->segs[0].u.c.a1/min_angle); + double arc_size = xx->segs[0].u.c.a1/number; + for (int i=0; i<=number; i++) { + DYNARR_APPEND(coOrd,params->nodes,number); + if (back) { + Translate(&DYNARR_LAST(coOrd,params->nodes),xx->segs[0].u.c.center, + xx->segs[0].u.c.a0+xx->segs[0].u.c.a1-(i*arc_size), + fabs(xx->segs[0].u.c.radius)); + } else { + Translate(&DYNARR_LAST(coOrd,params->nodes),xx->segs[0].u.c.center, + xx->segs[0].u.c.a0+(i*arc_size),fabs(xx->segs[0].u.c.radius)); } - } else { - DYNARR_APPEND(coOrd,params->nodes,2); - REORIGIN(DYNARR_LAST(coOrd,params->nodes),back?end:start,xx->angle,xx->orig); - DYNARR_APPEND(coOrd,params->nodes,2); - REORIGIN(DYNARR_LAST(coOrd,params->nodes),back?start:end,xx->angle,xx->orig); + REORIGIN(DYNARR_LAST(coOrd,params->nodes),DYNARR_LAST(coOrd,params->nodes), + xx->angle,xx->orig); } - params->lineOrig = DYNARR_N(coOrd,params->nodes,0); - params->lineEnd = DYNARR_LAST(coOrd,params->nodes); - params->ep = 1; - return TRUE; + } else { + DYNARR_APPEND(coOrd,params->nodes,2); + REORIGIN(DYNARR_LAST(coOrd,params->nodes),back?end:start,xx->angle,xx->orig); + DYNARR_APPEND(coOrd,params->nodes,2); + REORIGIN(DYNARR_LAST(coOrd,params->nodes),back?start:end,xx->angle,xx->orig); + } + params->lineOrig = DYNARR_N(coOrd,params->nodes,0); + params->lineEnd = DYNARR_LAST(coOrd,params->nodes); + params->ep = 1; + return TRUE; - case SEG_BEZLIN: - REORIGIN(start,xx->segs[0].u.b.pos[0],xx->angle,xx->orig); - REORIGIN(end,xx->segs[0].u.b.pos[3],xx->angle,xx->orig); - if (FindDistance(pos,start) < FindDistance(pos,end)) - params->ep = 0; - else params->ep = 1; - BOOL_T back = FALSE; - coOrd curr_pos = params->bezierPoints[params->ep*3]; - BOOL_T first = TRUE; - for (int i = 0; isegs[0].bezSegs.cnt;i++) { - trkSeg_p segPtr = &DYNARR_N(trkSeg_t,xx->segs[0].bezSegs,params->ep?xx->segs[0].bezSegs.cnt-1-i:i); - if (segPtr->type == SEG_STRLIN) { - back = FindDistance(segPtr->u.l.pos[0],curr_pos)>FindDistance(segPtr->u.l.pos[1],curr_pos); - if (first) { - first = FALSE; - DYNARR_APPEND(coOrd,params->nodes,2); - REORIGIN(DYNARR_LAST(coOrd,params->nodes),segPtr->u.l.pos[back],xx->angle,xx->orig); - } + case SEG_BEZLIN: + REORIGIN(start,xx->segs[0].u.b.pos[0],xx->angle,xx->orig); + REORIGIN(end,xx->segs[0].u.b.pos[3],xx->angle,xx->orig); + if (FindDistance(pos,start) < FindDistance(pos,end)) { + params->ep = 0; + } else { params->ep = 1; } + BOOL_T back = FALSE; + coOrd curr_pos = params->bezierPoints[params->ep*3]; + BOOL_T first = TRUE; + for (int i = 0; isegs[0].bezSegs.cnt; i++) { + trkSeg_p segPtr = &DYNARR_N(trkSeg_t,xx->segs[0].bezSegs, + params->ep?xx->segs[0].bezSegs.cnt-1-i:i); + if (segPtr->type == SEG_STRLIN) { + back = FindDistance(segPtr->u.l.pos[0], + curr_pos)>FindDistance(segPtr->u.l.pos[1],curr_pos); + if (first) { + first = FALSE; DYNARR_APPEND(coOrd,params->nodes,2); - REORIGIN(DYNARR_LAST(coOrd,params->nodes),segPtr->u.l.pos[1-back],xx->angle,xx->orig); - curr_pos = DYNARR_LAST(coOrd,params->nodes); - } else { - coOrd start,end; - Translate(&start,segPtr->u.c.center,segPtr->u.c.a0,segPtr->u.c.radius); - Translate(&end,segPtr->u.c.center,segPtr->u.c.a0+segPtr->u.c.a1,segPtr->u.c.radius); - back = FindDistance(start,curr_pos)>FindDistance(end,curr_pos); - if (fabs(segPtr->u.c.radius) > 0.2) { - double min_angle = 360*acos(1.0-(0.1/fabs(segPtr->u.c.radius)))/M_PI; //Error max is 0.1" - int number = (int)ceil(segPtr->u.c.a1/min_angle); - double arc_size = segPtr->u.c.a1/number; - for (int j=1-first;jnodes,number-first); - if (back == params->ep) - Translate(&DYNARR_LAST(coOrd,params->nodes),segPtr->u.c.center,segPtr->u.c.a0+(j*arc_size),fabs(segPtr->u.c.radius) ); - else - Translate(&DYNARR_LAST(coOrd,params->nodes),segPtr->u.c.center,segPtr->u.c.a0+segPtr->u.c.a1-(j*arc_size),fabs(segPtr->u.c.radius) ); - REORIGIN(DYNARR_LAST(coOrd,params->nodes),DYNARR_LAST(coOrd,params->nodes),xx->angle,xx->orig); - } - first = FALSE; - } else { - if (first) { - first = FALSE; - DYNARR_APPEND(coOrd,params->nodes,2); - REORIGIN(DYNARR_LAST(coOrd,params->nodes),start,xx->angle,xx->orig); + REORIGIN(DYNARR_LAST(coOrd,params->nodes),segPtr->u.l.pos[back],xx->angle, + xx->orig); + } + DYNARR_APPEND(coOrd,params->nodes,2); + REORIGIN(DYNARR_LAST(coOrd,params->nodes),segPtr->u.l.pos[1-back],xx->angle, + xx->orig); + curr_pos = DYNARR_LAST(coOrd,params->nodes); + } else { + coOrd start,end; + Translate(&start,segPtr->u.c.center,segPtr->u.c.a0,segPtr->u.c.radius); + Translate(&end,segPtr->u.c.center,segPtr->u.c.a0+segPtr->u.c.a1, + segPtr->u.c.radius); + back = FindDistance(start,curr_pos)>FindDistance(end,curr_pos); + if (fabs(segPtr->u.c.radius) > 0.2) { + double min_angle = 360*acos(1.0-(0.1/fabs( + segPtr->u.c.radius)))/M_PI; //Error max is 0.1" + int number = (int)ceil(segPtr->u.c.a1/min_angle); + double arc_size = segPtr->u.c.a1/number; + for (int j=1-first; jnodes,number-first); + if (back == params->ep) { + Translate(&DYNARR_LAST(coOrd,params->nodes),segPtr->u.c.center, + segPtr->u.c.a0+(j*arc_size),fabs(segPtr->u.c.radius) ); + } else { + Translate(&DYNARR_LAST(coOrd,params->nodes),segPtr->u.c.center, + segPtr->u.c.a0+segPtr->u.c.a1-(j*arc_size),fabs(segPtr->u.c.radius) ); } - DYNARR_APPEND(coOrd,params->nodes,1); - REORIGIN(DYNARR_LAST(coOrd,params->nodes),end,xx->angle,xx->orig); + REORIGIN(DYNARR_LAST(coOrd,params->nodes),DYNARR_LAST(coOrd,params->nodes), + xx->angle,xx->orig); + } + first = FALSE; + } else { + if (first) { first = FALSE; + DYNARR_APPEND(coOrd,params->nodes,2); + REORIGIN(DYNARR_LAST(coOrd,params->nodes),start,xx->angle,xx->orig); } - curr_pos = DYNARR_LAST(coOrd,params->nodes); + DYNARR_APPEND(coOrd,params->nodes,1); + REORIGIN(DYNARR_LAST(coOrd,params->nodes),end,xx->angle,xx->orig); + first = FALSE; } + curr_pos = DYNARR_LAST(coOrd,params->nodes); } - params->lineOrig = DYNARR_N(coOrd,params->nodes,0); - params->lineEnd = DYNARR_LAST(coOrd,params->nodes); - return TRUE; + } + params->lineOrig = DYNARR_N(coOrd,params->nodes,0); + params->lineEnd = DYNARR_LAST(coOrd,params->nodes); + return TRUE; - default: - return FALSE; + default: + return FALSE; } return FALSE; } -static BOOL_T SplitDraw( track_p trk, coOrd pos, EPINX_T ep, track_p *leftover, EPINX_T * ep0, EPINX_T * ep1 ) +static BOOL_T SplitDraw( track_p trk, coOrd pos, EPINX_T ep, track_p *leftover, + EPINX_T * ep0, EPINX_T * ep1 ) { - struct extraDataDraw_t * xx = GET_EXTRA_DATA(trk, T_DRAW, extraDataDraw_t); + struct extraDataDraw_t * xx = GET_EXTRA_DATA(trk, T_DRAW, extraDataDraw_t); - coOrd p0,p1; - DIST_T d; - BOOL_T polyline_trim = FALSE, new_last = ep; + coOrd p0,p1; + DIST_T d; + BOOL_T polyline_trim = FALSE, new_last = ep; - DYNARR_SET(trkSeg_t, tempSegs_da, 1); + DYNARR_SET(trkSeg_t, tempSegs_da, 1); - tempSegs(0).type = -1; + tempSegs(0).type = -1; - switch (xx->segs[0].type) { - case SEG_STRLIN: - case SEG_BENCH: - case SEG_TBLEDGE: - REORIGIN(p0,xx->segs[0].u.l.pos[0],xx->angle,xx->orig); - REORIGIN(p1,xx->segs[0].u.l.pos[1],xx->angle,xx->orig); - tempSegs(0).color = xx->segs[0].color; - tempSegs(0).width = xx->segs[0].width; - tempSegs_da.cnt = 1; - tempSegs(0).type = xx->segs[0].type; - tempSegs(0).u.l.pos[0] = 1-ep?p0:pos; - tempSegs(0).u.l.pos[1] = 1-ep?pos:p1; - xx->segs[0].u.l.pos[0] = 1-ep?pos:p0; - xx->segs[0].u.l.pos[1] = 1-ep?p1:pos; - break; - case SEG_CRVLIN: - case SEG_FILCRCL: ; - coOrd c; - REORIGIN(c, xx->segs[0].u.c.center, xx->angle, xx->orig); - coOrd c0,c1; - if (xx->segs[0].type == SEG_FILCRCL || - (xx->segs[0].type == SEG_CRVLIN && xx->segs[0].u.c.a1 >= 360.0)) { - Translate(&c0,c,FindAngle(c,pos),xx->segs[0].u.c.radius); - c1 = c0; - xx->segs[0].type = SEG_CRVLIN; - xx->segs[0].u.c.a0 = FindAngle(c,c0); - xx->segs[0].u.c.a1 = 355.0; + switch (xx->segs[0].type) { + case SEG_STRLIN: + case SEG_BENCH: + case SEG_TBLEDGE: + REORIGIN(p0,xx->segs[0].u.l.pos[0],xx->angle,xx->orig); + REORIGIN(p1,xx->segs[0].u.l.pos[1],xx->angle,xx->orig); + DYNARR_SET( trkSeg_t, tempSegs_da, 1 ); + tempSegs(0).color = xx->segs[0].color; + tempSegs(0).lineWidth = xx->segs[0].lineWidth; + tempSegs(0).type = xx->segs[0].type; + tempSegs(0).u.l.pos[0] = 1-ep?p0:pos; + tempSegs(0).u.l.pos[1] = 1-ep?pos:p1; + xx->segs[0].u.l.pos[0] = 1-ep?pos:p0; + xx->segs[0].u.l.pos[1] = 1-ep?p1:pos; + break; + case SEG_CRVLIN: + case SEG_FILCRCL: ; + coOrd c; + REORIGIN(c, xx->segs[0].u.c.center, xx->angle, xx->orig); + coOrd c0,c1; + if (xx->segs[0].type == SEG_FILCRCL || + (xx->segs[0].type == SEG_CRVLIN && xx->segs[0].u.c.a1 >= 360.0)) { + Translate(&c0,c,FindAngle(c,pos),xx->segs[0].u.c.radius); + c1 = c0; + xx->segs[0].type = SEG_CRVLIN; + xx->segs[0].u.c.a0 = FindAngle(c,c0); + xx->segs[0].u.c.a1 = 355.0; + } else { + Translate(&c0,c,xx->segs[0].u.c.a0+xx->angle,xx->segs[0].u.c.radius); + Translate(&c1,c,xx->segs[0].u.c.a1+xx->segs[0].u.c.a0+xx->angle, + xx->segs[0].u.c.radius); + DYNARR_SET( trkSeg_t, tempSegs_da, 1 ); + tempSegs(0).color = xx->segs[0].color; + tempSegs(0).lineWidth = xx->segs[0].lineWidth; + tempSegs(0).type = SEG_CRVLIN; + tempSegs(0).u.c.center = c; + tempSegs(0).u.c.radius = xx->segs[0].u.c.radius; + if (ep) { + tempSegs(0).u.c.a0 = FindAngle(c,c0); + tempSegs(0).u.c.a1 = NormalizeAngle(FindAngle(c,pos)-tempSegs(0).u.c.a0); + } else { + tempSegs(0).u.c.a0 = FindAngle(c,pos); + tempSegs(0).u.c.a1 = NormalizeAngle(FindAngle(c,c1)-tempSegs(0).u.c.a0); + } + xx->segs[0].u.c.center = c; + if (ep) { + xx->segs[0].u.c.a0 = FindAngle(c,pos); + xx->segs[0].u.c.a1 = NormalizeAngle(FindAngle(c,c1)-xx->segs[0].u.c.a0); + } else { + xx->segs[0].u.c.a0 = FindAngle(c,c0); + xx->segs[0].u.c.a1 = NormalizeAngle(FindAngle(c,pos)-xx->segs[0].u.c.a0); + } + } + break; + case SEG_POLY: + case SEG_FILPOLY: + d = DIST_INF; + DIST_T dd; + BOOL_T onPoint = FALSE; +// BOOL_T closeSeg = FALSE; + coOrd end; + int polyInx = -1; + for ( int inx=0; inxsegs[0].u.p.cnt-1; inx++ ) { + p0 = pos; + coOrd pl0,pl1; + REORIGIN(pl0,xx->segs[0].u.p.pts[inx].pt,xx->angle,xx->orig); + REORIGIN(pl1,xx->segs[0].u.p.pts[inx+1].pt,xx->angle,xx->orig); + dd = LineDistance( &p0, pl0, pl1 ); + if ( d > dd ) { + d = dd; + if (IsClose(FindDistance(pos,pl1))) { + polyInx = inx; + REORIGIN(pos,xx->segs[0].u.p.pts[inx].pt,xx->angle,xx->orig); + onPoint = TRUE; + break; + } else if (IsClose(FindDistance(pos,pl1))) { + polyInx = inx+1; + REORIGIN(pos,xx->segs[0].u.p.pts[inx+1].pt,xx->angle,xx->orig); + onPoint=TRUE; + break; } else { - Translate(&c0,c,xx->segs[0].u.c.a0+xx->angle,xx->segs[0].u.c.radius); - Translate(&c1,c,xx->segs[0].u.c.a1+xx->segs[0].u.c.a0+xx->angle,xx->segs[0].u.c.radius); - tempSegs(0).color = xx->segs[0].color; - tempSegs(0).width = xx->segs[0].width; - tempSegs_da.cnt = 1; - tempSegs(0).type = SEG_CRVLIN; - tempSegs(0).u.c.center = c; - tempSegs(0).u.c.radius = xx->segs[0].u.c.radius; - if (ep) { - tempSegs(0).u.c.a0 = FindAngle(c,c0); - tempSegs(0).u.c.a1 = NormalizeAngle(FindAngle(c,pos)-tempSegs(0).u.c.a0); - } else { - tempSegs(0).u.c.a0 = FindAngle(c,pos); - tempSegs(0).u.c.a1 = NormalizeAngle(FindAngle(c,c1)-tempSegs(0).u.c.a0); - } - xx->segs[0].u.c.center = c; - if (ep) { - xx->segs[0].u.c.a0 = FindAngle(c,pos); - xx->segs[0].u.c.a1 = NormalizeAngle(FindAngle(c,c1)-xx->segs[0].u.c.a0); - } else { - xx->segs[0].u.c.a0 = FindAngle(c,c0); - xx->segs[0].u.c.a1 = NormalizeAngle(FindAngle(c,pos)-xx->segs[0].u.c.a0); - } - } - break; - case SEG_POLY: - case SEG_FILPOLY: - d = DIST_INF; - DIST_T dd; - BOOL_T onPoint = FALSE; - BOOL_T closeSeg = FALSE; - coOrd end; - int polyInx = -1; - for ( int inx=0; inxsegs[0].u.p.cnt-1; inx++ ) { - p0 = pos; - coOrd pl0,pl1; - REORIGIN(pl0,xx->segs[0].u.p.pts[inx].pt,xx->angle,xx->orig); - REORIGIN(pl1,xx->segs[0].u.p.pts[inx+1].pt,xx->angle,xx->orig); - dd = LineDistance( &p0, pl0, pl1 ); - if ( d > dd ) { - d = dd; - if (IsClose(FindDistance(pos,pl1))) { - polyInx = inx; - REORIGIN(pos,xx->segs[0].u.p.pts[inx].pt,xx->angle,xx->orig); - onPoint = TRUE; - break; - } else if (IsClose(FindDistance(pos,pl1))) { - polyInx = inx+1; - REORIGIN(pos,xx->segs[0].u.p.pts[inx+1].pt,xx->angle,xx->orig); - onPoint=TRUE; - break; - } else { - if (!IsClose(d)) continue; - polyInx = inx; - pos = p0; - break; - } - } + if (!IsClose(d)) { continue; } + polyInx = inx; + pos = p0; + break; } - //If Closed, look at closing line - if ( !onPoint && (xx->segs[0].u.p.polyType != POLYLINE)) { - coOrd pl0,pl1; - p0 = pos; - REORIGIN(pl0,xx->segs[0].u.p.pts[xx->segs[0].u.p.cnt-1].pt,xx->angle,xx->orig); - REORIGIN(pl1,xx->segs[0].u.p.pts[0].pt,xx->angle,xx->orig); - dd = LineDistance( &p0, pl0, pl1 ); - if (d > dd) { - d = dd; - if (IsClose(d)) { - polyInx = xx->segs[0].u.p.cnt-1; - closeSeg=TRUE; - pos = p0; - } - } + } + } + //If Closed, look at closing line + if ( !onPoint && (xx->segs[0].u.p.polyType != POLYLINE)) { + coOrd pl0,pl1; + p0 = pos; + REORIGIN(pl0,xx->segs[0].u.p.pts[xx->segs[0].u.p.cnt-1].pt,xx->angle,xx->orig); + REORIGIN(pl1,xx->segs[0].u.p.pts[0].pt,xx->angle,xx->orig); + dd = LineDistance( &p0, pl0, pl1 ); + if (d > dd) { + d = dd; + if (IsClose(d)) { + polyInx = xx->segs[0].u.p.cnt-1; +// closeSeg=TRUE; + pos = p0; } - //If Closed, split into a PolyLine - if (xx->segs[0].u.p.polyType != POLYLINE) { - if (!IsClose(d)) { - *leftover = NULL; - return FALSE; - } - end = pos; - REORIGIN(end,end,xx->angle,xx->orig); - - trkSeg_t temp; //Buffer for expanded array - temp.u.p.cnt = xx->segs[0].u.p.cnt + 2 - onPoint; - temp.u.p.pts = MyMalloc(temp.u.p.cnt*sizeof(pts_t)); - int j = 0; - temp.u.p.pts[j].pt = end; - temp.u.p.pts[j].pt_type = wPolyLineStraight; - j++; - /* After split */ - for (int i=polyInx+1;i<=xx->segs[0].u.p.cnt-1;i++,j++) { - temp.u.p.pts[j] = xx->segs[0].u.p.pts[i]; - REORIGIN(temp.u.p.pts[j].pt,temp.u.p.pts[j].pt,xx->angle,xx->orig); - } - /* Before split */ - for (int i=0;i<=polyInx;i++,j++) { - temp.u.p.pts[j] = xx->segs[0].u.p.pts[i]; - REORIGIN(temp.u.p.pts[j].pt,temp.u.p.pts[j].pt,xx->angle,xx->orig); - } - if (!onPoint) { - temp.u.p.pts[temp.u.p.cnt-1].pt = end; - } - temp.u.p.pts[temp.u.p.cnt-1].pt_type = wPolyLineStraight; + } + } + //If Closed, split into a PolyLine + if (xx->segs[0].u.p.polyType != POLYLINE) { + if (!IsClose(d)) { + *leftover = NULL; + return FALSE; + } + end = pos; + REORIGIN(end,end,xx->angle,xx->orig); - //Swap Pts Array into existing track - MyFree(xx->segs[0].u.p.pts); - xx->segs[0].u.p.pts = temp.u.p.pts; - xx->segs[0].u.p.cnt = temp.u.p.cnt; - xx->segs[0].u.p.polyType = POLYLINE; - break; + trkSeg_t temp; //Buffer for expanded array + temp.u.p.cnt = xx->segs[0].u.p.cnt + 2 - onPoint; + temp.u.p.pts = MyMalloc(temp.u.p.cnt*sizeof(pts_t)); + int j = 0; + temp.u.p.pts[j].pt = end; + temp.u.p.pts[j].pt_type = wPolyLineStraight; + j++; + /* After split */ + for (int i=polyInx+1; i<=xx->segs[0].u.p.cnt-1; i++,j++) { + temp.u.p.pts[j] = xx->segs[0].u.p.pts[i]; + REORIGIN(temp.u.p.pts[j].pt,temp.u.p.pts[j].pt,xx->angle,xx->orig); + } + /* Before split */ + for (int i=0; i<=polyInx; i++,j++) { + temp.u.p.pts[j] = xx->segs[0].u.p.pts[i]; + REORIGIN(temp.u.p.pts[j].pt,temp.u.p.pts[j].pt,xx->angle,xx->orig); + } + if (!onPoint) { + temp.u.p.pts[temp.u.p.cnt-1].pt = end; + } + temp.u.p.pts[temp.u.p.cnt-1].pt_type = wPolyLineStraight; + + //Swap Pts Array into existing track + MyFree(xx->segs[0].u.p.pts); + xx->segs[0].u.p.pts = temp.u.p.pts; + xx->segs[0].u.p.cnt = temp.u.p.cnt; + xx->segs[0].u.p.polyType = POLYLINE; + break; + } + //Check if on an end-point -> reject + if ((polyInx <= 0 || polyInx >= xx->segs[0].u.p.cnt-1) && onPoint ) { + *leftover = NULL; + return FALSE; + } + if (polyInx == 0 || (polyInx == 1 && onPoint )) { + //Between First End and Next -> Trim end + end = xx->segs[0].u.p.pts[0].pt; + REORIGIN(end,end,xx->angle,xx->orig); + if (onPoint) { + for (int i=0; i< xx->segs[0].u.p.cnt-1; i++) { + xx->segs[0].u.p.pts[i] = xx->segs[0].u.p.pts[i+1]; + REORIGIN(xx->segs[0].u.p.pts[i].pt,xx->segs[0].u.p.pts[i].pt,xx->angle, + xx->orig); } - //Check if on an end-point -> reject - if ((polyInx <= 0 || polyInx >= xx->segs[0].u.p.cnt-1) && onPoint ) { - *leftover = NULL; - return FALSE; + --xx->segs[0].u.p.cnt; + } else { + xx->segs[0].u.p.pts[0].pt = pos; + for (int i=1; i< xx->segs[0].u.p.cnt; i++) { + REORIGIN(xx->segs[0].u.p.pts[i].pt,xx->segs[0].u.p.pts[i].pt,xx->angle, + xx->orig); } - if (polyInx == 0 || (polyInx == 1 && onPoint )) { - //Between First End and Next -> Trim end - end = xx->segs[0].u.p.pts[0].pt; - REORIGIN(end,end,xx->angle,xx->orig); - if (onPoint) { - for (int i=0;i< xx->segs[0].u.p.cnt-1;i++) { - xx->segs[0].u.p.pts[i] = xx->segs[0].u.p.pts[i+1]; - REORIGIN(xx->segs[0].u.p.pts[i].pt,xx->segs[0].u.p.pts[i].pt,xx->angle,xx->orig); - } - --xx->segs[0].u.p.cnt; - } else { - xx->segs[0].u.p.pts[0].pt = pos; - for (int i=1;i< xx->segs[0].u.p.cnt;i++) { - REORIGIN(xx->segs[0].u.p.pts[i].pt,xx->segs[0].u.p.pts[i].pt,xx->angle,xx->orig); - } - } - tempSegs(0).color = xx->segs[0].color; - tempSegs(0).width = xx->segs[0].width; - tempSegs_da.cnt = 1; - tempSegs(0).type = SEG_STRLIN; - tempSegs(0).u.l.pos[0] = pos; - tempSegs(0).u.l.pos[1] = end; - polyline_trim = TRUE; - new_last = FALSE; - } else if (polyInx == xx->segs[0].u.p.cnt-2) { - //Between second last and last -> Trim the other end - end = xx->segs[0].u.p.pts[xx->segs[0].u.p.cnt-1].pt; - REORIGIN(end,end,xx->angle,xx->orig); - if (onPoint) { - --xx->segs[0].u.p.cnt; - for (int i=0;isegs[0].u.p.cnt;i++) { - REORIGIN(xx->segs[0].u.p.pts[i].pt,xx->segs[0].u.p.pts[i].pt,xx->angle,xx->orig); - } - } else { - xx->segs[0].u.p.pts[xx->segs[0].u.p.cnt-1].pt = pos; - for (int i=0;isegs[0].u.p.cnt;i++) { - REORIGIN(xx->segs[0].u.p.pts[i].pt,xx->segs[0].u.p.pts[i].pt,xx->angle,xx->orig); - } + } + DYNARR_SET( trkSeg_t, tempSegs_da, 1 ); + tempSegs(0).color = xx->segs[0].color; + tempSegs(0).lineWidth = xx->segs[0].lineWidth; + tempSegs(0).type = SEG_STRLIN; + tempSegs(0).u.l.pos[0] = pos; + tempSegs(0).u.l.pos[1] = end; + polyline_trim = TRUE; + new_last = FALSE; + } else if (polyInx == xx->segs[0].u.p.cnt-2) { + //Between second last and last -> Trim the other end + end = xx->segs[0].u.p.pts[xx->segs[0].u.p.cnt-1].pt; + REORIGIN(end,end,xx->angle,xx->orig); + if (onPoint) { + --xx->segs[0].u.p.cnt; + for (int i=0; isegs[0].u.p.cnt; i++) { + REORIGIN(xx->segs[0].u.p.pts[i].pt,xx->segs[0].u.p.pts[i].pt,xx->angle, + xx->orig); + } + } else { + xx->segs[0].u.p.pts[xx->segs[0].u.p.cnt-1].pt = pos; + for (int i=0; isegs[0].u.p.cnt; i++) { + REORIGIN(xx->segs[0].u.p.pts[i].pt,xx->segs[0].u.p.pts[i].pt,xx->angle, + xx->orig); + } + } + DYNARR_SET( trkSeg_t, tempSegs_da, 1 ); + tempSegs(0).color = xx->segs[0].color; + tempSegs(0).lineWidth = xx->segs[0].lineWidth; + tempSegs(0).type = SEG_STRLIN; + tempSegs(0).u.l.pos[0] = end; + tempSegs(0).u.l.pos[1] = pos; + polyline_trim = TRUE; + new_last = TRUE; + } else { + //Check that new line will have >=3 spots if not -> reject + if (xx->segs[0].u.p.cnt >3) { + DYNARR_SET( trkSeg_t, tempSegs_da, 1 ); + tempSegs(0).color = xx->segs[0].color; + tempSegs(0).lineWidth = xx->segs[0].lineWidth; + tempSegs(0).type = SEG_POLY; + tempSegs(0).u.p.polyType = POLYLINE; + if (1-ep) { + tempSegs(0).u.p.cnt = xx->segs[0].u.p.cnt - polyInx; + } else { + tempSegs(0).u.p.cnt = polyInx + 2 - onPoint; + } + tempSegs(0).u.p.pts = MyMalloc(tempSegs(0).u.p.cnt*sizeof(pts_t)); + int j = 0; + if (1-ep) { + tempSegs(0).u.p.pts[0].pt=pos; + tempSegs(0).u.p.pts[0].pt_type = wPolyLineStraight; + j = 1; + for (int i=polyInx+1; isegs[0].u.p.cnt; i++,j++) { + tempSegs(0).u.p.pts[j] = xx->segs[0].u.p.pts[i]; + REORIGIN(tempSegs(0).u.p.pts[j].pt,tempSegs(0).u.p.pts[j].pt,xx->angle, + xx->orig); } - tempSegs(0).color = xx->segs[0].color; - tempSegs(0).width = xx->segs[0].width; - tempSegs_da.cnt = 1; - tempSegs(0).type = SEG_STRLIN; - tempSegs(0).u.l.pos[0] = end; - tempSegs(0).u.l.pos[1] = pos; - polyline_trim = TRUE; - new_last = TRUE; } else { - //Check that new line will have >=3 spots if not -> reject - if (xx->segs[0].u.p.cnt >3) { - tempSegs(0).color = xx->segs[0].color; - tempSegs(0).width = xx->segs[0].width; - tempSegs_da.cnt = 1; - tempSegs(0).type = SEG_POLY; - tempSegs(0).u.p.polyType = POLYLINE; - if (1-ep) - tempSegs(0).u.p.cnt = xx->segs[0].u.p.cnt - polyInx; - else - tempSegs(0).u.p.cnt = polyInx + 2 - onPoint; - tempSegs(0).u.p.pts = MyMalloc(tempSegs(0).u.p.cnt*sizeof(pts_t)); - int j = 0; - if (1-ep) { - tempSegs(0).u.p.pts[0].pt=pos; - tempSegs(0).u.p.pts[0].pt_type = wPolyLineStraight; - j = 1; - for (int i=polyInx+1;isegs[0].u.p.cnt;i++,j++) { - tempSegs(0).u.p.pts[j] = xx->segs[0].u.p.pts[i]; - REORIGIN(tempSegs(0).u.p.pts[j].pt,tempSegs(0).u.p.pts[j].pt,xx->angle,xx->orig); - } - } else { - for (int i=0;i<=polyInx+1;i++,j++) { - tempSegs(0).u.p.pts[j] = xx->segs[0].u.p.pts[i]; - REORIGIN(tempSegs(0).u.p.pts[j].pt,tempSegs(0).u.p.pts[j].pt,xx->angle,xx->orig); - } - if (!onPoint) { - tempSegs(0).u.p.pts[tempSegs(0).u.p.cnt-1].pt = pos; - tempSegs(0).u.p.pts[tempSegs(0).u.p.cnt-1].pt_type = wPolyLineStraight; - } - } - } else { - *leftover = NULL; - return FALSE; + for (int i=0; i<=polyInx+1; i++,j++) { + tempSegs(0).u.p.pts[j] = xx->segs[0].u.p.pts[i]; + REORIGIN(tempSegs(0).u.p.pts[j].pt,tempSegs(0).u.p.pts[j].pt,xx->angle, + xx->orig); } - polyline_trim = TRUE; - new_last = 1-ep; - int new_cnt, old_cnt = xx->segs[0].u.p.cnt; - if (1-ep) - new_cnt = polyInx + 2 - onPoint; - else - new_cnt = xx->segs[0].u.p.cnt-polyInx; - pts_t * newpts = MyMalloc(new_cnt*sizeof(pts_t)); - int j = 0; - if (1-ep) { - for (int i = 0; isegs[0].u.p.pts[i]; - REORIGIN(newpts[j].pt,newpts[i].pt,xx->angle,xx->orig); - } - if (!onPoint) { - newpts[new_cnt-1].pt = pos; - newpts[new_cnt-1].pt_type = wPolyLineStraight; - } - } else { - newpts[0].pt = pos; - newpts[0].pt_type = wPolyLineStraight; - j = 1; - for (int i=polyInx+1;isegs[0].u.p.pts[i]; - REORIGIN(newpts[j].pt,newpts[j].pt,xx->angle,xx->orig); - } + if (!onPoint) { + tempSegs(0).u.p.pts[tempSegs(0).u.p.cnt-1].pt = pos; + tempSegs(0).u.p.pts[tempSegs(0).u.p.cnt-1].pt_type = wPolyLineStraight; } - MyFree(xx->segs[0].u.p.pts); - xx->segs[0].u.p.cnt = new_cnt; - xx->segs[0].u.p.pts = newpts; } - break; - default: + } else { + *leftover = NULL; return FALSE; - } - *leftover = NULL; - if (tempSegs(0).type != -1) { - *leftover = MakeDrawFromSeg( zero, 0.0, &tempSegs(0) ); - struct extraDataDraw_t * yy = GET_EXTRA_DATA(*leftover, T_DRAW, extraDataDraw_t); - yy->lineType = xx->lineType; - if (tempSegs(0).type == SEG_POLY && tempSegs(0).u.p.pts) { - MyFree(tempSegs(0).u.p.pts); - tempSegs(0).u.p.cnt = 0; - tempSegs(0).u.p.pts = NULL; } + polyline_trim = TRUE; + new_last = 1-ep; + int new_cnt, old_cnt = xx->segs[0].u.p.cnt; + if (1-ep) { + new_cnt = polyInx + 2 - onPoint; + } else { + new_cnt = xx->segs[0].u.p.cnt-polyInx; + } + pts_t * newpts = MyMalloc(new_cnt*sizeof(pts_t)); + int j = 0; + if (1-ep) { + for (int i = 0; isegs[0].u.p.pts[i]; + REORIGIN(newpts[j].pt,newpts[i].pt,xx->angle,xx->orig); + } + if (!onPoint) { + newpts[new_cnt-1].pt = pos; + newpts[new_cnt-1].pt_type = wPolyLineStraight; + } + } else { + newpts[0].pt = pos; + newpts[0].pt_type = wPolyLineStraight; + j = 1; + for (int i=polyInx+1; isegs[0].u.p.pts[i]; + REORIGIN(newpts[j].pt,newpts[j].pt,xx->angle,xx->orig); + } + } + MyFree(xx->segs[0].u.p.pts); + xx->segs[0].u.p.cnt = new_cnt; + xx->segs[0].u.p.pts = newpts; } + break; + default: + return FALSE; + } + *leftover = NULL; + if (tempSegs(0).type != -1) { + *leftover = MakeDrawFromSeg( zero, 0.0, &tempSegs(0) ); + struct extraDataDraw_t * yy = GET_EXTRA_DATA(*leftover, T_DRAW, + extraDataDraw_t); + yy->lineType = xx->lineType; + if (tempSegs(0).type == SEG_POLY && tempSegs(0).u.p.pts) { + MyFree(tempSegs(0).u.p.pts); + tempSegs(0).u.p.cnt = 0; + tempSegs(0).u.p.pts = NULL; + } + } - if (*leftover) { - //Polyline sets new_last to the end of the extra - if (polyline_trim && (ep != new_last)) { - *leftover = trk; - } + if (*leftover) { + //Polyline sets new_last to the end of the extra + if (polyline_trim && (ep != new_last)) { + *leftover = trk; } - xx->orig = zero; - xx->angle = 0.0; - ComputeDrawBoundingBox(trk); - *ep0 = 1-ep; - *ep1 = ep; - return TRUE; + } + xx->orig = zero; + xx->angle = 0.0; + ComputeDrawBoundingBox(trk); + *ep0 = 1-ep; + *ep1 = ep; + return TRUE; } static BOOL_T MakeParallelDraw( - track_p trk, - coOrd pos, - DIST_T sep, - DIST_T factor, - track_p * newTrkR, - coOrd * p0R, - coOrd * p1R, - BOOL_T track) + track_p trk, + coOrd pos, + DIST_T sep, + DIST_T factor, + track_p * newTrkR, + coOrd * p0R, + coOrd * p1R, + BOOL_T track) { - if (track) return FALSE; + if (track) { return FALSE; } struct extraDataDraw_t * xx = GET_EXTRA_DATA(trk, T_DRAW, extraDataDraw_t); ANGLE_T angle; @@ -2411,167 +2540,181 @@ static BOOL_T MakeParallelDraw( DYNARR_SET(trkSeg_t, tempSegs_da, 1); switch (xx->segs[0].type) { - case SEG_STRLIN: - angle = NormalizeAngle(FindAngle(xx->segs[0].u.l.pos[0],xx->segs[0].u.l.pos[1])+xx->angle); - if ( NormalizeAngle( FindAngle( xx->segs[0].u.l.pos[0], pos ) - angle ) < 180.0 ) - angle += 90; - else - angle -= 90; - coOrd p0,p1; - REORIGIN(p0,xx->segs[0].u.l.pos[0],xx->angle,xx->orig); - REORIGIN(p1,xx->segs[0].u.l.pos[1],xx->angle,xx->orig); - Translate(&p0,p0, angle, sep); - Translate(&p1,p1, angle, sep); - tempSegs(0).color = xx->segs[0].color; - tempSegs(0).width = xx->segs[0].width; - tempSegs_da.cnt = 1; - tempSegs(0).type = SEG_STRLIN; - tempSegs(0).u.l.pos[0] = p0; - tempSegs(0).u.l.pos[1] = p1; - if (newTrkR) { - *newTrkR = MakeDrawFromSeg( zero, 0.0, &tempSegs(0) ); - struct extraDataDraw_t * yy = GET_EXTRA_DATA(*newTrkR, T_DRAW, extraDataDraw_t); - yy->lineType = xx->lineType; - } + case SEG_STRLIN: + angle = NormalizeAngle(FindAngle(xx->segs[0].u.l.pos[0], + xx->segs[0].u.l.pos[1])+xx->angle); + if ( NormalizeAngle( FindAngle( xx->segs[0].u.l.pos[0], + pos ) - angle ) < 180.0 ) { + angle += 90; + } else { + angle -= 90; + } + coOrd p0,p1; + REORIGIN(p0,xx->segs[0].u.l.pos[0],xx->angle,xx->orig); + REORIGIN(p1,xx->segs[0].u.l.pos[1],xx->angle,xx->orig); + Translate(&p0,p0, angle, sep); + Translate(&p1,p1, angle, sep); + DYNARR_SET( trkSeg_t, tempSegs_da, 1 ); + tempSegs(0).color = xx->segs[0].color; + tempSegs(0).lineWidth = xx->segs[0].lineWidth; + tempSegs(0).type = SEG_STRLIN; + tempSegs(0).u.l.pos[0] = p0; + tempSegs(0).u.l.pos[1] = p1; + if (newTrkR) { + *newTrkR = MakeDrawFromSeg( zero, 0.0, &tempSegs(0) ); + struct extraDataDraw_t * yy = GET_EXTRA_DATA(*newTrkR, T_DRAW, extraDataDraw_t); + yy->lineType = xx->lineType; + } - if ( p0R ) *p0R = p0; - if ( p1R ) *p1R = p1; - return TRUE; - break; - case SEG_CRVLIN: - case SEG_FILCRCL:; - coOrd c; - REORIGIN(c, xx->segs[0].u.c.center, xx->angle, xx->orig); - rad = FindDistance( pos, c ); - if ( rad > xx->segs[0].u.c.radius ) - rad = xx->segs[0].u.c.radius + sep; - else - rad = xx->segs[0].u.c.radius - sep; - tempSegs(0).color = xx->segs[0].color; - tempSegs(0).width = xx->segs[0].width; - tempSegs_da.cnt = 1; - tempSegs(0).type = SEG_CRVLIN; - tempSegs(0).u.c.center = c; - tempSegs(0).u.c.radius = rad; - tempSegs(0).u.c.a0 = xx->segs[0].u.c.a0 + xx->angle; - tempSegs(0).u.c.a1 = xx->segs[0].u.c.a1; - if (newTrkR) { - *newTrkR = MakeDrawFromSeg( zero, 0.0, &tempSegs(0) ); - struct extraDataDraw_t * yy = GET_EXTRA_DATA(*newTrkR, T_DRAW, extraDataDraw_t); - yy->lineType = xx->lineType; - } - if ( p0R ) PointOnCircle( p0R, xx->segs[0].u.c.center, rad, xx->segs[0].u.c.a0 ); - if ( p1R ) PointOnCircle( p1R, xx->segs[0].u.c.center, rad, xx->segs[0].u.c.a0+xx->segs[0].u.c.a1 ); - return TRUE; - break; - case SEG_POLY: - case SEG_FILPOLY: - pos.x -= xx->orig.x; - pos.y -= xx->orig.y; - Rotate( &pos, zero, -xx->angle ); - coOrd p = pos; - int inx2; - angle = NormalizeAngle(GetAngleSegs(1,&xx->segs[0],&p,NULL,NULL,NULL,&inx2,NULL)+xx->angle); - if ( NormalizeAngle( FindAngle( p, pos ) - angle ) < 180.0 ) { - angle = +90.0; + if ( p0R ) { *p0R = p0; } + if ( p1R ) { *p1R = p1; } + return TRUE; + break; + case SEG_CRVLIN: + case SEG_FILCRCL:; + coOrd c; + REORIGIN(c, xx->segs[0].u.c.center, xx->angle, xx->orig); + rad = FindDistance( pos, c ); + if ( rad > xx->segs[0].u.c.radius ) { + rad = xx->segs[0].u.c.radius + sep; + } else { + rad = xx->segs[0].u.c.radius - sep; + } + DYNARR_SET( trkSeg_t, tempSegs_da, 1 ); + tempSegs(0).color = xx->segs[0].color; + tempSegs(0).lineWidth = xx->segs[0].lineWidth; + tempSegs(0).type = SEG_CRVLIN; + tempSegs(0).u.c.center = c; + tempSegs(0).u.c.radius = rad; + tempSegs(0).u.c.a0 = xx->segs[0].u.c.a0 + xx->angle; + tempSegs(0).u.c.a1 = xx->segs[0].u.c.a1; + if (newTrkR) { + *newTrkR = MakeDrawFromSeg( zero, 0.0, &tempSegs(0) ); + struct extraDataDraw_t * yy = GET_EXTRA_DATA(*newTrkR, T_DRAW, extraDataDraw_t); + yy->lineType = xx->lineType; + } + if ( p0R ) { PointOnCircle( p0R, xx->segs[0].u.c.center, rad, xx->segs[0].u.c.a0 ); } + if ( p1R ) { PointOnCircle( p1R, xx->segs[0].u.c.center, rad, xx->segs[0].u.c.a0+xx->segs[0].u.c.a1 ); } + return TRUE; + break; + case SEG_POLY: + case SEG_FILPOLY: + pos.x -= xx->orig.x; + pos.y -= xx->orig.y; + Rotate( &pos, zero, -xx->angle ); + coOrd p = pos; + int inx2; + angle = NormalizeAngle(GetAngleSegs(1,&xx->segs[0],&p,NULL,NULL,NULL,&inx2, + NULL)+xx->angle); + if ( NormalizeAngle( FindAngle( p, pos ) - angle ) < 180.0 ) { + angle = +90.0; + } else { + angle = -90.0; + } + DYNARR_SET( trkSeg_t, tempSegs_da, 1 ); + tempSegs(0).color = xx->segs[0].color; + tempSegs(0).lineWidth = xx->segs[0].lineWidth; + tempSegs(0).type = SEG_POLY; + tempSegs(0).u.p.polyType = xx->segs[0].type==SEG_POLY?xx->segs[0].u.p.polyType: + POLYLINE; + tempSegs(0).u.p.pts = memdup( xx->segs[0].u.p.pts, + xx->segs[0].u.p.cnt*sizeof (pts_t) ); + tempSegs(0).u.p.cnt = xx->segs[0].u.p.cnt; + ANGLE_T a,b; + for (int i=0; isegs[0].u.p.cnt; i++) { + REORIGIN(tempSegs(0).u.p.pts[i].pt,tempSegs(0).u.p.pts[i].pt,xx->angle, + xx->orig); + } + for (int i=0; isegs[0].u.p.cnt; i++) { + if (xx->segs[0].u.p.polyType == POLYLINE) { + if (i==0) { + a = FindAngle(tempSegs(0).u.p.pts[0].pt,tempSegs(0).u.p.pts[1].pt); + b = 0; + } else if (i==xx->segs[0].u.p.cnt-1) { + a = NormalizeAngle(FindAngle(tempSegs(0).u.p.pts[i].pt, + tempSegs(0).u.p.pts[i-1].pt)+180.0); + b = 0; + } else { + a = FindAngle(tempSegs(0).u.p.pts[i].pt,tempSegs(0).u.p.pts[i+1].pt); + b = DifferenceBetweenAngles(a,FindAngle(tempSegs(0).u.p.pts[i].pt, + tempSegs(0).u.p.pts[i-1].pt)+180.0)/2; + a = a + b; + } } else { - angle = -90.0; - } - tempSegs(0).color = xx->segs[0].color; - tempSegs(0).width = xx->segs[0].width; - tempSegs_da.cnt = 1; - tempSegs(0).type = SEG_POLY; - tempSegs(0).u.p.polyType = xx->segs[0].type==SEG_POLY?xx->segs[0].u.p.polyType:POLYLINE; - tempSegs(0).u.p.pts = memdup( xx->segs[0].u.p.pts, xx->segs[0].u.p.cnt*sizeof (pts_t) ); - tempSegs(0).u.p.cnt = xx->segs[0].u.p.cnt; - ANGLE_T a,b; - for (int i=0;isegs[0].u.p.cnt;i++) { - REORIGIN(tempSegs(0).u.p.pts[i].pt,tempSegs(0).u.p.pts[i].pt,xx->angle, xx->orig); - } - for (int i=0;isegs[0].u.p.cnt;i++) { - if (xx->segs[0].u.p.polyType == POLYLINE) { - if (i==0) { - a = FindAngle(tempSegs(0).u.p.pts[0].pt,tempSegs(0).u.p.pts[1].pt); - b = 0; - } else if (i==xx->segs[0].u.p.cnt-1) { - a = NormalizeAngle(FindAngle(tempSegs(0).u.p.pts[i].pt,tempSegs(0).u.p.pts[i-1].pt)+180.0); - b = 0; - } else { - a = FindAngle(tempSegs(0).u.p.pts[i].pt,tempSegs(0).u.p.pts[i+1].pt); - b = DifferenceBetweenAngles(a,FindAngle(tempSegs(0).u.p.pts[i].pt,tempSegs(0).u.p.pts[i-1].pt)+180.0)/2; - a = a + b; - } + if (i==0) { + a = FindAngle(tempSegs(0).u.p.pts[i].pt,tempSegs(0).u.p.pts[i+1].pt); + b = DifferenceBetweenAngles(a,FindAngle(tempSegs(0).u.p.pts[i].pt, + tempSegs(0).u.p.pts[xx->segs[0].u.p.cnt-1].pt)+180.0)/2; + a = a+b; + } else if (i==xx->segs[0].u.p.cnt-1) { + a = FindAngle(tempSegs(0).u.p.pts[i].pt,tempSegs(0).u.p.pts[0].pt); + b = DifferenceBetweenAngles(a,FindAngle(tempSegs(0).u.p.pts[i].pt, + tempSegs(0).u.p.pts[i-1].pt)+180.0)/2; + a = a+b; } else { - if (i==0) { - a = FindAngle(tempSegs(0).u.p.pts[i].pt,tempSegs(0).u.p.pts[i+1].pt); - b = DifferenceBetweenAngles(a,FindAngle(tempSegs(0).u.p.pts[i].pt,tempSegs(0).u.p.pts[xx->segs[0].u.p.cnt-1].pt)+180.0)/2; - a = a+b; - } else if (i==xx->segs[0].u.p.cnt-1) { - a = FindAngle(tempSegs(0).u.p.pts[i].pt,tempSegs(0).u.p.pts[0].pt); - b = DifferenceBetweenAngles(a,FindAngle(tempSegs(0).u.p.pts[i].pt,tempSegs(0).u.p.pts[i-1].pt)+180.0)/2; - a = a+b; - } else { - a = FindAngle(tempSegs(0).u.p.pts[i].pt,tempSegs(0).u.p.pts[i+1].pt); - b = DifferenceBetweenAngles(a,FindAngle(tempSegs(0).u.p.pts[i].pt,tempSegs(0).u.p.pts[i-1].pt)+180.0)/2; - a = a+b; - } + a = FindAngle(tempSegs(0).u.p.pts[i].pt,tempSegs(0).u.p.pts[i+1].pt); + b = DifferenceBetweenAngles(a,FindAngle(tempSegs(0).u.p.pts[i].pt, + tempSegs(0).u.p.pts[i-1].pt)+180.0)/2; + a = a+b; } - - Translate(&tempSegs(0).u.p.pts[i].pt,tempSegs(0).u.p.pts[i].pt,a+angle,fabs(sep/cos(D2R(b)))); - } - if (newTrkR) { - *newTrkR = MakeDrawFromSeg( zero, 0.0, &tempSegs(0) ); - struct extraDataDraw_t * yy = GET_EXTRA_DATA(*newTrkR, T_DRAW, extraDataDraw_t); - yy->lineType = xx->lineType; - if (tempSegs(0).u.p.pts) MyFree(tempSegs(0).u.p.pts); } - if (p0R) *p0R = tempSegs(0).u.p.pts[0].pt; - if (p1R) *p1R = tempSegs(0).u.p.pts[tempSegs(0).u.p.cnt-1].pt; - return TRUE; - break; - default: + + Translate(&tempSegs(0).u.p.pts[i].pt,tempSegs(0).u.p.pts[i].pt,a+angle, + fabs(sep/cos(D2R(b)))); + } + if (newTrkR) { + *newTrkR = MakeDrawFromSeg( zero, 0.0, &tempSegs(0) ); + struct extraDataDraw_t * yy = GET_EXTRA_DATA(*newTrkR, T_DRAW, extraDataDraw_t); + yy->lineType = xx->lineType; + if (tempSegs(0).u.p.pts) { MyFree(tempSegs(0).u.p.pts); } + } + if (p0R) { *p0R = tempSegs(0).u.p.pts[0].pt; } + if (p1R) { *p1R = tempSegs(0).u.p.pts[tempSegs(0).u.p.cnt-1].pt; } + return TRUE; + break; + default: return FALSE; } return FALSE; } static trackCmd_t drawCmds = { - "DRAW", - DrawDraw, - DistanceDraw, - DescribeDraw, - DeleteDraw, - WriteDraw, - ReadDraw, - MoveDraw, - RotateDraw, - RescaleDraw, - NULL, - GetAngleDraw, /* getAngle */ - SplitDraw, /* split */ - NULL, /* traverse */ - EnumerateDraw, - NULL, /* redraw */ - NULL, /* trim */ - NULL, /* merge */ - ModifyDraw, - NULL, /* getLength */ - GetParamsDraw, /* getTrackParams */ - NULL, /* moveEndPt */ - QueryDraw, /* query */ - UngroupDraw, - FlipDraw, - NULL, - NULL, - NULL, - MakeParallelDraw, /*Parallel*/ - NULL, - NULL, /*MakeSegs*/ - ReplayDraw, - StoreDraw, - NULL, - CompareDraw - }; + "DRAW", + DrawDraw, + DistanceDraw, + DescribeDraw, + DeleteDraw, + WriteDraw, + ReadDraw, + MoveDraw, + RotateDraw, + RescaleDraw, + NULL, + GetAngleDraw, /* getAngle */ + SplitDraw, /* split */ + NULL, /* traverse */ + EnumerateDraw, + NULL, /* redraw */ + NULL, /* trim */ + NULL, /* merge */ + ModifyDraw, + NULL, /* getLength */ + GetParamsDraw, /* getTrackParams */ + NULL, /* moveEndPt */ + QueryDraw, /* query */ + UngroupDraw, + FlipDraw, + NULL, + NULL, + NULL, + MakeParallelDraw, /*Parallel*/ + NULL, + NULL, /*MakeSegs*/ + ReplayDraw, + StoreDraw, + NULL, + CompareDraw +}; EXPORT BOOL_T OnTableEdgeEndPt( track_p trk, coOrd * pos ) { @@ -2581,11 +2724,12 @@ EXPORT BOOL_T OnTableEdgeEndPt( track_p trk, coOrd * pos ) ignoredTableEdge = trk; if ((trk1 = OnTrack( &pos1, FALSE, FALSE )) != NULL && - GetTrkType(trk1) == T_DRAW) { + GetTrkType(trk1) == T_DRAW) { ignoredTableEdge = NULL; xx = GET_EXTRA_DATA(trk1, T_DRAW, extraDataDraw_t); - if (xx->segCnt < 1) + if (xx->segCnt < 1) { return FALSE; + } if (xx->segs[0].type == SEG_TBLEDGE) { if ( IsClose( FindDistance( *pos, xx->segs[0].u.l.pos[0] ) ) ) { *pos = xx->segs[0].u.l.pos[0]; @@ -2607,8 +2751,9 @@ EXPORT BOOL_T GetClosestEndPt( track_p trk, coOrd * pos) if (GetTrkType(trk) == T_DRAW) { ignoredTableEdge = NULL; xx = GET_EXTRA_DATA(trk, T_DRAW, extraDataDraw_t); - if (xx->segCnt < 1) + if (xx->segCnt < 1) { return FALSE; + } DIST_T dd0,dd1; coOrd p00,p0,p1; p00 = *pos; @@ -2617,26 +2762,28 @@ EXPORT BOOL_T GetClosestEndPt( track_p trk, coOrd * pos) p00.x -= xx->orig.x; p00.y -= xx->orig.y; switch (xx->segs[0].type) { - case SEG_CRVLIN: - PointOnCircle( &p0, xx->segs[0].u.c.center, fabs(xx->segs[0].u.c.radius), xx->segs[0].u.c.a0 ); - dd0 = FindDistance( p00, p0); - PointOnCircle( &p1, xx->segs[0].u.c.center, fabs(xx->segs[0].u.c.radius), xx->segs[0].u.c.a0 + xx->segs[0].u.c.a1); - dd1 = FindDistance( p00, p1); + case SEG_CRVLIN: + PointOnCircle( &p0, xx->segs[0].u.c.center, fabs(xx->segs[0].u.c.radius), + xx->segs[0].u.c.a0 ); + dd0 = FindDistance( p00, p0); + PointOnCircle( &p1, xx->segs[0].u.c.center, fabs(xx->segs[0].u.c.radius), + xx->segs[0].u.c.a0 + xx->segs[0].u.c.a1); + dd1 = FindDistance( p00, p1); break; - case SEG_STRLIN: - dd0 = FindDistance( p00, xx->segs[0].u.l.pos[0]); - p0 = xx->segs[0].u.l.pos[0]; - dd1 = FindDistance( p00, xx->segs[0].u.l.pos[1]); - p1 = xx->segs[0].u.l.pos[1]; + case SEG_STRLIN: + dd0 = FindDistance( p00, xx->segs[0].u.l.pos[0]); + p0 = xx->segs[0].u.l.pos[0]; + dd1 = FindDistance( p00, xx->segs[0].u.l.pos[1]); + p1 = xx->segs[0].u.l.pos[1]; break; - case SEG_BEZLIN: - dd0 = FindDistance( p00, xx->segs[0].u.b.pos[0]); - p0 = xx->segs[0].u.b.pos[0]; - dd1 = FindDistance( p00, xx->segs[0].u.b.pos[3]); - p1 = xx->segs[0].u.b.pos[3]; + case SEG_BEZLIN: + dd0 = FindDistance( p00, xx->segs[0].u.b.pos[0]); + p0 = xx->segs[0].u.b.pos[0]; + dd1 = FindDistance( p00, xx->segs[0].u.b.pos[3]); + p1 = xx->segs[0].u.b.pos[3]; break; - default: - return FALSE; + default: + return FALSE; } p0.x += xx->orig.x; p0.y += xx->orig.y; @@ -2651,7 +2798,7 @@ EXPORT BOOL_T GetClosestEndPt( track_p trk, coOrd * pos) p1 = xx->segs[0].u.b.pos[3]; dd0 = FindDistance(p00,p0); dd1 = FindDistance(p00,p1); - } else return FALSE; + } else { return FALSE; } if (dd0>dd1) { * pos = p1; return TRUE; @@ -2666,23 +2813,24 @@ EXPORT BOOL_T GetClosestEndPt( track_p trk, coOrd * pos) static drawContext_t drawCmdContext = { - InfoMessage, - DoRedraw, - &mainD, - OP_LINE }; + InfoMessage, + DoRedraw, + &mainD, + OP_LINE +}; static wIndex_t benchChoice; static wIndex_t benchOrient; static wIndex_t dimArrowSize; wDrawColor lineColor = 1; -long lineWidth = 0; -static wDrawColor benchColor; +LWIDTH_T lineWidth = 0; +wDrawColor benchColor; static paramData_t drawPLs[] = { #define drawLineWidthPD (drawPLs[0]) - { PD_LONG, &drawCmdContext.line_Width, "linewidth", PDO_NORECORD, &i100_100, N_("Line Width") }, + { PD_FLOAT, &lineWidth, "linewidth", PDO_NORECORD, &r100_100, N_("Line Width") }, #define drawColorPD (drawPLs[1]) { PD_COLORLIST, &lineColor, "linecolor", PDO_NORECORD, NULL, N_("Color") }, #define drawBenchColorPD (drawPLs[2]) @@ -2690,9 +2838,9 @@ static paramData_t drawPLs[] = { #define drawBenchChoicePD (drawPLs[3]) #ifdef WINDOWS { PD_DROPLIST, &benchChoice, "benchlist", PDO_NOPREF|PDO_NORECORD|PDO_LISTINDEX, I2VP(120), N_("Lumber Type") }, -#else - { PD_DROPLIST, &benchChoice, "benchlist", PDO_NOPREF|PDO_NORECORD|PDO_LISTINDEX, I2VP(145), N_("Lumber Type") }, -#endif +#else + { PD_DROPLIST, &benchChoice, "benchlist", PDO_NOPREF|PDO_NORECORD|PDO_LISTINDEX, I2VP(145), N_("Lumber Type") }, +#endif #define drawBenchOrientPD (drawPLs[4]) #ifdef WINDOWS { PD_DROPLIST, &benchOrient, "benchorient", PDO_NOPREF|PDO_NORECORD|PDO_LISTINDEX, I2VP(45), "", 0 }, @@ -2716,27 +2864,28 @@ static paramData_t drawPLs[] = { static paramGroup_t drawPG = { "draw", 0, drawPLs, COUNT( drawPLs ) }; static char * objectName[] = { - N_("Straight"), - N_("Dimension"), - N_("Lumber"), - N_("Table Edge"), - N_("Curved"), - N_("Curved"), - N_("Curved"), - N_("Curved"), - N_("Circle"), - N_("Circle"), - N_("Circle"), - N_("Box"), - N_("Polygon"), - N_("Filled Circle"), - N_("Filled Circle"), - N_("Filled Circle"), - N_("Filled Box"), - N_("Filled Polygon"), - N_("Bezier Line"), - N_("Polyline"), - NULL}; + N_("Straight"), + N_("Dimension"), + N_("Lumber"), + N_("Table Edge"), + N_("Curved"), + N_("Curved"), + N_("Curved"), + N_("Curved"), + N_("Circle"), + N_("Circle"), + N_("Circle"), + N_("Box"), + N_("Polygon"), + N_("Filled Circle"), + N_("Filled Circle"), + N_("Filled Circle"), + N_("Filled Box"), + N_("Filled Polygon"), + N_("Bezier Line"), + N_("Polyline"), + NULL +}; static STATUS_T CmdDraw( wAction_t action, coOrd pos ) @@ -2819,11 +2968,14 @@ static STATUS_T CmdDraw( wAction_t action, coOrd pos ) labels[0] = N_("Lumber Type"); labels[1] = ""; labels[2] = N_("Color"); - if ( wListGetCount( (wList_p)drawBenchChoicePD.control ) == 0 ) - BenchLoadLists( (wList_p)drawBenchChoicePD.control, (wList_p)drawBenchOrientPD.control ); + if ( wListGetCount( (wList_p)drawBenchChoicePD.control ) == 0 ) { + BenchLoadLists( (wList_p)drawBenchChoicePD.control, + (wList_p)drawBenchOrientPD.control ); + } ParamLoadControls( &drawPG ); - BenchUpdateOrientationList( VP2L(wListGetItemContext( (wList_p)drawBenchChoicePD.control, benchChoice )), (wList_p)drawBenchOrientPD.control ); + BenchUpdateOrientationList( VP2L(wListGetItemContext( (wList_p) + drawBenchChoicePD.control, benchChoice )), (wList_p)drawBenchOrientPD.control ); wListSetIndex( (wList_p)drawBenchOrientPD.control, benchOrient ); InfoSubstituteControls( controls, labels ); drawBenchColorPD.option &= ~PDO_NORECORD; @@ -2853,7 +3005,7 @@ static STATUS_T CmdDraw( wAction_t action, coOrd pos ) infoSubst = FALSE; } ParamGroupRecord( &drawPG ); - if (drawCmdContext.Op == OP_BEZLIN) return CmdBezCurve(act2, pos); + if (drawCmdContext.Op == OP_BEZLIN) { return CmdBezCurve(act2, pos); } DrawGeomMouse( C_START, pos, &drawCmdContext); return C_CONTINUE; @@ -2864,33 +3016,34 @@ static STATUS_T CmdDraw( wAction_t action, coOrd pos ) return CmdBezCurve(act2, pos); } if ( drawCmdContext.Op == OP_BENCH ) { - drawCmdContext.benchOption = GetBenchData( VP2L(wListGetItemContext((wList_p)drawBenchChoicePD.control, benchChoice )), benchOrient ); - drawCmdContext.Color = benchColor; + drawCmdContext.benchOption = GetBenchData( VP2L(wListGetItemContext(( + wList_p)drawBenchChoicePD.control, benchChoice )), benchOrient ); + lineColor = benchColor; } else if ( drawCmdContext.Op == OP_DIMLINE ) { - drawCmdContext.Color = wDrawColorBlack; + lineColor = wDrawColorBlack; drawCmdContext.benchOption = dimArrowSize; } else if ( drawCmdContext.Op == OP_TBLEDGE ) { - drawCmdContext.Color = wDrawColorBlack; + lineColor = wDrawColorBlack; } else { - drawCmdContext.Color = lineColor; + lineColor = lineColor; } if ( infoSubst ) { InfoSubstituteControls( NULL, NULL ); infoSubst = FALSE; } - /* no break */ + /* no break */ case wActionLDrag: ParamLoadData( &drawPG ); - /* no break */ + /* no break */ case wActionMove: case wActionRDown: case wActionRDrag: - if (drawCmdContext.Op == OP_BEZLIN) return CmdBezCurve(act2, pos); + if (drawCmdContext.Op == OP_BEZLIN) { return CmdBezCurve(act2, pos); } return DrawGeomMouse( action, pos, &drawCmdContext); case wActionLUp: case wActionRUp: - if (drawCmdContext.Op == OP_BEZLIN) return CmdBezCurve(act2, pos); + if (drawCmdContext.Op == OP_BEZLIN) { return CmdBezCurve(act2, pos); } drawCmdContext.show = TRUE; int rc = DrawGeomMouse( action, pos, &drawCmdContext); // Put up text entry boxes ready for updates if the result was continue @@ -2944,12 +3097,14 @@ static STATUS_T CmdDraw( wAction_t action, coOrd pos ) controls[1] = drawAnglePD.control; controls[2] = NULL; labels[0] = N_("Seg Length"); - if (drawCmdContext.Op == OP_LINE || drawCmdContext.Op == OP_BENCH || drawCmdContext.Op == OP_TBLEDGE) + if (drawCmdContext.Op == OP_LINE || drawCmdContext.Op == OP_BENCH + || drawCmdContext.Op == OP_TBLEDGE) { labels[1] = N_("Angle"); - else if (drawCmdContext.index > 0 ) + } else if (drawCmdContext.index > 0 ) { labels[1] = N_("Rel Angle"); - else + } else { labels[1] = N_("Angle"); + } ParamLoadControls( &drawPG ); InfoSubstituteControls( controls, labels ); drawLengthPD.option &= ~PDO_NORECORD; @@ -2977,29 +3132,29 @@ static STATUS_T CmdDraw( wAction_t action, coOrd pos ) case C_CANCEL: InfoSubstituteControls( NULL, NULL ); - if (drawCmdContext.Op == OP_BEZLIN) return CmdBezCurve(act2, pos); + if (drawCmdContext.Op == OP_BEZLIN) { return CmdBezCurve(act2, pos); } return DrawGeomMouse( action, pos, &drawCmdContext); case C_TEXT: - if (drawCmdContext.Op == OP_BEZLIN) return CmdBezCurve(action, pos); + if (drawCmdContext.Op == OP_BEZLIN) { return CmdBezCurve(action, pos); } return DrawGeomMouse( action, pos, &drawCmdContext); case C_OK: - if (drawCmdContext.Op == OP_BEZLIN) return CmdBezCurve(act2, pos); + if (drawCmdContext.Op == OP_BEZLIN) { return CmdBezCurve(act2, pos); } return DrawGeomMouse( (0x0D<<8|wActionText), pos, &drawCmdContext); case C_CONFIRM: - if (drawCmdContext.Op == OP_BEZLIN) return CmdBezCurve(act2, pos); + if (drawCmdContext.Op == OP_BEZLIN) { return CmdBezCurve(act2, pos); } return DrawGeomMouse( (0x0D<<8|wActionText), pos, &drawCmdContext); case C_FINISH: - if (drawCmdContext.Op == OP_BEZLIN) return CmdBezCurve(act2, pos); + if (drawCmdContext.Op == OP_BEZLIN) { return CmdBezCurve(act2, pos); } return DrawGeomMouse( (0x0D<<8|wActionText), pos, &drawCmdContext); - /*DrawOk( NULL );*/ + /*DrawOk( NULL );*/ case C_REDRAW: - if (drawCmdContext.Op == OP_BEZLIN) return CmdBezCurve(act2, pos); + if (drawCmdContext.Op == OP_BEZLIN) { return CmdBezCurve(act2, pos); } return DrawGeomMouse( action, pos, &drawCmdContext); case C_CMDMENU: - if (drawCmdContext.Op == OP_BEZLIN) return C_CONTINUE; + if (drawCmdContext.Op == OP_BEZLIN) { return C_CONTINUE; } return DrawGeomMouse( action, pos, &drawCmdContext); default: @@ -3007,84 +3162,88 @@ static STATUS_T CmdDraw( wAction_t action, coOrd pos ) } } -#include "bitmaps/straight-line.xpm" -#include "bitmaps/dimension.xpm" -#include "bitmaps/benchwork.xpm" -#include "bitmaps/table-edge.xpm" +#include "bitmaps/straight-line.xpm3" +#include "bitmaps/dimension.xpm3" +#include "bitmaps/benchwork.xpm3" +#include "bitmaps/table-edge.xpm3" -#include "bitmaps/curved-line-end.xpm" -#include "bitmaps/curved-line-tangent.xpm" -#include "bitmaps/curved-line-middle.xpm" -#include "bitmaps/curved-line-chord.xpm" +#include "bitmaps/curved-line-end.xpm3" +#include "bitmaps/curved-line-tangent.xpm3" +#include "bitmaps/curved-line-middle.xpm3" +#include "bitmaps/curved-line-chord.xpm3" /*#include "bitmaps/dcircle1.xpm"*/ -#include "bitmaps/circle-line-center.xpm" -#include "bitmaps/circle-line-tangent.xpm" +#include "bitmaps/circle-line-center.xpm3" +#include "bitmaps/circle-line-tangent.xpm3" /*#include "bitmaps/dflcrcl1.xpm"*/ -#include "bitmaps/circle-filled-center.xpm" -#include "bitmaps/circle-filled-tangent.xpm" +#include "bitmaps/circle-filled-center.xpm3" +#include "bitmaps/circle-filled-tangent.xpm3" -#include "bitmaps/box.xpm" -#include "bitmaps/filled-box.xpm" -#include "bitmaps/polygon.xpm" -#include "bitmaps/filled-polygon.xpm" -#include "bitmaps/bezier-line.xpm" -#include "bitmaps/polyline.xpm" +#include "bitmaps/box.xpm3" +#include "bitmaps/filled-box.xpm3" +#include "bitmaps/polygon.xpm3" +#include "bitmaps/filled-polygon.xpm3" +#include "bitmaps/bezier-line.xpm3" +#include "bitmaps/polyline.xpm3" typedef struct { - char ***xpm; - int OP; - char * shortName; - char * cmdName; - char * helpKey; - long acclKey; - } drawData_t; + char ***xpm; + int OP; + char * shortName; + char * cmdName; + char * helpKey; + long acclKey; +} drawData_t; static drawData_t dlineCmds[] = { - { straight_line_xpm, OP_LINE, N_("Line"), N_("Draw Line"), "cmdDrawLine", ACCL_DRAWLINE }, - { dimension_xpm, OP_DIMLINE, N_("Dimension Line"), N_("Draw Dimension Line"), "cmdDrawDimLine", ACCL_DRAWDIMLINE }, - { benchwork_xpm, OP_BENCH, N_("Benchwork"), N_("Draw Benchwork"), "cmdDrawBench", ACCL_DRAWBENCH }, - { table_edge_xpm, OP_TBLEDGE, N_("Table Edge"), N_("Draw Table Edge"), "cmdDrawTableEdge", ACCL_DRAWTBLEDGE } }; + { straight_line_xpm3, OP_LINE, N_("Line"), N_("Draw Line"), "cmdDrawLine", ACCL_DRAWLINE }, + { dimension_xpm3, OP_DIMLINE, N_("Dimension Line"), N_("Draw Dimension Line"), "cmdDrawDimLine", ACCL_DRAWDIMLINE }, + { benchwork_xpm3, OP_BENCH, N_("Benchwork"), N_("Draw Benchwork"), "cmdDrawBench", ACCL_DRAWBENCH }, + { table_edge_xpm3, OP_TBLEDGE, N_("Table Edge"), N_("Draw Table Edge"), "cmdDrawTableEdge", ACCL_DRAWTBLEDGE } +}; static drawData_t dcurveCmds[] = { - { curved_line_end_xpm, OP_CURVE1, N_("Curve End"), N_("Draw Curve from End"), "cmdDrawCurveEndPt", ACCL_DRAWCURVE1 }, - { curved_line_tangent_xpm, OP_CURVE2, N_("Curve Tangent"), N_("Draw Curve from Tangent"), "cmdDrawCurveTangent", ACCL_DRAWCURVE2 }, - { curved_line_middle_xpm, OP_CURVE3, N_("Curve Center"), N_("Draw Curve from Center"), "cmdDrawCurveCenter", ACCL_DRAWCURVE3 }, - { curved_line_chord_xpm, OP_CURVE4, N_("Curve Chord"), N_("Draw Curve from Chord"), "cmdDrawCurveChord", ACCL_DRAWCURVE4 }, - { bezier_line_xpm, OP_BEZLIN, N_("Bezier Curve"), N_("Draw Bezier"), "cmdDrawBezierCurve", ACCL_DRAWBEZLINE } }; + { curved_line_end_xpm3, OP_CURVE1, N_("Curve End"), N_("Draw Curve from End"), "cmdDrawCurveEndPt", ACCL_DRAWCURVE1 }, + { curved_line_tangent_xpm3, OP_CURVE2, N_("Curve Tangent"), N_("Draw Curve from Tangent"), "cmdDrawCurveTangent", ACCL_DRAWCURVE2 }, + { curved_line_middle_xpm3, OP_CURVE3, N_("Curve Center"), N_("Draw Curve from Center"), "cmdDrawCurveCenter", ACCL_DRAWCURVE3 }, + { curved_line_chord_xpm3, OP_CURVE4, N_("Curve Chord"), N_("Draw Curve from Chord"), "cmdDrawCurveChord", ACCL_DRAWCURVE4 }, + { bezier_line_xpm3, OP_BEZLIN, N_("Bezier Curve"), N_("Draw Bezier"), "cmdDrawBezierCurve", ACCL_DRAWBEZLINE } +}; static drawData_t dcircleCmds[] = { - /*{ dcircle1_xpm, OP_CIRCLE1, "Circle Fixed Radius", "Draw Fixed Radius Circle", "cmdDrawCircleFixedRadius", ACCL_DRAWCIRCLE1 },*/ - { circle_line_center_xpm, OP_CIRCLE3, N_("Circle Center"), N_("Draw Circle from Center"), "cmdDrawCircleCenter", ACCL_DRAWCIRCLE2 }, - { circle_line_tangent_xpm, OP_CIRCLE2, N_("Circle Tangent"), N_("Draw Circle from Tangent"), "cmdDrawCircleTangent", ACCL_DRAWCIRCLE3 }, - /*{ dflcrcl1_xpm, OP_FILLCIRCLE1, "Circle Filled Fixed Radius", "Draw Fixed Radius Filled Circle", "cmdDrawFilledCircleFixedRadius", ACCL_DRAWFILLCIRCLE1 },*/ - { circle_filled_center_xpm, OP_FILLCIRCLE3, N_("Circle Filled Center"), N_("Draw Filled Circle from Center"), "cmdDrawFilledCircleCenter", ACCL_DRAWFILLCIRCLE2 }, - { circle_filled_tangent_xpm, OP_FILLCIRCLE2, N_("Circle Filled Tangent"), N_("Draw Filled Circle from Tangent"), "cmdDrawFilledCircleTangent", ACCL_DRAWFILLCIRCLE3 } }; + /*{ dcircle1_xpm, OP_CIRCLE1, "Circle Fixed Radius", "Draw Fixed Radius Circle", "cmdDrawCircleFixedRadius", ACCL_DRAWCIRCLE1 },*/ + { circle_line_center_xpm3, OP_CIRCLE3, N_("Circle Center"), N_("Draw Circle from Center"), "cmdDrawCircleCenter", ACCL_DRAWCIRCLE2 }, + { circle_line_tangent_xpm3, OP_CIRCLE2, N_("Circle Tangent"), N_("Draw Circle from Tangent"), "cmdDrawCircleTangent", ACCL_DRAWCIRCLE3 }, + /*{ dflcrcl1_xpm, OP_FILLCIRCLE1, "Circle Filled Fixed Radius", "Draw Fixed Radius Filled Circle", "cmdDrawFilledCircleFixedRadius", ACCL_DRAWFILLCIRCLE1 },*/ + { circle_filled_center_xpm3, OP_FILLCIRCLE3, N_("Circle Filled Center"), N_("Draw Filled Circle from Center"), "cmdDrawFilledCircleCenter", ACCL_DRAWFILLCIRCLE2 }, + { circle_filled_tangent_xpm3, OP_FILLCIRCLE2, N_("Circle Filled Tangent"), N_("Draw Filled Circle from Tangent"), "cmdDrawFilledCircleTangent", ACCL_DRAWFILLCIRCLE3 } +}; static drawData_t dshapeCmds[] = { - { box_xpm, OP_BOX, N_("Box"), N_("Draw Box"), "cmdDrawBox", ACCL_DRAWBOX }, - { filled_box_xpm, OP_FILLBOX, N_("Filled Box"), N_("Draw Filled Box"), "cmdDrawFilledBox", ACCL_DRAWFILLBOX }, - { polygon_xpm, OP_POLY, N_("Polygon"), N_("Draw Polygon"), "cmdDrawPolygon", ACCL_DRAWPOLY }, - { filled_polygon_xpm, OP_FILLPOLY, N_("Filled Polygon"), N_("Draw Filled Polygon"), "cmdDrawFilledPolygon", ACCL_DRAWFILLPOLYGON }, - { polyline_xpm, OP_POLYLINE, N_("PolyLine"), N_("Draw PolyLine"), "cmdDrawPolyline", ACCL_DRAWPOLYLINE }, + { box_xpm3, OP_BOX, N_("Box"), N_("Draw Box"), "cmdDrawBox", ACCL_DRAWBOX }, + { filled_box_xpm3, OP_FILLBOX, N_("Filled Box"), N_("Draw Filled Box"), "cmdDrawFilledBox", ACCL_DRAWFILLBOX }, + { polygon_xpm3, OP_POLY, N_("Polygon"), N_("Draw Polygon"), "cmdDrawPolygon", ACCL_DRAWPOLY }, + { filled_polygon_xpm3, OP_FILLPOLY, N_("Filled Polygon"), N_("Draw Filled Polygon"), "cmdDrawFilledPolygon", ACCL_DRAWFILLPOLYGON }, + { polyline_xpm3, OP_POLYLINE, N_("PolyLine"), N_("Draw PolyLine"), "cmdDrawPolyline", ACCL_DRAWPOLYLINE }, }; typedef struct { - char * helpKey; - char * menuTitle; - char * stickyLabel; - int cnt; - drawData_t * data; - long acclKey; - wIndex_t cmdInx; - int curr; - } drawStuff_t; + char * helpKey; + char * menuTitle; + char * stickyLabel; + int cnt; + drawData_t * data; + long acclKey; + wIndex_t cmdInx; + int curr; +} drawStuff_t; static drawStuff_t drawStuff[4]; static drawStuff_t drawStuff[4] = { - { "cmdDrawLineSetCmd", N_("Straight Objects"), N_("Draw Straight Objects"), 4, dlineCmds }, - { "cmdDrawCurveSetCmd", N_("Curved Lines"), N_("Draw Curved Lines"), 5, dcurveCmds }, - { "cmdDrawCircleSetCmd", N_("Circle Lines"), N_("Draw Circles"), 4, dcircleCmds }, - { "cmdDrawShapeSetCmd", N_("Shapes"), N_("Draw Shapes"), 5, dshapeCmds} }; - + { "cmdDrawLineSetCmd", N_("Straight Objects"), N_("Draw Straight Objects"), 4, dlineCmds }, + { "cmdDrawCurveSetCmd", N_("Curved Lines"), N_("Draw Curved Lines"), 5, dcurveCmds }, + { "cmdDrawCircleSetCmd", N_("Circle Lines"), N_("Draw Circles"), 4, dcircleCmds }, + { "cmdDrawShapeSetCmd", N_("Shapes"), N_("Draw Shapes"), 5, dshapeCmds} +}; + static void ChangeDraw( long changes ) { @@ -3093,7 +3252,8 @@ static void ChangeDraw( long changes ) if ( drawBenchChoicePD.control && drawBenchOrientPD.control ) { choice = wListGetIndex( (wList_p)drawBenchChoicePD.control ); orient = wListGetIndex( (wList_p)drawBenchOrientPD.control ); - BenchLoadLists( (wList_p)drawBenchChoicePD.control, (wList_p)drawBenchOrientPD.control ); + BenchLoadLists( (wList_p)drawBenchChoicePD.control, + (wList_p)drawBenchOrientPD.control ); wListSetIndex( (wList_p)drawBenchChoicePD.control, choice ); wListSetIndex( (wList_p)drawBenchOrientPD.control, orient ); } @@ -3103,53 +3263,43 @@ static void ChangeDraw( long changes ) static void DrawDlgUpdate( - paramGroup_p pg, - int inx, - void * valueP ) + paramGroup_p pg, + int inx, + void * valueP ) { - if (inx==3) { - if (drawCmdContext.Op == OP_BEZLIN) { - if ( (inx == 0 && pg->paramPtr[inx].valueP == &drawCmdContext.line_Width) || - (inx == 1 && pg->paramPtr[inx].valueP == &lineColor)) - { - lineWidth = drawCmdContext.line_Width; - UpdateParms(lineColor, lineWidth); - } - } - } if (inx >=6 ) { if (drawCmdContext.Op == OP_CIRCLE1 || - drawCmdContext.Op == OP_FILLCIRCLE1 || - drawCmdContext.Op == OP_CIRCLE2 || - drawCmdContext.Op == OP_FILLCIRCLE2 || - drawCmdContext.Op == OP_CIRCLE3 || - drawCmdContext.Op == OP_FILLCIRCLE3) { + drawCmdContext.Op == OP_FILLCIRCLE1 || + drawCmdContext.Op == OP_CIRCLE2 || + drawCmdContext.Op == OP_FILLCIRCLE2 || + drawCmdContext.Op == OP_CIRCLE3 || + drawCmdContext.Op == OP_FILLCIRCLE3) { coOrd pos = zero; DrawGeomMouse(C_UPDATE,pos,&drawCmdContext); } if (drawCmdContext.Op == OP_CURVE1 || - drawCmdContext.Op == OP_CURVE2 || - drawCmdContext.Op == OP_CURVE3 || - drawCmdContext.Op == OP_CURVE4 ) { + drawCmdContext.Op == OP_CURVE2 || + drawCmdContext.Op == OP_CURVE3 || + drawCmdContext.Op == OP_CURVE4 ) { coOrd pos = zero; DrawGeomMouse(C_UPDATE,pos,&drawCmdContext); } if (drawCmdContext.Op == OP_LINE || - drawCmdContext.Op == OP_BENCH|| - drawCmdContext.Op == OP_TBLEDGE) { + drawCmdContext.Op == OP_BENCH|| + drawCmdContext.Op == OP_TBLEDGE) { coOrd pos = zero; DrawGeomMouse(C_UPDATE,pos,&drawCmdContext); } if (drawCmdContext.Op == OP_BOX || - drawCmdContext.Op == OP_FILLBOX ){ + drawCmdContext.Op == OP_FILLBOX ) { coOrd pos = zero; DrawGeomMouse(C_UPDATE,pos,&drawCmdContext); } if (drawCmdContext.Op == OP_POLY || - drawCmdContext.Op == OP_FILLPOLY || - drawCmdContext.Op == OP_POLYLINE) { + drawCmdContext.Op == OP_FILLPOLY || + drawCmdContext.Op == OP_POLYLINE) { coOrd pos = zero; DrawGeomMouse(C_UPDATE,pos,&drawCmdContext); } @@ -3161,8 +3311,11 @@ static void DrawDlgUpdate( //} } - if ( inx >= 0 && pg->paramPtr[inx].valueP == &benchChoice ) - BenchUpdateOrientationList( VP2L(wListGetItemContext( (wList_p)drawBenchChoicePD.control, (wIndex_t)*(long*)valueP )), (wList_p)drawBenchOrientPD.control ); + if ( inx >= 0 && pg->paramPtr[inx].valueP == &benchChoice ) { + BenchUpdateOrientationList( VP2L(wListGetItemContext( (wList_p) + drawBenchChoicePD.control, (wIndex_t)*(long*)valueP )), + (wList_p)drawBenchOrientPD.control ); + } } EXPORT void InitCmdDraw( wMenu_p menu ) @@ -3172,7 +3325,6 @@ EXPORT void InitCmdDraw( wMenu_p menu ) drawData_t * ddp; wIcon_p icon; - drawCmdContext.Color = wDrawColorBlack; lineColor = wDrawColorBlack; benchColor = wDrawFindColor( wRGB(255,192,0) ); ParamCreateControls( &drawPG, DrawDlgUpdate ); @@ -3185,7 +3337,8 @@ EXPORT void InitCmdDraw( wMenu_p menu ) for ( inx2=0; inx2cnt; inx2++ ) { ddp = &dsp->data[inx2]; icon = wIconCreatePixMap( ddp->xpm[iconSize] ); - AddMenuButton( menu, CmdDraw, ddp->helpKey, _(ddp->cmdName), icon, LEVEL0_50, IC_STICKY|IC_POPUP2|IC_WANT_MOVE, ddp->acclKey, I2VP(ddp->OP) ); + AddMenuButton( menu, CmdDraw, ddp->helpKey, _(ddp->cmdName), icon, LEVEL0_50, + IC_STICKY|IC_POPUP2|IC_WANT_MOVE, ddp->acclKey, I2VP(ddp->OP) ); } ButtonGroupEnd(); } @@ -3204,12 +3357,14 @@ BOOL_T ReadTableEdge( char * line ) trkSeg_t seg; wIndex_t layer; - if ( !GetArgs( line, paramVersion<3?"dXpYpY":paramVersion<9?"dL000pYpY":"dL000pfpf", - &index, &layer, &seg.u.l.pos[0], &elev0, &seg.u.l.pos[1], &elev1 ) ) + if ( !GetArgs( line, paramVersion<3?"dXpYpY":paramVersion<9 + ?"dL000pYpY":"dL000pfpf", + &index, &layer, &seg.u.l.pos[0], &elev0, &seg.u.l.pos[1], &elev1 ) ) { return FALSE; + } seg.type = SEG_TBLEDGE; seg.color = wDrawColorBlack; - seg.width = 0; + seg.lineWidth = 0; trk = MakeDrawFromSeg1( index, zero, 0.0, &seg ); SetTrkLayer(trk, layer); return TRUE; @@ -3217,11 +3372,11 @@ BOOL_T ReadTableEdge( char * line ) /** * Create a new segment for text. The data are stored in a trk structure. - * Storage for the string is dynamically allocated. + * Storage for the string is dynamically allocated. * * \param index IN of new element * \param pos IN coordinates of element - * \param angle IN orientation + * \param angle IN orientation * \param text IN text itself * \param textSize IN font size in pts * \param color IN text color @@ -3229,19 +3384,19 @@ BOOL_T ReadTableEdge( char * line ) */ EXPORT track_p NewText( - wIndex_t index, - coOrd pos, - ANGLE_T angle, - char * text, - CSIZE_T textSize, + wIndex_t index, + coOrd pos, + ANGLE_T angle, + char * text, + CSIZE_T textSize, wDrawColor color, - BOOL_T boxed) + BOOL_T boxed) { trkSeg_t tempSeg; track_p trk; tempSeg.type = SEG_TEXT; tempSeg.color = color; - tempSeg.width = 0; + tempSeg.lineWidth = 0; tempSeg.u.t.pos = pos; tempSeg.u.t.angle = angle; tempSeg.u.t.fontP = NULL; @@ -3261,17 +3416,23 @@ EXPORT BOOL_T ReadText( char * line ) wIndex_t layer; track_p trk; ANGLE_T angle; - wDrawColor color = wDrawColorBlack; - if ( paramVersion<3 ) { - if (!GetArgs( line, "XXpYql", &index, &layer, &pos, &angle, &text, &textSize )) - return FALSE; - } else if (paramVersion<9 ) { - if (!GetArgs(line, "dL000pYql", &index, &layer, &pos, &angle, &text, &textSize)) - return FALSE; - } else { - if (!GetArgs(line, "dLl00pfql", &index, &layer, &color, &pos, &angle, &text, &textSize )) - return FALSE; - } + wDrawColor color = wDrawColorBlack; + if ( paramVersion<3 ) { + if (!GetArgs( line, "XXpYql", &index, &layer, &pos, &angle, &text, + &textSize )) { + return FALSE; + } + } else if (paramVersion<9 ) { + if (!GetArgs(line, "dL000pYql", &index, &layer, &pos, &angle, &text, + &textSize)) { + return FALSE; + } + } else { + if (!GetArgs(line, "dLl00pfql", &index, &layer, &color, &pos, &angle, &text, + &textSize )) { + return FALSE; + } + } trk = NewText( index, pos, angle, text, textSize, color, FALSE ); SetTrkLayer( trk, layer ); @@ -3301,17 +3462,20 @@ void MenuEnter( void * keyVP ) int action; action = C_TEXT; action |= key<<8; - if (drawModCmdContext.rotate_state) + if (drawModCmdContext.rotate_state) { DrawGeomOriginMove(action,zero,&drawModCmdContext); - else + } else { DrawGeomModify(action,zero,&drawModCmdContext); + } } void MenuLine( void * keyVP ) { int key = (int)VP2L(keyVP); - struct extraDataDraw_t * xx = GET_EXTRA_DATA(drawModCmdContext.trk, T_DRAW, extraDataDraw_t); - if ( drawModCmdContext.type==SEG_STRLIN || drawModCmdContext.type==SEG_CRVLIN || drawModCmdContext.type==SEG_POLY ) { + struct extraDataDraw_t * xx = GET_EXTRA_DATA(drawModCmdContext.trk, T_DRAW, + extraDataDraw_t); + if ( drawModCmdContext.type==SEG_STRLIN || drawModCmdContext.type==SEG_CRVLIN + || drawModCmdContext.type==SEG_POLY ) { switch(key) { case '0': xx->lineType = DRAWLINESOLID; @@ -3339,10 +3503,12 @@ void MenuLine( void * keyVP ) } } -EXPORT void SetLineType( track_p trk, int width ) { +EXPORT void SetLineType( track_p trk, int width ) +{ if (QueryTrack(trk, Q_IS_DRAW)) { struct extraDataDraw_t * xx = GET_EXTRA_DATA(trk, T_DRAW, extraDataDraw_t); - if ( xx->segs[0].type==SEG_STRLIN || xx->segs[0].type==SEG_CRVLIN || xx->segs[0].type==SEG_POLY) { + if ( xx->segs[0].type==SEG_STRLIN || xx->segs[0].type==SEG_CRVLIN + || xx->segs[0].type==SEG_POLY) { switch(width) { case 0: xx->lineType = DRAWLINESOLID; @@ -3377,29 +3543,49 @@ EXPORT void InitTrkDraw( void ) AddParam( "TEXT", ReadText ); drawModDelMI = MenuRegister( "Modify Draw Edit Menu" ); - drawModClose = wMenuPushCreate( drawModDelMI, "", _("Close Polygon - 'g'"), 0, MenuEnter, I2VP( 'g')); - drawModOpen = wMenuPushCreate( drawModDelMI, "", _("Make PolyLine - 'l'"), 0, MenuEnter, I2VP( 'l')); - drawModFill = wMenuPushCreate( drawModDelMI, "", _("Fill Polygon - 'f'"), 0, MenuEnter, I2VP( 'f')); - drawModEmpty = wMenuPushCreate( drawModDelMI, "", _("Empty Polygon - 'u'"), 0, MenuEnter, I2VP( 'u')); + drawModClose = wMenuPushCreate( drawModDelMI, "", _("Close Polygon - 'g'"), 0, + MenuEnter, I2VP( 'g')); + drawModOpen = wMenuPushCreate( drawModDelMI, "", _("Make PolyLine - 'l'"), 0, + MenuEnter, I2VP( 'l')); + drawModFill = wMenuPushCreate( drawModDelMI, "", _("Fill Polygon - 'f'"), 0, + MenuEnter, I2VP( 'f')); + drawModEmpty = wMenuPushCreate( drawModDelMI, "", _("Empty Polygon - 'u'"), 0, + MenuEnter, I2VP( 'u')); wMenuSeparatorCreate( drawModDelMI ); - drawModPointsMode = wMenuPushCreate( drawModDelMI, "", _("Points Mode - 'p'"), 0, MenuMode, I2VP( 0 )); - drawModDel = wMenuPushCreate( drawModDelMI, "", _("Delete Selected Point - 'Del'"), 0, MenuEnter, I2VP( 127 )); - drawModVertex = wMenuPushCreate( drawModDelMI, "", _("Vertex Point - 'v'"), 0, MenuEnter, I2VP( 'v' )); - drawModRound = wMenuPushCreate( drawModDelMI, "", _("Round Corner - 'r'"), 0, MenuEnter, I2VP( 'r' )); - drawModSmooth = wMenuPushCreate( drawModDelMI, "", _("Smooth Corner - 's'"), 0, MenuEnter, I2VP( 's' )); + drawModPointsMode = wMenuPushCreate( drawModDelMI, "", _("Points Mode - 'p'"), + 0, MenuMode, I2VP( 0 )); + drawModDel = wMenuPushCreate( drawModDelMI, "", + _("Delete Selected Point - 'Del'"), 0, MenuEnter, I2VP( 127 )); + drawModVertex = wMenuPushCreate( drawModDelMI, "", _("Vertex Point - 'v'"), 0, + MenuEnter, I2VP( 'v' )); + drawModRound = wMenuPushCreate( drawModDelMI, "", _("Round Corner - 'r'"), 0, + MenuEnter, I2VP( 'r' )); + drawModSmooth = wMenuPushCreate( drawModDelMI, "", _("Smooth Corner - 's'"), 0, + MenuEnter, I2VP( 's' )); wMenuSeparatorCreate( drawModDelMI ); drawModLinMI = wMenuMenuCreate( drawModDelMI, "", _("LineType...") ); - drawModSolid = wMenuPushCreate( drawModLinMI, "", _("Solid Line"), 0, MenuLine, I2VP( '0' )); - drawModDot = wMenuPushCreate( drawModLinMI, "", _("Dashed Line"), 0, MenuLine, I2VP( '1' )); - drawModDash = wMenuPushCreate( drawModLinMI, "", _("Dotted Line"), 0, MenuLine, I2VP( '2' )); - drawModDashDot = wMenuPushCreate( drawModLinMI, "", _("Dash-Dot Line"), 0, MenuLine, I2VP( '3' )); - drawModDashDotDot = wMenuPushCreate( drawModLinMI, "", _("Dash-Dot-Dot Line"), 0, MenuLine, I2VP( '4' )); - drawModCenterDot = wMenuPushCreate( drawModLinMI, "", _("Center-Dot Line"), 0, MenuLine, I2VP( '5' )); - drawModPhantom = wMenuPushCreate( drawModLinMI, "", _("Phantom-Dot Line"), 0, MenuLine, I2VP( '6' )); + drawModSolid = wMenuPushCreate( drawModLinMI, "", _("Solid Line"), 0, MenuLine, + I2VP( '0' )); + drawModDot = wMenuPushCreate( drawModLinMI, "", _("Dashed Line"), 0, MenuLine, + I2VP( '1' )); + drawModDash = wMenuPushCreate( drawModLinMI, "", _("Dotted Line"), 0, MenuLine, + I2VP( '2' )); + drawModDashDot = wMenuPushCreate( drawModLinMI, "", _("Dash-Dot Line"), 0, + MenuLine, I2VP( '3' )); + drawModDashDotDot = wMenuPushCreate( drawModLinMI, "", _("Dash-Dot-Dot Line"), + 0, MenuLine, I2VP( '4' )); + drawModCenterDot = wMenuPushCreate( drawModLinMI, "", _("Center-Dot Line"), 0, + MenuLine, I2VP( '5' )); + drawModPhantom = wMenuPushCreate( drawModLinMI, "", _("Phantom-Dot Line"), 0, + MenuLine, I2VP( '6' )); wMenuSeparatorCreate( drawModDelMI ); - drawModriginMode = wMenuPushCreate( drawModDelMI, "", _("Origin Mode - 'o'"), 0, MenuMode, I2VP( 1 )); - drawModOrigin = wMenuPushCreate( drawModDelMI, "", _("Reset Origin - '0'"), 0, MenuEnter, I2VP( '0' )); - drawModLast = wMenuPushCreate( drawModDelMI, "", _("Origin to Selected - 'l'"), 0, MenuEnter, I2VP( 'l' )); - drawModCenter = wMenuPushCreate( drawModDelMI, "", _("Origin to Middle - 'm'"), 0, MenuEnter, I2VP( 'm')); + drawModriginMode = wMenuPushCreate( drawModDelMI, "", _("Origin Mode - 'o'"), 0, + MenuMode, I2VP( 1 )); + drawModOrigin = wMenuPushCreate( drawModDelMI, "", _("Reset Origin - '0'"), 0, + MenuEnter, I2VP( '0' )); + drawModLast = wMenuPushCreate( drawModDelMI, "", _("Origin to Selected - 'l'"), + 0, MenuEnter, I2VP( 'l' )); + drawModCenter = wMenuPushCreate( drawModDelMI, "", _("Origin to Middle - 'm'"), + 0, MenuEnter, I2VP( 'm')); } diff --git a/app/bin/celev.c b/app/bin/celev.c index b80874f..e55a1fe 100644 --- a/app/bin/celev.c +++ b/app/bin/celev.c @@ -17,7 +17,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "cselect.h" @@ -40,7 +40,8 @@ static EPINX_T elevEp; static BOOL_T elevUndo = FALSE; static char * elevModeLabels[] = { N_("None"), N_("Defined"), N_("Hidden"), - N_("Computed"), N_("Grade"), N_("Station"), N_("Ignore"), NULL }; + N_("Computed"), N_("Grade"), N_("Station"), N_("Ignore"), NULL + }; static paramFloatRange_t r_1000_1000 = { -1000, 1000 }; static paramData_t elevationPLs[] = { @@ -53,37 +54,40 @@ static paramData_t elevationPLs[] = { #define I_GRADE (3) { PD_MESSAGE, NULL, "grade", 0, I2VP(80) }, #define I_STATION (4) - { PD_STRING, elevStationV, "station", PDO_DLGUNDERCMDBUTT|PDO_STRINGLIMITLENGTH, I2VP(200), NULL, 0, 0, sizeof(elevStationV)} }; + { PD_STRING, elevStationV, "station", PDO_DLGUNDERCMDBUTT|PDO_STRINGLIMITLENGTH, I2VP(200), NULL, 0, 0, sizeof(elevStationV)} +}; static paramGroup_t elevationPG = { "elev", 0, elevationPLs, COUNT( elevationPLs ) }; static dynArr_t anchors_da; #define anchors(N) DYNARR_N(trkSeg_t,anchors_da,N) -static void CreateSquareAnchor(coOrd p) { +static void CreateSquareAnchor(coOrd p) +{ DIST_T d = tempD.scale*0.25; int i = anchors_da.cnt; DYNARR_SET(trkSeg_t,anchors_da,i+4); - for (int j =0; j<4;j++) { + for (int j =0; j<4; j++) { anchors(i+j).type = SEG_STRLIN; anchors(i+j).color = wDrawColorBlue; - anchors(i+j).width = 0; + anchors(i+j).lineWidth = 0; } anchors(i).u.l.pos[0].x = anchors(i+2).u.l.pos[1].x = - anchors(i+3).u.l.pos[0].x = anchors(i+3).u.l.pos[1].x = p.x-d/2; + anchors(i+3).u.l.pos[0].x = anchors(i+3).u.l.pos[1].x = p.x-d/2; anchors(i).u.l.pos[0].y = anchors(i).u.l.pos[1].y = - anchors(i+1).u.l.pos[0].y = anchors(i+3).u.l.pos[1].y = p.y-d/2; + anchors(i+1).u.l.pos[0].y = anchors(i+3).u.l.pos[1].y = p.y-d/2; anchors(i).u.l.pos[1].x = - anchors(i+1).u.l.pos[0].x = anchors(i+1).u.l.pos[1].x = - anchors(i+2).u.l.pos[0].x = p.x+d/2; + anchors(i+1).u.l.pos[0].x = anchors(i+1).u.l.pos[1].x = + anchors(i+2).u.l.pos[0].x = p.x+d/2; anchors(i+1).u.l.pos[1].y = - anchors(i+2).u.l.pos[0].y = anchors(i+2).u.l.pos[1].y = - anchors(i+3).u.l.pos[0].y = p.y+d/2; + anchors(i+2).u.l.pos[0].y = anchors(i+2).u.l.pos[1].y = + anchors(i+3).u.l.pos[0].y = p.y+d/2; } -static void CreateEndAnchor(coOrd p, wBool_t lock) { +static void CreateEndAnchor(coOrd p, wBool_t lock) +{ DIST_T d = tempD.scale*0.15; DYNARR_APPEND(trkSeg_t,anchors_da,1); @@ -94,11 +98,12 @@ static void CreateEndAnchor(coOrd p, wBool_t lock) { anchors(i).u.c.radius = d/2; anchors(i).u.c.a0 = 0.0; anchors(i).u.c.a1 = 360.0; - anchors(i).width = 0; + anchors(i).lineWidth = 0; } -static void CreateSplitAnchor(coOrd pos, track_p t) { - DIST_T d = tempD.scale*0.1; +static void CreateSplitAnchor(coOrd pos, track_p t) +{ +// DIST_T d = tempD.scale*0.1; DIST_T w = tempD.scale/tempD.dpi*4; int i; ANGLE_T a = NormalizeAngle(GetAngleAtPoint(t,pos,NULL,NULL)+90.0); @@ -108,31 +113,37 @@ static void CreateSplitAnchor(coOrd pos, track_p t) { anchors(i).color = wDrawColorBlue; Translate(&anchors(i).u.l.pos[0],pos,a,GetTrkGauge(t)); Translate(&anchors(i).u.l.pos[1],pos,a,-GetTrkGauge(t)); - anchors(i).width = w; + anchors(i).lineWidth = w; } -void static CreateMoveAnchor(coOrd pos) { +#if 0 +void static CreateMoveAnchor(coOrd pos) +{ DYNARR_SET(trkSeg_t,anchors_da,anchors_da.cnt+5); - DrawArrowHeads(&DYNARR_N(trkSeg_t,anchors_da,anchors_da.cnt-5),pos,0,TRUE,wDrawColorBlue); + DrawArrowHeads(&DYNARR_N(trkSeg_t,anchors_da,anchors_da.cnt-5),pos,0,TRUE, + wDrawColorBlue); DYNARR_SET(trkSeg_t,anchors_da,anchors_da.cnt+5); - DrawArrowHeads(&DYNARR_N(trkSeg_t,anchors_da,anchors_da.cnt-5),pos,90,TRUE,wDrawColorBlue); + DrawArrowHeads(&DYNARR_N(trkSeg_t,anchors_da,anchors_da.cnt-5),pos,90,TRUE, + wDrawColorBlue); DYNARR_APPEND(trkSeg_t,anchors_da,1); CreateSquareAnchor(pos); } +#endif static void LayoutElevW( - paramData_t * pd, - int inx, - wWinPix_t colX, - wWinPix_t * x, - wWinPix_t * y ) + paramData_t * pd, + int inx, + wWinPix_t colX, + wWinPix_t * x, + wWinPix_t * y ) { static wWinPix_t h = 0; switch ( inx ) { case I_HEIGHT: - h = wControlGetHeight( elevationPLs[I_MODE].control )/(COUNT( elevModeLabels )-1); + h = wControlGetHeight( elevationPLs[I_MODE].control )/(COUNT( + elevModeLabels )-1); #ifndef WINDOWS h += 3; #endif @@ -153,8 +164,9 @@ static int GetElevMode( void ) int newMode; static int modeMap[7] = { ELEV_NONE, ELEV_DEF|ELEV_VISIBLE, ELEV_DEF, ELEV_COMP|ELEV_VISIBLE, ELEV_GRADE|ELEV_VISIBLE, ELEV_STATION|ELEV_VISIBLE, ELEV_IGNORE }; mode = (int)elevModeV; - if (mode<0||mode>=7) + if (mode<0||mode>=7) { return -1; + } newMode = modeMap[mode]; return newMode; } @@ -168,8 +180,9 @@ static void DoElevUpdate( paramGroup_p pg, int inx, void * valueP ) if ( inx == 0 ) { long mode = *(long*)valueP; - if ( mode < 0 || mode >= 7 ) + if ( mode < 0 || mode >= 7 ) { return; + } ParamControlActive( &elevationPG, I_HEIGHT, FALSE ); ParamControlActive( &elevationPG, I_STATION, FALSE ); switch ( mode ) { @@ -190,23 +203,28 @@ static void DoElevUpdate( paramGroup_p pg, int inx, void * valueP ) } ParamLoadData( &elevationPG ); newMode = GetElevMode(); - if (newMode == -1) + if (newMode == -1) { return; - if (elevTrk == NULL) + } + if (elevTrk == NULL) { return; + } oldMode = GetTrkEndElevUnmaskedMode( elevTrk, elevEp ); elevNewValue = 0.0; - if ((newMode&ELEV_MASK) == ELEV_DEF) + if ((newMode&ELEV_MASK) == ELEV_DEF) { elevNewValue = elevHeightV; + } if (oldMode == newMode) { if ((newMode&ELEV_MASK) == ELEV_DEF) { elevOldValue = GetTrkEndElevHeight( elevTrk, elevEp ); diff = fabs( elevOldValue-elevNewValue ); - if ( diff < 0.02 ) + if ( diff < 0.02 ) { return; + } } else if ((newMode&ELEV_MASK) == ELEV_STATION) { - if ( strcmp(elevStationV, GetTrkEndElevStation( elevTrk, elevEp ) ) == 0) + if ( strcmp(elevStationV, GetTrkEndElevStation( elevTrk, elevEp ) ) == 0) { return; + } } else { return; } @@ -261,10 +279,11 @@ static void ElevSelect( track_p trk, EPINX_T ep ) radio = 0; break; case ELEV_DEF: - if ( mode & ELEV_VISIBLE ) + if ( mode & ELEV_VISIBLE ) { radio = 1; - else + } else { radio = 2; + } elevHeightV = GetTrkEndElevHeight(trk,ep); elevOldValue = elevHeightV; ParamLoadControl( &elevationPG, I_HEIGHT ); @@ -291,7 +310,8 @@ static void ElevSelect( track_p trk, EPINX_T ep ) elevModeV = radio; ParamLoadControl( &elevationPG, I_MODE ); gradeOk = ComputeElev( trk, ep, FALSE, &elevX, &grade, TRUE ); - sprintf( message, "%0.2f%s", round(PutDim( elevX )*100.0)/100.0, (units==UNITS_METRIC?"cm":"\"") ); + sprintf( message, "%0.2f%s", round(PutDim( elevX )*100.0)/100.0, + (units==UNITS_METRIC?"cm":"\"") ); ParamLoadMessage( &elevationPG, I_COMPUTED, message ); if (gradeOk) { sprintf( message, "%0.1f%%", fabs(round(grade*1000.0)/10.0) ); @@ -299,17 +319,20 @@ static void ElevSelect( track_p trk, EPINX_T ep ) if ( EndPtIsDefinedElev(trk,ep) ) { elev = GetElevation(trk); dist = GetTrkLength(trk,ep,-1); - if (dist>0.1) + if (dist>0.1) { sprintf( message, "%0.1f%%", fabs(round(((elev-elevX)/dist)*1000.0))/10.0 ); - else + } else { sprintf( message, _("Undefined") ); + } if ( (trk1=GetTrkEndTrk(trk,ep)) && (ep1=GetEndPtConnectedToMe(trk1,trk))>=0 ) { elev = GetElevation(trk1); dist = GetTrkLength(trk1,ep1,-1); - if (dist>0.1) - sprintf( message+strlen(message), " - %0.1f%%", fabs(round(((elev-elevX)/dist)*1000.0))/10.0 ); - else + if (dist>0.1) { + sprintf( message+strlen(message), " - %0.1f%%", + fabs(round(((elev-elevX)/dist)*1000.0))/10.0 ); + } else { sprintf( message+strlen(message), " - %s", _("Undefined") ); + } } } else { strcpy( message, _("Undefined") ); @@ -323,11 +346,13 @@ static void ElevSelect( track_p trk, EPINX_T ep ) wShow(elevW); } -static BOOL_T GetPointElev(track_p trk, coOrd pos, DIST_T * height) { +static BOOL_T GetPointElev(track_p trk, coOrd pos, DIST_T * height) +{ DIST_T elev0, elev1, dist0, dist1; if ( IsTrack( trk ) && GetTrkEndPtCnt(trk) == 2 ) { - if ( GetTrkLength( trk, 0, 1 ) < 0.1 ) + if ( GetTrkLength( trk, 0, 1 ) < 0.1 ) { return FALSE; + } dist0 = FindDistance(pos,GetTrkEndPos(trk,0)); dist1 = FindDistance(pos,GetTrkEndPos(trk,1)); ComputeElev( trk, 0, FALSE, &elev0, NULL, FALSE ); @@ -338,8 +363,8 @@ static BOOL_T GetPointElev(track_p trk, coOrd pos, DIST_T * height) { } *height = ((elev1-elev0)*(dist0/(dist0+dist1)))+elev0; return TRUE; - } else if (GetTrkEndPtCnt(trk) == 1 && - ComputeElev( trk, 0, FALSE, &elev0, NULL, FALSE ) ) { + } else if (GetTrkEndPtCnt(trk) == 1 && + ComputeElev( trk, 0, FALSE, &elev0, NULL, FALSE ) ) { *height = elev0; return TRUE; } @@ -351,12 +376,14 @@ static STATUS_T CmdElevation( wAction_t action, coOrd pos ) { track_p trk0, trk1; EPINX_T ep0; - int oldTrackCount; +// int oldTrackCount; switch (action) { case C_START: - if ( elevW == NULL ) - elevW = ParamCreateDialog( &elevationPG, MakeWindowTitle(_("Elevation")), _("Done"), DoElevDone, wHide, TRUE, LayoutElevW, 0, DoElevUpdate ); + if ( elevW == NULL ) { + elevW = ParamCreateDialog( &elevationPG, MakeWindowTitle(_("Elevation")), + _("Done"), DoElevDone, wHide, TRUE, LayoutElevW, 0, DoElevUpdate ); + } elevModeV = 0; elevHeightV = 0.0; elevStationV[0] = 0; @@ -368,7 +395,8 @@ static STATUS_T CmdElevation( wAction_t action, coOrd pos ) ParamControlActive( &elevationPG, I_STATION, FALSE ); ParamLoadMessage( &elevationPG, I_COMPUTED, "" ); ParamLoadMessage( &elevationPG, I_GRADE, "" ); - InfoMessage( _("Click on end, +Shift to split, +Ctrl to move description, +Alt to show elevation") ); + InfoMessage( + _("Click on end, +Shift to split, +Ctrl to move description, +Alt to show elevation") ); elevTrk = NULL; elevUndo = FALSE; CmdMoveDescription( action, pos ); @@ -381,10 +409,11 @@ static STATUS_T CmdElevation( wAction_t action, coOrd pos ) CmdMoveDescription( action, pos ); return C_CONTINUE; } - BOOL_T xing = FALSE; +// BOOL_T xing = FALSE; coOrd p0 = pos, p2=pos; if ((trk0 = OnTrack2(&p0,FALSE, TRUE, FALSE, NULL)) != NULL) { - EPINX_T ep0 = 0, ep1 = 1; + EPINX_T ep0 = 0; +// EPINX_T ep1 = 1; DIST_T elev0, elev1; if (GetTrkEndPtCnt(trk0) == 2) { if (!GetPointElev(trk0,p0,&elev0)) { @@ -398,13 +427,18 @@ static STATUS_T CmdElevation( wAction_t action, coOrd pos ) if (((MyGetKeyState()&WKEY_ALT))) { //Add square with Alt if ((trk1 = OnTrack2(&p2,FALSE, TRUE, FALSE, trk0)) != NULL) { if (IsClose(FindDistance(p0,p2))) { - if (GetEndPtConnectedToMe(trk0,trk1) == -1) { //Not simply connected to each other!!! + if (GetEndPtConnectedToMe(trk0, + trk1) == -1) { //Not simply connected to each other!!! if (GetTrkEndPtCnt(trk1) == 2) { if (GetPointElev(trk1,p2,&elev1)) { if (MyGetKeyState()&WKEY_SHIFT) { - InfoMessage (_("Crossing - First %0.3f, Second %0.3f, Clearance %0.3f - Click to Split"), PutDim(elev0), PutDim(elev1), PutDim(fabs(elev0-elev1))); - } else - InfoMessage (_("Crossing - First %0.3f, Second %0.3f, Clearance %0.3f"), PutDim(elev0), PutDim(elev1), PutDim(fabs(elev0-elev1))); + InfoMessage ( + _("Crossing - First %0.3f, Second %0.3f, Clearance %0.3f - Click to Split"), + PutDim(elev0), PutDim(elev1), PutDim(fabs(elev0-elev1))); + } else { + InfoMessage (_("Crossing - First %0.3f, Second %0.3f, Clearance %0.3f"), + PutDim(elev0), PutDim(elev1), PutDim(fabs(elev0-elev1))); + } } CreateSquareAnchor(p2); return C_CONTINUE; @@ -414,21 +448,23 @@ static STATUS_T CmdElevation( wAction_t action, coOrd pos ) } } if ((ep0 = PickEndPoint( p0, trk0 )) != -1) { - if ((MyGetKeyState()&WKEY_SHIFT) && QueryTrack(trk0,Q_MODIFY_CAN_SPLIT) - && !(QueryTrack(trk0,Q_IS_TURNOUT))) { + if ((MyGetKeyState()&WKEY_SHIFT) && QueryTrack(trk0,Q_MODIFY_CAN_SPLIT) + && !(QueryTrack(trk0,Q_IS_TURNOUT))) { InfoMessage( _("Click to split here - elevation %0.3f"), PutDim(elev0)); CreateSplitAnchor(p0,trk0); - } else if ((IsClose(FindDistance(GetTrkEndPos(trk0,ep0),p0)) - || (FindDistance(GetTrkEndPos(trk0,ep0),p0)segInx == segInx && - mp->segEP == segEP ) + mp->segEP == segEP ) { return; + } } DYNARR_APPEND( mergePt_t, mergePt_da, 10 ); mp = &mergePt(mergePt_da.cnt-1); mp->segInx = segInx; mp->segEP = segEP; mp->inx = mergePt_da.cnt-1; -LOG( log_group, 2, ( " MergePt: %d.%d\n", segInx, segEP ) ); + LOG( log_group, 2, ( " MergePt: %d.%d\n", segInx, segEP ) ); } static EPINX_T FindEP( - EPINX_T epCnt, - trkEndPt_p endPts, - coOrd pos ) + EPINX_T epCnt, + trkEndPt_p endPts, + coOrd pos ) { DIST_T dist; EPINX_T ep; for ( ep=0; epinx == mpInx ) + if ( mp->inx == mpInx ) { mp->inx = map[segInx]; + } } } static void GroupCopyTitle( - char * title ) + char * title ) { char *mP, *nP, *pP; int mL, nL, pL; @@ -154,22 +167,31 @@ static void GroupCopyTitle( groupPartno[pL] = '\0'; } else { if ( mL != (int)strlen( groupManuf ) || - strncmp( groupManuf, mP, mL ) != 0 ) + strncmp( groupManuf, mP, mL ) != 0 ) { groupManuf[0] = '\0'; + } if ( nL != (int)strlen( groupDesc ) || - strncmp( groupDesc, nP, nL ) != 0 ) + strncmp( groupDesc, nP, nL ) != 0 ) { groupDesc[0] = '\0'; + } if ( pL != (int)strlen( groupPartno ) || - strncmp( groupPartno, pP, pL ) != 0 ) + strncmp( groupPartno, pP, pL ) != 0 ) { groupPartno[0] = '\0'; + } } } +// TODO-BUMPER - handle paths which don't end on an EP +// Set GROUP_BUMPER_REFCOUT +// to 1 to convert Bumper tracks to Straight tracks with 2 EP +// to 2 to create 1 EP Turnout tracks +#define GROUP_BUMPER_REFCOUNT (1) EXPORT void UngroupCompound( - track_p trk ) + track_p trk ) { - struct extraDataCompound_t *xx = GET_EXTRA_DATA(trk, T_NOTRACK, extraDataCompound_t); + struct extraDataCompound_t *xx = GET_EXTRA_DATA(trk, T_NOTRACK, + extraDataCompound_t); struct extraDataCompound_t *xx1; trkSeg_p sp; track_p trk0, trk1; @@ -188,7 +210,7 @@ EXPORT void UngroupCompound( typedef struct { track_p trk; EPINX_T ep[2]; - } segTrack_t; + } segTrack_t; #define segTrack(N) DYNARR_N( segTrack_t, segTrack_da, N ) static dynArr_t segTrack_da; segTrack_t * stp, * stp1; @@ -218,55 +240,61 @@ EXPORT void UngroupCompound( } #endif -LOG( log_group, 1, ( "Ungroup( T%d )\n", GetTrkIndex(trk) ) ); + LOG( log_group, 1, ( "Ungroup( T%d )\n", GetTrkIndex(trk) ) ); epCnt = GetTrkEndPtCnt(trk); segCnt = xx->segCnt; int trackCount = 0; for ( sp=xx->segs; sp<&xx->segs[xx->segCnt]; sp++ ) { - if (IsSegTrack(sp)) trackCount++; + if (IsSegTrack(sp)) { trackCount++; } } - //ASSERT( (epCnt==0) == (segCnt==0) ); - ASSERT( (epCnt==0) == (trackCount==0) ); + //CHECK( (epCnt==0) == (segCnt==0) ); + CHECK( (epCnt==0) == (trackCount==0) ); turnoutChanged = FALSE; if ( epCnt > 0 ) { turnoutChanged = TRUE; /* 1: collect EPs */ - DYNARR_SET( trkEndPt_t, tempEndPts_da, epCnt ); + TempEndPtsSet( epCnt ); DYNARR_SET( segTrack_t, segTrack_da, segCnt ); - memset( segTrack_da.ptr, 0, segCnt * sizeof segTrack(0) ); + memset( &segTrack(0), 0, segCnt * sizeof segTrack(0) ); for ( ep=0; eppos = GetTrkEndPos( trk, ep ); - epp->angle = GetTrkEndAngle( trk, ep ); - Rotate( &epp->pos, xx->orig, -xx->angle ); - epp->pos.x -= xx->orig.x; - epp->pos.y -= xx->orig.y; - epp->track = GetTrkEndTrk( trk, ep ); - if ( epp->track ) - epp->index = GetEndPtConnectedToMe( epp->track, trk ); - else - epp->index = -1; -LOG( log_group, 1, ( " EP%d = [%0.3f %0.3f] A%0.3f T%d.%d\n", ep, epp->pos.x, epp->pos.y, epp->angle, epp->track?GetTrkIndex(epp->track):-1, epp->track?epp->index:-1 ) ); + epp = TempEndPt(ep); + coOrd pos = GetTrkEndPos( trk, ep ); + Rotate( &pos, xx->orig, -xx->angle ); + pos.x -= xx->orig.x; + pos.y -= xx->orig.y; + ANGLE_T angle = GetTrkEndAngle( trk, ep ); + track_p trk1 = GetTrkEndTrk( trk, ep ); + EPINX_T ep1; + ep1 = trk1 ? GetEndPtConnectedToMe( trk1, trk ) : -1 ; + SetEndPt( epp, pos, angle ); + SetEndPtTrack( epp, trk1 ); + // Remember what EP on trk1 was connecting to me + SetEndPtEndPt( epp, ep1 ); + LOG( log_group, 1, ( " EP%d = [%0.3f %0.3f] A%0.3f T%d.%d\n", ep, pos.x, pos.y, + angle, trk1?GetTrkIndex(trk1):-1, ep1 ) ); } /* 3: Count number of times each segment is referenced * If the refcount differs between adjacent segments * add segment with smaller count to mergePts * Treat EndPts as a phantom segment with inx above segCnt - * Path ends that don't map onto a real EndPt (bumpers) get a fake EP + * Path ends that don't map onto a real EndPt (bumpers) get a virtual EP */ DYNARR_SET( int, refCount_da, segCnt+epCnt ); - memset( refCount_da.ptr, 0, refCount_da.cnt * sizeof *(int*)0 ); + memset( &refCount(0), 0, refCount_da.cnt * sizeof *(int*)0 ); cp = (char *)GetPaths( trk ); while ( cp[0] ) { cp += strlen(cp)+1; while ( cp[0] ) { + // Process 1st seg in sub-path GetSegInxEP( cp[0], &segInx, &segEP ); + // Find EP its connected to pos = GetSegEndPt( xx->segs+segInx, segEP, FALSE, NULL ); - segInx1 = FindEP( tempEndPts_da.cnt, &tempEndPts(0), pos ); + segInx1 = FindEP( TempEndPtsCount(), TempEndPt(0), pos ); if ( segInx1 >= 0 ) { + // Found existing EP, incr it's refCount segInx1 += segCnt; if ( segInx1 >= refCount_da.cnt ) { InputError( "Invalid segInx1 %d", TRUE, segInx1 ); @@ -274,44 +302,52 @@ LOG( log_group, 1, ( " EP%d = [%0.3f %0.3f] A%0.3f T%d.%d\n", ep, epp->pos.x, ep } refCount(segInx1)++; } else { - DYNARR_APPEND( trkEndPt_t, tempEndPts_da, 10 ); + // No existing EP: must be a bumper, add virtual EP + epp = TempEndPtsAppend(); DYNARR_APPEND( int, refCount_da, 10 ); - epp = &tempEndPts(tempEndPts_da.cnt-1); - epp->pos = pos; - epp->angle = 0; + SetEndPt( epp, pos, 0 ); segInx1 = refCount_da.cnt-1; - refCount(segInx1) = 2; + refCount(segInx1) = GROUP_BUMPER_REFCOUNT; } segEP1 = 0; while ( cp[0] ) { + // Process remaining segs GetSegInxEP( cp[0], &segInx, &segEP ); if ( segInx1 >= refCount_da.cnt ) { InputError( "Invalid segInx1 %d", TRUE, segInx1 ); return; } + // Incr it's refCoount refCount(segInx)++; - if ( refCount(segInx) > refCount(segInx1) ) + // Is my refCount > then previous seg/EP? + if ( refCount(segInx) > refCount(segInx1) ) { AddMergePt( segInx, segEP ); - if ( refCount(segInx1) > refCount(segInx) ) + } + // Is previous seg/EP refCount > my refCount + if ( refCount(segInx1) > refCount(segInx) ) { AddMergePt( segInx1, segEP1 ); + } + // Advance to next seg segInx1 = segInx; segEP1 = 1-segEP; cp++; } + // Process last seg in sub-path GetSegInxEP( cp[-1], &segInx, &segEP ); + // Find EP its connected to pos = GetSegEndPt( xx->segs+segInx, 1-segEP, FALSE, NULL ); - segInx = FindEP( tempEndPts_da.cnt, &tempEndPts(0), pos ); + segInx = FindEP( TempEndPtsCount(), TempEndPt(0), pos ); if ( segInx >= 0 ) { + // Found EP, incr refCount segInx += segCnt; refCount(segInx)++; } else { - DYNARR_APPEND( trkEndPt_t, tempEndPts_da, 10 ); + // No existing EP: must be a bumper, add virtual EP + epp = TempEndPtsAppend(); DYNARR_APPEND( int, refCount_da, 10 ); - epp = &tempEndPts(tempEndPts_da.cnt-1); - epp->pos = pos; - epp->angle = 0; + SetEndPt( epp, pos, 0 ); segInx = refCount_da.cnt-1; - refCount(segInx) = 2; + refCount(segInx) = GROUP_BUMPER_REFCOUNT; } if ( refCount(segInx) > refCount(segInx1) ) { AddMergePt( segInx, 0 ); @@ -320,14 +356,13 @@ LOG( log_group, 1, ( " EP%d = [%0.3f %0.3f] A%0.3f T%d.%d\n", ep, epp->pos.x, ep } cp++; } - epCnt1 = tempEndPts_da.cnt; - + /* 4: For each path element, map segment to a mergePt if the adjacent segment * and EP is a mergePt * If segment is already mapped then merge mergePts */ DYNARR_SET( int, refCount_da, segCnt ); - memset( refCount_da.ptr, -1, segCnt * sizeof *(int*)0 ); + memset( &refCount(0), -1, segCnt * sizeof *(int*)0 ); cp = (char *)GetPaths( trk ); while ( cp[0] ) { cp += strlen(cp)+1; @@ -335,7 +370,7 @@ LOG( log_group, 1, ( " EP%d = [%0.3f %0.3f] A%0.3f T%d.%d\n", ep, epp->pos.x, ep GetSegInxEP( cp[0], &segInx, &segEP ); pos = GetSegEndPt( xx->segs+segInx, segEP, FALSE, NULL ); /*REORIGIN1( pos, xx->angle, xx->orig );*/ - segInx1 = FindEP( tempEndPts_da.cnt, &tempEndPts(0), pos ); + segInx1 = FindEP( TempEndPtsCount(), TempEndPt(0), pos ); if ( segInx1 >= 0 ) { segInx1 += segCnt; } @@ -360,7 +395,7 @@ LOG( log_group, 1, ( " EP%d = [%0.3f %0.3f] A%0.3f T%d.%d\n", ep, epp->pos.x, ep GetSegInxEP( cp[-1], &segInx, &segEP ); pos = GetSegEndPt( xx->segs+segInx, 1-segEP, FALSE, NULL ); /*REORIGIN1( pos, xx->angle, xx->orig );*/ - segInx = FindEP( tempEndPts_da.cnt, &tempEndPts(0), pos ); + segInx = FindEP( TempEndPtsCount(), TempEndPt(0), pos ); if ( segInx >= 0 ) { segInx += segCnt; for ( inx=0; inxpos.x, ep */ if ( mergePt_da.cnt > 0 ) { for ( segInx=0; segInxpos.x, ep wDrawDelayUpdate( mainD.d, TRUE ); if ( turnoutChanged ) { for ( ep=0; eptrack ) { - DrawEndPt( &mainD, epp->track, epp->index, wDrawColorWhite ); + epp = TempEndPt(ep); + track_p trk1 = GetEndPtTrack(epp); + if ( trk1 ) { + EPINX_T ep1 = GetEndPtEndPt(epp); + DrawEndPt( &mainD, trk1, ep1, wDrawColorWhite ); DrawEndPt( &mainD, trk, ep, wDrawColorWhite ); - DisconnectTracks( trk, ep, epp->track, epp->index ); + DisconnectTracks( trk, ep, trk1, ep1 ); } } } @@ -432,11 +470,13 @@ LOG( log_group, 1, ( " EP%d = [%0.3f %0.3f] A%0.3f T%d.%d\n", ep, epp->pos.x, ep */ for ( inx=0; inxinx != inx ) + if ( mp->inx != inx ) { continue; + } DYNARR_RESET( trkSeg_t, tempSegs_da ); - DYNARR_SET( trkEndPt_t, tempEndPts_da, epCnt1 ); DYNARR_RESET( char, pathPtr_da ); + // Mark start of virtual EPs for this MergePt + epCnt1 = TempEndPtsCount(); for ( segInx=0; segInxpos.x, ep pathPtr(off+2) = '\0'; for ( ep=0; ep<2; ep++ ) { pos = GetSegEndPt( xx->segs+segInx, ep, FALSE, &angle ); - segEP = FindEP( epCnt1, &tempEndPts(0), pos ); + segEP = FindEP( epCnt1, TempEndPt(0), pos ); if ( segEP >= 0 && segEP >= epCnt && segEP < epCnt1 ) { /* was a bumper: no EP */ eps[ep] = -1; + // TODO-BUMPER To support Bumpers remove this continue continue; } REORIGIN1( pos, xx->angle, xx->orig ); angle = NormalizeAngle( xx->angle+angle ); - eps[ep] = FindEP( tempEndPts_da.cnt-epCnt1, &tempEndPts(epCnt1), pos ); + eps[ep] = -1; + if ( TempEndPtsCount()-epCnt1 > 0 ) { + eps[ep] = FindEP( TempEndPtsCount()-epCnt1, TempEndPt(epCnt1), pos ); + } if ( eps[ep] < 0 ) { - DYNARR_APPEND( trkEndPt_t, tempEndPts_da, 10 ); - eps[ep] = tempEndPts_da.cnt-1-epCnt1; - epp = &tempEndPts(tempEndPts_da.cnt-1); - memset( epp, 0, sizeof *epp ); - epp->pos = pos; - epp->angle = angle; + epp = TempEndPtsAppend(); + eps[ep] = TempEndPtsCount()-1-epCnt1; + SetEndPt( epp, pos, angle ); } } segTrack(segInx).ep[0] = eps[0]; @@ -475,10 +516,7 @@ LOG( log_group, 1, ( " EP%d = [%0.3f %0.3f] A%0.3f T%d.%d\n", ep, epp->pos.x, ep } DYNARR_SET( char, pathPtr_da, pathPtr_da.cnt+1 ); pathPtr(pathPtr_da.cnt-1) = '\0'; - if ( tempSegs_da.cnt == 0 ) { - AbortProg( "tempSegs_da.cnt == 0" ); - continue; - } + CHECK ( tempSegs_da.cnt != 0 ); GetSegBounds( zero, 0, tempSegs_da.cnt, &tempSegs(0), &orig, &size ); orig.x = -orig.x; orig.y = -orig.y; @@ -486,7 +524,9 @@ LOG( log_group, 1, ( " EP%d = [%0.3f %0.3f] A%0.3f T%d.%d\n", ep, epp->pos.x, ep Rotate( &orig, zero, xx->angle ); orig.x = xx->orig.x - orig.x; orig.y = xx->orig.y - orig.y; - trk1 = NewCompound( T_TURNOUT, 0, orig, xx->angle, xx->title, tempEndPts_da.cnt-epCnt1, &tempEndPts(epCnt1), (PATHPTR_T)&pathPtr(0), tempSegs_da.cnt, &tempSegs(0) ); + trk1 = NewCompound( T_TURNOUT, 0, orig, xx->angle, xx->title, + TempEndPtsCount()-epCnt1, TempEndPt(epCnt1), (PATHPTR_T)&pathPtr(0), + tempSegs_da.cnt, &tempSegs(0) ); xx1 = GET_EXTRA_DATA(trk1, T_TURNOUT, extraDataCompound_t); xx1->ungrouped = TRUE; xx1->pathOverRide = xx->pathOverRide; @@ -506,9 +546,10 @@ LOG( log_group, 1, ( " EP%d = [%0.3f %0.3f] A%0.3f T%d.%d\n", ep, epp->pos.x, ep /* 8: for remaining segments, create simple tracks */ for ( segInx=0; segInx= 0 ) continue; - if ( ! IsSegTrack( xx->segs+segInx ) ) + if ( refCount(segInx) >= 0 ) { continue; } + if ( ! IsSegTrack( xx->segs+segInx ) ) { continue; + } SegProc( SEGPROC_NEWTRACK, xx->segs+segInx, &segProcData ); SetTrkScale( segProcData.newTrack.trk, GetTrkScale(trk) ); SetTrkBits( segProcData.newTrack.trk, TB_SELECTED ); @@ -528,13 +569,16 @@ LOG( log_group, 1, ( " EP%d = [%0.3f %0.3f] A%0.3f T%d.%d\n", ep, epp->pos.x, ep /* joint EP to this segment */ GetSegInxEP( cp[0], &segInx, &segEP ); stp = &segTrack(segInx); - ep = FindEP( epCnt, &tempEndPts(0), GetSegEndPt( xx->segs+segInx, segEP, FALSE, NULL ) ); + ep = FindEP( epCnt, TempEndPt(0), GetSegEndPt( xx->segs+segInx, segEP, FALSE, + NULL ) ); if ( ep >= 0 ) { - epp = &tempEndPts(ep); - if ( epp->track ) { - ConnectTracks( stp->trk, stp->ep[segEP], epp->track, epp->index ); - DrawEndPt( &mainD, epp->track, epp->index, GetTrkColor(epp->track,&mainD) ); - epp->track = NULL; + epp = TempEndPt(ep); + track_p trk1 = GetEndPtTrack(epp); + if ( trk1 ) { + EPINX_T ep1 = GetEndPtEndPt(epp); + ConnectTracks( stp->trk, stp->ep[segEP], trk1, ep1 ); + DrawEndPt( &mainD, trk1, ep1, GetTrkColor(trk1, &mainD) ); + SetEndPtTrack( epp, NULL ); // Finished with this EP } } stp1 = stp; @@ -543,28 +587,35 @@ LOG( log_group, 1, ( " EP%d = [%0.3f %0.3f] A%0.3f T%d.%d\n", ep, epp->pos.x, ep while ( cp[0] ) { GetSegInxEP( cp[0], &segInx, &segEP ); stp = &segTrack(segInx); + // Check EPs are not virtual (Bumpers) + // TODO-BUMPER May not be necessary + CHECK( stp->ep[segEP] >= 0 ); + CHECK( stp1->ep[segEP1] >= 0 ); trk0 = GetTrkEndTrk( stp->trk, stp->ep[segEP] ); trk1 = GetTrkEndTrk( stp1->trk, stp1->ep[segEP1] ); if ( trk0 == NULL ) { - if ( trk1 != NULL ) - AbortProg( "ungroup: seg half connected" ); + CHECK ( trk1 == NULL ); ConnectTracks( stp->trk, stp->ep[segEP], stp1->trk, stp1->ep[segEP1] ); } else { - if ( trk1 != stp->trk || stp1->trk != trk0 ) - AbortProg( "ungroup: last seg not connected to curr" ); + CHECK( trk1 == stp->trk ); + CHECK( stp1->trk == trk0 ); + // ungroup: last seg not connected to curr } stp1 = stp; segEP1 = 1-segEP; cp++; } /* joint EP to last segment */ - ep = FindEP( epCnt, &tempEndPts(0), GetSegEndPt( xx->segs+segInx, segEP1, FALSE, NULL ) ); + ep = FindEP( epCnt, TempEndPt(0), GetSegEndPt( xx->segs+segInx, segEP1, FALSE, + NULL ) ); if ( ep > 0 ) { - epp = &tempEndPts(ep); - if ( epp->track ) { - ConnectTracks( stp1->trk, stp1->ep[segEP1], epp->track, epp->index ); - DrawEndPt( &mainD, epp->track, epp->index, wDrawColorWhite ); - epp->track = NULL; + epp = TempEndPt(ep); + track_p trk1 = GetEndPtTrack( epp ); + if ( trk1 ) { + EPINX_T ep1 = GetEndPtEndPt( epp ); + ConnectTracks( stp1->trk, stp1->ep[segEP1], trk1, ep1 ); + DrawEndPt( &mainD, trk1, ep1, wDrawColorWhite ); + SetEndPtTrack( epp, NULL ); // Finished with this EP } } cp++; @@ -584,8 +635,9 @@ LOG( log_group, 1, ( " EP%d = [%0.3f %0.3f] A%0.3f T%d.%d\n", ep, epp->pos.x, ep mp->trk = NULL; } } else { - if ( segTrack(segInx).trk ) + if ( segTrack(segInx).trk ) { DrawNewTrack( segTrack(segInx).trk ); + } } } wDrawDelayUpdate( mainD.d, FALSE ); @@ -601,8 +653,9 @@ EXPORT void DoUngroup( void * unused ) int oldTrackCount; TRKINX_T lastTrackIndex; - if ( log_group < 0 ) + if ( log_group < 0 ) { log_group = LogFindIndex( "group" ); + } groupManuf[0] = 0; groupDesc[0] = 0; groupPartno[0] = 0; @@ -615,65 +668,71 @@ EXPORT void DoUngroup( void * unused ) if ( GetTrkSelected( trk ) && GetTrkIndex(trk) <= lastTrackIndex ) { oldTrackCount = trackCount; UngroupTrack( trk ); - if ( oldTrackCount != trackCount ) + if ( oldTrackCount != trackCount ) { ungroupCnt++; + } } } - if ( ungroupCnt ) + if ( ungroupCnt ) { InfoMessage( _("%d objects ungrouped"), ungroupCnt ); - else + } else { InfoMessage( _("No objects ungrouped") ); + } } static drawCmd_t groupD = { - NULL, &tempSegDrawFuncs, DC_SEGTRACK, 1, 0.0, {0.0, 0.0}, {0.0, 0.0}, Pix2CoOrd, CoOrd2Pix }; + NULL, &tempSegDrawFuncs, DC_SEGTRACK, 1, 0.0, {0.0, 0.0}, {0.0, 0.0}, Pix2CoOrd, CoOrd2Pix +}; static long groupSegCnt; static long groupReplace; static long groupNoCombine; static double groupOriginX; static double groupOriginY; char * groupReplaceLabels[] = { N_("Replace with new group?"), NULL }; +char * groupNoCombineLabels[] = { N_("Turntable/TransferTable/DblSlipSwith?"), NULL }; static wWin_p groupW; static paramIntegerRange_t r0_999999 = { 0, 999999 }; static paramFloatRange_t r_1000_1000 = { -1000.0, 1000.0, 80 }; static paramData_t groupPLs[] = { -/*0*/ { PD_STRING, groupManuf, "manuf", PDO_NOPREF | PDO_NOTBLANK, I2VP(350), N_("Manufacturer"), 0, 0, sizeof(groupManuf)}, -/*1*/ { PD_STRING, groupDesc, "desc", PDO_NOPREF | PDO_NOTBLANK, I2VP(230), N_("Description"), 0, 0, sizeof(groupDesc)}, -/*2*/ { PD_STRING, groupPartno, "partno", PDO_NOPREF|PDO_DLGHORZ|PDO_DLGIGNORELABELWIDTH|PDO_NOTBLANK, I2VP(100), N_("#"), 0, 0, sizeof(groupPartno)}, -/*3*/ { PD_LONG, &groupSegCnt, "segcnt", PDO_NOPREF, &r0_999999, N_("# Segments"), BO_READONLY }, + /*0*/ { PD_STRING, groupManuf, "manuf", PDO_NOPREF | PDO_NOTBLANK, I2VP(350), N_("Manufacturer"), 0, 0, sizeof(groupManuf)}, + /*1*/ { PD_STRING, groupDesc, "desc", PDO_NOPREF | PDO_NOTBLANK, I2VP(230), N_("Description"), 0, 0, sizeof(groupDesc)}, + /*2*/ { PD_STRING, groupPartno, "partno", PDO_NOPREF|PDO_DLGHORZ|PDO_DLGIGNORELABELWIDTH|PDO_NOTBLANK, I2VP(100), N_("#"), 0, 0, sizeof(groupPartno)}, + /*3*/ { PD_LONG, &groupSegCnt, "segcnt", PDO_NOPREF, &r0_999999, N_("# Segments"), BO_READONLY }, #define I_GROUP_ORIGIN_OFFSET 4 /* Need to change if add above */ -/*4*/ { PD_FLOAT, &groupOriginX, "orig", PDO_DIM, &r_1000_1000, N_("Offset X,Y:")}, -/*5*/ { PD_FLOAT, &groupOriginY, "origy",PDO_DIM | PDO_DLGHORZ, &r_1000_1000, ""}, -/*6*/ { PD_TOGGLE, &groupReplace, "replace", 0, groupReplaceLabels, "", BC_HORZ|BC_NOBORDER } }; + /*4*/ { PD_FLOAT, &groupOriginX, "orig", PDO_DIM, &r_1000_1000, N_("Offset X,Y:")}, + /*5*/ { PD_FLOAT, &groupOriginY, "origy",PDO_DIM | PDO_DLGHORZ, &r_1000_1000, ""}, + /*6*/ { PD_TOGGLE, &groupNoCombine, "noCombine", 0, groupNoCombineLabels, "", BC_HORZ|BC_NOBORDER }, + /*7*/ { PD_TOGGLE, &groupReplace, "replace", 0, groupReplaceLabels, "", BC_HORZ|BC_NOBORDER } +}; static paramGroup_t groupPG = { "group", 0, groupPLs, COUNT( groupPLs ) }; typedef struct { - track_p trk; - int segStart; - int segEnd; - int totalSegStart; //Where we are overall - int totalSegEnd; - } groupTrk_t, * groupTrk_p; + track_p trk; + int segStart; + int segEnd; + int totalSegStart; //Where we are overall + int totalSegEnd; +} groupTrk_t, * groupTrk_p; static dynArr_t groupTrk_da; #define groupTrk(N) DYNARR_N( groupTrk_t, groupTrk_da, N ) typedef struct { - int groupInx; - EPINX_T ep1, ep2; - PATHPTR_T path; - BOOL_T flip; - } pathElem_t, *pathElem_p; + int groupInx; + EPINX_T ep1, ep2; + PATHPTR_T path; + BOOL_T flip; +} pathElem_t, *pathElem_p; typedef struct { - int pathElemStart; - int pathElemEnd; - EPINX_T ep1, ep2; - int conflicts; - BOOL_T inGroup; - BOOL_T done; - } path_t, *path_p; + int pathElemStart; + int pathElemEnd; + EPINX_T ep1, ep2; + int conflicts; + BOOL_T inGroup; + BOOL_T done; +} path_t, *path_p; static dynArr_t path_da; #define path(N) DYNARR_N( path_t, path_da, N ) static dynArr_t pathElem_da; @@ -684,34 +743,36 @@ static int pathElemStart; /* * Find sub-path that connects the 2 EPs for the given track * - * \param trk IN Track + * \param trk IN Track * \param ep1, ep2 IN EndPt index * \param BOOL_T *flip OUT whether path is flipped * \return sub-path that connects the 2 EPs */ static char * FindPathBtwEP( - track_p trk, - EPINX_T ep1, - EPINX_T ep2, - BOOL_T * flip ) + track_p trk, + EPINX_T ep1, + EPINX_T ep2, + BOOL_T * flip ) { char * cp; coOrd trkPos[2]; - - LOG( log_group, 3, (" FindPathBtwEP: T%d .%d .%d = ", trk?GetTrkIndex(trk):-1, ep1, ep2 )); + + LOG( log_group, 3, (" FindPathBtwEP: T%d .%d .%d = ", trk?GetTrkIndex(trk):-1, + ep1, ep2 )); if ( GetTrkType(trk) != T_TURNOUT ) { - if ( ep1+ep2 != 1 ) - AbortProg( "findPathBtwEP" ); + CHECK( ep1+ep2 == 1 ); *flip = ( ep1 == 1 ); - if (GetTrkType(trk) == T_CORNU ) { // Cornu doesn't have a path but lots of segs! + if (GetTrkType(trk) == + T_CORNU ) { // Cornu doesn't have a path but lots of segs! cp = CreateSegPathList(trk); // Make path -LOG( log_group, 2, ( " Group: Cornu path:%s \n", cp ) ) - } else cp = "\1\0\0"; //One segment (but could be a Bezier) + LOG( log_group, 2, ( " Group: Cornu path:%s \n", cp ) ) + } else { cp = "\1\0\0"; } //One segment (but could be a Bezier) LOG( log_group, 3, (" Flip:%s Path= Seg=%d-\n", *flip?"T":"F", *cp ) ); return cp; } - struct extraDataCompound_t * xx = GET_EXTRA_DATA( trk, T_TURNOUT, extraDataCompound_t ); + struct extraDataCompound_t * xx = GET_EXTRA_DATA( trk, T_TURNOUT, + extraDataCompound_t ); cp = (char *)GetPaths( trk ); trkPos[0] = GetTrkEndPos(trk,ep1); Rotate( &trkPos[0], xx->orig, -xx->angle ); @@ -740,7 +801,7 @@ LOG( log_group, 2, ( " Group: Cornu path:%s \n", cp ) ) cp += strlen(cp); GetSegInxEP( cp[-1], &segInx, &segEP ); segPos[1] = GetSegEndPt( &xx->segs[segInx], 1-segEP, FALSE, NULL ); - + // Find the closest seg end for ( int inx = 0; inx<2; inx++ ) { // Check 1st end @@ -750,7 +811,9 @@ LOG( log_group, 2, ( " Group: Cornu path:%s \n", cp ) ) DIST_T dist2 = FindDistance( trkPos[1], segPos[1-inx] ); if ( dist2 > dist1 ) // 2nd end is further away + { dist1 = dist2; + } if ( dist1 < connectDistance && dist1 < dist ) { // both ends are closest dist = dist1; @@ -764,18 +827,19 @@ LOG( log_group, 2, ( " Group: Cornu path:%s \n", cp ) ) } cp++; } -LOG( log_group, 3, (" %s: %d..%d Flip:%s\n", pName, path?path[0]:-1, path?path[strlen(path)-1]:-1, *flip?"T":"F" ) ); + LOG( log_group, 3, (" %s: %d..%d Flip:%s\n", pName, path?path[0]:-1, + path?path[strlen(path)-1]:-1, *flip?"T":"F" ) ); return path; } static int GroupShortestPathFunc( - SPTF_CMD cmd, - track_p trk, - EPINX_T ep1, - EPINX_T ep2, - DIST_T dist, - void * data ) + SPTF_CMD cmd, + track_p trk, + EPINX_T ep1, + EPINX_T ep2, + DIST_T dist, + void * data ) { track_p trk1; path_t *pp; @@ -788,13 +852,20 @@ static int GroupShortestPathFunc( switch ( cmd ) { case SPTC_MATCH: - if ( !GetTrkSelected(trk) ) + if ( !GetTrkSelected(trk) ) { return 0; + } + // TODO-BUMPER may not be necessary + if ( GetTrkEndPtCnt(trk) < 2 && ep1 >= 1 ) { + return 1; + } trk1 = GetTrkEndTrk(trk,ep1); - if ( trk1 == NULL ) + if ( trk1 == NULL ) { return 1; - if ( !GetTrkSelected(trk1) ) + } + if ( !GetTrkSelected(trk1) ) { return 1; + } return 0; case SPTC_MATCHANY: @@ -803,7 +874,7 @@ static int GroupShortestPathFunc( case SPTC_ADD_TRK: LOG( log_group, 4, ( " Add T%d[%d]\n", GetTrkIndex(trk), ep2 ) ) DYNARR_APPEND( pathElem_t, pathElem_da, 10 ); - ppp = &pathElem(pathElem_da.cnt-1); + ppp = &pathElem(pathElem_da.cnt-1); for ( inx=0; inxgroupInx = inx; @@ -813,7 +884,9 @@ static int GroupShortestPathFunc( return 0; } } - AbortProg( "GroupShortestPathFunc(SPTC_ADD_TRK, T%d) - track not in group", GetTrkIndex(trk) ); + CHECKMSG( FALSE, + ( "GroupShortestPathFunc(SPTC_ADD_TRK, T%d) - track not in group", + GetTrkIndex(trk) ) ); case SPTC_TERMINATE: ppp = &pathElem(pathElemStart); @@ -825,31 +898,35 @@ static int GroupShortestPathFunc( pos2 = GetTrkEndPos( trk, ppp->ep1 ); ang2 = GetTrkEndAngle( trk, ppp->ep1 ); ep1 = ep2 = -1; - for ( ep=0; epep1 == ep1 || pp->ep2 == ep1 ) ) && - ( ep2 < 0 || ( pp->ep1 == ep2 || pp->ep2 == ep2 ) ) ) { -LOG( log_group, 4, ( " Remove: duplicate path P%d\n", inx ) ) - pathElem_da.cnt = pathElemStart; + ( ep2 < 0 || ( pp->ep1 == ep2 || pp->ep2 == ep2 ) ) ) { + LOG( log_group, 4, ( " Remove: duplicate path P%d\n", inx ) ) + DYNARR_SET( pathElem_t, pathElem_da, pathElemStart ); return 0; } } @@ -861,18 +938,21 @@ LOG( log_group, 4, ( " Remove: duplicate path P%d\n", inx ) ) pp->ep1 = ep1; pp->ep2 = ep2; pathElemStart = pathElem_da.cnt; -LOG( log_group, 4, ( " Keep\n" ) ) + LOG( log_group, 4, ( " Keep\n" ) ) return 0; case SPTC_IGNNXTTRK: - if ( !GetTrkSelected(trk) ) + if ( !GetTrkSelected(trk) ) { return 1; - if ( ep1 == ep2 ) + } + if ( ep1 == ep2 ) { return 1; - if ( GetTrkEndPtCnt(trk) == 2 ) + } + if ( GetTrkEndPtCnt(trk) == 2 ) { return 0; - if ( GetTrkType(trk) != T_TURNOUT ) - AbortProg( "GroupShortestPathFunc(IGNNXTTRK,T%d:%d,%d)", GetTrkIndex(trk), ep1, ep2 ); + } + CHECKMSG( GetTrkType(trk) == T_TURNOUT, + ( "GroupShortestPathFunc(IGNNXTTRK,T%d:%d,%d)", GetTrkIndex(trk), ep1, ep2 ) ); return FindPathBtwEP( trk, ep2, ep1, &flip ) == NULL; case SPTC_VALID: @@ -884,8 +964,8 @@ LOG( log_group, 4, ( " Keep\n" ) ) static int CmpGroupOrder( - const void * ptr1, - const void * ptr2 ) + const void * ptr1, + const void * ptr2 ) { int inx1 = *(int*)ptr1; int inx2 = *(int*)ptr2; @@ -895,71 +975,76 @@ static int CmpGroupOrder( static coOrd endPtOrig; static ANGLE_T endPtAngle; static int CmpEndPtAngle( - const void * ptr1, - const void * ptr2 ) + const void * ptr1, + const void * ptr2 ) { ANGLE_T angle; trkEndPt_p epp1 = (trkEndPt_p)ptr1; trkEndPt_p epp2 = (trkEndPt_p)ptr2; - - angle = NormalizeAngle(FindAngle(endPtOrig,epp1->pos)-endPtAngle) - NormalizeAngle(FindAngle(endPtOrig,epp2->pos)-endPtAngle); + + angle = NormalizeAngle(FindAngle(endPtOrig, + GetEndPtPos(epp1))-endPtAngle) - NormalizeAngle(FindAngle(endPtOrig, + GetEndPtPos(epp2))-endPtAngle); return (int)angle; } static int ConflictPaths( - path_p path0, - path_p path1 ) + path_p path0, + path_p path1 ) { if ( groupNoCombine != 0 ) { // No grouping return TRUE; } /* do these paths share an EP? */ - if ( path0->ep1 == path1->ep1 ) return TRUE; - if ( path0->ep1 == path1->ep2 ) return TRUE; - if ( path0->ep2 == path1->ep1 ) return TRUE; - if ( path0->ep2 == path1->ep2 ) return TRUE; + if ( path0->ep1 == path1->ep1 ) { return TRUE; } + if ( path0->ep1 == path1->ep2 ) { return TRUE; } + if ( path0->ep2 == path1->ep1 ) { return TRUE; } + if ( path0->ep2 == path1->ep2 ) { return TRUE; } return FALSE; } static BOOL_T CheckPathEndPt( - track_p trk, - char cc, - EPINX_T ep ) + track_p trk, + char cc, + EPINX_T ep ) { - struct extraDataCompound_t *xx = GET_EXTRA_DATA(trk, T_TURNOUT, extraDataCompound_t); + struct extraDataCompound_t *xx = GET_EXTRA_DATA(trk, T_TURNOUT, + extraDataCompound_t); wIndex_t segInx; EPINX_T segEP, epCnt; DIST_T d; coOrd pos; GetSegInxEP( cc, &segInx, &segEP ); - if ( ep ) segEP = 1-segEP; + if ( ep ) { segEP = 1-segEP; } pos = GetSegEndPt( &xx->segs[segInx], segEP, FALSE, NULL ); REORIGIN1( pos, xx->angle, xx->orig ); epCnt = GetTrkEndPtCnt(trk); for ( ep=0; ep\n" ); @@ -989,15 +1074,15 @@ static void LogSeg( case SEG_BENCH: case SEG_TBLEDGE: LogPrintf( "[ %0.3f %0.3f ] [ %0.3f %0.3f ]\n", - segP->u.l.pos[0].x, segP->u.l.pos[0].y, - segP->u.l.pos[1].x, segP->u.l.pos[1].y ); + segP->u.l.pos[0].x, segP->u.l.pos[0].y, + segP->u.l.pos[1].x, segP->u.l.pos[1].y ); break; case SEG_CRVLIN: case SEG_CRVTRK: LogPrintf( "R:%0.3f [ %0.3f %0.3f } A0:%0.3f A1:%0.3f\n", - segP->u.c.radius, - segP->u.c.center.x, segP->u.c.center.y, - segP->u.c.a0, segP->u.c.a1 ); + segP->u.c.radius, + segP->u.c.center.x, segP->u.c.center.y, + segP->u.c.a0, segP->u.c.a1 ); break; default: LogPrintf( "%c:\n", segP->type ); @@ -1063,7 +1148,7 @@ static void GroupOk( void * unused ) DYNARR_RESET( groupTrk_t, groupTrk_da ); DYNARR_RESET( path_t, path_da ); DYNARR_RESET( pathElem_t, pathElem_da ); - DYNARR_RESET( trkEndPt_t, tempEndPts_da ); + TempEndPtsReset(); DYNARR_RESET( char, pathPtr_da ); ParamUpdate( &groupPG ); @@ -1074,8 +1159,9 @@ static void GroupOk( void * unused ) sprintf( message, "%s\t%s\t%s", groupManuf, groupDesc, groupPartno ); if ( strcmp( message, groupTitle ) != 0 ) { if ( FindCompound( FIND_TURNOUT|FIND_STRUCT, curScaleName, message ) ) - if ( !NoticeMessage2( 1, MSG_TODSGN_REPLACE, _("Yes"), _("No") ) ) + if ( !NoticeMessage2( 1, MSG_TODSGN_REPLACE, _("Yes"), _("No") ) ) { return; + } strcpy( groupTitle, message ); } @@ -1084,8 +1170,11 @@ static void GroupOk( void * unused ) * 1: Collect tracks */ trk = NULL; - int InInx = -1; +// int InInx = -1; BOOL_T hasTracks = FALSE; + wIndex_t nTrkSeg = 0; + wIndex_t nSeg = 0; + wIndex_t iLastTrkSeg = 0; while ( TrackIterate( &trk ) ) { if ( GetTrkSelected( trk ) ) { DYNARR_APPEND( groupTrk_t, groupTrk_da, 10 ); @@ -1093,7 +1182,7 @@ static void GroupOk( void * unused ) groupP->trk = trk; groupP->segStart = trackSegs_da.cnt; groupP->totalSegStart = tempSegs_da.cnt+trackSegs_da.cnt; - if (IsTrack(trk)) hasTracks = TRUE; + if (IsTrack(trk)) { hasTracks = TRUE; } if ( GetTrkType(trk) == T_TURNOUT || GetTrkType(trk) == T_STRUCTURE) { xx = GET_EXTRA_DATA(trk, T_NOTRACK, extraDataCompound_t); for ( pinx=0; pinxsegCnt; pinx++ ) { @@ -1122,53 +1211,66 @@ static void GroupOk( void * unused ) } else if (GetTrkType(trk) == T_CORNU) { - int start = trackSegs_da.cnt; +// int start = trackSegs_da.cnt; - GetBezierSegmentsFromCornu(trk,&trackSegs_da,TRUE); //Only give back Bezier - cant be undone + GetBezierSegmentsFromCornu(trk,&trackSegs_da, + TRUE); //Only give back Bezier - cant be undone } else { - if (IsTrack(trk)) hasTracks=TRUE; + if (IsTrack(trk)) { hasTracks=TRUE; } segCnt = tempSegs_da.cnt; DrawTrack( trk, &groupD, wDrawColorBlack ); - DYNARR_APPEND( trkSeg_t, trackSegs_da, 10 ); - segPtr = &trackSegs(trackSegs_da.cnt-1); - *segPtr = tempSegs( segCnt ); - - if ( tempSegs_da.cnt != segCnt+1 ) { - NoticeMessage2( 0, MSG_CANNOT_GROUP_TRACK, _("Ok"), NULL, GetTrkTypeName(trk)); - wHide( groupW ); - return; + for ( ; segCnt < tempSegs_da.cnt; segCnt++ ) { + // Copy drawn segments + DYNARR_APPEND( trkSeg_t, trackSegs_da, 10 ); + segPtr = &trackSegs(trackSegs_da.cnt-1); + *segPtr = tempSegs( segCnt ); } + } + // Count number of track segs and if any appear after seg 127 + for ( ; nSeg < trackSegs_da.cnt; nSeg++ ) { + if ( IsSegTrack( &trackSegs( nSeg ) ) ) { + nTrkSeg++; + iLastTrkSeg = nSeg; + } } groupP->segEnd = trackSegs_da.cnt-1; } } -if ( log_group >= 1 && logTable(log_group).level >= 4 ) { - LogPrintf( "Track Segs:\n"); - for ( int inx = 0; inx < trackSegs_da.cnt; inx++ ) { - if (IsSegTrack(&trackSegs(inx))) { - LogPrintf( " %d: ", inx+1 ); - LogSeg( &trackSegs(inx) ); + if ( log_group >= 1 && logTable(log_group).level >= 4 ) { + LogPrintf( "Track Segs:\n"); + for ( int inx = 0; inx < trackSegs_da.cnt; inx++ ) { + if (IsSegTrack(&trackSegs(inx))) { + LogPrintf( " %d: ", inx+1 ); + LogSeg( &trackSegs(inx) ); + } } - } - LogPrintf( "Other Segs:\n"); - for ( int inx = 0; inx < trackSegs_da.cnt; inx++ ) { - if (!IsSegTrack(&trackSegs(inx))) { - LogPrintf( " %d: ", inx+1 ); - LogSeg( &tempSegs(inx) ); + LogPrintf( "Other Segs:\n"); + for ( int inx = 0; inx < trackSegs_da.cnt; inx++ ) { + if (!IsSegTrack(&trackSegs(inx))) { + LogPrintf( " %d: ", inx+1 ); + LogSeg( &tempSegs(inx) ); + } } } -} - if ( groupTrk_da.cnt>0 && hasTracks) { - if ( groupTrk_da.cnt > 128 ) { - NoticeMessage( MSG_TOOMANYSEGSINGROUP, _("Ok"), NULL ); - wDrawDelayUpdate( mainD.d, FALSE ); - wHide( groupW ); - return; - } + if ( nTrkSeg > MAX_PATH_SEGS ) { + // Too many track segs + NoticeMessage( MSG_TOOMANYSEGSINGROUP, _("Ok"), NULL ); + wDrawDelayUpdate( mainD.d, FALSE ); + wHide( groupW ); + return; + } + if ( iLastTrkSeg > MAX_PATH_SEGS ) { + // track segs beyond threshold + NoticeMessage( MSG_TOOMANYSEGSINGROUP2, _("Ok"), NULL ); + wDrawDelayUpdate( mainD.d, FALSE ); + wHide( groupW ); + return; + } + if ( groupTrk_da.cnt>0 && hasTracks) { /* * Collect EndPts and find paths */ @@ -1181,38 +1283,40 @@ if ( log_group >= 1 && logTable(log_group).level >= 4 ) { trk1 = GetTrkEndTrk(trk,ep); if ( trk1 == NULL || !GetTrkSelected(trk1) ) { /* boundary EP */ - for ( epN=0; epN=tempEndPts_da.cnt ) { - DYNARR_APPEND( trkEndPt_t, tempEndPts_da, 10 ); - endPtP = &tempEndPts(tempEndPts_da.cnt-1); - memset( endPtP, 0, sizeof *endPtP ); - endPtP->pos = GetTrkEndPos(trk,ep); - endPtP->angle = GetTrkEndAngle(trk,ep); - endPtP->track = trk1; - endPtP->index = (trk1?GetEndPtConnectedToMe(trk1,trk):-1); - endPtOrig.x += endPtP->pos.x; - endPtOrig.y += endPtP->pos.y; + if ( epN>=TempEndPtsCount() ) { + endPtP = TempEndPtsAppend(); + SetEndPt( endPtP, GetTrkEndPos(trk,ep), GetTrkEndAngle(trk,ep)); + SetEndPtTrack( endPtP, trk1 ); + // Remember what EP on trk1 was connecting to me + SetEndPtEndPt( endPtP, trk1?GetEndPtConnectedToMe(trk1,trk):-1 ); + endPtOrig.x += GetEndPtPos(endPtP).x; + endPtOrig.y += GetEndPtPos(endPtP).y; } } } } -if ( log_group >= 1 && logTable(log_group).level >= 4 ) { - LogPrintf( "EndPts:\n" ); - for ( int inx=0; inxpos.x, endPtP->pos.y, endPtP->angle, endPtP->track?GetTrkIndex(endPtP->track):-1, endPtP->index ); - } -} + if ( log_group >= 1 && logTable(log_group).level >= 4 ) { + LogPrintf( "EndPts:\n" ); + for ( int inx=0; inx= 1 && logTable(log_group).level >= 4 ) { } /* Make sure no turnouts in groupTrk list have a path end which is not an EndPt */ - //TODO Add Trap Points (which are Turnouts with a bumper track) + // TODO-BUMPER Add Trap Points (which are Turnouts with a bumper track) + // for Bumper support remove this loop for ( inx=0; inx= 1 && logTable(log_group).level >= 4 ) { /* * Sort EndPts by angle */ - endPtOrig.x /= tempEndPts_da.cnt; - endPtOrig.y /= tempEndPts_da.cnt; + endPtOrig.x /= TempEndPtsCount(); + endPtOrig.y /= TempEndPtsCount(); angleN = 270.0; epN = -1; - for ( ep=0; ep - NormalizeAngle( tempEndPts(1).angle - tempEndPts(0).angle ) ) { - - for ( ep=1; ep<(tempEndPts_da.cnt+1)/2; ep++ ) { - trkEndPt_t tempEndPt; - tempEndPt = tempEndPts(ep); - tempEndPts(ep) = tempEndPts(tempEndPts_da.cnt-ep); - tempEndPts(tempEndPts_da.cnt-ep) = tempEndPt; + qsort( TempEndPt(0), TempEndPtsCount(), EndPtSize(1), CmpEndPtAngle ); + // TODO-BUMPER - handle TempEndPt(1) + if ( NormalizeAngle( GetEndPtAngle(TempEndPt(0)) - GetEndPtAngle(TempEndPt( + TempEndPtsCount()-1)) ) > + NormalizeAngle( GetEndPtAngle(TempEndPt(1)) - GetEndPtAngle(TempEndPt(0)) ) ) { + + for ( ep=1; ep<(TempEndPtsCount()+1)/2; ep++ ) { + SwapEndPts( TempEndPt(0), ep, TempEndPtsCount()-ep ); + } + } + if ( log_group >= 1 && logTable(log_group).level >= 3 ) { + LogPrintf( "Sorted EndPts:\n" ); + for ( int inx=0; inx= 1 && logTable(log_group).level >= 3 ) { - LogPrintf( "Sorted EndPts:\n" ); - for ( int inx=0; inxpos.x, endPtP->pos.y, endPtP->angle, endPtP->track?GetTrkIndex(endPtP->track):-1, endPtP->index ); - } -} /* * 3: Find shortest Paths @@ -1295,35 +1401,40 @@ if ( log_group >= 1 && logTable(log_group).level >= 3 ) { } } } -if ( log_group >= 1 && logTable(log_group).level >= 3 ) { - LogPrintf( "Shortest path:\n Group Tracks\n" ); - for ( int inx=0; inxtrk ), gtp->segStart+1, gtp->segEnd+1 ); - } - LogPrintf( " Path Elem\n" ); - for ( int inx=0; inxgroupInx, ppp->ep1, ppp->ep2, ppp->flip?"T":"F" ); - for ( PATHPTR_T cp = ppp->path; cp[0] || cp[1]; cp++ ) { - LogPrintf( " %d", *cp ); - } - LogPrintf( " 0\n" ); - } - LogPrintf( " Path\n" ); - for ( int inx=0; inxpathElemStart, pp->pathElemEnd, pp->ep1, pp->ep2, - pp->conflicts, pp->inGroup?"T":"F", pp->done?"T":"F" ); - } -} + if ( log_group >= 1 && logTable(log_group).level >= 3 ) { + LogPrintf( "Shortest path:\n Group Tracks\n" ); + for ( int inx=0; inxtrk ), + gtp->segStart+1, gtp->segEnd+1 ); + } + LogPrintf( " Path Elem\n" ); + for ( int inx=0; inxgroupInx, ppp->ep1, ppp->ep2, ppp->flip?"T":"F" ); + if ( ppp->path == NULL ) { + LogPrintf( "No Paths!\n" ); + } else { + for ( PATHPTR_T cp = ppp->path; cp[0] || cp[1]; cp++ ) { + LogPrintf( " %d", *cp ); + } + } + LogPrintf( " 0\n" ); + } + LogPrintf( " Path\n" ); + for ( int inx=0; inxpathElemStart, pp->pathElemEnd, pp->ep1, pp->ep2, + pp->conflicts, pp->inGroup?"T":"F", pp->done?"T":"F" ); + } + } /* * 4: Flip paths so they align */ if ( path_da.cnt == 0 ) { - NoticeMessage( _("No paths"), _("Ok"), NULL ); + NoticeMessage( MSG_GROUP_NO_PATHS, _("Ok"), NULL ); wDrawDelayUpdate( mainD.d, FALSE ); wHide( groupW ); return; @@ -1335,24 +1446,25 @@ if ( log_group >= 1 && logTable(log_group).level >= 3 ) { inx = -1; for ( pinx=0; pinxdone ) continue; + if ( pp->done ) { continue; } for ( pinx2=0; pinx2ep1 == ppN->ep1 || - pp->ep2 == ppN->ep2 ) { + pp->ep2 == ppN->ep2 ) { pp->done = TRUE; allDone = FALSE; -LOG( log_group, 1, ( "P%d aligns with P%d\n", pinx, pinx2 ) ); + LOG( log_group, 1, ( "P%d aligns with P%d\n", pinx, pinx2 ) ); break; } if ( pp->ep1 == ppN->ep2 || - pp->ep2 == ppN->ep1 ) { + pp->ep2 == ppN->ep1 ) { pp->done = TRUE; allDone = FALSE; -LOG( log_group, 1, ( "P%d aligns flipped with P%d\n", pinx, pinx2 ) ); + LOG( log_group, 1, ( "P%d aligns flipped with P%d\n", pinx, pinx2 ) ); inx = (pp->pathElemStart+pp->pathElemEnd-1)/2; - for ( ginx=pp->pathElemStart,ginx2=pp->pathElemEnd; ginx<=inx; ginx++,ginx2-- ) { + for ( ginx=pp->pathElemStart,ginx2=pp->pathElemEnd; ginx<=inx; + ginx++,ginx2-- ) { pathElemTemp = pathElem(ginx); pathElem(ginx) = pathElem(ginx2); pathElem(ginx2) = pathElemTemp; @@ -1370,33 +1482,35 @@ LOG( log_group, 1, ( "P%d aligns flipped with P%d\n", pinx, pinx2 ) ); break; } } - if ( inx<0 && !pp->done ) + if ( inx<0 && !pp->done ) { inx = pinx; + } } if ( allDone && inx>=0 ) { allDone = FALSE; path(inx).done = TRUE; - } - } -if ( log_group >= 1 && logTable(log_group).level >= 1 ) { - LogPrintf( "Group Paths\n" ); - for ( pinx=0; pinxep1, pp->ep2 ); - for ( pinx2=pp->pathElemEnd; pinx2>=pp->pathElemStart; pinx2-- ) { - ppp = &pathElem(pinx2); - LogPrintf( " %sT%d:%d.%d", ppp->flip?"-":"", GetTrkIndex(groupTrk(ppp->groupInx).trk), ppp->ep1, ppp->ep2 ); - } - LogPrintf( "\n" ); - } -} + } + } + if ( log_group >= 1 && logTable(log_group).level >= 1 ) { + LogPrintf( "Group Paths\n" ); + for ( pinx=0; pinxep1, pp->ep2 ); + for ( pinx2=pp->pathElemEnd; pinx2>=pp->pathElemStart; pinx2-- ) { + ppp = &pathElem(pinx2); + LogPrintf( " %sT%d:%d.%d", ppp->flip?"-":"", + GetTrkIndex(groupTrk(ppp->groupInx).trk), ppp->ep1, ppp->ep2 ); + } + LogPrintf( "\n" ); + } + } /* * 5: Create Conflict Map */ DYNARR_SET( int, conflictMap_da, path_da.cnt*path_da.cnt ); - memset( conflictMap_da.ptr, 0, conflictMap_da.max * sizeof conflictMap(0,0) ); + memset( &conflictMap(0,0), 0, conflictMap_da.cnt * sizeof conflictMap(0,0) ); for ( pinx=0; pinx= 1 && logTable(log_group).level >= 1 ) { * Sort Paths by number of conflicts */ DYNARR_SET( int, groupOrder_da, path_da.cnt ); - for ( pinx=0; pinxinGroup ) continue; + if ( pp->inGroup ) { continue; } pp->inGroup = TRUE; groupCnt++; groupMap( groupCnt-1, 0 ) = groupOrder(pinx); ginx = 1; for ( pinx2=pinx+1; pinx2= 1 && logTable(log_group).level >= 1 ) { for ( pinx2=0; pinx2= 1 && logTable(log_group).level >= 3 ) { - LogPrintf( "Group Map\n"); - for ( pinx=0; pinx= 0; ginx++ ) - LogPrintf( " %d: %d", ginx, groupMap(pinx,ginx) ); - LogPrintf( "\n" ); - } -} + if ( log_group >= 1 && logTable(log_group).level >= 3 ) { + LogPrintf( "Group Map\n"); + for ( pinx=0; pinx= 0; ginx++ ) { + LogPrintf( " %d: %d", ginx, groupMap(pinx,ginx) ); + } + LogPrintf( "\n" ); + } + } /* * 6: Count number of times each segment is used as flipped @@ -1469,34 +1586,36 @@ if ( log_group >= 1 && logTable(log_group).level >= 3 ) { memset( &segFlip(0), 0, trackSegs_da.cnt * sizeof segFlip(0) ); for ( pinx=0; pinxpath; *pPaths; pPaths++ ) { + for ( PATHPTR_T pPaths=ppp->path; pPaths && *pPaths; pPaths++ ) { inx = *pPaths; - if ( inx<0 ) + if ( inx<0 ) { inx = - inx; - if ( inx > trackSegs_da.cnt ) - AbortProg( "inx > trackSegs_da.cnt" ); + } + CHECK( inx <= trackSegs_da.cnt ); flip = *pPaths<0; - if ( ppp->flip ) + if ( ppp->flip ) { flip = !flip; + } inx += groupTrk(ppp->groupInx).segStart - 1; - if ( !flip ) + if ( !flip ) { segFlip(inx)++; - else + } else { segFlip(inx)--; + } } } /* * Flip each segment that is used as flipped more than not */ -LOG( log_group, 3, ( "Flipping Segments:" ) ); + LOG( log_group, 3, ( "Flipping Segments:" ) ); for ( pinx=0; pinx= 0; ginx++ ) { pp = &path(groupMap(pinx,ginx)); - LOG( log_group, 3, (" Group Map(%d, %d): elem %d-%d, EP %d %d, Conflicts %d, inGrp %d, Done: %s\n", pinx, ginx, pp->pathElemStart, pp->pathElemEnd, pp->ep1, pp->ep2, pp->conflicts, pp->inGroup, pp->done?"T":"F" ) ); + LOG( log_group, 3, + (" Group Map(%d, %d): elem %d-%d, EP %d %d, Conflicts %d, inGrp %d, Done: %s\n", + pinx, ginx, pp->pathElemStart, pp->pathElemEnd, pp->ep1, pp->ep2, pp->conflicts, + pp->inGroup, pp->done?"T":"F" ) ); for ( pinx2=pp->pathElemEnd; pinx2>=pp->pathElemStart; pinx2-- ) { ppp = &pathElem( pinx2 ); - LOG( log_group, 3, (" PE %d: GI %d, EP %d %d, Flip %d =", pinx2, ppp->groupInx, ppp->ep1, ppp->ep2, ppp->flip )); + LOG( log_group, 3, (" PE %d: GI %d, EP %d %d, Flip %d =", pinx2, + ppp->groupInx, ppp->ep1, ppp->ep2, ppp->flip )); groupP = &groupTrk( ppp->groupInx ); PATHPTR_T pPaths = ppp->path; flip = ppp->flip; - if ( pPaths == NULL ) - AbortProg( "Missing Path T%d:%d.%d", GetTrkIndex(groupP->trk), ppp->ep2, ppp->ep1 ); - if ( flip ) pPaths += strlen((char *)pPaths)-1; + if ( pPaths == NULL ) { + ErrorMessage( MSG_GROUP_NO_PATHS, _("Ok"), NULL ); + wDrawDelayUpdate( mainD.d, FALSE ); + wHide( groupW ); + return; + } + if ( flip ) { pPaths += strlen((char *)pPaths)-1; } while ( *pPaths && (pPaths >= ppp->path) ) { //Add Guard for flip backwards DYNARR_APPEND( char, pathPtr_da, 10 ); pathChar = *pPaths; @@ -1527,9 +1654,10 @@ LOG( log_group, 3, ( "\n" ) ); pathChar = - pathChar; } pathChar = groupP->segStart+pathChar; - if ( segFlip(pathChar-1)<0 ) + if ( segFlip(pathChar-1)<0 ) { flip1 = ! flip1; - if ( flip1 ) pathChar = - pathChar; + } + if ( flip1 ) { pathChar = - pathChar; } pathPtr(pathPtr_da.cnt-1) = pathChar; pPaths += (flip?-1:1); LOG( log_group, 3, (" %d", pathChar ) ); @@ -1551,21 +1679,24 @@ LOG( log_group, 3, ( "\n" ) ); DYNARR_RESET(trkSeg_t, outputSegs_da); - for (int i=0; ititle), options )>0; - rc &= WriteCompoundPathsEndPtsSegs( f, pPaths, outputSegs_da.cnt, &outputSegs(0), tempEndPts_da.cnt, &tempEndPts(0) ); + rc &= fprintf( f, "TURNOUT %s \"%s\" %ld\n", curScaleName, PutTitle(to->title), + options )>0; + rc &= WriteCompoundPathsEndPtsSegs( f, pPaths, outputSegs_da.cnt, + &outputSegs(0), TempEndPtsCount(), TempEndPt(0) ); SetUserLocale(); } if ( groupReplace ) { @@ -1597,17 +1732,21 @@ LOG( log_group, 3, ( "\n" ) ); UndoStart( _("Group Tracks"), "group" ); orig.x = - orig.x; orig.y = - orig.y; - for ( ep=0; eptrack ) { - trk = GetTrkEndTrk( endPtP->track, endPtP->index ); - epN = GetEndPtConnectedToMe( trk, endPtP->track ); - DrawEndPt( &mainD, endPtP->track, endPtP->index, wDrawColorWhite ); + for ( ep=0; eptrack, endPtP->index ); + DisconnectTracks( trk, epN, trk1, ep1 ); } - endPtP->pos.x += orig.x; - endPtP->pos.y += orig.y; + coOrd pos = GetEndPtPos(endPtP); + pos.x += orig.x; + pos.y += orig.y; + SetEndPt( endPtP, pos, GetEndPtAngle(endPtP) ); } trk = NULL; while ( TrackIterate( &trk ) ) { @@ -1618,16 +1757,21 @@ LOG( log_group, 3, ( "\n" ) ); } } SelectRecount(); - trk = NewCompound( T_TURNOUT, 0, orig, 0.0, to->title, tempEndPts_da.cnt, &tempEndPts(0), pPaths, outputSegs_da.cnt, &outputSegs(0) ); - struct extraDataCompound_t *xx = GET_EXTRA_DATA(trk, T_TURNOUT, extraDataCompound_t); + trk = NewCompound( T_TURNOUT, 0, orig, 0.0, to->title, TempEndPtsCount(), + TempEndPt(0), pPaths, outputSegs_da.cnt, &outputSegs(0) ); + struct extraDataCompound_t *xx = GET_EXTRA_DATA(trk, T_TURNOUT, + extraDataCompound_t); xx->pathOverRide = FALSE; xx->pathNoCombine = groupNoCombine; SetTrkVisible( trk, TRUE ); - for ( ep=0; ep0; + rc &= fprintf( f, "STRUCTURE %s \"%s\"\n", curScaleName, + PutTitle(groupTitle) )>0; rc &= WriteSegs( f, trackSegs_da.cnt, &trackSegs(0) ); SetUserLocale(); } @@ -1661,13 +1807,14 @@ LOG( log_group, 3, ( "\n" ) ); SelectRecount(); orig.x = - orig.x; orig.y = - orig.y; - trk = NewCompound( T_STRUCTURE, 0, orig, 0.0, groupTitle, 0, NULL, NULL, trackSegs_da.cnt, &trackSegs(0) ); + trk = NewCompound( T_STRUCTURE, 0, orig, 0.0, groupTitle, 0, NULL, NULL, + trackSegs_da.cnt, &trackSegs(0) ); SetTrkVisible( trk, TRUE ); DrawNewTrack( trk ); EnableCommands(); } } - if (f) fclose(f); + if (f) { fclose(f); } DoChangeNotification( CHANGE_PARAMS ); wHide( groupW ); wDrawDelayUpdate( mainD.d, FALSE ); @@ -1692,15 +1839,18 @@ EXPORT void DoGroup( void * unused ) while ( TrackIterate( &trk ) ) { if ( GetTrkSelected( trk ) ) { trkType = GetTrkType(trk); - if ( IsTrack(trk) ) isTurnout = TRUE; + if ( IsTrack(trk) ) { isTurnout = TRUE; } if ( trkType == T_TURNOUT || trkType == T_STRUCTURE ) { xx = GET_EXTRA_DATA(trk, trkType, extraDataCompound_t); groupSegCnt += xx->segCnt; GroupCopyTitle( xtitle(xx) ); - if ( trkType == T_TURNOUT && GetTrkEndPtCnt(trk) > 2 && xx->pathNoCombine != 0 ) + if ( trkType == T_TURNOUT && GetTrkEndPtCnt(trk) > 2 + && xx->pathNoCombine != 0 ) { groupNoCombine = TRUE; - } else + } + } else { groupSegCnt += 1; + } } } if ( groupSegCnt <= 0 ) { @@ -1708,11 +1858,13 @@ EXPORT void DoGroup( void * unused ) return; } sprintf( groupTitle, "%s\t%s\t%s", groupManuf, groupDesc, groupPartno ); - if ( log_group < 0 ) + if ( log_group < 0 ) { log_group = LogFindIndex( "group" ); + } if ( !groupW ) { ParamRegister( &groupPG ); - groupW = ParamCreateDialog( &groupPG, MakeWindowTitle(_("Group Objects")), _("Ok"), GroupOk, wHide, TRUE, NULL, F_BLOCK, NULL ); + groupW = ParamCreateDialog( &groupPG, MakeWindowTitle(_("Group Objects")), + _("Ok"), GroupOk, wHide, TRUE, NULL, F_BLOCK, NULL ); groupD.dpi = mainD.dpi; } if (isTurnout) { diff --git a/app/bin/chndldto.c b/app/bin/chndldto.c index abb6e32..fb7c05f 100644 --- a/app/bin/chndldto.c +++ b/app/bin/chndldto.c @@ -18,7 +18,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "ccurve.h" @@ -36,17 +36,17 @@ * STATE INFO */ static struct { - STATE_T state; - coOrd normalP; - ANGLE_T normalA; - track_p normalT; - coOrd reverseP; - coOrd reverseP1; - ANGLE_T reverseA; - DIST_T frogNo; - ANGLE_T frogA; - curveData_t curveData; - } Dhlt; + STATE_T state; + coOrd normalP; + ANGLE_T normalA; + track_p normalT; + coOrd reverseP; + coOrd reverseP1; + ANGLE_T reverseA; + DIST_T frogNo; + ANGLE_T frogA; + curveData_t curveData; +} Dhlt; static STATUS_T CmdHandLaidTurnout( wAction_t action, coOrd pos ) @@ -55,7 +55,8 @@ static STATUS_T CmdHandLaidTurnout( wAction_t action, coOrd pos ) EPINX_T ep, ep1, ep2, ep2a=-1, ep2b=-1, pointEp0, pointEp1; DIST_T dist, reverseD, pointD; coOrd off, intersectP; - coOrd pointP, pointC, pointP1, reverseC, point0; + coOrd pointP, pointP1, reverseC, point0; +// coOrd pointC; track_p trk, trk1, trk2, trk2a=NULL, trk2b=NULL, pointT; trkSeg_p segP; BOOL_T right; @@ -68,18 +69,18 @@ static STATUS_T CmdHandLaidTurnout( wAction_t action, coOrd pos ) DYNARR_SET( trkSeg_t, tempSegs_da, 1 ); Dhlt.state = 0; Dhlt.normalT = NULL; - tempSegs_da.cnt = 0; DYNARR_SET( trkSeg_t, tempSegs_da, 2 ); tempSegs(0).color = drawColorBlack; - tempSegs(0).width = 0; + tempSegs(0).lineWidth = 0; tempSegs(1).color = drawColorBlack; - tempSegs(1).width = 0; + tempSegs(1).lineWidth = 0; return C_CONTINUE; case C_DOWN: if (Dhlt.state == 0) { - if ((Dhlt.normalT = OnTrack( &pos, TRUE, TRUE )) == NULL) + if ((Dhlt.normalT = OnTrack( &pos, TRUE, TRUE )) == NULL) { break; + } if ( QueryTrack( Dhlt.normalT, Q_NOT_PLACE_FROGPOINTS ) ) { ErrorMessage( MSG_CANT_PLACE_FROGPOINTS, _("frog") ); Dhlt.normalT = NULL; @@ -89,19 +90,20 @@ static STATUS_T CmdHandLaidTurnout( wAction_t action, coOrd pos ) Dhlt.normalA = GetAngleAtPoint( Dhlt.normalT, Dhlt.normalP, NULL, NULL ); InfoMessage( _("Drag to set angle") ); Dhlt.state = 1; - pointC = pointP = pointP1 = reverseC = zero; +// pointC = pointP = pointP1 = reverseC = zero; return C_CONTINUE; } case C_MOVE: case C_UP: - if (Dhlt.normalT == NULL) + if (Dhlt.normalT == NULL) { break; + } if (Dhlt.state == 1) { Dhlt.reverseP1 = pos; Dhlt.reverseA = FindAngle( Dhlt.reverseP, Dhlt.reverseP1 ); Dhlt.frogA = NormalizeAngle( Dhlt.reverseA - Dhlt.normalA ); -/*printf( "RA=%0.3f FA=%0.3f ", Dhlt.reverseA, Dhlt.frogA );*/ + /*printf( "RA=%0.3f FA=%0.3f ", Dhlt.reverseA, Dhlt.frogA );*/ if (Dhlt.frogA > 270.0) { Dhlt.frogA = 360.0-Dhlt.frogA; right = FALSE; @@ -118,12 +120,13 @@ static STATUS_T CmdHandLaidTurnout( wAction_t action, coOrd pos ) } else { right = TRUE; } -/*printf( "NA=%0.3f FA=%0.3f R=%d\n", Dhlt.normalA, Dhlt.frogA, right );*/ + /*printf( "NA=%0.3f FA=%0.3f R=%d\n", Dhlt.normalA, Dhlt.frogA, right );*/ Dhlt.frogNo = tan(D2R(Dhlt.frogA)); - if (Dhlt.frogNo > 0.01) + if (Dhlt.frogNo > 0.01) { Dhlt.frogNo = 1.0/Dhlt.frogNo; - else + } else { Dhlt.frogNo = 0.0; + } if (action == C_MOVE) { if (Dhlt.frogNo != 0) { InfoMessage( _("Angle = %0.2f Frog# = %0.2f"), Dhlt.frogA, Dhlt.frogNo ); @@ -133,15 +136,18 @@ static STATUS_T CmdHandLaidTurnout( wAction_t action, coOrd pos ) } else { InfoMessage( _("Select point position") ); Dhlt.state = 2; - Translate( &Dhlt.reverseP, Dhlt.reverseP, Dhlt.normalA+(right?+90:-90), trackGauge ); - Translate( &Dhlt.reverseP1, Dhlt.reverseP1, Dhlt.normalA+(right?+90:-90), trackGauge ); + Translate( &Dhlt.reverseP, Dhlt.reverseP, Dhlt.normalA+(right?+90:-90), + trackGauge ); + Translate( &Dhlt.reverseP1, Dhlt.reverseP1, Dhlt.normalA+(right?+90:-90), + trackGauge ); } return C_CONTINUE; } else if ( Dhlt.state == 2 ) { - tempSegs_da.cnt = 0; + DYNARR_RESET( trkSeg_t, tempSegs_da ); pointP = pos; - if ((pointT = OnTrack( &pointP, TRUE, TRUE )) == NULL) + if ((pointT = OnTrack( &pointP, TRUE, TRUE )) == NULL) { break; + } if ( QueryTrack( pointT, Q_NOT_PLACE_FROGPOINTS ) ) { ErrorMessage( MSG_CANT_PLACE_FROGPOINTS, _("points") ); break; @@ -149,11 +155,11 @@ static STATUS_T CmdHandLaidTurnout( wAction_t action, coOrd pos ) dist = FindDistance( Dhlt.normalP, pointP ); pointA = GetAngleAtPoint( pointT, pointP, &pointEp0, &pointEp1 ); angle = NormalizeAngle( pointA + 180.0 - Dhlt.reverseA ); -PTRACE(( "rA=%0.1f pA=%0.1f a=%0.1f ", Dhlt.reverseA, pointA, angle )) + PTRACE(( "rA=%0.1f pA=%0.1f a=%0.1f ", Dhlt.reverseA, pointA, angle )) if ( angle > 90.0 && angle < 270.0 ) { pointA = NormalizeAngle( pointA + 180.0 ); angle = NormalizeAngle( angle + 180.0 ); -PTRACE(( " {pA=%0.1f a=%0.1f} ", pointA, angle )) + PTRACE(( " {pA=%0.1f a=%0.1f} ", pointA, angle )) } else { ep = pointEp0; pointEp0 = pointEp1; pointEp1 = ep; } @@ -163,10 +169,11 @@ PTRACE(( " {pA=%0.1f a=%0.1f} ", pointA, angle )) } else { right = FALSE; } -PTRACE(( "r=%c a=%0.1f ", right?'T':'F', angle )) + PTRACE(( "r=%c a=%0.1f ", right?'T':'F', angle )) Translate( &off, pointP, pointA+180.0, trackGauge*2.0 ); - if ((trk = OnTrack( &off, TRUE, TRUE )) == NULL) + if ((trk = OnTrack( &off, TRUE, TRUE )) == NULL) { break; + } if ( QueryTrack( trk, Q_NOT_PLACE_FROGPOINTS ) ) { ErrorMessage( MSG_CANT_PLACE_FROGPOINTS, _("points") ); break; @@ -175,23 +182,25 @@ PTRACE(( "r=%c a=%0.1f ", right?'T':'F', angle )) Rotate( &off, Dhlt.reverseP, 180-Dhlt.reverseA ); off.x -= Dhlt.reverseP.x; off.y -= Dhlt.reverseP.y; - if (right) + if (right) { off.x = -off.x; -PTRACE(( "off=[%0.3f %0.3f] ", off.x, off.y )) + } + PTRACE(( "off=[%0.3f %0.3f] ", off.x, off.y )) if (off.y < 0) { ErrorMessage( MSG_MOVE_POINTS_OTHER_SIDE ); -PTRACE(("\n")) + PTRACE(("\n")) break; } if (off.x < 0) { ErrorMessage( MSG_MOVE_POINTS_AWAY_CLOSE ); -PTRACE(("\n")) + PTRACE(("\n")) break; } angle2 = FindAngle( zero, off ); -PTRACE(( "a2=%0.1f\n", angle2 )) + PTRACE(( "a2=%0.1f\n", angle2 )) if (angle < 0.5) { if ( off.x < connectDistance ) { + DYNARR_SET( trkSeg_t, tempSegs_da, 2 ); tempSegs(0).type = SEG_STRTRK; tempSegs(0).color = wDrawColorBlack; tempSegs(0).u.l.pos[0] = pointP; @@ -200,23 +209,25 @@ PTRACE(( "a2=%0.1f\n", angle2 )) tempSegs(1).color = wDrawColorBlack; tempSegs(1).u.l.pos[0] = Dhlt.reverseP; Translate( &tempSegs(1).u.l.pos[1], Dhlt.reverseP, Dhlt.reverseA, trackGauge ); - tempSegs_da.cnt = 2; } else { - ErrorMessage( MSG_MOVE_POINTS_AWAY_NO_INTERSECTION ); - break; + ErrorMessage( MSG_MOVE_POINTS_AWAY_NO_INTERSECTION ); + break; } } else if (angle < angle2) { ErrorMessage( MSG_MOVE_POINTS_AWAY_NO_INTERSECTION ); break; } else { - if (!FindIntersection( &intersectP, Dhlt.reverseP, Dhlt.reverseA+180.0, pointP, pointA+180.0 )) + if (!FindIntersection( &intersectP, Dhlt.reverseP, Dhlt.reverseA+180.0, pointP, + pointA+180.0 )) { break; + } reverseD = FindDistance( Dhlt.reverseP, intersectP ); pointD = FindDistance( pointP, intersectP ); if (reverseD > pointD) { reverseR = pointD/tan(D2R(angle/2.0)); Translate( &reverseC, pointP, pointA+(right?-90:+90), reverseR ); -PTRACE(( "rR=%0.3f rC=[%0.3f %0.3f]\n", reverseR, reverseC.x, reverseC.y )) + PTRACE(( "rR=%0.3f rC=[%0.3f %0.3f]\n", reverseR, reverseC.x, reverseC.y )) + DYNARR_SET( trkSeg_t, tempSegs_da, 3 ); tempSegs(0).type = SEG_CRVTRK; tempSegs(0).color = wDrawColorBlack; tempSegs(0).u.c.center = reverseC; @@ -225,13 +236,13 @@ PTRACE(( "rR=%0.3f rC=[%0.3f %0.3f]\n", reverseR, reverseC.x, reverseC.y )) tempSegs(0).u.c.a1 = angle; tempSegs(1).type = SEG_STRTRK; tempSegs(1).color = wDrawColorBlack; - PointOnCircle( &tempSegs(1).u.l.pos[0], reverseC, reverseR, tempSegs(0).u.c.a0 + (right?angle:0.0) ); + PointOnCircle( &tempSegs(1).u.l.pos[0], reverseC, reverseR, + tempSegs(0).u.c.a0 + (right?angle:0.0) ); tempSegs(1).u.l.pos[1] = Dhlt.reverseP; tempSegs(2).type = SEG_STRTRK; tempSegs(2).color = wDrawColorBlack; tempSegs(2).u.l.pos[0] = Dhlt.reverseP; Translate( &tempSegs(2).u.l.pos[1], Dhlt.reverseP, Dhlt.reverseA, trackGauge ); - tempSegs_da.cnt = 3; } else { reverseR = reverseD/tan(D2R(angle/2.0)); reverseR *= sqrt(reverseD/pointD); @@ -240,17 +251,21 @@ PTRACE(( "rR=%0.3f rC=[%0.3f %0.3f]\n", reverseR, reverseC.x, reverseC.y )) dist = FindDistance( reverseC, pointP ); angle2 = R2D( asin( reverseR/dist ) ); angle3 = FindAngle( pointP, reverseC ); - if (right) + if (right) { angle2 = NormalizeAngle(angle3 - pointA+180) - angle2; - else + } else { angle2 = NormalizeAngle(pointA+180 - angle3) - angle2; + } reverseA1 = angle-angle2; -PTRACE(( " a2=%0.1f rA1=%0.1f\n", angle2, reverseA1 )) + PTRACE(( " a2=%0.1f rA1=%0.1f\n", angle2, reverseA1 )) + DYNARR_SET( trkSeg_t, tempSegs_da, 3 ); tempSegs(0).type = SEG_STRTRK; tempSegs(0).color = wDrawColorBlack; tempSegs(0).u.l.pos[0] = pointP; - tempSegs(1).u.c.a0 = NormalizeAngle(Dhlt.reverseA + (right?(-90.0-reverseA1):+90.0)); - PointOnCircle( &tempSegs(0).u.l.pos[1], reverseC, reverseR, tempSegs(1).u.c.a0 + (right?0.0:reverseA1) ); + tempSegs(1).u.c.a0 = NormalizeAngle(Dhlt.reverseA + (right? + (-90.0-reverseA1):+90.0)); + PointOnCircle( &tempSegs(0).u.l.pos[1], reverseC, reverseR, + tempSegs(1).u.c.a0 + (right?0.0:reverseA1) ); tempSegs(1).type = SEG_CRVTRK; tempSegs(1).color = wDrawColorBlack; tempSegs(1).u.c.center = reverseC; @@ -260,26 +275,29 @@ PTRACE(( " a2=%0.1f rA1=%0.1f\n", angle2, reverseA1 )) tempSegs(2).color = wDrawColorBlack; tempSegs(2).u.l.pos[0] = Dhlt.reverseP; Translate( &tempSegs(2).u.l.pos[1], Dhlt.reverseP, Dhlt.reverseA, trackGauge ); - tempSegs_da.cnt = 3; } } if (action != C_UP) { dist = FindDistance( pointP, Dhlt.normalP ); - InfoMessage( _("Length = %0.2f Angle = %0.2f Frog# = %0.2f"), dist, Dhlt.frogA, Dhlt.frogNo ); + InfoMessage( _("Length = %0.2f Angle = %0.2f Frog# = %0.2f"), dist, Dhlt.frogA, + Dhlt.frogNo ); return C_CONTINUE; } - UndoStart( _("Create Hand Laid Turnout"), "Hndldto( T%d[%d] )", GetTrkIndex(pointT), pointEp0 ); + UndoStart( _("Create Hand Laid Turnout"), "Hndldto( T%d[%d] )", + GetTrkIndex(pointT), pointEp0 ); UndoModify( pointT ); - if (!SplitTrack( pointT, pointP, pointEp0, &trk1, TRUE )) + if (!SplitTrack( pointT, pointP, pointEp0, &trk1, TRUE )) { break; + } dist = trackGauge*2.0; if ( !trk1 ) { trk1 = pointT; pointT = NULL; } ep1 = PickEndPoint( pointP, trk1 ); - if (!RemoveTrack( &trk1, &ep1, &dist )) + if (!RemoveTrack( &trk1, &ep1, &dist )) { break; + } point0 = GetTrkEndPos( trk1, ep1 ); angle0 = NormalizeAngle(GetTrkEndAngle(trk1,ep1)+180.0); trk2 = NULL; @@ -291,7 +309,8 @@ PTRACE(( " a2=%0.1f rA1=%0.1f\n", angle2, reverseA1 )) ep2b = 0; break; case SEG_CRVTRK: - trk2b = NewCurvedTrack( segP->u.c.center, fabs(segP->u.c.radius), segP->u.c.a0, segP->u.c.a1, 0 ); + trk2b = NewCurvedTrack( segP->u.c.center, fabs(segP->u.c.radius), segP->u.c.a0, + segP->u.c.a1, 0 ); ep2b = (right?0:1); } if (trk2 == NULL) { @@ -305,11 +324,13 @@ PTRACE(( " a2=%0.1f rA1=%0.1f\n", angle2, reverseA1 )) } *trkpp = NULL; dist = trackGauge*2.0; - if (!RemoveTrack( &trk2, &ep2, &dist )) + if (!RemoveTrack( &trk2, &ep2, &dist )) { break; + } trk = NewHandLaidTurnout( pointP, pointA, - point0, angle0, - GetTrkEndPos(trk2,ep2), NormalizeAngle(GetTrkEndAngle(trk2,ep2)+180.0), Dhlt.frogA ); + point0, angle0, + GetTrkEndPos(trk2,ep2), NormalizeAngle(GetTrkEndAngle(trk2,ep2)+180.0), + Dhlt.frogA ); DrawEndPt( &mainD, trk1, ep1, wDrawColorWhite ); if ( pointT ) { DrawEndPt( &mainD, pointT, pointEp0, wDrawColorWhite ); @@ -324,18 +345,22 @@ PTRACE(( " a2=%0.1f rA1=%0.1f\n", angle2, reverseA1 )) DrawTrack( pointT, &mainD, wDrawColorBlack ); } DrawTrack( trk, &mainD, wDrawColorBlack ); - for (trkpp=trks; *trkpp; trkpp++) + for (trkpp=trks; *trkpp; trkpp++) { DrawTrack( *trkpp, &mainD, wDrawColorBlack ); - + } + Dhlt.state = 0; return C_TERMINATE; } case C_REDRAW: - if (Dhlt.state >= 1) + if (Dhlt.state >= 1) { DrawLine( &tempD, Dhlt.reverseP, Dhlt.reverseP1, 0, wDrawColorBlack ); - if (Dhlt.state >= 2) - DrawSegs( &tempD, zero, 0.0, &tempSegs(0), tempSegs_da.cnt, trackGauge, wDrawColorBlack ); + } + if (Dhlt.state >= 2) { + DrawSegsDA( &tempD, NULL, zero, 0.0, &tempSegs_da, trackGauge, wDrawColorBlack, + 0 ); + } return C_CONTINUE; case C_CANCEL: @@ -348,9 +373,11 @@ PTRACE(( " a2=%0.1f rA1=%0.1f\n", angle2, reverseA1 )) } -#include "bitmaps/turnout-designer.xpm" +#include "bitmaps/turnout-design.xpm3" EXPORT void InitCmdHandLaidTurnout( wMenu_p menu ) { - AddMenuButton( menu, CmdHandLaidTurnout, "cmdHandLaidTurnout", _("HandLaidTurnout"), wIconCreatePixMap(turnout_designer_xpm[iconSize]), LEVEL0_50, IC_STICKY|IC_INITNOTSTICKY|IC_POPUP2, ACCL_HNDLDTO, NULL ); + AddMenuButton( menu, CmdHandLaidTurnout, "cmdHandLaidTurnout", + _("HandLaidTurnout"), wIconCreatePixMap(turnout_design_xpm3[iconSize]), + LEVEL0_50, IC_STICKY|IC_INITNOTSTICKY|IC_POPUP2, ACCL_HNDLDTO, NULL ); } diff --git a/app/bin/chotbar.c b/app/bin/chotbar.c index 379f31a..a0e6332 100644 --- a/app/bin/chotbar.c +++ b/app/bin/chotbar.c @@ -17,7 +17,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "compound.h" @@ -41,27 +41,28 @@ static wMenu_p hotbarPopupM; static wMenuList_p hotBarML = NULL; static wIndex_t hotBarMLcnt = 0; static drawCmd_t hotBarD = { - NULL, - &screenDrawFuncs, - 0, - 1.0, - 0.0, - {0.0, 0.0}, {0.0, 0.0}, - Pix2CoOrd, CoOrd2Pix }; + NULL, + &screenDrawFuncs, + 0, + 1.0, + 0.0, + {0.0, 0.0}, {0.0, 0.0}, + Pix2CoOrd, CoOrd2Pix +}; static wWinPix_t hotBarDrawHeight[] = {26, 32, 40}; -static wFontSize_t hotBarFontSize[] = {7, 8, 9}; +static wFontSize_t hotBarFontSize[] = {7, 11, 14}; typedef struct { - DIST_T x; - DIST_T w; - DIST_T objectW; - DIST_T labelW; - coOrd size; - coOrd orig; - BOOL_T isFixed; - void * context; - hotBarProc_t proc; - DIST_T barScale; - } hotBarMap_t; + DIST_T x; + DIST_T w; + DIST_T objectW; + DIST_T labelW; + coOrd size; + coOrd orig; + BOOL_T isFixed; + void * context; + hotBarProc_t proc; + DIST_T barScale; +} hotBarMap_t; static dynArr_t hotBarMap_da; #define hotBarMap(N) DYNARR_N( hotBarMap_t, hotBarMap_da, N ) static int hotBarCurrSelects[2] = { -1, -1 }; @@ -74,23 +75,25 @@ static DIST_T hotBarWidth = 0.0; static void HotBarHighlight( int inx, DIST_T fixed_x ) { - if ( inx > 0 && ( inx < hotBarCurrStart || inx >= hotBarCurrEnd ) ) + if ( inx > 0 && ( inx < hotBarCurrStart || inx >= hotBarCurrEnd ) ) { return; + } coOrd orig, size; hotBarD.scale = 1; - if ( inx == 0 && hotBarMap_da.cnt>0 && hotBarMap(0).isFixed) + if ( inx == 0 && hotBarMap_da.cnt>0 && hotBarMap(0).isFixed) { orig.x = 0; - else + } else { orig.x = hotBarMap(inx).x-hotBarMap(hotBarCurrStart).x + (inx>0?fixed_x:0); + } orig.y = 0; size.x = hotBarMap(inx).w - 2.0/hotBarD.dpi; size.y = toolbarHeight; #ifdef LATER printf( "HotBarHilite fixed_x:%0.3f X0:%d/%0.3f X:%d/%0.3f+%0.3f X=%0.3f\n", - fixed_x, - hotBarCurrStart, hotBarMap(hotBarCurrStart).x, - inx, hotBarMap(inx).x, hotBarMap(inx).w, - orig.x ); + fixed_x, + hotBarCurrStart, hotBarMap(hotBarCurrStart).x, + inx, hotBarMap(inx).x, hotBarMap(inx).w, + orig.x ); #endif DrawRectangle( &hotBarD, orig, size, wDrawColorBlack, DRAW_TRANSPARENT ); } @@ -106,15 +109,18 @@ static void RedrawHotBar( wDraw_p dd, void * data, wWinPix_t w, wWinPix_t h ) coOrd orig; int inx; hotBarMap_t * tbm; - DIST_T barHeight = (DIST_T)(wControlGetHeight( (wControl_p)hotBarD.d ) - 2)/hotBarD.dpi; - DIST_T barWidth = (DIST_T)(wControlGetWidth( (wControl_p)hotBarD.d ) - 2)/hotBarD.dpi; + DIST_T barHeight = (DIST_T)(wControlGetHeight( (wControl_p)hotBarD.d ) - + 2)/hotBarD.dpi; + DIST_T barWidth = (DIST_T)(wControlGetWidth( (wControl_p)hotBarD.d ) - + 2)/hotBarD.dpi; + DIST_T barScale; DIST_T x; wDrawClear( hotBarD.d ); - if (hotBarCurrStart >0) + if (hotBarCurrStart >0) { wControlActive( (wControl_p)hotBarLeftB, TRUE ); - else { + } else { wButtonSetBusy(hotBarLeftB, FALSE); wControlActive( (wControl_p)hotBarLeftB, FALSE ); } @@ -124,11 +130,13 @@ static void RedrawHotBar( wDraw_p dd, void * data, wWinPix_t w, wWinPix_t h ) wControlActive( (wControl_p)hotBarRightB, FALSE ); return; } - if ( hotBarLabels && !hotBarFp ) + if ( hotBarLabels && !hotBarFp ) { hotBarFp = wStandardFont( F_HELV, FALSE, FALSE ); + } DIST_T fixed_x = 0.0; - if (hotBarCurrStart>0 && hotBarMap_da.cnt>0 && hotBarMap(0).isFixed) { //Do fixed element first - Cornu + if (hotBarCurrStart>0 && hotBarMap_da.cnt>0 + && hotBarMap(0).isFixed) { //Do fixed element first - Cornu tbm = &hotBarMap(0); barScale = tbm->barScale; x = 0.0; @@ -138,8 +146,8 @@ static void RedrawHotBar( wDraw_p dd, void * data, wWinPix_t w, wWinPix_t h ) if ( tbm->labelW > tbm->objectW ) { fixed_x = tbm->labelW; x += (tbm->labelW-tbm->objectW)/2; - } else fixed_x = tbm->objectW; - } else fixed_x = tbm->objectW; + } else { fixed_x = tbm->objectW; } + } else { fixed_x = tbm->objectW; } x *= barScale; orig.x = x; hotBarD.scale = barScale; @@ -150,7 +158,8 @@ static void RedrawHotBar( wDraw_p dd, void * data, wWinPix_t w, wWinPix_t h ) hotBarD.scale = 1.0; orig.x = 0.0; orig.y = 2.0/hotBarD.dpi; //Draw Label under icon - DrawString( &hotBarD, orig, 0.0, tbm->proc( HB_BARTITLE, tbm->context, NULL, NULL ), hotBarFp, hotBarFs, drawColorBlack ); + DrawString( &hotBarD, orig, 0.0, tbm->proc( HB_BARTITLE, tbm->context, NULL, + NULL ), hotBarFp, hotBarFs, drawColorBlack ); } } @@ -179,18 +188,21 @@ static void RedrawHotBar( wDraw_p dd, void * data, wWinPix_t w, wWinPix_t h ) hotBarD.scale = 1.0; orig.x = tbm->x - hotBarMap(hotBarCurrStart).x + fixed_x; orig.y = 2.0/hotBarD.dpi; //Draw Label under icon - DrawString( &hotBarD, orig, 0.0, tbm->proc( HB_BARTITLE, tbm->context, NULL, NULL ), hotBarFp, hotBarFs, drawColorBlack ); + DrawString( &hotBarD, orig, 0.0, tbm->proc( HB_BARTITLE, tbm->context, NULL, + NULL ), hotBarFp, hotBarFs, drawColorBlack ); } } hotBarCurrEnd = inx; if ((hotBarCurrSelect==0 && hotBarMap_da.cnt>0 && hotBarMap(0).isFixed) || - ((hotBarCurrSelect >= hotBarCurrStart) && (hotBarCurrSelect < hotBarCurrEnd)) ) + ((hotBarCurrSelect >= hotBarCurrStart) + && (hotBarCurrSelect < hotBarCurrEnd)) ) { HotBarHighlight( hotBarCurrSelect, fixed_x ); -/* else - hotBarCurrSelect = -1;*/ - if (hotBarCurrEnd < hotBarMap_da.cnt) + } + /* else + hotBarCurrSelect = -1;*/ + if (hotBarCurrEnd < hotBarMap_da.cnt) { wControlActive( (wControl_p)hotBarRightB, TRUE ); - else { + } else { wButtonSetBusy(hotBarRightB, FALSE); wControlActive( (wControl_p)hotBarRightB, FALSE ); } @@ -200,22 +212,26 @@ static void RedrawHotBar( wDraw_p dd, void * data, wWinPix_t w, wWinPix_t h ) static void DoHotBarRight( void * data ) { - DIST_T barWidth = ((DIST_T)wControlGetWidth( (wControl_p)hotBarD.d ) - 2.0)/hotBarD.dpi; + DIST_T barWidth = ((DIST_T)wControlGetWidth( (wControl_p)hotBarD.d ) - + 2.0)/hotBarD.dpi; int inx = hotBarCurrStart; - DIST_T lastX = hotBarMap(hotBarMap_da.cnt-1).x + hotBarMap(hotBarMap_da.cnt-1).w + 2.0/hotBarD.dpi; + DIST_T lastX = hotBarMap(hotBarMap_da.cnt-1).x + hotBarMap( + hotBarMap_da.cnt-1).w + 2.0/hotBarD.dpi; if (MyGetKeyState()&WKEY_SHIFT) { inx += hotBarMap_da.cnt/8; } else { inx++; } - if ( inx >= hotBarMap_da.cnt ) + if ( inx >= hotBarMap_da.cnt ) { inx = hotBarMap_da.cnt-1; + } DIST_T fixed_x = 0.0; if (hotBarCurrStart>0 && hotBarMap(0).isFixed) { fixed_x = hotBarMap(0).w; } - while ( (inx > 1) && ((lastX - hotBarMap(inx-1).x) < (barWidth - fixed_x)) ) - inx--; + while ( (inx > 1) && ((lastX - hotBarMap(inx-1).x) < (barWidth - fixed_x)) ) { + inx--; + } if ( inx != hotBarCurrStart ) { hotBarCurrStart = inx; RedrawHotBar( hotBarD.d, NULL, 0, 0 ); @@ -231,8 +247,9 @@ static void DoHotBarLeft( void * data ) } else { inx --; } - if ( inx < 0 ) + if ( inx < 0 ) { inx = 0; + } if ( inx != hotBarCurrStart ) { hotBarCurrStart = inx; RedrawHotBar( hotBarD.d, NULL, 0, 0 ); @@ -245,17 +262,20 @@ static void DoHotBarJump( int inx ) DIST_T x, barWidth; inx -= '0'; - if (inx < 0 || inx > 9) + if (inx < 0 || inx > 9) { return; - if (inx == 0) + } + if (inx == 0) { inx = 9; - else + } else { inx--; + } barWidth = (DIST_T)wControlGetWidth( (wControl_p)hotBarD.d )/hotBarD.dpi; x = (inx*(hotBarWidth-barWidth))/9.0; for ( inx=0; inx> 8); + if ( key >= '0' && key <= '9') { + DoHotBarJump( key ); + } else if ( key == 0x1B ) { + ConfirmReset( FALSE ); + } + return; + } + if ( (action&0xFF) == wActionRUp ) { wMenuPopupShow( hotbarPopupM ); return; @@ -290,20 +324,21 @@ static void SelectHotBar( wDraw_p d, void * context, wAction_t action, wDrawPix_ fixed_x = hotBarMap(0).w; x = w/hotBarD.dpi + hotBarMap(0).x; if ( (x>= hotBarMap(0).x) && - (x <=hotBarMap(0).w )) inx = 0; //Match on fixed + (x <=hotBarMap(0).w )) { inx = 0; } //Match on fixed } - if (inx<0){ //NoMatch + if (inx<0) { //NoMatch x = w/hotBarD.dpi + hotBarMap(hotBarCurrStart).x; for ( inx=hotBarCurrStart; inx= hotBarMap(inx).x + fixed_x) && //leave spaces between buttons - (x <= hotBarMap(inx).x + hotBarMap(inx).w + fixed_x )) { - break; + (x <= hotBarMap(inx).x + hotBarMap(inx).w + fixed_x )) { + break; } } } - if (inx >= hotBarCurrEnd) + if (inx >= hotBarCurrEnd) { return; + } tbm = &hotBarMap(inx); if (inx==0) { px = (wWinPix_t)((tbm->x-hotBarMap(0).x)*hotBarD.dpi); @@ -316,8 +351,8 @@ static void SelectHotBar( wDraw_p d, void * context, wAction_t action, wDrawPix_ wControlSetBalloon( (wControl_p)hotBarD.d, px, -20, titleP ); switch (action & 0xff) { case wActionLDown: - pos.x = mainD.size.x+mainD.orig.x; - pos.y = mainD.size.y+mainD.orig.y; +// pos.x = mainD.size.x+mainD.orig.x; +// pos.y = mainD.size.y+mainD.orig.y; if ( hotBarCurrSelect >= 0 ) { //HotBarHighlight( hotBarCurrSelect ); hotBarCurrSelect = -1; @@ -328,7 +363,8 @@ static void SelectHotBar( wDraw_p d, void * context, wAction_t action, wDrawPix_ hotBarCurrSelect = inx; HotBarHighlight( hotBarCurrSelect, fixed_x ); if (recordF) { - fprintf( recordF, "HOTBARSELECT %s\n", tbm->proc( HB_FULLTITLE, tbm->context, NULL, NULL ) ); + fprintf( recordF, "HOTBARSELECT %s\n", tbm->proc( HB_FULLTITLE, tbm->context, + NULL, NULL ) ); } FakeDownMouseState(); break; @@ -348,25 +384,6 @@ static void SelectHotBar( wDraw_p d, void * context, wAction_t action, wDrawPix_ break; } break; - case wActionText: - switch (action >> 8) { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - DoHotBarJump( action >> 8 ); - break; - case 0x1B: - ConfirmReset(FALSE); - break; - } - break; } } @@ -375,34 +392,32 @@ EXPORT void HotBarCancel( void ) { if ( hotBarCurrSelect >= 0 ) //HotBarHighlight( hotBarCurrSelect ); - hotBarCurrSelect = -1; + { + hotBarCurrSelect = -1; + } RedrawHotBar(hotBarD.d, NULL, 0, 0 ); } static BOOL_T HotBarSelectPlayback( char * line ) { - int inx; - hotBarMap_t * tbm; - while (*line && isspace((unsigned char)*line) ) line++; - DIST_T fixed_x = 0; - for ( inx=0; inx0 && hotBarMap(0).isFixed) { - fixed_x = hotBarMap(0).w; - } + while (*line && isspace((unsigned char)*line) ) { line++; } + for ( int inx=0; inxproc( HB_FULLTITLE, tbm->context, NULL, NULL ), line) == 0) { - if ( hotBarCurrSelect >= 0 ) { - //HotBarHighlight( hotBarCurrSelect ); - RedrawHotBar(hotBarD.d, NULL, 0, 0 ); - } + tbm->proc( HB_SELECT, hotBarMap(inx).context, NULL, NULL ); hotBarCurrSelect = inx; if ( hotBarCurrSelect < hotBarCurrStart || hotBarCurrSelect > hotBarCurrEnd ) { + // Shift the hotbar so the selected object is visible hotBarCurrStart = hotBarCurrSelect; RedrawHotBar( hotBarD.d, NULL, 0, 0 ); } + DIST_T fixed_x = 0.0; + if ( inx > 0 && hotBarCurrStart > 0 && hotBarMap(0).isFixed ) { + // Leave room for Flex object + fixed_x = hotBarMap(0).w; + } HotBarHighlight( hotBarCurrSelect, fixed_x ); - hotBarMap(inx).proc( HB_SELECT, hotBarMap(inx).context, NULL, NULL ); FakeDownMouseState(); return TRUE; } @@ -427,58 +442,64 @@ static BOOL_T SetHotBarScale( char * line ) static char curContentsLabel[STR_SHORT_SIZE]; EXPORT void AddHotBarElement( - char * contentsLabel, - coOrd size, - coOrd orig, - BOOL_T isTrack, - BOOL_T isFixed, - DIST_T barScale, - void * context, - hotBarProc_t proc_p ) + char * contentsLabel, + coOrd size, + coOrd orig, + BOOL_T isTrack, + BOOL_T isFixed, + DIST_T barScale, + void * context, + hotBarProc_t proc_p ) { hotBarMap_t * tbm; coOrd textsize; - if ( contentsLabel && strncmp(contentsLabel, curContentsLabel, sizeof curContentsLabel) != 0 && !isFixed ) { - wMenuListAdd( hotBarML, hotBarMLcnt++, contentsLabel, I2VP(hotBarMap_da.cnt) ); - strncpy( curContentsLabel, contentsLabel, sizeof curContentsLabel ); - } - if (barScale <= 0) { - if (!isTrack) - barScale = size.y/(((double)hotBarHeight-2.0)/hotBarD.dpi); - else if (isTrack) { - // size.y += 2.0 * trackGauge; - barScale = (trackGauge>0.1)?trackGauge*(36-hotBarHeight/2):10.0; - // barScale = 2.0 / ((hotBarHeight-2.0) / hotBarD.dpi); - //if (size.y >= size.x) - if (size.y/barScale > ((double)hotBarHeight-2.0)/hotBarD.dpi) - barScale = (size.y+2.0*trackGauge)/(((double)hotBarHeight-2.0)/hotBarD.dpi); + if ( contentsLabel + && strncmp(contentsLabel, curContentsLabel, sizeof curContentsLabel) != 0 + && !isFixed ) { + wMenuListAdd( hotBarML, hotBarMLcnt++, contentsLabel, I2VP(hotBarMap_da.cnt) ); + strncpy( curContentsLabel, contentsLabel, sizeof(curContentsLabel)-1 ); + } + if (barScale <= 0) { + if (!isTrack) { + barScale = size.y/(((double)hotBarHeight-2.0)/hotBarD.dpi); + } else if (isTrack) { + // size.y += 2.0 * trackGauge; + barScale = (trackGauge>0.1)?trackGauge*(36-hotBarHeight/2):10.0; + // barScale = 2.0 / ((hotBarHeight-2.0) / hotBarD.dpi); + //if (size.y >= size.x) + if (size.y/barScale > ((double)hotBarHeight-2.0)/hotBarD.dpi) { + barScale = (size.y+2.0*trackGauge)/(((double)hotBarHeight-2.0)/hotBarD.dpi); } - // orig.y += 1.0/hotBarD.dpi; } - DYNARR_APPEND( hotBarMap_t, hotBarMap_da, 10 ); - tbm = &hotBarMap(hotBarMap_da.cnt-1); - if (barScale < 1) - barScale = 1; - if (size.x > barScale) - barScale = size.x; - tbm->context = context; - tbm->size = size; - tbm->orig = orig; - tbm->proc = proc_p; - tbm->barScale = barScale; - tbm->isFixed = isFixed; - tbm->w = tbm->objectW = size.x/barScale + 5.0/hotBarD.dpi; - tbm->labelW = 0; - tbm->x = hotBarWidth; - if ( hotBarLabels ) { - DrawTextSize( &hotBarD, proc_p( HB_BARTITLE, context, NULL, NULL), hotBarFp, hotBarFs, FALSE, &textsize ); - tbm->labelW = textsize.x+5/hotBarD.dpi; - if ( tbm->labelW > tbm->w ) { - tbm->w = tbm->labelW; - } + // orig.y += 1.0/hotBarD.dpi; + } + DYNARR_APPEND( hotBarMap_t, hotBarMap_da, 10 ); + tbm = &hotBarMap(hotBarMap_da.cnt-1); + if (barScale < 1) { + barScale = 1; + } + if (size.x > barScale) { + barScale = size.x; + } + tbm->context = context; + tbm->size = size; + tbm->orig = orig; + tbm->proc = proc_p; + tbm->barScale = barScale; + tbm->isFixed = isFixed; + tbm->w = tbm->objectW = size.x/barScale + 5.0/hotBarD.dpi; + tbm->labelW = 0; + tbm->x = hotBarWidth; + if ( hotBarLabels ) { + DrawTextSize( &hotBarD, proc_p( HB_BARTITLE, context, NULL, NULL), hotBarFp, + hotBarFs, FALSE, &textsize ); + tbm->labelW = textsize.x+5/hotBarD.dpi; + if ( tbm->labelW > tbm->w ) { + tbm->w = tbm->labelW; } - hotBarWidth += tbm->w + 2/hotBarD.dpi; + } + hotBarWidth += tbm->w + 2/hotBarD.dpi; } @@ -490,10 +511,12 @@ static void ChangeHotBar( long changes ) #endif static long programModeOld = 0; - if ( (changes&(CHANGE_SCALE|CHANGE_PARAMS|CHANGE_TOOLBAR)) == 0 ) + if ( (changes&(CHANGE_SCALE|CHANGE_PARAMS|CHANGE_TOOLBAR)) == 0 ) { return; - if ( hotBarLabels && !hotBarFp ) + } + if ( hotBarLabels && !hotBarFp ) { hotBarFp = wStandardFont( F_HELV, FALSE, FALSE ); + } if (hotBarLeftB != NULL && curScaleName) { hotBarWidth = 0.0; hotBarMLcnt = 0; @@ -501,8 +524,9 @@ static void ChangeHotBar( long changes ) DYNARR_RESET( hotBarMap_t, hotBarMap_da ); curContentsLabel[0] = '\0'; if ( programMode == MODE_DESIGN ) { - if (showFlexTrack) + if (showFlexTrack) { AddHotBarCornu(); + } AddHotBarTurnouts(); AddHotBarStructures(); } else { @@ -513,8 +537,10 @@ static void ChangeHotBar( long changes ) hotBarCurrSelects[0] = hotBarCurrSelects[1] = -1; programModeOld = programMode; } - if (hotBarMap_da.cnt > 0 && (hotBarCurrStart >= hotBarMap_da.cnt||hotBarCurrStart < 0)) + if (hotBarMap_da.cnt > 0 && (hotBarCurrStart >= hotBarMap_da.cnt + ||hotBarCurrStart < 0)) { hotBarCurrStart = 0; + } RedrawHotBar( NULL, NULL, 0, 0 ); } } @@ -542,28 +568,25 @@ EXPORT void LayoutHotBar( void * redraw ) BOOL_T initialize = FALSE; wWinGetSize( mainW, &winWidth, &winHeight ); - /** @prefs [Preference] LargeIcons=1.5 Sets Icon scaling limits 1.0 to 2.0 */ - double scaleicon; - wPrefGetFloat(PREFSECTION, LARGEICON, &scaleicon, 1.0); - if (scaleicon<1.0) scaleicon=1.0; - if (scaleicon>2.0) scaleicon=2.0; - //if (scaleicon>1.0) { - // hotBarHeight = (wWinPix_t)(hotBarHeight); - //} - hotBarTextHeight = (wWinPix_t)round(wMessageGetHeight(0L) * (0.5 + (double)iconSize / 10.0)); + hotBarTextHeight = (wWinPix_t)round(wMessageGetHeight(0L) * (0.6 + 0.4 * + (double)iconSize)); if ( hotBarLabels) { - hbHeight += hotBarTextHeight; + hbHeight += hotBarTextHeight; } if (hotBarLeftB == NULL) { wIcon_p bm_p; - if (winWidth < 50) + if (winWidth < 50) { return; + } bm_p = wIconCreateBitMap( 16, 16, turnbarl_bits, wDrawColorBlack ); - hotBarLeftB = wButtonCreate( mainW, 0, 0, "hotBarLeft", (char*)bm_p, BO_ICON|BO_REPEAT, 0, DoHotBarLeft, NULL ); + hotBarLeftB = wButtonCreate( mainW, 0, 0, "hotBarLeft", (char*)bm_p, + BO_ICON|BO_REPEAT, 0, DoHotBarLeft, NULL ); bm_p = wIconCreateBitMap( 16, 16, turnbarr_bits, wDrawColorBlack ); - hotBarRightB = wButtonCreate( mainW, 0, 0, "hotBarRight", (char*)bm_p, BO_ICON|BO_REPEAT, 0, DoHotBarRight, NULL ); - hotBarD.d = wDrawCreate( mainW, 0, 0, NULL, BD_NOCAPTURE|BD_NOFOCUS, 100, hbHeight, NULL, RedrawHotBar, SelectHotBar ); + hotBarRightB = wButtonCreate( mainW, 0, 0, "hotBarRight", (char*)bm_p, + BO_ICON|BO_REPEAT, 0, DoHotBarRight, NULL ); + hotBarD.d = wDrawCreate( mainW, 0, 0, NULL, 0, 100, + hbHeight, NULL, RedrawHotBar, SelectHotBar ); hotBarD.dpi = wDrawGetDPI( hotBarD.d ); hotBarD.scale = 1.0; wSetCursor(hotBarD.d,wCursorNormal); @@ -571,19 +594,25 @@ EXPORT void LayoutHotBar( void * redraw ) } buttonWidth = wControlGetWidth((wControl_p)hotBarLeftB); buttonHeight = wControlGetHeight((wControl_p)hotBarLeftB); - wControlSetPos( (wControl_p)hotBarLeftB, HOTBAR_LEFT, toolbarHeight+(hbHeight-buttonHeight)/2 ); - wControlSetPos( (wControl_p)hotBarRightB, winWidth-20-buttonWidth+HOTBAR_LEFT+1, toolbarHeight+(hbHeight-buttonHeight)/2 ); - wControlSetPos( (wControl_p)hotBarD.d, buttonWidth+HOTBAR_LEFT+1, toolbarHeight ); + wControlSetPos( (wControl_p)hotBarLeftB, HOTBAR_LEFT, + toolbarHeight+(hbHeight-buttonHeight)/2 ); + wControlSetPos( (wControl_p)hotBarRightB, winWidth-20-buttonWidth+HOTBAR_LEFT+1, + toolbarHeight+(hbHeight-buttonHeight)/2 ); + wControlSetPos( (wControl_p)hotBarD.d, buttonWidth+HOTBAR_LEFT+1, + toolbarHeight ); wDrawSetSize( hotBarD.d, winWidth-20-buttonWidth*2, hbHeight+2, redraw ); - hotBarD.size.x = ((double)(winWidth-20-buttonWidth*2))/hotBarD.dpi*hotBarD.scale; - hotBarD.size.y = (double)hotBarHeight/hotBarD.dpi*hotBarD.scale; //Exclude Label from calc + hotBarD.size.x = ((double)(winWidth-20 + -buttonWidth*2))/hotBarD.dpi*hotBarD.scale; + hotBarD.size.y = (double) + hotBarHeight/hotBarD.dpi*hotBarD.scale; //Exclude Label from calc wControlShow( (wControl_p)hotBarLeftB, TRUE ); wControlShow( (wControl_p)hotBarRightB, TRUE ); wControlShow( (wControl_p)hotBarD.d, TRUE ); - if (initialize) + if (initialize) { ChangeHotBar( CHANGE_PARAMS ); - else if (!redraw) + } else if (!redraw) { RedrawHotBar( NULL, NULL, 0, 0 ); + } toolbarHeight += hbHeight+3; } diff --git a/app/bin/cjoin.c b/app/bin/cjoin.c index a027327..cb794bd 100644 --- a/app/bin/cjoin.c +++ b/app/bin/cjoin.c @@ -20,7 +20,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -40,30 +40,30 @@ static BOOL_T debug = 0; /** @logcmd @showrefby join=n cjoin.c */ static int log_join = 0; typedef struct { - curveType_e type; - BOOL_T flip; - coOrd arcP; - DIST_T arcR; - ANGLE_T arcA0, arcA1; - coOrd pos[2]; - } joinRes_t; + curveType_e type; + BOOL_T flip; + coOrd arcP; + DIST_T arcR; + ANGLE_T arcA0, arcA1; + coOrd pos[2]; +} joinRes_t; static struct { - STATE_T state; - int joinMoveState; - BOOL_T cornuMode; - struct { - TRKTYP_T realType; - track_p trk; - coOrd pos; - EPINX_T ep; - trackParams_t params; - } inp[2]; - joinRes_t jRes; - coOrd inp_pos[2]; - easementData_t jointD[2]; - dynArr_t anchors; - } Dj; + STATE_T state; + int joinMoveState; + BOOL_T cornuMode; + struct { + TRKTYP_T realType; + track_p trk; + coOrd pos; + EPINX_T ep; + trackParams_t params; + } inp[2]; + joinRes_t jRes; + coOrd inp_pos[2]; + easementData_t jointD[2]; + dynArr_t anchors; +} Dj; /***************************************************************************** @@ -74,11 +74,11 @@ static struct { static BOOL_T JoinWithStraight( - coOrd pos0, - ANGLE_T a0, - coOrd pos1, - ANGLE_T a1, - joinRes_t * res ) + coOrd pos0, + ANGLE_T a0, + coOrd pos1, + ANGLE_T a1, + joinRes_t * res ) /* * Determine a track from a point and angle (pos1,a1) to * a straight (given by an origin and angle: pos0, a0) @@ -92,17 +92,17 @@ static BOOL_T JoinWithStraight( DOUBLE_T beyond; b = NormalizeAngle( a0 - a1 ); -LOG( log_join, 2, ( - "JwL: pos0=[%0.3f %0.3f] a0=%0.3f pos1=[%0.3f %0.3f] a1=%0.3f b=%0.3f\n", - pos0.x, pos0.y, a0, pos1.x, pos1.y, a1, b ) ) + LOG( log_join, 2, ( + "JwL: pos0=[%0.3f %0.3f] a0=%0.3f pos1=[%0.3f %0.3f] a1=%0.3f b=%0.3f\n", + pos0.x, pos0.y, a0, pos1.x, pos1.y, a1, b ) ) -/* 3 - cases: */ + /* 3 - cases: */ if (b >= 360.0-connectAngle/2.0 || b <= connectAngle/2.0) { -/* CASE 1: antiparallel */ + /* CASE 1: antiparallel */ FindPos( &off, NULL, pos1, pos0, a0, DIST_INF ); res->arcR = off.y/2.0; res->arcA1 = 180.0; -LOG( log_join, 3, ("JwL: parallel: off.y=%0.3f\n", off.y ) ) + LOG( log_join, 3, ("JwL: parallel: off.y=%0.3f\n", off.y ) ) res->arcA0 = NormalizeAngle( a1 - 90.0 ); Translate( &res->arcP, pos1, res->arcA0, res->arcR ); if (res->arcR > 0.0) { @@ -112,14 +112,15 @@ LOG( log_join, 3, ("JwL: parallel: off.y=%0.3f\n", off.y ) ) res->flip = 1; } } else if (b >= 180.0-connectAngle/2.0 && b <= 180.0+connectAngle/2.0) { -/* CASE 2: parallel, possibly colinear? */ + /* CASE 2: parallel, possibly colinear? */ FindPos( &off, &beyond, pos0, pos1, a0, DIST_INF ); -LOG( log_join, 3, ("JwL: colinear? off.y=%0.3f\n", off.y ) ) + LOG( log_join, 3, ("JwL: colinear? off.y=%0.3f\n", off.y ) ) if (off.y > -connectDistance && off.y < connectDistance) { res->type = curveTypeStraight; res->pos[0]=pos0; res->pos[1]=pos1; -LOG( log_join, 2, (" = STRAIGHT [%0.3f %0.3f] [%0.3f %0.3f]\n", pos0.x, pos0.y, pos1.x, pos1.y ) ) + LOG( log_join, 2, (" = STRAIGHT [%0.3f %0.3f] [%0.3f %0.3f]\n", pos0.x, + pos0.y, pos1.x, pos1.y ) ) return TRUE; } else { res->type = curveTypeNone; @@ -127,7 +128,7 @@ LOG( log_join, 2, (" = STRAIGHT [%0.3f %0.3f] [%0.3f %0.3f]\n", pos0.x, pos0. return TRUE; } } else { -/* CASE 3: intersecting */ + /* CASE 3: intersecting */ if (!FindIntersection( &Px, pos0, a0, pos1, a1 )) { res->type = curveTypeNone; ErrorMessage( MSG_SELECTED_TRACKS_PARALLEL ); @@ -136,13 +137,16 @@ LOG( log_join, 2, (" = STRAIGHT [%0.3f %0.3f] [%0.3f %0.3f]\n", pos0.x, pos0. d = FindDistance( pos1, Px ); k = NormalizeAngle( FindAngle(pos1, Px) - a1 ); c = (b > 180.0) ? (360.0-b) : b; - if (k < 90.0 && k > 270.0) + if (k < 90.0 && k > 270.0) { c += 180.0; -LOG( log_join, 3, (" Px=[%0.3f %0.3f] b=%0.3f c=%0.3f d=%0.3f k=%0.3f\n", Px.x, Px.y, b, c, d, k ) ) + } + LOG( log_join, 3, (" Px=[%0.3f %0.3f] b=%0.3f c=%0.3f d=%0.3f k=%0.3f\n", + Px.x, Px.y, b, c, d, k ) ) res->arcR = d * sin(D2R(c/2.0))/cos(D2R(c/2.0)); res->arcA1 = 180.0-c; - if (90.0arcA1 = 360.0 - res->arcA1; + if (90.0arcA1 = 360.0 - res->arcA1; + } if ( (res->arcA1>180.0) == (b>180.0) ) { Translate( &res->arcP, pos1, a1-90.0, res->arcR ); res->arcA0 = NormalizeAngle( a0 - 90.0 ); @@ -153,73 +157,78 @@ LOG( log_join, 3, (" Px=[%0.3f %0.3f] b=%0.3f c=%0.3f d=%0.3f k=%0.3f\n", Px res->flip = TRUE; } } -LOG( log_join, 2, (" = CURVE @ Pc=[%0.3f %0.3f] R=%0.3f A0=%0.3f A1=%0.3f Flip=%d\n", - res->arcP.x, res->arcP.y, res->arcR, res->arcA0, res->arcA1, res->flip ) ) - if (res->arcR<0.0) res->arcR = - res->arcR; + LOG( log_join, 2, + (" = CURVE @ Pc=[%0.3f %0.3f] R=%0.3f A0=%0.3f A1=%0.3f Flip=%d\n", + res->arcP.x, res->arcP.y, res->arcR, res->arcA0, res->arcA1, res->flip ) ) + if (res->arcR<0.0) { res->arcR = - res->arcR; } res->type = curveTypeCurve; d = D2R(res->arcA1); - if (d < 0.0) + if (d < 0.0) { d = 2*M_PI + d; + } if (!debug) InfoMessage( _("Curved Track: Radius=%s Length=%s"), - FormatDistance(res->arcR), FormatDistance(res->arcR*d) ); + FormatDistance(res->arcR), FormatDistance(res->arcR*d) ); return TRUE; } static BOOL_T JoinWithCurve( - coOrd pos0, - DIST_T r0, - EPINX_T ep0, - coOrd pos1, - ANGLE_T a1, /* Angle perpendicular to track at (pos1) */ - joinRes_t * res ) + coOrd pos0, + DIST_T r0, + EPINX_T ep0, + coOrd pos1, + ANGLE_T a1, /* Angle perpendicular to track at (pos1) */ + joinRes_t * res ) /* * Determine a track point and angle (pos1,a1) to * a curve (given by center and radius (pos0, r0). * Curve endPt (ep0) determines whether the connection is * clockwise or counterclockwise. - */ + */ { coOrd p1, pt; DIST_T d, r; ANGLE_T a, aa, A0, A1; -/* Compute angle of line connecting endPoints: */ + /* Compute angle of line connecting endPoints: */ Translate( &p1, pos1, a1, -r0 ); aa = FindAngle( p1, pos0 ); a = NormalizeAngle( aa - a1 ); -LOG( log_join, 2, ("JwA: pos0=[%0.3f %0.3f] r0=%0.3f ep0=%d pos1=[%0.3f %0.3f] a1=%0.3f\n", - pos0.x, pos0.y, r0, ep0, pos1.x, pos1.y, a1 ) ) -LOG( log_join, 3, (" p1=[%0.3f %0.3f] aa=%0.3f a=%0.3f\n", - p1.x, p1.y, aa, a ) ) + LOG( log_join, 2, + ("JwA: pos0=[%0.3f %0.3f] r0=%0.3f ep0=%d pos1=[%0.3f %0.3f] a1=%0.3f\n", + pos0.x, pos0.y, r0, ep0, pos1.x, pos1.y, a1 ) ) + LOG( log_join, 3, (" p1=[%0.3f %0.3f] aa=%0.3f a=%0.3f\n", + p1.x, p1.y, aa, a ) ) if ( (ep0==1 && a > 89.5 && a < 90.5) || - (ep0==0 && a > 269.5 && a < 270.5) ) { -/* The long way around! */ + (ep0==0 && a > 269.5 && a < 270.5) ) { + /* The long way around! */ ErrorMessage( MSG_CURVE_TOO_LARGE ); res->type = curveTypeNone; } else if ( (ep0==0 && a > 89.5 && a < 90.5) || - (ep0==1 && a > 269.5 && a < 270.5) ) { -/* Straight: */ + (ep0==1 && a > 269.5 && a < 270.5) ) { + /* Straight: */ PointOnCircle( &pt, pos0, r0, a1); -LOG( log_join, 2, (" = STRAIGHT [%0.3f %0.3f] [%0.3f %0.3f]\n", pt.x, pt.y, pos1.x, pos1.y ) ) + LOG( log_join, 2, (" = STRAIGHT [%0.3f %0.3f] [%0.3f %0.3f]\n", pt.x, pt.y, + pos1.x, pos1.y ) ) if (!debug) InfoMessage( _("Straight Track: Length=%s Angle=%0.3f"), - FormatDistance(FindDistance( pt, pos1 )), PutAngle(FindAngle( pt, pos1 )) ); + FormatDistance(FindDistance( pt, pos1 )), PutAngle(FindAngle( pt, pos1 )) ); res->type = curveTypeStraight; res->pos[0]=pt; res->pos[1]=pos1; res->flip = FALSE; } else { -/* Curve: */ + /* Curve: */ d = FindDistance( p1, pos0 ) / 2.0; r = d/cos(D2R(a)); Translate( &res->arcP, p1, a1, r ); res->arcR = r-r0; -LOG( log_join, 3, (" Curved d=%0.3f C=[%0.3f %0.3f], r=%0.3f a=%0.3f arcR=%0.3f\n", - d, res->arcP.x, res->arcP.y, r, a, res->arcR ) ) + LOG( log_join, 3, + (" Curved d=%0.3f C=[%0.3f %0.3f], r=%0.3f a=%0.3f arcR=%0.3f\n", + d, res->arcP.x, res->arcP.y, r, a, res->arcR ) ) if ( (ep0==0) == (res->arcR<0) ) { A1 = 180 + 2*a; A0 = a1; @@ -243,12 +252,14 @@ LOG( log_join, 3, (" Curved d=%0.3f C=[%0.3f %0.3f], r=%0.3f a=%0.3f arcR=%0 return TRUE; } -LOG( log_join, 3, (" A0=%0.3f A1=%0.3f R=%0.3f\n", res->arcA0, res->arcA1, res->arcR ) ) + LOG( log_join, 3, (" A0=%0.3f A1=%0.3f R=%0.3f\n", res->arcA0, res->arcA1, + res->arcR ) ) d = D2R(res->arcA1); - if (d < 0.0) + if (d < 0.0) { d = 2*M_PI + d; + } if (!debug) InfoMessage( _("Curved Track: Radius=%s Length=%s Angle=%0.3f"), - FormatDistance(res->arcR), FormatDistance(res->arcR*d), PutAngle(res->arcA1) ); + FormatDistance(res->arcR), FormatDistance(res->arcR*d), PutAngle(res->arcA1) ); res->type = curveTypeCurve; } return TRUE; @@ -262,10 +273,10 @@ LOG( log_join, 3, (" A0=%0.3f A1=%0.3f R=%0.3f\n", res->arcA0, res->arcA1, static STATUS_T AdjustJoint( - BOOL_T adjust, - ANGLE_T a1, - DIST_T eR[2], - ANGLE_T normalAngle ) + BOOL_T adjust, + ANGLE_T a1, + DIST_T eR[2], + ANGLE_T normalAngle ) /* * Compute how to join 2 tracks and then compute the transition-curve * from the 2 tracks to the joint. @@ -285,38 +296,42 @@ static STATUS_T AdjustJoint( coOrd pc; DIST_T eRc; DIST_T l, d=0; - - if (adjust) + + if (adjust) { Translate( &p1, Dj.inp[1].pos, a1, Dj.jointD[1].x ); - else + } else { p1 = Dj.inp[1].pos; + } switch ( Dj.inp[0].params.type ) { case curveTypeCurve: if (adjust) { a0 = FindAngle( Dj.inp[0].params.arcP, Dj.jRes.pos[0] ); Translate( &pc, Dj.inp[0].params.arcP, a0, Dj.jointD[0].x ); -LOG( log_join, 2, (" Move P0 X%0.3f A%0.3f P1 X%0.3f A%0.3f SC%d FL%d\n", - Dj.jointD[0].x, a0, Dj.jointD[1].x, a1, - Dj.jointD[0].Scurve, Dj.jointD[0].flip ) ) + LOG( log_join, 2, (" Move P0 X%0.3f A%0.3f P1 X%0.3f A%0.3f SC%d FL%d\n", + Dj.jointD[0].x, a0, Dj.jointD[1].x, a1, + Dj.jointD[0].Scurve, Dj.jointD[0].flip ) ) } else { pc = Dj.inp[0].params.arcP; } if (!JoinWithCurve( pc, Dj.inp[0].params.arcR, - Dj.inp[0].params.ep, p1, normalAngle, &Dj.jRes )) + Dj.inp[0].params.ep, p1, normalAngle, &Dj.jRes )) { return FALSE; + } break; case curveTypeStraight: if (adjust) { a0 = Dj.inp[0].params.angle + (Dj.jointD[0].negate?-90.0:+90.0); Translate( &p0, Dj.inp[0].params.lineOrig, a0, Dj.jointD[0].x ); -LOG( log_join, 2, (" Move P0 X%0.3f A%0.3f P1 X%0.3f A%0.3f\n", - Dj.jointD[0].x, a0, Dj.jointD[1].x, a1 ) ) + LOG( log_join, 2, (" Move P0 X%0.3f A%0.3f P1 X%0.3f A%0.3f\n", + Dj.jointD[0].x, a0, Dj.jointD[1].x, a1 ) ) } else { p0 = Dj.inp[0].params.lineOrig; } - if (!JoinWithStraight( p0, Dj.inp[0].params.angle, p1, Dj.inp[1].params.angle, &Dj.jRes )) + if (!JoinWithStraight( p0, Dj.inp[0].params.angle, p1, Dj.inp[1].params.angle, + &Dj.jRes )) { return FALSE; + } break; default: break; @@ -328,13 +343,15 @@ LOG( log_join, 2, (" Move P0 X%0.3f A%0.3f P1 X%0.3f A%0.3f\n", if (Dj.jRes.type == curveTypeCurve) { eRc = Dj.jRes.arcR; - if (Dj.jRes.flip==1) + if (Dj.jRes.flip==1) { eRc = -eRc; - } else + } + } else { eRc = 0.0; + } if ( ComputeJoint( eR[0], eRc, &Dj.jointD[0] ) == E_ERROR || - ComputeJoint( -eR[1], -eRc, &Dj.jointD[1] ) == E_ERROR ) { + ComputeJoint( -eR[1], -eRc, &Dj.jointD[1] ) == E_ERROR ) { return FALSE; } @@ -343,9 +360,9 @@ LOG( log_join, 2, (" Move P0 X%0.3f A%0.3f P1 X%0.3f A%0.3f\n", if (Dj.inp[inx].params.type == curveTypeStraight ) { d = FindDistance( Dj.inp[inx].params.lineOrig, Dj.inp_pos[inx] ); if (d < Dj.jointD[inx].d0) { - InfoMessage( _("Track (%d) is too short for transition-curve by %0.3f"), - GetTrkIndex(Dj.inp[inx].trk), - PutDim(fabs(Dj.jointD[inx].d0-d)) ); + InfoMessage( _("Track (%d) is too short for transition-curve by %0.3f"), + GetTrkIndex(Dj.inp[inx].trk), + PutDim(fabs(Dj.jointD[inx].d0-d)) ); return FALSE; } } @@ -360,20 +377,23 @@ LOG( log_join, 2, (" Move P0 X%0.3f A%0.3f P1 X%0.3f A%0.3f\n", } d -= l; if ( d <= minLength ) { - if (!debug) - InfoMessage( _("Connecting track is too short by %0.3f"), PutDim(fabs(minLength-d)) ); + if (!debug) { + InfoMessage( _("Connecting track is too short by %0.3f"), + PutDim(fabs(minLength-d)) ); + } return FALSE; } if (Dj.jRes.type == curveTypeCurve) { PointOnCircle( &Dj.jRes.pos[Dj.jRes.flip], Dj.jRes.arcP, - Dj.jRes.arcR, Dj.jRes.arcA0 ); + Dj.jRes.arcR, Dj.jRes.arcA0 ); PointOnCircle( &Dj.jRes.pos[1-Dj.jRes.flip], Dj.jRes.arcP, - Dj.jRes.arcR, Dj.jRes.arcA0+Dj.jRes.arcA1 ); + Dj.jRes.arcR, Dj.jRes.arcA0+Dj.jRes.arcA1 ); } - if (adjust) + if (adjust) { Translate( &Dj.inp_pos[0], Dj.jRes.pos[0], a0+180.0, Dj.jointD[0].x ); + } return TRUE; } @@ -381,76 +401,83 @@ LOG( log_join, 2, (" Move P0 X%0.3f A%0.3f P1 X%0.3f A%0.3f\n", static STATUS_T DoMoveToJoin( coOrd pos ) { - if ( selectedTrackCount <= 0 ) { - ErrorMessage( MSG_NO_SELECTED_TRK ); - return C_CONTINUE; - } - if ( (Dj.inp[Dj.joinMoveState].trk = OnTrack( &pos, TRUE, TRUE )) == NULL ) - return C_CONTINUE; - // if (Dj.joinMoveState == 0 && !CheckTrackLayerSilent( Dj.inp[Dj.joinMoveState].trk ) ) - // return C_CONTINUE; - Dj.inp[Dj.joinMoveState].params.ep = PickUnconnectedEndPoint( pos, Dj.inp[Dj.joinMoveState].trk ); /* CHECKME */ - if ( Dj.inp[Dj.joinMoveState].params.ep == -1 ) { + if ( selectedTrackCount <= 0 ) { + ErrorMessage( MSG_NO_SELECTED_TRK ); + return C_CONTINUE; + } + if ( (Dj.inp[Dj.joinMoveState].trk = OnTrack( &pos, TRUE, TRUE )) == NULL ) { + return C_CONTINUE; + } + // if (Dj.joinMoveState == 0 && !CheckTrackLayerSilent( Dj.inp[Dj.joinMoveState].trk ) ) + // return C_CONTINUE; + Dj.inp[Dj.joinMoveState].params.ep = PickUnconnectedEndPoint( pos, + Dj.inp[Dj.joinMoveState].trk ); /* CHECKME */ + if ( Dj.inp[Dj.joinMoveState].params.ep == -1 ) { #ifdef LATER - ErrorMessage( MSG_NO_ENDPTS ); + ErrorMessage( MSG_NO_ENDPTS ); #endif - return C_CONTINUE; - } + return C_CONTINUE; + } #ifdef LATER - if ( GetTrkEndTrk( Dj.inp[Dj.joinMoveState].trk, Dj.inp[Dj.joinMoveState].params.ep ) ) { - ErrorMessage( MSG_SEL_EP_CONN ); - return C_CONTINUE; - } + if ( GetTrkEndTrk( Dj.inp[Dj.joinMoveState].trk, + Dj.inp[Dj.joinMoveState].params.ep ) ) { + ErrorMessage( MSG_SEL_EP_CONN ); + return C_CONTINUE; + } #endif - if (Dj.joinMoveState == 0) { - Dj.joinMoveState++; - InfoMessage( GetTrkSelected(Dj.inp[0].trk)? - _("Click on an unselected End-Point"): - _("Click on a selected End-Point") ); - Dj.inp[0].pos = pos; - return C_CONTINUE; - } - if ( GetTrkSelected(Dj.inp[0].trk) == GetTrkSelected(Dj.inp[1].trk) ) { - ErrorMessage( MSG_2ND_TRK_NOT_SEL_UNSEL, GetTrkSelected(Dj.inp[0].trk) - ? _("unselected") : _("selected") ); - return C_CONTINUE; - } - if (GetTrkSelected(Dj.inp[0].trk)) - MoveToJoin( Dj.inp[0].trk, Dj.inp[0].params.ep, Dj.inp[1].trk, Dj.inp[1].params.ep ); - else - MoveToJoin( Dj.inp[1].trk, Dj.inp[1].params.ep, Dj.inp[0].trk, Dj.inp[0].params.ep ); - Dj.joinMoveState = 0; - return C_TERMINATE; + if (Dj.joinMoveState == 0) { + Dj.joinMoveState++; + InfoMessage( GetTrkSelected(Dj.inp[0].trk)? + _("Click on an unselected End-Point"): + _("Click on a selected End-Point") ); + Dj.inp[0].pos = pos; + return C_CONTINUE; + } + if ( GetTrkSelected(Dj.inp[0].trk) == GetTrkSelected(Dj.inp[1].trk) ) { + ErrorMessage( MSG_2ND_TRK_NOT_SEL_UNSEL, GetTrkSelected(Dj.inp[0].trk) + ? _("unselected") : _("selected") ); + return C_CONTINUE; + } + if (GetTrkSelected(Dj.inp[0].trk)) { + MoveToJoin( Dj.inp[0].trk, Dj.inp[0].params.ep, Dj.inp[1].trk, + Dj.inp[1].params.ep ); + } else { + MoveToJoin( Dj.inp[1].trk, Dj.inp[1].params.ep, Dj.inp[0].trk, + Dj.inp[0].params.ep ); + } + Dj.joinMoveState = 0; + return C_TERMINATE; } typedef enum {NO_LINE,FIRST_END,HAVE_LINE,HAVE_SECOND_LINE} LineState_t; static struct { - LineState_t line_state; - int joinMoveState; - track_p curr_line; - struct { - TRKTYP_T realType; - track_p line; - coOrd pos; - coOrd end; - int cnt; - } inp[2]; - joinRes_t jRes; - coOrd inp_pos[2]; - dynArr_t anchors_da; - trackParams_t params; - dynArr_t newLine; - } Dl; + LineState_t line_state; + int joinMoveState; + track_p curr_line; + struct { + TRKTYP_T realType; + track_p line; + coOrd pos; + coOrd end; + int cnt; + } inp[2]; + joinRes_t jRes; + coOrd inp_pos[2]; + dynArr_t anchors_da; + trackParams_t params; + dynArr_t newLine; +} Dl; #define anchors(N) DYNARR_N(trkSeg_t,Dl.anchors_da,N) -void AddAnchorEnd(coOrd p) { +void AddAnchorEnd(coOrd p) +{ DIST_T d = tempD.scale*0.15; DYNARR_APPEND(trkSeg_t,Dl.anchors_da,1); trkSeg_p a = &DYNARR_LAST(trkSeg_t,Dl.anchors_da); a->type = SEG_CRVLIN; - a->width = 0; + a->lineWidth = 0; a->u.c.a0 = 0.0; a->u.c.a1 = 360.0; a->u.c.center = p; @@ -460,8 +487,8 @@ void AddAnchorEnd(coOrd p) { static STATUS_T CmdJoinLine( - wAction_t action, - coOrd pos ) + wAction_t action, + coOrd pos ) /* * Join 2 lines. */ @@ -472,7 +499,7 @@ static STATUS_T CmdJoinLine( InfoMessage( _("Left click - Select first draw object end") ); Dl.line_state = NO_LINE; Dl.joinMoveState = 0; - tempSegs_da.cnt = 0; + DYNARR_RESET( trkSeg_t, tempSegs_da ); DYNARR_RESET(trkSeg_t,Dl.newLine); Dl.curr_line = NULL; SetAllTrackSelect( FALSE ); @@ -482,7 +509,7 @@ static STATUS_T CmdJoinLine( Dl.curr_line = NULL; coOrd pos1= pos; Dl.curr_line = OnTrack( &pos1, FALSE, FALSE ); - if (!Dl.curr_line) return C_CONTINUE; + if (!Dl.curr_line) { return C_CONTINUE; } if (IsTrack(Dl.curr_line)) { Dl.curr_line = NULL; return C_CONTINUE; @@ -496,8 +523,8 @@ static STATUS_T CmdJoinLine( return C_CONTINUE; } if ( (Dl.line_state != NO_LINE) && - (Dl.inp[0].line == Dl.curr_line) && - (IsClose(FindDistance(Dl.inp[0].pos,Dl.params.lineOrig)) ) ) { + (Dl.inp[0].line == Dl.curr_line) && + (IsClose(FindDistance(Dl.inp[0].pos,Dl.params.lineOrig)) ) ) { Dl.curr_line = NULL; } else { AddAnchorEnd(Dl.params.lineOrig); @@ -512,8 +539,8 @@ static STATUS_T CmdJoinLine( InfoMessage( _("Not a line - Try again") ); return C_CONTINUE; } - if (!QueryTrack(Dl.curr_line,Q_GET_NODES)) return C_CONTINUE; - if (!GetTrackParams(PARAMS_NODES,Dl.curr_line,pos,&Dl.params)) return C_CONTINUE; + if (!QueryTrack(Dl.curr_line,Q_GET_NODES)) { return C_CONTINUE; } + if (!GetTrackParams(PARAMS_NODES,Dl.curr_line,pos,&Dl.params)) { return C_CONTINUE; } Dl.line_state = HAVE_LINE; Dl.inp[0].line = Dl.curr_line; Dl.inp[0].pos = Dl.params.lineOrig; @@ -522,20 +549,23 @@ static STATUS_T CmdJoinLine( DYNARR_LAST(trkSeg_t,Dl.newLine).type = SEG_POLY; DYNARR_LAST(trkSeg_t,Dl.newLine).color = wDrawColorBlack; - DYNARR_LAST(trkSeg_t,Dl.newLine).width = 0; + DYNARR_LAST(trkSeg_t,Dl.newLine).lineWidth = 0; DYNARR_LAST(trkSeg_t,Dl.newLine).u.p.polyType = POLYLINE; - DYNARR_LAST(trkSeg_t,Dl.newLine).u.p.pts = MyMalloc(sizeof(pts_t)*Dl.params.nodes.cnt); + DYNARR_LAST(trkSeg_t,Dl.newLine).u.p.pts = MyMalloc(sizeof( + pts_t)*Dl.params.nodes.cnt); DYNARR_LAST(trkSeg_t,Dl.newLine).u.p.cnt = Dl.params.nodes.cnt; if (Dl.params.ep) { //Copy in reverse as we want this point to be last - for (int i=Dl.params.nodes.cnt-1,j=0;i>=0;i--,j++) { - DYNARR_LAST(trkSeg_t,Dl.newLine).u.p.pts[j].pt = DYNARR_N(coOrd,Dl.params.nodes,i); + for (int i=Dl.params.nodes.cnt-1,j=0; i>=0; i--,j++) { + DYNARR_LAST(trkSeg_t,Dl.newLine).u.p.pts[j].pt = DYNARR_N(coOrd,Dl.params.nodes, + i); DYNARR_LAST(trkSeg_t,Dl.newLine).u.p.pts[j].pt_type = wPolyLineStraight; } } else { //Copy forwards to end up with this point last - for (int i=0; i=0;i--,j++) { - DYNARR_LAST(trkSeg_t,Dl.newLine).u.p.pts[j].pt = DYNARR_N(coOrd,Dl.params.nodes,i); + for (int i=Dl.params.nodes.cnt-join_near-1,j=old_cnt; i>=0; i--,j++) { + DYNARR_LAST(trkSeg_t,Dl.newLine).u.p.pts[j].pt = DYNARR_N(coOrd,Dl.params.nodes, + i); DYNARR_LAST(trkSeg_t,Dl.newLine).u.p.pts[j].pt_type = wPolyLineStraight; } } @@ -591,13 +627,14 @@ static STATUS_T CmdJoinLine( case C_MOVE: break; case C_UP: - if (Dl.line_state != HAVE_SECOND_LINE) return C_CONTINUE; + if (Dl.line_state != HAVE_SECOND_LINE) { return C_CONTINUE; } Dl.line_state = NO_LINE; UndoStart(_("Create PolyLine"), "newPolyLine"); track_p newTrack = MakePolyLineFromSegs( zero, 0.0, &Dl.newLine ); DeleteTrack(Dl.inp[0].line,FALSE); - if (Dl.inp[0].line != Dl.inp[1].line) + if (Dl.inp[0].line != Dl.inp[1].line) { DeleteTrack(Dl.inp[1].line,FALSE); + } UndoEnd(); DrawNewTrack(newTrack); CleanSegs(&Dl.newLine); @@ -610,10 +647,15 @@ static STATUS_T CmdJoinLine( Dl.curr_line = NULL; break; case C_REDRAW: - if (Dl.line_state != NO_LINE) DrawSegs(&tempD,zero,0.0,((trkSeg_t*)Dl.newLine.ptr), Dl.newLine.cnt, trackGauge, wDrawColorPreviewSelected); - if (Dl.curr_line) DrawTrack(Dl.curr_line,&tempD,wDrawColorPreviewSelected); - if (Dl.anchors_da.cnt>0) - DrawSegs( &tempD, zero, 0.0, &anchors(0), Dl.anchors_da.cnt, trackGauge, wDrawColorPreviewSelected ); + if (Dl.line_state != NO_LINE) { + DrawSegsDA(&tempD,NULL,zero,0.0,&Dl.newLine, trackGauge, + wDrawColorPreviewSelected,0); + } + if (Dl.curr_line) { + DrawTrack(Dl.curr_line,&tempD,wDrawColorPreviewSelected); + } + DrawSegsDA( &tempD, NULL, zero, 0.0, &Dl.anchors_da, trackGauge, + wDrawColorPreviewSelected, 0 ); break; case C_TEXT: case C_OK: @@ -626,34 +668,37 @@ static STATUS_T CmdJoinLine( } -void AnchorTempLine(coOrd p0, coOrd p1) { +void AnchorTempLine(coOrd p0, coOrd p1) +{ DYNARR_APPEND(trkSeg_t,Dj.anchors,1); trkSeg_p p = &DYNARR_LAST(trkSeg_t,Dj.anchors); p->type = SEG_STRLIN; p->color = wDrawColorBlue; - p->width = 0.0; + p->lineWidth = 0.0; p->u.l.pos[0] = p0; p->u.l.pos[1] = p1; } -void AnchorTempCircle(coOrd center,DIST_T radius, ANGLE_T a0, ANGLE_T a1) { +void AnchorTempCircle(coOrd center,DIST_T radius, ANGLE_T a0, ANGLE_T a1) +{ DYNARR_APPEND(trkSeg_t,Dj.anchors,1); trkSeg_p p = &DYNARR_LAST(trkSeg_t,Dj.anchors); p->type = SEG_CRVLIN; p->color = wDrawColorBlue; - p->width = 0.0; + p->lineWidth = 0.0; p->u.c.a0 =a0; p->u.c.a1 = a1; p->u.c.radius = radius; p->u.c.center = center; } -void AnchorPoint(coOrd center) { +void AnchorPoint(coOrd center) +{ DYNARR_APPEND(trkSeg_t,Dj.anchors,1); trkSeg_p p = &DYNARR_LAST(trkSeg_t,Dj.anchors); p->type = SEG_CRVLIN; p->color = wDrawColorAqua; - p->width = 0.0; + p->lineWidth = 0.0; p->u.c.a0 =0.0; p->u.c.a1 = 360.0; p->u.c.radius = mainD.scale/4; @@ -672,100 +717,126 @@ static paramGroup_t joinPG = { "joinfixed", 0, joinPLs, COUNT( joinPLs ) }; -BOOL_T AdjustPosToRadius(coOrd *pos, DIST_T desired_radius, ANGLE_T an0, ANGLE_T an1) { +BOOL_T AdjustPosToRadius(coOrd *pos, DIST_T desired_radius, ANGLE_T an0, + ANGLE_T an1) +{ coOrd point1,point2; switch ( Dj.inp[1].params.type ) { - case curveTypeCurve: - if (Dj.inp[0].params.type == curveTypeStraight) { - coOrd newP, newP1; - //Offset curve by desired_radius - DIST_T newR1; - newR1 = Dj.inp[1].params.arcR + desired_radius*((fabs(an1-Dj.inp[1].params.arcA0)<1.0)?1:-1); - if (newR1<=0.0) { - if (debug) InfoMessage("Zero Radius C1"); - return FALSE; - } - //Offset line by desired_radius - Translate(&newP,Dj.inp[0].params.lineEnd,an0,desired_radius); - Translate(&newP1,Dj.inp[0].params.lineOrig,an0,desired_radius); - if (debug) - AnchorTempLine(newP,newP1); - //Intersect - this is the joining curve center - if (debug) - AnchorTempCircle(Dj.inp[1].params.arcP,newR1,Dj.inp[1].params.arcA0,Dj.inp[1].params.arcA1); - if (!FindArcAndLineIntersections(&point1,&point2,Dj.inp[1].params.arcP,newR1,newP,newP1)) - return FALSE; - } else if (Dj.inp[0].params.type == curveTypeCurve) { - //Offset curve by desired_radius - DIST_T newR0; - newR0 = Dj.inp[0].params.arcR + desired_radius*((fabs(an0-Dj.inp[0].params.arcA0)<1.0)?1:-1); - if (newR0<=0.0) { - if (debug) InfoMessage("Zero Radius C0"); - return FALSE; - } - //Offset curve by desired_radius - if (debug) - AnchorTempCircle(Dj.inp[0].params.arcP,newR0,Dj.inp[0].params.arcA0,Dj.inp[0].params.arcA1); - DIST_T newR1; - newR1 = Dj.inp[1].params.arcR + desired_radius*((fabs(an1-Dj.inp[1].params.arcA0)<1.0)?1:-1); - if (newR1<=0.0) { - if (debug) InfoMessage("Zero Radius C1"); - return FALSE; - } - //Intersect - this is the joining curve center - if (debug) - AnchorTempCircle(Dj.inp[1].params.arcP,newR1,Dj.inp[1].params.arcA0,Dj.inp[1].params.arcA1); - if (!FindArcIntersections(&point1,&point2,Dj.inp[0].params.arcP,newR0,Dj.inp[1].params.arcP,newR1)) - return FALSE; + case curveTypeCurve: + if (Dj.inp[0].params.type == curveTypeStraight) { + coOrd newP, newP1; + //Offset curve by desired_radius + DIST_T newR1; + newR1 = Dj.inp[1].params.arcR + desired_radius*((fabs(an1 + -Dj.inp[1].params.arcA0)<1.0)?1:-1); + if (newR1<=0.0) { + if (debug) { InfoMessage("Zero Radius C1"); } + return FALSE; } + //Offset line by desired_radius + Translate(&newP,Dj.inp[0].params.lineEnd,an0,desired_radius); + Translate(&newP1,Dj.inp[0].params.lineOrig,an0,desired_radius); if (debug) { - AnchorPoint(point1); - AnchorPoint(point2); + AnchorTempLine(newP,newP1); } - break; - case curveTypeStraight: - if (Dj.inp[0].params.type == curveTypeStraight) { - coOrd newI,newP0,newP01, newP1, newP11; - //Offset line1 by desired_radius - Translate(&newP0,Dj.inp[0].params.lineEnd,an0,desired_radius); - Translate(&newP01,Dj.inp[0].params.lineOrig,an0,desired_radius); - if (debug) - AnchorTempLine(newP0,newP01); - //Offset line2 by desired_radius - Translate(&newP1,Dj.inp[1].params.lineEnd,an1,desired_radius); - Translate(&newP11,Dj.inp[1].params.lineOrig,an1,desired_radius); - if (debug) - AnchorTempLine(newP1,newP11); - if (!FindIntersection(&newI,newP0,Dj.inp[0].params.angle,newP1,Dj.inp[1].params.angle)) - return FALSE; - point1 = point2 = newI; - } else if (Dj.inp[0].params.type == curveTypeCurve) { - coOrd newP, newP1; - //Offset curve by desired_radius - DIST_T newR0; - newR0 = Dj.inp[0].params.arcR + desired_radius*((fabs(an0-Dj.inp[0].params.arcA0)<1.0)?1:-1); - if (newR0<=0.0) { - if (debug) InfoMessage("Zero Radius C0"); - return FALSE; - } - if (debug) - AnchorTempCircle(Dj.inp[0].params.arcP,newR0,Dj.inp[0].params.arcA0,Dj.inp[0].params.arcA1); - //Offset line by desired_radius - Translate(&newP,Dj.inp[1].params.lineEnd,an1,desired_radius); - Translate(&newP1,Dj.inp[1].params.lineOrig,an1,desired_radius); - if (debug) - AnchorTempLine(newP,newP1); - //Intersect - this is the joining curve center - if (!FindArcAndLineIntersections(&point1,&point2,Dj.inp[0].params.arcP,newR0,newP,newP1)) - return FALSE; + //Intersect - this is the joining curve center + if (debug) { + AnchorTempCircle(Dj.inp[1].params.arcP,newR1,Dj.inp[1].params.arcA0, + Dj.inp[1].params.arcA1); } + if (!FindArcAndLineIntersections(&point1,&point2,Dj.inp[1].params.arcP,newR1, + newP,newP1)) { + return FALSE; + } + } else if (Dj.inp[0].params.type == curveTypeCurve) { + //Offset curve by desired_radius + DIST_T newR0; + newR0 = Dj.inp[0].params.arcR + desired_radius*((fabs(an0 + -Dj.inp[0].params.arcA0)<1.0)?1:-1); + if (newR0<=0.0) { + if (debug) { InfoMessage("Zero Radius C0"); } + return FALSE; + } + //Offset curve by desired_radius if (debug) { - AnchorPoint(point1); - AnchorPoint(point2); + AnchorTempCircle(Dj.inp[0].params.arcP,newR0,Dj.inp[0].params.arcA0, + Dj.inp[0].params.arcA1); } - break; - default: - return FALSE; + DIST_T newR1; + newR1 = Dj.inp[1].params.arcR + desired_radius*((fabs(an1 + -Dj.inp[1].params.arcA0)<1.0)?1:-1); + if (newR1<=0.0) { + if (debug) { InfoMessage("Zero Radius C1"); } + return FALSE; + } + //Intersect - this is the joining curve center + if (debug) { + AnchorTempCircle(Dj.inp[1].params.arcP,newR1,Dj.inp[1].params.arcA0, + Dj.inp[1].params.arcA1); + } + if (!FindArcIntersections(&point1,&point2,Dj.inp[0].params.arcP,newR0, + Dj.inp[1].params.arcP,newR1)) { + return FALSE; + } + } + if (debug) { + AnchorPoint(point1); + AnchorPoint(point2); + } + break; + case curveTypeStraight: + if (Dj.inp[0].params.type == curveTypeStraight) { + coOrd newI,newP0,newP01, newP1, newP11; + //Offset line1 by desired_radius + Translate(&newP0,Dj.inp[0].params.lineEnd,an0,desired_radius); + Translate(&newP01,Dj.inp[0].params.lineOrig,an0,desired_radius); + if (debug) { + AnchorTempLine(newP0,newP01); + } + //Offset line2 by desired_radius + Translate(&newP1,Dj.inp[1].params.lineEnd,an1,desired_radius); + Translate(&newP11,Dj.inp[1].params.lineOrig,an1,desired_radius); + if (debug) { + AnchorTempLine(newP1,newP11); + } + if (!FindIntersection(&newI,newP0,Dj.inp[0].params.angle,newP1, + Dj.inp[1].params.angle)) { + return FALSE; + } + point1 = point2 = newI; + } else if (Dj.inp[0].params.type == curveTypeCurve) { + coOrd newP, newP1; + //Offset curve by desired_radius + DIST_T newR0; + newR0 = Dj.inp[0].params.arcR + desired_radius*((fabs(an0 + -Dj.inp[0].params.arcA0)<1.0)?1:-1); + if (newR0<=0.0) { + if (debug) { InfoMessage("Zero Radius C0"); } + return FALSE; + } + if (debug) { + AnchorTempCircle(Dj.inp[0].params.arcP,newR0,Dj.inp[0].params.arcA0, + Dj.inp[0].params.arcA1); + } + //Offset line by desired_radius + Translate(&newP,Dj.inp[1].params.lineEnd,an1,desired_radius); + Translate(&newP1,Dj.inp[1].params.lineOrig,an1,desired_radius); + if (debug) { + AnchorTempLine(newP,newP1); + } + //Intersect - this is the joining curve center + if (!FindArcAndLineIntersections(&point1,&point2,Dj.inp[0].params.arcP,newR0, + newP,newP1)) { + return FALSE; + } + } + if (debug) { + AnchorPoint(point1); + AnchorPoint(point2); + } + break; + default: + return FALSE; } if (FindDistance(*pos,point1)<=FindDistance(*pos,point2)) { if (Dj.inp[1].params.type == curveTypeCurve) { @@ -778,27 +849,30 @@ BOOL_T AdjustPosToRadius(coOrd *pos, DIST_T desired_radius, ANGLE_T an0, ANGLE_T if (Dj.inp[1].params.type == curveTypeCurve) { ANGLE_T a = FindAngle(Dj.inp[1].params.arcP,point2); Translate(pos,Dj.inp[1].params.arcP,a,Dj.inp[1].params.arcR); - } else + } else { Translate(pos,point2,NormalizeAngle(an1+180),desired_radius); + } } return TRUE; } -void AddAnchorJoin(coOrd pos, ANGLE_T angle) { +void AddAnchorJoin(coOrd pos, ANGLE_T angle) +{ DIST_T d = tempD.scale*0.15; DYNARR_APPEND(trkSeg_t,Dj.anchors,1); trkSeg_p a = &DYNARR_LAST(trkSeg_t,Dj.anchors); a->type = SEG_CRVLIN; - a->width = 0; + a->lineWidth = 0; a->u.c.a0 = 0.0; a->u.c.a1 = 360.0; a->u.c.center = pos; a->u.c.radius = d/2; a->color = wDrawColorBlue; DYNARR_SET(trkSeg_t,Dj.anchors,Dj.anchors.cnt+5); - DrawArrowHeads(&DYNARR_N(trkSeg_t,Dj.anchors,Dj.anchors.cnt-5),pos,angle,FALSE,wDrawColorBlue); + DrawArrowHeads(&DYNARR_N(trkSeg_t,Dj.anchors,Dj.anchors.cnt-5),pos,angle,FALSE, + wDrawColorBlue); } @@ -808,8 +882,8 @@ static coOrd anchor_pos; static ANGLE_T anchor_angle = 0.0; static STATUS_T CmdJoin( - wAction_t action, - coOrd pos ) + wAction_t action, + coOrd pos ) /* * Join 2 tracks. */ @@ -827,17 +901,20 @@ static STATUS_T CmdJoin( BOOL_T ok; wControl_p controls[2]; char * labels[1]; + trkSeg_p p; switch (action&0xFF) { case C_START: if (joinPLs[0].control==NULL) { - ParamCreateControls(&joinPG, NULL); + ParamCreateControls(&joinPG, NULL); } - if (selectedTrackCount==0) + if (selectedTrackCount==0) { InfoMessage( _("Left click - join with track") ); - else - InfoMessage( _("Left click - join with track, Shift Left click - move to join") ); + } else { + InfoMessage( + _("Left click - join with track, Shift Left click - move to join") ); + } DYNARR_RESET(trkSeg_t,Dj.anchors); Dj.state = 0; Dj.joinMoveState = 0; @@ -845,70 +922,86 @@ static STATUS_T CmdJoin( /*ParamGroupRecord( &easementPG );*/ infoSubst = FALSE; anchor_trk = NULL; - if (easementVal < 0.0) + if (easementVal < 0.0) { + commandContext = I2VP(cornuJoinTrack); return CmdCornu(action, pos); + } return C_CONTINUE; case wActionMove: anchor_trk = NULL; DYNARR_RESET(rkSeg_t,Dj.anchors); - if ((easementVal < 0) && Dj.joinMoveState == 0 ) + if ((easementVal < 0) && Dj.joinMoveState == 0 ) { + commandContext = I2VP(cornuJoinTrack); return CmdCornu(action, pos); - if ( Dj.state >= 2) return C_CONTINUE; - if ( (trk = OnTrack( &pos, FALSE, TRUE )) == NULL) + } + if ( Dj.state >= 2) { return C_CONTINUE; } + if ( (trk = OnTrack( &pos, FALSE, TRUE )) == NULL) { return C_CONTINUE; - if (!CheckTrackLayer( trk ) ) + } + if (!CheckTrackLayer( trk ) ) { return C_CONTINUE; - if ((Dj.state > 0) && (trk == Dj.inp[0].trk)) + } + if ((Dj.state > 0) && (trk == Dj.inp[0].trk)) { return C_CONTINUE; + } trackParams_t moveParams; - if (!GetTrackParams( PARAMS_1ST_JOIN, trk, pos, &moveParams )) + if (!GetTrackParams( PARAMS_1ST_JOIN, trk, pos, &moveParams )) { return C_CONTINUE; + } if (moveParams.type == curveTypeBezier || moveParams.type == curveTypeCornu) { if (!(easementVal<0)) { return C_CONTINUE; } } ep = PickUnconnectedEndPointSilent(pos,trk); - if (ep <0) return C_CONTINUE; - if (IsClose(FindDistance(GetTrkEndPos(trk,ep),pos))) + if (ep <0) { return C_CONTINUE; } + if (IsClose(FindDistance(GetTrkEndPos(trk,ep),pos))) { anchor_angle = GetTrkEndAngle(trk,ep); - else + } else { anchor_angle = FindAngle(pos,GetTrkEndPos(trk,ep)); + } anchor_trk = trk; anchor_pos = pos; AddAnchorJoin(pos,anchor_angle); break; - + case C_DOWN: - if ( !Dj.cornuMode && ((Dj.state == 0 && (MyGetKeyState() & WKEY_SHIFT) != 0) || Dj.joinMoveState != 0) ) + if ( !Dj.cornuMode && ((Dj.state == 0 && (MyGetKeyState() & WKEY_SHIFT) != 0) + || Dj.joinMoveState != 0) ) { return DoMoveToJoin( pos ); + } if (easementVal < 0.0 && Dj.joinMoveState == 0) { Dj.cornuMode = TRUE; + commandContext = I2VP(cornuJoinTrack); return CmdCornu(action, pos); } DYNARR_SET( trkSeg_t, tempSegs_da, 3 ); tempSegs(0).color = drawColorBlack; - tempSegs(0).width = 0; + tempSegs(0).lineWidth = 0; tempSegs(1).color = drawColorBlack; - tempSegs(1).width = 0; + tempSegs(1).lineWidth = 0; tempSegs(2).color = drawColorBlack; - tempSegs(2).width = 0; - tempSegs_da.cnt = 0; + tempSegs(2).lineWidth = 0; + DYNARR_RESET( trkSeg_t, tempSegs_da ); Dj.joinMoveState = 0; -/* Populate (Dj.inp[0]) and check for connecting abutting tracks */ + /* Populate (Dj.inp[0]) and check for connecting abutting tracks */ if (Dj.state == 0) { - if ( (Dj.inp[0].trk = OnTrack( &pos, TRUE, TRUE )) == NULL) + if ( (Dj.inp[0].trk = OnTrack( &pos, TRUE, TRUE )) == NULL) { return C_CONTINUE; - if (!CheckTrackLayer( Dj.inp[0].trk ) ) + } + if (!CheckTrackLayer( Dj.inp[0].trk ) ) { return C_CONTINUE; + } Dj.inp[0].pos = pos; -LOG( log_join, 1, ("JOIN: 1st track %d @[%0.3f %0.3f]\n", - GetTrkIndex(Dj.inp[0].trk), Dj.inp[0].pos.x, Dj.inp[1].pos.y ) ) - if (!GetTrackParams( PARAMS_1ST_JOIN, Dj.inp[0].trk, pos, &Dj.inp[0].params )) + LOG( log_join, 1, ("JOIN: 1st track %d @[%0.3f %0.3f]\n", + GetTrkIndex(Dj.inp[0].trk), Dj.inp[0].pos.x, Dj.inp[1].pos.y ) ) + if (!GetTrackParams( PARAMS_1ST_JOIN, Dj.inp[0].trk, pos, &Dj.inp[0].params )) { return C_CONTINUE; - if (Dj.inp[0].params.type == curveTypeBezier || Dj.inp[0].params.type == curveTypeCornu) { + } + if (Dj.inp[0].params.type == curveTypeBezier + || Dj.inp[0].params.type == curveTypeCornu) { if (!(easementVal<0 && Dj.cornuMode)) { ErrorMessage( MSG_JOIN_NOTBEZIERORCORNU); return C_CONTINUE; @@ -929,34 +1022,42 @@ LOG( log_join, 1, ("JOIN: 1st track %d @[%0.3f %0.3f]\n", ParamGroupRecord(&joinPG); return C_CONTINUE; } else { - if ( (Dj.inp[1].trk = OnTrack( &pos, FALSE, TRUE )) == NULL) + if ( (Dj.inp[1].trk = OnTrack( &pos, FALSE, TRUE )) == NULL) { return C_CONTINUE; - if (!CheckTrackLayer( Dj.inp[1].trk ) ) + } + if (!CheckTrackLayer( Dj.inp[1].trk ) ) { return C_CONTINUE; + } Dj.inp[1].pos = pos; - if (!GetTrackParams( PARAMS_2ND_JOIN, Dj.inp[1].trk, pos, &Dj.inp[1].params )) + if (!GetTrackParams( PARAMS_2ND_JOIN, Dj.inp[1].trk, pos, &Dj.inp[1].params )) { return C_CONTINUE; + } if ( Dj.inp[0].trk == Dj.inp[1].trk ) { ErrorMessage( MSG_JOIN_SAME ); return C_CONTINUE; } - if (infoSubst) + if (infoSubst) { InfoSubstituteControls(NULL, NULL); + } infoSubst = FALSE; Dj.inp[1].realType = GetTrkType(Dj.inp[1].trk); - if ( IsCurveCircle( Dj.inp[0].trk ) ) - Dj.inp[0].params.ep = PickArcEndPt( Dj.inp[0].params.arcP, Dj.inp[0].pos, pos ); - if ( IsCurveCircle( Dj.inp[1].trk ) ) - Dj.inp[1].params.ep = PickArcEndPt( Dj.inp[1].params.arcP, pos, Dj.inp[0].pos ); - -LOG( log_join, 1, (" 2nd track %d, @[%0.3f %0.3f] EP0=%d EP1=%d\n", - GetTrkIndex(Dj.inp[1].trk), Dj.inp[1].pos.x, Dj.inp[1].pos.y, - Dj.inp[0].params.ep, Dj.inp[1].params.ep ) ) -LOG( log_join, 1, ("P1=[%0.3f %0.3f]\n", pos.x, pos.y ) ) + if ( IsCurveCircle( Dj.inp[0].trk ) ) { + Dj.inp[0].params.ep = PickArcEndPt( Dj.inp[0].params.arcP, Dj.inp[0].pos, + pos ); + } + if ( IsCurveCircle( Dj.inp[1].trk ) ) { + Dj.inp[1].params.ep = PickArcEndPt( Dj.inp[1].params.arcP, pos, + Dj.inp[0].pos ); + } + + LOG( log_join, 1, (" 2nd track %d, @[%0.3f %0.3f] EP0=%d EP1=%d\n", + GetTrkIndex(Dj.inp[1].trk), Dj.inp[1].pos.x, Dj.inp[1].pos.y, + Dj.inp[0].params.ep, Dj.inp[1].params.ep ) ) + LOG( log_join, 1, ("P1=[%0.3f %0.3f]\n", pos.x, pos.y ) ) BOOL_T only_merge = FALSE; if ( (Dj.inp[0].params.ep >=0) && - (GetTrkEndTrk(Dj.inp[0].trk,Dj.inp[0].params.ep) != NULL)) { + (GetTrkEndTrk(Dj.inp[0].trk,Dj.inp[0].params.ep) != NULL)) { if (GetTrkEndTrk(Dj.inp[0].trk,Dj.inp[0].params.ep) != Dj.inp[1].trk) { only_merge = TRUE; ErrorMessage( MSG_TRK_ALREADY_CONN, _("First") ); @@ -964,14 +1065,15 @@ LOG( log_join, 1, ("P1=[%0.3f %0.3f]\n", pos.x, pos.y ) ) } } if ( (Dj.inp[1].params.ep >= 0) && - (GetTrkEndTrk(Dj.inp[1].trk,Dj.inp[1].params.ep) != NULL)) { + (GetTrkEndTrk(Dj.inp[1].trk,Dj.inp[1].params.ep) != NULL)) { if (GetTrkEndTrk(Dj.inp[1].trk,Dj.inp[1].params.ep) != Dj.inp[0].trk) { only_merge = TRUE; ErrorMessage( MSG_TRK_ALREADY_CONN, _("Second") ); return C_CONTINUE; } } - if (Dj.inp[1].params.type == curveTypeBezier || Dj.inp[1].params.type == curveTypeCornu) { + if (Dj.inp[1].params.type == curveTypeBezier + || Dj.inp[1].params.type == curveTypeCornu) { if (!(easementVal<0 && Dj.cornuMode)) { ErrorMessage( MSG_JOIN_NOTBEZIERORCORNU); return C_CONTINUE; @@ -979,25 +1081,27 @@ LOG( log_join, 1, ("P1=[%0.3f %0.3f]\n", pos.x, pos.y ) ) } rc = C_CONTINUE; if ( MergeTracks( Dj.inp[0].trk, Dj.inp[0].params.ep, - Dj.inp[1].trk, Dj.inp[1].params.ep ) ) { + Dj.inp[1].trk, Dj.inp[1].params.ep ) ) { rc = C_TERMINATE; } else if (only_merge) { rc = C_TERMINATE; } else if ( Dj.inp[0].params.ep >= 0 && Dj.inp[1].params.ep >= 0 ) { if ( Dj.inp[0].params.type == curveTypeStraight && - Dj.inp[1].params.type == curveTypeStraight && - ExtendStraightToJoin( Dj.inp[0].trk, Dj.inp[0].params.ep, - Dj.inp[1].trk, Dj.inp[1].params.ep ) ) + Dj.inp[1].params.type == curveTypeStraight && + ExtendStraightToJoin( Dj.inp[0].trk, Dj.inp[0].params.ep, + Dj.inp[1].trk, Dj.inp[1].params.ep ) ) { rc = C_TERMINATE; + } if ( ConnectAbuttingTracks( Dj.inp[0].trk, Dj.inp[0].params.ep, - Dj.inp[1].trk, Dj.inp[1].params.ep ) ) + Dj.inp[1].trk, Dj.inp[1].params.ep ) ) { rc = C_TERMINATE; + } } if ( rc == C_TERMINATE ) { return rc; } if ( QueryTrack( Dj.inp[0].trk, Q_CANNOT_BE_ON_END ) || - QueryTrack( Dj.inp[1].trk, Q_CANNOT_BE_ON_END ) ) { + QueryTrack( Dj.inp[1].trk, Q_CANNOT_BE_ON_END ) ) { ErrorMessage( MSG_JOIN_EASEMENTS ); return C_CONTINUE; } @@ -1005,23 +1109,27 @@ LOG( log_join, 1, ("P1=[%0.3f %0.3f]\n", pos.x, pos.y ) ) Dj.state = 2; Dj.jRes.flip = FALSE; } - tempSegs_da.cnt = 0; /* no break */ - + case C_MOVE: - if (easementVal < 0 && Dj.cornuMode) + DYNARR_RESET( trkSeg_t, tempSegs_da ); + if (easementVal < 0 && Dj.cornuMode) { + commandContext = I2VP(cornuJoinTrack); return CmdCornu(action, pos); + } -LOG( log_join, 3, ("P1=[%0.3f %0.3f]\n", pos.x, pos.y ) ) - if (Dj.state != 2) + LOG( log_join, 3, ("P1=[%0.3f %0.3f]\n", pos.x, pos.y ) ) + if (Dj.state != 2) { return C_CONTINUE; + } DYNARR_RESET(trkSeg_t,Dj.anchors); //Fix Pos onto the line of the second track if (Dj.inp[1].params.type == curveTypeStraight) { - ANGLE_T a = NormalizeAngle(FindAngle(Dj.inp[1].params.lineOrig,pos)-Dj.inp[1].params.angle); + ANGLE_T a = NormalizeAngle(FindAngle(Dj.inp[1].params.lineOrig, + pos)-Dj.inp[1].params.angle); DIST_T d = FindDistance(Dj.inp[1].params.lineOrig,pos); Translate(&pos,Dj.inp[1].params.lineOrig,Dj.inp[1].params.angle,d*cos(D2R(a))); } else { @@ -1030,33 +1138,39 @@ LOG( log_join, 3, ("P1=[%0.3f %0.3f]\n", pos.x, pos.y ) ) } if ((desired_radius != 0.0) && - ((Dj.inp[0].params.type == curveTypeStraight) || (Dj.inp[0].params.type == curveTypeCurve)) && - ((Dj.inp[1].params.type == curveTypeStraight) || (Dj.inp[1].params.type == curveTypeCurve)) && - Dj.jRes.type==curveTypeCurve - ) { + ((Dj.inp[0].params.type == curveTypeStraight) + || (Dj.inp[0].params.type == curveTypeCurve)) && + ((Dj.inp[1].params.type == curveTypeStraight) + || (Dj.inp[1].params.type == curveTypeCurve)) && + Dj.jRes.type==curveTypeCurve + ) { ANGLE_T na0=0.0,na1=0.0; - coOrd end0, end1; +// coOrd end0, end1; ANGLE_T a0,a1; - end0 = GetTrkEndPos(Dj.inp[0].trk,Dj.inp[0].params.ep); - end1 = GetTrkEndPos(Dj.inp[1].trk,Dj.inp[1].params.ep); +// end0 = GetTrkEndPos(Dj.inp[0].trk,Dj.inp[0].params.ep); +// end1 = GetTrkEndPos(Dj.inp[1].trk,Dj.inp[1].params.ep); if (Dj.inp[0].params.type == curveTypeStraight) { - a0 = DifferenceBetweenAngles(Dj.inp[0].params.angle,FindAngle(Dj.jRes.pos[0], pos)); + a0 = DifferenceBetweenAngles(Dj.inp[0].params.angle,FindAngle(Dj.jRes.pos[0], + pos)); na0 = NormalizeAngle( Dj.inp[0].params.angle + - ((a0>0.0)?90.0:-90.0)); + ((a0>0.0)?90.0:-90.0)); } else { na0 = Dj.inp[0].params.arcA0; - if (FindDistance(Dj.inp[0].params.arcP,pos)0.0)?90.0:-90.0)); + ((a1>0.0)?90.0:-90.0)); } else { na1 = Dj.inp[1].params.arcA0; - if (FindDistance(Dj.inp[1].params.arcP,Dj.jRes.pos[0])Dj.inp[1].params.arcA0+Dj.inp[1].params.arcA1) || (a< Dj.inp[1].params.arcA0)) { + if ((a>Dj.inp[1].params.arcA0+Dj.inp[1].params.arcA1) + || (a< Dj.inp[1].params.arcA0)) { beyond = 1.0; } } @@ -1075,9 +1190,9 @@ LOG( log_join, 3, ("P1=[%0.3f %0.3f]\n", pos.x, pos.y ) ) if (beyond>-0.01 && IsClose(FindDistance(pos,pos1))) { pos = pos1; DYNARR_APPEND(trkSeg_t,Dj.anchors,1); - trkSeg_p p = &DYNARR_LAST(trkSeg_t,Dj.anchors); + p = &DYNARR_LAST(trkSeg_t,Dj.anchors); p->type= SEG_CRVLIN; - p->width = 0; + p->lineWidth = 0; p->color = wDrawColorBlue; p->u.c.center = pos; p->u.c.a1= 360.0; @@ -1088,16 +1203,15 @@ LOG( log_join, 3, ("P1=[%0.3f %0.3f]\n", pos.x, pos.y ) ) } - - tempSegs_da.cnt = 0; - tempSegs(0).color = drawColorBlack; ok = FALSE; -/* Populate (Dj.inp[1]) */ + /* Populate (Dj.inp[1]) */ if ( QueryTrack(Dj.inp[1].trk,Q_REFRESH_JOIN_PARAMS_ON_MOVE) ) { - if ( !GetTrackParams( PARAMS_2ND_JOIN, Dj.inp[1].trk, pos, &Dj.inp[1].params ) ) + if ( !GetTrackParams( PARAMS_2ND_JOIN, Dj.inp[1].trk, pos, + &Dj.inp[1].params ) ) { return C_CONTINUE; + } } @@ -1106,19 +1220,20 @@ LOG( log_join, 3, ("P1=[%0.3f %0.3f]\n", pos.x, pos.y ) ) case curveTypeCurve: normalAngle = FindAngle( Dj.inp[1].params.arcP, pos ); Dj.inp[1].params.angle = NormalizeAngle( normalAngle + - ((Dj.inp[1].params.ep==0)?-90.0:90.0)); + ((Dj.inp[1].params.ep==0)?-90.0:90.0)); PointOnCircle( &Dj.inp[1].pos, Dj.inp[1].params.arcP, - Dj.inp[1].params.arcR, normalAngle ); - if (Dj.inp[0].params.ep == Dj.inp[1].params.ep) + Dj.inp[1].params.arcR, normalAngle ); + if (Dj.inp[0].params.ep == Dj.inp[1].params.ep) { normalAngle = NormalizeAngle( normalAngle + 180.0 ); + } break; case curveTypeStraight: FindPos( &off, &beyond, pos, Dj.inp[1].params.lineOrig, Dj.inp[1].params.angle, - DIST_INF ); + DIST_INF ); Translate( &Dj.inp[1].pos, Dj.inp[1].params.lineOrig, Dj.inp[1].params.angle, - off.x ); + off.x ); normalAngle = NormalizeAngle( Dj.inp[1].params.angle + - ((Dj.inp[0].params.ep==0)?-90.0:90.0) ); + ((Dj.inp[0].params.ep==0)?-90.0:90.0) ); break; case curveTypeNone: case curveTypeBezier: @@ -1126,23 +1241,27 @@ LOG( log_join, 3, ("P1=[%0.3f %0.3f]\n", pos.x, pos.y ) ) break; } -/* Compute the radius of the 2 tracks, for ComputeE() */ - for (inx=0;inx<2;inx++) + /* Compute the radius of the 2 tracks, for ComputeE() */ + for (inx=0; inx<2; inx++) if (Dj.inp[inx].params.type == curveTypeCurve) { eR[inx] = Dj.inp[inx].params.arcR; - if (Dj.inp[inx].params.ep == inx) + if (Dj.inp[inx].params.ep == inx) { eR[inx] = - eR[inx]; - } else + } + } else { eR[inx] = 0.0; + } - if (!AdjustJoint( FALSE, 0.0, eR, normalAngle )) + if (!AdjustJoint( FALSE, 0.0, eR, normalAngle )) { goto errorReturn; - /*return C_CONTINUE;*/ + } + /*return C_CONTINUE;*/ if (beyond < -0.000001) { #ifdef VERBOSE -printf("pos=[%0.3f,%0.3f] lineOrig=[%0.3f,%0.3f], angle=%0.3f = off=[%0.3f,%0.3f], beyond=%0.3f\n", -pos.x, pos.y, Dj.inp[1].params.lineOrig.x, Dj.inp[1].params.lineOrig.y, Dj.inp[1].params.angle, off.x, off.y, beyond ); + printf("pos=[%0.3f,%0.3f] lineOrig=[%0.3f,%0.3f], angle=%0.3f = off=[%0.3f,%0.3f], beyond=%0.3f\n", + pos.x, pos.y, Dj.inp[1].params.lineOrig.x, Dj.inp[1].params.lineOrig.y, + Dj.inp[1].params.angle, off.x, off.y, beyond ); #endif InfoMessage( _("Beyond end of 2nd track") ); goto errorReturn; @@ -1150,34 +1269,35 @@ pos.x, pos.y, Dj.inp[1].params.lineOrig.x, Dj.inp[1].params.lineOrig.y, Dj.inp[1 Dj.inp_pos[0] = Dj.jRes.pos[0]; Dj.inp_pos[1] = Dj.jRes.pos[1]; -LOG( log_join, 3, (" -E POS0=[%0.3f %0.3f] POS1=[%0.3f %0.3f]\n", - Dj.jRes.pos[0].x, Dj.jRes.pos[0].y, - Dj.jRes.pos[1].x, Dj.jRes.pos[1].y ) ) + LOG( log_join, 3, (" -E POS0=[%0.3f %0.3f] POS1=[%0.3f %0.3f]\n", + Dj.jRes.pos[0].x, Dj.jRes.pos[0].y, + Dj.jRes.pos[1].x, Dj.jRes.pos[1].y ) ) if ( Dj.jointD[0].x!=0.0 || Dj.jointD[1].x!=0.0 ) { -/* Compute the transition-curve, hopefully twice is enough */ + /* Compute the transition-curve, hopefully twice is enough */ a1 = Dj.inp[1].params.angle + (Dj.jointD[1].negate?-90.0:+90.0); if ((!AdjustJoint( TRUE, a1, eR, normalAngle )) || - (!AdjustJoint( TRUE, a1, eR, normalAngle )) ) + (!AdjustJoint( TRUE, a1, eR, normalAngle )) ) { goto errorReturn; - /*return C_CONTINUE;*/ + } + /*return C_CONTINUE;*/ if (logTable(log_join).level >= 3) { Translate( &p1, Dj.jRes.pos[1], a1+180.0, Dj.jointD[1].x ); LogPrintf(" X0=%0.3f, P1=[%0.3f %0.3f]\n", - FindDistance( Dj.inp_pos[0], Dj.jRes.pos[0] ), p1.x, p1.y ); + FindDistance( Dj.inp_pos[0], Dj.jRes.pos[0] ), p1.x, p1.y ); LogPrintf(" E+ POS0=[%0.3f %0.3f]..[%0.3f %0.3f] POS1=[%0.3f %0.3f]..[%0.3f %0.3f]\n", - Dj.inp_pos[0].x, Dj.inp_pos[0].y, - Dj.jRes.pos[0].x, Dj.jRes.pos[0].y, - p1.x, p1.y, Dj.jRes.pos[1].x, Dj.jRes.pos[1].y ); + Dj.inp_pos[0].x, Dj.inp_pos[0].y, + Dj.jRes.pos[0].x, Dj.jRes.pos[0].y, + p1.x, p1.y, Dj.jRes.pos[1].x, Dj.jRes.pos[1].y ); } } switch ( Dj.inp[0].params.type ) { case curveTypeStraight: FindPos( &off, &beyond, Dj.inp_pos[0], Dj.inp[0].params.lineOrig, - Dj.inp[0].params.angle, DIST_INF ); + Dj.inp[0].params.angle, DIST_INF ); if (beyond < 0.0) { InfoMessage(_("Beyond end of 1st track")); goto errorReturn; @@ -1191,10 +1311,11 @@ LOG( log_join, 3, (" -E POS0=[%0.3f %0.3f] POS1=[%0.3f %0.3f]\n", d = DIST_INF; } else { a = FindAngle( Dj.inp[0].params.arcP, Dj.inp_pos[0] ); - if (Dj.inp[0].params.ep == 0) + if (Dj.inp[0].params.ep == 0) { a1 = NormalizeAngle( Dj.inp[0].params.arcA0+Dj.inp[0].params.arcA1-a ); - else + } else { a1 = NormalizeAngle( a-Dj.inp[0].params.arcA0 ); + } d = Dj.inp[0].params.arcR * a1 * 2.0*M_PI/360.0; } break; @@ -1204,7 +1325,8 @@ LOG( log_join, 3, (" -E POS0=[%0.3f %0.3f] POS1=[%0.3f %0.3f]\n", InfoMessage( _("First Track Type not supported for non-Cornu Join") ); goto errorReturn; default: - AbortProg( "cmdJoin - unknown type[0]" ); + CHECKMSG( FALSE, ( "cmdJoin - unknown type[0] %d", + (int)(Dj.inp[0].params.type) ) ); } d -= Dj.jointD[0].d0; if ( d <= minLength ) { @@ -1223,10 +1345,11 @@ LOG( log_join, 3, (" -E POS0=[%0.3f %0.3f] POS1=[%0.3f %0.3f]\n", d = DIST_INF; } else { a = FindAngle( Dj.inp[1].params.arcP, Dj.inp_pos[1] ); - if (Dj.inp[1].params.ep == 0) + if (Dj.inp[1].params.ep == 0) { a1 = NormalizeAngle( Dj.inp[1].params.arcA0+Dj.inp[1].params.arcA1-a ); - else + } else { a1 = NormalizeAngle( a-Dj.inp[1].params.arcA0 ); + } d = Dj.inp[1].params.arcR * a1 * 2.0*M_PI/360.0; } break; @@ -1236,7 +1359,7 @@ LOG( log_join, 3, (" -E POS0=[%0.3f %0.3f] POS1=[%0.3f %0.3f]\n", InfoMessage( _("Second Track Type not supported for non-Cornu Join") ); goto errorReturn; default: - AbortProg( "cmdJoin - unknown type[1]" ); + CHECKMSG( FALSE, ( "cmdJoin - unknown type[1]", Dj.inp[1].params.type ) ); } d -= Dj.jointD[1].d0; if ( d <= minLength ) { @@ -1261,35 +1384,42 @@ LOG( log_join, 3, (" -E POS0=[%0.3f %0.3f] POS1=[%0.3f %0.3f]\n", } } -/* Setup temp track */ + /* Setup temp track */ for ( ep=0; ep<2; ep++ ) { switch( Dj.inp[ep].params.type ) { case curveTypeCurve: - tempSegs(tempSegs_da.cnt).type = SEG_CRVTRK; - tempSegs(tempSegs_da.cnt).u.c.center = Dj.inp[ep].params.arcP; - tempSegs(tempSegs_da.cnt).u.c.radius = Dj.inp[ep].params.arcR; - if (IsCurveCircle( Dj.inp[ep].trk )) + DYNARR_APPEND( trkSeg_t, tempSegs_da, 1 ); + p = &DYNARR_LAST( trkSeg_t, tempSegs_da ); + p->type = SEG_CRVTRK; + p->color = drawColorBlack; + p->u.c.center = Dj.inp[ep].params.arcP; + p->u.c.radius = Dj.inp[ep].params.arcR; + if (IsCurveCircle( Dj.inp[ep].trk )) { break; + } a = FindAngle( Dj.inp[ep].params.arcP, Dj.inp_pos[ep] ); a1 = NormalizeAngle( a-Dj.inp[ep].params.arcA0 ); - if (a1 <= Dj.inp[ep].params.arcA1) + if (a1 <= Dj.inp[ep].params.arcA1) { break; + } if (Dj.inp[ep].params.ep == 0) { - tempSegs(tempSegs_da.cnt).u.c.a0 = a; - tempSegs(tempSegs_da.cnt).u.c.a1 = NormalizeAngle(Dj.inp[ep].params.arcA0-a); + p->u.c.a0 = a; + p->u.c.a1 = NormalizeAngle(Dj.inp[ep].params.arcA0-a); } else { - tempSegs(tempSegs_da.cnt).u.c.a0 = Dj.inp[ep].params.arcA0+Dj.inp[ep].params.arcA1; - tempSegs(tempSegs_da.cnt).u.c.a1 = a1-Dj.inp[ep].params.arcA1; + p->u.c.a0 = Dj.inp[ep].params.arcA0 + +Dj.inp[ep].params.arcA1; + p->u.c.a1 = a1-Dj.inp[ep].params.arcA1; } - tempSegs_da.cnt++; break; case curveTypeStraight: if ( FindDistance( Dj.inp[ep].params.lineOrig, Dj.inp[ep].params.lineEnd ) < - FindDistance( Dj.inp[ep].params.lineOrig, Dj.inp_pos[ep] ) ) { - tempSegs(tempSegs_da.cnt).type = SEG_STRTRK; - tempSegs(tempSegs_da.cnt).u.l.pos[0] = Dj.inp[ep].params.lineEnd; - tempSegs(tempSegs_da.cnt).u.l.pos[1] = Dj.inp_pos[ep]; - tempSegs_da.cnt++; + FindDistance( Dj.inp[ep].params.lineOrig, Dj.inp_pos[ep] ) ) { + DYNARR_APPEND( trkSeg_t, tempSegs_da, 1 ); + p = &DYNARR_LAST( trkSeg_t, tempSegs_da ); + p->type = SEG_STRTRK; + p->color = drawColorBlack; + p->u.l.pos[0] = Dj.inp[ep].params.lineEnd; + p->u.l.pos[1] = Dj.inp_pos[ep]; } break; default: @@ -1299,46 +1429,48 @@ LOG( log_join, 3, (" -E POS0=[%0.3f %0.3f] POS1=[%0.3f %0.3f]\n", ok = TRUE; errorReturn: - if (!ok) - tempSegs(tempSegs_da.cnt).color = drawColorRed; + DYNARR_APPEND( trkSeg_t, tempSegs_da, 1 ); + p = &DYNARR_LAST( trkSeg_t, tempSegs_da ); + p->color = ok ? drawColorBlack : drawColorRed; switch( Dj.jRes.type ) { case curveTypeCurve: - tempSegs(tempSegs_da.cnt).type = SEG_CRVTRK; - tempSegs(tempSegs_da.cnt).u.c.center = Dj.jRes.arcP; - tempSegs(tempSegs_da.cnt).u.c.radius = Dj.jRes.arcR; - tempSegs(tempSegs_da.cnt).u.c.a0 = Dj.jRes.arcA0; - tempSegs(tempSegs_da.cnt).u.c.a1 = Dj.jRes.arcA1; - tempSegs_da.cnt++; + p->type = SEG_CRVTRK; + p->u.c.center = Dj.jRes.arcP; + p->u.c.radius = Dj.jRes.arcR; + p->u.c.a0 = Dj.jRes.arcA0; + p->u.c.a1 = Dj.jRes.arcA1; break; case curveTypeStraight: - tempSegs(tempSegs_da.cnt).type = SEG_STRTRK; - tempSegs(tempSegs_da.cnt).u.l.pos[0] = Dj.jRes.pos[0]; - tempSegs(tempSegs_da.cnt).u.l.pos[1] = Dj.jRes.pos[1]; - tempSegs_da.cnt++; + p->type = SEG_STRTRK; + p->u.l.pos[0] = Dj.jRes.pos[0]; + p->u.l.pos[1] = Dj.jRes.pos[1]; break; case curveTypeNone: - tempSegs_da.cnt = 0; + DYNARR_RESET( trkSeg_t, tempSegs_da ); break; default: - AbortProg( "Bad track type %d", Dj.jRes.type ); + CHECKMSG( FALSE, ( "Bad track type %d", Dj.jRes.type ) ); } - if (!ok) + if (!ok) { Dj.jRes.type = curveTypeNone; + } return C_CONTINUE; - + case C_UP: if (Dj.state == 0) { - if (easementVal<0 && Dj.cornuMode) + if (easementVal<0 && Dj.cornuMode) { + commandContext = I2VP(cornuJoinTrack); return CmdCornu(action, pos); - else + } else { return C_CONTINUE; + } } if (Dj.state == 1) { InfoMessage( _("Select 2nd track") ); return C_CONTINUE; } tempSegs(0).color = drawColorBlack; - tempSegs_da.cnt = 0; + DYNARR_RESET( trkSeg_t, tempSegs_da ); if (Dj.jRes.type == curveTypeNone) { Dj.state = 1; InfoMessage( _("Select 2nd track") ); @@ -1352,7 +1484,7 @@ errorReturn: break; case curveTypeCurve: trk = NewCurvedTrack( Dj.jRes.arcP, Dj.jRes.arcR, - Dj.jRes.arcA0, Dj.jRes.arcA1, 0 ); + Dj.jRes.arcA0, Dj.jRes.arcA1, 0 ); break; case curveTypeNone: case curveTypeBezier: @@ -1372,24 +1504,27 @@ errorReturn: wPrefSetFloat("misc", message, desired_radius); } if ( (!JoinTracks( Dj.inp[0].trk, Dj.inp[0].params.ep, Dj.inp_pos[0], - trk, ep, Dj.jRes.pos[0], &Dj.jointD[0] ) ) || - (!JoinTracks( Dj.inp[1].trk, Dj.inp[1].params.ep, Dj.inp_pos[1], - trk, 1-ep, Dj.jRes.pos[1], &Dj.jointD[1] ) ) ) + trk, ep, Dj.jRes.pos[0], &Dj.jointD[0] ) ) || + (!JoinTracks( Dj.inp[1].trk, Dj.inp[1].params.ep, Dj.inp_pos[1], + trk, 1-ep, Dj.jRes.pos[1], &Dj.jointD[1] ) ) ) { rc = C_ERROR; + } UndoEnd(); DrawNewTrack( Dj.inp[0].trk ); DrawNewTrack( Dj.inp[1].trk ); DrawNewTrack( trk ); - if (infoSubst) + if (infoSubst) { InfoSubstituteControls(NULL, NULL); + } infoSubst = FALSE; return rc; case C_CANCEL: SetAllTrackSelect( FALSE ); - if (infoSubst) + if (infoSubst) { InfoSubstituteControls(NULL, NULL); + } infoSubst = FALSE; break; @@ -1398,20 +1533,25 @@ errorReturn: HighlightSelectedTracks(NULL, TRUE, TRUE); if ( Dj.joinMoveState == 1 || Dj.state == 1 ) { DrawFillCircle( &tempD, Dj.inp[0].pos, 0.10*mainD.scale, selectedColor ); - } else if (easementVal<0 && Dj.joinMoveState == 0) + } else if (easementVal<0 && Dj.joinMoveState == 0) { + commandContext = I2VP(cornuJoinTrack); return CmdCornu(action,pos); - if (Dj.anchors.cnt) - DrawSegs(&tempD, zero, 0.0, &(((trkSeg_t *)Dj.anchors.ptr)[0]), Dj.anchors.cnt,trackGauge,wDrawColorBlack); - DrawSegs( &tempD, zero, 0.0, &tempSegs(0), tempSegs_da.cnt, trackGauge, wDrawColorBlack ); + } + DrawSegsDA(&tempD, NULL, zero, 0.0, &Dj.anchors, trackGauge, wDrawColorBlack, + 0); + DrawSegsDA( &tempD, NULL, zero, 0.0, &tempSegs_da, trackGauge, wDrawColorBlack, + 0 ); break; case C_TEXT: case C_OK: SetAllTrackSelect( FALSE ); - if (easementVal<0 && Dj.cornuMode) + if (easementVal<0 && Dj.cornuMode) { return CmdCornu(action,pos); - if (infoSubst) + } + if (infoSubst) { InfoSubstituteControls(NULL, NULL); + } infoSubst = FALSE; } @@ -1427,14 +1567,18 @@ errorReturn: * */ -#include "bitmaps/join.xpm" -#include "bitmaps/join-line.xpm" +#include "bitmaps/join.xpm3" +#include "bitmaps/join-line.xpm3" void InitCmdJoin( wMenu_p menu ) { ButtonGroupBegin( _("Join"), "cmdJoinSetCmd", _("Join") ); - joinCmdInx = AddMenuButton( menu, CmdJoin, "cmdJoinTrack", _("Join Track"), wIconCreatePixMap(join_xpm[iconSize]), LEVEL0_50, IC_STICKY|IC_POPUP|IC_WANT_MOVE, ACCL_JOIN, NULL ); - AddMenuButton( menu, CmdJoinLine, "cmdJoinLine", _("Join Lines"), wIconCreatePixMap(join_line_xpm[iconSize]), LEVEL0_50, IC_STICKY|IC_POPUP|IC_WANT_MOVE, ACCL_JOIN, NULL ); + AddMenuButton( menu, CmdJoin, "cmdJoinTrack", _("Join Track"), + wIconCreatePixMap(join_xpm3[iconSize]), LEVEL0_50, + IC_STICKY|IC_POPUP|IC_WANT_MOVE, ACCL_JOIN, NULL ); + AddMenuButton( menu, CmdJoinLine, "cmdJoinLine", _("Join Lines"), + wIconCreatePixMap(join_line_xpm3[iconSize]), LEVEL0_50, + IC_STICKY|IC_POPUP|IC_WANT_MOVE, ACCL_JOIN, NULL ); ButtonGroupEnd(); /** @logcmd @showrefby join=n cjoin.c Log Join Lines and Tracks command */ log_join = LogFindIndex( "join" ); diff --git a/app/bin/cjoin.h b/app/bin/cjoin.h index eabdce0..710cb72 100644 --- a/app/bin/cjoin.h +++ b/app/bin/cjoin.h @@ -16,7 +16,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef HAVE_CJOIN_H @@ -29,24 +29,29 @@ #define E_ERROR (2) typedef struct { - DIST_T x; - DIST_T r0, r1; - DIST_T l0, l1; - DIST_T d0, d1; - BOOL_T flip, negate, Scurve; - } easementData_t; + DIST_T x; + DIST_T r0, r1; + DIST_T l0, l1; + DIST_T d0, d1; + BOOL_T flip, negate, Scurve; +} easementData_t; extern DIST_T easementVal; extern DIST_T easeR; extern DIST_T easeL; STATUS_T ComputeJoint( DIST_T, DIST_T, easementData_t * ); -BOOL_T JoinTracks( track_p, EPINX_T, coOrd, track_p, EPINX_T, coOrd, easementData_t * ); +BOOL_T JoinTracks( track_p, EPINX_T, coOrd, track_p, EPINX_T, coOrd, + easementData_t * ); void UndoJoint( track_p, EPINX_T, track_p, EPINX_T ); -void DrawJointTrack( drawCmd_p, coOrd, ANGLE_T, DIST_T, DIST_T, DIST_T, DIST_T, BOOL_T, BOOL_T, BOOL_T, track_p, EPINX_T, EPINX_T, DIST_T, wDrawColor, long ); -DIST_T JointDistance( coOrd *, coOrd, ANGLE_T, DIST_T, DIST_T, DIST_T, DIST_T, BOOL_T, BOOL_T ); -coOrd GetJointSegEndPos( coOrd, ANGLE_T, DIST_T, DIST_T, DIST_T, DIST_T, BOOL_T, BOOL_T, BOOL_T, EPINX_T, ANGLE_T * ); -DIST_T JointDescriptionDistance(coOrd pos, track_p trk, coOrd * dpos, BOOL_T show_hidden, BOOL_T * hidden); +void DrawJointTrack( drawCmd_p, coOrd, ANGLE_T, DIST_T, DIST_T, DIST_T, DIST_T, + BOOL_T, BOOL_T, BOOL_T, track_p, EPINX_T, EPINX_T, DIST_T, wDrawColor, long ); +DIST_T JointDistance( coOrd *, coOrd, ANGLE_T, DIST_T, DIST_T, DIST_T, DIST_T, + BOOL_T, BOOL_T ); +coOrd GetJointSegEndPos( coOrd, ANGLE_T, DIST_T, DIST_T, DIST_T, DIST_T, BOOL_T, + BOOL_T, BOOL_T, EPINX_T, ANGLE_T * ); +DIST_T JointDescriptionDistance(coOrd pos, track_p trk, coOrd * dpos, + BOOL_T show_hidden, BOOL_T * hidden); #endif // !HAVE_CJOIN_H diff --git a/app/bin/cmisc.c b/app/bin/cmisc.c index 9685503..580c681 100644 --- a/app/bin/cmisc.c +++ b/app/bin/cmisc.c @@ -17,7 +17,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "common.h" @@ -27,28 +27,26 @@ #include "cselect.h" #include "track.h" #include "common-ui.h" +#include "draw.h" EXPORT wIndex_t describeCmdInx; EXPORT BOOL_T inDescribeCmd; -extern wIndex_t selectCmdInx; -extern wIndex_t joinCmdInx; -extern wIndex_t modifyCmdInx; - static track_p descTrk; static descData_p descData; static descUpdate_t descUpdateFunc; static coOrd descOrig, descSize; static POS_T descBorder; static wDrawColor descColor = 0; -static BOOL_T descUndoStarted; +EXPORT BOOL_T descUndoStarted; static BOOL_T descNeedDrawHilite; static wWinPix_t describeW_posy; static wWinPix_t describeCmdButtonEnd; static wMenu_p descPopupM; -static unsigned int editableLayerList[NUM_LAYERS]; /**< list of non-frozen layers */ +static unsigned int +editableLayerList[NUM_LAYERS]; /**< list of non-frozen layers */ static int * layerValue; /**pointer to current Layer (int *) */ static paramFloatRange_t rdata = { 0, 0, 100, PDO_NORANGECHECK_HIGH|PDO_NORANGECHECK_LOW }; @@ -58,28 +56,28 @@ static char * pivotLabels[] = { N_("First"), N_("Middle"), N_("End"), NULL }; static char * boxLabels[] = { "", NULL }; static paramData_t describePLs[] = { #define I_FLOAT_0 (0) - { PD_FLOAT, NULL, "F1", PDO_NOPREF, &rdata }, - { PD_FLOAT, NULL, "F2", PDO_NOPREF, &rdata }, - { PD_FLOAT, NULL, "F3", PDO_NOPREF, &rdata }, - { PD_FLOAT, NULL, "F4", PDO_NOPREF, &rdata }, - { PD_FLOAT, NULL, "F5", PDO_NOPREF, &rdata }, - { PD_FLOAT, NULL, "F6", PDO_NOPREF, &rdata }, - { PD_FLOAT, NULL, "F7", PDO_NOPREF, &rdata }, - { PD_FLOAT, NULL, "F8", PDO_NOPREF, &rdata }, - { PD_FLOAT, NULL, "F9", PDO_NOPREF, &rdata }, - { PD_FLOAT, NULL, "F10", PDO_NOPREF, &rdata }, - { PD_FLOAT, NULL, "F11", PDO_NOPREF, &rdata }, - { PD_FLOAT, NULL, "F12", PDO_NOPREF, &rdata }, - { PD_FLOAT, NULL, "F13", PDO_NOPREF, &rdata }, - { PD_FLOAT, NULL, "F14", PDO_NOPREF, &rdata }, - { PD_FLOAT, NULL, "F15", PDO_NOPREF, &rdata }, - { PD_FLOAT, NULL, "F16", PDO_NOPREF, &rdata }, - { PD_FLOAT, NULL, "F17", PDO_NOPREF, &rdata }, - { PD_FLOAT, NULL, "F18", PDO_NOPREF, &rdata }, - { PD_FLOAT, NULL, "F19", PDO_NOPREF, &rdata }, - { PD_FLOAT, NULL, "F20", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F1", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F2", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F3", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F4", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F5", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F6", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F7", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F8", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F9", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F10", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F11", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F12", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F13", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F14", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F15", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F16", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F17", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F18", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F19", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F20", PDO_NOPREF, &rdata }, { PD_FLOAT, NULL, "F21", PDO_NOPREF, &rdata }, - { PD_FLOAT, NULL, "F22", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F22", PDO_NOPREF, &rdata }, { PD_FLOAT, NULL, "F23", PDO_NOPREF, &rdata }, { PD_FLOAT, NULL, "F24", PDO_NOPREF, &rdata }, { PD_FLOAT, NULL, "F25", PDO_NOPREF, &rdata }, @@ -90,7 +88,7 @@ static paramData_t describePLs[] = { { PD_FLOAT, NULL, "F30", PDO_NOPREF, &rdata }, { PD_FLOAT, NULL, "F31", PDO_NOPREF, &rdata }, { PD_FLOAT, NULL, "F32", PDO_NOPREF, &rdata }, - { PD_FLOAT, NULL, "F33", PDO_NOPREF, &rdata }, + { PD_FLOAT, NULL, "F33", PDO_NOPREF, &rdata }, { PD_FLOAT, NULL, "F34", PDO_NOPREF, &rdata }, { PD_FLOAT, NULL, "F35", PDO_NOPREF, &rdata }, { PD_FLOAT, NULL, "F36", PDO_NOPREF, &rdata }, @@ -101,49 +99,49 @@ static paramData_t describePLs[] = { #define I_FLOAT_N I_FLOAT_0+40 #define I_LONG_0 I_FLOAT_N - { PD_LONG, NULL, "I1", PDO_NOPREF, &idata }, - { PD_LONG, NULL, "I2", PDO_NOPREF, &idata }, - { PD_LONG, NULL, "I3", PDO_NOPREF, &idata }, - { PD_LONG, NULL, "I4", PDO_NOPREF, &idata }, - { PD_LONG, NULL, "I5", PDO_NOPREF, &idata }, + { PD_LONG, NULL, "I1", PDO_NOPREF, &idata }, + { PD_LONG, NULL, "I2", PDO_NOPREF, &idata }, + { PD_LONG, NULL, "I3", PDO_NOPREF, &idata }, + { PD_LONG, NULL, "I4", PDO_NOPREF, &idata }, + { PD_LONG, NULL, "I5", PDO_NOPREF, &idata }, #define I_LONG_N I_LONG_0+5 #define I_STRING_0 I_LONG_N - { PD_STRING, NULL, "S1", PDO_NOPREF, I2VP(300) }, - { PD_STRING, NULL, "S2", PDO_NOPREF, I2VP(300) }, - { PD_STRING, NULL, "S3", PDO_NOPREF, I2VP(300) }, - { PD_STRING, NULL, "S4", PDO_NOPREF, I2VP(300) }, + { PD_STRING, NULL, "S1", PDO_NOPREF, I2VP(300) }, + { PD_STRING, NULL, "S2", PDO_NOPREF, I2VP(300) }, + { PD_STRING, NULL, "S3", PDO_NOPREF, I2VP(300) }, + { PD_STRING, NULL, "S4", PDO_NOPREF, I2VP(300) }, #define I_STRING_N I_STRING_0+4 #define I_LAYER_0 I_STRING_N - { PD_DROPLIST, NULL, "Y1", PDO_NOPREF, I2VP(150), NULL, 0 }, + { PD_DROPLIST, NULL, "Y1", PDO_NOPREF, I2VP(150), NULL, 0 }, #define I_LAYER_N I_LAYER_0+1 #define I_COLOR_0 I_LAYER_N - { PD_COLORLIST, NULL, "C1", PDO_NOPREF, NULL, N_("Color"), BC_HORZ|BC_NOBORDER }, + { PD_COLORLIST, NULL, "C1", PDO_NOPREF, NULL, N_("Color"), BC_HORZ|BC_NOBORDER }, #define I_COLOR_N I_COLOR_0+1 #define I_LIST_0 I_COLOR_N - { PD_DROPLIST, NULL, "L1", PDO_NOPREF, I2VP(150), NULL, 0 }, - { PD_DROPLIST, NULL, "L2", PDO_NOPREF, I2VP(150), NULL, 0 }, + { PD_DROPLIST, NULL, "L1", PDO_NOPREF, I2VP(150), NULL, 0 }, + { PD_DROPLIST, NULL, "L2", PDO_NOPREF, I2VP(150), NULL, 0 }, { PD_DROPLIST, NULL, "L3", PDO_NOPREF, I2VP(150), NULL, 0 }, { PD_DROPLIST, NULL, "L4", PDO_NOPREF, I2VP(150), NULL, 0 }, #define I_LIST_N I_LIST_0+4 #define I_EDITLIST_0 I_LIST_N - { PD_DROPLIST, NULL, "LE1", PDO_NOPREF, I2VP(150), NULL, BL_EDITABLE }, + { PD_DROPLIST, NULL, "LE1", PDO_NOPREF, I2VP(150), NULL, BL_EDITABLE }, #define I_EDITLIST_N I_EDITLIST_0+1 #define I_TEXT_0 I_EDITLIST_N - { PD_TEXT, NULL, "T1", PDO_NOPREF, &tdata, NULL, BT_HSCROLL }, + { PD_TEXT, NULL, "T1", PDO_NOPREF, &tdata, NULL, BT_HSCROLL }, #define I_TEXT_N I_TEXT_0+1 #define I_PIVOT_0 I_TEXT_N - { PD_RADIO, NULL, "P1", PDO_NOPREF, pivotLabels, N_("Lock"), BC_HORZ|BC_NOBORDER, 0 }, + { PD_RADIO, NULL, "P1", PDO_NOPREF, pivotLabels, N_("Lock"), BC_HORZ|BC_NOBORDER, 0 }, #define I_PIVOT_N I_PIVOT_0+1 #define I_TOGGLE_0 I_PIVOT_N - { PD_TOGGLE, NULL, "boxed1", PDO_NOPREF|PDO_DLGHORZ, boxLabels, N_("Boxed"), BC_HORZ|BC_NOBORDER }, + { PD_TOGGLE, NULL, "boxed1", PDO_NOPREF|PDO_DLGHORZ, boxLabels, N_("Boxed"), BC_HORZ|BC_NOBORDER }, { PD_TOGGLE, NULL, "boxed2", PDO_NOPREF|PDO_DLGHORZ, boxLabels, N_("Boxed"), BC_HORZ|BC_NOBORDER }, { PD_TOGGLE, NULL, "boxed3", PDO_NOPREF|PDO_DLGHORZ, boxLabels, N_("Boxed"), BC_HORZ|BC_NOBORDER }, { PD_TOGGLE, NULL, "boxed4", PDO_NOPREF|PDO_DLGHORZ, boxLabels, N_("Boxed"), BC_HORZ|BC_NOBORDER }, @@ -161,16 +159,16 @@ static paramGroup_t describePG = { "describe", 0, describePLs, COUNT( describePL void CreateEditableLayersList() { - int i = 0; - int j = 0; + int i = 0; + int j = 0; - while (i < NUM_LAYERS) { - if (!GetLayerFrozen(i)) { - editableLayerList[j++] = i; - } + while (i < NUM_LAYERS) { + if (!GetLayerFrozen(i)) { + editableLayerList[j++] = i; + } - i++; - } + i++; + } } /** @@ -183,244 +181,254 @@ CreateEditableLayersList() static int SearchEditableLayerList(unsigned int layer) { - int i; + int i; - for (i = 0; i < NUM_LAYERS; i++) { - if (editableLayerList[i] == layer) { - return (i); - } - } + for (i = 0; i < NUM_LAYERS; i++) { + if (editableLayerList[i] == layer) { + return (i); + } + } - return (-1); + return (-1); } static void DrawDescHilite(BOOL_T selected) { - if (descNeedDrawHilite == FALSE) { - return; - } - - if (descColor==0) { - descColor = wDrawColorGray(87); - } - DrawRectangle(&tempD, descOrig, descSize, selected?descColor:wDrawColorBlue, DRAW_TRANSPARENT); + if (descNeedDrawHilite == FALSE) { + return; + } + + if (descColor==0) { + descColor = wDrawColorGray(87); + } + DrawRectangle(&tempD, descOrig, descSize, selected?descColor:wDrawColorBlue, + DRAW_TRANSPARENT); } static void DescribeUpdate( - paramGroup_p pg, - int inx, - void * data) + paramGroup_p pg, + int inx, + void * data) { - coOrd hi, lo; - descData_p ddp; - - if (inx < 0) { - return; - } - - ddp = (descData_p)pg->paramPtr[inx].context; - - if ((ddp->mode&(DESC_RO|DESC_IGNORE)) != 0) { - return; - } - - if (ddp->type == DESC_PIVOT) { - return; - } - - if (!descUndoStarted) { - UndoStart(_("Change Track"), "Change Track"); - descUndoStarted = TRUE; - } - - if (!descTrk) { - return; // In case timer pops after OK - } - - UndoModify(descTrk); - descUpdateFunc(descTrk, (int)(ddp-descData), descData, FALSE); - - if (descTrk) { - GetBoundingBox(descTrk, &hi, &lo); - if ((ddp->mode&DESC_NOREDRAW) == 0) { - descOrig = lo; - descSize = hi; - descOrig.x -= descBorder; - descOrig.y -= descBorder; - descSize.x -= descOrig.x-descBorder; - descSize.y -= descOrig.y-descBorder; - } - - - if (OFF_D(mapD.orig, mapD.size, descOrig, descSize)) { - ErrorMessage(MSG_MOVE_OUT_OF_BOUNDS); - } - } - - - for (inx = 0; inx < COUNT( describePLs ); inx++) { - if ((describePLs[inx].option & PDO_DLGIGNORE) != 0) { - continue; - } - - ddp = (descData_p)describePLs[inx].context; - - if ((ddp->mode&DESC_IGNORE) != 0) { - continue; - } - - if ((ddp->mode&DESC_CHANGE) == 0) { - if ((ddp->mode&DESC_CHANGE2) == 0) - continue; - } - - if (ddp->mode&DESC_RO) { - wControlActive(ddp->control0, FALSE); - } else { - wControlActive(ddp->control0, TRUE); - } - - ddp->mode &= ~DESC_CHANGE; - if (ddp->type == DESC_POS) { //POS Has two fields - if (ddp->mode&DESC_CHANGE2) { - ddp->mode &= ~DESC_CHANGE2; //Second time - } else { - ddp->mode |= DESC_CHANGE2; //First time - } - } - - ParamLoadControl(&describePG, inx); - } + coOrd hi, lo; + descData_p ddp; + + if (inx < 0) { + return; + } + + ddp = (descData_p)pg->paramPtr[inx].context; + + if ((ddp->mode&(DESC_RO|DESC_IGNORE)) != 0) { + return; + } + + if (ddp->type == DESC_PIVOT) { + return; + } + + if (!descUndoStarted) { + UndoStart(_("Change Track"), "Change Track"); + descUndoStarted = TRUE; + } + + if (!descTrk) { + return; // In case timer pops after OK + } + + UndoModify(descTrk); + descUpdateFunc(descTrk, (int)(ddp-descData), descData, FALSE); + + if (descTrk) { + GetBoundingBox(descTrk, &hi, &lo); + if ((ddp->mode&DESC_NOREDRAW) == 0) { + descOrig = lo; + descSize = hi; + descOrig.x -= descBorder; + descOrig.y -= descBorder; + descSize.x -= descOrig.x-descBorder; + descSize.y -= descOrig.y-descBorder; + } + + + if (OFF_D(mapD.orig, mapD.size, descOrig, descSize)) { + ErrorMessage(MSG_MOVE_OUT_OF_BOUNDS); + } + } + + + for (inx = 0; inx < COUNT( describePLs ); inx++) { + if ((describePLs[inx].option & PDO_DLGIGNORE) != 0) { + continue; + } + + ddp = (descData_p)describePLs[inx].context; + + if ((ddp->mode&DESC_IGNORE) != 0) { + continue; + } + + if ((ddp->mode&DESC_CHANGE) == 0) { + if ((ddp->mode&DESC_CHANGE2) == 0) { + continue; + } + } + + if (ddp->mode&DESC_RO) { + wControlActive(ddp->control0, FALSE); + } else { + wControlActive(ddp->control0, TRUE); + } + + ddp->mode &= ~DESC_CHANGE; + if (ddp->type == DESC_POS) { //POS Has two fields + if (ddp->mode&DESC_CHANGE2) { + ddp->mode &= ~DESC_CHANGE2; //Second time + } else { + ddp->mode |= DESC_CHANGE2; //First time + } + } + + ParamLoadControl(&describePG, inx); + } } static void DescOk(void * junk) { - wHide(describePG.win); - - if (layerValue && *layerValue>=0) { - SetTrkLayer(descTrk, editableLayerList[*layerValue]); //int found that is really in the parm controls. - } - layerValue = NULL; // wipe out reference - descUpdateFunc(descTrk, -1, descData, !descUndoStarted); - descTrk = NULL; - - if (descUndoStarted) { - UndoEnd(); - descUndoStarted = FALSE; - } - - descNeedDrawHilite = FALSE; - Reset(); // DescOk + wHide(describePG.win); + + if (layerValue && *layerValue>=0) { + SetTrkLayer(descTrk, + editableLayerList[*layerValue]); //int found that is really in the parm controls. + } + layerValue = NULL; // wipe out reference + descUpdateFunc(descTrk, -1, descData, !descUndoStarted); + descTrk = NULL; + + if (descUndoStarted) { + UndoEnd(); + descUndoStarted = FALSE; + } + + descNeedDrawHilite = FALSE; + if (programMode == MODE_DESIGN) { + Reset(); // DescOk + } else { + descNeedDrawHilite = FALSE; + wSetCursor(mainD.d,defaultCursor); + } } static struct { - parameterType pd_type; - long option; - int first; - int last; + parameterType pd_type; + long option; + int first; + int last; } descTypeMap[] = { - /*NULL*/ { 0, 0 }, - /*POS*/ { PD_FLOAT, PDO_DIM, I_FLOAT_0, I_FLOAT_N }, - /*FLOAT*/ { PD_FLOAT, 0, I_FLOAT_0, I_FLOAT_N }, - /*ANGLE*/ { PD_FLOAT, PDO_ANGLE, I_FLOAT_0, I_FLOAT_N }, - /*LONG*/ { PD_LONG, 0, I_LONG_0, I_LONG_N }, - /*COLOR*/ { PD_LONG, 0, I_COLOR_0, I_COLOR_N }, - /*DIM*/ { PD_FLOAT, PDO_DIM, I_FLOAT_0, I_FLOAT_N }, - /*PIVOT*/ { PD_RADIO, 0, I_PIVOT_0, I_PIVOT_N }, - /*LAYER*/ { PD_DROPLIST,PDO_LISTINDEX, I_LAYER_0, I_LAYER_N }, - /*STRING*/ { PD_STRING,0, I_STRING_0, I_STRING_N }, - /*TEXT*/ { PD_TEXT, PDO_DLGNOLABELALIGN, I_TEXT_0, I_TEXT_N }, - /*LIST*/ { PD_DROPLIST, PDO_LISTINDEX, I_LIST_0, I_LIST_N }, - /*EDITABLELIST*/{ PD_DROPLIST, 0, I_EDITLIST_0, I_EDITLIST_N }, + /*NULL*/ { 0, 0 }, + /*POS*/ { PD_FLOAT, PDO_DIM, I_FLOAT_0, I_FLOAT_N }, + /*FLOAT*/ { PD_FLOAT, 0, I_FLOAT_0, I_FLOAT_N }, + /*ANGLE*/ { PD_FLOAT, PDO_ANGLE, I_FLOAT_0, I_FLOAT_N }, + /*LONG*/ { PD_LONG, 0, I_LONG_0, I_LONG_N }, + /*COLOR*/ { PD_LONG, 0, I_COLOR_0, I_COLOR_N }, + /*DIM*/ { PD_FLOAT, PDO_DIM, I_FLOAT_0, I_FLOAT_N }, + /*PIVOT*/ { PD_RADIO, 0, I_PIVOT_0, I_PIVOT_N }, + /*LAYER*/ { PD_DROPLIST,PDO_LISTINDEX, I_LAYER_0, I_LAYER_N }, + /*STRING*/ { PD_STRING,0, I_STRING_0, I_STRING_N }, + /*TEXT*/ { PD_TEXT, PDO_DLGNOLABELALIGN, I_TEXT_0, I_TEXT_N }, + /*LIST*/ { PD_DROPLIST, PDO_LISTINDEX, I_LIST_0, I_LIST_N }, + /*EDITABLELIST*/{ PD_DROPLIST, 0, I_EDITLIST_0, I_EDITLIST_N }, /*BOXED*/ { PD_TOGGLE, 0, I_TOGGLE_0, I_TOGGLE_N }, }; /** * An unused param element is selected from the list of pre-defined param elements and initialized - * for an element specific param. - * + * for an element specific param. + * * \param ddp Element specific param * \param valueP the value pointer used by the element * \param label the label assigned by the element * \param sep ? * \return the selected widget */ - -static wControl_p AssignParamToDescribeDialog(descData_p ddp, void * valueP, char * label, - wWinPix_t sep) + +static wControl_p AssignParamToDescribeDialog(descData_p ddp, void * valueP, + char * label, + wWinPix_t sep) { - int inx; - - for (inx = descTypeMap[ddp->type].first; inxtype].last; - inx++) { - if ((describePLs[inx].option & PDO_DLGIGNORE) != 0) { - describePLs[inx].option = descTypeMap[ddp->type].option; - - if (describeW_posy > describeCmdButtonEnd) { - describePLs[inx].option |= PDO_DLGUNDERCMDBUTT; - } - - if (sep) - describeW_posy += wControlGetHeight(describePLs[inx].control) + sep; - describePLs[inx].context = ddp; - describePLs[inx].valueP = valueP; - if ((ddp->type == DESC_STRING) && ddp->max_string) { - describePLs[inx].max_string = ddp->max_string; - describePLs[inx].option |= PDO_STRINGLIMITLENGTH; - } - - if (label && ddp->type != DESC_TEXT) { - wControlSetLabel(describePLs[inx].control, label); - describePLs[inx].winLabel = label; - } else { - wControlSetLabel(describePLs[inx].control, ""); - describePLs[inx].winLabel = ""; - } - - return describePLs[inx].control; - } - } - - AbortProg("AssignParamToDescribeDialog: can't find %d", ddp->type); - return NULL; + int inx; + + for (inx = descTypeMap[ddp->type].first; inxtype].last; + inx++) { + if ((describePLs[inx].option & PDO_DLGIGNORE) != 0) { + describePLs[inx].option = descTypeMap[ddp->type].option; + + if (describeW_posy > describeCmdButtonEnd) { + describePLs[inx].option |= PDO_DLGUNDERCMDBUTT; + } + + if (sep) { + describeW_posy += wControlGetHeight(describePLs[inx].control) + sep; + } + describePLs[inx].context = ddp; + describePLs[inx].valueP = valueP; + if ((ddp->type == DESC_STRING) && ddp->max_string) { + describePLs[inx].max_string = ddp->max_string; + describePLs[inx].option |= PDO_STRINGLIMITLENGTH; + } + + if (label && ddp->type != DESC_TEXT) { + wControlSetLabel(describePLs[inx].control, label); + describePLs[inx].winLabel = label; + } else { + wControlSetLabel(describePLs[inx].control, ""); + describePLs[inx].winLabel = ""; + } + + return describePLs[inx].control; + } + } + + CHECKMSG( FALSE, ("AssignParamToDescribeDialog: can't find %d", ddp->type) ); + return NULL; } static void DescribeLayout( - paramData_t * pd, - int inx, - wWinPix_t colX, - wWinPix_t * x, - wWinPix_t * y) + paramData_t * pd, + int inx, + wWinPix_t colX, + wWinPix_t * x, + wWinPix_t * y) { - descData_p ddp; - wWinPix_t w, h; - - if (inx < 0) { - return; - } - - if (pd->context == NULL) { - return; - } - - ddp = (descData_p)pd->context; - *y = ddp->posy; - - if (ddp->type == DESC_POS && - ddp->control0 != pd->control) { - *x += wControlGetWidth(pd->control) + 3; - } else if (ddp->type == DESC_TEXT) { - w = tdata.width; - h = tdata.height; - wTextSetSize((wText_p)pd->control, w, h); - } - - wControlShow(pd->control, TRUE); + descData_p ddp; + wWinPix_t w, h; + + if (inx < 0) { + return; + } + + if (pd->context == NULL) { + return; + } + + ddp = (descData_p)pd->context; + *y = ddp->posy; + + if (ddp->type == DESC_POS && + ddp->control0 != pd->control) { + *x += wControlGetWidth(pd->control) + 3; + } else if (ddp->type == DESC_TEXT) { + w = tdata.width; + h = tdata.height; + wTextSetSize((wText_p)pd->control, w, h); + } + + wControlShow(pd->control, TRUE); } @@ -436,82 +444,82 @@ static void DescribeLayout( * */ -static wList_p setLayerL; +//static wList_p setLayerL; void DoDescribe(char * title, track_p trk, descData_p data, descUpdate_t update) { - int inx; - descData_p ddp; - char * label; - int ro_mode; - - if (!inDescribeCmd) { - return; - } - - CreateEditableLayersList(); - descTrk = trk; - descData = data; - descUpdateFunc = update; - describeW_posy = 0; - - if (describePG.win == NULL) { - /* SDB 5.13.2005 */ - ParamCreateDialog(&describePG, _("Description"), _("Done"), DescOk, - (paramActionCancelProc) DescribeCancel, - TRUE, DescribeLayout, F_RECALLPOS, - DescribeUpdate); - describeCmdButtonEnd = wControlBelow((wControl_p)describePG.helpB); - } - - for (inx=0; inxtype != DESC_NULL; ddp++) { - if (ddp->mode&DESC_IGNORE) { - continue; - } - - ddp->mode |= DESC_RO; - } - - for (ddp=data; ddp->type != DESC_NULL; ddp++) { - if (ddp->mode&DESC_IGNORE) { - continue; - } - - label = _(ddp->label); - ddp->posy = describeW_posy; - ddp->control0 = AssignParamToDescribeDialog(ddp, ddp->valueP, label, - (ddp->type == DESC_POS?3:3)); - if (ddp->type != DESC_LAYER) - wControlActive(ddp->control0, (!(ddp->mode&DESC_RO))); - - switch (ddp->type) { - case DESC_POS: - ddp->control1 = AssignParamToDescribeDialog(ddp, - &((coOrd*)(ddp->valueP))->y, - NULL, - 0); - wControlActive(ddp->control1, (!(ddp->mode&DESC_RO))); - break; - - case DESC_LAYER: - wListClear((wList_p)ddp->control0); // Rebuild list on each invocation - - if (ro_mode) { - char *layerFormattedName; - layerFormattedName = FormatLayerName(*(int *)(ddp->valueP)); - wListAddValue((wList_p)ddp->control0, layerFormattedName, NULL, I2VP(inx)); - free(layerFormattedName); - *(int *)(ddp->valueP) = 0; - layerValue = (int *)(ddp->valueP); - wControlActive(ddp->control0, FALSE); - } else { + int inx; + descData_p ddp; + char * label; + int ro_mode; + + if (!inDescribeCmd) { + return; + } + + CreateEditableLayersList(); + descTrk = trk; + descData = data; + descUpdateFunc = update; + describeW_posy = 0; + + if (describePG.win == NULL) { + /* SDB 5.13.2005 */ + ParamCreateDialog(&describePG, _("Description"), _("Done"), DescOk, + (paramActionCancelProc) DescribeCancel, + TRUE, DescribeLayout, F_RECALLPOS, + DescribeUpdate); + describeCmdButtonEnd = wControlBelow((wControl_p)describePG.helpB); + } + + for (inx=0; inxtype != DESC_NULL; ddp++) { + if (ddp->mode&DESC_IGNORE) { + continue; + } + + ddp->mode |= DESC_RO; + } + + for (ddp=data; ddp->type != DESC_NULL; ddp++) { + if (ddp->mode&DESC_IGNORE) { + continue; + } + + label = _(ddp->label); + ddp->posy = describeW_posy; + ddp->control0 = AssignParamToDescribeDialog(ddp, ddp->valueP, label, 3); + if (ddp->type != DESC_LAYER) { + wControlActive(ddp->control0, (!(ddp->mode&DESC_RO))); + } + + switch (ddp->type) { + case DESC_POS: + ddp->control1 = AssignParamToDescribeDialog(ddp, + &((coOrd*)(ddp->valueP))->y, + NULL, + 0); + wControlActive(ddp->control1, (!(ddp->mode&DESC_RO))); + break; + + case DESC_LAYER: + wListClear((wList_p)ddp->control0); // Rebuild list on each invocation + + if (ro_mode) { + char *layerFormattedName; + layerFormattedName = FormatLayerName(*(int *)(ddp->valueP)); + wListAddValue((wList_p)ddp->control0, layerFormattedName, NULL, I2VP(inx)); + free(layerFormattedName); + *(int *)(ddp->valueP) = 0; + layerValue = (int *)(ddp->valueP); + wControlActive(ddp->control0, FALSE); + } else { for (inx = 0; inxvalueP) = SearchEditableLayerList(*(int *)(ddp->valueP)); layerValue = (int *)(ddp->valueP); wControlActive(ddp->control0, TRUE); - } + } - break; + break; - default: - break; - } - } + default: + break; + } + } - ParamLayoutDialog(&describePG); - ParamLoadControls(&describePG); - sprintf(message, "%s (T%d)", title, GetTrkIndex(trk)); - wWinSetTitle(describePG.win, message); - wShow(describePG.win); + ParamLayoutDialog(&describePG); + ParamLoadControls(&describePG); + sprintf(message, "%s (T%d)", title, GetTrkIndex(trk)); + wWinSetTitle(describePG.win, message); + wShow(describePG.win); } static void DescChange(long changes) { if ((changes&CHANGE_UNITS) && describePG.win && wWinIsVisible(describePG.win)) { - ParamLoadControls(&describePG); - } + ParamLoadControls(&describePG); + } } /***************************************************************************** @@ -555,89 +563,90 @@ static void DescChange(long changes) EXPORT void DescribeCancel(void) { - if (describePG.win && wWinIsVisible(describePG.win)) { - if (descTrk) { - ASSERT(!IsTrackDeleted(descTrk)); - descUpdateFunc(descTrk, -1, descData, TRUE); - descTrk = NULL; + if (describePG.win && wWinIsVisible(describePG.win)) { + if (descTrk) { + CHECK(!IsTrackDeleted(descTrk)); + descUpdateFunc(descTrk, -1, descData, TRUE); + descTrk = NULL; - } + } - wHide(describePG.win); + wHide(describePG.win); - if (descUndoStarted) { - UndoEnd(); - descUndoStarted = FALSE; - } - } + if (descUndoStarted) { + UndoEnd(); + descUndoStarted = FALSE; + } + } - descNeedDrawHilite = FALSE; + descNeedDrawHilite = FALSE; } EXPORT STATUS_T CmdDescribe(wAction_t action, coOrd pos) { - static track_p trk; - char msg[STR_SIZE]; - - switch (action) { - case C_START: - InfoMessage(_("Select track to describe +Shift for Frozen")); - wSetCursor(mainD.d,wCursorQuestion); - descUndoStarted = FALSE; - trk = NULL; - return C_CONTINUE; - - case wActionMove: - trk = OnTrack(&pos, FALSE, FALSE); - if (trk && GetLayerFrozen(GetTrkLayer(trk)) && !(MyGetKeyState() & WKEY_SHIFT)) { + static track_p trk; + char msg[STR_SIZE]; + + switch (action) { + case C_START: + InfoMessage(_("Select track to describe +Shift for Frozen")); + wSetCursor(mainD.d,wCursorQuestion); + descUndoStarted = FALSE; + trk = NULL; + return C_CONTINUE; + + case wActionMove: + trk = OnTrack(&pos, FALSE, FALSE); + if (trk && GetLayerFrozen(GetTrkLayer(trk)) + && !(MyGetKeyState() & WKEY_SHIFT)) { trk = NULL; return C_CONTINUE; } - return C_CONTINUE; - - - case C_DOWN: - if ((trk = OnTrack(&pos, FALSE, FALSE)) != NULL) { - if (GetLayerFrozen(GetTrkLayer(trk)) && !(MyGetKeyState()& WKEY_SHIFT)) { - InfoMessage("Track is Frozen, Add Shift to Describe"); - trk = NULL; - return C_CONTINUE; - } - if (describePG.win && wWinIsVisible(describePG.win) && descTrk) { - descUpdateFunc(descTrk, -1, descData, TRUE); - descTrk = NULL; - } - - descBorder = mainD.scale*0.1; - - if (descBorder < trackGauge) { - descBorder = trackGauge; - } - - inDescribeCmd = TRUE; - GetBoundingBox(trk, &descSize, &descOrig); - descOrig.x -= descBorder; - descOrig.y -= descBorder; - descSize.x -= descOrig.x-descBorder; - descSize.y -= descOrig.y-descBorder; - descNeedDrawHilite = TRUE; - DescribeTrack(trk, msg, 255); - inDescribeCmd = FALSE; - InfoMessage(msg); - trk = NULL; - } else { - InfoMessage(""); - } - - return C_CONTINUE; - - case C_REDRAW: - - if (describePG.win && wWinIsVisible(describePG.win) && descTrk) { - descNeedDrawHilite = TRUE; - coOrd lo,hi; - GetBoundingBox(descTrk,&hi,&lo); + return C_CONTINUE; + + + case C_DOWN: + if ((trk = OnTrack(&pos, FALSE, FALSE)) != NULL) { + if (GetLayerFrozen(GetTrkLayer(trk)) && !(MyGetKeyState()& WKEY_SHIFT)) { + InfoMessage("Track is Frozen, Add Shift to Describe"); + trk = NULL; + return C_CONTINUE; + } + if (describePG.win && wWinIsVisible(describePG.win) && descTrk) { + descUpdateFunc(descTrk, -1, descData, TRUE); + descTrk = NULL; + } + + descBorder = mainD.scale*0.1; + + if (descBorder < trackGauge) { + descBorder = trackGauge; + } + + inDescribeCmd = TRUE; + GetBoundingBox(trk, &descSize, &descOrig); + descOrig.x -= descBorder; + descOrig.y -= descBorder; + descSize.x -= descOrig.x-descBorder; + descSize.y -= descOrig.y-descBorder; + descNeedDrawHilite = TRUE; + DescribeTrack(trk, msg, 255); + inDescribeCmd = FALSE; + InfoMessage(msg); + trk = NULL; + } else { + InfoMessage(""); + } + + return C_CONTINUE; + + case C_REDRAW: + + if (describePG.win && wWinIsVisible(describePG.win) && descTrk) { + descNeedDrawHilite = TRUE; + coOrd lo,hi; + GetBoundingBox(descTrk,&hi,&lo); descOrig = lo; descSize = hi; descOrig.x -= descBorder; @@ -645,54 +654,53 @@ EXPORT STATUS_T CmdDescribe(wAction_t action, coOrd pos) descSize.x -= descOrig.x-descBorder; descSize.y -= descOrig.y-descBorder; - DrawDescHilite(TRUE); + DrawDescHilite(TRUE); - if (descTrk && QueryTrack(descTrk, Q_IS_DRAW)) { + if (descTrk && QueryTrack(descTrk, Q_IS_DRAW)) { DrawOriginAnchor(descTrk); } - } else if (trk){ - DrawTrack(trk,&tempD,wDrawColorPreviewSelected); - } + } else if (trk) { + DrawTrack(trk,&tempD,wDrawColorPreviewSelected); + } - break; + break; - case C_CANCEL: - DescribeCancel(); - wSetCursor(mainD.d,defaultCursor); - return C_CONTINUE; + case C_CANCEL: + DescribeCancel(); + wSetCursor(mainD.d,defaultCursor); + return C_CONTINUE; - case C_CMDMENU: - menuPos = pos; - if (!trk) wMenuPopupShow(descPopupM); - return C_CONTINUE; - } + case C_CMDMENU: + menuPos = pos; + if (!trk) { wMenuPopupShow(descPopupM); } + return C_CONTINUE; + } - return C_CONTINUE; + return C_CONTINUE; } -#include "bitmaps/describe.xpm" - -extern wIndex_t selectCmdInx; -extern wIndex_t modifyCmdInx; -extern wIndex_t panCmdInx; +#include "bitmaps/describe.xpm3" void InitCmdDescribe(wMenu_p menu) { - describeCmdInx = AddMenuButton(menu, CmdDescribe, "cmdDescribe", - _("Properties"), wIconCreatePixMap(describe_xpm[iconSize]), - LEVEL0, IC_CANCEL|IC_POPUP|IC_WANT_MOVE|IC_CMDMENU, ACCL_DESCRIBE, NULL); - RegisterChangeNotification(DescChange); - ParamRegister(&describePG); + describeCmdInx = AddMenuButton(menu, CmdDescribe, "cmdDescribe", + _("Properties"), wIconCreatePixMap(describe_xpm3[iconSize]), + LEVEL0, IC_CANCEL|IC_POPUP|IC_WANT_MOVE|IC_CMDMENU, ACCL_DESCRIBE, NULL); + RegisterChangeNotification(DescChange); + ParamRegister(&describePG); } void InitCmdDescribe2(wMenu_p menu) { - descPopupM = MenuRegister( "Describe Context Menu" ); - wMenuPushCreate(descPopupM, "cmdSelectMode", GetBalloonHelpStr("cmdSelectMode"), 0, DoCommandB, I2VP(selectCmdInx)); - wMenuPushCreate(descPopupM, "cmdModifyMode", GetBalloonHelpStr("cmdModifyMode"), 0, DoCommandB, I2VP(modifyCmdInx)); - wMenuPushCreate(descPopupM, "cmdPanMode", GetBalloonHelpStr("cmdPanMode"), 0, DoCommandB, I2VP(panCmdInx)); + descPopupM = MenuRegister( "Describe Context Menu" ); + wMenuPushCreate(descPopupM, "cmdSelectMode", GetBalloonHelpStr("cmdSelectMode"), + 0, DoCommandB, I2VP(selectCmdInx)); + wMenuPushCreate(descPopupM, "cmdModifyMode", GetBalloonHelpStr("cmdModifyMode"), + 0, DoCommandB, I2VP(modifyCmdInx)); + wMenuPushCreate(descPopupM, "cmdPanMode", GetBalloonHelpStr("cmdPanMode"), 0, + DoCommandB, I2VP(panCmdInx)); } diff --git a/app/bin/cmisc2.c b/app/bin/cmisc2.c deleted file mode 100644 index 128e52b..0000000 --- a/app/bin/cmisc2.c +++ /dev/null @@ -1,54 +0,0 @@ -/* - * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/cmisc2.c,v 1.4 2008-03-10 18:59:53 m_fischer Exp $ - */ - -/* XTrkCad - Model Railroad CAD - * Copyright (C) 2005 Dave Bullis - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -#include "common.h" -#include "track.h" - -/***************************************************************************** - * - * MISC2 - * - */ - - -static STATUS_T CmdBridge( wAction_t action, coOrd pos ) -{ - switch (action) { - case C_DOWN: - return C_INFO; - break; - } - return C_INFO; -} - - - - - -#include "bitmaps/bridge.xbm" - -void InitCmdMisc2( wMenu_p menu ) -{ - if (extraButtons) { - InitCommand( menu, CmdBridge, N_("Bridge"), bridge_bits, LEVEL2, IC_STICKY, ACCL_BRIDGE ); - } -} diff --git a/app/bin/cmodify.c b/app/bin/cmodify.c index 1e66e74..491aae3 100644 --- a/app/bin/cmodify.c +++ b/app/bin/cmodify.c @@ -17,7 +17,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "cjoin.h" @@ -34,25 +34,24 @@ #include "layout.h" #include "cselect.h" #include "common-ui.h" +#include "draw.h" + +EXPORT wIndex_t modifyCmdInx; static struct { - track_p Trk; - trackParams_t params; - coOrd pos00, pos00x, pos01; - ANGLE_T angle; - curveData_t curveData; - easementData_t jointD; - DIST_T r1; - BOOL_T valid; - BOOL_T first; - } Dex; + track_p Trk; + trackParams_t params; + coOrd pos00, pos00x, pos01; + ANGLE_T angle; + curveData_t curveData; + easementData_t jointD; + DIST_T r1; + BOOL_T valid; + BOOL_T first; +} Dex; static wMenu_p modPopupM; -extern wIndex_t selectCmdInx; -extern wIndex_t joinCmdInx; -extern wIndex_t describeCmdInx; - static dynArr_t anchors_da; #define anchors(N) DYNARR_N(trkSeg_t,anchors_da,N) @@ -65,7 +64,8 @@ static BOOL_T modifyProtractorMode; static BOOL_T modifyExtendMode; -static void CreateEndAnchor(coOrd p, wBool_t lock) { +static void CreateEndAnchor(coOrd p, wBool_t lock) +{ DIST_T d = tempD.scale*0.15; DYNARR_APPEND(trkSeg_t,anchors_da,1); @@ -76,11 +76,12 @@ static void CreateEndAnchor(coOrd p, wBool_t lock) { anchors(i).u.c.radius = d/2; anchors(i).u.c.a0 = 0.0; anchors(i).u.c.a1 = 360.0; - anchors(i).width = 0; + anchors(i).lineWidth = 0; wSetCursor(mainD.d,wCursorNone); } -static void CreateCornuAnchor(coOrd p, wBool_t lock) { +static void CreateCornuAnchor(coOrd p, wBool_t lock) +{ DIST_T d = tempD.scale*0.15; DYNARR_APPEND(trkSeg_t,anchors_da,1); @@ -91,7 +92,7 @@ static void CreateCornuAnchor(coOrd p, wBool_t lock) { anchors(i).u.c.radius = d/2; anchors(i).u.c.a0 = 0.0; anchors(i).u.c.a1 = 360.0; - anchors(i).width = 0; + anchors(i).lineWidth = 0; DYNARR_APPEND(trkSeg_t,anchors_da,1); i = anchors_da.cnt-1; anchors(i).type = SEG_CRVLIN; @@ -100,42 +101,45 @@ static void CreateCornuAnchor(coOrd p, wBool_t lock) { anchors(i).u.c.radius = d; anchors(i).u.c.a0 = 0.0; anchors(i).u.c.a1 = 360.0; - anchors(i).width = 0; + anchors(i).lineWidth = 0; wSetCursor(mainD.d,wCursorNone); } -static void CreateRadiusAnchor(coOrd p, ANGLE_T a, BOOL_T bi) { +static void CreateRadiusAnchor(coOrd p, ANGLE_T a, BOOL_T bi) +{ DYNARR_SET(trkSeg_t,anchors_da,anchors_da.cnt+5); - DrawArrowHeads(&DYNARR_N(trkSeg_t,anchors_da,anchors_da.cnt-5),p,a,bi,wDrawColorBlue); + DrawArrowHeads(&DYNARR_N(trkSeg_t,anchors_da,anchors_da.cnt-5),p,a,bi, + wDrawColorBlue); } /* * Call cbezier.c CmdBezModify to alter Bezier Track and Lines. * Picking a Bezier will allow control point(s) modifications until terminated with "Enter" */ -static STATUS_T ModifyBezier(wAction_t action, coOrd pos) { +static STATUS_T ModifyBezier(wAction_t action, coOrd pos) +{ STATUS_T rc = C_CONTINUE; - if (Dex.Trk == NULL) return C_ERROR; //No track picked yet! + if (Dex.Trk == NULL) { return C_ERROR; } //No track picked yet! switch (action&0xFF) { - case C_START: - case C_DOWN: - case C_MOVE: - case C_UP: - case C_OK: - case C_TEXT: - case wActionMove: - trackGauge = (IsTrack(Dex.Trk)?GetTrkGauge(Dex.Trk):0.0); - rc = CmdBezModify(Dex.Trk, action, pos, trackGauge); - break; - case C_TERMINATE: - rc = CmdBezModify(Dex.Trk, action, pos, trackGauge); - Dex.Trk = NULL; - modifyBezierMode = FALSE; - break; - case C_REDRAW: - rc = CmdBezModify(Dex.Trk, action, pos, trackGauge); - break; + case C_START: + case C_DOWN: + case C_MOVE: + case C_UP: + case C_OK: + case C_TEXT: + case wActionMove: + trackGauge = (IsTrack(Dex.Trk)?GetTrkGauge(Dex.Trk):0.0); + rc = CmdBezModify(Dex.Trk, action, pos, trackGauge); + break; + case C_TERMINATE: + rc = CmdBezModify(Dex.Trk, action, pos, trackGauge); + Dex.Trk = NULL; + modifyBezierMode = FALSE; + break; + case C_REDRAW: + rc = CmdBezModify(Dex.Trk, action, pos, trackGauge); + break; } return rc; } @@ -144,29 +148,30 @@ static STATUS_T ModifyBezier(wAction_t action, coOrd pos) { * Call ccornu.c CmdCornuModify to alter Cornu Track and Lines. * Picking a Cornu will allow end point(s) modifications until terminated with "Enter" */ -static STATUS_T ModifyCornu(wAction_t action, coOrd pos) { +static STATUS_T ModifyCornu(wAction_t action, coOrd pos) +{ STATUS_T rc = C_CONTINUE; - if (Dex.Trk == NULL) return C_ERROR; //No track picked yet! + if (Dex.Trk == NULL) { return C_ERROR; } //No track picked yet! switch (action&0xFF) { - case C_LCLICK: - case C_START: - case C_DOWN: - case C_MOVE: - case C_UP: - case C_OK: - case C_TEXT: - case wActionMove: - trackGauge = (IsTrack(Dex.Trk)?GetTrkGauge(Dex.Trk):0.0); - rc = CmdCornuModify(Dex.Trk, action, pos, trackGauge); - break; - case C_TERMINATE: - rc = CmdCornuModify(Dex.Trk, action, pos, trackGauge); - Dex.Trk = NULL; - modifyCornuMode = FALSE; - break; - case C_REDRAW: - rc = CmdCornuModify(Dex.Trk, action, pos, trackGauge); - break; + case C_LCLICK: + case C_START: + case C_DOWN: + case C_MOVE: + case C_UP: + case C_OK: + case C_TEXT: + case wActionMove: + trackGauge = (IsTrack(Dex.Trk)?GetTrkGauge(Dex.Trk):0.0); + rc = CmdCornuModify(Dex.Trk, action, pos, trackGauge); + break; + case C_TERMINATE: + rc = CmdCornuModify(Dex.Trk, action, pos, trackGauge); + Dex.Trk = NULL; + modifyCornuMode = FALSE; + break; + case C_REDRAW: + rc = CmdCornuModify(Dex.Trk, action, pos, trackGauge); + break; } return rc; } @@ -174,64 +179,66 @@ static STATUS_T ModifyCornu(wAction_t action, coOrd pos) { /* * Picking a DRAW will allow point modifications until terminated with "Enter"/"Space" */ -static STATUS_T ModifyDraw(wAction_t action, coOrd pos) { +static STATUS_T ModifyDraw(wAction_t action, coOrd pos) +{ STATUS_T rc = C_CONTINUE; - if (Dex.Trk == NULL) return C_ERROR; //No item picked yet! + if (Dex.Trk == NULL) { return C_ERROR; } //No item picked yet! switch (action&0xFF) { - case C_START: - case C_DOWN: - case C_MOVE: - case C_UP: - rc = ModifyTrack( Dex.Trk, action, pos ); - break; - case wActionMove: - rc = ModifyTrack( Dex.Trk, action, pos ); - break; - case C_TEXT: - //Delete or '0' - continues - if ((action>>8 !=32) && (action >>8 !=13) && (action >>8 !=9)) - return ModifyTrack( Dex.Trk, action, pos ); - //Enter/Space/Tab does not - if ((action>>8 !=32) && (action>>8 != 13) && (action>>8 != 9)) return C_CONTINUE; - if (((action>>8) == 9 && (MyGetKeyState()&WKEY_SHIFT))) return C_TERMINATE; - /*no break*/ - case C_OK: - rc = ModifyTrack( Dex.Trk, C_OK, pos ); - if (rc != C_CONTINUE) modifyDrawMode = FALSE; - UndoEnd(); - break; - case C_CONFIRM: - rc = ModifyTrack( Dex.Trk, action, pos ); - break; - case C_CANCEL: - case C_FINISH: - case C_TERMINATE: - rc = ModifyTrack( Dex.Trk, action, pos ); - Dex.Trk = NULL; - modifyDrawMode = FALSE; - tempSegs_da.cnt = 0; - rc = C_CONTINUE; - break; - case C_REDRAW: - rc = ModifyTrack( Dex.Trk, action, pos ); - break; - case C_CMDMENU: - menuPos = pos; - rc = ModifyTrack( Dex.Trk, action, pos ); - break; - case wActionExtKey: - rc = ModifyTrack( Dex.Trk, action, pos ); - break; - default: - break; + case C_START: + case C_DOWN: + case C_MOVE: + case C_UP: + rc = ModifyTrack( Dex.Trk, action, pos ); + break; + case wActionMove: + rc = ModifyTrack( Dex.Trk, action, pos ); + break; + case C_TEXT: + //Delete or '0' - continues + if ((action>>8 !=32) && (action >>8 !=13) && (action >>8 !=9)) { + return ModifyTrack( Dex.Trk, action, pos ); + } + //Enter/Space/Tab does not + if ((action>>8 !=32) && (action>>8 != 13) && (action>>8 != 9)) { return C_CONTINUE; } + if (((action>>8) == 9 && (MyGetKeyState()&WKEY_SHIFT))) { return C_TERMINATE; } + /*no break*/ + case C_OK: + rc = ModifyTrack( Dex.Trk, C_OK, pos ); + if (rc != C_CONTINUE) { modifyDrawMode = FALSE; } + UndoEnd(); + break; + case C_CONFIRM: + rc = ModifyTrack( Dex.Trk, action, pos ); + break; + case C_CANCEL: + case C_FINISH: + case C_TERMINATE: + rc = ModifyTrack( Dex.Trk, action, pos ); + Dex.Trk = NULL; + modifyDrawMode = FALSE; + DYNARR_RESET( trkSeg_t, tempSegs_da ); + rc = C_CONTINUE; + break; + case C_REDRAW: + rc = ModifyTrack( Dex.Trk, action, pos ); + break; + case C_CMDMENU: + menuPos = pos; + rc = ModifyTrack( Dex.Trk, action, pos ); + break; + case wActionExtKey: + rc = ModifyTrack( Dex.Trk, action, pos ); + break; + default: + break; } return rc; } STATUS_T CmdModify( - wAction_t action, - coOrd pos ) + wAction_t action, + coOrd pos ) /* * Extend and alter a track. * Extend a track with a curve or straight and optionally an easement. @@ -253,19 +260,22 @@ STATUS_T CmdModify( static DIST_T trackGauge; if ( changeTrackMode ) { - if ( action == C_MOVE ) + if ( action == C_MOVE ) { action = C_RMOVE; - if ( action == C_UP ) + } + if ( action == C_UP ) { action = C_RUP; + } } switch (action&0xFF) { case C_START: DYNARR_RESET(trkSeg_t,anchors_da); - InfoMessage( _("Select a track to modify, Left-Click change length, Right-Click to add flextrack") ); + InfoMessage( + _("Select a track to modify, Left-Click change length, Right-Click to add flextrack") ); Dex.Trk = NULL; - tempSegs_da.cnt = 0; + DYNARR_RESET( trkSeg_t, tempSegs_da ); /*ChangeParameter( &easementPD );*/ trackGauge = 0.0; changeTrackMode = modifyRulerMode = FALSE; @@ -281,21 +291,25 @@ STATUS_T CmdModify( case C_DOWN: case C_LDOUBLE: DYNARR_RESET(trkSeg_t,anchors_da); - if (modifyProtractorMode) + if (modifyProtractorMode) { return ModifyProtractor(C_DOWN, pos); - if (modifyBezierMode) + } + if (modifyBezierMode) { return ModifyBezier(C_DOWN, pos); - if (modifyCornuMode) + } + if (modifyCornuMode) { return ModifyCornu(C_DOWN, pos); - if (modifyDrawMode) + } + if (modifyDrawMode) { return ModifyDraw(C_DOWN, pos); + } DYNARR_SET( trkSeg_t, tempSegs_da, 2 ); tempSegs(0).color = wDrawColorBlack; - tempSegs(0).width = 0; + tempSegs(0).lineWidth = 0; tempSegs(1).color = wDrawColorBlack; - tempSegs(1).width = 0; - tempSegs_da.cnt = 0; + tempSegs(1).lineWidth = 0; + DYNARR_RESET( trkSeg_t, tempSegs_da ); Dex.Trk = OnTrack( &pos, FALSE, FALSE ); //Dex.Trk = trk; if (Dex.Trk == NULL) { @@ -320,7 +334,7 @@ STATUS_T CmdModify( if (ModifyBezier(C_START, pos) != C_CONTINUE) { //Call Start with track modifyBezierMode = FALSE; //Function rejected Bezier Dex.Trk =NULL; - tempSegs_da.cnt = 0; + DYNARR_RESET( trkSeg_t, tempSegs_da ); } return C_CONTINUE; //That's it } @@ -329,7 +343,7 @@ STATUS_T CmdModify( if (ModifyCornu(C_START, pos) != C_CONTINUE) { //Call Start with track modifyCornuMode = FALSE; //Function rejected Cornu Dex.Trk =NULL; - tempSegs_da.cnt = 0; + DYNARR_RESET( trkSeg_t, tempSegs_da ); } return C_CONTINUE; //That's it @@ -340,32 +354,34 @@ STATUS_T CmdModify( if (ModifyDraw(C_START, pos) != C_CONTINUE) { modifyDrawMode = FALSE; Dex.Trk = NULL; - tempSegs_da.cnt = 0; + DYNARR_RESET( trkSeg_t, tempSegs_da ); } return C_CONTINUE; } - if ((action&0xFF) == C_LDOUBLE) return C_ERROR; + if ((action&0xFF) == C_LDOUBLE) { return C_ERROR; } - if ((MyGetKeyState()&WKEY_CTRL)) goto extendTrack; + if ((MyGetKeyState()&WKEY_CTRL)) { goto extendTrack; } if ( (MyGetKeyState()&WKEY_SHIFT) && //Free to change radius - QueryTrack( Dex.Trk, Q_CAN_MODIFYRADIUS )&& - ((inx=PickUnconnectedEndPoint(pos,Dex.Trk)) >= 0 )) { + QueryTrack( Dex.Trk, Q_CAN_MODIFYRADIUS )&& + ((inx=PickUnconnectedEndPoint(pos,Dex.Trk)) >= 0 )) { trk = Dex.Trk; - while ( (trk1=GetTrkEndTrk(trk,1-inx)) && //Means next track to mine even if can be end... - QueryTrack(trk1, Q_CANNOT_BE_ON_END) ) { + while ( (trk1=GetTrkEndTrk(trk,1-inx)) + && //Means next track to mine even if can be end... + QueryTrack(trk1, Q_CANNOT_BE_ON_END) ) { inx = GetEndPtConnectedToMe( trk1, trk ); trk = trk1; } if (trk1) { - UndoStart( _("Change Track"), "Change( T%d[%d] )", GetTrkIndex(Dex.Trk), Dex.params.ep ); + UndoStart( _("Change Track"), "Change( T%d[%d] )", GetTrkIndex(Dex.Trk), + Dex.params.ep ); inx = GetEndPtConnectedToMe( trk1, trk ); - Dex.Trk = NULL; - UndrawNewTrack( trk ); - DeleteTrack(trk, TRUE); //Get rid of original track + Dex.Trk = NULL; + UndrawNewTrack( trk ); + DeleteTrack(trk, TRUE); //Get rid of original track if ( !GetTrkEndTrk( trk1, inx ) ) { Dex.Trk = trk1; Dex.pos00 = GetTrkEndPos( Dex.Trk, inx ); @@ -385,9 +401,9 @@ STATUS_T CmdModify( case wActionMove: DYNARR_RESET(trkSeg_t,anchors_da); - if (modifyCornuMode) return ModifyCornu(wActionMove,pos); - if (modifyDrawMode) return ModifyDraw(wActionMove,pos); - if (modifyBezierMode) return ModifyBezier(wActionMove, pos); + if (modifyCornuMode) { return ModifyCornu(wActionMove,pos); } + if (modifyDrawMode) { return ModifyDraw(wActionMove,pos); } + if (modifyBezierMode) { return ModifyBezier(wActionMove, pos); } track_p t; wSetCursor(mainD.d,defaultCursor); if (((t=OnTrack(&pos,FALSE,TRUE))!= NULL) && CheckTrackLayerSilent( t )) { @@ -395,11 +411,12 @@ STATUS_T CmdModify( if (QueryTrack( t, Q_IS_CORNU )) { CreateCornuAnchor(pos,FALSE); } else if ( QueryTrack( t, Q_CAN_MODIFY_CONTROL_POINTS )) { - CreateRadiusAnchor(pos,NormalizeAngle(GetAngleAtPoint(t,pos,NULL,NULL)+90.0),TRUE); + CreateRadiusAnchor(pos,NormalizeAngle(GetAngleAtPoint(t,pos,NULL,NULL)+90.0), + TRUE); CreateEndAnchor(pos,FALSE); - } else if (QueryTrack(t,Q_CAN_ADD_ENDPOINTS)){ //Turntable + } else if (QueryTrack(t,Q_CAN_ADD_ENDPOINTS)) { //Turntable trackParams_t tp; - if (!GetTrackParams(PARAMS_CORNU, t, pos, &tp)) return C_CONTINUE; + if (!GetTrackParams(PARAMS_CORNU, t, pos, &tp)) { return C_CONTINUE; } ANGLE_T a = tp.angle; Translate(&pos,tp.ttcenter,a,tp.ttradius); CreateRadiusAnchor(pos,a,FALSE); @@ -414,15 +431,17 @@ STATUS_T CmdModify( } else { CreateEndAnchor(pos,FALSE); if ((MyGetKeyState()&WKEY_SHIFT) && //Shift Down - QueryTrack( t, Q_CAN_MODIFYRADIUS ) && // Straight or Curve - ((inx=PickUnconnectedEndPointSilent(pos,t)) >= 0 )) { //Which has an open end - if (GetTrkEndTrk(t,1-inx)) // Has to have a track on other end - CreateRadiusAnchor(pos,NormalizeAngle(GetAngleAtPoint(t,pos,NULL,NULL)+90.0),TRUE); + QueryTrack( t, Q_CAN_MODIFYRADIUS ) && // Straight or Curve + ((inx=PickUnconnectedEndPointSilent(pos,t)) >= 0 )) { //Which has an open end + if (GetTrkEndTrk(t,1-inx)) { // Has to have a track on other end + CreateRadiusAnchor(pos,NormalizeAngle(GetAngleAtPoint(t,pos,NULL,NULL)+90.0), + TRUE); + } } CreateRadiusAnchor(pos,GetAngleAtPoint(t,pos,NULL,NULL),TRUE); } } - } else if (ep>=0){ //Turnout + } else if (ep>=0) { //Turnout pos = GetTrkEndPos(t, ep); CreateEndAnchor(pos,TRUE); if ( (MyGetKeyState()&WKEY_CTRL)) { @@ -435,8 +454,8 @@ STATUS_T CmdModify( } } } else if (((t=OnTrack(&pos,FALSE,FALSE))!= NULL) - && (!(GetLayerFrozen(GetTrkLayer(t)) || GetLayerModule(GetTrkLayer(t)))) - && (QueryTrack(t, Q_IS_DRAW ) && !QueryTrack(t, Q_IS_TEXT)) ) { + && (!(GetLayerFrozen(GetTrkLayer(t)) || GetLayerModule(GetTrkLayer(t)))) + && (QueryTrack(t, Q_IS_DRAW ) && !QueryTrack(t, Q_IS_TEXT)) ) { CreateEndAnchor(pos,FALSE); } else { ModifyRuler (wActionMove, pos); @@ -444,23 +463,29 @@ STATUS_T CmdModify( return C_CONTINUE; case C_MOVE: - if ( modifyRulerMode ) + if ( modifyRulerMode ) { return ModifyRuler( C_MOVE, pos ); - if ( modifyProtractorMode ) + } + if ( modifyProtractorMode ) { return ModifyProtractor( C_MOVE, pos ); - if (Dex.Trk == NULL) + } + if (Dex.Trk == NULL) { return C_CONTINUE; - if ( modifyBezierMode ) + } + if ( modifyBezierMode ) { return ModifyBezier(C_MOVE, pos); - if ( modifyCornuMode ) + } + if ( modifyCornuMode ) { return ModifyCornu(C_MOVE, pos); - if ( modifyDrawMode) + } + if ( modifyDrawMode) { return ModifyDraw(C_MOVE, pos); - if (modifyExtendMode && (MyGetKeyState()&WKEY_CTRL)) + } + if (modifyExtendMode && (MyGetKeyState()&WKEY_CTRL)) { goto extendTrackMove; - tempSegs_da.cnt = 0; + } - if ((MyGetKeyState() & WKEY_ALT) == 0) SnapPos( &pos ); + if ((MyGetKeyState() & WKEY_ALT) == 0) { SnapPos( &pos ); } rc = ModifyTrack( Dex.Trk, C_MOVE, pos ); if ( rc != C_CONTINUE ) { rc = C_CONTINUE; @@ -470,28 +495,35 @@ STATUS_T CmdModify( case C_UP: DYNARR_RESET(trkSeg_t,anchors_da); - if (Dex.Trk == NULL) + if (Dex.Trk == NULL) { return C_CONTINUE; - if ( modifyRulerMode ) + } + if ( modifyRulerMode ) { return ModifyRuler( C_MOVE, pos ); - if ( modifyProtractorMode) + } + if ( modifyProtractorMode) { return ModifyProtractor( C_UP, pos); - if ( modifyBezierMode ) + } + if ( modifyBezierMode ) { return ModifyBezier( C_UP, pos); - if (modifyCornuMode) + } + if (modifyCornuMode) { return ModifyCornu(C_UP, pos); - if (modifyDrawMode) + } + if (modifyDrawMode) { return ModifyDraw(C_UP, pos); - if ((MyGetKeyState()&WKEY_CTRL)) goto extendTrackUp; + } + if ((MyGetKeyState()&WKEY_CTRL)) { goto extendTrackUp; } - tempSegs_da.cnt = 0; - if ((MyGetKeyState() & WKEY_ALT) == 0) SnapPos( &pos ); - UndoStart( _("Modify Track"), "Modify( T%d[%d] )", GetTrkIndex(Dex.Trk), Dex.params.ep ); + if ((MyGetKeyState() & WKEY_ALT) == 0) { SnapPos( &pos ); } + UndoStart( _("Modify Track"), "Modify( T%d[%d] )", GetTrkIndex(Dex.Trk), + Dex.params.ep ); UndoModify( Dex.Trk ); rc = ModifyTrack( Dex.Trk, C_UP, pos ); + DYNARR_RESET( trkSeg_t, tempSegs_da ); UndoEnd(); - Dex.Trk = NULL; + Dex.Trk = NULL; return rc; case C_RDOWN: //This is same as context menu.... @@ -514,7 +546,7 @@ extendTrack: } trackGauge = GetTrkGauge( Dex.Trk ); Dex.pos00 = pos; - CHANGE_TRACK: +CHANGE_TRACK: if (GetTrackParams( PARAMS_EXTEND, Dex.Trk, Dex.pos00, &Dex.params)) { if (Dex.params.ep == -1) { Dex.Trk = NULL; @@ -527,8 +559,8 @@ extendTrack: Dex.pos00 = GetTrkEndPos(Dex.Trk,Dex.params.ep); Dex.angle = GetTrkEndAngle( Dex.Trk,Dex.params.ep); Translate( &Dex.pos00x, Dex.pos00, Dex.angle, 10.0 ); - LOG( log_modify, 1, ("extend endPt[%d] = [%0.3f %0.3f] A%0.3f\n", - Dex.params.ep, Dex.pos00.x, Dex.pos00.y, Dex.angle ) ) + LOG( log_modify, 1, ("extend endPt[%d] = [%0.3f %0.3f] A%0.3f\n", + Dex.params.ep, Dex.pos00.x, Dex.pos00.y, Dex.angle ) ) InfoMessage( _("Drag to add flex track") ); } else { return C_ERROR; @@ -542,40 +574,47 @@ extendTrack: InfoMessage ( _("No track selected")); return C_ERROR; } - /* no break */ + /* no break */ case C_RMOVE: extendTrackMove: DYNARR_RESET(trkSeg_t,anchors_da); - tempSegs_da.cnt = 0; + DYNARR_RESET( trkSeg_t, tempSegs_da ); Dex.valid = FALSE; - if (Dex.Trk == NULL) return C_CONTINUE; - if ((MyGetKeyState() & WKEY_ALT) == 0) SnapPos( &pos ); - if ( Dex.first && FindDistance( pos, Dex.pos00 ) <= minLength ) + if (Dex.Trk == NULL) { return C_CONTINUE; } + if ((MyGetKeyState() & WKEY_ALT) == 0) { SnapPos( &pos ); } + if ( Dex.first && FindDistance( pos, Dex.pos00 ) <= minLength ) { return C_CONTINUE; + } Dex.first = FALSE; Dex.pos01 = Dex.pos00; - if (Dex.params.type == curveTypeCornu) { //Always Restrict Cornu drag out to match end + if (Dex.params.type == + curveTypeCornu) { //Always Restrict Cornu drag out to match end ANGLE_T angle2 = NormalizeAngle(FindAngle(pos, Dex.pos00)-Dex.angle); if (angle2 > 90.0 && angle2 < 270.0) { if (Dex.params.cornuRadius[Dex.params.ep] == 0) { Translate( &pos, Dex.pos00, Dex.angle, FindDistance( Dex.pos00, pos ) ); } else { ANGLE_T angle = FindAngle(Dex.params.cornuCenter[Dex.params.ep],pos)- - FindAngle(Dex.params.cornuCenter[Dex.params.ep],Dex.pos00); + FindAngle(Dex.params.cornuCenter[Dex.params.ep],Dex.pos00); pos=Dex.pos00; Rotate(&pos,Dex.params.cornuCenter[Dex.params.ep],angle); } - } else pos = Dex.pos00; //Only out from end - PlotCurve( crvCmdFromCornu, Dex.pos00, Dex.pos00x, pos, &Dex.curveData, FALSE, 0.0 ); - } else - PlotCurve( crvCmdFromEP1, Dex.pos00, Dex.pos00x, pos, &Dex.curveData, TRUE, 0.0 ); + } else { pos = Dex.pos00; } //Only out from end + PlotCurve( crvCmdFromCornu, Dex.pos00, Dex.pos00x, pos, &Dex.curveData, FALSE, + 0.0 ); + } else { + PlotCurve( crvCmdFromEP1, Dex.pos00, Dex.pos00x, pos, &Dex.curveData, TRUE, + 0.0 ); + } curveType = Dex.curveData.type; if ( curveType == curveTypeStraight ) { Dex.r1 = 0.0; - if (Dex.params.type == curveTypeCurve) { - if (ComputeJoint( Dex.params.arcR, Dex.r1, &Dex.jointD ) == E_ERROR) + if (Dex.params.type == curveTypeCurve && + !QueryTrack( Dex.Trk, Q_IGNORE_EASEMENT_ON_EXTEND ) ) { + if (ComputeJoint( Dex.params.arcR, Dex.r1, &Dex.jointD ) == E_ERROR) { return C_CONTINUE; + } d = Dex.params.len - Dex.jointD.d0; if (d <= minLength) { ErrorMessage( MSG_TRK_TOO_SHORT, "First ", PutDim(fabs(minLength-d)) ); @@ -584,8 +623,9 @@ extendTrackMove: } else { Dex.jointD.d1 = 0.0; } + DYNARR_SET( trkSeg_t, tempSegs_da, 1 ); tempSegs(0).type = SEG_STRTRK; - tempSegs(0).width = 0; + tempSegs(0).lineWidth = 0; tempSegs(0).u.l.pos[0] = Dex.pos01; tempSegs(0).u.l.pos[1] = Dex.curveData.pos1; d = FindDistance( Dex.pos01, Dex.curveData.pos1 ); @@ -594,50 +634,56 @@ extendTrackMove: ErrorMessage( MSG_TRK_TOO_SHORT, "Extending ", PutDim(fabs(minLength-d)) ); return C_CONTINUE; } - tempSegs_da.cnt = 1; Dex.valid = TRUE; if (action != C_RDOWN) InfoMessage( _("Straight Track: Length=%s Angle=%0.3f"), - FormatDistance( FindDistance( Dex.curveData.pos1, Dex.pos01 ) ), - PutAngle( FindAngle( Dex.pos01, Dex.curveData.pos1 ) ) ); + FormatDistance( FindDistance( Dex.curveData.pos1, Dex.pos01 ) ), + PutAngle( FindAngle( Dex.pos01, Dex.curveData.pos1 ) ) ); } else if ( curveType == curveTypeNone ) { - if (action != C_RDOWN) + if (action != C_RDOWN) { InfoMessage( _("Back") ); + } return C_CONTINUE; } else if ( curveType == curveTypeCurve ) { Dex.r1 = Dex.curveData.curveRadius; if ( QueryTrack( Dex.Trk, Q_IGNORE_EASEMENT_ON_EXTEND ) ) { - /* Ignore easements when extending turnouts or turntables */ + /* Ignore easements when extending turnouts or turntables */ Dex.jointD.x = - Dex.jointD.r0 = Dex.jointD.r1 = - Dex.jointD.l0 = Dex.jointD.l1 = - Dex.jointD.d0 = Dex.jointD.d1 = 0.0; + Dex.jointD.r0 = Dex.jointD.r1 = + Dex.jointD.l0 = Dex.jointD.l1 = + Dex.jointD.d0 = Dex.jointD.d1 = 0.0; Dex.jointD.flip = Dex.jointD.negate = Dex.jointD.Scurve = FALSE; d = Dex.curveData.curveRadius * Dex.curveData.a1 * 2.0*M_PI/360.0; } else { /* Easement code */ if (easementVal<0.0) { //Cornu Join - need to estimate a "good" easement length d = Dex.curveData.curveRadius * Dex.curveData.a1 * 2.0*M_PI/360.0; - Dex.jointD.d0 = Dex.jointD.d1 =0.75*72*12/GetTrkScale(Dex.Trk); //Easement 1.5 cars long to start - if (Dex.jointD.d0>(GetTrkLength(Dex.Trk,0,1)/2)) + Dex.jointD.d0 = Dex.jointD.d1 =0.75*72*12/GetTrkScale( + Dex.Trk); //Easement 1.5 cars long to start + if (Dex.jointD.d0>(GetTrkLength(Dex.Trk,0,1)/2)) { Dex.jointD.d0 = GetTrkLength(Dex.Trk,0,1)/2; - if (Dex.jointD.d1>d/2) + } + if (Dex.jointD.d1>d/2) { Dex.jointD.d1 = d/2; - Dex.jointD.negate = DifferenceBetweenAngles(Dex.angle,FindAngle(Dex.pos00,pos))<0.0; + } + Dex.jointD.negate = DifferenceBetweenAngles(Dex.angle,FindAngle(Dex.pos00, + pos))<0.0; Dex.jointD.x = 2*trackGauge; //Signal an easement present to JoinTracks } else { if ( easeR > 0.0 && Dex.r1 < easeR ) { ErrorMessage( MSG_RADIUS_LSS_EASE_MIN, - FormatDistance( Dex.r1 ), FormatDistance( easeR ) ); + FormatDistance( Dex.r1 ), FormatDistance( easeR ) ); return C_CONTINUE; } if ( Dex.r1*2.0*M_PI*Dex.curveData.a1/360.0 > mapD.size.x+mapD.size.y ) { ErrorMessage( MSG_CURVE_TOO_LARGE ); return C_CONTINUE; } - if ( NormalizeAngle( FindAngle( Dex.pos00, pos ) - Dex.angle ) > 180.0 ) + if ( NormalizeAngle( FindAngle( Dex.pos00, pos ) - Dex.angle ) > 180.0 ) { Dex.r1 = - Dex.r1; - if (ComputeJoint( Dex.params.arcR, Dex.r1, &Dex.jointD ) == E_ERROR) + } + if (ComputeJoint( Dex.params.arcR, Dex.r1, &Dex.jointD ) == E_ERROR) { return C_CONTINUE; + } d = Dex.params.len - Dex.jointD.d0; if (d <= minLength) { ErrorMessage( MSG_TRK_TOO_SHORT, "First ", PutDim(fabs(minLength-d)) ); @@ -648,34 +694,37 @@ extendTrackMove: a0 = Dex.angle + (Dex.jointD.negate?-90.0:+90.0); Translate( &Dex.pos01, Dex.pos00, a0, Dex.jointD.x ); Translate( &Dex.curveData.curvePos, Dex.curveData.curvePos, - a0, Dex.jointD.x ); -LOG( log_modify, 2, ("A=%0.3f X=%0.3f\n", a0, Dex.jointD.x ) ) + a0, Dex.jointD.x ); + LOG( log_modify, 2, ("A=%0.3f X=%0.3f\n", a0, Dex.jointD.x ) ) } if (d <= minLength) { ErrorMessage( MSG_TRK_TOO_SHORT, "Extending ", PutDim(fabs(minLength-d)) ); return C_CONTINUE; } + DYNARR_SET( trkSeg_t, tempSegs_da, 1 ); tempSegs(0).type = SEG_CRVTRK; - tempSegs(0).width = 0; + tempSegs(0).lineWidth = 0; tempSegs(0).u.c.center = Dex.curveData.curvePos; tempSegs(0).u.c.radius = Dex.curveData.curveRadius, - tempSegs(0).u.c.a0 = Dex.curveData.a0; + tempSegs(0).u.c.a0 = Dex.curveData.a0; tempSegs(0).u.c.a1 = Dex.curveData.a1; - tempSegs_da.cnt = 1; double da = D2R(Dex.curveData.a1); - if (da < 0.0) + if (da < 0.0) { da = 2*M_PI + da; - a = NormalizeAngle( Dex.angle - FindAngle( Dex.pos00, Dex.curveData.curvePos ) ); - if ( a < 180.0 ) + } + a = NormalizeAngle( Dex.angle - FindAngle( Dex.pos00, + Dex.curveData.curvePos ) ); + if ( a < 180.0 ) { a = NormalizeAngle( Dex.curveData.a0-90 ); - else + } else { a = NormalizeAngle( Dex.curveData.a0+Dex.curveData.a1+90.0 ); + } Dex.valid = TRUE; if (action != C_RDOWN) InfoMessage( _("Curve Track: Radius=%s Length=%s Angle=%0.3f"), - FormatDistance( Dex.curveData.curveRadius ), - FormatDistance( Dex.curveData.curveRadius * da), - Dex.curveData.a1 ); + FormatDistance( Dex.curveData.curveRadius ), + FormatDistance( Dex.curveData.curveRadius * da), + Dex.curveData.a1 ); } return C_CONTINUE; @@ -683,38 +732,41 @@ LOG( log_modify, 2, ("A=%0.3f X=%0.3f\n", a0, Dex.jointD.x ) ) extendTrackUp: changeTrackMode = FALSE; modifyExtendMode = FALSE; - tempSegs_da.cnt = 0; - if (Dex.Trk == NULL) return C_CONTINUE; - if (!Dex.valid) + DYNARR_RESET( trkSeg_t, tempSegs_da ); + if (Dex.Trk == NULL) { return C_CONTINUE; } + if (!Dex.valid) { return C_CONTINUE; - UndoStart( _("Extend Track"), "Extend( T%d[%d] )", GetTrkIndex(Dex.Trk), Dex.params.ep ); + } + UndoStart( _("Extend Track"), "Extend( T%d[%d] )", GetTrkIndex(Dex.Trk), + Dex.params.ep ); trk = NULL; curveType = Dex.curveData.type; - + if ( curveType == curveTypeStraight ) { if (QueryTrack(Dex.Trk,Q_CAN_EXTEND)) //Check it isn't a turnout end.... if ( Dex.params.type == curveTypeStraight && - FindDistance(Dex.pos01, Dex.curveData.pos1) > 0 ) { + FindDistance(Dex.pos01, Dex.curveData.pos1) > 0 ) { UndoModify( Dex.Trk ); AdjustStraightEndPt( Dex.Trk, Dex.params.ep, Dex.curveData.pos1 ); UndoEnd(); DrawNewTrack(Dex.Trk ); return C_TERMINATE; - } - if (FindDistance(Dex.pos01, Dex.curveData.pos1) == 0) return C_ERROR; -LOG( log_modify, 1, ("L = %0.3f, P0 = %0.3f, P1 = %0.3f\n", - Dex.params.len, Dex.pos01, Dex.curveData.pos1 ) ) + } + if (FindDistance(Dex.pos01, Dex.curveData.pos1) == 0) { return C_ERROR; } + LOG( log_modify, 1, ("L = %0.3f, P0 = %0.3f, P1 = %0.3f\n", + Dex.params.len, Dex.pos01, Dex.curveData.pos1 ) ) trk = NewStraightTrack( Dex.pos01, Dex.curveData.pos1 ); inx = 0; } else if ( curveType == curveTypeCurve ) { -LOG( log_modify, 1, ("R = %0.3f, A0 = %0.3f, A1 = %0.3f\n", - Dex.curveData.curveRadius, Dex.curveData.a0, Dex.curveData.a1 ) ) + LOG( log_modify, 1, ("R = %0.3f, A0 = %0.3f, A1 = %0.3f\n", + Dex.curveData.curveRadius, Dex.curveData.a0, Dex.curveData.a1 ) ) trk = NewCurvedTrack( Dex.curveData.curvePos, Dex.curveData.curveRadius, - Dex.curveData.a0, Dex.curveData.a1, 0 ); + Dex.curveData.a0, Dex.curveData.a1, 0 ); inx = PickUnconnectedEndPoint( Dex.pos01, trk ); - if (inx == -1) + if (inx == -1) { return C_ERROR; + } } else { return C_ERROR; @@ -726,28 +778,30 @@ LOG( log_modify, 1, ("R = %0.3f, A0 = %0.3f, A1 = %0.3f\n", DrawEndPt( &mainD, Dex.Trk, Dex.params.ep, wDrawColorBlack ); } else { UndrawNewTrack( Dex.Trk ); - JoinTracks( Dex.Trk, Dex.params.ep, Dex.pos00, trk, inx, Dex.pos01, &Dex.jointD ); + JoinTracks( Dex.Trk, Dex.params.ep, Dex.pos00, trk, inx, Dex.pos01, + &Dex.jointD ); DrawNewTrack( Dex.Trk ); } UndoEnd(); - tempSegs_da.cnt = 0; DrawNewTrack( trk ); return C_TERMINATE; case C_REDRAW: - if (modifyBezierMode) return ModifyBezier(C_REDRAW, pos); - if (modifyCornuMode) return ModifyCornu(C_REDRAW, pos); - if (modifyDrawMode) return ModifyDraw(C_REDRAW, pos); - DrawSegs( &tempD, zero, 0.0, &tempSegs(0), tempSegs_da.cnt, trackGauge, wDrawColorBlack ); - if (anchors_da.cnt) - DrawSegs( &tempD, zero, 0.0, &anchors(0), anchors_da.cnt, trackGauge, wDrawColorBlack ); + if (modifyBezierMode) { return ModifyBezier(C_REDRAW, pos); } + if (modifyCornuMode) { return ModifyCornu(C_REDRAW, pos); } + if (modifyDrawMode) { return ModifyDraw(C_REDRAW, pos); } + DrawSegsDA( &tempD, NULL, zero, 0.0, &tempSegs_da, trackGauge, wDrawColorBlack, + 0 ); + DrawSegsDA( &tempD, NULL, zero, 0.0, &anchors_da, trackGauge, wDrawColorBlack, + 0 ); return C_CONTINUE; case C_TEXT: if ((action>>8) == 'c') { panCenter = pos; - LOG( log_pan, 2, ( "PanCenter:Mod-%d %0.3f %0.3f\n", __LINE__, panCenter.x, panCenter.y ) ); + LOG( log_pan, 2, ( "PanCenter:Mod-%d %0.3f %0.3f\n", __LINE__, panCenter.x, + panCenter.y ) ); PanHere(I2VP(0)); return C_CONTINUE; } @@ -760,14 +814,18 @@ LOG( log_modify, 1, ("R = %0.3f, A0 = %0.3f, A1 = %0.3f\n", if ((action>>8) == '0' || (action>>8 == 'o')) { PanMenuEnter(I2VP('o')); } - if ( !Dex.Trk ) + if ( !Dex.Trk ) { return C_CONTINUE; - if (modifyBezierMode) + } + if (modifyBezierMode) { return ModifyBezier(action, pos); - if (modifyCornuMode) + } + if (modifyCornuMode) { return ModifyCornu(action, pos); - if (modifyDrawMode) + } + if (modifyDrawMode) { return ModifyDraw(action, pos); + } return ModifyTrack( Dex.Trk, action, pos ); case C_CMDMENU: @@ -776,29 +834,35 @@ LOG( log_modify, 1, ("R = %0.3f, A0 = %0.3f, A1 = %0.3f\n", wMenuPopupShow(modPopupM); return C_CONTINUE; } - if (modifyBezierMode) + if (modifyBezierMode) { return ModifyBezier(action, pos); - if (modifyCornuMode) + } + if (modifyCornuMode) { return ModifyCornu(action, pos); - if (modifyDrawMode) + } + if (modifyDrawMode) { return ModifyDraw(action, pos); + } return ModifyTrack( Dex.Trk, action, pos ); case C_LCLICK: if ( modifyDrawMode) { rc = ModifyDraw(C_DOWN, pos); - if (rc == C_CONTINUE) + if (rc == C_CONTINUE) { return ModifyDraw(C_UP, pos); + } } - if (modifyCornuMode) + if (modifyCornuMode) { return ModifyCornu(action, pos); - /*no break*/ + } + /*no break*/ default: - if (modifyBezierMode) return ModifyBezier(action, pos); - if (modifyCornuMode) return ModifyCornu(action, pos); - if (modifyDrawMode) return ModifyDraw(action, pos); - if (Dex.Trk) + if (modifyBezierMode) { return ModifyBezier(action, pos); } + if (modifyCornuMode) { return ModifyCornu(action, pos); } + if (modifyDrawMode) { return ModifyDraw(action, pos); } + if (Dex.Trk) { return ModifyTrack( Dex.Trk, action, pos ); + } return C_CONTINUE; } return C_CONTINUE; @@ -811,21 +875,22 @@ LOG( log_modify, 1, ("R = %0.3f, A0 = %0.3f, A1 = %0.3f\n", * */ -#include "bitmaps/extend.xpm" -extern wIndex_t panCmdInx; -extern wIndex_t selectCmdInx; -extern wIndex_t describeCmdInx; - +#include "bitmaps/extend.xpm3" void InitCmdModify( wMenu_p menu ) { - modifyCmdInx = AddMenuButton( menu, CmdModify, "cmdModify", _("Modify"), wIconCreatePixMap(extend_xpm[iconSize]), LEVEL0_50, IC_STICKY|IC_POPUP|IC_WANT_MOVE|IC_CMDMENU, ACCL_MODIFY, NULL ); + modifyCmdInx = AddMenuButton( menu, CmdModify, "cmdModify", _("Modify"), + wIconCreatePixMap(extend_xpm3[iconSize]), LEVEL0_50, + IC_STICKY|IC_POPUP|IC_WANT_MOVE|IC_CMDMENU, ACCL_MODIFY, NULL ); /** @logcmd @showrefby modify=n cmodify.c Log Modify command */ log_modify = LogFindIndex( "modify" ); modPopupM = MenuRegister( "Modify Context Menu" ); - wMenuPushCreate(modPopupM, "cmdSelectMode", GetBalloonHelpStr("cmdSelectMode"), 0, DoCommandB, I2VP(selectCmdInx)); - wMenuPushCreate(modPopupM, "cmdDescribeMode", GetBalloonHelpStr("cmdDescribeMode"), 0, DoCommandB, I2VP(describeCmdInx)); - wMenuPushCreate(modPopupM, "cmdPanMode", GetBalloonHelpStr("cmdPanMode"), 0, DoCommandB, I2VP(panCmdInx)); + wMenuPushCreate(modPopupM, "cmdSelectMode", GetBalloonHelpStr("cmdSelectMode"), + 0, DoCommandB, I2VP(selectCmdInx)); + wMenuPushCreate(modPopupM, "cmdDescribeMode", + GetBalloonHelpStr("cmdDescribeMode"), 0, DoCommandB, I2VP(describeCmdInx)); + wMenuPushCreate(modPopupM, "cmdPanMode", GetBalloonHelpStr("cmdPanMode"), 0, + DoCommandB, I2VP(panCmdInx)); wMenuSeparatorCreate(modPopupM); wMenuPushCreate(modPopupM, "", _("Zoom In"), 0, DoZoomUp, I2VP(1)); wMenuPushCreate(modPopupM, "", _("Zoom Out"), 0, DoZoomDown, I2VP(1)); diff --git a/app/bin/cnote.c b/app/bin/cnote.c index 7e4c0f9..04d63f1 100644 --- a/app/bin/cnote.c +++ b/app/bin/cnote.c @@ -17,7 +17,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "custom.h" @@ -34,51 +34,59 @@ static paramTextData_t noteTextData = { 300, 150 }; static paramData_t notePLs[] = { #define I_NOTETEXT (0) #define noteT ((wText_p)notePLs[I_NOTETEXT].control) - { PD_TEXT, NULL, "text", PDO_DLGRESIZE, ¬eTextData } + { PD_TEXT, NULL, "text", PDO_DLGRESIZE, ¬eTextData } }; static paramGroup_t notePG = { "note", 0, notePLs, COUNT( notePLs ) }; void ClearNote(void) { - if (mainText) { - MyFree(mainText); - mainText = NULL; - } + if (mainText) { + MyFree(mainText); + mainText = NULL; + } } static void NoteOk(void * unused) { - if (wTextGetModified(noteT)) { - int len; - ClearNote(); - len = wTextGetSize(noteT); - mainText = (char*)MyMalloc(len+2); - wTextGetText(noteT, mainText, len); - } - - wHide(noteW); + if (wTextGetModified(noteT)) { + int len; + ClearNote(); + len = wTextGetSize(noteT); + mainText = (char*)MyMalloc(len+2); + wTextGetText(noteT, mainText, len); + } + + wHide(noteW); } void DoNote(void * unused) { - if (noteW == NULL) { - noteW = ParamCreateDialog(¬ePG, MakeWindowTitle(_("Note")), _("Ok"), NoteOk, - wHide, FALSE, NULL, F_NOTTRANSIENT|F_RESIZE, NULL); - } - - wTextClear(noteT); - wTextAppend(noteT, mainText?mainText: - _("Replace this text with your layout notes")); - wTextSetReadonly(noteT, FALSE); - wShow(noteW); + if (noteW == NULL) { + noteW = ParamCreateDialog(¬ePG, MakeWindowTitle(_("Note")), _("Ok"), NoteOk, + wHide, FALSE, NULL, F_NOTTRANSIENT|F_RESIZE, NULL); + } + + wTextClear(noteT); + wTextAppend(noteT, mainText?mainText: + _("Replace this text with your layout notes")); + wTextSetReadonly(noteT, FALSE); + wShow(noteW); } +/** + * Save the main layout note to file. The note text is converted to + * UTF-8 if this is configured at compile time. Before saving characters that + * have special meanings in the XTC file (eg. ") are escaped. + * + * \param f open layout file + * \return + */ BOOL_T WriteMainNote(FILE* f) { - BOOL_T rc = TRUE; + BOOL_T rc = TRUE; char *noteText = mainText; if (noteText && *noteText) { @@ -92,18 +100,17 @@ BOOL_T WriteMainNote(FILE* f) } #endif // UTFCONVERT - - char * sText = ConvertToEscapedText( noteText ); - rc &= fprintf(f, "NOTE MAIN 0 0 0 0 0 \"%s\"\n", sText )>0; - MyFree( sText ); + char * sText = ConvertToEscapedText( noteText ); + rc &= fprintf(f, "NOTE MAIN 0 0 0 0 0 \"%s\"\n", sText )>0; + MyFree( sText ); #ifdef UTFCONVERT if (out) { MyFree(out); } #endif // UTFCONVERT - } - return rc; + } + return rc; } /** @@ -114,28 +121,30 @@ BOOL_T WriteMainNote(FILE* f) BOOL_T ReadMainNote(char *line) { - long size; - char * sNote = NULL; - - if (!GetArgs(line + 9, - paramVersion < 3 ? "l" : - paramVersion < VERSION_INLINENOTE ? "0000l": - "0000lq", &size, &sNote)) { - return FALSE; - } - - if (mainText) { - MyFree(mainText); - } - - if ( paramVersion < VERSION_INLINENOTE ) - mainText = ReadMultilineText(); - else - mainText = sNote; - return TRUE; + long size; + char * sNote = NULL; + + if (!GetArgs(line + 9, + paramVersion < 3 ? "l" : + paramVersion < VERSION_INLINENOTE ? "0000l": + "0000lq", &size, &sNote)) { + return FALSE; + } + + if (mainText) { + MyFree(mainText); + } + + if ( paramVersion < VERSION_INLINENOTE ) { + mainText = ReadMultilineText(); + } else { + mainText = sNote; + } + + return TRUE; } void InitCmdNote() { - ParamRegister(¬ePG); + ParamRegister(¬ePG); } diff --git a/app/bin/cnvdsgn.c b/app/bin/cnvdsgn.c index fc4a827..91a31e5 100644 --- a/app/bin/cnvdsgn.c +++ b/app/bin/cnvdsgn.c @@ -13,7 +13,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "utility.h" @@ -25,23 +25,24 @@ static int trackSeparation = 20; static int arrowHeadLength = 10; -static double FindCenter( - coOrd * pos, - coOrd p0, - coOrd p1, - double radius ) +static double FindCenter( + coOrd * pos, + coOrd p0, + coOrd p1, + double radius ) { double d; double a0, a1; d = FindDistance( p0, p1 )/2.0; a0 = FindAngle( p0, p1 ); a1 = NormalizeAngle(R2D(asin( d/radius ))); - if (a1 > 180) + if (a1 > 180) { a1 -= 360; + } /*a0 = NormalizeAngle( a0 + (radius>0 ? +(90.0-a1) : -(90.0-a1) ) );*/ a0 = NormalizeAngle( a0 + (90.0-a1) ); Translate( pos, p0, a0, radius ); -/*fprintf(stderr,"Center = %0.3f %0.3f\n", pos->x, pos->y );*/ + /*fprintf(stderr,"Center = %0.3f %0.3f\n", pos->x, pos->y );*/ return a1*2.0; } @@ -56,35 +57,35 @@ static void buildDesignerLines( FILE * inf, FILE * outf ) double len; while ( fgets( line, sizeof line, inf ) != NULL ) { - + if ( strncmp( line, "ARROW", 5 ) == 0 ) { if ( sscanf( line, "ARROW, %lf, %lf, %lf, %lf", - &p0.x, &p0.y, &p1.x, &p1.y ) != 4) { + &p0.x, &p0.y, &p1.x, &p1.y ) != 4) { fprintf( stderr, "SYNTAX: %s", line ); exit (1); } a0 = FindAngle( p1, p0 ); fprintf( outf, " { 1, %ld, %ld, %ld, %ld },\n", - (long)(p0.x+0.5), (long)(p0.y+0.5), (long)(p1.x+0.5), (long)(p1.y+0.5) ); + (long)(p0.x+0.5), (long)(p0.y+0.5), (long)(p1.x+0.5), (long)(p1.y+0.5) ); Translate( &p1, p0, a0+135, arrowHeadLength ); fprintf( outf, " { 1, %ld, %ld, %ld, %ld },\n", - (long)(p0.x+0.5), (long)(p0.y+0.5), (long)(p1.x+0.5), (long)(p1.y+0.5) ); + (long)(p0.x+0.5), (long)(p0.y+0.5), (long)(p1.x+0.5), (long)(p1.y+0.5) ); Translate( &p1, p0, a0-135, arrowHeadLength ); fprintf( outf, " { 1, %ld, %ld, %ld, %ld },\n", - (long)(p0.x+0.5), (long)(p0.y+0.5), (long)(p1.x+0.5), (long)(p1.y+0.5) ); + (long)(p0.x+0.5), (long)(p0.y+0.5), (long)(p1.x+0.5), (long)(p1.y+0.5) ); } else if ( strncmp( line, "LINE", 4 ) == 0 ) { if ( sscanf( line, "LINE, %lf, %lf, %lf, %lf", - &p0.x, &p0.y, &p1.x, &p1.y ) != 4) { + &p0.x, &p0.y, &p1.x, &p1.y ) != 4) { fprintf( stderr, "SYNTAX: %s", line ); exit (1); } fprintf( outf, " { 1, %ld, %ld, %ld, %ld },\n", - (long)(p0.x+0.5), (long)(p0.y+0.5), (long)(p1.x+0.5), (long)(p1.y+0.5) ); + (long)(p0.x+0.5), (long)(p0.y+0.5), (long)(p1.x+0.5), (long)(p1.y+0.5) ); } else if ( strncmp( line, "STRAIGHT", 8 ) == 0 ) { if ( sscanf( line, "STRAIGHT, %lf, %lf, %lf, %lf", - &p0.x, &p0.y, &p1.x, &p1.y ) != 4) { + &p0.x, &p0.y, &p1.x, &p1.y ) != 4) { fprintf( stderr, "SYNTAX: %s", line ); exit (1); } @@ -92,38 +93,39 @@ static void buildDesignerLines( FILE * inf, FILE * outf ) Translate( &q0, p0, a0+90, trackSeparation/2.0 ); Translate( &q1, p1, a0+90, trackSeparation/2.0 ); fprintf( outf, " { 3, %ld, %ld, %ld, %ld },\n", - (long)(q0.x+0.5), (long)(q0.y+0.5), (long)(q1.x+0.5), (long)(q1.y+0.5) ); + (long)(q0.x+0.5), (long)(q0.y+0.5), (long)(q1.x+0.5), (long)(q1.y+0.5) ); Translate( &q0, p0, a0-90, trackSeparation/2.0 ); Translate( &q1, p1, a0-90, trackSeparation/2.0 ); fprintf( outf, " { 3, %ld, %ld, %ld, %ld },\n", - (long)(q0.x+0.5), (long)(q0.y+0.5), (long)(q1.x+0.5), (long)(q1.y+0.5) ); - + (long)(q0.x+0.5), (long)(q0.y+0.5), (long)(q1.x+0.5), (long)(q1.y+0.5) ); + } else if ( strncmp( line, "CURVE", 5 ) == 0 ) { if ( sscanf( line, "CURVE, %lf, %lf, %lf, %lf, %lf", - &p0.x, &p0.y, &p1.x, &p1.y, &radius ) != 5) { + &p0.x, &p0.y, &p1.x, &p1.y, &radius ) != 5) { fprintf( stderr, "SYNTAX: %s", line ); exit (1); } a1 = FindCenter( &pc, p0, p1, radius ); a0 = FindAngle( pc, p0 ); -/*fprintf(stderr, "A0 = %0.3f, A1 = %0.3f\n", a0, a1 );*/ + /*fprintf(stderr, "A0 = %0.3f, A1 = %0.3f\n", a0, a1 );*/ len = radius * M_PI * 2 * ( a1 / 360.0 ); num = len/20; - if (num < 0) num = - num; + if (num < 0) { num = - num; } num++; a1 /= num; - if (radius < 0) + if (radius < 0) { radius = -radius; + } for ( j=0; j= 0) + wControlActive(buttonList[commandList[inx].buttInx].control, + enable); + for (minx = 0; minx < NUM_CMDMENUS; minx++) + if (commandList[inx].menu[minx]) { + wMenuPushEnable(commandList[inx].menu[minx], enable); + } + commandList[inx].enabled = enable; + } + } + } + + EnableMenus(); + + for (inx = 0; inx < buttonCnt; inx++) { + if (buttonList[inx].cmdInx < 0 + && (buttonList[inx].options & IC_SELECTED)) { + wControlActive(buttonList[inx].control, selectedTrackCount > 0); + } + } +} + +EXPORT wIndex_t GetCurrentCommand() +{ + return curCommand; +} + +EXPORT void Reset(void) +{ + if (recordF) { + fprintf(recordF, "RESET\n"); + fflush(recordF); + } + LOG(log_command, 2, + ( "COMMAND CANCEL %s\n", commandList[curCommand].helpKey )) + commandList[curCommand].cmdProc( C_CANCEL, zero); + if (commandList[curCommand].buttInx >= 0) + wButtonSetBusy( + (wButton_p) buttonList[commandList[curCommand].buttInx].control, + FALSE); + curCommand = (preSelect ? selectCmdInx : describeCmdInx); + wSetCursor(mainD.d, preSelect ? defaultCursor : wCursorQuestion); + commandContext = commandList[curCommand].context; + if (commandList[curCommand].buttInx >= 0) + wButtonSetBusy( + (wButton_p) buttonList[commandList[curCommand].buttInx].control, + TRUE); + DYNARR_RESET( trkSeg_t, tempSegs_da ); + + TryCheckPoint(); + + ClrAllTrkBits( TB_UNDRAWN ); + DoRedraw(); // Reset + EnableCommands(); + ResetMouseState(); + LOG(log_command, 1, + ( "COMMAND RESET %s\n", commandList[curCommand].helpKey )) + (void) commandList[curCommand].cmdProc( C_START, zero); +} + +static BOOL_T CheckClick(wAction_t *action, coOrd *pos, BOOL_T checkLeft, + BOOL_T checkRight) +{ + static long time0; + static coOrd pos0; + long time1; + long timeDelta; + DIST_T distDelta; + + switch (*action) { + case C_LDOUBLE: + if (!checkLeft) { + return TRUE; + } + time0 = 0; + break; + case C_DOWN: + if (!checkLeft) { + return TRUE; + } + time0 = wGetTimer() - adjTimer; + pos0 = *pos; + return FALSE; + case C_MOVE: + if (!checkLeft) { + return TRUE; + } + if (time0 != 0) { + time1 = wGetTimer() - adjTimer; + timeDelta = time1 - time0; + distDelta = FindDistance(*pos, pos0); + if (timeDelta > dragTimeout || distDelta > dragDistance) { + time0 = 0; + *pos = pos0; + *action = C_DOWN; + } else { + return FALSE; + } + } + break; + case C_UP: + if (!checkLeft) { + return TRUE; + } + if (time0 != 0) { + time1 = wGetTimer() - adjTimer; + timeDelta = time1 - time0; + distDelta = FindDistance(*pos, pos0); + time0 = 0; + *action = C_LCLICK; + } + break; + case C_RDOWN: + if (!checkRight) { + return TRUE; + } + time0 = wGetTimer() - adjTimer; + pos0 = *pos; + return FALSE; + case C_RMOVE: + if (!checkRight) { + return TRUE; + } + if (time0 != 0) { + time1 = wGetTimer() - adjTimer; + timeDelta = time1 - time0; + distDelta = FindDistance(*pos, pos0); + if (timeDelta > dragTimeout || distDelta > dragDistance) { + time0 = 0; + *pos = pos0; + *action = C_RDOWN; + } else { + return FALSE; + } + } + break; + case C_RUP: + if (!checkRight) { + return TRUE; + } + if (time0 != 0) { + time0 = 0; + *action = C_RCLICK; + } + break; + } + return TRUE; +} + +EXPORT wBool_t DoCurCommand(wAction_t action, coOrd pos) +{ + wAction_t rc; + int mode; + wBool_t bExit = FALSE; + + if (action == wActionMove) { + if ((commandList[curCommand].options & IC_WANT_MOVE) == 0) { + bExit = TRUE; + } + } else if ((action&0xFF) == wActionModKey) { + if ((commandList[curCommand].options & IC_WANT_MODKEYS) == 0) { + bExit = TRUE; + } + } else if (!CheckClick(&action, &pos, + (int) (commandList[curCommand].options & IC_LCLICK), TRUE)) { + bExit = TRUE; + } else if (action == C_RCLICK + && (commandList[curCommand].options & IC_RCLICK) == 0) { + if (!inPlayback) { + mode = MyGetKeyState(); + if ((mode & (~WKEY_SHIFT)) != 0) { + wBeep(); + bExit = TRUE; + } else if (((mode & WKEY_SHIFT) == 0) == (rightClickMode == 0)) { + if (selectedTrackCount > 0) { + if (commandList[curCommand].options & IC_CMDMENU) { + } + wMenuPopupShow(popup2M); + } else { + wMenuPopupShow(popup1M); + } + bExit = TRUE; + } else if ((commandList[curCommand].options & IC_CMDMENU)) { + cmdMenuPos = pos; + action = C_CMDMENU; + } else { + wBeep(); + bExit = TRUE; + } + } else { + bExit = TRUE; + } + } + if ( bExit ) { + TempRedraw(); // DoCurCommand: precommand + return C_CONTINUE; + } + + LOG(log_command, 2, + ( "COMMAND MOUSE %s %d @ %0.3f %0.3f\n", commandList[curCommand].helpKey, + (int)action, pos.x, pos.y )) + rc = commandList[curCommand].cmdProc(action, pos); + LOG(log_command, 4, ( " COMMAND returns %d\n", rc )) + switch ( action & 0xFF ) { + case wActionMove: + case wActionModKey: + case C_DOWN: + case C_MOVE: + case C_UP: + case C_RDOWN: + case C_RMOVE: + case C_RUP: + case C_LCLICK: + case C_RCLICK: + case C_TEXT: + case C_OK: + if (rc== C_TERMINATE) { MainRedraw(); } + else { TempRedraw(); } // DoCurCommand: postcommand + break; + default: + break; + } + if ((rc == C_TERMINATE || rc == C_INFO) + && (commandList[curCommand].options & IC_STICKY) + && (commandList[curCommand].stickyMask & stickySet)) { + DYNARR_RESET( trkSeg_t, tempSegs_da ); + UpdateAllElevations(); + if (commandList[curCommand].options & IC_NORESTART) { + return C_CONTINUE; + } + //Make sure we checkpoint even sticky commands + TryCheckPoint(); + LOG(log_command, 1, + ( "COMMAND START %s\n", commandList[curCommand].helpKey )) + wSetCursor(mainD.d,defaultCursor); + rc = commandList[curCommand].cmdProc( C_START, pos); + LOG(log_command, 4, ( " COMMAND returns %d\n", rc )) + switch (rc) { + case C_CONTINUE: + break; + case C_ERROR: + Reset(); +#ifdef VERBOSE + lprintf( "Start returns Error"); +#endif + break; + case C_TERMINATE: + InfoMessage(""); + case C_INFO: + Reset(); + break; + } + } + return rc; +} + +/* + * \parm reset says if the user used Esc rather than undo/redo + */ +EXPORT int ConfirmReset(BOOL_T retry) +{ + wAction_t rc; + if (curCommand != describeCmdInx) { + LOG(log_command, 3, + ( "COMMAND CONFIRM %s\n", commandList[curCommand].helpKey )) + rc = commandList[curCommand].cmdProc( C_CONFIRM, zero); + LOG(log_command, 4, ( " COMMAND returns %d\n", rc )) + if (rc == C_ERROR) { + if (retry) + rc = + wNotice3( + _( + "Cancelling the current command will undo the changes\n" + "you are currently making. Do you want to do the update instead?"), + _("Yes"), _("No"), _("Cancel")); + else + rc = + wNoticeEx( NT_WARNING, + _( + "Cancelling the current command will undo the changes\n" + "you are currently making. Do you want to do the update instead?"), + _("Yes"), _("No")); + if (rc == 1) { + LOG(log_command, 3, + ( "COMMAND OK %s\n", commandList[curCommand].helpKey )) + commandList[curCommand].cmdProc( C_OK, zero); + return C_OK; + } else if (rc == -1) { + return C_CANCEL; + } + } else if (rc == C_TERMINATE) { + return C_TERMINATE; + } + } + if (retry) { + /* because user pressed esc */ + SetAllTrackSelect( FALSE); + } + Reset(); + LOG(log_command, 1, + ( "COMMAND RESET %s\n", commandList[curCommand].helpKey )) + commandList[curCommand].cmdProc( C_START, zero); + return C_CONTINUE; +} + +EXPORT void DoCommandB(void * data) +{ + wIndex_t inx = (wIndex_t)VP2L(data); + STATUS_T rc; + static coOrd pos = { 0, 0 }; + static int inDoCommandB = FALSE; + wIndex_t buttInx; + + if (inDoCommandB) { + return; + } + inDoCommandB = TRUE; + + if (inx < 0 || inx >= commandCnt) { + CHECK(FALSE); + inDoCommandB = FALSE; + return; + } + + if ((!inPlayback) && (!commandList[inx].enabled)) { + ErrorMessage(MSG_COMMAND_DISABLED); + inx = describeCmdInx; + } + + InfoMessage(""); + if (curCommand != selectCmdInx) { + LOG(log_command, 3, + ( "COMMAND FINISH %s\n", commandList[curCommand].helpKey )) + rc = commandList[curCommand].cmdProc( C_FINISH, zero); + LOG(log_command, 3, + ( "COMMAND CONFIRM %s\n", commandList[curCommand].helpKey )) + rc = commandList[curCommand].cmdProc( C_CONFIRM, zero); + LOG(log_command, 4, ( " COMMAND returns %d\n", rc )) + if (rc == C_ERROR) { + rc = wNotice3( + _("Cancelling the current command will undo the changes\n" + "you are currently making. Do you want to update?"), + _("Yes"), _("No"), _("Cancel")); + if (rc == 1) { + commandList[curCommand].cmdProc( C_OK, zero); + } else if (rc == -1) { + inDoCommandB = FALSE; + return; + } + } + LOG(log_command, 3, + ( "COMMAND CANCEL %s\n", commandList[curCommand].helpKey )) + commandList[curCommand].cmdProc( C_CANCEL, pos); + DYNARR_RESET( trkSeg_t, tempSegs_da ); + } else { + LOG(log_command, 3, + ( "COMMAND FINISH %s\n", commandList[curCommand].helpKey )) + rc = commandList[curCommand].cmdProc( C_FINISH, zero); + } + if (commandList[curCommand].buttInx >= 0) + wButtonSetBusy( + (wButton_p) buttonList[commandList[curCommand].buttInx].control, + FALSE); + + if (recordF) { + fprintf(recordF, "COMMAND %s\n", commandList[inx].helpKey + 3); + fflush(recordF); + } + + curCommand = inx; + commandContext = commandList[curCommand].context; + if ((buttInx = commandList[curCommand].buttInx) >= 0) { + if (buttonList[buttInx].cmdInx != curCommand) { + wButtonSetLabel((wButton_p) buttonList[buttInx].control, + (char*) commandList[curCommand].icon); + wControlSetHelp(buttonList[buttInx].control, + GetBalloonHelpStr(commandList[curCommand].helpKey)); + wControlSetContext(buttonList[buttInx].control, + I2VP(curCommand)); + buttonList[buttInx].cmdInx = curCommand; + } + wButtonSetBusy( + (wButton_p) buttonList[commandList[curCommand].buttInx].control, + TRUE); + } + LOG(log_command, 1, + ( "COMMAND START %s\n", commandList[curCommand].helpKey )) + wSetCursor(mainD.d,defaultCursor); + rc = commandList[curCommand].cmdProc( C_START, pos); + LOG(log_command, 4, ( " COMMAND returns %d\n", rc )) + TempRedraw(); // DoCommandB + switch (rc) { + case C_CONTINUE: + break; + case C_ERROR: + Reset(); +#ifdef VERBOSE + lprintf( "Start returns Error"); +#endif + break; + case C_TERMINATE: + case C_INFO: + if (rc == C_TERMINATE) { + InfoMessage(""); + } + Reset(); + break; + } + inDoCommandB = FALSE; +} + +static void LayoutSetPos(wIndex_t inx) +{ + wWinPix_t w, h, offset; + static wWinPix_t toolbarRowHeight = 0; + static wWinPix_t width; + static int lastGroup; + static wWinPix_t gap; + static int layerButtCnt; + static int layerButtNumber; + int currGroup; + + if (inx == 0) { + lastGroup = 0; + wWinGetSize(mainW, &width, &h); + gap = 5; + toolbarWidth = width - 20 + 5; + layerButtCnt = 0; + layerButtNumber = 0; + toolbarHeight = 0; + } + + if (buttonList[inx].control) { + if (toolbarRowHeight <= 0) { + toolbarRowHeight = wControlGetHeight(buttonList[inx].control); + } + + currGroup = buttonList[inx].group & ~BG_BIGGAP; + if (currGroup != lastGroup && (buttonList[inx].group & BG_BIGGAP)) { + gap = 15; + } + if ((toolbarSet & (1 << currGroup)) + && (programMode != MODE_TRAIN + || (buttonList[inx].options + & (IC_MODETRAIN_TOO | IC_MODETRAIN_ONLY))) + && (programMode == MODE_TRAIN + || (buttonList[inx].options & IC_MODETRAIN_ONLY) == 0) + && ((buttonList[inx].group & ~BG_BIGGAP) != BG_LAYER + || layerButtCnt < layerCount)) { + if (currGroup != lastGroup) { + toolbarWidth += gap; + lastGroup = currGroup; + gap = 5; + } + w = wControlGetWidth(buttonList[inx].control); + h = wControlGetHeight(buttonList[inx].control); + if (h width - 20) { + toolbarWidth = 0; + toolbarHeight += h + 5; + } + if ((currGroup == BG_LAYER) && layerButtNumber>1 + && GetLayerHidden(layerButtNumber-2) ) { + wControlShow(buttonList[inx].control, FALSE); + layerButtNumber++; + } else { + if (currGroup == BG_LAYER ) { + if (layerButtNumber>1) { layerButtCnt++; } // Ignore List and Background + layerButtNumber++; + } + wControlSetPos(buttonList[inx].control, toolbarWidth, + toolbarHeight - (h + 5 +offset)); + buttonList[inx].x = toolbarWidth; + buttonList[inx].y = toolbarHeight - (h + 5 + offset); + toolbarWidth += wControlGetWidth(buttonList[inx].control); + wControlShow(buttonList[inx].control, TRUE); + } + } else { + wControlShow(buttonList[inx].control, FALSE); + } + } +} + +EXPORT void LayoutToolBar( void * data ) +{ + int inx; + + for (inx = 0; inx < buttonCnt; inx++) { + LayoutSetPos(inx); + } + if (toolbarSet&(1<= 0 && buttonList[buttInx].cmdInx == -1 ) { + // set button back-link + buttonList[buttInx].cmdInx = commandCnt; + } + commandCnt++; + return commandCnt - 1; +} + +EXPORT void AddToolbarControl(wControl_p control, long options) +{ + CHECK( buttonCnt < COMMAND_MAX - 1 ); + buttonList[buttonCnt].enabled = TRUE; + buttonList[buttonCnt].options = options; + buttonList[buttonCnt].group = cmdGroup; + buttonList[buttonCnt].x = 0; + buttonList[buttonCnt].y = 0; + buttonList[buttonCnt].control = control; + buttonList[buttonCnt].cmdInx = -1; + LayoutSetPos(buttonCnt); + buttonCnt++; +} + + +/*--------------------------------------------------------------------*/ + +EXPORT void PlaybackButtonMouse(wIndex_t buttInx) +{ + wWinPix_t cmdX, cmdY; + coOrd pos; + + if (buttInx < 0 || buttInx >= buttonCnt) { + return; + } + if (buttonList[buttInx].control == NULL) { + return; + } + cmdX = buttonList[buttInx].x + 17; + cmdY = toolbarHeight - (buttonList[buttInx].y + 17) + + (wWinPix_t) (mainD.size.y / mainD.scale * mainD.dpi) + 30; + + mainD.Pix2CoOrd( &mainD, cmdX, cmdY, &pos ); + MovePlaybackCursor(&mainD, pos, TRUE, buttonList[buttInx].control); + if (playbackTimer == 0) { + wButtonSetBusy((wButton_p) buttonList[buttInx].control, TRUE); + wFlush(); + wPause(500); + wButtonSetBusy((wButton_p) buttonList[buttInx].control, FALSE); + wFlush(); + } +} + + +EXPORT void PlaybackCommand(const char * line, wIndex_t lineNum) +{ + size_t inx; + wIndex_t buttInx; + size_t len1, len2; + len1 = strlen(line + 8); + for (inx = 0; inx < commandCnt; inx++) { + len2 = strlen(commandList[inx].helpKey + 3); + if (len1 == len2 + && strncmp(line + 8, commandList[inx].helpKey + 3, len2) == 0) { + break; + } + } + if (inx >= commandCnt) { + fprintf(stderr, "Unknown playback COMMAND command %d : %s\n", lineNum, + line); + } else { + wWinPix_t cmdX, cmdY; + coOrd pos; + if ((buttInx = commandList[inx].buttInx) >= 0) { + cmdX = buttonList[buttInx].x + 17; + cmdY = toolbarHeight - (buttonList[buttInx].y + 17) + + (wWinPix_t) (mainD.size.y / mainD.scale * mainD.dpi) + 30; + mainD.Pix2CoOrd( &mainD, cmdX, cmdY, &pos ); + MovePlaybackCursor(&mainD, pos,TRUE,buttonList[buttInx].control); + } + if (strcmp(line + 8, "Undo") == 0) { + if (buttInx > 0 && playbackTimer == 0) { + wButtonSetBusy((wButton_p) buttonList[buttInx].control, TRUE); + wFlush(); + wPause(500); + wButtonSetBusy((wButton_p) buttonList[buttInx].control, FALSE); + wFlush(); + } + UndoUndo(NULL); + } else if (strcmp(line + 8, "Redo") == 0) { + if (buttInx >= 0 && playbackTimer == 0) { + wButtonSetBusy((wButton_p) buttonList[buttInx].control, TRUE); + wFlush(); + wPause(500); + wButtonSetBusy((wButton_p) buttonList[buttInx].control, FALSE); + wFlush(); + } + UndoRedo(NULL); + } else { + if (buttInx >= 0 && playbackTimer == 0) { + wButtonSetBusy((wButton_p) buttonList[buttInx].control, TRUE); + wFlush(); + wPause(500); + wButtonSetBusy((wButton_p) buttonList[buttInx].control, FALSE); + wFlush(); + } + DoCommandB(I2VP(inx)); + } + } +} + +/*--------------------------------------------------------------------*/ + + +EXPORT BOOL_T IsCurCommandSticky(void) +{ + if ((commandList[curCommand].options & IC_STICKY) != 0 + && (commandList[curCommand].stickyMask & stickySet) != 0) { + return TRUE; + } + return FALSE; +} + +EXPORT void ResetIfNotSticky(void) +{ + if ((commandList[curCommand].options & IC_STICKY) == 0 + || (commandList[curCommand].stickyMask & stickySet) == 0) { + Reset(); + } +} + + +/*--------------------------------------------------------------------*/ +EXPORT void CommandInit( void ) +{ + curCommand = describeCmdInx; + commandContext = commandList[curCommand].context; + log_command = LogFindIndex( "command" ); + RegisterChangeNotification(ToolbarChange); +} + diff --git a/app/bin/command.h b/app/bin/command.h new file mode 100644 index 0000000..073e412 --- /dev/null +++ b/app/bin/command.h @@ -0,0 +1,150 @@ +/** \file command.h + * Application wide declarations and defines + */ + +/* XTrkCad - Model Railroad CAD + * Copyright (C) 2005 Dave Bullis + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef COMMAND_H +#define COMMAND_H + +#include "common.h" + +#define IC_STICKY (1<<0) +#define IC_INITNOTSTICKY (1<<1) +#define IC_CANCEL (1<<2) +#define IC_MENU (1<<3) +#define IC_NORESTART (1<<4) +#define IC_SELECTED (1<<5) +#define IC_POPUP (1<<6) +#define IC_LCLICK (1<<7) +#define IC_RCLICK (1<<8) +#define IC_CMDMENU (1<<9) +#define IC_POPUP2 (1<<10) +#define IC_ABUT (1<<11) +#define IC_ACCLKEY (1<<12) +#define IC_MODETRAIN_TOO (1<<13) +#define IC_MODETRAIN_ONLY (1<<14) +#define IC_WANT_MOVE (1<<15) +#define IC_PLAYBACK_PUSH (1<<16) +#define IC_WANT_MODKEYS (1<<17) +#define IC_POPUP3 (1<<18) + + +/* + * Command Action + */ +#define C_DOWN wActionLDown +#define C_MOVE wActionLDrag +#define C_UP wActionLUp +#define C_RDOWN wActionRDown +#define C_RMOVE wActionRDrag +#define C_RUP wActionRUp +#define C_TEXT wActionText +#define C_WUP wActionWheelUp +#define C_WDOWN wActionWheelDown +#define C_LDOUBLE wActionLDownDouble +#define C_MODKEY wActionModKey +#define C_SCROLLUP wActionScrollUp +#define C_SCROLLDOWN wActionScrollDown +#define C_SCROLLLEFT wActionScrollLeft +#define C_SCROLLRIGHT wActionScrollRight +#define C_MDOWN wActionMDown +#define C_MMOVE wActionMDrag +#define C_MUP wActionMUp +#define C_INIT (wActionLast+1) +#define C_START (wActionLast+2) +#define C_REDRAW (wActionLast+3) +#define C_CANCEL (wActionLast+4) +#define C_OK (wActionLast+5) +#define C_CONFIRM (wActionLast+6) +#define C_LCLICK (wActionLast+7) +#define C_RCLICK (wActionLast+8) +#define C_CMDMENU (wActionLast+9) +#define C_FINISH (wActionLast+10) +#define C_UPDATE (wActionLast+11) + +#define C_CONTINUE (100) +#define C_TERMINATE (101) +#define C_INFO (102) +#define C_ERROR (103) + +/* + * Command Levels - obsolete + */ +#define LEVEL0 (0) +#define LEVEL0_50 (1) +#define LEVEL1 (2) +#define LEVEL2 (3) + +/* + * Command groups + */ +#define BG_SELECT (0) +#define BG_ZOOM (1) +#define BG_UNDO (2) +#define BG_EASE (3) +#define BG_TRKCRT (4) +#define BG_TRKMOD (5) +#define BG_TRKGRP (6) +#define BG_MISCCRT (7) +#define BG_RULER (8) +#define BG_LAYER (9) +#define BG_HOTBAR (10) +#define BG_SNAP (11) +#define BG_TRAIN (12) +#define BG_COUNT (13) +#define BG_FILE (14) +#define BG_CONTROL (15) +#define BG_EXPORTIMPORT (16) +#define BG_PRINT (17) +#define BG_BIGGAP (1<<8) +extern int cmdGroup; + + +extern int buttonCnt; +extern int commandCnt; +extern int cmdGroup; +extern long toolbarSet; +extern wWinPix_t toolbarHeight; +extern long preSelect; +extern long rightClickMode; +extern void * commandContext; +extern coOrd cmdMenuPos; + +const char * GetCurCommandName( void ); +void EnableCommands( void ); +wIndex_t GetCurrentCommand(void); +void Reset( void ); +wBool_t DoCurCommand( wAction_t, coOrd ); +int ConfirmReset( BOOL_T ); +void DoCommandB( void * ); +void LayoutToolBar( void * ); +BOOL_T CommandEnabled( wIndex_t ); +#define NUM_CMDMENUS (4) +wIndex_t AddCommand(procCommand_t cmdProc, const char * helpKey, + const char * nameStr, wIcon_p icon, int reqLevel, long options, long acclKey, + wIndex_t buttInx, long stickyMask, wMenuPush_p cmdMenus[NUM_CMDMENUS], + void * context); +void AddToolbarControl( wControl_p, long ); +void PlaybackButtonMouse( wIndex_t ); +void PlaybackCommand( const char *, wIndex_t ); +BOOL_T IsCurCommandSticky(void); +void ResetIfNotSticky( void ); +void CommandInit( void ); +#endif diff --git a/app/bin/common-ui.h b/app/bin/common-ui.h index 893dbc7..e34c4a9 100644 --- a/app/bin/common-ui.h +++ b/app/bin/common-ui.h @@ -1,5 +1,5 @@ /** \file common-ui.h - * Defnitions of message and other UI types + * Defnitions of message and other UI types */ /* XTrkCad - Model Railroad CAD @@ -17,7 +17,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* Do not include this file in header (.h) files */ diff --git a/app/bin/common.h b/app/bin/common.h index 92620f2..f03a04c 100644 --- a/app/bin/common.h +++ b/app/bin/common.h @@ -17,14 +17,13 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef COMMON_H #define COMMON_H // INCLUDES -#include #include #include #include @@ -38,10 +37,6 @@ #include #include -#ifdef HAVE_MALLOC_H -#include -#endif - #include "wlib.h" #ifndef WINDOWS @@ -119,6 +114,8 @@ typedef double FLOAT_T; typedef double POS_T; typedef double DIST_T; typedef double ANGLE_T; +typedef double LWIDTH_T; + #define SCANF_FLOAT_FORMAT "%lf" typedef double DOUBLE_T; @@ -126,8 +123,8 @@ typedef double WDOUBLE_T; typedef double FONTSIZE_T; typedef struct { - POS_T x,y; - } coOrd; + POS_T x,y; +} coOrd; typedef struct { coOrd pt; @@ -148,48 +145,80 @@ typedef signed char TRKTYP_T; typedef int TRKINX_T; typedef long DEBUGF_T; typedef int REGION_T; +typedef long SCALEINX_T; +typedef long GAUGEINX_T; +typedef long SCALEDESCINX_T; -enum paramFileState { PARAMFILE_UNLOADED = 0, PARAMFILE_NOTUSABLE, PARAMFILE_COMPATIBLE, PARAMFILE_FIT, PARAMFILE_MAXSTATE }; -#define SCALE_ANY (-2) -#define SCALE_DEMO (-1) +enum paramFileState { PARAMFILE_UNLOADED = 0, PARAMFILE_NOTUSABLE, PARAMFILE_COMPATIBLE, PARAMFILE_FIT, PARAMFILE_MAXSTATE }; // DYNARRAY typedef struct { - int cnt; - int max; - void * ptr; - } dynArr_t; + int cnt; + int max; + void * ptr; +} dynArr_t; #define CHECK_SIZE(T,DA) +/** + * Append INCR mambers to DA + * INCR is > 1 if we plan to add more members soon + * Increments .cnt for the next member + * Note: new members may not be empty + */ #define DYNARR_APPEND(T,DA,INCR) \ { if ((DA).cnt >= (DA).max) { \ - (DA).max += INCR; \ - CHECK_SIZE(T,DA) \ + (DA).max += (INCR); \ + CHECK_SIZE((T),(DA)) \ (DA).ptr = MyRealloc( (DA).ptr, (DA).max * sizeof *(T*)NULL ); \ if ( (DA).ptr == NULL ) \ abort(); \ } \ (DA).cnt++; } -#define DYNARR_ADD(T,DA,INCR) DYNARR_APPEND(T,DA,INCR) +/** + * Return Last member of DA + */ #define DYNARR_LAST(T,DA) \ (((T*)(DA).ptr)[(DA).cnt-1]) +/** + * Return N't member of DA + */ #define DYNARR_N(T,DA,N) \ (((T*)(DA).ptr)[N]) +/** + * Logically empty the DA + * .max and .ptr are untouched + */ #define DYNARR_RESET(T,DA) \ (DA).cnt=0 +/** + * Set number of members to N + * If extending (.cnt > .max ), new values will be 0'd, otherwise not + */ #define DYNARR_SET(T,DA,N) \ - { if ((DA).max < N) { \ - (DA).max = N; \ - CHECK_SIZE(T,DA) \ + { if ((DA).max < (N)) { \ + (DA).max = (N); \ + CHECK_SIZE((T),(DA)) \ (DA).ptr = MyRealloc( (DA).ptr, (DA).max * sizeof *(T*)NULL ); \ if ( (DA).ptr == NULL ) \ abort(); \ } \ - (DA).cnt = N; } + (DA).cnt = (N); } +/** + * Initializes DA to empty when .ptr might be garbage (ie local vars) + * All fields are cleared + */ +#define DYNARR_INIT(T,DA) \ + { (DA).ptr = NULL; \ + (DA).max = 0; \ + (DA).cnt = 0; \ + } +/** + * Initializes DA to empty and frees .ptr + */ #define DYNARR_FREE(T,DA) \ { if ((DA).ptr) { \ MyFree( (DA).ptr); \ @@ -197,15 +226,19 @@ typedef struct { } \ (DA).max = 0; \ (DA).cnt = 0; } -#define DYNARR_REMOVE(T,DA,I) \ +/** + * Removes N'th member from DA + * (Not used) + */ +#define DYNARR_REMOVE(T,DA,N) \ { \ - { if ((DA).cnt-1 > I) { \ - for (int i=I;i<(DA).cnt-1;i++) { \ + { if ((DA).cnt-1 > (N)) { \ + for (int i=(N);i<(DA).cnt-1;i++) { \ (((T*)(DA).ptr)[i])= (((T*)(DA).ptr)[i+1]); \ } \ } \ } \ - if ((DA.cnt)>=I) (DA).cnt--; \ + if ((DA).cnt>=(N)) (DA).cnt--; \ } // Base DotsPerInch @@ -223,14 +256,19 @@ typedef struct { // FORWARD TYPE DECLS typedef struct drawCmd_t * drawCmd_p; typedef struct track_t * track_p; +typedef struct track_t * track_cp; typedef struct trkSeg_t * trkSeg_p; typedef struct traverseTrack_t * traverseTrack_p; typedef struct trkEndPt_t * trkEndPt_p; +typedef void (*doSaveCallBack_p)( void ); +typedef void (*addButtonCallBack_t)(void*); +typedef STATUS_T (*procCommand_t) (wAction_t, coOrd); + // base class for extraData*_t: each of which must include this struct as the first element typedef struct extraDataBase_t { - TRKTYP_T trkType; - } extraDataBase_t; + TRKTYP_T trkType; +} extraDataBase_t; // We check if TRKTYP_T in trk, trk->extraDataBase and the code context (TRKTYP) match. // If TRKTYP is T_NOTRACK then we are dealing with T_TURNOUT/T_STRUCTURE or T_BEZIER/T_BEZLIN which // share a log of code and have the same extraData*_t structure. @@ -238,12 +276,43 @@ typedef struct extraDataBase_t { ((TYPE*)GetTrkExtraData( (TRK), (TRKTYP) )) extraDataBase_t * GetTrkExtraData( track_p, TRKTYP_T ); + +typedef struct { + BOOL_T valid; + DIST_T length; + DIST_T width; + DIST_T spacing; +} tieData_t, *tieData_p; + +// Syntactic suger for exported (non-static) objects +#define EXPORT + +#define COUNT(A) (sizeof(A)/sizeof(A[0])) + +#define STR_SIZE (256) +#define STR_SHORT_SIZE (80) +#define STR_LONG_SIZE (1024) +#define STR_HUGE_SIZE (10240) + +#define CAST_AWAY_CONST (char*) + +#define TITLEMAXLEN (40) + + + // COMMON INCLUDES // If you add includes here, please remove them elsewhere #include "i18n.h" #include "utility.h" +#include "acclkeys.h" #include "misc.h" +// TODO - move these includes to the files that need them +#include "dlayer.h" +#include "scale.h" +#include "command.h" +#include "menu.h" + #endif diff --git a/app/bin/compound.c b/app/bin/compound.c index b6d5847..dea754d 100644 --- a/app/bin/compound.c +++ b/app/bin/compound.c @@ -18,7 +18,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "tbezier.h" @@ -30,6 +30,7 @@ #include "fileio.h" #include "shrtpath.h" #include "track.h" +#include "trkendpt.h" #include "draw.h" #include "include/paramfile.h" #include "common-ui.h" @@ -50,7 +51,8 @@ */ EXPORT PATHPTR_T GetPaths( track_p trk ) { - struct extraDataCompound_t * xx = GET_EXTRA_DATA( trk, T_NOTRACK, extraDataCompound_t ); + struct extraDataCompound_t * xx = GET_EXTRA_DATA( trk, T_NOTRACK, + extraDataCompound_t ); if ( GetTrkType(trk) == T_STRUCTURE && xx->paths != NULL ) { LogPrintf( "GetPaths( STRUCTURE, paths!=NULL )\n" ); } @@ -70,7 +72,7 @@ EXPORT PATHPTR_T GetPaths( track_p trk ) EXPORT wIndex_t GetPathsLength( PATHPTR_T paths ) { PATHPTR_T pp; - ASSERT( paths != NULL ); + CHECK( paths != NULL ); for ( pp = paths; pp[0]; pp+=2 ) for ( pp += strlen( (char*)pp ); pp[0] || pp[1]; pp++ ); return (wIndex_t)(pp - paths + 1); @@ -96,9 +98,11 @@ EXPORT void SetPaths( track_p trk, PATHPTR_T paths ) LogPrintf( "SetPaths( TURNOUT, paths==NULL )\n" ); } - struct extraDataCompound_t * xx = GET_EXTRA_DATA( trk, T_NOTRACK, extraDataCompound_t ); - if ( xx->paths ) + struct extraDataCompound_t * xx = GET_EXTRA_DATA( trk, T_NOTRACK, + extraDataCompound_t ); + if ( xx->paths ) { MyFree( xx->paths ); + } if ( paths == NULL ) { xx->paths = NULL; } else { @@ -121,13 +125,15 @@ EXPORT void SetPaths( track_p trk, PATHPTR_T paths ) */ EXPORT PATHPTR_T GetCurrPath( track_p trk ) { - struct extraDataCompound_t * xx = GET_EXTRA_DATA( trk, T_TURNOUT, extraDataCompound_t ); - if ( xx->currPath ) + struct extraDataCompound_t * xx = GET_EXTRA_DATA( trk, T_TURNOUT, + extraDataCompound_t ); + if ( xx->currPath ) { return xx->currPath; + } PATHPTR_T path = GetPaths( trk ); for ( wIndex_t position = xx->currPathIndex; - position > 0 && path[0]; - path+=2, position-- ) { + position > 0 && path[0]; + path+=2, position-- ) { for ( path += strlen( (char*)path ); path[0] || path[1]; path++ ); } if ( !path[0] ) { @@ -141,18 +147,22 @@ EXPORT PATHPTR_T GetCurrPath( track_p trk ) EXPORT long GetCurrPathIndex( track_p trk ) { - if ( GetTrkType( trk ) != T_TURNOUT ) + if ( GetTrkType( trk ) != T_TURNOUT ) { return 0; - struct extraDataCompound_t * xx = GET_EXTRA_DATA( trk, T_TURNOUT, extraDataCompound_t ); + } + struct extraDataCompound_t * xx = GET_EXTRA_DATA( trk, T_TURNOUT, + extraDataCompound_t ); return xx->currPathIndex; } EXPORT void SetCurrPathIndex( track_p trk, long position ) { - if ( GetTrkType( trk ) != T_TURNOUT ) + if ( GetTrkType( trk ) != T_TURNOUT ) { return; - struct extraDataCompound_t * xx = GET_EXTRA_DATA( trk, T_TURNOUT, extraDataCompound_t ); + } + struct extraDataCompound_t * xx = GET_EXTRA_DATA( trk, T_TURNOUT, + extraDataCompound_t ); xx->currPathIndex = position; xx->currPath = NULL; } @@ -173,7 +183,7 @@ PATHPTR_T GetParamPaths( turnoutInfo_t * to ) * * Set paths for a Turnout Parameter 'to' * Used when creating a new turnout def'n - * + * * \param to IN * \param paths IN */ @@ -195,12 +205,12 @@ void SetParamPaths( turnoutInfo_t * to, PATHPTR_T paths ) */ EXPORT BOOL_T WriteCompoundPathsEndPtsSegs( - FILE * f, - PATHPTR_T paths, - wIndex_t segCnt, - trkSeg_p segs, - EPINX_T endPtCnt, - trkEndPt_t * endPts ) + FILE * f, + PATHPTR_T paths, + wIndex_t segCnt, + trkSeg_p segs, + EPINX_T endPtCnt, + trkEndPt_p endPts ) { int i; PATHPTR_T pp; @@ -209,27 +219,30 @@ EXPORT BOOL_T WriteCompoundPathsEndPtsSegs( if ( paths ) { for ( pp=paths; *pp; pp+=2 ) { rc &= fprintf( f, "\tP \"%s\"", pp )>0; - for ( pp+=strlen((char *)pp)+1; pp[0]!=0 || pp[1]!=0; pp++ ) + for ( pp+=strlen((char *)pp)+1; pp[0]!=0 || pp[1]!=0; pp++ ) { rc &= fprintf( f, " %d", pp[0] )>0; + } rc &= fprintf( f, "\n" )>0; } } - for ( i=0; i0; + GetEndPtPos(epp).x, GetEndPtPos(epp).y, GetEndPtAngle(epp) ) > 0; + } rc &= WriteSegs( f, segCnt, segs )>0; return rc; } EXPORT void ParseCompoundTitle( - char * title, - char * * manufP, - int * manufL, - char * * nameP, - int * nameL, - char * * partnoP, - int * partnoL ) + char * title, + char * * manufP, + int * manufL, + char * * nameP, + int * nameL, + char * * partnoP, + int * partnoL ) { char * cp1, *cp2; size_t len; @@ -256,10 +269,12 @@ EXPORT void ParseCompoundTitle( } } +EXPORT long listLabels = 7; +EXPORT long layoutLabels = 1; -void FormatCompoundTitle( - long format, - char * title ) +EXPORT void FormatCompoundTitle( + long format, + char * title ) { char *cp1, *cp2=NULL, *cq; size_t len; @@ -277,8 +292,9 @@ void FormatCompoundTitle( cq += strlen(cq); } cp1 = strchr( title, '\t' ); - if ( cp1 != NULL ) + if ( cp1 != NULL ) { cp2 = strchr( cp1+1, '\t' ); + } if (cp2 == NULL) { if ( (format&LABEL_TABBED) ) { *cq++ = '\t'; @@ -339,7 +355,7 @@ void FormatCompoundTitle( void ComputeCompoundBoundingBox( - track_p trk ) + track_p trk ) { struct extraDataCompound_t *xx; coOrd hi, lo; @@ -359,32 +375,33 @@ turnoutInfo_t * FindCompound( long type, char * scale, char * title ) wIndex_t inx; SCALEINX_T scaleInx; - if ( scale ) + if ( scale ) { scaleInx = LookupScale( scale ); - else + } else { scaleInx = -1; + } if ( type&FIND_TURNOUT ) - for (inx=0; inxparamFileIndex) && - to->segCnt > 0 && - (scaleInx == -1 || to->scaleInx == scaleInx ) && - to->segCnt != 0 && - strcmp( to->title, title ) == 0 ) { - return to; + for (inx=0; inxparamFileIndex) && + to->segCnt > 0 && + (scaleInx == -1 || to->scaleInx == scaleInx ) && + to->segCnt != 0 && + strcmp( to->title, title ) == 0 ) { + return to; + } } - } if ( type&FIND_STRUCT ) - for (inx=0; inxparamFileIndex) && - to->segCnt > 0 && - (scaleInx == -1 || to->scaleInx == scaleInx ) && - to->segCnt != 0 && - strcmp( to->title, title ) == 0 ) { - return to; + for (inx=0; inxparamFileIndex) && + to->segCnt > 0 && + (scaleInx == -1 || to->scaleInx == scaleInx ) && + to->segCnt != 0 && + strcmp( to->title, title ) == 0 ) { + return to; + } } - } return NULL; } @@ -402,13 +419,17 @@ EXPORT void CompoundClearDemoDefns( void ) for (inx=0; inxparamFileIndex == PARAM_CUSTOM && strcasecmp( GetScaleName(to->scaleInx), "DEMO" ) == 0 ) + if ( to->paramFileIndex == PARAM_CUSTOM + && strcasecmp( GetScaleName(to->scaleInx), "DEMO" ) == 0 ) { to->segCnt = 0; + } } for (inx=0; inxparamFileIndex == PARAM_CUSTOM && strcasecmp( GetScaleName(to->scaleInx), "DEMO" ) == 0 ) + if ( to->paramFileIndex == PARAM_CUSTOM + && strcasecmp( GetScaleName(to->scaleInx), "DEMO" ) == 0 ) { to->segCnt = 0; + } } } @@ -419,13 +440,14 @@ EXPORT void CompoundClearDemoDefns( void ) */ void SetDescriptionOrig( - track_p trk ) + track_p trk ) { - struct extraDataCompound_t *xx = GET_EXTRA_DATA(trk, T_NOTRACK, extraDataCompound_t); + struct extraDataCompound_t *xx = GET_EXTRA_DATA(trk, T_NOTRACK, + extraDataCompound_t); int i, j; coOrd p0, p1; - for (i=0,j=-1;isegCnt;i++) { + for (i=0,j=-1; isegCnt; i++) { if ( IsSegTrack( &xx->segs[i] ) ) { if (j == -1) { j = i; @@ -438,8 +460,8 @@ void SetDescriptionOrig( if (j != -1 && xx->segs[j].type == SEG_CRVTRK) { REORIGIN( p0, xx->segs[j].u.c.center, xx->angle, xx->orig ) Translate( &p0, p0, - xx->segs[j].u.c.a0 + xx->segs[j].u.c.a1/2.0 + xx->angle, - fabs(xx->segs[j].u.c.radius) ); + xx->segs[j].u.c.a0 + xx->segs[j].u.c.a1/2.0 + xx->angle, + fabs(xx->segs[j].u.c.radius) ); } else { GetBoundingBox( trk, (&p0), (&p1) ); @@ -453,31 +475,38 @@ void SetDescriptionOrig( void DrawCompoundDescription( - track_p trk, - drawCmd_p d, - wDrawColor color ) + track_p trk, + drawCmd_p d, + wDrawColor color ) { wFont_p fp; coOrd p1; - struct extraDataCompound_t *xx = GET_EXTRA_DATA(trk, T_NOTRACK, extraDataCompound_t); + struct extraDataCompound_t *xx = GET_EXTRA_DATA(trk, T_NOTRACK, + extraDataCompound_t); char * desc; long layoutLabelsOption = layoutLabels; - if (layoutLabels == 0) + if (layoutLabels == 0) { return; - if ((labelEnable&LABELENABLE_TRKDESC)==0) + } + if ((labelEnable&LABELENABLE_TRKDESC)==0) { return; - if ( (d->options&(DC_SIMPLE|DC_SEGTRACK)) ) + } + if ( (d->options&(DC_SIMPLE|DC_SEGTRACK)) ) { return; + } if ( xx->special == TOpier ) { desc = xx->u.pier.name; } else { - if ( xx->flipped ) + if ( xx->flipped ) { layoutLabelsOption |= LABEL_FLIPPED; - if ( xx->ungrouped ) + } + if ( xx->ungrouped ) { layoutLabelsOption |= LABEL_UNGROUPED; - if ( xx->split ) + } + if ( xx->split ) { layoutLabelsOption |= LABEL_SPLIT; + } FormatCompoundTitle( layoutLabelsOption, xtitle(xx) ); desc = message; } @@ -492,45 +521,51 @@ void DrawCompoundDescription( DrawLine( d, p0, p1, 0, color ); } fp = wStandardFont( F_TIMES, FALSE, FALSE ); - DrawBoxedString( (xx->special==TOpier)?BOX_INVERT:BOX_NONE, d, p1, desc, fp, (wFontSize_t)descriptionFontSize, color, 0.0 ); + DrawBoxedString( (xx->special==TOpier)?BOX_INVERT:BOX_NONE, d, p1, desc, fp, + (wFontSize_t)descriptionFontSize, color, 0.0 ); } DIST_T CompoundDescriptionDistance( - coOrd pos, - track_p trk, - coOrd * dpos, - BOOL_T show_hidden, - BOOL_T * hidden) + coOrd pos, + track_p trk, + coOrd * dpos, + BOOL_T show_hidden, + BOOL_T * hidden) { coOrd p1; - if (GetTrkType(trk) != T_TURNOUT && GetTrkType(trk) != T_STRUCTURE) + if (GetTrkType(trk) != T_TURNOUT && GetTrkType(trk) != T_STRUCTURE) { return DIST_INF; - struct extraDataCompound_t *xx = GET_EXTRA_DATA(trk, T_NOTRACK, extraDataCompound_t); - if ( ((GetTrkBits( trk ) & TB_HIDEDESC) != 0 ) && !show_hidden) + } + struct extraDataCompound_t *xx = GET_EXTRA_DATA(trk, T_NOTRACK, + extraDataCompound_t); + if ( ((GetTrkBits( trk ) & TB_HIDEDESC) != 0 ) && !show_hidden) { return DIST_INF; + } p1 = xx->descriptionOrig; coOrd offset = xx->descriptionOff; - if ( (GetTrkBits( trk ) & TB_HIDEDESC) != 0 ) offset = zero; + if ( (GetTrkBits( trk ) & TB_HIDEDESC) != 0 ) { offset = zero; } Rotate( &p1, zero, xx->angle ); p1.x += xx->orig.x + offset.x; p1.y += xx->orig.y + offset.y; - if (hidden) *hidden = (GetTrkBits( trk ) & TB_HIDEDESC); + if (hidden) { *hidden = (GetTrkBits( trk ) & TB_HIDEDESC); } *dpos = p1; coOrd tpos = pos; - if (DistanceCompound(trk,&tpos)segs[segInx], &segProcData ); @@ -659,64 +696,67 @@ DIST_T DistanceCompound( static struct { - coOrd endPt[4]; - ANGLE_T endAngle[4]; - DIST_T endRadius[4]; - coOrd endCenter[4]; - FLOAT_T elev[4]; - coOrd orig; - ANGLE_T angle; - descPivot_t pivot; - char manuf[STR_SIZE]; - char name[STR_SIZE]; - char partno[STR_SIZE]; - long epCnt; - long segCnt; - long pathCnt; - FLOAT_T grade; - DIST_T length; - drawLineType_e linetype; - unsigned int layerNumber; - } compoundData; + coOrd endPt[4]; + ANGLE_T endAngle[4]; + DIST_T endRadius[4]; + coOrd endCenter[4]; + FLOAT_T elev[4]; + coOrd orig; + ANGLE_T angle; + descPivot_t pivot; + char manuf[STR_SIZE]; + char name[STR_SIZE]; + char partno[STR_SIZE]; + long epCnt; + long segCnt; + long pathCnt; + FLOAT_T grade; + DIST_T length; + drawLineType_e linetype; + unsigned int layerNumber; +} compoundData; typedef enum { E0, A0, C0, R0, Z0, E1, A1, C1, R1, Z1, E2, A2, C2, R2, Z2, E3, A3, C3, R3, Z3, GR, OR, AN, PV, MN, NM, PN, LT, SC, LY } compoundDesc_e; static descData_t compoundDesc[] = { -/*E0*/ { DESC_POS, N_("End Pt 1: X,Y"), &compoundData.endPt[0] }, -/*A0*/ { DESC_ANGLE, N_("Angle"), &compoundData.endAngle[0] }, -/*C0*/ { DESC_POS, N_("Center X,Y"), &compoundData.endCenter[0] }, -/*R0*/ { DESC_DIM, N_("Radius"), &compoundData.endRadius[0] }, -/*Z0*/ { DESC_DIM, N_("Z1"), &compoundData.elev[0] }, -/*E1*/ { DESC_POS, N_("End Pt 2: X,Y"), &compoundData.endPt[1] }, -/*A1*/ { DESC_ANGLE, N_("Angle"), &compoundData.endAngle[1] }, -/*C1*/ { DESC_POS, N_("Center X,Y"), &compoundData.endCenter[1] }, -/*R1*/ { DESC_DIM, N_("Radius"), &compoundData.endRadius[1] }, -/*Z1*/ { DESC_DIM, N_("Z2"), &compoundData.elev[1] }, -/*E2*/ { DESC_POS, N_("End Pt 3: X,Y"), &compoundData.endPt[2] }, -/*A2*/ { DESC_ANGLE, N_("Angle"), &compoundData.endAngle[2] }, -/*C2*/ { DESC_POS, N_("Center X,Y"), &compoundData.endCenter[2] }, -/*R2*/ { DESC_DIM, N_("Radius"), &compoundData.endRadius[2] }, -/*Z2*/ { DESC_DIM, N_("Z3"), &compoundData.elev[2] }, -/*E3*/ { DESC_POS, N_("End Pt 4: X,Y"), &compoundData.endPt[3] }, -/*A3*/ { DESC_ANGLE, N_("Angle"), &compoundData.endAngle[3] }, -/*C3*/ { DESC_POS, N_("Center X,Y"), &compoundData.endCenter[3] }, -/*R3*/ { DESC_DIM, N_("Radius"), &compoundData.endRadius[3] }, -/*Z3*/ { DESC_DIM, N_("Z4"), &compoundData.elev[3] }, -/*GR*/ { DESC_FLOAT, N_("Grade"), &compoundData.grade }, -/*OR*/ { DESC_POS, N_("Origin: X,Y"), &compoundData.orig }, -/*AN*/ { DESC_ANGLE, N_("Angle"), &compoundData.angle }, -/*PV*/ { DESC_PIVOT, N_("Pivot"), &compoundData.pivot }, -/*MN*/ { DESC_STRING, N_("Manufacturer"), &compoundData.manuf, sizeof(compoundData.manuf)}, -/*NM*/ { DESC_STRING, N_("Name"), &compoundData.name, sizeof(compoundData.name) }, -/*PN*/ { DESC_STRING, N_("Part No"), &compoundData.partno, sizeof(compoundData.partno)}, -/*LT*/ { DESC_LIST, N_("LineType"), &compoundData.linetype }, -/*SC*/ { DESC_LONG, N_("# Segments"), &compoundData.segCnt }, -/*LY*/ { DESC_LAYER, N_("Layer"), &compoundData.layerNumber }, - { DESC_NULL } }; + /*E0*/ { DESC_POS, N_("End Pt 1: X,Y"), &compoundData.endPt[0] }, + /*A0*/ { DESC_ANGLE, N_("Angle"), &compoundData.endAngle[0] }, + /*C0*/ { DESC_POS, N_("Center X,Y"), &compoundData.endCenter[0] }, + /*R0*/ { DESC_DIM, N_("Radius"), &compoundData.endRadius[0] }, + /*Z0*/ { DESC_DIM, N_("Z1"), &compoundData.elev[0] }, + /*E1*/ { DESC_POS, N_("End Pt 2: X,Y"), &compoundData.endPt[1] }, + /*A1*/ { DESC_ANGLE, N_("Angle"), &compoundData.endAngle[1] }, + /*C1*/ { DESC_POS, N_("Center X,Y"), &compoundData.endCenter[1] }, + /*R1*/ { DESC_DIM, N_("Radius"), &compoundData.endRadius[1] }, + /*Z1*/ { DESC_DIM, N_("Z2"), &compoundData.elev[1] }, + /*E2*/ { DESC_POS, N_("End Pt 3: X,Y"), &compoundData.endPt[2] }, + /*A2*/ { DESC_ANGLE, N_("Angle"), &compoundData.endAngle[2] }, + /*C2*/ { DESC_POS, N_("Center X,Y"), &compoundData.endCenter[2] }, + /*R2*/ { DESC_DIM, N_("Radius"), &compoundData.endRadius[2] }, + /*Z2*/ { DESC_DIM, N_("Z3"), &compoundData.elev[2] }, + /*E3*/ { DESC_POS, N_("End Pt 4: X,Y"), &compoundData.endPt[3] }, + /*A3*/ { DESC_ANGLE, N_("Angle"), &compoundData.endAngle[3] }, + /*C3*/ { DESC_POS, N_("Center X,Y"), &compoundData.endCenter[3] }, + /*R3*/ { DESC_DIM, N_("Radius"), &compoundData.endRadius[3] }, + /*Z3*/ { DESC_DIM, N_("Z4"), &compoundData.elev[3] }, + /*GR*/ { DESC_FLOAT, N_("Grade"), &compoundData.grade }, + /*OR*/ { DESC_POS, N_("Origin: X,Y"), &compoundData.orig }, + /*AN*/ { DESC_ANGLE, N_("Angle"), &compoundData.angle }, + /*PV*/ { DESC_PIVOT, N_("Pivot"), &compoundData.pivot }, + /*MN*/ { DESC_STRING, N_("Manufacturer"), &compoundData.manuf, sizeof(compoundData.manuf)}, + /*NM*/ { DESC_STRING, N_("Name"), &compoundData.name, sizeof(compoundData.name) }, + /*PN*/ { DESC_STRING, N_("Part No"), &compoundData.partno, sizeof(compoundData.partno)}, + /*LT*/ { DESC_LIST, N_("LineType"), &compoundData.linetype }, + /*SC*/ { DESC_LONG, N_("# Segments"), &compoundData.segCnt }, + /*LY*/ { DESC_LAYER, N_("Layer"), &compoundData.layerNumber }, + { DESC_NULL } +}; #define MAX_DESCRIBE_ENDS 4 -static void UpdateCompound( track_p trk, int inx, descData_p descUpd, BOOL_T needUndoStart ) +static void UpdateCompound( track_p trk, int inx, descData_p descUpd, + BOOL_T needUndoStart ) { - struct extraDataCompound_t *xx = GET_EXTRA_DATA(trk, T_NOTRACK, extraDataCompound_t); + struct extraDataCompound_t *xx = GET_EXTRA_DATA(trk, T_NOTRACK, + extraDataCompound_t); const char * manufS, * nameS, * partnoS; char * mP, *nP, *pP; int mL, nL, pL; @@ -733,18 +773,19 @@ static void UpdateCompound( track_p trk, int inx, descData_p descUpd, BOOL_T nee case PN: titleChanged = FALSE; ParseCompoundTitle( xtitle(xx), &mP, &mL, &nP, &nL, &pP, &pL ); - if (mP == NULL) mP = ""; - if (nP == NULL) nP = ""; - if (pP == NULL) pP = ""; + if (mP == NULL) { mP = ""; } + if (nP == NULL) { nP = ""; } + if (pP == NULL) { pP = ""; } manufS = wStringGetValue( (wString_p)compoundDesc[MN].control0 ); size_t max_manustr = 256, max_partstr = 256, max_namestr = 256; - if (compoundDesc[MN].max_string) + if (compoundDesc[MN].max_string) { max_manustr = compoundDesc[MN].max_string-1; + } if (strlen(manufS)>max_manustr) { NoticeMessage2(0, MSG_ENTERED_STRING_TRUNCATED, _("Ok"), NULL, max_manustr-1); } message[0] = '\0'; - strncat( message, manufS, max_manustr-1 ); + strncat( message, manufS, max_manustr-1 ); if ( strncmp( manufS, mP, mL ) != 0 || mL != strlen(manufS) ) { titleChanged = TRUE; } @@ -753,8 +794,9 @@ static void UpdateCompound( track_p trk, int inx, descData_p descUpd, BOOL_T nee split = xx->split; nameS = wStringGetValue( (wString_p)compoundDesc[NM].control0 ); max_namestr = 256; - if (compoundDesc[NM].max_string) + if (compoundDesc[NM].max_string) { max_namestr = compoundDesc[NM].max_string; + } if (strlen(nameS)>max_namestr) { NoticeMessage2(0, MSG_ENTERED_STRING_TRUNCATED, _("Ok"), NULL, max_namestr-1); } @@ -777,17 +819,18 @@ static void UpdateCompound( track_p trk, int inx, descData_p descUpd, BOOL_T nee split = FALSE; } if ( strncmp( nameS, nP, nL ) != 0 || nL != strlen(nameS) || - xx->flipped != flipped || - xx->ungrouped != ungrouped || - xx->split != split ) { + xx->flipped != flipped || + xx->ungrouped != ungrouped || + xx->split != split ) { titleChanged = TRUE; } strcat( message, "\t" ); strncat( message, nameS, max_namestr-1 ); partnoS = wStringGetValue( (wString_p)compoundDesc[PN].control0 ); max_partstr = 256; - if (compoundDesc[PN].max_string) + if (compoundDesc[PN].max_string) { max_partstr = compoundDesc[PN].max_string; + } if (strlen(partnoS)>max_partstr) { NoticeMessage2(0, MSG_ENTERED_STRING_TRUNCATED, _("Ok"), NULL, max_partstr-1); } @@ -801,22 +844,23 @@ static void UpdateCompound( track_p trk, int inx, descData_p descUpd, BOOL_T nee MyFree(newTitle); return; } - if ( needUndoStart ) - UndoStart( _("Change Track"), "Change Track" ); + if ( needUndoStart ) { + UndoStart( _("Change Track"), "Change Track" ); + } UndoModify( trk ); GetBoundingBox( trk, &hi, &lo ); if ( labelScale >= mainD.scale && - !OFF_MAIND( lo, hi ) ) { + !OFF_MAIND( lo, hi ) ) { DrawCompoundDescription( trk, &mainD, wDrawColorWhite ); } /*sprintf( message, "%s\t%s\t%s", manufS, nameS, partnoS );*/ - if (xx->title) MyFree(xx->title); + if (xx->title) { MyFree(xx->title); } xx->title = newTitle; xx->flipped = flipped; xx->ungrouped = ungrouped; xx->split = split; if ( labelScale >= mainD.scale && - !OFF_MAIND( lo, hi ) ) { + !OFF_MAIND( lo, hi ) ) { DrawCompoundDescription( trk, &mainD, GetTrkColor(trk,&tempD) ); } return; @@ -835,29 +879,30 @@ static void UpdateCompound( track_p trk, int inx, descData_p descUpd, BOOL_T nee case A1: case A2: case A3: - if (inx==A3) ep=3; - else if (inx==A2) ep=2; - else if (inx==A1) ep=1; - else ep=0; - RotateTrack( trk, GetTrkEndPos(trk,ep), NormalizeAngle( compoundData.endAngle[ep]-GetTrkEndAngle(trk,ep) ) ); + if (inx==A3) { ep=3; } + else if (inx==A2) { ep=2; } + else if (inx==A1) { ep=1; } + else { ep=0; } + RotateTrack( trk, GetTrkEndPos(trk,ep), + NormalizeAngle( compoundData.endAngle[ep]-GetTrkEndAngle(trk,ep) ) ); ComputeCompoundBoundingBox( trk ); break; case AN: orig = xx->orig; GetBoundingBox(trk,&hi,&lo); switch (compoundData.pivot) { - case DESC_PIVOT_MID: - orig.x = (hi.x-lo.x)/2+lo.x; - orig.y = (hi.y-lo.y)/2+lo.y; - break; - case DESC_PIVOT_SECOND: - orig.x = (hi.x-lo.x)/2+lo.x; - orig.y = (hi.y-lo.y)/2+lo.y; - orig.x = (orig.x - xx->orig.x)*2+xx->orig.x; - orig.y = (orig.y - xx->orig.y)*2+xx->orig.y; - break; - default: - break; + case DESC_PIVOT_MID: + orig.x = (hi.x-lo.x)/2+lo.x; + orig.y = (hi.y-lo.y)/2+lo.y; + break; + case DESC_PIVOT_SECOND: + orig.x = (hi.x-lo.x)/2+lo.x; + orig.y = (hi.y-lo.y)/2+lo.y; + orig.x = (orig.x - xx->orig.x)*2+xx->orig.x; + orig.y = (orig.y - xx->orig.y)*2+xx->orig.y; + break; + default: + break; } RotateTrack( trk, orig, NormalizeAngle( compoundData.angle-xx->angle ) ); ComputeCompoundBoundingBox( trk ); @@ -866,10 +911,10 @@ static void UpdateCompound( track_p trk, int inx, descData_p descUpd, BOOL_T nee case E1: case E2: case E3: - if (inx==E3) ep=3; - else if (inx==E2) ep=2; - else if (inx==E1) ep=1; - else ep=0; + if (inx==E3) { ep=3; } + else if (inx==E2) { ep=2; } + else if (inx==E1) { ep=1; } + else { ep=0; } pos = GetTrkEndPos(trk,ep); pos.x = compoundData.endPt[ep].x - pos.x; pos.y = compoundData.endPt[ep].y - pos.y; @@ -881,17 +926,21 @@ static void UpdateCompound( track_p trk, int inx, descData_p descUpd, BOOL_T nee case Z2: case Z3: ep = (inx==Z0?0:(inx==Z1?1:(inx==Z2?2:3))); - UpdateTrkEndElev( trk, ep, GetTrkEndElevUnmaskedMode(trk,ep), compoundData.elev[ep], NULL ); - if ( GetTrkEndPtCnt(trk) == 1 ) - break; - for (int i=0;i minLength ) - compoundData.grade = fabs( (compoundData.elev[0]-compoundData.elev[1])/compoundData.length )*100.0; - else + if ( compoundData.length > minLength ) { + compoundData.grade = fabs( (compoundData.elev[0] + -compoundData.elev[1])/compoundData.length )*100.0; + } else { compoundData.grade = 0.0; + } compoundDesc[GR].mode |= DESC_CHANGE; compoundDesc[Z0+(E1-E0)*inx].mode |= DESC_CHANGE; break; @@ -901,18 +950,18 @@ static void UpdateCompound( track_p trk, int inx, descData_p descUpd, BOOL_T nee default: break; } - switch ( inx ) { - case A0: - case A1: - case A2: - case A3: - case E0: - case E1: - case E2: - case E3: - case AN: - case OR: - for (int i=0;(iorig; compoundDesc[OR].mode |= DESC_CHANGE; compoundData.angle = xx->angle; compoundDesc[AN].mode |= DESC_CHANGE; - break; - case LT: - xx->lineType = compoundData.linetype; - break; - default: - break; + break; + case LT: + xx->lineType = compoundData.linetype; + break; + default: + break; }; DrawNewTrack( trk ); @@ -943,11 +992,12 @@ static void UpdateCompound( track_p trk, int inx, descData_p descUpd, BOOL_T nee void DescribeCompound( - track_p trk, - char * str, - CSIZE_T len ) + track_p trk, + char * str, + CSIZE_T len ) { - struct extraDataCompound_t *xx = GET_EXTRA_DATA(trk, T_NOTRACK, extraDataCompound_t); + struct extraDataCompound_t *xx = GET_EXTRA_DATA(trk, T_NOTRACK, + extraDataCompound_t); int fix; EPINX_T ep, epCnt; char * mP, *nP, *pP, *cnP; @@ -955,31 +1005,35 @@ void DescribeCompound( long mode; long listLabelsOption = listLabels; DynString description; - char *trackType; + char *trackType; - if ( xx->flipped ) + if ( xx->flipped ) { listLabelsOption |= LABEL_FLIPPED; - if ( xx->ungrouped ) + } + if ( xx->ungrouped ) { listLabelsOption |= LABEL_UNGROUPED; - if ( xx->split ) + } + if ( xx->split ) { listLabelsOption |= LABEL_SPLIT; + } FormatCompoundTitle( listLabelsOption, xtitle(xx) ); - if (message[0] == '\0') + if (message[0] == '\0') { FormatCompoundTitle( listLabelsOption|LABEL_DESCR, xtitle(xx) ); + } - if (GetTrkEndPtCnt(trk) <= 1) { + if (GetTrkEndPtCnt(trk) < 1) { trackType = _("Structure"); } else { trackType = GetTrkEndPtCnt(trk) > 2 ? _("Turnout") : _("Sectional Track"); } DynStringMalloc(&description, len); DynStringPrintf(&description, - _("%s (%d) Layer= %d %s"), - trackType, - GetTrkIndex(trk), - GetTrkLayer(trk) + 1, - message); - + _("%s (%d) Layer= %d %s"), + trackType, + GetTrkIndex(trk), + GetTrkLayer(trk) + 1, + message); + if (DynStringSize(&description) > (unsigned)len) { strncpy(str, DynStringToCStr(&description), len - 1); strcpy(str + len - 4, "..."); @@ -1040,7 +1094,7 @@ void DescribeCompound( for ( int i=0 ; i<4 ; i++) { compoundDesc[E0+(E1-E0)*i].mode = DESC_IGNORE; - compoundDesc[A0+(E1-E0)*i].mode = DESC_IGNORE; + compoundDesc[A0+(E1-E0)*i].mode = DESC_IGNORE; compoundDesc[R0+(E1-E0)*i].mode = DESC_IGNORE; compoundDesc[C0+(E1-E0)*i].mode = DESC_IGNORE; compoundDesc[Z0+(E1-E0)*i].mode = DESC_IGNORE; @@ -1048,16 +1102,16 @@ void DescribeCompound( compoundDesc[GR].mode = DESC_IGNORE; compoundDesc[OR].mode = - compoundDesc[AN].mode = fix?DESC_RO:0; + compoundDesc[AN].mode = fix?DESC_RO:0; compoundDesc[MN].mode = - compoundDesc[NM].mode = - compoundDesc[PN].mode = 0 /*DESC_NOREDRAW*/; + compoundDesc[NM].mode = + compoundDesc[PN].mode = 0 /*DESC_NOREDRAW*/; compoundDesc[SC].mode = DESC_RO; compoundDesc[LY].mode = DESC_NOREDRAW; compoundDesc[PV].mode = 0; compoundData.pivot = DESC_PIVOT_FIRST; if (compoundData.epCnt >0) { - for (int i=0;(i minLength && compoundData.epCnt > 1) - compoundData.grade = fabs( (compoundData.elev[0]-compoundData.elev[1])/compoundData.length )*100.0; - else + } + if ( compoundData.length > minLength && compoundData.epCnt > 1) { + compoundData.grade = fabs( (compoundData.elev[0] + -compoundData.elev[1])/compoundData.length )*100.0; + } else { compoundData.grade = 0.0; + } if (GetTrkEndPtCnt(trk) == 0) { compoundDesc[LT].mode = 0; - } else + } else { compoundDesc[LT].mode = DESC_IGNORE; + } DoDescribe(trackType, trk, compoundDesc, UpdateCompound); @@ -1097,10 +1156,14 @@ void DescribeCompound( wListAddValue( (wList_p)compoundDesc[LT].control0, _("Solid"), NULL, I2VP(0) ); wListAddValue( (wList_p)compoundDesc[LT].control0, _("Dash"), NULL, I2VP(1) ); wListAddValue( (wList_p)compoundDesc[LT].control0, _("Dot"), NULL, I2VP(2) ); - wListAddValue( (wList_p)compoundDesc[LT].control0, _("DashDot"), NULL, I2VP(3) ); - wListAddValue( (wList_p)compoundDesc[LT].control0, _("DashDotDot"), NULL, I2VP(4) ); - wListAddValue( (wList_p)compoundDesc[LT].control0, _("CenterDot"), NULL, I2VP(5) ); - wListAddValue( (wList_p)compoundDesc[LT].control0, _("PhantomDot"), NULL, I2VP(6) ); + wListAddValue( (wList_p)compoundDesc[LT].control0, _("DashDot"), NULL, + I2VP(3) ); + wListAddValue( (wList_p)compoundDesc[LT].control0, _("DashDotDot"), NULL, + I2VP(4) ); + wListAddValue( (wList_p)compoundDesc[LT].control0, _("CenterDot"), NULL, + I2VP(5) ); + wListAddValue( (wList_p)compoundDesc[LT].control0, _("PhantomDot"), NULL, + I2VP(6) ); wListSetIndex( (wList_p)compoundDesc[LT].control0, compoundData.linetype ); } @@ -1108,66 +1171,82 @@ void DescribeCompound( void DeleteCompound( - track_p t ) + track_p t ) { - struct extraDataCompound_t *xx = GET_EXTRA_DATA(t, T_NOTRACK, extraDataCompound_t); + struct extraDataCompound_t *xx = GET_EXTRA_DATA(t, T_NOTRACK, + extraDataCompound_t); FreeFilledDraw( xx->segCnt, xx->segs ); - if (xx->segCnt>0) MyFree( xx->segs ); + if (xx->segCnt>0) { MyFree( xx->segs ); } xx->segs = NULL; } BOOL_T WriteCompound( - track_p t, - FILE * f ) + track_p t, + FILE * f ) { - struct extraDataCompound_t *xx = GET_EXTRA_DATA(t, T_NOTRACK, extraDataCompound_t); + struct extraDataCompound_t *xx = GET_EXTRA_DATA(t, T_NOTRACK, + extraDataCompound_t); EPINX_T ep, epCnt; + int bits; long options; - long position = 0; +// long position = 0; drawLineType_e lineType = 0; BOOL_T rc = TRUE; options = (long)GetTrkWidth(t); - if (xx->handlaid) + if (xx->handlaid) { options |= COMPOUND_OPTION_HANDLAID; - if (xx->flipped) + } + if (xx->flipped) { options |= COMPOUND_OPTION_FLIPPED; - if (xx->ungrouped) + } + if (xx->ungrouped) { options |= COMPOUND_OPTION_UNGROUPED; - if (xx->split) + } + if (xx->split) { options |= COMPOUND_OPTION_SPLIT; - if (xx->pathOverRide) + } + if (xx->pathOverRide) { options |= COMPOUND_OPTION_PATH_OVERRIDE; - if (xx->pathNoCombine) + } + if (xx->pathNoCombine) { options |= COMPOUND_OPTION_PATH_NOCOMBINE; - if ( ( GetTrkBits( t ) & TB_HIDEDESC ) != 0 ) + } + if ( ( GetTrkBits( t ) & TB_HIDEDESC ) != 0 ) { options |= COMPOUND_OPTION_HIDEDESC; + } epCnt = GetTrkEndPtCnt(t); lineType = xx->lineType; + bits = GetTrkVisible(t)|(GetTrkNoTies(t)?1<<2:0)|(GetTrkBridge(t)?1<<3:0)| + (GetTrkRoadbed(t)?1<<4:0); rc &= fprintf(f, "%s %d %d %ld %ld %d %s %d %0.6f %0.6f 0 %0.6f \"%s\"\n", - GetTrkTypeName(t), - GetTrkIndex(t), GetTrkLayer(t), options, - GetCurrPathIndex(t), lineType, - GetTrkScaleName(t), GetTrkVisible(t)|(GetTrkNoTies(t)?1<<2:0)|(GetTrkBridge(t)?1<<3:0), - xx->orig.x, xx->orig.y, xx->angle, - PutTitle(xtitle(xx)) )>0; - for (ep=0; eporig.x, xx->orig.y, xx->angle, + PutTitle(xtitle(xx)) )>0; + for (ep=0; epspecial ) { case TOadjustable: rc &= fprintf( f, "\tX %s %0.3f %0.3f\n", ADJUSTABLE, - xx->u.adjustable.minD, xx->u.adjustable.maxD )>0; + xx->u.adjustable.minD, xx->u.adjustable.maxD )>0; break; case TOpier: - rc &= fprintf( f, "\tX %s %0.6f \"%s\"\n", PIER, xx->u.pier.height, xx->u.pier.name )>0; + rc &= fprintf( f, "\tX %s %0.6f \"%s\"\n", PIER, xx->u.pier.height, + xx->u.pier.name )>0; break; default: ; } - rc &= fprintf( f, "\tD %0.6f %0.6f\n", xx->descriptionOff.x, xx->descriptionOff.y )>0; - rc &= WriteCompoundPathsEndPtsSegs( f, GetPaths( t ), xx->segCnt, xx->segs, 0, NULL ); + rc &= fprintf( f, "\tD %0.6f %0.6f\n", xx->descriptionOff.x, + xx->descriptionOff.y )>0; + rc &= WriteCompoundPathsEndPtsSegs( f, GetPaths( t ), xx->segCnt, xx->segs, 0, + NULL ); return rc; } @@ -1180,8 +1259,10 @@ BOOL_T WriteCompound( * */ -EXPORT void SetCompoundLineType( track_p trk, int width ) { - struct extraDataCompound_t * xx = GET_EXTRA_DATA(trk, T_NOTRACK, extraDataCompound_t); +EXPORT void SetCompoundLineType( track_p trk, int width ) +{ + struct extraDataCompound_t * xx = GET_EXTRA_DATA(trk, T_NOTRACK, + extraDataCompound_t); switch(width) { case 0: xx->lineType = DRAWLINESOLID; @@ -1210,16 +1291,16 @@ EXPORT void SetCompoundLineType( track_p trk, int width ) { EXPORT track_p NewCompound( - TRKTYP_T trkType, - TRKINX_T index, - coOrd pos, - ANGLE_T angle, - char * title, - EPINX_T epCnt, - trkEndPt_t * epp, - PATHPTR_T paths, - wIndex_t segCnt, - trkSeg_p segs ) + TRKTYP_T trkType, + TRKINX_T index, + coOrd pos, + ANGLE_T angle, + char * title, + EPINX_T epCnt, + trkEndPt_p epp0, + PATHPTR_T paths, + wIndex_t segCnt, + trkSeg_p segs ) { track_p trk; struct extraDataCompound_t * xx; @@ -1241,21 +1322,22 @@ EXPORT track_p NewCompound( SetPaths( trk, paths ); xx->segCnt = segCnt; xx->segs = memdup( segs, segCnt * sizeof *segs ); - trkSeg_p p = xx->segs; +// trkSeg_p p = xx->segs; CopyPoly(xx->segs, xx->segCnt); FixUpBezierSegs(xx->segs,xx->segCnt); ComputeCompoundBoundingBox( trk ); SetDescriptionOrig( trk ); for ( ep=0; ep=3 && paramVersion <= 5 && trkType == T_STRUCTURE) + if (paramVersion >=3 && paramVersion <= 5 && trkType == T_STRUCTURE) { strcpy( scale, curScaleName ); - DYNARR_RESET( trkEndPt_t, tempEndPts_da ); + } + TempEndPtsReset(); pathCnt = 0; - if ( !ReadSegs() ) + if ( !ReadSegs() ) { return FALSE; + } if ( trkType == T_TURNOUT ) { - if ( tempEndPts_da.cnt <= 0 ) { + if ( TempEndPtsCount() <= 0 ) { InputError( "Turnout defn without EndPoints", TRUE ); return FALSE; } @@ -1311,17 +1399,19 @@ BOOL_T ReadCompound( } } trk = NewCompound( trkType, index, orig, angle, title, 0, NULL, - pathCnt > 1 ? pathPtr : NULL, - tempSegs_da.cnt, &tempSegs(0) ); + pathCnt > 1 ? pathPtr : NULL, + tempSegs_da.cnt, &tempSegs(0) ); SetEndPts( trk, 0 ); if ( paramVersion < 3 ) { SetTrkVisible(trk, visible!=0); SetTrkNoTies(trk, FALSE); SetTrkBridge(trk, FALSE); + SetTrkRoadbed(trk, FALSE); } else { SetTrkVisible(trk, visible&2); SetTrkNoTies(trk, visible&4); SetTrkBridge(trk, visible&8); + SetTrkRoadbed(trk, visible&16); } SetTrkScale(trk, LookupScale( scale )); SetTrkLayer(trk, layer); @@ -1335,21 +1425,24 @@ BOOL_T ReadCompound( xx->pathNoCombine = (int)((options&COMPOUND_OPTION_PATH_NOCOMBINE)!=0); xx->lineType = lineType; xx->descriptionOff = descriptionOff; - if ( ( options & COMPOUND_OPTION_HIDEDESC ) != 0 ) + if ( ( options & COMPOUND_OPTION_HIDEDESC ) != 0 ) { SetTrkBits( trk, TB_HIDEDESC ); + } if (tempSpecial[0] != '\0') { if (strncmp( tempSpecial, ADJUSTABLE, strlen(ADJUSTABLE) ) == 0) { xx->special = TOadjustable; if ( !GetArgs( tempSpecial+strlen(ADJUSTABLE), "ff", - &xx->u.adjustable.minD, &xx->u.adjustable.maxD ) ) + &xx->u.adjustable.minD, &xx->u.adjustable.maxD ) ) { return FALSE; + } } else if (strncmp( tempSpecial, PIER, strlen(PIER) ) == 0) { xx->special = TOpier; if ( !GetArgs( tempSpecial+strlen(PIER), "fq", - &xx->u.pier.height, &xx->u.pier.name ) ) + &xx->u.pier.height, &xx->u.pier.name ) ) { return FALSE; + } } else { InputError("Unknown special case", TRUE); @@ -1361,10 +1454,11 @@ BOOL_T ReadCompound( } void MoveCompound( - track_p trk, - coOrd orig ) + track_p trk, + coOrd orig ) { - struct extraDataCompound_t *xx = GET_EXTRA_DATA(trk, T_NOTRACK, extraDataCompound_t); + struct extraDataCompound_t *xx = GET_EXTRA_DATA(trk, T_NOTRACK, + extraDataCompound_t); xx->orig.x += orig.x; xx->orig.y += orig.y; ComputeCompoundBoundingBox( trk ); @@ -1372,11 +1466,12 @@ void MoveCompound( void RotateCompound( - track_p trk, - coOrd orig, - ANGLE_T angle ) + track_p trk, + coOrd orig, + ANGLE_T angle ) { - struct extraDataCompound_t *xx = GET_EXTRA_DATA(trk, T_NOTRACK, extraDataCompound_t); + struct extraDataCompound_t *xx = GET_EXTRA_DATA(trk, T_NOTRACK, + extraDataCompound_t); Rotate( &xx->orig, orig, angle ); xx->angle = NormalizeAngle( xx->angle + angle ); Rotate( &xx->descriptionOff, zero, angle ); @@ -1385,10 +1480,11 @@ void RotateCompound( void RescaleCompound( - track_p trk, - FLOAT_T ratio ) + track_p trk, + FLOAT_T ratio ) { - struct extraDataCompound_t *xx = GET_EXTRA_DATA(trk, T_NOTRACK, extraDataCompound_t); + struct extraDataCompound_t *xx = GET_EXTRA_DATA(trk, T_NOTRACK, + extraDataCompound_t); xx->orig.x *= ratio; xx->orig.y *= ratio; xx->descriptionOff.x *= ratio; @@ -1400,11 +1496,12 @@ void RescaleCompound( void FlipCompound( - track_p trk, - coOrd orig, - ANGLE_T angle ) + track_p trk, + coOrd orig, + ANGLE_T angle ) { - struct extraDataCompound_t *xx = GET_EXTRA_DATA(trk, T_NOTRACK, extraDataCompound_t); + struct extraDataCompound_t *xx = GET_EXTRA_DATA(trk, T_NOTRACK, + extraDataCompound_t); EPINX_T ep, epCnt; char * mP, *nP, *pP; int mL, nL, pL; @@ -1424,16 +1521,18 @@ void FlipCompound( xx->descriptionOrig.y = - xx->descriptionOrig.y; ComputeCompoundBoundingBox( trk ); epCnt = GetTrkEndPtCnt( trk ); - if ( epCnt >= 1 && epCnt <= 2 ) + if ( epCnt >= 1 && epCnt <= 2 ) { return; + } ParseCompoundTitle( xtitle(xx), &mP, &mL, &nP, &nL, &pP, &pL ); - to = FindCompound( epCnt==0?FIND_STRUCT:FIND_TURNOUT, GetScaleName(GetTrkScale(trk)), xx->title ); + to = FindCompound( epCnt==0?FIND_STRUCT:FIND_TURNOUT, + GetScaleName(GetTrkScale(trk)), xx->title ); if ( epCnt!=0 && to && to->customInfo ) { if ( GetArgs( to->customInfo, "qc", &type, &cp ) ) { if ( strcmp( type, "Regular Turnout" ) == 0 || - strcmp( type, "Curved Turnout" ) == 0 ) { + strcmp( type, "Curved Turnout" ) == 0 ) { if ( GetArgs( cp, "qqqqq", &mfg, &descL, &partL, &descR, &partR ) && - mP && strcmp( mP, mfg ) == 0 && nP && pP ) { + mP && strcmp( mP, mfg ) == 0 && nP && pP ) { if ( strcmp( nP, descL ) == 0 && strcmp( pP, partL ) == 0 ) { sprintf( message, "%s\t%s\t%s", mfg, descR, partR ); xx->title = MyStrdup( message ); @@ -1445,7 +1544,7 @@ void FlipCompound( return; } } - } + } } } if ( epCnt == 3 || epCnt == 4 ) { @@ -1459,54 +1558,66 @@ void FlipCompound( if ( epCnt == 3 ) { /* Wye? */ if ( fabs(endPos[1].x-endPos[2].x) < SMALLVALUE && - fabs(endPos[1].y+endPos[2].y) < SMALLVALUE ) + fabs(endPos[1].y+endPos[2].y) < SMALLVALUE ) { return; + } } else { /* Crossing */ - if ( fabs( (endPos[1].x-endPos[3].x) - (endPos[2].x-endPos[0].x ) ) < SMALLVALUE && - fabs( (endPos[2].y+endPos[3].y) ) < SMALLVALUE && - fabs( (endPos[0].y-endPos[1].y) ) < SMALLVALUE && - NormalizeAngle( (endAngle[2]-endAngle[3]-180+0.05) ) < 0.10 ) + if ( fabs( (endPos[1].x-endPos[3].x) - (endPos[2].x-endPos[0].x ) ) < SMALLVALUE + && + fabs( (endPos[2].y+endPos[3].y) ) < SMALLVALUE && + fabs( (endPos[0].y-endPos[1].y) ) < SMALLVALUE && + NormalizeAngle( (endAngle[2]-endAngle[3]-180+0.05) ) < 0.10 ) { return; + } /* 3 way */ if ( fabs( (endPos[1].x-endPos[2].x) ) < SMALLVALUE && - fabs( (endPos[1].y+endPos[2].y) ) < SMALLVALUE && - fabs( (endPos[0].y-endPos[3].y) ) < SMALLVALUE && - NormalizeAngle( (endAngle[1]+endAngle[2]-180+0.05) ) < 0.10 ) + fabs( (endPos[1].y+endPos[2].y) ) < SMALLVALUE && + fabs( (endPos[0].y-endPos[3].y) ) < SMALLVALUE && + NormalizeAngle( (endAngle[1]+endAngle[2]-180+0.05) ) < 0.10 ) { return; + } } toBest = NULL; d0 = 0.0; for (inx=0; inxparamFileIndex) && - to->segCnt > 0 && - to->scaleInx == GetTrkScale(trk) && - to->segCnt != 0 && - to->endCnt == epCnt ) { + to->segCnt > 0 && + to->scaleInx == GetTrkScale(trk) && + to->segCnt != 0 && + to->endCnt == epCnt ) { d1 = 0; a1 = 0; for ( ep=0; ependPt[ep].pos ); - if ( d2 > SMALLVALUE ) + trkEndPt_p epp = EndPtIndex( to->endPt, ep ); + d2 = FindDistance( endPos[ep], GetEndPtPos(epp) ); + if ( d2 > SMALLVALUE ) { break; - if ( d2 > d1 ) + } + if ( d2 > d1 ) { d1 = d2; - a2 = NormalizeAngle( endAngle[ep] - to->endPt[ep].angle + 0.05 ); - if ( a2 > 0.1 ) + } + a2 = NormalizeAngle( endAngle[ep] - GetEndPtAngle(epp) + 0.05 ); + if ( a2 > 0.1 ) { break; - if ( a2 > a1 ) + } + if ( a2 > a1 ) { a1 = a2; + } } - if ( eptitle, toBest->title ) != 0 ) + if ( strcmp( xx->title, toBest->title ) != 0 ) { xx->title = MyStrdup( toBest->title ); + } return; } } @@ -1515,12 +1626,12 @@ void FlipCompound( typedef struct { - long count; - char * type; - char * name; - FLOAT_T price; - DynString indexes; - } enumCompound_t; + long count; + char * type; + char * name; + FLOAT_T price; + DynString indexes; +} enumCompound_t; static dynArr_t enumCompound_da; #define EnumCompound(N) DYNARR_N( enumCompound_t,enumCompound_da,N) @@ -1534,17 +1645,21 @@ BOOL_T EnumerateCompound( track_p trk ) if ( trk != NULL ) { xx = GET_EXTRA_DATA(trk, T_NOTRACK, extraDataCompound_t); - if ( xx->flipped ) + if ( xx->flipped ) { listLabelsOption |= LABEL_FLIPPED; + } #ifdef LATER - if ( xx->ungrouped ) + if ( xx->ungrouped ) { listLabelsOption |= LABEL_UNGROUPED; - if ( xx->split ) + } + if ( xx->split ) { listLabelsOption |= LABEL_SPLIT; + } #endif FormatCompoundTitle( listLabelsOption, xtitle(xx) ); - if (message[0] == '\0') - return FALSE; //No content + if (message[0] == '\0') { + return FALSE; //No content + } for (inx = 0; inx < enumCompound_da.cnt; inx++ ) { cmp = strcmp( EnumCompound(inx).name, message ); if ( cmp == 0 ) { @@ -1558,11 +1673,13 @@ BOOL_T EnumerateCompound( track_p trk ) } } DYNARR_APPEND( enumCompound_t, enumCompound_da, 10 ); - for ( inx2 = enumCompound_da.cnt-1; inx2 > inx; inx2-- ) + for ( inx2 = enumCompound_da.cnt-1; inx2 > inx; inx2-- ) { EnumCompound(inx2) = EnumCompound(inx2-1); + } EnumCompound(inx).name = MyStrdup( message ); - if (strlen(message) > (size_t)enumerateMaxDescLen) + if (strlen(message) > (size_t)enumerateMaxDescLen) { enumerateMaxDescLen = (int)strlen(message); + } EnumCompound(inx).type = GetTrkTypeName( trk ); EnumCompound(inx).count = 1; DynStringMalloc(&(EnumCompound(inx).indexes),100); @@ -1575,9 +1692,10 @@ BOOL_T EnumerateCompound( track_p trk ) for (inx = 0; inx < enumCompound_da.cnt; inx++ ) { if (EnumCompound(inx).type[0] == *type) { EnumerateList( EnumCompound(inx).count, - EnumCompound(inx).price, - EnumCompound(inx).name, - DynStringSize(&(EnumCompound(inx).indexes))?DynStringToCStr(&(EnumCompound(inx).indexes)):NULL); + EnumCompound(inx).price, + EnumCompound(inx).name, + DynStringSize(&(EnumCompound(inx).indexes))?DynStringToCStr(&(EnumCompound( + inx).indexes)):NULL); } DynStringFree(&(EnumCompound(inx).indexes)); } diff --git a/app/bin/compound.h b/app/bin/compound.h index edcbb66..0a4a0ae 100644 --- a/app/bin/compound.h +++ b/app/bin/compound.h @@ -17,7 +17,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef COMPOUND_H @@ -29,77 +29,72 @@ typedef enum { TOnormal, TOadjustable, TOpierInfo, TOpier, TOcarDesc, TOlast } TOspecial_e; typedef struct { - char * name; - FLOAT_T height; - } pierInfo_t; + char * name; + FLOAT_T height; +} pierInfo_t; typedef union { - struct { - FLOAT_T minD, maxD; - } adjustable; - struct { - int cnt; - pierInfo_t * info; - } pierInfo; - struct { - FLOAT_T height; - char * name; - } pier; - } turnoutInfo_u; - -typedef struct turnoutInfo_t{ - SCALEINX_T scaleInx; - char * title; - coOrd orig; - coOrd size; - wIndex_t segCnt; - trkSeg_p segs; - wIndex_t endCnt; - trkEndPt_p endPt; - PATHPTR_T paths; - int paramFileIndex; - char * customInfo; - DIST_T barScale; - TOspecial_e special; - turnoutInfo_u u; - wBool_t pathOverRide; - wBool_t pathNoCombine; - char * contentsLabel; - } turnoutInfo_t; + struct { + FLOAT_T minD, maxD; + } adjustable; + struct { + int cnt; + pierInfo_t * info; + } pierInfo; + struct { + FLOAT_T height; + char * name; + } pier; +} turnoutInfo_u; + +typedef struct turnoutInfo_t { + SCALEINX_T scaleInx; + char * title; + coOrd orig; + coOrd size; + wIndex_t segCnt; + trkSeg_p segs; + wIndex_t endCnt; + trkEndPt_p endPt; + PATHPTR_T paths; + int paramFileIndex; + char * customInfo; + DIST_T barScale; + TOspecial_e special; + turnoutInfo_u u; + wBool_t pathOverRide; + wBool_t pathNoCombine; + char * contentsLabel; +} turnoutInfo_t; #define xtitle(X) \ (X->title) typedef struct extraDataCompound_t { - extraDataBase_t base; - coOrd orig; - ANGLE_T angle; - BOOL_T handlaid; - BOOL_T flipped; - BOOL_T ungrouped; - BOOL_T split; - BOOL_T pathOverRide; - BOOL_T pathNoCombine; - coOrd descriptionOrig; - coOrd descriptionOff; - coOrd descriptionSize; - char * title; - char * customInfo; - TOspecial_e special; - turnoutInfo_u u; - PATHPTR_T paths; - PATHPTR_T currPath; - long currPathIndex; - wIndex_t segCnt; - trkSeg_p segs; - drawLineType_e lineType; - } extraDataCompound_t; - -extern TRKTYP_T T_TURNOUT; -extern TRKTYP_T T_STRUCTURE; -extern TRKTYP_T T_BEZIER; -extern TRKTYP_T T_BZRLIN; -extern TRKTYP_T T_CORNU; + extraDataBase_t base; + coOrd orig; + ANGLE_T angle; + BOOL_T handlaid; + BOOL_T flipped; + BOOL_T ungrouped; + BOOL_T split; + BOOL_T pathOverRide; + BOOL_T pathNoCombine; + coOrd descriptionOrig; + coOrd descriptionOff; + coOrd descriptionSize; + char * title; + char * customInfo; + TOspecial_e special; + turnoutInfo_u u; + PATHPTR_T paths; + PATHPTR_T currPath; + long currPathIndex; + wIndex_t segCnt; + trkSeg_p segs; + drawLineType_e lineType; +} extraDataCompound_t; + extern DIST_T curBarScale; extern dynArr_t turnoutInfo_da; extern dynArr_t structureInfo_da; @@ -135,9 +130,11 @@ void SetParamPaths( turnoutInfo_t * to, PATHPTR_T paths ); #define FIND_TURNOUT (1<<11) #define FIND_STRUCT (1<<12) -void FormatCompoundTitle( long, char *); -BOOL_T WriteCompoundPathsEndPtsSegs( FILE *, PATHPTR_T, wIndex_t, trkSeg_p, EPINX_T, trkEndPt_p); -void ParseCompoundTitle( char *, char **, int *, char **, int *, char **, int * ); +void FormatCompoundTitle( long, char *); +BOOL_T WriteCompoundPathsEndPtsSegs( FILE *, PATHPTR_T, wIndex_t, trkSeg_p, + EPINX_T, trkEndPt_p); +void ParseCompoundTitle( char *, char **, int *, char **, int *, char **, + int * ); void FormatCompoundTitle( long, char *); void ComputeCompoundBoundingBox( track_p); turnoutInfo_t * FindCompound( long, char *, char * ); @@ -149,7 +146,8 @@ void DrawCompoundDescription( track_p, drawCmd_p, wDrawColor ); DIST_T DistanceCompound( track_p, coOrd * ); void DescribeCompound( track_p, char *, CSIZE_T ); void DeleteCompound( track_p ); -track_p NewCompound( TRKTYP_T, TRKINX_T, coOrd, ANGLE_T, char *, EPINX_T, trkEndPt_p, PATHPTR_T, wIndex_t, trkSeg_p ); +track_p NewCompound( TRKTYP_T, TRKINX_T, coOrd, ANGLE_T, char *, EPINX_T, + trkEndPt_p, PATHPTR_T, wIndex_t, trkSeg_p ); BOOL_T WriteCompound( track_p, FILE * ); BOOL_T ReadCompound( char *, TRKTYP_T ); void MoveCompound( track_p, coOrd ); @@ -172,35 +170,38 @@ wIndex_t FindListItemByContext( wList_p, void *); /* cturnout.c */ +extern long curTurnoutEp; EPINX_T TurnoutPickEndPt( coOrd p, track_p ); -BOOL_T SplitTurnoutCheck(track_p,coOrd,EPINX_T ep,track_p *,EPINX_T *,EPINX_T *,BOOL_T check, coOrd *, ANGLE_T *); +BOOL_T SplitTurnoutCheck(track_p,coOrd,EPINX_T ep,track_p *,EPINX_T *,EPINX_T *, + BOOL_T check, coOrd *, ANGLE_T *); void GetSegInxEP( signed char, int *, EPINX_T * ); void SetSegInxEP( signed char *, int, EPINX_T) ; -wIndex_t CheckPaths( wIndex_t, trkSeg_p, PATHPTR_T ); -turnoutInfo_t * CreateNewTurnout( char *, char *, wIndex_t, trkSeg_p, PATHPTR_T, EPINX_T, trkEndPt_p, wBool_t, long ); +wIndex_t CheckPaths( wIndex_t, trkSeg_p, PATHPTR_T, char* ); +turnoutInfo_t * CreateNewTurnout( char *, char *, wIndex_t, trkSeg_p, PATHPTR_T, + EPINX_T, trkEndPt_p, wBool_t, long ); void DeleteTurnoutParams(int fileInx); turnoutInfo_t * TurnoutAdd( long, SCALEINX_T, wList_p, coOrd *, EPINX_T ); STATUS_T CmdTurnoutAction( wAction_t, coOrd ); -BOOL_T ConnectAdjustableTracks( track_p trk1, EPINX_T ep1, track_p trk2, EPINX_T ep2 ); -track_p NewHandLaidTurnout( coOrd, ANGLE_T, coOrd, ANGLE_T, coOrd, ANGLE_T, ANGLE_T ); +BOOL_T ConnectAdjustableTracks( track_p trk1, EPINX_T ep1, track_p trk2, + EPINX_T ep2 ); +track_p NewHandLaidTurnout( coOrd, ANGLE_T, coOrd, ANGLE_T, coOrd, ANGLE_T, + ANGLE_T ); void NextTurnoutPosition( track_p trk ); -enum paramFileState GetTrackCompatibility(int paramFileIndex, SCALEINX_T scaleIndex); +enum paramFileState GetTrackCompatibility(int paramFileIndex, + SCALEINX_T scaleIndex); /* ctodesgn.c */ void EditCustomTurnout( turnoutInfo_t *, turnoutInfo_t * ); long ComputeTurnoutRoadbedSide( trkSeg_p, int, int, ANGLE_T, DIST_T ); /* cstruct.c */ -turnoutInfo_t * CreateNewStructure( char *, char *, wIndex_t, trkSeg_p, BOOL_T ); -enum paramFileState GetStructureCompatibility(int paramFileIndex, SCALEINX_T scaleIndex); -turnoutInfo_t * StructAdd( long, SCALEINX_T, wList_p, coOrd * ); +turnoutInfo_t * CreateNewStructure( char *, char *, wIndex_t, trkSeg_p, + BOOL_T ); +enum paramFileState GetStructureCompatibility(int paramFileIndex, + SCALEINX_T scaleIndex); +turnoutInfo_t * StructAdd( long, SCALEINX_T, wList_p, coOrd * ); STATUS_T CmdStructureAction( wAction_t, coOrd ); BOOL_T StructLoadCarDescList( wList_p ); void DeleteStructures(int fileIndex); -/* cstrdsgn.c */ -void EditCustomStructure( turnoutInfo_t * ); - -STATUS_T CmdCarDescAction( wAction_t, coOrd ); -BOOL_T CarCustomSave( FILE * ); #endif diff --git a/app/bin/cparalle.c b/app/bin/cparalle.c index 6825aea..533b9d5 100644 --- a/app/bin/cparalle.c +++ b/app/bin/cparalle.c @@ -17,7 +17,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "ccurve.h" @@ -30,10 +30,10 @@ #include "common-ui.h" static struct { - track_p Trk; - coOrd orig; - track_p anchor_Trk; - } Dpa; + track_p Trk; + coOrd orig; + track_p anchor_Trk; +} Dpa; static DIST_T parSeparation = 1.0; static double parSepFactor = 0.0; @@ -57,146 +57,150 @@ static paramGroup_t parSepPG = { "parallel", 0, parSepPLs, COUNT( parSepPLs ) }; static STATUS_T CmdParallel(wAction_t action, coOrd pos) { - DIST_T d; - track_p t=NULL; - coOrd p; - static coOrd p0, p1; - ANGLE_T a; - track_p t0, t1; - EPINX_T ep0=-1, ep1=-1; - wControl_p controls[4]; - char * labels[3]; - static DIST_T parRFactor; + DIST_T d; + track_p t=NULL; + coOrd p; + static coOrd p0, p1; + ANGLE_T a; + track_p t0, t1; + EPINX_T ep0=-1, ep1=-1; + wControl_p controls[4]; + char * labels[3]; + static DIST_T parRFactor; - parType = VP2L(commandContext); + parType = VP2L(commandContext); - switch (action&0xFF) { + switch (action&0xFF) { - case C_START: - if (parSepPLs[0].control==NULL) { - ParamCreateControls(&parSepPG, NULL); - } - if (parType == PAR_TRACK) { - sprintf(message, "parallel-separation-%s", curScaleName); - parSeparation = ceil(13.0*12.0/curScaleRatio); - } else { - sprintf(message, "parallel-line-separation-%s", curScaleName); - parSeparation = 5.0*12.0/curScaleRatio; - } - wPrefGetFloat("misc", message, &parSeparation, parSeparation); - ParamLoadControls(&parSepPG); - ParamGroupRecord(&parSepPG); - parSepPD.option |= PDO_NORECORD; + case C_START: + if (parSepPLs[0].control==NULL) { + ParamCreateControls(&parSepPG, NULL); + } + if (parType == PAR_TRACK) { + sprintf(message, "parallel-separation-%s", curScaleName); + parSeparation = ceil(13.0*12.0/curScaleRatio); + } else { + sprintf(message, "parallel-line-separation-%s", curScaleName); + parSeparation = 5.0*12.0/curScaleRatio; + } + wPrefGetFloat("misc", message, &parSeparation, parSeparation); + ParamLoadControls(&parSepPG); + ParamGroupRecord(&parSepPG); + parSepPD.option |= PDO_NORECORD; parFactorPD.option |= PDO_NORECORD; - controls[0] = parSepPD.control; - if (parType == PAR_TRACK) - controls[1] = parFactorPD.control; - else - controls[1] = NULL; - controls[2] = NULL; - labels[0] = N_("Separation"); - labels[1] = N_("Radius Factor"); - InfoSubstituteControls(controls, labels); - parSepPD.option &= ~PDO_NORECORD; - parFactorPD.option &= ~PDO_NORECORD; - Dpa.anchor_Trk = NULL; - tempSegs_da.cnt = 0; - SetAllTrackSelect( FALSE ); - return C_CONTINUE; + controls[0] = parSepPD.control; + if (parType == PAR_TRACK) { + controls[1] = parFactorPD.control; + } else { + controls[1] = NULL; + } + controls[2] = NULL; + labels[0] = N_("Separation"); + labels[1] = N_("Radius Factor"); + InfoSubstituteControls(controls, labels); + parSepPD.option &= ~PDO_NORECORD; + parFactorPD.option &= ~PDO_NORECORD; + Dpa.anchor_Trk = NULL; + DYNARR_RESET( trkSeg_t, tempSegs_da ); + SetAllTrackSelect( FALSE ); + return C_CONTINUE; - case wActionMove: - tempSegs_da.cnt = 0; - Dpa.anchor_Trk = NULL; - if (parType == PAR_TRACK) - Dpa.anchor_Trk = OnTrack(&pos, FALSE, TRUE); - else - Dpa.anchor_Trk = OnTrack(&pos, FALSE, FALSE); + case wActionMove: + DYNARR_RESET( trkSeg_t, tempSegs_da ); + Dpa.anchor_Trk = NULL; + if (parType == PAR_TRACK) { + Dpa.anchor_Trk = OnTrack(&pos, FALSE, TRUE); + } else { + Dpa.anchor_Trk = OnTrack(&pos, FALSE, FALSE); + } - if (!Dpa.anchor_Trk) { - return C_CONTINUE; - } - if (Dpa.anchor_Trk && !CheckTrackLayerSilent(Dpa.anchor_Trk)) { - Dpa.anchor_Trk = NULL; - return C_CONTINUE; - } - if (!QueryTrack(Dpa.anchor_Trk, Q_CAN_PARALLEL)) { - Dpa.anchor_Trk = NULL; - return C_CONTINUE; - } - break; - case C_DOWN: - Dpa.anchor_Trk = NULL; - tempSegs_da.cnt = 0; - if (parSeparation < 0.0) { - ErrorMessage(MSG_PARALLEL_SEP_GTR_0); - return C_ERROR; - } + if (!Dpa.anchor_Trk) { + return C_CONTINUE; + } + if (Dpa.anchor_Trk && !CheckTrackLayerSilent(Dpa.anchor_Trk)) { + Dpa.anchor_Trk = NULL; + return C_CONTINUE; + } + if (!QueryTrack(Dpa.anchor_Trk, Q_CAN_PARALLEL)) { + Dpa.anchor_Trk = NULL; + return C_CONTINUE; + } + break; + case C_DOWN: + Dpa.anchor_Trk = NULL; + DYNARR_RESET( trkSeg_t, tempSegs_da ); + if (parSeparation < 0.0) { + ErrorMessage(MSG_PARALLEL_SEP_GTR_0); + return C_ERROR; + } - controls[0] = parSepPD.control; - controls[1] = parFactorPD.control; - controls[2] = NULL; - labels[0] = N_("Separation"); - labels[1] = N_("Radius factor"); - InfoSubstituteControls(controls, labels); - ParamLoadData(&parSepPG); - Dpa.orig = pos; - if (parType == PAR_TRACK) + controls[0] = parSepPD.control; + controls[1] = parFactorPD.control; + controls[2] = NULL; + labels[0] = N_("Separation"); + labels[1] = N_("Radius factor"); + InfoSubstituteControls(controls, labels); + ParamLoadData(&parSepPG); + Dpa.orig = pos; + if (parType == PAR_TRACK) { Dpa.Trk = OnTrack(&pos, FALSE, TRUE); - else - Dpa.Trk = OnTrack(&pos, FALSE, FALSE); //Also lines for line - if (!Dpa.Trk) { - return C_CONTINUE; - } - if (!QueryTrack(Dpa.Trk, Q_CAN_PARALLEL)) { - Dpa.Trk = NULL; - InfoMessage(_(" Track/Line doesn't support parallel")); - wBeep(); - return C_CONTINUE; - } + } else { + Dpa.Trk = OnTrack(&pos, FALSE, FALSE); //Also lines for line + } + if (!Dpa.Trk) { + return C_CONTINUE; + } + if (!QueryTrack(Dpa.Trk, Q_CAN_PARALLEL)) { + Dpa.Trk = NULL; + InfoMessage(_(" Track/Line doesn't support parallel")); + wBeep(); + return C_CONTINUE; + } - parRFactor = (2864.0*(double)parSepFactor)/curScaleRatio; + parRFactor = (2864.0*(double)parSepFactor)/curScaleRatio; - if ((parType == PAR_TRACK) && (parSeparation == 0.0)) { - DIST_T orig_gauge = GetTrkGauge(Dpa.Trk); - DIST_T new_gauge = GetScaleTrackGauge(GetLayoutCurScale()); - if (orig_gauge == new_gauge) { - ErrorMessage(MSG_PARALLEL_SEP_GTR_0); - return C_ERROR; - } - parSeparation = fabs(orig_gauge/2-new_gauge/2); - parRFactor = 0.0; - } else if (parType != PAR_TRACK) - parRFactor = 0.0; - /* in case query has changed things (eg joint) */ - /* - * this seems to cause problems so I commented it out - * until further investigation shows the necessity - */ - //Dpa.Trk = OnTrack( &Dpa.orig, TRUE, TRUE ); - tempSegs_da.cnt = 0; - /* no break */ + if ((parType == PAR_TRACK) && (parSeparation == 0.0)) { + DIST_T orig_gauge = GetTrkGauge(Dpa.Trk); + DIST_T new_gauge = GetScaleTrackGauge(GetLayoutCurScale()); + if (orig_gauge == new_gauge) { + ErrorMessage(MSG_PARALLEL_SEP_GTR_0); + return C_ERROR; + } + parSeparation = fabs(orig_gauge/2-new_gauge/2); + parRFactor = 0.0; + } else if (parType != PAR_TRACK) { + parRFactor = 0.0; + } + /* in case query has changed things (eg joint) */ + /* + * this seems to cause problems so I commented it out + * until further investigation shows the necessity + */ + //Dpa.Trk = OnTrack( &Dpa.orig, TRUE, TRUE ); + DYNARR_RESET( trkSeg_t, tempSegs_da ); + /* no break */ - case C_MOVE: - if (Dpa.Trk == NULL) { - return C_CONTINUE; - } - tempSegs_da.cnt = 0; - if (!MakeParallelTrack(Dpa.Trk, pos, parSeparation, parRFactor, NULL, &p0, &p1, - parType == PAR_TRACK)) { - Dpa.Trk = NULL; - return C_CONTINUE; - } - return C_CONTINUE; + case C_MOVE: + if (Dpa.Trk == NULL) { + return C_CONTINUE; + } + DYNARR_RESET( trkSeg_t, tempSegs_da ); + if (!MakeParallelTrack(Dpa.Trk, pos, parSeparation, parRFactor, NULL, &p0, &p1, + parType == PAR_TRACK)) { + Dpa.Trk = NULL; + return C_CONTINUE; + } + return C_CONTINUE; - case C_UP: - Dpa.anchor_Trk = NULL; - if (Dpa.Trk == NULL) { - return C_CONTINUE; - } - t0=t1=NULL; - if (parType == PAR_TRACK) { + case C_UP: + Dpa.anchor_Trk = NULL; + if (Dpa.Trk == NULL) { + return C_CONTINUE; + } + t0=t1=NULL; + if (parType == PAR_TRACK) { p = p0; - tempSegs_da.cnt = 0; + DYNARR_RESET( trkSeg_t, tempSegs_da ); if ((t0=OnTrack(&p, FALSE, TRUE)) != NULL) { ep0 = PickEndPoint(p, t0); if (ep0 < 0 || GetTrkEndTrk(t0,ep0) != NULL) { @@ -222,23 +226,23 @@ static STATUS_T CmdParallel(wAction_t action, coOrd pos) } } } - } - UndoStart(_("Create Parallel Track"), "newParallel"); - if (!MakeParallelTrack(Dpa.Trk, pos, parSeparation, parRFactor, &t, NULL, NULL, - parType == PAR_TRACK)) { - tempSegs_da.cnt = 0; - return C_TERMINATE; - } - if (parType == PAR_TRACK) { - if (GetTrkGauge(Dpa.Trk)> parSeparation) { - SetTrkNoTies(t, TRUE); - } - //CopyAttributes( Dpa.Trk, t ); Don't force scale or track width or Layer - SetTrkBits(t,(GetTrkBits(t)&TB_HIDEDESC) | (GetTrkBits(Dpa.Trk)&~TB_HIDEDESC)); + } + UndoStart(_("Create Parallel Track"), "newParallel"); + if (!MakeParallelTrack(Dpa.Trk, pos, parSeparation, parRFactor, &t, NULL, NULL, + parType == PAR_TRACK)) { + DYNARR_RESET( trkSeg_t, tempSegs_da ); + return C_TERMINATE; + } + if (parType == PAR_TRACK) { + if (GetTrkGauge(Dpa.Trk)> parSeparation) { + SetTrkNoTies(t, TRUE); + } + //CopyAttributes( Dpa.Trk, t ); Don't force scale or track width or Layer + SetTrkBits(t,(GetTrkBits(t)&TB_HIDEDESC) | (GetTrkBits(Dpa.Trk)&~TB_HIDEDESC)); if (t0) { a = NormalizeAngle(GetTrkEndAngle(t0, ep0) - GetTrkEndAngle(t, - 0) + (180.0+connectAngle/2.0)); + 0) + (180.0+connectAngle/2.0)); if (a < connectAngle) { DrawEndPt(&mainD, t0, ep0, wDrawColorWhite); ConnectTracks(t0, ep0, t, 0); @@ -247,55 +251,58 @@ static STATUS_T CmdParallel(wAction_t action, coOrd pos) } if (t1) { a = NormalizeAngle(GetTrkEndAngle(t1, ep1) - GetTrkEndAngle(t, - 1) + (180.0+connectAngle/2.0)); + 1) + (180.0+connectAngle/2.0)); if (a < connectAngle) { DrawEndPt(&mainD, t1, ep1, wDrawColorWhite); ConnectTracks(t1, ep1, t, 1); DrawEndPt(&mainD, t1, ep1, wDrawColorBlack); } } - } - DrawNewTrack(t); - UndoEnd(); - InfoSubstituteControls(NULL, NULL); - if (parType == PAR_TRACK) - sprintf(message, "parallel-separation-%s", curScaleName); - else - sprintf(message, "parallel-line-separation-%s", curScaleName); - wPrefSetFloat("misc", message, parSeparation); - tempSegs_da.cnt = 0; - return C_TERMINATE; + } + DrawNewTrack(t); + UndoEnd(); + InfoSubstituteControls(NULL, NULL); + if (parType == PAR_TRACK) { + sprintf(message, "parallel-separation-%s", curScaleName); + } else { + sprintf(message, "parallel-line-separation-%s", curScaleName); + } + wPrefSetFloat("misc", message, parSeparation); + DYNARR_RESET( trkSeg_t, tempSegs_da ); + return C_TERMINATE; - case C_REDRAW: - if (Dpa.anchor_Trk) { + case C_REDRAW: + if (Dpa.anchor_Trk) { DrawTrack(Dpa.anchor_Trk,&tempD, - wDrawColorPreviewSelected); //Special color means THICK3 as well - } - if (tempSegs_da.cnt>0) { - DrawSegs( &tempD, zero, 0.0, &tempSegs(0), tempSegs_da.cnt, trackGauge, - wDrawColorBlack ); - } - return C_CONTINUE; + wDrawColorPreviewSelected); //Special color means THICK3 as well + } + DrawSegsDA( &tempD, NULL, zero, 0.0, &tempSegs_da, trackGauge, wDrawColorBlack, + 0 ); + return C_CONTINUE; - case C_CANCEL: - Dpa.anchor_Trk = NULL; - tempSegs_da.cnt = 0; - InfoSubstituteControls(NULL, NULL); - return C_TERMINATE; + case C_CANCEL: + Dpa.anchor_Trk = NULL; + DYNARR_RESET( trkSeg_t, tempSegs_da ); + InfoSubstituteControls(NULL, NULL); + return C_TERMINATE; - } - return C_CONTINUE; + } + return C_CONTINUE; } -#include "bitmaps/parallel.xpm" -#include "bitmaps/parallel-line.xpm" +#include "bitmaps/parallel.xpm3" +#include "bitmaps/parallel-line.xpm3" EXPORT void InitCmdParallel( wMenu_p menu ) { ButtonGroupBegin( _("Parallel"), "cmdParallelSetCmd", _("Parallel") ); - AddMenuButton( menu, CmdParallel, "cmdParallelTrack", _("Parallel Track"), wIconCreatePixMap(parallel_xpm[iconSize]), LEVEL0_50, IC_STICKY|IC_POPUP|IC_WANT_MOVE, ACCL_PARALLEL, I2VP(0) ); - AddMenuButton( menu, CmdParallel, "cmdParallelLine", _("Parallel Line"), wIconCreatePixMap(parallel_line_xpm[iconSize]), LEVEL0_50, IC_STICKY|IC_POPUP|IC_WANT_MOVE, ACCL_PARALLEL, I2VP(1) ); + AddMenuButton( menu, CmdParallel, "cmdParallelTrack", _("Parallel Track"), + wIconCreatePixMap(parallel_xpm3[iconSize]), LEVEL0_50, + IC_STICKY|IC_POPUP|IC_WANT_MOVE, ACCL_PARALLEL, I2VP(0) ); + AddMenuButton( menu, CmdParallel, "cmdParallelLine", _("Parallel Line"), + wIconCreatePixMap(parallel_line_xpm3[iconSize]), LEVEL0_50, + IC_STICKY|IC_POPUP|IC_WANT_MOVE, ACCL_PARALLEL, I2VP(1) ); ButtonGroupEnd(); ParamRegister( &parSepPG ); } diff --git a/app/bin/cprint.c b/app/bin/cprint.c index a8ae0c1..123ad99 100644 --- a/app/bin/cprint.c +++ b/app/bin/cprint.c @@ -1,5 +1,5 @@ /** \file cprint.c - * Printing functions. + * Printing functions. */ /* XTrkCad - Model Railroad CAD @@ -17,7 +17,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "custom.h" @@ -37,29 +37,31 @@ #define PRINTOPTION_SNAP (1<<0) typedef struct { - int x0, x1, y0, y1; - char * bm; - int memsize; - coOrd orig; - coOrd size; - ANGLE_T angle; - } bitmap_t; + int x0, x1, y0, y1; + char * bm; + int memsize; + coOrd orig; + coOrd size; + ANGLE_T angle; +} bitmap_t; static bitmap_t bm, bm0; #define BITMAP( BM, X, Y ) \ (BM).bm[ (X)-(BM).x0 + ((Y)-(BM).y0) * ((BM).x1-(BM).x0) ] static struct { - coOrd size; - coOrd orig; - ANGLE_T angle; - } currPrintGrid, newPrintGrid; + coOrd size; + coOrd orig; + ANGLE_T angle; +} currPrintGrid, newPrintGrid; -EXPORT coOrd GetPrintOrig() { +EXPORT coOrd GetPrintOrig() +{ return currPrintGrid.orig; } -EXPORT ANGLE_T GetPrintAngle() { +EXPORT ANGLE_T GetPrintAngle() +{ return currPrintGrid.angle; } /* @@ -70,7 +72,7 @@ EXPORT ANGLE_T GetPrintAngle() { static long printGaudy = 1; static long printRegistrationMarks = 1; static long printPageNumbers = 1; -static long printPhysSize = FALSE; +static long bIgnoreMargins = FALSE; static long printFormat = PORTRAIT; static long printOrder = 0; static long printGrid = 0; @@ -87,7 +89,7 @@ static coOrd maxPageSize; static coOrd realPageSize; static wWin_p printWin = NULL; -static wWin_p printMarginWin = NULL; +static wWin_p customMarginWin = NULL; static wMenu_p printGridPopupM; @@ -110,7 +112,7 @@ static char * printOrderLabels[] = { N_("Normal"), N_("Reverse"), NULL }; static char * printGaudyLabels[] = { N_("Engineering Data"), NULL }; static char * printRegistrationMarksLabels[] = { N_("Registration Marks (in 1:1 scale only)"), NULL }; static char * printPageNumberLabels[] = { N_("Page Numbers"), NULL }; -static char * printPhysSizeLabels[] = { N_("Ignore Page Margins"), NULL }; +static char * sIgnoreMarginsLabels[] = { N_("Ignore Page Margins"), NULL }; static char * printGridLabels[] = { N_("Snap Grid"), NULL }; static char * printRulerLabels[] = { N_("Layout Edge"), N_("Every Page"), N_("None"), NULL }; static char * printRoadbedLabels[] = { N_("Roadbed Outline"), NULL }; @@ -123,48 +125,50 @@ static paramFloatRange_t r_100_99999 = { -100, 99999, 0, PDO_NORANGECHECK_HIGH } static paramFloatRange_t r0_360 = { 0, 360 }; static paramData_t printPLs[] = { -/*0*/ { PD_LONG, &iPrintScale, "scale", 0, &rminScale_999, N_("Print Scale"), 0, I2VP(1) }, -/*1*/ { PD_FLOAT, &newPrintGrid.size.x, "pagew", PDO_DIM|PDO_SMALLDIM|PDO_NORECORD|PDO_NOPREF, &r1_pgsz_x, N_("Page Width"), 0, I2VP(2) }, -/*2*/ { PD_BUTTON, PrintMaxPageSize, "max", PDO_DLGHORZ, NULL, N_("Max") }, -/*3*/ { PD_FLOAT, &newPrintGrid.size.y, "pageh", PDO_DIM|PDO_SMALLDIM|PDO_NORECORD|PDO_NOPREF, &r1_pgsz_y, N_("Height"), 0, I2VP(2) }, -/*4*/ { PD_BUTTON, PrintSnapShot, "snapshot", PDO_DLGHORZ, NULL, N_("Snap Shot") }, -/*5*/ { PD_RADIO, &printFormat, "format", 0, printFormatLabels, N_("Page Format"), BC_HORZ|BC_NOBORDER, I2VP(1) }, -/*6*/ { PD_RADIO, &printOrder, "order", PDO_DLGBOXEND, printOrderLabels, N_("Print Order"), BC_HORZ|BC_NOBORDER }, -/*7*/ { PD_MESSAGE, N_("Print "), NULL, PDO_DLGRESETMARGIN| PDO_DLGNOLABELALIGN, I2VP(0) }, -/*8*/ { PD_TOGGLE, &printGaudy, "style", PDO_DLGNOLABELALIGN, printGaudyLabels, NULL, BC_HORZ|BC_NOBORDER, I2VP(1) }, + /*0*/ { PD_LONG, &iPrintScale, "scale", 0, &rminScale_999, N_("Print Scale"), 0, I2VP(1) }, + /*1*/ { PD_FLOAT, &newPrintGrid.size.x, "pagew", PDO_DIM|PDO_SMALLDIM|PDO_NORECORD|PDO_NOPREF, &r1_pgsz_x, N_("Page Width"), 0, I2VP(2) }, + /*2*/ { PD_BUTTON, PrintMaxPageSize, "max", PDO_DLGHORZ, NULL, N_("Max") }, + /*3*/ { PD_FLOAT, &newPrintGrid.size.y, "pageh", PDO_DIM|PDO_SMALLDIM|PDO_NORECORD|PDO_NOPREF, &r1_pgsz_y, N_("Height"), 0, I2VP(2) }, + /*4*/ { PD_BUTTON, PrintSnapShot, "snapshot", PDO_DLGHORZ, NULL, N_("Snap Shot") }, + /*5*/ { PD_RADIO, &printFormat, "format", 0, printFormatLabels, N_("Page Format"), BC_HORZ|BC_NOBORDER, I2VP(1) }, + /*6*/ { PD_RADIO, &printOrder, "order", PDO_DLGBOXEND, printOrderLabels, N_("Print Order"), BC_HORZ|BC_NOBORDER }, + /*7*/ { PD_MESSAGE, N_("Print "), NULL, PDO_DLGRESETMARGIN| PDO_DLGNOLABELALIGN, I2VP(0) }, + /*8*/ { PD_TOGGLE, &printGaudy, "style", PDO_DLGNOLABELALIGN, printGaudyLabels, NULL, BC_HORZ|BC_NOBORDER, I2VP(1) }, #define I_REGMARKS (9) -/*9*/ { PD_TOGGLE, &printRegistrationMarks, "registrationMarks", PDO_DLGNOLABELALIGN, printRegistrationMarksLabels, NULL, BC_HORZ|BC_NOBORDER }, + /*9*/ { PD_TOGGLE, &printRegistrationMarks, "registrationMarks", PDO_DLGNOLABELALIGN, printRegistrationMarksLabels, NULL, BC_HORZ|BC_NOBORDER }, #define I_PAGENUMBERS (10) -/*10*/ { PD_TOGGLE, &printPageNumbers, "pageNumbers", PDO_DLGNOLABELALIGN, printPageNumberLabels, NULL, BC_HORZ | BC_NOBORDER }, + /*10*/ { PD_TOGGLE, &printPageNumbers, "pageNumbers", PDO_DLGNOLABELALIGN, printPageNumberLabels, NULL, BC_HORZ | BC_NOBORDER }, #define I_GRID (11) -/*11*/ { PD_TOGGLE, &printGrid, "grid", PDO_DLGNOLABELALIGN, printGridLabels, NULL, BC_HORZ|BC_NOBORDER }, + /*11*/ { PD_TOGGLE, &printGrid, "grid", PDO_DLGNOLABELALIGN, printGridLabels, NULL, BC_HORZ|BC_NOBORDER }, #define I_RULER (12) -/*12*/ { PD_RADIO, &printRuler, "ruler", 0, printRulerLabels, N_("Rulers:"), BC_HORZ|BC_NOBORDER }, + /*12*/ { PD_RADIO, &printRuler, "ruler", 0, printRulerLabels, N_("Rulers:"), BC_HORZ|BC_NOBORDER }, #define I_CENTERLINE (13) -/*13*/ { PD_TOGGLE, &printCenterLine, "centerLine", PDO_DLGNOLABELALIGN, printCenterLineLabels, NULL, BC_HORZ|BC_NOBORDER }, + /*13*/ { PD_TOGGLE, &printCenterLine, "centerLine", PDO_DLGNOLABELALIGN, printCenterLineLabels, NULL, BC_HORZ|BC_NOBORDER }, #define I_ROADBED (14) -/*14*/{ PD_TOGGLE, &printRoadbed, "roadbed", PDO_DLGNOLABELALIGN, printRoadbedLabels, NULL, BC_HORZ|BC_NOBORDER }, + /*14*/{ PD_TOGGLE, &printRoadbed, "roadbed", PDO_DLGNOLABELALIGN, printRoadbedLabels, NULL, BC_HORZ|BC_NOBORDER }, #define I_ROADBEDWIDTH (15) -/*15*/{ PD_FLOAT, &printRoadbedWidth, "roadbedWidth", PDO_DIM , &r0_, N_(" Width") }, -/*16*/ { PD_TOGGLE, &printPhysSize, "physsize", PDO_DLGNOLABELALIGN, printPhysSizeLabels, NULL, BC_HORZ | BC_NOBORDER, I2VP(1) }, -/*17*/ { PD_BUTTON, DoPrintMargin, "margin", PDO_DLGHORZ|PDO_DLGBOXEND, NULL, N_("Margins") }, -/*18*/{ PD_FLOAT, &newPrintGrid.orig.x, "origx", PDO_DIM|PDO_DLGRESETMARGIN, &r_100_99999, N_("Origin: X"), 0, I2VP(2) }, -/*19*/ { PD_FLOAT, &newPrintGrid.orig.y, "origy", PDO_DIM, &r_100_99999, N_("Y"), 0, I2VP(2) }, -/*20*/ { PD_BUTTON, DoResetGrid, "reset", PDO_DLGHORZ, NULL, N_("Reset") }, -/*21*/ { PD_FLOAT, &newPrintGrid.angle, "origa", PDO_ANGLE|PDO_DLGBOXEND, &r0_360, N_("Angle"), 0, I2VP(2) }, -/*22*/ { PD_BUTTON, DoPrintSetup, "setup", PDO_DLGCMDBUTTON, NULL, N_("Setup") }, -/*23*/ { PD_BUTTON, SelectAllPages, "selall", 0, NULL, N_("Select All") }, -/*24*/ { PD_BUTTON, PrintClear, "clear", 0, NULL, N_("Clear") }, + /*15*/{ PD_FLOAT, &printRoadbedWidth, "roadbedWidth", PDO_DIM, &r0_, N_(" Width") }, + /*16*/ { PD_TOGGLE, &bIgnoreMargins, "physsize", PDO_DLGNOLABELALIGN, sIgnoreMarginsLabels, NULL, BC_HORZ | BC_NOBORDER, I2VP(1) }, + /*17*/ { PD_BUTTON, DoPrintMargin, "margin", PDO_DLGHORZ|PDO_DLGBOXEND, NULL, N_("Margins") }, + /*18*/{ PD_FLOAT, &newPrintGrid.orig.x, "origx", PDO_DIM|PDO_DLGRESETMARGIN, &r_100_99999, N_("Origin: X"), 0, I2VP(2) }, + /*19*/ { PD_FLOAT, &newPrintGrid.orig.y, "origy", PDO_DIM, &r_100_99999, N_("Y"), 0, I2VP(2) }, + /*20*/ { PD_BUTTON, DoResetGrid, "reset", PDO_DLGHORZ, NULL, N_("Reset") }, + /*21*/ { PD_FLOAT, &newPrintGrid.angle, "origa", PDO_ANGLE|PDO_DLGBOXEND, &r0_360, N_("Angle"), 0, I2VP(2) }, + /*22*/ { PD_BUTTON, DoPrintSetup, "setup", PDO_DLGCMDBUTTON, NULL, N_("Setup") }, + /*23*/ { PD_BUTTON, SelectAllPages, "selall", 0, NULL, N_("Select All") }, + /*24*/ { PD_BUTTON, PrintClear, "clear", 0, NULL, N_("Clear") }, #define I_PAGECNT (25) -/*25*/ { PD_MESSAGE, N_("0 pages"), NULL, 0, I2VP(80) }, -/*26*/ { PD_MESSAGE, N_("selected"), NULL, 0, I2VP(80) } + /*25*/ { PD_MESSAGE, N_("0 pages"), NULL, 0, I2VP(80) }, + /*26*/ { PD_MESSAGE, N_("selected"), NULL, 0, I2VP(80) } }; static paramGroup_t printPG = { "print", PGO_PREFMISCGROUP, printPLs, COUNT( printPLs ) }; -static struct { +struct margins_s { double top, right, bottom, left; -} printMargin = { 0.0, 0.0, 0.0, 0.0 }; +}; +static struct margins_s printerMargin = { 0.0, 0.0, 0.0, 0.0 }; +static struct margins_s customMargin = { 0.0, 0.0, 0.0, 0.0 }; /***************************************************************************** * @@ -174,10 +178,10 @@ static struct { /** * Update the dialog with the current number of selected pages. - * + * */ -static void +static void UpdatePageCount() { DynString msg; @@ -186,7 +190,7 @@ UpdatePageCount() DynStringPrintf(&msg, (pageCount == 1?_("%d page"):_("%d pages")), pageCount); ParamLoadMessage(&printPG, I_PAGECNT, DynStringToCStr(&msg)); ParamDialogOkActive(&printPG, pageCount != 0); - + DynStringFree(&msg); } @@ -198,11 +202,13 @@ static void ChangeDim( void ) bitmap_t tmpBm; BOOL_T selected; - MapGrid( zero, mapD.size, 0.0, currPrintGrid.orig, currPrintGrid.angle, currPrintGrid.size.x, currPrintGrid.size.y, - &x0, &x1, &y0, &y1 ); + MapGrid( zero, mapD.size, 0.0, currPrintGrid.orig, currPrintGrid.angle, + currPrintGrid.size.x, currPrintGrid.size.y, + &x0, &x1, &y0, &y1 ); - if ( x0==bm.x0 && x1==bm.x1 && y0==bm.y0 && y1==bm.y1 ) + if ( x0==bm.x0 && x1==bm.x1 && y0==bm.y0 && y1==bm.y1 ) { return; + } size = (x1-x0) * (y1-y0); if (size > bm0.memsize) { bm0.bm = MyRealloc( bm0.bm, size ); @@ -245,15 +251,15 @@ static void ChangeDim( void ) static void MarkPage( - wIndex_t x, - wIndex_t y ) + wIndex_t x, + wIndex_t y ) /* * Hilite a area */ { coOrd p[4]; - -LOG1( log_print, ( "MarkPage( %d, %d )\n", x, y) ) + + LOG1( log_print, ( "MarkPage( %d, %d )\n", x, y) ) if ( x=bm.x1 || y=bm.y1) { ErrorMessage( MSG_OUT_OF_BOUNDS ); return; @@ -266,7 +272,8 @@ LOG1( log_print, ( "MarkPage( %d, %d )\n", x, y) ) Rotate( &p[1], currPrintGrid.orig, currPrintGrid.angle ); Rotate( &p[2], currPrintGrid.orig, currPrintGrid.angle ); Rotate( &p[3], currPrintGrid.orig, currPrintGrid.angle ); -LOG( log_print, 2, ( "MP(%d,%d) [%0.3f %0.3f] x [%0.3f %0.3f]\n", x, y, p[0].x, p[0].y, p[2].x, p[2].y ) ) + LOG( log_print, 2, ( "MP(%d,%d) [%0.3f %0.3f] x [%0.3f %0.3f]\n", x, y, p[0].x, + p[0].y, p[2].x, p[2].y ) ) DrawHilightPolygon( &tempD, p, 4 ); } @@ -281,8 +288,9 @@ static void SelectPage( coOrd pos ) Rotate( &pos, zero, -currPrintGrid.angle ); x = (int)floor(pos.x/currPrintGrid.size.x); y = (int)floor(pos.y/currPrintGrid.size.y); - if ( x=bm.x1 || y=bm.y1) + if ( x=bm.x1 || y=bm.y1) { return; + } selected = BITMAP( bm, x, y ); pageCount += (selected?-1:1); BITMAP( bm, x, y ) = !selected; @@ -299,7 +307,8 @@ static void DrawPrintGrid( void ) { wIndex_t x, y; - DrawGrid( &tempD, &mapD.size, currPrintGrid.size.x, currPrintGrid.size.y, 0, 0, currPrintGrid.orig, currPrintGrid.angle, wDrawColorBlack, TRUE ); + DrawGrid( &tempD, &mapD.size, currPrintGrid.size.x, currPrintGrid.size.y, 0, 0, + currPrintGrid.orig, currPrintGrid.angle, wDrawColorBlack, TRUE ); for (y=bm.y0; y4.0) + if (smiggin>4.0) { smiggin = 4.0/smiggin; + } pageW = currPrintGrid.size.x/print_d.scale; pageH = currPrintGrid.size.y/print_d.scale; /* Draw some lines */ @@ -405,19 +417,19 @@ static void PrintGaudyBox( DrawString( &page_d, p00, 0.0, GetLayoutSubtitle(), fp, 12.0, wDrawColorBlack ); sprintf( dat, _("PrintScale 1:%ld Room %s x %s Model Scale %s File %s"), - (long)printScale, - FormatDistance( roomSize.x ), - FormatDistance( roomSize.y ), - curScaleName, GetLayoutFilename() ); + (long)printScale, + FormatDistance( roomSize.x ), + FormatDistance( roomSize.y ), + curScaleName, GetLayoutFilename() ); p00.x = 0.05; p00.y = 0.25+0.05; DrawString( &page_d, p00, 0.0, dat, fp, 14.0, wDrawColorBlack ); } static void PrintPlainBox( - int x, - int y, - coOrd *corners ) + int x, + int y, + coOrd *corners ) { coOrd p00, p01, p10, p11; char tmp[30]; @@ -426,8 +438,9 @@ static void PrintPlainBox( DIST_T smiggin; smiggin = wDrawGetDPI( print_d.d ); - if (smiggin>4.0) + if (smiggin>4.0) { smiggin = 4.0/smiggin; + } pageW = currPrintGrid.size.x/print_d.scale; pageH = currPrintGrid.size.y/print_d.scale; @@ -481,7 +494,7 @@ static void PrintEnableControls( void ) printRegistrationMarks = 0; ParamControlActive( &printPG, I_REGMARKS, FALSE ); } - if (printScale <= (twoRailScale*2+1)/2.0) { + if ( DrawTwoRails( &print_d, 1 ) ) { ParamLoadControl( &printPG, I_ROADBED ); ParamControlActive( &printPG, I_ROADBED, TRUE ); ParamControlActive( &printPG, I_ROADBEDWIDTH, TRUE ); @@ -516,20 +529,21 @@ static void PrintUpdate( int inx0 ) } currPrintGrid = newPrintGrid; for ( inx = 0; inx < COUNT( printPLs ); inx++ ) { - if ( inx != inx0 && printPLs[inx].context == I2VP(2) ) + if ( inx != inx0 && printPLs[inx].context == I2VP(2) ) { ParamLoadControl( &printPG, inx ); + } } ChangeDim(); } -static void SetPageSize( BOOL_T doScale ) +static void SetMaxPageSize( BOOL_T doScale ) { WDOUBLE_T temp, x, y; wPrintGetPageSize( &x, &y ); - if (!printPhysSize) { - x -= (printMargin.left+printMargin.right); - y -= (printMargin.top+printMargin.bottom); + if (!bIgnoreMargins) { + x -= (customMargin.left+customMargin.right); + y -= (customMargin.top+customMargin.bottom); } maxPageSize.x = x; maxPageSize.y = y; @@ -543,8 +557,9 @@ static void SetPageSize( BOOL_T doScale ) printRotate = FALSE; } if (doScale) { - if (printGaudy) + if (printGaudy) { maxPageSize.y -= 1.0; + } maxPageSize.x *= printScale; maxPageSize.y *= printScale; } @@ -554,7 +569,7 @@ static void SetPageSize( BOOL_T doScale ) /** * Select all pages for printing. - * + * */ static void SelectAllPages(void) @@ -576,7 +591,7 @@ static void PrintMaxPageSize( void ) * (depending on paper size, scale and orientation) */ { - SetPageSize( TRUE ); + SetMaxPageSize( TRUE ); currPrintGrid.size = maxPageSize; newPrintGrid = currPrintGrid; ParamLoadControls( &printPG ); @@ -591,7 +606,7 @@ static void DoPrintScale( void ) * Called whenever print scale or orientation changes. */ { - printScale = iPrintScale; + print_d.scale = printScale = iPrintScale; PrintMaxPageSize(); PrintEnableControls(); } @@ -603,38 +618,42 @@ static void DoPrintScale( void ) static void PrintMarginReset(); static paramFloatRange_t r0_1 = { 0.0, 1.0, 50 }; -static paramData_t printMarginPLs[] = { +static paramData_t customMarginPLs[] = { #define I_PM_FIRST (0) - { PD_FLOAT, &printMargin.top, "marginT", PDO_DIM|PDO_NOPREF, &r0_1, NULL, 0, NULL }, - { PD_FLOAT, &printMargin.right, "marginR", PDO_DIM|PDO_NOPREF, &r0_1, NULL, 0, NULL }, - { PD_FLOAT, &printMargin.bottom, "marginB", PDO_DIM|PDO_NOPREF, &r0_1, NULL, 0, NULL }, - { PD_FLOAT, &printMargin.left, "marginL", PDO_DIM|PDO_NOPREF, &r0_1, NULL, 0, NULL }, + { PD_FLOAT, &customMargin.top, "marginT", PDO_DIM|PDO_NOPREF, &r0_1, NULL, BO_IGNFOCUS, NULL }, + { PD_FLOAT, &customMargin.right, "marginR", PDO_DIM|PDO_NOPREF, &r0_1, NULL, BO_IGNFOCUS, NULL }, + { PD_FLOAT, &customMargin.bottom, "marginB", PDO_DIM|PDO_NOPREF, &r0_1, NULL, BO_IGNFOCUS, NULL }, + { PD_FLOAT, &customMargin.left, "marginL", PDO_DIM|PDO_NOPREF, &r0_1, NULL, BO_IGNFOCUS, NULL }, #define I_PM_COUNT (4) #define I_PM_MESSAGE (4) { PD_MESSAGE, NULL, NULL, 0, NULL }, #define I_PM_RESET (5) - { PD_BUTTON, PrintMarginReset, "marginReset", PDO_DLGCMDBUTTON, NULL, N_("Reset") } }; -static paramGroup_t printMarginPG = { "printMargin", PGO_PREFMISCGROUP|PGO_NODEFAULTPROC, printMarginPLs, COUNT( printMarginPLs ) }; + { PD_BUTTON, PrintMarginReset, "marginReset", PDO_DLGCMDBUTTON, NULL, N_("Reset") } +}; +static paramGroup_t customMarginPG = { "printMargin", PGO_PREFMISCGROUP|PGO_NODEFAULTPROC, customMarginPLs, COUNT( customMarginPLs ) }; static wLines_t aPmLines[] = { - { 1, 25, 11, 94, 11 }, - { 1, 94, 11, 94, 111 }, - { 1, 94, 111, 25, 111 }, - { 1, 25, 111, 25, 11 }}; + { 1, 25, 11, 94, 11 }, + { 1, 94, 11, 94, 111 }, + { 1, 94, 111, 25, 111 }, + { 1, 25, 111, 25, 11 } +}; static int pmxoff=14; static int pmyoff=5; static void PrintMarginLayout( - paramData_t * pd, - int index, - wWinPix_t colX, - wWinPix_t * w, - wWinPix_t * h ) + paramData_t * pd, + int index, + wWinPix_t colX, + wWinPix_t * w, + wWinPix_t * h ) { - if ( index < I_PM_FIRST || index > (I_PM_MESSAGE) ) + if ( index < I_PM_FIRST || index > (I_PM_MESSAGE) ) { return; + } if ( index == I_PM_MESSAGE ) { - *h = wControlGetPosY( printMarginPLs[I_PM_FIRST+2].control ) + wControlGetHeight( printMarginPLs[I_PM_FIRST+2].control ); + *h = wControlGetPosY( customMarginPLs[I_PM_FIRST+2].control ) + + wControlGetHeight( customMarginPLs[I_PM_FIRST+2].control ); return; } wWinPix_t x0, y0; @@ -642,9 +661,6 @@ static void PrintMarginLayout( y0 = (aPmLines[index-I_PM_FIRST].y0+aPmLines[index-I_PM_FIRST].y1)/2; x0 -= pmxoff; y0 -= pmyoff; -// y0 += wControlGetPosY( printMarginPLs[0].control ) + wControlGetHeight( printMarginPLs[0].control ); -// x0 -= wControlGetWidth( printMarginPLs[index-I_PM_FIRST].control )/2; -// y0 -= wControlGetHeight( printMarginPLs[index-I_PM_FIRST].control )/2; *w = x0; *h = y0; } @@ -652,85 +668,98 @@ static void PrintMarginLayout( static const char * sPrinterName = NULL; -static BOOL_T SetMargins() +/** + * Get saved customMargins (default values = printerMargins) + * Return true is any values differ from default + */ +static void GetMargins() { - double top, right, bottom, left; - wPrintGetMargins( &top, &right, &bottom, &left ); + wPrintGetMargins( &printerMargin.top, &printerMargin.right, + &printerMargin.bottom, &printerMargin.left ); sprintf( message, "%s-marginT", sPrinterName ); - wPrefGetFloat( "printer", message, &printMargin.top, top ); + wPrefGetFloat( "printer", message, &customMargin.top, printerMargin.top ); sprintf( message, "%s-marginR", sPrinterName ); - wPrefGetFloat( "printer", message, &printMargin.right, right ); + wPrefGetFloat( "printer", message, &customMargin.right, printerMargin.right ); sprintf( message, "%s-marginB", sPrinterName ); - wPrefGetFloat( "printer", message, &printMargin.bottom, bottom ); + wPrefGetFloat( "printer", message, &customMargin.bottom, printerMargin.bottom ); sprintf( message, "%s-marginL", sPrinterName ); - wPrefGetFloat( "printer", message, &printMargin.left, left ); - ParamLoadControls( &printMarginPG ); - return - fabs( top - printMargin.top ) >= 0.001 || - fabs( right - printMargin.right ) >= 0.001 || - fabs( bottom - printMargin.bottom ) >= 0.001 || - fabs( left - printMargin.left ) >= 0.001; + wPrefGetFloat( "printer", message, &customMargin.left, printerMargin.left ); + ParamLoadControls( &customMarginPG ); } +/** + * Process PrintMargin Ok button + * Save updates margins + * Recalc page size and update dialog items + */ static void DoPrintMarginOk( void * context ) { - wHide( printMarginWin ); + wHide( customMarginWin ); sprintf( message, "%s-marginT", sPrinterName ); - wPrefSetFloat( "printer", message, printMargin.top ); + wPrefSetFloat( "printer", message, customMargin.top ); sprintf( message, "%s-marginR", sPrinterName ); - wPrefSetFloat( "printer", message, printMargin.right ); + wPrefSetFloat( "printer", message, customMargin.right ); sprintf( message, "%s-marginB", sPrinterName ); - wPrefSetFloat( "printer", message, printMargin.bottom ); + wPrefSetFloat( "printer", message, customMargin.bottom ); sprintf( message, "%s-marginL", sPrinterName ); - wPrefSetFloat( "printer", message, printMargin.left ); - SetPageSize( TRUE ); + wPrefSetFloat( "printer", message, customMargin.left ); + SetMaxPageSize( TRUE ); for ( int inx = 0; inx < COUNT( printPLs ); inx++ ) { - if ( printPLs[inx].context == I2VP(2) ) + if ( printPLs[inx].context == I2VP(2) ) { ParamLoadControl( &printPG, inx ); + } } + ParamLoadControls( &customMarginPG ); DoPrintScale(); } static void PrintMarginDlgUpdate( paramGroup_p pg, int index, void * context ) { - wControlActive( printMarginPLs[I_PM_RESET].control, TRUE ); + wBool_t bEnable = + fabs( printerMargin.top - customMargin.top ) >= 0.001 || + fabs( printerMargin.right - customMargin.right ) >= 0.001 || + fabs( printerMargin.bottom - customMargin.bottom ) >= 0.001 || + fabs( printerMargin.left - customMargin.left ) >= 0.001; + wControlActive( customMarginPLs[I_PM_RESET].control, bEnable ); } +/** + * Reset custom margins to printer margins + */ static void PrintMarginReset() { - wPrintGetMargins( &printMargin.top, &printMargin.right, &printMargin.bottom, &printMargin.left ); - ParamLoadControls( &printMarginPG ); - wControlActive( printMarginPLs[I_PM_RESET].control, FALSE ); + customMargin = printerMargin; + ParamLoadControls( &customMarginPG ); + wControlActive( customMarginPLs[I_PM_RESET].control, FALSE ); } +/** + * Open PrintMargin dialog + */ static void DoPrintMargin( void ) { - sPrinterName = wPrintGetName(); - while ( *sPrinterName == '\0' ) { - int rc = NoticeMessage( MSG_NO_PRINTER_SELECTED, _("Ok"), _("Cancel") ); - if ( rc <= 0 ) - return; - DoPrintSetup(); - } - if ( printMarginWin == NULL ) { + if ( customMarginWin == NULL ) { int x=10, y=10; - printMarginWin = ParamCreateDialog( &printMarginPG, MakeWindowTitle(_("Print Margins")), _("Ok"), DoPrintMarginOk, NULL, TRUE, PrintMarginLayout, F_BLOCK, PrintMarginDlgUpdate ); - if ( printMarginWin == NULL ) + customMarginWin = ParamCreateDialog( &customMarginPG, + MakeWindowTitle(_("Print Margins")), _("Ok"), DoPrintMarginOk, NULL, TRUE, + PrintMarginLayout, F_BLOCK, PrintMarginDlgUpdate ); + if ( customMarginWin == NULL ) { return; + } for ( int i=0; i pageSize.y) { t = pageSize.x; @@ -788,24 +818,26 @@ static void PrintSnapShot( void ) size = mapD.size; scaleH = 1; - for (i=0;i<3;i++) { + for (i=0; i<3; i++) { size = mapD.size; size.x += 2*0.5*scaleH; size.y += 2*0.5*scaleH; - if (printGaudy) + if (printGaudy) { size.y += 1.0*scaleH; + } scaleX = size.x/pageSize.x; scaleY = size.y/pageSize.y; scaleH = (long)ceil(max( scaleX, scaleY )); } scaleV = 1; - for (i=0;i<3;i++) { + for (i=0; i<3; i++) { size = mapD.size; size.x += 2*0.5*scaleV; size.y += 2*0.5*scaleV; - if (printGaudy) + if (printGaudy) { size.y += 1.0*scaleV; + } scaleX = size.x/pageSize.y; scaleY = size.y/pageSize.x; scaleV = (long)ceil(max( scaleX, scaleY )); @@ -819,17 +851,17 @@ static void PrintSnapShot( void ) printFormat = LANDSCAPE; } - SetPageSize( TRUE ); -/* - if (printFormat == LANDSCAPE) { - currPrintGrid.orig.x = -0.5*printScale; - currPrintGrid.orig.y = maxPageSize.x-0.5*printScale; - currPrintGrid.angle = 90.0; - } else {*/ - currPrintGrid.orig.x = -0.5*printScale; //Bigger rulers - currPrintGrid.orig.y = -0.5*printScale; //Bigger rules - currPrintGrid.angle = 0.0; -/* }*/ + SetMaxPageSize( TRUE ); + /* + if (printFormat == LANDSCAPE) { + currPrintGrid.orig.x = -0.5*printScale; + currPrintGrid.orig.y = maxPageSize.x-0.5*printScale; + currPrintGrid.angle = 90.0; + } else {*/ + currPrintGrid.orig.x = -0.5*printScale; //Bigger rulers + currPrintGrid.orig.y = -0.5*printScale; //Bigger rules + currPrintGrid.angle = 0.0; + /* }*/ currPrintGrid.size = maxPageSize; newPrintGrid = currPrintGrid; iPrintScale = (long)printScale; @@ -865,9 +897,11 @@ static void DrawRegistrationMarks( drawCmd_p d ) qq.x = p0.x = p1.x = (POS_T)GetDim(x); p0.y = 0.0; p1.y = mapD.size.y; - if (!ClipLine( &p0, &p1, d->orig, d->angle, d->size )) + if (!ClipLine( &p0, &p1, d->orig, d->angle, d->size )) { continue; - for ( y=(long)(ceil(PutDim(p0.y)/delta)*delta); (POS_T)y 0 && x <= bm.x1-bm.x0 && y > 0 && y <= bm.y1-bm.y0) { - DynStringPrintf(&formatted, "(%d/%d)", x, y); - } else { - DynStringCatCStr(&formatted, "(-/-)"); - } - - result = strdup(DynStringToCStr(&formatted)); - DynStringFree(&formatted); - - return (result); + DynString formatted; + char *result; + + DynStringMalloc(&formatted, 16); + x -= bm.x0-1; + y -= bm.y0-1; + if (x > 0 && x <= bm.x1-bm.x0 && y > 0 && y <= bm.y1-bm.y0) { + DynStringPrintf(&formatted, "(%d/%d)", x, y); + } else { + DynStringCatCStr(&formatted, "(-/-)"); + } + + result = strdup(DynStringToCStr(&formatted)); + DynStringFree(&formatted); + + return (result); } /** @@ -944,16 +980,16 @@ FormatPageNumber(int x, int y) static bool PrintPageNumber(int x, int y, DIST_T width, DIST_T height) { - coOrd printPosition; - coOrd textSize; + coOrd printPosition; + coOrd textSize; - char *positionText; - wFont_p fp = wStandardFont(F_HELV, TRUE, FALSE); - wFontSize_t fs = 64.0; + char *positionText; + wFont_p fp = wStandardFont(F_HELV, TRUE, FALSE); + wFontSize_t fs = 64.0; - positionText = FormatPageNumber(x, y); + positionText = FormatPageNumber(x, y); - if (strcmp(positionText,"(-/-)") != 0) { + if (strcmp(positionText,"(-/-)") != 0) { // even though we're printing into page_d, mainD must be used here DrawTextSize(&mainD, positionText, fp, fs, TRUE, &textSize); @@ -968,13 +1004,13 @@ PrintPageNumber(int x, int y, DIST_T width, DIST_T height) unsigned long options = page_d.options; page_d.options |= DC_OUTLINE; DrawString(&page_d, printPosition, 0.0, positionText, fp, fs, - wDrawColorGray(70)); + wDrawColorGray(70)); page_d.options = options; - } + } - free(positionText); + free(positionText); - return (TRUE); + return (TRUE); } /** @@ -988,34 +1024,35 @@ PrintPageNumber(int x, int y, DIST_T width, DIST_T height) void PrintNextPageNumberAt(int x, int y, coOrd position) { - char *pageNumber; - wFont_p fp = wStandardFont(F_HELV, FALSE, FALSE); - wFontSize_t fs = 8.0; - - pageNumber = FormatPageNumber(x, y); - //Suppress garbage page numbers - if (strcmp(pageNumber,"(-/-)") != 0) - DrawString(&page_d, position, 0.0, pageNumber, fp, fs, wDrawColorBlack); - free(pageNumber); + char *pageNumber; + wFont_p fp = wStandardFont(F_HELV, FALSE, FALSE); + wFontSize_t fs = 8.0; + + pageNumber = FormatPageNumber(x, y); + //Suppress garbage page numbers + if (strcmp(pageNumber,"(-/-)") != 0) { + DrawString(&page_d, position, 0.0, pageNumber, fp, fs, wDrawColorBlack); + } + free(pageNumber); } /** * Print the page numbers of all four adjoining pages (left, right, above, below) - * + * * \param x page index of current page x * \param y page index of current page y * \param pageW width of page * \param pageH height of page - * + * * \return TRUE */ static bool PrintNextPageNumbers(int x, int y, DIST_T pageW, DIST_T pageH) { - coOrd p00; + coOrd p00; - // above + // above if (printFormat == PORTRAIT) { p00.x = pageW / 2.0 - 20.0 / 72.0; p00.y = pageH - 10.0 / 72.0; @@ -1023,17 +1060,17 @@ PrintNextPageNumbers(int x, int y, DIST_T pageW, DIST_T pageH) p00.x = pageH / 2.0 - 20.0 / 72.0; p00.y = pageW - 10.0 / 72.0; } - PrintNextPageNumberAt(x, y + 1, p00); + PrintNextPageNumberAt(x, y + 1, p00); - // below + // below if (printFormat == PORTRAIT) { p00.y = 10.0 / 72.0; } else { p00.y = 10.0 / 72.0; } - PrintNextPageNumberAt(x, y-1, p00); + PrintNextPageNumberAt(x, y-1, p00); - // right + // right if (printFormat == PORTRAIT) { p00.y = pageH / 2 + 10.0 / 72.0; p00.x = pageW - 20.0 / 72.0; @@ -1041,7 +1078,7 @@ PrintNextPageNumbers(int x, int y, DIST_T pageW, DIST_T pageH) p00.y = pageW / 2 + 10.0 / 72.0; p00.x = pageH - 20.0 / 72.0; } - PrintNextPageNumberAt(x+1, y, p00); + PrintNextPageNumberAt(x+1, y, p00); // left if (printFormat == PORTRAIT) { @@ -1050,199 +1087,211 @@ PrintNextPageNumbers(int x, int y, DIST_T pageW, DIST_T pageH) p00.x = 10.0 / 72.0; } PrintNextPageNumberAt(x-1, y, p00); - return (TRUE); + return (TRUE); } static BOOL_T PrintPage( - int x, - int y ) + int x, + int y ) { coOrd orig, p[4], psave[4], minP, maxP; int i; coOrd clipOrig, clipSize; coOrd roomSize; - if (BITMAP(bm,x,y)) { - orig.x = currPrintGrid.orig.x + x*currPrintGrid.size.x; - orig.y = currPrintGrid.orig.y + y*currPrintGrid.size.y; - if (printPhysSize) { - orig.x += printMargin.left; - orig.y += printMargin.bottom; - } - Rotate( &orig, currPrintGrid.orig, currPrintGrid.angle ); - p[0] = p[1] = p[2] = p[3] = orig; - p[1].x = p[2].x = orig.x + currPrintGrid.size.x; - p[2].y = p[3].y = orig.y + currPrintGrid.size.y + - ( printGaudy ? printScale : 0.0 ); - Rotate( &p[0], orig, currPrintGrid.angle ); - Rotate( &p[1], orig, currPrintGrid.angle ); - Rotate( &p[2], orig, currPrintGrid.angle ); - Rotate( &p[3], orig, currPrintGrid.angle ); - minP = maxP = p[0]; - for (i=1; i<4; i++) { - if (maxP.x < p[i].x) maxP.x = p[i].x; - if (maxP.y < p[i].y) maxP.y = p[i].y; - if (minP.x > p[i].x) minP.x = p[i].x; - if (minP.y > p[i].y) minP.y = p[i].y; - } - maxP.x -= minP.x; - maxP.y -= minP.y; - print_d.d = page_d.d = wPrintPageStart(); - if (page_d.d == NULL) - return FALSE; - print_d.dpi = page_d.dpi = wDrawGetDPI( print_d.d ); - print_d.angle = currPrintGrid.angle; - print_d.orig = orig; - print_d.size = /*maxP*/ currPrintGrid.size; - page_d.orig = zero; - page_d.angle = 0.0; - if ( printGaudy ) { - Translate( &print_d.orig, orig, currPrintGrid.angle+180.0, printScale ); - print_d.size.y += printScale; - } - for (int i=0;i<4;i++) { - psave[i] = p[i]; - } - if (printRotate) { - rotateCW = (printFormat != PORTRAIT); - if (rotateCW) { - page_d.orig.x = realPageSize.y; - page_d.orig.y = 0.0; - page_d.angle = -90.0; - print_d.angle += -90.0; - Translate( &print_d.orig, print_d.orig, currPrintGrid.angle+90, maxPageSize.x ); - } else { - page_d.orig.x = 0.0; - page_d.orig.y = realPageSize.x; - page_d.angle = 90.0; - print_d.angle += 90.0; - Translate( &print_d.orig, print_d.orig, currPrintGrid.angle, - maxPageSize.y+(printGaudy?printScale:0) ); - } - page_d.size.x = print_d.size.y/printScale; - page_d.size.y = print_d.size.x/printScale; - print_d.size.x = currPrintGrid.size.y; - print_d.size.y = currPrintGrid.size.x; - } else { - page_d.size.x = print_d.size.x/printScale; - page_d.size.y = print_d.size.y/printScale; - } - wSetCursor( mainD.d, wCursorWait ); - print_d.scale = printScale; - if (print_d.d == NULL) - AbortProg( "wPrintPageStart" ); - clipOrig.x = clipOrig.y = 0; - clipSize.x = maxPageSize.x/printScale; - clipSize.y = maxPageSize.y/printScale; - GetRoomSize( &roomSize ); - if (printGaudy) { - PrintGaudyBox( roomSize ); - if ((!printRotate) || rotateCW) { - clipOrig.y = 1.0; - } - if (printRotate && rotateCW) { - print_d.size.x += printScale; - } - } - if (printRotate) { - wPrintClip( (clipOrig.y*print_d.dpi), (clipOrig.x*print_d.dpi), - (clipSize.y*print_d.dpi), (clipSize.x*print_d.dpi) ); - } else { - wPrintClip( (clipOrig.x*print_d.dpi), (clipOrig.y*print_d.dpi), - (clipSize.x*print_d.dpi), (clipSize.y*print_d.dpi) ); - } - p[0].x = p[3].x = 0.0; - p[1].x = p[2].x = roomSize.x; - p[0].y = p[1].y = 0.0; - p[2].y = p[3].y = roomSize.y; - - BOOL_T left_clear = FALSE, right_clear = FALSE, base_clear = FALSE, top_clear = FALSE; - - if (currPrintGrid.orig.x <= -0.5*printScale) left_clear = TRUE; - if (currPrintGrid.orig.y <= -0.5*printScale) base_clear = TRUE; - if (clipOrig.x + clipSize.x > roomSize.x + 0.5*printScale) right_clear = TRUE; - if (clipOrig.y + clipSize.y > roomSize.y + 0.5*printScale) top_clear = TRUE; - - if (printRuler != 2) { /* Not None so Edge or Every */ - DrawRuler( &print_d, p[0], p[1], 0.0, TRUE, !base_clear, wDrawColorBlack ); - DrawRuler( &print_d, p[0], p[3], 0.0, TRUE, left_clear, wDrawColorBlack ); - DrawRuler( &print_d, p[1], p[2], 0.0, TRUE, right_clear, wDrawColorBlack ); - DrawRuler( &print_d, p[3], p[2], 0.0, TRUE, !top_clear, wDrawColorBlack ); - } - if ( printRuler==1 && currPrintGrid.angle == 0 ) { /* Every Page and not rotated origin */ - if ( !printRotate ) { - p[2] = p[3] = print_d.orig; - p[3].x += print_d.size.x; - p[3].y += print_d.size.y; - } else if ( rotateCW ) { - p[2].x = print_d.orig.x - print_d.size.y; - p[2].y = print_d.orig.y; - p[3].x = print_d.orig.x; - p[3].y = print_d.orig.y + print_d.size.x; - } else { - p[2].x = print_d.orig.x; - p[2].y = print_d.orig.y - print_d.size.x; - p[3].x = print_d.orig.x + print_d.size.y; - p[3].y = print_d.orig.y; - } - if ( p[2].x > 0 ) - minP.x = p[2].x + 0.5 * print_d.scale; - else - minP.x = 0.0; - if ( p[3].x < roomSize.x ) - maxP.x = p[3].x - 0.5 * print_d.scale; - else - maxP.x = roomSize.x; - if ( p[2].y > 0 ) - minP.y = p[2].y + 0.5 * print_d.scale; - else - minP.y = 0.0; - if ( p[3].y < roomSize.y ) - maxP.y = p[3].y - 0.5 * print_d.scale; - else - maxP.y = roomSize.y; - p[0].y = 0.0; - p[1].y = maxP.y - minP.y; - if ( p[2].x > 0.5* print_d.scale ) { - p[0].x = p[1].x = p[2].x + 0.5* print_d.scale; - DrawRuler( &print_d, p[0], p[1], minP.y, TRUE, TRUE, wDrawColorBlack ); - } - if ( p[3].x < roomSize.x - 0.5 * print_d.scale ) { - p[0].x = p[1].x = p[3].x - 0.5 * print_d.scale; - DrawRuler( &print_d, p[0], p[1], minP.y, TRUE, FALSE, wDrawColorBlack ); - } - p[0].x = 0; - p[1].x = maxP.x - minP.x; - if ( p[2].y > 0.5 * print_d.scale ) { - p[0].y = p[1].y = p[2].y + 0.5 * print_d.scale; - DrawRuler( &print_d, p[0], p[1], minP.x, TRUE, FALSE, wDrawColorBlack ); - } - if ( p[3].y < roomSize.y - 0.5 * print_d.scale) { - p[0].y = p[1].y = p[3].y - 0.5 * print_d.scale; - DrawRuler( &print_d, p[0], p[1], minP.x, TRUE, TRUE, wDrawColorBlack ); - } - } + if (BITMAP(bm,x,y)) { + orig.x = currPrintGrid.orig.x + x*currPrintGrid.size.x; + orig.y = currPrintGrid.orig.y + y*currPrintGrid.size.y; + orig.x += printerMargin.left; + orig.y += printerMargin.bottom; + if (!bIgnoreMargins) { + orig.x -= customMargin.left; + orig.y -= customMargin.bottom; + } + Rotate( &orig, currPrintGrid.orig, currPrintGrid.angle ); + p[0] = p[1] = p[2] = p[3] = orig; + p[1].x = p[2].x = orig.x + currPrintGrid.size.x; + p[2].y = p[3].y = orig.y + currPrintGrid.size.y + + ( printGaudy ? printScale : 0.0 ); + Rotate( &p[0], orig, currPrintGrid.angle ); + Rotate( &p[1], orig, currPrintGrid.angle ); + Rotate( &p[2], orig, currPrintGrid.angle ); + Rotate( &p[3], orig, currPrintGrid.angle ); + minP = maxP = p[0]; + for (i=1; i<4; i++) { + if (maxP.x < p[i].x) { maxP.x = p[i].x; } + if (maxP.y < p[i].y) { maxP.y = p[i].y; } + if (minP.x > p[i].x) { minP.x = p[i].x; } + if (minP.y > p[i].y) { minP.y = p[i].y; } + } + maxP.x -= minP.x; + maxP.y -= minP.y; + print_d.d = page_d.d = wPrintPageStart(); + if (page_d.d == NULL) { + return FALSE; + } + print_d.dpi = page_d.dpi = wDrawGetDPI( print_d.d ); + print_d.angle = currPrintGrid.angle; + print_d.orig = orig; + print_d.size = /*maxP*/ currPrintGrid.size; + page_d.orig = zero; + page_d.angle = 0.0; + if ( printGaudy ) { + Translate( &print_d.orig, orig, currPrintGrid.angle+180.0, printScale ); + print_d.size.y += printScale; + } + for (int i=0; i<4; i++) { + psave[i] = p[i]; + } + if (printRotate) { + rotateCW = (printFormat != PORTRAIT); + if (rotateCW) { + page_d.orig.x = realPageSize.y; + page_d.orig.y = 0.0; + page_d.angle = -90.0; + print_d.angle += -90.0; + Translate( &print_d.orig, print_d.orig, currPrintGrid.angle+90, maxPageSize.x ); + } else { + page_d.orig.x = 0.0; + page_d.orig.y = realPageSize.x; + page_d.angle = 90.0; + print_d.angle += 90.0; + Translate( &print_d.orig, print_d.orig, currPrintGrid.angle, + maxPageSize.y+(printGaudy?printScale:0) ); + } + page_d.size.x = print_d.size.y/printScale; + page_d.size.y = print_d.size.x/printScale; + print_d.size.x = currPrintGrid.size.y; + print_d.size.y = currPrintGrid.size.x; + } else { + page_d.size.x = print_d.size.x/printScale; + page_d.size.y = print_d.size.y/printScale; + } + wSetCursor( mainD.d, wCursorWait ); + print_d.scale = printScale; + CHECK(print_d.d); + clipOrig.x = clipOrig.y = 0; + clipSize.x = maxPageSize.x/printScale; + clipSize.y = maxPageSize.y/printScale; + roomSize = mapD.size; + if (printGaudy) { + PrintGaudyBox( roomSize ); + if ((!printRotate) || rotateCW) { + clipOrig.y = 1.0; + } + if (printRotate && rotateCW) { + print_d.size.x += printScale; + } + } + if (printRotate) { + wPrintClip( (clipOrig.y*print_d.dpi), (clipOrig.x*print_d.dpi), + (clipSize.y*print_d.dpi), (clipSize.x*print_d.dpi) ); + } else { + wPrintClip( (clipOrig.x*print_d.dpi), (clipOrig.y*print_d.dpi), + (clipSize.x*print_d.dpi), (clipSize.y*print_d.dpi) ); + } + p[0].x = p[3].x = 0.0; + p[1].x = p[2].x = roomSize.x; + p[0].y = p[1].y = 0.0; + p[2].y = p[3].y = roomSize.y; + + BOOL_T left_clear = FALSE, right_clear = FALSE, base_clear = FALSE, + top_clear = FALSE; + + if (currPrintGrid.orig.x <= -0.5*printScale) { left_clear = TRUE; } + if (currPrintGrid.orig.y <= -0.5*printScale) { base_clear = TRUE; } + if (clipOrig.x + clipSize.x > roomSize.x + 0.5*printScale) { right_clear = TRUE; } + if (clipOrig.y + clipSize.y > roomSize.y + 0.5*printScale) { top_clear = TRUE; } + + if (printRuler != 2) { /* Not None so Edge or Every */ + DrawRuler( &print_d, p[0], p[1], 0.0, TRUE, !base_clear, wDrawColorBlack ); + DrawRuler( &print_d, p[0], p[3], 0.0, TRUE, left_clear, wDrawColorBlack ); + DrawRuler( &print_d, p[1], p[2], 0.0, TRUE, right_clear, wDrawColorBlack ); + DrawRuler( &print_d, p[3], p[2], 0.0, TRUE, !top_clear, wDrawColorBlack ); + } + if ( printRuler==1 + && currPrintGrid.angle == 0 ) { /* Every Page and not rotated origin */ + if ( !printRotate ) { + p[2] = p[3] = print_d.orig; + p[3].x += print_d.size.x; + p[3].y += print_d.size.y; + } else if ( rotateCW ) { + p[2].x = print_d.orig.x - print_d.size.y; + p[2].y = print_d.orig.y; + p[3].x = print_d.orig.x; + p[3].y = print_d.orig.y + print_d.size.x; + } else { + p[2].x = print_d.orig.x; + p[2].y = print_d.orig.y - print_d.size.x; + p[3].x = print_d.orig.x + print_d.size.y; + p[3].y = print_d.orig.y; + } + if ( p[2].x > 0 ) { + minP.x = p[2].x + 0.5 * print_d.scale; + } else { + minP.x = 0.0; + } + if ( p[3].x < roomSize.x ) { + maxP.x = p[3].x - 0.5 * print_d.scale; + } else { + maxP.x = roomSize.x; + } + if ( p[2].y > 0 ) { + minP.y = p[2].y + 0.5 * print_d.scale; + } else { + minP.y = 0.0; + } + if ( p[3].y < roomSize.y ) { + maxP.y = p[3].y - 0.5 * print_d.scale; + } else { + maxP.y = roomSize.y; + } + p[0].y = 0.0; + p[1].y = maxP.y - minP.y; + if ( p[2].x > 0.5* print_d.scale ) { + p[0].x = p[1].x = p[2].x + 0.5* print_d.scale; + DrawRuler( &print_d, p[0], p[1], minP.y, TRUE, TRUE, wDrawColorBlack ); + } + if ( p[3].x < roomSize.x - 0.5 * print_d.scale ) { + p[0].x = p[1].x = p[3].x - 0.5 * print_d.scale; + DrawRuler( &print_d, p[0], p[1], minP.y, TRUE, FALSE, wDrawColorBlack ); + } + p[0].x = 0; + p[1].x = maxP.x - minP.x; + if ( p[2].y > 0.5 * print_d.scale ) { + p[0].y = p[1].y = p[2].y + 0.5 * print_d.scale; + DrawRuler( &print_d, p[0], p[1], minP.x, TRUE, FALSE, wDrawColorBlack ); + } + if ( p[3].y < roomSize.y - 0.5 * print_d.scale) { + p[0].y = p[1].y = p[3].y - 0.5 * print_d.scale; + DrawRuler( &print_d, p[0], p[1], minP.x, TRUE, TRUE, wDrawColorBlack ); + } + } - if (printGrid) - DrawSnapGrid( &print_d, mapD.size, FALSE ); - roadbedWidth = printRoadbed?printRoadbedWidth:0.0; - if (printCenterLine) { - print_d.options |= DC_CENTERLINE; - } else { - print_d.options &= ~DC_CENTERLINE; - } - DrawTracks( &print_d, print_d.scale, minP, maxP ); - if (printRegistrationMarks && printScale == 1) - DrawRegistrationMarks( &print_d ); - if (printRegistrationMarks) - PrintPlainBox( x, y, psave ); - - if (printPageNumbers) { - PrintPageNumber(x, y, page_d.size.x, page_d.size.y); - PrintNextPageNumbers(x, y, page_d.size.x, page_d.size.y); - } - if ( !wPrintPageEnd( print_d.d ) ) - return FALSE; + if (printGrid) { + DrawSnapGrid( &print_d, mapD.size, FALSE ); + } + roadbedWidth = printRoadbed?printRoadbedWidth:0.0; + if (printCenterLine) { + print_d.options |= DC_CENTERLINE; + } else { + print_d.options &= ~DC_CENTERLINE; + } + DrawTracks( &print_d, print_d.scale, minP, maxP ); + if (printRegistrationMarks && printScale == 1) { + DrawRegistrationMarks( &print_d ); + } + if (printRegistrationMarks) { + PrintPlainBox( x, y, psave ); + } + + if (printPageNumbers) { + PrintPageNumber(x, y, page_d.size.x, page_d.size.y); + PrintNextPageNumbers(x, y, page_d.size.x, page_d.size.y); + } + if ( !wPrintPageEnd( print_d.d ) ) { + return FALSE; + } } return TRUE; } @@ -1272,23 +1321,25 @@ static void DoPrintPrint( void * junk ) wSetCursor( mainD.d, defaultCursor ); return; } - if (copies <= 0) + if (copies <= 0) { copies = 1; + } for ( copy=1; copy<=copies; copy++) { if ( printOrder == 0 ) { for (x=bm.x0; x=bm.y0; y--) - if (!PrintPage( x, y )) goto quitPrinting; + if (!PrintPage( x, y )) { goto quitPrinting; } } else { for (y=bm.y0; y= copies) + if (copy >= copies) { BITMAP(bm,x,y) = 0; + } } } @@ -1329,11 +1380,14 @@ static void PrintGridRotate( void * pangle ) static void PrintChange( long changes ) { - if ( (changes&(CHANGE_MAP|CHANGE_UNITS|CHANGE_GRID))==0 || printWin==NULL || !wWinIsVisible(printWin) ) + if ( (changes&(CHANGE_MAP|CHANGE_UNITS|CHANGE_GRID))==0 || printWin==NULL + || !wWinIsVisible(printWin) ) { return; + } newPrintGrid = currPrintGrid; - if (!GridIsVisible()) + if (!GridIsVisible()) { printGrid = 0; + } ParamLoadControls( &printPG ); ParamControlActive( &printPG, I_GRID, GridIsVisible() ); PrintEnableControls(); @@ -1341,22 +1395,23 @@ static void PrintChange( long changes ) static void PrintDlgUpdate( - paramGroup_p pg, - int inx, - void * valueP ) + paramGroup_p pg, + int inx, + void * valueP ) { - if ( inx < 0 ) return; - if ( pg->paramPtr[inx].context == I2VP(1) ) + if ( inx < 0 ) { return; } + if ( pg->paramPtr[inx].context == I2VP(1) ) { DoPrintScale(); - else if ( pg->paramPtr[inx].context == I2VP(2) ) + } else if ( pg->paramPtr[inx].context == I2VP(2) ) { PrintUpdate( inx ); + } ParamControlActive( &printPG, I_RULER, currPrintGrid.angle == 0 ); TempRedraw(); // PrintDlgUpdate } static STATUS_T CmdPrint( - wAction_t action, - coOrd pos ) + wAction_t action, + coOrd pos ) /* * Print command: * @@ -1372,33 +1427,46 @@ static STATUS_T CmdPrint( switch (action) { case C_START: - if (!wPrintInit()) + if (!wPrintInit()) { return C_TERMINATE; + } printScale = iPrintScale; if (printWin == NULL) { rminScale_999.low = 1; - if (printScale < rminScale_999.low) + if (printScale < rminScale_999.low) { printScale = rminScale_999.low; + } print_d.scale = printScale; - printWin = ParamCreateDialog( &printPG, MakeWindowTitle(_("Print")), _("Print"), DoPrintPrint, (paramActionCancelProc)Reset, TRUE, NULL, 0, PrintDlgUpdate ); + printWin = ParamCreateDialog( &printPG, MakeWindowTitle(_("Print")), _("Print"), + DoPrintPrint, (paramActionCancelProc)Reset, TRUE, NULL, 0, PrintDlgUpdate ); } sPrinterName = wPrintGetName(); - SetMargins(); + while ( *sPrinterName == '\0' ) { + int rc = NoticeMessage( MSG_NO_PRINTER_SELECTED, _("Ok"), _("Cancel") ); + if ( rc <= 0 ) { + return C_TERMINATE; + } + DoPrintSetup(); + } + GetMargins(); wShow( printWin ); - SetPageSize( TRUE ); + SetMaxPageSize( TRUE ); if (currPrintGrid.size.x == 0.0) { currPrintGrid.size.x = maxPageSize.x; currPrintGrid.size.y = maxPageSize.y; } - if (currPrintGrid.size.x >= maxPageSize.x) + if (currPrintGrid.size.x >= maxPageSize.x) { currPrintGrid.size.x = maxPageSize.x; - if (currPrintGrid.size.y >= maxPageSize.y) + } + if (currPrintGrid.size.y >= maxPageSize.y) { currPrintGrid.size.y = maxPageSize.y; + } newPrintGrid = currPrintGrid; ParamLoadControls( &printPG ); pageCount = 0; UpdatePageCount(); -LOG( log_print, 2, ( "Page size = %0.3f %0.3f\n", currPrintGrid.size.x, currPrintGrid.size.y ) ) + LOG( log_print, 2, ( "Page size = %0.3f %0.3f\n", currPrintGrid.size.x, + currPrintGrid.size.y ) ) PrintChange( CHANGE_MAP|CHANGE_UNITS ); ChangeDim(); InfoMessage( _("Select pages to print, or drag to move print grid") ); @@ -1470,8 +1538,9 @@ LOG( log_print, 2, ( "Page size = %0.3f %0.3f\n", currPrintGrid.size.x, currPrin return C_TERMINATE; case C_CANCEL: - if (printWin == NULL) + if (printWin == NULL) { return C_TERMINATE; + } PrintClear(); wHide( printWin ); return C_TERMINATE; @@ -1491,7 +1560,7 @@ LOG( log_print, 2, ( "Page size = %0.3f %0.3f\n", currPrintGrid.size.x, currPrin } -#include "bitmaps/doc-print.xpm" +#include "bitmaps/doc-print.xpm3" EXPORT wIndex_t InitCmdPrint( wMenu_p menu ) { @@ -1501,8 +1570,10 @@ EXPORT wIndex_t InitCmdPrint( wMenu_p menu ) RegisterChangeNotification( PrintChange ); printGridPopupM = MenuRegister( "Print Grid Rotate" ); AddRotateMenu( printGridPopupM, PrintGridRotate ); - ParamRegister( &printMarginPG ); - return AddMenuButton( menu, CmdPrint, "cmdPrint", N_("Print..."), wIconCreatePixMap(doc_print_xpm[iconSize]), LEVEL0, IC_LCLICK|IC_POPUP3|IC_CMDMENU, ACCL_PRINT, NULL ); + ParamRegister( &customMarginPG ); + return AddMenuButton( menu, CmdPrint, "cmdPrint", N_("Print..."), + wIconCreatePixMap(doc_print_xpm3[iconSize]), LEVEL0, + IC_LCLICK|IC_POPUP3|IC_CMDMENU, ACCL_PRINT, NULL ); } /***************************************************************************** @@ -1514,7 +1585,7 @@ EXPORT wIndex_t InitCmdPrint( wMenu_p menu ) wDrawable_t printD, mainD; -void PrintPage( void * d, wIndex_t mode , wIndex_t x, wIndex_t y ) +void PrintPage( void * d, wIndex_t mode, wIndex_t x, wIndex_t y ) { lprintf( "printPage %dx%d at (%0.3f %0.3f)\n", x, y, orig.x, orig.y ); } @@ -1541,7 +1612,7 @@ void DumpMap( char * f, ANGLE_T a, ANGLE_T b ) } else { lprintf( " "); } - lprintf( "\n"); + lprintf( "\n"); } } @@ -1553,24 +1624,24 @@ struct { wAction_t cmd; coOrd pos; } cmds[] = { - { C_START, 0, 0 }, - { C_DOWN, 20.5, 12.4 }, - { C_MOVE, 20.5, 12.5 }, - { C_MOVE, 20.5, 12.3 }, - { C_MOVE, 39.3, 69.4 }, - { C_MOVE, 39.4, 4.5 }, - { C_MOVE, 2.4, 4.5 }, - { C_MOVE, 2.4, 50.3 }, - { C_UP, 0, 0 }, - { C_DOWN, 20.5, 12.4 }, - { C_UP, 0, 0 }, - { C_DOWN, 32.5, 4.4 }, - { C_UP, 0, 0 }, - { C_PRINT, 0, 0, }, - { C_START, 0, 0, }, - { C_DOWN, 45.3, 43.5 }, - { C_CANCEL, 0, 0 } - }; + { C_START, 0, 0 }, + { C_DOWN, 20.5, 12.4 }, + { C_MOVE, 20.5, 12.5 }, + { C_MOVE, 20.5, 12.3 }, + { C_MOVE, 39.3, 69.4 }, + { C_MOVE, 39.4, 4.5 }, + { C_MOVE, 2.4, 4.5 }, + { C_MOVE, 2.4, 50.3 }, + { C_UP, 0, 0 }, + { C_DOWN, 20.5, 12.4 }, + { C_UP, 0, 0 }, + { C_DOWN, 32.5, 4.4 }, + { C_UP, 0, 0 }, + { C_PRINT, 0, 0, }, + { C_START, 0, 0, }, + { C_DOWN, 45.3, 43.5 }, + { C_CANCEL, 0, 0 } +}; main( INT_T argc, char * argv[] ) { diff --git a/app/bin/cprofile.c b/app/bin/cprofile.c index 433e1d5..ba51383 100644 --- a/app/bin/cprofile.c +++ b/app/bin/cprofile.c @@ -17,7 +17,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "custom.h" @@ -102,9 +102,9 @@ static BOOL_T printVert = TRUE; static wMenu_p profilePopupM; static track_p profilePopupTrk; static EPINX_T profilePopupEp; -static wMenuToggle_p profilePopupToggles[3]; +static wMenuToggle_p profilePopupToggles[3]; -static int log_profile = 0; +static int log_profile = 0; #define LABELH (labelH*fontSize/screenProfileFontSize) #define LABELW (labelW*fontSize/screenProfileFontSize) @@ -113,10 +113,10 @@ static int log_profile = 0; #define PBR(FS) (1.0*(labelW*(FS)/screenProfileFontSize+3.0/mainD.dpi)) #define PBL(FS) (1.0*(labelW*(FS)/screenProfileFontSize+3.0/mainD.dpi)) static FLOAT_T labelH; -static FLOAT_T labelW; +static FLOAT_T labelW; -track_p pathStartTrk; +track_p pathStartTrk; EPINX_T pathStartEp; track_p pathEndTrk; EPINX_T pathEndEp; @@ -125,33 +125,33 @@ EPINX_T pathEndEp; #define NOP typedef struct { - track_p trk; - EPINX_T ep; - DIST_T elev; - DIST_T dist; - BOOL_T defined; /* from prev PE to current */ + track_p trk; + EPINX_T ep; + DIST_T elev; + DIST_T dist; + BOOL_T defined; /* from prev PE to current */ } profElem_t, *profElem_p; -static dynArr_t profElem_da; +static dynArr_t profElem_da; static profElem_p copyOfprofElem; -#define profElem(N) DYNARR_N( profElem_t, profElem_da, N ) +#define profElem(N) DYNARR_N( profElem_t, profElem_da, N ) typedef struct { - DIST_T dist; - char * name; + DIST_T dist; + char * name; } station_t, *station_p; -static dynArr_t station_da; +static dynArr_t station_da; #define station(N) DYNARR_N( station_t, station_da, N ) struct { - DIST_T totalD, minE; - int minC, maxC, incrC; - DIST_T scaleX, scaleY; -} prof; + DIST_T totalD, minE; + int minC, maxC, incrC; + DIST_T scaleX, scaleY; +} prof; /** @@ -161,17 +161,14 @@ struct { static void CreateCopyProfileElements() { - if (copyOfprofElem) { - MyFree(copyOfprofElem); - } - - copyOfprofElem = MyMalloc(profElem_da.cnt * sizeof(profElem_t)); - if (!copyOfprofElem) { - AbortProg("Couldn't allocate memory for profile copy\n"); - } - for (int i = 0; i < profElem_da.cnt; i++) { - copyOfprofElem[i] = profElem(i); - } + if (copyOfprofElem) { + MyFree(copyOfprofElem); + } + + copyOfprofElem = MyMalloc(profElem_da.cnt * sizeof(profElem_t)); + for (int i = 0; i < profElem_da.cnt; i++) { + copyOfprofElem[i] = profElem(i); + } } /** @@ -181,10 +178,10 @@ CreateCopyProfileElements() static void DestroyCopyOfProfileElements() { - if (copyOfprofElem) { - MyFree(copyOfprofElem); - copyOfprofElem = NULL; - } + if (copyOfprofElem) { + MyFree(copyOfprofElem); + copyOfprofElem = NULL; + } } @@ -198,118 +195,118 @@ DestroyCopyOfProfileElements() static void DrawProfile(drawCmd_p D, wFontSize_t fontSize, BOOL_T printVert) { - coOrd pl, pt, pb; - int inx; - DIST_T grade; - wFont_p fp; - static dynArr_t points_da; + coOrd pl, pt, pb; + int inx; + DIST_T grade; + wFont_p fp; + static dynArr_t points_da; #define points(N) DYNARR_N( coOrd, points_da, N ) - wDrawWidth lw; - station_p ps; - coOrd textsize; - - lw = (wDrawWidth)(D->dpi*1.0/mainD.dpi); - fp = wStandardFont(F_HELV, FALSE, FALSE); - DYNARR_RESET(pts_t, points_da); - - pb.x = pt.x = 0; - pb.y = prof.minE; - pt.y = GetDim(prof.maxC); - DrawLine(D, pb, pt, 0, snapGridColor); - pb.x = pt.x = prof.totalD; - DrawLine(D, pb, pt, 0, snapGridColor); - pb.x = 0; - pt.x = prof.totalD; - - // Draw horizontal grid and y scale - for (inx=prof.minC; inx<=prof.maxC; inx+=prof.incrC) { - coOrd textsize; - // grid line - pt.y = pb.y = GetDim(inx); - DrawLine(D, pb, pt, 0, snapGridColor); - // scale - sprintf(message, "%d", inx); - DrawTextSize(&mainD, message, wStandardFont(F_HELV, FALSE, FALSE), - screenProfileFontSize, FALSE, &textsize); - pl.x = ((-3.0/mainD.dpi) - textsize.y*0.5 - textsize.x) / prof.scaleX*D->scale; - pl.y = pb.y-LABELH/2/prof.scaleY*D->scale; - - DrawString(D, pl, 0.0, message, fp, fontSize*D->scale, borderColor); - } - - // show the measurement units - sprintf(message, "%s", units == UNITS_ENGLISH ? "in." : "cm"); - DrawTextSize(&mainD, message, wStandardFont(F_HELV, FALSE, FALSE), - screenProfileFontSize, FALSE, &textsize); - pl.x = ((-3.0 / mainD.dpi) - textsize.y*0.5 - textsize.x) / - prof.scaleX*D->scale; - pl.y += LABELH * 1.5 / prof.scaleY*D->scale; - DrawString(D, pl, 0.0, message, fp, fontSize*D->scale, borderColor); - - if (profElem_da.cnt <= 0) { - return; - } - - for (inx=0; inx 1) { - DYNARR_APPEND(coOrd, points_da, 10); - pt.x = prof.totalD; - points(points_da.cnt-1) = pt; - DYNARR_APPEND(pts_t, points_da, 10); - pb.x = 0; - points(points_da.cnt-1) = pb; - DrawPoly(D, points_da.cnt, points_da.ptr, NULL, profileColorFill, 1, DRAW_FILL); - } - - pt.y = prof.minE-(2*LABELH+3.0/mainD.dpi)/prof.scaleY*D->scale; - for (inx=0; inxname, fp, fontSize, FALSE, &textsize); - pt.x = ps->dist - textsize.x/2.0/prof.scaleX*D->scale; - if (pt.x < -PBR(screenProfileFontSize)) { - pt.x = -(PBR(screenProfileFontSize)-3/mainD.dpi)/prof.scaleX*D->scale; - } else if (pt.x+textsize.x > prof.totalD) { - pt.x = prof.totalD-(textsize.x-3/mainD.dpi)/prof.scaleX*D->scale; - } - DrawString(D, pt, 0.0, ps->name, fp, fontSize*D->scale, borderColor); - } - - pb.x = 0.0; - pb.y = prof.minE; + wDrawWidth lw; + station_p ps; + coOrd textsize; + + lw = (wDrawWidth)(D->dpi*1.0/mainD.dpi); + fp = wStandardFont(F_HELV, FALSE, FALSE); + DYNARR_RESET(pts_t, points_da); + + pb.x = pt.x = 0; + pb.y = prof.minE; + pt.y = GetDim(prof.maxC); + DrawLine(D, pb, pt, 0, snapGridColor); + pb.x = pt.x = prof.totalD; + DrawLine(D, pb, pt, 0, snapGridColor); + pb.x = 0; + pt.x = prof.totalD; + + // Draw horizontal grid and y scale + for (inx=prof.minC; inx<=prof.maxC; inx+=prof.incrC) { + coOrd textsize; + // grid line + pt.y = pb.y = GetDim(inx); + DrawLine(D, pb, pt, 0, snapGridColor); + // scale + sprintf(message, "%d", inx); + DrawTextSize(&mainD, message, wStandardFont(F_HELV, FALSE, FALSE), + screenProfileFontSize, FALSE, &textsize); + pl.x = ((-3.0/mainD.dpi) - textsize.y*0.5 - textsize.x) / prof.scaleX*D->scale; + pl.y = pb.y-LABELH/2/prof.scaleY*D->scale; + + DrawString(D, pl, 0.0, message, fp, fontSize*D->scale, borderColor); + } + + // show the measurement units + sprintf(message, "%s", units == UNITS_ENGLISH ? "in." : "cm"); + DrawTextSize(&mainD, message, wStandardFont(F_HELV, FALSE, FALSE), + screenProfileFontSize, FALSE, &textsize); + pl.x = ((-3.0 / mainD.dpi) - textsize.y*0.5 - textsize.x) / + prof.scaleX*D->scale; + pl.y += LABELH * 1.5 / prof.scaleY*D->scale; + DrawString(D, pl, 0.0, message, fp, fontSize*D->scale, borderColor); + + if (profElem_da.cnt <= 0) { + return; + } + + for (inx=0; inx 1) { + DYNARR_APPEND(coOrd, points_da, 10); + pt.x = prof.totalD; + points(points_da.cnt-1) = pt; + DYNARR_APPEND(pts_t, points_da, 10); + pb.x = 0; + points(points_da.cnt-1) = pb; + DrawPoly(D, points_da.cnt, &points(0), NULL, profileColorFill, 1, DRAW_FILL); + } + + pt.y = prof.minE-(2*LABELH+3.0/mainD.dpi)/prof.scaleY*D->scale; + for (inx=0; inxname, fp, fontSize, FALSE, &textsize); + pt.x = ps->dist - textsize.x/2.0/prof.scaleX*D->scale; + if (pt.x < -PBR(screenProfileFontSize)) { + pt.x = -(PBR(screenProfileFontSize)-3/mainD.dpi)/prof.scaleX*D->scale; + } else if (pt.x+textsize.x > prof.totalD) { + pt.x = prof.totalD-(textsize.x-3/mainD.dpi)/prof.scaleX*D->scale; + } + DrawString(D, pt, 0.0, ps->name, fp, fontSize*D->scale, borderColor); + } + + pb.x = 0.0; + pb.y = prof.minE; // mark the starting point for the profile - pt = points(0); - DrawLine(D, pb, pt, lw, snapGridColor); + pt = points(0); + DrawLine(D, pb, pt, lw, snapGridColor); DrawArc(D, pt, 0.05, 0, 360, TRUE, 2, wDrawColorGrey40); - if (units==UNITS_ENGLISH) { - sprintf(message, "%0.1f", PutDim(profElem(0).elev)+0.05); - } else { - sprintf(message, "%0.1f", PutDim(profElem(0).elev)+0.05); - } - if (printVert) { - pl.x = pt.x + LABELH/2.0/prof.scaleX*D->scale; - pl.y = pt.y + 2.0/mainD.dpi/prof.scaleY*D->scale + GetDim(prof.incrC) / 16;; - DrawString(D, pl, 270.0, message, fp, fontSize*D->scale, borderColor); - } else { - pl.x = pt.x+2.0/mainD.dpi/prof.scaleX*D->scale + GetDim(prof.incrC) / 16;; - pl.y = pt.y; - if (profElem_da.cnt>1 && profElem(0).elev < profElem(1).elev) { - pl.y -= LABELH/prof.scaleY*D->scale; - } - DrawString(D, pl, 0.0, message, fp, fontSize*D->scale, borderColor); - } - pl = pt; - - for (inx=1; inxscale; + pl.y = pt.y + 2.0/mainD.dpi/prof.scaleY*D->scale + GetDim(prof.incrC) / 16;; + DrawString(D, pl, 270.0, message, fp, fontSize*D->scale, borderColor); + } else { + pl.x = pt.x+2.0/mainD.dpi/prof.scaleX*D->scale + GetDim(prof.incrC) / 16;; + pl.y = pt.y; + if (profElem_da.cnt>1 && profElem(0).elev < profElem(1).elev) { + pl.y -= LABELH/prof.scaleY*D->scale; + } + DrawString(D, pl, 0.0, message, fp, fontSize*D->scale, borderColor); + } + pl = pt; + + for (inx=1; inx 0.1) { - grade = fabs(profElem(inx).elev-profElem(inx-1).elev)/ - (profElem(inx).dist-profElem(inx-1).dist); - sprintf(message, "%0.1f%%", round(grade*1000.0)/10.0); - DrawTextSize(&mainD, message, fp, fontSize, FALSE, &textsize); - pl.x = (points(inx).x+points(inx-1).x)/2.0; - pl.y = (points(inx).y+points(inx-1).y)/2.0; - if (printVert) { - pl.x += (LABELH/2)/prof.scaleX*D->scale; - pl.y += ((LABELH/2)*grade/prof.scaleX + 2.0/mainD.dpi/prof.scaleY)*D->scale; - DrawString(D, pl, 270.0, message, fp, fontSize*D->scale, borderColor); - } else { - pl.x -= (textsize.x/2)/prof.scaleX*D->scale; - pl.y += (textsize.x/2)*grade/prof.scaleX*D->scale; - DrawString(D, pl, 0.0, message, fp, fontSize*D->scale, borderColor); - } - } - if (units==UNITS_ENGLISH) { - if (prof.totalD > 240) { - sprintf(message, "%0.1f'", (round((profElem(inx).dist/12.0)*10.0)/10.0)); - } else { - sprintf(message, "%d'%0.1f\"", (int)floor((profElem(inx).dist)/12.0), - round(fmod(profElem(inx).dist,12.0)*10.0)/10.0); - } - } else { - if (PutDim(prof.totalD) > 10000) { - sprintf(message, "%0.1fm", (round(PutDim(profElem(inx).dist)/10.0)/10.0)); - } else if (PutDim(prof.totalD) > 100) { - sprintf(message, "%0.2fm", (round(PutDim(profElem(inx).dist))/100.0)); - } else { - sprintf(message, "%0.1fcm", round(PutDim(profElem(inx).dist)+0.5)); - } - } - DrawTextSize(&mainD, message, fp, fontSize, FALSE, &textsize); - pl.x = pb.x-(textsize.x/2)/prof.scaleX*D->scale; - pl.y = prof.minE-(LABELH+3.0/mainD.dpi)/prof.scaleY*D->scale; - DrawString(D, pl, 0.0, message, fp, fontSize*D->scale, borderColor); - sprintf(message, "%0.1f", round(PutDim(profElem(inx).elev)*100.0)/100.0); - if (printVert) { - pl.x = pt.x + LABELH/2.0/prof.scaleX*D->scale; - pl.y = pt.y + 2.0/mainD.dpi/prof.scaleY*D->scale+GetDim(prof.incrC) / 16; - DrawString(D, pl, 270.0, message, fp, fontSize*D->scale, borderColor); - } else { - pl.x = pt.x + 2.0/mainD.dpi/prof.scaleX*D->scale + GetDim(prof.incrC) / 16; - pl.y = pt.y; - if (inx != profElem_da.cnt-1 && profElem(inx).elev < profElem(inx+1).elev) { - pl.y -= LABELH/prof.scaleY*D->scale; - } - DrawString(D, pl, 0.0, message, fp, fontSize*D->scale, borderColor); - } - pl = pt; - } + profileColorUndefinedProfile)); + // draw the markers + DrawArc(D, pt, 0.05, 0, 360, TRUE, 2, wDrawColorGrey40); + + if (profElem(inx).dist > 0.1) { + grade = fabs(profElem(inx).elev-profElem(inx-1).elev)/ + (profElem(inx).dist-profElem(inx-1).dist); + sprintf(message, "%0.1f%%", round(grade*1000.0)/10.0); + DrawTextSize(&mainD, message, fp, fontSize, FALSE, &textsize); + pl.x = (points(inx).x+points(inx-1).x)/2.0; + pl.y = (points(inx).y+points(inx-1).y)/2.0; + if (printVert) { + pl.x += (LABELH/2)/prof.scaleX*D->scale; + pl.y += ((LABELH/2)*grade/prof.scaleX + 2.0/mainD.dpi/prof.scaleY)*D->scale; + DrawString(D, pl, 270.0, message, fp, fontSize*D->scale, borderColor); + } else { + pl.x -= (textsize.x/2)/prof.scaleX*D->scale; + pl.y += (textsize.x/2)*grade/prof.scaleX*D->scale; + DrawString(D, pl, 0.0, message, fp, fontSize*D->scale, borderColor); + } + } + if (units==UNITS_ENGLISH) { + if (prof.totalD > 240) { + sprintf(message, "%0.1f'", (round((profElem(inx).dist/12.0)*10.0)/10.0)); + } else { + sprintf(message, "%d'%0.1f\"", (int)floor((profElem(inx).dist)/12.0), + round(fmod(profElem(inx).dist,12.0)*10.0)/10.0); + } + } else { + if (PutDim(prof.totalD) > 10000) { + sprintf(message, "%0.1fm", (round(PutDim(profElem(inx).dist)/10.0)/10.0)); + } else if (PutDim(prof.totalD) > 100) { + sprintf(message, "%0.2fm", (round(PutDim(profElem(inx).dist))/100.0)); + } else { + sprintf(message, "%0.1fcm", round(PutDim(profElem(inx).dist)+0.5)); + } + } + DrawTextSize(&mainD, message, fp, fontSize, FALSE, &textsize); + pl.x = pb.x-(textsize.x/2)/prof.scaleX*D->scale; + pl.y = prof.minE-(LABELH+3.0/mainD.dpi)/prof.scaleY*D->scale; + DrawString(D, pl, 0.0, message, fp, fontSize*D->scale, borderColor); + sprintf(message, "%0.1f", round(PutDim(profElem(inx).elev)*100.0)/100.0); + if (printVert) { + pl.x = pt.x + LABELH/2.0/prof.scaleX*D->scale; + pl.y = pt.y + 2.0/mainD.dpi/prof.scaleY*D->scale+GetDim(prof.incrC) / 16; + DrawString(D, pl, 270.0, message, fp, fontSize*D->scale, borderColor); + } else { + pl.x = pt.x + 2.0/mainD.dpi/prof.scaleX*D->scale + GetDim(prof.incrC) / 16; + pl.y = pt.y; + if (inx != profElem_da.cnt-1 && profElem(inx).elev < profElem(inx+1).elev) { + pl.y -= LABELH/prof.scaleY*D->scale; + } + DrawString(D, pl, 0.0, message, fp, fontSize*D->scale, borderColor); + } + pl = pt; + } } @@ -385,206 +382,207 @@ static void DrawProfile(drawCmd_p D, wFontSize_t fontSize, BOOL_T printVert) static void ProfilePix2CoOrd(drawCmd_p, wDrawPix_t, wDrawPix_t, coOrd *); static void ProfileCoOrd2Pix(drawCmd_p, coOrd, wDrawPix_t*, wDrawPix_t*); static drawCmd_t screenProfileD = { - NULL, - &screenDrawFuncs, + NULL, + &screenDrawFuncs, DC_NOCLIP, - 1.0, - 0.0, - {0.0,0.0}, {0.0,0.0}, - ProfilePix2CoOrd, ProfileCoOrd2Pix + 1.0, + 0.0, + {0.0,0.0}, {0.0,0.0}, + ProfilePix2CoOrd, ProfileCoOrd2Pix }; static void ProfilePix2CoOrd( - drawCmd_p d, - wDrawPix_t xx, - wDrawPix_t yy, - coOrd * pos) + drawCmd_p d, + wDrawPix_t xx, + wDrawPix_t yy, + coOrd * pos) { - pos->x = (xx/d->dpi+d->orig.x)/prof.scaleX; - pos->y = (yy/d->dpi+d->orig.y)/prof.scaleY+prof.minE; + pos->x = (xx/d->dpi+d->orig.x)/prof.scaleX; + pos->y = (yy/d->dpi+d->orig.y)/prof.scaleY+prof.minE; } static void ProfileCoOrd2Pix( - drawCmd_p d, - coOrd pos, - wDrawPix_t *xx, - wDrawPix_t *yy) + drawCmd_p d, + coOrd pos, + wDrawPix_t *xx, + wDrawPix_t *yy) { - wDrawPix_t x, y; - x = ((((pos.x*prof.scaleX)/d->scale-d->orig.x)*d->dpi+0.5)); - y = (((((pos.y-prof.minE)*prof.scaleY)/d->scale-d->orig.y)*d->dpi+0.5)); - if (d->angle == 0) { - *xx = x; - *yy = y; - } else if (d->angle == -90.0) { - /* L->P */ - *xx = y; - *yy = -x; - } else { - /* P->L */ - *xx = -y; - *yy = x; - } + wDrawPix_t x, y; + x = ((((pos.x*prof.scaleX)/d->scale-d->orig.x)*d->dpi+0.5)); + y = (((((pos.y-prof.minE)*prof.scaleY)/d->scale-d->orig.y)*d->dpi+0.5)); + if (d->angle == 0) { + *xx = x; + *yy = y; + } else if (d->angle == -90.0) { + /* L->P */ + *xx = y; + *yy = -x; + } else { + /* P->L */ + *xx = -y; + *yy = x; + } } -/** - * Redraw profile window +/** + * Redraw profile window */ -static void RedrawProfileW( wDraw_p d, void * context, wWinPix_t x, wWinPix_t y ) +static void RedrawProfileW( wDraw_p d, void * context, wWinPix_t x, + wWinPix_t y ) { - wWinPix_t ww, hh; - coOrd size; - int divC; - DIST_T maxE, rngE; - profElem_t *p; - wFont_p fp; - POS_T w; - coOrd textsize; - char *pTestString; - - wDrawDelayUpdate(screenProfileD.d, TRUE); + wWinPix_t ww, hh; + coOrd size; + int divC; + DIST_T maxE, rngE; + profElem_t *p; + wFont_p fp; + POS_T w; + coOrd textsize; + char *pTestString; + + wDrawDelayUpdate(screenProfileD.d, TRUE); wDrawClear(screenProfileD.d); // get the size of the window area in pixels and convert to inches - wDrawGetSize(screenProfileD.d, &ww, &hh); - screenProfileD.size.x = (ww)/screenProfileD.dpi; - screenProfileD.size.y = (hh)/screenProfileD.dpi; + wDrawGetSize(screenProfileD.d, &ww, &hh); + screenProfileD.size.x = (ww)/screenProfileD.dpi; + screenProfileD.size.y = (hh)/screenProfileD.dpi; // calculate positions for labels??? fp = wStandardFont(F_HELV, FALSE, FALSE); screenProfileD.orig.x = -PBL(screenProfileFontSize); - screenProfileD.orig.y = -PBB(screenProfileFontSize); - - /* Calculate usable dimension of canvas in inches */ - size = screenProfileD.size; - size.x -= (PBL(screenProfileFontSize)); - size.y -= (PBB(screenProfileFontSize)); - - /* make sure there is enough space to show the rightmost coordinate value*/ - if (units == UNITS_ENGLISH) { - if (prof.totalD > 240.0) { - pTestString = "9999'"; - } else { - pTestString = "999'11\""; - } - } else { - if (PutDim(prof.totalD) > 10000.0) { - pTestString = "999m"; - } else { - if (PutDim(prof.totalD) > 100.0) { - pTestString = "99.9m"; - } else { - pTestString = "9.99m"; - } - } - } - DrawTextSize(&mainD, pTestString, fp, screenProfileFontSize, FALSE, &textsize); - size.x -= textsize.x / 2; - size.y -= textsize.y * 1.5 ; + screenProfileD.orig.y = -PBB(screenProfileFontSize); + + /* Calculate usable dimension of canvas in inches */ + size = screenProfileD.size; + size.x -= (PBL(screenProfileFontSize)); + size.y -= (PBB(screenProfileFontSize)); + + /* make sure there is enough space to show the rightmost coordinate value*/ + if (units == UNITS_ENGLISH) { + if (prof.totalD > 240.0) { + pTestString = "9999'"; + } else { + pTestString = "999'11\""; + } + } else { + if (PutDim(prof.totalD) > 10000.0) { + pTestString = "999m"; + } else { + if (PutDim(prof.totalD) > 100.0) { + pTestString = "99.9m"; + } else { + pTestString = "9.99m"; + } + } + } + DrawTextSize(&mainD, pTestString, fp, screenProfileFontSize, FALSE, &textsize); + size.x -= textsize.x / 2; + size.y -= textsize.y * 1.5 ; // now we have the size of the profile area #ifdef WINDOWS - if (printVert) { - size.x -= PBR(screenProfileFontSize)/4.0; - size.y -= PBT; - } else + if (printVert) { + size.x -= PBR(screenProfileFontSize)/4.0; + size.y -= PBT; + } else #endif - { - size.x -= PBR(screenProfileFontSize); - size.y -= PBT; - } - - if (size.x < 0.1 || size.y < 0.1) { - wDrawDelayUpdate(screenProfileD.d, FALSE); - return; - } - - /* Calculate range of data values */ - if (profElem_da.cnt<=0) { - prof.totalD = 0.0; - prof.minE = 0.0; - maxE = 1.0; - } else { - maxE = prof.minE = profElem(0).elev; - prof.totalD = profElem(profElem_da.cnt-1).dist; - for (int inx=1; inxelevelev; - } - if (p->elev>maxE) { - maxE = p->elev; - } - } - } - - /* Calculate number of grid lines */ - prof.minC = (int)floor(PutDim(prof.minE)); - prof.maxC = (int)ceil(PutDim(maxE)); - if (prof.maxC-prof.minC <= 0) { - prof.maxC = prof.minC+1; - } - divC = (int)floor(size.y/labelH); - if (divC < 1) { - divC = 1; - } - prof.incrC = (prof.maxC-prof.minC+divC-1)/divC; - if (prof.incrC < 1) { - prof.incrC = 1; - } - prof.maxC = prof.minC + (prof.maxC-prof.minC+prof.incrC-1)/prof.incrC * - prof.incrC; - - /* Reset bounds based on intergal values */ - prof.minE = GetDim(prof.minC); - rngE = GetDim(prof.maxC) - prof.minE; - if (rngE < 1.0) { - rngE = 1.0; - } - - /* Compute vert scale */ - prof.scaleY = size.y/rngE; - sprintf(message, "%0.2f", maxE); - - DrawTextSize(&mainD, message, fp, screenProfileFontSize, FALSE, &textsize); - w = textsize.x; - w -= PBT; - w += 4.0/screenProfileD.dpi; - w -= (GetDim(prof.maxC)-maxE)*prof.scaleY; - if (w > 0) { - size.y -= w; - prof.scaleY = size.y/rngE; - } - - /* Compute horz scale */ - if (prof.totalD <= 0.1) { - prof.totalD = size.x; - } - prof.scaleX = size.x/prof.totalD; - - DrawProfile(&screenProfileD, screenProfileFontSize, + { + size.x -= PBR(screenProfileFontSize); + size.y -= PBT; + } + + if (size.x < 0.1 || size.y < 0.1) { + wDrawDelayUpdate(screenProfileD.d, FALSE); + return; + } + + /* Calculate range of data values */ + if (profElem_da.cnt<=0) { + prof.totalD = 0.0; + prof.minE = 0.0; + maxE = 1.0; + } else { + maxE = prof.minE = profElem(0).elev; + prof.totalD = profElem(profElem_da.cnt-1).dist; + for (int inx=1; inxelevelev; + } + if (p->elev>maxE) { + maxE = p->elev; + } + } + } + + /* Calculate number of grid lines */ + prof.minC = (int)floor(PutDim(prof.minE)); + prof.maxC = (int)ceil(PutDim(maxE)); + if (prof.maxC-prof.minC <= 0) { + prof.maxC = prof.minC+1; + } + divC = (int)floor(size.y/labelH); + if (divC < 1) { + divC = 1; + } + prof.incrC = (prof.maxC-prof.minC+divC-1)/divC; + if (prof.incrC < 1) { + prof.incrC = 1; + } + prof.maxC = prof.minC + (prof.maxC-prof.minC+prof.incrC-1)/prof.incrC * + prof.incrC; + + /* Reset bounds based on intergal values */ + prof.minE = GetDim(prof.minC); + rngE = GetDim(prof.maxC) - prof.minE; + if (rngE < 1.0) { + rngE = 1.0; + } + + /* Compute vert scale */ + prof.scaleY = size.y/rngE; + sprintf(message, "%0.2f", maxE); + + DrawTextSize(&mainD, message, fp, screenProfileFontSize, FALSE, &textsize); + w = textsize.x; + w -= PBT; + w += 4.0/screenProfileD.dpi; + w -= (GetDim(prof.maxC)-maxE)*prof.scaleY; + if (w > 0) { + size.y -= w; + prof.scaleY = size.y/rngE; + } + + /* Compute horz scale */ + if (prof.totalD <= 0.1) { + prof.totalD = size.x; + } + prof.scaleX = size.x/prof.totalD; + + DrawProfile(&screenProfileD, screenProfileFontSize, #ifdef WINDOWS - printVert + printVert #else - FALSE + FALSE #endif - ); - wDrawDelayUpdate(screenProfileD.d, FALSE); + ); + wDrawDelayUpdate(screenProfileD.d, FALSE); } static drawCmd_t printProfileD = { - NULL, - &printDrawFuncs, + NULL, + &printDrawFuncs, DC_PRINT | DC_NOCLIP, - 1.0, - 0.0, - {0.0,0.0}, {1.0,1.0}, - ProfilePix2CoOrd, ProfileCoOrd2Pix + 1.0, + 0.0, + {0.0,0.0}, {1.0,1.0}, + ProfilePix2CoOrd, ProfileCoOrd2Pix }; /** @@ -600,83 +598,83 @@ static drawCmd_t printProfileD = { static void DoProfilePrint(void * junk) { - coOrd size, p[4]; - int copies; - WDOUBLE_T w, h, screenRatio, printRatio, titleH; - wFont_p fp; - coOrd screenSize; - coOrd textsize; - - if (!wPrintDocStart(_("Profile"), 1, &copies)) { - return; - } - printProfileD.d = wPrintPageStart(); - if (printProfileD.d == NULL) { - return; - } - printProfileD.dpi = wDrawGetDPI(printProfileD.d); - wPrintGetPageSize(&w, &h); - printProfileD.orig.x = -PBL(printProfileFontSize); - printProfileD.orig.y = -PBB(printProfileFontSize); - printProfileD.angle = 0.0; - screenRatio = screenProfileD.size.y/screenProfileD.size.x; - screenSize.x = prof.totalD*prof.scaleX; - screenSize.y = GetDim(prof.maxC-prof.minC)*prof.scaleY; - screenRatio = screenSize.y/screenSize.x; - printProfileD.size.x = w; - printProfileD.size.y = h; - sprintf(message, _("%s Profile: %s"), sProdName, GetLayoutTitle()); - fp = wStandardFont(F_TIMES, FALSE, FALSE); - DrawTextSize(&mainD, message, fp, 24, FALSE, &textsize); - titleH = textsize.y + 6.0/mainD.dpi; - if (screenRatio < 1.0 && w < h) { - /* Landscape -> Portrait */ - printProfileD.angle = -90.0; - printProfileD.orig.x += h; - size.x = h; - size.y = w; - } else if (screenRatio > 1.0 && w > h) { - /* Portrait -> Landscape */ - printProfileD.angle = 90.0; - printProfileD.orig.y += w; - size.x = h; - size.y = w; - } else { - size.x = w; - size.y = h; - } - size.y -= titleH+(printVert?PBT*2:PBT)+PBB(printProfileFontSize); - size.x -= 4.0/mainD.dpi+PBL(printProfileFontSize)+(printVert?PBR( - printProfileFontSize)/4.0:PBR(printProfileFontSize)); - printRatio = size.y/size.x; - if (printRatio < screenRatio) { - printProfileD.scale = screenSize.y/size.y; - size.x = screenSize.x/printProfileD.scale; - } else { - printProfileD.scale = screenSize.x/size.x; - printProfileD.orig.y -= size.y; - size.y = screenSize.y/printProfileD.scale; - printProfileD.orig.y += size.y; - } + coOrd size, p[4]; + int copies; + WDOUBLE_T w, h, screenRatio, printRatio, titleH; + wFont_p fp; + coOrd screenSize; + coOrd textsize; + + if (!wPrintDocStart(_("Profile"), 1, &copies)) { + return; + } + printProfileD.d = wPrintPageStart(); + if (printProfileD.d == NULL) { + return; + } + printProfileD.dpi = wDrawGetDPI(printProfileD.d); + wPrintGetPageSize(&w, &h); + printProfileD.orig.x = -PBL(printProfileFontSize); + printProfileD.orig.y = -PBB(printProfileFontSize); + printProfileD.angle = 0.0; + screenRatio = screenProfileD.size.y/screenProfileD.size.x; + screenSize.x = prof.totalD*prof.scaleX; + screenSize.y = GetDim(prof.maxC-prof.minC)*prof.scaleY; + screenRatio = screenSize.y/screenSize.x; + printProfileD.size.x = w; + printProfileD.size.y = h; + sprintf(message, _("%s Profile: %s"), sProdName, GetLayoutTitle()); + fp = wStandardFont(F_TIMES, FALSE, FALSE); + DrawTextSize(&mainD, message, fp, 24, FALSE, &textsize); + titleH = textsize.y + 6.0/mainD.dpi; + if (screenRatio < 1.0 && w < h) { + /* Landscape -> Portrait */ + printProfileD.angle = -90.0; + printProfileD.orig.x += h; + size.x = h; + size.y = w; + } else if (screenRatio > 1.0 && w > h) { + /* Portrait -> Landscape */ + printProfileD.angle = 90.0; + printProfileD.orig.y += w; + size.x = h; + size.y = w; + } else { + size.x = w; + size.y = h; + } + size.y -= titleH+(printVert?PBT*2:PBT)+PBB(printProfileFontSize); + size.x -= 4.0/mainD.dpi+PBL(printProfileFontSize)+(printVert?PBR( + printProfileFontSize)/4.0:PBR(printProfileFontSize)); + printRatio = size.y/size.x; + if (printRatio < screenRatio) { + printProfileD.scale = screenSize.y/size.y; + size.x = screenSize.x/printProfileD.scale; + } else { + printProfileD.scale = screenSize.x/size.x; + printProfileD.orig.y -= size.y; + size.y = screenSize.y/printProfileD.scale; + printProfileD.orig.y += size.y; + } #define PRINT_ABS2PAGEX(X) (((X)*printProfileD.scale)/prof.scaleX) #define PRINT_ABS2PAGEY(Y) (((Y)*printProfileD.scale)/prof.scaleY+prof.minE) - p[0].y = PRINT_ABS2PAGEY(size.y+(printVert?PBT*2:PBT)+0.05); - p[0].x = PRINT_ABS2PAGEX((size.x-textsize.x)/2.0); - if (p[0].x < 0) { - p[0].x = 0; - } - DrawString(&printProfileD, p[0], 0, message, fp, 24*printProfileD.scale, - borderColor); - p[0].x = p[3].x = PRINT_ABS2PAGEX((-PBL(printProfileFontSize))+2.0/mainD.dpi); - p[0].y = p[1].y = PRINT_ABS2PAGEY(-PBB(printProfileFontSize)); - p[1].x = p[2].x = PRINT_ABS2PAGEX(size.x+(printVert?PBR( - printProfileFontSize)/4.0:PBR(printProfileFontSize))); - p[2].y = p[3].y = PRINT_ABS2PAGEY(size.y+(printVert?PBT*2:PBT)); - DrawPoly( &printProfileD, 4, p, NULL, drawColorBlack, 0, DRAW_CLOSED ); - - DrawProfile(&printProfileD, printProfileFontSize, printVert); - wPrintPageEnd(printProfileD.d); - wPrintDocEnd(); + p[0].y = PRINT_ABS2PAGEY(size.y+(printVert?PBT*2:PBT)+0.05); + p[0].x = PRINT_ABS2PAGEX((size.x-textsize.x)/2.0); + if (p[0].x < 0) { + p[0].x = 0; + } + DrawString(&printProfileD, p[0], 0, message, fp, 24*printProfileD.scale, + borderColor); + p[0].x = p[3].x = PRINT_ABS2PAGEX((-PBL(printProfileFontSize))+2.0/mainD.dpi); + p[0].y = p[1].y = PRINT_ABS2PAGEY(-PBB(printProfileFontSize)); + p[1].x = p[2].x = PRINT_ABS2PAGEX(size.x+(printVert?PBR( + printProfileFontSize)/4.0:PBR(printProfileFontSize))); + p[2].y = p[3].y = PRINT_ABS2PAGEY(size.y+(printVert?PBT*2:PBT)); + DrawPoly( &printProfileD, 4, p, NULL, drawColorBlack, 0, DRAW_CLOSED ); + + DrawProfile(&printProfileD, printProfileFontSize, printVert); + wPrintPageEnd(printProfileD.d); + wPrintDocEnd(); } /************************************************************************** @@ -699,17 +697,17 @@ static void CloseProfileWindow(paramGroup_p pg, int event, void *data); static paramDrawData_t profileDrawData = { 300, 150, RedrawProfileW, SelProfileW, &screenProfileD }; static paramData_t profilePLs[] = { - { PD_DRAW, NULL, "canvas", PDO_DLGRESIZE, &profileDrawData }, + { PD_DRAW, NULL, "canvas", PDO_DLGRESIZE, &profileDrawData }, #define I_PROFILEMSG (1) - { PD_MESSAGE, NULL, NULL, PDO_DLGIGNOREX, I2VP(300) }, + { PD_MESSAGE, NULL, NULL, PDO_DLGIGNOREX, I2VP(300) }, #define I_CHANGEBUTTON 2 - { PD_BUTTON, DoProfileChange, "change", PDO_DLGCMDBUTTON, NULL, N_("Change") }, + { PD_BUTTON, DoProfileChange, "change", PDO_DLGCMDBUTTON, NULL, N_("Change") }, #define I_RESETBUTTON 3 - { PD_BUTTON, DoProfileReset, "reset", PDO_DLGCMDBUTTON, NULL, N_("Reset") }, + { PD_BUTTON, DoProfileReset, "reset", PDO_DLGCMDBUTTON, NULL, N_("Reset") }, #define I_CLEARBUTTON 4 - { PD_BUTTON, DoProfileClear, "clear", PDO_DLGCMDBUTTON, NULL, N_("Clear") }, + { PD_BUTTON, DoProfileClear, "clear", PDO_DLGCMDBUTTON, NULL, N_("Clear") }, #define I_PRINTBUTTON 5 - { PD_BUTTON, DoProfilePrint, "print", 0, NULL, N_("Print") } + { PD_BUTTON, DoProfilePrint, "print", 0, NULL, N_("Print") } }; static paramGroup_t profilePG = { "profile", 0, profilePLs, COUNT( profilePLs ) }; @@ -719,97 +717,97 @@ static paramGroup_t profilePG = { "profile", 0, profilePLs, COUNT( profilePLs ) #define PRINTBUTTON ((wButton_p)profilePLs[I_PRINTBUTTON].control) static void SelProfileW( - wIndex_t action, - coOrd pos) + wIndex_t action, + coOrd pos) { - DIST_T dist; - static DIST_T oldElev; - static int inx; - DIST_T elev; - - if (profElem_da.cnt <= 0) { - return; - } - - dist = pos.x; - elev = pos.y; - - switch (action&0xFF) { - case C_START: - profileUndo = FALSE; - break; - case C_DOWN: - for (inx=0; inx dist-profElem(inx-1).dist) { - inx--; - } - break; - } - } - if (inx >= profElem_da.cnt) { - inx = profElem_da.cnt-1; - } - sprintf(message, _("Elev = %0.1f"), round(PutDim(elev)*10.0)/10.0); - ParamLoadMessage(&profilePG, I_PROFILEMSG, message); - oldElev = elev; - RedrawProfileW( screenProfileD.d, NULL, 0, 0 ); - break; - case C_MOVE: - if (inx < 0) { - break; - } - if (profElem_da.cnt == 1) { - sprintf(message, _("Elev = %0.1f"), round(PutDim(elev)*10.0)/10.0); - } else if (inx == 0) { - sprintf(message, _("Elev=%0.2f %0.1f%%"), - round(PutDim(elev)*100.0)/100.0, - round(fabs(((profElem(inx+1).elev-elev) / (profElem(inx+1).dist-profElem( - inx).dist)) * 1000.0))/10.0); - } else if (inx == profElem_da.cnt-1) { - sprintf(message, _("%0.1f%% Elev = %0.2f"), - round(fabs(((profElem(inx-1).elev-elev) / (profElem(inx).dist-profElem( - inx-1).dist)) * 1000.0))/10.0, - round(PutDim(elev)*100.0)/100.0); - } else { - sprintf(message, _("%0.1f%% Elev = %0.2f %0.1f%%"), - round(fabs(((profElem(inx-1).elev-elev) / (profElem(inx).dist-profElem( - inx-1).dist)) * 1000.0))/10.0, - round(PutDim(elev)*100.0)/100.0, - round(fabs((profElem(inx+1).elev-elev) / (profElem(inx+1).dist-profElem( - inx).dist)) * 1000.0)/10.0); - } - ParamLoadMessage(&profilePG, I_PROFILEMSG, message); - oldElev = elev; - profElem(inx).elev = oldElev; - RedrawProfileW( screenProfileD.d, NULL, 0, 0 ); + DIST_T dist; + static DIST_T oldElev; + static int inx; + DIST_T elev; + + if (profElem_da.cnt <= 0) { + return; + } + + dist = pos.x; + elev = pos.y; + + switch (action&0xFF) { + case C_START: + profileUndo = FALSE; + break; + case C_DOWN: + for (inx=0; inx dist-profElem(inx-1).dist) { + inx--; + } + break; + } + } + if (inx >= profElem_da.cnt) { + inx = profElem_da.cnt-1; + } + sprintf(message, _("Elev = %0.1f"), round(PutDim(elev)*10.0)/10.0); + ParamLoadMessage(&profilePG, I_PROFILEMSG, message); + oldElev = elev; + RedrawProfileW( screenProfileD.d, NULL, 0, 0 ); + break; + case C_MOVE: + if (inx < 0) { + break; + } + if (profElem_da.cnt == 1) { + sprintf(message, _("Elev = %0.1f"), round(PutDim(elev)*10.0)/10.0); + } else if (inx == 0) { + sprintf(message, _("Elev=%0.2f %0.1f%%"), + round(PutDim(elev)*100.0)/100.0, + round(fabs(((profElem(inx+1).elev-elev) / (profElem(inx+1).dist-profElem( + inx).dist)) * 1000.0))/10.0); + } else if (inx == profElem_da.cnt-1) { + sprintf(message, _("%0.1f%% Elev = %0.2f"), + round(fabs(((profElem(inx-1).elev-elev) / (profElem(inx).dist-profElem( + inx-1).dist)) * 1000.0))/10.0, + round(PutDim(elev)*100.0)/100.0); + } else { + sprintf(message, _("%0.1f%% Elev = %0.2f %0.1f%%"), + round(fabs(((profElem(inx-1).elev-elev) / (profElem(inx).dist-profElem( + inx-1).dist)) * 1000.0))/10.0, + round(PutDim(elev)*100.0)/100.0, + round(fabs((profElem(inx+1).elev-elev) / (profElem(inx+1).dist-profElem( + inx).dist)) * 1000.0)/10.0); + } + ParamLoadMessage(&profilePG, I_PROFILEMSG, message); + oldElev = elev; + profElem(inx).elev = oldElev; + RedrawProfileW( screenProfileD.d, NULL, 0, 0 ); wPause(500l); break; - case C_UP: - if (profileUndo == FALSE) { - UndoStart(_("Profile Command"), "Profile - set elevation"); - profileUndo = TRUE; - } - if (profElem(inx).trk) { - UpdateTrkEndElev(profElem(inx).trk, profElem(inx).ep, ELEV_DEF|ELEV_VISIBLE, - oldElev, NULL); - } - profElem(inx).elev = oldElev; - RedrawProfileW( screenProfileD.d, NULL, 0, 0 ); - ParamLoadMessage(&profilePG, I_PROFILEMSG, _("Drag to change Elevation")); - inx = -1; - break; - default: - break; - } + case C_UP: + if (profileUndo == FALSE) { + UndoStart(_("Profile Command"), "Profile - set elevation"); + profileUndo = TRUE; + } + if (profElem(inx).trk) { + UpdateTrkEndElev(profElem(inx).trk, profElem(inx).ep, ELEV_DEF|ELEV_VISIBLE, + oldElev, NULL); + } + profElem(inx).elev = oldElev; + RedrawProfileW( screenProfileD.d, NULL, 0, 0 ); + ParamLoadMessage(&profilePG, I_PROFILEMSG, _("Drag to change Elevation")); + inx = -1; + break; + default: + break; + } } static void HilightProfileElevations(BOOL_T show) { - /*if ( profElem_da.cnt <= 0 ) {*/ - HilightElevations(show); - /*} else { - }*/ + /*if ( profElem_da.cnt <= 0 ) {*/ + HilightElevations(show); + /*} else { + }*/ } /** @@ -822,15 +820,15 @@ static void HilightProfileElevations(BOOL_T show) void CloseProfileWindow(paramGroup_p pg, int event, void *data) { - Reset(); - return; + Reset(); + return; } -/** +/** * Undo the changes made in the profile window to the layout. */ - + static void ResetChanges() { @@ -839,7 +837,7 @@ ResetChanges() profElem(i) = copyOfprofElem[i]; if (profElem(i).trk) { UpdateTrkEndElev(profElem(i).trk, profElem(i).ep, ELEV_DEF | ELEV_VISIBLE, - copyOfprofElem[i].elev, NULL); + copyOfprofElem[i].elev, NULL); } } } @@ -861,7 +859,7 @@ DoProfileReset(void *junk) } ResetChanges(); RedrawProfileW( screenProfileD.d, NULL, 0, 0 ); - TempRedraw(); + TempRedraw(); } /** @@ -874,34 +872,34 @@ static void DoProfileChange(void *junk) { DestroyCopyOfProfileElements(); - TempRedraw(); + TempRedraw(); } static void DoProfileDone(void * junk) { - Reset(); + Reset(); } static void DoProfileClear(void * junk) { ResetChanges(); - profElem_da.cnt = 0; - station_da.cnt = 0; - ClrAllTrkBitsRedraw(TB_PROFILEPATH, TRUE); - pathStartTrk = pathEndTrk = NULL; - RedrawProfileW( screenProfileD.d, NULL, 0, 0 ); + DYNARR_RESET( profElem_t, profElem_da ); + DYNARR_RESET( station_t, station_da ); + ClrAllTrkBitsRedraw(TB_PROFILEPATH, TRUE); + pathStartTrk = pathEndTrk = NULL; + RedrawProfileW( screenProfileD.d, NULL, 0, 0 ); } static void DoProfileChangeMode(void * junk) { - if (profElem_da.cnt<=0) { - InfoMessage(_("Select a Defined Elevation to start Profile")); - } else { - InfoMessage(_("Select a Defined Elevation to extend Profile")); - } + if (profElem_da.cnt<=0) { + InfoMessage(_("Select a Defined Elevation to start Profile")); + } else { + InfoMessage(_("Select a Defined Elevation to extend Profile")); + } } /************************************************************************** @@ -912,15 +910,15 @@ static void DoProfileChangeMode(void * junk) static BOOL_T PathListEmpty(void) { - return pathStartTrk == NULL; + return pathStartTrk == NULL; } static BOOL_T PathListSingle(void) { - return pathStartTrk != NULL && - (pathEndTrk == NULL || - (GetTrkEndTrk(pathEndTrk,pathEndEp) == pathStartTrk && - GetTrkEndTrk(pathStartTrk,pathStartEp) == pathEndTrk)); + return pathStartTrk != NULL && + (pathEndTrk == NULL || + (GetTrkEndTrk(pathEndTrk,pathEndEp) == pathStartTrk && + GetTrkEndTrk(pathStartTrk,pathStartEp) == pathEndTrk)); } @@ -928,106 +926,106 @@ static int profileShortestPathMatch; static DIST_T profileShortestPathDist; static int ProfileShortestPathFunc( - SPTF_CMD cmd, - track_p trk, - EPINX_T ep, - EPINX_T ep0, - DIST_T dist, - void * data) + SPTF_CMD cmd, + track_p trk, + EPINX_T ep, + EPINX_T ep0, + DIST_T dist, + void * data) { - int rc0=0; - int pathMatch; - - switch (cmd) { - track_p trkN; - case SPTC_TERMINATE: - rc0 = 1; - break; - - case SPTC_MATCH: - if (EndPtIsIgnoredElev(trk,ep)) { - break; - } - if (PathListSingle()) { - if (trk == pathStartTrk && ep == pathStartEp) { - pathMatch = 2; - } else if (trk == pathEndTrk && ep == pathEndEp) { - pathMatch = 3; - } else { - break; - } - } else if ((trkN = GetTrkEndTrk(trk,ep)) == NULL) { - break; - } else { - EPINX_T epN; - epN = GetEndPtConnectedToMe(trkN, trk); - if (trkN == pathStartTrk && epN == pathStartEp) { - pathMatch = 1; - } else if (trkN == pathEndTrk && epN == pathEndEp) { - pathMatch = 2; - } else if (trkN == pathStartTrk && trkN == pathEndTrk) { - pathMatch = 2; - } else if (trkN == pathStartTrk) { - pathMatch = 1; - } else if (trkN == pathEndTrk) { - pathMatch = 2; - } else { - break; - } - } - if (profileShortestPathMatch < 0 || profileShortestPathDist > dist) { - LOG(log_shortPath, 4, (" Match=%d", pathMatch)) - profileShortestPathMatch = pathMatch; - profileShortestPathDist = dist; - } - rc0 = 1; - break; - - case SPTC_MATCHANY: - rc0 = -1; - break; - - case SPTC_IGNNXTTRK: - if (EndPtIsIgnoredElev(trk,ep)) { - rc0 = 1; - } else if ((GetTrkBits(trk)&TB_PROFILEPATH)!=0) { - rc0 = 1; - } else if ((!EndPtIsDefinedElev(trk,ep)) && GetTrkEndTrk(trk,ep)==NULL) { - rc0 = 1; - } else { - rc0 = 0; - } - break; - - case SPTC_ADD_TRK: - if (log_shortPath<=0|| - logTable(log_shortPath).level<4) LOG(log_profile, 4, (" ADD_TRK T%d:%d", - GetTrkIndex(trk), ep)) - SetTrkBits(trk, TB_PROFILEPATH); - DrawTrack(trk, &mainD, profilePathColor); - rc0 = 0; - break; - - case SPTC_VALID: - rc0 = 1; - break; - - default: - break; - } - return rc0; + int rc0=0; + int pathMatch; + + switch (cmd) { + track_p trkN; + case SPTC_TERMINATE: + rc0 = 1; + break; + + case SPTC_MATCH: + if (EndPtIsIgnoredElev(trk,ep)) { + break; + } + if (PathListSingle()) { + if (trk == pathStartTrk && ep == pathStartEp) { + pathMatch = 2; + } else if (trk == pathEndTrk && ep == pathEndEp) { + pathMatch = 3; + } else { + break; + } + } else if ((trkN = GetTrkEndTrk(trk,ep)) == NULL) { + break; + } else { + EPINX_T epN; + epN = GetEndPtConnectedToMe(trkN, trk); + if (trkN == pathStartTrk && epN == pathStartEp) { + pathMatch = 1; + } else if (trkN == pathEndTrk && epN == pathEndEp) { + pathMatch = 2; + } else if (trkN == pathStartTrk && trkN == pathEndTrk) { + pathMatch = 2; + } else if (trkN == pathStartTrk) { + pathMatch = 1; + } else if (trkN == pathEndTrk) { + pathMatch = 2; + } else { + break; + } + } + if (profileShortestPathMatch < 0 || profileShortestPathDist > dist) { + LOG(log_shortPath, 4, (" Match=%d", pathMatch)) + profileShortestPathMatch = pathMatch; + profileShortestPathDist = dist; + } + rc0 = 1; + break; + + case SPTC_MATCHANY: + rc0 = -1; + break; + + case SPTC_IGNNXTTRK: + if (EndPtIsIgnoredElev(trk,ep)) { + rc0 = 1; + } else if ((GetTrkBits(trk)&TB_PROFILEPATH)!=0) { + rc0 = 1; + } else if ((!EndPtIsDefinedElev(trk,ep)) && GetTrkEndTrk(trk,ep)==NULL) { + rc0 = 1; + } else { + rc0 = 0; + } + break; + + case SPTC_ADD_TRK: + if (log_shortPath<=0|| + logTable(log_shortPath).level<4) LOG(log_profile, 4, (" ADD_TRK T%d:%d", + GetTrkIndex(trk), ep)) + SetTrkBits(trk, TB_PROFILEPATH); + DrawTrack(trk, &mainD, profilePathColor); + rc0 = 0; + break; + + case SPTC_VALID: + rc0 = 1; + break; + + default: + break; + } + return rc0; } static int FindProfileShortestPath( - track_p trkN, - EPINX_T epN) + track_p trkN, + EPINX_T epN) { - LOG(log_profile, 4, ("Searching from T%d:%d to T%d:%d or T%d:%d\n", - GetTrkIndex(trkN), epN, - pathStartTrk?GetTrkIndex(pathStartTrk):-1, pathStartTrk?pathStartEp:-1, - pathEndTrk?GetTrkIndex(pathEndTrk):-1, pathEndTrk?pathEndEp:-1)) - profileShortestPathMatch = -1; - return FindShortestPath(trkN, epN, TRUE, ProfileShortestPathFunc, NULL); + LOG(log_profile, 4, ("Searching from T%d:%d to T%d:%d or T%d:%d\n", + GetTrkIndex(trkN), epN, + pathStartTrk?GetTrkIndex(pathStartTrk):-1, pathStartTrk?pathStartEp:-1, + pathEndTrk?GetTrkIndex(pathEndTrk):-1, pathEndTrk?pathEndEp:-1)) + profileShortestPathMatch = -1; + return FindShortestPath(trkN, epN, TRUE, ProfileShortestPathFunc, NULL); } @@ -1044,492 +1042,493 @@ static int FindProfileShortestPath( #define ONPATH_BRANCH (1<<3) static int OnPath(track_p trk, EPINX_T ep) { - if (GetTrkBits(trk)&TB_PROFILEPATH) { - track_p trk0; - trk0 = GetTrkEndTrk(profilePopupTrk, profilePopupEp); - if (trk0 && (GetTrkBits(trk0)&TB_PROFILEPATH)) { - return ONPATH_MID; - } - if (trk == pathStartTrk && ep == pathStartEp) { - return ONPATH_END; - } - return ONPATH_BRANCH; - } - return ONPATH_NOT; + if (GetTrkBits(trk)&TB_PROFILEPATH) { + track_p trk0; + trk0 = GetTrkEndTrk(profilePopupTrk, profilePopupEp); + if (trk0 && (GetTrkBits(trk0)&TB_PROFILEPATH)) { + return ONPATH_MID; + } + if (trk == pathStartTrk && ep == pathStartEp) { + return ONPATH_END; + } + return ONPATH_BRANCH; + } + return ONPATH_NOT; } static BOOL_T PathListCheck(void) { - track_p trk; - if (PathListEmpty() || PathListSingle()) { - return TRUE; - } - if (!(GetTrkBits(pathStartTrk)&TB_PROFILEPATH)) { - ErrorMessage(MSG_PST_NOT_ON_PATH); - return FALSE; - } - if (!(GetTrkBits(pathEndTrk)&TB_PROFILEPATH)) { - ErrorMessage(MSG_PET_NOT_ON_PATH); - return FALSE; - } - trk = GetTrkEndTrk(pathStartTrk,pathStartEp); - if (trk && (GetTrkBits(trk)&TB_PROFILEPATH)) { - ErrorMessage(MSG_INV_PST_ON_PATH); - return FALSE; - } - trk = GetTrkEndTrk(pathEndTrk,pathEndEp); - if (trk && (GetTrkBits(trk)&TB_PROFILEPATH)) { - ErrorMessage(MSG_INV_PET_ON_PATH); - return FALSE; - } - return TRUE; + track_p trk; + if (PathListEmpty() || PathListSingle()) { + return TRUE; + } + if (!(GetTrkBits(pathStartTrk)&TB_PROFILEPATH)) { + ErrorMessage(MSG_PST_NOT_ON_PATH); + return FALSE; + } + if (!(GetTrkBits(pathEndTrk)&TB_PROFILEPATH)) { + ErrorMessage(MSG_PET_NOT_ON_PATH); + return FALSE; + } + trk = GetTrkEndTrk(pathStartTrk,pathStartEp); + if (trk && (GetTrkBits(trk)&TB_PROFILEPATH)) { + ErrorMessage(MSG_INV_PST_ON_PATH); + return FALSE; + } + trk = GetTrkEndTrk(pathEndTrk,pathEndEp); + if (trk && (GetTrkBits(trk)&TB_PROFILEPATH)) { + ErrorMessage(MSG_INV_PET_ON_PATH); + return FALSE; + } + return TRUE; } static void RemoveTracksFromPath( - track_p *Rtrk, - EPINX_T *Rep, - track_p trkEnd, - EPINX_T epEnd) + track_p *Rtrk, + EPINX_T *Rep, + track_p trkEnd, + EPINX_T epEnd) { - track_p trk = *Rtrk, trkN; - EPINX_T ep = *Rep; - - PASSERT("removeTracksFromPath", trk, NOP); - PASSERT("removeTracksFromPath", !PathListSingle(), NOP); - while (1) { - EPINX_T ep2; - DrawTrack(trk, &mainD, drawColorWhite); - ClrTrkBits(trk, TB_PROFILEPATH); - DrawTrack(trk, &mainD, drawColorBlack); - - if (trk == trkEnd) { - pathStartTrk = trkEnd; - pathStartEp = epEnd; - pathEndTrk = GetTrkEndTrk(pathStartTrk,pathStartEp); - if (pathEndTrk) { - pathEndEp = GetEndPtConnectedToMe(pathEndTrk,pathStartTrk); - } - return; - } - - ep2 = GetNextTrkOnPath(trk, ep); - PASSERT("removeTracksFromPath", ep2 >= 0,NOP); - trkN = GetTrkEndTrk(trk,ep2); - PASSERT("removeTracksFromPath", trkN != NULL, NOP); - ep = GetEndPtConnectedToMe(trkN,trk); - trk = trkN; - if (EndPtIsDefinedElev(trk,ep)) { - *Rtrk = trk; - *Rep = ep; - return; - } - } + track_p trk = *Rtrk, trkN; + EPINX_T ep = *Rep; + + PASSERT("removeTracksFromPath", trk, NOP); + PASSERT("removeTracksFromPath", !PathListSingle(), NOP); + while (1) { + EPINX_T ep2; + DrawTrack(trk, &mainD, drawColorWhite); + ClrTrkBits(trk, TB_PROFILEPATH); + DrawTrack(trk, &mainD, drawColorBlack); + + if (trk == trkEnd) { + pathStartTrk = trkEnd; + pathStartEp = epEnd; + pathEndTrk = GetTrkEndTrk(pathStartTrk,pathStartEp); + if (pathEndTrk) { + pathEndEp = GetEndPtConnectedToMe(pathEndTrk,pathStartTrk); + } + return; + } + + ep2 = GetNextTrkOnPath(trk, ep); + PASSERT("removeTracksFromPath", ep2 >= 0,NOP); + trkN = GetTrkEndTrk(trk,ep2); + PASSERT("removeTracksFromPath", trkN != NULL, NOP); + ep = GetEndPtConnectedToMe(trkN,trk); + trk = trkN; + if (EndPtIsDefinedElev(trk,ep)) { + *Rtrk = trk; + *Rep = ep; + return; + } + } } static void ChkElev(track_p trk, EPINX_T ep, EPINX_T ep2, DIST_T dist, BOOL_T * defined) { - profElem_p p; - station_p s; - EPINX_T epDefElev = -1; - int mode; - BOOL_T undefined; - - mode = GetTrkEndElevMode(trk, ep); - if (mode == ELEV_DEF) { - epDefElev = ep; - } else if (mode == ELEV_STATION) { - DYNARR_APPEND(station_t, station_da, 10); - s = &station(station_da.cnt-1); - s->dist = dist; - s->name = GetTrkEndElevStation(trk,ep); - } - undefined = FALSE; - if (epDefElev<0) { - if ((trk == pathStartTrk && ep == pathStartEp) || - (trk == pathEndTrk && ep == pathEndEp)) { - epDefElev = ep; - } - } - if (epDefElev<0) { - if (ep == ep2 || - GetTrkEndElevMode(trk,ep2) != ELEV_DEF) - for (EPINX_T ep1=0; ep1=0) { - DYNARR_APPEND(profElem_t, profElem_da, 10); - p = &profElem(profElem_da.cnt-1); - p->trk = trk; - p->ep = epDefElev; - p->dist = dist; - if (GetTrkEndElevMode(trk,epDefElev) == ELEV_DEF) { - p->elev = GetTrkEndElevHeight(trk,epDefElev); - } else { - ComputeElev(trk, epDefElev, TRUE, &p->elev, NULL, TRUE); - } - p->defined = *defined; - *defined = TRUE; - } else if (undefined) { - *defined = FALSE; - } + profElem_p p; + station_p s; + EPINX_T epDefElev = -1; + int mode; + BOOL_T undefined; + + mode = GetTrkEndElevMode(trk, ep); + if (mode == ELEV_DEF) { + epDefElev = ep; + } else if (mode == ELEV_STATION) { + DYNARR_APPEND(station_t, station_da, 10); + s = &station(station_da.cnt-1); + s->dist = dist; + s->name = GetTrkEndElevStation(trk,ep); + } + undefined = FALSE; + if (epDefElev<0) { + if ((trk == pathStartTrk && ep == pathStartEp) || + (trk == pathEndTrk && ep == pathEndEp)) { + epDefElev = ep; + } + } + if (epDefElev<0) { + if (ep == ep2 || + GetTrkEndElevMode(trk,ep2) != ELEV_DEF) + for (EPINX_T ep1=0; ep1=0) { + DYNARR_APPEND(profElem_t, profElem_da, 10); + p = &profElem(profElem_da.cnt-1); + p->trk = trk; + p->ep = epDefElev; + p->dist = dist; + if (GetTrkEndElevMode(trk,epDefElev) == ELEV_DEF) { + p->elev = GetTrkEndElevHeight(trk,epDefElev); + } else { + ComputeElev(trk, epDefElev, TRUE, &p->elev, NULL, TRUE); + } + p->defined = *defined; + *defined = TRUE; + } else if (undefined) { + *defined = FALSE; + } } static void ComputeProfElem(void) { - track_p trk = pathStartTrk, trkN; - EPINX_T ep = pathStartEp, ep2; - BOOL_T go; - DIST_T dist; - BOOL_T defined; - - profElem_da.cnt = 0; - station_da.cnt = 0; - dist = 0; - defined = TRUE; - if (PathListEmpty()) { - return; - } - ChkElev(trk, ep, ep, dist, &defined); - if (PathListSingle()) { - return; - } - go = TRUE; - while (go) { - if (trk == pathEndTrk) { - go = FALSE; - ep2 = pathEndEp; - } else { - ep2 = GetNextTrkOnPath(trk, ep); - //PASSERT( "computeProfElem", ep2 >= 0, NOP ); - } - dist += GetTrkLength(trk, ep, ep2); - ChkElev(trk, ep2, ep, dist, &defined); - if (!go) { - break; - } - trkN = GetTrkEndTrk(trk,ep2); - ep = GetEndPtConnectedToMe(trkN,trk); - trk = trkN; - } + track_p trk = pathStartTrk, trkN; + EPINX_T ep = pathStartEp, ep2; + BOOL_T go; + DIST_T dist; + BOOL_T defined; + + DYNARR_RESET( profElem_t, profElem_da ); + DYNARR_RESET( station_t, station_da ); + dist = 0; + defined = TRUE; + if (PathListEmpty()) { + return; + } + ChkElev(trk, ep, ep, dist, &defined); + if (PathListSingle()) { + return; + } + go = TRUE; + while (go) { + if (trk == pathEndTrk) { + go = FALSE; + ep2 = pathEndEp; + } else { + ep2 = GetNextTrkOnPath(trk, ep); + //PASSERT( "computeProfElem", ep2 >= 0, NOP ); + } + dist += GetTrkLength(trk, ep, ep2); + ChkElev(trk, ep2, ep, dist, &defined); + if (!go) { + break; + } + trkN = GetTrkEndTrk(trk,ep2); + ep = GetEndPtConnectedToMe(trkN,trk); + trk = trkN; + } } static void DumpProfElems(void) { - track_p trk, trkN; - EPINX_T ep; - BOOL_T go; - - trk = pathStartTrk; - ep = pathStartEp; - - if (pathStartTrk==NULL) { - lprintf("s--:- e--:-"); - } else if (pathEndTrk == NULL) { - lprintf("sT%d:%d e--:-", GetTrkIndex(pathStartTrk), pathStartEp); - } else { - lprintf("sT%d:%d eT%d:%d", GetTrkIndex(pathStartTrk), pathStartEp, - GetTrkIndex(pathEndTrk), pathEndEp); - } - lprintf(" { "); - go = TRUE; - if (!PathListSingle()) - while (trk) { - EPINX_T ep2; - if (trk==pathEndTrk) { - ep2 = pathEndEp; - go = FALSE; - } else { - ep2 = GetNextTrkOnPath(trk, ep); - PASSERT("computeProfElem", ep2 >= 0, NOP); - } - lprintf("T%d:%d:%d ", GetTrkIndex(trk), ep, ep2); - if (!go) { - break; - } - trkN = GetTrkEndTrk(trk,ep2); - ep = GetEndPtConnectedToMe(trkN,trk); - trk = trkN; - } - lprintf("}"); + track_p trk, trkN; + EPINX_T ep; + BOOL_T go; + + trk = pathStartTrk; + ep = pathStartEp; + + if (pathStartTrk==NULL) { + lprintf("s--:- e--:-"); + } else if (pathEndTrk == NULL) { + lprintf("sT%d:%d e--:-", GetTrkIndex(pathStartTrk), pathStartEp); + } else { + lprintf("sT%d:%d eT%d:%d", GetTrkIndex(pathStartTrk), pathStartEp, + GetTrkIndex(pathEndTrk), pathEndEp); + } + lprintf(" { "); + go = TRUE; + if (!PathListSingle()) + while (trk) { + EPINX_T ep2; + if (trk==pathEndTrk) { + ep2 = pathEndEp; + go = FALSE; + } else { + ep2 = GetNextTrkOnPath(trk, ep); + PASSERT("computeProfElem", ep2 >= 0, NOP); + } + lprintf("T%d:%d:%d ", GetTrkIndex(trk), ep, ep2); + if (!go) { + break; + } + trkN = GetTrkEndTrk(trk,ep2); + ep = GetEndPtConnectedToMe(trkN,trk); + trk = trkN; + } + lprintf("}"); } static void ProfileSelect(track_p trkN, EPINX_T epN) { - track_p trkP; - EPINX_T epP=-1; - int rc; - - if (log_profile>=1) { - DumpProfElems(); - lprintf(" @ T%d:%d ", GetTrkIndex(trkN), epN); - if (log_profile>=2) { - lprintf("\n"); - } - } - - trkP = GetTrkEndTrk(trkN, epN); - if (trkP) { - epP = GetEndPtConnectedToMe(trkP, trkN); - } - - if (!PathListCheck()) { - return; - } - - if (PathListEmpty()) { - pathStartTrk = trkN; - pathStartEp = epN; - pathEndTrk = trkP; - pathEndEp = epP; - LOG(log_profile, 2, ("Adding first element\n")) - - } else if (PathListSingle() && - ((trkN == pathStartTrk && epN == pathStartEp) || - (trkP && trkP == pathStartTrk && epP == pathStartEp))) { - pathStartTrk = pathEndTrk = NULL; - LOG(log_profile, 2, ("Clearing list\n")) - - } else if ((trkN == pathStartTrk && epN == pathStartEp) || - (trkP && trkP == pathStartTrk && epP == pathStartEp)) { - RemoveTracksFromPath(&pathStartTrk, &pathStartEp, pathEndTrk, pathEndEp); - LOG(log_profile, 2, ("Removing first element\n")) - - } else if ((trkN == pathEndTrk && epN == pathEndEp) || - (trkP && trkP == pathEndTrk && epP == pathEndEp)) { - RemoveTracksFromPath(&pathEndTrk, &pathEndEp, pathStartTrk, pathStartEp); - LOG(log_profile, 2, ("Removing last element\n")) - - } else if ((GetTrkBits(trkN)&TB_PROFILEPATH) || (trkP && - (GetTrkBits(trkP)&TB_PROFILEPATH))) { - ErrorMessage(MSG_EP_ON_PATH); - return; - - } else if ((rc = FindProfileShortestPath(trkN, epN)) > 0) { - if (!(GetTrkBits(trkN)&TB_PROFILEPATH)) { - PASSERT("profileSelect", trkP != NULL, NOP); - trkN = trkP; - epN = epP; - LOG(log_profile, 2, ("Invert selected EP\n")) - } - - switch (profileShortestPathMatch) { - case 1: - /* extend Start */ - pathStartTrk = trkN; - pathStartEp = epN; - LOG(log_profile, 2, ("Prepending Path\n")) - break; - case 2: - /* extend End */ - pathEndTrk = trkN; - pathEndEp = epN; - LOG(log_profile, 2, ("Appending Path\n")) - break; - case 3: - /* need to flip */ - pathStartTrk = pathEndTrk; - pathStartEp = pathEndEp; - pathEndTrk = trkN; - pathEndEp = epN; - LOG(log_profile, 2, ("Flip/Appending Path\n")) - break; - default: - AbortProg("findPaths:1"); - } - - } else { - ErrorMessage(MSG_NO_PATH_TO_EP); - return; - } - - DestroyCopyOfProfileElements(); - ComputeProfElem(); - CreateCopyProfileElements(); - - RedrawProfileW( screenProfileD.d, NULL, 0, 0 ); - DoProfileChangeMode(NULL); - if (log_profile>=1) { - lprintf(" = "); - DumpProfElems(); - lprintf("\n"); - } - PathListCheck(); + track_p trkP; + EPINX_T epP=-1; + int rc; + + if (log_profile>=1) { + DumpProfElems(); + lprintf(" @ T%d:%d ", GetTrkIndex(trkN), epN); + if (log_profile>=2) { + lprintf("\n"); + } + } + + trkP = GetTrkEndTrk(trkN, epN); + if (trkP) { + epP = GetEndPtConnectedToMe(trkP, trkN); + } + + if (!PathListCheck()) { + return; + } + + if (PathListEmpty()) { + pathStartTrk = trkN; + pathStartEp = epN; + pathEndTrk = trkP; + pathEndEp = epP; + LOG(log_profile, 2, ("Adding first element\n")) + + } else if (PathListSingle() && + ((trkN == pathStartTrk && epN == pathStartEp) || + (trkP && trkP == pathStartTrk && epP == pathStartEp))) { + pathStartTrk = pathEndTrk = NULL; + LOG(log_profile, 2, ("Clearing list\n")) + + } else if ((trkN == pathStartTrk && epN == pathStartEp) || + (trkP && trkP == pathStartTrk && epP == pathStartEp)) { + RemoveTracksFromPath(&pathStartTrk, &pathStartEp, pathEndTrk, pathEndEp); + LOG(log_profile, 2, ("Removing first element\n")) + + } else if ((trkN == pathEndTrk && epN == pathEndEp) || + (trkP && trkP == pathEndTrk && epP == pathEndEp)) { + RemoveTracksFromPath(&pathEndTrk, &pathEndEp, pathStartTrk, pathStartEp); + LOG(log_profile, 2, ("Removing last element\n")) + + } else if ((GetTrkBits(trkN)&TB_PROFILEPATH) || (trkP && + (GetTrkBits(trkP)&TB_PROFILEPATH))) { + ErrorMessage(MSG_EP_ON_PATH); + return; + + } else if ((rc = FindProfileShortestPath(trkN, epN)) > 0) { + if (!(GetTrkBits(trkN)&TB_PROFILEPATH)) { + PASSERT("profileSelect", trkP != NULL, NOP); + trkN = trkP; + epN = epP; + LOG(log_profile, 2, ("Invert selected EP\n")) + } + + switch (profileShortestPathMatch) { + case 1: + /* extend Start */ + pathStartTrk = trkN; + pathStartEp = epN; + LOG(log_profile, 2, ("Prepending Path\n")) + break; + case 2: + /* extend End */ + pathEndTrk = trkN; + pathEndEp = epN; + LOG(log_profile, 2, ("Appending Path\n")) + break; + case 3: + /* need to flip */ + pathStartTrk = pathEndTrk; + pathStartEp = pathEndEp; + pathEndTrk = trkN; + pathEndEp = epN; + LOG(log_profile, 2, ("Flip/Appending Path\n")) + break; + default: + CHECK(FALSE); + } + + } else { + ErrorMessage(MSG_NO_PATH_TO_EP); + return; + } + + DestroyCopyOfProfileElements(); + ComputeProfElem(); + CreateCopyProfileElements(); + + RedrawProfileW( screenProfileD.d, NULL, 0, 0 ); + DoProfileChangeMode(NULL); + if (log_profile>=1) { + lprintf(" = "); + DumpProfElems(); + lprintf("\n"); + } + PathListCheck(); } static void ProfileSubCommand(void* pcmd) { - long cmd = VP2L(pcmd); - int mode; - coOrd pos = oldMarker; - DIST_T elev; - DIST_T radius; - - if ((profilePopupTrk = OnTrack(&pos, TRUE, TRUE)) == NULL || - (profilePopupEp = PickEndPoint(pos, profilePopupTrk)) < 0) { - return; - } - if (profileUndo==0) { - profileUndo = TRUE; - UndoStart(_("Profile Command"), "Profile"); - } - radius = 0.05*mainD.scale; - if (radius < trackGauge/2.0) { - radius = trackGauge/2.0; - } - pos = GetTrkEndPos(profilePopupTrk, profilePopupEp); - mode = GetTrkEndElevMode(profilePopupTrk, profilePopupEp); - - elev = 0.0; - switch (cmd) { - case 0: - /* define */ - ComputeElev(profilePopupTrk, profilePopupEp, TRUE, &elev, NULL, TRUE); - mode = ELEV_DEF|ELEV_VISIBLE; - break; - case 1: - /* ignore */ - mode = ELEV_IGNORE|ELEV_VISIBLE; - break; - case 2: - default: - /* none */ - mode = ELEV_NONE; - break; - } - UpdateTrkEndElev(profilePopupTrk, profilePopupEp, mode, elev, NULL); - ComputeProfElem(); - RedrawProfileW( screenProfileD.d, NULL, 0, 0 ); - TempRedraw(); // ProfileSubCommand + long cmd = VP2L(pcmd); + int mode; + coOrd pos = oldMarker; + DIST_T elev; + DIST_T radius; + + if ((profilePopupTrk = OnTrack(&pos, TRUE, TRUE)) == NULL || + (profilePopupEp = PickEndPoint(pos, profilePopupTrk)) < 0) { + return; + } + if (profileUndo==0) { + profileUndo = TRUE; + UndoStart(_("Profile Command"), "Profile"); + } + radius = 0.05*mainD.scale; + if (radius < trackGauge/2.0) { + radius = trackGauge/2.0; + } + pos = GetTrkEndPos(profilePopupTrk, profilePopupEp); + mode = GetTrkEndElevMode(profilePopupTrk, profilePopupEp); + + elev = 0.0; + switch (cmd) { + case 0: + /* define */ + ComputeElev(profilePopupTrk, profilePopupEp, TRUE, &elev, NULL, TRUE); + mode = ELEV_DEF|ELEV_VISIBLE; + break; + case 1: + /* ignore */ + mode = ELEV_IGNORE|ELEV_VISIBLE; + break; + case 2: + default: + /* none */ + mode = ELEV_NONE; + break; + } + UpdateTrkEndElev(profilePopupTrk, profilePopupEp, mode, elev, NULL); + ComputeProfElem(); + RedrawProfileW( screenProfileD.d, NULL, 0, 0 ); + TempRedraw(); // ProfileSubCommand } static STATUS_T CmdProfile(wAction_t action, coOrd pos) { - track_p trk0; - coOrd textsize; - - switch (action) { - case C_START: - if (profileW == NULL) { - profileColorDefinedProfile = drawColorBlue; - profileColorUndefinedProfile = drawColorRed; - profileColorFill = drawColorGrey80; - DrawTextSize(&mainD, "999.9", wStandardFont(F_HELV, FALSE, FALSE), - screenProfileFontSize, FALSE, &textsize); - labelH = textsize.y; - labelW = textsize.x; - profileW = ParamCreateDialog(&profilePG, MakeWindowTitle(_("Profile")), NULL, - NULL, wHide, TRUE, NULL, F_RESIZE, CloseProfileWindow); - } - ParamLoadControls(&profilePG); - ParamGroupRecord(&profilePG); - wShow(profileW); - ParamLoadMessage(&profilePG, I_PROFILEMSG, _("Drag to change Elevation")); - profElem_da.cnt = 0; - station_da.cnt = 0; - RedrawProfileW( screenProfileD.d, NULL, 0, 0 ); - ClrAllTrkBitsRedraw(TB_PROFILEPATH, TRUE); - pathStartTrk = NULL; - SetAllTrackSelect(FALSE); - profileUndo = FALSE; - InfoMessage(_("Select a Defined Elevation to start profile")); - TempRedraw(); // CmdProfile C_START - return C_CONTINUE; - case C_LCLICK: - InfoMessage(""); - if ((trk0 = OnTrack(&pos, TRUE, TRUE)) != NULL) { - EPINX_T ep0; - ep0 = PickEndPoint(pos, trk0); - if (ep0 >= 0) { - ProfileSelect(trk0, ep0); - } - } - return C_CONTINUE; - case C_CMDMENU: - if ((profilePopupTrk = OnTrack(&pos, TRUE, TRUE)) != NULL) { - profilePopupEp = PickEndPoint(pos, profilePopupTrk); - if (profilePopupEp >= 0) { - int mode; - mode = GetTrkEndElevMode(profilePopupTrk, profilePopupEp); - if (mode != ELEV_DEF && mode != ELEV_IGNORE && mode != ELEV_NONE) { - ErrorMessage(MSG_CHANGE_ELEV_MODE); - } else { - wMenuToggleEnable(profilePopupToggles[1], TRUE); - if (OnPath(profilePopupTrk, profilePopupEp) & (ONPATH_END|ONPATH_MID)) { - wMenuToggleEnable(profilePopupToggles[1], FALSE); - } - wMenuToggleSet(profilePopupToggles[0], mode == ELEV_DEF); - wMenuToggleSet(profilePopupToggles[1], mode == ELEV_IGNORE); - wMenuToggleSet(profilePopupToggles[2], mode == ELEV_NONE); - menuPos = pos; - wMenuPopupShow(profilePopupM); - } - } - } - return C_CONTINUE; - case C_OK: - DoProfileDone(NULL); - return C_TERMINATE; - case C_CANCEL: - wHide(profileW); - ClrAllTrkBitsRedraw(TB_PROFILEPATH, TRUE); - return C_TERMINATE; - case C_REDRAW: - if (wWinIsVisible(profileW)) { - HilightProfileElevations(wWinIsVisible(profileW)); - } - return C_CONTINUE; - } - return C_CONTINUE; + track_p trk0; + coOrd textsize; + + switch (action) { + case C_START: + if (profileW == NULL) { + profileColorDefinedProfile = drawColorBlue; + profileColorUndefinedProfile = drawColorRed; + profileColorFill = drawColorGrey80; + DrawTextSize(&mainD, "999.9", wStandardFont(F_HELV, FALSE, FALSE), + screenProfileFontSize, FALSE, &textsize); + labelH = textsize.y; + labelW = textsize.x; + profileW = ParamCreateDialog(&profilePG, MakeWindowTitle(_("Profile")), NULL, + NULL, wHide, TRUE, NULL, F_RESIZE, CloseProfileWindow); + } + ParamLoadControls(&profilePG); + ParamGroupRecord(&profilePG); + wShow(profileW); + ParamLoadMessage(&profilePG, I_PROFILEMSG, _("Drag to change Elevation")); + DYNARR_RESET( profElem_t, profElem_da ); + DYNARR_RESET( station_t, station_da ); + RedrawProfileW( screenProfileD.d, NULL, 0, 0 ); + ClrAllTrkBitsRedraw(TB_PROFILEPATH, TRUE); + pathStartTrk = NULL; + SetAllTrackSelect(FALSE); + profileUndo = FALSE; + InfoMessage(_("Select a Defined Elevation to start profile")); + TempRedraw(); // CmdProfile C_START + return C_CONTINUE; + case C_LCLICK: + InfoMessage(""); + if ((trk0 = OnTrack(&pos, TRUE, TRUE)) != NULL) { + EPINX_T ep0; + ep0 = PickEndPoint(pos, trk0); + if (ep0 >= 0) { + ProfileSelect(trk0, ep0); + } + } + return C_CONTINUE; + case C_CMDMENU: + if ((profilePopupTrk = OnTrack(&pos, TRUE, TRUE)) != NULL) { + profilePopupEp = PickEndPoint(pos, profilePopupTrk); + if (profilePopupEp >= 0) { + int mode; + mode = GetTrkEndElevMode(profilePopupTrk, profilePopupEp); + if (mode != ELEV_DEF && mode != ELEV_IGNORE && mode != ELEV_NONE) { + ErrorMessage(MSG_CHANGE_ELEV_MODE); + } else { + wMenuToggleEnable(profilePopupToggles[1], TRUE); + if (OnPath(profilePopupTrk, profilePopupEp) & (ONPATH_END|ONPATH_MID)) { + wMenuToggleEnable(profilePopupToggles[1], FALSE); + } + wMenuToggleSet(profilePopupToggles[0], mode == ELEV_DEF); + wMenuToggleSet(profilePopupToggles[1], mode == ELEV_IGNORE); + wMenuToggleSet(profilePopupToggles[2], mode == ELEV_NONE); + menuPos = pos; + wMenuPopupShow(profilePopupM); + } + } + } + return C_CONTINUE; + case C_OK: + DoProfileDone(NULL); + return C_TERMINATE; + case C_CANCEL: + wHide(profileW); + ClrAllTrkBitsRedraw(TB_PROFILEPATH, TRUE); + return C_TERMINATE; + case C_REDRAW: + if (wWinIsVisible(profileW)) { + HilightProfileElevations(wWinIsVisible(profileW)); + } + return C_CONTINUE; + } + return C_CONTINUE; } static void ProfileChange(long changes) { - if ((changes & CHANGE_UNITS) && screenProfileD.d) { - RedrawProfileW( screenProfileD.d, NULL, 0, 0 ); - } + if ((changes & CHANGE_UNITS) && screenProfileD.d) { + RedrawProfileW( screenProfileD.d, NULL, 0, 0 ); + } } -#include "bitmaps/profile.xpm" +#include "bitmaps/profile.xpm3" EXPORT void InitCmdProfile(wMenu_p menu) { - log_profile = LogFindIndex("profile"); - ParamRegister(&profilePG); - - AddMenuButton(menu, CmdProfile, "cmdProfile", _("Profile"), - wIconCreatePixMap(profile_xpm[iconSize]), LEVEL0_50, IC_LCLICK|IC_CMDMENU|IC_POPUP3, - ACCL_PROFILE, NULL); - profilePopupM = MenuRegister("Profile Mode"); - profilePopupToggles[0] = wMenuToggleCreate(profilePopupM, "", _("Define"), 0, - FALSE, ProfileSubCommand, I2VP(0)); - profilePopupToggles[1] = wMenuToggleCreate(profilePopupM, "", _("Ignore"), 0, - FALSE, ProfileSubCommand, I2VP(1)); - profilePopupToggles[2] = wMenuToggleCreate(profilePopupM, "", _("None"), 0, - FALSE, ProfileSubCommand, I2VP(2)); - RegisterChangeNotification(ProfileChange); + log_profile = LogFindIndex("profile"); + ParamRegister(&profilePG); + + AddMenuButton(menu, CmdProfile, "cmdProfile", _("Profile"), + wIconCreatePixMap(profile_xpm3[iconSize]), LEVEL0_50, + IC_LCLICK|IC_CMDMENU|IC_POPUP3, + ACCL_PROFILE, NULL); + profilePopupM = MenuRegister("Profile Mode"); + profilePopupToggles[0] = wMenuToggleCreate(profilePopupM, "", _("Define"), 0, + FALSE, ProfileSubCommand, I2VP(0)); + profilePopupToggles[1] = wMenuToggleCreate(profilePopupM, "", _("Ignore"), 0, + FALSE, ProfileSubCommand, I2VP(1)); + profilePopupToggles[2] = wMenuToggleCreate(profilePopupM, "", _("None"), 0, + FALSE, ProfileSubCommand, I2VP(2)); + RegisterChangeNotification(ProfileChange); } diff --git a/app/bin/cpull.c b/app/bin/cpull.c index afdf834..af6642e 100644 --- a/app/bin/cpull.c +++ b/app/bin/cpull.c @@ -17,7 +17,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "cselect.h" @@ -37,22 +37,22 @@ DIST_T littleD = 0.1; static double factorX=10, factorY=100, factorA=0.2; typedef struct { - double X, Y, A, T; - } cost_t; + double X, Y, A, T; +} cost_t; static cost_t sumCosts; static cost_t maxCosts; static int maxCostsInx; typedef struct { - coOrd p[2]; - ANGLE_T a[2]; - ANGLE_T angle; - DIST_T dist; - track_p trk; - EPINX_T ep[2]; - cost_t costs[2]; - double contrib; - coOrd pp; - } section_t, *section_p; + coOrd p[2]; + ANGLE_T a[2]; + ANGLE_T angle; + DIST_T dist; + track_p trk; + EPINX_T ep[2]; + cost_t costs[2]; + double contrib; + coOrd pp; +} section_t, *section_p; static dynArr_t section_da; #define section(N) DYNARR_N( section_t, section_da, N ) static double contribL, contribR; @@ -67,10 +67,10 @@ typedef enum { freeEnd, connectedEnd, loopEnd } ending_e; * Utilities */ static ending_e GetConnectedTracks( - track_p trk, - EPINX_T ep, - track_p endTrk, - EPINX_T endEp ) + track_p trk, + EPINX_T ep, + track_p endTrk, + EPINX_T endEp ) { track_p trk1; EPINX_T ep1, ep2; @@ -81,15 +81,15 @@ static ending_e GetConnectedTracks( trk1 = NULL; } else { ep2 = GetNextTrk( trk, ep, &trk1, &ep1, 0 ); - if (trk1 == NULL) + if (trk1 == NULL) { return freeEnd; + } } if ( ep2 >= 0 ) { int inx; - for (inx=0;inxep[1] = ep2; sp->p[0] = GetTrkEndPos(trk,ep); sp->costs[0].X = sp->costs[0].Y = sp->costs[0].A = sp->costs[0].T = - sp->costs[1].X = sp->costs[1].Y = sp->costs[1].A = sp->costs[1].T =0.0; + sp->costs[1].X = sp->costs[1].Y = sp->costs[1].A = sp->costs[1].T =0.0; sp->a[0] = GetTrkEndAngle(trk,ep); sp->a[1] = 0; - if (ep2 < 0) + if (ep2 < 0) { return connectedEnd; + } sp->p[1] = GetTrkEndPos(trk,ep2); sp->dist = FindDistance( GetTrkEndPos(trk,ep), GetTrkEndPos(trk,ep2) ); sp->angle = NormalizeAngle( GetTrkEndAngle(trk,ep2)-GetTrkEndAngle(trk,ep) ); sp->a[1] = GetTrkEndAngle(trk,ep2); - if (trk == endTrk) + if (trk == endTrk) { return loopEnd; + } trk = trk1; ep = ep1; } @@ -119,10 +121,10 @@ static ending_e GetConnectedTracks( * Simple move to connect */ static void MoveConnectedTracks( - track_p trk1, - EPINX_T ep1, - coOrd pos, - ANGLE_T angle ) + track_p trk1, + EPINX_T ep1, + coOrd pos, + ANGLE_T angle ) { EPINX_T ep, ep2; track_p trk; @@ -140,10 +142,10 @@ static void MoveConnectedTracks( RotateTrack( trk1, pos, a ); DrawNewTrack( trk1 ); ep2 = GetNextTrk( trk1, ep1, &trk, &ep, 0 ); - if (trk==NULL) + if (trk==NULL) { return; - if (ep2 < 0) - AbortProg("MoveConnectedTracks(T%d rooted)", GetTrkIndex(trk1)); + } + CHECKMSG( ep2 >= 0, ("MoveConnectedTracks(T%d rooted)", GetTrkIndex(trk1)) );; angle = NormalizeAngle(GetTrkEndAngle( trk1, ep2 )+180.0); pos = GetTrkEndPos( trk1, ep2 ); trk1 = trk; @@ -156,7 +158,7 @@ static void MoveConnectedTracks( * Helpers for complex case */ static void ReverseSectionList( - int start, int end ) + int start, int end ) { int up, down; section_t tmpUp, tmpDown; @@ -200,25 +202,28 @@ static int CheckConnections( void ) sp = §ion(inx); dist = FindDistance( sp[0].p[0], sp[-1].p[1] ); angle = NormalizeAngle( sp[0].a[0] - sp[-1].a[1] + 180.0 + connectAngle/2 ); - if (dist > connectDistance) + if (dist > connectDistance) { rc |= DIST_FAULT; - if (angle > connectAngle) + } + if (angle > connectAngle) { rc |= ANGLE_FAULT; + } } return rc; } static void ComputeCost( - coOrd p, - ANGLE_T a, - section_p sp ) + coOrd p, + ANGLE_T a, + section_p sp ) { ANGLE_T da; coOrd pp; da = NormalizeAngle( sp->a[0]+180.0-a ); - if (da>180) + if (da>180) { da = 360.0-a; + } sp->costs[0].A = da*factorA; pp = sp->p[0]; Rotate( &pp, p, -a ); @@ -226,8 +231,9 @@ static void ComputeCost( pp.y -= p.y; sp->costs[0].X = fabs(pp.y*factorX); sp->costs[0].Y = fabs(pp.x*factorY); - if ( pp.x < -0.010 ) + if ( pp.x < -0.010 ) { sp->costs[0].X *= 100; + } sp->costs[0].T = sp->costs[0].X+sp->costs[0].Y; } @@ -242,9 +248,9 @@ static void ComputeCosts( void ) for (inx=1; inxcosts[0].X, sp->costs[0].Y, sp->costs[0].A, sp->costs[0].T );*/ -} + if (debugPull) { + /*printf("%2d: X=%0.3f Y=%0.3f A=%0.3f T=%0.3f\n", inx, sp->costs[0].X, sp->costs[0].Y, sp->costs[0].A, sp->costs[0].T );*/ + } sumCosts.A += sp->costs[0].A; sumCosts.X += sp->costs[0].X; sumCosts.Y += sp->costs[0].Y; @@ -261,11 +267,11 @@ if (debugPull) { static double ComputeContrib( - DIST_T dist, - ANGLE_T angle, - int start, - int end, - EPINX_T ep ) + DIST_T dist, + ANGLE_T angle, + int start, + int end, + EPINX_T ep ) { int inx; section_p sp; @@ -292,27 +298,30 @@ static void ComputeContribs( coOrd *rp1 ) Rotate( &p1, p0, -sp[0].a[0] ); p1.x -= p0.x; p1.y -= p0.y; - if (sp->costs[0].X > 0.000001 && sp->costs[0].X > aveX) + if (sp->costs[0].X > 0.000001 && sp->costs[0].X > aveX) { p1.y *= 1-aveX/sp->costs[0].X; - else + } else { p1.y = 0.0; - if (sp->costs[0].Y > 0.000001 && sp->costs[0].Y > aveY) + } + if (sp->costs[0].Y > 0.000001 && sp->costs[0].Y > aveY) { p1.x *= 1-aveY/sp->costs[0].Y; - else + } else { p1.x = 0.0; + } Rotate( &p1, zero, sp[0].a[0] ); dist = FindDistance( zero, p1 ); angle = FindAngle( zero, p1 ); - contribL = ComputeContrib( dist, NormalizeAngle(angle+180.0), 1, maxCostsInx-1, 0 ); + contribL = ComputeContrib( dist, NormalizeAngle(angle+180.0), 1, maxCostsInx-1, + 0 ); contribR = ComputeContrib( dist, angle, maxCostsInx, section_da.cnt-2, 1 ); if (debugPull) { printf( "Minx=%d D=%0.3f A=%0.3f X=%0.3f Y=%0.3f L=%0.3f R=%0.3f\n", - maxCostsInx, dist, angle, p1.x, p1.y, contribL, contribR ); + maxCostsInx, dist, angle, p1.x, p1.y, contribL, contribR ); sp = §ion(0); printf( " 0[%d] [%0.3f %0.3f] [%0.3f %0.3f]\n", - GetTrkIndex(sp->trk), - sp[0].p[0].x, sp[0].p[0].y, sp[0].p[1].x, sp[0].p[1].y ); + GetTrkIndex(sp->trk), + sp[0].p[0].x, sp[0].p[0].y, sp[0].p[1].x, sp[0].p[1].y ); } *rp1 = p1; } @@ -322,8 +331,8 @@ static void ComputeContribs( coOrd *rp1 ) * Shufflers */ static void AdjustSection( - section_p sp, - coOrd amount ) + section_p sp, + coOrd amount ) { sp->p[0].x += amount.x; sp->p[0].y += amount.y; @@ -368,13 +377,16 @@ static void DumpSections( void ) sp = §ion(inx); dist = FindDistance( sp[0].p[0], sp[-1].p[1] ); printf( "%2d[%d] X%0.3f Y%0.3f A%0.3f T%0.3f C%0.3f x%0.3f y%0.3f [%0.3f %0.3f] [%0.3f %0.3f] dd%0.3f da%0.3f\n", - inx, GetTrkIndex(sp->trk), sp->costs[0].X, sp->costs[0].Y, sp->costs[0].A, sp->costs[0].T, - sp->contrib, sp->pp.x, sp->pp.y, - sp[0].p[0].x, sp[0].p[0].y, sp[0].p[1].x, sp[0].p[1].y, - dist, - (dist>0.001)?NormalizeAngle( FindAngle( sp[0].p[0], sp[-1].p[1] ) - sp[0].a[0] ):0.0 ); + inx, GetTrkIndex(sp->trk), sp->costs[0].X, sp->costs[0].Y, sp->costs[0].A, + sp->costs[0].T, + sp->contrib, sp->pp.x, sp->pp.y, + sp[0].p[0].x, sp[0].p[0].y, sp[0].p[1].x, sp[0].p[1].y, + dist, + (dist>0.001)?NormalizeAngle( FindAngle( sp[0].p[0], + sp[-1].p[1] ) - sp[0].a[0] ):0.0 ); } - printf("== X%0.3f Y%0.3f A%0.3f T%0.3f\n", sumCosts.X, sumCosts.Y, sumCosts.A, sumCosts.T ); + printf("== X%0.3f Y%0.3f A%0.3f T%0.3f\n", sumCosts.X, sumCosts.Y, sumCosts.A, + sumCosts.T ); } @@ -387,22 +399,28 @@ static int MinimizeCosts( void ) int inx; int rc = 0; coOrd p1; - if (section_da.cnt <= 0) + if (section_da.cnt <= 0) { return FALSE; + } for (inx=0; inxtrk, sp->ep[0] ); amount.x = sp->p[0].x-oldPos.x; amount.y = sp->p[0].y-oldPos.y; -if (debugPull) { -printf("%2d: X%0.3f Y%0.3f\n", inx, amount.x, amount.y ); -} + if (debugPull) { + printf("%2d: X%0.3f Y%0.3f\n", inx, amount.x, amount.y ); + } if (fabs(amount.x)>0.001 || fabs(amount.y)>0.001) { UndrawNewTrack( sp->trk ); UndoModify( sp->trk ); @@ -438,10 +456,10 @@ printf("%2d: X%0.3f Y%0.3f\n", inx, amount.x, amount.y ); static void PullTracks( - track_p trk1, - EPINX_T ep1, - track_p trk2, - EPINX_T ep2 ) + track_p trk1, + EPINX_T ep1, + track_p trk2, + EPINX_T ep2 ) { ending_e e1, e2; DIST_T d; @@ -449,7 +467,8 @@ static void PullTracks( coOrd p1, p2; ANGLE_T a1, a2; coOrd p; - int cnt1, cnt2; + int cnt1; +// int cnt2; int rc; if (QueryTrack(trk1,Q_CAN_ADD_ENDPOINTS)) { @@ -460,13 +479,15 @@ static void PullTracks( return; } - if (ep1<0 || ep2<0 ) return; + if (ep1<0 || ep2<0 ) { return; } - if (ConnectAbuttingTracks( trk1, ep1, trk2, ep2 )) + if (ConnectAbuttingTracks( trk1, ep1, trk2, ep2 )) { return; + } - if (ConnectAdjustableTracks( trk1, ep1, trk2, ep2 )) + if (ConnectAdjustableTracks( trk1, ep1, trk2, ep2 )) { return; + } p1 = GetTrkEndPos( trk1, ep1 ); @@ -479,23 +500,25 @@ static void PullTracks( ErrorMessage( MSG_TOO_FAR_APART_DIVERGE ); return; } - UndoStart( _("Pull Tracks"), "PullTracks(T%d[%d] T%d[%d] D%0.3f A%0.3F )", GetTrkIndex(trk1), ep1, GetTrkIndex(trk2), ep2, d, a ); - + UndoStart( _("Pull Tracks"), "PullTracks(T%d[%d] T%d[%d] D%0.3f A%0.3F )", + GetTrkIndex(trk1), ep1, GetTrkIndex(trk2), ep2, d, a ); + DYNARR_RESET( section_t, section_da ); e1 = e2 = GetConnectedTracks( trk1, ep1, trk2, ep2 ); cnt1 = section_da.cnt; if ( e1 != loopEnd ) { e2 = GetConnectedTracks( trk2, ep2, trk1, ep1 ); - } - cnt2 = section_da.cnt - cnt1; + } +// cnt2 = section_da.cnt - cnt1; if ( e1 == freeEnd && e2 == freeEnd ) { p.x = (p1.x+p2.x)/2.0; p.y = (p1.y+p2.y)/2.0; a = NormalizeAngle( (a1-(a2+180.0)) ); - if ( a < 180.0 ) + if ( a < 180.0 ) { a = NormalizeAngle(a1 + a/2.0); - else + } else { a = NormalizeAngle(a1 - (360-a)/2.0); + } MoveConnectedTracks( trk1, ep1, p, a ); MoveConnectedTracks( trk2, ep2, p, a+180.0 ); } else if ( e1 == freeEnd ) { @@ -545,8 +568,8 @@ static void PullTracks( */ static void TightenTracks( - track_p trk, - EPINX_T ep ) + track_p trk, + EPINX_T ep ) { track_p trk1; EPINX_T ep1, ep2; @@ -559,8 +582,9 @@ static void TightenTracks( ep = ep1; } trk1 = GetTrkEndTrk( trk, ep ); - if (trk1 == NULL) + if (trk1 == NULL) { return; + } ep1 = GetEndPtConnectedToMe( trk1, trk ); cnt = 0; while(1) { @@ -571,9 +595,9 @@ static void TightenTracks( p1.x = p0.x - p1.x; p1.y = p0.y - p1.y; a1 = NormalizeAngle( a0-a1 ); -if (debugPull) { -printf("T%d [%0.3f %0.3f %0.3f]\n", GetTrkIndex(trk1), p1.x, p1.y, a1 ); -} + if (debugPull) { + printf("T%d [%0.3f %0.3f %0.3f]\n", GetTrkIndex(trk1), p1.x, p1.y, a1 ); + } if ( FindDistance( zero, p1 ) > 0.001 || ( a1 > 0.05 && a1 < 365.95 ) ) { UndrawNewTrack( trk1 ); UndoModify( trk1 ); @@ -584,15 +608,16 @@ printf("T%d [%0.3f %0.3f %0.3f]\n", GetTrkIndex(trk1), p1.x, p1.y, a1 ); } trk = trk1; ep = GetNextTrk( trk, ep1, &trk1, &ep1, 0 ); - if (trk1 == NULL) + if (trk1 == NULL) { break; - if (ep<0) - AbortProg( "tightenTracks: can't happen" ); + } + CHECK(ep>=0); } InfoMessage( _("%d tracks moved"), cnt ); } -static void CreateConnectAnchor(EPINX_T ep, track_p t, BOOL_T shift) { +static void CreateConnectAnchor(EPINX_T ep, track_p t, BOOL_T shift) +{ coOrd pos = GetTrkEndPos(t,ep); DIST_T d = tempD.scale*0.15; DIST_T w = tempD.scale/tempD.dpi*4; @@ -606,7 +631,7 @@ static void CreateConnectAnchor(EPINX_T ep, track_p t, BOOL_T shift) { anchors(i).u.l.pos[0] = pos; Translate(&anchors(i).u.l.pos[1],pos,a+90,-GetTrkGauge(t)); Translate(&anchors(i).u.l.pos[1],anchors(i).u.l.pos[1],a,-d); - anchors(i).width = w; + anchors(i).lineWidth = w; DYNARR_APPEND(trkSeg_t,anchors_da,1); i = anchors_da.cnt-1; anchors(i).type = SEG_STRLIN; @@ -614,7 +639,7 @@ static void CreateConnectAnchor(EPINX_T ep, track_p t, BOOL_T shift) { anchors(i).u.l.pos[0] = pos; Translate(&anchors(i).u.l.pos[1],pos,a+90,GetTrkGauge(t)); Translate(&anchors(i).u.l.pos[1],anchors(i).u.l.pos[1],a,-d); - anchors(i).width = w; + anchors(i).lineWidth = w; } else { DYNARR_APPEND(trkSeg_t,anchors_da,1); i = anchors_da.cnt-1; @@ -624,7 +649,7 @@ static void CreateConnectAnchor(EPINX_T ep, track_p t, BOOL_T shift) { Translate(&anchors(i).u.l.pos[0],anchors(i).u.l.pos[0],a,d); Translate(&anchors(i).u.l.pos[1],pos,a+90,-GetTrkGauge(t)); Translate(&anchors(i).u.l.pos[1],anchors(i).u.l.pos[1],a,-d); - anchors(i).width = w; + anchors(i).lineWidth = w; DYNARR_APPEND(trkSeg_t,anchors_da,1); i = anchors_da.cnt-1; anchors(i).type = SEG_STRLIN; @@ -633,24 +658,28 @@ static void CreateConnectAnchor(EPINX_T ep, track_p t, BOOL_T shift) { Translate(&anchors(i).u.l.pos[0],anchors(i).u.l.pos[0],a,-d); Translate(&anchors(i).u.l.pos[1],pos,a+90,-GetTrkGauge(t)); Translate(&anchors(i).u.l.pos[1],anchors(i).u.l.pos[1],a,d); - anchors(i).width = w; + anchors(i).lineWidth = w; } } -STATUS_T ConnectMultiple() { +STATUS_T ConnectMultiple() +{ int countTracksR0 =0,countTracksR1 =0, possibleEndPoints =0; if (selectedTrackCount==0) { - ErrorMessage(_("Connect Multiple Tracks - Select multiple tracks to join first")); + ErrorMessage( + _("Connect Multiple Tracks - Select multiple tracks to join first")); return C_CONTINUE; } - if (NoticeMessage(_("Try to Connect all Selected Tracks?"), _("Yes"), _("No"))<=0) return C_CONTINUE; + if (NoticeMessage(_("Try to Connect all Selected Tracks?"), _("Yes"), + _("No"))<=0) { return C_CONTINUE; } track_p trk1 = NULL; track_p trk2 = NULL; EPINX_T ep1,ep2; ANGLE_T a; DIST_T d; UndoStart( _("ReConnect"),"Try to reconnect all selected tracks"); - for (int i=0;i<2;i++) { // Try twice - in case later joins help earlier ones and to try close ones first + for (int i=0; i<2; + i++) { // Try twice - in case later joins help earlier ones and to try close ones first while ( TrackIterate( &trk1 ) ) { BOOL_T found = FALSE; if ( GetTrkSelected( trk1 ) ) { @@ -658,42 +687,46 @@ STATUS_T ConnectMultiple() { if (!GetTrkEndTrk( trk1, ep1 )) { trk2 = NULL; while (!found && TrackIterate(&trk2) ) { - if (trk1 == trk2) continue; + if (trk1 == trk2) { continue; } for (ep2=0; ep20 && (d<3.0 && a<7.5))) { // Match PullTracks criteria in round 2 + (i>0 && (d<3.0 && a<7.5))) { // Match PullTracks criteria in round 2 PullTracks(trk1,ep1,trk2,ep2); if (GetTrkEndTrk( trk2, ep2 )) { found = TRUE; - if (i==0) + if (i==0) { countTracksR0++; - else + } else { countTracksR1++; + } break; //Stop looking - } else if (i==1) possibleEndPoints++; + } else if (i==1) { possibleEndPoints++; } } } } - if (found) break; //Next EndPoint + if (found) { break; } //Next EndPoint } } } } } UndoEnd(); - NoticeMessage(_("Round 1 %d and Round 2 %d tracks connected, %d close pairs of end Points were not connected"), _("Ok"), NULL, countTracksR0, countTracksR1, possibleEndPoints); + NoticeMessage( + _("Round 1 %d and Round 2 %d tracks connected, %d close pairs of end Points were not connected"), + _("Ok"), NULL, countTracksR0, countTracksR1, possibleEndPoints); return C_TERMINATE; } static wMenu_p pullPopupM; static STATUS_T CmdPull( - wAction_t action, - coOrd pos ) + wAction_t action, + coOrd pos ) { static track_p trk1, t1, t2; @@ -703,16 +736,19 @@ static STATUS_T CmdPull( EPINX_T ep2; static BOOL_T turntable; - int countTracksR0 = 0, countTracksR1 = 0, possibleEndPoints = 0; - BOOL_T found = FALSE; +// int countTracksR0 = 0, countTracksR1 = 0, possibleEndPoints = 0; +// BOOL_T found = FALSE; switch (action&0xFF) { case C_START: - if (selectedTrackCount==0) - InfoMessage( _("Select first endpoint or turntable to connect, +Shift to tighten") ); - else - InfoMessage( _("Select first endpoint to connect, or Right-Click for connecting selected tracks (not turntable)") ); + if (selectedTrackCount==0) { + InfoMessage( + _("Select first endpoint or turntable to connect, +Shift to tighten") ); + } else { + InfoMessage( + _("Select first endpoint to connect, or Right-Click for connecting selected tracks (not turntable)") ); + } trk1 = NULL; turntable = FALSE; t1 = t2 = NULL; @@ -728,35 +764,39 @@ static STATUS_T CmdPull( if (QueryTrack(t1, Q_CAN_ADD_ENDPOINTS)) { DrawTrack(t1,&mainD,wDrawColorBlue); t_turn1 = TRUE; - } else t1 = NULL; + } else { t1 = NULL; } } - if (t1 && t_ep1 >=0) + if (t1 && t_ep1 >=0) { CreateConnectAnchor(t_ep1,t1,FALSE); + } } } else { if (t1 != NULL) { - if (t_turn1) DrawTrack(t1,&mainD,wDrawColorBlue); - else CreateConnectAnchor(t_ep1,t1,FALSE); + if (t_turn1) { DrawTrack(t1,&mainD,wDrawColorBlue); } + else { CreateConnectAnchor(t_ep1,t1,FALSE); } } if ((t2= OnTrackIgnore( &pos, FALSE, TRUE, t1 )) != NULL) { if ((t_ep2 = PickUnconnectedEndPointSilent( pos, t2 )) < 0) { if (QueryTrack(t2, Q_CAN_ADD_ENDPOINTS)) { DrawTrack(t2,&mainD,wDrawColorBlue); t_turn2 = TRUE; - } else t2 = NULL; + } else { t2 = NULL; } } - if (t2 && t_ep2 >=0) + if (t2 && t_ep2 >=0) { CreateConnectAnchor(t_ep2,t2,FALSE); + } } } } else { //Shift, tighten t1 = OnTrack( &pos, FALSE, TRUE ); - if (t1 == NULL) + if (t1 == NULL) { return C_CONTINUE; + } t_ep1 = PickUnconnectedEndPointSilent( pos, t1 ); - if ( t_ep1 < 0 ) + if ( t_ep1 < 0 ) { return C_CONTINUE; + } CreateConnectAnchor(t_ep1,t1,TRUE); } break; @@ -769,7 +809,7 @@ static STATUS_T CmdPull( if (QueryTrack(trk1, Q_CAN_ADD_ENDPOINTS)) { turntable = TRUE; ep1 = -1; - } else trk1 = NULL; + } else { trk1 = NULL; } } else { InfoMessage( _("Select second endpoint or turntable to connect") ); } @@ -787,7 +827,8 @@ static STATUS_T CmdPull( inError = TRUE; return C_TERMINATE; } - if (!turntable && QueryTrack(trk2, Q_CAN_ADD_ENDPOINTS)) { /*Second end a turntable */ + if (!turntable + && QueryTrack(trk2, Q_CAN_ADD_ENDPOINTS)) { /*Second end a turntable */ ep2 = -1; turntable = TRUE; PullTracks( trk2, ep2, trk1, ep1); @@ -800,11 +841,13 @@ static STATUS_T CmdPull( } } else { trk1 = OnTrack( &pos, TRUE, TRUE ); - if (trk1 == NULL) + if (trk1 == NULL) { return C_CONTINUE; + } ep1 = PickUnconnectedEndPoint( pos, trk1 ); - if ( ep1 < 0 ) + if ( ep1 < 0 ) { return C_CONTINUE; + } TightenTracks( trk1, ep1 ); trk1 = NULL; inError = TRUE; @@ -815,12 +858,14 @@ static STATUS_T CmdPull( case C_REDRAW: DrawHighlightBoxes(FALSE,FALSE,NULL); HighlightSelectedTracks(NULL, TRUE, TRUE); - if (anchors_da.cnt) - DrawSegs( &tempD, zero, 0.0, &anchors(0), anchors_da.cnt, trackGauge, wDrawColorBlack ); - if (t1 && t_turn1) - DrawTrack(t1,&tempD,wDrawColorBlue); - if (t2 && t_turn2) - DrawTrack(t2,&tempD,wDrawColorBlue); + DrawSegsDA( &tempD, NULL, zero, 0.0, &anchors_da, trackGauge, wDrawColorBlack, + 0 ); + if (t1 && t_turn1) { + DrawTrack(t1,&tempD,wDrawColorBlue); + } + if (t2 && t_turn2) { + DrawTrack(t2,&tempD,wDrawColorBlue); + } return C_CONTINUE; case C_TEXT: @@ -855,7 +900,7 @@ static STATUS_T CmdPull( -#include "bitmaps/connect.xpm" +#include "bitmaps/connect.xpm3" wMenuPush_p pullConnectMultiple; @@ -870,7 +915,11 @@ void pullMenuEnter( void * keyVP ) void InitCmdPull( wMenu_p menu ) { - AddMenuButton( menu, CmdPull, "cmdConnect", _("Connect Two Tracks"), wIconCreatePixMap(connect_xpm[iconSize]), LEVEL0_50, IC_STICKY|IC_INITNOTSTICKY|IC_LCLICK|IC_POPUP3|IC_CMDMENU|IC_WANT_MOVE, ACCL_CONNECT, NULL ); + AddMenuButton( menu, CmdPull, "cmdConnect", _("Connect Two Tracks"), + wIconCreatePixMap(connect_xpm3[iconSize]), LEVEL0_50, + IC_STICKY|IC_INITNOTSTICKY|IC_LCLICK|IC_POPUP3|IC_CMDMENU|IC_WANT_MOVE, + ACCL_CONNECT, NULL ); pullPopupM = MenuRegister( "Connect Options" ); - pullConnectMultiple = wMenuPushCreate( pullPopupM, "", _("Connect All Selected - 'S'"), 0, pullMenuEnter, I2VP('S') ); + pullConnectMultiple = wMenuPushCreate( pullPopupM, "", + _("Connect All Selected - 'S'"), 0, pullMenuEnter, I2VP('S') ); } diff --git a/app/bin/cruler.c b/app/bin/cruler.c index eb6a77d..1ab65b2 100644 --- a/app/bin/cruler.c +++ b/app/bin/cruler.c @@ -17,7 +17,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "cundo.h" @@ -34,21 +34,22 @@ static struct { - STATE_T state; - coOrd pos0; - coOrd pos1; - coOrd pos2; - BOOL_T isClose; - int modifyingEnd; - } An = { AN_OFF, { 0,0 }, { 0,0 } }; + STATE_T state; + coOrd pos0; + coOrd pos1; + coOrd pos2; + BOOL_T isClose; + int modifyingEnd; +} An = { AN_OFF, { 0,0 }, { 0,0 } }; -void DrawAngle(drawCmd_p d, coOrd p0, coOrd p1, coOrd p2, wDrawColor color) { +void DrawAngle(drawCmd_p d, coOrd p0, coOrd p1, coOrd p2, wDrawColor color) +{ char msg[512]; trkSeg_t seg; if ((An.state != AN_OFF) && !IsClose(FindDistance(p0,p1))) { seg.type = SEG_STRLIN; - seg.width = 0; + seg.lineWidth = 0; seg.color = wDrawColorBlack; seg.u.l.pos[0] = p0; seg.u.l.pos[1] = p1; @@ -56,7 +57,7 @@ void DrawAngle(drawCmd_p d, coOrd p0, coOrd p1, coOrd p2, wDrawColor color) { if (!(IsClose(FindDistance(p0,p2)))) { seg.type = SEG_STRLIN; - seg.width = 0; + seg.lineWidth = 0; seg.color = wDrawColorBlack; seg.u.l.pos[0] = p0; seg.u.l.pos[1] = p2; @@ -66,10 +67,11 @@ void DrawAngle(drawCmd_p d, coOrd p0, coOrd p1, coOrd p2, wDrawColor color) { ANGLE_T a = DifferenceBetweenAngles(FindAngle(p0,p1),FindAngle(p0,p2)); ANGLE_T a0; - if (a>=0) + if (a>=0) { a0 = FindAngle(p0,p1); - else + } else { a0 = FindAngle(p0,p2); + } ANGLE_T a1 = fabs(DifferenceBetweenAngles(FindAngle(p0,p1),FindAngle(p0,p2))); seg.type = SEG_CRVLIN; seg.u.c.center = p0; @@ -124,8 +126,8 @@ static STATUS_T CmdAngle( wAction_t action, coOrd pos ) case AN_FIRST: An.pos2 = pos; An.state = AN_SECOND; - InfoMessage( "Drag Angle" ); - break; + InfoMessage( "Drag Angle" ); + break; } return C_CONTINUE; @@ -133,8 +135,8 @@ static STATUS_T CmdAngle( wAction_t action, coOrd pos ) //Lock to 90 degrees with CTRL if (MyGetKeyState()&WKEY_CTRL) { ANGLE_T line_angle; - if (An.state == AN_FIRST) line_angle = 0.0; - else line_angle = FindAngle(An.pos0,An.pos1); + if (An.state == AN_FIRST) { line_angle = 0.0; } + else { line_angle = FindAngle(An.pos0,An.pos1); } DIST_T l = FindDistance(An.pos0, pos); if (!IsClose(l)) { ANGLE_T angle2 = NormalizeAngle(FindAngle(An.pos0, pos)-line_angle); @@ -144,23 +146,26 @@ static STATUS_T CmdAngle( wAction_t action, coOrd pos ) } } switch (An.state) { - case AN_FIRST: - An.pos1 = An.pos2 = pos; - break; - case AN_SECOND: - An.pos2 = pos; - break; - default:; + case AN_FIRST: + An.pos1 = An.pos2 = pos; + break; + case AN_SECOND: + An.pos2 = pos; + break; + default:; } - if (An.state == AN_FIRST) + if (An.state == AN_FIRST) { InfoMessage( "Base Angle %0.3f",FindAngle(An.pos0,An.pos1)); + } if (An.state == AN_SECOND) - InfoMessage( "Base Angle %0.3f, Relative Angle %0.3f",FindAngle(An.pos0,An.pos1), - fabs(DifferenceBetweenAngles(FindAngle(An.pos0,An.pos1),FindAngle(An.pos0,An.pos2)))); + InfoMessage( "Base Angle %0.3f, Relative Angle %0.3f",FindAngle(An.pos0, + An.pos1), + fabs(DifferenceBetweenAngles(FindAngle(An.pos0,An.pos1),FindAngle(An.pos0, + An.pos2)))); return C_CONTINUE; case C_UP: - if (An.state == AN_SECOND) return C_TERMINATE; + if (An.state == AN_SECOND) { return C_TERMINATE; } return C_CONTINUE; case C_REDRAW: @@ -182,23 +187,25 @@ static STATUS_T CmdAngle( wAction_t action, coOrd pos ) } STATUS_T ModifyProtractor( - wAction_t action, - coOrd pos ) + wAction_t action, + coOrd pos ) { switch (action&0xFF) { case C_DOWN: An.modifyingEnd = -1; An.isClose = FALSE; - if ( An.state == AN_OFF ) + if ( An.state == AN_OFF ) { return C_ERROR; + } if ( IsClose(FindDistance( pos, An.pos0 ))) { An.modifyingEnd = 0; } else if ( IsClose(FindDistance( pos, An.pos1 ))) { An.modifyingEnd = 1; } else if ( IsClose(FindDistance( pos, An.pos2 ))) { An.modifyingEnd = 2; - } else + } else { return C_ERROR; + } break; case C_MOVE: if ( An.modifyingEnd == 0 ) { @@ -208,21 +215,25 @@ STATUS_T ModifyProtractor( } else if (An.modifyingEnd == 2) { An.pos2 = pos; } - InfoMessage( "Base Angle %0.3f, Relative Angle %0.3f",FindAngle(An.pos0,An.pos1), - fabs(DifferenceBetweenAngles(FindAngle(An.pos0,An.pos1),FindAngle(An.pos0,An.pos2)))); + InfoMessage( "Base Angle %0.3f, Relative Angle %0.3f",FindAngle(An.pos0, + An.pos1), + fabs(DifferenceBetweenAngles(FindAngle(An.pos0,An.pos1),FindAngle(An.pos0, + An.pos2)))); return C_CONTINUE; case C_UP: return C_CONTINUE; case C_REDRAW: - DrawAngle( &tempD, An.pos0, An.pos1, An.pos2, An.isClose?wDrawColorBlue:wDrawColorBlack ); + DrawAngle( &tempD, An.pos0, An.pos1, An.pos2, + An.isClose?wDrawColorBlue:wDrawColorBlack ); break; case wActionMove: if ( IsClose(FindDistance( pos, An.pos0 )) || - IsClose(FindDistance( pos, An.pos1 )) || - IsClose(FindDistance( pos, An.pos2 )) ) { + IsClose(FindDistance( pos, An.pos1 )) || + IsClose(FindDistance( pos, An.pos2 )) ) { An.isClose = TRUE; - } else + } else { An.isClose = FALSE; + } break; default: return C_ERROR; @@ -246,25 +257,29 @@ STATUS_T ModifyProtractor( #define DR_ON (1) static struct { - STATE_T state; - coOrd pos0; - coOrd pos1; - BOOL_T isClose; - int modifyingEnd; - } Dr = { DR_OFF, { 0,0 }, { 0,0 } }; + STATE_T state; + coOrd pos0; + coOrd pos1; + BOOL_T isClose; + int modifyingEnd; +} Dr = { DR_OFF, { 0,0 }, { 0,0 } }; void RulerRedraw( BOOL_T demo ) { - if (programMode == MODE_TRAIN) return; - if (Dr.state == DR_ON) - DrawRuler( &tempD, Dr.pos0, Dr.pos1, 0.0, TRUE, TRUE, Dr.isClose?wDrawColorBlue:wDrawColorBlack ); + if (programMode == MODE_TRAIN) { return; } + if (Dr.state == DR_ON) { + DrawRuler( &tempD, Dr.pos0, Dr.pos1, 0.0, TRUE, TRUE, + Dr.isClose?wDrawColorBlue:wDrawColorBlack ); + } if (demo) { Dr.state = DR_OFF; An.state = AN_OFF; } - if (An.state != AN_OFF) - DrawAngle( &tempD, An.pos0, An.pos1, An.pos2, An.isClose?wDrawColorBlue:wDrawColorBlack); + if (An.state != AN_OFF) { + DrawAngle( &tempD, An.pos0, An.pos1, An.pos2, + An.isClose?wDrawColorBlue:wDrawColorBlack); + } } @@ -304,7 +319,8 @@ static STATUS_T CmdRuler( wAction_t action, coOrd pos ) DrawHighlightBoxes(FALSE,FALSE,NULL); HighlightSelectedTracks(NULL, TRUE, TRUE); if (Dr.state == DR_ON) { - DrawRuler( &tempD, Dr.pos0, Dr.pos1, 0.0, TRUE, TRUE, Dr.isClose?wDrawColorBlue:wDrawColorBlack ); + DrawRuler( &tempD, Dr.pos0, Dr.pos1, 0.0, TRUE, TRUE, + Dr.isClose?wDrawColorBlue:wDrawColorBlack ); } return C_CONTINUE; @@ -318,14 +334,15 @@ static STATUS_T CmdRuler( wAction_t action, coOrd pos ) STATUS_T ModifyRuler( - wAction_t action, - coOrd pos ) + wAction_t action, + coOrd pos ) { switch (action&0xFF) { case C_DOWN: Dr.modifyingEnd = -1; - if ( Dr.state != DR_ON ) + if ( Dr.state != DR_ON ) { return C_ERROR; + } if ( IsClose(FindDistance( pos, Dr.pos0 ))) { Dr.modifyingEnd = 0; } else if ( IsClose(FindDistance( pos, Dr.pos1 ))) { @@ -339,17 +356,18 @@ STATUS_T ModifyRuler( Dr.pos0 = pos; } else if ( Dr.modifyingEnd == 1) { Dr.pos1 = pos; - } else return C_ERROR; + } else { return C_ERROR; } InfoMessage( "%s", FormatDistance( FindDistance( Dr.pos0, Dr.pos1 ) ) ); return C_CONTINUE; case C_UP: return C_CONTINUE; case C_REDRAW: - DrawRuler( &tempD, Dr.pos0, Dr.pos1, 0.0, TRUE, TRUE, Dr.isClose?wDrawColorBlue:wDrawColorBlack ); + DrawRuler( &tempD, Dr.pos0, Dr.pos1, 0.0, TRUE, TRUE, + Dr.isClose?wDrawColorBlue:wDrawColorBlack ); break; case wActionMove: if ( IsClose(FindDistance( pos, Dr.pos0 )) || - IsClose(FindDistance( pos, Dr.pos1 ))) { + IsClose(FindDistance( pos, Dr.pos1 ))) { Dr.isClose = TRUE; An.isClose = FALSE; } else { @@ -364,13 +382,17 @@ STATUS_T ModifyRuler( } -#include "bitmaps/ruler.xpm" -#include "bitmaps/protractor.xpm" +#include "bitmaps/ruler.xpm3" +#include "bitmaps/protractor.xpm3" void InitCmdRuler( wMenu_p menu ) { ButtonGroupBegin( _("Measurement"), "cmdMeasureSetCmd", _("Measurement") ); - AddMenuButton( menu, CmdRuler, "cmdRuler", _("Ruler"), wIconCreatePixMap(ruler_xpm[iconSize]), LEVEL0, IC_STICKY|IC_POPUP|IC_NORESTART, ACCL_RULER, NULL ); - AddMenuButton( menu, CmdAngle, "cmdAngle", _("Protractor"), wIconCreatePixMap(protractor_xpm[iconSize]), LEVEL0, IC_STICKY|IC_POPUP|IC_NORESTART, ACCL_ANGLE, NULL ); + AddMenuButton( menu, CmdRuler, "cmdRuler", _("Ruler"), + wIconCreatePixMap(ruler_xpm3[iconSize]), LEVEL0, + IC_STICKY|IC_POPUP|IC_NORESTART, ACCL_RULER, NULL ); + AddMenuButton( menu, CmdAngle, "cmdAngle", _("Protractor"), + wIconCreatePixMap(protractor_xpm3[iconSize]), LEVEL0, + IC_STICKY|IC_POPUP|IC_NORESTART, ACCL_ANGLE, NULL ); ButtonGroupEnd(); } diff --git a/app/bin/cselect.c b/app/bin/cselect.c index 1b153b9..a1158bc 100644 --- a/app/bin/cselect.c +++ b/app/bin/cselect.c @@ -17,7 +17,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "common.h" @@ -37,8 +37,8 @@ #include "cjoin.h" #include "draw.h" #include "misc.h" -#include "trackx.h" #include "common-ui.h" +#include "ctrain.h" #include "bitmaps/bmendpt.xbm" @@ -54,6 +54,9 @@ EXPORT wIndex_t moveCmdInx; EXPORT wIndex_t rotateCmdInx; EXPORT wIndex_t flipCmdInx; +EXPORT long selectMode = 0; +EXPORT long selectZero = 1; + #define MAXMOVEMODE (3) static long moveMode = MAXMOVEMODE; static BOOL_T enableMoveDraw = TRUE; @@ -76,25 +79,27 @@ static dynArr_t tlist_da; { DYNARR_APPEND( track_p, tlist_da, 10 );\ Tlist(tlist_da.cnt-1) = T; } -BOOL_T TListSearch(track_p T) { - for (int i=0;i 0 && (selectedTrackCount == 0) && !display_only ) + if ( inx > 0 && (selectedTrackCount == 0) && !display_only ) { return; + } trk = Tlist(inx); if (!GetLayerFrozen(GetTrkLayer(trk))) { if (inx!=0 && - GetTrkSelected(trk)) { - if (display_only) + GetTrkSelected(trk)) { + if (display_only) { DrawTrack(trk,&tempD,wDrawColorPreviewSelected ); + } continue; } else if (GetTrkSelected(trk)) { - if (display_only) + if (display_only) { DrawTrack(trk,&tempD,wDrawColorPreviewUnselected); + } continue; } } @@ -550,11 +580,11 @@ static void SelectConnectedTracks( trk1 = GetTrkEndTrk( trk, ep ); if (trk1 && !TListSearch(trk1) && GetLayerVisible( GetTrkLayer( trk1 ))) { if (GetTrkSelected(trk1)) { - if (display_only) DrawTrack(trk1,&tempD,wDrawColorPreviewSelected ); - } else TlistAppend( trk1 ); + if (display_only) { DrawTrack(trk1,&tempD,wDrawColorPreviewSelected ); } + } else { TlistAppend( trk1 ); } } } - if (display_only && !GetLayerFrozen(GetTrkLayer(trk))) DrawTrack(trk,&tempD,wDrawColorPreviewSelected ); + if (display_only && !GetLayerFrozen(GetTrkLayer(trk))) { DrawTrack(trk,&tempD,wDrawColorPreviewSelected ); } else if (!GetTrkSelected(trk)) { if (GetLayerModule(GetTrkLayer(trk))) { continue; @@ -575,44 +605,47 @@ static void SelectConnectedTracks( } typedef void (*doModuleTrackCallBack_t)(track_p, BOOL_T); -static int DoModuleTracks( int moduleLayer, doModuleTrackCallBack_t doit, BOOL_T val) +static int DoModuleTracks( int moduleLayer, doModuleTrackCallBack_t doit, + BOOL_T val) { track_p trk; trk = NULL; int cnt = 0; while ( TrackIterate( &trk ) ) { if (GetTrkLayer(trk) == moduleLayer) { - doit( trk, val ); - cnt++; + doit( trk, val ); + cnt++; } } return cnt; } -static void DrawSingleTrack(track_p trk, BOOL_T bit) { +static void DrawSingleTrack(track_p trk, BOOL_T bit) +{ DrawTrack(trk,&tempD,bit?wDrawColorPreviewSelected:wDrawColorPreviewUnselected); } typedef BOOL_T (*testSelectedTrackCallBack_t)(track_p, int); -static BOOL_T TestAllSelectedTracks( testSelectedTrackCallBack_t testit, int value) +static BOOL_T TestAllSelectedTracks( testSelectedTrackCallBack_t testit, + int value) { track_p trk; - trk = NULL; - while ( TrackIterate( &trk ) ) { - if (GetTrkSelected(trk)) { - if ( !testit( trk, value ) ) { - return FALSE; - } + trk = NULL; + while ( TrackIterate( &trk ) ) { + if (GetTrkSelected(trk)) { + if ( !testit( trk, value ) ) { + return FALSE; } } + } return TRUE; } typedef BOOL_T (*doSelectedTrackCallBack_t)(track_p, BOOL_T); -static void DoSelectedTracks( doSelectedTrackCallBack_t doit ) +EXPORT void DoSelectedTracks( doSelectedTrackCallBack_t doit ) { track_p trk; trk = NULL; @@ -645,8 +678,9 @@ static BOOL_T SelectedTracksAreFrozen( void ) EXPORT void SelectTrackWidth( void* width ) { track_p trk; - if (SelectedTracksAreFrozen()) + if (SelectedTracksAreFrozen()) { return; + } if (selectedTrackCount<=0) { ErrorMessage( MSG_NO_SELECTED_TRK ); return; @@ -670,8 +704,9 @@ static void SelectLineType( void* widthVP ) { int width = (int)VP2L(widthVP); track_p trk; - if (SelectedTracksAreFrozen()) + if (SelectedTracksAreFrozen()) { return; + } if (selectedTrackCount<=0) { ErrorMessage( MSG_NO_SELECTED_TRK ); return; @@ -682,11 +717,11 @@ static void SelectLineType( void* widthVP ) while ( TrackIterate( &trk ) ) { if (GetTrkSelected(trk)) { UndoModify( trk ); - if (QueryTrack(trk, Q_CAN_MODIFY_CONTROL_POINTS)) + if (QueryTrack(trk, Q_CAN_MODIFY_CONTROL_POINTS)) { SetBezierLineType(trk, width); - else if (QueryTrack(trk, Q_IS_DRAW)) + } else if (QueryTrack(trk, Q_IS_DRAW)) { SetLineType( trk, width ); - else if (QueryTrack(trk, Q_IS_STRUCTURE)) { + } else if (QueryTrack(trk, Q_IS_STRUCTURE)) { SetCompoundLineType(trk, width); } } @@ -707,13 +742,15 @@ EXPORT int SelectDelete( void ) } } - if (doingDouble || (GetCurrentCommand() == modifyCmdInx)) return 1; + if (doingDouble || (GetCurrentCommand() == modifyCmdInx)) { return 1; } - if (SelectedTracksAreFrozen()) + if (SelectedTracksAreFrozen()) { return 0; + } if (selectedTrackCount>0) { BOOL_T UndoStarted = FALSE; - if (!TestAllSelectedTracks(QueryTrack,(int)Q_ISTRAIN)) { // If all Cars, don't bother with UndoStart as there will be nothing to delete + if (!TestAllSelectedTracks(QueryTrack, + (int)Q_ISTRAIN)) { // If all Cars, don't bother with UndoStart as there will be nothing to delete UndoStarted = TRUE; UndoStart( _("Delete Tracks"), "delete" ); } @@ -725,8 +762,9 @@ EXPORT int SelectDelete( void ) wDrawDelayUpdate( mapD.d, FALSE ); selectedTrackCount = 0; SelectedTrackCountChange(); - if (UndoStarted) + if (UndoStarted) { UndoEnd(); + } } else { ErrorMessage( MSG_NO_SELECTED_TRK ); } @@ -736,7 +774,8 @@ EXPORT int SelectDelete( void ) /* * Called By Windows directly with Delete Key. We first try a simple Delete, and if that doesn't work saying "In Modify" we call Modify with a Text key for Delete */ -EXPORT void TrySelectDelete( void ) { +EXPORT void TrySelectDelete( void ) +{ if(SelectDelete() == 1) { CmdModify((C_TEXT+(int)(127<<8)),zero); } @@ -756,13 +795,15 @@ static BOOL_T FlipHidden( track_p trk, BOOL_T unused ) UndrawNewTrack( trk2 ); }*/ UndoModify( trk ); - if ( drawTunnel == 0 ) + if ( drawTunnel == 0 ) { flipHiddenDoSelectRecount = TRUE; + } if (GetTrkVisible(trk)) { ClrTrkBits( trk, TB_VISIBLE|(drawTunnel==0?(TB_SELECTED|TB_SELREDRAW):0) ); ClrTrkBits (trk, TB_BRIDGE); ClrTrkBits (trk, TB_NOTIES); -; } else { + ; + } else { SetTrkBits( trk, TB_VISIBLE ); } /*DrawNewTrack( trk );*/ @@ -787,6 +828,18 @@ static BOOL_T FlipBridge( track_p trk, BOOL_T unused ) return TRUE; } +static BOOL_T FlipRoadbed( track_p trk, BOOL_T unused ) +{ + UndoModify( trk ); + if (GetTrkRoadbed(trk)) { + ClrTrkBits( trk, TB_ROADBED ); + } else { + SetTrkBits( trk, TB_ROADBED ); + SetTrkBits( trk, TB_VISIBLE); + } + return TRUE; +} + static BOOL_T FlipTies( track_p trk, BOOL_T unused ) { UndoModify( trk ); @@ -801,8 +854,9 @@ static BOOL_T FlipTies( track_p trk, BOOL_T unused ) EXPORT void SelectTunnel( void * unused ) { - if (SelectedTracksAreFrozen()) + if (SelectedTracksAreFrozen()) { return; + } if (selectedTrackCount>0) { flipHiddenDoSelectRecount = FALSE; UndoStart( _("Hide Tracks (Tunnel)"), "tunnel" ); @@ -813,14 +867,16 @@ EXPORT void SelectTunnel( void * unused ) } else { ErrorMessage( MSG_NO_SELECTED_TRK ); } - if ( flipHiddenDoSelectRecount ) + if ( flipHiddenDoSelectRecount ) { SelectRecount(); + } } EXPORT void SelectBridge( void * unused ) { - if (SelectedTracksAreFrozen()) + if (SelectedTracksAreFrozen()) { return; + } if (selectedTrackCount>0) { flipHiddenDoSelectRecount = FALSE; UndoStart( _("Bridge Tracks "), "bridge" ); @@ -834,10 +890,29 @@ EXPORT void SelectBridge( void * unused ) MainRedraw(); // SelectBridge } +EXPORT void SelectRoadbed( void * unused ) +{ + if (SelectedTracksAreFrozen()) { + return; + } + if (selectedTrackCount>0) { + flipHiddenDoSelectRecount = FALSE; + UndoStart( _("Roadbed Tracks "), "roadbed" ); + wDrawDelayUpdate( mainD.d, TRUE ); + DoSelectedTracks( FlipRoadbed ); + wDrawDelayUpdate( mainD.d, FALSE ); + UndoEnd(); + } else { + ErrorMessage( MSG_NO_SELECTED_TRK ); + } + MainRedraw(); // SelectBridge +} + EXPORT void SelectTies( void * unused ) { - if (SelectedTracksAreFrozen()) + if (SelectedTracksAreFrozen()) { return; + } if (selectedTrackCount>0) { flipHiddenDoSelectRecount = FALSE; UndoStart( _("Ties Tracks "), "noties" ); @@ -874,22 +949,23 @@ static BOOL_T SetLayer( track_p trk, BOOL_T unused ) EXPORT void MoveSelectedTracksToCurrentLayer( void * unused ) { - if (SelectedTracksAreFrozen()) + if (SelectedTracksAreFrozen()) { return; - if (selectedTrackCount>0) { - UndoStart( _("Move To Current Layer"), "changeLayer" ); - DoSelectedTracks( SetLayer ); - UndoEnd(); - } else { - ErrorMessage( MSG_NO_SELECTED_TRK ); - } + } + if (selectedTrackCount>0) { + UndoStart( _("Move To Current Layer"), "changeLayer" ); + DoSelectedTracks( SetLayer ); + UndoEnd(); + } else { + ErrorMessage( MSG_NO_SELECTED_TRK ); + } } EXPORT void SelectCurrentLayer( void * unused ) { track_p trk; trk = NULL; - if (GetLayerFrozen(curLayer)) return; + if (GetLayerFrozen(curLayer)) { return; } while ( TrackIterate( &trk ) ) { if ((!GetTrkSelected(trk)) && GetTrkLayer(trk) == curLayer) { SelectOneTrack( trk, TRUE ); @@ -898,7 +974,8 @@ EXPORT void SelectCurrentLayer( void * unused ) RedrawSelectedTracksBoundary(); } -EXPORT void DeselectLayer( unsigned int layer ) { +EXPORT void DeselectLayer( unsigned int layer ) +{ track_p trk; trk = NULL; while ( TrackIterate( &trk ) ) { @@ -926,8 +1003,9 @@ static BOOL_T ClearElevation( track_p trk, BOOL_T unused ) EXPORT void ClearElevations( void * unused ) { - if (SelectedTracksAreFrozen()) + if (SelectedTracksAreFrozen()) { return; + } if (selectedTrackCount>0) { UndoStart( _("Clear Elevations"), "clear elevations" ); DoSelectedTracks( ClearElevation ); @@ -951,8 +1029,9 @@ static BOOL_T AddElevation( track_p trk, BOOL_T unused ) if ((trk1=GetTrkEndTrk(trk,ep))) { ep1 = GetEndPtConnectedToMe( trk1, trk ); if (ep1 >= 0) { - if (GetTrkSelected(trk1) && GetTrkIndex(trk1)0) { elevDelta = delta; UndoStart( _("Add Elevations"), "add elevations" ); @@ -985,8 +1065,9 @@ EXPORT void AddElevations( DIST_T delta ) EXPORT void DoRefreshCompound( void * unused ) { - if (SelectedTracksAreFrozen()) + if (SelectedTracksAreFrozen()) { return; + } if (selectedTrackCount>0) { UndoStart( _("Refresh Compound"), "refresh compound" ); DoSelectedTracks( RefreshCompound ); @@ -1000,7 +1081,8 @@ EXPORT void DoRefreshCompound( void * unused ) static drawCmd_t tempSegsD = { - NULL, &tempSegDrawFuncs, 0, 1, 0.0, {0.0, 0.0}, {0.0, 0.0}, Pix2CoOrd, CoOrd2Pix }; + NULL, &tempSegDrawFuncs, 0, 1, 0.0, {0.0, 0.0}, {0.0, 0.0}, Pix2CoOrd, CoOrd2Pix +}; EXPORT void WriteSelectedTracksToTempSegs( void ) { track_p trk; @@ -1008,8 +1090,9 @@ EXPORT void WriteSelectedTracksToTempSegs( void ) tempSegsD.dpi = mainD.dpi; for ( trk=NULL; TrackIterate(&trk); ) { if ( GetTrkSelected( trk ) ) { - if ( IsTrack( trk ) ) + if ( IsTrack( trk ) ) { continue; + } ClrTrkBits( trk, TB_SELECTED ); DrawTrack( trk, &tempSegsD, wDrawColorBlack ); SetTrkBits( trk, TB_SELECTED ); @@ -1017,260 +1100,6 @@ EXPORT void WriteSelectedTracksToTempSegs( void ) } } -static char rescaleFromScale[20]; -static char rescaleFromGauge[20]; - -static char * rescaleToggleLabels[] = { N_("Scale"), N_("Ratio"), NULL }; -static long rescaleMode; -static wIndex_t rescaleFromScaleInx; -static wIndex_t rescaleFromGaugeInx; -static wIndex_t rescaleToScaleInx; -static wIndex_t rescaleToGaugeInx; -static wIndex_t rescaleToInx; -static long rescaleNoChangeDim = FALSE; -static FLOAT_T rescalePercent; -static char * rescaleChangeDimLabels[] = { N_("Do not resize track"), NULL }; -static paramFloatRange_t r0o001_10000 = { 0.001, 10000.0 }; -static paramData_t rescalePLs[] = { -#define I_RESCALE_MODE (0) - { PD_RADIO, &rescaleMode, "toggle", PDO_NOPREF, &rescaleToggleLabels, N_("Rescale by:"), BC_HORZ|BC_NOBORDER }, -#define I_RESCALE_FROM_SCALE (1) - { PD_STRING, rescaleFromScale, "fromS", PDO_NOPREF|PDO_STRINGLIMITLENGTH, I2VP(100), N_("From:"),0, 0, sizeof(rescaleFromScale)}, -#define I_RESCALE_FROM_GAUGE (2) - { PD_STRING, rescaleFromGauge, "fromG", PDO_NOPREF|PDO_DLGHORZ | PDO_STRINGLIMITLENGTH, I2VP(100), " / ", 0, 0, sizeof(rescaleFromGauge)}, -#define I_RESCALE_TO_SCALE (3) - { PD_DROPLIST, &rescaleToScaleInx, "toS", PDO_NOPREF|PDO_LISTINDEX, I2VP(100), N_("To: ") }, -#define I_RESCALE_TO_GAUGE (4) - { PD_DROPLIST, &rescaleToGaugeInx, "toG", PDO_NOPREF|PDO_LISTINDEX|PDO_DLGHORZ, NULL, " / " }, -#define I_RESCALE_CHANGE (5) - { PD_TOGGLE, &rescaleNoChangeDim, "change-dim", 0, &rescaleChangeDimLabels, "", BC_HORZ|BC_NOBORDER }, -#define I_RESCALE_PERCENT (6) - { PD_FLOAT, &rescalePercent, "ratio", 0, &r0o001_10000, N_("Ratio") }, - { PD_MESSAGE, "%", NULL, PDO_DLGHORZ } }; -static paramGroup_t rescalePG = { "rescale", 0, rescalePLs, COUNT( rescalePLs ) }; - - -static long getboundsCount; -static coOrd getboundsLo, getboundsHi; - -static BOOL_T GetboundsDoIt( track_p trk, BOOL_T unused ) -{ - coOrd hi, lo; - - GetBoundingBox( trk, &hi, &lo ); - if ( getboundsCount == 0 ) { - getboundsLo = lo; - getboundsHi = hi; - } else { - if ( lo.x < getboundsLo.x ) getboundsLo.x = lo.x; - if ( lo.y < getboundsLo.y ) getboundsLo.y = lo.y; - if ( hi.x > getboundsHi.x ) getboundsHi.x = hi.x; - if ( hi.y > getboundsHi.y ) getboundsHi.y = hi.y; - } - getboundsCount++; - return TRUE; -} - -static coOrd rescaleShift; -static BOOL_T RescaleDoIt( track_p trk, BOOL_T unused ) -{ - EPINX_T ep, ep1; - track_p trk1; - UndrawNewTrack( trk ); - UndoModify(trk); - if ( rescalePercent != 100.0 ) { - for (ep=0; ep mapD.size.x ) { - d = getboundsHi.x - mapD.size.x; - if ( getboundsLo.x < d ) - d = getboundsLo.x; - getboundsHi.x -= d; - getboundsLo.x -= d; - } - if ( getboundsLo.y < 0 ) { - getboundsHi.y -= getboundsLo.y; - getboundsLo.y = 0; - } else if ( getboundsHi.y > mapD.size.y ) { - d = getboundsHi.y - mapD.size.y; - if ( getboundsLo.y < d ) - d = getboundsLo.y; - getboundsHi.y -= d; - getboundsLo.y -= d; - } - if ( rescaleNoChangeDim == 0 && - (getboundsHi.x > mapD.size.x || - getboundsHi.y > mapD.size.y )) { - NoticeMessage( MSG_RESCALE_TOO_BIG, _("Ok"), NULL, FormatDistance(getboundsHi.x), FormatDistance(getboundsHi.y) ); - } - rescaleShift.x = (getboundsLo.x+getboundsHi.x)/2.0 - center.x*ratio; - rescaleShift.y = (getboundsLo.y+getboundsHi.y)/2.0 - center.y*ratio; - - rescaleToInx = GetScaleInx( rescaleToScaleInx, rescaleToGaugeInx ); - DoSelectedTracks( RescaleDoIt ); - - // rescale the background if it exists and the layout is resized - if (HasBackGround() && ratio != 1.0) { - coOrd pos = GetLayoutBackGroundPos(); - double size = GetLayoutBackGroundSize(); - pos.x = ratio * pos.x + rescaleShift.x; - pos.y = ratio * pos.y + rescaleShift.y; - SetLayoutBackGroundPos(pos); - - size *= ratio; - SetLayoutBackGroundSize(size); - } - DoRedraw(); - wHide( rescalePG.win ); -} - - -static void RescaleDlgUpdate( - paramGroup_p pg, - int inx, - void * valueP ) -{ - switch (inx) { - case I_RESCALE_MODE: - wControlShow( pg->paramPtr[I_RESCALE_FROM_SCALE].control, rescaleMode==0 ); - wControlActive( pg->paramPtr[I_RESCALE_FROM_SCALE].control, FALSE ); - wControlShow( pg->paramPtr[I_RESCALE_TO_SCALE].control, rescaleMode==0 ); - wControlShow( pg->paramPtr[I_RESCALE_FROM_GAUGE].control, rescaleMode==0 ); - wControlActive( pg->paramPtr[I_RESCALE_FROM_GAUGE].control, FALSE ); - wControlShow( pg->paramPtr[I_RESCALE_TO_GAUGE].control, rescaleMode==0 ); - wControlShow( pg->paramPtr[I_RESCALE_CHANGE].control, rescaleMode==0 ); - wControlActive( pg->paramPtr[I_RESCALE_PERCENT].control, rescaleMode==1 ); - if ( rescaleMode!=0 ) - break; - case I_RESCALE_TO_SCALE: - LoadGaugeList( (wList_p)rescalePLs[I_RESCALE_TO_GAUGE].control, *((int *)valueP) ); - rescaleToGaugeInx = 0; - ParamLoadControl( pg, I_RESCALE_TO_GAUGE ); - ParamLoadControl( pg, I_RESCALE_TO_SCALE ); - rescalePercent = GetScaleDescRatio(rescaleFromScaleInx)/GetScaleDescRatio(rescaleToScaleInx)*100.0; - wControlActive( pg->paramPtr[I_RESCALE_CHANGE].control, (rescaleFromScaleInx != rescaleToScaleInx) ); - ParamLoadControl( pg, I_RESCALE_PERCENT ); - break; - case I_RESCALE_TO_GAUGE: - ParamLoadControl( pg, I_RESCALE_TO_GAUGE ); - break; - case I_RESCALE_FROM_SCALE: - ParamLoadControl( pg, I_RESCALE_FROM_SCALE ); - break; - case I_RESCALE_FROM_GAUGE: - ParamLoadControl( pg, I_RESCALE_FROM_GAUGE ); - break; - case I_RESCALE_CHANGE: - ParamLoadControl( pg, I_RESCALE_CHANGE ); - break; - case -1: - break; - } - ParamDialogOkActive( pg, rescalePercent!=100.0 || rescaleFromGaugeInx != rescaleToGaugeInx ); -} - -/** - * Get the scale gauge information for the selected track pieces. - * FIXME: special cases like tracks pieces with different gauges or scale need to be handled - * - * \param IN trk track element - * \param IN unused - * \return TRUE; - */ - -static BOOL_T SelectedScaleGauge( track_p trk, BOOL_T unused ) -{ - char *scaleName; - SCALEINX_T scale; - SCALEDESCINX_T scaleInx; - GAUGEINX_T gaugeInx; - - scale = GetTrkScale( trk ); - scaleName = GetScaleName( scale ); - if( strcmp( scaleName, "*" )) { - GetScaleGauge( scale, &scaleInx, &gaugeInx ); - strcpy( rescaleFromScale,GetScaleDesc( scaleInx )); - strcpy( rescaleFromGauge, GetGaugeDesc( scaleInx, gaugeInx )); - - rescaleFromScaleInx = scaleInx; - rescaleFromGaugeInx = gaugeInx; - rescaleToScaleInx = scaleInx; - rescaleToGaugeInx = gaugeInx; - } - - return TRUE; -} - -/** - * Bring up the rescale dialog. The dialog for rescaling the selected pieces - * of track is created if necessary and shown. Handling of user input is done via - * RescaleDlgUpdate() - */ - -EXPORT void DoRescale( void * unused ) -{ - if ( rescalePG.win == NULL ) { - ParamCreateDialog( &rescalePG, MakeWindowTitle(_("Rescale")), _("Ok"), RescaleDlgOk, wHide, TRUE, NULL, F_BLOCK, RescaleDlgUpdate ); - LoadScaleList( (wList_p)rescalePLs[I_RESCALE_TO_SCALE].control ); - LoadGaugeList( (wList_p)rescalePLs[I_RESCALE_TO_GAUGE].control, GetLayoutCurScaleDesc() ); /* set correct gauge list here */ - rescaleFromScaleInx = GetLayoutCurScale(); - rescaleToScaleInx = rescaleFromScaleInx; - rescalePercent = 100.0; - } - - DoSelectedTracks( SelectedScaleGauge ); - - RescaleDlgUpdate( &rescalePG, I_RESCALE_MODE, &rescaleMode ); - RescaleDlgUpdate( &rescalePG, I_RESCALE_CHANGE, &rescaleMode ); - - RescaleDlgUpdate( &rescalePG, I_RESCALE_FROM_GAUGE, rescaleFromGauge ); - RescaleDlgUpdate( &rescalePG, I_RESCALE_FROM_SCALE, rescaleFromScale ); - - RescaleDlgUpdate( &rescalePG, I_RESCALE_TO_SCALE, &rescaleToScaleInx ); - RescaleDlgUpdate( &rescalePG, I_RESCALE_TO_GAUGE, &rescaleToGaugeInx ); - - wShow( rescalePG.win ); -} - static void DrawSelectedTracksD( drawCmd_p d, wDrawColor color ) { @@ -1282,31 +1111,35 @@ static void DrawSelectedTracksD( drawCmd_p d, wDrawColor color ) trk = Tlist(inx); if (d != &mapD) { GetBoundingBox( trk, &hi, &lo ); - if ( OFF_D( d->orig, d->size, lo, hi ) ) + if ( OFF_D( d->orig, d->size, lo, hi ) ) { continue; + } } - if (color != wDrawColorWhite) + if (color != wDrawColorWhite) { ClrTrkBits(trk, TB_UNDRAWN); - if (color == wDrawColorWhite) + } + if (color == wDrawColorWhite) { SetTrkBits( trk, TB_UNDRAWN ); + } } MainRedraw(); //Omitting all the tracks with TB_UNDRAWN set /*wDrawDelayUpdate( d->d, FALSE );*/ } static BOOL_T AddSelectedTrack( - track_p trk, BOOL_T unused ) + track_p trk, BOOL_T unused ) { DYNARR_APPEND( track_p, tlist_da, 10 ); DYNARR_LAST( track_p, tlist_da ) = trk; return TRUE; } -static BOOL_T RemoveSelectedTrack(track_p trk) { +static BOOL_T RemoveSelectedTrack(track_p trk) +{ - for(int i=0;i getSelectedBoundsHi.x ) { getSelectedBoundsHi.x = hi.x; } + if ( hi.y > getSelectedBoundsHi.y ) { getSelectedBoundsHi.y = hi.y; } + } + getSelectedBoundsCount++; + return TRUE; +} + +EXPORT void GetSelectedBounds( coOrd * low, coOrd * high ) +{ + getSelectedBoundsCount = 0; + DoSelectedTracks( GetBoundsDoIt ); + *low = getSelectedBoundsLo; + *high = getSelectedBoundsHi; +} + static coOrd moveOrig; static ANGLE_T moveAngle; static coOrd moveD_hi, moveD_lo; static drawCmd_t moveD = { - NULL, &tempSegDrawFuncs, DC_SIMPLE, 1, 0.0, {0.0, 0.0}, {0.0, 0.0}, Pix2CoOrd, CoOrd2Pix }; + NULL, &tempSegDrawFuncs, DC_SIMPLE, 1, 0.0, {0.0, 0.0}, {0.0, 0.0}, Pix2CoOrd, CoOrd2Pix +}; @@ -1347,12 +1210,13 @@ static void AccumulateTracks( void ) if (trk) { GetBoundingBox( trk, &hi, &lo ); if (lo.x <= moveD_hi.x && hi.x >= moveD_lo.x && - lo.y <= moveD_hi.y && hi.y >= moveD_lo.y ) { - if (!QueryTrack(trk,Q_IS_CORNU)) - DrawTrack( trk, &moveD, wDrawColorBlack ); + lo.y <= moveD_hi.y && hi.y >= moveD_lo.y ) { + if (!QueryTrack(trk,Q_IS_CORNU)) { + DrawTrack( trk, &moveD, wDrawColorBlack ); } - movedCnt++; } + movedCnt++; + } } InfoCount( movedCnt ); /*wDrawDelayUpdate( moveD.d, FALSE );*/ @@ -1360,13 +1224,15 @@ static void AccumulateTracks( void ) static dynArr_t auto_select_da; -static void AddEndCornus() { - for (int i=0;i=0;j--) { + for (int j=GetTrkEndPtCnt(trk)-1; j>=0; j--) { tc = GetTrkEndTrk(trk,j); - if (tc && !GetTrkSelected(tc) && QueryTrack(tc,Q_IS_CORNU) && !QueryTrack(trk,Q_IS_CORNU)) { //On end and cornu + if (tc && !GetTrkSelected(tc) && QueryTrack(tc,Q_IS_CORNU) + && !QueryTrack(trk,Q_IS_CORNU)) { //On end and cornu SelectOneTrack( tc, TRUE ); DYNARR_APPEND(track_p,tlist_da,1); //Add to selected list DYNARR_LAST(track_p,tlist_da) = tc; @@ -1377,9 +1243,10 @@ static void AddEndCornus() { } } -static void RemoveEndCornus() { +static void RemoveEndCornus() +{ track_p tc; - for (int i=0;i moveD_hi.x) + } + if (corner[inx].x > moveD_hi.x) { moveD_hi.x = corner[inx].x; - if (corner[inx].y > moveD_hi.y) + } + if (corner[inx].y > moveD_hi.y) { moveD_hi.y = corner[inx].y; + } } } AccumulateTracks(); @@ -1456,9 +1327,10 @@ static void DrawMovedTracks( void ) int inx; track_p trk; dynArr_t cornu_segs; + DYNARR_INIT( trkSeg_t, cornu_segs ); - DrawSegs( &tempD, moveOrig, moveAngle, &tempSegs(0), tempSegs_da.cnt, - 0.0, selectedColor ); + DrawSegsDA( &tempD, NULL, moveOrig, moveAngle, &tempSegs_da, 0.0, selectedColor, + 0 ); for ( inx=0; inx=0) { @@ -1719,7 +1604,8 @@ wBool_t FindEndIntersection(coOrd base, coOrd orig, ANGLE_T angle, track_p * t1, epp = PickEndPoint(pos2,tt); //Any close end point (even joined) if (epp>=0) { ct = GetTrkEndTrk(tt,epp); - if (ct && GetTrkSelected(ct)) { //Point is junction to selected track - so will be broken + if (ct && GetTrkSelected( + ct)) { //Point is junction to selected track - so will be broken DIST_T d = FindDistance(pos1,GetTrkEndPos(tt,epp)); if (IsClose(d)) { *ep1 = epp; @@ -1738,14 +1624,15 @@ wBool_t FindEndIntersection(coOrd base, coOrd orig, ANGLE_T angle, track_p * t1, return FALSE; } -void DrawHighlightLayer(int layer) { +void DrawHighlightLayer(int layer) +{ track_p ts = NULL; BOOL_T initial = TRUE; coOrd layer_hi = zero,layer_lo = zero; while ( TrackIterate( &ts ) ) { - if ( !GetLayerVisible( GetTrkLayer( ts))) continue; - if (!GetTrkSelected(ts)) continue; - if (GetTrkLayer(ts) != layer) continue; + if ( !GetLayerVisible( GetTrkLayer( ts))) { continue; } + if (!GetTrkSelected(ts)) { continue; } + if (GetTrkLayer(ts) != layer) { continue; } coOrd hi,lo; GetBoundingBox(ts, &hi, &lo); if (initial) { @@ -1753,10 +1640,10 @@ void DrawHighlightLayer(int layer) { layer_lo = lo; initial = FALSE; } else { - if (layer_hi.x < hi.x ) layer_hi.x = hi.x; - if (layer_hi.y < hi.y ) layer_hi.y = hi.y; - if (layer_lo.x > lo.x ) layer_lo.x = lo.x; - if (layer_lo.y > lo.y ) layer_lo.y = lo.y; + if (layer_hi.x < hi.x ) { layer_hi.x = hi.x; } + if (layer_hi.y < hi.y ) { layer_hi.y = hi.y; } + if (layer_lo.x > lo.x ) { layer_lo.x = lo.x; } + if (layer_lo.y > lo.y ) { layer_lo.y = lo.y; } } } wDrawPix_t margin = (10.5*mainD.scale/mainD.dpi); @@ -1777,7 +1664,8 @@ void DrawHighlightLayer(int layer) { DrawPoly(&tempD,4,rect,type,wDrawColorPowderedBlue,wDrawLineDash,DRAW_CLOSED); } -void SetUpMenu2(coOrd pos, track_p trk) { +void SetUpMenu2(coOrd pos, track_p trk) +{ wMenuPushEnable( menuPushModify,FALSE); wMenuPushEnable(descriptionMI,FALSE); wMenuPushEnable( rotateAlignMI, FALSE ); @@ -1785,12 +1673,13 @@ void SetUpMenu2(coOrd pos, track_p trk) { wMenuPushEnable( bridgeMI, FALSE ); wMenuPushEnable( tiesMI, FALSE ); if ((trk) && - QueryTrack(trk,Q_CAN_ADD_ENDPOINTS)) { //Turntable snap to center if within 1/4 radius + QueryTrack(trk, + Q_CAN_ADD_ENDPOINTS)) { //Turntable snap to center if within 1/4 radius trackParams_t trackParams; if (GetTrackParams(PARAMS_CORNU, trk, pos, &trackParams)) { DIST_T dist = FindDistance(pos, trackParams.ttcenter); if (dist < trackParams.ttradius/4) { - cmdMenuPos = trackParams.ttcenter; + cmdMenuPos = trackParams.ttcenter; } } } @@ -1801,24 +1690,25 @@ void SetUpMenu2(coOrd pos, track_p trk) { } if (trk) { wMenuPushEnable( menuPushModify, - (QueryTrack( trk, Q_CAN_MODIFY_CONTROL_POINTS ) || - QueryTrack( trk, Q_IS_CORNU ) || - (QueryTrack( trk, Q_IS_DRAW ) && !QueryTrack( trk, Q_IS_TEXT )) || - QueryTrack( trk, Q_IS_ACTIVATEABLE))); + (QueryTrack( trk, Q_CAN_MODIFY_CONTROL_POINTS ) || + QueryTrack( trk, Q_IS_CORNU ) || + (QueryTrack( trk, Q_IS_DRAW ) && !QueryTrack( trk, Q_IS_TEXT )) || + QueryTrack( trk, Q_IS_ACTIVATEABLE))); } if ((trk)) { wMenuPushEnable(descriptionMI, QueryTrack( trk, Q_HAS_DESC )); moveDescTrk = trk; moveDescPos = pos; } - if (selectedTrackCount>0) + if (selectedTrackCount>0) { wMenuPushEnable( rotateAlignMI, TRUE ); + } } static STATUS_T CmdMove( - wAction_t action, - coOrd pos ) + wAction_t action, + coOrd pos ) { static coOrd base; static coOrd orig; @@ -1832,166 +1722,172 @@ static STATUS_T CmdMove( switch( action & 0xFF) { - case C_START: - DYNARR_RESET(trkSeg_t,anchors_da); - if (selectedTrackCount == 0) { - ErrorMessage( MSG_NO_SELECTED_TRK ); - return C_TERMINATE; - } - if (SelectedTracksAreFrozen()) { - return C_TERMINATE; - } - InfoMessage( _("Drag to move selected tracks - Shift+Ctrl+Arrow micro-steps the move") ); - state = 0; - ep1 = -1; - ep2 = -1; - doingMove = FALSE; - break; + case C_START: + DYNARR_RESET(trkSeg_t,anchors_da); + if (selectedTrackCount == 0) { + ErrorMessage( MSG_NO_SELECTED_TRK ); + return C_TERMINATE; + } + if (SelectedTracksAreFrozen()) { + return C_TERMINATE; + } + InfoMessage( + _("Drag to move selected tracks - Shift+Ctrl+Arrow micro-steps the move") ); + state = 0; + ep1 = -1; + ep2 = -1; + doingMove = FALSE; + break; - case wActionMove: - DYNARR_RESET(trkSeg_t,anchors_da); - CreateMoveAnchor(pos); - break; - case C_DOWN: - DYNARR_RESET(trkSeg_t,anchors_da); - if (doingMove) { - doingMove = FALSE; - UndoEnd(); - } + case wActionMove: + DYNARR_RESET(trkSeg_t,anchors_da); + CreateMoveAnchor(pos); + break; + case C_DOWN: + DYNARR_RESET(trkSeg_t,anchors_da); + if (doingMove) { + doingMove = FALSE; + UndoEnd(); + } - if (SelectedTracksAreFrozen()) { - return C_TERMINATE; - } - UndoStart( _("Move Tracks"), "move" ); - base = zero; - orig = pos; - DYNARR_RESET(track_p,auto_select_da); - GetMovedTracks(TRUE); - SetMoveD( TRUE, base, 0.0 ); - drawCount = 0; - state = 1; - return C_CONTINUE; - case C_MOVE: - DYNARR_RESET(trkSeg_t,anchors_da); - ep1=-1; - ep2=-1; - drawEnable = enableMoveDraw; - base.x = pos.x - orig.x; - base.y = pos.y - orig.y; - if ((MyGetKeyState() & WKEY_ALT) == 0) SnapPos( &base ); - SetMoveD( TRUE, base, 0.0 ); - if (((MyGetKeyState()&(WKEY_ALT)) == 0) == magneticSnap) { // ALT - if (FindEndIntersection(base,zero,0.0,&t1,&ep1,&t2,&ep2)) { - coOrd pos2 = GetTrkEndPos(t2,ep2); - pos2.x +=base.x; - pos2.y +=base.y; - CreateEndAnchor(pos2,FALSE); - CreateEndAnchor(GetTrkEndPos(t1,ep1),TRUE); - } + if (SelectedTracksAreFrozen()) { + return C_TERMINATE; + } + UndoStart( _("Move Tracks"), "move" ); + base = zero; + orig = pos; + DYNARR_RESET(track_p,auto_select_da); + GetMovedTracks(TRUE); + SetMoveD( TRUE, base, 0.0 ); + drawCount = 0; + state = 1; + return C_CONTINUE; + case C_MOVE: + DYNARR_RESET(trkSeg_t,anchors_da); + ep1=-1; + ep2=-1; + drawEnable = enableMoveDraw; + base.x = pos.x - orig.x; + base.y = pos.y - orig.y; + if ((MyGetKeyState() & WKEY_ALT) == 0) { SnapPos( &base ); } + SetMoveD( TRUE, base, 0.0 ); + if (((MyGetKeyState()&(WKEY_ALT)) == 0) == magneticSnap) { // ALT + if (FindEndIntersection(base,zero,0.0,&t1,&ep1,&t2,&ep2)) { + coOrd pos2 = GetTrkEndPos(t2,ep2); + pos2.x +=base.x; + pos2.y +=base.y; + CreateEndAnchor(pos2,FALSE); + CreateEndAnchor(GetTrkEndPos(t1,ep1),TRUE); } + } #ifdef DRAWCOUNT - InfoMessage( " [%s %s] #%ld", FormatDistance(base.x), FormatDistance(base.y), drawCount ); + InfoMessage( " [%s %s] #%ld", FormatDistance(base.x), FormatDistance(base.y), + drawCount ); #else - InfoMessage( " [%s %s]", FormatDistance(base.x), FormatDistance(base.y) ); + InfoMessage( " [%s %s]", FormatDistance(base.x), FormatDistance(base.y) ); #endif - drawEnable = TRUE; - return C_CONTINUE; - case C_UP: - DYNARR_RESET(trkSeg_t,anchors_da); - state = 0; - FreeTempStrings(); - if (t1 && ep1>=0 && t2 && ep2>=0) { - MoveToJoin(t2,ep2,t1,ep1); - } else { - MoveTracks( FALSE, TRUE, FALSE, base, zero, 0.0, TRUE ); - } - ep1 = -1; - ep2 = -1; - RemoveEndCornus(); - tlist_da.cnt = 0; - return C_TERMINATE; + drawEnable = TRUE; + return C_CONTINUE; + case C_UP: + DYNARR_RESET(trkSeg_t,anchors_da); + state = 0; + FreeTempStrings(); + if (t1 && ep1>=0 && t2 && ep2>=0) { + MoveToJoin(t2,ep2,t1,ep1); + } else { + MoveTracks( FALSE, TRUE, FALSE, base, zero, 0.0, TRUE ); + } + ep1 = -1; + ep2 = -1; + RemoveEndCornus(); + DYNARR_RESET( track_p, tlist_da ); + return C_TERMINATE; - case C_CMDMENU: - if (doingMove) UndoEnd(); - doingMove = FALSE; - base = pos; - track_p trk = OnTrack(&pos, FALSE, FALSE); //Note pollutes pos if turntable - if ((trk) && - QueryTrack(trk,Q_CAN_ADD_ENDPOINTS)) { //Turntable snap to center if within 1/4 radius - trackParams_t trackParams; - if (GetTrackParams(PARAMS_CORNU, trk, pos, &trackParams)) { - DIST_T dist = FindDistance(base, trackParams.ttcenter); - if (dist < trackParams.ttradius/4) { - cmdMenuPos = trackParams.ttcenter; - } + case C_CMDMENU: + if (doingMove) { UndoEnd(); } + doingMove = FALSE; + base = pos; + track_p trk = OnTrack(&pos, FALSE, FALSE); //Note pollutes pos if turntable + if ((trk) && + QueryTrack(trk, + Q_CAN_ADD_ENDPOINTS)) { //Turntable snap to center if within 1/4 radius + trackParams_t trackParams; + if (GetTrackParams(PARAMS_CORNU, trk, pos, &trackParams)) { + DIST_T dist = FindDistance(base, trackParams.ttcenter); + if (dist < trackParams.ttradius/4) { + cmdMenuPos = trackParams.ttcenter; } } - moveDescPos = pos; - moveDescTrk = trk; - SetUpMenu2(pos,trk); - menuPos = pos; - wMenuPopupShow( selectPopup2M ); - return C_CONTINUE; + } + moveDescPos = pos; + moveDescTrk = trk; + SetUpMenu2(pos,trk); + menuPos = pos; + wMenuPopupShow( selectPopup2M ); + return C_CONTINUE; - case C_TEXT: - if ((action>>8) == 'c') { - panCenter = pos; - LOG( log_pan, 2, ( "PanCenter:Sel-%d %0.3f %0.3f\n", __LINE__, panCenter.x, panCenter.y ) ); - PanHere(I2VP(0)); - } - if ((action>>8) == 'e') { - DoZoomExtents(I2VP(0)); - } - if ((action>>8 == 's')) { - DoZoomExtents(I2VP(1)); - } - if ((action>>8) == '0' || (action>>8 == 'o')) { - PanMenuEnter(I2VP('o')); - } - if ((action>>8) == 127 || (action>>8) == 8) - SelectDelete(); + case C_TEXT: + if ((action>>8) == 'c') { + panCenter = pos; + LOG( log_pan, 2, ( "PanCenter:Sel-%d %0.3f %0.3f\n", __LINE__, panCenter.x, + panCenter.y ) ); + PanHere(I2VP(0)); + } + if ((action>>8) == 'e') { + DoZoomExtents(I2VP(0)); + } + if ((action>>8 == 's')) { + DoZoomExtents(I2VP(1)); + } + if ((action>>8) == '0' || (action>>8 == 'o')) { + PanMenuEnter(I2VP('o')); + } + if ((action>>8) == 127 || (action>>8) == 8) { + SelectDelete(); + } + break; + case C_REDRAW: + /* DO_REDRAW */ + //Draw all existing highlight boxes only + DrawHighlightBoxes(FALSE, FALSE, NULL); + HighlightSelectedTracks(NULL, TRUE, TRUE); + DrawSegsDA( &tempD, NULL, zero, 0.0, &anchors_da, trackGauge, wDrawColorBlack, + 0 ); + if ( state == 0 ) { break; - case C_REDRAW: - /* DO_REDRAW */ - //Draw all existing highlight boxes only - DrawHighlightBoxes(FALSE, FALSE, NULL); - HighlightSelectedTracks(NULL, TRUE, TRUE); - if (anchors_da.cnt) - DrawSegs( &tempD, zero, 0.0, &anchors(0), anchors_da.cnt, trackGauge, wDrawColorBlack ); - if ( state == 0 ) - break; - DrawMovedTracks(); + } + DrawMovedTracks(); - break; + break; - case wActionExtKey: - if (state) return C_CONTINUE; - if (SelectedTracksAreFrozen()) return C_TERMINATE; - if ((MyGetKeyState() & - (WKEY_SHIFT | WKEY_CTRL)) == (WKEY_SHIFT | WKEY_CTRL)) { //Both - base = zero; - DIST_T w = tempD.scale/tempD.dpi; - switch((wAccelKey_e) action>>8) { - case wAccelKey_Up: - base.y = w; - break; - case wAccelKey_Down: - base.y = -w; - break; - case wAccelKey_Left: - base.x = -w; - break; - case wAccelKey_Right: - base.x = w; - break; - default: - return C_CONTINUE; - break; - } + case wActionExtKey: + if (state) { return C_CONTINUE; } + if (SelectedTracksAreFrozen()) { return C_TERMINATE; } + if ((MyGetKeyState() & + (WKEY_SHIFT | WKEY_CTRL)) == (WKEY_SHIFT | WKEY_CTRL)) { //Both + base = zero; + DIST_T w = tempD.scale/tempD.dpi; + switch((wAccelKey_e) action>>8) { + case wAccelKey_Up: + base.y = w; + break; + case wAccelKey_Down: + base.y = -w; + break; + case wAccelKey_Left: + base.x = -w; + break; + case wAccelKey_Right: + base.x = w; + break; + default: + return C_CONTINUE; + break; + } drawEnable = enableMoveDraw; GetMovedTracks(TRUE); - if (!doingMove) UndoStart( _("Move Tracks"), "move" ); + if (!doingMove) { UndoStart( _("Move Tracks"), "move" ); } doingMove = TRUE; SetMoveD( TRUE, base, 0.0 ); MoveTracks( FALSE, TRUE, FALSE, base, zero, 0.0, FALSE ); @@ -2002,28 +1898,28 @@ static STATUS_T CmdMove( } RemoveEndCornus(); return C_CONTINUE; - } - break; + } + break; - case C_FINISH: - if (doingMove) { - doingMove = FALSE; - UndoEnd(); - } - RemoveEndCornus(); - tlist_da.cnt = 0; - break; - case C_CONFIRM: - case C_CANCEL: - if (doingMove) { - doingMove = FALSE; - UndoUndo(NULL); - } - RemoveEndCornus(); - tlist_da.cnt = 0; - break; - default: - break; + case C_FINISH: + if (doingMove) { + doingMove = FALSE; + UndoEnd(); + } + RemoveEndCornus(); + DYNARR_RESET( track_p, tlist_da ); + break; + case C_CONFIRM: + case C_CANCEL: + if (doingMove) { + doingMove = FALSE; + UndoUndo(NULL); + } + RemoveEndCornus(); + DYNARR_RESET( track_p, tlist_da ); + break; + default: + break; } return C_CONTINUE; } @@ -2045,8 +1941,8 @@ static void RotateAlign( void * alignVP ) } static STATUS_T CmdRotate( - wAction_t action, - coOrd pos ) + wAction_t action, + coOrd pos ) { static coOrd base; static coOrd orig_base; @@ -2068,303 +1964,332 @@ static STATUS_T CmdRotate( switch( action ) { - case C_START: - DYNARR_RESET(trkSeg_t,anchors_da); - state = 0; - if (selectedTrackCount == 0) { - ErrorMessage( MSG_NO_SELECTED_TRK ); - return C_TERMINATE; - } - if (SelectedTracksAreFrozen()) { - return C_TERMINATE; - } - InfoMessage( _("Drag to rotate selected tracks, Shift+RightClick for QuickRotate Menu") ); - wMenuPushEnable( rotateAlignMI, TRUE ); - rotateAlignState = 0; - ep1 = -1; - ep2 = -1; - break; - case wActionMove: - DYNARR_RESET(trkSeg_t,anchors_da); - CreateRotateAnchor(pos); - break; - case C_DOWN: - DYNARR_RESET(trkSeg_t,anchors_da); - state = 1; - if (SelectedTracksAreFrozen()) { - return C_TERMINATE; - } - UndoStart( _("Rotate Tracks"), "rotate" ); - DYNARR_RESET(track_p,auto_select_da); - if ( rotateAlignState == 0 ) { - drawnAngle = FALSE; - angle = 0.0; - base = orig = pos; - trk = OnTrack(&pos, FALSE, FALSE); //Note pollutes pos if turntable - if ((trk) && - QueryTrack(trk,Q_CAN_ADD_ENDPOINTS)) { //Turntable snap to center if within 1/4 radius - trackParams_t trackParams; - if (GetTrackParams(PARAMS_CORNU, trk, pos, &trackParams)) { - DIST_T dist = FindDistance(base, trackParams.ttcenter); - if (dist < trackParams.ttradius/4) { - base = orig = trackParams.ttcenter; - InfoMessage( _("Center of Rotation snapped to Turntable center") ); - } + case C_START: + DYNARR_RESET(trkSeg_t,anchors_da); + state = 0; + if (selectedTrackCount == 0) { + ErrorMessage( MSG_NO_SELECTED_TRK ); + return C_TERMINATE; + } + if (SelectedTracksAreFrozen()) { + return C_TERMINATE; + } + InfoMessage( + _("Drag to rotate selected tracks, Shift+RightClick for QuickRotate Menu") ); + wMenuPushEnable( rotateAlignMI, TRUE ); + rotateAlignState = 0; + ep1 = -1; + ep2 = -1; + break; + case wActionMove: + DYNARR_RESET(trkSeg_t,anchors_da); + CreateRotateAnchor(pos); + break; + case C_DOWN: + DYNARR_RESET(trkSeg_t,anchors_da); + state = 1; + if (SelectedTracksAreFrozen()) { + return C_TERMINATE; + } + UndoStart( _("Rotate Tracks"), "rotate" ); + DYNARR_RESET(track_p,auto_select_da); + if ( rotateAlignState == 0 ) { + drawnAngle = FALSE; + angle = 0.0; + base = orig = pos; + trk = OnTrack(&pos, FALSE, FALSE); //Note pollutes pos if turntable + if ((trk) && + QueryTrack(trk, + Q_CAN_ADD_ENDPOINTS)) { //Turntable snap to center if within 1/4 radius + trackParams_t trackParams; + if (GetTrackParams(PARAMS_CORNU, trk, pos, &trackParams)) { + DIST_T dist = FindDistance(base, trackParams.ttcenter); + if (dist < trackParams.ttradius/4) { + base = orig = trackParams.ttcenter; + InfoMessage( _("Center of Rotation snapped to Turntable center") ); } } - CreateRotateAnchor(orig); - GetMovedTracks(TRUE); - SetMoveD( FALSE, base, angle ); + } + CreateRotateAnchor(orig); + GetMovedTracks(TRUE); + SetMoveD( FALSE, base, angle ); - /*DrawLine( &mainD, base, orig, 0, wDrawColorBlack ); - DrawMovedTracks(FALSE, orig, angle);*/ - } else { - pos1 = pos; - drawnAngle = FALSE; - onTrackInSplit = TRUE; - trk = OnTrack( &pos, TRUE, FALSE ); - onTrackInSplit = FALSE; - if ( trk == NULL ) return C_CONTINUE; - angle1 = NormalizeAngle( GetAngleAtPoint( trk, pos, NULL, NULL ) ); - if ( rotateAlignState == 1 ) { - if ( !GetTrkSelected(trk) ) { - NoticeMessage( MSG_1ST_TRACK_MUST_BE_SELECTED, _("Ok"), NULL ); - } else { - base = pos; - baseAngle = angle1; - getboundsCount = 0; - DoSelectedTracks( GetboundsDoIt ); - orig.x = (getboundsLo.x+getboundsHi.x)/2.0; - orig.y = (getboundsLo.y+getboundsHi.y)/2.0; -/*printf( "orig = [%0.3f %0.3f], baseAngle = %0.3f\n", orig.x, orig.y, baseAngle );*/ - } + /*DrawLine( &mainD, base, orig, 0, wDrawColorBlack ); + DrawMovedTracks(FALSE, orig, angle);*/ + } else { + pos1 = pos; + drawnAngle = FALSE; + onTrackInSplit = TRUE; + trk = OnTrack( &pos, TRUE, FALSE ); + onTrackInSplit = FALSE; + if ( trk == NULL ) { return C_CONTINUE; } + angle1 = NormalizeAngle( GetAngleAtPoint( trk, pos, NULL, NULL ) ); + if ( rotateAlignState == 1 ) { + if ( !GetTrkSelected(trk) ) { + NoticeMessage( MSG_1ST_TRACK_MUST_BE_SELECTED, _("Ok"), NULL ); } else { - if ( GetTrkSelected(trk) ) { - ErrorMessage( MSG_2ND_TRACK_MUST_BE_UNSELECTED ); - angle = 0; - } else { - angle = NormalizeAngle(angle1-baseAngle); - //if ( angle > 90 && angle < 270 ) - // angle = NormalizeAngle( angle + 180.0 ); - //if ( NormalizeAngle( FindAngle( base, pos1 ) - angle1 ) < 180.0 ) - // angle = NormalizeAngle( angle + 180.0 ); -/*printf( "angle 1 = %0.3f\n", angle );*/ - if ( angle1 > 180.0 ) angle1 -= 180.0; - InfoMessage( _("Angle %0.3f"), angle1 ); - } - GetMovedTracks(TRUE); - SetMoveD( FALSE, orig, angle ); + coOrd low, high; + base = pos; + baseAngle = angle1; + GetSelectedBounds( &low, &high ); +// getboundsCount = 0; +// DoSelectedTracks( GetboundsDoIt ); +// orig.x = (getboundsLo.x+getboundsHi.x)/2.0; +// orig.y = (getboundsLo.y+getboundsHi.y)/2.0; + orig.x = (low.x+high.x)/2.0; + orig.y = (low.y+high.y)/2.0; + /*printf( "orig = [%0.3f %0.3f], baseAngle = %0.3f\n", orig.x, orig.y, baseAngle );*/ } - } - return C_CONTINUE; - case C_MOVE: - DYNARR_RESET(trkSeg_t,anchors_da); - ep1=-1; - ep2=-1; - if ( rotateAlignState == 1 ) - return C_CONTINUE; - if ( rotateAlignState == 2 ) { - pos1 = pos; - onTrackInSplit = TRUE; - trk = OnTrack( &pos, TRUE, FALSE ); - onTrackInSplit = FALSE; - if ( trk == NULL ) - return C_CONTINUE; + } else { if ( GetTrkSelected(trk) ) { ErrorMessage( MSG_2ND_TRACK_MUST_BE_UNSELECTED ); - return C_CONTINUE; + angle = 0; + } else { + angle = NormalizeAngle(angle1-baseAngle); + //if ( angle > 90 && angle < 270 ) + // angle = NormalizeAngle( angle + 180.0 ); + //if ( NormalizeAngle( FindAngle( base, pos1 ) - angle1 ) < 180.0 ) + // angle = NormalizeAngle( angle + 180.0 ); + /*printf( "angle 1 = %0.3f\n", angle );*/ + if ( angle1 > 180.0 ) { angle1 -= 180.0; } + InfoMessage( _("Angle %0.3f"), angle1 ); } - angle1 = NormalizeAngle( GetAngleAtPoint( trk, pos, NULL, NULL ) ); - angle = NormalizeAngle(angle1-baseAngle); - if ( angle > 90 && angle < 270 ) - angle = NormalizeAngle( angle + 180.0 ); - if ( NormalizeAngle( FindAngle( pos, pos1 ) - angle1 ) < 180.0 ) - angle = NormalizeAngle( angle + 180.0 ); - if ( angle1 > 180.0 ) angle1 -= 180.0; - InfoMessage( _("Angle %0.3f"), angle1 ); + GetMovedTracks(TRUE); SetMoveD( FALSE, orig, angle ); -/*printf( "angle 2 = %0.3f\n", angle );*/ + } + } + return C_CONTINUE; + case C_MOVE: + DYNARR_RESET(trkSeg_t,anchors_da); + ep1=-1; + ep2=-1; + if ( rotateAlignState == 1 ) { + return C_CONTINUE; + } + if ( rotateAlignState == 2 ) { + pos1 = pos; + onTrackInSplit = TRUE; + trk = OnTrack( &pos, TRUE, FALSE ); + onTrackInSplit = FALSE; + if ( trk == NULL ) { return C_CONTINUE; } - ANGLE_T diff_angle = 0.0; - base = pos; - drawEnable = enableMoveDraw; - if ( FindDistance( orig, pos ) > (20.0/BASE_DPI)*mainD.scale ) { - ANGLE_T old_angle = angle; - angle = FindAngle( orig, pos ); - if (!drawnAngle) { - baseAngle = angle; - drawnAngle = TRUE; - direction_set = FALSE; + if ( GetTrkSelected(trk) ) { + ErrorMessage( MSG_2ND_TRACK_MUST_BE_UNSELECTED ); + return C_CONTINUE; + } + angle1 = NormalizeAngle( GetAngleAtPoint( trk, pos, NULL, NULL ) ); + angle = NormalizeAngle(angle1-baseAngle); + if ( angle > 90 && angle < 270 ) { + angle = NormalizeAngle( angle + 180.0 ); + } + if ( NormalizeAngle( FindAngle( pos, pos1 ) - angle1 ) < 180.0 ) { + angle = NormalizeAngle( angle + 180.0 ); + } + if ( angle1 > 180.0 ) { angle1 -= 180.0; } + InfoMessage( _("Angle %0.3f"), angle1 ); + SetMoveD( FALSE, orig, angle ); + /*printf( "angle 2 = %0.3f\n", angle );*/ + return C_CONTINUE; + } + ANGLE_T diff_angle = 0.0; + base = pos; + drawEnable = enableMoveDraw; + if ( FindDistance( orig, pos ) > (20.0/BASE_DPI)*mainD.scale ) { + ANGLE_T old_angle = angle; + angle = FindAngle( orig, pos ); + if (!drawnAngle) { + baseAngle = angle; + drawnAngle = TRUE; + direction_set = FALSE; + } else { + if (!direction_set) { + if (DifferenceBetweenAngles(baseAngle,angle)>=0) { clockwise = TRUE; } + else { clockwise = FALSE; } + direction_set = TRUE; } else { - if (!direction_set) { - if (DifferenceBetweenAngles(baseAngle,angle)>=0) clockwise = TRUE; - else clockwise = FALSE; - direction_set = TRUE; + if (clockwise) { + if (DifferenceBetweenAngles(baseAngle,angle)<0 + && fabs(DifferenceBetweenAngles(baseAngle, old_angle))<5) { + clockwise = FALSE; + } } else { - if (clockwise) { - if (DifferenceBetweenAngles(baseAngle,angle)<0 && fabs(DifferenceBetweenAngles(baseAngle, old_angle))<5) - clockwise = FALSE; - } else { - if (DifferenceBetweenAngles(baseAngle,angle)>=0 && fabs(DifferenceBetweenAngles(baseAngle,old_angle))<5) - clockwise = TRUE; + if (DifferenceBetweenAngles(baseAngle,angle)>=0 + && fabs(DifferenceBetweenAngles(baseAngle,old_angle))<5) { + clockwise = TRUE; } } } - orig_base = base = pos; - //angle = NormalizeAngle( angle-baseAngle ); - diff_angle = DifferenceBetweenAngles(baseAngle,angle); - if ( (MyGetKeyState() & (WKEY_CTRL|WKEY_SHIFT)) == (WKEY_CTRL|WKEY_SHIFT) ) { //Both Shift+Ctrl - if (clockwise) { - if (diff_angle<0) diff_angle+=360; - } else { - if (diff_angle>0) diff_angle-=360; - } - diff_angle = floor((diff_angle+7.5)/15.0)*15.0; - angle = baseAngle+diff_angle; + } + orig_base = base = pos; + //angle = NormalizeAngle( angle-baseAngle ); + diff_angle = DifferenceBetweenAngles(baseAngle,angle); + if ( (MyGetKeyState() & (WKEY_CTRL|WKEY_SHIFT)) == + (WKEY_CTRL|WKEY_SHIFT) ) { //Both Shift+Ctrl + if (clockwise) { + if (diff_angle<0) { diff_angle+=360; } + } else { + if (diff_angle>0) { diff_angle-=360; } } - Translate( &base, orig, angle, FindDistance(orig,pos) ); //Line one - Translate( &orig_base,orig, baseAngle, FindDistance(orig,pos)<=(60.0/BASE_DPI*mainD.scale)?FindDistance(orig,pos):60.0/BASE_DPI*mainD.scale ); //Line two - SetMoveD( FALSE, orig, NormalizeAngle( angle-baseAngle ) ); - if (((MyGetKeyState()&(WKEY_ALT)) == WKEY_ALT) != magneticSnap) { //Just Shift - if (FindEndIntersection(zero,orig,NormalizeAngle( angle-baseAngle ),&t1,&ep1,&t2,&ep2)) { - coOrd pos2 = GetTrkEndPos(t2,ep2); - coOrd pos1 = GetTrkEndPos(t1,ep1); - Rotate(&pos2,orig,NormalizeAngle( angle-baseAngle )); - CreateEndAnchor(pos2,FALSE); - CreateEndAnchor(pos1,TRUE); - } + diff_angle = floor((diff_angle+7.5)/15.0)*15.0; + angle = baseAngle+diff_angle; + } + Translate( &base, orig, angle, FindDistance(orig,pos) ); //Line one + Translate( &orig_base,orig, baseAngle, FindDistance(orig, + pos)<=(60.0/BASE_DPI*mainD.scale)?FindDistance(orig, + pos):60.0/BASE_DPI*mainD.scale ); //Line two + SetMoveD( FALSE, orig, NormalizeAngle( angle-baseAngle ) ); + if (((MyGetKeyState()&(WKEY_ALT)) == WKEY_ALT) != magneticSnap) { //Just Shift + if (FindEndIntersection(zero,orig,NormalizeAngle( angle-baseAngle ),&t1,&ep1, + &t2,&ep2)) { + coOrd pos2 = GetTrkEndPos(t2,ep2); + coOrd pos1 = GetTrkEndPos(t1,ep1); + Rotate(&pos2,orig,NormalizeAngle( angle-baseAngle )); + CreateEndAnchor(pos2,FALSE); + CreateEndAnchor(pos1,TRUE); } + } #ifdef DRAWCOUNT - InfoMessage( _("Angle %0.3f #%ld"), fabs(diff_angle), drawCount ); + InfoMessage( _("Angle %0.3f #%ld"), fabs(diff_angle), drawCount ); #else - InfoMessage( _("Angle %0.3f %s"), fabs(diff_angle), clockwise?"Clockwise":"Counter-Clockwise" ); + InfoMessage( _("Angle %0.3f %s"), fabs(diff_angle), + clockwise?"Clockwise":"Counter-Clockwise" ); #endif - wFlush(); - drawEnable = TRUE; - } else - InfoMessage( _("Origin Set. Drag away to set start angle")); + wFlush(); + drawEnable = TRUE; + } else { + InfoMessage( _("Origin Set. Drag away to set start angle")); + } - return C_CONTINUE; + return C_CONTINUE; - case C_UP: - DYNARR_RESET(trkSeg_t,anchors_da); - state = 0; - if (t1 && ep1>=0 && t2 && ep2>=0) { - MoveToJoin(t2,ep2,t1,ep1); - CleanSegs(&tempSegs_da); - rotateAlignState = 0; - } else { - if ( rotateAlignState == 1 ) { - if ( trk && GetTrkSelected(trk) ) { - InfoMessage( _("Align: Click on the 2nd unselected object") ); - rotateAlignState = 2; - } - return C_CONTINUE; - } - CleanSegs(&tempSegs_da); - if ( rotateAlignState == 2 ) { - MoveTracks( FALSE, FALSE, TRUE, zero, orig, angle, TRUE ); - rotateAlignState = 0; - } else if (drawnAngle) { - MoveTracks( FALSE, FALSE, TRUE, zero, orig, NormalizeAngle( angle-baseAngle ), TRUE ); + case C_UP: + DYNARR_RESET(trkSeg_t,anchors_da); + state = 0; + if (t1 && ep1>=0 && t2 && ep2>=0) { + MoveToJoin(t2,ep2,t1,ep1); + CleanSegs(&tempSegs_da); + rotateAlignState = 0; + } else { + if ( rotateAlignState == 1 ) { + if ( trk && GetTrkSelected(trk) ) { + InfoMessage( _("Align: Click on the 2nd unselected object") ); + rotateAlignState = 2; } + return C_CONTINUE; } - UndoEnd(); - RemoveEndCornus(); - tlist_da.cnt = 0; - return C_TERMINATE; + CleanSegs(&tempSegs_da); + if ( rotateAlignState == 2 ) { + MoveTracks( FALSE, FALSE, TRUE, zero, orig, angle, TRUE ); + rotateAlignState = 0; + } else if (drawnAngle) { + MoveTracks( FALSE, FALSE, TRUE, zero, orig, NormalizeAngle( angle-baseAngle ), + TRUE ); + } + } + UndoEnd(); + RemoveEndCornus(); + DYNARR_RESET( track_p, tlist_da ); + return C_TERMINATE; - case C_CMDMENU: - base = pos; - trk = OnTrack(&pos, FALSE, FALSE); //Note pollutes pos if turntable - if ((trk) && - QueryTrack(trk,Q_CAN_ADD_ENDPOINTS)) { //Turntable snap to center if within 1/4 radius - trackParams_t trackParams; - if (GetTrackParams(PARAMS_CORNU, trk, pos, &trackParams)) { - DIST_T dist = FindDistance(base, trackParams.ttcenter); - if (dist < trackParams.ttradius/4) { - cmdMenuPos = trackParams.ttcenter; - } + case C_CMDMENU: + base = pos; + trk = OnTrack(&pos, FALSE, FALSE); //Note pollutes pos if turntable + if ((trk) && + QueryTrack(trk, + Q_CAN_ADD_ENDPOINTS)) { //Turntable snap to center if within 1/4 radius + trackParams_t trackParams; + if (GetTrackParams(PARAMS_CORNU, trk, pos, &trackParams)) { + DIST_T dist = FindDistance(base, trackParams.ttcenter); + if (dist < trackParams.ttradius/4) { + cmdMenuPos = trackParams.ttcenter; } } - moveDescPos = pos; - moveDescTrk = trk; - SetUpMenu2(pos,trk); - menuPos = pos; - wMenuPopupShow( selectPopup2M ); - return C_CONTINUE; + } + moveDescPos = pos; + moveDescTrk = trk; + SetUpMenu2(pos,trk); + menuPos = pos; + wMenuPopupShow( selectPopup2M ); + return C_CONTINUE; - case C_TEXT: - if ((action>>8) == 'd') { - panCenter = pos; - LOG( log_pan, 2, ( "PanCenter:Sel-%d %0.3f %0.3f\n", __LINE__, panCenter.x, panCenter.y ) ); - PanHere(I2VP(0)); - } - if ((action>>8) == 'e') { - DoZoomExtents(I2VP(0)); - } - if ((action>>8) == 's') { - DoZoomExtents(I2VP(1)); - } - if ((action>>8) == '0' || (action>>8 == 'o')) { - PanMenuEnter(I2VP('o')); - } + case C_TEXT: + if ((action>>8) == 'd') { + panCenter = pos; + LOG( log_pan, 2, ( "PanCenter:Sel-%d %0.3f %0.3f\n", __LINE__, panCenter.x, + panCenter.y ) ); + PanHere(I2VP(0)); + } + if ((action>>8) == 'e') { + DoZoomExtents(I2VP(0)); + } + if ((action>>8) == 's') { + DoZoomExtents(I2VP(1)); + } + if ((action>>8) == '0' || (action>>8 == 'o')) { + PanMenuEnter(I2VP('o')); + } + break; + case C_REDRAW: + DrawHighlightBoxes(FALSE,FALSE,NULL); + HighlightSelectedTracks(NULL, TRUE, TRUE); + DrawSegsDA( &tempD, NULL, zero, 0.0, &anchors_da, trackGauge, wDrawColorBlack, + 0 ); + /* DO_REDRAW */ + if ( state == 0 ) { break; - case C_REDRAW: - DrawHighlightBoxes(FALSE,FALSE,NULL); - HighlightSelectedTracks(NULL, TRUE, TRUE); - if (anchors_da.cnt) - DrawSegs( &tempD, zero, 0.0, &anchors(0), anchors_da.cnt, trackGauge, wDrawColorBlack ); - /* DO_REDRAW */ - if ( state == 0 ) - break; - if ( rotateAlignState != 2 ) { - DIST_T width = tempD.scale*0.15; - DrawLine( &tempD, base, orig, 0, wDrawColorBlue ); - if (drawnAngle) { - DrawLine( &tempD, orig_base, orig, (wDrawWidth)width/2, wDrawColorBlue ); - ANGLE_T a = DifferenceBetweenAngles(FindAngle(orig, orig_base),FindAngle(orig, base)); - - DIST_T dist = FindDistance(orig,base); - if (dist>(60.0/BASE_DPI)*mainD.scale) dist = (60.0/BASE_DPI)*mainD.scale; - - if (direction_set) { - if (clockwise) { - if (a<0) a = a + 360; - DrawArc( &tempD, orig, dist/2, FindAngle(orig,orig_base), a, FALSE, 0, wDrawColorBlue); - } else { - if (a>0) a = a - 360; - DrawArc( &tempD, orig, dist/2, FindAngle(orig,base), fabs(a), FALSE, 0, wDrawColorBlue); - } - DIST_T d; - d = mainD.scale*0.25; - ANGLE_T arrow_a = NormalizeAngle(FindAngle(orig,orig_base)+a/2); - coOrd arr1,arr2,arr3; - Translate(&arr2,orig,arrow_a,dist/2); - if (clockwise) arrow_a +=90; - else arrow_a -=90; - Translate(&arr1,arr2,arrow_a+135,d/2); - Translate(&arr3,arr2,arrow_a-135,d/2); - DrawLine( &tempD, arr1, arr2, 0, wDrawColorBlue ); - DrawLine( &tempD, arr2, arr3, 0, wDrawColorBlue ); + } + if ( rotateAlignState != 2 ) { + DIST_T width = tempD.scale*0.15; + DrawLine( &tempD, base, orig, 0, wDrawColorBlue ); + if (drawnAngle) { + DrawLine( &tempD, orig_base, orig, (wDrawWidth)width/2, wDrawColorBlue ); + ANGLE_T a = DifferenceBetweenAngles(FindAngle(orig, orig_base),FindAngle(orig, + base)); + + DIST_T dist = FindDistance(orig,base); + if (dist>(60.0/BASE_DPI)*mainD.scale) { dist = (60.0/BASE_DPI)*mainD.scale; } + + if (direction_set) { + if (clockwise) { + if (a<0) { a = a + 360; } + DrawArc( &tempD, orig, dist/2, FindAngle(orig,orig_base), a, FALSE, 0, + wDrawColorBlue); + } else { + if (a>0) { a = a - 360; } + DrawArc( &tempD, orig, dist/2, FindAngle(orig,base), fabs(a), FALSE, 0, + wDrawColorBlue); } + DIST_T d; + d = mainD.scale*0.25; + ANGLE_T arrow_a = NormalizeAngle(FindAngle(orig,orig_base)+a/2); + coOrd arr1,arr2,arr3; + Translate(&arr2,orig,arrow_a,dist/2); + if (clockwise) { arrow_a +=90; } + else { arrow_a -=90; } + Translate(&arr1,arr2,arrow_a+135,d/2); + Translate(&arr3,arr2,arrow_a-135,d/2); + DrawLine( &tempD, arr1, arr2, 0, wDrawColorBlue ); + DrawLine( &tempD, arr2, arr3, 0, wDrawColorBlue ); } - } - DrawMovedTracks(); - break; } + DrawMovedTracks(); + break; + + } return C_CONTINUE; } -static void QuickMove( void* pos) { +static void QuickMove( void* pos) +{ coOrd move_pos = *(coOrd*)pos; DYNARR_RESET(track_p,auto_select_da); - if ( SelectedTracksAreFrozen() ) + if ( SelectedTracksAreFrozen() ) { return; + } wDrawDelayUpdate( mainD.d, TRUE ); GetMovedTracks(FALSE); UndoStart( _("Move Tracks"), "Move Tracks" ); @@ -2372,16 +2297,18 @@ static void QuickMove( void* pos) { wDrawDelayUpdate( mainD.d, FALSE ); } -static track_p SelectTrackByIndex(TRKINX_T ti, char * message ) { +static track_p SelectTrackByIndex(TRKINX_T ti, char * message ) +{ track_p trk = FindTrack(ti); if (trk) { if (!GetLayerFrozen( GetTrkLayer( trk ) ) ) { if (GetLayerModule(GetTrkLayer(trk))) { DoModuleTracks(GetTrkLayer(trk),DrawSingleTrack,TRUE); - snprintf(message, STR_LONG_SIZE, "%s %d",_("In module layer:"),GetTrkLayer(trk)+1); + snprintf(message, STR_LONG_SIZE, "%s %d",_("In module layer:"), + GetTrkLayer(trk)+1); } else { - if (!GetLayerVisible(GetTrkLayer(trk))) FlipLayer(I2VP(GetTrkLayer(trk))); - if (!GetTrkVisible(trk) && drawTunnel==0 ) drawTunnel = 1; //Force DRAW_TUNNEL_DASH + if (!GetLayerVisible(GetTrkLayer(trk))) { FlipLayer(I2VP(GetTrkLayer(trk))); } + if (!GetTrkVisible(trk) && drawTunnel==0 ) { drawTunnel = 1; } //Force DRAW_TUNNEL_DASH SelectOneTrack(trk,TRUE); } } else { @@ -2394,7 +2321,8 @@ static track_p SelectTrackByIndex(TRKINX_T ti, char * message ) { return trk; } -EXPORT void SelectByIndex( void* string) { +EXPORT void SelectByIndex( void* string) +{ char result[STR_LONG_SIZE] = ""; char * message; SetAllTrackSelect(FALSE); @@ -2414,13 +2342,13 @@ EXPORT void SelectByIndex( void* string) { } } cp = strtok(NULL,","); - if (cp) single = FALSE; + if (cp) { single = FALSE; } } DoZoomExtents(I2VP(1)); - if (strlen(result)) + if (strlen(result)) { InfoMessage(result); - else if (single && trk) { + } else if (single && trk) { char msg[STR_SIZE]; DescribeTrack( trk, msg, sizeof msg ); InfoMessage( msg ); @@ -2433,8 +2361,9 @@ static void QuickRotate( void* pangle ) { ANGLE_T angle = (ANGLE_T)VP2L(pangle); DYNARR_RESET(track_p,auto_select_da); - if ( SelectedTracksAreFrozen() ) + if ( SelectedTracksAreFrozen() ) { return; + } wDrawDelayUpdate( mainD.d, TRUE ); GetMovedTracks(FALSE); //DrawSelectedTracksD( &mainD, wDrawColorWhite ); @@ -2457,8 +2386,9 @@ static void ChangeDetailedFlag( void * mode ) if ( ( GetTrkBits( moveDescTrk ) & TB_DETAILDESC ) == 0 ) { ClrTrkBits( moveDescTrk, TB_HIDEDESC ); SetTrkBits( moveDescTrk, TB_DETAILDESC ); - } else + } else { ClrTrkBits( moveDescTrk, TB_DETAILDESC ); + } DrawNewTrack( moveDescTrk ); wDrawDelayUpdate( mainD.d, FALSE ); } @@ -2469,10 +2399,11 @@ static void ChangeDescFlag( void * mode ) UndoStart( _("Toggle Label"), "Modedesc( T%d )", GetTrkIndex(moveDescTrk) ); UndoModify( moveDescTrk ); UndrawNewTrack( moveDescTrk ); - if ( ( GetTrkBits( moveDescTrk ) & TB_HIDEDESC ) == 0 ) + if ( ( GetTrkBits( moveDescTrk ) & TB_HIDEDESC ) == 0 ) { SetTrkBits( moveDescTrk, TB_HIDEDESC ); - else + } else { ClrTrkBits( moveDescTrk, TB_HIDEDESC ); + } DrawNewTrack( moveDescTrk ); wDrawDelayUpdate( mainD.d, FALSE ); } @@ -2481,134 +2412,142 @@ static void ChangeDescFlag( void * mode ) * Mode_o -1 = everything, 0 = elevations only, 1 = descriptions only */ -track_p FindTrackDescription(coOrd pos, EPINX_T * ep_o, int * mode_o, BOOL_T show_hidden, BOOL_T * hidden_o) { - track_p trk = NULL; - DIST_T d, dd = DIST_INF; - track_p trk1 = NULL; - EPINX_T ep1=-1, ep=-1; - BOOL_T hidden_t, hidden; - coOrd dpos = pos; - coOrd cpos; - int mode = -1; - while ( TrackIterate( &trk1 ) ) { - if ( !GetLayerVisible(GetTrkLayer(trk1)) ) - continue; - if ( (!GetTrkVisible(trk1)) && drawTunnel==0 ) - continue; - if ( GetLayerFrozen( GetTrkLayer( trk1 ) )) - continue; - if ( (labelEnable&LABELENABLE_ENDPT_ELEV)!=0 && *mode_o <= 0) { - for ( ep1=0; ep1