… | |
… | |
1649 | |
1649 | |
1650 | void cleanup (const char *cause, bool make_core = false) |
1650 | void cleanup (const char *cause, bool make_core = false) |
1651 | |
1651 | |
1652 | void emergency_save () |
1652 | void emergency_save () |
1653 | |
1653 | |
|
|
1654 | void _exit (int status = EXIT_SUCCESS) |
|
|
1655 | |
1654 | UV sv_2watcher (SV *w) |
1656 | UV sv_2watcher (SV *w) |
1655 | CODE: |
1657 | CODE: |
1656 | RETVAL = (UV)GEventAPI->sv_2watcher (w); |
1658 | RETVAL = (UV)GEventAPI->sv_2watcher (w); |
1657 | OUTPUT: |
1659 | OUTPUT: |
1658 | RETVAL |
1660 | RETVAL |
1659 | |
|
|
1660 | void _exit (int status = 0) |
|
|
1661 | |
1661 | |
1662 | #if _POSIX_MEMLOCK |
1662 | #if _POSIX_MEMLOCK |
1663 | |
1663 | |
1664 | int mlockall (int flags = MCL_CURRENT | MCL_FUTURE) |
1664 | int mlockall (int flags = MCL_CURRENT | MCL_FUTURE) |
1665 | |
1665 | |
… | |
… | |
2141 | EXTEND (SP, THIS->players); |
2141 | EXTEND (SP, THIS->players); |
2142 | for_all_players (pl) |
2142 | for_all_players (pl) |
2143 | if (pl->ob && pl->ob->map == THIS) |
2143 | if (pl->ob && pl->ob->map == THIS) |
2144 | PUSHs (sv_2mortal (to_sv (pl->ob))); |
2144 | PUSHs (sv_2mortal (to_sv (pl->ob))); |
2145 | } |
2145 | } |
|
|
2146 | |
|
|
2147 | void |
|
|
2148 | maptile::set_regiondata (SV *data, SV *plt) |
|
|
2149 | CODE: |
|
|
2150 | { |
|
|
2151 | if (!SvROK (plt) || SvTYPE (SvRV (plt)) != SVt_PVAV) |
|
|
2152 | croak ("maptile::set_regiondata needs arrayref as plt arg"); |
|
|
2153 | |
|
|
2154 | AV *av = (AV *)SvRV (plt); |
|
|
2155 | |
|
|
2156 | region **regionmap = (region **)malloc ((av_len (av) + 1) * sizeof (region *)); |
|
|
2157 | |
|
|
2158 | for (int i = av_len (av); i; --i) |
|
|
2159 | regionmap [i] = region::find (SvPVutf8_nolen (*av_fetch (av, i, 1))); |
|
|
2160 | |
|
|
2161 | THIS->regions = salloc<uint8_t> (THIS->size (), (uint8_t *)SvPVbyte_nolen (data)); |
|
|
2162 | THIS->regionmap = regionmap; |
|
|
2163 | } |
2146 | |
2164 | |
2147 | void play_sound_map (maptile *map, int x, int y, int sound_num) |
2165 | void play_sound_map (maptile *map, int x, int y, int sound_num) |
2148 | |
2166 | |
2149 | int out_of_map (maptile *map, int x, int y) |
2167 | int out_of_map (maptile *map, int x, int y) |
2150 | |
2168 | |
… | |
… | |
2363 | OUTPUT: RETVAL |
2381 | OUTPUT: RETVAL |
2364 | |
2382 | |
2365 | region *find (char *name) |
2383 | region *find (char *name) |
2366 | PROTOTYPE: $ |
2384 | PROTOTYPE: $ |
2367 | CODE: |
2385 | CODE: |
2368 | RETVAL = get_region_by_name (name); |
2386 | RETVAL = region::find (name); |
2369 | OUTPUT: RETVAL |
2387 | OUTPUT: RETVAL |
2370 | |
2388 | |
2371 | INCLUDE: $PERL genacc region ../include/map.h | |
2389 | INCLUDE: $PERL genacc region ../include/map.h | |
2372 | |
2390 | |
2373 | MODULE = cf PACKAGE = cf::living |
2391 | MODULE = cf PACKAGE = cf::living |