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 |
#ifndef PLUGIN_ANIM_H |
29 |
#define PLUGIN_ANIM_H |
30 |
|
31 |
#define PLUGIN_NAME "Animator" |
32 |
#define PLUGIN_VERSION "CFAnim Plugin 2.0" |
33 |
|
34 |
#ifndef __CEXTRACT__ |
35 |
#include <plugin.h> |
36 |
#endif |
37 |
|
38 |
#include <plugin_common.h> |
39 |
enum time_enum {time_second, time_tick}; |
40 |
struct CFanimation_struct; |
41 |
struct CFmovement_struct; |
42 |
typedef int (*CFAnimRunFunc) (struct CFanimation_struct* animation, long int id, void* parameters); |
43 |
typedef long int (*CFAnimInitFunc) (char* name,char* parameters,struct CFmovement_struct*); |
44 |
typedef struct CFmovement_struct |
45 |
{ |
46 |
struct CFanimation_struct* parent; |
47 |
CFAnimRunFunc func; |
48 |
void* parameters; |
49 |
long int id; |
50 |
int tick; |
51 |
struct CFmovement_struct* next; |
52 |
} CFmovement; |
53 |
typedef struct CFanimation_struct |
54 |
{ |
55 |
char* name; |
56 |
object* victim; |
57 |
int paralyze; |
58 |
int invisible; |
59 |
int wizard; |
60 |
int unique; |
61 |
int verbose; |
62 |
int ghosted; |
63 |
int errors_allowed; |
64 |
object* corpse; |
65 |
long int tick_left; |
66 |
enum time_enum time_representation; |
67 |
struct CFmovement_struct* nextmovement; |
68 |
struct CFanimation_struct* nextanimation; |
69 |
} CFanimation; |
70 |
typedef struct |
71 |
{ |
72 |
char* name; |
73 |
CFAnimInitFunc funcinit; |
74 |
CFAnimRunFunc funcrun; |
75 |
} CFanimationHook; |
76 |
extern CFanimationHook animationbox[]; |
77 |
extern int animationcount; |
78 |
int get_boolean (char* string,int* bool); |
79 |
|
80 |
typedef struct _cfpcontext |
81 |
{ |
82 |
struct _cfpcontext* down; |
83 |
object* who; |
84 |
object* activator; |
85 |
object* third; |
86 |
char message[1024]; |
87 |
int fix; |
88 |
int event_code; |
89 |
char options[1024]; |
90 |
char script[1024]; |
91 |
int returnvalue; |
92 |
int parms[5]; |
93 |
} CFPContext; |
94 |
|
95 |
extern f_plug_api gethook; |
96 |
extern CFPContext* context_stack; |
97 |
extern CFPContext* current_context; |
98 |
#include <cfanim_proto.h> |
99 |
|
100 |
#endif /* PLUGIN_ANIM_H */ |