equal
deleted
inserted
replaced
35 #include <QTabWidget> |
35 #include <QTabWidget> |
36 #include <QTextBrowser> |
36 #include <QTextBrowser> |
37 #include <QTableWidget> |
37 #include <QTableWidget> |
38 #include <QAction> |
38 #include <QAction> |
39 #include <QMenu> |
39 #include <QMenu> |
40 #include <QSound> |
|
41 #include <QDataWidgetMapper> |
40 #include <QDataWidgetMapper> |
42 |
41 |
43 |
42 |
44 #include "pages.h" |
43 #include "pages.h" |
45 #include "sdlkeys.h" |
44 #include "sdlkeys.h" |
59 #include "igbox.h" |
58 #include "igbox.h" |
60 #include "hats.h" |
59 #include "hats.h" |
61 #include "misc.h" |
60 #include "misc.h" |
62 #include "togglebutton.h" |
61 #include "togglebutton.h" |
63 #include "hwform.h" |
62 #include "hwform.h" |
|
63 #include "SDLs.h" |
64 |
64 |
65 PageMain::PageMain(QWidget* parent) : |
65 PageMain::PageMain(QWidget* parent) : |
66 AbstractPage(parent) |
66 AbstractPage(parent) |
67 { |
67 { |
68 if(frontendEffects) setAttribute(Qt::WA_NoSystemBackground, true); |
68 if(frontendEffects) setAttribute(Qt::WA_NoSystemBackground, true); |
288 { |
288 { |
289 QDir tmpdir; |
289 QDir tmpdir; |
290 tmpdir.cd(datadir->absolutePath()); |
290 tmpdir.cd(datadir->absolutePath()); |
291 tmpdir.cd("Sounds/voices"); |
291 tmpdir.cd("Sounds/voices"); |
292 tmpdir.cd(CBVoicepack->currentText()); |
292 tmpdir.cd(CBVoicepack->currentText()); |
293 QStringList list = tmpdir.entryList(QStringList() << "*.wav", QDir::Files); |
293 QStringList list = tmpdir.entryList(QStringList() << "Illgetyou.ogg" << "Incoming.ogg" << "Stupid.ogg" << "Coward.ogg" << "Firstblood.ogg", QDir::Files); |
294 if (list.size()) |
294 if (list.size()) { |
295 QSound::play(tmpdir.absolutePath() + "/" + list[rand() % list.size()]); |
295 // printf("%s\n", QString(tmpdir.absolutePath() + "/" + list[rand() % list.size()]).toLocal8Bit().constData()); |
|
296 int tmp =openal_loadfile(QString(tmpdir.absolutePath() + "/" + list[rand() % list.size()]).toLocal8Bit().constData()); |
|
297 openal_playsound(tmp); |
|
298 } |
|
299 |
|
300 //QSound::play(tmpdir.absolutePath() + "/" + list[rand() % list.size()]); |
296 } |
301 } |
297 |
302 |
298 PageMultiplayer::PageMultiplayer(QWidget* parent) : |
303 PageMultiplayer::PageMultiplayer(QWidget* parent) : |
299 AbstractPage(parent) |
304 AbstractPage(parent) |
300 { |
305 { |