diff --git a/data/enemies/bat.ani b/data/enemies/bat.ani new file mode 100644 index 0000000..22355c1 --- /dev/null +++ b/data/enemies/bat.ani @@ -0,0 +1,9 @@ +frameWidth=9 +frameHeight=7 + +[animation] +name=default +speed=3 +loop=0 +frames=0,1 +[/animation] \ No newline at end of file diff --git a/data/enemies/bat.png b/data/enemies/bat.png new file mode 100644 index 0000000..a9f4d98 Binary files /dev/null and b/data/enemies/bat.png differ diff --git a/data/items/items.png b/data/items/items.png index 3cf20cd..354245c 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 08a0744..70cf40e 100644 --- a/data/room/06.room +++ b/data/room/06.room @@ -1,33 +1,36 @@ -name=no 06 -bgColor=black -border=red +name=welcome to my abbey +bgColor=blue +border=yellow tilemap=06.tmx tileset=standard.png roomUp=15.room roomDown=0 roomLeft=05.room roomRight=25.room +itemColor1=yellow +itemColor2=cyan [enemy] -tileset=diskette.png -animation=diskette.ani -width=16 +tileset=abad.png +animation=abad.ani +width=8 height=16 -x=2 -y=2 -vx=0 +x=1 +y=13 +vx=0.8 vy=0 -x1=2 -y1=2 -x2=2 -y2=2 -color=magenta +x1=1 +y1=13 +x2=30 +y2=13 +color=yellow +flip=true [/enemy] [item] tileset=items.png -tile=1 -x=1 -y=1 +tile=48 +x=7 +y=2 counter=1 [/item] \ No newline at end of file diff --git a/data/room/06.tmx b/data/room/06.tmx index 7ff6b20..3810e2a 100644 --- a/data/room/06.tmx +++ b/data/room/06.tmx @@ -3,22 +3,22 @@ -30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30 +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, +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,403,403,403,403,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,0,0,0,0,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,0,0,0,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, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,526,426,0,0,0,0,0,427,550,0,0,117, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,526,426,0,0,0,0,0,0,0,0,403,403,117, +32,67,68,67,68,403,403,403,550,0,0,0,0,0,526,403,67,68,67,68,403,550,0,0,0,0,0,0,0,0,140,141, +32,91,92,91,92,0,0,0,427,550,0,0,0,526,426,0,91,92,91,92,0,427,550,0,0,0,0,0,0,0,0,32, +135,0,0,0,0,0,0,0,0,0,0,0,526,426,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,426,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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/14.tmx b/data/room/14.tmx index ca0e9a5..836c8d1 100644 --- a/data/room/14.tmx +++ b/data/room/14.tmx @@ -18,7 +18,7 @@ 27,27,27,27,27,0,27,27,27,27,27,27,27,27,27,317,317,0,0,0,0,306,0,0,0,0,0,0,0,0,0,30, 0,0,0,0,0,0,27,0,0,0,0,0,0,0,27,317,317,0,0,306,0,0,306,0,0,306,0,306,306,0,0,30, 0,0,0,0,0,0,27,0,0,0,0,0,0,0,27,317,317,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30, -30,30,30,30,30,0,30,30,30,30,30,30,30,30,30,30,30,30,30,30,0,0,0,0,306,306,306,306,306,306,306,30 +30,30,30,30,30,0,30,30,30,30,30,30,30,30,30,30,30,30,30,30,306,0,0,306,306,30,30,30,30,30,30,30 diff --git a/data/room/15.room b/data/room/15.room index d7749b4..5d058d9 100644 --- a/data/room/15.room +++ b/data/room/15.room @@ -1,33 +1,132 @@ -name=no 15 +name=now this is the batcave! bgColor=black -border=red +border=black tilemap=15.tmx tileset=standard.png roomUp=14.room roomDown=06.room roomLeft=0 roomRight=0 +itemColor1=yellow +itemColor2=red [enemy] -tileset=diskette.png -animation=diskette.ani -width=16 +tileset=batman.png +animation=batman.ani +width=8 height=16 -x=2 -y=2 -vx=0 +x=17 +y=13 +vx=0.8 vy=0 -x1=2 +x1=7 +y1=13 +x2=29 +y2=13 +color=white +flip=true +[/enemy] + +[enemy] +tileset=bat.png +animation=bat.ani +width=9 +height=7 +x=14 +y=2 +vx=0.5 +vy=0 +x1=9 y1=2 -x2=2 +x2=30 y2=2 -color=magenta +color=bright_blue +[/enemy] + +[enemy] +tileset=bat.png +animation=bat.ani +width=9 +height=7 +x=10 +y=10 +vx=0.5 +vy=0 +x1=1 +y1=10 +x2=30 +y2=10 +color=cyan +[/enemy] + +[enemy] +tileset=bat.png +animation=bat.ani +width=9 +height=7 +x=15 +y=1 +vx=0 +vy=0.7 +x1=15 +y1=1 +x2=15 +y2=11 +color=red [/enemy] [item] tileset=items.png -tile=1 -x=1 -y=1 +tile=0 +x=5 +y=2 counter=1 +[/item] + +[item] +tileset=items.png +tile=0 +x=13 +y=12 +counter=2 +[/item] + +[item] +tileset=items.png +tile=0 +x=14 +y=12 +counter=3 +[/item] + +[item] +tileset=items.png +tile=0 +x=15 +y=12 +counter=4 +[/item] + +[item] +tileset=items.png +tile=0 +x=16 +y=12 +counter=5 +[/item] + +[item] +tileset=items.png +tile=0 +x=10 +y=4 +counter=6 +[/item] + +[item] +tileset=items.png +tile=0 +x=17 +y=7 +counter=7 [/item] \ No newline at end of file diff --git a/data/room/15.tmx b/data/room/15.tmx index 1c2cb6d..77f8bd7 100644 --- a/data/room/15.tmx +++ b/data/room/15.tmx @@ -3,22 +3,22 @@ -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,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,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,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,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,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,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,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,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,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,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,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,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,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,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26 +16,16,16,16,16,0,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,16,16,16,16,16,16,16, +16,16,0,0,0,0,0,349,16,349,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,16, +16,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,16, +16,0,0,0,0,349,0,0,16,0,0,0,0,0,0,0,0,0,0,423,423,423,423,423,423,0,0,0,0,0,0,16, +16,0,0,0,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16, +16,0,0,0,0,0,0,16,16,16,16,0,0,0,423,0,0,0,423,547,0,0,0,0,0,0,0,0,0,0,0,16, +16,0,0,0,0,0,0,0,16,16,0,0,0,0,0,0,0,0,0,0,547,0,0,0,0,424,422,424,422,0,0,16, +16,0,0,424,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,422,0,0,0,0,0,0,0,0,0,16, +16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,422,0,0,0,0,422,0,0,0,0,0,0,0,422,16, +16,422,547,0,0,0,0,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,0,0,409,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,555,0,0,0,0,0,523,422,16, +16,0,0,0,0,0,0,555,0,0,0,0,0,0,0,0,0,0,0,0,0,0,422,423,422,422,423,361,409,0,0,16, +16,0,0,0,422,409,422,423,422,422,423,409,422,0,0,0,0,423,424,0,0,0,0,0,0,0,0,289,0,0,0,16, +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,289,0,0,0,16, +16,16,0,0,0,0,0,0,0,0,0,555,0,0,0,0,0,0,0,0,555,0,0,0,0,0,0,289,0,0,16,16, +16,349,349,349,349,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,16 diff --git a/data/tilesets/standard.png b/data/tilesets/standard.png index d050399..a1f9e20 100644 Binary files a/data/tilesets/standard.png and b/data/tilesets/standard.png differ diff --git a/source/director.cpp b/source/director.cpp index 7de7a9b..02d4ed0 100644 --- a/source/director.cpp +++ b/source/director.cpp @@ -570,6 +570,8 @@ bool Director::setFileList() asset->add("/../data/enemies/arounder_stop.ani", t_data); asset->add("/../data/enemies/arounder_fly.png", t_bitmap); asset->add("/../data/enemies/arounder_fly.ani", t_data); + asset->add("/../data/enemies/bat.png", t_bitmap); + asset->add("/../data/enemies/bat.ani", t_data); // Jugador asset->add("/../data/player/player.png", t_bitmap); diff --git a/source/game.cpp b/source/game.cpp index 531706e..ad04b06 100644 --- a/source/game.cpp +++ b/source/game.cpp @@ -17,7 +17,7 @@ Game::Game(SDL_Renderer *renderer, Screen *screen, Asset *asset, Input *input, D // **** // this->debug->setEnabled(true); - currentRoom = "53.room"; + currentRoom = "14.room"; const int x = 30; const int y = 13; spawnPoint = {x * 8, y * 8, 0, 0, 0, s_standing, SDL_FLIP_HORIZONTAL};