… | |
… | |
627 | PL_exit_flags |= PERL_EXIT_DESTRUCT_END; |
627 | PL_exit_flags |= PERL_EXIT_DESTRUCT_END; |
628 | |
628 | |
629 | const char *argv[] = { |
629 | const char *argv[] = { |
630 | settings.argv [0], |
630 | settings.argv [0], |
631 | "-e" |
631 | "-e" |
632 | "use EV; use Coro;" // required for bootstrap |
632 | "use EV ();" |
633 | "cf->bootstrap;" // required for datadir :*> |
633 | "use Coro ();" |
|
|
634 | "cf->bootstrap;" |
634 | "unshift @INC, cf::datadir ();" |
635 | "unshift @INC, cf::datadir ();" |
635 | "require cf;" |
636 | "require cf;" |
636 | }; |
637 | }; |
637 | |
638 | |
638 | if (perl_parse (perl, xs_init, 2, (char **)argv, environ) |
639 | if (perl_parse (perl, xs_init, 2, (char **)argv, environ) |
639 | || perl_run (perl)) |
640 | || perl_run (perl)) |
640 | { |
641 | { |
641 | printf ("unable to initialize perl-interpreter, aborting.\n"); |
642 | printf ("unable to initialize perl-interpreter, aborting.\n"); |
642 | exit (EXIT_FAILURE); |
643 | exit (EXIT_FAILURE); |
643 | } |
644 | } |
644 | |
|
|
645 | { |
|
|
646 | dSP; |
|
|
647 | |
|
|
648 | PUSHMARK (SP); |
|
|
649 | PUTBACK; |
|
|
650 | call_pv ("cf::init", G_DISCARD | G_VOID); |
|
|
651 | } |
|
|
652 | } |
645 | } |
653 | |
646 | |
654 | void cfperl_main () |
647 | void cfperl_main () |
655 | { |
648 | { |
656 | dSP; |
649 | dSP; |
… | |
… | |
1521 | f (GvGP (gv)->gp_cv); |
1514 | f (GvGP (gv)->gp_cv); |
1522 | GvCVGEN (gv) = 0; |
1515 | GvCVGEN (gv) = 0; |
1523 | GvMULTI_off (gv); |
1516 | GvMULTI_off (gv); |
1524 | # undef f |
1517 | # undef f |
1525 | |
1518 | |
1526 | |
|
|
1527 | void _connect_to_perl () |
1519 | void _connect_to_perl () |
1528 | |
1520 | |
1529 | void _recalc_want () |
1521 | void _recalc_want () |
1530 | |
1522 | |
1531 | void _global_reattach () |
1523 | void _global_reattach () |
… | |
… | |
1578 | len -= 3; |
1570 | len -= 3; |
1579 | } |
1571 | } |
1580 | |
1572 | |
1581 | SvCUR_set (data_sv, dst - SvPVX (data_sv)); |
1573 | SvCUR_set (data_sv, dst - SvPVX (data_sv)); |
1582 | } |
1574 | } |
|
|
1575 | |
|
|
1576 | void init_anim () |
|
|
1577 | |
|
|
1578 | void init_globals () |
|
|
1579 | |
|
|
1580 | void init_experience () |
|
|
1581 | |
|
|
1582 | void init_attackmess () |
|
|
1583 | |
|
|
1584 | void init_dynamic () |
|
|
1585 | |
|
|
1586 | void init_block () |
|
|
1587 | |
|
|
1588 | void load_settings () |
|
|
1589 | |
|
|
1590 | void load_materials () |
|
|
1591 | |
|
|
1592 | void init_uuid () |
|
|
1593 | CODE: |
|
|
1594 | UUID::init (); |
|
|
1595 | |
|
|
1596 | void init_signals () |
|
|
1597 | |
|
|
1598 | void init_commands () |
|
|
1599 | |
|
|
1600 | void init_skills () |
|
|
1601 | |
|
|
1602 | void init_beforeplay () |
1583 | |
1603 | |
1584 | void evthread_start (int aiofd) |
1604 | void evthread_start (int aiofd) |
1585 | |
1605 | |
1586 | void cede_to_tick () |
1606 | void cede_to_tick () |
1587 | CODE: |
1607 | CODE: |