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 | |
|
|
4 | Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team |
9 | Copyright (C) 1994 Mark Wedel |
5 | Copyright (C) 1994 Mark Wedel |
10 | Copyright (C) 1992 Frank Tore Johansen |
6 | Copyright (C) 1992 Frank Tore Johansen |
11 | |
7 | |
12 | This program is free software; you can redistribute it and/or modify |
8 | This program is free software; you can redistribute it and/or modify |
13 | it under the terms of the GNU General Public License as published by |
9 | it under the terms of the GNU General Public License as published by |
… | |
… | |
32 | * |
28 | * |
33 | * ''', run and fire-keys are parsed separately (cannot be overrided). |
29 | * ''', run and fire-keys are parsed separately (cannot be overrided). |
34 | */ |
30 | */ |
35 | |
31 | |
36 | |
32 | |
37 | /* The initialized arrays were removed from this file and are now |
33 | /* The initialised arrays were removed from this file and are now |
38 | * in commands.c. Initializing the arrays in any header file |
34 | * in commands.c. initialising the arrays in any header file |
39 | * is stupid, as it means that header file can only be included |
35 | * 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 |
36 | * 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 |
37 | * file then?). Header files should be used like this one - to declare |
42 | * the structures externally - they actual structures should resided/ |
38 | * the structures externally - they actual structures should resided/ |
43 | * be initialized in one of the source files. |
39 | * be initialised in one of the source files. |
44 | */ |
40 | */ |
45 | |
41 | |
46 | #ifndef COMMANDS_H |
42 | #ifndef COMMANDS_H |
47 | #define COMMANDS_H |
43 | #define COMMANDS_H |
48 | |
44 | |
49 | typedef int (*CommFunc)(object *op, char *params); |
45 | typedef int (*CommFunc)(object *op, char *params); |
50 | |
46 | |
51 | typedef struct { /* global list's structure */ |
47 | struct CommArray_s { /* global list's structure */ |
52 | const char *name; |
48 | const char *name; |
53 | CommFunc func; |
49 | CommFunc func; |
54 | float time; /* How long it takes to execute this command */ |
50 | float time; /* How long it takes to execute this command */ |
55 | } CommArray_s; |
51 | }; |
56 | |
52 | |
57 | |
53 | |
58 | extern CommArray_s Commands[],NewServerCommands [],SocketCommands[], |
54 | extern CommArray_s Commands[],NewServerCommands [],SocketCommands[], |
59 | WizCommands [], CommunicationCommands[]; |
55 | WizCommands [], CommunicationCommands[]; |
60 | |
56 | |
61 | extern const int CommandsSize,NewServerCommandSize, |
57 | extern const int CommandsSize,NewServerCommandSize, |
62 | SocketCommandsSize, WizCommandsSize, CommunicationCommandSize; |
58 | SocketCommandsSize, WizCommandsSize, CommunicationCommandSize; |
63 | |
59 | |
64 | #define EMOTE_NOD 1 |
60 | #define EMOTE_NOD 1 |
65 | #define EMOTE_DANCE 2 |
61 | #define EMOTE_DANCE 2 |
66 | #define EMOTE_KISS 3 |
62 | #define EMOTE_KISS 3 |
67 | #define EMOTE_BOUNCE 4 |
63 | #define EMOTE_BOUNCE 4 |