Now voicepack checking button should work (but it doesn't for me)
authorunc0rr
Sun, 18 Jan 2009 14:25:44 +0000
changeset 1701 ad7a7fd14d36
parent 1700 6b16b0b66f55
child 1702 9b49e96d5dce
Now voicepack checking button should work (but it doesn't for me)
QTfrontend/SDLs.cpp
QTfrontend/SDLs.h
QTfrontend/pages.cpp
share/hedgewars/Data/Sounds/voices/Default/Illgetyou.wav
share/hedgewars/Data/Sounds/voices/Default/Incoming.wav
share/hedgewars/Data/Sounds/voices/Default/Stupid.wav
share/hedgewars/Data/Sounds/voices/Pirate/Coward.wav
share/hedgewars/Data/Sounds/voices/Pirate/Enemydown.wav
share/hedgewars/Data/Sounds/voices/Robot/Reinforcements.wav
share/hedgewars/Data/Sounds/voices/Robot/Yessir.wav
share/hedgewars/Data/Sounds/voices/Singer/Illgetyou.wav
share/hedgewars/Data/Sounds/voices/Singer/Revenge.wav
share/hedgewars/Data/Sounds/voices/Surfer/Illgetyou.wav
share/hedgewars/Data/Sounds/voices/Surfer/Yessir.wav
--- a/QTfrontend/SDLs.cpp	Sun Jan 18 14:21:13 2009 +0000
+++ b/QTfrontend/SDLs.cpp	Sun Jan 18 14:25:44 2009 +0000
@@ -69,8 +69,3 @@
 {
 	Mix_FadeOutMusic(2000);
 }
-
-void SDLInteraction::PlaySound(const QString & filename)
-{
-
-}
--- a/QTfrontend/SDLs.h	Sun Jan 18 14:21:13 2009 +0000
+++ b/QTfrontend/SDLs.h	Sun Jan 18 14:25:44 2009 +0000
@@ -37,7 +37,6 @@
 	QStringList getResolutions() const;
 	void StartMusic();
 	void StopMusic();
-	void PlaySound(const QString & filename);
 };
 
 #endif
--- a/QTfrontend/pages.cpp	Sun Jan 18 14:21:13 2009 +0000
+++ b/QTfrontend/pages.cpp	Sun Jan 18 14:25:44 2009 +0000
@@ -37,6 +37,7 @@
 #include <QTableWidget>
 #include <QAction>
 #include <QMenu>
+#include <QSound>
 
 #include "pages.h"
 #include "sdlkeys.h"
@@ -270,9 +271,9 @@
 	tmpdir.cd(datadir->absolutePath());
 	tmpdir.cd("Sounds/voices");
 	tmpdir.cd(CBVoicepack->currentText());
-	QStringList list = tmpdir.entryList(QStringList() << "*.ogg", QDir::Files);
+	QStringList list = tmpdir.entryList(QStringList() << "*.wav", QDir::Files);
 	if (list.size())
-		;//QSound::play(tmpdir.absolutePath() + list[rand() % list.size()]);
+		QSound::play(tmpdir.absolutePath() + "/" + list[rand() % list.size()]);
 }
 
 PageMultiplayer::PageMultiplayer(QWidget* parent) :
Binary file share/hedgewars/Data/Sounds/voices/Default/Illgetyou.wav has changed
Binary file share/hedgewars/Data/Sounds/voices/Default/Incoming.wav has changed
Binary file share/hedgewars/Data/Sounds/voices/Default/Stupid.wav has changed
Binary file share/hedgewars/Data/Sounds/voices/Pirate/Coward.wav has changed
Binary file share/hedgewars/Data/Sounds/voices/Pirate/Enemydown.wav has changed
Binary file share/hedgewars/Data/Sounds/voices/Robot/Reinforcements.wav has changed
Binary file share/hedgewars/Data/Sounds/voices/Robot/Yessir.wav has changed
Binary file share/hedgewars/Data/Sounds/voices/Singer/Illgetyou.wav has changed
Binary file share/hedgewars/Data/Sounds/voices/Singer/Revenge.wav has changed
Binary file share/hedgewars/Data/Sounds/voices/Surfer/Illgetyou.wav has changed
Binary file share/hedgewars/Data/Sounds/voices/Surfer/Yessir.wav has changed