Crossfire Server, Trunk  R20513
cfanim.h
Go to the documentation of this file.
1 /*****************************************************************************/
2 /* Crossfire Animator v2.0a */
3 /* Contacts: yann.chachkoff@myrealbox.com, tchize@myrealbox.com */
4 /*****************************************************************************/
5 /* That code is placed under the GNU General Public Licence (GPL) */
6 /* */
7 /* (C) 2001 David Delbecq for the original code version. */
8 /*****************************************************************************/
9 /* CrossFire, A Multiplayer game for X-windows */
10 /* */
11 /* Copyright (C) 2000 Mark Wedel */
12 /* Copyright (C) 1992 Frank Tore Johansen */
13 /* */
14 /* This program is free software; you can redistribute it and/or modify */
15 /* it under the terms of the GNU General Public License as published by */
16 /* the Free Software Foundation; either version 2 of the License, or */
17 /* (at your option) any later version. */
18 /* */
19 /* This program is distributed in the hope that it will be useful, */
20 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
21 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
22 /* GNU General Public License for more details. */
23 /* */
24 /* You should have received a copy of the GNU General Public License */
25 /* along with this program; if not, write to the Free Software */
26 /* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
27 /* */
28 /*****************************************************************************/
29 #ifndef PLUGIN_ANIM_H
30 #define PLUGIN_ANIM_H
31 
32 #define PLUGIN_NAME "Animator"
33 #define PLUGIN_VERSION "CFAnim Plugin 2.0"
34 
35 #include <plugin.h>
36 #include <plugin_common.h>
37 
39 enum time_enum {
42 };
43 
45 typedef enum anim_move_result {
49 
50 struct CFanimation_struct;
51 struct CFmovement_struct;
52 
53 typedef anim_move_result (*CFAnimRunFunc)(struct CFanimation_struct *animation, long int id, void *parameters);
54 
55 typedef long int (*CFAnimInitFunc)(const char *name, char *parameters, struct CFmovement_struct *);
56 
58 typedef struct CFmovement_struct {
61  void *parameters;
62  long int id;
63  int tick;
65 } CFmovement;
66 
68 typedef struct CFanimation_struct {
69  char *name;
70  object *victim;
71  object *event;
72  int paralyze;
73  int invisible;
74  int wizard;
75  int unique;
76  int verbose;
77  int ghosted;
80  object *corpse;
81  long int tick_left;
82  enum time_enum time_representation;
85 } CFanimation;
86 
88 typedef struct {
89  const char *name;
93 
95 
96 extern int animationcount;
97 
98 #include <cfanim_proto.h>
99 
100 #endif /* PLUGIN_ANIM_H */
void * parameters
Parameters to the function.
Definition: cfanim.h:61
CFAnimInitFunc funcinit
Function to process the parameters of the move.
Definition: cfanim.h:90
int tick
Move duration, units depending on parent&#39;s time_representation.
Definition: cfanim.h:63
long int id
Identifier, used for various things.
Definition: cfanim.h:62
long int(* CFAnimInitFunc)(const char *name, char *parameters, struct CFmovement_struct *)
Definition: cfanim.h:55
One server tick.
Definition: cfanim.h:41
CFAnimRunFunc func
Function to run for this move.
Definition: cfanim.h:60
anim_move_result(* CFAnimRunFunc)(struct CFanimation_struct *animation, long int id, void *parameters)
Definition: cfanim.h:53
Definitions for the plugin system.
CFAnimRunFunc funcrun
Function to run the move.
Definition: cfanim.h:91
object * victim
Definition: cfanim.h:70
object * event
Definition: cfanim.h:71
struct CFanimation_struct * parent
Animation this move is linked to.
Definition: cfanim.h:59
CFanimationHook animationbox[]
Available animation commands.
Definition: cfanim.c:512
Move completed.
Definition: cfanim.h:46
object * corpse
Definition: cfanim.h:80
struct CFanimation_struct CFanimation
One full animation.
One move in an animation.
Definition: cfanim.h:58
anim_move_result
Result of one animation move.
Definition: cfanim.h:45
struct CFanimation_struct * nextanimation
Definition: cfanim.h:84
One full animation.
Definition: cfanim.h:68
struct CFmovement_struct * nextmovement
Definition: cfanim.h:83
One second.
Definition: cfanim.h:40
const char * name
Name as it appears in the animation file.
Definition: cfanim.h:89
Move should continue next time.
Definition: cfanim.h:47
struct CFmovement_struct CFmovement
One move in an animation.
long int tick_left
Definition: cfanim.h:81
struct CFmovement_struct * next
Next move in the animation.
Definition: cfanim.h:64
int animationcount
Definition: cfanim.c:562
Available animation move.
Definition: cfanim.h:88
int errors_allowed
Definition: cfanim.h:78
time_enum
Time units the animation can use.
Definition: cfanim.h:39