diff --git a/data/room/55.room b/data/room/55.room index 925a696..932bfda 100644 --- a/data/room/55.room +++ b/data/room/55.room @@ -7,30 +7,46 @@ roomUp=0 roomDown=0 roomLeft=54.room roomRight=56.room -itemColor1=yellow +itemColor1=magenta itemColor2=red autoSurface=left +[enemy] +tileset=dimallas.png +animation=dimallas.ani +width=16 +height=16 +x=15 +y=13 +vx=0.6 +vy=0 +x1=9 +y1=13 +x2=25 +y2=13 +color=green +[/enemy] + [enemy] tileset=heavy.png animation=heavy.ani width=16 height=16 -x=2 -y=2 +x=16 +y=4 vx=0 -vy=0 -x1=2 -y1=2 -x2=2 -y2=2 -color=magenta +vy=0.3 +x1=16 +y1=4 +x2=16 +y2=10 +color=red [/enemy] [item] tileset=items.png -tile=33 -x=1 -y=1 +tile=25 +x=9 +y=4 counter=1 [/item] \ No newline at end of file diff --git a/data/room/55.tmx b/data/room/55.tmx index fadc9a0..6551c9a 100644 --- a/data/room/55.tmx +++ b/data/room/55.tmx @@ -1,5 +1,5 @@ - + @@ -7,15 +7,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,134, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,134, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,134, -0,0,0,523,302,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,134, -0,0,523,0,0,0,0,0,302,0,0,0,0,302,0,0,0,0,302,0,0,0,0,302,0,0,0,0,0,0,0,134, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,134, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,433,0,0,0,134, -0,0,0,0,0,0,0,0,326,0,0,0,0,326,0,0,0,0,326,0,0,0,0,326,0,0,0,0,0,0,0,134, -16,16,16,16,538,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,134, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16, +0,0,0,0,0,0,0,0,0,302,0,0,0,0,302,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,302,0,0,0,0,302,0,0,0,0,0,0,16, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16, +0,0,0,0,0,0,0,0,0,0,0,0,0,302,0,0,0,0,0,0,0,0,0,0,0,0,0,477,0,0,0,16, +0,0,0,0,0,0,0,0,326,0,0,0,0,0,0,0,0,0,326,0,0,0,0,326,0,0,0,0,0,0,0,16, +16,16,16,16,538,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16, 16,16,16,16,16,538,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 16,16,16,16,16,16,538,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349,349 diff --git a/data/tilesets/standard.png b/data/tilesets/standard.png index ec8cbcb..54a3161 100644 Binary files a/data/tilesets/standard.png and b/data/tilesets/standard.png differ diff --git a/source/game.cpp b/source/game.cpp index b2cd5cc..cfa46c0 100644 --- a/source/game.cpp +++ b/source/game.cpp @@ -24,10 +24,10 @@ Game::Game(SDL_Renderer *renderer, Screen *screen, Asset *asset, Input *input, D // currentRoom = "06.room"; // spawnPoint = {14 * 8, 9 * 8, 0, 0, 0, s_standing, SDL_FLIP_HORIZONTAL}; - currentRoom = "55.room"; - const int x = 30; - const int y = 13; - spawnPoint = {x * 8, y * 8, 0, 0, 0, s_standing, SDL_FLIP_HORIZONTAL}; + currentRoom = "55.room"; + const int x = 30; + const int y = 13; + spawnPoint = {x * 8, y * 8, 0, 0, 0, s_standing, SDL_FLIP_HORIZONTAL}; // **** // Crea los objetos @@ -48,7 +48,8 @@ Game::Game(SDL_Renderer *renderer, Screen *screen, Asset *asset, Input *input, D board.lives = 9; board.items = 0; board.rooms = 1; - board.color = room->getBorderColor(); + const color_t c = room->getBorderColor(); + board.color = (c.r + c.g + c.b == 0) ? stringToColor("white") : c; // Si el color es negro lo cambia a blanco roomTracker->addRoom(currentRoom); paused = false; blackScreen = false; @@ -316,8 +317,8 @@ bool Game::changeRoom(std::string file) room = new Room(asset->get(file), renderer, screen, asset, itemTracker, &board.items, debug); // Actualiza el marcador - const color_t c = room->getBorderColor(); // Pon el color del marcador - board.color = (c.r + c.g + c.b == 0) ? stringToColor("white") : c; // Si el color es negrom cambialo a blanco + const color_t c = room->getBorderColor(); // Pone el color del marcador + board.color = (c.r + c.g + c.b == 0) ? stringToColor("white") : c; // Si el color es negro lo cambia a blanco if (roomTracker->addRoom(file)) { // Incrementa el contador de habitaciones visitadas board.rooms++; @@ -390,7 +391,7 @@ void Game::killPlayer() return; } - //board.lives--; + // board.lives--; // Destruye la habitacion y el jugador delete room;