La música la tiene ahora la clase Director
This commit is contained in:
@@ -183,4 +183,32 @@ std::string toLower(std::string str)
|
||||
std::string nova(lower);
|
||||
free(lower);
|
||||
return nova;
|
||||
}
|
||||
|
||||
// Obtiene el fichero de sonido a partir de un nombre
|
||||
JA_Sound_t *getSound(std::vector<sound_file_t> sounds, std::string name)
|
||||
{
|
||||
for (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(std::vector<music_file_t> music, std::string name)
|
||||
{
|
||||
for (auto m : music)
|
||||
{
|
||||
if (m.name == name)
|
||||
{
|
||||
return m.file;
|
||||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
Reference in New Issue
Block a user