From 28ba97bdd8fb6ca352dc49dba01a66bd155ad523 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sat, 15 Nov 2008 19:24:55 +0000 Subject: entity extensions --- src/client/client.h | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'src/client/client.h') 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(entity->extension(core::Extension::Client)); } + +inline SoundExt *ext_sound(core::Entity *entity) + { return static_cast(entity->extension(core::Extension::Sound)); } + +inline render::RenderExt *ext_render(core::Entity *entity) + { return static_cast(entity->extension(core::Extension::Render)); } + } #endif // __INCLUDED_CLIENT_H__ -- cgit v1.2.3