Creada la classe Resource
Afegida la musica i els sons a Resource
This commit is contained in:
@@ -104,38 +104,6 @@ std::string toLower(const std::string &str)
|
||||
return result;
|
||||
}
|
||||
|
||||
// Obtiene el fichero de sonido a partir de un nombre
|
||||
JA_Sound_t *getSound(const std::vector<SoundFile> &sounds, const std::string &name)
|
||||
{
|
||||
for (const auto &s : sounds)
|
||||
{
|
||||
if (s.name == name)
|
||||
{
|
||||
return s.file;
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Obtiene el fichero de música a partir de un nombre
|
||||
JA_Music_t *getMusic(const std::vector<MusicFile> &music, const std::string &name)
|
||||
{
|
||||
for (const auto &m : music)
|
||||
{
|
||||
if (m.name == name)
|
||||
{
|
||||
return m.file;
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Ordena las entradas de la tabla de records
|
||||
HiScoreEntry sortHiScoreTable(const HiScoreEntry &entry1, const HiScoreEntry &entry2)
|
||||
{
|
||||
return (entry1.score > entry2.score) ? entry1 : entry2;
|
||||
}
|
||||
|
||||
// Dibuja un circulo
|
||||
void DrawCircle(SDL_Renderer *renderer, int32_t centerX, int32_t centerY, int32_t radius)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user