53 Commits
v0.4 ... master

Author SHA1 Message Date
47f16b7c14 Añadiendo enemigos nuevos 2022-10-21 21:50:38 +02:00
8610431893 Hay que arreglar el mapa 5 2022-10-20 20:31:45 +02:00
57c569677b Actualizado animatedsprite.cpp 2022-10-20 09:18:23 +02:00
b949436cd7 Renombrada la clase ltexture a texture 2022-10-18 13:56:06 +02:00
49f2c244ae Reestructurado el orden de declaracion de las variables en las clases separado por variables y objetos y punteros 2022-10-18 12:35:45 +02:00
73407e9a14 Eliminar 'data/config/config.txt' 2022-10-18 10:08:26 +02:00
f24d3ea1ee Actualizado gitignore 2022-10-18 10:07:39 +02:00
fbe31fb7d6 Corregidas las rutas a los ficheros de recursos 2022-10-18 09:44:22 +02:00
150d94454c Reorganizados los .cpp i .h en la carpeta common 2022-10-18 09:31:33 +02:00
eb185755c2 Actualizado Makefile 2022-10-10 09:10:49 +02:00
543e65d925 Modificado gitignore 2022-10-09 21:52:32 +02:00
80e89489a6 Modificados algunos recursos 2022-10-09 19:38:40 +02:00
420f7e84a0 Modificados dos mapas 2022-09-24 20:08:15 +02:00
c65bad49d9 Añadidos nuevos tiles de fondo 2022-09-24 19:53:56 +02:00
df323dcd4d Modificado el nombre de algunas variables 2022-09-24 19:38:31 +02:00
8bdb2fdf29 Cambios en animaciones y tiles 2022-09-24 17:26:29 +02:00
911061899d Optimizada la carga del mapa 2022-09-24 11:05:22 +02:00
45f9a5b494 Añadida una capa estática de fondo 2022-09-24 07:32:48 +02:00
330185720d Añadida la animación de morir 2022-09-24 00:03:05 +02:00
e18db352e0 Trabajando en la muerte del jugador 2022-09-23 21:06:21 +02:00
4cf09d1535 Añadido input al scoreboard 2022-09-23 20:43:31 +02:00
48f84d28bd Trabajando en las colisiones con los enemigos 2022-09-23 19:50:40 +02:00
eac0236c60 Capa de fondo con posibilidad de scroll 2022-09-23 17:32:09 +02:00
afe5b52b6b trabajando en el movimiento easing del marcador 2022-09-23 14:09:36 +02:00
52d0c182f3 Trabajando en el marcador 2022-09-22 22:22:27 +02:00
1d9e5ff27d Trabajando en el marcador 2022-09-22 21:39:41 +02:00
96c0ddf8ed Marcador transparente. Area de juego ocupa toda la pantalla 2022-09-22 20:50:34 +02:00
44c9bb0a44 Prueba falsa de marcador transparente 2022-09-22 13:15:56 +02:00
c97063e728 Separados los elementos de la pantalla en diferentes texturas 2022-09-22 12:42:37 +02:00
5806f7352f Recarga de texturas en el cambio de modo de video 2022-09-22 08:27:28 +02:00
e517ef62c8 Actualizado animatedsprite para no requerir frames_per_row 2022-09-22 08:19:16 +02:00
170b245573 Actualizado gitignore 2022-09-21 22:55:14 +02:00
bc0bd2a4e2 Trabajando en el marcador 2022-09-21 22:41:08 +02:00
488e603ca5 Añadida la capa de fondo al mapa 2022-09-21 21:06:09 +02:00
5f99fe3550 Modificados algunos mapas con los nuevos tiles 2022-09-21 19:39:23 +02:00
d31ab28a12 Añadida la clase debug 2022-09-21 19:24:27 +02:00
241c63340c Ya guarda el fichero de configuración 2022-09-21 18:22:18 +02:00
f647a225f9 Actualizadas librerias comunes a las ultimas versiones 2022-09-21 17:31:35 +02:00
378f27a01e Empezando a trabajar con los nuevos mapas 2022-09-20 21:26:37 +02:00
650df9baaf Probando nuevas animaciones para el personaje 2022-09-14 17:39:48 +02:00
b93dc86cb0 Eliminados algunos warnings 2022-09-12 19:20:57 +02:00
4674c3dab2 Modificado debug.txt 2022-08-30 20:41:58 +02:00
a5c983df9d Actualizada la clase screen con nuevos procedimientos. Incluído el fichero const.h. Cambio de tamaño de ventana y pantalla completa 2022-08-30 17:59:10 +02:00
16b7bcc091 Quitado código comentado 2022-08-29 21:08:25 +02:00
e6dad36f3b Las plataformas horizontales ya no empujan ni se queda pegado al suelo 2022-08-29 10:48:31 +02:00
f9482594ea Arreglado el problema con las plataormas verticales. Se iba un pixel 2022-08-29 08:27:33 +02:00
45592f16c3 Añadido todo.md 2022-08-28 23:02:42 +02:00
462a64bb3e Actualizado a la última versión de jail_audio 2022-08-28 22:41:24 +02:00
fcdd2ffd21 Completada la carga de menus desde fichero 2022-08-28 21:03:21 +02:00
d5a069b8db Trabajando en la carga de menus desde fichero 2022-08-28 19:59:03 +02:00
d9cb7f68e2 Trabajando en las nuevas pantallas 2022-08-28 12:24:37 +02:00
5405652f00 Merge branch 'master' of https://gitea.sustancia.synology.me/JailDesigner/volcano_2022 2022-08-28 11:36:45 +02:00
6375cc442c Agregadas muevas pantallas 2022-08-28 11:33:08 +02:00
129 changed files with 8011 additions and 4015 deletions

1
.gitignore vendored
View File

@@ -3,3 +3,4 @@
desktop.ini
thumbs.db
bin/*
config.txt

View File

@@ -1,6 +1,15 @@
executable = volcano_2022
source = source/*.cpp source/common/*.cpp
windows:
@echo off
if not exist bin\ (mkdir bin)
g++ $(source) -std=c++11 -Wall -O2 -lmingw32 -lSDL2main -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -static-libstdc++ -Wl,-subsystem,windows -o bin/$(executable).exe
strip -s -R .comment -R .gnu.version bin/$(executable).exe --strip-unneeded
macos:
mkdir -p bin
g++ source/*.cpp -std=c++11 -Wall -O2 -lSDL2 -o bin/volcano_macos
g++ $(source) -std=c++11 -Wall -O2 -lSDL2 -ffunction-sections -fdata-sections -o bin/$(executable)_macos
linux:
mkdir -p bin
g++ source/*.cpp -std=c++11 -Wall -O2 -lSDL2 -o bin/volcano_linux
g++ $(source) -std=c++11 -Wall -Os -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -o bin/$(executable)_linux
strip -s -R .comment -R .gnu.version bin/$(executable)_linux --strip-unneeded

View File

@@ -1,10 +0,0 @@
frames_per_row=6
frame_width=16
frame_height=16
[animation]
name=default
speed=8
loop=0
frames=0,1,2,3,4,5
[/animation]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -1,10 +0,0 @@
frames_per_row=6
frame_width=16
frame_height=16
[animation]
name=default
speed=8
loop=0
frames=0,1,2,3,4,5
[/animation]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -1,10 +0,0 @@
frames_per_row=6
frame_width=16
frame_height=16
[animation]
name=default
speed=6
loop=0
frames=0,1,2,3,4,5
[/animation]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -0,0 +1,9 @@
frameWidth=24
frameHeight=16
[animation]
name=default
speed=8
loop=0
frames=0,1,2,3,4,5,6,7,8
[/animation]

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -0,0 +1,9 @@
frameWidth=16
frameHeight=16
[animation]
name=default
speed=8
loop=0
frames=0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16
[/animation]

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@@ -0,0 +1,9 @@
frameWidth=16
frameHeight=16
[animation]
name=default
speed=8
loop=0
frames=0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17
[/animation]

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -0,0 +1,9 @@
frameWidth=16
frameHeight=16
[animation]
name=default
speed=8
loop=0
frames=0,1,2,3,4,5,6
[/animation]

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -0,0 +1,9 @@
frameWidth=16
frameHeight=16
[animation]
name=default
speed=8
loop=0
frames=15,16,17,18,19,20,21,22,23,24,25,26,27,28
[/animation]

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -0,0 +1,9 @@
frameWidth=16
frameHeight=16
[animation]
name=default
speed=8
loop=0
frames=15,16,17,18,19,20,21,22,23,24,25,26,27,28
[/animation]

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -0,0 +1,9 @@
frameWidth=16
frameHeight=16
[animation]
name=default
speed=8
loop=0
frames=17,18,19,20,21,22,23,24,25,26,27,28,29,30
[/animation]

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@@ -1,10 +0,0 @@
frames_per_row=6
frame_width=16
frame_height=16
[animation]
name=default
speed=8
loop=0
frames=0,1,2,3,4,5
[/animation]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -1,6 +1,5 @@
frames_per_row=8
frame_width=16
frame_height=16
frameWidth=16
frameHeight=16
[animation]
name=default

View File

@@ -1,6 +1,5 @@
frames_per_row=1
frame_width=16
frame_height=8
frameWidth=16
frameHeight=8
[animation]
name=default

View File

@@ -3,192 +3,192 @@
# box height
5
# 32 espacio ( )
5
3
# 33 !
5
1
# 34 "
5
3
# 35 #
5
3
# 36 $
5
3
# 37 %
5
3
# 38 &
5
3
# 39 '
5
1
# 40 (
5
2
# 41 )
5
2
# 42 *
5
3
# 43 +
5
3
# 44 ,
5
1
# 45 -
5
3
# 46 .
5
1
# 47 /
5
3
# 48 0
5
3
# 49 1
5
3
# 50 2
5
3
# 51 3
5
3
# 52 4
5
3
# 53 5
5
3
# 54 6
5
3
# 55 7
5
3
# 56 8
5
3
# 57 9
5
3
# 58 :
5
1
# 59 ;
5
1
# 60 <
5
3
# 61 =
5
3
# 62 >
5
3
# 63 ?
5
3
# 64 @
5
3
# 65 A
5
3
# 66 B
5
3
# 67 C
5
3
# 68 D
5
3
# 69 E
5
3
# 70 F
5
3
# 71 G
5
3
# 72 H
5
3
# 73 I
5
3
# 74 J
5
3
# 75 K
5
3
# 76 L
5
3
# 77 M
5
3
# 78 N
5
3
# 79 O
5
3
# 80 P
5
3
# 81 Q
5
3
# 82 R
5
3
# 83 S
5
3
# 84 T
5
3
# 85 U
5
3
# 86 V
5
3
# 87 W
5
3
# 88 X
5
3
# 89 Y
5
3
# 90 Z
5
3
# 91 [
5
2
# 92 \
5
3
# 93 ]
5
2
# 94 ^
5
3
# 95 _
5
3
# 96 `
5
2
# 97 a
5
3
# 98 b
5
3
# 99 c
5
3
# 100 d
5
3
# 101 e
5
3
# 102 f
5
3
# 103 g
5
3
# 104 h
5
3
# 105 i
5
3
# 106 j
5
3
# 107 k
5
3
# 108 l
5
3
# 109 m
5
3
# 110 n
5
3
# 111 o
5
3
# 112 p
5
3
# 113 q
5
3
# 114 r
5
3
# 115 s
5
3
# 116 t
5
3
# 117 u
5
3
# 118 v
5
3
# 119 w
5
3
# 120 x
5
3
# 121 y
5
3
# 122 z
5
3
# 123 {
5
3
# 124 |
5
3
# 125 }
5
3
# 126 ~
5

BIN
data/font/smb2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

194
data/font/smb2.txt Normal file
View File

@@ -0,0 +1,194 @@
# box width
8
# box height
8
# 32 espacio ( )
7
# 33 !
7
# 34 "
7
# 35 #
7
# 36 $
7
# 37 %
7
# 38 &
7
# 39 '
7
# 40 (
7
# 41 )
7
# 42 *
7
# 43 +
7
# 44 ,
7
# 45 -
7
# 46 .
7
# 47 /
7
# 48 0
7
# 49 1
7
# 50 2
7
# 51 3
7
# 52 4
7
# 53 5
7
# 54 6
7
# 55 7
7
# 56 8
7
# 57 9
7
# 58 :
7
# 59 ;
7
# 60 <
7
# 61 =
7
# 62 >
7
# 63 ?
7
# 64 @
7
# 65 A
7
# 66 B
7
# 67 C
7
# 68 D
7
# 69 E
7
# 70 F
7
# 71 G
7
# 72 H
7
# 73 I
7
# 74 J
7
# 75 K
7
# 76 L
7
# 77 M
7
# 78 N
7
# 79 O
7
# 80 P
7
# 81 Q
7
# 82 R
7
# 83 S
7
# 84 T
7
# 85 U
7
# 86 V
7
# 87 W
7
# 88 X
7
# 89 Y
7
# 90 Z
7
# 91 [
7
# 92 \
7
# 93 ]
7
# 94 ^
7
# 95 _
7
# 96 `
7
# 97 a
7
# 98 b
7
# 99 c
7
# 100 d
7
# 101 e
7
# 102 f
7
# 103 g
7
# 104 h
7
# 105 i
7
# 106 j
7
# 107 k
7
# 108 l
7
# 109 m
7
# 110 n
7
# 111 o
7
# 112 p
7
# 113 q
7
# 114 r
7
# 115 s
7
# 116 t
7
# 117 u
7
# 118 v
7
# 119 w
7
# 120 x
7
# 121 y
7
# 122 z
7
# 123 {
7
# 124 |
7
# 125 }
7
# 126 ~
7

View File

@@ -1,6 +1,5 @@
frames_per_row=4
frame_width=320
frame_height=240
frameWidth=320
frameHeight=240
[animation]
name=intro

View File

@@ -1,14 +1,14 @@
[path]
tileset=walking_eye.png
animation=walking_eye.ani
tileset=manzana.png
animation=manzana.ani
width=16
height=16
x=22
y=20
x=25
y=25
vx=0.4
vy=0
x1=22
y1=20
x2=27
y2=20
x1=18
y1=25
x2=33
y2=25
[/path]

View File

@@ -1,74 +1,42 @@
tileset_img=surface.png
enemy_file=01.ene
bgColor1=234,171,159
tilemap=01.tmx
tileset=tiles_surface.png
enemyFile=01.ene
bgColor1=0,171,159
bgColor2=144,225,231
bgScroll=true
room_up=0
room_down=0
room_left=0
room_right=02.map
[tilemap]
01.tmx
[/tilemap]
roomUp=0
roomDown=0
roomLeft=04.map
roomRight=02.map
[actors]
[moving platform]
tileset=moving_platform.png
animation=moving_platform.ani
width=16
height=8
x=9
y=11
vx=0.3
vy=0
x1=9
y1=11
x2=15
y2=11
[/moving platform]
[moving platform]
tileset=moving_platform.png
animation=moving_platform.ani
width=16
height=8
x=20
y=14
vx=0
vy=0.3
x1=20
y1=14
x2=20
y2=21
[/moving platform]
[diamond]
tileset=diamond.png
animation=diamond.ani
width=16
height=16
x=1
y=10
[/diamond]
[diamond]
tileset=diamond.png
animation=diamond.ani
width=16
height=16
x=24
y=10
[/diamond]
[diamond]
tileset=diamond.png
animation=diamond.ani
width=16
height=16
x=25
x=14
y=12
[/diamond]
[diamond]
tileset=diamond.png
animation=diamond.ani
width=16
height=16
x=19
y=18
[/diamond]
[diamond]
tileset=diamond.png
animation=diamond.ani
width=16
height=16
x=33
y=13
[/diamond]
[/actors]

View File

@@ -1,34 +1,141 @@
<?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="2" nextobjectid="1">
<tileset firstgid="1" source="surface.tsx"/>
<layer id="1" name="Capa de patrones 1" width="40" height="26">
<map version="1.9" tiledversion="1.9.2" orientation="orthogonal" renderorder="right-down" width="40" height="30" tilewidth="8" tileheight="8" infinite="0" nextlayerid="6" nextobjectid="1">
<tileset firstgid="1" source="tiles_surface.tsx"/>
<tileset firstgid="5626" source="tile_kind.tsx"/>
<layer id="5" name="estatico" width="40" height="30">
<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,18,19,20,0,0,0,0,0,87,88,89,90,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,51,52,0,0,0,0,0,119,120,121,122,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,19,20,0,0,0,0,0,0,0,0,0,0,0,151,152,153,154,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,51,52,0,0,0,0,0,0,0,0,0,0,0,183,184,185,186,0,0,0,0,0,0,
0,18,19,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,50,51,52,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,19,20,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,51,52,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,93,94,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,237,238,0,0,0,0,0,0,0,0,125,126,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,362,364,0,0,0,0,0,0,0,0,369,371,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,426,428,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,362,364,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,426,428,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,583,584,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,239,240,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,93,94,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,366,367,367,368,0,0,0,0,0,189,190,0,0,0,0,0,0,0,0,0,0,0,125,126,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,430,431,431,432,0,0,0,0,577,578,579,580,581,582,0,0,0,0,0,0,0,0,159,160,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,189,190,0,0,0,0,0,0,0,0,0,0,191,192,0,0,0,0,0,93,94,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,189,190,0,0,0,0,0,0,0,0,0,0,189,190,241,242,0,0,0,125,126,0,0,0,0,0,0,
363,364,0,0,0,0,0,193,194,0,0,0,0,189,190,0,0,0,237,238,0,0,362,282,277,278,279,274,364,0,0,0,157,158,0,0,0,0,0,0,
295,396,0,0,0,0,0,225,226,0,0,0,0,189,190,0,0,362,275,275,275,275,313,314,309,310,311,312,396,0,0,0,189,190,0,0,237,238,0,0,
265,264,263,264,263,264,263,264,263,264,263,264,263,264,263,264,263,264,267,266,266,266,283,284,266,265,266,267,263,264,263,264,263,264,263,264,263,264,263,264,
295,296,295,296,295,296,295,296,295,265,295,296,295,296,295,296,295,296,295,296,295,296,315,316,298,297,298,296,295,296,295,296,295,296,295,296,295,296,295,296
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,
1876,1877,1878,1879,1880,1881,1882,1883,1884,1885,1886,1887,1888,1889,1890,1891,1892,1893,1894,1895,1896,1897,1898,1899,1900,1901,1902,1903,1904,1905,1906,1907,1908,1909,1910,1911,1912,1913,1914,1915,
1951,1952,1953,1954,1955,1956,1957,1958,1959,1960,1961,1962,1963,1964,1965,1966,1967,1968,1969,1970,1971,1972,1973,1974,1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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="4" name="fondo" width="40" height="30">
<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,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2026,2027,2028,2029,2030,2031,2032,2033,2034,2035,2036,2037,2038,2039,2040,2041,2042,2043,2044,2045,2046,2047,2048,2049,2050,2051,2052,2053,2054,2055,2056,2057,2058,2059,2060,2061,2062,2063,2064,2065,
2101,2102,2103,2104,2105,2106,2107,2108,2109,2110,2111,2112,2113,2114,2115,2116,2117,2118,2119,2120,2121,2122,2123,2124,2125,2126,2127,2128,2129,2130,2131,2132,2133,2134,2135,2136,2137,2138,2139,2140,
2176,2177,2178,2179,2180,2181,2182,2183,2184,2185,2186,2187,2188,2189,2190,2191,2192,2193,2194,2195,2196,2197,2198,2199,2200,2201,2202,2203,2204,2205,2206,2207,2208,2209,2210,2211,2212,2213,2214,2215,
2251,2252,2253,2254,2255,2256,2257,2258,2259,2260,2261,2262,2263,2264,2265,2266,2267,2268,2269,2270,2271,2272,2273,2274,2275,2276,2277,2278,2279,2280,2281,2282,2283,2284,2285,2286,2287,2288,2289,2290,
2326,2327,2328,2329,2330,2331,2332,2333,2334,2335,2336,2337,2338,2339,2340,2341,2342,2343,2344,2345,2346,2347,2348,2349,2350,2351,2352,2353,2354,2355,2356,2357,2358,2359,2360,2361,2362,2363,2364,2365,
2401,2402,2403,2404,2405,2406,2407,2408,2409,2410,2411,2412,2413,2414,2415,2416,2417,2418,2419,2420,2421,2422,2423,2424,2425,2426,2427,2428,2429,2430,2431,2432,2433,2434,2435,2436,2437,2438,2439,2440,
2476,2477,2478,2479,2480,2481,2482,2483,2484,2485,2486,2487,2488,2489,2490,2491,2492,2493,2494,2495,2496,2497,2498,2499,2500,2501,2502,2503,2504,2505,2506,2507,2508,2509,2510,2511,2512,2513,2514,2515,
2551,2552,2553,2554,2555,2556,2557,2558,2559,2560,2561,2562,2563,2564,2565,2566,2567,2568,2569,2570,2571,2572,2573,2574,2575,2576,2577,2578,2579,2580,2581,2582,2583,2584,2585,2586,2587,2588,2589,2590,
2626,2627,2628,2629,2630,2631,2632,2633,2634,2635,2636,2637,2638,2639,2640,2641,2642,2643,2644,2645,2646,2647,2648,2649,2650,2651,2652,2653,2654,2655,2656,2657,2658,2659,2660,2661,2662,2663,2664,2665,
2701,2702,2703,2704,2705,2706,2707,2708,2709,2710,2711,2712,2713,2714,2715,2716,2717,2718,2719,2720,2721,2722,2723,2724,2725,2726,2727,2728,2729,2730,2731,2732,2733,2734,2735,2736,2737,2738,2739,2740,
2776,2777,2778,2779,2780,2781,2782,2783,2784,2785,2786,2787,2788,2789,2790,2791,2792,2793,2794,2795,2796,2797,2798,2799,2800,2801,2802,2803,2804,2805,2806,2807,2808,2809,2810,2811,2812,2813,2814,2815,
2851,2852,2853,2854,2855,2856,2857,2858,2859,2860,2861,2862,2863,2864,2865,2866,2867,2868,2869,2870,2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,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,534,535,526,527,0,540,541,0,0,0,0,0,0,0,0,0,0,530,531,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1501,1502,1503,1504,1505,1506,0,0,0,0,0,0,0,0,0,0,1357,1358,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,0,0,0,0,0,0,0,0,0,0,0,1432,1433,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,76,2,3,79,0,0,0,0,0,0,0,166,167,0,0,463,464,0,0,0,0,0,
0,0,0,233,234,235,236,0,0,0,0,0,0,0,0,0,0,0,5,81,82,8,0,0,0,0,1351,1352,1353,1354,1355,1356,0,538,539,0,0,0,0,0,
0,0,0,308,309,310,311,0,0,0,0,306,307,0,0,0,0,0,80,81,82,83,0,0,0,0,0,0,461,462,0,0,0,455,456,0,0,0,0,0,
0,0,0,383,384,385,386,0,0,0,0,381,382,0,0,0,0,80,81,82,81,82,83,0,241,242,243,0,461,462,0,0,0,530,531,0,0,0,0,0,
1136,1137,1136,1137,1136,1137,1136,1137,1136,1137,1136,1137,1136,1137,1136,1137,1136,1137,1136,1137,1136,1137,1136,1137,1136,1137,1136,1137,1136,1137,1136,1137,1136,1137,1136,1137,1136,1137,1136,1137,
1211,1212,1211,1212,1211,1212,1211,1212,1211,1203,1204,1212,1211,1212,1211,1212,1211,1212,1211,1212,1211,1212,1211,1212,1211,1212,1211,1212,1211,1212,1211,1212,1211,1212,1211,1212,1211,1212,1211,1212,
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
</data>
</layer>
<layer id="2" name="colisiones" width="40" height="30" visible="0">
<data encoding="csv">
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,
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,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,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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>
</map>

View File

@@ -1,29 +1,14 @@
[path]
tileset=flying_eye.png
animation=flying_eye.ani
width=16
tileset=gusano.png
animation=gusano.ani
width=24
height=16
x=9
y=12
vx=0
vy=0.3
x1=9
y1=12
x2=9
y2=20
[/path]
[path]
tileset=flying_eye_horn.png
animation=flying_eye_horn.ani
width=16
height=16
x=15
y=5
vx=0.5
x=8
y=25
vx=0.3
vy=0
x1=5
y1=5
x2=30
y2=5
x1=4
y1=25
x2=15
y2=25
[/path]

View File

@@ -1,92 +1,11 @@
tileset_img=surface.png
enemy_file=02.ene
bgColor1=234,100,159
bgColor2=144,235,231
tilemap=02.tmx
tileset=tiles_surface.png
enemyFile=02.ene
bgColor1=0,171,159
bgColor2=144,225,231
bgScroll=true
bgColor1=153,229,80
bgColor2=95,205,228
room_up=0
room_down=03.map
room_left=01.map
room_right=0
[tilemap]
02.tmx
[/tilemap]
[actors]
[diamond]
tileset=diamond.png
animation=diamond.ani
width=16
height=16
x=5
y=13
[/diamond]
[diamond]
tileset=diamond.png
animation=diamond.ani
width=16
height=16
x=8
y=7
[/diamond]
[diamond]
tileset=diamond.png
animation=diamond.ani
width=16
height=16
x=12
y=11
[/diamond]
[diamond]
tileset=diamond.png
animation=diamond.ani
width=16
height=16
x=16
y=17
[/diamond]
[diamond]
tileset=diamond.png
animation=diamond.ani
width=16
height=16
x=18
y=15
[/diamond]
[diamond]
tileset=diamond.png
animation=diamond.ani
width=16
height=16
x=20
y=13
[/diamond]
[diamond]
tileset=diamond.png
animation=diamond.ani
width=16
height=16
x=27
y=9
[/diamond]
[diamond]
tileset=diamond.png
animation=diamond.ani
width=16
height=16
x=33
y=14
[/diamond]
[/actors]
roomUp=0
roomDown=03.map
roomLeft=01.map
roomRight=05.map

View File

@@ -1,34 +1,141 @@
<?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="2" nextobjectid="1">
<tileset firstgid="1" source="surface.tsx"/>
<layer id="1" name="Capa de patrones 1" width="40" height="26">
<map version="1.9" tiledversion="1.9.2" orientation="orthogonal" renderorder="right-down" width="40" height="30" tilewidth="8" tileheight="8" infinite="0" nextlayerid="6" nextobjectid="1">
<tileset firstgid="1" source="tiles_surface.tsx"/>
<tileset firstgid="5626" source="tile_kind.tsx"/>
<layer id="5" name="estatico" width="40" height="30">
<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,18,19,20,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,51,52,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,87,88,89,90,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,119,120,121,122,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,19,20,0,0,0,0,0,0,0,0,0,0,0,0,151,152,153,154,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,51,52,0,0,0,0,0,0,0,0,0,0,0,0,183,184,185,186,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,362,363,363,364,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,404,395,395,406,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,112,113,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,577,578,579,580,581,582,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,109,110,113,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,189,190,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,141,142,138,113,264,263,264,364,0,0,0,0,0,0,0,0,0,0,0,161,162,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,180,169,170,138,313,295,296,406,0,0,0,0,0,0,0,0,0,0,0,189,190,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,372,373,373,264,78,137,138,75,76,145,0,0,0,0,0,0,583,584,0,0,0,0,0,189,190,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,144,86,77,110,169,170,83,108,0,0,0,0,0,0,0,161,162,0,0,0,0,0,159,160,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,109,148,137,138,115,0,0,0,0,0,0,583,584,155,156,65,66,0,0,0,191,192,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,109,110,170,115,0,0,0,0,0,0,161,162,187,188,97,98,0,0,0,189,190,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,141,142,138,83,0,0,0,0,583,584,155,156,65,66,69,70,0,0,0,189,190,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,180,169,170,115,0,0,0,0,161,162,187,188,97,98,101,102,0,0,0,189,190,0,0,93,94,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,362,282,276,277,279,364,193,194,0,157,158,93,94,157,158,157,158,0,0,0,69,70,0,0,125,126,0,0,0,93,94,0,0,
0,0,0,0,0,0,0,394,314,308,309,311,396,225,226,0,189,190,125,126,189,190,189,190,0,0,0,101,102,0,0,157,158,0,0,0,125,126,0,0,
363,363,363,363,363,363,363,363,265,265,265,265,363,363,363,363,363,363,363,363,363,363,363,363,363,364,0,189,190,0,362,363,363,363,363,363,363,363,363,363,
295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,296,296,296,296,396,0,189,190,0,394,296,296,296,296,296,296,296,296,296
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1876,1877,1878,1879,1880,1881,1882,1883,1884,1885,1886,1887,1888,1889,1890,1891,1892,1893,1894,1895,1896,1897,1898,1899,1900,1901,1902,1903,1904,1905,1906,1907,1908,1909,1910,1911,1912,1913,1914,1915,
1951,1952,1953,1954,1955,1956,1957,1958,1959,1960,1961,1962,1963,1964,1965,1966,1967,1968,1969,1970,1971,1972,1973,1974,1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,
1951,1952,1953,1954,1955,1956,1957,1958,1959,1960,1961,1962,1963,1964,1965,1966,1967,1968,1969,1970,1971,1972,1973,1974,1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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="4" name="fondo" width="40" height="30">
<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,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0,0,0,0,0,0,0,0,
2044,2045,2046,2047,2048,2049,2050,2051,2052,2053,2054,2055,2056,2057,2058,2059,2060,2061,2062,2063,2064,2065,2026,2027,2028,2029,2030,2031,2032,2033,2034,2035,2036,2037,2038,2039,2040,2041,2042,2043,
2119,2120,2121,2122,2123,2124,2125,2126,2127,2128,2129,2130,2131,2132,2133,2134,2135,2136,2137,2138,2139,2140,2101,2102,2103,2104,2105,2106,2107,2108,2109,2110,2111,2112,2113,2114,2115,2116,2117,2118,
2194,2195,2196,2197,2198,2199,2200,2201,2202,2203,2204,2205,2206,2207,2208,2209,2210,2211,2212,2213,2214,2215,2176,2177,2178,2179,2180,2181,2182,2183,2184,2185,2186,2187,2188,2189,2190,2191,2192,2193,
2269,2270,2271,2272,2273,2274,2275,2276,2277,2278,2279,2280,2281,2282,2283,2284,2285,2286,2287,2288,2289,2290,2251,2252,2253,2254,2255,2256,2257,2258,2259,2260,2261,2262,2263,2264,2265,2266,2267,2268,
2344,2345,2346,2347,2348,2349,2350,2351,2352,2353,2354,2355,2356,2357,2358,2359,2360,2361,2362,2363,2364,2365,2326,2327,2328,2329,2330,2331,2332,2333,2334,2335,2336,2337,2338,2339,2340,2341,2342,2343,
2419,2420,2421,2422,2423,2424,2425,2426,2427,2428,2429,2430,2431,2432,2433,2434,2435,2436,2437,2438,2439,2440,2401,2402,2403,2404,2405,2406,2407,2408,2409,2410,2411,2412,2413,2414,2415,2416,2417,2418,
2494,2495,2496,2497,2498,2499,2500,2501,2502,2503,2504,2505,2506,2507,2508,2509,2510,2511,2512,2513,2514,2515,2476,2477,2478,2479,2480,2481,2482,2483,2484,2485,2486,2487,2488,2489,2490,2491,2492,2493,
2569,2570,2571,2572,2573,2574,2575,2576,2577,2578,2579,2580,2581,2582,2583,2584,2585,2586,2587,2588,2589,2590,2551,2552,2553,2554,2555,2556,2557,2558,2559,2560,2561,2562,2563,2564,2565,2566,2567,2568,
2644,2645,2646,2647,2648,2649,2650,2651,2652,2653,2654,2655,2656,2657,2658,2659,2660,2661,2662,2663,2664,2665,2626,2627,2628,2629,2630,2631,2632,2633,2634,2635,2636,2637,2638,2639,2640,2641,2642,2643,
2719,2720,2721,2722,2723,2724,2725,2726,2727,2728,2729,2730,2731,2732,2733,2734,2735,2736,2737,2738,2739,2740,2701,2702,2703,2704,2705,2706,2707,2708,2709,2710,2711,2712,2713,2714,2715,2716,2717,2718,
2794,2795,2796,2797,2798,2799,2800,2801,2802,2803,2804,2805,2806,2807,2808,2809,2810,2811,2812,2813,2814,2815,2776,2777,2778,2779,2780,2781,2782,2783,2784,2785,2786,2787,2788,2789,2790,2791,2792,2793,
2869,2870,2871,2872,2873,2874,2875,2876,2877,2878,2879,2880,2881,2882,2883,2884,2885,2886,2887,2888,2889,2890,2851,2852,2853,2854,2855,2856,2857,2858,2859,2860,2861,2862,2863,2864,2865,2866,2867,2868,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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="30">
<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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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,54,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,547,548,549,550,551,552,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,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,0,0,121,0,0,0,119,280,279,344,345,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,480,481,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,445,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,553,554,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,0,0,0,123,124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,109,110,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,121,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,0,0,0,0,0,0,23,0,0,0,0,553,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,116,57,0,0,0,0,0,0,0,112,1357,1358,0,0,0,1357,1358,37,38,0,1357,1358,0,0,0,1357,1358,0,0,1357,
0,0,0,0,0,0,0,0,0,293,294,295,345,207,208,0,0,0,0,0,1432,1433,0,0,1430,1432,1433,0,0,0,1432,1433,0,0,0,1432,1433,0,0,1432,
1126,1127,1126,1127,1126,1127,1126,1127,1126,1127,1126,1127,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,
1201,1202,1201,1202,1201,1202,1201,1202,1201,1202,1201,1202,1201,1202,1201,1202,1201,1202,1207,1208,1209,1210,1207,1208,1209,1210,1207,1208,1209,1210,1207,1208,1209,1210,1207,1208,1209,1210,1207,1208,
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>
</layer>
<layer id="2" name="colisiones" width="40" height="30" visible="0">
<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,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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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,5628,5628,0,0,0,5628,5628,0,0,0,5628,5628,0,0,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,
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,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,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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>
</map>

View File

@@ -1,44 +1,10 @@
tileset_img=surface.png
enemy_file=03.ene
tilemap=03.tmx
tileset=tiles_surface.png
enemyFile=03.ene
bgColor1=143,86,59
bgColor2=69,40,60
room_up=02.map
room_down=0
room_left=0
room_right=0
[tilemap]
03.tmx
[/tilemap]
[actors]
[diamond]
tileset=diamond.png
animation=diamond.ani
width=16
height=16
x=25
y=19
[/diamond]
[diamond]
tileset=diamond.png
animation=diamond.ani
width=16
height=16
x=22
y=12
[/diamond]
[diamond]
tileset=diamond.png
animation=diamond.ani
width=16
height=16
x=2
y=22
[/diamond]
[/actors]
roomUp=02.map
roomDown=0
roomLeft=0
roomRight=06.map

View File

@@ -1,34 +1,73 @@
<?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="2" nextobjectid="1">
<tileset firstgid="1" source="surface.tsx"/>
<layer id="1" name="Capa de patrones 1" width="40" height="26">
<map version="1.9" tiledversion="1.9.2" orientation="orthogonal" renderorder="right-down" width="40" height="30" tilewidth="8" tileheight="8" infinite="0" nextlayerid="3" nextobjectid="1">
<tileset firstgid="1" source="tiles_surface.tsx"/>
<tileset firstgid="5626" source="tile_kind.tsx"/>
<layer id="1" name="Mapa" width="40" height="30">
<data encoding="csv">
260,431,431,431,431,431,431,431,431,431,431,431,431,431,431,431,431,431,431,431,431,431,431,431,431,432,0,189,190,0,430,431,431,431,431,431,431,431,431,260,
260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,189,190,0,0,0,0,0,0,0,0,0,0,260,
260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,189,190,0,0,0,0,0,0,0,0,0,0,260,
260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,189,190,0,0,0,0,0,0,0,0,0,0,260,
291,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,577,578,579,580,581,582,0,0,0,0,0,0,0,0,292,
260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,189,190,0,0,0,0,0,0,0,0,0,0,260,
260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,189,190,0,0,0,0,0,0,0,0,0,0,260,
260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,189,190,0,0,0,0,0,0,0,0,0,0,260,
260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,189,190,0,0,0,0,0,0,0,0,0,0,260,
260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,189,190,0,0,0,0,0,0,0,0,0,0,291,
260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,577,578,579,580,581,582,0,0,0,0,0,0,0,0,292,
260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,189,190,0,0,0,0,0,0,0,0,0,0,260,
260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,189,190,0,0,0,0,0,0,0,0,0,0,260,
291,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,155,156,65,66,0,0,0,0,0,0,0,0,260,
260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,187,188,97,98,0,0,0,0,0,0,0,0,260,
260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,577,578,579,580,581,582,0,0,0,157,158,0,0,0,0,0,0,0,0,260,
260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,189,190,0,0,0,0,0,189,190,0,0,0,0,0,0,0,0,292,
260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,189,190,0,0,0,0,0,159,160,0,0,0,0,0,0,0,0,260,
260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,67,0,0,0,0,0,0,191,192,0,0,0,0,0,0,0,0,260,
260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,157,158,0,0,0,0,0,0,577,578,579,580,581,582,0,0,0,0,260,
260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,189,190,0,0,0,0,0,0,0,0,189,190,0,0,0,0,0,0,291,
291,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,159,160,0,0,0,0,0,0,0,0,189,190,0,0,0,0,0,0,260,
260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,191,192,577,578,579,580,581,582,0,0,67,0,0,0,0,0,0,0,260,
260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,69,70,0,0,189,190,0,0,0,157,158,0,0,0,0,0,0,0,260,
260,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,101,102,0,0,189,190,0,0,0,189,190,0,0,0,0,0,0,0,260,
260,260,257,258,260,260,260,260,258,260,260,260,260,260,257,260,260,260,258,260,260,260,260,260,260,260,260,260,257,258,260,260,260,260,260,260,257,260,260,260
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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>
</map>

59
data/map/04.ene Normal file
View File

@@ -0,0 +1,59 @@
[path]
tileset=limon.png
animation=limon.ani
width=16
height=16
x=8
y=25
vx=0.3
vy=0
x1=4
y1=25
x2=15
y2=25
[/path]
[path]
tileset=pulga.png
animation=pulga.ani
width=16
height=16
x=22
y=25
vx=0.3
vy=0
x1=18
y1=25
x2=31
y2=25
[/path]
[path]
tileset=seton.png
animation=seton.ani
width=16
height=16
x=2
y=11
vx=0.3
vy=0
x1=2
y1=11
x2=13
y2=11
[/path]
[path]
tileset=setita_venenosa.png
animation=setita_venenosa.ani
width=16
height=16
x=22
y=11
vx=-0.3
vy=0
x1=10
y1=11
x2=22
y2=11
[/path]

11
data/map/04.map Normal file
View File

@@ -0,0 +1,11 @@
tilemap=04.tmx
tileset=tiles_surface.png
enemyFile=04.ene
bgColor1=80,100,150
bgColor2=144,225,231
bgScroll=true
roomUp=0
roomDown=04.map
roomLeft=04.map
roomRight=01.map

141
data/map/04.tmx Normal file
View File

@@ -0,0 +1,141 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.9" tiledversion="1.9.2" orientation="orthogonal" renderorder="right-down" width="40" height="30" tilewidth="8" tileheight="8" infinite="0" nextlayerid="5" nextobjectid="1">
<tileset firstgid="1" source="tiles_surface.tsx"/>
<tileset firstgid="5626" source="tile_kind.tsx"/>
<layer id="4" name="estatico" width="40" height="30">
<data encoding="cs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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,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3301,3302,3303,3304,3305,3306,3307,3308,3309,3310,3311,3312,3313,3314,3315,3316,3317,3318,3319,3320,3321,3322,3323,3324,3325,3326,3327,3328,3329,3330,3331,3332,3333,3334,3335,3336,3337,3338,3339,3340,
3376,3377,3378,3379,3380,3381,3382,3383,3384,3385,3386,3387,3388,3389,3390,3391,3392,3393,3394,3395,3396,3397,3398,3399,3400,3401,3402,3403,3404,3405,3406,3407,3408,3409,3410,3411,3412,3413,3414,3415,
3451,3452,3453,3454,3455,3456,3457,3458,3459,3460,3461,3462,3463,3464,3465,3466,3467,3468,3469,3470,3471,3472,3473,3474,3475,3476,3477,3478,3479,3480,3481,3482,3483,3484,3485,3486,3487,3488,3489,3490,
3526,3527,3528,3529,3530,3531,3532,3533,3534,3535,3536,3537,3538,3539,3540,3541,3542,3543,3544,3545,3546,3547,3548,3549,3550,3551,3552,3553,3554,3555,3556,3557,3558,3559,3560,3561,3562,3563,3564,3565,
3601,3602,3603,3604,3605,3606,3607,3608,3609,3610,3611,3612,3613,3614,3615,3616,3617,3618,3619,3620,3621,3622,3623,3624,3625,3626,3627,3628,3629,3630,3631,3632,3633,3634,3635,3636,3637,3638,3639,3640,
3676,3677,3678,3679,3680,3681,3682,3683,3684,3685,3686,3687,3688,3689,3690,3691,3692,3693,3694,3695,3696,3697,3698,3699,3700,3701,3702,3703,3704,3705,3706,3707,3708,3709,3710,3711,3712,3713,3714,3715,
3751,3752,3753,3754,3755,3756,3757,3758,3759,3760,3761,3762,3763,3764,3765,3766,3767,3768,3769,3770,3771,3772,3773,3774,3775,3776,3777,3778,3779,3780,3781,3782,3783,3784,3785,3786,3787,3788,3789,3790,
3826,3827,3828,3829,3830,3831,3832,3833,3834,3835,3836,3837,3838,3839,3840,3841,3842,3843,3844,3845,3846,3847,3848,3849,3850,3851,3852,3853,3854,3855,3856,3857,3858,3859,3860,3861,3862,3863,3864,3865,
3901,3902,3903,3904,3905,3906,3907,3908,3909,3910,3911,3912,3913,3914,3915,3916,3917,3918,3919,3920,3921,3922,3923,3924,3925,3926,3927,3928,3929,3930,3931,3932,3933,3934,3935,3936,3937,3938,3939,3940,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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="3" name="fondo" width="40" height="30">
<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,2326,2327,2328,2329,2330,2331,2332,2333,2334,2335,2336,2337,2338,0,0,0,2342,2343,2344,2345,2346,2347,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,2401,2402,2403,2404,2405,2406,2407,2408,2409,2410,2411,2412,2413,2414,2415,2416,2417,2418,2419,2420,2421,2422,2423,2424,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,2476,2477,2478,2479,2480,2481,2482,2483,2484,2485,2486,2487,2488,2489,2490,2491,2492,2493,2494,2495,2496,2497,2498,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,2559,2560,2561,2562,2563,2564,2565,2566,2567,2568,2569,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,2634,2635,2636,2637,2638,2639,2640,2641,2642,2643,2644,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,2709,2710,2711,2712,2713,2714,2715,2716,2717,2718,2719,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,2784,2785,2786,2787,2788,2789,2790,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,2851,2852,2853,2854,2855,2856,2857,2858,2859,2860,2861,2862,2863,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,61,62,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,465,466,0,0,0,0,0,130,131,132,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,540,541,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,1501,1502,1503,1504,1503,1504,1503,1504,1503,1504,1503,1504,1503,1504,1503,1504,1503,1504,1503,1504,1503,1504,1505,1506,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,5,3,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,82,83,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,80,81,79,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,76,77,2,3,2,7,8,0,0,457,458,0,0,0,0,0,0,0,0,0,
1503,1504,1505,1506,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,76,77,82,83,0,0,532,533,0,0,0,0,0,0,0,0,0,
3,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1501,1502,1503,1504,1505,1506,0,0,0,0,0,0,0,0,0,
87,79,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,
87,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
87,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
87,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,237,238,239,240,0,0,0,0,
87,0,467,468,0,0,0,0,0,0,0,0,0,0,0,139,140,0,0,0,0,0,0,156,157,0,0,0,0,0,0,0,312,313,314,315,0,0,0,0,
87,0,542,543,0,0,0,0,0,166,167,0,0,0,0,0,0,0,0,0,0,0,0,231,232,0,0,0,0,0,0,0,387,388,389,390,446,446,446,446,
1126,1137,1136,1137,1136,1137,1136,1137,1136,1137,1136,1137,1136,1137,1136,1137,1136,1137,1136,1137,1136,1137,1136,1137,1136,1137,1136,1137,1136,1137,1136,1137,1136,1137,1136,1137,1136,1137,1136,1137,
1211,1212,1211,1212,1211,1212,1211,1212,1211,1212,1211,1203,1204,1212,1211,1212,1211,1212,1211,1212,1211,1212,1211,1212,1211,1212,1211,1212,1211,1212,1211,1212,1211,1212,1211,1212,1211,1212,1211,1212,
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>
</layer>
<layer id="2" name="colisiones" width="40" height="30" visible="0">
<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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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,
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,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,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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>
</map>

10
data/map/05.map Normal file
View File

@@ -0,0 +1,10 @@
tilemap=05.tmx
tileset=tiles_surface.png
bgColor1=0,171,159
bgColor2=144,225,231
bgScroll=true
roomUp=0
roomDown=06.map
roomLeft=02.map
roomRight=07.map

141
data/map/05.tmx Normal file
View File

@@ -0,0 +1,141 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.9" tiledversion="1.9.2" orientation="orthogonal" renderorder="right-down" width="40" height="30" tilewidth="8" tileheight="8" infinite="0" nextlayerid="6" nextobjectid="3">
<tileset firstgid="1" source="tiles_surface.tsx"/>
<tileset firstgid="5626" source="tile_kind.tsx"/>
<layer id="5" name="estatico" width="40" height="30" visible="0">
<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,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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,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1876,1877,1878,1879,1880,1881,1882,1883,1884,1885,1886,1887,1888,1889,1890,1891,1892,1893,1894,1895,1896,1897,1898,1899,1900,1901,1902,1903,1904,1905,1906,1907,1908,1909,1910,1911,1912,1913,1914,1915,
1951,1952,1953,1954,1955,1956,1957,1958,1959,1960,1961,1962,1963,1964,1965,1966,1967,1968,1969,1970,1971,1972,1973,1974,1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
2026,2027,2028,2029,2030,2031,2032,2033,2034,2035,2036,2037,2038,2039,2040,2041,2042,2043,2044,2045,2046,2047,2048,2049,2050,2051,2052,2053,2054,2055,2056,2057,2058,2059,2060,2061,2062,2063,2064,2065,
2101,2102,2103,2104,2105,2106,2107,2108,2109,2110,2111,2112,2113,2114,2115,2116,2117,2118,2119,2120,2121,2122,2123,2124,2125,2126,2127,2128,2129,2130,2131,2132,2133,2134,2135,2136,2137,2138,2139,2140,
2176,2177,2178,2179,2180,2181,2182,2183,2184,2185,2186,2187,2188,2189,2190,2191,2192,2193,2194,2195,2196,2197,2198,2199,2200,2201,2202,2203,2204,2205,2206,2207,2208,2209,2210,2211,2212,2213,2214,2215,
2251,2252,2253,2254,2255,2256,2257,2258,2259,2260,2261,2262,2263,2264,2265,2266,2267,2268,2269,2270,2271,2272,2273,2274,2275,2276,2277,2278,2279,2280,2281,2282,2283,2284,2285,2286,2287,2288,2289,2290,
2326,2327,2328,2329,2330,2331,2332,2333,2334,2335,2336,2337,2338,2339,2340,2341,2342,2343,2344,2345,2346,2347,2348,2349,2350,2351,2352,2353,2354,2355,2356,2357,2358,2359,2360,2361,2362,2363,2364,2365,
2401,2402,2403,2404,2405,2406,2407,2408,2409,2410,2411,2412,2413,2414,2415,2416,2417,2418,2419,2420,2421,2422,2423,2424,2425,2426,2427,2428,2429,2430,2431,2432,2433,2434,2435,2436,2437,2438,2439,2440,
2476,2477,2478,2479,2480,2481,2482,2483,2484,2485,2486,2487,2488,2489,2490,2491,2492,2493,2494,2495,2496,2497,2498,2499,2500,2501,2502,2503,2504,2505,2506,2507,2508,2509,2510,2511,2512,2513,2514,2515,
2551,2552,2553,2554,2555,2556,2557,2558,2559,2560,2561,2562,2563,2564,2565,2566,2567,2568,2569,2570,2571,2572,2573,2574,2575,2576,2577,2578,2579,2580,2581,2582,2583,2584,2585,2586,2587,2588,2589,2590,
2626,2627,2628,2629,2630,2631,2632,2633,2634,2635,2636,2637,2638,2639,2640,2641,2642,2643,2644,2645,2646,2647,2648,2649,2650,2651,2652,2653,2654,2655,2656,2657,2658,2659,2660,2661,2662,2663,2664,2665,
2701,2702,2703,2704,2705,2706,2707,2708,2709,2710,2711,2712,2713,2714,2715,2716,2717,2718,2719,2720,2721,2722,2723,2724,2725,2726,2727,2728,2729,2730,2731,2732,2733,2734,2735,2736,2737,2738,2739,2740,
2776,2777,2778,2779,2780,2781,2782,2783,2784,2785,2786,2787,2788,2789,2790,2791,2792,2793,2794,2795,2796,2797,2798,2799,2800,2801,2802,2803,2804,2805,2806,2807,2808,2809,2810,2811,2812,2813,2814,2815,
2851,2852,2853,2854,2855,2856,2857,2858,2859,2860,2861,2862,2863,2864,2865,2866,2867,2868,2869,2870,2871,2872,2873,2874,2875,2876,2877,2878,2879,2880,2881,2882,2883,2884,2885,2886,2887,2888,2889,2890,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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="30">
<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,159,160,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,309,310,0,0,0,0,234,235,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,384,385,244,0,1512,1514,1515,1516,1517,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1504,1505,1506,1507,1506,1507,1506,1507,1508,1509,0,142,143,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,8,9,5,16,18,95,95,6,7,13,79,82,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,64,83,84,5,16,93,95,16,81,82,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,83,84,5,18,18,20,95,16,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,142,143,0,0,0,0,0,0,14,16,16,18,20,20,95,81,82,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,89,16,18,93,20,20,95,15,0,0,0,0,0,0,0,0,0,0,0,550,551,0,0,0,555,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,4,5,5,18,18,20,95,90,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,79,80,5,92,93,20,95,19,10,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,1504,1506,1507,1511,18,95,18,85,86,11,11,0,159,160,0,0,0,0,47,110,116,117,0,0,0,0,0,0,
0,0,0,0,550,0,0,553,554,555,0,0,0,4,5,6,16,20,95,94,19,6,85,86,234,235,0,0,0,0,0,0,0,0,0,0,0,0,143,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,79,80,16,17,20,95,20,94,17,1510,1507,1508,1509,0,0,0,44,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,112,113,0,0,0,0,0,0,9,91,18,20,20,21,20,19,16,6,7,0,0,0,0,40,41,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,40,41,0,0,0,0,8,9,6,17,18,95,95,20,21,94,91,15,11,0,8,11,0,78,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,244,0,83,84,91,18,20,21,20,95,96,19,16,85,86,9,85,86,0,546,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,114,115,48,1504,1505,1506,1511,5,18,95,95,96,95,96,20,21,21,17,91,6,6,1510,1515,1516,1517,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,9,5,6,17,95,95,95,20,21,20,21,95,96,96,95,95,19,16,6,6,7,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,46,0,0,0,5,6,91,18,95,19,16,6,5,6,5,6,5,6,5,16,18,95,16,81,82,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,8,9,5,16,19,95,16,5,5,5,6,1510,1513,1516,1511,6,5,5,5,18,19,6,6,6,10,11,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,83,84,18,19,95,92,5,13,82,80,7,82,13,82,79,12,82,6,5,16,95,18,16,6,85,86,0,552,553,554,0,0,0,
0,0,0,0,0,1504,1505,1511,18,18,95,16,6,12,0,0,0,0,0,40,41,0,0,0,12,4,5,5,93,95,16,1510,1516,1517,0,0,0,0,0,0,
0,0,0,0,0,0,4,5,95,18,16,6,6,0,0,0,0,0,0,0,0,0,0,0,0,79,80,5,16,93,95,19,6,10,11,0,0,0,0,0,
0,468,469,0,8,11,0,89,18,16,6,6,7,0,0,0,0,0,0,0,8,9,10,11,0,0,0,12,4,5,93,95,19,17,10,11,319,320,321,322,
0,543,544,244,83,10,83,16,18,6,6,81,82,8,11,8,9,10,11,0,83,84,85,86,0,8,11,0,79,80,16,93,94,92,85,86,394,395,396,397,
1126,1127,1128,1129,1130,1131,1126,1127,1128,1129,1130,1131,1126,1127,1128,1129,1130,1131,1126,1127,1128,1129,1130,1131,1126,1127,1128,1129,1130,1131,1126,1127,1128,1129,1126,1127,1128,1129,1130,1131,
1201,1202,1203,1204,1205,1206,1201,1202,1203,1204,1205,1206,1201,1202,1203,1204,1205,1206,1201,1202,1203,1204,1205,1206,1201,1202,1203,1204,1205,1206,1201,1202,1203,1204,1201,1202,1203,1204,1205,1206,
1276,1277,1278,1279,1280,1281,1276,1277,1278,1279,1280,1281,1276,1277,1278,1279,1280,1281,1276,1277,1278,1279,1280,1281,1276,1277,1278,1279,1280,1281,1276,1277,1278,1279,1276,1277,1278,1279,1280,1281
</data>
</layer>
<layer id="3" name="colisiones" width="40" height="30" visible="0">
<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,5628,5628,5628,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,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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,5628,5628,5628,5628,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5628,5628,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,5628,5628,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,5628,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,5628,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,
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,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,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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>
</map>

9
data/map/06.map Normal file
View File

@@ -0,0 +1,9 @@
tilemap=06.tmx
tileset=tiles_surface.png
bgColor1=143,86,59
bgColor2=69,40,60
roomUp=05.map
roomDown=0
roomLeft=03.map
roomRight=0

141
data/map/06.tmx Normal file
View File

@@ -0,0 +1,141 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.9" tiledversion="1.9.2" orientation="orthogonal" renderorder="right-down" width="40" height="30" tilewidth="8" tileheight="8" infinite="0" nextlayerid="5" nextobjectid="1">
<tileset firstgid="1" source="tiles_surface.tsx"/>
<tileset firstgid="5626" source="tile_kind.tsx"/>
<layer id="4" name="estatico" width="40" height="30">
<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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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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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="3" name="fondo" width="40" height="30">
<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,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,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,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,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,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,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,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,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,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,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,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,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,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,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,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
</data>
</layer>
<layer id="1" name="mapa" width="40" height="30">
<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,84,85,14,90,91,91,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,84,85,89,90,91,91,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,84,85,14,14,90,15,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,84,85,89,90,15,15,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,13,15,15,15,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,13,88,15,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,13,13,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,13,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,13,
0,0,0,0,0,0,0,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0,0,0,0,0,0,0,11,81,
3,87,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,86,82,
2,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,82,
3,87,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,86,81,
2,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,82,
2,87,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,86,81,
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,
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>
</layer>
<layer id="2" name="colisiones" width="40" height="30">
<data encoding="csv">
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,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,5627,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,5627,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,5627,0,0,0,0,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,484,0,0,0,0,0,0,0,0,0,0,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,111,112,107,45,46,0,43,44,107,107,113,114,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,0,5627,0,
5627,0,0,0,0,0,0,0,0,0,0,0,111,112,107,113,114,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5627,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,19,0,0,0,0,0,0,0,5627,278,
5627,450,0,0,0,0,0,0,0,0,0,0,0,0,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,
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,5627,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,5627,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,116,115,5627,0,
5627,0,553,554,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5627,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,5627,0,
5627,0,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,116,115,116,115,116,115,116,115,116,115,116,0,0,5627,0,
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,0,0,0,0,5627,0,
0,5627,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,115,116,5627,0,
0,5627,0,0,449,450,0,0,0,0,0,0,0,0,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,116,5627,0,
0,5627,0,0,0,449,449,0,0,0,0,0,0,0,19,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,120,115,116,115,116,115,116,115,116,115,116,115,116,115,116,115,116,115,116,115,116,5627,0,
0,5627,277,0,277,278,277,449,449,278,277,276,277,278,483,276,277,278,277,278,277,278,276,278,277,278,277,278,277,278,276,278,277,278,277,483,276,278,5627,278,
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,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,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,
823,824,823,824,823,824,823,824,823,824,823,824,823,824,823,824,823,824,823,824,823,824,823,824,823,824,823,824,823,824,823,824,823,824,823,824,823,824,823,824,
857,858,857,858,857,858,857,858,857,858,857,858,857,858,857,858,857,858,857,858,857,858,857,858,857,858,857,858,857,858,857,858,857,858,857,858,857,858,857,858
</data>
</layer>
</map>

9
data/map/07.map Normal file
View File

@@ -0,0 +1,9 @@
tilemap=07.tmx
tileset=tiles_surface.png
bgColor1=0,171,159
bgColor2=144,225,231
roomUp=08.map
roomDown=0
roomLeft=05.map
roomRight=0

72
data/map/07.tmx Normal file
View File

@@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.9" tiledversion="1.9.2" orientation="orthogonal" renderorder="right-down" width="40" height="30" tilewidth="8" tileheight="8" infinite="0" nextlayerid="3" nextobjectid="1">
<tileset firstgid="1" source="tiles_surface.tsx"/>
<layer id="1" name="Mapa" width="40" height="30">
<data encoding="csv">
281,282,281,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,281,282,281,282,281,282,281,282,281,282,
315,0,315,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,315,0,315,0,
281,0,281,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,281,0,281,0,
315,0,315,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,315,0,315,0,
281,0,281,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,281,0,281,0,
315,0,315,0,0,0,281,282,281,282,281,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,315,0,315,0,
281,0,281,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,281,0,0,0,
315,0,315,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,315,0,0,0,
281,0,281,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,281,0,0,0,
315,0,315,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,281,282,281,282,281,0,0,0,0,0,0,315,0,0,0,
281,282,281,281,282,281,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,281,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,315,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,281,0,281,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,315,0,315,0,
0,0,0,0,0,0,0,281,282,281,282,281,282,281,282,281,282,281,282,281,282,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,281,0,281,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,281,282,281,282,281,315,0,315,0,
0,0,0,0,0,0,0,281,282,281,282,281,282,281,282,281,282,281,282,281,282,0,0,0,0,0,0,0,0,0,0,0,0,0,0,315,281,0,281,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,281,282,281,315,0,315,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,281,282,281,282,281,282,281,282,281,0,281,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,315,0,315,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,281,282,281,282,281,282,281,282,0,0,281,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,281,282,281,282,281,315,0,0,0,0,0,0,0,0,0,315,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,281,282,281,0,281,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,281,282,281,0,0,0,0,0,0,0,0,0,0,0,0,315,0,
281,282,281,282,281,282,281,282,281,282,281,282,281,282,281,282,281,282,281,282,281,282,281,282,281,282,0,0,0,0,0,0,0,282,281,282,281,282,281,0,
315,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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="2" name="Colisiones" width="40" height="30">
<data encoding="csv">
281,0,281,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,281,282,281,282,281,282,281,282,281,282,
315,0,315,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,315,0,0,0,
281,0,281,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,281,0,0,0,
315,0,315,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,315,0,315,0,
281,0,281,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,281,0,281,0,
315,0,315,0,0,0,281,282,281,282,281,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,315,0,315,0,
281,0,281,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,281,0,281,0,
315,0,315,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,315,0,315,0,
281,0,281,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,281,0,281,0,
315,0,315,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,281,282,281,282,281,0,0,0,0,0,0,315,0,315,0,
281,0,281,281,282,281,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,281,0,281,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,315,0,315,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,281,0,281,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,315,0,315,0,
0,0,0,0,0,0,0,281,282,281,282,281,282,281,282,281,282,281,282,281,282,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,281,0,281,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,281,282,281,282,281,315,0,315,0,
0,0,0,0,0,0,0,281,282,281,282,281,282,281,282,281,282,281,282,281,282,0,0,0,0,0,0,0,0,0,0,315,0,0,0,315,281,0,281,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,281,282,281,282,281,315,0,315,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,281,282,281,282,281,282,281,282,281,0,281,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,315,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,281,282,281,282,281,282,281,282,281,282,281,282,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,281,282,281,282,281,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,315,0,0,0,0,0,0,0,0,0,0,0,0,281,282,281,282,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,281,282,281,282,0,0,0,0,0,0,0,0,0,0,0,0,0,
281,282,281,282,281,282,281,282,281,282,281,282,281,282,281,282,281,282,281,282,281,282,281,282,281,282,281,282,281,282,281,282,281,282,281,282,281,282,281,282,
315,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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>
</map>

9
data/map/08.map Normal file
View File

@@ -0,0 +1,9 @@
tilemap=08.tmx
tileset=tiles_surface.png
bgColor1=0,171,159
bgColor2=144,225,231
roomUp=0
roomDown=07.map
roomLeft=10.map
roomRight=09.map

72
data/map/08.tmx Normal file
View File

@@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.9" tiledversion="1.9.2" orientation="orthogonal" renderorder="right-down" width="40" height="30" tilewidth="8" tileheight="8" infinite="0" nextlayerid="3" nextobjectid="1">
<tileset firstgid="1" source="tiles_surface.tsx"/>
<layer id="1" name="Mapa" width="40" height="30">
<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,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,139,140,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,281,282,281,
315,0,315,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,281,282,281,282,281,282,281,282,281,282,
281,282,281,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,281,282,281,282,281,282,281,282,281,282,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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>
</map>

9
data/map/09.map Normal file
View File

@@ -0,0 +1,9 @@
tilemap=09.tmx
tileset=tiles_surface.png
bgColor1=0,171,159
bgColor2=144,225,231
roomUp=0
roomDown=0
roomLeft=08.map
roomRight=0

72
data/map/09.tmx Normal file
View File

@@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.9" tiledversion="1.9.2" orientation="orthogonal" renderorder="right-down" width="40" height="30" tilewidth="8" tileheight="8" infinite="0" nextlayerid="3" nextobjectid="1">
<tileset firstgid="1" source="tiles_surface.tsx"/>
<layer id="1" name="Mapa" width="40" height="30">
<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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0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
281,281,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
315,315,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
281,281,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
315,315,281,282,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
281,281,315,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
315,315,281,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
281,281,315,0,281,282,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
315,315,281,0,315,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
281,281,315,0,281,282,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
281,282,281,0,281,282,281,282,281,282,281,282,281,282,281,282,281,282,281,282,281,282,281,282,281,282,281,282,281,282,281,282,281,282,281,282,281,282,281,282,
315,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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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,
315,315,281,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
281,0,0,0,281,282,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,281,282,281,282,281,282,281,282,281,282,281,282,281,282,281,282,281,282,281,282,281,282,281,282,281,282,281,282,281,282,281,282,281,282,281,282,281,282,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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>
</map>

9
data/map/10.map Normal file
View File

@@ -0,0 +1,9 @@
tilemap=10.tmx
tileset=tiles_surface.png
bgColor1=0,171,159
bgColor2=144,225,231
roomUp=0
roomDown=05.map
roomLeft=10.map
roomRight=08.map

72
data/map/10.tmx Normal file
View File

@@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.9" tiledversion="1.9.2" orientation="orthogonal" renderorder="right-down" width="40" height="30" tilewidth="8" tileheight="8" infinite="0" nextlayerid="3" nextobjectid="1">
<tileset firstgid="1" source="tiles_surface.tsx"/>
<layer id="1" name="Mapa" width="40" height="30">
<data encoding="csv">
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,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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>
</map>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

File diff suppressed because it is too large Load Diff

View File

@@ -2,24 +2,73 @@
"maps": [
{
"fileName": "02.tmx",
"height": 208,
"height": 240,
"width": 320,
"x": 256,
"y": 0
},
{
"fileName": "01.tmx",
"height": 208,
"height": 240,
"width": 320,
"x": -64,
"y": 0
},
{
"fileName": "03.tmx",
"height": 208,
"height": 240,
"width": 320,
"x": 256,
"y": 208
"y": 240
},
{
"fileName": "04.tmx",
"height": 240,
"width": 320,
"x": -384,
"y": 0
},
{
"fileName": "05.tmx",
"height": 240,
"width": 320,
"x": 576,
"y": 0
},
{
"fileName": "06.tmx",
"height": 240,
"width": 320,
"x": 576,
"y": 240
},
{
"fileName": "07.tmx",
"height": 240,
"width": 320,
"x": 896,
"y": 0
},
{
"fileName": "08.tmx",
"height": 240,
"width": 320,
"x": 896,
"y": -240
},
{
"fileName": "09.tmx",
"height": 240,
"width": 320,
"x": 1216,
"y": -240
},
{
"fileName": "10.tmx",
"height": 240,
"width": 320,
"x": 576,
"y": -240
}
],
"onlyShowAdjacentMaps": false,

BIN
data/map/tile_kind.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 B

4
data/map/tile_kind.tsx Normal file
View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.9" tiledversion="1.9.2" name="tile_class" tilewidth="8" tileheight="8" tilecount="3" columns="3">
<image source="tile_kind.png" width="24" height="8"/>
</tileset>

BIN
data/map/tiles_surface.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

1028
data/map/tiles_surface.tsx Normal file

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

35
data/menu/title.men Normal file
View File

@@ -0,0 +1,35 @@
font_png=dogica.png
font_txt=dogica.txt
sound_cancel=sound_menu_cancel.wav
sound_accept=sound_menu_select.wav
sound_move=sound_menu_move.wav
name=TITLE
x=0
y=150
backgroundType=0
backgroundColor=48,48,64,192
areElementsCenteredOnX=true
isCenteredOnX=true
centerX=160
selector_color=229,28,35,0
selector_text_color=255,180,0
defaultActionWhenCancel=2
[item]
text=START
hPaddingDown=2
[/item]
[item]
text=OPTIONS
hPaddingDown=5
[/item]
[item]
text=EXIT
[/item]

View File

@@ -1,6 +1,5 @@
frames_per_row=8
frame_width=16
frame_height=24
frameWidth=16
frameHeight=24
[animation]
name=stand
@@ -13,19 +12,19 @@ frames=0,1,2,2,1,0,0,1,2,2,1,0,0,1,2,2,1,0,0,1,2,2,1,0,0,1,2,3,4,5,4,5,5,5,6,6,7
name=walk
speed=4
loop=0
frames=8,9,10,10,9,8,11,12,13,13,14,15
frames=14,15,16,17,18,19,20,21,22,23,24
[/animation]
[animation]
name=jump
speed=10
speed=2
loop=-1
frames=16,17,18,17,16
frames=28,29,30,31,32,33,34,35,36,37,38,39,40,41
[/animation]
[animation]
name=death
speed=10
speed=8
loop=-1
frames=24,25,26,27,28,29,30,31
frames=42,43,44,45,46,47,48,49,50,51,52,52,52,52,52,52,52
[/animation]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

@@ -15,8 +15,7 @@ Actor::Actor(actor_t actor)
renderer = actor.renderer;
// Crea objetos
texture = new LTexture();
loadTextureFromFile(texture, asset->get(actor.tileset), renderer);
texture = new Texture(renderer, asset->get(actor.tileset));
sprite = new AnimatedSprite(texture, renderer, asset->get(actor.animation));
// Obten el resto de valores

View File

@@ -1,9 +1,9 @@
#pragma once
#include <SDL2/SDL.h>
#include "utils.h"
#include "asset.h"
#include "animatedsprite.h"
#include "common/animatedsprite.h"
#include "common/asset.h"
#include "common/utils.h"
#include <string>
#ifndef ACTOR_H
@@ -39,10 +39,13 @@ struct actor_t
class Actor
{
protected:
SDL_Renderer *renderer; // El renderizador de la ventana
Asset *asset; // Objeto con la ruta a todos los ficheros de recursos
LTexture *texture; // Textura con los graficos del enemigo
// Objetos y punteros
AnimatedSprite *sprite; // Sprite del enemigo
Asset *asset; // Objeto con la ruta a todos los ficheros de recursos
Texture *texture; // Textura con los graficos del enemigo
SDL_Renderer *renderer; // El renderizador de la ventana
// Variables
SDL_Rect collider; // Caja de colisión
actor_name_e name; // Nombre del actor

View File

@@ -18,8 +18,6 @@ public:
// Destructor
~ActorDiamond();
};
#endif

View File

@@ -11,6 +11,7 @@
class ActorMovingPlatform : public Actor
{
private:
// Variables
SDL_Point p1; // Punto 1 (inicial) de la ruta
SDL_Point p2; // Punto 2 (final) de la ruta

View File

@@ -1,267 +0,0 @@
#include "const.h"
#include "animatedsprite.h"
// Constructor
AnimatedSprite::AnimatedSprite(LTexture *texture, SDL_Renderer *renderer, std::string file)
{
// Copia los punteros
setTexture(texture);
setRenderer(renderer);
// Carga las animaciones
load(file);
// Inicializa variables
currentAnimation = 0;
}
// Destructor
AnimatedSprite::~AnimatedSprite()
{
for (auto &a : animation)
{
a.frames.clear();
}
animation.clear();
}
// Obtiene el indice de la animación a partir del nombre
int AnimatedSprite::getIndex(std::string name)
{
int index = -1;
for (int i = 0; i < animation.size(); i++)
{
if (animation[i].name == name)
{
index = i;
}
}
if (index == -1)
{
printf("** Warning: could not find \"%s\" animation\n", name.c_str());
index = 0;
}
return index;
}
// Calcula el frame correspondiente a la animación
void AnimatedSprite::animate()
{
if (enabled)
{
// Calcula el frame actual a partir del contador
animation[currentAnimation].currentFrame = animation[currentAnimation].counter / animation[currentAnimation].speed;
// Si alcanza el final de la animación, reinicia el contador de la animación
// en función de la variable loop y coloca el nuevo frame
if (animation[currentAnimation].currentFrame >= animation[currentAnimation].frames.size())
{
if (animation[currentAnimation].loop == -1)
{ // Si no hay loop, deja el último frame
animation[currentAnimation].currentFrame = animation[currentAnimation].frames.size();
animation[currentAnimation].completed = true;
}
else
{ // Si hay loop, vuelve al frame indicado
animation[currentAnimation].counter = 0;
animation[currentAnimation].currentFrame = animation[currentAnimation].loop;
}
}
// En caso contrario
else
{
// Escoge el frame correspondiente de la animación
setSpriteClip(animation[currentAnimation].frames[animation[currentAnimation].currentFrame]);
// Incrementa el contador de la animacion
animation[currentAnimation].counter++;
}
}
}
// Establece el frame actual de la animación
void AnimatedSprite::setCurrentFrame(std::string name, int num)
{
animation[getIndex(name)].currentFrame = num;
}
// Establece el valor del contador
void AnimatedSprite::setAnimationCounter(std::string name, int num)
{
animation[getIndex(name)].counter = num;
}
// Establece la velocidad de una animación
void AnimatedSprite::setAnimationSpeed(std::string name, int speed)
{
animation[getIndex(name)].counter = speed;
}
// Establece si la animación se reproduce en bucle
void AnimatedSprite::setAnimationLoop(std::string name, int loop)
{
animation[getIndex(name)].loop = loop;
}
// Establece el valor de la variable
void AnimatedSprite::setAnimationCompleted(std::string name, bool value)
{
animation[getIndex(name)].completed = value;
}
// Comprueba si ha terminado la animación
bool AnimatedSprite::animationIsCompleted()
{
return animation[currentAnimation].completed;
}
// Devuelve el rectangulo de una animación y frame concreto
SDL_Rect AnimatedSprite::getAnimationClip(std::string name, Uint8 index)
{
return animation[getIndex(name)].frames[index];
}
// Carga la animación desde un fichero
bool AnimatedSprite::load(std::string filePath)
{
int frames_per_row = 0;
int frame_width = 0;
int frame_height = 0;
// Indicador de éxito en la carga
bool success = true;
const std::string filename = filePath.substr(filePath.find_last_of("\\/") + 1);
std::ifstream file(filePath);
std::string line;
// El fichero se puede abrir
if (file.good())
{
// Procesa el fichero linea a linea
printf("Reading file %s\n", filename.c_str());
while (std::getline(file, line))
{
// Si la linea contiene el texto [enemy] se realiza el proceso de carga de un enemigo
if (line == "[animation]")
{
t_animation buffer;
buffer.counter = 0;
buffer.currentFrame = 0;
buffer.completed = false;
do
{
std::getline(file, line);
// Encuentra la posición del caracter '='
int pos = line.find("=");
// Procesa las dos subcadenas
if (pos != line.npos)
{
if (line.substr(0, pos) == "name")
{
buffer.name = line.substr(pos + 1, line.length());
}
else if (line.substr(0, pos) == "speed")
{
buffer.speed = std::stoi(line.substr(pos + 1, line.length()));
}
else if (line.substr(0, pos) == "loop")
{
buffer.loop = std::stoi(line.substr(pos + 1, line.length()));
}
else if (line.substr(0, pos) == "frames")
{
// Se introducen los valores separados por comas en un vector
std::stringstream ss(line.substr(pos + 1, line.length()));
std::string tmp;
SDL_Rect rect = {0, 0, frame_width, frame_height};
while (getline(ss, tmp, ','))
{
int num_tile = std::stoi(tmp);
rect.x = (num_tile % frames_per_row) * frame_width;
rect.y = (num_tile / frames_per_row) * frame_height;
buffer.frames.push_back(rect);
}
}
else
{
printf("Warning: file %s, unknown parameter \"%s\"\n", filename.c_str(), line.substr(0, pos).c_str());
success = false;
}
}
} while (line != "[/animation]");
// Añade el enemigo al vector de enemigos
animation.push_back(buffer);
}
// En caso contrario se parsea el fichero para buscar las variables y los valores
else
{
// Encuentra la posición del caracter '='
int pos = line.find("=");
// Procesa las dos subcadenas
if (pos != line.npos)
{
if (line.substr(0, pos) == "frames_per_row")
{
frames_per_row = std::stoi(line.substr(pos + 1, line.length()));
}
else if (line.substr(0, pos) == "frame_width")
{
frame_width = std::stoi(line.substr(pos + 1, line.length()));
}
else if (line.substr(0, pos) == "frame_height")
{
frame_height = std::stoi(line.substr(pos + 1, line.length()));
}
else
{
printf("Warning: file %s, unknown parameter \"%s\"\n", filename.c_str(), line.substr(0, pos).c_str());
success = false;
}
}
}
}
// Cierra el fichero
printf("Closing file %s\n\n", filename.c_str());
file.close();
}
// El fichero no se puede abrir
else
{
printf("Warning: Unable to open %s file\n", filename.c_str());
success = false;
}
// Pone un valor por defecto
setPos({0, 0, frame_width, frame_height});
return success;
}
// Establece la animacion actual
void AnimatedSprite::setCurrentAnimation(std::string name)
{
const int newAnimation = getIndex(name);
if (currentAnimation != newAnimation)
{
currentAnimation = newAnimation;
animation[currentAnimation].currentFrame = 0;
animation[currentAnimation].counter = 0;
animation[currentAnimation].completed = false;
}
}
// Actualiza las variables del objeto
void AnimatedSprite::update()
{
animate();
MovingSprite::update();
}

View File

@@ -0,0 +1,510 @@
#include "animatedsprite.h"
// Constructor
AnimatedSprite::AnimatedSprite(Texture *texture, SDL_Renderer *renderer, std::string file, std::vector<std::string> *buffer)
{
// Copia los punteros
setTexture(texture);
setRenderer(renderer);
// Carga las animaciones
if (file != "")
{
loadFromFile(file);
}
else if (buffer)
{
loadFromVector(buffer);
}
// Inicializa variables
currentAnimation = 0;
}
// Destructor
AnimatedSprite::~AnimatedSprite()
{
for (auto &a : animation)
{
a.frames.clear();
}
animation.clear();
}
// Obtiene el indice de la animación a partir del nombre
int AnimatedSprite::getIndex(std::string name)
{
int index = -1;
for (auto a : animation)
{
index++;
if (a.name == name)
{
return index;
}
}
printf("** Warning: could not find \"%s\" animation\n", name.c_str());
return -1;
}
// Calcula el frame correspondiente a la animación
void AnimatedSprite::animate()
{
if (!enabled || animation.at(currentAnimation).speed == 0)
{
return;
}
// Calcula el frame actual a partir del contador
animation.at(currentAnimation).currentFrame = animation.at(currentAnimation).counter / animation.at(currentAnimation).speed;
// Si alcanza el final de la animación, reinicia el contador de la animación
// en función de la variable loop y coloca el nuevo frame
if (animation.at(currentAnimation).currentFrame >= (int)animation.at(currentAnimation).frames.size())
{
if (animation.at(currentAnimation).loop == -1)
{ // Si no hay loop, deja el último frame
animation.at(currentAnimation).currentFrame = animation.at(currentAnimation).frames.size();
animation.at(currentAnimation).completed = true;
}
else
{ // Si hay loop, vuelve al frame indicado
animation.at(currentAnimation).counter = 0;
animation.at(currentAnimation).currentFrame = animation.at(currentAnimation).loop;
}
}
// En caso contrario
else
{
// Escoge el frame correspondiente de la animación
setSpriteClip(animation.at(currentAnimation).frames.at(animation.at(currentAnimation).currentFrame));
// Incrementa el contador de la animacion
animation.at(currentAnimation).counter++;
}
}
// Obtiene el numero de frames de la animación actual
int AnimatedSprite::getNumFrames()
{
return (int)animation.at(currentAnimation).frames.size();
}
// Establece el frame actual de la animación
void AnimatedSprite::setCurrentFrame(int num)
{
// Descarta valores fuera de rango
if (num >= (int)animation.at(currentAnimation).frames.size())
{
num = 0;
}
// Cambia el valor de la variable
animation.at(currentAnimation).counter = animation.at(currentAnimation).speed * num;
// Escoge el frame correspondiente de la animación
setSpriteClip(animation.at(currentAnimation).frames.at(animation.at(currentAnimation).currentFrame));
}
// Establece el valor del contador
void AnimatedSprite::setAnimationCounter(std::string name, int num)
{
animation.at(getIndex(name)).counter = num;
}
// Establece la velocidad de una animación
void AnimatedSprite::setAnimationSpeed(std::string name, int speed)
{
animation.at(getIndex(name)).counter = speed;
}
// Establece la velocidad de una animación
void AnimatedSprite::setAnimationSpeed(int index, int speed)
{
animation.at(index).counter = speed;
}
// Establece si la animación se reproduce en bucle
void AnimatedSprite::setAnimationLoop(std::string name, int loop)
{
animation.at(getIndex(name)).loop = loop;
}
// Establece si la animación se reproduce en bucle
void AnimatedSprite::setAnimationLoop(int index, int loop)
{
animation.at(index).loop = loop;
}
// Establece el valor de la variable
void AnimatedSprite::setAnimationCompleted(std::string name, bool value)
{
animation.at(getIndex(name)).completed = value;
}
// OLD - Establece el valor de la variable
void AnimatedSprite::setAnimationCompleted(int index, bool value)
{
animation.at(index).completed = value;
}
// Comprueba si ha terminado la animación
bool AnimatedSprite::animationIsCompleted()
{
return animation.at(currentAnimation).completed;
}
// Devuelve el rectangulo de una animación y frame concreto
SDL_Rect AnimatedSprite::getAnimationClip(std::string name, Uint8 index)
{
return animation.at(getIndex(name)).frames.at(index);
}
// Devuelve el rectangulo de una animación y frame concreto
SDL_Rect AnimatedSprite::getAnimationClip(int indexA, Uint8 indexF)
{
return animation.at(indexA).frames.at(indexF);
}
// Carga la animación desde un fichero
bool AnimatedSprite::loadFromFile(std::string filePath)
{
int framesPerRow = 0;
int frameWidth = 0;
int frameHeight = 0;
int maxTiles = 0;
// Indicador de éxito en la carga
bool success = true;
const std::string filename = filePath.substr(filePath.find_last_of("\\/") + 1);
std::ifstream file(filePath);
std::string line;
// El fichero se puede abrir
if (file.good())
{
// Procesa el fichero linea a linea
std::cout << "Loading animation from file: " << filePath.c_str() << std::endl;
while (std::getline(file, line))
{
// Si la linea contiene el texto [animation] se realiza el proceso de carga de una animación
if (line == "[animation]")
{
t_animation buffer;
buffer.counter = 0;
buffer.currentFrame = 0;
buffer.completed = false;
do
{
std::getline(file, line);
// Encuentra la posición del caracter '='
int pos = line.find("=");
// Procesa las dos subcadenas
if (pos != (int)line.npos)
{
if (line.substr(0, pos) == "name")
{
buffer.name = line.substr(pos + 1, line.length());
}
else if (line.substr(0, pos) == "speed")
{
buffer.speed = std::stoi(line.substr(pos + 1, line.length()));
}
else if (line.substr(0, pos) == "loop")
{
buffer.loop = std::stoi(line.substr(pos + 1, line.length()));
}
else if (line.substr(0, pos) == "frames")
{
// Se introducen los valores separados por comas en un vector
std::stringstream ss(line.substr(pos + 1, line.length()));
std::string tmp;
SDL_Rect rect = {0, 0, frameWidth, frameHeight};
while (getline(ss, tmp, ','))
{
// Comprueba que el tile no sea mayor que el maximo indice permitido
const int numTile = std::stoi(tmp) > maxTiles ? 0 : std::stoi(tmp);
rect.x = (numTile % framesPerRow) * frameWidth;
rect.y = (numTile / framesPerRow) * frameHeight;
buffer.frames.push_back(rect);
}
}
else
{
printf("Warning: file %s, unknown parameter \"%s\"\n", filename.c_str(), line.substr(0, pos).c_str());
success = false;
}
}
} while (line != "[/animation]");
// Añade la animación al vector de animaciones
animation.push_back(buffer);
}
// En caso contrario se parsea el fichero para buscar las variables y los valores
else
{
// Encuentra la posición del caracter '='
int pos = line.find("=");
// Procesa las dos subcadenas
if (pos != (int)line.npos)
{
if (line.substr(0, pos) == "framesPerRow")
{
framesPerRow = std::stoi(line.substr(pos + 1, line.length()));
}
else if (line.substr(0, pos) == "frameWidth")
{
frameWidth = std::stoi(line.substr(pos + 1, line.length()));
}
else if (line.substr(0, pos) == "frameHeight")
{
frameHeight = std::stoi(line.substr(pos + 1, line.length()));
}
else
{
printf("Warning: file %s, unknown parameter \"%s\"\n", filename.c_str(), line.substr(0, pos).c_str());
success = false;
}
// Normaliza valores
if (framesPerRow == 0 && frameWidth > 0)
{
framesPerRow = texture->getWidth() / frameWidth;
}
if (maxTiles == 0 && frameWidth > 0 && frameHeight > 0)
{
const int w = texture->getWidth() / frameWidth;
const int h = texture->getHeight() / frameHeight;
maxTiles = w * h;
}
}
}
}
// Cierra el fichero
file.close();
}
// El fichero no se puede abrir
else
{
printf("Warning: Unable to open %s file\n", filename.c_str());
success = false;
}
// Pone un valor por defecto
setRect({0, 0, frameWidth, frameHeight});
return success;
}
// Carga la animación desde un vector
bool AnimatedSprite::loadFromVector(std::vector<std::string> *source)
{
// Inicializa variables
int framesPerRow = 0;
int frameWidth = 0;
int frameHeight = 0;
int maxTiles = 0;
// Indicador de éxito en el proceso
bool success = true;
std::string line;
// Recorre todo el vector
int index = 0;
while (index < (int)source->size())
{
// Lee desde el vector
line = source->at(index);
// Si la linea contiene el texto [animation] se realiza el proceso de carga de una animación
if (line == "[animation]")
{
t_animation buffer;
buffer.counter = 0;
buffer.currentFrame = 0;
buffer.completed = false;
do
{
// Aumenta el indice para leer la siguiente linea
index++;
line = source->at(index);
// Encuentra la posición del caracter '='
int pos = line.find("=");
// Procesa las dos subcadenas
if (pos != (int)line.npos)
{
if (line.substr(0, pos) == "name")
{
buffer.name = line.substr(pos + 1, line.length());
}
else if (line.substr(0, pos) == "speed")
{
buffer.speed = std::stoi(line.substr(pos + 1, line.length()));
}
else if (line.substr(0, pos) == "loop")
{
buffer.loop = std::stoi(line.substr(pos + 1, line.length()));
}
else if (line.substr(0, pos) == "frames")
{
// Se introducen los valores separados por comas en un vector
std::stringstream ss(line.substr(pos + 1, line.length()));
std::string tmp;
SDL_Rect rect = {0, 0, frameWidth, frameHeight};
while (getline(ss, tmp, ','))
{
// Comprueba que el tile no sea mayor que el maximo indice permitido
const int numTile = std::stoi(tmp) > maxTiles ? 0 : std::stoi(tmp);
rect.x = (numTile % framesPerRow) * frameWidth;
rect.y = (numTile / framesPerRow) * frameHeight;
buffer.frames.push_back(rect);
}
}
else
{
std::cout << "Warning: unknown parameter " << line.substr(0, pos).c_str() << std::endl;
success = false;
}
}
} while (line != "[/animation]");
// Añade la animación al vector de animaciones
animation.push_back(buffer);
}
// En caso contrario se parsea el fichero para buscar las variables y los valores
else
{
// Encuentra la posición del caracter '='
int pos = line.find("=");
// Procesa las dos subcadenas
if (pos != (int)line.npos)
{
if (line.substr(0, pos) == "framesPerRow")
{
framesPerRow = std::stoi(line.substr(pos + 1, line.length()));
}
else if (line.substr(0, pos) == "frameWidth")
{
frameWidth = std::stoi(line.substr(pos + 1, line.length()));
}
else if (line.substr(0, pos) == "frameHeight")
{
frameHeight = std::stoi(line.substr(pos + 1, line.length()));
}
else
{
std::cout << "Warning: unknown parameter " << line.substr(0, pos).c_str() << std::endl;
success = false;
}
// Normaliza valores
if (framesPerRow == 0 && frameWidth > 0)
{
framesPerRow = texture->getWidth() / frameWidth;
}
if (maxTiles == 0 && frameWidth > 0 && frameHeight > 0)
{
const int w = texture->getWidth() / frameWidth;
const int h = texture->getHeight() / frameHeight;
maxTiles = w * h;
}
}
}
// Una vez procesada la linea, aumenta el indice para pasar a la siguiente
index++;
}
// Pone un valor por defecto
setRect({0, 0, frameWidth, frameHeight});
return success;
}
// Establece la animacion actual
void AnimatedSprite::setCurrentAnimation(std::string name)
{
const int newAnimation = getIndex(name);
if (currentAnimation != newAnimation)
{
currentAnimation = newAnimation;
animation.at(currentAnimation).currentFrame = 0;
animation.at(currentAnimation).counter = 0;
animation.at(currentAnimation).completed = false;
}
}
// Establece la animacion actual
void AnimatedSprite::setCurrentAnimation(int index)
{
const int newAnimation = index;
if (currentAnimation != newAnimation)
{
currentAnimation = newAnimation;
animation.at(currentAnimation).currentFrame = 0;
animation.at(currentAnimation).counter = 0;
animation.at(currentAnimation).completed = false;
}
}
// Actualiza las variables del objeto
void AnimatedSprite::update()
{
animate();
MovingSprite::update();
}
// Establece el rectangulo para un frame de una animación
void AnimatedSprite::setAnimationFrames(Uint8 index_animation, Uint8 index_frame, int x, int y, int w, int h)
{
animation.at(index_animation).frames.push_back({x, y, w, h});
}
// OLD - Establece el contador para todas las animaciones
void AnimatedSprite::setAnimationCounter(int value)
{
for (auto &a : animation)
{
a.counter = value;
}
}
// Reinicia la animación
void AnimatedSprite::resetAnimation()
{
animation.at(currentAnimation).currentFrame = 0;
animation.at(currentAnimation).counter = 0;
animation.at(currentAnimation).completed = false;
}

View File

@@ -2,10 +2,11 @@
#include <SDL2/SDL.h>
#include "movingsprite.h"
#include <vector>
#include <string>
#include <sstream>
#include <fstream>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#ifndef ANIMATEDSPRITE_H
#define ANIMATEDSPRITE_H
@@ -24,12 +25,14 @@ private:
int currentFrame; // Frame actual
int counter; // Contador para las animaciones
};
// Variables
std::vector<t_animation> animation; // Vector con las diferentes animaciones
int currentAnimation; // Animacion activa
public:
// Constructor
AnimatedSprite(LTexture *texture = nullptr, SDL_Renderer *renderer = nullptr, std::string file = "");
AnimatedSprite(Texture *texture = nullptr, SDL_Renderer *renderer = nullptr, std::string file = "", std::vector<std::string> *buffer = nullptr);
// Destructor
~AnimatedSprite();
@@ -37,38 +40,58 @@ public:
// Calcula el frame correspondiente a la animación actual
void animate();
// Obtiene el numero de frames de la animación actual
int getNumFrames();
// Establece el frame actual de la animación
void setCurrentFrame(std::string name, int num);
void setCurrentFrame(int num);
// Establece el valor del contador
void setAnimationCounter(std::string name, int num);
// Establece la velocidad de una animación
void setAnimationSpeed(std::string name, int speed);
void setAnimationSpeed(int index, int speed);
// Establece el frame al que vuelve la animación al finalizar
void setAnimationLoop(std::string name, int loop);
void setAnimationLoop(int index, int loop);
// Establece el valor de la variable
void setAnimationCompleted(std::string name, bool value);
void setAnimationCompleted(int index, bool value);
// Comprueba si ha terminado la animación
bool animationIsCompleted();
// Devuelve el rectangulo de una animación y frame concreto
SDL_Rect getAnimationClip(std::string name, Uint8 index);
SDL_Rect getAnimationClip(int indexA, Uint8 indexF);
// Obtiene el indice de la animación a partir del nombre
int getIndex(std::string name);
// Carga la animación desde un fichero
bool load(std::string filePath);
bool loadFromFile(std::string filePath);
// Carga la animación desde un vector
bool loadFromVector(std::vector<std::string> *source);
// Establece la animacion actual
void setCurrentAnimation(std::string name = "default");
void setCurrentAnimation(int index = 0);
// Actualiza las variables del objeto
void update();
// OLD - Establece el rectangulo para un frame de una animación
void setAnimationFrames(Uint8 index_animation, Uint8 index_frame, int x, int y, int w, int h);
// OLD - Establece el contador para todas las animaciones
void setAnimationCounter(int value);
// Reinicia la animación
void resetAnimation();
};
#endif

View File

@@ -3,8 +3,8 @@
// Constructor
Asset::Asset(std::string path)
{
mExecutablePath = path;
longest_name = 0;
executablePath = path;
longestName = 0;
}
// Destructor
@@ -16,21 +16,25 @@ Asset::~Asset()
void Asset::add(std::string file, enum assetType type, bool required)
{
item_t temp;
temp.file = mExecutablePath + "/.." + file;
temp.file = executablePath + file;
temp.type = type;
temp.required = required;
mFileList.push_back(temp);
fileList.push_back(temp);
const std::string filename = file.substr(file.find_last_of("\\/") + 1);
longest_name = SDL_max(longest_name, filename.size());
longestName = SDL_max(longestName, filename.size());
}
// Devuelve el fichero de un elemento de la lista a partir de una cadena
std::string Asset::get(std::string text)
{
for (int i = 0; i < mFileList.size(); i++)
if (mFileList[i].file.find(text) != std::string::npos)
return mFileList[i].file;
for (auto f : fileList)
{
if (f.file.find(text) != std::string::npos)
{
return f.file;
}
}
printf("Warning: file %s not found\n", text.c_str());
return "";
@@ -44,31 +48,43 @@ bool Asset::check()
printf("\n** Checking files.\n");
// Comprueba la lista de ficheros clasificandolos por tipo
for (int type = 0; type < maxAssetType; type++)
for (int type = 0; type < t_maxAssetType; ++type)
{
// Comprueba si hay ficheros de ese tipo
bool any = false;
for (int i = 0; i < mFileList.size(); i++)
if ((mFileList[i].required) && (mFileList[i].type == type))
for (auto f : fileList)
{
if ((f.required) && (f.type == type))
{
any = true;
}
}
// Si hay ficheros de ese tipo, comprueba si existen
if (any)
{
printf("\n>> %s FILES\n", getTypeName(type).c_str());
for (int i = 0; i < mFileList.size(); i++)
if ((mFileList[i].required) && (mFileList[i].type == type))
success &= checkFile(mFileList[i].file);
for (auto f : fileList)
{
if ((f.required) && (f.type == type))
{
success &= checkFile(f.file);
}
}
}
}
// Resultado
if (success)
{
printf("\n** All files OK.\n\n");
}
else
{
printf("\n** A file is missing. Exiting.\n\n");
}
return success;
}
@@ -83,14 +99,14 @@ bool Asset::checkFile(std::string path)
const std::string filename = path.substr(path.find_last_of("\\/") + 1);
SDL_RWops *file = SDL_RWFromFile(path.c_str(), "r+b");
if (file != NULL)
if (file != nullptr)
{
result = "OK";
success = true;
SDL_RWclose(file);
}
const std::string s = "Checking file %-" + std::to_string(longest_name) + "s [" + result + "]\n";
const std::string s = "Checking file %-" + std::to_string(longestName) + "s [" + result + "]\n";
printf(s.c_str(), filename.c_str());
return success;
@@ -101,33 +117,42 @@ std::string Asset::getTypeName(int type)
{
switch (type)
{
case bitmap:
case t_bitmap:
return "BITMAP";
break;
case music:
case t_music:
return "MUSIC";
break;
case sound:
case t_sound:
return "SOUND";
break;
case font:
case t_font:
return "FONT";
break;
case lang:
case t_lang:
return "LANG";
break;
case data:
case t_data:
return "DATA";
break;
case room:
case t_room:
return "ROOM";
break;
case enemy:
case t_enemy:
return "ENEMY";
break;
case item:
case t_item:
return "ITEM";
break;
default:
return "ERROR";
break;

View File

@@ -9,16 +9,16 @@
enum assetType
{
bitmap,
music,
sound,
font,
lang,
data,
room,
enemy,
item,
maxAssetType
t_bitmap,
t_music,
t_sound,
t_font,
t_lang,
t_data,
t_room,
t_enemy,
t_item,
t_maxAssetType
};
// Clase Asset
@@ -33,10 +33,10 @@ private:
bool required; // Indica si es un fichero que debe de existir
};
int longest_name; // Contiene la longitud del nombre de fichero mas largo
std::vector<item_t> mFileList;
std::string mExecutablePath;
// Variables
int longestName; // Contiene la longitud del nombre de fichero mas largo
std::vector<item_t> fileList; // Lista con las rutas a los ficheros de recursos
std::string executablePath; // Ruta con la ubicación del ejecutable
// Comprueba que existe un fichero
bool checkFile(std::string path);

61
source/common/const.h Normal file
View File

@@ -0,0 +1,61 @@
#pragma once
#include "utils.h"
#ifndef CONST_H
#define CONST_H
// Tamaño de bloque
#define BLOCK 8
#define HALF_BLOCK 4
// Tamaño de la pantalla de juego
#define GAMECANVAS_WIDTH 320
#define GAMECANVAS_HEIGHT 240
// Zona de juego
const int PLAY_AREA_X = (0 * BLOCK);
const int PLAY_AREA_Y = (0 * BLOCK);
const int PLAY_AREA_TOP = (0 * BLOCK);
const int PLAY_AREA_BOTTOM = (30 * BLOCK);
const int PLAY_AREA_LEFT = (0 * BLOCK);
const int PLAY_AREA_RIGHT = (40 * BLOCK);
const int PLAY_AREA_WIDTH = PLAY_AREA_RIGHT - PLAY_AREA_LEFT;
const int PLAY_AREA_HEIGHT = PLAY_AREA_BOTTOM - PLAY_AREA_TOP;
const int PLAY_AREA_CENTER_X = PLAY_AREA_LEFT + (PLAY_AREA_WIDTH / 2);
const int PLAY_AREA_CENTER_FIRST_QUARTER_X = (PLAY_AREA_WIDTH / 4);
const int PLAY_AREA_CENTER_THIRD_QUARTER_X = (PLAY_AREA_WIDTH / 4) * 3;
const int PLAY_AREA_CENTER_Y = PLAY_AREA_TOP + (PLAY_AREA_HEIGHT / 2);
const int PLAY_AREA_FIRST_QUARTER_Y = PLAY_AREA_HEIGHT / 4;
const int PLAY_AREA_THIRD_QUARTER_Y = (PLAY_AREA_HEIGHT / 4) * 3;
// Marcador
const int SCOREBOARD_X = 0;
const int SCOREBOARD_Y = 0;
const int SCOREBOARD_TOP = (0 * BLOCK);
const int SCOREBOARD_BOTTOM = (4 * BLOCK);
const int SCOREBOARD_LEFT = (0 * BLOCK);
const int SCOREBOARD_RIGHT = (40 * BLOCK);
const int SCOREBOARD_WIDTH = SCOREBOARD_RIGHT - SCOREBOARD_LEFT;
const int SCOREBOARD_HEIGHT = SCOREBOARD_BOTTOM - SCOREBOARD_TOP;
// Anclajes de pantalla
const int GAMECANVAS_CENTER_X = GAMECANVAS_WIDTH / 2;
const int GAMECANVAS_FIRST_QUARTER_X = GAMECANVAS_WIDTH / 4;
const int GAMECANVAS_THIRD_QUARTER_X = (GAMECANVAS_WIDTH / 4) * 3;
const int GAMECANVAS_CENTER_Y = GAMECANVAS_HEIGHT / 2;
const int GAMECANVAS_FIRST_QUARTER_Y = GAMECANVAS_HEIGHT / 4;
const int GAMECANVAS_THIRD_QUARTER_Y = (GAMECANVAS_HEIGHT / 4) * 3;
// Secciones del programa
#define SECTION_PROG_LOGO 0
#define SECTION_PROG_INTRO 1
#define SECTION_PROG_TITLE 2
#define SECTION_PROG_CREDITS 3
#define SECTION_PROG_GAME 4
#define SECTION_PROG_QUIT 5
// Colores
const color_t borderColor = {0x27, 0x27, 0x36};
#endif

104
source/common/debug.cpp Normal file
View File

@@ -0,0 +1,104 @@
#include "debug.h"
// Constructor
Debug::Debug(SDL_Renderer *renderer, Screen *screen, Asset *asset)
{
// Copia la dirección de los objetos
this->renderer = renderer;
this->screen = screen;
this->asset = asset;
// Reserva memoria para los punteros
text = new Text(asset->get("debug.png"), asset->get("debug.txt"), renderer);
// Inicializa variables
x = 0;
y = 0;
enabled = false;
}
// Destructor
Debug::~Debug()
{
delete text;
}
// Actualiza las variables
void Debug::update()
{
}
// Dibuja en pantalla
void Debug::render()
{
int y = this->y;
int w = 0;
for (auto s : slot)
{
text->write(x, y, s);
w = (std::max(w, (int)s.length()));
y += text->getCharacterSize() + 1;
if (y > 192 - text->getCharacterSize())
{
y = this->y;
x += w * text->getCharacterSize() + 2;
}
}
y = 0;
for (auto l : log)
{
text->writeColored(x + 10, y, l, {255, 255, 255});
y += text->getCharacterSize() + 1;
}
}
// Establece la posición donde se colocará la información de debug
void Debug::setPos(SDL_Point p)
{
x = p.x;
y = p.y;
}
// Añade un texto para mostrar
void Debug::add(std::string text)
{
slot.push_back(text);
}
// Borra la información de debug
void Debug::clear()
{
slot.clear();
}
// Añade un texto para mostrar en el apartado log
void Debug::addToLog(std::string text)
{
log.push_back(text);
}
// Borra la información de debug del apartado log
void Debug::clearLog()
{
log.clear();
}
// Establece el valor de la variable
void Debug::setEnabled(bool value)
{
enabled = value;
}
// Obtiene el valor de la variable
bool Debug::getEnabled()
{
return enabled;
}
// Cambia el valor de la variable
void Debug::switchEnabled()
{
enabled = !enabled;
}

70
source/common/debug.h Normal file
View File

@@ -0,0 +1,70 @@
#pragma once
#include <SDL2/SDL.h>
#include "asset.h"
#include "const.h"
#include "screen.h"
#include "text.h"
#include "utils.h"
#include <string>
#include <vector>
#ifndef DEBUG_H
#define DEBUG_H
// Clase Debug
class Debug
{
private:
// Objetos y punteros
SDL_Renderer *renderer; // El renderizador de la ventana
Screen *screen; // Objeto encargado de dibujar en pantalla
Asset *asset; // Objeto con los ficheros de recursos
Text *text; // Objeto encargado de escribir texto en pantalla
// Variables
std::vector<std::string> slot; // Vector con los textos a escribir
std::vector<std::string> log; // Vector con los textos a escribir
int x; // Posicion donde escribir el texto de debug
int y; // Posición donde escribir el texto de debug
bool enabled; // Indica si esta activo el modo debug
public:
// Constructor
Debug(SDL_Renderer *renderer, Screen *screen, Asset *asset);
// Destructor
~Debug();
// Actualiza las variables
void update();
// Dibuja en pantalla
void render();
// Establece la posición donde se colocará la información de debug
void setPos(SDL_Point p);
// Añade un texto para mostrar
void add(std::string text);
// Borra la información de debug
void clear();
// Añade un texto para mostrar en el apartado log
void addToLog(std::string text);
// Borra la información de debug del apartado log
void clearLog();
// Establece el valor de la variable
void setEnabled(bool value);
// Obtiene el valor de la variable
bool getEnabled();
// Cambia el valor de la variable
void switchEnabled();
};
#endif

View File

@@ -8,35 +8,35 @@ Input::Input(std::string file)
dbPath = file;
// Inicializa las variables
for (int i = 0; i < 17; i++)
{
keyBindings[i].scancode = 0;
keyBindings[i].active = false;
keyBindings_t kb;
kb.scancode = 0;
kb.active = false;
keyBindings.resize(17, kb);
gameControllerBindings[i].button = SDL_CONTROLLER_BUTTON_INVALID;
gameControllerBindings[i].active = false;
}
GameControllerBindings_t gcb;
gcb.button = SDL_CONTROLLER_BUTTON_INVALID;
gcb.active = false;
gameControllerBindings.resize(17, gcb);
// Comprueba si hay un mando conectado
discoverGameController();
}
// Destructor
Input::~Input()
{
for (int i = 0; i < numGamepads; i++)
connectedControllers[i] = nullptr;
}
// Asigna uno de los posibles inputs a una tecla del teclado
void Input::bindKey(Uint8 input, SDL_Scancode code)
{
keyBindings[input].scancode = code;
keyBindings.at(input).scancode = code;
}
// Asigna uno de los posibles inputs a un botón del mando
void Input::bindGameControllerButton(Uint8 input, SDL_GameControllerButton button)
{
gameControllerBindings[input].button = button;
gameControllerBindings.at(input).button = button;
}
// Comprueba si un input esta activo
@@ -48,24 +48,14 @@ bool Input::checkInput(Uint8 input, bool repeat, int device, int index)
if (device == INPUT_USE_ANY)
index = 0;
if ((device == INPUT_USE_KEYBOARD) || (device == INPUT_USE_ANY))
if (device == INPUT_USE_KEYBOARD || device == INPUT_USE_ANY)
{
const Uint8 *mKeystates = SDL_GetKeyboardState(NULL);
const Uint8 *keyStates = SDL_GetKeyboardState(nullptr);
if (repeat)
{
if (mKeystates[keyBindings[input].scancode] != 0)
successKeyboard = true;
else
successKeyboard = false;
}
else
if (keyStates[keyBindings.at(input).scancode] != 0)
{
if (!keyBindings[input].active)
{
if (mKeystates[keyBindings[input].scancode] != 0)
{
keyBindings[input].active = true;
successKeyboard = true;
}
else
@@ -75,9 +65,23 @@ bool Input::checkInput(Uint8 input, bool repeat, int device, int index)
}
else
{
if (mKeystates[keyBindings[input].scancode] == 0)
if (!keyBindings.at(input).active)
{
keyBindings[input].active = false;
if (keyStates[keyBindings.at(input).scancode] != 0)
{
keyBindings.at(input).active = true;
successKeyboard = true;
}
else
{
successKeyboard = false;
}
}
else
{
if (keyStates[keyBindings.at(input).scancode] == 0)
{
keyBindings.at(input).active = false;
successKeyboard = false;
}
else
@@ -93,18 +97,8 @@ bool Input::checkInput(Uint8 input, bool repeat, int device, int index)
{
if (repeat)
{
if (SDL_GameControllerGetButton(connectedControllers[index], gameControllerBindings[input].button) != 0)
successGameController = true;
else
successGameController = false;
}
else
if (SDL_GameControllerGetButton(connectedControllers.at(index), gameControllerBindings.at(input).button) != 0)
{
if (!gameControllerBindings[input].active)
{
if (SDL_GameControllerGetButton(connectedControllers[index], gameControllerBindings[input].button) != 0)
{
gameControllerBindings[input].active = true;
successGameController = true;
}
else
@@ -114,9 +108,23 @@ bool Input::checkInput(Uint8 input, bool repeat, int device, int index)
}
else
{
if (SDL_GameControllerGetButton(connectedControllers[index], gameControllerBindings[input].button) == 0)
if (!gameControllerBindings.at(input).active)
{
gameControllerBindings[input].active = false;
if (SDL_GameControllerGetButton(connectedControllers.at(index), gameControllerBindings.at(input).button) != 0)
{
gameControllerBindings.at(input).active = true;
successGameController = true;
}
else
{
successGameController = false;
}
}
else
{
if (SDL_GameControllerGetButton(connectedControllers.at(index), gameControllerBindings.at(input).button) == 0)
{
gameControllerBindings.at(input).active = false;
successGameController = false;
}
else
@@ -130,24 +138,70 @@ bool Input::checkInput(Uint8 input, bool repeat, int device, int index)
return (successKeyboard || successGameController);
}
// Comprueba si hay almenos un input activo
bool Input::checkAnyInput(int device, int index)
{
if (device == INPUT_USE_ANY)
{
index = 0;
}
if (device == INPUT_USE_KEYBOARD || device == INPUT_USE_ANY)
{
const Uint8 *mKeystates = SDL_GetKeyboardState(nullptr);
for (int i = 0; i < (int)keyBindings.size(); ++i)
{
if (mKeystates[keyBindings.at(i).scancode] != 0)
{
return true;
}
}
}
if (gameControllerFound())
{
if (device == INPUT_USE_GAMECONTROLLER || device == INPUT_USE_ANY)
{
for (int i = 0; i < (int)gameControllerBindings.size(); ++i)
{
if (SDL_GameControllerGetButton(connectedControllers.at(index), gameControllerBindings.at(i).button) != 0)
{
return true;
}
}
}
}
return false;
}
// Comprueba si hay un mando conectado
bool Input::discoverGameController()
{
bool found = false;
if (SDL_WasInit(SDL_INIT_GAMECONTROLLER) != 1)
{
SDL_InitSubSystem(SDL_INIT_GAMECONTROLLER);
}
if (SDL_GameControllerAddMappingsFromFile(dbPath.c_str()) < 0)
{
printf("Error, could not load %s file: %s\n", dbPath.c_str(), SDL_GetError());
}
int nJoysticks = SDL_NumJoysticks();
const int nJoysticks = SDL_NumJoysticks();
numGamepads = 0;
// Cuenta el numero de mandos
for (int i = 0; i < nJoysticks; i++)
for (int i = 0; i < nJoysticks; ++i)
{
if (SDL_IsGameController(i))
{
numGamepads++;
}
}
printf("\nChecking for game controllers...\n");
printf("%i joysticks found, %i are gamepads\n", nJoysticks, numGamepads);
@@ -163,7 +217,7 @@ bool Input::discoverGameController()
if (SDL_GameControllerGetAttached(pad) == 1)
{
connectedControllers.push_back(pad);
std::string separator(" #");
const std::string separator(" #");
std::string name = SDL_GameControllerNameForIndex(i);
name.resize(25);
name = name + separator + std::to_string(i);
@@ -171,10 +225,11 @@ bool Input::discoverGameController()
controllerNames.push_back(name);
}
else
{
std::cout << "SDL_GetError() = " << SDL_GetError() << std::endl;
}
}
//mGameController = connectedControllers[0];
SDL_GameControllerEventState(SDL_ENABLE);
}
@@ -185,18 +240,26 @@ bool Input::discoverGameController()
bool Input::gameControllerFound()
{
if (numGamepads > 0)
{
return true;
}
else
{
return false;
}
}
// Obten el nombre de un mando de juego
std::string Input::getControllerName(int index)
{
if (numGamepads > 0)
return controllerNames[index];
{
return controllerNames.at(index);
}
else
{
return "";
}
}
// Obten el numero de mandos conectados

View File

@@ -41,16 +41,19 @@ private:
Uint8 scancode; // Scancode asociado
bool active; // Indica si está activo
};
keyBindings_t keyBindings[17]; // Vector con las teclas asociadas a los inputs predefinidos
struct GameControllerBindings_t
{
SDL_GameControllerButton button; // GameControllerButton asociado
bool active; // Indica si está activo
};
GameControllerBindings_t gameControllerBindings[17]; // Vector con las teclas asociadas a los inputs predefinidos
// Objetos y punteros
std::vector<SDL_GameController *> connectedControllers; // Vector con todos los mandos conectados
// Variables
std::vector<keyBindings_t> keyBindings; // Vector con las teclas asociadas a los inputs predefinidos
std::vector<GameControllerBindings_t> gameControllerBindings; // Vector con las teclas asociadas a los inputs predefinidos
std::vector<std::string> controllerNames; // Vector con los nombres de los mandos
int numGamepads; // Numero de mandos conectados
std::string dbPath; // Ruta al archivo gamecontrollerdb.txt
@@ -74,6 +77,9 @@ public:
// Comprueba si un input esta activo
bool checkInput(Uint8 input, bool repeat, int device = INPUT_USE_ANY, int index = 0);
// Comprueba si hay almenos un input activo
bool checkAnyInput(int device = INPUT_USE_ANY, int index = 0);
// Comprueba si hay algun mando conectado
bool gameControllerFound();

View File

@@ -1,6 +1,7 @@
#ifndef __MIPSEL__
#include "jail_audio.h"
#include "stb_vorbis.c"
#include <SDL2/SDL.h>
#include <stdio.h>
#define JA_MAX_SIMULTANEOUS_CHANNELS 5
@@ -30,16 +31,17 @@ JA_Channel_t channels[JA_MAX_SIMULTANEOUS_CHANNELS];
int JA_freq {48000};
SDL_AudioFormat JA_format {AUDIO_S16};
Uint8 JA_channels {2};
int JA_volume = 128;
void audioCallback(void * userdata, uint8_t * stream, int len) {
SDL_memset(stream, 0, len);
if (current_music != NULL && current_music->state == JA_MUSIC_PLAYING) {
const int size = SDL_min(len, current_music->samples*2-current_music->pos);
SDL_memcpy(stream, current_music->output+current_music->pos, size);
SDL_MixAudioFormat(stream, (Uint8*)(current_music->output+current_music->pos), AUDIO_S16, size, JA_volume);
current_music->pos += size/2;
if (size < len) {
if (current_music->times != 0) {
SDL_memcpy(stream+size, current_music->output, len-size);
SDL_MixAudioFormat(stream+size, (Uint8*)current_music->output, AUDIO_S16, len-size, JA_volume);
current_music->pos = (len-size)/2;
if (current_music->times > 0) current_music->times--;
} else {
@@ -52,11 +54,11 @@ void audioCallback(void * userdata, uint8_t * stream, int len) {
for (int i = 0; i < JA_MAX_SIMULTANEOUS_CHANNELS; i++) {
if (channels[i].state == JA_CHANNEL_PLAYING) {
const int size = SDL_min(len, channels[i].sound->length - channels[i].pos);
SDL_MixAudioFormat(stream, channels[i].sound->buffer + channels[i].pos, AUDIO_S16, size, 64);
SDL_MixAudioFormat(stream, channels[i].sound->buffer + channels[i].pos, AUDIO_S16, size, JA_volume/2);
channels[i].pos += size;
if (size < len) {
if (channels[i].times != 0) {
SDL_MixAudioFormat(stream + size, channels[i].sound->buffer, AUDIO_S16, len-size, 64);
SDL_MixAudioFormat(stream + size, channels[i].sound->buffer, AUDIO_S16, len-size, JA_volume/2);
channels[i].pos = len-size;
if (channels[i].times > 0) channels[i].times--;
} else {
@@ -79,7 +81,19 @@ void JA_Init(const int freq, const SDL_AudioFormat format, const int channels) {
JA_Music JA_LoadMusic(const char* filename) {
int chan, samplerate;
JA_Music music = new JA_Music_t();
music->samples = stb_vorbis_decode_filename(filename, &chan, &samplerate, &music->output);
// [RZC 28/08/22] Carreguem primer el arxiu en memòria i després el descomprimim. Es algo més rapid.
FILE *f = fopen(filename, "rb");
fseek(f, 0, SEEK_END);
long fsize = ftell(f);
fseek(f, 0, SEEK_SET);
Uint8 *buffer = (Uint8*)malloc(fsize + 1);
fread(buffer, fsize, 1, f);
fclose(f);
music->samples = stb_vorbis_decode_memory(buffer, fsize, &chan, &samplerate, &music->output);
free(buffer);
// [RZC 28/08/22] Abans el descomprimiem mentre el teniem obert
// music->samples = stb_vorbis_decode_filename(filename, &chan, &samplerate, &music->output);
SDL_AudioCVT cvt;
SDL_BuildAudioCVT(&cvt, AUDIO_S16, chan, samplerate, JA_format, JA_channels, JA_freq);
@@ -134,6 +148,13 @@ void JA_DeleteMusic(JA_Music music) {
delete music;
}
JA_Sound JA_NewSound(Uint8* buffer, Uint32 length) {
JA_Sound sound = new JA_Sound_t();
sound->buffer = buffer;
sound->length = length;
return sound;
}
JA_Sound JA_LoadSound(const char* filename) {
JA_Sound sound = new JA_Sound_t();
SDL_AudioSpec wavSpec;
@@ -210,4 +231,8 @@ JA_Channel_state JA_GetChannelState(const int channel) {
if (channel < 0 || channel >= JA_MAX_SIMULTANEOUS_CHANNELS) return JA_CHANNEL_INVALID;
return channels[channel].state;
}
#endif
int JA_SetVolume(int volume) {
JA_volume = volume > 128 ? 128 : volume < 0 ? 0 : volume;
return JA_volume;
}

View File

@@ -18,6 +18,7 @@ void JA_StopMusic();
JA_Music_state JA_GetMusicState();
void JA_DeleteMusic(JA_Music music);
JA_Sound JA_NewSound(Uint8* buffer, Uint32 length);
JA_Sound JA_LoadSound(const char* filename);
int JA_PlaySound(JA_Sound sound, const int loop = 0);
void JA_PauseChannel(const int channel);
@@ -25,3 +26,5 @@ void JA_ResumeChannel(const int channel);
void JA_StopChannel(const int channel);
JA_Channel_state JA_GetChannelState(const int channel);
void JA_DeleteSound(JA_Sound sound);
int JA_SetVolume(int volume);

View File

@@ -2,52 +2,29 @@
#include "menu.h"
// Constructor
Menu::Menu(SDL_Renderer *renderer, Text *text, Input *input)
Menu::Menu(SDL_Renderer *renderer, Asset *asset, Input *input, std::string file)
{
// Copia punteros
this->renderer = renderer;
this->text = text;
this->asset = asset;
this->input = input;
// Inicializa punteros
soundMove = nullptr;
soundAccept = nullptr;
soundCancel = nullptr;
}
Menu::~Menu()
{
renderer = nullptr;
text = nullptr;
input = nullptr;
if (soundMove)
{
JA_DeleteSound(soundMove);
}
if (soundAccept)
{
JA_DeleteSound(soundAccept);
}
if (soundCancel)
{
JA_DeleteSound(soundCancel);
}
}
// Inicializador
void Menu::init(std::string name, int x, int y, int backgroundType)
{
// Inicia variables
this->name = name;
// Inicializa variables
name = "";
selector.index = 0;
itemSelected = MENU_NO_OPTION;
this->x = x;
this->y = y;
x = 0;
y = 0;
w = 0;
rectBG.rect = {0, 0, 0, 0};
rectBG.color = {0, 0, 0};
rectBG.a = 0;
this->backgroundType = backgroundType;
backgroundType = MENU_BACKGROUND_SOLID;
isCenteredOnX = false;
isCenteredOnY = false;
areElementsCenteredOnX = false;
@@ -55,6 +32,9 @@ void Menu::init(std::string name, int x, int y, int backgroundType)
centerY = 0;
widestItem = 0;
colorGreyed = {128, 128, 128};
defaultActionWhenCancel = 0;
font_png = "";
font_txt = "";
// Selector
selector.originY = 0;
@@ -72,6 +52,305 @@ void Menu::init(std::string name, int x, int y, int backgroundType)
selector.color = {0, 0, 0};
selector.itemColor = {0, 0, 0};
selector.a = 255;
// Inicializa las variables desde un fichero
if (file != "")
{
load(file);
}
// Deja el cursor en el primer elemento
reset();
}
Menu::~Menu()
{
renderer = nullptr;
asset = nullptr;
input = nullptr;
if (soundMove)
{
JA_DeleteSound(soundMove);
}
if (soundAccept)
{
JA_DeleteSound(soundAccept);
}
if (soundCancel)
{
JA_DeleteSound(soundCancel);
}
if (text != nullptr)
{
delete text;
}
}
// Carga la configuración del menu desde un archivo de texto
bool Menu::load(std::string file_path)
{
// Indicador de éxito en la carga
bool success = true;
// Indica si se ha creado ya el objeto de texto
bool textAllocated = false;
const std::string filename = file_path.substr(file_path.find_last_of("\\/") + 1);
std::string line;
std::ifstream file(file_path);
// El fichero se puede abrir
if (file.good())
{
// Procesa el fichero linea a linea
printf("Reading file %s\n", filename.c_str());
while (std::getline(file, line))
{
if (line == "[item]")
{
item_t item;
item.label = "";
item.hPaddingDown = 1;
item.selectable = true;
item.greyed = false;
item.linkedDown = false;
do
{
// Lee la siguiente linea
std::getline(file, line);
// Encuentra la posición del caracter '='
int pos = line.find("=");
// Procesa las dos subcadenas
if (!setItem(&item, line.substr(0, pos), line.substr(pos + 1, line.length())))
{
printf("Warning: file %s\n, unknown parameter \"%s\"\n", filename.c_str(), line.substr(0, pos).c_str());
success = false;
}
} while (line != "[/item]");
addItem(item.label, item.hPaddingDown, item.selectable, item.greyed, item.linkedDown);
}
// En caso contrario se parsea el fichero para buscar las variables y los valores
else
{
// Encuentra la posición del caracter '='
int pos = line.find("=");
// Procesa las dos subcadenas
if (!setVars(line.substr(0, pos), line.substr(pos + 1, line.length())))
{
printf("Warning: file %s, unknown parameter \"%s\"\n", filename.c_str(), line.substr(0, pos).c_str());
success = false;
}
// Crea el objeto text tan pronto como se pueda. Necesario para añadir items
if (font_png != "" && font_txt != "" && !textAllocated)
{
text = new Text(asset->get(font_png), asset->get(font_txt), renderer);
textAllocated = true;
}
}
}
// Cierra el fichero
printf("Closing file %s\n", filename.c_str());
file.close();
}
// El fichero no se puede abrir
else
{
printf("Warning: Unable to open %s file\n", filename.c_str());
success = false;
}
return success;
}
// Asigna variables a partir de dos cadenas
bool Menu::setItem(item_t *item, std::string var, std::string value)
{
// Indicador de éxito en la asignación
bool success = true;
if (var == "text")
{
item->label = value;
}
else if (var == "hPaddingDown")
{
item->hPaddingDown = std::stoi(value);
}
else if (var == "selectable")
{
item->selectable = value == "true" ? true : false;
}
else if (var == "greyed")
{
item->greyed = value == "true" ? true : false;
}
else if (var == "linkedDown")
{
item->linkedDown = value == "true" ? true : false;
}
else if ((var == "") || (var == "[/item]"))
{
}
else
{
success = false;
}
return success;
}
// Asigna variables a partir de dos cadenas
bool Menu::setVars(std::string var, std::string value)
{
// Indicador de éxito en la asignación
bool success = true;
if (var == "font_png")
{
font_png = value;
}
else if (var == "font_txt")
{
font_txt = value;
}
else if (var == "sound_cancel")
{
soundCancel = JA_LoadSound(asset->get(value).c_str());
}
else if (var == "sound_accept")
{
soundAccept = JA_LoadSound(asset->get(value).c_str());
}
else if (var == "sound_move")
{
soundMove = JA_LoadSound(asset->get(value).c_str());
}
else if (var == "name")
{
name = value;
}
else if (var == "x")
{
x = std::stoi(value);
}
else if (var == "centerX")
{
centerX = std::stoi(value);
}
else if (var == "centerY")
{
centerY = std::stoi(value);
}
else if (var == "y")
{
y = std::stoi(value);
}
else if (var == "backgroundType")
{
backgroundType = std::stoi(value);
}
else if (var == "backgroundColor")
{
// Se introducen los valores separados por comas en un vector
std::stringstream ss(value);
std::string tmp;
getline(ss, tmp, ',');
rectBG.color.r = std::stoi(tmp);
getline(ss, tmp, ',');
rectBG.color.g = std::stoi(tmp);
getline(ss, tmp, ',');
rectBG.color.b = std::stoi(tmp);
getline(ss, tmp, ',');
rectBG.a = std::stoi(tmp);
}
else if (var == "selector_color")
{
// Se introducen los valores separados por comas en un vector
std::stringstream ss(value);
std::string tmp;
getline(ss, tmp, ',');
selector.color.r = std::stoi(tmp);
getline(ss, tmp, ',');
selector.color.g = std::stoi(tmp);
getline(ss, tmp, ',');
selector.color.b = std::stoi(tmp);
getline(ss, tmp, ',');
selector.a = std::stoi(tmp);
}
else if (var == "selector_text_color")
{
// Se introducen los valores separados por comas en un vector
std::stringstream ss(value);
std::string tmp;
getline(ss, tmp, ',');
selector.itemColor.r = std::stoi(tmp);
getline(ss, tmp, ',');
selector.itemColor.g = std::stoi(tmp);
getline(ss, tmp, ',');
selector.itemColor.b = std::stoi(tmp);
}
else if (var == "areElementsCenteredOnX")
{
areElementsCenteredOnX = value == "true" ? true : false;
}
else if (var == "isCenteredOnX")
{
isCenteredOnX = value == "true" ? true : false;
}
else if (var == "isCenteredOnY")
{
isCenteredOnY = value == "true" ? true : false;
}
else if (var == "defaultActionWhenCancel")
{
defaultActionWhenCancel = std::stoi(value);
}
else if (var == "")
{
}
else
{
success = false;
}
return success;
}
// Carga los ficheros de audio
@@ -126,7 +405,8 @@ void Menu::updateSelector()
selector.moving = false;
}
}
if (selector.despY < 0) // Va hacia arriba
else if (selector.despY < 0) // Va hacia arriba
{
if (selector.y < selector.targetY) // Ha llegado al destino
{
@@ -154,7 +434,8 @@ void Menu::updateSelector()
selector.resizing = false;
}
}
if (selector.incH < 0) // Decrece
else if (selector.incH < 0) // Decrece
{
if (selector.h < selector.targetH) // Ha llegado al destino
{
@@ -174,10 +455,10 @@ void Menu::updateSelector()
// Coloca el selector en una posición específica
void Menu::setSelectorPos(int index)
{
if (index < item.size())
if (index < (int)item.size())
{
selector.index = index;
selector.rect.y = selector.y = selector.originY = selector.targetY = item[selector.index].rect.y;
selector.rect.y = selector.y = selector.originY = selector.targetY = item.at(selector.index).rect.y;
selector.rect.w = rectBG.rect.w;
selector.rect.x = rectBG.rect.x;
selector.originH = selector.targetH = selector.rect.h = getSelectorHeight(selector.index);
@@ -205,10 +486,17 @@ void Menu::reset()
{
itemSelected = MENU_NO_OPTION;
selector.index = 0;
selector.originY = selector.targetY = selector.y = item[0].rect.y;
selector.originH = selector.targetH = item[0].rect.h;
selector.originY = selector.targetY = selector.y = item.at(0).rect.y;
selector.originH = selector.targetH = item.at(0).rect.h;
selector.moving = false;
selector.resizing = false;
// Si el primer elemento no es seleccionable, incrementa el selector
if (!item.at(selector.index).selectable)
{
increaseSelectorIndex();
setSelectorPos(selector.index);
}
}
// Actualiza el menu para recolocarlo correctamente y establecer el tamaño
@@ -236,18 +524,18 @@ void Menu::reorganize()
bool Menu::increaseSelectorIndex()
{
// Obten las coordenadas del elemento actual
selector.y = selector.originY = item[selector.index].rect.y;
selector.y = selector.originY = item.at(selector.index).rect.y;
selector.h = selector.originH = getSelectorHeight(selector.index);
// Calcula cual es el siguiente elemento
++selector.index %= item.size();
while (!item[selector.index].selectable)
while (!item.at(selector.index).selectable)
{
++selector.index %= item.size();
}
// Establece las coordenadas y altura de destino
selector.targetY = item[selector.index].rect.y;
selector.targetY = item.at(selector.index).rect.y;
selector.despY = (selector.targetY - selector.originY) / selector.numJumps;
selector.targetH = getSelectorHeight(selector.index);
@@ -266,24 +554,24 @@ bool Menu::increaseSelectorIndex()
bool Menu::decreaseSelectorIndex()
{
// Obten las coordenadas del elemento actual
selector.y = selector.originY = item[selector.index].rect.y;
selector.y = selector.originY = item.at(selector.index).rect.y;
selector.h = selector.originH = getSelectorHeight(selector.index);
// Calcula cual es el siguiente elemento
if (selector.index == 0)
{
selector.index = item.size();
selector.index = item.size() - 1;
}
else
{
selector.index--;
}
while (!item[selector.index].selectable)
while (!item.at(selector.index).selectable)
{
if (selector.index == 0)
{
selector.index = item.size();
selector.index = item.size() - 1;
}
else
{
@@ -292,7 +580,7 @@ bool Menu::decreaseSelectorIndex()
}
// Establece las coordenadas y altura de destino
selector.targetY = item[selector.index].rect.y;
selector.targetY = item.at(selector.index).rect.y;
selector.despY = (selector.targetY - selector.originY) / selector.numJumps;
selector.targetH = getSelectorHeight(selector.index);
@@ -326,8 +614,6 @@ void Menu::render()
// Renderiza el rectangulo del selector
const SDL_Rect temp = {selector.rect.x, selector.rect.y - 1, selector.rect.w, selector.rect.h + 1};
// temp.y--;
// temp.h++;
SDL_SetRenderDrawColor(renderer, selector.color.r, selector.color.g, selector.color.b, selector.a);
SDL_RenderFillRect(renderer, &temp);
@@ -338,49 +624,83 @@ void Menu::render()
SDL_RenderDrawRect(renderer, &rectBG.rect);
}
// Renderitza el texto
for (int i = 0; i < item.size(); i++)
// Renderiza el texto
for (int i = 0; i < (int)item.size(); ++i)
{
if (i == selector.index)
{
const color_t color = {selector.itemColor.r, selector.itemColor.g, selector.itemColor.b};
text->writeColored(item[i].rect.x, item[i].rect.y, item[i].label, color);
text->writeColored(item.at(i).rect.x, item.at(i).rect.y, item.at(i).label, color);
}
else if (item[i].selectable)
else if (item.at(i).selectable)
{
text->write(item[i].rect.x, item[i].rect.y, item[i].label);
text->write(item.at(i).rect.x, item.at(i).rect.y, item.at(i).label);
}
else if (item[i].greyed)
else if (item.at(i).greyed)
{
text->writeColored(item[i].rect.x, item[i].rect.y, item[i].label, colorGreyed);
text->writeColored(item.at(i).rect.x, item.at(i).rect.y, item.at(i).label, colorGreyed);
}
else
// No seleccionable
{
if ((item[i].linkedUp) && (i == selector.index + 1))
{ // No seleccionable
if ((item.at(i).linkedUp) && (i == selector.index + 1))
{
const color_t color = {selector.itemColor.r, selector.itemColor.g, selector.itemColor.b};
text->writeColored(item[i].rect.x, item[i].rect.y, item[i].label, color);
text->writeColored(item.at(i).rect.x, item.at(i).rect.y, item.at(i).label, color);
}
else // No enlazado con el de arriba
{
text->write(item[i].rect.x, item[i].rect.y, item[i].label);
text->write(item.at(i).rect.x, item.at(i).rect.y, item.at(i).label);
}
}
}
}
// Establece el rectangulo de fondo del menu y el selector
void Menu::setRectSize()
void Menu::setRectSize(int w, int h)
{
rectBG.rect.w = findWidth() + text->getCharacterWidth();
rectBG.rect.h = findHeight() + text->getCharacterWidth();
// Establece el ancho
if (w == 0)
{ // Si no se pasa un valor, se busca si hay uno prefijado
if (this->w == 0)
{ // Si no hay prefijado, coge el item mas ancho
rectBG.rect.w = findWidth() + text->getCharacterSize();
}
else
{ // Si hay prefijado, coge ese
rectBG.rect.w = this->w;
}
}
else
{ // Si se pasa un valor, se usa y se prefija
rectBG.rect.w = w;
this->w = w;
}
// Establece el alto
if (h == 0)
{ // Si no se pasa un valor, se busca de manera automatica
rectBG.rect.h = findHeight() + text->getCharacterSize();
}
else
{ // Si se pasa un valor, se aplica
rectBG.rect.h = h;
}
// La posición X es la del menú menos medio caracter
rectBG.rect.x = x - (text->getCharacterWidth() / 2);
if (this->w != 0)
{ // Si el ancho esta prefijado, la x coinccide
rectBG.rect.x = x;
}
else
{ // Si el ancho es automatico, se le da un poco de margen
rectBG.rect.x = x - (text->getCharacterSize() / 2);
}
// La posición Y es la del menu menos la altura de medio caracter
rectBG.rect.y = y - (text->getCharacterWidth() / 2);
rectBG.rect.y = y - (text->getCharacterSize() / 2);
// Establecemos los valores del rectangulo del selector a partir de los valores del rectangulo de fondo
setSelectorPos(selector.index);
@@ -410,10 +730,28 @@ void Menu::setSelectorTextColor(color_t color)
void Menu::centerMenuOnX(int value)
{
isCenteredOnX = true;
if (value != 0)
{
centerX = value;
}
else if (centerX == 0)
{
return;
}
// Establece la nueva posición centrada en funcion del elemento más ancho
x = (value) - (findWidth() / 2);
// Establece la nueva posición centrada en funcion del elemento más ancho o del ancho fijo del menu
if (w != 0)
{ // Si se ha definido un ancho fijo
x = (centerX) - (w / 2);
}
else
{ // Si se actua en función del elemento más ancho
x = (centerX) - (findWidth() / 2);
}
// Actualiza el rectangulo de fondo y del selector
rectBG.rect.x = x;
selector.rect.x = x;
// Reposiciona los elementos del menu
for (auto &i : item)
@@ -423,6 +761,12 @@ void Menu::centerMenuOnX(int value)
// Recalcula el rectangulo de fondo
setRectSize();
// Vuelve a centrar los elementos si fuera el caso
if (areElementsCenteredOnX)
{
centerMenuElementsOnX();
}
}
// Centra el menu respecto un punto en el eje Y
@@ -456,14 +800,13 @@ void Menu::centerMenuElementsOnX()
void Menu::addItem(std::string text, int hPaddingDown, bool selectable, bool greyed, bool linkedDown)
{
item_t temp;
// Si es el primer item coge la posición en el eje Y del propio menu
if (item.size() == 0)
{
if (item.empty())
{ // Si es el primer item coge la posición en el eje Y del propio menu
temp.rect.y = y;
}
else
// En caso contrario, coge la posición en el eje Y a partir del elemento anterior
{
{ // En caso contrario, coge la posición en el eje Y a partir del último elemento
temp.rect.y = item.back().rect.y + item.back().rect.h + item.back().hPaddingDown;
}
@@ -474,13 +817,14 @@ void Menu::addItem(std::string text, int hPaddingDown, bool selectable, bool gre
temp.linkedDown = linkedDown;
item.push_back(temp);
setItemCaption(item.size() - 1, text);
if (item.size() > 0)
if (item.size() > 1)
{
if (item[item.size() - 1].linkedDown)
if (item.at(item.size() - 2).linkedDown)
{
item[item.size()].linkedUp = true;
item.back().linkedUp = true;
}
}
@@ -491,13 +835,10 @@ void Menu::addItem(std::string text, int hPaddingDown, bool selectable, bool gre
// Cambia el texto de un item
void Menu::setItemCaption(int index, std::string text)
{
item[index].label = text;
item[index].rect.w = this->text->lenght(item[index].label);
item[index].rect.h = this->text->getCharacterWidth();
item.at(index).label = text;
item.at(index).rect.w = this->text->lenght(item.at(index).label);
item.at(index).rect.h = this->text->getCharacterSize();
reorganize();
const std::string texto = item[index].label + ":" + std::to_string(item[index].rect.w);
printf("Adding menu item -> %s\n", texto.c_str());
}
// Establece el indice del itemm que se usará por defecto al cancelar el menu
@@ -573,41 +914,69 @@ int Menu::findHeight()
// Recoloca los elementos del menu en el eje Y
void Menu::replaceElementsOnY()
{
item[0].rect.y = y;
item.at(0).rect.y = y;
for (int i = 1; i < item.size(); i++)
for (int i = 1; i < (int)item.size(); i++)
{
item[i].rect.y = item[i - 1].rect.y + item[i - 1].rect.h + item[i - 1].hPaddingDown;
item.at(i).rect.y = item.at(i - 1).rect.y + item.at(i - 1).rect.h + item.at(i - 1).hPaddingDown;
}
}
// Establece el estado seleccionable de un item
void Menu::setSelectable(int index, bool value)
{
item[index].selectable = value;
item.at(index).selectable = value;
}
// Establece el estado agrisado de un item
void Menu::setGreyed(int index, bool value)
{
item[index].greyed = value;
item.at(index).greyed = value;
}
// Establece el estado de enlace de un item
void Menu::setLinkedDown(int index, bool value)
{
item[index].linkedDown = value;
item.at(index).linkedDown = value;
}
// Calcula la altura del selector
int Menu::getSelectorHeight(int value)
{
if (item[value].linkedDown)
if (item.at(value).linkedDown)
{
return item[value].rect.h + item[value].hPaddingDown + item[value + 1].rect.h;
return item.at(value).rect.h + item.at(value).hPaddingDown + item.at(value + 1).rect.h;
}
else
{
return item[value].rect.h;
return item.at(value).rect.h;
}
}
// Establece el nombre del menu
void Menu::setName(std::string name)
{
this->name = name;
}
// Establece la posición del menu
void Menu::setPos(int x, int y)
{
this->x = x;
this->y = y;
}
// Establece el tipo de fondo del menu
void Menu::setBackgroundType(int value)
{
backgroundType = value;
}
// Establece la fuente de texto que se utilizará
void Menu::setText(std::string font_png, std::string font_txt)
{
if (!text)
{
text = new Text(font_png, font_txt, renderer);
}
}

View File

@@ -1,12 +1,15 @@
#pragma once
#include <SDL2/SDL.h>
#include <vector>
#include "asset.h"
#include "input.h"
#include "jail_audio.h"
#include "sprite.h"
#include "text.h"
#include "input.h"
#include "utils.h"
#include "jail_audio.h"
#include <fstream>
#include <sstream>
#include <vector>
#ifndef MENU_H
#define MENU_H
@@ -65,6 +68,13 @@ private:
int a; // Cantidad de transparencia para el rectangulo del selector
};
// Objetos y punteros
SDL_Renderer *renderer; // Puntero al renderizador de la ventana
Text *text; // Texto para poder escribir los items del menu
Input *input; // Gestor de eventos de entrada de teclado o gamepad
Asset *asset; // Objeto para gestionar los ficheros de recursos
// Variables
std::string name; // Nombre del menu
int x; // Posición en el eje X de la primera letra del primer elemento
int y; // Posición en el eje Y de la primera letra del primer elemento
@@ -82,16 +92,21 @@ private:
JA_Sound soundAccept; // Sonido al aceptar o elegir una opción del menu
JA_Sound soundCancel; // Sonido al cancelar el menu
JA_Sound soundMove; // Sonido al mover el selector
SDL_Renderer *renderer; // Puntero al renderizador de la ventana
Text *text; // Texto para poder escribir los items del menu
Input *input; // Gestor de eventos de entrada de teclado o gamepad
color_t colorGreyed; // Color para los elementos agrisados
rectangle_t rectBG; // Rectangulo de fondo del menu
std::vector<item_t> item; // Estructura para cada elemento del menu
selector_t selector; // Variables para pintar el selector del menu
std::string font_png; // Ruta con el fichero que contiene las letras en formato de mapa de bits
std::string font_txt; // Ruta con el fichero que contiene las dimensiones de cada letra
// Establece el rectangulo de fondo del menu
void setRectSize();
// Carga la configuración del menu desde un archivo de texto
bool load(std::string file_path);
// Asigna variables a partir de dos cadenas
bool setVars(std::string var, std::string value);
// Asigna variables a partir de dos cadenas
bool setItem(item_t *item, std::string var, std::string value);
// Actualiza el menu para recolocarlo correctamente y establecer el tamaño
void reorganize();
@@ -125,14 +140,11 @@ private:
public:
// Constructor
Menu(SDL_Renderer *renderer, Text *text, Input *input);
Menu(SDL_Renderer *renderer, Asset *asset, Input *input, std::string file = "");
// Destructor
~Menu();
// Inicializador
void init(std::string name, int x, int y, int backgroundType);
// Carga los ficheros de audio
void loadAudioFile(std::string file, int sound);
@@ -164,7 +176,7 @@ public:
void setSelectorTextColor(color_t color);
// Centra el menu respecto a un punto en el eje X
void centerMenuOnX(int value);
void centerMenuOnX(int value = 0);
// Centra el menu respecto a un punto en el eje Y
void centerMenuOnY(int value);
@@ -192,6 +204,21 @@ public:
// Establece el estado de enlace de un item
void setLinkedDown(int index, bool value);
// Establece el nombre del menu
void setName(std::string name);
// Establece la posición del menu
void setPos(int x, int y);
// Establece el tipo de fondo del menu
void setBackgroundType(int value);
// Establece la fuente de texto que se utilizará
void setText(std::string font_png, std::string font_txt);
// Establece el rectangulo de fondo del menu
void setRectSize(int w = 0, int h = 0);
};
#endif

View File

@@ -2,7 +2,7 @@
#include "movingsprite.h"
// Constructor
MovingSprite::MovingSprite(float x, float y, int w, int h, float velx, float vely, float accelx, float accely, LTexture *texture, SDL_Renderer *renderer)
MovingSprite::MovingSprite(float x, float y, int w, int h, float velx, float vely, float accelx, float accely, Texture *texture, SDL_Renderer *renderer)
{
// Copia los punteros
this->texture = texture;
@@ -45,7 +45,7 @@ MovingSprite::MovingSprite(float x, float y, int w, int h, float velx, float vel
spriteClip = {0, 0, w, h};
// Establece el centro de rotación
center = {0, 0};
center = nullptr;
// Establece el tipo de volteado
currentFlip = SDL_FLIP_NONE;
@@ -73,7 +73,7 @@ void MovingSprite::clear()
angle = 0.0; // Angulo para dibujarlo
rotateEnabled = false; // Indica si ha de rotar
center = {0, 0}; // Centro de rotación
center = nullptr; // Centro de rotación
rotateSpeed = 0; // Velocidad de giro
rotateAmount = 0.0; // Cantidad de grados a girar en cada iteración
counter = 0; // Contador interno
@@ -101,7 +101,9 @@ void MovingSprite::move()
void MovingSprite::render()
{
if (enabled)
texture->render(renderer, (int)x, (int)y, &spriteClip, zoomW, zoomH, angle, &center, currentFlip);
{
texture->render(renderer, (int)x, (int)y, &spriteClip, zoomW, zoomH, angle, center, currentFlip);
}
}
// Obtiene el valor de la variable
@@ -158,11 +160,13 @@ double MovingSprite::getAngle()
return angle;
}
// Establece la posición del objeto
void MovingSprite::setPos(SDL_Rect rect)
// Establece la posición y el tamaño del objeto
void MovingSprite::setRect(SDL_Rect rect)
{
x = (float)rect.x;
y = (float)rect.y;
w = rect.w;
h = rect.h;
}
// Establece el valor de la variable
@@ -265,7 +269,14 @@ void MovingSprite::setRotate(bool value)
// Establece el valor de la variable
void MovingSprite::setRotateSpeed(int value)
{
if (value < 1)
{
rotateSpeed = 1;
}
else
{
rotateSpeed = value;
}
}
// Establece el valor de la variable
@@ -324,15 +335,6 @@ SDL_Rect MovingSprite::getRect()
return rect;
}
// Establece los valores de posición y tamaño del sprite
void MovingSprite::setRect(SDL_Rect rect)
{
x = (float)rect.x;
y = (float)rect.y;
w = rect.w;
h = rect.h;
}
// Deshace el último movimiento
void MovingSprite::undoMove()
{

View File

@@ -10,6 +10,10 @@
class MovingSprite : public Sprite
{
protected:
// Objetos y punteros
SDL_Point *center; // Centro de rotación
// Variables
float x; // Posición en el eje X
float y; // Posición en el eje Y
@@ -30,12 +34,11 @@ protected:
int rotateSpeed; // Velocidad de giro
double rotateAmount; // Cantidad de grados a girar en cada iteración
int counter; // Contador interno
SDL_Point center; // Centro de rotación
SDL_RendererFlip currentFlip; // Indica como se voltea el sprite
public:
// Constructor
MovingSprite(float x = 0, float y = 0, int w = 0, int h = 0, float velx = 0, float vely = 0, float accelx = 0, float accely = 0, LTexture *texture = nullptr, SDL_Renderer *renderer = nullptr);
MovingSprite(float x = 0, float y = 0, int w = 0, int h = 0, float velx = 0, float vely = 0, float accelx = 0, float accely = 0, Texture *texture = nullptr, SDL_Renderer *renderer = nullptr);
// Destructor
~MovingSprite();
@@ -88,8 +91,8 @@ public:
// Obtiene el valor de la variable
Uint16 getRotateSpeed();
// Establece la posición del objeto
void setPos(SDL_Rect rect);
// Establece la posición y el tamaño del objeto
void setRect(SDL_Rect rect);
// Establece el valor de la variable
void setPosX(float value);
@@ -151,9 +154,6 @@ public:
// Devuelve el rectangulo donde está el sprite
SDL_Rect getRect();
// Establece los valores de posición y tamaño del sprite
void setRect(SDL_Rect rect);
// Deshace el último movimiento
void undoMove();

365
source/common/screen.cpp Normal file
View File

@@ -0,0 +1,365 @@
#include "screen.h"
#include <string>
#include <stdio.h>
// Constructor
Screen::Screen(SDL_Window *window, SDL_Renderer *renderer, options_t *options, int gameInternalResX, int gameInternalResY)
{
// Inicializa variables
this->window = window;
this->renderer = renderer;
this->options = options;
gameCanvasWidth = gameInternalResX;
gameCanvasHeight = gameInternalResY;
iniFade();
iniSpectrumFade();
// Define el color del borde para el modo de pantalla completa
borderColor = {0x00, 0x00, 0x00};
// Crea la textura donde se dibujan los graficos del juego
gameCanvas = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_TARGET, gameCanvasWidth, gameCanvasHeight);
if (gameCanvas == nullptr)
{
printf("TitleSurface could not be created!\nSDL Error: %s\n", SDL_GetError());
}
// Establece el modo de video
setVideoMode(options->fullScreenMode);
// Calcula los anclajes
anchor.left = 0;
anchor.right = gameCanvasWidth;
anchor.center = gameCanvasWidth / 2;
anchor.top = 0;
anchor.bottom = gameCanvasHeight;
anchor.middle = gameCanvasHeight / 2;
}
// Destructor
Screen::~Screen()
{
renderer = nullptr;
}
// Limpia la pantalla
void Screen::clean(color_t color)
{
SDL_SetRenderDrawColor(renderer, color.r, color.g, color.b, 0xFF);
SDL_RenderClear(renderer);
}
// Prepara para empezar a dibujar en la textura de juego
void Screen::start()
{
SDL_SetRenderTarget(renderer, gameCanvas);
}
// Vuelca el contenido del renderizador en pantalla
void Screen::blit()
{
// Vuelve a dejar el renderizador en modo normal
SDL_SetRenderTarget(renderer, nullptr);
// Borra el contenido previo
SDL_SetRenderDrawColor(renderer, borderColor.r, borderColor.g, borderColor.b, 0xFF);
SDL_RenderClear(renderer);
// Copia la textura de juego en el renderizador en la posición adecuada
SDL_RenderCopy(renderer, gameCanvas, nullptr, &dest);
// Muestra por pantalla el renderizador
SDL_RenderPresent(renderer);
}
// Establece el modo de video
void Screen::setVideoMode(int fullScreenMode)
{
// Aplica el modo de video
SDL_SetWindowFullscreen(window, fullScreenMode);
// Si está activo el modo ventana quita el borde
if (fullScreenMode == 0)
{
if (options->borderEnabled)
{
const int incWidth = gameCanvasWidth * options->borderSize;
const int incHeight = gameCanvasHeight * options->borderSize;
screenWidth = gameCanvasWidth + incWidth;
screenHeight = gameCanvasHeight + incHeight;
dest = {0 + (incWidth / 2), 0 + (incHeight / 2), gameCanvasWidth, gameCanvasHeight};
}
else
{
screenWidth = gameCanvasWidth;
screenHeight = gameCanvasHeight;
dest = {0, 0, gameCanvasWidth, gameCanvasHeight};
}
// Modifica el tamaño del renderizador y de la ventana
SDL_RenderSetLogicalSize(renderer, screenWidth, screenHeight);
SDL_SetWindowSize(window, screenWidth * options->windowSize, screenHeight * options->windowSize);
}
// Si está activo el modo de pantalla completa añade el borde
else if (fullScreenMode == SDL_WINDOW_FULLSCREEN_DESKTOP)
{
// Obten el alto y el ancho de la ventana
SDL_GetWindowSize(window, &screenWidth, &screenHeight);
// Aplica el escalado al rectangulo donde se pinta la textura del juego
if (options->integerScale)
{
// Calcula el tamaño de la escala máxima
int scale = 0;
while (((gameCanvasWidth * (scale + 1)) <= screenWidth) && ((gameCanvasHeight * (scale + 1)) <= screenHeight))
{
scale++;
}
dest.w = gameCanvasWidth * scale;
dest.h = gameCanvasHeight * scale;
dest.x = (screenWidth - dest.w) / 2;
dest.y = (screenHeight - dest.h) / 2;
}
else if (options->keepAspect)
{
float ratio = (float)gameCanvasWidth / (float)gameCanvasHeight;
if ((screenWidth - gameCanvasWidth) >= (screenHeight - gameCanvasHeight))
{
dest.h = screenHeight;
dest.w = (int)((screenHeight * ratio) + 0.5f);
dest.x = (screenWidth - dest.w) / 2;
dest.y = (screenHeight - dest.h) / 2;
}
else
{
dest.w = screenWidth;
dest.h = (int)((screenWidth / ratio) + 0.5f);
dest.x = (screenWidth - dest.w) / 2;
dest.y = (screenHeight - dest.h) / 2;
}
}
else
{
dest.w = screenWidth;
dest.h = screenHeight;
dest.x = dest.y = 0;
}
// Modifica el tamaño del renderizador
SDL_RenderSetLogicalSize(renderer, screenWidth, screenHeight);
}
// Actualiza el valor de la variable
options->fullScreenMode = fullScreenMode;
}
// Camibia entre pantalla completa y ventana
void Screen::switchVideoMode()
{
if (options->fullScreenMode == 0)
{
options->fullScreenMode = SDL_WINDOW_FULLSCREEN_DESKTOP;
}
else
{
options->fullScreenMode = 0;
}
setVideoMode(options->fullScreenMode);
}
// Cambia el tamaño de la ventana
void Screen::setWindowSize(int size)
{
options->windowSize = size;
setVideoMode(0);
}
// Cambia el color del borde
void Screen::setBorderColor(color_t color)
{
borderColor = color;
}
// Cambia el tipo de mezcla
void Screen::setBlendMode(SDL_BlendMode blendMode)
{
SDL_SetRenderDrawBlendMode(renderer, blendMode);
}
// Establece el tamaño del borde
void Screen::setBorderSize(float s)
{
options->borderSize = s;
}
// Establece si se ha de ver el borde en el modo ventana
void Screen::setBorderEnabled(bool value)
{
options->borderEnabled = value;
}
// Cambia entre borde visible y no visible
void Screen::switchBorder()
{
options->borderEnabled = !options->borderEnabled;
setVideoMode(0);
}
// Activa el fade
void Screen::setFade()
{
fade = true;
}
// Comprueba si ha terminado el fade
bool Screen::fadeEnded()
{
if (fade || fadeCounter > 0)
{
return false;
}
return true;
}
// Activa el spectrum fade
void Screen::setspectrumFade()
{
spectrumFade = true;
}
// Comprueba si ha terminado el spectrum fade
bool Screen::spectrumFadeEnded()
{
if (spectrumFade || spectrumFadeCounter > 0)
{
return false;
}
return true;
}
// Inicializa las variables para el fade
void Screen::iniFade()
{
fade = false;
fadeCounter = 0;
fadeLenght = 200;
}
// Actualiza el fade
void Screen::updateFade()
{
if (!fade)
{
return;
}
fadeCounter++;
if (fadeCounter > fadeLenght)
{
iniFade();
}
}
// Dibuja el fade
void Screen::renderFade()
{
if (!fade)
{
return;
}
const SDL_Rect rect = {0, 0, gameCanvasWidth, gameCanvasHeight};
color_t color = {0, 0, 0};
const float step = (float)fadeCounter / (float)fadeLenght;
const int alpha = 0 + (255 - 0) * step;
SDL_SetRenderDrawColor(renderer, color.r, color.g, color.b, alpha);
SDL_RenderFillRect(renderer, &rect);
}
// Inicializa las variables para el fade spectrum
void Screen::iniSpectrumFade()
{
spectrumFade = false;
spectrumFadeCounter = 0;
spectrumFadeLenght = 50;
spectrumColor.clear();
color_t c;
c = stringToColor("black");
spectrumColor.push_back(c);
c = stringToColor("blue");
spectrumColor.push_back(c);
c = stringToColor("red");
spectrumColor.push_back(c);
c = stringToColor("magenta");
spectrumColor.push_back(c);
c = stringToColor("green");
spectrumColor.push_back(c);
c = stringToColor("cyan");
spectrumColor.push_back(c);
c = stringToColor("yellow");
spectrumColor.push_back(c);
c = stringToColor("bright_white");
spectrumColor.push_back(c);
}
// Actualiza el spectrum fade
void Screen::updateSpectrumFade()
{
if (!spectrumFade)
{
return;
}
spectrumFadeCounter++;
if (spectrumFadeCounter > spectrumFadeLenght)
{
iniSpectrumFade();
SDL_SetTextureColorMod(gameCanvas, 255, 255, 255);
}
}
// Dibuja el spectrum fade
void Screen::renderSpectrumFade()
{
if (!spectrumFade)
{
return;
}
const float step = (float)spectrumFadeCounter / (float)spectrumFadeLenght;
const int max = spectrumColor.size() - 1;
const int index = max + (0 - max) * step;
const color_t c = spectrumColor.at(index);
SDL_SetTextureColorMod(gameCanvas, c.r, c.g, c.b);
}
// Actualiza los efectos
void Screen::updateFX()
{
updateFade();
updateSpectrumFade();
}
// Dibuja los efectos
void Screen::renderFX()
{
renderFade();
renderSpectrumFade();
}

128
source/common/screen.h Normal file
View File

@@ -0,0 +1,128 @@
#pragma once
#include <SDL2/SDL.h>
#include "utils.h"
#include <vector>
#ifndef SCREEN_H
#define SCREEN_H
#define FILTER_NEAREST 0
#define FILTER_LINEAL 1
struct anchor_t
{
int left; // Parte izquierda de la pantalla de juego
int right; // Parte drecha de la pantalla de juego
int center; // Parte central horizontal de la pantalla de juego
int top; // Parte superior de la pantalla de juego
int bottom; // Parte infoerior de la pantalla de juego
int middle; // Parte central vertical de la pantalla de juego
};
// Clase Screen
class Screen
{
private:
// Objetos y punteros
SDL_Window *window; // Ventana de la aplicación
SDL_Renderer *renderer; // El renderizador de la ventana
SDL_Texture *gameCanvas; // Textura para completar la ventana de juego hasta la pantalla completa
options_t *options; // Variable con todas las opciones del programa
// Variables
int screenWidth; // Ancho de la pantalla o ventana
int screenHeight; // Alto de la pantalla o ventana
int gameCanvasWidth; // Resolución interna del juego. Es el ancho de la textura donde se dibuja el juego
int gameCanvasHeight; // Resolución interna del juego. Es el alto de la textura donde se dibuja el juego
anchor_t anchor; // Variable con los anclajes de la pantalla
SDL_Rect dest; // Coordenadas donde se va a dibujar la textura del juego sobre la pantalla o ventana
color_t borderColor; // Color del borde añadido a la textura de juego para rellenar la pantalla
// Variables para efectos
bool fade; // Indica si esta activo el efecto de fade
int fadeCounter; // Temporizador para el efecto de fade
int fadeLenght; // Duración del fade
bool spectrumFade; // Indica si esta activo el efecto de fade spectrum
int spectrumFadeCounter; // Temporizador para el efecto de fade spectrum
int spectrumFadeLenght; // Duración del fade spectrum
std::vector<color_t> spectrumColor; // Colores para el fade spectrum
// Inicializa las variables para el fade
void iniFade();
// Actualiza el fade
void updateFade();
// Dibuja el fade
void renderFade();
// Inicializa las variables para el fade spectrum
void iniSpectrumFade();
// Actualiza el spectrum fade
void updateSpectrumFade();
// Dibuja el spectrum fade
void renderSpectrumFade();
public:
// Constructor
Screen(SDL_Window *window, SDL_Renderer *renderer, options_t *options, int gameInternalResX, int gameInternalResY);
// Destructor
~Screen();
// Limpia la pantalla
void clean(color_t color = {0x00, 0x00, 0x00});
// Prepara para empezar a dibujar en la textura de juego
void start();
// Vuelca el contenido del renderizador en pantalla
void blit();
// Establece el modo de video
void setVideoMode(int fullScreenMode);
// Camibia entre pantalla completa y ventana
void switchVideoMode();
// Cambia el tamaño de la ventana
void setWindowSize(int size);
// Cambia el color del borde
void setBorderColor(color_t color);
// Cambia el tipo de mezcla
void setBlendMode(SDL_BlendMode blendMode);
// Establece el tamaño del borde
void setBorderSize(float s);
// Establece si se ha de ver el borde en el modo ventana
void setBorderEnabled(bool value);
// Cambia entre borde visible y no visible
void switchBorder();
// Activa el fade
void setFade();
// Comprueba si ha terminado el fade
bool fadeEnded();
// Activa el spectrum fade
void setspectrumFade();
// Comprueba si ha terminado el spectrum fade
bool spectrumFadeEnded();
// Actualiza los efectos
void updateFX();
// Dibuja los efectos
void renderFX();
};
#endif

View File

@@ -1,7 +1,7 @@
#include "sprite.h"
// Constructor
Sprite::Sprite(int x, int y, int w, int h, LTexture *texture, SDL_Renderer *renderer)
Sprite::Sprite(int x, int y, int w, int h, Texture *texture, SDL_Renderer *renderer)
{
// Establece la posición X,Y del sprite
this->x = x;
@@ -18,13 +18,13 @@ Sprite::Sprite(int x, int y, int w, int h, LTexture *texture, SDL_Renderer *rend
this->texture = texture;
// Establece el rectangulo de donde coger la imagen
spriteClip = {x, y, w, h};
spriteClip = {0, 0, w, h};
// Inicializa variables
enabled = true;
}
Sprite::Sprite(SDL_Rect rect, LTexture *texture, SDL_Renderer *renderer)
Sprite::Sprite(SDL_Rect rect, Texture *texture, SDL_Renderer *renderer)
{
// Establece la posición X,Y del sprite
x = rect.x;
@@ -41,7 +41,7 @@ Sprite::Sprite(SDL_Rect rect, LTexture *texture, SDL_Renderer *renderer)
this->texture = texture;
// Establece el rectangulo de donde coger la imagen
spriteClip = {x, y, w, h};
spriteClip = {0, 0, w, h};
// Inicializa variables
enabled = true;
@@ -137,17 +137,23 @@ void Sprite::setSpriteClip(int x, int y, int w, int h)
}
// Obten el valor de la variable
LTexture *Sprite::getTexture()
Texture *Sprite::getTexture()
{
return texture;
}
// Establece el valor de la variable
void Sprite::setTexture(LTexture *texture)
void Sprite::setTexture(Texture *texture)
{
this->texture = texture;
}
// Obten el valor de la variable
SDL_Renderer *Sprite::getRenderer()
{
return renderer;
}
// Establece el valor de la variable
void Sprite::setRenderer(SDL_Renderer *renderer)
{

View File

@@ -1,7 +1,7 @@
#pragma once
#include <SDL2/SDL.h>
#include "ltexture.h"
#include "texture.h"
#ifndef SPRITE_H
#define SPRITE_H
@@ -10,21 +10,22 @@
class Sprite
{
protected:
// Objetos y punteros
SDL_Renderer *renderer; // Puntero al renderizador de la ventana
Texture *texture; // Textura donde estan todos los dibujos del sprite
// Variables
int x; // Posición en el eje X donde dibujar el sprite
int y; // Posición en el eje Y donde dibujar el sprite
int w; // Ancho del sprite
int h; // Alto del sprite
SDL_Renderer *renderer; // Puntero al renderizador de la ventana
LTexture *texture; // Textura donde estan todos los dibujos del sprite
SDL_Rect spriteClip; // Rectangulo de origen de la textura que se dibujará en pantalla
bool enabled; // Indica si el sprite esta habilitado
public:
// Constructor
Sprite(int x = 0, int y = 0, int w = 0, int h = 0, LTexture *texture = nullptr, SDL_Renderer *renderer = nullptr);
Sprite(SDL_Rect rect, LTexture *texture, SDL_Renderer *renderer);
Sprite(int x = 0, int y = 0, int w = 0, int h = 0, Texture *texture = nullptr, SDL_Renderer *renderer = nullptr);
Sprite(SDL_Rect rect, Texture *texture, SDL_Renderer *renderer);
// Destructor
~Sprite();
@@ -69,10 +70,13 @@ public:
void setSpriteClip(int x, int y, int w, int h);
// Obten el valor de la variable
LTexture *getTexture();
Texture *getTexture();
// Establece el valor de la variable
void setTexture(LTexture *texture);
void setTexture(Texture *texture);
// Obten el valor de la variable
SDL_Renderer *getRenderer();
// Establece el valor de la variable
void setRenderer(SDL_Renderer *renderer);

View File

@@ -1,4 +1,4 @@
#include "const.h"
#include "text.h"
#include <iostream>
#include <fstream>
@@ -6,60 +6,19 @@
// Constructor
Text::Text(std::string bitmapFile, std::string textFile, SDL_Renderer *renderer)
{
texture = new LTexture();
loadTextureFromFile(texture, bitmapFile, renderer);
// Carga los offsets desde el fichero
initOffsetFromFile(textFile);
SDL_Rect rect = {0,0,0,0};
mSprite = new Sprite(rect, texture, renderer);
mSprite->setTexture(texture);
mSprite->setRenderer(renderer);
file = textFile;
init();
// Crea los objetos
texture = new Texture(renderer, bitmapFile);
sprite = new Sprite({0, 0, boxWidth, boxHeight}, texture, renderer);
}
// Destructor
Text::~Text()
{
texture->unload();
delete texture;
texture = nullptr;
delete mSprite;
mSprite = nullptr;
}
// Inicializador
void Text::init()
{
// Inicializa a cero el vector con las coordenadas
for (int i = 0; i < 128; i++)
{
offset[i].x = 0;
offset[i].y = 0;
offset[i].w = 0;
}
// Carga los offsets desde el fichero
initOffsetFromFile();
// Inicia los valores del sprite que dibuja las letras
mSprite->setWidth(boxWidth);
mSprite->setHeight(boxHeight);
mSprite->setPosX(0);
mSprite->setPosY(0);
mSprite->setSpriteClip(0, 0, mSprite->getWidth(), mSprite->getHeight());
// Establece las coordenadas para cada caracter ascii de la cadena y su ancho
for (int i = 32; i < 128; i++)
{
offset[i].x = ((i - 32) % 15) * boxWidth;
offset[i].y = ((i - 32) / 15) * boxHeight;
}
//printf("Cargando %s\n", file.c_str());
//const std::string texto = "w = "+ std::to_string(boxWidth) + ", h = " + std::to_string(boxHeight);
//printf("%s\n",texto.c_str());
delete sprite;
}
// Escribe texto en pantalla
@@ -72,10 +31,10 @@ void Text::write(int x, int y, std::string text, int kerning, int lenght)
for (int i = 0; i < lenght; ++i)
{
mSprite->setSpriteClip(offset[int(text[i])].x, offset[int(text[i])].y, mSprite->getWidth(), mSprite->getHeight());
mSprite->setPosX(x + shift);
mSprite->setPosY(y);
mSprite->render();
sprite->setSpriteClip(offset[int(text[i])].x, offset[int(text[i])].y, sprite->getWidth(), sprite->getHeight());
sprite->setPosX(x + shift);
sprite->setPosY(y);
sprite->render();
shift += (offset[int(text[i])].w + kerning);
}
}
@@ -83,17 +42,17 @@ void Text::write(int x, int y, std::string text, int kerning, int lenght)
// Escribe el texto con colores
void Text::writeColored(int x, int y, std::string text, color_t color, int kerning, int lenght)
{
mSprite->getTexture()->setColor(color.r, color.g, color.b);
sprite->getTexture()->setColor(color.r, color.g, color.b);
write(x, y, text, kerning, lenght);
mSprite->getTexture()->setColor(255, 255, 255);
sprite->getTexture()->setColor(255, 255, 255);
}
// Escribe el texto con sombra
void Text::writeShadowed(int x, int y, std::string text, color_t color, Uint8 shadowDistance, int kerning, int lenght)
{
mSprite->getTexture()->setColor(color.r, color.g, color.b);
sprite->getTexture()->setColor(color.r, color.g, color.b);
write(x + shadowDistance, y + shadowDistance, text, kerning, lenght);
mSprite->getTexture()->setColor(255, 255, 255);
sprite->getTexture()->setColor(255, 255, 255);
write(x, y, text, kerning, lenght);
}
@@ -142,7 +101,7 @@ int Text::lenght(std::string text, int kerning)
{
int shift = 0;
for (int i = 0; i < (int)text.length(); i++)
for (int i = 0; i < (int)text.length(); ++i)
shift += (offset[int(text[i])].w + kerning);
// Descuenta el kerning del último caracter
@@ -150,9 +109,20 @@ int Text::lenght(std::string text, int kerning)
}
// Inicializa el vector de offsets desde un fichero
void Text::initOffsetFromFile()
void Text::initOffsetFromFile(std::string file)
{
// Inicializa a cero el vector con las coordenadas
for (int i = 0; i < 128; ++i)
{
offset[i].x = 0;
offset[i].y = 0;
offset[i].w = 0;
}
// Abre el fichero para leer los valores
const std::string filename = file.substr(file.find_last_of("\\/") + 1).c_str();
std::ifstream rfile(file);
if (rfile.is_open() && rfile.good())
{
std::string buffer;
@@ -173,17 +143,42 @@ void Text::initOffsetFromFile()
{
// Almacena solo las lineas impares
if (line_read % 2 == 1)
{
offset[index++].w = std::stoi(buffer);
}
// Limpia el buffer
buffer.clear();
line_read++;
};
// Cierra el fichero
printf("Text loaded: %s\n", filename.c_str());
rfile.close();
}
// El fichero no se puede abrir
else
{
printf("Warning: Unable to open %s file\n", filename.c_str());
}
// Establece las coordenadas para cada caracter ascii de la cadena y su ancho
for (int i = 32; i < 128; ++i)
{
offset[i].x = ((i - 32) % 15) * boxWidth;
offset[i].y = ((i - 32) / 15) * boxHeight;
}
}
// Devuelve el valor de la variable
int Text::getCharacterWidth()
int Text::getCharacterSize()
{
return boxWidth;
}
// Recarga la textura
void Text::reLoadTexture()
{
texture->reLoad();
}

View File

@@ -15,26 +15,24 @@
class Text
{
private:
Sprite *mSprite; // Objeto con los graficos para el texto
struct Offset
struct offset_t
{
int x;
int y;
int w;
};
Offset offset[128]; // Vector con las posiciones y ancho de cada letra
// Objetos y punteros
Sprite *sprite; // Objeto con los graficos para el texto
Texture *texture; // Textura con los bitmaps del texto
// Variables
int boxWidth; // Anchura de la caja de cada caracter en el png
int boxHeight; // Altura de la caja de cada caracter en el png
std::string file; // Fichero con los descriptores de la fuente
LTexture *texture; // Textura con los bitmaps del texto
// Inicializador
void init();
offset_t offset[128]; // Vector con las posiciones y ancho de cada letra
// Inicializa el vector de offsets desde un fichero
void initOffsetFromFile();
void initOffsetFromFile(std::string file);
public:
// Constructor
@@ -62,7 +60,10 @@ public:
int lenght(std::string text, int kerning = 1);
// Devuelve el valor de la variable
int getCharacterWidth();
int getCharacterSize();
// Recarga la textura
void reLoadTexture();
};
#endif

191
source/common/texture.cpp Normal file
View File

@@ -0,0 +1,191 @@
#include "texture.h"
#define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h"
// Constructor
Texture::Texture(SDL_Renderer *renderer, std::string path)
{
// Copia punteros
this->renderer = renderer;
this->path = path;
// Inicializa
texture = nullptr;
width = 0;
height = 0;
// Carga el fichero en la textura
if (path != "")
{
loadFromFile(path, renderer);
}
}
// Destructor
Texture::~Texture()
{
// Libera memoria
unload();
}
// Carga una imagen desde un fichero
bool Texture::loadFromFile(std::string path, SDL_Renderer *renderer)
{
const std::string filename = path.substr(path.find_last_of("\\/") + 1);
int req_format = STBI_rgb_alpha;
int width, height, orig_format;
unsigned char *data = stbi_load(path.c_str(), &width, &height, &orig_format, req_format);
if (data == nullptr)
{
SDL_Log("Loading image failed: %s", stbi_failure_reason());
exit(1);
}
else
{
printf("Image loaded: %s\n", filename.c_str());
}
int depth, pitch;
Uint32 pixel_format;
if (req_format == STBI_rgb)
{
depth = 24;
pitch = 3 * width; // 3 bytes por pixel * pixels per linea
pixel_format = SDL_PIXELFORMAT_RGB24;
}
else
{ // STBI_rgb_alpha (RGBA)
depth = 32;
pitch = 4 * width;
pixel_format = SDL_PIXELFORMAT_RGBA32;
}
// Limpia
unload();
// La textura final
SDL_Texture *newTexture = nullptr;
// Carga la imagen desde una ruta específica
SDL_Surface *loadedSurface = SDL_CreateRGBSurfaceWithFormatFrom((void *)data, width, height, depth, pitch, pixel_format);
if (loadedSurface == nullptr)
{
printf("Unable to load image %s!\n", path.c_str());
}
else
{
// Crea la textura desde los pixels de la surface
newTexture = SDL_CreateTextureFromSurface(renderer, loadedSurface);
if (newTexture == nullptr)
{
printf("Unable to create texture from %s! SDL Error: %s\n", path.c_str(), SDL_GetError());
}
else
{
// Obtiene las dimensiones de la imagen
this->width = loadedSurface->w;
this->height = loadedSurface->h;
}
// Elimina la textura cargada
SDL_FreeSurface(loadedSurface);
}
// Return success
texture = newTexture;
return texture != nullptr;
}
// Crea una textura en blanco
bool Texture::createBlank(SDL_Renderer *renderer, int width, int height, SDL_TextureAccess access)
{
// Crea una textura sin inicializar
texture = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_RGBA8888, access, width, height);
if (texture == nullptr)
{
printf("Unable to create blank texture! SDL Error: %s\n", SDL_GetError());
}
else
{
this->width = width;
this->height = height;
}
return texture != nullptr;
}
// Libera la memoria de la textura
void Texture::unload()
{
// Libera la textura si existe
if (texture != nullptr)
{
SDL_DestroyTexture(texture);
texture = nullptr;
width = 0;
height = 0;
}
}
// Establece el color para la modulacion
void Texture::setColor(Uint8 red, Uint8 green, Uint8 blue)
{
SDL_SetTextureColorMod(texture, red, green, blue);
}
// Establece el blending
void Texture::setBlendMode(SDL_BlendMode blending)
{
SDL_SetTextureBlendMode(texture, blending);
}
// Establece el alpha para la modulación
void Texture::setAlpha(Uint8 alpha)
{
SDL_SetTextureAlphaMod(texture, alpha);
}
// Renderiza la textura en un punto específico
void Texture::render(SDL_Renderer *renderer, int x, int y, SDL_Rect *clip, float zoomW, float zoomH, double angle, SDL_Point *center, SDL_RendererFlip flip)
{
// Establece el destino de renderizado en la pantalla
SDL_Rect renderQuad = {x, y, width, height};
// Obtiene las dimesiones del clip de renderizado
if (clip != nullptr)
{
renderQuad.w = clip->w;
renderQuad.h = clip->h;
}
renderQuad.w = renderQuad.w * zoomW;
renderQuad.h = renderQuad.h * zoomH;
// Renderiza a pantalla
SDL_RenderCopyEx(renderer, texture, clip, &renderQuad, angle, center, flip);
}
// Establece la textura como objetivo de renderizado
void Texture::setAsRenderTarget(SDL_Renderer *renderer)
{
SDL_SetRenderTarget(renderer, texture);
}
// Obtiene el ancho de la imagen
int Texture::getWidth()
{
return width;
}
// Obtiene el alto de la imagen
int Texture::getHeight()
{
return height;
}
// Recarga la textura
bool Texture::reLoad()
{
return loadFromFile(path, renderer);
}

63
source/common/texture.h Normal file
View File

@@ -0,0 +1,63 @@
#pragma once
#include <SDL2/SDL.h>
#include <stdio.h>
#include <string>
#ifndef TEXTURE_H
#define TEXTURE_H
class Texture
{
private:
// Objetos y punteros
SDL_Texture *texture; // La textura
SDL_Renderer *renderer; // Renderizador donde dibujar la textura
// Variables
int width; // Ancho de la imagen
int height; // Alto de la imagen
std::string path; // Ruta de la imagen de la textura
public:
// Constructor
Texture(SDL_Renderer *renderer, std::string path = "");
// Destructor
~Texture();
// Carga una imagen desde un fichero
bool loadFromFile(std::string path, SDL_Renderer *renderer);
// Crea una textura en blanco
bool createBlank(SDL_Renderer *renderer, int width, int height, SDL_TextureAccess = SDL_TEXTUREACCESS_STREAMING);
// Libera la memoria de la textura
void unload();
// Establece el color para la modulacion
void setColor(Uint8 red, Uint8 green, Uint8 blue);
// Establece el blending
void setBlendMode(SDL_BlendMode blending);
// Establece el alpha para la modulación
void setAlpha(Uint8 alpha);
// Renderiza la textura en un punto específico
void render(SDL_Renderer *renderer, int x, int y, SDL_Rect *clip = nullptr, float zoomW = 1, float zoomH = 1, double angle = 0.0, SDL_Point *center = nullptr, SDL_RendererFlip flip = SDL_FLIP_NONE);
// Establece la textura como objetivo de renderizado
void setAsRenderTarget(SDL_Renderer *renderer);
// Obtiene el ancho de la imagen
int getWidth();
// Obtiene el alto de la imagen
int getHeight();
// Recarga la textura
bool reLoad();
};
#endif

580
source/common/utils.cpp Normal file
View File

@@ -0,0 +1,580 @@
#include "utils.h"
#include <math.h>
// Calcula el cuadrado de la distancia entre dos puntos
double distanceSquared(int x1, int y1, int x2, int y2)
{
const int deltaX = x2 - x1;
const int deltaY = y2 - y1;
return deltaX * deltaX + deltaY * deltaY;
}
// Detector de colisiones entre dos circulos
bool checkCollision(circle_t &a, circle_t &b)
{
// Calcula el radio total al cuadrado
int totalRadiusSquared = a.r + b.r;
totalRadiusSquared = totalRadiusSquared * totalRadiusSquared;
// Si la distancia entre el centro de los circulos es inferior a la suma de sus radios
if (distanceSquared(a.x, a.y, b.x, b.y) < (totalRadiusSquared))
{
// Los circulos han colisionado
return true;
}
// En caso contrario
return false;
}
// Detector de colisiones entre un circulo y un rectangulo
bool checkCollision(circle_t &a, SDL_Rect &b)
{
// Closest point on collision box
int cX, cY;
// Find closest x offset
if (a.x < b.x)
{
cX = b.x;
}
else if (a.x > b.x + b.w)
{
cX = b.x + b.w;
}
else
{
cX = a.x;
}
// Find closest y offset
if (a.y < b.y)
{
cY = b.y;
}
else if (a.y > b.y + b.h)
{
cY = b.y + b.h;
}
else
{
cY = a.y;
}
// If the closest point is inside the circle_t
if (distanceSquared(a.x, a.y, cX, cY) < a.r * a.r)
{
// This box and the circle_t have collided
return true;
}
// If the shapes have not collided
return false;
}
// Detector de colisiones entre dos rectangulos
bool checkCollision(SDL_Rect &a, SDL_Rect &b)
{
// Calcula las caras del rectangulo a
const int leftA = a.x;
const int rightA = a.x + a.w;
const int topA = a.y;
const int bottomA = a.y + a.h;
// Calcula las caras del rectangulo b
const int leftB = b.x;
const int rightB = b.x + b.w;
const int topB = b.y;
const int bottomB = b.y + b.h;
// Si cualquiera de las caras de a está fuera de b
if (bottomA <= topB)
{
return false;
}
if (topA >= bottomB)
{
return false;
}
if (rightA <= leftB)
{
return false;
}
if (leftA >= rightB)
{
return false;
}
// Si ninguna de las caras está fuera de b
return true;
}
// Detector de colisiones entre un punto y un rectangulo
bool checkCollision(SDL_Point &p, SDL_Rect &r)
{
// Comprueba si el punto está a la izquierda del rectangulo
if (p.x < r.x)
{
return false;
}
// Comprueba si el punto está a la derecha del rectangulo
if (p.x > r.x + r.w)
{
return false;
}
// Comprueba si el punto está por encima del rectangulo
if (p.y < r.y)
{
return false;
}
// Comprueba si el punto está por debajo del rectangulo
if (p.y > r.y + r.h)
{
return false;
}
// Si no está fuera, es que está dentro
return true;
}
// Detector de colisiones entre una linea horizontal y un rectangulo
bool checkCollision(h_line_t &l, SDL_Rect &r)
{
// Comprueba si la linea esta por encima del rectangulo
if (l.y < r.y)
{
return false;
}
// Comprueba si la linea esta por debajo del rectangulo
if (l.y >= r.y + r.h)
{
return false;
}
// Comprueba si el inicio de la linea esta a la derecha del rectangulo
if (l.x1 >= r.x + r.w)
{
return false;
}
// Comprueba si el final de la linea esta a la izquierda del rectangulo
if (l.x2 < r.x)
{
return false;
}
// Si ha llegado hasta aquí, hay colisión
return true;
}
// Detector de colisiones entre una linea vertical y un rectangulo
bool checkCollision(v_line_t &l, SDL_Rect &r)
{
// Comprueba si la linea esta por la izquierda del rectangulo
if (l.x < r.x)
{
return false;
}
// Comprueba si la linea esta por la derecha del rectangulo
if (l.x >= r.x + r.w)
{
return false;
}
// Comprueba si el inicio de la linea esta debajo del rectangulo
if (l.y1 >= r.y + r.h)
{
return false;
}
// Comprueba si el final de la linea esta encima del rectangulo
if (l.y2 < r.y)
{
return false;
}
// Si ha llegado hasta aquí, hay colisión
return true;
}
// Detector de colisiones entre una linea horizontal y un punto
bool checkCollision(h_line_t &l, SDL_Point &p)
{
// Comprueba si el punto esta sobre la linea
if (p.y > l.y)
{
return false;
}
// Comprueba si el punto esta bajo la linea
if (p.y < l.y)
{
return false;
}
// Comprueba si el punto esta a la izquierda de la linea
if (p.x < l.x1)
{
return false;
}
// Comprueba si el punto esta a la derecha de la linea
if (p.x > l.x2)
{
return false;
}
// Si ha llegado aquí, hay colisión
return true;
}
// Detector de colisiones entre dos lineas
SDL_Point checkCollision(line_t &l1, line_t &l2)
{
const float x1 = l1.x1;
const float y1 = l1.y1;
const float x2 = l1.x2;
const float y2 = l1.y2;
const float x3 = l2.x1;
const float y3 = l2.y1;
const float x4 = l2.x2;
const float y4 = l2.y2;
// calculate the direction of the lines
float uA = ((x4 - x3) * (y1 - y3) - (y4 - y3) * (x1 - x3)) / ((y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1));
float uB = ((x2 - x1) * (y1 - y3) - (y2 - y1) * (x1 - x3)) / ((y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1));
// if uA and uB are between 0-1, lines are colliding
if (uA >= 0 && uA <= 1 && uB >= 0 && uB <= 1)
{
// Calcula la intersección
const float x = x1 + (uA * (x2 - x1));
const float y = y1 + (uA * (y2 - y1));
return {(int)round(x), (int)round(y)};
}
return {-1, -1};
}
// Detector de colisiones entre dos lineas
SDL_Point checkCollision(d_line_t &l1, v_line_t &l2)
{
const float x1 = l1.x1;
const float y1 = l1.y1;
const float x2 = l1.x2;
const float y2 = l1.y2;
const float x3 = l2.x;
const float y3 = l2.y1;
const float x4 = l2.x;
const float y4 = l2.y2;
// calculate the direction of the lines
float uA = ((x4 - x3) * (y1 - y3) - (y4 - y3) * (x1 - x3)) / ((y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1));
float uB = ((x2 - x1) * (y1 - y3) - (y2 - y1) * (x1 - x3)) / ((y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1));
// if uA and uB are between 0-1, lines are colliding
if (uA >= 0 && uA <= 1 && uB >= 0 && uB <= 1)
{
// Calcula la intersección
const float x = x1 + (uA * (x2 - x1));
const float y = y1 + (uA * (y2 - y1));
return {(int)x, (int)y};
}
return {-1, -1};
}
// Detector de colisiones entre una linea diagonal y una vertical
/*bool checkCollision(d_line_t &l1, v_line_t &l2)
{
// Normaliza la linea diagonal
normalizeLine(l1);
// Comprueba si la linea vertical esta a la izquierda de la linea diagonal
if (l2.x < l1.x1)
{
return false;
}
// Comprueba si la linea vertical esta a la derecha de la linea diagonal
if (l2.x > l1.x2)
{
return false;
}
// Inacabada
return true;
}*/
// Normaliza una linea diagonal
void normalizeLine(d_line_t &l)
{
// Las lineas diagonales van de izquierda a derecha
// x2 mayor que x1
if (l.x2 < l.x1)
{
const int x = l.x1;
const int y = l.y1;
l.x1 = l.x2;
l.y1 = l.y2;
l.x2 = x;
l.y2 = y;
}
}
// Detector de colisiones entre un punto y una linea diagonal
bool checkCollision(SDL_Point &p, d_line_t &l)
{
// Comprueba si el punto está en alineado con la linea
if (abs(p.x - l.x1) != abs(p.y - l.y1))
{
return false;
}
// Comprueba si está a la derecha de la linea
if (p.x > l.x1 && p.x > l.x2)
{
return false;
}
// Comprueba si está a la izquierda de la linea
if (p.x < l.x1 && p.x < l.x2)
{
return false;
}
// Comprueba si está por encima de la linea
if (p.y > l.y1 && p.y > l.y2)
{
return false;
}
// Comprueba si está por debajo de la linea
if (p.y < l.y1 && p.y < l.y2)
{
return false;
}
// En caso contrario, el punto está en la linea
return true;
/*const int m = (l.y2 - l.y1) / (l.x2 - l.x1);
const int c = 0;
// Comprueba si p cumple la ecuación de la linea
if (p.y == ((m * p.x) + c))
return true;
return false;*/
}
// Devuelve un color_t a partir de un string
color_t stringToColor(std::string str)
{
const std::string palette = "spectrum";
if (palette == "spectrum")
{
if (str == "black")
{
return {0x00, 0x00, 0x00};
}
else if (str == "bright_black")
{
return {0x00, 0x00, 0x00};
}
else if (str == "blue")
{
return {0x00, 0x00, 0xd8};
}
else if (str == "bright_blue")
{
return {0x00, 0x00, 0xFF};
}
else if (str == "red")
{
return {0xd8, 0x00, 0x00};
}
else if (str == "bright_red")
{
return {0xFF, 0x00, 0x00};
}
else if (str == "magenta")
{
return {0xd8, 0x00, 0xd8};
}
else if (str == "bright_magenta")
{
return {0xFF, 0x00, 0xFF};
}
else if (str == "green")
{
return {0x00, 0xd8, 0x00};
}
else if (str == "bright_green")
{
return {0x00, 0xFF, 0x00};
}
else if (str == "cyan")
{
return {0x00, 0xd8, 0xd8};
}
else if (str == "bright_cyan")
{
return {0x00, 0xFF, 0xFF};
}
else if (str == "yellow")
{
return {0xd8, 0xd8, 0x00};
}
else if (str == "bright_yellow")
{
return {0xFF, 0xFF, 0x00};
}
else if (str == "white")
{
return {0xd8, 0xd8, 0xd8};
}
else if (str == "bright_white")
{
return {0xFF, 0xFF, 0xFF};
}
}
else
{ // zxarne
if (str == "black")
{
return {0x00, 0x00, 0x00};
}
else if (str == "bright_black")
{
return {0x3C, 0x35, 0x1F};
}
else if (str == "blue")
{
return {0x31, 0x33, 0x90};
}
else if (str == "bright_blue")
{
return {0x15, 0x59, 0xDB};
}
else if (str == "red")
{
return {0xA7, 0x32, 0x11};
}
else if (str == "bright_red")
{
return {0xD8, 0x55, 0x25};
}
else if (str == "magenta")
{
return {0xA1, 0x55, 0x89};
}
else if (str == "bright_magenta")
{
return {0xCD, 0x7A, 0x50};
}
else if (str == "green")
{
return {0x62, 0x9A, 0x31};
}
else if (str == "bright_green")
{
return {0x9C, 0xD3, 0x3C};
}
else if (str == "cyan")
{
return {0x28, 0xA4, 0xCB};
}
else if (str == "bright_cyan")
{
return {0x65, 0xDC, 0xD6};
}
else if (str == "yellow")
{
return {0xE8, 0xBC, 0x50};
}
else if (str == "bright_yellow")
{
return {0xF1, 0xE7, 0x82};
}
else if (str == "white")
{
return {0xBF, 0xBF, 0xBD};
}
else if (str == "bright_white")
{
return {0xF2, 0xF1, 0xED};
}
}
return {0x00, 0x00, 0x00};
}
// Convierte una cadena en un valor booleano
bool stringToBool(std::string str)
{
if (str == "true")
{
return true;
}
else
{
return false;
}
}
// Convierte un valor booleano en una cadena
std::string boolToString(bool value)
{
if (value)
{
return "true";
}
else
{
return "false";
}
}

117
source/common/utils.h Normal file
View File

@@ -0,0 +1,117 @@
#pragma once
#include <SDL2/SDL.h>
#include "texture.h"
#include <string>
#ifndef UTILS_H
#define UTILS_H
// Estructura para definir un circulo
struct circle_t
{
int x;
int y;
int r;
};
// Estructura para definir una linea horizontal
struct h_line_t
{
int x1, x2, y;
};
// Estructura para definir una linea vertical
struct v_line_t
{
int x, y1, y2;
};
// Estructura para definir una linea diagonal
struct d_line_t
{
int x1, y1, x2, y2;
};
// Estructura para definir una linea
struct line_t
{
int x1, y1, x2, y2;
};
// Estructura para definir un color
struct color_t
{
Uint8 r;
Uint8 g;
Uint8 b;
};
// Estructura para saber la seccion y subseccion del programa
struct section_t
{
Uint8 name;
Uint8 subsection;
};
// Estructura con todas las opciones de configuración del programa
struct options_t
{
Uint32 fullScreenMode; // Contiene el valor del modo de pantalla completa
int windowSize; // Contiene el valor por el que se multiplica el tamaño de la ventana
Uint32 filter; // Filtro usado para el escalado de la imagen
bool vSync; // Indica si se quiere usar vsync o no
int screenWidth; // Ancho de la pantalla o ventana
int screenHeight; // Alto de la pantalla o ventana
bool integerScale; // Indica si el escalado de la imagen ha de ser entero en el modo a pantalla completa
bool keepAspect; // Indica si se ha de mantener la relación de aspecto al poner el modo a pantalla completa
bool borderEnabled; // Indica si ha de mostrar el borde en el modo de ventana
float borderSize; // Porcentaje de borde que se añade a lo ventana
};
// Calcula el cuadrado de la distancia entre dos puntos
double distanceSquared(int x1, int y1, int x2, int y2);
// Detector de colisiones entre dos circulos
bool checkCollision(circle_t &a, circle_t &b);
// Detector de colisiones entre un circulo y un rectangulo
bool checkCollision(circle_t &a, SDL_Rect &b);
// Detector de colisiones entre un dos rectangulos
bool checkCollision(SDL_Rect &a, SDL_Rect &b);
// Detector de colisiones entre un punto y un rectangulo
bool checkCollision(SDL_Point &p, SDL_Rect &r);
// Detector de colisiones entre una linea horizontal y un rectangulo
bool checkCollision(h_line_t &l, SDL_Rect &r);
// Detector de colisiones entre una linea vertical y un rectangulo
bool checkCollision(v_line_t &l, SDL_Rect &r);
// Detector de colisiones entre una linea horizontal y un punto
bool checkCollision(h_line_t &l, SDL_Point &p);
// Detector de colisiones entre dos lineas
SDL_Point checkCollision(line_t &l1, line_t &l2);
// Detector de colisiones entre dos lineas
SDL_Point checkCollision(d_line_t &l1, v_line_t &l2);
// Detector de colisiones entre un punto y una linea diagonal
bool checkCollision(SDL_Point &p, d_line_t &l);
// Normaliza una linea diagonal
void normalizeLine(d_line_t &l);
// Devuelve un color_t a partir de un string
color_t stringToColor(std::string str);
// Convierte una cadena en un valor booleano
bool stringToBool(std::string str);
// Convierte un valor booleano en una cadena
std::string boolToString(bool value);
#endif

View File

@@ -1,18 +0,0 @@
#pragma once
#ifndef CONST_H
#define CONST_H
// Tamaño de bloque
#define BLOCK 16
#define HALF_BLOCK 8
// Tamaño de la pantalla real
#define SCREEN_WIDTH 320
#define SCREEN_HEIGHT 240
// Tamaño de la pantalla virtual
#define GAMECANVAS_WIDTH 320
#define GAMECANVAS_HEIGHT 240
#endif

512
source/director.cpp Normal file
View File

@@ -0,0 +1,512 @@
#include "director.h"
// Constructor
Director::Director(std::string path)
{
// Crea el objeto que controla los ficheros de recursos
asset = new Asset(path.substr(0, path.find_last_of("\\/")));
// Si falta algún fichero no inicia el programa
if (!setFileList())
{
section.name = SECTION_PROG_QUIT;
}
else
{
section.name = SECTION_PROG_GAME;
section.subsection = 0;
}
// Inicializa variables desde el fichero de configuración
loadConfig();
// Inicializa SDL
initSDL();
// Inicializa JailAudio
initJailAudio();
// Crea los objetos
input = new Input(asset->get("gamecontrollerdb.txt"));
initInput();
screen = new Screen(window, renderer, options, GAMECANVAS_WIDTH, GAMECANVAS_HEIGHT);
screen->setBorderColor(borderColor);
screen->setVideoMode(options->fullScreenMode);
debug = new Debug(renderer, screen, asset);
}
Director::~Director()
{
// Guarda las opciones de configuración
saveConfig();
delete options;
delete asset;
delete input;
delete screen;
delete debug;
SDL_DestroyRenderer(renderer);
SDL_DestroyWindow(window);
SDL_Quit();
}
// Carga el fichero de configuración
bool Director::loadConfig()
{
// Crea el puntero a la estructura de opciones e inicializa valores
options = new options_t;
options->fullScreenMode = 0;
options->windowSize = 3;
options->filter = FILTER_NEAREST;
options->vSync = true;
options->integerScale = true;
options->keepAspect = true;
options->borderEnabled = false;
options->borderSize = 0.1f;
// Indicador de éxito en la carga
bool success = true;
// Variables para manejar el fichero
std::string line;
std::ifstream file(asset->get("config.txt"));
// Si el fichero se puede abrir
if (file.good())
{
// Procesa el fichero linea a linea
printf("Reading file config.txt\n");
while (std::getline(file, line))
{
// Comprueba que la linea no sea un comentario
if (line.substr(0, 1) != "#")
{
// Encuentra la posición del caracter '='
int pos = line.find("=");
// Procesa las dos subcadenas
if (!setOptions(options, line.substr(0, pos), line.substr(pos + 1, line.length())))
{
printf("Warning: file %s\n, unknown parameter \"%s\"\n", "config.txt", line.substr(0, pos).c_str());
success = false;
}
}
}
// Cierra el fichero
printf("Closing file config.txt\n\n");
file.close();
}
// El fichero no existe
else
{ // Crea el fichero con los valores por defecto
saveConfig();
}
// Aplica opciones
if (options->borderEnabled)
{
const int incWidth = GAMECANVAS_WIDTH * options->borderSize;
const int incHeight = GAMECANVAS_HEIGHT * options->borderSize;
options->screenWidth = (GAMECANVAS_WIDTH + incWidth) * options->windowSize;
options->screenHeight = (GAMECANVAS_HEIGHT + incHeight) * options->windowSize;
}
else
{
options->screenWidth = GAMECANVAS_WIDTH * options->windowSize;
options->screenHeight = GAMECANVAS_HEIGHT * options->windowSize;
}
return success;
}
// Guarda el fichero de configuración
bool Director::saveConfig()
{
bool success = true;
// Crea y abre el fichero de texto
std::ofstream file(asset->get("config.txt"));
// Escribe en el fichero
if (options->fullScreenMode == 0)
{
file << "fullScreenMode=0\n";
}
else if (options->fullScreenMode == SDL_WINDOW_FULLSCREEN)
{
file << "fullScreenMode=SDL_WINDOW_FULLSCREEN\n";
}
else if (options->fullScreenMode == SDL_WINDOW_FULLSCREEN_DESKTOP)
{
file << "fullScreenMode=SDL_WINDOW_FULLSCREEN_DESKTOP\n";
}
file << "windowSize=" + std::to_string(options->windowSize) + "\n";
if (options->filter == FILTER_NEAREST)
{
file << "filter=FILTER_NEAREST\n";
}
else
{
file << "filter=FILTER_LINEAL\n";
}
file << "vSync=" + boolToString(options->vSync) + "\n";
file << "integerScale=" + boolToString(options->integerScale) + "\n";
file << "keepAspect=" + boolToString(options->keepAspect) + "\n";
file << "borderEnabled=" + boolToString(options->borderEnabled) + "\n";
file << "borderSize=" + std::to_string(options->borderSize) + "\n";
// Cierra el fichero
file.close();
return success;
}
// Asigna variables a partir de dos cadenas
bool Director::setOptions(options_t *options, std::string var, std::string value)
{
// Indicador de éxito en la asignación
bool success = true;
if (var == "fullScreenMode")
{
if (value == "SDL_WINDOW_FULLSCREEN_DESKTOP")
{
options->fullScreenMode = SDL_WINDOW_FULLSCREEN_DESKTOP;
}
else if (value == "SDL_WINDOW_FULLSCREEN")
{
options->fullScreenMode = SDL_WINDOW_FULLSCREEN;
}
else
{
options->fullScreenMode = 0;
}
}
else if (var == "windowSize")
{
options->windowSize = std::stoi(value);
if ((options->windowSize < 1) || (options->windowSize > 4))
{
options->windowSize = 3;
}
}
else if (var == "filter")
{
if (value == "FILTER_LINEAL")
{
options->filter = FILTER_LINEAL;
}
else
{
options->filter = FILTER_NEAREST;
}
}
else if (var == "vSync")
{
options->vSync = stringToBool(value);
}
else if (var == "integerScale")
{
options->integerScale = stringToBool(value);
}
else if (var == "keepAspect")
{
options->keepAspect = stringToBool(value);
}
else if (var == "borderEnabled")
{
options->borderEnabled = stringToBool(value);
}
else if (var == "borderSize")
{
options->borderSize = std::stof(value);
if (options->borderSize < 0.0f || options->borderSize > 0.5f)
{
options->borderSize = 0.1f;
}
}
else if (var == "")
{
}
else
{
success = false;
}
return success;
}
// Inicializa JailAudio
void Director::initJailAudio()
{
JA_Init(44100, AUDIO_S16, 2);
}
// Arranca SDL y crea la ventana
bool Director::initSDL()
{
// Indicador de éxito
bool success = true;
// Inicializa SDL
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_GAMECONTROLLER | SDL_INIT_AUDIO) < 0)
{
printf("SDL could not initialize!\nSDL Error: %s\n", SDL_GetError());
success = false;
}
else
{
// Inicia el generador de numeros aleatorios
std::srand(static_cast<unsigned int>(SDL_GetTicks()));
// Establece el filtro de la textura
if (!SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, std::to_string(options->filter).c_str()))
{
printf("Warning: Nearest texture filtering not enabled!\n");
}
// Crea la ventana
window = SDL_CreateWindow(WINDOW_CAPTION, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, options->screenWidth, options->screenHeight, SDL_WINDOW_SHOWN | SDL_WINDOW_ALLOW_HIGHDPI);
if (window == NULL)
{
printf("Window could not be created!\nSDL Error: %s\n", SDL_GetError());
success = false;
}
else
{
// Crea un renderizador para la ventana. El vsync se activa en funcion de las opciones
if (options->vSync)
renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);
else
renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED);
if (renderer == NULL)
{
printf("Renderer could not be created!\nSDL Error: %s\n", SDL_GetError());
success = false;
}
else
{
// Inicializa el color de renderizado
SDL_SetRenderDrawColor(renderer, 0x00, 0x00, 0x00, 0xFF);
// Establece el tamaño del buffer de renderizado
SDL_RenderSetLogicalSize(renderer, options->screenWidth, options->screenHeight);
// Establece el modo de mezcla
SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_BLEND);
}
}
}
printf("SDL is running...\n");
return success;
}
// Inicia las variables necesarias para arrancar el programa
void Director::initInput()
{
// Inicializa los controles
input->bindKey(INPUT_UP, SDL_SCANCODE_UP);
input->bindKey(INPUT_DOWN, SDL_SCANCODE_DOWN);
input->bindKey(INPUT_LEFT, SDL_SCANCODE_LEFT);
input->bindKey(INPUT_RIGHT, SDL_SCANCODE_RIGHT);
input->bindKey(INPUT_ACCEPT, SDL_SCANCODE_RETURN);
input->bindKey(INPUT_CANCEL, SDL_SCANCODE_ESCAPE);
input->bindKey(INPUT_BUTTON_1, SDL_SCANCODE_SPACE);
input->bindKey(INPUT_BUTTON_2, SDL_SCANCODE_D);
input->bindKey(INPUT_BUTTON_3, SDL_SCANCODE_R);
input->bindKey(INPUT_BUTTON_PAUSE, SDL_SCANCODE_ESCAPE);
input->bindKey(INPUT_BUTTON_ESCAPE, SDL_SCANCODE_ESCAPE);
input->bindGameControllerButton(INPUT_UP, SDL_CONTROLLER_BUTTON_DPAD_UP);
input->bindGameControllerButton(INPUT_DOWN, SDL_CONTROLLER_BUTTON_DPAD_DOWN);
input->bindGameControllerButton(INPUT_LEFT, SDL_CONTROLLER_BUTTON_DPAD_LEFT);
input->bindGameControllerButton(INPUT_RIGHT, SDL_CONTROLLER_BUTTON_DPAD_RIGHT);
input->bindGameControllerButton(INPUT_ACCEPT, SDL_CONTROLLER_BUTTON_B);
input->bindGameControllerButton(INPUT_CANCEL, SDL_CONTROLLER_BUTTON_A);
input->bindGameControllerButton(INPUT_BUTTON_1, SDL_CONTROLLER_BUTTON_B);
input->bindGameControllerButton(INPUT_BUTTON_PAUSE, SDL_CONTROLLER_BUTTON_GUIDE);
input->bindGameControllerButton(INPUT_BUTTON_ESCAPE, SDL_CONTROLLER_BUTTON_GUIDE);
}
// Crea el indice de ficheros de recursos
bool Director::setFileList()
{
// Ficheros del mapa
asset->add("/../data/map/01.map", t_data);
asset->add("/../data/map/01.tmx", t_data);
asset->add("/../data/map/01.ene", t_data);
asset->add("/../data/map/02.map", t_data);
asset->add("/../data/map/02.tmx", t_data);
asset->add("/../data/map/02.ene", t_data);
asset->add("/../data/map/03.map", t_data);
asset->add("/../data/map/03.tmx", t_data);
asset->add("/../data/map/03.ene", t_data);
asset->add("/../data/map/04.map", t_data);
asset->add("/../data/map/04.tmx", t_data);
asset->add("/../data/map/04.ene", t_data);
asset->add("/../data/map/05.map", t_data);
asset->add("/../data/map/05.tmx", t_data);
asset->add("/../data/map/06.map", t_data);
asset->add("/../data/map/06.tmx", t_data);
asset->add("/../data/map/07.map", t_data);
asset->add("/../data/map/07.tmx", t_data);
asset->add("/../data/map/08.map", t_data);
asset->add("/../data/map/08.tmx", t_data);
asset->add("/../data/map/09.map", t_data);
asset->add("/../data/map/09.tmx", t_data);
asset->add("/../data/map/10.map", t_data);
asset->add("/../data/map/10.tmx", t_data);
asset->add("/../data/map/tiles_surface.png", t_bitmap);
// Ficheros de configuración
asset->add("/../data/config/config.txt", t_data, false);
asset->add("/../data/input/gamecontrollerdb.txt", t_data);
// Ficheros del jugador
asset->add("/../data/player/player.png", t_bitmap);
asset->add("/../data/player/player.ani", t_data);
// Ficheros de sonido
asset->add("/../data/sound/sound_player_coin.wav", t_sound);
asset->add("/../data/sound/sound_player_death.wav", t_sound);
asset->add("/../data/sound/sound_drop_enemy.wav", t_sound);
asset->add("/../data/sound/sound_drop_splat.wav", t_sound);
asset->add("/../data/sound/sound_player_jump.wav", t_sound);
asset->add("/../data/sound/sound_menu_logo.wav", t_sound);
asset->add("/../data/sound/sound_menu_start.wav", t_sound);
asset->add("/../data/sound/sound_menu_select.wav", t_sound);
asset->add("/../data/sound/sound_menu_cancel.wav", t_sound);
asset->add("/../data/sound/sound_menu_move.wav", t_sound);
// Ficheros con musica
asset->add("/../data/music/music_title.ogg", t_music);
asset->add("/../data/music/music_surface.ogg", t_music);
asset->add("/../data/music/music_volcano.ogg", t_music);
// Ficheros de fuentes de texto
asset->add("/../data/font/debug.png", t_font);
asset->add("/../data/font/debug.txt", t_font);
asset->add("/../data/font/dogica.png", t_font);
asset->add("/../data/font/dogica.txt", t_font);
asset->add("/../data/font/smb2.png", t_font);
asset->add("/../data/font/smb2.txt", t_font);
// Ficheros de enemigos
asset->add("/../data/actors/enemies/gusano.png", t_bitmap);
asset->add("/../data/actors/enemies/gusano.ani", t_data);
asset->add("/../data/actors/enemies/limon.png", t_bitmap);
asset->add("/../data/actors/enemies/limon.ani", t_data);
asset->add("/../data/actors/enemies/manzana.png", t_bitmap);
asset->add("/../data/actors/enemies/manzana.ani", t_data);
asset->add("/../data/actors/enemies/pulga.png", t_bitmap);
asset->add("/../data/actors/enemies/pulga.ani", t_data);
asset->add("/../data/actors/enemies/setita.png", t_bitmap);
asset->add("/../data/actors/enemies/setita.ani", t_data);
asset->add("/../data/actors/enemies/setita_venenosa.png", t_bitmap);
asset->add("/../data/actors/enemies/setita_venenosa.ani", t_data);
asset->add("/../data/actors/enemies/seton.png", t_bitmap);
asset->add("/../data/actors/enemies/seton.ani", t_data);
// Ficheros de actores
asset->add("/../data/actors/moving_platform.png", t_bitmap);
asset->add("/../data/actors/moving_platform.ani", t_data);
asset->add("/../data/actors/items/diamond.png", t_bitmap);
asset->add("/../data/actors/items/diamond.ani", t_data);
// Ficheros del logo
asset->add("/../data/logo/logo.png", t_bitmap);
// Ficheros de la intro
asset->add("/../data/intro/intro.png", t_bitmap);
asset->add("/../data/intro/intro.ani", t_data);
// Ficheros de menu
asset->add("/../data/menu/title.men", t_data);
return asset->check();
}
// Obtiene el valor de la variable
Uint8 Director::getSection()
{
return section.name;
}
// Establece el valor de la variable
void Director::setSection(section_t section)
{
this->section = section;
}
// Ejecuta la seccion de juego con el logo
void Director::runLogo()
{
logo = new Logo(renderer, screen, asset);
setSection(logo->run());
delete logo;
}
// Ejecuta la seccion de juego de la introducción
void Director::runIntro()
{
intro = new Intro(renderer, screen, asset);
setSection(intro->run());
delete intro;
}
// Ejecuta la seccion de juego con el titulo y los menus
void Director::runTitle()
{
title = new Title(renderer, screen, asset, input);
setSection(title->run());
delete title;
}
// Ejecuta la seccion de juego donde se juega
void Director::runGame()
{
game = new Game(renderer, screen, asset, input, debug);
setSection(game->run());
delete game;
}
void Director::run()
{
// Bucle principal
while (!(getSection() == SECTION_PROG_QUIT))
{
switch (getSection())
{
case SECTION_PROG_LOGO:
runLogo();
break;
case SECTION_PROG_INTRO:
runIntro();
break;
case SECTION_PROG_TITLE:
runTitle();
break;
case SECTION_PROG_GAME:
runGame();
break;
}
}
}

View File

@@ -1,39 +1,52 @@
#pragma once
#include <SDL2/SDL.h>
#include <string>
#include "asset.h"
#include "jail_audio.h"
#include "common/asset.h"
#include "common/const.h"
#include "common/debug.h"
#include "common/input.h"
#include "common/jail_audio.h"
#include "common/screen.h"
#include "common/utils.h"
#include "game.h"
#include "input.h"
#include "utils.h"
#include "screen.h"
#include "logo.h"
#include "intro.h"
#include "logo.h"
#include "title.h"
#include "prog.h"
#include <string>
#ifndef PROG_H
#define PROG_H
// Textos
#define WINDOW_CAPTION "Volcano"
#define GAME_WIDTH 320
#define GAME_HEIGHT 240
class Prog
class Director
{
private:
SDL_Window *window; // La ventana donde dibujamos
SDL_Renderer *renderer; // El renderizador de la ventana
// Objetos y punteros
Asset *asset; // Objeto encargado de gestionar los ficheros de recursos
Screen *screen; // Objeto encargado de dibujar en pantalla
Input *input; // Objeto Input para gestionar las entradas
Debug *debug; // Objeto para getsionar la información de debug
Game *game; // Objeto para la sección del juego
Input *input; // Objeto Input para gestionar las entradas
Intro *intro; // Objeto encargado de gestionar la intro del juego
Logo *logo; // Objeto encargado de gestionar el logo del juego
Title *title; // Objeto encargado de gestionar el titulo del juego, con el menu principal
section_t section; // Sección y subsección actual del programa;
Screen *screen; // Objeto encargado de dibujar en pantalla
SDL_Renderer *renderer; // El renderizador de la ventana
SDL_Window *window; // La ventana donde dibujamos
struct options_t *options; // Contiene las opciones del programa
Title *title; // Objeto encargado de gestionar el titulo del juego, con el menu principal
// Variables
section_t section; // Sección y subsección actual del programa;
// Carga el fichero de configuración
bool loadConfig();
// Guarda el fichero de configuración
bool saveConfig();
// Asigna variables a partir de dos cadenas
bool setOptions(options_t *options, std::string var, std::string value);
// Inicializa jail_audio
void initJailAudio();
@@ -41,6 +54,9 @@ private:
// Arranca SDL y crea la ventana
bool initSDL();
// Inicializa el objeto Input
void initInput();
// Crea el indice de ficheros
bool setFileList();
@@ -67,10 +83,10 @@ private:
public:
// Constructor
Prog(std::string executablePath);
Director(std::string path);
// Destructor
~Prog();
~Director();
// Bucle principal
void run();

View File

@@ -15,8 +15,7 @@ Enemy::Enemy(enemy_t enemy)
renderer = enemy.renderer;
// Crea objetos
texture = new LTexture();
loadTextureFromFile(texture, asset->get(enemy.tileset), renderer);
texture = new Texture(renderer, asset->get(enemy.tileset));
sprite = new AnimatedSprite(texture, renderer, asset->get(enemy.animation));
// Obten el resto de valores
@@ -27,7 +26,6 @@ Enemy::Enemy(enemy_t enemy)
sprite->setVelX(enemy.vx);
sprite->setVelY(enemy.vy);
sprite->setCurrentAnimation();
sprite->setFlip(enemy.vx > 0 ? SDL_FLIP_NONE : SDL_FLIP_HORIZONTAL);
collider = getRect();

Some files were not shown because too many files have changed in this diff Show More