From eea7849f54d5a9a6bc5cf32e66fc24dd029833de Mon Sep 17 00:00:00 2001 From: Sergio Valor Date: Sun, 13 Nov 2022 21:29:11 +0100 Subject: [PATCH 01/10] Eliminado todo.txt --- todo.txt | 91 -------------------------------------------------------- 1 file changed, 91 deletions(-) delete mode 100644 todo.txt diff --git a/todo.txt b/todo.txt deleted file mode 100644 index 9684a56..0000000 --- a/todo.txt +++ /dev/null @@ -1,91 +0,0 @@ -## TAREAS -x (A) Hacer que deje de poder moverse tras el salto al alcanzar la misma posicion en altura que tenia cuando saltó {cm:2022-08-29} -x (A) Arreglar que no atraviese tiles atravaseables al caer muy rapido {cm:2022-08-29} -x (A) Leer los mapas directamente del archivo tmx {cm:2022-08-29} -x (A) Crear la clase item {cm:2022-08-29} -x (A) Colisiones con los enemigos {cm:2022-08-29} -x (A) Decidir un diseño para qué sucede en caso de morir: Recordar el punto por donde se entró al mapa y la velocidad en el eje X/Y que llevaba el personaje, crear puntos de reaparicion en las habitaciones, etc {cm:2022-08-29} - x En el Jet Set Willy el juego recuerda la posicion y el momento. En las Tres Luces de Glaurung solo la posición. Se va a optar por seguir el diseño del Jet Set Willy {cm:2022-08-29} -x (A) Crear tiles que maten {cm:2022-08-29} -x (A) Modificar el salto para que coincida con el del JSW, no ha de colisionar lateralmente -x (A) Crear tiles que arrastren, tipo cinta transportadora -x (A) Tiles animados -x (A) Tile que maten (o enemigos?) -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} -x (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} -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} -x (A) El modo debug debe pintar la rejilla {cm:2022-08-30} -x (A) Tecla F para pasar a pantalla completa {cm:2022-08-30} -x (A) Tecla + y - para cambiar tamaño de ventana. O control F1 a F4 {cm:2022-08-30} -x (A) Poner en el marcador el indicador de si esta sonando la música -x (A) Poner en el marcador el numero de habitaciones visitadas -x (A) Los textos del marcador de colores -x (A) Añadir a cada habitación el color del borde -x (A) Añadir a cada habitación el color del nombre de la habitación -x (A) Crear el logo al estilo del logo de ERBE o TOPO, con lineas que lo formen -x (A) El titulo del juego hacerlo parecido al del Jet Set Willy in Paris - x - Ha de generarse como las cargas de pantalla de spectrum - x - Luego se colorea - x - Finalmente, cada elemento cambia de color como si fueran luces de neon -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 -x (A) Añadir color y efectos a los creditos -x (A) Crear la tipografia de corazon -x (A) Los Creditos se han de ir escribiendo letra a letra -x (A) Arreglar la pantalla de carga para que cargue bit a bit -x (A) La musica del titulo ha de seguir sonando en los creditos y el ¿logo? -x (A) Ha de haber un modo demo en el que se muestran las habitaciones predefinidas -(A) Menu de pausa/salir -x (A) Poner el mapa/jugador en pausa -x (A) El color del borde se pierde al morir por la pantalla negra -x (B) El fichero ani ha de calcular cuantos frames hay a partir del tamaño y ver que no hay ningun indice incorrecto -x (B) Así como no necesitar lo de frames per row -(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 -x (A) Las vidas del marcador no estan animadas. No cambian de frame -(A) Mejorar las cintas. no permitir saltar hacia atras -x (A) Cambio de paleta en caliente -x (A) Precargar todos los recursos del juego -x (A) Deshabilitar el input hasta que se suelten todas las teclas - - -## TEMAS -x marounders -x paku simbel -x jail battle -arounders race -aee gba -x matatunos -x sigmasua -calculin doom -leaper reaper -x mini ascii -mappy -x paco -x chirping -x abad y batman -x jail -counter strike -starcraft -diablo -jailparty -maniac mansion -molotov -tutorials -gavina -puzzle restorer -x qvoid -brick roll -dante's fall -x repairing computers -va en moto a la feina, ploent \ No newline at end of file From 9cd916ccd37812ad90fcab9a473e400d77617b2d Mon Sep 17 00:00:00 2001 From: Sergio Date: Sun, 13 Nov 2022 22:21:35 +0100 Subject: [PATCH 02/10] Actualizar 'README.md' --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 97d1dcb..8ccef7c 100644 --- a/README.md +++ b/README.md @@ -30,8 +30,8 @@ El juego permite tanto el uso del teclado como de un mando de control. Las tecla ![JailDoctor's Dilemma - Gameplay](https://php.sustancia.synology.me/images/jdd_game2.png) ## Agradecimientos -Agradecimientos como siempre a todos los Jailers por motivarme a hacer el juego y ayudarme en los momentos de duda a la hora de escribir el código. Y como siempre, en especial a JailDoc por su unidad de Jail_Audio y cualquier otro código que haya necesitado para terminar el programa. +Agradecimientos como siempre a todos los Jailers por motivarme a hacer el juego y ayudarme en los momentos de duda a la hora de escribir el código. Y, como siempre, en especial a JailDoc por su unidad de Jail_Audio y cualquier otro código/ayuda/enseñanzas que haya necesitado para terminar el programa. Si no me he descontado, este es el cuarto juego juego que consigo crear. -*13 de noviembre de 2022, JailDesigner* +*13 de noviembre de 2022, JailDesigner* \ No newline at end of file From bc66956524b2527286343d62c2be0c52dd0907c5 Mon Sep 17 00:00:00 2001 From: Sergio Valor Martinez Date: Mon, 14 Nov 2022 07:52:56 +0100 Subject: [PATCH 03/10] Actualizado Makefile --- Makefile | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 97bf559..865a2cb 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,12 @@ appName = JailDoctor's Dilemma releaseFolder = jdd_release version = v1.0 +# Release names +windowsRelease = $(executable)-$(version)-win32-x64.zip +macosIntelRelease = $(executable)-$(version)-macos-intel.dmg +macosAppleSiliconRelease = $(executable)-$(version)-macos-apple-silicon.dmg +linuxRelease = $(executable)-$(version)-linux.tar.gz + windows: @echo off powershell if (Test-Path data\config) {Remove-Item data\config -Recurse -Force} @@ -37,8 +43,8 @@ windows_release: strip -s -R .comment -R .gnu.version "$(releaseFolder)/$(executable).exe" --strip-unneeded # Create ZIP - powershell if (Test-Path $(executable)_win_$(version).zip) {Remove-Item $(executable)-$(version)-win32-x64.zip} - powershell Compress-Archive -Path "$(releaseFolder)"/* -DestinationPath $(executable)-$(version)-win32-x64.zip + powershell if (Test-Path $(executable)_win_$(version).zip) {Remove-Item $(windowsRelease)} + powershell Compress-Archive -Path "$(releaseFolder)"/* -DestinationPath $(windowsRelease) # Remove folder powershell if (Test-Path $(releaseFolder)) {Remove-Item $(releaseFolder) -Recurse -Force} @@ -77,19 +83,19 @@ macos_release: clang++ $(source) -D RELEASE -D MACOS_BUNDLE -std=c++11 -Wall -Os -framework SDL2 -F ./Frameworks -ffunction-sections -fdata-sections -o "$(releaseFolder)/$(appName).app/Contents/MacOS/$(executable)" -rpath @executable_path/../Frameworks/ -target x86_64-apple-macos10.12 # Build INTEL DMG - rm -f "$(executable)_macos_intel_$(version).dmg" + rm -f "$(macosIntelRelease)" hdiutil create tmp.dmg -ov -volname "$(appName)" -fs HFS+ -srcfolder "$(releaseFolder)" - hdiutil convert tmp.dmg -format UDZO -o "$(executable)-$(version)-macos-intel.dmg" - rm tmp.dmg + hdiutil convert tmp.dmg -format UDZO -o "$(macosIntelRelease)" + rm -f tmp.dmg # Build APPLE SILICON clang++ $(source) -D RELEASE -D MACOS_BUNDLE -std=c++11 -Wall -Os -framework SDL2 -F ./Frameworks -ffunction-sections -fdata-sections -o "$(releaseFolder)/$(appName).app/Contents/MacOS/$(executable)" -rpath @executable_path/../Frameworks/ -target arm64-apple-macos11 # Build APPLE SILICON DMG - rm -f "$(executable)_macos_apple_silicon_$(version).dmg" + rm -f "$(macosAppleSiliconRelease)" hdiutil create tmp.dmg -ov -volname "$(appName)" -fs HFS+ -srcfolder "$(releaseFolder)" - hdiutil convert tmp.dmg -format UDZO -o "$(executable)-$(version)-macos-apple-silicon.dmg" - rm tmp.dmg + hdiutil convert tmp.dmg -format UDZO -o "$(macosAppleSiliconRelease)" + rm -f tmp.dmg # Remove data rm -rdf Frameworks @@ -124,7 +130,8 @@ linux_release: strip -s -R .comment -R .gnu.version $(releaseFolder)/$(executable) --strip-unneeded # Pack files - cd $(releaseFolder) && tar -czvf ../$(executable)-$(version)-linux.tar.gz * + rm -f $(linuxRelease) + cd $(releaseFolder) && tar -czvf ../$(linuxRelease) * # Remove data rm -rdf $(releaseFolder) \ No newline at end of file From bcb6dcd1a5cb6b3e7796034d397ff57d3b14f9b8 Mon Sep 17 00:00:00 2001 From: Sergio Date: Mon, 14 Nov 2022 12:36:09 +0100 Subject: [PATCH 04/10] Actualizar 'README.md' --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8ccef7c..7791881 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,6 @@ El juego permite tanto el uso del teclado como de un mando de control. Las tecla ## Agradecimientos Agradecimientos como siempre a todos los Jailers por motivarme a hacer el juego y ayudarme en los momentos de duda a la hora de escribir el código. Y, como siempre, en especial a JailDoc por su unidad de Jail_Audio y cualquier otro código/ayuda/enseñanzas que haya necesitado para terminar el programa. -Si no me he descontado, este es el cuarto juego juego que consigo crear. +Si no me he descontado, este es el cuarto juego que consigo crear. *13 de noviembre de 2022, JailDesigner* \ No newline at end of file From a97449adc5da51b915181d0f573846489c8457a8 Mon Sep 17 00:00:00 2001 From: Sergio Valor Date: Mon, 14 Nov 2022 21:42:37 +0100 Subject: [PATCH 05/10] =?UTF-8?q?Recalibrada=20la=20habitaci=C3=B3n=20THE?= =?UTF-8?q?=20CHAPPEL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/enemies/dong.ani | 2 +- data/enemies/dong.png | Bin 592 -> 630 bytes data/room/25.room | 4 +++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/data/enemies/dong.ani b/data/enemies/dong.ani index 0f762c6..d7d8f1c 100644 --- a/data/enemies/dong.ani +++ b/data/enemies/dong.ani @@ -5,5 +5,5 @@ frameHeight=16 name=default speed=6 loop=0 -frames=0,1,2,3,4,5,6,7,8 +frames=0,1,2,3,4,5 [/animation] \ No newline at end of file diff --git a/data/enemies/dong.png b/data/enemies/dong.png index f713ebbfd94aa06fd39f1e3b355effe85af6457f..26ee88ec9ffd507e805b9d8d64ea0b496a7dcfaa 100644 GIT binary patch literal 630 zcmV-+0*U>JP)Px%FiAu~RA_-M!I9)A$5GgQ-*@NSv2izJ zRPTS?p3wVb4kGsbHtWKFD%^}#maNsd?_d>Ig@bSzAG_BkLGL>@g@ftvphV0hc-DS; zL#U!xxme1}?!x`1?cNa1#5o0WFr6Z*qN`>ZcCq5d_wzi@{2rh2PV`lcQ*l;j?s?_w zBv@%--y-%Itb?1+GX^u|gTBRFoa0~=l3mEbux6;ly4J-*$&2T)Q5i03dUc<1uIQ@# z9Y4eozagJtSNzDPI|u4ELp4!(N}LJ2lVv{^C`wMoK$DE(t-dkrtc&5I{8s!`yy{Mj z`>K8iDj6eawhEm|M8T>;v!E28li;e+Dr1FFIvh+?vy(nmp@Q&8u+pJ!eo}l{hy5=9dfPVmh1| z%h?dBLC|lH;dZf|co4q&%_4qh!^U4R6_ekcX+YhJ?zwmf*VW%Egk*0|rC0HPx%3Q0skRA_5Vduy%r-n)#KV>vGi&0w0zD{CAm zs6HQdRbVEDRh*1VBEySouS zM)!NC(O%XVuOzhA{x03Rtf=TByvWIfJ5&9&b%&5O@sAiBvwfpsGy}0Uw0YHMS{An% z11~gs!MlWJVWt9Gc|`?cV7u#JG`n=BcwH{@~!? e;Nalk-S7iHbhAf2z;MC<0000 Date: Mon, 14 Nov 2022 22:28:14 +0100 Subject: [PATCH 06/10] FIx: Al saltar sin parar contra el techo al el jugador moria por caer de muy alto --- .gitignore | 3 ++- data/room/15.tmx | 2 +- source/game.cpp | 2 +- source/player.cpp | 18 +++++++++++++----- 4 files changed, 17 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 43438c5..4a635c3 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,5 @@ thumbs.db *.dmg *.tar.gz *.zip -*.app \ No newline at end of file +*.app +*_debug \ No newline at end of file diff --git a/data/room/15.tmx b/data/room/15.tmx index 9fdfd6f..c4ca5e0 100644 --- a/data/room/15.tmx +++ b/data/room/15.tmx @@ -6,7 +6,7 @@ 16,16,16,16,16,0,16,16,16,16,349,349,349,349,349,349,349,349,349,349,302,0,0,302,302,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,0,423,423,423,423,423,0,0,0,0,0,0,16, +16,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,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, diff --git a/source/game.cpp b/source/game.cpp index 467b3b7..89b79d5 100644 --- a/source/game.cpp +++ b/source/game.cpp @@ -21,7 +21,7 @@ Game::Game(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *as this->options = options; #ifndef RELEASE - currentRoom = "33.room"; + currentRoom = "14.room"; const int x1 = 1; const int y1 = 13; spawnPoint = {x1 * 8, y1 * 8, 0, 0, 0, s_standing, SDL_FLIP_HORIZONTAL}; diff --git a/source/player.cpp b/source/player.cpp index 3f8ca36..af91104 100644 --- a/source/player.cpp +++ b/source/player.cpp @@ -196,10 +196,18 @@ void Player::checkInput() if (input->checkInput(INPUT_UP, REPEAT_TRUE)) { - setState(s_jumping); - vy = -maxVY; - jumpIni = y; - jumpCounter = 0; + // Solo puede saltar si ademas de estar (state == s_standing) + // Esta sobre el suelo, rampa o suelo que se mueve + // Esto es para evitar el salto desde el vacio al cambiar de pantalla verticalmente + // Ya que se coloca el estado s_standing al cambiar de pantalla + + if (isOnFloor() || isOnAutoSurface()) + { + setState(s_jumping); + vy = -maxVY; + jumpIni = y; + jumpCounter = 0; + } } } @@ -269,6 +277,7 @@ void Player::checkState() else if (state == s_jumping) { + fallCounter = 0; jumpCounter++; playJumpSound(); } @@ -281,7 +290,6 @@ void Player::switchBorders() { y = PLAY_AREA_BOTTOM - h - 0 - BLOCK; setState(s_standing); - // jumpIni += 128; } else if (border == BORDER_BOTTOM) { From e2846023da658c4191438d1098ea5f3aacb3d705 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Valor=20Mart=C3=ADnez?= Date: Mon, 14 Nov 2022 22:35:05 +0100 Subject: [PATCH 07/10] Cambiados los ifndef RELEASE por ifdef DEBUG --- Makefile | 14 +++++++------- source/director.cpp | 2 +- source/game.cpp | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 865a2cb..1f03050 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ windows: @echo off powershell if (Test-Path data\config) {Remove-Item data\config -Recurse -Force} powershell if (-not (Test-Path data\config)) {New-Item data\config -ItemType Directory} - g++ $(source) -std=c++11 -Wall -Os -lmingw32 -lSDL2main -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -static-libstdc++ -Wl,-subsystem,windows -o $(executable).exe + g++ $(source) -D DEBUG -std=c++11 -Wall -Os -lmingw32 -lSDL2main -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -static-libstdc++ -Wl,-subsystem,windows -o $(executable).exe strip -s -R .comment -R .gnu.version $(executable).exe --strip-unneeded windows_release: @@ -39,7 +39,7 @@ windows_release: powershell if (Test-Path "$(releaseFolder)\data\room\standard.tsx") {Remove-Item "$(releaseFolder)\data\room\standard.tsx" -Recurse -Force} # Build - g++ $(source) -D RELEASE -std=c++11 -Wall -Os -lmingw32 -lSDL2main -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -static-libstdc++ -Wl,-subsystem,windows -o "$(releaseFolder)/$(executable).exe" + g++ $(source) -std=c++11 -Wall -Os -lmingw32 -lSDL2main -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -static-libstdc++ -Wl,-subsystem,windows -o "$(releaseFolder)/$(executable).exe" strip -s -R .comment -R .gnu.version "$(releaseFolder)/$(executable).exe" --strip-unneeded # Create ZIP @@ -52,7 +52,7 @@ windows_release: macos: rm -rdf data/config mkdir -p data/config - clang++ $(source) -std=c++11 -Wall -Os -lSDL2 -ffunction-sections -fdata-sections -o $(executable)_macos + clang++ $(source) -D DEBUG -std=c++11 -Wall -Os -lSDL2 -ffunction-sections -fdata-sections -o $(executable)_macos macos_release: # Remove data @@ -80,7 +80,7 @@ macos_release: cp release/Info.plist "$(releaseFolder)/$(appName).app/Contents" # Build INTEL - clang++ $(source) -D RELEASE -D MACOS_BUNDLE -std=c++11 -Wall -Os -framework SDL2 -F ./Frameworks -ffunction-sections -fdata-sections -o "$(releaseFolder)/$(appName).app/Contents/MacOS/$(executable)" -rpath @executable_path/../Frameworks/ -target x86_64-apple-macos10.12 + clang++ $(source) -D MACOS_BUNDLE -std=c++11 -Wall -Os -framework SDL2 -F ./Frameworks -ffunction-sections -fdata-sections -o "$(releaseFolder)/$(appName).app/Contents/MacOS/$(executable)" -rpath @executable_path/../Frameworks/ -target x86_64-apple-macos10.12 # Build INTEL DMG rm -f "$(macosIntelRelease)" @@ -89,7 +89,7 @@ macos_release: rm -f tmp.dmg # Build APPLE SILICON - clang++ $(source) -D RELEASE -D MACOS_BUNDLE -std=c++11 -Wall -Os -framework SDL2 -F ./Frameworks -ffunction-sections -fdata-sections -o "$(releaseFolder)/$(appName).app/Contents/MacOS/$(executable)" -rpath @executable_path/../Frameworks/ -target arm64-apple-macos11 + clang++ $(source) -D MACOS_BUNDLE -std=c++11 -Wall -Os -framework SDL2 -F ./Frameworks -ffunction-sections -fdata-sections -o "$(releaseFolder)/$(appName).app/Contents/MacOS/$(executable)" -rpath @executable_path/../Frameworks/ -target arm64-apple-macos11 # Build APPLE SILICON DMG rm -f "$(macosAppleSiliconRelease)" @@ -104,7 +104,7 @@ macos_release: linux: rm -rdf data/config mkdir -p data/config - g++ $(source) -std=c++11 -Wall -Os -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -o $(executable)_linux + g++ $(source) -D DEBUG -std=c++11 -Wall -Os -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -o $(executable)_linux strip -s -R .comment -R .gnu.version $(executable)_linux --strip-unneeded linux_release: @@ -126,7 +126,7 @@ linux_release: rm -f "$(releaseFolder)/data/room/standard.tsx" # Build - g++ $(source) -D RELEASE -std=c++11 -Wall -Os -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -o $(releaseFolder)/$(executable) + g++ $(source) -std=c++11 -Wall -Os -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -o $(releaseFolder)/$(executable) strip -s -R .comment -R .gnu.version $(releaseFolder)/$(executable) --strip-unneeded # Pack files diff --git a/source/director.cpp b/source/director.cpp index 3ce8cef..bdd106f 100644 --- a/source/director.cpp +++ b/source/director.cpp @@ -9,7 +9,7 @@ Director::Director(int argc, char *argv[]) section.name = SECTION_PROG_LOGO; section.subsection = SUBSECTION_LOGO_TO_INTRO; -#ifndef RELEASE +#ifdef DEBUG section.name = SECTION_PROG_GAME; #endif diff --git a/source/game.cpp b/source/game.cpp index 89b79d5..64bd627 100644 --- a/source/game.cpp +++ b/source/game.cpp @@ -20,7 +20,7 @@ Game::Game(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *as this->debug = debug; this->options = options; -#ifndef RELEASE +#ifdef DEBUG currentRoom = "14.room"; const int x1 = 1; const int y1 = 13; @@ -96,7 +96,7 @@ void Game::checkEventHandler() case SDL_SCANCODE_ESCAPE: section.name = SECTION_PROG_TITLE; break; -#ifndef RELEASE +#ifdef DEBUG case SDL_SCANCODE_G: debug->switchEnabled(); options->cheat.invincible = debug->getEnabled(); From d88b42a51690be303fd9e3a9aa8aa4d7695055ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Valor=20Mart=C3=ADnez?= Date: Mon, 14 Nov 2022 22:58:13 +0100 Subject: [PATCH 08/10] Fix: El jugador ya no puede moverse hacia un lateral nada mas subir a la pantalla superior --- source/player.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/player.cpp b/source/player.cpp index af91104..bec807a 100644 --- a/source/player.cpp +++ b/source/player.cpp @@ -273,6 +273,14 @@ void Player::checkState() vy = 0.0f; jumpCounter = 0; fallCounter = 0; + if (!isOnFloor() && !isOnAutoSurface()) + { + setState(s_falling); + vx = 0.0f; + vy = maxVY; + fallCounter++; + playFallSound(); + } } else if (state == s_jumping) From e5ec5bd62706e62bdb5c3437dce6d7f5d346b39b Mon Sep 17 00:00:00 2001 From: Sergio Valor Date: Mon, 14 Nov 2022 22:59:32 +0100 Subject: [PATCH 09/10] Vuelto a poner el bloque de la fase 15 --- data/room/15.tmx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/room/15.tmx b/data/room/15.tmx index 9fdfd6f..dcc73e6 100644 --- a/data/room/15.tmx +++ b/data/room/15.tmx @@ -6,7 +6,7 @@ 16,16,16,16,16,0,16,16,16,16,349,349,349,349,349,349,349,349,349,349,302,0,0,302,302,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,0,423,423,423,423,423,0,0,0,0,0,0,16, +16,0,0,0,0,16,0,0,16,0,0,0,0,0,0,0,0,0,0,0,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, From 75e5ea50b5bcbf0c865e004ea6372fbcce785738 Mon Sep 17 00:00:00 2001 From: Sergio Valor Date: Mon, 14 Nov 2022 23:05:34 +0100 Subject: [PATCH 10/10] Redecorada la batcueva --- data/room/15.tmx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/data/room/15.tmx b/data/room/15.tmx index 7f68bd3..5f10522 100644 --- a/data/room/15.tmx +++ b/data/room/15.tmx @@ -4,13 +4,12 @@ 16,16,16,16,16,0,16,16,16,16,349,349,349,349,349,349,349,349,349,349,302,0,0,302,302,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,16,0,0,16,0,0,0,0,0,0,0,0,0,0,0,423,423,423,423,423,0,0,0,0,0,0,16, -16,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,423,423,423,423,423,0,0,0,0,0,0,16, +16,16,302,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,302,16,16, +16,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,302,16, +16,0,0,0,0,349,0,0,16,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,302,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,302,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,