… | |
… | |
336 | inline void sv_to (SV *sv, client * &v) { v = (client *)(attachable *)SvPTR_ornull (sv, "cf::client"); } |
336 | inline void sv_to (SV *sv, client * &v) { v = (client *)(attachable *)SvPTR_ornull (sv, "cf::client"); } |
337 | inline void sv_to (SV *sv, player * &v) { v = (player *)(attachable *)SvPTR_ornull (sv, "cf::player"); } |
337 | inline void sv_to (SV *sv, player * &v) { v = (player *)(attachable *)SvPTR_ornull (sv, "cf::player"); } |
338 | inline void sv_to (SV *sv, object * &v) { v = (object *)(attachable *)SvPTR_ornull (sv, "cf::object"); } |
338 | inline void sv_to (SV *sv, object * &v) { v = (object *)(attachable *)SvPTR_ornull (sv, "cf::object"); } |
339 | inline void sv_to (SV *sv, archetype * &v) { v = (archetype *)(attachable *)SvPTR_ornull (sv, "cf::arch"); } |
339 | inline void sv_to (SV *sv, archetype * &v) { v = (archetype *)(attachable *)SvPTR_ornull (sv, "cf::arch"); } |
340 | inline void sv_to (SV *sv, maptile * &v) { v = (maptile *)(attachable *)SvPTR_ornull (sv, "cf::map"); } |
340 | inline void sv_to (SV *sv, maptile * &v) { v = (maptile *)(attachable *)SvPTR_ornull (sv, "cf::map"); } |
|
|
341 | inline void sv_to (SV *sv, attachable * &v) { v = (attachable *)SvPTR_ornull (sv, "cf::attachable"); } |
341 | inline void sv_to (SV *sv, partylist * &v) { v = (partylist *)SvPTR_ornull (sv, "cf::party"); } |
342 | inline void sv_to (SV *sv, partylist * &v) { v = (partylist *)SvPTR_ornull (sv, "cf::party"); } |
342 | inline void sv_to (SV *sv, region * &v) { v = (region *)SvPTR_ornull (sv, "cf::region"); } |
343 | inline void sv_to (SV *sv, region * &v) { v = (region *)SvPTR_ornull (sv, "cf::region"); } |
343 | inline void sv_to (SV *sv, living * &v) { v = (living *)SvPTR_ornull (sv, "cf::living"); } |
344 | inline void sv_to (SV *sv, living * &v) { v = (living *)SvPTR_ornull (sv, "cf::living"); } |
344 | |
345 | |
345 | inline void sv_to (SV *sv, New_Face * &v) { v = &new_faces[FindFace (SvPV_nolen (sv), 0)]; } //TODO |
346 | inline 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 | |
1544 | void _global_reattach () |
1543 | void _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 | |
1562 | NV floor (NV x) |
1561 | NV 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 |
1687 | INCLUDE: $PERL genacc attachable ../include/cfperl.h | |
1689 | #destroyed (attachable *at) |
|
|
1690 | # |
|
|
1691 | #void |
|
|
1692 | #destroy (attachable *at) |
|
|
1693 | |
1688 | |
1694 | MODULE = cf PACKAGE = cf::global |
1689 | MODULE = cf PACKAGE = cf::global |
1695 | |
1690 | |
1696 | int invoke (SV *klass, int event, ...) |
1691 | int 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 | |
|
|
2006 | player *cf_player_find (char *name) |
|
|
2007 | PROTOTYPE: $ |
|
|
2008 | |
2000 | |
2009 | void cf_player_move (player *pl, int dir) |
2001 | void cf_player_move (player *pl, int dir) |
2010 | |
2002 | |
2011 | void play_sound_player_only (player *pl, int soundnum, int x = 0, int y = 0); |
2003 | void 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 | |
2060 | void |
2052 | void |
2061 | list () |
2053 | list () |
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 | |
2066 | bool |
2058 | bool |
2067 | peaceful (player *pl, bool new_setting = 0) |
2059 | peaceful (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 | |
|
|
2113 | void |
|
|
2114 | maptile::destroy () |
|
|
2115 | |
2104 | |
2116 | void |
2105 | void |
2117 | maptile::players () |
2106 | maptile::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 | |
2392 | void |
|
|
2393 | client::destroy () |
|
|
2394 | |
|
|