From c2882da40b424136ece787fd30465356f1bdeaa9 Mon Sep 17 00:00:00 2001 From: Sergio Valor Date: Fri, 16 Sep 2022 17:53:16 +0200 Subject: [PATCH] La ventana ya se crea con o sin el borde --- data/room/13.room | 48 +++++++++++++++++++++++++++++ media/enemies/abad.ani | 10 ++++++ media/enemies/abad.png | Bin 0 -> 267 bytes media/enemies/jailbattle_alien.ani | 10 ++++++ media/enemies/jailbattle_alien.png | Bin 0 -> 205 bytes media/enemies/jailbattle_human.ani | 10 ++++++ media/enemies/jailbattle_human.png | Bin 0 -> 189 bytes source/director.cpp | 20 ++++++++++-- todo.txt | 16 +++++++--- 9 files changed, 108 insertions(+), 6 deletions(-) create mode 100644 media/enemies/abad.ani create mode 100644 media/enemies/abad.png create mode 100644 media/enemies/jailbattle_alien.ani create mode 100644 media/enemies/jailbattle_alien.png create mode 100644 media/enemies/jailbattle_human.ani create mode 100644 media/enemies/jailbattle_human.png diff --git a/data/room/13.room b/data/room/13.room index e51cc18..db3445d 100644 --- a/data/room/13.room +++ b/data/room/13.room @@ -185,4 +185,52 @@ y1=5 x2=5 y2=5 color=red +[/enemy] + +[enemy] +tileset=abad.png +animation=abad.ani +width=8 +height=16 +x=8 +y=5 +vx=0 +vy=0 +x1=8 +y1=5 +x2=8 +y2=5 +color=red +[/enemy] + +[enemy] +tileset=jailbattle_human.png +animation=jailbattle_human.ani +width=11 +height=13 +x=11 +y=5 +vx=0 +vy=0 +x1=11 +y1=5 +x2=11 +y2=5 +color=red +[/enemy] + +[enemy] +tileset=jailbattle_alien.png +animation=jailbattle_alien.ani +width=13 +height=15 +x=14 +y=5 +vx=0 +vy=0 +x1=14 +y1=5 +x2=14 +y2=5 +color=red [/enemy] \ No newline at end of file diff --git a/media/enemies/abad.ani b/media/enemies/abad.ani new file mode 100644 index 0000000..6a493ee --- /dev/null +++ b/media/enemies/abad.ani @@ -0,0 +1,10 @@ +frames_per_row=3 +frame_width=8 +frame_height=16 + +[animation] +name=default +speed=8 +loop=0 +frames=0,1,2 +[/animation] \ No newline at end of file diff --git a/media/enemies/abad.png b/media/enemies/abad.png new file mode 100644 index 0000000000000000000000000000000000000000..f6efe686329aeceb984759c59d17e2b82d4bd10a GIT binary patch literal 267 zcmV+m0rdWfP)Px##Ysd#R5*>Dlu-_ZKnO!yGxxu8_eVyiGU#ez6ycR3Mgo8&0U*h^kAo!fbhLaV z0jPq>tELh-xh+3jFB=1}7+AGuP0JsJ8(EPH#OZ=1KL8-!vm}4vd33*@20H$*2id_C zBpD*vy-!f`PL($*32E86?lz6{GpauL)Wn_X3fc0^ffq2@ z*$SkZif^IKG&chs|7wD-29^e$z!v_)z#`<=UH*wLlW*cr4c>q`F8_Q*gCD}X^tq5| RS!Kq!^2X+?^QKos)S9*WjDCg=Y+dPre6GF zIOl2KuK2+A;;<(g|7UK__7>Ug{^t4()nIp4yGOBG_Wch_tZi%rI*Gy4)z4*}Q$iB} D&<{>p literal 0 HcmV?d00001 diff --git a/media/enemies/jailbattle_human.ani b/media/enemies/jailbattle_human.ani new file mode 100644 index 0000000..54848e2 --- /dev/null +++ b/media/enemies/jailbattle_human.ani @@ -0,0 +1,10 @@ +frames_per_row=2 +frame_width=11 +frame_height=13 + +[animation] +name=default +speed=8 +loop=0 +frames=0,1 +[/animation] \ No newline at end of file diff --git a/media/enemies/jailbattle_human.png b/media/enemies/jailbattle_human.png new file mode 100644 index 0000000000000000000000000000000000000000..d64e6ccbb72740dfdfa77899968f078ba9ba6747 GIT binary patch literal 189 zcmeAS@N?(olHy`uVBq!ia0vp^VjwmL8<1SPbY3!$Vk{1FcVbv~PUa<$Q|{^F7-G>o zH`tNyfC7i`rvLRjtrI1gF4fEWrb%6@|?*G zvu^S2S(>1>uJ12{+N_xY3@gM;BtKMces+#Y{f?~iyo);*p1%5GL6_Y_yU5F?_olq| n3_Y`|?#~gglwXcE|5;0CPyQqG_`w{Y6Bs;Q{an^LB{Ts5b$Uos literal 0 HcmV?d00001 diff --git a/source/director.cpp b/source/director.cpp index d7bff4f..527ba2d 100644 --- a/source/director.cpp +++ b/source/director.cpp @@ -110,8 +110,18 @@ bool Director::loadConfig() } // Aplica opciones - options->screenWidth = GAMECANVAS_WIDTH * options->windowSize; - options->screenHeight = GAMECANVAS_HEIGHT * options->windowSize; + if (options->borderEnabled) + { + const int incWidth = GAMECANVAS_WIDTH * options->borderSize; + const int incHeight = GAMECANVAS_HEIGHT * options->borderSize; + options->screenWidth = (GAMECANVAS_WIDTH + incWidth) * options->windowSize; + options->screenHeight = (GAMECANVAS_HEIGHT + incHeight) * options->windowSize; + } + else + { + options->screenWidth = GAMECANVAS_WIDTH * options->windowSize; + options->screenHeight = GAMECANVAS_HEIGHT * options->windowSize; + } return success; } @@ -401,6 +411,12 @@ bool Director::setFileList() asset->add("/media/enemies/tuno.ani", data); asset->add("/media/enemies/matatunos.png", bitmap); asset->add("/media/enemies/matatunos.ani", data); + asset->add("/media/enemies/abad.png", bitmap); + asset->add("/media/enemies/abad.ani", data); + asset->add("/media/enemies/jailbattle_human.png", bitmap); + asset->add("/media/enemies/jailbattle_human.ani", data); + asset->add("/media/enemies/jailbattle_alien.png", bitmap); + asset->add("/media/enemies/jailbattle_alien.ani", data); asset->add("/media/player/player.png", bitmap); asset->add("/media/player/player.ani", data); diff --git a/todo.txt b/todo.txt index c49d108..760cb83 100644 --- a/todo.txt +++ b/todo.txt @@ -11,14 +11,14 @@ x (A) Modificar el salto para que coincida con el del JSW, no ha de colisionar l (A) Crear tiles que arrastren, tipo cinta transportadora (A) Tiles animados x (A) Tile que maten (o enemigos?) -(A) Cuando mueres, pantalla negra entre vida y vida +x (A) Cuando mueres, pantalla negra entre vida y vida x (A) Morir al caer de alto x (A) Crear ascensores (NO SE VA A HACER POR DISEÑO) x (A) Crear rampas x (A) Enemigos de diferente tamaño {cm:2022-08-30} (A) Color de los items al estilo jet set willy de amstrad, que brillan con dos colores x (A) Temporizador de inicio de los items, para poder hacer que brillen a distinto ritmo. Esto es incompatible con lo anterior {cm:2022-08-30} -(A) Crear efecto de fade estilo spectrum, cambiando el color de las cosas a rojo, morado, azul, negro +x (A) Crear efecto de fade estilo spectrum, cambiando el color de las cosas a rojo, morado, azul, negro x (A) Hacer que los enemigos tengan flip x (A) Cabiar los colores del texto del marcador segun la habitación x (A) Poner la info de debug con la tipografia adecuada {cm:2022-08-30} @@ -38,10 +38,18 @@ x (A) El titulo del juego hacerlo parecido al del Jet Set Willy in Paris x (A) En el titulo del juego, por la parte inferior ha de aparecer una marquesina con texto, al estilo demoscene x (A) La pantalla de titulo no tiene menu, solo un PRESS ENTER TO PLAY (A) Añadir color y efectos a los creditos -(A) Arreglar la pantalal de carga para que cargue bit a bit +(A) Arreglar la pantalla de carga para que cargue bit a bit (A) La musica del titulo ha de seguir sonando en los creditos y el ¿logo? (A) Menu de pausa/salir -(A) Poner el mapa/jugador en pausa +x (A) Poner el mapa/jugador en pausa + +(B) El fichero ani ha de calcular cuantos frames hay a partir del tamaño y ver que no hay ningun indice incorrecto +(B) Así como no necesitar lo de frames per roomDown +(B) Le ha de pasar el w y h al sprite +(B) Lo enemigos han de coger el ancho y alto del fichero ani (y si no hay?) +(B) Si no se passa parametro, el fichero ani se deduce del png (y si no hay?) + +x (C) Que no cree la ventana y luego añada el borde ## TEMAS