ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/plugins/cfperl/cfperl.xs
(Generate patch)

Comparing deliantra/server/plugins/cfperl/cfperl.xs (file contents):
Revision 1.2 by root, Fri Feb 3 07:51:14 2006 UTC vs.
Revision 1.10 by root, Sat Feb 4 20:38:29 2006 UTC

1/*****************************************************************************/ 1/*****************************************************************************/
2/* That code is placed under the GNU General Public Licence (GPL) */
3/* (C)2001-2005 by Chachkoff Yann (Feel free to deliver your complaints) */
4/*****************************************************************************/
5/* CrossFire, A Multiplayer game for X-windows */ 2/* CrossFire, A Multiplayer game for the X Window System */
6/* */
7/* Copyright (C) 2000 Mark Wedel */
8/* Copyright (C) 1992 Frank Tore Johansen */
9/* Copyright (C) 2006 perl plugin by Marc Lehmann <cf@schmorpd.e> */
10/* */
11/* This program is free software; you can redistribute it and/or modify */
12/* it under the terms of the GNU General Public License as published by */
13/* the Free Software Foundation; either version 2 of the License, or */
14/* (at your option) any later version. */
15/* */
16/* This program is distributed in the hope that it will be useful, */
17/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
18/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
19/* GNU General Public License for more details. */
20/* */
21/* You should have received a copy of the GNU General Public License */
22/* along with this program; if not, write to the Free Software */
23/* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
24/* */ 3/* */
25/*****************************************************************************/ 4/*****************************************************************************/
5
6/*
7 * This code is placed under the GNU General Public Licence (GPL)
8 *
9 * Copyright (C) 2001-2005 by Chachkoff Yann
10 * Copyright (C) 2006 by Marc Lehmann <cf@schmorpd.e>
11 *
12 * 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
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
25*/
26 26
27#include <EXTERN.h> 27#include <EXTERN.h>
28#include <perl.h> 28#include <perl.h>
29#include <XSUB.h> 29#include <XSUB.h>
30 30
51 51
52static f_plug_api gethook; 52static f_plug_api gethook;
53static f_plug_api registerGlobalEvent; 53static f_plug_api registerGlobalEvent;
54static f_plug_api unregisterGlobalEvent; 54static f_plug_api unregisterGlobalEvent;
55static f_plug_api systemDirectory; 55static f_plug_api systemDirectory;
56static f_plug_api reCmp; 56static f_plug_api object_set_property;
57 57
58typedef struct 58typedef struct
59{ 59{
60 object* who; 60 object* who;
61 object* activator; 61 object* activator;
129 case CFAPI_DOUBLE: 129 case CFAPI_DOUBLE:
130 sv = newSViv (*va_arg (args, double *)); 130 sv = newSViv (*va_arg (args, double *));
131 break; 131 break;
132 132
133 case CFAPI_STRING: 133 case CFAPI_STRING:
134 sv = newSVpv (va_arg (args, char *), 0); 134 {
135 char *str = va_arg (args, char *);
136 sv = str ? newSVpv (str, 0) : &PL_sv_undef;
137 }
135 break; 138 break;
136 139
137 case CFAPI_POBJECT: 140 case CFAPI_POBJECT:
138 { 141 {
139 object *obj = va_arg (args, object *); 142 object *obj = va_arg (args, object *);
157 } 160 }
158 } 161 }
159 break; 162 break;
160 163
161 case CFAPI_PMAP: 164 case CFAPI_PMAP:
162 sv = newSVptr (va_arg (args, object *), "cf::map"); 165 sv = newSVptr (va_arg (args, mapstruct *), "cf::map");
163 break; 166 break;
164 167
165 case CFAPI_PPLAYER: 168 case CFAPI_PPLAYER:
166 sv = newSVptr (va_arg (args, object *), "cf::player"); 169 sv = newSVptr (va_arg (args, player *), "cf::player");
167 break; 170 break;
168 171
169 case CFAPI_PARCH: 172 case CFAPI_PARCH:
170 sv = newSVptr (va_arg (args, object *), "cf::arch"); 173 sv = newSVptr (va_arg (args, archetype *), "cf::arch");
171 break; 174 break;
172 175
173 case CFAPI_PPARTY: 176 case CFAPI_PPARTY:
174 sv = newSVptr (va_arg (args, object *), "cf::party"); 177 sv = newSVptr (va_arg (args, partylist *), "cf::party");
175 break; 178 break;
176 179
177 case CFAPI_PREGION: 180 case CFAPI_PREGION:
178 sv = newSVptr (va_arg (args, object *), "cf::region"); 181 sv = newSVptr (va_arg (args, region *), "cf::region");
179 break; 182 break;
180 183
181 default: 184 default:
182 assert (("unhandled type in newSVcfapi", 0)); 185 assert (("unhandled type in newSVcfapi", 0));
183 } 186 }
216 219
217 PUTBACK; 220 PUTBACK;
218 int count = call_pv ("cf::inject_event", G_SCALAR | G_EVAL); 221 int count = call_pv ("cf::inject_event", G_SCALAR | G_EVAL);
219 SPAGAIN; 222 SPAGAIN;
220 223
224 if (SvTRUE (ERRSV))
225 LOG (llevError, "event '%d' callback evaluation error: %s", context->event_code, SvPV_nolen (ERRSV));
226
221 context->returnvalue = count > 0 ? POPi : 0; 227 context->returnvalue = count > 0 ? POPi : 0;
222 228
223 PUTBACK; 229 PUTBACK;
224 FREETMPS; 230 FREETMPS;
225 LEAVE; 231 LEAVE;
226
227 if (SvTRUE (ERRSV))
228 LOG (llevError, "event '%d' callback evaluation error: %s", context->event_code, SvPV_nolen (ERRSV));
229} 232}
230 233
231///////////////////////////////////////////////////////////////////////////// 234/////////////////////////////////////////////////////////////////////////////
232 235
233int 236int
260 263
261 PUTBACK; 264 PUTBACK;
262 int count = call_pv ("cf::inject_command", G_SCALAR | G_EVAL); 265 int count = call_pv ("cf::inject_command", G_SCALAR | G_EVAL);
263 SPAGAIN; 266 SPAGAIN;
264 267
268 if (SvTRUE (ERRSV))
269 LOG (llevError, "command '%s' callback evaluation error: %s", rtn_cmd.name, SvPV_nolen (ERRSV));
270
265 int returnvalue = count > 0 ? POPi : -1; 271 int returnvalue = count > 0 ? POPi : -1;
266 272
267 PUTBACK; 273 PUTBACK;
268 FREETMPS; 274 FREETMPS;
269 LEAVE; 275 LEAVE;
270
271 if (SvTRUE (ERRSV))
272 LOG (llevError, "command '%s' callback evaluation error: %s", rtn_cmd.name, SvPV_nolen (ERRSV));
273 276
274 return returnvalue; 277 return returnvalue;
275} 278}
276 279
277void * 280void *
281 char *propname; 284 char *propname;
282 int i; 285 int i;
283 va_start (args, type); 286 va_start (args, type);
284 propname = va_arg (args, char *); 287 propname = va_arg (args, char *);
285 //printf ("Property name: %s\n", propname); 288 //printf ("Property name: %s\n", propname);
286 289
287 if (!strcmp (propname, "command?")) 290 if (!strcmp (propname, "command?"))
288 { 291 {
292 if (!perl)
293 return NULL;
294
289 const char *cmdname = va_arg (args, const char *); 295 const char *cmdname = va_arg (args, const char *);
290 HV *hv = get_hv ("cf::COMMAND", 1); 296 HV *hv = get_hv ("cf::COMMAND", 1);
291 SV **svp = hv_fetch (hv, cmdname, strlen (cmdname) + 1, 0); 297 SV **svp = hv_fetch (hv, cmdname, strlen (cmdname) + 1, 0);
292 298
293 va_end (args); 299 va_end (args);
329 printf (PLUGIN_VERSION " post init\n"); 335 printf (PLUGIN_VERSION " post init\n");
330 336
331 registerGlobalEvent = gethook (&rtype, hooktype, "cfapi_system_register_global_event"); 337 registerGlobalEvent = gethook (&rtype, hooktype, "cfapi_system_register_global_event");
332 unregisterGlobalEvent = gethook (&rtype, hooktype, "cfapi_system_unregister_global_event"); 338 unregisterGlobalEvent = gethook (&rtype, hooktype, "cfapi_system_unregister_global_event");
333 systemDirectory = gethook (&rtype, hooktype, "cfapi_system_directory"); 339 systemDirectory = gethook (&rtype, hooktype, "cfapi_system_directory");
334 reCmp = gethook (&rtype, hooktype, "cfapi_system_re_cmp"); 340 object_set_property = gethook (&rtype, hooktype, "cfapi_object_set_property");
335 cf_init_plugin (gethook); 341 cf_init_plugin (gethook);
336 342
337 /* Pick the global events you want to monitor from this plugin */ 343 /* Pick the global events you want to monitor from this plugin */
338 registerGlobalEvent (NULL, EVENT_BORN, PLUGIN_NAME, globalEventListener); 344 registerGlobalEvent (NULL, EVENT_BORN, PLUGIN_NAME, globalEventListener);
339 registerGlobalEvent (NULL, EVENT_CLOCK, PLUGIN_NAME, globalEventListener); 345 registerGlobalEvent (NULL, EVENT_CLOCK, PLUGIN_NAME, globalEventListener);
354 char *argv[] = { 360 char *argv[] = {
355 "", 361 "",
356 "-e" 362 "-e"
357 "BEGIN {" 363 "BEGIN {"
358 " cf->bootstrap;" 364 " cf->bootstrap;"
359 " unshift @INC, cf::maps_directory ('perl');" 365 " unshift @INC, cf::datadir ();"
360 "}" 366 "}"
361 "" 367 ""
362 "use cf;" 368 "use cf;"
363 }; 369 };
364 370
365 perl = perl_alloc (); 371 perl = perl_alloc ();
366 perl_construct (perl); 372 perl_construct (perl);
367 373
368 if (perl_parse (perl, xs_init, 2, argv, (char **)NULL) 374 if (perl_parse (perl, xs_init, 2, argv, (char **)NULL) || perl_run (perl))
369 || perl_run (perl))
370 { 375 {
371 printf ("unable to initialize perl-interpreter, continuing without.\n"); 376 printf ("unable to initialize perl-interpreter, continuing without.\n");
372 377
373 perl_destruct (perl); 378 perl_destruct (perl);
374 perl_free (perl); 379 perl_free (perl);
540 545
541BOOT: 546BOOT:
542{ 547{
543 HV *stash = gv_stashpv ("cf", 1); 548 HV *stash = gv_stashpv ("cf", 1);
544 549
545 const struct { 550 static const struct {
546 const char *name; 551 const char *name;
547 IV iv; 552 IV iv;
548 } *civ, const_iv[] = { 553 } *civ, const_iv[] = {
549# define const_iv(name) { # name, (IV)name }, 554# define const_iv(name) { # name, (IV)name },
550 const_iv (llevError) 555 const_iv (llevError)
801 const_iv (FLAG_IS_WATER) 806 const_iv (FLAG_IS_WATER)
802 const_iv (FLAG_CONTENT_ON_GEN) 807 const_iv (FLAG_CONTENT_ON_GEN)
803 const_iv (FLAG_IS_A_TEMPLATE) 808 const_iv (FLAG_IS_A_TEMPLATE)
804 const_iv (FLAG_IS_BUILDABLE) 809 const_iv (FLAG_IS_BUILDABLE)
805 const_iv (FLAG_AFK) 810 const_iv (FLAG_AFK)
811
812 const_iv (NDI_BLACK)
813 const_iv (NDI_WHITE)
814 const_iv (NDI_NAVY)
815 const_iv (NDI_RED)
816 const_iv (NDI_ORANGE)
817 const_iv (NDI_BLUE)
818 const_iv (NDI_DK_ORANGE)
819 const_iv (NDI_GREEN)
820 const_iv (NDI_LT_GREEN)
821 const_iv (NDI_GREY)
822 const_iv (NDI_BROWN)
823 const_iv (NDI_GOLD)
824 const_iv (NDI_TAN)
825 const_iv (NDI_MAX_COLOR)
826 const_iv (NDI_COLOR_MASK)
827 const_iv (NDI_UNIQUE)
828 const_iv (NDI_ALL)
829
830 const_iv (F_APPLIED)
831 const_iv (F_LOCATION)
832 const_iv (F_UNPAID)
833 const_iv (F_MAGIC)
834 const_iv (F_CURSED)
835 const_iv (F_DAMNED)
836 const_iv (F_OPEN)
837 const_iv (F_NOPICK)
838 const_iv (F_LOCKED)
806 }; 839 };
807 840
808 for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ-- > const_iv; ) 841 for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ-- > const_iv; )
809 newCONSTSUB (stash, (char *)civ->name, newSViv (civ->iv)); 842 newCONSTSUB (stash, (char *)civ->name, newSViv (civ->iv));
810 843
811 const struct { 844 static const struct {
812 const char *name; 845 const char *name;
813 IV iv; 846 IV iv;
814 } *event, event_list[] = { 847 } *event, event_list[] = {
815# define const_event(name) { # name, (IV)EVENT_ ## name }, 848# define const_event(name) { # name, (IV)EVENT_ ## name },
816 const_event (NONE) 849 const_event (NONE)
847 AV *av = get_av ("cf::EVENT", 1); 880 AV *av = get_av ("cf::EVENT", 1);
848 881
849 for (event = event_list + sizeof (event_list) / sizeof (event_list [0]); event-- > event_list; ) 882 for (event = event_list + sizeof (event_list) / sizeof (event_list [0]); event-- > event_list; )
850 av_store (av, event->iv, newSVpv ((char *)event->name, 0)); 883 av_store (av, event->iv, newSVpv ((char *)event->name, 0));
851 884
852 const struct { 885 static const struct {
853 int dtype; 886 int dtype;
854 const char *name; 887 const char *name;
855 IV idx; 888 IV idx;
856 } *cprop, prop_table[] = { 889 } *cprop, prop_table[] = {
857# define prop(type, name) { type, # name, (IV) CFAPI_ ## name }, 890# define prop(type, name) { type, # name, (IV) CFAPI_ ## name },
973 prop (CFAPI_INT, OBJECT_PROP_DAM) 1006 prop (CFAPI_INT, OBJECT_PROP_DAM)
974 prop (CFAPI_STRING, OBJECT_PROP_GOD) 1007 prop (CFAPI_STRING, OBJECT_PROP_GOD)
975 prop (CFAPI_STRING, OBJECT_PROP_ARCH_NAME) 1008 prop (CFAPI_STRING, OBJECT_PROP_ARCH_NAME)
976 prop (CFAPI_INT, OBJECT_PROP_INVISIBLE) 1009 prop (CFAPI_INT, OBJECT_PROP_INVISIBLE)
977 prop (CFAPI_INT, OBJECT_PROP_FACE) 1010 prop (CFAPI_INT, OBJECT_PROP_FACE)
978 prop (CFAPI_STRING, PLAYER_PROP_IP)
979 prop (CFAPI_POBJECT, PLAYER_PROP_MARKED_ITEM)
980 prop (CFAPI_PPARTY, PLAYER_PROP_PARTY)
981 }; 1011 };
982 1012
983 HV *prop_type = get_hv ("cf::PROP_TYPE", 1); 1013 HV *prop_type = get_hv ("cf::PROP_TYPE", 1);
984 HV *prop_idx = get_hv ("cf::PROP_IDX", 1); 1014 HV *prop_idx = get_hv ("cf::PROP_IDX", 1);
985 1015
990 } 1020 }
991} 1021}
992 1022
993void 1023void
994LOG (int level, char *msg) 1024LOG (int level, char *msg)
1025 PROTOTYPE: $$
995 C_ARGS: level, "%s", msg 1026 C_ARGS: level, "%s", msg
996 1027
997char * 1028char *
998cf_get_maps_directory (char *path) 1029cf_get_maps_directory (char *path)
1030 PROTOTYPE: $
999 ALIAS: maps_directory = 0 1031 ALIAS: maps_directory = 0
1000 1032
1033char *
1034mapdir ()
1035 PROTOTYPE:
1036 ALIAS:
1037 mapdir = 0
1038 uniquedir = 1
1039 tmpdir = 2
1040 confdir = 3
1041 localdir = 4
1042 playerdir = 5
1043 datadir = 6
1044 CODE:
1045{
1046 int unused_type;
1047 RETVAL = (char *)systemDirectory (&unused_type, ix);
1048}
1049 OUTPUT: RETVAL
1050
1051int
1052cf_find_animation (char *text)
1053 PROTOTYPE: $
1054
1001MODULE = cf PACKAGE = cf::object PREFIX = cf_object_ 1055MODULE = cf PACKAGE = cf::object PREFIX = cf_object_
1002 1056
1003PROTOTYPES: DISABLE
1004
1005SV * 1057SV *
1006cf_object_get_property (object *obj, int type, int idx) 1058get_property (object *obj, int type, int idx)
1007 CODE: 1059 CODE:
1008 RETVAL = newSVcfapi (type, cf_object_get_property (obj, idx)); 1060 RETVAL = newSVcfapi (type, cf_object_get_property (obj, idx));
1009 OUTPUT: 1061 OUTPUT: RETVAL
1010 RETVAL 1062
1063SV *
1064set_property (object *obj, int type, int idx, SV *newval)
1065 CODE:
1066 switch (type)
1067 {
1068 case CFAPI_INT:
1069 cf_object_set_int_property (obj, idx, SvIV (newval));
1070 break;
1071 case CFAPI_LONG:
1072 cf_object_set_long_property (obj, idx, SvNV (newval));
1073 break;
1074 case CFAPI_DOUBLE:
1075 {
1076 int unused_type;
1077 object_set_property (&unused_type, obj, idx, (double)SvNV (newval));
1078 }
1079 break;
1080 case CFAPI_STRING:
1081 cf_object_set_string_property (obj, idx, SvPV_nolen (newval));
1082 break;
1083 default:
1084 croak ("unhandled type '%d' in set_property '%d'", type, idx);
1085 }
1011 1086
1012int cf_object_get_resistance (object *op, int rtype) 1087int cf_object_get_resistance (object *op, int rtype)
1013 ALIAS: resistance = 0 1088 ALIAS: resistance = 0
1014 1089
1015int cf_object_get_flag (object *op, int flag) 1090int cf_object_get_flag (object *op, int flag)
1089 1164
1090char * 1165char *
1091base_name (object *ob, int plural) 1166base_name (object *ob, int plural)
1092 CODE: 1167 CODE:
1093 RETVAL = cf_query_base_name (ob, plural); 1168 RETVAL = cf_query_base_name (ob, plural);
1169 OUTPUT: RETVAL
1170
1171MODULE = cf PACKAGE = cf::object PREFIX = cf_object_
1172
1173object *cf_create_object_by_name (const char *name = 0)
1174 PROTOTYPE: ;$
1175 ALIAS:
1176 create_object = 0
1177 new = 0
1178 CODE:
1179 RETVAL = name ? cf_create_object_by_name (name) : cf_create_object ();
1094 OUTPUT: 1180 OUTPUT:
1095 RETVAL 1181 RETVAL
1096
1097MODULE = cf PACKAGE = cf::object PREFIX = cf_object_
1098
1099object *cf_create_object ()
1100 ALIAS: new = 0
1101
1102object *cf_create_object_by_name (const char *name)
1103 ALIAS: new_from_name = 0
1104
1105void cf_free_object (object *ob)
1106 1182
1107void cf_fix_object (object *pl) 1183void cf_fix_object (object *pl)
1184 ALIAS: fix = 0
1108 1185
1109object *cf_insert_ob_in_ob (object *ob, object *where) 1186object *cf_insert_ob_in_ob (object *ob, object *where)
1110 1187
1111 1188
1112MODULE = cf PACKAGE = cf::object::player PREFIX = cf_player_ 1189MODULE = cf PACKAGE = cf::object::player PREFIX = cf_player_
1113 1190
1114player *player (object *op) 1191player *player (object *op)
1115 CODE: 1192 CODE:
1116 RETVAL = cf_player_find (cf_query_name (op)); 1193 RETVAL = cf_player_find (cf_query_name (op));
1117 OUTPUT: 1194 OUTPUT: RETVAL
1118 RETVAL
1119 1195
1120void cf_player_message (object *obj, char *txt, int flags = 0) 1196void cf_player_message (object *obj, char *txt, int flags = NDI_ORANGE | NDI_UNIQUE)
1121 1197
1122object *cf_player_send_inventory (object *op) 1198object *cf_player_send_inventory (object *op)
1123 1199
1200char *cf_player_get_ip (object *op)
1201 ALIAS: ip = 0
1202
1203object *cf_player_get_marked_item (object *op)
1204 ALIAS: marked_item = 0
1205
1206void cf_player_set_marked_item (object *op, object *ob)
1207
1208partylist *cf_player_get_party (object *op)
1209 ALIAS: party = 0
1210
1211void cf_player_set_party (object *op, partylist *party)
1212
1124 1213
1125MODULE = cf PACKAGE = cf::object::map PREFIX = cf_ 1214MODULE = cf PACKAGE = cf::object::map PREFIX = cf_
1126 1215
1127mapstruct *cf_map_get_map (char *name)
1128 ALIAS: map = 0
1129
1130mapstruct *cf_map_get_first ()
1131 ALIAS: first = 0
1132
1133object *cf_map_insert_object_there (mapstruct *where, object *op, object *originator, int flags)
1134
1135object *cf_map_insert_object (mapstruct *where, object* op, int x, int y)
1136
1137object* cf_map_present_arch_by_name (mapstruct *map, const char* str, int nx, int ny)
1138 C_ARGS: str, map, nx, ny
1139
1140#int cf_map_get_flags (mapstruct* map, mapstruct** nmap, I16 x, I16 y, I16 *nx, I16 *ny)
1141
1142
1143MODULE = cf PACKAGE = cf::player PREFIX = cf_ 1216MODULE = cf PACKAGE = cf::player PREFIX = cf_player_
1144 1217
1145player *cf_player_find (char *name) 1218player *cf_player_find (char *name)
1219 PROTOTYPE: $
1146 1220
1147void cf_player_move (player *pl, int dir) 1221void cf_player_move (player *pl, int dir)
1148 1222
1223# nonstandard
1224object *ob (player *pl)
1225 CODE:
1226 RETVAL = pl->ob;
1227 OUTPUT: RETVAL
1149 1228
1229
1150MODULE = cf PACKAGE = cf::map PREFIX = cf_ 1230MODULE = cf PACKAGE = cf::map PREFIX = cf_map_
1151 1231
1152SV * 1232SV *
1153get_property (mapstruct *obj, int type, int idx) 1233get_property (mapstruct *obj, int type, int idx)
1154 CODE: 1234 CODE:
1155 RETVAL = newSVcfapi (type, cf_map_get_property (obj, idx)); 1235 RETVAL = newSVcfapi (type, cf_map_get_property (obj, idx));
1156 OUTPUT: 1236 OUTPUT: RETVAL
1157 RETVAL 1237
1238SV *
1239set_property (mapstruct *obj, int type, int idx, SV *newval)
1240 CODE:
1241 switch (type)
1242 {
1243 case CFAPI_INT:
1244 cf_map_set_int_property (obj, idx, SvIV (newval));
1245 break;
1246 default:
1247 croak ("unhandled type '%d' in set_property '%d'", type, idx);
1248 }
1249
1250mapstruct *cf_map_get_map (char *name)
1251 PROTOTYPE: $
1252 ALIAS: map = 0
1253
1254mapstruct *cf_map_get_first ()
1255 PROTOTYPE:
1256 ALIAS: first = 0
1257
1258object *cf_map_insert_object_there (mapstruct *where, object *op, object *originator, int flags)
1259
1260object *cf_map_insert_object (mapstruct *where, object* op, int x, int y)
1261
1262object* cf_map_present_arch_by_name (mapstruct *map, const char* str, int nx, int ny)
1263 C_ARGS: str, map, nx, ny
1264
1265#int cf_map_get_flags (mapstruct* map, mapstruct** nmap, I16 x, I16 y, I16 *nx, I16 *ny)
1266
1158 1267
1159 1268
1160MODULE = cf PACKAGE = cf::arch PREFIX = cf_archetype_ 1269MODULE = cf PACKAGE = cf::arch PREFIX = cf_archetype_
1161 1270
1162archetype*cf_archetype_get_first() 1271archetype*cf_archetype_get_first()
1272 PROTOTYPE:
1163 ALIAS: first = 0 1273 ALIAS: first = 0
1164 1274
1165archetype *cf_archetype_get_next (archetype *arch) 1275archetype *cf_archetype_get_next (archetype *arch)
1166 ALIAS: next = 0 1276 ALIAS: next = 0
1167 1277
1174const char *cf_archetype_get_name (archetype *arch) 1284const char *cf_archetype_get_name (archetype *arch)
1175 ALIAS: name = 0 1285 ALIAS: name = 0
1176 1286
1177MODULE = cf PACKAGE = cf::party PREFIX = cf_party_ 1287MODULE = cf PACKAGE = cf::party PREFIX = cf_party_
1178 1288
1179const char *cf_party_get_name (partylist *party)
1180
1181partylist *cf_party_get_first () 1289partylist *cf_party_get_first ()
1290 PROTOTYPE:
1182 ALIAS: first = 0 1291 ALIAS: first = 0
1183 1292
1184partylist *cf_party_get_next (partylist *party) 1293partylist *cf_party_get_next (partylist *party)
1185 ALIAS: next = 0 1294 ALIAS: next = 0
1186 1295
1296const char *cf_party_get_name (partylist *party)
1297
1187const char *cf_party_get_password (partylist *party) 1298const char *cf_party_get_password (partylist *party)
1188 ALIAS: password = 0 1299 ALIAS: password = 0
1189 1300
1190player *cf_party_get_first_player (partylist *party) 1301player *cf_party_get_first_player (partylist *party)
1191 ALIAS: first_player = 0 1302 ALIAS: first_player = 0
1195 1306
1196 1307
1197MODULE = cf PACKAGE = cf::region PREFIX = cf_region_ 1308MODULE = cf PACKAGE = cf::region PREFIX = cf_region_
1198 1309
1199region *cf_region_get_first () 1310region *cf_region_get_first ()
1311 PROTOTYPE:
1200 ALIAS: first = 0 1312 ALIAS: first = 0
1201 1313
1202const char *cf_region_get_name (region *reg) 1314const char *cf_region_get_name (region *reg)
1203 ALIAS: name = 0 1315 ALIAS: name = 0
1204 1316

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines