58 DWORD dw = GetLastError();
59 sprintf(szBuf,
"%s failed: GetLastError returned %i\n",
60 (
char*)plugin_file, (
int)dw);
68 farp = GetProcAddress(handle,
"DestroyEffectFactory");
99 if(pfx==NULL)
return NULL;
105 for(
int i=0;i<
n;i++) narray[i] =
array[i];
125 if(
array[j]==Efecto) {
133 for(i=0;i<j;i++) narray[i] =
array[i];
134 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;
172 for(
MOuint i = 0; i < plugins.Count(); i++)
173 if(!stricmp(plugins[i]->GetName(), complete_name))
183 plg_index = plugins.Count();
185 plugins.Add( pPlugin );
189 if(plugins[plg_index]->m_factory!=NULL)
190 return plugins[plg_index]->Create();
201 if(!stricmp(effect->
GetName(),
""))
return false;
206 complete_name+=
moText(
"_d");
208 complete_name +=
moText(
".dll");
212 complete_name+=
moText(
"_d");
214 complete_name += moPluginExtension;
221 for(
MOuint i = 0; i < plugins.Count(); i++)
222 if(!stricmp(plugins[i]->GetName(), complete_name))
233 bool res = plugins[plg_index]->Destroy(effect);
236 if (res && plugins[plg_index]->n == 0) {
237 plugins[plg_index]->Unload();
238 plugins.Remove(plg_index);
LIBMOLDEO_API bool moDeleteEffect(moEffect *effect, moPluginsArray &plugins)
moEffectFactory *(MO_PLG_ENTRY * CreateEffectFactoryFunction)()
static void Error(moText p_text)
Anuncia un error.
moEffectFactory * m_factory
virtual void Destroy(moEffect *fx)=0
const moText & GetName() const
LIBMOLDEO_API moEffect * moNewEffect(moText effect_name, moPluginsArray &plugins)
virtual moEffect * Create(void)=0
bool Destroy(moEffect *effect)
clase de para manejar textos
void(MO_PLG_ENTRY * DestroyEffectFactoryFunction)()
moDefineDynamicArray(moPluginDefinitions) moDefineDynamicArray(moPluginsArray) moEffectFactory
DestroyEffectFactoryFunction DestroyEffectFactory
void moUnloadPlugin(MOpluginHandle &handle)
static const moText & GetModulesDir()
Fábrica de efectos, clase abstracta pura a implementar para un plugin derivado de moEffect.
void Load(moText plugin_file)
CreateEffectFactoryFunction CreateEffectFactory
clase base para objetos dibujables
MOpluginHandle moLoadPlugin(moText fn)