As an interface to the map format, I made some functions like:
Code: Select all
void axesbegin(FILE *fp, unsigned number) {
fprintf(fp, "\t\t\t<Axes number=\"%u\" normalize=\"false\">\n", number);
}
This is one of the first maps I made with it, and to my knowledge the slowest map ever:
Code: Select all
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE World SYSTEM "map-0.1.dtd">
<World version="0.1">
<Map name="Spiral" version="0.0" author="Jonathan">
<Field>
<Axes number="4" normalize="false">
<Axis xdir="1" ydir="0"/>
<Axis xdir="0" ydir="-1"/>
<Axis xdir="-1" ydir="0"/>
<Axis xdir="0" ydir="1"/>
</Axes>
<Spawn x="20" y="20" xdir="-1" ydir="0"/>
<Wall>
<Point x="0" y="0"/>
<Point x="40" y="0"/>
<Point x="40" y="40"/>
<Point x="-40" y="40"/>
<Point x="-40" y="-40"/>
<Point x="80" y="-40"/>
<Point x="80" y="80"/>
<Point x="-80" y="80"/>
<Point x="-80" y="-80"/>
<Point x="120" y="-80"/>
<Point x="120" y="120"/>
<Point x="-120" y="120"/>
<Point x="-120" y="-120"/>
<Point x="160" y="-120"/>
<Point x="160" y="160"/>
<Point x="-160" y="160"/>
<Point x="-160" y="-160"/>
<Point x="200" y="-160"/>
<Point x="200" y="200"/>
<Point x="-200" y="200"/>
<Point x="-200" y="-200"/>
<Point x="240" y="-200"/>
<Point x="240" y="240"/>
<Point x="-240" y="240"/>
<Point x="-240" y="-240"/>
<Point x="280" y="-240"/>
<Point x="280" y="280"/>
<Point x="-280" y="280"/>
<Point x="-280" y="-280"/>
<Point x="320" y="-280"/>
<Point x="320" y="320"/>
<Point x="-320" y="320"/>
<Point x="-320" y="-320"/>
<Point x="360" y="-320"/>
<Point x="360" y="360"/>
<Point x="-360" y="360"/>
<Point x="-360" y="-360"/>
<Point x="400" y="-360"/>
<Point x="400" y="400"/>
<Point x="-400" y="400"/>
<Point x="-400" y="-400"/>
<Point x="440" y="-400"/>
<Point x="440" y="440"/>
<Point x="-440" y="440"/>
<Point x="-440" y="-440"/>
<Point x="480" y="-440"/>
<Point x="480" y="480"/>
<Point x="-480" y="480"/>
<Point x="-480" y="-480"/>
<Point x="520" y="-480"/>
<Point x="520" y="520"/>
<Point x="-520" y="520"/>
<Point x="-520" y="-520"/>
<Point x="560" y="-520"/>
<Point x="560" y="560"/>
<Point x="-560" y="560"/>
<Point x="-560" y="-560"/>
<Point x="600" y="-560"/>
<Point x="600" y="600"/>
<Point x="-600" y="600"/>
<Point x="-600" y="-600"/>
<Point x="640" y="-600"/>
<Point x="640" y="640"/>
<Point x="-640" y="640"/>
<Point x="-640" y="-640"/>
<Point x="680" y="-640"/>
<Point x="680" y="680"/>
<Point x="-680" y="680"/>
<Point x="-680" y="-680"/>
<Point x="720" y="-680"/>
<Point x="720" y="720"/>
<Point x="-720" y="720"/>
<Point x="-720" y="-720"/>
<Point x="760" y="-720"/>
<Point x="760" y="760"/>
<Point x="-760" y="760"/>
<Point x="-760" y="-760"/>
<Point x="800" y="-760"/>
<Point x="800" y="800"/>
<Point x="-800" y="800"/>
<Point x="-800" y="-800"/>
<Point x="840" y="-800"/>
<Point x="840" y="840"/>
<Point x="-840" y="840"/>
<Point x="-840" y="-840"/>
<Point x="880" y="-840"/>
<Point x="880" y="880"/>
<Point x="-880" y="880"/>
<Point x="-880" y="-880"/>
<Point x="920" y="-880"/>
<Point x="920" y="920"/>
<Point x="-920" y="920"/>
<Point x="-920" y="-920"/>
<Point x="960" y="-920"/>
<Point x="960" y="960"/>
<Point x="-960" y="960"/>
<Point x="-960" y="-960"/>
<Point x="1000" y="-960"/>
<Point x="1000" y="1000"/>
<Point x="-1000" y="1000"/>
<Point x="-1000" y="-1000"/>
<Point x="1040" y="-1000"/>
<Point x="1040" y="1040"/>
<Point x="-1040" y="1040"/>
<Point x="-1040" y="-1040"/>
<Point x="1080" y="-1040"/>
<Point x="1080" y="1080"/>
<Point x="-1080" y="1080"/>
<Point x="-1080" y="-1080"/>
<Point x="1120" y="-1080"/>
<Point x="1120" y="1120"/>
<Point x="-1120" y="1120"/>
<Point x="-1120" y="-1120"/>
<Point x="1160" y="-1120"/>
<Point x="1160" y="1160"/>
<Point x="-1160" y="1160"/>
<Point x="-1160" y="-1160"/>
<Point x="1200" y="-1160"/>
<Point x="1200" y="1200"/>
<Point x="-1200" y="1200"/>
<Point x="-1200" y="-1200"/>
<Point x="1240" y="-1200"/>
<Point x="1240" y="1240"/>
<Point x="-1240" y="1240"/>
<Point x="-1240" y="-1240"/>
<Point x="1280" y="-1240"/>
<Point x="1280" y="1280"/>
<Point x="-1280" y="1280"/>
<Point x="-1280" y="-1280"/>
<Point x="1320" y="-1280"/>
<Point x="1320" y="1320"/>
<Point x="-1320" y="1320"/>
<Point x="-1320" y="-1320"/>
<Point x="1360" y="-1320"/>
<Point x="1360" y="1360"/>
<Point x="-1360" y="1360"/>
<Point x="-1360" y="-1360"/>
<Point x="1400" y="-1360"/>
<Point x="1400" y="1400"/>
<Point x="-1400" y="1400"/>
<Point x="-1400" y="-1400"/>
<Point x="1440" y="-1400"/>
<Point x="1440" y="1440"/>
<Point x="-1440" y="1440"/>
<Point x="-1440" y="-1440"/>
<Point x="1480" y="-1440"/>
<Point x="1480" y="1480"/>
<Point x="-1480" y="1480"/>
<Point x="-1480" y="-1480"/>
<Point x="1520" y="-1480"/>
<Point x="1520" y="1520"/>
<Point x="-1520" y="1520"/>
<Point x="-1520" y="-1520"/>
<Point x="1560" y="-1520"/>
<Point x="1560" y="1560"/>
<Point x="-1560" y="1560"/>
<Point x="-1560" y="-1560"/>
<Point x="1600" y="-1560"/>
<Point x="1600" y="1600"/>
<Point x="-1600" y="1600"/>
<Point x="-1600" y="-1600"/>
<Point x="1640" y="-1600"/>
<Point x="1640" y="1640"/>
<Point x="-1640" y="1640"/>
<Point x="-1640" y="-1640"/>
<Point x="1680" y="-1640"/>
<Point x="1680" y="1680"/>
<Point x="-1680" y="1680"/>
<Point x="-1680" y="-1680"/>
<Point x="1720" y="-1680"/>
<Point x="1720" y="1720"/>
<Point x="-1720" y="1720"/>
<Point x="-1720" y="-1720"/>
<Point x="1760" y="-1720"/>
<Point x="1760" y="1760"/>
<Point x="-1760" y="1760"/>
<Point x="-1760" y="-1760"/>
<Point x="1800" y="-1760"/>
<Point x="1800" y="1800"/>
<Point x="-1800" y="1800"/>
<Point x="-1800" y="-1800"/>
<Point x="1840" y="-1800"/>
<Point x="1840" y="1840"/>
<Point x="-1840" y="1840"/>
<Point x="-1840" y="-1840"/>
<Point x="1880" y="-1840"/>
<Point x="1880" y="1880"/>
<Point x="-1880" y="1880"/>
<Point x="-1880" y="-1880"/>
<Point x="1920" y="-1880"/>
<Point x="1920" y="1920"/>
<Point x="-1920" y="1920"/>
<Point x="-1920" y="-1920"/>
<Point x="1960" y="-1920"/>
<Point x="1960" y="1960"/>
<Point x="-1960" y="1960"/>
<Point x="-1960" y="-1960"/>
<Point x="2000" y="-1960"/>
<Point x="2000" y="2000"/>
<Point x="-2000" y="2000"/>
<Point x="-2000" y="-2000"/>
<Point x="2040" y="-2000"/>
<Point x="2040" y="2040"/>
<Point x="-2040" y="2040"/>
<Point x="-2040" y="-2040"/>
<Point x="2080" y="-2040"/>
<Point x="2080" y="2080"/>
<Point x="-2080" y="2080"/>
<Point x="-2080" y="-2080"/>
<Point x="2120" y="-2080"/>
<Point x="2120" y="2120"/>
<Point x="-2120" y="2120"/>
<Point x="-2120" y="-2120"/>
<Point x="2160" y="-2120"/>
<Point x="2160" y="2160"/>
<Point x="-2160" y="2160"/>
<Point x="-2160" y="-2160"/>
<Point x="2200" y="-2160"/>
<Point x="2200" y="2200"/>
<Point x="-2200" y="2200"/>
<Point x="-2200" y="-2200"/>
<Point x="2240" y="-2200"/>
<Point x="2240" y="2240"/>
<Point x="-2240" y="2240"/>
<Point x="-2240" y="-2240"/>
<Point x="2280" y="-2240"/>
<Point x="2280" y="2280"/>
<Point x="-2280" y="2280"/>
<Point x="-2280" y="-2280"/>
<Point x="2320" y="-2280"/>
<Point x="2320" y="2320"/>
<Point x="-2320" y="2320"/>
<Point x="-2320" y="-2320"/>
<Point x="2360" y="-2320"/>
<Point x="2360" y="2360"/>
<Point x="-2360" y="2360"/>
<Point x="-2360" y="-2360"/>
<Point x="2400" y="-2360"/>
<Point x="2400" y="2400"/>
<Point x="-2400" y="2400"/>
<Point x="-2400" y="-2400"/>
<Point x="2440" y="-2400"/>
<Point x="2440" y="2440"/>
<Point x="-2440" y="2440"/>
<Point x="-2440" y="-2440"/>
<Point x="2480" y="-2440"/>
<Point x="2480" y="2480"/>
<Point x="-2480" y="2480"/>
<Point x="-2480" y="-2480"/>
<Point x="2520" y="-2480"/>
<Point x="2520" y="2520"/>
<Point x="-2520" y="2520"/>
<Point x="-2520" y="-2520"/>
<Point x="2560" y="-2520"/>
<Point x="2560" y="2560"/>
<Point x="-2560" y="2560"/>
<Point x="-2560" y="-2560"/>
<Point x="2600" y="-2560"/>
<Point x="2600" y="2600"/>
<Point x="-2600" y="2600"/>
<Point x="-2600" y="-2600"/>
<Point x="2640" y="-2600"/>
<Point x="2640" y="2640"/>
<Point x="-2640" y="2640"/>
<Point x="-2640" y="-2640"/>
<Point x="2680" y="-2640"/>
<Point x="2680" y="2680"/>
<Point x="-2680" y="2680"/>
<Point x="-2680" y="-2680"/>
<Point x="2720" y="-2680"/>
<Point x="2720" y="2720"/>
<Point x="-2720" y="2720"/>
<Point x="-2720" y="-2720"/>
<Point x="2760" y="-2720"/>
<Point x="2760" y="2760"/>
<Point x="-2760" y="2760"/>
<Point x="-2760" y="-2760"/>
<Point x="2800" y="-2760"/>
<Point x="2800" y="2800"/>
<Point x="-2800" y="2800"/>
<Point x="-2800" y="-2800"/>
<Point x="2840" y="-2800"/>
<Point x="2840" y="2840"/>
<Point x="-2840" y="2840"/>
<Point x="-2840" y="-2840"/>
<Point x="2880" y="-2840"/>
<Point x="2880" y="2880"/>
<Point x="-2880" y="2880"/>
<Point x="-2880" y="-2880"/>
<Point x="2920" y="-2880"/>
<Point x="2920" y="2920"/>
<Point x="-2920" y="2920"/>
<Point x="-2920" y="-2920"/>
<Point x="2960" y="-2920"/>
<Point x="2960" y="2960"/>
<Point x="-2960" y="2960"/>
<Point x="-2960" y="-2960"/>
<Point x="3000" y="-2960"/>
<Point x="3000" y="3000"/>
<Point x="-3000" y="3000"/>
<Point x="-3000" y="-3000"/>
<Point x="3040" y="-3000"/>
<Point x="3040" y="3040"/>
<Point x="-3040" y="3040"/>
<Point x="-3040" y="-3040"/>
<Point x="3080" y="-3040"/>
<Point x="3080" y="3080"/>
<Point x="-3080" y="3080"/>
<Point x="-3080" y="-3080"/>
<Point x="3120" y="-3080"/>
<Point x="3120" y="3120"/>
<Point x="-3120" y="3120"/>
<Point x="-3120" y="-3120"/>
<Point x="3160" y="-3120"/>
<Point x="3160" y="3160"/>
<Point x="-3160" y="3160"/>
<Point x="-3160" y="-3160"/>
<Point x="3200" y="-3160"/>
<Point x="3200" y="3200"/>
<Point x="-3200" y="3200"/>
<Point x="-3200" y="-3200"/>
<Point x="3240" y="-3200"/>
<Point x="3240" y="3240"/>
<Point x="-3240" y="3240"/>
<Point x="-3240" y="-3240"/>
<Point x="3280" y="-3240"/>
<Point x="3280" y="3280"/>
<Point x="-3280" y="3280"/>
<Point x="-3280" y="-3280"/>
<Point x="3320" y="-3280"/>
<Point x="3320" y="3320"/>
<Point x="-3320" y="3320"/>
<Point x="-3320" y="-3320"/>
<Point x="3360" y="-3320"/>
<Point x="3360" y="3360"/>
<Point x="-3360" y="3360"/>
<Point x="-3360" y="-3360"/>
<Point x="3400" y="-3360"/>
<Point x="3400" y="3400"/>
<Point x="-3400" y="3400"/>
<Point x="-3400" y="-3400"/>
<Point x="3440" y="-3400"/>
<Point x="3440" y="3440"/>
<Point x="-3440" y="3440"/>
<Point x="-3440" y="-3440"/>
<Point x="3480" y="-3440"/>
<Point x="3480" y="3480"/>
<Point x="-3480" y="3480"/>
<Point x="-3480" y="-3480"/>
<Point x="3520" y="-3480"/>
<Point x="3520" y="3520"/>
<Point x="-3520" y="3520"/>
<Point x="-3520" y="-3520"/>
<Point x="3560" y="-3520"/>
<Point x="3560" y="3560"/>
<Point x="-3560" y="3560"/>
<Point x="-3560" y="-3560"/>
<Point x="3600" y="-3560"/>
<Point x="3600" y="3600"/>
<Point x="-3600" y="3600"/>
<Point x="-3600" y="-3600"/>
<Point x="3640" y="-3600"/>
<Point x="3640" y="3640"/>
<Point x="-3640" y="3640"/>
<Point x="-3640" y="-3640"/>
<Point x="3680" y="-3640"/>
<Point x="3680" y="3680"/>
<Point x="-3680" y="3680"/>
<Point x="-3680" y="-3680"/>
<Point x="3720" y="-3680"/>
<Point x="3720" y="3720"/>
<Point x="-3720" y="3720"/>
<Point x="-3720" y="-3720"/>
<Point x="3760" y="-3720"/>
<Point x="3760" y="3760"/>
<Point x="-3760" y="3760"/>
<Point x="-3760" y="-3760"/>
<Point x="3800" y="-3760"/>
<Point x="3800" y="3800"/>
<Point x="-3800" y="3800"/>
<Point x="-3800" y="-3800"/>
<Point x="3840" y="-3800"/>
<Point x="3840" y="3840"/>
<Point x="-3840" y="3840"/>
<Point x="-3840" y="-3840"/>
<Point x="3880" y="-3840"/>
<Point x="3880" y="3880"/>
<Point x="-3880" y="3880"/>
<Point x="-3880" y="-3880"/>
<Point x="3920" y="-3880"/>
<Point x="3920" y="3920"/>
<Point x="-3920" y="3920"/>
<Point x="-3920" y="-3920"/>
<Point x="3960" y="-3920"/>
<Point x="3960" y="3960"/>
<Point x="-3960" y="3960"/>
<Point x="-3960" y="-3960"/>
<Point x="4000" y="-3960"/>
<Point x="4000" y="4000"/>
<Point x="-4000" y="4000"/>
<Point x="-4000" y="-4000"/>
</Wall>
</Field>
</Map>
</World>
Your turn!