Mercurial > MadButterfly
changeset 115:3895d2224e67
Tank
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Sun, 14 Sep 2008 02:17:57 +0800 |
parents | 1909d53071ab |
children | 1d74eb3861b7 |
files | examples/calculator/calculator_scr.svg examples/tank/Makefile examples/tank/brick.svg examples/tank/bullet.svg examples/tank/bush.svg examples/tank/mud.svg examples/tank/rock.svg examples/tank/tank1.svg examples/tank/tank2.svg examples/tank/tank_en.svg examples/tank/tank_main.c src/redraw_man.c |
diffstat | 12 files changed, 1314 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/examples/calculator/calculator_scr.svg Sun Sep 14 01:10:49 2008 +0800 +++ b/examples/calculator/calculator_scr.svg Sun Sep 14 02:17:57 2008 +0800 @@ -2,7 +2,7 @@ <!-- Created with Inkscape (http://www.inkscape.org/) --> <svg xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://web.resource.org/cc/" + xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" @@ -13,18 +13,24 @@ height="400" id="svg2" sodipodi:version="0.32" - inkscape:version="0.45.1" + inkscape:version="0.46" version="1.0" sodipodi:docbase="/usr/home/thinker/progm/MadButterfly/examples/calculator" sodipodi:docname="calculator_scr.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape"> <defs id="defs4"> + <inkscape:perspective + sodipodi:type="inkscape:persp3d" + inkscape:vp_x="0 : 200 : 1" + inkscape:vp_y="0 : 1000 : 0" + inkscape:vp_z="300 : 200 : 1" + inkscape:persp3d-origin="150 : 133.33333 : 1" + id="perspective90" /> <linearGradient - inkscape:collect="always" id="linearGradient3216"> <stop - style="stop-color:#ff0000;stop-opacity:1;" + style="stop-color:#ffd4d4;stop-opacity:1;" offset="0" id="stop3218" /> <stop @@ -33,10 +39,9 @@ id="stop3220" /> </linearGradient> <linearGradient - inkscape:collect="always" id="linearGradient2239"> <stop - style="stop-color:#008080;stop-opacity:1;" + style="stop-color:#b2ffff;stop-opacity:1;" offset="0" id="stop2241" /> <stop @@ -68,7 +73,7 @@ fx="80.211082" fy="60.171638" r="127.14908" - gradientTransform="matrix(1.4193963,-4.1503073e-3,5.8161044e-4,0.1989948,-33.675229,46.406554)" + gradientTransform="matrix(1.4194002,-2.4909992e-3,5.8161044e-4,0.3318039,-33.67554,38.282124)" gradientUnits="userSpaceOnUse" /> <radialGradient inkscape:collect="always" @@ -79,7 +84,7 @@ fx="78.100266" fy="147.99309" r="141.9525" - gradientTransform="matrix(1.1625395,1.9037967,-1.2274429,0.7495301,168.95869,-112.91046)" + gradientTransform="matrix(0.5979392,1.6356879,-0.9218721,0.3369983,167.83177,-30.919239)" gradientUnits="userSpaceOnUse" /> </defs> <sodipodi:namedview @@ -93,16 +98,17 @@ inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="0.9475" - inkscape:cx="150" + inkscape:cx="-225.72559" inkscape:cy="201.83531" inkscape:document-units="px" inkscape:current-layer="layer1" width="300px" height="400px" - inkscape:window-width="822" - inkscape:window-height="609" - inkscape:window-x="192" - inkscape:window-y="23" /> + inkscape:window-width="1440" + inkscape:window-height="860" + inkscape:window-x="0" + inkscape:window-y="21" + showgrid="false" /> <metadata id="metadata7"> <rdf:RDF> @@ -119,7 +125,7 @@ inkscape:groupmode="layer" id="layer1"> <rect - style="opacity:0.5;fill:url(#radialGradient3222);fill-opacity:1.0;stroke:none;stroke-opacity:1" + style="opacity:1;fill:url(#radialGradient3222);fill-opacity:1;stroke:none;stroke-opacity:1" id="rect2227" width="283.905" height="288.12665" @@ -490,7 +496,7 @@ sodipodi:role="line">clr</tspan></text> </g> <rect - style="opacity:0.5;fill:url(#radialGradient2245);stroke:#000000;stroke-opacity:1;fill-opacity:1.0" + style="opacity:1;fill:url(#radialGradient2245);stroke:#000000;stroke-opacity:1;fill-opacity:1" id="rect2264" width="253.29816" height="49.604221"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/tank/Makefile Sun Sep 14 02:17:57 2008 +0800 @@ -0,0 +1,54 @@ +SVGS = brick.svg bullet.svg bush.svg mud.svg rock.svg \ + tank1.svg tank2.svg tank_en.svg +SVGHS = $(SVGS:C/\.svg/.h/) +SVGCS = $(SVGS:C/\.svg/.c/) +SVGOS = $(SVGS:C/\.svg/.o/) +MBS = $(SVGS:C/\.svg/.mb/) +SVG2CODE= svg2code.py +M4 = m4 +M4FLAGS = -I /usr/local/share/mb +LDFLAGS += +LIBS += -lmbfly -lX11 -L/usr/local/lib `pkg-config --libs cairo` +CFLAGS += -I/usr/local/include `pkg-config --cflags cairo` +BIN = tank + +all: tank + +tank: tank_main.o $(SVGOS) + $(CC) $(LDFLAGS) -o $@ $(.ALLSRC) $(LIBS) + +tank_main.o: tank_main.c svgs.h + $(CC) $(CFLAGS) -c tank_main.c + +svgs.h: $(SVGHS) + echo "#ifndef __SVGS_H_" > $@ + echo "#define __SVGS_H_" >> $@ + echo >> $@ + for H in $(SVGHS); do \ + echo "#include \"$$H\"" >> $@; \ + done + echo >> $@ + echo "#endif /* __SVGS_H_ */" >> $@ + +.for SVG in $(SVGS) +$(SVG:C/\.svg/.o/): $(SVG:C/.svg/.c/) + $(CC) $(CFLAGS) -c -o $@ $(.ALLSRC) + +$(SVG:C/\.svg/.mb/): $(SVG) + $(SVG2CODE) $(SVG) $@ + +$(SVG:C/\.svg/.h/): $(SVG:C/\.svg/.mb/) + $(M4) $(M4FLAGS) mb_c_header.m4 $(.ALLSRC) > $@ + +$(SVG:C/\.svg/.c/): $(SVG:C/\.svg/.mb/) + $(M4) $(M4FLAGS) mb_c_source.m4 $(.ALLSRC) > $@ + +.endfor + +clean: + @for f in svgs.h $(SVGHS) $(SVGCS) $(SVGOS) $(MBS) \ + *~ *.core tank tank_main.o; do \ + if [ -e $$f ]; then \ + echo "delete $$f"; rm -f $$f; \ + fi; \ + done
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/tank/brick.svg Sun Sep 14 02:17:57 2008 +0800 @@ -0,0 +1,163 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="50" + height="50" + id="svg4002" + sodipodi:version="0.32" + inkscape:version="0.46" + version="1.0" + sodipodi:docname="brick.svg" + inkscape:output_extension="org.inkscape.output.svg.inkscape"> + <defs + id="defs4004"> + <inkscape:perspective + sodipodi:type="inkscape:persp3d" + inkscape:vp_x="0 : 526.18109 : 1" + inkscape:vp_y="0 : 1000 : 0" + inkscape:vp_z="744.09448 : 526.18109 : 1" + inkscape:persp3d-origin="372.04724 : 350.78739 : 1" + id="perspective4010" /> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + gridtolerance="10000" + guidetolerance="10" + objecttolerance="10" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="1" + inkscape:cx="25" + inkscape:cy="25" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + inkscape:window-width="690" + inkscape:window-height="695" + inkscape:window-x="186" + inkscape:window-y="162" /> + <metadata + id="metadata4007"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1"> + <rect + style="opacity:1;fill:#808000;fill-opacity:1;stroke:#4d4d4d;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect4012" + width="50" + height="50" + x="0" + y="0" /> + <rect + style="opacity:1;fill:#686800;fill-opacity:1;stroke:#501616;stroke-width:1.28507411000000005;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect4016" + width="8.9140596" + height="14.217091" + x="0.57543749" + y="0.90011281" /> + <rect + style="opacity:1;fill:#808000;fill-opacity:1;stroke:#501616;stroke-width:1.28507411;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect4531" + width="8.9140596" + height="14.217091" + x="0.62955022" + y="17.891455" /> + <rect + style="opacity:1;fill:#9d9d00;fill-opacity:1;stroke:#501616;stroke-width:1.28507411000000005;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect4533" + width="8.9140596" + height="14.217091" + x="1.170676" + y="34.666348" /> + <rect + style="opacity:1;fill:#6d6d00;fill-opacity:1;stroke:#501616;stroke-width:1.28507411000000005;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect4535" + width="8.9140596" + height="14.217091" + x="11.019161" + y="9.341671" /> + <rect + style="opacity:1;fill:#808000;fill-opacity:1;stroke:#501616;stroke-width:1.28507411;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect4537" + width="8.9140596" + height="14.217091" + x="10.802711" + y="26.116562" /> + <rect + style="opacity:1;fill:#968400;fill-opacity:1;stroke:#501616;stroke-width:1.28507411000000005;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect4539" + width="8.9140596" + height="14.217091" + x="21.3276" + y="1.1165625" /> + <rect + style="opacity:1;fill:#806600;fill-opacity:1;stroke:#501616;stroke-width:1.28507411000000005;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect4541" + width="8.9140596" + height="14.217091" + x="21.381714" + y="18.107903" /> + <rect + style="opacity:1;fill:#668000;fill-opacity:1;stroke:#501616;stroke-width:1.28507411000000005;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect4543" + width="8.9140596" + height="14.217091" + x="21.922838" + y="34.882801" /> + <rect + style="opacity:1;fill:#7c7c00;fill-opacity:1;stroke:#501616;stroke-width:1.28507411000000005;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect4545" + width="8.9140596" + height="14.217091" + x="40.375225" + y="0.90011221" /> + <rect + style="opacity:1;fill:#6d6d00;fill-opacity:1;stroke:#501616;stroke-width:1.28507411000000005;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect4547" + width="8.9140596" + height="14.217091" + x="40.429337" + y="17.891455" /> + <rect + style="opacity:1;fill:#808000;fill-opacity:1;stroke:#501616;stroke-width:1.28507411;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect4549" + width="8.9140596" + height="14.217091" + x="40.970463" + y="34.666348" /> + <rect + style="opacity:1;fill:#808000;fill-opacity:1;stroke:#501616;stroke-width:1.28507411;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect4551" + width="8.9140596" + height="14.217091" + x="31.149031" + y="9.9369078" /> + <rect + style="opacity:1;fill:#808000;fill-opacity:1;stroke:#501616;stroke-width:1.28507411;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect4553" + width="8.9140596" + height="14.217091" + x="30.932579" + y="26.7118" /> + </g> +</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/tank/bullet.svg Sun Sep 14 02:17:57 2008 +0800 @@ -0,0 +1,88 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="10" + height="10" + id="svg2523" + sodipodi:version="0.32" + inkscape:version="0.46" + version="1.0" + sodipodi:docname="bullet.svg" + inkscape:output_extension="org.inkscape.output.svg.inkscape"> + <defs + id="defs2525"> + <inkscape:perspective + sodipodi:type="inkscape:persp3d" + inkscape:vp_x="0 : 526.18109 : 1" + inkscape:vp_y="0 : 1000 : 0" + inkscape:vp_z="744.09448 : 526.18109 : 1" + inkscape:persp3d-origin="372.04724 : 350.78739 : 1" + id="perspective2531" /> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + gridtolerance="10000" + guidetolerance="10" + objecttolerance="10" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="1" + inkscape:cx="5.3383085" + inkscape:cy="5" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + inkscape:window-width="640" + inkscape:window-height="695" + inkscape:window-x="393" + inkscape:window-y="151" /> + <metadata + id="metadata2528"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1"> + <rect + style="opacity:1;fill:#333333;fill-opacity:1;stroke:#4d4d4d;stroke-width:0.62018234000000005;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect2533" + width="2.2188118" + height="5.6734467" + x="3.9087794" + y="3.5517902" /> + <path + sodipodi:type="star" + style="opacity:1;fill:#333333;fill-opacity:1;stroke:#4d4d4d;stroke-width:1.54299998000000005;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="path2535" + sodipodi:sides="3" + sodipodi:cx="8.1385279" + sodipodi:cy="1.0822511" + sodipodi:r1="5.0263076" + sodipodi:r2="2.5131538" + sodipodi:arg1="0.53303411" + sodipodi:arg2="1.5802317" + inkscape:flatsided="true" + inkscape:rounded="0" + inkscape:randomized="0" + d="M 12.467532,3.6363635 L 3.7620995,3.5542224 L 8.1859521,-3.9438328 L 12.467532,3.6363635 z" + transform="matrix(0.3813576,0,0,0.3735973,1.9227663,2.306617)" /> + </g> +</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/tank/bush.svg Sun Sep 14 02:17:57 2008 +0800 @@ -0,0 +1,109 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="50" + height="50" + id="svg2557" + sodipodi:version="0.32" + inkscape:version="0.46" + version="1.0" + sodipodi:docname="bush.svg" + inkscape:output_extension="org.inkscape.output.svg.inkscape"> + <defs + id="defs2559"> + <inkscape:perspective + sodipodi:type="inkscape:persp3d" + inkscape:vp_x="0 : 526.18109 : 1" + inkscape:vp_y="0 : 1000 : 0" + inkscape:vp_z="744.09448 : 526.18109 : 1" + inkscape:persp3d-origin="372.04724 : 350.78739 : 1" + id="perspective2565" /> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + gridtolerance="10000" + guidetolerance="10" + objecttolerance="10" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="9.24" + inkscape:cx="25" + inkscape:cy="25.183096" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + showguides="true" + inkscape:guide-bbox="true" + inkscape:window-width="690" + inkscape:window-height="695" + inkscape:window-x="208" + inkscape:window-y="72" /> + <metadata + id="metadata2562"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1"> + <rect + style="opacity:1;fill:#17be17;fill-opacity:1;stroke:none;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect5210" + width="50" + height="50" + x="0" + y="0" /> + <path + style="fill:#808000;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M -0.54112551,4.2207792 C -0.56318871,2.7979238 0.49603242,1.1388556 1.7316017,0.43290043 C 5.5721428,-1.7614319 23.980416,-0.65159214 25.541125,5.0865801 C 26.461096,8.4689846 15.727035,4.6090604 13.095238,6.4935065 C 10.62719,8.260703 10.328347,13.552794 7.6839827,15.04329 C 6.2695001,15.840563 3.6350729,16.385006 2.2727273,15.151515 C 0.91038165,13.918024 2.3223338,10.298346 1.7316017,8.3333333 C 1.3257735,6.9833857 -0.51927001,5.6302392 -0.54112551,4.2207792 z" + id="path3367" + sodipodi:nodetypes="csssszss" /> + <path + style="fill:#006100;fill-opacity:1;fill-rule:evenodd;stroke:#008080;stroke-width:1.12751627px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 10.79265,9.4107397 C 12.837556,7.2207423 18.232848,3.8390272 22.231264,5.5367253 C 26.22968,7.2344233 32.048102,17.085836 30.09531,21.032783 C 28.142518,24.979731 22.031252,23.190078 18.656697,22.532401 C 15.282141,21.874724 17.714114,13.019498 8.6479107,16.908832 C -0.37711926,20.780502 8.7477448,11.600737 10.79265,9.4107397 z" + id="path2589" + sodipodi:nodetypes="czzzzz" /> + <path + style="fill:#008000;fill-rule:evenodd;stroke:#008080;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 2.8138528,27.489177 C 2.9900686,24.490905 -1.9308359,20.309524 1.0822511e-08,17.316017 C 1.9308359,14.32251 14.188498,3.5013087 14.718615,11.904762 C 15.249117,20.314324 18.468513,29.313451 27.164502,26.731602 C 35.612158,24.223484 30.983568,41.382471 26.298701,46.320346 C 21.613834,51.258221 3.7962558,52.718621 1.0822511,47.186147 C -1.6317536,41.653674 11.147186,37.662338 11.147186,37.662338 C 11.147186,37.662338 9.4870769,36.624476 2.2727273,38.419914 C -4.9416223,40.215351 2.637637,30.487449 2.8138528,27.489177 z" + id="path2591" + sodipodi:nodetypes="czzzzzczz" /> + <path + style="fill:#00ff00;fill-rule:evenodd;stroke:#008080;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 18.073593,27.380953 C 17.29237,23.764641 29.006378,16.986247 29.437229,13.311688 C 29.861948,9.6894292 21.3317,6.6247616 22.619048,3.2467532 C 23.906396,-0.13125522 34.199134,0.32467532 34.199134,0.32467532 C 34.199134,0.32467532 45.939365,-0.27077303 48.593074,3.2467532 C 51.358543,6.9124186 44.442776,13.593465 44.264069,18.181819 C 44.090958,22.6265 52.285432,29.29073 48.484848,31.601731 C 44.204201,34.204643 38.169485,25.315037 33.549784,23.376624 C 29.989962,21.882933 18.888762,31.154405 18.073593,27.380953 z" + id="path3363" + sodipodi:nodetypes="csscsssss" /> + <path + style="fill:#008000;fill-rule:evenodd;stroke:#000080;stroke-width:1.03012156px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 29.144954,45.42965 C 29.144954,45.42965 21.739571,37.768442 22.310502,33.116133 C 22.881433,28.463823 30.109023,20.742428 34.074723,20.469817 C 38.040422,20.197207 36.796186,26.444527 39.352944,28.651978 C 42.243099,31.147276 46.920317,28.826298 48.527907,32.228672 C 50.135497,35.631046 50.85891,42.92147 48.415866,46.428043 C 46.941441,48.544328 43.741837,48.917517 40.348973,49.534156 C 36.95611,50.150795 25.418131,51.482353 23.542945,47.6483 C 22.874827,46.282251 29.144954,45.42965 29.144954,45.42965 z" + id="path3365" + sodipodi:nodetypes="czzszszsc" /> + <path + style="fill:#008000;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 50.21645,11.904761 C 49.148072,9.8214704 46.060267,7.4399306 43.722943,7.5757576 C 40.618577,7.756159 35.746176,11.177047 35.822511,14.285713 C 35.891856,17.109724 43.290043,20.021644 43.290043,20.021644 C 43.290043,20.021644 36.179053,24.547627 37.554112,26.839826 C 39.483546,30.056158 47.372198,27.115207 49.78355,24.242423 C 52.164626,21.405708 51.906483,15.200253 50.21645,11.904761 z" + id="path3369" + sodipodi:nodetypes="csscsss" /> + <path + style="fill:#280b0b;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 21.459701,25.457866 C 20.391323,23.374575 17.303518,20.993035 14.966194,21.128862 C 11.861828,21.309264 6.9894269,24.730152 7.0657619,27.838818 C 7.1351069,30.662829 14.533294,33.574749 14.533294,33.574749 C 14.533294,33.574749 7.4223039,38.100732 8.7973629,40.392931 C 10.726797,43.609263 18.615449,40.668312 21.026801,37.795528 C 23.407877,34.958813 23.149734,28.753358 21.459701,25.457866 z" + id="path3371" + sodipodi:nodetypes="csscsss" /> + </g> +</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/tank/mud.svg Sun Sep 14 02:17:57 2008 +0800 @@ -0,0 +1,184 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="50" + height="50" + id="svg4595" + sodipodi:version="0.32" + inkscape:version="0.46" + version="1.0" + sodipodi:docname="mud.svg" + inkscape:output_extension="org.inkscape.output.svg.inkscape"> + <defs + id="defs4597"> + <inkscape:perspective + sodipodi:type="inkscape:persp3d" + inkscape:vp_x="0 : 526.18109 : 1" + inkscape:vp_y="0 : 1000 : 0" + inkscape:vp_z="744.09448 : 526.18109 : 1" + inkscape:persp3d-origin="372.04724 : 350.78739 : 1" + id="perspective4603" /> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + gridtolerance="10000" + guidetolerance="10" + objecttolerance="10" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="4.72" + inkscape:cx="25" + inkscape:cy="25" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + inkscape:window-width="690" + inkscape:window-height="695" + inkscape:window-x="381" + inkscape:window-y="55" /> + <metadata + id="metadata4600"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1"> + <rect + style="opacity:1;fill:#765b00;fill-opacity:1;stroke:none;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect4605" + width="50" + height="50" + x="0" + y="0" /> + <path + sodipodi:type="star" + style="opacity:1;fill:#008000;fill-opacity:1;stroke:none;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="path5124" + sodipodi:sides="3" + sodipodi:cx="14.830508" + sodipodi:cy="25.635593" + sodipodi:r1="2.4156258" + sodipodi:r2="1.207813" + sodipodi:arg1="0.90975316" + sodipodi:arg2="1.9569507" + inkscape:flatsided="true" + inkscape:rounded="0" + inkscape:randomized="0" + d="M 16.313559,27.542373 L 12.437663,25.966563 L 15.740302,23.397844 L 16.313559,27.542373 z" + transform="translate(5.0847458,14.194915)" /> + <path + sodipodi:type="star" + style="opacity:1;fill:#008000;fill-opacity:1;stroke:none;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="path5126" + sodipodi:sides="3" + sodipodi:cx="14.830508" + sodipodi:cy="25.635593" + sodipodi:r1="2.4156258" + sodipodi:r2="1.207813" + sodipodi:arg1="0.90975316" + sodipodi:arg2="1.9569507" + inkscape:flatsided="true" + inkscape:rounded="0" + inkscape:randomized="0" + d="M 16.313559,27.542373 L 12.437663,25.966563 L 15.740302,23.397844 L 16.313559,27.542373 z" + transform="translate(27.573541,18.597687)" /> + <path + sodipodi:type="star" + style="opacity:1;fill:#008000;fill-opacity:1;stroke:none;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="path5128" + sodipodi:sides="3" + sodipodi:cx="14.830508" + sodipodi:cy="25.635593" + sodipodi:r1="2.4156258" + sodipodi:r2="1.207813" + sodipodi:arg1="0.90975316" + sodipodi:arg2="1.9569507" + inkscape:flatsided="true" + inkscape:rounded="0" + inkscape:randomized="0" + d="M 16.313559,27.542373 L 12.437663,25.966563 L 15.740302,23.397844 L 16.313559,27.542373 z" + transform="translate(0.8286963,-2.1650238)" /> + <path + sodipodi:type="star" + style="opacity:1;fill:#008000;fill-opacity:1;stroke:none;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="path5130" + sodipodi:sides="3" + sodipodi:cx="14.830508" + sodipodi:cy="25.635593" + sodipodi:r1="2.4156258" + sodipodi:r2="1.207813" + sodipodi:arg1="0.90975316" + sodipodi:arg2="1.9569507" + inkscape:flatsided="true" + inkscape:rounded="0" + inkscape:randomized="0" + d="M 16.313559,27.542373 L 12.437663,25.966563 L 15.740302,23.397844 L 16.313559,27.542373 z" + transform="translate(16.344728,-12.758244)" /> + <path + sodipodi:type="star" + style="opacity:1;fill:#17be17;fill-opacity:1;stroke:none;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="path5132" + sodipodi:sides="3" + sodipodi:cx="14.830508" + sodipodi:cy="25.635593" + sodipodi:r1="2.4156258" + sodipodi:r2="1.207813" + sodipodi:arg1="0.90975316" + sodipodi:arg2="1.9569507" + inkscape:flatsided="true" + inkscape:rounded="0" + inkscape:randomized="0" + d="M 16.313559,27.542373 L 12.437663,25.966563 L 15.740302,23.397844 L 16.313559,27.542373 z" + transform="translate(23.548118,1.0129423)" /> + <path + sodipodi:type="star" + style="opacity:1;fill:#008000;fill-opacity:1;stroke:none;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="path5134" + sodipodi:sides="3" + sodipodi:cx="14.830508" + sodipodi:cy="25.635593" + sodipodi:r1="2.4156258" + sodipodi:r2="1.207813" + sodipodi:arg1="0.90975316" + sodipodi:arg2="1.9569507" + inkscape:flatsided="true" + inkscape:rounded="0" + inkscape:randomized="0" + d="M 16.313559,27.542373 L 12.437663,25.966563 L 15.740302,23.397844 L 16.313559,27.542373 z" + transform="translate(-8.2315434,14.784129)" /> + <path + sodipodi:type="star" + style="opacity:1;fill:#006800;fill-opacity:1;stroke:none;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="path5136" + sodipodi:sides="3" + sodipodi:cx="14.830508" + sodipodi:cy="25.635593" + sodipodi:r1="2.4156258" + sodipodi:r2="1.207813" + sodipodi:arg1="0.90975316" + sodipodi:arg2="1.9569507" + inkscape:flatsided="true" + inkscape:rounded="0" + inkscape:randomized="0" + d="M 16.313559,27.542373 L 12.437663,25.966563 L 15.740302,23.397844 L 16.313559,27.542373 z" + transform="translate(-6.7484922,-18.902312)" /> + </g> +</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/tank/rock.svg Sun Sep 14 02:17:57 2008 +0800 @@ -0,0 +1,132 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="50" + height="50" + id="svg3411" + sodipodi:version="0.32" + inkscape:version="0.46" + version="1.0" + sodipodi:docname="rock.svg" + inkscape:output_extension="org.inkscape.output.svg.inkscape"> + <defs + id="defs3413"> + <inkscape:perspective + sodipodi:type="inkscape:persp3d" + inkscape:vp_x="0 : 526.18109 : 1" + inkscape:vp_y="0 : 1000 : 0" + inkscape:vp_z="744.09448 : 526.18109 : 1" + inkscape:persp3d-origin="372.04724 : 350.78739 : 1" + id="perspective3419" /> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + gridtolerance="10000" + guidetolerance="10" + objecttolerance="10" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="9.24" + inkscape:cx="25" + inkscape:cy="37.987013" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + inkscape:window-width="690" + inkscape:window-height="695" + inkscape:window-x="221" + inkscape:window-y="69" /> + <metadata + id="metadata3416"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1"> + <rect + style="opacity:1;fill:#cccccc;fill-opacity:1;stroke:none;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect3421" + width="50" + height="50" + x="0" + y="0" /> + <path + style="fill:#999999;fill-rule:evenodd;stroke:#4d4d4d;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 0.64935065,3.5714286 C 1.5336421,1.6918446 2.0206975,1.0517362 4.6536797,0.64935065 C 7.2866619,0.24696506 15.386489,1.4669706 16.774892,4.7619048 C 18.163295,8.056839 14.984476,13.250651 12.012987,14.718615 C 9.0414984,16.186579 3.1463736,14.710635 1.1904762,12.445887 C -0.76542122,10.181139 -0.23494082,5.4510126 0.64935065,3.5714286 z" + id="path3932" + sodipodi:nodetypes="czzzzz" /> + <path + style="fill:#ececec;fill-rule:evenodd;stroke:#4d4d4d;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 32.426373,36.647749 C 33.310665,34.768165 33.79772,34.128056 36.430702,33.725671 C 39.063685,33.323285 47.163512,34.543291 48.551915,37.838225 C 49.940318,41.133159 50.765828,47.950348 47.794339,49.418312 C 44.82285,50.886276 34.923396,47.786955 32.967499,45.522207 C 31.011601,43.257459 31.542082,38.527333 32.426373,36.647749 z" + id="path3934" + sodipodi:nodetypes="czzzzz" /> + <path + style="fill:none;fill-rule:evenodd;stroke:#4d4d4d;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 29.937195,3.9637662 C 30.821487,2.0841822 31.308542,1.4440732 33.941524,1.0416882 C 36.574507,0.63930219 44.674334,1.8593082 46.062737,5.1542422 C 47.45114,8.4491762 54.67761,7.5732362 41.300832,15.110952 C 27.924054,22.648668 38.494824,11.315093 36.538927,9.0503452 C 34.58303,6.7855972 29.052904,5.8433502 29.937195,3.9637662 z" + id="path3936" + sodipodi:nodetypes="czzzzz" /> + <path + style="fill:#cccccc;fill-rule:evenodd;stroke:#4d4d4d;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 2.9424294,25.167467 C 3.8267214,23.287883 4.3137764,22.647774 6.9467584,22.245389 C 9.5797414,21.843003 17.679568,23.063009 19.067971,26.357943 C 20.456374,29.652877 27.682844,28.776937 14.306066,36.314652 C 0.92928838,43.852368 11.500058,32.518793 9.5441614,30.254046 C 7.5882644,27.989298 2.0581384,27.047051 2.9424294,25.167467 z" + id="path3938" + sodipodi:nodetypes="czzzzz" /> + <path + style="fill:#b3b3b3;fill-rule:evenodd;stroke:#4d4d4d;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 17.532468,9.5238093 C 17.265211,6.9383573 18.128401,2.3178763 20.562771,1.4069263 C 22.984765,0.50060706 28.138528,5.5194803 28.138528,5.5194803 C 28.138528,5.5194803 33.497934,17.550095 30.194805,20.779221 C 28.855064,22.088947 25.591052,20.835156 24.025974,19.805195 C 20.978574,17.799733 17.90757,13.152559 17.532468,9.5238093 z" + id="path3940" + sodipodi:nodetypes="cscsss" /> + <path + style="fill:#b3b3b3;fill-rule:evenodd;stroke:#4d4d4d;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 33.847054,21.797506 C 32.994763,19.341984 35.380021,15.805234 36.877357,13.680623 C 40.965595,7.8797103 52.528336,10.414204 49.647919,18.875428 C 49.694971,32.036084 53.487602,51.461758 45.42714,36.191445 C 43.700401,32.920188 39.616493,33.759211 40.34056,32.078891 C 45.120358,20.986561 35.157276,25.572368 33.847054,21.797506 z" + id="path3942" + sodipodi:nodetypes="cscsss" /> + <path + style="fill:#808080;fill-rule:evenodd;stroke:#4d4d4d;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 4.5180493,37.381921 C 4.8053964,34.798625 7.917239,41.64217 9.7128545,39.762874 C 13.405384,35.898264 24.239082,33.315767 24.539693,33.702267 C 25.835502,34.07847 27.339515,47.398659 17.180386,48.637333 C 15.320583,48.864094 12.457177,46.471475 11.011555,47.663307 C 3.3778663,53.956844 3.9181712,42.774921 4.5180493,37.381921 z" + id="path3944" + sodipodi:nodetypes="cscsss" /> + <path + style="fill:#666666;fill-rule:evenodd;stroke:#4d4d4d;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 19.669565,25.044259 C 19.402308,22.458807 21.950997,21.165438 24.539695,20.931705 C 27.444709,20.669412 40.287849,23.603126 39.90766,23.096207 C 39.90766,23.096207 42.236763,28.957991 38.933634,32.187117 C 37.593893,33.496843 27.728149,36.355606 26.163071,35.325645 C 23.115671,33.320183 20.044667,28.673009 19.669565,25.044259 z" + id="path3946" + sodipodi:nodetypes="cscsss" /> + <path + style="fill:#666666;fill-rule:evenodd;stroke:#4d4d4d;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M -0.76780168,18.56745 C -1.0350587,15.981998 1.5136303,14.688629 4.1023283,14.454896 C 7.0073423,14.192603 16.603729,10.957486 19.470293,16.619398 C 20.273782,16.681205 18.077541,20.947982 19.253843,23.221131 C 20.652402,25.92378 4.2320251,18.496451 1.8296004,25.602083 C 0.66115474,29.057985 -0.39269968,22.1962 -0.76780168,18.56745 z" + id="path3948" + sodipodi:nodetypes="cscsss" /> + <path + style="fill:#cccccc;fill-rule:evenodd;stroke:#4d4d4d;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 16.254117,36.422878 C 17.138409,34.543294 17.625464,33.903185 20.258446,33.5008 C 22.891429,33.098414 30.991256,34.31842 32.379659,37.613354 C 33.768062,40.908288 42.350244,49.544459 28.483555,50.275691 C 14.616866,51.006922 24.811746,43.774204 22.855849,41.509457 C 20.899952,39.24471 15.369826,38.302462 16.254117,36.422878 z" + id="path3950" + sodipodi:nodetypes="czzzzz" /> + <path + style="fill:#b3b3b3;fill-rule:evenodd;stroke:#4d4d4d;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M -0.46030537,33.485818 C -0.72756237,30.900366 0.082782696,26.123752 2.5699976,25.368935 C 6.9124957,24.051078 10.748503,33.789558 8.6306035,34.243394 C 5.2172993,32.536742 2.9786361,42.824598 4.8427246,48.637333 C 5.4148625,50.421414 3.0528243,50.64132 1.4877463,49.611359 C -1.5596539,47.605897 -0.085203369,37.114567 -0.46030537,33.485818 z" + id="path3952" + sodipodi:nodetypes="cscsss" /> + <path + style="fill:#808080;fill-rule:evenodd;stroke:#4d4d4d;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 24.530256,2.2775472 C 24.848134,-0.34183094 31.268055,-0.049109712 30.157962,1.519972 C 27.028209,5.9437811 29.631672,6.7252302 34.703415,5.416075 C 35.999224,5.792278 42.048692,20.194718 31.889563,21.433392 C 30.02976,21.660153 32.577609,10.28485 31.131987,11.476682 C 23.498298,17.770219 23.876541,7.6642864 24.530256,2.2775472 z" + id="path3954" + sodipodi:nodetypes="cscsss" /> + </g> +</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/tank/tank1.svg Sun Sep 14 02:17:57 2008 +0800 @@ -0,0 +1,151 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="50" + height="50" + id="svg2" + sodipodi:version="0.32" + inkscape:version="0.46" + version="1.0" + sodipodi:docname="tank1.svg" + inkscape:output_extension="org.inkscape.output.svg.inkscape"> + <defs + id="defs4"> + <inkscape:perspective + sodipodi:type="inkscape:persp3d" + inkscape:vp_x="0 : 526.18109 : 1" + inkscape:vp_y="0 : 1000 : 0" + inkscape:vp_z="744.09448 : 526.18109 : 1" + inkscape:persp3d-origin="372.04724 : 350.78739 : 1" + id="perspective10" /> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + gridtolerance="10000" + guidetolerance="10" + objecttolerance="10" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="9.24" + inkscape:cx="25" + inkscape:cy="25" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + inkscape:window-width="640" + inkscape:window-height="695" + inkscape:window-x="392" + inkscape:window-y="87" /> + <metadata + id="metadata7"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1"> + <rect + style="opacity:1;fill:#4d4d4d;fill-opacity:1;stroke:#4d4d4d;stroke-width:1.54299998;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect2401" + width="9.5238094" + height="30.735931" + x="36.255413" + y="17.207792" + rx="4.0359654" + ry="3.5442207" /> + <path + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 36.580085,23.701297 C 36.580085,23.701297 36.098484,21.320345 41.017315,21.320345 C 46.044371,21.320345 45.562769,23.701298 45.562769,23.701298" + id="path2403" + sodipodi:nodetypes="czz" /> + <path + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 36.417979,20.887444 C 36.417979,20.887444 35.936378,18.506492 40.855209,18.506492 C 45.882265,18.506492 45.400663,20.887445 45.400663,20.887445" + id="path2407" + sodipodi:nodetypes="czz" /> + <rect + style="opacity:1;fill:#4d4d4d;fill-opacity:1;stroke:#4d4d4d;stroke-width:1.54299998;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect2383" + width="9.5238094" + height="30.735931" + x="5.8441558" + y="17.099569" + rx="4.0359654" + ry="3.5442207" /> + <path + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 6.1688307,23.593073 C 6.1688307,23.593073 5.6872297,21.212121 10.60606,21.212121 C 15.633116,21.212121 15.151514,23.593074 15.151514,23.593074" + id="path2387" + sodipodi:nodetypes="czz" /> + <g + id="track_mark"> + <path + sodipodi:nodetypes="czz" + id="path2405" + d="M 36.634429,26.94805 C 36.634429,26.94805 36.152828,24.567098 41.071659,24.567098 C 46.098715,24.567098 45.617113,26.948051 45.617113,26.948051" + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> + <path + sodipodi:nodetypes="czz" + id="path2389" + d="M 6.2231747,26.839826 C 6.2231747,26.839826 5.7415737,24.458874 10.660404,24.458874 C 15.68746,24.458874 15.205858,26.839827 15.205858,26.839827" + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> + </g> + <path + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 6.0067247,20.77922 C 6.0067247,20.77922 5.5251237,18.398268 10.443954,18.398268 C 15.47101,18.398268 14.989408,20.779221 14.989408,20.779221" + id="path2391" + sodipodi:nodetypes="czz" /> + <rect + style="opacity:1;fill:#008000;fill-opacity:1;stroke:#280b0b;stroke-width:1.54299998000000005;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect2459" + width="20.779221" + height="29.761906" + x="15.367966" + y="16.883118" + rx="3.6192379" + ry="4.8849683" /> + <g + id="gun"> + <rect + y="3.7839231" + x="24.022018" + height="16.67458" + width="3.6875651" + id="rect2413" + style="opacity:1;fill:#b3b3b3;fill-opacity:1;stroke:#4d4d4d;stroke-width:1.53508842;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> + <rect + y="2.5974026" + x="22.186148" + height="2.1645021" + width="7.1428571" + id="rect2415" + style="opacity:1;fill:#501616;fill-opacity:1;stroke:#280b0b;stroke-width:1.54299998;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> + </g> + <rect + style="opacity:1;fill:#501616;fill-opacity:1;stroke:#280b0b;stroke-width:2.16263962;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect2417" + width="9.661747" + height="7.9301443" + x="21.52194" + y="31.478651" + rx="3.6192379" + ry="4.8849683" /> + </g> +</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/tank/tank2.svg Sun Sep 14 02:17:57 2008 +0800 @@ -0,0 +1,151 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="50" + height="50" + id="svg2" + sodipodi:version="0.32" + inkscape:version="0.46" + version="1.0" + sodipodi:docname="tank2.svg" + inkscape:output_extension="org.inkscape.output.svg.inkscape"> + <defs + id="defs4"> + <inkscape:perspective + sodipodi:type="inkscape:persp3d" + inkscape:vp_x="0 : 526.18109 : 1" + inkscape:vp_y="0 : 1000 : 0" + inkscape:vp_z="744.09448 : 526.18109 : 1" + inkscape:persp3d-origin="372.04724 : 350.78739 : 1" + id="perspective10" /> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + gridtolerance="10000" + guidetolerance="10" + objecttolerance="10" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="1" + inkscape:cx="25" + inkscape:cy="25" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + inkscape:window-width="640" + inkscape:window-height="695" + inkscape:window-x="392" + inkscape:window-y="87" /> + <metadata + id="metadata7"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1"> + <rect + style="opacity:1;fill:#4d4d4d;fill-opacity:1;stroke:#4d4d4d;stroke-width:1.54299998;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect2401" + width="9.5238094" + height="30.735931" + x="36.255413" + y="17.207792" + rx="4.0359654" + ry="3.5442207" /> + <path + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 36.580085,23.701297 C 36.580085,23.701297 36.098484,21.320345 41.017315,21.320345 C 46.044371,21.320345 45.562769,23.701298 45.562769,23.701298" + id="path2403" + sodipodi:nodetypes="czz" /> + <path + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 36.417979,20.887444 C 36.417979,20.887444 35.936378,18.506492 40.855209,18.506492 C 45.882265,18.506492 45.400663,20.887445 45.400663,20.887445" + id="path2407" + sodipodi:nodetypes="czz" /> + <rect + style="opacity:1;fill:#4d4d4d;fill-opacity:1;stroke:#4d4d4d;stroke-width:1.54299998;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect2383" + width="9.5238094" + height="30.735931" + x="5.8441558" + y="17.099569" + rx="4.0359654" + ry="3.5442207" /> + <path + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 6.1688307,23.593073 C 6.1688307,23.593073 5.6872297,21.212121 10.60606,21.212121 C 15.633116,21.212121 15.151514,23.593074 15.151514,23.593074" + id="path2387" + sodipodi:nodetypes="czz" /> + <g + id="track_mark"> + <path + sodipodi:nodetypes="czz" + id="path2405" + d="M 36.634429,26.94805 C 36.634429,26.94805 36.152828,24.567098 41.071659,24.567098 C 46.098715,24.567098 45.617113,26.948051 45.617113,26.948051" + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> + <path + sodipodi:nodetypes="czz" + id="path2389" + d="M 6.2231747,26.839826 C 6.2231747,26.839826 5.7415737,24.458874 10.660404,24.458874 C 15.68746,24.458874 15.205858,26.839827 15.205858,26.839827" + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> + </g> + <path + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 6.0067247,20.77922 C 6.0067247,20.77922 5.5251237,18.398268 10.443954,18.398268 C 15.47101,18.398268 14.989408,20.779221 14.989408,20.779221" + id="path2391" + sodipodi:nodetypes="czz" /> + <rect + style="opacity:1;fill:#ff2a2a;fill-opacity:1;stroke:#280b0b;stroke-width:1.54299998000000005;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect2459" + width="20.779221" + height="29.761906" + x="15.367966" + y="16.883118" + rx="3.6192379" + ry="4.8849683" /> + <g + id="gun"> + <rect + y="3.7839231" + x="24.022018" + height="16.67458" + width="3.6875651" + id="rect2413" + style="fill:#ff8080;fill-opacity:1;stroke:#4d4d4d;stroke-width:1.53508842;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> + <rect + y="2.5974026" + x="22.186148" + height="2.1645021" + width="7.1428571" + id="rect2415" + style="fill:#501616;fill-opacity:1;stroke:#280b0b;stroke-width:1.54299998;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> + </g> + <rect + style="opacity:1;fill:#501616;fill-opacity:1;stroke:#280b0b;stroke-width:2.16263962;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect2417" + width="9.661747" + height="7.9301443" + x="21.52194" + y="31.478651" + rx="3.6192379" + ry="4.8849683" /> + </g> +</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/tank/tank_en.svg Sun Sep 14 02:17:57 2008 +0800 @@ -0,0 +1,151 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="50" + height="50" + id="svg2" + sodipodi:version="0.32" + inkscape:version="0.46" + version="1.0" + sodipodi:docname="tank_en.svg" + inkscape:output_extension="org.inkscape.output.svg.inkscape"> + <defs + id="defs4"> + <inkscape:perspective + sodipodi:type="inkscape:persp3d" + inkscape:vp_x="0 : 526.18109 : 1" + inkscape:vp_y="0 : 1000 : 0" + inkscape:vp_z="744.09448 : 526.18109 : 1" + inkscape:persp3d-origin="372.04724 : 350.78739 : 1" + id="perspective10" /> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + gridtolerance="10000" + guidetolerance="10" + objecttolerance="10" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="1" + inkscape:cx="25" + inkscape:cy="25" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + inkscape:window-width="640" + inkscape:window-height="695" + inkscape:window-x="392" + inkscape:window-y="87" /> + <metadata + id="metadata7"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1"> + <rect + style="opacity:1;fill:#4d4d4d;fill-opacity:1;stroke:#4d4d4d;stroke-width:1.54299998;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect2401" + width="9.5238094" + height="30.735931" + x="36.255413" + y="17.207792" + rx="4.0359654" + ry="3.5442207" /> + <path + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 36.580085,23.701297 C 36.580085,23.701297 36.098484,21.320345 41.017315,21.320345 C 46.044371,21.320345 45.562769,23.701298 45.562769,23.701298" + id="path2403" + sodipodi:nodetypes="czz" /> + <path + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 36.417979,20.887444 C 36.417979,20.887444 35.936378,18.506492 40.855209,18.506492 C 45.882265,18.506492 45.400663,20.887445 45.400663,20.887445" + id="path2407" + sodipodi:nodetypes="czz" /> + <rect + style="opacity:1;fill:#4d4d4d;fill-opacity:1;stroke:#4d4d4d;stroke-width:1.54299998;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect2383" + width="9.5238094" + height="30.735931" + x="5.8441558" + y="17.099569" + rx="4.0359654" + ry="3.5442207" /> + <path + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 6.1688307,23.593073 C 6.1688307,23.593073 5.6872297,21.212121 10.60606,21.212121 C 15.633116,21.212121 15.151514,23.593074 15.151514,23.593074" + id="path2387" + sodipodi:nodetypes="czz" /> + <g + id="track_mark"> + <path + sodipodi:nodetypes="czz" + id="path2405" + d="M 36.634429,26.94805 C 36.634429,26.94805 36.152828,24.567098 41.071659,24.567098 C 46.098715,24.567098 45.617113,26.948051 45.617113,26.948051" + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> + <path + sodipodi:nodetypes="czz" + id="path2389" + d="M 6.2231747,26.839826 C 6.2231747,26.839826 5.7415737,24.458874 10.660404,24.458874 C 15.68746,24.458874 15.205858,26.839827 15.205858,26.839827" + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> + </g> + <path + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 6.0067247,20.77922 C 6.0067247,20.77922 5.5251237,18.398268 10.443954,18.398268 C 15.47101,18.398268 14.989408,20.779221 14.989408,20.779221" + id="path2391" + sodipodi:nodetypes="czz" /> + <rect + style="opacity:1;fill:#808000;fill-opacity:1;stroke:#280b0b;stroke-width:1.54299998000000005;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect2459" + width="20.779221" + height="29.761906" + x="15.367966" + y="16.883118" + rx="3.6192379" + ry="4.8849683" /> + <g + id="gun"> + <rect + y="3.7839231" + x="24.022018" + height="16.67458" + width="3.6875651" + id="rect2413" + style="fill:#808000;fill-opacity:1;stroke:#4d4d4d;stroke-width:1.53508842;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> + <rect + y="2.5974026" + x="22.186148" + height="2.1645021" + width="7.1428571" + id="rect2415" + style="fill:#501616;fill-opacity:1;stroke:#280b0b;stroke-width:1.54299998;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> + </g> + <rect + style="opacity:1;fill:#501616;fill-opacity:1;stroke:#280b0b;stroke-width:2.16263962;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect2417" + width="9.661747" + height="7.9301443" + x="21.52194" + y="31.478651" + rx="3.6192379" + ry="4.8849683" /> + </g> +</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/tank/tank_main.c Sun Sep 14 02:17:57 2008 +0800 @@ -0,0 +1,109 @@ +#include <mb/mb.h> +#include "svgs.h" + +enum { MUD, ROC, BRI, BSH }; + +static char map[12][16] = { + { MUD, MUD, MUD, MUD, MUD, MUD, MUD, MUD, + MUD, MUD, MUD, MUD, MUD, MUD, MUD, MUD}, + { MUD, ROC, ROC, ROC, MUD, BSH, BSH, ROC, + BSH, ROC, MUD, BSH, BSH, ROC, ROC, MUD}, + { MUD, MUD, BRI, MUD, MUD, MUD, MUD, MUD, + MUD, MUD, MUD, BRI, MUD, MUD, BSH, MUD}, + { BRI, MUD, MUD, MUD, MUD, MUD, BRI, MUD, + BRI, MUD, MUD, MUD, MUD, MUD, MUD, MUD}, + { MUD, MUD, BRI, MUD, BRI, BSH, BRI, BRI, + BRI, BRI, BSH, ROC, ROC, MUD, BRI, MUD}, + { MUD, BRI, BRI, MUD, BRI, MUD, BRI, MUD, + ROC, MUD, MUD, MUD, MUD, MUD, MUD, MUD}, + { MUD, MUD, MUD, MUD, MUD, MUD, MUD, MUD, + MUD, MUD, MUD, BRI, BRI, BRI, BRI, MUD}, + { MUD, BRI, MUD, BRI, BRI, MUD, BRI, BRI, + BSH, BRI, MUD, MUD, MUD, MUD, MUD, MUD}, + { MUD, BRI, MUD, MUD, MUD, MUD, MUD, MUD, + MUD, MUD, MUD, BRI, BRI, MUD, BRI, BRI}, + { MUD, BRI, MUD, BRI, BRI, MUD, BRI, BRI, + BRI, BRI, MUD, BRI, MUD, MUD, MUD, MUD}, + { MUD, BSH, MUD, BRI, MUD, MUD, BRI, MUD, + MUD, BRI, MUD, MUD, MUD, BRI, BRI, MUD}, + { MUD, MUD, MUD, MUD, MUD, MUD, BRI, MUD, + MUD, BRI, MUD, BRI, MUD, MUD, MUD, MUD} +}; + +typedef struct _tank_rt tank_rt_t; + +struct _tank_rt { + tank1_t *tank1; + tank2_t *tank2; + tank_en_t *tank_en; + void *map[12][16]; + X_MB_runtime_t *mb_rt; +}; + +#define CHANGE_POS(g, x, y) do { \ + (g)->root_coord->matrix[0] = 1.0; \ + (g)->root_coord->matrix[2] = x; \ + (g)->root_coord->matrix[4] = 1.0; \ + (g)->root_coord->matrix[5] = y; \ + rdman_coord_changed(rdman, (g)->root_coord); \ + } while(0) + +void +initial_tank(tank_rt_t *tank_rt, X_MB_runtime_t *mb_rt) { + redraw_man_t *rdman; + mud_t *mud; + brick_t *brick; + rock_t *rock; + bush_t *bush; + int i, j; + + rdman = mb_rt->rdman; + + tank_rt->mb_rt = mb_rt; + for(i = 0; i < 12; i++) { + for(j = 0; j < 16; j++) { + switch(map[i][j]) { + case MUD: + mud = mud_new(rdman); + CHANGE_POS(mud, j * 50, i * 50); + tank_rt->map[i][j] = (void *)mud; + break; + case BRI: + brick = brick_new(rdman); + CHANGE_POS(brick, j * 50, i * 50); + tank_rt->map[i][j] = (void *)brick; + break; + case ROC: + rock = rock_new(rdman); + CHANGE_POS(rock, j * 50, i * 50); + tank_rt->map[i][j] = (void *)rock; + break; + case BSH: + bush = bush_new(rdman); + CHANGE_POS(bush, j * 50, i * 50); + tank_rt->map[i][j] = (void *)bush; + break; + } + } + } + + tank_rt->tank1 = tank1_new(rdman); + tank_rt->tank2 = tank2_new(rdman); + CHANGE_POS(tank_rt->tank2, 50, 0); + tank_rt->tank_en = tank_en_new(rdman); + CHANGE_POS(tank_rt->tank_en, 100, 0); +} + +int +main(int argc, char *const argv[]) { + X_MB_runtime_t rt; + tank_rt_t tank_rt; + + X_MB_init(":0.0", 800, 600, &rt); + + initial_tank(&tank_rt, &rt); + + X_MB_handle_connection(&rt); + + X_MB_destroy(&rt); +}
--- a/src/redraw_man.c Sun Sep 14 01:10:49 2008 +0800 +++ b/src/redraw_man.c Sun Sep 14 02:17:57 2008 +0800 @@ -43,7 +43,7 @@ for(i = 1; i < num; i++) { val = *(unsigned int *)(elms[i] + off); - for(j = i; j > 0; j--) { + for(j = i - 1; j > 0; j--) { if(*(unsigned int *)(elms[j - 1] + off) <= val) break; elms[j] = elms[j - 1];