Difference for plugins/cfanim/cfanim.c from version 1.4 to 1.5


version 1.4 version 1.5
Line 950
 
Line 950
         return NULL;          return NULL;
 }  }
   
 int initPlugin(const char* iversion, f_plug_api gethooksptr)  CF_PLUGIN int initPlugin(const char* iversion, f_plug_api gethooksptr)
 {  {
     gethook = gethooksptr;      gethook = gethooksptr;
   
Line 960
 
Line 960
     return 0;      return 0;
 }  }
   
 void* getPluginProperty(int* type, ...)  CF_PLUGIN void* getPluginProperty(int* type, ...)
 {  {
     va_list args;      va_list args;
     char* propname;      char* propname;
   
     va_start(args, type);      va_start(args, type);
     propname = va_arg(args, char *);      propname = va_arg(args, char *);
     printf("Property name: %s\n", propname);  
   
     if (!strcmp(propname, "Identification"))      if (!strcmp(propname, "Identification"))
     {      {
Line 982
 
Line 981
     return NULL;      return NULL;
 }  }
   
 int runPluginCommand(object* op, char* params)  CF_PLUGIN int runPluginCommand(object* op, char* params)
 {  {
     return -1;      return -1;
 }  }
   
 int postInitPlugin()  CF_PLUGIN int postInitPlugin()
 {  {
     int hooktype = 1;      int hooktype = 1;
     int rtype = 0;      int rtype = 0;
   
     printf("Template 2.0a post init\n");      printf("CFAnim 2.0a post init\n");
     registerGlobalEvent =   gethook(&rtype,hooktype,"cfapi_system_register_global_event");      registerGlobalEvent =   gethook(&rtype,hooktype,"cfapi_system_register_global_event");
     unregisterGlobalEvent = gethook(&rtype,hooktype,"cfapi_system_unregister_global_event");      unregisterGlobalEvent = gethook(&rtype,hooktype,"cfapi_system_unregister_global_event");
     systemDirectory       = gethook(&rtype,hooktype,"cfapi_system_directory");      systemDirectory       = gethook(&rtype,hooktype,"cfapi_system_directory");
Line 1004
 
Line 1003
     return 0;      return 0;
 }  }
   
 void* globalEventListener(int* type, ...)  CF_PLUGIN void* globalEventListener(int* type, ...)
 {  {
     va_list args;      va_list args;
     static int rv=0;      static int rv=0;
     CFPContext* context;      CFPContext* context;
     context = malloc(sizeof(CFPContext));  
     char* buf;      char* buf;
     player* pl;      player* pl;
       context = malloc(sizeof(CFPContext));
   
     va_start(args, type);      va_start(args, type);
     context->event_code = va_arg(args, int);      context->event_code = va_arg(args, int);
Line 1101
 
Line 1100
     return &rv;      return &rv;
 }  }
   
 void* eventListener(int* type, ...)  CF_PLUGIN void* eventListener(int* type, ...)
 {  {
     static int rv=0;      static int rv=0;
     va_list args;      va_list args;
Line 1144
 
Line 1143
     return &rv;      return &rv;
 }  }
   
 int   closePlugin()  CF_PLUGIN int   closePlugin()
 {  {
     printf("CFAnim 2.0a closing\n");      printf("CFAnim 2.0a closing\n");
     return 0;      return 0;


Legend:
line(s) removed in v.1.4 
line(s) changed
 line(s) added in v.1.5

File made using version 1.98 of cvs2html by leaf at 2011-07-21 16:58