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.184 by root, Tue Apr 10 09:35:24 2007 UTC vs.
Revision 1.185 by root, Thu Apr 12 14:18:05 2007 UTC

2522 THIS->send_packet (buf, len); 2522 THIS->send_packet (buf, len);
2523} 2523}
2524 2524
2525MODULE = cf PACKAGE = cf::face PREFIX = face_ 2525MODULE = cf PACKAGE = cf::face PREFIX = face_
2526 2526
2527INCLUDE: $PERL $srcdir/genacc faceset ../include/face.h | 2527#INCLUDE: $PERL $srcdir/genacc faceset ../include/face.h |
2528 2528
2529faceidx face_find (utf8_string name, faceidx defidx = 0) 2529faceidx face_find (utf8_string name, faceidx defidx = 0)
2530 2530
2531faceidx alloc (utf8_string name) 2531faceidx alloc (utf8_string name)
2532 CODE: 2532 CODE:
2597 { 2597 {
2598 ns->faces_sent.reset (); 2598 ns->faces_sent.reset ();
2599 ns->force_newmap = true; 2599 ns->force_newmap = true;
2600 } 2600 }
2601 2601
2602MODULE = cf PACKAGE = cf::anim PREFIX = anim_
2603
2604#INCLUDE: $PERL $srcdir/genacc faceset ../include/anim.h |
2605
2606animidx anim_find (utf8_string name)
2607 CODE:
2608 RETVAL = animation::find (name).number;
2609 OUTPUT: RETVAL
2610
2611animidx set (utf8_string name, SV *frames, int facings = 1)
2612 CODE:
2613{
2614 if (!SvROK (frames) && SvTYPE (SvRV (frames)) != SVt_PVAV)
2615 croak ("frames must be an arrayref");
2616
2617 AV *av = (AV *)SvRV (frames);
2618
2619 animation *anim = &animation::find (name);
2620 if (anim->number)
2621 {
2622 anim->resize (av_len (av) + 1);
2623 anim->facings = facings;
2624 }
2625 else
2626 anim = &animation::create (name, av_len (av) + 1, facings);
2627
2628 for (int i = 0; i < anim->num_animations; ++i)
2629 anim->faces [i] = face_find (SvPVutf8_nolen (*av_fetch (av, i, 1)));
2630}
2631 OUTPUT: RETVAL
2632
2633void invalidate_all ()
2634 CODE:
2635 for_all_clients (ns)
2636 ns->anims_sent.reset ();
2637

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines