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.421 by root, Sun Nov 11 05:53:12 2012 UTC vs.
Revision 1.422 by root, Wed Nov 14 02:22:04 2012 UTC

2936 XPUSHs (sv_2mortal (newSVpv_utf8 (self->get_str ()))); 2936 XPUSHs (sv_2mortal (newSVpv_utf8 (self->get_str ())));
2937 2937
2938 self->skip (); 2938 self->skip ();
2939 } 2939 }
2940 2940
2941MODULE = cf PACKAGE = cf::treasurelist
2942
2943# quick hack, because I didn't want to implement accessors for treasurelist.
2944# this asks for even more autogen, actually.
2945
2946void
2947expand (treasurelist *list)
2948 PPCODE:
2949 EXTEND (SP, 3);
2950 PUSHs (sv_2mortal (to_sv (list->name)));
2951 PUSHs (sv_2mortal (to_sv (list->total_chance)));
2952 AV *av = newAV ();
2953 PUSHs (sv_2mortal (newRV_noinc ((SV *)av)));
2954 for (treasure *item = list->items; item; item = item->next)
2955 {
2956 AV *iav = newAV ();
2957 av_push (av, newRV_noinc ((SV *)iav));
2958
2959 av_extend (iav, 7);
2960 av_push (iav, to_sv (item->item));
2961 av_push (iav, to_sv (item->name));
2962 av_push (iav, to_sv (item->change_arch.name));
2963 av_push (iav, to_sv (item->change_arch.title));
2964 av_push (iav, to_sv (item->change_arch.slaying));
2965 av_push (iav, to_sv (item->chance));
2966 av_push (iav, to_sv (item->nrof));
2967 av_push (iav, to_sv (item->magic));
2968 }
2969
2941MODULE = cf PACKAGE = cf::layout 2970MODULE = cf PACKAGE = cf::layout
2942 2971
2943INCLUDE: $PERL $srcdir/genacc layout $srcdir/../include/rmg.h | 2972INCLUDE: $PERL $srcdir/genacc layout $srcdir/../include/rmg.h |
2944 2973

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines