diff --git a/data/items/items.png b/data/items/items.png index 354245c..35161d1 100644 Binary files a/data/items/items.png and b/data/items/items.png differ diff --git a/data/room/06.room b/data/room/06.room index 765e582..062aa66 100644 --- a/data/room/06.room +++ b/data/room/06.room @@ -1,4 +1,4 @@ -name=welcome to my abbey +name=WELCOME TO MY ABBEY bgColor=blue border=yellow tileMapFile=06.tmx @@ -7,8 +7,8 @@ roomUp=15.room roomDown=0 roomLeft=05.room roomRight=25.room -itemColor1=yellow -itemColor2=cyan +itemColor1=green +itemColor2=bright_blue [enemy] tileSetFile=abad.png @@ -21,15 +21,15 @@ vx=0.8 vy=0 x1=1 y1=13 -x2=30 +x2=25 y2=13 color=yellow flip=true [/enemy] [enemy] -tileSetFile=wave_v.png -animation=wave_v.ani +tileSetFile=spider.png +animation=spider.ani width=8 height=8 x=24 @@ -40,12 +40,12 @@ x1=24 y1=2 x2=24 y2=7 -color=yellow +color=green [/enemy] [item] tileSetFile=items.png -tile=48 +tile=49 x=7 y=2 counter=1 @@ -53,7 +53,7 @@ counter=1 [item] tileSetFile=items.png -tile=48 +tile=49 x=1 y=14 counter=2 @@ -61,8 +61,24 @@ counter=2 [item] tileSetFile=items.png -tile=48 +tile=49 +x=18 +y=14 +counter=3 +[/item] + +[item] +tileSetFile=items.png +tile=49 x=30 y=9 -counter=3 +counter=4 +[/item] + +[item] +tileSetFile=items.png +tile=49 +x=30 +y=4 +counter=5 [/item] \ No newline at end of file diff --git a/data/room/06.tmx b/data/room/06.tmx index 6a1262b..630dca9 100644 --- a/data/room/06.tmx +++ b/data/room/06.tmx @@ -3,21 +3,21 @@ -32,32,32,32,0,0,0,0,32,32,67,68,67,68,67,68,67,68,67,68,67,68,67,68,67,68,67,68,67,68,67,68, -32,32,0,0,0,0,0,0,0,0,91,92,91,92,91,92,91,92,91,92,91,92,91,92,91,92,91,92,91,92,91,92, +426,427,426,427,0,0,0,0,426,427,67,68,67,68,67,68,67,68,67,68,67,68,67,68,67,68,67,68,67,68,67,68, +427,426,427,0,0,0,0,0,0,0,91,92,91,92,91,92,91,92,91,92,91,92,91,92,91,92,91,92,91,92,91,92, 93,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,93, 117,0,0,0,426,427,426,427,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,117, 117,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,117, -117,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,117, -141,0,0,426,427,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,117, -32,0,0,0,426,427,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,117, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,526,403,403,403,403,403,550,0,0,0,117, +117,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,526,403,404,404,117, +141,0,0,426,427,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,526,0,0,0,0,117, +32,0,0,0,426,427,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,526,0,0,0,0,0,117, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,526,403,404,404,404,405,550,0,0,0,117, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,526,0,0,0,0,0,0,0,550,0,0,117, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,526,0,0,0,0,0,0,0,0,0,403,403,117, -32,67,68,67,68,403,403,403,403,403,403,0,0,0,526,67,68,67,68,67,68,67,68,0,0,0,0,0,0,0,140,141, -32,91,92,91,92,0,0,0,0,0,0,0,0,526,0,91,92,91,92,91,92,91,92,0,0,0,0,0,0,0,0,32, -135,0,0,0,0,0,0,0,0,0,0,0,526,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -135,0,0,0,0,0,0,0,0,0,0,526,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,556,0,0,0,0,0,0,0,0,0,0,526,0,0,0,0,0,0,0,0,0,403,404,117, +32,67,68,67,68,404,404,404,404,404,405,0,0,0,403,67,68,67,68,67,68,67,68,405,0,0,0,0,0,0,140,141, +32,91,92,91,92,0,0,0,0,0,0,0,0,0,0,91,92,91,92,91,92,91,92,0,0,0,0,0,0,0,0,32, +135,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,428,0,0,0,0,0,0,0, +135,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,556,0,0,0,0,0, 89,90,89,90,89,90,89,90,89,90,89,90,89,90,89,90,89,90,89,90,89,90,89,90,89,90,89,90,89,90,89,90 diff --git a/data/room/25.room b/data/room/25.room index 419c167..b0bb2b9 100644 --- a/data/room/25.room +++ b/data/room/25.room @@ -1,4 +1,4 @@ -name=no 25 +name=THE CHAPPEL bgColor=blue border=yellow tileMapFile=25.tmx @@ -15,15 +15,15 @@ tileSetFile=batman_bell.png animation=batman_bell.ani width=16 height=16 -x=14 -y=12 +x=28 +y=13 vx=0 vy=0 -x1=14 -y1=12 -x2=14 -y2=12 -color=bright_cyan +x1=28 +y1=13 +x2=28 +y2=13 +color=cyan [/enemy] [enemy] @@ -31,290 +31,97 @@ tileSetFile=bell.png animation=bell.ani width=16 height=16 -x=14 -y=2 +x=28 +y=10 vx=0 vy=0 -x1=14 -y1=2 -x2=14 -y2=2 -color=yellow -[/enemy] - -[enemy] -tileSetFile=chip.png -animation=chip.ani -width=8 -height=16 -x=5 -y=3 -vx=0 -vy=0 -x1=5 -y1=3 -x2=5 -y2=3 -color=bright_blue -[/enemy] - -[enemy] -tileSetFile=chip.png -animation=chip.ani -width=8 -height=16 -x=6 -y=3 -vx=0 -vy=0 -x1=6 -y1=3 -x2=6 -y2=3 -color=bright_red -[/enemy] - -[enemy] -tileSetFile=chip.png -animation=chip.ani -width=8 -height=16 -x=7 -y=3 -vx=0 -vy=0 -x1=7 -y1=3 -x2=7 -y2=3 -color=bright_magenta -[/enemy] - -[enemy] -tileSetFile=chip.png -animation=chip.ani -width=8 -height=16 -x=8 -y=3 -vx=0 -vy=0 -x1=8 -y1=3 -x2=8 -y2=3 -color=bright_green -[/enemy] - - -[enemy] -tileSetFile=chip.png -animation=chip.ani -width=8 -height=16 -x=9 -y=3 -vx=0 -vy=0 -x1=9 -y1=3 -x2=9 -y2=3 -color=bright_cyan -[/enemy] - - -[enemy] -tileSetFile=chip.png -animation=chip.ani -width=8 -height=16 -x=10 -y=3 -vx=0 -vy=0 -x1=10 -y1=3 -x2=10 -y2=3 -color=bright_yellow -[/enemy] - - -[enemy] -tileSetFile=chip.png -animation=chip.ani -width=8 -height=16 -x=11 -y=3 -vx=0 -vy=0 -x1=11 -y1=3 -x2=11 -y2=3 -color=bright_white -[/enemy] - -[enemy] -tileSetFile=chip.png -animation=chip.ani -width=8 -height=16 -x=12 -y=3 -vx=0 -vy=0 -x1=12 -y1=3 -x2=12 -y2=3 -color=bright_black -[/enemy] - -[enemy] -tileSetFile=chip.png -animation=chip.ani -width=8 -height=16 -x=5 -y=7 -vx=0 -vy=0 -x1=5 -y1=7 -x2=5 -y2=7 -color=blue -[/enemy] - -[enemy] -tileSetFile=chip.png -animation=chip.ani -width=8 -height=16 -x=6 -y=7 -vx=0 -vy=0 -x1=6 -y1=7 -x2=6 -y2=7 -color=red -[/enemy] - -[enemy] -tileSetFile=chip.png -animation=chip.ani -width=8 -height=16 -x=7 -y=7 -vx=0 -vy=0 -x1=7 -y1=7 -x2=7 -y2=7 -color=magenta -[/enemy] - -[enemy] -tileSetFile=chip.png -animation=chip.ani -width=8 -height=16 -x=8 -y=7 -vx=0 -vy=0 -x1=8 -y1=7 -x2=8 -y2=7 -color=green -[/enemy] - - -[enemy] -tileSetFile=chip.png -animation=chip.ani -width=8 -height=16 -x=9 -y=7 -vx=0 -vy=0 -x1=9 -y1=7 -x2=9 -y2=7 +x1=28 +y1=10 +x2=28 +y2=10 color=cyan [/enemy] - [enemy] -tileSetFile=chip.png -animation=chip.ani -width=8 +# Campana izquierda +tileSetFile=bell.png +animation=bell.ani +width=16 height=16 -x=10 -y=7 +x=6 +y=2 vx=0 vy=0 -x1=10 -y1=7 -x2=10 -y2=7 -color=yellow -[/enemy] - - -[enemy] -tileSetFile=chip.png -animation=chip.ani -width=8 -height=16 -x=11 -y=7 -vx=0 -vy=0 -x1=11 -y1=7 -x2=11 -y2=7 -color=white +x1=6 +y1=2 +x2=6 +y2=2 +color=cyan [/enemy] [enemy] -tileSetFile=chip.png -animation=chip.ani -width=8 +# Dong izquierdo +tileSetFile=dong.png +animation=dong.ani +width=22 height=16 -x=12 -y=7 +x=6 +y=4 vx=0 -vy=0 -x1=12 -y1=7 -x2=12 -y2=7 -color=black +vy=0.5 +x1=6 +y1=4 +x2=6 +y2=13 +color=cyan [/enemy] +[enemy] +# Campana derecha +tileSetFile=bell.png +animation=bell.ani +width=16 +height=16 +x=20 +y=2 +vx=0 +vy=0 +x1=20 +y1=2 +x2=20 +y2=2 +color=cyan +[/enemy] - - - - - +[enemy] +# Dong derecha +tileSetFile=dong.png +animation=dong.ani +width=22 +height=16 +x=20 +y=13 +vx=0 +vy=-0.5 +x1=20 +y1=4 +x2=20 +y2=13 +color=cyan +[/enemy] [item] tileSetFile=items.png tile=48 -x=17 -y=8 +x=1 +y=2 counter=1 +[/item] + +[item] +tileSetFile=items.png +tile=48 +x=26 +y=13 +counter=2 [/item] \ No newline at end of file diff --git a/data/room/25.tmx b/data/room/25.tmx index 175856a..164e237 100644 --- a/data/room/25.tmx +++ b/data/room/25.tmx @@ -5,19 +5,19 @@ 67,68,67,68,67,68,67,68,67,68,67,68,67,68,67,68,67,68,67,68,67,68,67,68,67,68,67,68,67,68,67,68, 91,92,91,92,91,92,91,92,91,92,91,92,91,92,91,92,91,92,91,92,91,92,91,92,91,92,91,92,91,92,91,92, -93,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -117,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -117,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -117,0,0,0,0,157,158,159,160,161,162,163,164,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -117,0,0,0,0,181,182,183,184,185,186,187,188,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -117,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -117,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -117,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,403,403,403,403,403,403,403,403,403,403,403,403,403,32,32, -117,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,32, -141,0,0,0,0,0,0,0,0,0,0,0,426,427,426,427,426,427,0,0,0,0,0,0,0,0,0,0,0,403,32,32, -32,0,0,0,0,0,0,0,0,0,0,0,93,0,0,0,0,93,0,0,0,0,0,0,0,0,0,0,0,0,32,32, -0,0,0,0,0,0,0,0,0,0,0,0,117,0,0,0,0,117,0,0,0,0,0,0,0,0,0,0,0,403,32,32, -0,0,0,0,0,0,0,0,0,0,0,0,141,0,0,0,0,141,0,0,0,0,0,0,0,0,0,0,0,0,32,32, +93,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,93, +117,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,117, +117,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,117, +117,398,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,141, +117,0,0,0,0,0,0,0,0,0,0,0,0,0,526,93,550,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32, +117,404,405,0,0,0,0,0,0,0,0,0,403,404,404,404,404,405,400,0,0,0,0,0,0,0,0,0,0,0,0,0, +117,0,0,0,0,0,0,0,0,0,399,400,0,0,0,117,0,0,0,428,0,0,0,0,0,0,0,556,0,0,0,0, +117,0,0,428,0,428,0,0,0,428,0,0,0,0,0,117,0,0,0,0,0,0,0,526,403,404,404,32,32,32,32,32, +117,0,428,0,0,0,0,0,0,0,0,0,0,0,0,117,0,0,0,0,0,0,526,0,0,0,0,32,0,0,32,32, +141,556,0,0,0,0,0,0,0,0,0,0,0,0,0,117,0,0,0,0,0,526,0,0,0,0,0,32,0,0,32,32, +32,404,404,405,399,0,0,0,397,0,0,0,403,404,404,404,404,405,0,403,405,0,0,0,403,404,404,32,32,32,32,32, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,117,0,0,0,0,0,0,0,0,0,0,0,135,0,0,32,32, +0,0,0,0,0,0,0,556,0,0,0,0,0,89,90,141,556,0,0,0,0,0,0,0,0,89,90,135,0,0,32,89, 89,90,89,90,89,90,89,90,89,90,89,90,89,90,89,90,89,90,89,90,89,90,89,90,89,90,89,90,89,90,89,90 diff --git a/data/room/26.room b/data/room/26.room index 31a74e7..6815b2d 100644 --- a/data/room/26.room +++ b/data/room/26.room @@ -60,18 +60,18 @@ color=yellow [/enemy] [enemy] -# Dong campana uno +# Dong izquierda tileSetFile=dong.png animation=dong.ani width=22 height=16 x=1 y=2 -vx=0.6 +vx=0 vy=0 x1=1 y1=2 -x2=28 +x2=1 y2=2 color=yellow [/enemy] @@ -94,19 +94,19 @@ color=yellow [/enemy] [enemy] -# Dong campana dos +# Dong derecha tileSetFile=dong.png animation=dong.ani width=22 height=16 x=28 -y=7 -vx=-0.6 +y=2 +vx=-0 vy=0 -x1=1 -y1=7 +x1=28 +y1=2 x2=28 -y2=7 +y2=2 color=yellow [/enemy] diff --git a/data/room/26.tmx b/data/room/26.tmx index af70133..8f46176 100644 --- a/data/room/26.tmx +++ b/data/room/26.tmx @@ -8,16 +8,16 @@ 93,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,93, 117,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,117, 117,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,117, -141,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,526,403,0,0,0,0,117, -32,0,0,0,0,0,0,403,403,403,403,403,403,403,403,403,403,403,403,403,403,403,403,403,403,0,0,0,0,0,0,117, +141,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,526,428,0,0,0,0,117, +32,0,0,0,0,0,0,403,404,404,404,404,404,404,404,404,404,404,404,404,404,404,404,404,405,0,0,0,0,0,0,117, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,117, -0,0,0,0,0,403,550,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,141, -93,0,0,0,0,0,0,403,403,403,403,403,403,403,403,403,403,403,403,403,403,403,403,403,403,0,0,0,0,0,0,32, +0,0,0,0,0,428,550,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,141, +93,0,0,0,0,0,0,403,404,404,404,404,404,404,404,404,404,404,404,404,404,404,404,404,405,0,0,0,0,0,0,32, 117,550,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -141,0,550,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,526,403,0,0,0,0,0, -32,32,32,32,0,0,0,403,403,403,403,403,403,403,403,403,403,403,403,403,403,403,403,403,403,0,0,0,32,32,32,32, +141,0,550,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,526,428,0,0,0,0,0, +32,32,32,32,0,0,0,403,404,404,404,404,404,404,404,404,404,404,404,404,404,404,404,404,405,0,0,0,32,32,32,32, 93,0,0,93,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,93,0,0,93, -141,0,0,141,0,0,0,0,0,0,0,0,0,0,526,93,550,0,0,0,0,0,0,0,0,0,0,0,141,0,0,141, +141,0,0,141,0,0,0,0,0,0,0,0,0,0,526,428,550,0,0,0,0,0,0,0,0,0,0,0,141,0,0,141, 89,90,89,90,89,90,89,90,89,90,89,90,89,90,89,90,89,90,89,90,89,90,89,90,89,90,89,90,89,90,89,90 diff --git a/data/room/27.room b/data/room/27.room index e6290c8..a1778dc 100644 --- a/data/room/27.room +++ b/data/room/27.room @@ -1,33 +1,49 @@ -name=no 27 -bgColor=black -border=red +name=the backyard +bgColor=blue +border=cyan tileMapFile=27.tmx tileSetFile=standard.png roomUp=28.room roomDown=29.room -roomLeft=0 +roomLeft=26.room roomRight=0 -[enemy] -tileSetFile=diskette.png -animation=diskette.ani -width=16 -height=16 -x=2 -y=2 -vx=0 -vy=0 -x1=2 -y1=2 -x2=2 -y2=2 -color=magenta -[/enemy] +#[enemy] +#tileSetFile=diskette.png +#animation=diskette.ani +#width=16 +#height=16 +#x=2 +#y=2 +#vx=0 +#vy=0 +#x1=2 +#y1=2 +#x2=2 +#y2=2 +#color=magenta +#[/enemy] [item] tileSetFile=items.png -tile=1 +tile=28 x=1 -y=1 +y=13 counter=1 +[/item] + +[item] +tileSetFile=items.png +tile=32 +x=11 +y=14 +counter=2 +[/item] + +[item] +tileSetFile=items.png +tile=32 +x=14 +y=14 +counter=3 [/item] \ No newline at end of file diff --git a/data/room/27.tmx b/data/room/27.tmx index bdbb052..9bfe731 100644 --- a/data/room/27.tmx +++ b/data/room/27.tmx @@ -3,22 +3,22 @@ -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, -0,0,0,0,0,0,0,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, -0,0,0,0,0,0,0,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, -0,0,0,0,0,0,0,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, -0,0,0,0,0,0,0,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, -0,0,0,0,0,0,0,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, -0,0,0,0,0,0,0,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, -0,0,0,0,0,0,0,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, -0,0,0,0,0,0,0,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, -0,0,0,0,0,0,0,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, -0,0,0,0,0,0,0,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, -0,0,0,0,0,0,0,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, -0,0,0,0,0,0,0,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, -0,0,0,0,0,0,0,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, -0,0,0,0,0,0,0,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,0,0,0,0,0,0,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 +67,68,67,68,67,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17, +91,92,91,92,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17, +93,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17, +117,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,523,257,0,0,0,0,0,17, +117,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,257,0,0,0,0,0,0,0,17, +117,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17, +117,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,305,305,305,0,305,0,0,0,0,0,17, +117,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,305,0,305,305,305,305,0,305,305,0,0,0,17, +141,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,305,0,305,0,305,305,305,305,0,0,0,0,0,17, +32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,305,0,305,305,305,305,305,305,0,305,0,0,17, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,305,305,305,305,305,305,305,305,305,0,0,0,17, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,305,305,305,41,41,305,305,305,0,0,0,17, +32,426,427,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,305,0,305,0,41,41,305,0,0,305,0,0,17, +93,0,426,427,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,305,0,0,41,41,0,0,305,0,0,0,17, +141,426,427,426,427,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41,41,0,0,0,0,0,0,17, +89,90,89,90,89,90,89,90,89,90,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,0,523,17,17,17 diff --git a/data/room/28.tmx b/data/room/28.tmx index 87099db..750360c 100644 --- a/data/room/28.tmx +++ b/data/room/28.tmx @@ -18,7 +18,7 @@ 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,0, 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,0, 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,0, -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,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,0,25,25,25,25,25,25,25 diff --git a/data/room/29.room b/data/room/29.room index 643d187..9ef11eb 100644 --- a/data/room/29.room +++ b/data/room/29.room @@ -1,33 +1,91 @@ -name=no 29 -bgColor=black -border=red +name=QUO VOIDIS +bgColor=bright_black +border=black tileMapFile=29.tmx tileSetFile=standard.png roomUp=27.room roomDown=0 roomLeft=30.room roomRight=0 +itemColor1=green +itemColor2=magenta [enemy] -tileSetFile=diskette.png -animation=diskette.ani +tileSetFile=qvoid.png +animation=qvoid.ani width=16 height=16 -x=2 -y=2 +x=7 +y=1 vx=0 -vy=0 -x1=2 -y1=2 -x2=2 -y2=2 +vy=0.7 +x1=7 +y1=1 +x2=7 +y2=13 color=magenta [/enemy] +[enemy] +tileSetFile=qvoid.png +animation=qvoid.ani +width=16 +height=16 +x=12 +y=6 +vx=0 +vy=0.7 +x1=12 +y1=1 +x2=12 +y2=13 +color=green +[/enemy] + +[enemy] +tileSetFile=qvoid.png +animation=qvoid.ani +width=16 +height=16 +x=17 +y=8 +vx=0 +vy=0.7 +x1=17 +y1=1 +x2=17 +y2=13 +color=red +[/enemy] + +[enemy] +tileSetFile=qvoid.png +animation=qvoid.ani +width=16 +height=16 +x=22 +y=10 +vx=0 +vy=0.7 +x1=22 +y1=1 +x2=22 +y2=13 +color=yellow +[/enemy] + [item] tileSetFile=items.png -tile=1 -x=1 -y=1 +tile=20 +x=9 +y=9 counter=1 +[/item] + +[item] +tileSetFile=items.png +tile=20 +x=30 +y=6 +counter=2 [/item] \ No newline at end of file diff --git a/data/room/29.tmx b/data/room/29.tmx index bb69264..c68ccb8 100644 --- a/data/room/29.tmx +++ b/data/room/29.tmx @@ -3,22 +3,22 @@ -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, -0,0,0,0,0,0,0,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, -0,0,0,0,0,0,0,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, -0,0,0,0,0,0,0,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, -0,0,0,0,0,0,0,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, -0,0,0,0,0,0,0,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, -0,0,0,0,0,0,0,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, -0,0,0,0,0,0,0,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, -0,0,0,0,0,0,0,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, -0,0,0,0,0,0,0,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, -0,0,0,0,0,0,0,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, -0,0,0,0,0,0,0,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, -0,0,0,0,0,0,0,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, -0,0,0,0,0,0,0,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, -0,0,0,0,0,0,0,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,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 +133,133,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,505,133, +133,133,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,505,0,133, +133,133,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,505,0,0,133, +133,133,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,505,0,0,0,133, +133,133,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,505,0,0,0,0,133, +133,133,0,0,228,228,228,0,0,228,228,228,0,0,228,228,228,0,0,228,228,228,0,0,228,228,0,0,228,0,0,133, +133,133,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,133, +133,133,228,228,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,228,230,133, +133,133,228,228,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,133, +133,133,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,133, +133,133,0,0,228,228,228,0,0,229,228,228,0,0,228,228,228,0,0,228,228,228,0,0,228,228,0,0,0,0,0,133, +133,133,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,228,228,133, +133,133,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,133, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,228,228,0,0,0,0,133, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,133, +133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133 diff --git a/data/room/30.tmx b/data/room/30.tmx index 67c84f6..d82f3bd 100644 --- a/data/room/30.tmx +++ b/data/room/30.tmx @@ -3,22 +3,22 @@ -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, -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,0, -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,0, -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,0, -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,0, -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,0, -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,0, -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,0, -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,0, -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,0, -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,0, -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,0, -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,0, -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,0, -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,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 +133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133, +133,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,133, +133,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,133, +133,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,133, +133,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,133, +133,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,133, +133,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,133, +133,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,133, +133,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,133, +133,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,133, +133,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,133, +133,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,133, +133,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,133, +133,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +133,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133 diff --git a/data/tilesets/standard.png b/data/tilesets/standard.png index 8954be6..3a0627a 100644 Binary files a/data/tilesets/standard.png and b/data/tilesets/standard.png differ diff --git a/data/tilesets/standard_zxarne.png b/data/tilesets/standard_zxarne.png index b69c8b9..c37d65d 100644 Binary files a/data/tilesets/standard_zxarne.png and b/data/tilesets/standard_zxarne.png differ diff --git a/source/common/resource.cpp b/source/common/resource.cpp index 8ead87f..204b807 100644 --- a/source/common/resource.cpp +++ b/source/common/resource.cpp @@ -100,6 +100,27 @@ void Resource::reLoadTextures() } } +// Recarga las habitaciones +void Resource::reLoadRooms() +{ + for (auto r : rooms) + { + delete r.room; + r.room = new room_t(loadRoomFile(asset->get(r.name))); + r.room->tileMap = getTileMap(r.room->tileMapFile); + for (auto &e : r.room->enemies) + { + e.animation = getAnimation(e.animationString); + } + for (auto &i : r.room->items) + { + i.texture = getTexture(i.tileSetFile); + } + r.room->textureA = getTexture("standard.png"); + r.room->textureB = getTexture("standard_zxarne.png"); + } +} + // Libera las texturas void Resource::freeTextures() { diff --git a/source/common/resource.h b/source/common/resource.h index ef71419..00d0f91 100644 --- a/source/common/resource.h +++ b/source/common/resource.h @@ -39,8 +39,8 @@ struct res_tileMap_t struct res_room_t { - std::string name; // Nombre de la habitación - room_t *room; // Vecor con las habitaciones + std::string name; // Nombre de la habitación + room_t *room; // Vecor con las habitaciones }; // Clase Resource. Almacena recursos de disco en memoria @@ -81,6 +81,9 @@ public: // Recarga las texturas void reLoadTextures(); + // Recarga las habitaciones + void reLoadRooms(); + // Libera las texturas void freeTextures(); diff --git a/source/credits.cpp b/source/credits.cpp index 56f39d6..5504f52 100644 --- a/source/credits.cpp +++ b/source/credits.cpp @@ -132,20 +132,31 @@ void Credits::fillTexture() texts.push_back({"", stringToColor(options->palette, "white")}); texts.push_back({"INSTRUCTIONS:", stringToColor(options->palette, "yellow")}); texts.push_back({"", stringToColor(options->palette, "white")}); - texts.push_back({"HELP JAILDOC TO GET BACK ALL HIS", stringToColor(options->palette, "white")}); - texts.push_back({"PROJECTS AND GO TO THE JAIL TO", stringToColor(options->palette, "white")}); - texts.push_back({"FINISH THEM", stringToColor(options->palette, "white")}); + texts.push_back({"HELP JAILDOC TO GET BACK ALL", stringToColor(options->palette, "white")}); + texts.push_back({"HIS PROJECTS AND GO TO THE", stringToColor(options->palette, "white")}); + texts.push_back({"JAIL TO FINISH THEM", stringToColor(options->palette, "white")}); texts.push_back({"", stringToColor(options->palette, "white")}); texts.push_back({"", stringToColor(options->palette, "white")}); + //texts.push_back({"KEYS:", stringToColor(options->palette, "yellow")}); + //texts.push_back({"", stringToColor(options->palette, "white")}); + //texts.push_back({"USE 'CURSORS' TO MOVE AND JUMP", stringToColor(options->palette, "white")}); + //texts.push_back({"'F1-F4' TO CHANGE WINDOWS SIZE", stringToColor(options->palette, "white")}); + //texts.push_back({"'F' TO SWITCH TO FULLSCREEN", stringToColor(options->palette, "white")}); + //texts.push_back({"'B' TO SWITCH THE BORDER SCREEN", stringToColor(options->palette, "white")}); + //texts.push_back({"'M' TO TURN ON/OFF THE MUSIC", stringToColor(options->palette, "white")}); + //texts.push_back({"'ESC' TO LEAVE THE GAME", stringToColor(options->palette, "white")}); + //texts.push_back({"", stringToColor(options->palette, "white")}); + //texts.push_back({"", stringToColor(options->palette, "white")}); + texts.push_back({"KEYS:", stringToColor(options->palette, "yellow")}); texts.push_back({"", stringToColor(options->palette, "white")}); - texts.push_back({"USE 'CURSORS' TO MOVE AND JUMP", stringToColor(options->palette, "white")}); - texts.push_back({"'F1-F4' TO CHANGE WINDOWS SIZE", stringToColor(options->palette, "white")}); - texts.push_back({"'F' TO SWITCH TO FULLSCREEN", stringToColor(options->palette, "white")}); - texts.push_back({"'B' TO SWITCH THE BORDER SCREEN", stringToColor(options->palette, "white")}); - texts.push_back({"'M' TO TURN ON/OFF THE MUSIC", stringToColor(options->palette, "white")}); - texts.push_back({"'ESC' TO LEAVE THE GAME", stringToColor(options->palette, "white")}); + texts.push_back({"CURSORS: MOVE AND JUMP", stringToColor(options->palette, "white")}); + texts.push_back({"F1-F4: CHANGE WINDOWS SIZE", stringToColor(options->palette, "white")}); + texts.push_back({"F: SWITCH TO FULLSCREEN", stringToColor(options->palette, "white")}); + texts.push_back({"B: SWITCH THE BORDER SCREEN", stringToColor(options->palette, "white")}); + texts.push_back({"M: TURN ON/OFF THE MUSIC", stringToColor(options->palette, "white")}); + texts.push_back({"ESC: LEAVE THE GAME", stringToColor(options->palette, "white")}); texts.push_back({"", stringToColor(options->palette, "white")}); texts.push_back({"", stringToColor(options->palette, "white")}); @@ -197,8 +208,6 @@ void Credits::fillTexture() SDL_RenderDrawPoint(renderer, i, 4); SDL_RenderDrawPoint(renderer, i, 6); - // SDL_RenderDrawPoint(renderer, i + 1, 1); - // SDL_RenderDrawPoint(renderer, i + 1, 3); SDL_RenderDrawPoint(renderer, i + 1, 5); SDL_RenderDrawPoint(renderer, i + 1, 7); } diff --git a/source/game.cpp b/source/game.cpp index 8371417..b836d4b 100644 --- a/source/game.cpp +++ b/source/game.cpp @@ -21,8 +21,8 @@ Game::Game(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *as // **** // this->debug->setEnabled(true); currentRoom = "25.room"; - const int x = 28; - const int y = 13; + const int x = 30; + const int y = 7; spawnPoint = {x * 8, y * 8, 0, 0, 0, s_standing, SDL_FLIP_HORIZONTAL}; // **** @@ -105,6 +105,10 @@ void Game::checkEventHandler() board.music ? JA_ResumeMusic() : JA_PauseMusic(); break; + case SDL_SCANCODE_R: + resource->reLoadRooms(); + break; + case SDL_SCANCODE_M: board.music = !board.music; board.music ? JA_ResumeMusic() : JA_PauseMusic(); diff --git a/source/room.cpp b/source/room.cpp index 59fd1d0..04ae5f0 100644 --- a/source/room.cpp +++ b/source/room.cpp @@ -895,7 +895,7 @@ void Room::setBottomSurfaces() lastOne = i; i++; - if (i < (int)tile.size() - 1) + if (i <= (int)tile.size() - 1) { while (tile.at(i) == tile.at(i - 1) + 1) { @@ -910,7 +910,7 @@ void Room::setBottomSurfaces() line.x2 = ((tile[lastOne] % mapWidth) * tileSize) + tileSize - 1; bottomSurfaces.push_back(line); - if (i < (int)tile.size() - 1) + if (i <= (int)tile.size() - 1) { if (tile.at(i) == -1) { // Si el siguiente elemento es un separador, hay que saltarlo @@ -955,7 +955,7 @@ void Room::setTopSurfaces() lastOne = i; i++; - if (i < (int)tile.size() - 1) + if (i <= (int)tile.size() - 1) { while (tile.at(i) == tile.at(i - 1) + 1) { @@ -970,7 +970,7 @@ void Room::setTopSurfaces() line.x2 = ((tile[lastOne] % mapWidth) * tileSize) + tileSize - 1; topSurfaces.push_back(line); - if (i < (int)tile.size() - 1) + if (i <= (int)tile.size() - 1) { if (tile.at(i) == -1) { // Si el siguiente elemento es un separador, hay que saltarlo @@ -1187,7 +1187,7 @@ void Room::setAutoSurfaces() lastOne = i; i++; - if (i < (int)tile.size() - 1) + if (i <= (int)tile.size() - 1) { while (tile.at(i) == tile.at(i - 1) + 1) { @@ -1202,7 +1202,7 @@ void Room::setAutoSurfaces() line.x2 = ((tile[lastOne] % mapWidth) * tileSize) + tileSize - 1; autoSurfaces.push_back(line); - if (i < (int)tile.size() - 1) + if (i <= (int)tile.size() - 1) { if (tile.at(i) == -1) { // Si el siguiente elemento es un separador, hay que saltarlo