ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/cfperl.xs
(Generate patch)

Comparing deliantra/server/server/cfperl.xs (file contents):
Revision 1.4 by root, Mon Aug 21 07:13:32 2006 UTC vs.
Revision 1.5 by root, Thu Aug 24 13:13:49 2006 UTC

457 457
458 PL_exit_flags |= PERL_EXIT_DESTRUCT_END; 458 PL_exit_flags |= PERL_EXIT_DESTRUCT_END;
459 459
460 if (perl_parse (perl, xs_init, 2, argv, (char **)NULL) || perl_run (perl)) 460 if (perl_parse (perl, xs_init, 2, argv, (char **)NULL) || perl_run (perl))
461 { 461 {
462 printf ("unable to initialize perl-interpreter, continuing without.\n"); 462 printf ("unable to initialize perl-interpreter, aborting.\n");
463 463
464 exit (EXIT_FAILURE);
464 perl_destruct (perl); 465 //perl_destruct (perl);
465 perl_free (perl); 466 //perl_free (perl);
466 perl = 0; 467 //perl = 0;
467 } 468 }
468 else 469 else
469 { 470 {
470 obj_cache = newHV (); 471 obj_cache = newHV ();
471 } 472 }
712 } 713 }
713 714
714 return 0; 715 return 0;
715} 716}
716 717
717void cfperl_sleep (double delta) 718void cfperl_main ()
718{ 719{
719 dSP; 720 dSP;
720 ENTER;
721 SAVETMPS;
722 721
723 PUSHMARK (SP); 722 PUSHMARK (SP);
724 XPUSHs (sv_2mortal (newSVnv (delta)));
725 PUTBACK; 723 PUTBACK;
726 call_pv ("cf::sleep_delta", G_DISCARD | G_VOID | G_EVAL); 724 call_pv ("cf::run", G_DISCARD | G_VOID);
727 SPAGAIN; 725 SPAGAIN;
728 726 PUTBACK;
729 FREETMPS;
730 LEAVE;
731} 727}
732 728
733MODULE = cf PACKAGE = cf PREFIX = cf_ 729MODULE = cf PACKAGE = cf PREFIX = cf_
734 730
735BOOT: 731BOOT:
744 const_iv (llevError) 740 const_iv (llevError)
745 const_iv (llevInfo) 741 const_iv (llevInfo)
746 const_iv (llevDebug) 742 const_iv (llevDebug)
747 const_iv (llevMonster) 743 const_iv (llevMonster)
748 744
745 const_iv (MAX_TIME)
749 const_iv (PLAYER) 746 const_iv (PLAYER)
750 const_iv (TRANSPORT) 747 const_iv (TRANSPORT)
751 const_iv (ROD) 748 const_iv (ROD)
752 const_iv (TREASURE) 749 const_iv (TREASURE)
753 const_iv (POTION) 750 const_iv (POTION)
1416 1413
1417NV floor (NV x) 1414NV floor (NV x)
1418 1415
1419NV ceil (NV x) 1416NV ceil (NV x)
1420 1417
1418void server_tick ()
1419
1421void 1420void
1422LOG (int level, char *msg) 1421LOG (int level, char *msg)
1423 PROTOTYPE: $$ 1422 PROTOTYPE: $$
1424 C_ARGS: (LogLevel)level, "%s", msg 1423 C_ARGS: (LogLevel)level, "%s", msg
1425 1424

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines