From a08da3b9830ad5d37e31e3a5114e51b05da04c5a Mon Sep 17 00:00:00 2001 From: Sergio Valor Date: Fri, 21 Feb 2025 11:07:39 +0100 Subject: [PATCH] Eliminat tot el online, jailerid, tables de puntuacions, etc.. Tots els fitxers cpp juntets --- CMakeLists.txt | 26 +- Makefile | 2 +- data/menu/options.men | 11 - data/notifications/notify.png | Bin 1502 -> 0 bytes data/sound/notify.wav | Bin 64730 -> 0 bytes source/{common => }/animatedsprite.cpp | 0 source/{common => }/animatedsprite.h | 5 - source/{common => }/asset.cpp | 0 source/{common => }/asset.h | 5 - source/balloon.h | 9 +- source/bullet.h | 9 +- source/common/jail_audio_sdlmixer.cpp | 101 ------- source/common/jscore.cpp | 154 ----------- source/common/jscore.h | 16 -- source/common/notify.cpp | 285 -------------------- source/common/notify.h | 87 ------- source/const.h | 9 +- source/director.cpp | 182 +------------ source/director.h | 30 +-- source/enter_id.cpp | 348 ------------------------- source/enter_id.h | 85 ------ source/fade.h | 9 +- source/game.cpp | 72 +---- source/game.h | 30 +-- source/hiscore_table.cpp | 286 -------------------- source/hiscore_table.h | 71 ----- source/{common => }/input.cpp | 0 source/{common => }/input.h | 7 +- source/instructions.h | 21 +- source/intro.cpp | 3 - source/intro.h | 14 +- source/item.h | 11 +- source/{common => }/jail_audio.cpp | 0 source/{common => }/jail_audio.h | 0 source/lang.h | 8 +- source/logo.cpp | 3 - source/logo.h | 17 +- source/{common => }/menu.cpp | 4 +- source/{common => }/menu.h | 5 - source/{common => }/movingsprite.cpp | 0 source/{common => }/movingsprite.h | 5 - source/player.h | 17 +- source/{common => }/screen.cpp | 60 ----- source/{common => }/screen.h | 21 +- source/{common => }/smartsprite.cpp | 0 source/{common => }/smartsprite.h | 5 - source/{common => }/sprite.cpp | 0 source/{common => }/sprite.h | 7 +- source/{common => }/stb_image.h | 0 source/{common => }/stb_vorbis.c | 0 source/{common => }/text.cpp | 0 source/{common => }/text.h | 5 - source/{common => }/texture.cpp | 0 source/{common => }/texture.h | 5 - source/title.cpp | 77 +----- source/title.h | 38 +-- source/{common => }/utils.cpp | 0 source/{common => }/utils.h | 28 -- source/{common => }/writer.cpp | 0 source/{common => }/writer.h | 5 - 60 files changed, 88 insertions(+), 2110 deletions(-) delete mode 100644 data/notifications/notify.png delete mode 100644 data/sound/notify.wav rename source/{common => }/animatedsprite.cpp (100%) rename source/{common => }/animatedsprite.h (98%) rename source/{common => }/asset.cpp (100%) rename source/{common => }/asset.h (97%) delete mode 100644 source/common/jail_audio_sdlmixer.cpp delete mode 100644 source/common/jscore.cpp delete mode 100644 source/common/jscore.h delete mode 100644 source/common/notify.cpp delete mode 100644 source/common/notify.h delete mode 100644 source/enter_id.cpp delete mode 100644 source/enter_id.h delete mode 100644 source/hiscore_table.cpp delete mode 100644 source/hiscore_table.h rename source/{common => }/input.cpp (100%) rename source/{common => }/input.h (98%) rename source/{common => }/jail_audio.cpp (100%) rename source/{common => }/jail_audio.h (100%) rename source/{common => }/menu.cpp (99%) rename source/{common => }/menu.h (99%) rename source/{common => }/movingsprite.cpp (100%) rename source/{common => }/movingsprite.h (98%) rename source/{common => }/screen.cpp (85%) rename source/{common => }/screen.h (88%) rename source/{common => }/smartsprite.cpp (100%) rename source/{common => }/smartsprite.h (96%) rename source/{common => }/sprite.cpp (100%) rename source/{common => }/sprite.h (98%) rename source/{common => }/stb_image.h (100%) rename source/{common => }/stb_vorbis.c (100%) rename source/{common => }/text.cpp (100%) rename source/{common => }/text.h (98%) rename source/{common => }/texture.cpp (100%) rename source/{common => }/texture.h (97%) rename source/{common => }/utils.cpp (100%) rename source/{common => }/utils.h (82%) rename source/{common => }/writer.cpp (100%) rename source/{common => }/writer.h (97%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0dca841..4ef228e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ # CMakeLists.txt cmake_minimum_required(VERSION 3.10) -project(coffee_crisis) +project(coffee_crisis VERSION 1.00) # Configuración de compilador para MinGW en Windows, si es necesario if(WIN32 AND NOT CMAKE_CXX_COMPILER_ID MATCHES "MSVC") @@ -10,7 +10,7 @@ if(WIN32 AND NOT CMAKE_CXX_COMPILER_ID MATCHES "MSVC") endif() # Establecer estándar de C++ -set(CMAKE_CXX_STANDARD 20) +set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED True) # Configuración global de flags de compilación @@ -20,8 +20,8 @@ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Os -ffunction-sections # Define el directorio de los archivos fuente set(DIR_SOURCES "${CMAKE_SOURCE_DIR}/source") -# Cargar todos los archivos fuente en DIR_SOURCES de manera recursiva -file(GLOB_RECURSE SOURCES "${DIR_SOURCES}/*.cpp") +# Cargar todos los archivos fuente en DIR_SOURCES +file(GLOB SOURCES "${DIR_SOURCES}/*.cpp") # Verificar si se encontraron archivos fuente if(NOT SOURCES) @@ -60,26 +60,12 @@ target_link_libraries(${PROJECT_NAME} ${LIBS}) # Configuración específica para cada plataforma if(WIN32) target_compile_definitions(${PROJECT_NAME} PRIVATE WINDOWS_BUILD) - target_link_libraries(${PROJECT_NAME} mingw32 opengl32 gdi32 winmm imm32 ole32 version) + target_link_libraries(${PROJECT_NAME} mingw32 gdi32 winmm imm32 ole32 version) elseif(APPLE) - set(LIBS ${LIBS} "-framework OpenGL") target_compile_definitions(${PROJECT_NAME} PRIVATE MACOS_BUILD) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated") # Configurar compilación para Apple Silicon set(CMAKE_OSX_ARCHITECTURES "arm64") elseif(UNIX AND NOT APPLE) - set(LIBS ${LIBS} GL) target_compile_definitions(${PROJECT_NAME} PRIVATE LINUX_BUILD) target_link_libraries(${PROJECT_NAME} ${LIBS}) -endif() - -# Añadir OpenGL a las bibliotecas enlazadas -if(NOT WIN32) - find_package(OpenGL REQUIRED) - if(OPENGL_FOUND) - message(STATUS "OpenGL encontrado: ${OPENGL_LIBRARIES}") - target_link_libraries(${PROJECT_NAME} ${OPENGL_LIBRARIES}) - else() - message(FATAL_ERROR "OpenGL no encontrado") - endif() -endif() +endif() \ No newline at end of file diff --git a/Makefile b/Makefile index dd107ef..27be0cb 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ executable = coffee_crisis -source = source/*.cpp source/common/*.cpp +source = source/*.cpp appName = Coffee Crisis releaseFolder = cc_release version = v2.3.1 diff --git a/data/menu/options.men b/data/menu/options.men index 5b3cec9..ac1279f 100644 --- a/data/menu/options.men +++ b/data/menu/options.men @@ -101,18 +101,7 @@ line=true [item] text=HOW TO PLAY -hPaddingDown=2 -[/item] - -[item] -text=HISCORE TABLE -hPaddingDown=2 -[/item] - -[item] -text=JAILERID: hPaddingDown=6 -line=true [/item] [item] diff --git a/data/notifications/notify.png b/data/notifications/notify.png deleted file mode 100644 index 753f74c7a8b7ac9a49e86f21d79706be3e4d344e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1502 zcmcJPdpOez7{?bebR1iBSnNDPSrRHTw++p$%go9pLRUJjxlLwlZlNKCsIZk&E@K@Q zHEQD&r9k{pb69^Kn=YO^vM@AP`8?%M*iN zC;jKBsjfSf7ruKP8xrsyt{~2Av4n$axl}d zP7P5q6|+S6Ody041UJj()|5~EA$6Cw$mC;HW6j3RxP$c{c|JOBZL%=Cc5d<3weHaJ z5Fvxl6$w9g2Pb5uO!P_IzhfSJg6#tGEUZpUPYtih!2GLlnBk+_=9XxXPXRhw-n}hlpH(KzLqp# zn-xxMjX$iW9SG*0F0!7qxpigMG@w zlce87Z7G**v@hTvm6{~B(UNo*>S>OCy#RB}5{ANdpDCQ7xWSnSb2oU*y#s*}AEPZb z7)?(_5;3>&6Q5>Vs6qEsfM?&>mxcAO9*U7QKdYNZ5Ve;)!dllUEm3ok!|zq)#9AXO=98kc{u!rQonZ+xxQ1Gq(g8 zy%rT)P;=lSn-*pM%gO@e+ew7}X1Kk5C`UdKmeln)HDMZDGN{6;&dxiF*4)!keEc10 zH{;Cq4!Rx8i_q0ryN$z|Y@BDZPPLEgT$zes@@kN1zSu%c$;=85D!34zVrDe?oAH9I zt!jzO1i~PpO$H8wG+Tbw`y-uqu{Lr)?&mw>D z&?FDTt@MGX7Zdsh|6&Ac&82KnNO@!-#IK19$nyhF1THm@&L^y$8dKGEXCK=bhs z`S2CypQ~TYI=*J5#@o!ka-_BnT0ay6VR9g{;+VTPx+! z)eJL@C~6VYq1`#BgOtvt((K~ek?8gG@j}vV-p60x8XhC7vJpz?%0_iPiOy+3cV}5c z>qpo~bcqZd^_idYorsY|7LS7b(n!{Ts7O}P5~WA-nso#=8(XW|7#r0)Aric!X>qQQ^JC)@O!d%Q zVa?w4CF Bz%~E? diff --git a/data/sound/notify.wav b/data/sound/notify.wav deleted file mode 100644 index ddb57c0364de4af4b82c36799ba92fbb46ab14b5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 64730 zcmd?Rb#zl(*YBUbccf|R?k$DlF2&vT;CgU(cXxM(gZshV4(?E(IMk@S$CEAhJCmm` zJkNXY81EhTzu&K)kv2)U&NbIs)7I|ZzD=8tyiC@odGFSvCe8?RlgVU^jFq)ICzH8d zW@U1jo2*m&9z9Ru`}SSh{L#L7_nx76-*?#LIbpRTtA{loK4$F5StBQooHQe>*Q5!P zhmRjQA`IKM?A+4}+m#<)A*}P*;nOBhpFCJODuS-X5-uZuY z#ID_2sed~&_UzH7rwhL6G<4ReI`ym8tXs84_3E+_LuU+?;g0A>lI(x~|MdI!d;b0X z|F`79{EwQHfd>4~w)}Ot|CAa1=l}K?zmE3*`tE;sHUF>2{I&o8{n2TU|NFguo$>$t zj%571oPV9ke!l*yyOmkzw6(R^!qXBNcQbYe%r5fQ?(pBGW|t^QmEitG$!GiDU+1RJ zvBmRz-6HunG0clIqxu7>{py82(|u-{2ZyV|#=z3Im;PrD?Ae@T<1 z`k(OlhFm7Y3$N%Vvzs_ubZOLT?q(%v4w>!)32^gaETTFw6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Age}107?&E#W@z>|v_mh3k^*{Z}=lE~W z^Pl&_fBUQdHj4k#-~Ic~|NW7Q=im4EzOVd=-~IWKzy5yZZ&f^A`TyVjP36!2{_}tP zi~sbqKR^EG?|hYif8_69`+xGA|LGb2UqAkzcgz3lSNi|M^En&)fBe55vpc2oqw=}` v?{`n-U;Oj=pBeaP2L73We`esH8Te-g{+WS)X5gP0_-6+GnSuW=Gw{Cv4Fe)c diff --git a/source/common/animatedsprite.cpp b/source/animatedsprite.cpp similarity index 100% rename from source/common/animatedsprite.cpp rename to source/animatedsprite.cpp diff --git a/source/common/animatedsprite.h b/source/animatedsprite.h similarity index 98% rename from source/common/animatedsprite.h rename to source/animatedsprite.h index 39f6f90..d7dc898 100644 --- a/source/common/animatedsprite.h +++ b/source/animatedsprite.h @@ -8,9 +8,6 @@ #include #include -#ifndef ANIMATEDSPRITE_H -#define ANIMATEDSPRITE_H - struct animation_t { std::string name; // Nombre de la animacion @@ -99,5 +96,3 @@ public: // Reinicia la animación void resetAnimation(); }; - -#endif \ No newline at end of file diff --git a/source/common/asset.cpp b/source/asset.cpp similarity index 100% rename from source/common/asset.cpp rename to source/asset.cpp diff --git a/source/common/asset.h b/source/asset.h similarity index 97% rename from source/common/asset.h rename to source/asset.h index 2eb5bca..bb0ffee 100644 --- a/source/common/asset.h +++ b/source/asset.h @@ -4,9 +4,6 @@ #include #include -#ifndef ASSET_H -#define ASSET_H - enum assetType { t_bitmap, @@ -62,5 +59,3 @@ public: // Establece si ha de mostrar texto por pantalla void setVerbose(bool value); }; - -#endif diff --git a/source/balloon.h b/source/balloon.h index bc93dd6..29ebfdd 100644 --- a/source/balloon.h +++ b/source/balloon.h @@ -1,14 +1,11 @@ #pragma once #include -#include "common/animatedsprite.h" -#include "common/utils.h" +#include "animatedsprite.h" +#include "utils.h" #include #include -#ifndef BALLOON_H -#define BALLOON_H - // Cantidad de elementos del vector con los valores de la deformación del globo al rebotar #define MAX_BOUNCE 10 @@ -250,5 +247,3 @@ public: // Obtiene le valor de la variable Uint8 getPower(); }; - -#endif diff --git a/source/bullet.h b/source/bullet.h index c9beb1f..785e0b0 100644 --- a/source/bullet.h +++ b/source/bullet.h @@ -1,11 +1,8 @@ #pragma once #include -#include "common/sprite.h" -#include "common/utils.h" - -#ifndef BULLET_H -#define BULLET_H +#include "sprite.h" +#include "utils.h" // Tipos de bala #define BULLET_UP 1 @@ -80,5 +77,3 @@ public: // Obtiene el circulo de colisión circle_t &getCollider(); }; - -#endif diff --git a/source/common/jail_audio_sdlmixer.cpp b/source/common/jail_audio_sdlmixer.cpp deleted file mode 100644 index ddb6b61..0000000 --- a/source/common/jail_audio_sdlmixer.cpp +++ /dev/null @@ -1,101 +0,0 @@ -#ifdef JA_USESDLMIXER -#include "jail_audio.h" -#include -#include -#include - -struct JA_Sound_t {}; // Dummy structs -struct JA_Music_t {}; - -int JA_freq {48000}; -SDL_AudioFormat JA_format {AUDIO_S16}; -Uint8 JA_channels {2}; - -void JA_Init(const int freq, const SDL_AudioFormat format, const int channels) { - JA_freq = freq; - JA_format = format; - JA_channels = channels; - Mix_OpenAudio(JA_freq, JA_format, JA_channels, 1024); -} - -void JA_Quit() { - Mix_CloseAudio(); -} - -JA_Music_t *JA_LoadMusic(const char* filename) { - return (JA_Music_t*)Mix_LoadMUS(filename); -} - -void JA_PlayMusic(JA_Music_t *music, const int loop) { - Mix_PlayMusic((Mix_Music*)music, loop); -} - -void JA_PauseMusic() { - Mix_PauseMusic(); -} - -void JA_ResumeMusic() { - Mix_ResumeMusic(); -} - -void JA_StopMusic() { - Mix_HaltMusic(); -} - -JA_Music_state JA_GetMusicState() { - if (Mix_PausedMusic()) { - return JA_MUSIC_PAUSED; - } else if (Mix_PlayingMusic()) { - return JA_MUSIC_PLAYING; - } else { - return JA_MUSIC_STOPPED; - } -} - -void JA_DeleteMusic(JA_Music_t *music) { - Mix_FreeMusic((Mix_Music*)music); -} - -JA_Sound_t *JA_NewSound(Uint8* buffer, Uint32 length) { - return NULL; -} - -JA_Sound_t *JA_LoadSound(const char* filename) { - JA_Sound_t *sound = (JA_Sound_t*)Mix_LoadWAV(filename); - return sound; -} - -int JA_PlaySound(JA_Sound_t *sound, const int loop) { - return Mix_PlayChannel(-1, (Mix_Chunk*)sound, loop); -} - -void JA_DeleteSound(JA_Sound_t *sound) { - Mix_FreeChunk((Mix_Chunk*)sound); -} - -void JA_PauseChannel(const int channel) { - Mix_Pause(channel); -} - -void JA_ResumeChannel(const int channel) { - Mix_Resume(channel); -} - -void JA_StopChannel(const int channel) { - Mix_HaltChannel(channel); -} - -JA_Channel_state JA_GetChannelState(const int channel) { - if (Mix_Paused(channel)) { - return JA_CHANNEL_PAUSED; - } else if (Mix_Playing(channel)) { - return JA_CHANNEL_PLAYING; - } else { - return JA_CHANNEL_FREE; - } -} - -int JA_SetVolume(int volume) { - return Mix_Volume(-1, volume); -} -#endif diff --git a/source/common/jscore.cpp b/source/common/jscore.cpp deleted file mode 100644 index bb9e7cd..0000000 --- a/source/common/jscore.cpp +++ /dev/null @@ -1,154 +0,0 @@ -#include "jscore.h" -#include -#include -#include -#include -#ifdef _WIN32 - #include -#else - #include - #include - #include -#endif -#include -#include -#include - -namespace jscore { - - using namespace std; - struct user { - string name; - int points; - }; - vector score; - - #define bzero(b,len) (memset((b), '\0', (len)), (void) 0) - int sock; - struct sockaddr_in client; - - int PORT = 9911; - string HOST = "jaildoctor.duckdns.org"; - -#ifdef WIN32 - WSADATA WsaData; -#endif - - bool jscore_error = false; - string error_message; - - void init(std::string host, const int port) { - PORT = port; - HOST = host; - } - - void setErrorMessage(string message) { - jscore_error = true; - error_message = message; - } - - string sendRequest(const string request) { -#ifdef WIN32 - int ret = WSAStartup(0x101,&WsaData); - if (ret != 0) return 0; -#endif - struct hostent * host = gethostbyname(HOST.c_str()); - - if ( (host == NULL) || (host->h_addr == NULL) ) { - setErrorMessage("Error retrieving DNS information.\n"); - return ""; - } - - bzero(&client, sizeof(client)); - client.sin_family = AF_INET; - client.sin_port = htons( PORT ); - memcpy(&client.sin_addr, host->h_addr, host->h_length); - - sock = socket(AF_INET, SOCK_STREAM, 0); - - if (sock < 0) { - setErrorMessage("Error creating socket.\n"); - return ""; - } - - if ( connect(sock, (struct sockaddr *)&client, sizeof(client)) < 0 ) { - close(sock); - setErrorMessage("Could not connect\n"); - return ""; - } - - string r = request + " HTTP/1.1\r\nHost: "+HOST+"\r\nConnection: close\r\n\r\n\r\n"; - if (send(sock, r.c_str(), r.length(), 0) != (int)r.length()) { - setErrorMessage("Error sending request.\n"); - return ""; - } - - char cur; - char start[5]="\r\n\r\n"; - int pos = 0; - while ( recv(sock, &cur, 1,0) > 0 ) { - if (cur==start[pos]) { pos++; if (pos == 4) break; } else { pos = 0; } - } - - char buffer[1024]; buffer[0]=0; pos=0; - while ( recv(sock, &cur, 1,0) > 0 ) { - buffer[pos] = cur; - pos++; - } -#ifdef WIN32 - WSACleanup(); -#endif - buffer[pos]=0; - return buffer; - } - - const bool initOnlineScore(string game) { - string strbuff = sendRequest("GET /score-list.php?game=" + game); - if (jscore_error) return not jscore_error; - - user u; - char buffer[1024]; - strcpy(buffer, strbuff.c_str()); - char *str = buffer; - char *p = str; - score.clear(); - while (*p!=0) { - while (*p!=',') {p++;} - *p=0; u.name = str; p++; str=p; - while (*p!='\n') {p++;} - *p=0; u.points = atoi(str); p++; str=p; - score.push_back(u); - } - return not jscore_error; - } - - const int getNumUsers() { - return score.size(); - } - string getUserName(const int index) { - return score[index].name; - } - const int getPoints(const int index) { - return score[index].points; - } - - const bool updateUserPoints(string game, string user, const int points) { - string strbuff = sendRequest("GET /score-update.php?game=" + game + "&user=" + user + "&points=" + to_string(points)); - initOnlineScore(game); - return not jscore_error; - } - - const int getUserPoints(string game, std::string user) { - return atoi(sendRequest("GET /getuserpoints.php?game=" + game + "&user=" + user).c_str()); - } - - string getUserData(string game, string user) { - return sendRequest("GET /getuserdata.php?game=" + game + "&user=" + user); - } - - void setUserData(string game, string user, string data) { - sendRequest("GET /setuserdata.php?game=" + game + "&user=" + user + "&data=" + data); - } - -}; - diff --git a/source/common/jscore.h b/source/common/jscore.h deleted file mode 100644 index 8378a4a..0000000 --- a/source/common/jscore.h +++ /dev/null @@ -1,16 +0,0 @@ -#pragma once -#include - -namespace jscore { - void init(std::string host, const int port); - const bool initOnlineScore(std::string game); - const int getNumUsers(); - std::string getUserName(const int index); - const int getPoints(const int index); - const int getUserPoints(std::string game, std::string user); - - const bool updateUserPoints(std::string game, std::string user, const int points); - std::string getUserData(std::string game, std::string user); - void setUserData(std::string game, std::string user, std::string data); -}; - diff --git a/source/common/notify.cpp b/source/common/notify.cpp deleted file mode 100644 index 376ed07..0000000 --- a/source/common/notify.cpp +++ /dev/null @@ -1,285 +0,0 @@ -#include "notify.h" -#include -#include -#include - -// Constructor -Notify::Notify(SDL_Renderer *renderer, std::string iconFile, std::string bitmapFile, std::string textFile, std::string soundFile, options_t *options) -{ - // Inicializa variables - this->renderer = renderer; - this->options = options; - bgColor = options->notifications.color; - waitTime = 300; - - // Crea objetos - iconTexture = new Texture(renderer, iconFile); - textTexture = new Texture(renderer, bitmapFile); - text = new Text(textFile, textTexture, renderer); - sound = JA_LoadSound(soundFile.c_str()); -} - -// Destructor -Notify::~Notify() -{ - // Libera la memoria de los objetos - delete textTexture; - delete iconTexture; - delete text; - JA_DeleteSound(sound); - - for (auto notification : notifications) - { - delete notification.sprite; - delete notification.texture; - } -} - -// Dibuja las notificaciones por pantalla -void Notify::render() -{ - for (int i = (int)notifications.size() - 1; i >= 0; --i) - { - notifications[i].sprite->render(); - } -} - -// Actualiza el estado de las notificaiones -void Notify::update() -{ - for (int i = 0; i < (int)notifications.size(); ++i) - { - // Si la notificación anterior está "saliendo", no hagas nada - if (i > 0) - { - if (notifications[i - 1].state == ns_rising) - { - break; - } - } - - notifications[i].counter++; - - // Hace sonar la notificación en el primer frame - if (notifications[i].counter == 1) - { - if (options->notifications.sound) - { - if (notifications[i].state == ns_rising) - { // Reproduce el sonido de la notificación - JA_PlaySound(sound); - } - } - } - - // Comprueba los estados - if (notifications[i].state == ns_rising) - { - const float step = ((float)notifications[i].counter / notifications[i].travelDist); - const int alpha = 255 * step; - - if (options->notifications.posV == pos_top) - { - notifications[i].rect.y++; - } - else - { - notifications[i].rect.y--; - } - notifications[i].texture->setAlpha(alpha); - - if (notifications[i].rect.y == notifications[i].y) - { - notifications[i].state = ns_stay; - notifications[i].texture->setAlpha(255); - notifications[i].counter = 0; - } - } - - else if (notifications[i].state == ns_stay) - { - if (notifications[i].counter == waitTime) - { - notifications[i].state = ns_vanishing; - notifications[i].counter = 0; - } - } - else if (notifications[i].state == ns_vanishing) - { - - const float step = (notifications[i].counter / (float)notifications[i].travelDist); - const int alpha = 255 * (1 - step); - - if (options->notifications.posV == pos_top) - { - notifications[i].rect.y--; - } - else - { - notifications[i].rect.y++; - } - notifications[i].texture->setAlpha(alpha); - - if (notifications[i].rect.y == notifications[i].y - notifications[i].travelDist) - { - notifications[i].state = ns_finished; - } - } - - notifications[i].sprite->setRect(notifications[i].rect); - } - - clearFinishedNotifications(); -} - -// Elimina las notificaciones finalizadas -void Notify::clearFinishedNotifications() -{ - for (int i = (int)notifications.size() - 1; i >= 0; --i) - { - if (notifications[i].state == ns_finished) - { - delete notifications[i].sprite; - delete notifications[i].texture; - notifications.erase(notifications.begin() + i); - } - } -} - -// Muestra una notificación de texto por pantalla; -void Notify::showText(std::string text1, std::string text2, int icon) -{ - // Inicializa variables - const int iconSize = 16; - const int padding = text->getCharacterSize(); - const int iconSpace = icon >= 0 ? iconSize + padding : 0; - const std::string txt = text1.length() > text2.length() ? text1 : text2; - const int width = text->lenght(txt) + (padding * 2) + iconSpace; - const int height = (text->getCharacterSize() * 2) + (padding * 2); - - // Posición horizontal - int despH = 0; - if (options->notifications.posH == pos_left) - { - despH = padding; - } - else if (options->notifications.posH == pos_middle) - { - despH = ((options->screen.windowWidth * options->windowSize) / 2 - (width / 2)); - } - else - { - despH = (options->screen.windowWidth * options->windowSize) - width - padding; - } - - // Posición vertical - int despV = 0; - if (options->notifications.posV == pos_top) - { - despV = padding; - } - else - { - despV = (options->screen.windowHeight * options->windowSize) - height - padding; - } - - const int travelDist = height + padding; - - // Offset - int offset = 0; - if (options->notifications.posV == pos_top) - { - offset = (int)notifications.size() > 0 ? notifications.back().y + travelDist : despV; - } - else - { - offset = (int)notifications.size() > 0 ? notifications.back().y - travelDist : despV; - } - - // Crea la notificacion - notification_t n; - - // Inicializa variables - n.y = offset; - n.travelDist = travelDist; - n.counter = 0; - n.state = ns_rising; - n.text1 = text1; - n.text2 = text2; - if (options->notifications.posV == pos_top) - { - n.rect = {despH, offset - travelDist, width, height}; - } - else - { - n.rect = {despH, offset + travelDist, width, height}; - } - - // Crea la textura - n.texture = new Texture(renderer); - n.texture->createBlank(renderer, width, height, SDL_TEXTUREACCESS_TARGET); - n.texture->setBlendMode(SDL_BLENDMODE_BLEND); - - // Prepara para dibujar en la textura - n.texture->setAsRenderTarget(renderer); - - // Dibuja el fondo de la notificación - SDL_SetRenderDrawColor(renderer, bgColor.r, bgColor.g, bgColor.b, 255); - SDL_Rect rect; - rect = {4, 0, width - (4 * 2), height}; - SDL_RenderFillRect(renderer, &rect); - - rect = {4 / 2, 1, width - 4, height - 2}; - SDL_RenderFillRect(renderer, &rect); - - rect = {1, 4 / 2, width - 2, height - 4}; - SDL_RenderFillRect(renderer, &rect); - - rect = {0, 4, width, height - (4 * 2)}; - SDL_RenderFillRect(renderer, &rect); - - // Dibuja el icono de la notificación - if (icon >= 0) - { - Sprite *sp = new Sprite({0, 0, iconSize, iconSize}, iconTexture, renderer); - sp->setPos({padding, padding, iconSize, iconSize}); - sp->setSpriteClip({iconSize * (icon % 10), iconSize * (icon / 10), iconSize, iconSize}); - sp->render(); - delete sp; - } - - // Escribe el texto de la notificación - color_t color = {255, 255, 255}; - if (text2 != "") - { // Dos lineas de texto - text->writeColored(padding + iconSpace, padding, text1, color); - text->writeColored(padding + iconSpace, padding + text->getCharacterSize() + 1, text2, color); - } - else - { // Una linea de texto - text->writeColored(padding + iconSpace, (height / 2) - (text->getCharacterSize() / 2), text1, color); - } - - // Deja de dibujar en la textura - SDL_SetRenderTarget(renderer, nullptr); - - // Crea el sprite de la notificación - n.sprite = new Sprite(n.rect, n.texture, renderer); - - // Deja la notificación invisible - n.texture->setAlpha(0); - - // Añade la notificación a la lista - notifications.push_back(n); -} - -// Indica si hay notificaciones activas -bool Notify::active() -{ - if ((int)notifications.size() > 0) - { - return true; - } - - return false; -} \ No newline at end of file diff --git a/source/common/notify.h b/source/common/notify.h deleted file mode 100644 index d73a0b6..0000000 --- a/source/common/notify.h +++ /dev/null @@ -1,87 +0,0 @@ -#pragma once - -#include -#include "jail_audio.h" -#include "sprite.h" -#include "text.h" -#include "texture.h" -#include "utils.h" -#include - -#ifndef NOTIFY_H -#define NOTIFY_H - -class Notify -{ -private: - enum notification_state_e - { - ns_rising, - ns_stay, - ns_vanishing, - ns_finished - }; - - enum notification_position_e - { - upperLeft, - upperCenter, - upperRight, - middleLeft, - middleRight, - bottomLeft, - bottomCenter, - bottomRight - }; - - struct notification_t - { - std::string text1; - std::string text2; - int counter; - notification_state_e state; - notification_position_e position; - Texture *texture; - Sprite *sprite; - SDL_Rect rect; - int y; - int travelDist; - }; - - // Objetos y punteros - SDL_Renderer *renderer; // El renderizador de la ventana - Texture *textTexture; // Textura para la fuente de las notificaciones - Texture *iconTexture; // Textura para los iconos de las notificaciones - Text *text; // Objeto para dibujar texto - options_t *options; // Variable con todas las opciones del programa - - // Variables - color_t bgColor; // Color de fondo de las notificaciones - int waitTime; // Tiempo que se ve la notificación - std::vector notifications; // La lista de notificaciones activas - JA_Sound_t *sound; // Sonido a reproducir cuando suena la notificación - - // Elimina las notificaciones finalizadas - void clearFinishedNotifications(); - -public: - // Dibuja las notificaciones por pantalla - void render(); - - // Actualiza el estado de las notificaiones - void update(); - - // Constructor - Notify(SDL_Renderer *renderer, std::string iconFile, std::string bitmapFile, std::string textFile, std::string soundFile, options_t *options); - - // Destructor - ~Notify(); - - // Muestra una notificación de texto por pantalla; - void showText(std::string text1 = "", std::string text2 = "", int icon = -1); - - // Indica si hay notificaciones activas - bool active(); -}; - -#endif diff --git a/source/const.h b/source/const.h index c3e0f42..4730344 100644 --- a/source/const.h +++ b/source/const.h @@ -1,12 +1,9 @@ #pragma once #include -#include "common/utils.h" +#include "utils.h" #include "lang.h" -#ifndef CONST_H -#define CONST_H - // Tamaño de bloque #define BLOCK 8 #define HALF_BLOCK BLOCK / 2 @@ -60,6 +57,4 @@ const int GAMECANVAS_THIRD_QUARTER_Y = (GAMECANVAS_HEIGHT / 4) * 3; // Colores const color_t bgColor = {0x27, 0x27, 0x36}; const color_t noColor = {0xFF, 0xFF, 0xFF}; -const color_t shdwTxtColor = {0x43, 0x43, 0x4F}; - -#endif \ No newline at end of file +const color_t shdwTxtColor = {0x43, 0x43, 0x4F}; \ No newline at end of file diff --git a/source/director.cpp b/source/director.cpp index cd51348..fee323b 100644 --- a/source/director.cpp +++ b/source/director.cpp @@ -1,5 +1,4 @@ -#include "common/jscore.h" -#include "common/utils.h" +#include "utils.h" #include "const.h" #include "director.h" #include @@ -60,9 +59,6 @@ Director::Director(int argc, char *argv[]) initInput(); screen = new Screen(window, renderer, asset, options); - - // Inicializa los servicios online - initOnline(); } Director::~Director() @@ -240,9 +236,6 @@ bool Director::setFileList() asset->add(prefix + "/data/config/demo.bin", t_data); asset->add(prefix + "/data/config/gamecontrollerdb.txt", t_data); - // Notificaciones - asset->add(prefix + "/data/notifications/notify.png", t_bitmap); - // Musicas asset->add(prefix + "/data/music/intro.ogg", t_music); asset->add(prefix + "/data/music/playing.ogg", t_music); @@ -266,7 +259,6 @@ bool Director::setFileList() asset->add(prefix + "/data/sound/title.wav", t_sound); asset->add(prefix + "/data/sound/clock.wav", t_sound); asset->add(prefix + "/data/sound/powerball.wav", t_sound); - asset->add(prefix + "/data/sound/notify.wav", t_sound); // Texturas asset->add(prefix + "/data/gfx/balloon1.png", t_bitmap); @@ -398,24 +390,6 @@ void Director::initOptions() options->difficulty = DIFFICULTY_NORMAL; options->language = ba_BA; options->console = false; - - // Opciones online - options->online.enabled = false; - options->online.server = "jaildoctor.duckdns.org"; - options->online.port = 9911; -#ifdef DEBUG - options->online.gameID = "coffee_crisis_test2"; -#else - options->online.gameID = "coffee_crisis"; -#endif - options->online.jailerID = ""; - options->online.score = 0; - - // Opciones de las notificaciones - options->notifications.posV = pos_top; - options->notifications.posH = pos_left; - options->notifications.sound = true; - options->notifications.color = {48, 48, 48}; } // Comprueba los parametros del programa @@ -634,41 +608,6 @@ bool Director::saveConfigFile() file << "input0=" + std::to_string(options->input[0].deviceType) + "\n"; file << "input1=" + std::to_string(options->input[1].deviceType) + "\n"; - // Opciones sobre la conexión online - file << "\n## ONLINE OPTIONS\n"; - file << "enabled=" + boolToString(options->online.enabled) + "\n"; - file << "server=" + options->online.server + "\n"; - file << "port=" + std::to_string(options->online.port) + "\n"; - file << "jailerID=" + options->online.jailerID + "\n"; - - // Opciones de las notificaciones - file << "\n## NOTIFICATION OPTIONS\n"; - file << "## notifications.posV = pos_top | pos_bottom\n"; - if (options->notifications.posV == pos_top) - { - file << "notifications.posV=pos_top\n"; - } - else - { - file << "notifications.posV=pos_bottom\n"; - } - - file << "## notifications.posH = pos_left | pos_middle | pos_right\n"; - if (options->notifications.posH == pos_left) - { - file << "notifications.posH=pos_left\n"; - } - else if (options->notifications.posH == pos_middle) - { - file << "notifications.posH=pos_middle\n"; - } - else - { - file << "notifications.posH=pos_right\n"; - } - - file << "notifications.sound=" + boolToString(options->notifications.sound) + "\n"; - // Cierra el fichero file.close(); @@ -730,66 +669,6 @@ void Director::run() } } -// Inicializa los servicios online -void Director::initOnline() -{ - if (options->online.sessionEnabled) - { // Si ya ha iniciado la sesión, que no continue - return; - } - - if (options->online.jailerID == "") - { // Jailer ID no definido - options->online.enabled = false; - } - else - { // Jailer ID iniciado - options->online.enabled = options->online.sessionEnabled = true; - // Establece el servidor y el puerto - jscore::init(options->online.server, options->online.port); -#ifdef DEBUG - const std::string caption = options->online.jailerID + " (DEBUG)"; -#else - const std::string caption = options->online.jailerID; -#endif - // screen->showNotification(caption, lang->getText(85), 12); - screen->showNotification(caption, lang->getText(85)); - if (options->console) - { - std::cout << caption << std::endl; - } - - // Obtiene la información de puntuaciones online - if (!jscore::initOnlineScore(options->online.gameID)) - { - screen->showNotification(lang->getText(80), options->online.server); - if (options->console) - { - std::cout << "Can't connect to " << options->online.server << std::endl; - } - - options->online.enabled = false; - - return; - } - - // Obten la puntuación online para el jailerID - const int points = jscore::getUserPoints(options->online.gameID, options->online.jailerID); - if (points == 0) - { // Fallo de conexión o no hay registros - screen->showNotification(lang->getText(81), lang->getText(82)); - if (options->console) - { - std::cout << "Can't get online scores" << std::endl; - } - } - else - { - options->online.score = points; - } - } -} - // Asigna variables a partir de dos cadenas bool Director::setOptions(options_t *options, std::string var, std::string value) { @@ -885,65 +764,6 @@ bool Director::setOptions(options_t *options, std::string var, std::string value options->input[1].deviceType = std::stoi(value); } - // Opciones onlince - else if (var == "enabled") - { - options->online.enabled = stringToBool(value); - } - - else if (var == "server") - { - options->online.server = value; - } - - else if (var == "port") - { - if (value == "") - { - value = "0"; - } - options->online.port = std::stoi(value); - } - - else if (var == "jailerID") - { - options->online.jailerID = toLower(value); - } - - // Opciones de notificaciones - else if (var == "notifications.posH") - { - if (value == "pos_left") - { - options->notifications.posH = pos_left; - } - else if (value == "pos_middle") - { - options->notifications.posH = pos_middle; - } - else - { - options->notifications.posH = pos_right; - } - } - - else if (var == "notifications.posV") - { - if (value == "pos_top") - { - options->notifications.posV = pos_top; - } - else - { - options->notifications.posV = pos_bottom; - } - } - - else if (var == "notifications.sound") - { - options->notifications.sound = stringToBool(value); - } - // Lineas vacias o que empiezan por comentario else if (var == "" || var.substr(0, 1) == "#") { diff --git a/source/director.h b/source/director.h index 89da7c8..b4d9426 100644 --- a/source/director.h +++ b/source/director.h @@ -3,17 +3,17 @@ #include #include "balloon.h" #include "bullet.h" -#include "common/asset.h" -#include "common/input.h" -#include "common/jail_audio.h" -#include "common/menu.h" -#include "common/movingsprite.h" -#include "common/screen.h" -#include "common/smartsprite.h" -#include "common/sprite.h" -#include "common/text.h" -#include "common/utils.h" -#include "common/writer.h" +#include "asset.h" +#include "input.h" +#include "jail_audio.h" +#include "menu.h" +#include "movingsprite.h" +#include "screen.h" +#include "smartsprite.h" +#include "sprite.h" +#include "text.h" +#include "utils.h" +#include "writer.h" #include "const.h" #include "fade.h" #include "game.h" @@ -23,9 +23,6 @@ #include "player.h" #include "title.h" -#ifndef DIRECTOR_H -#define DIRECTOR_H - // Textos #define WINDOW_CAPTION "Coffee Crisis" @@ -59,9 +56,6 @@ private: // Inicializa el objeto input void initInput(); - // Inicializa los servicios online - void initOnline(); - // Inicializa las opciones del programa void initOptions(); @@ -105,5 +99,3 @@ public: // Bucle principal void run(); }; - -#endif diff --git a/source/enter_id.cpp b/source/enter_id.cpp deleted file mode 100644 index 6eb170d..0000000 --- a/source/enter_id.cpp +++ /dev/null @@ -1,348 +0,0 @@ -#include "common/jail_audio.h" -#include "common/jscore.h" -#include "const.h" -#include "enter_id.h" -#include - -// Constructor -EnterID::EnterID(SDL_Renderer *renderer, Screen *screen, Asset *asset, Lang *lang, options_t *options, section_t *section) -{ - // Copia la dirección de los objetos - this->renderer = renderer; - this->screen = screen; - this->asset = asset; - this->lang = lang; - this->options = options; - this->section = section; - - // Reserva memoria para los punteros - eventHandler = new SDL_Event(); - texture = new Texture(renderer, asset->get("smb2.png")); - text = new Text(asset->get("smb2.txt"), texture, renderer); - - // Crea la textura para el texto que se escribe en pantalla - textTexture = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_TARGET, GAMECANVAS_WIDTH, GAMECANVAS_HEIGHT); - if (textTexture == nullptr) - { - if (options->console) - { - std::cout << "Error: textTexture could not be created!\nSDL Error: " << SDL_GetError() << std::endl; - } - } - SDL_SetTextureBlendMode(textTexture, SDL_BLENDMODE_BLEND); - - // Inicializa variables - oldJailerID = options->online.jailerID; - loopRunning = true; - counter = 0; - ticks = 0; - ticksSpeed = 15; - jailerIDPos = 0; - initName(); - - // Escribe el texto en la textura - fillTexture(); -} - -// Destructor -EnterID::~EnterID() -{ - delete eventHandler; - delete text; - delete texture; -} - -// Bucle principal -void EnterID::run() -{ - while (loopRunning) - { - update(); - checkEvents(); - render(); - } -} - -// Comprueba el manejador de eventos -void EnterID::checkEvents() -{ - // Comprueba los eventos que hay en la cola - while (SDL_PollEvent(eventHandler) != 0) - { - // Evento de salida de la aplicación - if (eventHandler->type == SDL_QUIT) - { - section->name = SECTION_PROG_QUIT; - loopRunning = false; - break; - } - - // Comprueba las teclas que se han pulsado - if ((eventHandler->type == SDL_KEYDOWN && eventHandler->key.repeat == 0) || (eventHandler->type == SDL_JOYBUTTONDOWN)) - { - if (eventHandler->key.keysym.scancode == SDL_SCANCODE_RETURN) - { - options->online.jailerID = toLower((std::string)name); - endSection(); - break; - } - - if (eventHandler->key.keysym.scancode >= SDL_SCANCODE_A && eventHandler->key.keysym.scancode <= SDL_SCANCODE_Z) - { // Si pulsa una letra - if (pos < maxLenght) - { - name[pos++] = eventHandler->key.keysym.scancode + 61; - name[pos] = 0; - } - } - - else if (eventHandler->key.keysym.scancode >= SDL_SCANCODE_1 && eventHandler->key.keysym.scancode <= SDL_SCANCODE_9) - { // Si pulsa un número - if (pos < maxLenght) - { // En ascii el '0' va antes del '1', pero en scancode el '0' va despues de '9' - name[pos++] = eventHandler->key.keysym.scancode + 19; - name[pos] = 0; - } - } - - else if (eventHandler->key.keysym.scancode == SDL_SCANCODE_0) - { - if (pos < maxLenght) - { - name[pos++] = 48; - name[pos] = 0; - } - } - - else if (eventHandler->key.keysym.scancode == SDL_SCANCODE_BACKSPACE) - { - if (pos > 0) - { - name[--pos] = 0; - } - } - - else if (eventHandler->key.keysym.scancode == SDL_SCANCODE_ESCAPE) - { - section->name = SECTION_PROG_QUIT; - loopRunning = false; - break; - } - - else if (eventHandler->key.keysym.scancode == SDL_SCANCODE_F1) - { - screen->setWindowSize(1); - break; - } - - else if (eventHandler->key.keysym.scancode == SDL_SCANCODE_F2) - { - screen->setWindowSize(2); - break; - } - - else if (eventHandler->key.keysym.scancode == SDL_SCANCODE_F3) - { - screen->setWindowSize(3); - break; - } - - else if (eventHandler->key.keysym.scancode == SDL_SCANCODE_F4) - { - screen->setWindowSize(4); - break; - } - } - } -} - -// Actualiza las variables -void EnterID::update() -{ - // Comprueba que la diferencia de ticks sea mayor a la velocidad del juego - if (SDL_GetTicks() - ticks > ticksSpeed) - { - // Actualiza el contador de ticks - ticks = SDL_GetTicks(); - - // Actualiza el contador - counter++; - - // Actualiza el cursor - cursor = (counter % 20 >= 10) ? " " : "_"; - - // Actualiza las notificaciones - screen->updateNotifier(); - } -} - -// Dibuja en pantalla -void EnterID::render() -{ - // Prepara para empezar a dibujar en la textura de juego - screen->start(); - - // Dibuja la textura con el texto en pantalla - SDL_RenderCopy(renderer, textTexture, nullptr, nullptr); - - // Escribe el jailerID - const std::string jailerID = (std::string)name + cursor; - const color_t color = stringToColor(options->palette, "white"); - text->writeDX(TXT_CENTER | TXT_COLOR, GAMECANVAS_CENTER_X, jailerIDPos, jailerID, 1, color); - - // Vuelca el contenido del renderizador en pantalla - screen->blit(); -} - -// Inicializa los textos -void EnterID::iniTexts() -{ - const color_t orangeColor = {0xFF, 0x7A, 0x00}; - const color_t noColor = {0xFF, 0xFF, 0xFF}; - - texts.clear(); - texts.push_back({lang->getText(89), orangeColor}); - texts.push_back({"", noColor}); - texts.push_back({lang->getText(90), noColor}); - texts.push_back({lang->getText(91), noColor}); - texts.push_back({lang->getText(92), noColor}); - texts.push_back({"", noColor}); - texts.push_back({"", noColor}); - texts.push_back({"", noColor}); - texts.push_back({"JAILER_ID:", orangeColor}); -} - -// Escribe el texto en la textura -void EnterID::fillTexture() -{ - const color_t shdwTxtColor = {0x43, 0x43, 0x4F}; - - // Inicializa los textos - iniTexts(); - - // Rellena la textura con un color de fondo - SDL_SetRenderTarget(renderer, textTexture); - SDL_SetRenderDrawColor(renderer, bgColor.r, bgColor.g, bgColor.b, 0xFF); - SDL_RenderClear(renderer); - - // Añade el efecto de degradado en el fondo - //Texture *gradient = new Texture(renderer, asset->get("title_gradient.png")); - //SDL_Rect rect = {0, 0, GAMECANVAS_WIDTH, GAMECANVAS_HEIGHT}; - //gradient->render(renderer, 0, 0, &rect); - //delete gradient; - - // Escribe el texto en la textura - const int desp = 40; - const int size = text->getCharacterSize() + 2; - int i = 0; - - for (auto t : texts) - { - text->writeDX(TXT_CENTER | TXT_COLOR | TXT_SHADOW, PLAY_AREA_CENTER_X, (i * size) + desp, t.label, 1, t.color, 1, shdwTxtColor); - i++; - } - jailerIDPos = ((i + 1) * size) + desp; - - SDL_SetRenderTarget(renderer, nullptr); -} - -// Inicializa los servicios online -void EnterID::initOnline() -{ - // Si ya ha iniciado la sesión y no ha cambiado el jailerID, que no continue - if (options->online.sessionEnabled) - { - if (oldJailerID == options->online.jailerID) - { - return; - } - } - - if (options->online.jailerID == "") - { // Jailer ID no definido - options->online.enabled = false; - options->online.sessionEnabled = false; - } - else - { // Jailer ID iniciado - options->online.enabled = options->online.sessionEnabled = true; - // Establece el servidor y el puerto - jscore::init(options->online.server, options->online.port); -#ifdef DEBUG - const std::string caption = options->online.jailerID + " (DEBUG)"; -#else - const std::string caption = options->online.jailerID; -#endif - // screen->showNotification(caption, lang->getText(85), 12); - screen->showNotification(caption, lang->getText(85)); - if (options->console) - { - std::cout << caption << std::endl; - } - - // Obtiene la información de puntuaciones online - if (!jscore::initOnlineScore(options->online.gameID)) - { - screen->showNotification(lang->getText(80), options->online.server); - if (options->console) - { - std::cout << "Can't connect to " << options->online.server << std::endl; - } - - options->online.enabled = false; - - return; - } - - // Obten la puntuación online para el jailerID - const int points = jscore::getUserPoints(options->online.gameID, options->online.jailerID); - if (points == 0) - { // Fallo de conexión o no hay registros - screen->showNotification(lang->getText(81), lang->getText(82)); - if (options->console) - { - std::cout << "Can't get online scores" << std::endl; - } - } - else - { - options->online.score = points; - } - } -} - -// Termina la sección -void EnterID::endSection() -{ - loopRunning = false; - initOnline(); -} - -// Inicializa el vector utilizado para almacenar el texto que se escribe en pantalla -void EnterID::initName() -{ - // Calcula el tamaño del vector - name[0] = 0; - maxLenght = sizeof(name) / sizeof(name[pos]); - - // Inicializa el vector con ceros - for (int i = 0; i < maxLenght; ++i) - { - name[i] = 0; - } - - // Si no hay definido ningun JailerID, coloca el cursor en primera posición - if (options->online.jailerID == "") - { - pos = 0; - } - else - { // En caso contrario, copia el texto al vector y coloca el cursor en posición - const int len = std::min((int)options->online.jailerID.size(), maxLenght); - for (int i = 0; i < len; ++i) - { - name[i] = (char)options->online.jailerID[i]; - } - pos = len; - } -} \ No newline at end of file diff --git a/source/enter_id.h b/source/enter_id.h deleted file mode 100644 index ede8bbf..0000000 --- a/source/enter_id.h +++ /dev/null @@ -1,85 +0,0 @@ -#pragma once - -#include -#include "common/asset.h" -#include "common/screen.h" -#include "common/utils.h" -#include "common/text.h" -#include "common/texture.h" -#include -#include - -#ifndef ENTER_ID_H -#define ENTER_ID_H - -class EnterID -{ -private: - struct captions_t - { - std::string label; // Texto a escribir - color_t color; // Color del texto - }; - - // Punteros y objetos - Asset *asset; // Objeto con los ficheros de recursos - options_t *options; // Puntero a las opciones del juego - Screen *screen; // Objeto encargado de dibujar en pantalla - Lang *lang; // Objeto para gestionar los textos en diferentes idiomas - SDL_Event *eventHandler; // Manejador de eventos - SDL_Renderer *renderer; // El renderizador de la ventana - SDL_Texture *textTexture; // Textura para dibujar el texto - Text *text; // Objeto para escribir texto en pantalla - Texture *texture; // Textura para la fuente para el texto - section_t *section; // Estado del bucle principal para saber si continua o se sale - - // Variables - bool loopRunning; // Indica si ha de terminar el bucle principal - int counter; // Contador - Uint32 ticks; // Contador de ticks para ajustar la velocidad del programa - Uint32 ticksSpeed; // Velocidad a la que se repiten los bucles del programa - std::vector texts; // Vector con los textos - std::string cursor; // Contiene el caracter que se muestra como cursor - - char name[15]; // Aqui se guardan los caracteres de las teclas que se van pulsando - int pos; // Posición actual en el vector name - int maxLenght; // Tamaño máximo del jailerID - std::string oldJailerID; // Almacena el valor de jailerID al inicio para ver si se ha modificado - int jailerIDPos; // Posición en el eje Y donde ser va a escribir el texto - - // Actualiza las variables - void update(); - - // Dibuja en pantalla - void render(); - - // Comprueba el manejador de eventos - void checkEvents(); - - // Inicializa los textos - void iniTexts(); - - // Escribe el texto en la textura - void fillTexture(); - - // Inicializa los servicios online - void initOnline(); - - // Termina la sección - void endSection(); - - // Inicializa el vector utilizado para almacenar el texto que se escribe en pantalla - void initName(); - -public: - // Constructor - EnterID(SDL_Renderer *renderer, Screen *screen, Asset *asset, Lang *lang, options_t *options, section_t *section); - - // Destructor - ~EnterID(); - - // Bucle principal - void run(); -}; - -#endif diff --git a/source/fade.h b/source/fade.h index d1890a3..1a0e478 100644 --- a/source/fade.h +++ b/source/fade.h @@ -1,10 +1,7 @@ #pragma once #include -#include "common/texture.h" - -#ifndef FADE_H -#define FADE_H +#include "texture.h" // Tipos de fundido #define FADE_FULLSCREEN 0 @@ -52,6 +49,4 @@ public: // Establece el tipo de fade void setFadeType(Uint8 fadeType); -}; - -#endif \ No newline at end of file +}; \ No newline at end of file diff --git a/source/game.cpp b/source/game.cpp index e917222..a01bd3b 100644 --- a/source/game.cpp +++ b/source/game.cpp @@ -1,5 +1,4 @@ #include "game.h" -#include "common/jscore.h" // Constructor Game::Game(int numPlayers, int currentStage, SDL_Renderer *renderer, Screen *screen, Asset *asset, Lang *lang, Input *input, bool demo, options_t *options, section_t *section) @@ -69,7 +68,6 @@ Game::Game(int numPlayers, int currentStage, SDL_Renderer *renderer, Screen *scr Game::~Game() { saveScoreFile(); - sendOnlineScore(); saveDemoFile(); // Restaura el metodo de control @@ -773,38 +771,6 @@ bool Game::saveScoreFile() return success; } -// Sube la puntuación online -bool Game::sendOnlineScore() -{ - if (!options->online.enabled) - { - return true; - } - - if (demo.enabled) - { - return true; - } - - const int score = players[0]->getScore(); - if (score <= options->online.score) - { - return true; - } - - if (jscore::updateUserPoints(options->online.gameID, options->online.jailerID, score)) - { - options->online.score = score; - screen->showNotification(lang->getText(86) + std::to_string(score), "", 2); - return true; - } - else - { - screen->showNotification(lang->getText(86), lang->getText(87)); - return false; - } -} - // Guarda el fichero de datos para la demo bool Game::saveDemoFile() { @@ -1621,12 +1587,6 @@ void Game::updateHiScore() // Actualiza la máxima puntuación hiScore = player->getScore(); - // Cambia el nombre del jugador con la máxima puntuación - if (options->online.enabled) - { - hiScoreName = options->online.jailerID.substr(0, 12) + " - "; - } - // Almacena la máxima puntuación en el fichero junto con un checksum scoreDataFile[0] = hiScore; scoreDataFile[1] = hiScore % 43; @@ -2793,9 +2753,6 @@ void Game::update() // Actualiza el contador de ticks ticks = SDL_GetTicks(); - // Actualiza las notificaciones - screen->updateNotifier(); - // Actualiza el contador de juego counter++; @@ -3400,9 +3357,6 @@ void Game::updatePausedGame() // Actualiza el contador de ticks ticks = SDL_GetTicks(); - // Actualiza las notificaciones - screen->updateNotifier(); - if (leavingPauseMenu) { if (pauseCounter > 0) @@ -3545,9 +3499,6 @@ void Game::updateGameOverScreen() // Actualiza el contador de ticks ticks = SDL_GetTicks(); - // Actualiza las notificaciones - screen->updateNotifier(); - // Actualiza la lógica del menu gameOverMenu->update(); @@ -3693,9 +3644,6 @@ void Game::runGameOverScreen() // Guarda los puntos saveScoreFile(); - // Sube la puntuación online - sendOnlineScore(); - // Reinicia el menu gameOverMenu->reset(); @@ -3985,23 +3933,5 @@ void Game::setHiScore() { // Carga el fichero de puntos loadScoreFile(); - - // Establece el resto de variables - if (options->online.enabled) - { - if (jscore::getNumUsers() > 0) - { - hiScoreName = jscore::getUserName(0).substr(0, 12) + " - "; - hiScore = (Uint32)jscore::getPoints(0); - } - else - { - hiScoreName = "Bacteriol - "; - hiScore = 10; - } - } - else - { - hiScoreName = ""; - } + hiScoreName = ""; } \ No newline at end of file diff --git a/source/game.h b/source/game.h index 3e111c4..4ad19dc 100644 --- a/source/game.h +++ b/source/game.h @@ -3,26 +3,23 @@ #include #include "balloon.h" #include "bullet.h" -#include "common/asset.h" -#include "common/input.h" -#include "common/jail_audio.h" -#include "common/menu.h" -#include "common/movingsprite.h" -#include "common/screen.h" -#include "common/smartsprite.h" -#include "common/sprite.h" -#include "common/text.h" -#include "common/utils.h" -#include "common/writer.h" +#include "asset.h" +#include "input.h" +#include "jail_audio.h" +#include "menu.h" +#include "movingsprite.h" +#include "screen.h" +#include "smartsprite.h" +#include "sprite.h" +#include "text.h" +#include "utils.h" +#include "writer.h" #include "const.h" #include "fade.h" #include "item.h" #include "player.h" #include -#ifndef GAME_H -#define GAME_H - // Cantidad de elementos a escribir en los ficheros de datos #define TOTAL_SCORE_DATA 3 #define TOTAL_DEMO_DATA 2000 @@ -266,9 +263,6 @@ private: // Guarda el fichero de puntos bool saveScoreFile(); - // Sube la puntuación online - bool sendOnlineScore(); - // Guarda el fichero de datos para la demo bool saveDemoFile(); @@ -528,5 +522,3 @@ public: // Bucle para el juego void run(); }; - -#endif diff --git a/source/hiscore_table.cpp b/source/hiscore_table.cpp deleted file mode 100644 index ababddb..0000000 --- a/source/hiscore_table.cpp +++ /dev/null @@ -1,286 +0,0 @@ -#include "hiscore_table.h" -#include "common/jscore.h" -#include - -const Uint8 SELF = 0; - -// Constructor -HiScoreTable::HiScoreTable(SDL_Renderer *renderer, Screen *screen, Asset *asset, Input *input, Lang *lang, options_t *options, section_t *section) -{ - // Copia los punteros - this->renderer = renderer; - this->screen = screen; - this->asset = asset; - this->input = input; - this->lang = lang; - this->section = section; - this->options = options; - - // Reserva memoria para los punteros - eventHandler = new SDL_Event(); - - text = new Text(asset->get("smb2.png"), asset->get("smb2.txt"), renderer); - - // Crea un backbuffer para el renderizador - backbuffer = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_TARGET, GAMECANVAS_WIDTH, GAMECANVAS_HEIGHT); - if (backbuffer == nullptr) - { - if (options->console) - { - std::cout << "Error: textTexture could not be created!\nSDL Error: " << SDL_GetError() << std::endl; - } - } - - // Inicializa variables - section->name = SELF; - ticks = 0; - ticksSpeed = 15; - manualQuit = false; - counter = 0; - counterEnd = 600; -} - -// Destructor -HiScoreTable::~HiScoreTable() -{ - delete eventHandler; - delete text; - - SDL_DestroyTexture(backbuffer); -} - -// Actualiza las variables -void HiScoreTable::update() -{ - // Comprueba los eventos - checkEventHandler(); - - // Comprueba las entradas - checkInput(); - - // Actualiza las variables - if (SDL_GetTicks() - ticks > ticksSpeed) - { - // Actualiza el contador de ticks - ticks = SDL_GetTicks(); - - // Actualiza las notificaciones - screen->updateNotifier(); - - if (mode == mhst_auto) - { // Modo automático - counter++; - - if (counter == counterEnd) - { - section->name = SECTION_PROG_TITLE; - section->subsection = SUBSECTION_TITLE_1; - } - } - else - { // Modo manual - ++counter %= 60000; - - if (manualQuit) - { - section->name = SECTION_PROG_TITLE; - section->subsection = SUBSECTION_TITLE_3; - } - } - } -} - -// Pinta en pantalla -void HiScoreTable::render() -{ - // Pinta en pantalla - SDL_Rect window = {0, 0, GAMECANVAS_WIDTH, GAMECANVAS_HEIGHT}; - - const color_t orangeColor = {0xFF, 0x7A, 0x00}; - // hay 27 letras - 7 de puntos quedan 20 caracteres 20 - nameLenght 0 numDots - const int spaceBetweenHeader = 32; - const int spaceBetweenLines = text->getCharacterSize() * 1.8f; - - // Pinta en el backbuffer el texto y los sprites - SDL_SetRenderTarget(renderer, backbuffer); - SDL_SetRenderDrawColor(renderer, bgColor.r, bgColor.g, bgColor.b, 255); - SDL_RenderClear(renderer); - - // Escribe el texto: Mejores puntuaciones - text->writeDX(TXT_CENTER | TXT_COLOR | TXT_SHADOW, GAMECANVAS_CENTER_X, 8, lang->getText(42), 1, orangeColor, 1, shdwTxtColor); - - // Escribe la lista de jugadores - int numUsers = jscore::getNumUsers(); - for (int i = 0; i < numUsers; ++i) - { - const std::string userName = jscore::getUserName(i).substr(0, 17); - const int nameLenght = (int)userName.length(); - const int numDots = 20 - nameLenght; - std::string dots = ""; - for (int j = 0; j < numDots; ++j) - { - dots = dots + "."; - } - const std::string line = userName + dots + scoreToString(jscore::getPoints(i)); - text->writeDX(TXT_CENTER | TXT_SHADOW, GAMECANVAS_CENTER_X, (i * spaceBetweenLines) + spaceBetweenHeader, line, 1, orangeColor, 1, shdwTxtColor); - } - - // Rellena la lista con otros nombres - if (numUsers < 10) - { - std::vector names; - names.insert(names.end(), {"Bry", "Usufondo", "G.Lucas", "P.Delgat", "P.Arrabalera", "Pelechano", "Sahuquillo", "Bacteriol", "Pepe", "Rosita"}); - - for (int i = numUsers; i < 10; ++i) - { - const int nameLenght = names[i - numUsers].length(); - const int numDots = 20 - nameLenght; - std::string dots = ""; - for (int j = 0; j < numDots; ++j) - { - dots = dots + "."; - } - const std::string line = names[i - numUsers] + dots + "0000000"; - text->writeDX(TXT_CENTER | TXT_SHADOW, GAMECANVAS_CENTER_X, (i * spaceBetweenLines) + spaceBetweenHeader, line, 1, orangeColor, 1, shdwTxtColor); - } - } - - if ((mode == mhst_manual) && (counter % 50 > 14)) - { - text->writeDX(TXT_CENTER | TXT_COLOR | TXT_SHADOW, GAMECANVAS_CENTER_X, GAMECANVAS_HEIGHT - 12, lang->getText(22), 1, orangeColor, 1, shdwTxtColor); - } - - // Cambia el destino de renderizado - SDL_SetRenderTarget(renderer, nullptr); - - // Prepara para empezar a dibujar en la textura de juego - screen->start(); - - // Limpia la pantalla - screen->clean(bgColor); - - // Establece la ventana del backbuffer - if (mode == mhst_auto) - { - window.y = std::max(8, GAMECANVAS_HEIGHT - counter + 100); - } - else - { - window.y = 0; - } - - // Copia el backbuffer al renderizador - SDL_RenderCopy(renderer, backbuffer, nullptr, &window); - - // Vuelca el contenido del renderizador en pantalla - screen->blit(); -} - -// Comprueba los eventos -void HiScoreTable::checkEventHandler() -{ - // Comprueba los eventos que hay en la cola - while (SDL_PollEvent(eventHandler) != 0) - { - // Evento de salida de la aplicación - if (eventHandler->type == SDL_QUIT) - { - section->name = SECTION_PROG_QUIT; - break; - } - } -} - -// Comprueba las entradas -void HiScoreTable::checkInput() -{ - if (input->checkInput(input_exit, REPEAT_FALSE)) - { - section->name = SECTION_PROG_QUIT; - } - - else if (input->checkInput(input_window_fullscreen, REPEAT_FALSE)) - { - screen->switchVideoMode(); - } - - else if (input->checkInput(input_window_dec_size, REPEAT_FALSE)) - { - screen->decWindowSize(); - } - - else if (input->checkInput(input_window_inc_size, REPEAT_FALSE)) - { - screen->incWindowSize(); - } - - else if (input->checkInput(input_pause, REPEAT_FALSE) || input->checkInput(input_accept, REPEAT_FALSE) || input->checkInput(input_fire_left, REPEAT_FALSE) || input->checkInput(input_fire_center, REPEAT_FALSE) || input->checkInput(input_fire_right, REPEAT_FALSE)) - { - if (mode == mhst_auto) - { - JA_StopMusic(); - section->name = SECTION_PROG_TITLE; - section->subsection = SUBSECTION_TITLE_1; - } - else - { - if (counter > 30) - { - manualQuit = true; - } - } - } -} - -// Bucle para la pantalla de instrucciones -void HiScoreTable::run(mode_hiScoreTable_e mode) -{ - this->mode = mode; - - while (section->name == SELF) - { - update(); - render(); - } -} - -// Transforma un valor numérico en una cadena de 6 cifras -std::string HiScoreTable::scoreToString(Uint32 num) -{ - if ((num >= 0) && (num <= 9)) - { - return ("000000" + std::to_string(num)); - } - - if ((num >= 10) && (num <= 99)) - { - return ("00000" + std::to_string(num)); - } - - if ((num >= 100) && (num <= 999)) - { - return ("0000" + std::to_string(num)); - } - - if ((num >= 1000) && (num <= 9999)) - { - return ("000" + std::to_string(num)); - } - - if ((num >= 010000) && (num <= 99999)) - { - return ("00" + std::to_string(num)); - } - - if ((num >= 100000) && (num <= 999999)) - { - return ("0" + std::to_string(num)); - } - - if ((num >= 1000000) && (num <= 9999999)) - { - return (std::to_string(num)); - } - - return (std::to_string(num)); -} \ No newline at end of file diff --git a/source/hiscore_table.h b/source/hiscore_table.h deleted file mode 100644 index 39594b1..0000000 --- a/source/hiscore_table.h +++ /dev/null @@ -1,71 +0,0 @@ -#pragma once - -#include -#include "common/asset.h" -#include "common/input.h" -#include "common/jail_audio.h" -#include "common/screen.h" -#include "common/sprite.h" -#include "common/text.h" -#include "common/utils.h" -#include "const.h" - -#ifndef HISCORE_TABLE_H -#define HISCORE_TABLE_H - -enum mode_hiScoreTable_e -{ - mhst_manual, - mhst_auto -}; - -class HiScoreTable -{ -private: - // Objetos y punteros - SDL_Renderer *renderer; // El renderizador de la ventana - Screen *screen; // Objeto encargado de dibujar en pantalla - SDL_Event *eventHandler; // Manejador de eventos - SDL_Texture *backbuffer; // Textura para usar como backbuffer - Asset *asset; // Objeto que gestiona todos los ficheros de recursos - Input *input; // Objeto pata gestionar la entrada - Lang *lang; // Objeto para gestionar los textos en diferentes idiomas - Text *text; // Objeto para escribir texto - options_t *options; // Opciones y parametros del programa - section_t *section; // Estado del bucle principal para saber si continua o se sale - - // Variables - Uint16 counter; // Contador - Uint16 counterEnd; // Valor final para el contador - Uint32 ticks; // Contador de ticks para ajustar la velocidad del programa - Uint32 ticksSpeed; // Velocidad a la que se repiten los bucles del programa - bool manualQuit; // Indica si se quiere salir del modo manual - mode_hiScoreTable_e mode; // Modo en el que se van a ejecutar las instrucciones - - // Actualiza las variables - void update(); - - // Pinta en pantalla - void render(); - - // Comprueba los eventos - void checkEventHandler(); - - // Comprueba las entradas - void checkInput(); - - // Transforma un valor numérico en una cadena de 6 cifras - std::string scoreToString(Uint32 num); - -public: - // Constructor - HiScoreTable(SDL_Renderer *renderer, Screen *screen, Asset *asset, Input *input, Lang *lang, options_t *options, section_t *section); - - // Destructor - ~HiScoreTable(); - - // Bucle principal - void run(mode_hiScoreTable_e mode); -}; - -#endif diff --git a/source/common/input.cpp b/source/input.cpp similarity index 100% rename from source/common/input.cpp rename to source/input.cpp diff --git a/source/common/input.h b/source/input.h similarity index 98% rename from source/common/input.h rename to source/input.h index e4f02cd..9fc6e75 100644 --- a/source/common/input.h +++ b/source/input.h @@ -4,9 +4,6 @@ #include #include -#ifndef INPUT_H -#define INPUT_H - enum inputs_e { // Inputs obligatorios @@ -113,6 +110,4 @@ public: // Hablita las entradas void enable(); -}; - -#endif +}; \ No newline at end of file diff --git a/source/instructions.h b/source/instructions.h index f62aaa0..36240d0 100644 --- a/source/instructions.h +++ b/source/instructions.h @@ -1,18 +1,15 @@ #pragma once #include -#include "common/asset.h" -#include "common/input.h" -#include "common/jail_audio.h" -#include "common/screen.h" -#include "common/sprite.h" -#include "common/text.h" -#include "common/utils.h" +#include "asset.h" +#include "input.h" +#include "jail_audio.h" +#include "screen.h" +#include "sprite.h" +#include "text.h" +#include "utils.h" #include "const.h" -#ifndef INSTRUCTIONS_H -#define INSTRUCTIONS_H - enum mode_e { m_manual, @@ -65,6 +62,4 @@ public: // Bucle principal void run(mode_e mode); -}; - -#endif +}; \ No newline at end of file diff --git a/source/intro.cpp b/source/intro.cpp index 02ba969..579000a 100644 --- a/source/intro.cpp +++ b/source/intro.cpp @@ -398,9 +398,6 @@ void Intro::update() // Actualiza las escenas de la intro updateScenes(); - - // Actualiza las notificaciones - screen->updateNotifier(); } } diff --git a/source/intro.h b/source/intro.h index 5c28524..b9f251b 100644 --- a/source/intro.h +++ b/source/intro.h @@ -1,13 +1,13 @@ #pragma once #include -#include "common/asset.h" -#include "common/input.h" -#include "common/jail_audio.h" -#include "common/screen.h" -#include "common/smartsprite.h" -#include "common/utils.h" -#include "common/writer.h" +#include "asset.h" +#include "input.h" +#include "jail_audio.h" +#include "screen.h" +#include "smartsprite.h" +#include "utils.h" +#include "writer.h" #include "const.h" #include diff --git a/source/item.h b/source/item.h index 487cdaf..283dede 100644 --- a/source/item.h +++ b/source/item.h @@ -1,11 +1,8 @@ #pragma once #include -#include "common/animatedsprite.h" -#include "common/utils.h" - -#ifndef ITEM_H -#define ITEM_H +#include "animatedsprite.h" +#include "utils.h" // Tipos de objetos #define ITEM_POINTS_1_DISK 1 @@ -41,6 +38,7 @@ private: // Actualiza la posición y estados del objeto void move(); + public: Uint16 timeToLive; // Temporizador con el tiempo que el objeto está presente @@ -56,7 +54,6 @@ public: // Pinta el objeto en la pantalla void render(); - // Pone a cero todos los valores del objeto void disable(); @@ -93,5 +90,3 @@ public: // Informa si el objeto ha colisionado con el suelo bool isOnFloor(); }; - -#endif diff --git a/source/common/jail_audio.cpp b/source/jail_audio.cpp similarity index 100% rename from source/common/jail_audio.cpp rename to source/jail_audio.cpp diff --git a/source/common/jail_audio.h b/source/jail_audio.h similarity index 100% rename from source/common/jail_audio.h rename to source/jail_audio.h diff --git a/source/lang.h b/source/lang.h index 821784d..d912ae3 100644 --- a/source/lang.h +++ b/source/lang.h @@ -1,12 +1,9 @@ #pragma once #include -#include "common/asset.h" +#include "asset.h" #include -#ifndef LANG_H -#define LANG_H - // Códigos de idioma #define es_ES 0 #define ba_BA 1 @@ -35,5 +32,4 @@ public: // Obtiene la cadena de texto del indice std::string getText(int index); -}; -#endif \ No newline at end of file +}; \ No newline at end of file diff --git a/source/logo.cpp b/source/logo.cpp index 91539fd..9aae7b2 100644 --- a/source/logo.cpp +++ b/source/logo.cpp @@ -119,9 +119,6 @@ void Logo::update() // Comprueba si ha terminado el logo checkLogoEnd(); - - // Actualiza las notificaciones - screen->updateNotifier(); } } diff --git a/source/logo.h b/source/logo.h index 669c25b..2d226f2 100644 --- a/source/logo.h +++ b/source/logo.h @@ -1,17 +1,14 @@ #pragma once #include -#include "common/asset.h" -#include "common/input.h" -#include "common/jail_audio.h" -#include "common/screen.h" -#include "common/sprite.h" -#include "common/utils.h" +#include "asset.h" +#include "input.h" +#include "jail_audio.h" +#include "screen.h" +#include "sprite.h" +#include "utils.h" #include "const.h" -#ifndef LOGO_H -#define LOGO_H - // Clase Logo class Logo { @@ -59,5 +56,3 @@ public: // Bucle principal void run(); }; - -#endif diff --git a/source/common/menu.cpp b/source/menu.cpp similarity index 99% rename from source/common/menu.cpp rename to source/menu.cpp index 3f2daa3..4f96018 100644 --- a/source/common/menu.cpp +++ b/source/menu.cpp @@ -1,4 +1,4 @@ -#include "../const.h" +#include "const.h" #include "menu.h" #include @@ -700,7 +700,7 @@ void Menu::render() else { // Si no es seleccionable if ((item[i].linkedUp) && (i == selector.index + 1)) - {// Si el elemento está enlazado con el elemento superior se pinta del color del selector + { // Si el elemento está enlazado con el elemento superior se pinta del color del selector const color_t color = {selector.itemColor.r, selector.itemColor.g, selector.itemColor.b}; text->writeColored(item[i].rect.x, item[i].rect.y, item[i].label, color); } diff --git a/source/common/menu.h b/source/menu.h similarity index 99% rename from source/common/menu.h rename to source/menu.h index 358652d..06a705b 100644 --- a/source/common/menu.h +++ b/source/menu.h @@ -11,9 +11,6 @@ #include #include -#ifndef MENU_H -#define MENU_H - // Tipos de fondos para el menu #define MENU_BACKGROUND_TRANSPARENT 0 #define MENU_BACKGROUND_SOLID 1 @@ -232,5 +229,3 @@ public: // Establece el rectangulo de fondo del menu void setRectSize(int w = 0, int h = 0); }; - -#endif diff --git a/source/common/movingsprite.cpp b/source/movingsprite.cpp similarity index 100% rename from source/common/movingsprite.cpp rename to source/movingsprite.cpp diff --git a/source/common/movingsprite.h b/source/movingsprite.h similarity index 98% rename from source/common/movingsprite.h rename to source/movingsprite.h index 1362ad4..b55bfc3 100644 --- a/source/common/movingsprite.h +++ b/source/movingsprite.h @@ -3,9 +3,6 @@ #include #include "sprite.h" -#ifndef MOVINGSPRITE_H -#define MOVINGSPRITE_H - // Clase MovingSprite. Añade posicion y velocidad en punto flotante class MovingSprite : public Sprite { @@ -163,5 +160,3 @@ public: // Devuelve el incremento en el eje X en pixels int getIncX(); }; - -#endif diff --git a/source/player.h b/source/player.h index 5090695..5931388 100644 --- a/source/player.h +++ b/source/player.h @@ -1,14 +1,11 @@ #pragma once #include -#include "common/animatedsprite.h" -#include "common/asset.h" -#include "common/input.h" -#include "common/texture.h" -#include "common/utils.h" - -#ifndef PLAYER_H -#define PLAYER_H +#include "animatedsprite.h" +#include "asset.h" +#include "input.h" +#include "texture.h" +#include "utils.h" // Contadores #define DEATH_COUNTER 350 @@ -37,7 +34,7 @@ private: AnimatedSprite *bodySprite; // Sprite para dibujar el cuerpo AnimatedSprite *legsSprite; // Sprite para dibujar las piernas AnimatedSprite *deathSprite; // Sprite para dibujar el jugador derrotado - AnimatedSprite *fireSprite; // Sprite para dibujar el aura del jugador con el poder a tope + AnimatedSprite *fireSprite; // Sprite para dibujar el aura del jugador con el poder a tope // Variables float posX; // Posicion en el eje X @@ -217,5 +214,3 @@ public: // Obtiene el valor de la variable Uint16 getDeathCounter(); }; - -#endif diff --git a/source/common/screen.cpp b/source/screen.cpp similarity index 85% rename from source/common/screen.cpp rename to source/screen.cpp index 2158bd3..1f3a348 100644 --- a/source/common/screen.cpp +++ b/source/screen.cpp @@ -11,9 +11,6 @@ Screen::Screen(SDL_Window *window, SDL_Renderer *renderer, Asset *asset, options this->options = options; this->asset = asset; - // Crea los objetos - notify = new Notify(renderer, asset->get("notify.png"), asset->get("smb2.png"), asset->get("smb2.txt"), asset->get("notify.wav"), options); - gameCanvasWidth = options->gameWidth; gameCanvasHeight = options->gameHeight; borderWidth = options->borderWidth * 2; @@ -47,7 +44,6 @@ Screen::Screen(SDL_Window *window, SDL_Renderer *renderer, Asset *asset, options // Destructor Screen::~Screen() { - delete notify; SDL_DestroyTexture(gameCanvas); } @@ -77,9 +73,6 @@ void Screen::blit() // Copia la textura de juego en el renderizador en la posición adecuada SDL_RenderCopy(renderer, gameCanvas, nullptr, &dest); - // Dibuja las notificaciones - renderNotifications(); - // Muestra por pantalla el renderizador SDL_RenderPresent(renderer); } @@ -178,9 +171,6 @@ void Screen::setVideoMode(int videoMode) options->videoMode = videoMode; options->screen.windowWidth = windowWidth; options->screen.windowHeight = windowHeight; - - // Establece el tamaño de las notificaciones - setNotificationSize(); } // Camibia entre pantalla completa y ventana @@ -383,54 +373,4 @@ void Screen::renderFX() { renderFade(); renderSpectrumFade(); -} - -// Actualiza el notificador -void Screen::updateNotifier() -{ - notify->update(); - notifyActive = notify->active(); -} - -// Muestra una notificación de texto por pantalla; -void Screen::showNotification(std::string text1, std::string text2, int icon) -{ - notify->showText(text1, text2, icon); -} - -// Dibuja las notificaciones -void Screen::renderNotifications() -{ - if (!notifyActive) - { - return; - } - - SDL_RenderSetLogicalSize(renderer, notificationLogicalWidth, notificationLogicalHeight); - notify->render(); - SDL_RenderSetLogicalSize(renderer, windowWidth, windowHeight); -} - -// Establece el tamaño de las notificaciones -void Screen::setNotificationSize() -{ - if (options->videoMode == 0) - { - if (options->windowSize == 3) - { - notificationLogicalWidth = (windowWidth * 3) / 2; - notificationLogicalHeight = (windowHeight * 3) / 2; - } - else - { - notificationLogicalWidth = windowWidth * 2; - notificationLogicalHeight = windowHeight * 2; - } - } - - if (options->videoMode == SDL_WINDOW_FULLSCREEN_DESKTOP) - { - notificationLogicalWidth = windowWidth / 3; - notificationLogicalHeight = windowHeight / 3; - } } \ No newline at end of file diff --git a/source/common/screen.h b/source/screen.h similarity index 88% rename from source/common/screen.h rename to source/screen.h index 8842d65..f9733ae 100644 --- a/source/common/screen.h +++ b/source/screen.h @@ -2,14 +2,10 @@ #include #include "asset.h" -#include "notify.h" #include "utils.h" -#include "../const.h" +#include "const.h" #include -#ifndef SCREEN_H -#define SCREEN_H - #define FILTER_NEAREST 0 #define FILTER_LINEAL 1 @@ -22,7 +18,6 @@ private: Asset *asset; // Objeto con el listado de recursos SDL_Texture *gameCanvas; // Textura para completar la ventana de juego hasta la pantalla completa options_t *options; // Variable con todas las opciones del programa - Notify *notify; // Dibuja notificaciones por pantalla // Variables int windowWidth; // Ancho de la pantalla o ventana @@ -64,12 +59,6 @@ private: // Dibuja el spectrum fade void renderSpectrumFade(); - // Dibuja las notificaciones - void renderNotifications(); - - // Establece el tamaño de las notificaciones - void setNotificationSize(); - public: // Constructor Screen(SDL_Window *window, SDL_Renderer *renderer, Asset *asset, options_t *options); @@ -134,12 +123,4 @@ public: // Dibuja los efectos void renderFX(); - - // Actualiza el notificador - void updateNotifier(); - - // Muestra una notificación de texto por pantalla; - void showNotification(std::string text1 = "", std::string text2 = "", int icon = -1); }; - -#endif diff --git a/source/common/smartsprite.cpp b/source/smartsprite.cpp similarity index 100% rename from source/common/smartsprite.cpp rename to source/smartsprite.cpp diff --git a/source/common/smartsprite.h b/source/smartsprite.h similarity index 96% rename from source/common/smartsprite.h rename to source/smartsprite.h index 4422a9d..565053a 100644 --- a/source/common/smartsprite.h +++ b/source/smartsprite.h @@ -5,9 +5,6 @@ #include "utils.h" #include -#ifndef SMARTSPRITE_H -#define SMARTSPRITE_H - // Clase SmartSprite class SmartSprite : public AnimatedSprite { @@ -69,5 +66,3 @@ public: // Obtiene el valor de la variable bool hasFinished(); }; - -#endif diff --git a/source/common/sprite.cpp b/source/sprite.cpp similarity index 100% rename from source/common/sprite.cpp rename to source/sprite.cpp diff --git a/source/common/sprite.h b/source/sprite.h similarity index 98% rename from source/common/sprite.h rename to source/sprite.h index 01c93e4..610759e 100644 --- a/source/common/sprite.h +++ b/source/sprite.h @@ -3,9 +3,6 @@ #include #include "texture.h" -#ifndef SPRITE_H -#define SPRITE_H - // Clase sprite class Sprite { @@ -91,6 +88,4 @@ public: // Establece los valores de posición y tamaño del sprite void setRect(SDL_Rect rect); -}; - -#endif +}; \ No newline at end of file diff --git a/source/common/stb_image.h b/source/stb_image.h similarity index 100% rename from source/common/stb_image.h rename to source/stb_image.h diff --git a/source/common/stb_vorbis.c b/source/stb_vorbis.c similarity index 100% rename from source/common/stb_vorbis.c rename to source/stb_vorbis.c diff --git a/source/common/text.cpp b/source/text.cpp similarity index 100% rename from source/common/text.cpp rename to source/text.cpp diff --git a/source/common/text.h b/source/text.h similarity index 98% rename from source/common/text.h rename to source/text.h index 87bccb0..74f2828 100644 --- a/source/common/text.h +++ b/source/text.h @@ -3,9 +3,6 @@ #include "sprite.h" #include "utils.h" -#ifndef TEXT_H -#define TEXT_H - #define TXT_COLOR 1 #define TXT_SHADOW 2 #define TXT_CENTER 4 @@ -78,5 +75,3 @@ public: // Establece si se usa un tamaño fijo de letra void setFixedWidth(bool value); }; - -#endif diff --git a/source/common/texture.cpp b/source/texture.cpp similarity index 100% rename from source/common/texture.cpp rename to source/texture.cpp diff --git a/source/common/texture.h b/source/texture.h similarity index 97% rename from source/common/texture.h rename to source/texture.h index d83d7e2..9035f69 100644 --- a/source/common/texture.h +++ b/source/texture.h @@ -4,9 +4,6 @@ #include #include -#ifndef TEXTURE_H -#define TEXTURE_H - class Texture { private: @@ -62,5 +59,3 @@ public: // Obtiene la textura SDL_Texture *getSDLTexture(); }; - -#endif diff --git a/source/title.cpp b/source/title.cpp index 93cba02..fd24b31 100644 --- a/source/title.cpp +++ b/source/title.cpp @@ -1,5 +1,4 @@ #include "title.h" -#include "common/jscore.h" // Constructor Title::Title(SDL_Renderer *renderer, Screen *screen, Input *input, Asset *asset, options_t *options, Lang *lang, section_t *section) @@ -206,9 +205,6 @@ void Title::init() // Actualiza los textos de los menus updateMenuLabels(); - - // Comprueba si se puede acceder a la tabla de puntuaciones y habilita la opción de menu - setHiScoreTableOptionMenu(); } // Actualiza las variables del objeto @@ -223,9 +219,6 @@ void Title::update() // Actualiza el contador de ticks ticks = SDL_GetTicks(); - // Actualiza las notificaciones - screen->updateNotifier(); - switch (section->subsection) { // Sección 1 - Titulo desplazandose @@ -321,10 +314,6 @@ void Title::update() { runInstructions(m_auto); } - if (section->name != SECTION_PROG_QUIT) - { - runHiScoreTable(mhst_auto); - } } else section->name = SECTION_PROG_LOGO; @@ -478,23 +467,13 @@ void Title::update() runInstructions(m_manual); break; - case 12: // HISCORE TABLE - runHiScoreTable(mhst_manual); - break; - - case 13: // JAILERID: - runEnterID(); - setHiScoreTableOptionMenu(); - updateMenuLabels(); - break; - - case 14: // ACCEPT + case 12: // ACCEPT applyOptions(); menu.active->reset(); menu.active = menu.title; break; - case 15: // CANCEL + case 13: // CANCEL options = &optionsPrevious; updateMenuLabels(); menu.active->reset(); @@ -515,10 +494,6 @@ void Title::update() { if (demo) { - if (section->name != SECTION_PROG_QUIT) - { - runHiScoreTable(mhst_auto); - } runDemoGame(); if (section->name != SECTION_PROG_QUIT) { @@ -918,15 +893,6 @@ void Title::updateMenuLabels() // HOW TO PLAY menu.options->setItemCaption(i, lang->getText(2)); - i++; - // HISCORE TABLE - menu.options->setItemCaption(i, lang->getText(93)); - - i++; - // JAILERID; - const std::string jailerID = options->online.jailerID == "" ? lang->getText(64) : options->online.jailerID; - menu.options->setItemCaption(i, "JAILERID: " + jailerID); - i++; // ACCEPT menu.options->setItemCaption(i, lang->getText(9)); // ACCEPT @@ -1004,22 +970,6 @@ void Title::runInstructions(mode_e mode) delete instructions; } -// Ejecuta la parte donde se muestra la tabla de puntuaciones -void Title::runHiScoreTable(mode_hiScoreTable_e mode) -{ - if (!options->online.enabled) - { - section->name = SECTION_PROG_TITLE; - section->subsection = SUBSECTION_TITLE_1; - - return; - } - - hiScoreTable = new HiScoreTable(renderer, screen, asset, input, lang, options, section); - hiScoreTable->run(mode); - delete hiScoreTable; -} - // Ejecuta el juego en modo demo void Title::runDemoGame() { @@ -1028,14 +978,6 @@ void Title::runDemoGame() delete demoGame; } -// Introduce el JailerID -void Title::runEnterID() -{ - enterID = new EnterID(renderer, screen, asset, lang, options, section); - enterID->run(); - delete enterID; -} - // Modifica las opciones para los controles de los jugadores bool Title::updatePlayerInputs(int numPlayer) { @@ -1186,19 +1128,4 @@ void Title::reLoadTextures() crisisTexture->reLoad(); gradientTexture->reLoad(); createTiledBackground(); -} - -// Comprueba si se puede acceder a la tabla de puntuaciones y habilita la opción de menu -void Title::setHiScoreTableOptionMenu() -{ - if (options->online.sessionEnabled) - { - menu.options->setSelectable(12, true); - menu.options->setGreyed(12, false); - } - else - { - menu.options->setSelectable(12, false); - menu.options->setGreyed(12, true); - } } \ No newline at end of file diff --git a/source/title.h b/source/title.h index e532447..74809e0 100644 --- a/source/title.h +++ b/source/title.h @@ -1,27 +1,22 @@ #pragma once #include -#include "common/asset.h" -#include "common/input.h" -#include "common/jail_audio.h" -#include "common/menu.h" -#include "common/movingsprite.h" -#include "common/screen.h" -#include "common/smartsprite.h" -#include "common/sprite.h" -#include "common/text.h" -#include "common/utils.h" +#include "asset.h" +#include "input.h" +#include "jail_audio.h" +#include "menu.h" +#include "movingsprite.h" +#include "screen.h" +#include "smartsprite.h" +#include "sprite.h" +#include "text.h" +#include "utils.h" #include "const.h" #include "fade.h" #include "game.h" -#include "enter_id.h" -#include "hiscore_table.h" #include "instructions.h" #include "item.h" -#ifndef TITLE_H -#define TITLE_H - // Textos #define TEXT_COPYRIGHT "@2020,2023 JailDesigner (v2.3.1)" @@ -50,9 +45,7 @@ private: Input *input; // Objeto para leer las entradas de teclado o mando Lang *lang; // Objeto para gestionar los textos en diferentes idiomas Instructions *instructions; // Objeto para la sección de las instrucciones - HiScoreTable *hiScoreTable; // Objeto para mostrar las mejores puntuaciones online Game *demoGame; // Objeto para lanzar la demo del juego - EnterID *enterID; // Objeto para introducir o modificar el JailerID SDL_Event *eventHandler; // Manejador de eventos section_t *section; // Indicador para el bucle del titulo @@ -125,15 +118,9 @@ private: // Ejecuta la parte donde se muestran las instrucciones void runInstructions(mode_e mode); - // Ejecuta la parte donde se muestra la tabla de puntuaciones - void runHiScoreTable(mode_hiScoreTable_e mode); - // Ejecuta el juego en modo demo void runDemoGame(); - // Introduce el JailerID - void runEnterID(); - // Modifica las opciones para los controles de los jugadores bool updatePlayerInputs(int numPlayer); @@ -146,9 +133,6 @@ private: // Recarga las texturas void reLoadTextures(); - // Comprueba si se puede acceder a la tabla de puntuaciones y habilita la opción de menu - void setHiScoreTableOptionMenu(); - public: // Constructor Title(SDL_Renderer *renderer, Screen *screen, Input *input, Asset *asset, options_t *options, Lang *lang, section_t *section); @@ -159,5 +143,3 @@ public: // Bucle para el titulo del juego void run(); }; - -#endif diff --git a/source/common/utils.cpp b/source/utils.cpp similarity index 100% rename from source/common/utils.cpp rename to source/utils.cpp diff --git a/source/common/utils.h b/source/utils.h similarity index 82% rename from source/common/utils.h rename to source/utils.h index 9e42760..02db63b 100644 --- a/source/common/utils.h +++ b/source/utils.h @@ -5,9 +5,6 @@ #include #include -#ifndef UTILS_H -#define UTILS_H - // Dificultad del juego #define DIFFICULTY_EASY 0 #define DIFFICULTY_NORMAL 1 @@ -100,18 +97,6 @@ struct input_t Uint8 deviceType; // Tipo de dispositivo (teclado o mando) }; -// Estructura para el servicio online -struct online_t -{ - bool enabled; // Indica si se quiere usar el modo online o no - bool sessionEnabled; // Indica ya se ha hecho login - std::string server; // Servidor para los servicios online - int port; // Puerto del servidor - std::string gameID; // Identificador del juego para los servicios online - std::string jailerID; // Identificador del jugador para los servicios online - int score; // Puntuación almacenada online -}; - // Estructura con opciones de la pantalla struct op_screen_t { @@ -119,15 +104,6 @@ struct op_screen_t int windowHeight; // Alto de la ventana }; -// Estructura para las opciones de las notificaciones -struct op_notification_t -{ - not_pos_e posH; // Ubicación de las notificaciones en pantalla - not_pos_e posV; // Ubicación de las notificaciones en pantalla - bool sound; // Indica si las notificaciones suenan - color_t color; // Color de las notificaciones -}; - // Estructura con todas las opciones de configuración del programa struct options_t { @@ -150,9 +126,7 @@ struct options_t palette_e palette; // Paleta de colores a usar en el juego bool console; // Indica si ha de mostrar información por la consola de texto - online_t online; // Datos del servicio online op_screen_t screen; // Opciones relativas a la clase screen - op_notification_t notifications; // Opciones relativas a las notificaciones; }; // Calcula el cuadrado de la distancia entre dos puntos @@ -202,5 +176,3 @@ std::string boolToString(bool value); // Convierte una cadena a minusculas std::string toLower(std::string str); - -#endif \ No newline at end of file diff --git a/source/common/writer.cpp b/source/writer.cpp similarity index 100% rename from source/common/writer.cpp rename to source/writer.cpp diff --git a/source/common/writer.h b/source/writer.h similarity index 97% rename from source/common/writer.h rename to source/writer.h index 4457cdf..9affecb 100644 --- a/source/common/writer.h +++ b/source/writer.h @@ -4,9 +4,6 @@ #include "sprite.h" #include "text.h" -#ifndef WRITER_H -#define WRITER_H - // Clase Writer. Pinta texto en pantalla letra a letra a partir de una cadena y un bitmap class Writer { @@ -71,5 +68,3 @@ public: // Obtiene el valor de la variable bool hasFinished(); }; - -#endif