57 DWORD dw = GetLastError();
58 sprintf(szBuf,
"%s failed: GetLastError returned %i\n",
59 (
char*)plugin_file, (
int)dw);
67 farp = GetProcAddress(handle,
"DestroyPostEffectFactory");
98 if(pfx==NULL)
return NULL;
104 for(
int i=0;i<
n;i++) narray[i] =
array[i];
124 if(
array[j]==PostEfecto) {
132 for(i=0;i<j;i++) narray[i] =
array[i];
133 for(i=j;i<(n-1);i++) narray[i] =
array[i+1];
152 if(!stricmp(effect_name,
"nil"))
return NULL;
157 complete_name+=
moText(
"_d");
159 complete_name +=
moText(
".dll");
163 complete_name+=
moText(
"_d");
165 complete_name += moPluginExtension;
173 for(
MOuint i = 0; i < plugins.Count(); i++)
174 if(!stricmp(plugins[i]->GetName(), complete_name))
184 plg_index = plugins.Count();
186 plugins.Add( pplugin );
190 if(plugins[plg_index]->m_factory!=NULL)
191 return plugins[plg_index]->Create();
202 if(!stricmp(posteffect->
GetName(),
""))
return false;
207 complete_name+=
moText(
"_d");
209 complete_name +=
moText(
".dll");
213 complete_name+=
moText(
"_d");
215 complete_name += moPluginExtension;
222 for(
MOuint i = 0; i < plugins.Count(); i++)
223 if(!stricmp(plugins[i]->GetName(), complete_name))
234 bool res = plugins[plg_index]->Destroy(posteffect);
237 if (res && plugins[plg_index]->n == 0) {
238 plugins[plg_index]->Unload();
239 plugins.Remove(plg_index);
static void Error(moText p_text)
Anuncia un error.
moDefineDynamicArray(moPostPluginsArray) moPostEffectFactory
moPostEffectFactory *(MO_PLG_ENTRY * CreatePostEffectFactoryFunction)()
const moText & GetName() const
CreatePostEffectFactoryFunction CreatePostEffectFactory
LIBMOLDEO_API bool moDeletePostEffect(moPostEffect *posteffect, moPostPluginsArray &plugins)
void Load(moText plugin_file)
clase de para manejar textos
void moUnloadPlugin(MOpluginHandle &handle)
static const moText & GetModulesDir()
DestroyPostEffectFactoryFunction DestroyPostEffectFactory
bool Destroy(moPostEffect *posteffect)
virtual moPostEffect * Create(void)=0
void(MO_PLG_ENTRY * DestroyPostEffectFactoryFunction)()
moPostEffectFactory * m_factory
LIBMOLDEO_API moPostEffect * moNewPostEffect(moText effect_name, moPostPluginsArray &plugins)
virtual void Destroy(moPostEffect *fx)=0
MOpluginHandle moLoadPlugin(moText fn)