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.391 by root, Sat Jul 3 01:49:18 2010 UTC vs.
Revision 1.394 by root, Mon Oct 11 18:40:44 2010 UTC

28 28
29#include <cstdarg> 29#include <cstdarg>
30#include <typeinfo> 30#include <typeinfo>
31 31
32#include "global.h" 32#include "global.h"
33#include "../random_maps/random_map.h" 33#include "rmg.h"
34#include "evthread.h" 34#include "evthread.h"
35#include "sproto.h" 35#include "sproto.h"
36 36
37#include <unistd.h> 37#include <unistd.h>
38#if _POSIX_MEMLOCK 38#if _POSIX_MEMLOCK
1459# include "attackinc.h" 1459# include "attackinc.h"
1460# undef def 1460# undef def
1461# define def(uc, flags) const_iv (SK_ ## uc) 1461# define def(uc, flags) const_iv (SK_ ## uc)
1462# include "skillinc.h" 1462# include "skillinc.h"
1463# undef def 1463# undef def
1464# define def(name, use, nonuse) const_iv (body_ ## name)
1465# include "slotinc.h"
1466# undef def
1464 1467
1465 const_iv (Map0Cmd) const_iv (Map1Cmd) const_iv (Map1aCmd) 1468 const_iv (Map0Cmd) const_iv (Map1Cmd) const_iv (Map1aCmd)
1466 1469
1467 const_iv (MAP_CLIENT_X) const_iv (MAP_CLIENT_Y) 1470 const_iv (MAP_CLIENT_X) const_iv (MAP_CLIENT_Y)
1468 1471
1825int exp_to_level (val64 exp) 1828int exp_to_level (val64 exp)
1826 1829
1827val64 level_to_min_exp (int level) 1830val64 level_to_min_exp (int level)
1828 1831
1829SV * 1832SV *
1830resistance_to_string (int atnr) 1833attacktype_name (int atnr)
1831 CODE: 1834 CODE:
1832 if (atnr >= 0 && atnr < NROFATTACKS) 1835 RETVAL = IN_RANGE_EXC (atnr, 0, NROFATTACKS)
1836 ? newSVpv (attacktype_name [atnr], 0)
1837 : &PL_sv_undef;
1838 OUTPUT: RETVAL
1839
1840SV *
1841attacktype_desc (int atnr)
1842 CODE:
1843 RETVAL = IN_RANGE_EXC (atnr, 0, NROFATTACKS)
1844 ? newSVpv (attacktype_desc [atnr], 0)
1845 : &PL_sv_undef;
1846 OUTPUT: RETVAL
1847
1848SV *
1849resist_plus (int atnr)
1850 CODE:
1851 RETVAL = IN_RANGE_EXC (atnr, 0, NROFATTACKS)
1833 RETVAL = newSVpv (resist_plus[atnr], 0); 1852 ? newSVpv (resist_plus [atnr], 0)
1834 else 1853 : &PL_sv_undef;
1835 XSRETURN_UNDEF; 1854 OUTPUT: RETVAL
1855
1856SV *
1857change_resist_msg (int atnr)
1858 CODE:
1859 RETVAL = IN_RANGE_EXC (atnr, 0, NROFATTACKS)
1860 ? newSVpv (change_resist_msg [atnr], 0)
1861 : &PL_sv_undef;
1836 OUTPUT: RETVAL 1862 OUTPUT: RETVAL
1837 1863
1838UUID 1864UUID
1839uuid_cur () 1865uuid_cur ()
1840 CODE: 1866 CODE:
1963int mortals_size () 1989int mortals_size ()
1964 CODE: 1990 CODE:
1965 RETVAL = attachable::mortals.size (); 1991 RETVAL = attachable::mortals.size ();
1966 OUTPUT: RETVAL 1992 OUTPUT: RETVAL
1967 1993
1968const_utf8_string slot_use_name (U32 slot) 1994const_utf8_string slot_name (U32 slot)
1969 ALIAS: 1995 ALIAS:
1996 slot_name = 0
1997 slot_use_name = 1
1970 slot_nonuse_name = 1 1998 slot_nonuse_name = 2
1971 CODE: 1999 CODE:
1972{ 2000{
1973 if (slot >= NUM_BODY_LOCATIONS) 2001 if (slot >= NUM_BODY_LOCATIONS)
1974 croak ("body slot index out of range"); 2002 croak ("body slot index out of range");
1975 2003
1976 switch (ix) 2004 switch (ix)
1977 { 2005 {
2006 case 0: RETVAL = body_locations[slot].name ; break;
1978 case 0: RETVAL = body_locations[slot].use_name; break; 2007 case 1: RETVAL = body_locations[slot].use_name ; break;
1979 case 1: RETVAL = body_locations[slot].nonuse_name; break; 2008 case 2: RETVAL = body_locations[slot].nonuse_name; break;
1980 } 2009 }
1981} 2010}
1982 OUTPUT: 2011 OUTPUT:
1983 RETVAL 2012 RETVAL
1984 2013
2723 2752
2724void set_data (faceidx idx, int faceset, SV *data, SV *chksum) 2753void set_data (faceidx idx, int faceset, SV *data, SV *chksum)
2725 CODE: 2754 CODE:
2726{ 2755{
2727 faceinfo *f = face_info (idx); assert (f); 2756 faceinfo *f = face_info (idx); assert (f);
2728 facedata *d = &(faceset ? f->data64 : f->data32); 2757 facedata *d = f->face + faceset;
2729 sv_to (data, d->data); 2758 sv_to (data, d->data);
2730 STRLEN clen; 2759 STRLEN clen;
2731 char *cdata = SvPVbyte (chksum, clen); 2760 char *cdata = SvPVbyte (chksum, clen);
2732 clen = min (CHKSUM_MAXLEN, clen); 2761 clen = min (CHKSUM_MAXLEN, clen);
2733 2762
2887 self->skip (); 2916 self->skip ();
2888 } 2917 }
2889 2918
2890MODULE = cf PACKAGE = cf::layout 2919MODULE = cf PACKAGE = cf::layout
2891 2920
2892INCLUDE: $PERL $srcdir/genacc layout $srcdir/../random_maps/random_map.h | 2921INCLUDE: $PERL $srcdir/genacc layout $srcdir/../include/rmg.h |
2893 2922

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines