Añadidas nuevas pantallas (de la 7 a la 10)

This commit is contained in:
2022-09-12 20:40:23 +02:00
parent 6b7769ca3c
commit 415080ba8f
16 changed files with 248 additions and 58 deletions

View File

@@ -23,8 +23,8 @@ vy=0.3
x1=1
y1=0
x2=1
y2=6
color=red
y2=5
color=magenta
[/enemy]
[enemy]
@@ -40,7 +40,7 @@ x1=5
y1=9
x2=22
y2=9
color=yellow
color=white
[/enemy]
[item]
@@ -48,7 +48,7 @@ tileset=items.png
tile=1
x=1
y=7
counter=6
counter=1
[/item]
[item]
@@ -56,47 +56,5 @@ tileset=items.png
tile=1
x=17
y=8
counter=7
[/item]
[item]
tileset=items.png
tile=1
x=12
y=12
counter=1
[/item]
[item]
tileset=items.png
tile=1
x=13
y=12
counter=2
[/item]
[item]
tileset=items.png
tile=1
x=14
y=12
counter=3
[/item]
[item]
tileset=items.png
tile=1
x=15
y=12
counter=4
[/item]
[item]
tileset=items.png
tile=1
x=16
y=12
counter=5
[/item]

View File

@@ -24,12 +24,12 @@ x1=14
y1=0
x2=14
y2=12
color=magenta
color=cyan
[/enemy]
[item]
tileset=items.png
tile=1
tile=7
x=19
y=6
y=5
[/item]

View File

@@ -4,7 +4,7 @@ border=blue
tileset=standard.png
roomUp=02.room
roomDown=0
roomLeft=0
roomLeft=07.room
roomRight=05.room
[tilemap]

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.9" tiledversion="1.9.0" orientation="orthogonal" renderorder="right-down" width="32" height="16" tilewidth="8" tileheight="8" infinite="0" nextlayerid="2" nextobjectid="1">
<map version="1.9" tiledversion="1.9.1" orientation="orthogonal" renderorder="right-down" width="32" height="16" tilewidth="8" tileheight="8" infinite="0" nextlayerid="2" nextobjectid="1">
<tileset firstgid="1" source="../../../jaildoctors_dilemma_resources/tilesets/standard.tsx"/>
<layer id="1" name="Capa de patrones 1" width="32" height="16">
<data encoding="csv">
@@ -16,8 +16,8 @@
25,0,0,0,0,229,229,229,229,229,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,
25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,
25,249,249,249,249,249,249,249,249,249,249,249,249,249,249,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,
22,0,0,0,0,0,289,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
22,0,0,0,0,0,289,0,0,0,0,0,0,0,0,0,0,0,381,0,0,0,0,0,0,381,0,0,0,0,0,0,
0,0,0,0,0,0,289,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,289,0,0,0,0,0,0,0,0,0,0,0,381,0,0,0,0,0,0,381,0,0,0,0,0,0,
25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25
</data>
</layer>

92
data/room/07.room Normal file
View File

@@ -0,0 +1,92 @@
name=chirping
bgColor=black
border=magenta
tileset=standard.png
roomUp=0
roomDown=0
roomLeft=08.room
roomRight=04.room
[tilemap]
07.tmx
[/tilemap]
[enemy]
tileset=paco.png
animation=paco.ani
width=16
height=16
x=4
y=2
vx=0
vy=0.5
x1=4
y1=2
x2=4
y2=12
color=yellow
[/enemy]
[enemy]
tileset=paco.png
animation=paco.ani
width=16
height=16
x=9
y=11
vx=0
vy=-0.5
x1=9
y1=2
x2=9
y2=12
color=green
[/enemy]
[enemy]
tileset=paco.png
animation=paco.ani
width=16
height=16
x=26
y=5
vx=0
vy=-0.5
x1=26
y1=2
x2=26
y2=12
color=white
[/enemy]
[item]
tileset=items.png
tile=10
x=2
y=8
counter=1
[/item]
[item]
tileset=items.png
tile=10
x=2
y=3
counter=2
[/item]
[item]
tileset=items.png
tile=10
x=29
y=8
counter=3
[/item]
[item]
tileset=items.png
tile=10
x=29
y=3
counter=4
[/item]

24
data/room/07.tmx Normal file
View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.9" tiledversion="1.9.1" orientation="orthogonal" renderorder="right-down" width="32" height="16" tilewidth="8" tileheight="8" infinite="0" nextlayerid="2" nextobjectid="1">
<tileset firstgid="1" source="../../../jaildoctors_dilemma_resources/tilesets/standard.tsx"/>
<layer id="1" name="Capa de patrones 1" width="32" height="16">
<data encoding="csv">
73,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,73,
73,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,73,
73,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,73,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,73,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,73,
73,345,345,345,0,0,345,345,345,0,0,345,345,345,345,345,345,345,345,345,345,0,0,162,345,345,0,0,345,345,345,73,
73,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,162,0,0,0,0,0,0,0,0,73,
73,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,162,0,0,0,0,0,0,0,0,0,73,
73,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,162,0,0,0,0,0,0,0,0,0,0,73,
73,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,162,0,0,0,0,0,0,0,0,0,0,0,73,
73,345,345,345,0,0,345,345,345,0,0,345,345,345,182,0,0,345,345,345,345,345,345,345,345,345,0,0,345,345,345,73,
73,0,0,0,0,0,0,0,0,0,0,0,0,0,0,182,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,73,
73,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,182,0,0,0,0,0,0,0,0,0,0,0,0,0,0,73,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,182,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,182,0,0,0,0,0,0,0,0,0,0,0,0,0,
73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73,73
</data>
</layer>
</map>

12
data/room/08.room Normal file
View File

@@ -0,0 +1,12 @@
name=still thinking
bgColor=black
border=blue
tileset=standard.png
roomUp=0
roomDown=09.room
roomLeft=10.room
roomRight=07.room
[tilemap]
08.tmx
[/tilemap]

24
data/room/08.tmx Normal file
View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.9" tiledversion="1.9.1" orientation="orthogonal" renderorder="right-down" width="32" height="16" tilewidth="8" tileheight="8" infinite="0" nextlayerid="2" nextobjectid="1">
<tileset firstgid="1" source="../../../jaildoctors_dilemma_resources/tilesets/standard.tsx"/>
<layer id="1" name="Capa de patrones 1" width="32" height="16">
<data encoding="csv">
33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,
33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,
33,33,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33,33,
33,33,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
33,33,341,341,341,0,0,341,341,341,341,341,0,0,341,341,341,341,341,341,341,341,341,341,341,341,0,0,0,0,0,0,
33,33,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,162,33,33,33,33,33,
33,33,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,162,0,0,0,0,33,33,
33,33,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,162,0,0,0,0,0,33,33,
33,33,341,341,341,0,0,341,341,341,341,341,0,0,341,341,341,341,341,341,341,341,341,162,0,0,0,0,0,0,33,33,
33,33,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,162,0,0,0,0,0,0,0,33,33,
33,33,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,162,0,0,0,0,0,0,0,0,33,33,
33,33,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,162,0,0,0,0,0,0,0,0,0,33,33,
33,33,351,351,351,0,0,351,351,351,351,351,0,0,351,351,351,351,351,351,0,0,0,0,0,0,0,0,0,0,33,33,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
351,351,351,351,351,351,351,351,351,351,351,351,351,351,351,351,351,351,0,0,351,351,351,351,351,351,351,351,351,351,351,351
</data>
</layer>
</map>

12
data/room/09.room Normal file
View File

@@ -0,0 +1,12 @@
name=slope test
bgColor=blue
border=blue
tileset=standard.png
roomUp=08.room
roomDown=0
roomLeft=0
roomRight=0
[tilemap]
09.tmx
[/tilemap]

24
data/room/09.tmx Normal file
View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.9" tiledversion="1.9.1" orientation="orthogonal" renderorder="right-down" width="32" height="16" tilewidth="8" tileheight="8" infinite="0" nextlayerid="2" nextobjectid="1">
<tileset firstgid="1" source="../../../jaildoctors_dilemma_resources/tilesets/standard.tsx"/>
<layer id="1" name="Capa de patrones 1" width="32" height="16">
<data encoding="csv">
54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,0,0,0,163,54,54,54,54,54,54,54,54,54,54,54,54,
54,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,163,0,0,0,0,0,0,0,0,0,0,0,0,54,
54,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,163,0,0,0,0,0,0,0,0,0,0,0,0,0,54,
54,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,163,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,
54,0,0,0,0,0,0,0,0,0,0,0,0,0,0,163,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,
54,0,0,0,0,0,0,0,0,0,0,0,0,0,163,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,
54,0,0,0,0,0,0,0,0,0,0,0,0,163,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,
54,0,0,0,0,0,0,0,0,0,0,0,163,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,
54,0,0,0,0,0,0,0,0,0,0,163,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,
54,0,0,0,0,0,0,0,0,0,163,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,
54,0,0,0,0,0,0,0,0,163,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,
54,0,0,0,0,0,0,0,163,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,
54,0,0,0,0,0,0,163,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,
54,0,0,0,0,0,163,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,
54,0,0,0,0,163,0,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,
54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54
</data>
</layer>
</map>

12
data/room/10.room Normal file
View File

@@ -0,0 +1,12 @@
name=welcome to the jail
bgColor=black
border=black
tileset=standard.png
roomUp=0
roomDown=0
roomLeft=0
roomRight=08.room
[tilemap]
10.tmx
[/tilemap]

24
data/room/10.tmx Normal file
View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.9" tiledversion="1.9.1" orientation="orthogonal" renderorder="right-down" width="32" height="16" tilewidth="8" tileheight="8" infinite="0" nextlayerid="2" nextobjectid="1">
<tileset firstgid="1" source="../../../jaildoctors_dilemma_resources/tilesets/standard.tsx"/>
<layer id="1" name="Capa de patrones 1" width="32" height="16">
<data encoding="csv">
94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,
94,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,94,0,0,0,0,0,0,0,0,0,0,0,0,0,0,94,
94,0,0,127,127,0,127,127,127,0,127,0,127,0,0,0,94,0,0,0,0,0,0,0,0,0,0,0,0,0,0,94,
94,0,0,0,127,0,127,0,127,0,127,0,127,0,0,0,94,0,0,0,0,0,0,0,0,0,0,0,0,0,0,94,
94,0,127,0,127,0,127,127,127,0,127,0,127,0,0,0,94,0,0,0,0,0,0,0,0,0,0,0,0,0,0,94,
94,0,127,127,127,0,127,0,127,0,127,0,127,127,127,0,94,0,0,0,0,0,0,0,0,0,0,0,0,0,0,94,
94,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,94,0,0,0,0,0,0,0,0,0,0,0,0,0,0,94,
94,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,94,0,0,0,0,0,0,0,0,0,0,0,0,0,0,94,
94,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,94,0,0,0,0,0,0,0,0,0,0,0,0,0,0,94,
94,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,94,0,0,0,0,0,0,0,0,0,0,0,0,0,0,94,
94,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,94,0,0,0,0,0,0,0,0,0,0,0,0,0,0,94,
94,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,94,0,0,0,0,0,0,0,0,0,0,0,0,0,0,94,
94,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,94,0,0,0,0,0,0,0,0,0,0,0,0,0,0,94,
94,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,27,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
94,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,27,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94
</data>
</layer>
</map>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@@ -356,12 +356,20 @@ bool Director::setFileList()
asset->add("/data/room/04.room", room);
asset->add("/data/room/05.room", room);
asset->add("/data/room/06.room", room);
asset->add("/data/room/07.room", room);
asset->add("/data/room/08.room", room);
asset->add("/data/room/09.room", room);
asset->add("/data/room/10.room", room);
asset->add("/data/room/01.tmx", room);
asset->add("/data/room/02.tmx", room);
asset->add("/data/room/03.tmx", room);
asset->add("/data/room/04.tmx", room);
asset->add("/data/room/05.tmx", room);
asset->add("/data/room/06.tmx", room);
asset->add("/data/room/07.tmx", room);
asset->add("/data/room/08.tmx", room);
asset->add("/data/room/09.tmx", room);
asset->add("/data/room/10.tmx", room);
asset->add("/media/tilesets/standard.png", bitmap);

View File

@@ -14,7 +14,7 @@ Item::Item(item_t item)
sprite = new Sprite(item.x, item.y, 8, 8, texture, renderer);
// Inicia variables
sprite->setSpriteClip(item.tile * 8, 0, 8, 8);
sprite->setSpriteClip((item.tile % 10) * 8, (item.tile / 10) * 8, 8, 8);
collider = sprite->getRect();
colorChangeSpeed = 4;
counter = item.counter * colorChangeSpeed;

View File

@@ -612,8 +612,8 @@ tile_e Room::getTile(SDL_Point point)
return t_slope_l;
}
// Las filas 10-14 son de tiles t_passable
if ((tilemap[pos] >= 10 * tilesetWidth) && (tilemap[pos] < 15 * tilesetWidth))
// Las filas 10-18 son de tiles t_passable
if ((tilemap[pos] >= 10 * tilesetWidth) && (tilemap[pos] < 19 * tilesetWidth))
{
return t_passable;
}
@@ -648,8 +648,8 @@ tile_e Room::getTile(int index)
return t_slope_l;
}
// Las filas 10-14 son de tiles t_passable
if ((tilemap[index] >= 10 * tilesetWidth) && (tilemap[index] < 15 * tilesetWidth))
// Las filas 10-18 son de tiles t_passable
if ((tilemap[index] >= 10 * tilesetWidth) && (tilemap[index] < 19 * tilesetWidth))
{
return t_passable;
}