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.127 by root, Thu Jan 4 20:15:16 2007 UTC vs.
Revision 1.128 by root, Sun Jan 7 02:39:14 2007 UTC

336inline void sv_to (SV *sv, client * &v) { v = (client *)(attachable *)SvPTR_ornull (sv, "cf::client"); } 336inline void sv_to (SV *sv, client * &v) { v = (client *)(attachable *)SvPTR_ornull (sv, "cf::client"); }
337inline void sv_to (SV *sv, player * &v) { v = (player *)(attachable *)SvPTR_ornull (sv, "cf::player"); } 337inline void sv_to (SV *sv, player * &v) { v = (player *)(attachable *)SvPTR_ornull (sv, "cf::player"); }
338inline void sv_to (SV *sv, object * &v) { v = (object *)(attachable *)SvPTR_ornull (sv, "cf::object"); } 338inline void sv_to (SV *sv, object * &v) { v = (object *)(attachable *)SvPTR_ornull (sv, "cf::object"); }
339inline void sv_to (SV *sv, archetype * &v) { v = (archetype *)(attachable *)SvPTR_ornull (sv, "cf::arch"); } 339inline void sv_to (SV *sv, archetype * &v) { v = (archetype *)(attachable *)SvPTR_ornull (sv, "cf::arch"); }
340inline void sv_to (SV *sv, maptile * &v) { v = (maptile *)(attachable *)SvPTR_ornull (sv, "cf::map"); } 340inline void sv_to (SV *sv, maptile * &v) { v = (maptile *)(attachable *)SvPTR_ornull (sv, "cf::map"); }
341inline void sv_to (SV *sv, attachable * &v) { v = (attachable *)SvPTR_ornull (sv, "cf::attachable"); }
341inline void sv_to (SV *sv, partylist * &v) { v = (partylist *)SvPTR_ornull (sv, "cf::party"); } 342inline void sv_to (SV *sv, partylist * &v) { v = (partylist *)SvPTR_ornull (sv, "cf::party"); }
342inline void sv_to (SV *sv, region * &v) { v = (region *)SvPTR_ornull (sv, "cf::region"); } 343inline void sv_to (SV *sv, region * &v) { v = (region *)SvPTR_ornull (sv, "cf::region"); }
343inline void sv_to (SV *sv, living * &v) { v = (living *)SvPTR_ornull (sv, "cf::living"); } 344inline void sv_to (SV *sv, living * &v) { v = (living *)SvPTR_ornull (sv, "cf::living"); }
344 345
345inline void sv_to (SV *sv, New_Face * &v) { v = &new_faces[FindFace (SvPV_nolen (sv), 0)]; } //TODO 346inline void sv_to (SV *sv, New_Face * &v) { v = &new_faces[FindFace (SvPV_nolen (sv), 0)]; } //TODO
1478 const_iv (ST_SETUP) 1479 const_iv (ST_SETUP)
1479 const_iv (ST_PLAYING) 1480 const_iv (ST_PLAYING)
1480 const_iv (ST_CUSTOM) 1481 const_iv (ST_CUSTOM)
1481 1482
1482 const_iv (ST_CHANGE_CLASS) 1483 const_iv (ST_CHANGE_CLASS)
1483 const_iv (ST_CONFIRM_QUIT)
1484 const_iv (ST_GET_PARTY_PASSWORD)
1485 1484
1486 const_iv (IO_HEADER) 1485 const_iv (IO_HEADER)
1487 const_iv (IO_OBJECTS) 1486 const_iv (IO_OBJECTS)
1488 const_iv (IO_UNIQUES) 1487 const_iv (IO_UNIQUES)
1489 1488
1543 1542
1544void _global_reattach () 1543void _global_reattach ()
1545 CODE: 1544 CODE:
1546{ 1545{
1547 // reattach to all attachable objects in the game. 1546 // reattach to all attachable objects in the game.
1548 for (sockvec::iterator i = clients.begin (); i != clients.end (); ++i) 1547 for_all_clients (ns)
1549 (*i)->reattach (); 1548 ns->reattach ();
1550 1549
1551 for_all_players (pl) 1550 for_all_players (pl)
1552 pl->reattach (); 1551 pl->reattach ();
1553 1552
1554 //TODO 1553 //TODO
1555 //for (map_container::iterator i = maps.begin (); i != maps.end (); ++i) 1554 //for (map_container::iterator i = maps.begin (); i != maps.end (); ++i)
1556 // i->second->reattach (); 1555 // i->second->reattach ();
1557 1556
1558 for (object *op = object::first; op; op = op->next) 1557 for_all_objects (op)
1559 op->reattach (); 1558 op->reattach ();
1560} 1559}
1561 1560
1562NV floor (NV x) 1561NV floor (NV x)
1563 1562
1683 CODE: 1682 CODE:
1684 RETVAL = SvROK (obj) && mg_find (SvRV (obj), PERL_MAGIC_ext); 1683 RETVAL = SvROK (obj) && mg_find (SvRV (obj), PERL_MAGIC_ext);
1685 OUTPUT: 1684 OUTPUT:
1686 RETVAL 1685 RETVAL
1687 1686
1688#bool 1687INCLUDE: $PERL genacc attachable ../include/cfperl.h |
1689#destroyed (attachable *at)
1690#
1691#void
1692#destroy (attachable *at)
1693 1688
1694MODULE = cf PACKAGE = cf::global 1689MODULE = cf PACKAGE = cf::global
1695 1690
1696int invoke (SV *klass, int event, ...) 1691int invoke (SV *klass, int event, ...)
1697 CODE: 1692 CODE:
2000 CODE: 1995 CODE:
2001 pl->ob->stats.hp = pl->ob->stats.maxhp; 1996 pl->ob->stats.hp = pl->ob->stats.maxhp;
2002 pl->ob->stats.sp = pl->ob->stats.maxsp; 1997 pl->ob->stats.sp = pl->ob->stats.maxsp;
2003 pl->ob->stats.grace = pl->ob->stats.maxgrace; 1998 pl->ob->stats.grace = pl->ob->stats.maxgrace;
2004 pl->orig_stats = pl->ob->stats; 1999 pl->orig_stats = pl->ob->stats;
2005
2006player *cf_player_find (char *name)
2007 PROTOTYPE: $
2008 2000
2009void cf_player_move (player *pl, int dir) 2001void cf_player_move (player *pl, int dir)
2010 2002
2011void play_sound_player_only (player *pl, int soundnum, int x = 0, int y = 0); 2003void play_sound_player_only (player *pl, int soundnum, int x = 0, int y = 0);
2012 2004
2058 if (y) sv_to (y, pl->bed_y); 2050 if (y) sv_to (y, pl->bed_y);
2059 2051
2060void 2052void
2061list () 2053list ()
2062 PPCODE: 2054 PPCODE:
2063 for (player *pl = first_player; pl; pl = pl->next) 2055 for_all_players (pl)
2064 XPUSHs (sv_2mortal (to_sv (pl))); 2056 XPUSHs (sv_2mortal (to_sv (pl)));
2065 2057
2066bool 2058bool
2067peaceful (player *pl, bool new_setting = 0) 2059peaceful (player *pl, bool new_setting = 0)
2068 PROTOTYPE: $;$ 2060 PROTOTYPE: $;$
2107 PROTOTYPE: 2099 PROTOTYPE:
2108 CODE: 2100 CODE:
2109 RETVAL = new maptile; 2101 RETVAL = new maptile;
2110 OUTPUT: 2102 OUTPUT:
2111 RETVAL 2103 RETVAL
2112
2113void
2114maptile::destroy ()
2115 2104
2116void 2105void
2117maptile::players () 2106maptile::players ()
2118 PPCODE: 2107 PPCODE:
2119 if (GIMME_V == G_SCALAR) 2108 if (GIMME_V == G_SCALAR)
2387 char *buf = SvPVbyte (packet, len); 2376 char *buf = SvPVbyte (packet, len);
2388 2377
2389 THIS->send_packet (buf, len); 2378 THIS->send_packet (buf, len);
2390} 2379}
2391 2380
2392void
2393client::destroy ()
2394

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines