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-11-15 19:24:55 +0000
committerStijn Buys <ingar@osirion.org>2008-11-15 19:24:55 +0000
commit28ba97bdd8fb6ca352dc49dba01a66bd155ad523 (patch)
treeeb4abd0505eb842e15201783529814bda1ae6e76 /src/client/client.h
parent1f0dbeeabdffff096908473168898c5fa63bcff0 (diff)
entity extensions
Diffstat (limited to 'src/client/client.h')
-rw-r--r--src/client/client.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/client/client.h b/src/client/client.h
index 33f64e5..8dd00cb 100644
--- a/src/client/client.h
+++ b/src/client/client.h
@@ -8,7 +8,12 @@
#define __INCLUDED_CLIENT_H__
#include "core/application.h"
+#include "core/extension.h"
+#include "core/entity.h"
+#include "client/clientext.h"
+#include "client/soundext.h"
#include "client/view.h"
+#include "render/renderext.h"
/// client part of the engine
namespace client {
@@ -44,9 +49,6 @@ public:
/// text notifications from the client
void notify_message(const char *message);
- /// remove sound source notification
- virtual void notify_remove_sound(size_t source);
-
/// clear zone notification
virtual void notify_zonechange();
@@ -77,6 +79,15 @@ private:
Client *client();
+inline ClientExt *ext_client(core::Entity *entity)
+ { return static_cast<ClientExt *>(entity->extension(core::Extension::Client)); }
+
+inline SoundExt *ext_sound(core::Entity *entity)
+ { return static_cast<SoundExt *>(entity->extension(core::Extension::Sound)); }
+
+inline render::RenderExt *ext_render(core::Entity *entity)
+ { return static_cast<render::RenderExt *>(entity->extension(core::Extension::Render)); }
+
}
#endif // __INCLUDED_CLIENT_H__