1 |
root |
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 */ |
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 |
|
|
/* */ |
25 |
|
|
/*****************************************************************************/ |
26 |
|
|
|
27 |
|
|
#include <EXTERN.h> |
28 |
|
|
#include <perl.h> |
29 |
|
|
#include <XSUB.h> |
30 |
|
|
|
31 |
|
|
#undef save_long // clashes with libproto.h |
32 |
|
|
|
33 |
|
|
#define PLUGIN_NAME "cfperl" |
34 |
|
|
#define PLUGIN_VERSION "cfperl 0.0" |
35 |
|
|
|
36 |
|
|
#ifndef __CEXTRACT__ |
37 |
|
|
#include <plugin.h> |
38 |
|
|
#endif |
39 |
|
|
|
40 |
|
|
#undef MODULEAPI |
41 |
|
|
#ifdef WIN32 |
42 |
|
|
#else |
43 |
|
|
#define MODULEAPI |
44 |
|
|
#endif |
45 |
|
|
|
46 |
|
|
#include <plugin_common.h> |
47 |
|
|
|
48 |
|
|
#include <stdarg.h> |
49 |
|
|
|
50 |
|
|
#include "perlxsi.c" |
51 |
|
|
|
52 |
|
|
static f_plug_api gethook; |
53 |
|
|
static f_plug_api registerGlobalEvent; |
54 |
|
|
static f_plug_api unregisterGlobalEvent; |
55 |
|
|
static f_plug_api systemDirectory; |
56 |
|
|
|
57 |
|
|
typedef struct |
58 |
|
|
{ |
59 |
|
|
object* who; |
60 |
|
|
object* activator; |
61 |
|
|
object* third; |
62 |
|
|
char message[1024]; |
63 |
|
|
int fix; |
64 |
|
|
int event_code; |
65 |
|
|
char options[1024]; |
66 |
|
|
int returnvalue; |
67 |
|
|
} CFPContext; |
68 |
|
|
|
69 |
|
|
//static int current_command = -999; |
70 |
|
|
|
71 |
|
|
static PerlInterpreter *perl; |
72 |
|
|
|
73 |
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
74 |
|
|
|
75 |
|
|
static SV * |
76 |
|
|
newSVptr (void *ptr, const char *klass) |
77 |
|
|
{ |
78 |
|
|
if (!ptr) |
79 |
|
|
return &PL_sv_undef; |
80 |
|
|
|
81 |
|
|
HV *hv = newHV (); |
82 |
|
|
sv_magic ((SV *)hv, 0, PERL_MAGIC_ext, (char *)ptr, 0); |
83 |
|
|
return sv_bless (newRV_noinc ((SV *)hv), gv_stashpv (klass, 1)); |
84 |
|
|
} |
85 |
|
|
|
86 |
|
|
static void |
87 |
|
|
clearSVptr (SV *sv) |
88 |
|
|
{ |
89 |
|
|
if (SvROK (sv)) |
90 |
|
|
sv = SvRV (sv); |
91 |
|
|
|
92 |
|
|
hv_clear ((HV *)sv); |
93 |
|
|
sv_unmagic (sv, PERL_MAGIC_ext); |
94 |
|
|
} |
95 |
|
|
|
96 |
|
|
static long |
97 |
|
|
SvPTR (SV *sv, const char *klass) |
98 |
|
|
{ |
99 |
|
|
if (!sv_derived_from (sv, klass)) |
100 |
|
|
croak ("object of type %s expected", klass); |
101 |
|
|
|
102 |
|
|
MAGIC *mg = mg_find (SvRV (sv), PERL_MAGIC_ext); |
103 |
|
|
|
104 |
|
|
if (!mg) |
105 |
|
|
croak ("perl code used %s object, but C object is already destroyed, caught", klass); |
106 |
|
|
|
107 |
|
|
return (long)mg->mg_ptr; |
108 |
|
|
} |
109 |
|
|
|
110 |
|
|
SV * |
111 |
|
|
newSVcfapi (int type, ...) |
112 |
|
|
{ |
113 |
|
|
SV *sv; |
114 |
|
|
|
115 |
|
|
va_list args; |
116 |
|
|
va_start (args, type); |
117 |
|
|
|
118 |
|
|
switch (type) |
119 |
|
|
{ |
120 |
|
|
case CFAPI_INT: |
121 |
|
|
sv = newSViv (*va_arg (args, int *)); |
122 |
|
|
break; |
123 |
|
|
|
124 |
|
|
case CFAPI_LONG: |
125 |
|
|
sv = newSViv (*va_arg (args, long *)); |
126 |
|
|
break; |
127 |
|
|
|
128 |
|
|
case CFAPI_DOUBLE: |
129 |
|
|
sv = newSViv (*va_arg (args, double *)); |
130 |
|
|
break; |
131 |
|
|
|
132 |
|
|
case CFAPI_STRING: |
133 |
|
|
sv = newSVpv (va_arg (args, char *), 0); |
134 |
|
|
break; |
135 |
|
|
|
136 |
|
|
case CFAPI_POBJECT: |
137 |
|
|
{ |
138 |
|
|
object *obj = va_arg (args, object *); |
139 |
|
|
|
140 |
|
|
if (!obj) |
141 |
|
|
sv = &PL_sv_undef; |
142 |
|
|
else |
143 |
|
|
switch (*(int *)cf_object_get_property (obj, CFAPI_OBJECT_PROP_TYPE)) |
144 |
|
|
{ |
145 |
|
|
case MAP: |
146 |
|
|
sv = newSVptr (obj, "cf::object::map"); |
147 |
|
|
break; |
148 |
|
|
|
149 |
|
|
case PLAYER: |
150 |
|
|
sv = newSVptr (obj, "cf::object::player"); |
151 |
|
|
break; |
152 |
|
|
|
153 |
|
|
default: |
154 |
|
|
sv = newSVptr (obj, "cf::object"); |
155 |
|
|
break; |
156 |
|
|
} |
157 |
|
|
} |
158 |
|
|
break; |
159 |
|
|
|
160 |
|
|
case CFAPI_PMAP: |
161 |
root |
1.6 |
sv = newSVptr (va_arg (args, mapstruct *), "cf::map"); |
162 |
root |
1.1 |
break; |
163 |
|
|
|
164 |
|
|
case CFAPI_PPLAYER: |
165 |
root |
1.6 |
sv = newSVptr (va_arg (args, player *), "cf::player"); |
166 |
root |
1.1 |
break; |
167 |
|
|
|
168 |
|
|
case CFAPI_PARCH: |
169 |
root |
1.6 |
sv = newSVptr (va_arg (args, archetype *), "cf::arch"); |
170 |
root |
1.1 |
break; |
171 |
|
|
|
172 |
|
|
case CFAPI_PPARTY: |
173 |
root |
1.6 |
sv = newSVptr (va_arg (args, partylist *), "cf::party"); |
174 |
root |
1.1 |
break; |
175 |
|
|
|
176 |
|
|
case CFAPI_PREGION: |
177 |
root |
1.6 |
sv = newSVptr (va_arg (args, region *), "cf::region"); |
178 |
root |
1.1 |
break; |
179 |
|
|
|
180 |
|
|
default: |
181 |
|
|
assert (("unhandled type in newSVcfapi", 0)); |
182 |
|
|
} |
183 |
|
|
|
184 |
|
|
va_end (args); |
185 |
|
|
|
186 |
|
|
return sv; |
187 |
|
|
} |
188 |
|
|
|
189 |
|
|
///////////////////////////////////////////////////////////////////////////// |
190 |
|
|
|
191 |
|
|
void |
192 |
|
|
inject_event (CFPContext *context) |
193 |
|
|
{ |
194 |
|
|
dSP; |
195 |
|
|
|
196 |
|
|
ENTER; |
197 |
|
|
SAVETMPS; |
198 |
|
|
|
199 |
|
|
PUSHMARK (SP); |
200 |
|
|
|
201 |
|
|
EXTEND (SP, 2); |
202 |
|
|
//PUSHs (sv_2mortal (newSViv (type))); |
203 |
|
|
|
204 |
|
|
HV *hv = newHV (); |
205 |
|
|
#define hv_context(type,addr,expr) hv_store (hv, #expr, sizeof (#expr) - 1, newSVcfapi (type, addr context->expr), 0) |
206 |
|
|
hv_context (CFAPI_POBJECT, ,who); |
207 |
|
|
hv_context (CFAPI_POBJECT, ,activator); |
208 |
|
|
hv_context (CFAPI_POBJECT, ,third); |
209 |
|
|
hv_context (CFAPI_STRING , ,message); |
210 |
|
|
hv_context (CFAPI_INT ,&,fix); |
211 |
|
|
hv_context (CFAPI_INT ,&,event_code); |
212 |
|
|
hv_context (CFAPI_STRING , ,options); |
213 |
|
|
|
214 |
|
|
PUSHs (sv_2mortal (newRV_noinc ((SV *)hv))); |
215 |
|
|
|
216 |
|
|
PUTBACK; |
217 |
|
|
int count = call_pv ("cf::inject_event", G_SCALAR | G_EVAL); |
218 |
|
|
SPAGAIN; |
219 |
|
|
|
220 |
root |
1.6 |
if (SvTRUE (ERRSV)) |
221 |
|
|
LOG (llevError, "event '%d' callback evaluation error: %s", context->event_code, SvPV_nolen (ERRSV)); |
222 |
|
|
|
223 |
root |
1.1 |
context->returnvalue = count > 0 ? POPi : 0; |
224 |
|
|
|
225 |
|
|
PUTBACK; |
226 |
|
|
FREETMPS; |
227 |
|
|
LEAVE; |
228 |
|
|
} |
229 |
|
|
|
230 |
|
|
///////////////////////////////////////////////////////////////////////////// |
231 |
|
|
|
232 |
|
|
int |
233 |
|
|
initPlugin (const char *iversion, f_plug_api gethooksptr) |
234 |
|
|
{ |
235 |
|
|
gethook = gethooksptr; |
236 |
|
|
printf (PLUGIN_VERSION " init\n"); |
237 |
|
|
|
238 |
|
|
return 0; |
239 |
|
|
} |
240 |
|
|
|
241 |
|
|
static CommArray_s rtn_cmd; |
242 |
|
|
|
243 |
|
|
int |
244 |
|
|
runPluginCommand (object *obj, char *params) |
245 |
|
|
{ |
246 |
|
|
dSP; |
247 |
|
|
|
248 |
|
|
ENTER; |
249 |
|
|
SAVETMPS; |
250 |
|
|
|
251 |
|
|
PUSHMARK (SP); |
252 |
|
|
|
253 |
|
|
EXTEND (SP, 3); |
254 |
|
|
PUSHs (sv_2mortal (newSVpv (rtn_cmd.name, 0))); |
255 |
|
|
PUSHs (sv_2mortal (newSVcfapi (CFAPI_POBJECT, obj))); |
256 |
|
|
|
257 |
|
|
if (params) |
258 |
|
|
PUSHs (sv_2mortal (newSVpv (params, 0))); |
259 |
|
|
|
260 |
|
|
PUTBACK; |
261 |
|
|
int count = call_pv ("cf::inject_command", G_SCALAR | G_EVAL); |
262 |
|
|
SPAGAIN; |
263 |
|
|
|
264 |
root |
1.6 |
if (SvTRUE (ERRSV)) |
265 |
|
|
LOG (llevError, "command '%s' callback evaluation error: %s", rtn_cmd.name, SvPV_nolen (ERRSV)); |
266 |
|
|
|
267 |
root |
1.1 |
int returnvalue = count > 0 ? POPi : -1; |
268 |
|
|
|
269 |
|
|
PUTBACK; |
270 |
|
|
FREETMPS; |
271 |
|
|
LEAVE; |
272 |
|
|
|
273 |
|
|
return returnvalue; |
274 |
|
|
} |
275 |
|
|
|
276 |
|
|
void * |
277 |
|
|
getPluginProperty (int *type, ...) |
278 |
|
|
{ |
279 |
|
|
va_list args; |
280 |
|
|
char *propname; |
281 |
|
|
int i; |
282 |
|
|
va_start (args, type); |
283 |
|
|
propname = va_arg (args, char *); |
284 |
|
|
//printf ("Property name: %s\n", propname); |
285 |
root |
1.3 |
|
286 |
root |
1.1 |
if (!strcmp (propname, "command?")) |
287 |
|
|
{ |
288 |
root |
1.3 |
if (!perl) |
289 |
|
|
return NULL; |
290 |
|
|
|
291 |
root |
1.1 |
const char *cmdname = va_arg (args, const char *); |
292 |
|
|
HV *hv = get_hv ("cf::COMMAND", 1); |
293 |
|
|
SV **svp = hv_fetch (hv, cmdname, strlen (cmdname) + 1, 0); |
294 |
|
|
|
295 |
|
|
va_end (args); |
296 |
|
|
|
297 |
|
|
if (svp) |
298 |
|
|
{ |
299 |
|
|
// this is totaly broken, should stash it into %COMMAND |
300 |
|
|
rtn_cmd.name = cmdname; |
301 |
|
|
rtn_cmd.time = SvNV (*svp); |
302 |
|
|
rtn_cmd.func = runPluginCommand; |
303 |
|
|
|
304 |
|
|
return &rtn_cmd; |
305 |
|
|
} |
306 |
|
|
} |
307 |
|
|
else if (!strcmp (propname, "Identification")) |
308 |
|
|
{ |
309 |
|
|
va_end (args); |
310 |
|
|
return PLUGIN_NAME; |
311 |
|
|
} |
312 |
|
|
else if (!strcmp (propname, "FullName")) |
313 |
|
|
{ |
314 |
|
|
va_end (args); |
315 |
|
|
return PLUGIN_VERSION; |
316 |
|
|
} |
317 |
|
|
else |
318 |
|
|
va_end (args); |
319 |
|
|
|
320 |
|
|
return NULL; |
321 |
|
|
} |
322 |
|
|
|
323 |
|
|
void *globalEventListener (int *type, ...); |
324 |
|
|
|
325 |
|
|
int |
326 |
|
|
postInitPlugin () |
327 |
|
|
{ |
328 |
|
|
int hooktype = 1; |
329 |
|
|
int rtype = 0; |
330 |
|
|
|
331 |
|
|
printf (PLUGIN_VERSION " post init\n"); |
332 |
|
|
|
333 |
|
|
registerGlobalEvent = gethook (&rtype, hooktype, "cfapi_system_register_global_event"); |
334 |
|
|
unregisterGlobalEvent = gethook (&rtype, hooktype, "cfapi_system_unregister_global_event"); |
335 |
|
|
systemDirectory = gethook (&rtype, hooktype, "cfapi_system_directory"); |
336 |
|
|
cf_init_plugin (gethook); |
337 |
|
|
|
338 |
|
|
/* Pick the global events you want to monitor from this plugin */ |
339 |
|
|
registerGlobalEvent (NULL, EVENT_BORN, PLUGIN_NAME, globalEventListener); |
340 |
|
|
registerGlobalEvent (NULL, EVENT_CLOCK, PLUGIN_NAME, globalEventListener); |
341 |
|
|
//registerGlobalEvent (NULL, EVENT_CRASH, PLUGIN_NAME, globalEventListener); |
342 |
|
|
registerGlobalEvent (NULL, EVENT_PLAYER_DEATH, PLUGIN_NAME, globalEventListener); |
343 |
|
|
registerGlobalEvent (NULL, EVENT_GKILL, PLUGIN_NAME, globalEventListener); |
344 |
|
|
registerGlobalEvent (NULL, EVENT_LOGIN, PLUGIN_NAME, globalEventListener); |
345 |
|
|
registerGlobalEvent (NULL, EVENT_LOGOUT, PLUGIN_NAME, globalEventListener); |
346 |
|
|
registerGlobalEvent (NULL, EVENT_MAPENTER, PLUGIN_NAME, globalEventListener); |
347 |
|
|
registerGlobalEvent (NULL, EVENT_MAPLEAVE, PLUGIN_NAME, globalEventListener); |
348 |
|
|
registerGlobalEvent (NULL, EVENT_MAPRESET, PLUGIN_NAME, globalEventListener); |
349 |
|
|
registerGlobalEvent (NULL, EVENT_REMOVE, PLUGIN_NAME, globalEventListener); |
350 |
|
|
registerGlobalEvent (NULL, EVENT_SHOUT, PLUGIN_NAME, globalEventListener); |
351 |
|
|
registerGlobalEvent (NULL, EVENT_TELL, PLUGIN_NAME, globalEventListener); |
352 |
|
|
registerGlobalEvent (NULL, EVENT_MUZZLE, PLUGIN_NAME, globalEventListener); |
353 |
|
|
registerGlobalEvent (NULL, EVENT_KICK, PLUGIN_NAME, globalEventListener); |
354 |
|
|
|
355 |
|
|
char *argv[] = { |
356 |
|
|
"", |
357 |
|
|
"-e" |
358 |
|
|
"BEGIN {" |
359 |
|
|
" cf->bootstrap;" |
360 |
root |
1.5 |
" unshift @INC, cf::datadir ();" |
361 |
root |
1.1 |
"}" |
362 |
|
|
"" |
363 |
|
|
"use cf;" |
364 |
|
|
}; |
365 |
|
|
|
366 |
|
|
perl = perl_alloc (); |
367 |
|
|
perl_construct (perl); |
368 |
|
|
|
369 |
root |
1.5 |
if (perl_parse (perl, xs_init, 2, argv, (char **)NULL) || perl_run (perl)) |
370 |
root |
1.1 |
{ |
371 |
|
|
printf ("unable to initialize perl-interpreter, continuing without.\n"); |
372 |
|
|
|
373 |
|
|
perl_destruct (perl); |
374 |
|
|
perl_free (perl); |
375 |
|
|
perl = 0; |
376 |
|
|
} |
377 |
|
|
|
378 |
|
|
return 0; |
379 |
|
|
} |
380 |
|
|
|
381 |
|
|
void * |
382 |
|
|
globalEventListener (int *type, ...) |
383 |
|
|
{ |
384 |
|
|
va_list args; |
385 |
|
|
static int rv = 0; |
386 |
|
|
CFPContext context; |
387 |
|
|
char *buf; |
388 |
|
|
player *pl; |
389 |
|
|
object *op; |
390 |
|
|
|
391 |
|
|
if (!perl) |
392 |
|
|
return; |
393 |
|
|
|
394 |
|
|
memset (&context, 0, sizeof (context)); |
395 |
|
|
|
396 |
|
|
va_start (args, type); |
397 |
|
|
context.event_code = va_arg (args, int); |
398 |
|
|
|
399 |
|
|
switch (context.event_code) |
400 |
|
|
{ |
401 |
|
|
case EVENT_CRASH: |
402 |
|
|
printf ("Unimplemented for now\n"); |
403 |
|
|
break; |
404 |
|
|
|
405 |
|
|
case EVENT_BORN: |
406 |
|
|
context.activator = va_arg (args, object *); |
407 |
|
|
break; |
408 |
|
|
|
409 |
|
|
case EVENT_PLAYER_DEATH: |
410 |
|
|
context.who = va_arg (args, object *); |
411 |
|
|
break; |
412 |
|
|
|
413 |
|
|
case EVENT_GKILL: |
414 |
|
|
context.who = va_arg (args, object *); |
415 |
|
|
context.activator = va_arg (args, object *); |
416 |
|
|
break; |
417 |
|
|
|
418 |
|
|
case EVENT_LOGIN: |
419 |
|
|
pl = va_arg (args, player *); |
420 |
|
|
context.activator = pl->ob; |
421 |
|
|
buf = va_arg (args, char *); |
422 |
|
|
if (buf != 0) |
423 |
|
|
strcpy (context.message, buf); |
424 |
|
|
break; |
425 |
|
|
|
426 |
|
|
case EVENT_LOGOUT: |
427 |
|
|
pl = va_arg (args, player *); |
428 |
|
|
context.activator = pl->ob; |
429 |
|
|
buf = va_arg (args, char *); |
430 |
|
|
if (buf != 0) |
431 |
|
|
strcpy (context.message, buf); |
432 |
|
|
break; |
433 |
|
|
|
434 |
|
|
case EVENT_REMOVE: |
435 |
|
|
context.activator = va_arg (args, object *); |
436 |
|
|
break; |
437 |
|
|
|
438 |
|
|
case EVENT_SHOUT: |
439 |
|
|
context.activator = va_arg (args, object *); |
440 |
|
|
buf = va_arg (args, char *); |
441 |
|
|
if (buf != 0) |
442 |
|
|
strcpy (context.message, buf); |
443 |
|
|
break; |
444 |
|
|
|
445 |
|
|
case EVENT_MUZZLE: |
446 |
|
|
context.activator = va_arg (args, object *); |
447 |
|
|
buf = va_arg (args, char *); |
448 |
|
|
if (buf != 0) |
449 |
|
|
strcpy (context.message, buf); |
450 |
|
|
break; |
451 |
|
|
|
452 |
|
|
case EVENT_KICK: |
453 |
|
|
context.activator = va_arg (args, object *); |
454 |
|
|
buf = va_arg (args, char *); |
455 |
|
|
if (buf != 0) |
456 |
|
|
strcpy (context.message, buf); |
457 |
|
|
break; |
458 |
|
|
|
459 |
|
|
case EVENT_MAPENTER: |
460 |
|
|
context.activator = va_arg (args, object *); |
461 |
|
|
break; |
462 |
|
|
|
463 |
|
|
case EVENT_MAPLEAVE: |
464 |
|
|
context.activator = va_arg (args, object *); |
465 |
|
|
break; |
466 |
|
|
|
467 |
|
|
case EVENT_CLOCK: |
468 |
|
|
break; |
469 |
|
|
|
470 |
|
|
case EVENT_MAPRESET: |
471 |
|
|
buf = va_arg (args, char *); |
472 |
|
|
if (buf != 0) |
473 |
|
|
strcpy (context.message, buf); |
474 |
|
|
break; |
475 |
|
|
|
476 |
|
|
case EVENT_TELL: |
477 |
|
|
break; |
478 |
|
|
} |
479 |
|
|
|
480 |
|
|
va_end (args); |
481 |
|
|
|
482 |
|
|
inject_event (&context); |
483 |
|
|
|
484 |
|
|
rv = context.returnvalue; |
485 |
|
|
|
486 |
|
|
return &rv; |
487 |
|
|
} |
488 |
|
|
|
489 |
|
|
void * |
490 |
|
|
eventListener (int *type, ...) |
491 |
|
|
{ |
492 |
|
|
static int rv = 0; |
493 |
|
|
va_list args; |
494 |
|
|
char *buf; |
495 |
|
|
CFPContext context; |
496 |
|
|
|
497 |
|
|
if (!perl) |
498 |
|
|
return; |
499 |
|
|
|
500 |
|
|
memset (&context, 0, sizeof (context)); |
501 |
|
|
|
502 |
|
|
va_start (args, type); |
503 |
|
|
|
504 |
|
|
context.who = va_arg (args, object *); |
505 |
|
|
context.event_code = va_arg (args, int); |
506 |
|
|
context.activator = va_arg (args, object *); |
507 |
|
|
context.third = va_arg (args, object *); |
508 |
|
|
buf = va_arg (args, char *); |
509 |
|
|
|
510 |
|
|
if (buf != 0) |
511 |
|
|
strcpy (context.message, buf); |
512 |
|
|
|
513 |
|
|
context.fix = va_arg (args, int); |
514 |
|
|
strcpy (context.options, va_arg (args, char *)); |
515 |
|
|
context.returnvalue = 0; |
516 |
|
|
va_end (args); |
517 |
|
|
|
518 |
|
|
inject_event (&context); |
519 |
|
|
|
520 |
|
|
rv = context.returnvalue; |
521 |
|
|
return &rv; |
522 |
|
|
} |
523 |
|
|
|
524 |
|
|
int |
525 |
|
|
closePlugin () |
526 |
|
|
{ |
527 |
|
|
printf (PLUGIN_VERSION " closing\n"); |
528 |
|
|
|
529 |
|
|
if (perl) |
530 |
|
|
{ |
531 |
|
|
perl_destruct (perl); |
532 |
|
|
perl_free (perl); |
533 |
|
|
perl = 0; |
534 |
|
|
} |
535 |
|
|
|
536 |
|
|
return 0; |
537 |
|
|
} |
538 |
|
|
|
539 |
|
|
MODULE = cf PACKAGE = cf PREFIX = cf_ |
540 |
|
|
|
541 |
|
|
BOOT: |
542 |
|
|
{ |
543 |
|
|
HV *stash = gv_stashpv ("cf", 1); |
544 |
|
|
|
545 |
|
|
const struct { |
546 |
|
|
const char *name; |
547 |
|
|
IV iv; |
548 |
|
|
} *civ, const_iv[] = { |
549 |
|
|
# define const_iv(name) { # name, (IV)name }, |
550 |
|
|
const_iv (llevError) |
551 |
|
|
const_iv (llevInfo) |
552 |
|
|
const_iv (llevDebug) |
553 |
|
|
const_iv (llevMonster) |
554 |
|
|
|
555 |
|
|
const_iv (PLAYER) |
556 |
|
|
const_iv (ROD) |
557 |
|
|
const_iv (TREASURE) |
558 |
|
|
const_iv (POTION) |
559 |
|
|
const_iv (FOOD) |
560 |
|
|
const_iv (POISON) |
561 |
|
|
const_iv (BOOK) |
562 |
|
|
const_iv (CLOCK) |
563 |
|
|
const_iv (LIGHTNING) |
564 |
|
|
const_iv (ARROW) |
565 |
|
|
const_iv (BOW) |
566 |
|
|
const_iv (WEAPON) |
567 |
|
|
const_iv (ARMOUR) |
568 |
|
|
const_iv (PEDESTAL) |
569 |
|
|
const_iv (ALTAR) |
570 |
|
|
const_iv (CONFUSION) |
571 |
|
|
const_iv (LOCKED_DOOR) |
572 |
|
|
const_iv (SPECIAL_KEY) |
573 |
|
|
const_iv (MAP) |
574 |
|
|
const_iv (DOOR) |
575 |
|
|
const_iv (KEY) |
576 |
|
|
const_iv (TIMED_GATE) |
577 |
|
|
const_iv (TRIGGER) |
578 |
|
|
const_iv (GRIMREAPER) |
579 |
|
|
const_iv (MAGIC_EAR) |
580 |
|
|
const_iv (TRIGGER_BUTTON) |
581 |
|
|
const_iv (TRIGGER_ALTAR) |
582 |
|
|
const_iv (TRIGGER_PEDESTAL) |
583 |
|
|
const_iv (SHIELD) |
584 |
|
|
const_iv (HELMET) |
585 |
|
|
const_iv (HORN) |
586 |
|
|
const_iv (MONEY) |
587 |
|
|
const_iv (CLASS) |
588 |
|
|
const_iv (GRAVESTONE) |
589 |
|
|
const_iv (AMULET) |
590 |
|
|
const_iv (PLAYERMOVER) |
591 |
|
|
const_iv (TELEPORTER) |
592 |
|
|
const_iv (CREATOR) |
593 |
|
|
const_iv (SKILL) |
594 |
|
|
const_iv (EXPERIENCE) |
595 |
|
|
const_iv (EARTHWALL) |
596 |
|
|
const_iv (GOLEM) |
597 |
|
|
const_iv (THROWN_OBJ) |
598 |
|
|
const_iv (BLINDNESS) |
599 |
|
|
const_iv (GOD) |
600 |
|
|
const_iv (DETECTOR) |
601 |
|
|
const_iv (TRIGGER_MARKER) |
602 |
|
|
const_iv (DEAD_OBJECT) |
603 |
|
|
const_iv (DRINK) |
604 |
|
|
const_iv (MARKER) |
605 |
|
|
const_iv (HOLY_ALTAR) |
606 |
|
|
const_iv (PLAYER_CHANGER) |
607 |
|
|
const_iv (BATTLEGROUND) |
608 |
|
|
const_iv (PEACEMAKER) |
609 |
|
|
const_iv (GEM) |
610 |
|
|
const_iv (FIREWALL) |
611 |
|
|
const_iv (ANVIL) |
612 |
|
|
const_iv (CHECK_INV) |
613 |
|
|
const_iv (MOOD_FLOOR) |
614 |
|
|
const_iv (EXIT) |
615 |
|
|
const_iv (ENCOUNTER) |
616 |
|
|
const_iv (SHOP_FLOOR) |
617 |
|
|
const_iv (SHOP_MAT) |
618 |
|
|
const_iv (RING) |
619 |
|
|
const_iv (FLOOR) |
620 |
|
|
const_iv (FLESH) |
621 |
|
|
const_iv (INORGANIC) |
622 |
|
|
const_iv (SKILL_TOOL) |
623 |
|
|
const_iv (LIGHTER) |
624 |
|
|
const_iv (TRAP_PART) |
625 |
|
|
const_iv (WALL) |
626 |
|
|
const_iv (LIGHT_SOURCE) |
627 |
|
|
const_iv (MISC_OBJECT) |
628 |
|
|
const_iv (MONSTER) |
629 |
|
|
const_iv (SPAWN_GENERATOR) |
630 |
|
|
const_iv (LAMP) |
631 |
|
|
const_iv (DUPLICATOR) |
632 |
|
|
const_iv (TOOL) |
633 |
|
|
const_iv (SPELLBOOK) |
634 |
|
|
const_iv (BUILDFAC) |
635 |
|
|
const_iv (CLOAK) |
636 |
|
|
const_iv (SPINNER) |
637 |
|
|
const_iv (GATE) |
638 |
|
|
const_iv (BUTTON) |
639 |
|
|
const_iv (CF_HANDLE) |
640 |
|
|
const_iv (HOLE) |
641 |
|
|
const_iv (TRAPDOOR) |
642 |
|
|
const_iv (SIGN) |
643 |
|
|
const_iv (BOOTS) |
644 |
|
|
const_iv (GLOVES) |
645 |
|
|
const_iv (SPELL) |
646 |
|
|
const_iv (SPELL_EFFECT) |
647 |
|
|
const_iv (CONVERTER) |
648 |
|
|
const_iv (BRACERS) |
649 |
|
|
const_iv (POISONING) |
650 |
|
|
const_iv (SAVEBED) |
651 |
|
|
const_iv (POISONCLOUD) |
652 |
|
|
const_iv (FIREHOLES) |
653 |
|
|
const_iv (WAND) |
654 |
|
|
const_iv (SCROLL) |
655 |
|
|
const_iv (DIRECTOR) |
656 |
|
|
const_iv (GIRDLE) |
657 |
|
|
const_iv (FORCE) |
658 |
|
|
const_iv (POTION_EFFECT) |
659 |
|
|
const_iv (EVENT_CONNECTOR) |
660 |
|
|
const_iv (CLOSE_CON) |
661 |
|
|
const_iv (CONTAINER) |
662 |
|
|
const_iv (ARMOUR_IMPROVER) |
663 |
|
|
const_iv (WEAPON_IMPROVER) |
664 |
|
|
const_iv (SKILLSCROLL) |
665 |
|
|
const_iv (DEEP_SWAMP) |
666 |
|
|
const_iv (IDENTIFY_ALTAR) |
667 |
|
|
const_iv (MENU) |
668 |
|
|
const_iv (RUNE) |
669 |
|
|
const_iv (TRAP) |
670 |
|
|
const_iv (POWER_CRYSTAL) |
671 |
|
|
const_iv (CORPSE) |
672 |
|
|
const_iv (DISEASE) |
673 |
|
|
const_iv (SYMPTOM) |
674 |
|
|
const_iv (BUILDER) |
675 |
|
|
const_iv (MATERIAL) |
676 |
|
|
const_iv (ITEM_TRANSFORMER) |
677 |
|
|
const_iv (QUEST) |
678 |
|
|
|
679 |
|
|
const_iv (ST_BD_BUILD) |
680 |
|
|
const_iv (ST_BD_REMOVE) |
681 |
|
|
const_iv (ST_MAT_FLOOR) |
682 |
|
|
const_iv (ST_MAT_WALL) |
683 |
|
|
const_iv (ST_MAT_ITEM) |
684 |
|
|
|
685 |
|
|
const_iv (QUEST_IN_PROGRESS) |
686 |
|
|
const_iv (QUEST_DONE_QUEST) |
687 |
|
|
const_iv (QUEST_DONE_TASK) |
688 |
|
|
const_iv (QUEST_START_QUEST) |
689 |
|
|
const_iv (QUEST_END_QUEST) |
690 |
|
|
const_iv (QUEST_START_TASK) |
691 |
|
|
const_iv (QUEST_END_TASK) |
692 |
|
|
const_iv (QUEST_OVERRIDE) |
693 |
|
|
const_iv (QUEST_ON_ACTIVATE) |
694 |
|
|
|
695 |
|
|
const_iv (WEAP_HIT) |
696 |
|
|
const_iv (WEAP_SLASH) |
697 |
|
|
const_iv (WEAP_PIERCE) |
698 |
|
|
const_iv (WEAP_CLEAVE) |
699 |
|
|
const_iv (WEAP_SLICE) |
700 |
|
|
const_iv (WEAP_STAB) |
701 |
|
|
const_iv (WEAP_WHIP) |
702 |
|
|
const_iv (WEAP_CRUSH) |
703 |
|
|
const_iv (WEAP_BLUD) |
704 |
|
|
|
705 |
|
|
const_iv (FLAG_ALIVE) |
706 |
|
|
const_iv (FLAG_WIZ) |
707 |
|
|
const_iv (FLAG_REMOVED) |
708 |
|
|
const_iv (FLAG_FREED) |
709 |
|
|
const_iv (FLAG_WAS_WIZ) |
710 |
|
|
const_iv (FLAG_APPLIED) |
711 |
|
|
const_iv (FLAG_UNPAID) |
712 |
|
|
const_iv (FLAG_USE_SHIELD) |
713 |
|
|
const_iv (FLAG_NO_PICK) |
714 |
|
|
const_iv (FLAG_ANIMATE) |
715 |
|
|
const_iv (FLAG_MONSTER) |
716 |
|
|
const_iv (FLAG_FRIENDLY) |
717 |
|
|
const_iv (FLAG_GENERATOR) |
718 |
|
|
const_iv (FLAG_IS_THROWN) |
719 |
|
|
const_iv (FLAG_AUTO_APPLY) |
720 |
|
|
const_iv (FLAG_TREASURE) |
721 |
|
|
const_iv (FLAG_PLAYER_SOLD) |
722 |
|
|
const_iv (FLAG_SEE_INVISIBLE) |
723 |
|
|
const_iv (FLAG_CAN_ROLL) |
724 |
|
|
const_iv (FLAG_OVERLAY_FLOOR) |
725 |
|
|
const_iv (FLAG_IS_TURNABLE) |
726 |
|
|
const_iv (FLAG_IS_USED_UP) |
727 |
|
|
const_iv (FLAG_IDENTIFIED) |
728 |
|
|
const_iv (FLAG_REFLECTING) |
729 |
|
|
const_iv (FLAG_CHANGING) |
730 |
|
|
const_iv (FLAG_SPLITTING) |
731 |
|
|
const_iv (FLAG_HITBACK) |
732 |
|
|
const_iv (FLAG_STARTEQUIP) |
733 |
|
|
const_iv (FLAG_BLOCKSVIEW) |
734 |
|
|
const_iv (FLAG_UNDEAD) |
735 |
|
|
const_iv (FLAG_SCARED) |
736 |
|
|
const_iv (FLAG_UNAGGRESSIVE) |
737 |
|
|
const_iv (FLAG_REFL_MISSILE) |
738 |
|
|
const_iv (FLAG_REFL_SPELL) |
739 |
|
|
const_iv (FLAG_NO_MAGIC) |
740 |
|
|
const_iv (FLAG_NO_FIX_PLAYER) |
741 |
|
|
const_iv (FLAG_IS_LIGHTABLE) |
742 |
|
|
const_iv (FLAG_TEAR_DOWN) |
743 |
|
|
const_iv (FLAG_RUN_AWAY) |
744 |
|
|
const_iv (FLAG_PICK_UP) |
745 |
|
|
const_iv (FLAG_UNIQUE) |
746 |
|
|
const_iv (FLAG_NO_DROP) |
747 |
|
|
const_iv (FLAG_WIZCAST) |
748 |
|
|
const_iv (FLAG_CAST_SPELL) |
749 |
|
|
const_iv (FLAG_USE_SCROLL) |
750 |
|
|
const_iv (FLAG_USE_RANGE) |
751 |
|
|
const_iv (FLAG_USE_BOW) |
752 |
|
|
const_iv (FLAG_USE_ARMOUR) |
753 |
|
|
const_iv (FLAG_USE_WEAPON) |
754 |
|
|
const_iv (FLAG_USE_RING) |
755 |
|
|
const_iv (FLAG_READY_RANGE) |
756 |
|
|
const_iv (FLAG_READY_BOW) |
757 |
|
|
const_iv (FLAG_XRAYS) |
758 |
|
|
const_iv (FLAG_NO_APPLY) |
759 |
|
|
const_iv (FLAG_IS_FLOOR) |
760 |
|
|
const_iv (FLAG_LIFESAVE) |
761 |
|
|
const_iv (FLAG_NO_STRENGTH) |
762 |
|
|
const_iv (FLAG_SLEEP) |
763 |
|
|
const_iv (FLAG_STAND_STILL) |
764 |
|
|
const_iv (FLAG_RANDOM_MOVE) |
765 |
|
|
const_iv (FLAG_ONLY_ATTACK) |
766 |
|
|
const_iv (FLAG_CONFUSED) |
767 |
|
|
const_iv (FLAG_STEALTH) |
768 |
|
|
const_iv (FLAG_WIZPASS) |
769 |
|
|
const_iv (FLAG_IS_LINKED) |
770 |
|
|
const_iv (FLAG_CURSED) |
771 |
|
|
const_iv (FLAG_DAMNED) |
772 |
|
|
const_iv (FLAG_SEE_ANYWHERE) |
773 |
|
|
const_iv (FLAG_KNOWN_MAGICAL) |
774 |
|
|
const_iv (FLAG_KNOWN_CURSED) |
775 |
|
|
const_iv (FLAG_CAN_USE_SKILL) |
776 |
|
|
const_iv (FLAG_BEEN_APPLIED) |
777 |
|
|
const_iv (FLAG_READY_SCROLL) |
778 |
|
|
const_iv (FLAG_USE_ROD) |
779 |
|
|
const_iv (FLAG_USE_HORN) |
780 |
|
|
const_iv (FLAG_MAKE_INVIS) |
781 |
|
|
const_iv (FLAG_INV_LOCKED) |
782 |
|
|
const_iv (FLAG_IS_WOODED) |
783 |
|
|
const_iv (FLAG_IS_HILLY) |
784 |
|
|
const_iv (FLAG_READY_SKILL) |
785 |
|
|
const_iv (FLAG_READY_WEAPON) |
786 |
|
|
const_iv (FLAG_NO_SKILL_IDENT) |
787 |
|
|
const_iv (FLAG_BLIND) |
788 |
|
|
const_iv (FLAG_SEE_IN_DARK) |
789 |
|
|
const_iv (FLAG_IS_CAULDRON) |
790 |
|
|
const_iv (FLAG_NO_STEAL) |
791 |
|
|
const_iv (FLAG_ONE_HIT) |
792 |
|
|
const_iv (FLAG_CLIENT_SENT) |
793 |
|
|
const_iv (FLAG_BERSERK) |
794 |
|
|
const_iv (FLAG_NEUTRAL) |
795 |
|
|
const_iv (FLAG_NO_ATTACK) |
796 |
|
|
const_iv (FLAG_NO_DAMAGE) |
797 |
|
|
const_iv (FLAG_OBJ_ORIGINAL) |
798 |
|
|
const_iv (FLAG_OBJ_SAVE_ON_OVL) |
799 |
|
|
const_iv (FLAG_ACTIVATE_ON_PUSH) |
800 |
|
|
const_iv (FLAG_ACTIVATE_ON_RELEASE) |
801 |
|
|
const_iv (FLAG_IS_WATER) |
802 |
|
|
const_iv (FLAG_CONTENT_ON_GEN) |
803 |
|
|
const_iv (FLAG_IS_A_TEMPLATE) |
804 |
|
|
const_iv (FLAG_IS_BUILDABLE) |
805 |
|
|
const_iv (FLAG_AFK) |
806 |
root |
1.6 |
|
807 |
|
|
const_iv (NDI_BLACK) |
808 |
|
|
const_iv (NDI_WHITE) |
809 |
|
|
const_iv (NDI_NAVY) |
810 |
|
|
const_iv (NDI_RED) |
811 |
|
|
const_iv (NDI_ORANGE) |
812 |
|
|
const_iv (NDI_BLUE) |
813 |
|
|
const_iv (NDI_DK_ORANGE) |
814 |
|
|
const_iv (NDI_GREEN) |
815 |
|
|
const_iv (NDI_LT_GREEN) |
816 |
|
|
const_iv (NDI_GREY) |
817 |
|
|
const_iv (NDI_BROWN) |
818 |
|
|
const_iv (NDI_GOLD) |
819 |
|
|
const_iv (NDI_TAN) |
820 |
|
|
const_iv (NDI_MAX_COLOR) |
821 |
|
|
const_iv (NDI_COLOR_MASK) |
822 |
|
|
const_iv (NDI_UNIQUE) |
823 |
|
|
const_iv (NDI_ALL) |
824 |
|
|
|
825 |
|
|
const_iv (F_APPLIED) |
826 |
|
|
const_iv (F_LOCATION) |
827 |
|
|
const_iv (F_UNPAID) |
828 |
|
|
const_iv (F_MAGIC) |
829 |
|
|
const_iv (F_CURSED) |
830 |
|
|
const_iv (F_DAMNED) |
831 |
|
|
const_iv (F_OPEN) |
832 |
|
|
const_iv (F_NOPICK) |
833 |
|
|
const_iv (F_LOCKED) |
834 |
root |
1.1 |
}; |
835 |
|
|
|
836 |
|
|
for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ-- > const_iv; ) |
837 |
|
|
newCONSTSUB (stash, (char *)civ->name, newSViv (civ->iv)); |
838 |
|
|
|
839 |
|
|
const struct { |
840 |
|
|
const char *name; |
841 |
|
|
IV iv; |
842 |
|
|
} *event, event_list[] = { |
843 |
|
|
# define const_event(name) { # name, (IV)EVENT_ ## name }, |
844 |
|
|
const_event (NONE) |
845 |
|
|
const_event (APPLY) |
846 |
|
|
const_event (ATTACK) |
847 |
|
|
const_event (DEATH) |
848 |
|
|
const_event (DROP) |
849 |
|
|
const_event (PICKUP) |
850 |
|
|
const_event (SAY) |
851 |
|
|
const_event (STOP) |
852 |
|
|
const_event (TIME) |
853 |
|
|
const_event (THROW) |
854 |
|
|
const_event (TRIGGER) |
855 |
|
|
const_event (CLOSE) |
856 |
|
|
const_event (TIMER) |
857 |
|
|
|
858 |
|
|
const_event (BORN) |
859 |
|
|
const_event (CLOCK) |
860 |
|
|
const_event (CRASH) |
861 |
|
|
const_event (PLAYER_DEATH) |
862 |
|
|
const_event (GKILL) |
863 |
|
|
const_event (LOGIN) |
864 |
|
|
const_event (LOGOUT) |
865 |
|
|
const_event (MAPENTER) |
866 |
|
|
const_event (MAPLEAVE) |
867 |
|
|
const_event (MAPRESET) |
868 |
|
|
const_event (REMOVE) |
869 |
|
|
const_event (SHOUT) |
870 |
|
|
const_event (TELL) |
871 |
|
|
const_event (MUZZLE) |
872 |
|
|
const_event (KICK) |
873 |
|
|
}; |
874 |
|
|
|
875 |
|
|
AV *av = get_av ("cf::EVENT", 1); |
876 |
|
|
|
877 |
|
|
for (event = event_list + sizeof (event_list) / sizeof (event_list [0]); event-- > event_list; ) |
878 |
|
|
av_store (av, event->iv, newSVpv ((char *)event->name, 0)); |
879 |
|
|
|
880 |
|
|
const struct { |
881 |
|
|
int dtype; |
882 |
|
|
const char *name; |
883 |
|
|
IV idx; |
884 |
|
|
} *cprop, prop_table[] = { |
885 |
|
|
# define prop(type, name) { type, # name, (IV) CFAPI_ ## name }, |
886 |
|
|
prop (CFAPI_INT, MAP_PROP_FLAGS) |
887 |
|
|
prop (CFAPI_INT, MAP_PROP_DIFFICULTY) |
888 |
|
|
prop (CFAPI_STRING, MAP_PROP_PATH) |
889 |
|
|
prop (CFAPI_STRING, MAP_PROP_TMPNAME) |
890 |
|
|
prop (CFAPI_STRING, MAP_PROP_NAME) |
891 |
|
|
prop (CFAPI_INT, MAP_PROP_RESET_TIME) |
892 |
|
|
prop (CFAPI_INT, MAP_PROP_RESET_TIMEOUT) |
893 |
|
|
prop (CFAPI_INT, MAP_PROP_PLAYERS) |
894 |
|
|
prop (CFAPI_INT, MAP_PROP_DARKNESS) |
895 |
|
|
prop (CFAPI_INT, MAP_PROP_WIDTH) |
896 |
|
|
prop (CFAPI_INT, MAP_PROP_HEIGHT) |
897 |
|
|
prop (CFAPI_INT, MAP_PROP_ENTER_X) |
898 |
|
|
prop (CFAPI_INT, MAP_PROP_ENTER_Y) |
899 |
|
|
prop (CFAPI_INT, MAP_PROP_TEMPERATURE) |
900 |
|
|
prop (CFAPI_INT, MAP_PROP_PRESSURE) |
901 |
|
|
prop (CFAPI_INT, MAP_PROP_HUMIDITY) |
902 |
|
|
prop (CFAPI_INT, MAP_PROP_WINDSPEED) |
903 |
|
|
prop (CFAPI_INT, MAP_PROP_WINDDIR) |
904 |
|
|
prop (CFAPI_INT, MAP_PROP_SKY) |
905 |
|
|
prop (CFAPI_INT, MAP_PROP_WPARTX) |
906 |
|
|
prop (CFAPI_INT, MAP_PROP_WPARTY) |
907 |
|
|
prop (CFAPI_STRING, MAP_PROP_MESSAGE) |
908 |
|
|
prop (CFAPI_PMAP, MAP_PROP_NEXT) |
909 |
|
|
prop (CFAPI_PREGION, MAP_PROP_REGION) |
910 |
|
|
prop (CFAPI_POBJECT, OBJECT_PROP_OB_ABOVE) |
911 |
|
|
prop (CFAPI_POBJECT, OBJECT_PROP_OB_BELOW) |
912 |
|
|
prop (CFAPI_POBJECT, OBJECT_PROP_NEXT_ACTIVE_OB) |
913 |
|
|
prop (CFAPI_POBJECT, OBJECT_PROP_PREV_ACTIVE_OB) |
914 |
|
|
prop (CFAPI_POBJECT, OBJECT_PROP_INVENTORY) |
915 |
|
|
prop (CFAPI_POBJECT, OBJECT_PROP_ENVIRONMENT) |
916 |
|
|
prop (CFAPI_POBJECT, OBJECT_PROP_HEAD) |
917 |
|
|
prop (CFAPI_POBJECT, OBJECT_PROP_CONTAINER) |
918 |
|
|
prop (CFAPI_PMAP, OBJECT_PROP_MAP) |
919 |
|
|
prop (CFAPI_INT, OBJECT_PROP_COUNT) |
920 |
|
|
prop (CFAPI_INT, OBJECT_PROP_REFCOUNT) |
921 |
|
|
prop (CFAPI_STRING, OBJECT_PROP_NAME) |
922 |
|
|
prop (CFAPI_STRING, OBJECT_PROP_NAME_PLURAL) |
923 |
|
|
prop (CFAPI_STRING, OBJECT_PROP_TITLE) |
924 |
|
|
prop (CFAPI_STRING, OBJECT_PROP_RACE) |
925 |
|
|
prop (CFAPI_STRING, OBJECT_PROP_SLAYING) |
926 |
|
|
prop (CFAPI_STRING, OBJECT_PROP_SKILL) |
927 |
|
|
prop (CFAPI_STRING, OBJECT_PROP_MESSAGE) |
928 |
|
|
prop (CFAPI_STRING, OBJECT_PROP_LORE) |
929 |
|
|
prop (CFAPI_INT, OBJECT_PROP_X) |
930 |
|
|
prop (CFAPI_INT, OBJECT_PROP_Y) |
931 |
|
|
prop (CFAPI_DOUBLE, OBJECT_PROP_SPEED) |
932 |
|
|
prop (CFAPI_DOUBLE, OBJECT_PROP_SPEED_LEFT) |
933 |
|
|
prop (CFAPI_INT, OBJECT_PROP_NROF) |
934 |
|
|
prop (CFAPI_INT, OBJECT_PROP_DIRECTION) |
935 |
|
|
prop (CFAPI_INT, OBJECT_PROP_FACING) |
936 |
|
|
prop (CFAPI_INT, OBJECT_PROP_TYPE) |
937 |
|
|
prop (CFAPI_INT, OBJECT_PROP_SUBTYPE) |
938 |
|
|
prop (CFAPI_INT, OBJECT_PROP_CLIENT_TYPE) |
939 |
|
|
prop (CFAPI_INT, OBJECT_PROP_ATTACK_TYPE) |
940 |
|
|
prop (CFAPI_INT, OBJECT_PROP_PATH_ATTUNED) |
941 |
|
|
prop (CFAPI_INT, OBJECT_PROP_PATH_REPELLED) |
942 |
|
|
prop (CFAPI_INT, OBJECT_PROP_PATH_DENIED) |
943 |
|
|
prop (CFAPI_INT, OBJECT_PROP_MATERIAL) |
944 |
|
|
prop (CFAPI_STRING, OBJECT_PROP_MATERIAL_NAME) |
945 |
|
|
prop (CFAPI_INT, OBJECT_PROP_MAGIC) |
946 |
|
|
prop (CFAPI_INT, OBJECT_PROP_VALUE) |
947 |
|
|
prop (CFAPI_INT, OBJECT_PROP_LEVEL) |
948 |
|
|
prop (CFAPI_INT, OBJECT_PROP_LAST_HEAL) |
949 |
|
|
prop (CFAPI_INT, OBJECT_PROP_LAST_SP) |
950 |
|
|
prop (CFAPI_INT, OBJECT_PROP_LAST_GRACE) |
951 |
|
|
prop (CFAPI_INT, OBJECT_PROP_LAST_EAT) |
952 |
|
|
prop (CFAPI_INT, OBJECT_PROP_INVISIBLE_TIME) |
953 |
|
|
prop (CFAPI_INT, OBJECT_PROP_PICK_UP) |
954 |
|
|
prop (CFAPI_INT, OBJECT_PROP_ITEM_POWER) |
955 |
|
|
prop (CFAPI_INT, OBJECT_PROP_GEN_SP_ARMOUR) |
956 |
|
|
prop (CFAPI_INT, OBJECT_PROP_WEIGHT) |
957 |
|
|
prop (CFAPI_INT, OBJECT_PROP_WEIGHT_LIMIT) |
958 |
|
|
prop (CFAPI_INT, OBJECT_PROP_CARRYING) |
959 |
|
|
prop (CFAPI_INT, OBJECT_PROP_GLOW_RADIUS) |
960 |
|
|
prop (CFAPI_LONG, OBJECT_PROP_PERM_EXP) |
961 |
|
|
prop (CFAPI_POBJECT, OBJECT_PROP_CURRENT_WEAPON) |
962 |
|
|
prop (CFAPI_POBJECT, OBJECT_PROP_ENEMY) |
963 |
|
|
prop (CFAPI_POBJECT, OBJECT_PROP_ATTACKED_BY) |
964 |
|
|
prop (CFAPI_INT, OBJECT_PROP_RUN_AWAY) |
965 |
|
|
prop (CFAPI_POBJECT, OBJECT_PROP_CHOSEN_SKILL) |
966 |
|
|
prop (CFAPI_INT, OBJECT_PROP_HIDDEN) |
967 |
|
|
prop (CFAPI_INT, OBJECT_PROP_MOVE_STATUS) |
968 |
|
|
prop (CFAPI_INT, OBJECT_PROP_MOVE_TYPE) |
969 |
|
|
prop (CFAPI_POBJECT, OBJECT_PROP_SPELL_ITEM) |
970 |
|
|
prop (CFAPI_DOUBLE, OBJECT_PROP_EXP_MULTIPLIER) |
971 |
|
|
prop (CFAPI_PARCH, OBJECT_PROP_ARCHETYPE) |
972 |
|
|
prop (CFAPI_PARCH, OBJECT_PROP_OTHER_ARCH) |
973 |
|
|
prop (CFAPI_STRING, OBJECT_PROP_CUSTOM_NAME) |
974 |
|
|
prop (CFAPI_INT, OBJECT_PROP_ANIM_SPEED) |
975 |
|
|
prop (CFAPI_INT, OBJECT_PROP_FRIENDLY) |
976 |
|
|
prop (CFAPI_STRING, OBJECT_PROP_SHORT_NAME) |
977 |
|
|
prop (CFAPI_INT, OBJECT_PROP_MAGICAL) |
978 |
|
|
prop (CFAPI_INT, OBJECT_PROP_LUCK) |
979 |
|
|
prop (CFAPI_LONG, OBJECT_PROP_EXP) |
980 |
|
|
prop (CFAPI_POBJECT, OBJECT_PROP_OWNER) |
981 |
|
|
prop (CFAPI_POBJECT, OBJECT_PROP_PRESENT) |
982 |
|
|
prop (CFAPI_INT, OBJECT_PROP_CHEATER) |
983 |
|
|
prop (CFAPI_INT, OBJECT_PROP_MERGEABLE) |
984 |
|
|
prop (CFAPI_INT, OBJECT_PROP_PICKABLE) |
985 |
|
|
prop (CFAPI_INT, OBJECT_PROP_STR) |
986 |
|
|
prop (CFAPI_INT, OBJECT_PROP_DEX) |
987 |
|
|
prop (CFAPI_INT, OBJECT_PROP_CON) |
988 |
|
|
prop (CFAPI_INT, OBJECT_PROP_WIS) |
989 |
|
|
prop (CFAPI_INT, OBJECT_PROP_INT) |
990 |
|
|
prop (CFAPI_INT, OBJECT_PROP_POW) |
991 |
|
|
prop (CFAPI_INT, OBJECT_PROP_CHA) |
992 |
|
|
prop (CFAPI_INT, OBJECT_PROP_WC) |
993 |
|
|
prop (CFAPI_INT, OBJECT_PROP_AC) |
994 |
|
|
prop (CFAPI_INT, OBJECT_PROP_HP) |
995 |
|
|
prop (CFAPI_INT, OBJECT_PROP_SP) |
996 |
|
|
prop (CFAPI_INT, OBJECT_PROP_GP) |
997 |
|
|
prop (CFAPI_INT, OBJECT_PROP_FP) |
998 |
|
|
prop (CFAPI_INT, OBJECT_PROP_MAXHP) |
999 |
|
|
prop (CFAPI_INT, OBJECT_PROP_MAXSP) |
1000 |
|
|
prop (CFAPI_INT, OBJECT_PROP_MAXGP) |
1001 |
|
|
prop (CFAPI_INT, OBJECT_PROP_DAM) |
1002 |
|
|
prop (CFAPI_STRING, OBJECT_PROP_GOD) |
1003 |
|
|
prop (CFAPI_STRING, OBJECT_PROP_ARCH_NAME) |
1004 |
|
|
prop (CFAPI_INT, OBJECT_PROP_INVISIBLE) |
1005 |
|
|
prop (CFAPI_INT, OBJECT_PROP_FACE) |
1006 |
|
|
}; |
1007 |
|
|
|
1008 |
|
|
HV *prop_type = get_hv ("cf::PROP_TYPE", 1); |
1009 |
|
|
HV *prop_idx = get_hv ("cf::PROP_IDX", 1); |
1010 |
|
|
|
1011 |
|
|
for (cprop = prop_table + sizeof (prop_table) / sizeof (prop_table [0]); cprop-- > prop_table; ) |
1012 |
|
|
{ |
1013 |
|
|
hv_store (prop_type, cprop->name, strlen (cprop->name), newSViv (cprop->dtype), 0); |
1014 |
|
|
hv_store (prop_idx, cprop->name, strlen (cprop->name), newSViv (cprop->idx ), 0); |
1015 |
|
|
} |
1016 |
|
|
} |
1017 |
|
|
|
1018 |
|
|
void |
1019 |
|
|
LOG (int level, char *msg) |
1020 |
root |
1.6 |
PROTOTYPE: $$ |
1021 |
root |
1.1 |
C_ARGS: level, "%s", msg |
1022 |
|
|
|
1023 |
|
|
char * |
1024 |
|
|
cf_get_maps_directory (char *path) |
1025 |
root |
1.6 |
PROTOTYPE: $ |
1026 |
root |
1.2 |
ALIAS: maps_directory = 0 |
1027 |
root |
1.1 |
|
1028 |
root |
1.5 |
char * |
1029 |
|
|
mapdir () |
1030 |
root |
1.6 |
PROTOTYPE: |
1031 |
root |
1.5 |
ALIAS: |
1032 |
|
|
mapdir = 0 |
1033 |
|
|
uniquedir = 1 |
1034 |
|
|
tmpdir = 2 |
1035 |
|
|
confdir = 3 |
1036 |
|
|
localdir = 4 |
1037 |
|
|
playerdir = 5 |
1038 |
|
|
datadir = 6 |
1039 |
|
|
CODE: |
1040 |
|
|
{ |
1041 |
|
|
int unused_type; |
1042 |
|
|
RETVAL = (char *)systemDirectory (&unused_type, ix); |
1043 |
|
|
} |
1044 |
root |
1.6 |
OUTPUT: RETVAL |
1045 |
root |
1.5 |
|
1046 |
root |
1.4 |
int |
1047 |
|
|
cf_find_animation (char *text) |
1048 |
root |
1.6 |
PROTOTYPE: $ |
1049 |
root |
1.4 |
|
1050 |
root |
1.1 |
MODULE = cf PACKAGE = cf::object PREFIX = cf_object_ |
1051 |
|
|
|
1052 |
|
|
SV * |
1053 |
root |
1.4 |
get_property (object *obj, int type, int idx) |
1054 |
root |
1.1 |
CODE: |
1055 |
|
|
RETVAL = newSVcfapi (type, cf_object_get_property (obj, idx)); |
1056 |
root |
1.6 |
OUTPUT: RETVAL |
1057 |
root |
1.1 |
|
1058 |
root |
1.4 |
SV * |
1059 |
|
|
set_property (object *obj, int type, int idx, SV *newval) |
1060 |
|
|
CODE: |
1061 |
|
|
switch (type) |
1062 |
|
|
{ |
1063 |
|
|
case CFAPI_INT: |
1064 |
|
|
cf_object_set_int_property (obj, idx, SvIV (newval)); |
1065 |
|
|
break; |
1066 |
|
|
case CFAPI_LONG: |
1067 |
|
|
cf_object_set_long_property (obj, idx, SvNV (newval)); |
1068 |
|
|
break; |
1069 |
|
|
case CFAPI_STRING: |
1070 |
|
|
cf_object_set_string_property (obj, idx, SvPV_nolen (newval)); |
1071 |
|
|
break; |
1072 |
|
|
default: |
1073 |
|
|
croak ("unhandled type '%d' in set_property '%d'", type, idx); |
1074 |
|
|
} |
1075 |
|
|
|
1076 |
root |
1.1 |
int cf_object_get_resistance (object *op, int rtype) |
1077 |
root |
1.2 |
ALIAS: resistance = 0 |
1078 |
root |
1.1 |
|
1079 |
|
|
int cf_object_get_flag (object *op, int flag) |
1080 |
|
|
ALIAS: flag = 0 |
1081 |
|
|
|
1082 |
|
|
void cf_object_set_flag (object *op, int flag, int value) |
1083 |
|
|
|
1084 |
|
|
void cf_object_move (object *op, object *originator, int dir) |
1085 |
|
|
|
1086 |
|
|
void cf_object_apply (object *op, object *author, int flags) |
1087 |
|
|
|
1088 |
|
|
void cf_object_apply_below (object *op) |
1089 |
|
|
|
1090 |
|
|
void cf_object_remove (object *op) |
1091 |
|
|
|
1092 |
|
|
void cf_object_free (object *op) |
1093 |
|
|
|
1094 |
|
|
object *cf_object_present_archname_inside (object *op, char *whatstr) |
1095 |
|
|
|
1096 |
|
|
int cf_object_transfer (object *op, int x, int y, int r, object *orig) |
1097 |
|
|
|
1098 |
|
|
int cf_object_change_map (object *op, int x, int y, mapstruct *map) |
1099 |
|
|
|
1100 |
|
|
object *cf_object_clone (object *op, int clonetype) |
1101 |
|
|
|
1102 |
|
|
int cf_object_pay_item (object *op, object *buyer) |
1103 |
|
|
|
1104 |
|
|
int cf_object_pay_amount (object *op, double amount) |
1105 |
|
|
|
1106 |
|
|
int cf_object_cast_spell (object *caster, object *ctoo, int dir, object *sp_, char *flags) |
1107 |
|
|
|
1108 |
|
|
int cf_object_cast_ability (object *caster, object *ctoo, int dir, object *sp_, char *flags) |
1109 |
|
|
|
1110 |
|
|
void cf_object_learn_spell (object *op, object *sp) |
1111 |
|
|
|
1112 |
|
|
void cf_object_forget_spell (object *op, object *sp) |
1113 |
|
|
|
1114 |
|
|
object *cf_object_check_for_spell (object *op, char *spellname) |
1115 |
|
|
|
1116 |
|
|
int cf_object_query_money (object *op) |
1117 |
root |
1.2 |
ALIAS: money = 0 |
1118 |
root |
1.1 |
|
1119 |
|
|
int cf_object_query_cost (object *op, object *who, int flags) |
1120 |
root |
1.2 |
ALIAS: cost = 0 |
1121 |
root |
1.1 |
|
1122 |
|
|
void cf_object_activate_rune (object *op , object *victim) |
1123 |
|
|
|
1124 |
|
|
int cf_object_check_trigger (object *op, object *cause) |
1125 |
|
|
|
1126 |
|
|
int cf_object_out_of_map (object *op, int x, int y) |
1127 |
|
|
|
1128 |
|
|
void cf_object_drop (object *op, object *author) |
1129 |
|
|
|
1130 |
|
|
void cf_object_take (object *op, object *author) |
1131 |
|
|
|
1132 |
|
|
void cf_object_say (object *op, char *msg) |
1133 |
|
|
|
1134 |
|
|
void cf_object_speak (object *op, char *msg) |
1135 |
|
|
|
1136 |
|
|
object *cf_object_insert_object (object *op, object *container) |
1137 |
|
|
|
1138 |
|
|
const char *cf_object_get_msg (object *ob) |
1139 |
root |
1.2 |
ALIAS: msg = 0 |
1140 |
root |
1.1 |
|
1141 |
|
|
object *cf_object_insert_in_ob (object *ob, object *where) |
1142 |
|
|
|
1143 |
|
|
int cf_object_teleport (object *op, mapstruct *map, int x, int y) |
1144 |
|
|
|
1145 |
|
|
void cf_object_update (object *op, int flags) |
1146 |
|
|
|
1147 |
|
|
void cf_object_pickup (object *op, object *what) |
1148 |
|
|
|
1149 |
|
|
char *cf_object_get_key (object *op, char *keyname) |
1150 |
root |
1.2 |
ALIAS: key = 0 |
1151 |
root |
1.1 |
|
1152 |
|
|
void cf_object_set_key (object *op, char *keyname, char *value) |
1153 |
|
|
|
1154 |
|
|
char * |
1155 |
|
|
base_name (object *ob, int plural) |
1156 |
|
|
CODE: |
1157 |
|
|
RETVAL = cf_query_base_name (ob, plural); |
1158 |
root |
1.6 |
OUTPUT: RETVAL |
1159 |
root |
1.1 |
|
1160 |
|
|
MODULE = cf PACKAGE = cf::object PREFIX = cf_object_ |
1161 |
|
|
|
1162 |
|
|
object *cf_create_object () |
1163 |
root |
1.6 |
PROTOTYPE: |
1164 |
root |
1.2 |
ALIAS: new = 0 |
1165 |
root |
1.1 |
|
1166 |
|
|
object *cf_create_object_by_name (const char *name) |
1167 |
root |
1.6 |
PROTOTYPE: $ |
1168 |
root |
1.2 |
ALIAS: new_from_name = 0 |
1169 |
root |
1.1 |
|
1170 |
|
|
void cf_free_object (object *ob) |
1171 |
|
|
|
1172 |
|
|
void cf_fix_object (object *pl) |
1173 |
|
|
|
1174 |
|
|
object *cf_insert_ob_in_ob (object *ob, object *where) |
1175 |
|
|
|
1176 |
|
|
|
1177 |
|
|
MODULE = cf PACKAGE = cf::object::player PREFIX = cf_player_ |
1178 |
|
|
|
1179 |
|
|
player *player (object *op) |
1180 |
|
|
CODE: |
1181 |
|
|
RETVAL = cf_player_find (cf_query_name (op)); |
1182 |
root |
1.6 |
OUTPUT: RETVAL |
1183 |
root |
1.1 |
|
1184 |
root |
1.6 |
void cf_player_message (object *obj, char *txt, int flags = NDI_ORANGE | NDI_UNIQUE) |
1185 |
root |
1.1 |
|
1186 |
|
|
object *cf_player_send_inventory (object *op) |
1187 |
|
|
|
1188 |
root |
1.6 |
char *cf_player_get_ip (object *op) |
1189 |
|
|
ALIAS: ip = 0 |
1190 |
|
|
|
1191 |
|
|
object *cf_player_get_marked_item (object *op) |
1192 |
|
|
ALIAS: marked_item = 0 |
1193 |
root |
1.1 |
|
1194 |
root |
1.6 |
void cf_player_set_marked_item (object *op, object *ob) |
1195 |
|
|
|
1196 |
|
|
partylist *cf_player_get_party (object *op) |
1197 |
|
|
ALIAS: party = 0 |
1198 |
|
|
|
1199 |
|
|
void cf_player_set_party (object *op, partylist *party) |
1200 |
root |
1.1 |
|
1201 |
|
|
|
1202 |
root |
1.4 |
MODULE = cf PACKAGE = cf::object::map PREFIX = cf_ |
1203 |
root |
1.1 |
|
1204 |
root |
1.6 |
MODULE = cf PACKAGE = cf::player PREFIX = cf_player_ |
1205 |
root |
1.1 |
|
1206 |
|
|
player *cf_player_find (char *name) |
1207 |
root |
1.6 |
PROTOTYPE: $ |
1208 |
root |
1.1 |
|
1209 |
|
|
void cf_player_move (player *pl, int dir) |
1210 |
|
|
|
1211 |
root |
1.6 |
# nonstandard |
1212 |
|
|
object *ob (player *pl) |
1213 |
|
|
CODE: |
1214 |
|
|
RETVAL = pl->ob; |
1215 |
|
|
OUTPUT: RETVAL |
1216 |
root |
1.1 |
|
1217 |
root |
1.6 |
|
1218 |
|
|
MODULE = cf PACKAGE = cf::map PREFIX = cf_map_ |
1219 |
root |
1.1 |
|
1220 |
|
|
SV * |
1221 |
|
|
get_property (mapstruct *obj, int type, int idx) |
1222 |
|
|
CODE: |
1223 |
|
|
RETVAL = newSVcfapi (type, cf_map_get_property (obj, idx)); |
1224 |
root |
1.6 |
OUTPUT: RETVAL |
1225 |
root |
1.1 |
|
1226 |
root |
1.4 |
SV * |
1227 |
|
|
set_property (mapstruct *obj, int type, int idx, SV *newval) |
1228 |
|
|
CODE: |
1229 |
|
|
switch (type) |
1230 |
|
|
{ |
1231 |
|
|
case CFAPI_INT: |
1232 |
|
|
cf_map_set_int_property (obj, idx, SvIV (newval)); |
1233 |
|
|
break; |
1234 |
|
|
default: |
1235 |
|
|
croak ("unhandled type '%d' in set_property '%d'", type, idx); |
1236 |
|
|
} |
1237 |
|
|
|
1238 |
|
|
mapstruct *cf_map_get_map (char *name) |
1239 |
root |
1.6 |
PROTOTYPE: $ |
1240 |
root |
1.4 |
ALIAS: map = 0 |
1241 |
|
|
|
1242 |
|
|
mapstruct *cf_map_get_first () |
1243 |
root |
1.6 |
PROTOTYPE: |
1244 |
root |
1.4 |
ALIAS: first = 0 |
1245 |
|
|
|
1246 |
|
|
object *cf_map_insert_object_there (mapstruct *where, object *op, object *originator, int flags) |
1247 |
|
|
|
1248 |
|
|
object *cf_map_insert_object (mapstruct *where, object* op, int x, int y) |
1249 |
|
|
|
1250 |
|
|
object* cf_map_present_arch_by_name (mapstruct *map, const char* str, int nx, int ny) |
1251 |
|
|
C_ARGS: str, map, nx, ny |
1252 |
|
|
|
1253 |
|
|
#int cf_map_get_flags (mapstruct* map, mapstruct** nmap, I16 x, I16 y, I16 *nx, I16 *ny) |
1254 |
|
|
|
1255 |
|
|
|
1256 |
root |
1.1 |
|
1257 |
|
|
MODULE = cf PACKAGE = cf::arch PREFIX = cf_archetype_ |
1258 |
|
|
|
1259 |
|
|
archetype*cf_archetype_get_first() |
1260 |
root |
1.6 |
PROTOTYPE: |
1261 |
root |
1.2 |
ALIAS: first = 0 |
1262 |
root |
1.1 |
|
1263 |
root |
1.2 |
archetype *cf_archetype_get_next (archetype *arch) |
1264 |
|
|
ALIAS: next = 0 |
1265 |
root |
1.1 |
|
1266 |
root |
1.2 |
archetype *cf_archetype_get_head (archetype *arch) |
1267 |
|
|
ALIAS: head = 0 |
1268 |
root |
1.1 |
|
1269 |
|
|
archetype *cf_archetype_get_more (archetype *arch) |
1270 |
root |
1.2 |
ALIAS: more = 0 |
1271 |
root |
1.1 |
|
1272 |
root |
1.2 |
const char *cf_archetype_get_name (archetype *arch) |
1273 |
|
|
ALIAS: name = 0 |
1274 |
root |
1.1 |
|
1275 |
|
|
MODULE = cf PACKAGE = cf::party PREFIX = cf_party_ |
1276 |
|
|
|
1277 |
|
|
partylist *cf_party_get_first () |
1278 |
root |
1.6 |
PROTOTYPE: |
1279 |
root |
1.1 |
ALIAS: first = 0 |
1280 |
|
|
|
1281 |
|
|
partylist *cf_party_get_next (partylist *party) |
1282 |
|
|
ALIAS: next = 0 |
1283 |
|
|
|
1284 |
root |
1.6 |
const char *cf_party_get_name (partylist *party) |
1285 |
|
|
|
1286 |
root |
1.1 |
const char *cf_party_get_password (partylist *party) |
1287 |
|
|
ALIAS: password = 0 |
1288 |
|
|
|
1289 |
|
|
player *cf_party_get_first_player (partylist *party) |
1290 |
|
|
ALIAS: first_player = 0 |
1291 |
|
|
|
1292 |
|
|
player *cf_party_get_next_player (partylist *party, player *op) |
1293 |
|
|
ALIAS: next_player = 0 |
1294 |
|
|
|
1295 |
|
|
|
1296 |
|
|
MODULE = cf PACKAGE = cf::region PREFIX = cf_region_ |
1297 |
|
|
|
1298 |
|
|
region *cf_region_get_first () |
1299 |
root |
1.6 |
PROTOTYPE: |
1300 |
root |
1.1 |
ALIAS: first = 0 |
1301 |
|
|
|
1302 |
|
|
const char *cf_region_get_name (region *reg) |
1303 |
|
|
ALIAS: name = 0 |
1304 |
|
|
|
1305 |
|
|
region *cf_region_get_next (region *reg) |
1306 |
|
|
ALIAS: next = 0 |
1307 |
|
|
|
1308 |
|
|
region *cf_region_get_parent (region *reg) |
1309 |
|
|
ALIAS: parent = 0 |
1310 |
|
|
|
1311 |
|
|
const char *cf_region_get_longname (region *reg) |
1312 |
|
|
ALIAS: longname = 0 |
1313 |
|
|
|
1314 |
|
|
const char *cf_region_get_message (region *reg) |
1315 |
|
|
ALIAS: message = 0 |
1316 |
|
|
|
1317 |
|
|
|