… | |
… | |
81 | *stash_cf, |
81 | *stash_cf, |
82 | *stash_cf_object_wrap, |
82 | *stash_cf_object_wrap, |
83 | *stash_cf_object_player_wrap, |
83 | *stash_cf_object_player_wrap, |
84 | *stash_cf_player_wrap, |
84 | *stash_cf_player_wrap, |
85 | *stash_cf_map_wrap, |
85 | *stash_cf_map_wrap, |
|
|
86 | *stash_cf_mapspace_wrap, |
86 | *stash_cf_client_wrap, |
87 | *stash_cf_client_wrap, |
87 | *stash_cf_arch_wrap, |
88 | *stash_cf_arch_wrap, |
88 | *stash_cf_party_wrap, |
89 | *stash_cf_party_wrap, |
89 | *stash_cf_region_wrap, |
90 | *stash_cf_region_wrap, |
90 | *stash_cf_living_wrap; |
91 | *stash_cf_living_wrap; |
… | |
… | |
429 | inline SV *to_sv (maptile * v) { return newSVattachable (v, stash_cf_map_wrap); } |
430 | inline SV *to_sv (maptile * v) { return newSVattachable (v, stash_cf_map_wrap); } |
430 | inline SV *to_sv (archetype * v) { return newSVattachable (v, stash_cf_arch_wrap); } |
431 | inline SV *to_sv (archetype * v) { return newSVattachable (v, stash_cf_arch_wrap); } |
431 | inline SV *to_sv (region * v) { return newSVattachable (v, stash_cf_region_wrap); } |
432 | inline SV *to_sv (region * v) { return newSVattachable (v, stash_cf_region_wrap); } |
432 | inline SV *to_sv (partylist * v) { return newSVptr (v, stash_cf_party_wrap); } |
433 | inline SV *to_sv (partylist * v) { return newSVptr (v, stash_cf_party_wrap); } |
433 | inline SV *to_sv (living * v) { return newSVptr (v, stash_cf_living_wrap); } |
434 | inline SV *to_sv (living * v) { return newSVptr (v, stash_cf_living_wrap); } |
|
|
435 | inline SV *to_sv (mapspace * v) { return newSVptr (v, stash_cf_mapspace_wrap); } |
434 | |
436 | |
435 | inline SV *to_sv (object & v) { return to_sv (&v); } |
437 | inline SV *to_sv (object & v) { return to_sv (&v); } |
436 | inline SV *to_sv (living & v) { return to_sv (&v); } |
438 | inline SV *to_sv (living & v) { return to_sv (&v); } |
437 | |
439 | |
438 | inline SV *to_sv (const std::string & v) { return newSVpvn (v.data (), v.size ()); } |
440 | inline SV *to_sv (const std::string & v) { return newSVpvn (v.data (), v.size ()); } |
… | |
… | |
462 | inline void sv_to (SV *sv, maptile * &v) { v = (maptile *)(attachable *)SvPTR_ornull (sv, "cf::map"); } |
464 | inline void sv_to (SV *sv, maptile * &v) { v = (maptile *)(attachable *)SvPTR_ornull (sv, "cf::map"); } |
463 | inline void sv_to (SV *sv, region * &v) { v = (region *)(attachable *)SvPTR_ornull (sv, "cf::region"); } |
465 | inline void sv_to (SV *sv, region * &v) { v = (region *)(attachable *)SvPTR_ornull (sv, "cf::region"); } |
464 | inline void sv_to (SV *sv, attachable * &v) { v = (attachable *)SvPTR_ornull (sv, "cf::attachable"); } |
466 | inline void sv_to (SV *sv, attachable * &v) { v = (attachable *)SvPTR_ornull (sv, "cf::attachable"); } |
465 | inline void sv_to (SV *sv, partylist * &v) { v = (partylist *)SvPTR_ornull (sv, "cf::party"); } |
467 | inline void sv_to (SV *sv, partylist * &v) { v = (partylist *)SvPTR_ornull (sv, "cf::party"); } |
466 | inline void sv_to (SV *sv, living * &v) { v = (living *)SvPTR_ornull (sv, "cf::living"); } |
468 | inline void sv_to (SV *sv, living * &v) { v = (living *)SvPTR_ornull (sv, "cf::living"); } |
|
|
469 | inline void sv_to (SV *sv, mapspace * &v) { v = (mapspace *)SvPTR_ornull (sv, "cf::mapspace"); } |
467 | inline void sv_to (SV *sv, object_freezer * &v) { v = (object_freezer *)SvPTR_ornull (sv, "cf::object::freezer"); } |
470 | inline void sv_to (SV *sv, object_freezer * &v) { v = (object_freezer *)SvPTR_ornull (sv, "cf::object::freezer"); } |
468 | inline void sv_to (SV *sv, object_thawer * &v) { v = (object_thawer *)SvPTR_ornull (sv, "cf::object::thawer" ); } |
471 | inline void sv_to (SV *sv, object_thawer * &v) { v = (object_thawer *)SvPTR_ornull (sv, "cf::object::thawer" ); } |
469 | |
472 | |
470 | //inline void sv_to (SV *sv, faceinfo * &v) { v = &faces [face_find (SvPV_nolen (sv), 0)]; } |
473 | //inline void sv_to (SV *sv, faceinfo * &v) { v = &faces [face_find (SvPV_nolen (sv), 0)]; } |
471 | inline void sv_to (SV *sv, treasurelist * &v) { v = treasurelist::find (SvPV_nolen (sv)); } |
474 | inline void sv_to (SV *sv, treasurelist * &v) { v = treasurelist::find (SvPV_nolen (sv)); } |
… | |
… | |
1190 | |
1193 | |
1191 | stash_cf_object_wrap = gv_stashpv ("cf::object::wrap", 1); |
1194 | stash_cf_object_wrap = gv_stashpv ("cf::object::wrap", 1); |
1192 | stash_cf_object_player_wrap = gv_stashpv ("cf::object::player::wrap", 1); |
1195 | stash_cf_object_player_wrap = gv_stashpv ("cf::object::player::wrap", 1); |
1193 | stash_cf_player_wrap = gv_stashpv ("cf::player::wrap", 1); |
1196 | stash_cf_player_wrap = gv_stashpv ("cf::player::wrap", 1); |
1194 | stash_cf_map_wrap = gv_stashpv ("cf::map::wrap" , 1); |
1197 | stash_cf_map_wrap = gv_stashpv ("cf::map::wrap" , 1); |
|
|
1198 | stash_cf_mapspace_wrap = gv_stashpv ("cf::mapspace::wrap" , 1); |
1195 | stash_cf_client_wrap = gv_stashpv ("cf::client::wrap", 1); |
1199 | stash_cf_client_wrap = gv_stashpv ("cf::client::wrap", 1); |
1196 | stash_cf_arch_wrap = gv_stashpv ("cf::arch::wrap" , 1); |
1200 | stash_cf_arch_wrap = gv_stashpv ("cf::arch::wrap" , 1); |
1197 | stash_cf_party_wrap = gv_stashpv ("cf::party::wrap" , 1); |
1201 | stash_cf_party_wrap = gv_stashpv ("cf::party::wrap" , 1); |
1198 | stash_cf_region_wrap = gv_stashpv ("cf::region::wrap", 1); |
1202 | stash_cf_region_wrap = gv_stashpv ("cf::region::wrap", 1); |
1199 | stash_cf_living_wrap = gv_stashpv ("cf::living::wrap", 1); |
1203 | stash_cf_living_wrap = gv_stashpv ("cf::living::wrap", 1); |
… | |
… | |
1392 | const_iv (F_CURSED) const_iv (F_DAMNED) const_iv (F_OPEN) const_iv (F_NOPICK) |
1396 | const_iv (F_CURSED) const_iv (F_DAMNED) const_iv (F_OPEN) const_iv (F_NOPICK) |
1393 | const_iv (F_LOCKED) |
1397 | const_iv (F_LOCKED) |
1394 | |
1398 | |
1395 | const_iv (F_BUY) const_iv (F_SHOP) const_iv (F_SELL) |
1399 | const_iv (F_BUY) const_iv (F_SHOP) const_iv (F_SELL) |
1396 | |
1400 | |
1397 | const_iv (P_BLOCKSVIEW) const_iv (P_PLAYER) const_iv (P_NO_MAGIC) const_iv (P_IS_ALIVE) |
1401 | const_iv (P_BLOCKSVIEW) const_iv (P_NO_MAGIC) const_iv (P_IS_ALIVE) |
1398 | const_iv (P_NO_CLERIC) const_iv (P_OUT_OF_MAP) const_iv (P_NEW_MAP) const_iv (P_UPTODATE) |
1402 | const_iv (P_NO_CLERIC) const_iv (P_OUT_OF_MAP) const_iv (P_NEW_MAP) const_iv (P_UPTODATE) |
1399 | |
1403 | |
1400 | const_iv (UP_OBJ_INSERT) const_iv (UP_OBJ_REMOVE) const_iv (UP_OBJ_CHANGE) const_iv (UP_OBJ_FACE) |
1404 | const_iv (UP_OBJ_INSERT) const_iv (UP_OBJ_REMOVE) const_iv (UP_OBJ_CHANGE) const_iv (UP_OBJ_FACE) |
1401 | |
1405 | |
1402 | const_iv (INS_NO_MERGE) const_iv (INS_ABOVE_FLOOR_ONLY) const_iv (INS_NO_WALK_ON) |
1406 | const_iv (INS_NO_MERGE) const_iv (INS_ABOVE_FLOOR_ONLY) const_iv (INS_NO_WALK_ON) |
… | |
… | |
2437 | PUSHs (sv_2mortal (to_sv (nmap))); |
2441 | PUSHs (sv_2mortal (to_sv (nmap))); |
2438 | PUSHs (sv_2mortal (newSViv (nx))); |
2442 | PUSHs (sv_2mortal (newSViv (nx))); |
2439 | PUSHs (sv_2mortal (newSViv (ny))); |
2443 | PUSHs (sv_2mortal (newSViv (ny))); |
2440 | } |
2444 | } |
2441 | } |
2445 | } |
|
|
2446 | |
|
|
2447 | mapspace * |
|
|
2448 | ms (maptile *map, unsigned int x, unsigned int y) |
|
|
2449 | PROTOTYPE: $$$ |
|
|
2450 | CODE: |
|
|
2451 | { |
|
|
2452 | maptile *nmap = 0; |
|
|
2453 | I16 nx, ny; |
|
|
2454 | |
|
|
2455 | PUTBACK; |
|
|
2456 | get_map_flags (map, &nmap, x, y, &nx, &ny); |
|
|
2457 | SPAGAIN; |
|
|
2458 | |
|
|
2459 | if (!nmap) |
|
|
2460 | XSRETURN_UNDEF; |
|
|
2461 | |
|
|
2462 | RETVAL = &nmap->at (nx, ny); |
|
|
2463 | } |
|
|
2464 | OUTPUT: |
|
|
2465 | RETVAL |
2442 | |
2466 | |
2443 | void |
2467 | void |
2444 | at (maptile *map, unsigned int x, unsigned int y) |
2468 | at (maptile *map, unsigned int x, unsigned int y) |
2445 | PROTOTYPE: $$$ |
2469 | PROTOTYPE: $$$ |
2446 | PPCODE: |
2470 | PPCODE: |
… | |
… | |
2574 | RETVAL = self->generate_random_map (&rmp); |
2598 | RETVAL = self->generate_random_map (&rmp); |
2575 | } |
2599 | } |
2576 | OUTPUT: |
2600 | OUTPUT: |
2577 | RETVAL |
2601 | RETVAL |
2578 | |
2602 | |
|
|
2603 | MODULE = cf PACKAGE = cf::mapspace |
|
|
2604 | |
|
|
2605 | INCLUDE: $PERL $srcdir/genacc mapspace ../include/map.h | |
|
|
2606 | |
2579 | MODULE = cf PACKAGE = cf::arch |
2607 | MODULE = cf PACKAGE = cf::arch |
2580 | |
2608 | |
2581 | int archetypes_size () |
2609 | int archetypes_size () |
2582 | CODE: |
2610 | CODE: |
2583 | RETVAL = archetypes.size (); |
2611 | RETVAL = archetypes.size (); |