fixed get_sounds_path as well + nuked the last unneccessary tolower calls
This commit is contained in:
		
							parent
							
								
									727c39a1df
								
							
						
					
					
						commit
						ee4b9acfeb
					
				@ -102,7 +102,7 @@ public:
 | 
				
			|||||||
  QString get_default_theme_path(QString p_file);
 | 
					  QString get_default_theme_path(QString p_file);
 | 
				
			||||||
  QString get_character_path(QString p_character, 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_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_music_path(QString p_song);
 | 
				
			||||||
  QString get_background_path(QString p_file);
 | 
					  QString get_background_path(QString p_file);
 | 
				
			||||||
  QString get_default_background_path(QString p_file);
 | 
					  QString get_default_background_path(QString p_file);
 | 
				
			||||||
 | 
				
			|||||||
@ -16,7 +16,7 @@ AOBlipPlayer::~AOBlipPlayer()
 | 
				
			|||||||
void AOBlipPlayer::set_blips(QString p_sfx)
 | 
					void AOBlipPlayer::set_blips(QString p_sfx)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  m_sfxplayer->stop();
 | 
					  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));
 | 
					  m_sfxplayer->setSource(QUrl::fromLocalFile(f_path));
 | 
				
			||||||
  set_volume(m_volume);
 | 
					  set_volume(m_volume);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -16,12 +16,12 @@ AOSfxPlayer::~AOSfxPlayer()
 | 
				
			|||||||
void AOSfxPlayer::play(QString p_sfx, QString p_char)
 | 
					void AOSfxPlayer::play(QString p_sfx, QString p_char)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  m_sfxplayer->stop();
 | 
					  m_sfxplayer->stop();
 | 
				
			||||||
  p_sfx = p_sfx.toLower();
 | 
					  p_sfx = p_sfx;
 | 
				
			||||||
  QString f_path;
 | 
					  QString f_path;
 | 
				
			||||||
  if (p_char != "")
 | 
					  if (p_char != "")
 | 
				
			||||||
    f_path = ao_app->get_character_path(p_char, p_sfx);
 | 
					    f_path = ao_app->get_character_path(p_char, p_sfx);
 | 
				
			||||||
  else
 | 
					  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));
 | 
					  m_sfxplayer->setSource(QUrl::fromLocalFile(f_path));
 | 
				
			||||||
  set_volume(m_volume);
 | 
					  set_volume(m_volume);
 | 
				
			||||||
 | 
				
			|||||||
@ -86,9 +86,9 @@ QString AOApplication::get_character_emotions_path(QString p_character, QString
 | 
				
			|||||||
#endif
 | 
					#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
 | 
					#ifndef CASE_SENSITIVE_FILESYSTEM
 | 
				
			||||||
  return path;
 | 
					  return path;
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
 | 
				
			|||||||
@ -433,14 +433,14 @@ QString AOApplication::get_chat(QString p_char)
 | 
				
			|||||||
  QString f_result = read_char_ini(p_char, "chat", "[Options]", "[Time]");
 | 
					  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
 | 
					  //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 AOApplication::get_char_shouts(QString p_char)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  QString f_result = read_char_ini(p_char, "shouts", "[Options]", "[Time]");
 | 
					  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)
 | 
					int AOApplication::get_preanim_duration(QString p_char, QString p_emote)
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user