Añadidos los recursos para el ending

This commit is contained in:
2022-11-03 10:52:46 +01:00
parent a510742984
commit d514ed451f
12 changed files with 43 additions and 8 deletions

BIN
data/ending/ending1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
data/ending/ending2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
data/ending/ending3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

BIN
data/ending/ending4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
data/ending/ending5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

4
data/music/desktop.ini Normal file
View File

@@ -0,0 +1,4 @@
[ViewState]
Mode=
Vid=
FolderType=Generic

BIN
data/music/ending1.ogg Normal file

Binary file not shown.

BIN
data/music/ending2.ogg Normal file

Binary file not shown.

View File

@@ -44,7 +44,7 @@ private:
section_t section; // Estado del bucle principal para saber si continua o se sale 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 ticks; // Contador de ticks para ajustar la velocidad del programa
Uint32 ticksSpeed; // Velocidad a la que se repiten los bucles del programa Uint32 ticksSpeed; // Velocidad a la que se repiten los bucles del programa
std::vector<captions_t> texts; // Vector con las letras de la marquesina std::vector<captions_t> texts; // Vector con los textos
// Actualiza las variables // Actualiza las variables
void update(); void update();

View File

@@ -9,7 +9,7 @@ Director::Director(int argc, char *argv[])
section.name = SECTION_PROG_LOGO; section.name = SECTION_PROG_LOGO;
section.subsection = SUBSECTION_LOGO_TO_INTRO; section.subsection = SUBSECTION_LOGO_TO_INTRO;
section.name = SECTION_PROG_GAME; section.name = SECTION_PROG_ENDING;
// Crea e inicializa las opciones del programa // Crea e inicializa las opciones del programa
iniOptions(); iniOptions();
@@ -300,11 +300,22 @@ void Director::loadResources(section_t section)
else if (section.name == SECTION_PROG_ENDING) else if (section.name == SECTION_PROG_ENDING)
{ {
// Texturas
std::vector<std::string> textureList; std::vector<std::string> textureList;
textureList.push_back("jailgames.png"); textureList.push_back("ending1.png");
textureList.push_back("since_1998.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); resource->loadTextures(textureList);
// Offsets
std::vector<std::string> offsetsList;
offsetsList.push_back("smb2.txt");
resource->loadOffsets(offsetsList);
} }
else if (section.name == SECTION_PROG_GAME_OVER) 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_sound1.ogg", t_music);
asset->add("/data/music/loading_sound2.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/loading_sound3.ogg", t_music);
asset->add("/data/music/ending1.ogg", t_music);
asset->add("/data/music/ending2.ogg", t_music);
// Efectos de sonido // Efectos de sonido
asset->add("/data/sound/item.wav", t_sound); 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_bn_zxarne.png", t_bitmap);
asset->add("/data/title/loading_screen_color_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 // Credits
asset->add("/data/credits/shine.png", t_bitmap); asset->add("/data/credits/shine.png", t_bitmap);
asset->add("/data/credits/shine.ani", t_bitmap); asset->add("/data/credits/shine.ani", t_bitmap);

View File

@@ -19,6 +19,15 @@ Ending::Ending(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset
section.subsection = 0; section.subsection = 0;
ticks = 0; ticks = 0;
ticksSpeed = 15; 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 // Destructor

View File

@@ -11,6 +11,7 @@
#include "common/utils.h" #include "common/utils.h"
#include "const.h" #include "const.h"
#include <vector> #include <vector>
#include <string>
#ifndef ENDING_H #ifndef ENDING_H
#define ENDING_H #define ENDING_H
@@ -31,10 +32,11 @@ private:
AnimatedSprite *sprite; // Sprite para el brillo del corazón AnimatedSprite *sprite; // Sprite para el brillo del corazón
// Variables // Variables
int counter; // Contador int counter; // Contador
section_t section; // Estado del bucle principal para saber si continua o se sale 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 ticks; // Contador de ticks para ajustar la velocidad del programa
Uint32 ticksSpeed; // Velocidad a la que se repiten los bucles del programa Uint32 ticksSpeed; // Velocidad a la que se repiten los bucles del programa
std::vector<std::string> texts; // Vector con los textos
// Actualiza el objeto // Actualiza el objeto
void update(); void update();