From 93bf8cecb7b3e44495c4cc89e6e78865b3172a8c Mon Sep 17 00:00:00 2001 From: Sergio Valor Date: Fri, 16 Sep 2022 16:55:57 +0200 Subject: [PATCH] =?UTF-8?q?A=C3=B1adiendo=20enemigos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/room/06.room | 2 +- data/room/06.tmx | 4 +- data/room/13.room | 188 ++++++++++++++++++++++++++++++++++++ data/room/13.tmx | 24 +++++ media/enemies/batman.ani | 10 ++ media/enemies/batman.png | Bin 0 -> 241 bytes media/enemies/matatunos.ani | 10 ++ media/enemies/matatunos.png | Bin 0 -> 332 bytes media/enemies/tuno.ani | 10 ++ media/enemies/tuno.png | Bin 0 -> 317 bytes source/director.cpp | 8 ++ source/game.cpp | 6 +- 12 files changed, 257 insertions(+), 5 deletions(-) create mode 100644 data/room/13.room create mode 100644 data/room/13.tmx create mode 100644 media/enemies/batman.ani create mode 100644 media/enemies/batman.png create mode 100644 media/enemies/matatunos.ani create mode 100644 media/enemies/matatunos.png create mode 100644 media/enemies/tuno.ani create mode 100644 media/enemies/tuno.png diff --git a/data/room/06.room b/data/room/06.room index d087291..c167bc8 100644 --- a/data/room/06.room +++ b/data/room/06.room @@ -4,7 +4,7 @@ border=blue tileset=standard.png roomUp=0 roomDown=0 -roomLeft=0 +roomLeft=13.room roomRight=01.room [tilemap] diff --git a/data/room/06.tmx b/data/room/06.tmx index 334cfe7..ac9a9d6 100644 --- a/data/room/06.tmx +++ b/data/room/06.tmx @@ -15,8 +15,8 @@ 26,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,62,0,0,0,0,26, 26,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26, 26,0,0,0,0,0,0,0,0,0,163,26,26,26,26,26,26,26,26,183,0,0,0,0,0,0,22,22,0,0,0,26, -26,0,0,0,0,0,0,0,0,163,0,0,0,0,0,0,0,0,0,0,183,0,0,0,0,0,0,0,0,0,0,0, -26,0,0,0,0,0,0,0,163,0,0,0,0,0,0,0,0,0,0,0,0,183,0,0,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,183,0,0,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,183,0,0,0,0,0,0,0,0,0,0, 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26 diff --git a/data/room/13.room b/data/room/13.room new file mode 100644 index 0000000..e51cc18 --- /dev/null +++ b/data/room/13.room @@ -0,0 +1,188 @@ +name=know your enemy +bgColor=black +border=red +tileset=standard.png +roomUp=0 +roomDown=0 +roomLeft=0 +roomRight=06.room + +[tilemap] +13.tmx +[/tilemap] + +[enemy] +tileset=batman.png +animation=batman.ani +width=8 +height=16 +x=2 +y=2 +vx=0 +vy=0 +x1=2 +y1=2 +x2=2 +y2=2 +color=red +[/enemy] + +[enemy] +tileset=bin.png +animation=bin.ani +width=16 +height=8 +x=5 +y=2 +vx=0 +vy=0 +x1=5 +y1=2 +x2=5 +y2=2 +color=red +[/enemy] + +[enemy] +tileset=bird.png +animation=bird.ani +width=16 +height=16 +x=8 +y=2 +vx=0 +vy=0 +x1=8 +y1=2 +x2=8 +y2=2 +color=red +[/enemy] + +[enemy] +tileset=chip.png +animation=chip.ani +width=8 +height=16 +x=11 +y=2 +vx=0 +vy=0 +x1=11 +y1=2 +x2=11 +y2=2 +color=red +[/enemy] + +[enemy] +tileset=diskette.png +animation=diskette.ani +width=16 +height=16 +x=14 +y=2 +vx=0 +vy=0 +x1=14 +y1=2 +x2=14 +y2=2 +color=red +[/enemy] + +[enemy] +tileset=matatunos.png +animation=matatunos.ani +width=16 +height=16 +x=17 +y=2 +vx=0 +vy=0 +x1=17 +y1=2 +x2=17 +y2=2 +color=red +[/enemy] + +[enemy] +tileset=paco.png +animation=paco.ani +width=16 +height=16 +x=20 +y=2 +vx=0 +vy=0 +x1=20 +y1=2 +x2=20 +y2=2 +color=red +[/enemy] + +[enemy] +tileset=qvoid.png +animation=qvoid.ani +width=16 +height=16 +x=23 +y=2 +vx=0 +vy=0 +x1=23 +y1=2 +x2=23 +y2=2 +color=red +[/enemy] + +[enemy] +tileset=sigmasua.png +animation=sigmasua.ani +width=16 +height=16 +x=26 +y=2 +vx=0 +vy=0 +x1=26 +y1=2 +x2=26 +y2=2 +color=red +[/enemy] + +[enemy] +tileset=tuno.png +animation=tuno.ani +width=16 +height=16 +x=2 +y=5 +vx=0 +vy=0 +x1=2 +y1=5 +x2=2 +y2=5 +color=red +[/enemy] + +[enemy] +tileset=wave.png +animation=wave.ani +width=8 +height=8 +x=5 +y=5 +vx=0 +vy=0 +x1=5 +y1=5 +x2=5 +y2=5 +color=red +[/enemy] \ No newline at end of file diff --git a/data/room/13.tmx b/data/room/13.tmx new file mode 100644 index 0000000..8bb8137 --- /dev/null +++ b/data/room/13.tmx @@ -0,0 +1,24 @@ + + + + + +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,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,0,0,0,0,0,0,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, +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,0,0,0,0,0,0,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, +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,0,0,0,0,0,0,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, +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,0,0,0,0,0,0,0,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,169,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 + + + diff --git a/media/enemies/batman.ani b/media/enemies/batman.ani new file mode 100644 index 0000000..b6ce4bf --- /dev/null +++ b/media/enemies/batman.ani @@ -0,0 +1,10 @@ +frames_per_row=4 +frame_width=8 +frame_height=16 + +[animation] +name=default +speed=8 +loop=0 +frames=0,1,2,3 +[/animation] \ No newline at end of file diff --git a/media/enemies/batman.png b/media/enemies/batman.png new file mode 100644 index 0000000000000000000000000000000000000000..f73bc9ba48252a57d1c948ffb7dd460865f30564 GIT binary patch literal 241 zcmVPx#t4TybR7i=Xl-m-;Fa$-rGx`5tc3x_Z5nBUKsaP&49ubj;NOpH)bHi_D3;?Rv za~7b>ZezkMGiXwy8N;Vg#e%uV8S1UnW*C^K$rg?Ow+I`zMOaXnfkQLFOlRAHIP00001b5ch_0Itp) z=>Px$21!IgR9J=Wmr)OcFbIUl;{X54>}5@~gG%oxYO;GWso#M@vC7Mks%pCy5wY$W ziQ(DU86K7Vdjun5cs6#1M>YRbfWK}a{pt!n%8u??nSV65C@ zAC!Oe2tvAi&&=}Zp(`0zYXE+aNOzAAWg2V`|Eds3;4dlhdM!0KY;SDXD) eMSWP0O8x_^;Y<3<1l|t-0000Px#_en%SR9J=0S4k4XFbFH1{{PGLQf8=!O<*U{C7UJ17;r+b1kB8GPDGTAe;Pl- zd$(X0dZJhAJ|+ONy8J^|N4Rn%A{qyGDuD9W@m+t-^EA?$x}%1fnRP}?_};agZ!3YF zSz=8dK~zrb_3b@C*XnwInsHip4F(AiF(G&(k@%eID5b zNCDxkUvV8+-98#$3c!hcy;gvT*yDn|NHL` P00000NkvXXu0mjfUqFV| literal 0 HcmV?d00001 diff --git a/source/director.cpp b/source/director.cpp index 4b7a485..d7bff4f 100644 --- a/source/director.cpp +++ b/source/director.cpp @@ -362,6 +362,7 @@ bool Director::setFileList() asset->add("/data/room/10.room", room); asset->add("/data/room/11.room", room); asset->add("/data/room/12.room", room); + asset->add("/data/room/13.room", room); asset->add("/data/room/01.tmx", room); asset->add("/data/room/02.tmx", room); asset->add("/data/room/03.tmx", room); @@ -374,6 +375,7 @@ bool Director::setFileList() asset->add("/data/room/10.tmx", room); asset->add("/data/room/11.tmx", room); asset->add("/data/room/12.tmx", room); + asset->add("/data/room/13.tmx", room); asset->add("/media/tilesets/standard.png", bitmap); @@ -393,6 +395,12 @@ bool Director::setFileList() asset->add("/media/enemies/bin.ani", data); asset->add("/media/enemies/qvoid.png", bitmap); asset->add("/media/enemies/qvoid.ani", data); + asset->add("/media/enemies/batman.png", bitmap); + asset->add("/media/enemies/batman.ani", data); + asset->add("/media/enemies/tuno.png", bitmap); + asset->add("/media/enemies/tuno.ani", data); + asset->add("/media/enemies/matatunos.png", bitmap); + asset->add("/media/enemies/matatunos.ani", data); asset->add("/media/player/player.png", bitmap); asset->add("/media/player/player.ani", data); diff --git a/source/game.cpp b/source/game.cpp index 3a2745e..ba2108b 100644 --- a/source/game.cpp +++ b/source/game.cpp @@ -24,8 +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 = "04.room"; - spawnPoint = {9 * 8, 11 * 8, 0, 0, 0, s_standing, SDL_FLIP_HORIZONTAL}; + currentRoom = "13.room"; + const int x = 28; + const int y = 13; + spawnPoint = {x * 8, y * 8, 0, 0, 0, s_standing, SDL_FLIP_NONE}; // **** // Crea los objetos