Añadida la capa de fondo al mapa

This commit is contained in:
2022-09-21 21:06:09 +02:00
parent 5f99fe3550
commit 488e603ca5
8 changed files with 324 additions and 133 deletions

View File

@@ -38,7 +38,7 @@ animation=diamond.ani
width=16 width=16
height=16 height=16
x=33 x=33
y=14 y=9
[/diamond] [/diamond]
[/actors] [/actors]

View File

@@ -1,10 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<map version="1.9" tiledversion="1.9.1" orientation="orthogonal" renderorder="right-down" width="40" height="26" tilewidth="8" tileheight="8" infinite="0" nextlayerid="4" nextobjectid="1"> <map version="1.9" tiledversion="1.9.2" orientation="orthogonal" renderorder="right-down" width="40" height="26" tilewidth="8" tileheight="8" infinite="0" nextlayerid="5" nextobjectid="1">
<tileset firstgid="1" source="surface.tsx"/> <tileset firstgid="1" source="surface.tsx"/>
<tileset firstgid="5626" source="tile_class.tsx"/> <tileset firstgid="5626" source="tile_class.tsx"/>
<layer id="1" name="mapa" width="40" height="26"> <layer id="4" name="fondo" width="40" height="26">
<data encoding="csv"> <data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2031,2032,2033,2034,2035,2036,2037,2038,2039,2040,2041,2042,2043,2044,2045,2046,2047,2048,2049,2050,2051,2052,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2031,2032,2033,2034,2035,2036,2037,2038,2039,2040,2041,2042,2043,2044,2045,2046,2047,2048,2049,2050,2051,2052,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2106,2107,2108,2109,2110,2111,2112,2113,2114,2115,2116,2117,2118,2119,2120,2121,2122,2123,2124,2125,2126,2127,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2106,2107,2108,2109,2110,2111,2112,2113,2114,2115,2116,2117,2118,2119,2120,2121,2122,2123,2124,2125,2126,2127,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2181,2182,2183,2184,2185,2186,2187,2188,2189,2190,2191,2192,2193,2194,2195,2196,2197,2198,2199,2200,2201,2202,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2181,2182,2183,2184,2185,2186,2187,2188,2189,2190,2191,2192,2193,2194,2195,2196,2197,2198,2199,2200,2201,2202,0,
@@ -20,7 +25,32 @@
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5628,5628,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,

View File

@@ -1,8 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<map version="1.9" tiledversion="1.9.2" orientation="orthogonal" renderorder="right-down" width="40" height="26" tilewidth="8" tileheight="8" infinite="0" nextlayerid="4" nextobjectid="1"> <map version="1.9" tiledversion="1.9.2" orientation="orthogonal" renderorder="right-down" width="40" height="26" tilewidth="8" tileheight="8" infinite="0" nextlayerid="5" nextobjectid="1">
<tileset firstgid="1" source="surface.tsx"/> <tileset firstgid="1" source="surface.tsx"/>
<tileset firstgid="5626" source="tile_class.tsx"/> <tileset firstgid="5626" source="tile_class.tsx"/>
<layer id="1" name="Mapa" width="40" height="26"> <layer id="4" name="fondo" width="40" height="26">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,2551,2552,2553,2554,2555,2556,2557,2558,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,2626,2627,2628,2629,2630,2631,2632,2633,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,2701,2702,2703,2704,2705,2706,2707,2708,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,2776,2777,2778,2779,2780,2781,2782,2783,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2031,2032,2033,2034,2035,2036,2037,2038,2039,2040,2041,2042,2043,2044,2045,2046,2047,2048,2049,2050,2051,2052,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2106,2107,2108,2109,2110,2111,2112,2113,2114,2115,2116,2117,2118,2119,2120,2121,2122,2123,2124,2125,2126,2127,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2181,2182,2183,2184,2185,2186,2187,2188,2189,2190,2191,2192,2193,2194,2195,2196,2197,2198,2199,2200,2201,2202,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2256,2257,2258,2259,2260,2261,2262,2263,2264,2265,2266,2267,2268,2269,2270,2271,2272,2273,2274,2275,2276,2277,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2331,2332,2333,2334,2335,2336,2337,2338,2339,2340,2341,2342,2343,2344,2345,2346,2347,2348,2349,2350,2351,2352,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2406,2407,2408,2409,2410,2411,2412,2413,2414,2415,2416,2417,2418,2419,2420,2421,2422,2423,2424,2425,2426,2427,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2481,2482,2483,2484,2485,2486,2487,2488,2489,2490,2491,2492,2493,2494,2495,2496,2497,2498,2499,2500,2501,2502,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2557,2558,2559,2560,2561,2562,2563,2564,2565,2566,2567,2568,2569,2570,2571,2572,2573,2574,2575,2576,2577,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<layer id="1" name="mapa" width="40" height="26">
<data encoding="csv"> <data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
@@ -32,7 +62,7 @@
1276,1277,1276,1277,1276,1277,1276,1277,1276,1277,1276,1277,1276,1277,1276,1277,1276,1277,1282,1283,1284,1285,1282,1283,1284,1285,1282,1283,1284,1285,1282,1283,1284,1285,1282,1283,1284,1285,1282,1283 1276,1277,1276,1277,1276,1277,1276,1277,1276,1277,1276,1277,1276,1277,1276,1277,1276,1277,1282,1283,1284,1285,1282,1283,1284,1285,1282,1283,1284,1285,1282,1283,1284,1285,1282,1283,1284,1285,1282,1283
</data> </data>
</layer> </layer>
<layer id="2" name="Colisiones" width="40" height="26"> <layer id="2" name="colisiones" width="40" height="26">
<data encoding="csv"> <data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,

View File

@@ -1,8 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<map version="1.9" tiledversion="1.9.1" orientation="orthogonal" renderorder="right-down" width="40" height="26" tilewidth="8" tileheight="8" infinite="0" nextlayerid="3" nextobjectid="1"> <map version="1.9" tiledversion="1.9.2" orientation="orthogonal" renderorder="right-down" width="40" height="26" tilewidth="8" tileheight="8" infinite="0" nextlayerid="4" nextobjectid="1">
<tileset firstgid="1" source="surface.tsx"/> <tileset firstgid="1" source="surface.tsx"/>
<tileset firstgid="5626" source="tile_class.tsx"/> <tileset firstgid="5626" source="tile_class.tsx"/>
<layer id="1" name="Mapa" width="40" height="26"> <layer id="3" name="fondo" width="40" height="26">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2033,2034,2035,2036,2037,2038,2039,2040,2041,2042,2043,2044,2045,2046,2047,2048,2049,2050,2051,2052,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2108,2109,2110,2111,2112,2113,2114,2115,2116,2117,2118,2119,2120,2121,2122,2123,2124,2125,2126,2127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2183,2184,2185,2186,2187,2188,2189,2190,2191,2192,2193,2194,2195,2196,2197,2198,2199,2200,2201,2202,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2258,2259,2260,2261,2262,2263,2264,2265,2266,2267,2268,2269,2270,2271,2272,2273,2274,2275,2276,2277,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2333,2334,2335,2336,2337,2338,2339,2340,2341,2342,2343,2344,2345,2346,2347,2348,2349,2350,2351,2352,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2408,2409,2410,2411,2412,2413,2414,2415,2416,2417,2418,2419,2420,2421,2422,2423,2424,2425,2426,2427,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2483,2484,2485,2486,2487,2488,2489,2490,2491,2492,2493,2494,2495,2496,2497,2498,2499,2500,2501,2502,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2558,2559,2560,2561,2562,2563,2564,2565,2566,2567,2568,2569,2570,2571,2572,2573,2574,2575,2576,2577,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
</data>
</layer>
<layer id="1" name="mapa" width="40" height="26">
<data encoding="csv"> <data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
@@ -32,7 +62,7 @@
1286,1287,1286,1287,1286,1287,1286,1287,1286,1287,1286,1278,1279,1287,1286,1287,1286,1287,1286,1287,1286,1287,1286,1287,1286,1287,1286,1287,1286,1287,1286,1287,1286,1287,1286,1287,1286,1287,1286,1287 1286,1287,1286,1287,1286,1287,1286,1287,1286,1287,1286,1278,1279,1287,1286,1287,1286,1287,1286,1287,1286,1287,1286,1287,1286,1287,1286,1287,1286,1287,1286,1287,1286,1287,1286,1287,1286,1287,1286,1287
</data> </data>
</layer> </layer>
<layer id="2" name="Colisiones" width="40" height="26"> <layer id="2" name="colisiones" width="40" height="26">
<data encoding="csv"> <data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,

View File

@@ -1,11 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<map version="1.9" tiledversion="1.9.2" orientation="orthogonal" renderorder="right-down" width="40" height="26" tilewidth="8" tileheight="8" infinite="0" nextlayerid="4" nextobjectid="3"> <map version="1.9" tiledversion="1.9.2" orientation="orthogonal" renderorder="right-down" width="40" height="26" tilewidth="8" tileheight="8" infinite="0" nextlayerid="5" nextobjectid="3">
<editorsettings> <editorsettings>
<export target="05..tmj" format="json"/> <export target="05..tmj" format="json"/>
</editorsettings> </editorsettings>
<tileset firstgid="1" source="surface.tsx"/> <tileset firstgid="1" source="surface.tsx"/>
<tileset firstgid="5626" source="tile_class.tsx"/> <tileset firstgid="5626" source="tile_class.tsx"/>
<layer id="1" name="Mapa" width="40" height="26"> <layer id="4" name="fondo" width="40" height="26">
<data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,1360,0,0,0,1359,1360,0,0,0,1359,1360,45,0,0,0,0,316,317,318,319,0,0,0,0,0,0,0,0,0,2, 1360,0,0,0,1359,1360,0,0,0,1359,1360,0,0,0,1359,1360,0,0,0,1359,1360,45,0,0,0,0,316,317,318,319,0,0,0,0,0,0,0,0,0,2,
1433,0,0,0,1432,1433,0,0,0,1434,1435,0,0,0,1432,1433,0,0,0,1434,1435,0,0,0,0,241,391,392,393,394,0,0,39,40,41,241,242,243,543,2, 1433,0,0,0,1432,1433,0,0,0,1434,1435,0,0,0,1432,1433,0,0,0,1434,1435,0,0,0,0,241,391,392,393,394,0,0,39,40,41,241,242,243,543,2,
1132,1133,1134,1135,1132,1133,1134,1135,1132,1133,1134,1135,1132,1133,1134,1135,1132,1133,1134,1135,1132,1133,1134,1135,1126,1127,1128,1129,1126,1127,1506,0,0,1501,1126,1127,1126,1127,1126,1127, 1132,1133,1134,1135,1132,1133,1134,1135,1132,1133,1134,1135,1132,1133,1134,1135,1132,1133,1134,1135,1132,1133,1134,1135,1126,1127,1128,1129,1126,1127,1506,0,0,0,1501,1127,1126,1127,1126,1127,
1207,1208,1209,1210,1207,1208,1209,1210,1207,1208,1209,1210,1207,1208,1209,1210,1207,1208,1209,1210,1207,1208,1209,1210,13,14,13,14,13,14,12,0,0,11,13,14,13,14,13,14, 1207,1208,1209,1210,1207,1208,1209,1210,1207,1208,1209,1210,1207,1208,1209,1210,1207,1208,1209,1210,1207,1208,1209,1210,13,14,13,14,13,14,12,0,0,0,11,14,13,14,13,14,
1282,1283,1284,1285,1282,1283,1284,1285,1282,1283,1284,1285,1282,1283,1284,1285,1282,1283,1284,1285,1282,1283,1284,1285,15,15,15,15,15,15,87,0,0,86,15,15,15,15,15,15 1282,1283,1284,1285,1282,1283,1284,1285,1282,1283,1284,1285,1282,1283,1284,1285,1282,1283,1284,1285,1282,1283,1284,1285,15,15,15,15,15,15,87,0,0,0,86,15,15,15,15,15
</data> </data>
</layer> </layer>
<layer id="3" name="Colisiones" width="40" height="26"> <layer id="3" name="colisiones" width="40" height="26">
<data encoding="csv"> <data encoding="csv">
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,139,140,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,139,140,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
@@ -52,17 +82,17 @@
0,0,0,0,0,0,37,38,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,75,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,37,38,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,75,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,547,548,0,0,551,0,0,0,0,0,0,0,109,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,547,548,0,0,551,0,0,0,0,0,0,0,109,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,111,112,0,46,0,0,0,0,0,0,0,0,0,0,38,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,111,112,0,46,0,0,0,0,0,0,0,0,0,0,38,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38,0,0,0,0,0,0,0,0,113,114,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38,0,0,0,0,0,0,0,0,113,114,2551,2552,2553,2554,2555,2556,2557,2558,0,
0,0,0,0,0,43,44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,38,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,43,44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,38,0,0,2626,2627,2628,2629,2630,2631,2632,2633,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5627,5627,5627, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2701,2702,2703,2704,2705,2706,5627,5627,5627,
0,0,0,0,0,0,112,45,46,0,0,0,0,0,0,0,0,0,0,37,38,0,0,0,0,0,0,0,0,0,0,0,547,0,0,0,551,552,5627,5627, 0,0,0,0,0,0,112,45,46,0,0,2551,2552,2553,2554,2555,2556,2557,2558,37,38,0,0,0,0,0,0,0,0,0,0,2776,2777,2778,2779,2780,2781,2782,2783,5627,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,38,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5627, 0,0,0,0,0,0,0,0,0,0,0,2626,2627,2628,2629,2630,2631,2632,2633,37,38,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5627,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,111,0,0,0,0,0,0,0,0,0,0,0,5627, 0,0,0,0,0,0,0,0,0,0,0,2701,2702,2703,2704,2705,2706,2707,2708,0,0,0,0,0,0,0,0,111,0,0,0,0,0,0,0,0,0,0,0,5627,
5628,0,0,0,5628,5628,0,0,0,5628,5628,0,0,0,5628,5628,0,0,0,5628,5628,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5627, 5628,0,0,0,5628,5628,0,0,0,5628,5628,2776,2777,2778,5628,5628,2781,2782,2783,5628,5628,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5627,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5627, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5627,
5627,5627,5627,5627,5627,5627,5627,5627,5627,5627,5627,5627,5627,5627,5627,5627,5627,5627,5627,5627,5627,5627,5627,5627,5627,5627,5627,5627,5627,5627,5627,0,0,5627,5627,5627,5627,5627,5627,5627, 5627,5627,5627,5627,5627,5627,5627,5627,5627,5627,5627,5627,5627,5627,5627,5627,5627,5627,5627,5627,5627,5627,5627,5627,5627,5627,5627,5627,5627,5627,5627,0,0,0,5627,5627,5627,5627,5627,5627,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5627,0,0,5627,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5627,0,0,0,5627,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5627,0,0,5627,0,0,0,0,0,0 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5627,0,0,0,5627,0,0,0,0,0
</data> </data>
</layer> </layer>
</map> </map>

View File

@@ -1,38 +1,68 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<map version="1.9" tiledversion="1.9.2" orientation="orthogonal" renderorder="right-down" width="40" height="26" tilewidth="8" tileheight="8" infinite="0" nextlayerid="3" nextobjectid="1"> <map version="1.9" tiledversion="1.9.2" orientation="orthogonal" renderorder="right-down" width="40" height="26" tilewidth="8" tileheight="8" infinite="0" nextlayerid="4" nextobjectid="1">
<tileset firstgid="1" source="surface.tsx"/> <tileset firstgid="1" source="surface.tsx"/>
<tileset firstgid="5626" source="tile_class.tsx"/> <tileset firstgid="5626" source="tile_class.tsx"/>
<layer id="1" name="Mapa" width="40" height="26"> <layer id="3" name="fondo" width="40" height="26">
<data encoding="csv"> <data encoding="csv">
13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,13,14,1,2,3,13,15,15,15, 13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,
88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,13,14,88,13,14,1,2,3,13,88,15, 88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,
13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,88,89,14,88,13,14,1,2,3,13,13, 13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,
88,89,88,89,13,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,13,13,14,1,2,3,13, 88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,
13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,88,88,13,14,1,2,13, 13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,
88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,13,14,89,88,89,88,88,89,76,2,3, 88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,
13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,88,89,14,13,14,13,14,13,14,86,81, 13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,
88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,11,81, 88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,
13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,14,13,14,14,86,82, 13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,
88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,89,88,89,89,11,81, 88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,
13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,13,14,14,13,14,13,14,13,13,13,14,13,13,14,14,86,81, 13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,
88,89,13,14,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,88,89,89,88,89,88,89,88,88,88,89,88,88,89,89,11,82, 88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,
13,14,88,89,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,14,14,14,14,14,14,14,14,14,14,13,14,13,14,86,81, 13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,
88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,89,89,89,89,89,89,89,89,89,89,14,14,14,14,11,82, 88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,
1505,1504,1505,1506,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,88,89,89,89,89,86,81, 13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,
3,3,4,89,88,89,88,89,88,89,88,89,88,89,88,13,13,13,14,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,11,82, 88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,
3,78,79,13,13,13,14,14,13,14,13,14,13,14,13,88,88,13,14,14,14,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,86,81, 13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,
2,12,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,88,89,88,13,88,89,88,89,11,81, 88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,
3,87,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,13,13,13,13,13,14,89,89,86,82, 13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,
2,12,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,88,88,88,88,88,88,88,88,88,88,88,88,88,88,88,89,11,82, 88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,
3,87,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,13,14,13,14,13,14,13,14,14,13,14,13,14,13,13,14,86,81, 13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,
2,12,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,88,89,88,89,88,89,88,89,88,88,89,88,88,88,88,89,11,82, 88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,
2,87,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,13,13,13,14,13,14,13,14,13,14,13,14,13,14,13,14,86,81, 13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,
88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,88,89,
13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,13,14,
88,89,88,89,88,89,88,89,88,89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126,1127,1126,1127,1126,1127,1126,1127,1126,1127,1126,1127,1126,1127, 1126,1127,1126,1127,1126,1127,1126,1127,1126,1127,1126,1127,1126,1127,1126,1127,1126,1127,1126,1127,1126,1127,1126,1127,1126,1127,1126,1127,1126,1127,1126,1127,1126,1127,1126,1127,1126,1127,1126,1127,
1201,1202,1201,1202,1201,1202,1201,1202,1201,1202,1201,1202,1201,1202,1201,1202,1201,1202,1201,1202,1201,1202,1201,1202,1201,1202,1201,1202,1201,1202,1201,1202,1201,1202,1201,1202,1201,1202,1201,1202, 1201,1202,1201,1202,1201,1202,1201,1202,1201,1202,1201,1202,1201,1202,1201,1202,1201,1202,1201,1202,1201,1202,1201,1202,1201,1202,1201,1202,1201,1202,1201,1202,1201,1202,1201,1202,1201,1202,1201,1202,
1276,1277,1276,1277,1276,1277,1276,1277,1276,1277,1276,1277,1276,1277,1276,1277,1276,1277,1276,1277,1276,1277,1276,1277,1276,1277,1276,1277,1276,1277,1276,1277,1276,1277,1276,1277,1276,1277,1276,1277 1276,1277,1276,1277,1276,1277,1276,1277,1276,1277,1276,1277,1276,1277,1276,1277,1276,1277,1276,1277,1276,1277,1276,1277,1276,1277,1276,1277,1276,1277,1276,1277,1276,1277,1276,1277,1276,1277,1276,1277
</data> </data>
</layer> </layer>
<layer id="2" name="Colisiones" width="40" height="26"> <layer id="2" name="colisiones" width="40" height="26">
<data encoding="csv"> <data encoding="csv">
5627,278,277,278,277,278,277,278,277,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,278,483,483,5627,278,277,278,277,0, 5627,278,277,278,277,278,277,278,277,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,278,483,483,5627,278,277,278,277,0,
5627,0,483,483,483,483,483,483,483,483,484,0,0,0,0,0,0,0,0,41,42,0,0,0,0,0,0,0,0,0,482,483,483,483,483,5627,483,483,0,0, 5627,0,483,483,483,483,483,483,483,483,484,0,0,0,0,0,0,0,0,41,42,0,0,0,0,0,0,0,0,0,482,483,483,483,483,5627,483,483,0,0,

View File

@@ -21,10 +21,14 @@ Map::Map(std::string file, SDL_Renderer *renderer, Asset *asset, ItemTracker *it
texture_tile = new LTexture(renderer, asset->get(tileset_img)); texture_tile = new LTexture(renderer, asset->get(tileset_img));
tileset_width = texture_tile->getWidth() / tile_size; tileset_width = texture_tile->getWidth() / tile_size;
// Crea la textura para el mapa de tiles de la habitación // Crea las texturas para dibujar el mapa
map_texture = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_TARGET, GAMECANVAS_WIDTH, GAMECANVAS_HEIGHT); map_layer0 = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_TARGET, GAMECANVAS_WIDTH, GAMECANVAS_HEIGHT);
if (map_texture == NULL) if (map_layer0 == NULL)
printf("Error: map_texture could not be created!\nSDL Error: %s\n", SDL_GetError()); printf("Error: map_layer0 could not be created!\nSDL Error: %s\n", SDL_GetError());
map_layer1 = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_TARGET, GAMECANVAS_WIDTH, GAMECANVAS_HEIGHT);
if (map_layer1 == NULL)
printf("Error: map_layer1 could not be created!\nSDL Error: %s\n", SDL_GetError());
// Pinta el mapa de la habitación en la textura // Pinta el mapa de la habitación en la textura
fillMapTexture(); fillMapTexture();
@@ -37,7 +41,7 @@ Map::~Map()
texture_tile->unload(); texture_tile->unload();
delete texture_tile; delete texture_tile;
SDL_DestroyTexture(map_texture); SDL_DestroyTexture(map_layer1);
for (auto actor : actors) for (auto actor : actors)
{ {
@@ -74,11 +78,12 @@ bool Map::load(std::string file_path)
std::ifstream file2(asset->get(line)); // Abre el fichero tmx std::ifstream file2(asset->get(line)); // Abre el fichero tmx
if (file2.good()) if (file2.good())
{ {
bool map1_read = false; bool map_col_read = false;
bool map2_read = false; bool map_l0_read = false;
bool map_l1_read = false;
while (std::getline(file2, line)) // Lee el fichero linea a linea while (std::getline(file2, line)) // Lee el fichero linea a linea
{ {
if (!map1_read) if (!map_l0_read)
{ // Lee lineas hasta que encuentre donde empiezan los datos del mapa { // Lee lineas hasta que encuentre donde empiezan los datos del mapa
int pos = 0; int pos = 0;
do do
@@ -89,7 +94,7 @@ bool Map::load(std::string file_path)
do do
{ // Se introducen los valores separados por comas en un vector { // Se introducen los valores separados por comas en un vector
map1_read = true; map_l0_read = true;
std::getline(file2, line); std::getline(file2, line);
if (line != "</data>") if (line != "</data>")
{ {
@@ -97,12 +102,13 @@ bool Map::load(std::string file_path)
std::string tmp; std::string tmp;
while (getline(ss, tmp, ',')) while (getline(ss, tmp, ','))
{ {
tilemap.push_back(std::stoi(tmp)); tilemap_l0.push_back(std::stoi(tmp));
} }
} }
} while (line != "</data>"); } while (line != "</data>");
} }
if (!map2_read)
if (!map_l1_read)
{ // Lee lineas hasta que encuentre donde empiezan los datos del mapa { // Lee lineas hasta que encuentre donde empiezan los datos del mapa
int pos = 0; int pos = 0;
do do
@@ -113,7 +119,32 @@ bool Map::load(std::string file_path)
do do
{ // Se introducen los valores separados por comas en un vector { // Se introducen los valores separados por comas en un vector
map2_read = true; map_l1_read = true;
std::getline(file2, line);
if (line != "</data>")
{
std::stringstream ss(line);
std::string tmp;
while (getline(ss, tmp, ','))
{
tilemap_l1.push_back(std::stoi(tmp));
}
}
} while (line != "</data>");
}
if (!map_col_read)
{ // Lee lineas hasta que encuentre donde empiezan los datos del mapa
int pos = 0;
do
{
std::getline(file2, line);
pos = line.find("data encoding");
} while (pos == std::string::npos);
do
{ // Se introducen los valores separados por comas en un vector
map_col_read = true;
std::getline(file2, line); std::getline(file2, line);
if (line != "</data>") if (line != "</data>")
{ {
@@ -365,54 +396,70 @@ bool Map::setActor(actor_t *actor, SDL_Point *p1, SDL_Point *p2, std::string var
// Crea la textura con el mapeado de la habitación // Crea la textura con el mapeado de la habitación
void Map::fillMapTexture() void Map::fillMapTexture()
{ {
SDL_SetRenderTarget(renderer, map_texture); // Crea variables
SDL_SetTextureBlendMode(map_texture, SDL_BLENDMODE_BLEND);
SDL_SetRenderDrawColor(renderer, 0x00, 0x00, 0x00, 0xFF);
SDL_RenderClear(renderer);
// Dibuja el degradado de fondo
const int num_lines = 208;
for (int i = 0; i < num_lines; i++)
{
float step = ((float)i / (float)num_lines);
int r = bgColor1.r + ((bgColor2.r - bgColor1.r) * step);
int g = bgColor1.g + ((bgColor2.g - bgColor1.g) * step);
int b = bgColor1.b + ((bgColor2.b - bgColor1.b) * step);
SDL_SetRenderDrawColor(renderer, r, g, b, 0xFF);
SDL_RenderDrawLine(renderer, 0, i, 319, i);
}
// Dibuja el mapeado de tiles
SDL_Rect clip = {0, 0, tile_size, tile_size}; SDL_Rect clip = {0, 0, tile_size, tile_size};
for (int y = 0; y < map_height; y++) // Rellena la capa 0
for (int x = 0; x < map_width; x++) {
SDL_SetRenderTarget(renderer, map_layer0);
SDL_SetTextureBlendMode(map_layer0, SDL_BLENDMODE_BLEND);
SDL_SetRenderDrawColor(renderer, 0x00, 0x00, 0x00, 0xFF);
SDL_RenderClear(renderer);
// Dibuja el degradado de fondo
const int num_lines = 208;
for (int i = 0; i < num_lines; i++)
{ {
// Resta uno porque Tiled almacena los indices empezando de 1 en vez de 0. float step = ((float)i / (float)num_lines);
// El problema es que los tiles vacios los pone como 0 y aqui pasan a ser -1 int r = bgColor1.r + ((bgColor2.r - bgColor1.r) * step);
// con lo que esta pintando desde fuera de la textura int g = bgColor1.g + ((bgColor2.g - bgColor1.g) * step);
clip.x = ((tilemap[(y * map_width) + x] - 1) % tileset_width) * tile_size; int b = bgColor1.b + ((bgColor2.b - bgColor1.b) * step);
clip.y = ((tilemap[(y * map_width) + x] - 1) / tileset_width) * tile_size; SDL_SetRenderDrawColor(renderer, r, g, b, 0xFF);
texture_tile->render(renderer, x * tile_size, y * tile_size, &clip); SDL_RenderDrawLine(renderer, 0, i, 319, i);
} }
// Dibuja el degradado del marcador // Dibuja el mapeado de tiles
int color = 105; for (int y = 0; y < map_height; y++)
for (int i = 208; i < 240; i++) for (int x = 0; x < map_width; x++)
{ {
SDL_SetRenderDrawColor(renderer, 0x69, color, 0x69, 0xFF); // Resta uno porque Tiled almacena los indices empezando de 1 en vez de 0.
SDL_RenderDrawLine(renderer, 0, i, 320, i); // El problema es que los tiles vacios los pone como 0 y aqui pasan a ser -1
color--; // con lo que esta pintando desde fuera de la textura
clip.x = ((tilemap_l0[(y * map_width) + x] - 1) % tileset_width) * tile_size;
clip.y = ((tilemap_l0[(y * map_width) + x] - 1) / tileset_width) * tile_size;
texture_tile->render(renderer, x * tile_size, y * tile_size, &clip);
}
// Dibuja el degradado del marcador
int color = 105;
for (int i = 208; i < 240; i++)
{
SDL_SetRenderDrawColor(renderer, 0x69, color, 0x69, 0xFF);
SDL_RenderDrawLine(renderer, 0, i, 320, i);
color--;
}
} }
// Dibuja el marco del marcador // Rellena la capa 1
// SDL_SetRenderDrawColor(renderer, 85, 50, 85, 0xFF); {
// SDL_SetRenderDrawColor(renderer, 0, 0, 0, 0xFF); SDL_SetRenderTarget(renderer, map_layer1);
// SDL_Rect rect = {0, 208, 320, 32}; SDL_SetTextureBlendMode(map_layer1, SDL_BLENDMODE_BLEND);
// SDL_RenderDrawRect(renderer, &rect); SDL_SetRenderDrawColor(renderer, 0x00, 0x00, 0x00, 0x00);
// rect = {1, 209, 318, 30}; SDL_RenderClear(renderer);
// SDL_RenderDrawRect(renderer, &rect);
// Dibuja el mapeado de tiles
for (int y = 0; y < map_height; y++)
for (int x = 0; x < map_width; x++)
{
// Resta uno porque Tiled almacena los indices empezando de 1 en vez de 0.
// El problema es que los tiles vacios los pone como 0 y aqui pasan a ser -1
// con lo que esta pintando desde fuera de la textura
clip.x = ((tilemap_l1[(y * map_width) + x] - 1) % tileset_width) * tile_size;
clip.y = ((tilemap_l1[(y * map_width) + x] - 1) / tileset_width) * tile_size;
texture_tile->render(renderer, x * tile_size, y * tile_size, &clip);
}
}
// Vuelve a colocar el renderizador // Vuelve a colocar el renderizador
SDL_SetRenderTarget(renderer, nullptr); SDL_SetRenderTarget(renderer, nullptr);
@@ -423,7 +470,8 @@ void Map::render()
{ {
// Dibuja la textura con el mapa en pantalla // Dibuja la textura con el mapa en pantalla
SDL_Rect rect = {0, 0, GAMECANVAS_WIDTH, GAMECANVAS_HEIGHT}; SDL_Rect rect = {0, 0, GAMECANVAS_WIDTH, GAMECANVAS_HEIGHT};
SDL_RenderCopy(renderer, map_texture, &rect, NULL); SDL_RenderCopy(renderer, map_layer0, &rect, NULL);
SDL_RenderCopy(renderer, map_layer1, &rect, NULL);
for (auto actor : actors) for (auto actor : actors)
{ {
@@ -475,12 +523,6 @@ int Map::getTileSize()
return tile_size; return tile_size;
} }
// Devuelve el indice del tile correspondiente a un punto del mapa
int Map::getTileIndex(SDL_Point p)
{
return tilemap[((p.y / tile_size) * map_width) + (p.x / tile_size)];
}
// Devuelve el valor de los bordes de la zona de juego // Devuelve el valor de los bordes de la zona de juego
int Map::getPlayArea(e_border border) int Map::getPlayArea(e_border border)
{ {

View File

@@ -35,23 +35,25 @@ enum e_border
class Map class Map
{ {
private: private:
Asset *asset; // Objeto con la ruta a todos los ficheros de recursos Asset *asset; // Objeto con la ruta a todos los ficheros de recursos
SDL_Renderer *renderer; // El renderizador de la ventana SDL_Renderer *renderer; // El renderizador de la ventana
std::string name; // Identificador de la habitación std::string name; // Identificador de la habitación
std::string room_up; // Identificador de la habitación que se encuentra arriba std::string room_up; // Identificador de la habitación que se encuentra arriba
std::string room_down; // Identificador de la habitación que se encuentra abajp std::string room_down; // Identificador de la habitación que se encuentra abajp
std::string room_left; // Identificador de la habitación que se encuentra a la izquierda std::string room_left; // Identificador de la habitación que se encuentra a la izquierda
std::string room_right; // Identificador de la habitación que se encuentra a la derecha std::string room_right; // Identificador de la habitación que se encuentra a la derecha
std::string enemy_file; // Fichero con los enemigos para la habitación std::string enemy_file; // Fichero con los enemigos para la habitación
std::string tileset_img; // Imagen con los graficos para la habitación std::string tileset_img; // Imagen con los graficos para la habitación
std::vector<int> tilemap; // Indice de los tiles a dibujar en la habitación std::vector<int> tilemap_l0; // Indice de los tiles a dibujar de la capa 0 en la habitación
std::vector<int> collisionmap; // Indice con los tipos de tile de la habitación std::vector<int> tilemap_l1; // Indice de los tiles a dibujar de la capa 1 en la habitación
LTexture *texture_tile; // Textura con los graficos de los tiles habitación std::vector<int> collisionmap; // Indice con los tipos de tile de la habitación
SDL_Texture *map_texture; // Textura para dibujar el mapa de la habitación LTexture *texture_tile; // Textura con los graficos de los tiles habitación
std::vector<Actor *> actors; // Listado con los actores de la habitación SDL_Texture *map_layer0; // Textura para dibujar la capa 0 del mapa de la habitación
color_t bgColor1; // Color superior del degradado de fondo SDL_Texture *map_layer1; // Textura para dibujar la capa 1 del mapa de la habitación
color_t bgColor2; // Color inferior del degradado de fondo std::vector<Actor *> actors; // Listado con los actores de la habitación
ItemTracker *itemTracker; // Objeto que gestiona los items que ya se han recogido color_t bgColor1; // Color superior del degradado de fondo
color_t bgColor2; // Color inferior del degradado de fondo
ItemTracker *itemTracker; // Objeto que gestiona los items que ya se han recogido
int tile_size; // Ancho del tile en pixels int tile_size; // Ancho del tile en pixels
int map_width; // Ancho del mapa en tiles int map_width; // Ancho del mapa en tiles
@@ -89,9 +91,6 @@ public:
// Devuelve el valor de la variable // Devuelve el valor de la variable
int getTileSize(); int getTileSize();
// Devuelve el indice del tile correspondiente a un punto del mapa
int getTileIndex(SDL_Point p);
// Devuelve el valor de los bordes de la zona de juego // Devuelve el valor de los bordes de la zona de juego
int getPlayArea(e_border border); int getPlayArea(e_border border);