La música la tiene ahora la clase Director
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
#include <SDL2/SDL.h>
|
||||
#include "texture.h"
|
||||
#include "jail_audio.h"
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -163,6 +164,7 @@ struct options_t
|
||||
op_audio_t audio; // Opciones para el audio
|
||||
};
|
||||
|
||||
// Estructura para almacenar todos los parámetros del juego
|
||||
struct param_t
|
||||
{
|
||||
int gameWidth; // Ancho de la resolucion nativa del juego
|
||||
@@ -181,6 +183,20 @@ struct param_t
|
||||
int titleCounter; // Tiempo de inactividad del titulo
|
||||
};
|
||||
|
||||
// Estructura para almacenar ficheros de sonido y su nombre
|
||||
struct sound_file_t
|
||||
{
|
||||
std::string name; // Nombre del sonido
|
||||
JA_Sound_t *file; // Fichero con el sonido
|
||||
};
|
||||
|
||||
// Estructura para almacenar ficheros musicales y su nombre
|
||||
struct music_file_t
|
||||
{
|
||||
std::string name; // Nombre de la musica
|
||||
JA_Music_t *file; // Fichero con la música
|
||||
};
|
||||
|
||||
// Calcula el cuadrado de la distancia entre dos puntos
|
||||
double distanceSquared(int x1, int y1, int x2, int y2);
|
||||
|
||||
@@ -205,4 +221,10 @@ std::string boolToString(bool value);
|
||||
// Convierte una cadena a minusculas
|
||||
std::string toLower(std::string str);
|
||||
|
||||
// Obtiene el fichero de sonido a partir de un nombre
|
||||
JA_Sound_t *getSound(std::vector<sound_file_t> sounds, std::string name);
|
||||
|
||||
// Obtiene el fichero de música a partir de un nombre
|
||||
JA_Music_t *getMusic(std::vector<music_file_t> music, std::string name);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user