diff --git a/data/room/05.tmx b/data/room/05.tmx index dd77258..ef88d24 100644 --- a/data/room/05.tmx +++ b/data/room/05.tmx @@ -3,21 +3,21 @@ -28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28, -28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28, -28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28, -28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28, -28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28, -28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28, -28,0,0,0,0,0,0,0,0,0,0,267,267,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28, -28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,52,52,0,0,0,0,0,0,0,0,0,0,28, +28,0,0,0,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,427,426,427, +28,0,0,0,0,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,427,93, +28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,68,117, +28,0,0,0,0,0,0,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, +28,0,0,0,0,0,0,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, +28,0,0,0,0,0,0,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, +28,0,0,0,0,0,0,0,0,0,0,267,267,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,141, +28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,52,52,0,0,0,0,0,0,0,0,0,0,32, 28,28,28,28,28,28,0,0,0,267,267,0,0,0,0,0,0,0,0,28,0,0,0,0,267,267,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,267,267,0,0,0,0,0,0,0,0,0,28,0,0,0,0,267,267,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,0,0,0,0,0,0,0,0,0,28,28,28, -0,0,0,0,0,0,0,267,267,267,267,267,267,0,0,0,0,0,0,28,0,0,0,0,267,267,0,0,0,0,0,28, -0,0,0,0,0,267,0,0,0,0,0,0,0,0,0,0,0,0,0,28,0,0,0,0,0,0,0,0,0,0,0,28, -28,28,532,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,52,52,52,52,52,52,52,52,52,52,52,28, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,0,0,0,0,0,0,0,0,0,28,28,32, +0,0,0,0,0,0,0,267,267,267,267,267,267,0,0,0,0,0,0,28,0,0,0,0,267,267,0,0,0,0,0,32, +0,0,0,0,0,267,0,0,0,0,0,0,0,0,0,0,0,0,0,28,0,0,0,0,0,0,0,0,0,0,0,89, +28,28,532,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,52,52,52,52,52,52,52,52,89,90,89,90, 28,28,28,28,28,28,28,28,28,28,28,28,28,28,267,0,0,267,28,28,28,28,28,28,28,28,28,28,28,28,28,28 diff --git a/data/room/29.room b/data/room/29.room index 9ef11eb..1cfb03f 100644 --- a/data/room/29.room +++ b/data/room/29.room @@ -1,6 +1,6 @@ name=QUO VOIDIS -bgColor=bright_black -border=black +bgColor=blue +border=bright_black tileMapFile=29.tmx tileSetFile=standard.png roomUp=27.room @@ -18,7 +18,7 @@ height=16 x=7 y=1 vx=0 -vy=0.7 +vy=0.8 x1=7 y1=1 x2=7 @@ -34,7 +34,7 @@ height=16 x=12 y=6 vx=0 -vy=0.7 +vy=0.6 x1=12 y1=1 x2=12 @@ -50,12 +50,12 @@ height=16 x=17 y=8 vx=0 -vy=0.7 +vy=0.9 x1=17 y1=1 x2=17 y2=13 -color=red +color=green [/enemy] [enemy] @@ -71,7 +71,7 @@ x1=22 y1=1 x2=22 y2=13 -color=yellow +color=magenta [/enemy] [item] diff --git a/data/room/29.tmx b/data/room/29.tmx index c68ccb8..8f27104 100644 --- a/data/room/29.tmx +++ b/data/room/29.tmx @@ -3,7 +3,7 @@ -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,133,133,133,133,133,131,131,133,133,133,132,132,133,133,133,132,132,133,133,133,131,131,133,133,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, @@ -18,7 +18,7 @@ 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 +133,133,133,133,133,133,133,131,131,133,133,133,132,132,133,133,133,132,132,133,133,133,131,131,133,133,133,133,133,133,133,133 diff --git a/data/room/30.room b/data/room/30.room index 017a9e1..d6c6965 100644 --- a/data/room/30.room +++ b/data/room/30.room @@ -1,6 +1,6 @@ -name=no 30 -bgColor=black -border=red +name=QVOID IS A JAILGAME! +bgColor=bright_black +border=bright_black tileMapFile=30.tmx tileSetFile=standard.png roomUp=0 diff --git a/data/room/30.tmx b/data/room/30.tmx index d82f3bd..c04c806 100644 --- a/data/room/30.tmx +++ b/data/room/30.tmx @@ -3,22 +3,22 @@ -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,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,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,228,228,0,0,228,228,0,0,228,228,0,0,228,228,0,0,228,228,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,228,228,0,0,228,228,0,0,228,228,0,0,228,228,0,0,0,228,228,0,0,0,228,228,548,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,548,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,228,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 +133,0,0,0,0,0,0,0,0,485,485,485,0,0,0,228,228,0,0,0,485,485,485,0,0,0,228,228,0,0,0,133, +133,0,0,0,228,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,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,228,133, +133,228,228,548,0,0,0,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,548,0,0,0,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,548,0,0,0,0,0,555,0,0,0,0,0,0,0,0,0,555,0,0,0,0,0,0,0,0,0,0, +133,555,555,555,555,555,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,133,133,133 diff --git a/data/tilesets/standard.png b/data/tilesets/standard.png index b2add6b..594c760 100644 Binary files a/data/tilesets/standard.png and b/data/tilesets/standard.png differ diff --git a/source/common/utils.h b/source/common/utils.h index 4ac8d5f..7b9b1f9 100644 --- a/source/common/utils.h +++ b/source/common/utils.h @@ -77,6 +77,7 @@ struct options_t palette_e palette; // Paleta de colores a usar en el juego bool console; // Indica si ha de mostrar información por la consola de texto bool infiniteLives; // Indica si el jugador dispone de vidas infinitas + bool invincible; // Indica si el jugador puede morir }; // Calcula el cuadrado de la distancia entre dos puntos diff --git a/source/director.cpp b/source/director.cpp index 1e62eeb..90a7622 100644 --- a/source/director.cpp +++ b/source/director.cpp @@ -86,6 +86,7 @@ void Director::iniOptions() // Estos valores no se guardan en el fichero de configuraci´ón options->console = false; options->infiniteLives = false; + options->invincible = false; } // Comprueba los parametros del programa @@ -106,6 +107,11 @@ void Director::checkProgramArguments(int argc, char *argv[]) { options->infiniteLives = true; } + + else if (strcmp(argv[i], "--invincible") == 0) + { + options->invincible = true; + } } } diff --git a/source/game.cpp b/source/game.cpp index 11f2be3..247530a 100644 --- a/source/game.cpp +++ b/source/game.cpp @@ -20,9 +20,9 @@ Game::Game(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *as // **** // this->debug->setEnabled(true); - currentRoom = "46.room"; - const int x = 0; - const int y = 6; + currentRoom = "27.room"; + const int x = 29; + const int y = 13; spawnPoint = {x * 8, y * 8, 0, 0, 0, s_standing, SDL_FLIP_HORIZONTAL}; // **** @@ -384,7 +384,7 @@ void Game::checkEndGame() // Mata al jugador void Game::killPlayer() { - if (this->player->getInvincible()) + if (this->player->getInvincible() || options->invincible) { return; }