ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/plugins/cfpython/include/cfpython.h
Revision: 1.2
Committed: Sun Aug 13 17:16:02 2006 UTC (17 years, 10 months ago) by elmex
Content type: text/plain
Branch: MAIN
CVS Tags: STABLE
Changes since 1.1: +1 -1 lines
Log Message:
Made server compile with C++.
Removed cfanim plugin and crossedit.
C++ here we come.

File Contents

# User Rev Content
1 root 1.1 /*****************************************************************************/
2     /* CFPython - A Python module for Crossfire RPG. */
3     /* Version: 2.0beta8 (also known as "Alexander") */
4     /* Contact: yann.chachkoff@myrealbox.com */
5     /*****************************************************************************/
6     /* That code is placed under the GNU General Public Licence (GPL) */
7     /* (C)2001-2005 by Chachkoff Yann (Feel free to deliver your complaints) */
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_PYTHON_H
29     #define PLUGIN_PYTHON_H
30    
31     /* First the required header files - only the CF module interface and Python */
32     #include <Python.h>
33     #include <plugin.h>
34    
35     #undef MODULEAPI
36     #ifdef WIN32
37     #ifdef PYTHON_PLUGIN_EXPORTS
38     #define MODULEAPI __declspec(dllexport)
39     #else
40     #define MODULEAPI __declspec(dllimport)
41     #endif
42    
43     #else
44     #define MODULEAPI
45     #endif
46    
47     #define PLUGIN_NAME "Python"
48     #define PLUGIN_VERSION "CFPython Plugin 2.0a13 (Fido)"
49    
50     #include <plugin_common.h>
51     #include <cfpython_object.h>
52     #include <cfpython_map.h>
53     #include <cfpython_archetype.h>
54     #include <cfpython_party.h>
55     #include <cfpython_region.h>
56    
57     typedef struct _cfpcontext
58     {
59     struct _cfpcontext* down;
60     PyObject* who;
61     PyObject* activator;
62     PyObject* third;
63     char message[1024];
64     int fix;
65     int event_code;
66     char script[1024];
67     char options[1024];
68     int returnvalue;
69     int parms[5];
70     } CFPContext;
71    
72     extern f_plug_api gethook;
73     extern CFPContext* context_stack;
74     extern CFPContext* current_context;
75    
76     /* This structure is used to define one python-implemented crossfire command.*/
77     typedef struct PythonCmdStruct
78     {
79     char *name; /* The name of the command, as known in the game. */
80     char *script; /* The name of the script file to bind. */
81     double speed; /* The speed of the command execution. */
82     } PythonCmd;
83    
84     /* This plugin allows up to 1024 custom commands. */
85     #define NR_CUSTOM_CMD 1024
86 elmex 1.2 //extern PythonCmd CustomCommand[NR_CUSTOM_CMD];
87 root 1.1 #include <cfpython_proto.h>
88    
89     #endif /* PLUGIN_PYTHON_H */