diff --git a/data/ending/ending1.png b/data/ending/ending1.png new file mode 100644 index 0000000..39df179 Binary files /dev/null and b/data/ending/ending1.png differ diff --git a/data/ending/ending2.png b/data/ending/ending2.png new file mode 100644 index 0000000..eabb459 Binary files /dev/null and b/data/ending/ending2.png differ diff --git a/data/ending/ending3.png b/data/ending/ending3.png new file mode 100644 index 0000000..f6d5941 Binary files /dev/null and b/data/ending/ending3.png differ diff --git a/data/ending/ending4.png b/data/ending/ending4.png new file mode 100644 index 0000000..dad2d38 Binary files /dev/null and b/data/ending/ending4.png differ diff --git a/data/ending/ending5.png b/data/ending/ending5.png new file mode 100644 index 0000000..64895b1 Binary files /dev/null and b/data/ending/ending5.png differ diff --git a/data/music/desktop.ini b/data/music/desktop.ini new file mode 100644 index 0000000..d957fd1 --- /dev/null +++ b/data/music/desktop.ini @@ -0,0 +1,4 @@ +[ViewState] +Mode= +Vid= +FolderType=Generic diff --git a/data/music/ending1.ogg b/data/music/ending1.ogg new file mode 100644 index 0000000..1fd8b6c Binary files /dev/null and b/data/music/ending1.ogg differ diff --git a/data/music/ending2.ogg b/data/music/ending2.ogg new file mode 100644 index 0000000..d925664 Binary files /dev/null and b/data/music/ending2.ogg differ diff --git a/source/credits.h b/source/credits.h index ad86bfc..73942c2 100644 --- a/source/credits.h +++ b/source/credits.h @@ -44,7 +44,7 @@ private: section_t section; // Estado del bucle principal para saber si continua o se sale 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 las letras de la marquesina + std::vector texts; // Vector con los textos // Actualiza las variables void update(); diff --git a/source/director.cpp b/source/director.cpp index 6aec1a8..aecd374 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; - section.name = SECTION_PROG_GAME; + section.name = SECTION_PROG_ENDING; // Crea e inicializa las opciones del programa iniOptions(); @@ -300,11 +300,22 @@ void Director::loadResources(section_t section) else if (section.name == SECTION_PROG_ENDING) { + // Texturas std::vector textureList; - textureList.push_back("jailgames.png"); - textureList.push_back("since_1998.png"); + textureList.push_back("ending1.png"); + textureList.push_back("ending2.png"); + textureList.push_back("ending3.png"); + textureList.push_back("ending4.png"); + textureList.push_back("ending5.png"); + textureList.push_back("smb2.png"); resource->loadTextures(textureList); + + // Offsets + std::vector offsetsList; + offsetsList.push_back("smb2.txt"); + + resource->loadOffsets(offsetsList); } else if (section.name == SECTION_PROG_GAME_OVER) @@ -1046,6 +1057,8 @@ bool Director::setFileList() asset->add("/data/music/loading_sound1.ogg", t_music); asset->add("/data/music/loading_sound2.ogg", t_music); asset->add("/data/music/loading_sound3.ogg", t_music); + asset->add("/data/music/ending1.ogg", t_music); + asset->add("/data/music/ending2.ogg", t_music); // Efectos de sonido asset->add("/data/sound/item.wav", t_sound); @@ -1085,6 +1098,13 @@ bool Director::setFileList() asset->add("/data/title/loading_screen_bn_zxarne.png", t_bitmap); asset->add("/data/title/loading_screen_color_zxarne.png", t_bitmap); + // Ending + asset->add("/data/ending/ending1.png", t_bitmap); + asset->add("/data/ending/ending2.png", t_bitmap); + asset->add("/data/ending/ending3.png", t_bitmap); + asset->add("/data/ending/ending4.png", t_bitmap); + asset->add("/data/ending/ending5.png", t_bitmap); + // Credits asset->add("/data/credits/shine.png", t_bitmap); asset->add("/data/credits/shine.ani", t_bitmap); diff --git a/source/ending.cpp b/source/ending.cpp index 68e5907..2b0da49 100644 --- a/source/ending.cpp +++ b/source/ending.cpp @@ -19,6 +19,15 @@ Ending::Ending(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset section.subsection = 0; ticks = 0; ticksSpeed = 15; + + // Textos + texts.push_back("HE FINALLY MANAGED TO GET TO THE JAIL WITH ALL HIS PROJECTS READY TO BE RELEASED"); + texts.push_back("ALL THE JAILERS WERE THERE WAITING FOR THE JAILGAMES TO BE RELEASED"); + texts.push_back("THERE WERE EVEN BARRULLS AND BEGINNERS AMONG THE CROWD"); + texts.push_back("BRY WAS CRYING..."); + texts.push_back("BUT SUDDENLY SOMETHING CAUGHT HIS ATTENTION"); + texts.push_back("A PILE OF JUNK! FULL OF NON WORKING THINGS!!"); + texts.push_back("AND THEN, FOURTY NEW PROJECTS WERE BORN..."); } // Destructor diff --git a/source/ending.h b/source/ending.h index ca8ab45..386f186 100644 --- a/source/ending.h +++ b/source/ending.h @@ -11,6 +11,7 @@ #include "common/utils.h" #include "const.h" #include +#include #ifndef ENDING_H #define ENDING_H @@ -31,10 +32,11 @@ private: AnimatedSprite *sprite; // Sprite para el brillo del corazón // Variables - int counter; // Contador - section_t section; // Estado del bucle principal para saber si continua o se sale - Uint32 ticks; // Contador de ticks para ajustar la velocidad del programa - Uint32 ticksSpeed; // Velocidad a la que se repiten los bucles del programa + int counter; // Contador + section_t section; // Estado del bucle principal para saber si continua o se sale + 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 // Actualiza el objeto void update();