added amb1666 - rehaul over the ml api so extensions can easily use translations

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402132
This commit is contained in:
David Anderson
2008-05-10 09:23:55 +00:00
parent 1e70b04f48
commit c7418e70ba
27 changed files with 1060 additions and 227 deletions
+9 -1
View File
@@ -79,6 +79,9 @@ bool SM_AcquireInterfaces(char *error, size_t maxlength)
#if defined SMEXT_ENABLE_TEXTPARSERS
SM_FIND_IFACE_OR_FAIL(TEXTPARSERS, sm_text, error, maxlength);
#endif
#if defined SMEXT_ENABLE_TRANSLATOR
SM_FIND_IFACE_OR_FAIL(TRANSLATOR, sm_translator, error, maxlength);
#endif
return true;
}
@@ -131,6 +134,9 @@ void SM_UnsetInterfaces()
#if defined SMEXT_ENABLE_TEXTPARSERS
sm_text = NULL;
#endif
#if defined SMEXT_ENABLE_TRANSLATOR
sm_translator = NULL;
#endif
}
IExtension *myself = NULL;
@@ -179,4 +185,6 @@ SourceMod::IAdminSystem *sm_adminsys = NULL;
#if defined SMEXT_ENABLE_TEXTPARSERS
SourceMod::ITextParsers *sm_text = NULL;
#endif
#if defined SMEXT_ENABLE_TRANSLATOR
SourceMod::ITranslator *sm_translator = NULL;
#endif
+6
View File
@@ -70,6 +70,7 @@ void SM_UnsetInterfaces();
//#define SMEXT_ENABLE_PLUGINSYS
//#define SMEXT_ENABLE_ADMINSYS
//#define SMEXT_ENABLE_TEXTPARSERS
//#define SMEXT_ENABLE_TRANSLATOR
/**
@@ -155,5 +156,10 @@ extern SourceMod::IAdminSystem *sm_adminsys;
extern SourceMod::ITextParsers *sm_text;
#endif
#if defined SMEXT_ENABLE_TRANSLATOR
#include <ITranslator.h>
extern SourceMod::ITranslator *sm_translator;
#endif
#endif //_INCLUDE_SOURCEMOD_CONFIG_H_