… | |
… | |
31 | #include <cstdarg> |
31 | #include <cstdarg> |
32 | #include <sproto.h> |
32 | #include <sproto.h> |
33 | |
33 | |
34 | #include "cfperl.h" |
34 | #include "cfperl.h" |
35 | #include "shstr.h" |
35 | #include "shstr.h" |
|
|
36 | |
|
|
37 | #include <unistd.h> |
|
|
38 | #if _POSIX_MEMLOCK |
|
|
39 | # include <sys/mman.h> |
|
|
40 | #endif |
36 | |
41 | |
37 | #include <EXTERN.h> |
42 | #include <EXTERN.h> |
38 | #include <perl.h> |
43 | #include <perl.h> |
39 | #include <XSUB.h> |
44 | #include <XSUB.h> |
40 | |
45 | |
… | |
… | |
828 | CALL_CALL ("cf::map::emergency_save", G_VOID); |
833 | CALL_CALL ("cf::map::emergency_save", G_VOID); |
829 | CALL_END; |
834 | CALL_END; |
830 | } |
835 | } |
831 | |
836 | |
832 | maptile * |
837 | maptile * |
833 | maptile::load_map_sync (const char *path, maptile *origin) |
838 | maptile::find_sync (const char *path, maptile *origin) |
834 | { |
839 | { |
835 | CALL_BEGIN (2); |
840 | CALL_BEGIN (2); |
836 | CALL_ARG (path); |
841 | CALL_ARG (path); |
837 | CALL_ARG (origin); |
842 | CALL_ARG (origin); |
838 | CALL_CALL ("cf::map::load_map_sync", G_SCALAR); |
843 | CALL_CALL ("cf::map::find_sync", G_SCALAR); |
839 | |
844 | |
840 | maptile *retval; |
845 | maptile *retval; |
841 | |
846 | |
842 | if (count) |
847 | if (count) |
843 | sv_to (POPs, retval); |
848 | sv_to (POPs, retval); |
… | |
… | |
845 | retval = 0; |
850 | retval = 0; |
846 | |
851 | |
847 | CALL_END; |
852 | CALL_END; |
848 | |
853 | |
849 | return retval; |
854 | return retval; |
|
|
855 | } |
|
|
856 | |
|
|
857 | void |
|
|
858 | maptile::do_load_sync () |
|
|
859 | { |
|
|
860 | CALL_BEGIN (1); |
|
|
861 | CALL_ARG (this); |
|
|
862 | CALL_CALL ("cf::map::do_load_sync", G_SCALAR); |
|
|
863 | CALL_END; |
850 | } |
864 | } |
851 | |
865 | |
852 | void |
866 | void |
853 | maptile::change_all_map_light (int change) |
867 | maptile::change_all_map_light (int change) |
854 | { |
868 | { |
… | |
… | |
1603 | |
1617 | |
1604 | void emergency_save () |
1618 | void emergency_save () |
1605 | |
1619 | |
1606 | void _exit (int status = 0) |
1620 | void _exit (int status = 0) |
1607 | |
1621 | |
|
|
1622 | #if _POSIX_MEMLOCK |
|
|
1623 | |
|
|
1624 | int mlockall (int flags = MCL_CURRENT | MCL_FUTURE) |
|
|
1625 | |
|
|
1626 | int munlockall () |
|
|
1627 | |
|
|
1628 | #endif |
|
|
1629 | |
1608 | int find_animation (char *text) |
1630 | int find_animation (char *text) |
1609 | PROTOTYPE: $ |
1631 | PROTOTYPE: $ |
1610 | |
1632 | |
1611 | int random_roll (int min, int max, object *op, int goodbad); |
1633 | int random_roll (int min, int max, object *op, int goodbad); |
1612 | |
1634 | |