1 | /* |
|
|
2 | * static char *rcsid_commands_h = |
|
|
3 | * "$Id: commands.h,v 1.1 2006/02/03 07:12:47 root Exp $"; |
|
|
4 | */ |
|
|
5 | |
|
|
6 | /* |
1 | /* |
7 | CrossFire, A Multiplayer game for X-windows |
2 | CrossFire, A Multiplayer game for X-windows |
8 | |
3 | |
9 | Copyright (C) 1994 Mark Wedel |
4 | Copyright (C) 1994 Mark Wedel |
10 | Copyright (C) 1992 Frank Tore Johansen |
5 | Copyright (C) 1992 Frank Tore Johansen |
… | |
… | |
32 | * |
27 | * |
33 | * ''', run and fire-keys are parsed separately (cannot be overrided). |
28 | * ''', run and fire-keys are parsed separately (cannot be overrided). |
34 | */ |
29 | */ |
35 | |
30 | |
36 | |
31 | |
37 | /* The initialized arrays were removed from this file and are now |
32 | /* The initialised arrays were removed from this file and are now |
38 | * in commands.c. Initializing the arrays in any header file |
33 | * in commands.c. initialising the arrays in any header file |
39 | * is stupid, as it means that header file can only be included |
34 | * is stupid, as it means that header file can only be included |
40 | * in one source file (so what is the point of putting them in a header |
35 | * in one source file (so what is the point of putting them in a header |
41 | * file then?). Header files should be used like this one - to declare |
36 | * file then?). Header files should be used like this one - to declare |
42 | * the structures externally - they actual structures should resided/ |
37 | * the structures externally - they actual structures should resided/ |
43 | * be initialized in one of the source files. |
38 | * be initialised in one of the source files. |
44 | */ |
39 | */ |
45 | |
40 | |
46 | #ifndef COMMANDS_H |
41 | #ifndef COMMANDS_H |
47 | #define COMMANDS_H |
42 | #define COMMANDS_H |
48 | |
43 | |
49 | typedef int (*CommFunc)(object *op, char *params); |
44 | typedef int (*CommFunc)(object *op, char *params); |
50 | |
45 | |
51 | typedef struct { /* global list's structure */ |
46 | struct CommArray_s { /* global list's structure */ |
52 | const char *name; |
47 | const char *name; |
53 | CommFunc func; |
48 | CommFunc func; |
54 | float time; /* How long it takes to execute this command */ |
49 | float time; /* How long it takes to execute this command */ |
55 | } CommArray_s; |
50 | }; |
56 | |
51 | |
57 | |
52 | |
58 | extern CommArray_s Commands[],NewServerCommands [],SocketCommands[], |
53 | extern CommArray_s Commands[],NewServerCommands [],SocketCommands[], |
59 | WizCommands [], CommunicationCommands[]; |
54 | WizCommands [], CommunicationCommands[]; |
60 | |
55 | |
61 | extern const int CommandsSize,NewServerCommandSize, |
56 | extern const int CommandsSize,NewServerCommandSize, |
62 | SocketCommandsSize, WizCommandsSize, CommunicationCommandSize; |
57 | SocketCommandsSize, WizCommandsSize, CommunicationCommandSize; |
63 | |
58 | |
64 | #define EMOTE_NOD 1 |
59 | #define EMOTE_NOD 1 |
65 | #define EMOTE_DANCE 2 |
60 | #define EMOTE_DANCE 2 |
66 | #define EMOTE_KISS 3 |
61 | #define EMOTE_KISS 3 |
67 | #define EMOTE_BOUNCE 4 |
62 | #define EMOTE_BOUNCE 4 |