00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 static PyObject *Map_GetDifficulty(Crossfire_Map *whoptr, void *closure);
00030 static PyObject *Map_GetPath(Crossfire_Map *whoptr, void *closure);
00031 static PyObject *Map_GetTempName(Crossfire_Map *whoptr, void *closure);
00032 static PyObject *Map_GetName(Crossfire_Map *whoptr, void *closure);
00033 static PyObject *Map_GetResetTime(Crossfire_Map *whoptr, void *closure);
00034 static PyObject *Map_GetResetTimeout(Crossfire_Map *whoptr, void *closure);
00035 static PyObject *Map_GetPlayers(Crossfire_Map *whoptr, void *closure);
00036 static PyObject *Map_GetDarkness(Crossfire_Map *whoptr, void *closure);
00037 static PyObject *Map_GetWidth(Crossfire_Map *whoptr, void *closure);
00038 static PyObject *Map_GetHeight(Crossfire_Map *whoptr, void *closure);
00039 static PyObject *Map_GetEnterX(Crossfire_Map *whoptr, void *closure);
00040 static PyObject *Map_GetEnterY(Crossfire_Map *whoptr, void *closure);
00041 static PyObject *Map_GetMessage(Crossfire_Map *whoptr, void *closure);
00042 static PyObject *Map_GetRegion(Crossfire_Map *whoptr, void *closure);
00043 static PyObject *Map_GetUnique(Crossfire_Map *whoptr, void *closure);
00044
00045 static int Map_SetPath(Crossfire_Map *whoptr, PyObject *value, void *closure);
00046
00047 static PyObject *Map_Message(Crossfire_Map *map, PyObject *args);
00048 static PyObject *Map_GetFirstObjectAt(Crossfire_Map *map, PyObject *args);
00049 static PyObject *Map_CreateObject(Crossfire_Map *map, PyObject *args);
00050 static PyObject *Map_Check(Crossfire_Map *map, PyObject *args);
00051 static PyObject *Map_Next(Crossfire_Map *map, PyObject *args);
00052 static PyObject *Map_Insert(Crossfire_Map *map, PyObject *args);
00053 static PyObject *Map_ChangeLight(Crossfire_Map *map, PyObject *args);
00054 static PyObject *Map_TriggerConnected(Crossfire_Map *map, PyObject *args);
00055
00056 static int Map_InternalCompare(Crossfire_Map *left, Crossfire_Map *right);
00057
00058 static PyObject *Crossfire_Map_Long(PyObject *obj);
00059 #ifndef IS_PY3K
00060 static PyObject *Crossfire_Map_Int(PyObject *obj);
00061 #endif
00062 static void Crossfire_Map_dealloc(PyObject *obj);
00063 static PyObject *Crossfire_Map_new(PyTypeObject *type, PyObject *args, PyObject *kwds);
00064
00065
00066 static PyGetSetDef Map_getseters[] = {
00067 { "Difficulty", (getter)Map_GetDifficulty, NULL, NULL, NULL },
00068 { "Path", (getter)Map_GetPath, (setter)Map_SetPath, NULL, NULL },
00069 { "TempName", (getter)Map_GetTempName, NULL, NULL, NULL },
00070 { "Name", (getter)Map_GetName, NULL, NULL, NULL },
00071 { "ResetTime", (getter)Map_GetResetTime, NULL, NULL, NULL },
00072 { "ResetTimeout", (getter)Map_GetResetTimeout, NULL, NULL, NULL },
00073 { "Players", (getter)Map_GetPlayers, NULL, NULL, NULL },
00074 { "Light", (getter)Map_GetDarkness, NULL, NULL, NULL },
00075 { "Darkness", (getter)Map_GetDarkness, NULL, NULL, NULL },
00076 { "Width", (getter)Map_GetWidth, NULL, NULL, NULL },
00077 { "Height", (getter)Map_GetHeight, NULL, NULL, NULL },
00078 { "EnterX", (getter)Map_GetEnterX, NULL, NULL, NULL },
00079 { "EnterY", (getter)Map_GetEnterY, NULL, NULL, NULL },
00080 { "Message", (getter)Map_GetMessage, NULL, NULL, NULL },
00081 { "Region", (getter)Map_GetRegion, NULL, NULL, NULL },
00082 { "Unique", (getter)Map_GetUnique, NULL, NULL, NULL },
00083 { NULL, NULL, NULL, NULL, NULL }
00084 };
00085
00086 static PyMethodDef MapMethods[] = {
00087 { "Print", (PyCFunction)Map_Message, METH_VARARGS, NULL },
00088 { "ObjectAt", (PyCFunction)Map_GetFirstObjectAt, METH_VARARGS, NULL },
00089 { "CreateObject", (PyCFunction)Map_CreateObject, METH_VARARGS, NULL },
00090 { "Check", (PyCFunction)Map_Check, METH_VARARGS, NULL },
00091 { "Next", (PyCFunction)Map_Next, METH_NOARGS, NULL },
00092 { "Insert", (PyCFunction)Map_Insert, METH_VARARGS, NULL },
00093 { "ChangeLight", (PyCFunction)Map_ChangeLight, METH_VARARGS, NULL },
00094 { "TriggerConnected", (PyCFunction)Map_TriggerConnected, METH_VARARGS, NULL },
00095 { NULL, NULL, 0, NULL }
00096 };
00097
00098 static PyNumberMethods MapConvert = {
00099 NULL,
00100 NULL,
00101 NULL,
00102 #ifndef IS_PY3K
00103 NULL,
00104 #endif
00105 NULL,
00106 NULL,
00107 NULL,
00108 NULL,
00109 NULL,
00110 NULL,
00111 #ifdef IS_PY3K
00112 NULL,
00113 #else
00114 NULL,
00115 #endif
00116 NULL,
00117 NULL,
00118 NULL,
00119 NULL,
00120 NULL,
00121 NULL,
00122 #ifndef IS_PY3K
00123 NULL,
00124 #endif
00125 #ifdef IS_PY3K
00126
00127
00128
00129 Crossfire_Map_Long,
00130 NULL,
00131 #else
00132 Crossfire_Map_Int,
00133 Crossfire_Map_Long,
00134 #endif
00135 NULL,
00136 #ifndef IS_PY3K
00137 NULL,
00138 NULL,
00139 #endif
00140 NULL,
00141 NULL,
00142 NULL,
00143 #ifndef IS_PY3K
00144 NULL,
00145 #endif
00146 NULL,
00147 NULL,
00148 NULL,
00149 NULL,
00150 NULL,
00151 NULL,
00152 NULL,
00153
00154 NULL,
00155 NULL,
00156 NULL,
00157 NULL,
00158 #if defined(IS_PY25) || defined(IS_PY3K)
00159 NULL
00160 #endif
00161 };
00162
00163
00164 PyTypeObject Crossfire_MapType = {
00165 PyObject_HEAD_INIT(NULL)
00166 #ifndef IS_PY3K
00167 0,
00168 #endif
00169 "Crossfire.Map",
00170 sizeof(Crossfire_Map),
00171 0,
00172 Crossfire_Map_dealloc,
00173 NULL,
00174 NULL,
00175 NULL,
00176 (cmpfunc)Map_InternalCompare,
00177 NULL,
00178 &MapConvert,
00179 NULL,
00180 NULL,
00181 PyObject_HashNotImplemented,
00182 NULL,
00183 NULL,
00184 PyObject_GenericGetAttr,
00185 PyObject_GenericSetAttr,
00186 NULL,
00187 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE,
00188 "Crossfire maps",
00189 NULL,
00190 NULL,
00191 NULL,
00192 0,
00193 NULL,
00194 NULL,
00195 MapMethods,
00196 NULL,
00197 Map_getseters,
00198 NULL,
00199 NULL,
00200 NULL,
00201 NULL,
00202 0,
00203 NULL,
00204 NULL,
00205 Crossfire_Map_new,
00206 NULL,
00207 NULL,
00208 NULL,
00209 NULL,
00210 NULL,
00211 NULL,
00212 NULL,
00213 NULL,
00214 };