Crossfire Server, Branch 1.12  R12190
cfanim.h
Go to the documentation of this file.
00001 /*****************************************************************************/
00002 /* Crossfire Animator v2.0a                                                  */
00003 /* Contacts: yann.chachkoff@myrealbox.com, tchize@myrealbox.com              */
00004 /*****************************************************************************/
00005 /* That code is placed under the GNU General Public Licence (GPL)            */
00006 /*                                                                           */
00007 /* (C) 2001 David Delbecq for the original code version.                     */
00008 /*****************************************************************************/
00009 /*  CrossFire, A Multiplayer game for X-windows                              */
00010 /*                                                                           */
00011 /*  Copyright (C) 2000 Mark Wedel                                            */
00012 /*  Copyright (C) 1992 Frank Tore Johansen                                   */
00013 /*                                                                           */
00014 /*  This program is free software; you can redistribute it and/or modify     */
00015 /*  it under the terms of the GNU General Public License as published by     */
00016 /*  the Free Software Foundation; either version 2 of the License, or        */
00017 /*  (at your option) any later version.                                      */
00018 /*                                                                           */
00019 /*  This program is distributed in the hope that it will be useful,          */
00020 /*  but WITHOUT ANY WARRANTY; without even the implied warranty of           */
00021 /*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            */
00022 /*  GNU General Public License for more details.                             */
00023 /*                                                                           */
00024 /*  You should have received a copy of the GNU General Public License        */
00025 /*  along with this program; if not, write to the Free Software              */
00026 /*  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                */
00027 /*                                                                           */
00028 /*****************************************************************************/
00029 #ifndef PLUGIN_ANIM_H
00030 #define PLUGIN_ANIM_H
00031 
00032 #define PLUGIN_NAME    "Animator"
00033 #define PLUGIN_VERSION "CFAnim Plugin 2.0"
00034 
00035 #ifndef __CEXTRACT__
00036 #include <plugin.h>
00037 #include <plugin_common.h>
00038 #endif
00039 
00040 #include <plugin_common.h>
00042 enum time_enum {
00043     time_second,    
00044     time_tick       
00045 };
00046 
00048 typedef enum anim_move_result {
00049     mr_finished,        
00050     mr_again            
00051 } anim_move_result;
00052 
00053 struct CFanimation_struct;
00054 struct CFmovement_struct;
00055 
00056 typedef anim_move_result (*CFAnimRunFunc)(struct CFanimation_struct *animation, long int id, void *parameters);
00057 
00058 typedef long int (*CFAnimInitFunc)(const char *name, char *parameters, struct CFmovement_struct *);
00059 
00061 typedef struct CFmovement_struct {
00062     struct CFanimation_struct *parent;  
00063     CFAnimRunFunc func;                 
00064     void *parameters;                   
00065     long int id;                        
00066     int tick;                           
00067     struct CFmovement_struct *next;     
00068 } CFmovement;
00069 
00071 typedef struct CFanimation_struct {
00072     char *name;
00073     object *victim;
00074     int paralyze;
00075     int invisible;
00076     int wizard;
00077     int unique;
00078     int verbose;
00079     int ghosted;
00080     int errors_allowed;
00081     object *corpse;
00082     long int tick_left;
00083     enum time_enum time_representation;
00084     struct CFmovement_struct *nextmovement;
00085     struct CFanimation_struct *nextanimation;
00086 } CFanimation;
00087 
00089 typedef struct {
00090     const char *name;           
00091     CFAnimInitFunc funcinit;    
00092     CFAnimRunFunc funcrun;      
00093 } CFanimationHook;
00094 
00095 extern CFanimationHook animationbox[];
00096 
00097 extern int animationcount;
00098 
00099 #ifndef __CEXTRACT__
00100 #include <cfanim_proto.h>
00101 #endif
00102 
00103 #endif /* PLUGIN_ANIM_H */