… | |
… | |
477 | PUSHs (sv_2mortal (newRV_inc ((SV *)av))); |
477 | PUSHs (sv_2mortal (newRV_inc ((SV *)av))); |
478 | PUTBACK; |
478 | PUTBACK; |
479 | call_pv ("cf::object_freezer_save", G_VOID | G_DISCARD | G_EVAL); |
479 | call_pv ("cf::object_freezer_save", G_VOID | G_DISCARD | G_EVAL); |
480 | FREETMPS; |
480 | FREETMPS; |
481 | LEAVE; |
481 | LEAVE; |
|
|
482 | } |
|
|
483 | |
|
|
484 | char *object_freezer::as_string () |
|
|
485 | { |
|
|
486 | dSP; |
|
|
487 | ENTER; |
|
|
488 | SAVETMPS; |
|
|
489 | PUSHMARK (SP); |
|
|
490 | EXTEND (SP, 3); |
|
|
491 | PUSHs (sv_2mortal (newRV_noinc (newSVpvn ((char *)linearise (), size ())))); |
|
|
492 | PUSHs (sv_2mortal (newRV_inc ((SV *)av))); |
|
|
493 | PUTBACK; |
|
|
494 | |
|
|
495 | char *res = call_pv ("cf::object_freezer_as_string", G_SCALAR | G_EVAL) > 0 |
|
|
496 | ? strdup (SvPVbyte_nolen (POPs)) |
|
|
497 | : strdup ("[fatal error]"); |
|
|
498 | |
|
|
499 | FREETMPS; |
|
|
500 | LEAVE; |
|
|
501 | |
|
|
502 | return res; |
482 | } |
503 | } |
483 | |
504 | |
484 | int fprintf (object_freezer &freezer, const char *format, ...) |
505 | int fprintf (object_freezer &freezer, const char *format, ...) |
485 | { |
506 | { |
486 | va_list ap; |
507 | va_list ap; |
… | |
… | |
2226 | get_connection (maptile *map, long connection) |
2247 | get_connection (maptile *map, long connection) |
2227 | PPCODE: |
2248 | PPCODE: |
2228 | oblinkpt *obp = get_connection_links (map, connection); |
2249 | oblinkpt *obp = get_connection_links (map, connection); |
2229 | if (obp) |
2250 | if (obp) |
2230 | for (objectlink *ol = obp->link; ol; ol = ol->next) |
2251 | for (objectlink *ol = obp->link; ol; ol = ol->next) |
2231 | XPUSHs (sv_2mortal (newSVcfapi (CFAPI_POBJECT, ol->ob))); |
2252 | XPUSHs (sv_2mortal (newSVcfapi (CFAPI_POBJECT, (object *)ol->ob))); |
2232 | |
2253 | |
2233 | object *cf_map_insert_object_there (maptile *where, object *op, object *originator, int flags) |
2254 | object *cf_map_insert_object_there (maptile *where, object *op, object *originator, int flags) |
2234 | |
2255 | |
2235 | object *cf_map_insert_object (maptile *where, object* op, int x, int y) |
2256 | object *cf_map_insert_object (maptile *where, object* op, int x, int y) |
2236 | |
2257 | |