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