Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-05-18 09:21:20 +0000
committerStijn Buys <ingar@osirion.org>2008-05-18 09:21:20 +0000
commit4a2bad92171ff8a9a248599f47087cfe39e93653 (patch)
treeb8a4fe7f616b3e4f707d89a35fff5e8b5fdcfcc8 /src/client/client.cc
parenta185c11f2397c0296a4b62cc266b4fa00a63c1e2 (diff)
OpenAL support
Diffstat (limited to 'src/client/client.cc')
-rw-r--r--src/client/client.cc39
1 files changed, 16 insertions, 23 deletions
diff --git a/src/client/client.cc b/src/client/client.cc
index 85dec27..ed31c65 100644
--- a/src/client/client.cc
+++ b/src/client/client.cc
@@ -10,6 +10,7 @@
#include <cmath>
#include <iomanip>
+#include "audio/audio.h"
#include "client/chat.h"
#include "client/client.h"
#include "client/video.h"
@@ -23,26 +24,6 @@ namespace client
{
core::Cvar *cl_framerate = 0;
-
-//--- private definition ------------------------------------------
-
-/// client application implementation
-class Client : public core::Application
-{
-public:
- /// initialize the client Client
- virtual void init(int count, char **arguments);
-
- /// run the client Client
- virtual void run();
-
- /// shutdown the client Client
- virtual void shutdown();
-
- /// quit the client Client
- virtual void quit(int status);
-};
-
Client app;
//--- engine functions --------------------------------------------
@@ -71,6 +52,11 @@ void client_main(int count, char **arguments)
app.shutdown();
}
+Client *client()
+{
+ return &app;
+}
+
//--- private -----------------------------------------------------
void Client::quit(int status)
@@ -112,6 +98,9 @@ void Client::init(int count, char **arguments)
// initialize input
input::init();
+
+ // initialize audio
+ audio::init();
// add engine functions
core::Func *func = 0;
@@ -147,8 +136,6 @@ void Client::run()
}
};
- //con_debug << "tick " << std::setw(8) << chrono << " " << std::setw(8) << current << " " << elapsed;
-
}
}
@@ -157,11 +144,12 @@ void Client::shutdown()
{
con_print << "^BShutting down client..." << std::endl;
- // remove engine functions
core::Func::remove("r_restart");
chat::shutdown();
+ audio::shutdown();
+
Console::shutdown();
input::shutdown();
@@ -173,5 +161,10 @@ void Client::shutdown()
quit(0);
}
+void Client::notify_sound(const char * name)
+{
+ audio::play(name);
+}
+
} // namespace client