#define ADD_ENTITY( EntityName, EntityClass ) \ extern "C" _declspec( dllexport ) CBaseEntity &EntityName( void ); \ CBaseEntity &EntityName( void ) { CBaseEntity *Ent = new EntityClass; return *(Ent); }
That I use to export a function (the name of the entity i want to allocate) and when I want to load all my entity's I call a function.
Which then calls all the functions exported (example: func_door) and returns the created class.
I have no idea how to call the exported function (or if its even possible, since it's all inside the same .exe).
Is there anyway I can do this?
Thanks