fixed get_sounds_path as well + nuked the last unneccessary tolower calls

This commit is contained in:
David Skoland 2018-11-16 02:37:57 +01:00
parent 727c39a1df
commit ee4b9acfeb
5 changed files with 8 additions and 8 deletions

View File

@ -102,7 +102,7 @@ public:
QString get_default_theme_path(QString p_file);
QString get_character_path(QString p_character, QString p_file);
QString get_character_emotions_path(QString p_character, QString p_file);
QString get_sounds_path();
QString get_sounds_path(QString p_file);
QString get_music_path(QString p_song);
QString get_background_path(QString p_file);
QString get_default_background_path(QString p_file);

View File

@ -16,7 +16,7 @@ AOBlipPlayer::~AOBlipPlayer()
void AOBlipPlayer::set_blips(QString p_sfx)
{
m_sfxplayer->stop();
QString f_path = ao_app->get_sounds_path() + p_sfx.toLower();
QString f_path = ao_app->get_sounds_path(p_sfx);
m_sfxplayer->setSource(QUrl::fromLocalFile(f_path));
set_volume(m_volume);
}

View File

@ -16,12 +16,12 @@ AOSfxPlayer::~AOSfxPlayer()
void AOSfxPlayer::play(QString p_sfx, QString p_char)
{
m_sfxplayer->stop();
p_sfx = p_sfx.toLower();
p_sfx = p_sfx;
QString f_path;
if (p_char != "")
f_path = ao_app->get_character_path(p_char, p_sfx);
else
f_path = ao_app->get_sounds_path() + p_sfx;
f_path = ao_app->get_sounds_path(p_sfx);
m_sfxplayer->setSource(QUrl::fromLocalFile(f_path));
set_volume(m_volume);

View File

@ -86,9 +86,9 @@ QString AOApplication::get_character_emotions_path(QString p_character, QString
#endif
}
QString AOApplication::get_sounds_path()
QString AOApplication::get_sounds_path(QString p_file)
{
QString path = get_base_path() + "sounds/general/";
QString path = get_base_path() + "sounds/general/" + p_file;
#ifndef CASE_SENSITIVE_FILESYSTEM
return path;
#else

View File

@ -433,14 +433,14 @@ QString AOApplication::get_chat(QString p_char)
QString f_result = read_char_ini(p_char, "chat", "[Options]", "[Time]");
//handling the correct order of chat is a bit complicated, we let the caller do it
return f_result.toLower();
return f_result;
}
QString AOApplication::get_char_shouts(QString p_char)
{
QString f_result = read_char_ini(p_char, "shouts", "[Options]", "[Time]");
return f_result.toLower();
return f_result;
}
int AOApplication::get_preanim_duration(QString p_char, QString p_emote)