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.237 by root, Mon Jul 23 23:46:03 2007 UTC vs.
Revision 1.240 by root, Thu Jul 26 21:44:43 2007 UTC

1521 const_iv (SYMMETRY_Y) const_iv (SYMMETRY_XY) 1521 const_iv (SYMMETRY_Y) const_iv (SYMMETRY_XY)
1522 1522
1523 const_iv (GT_ENVIRONMENT) const_iv (GT_INVISIBLE) const_iv (GT_STARTEQUIP) 1523 const_iv (GT_ENVIRONMENT) const_iv (GT_INVISIBLE) const_iv (GT_STARTEQUIP)
1524 const_iv (GT_APPLY) const_iv (GT_ONLY_GOOD) const_iv (GT_UPDATE_INV) 1524 const_iv (GT_APPLY) const_iv (GT_ONLY_GOOD) const_iv (GT_UPDATE_INV)
1525 const_iv (GT_MINIMAL) 1525 const_iv (GT_MINIMAL)
1526
1527 const_iv (FT_FACE) const_iv (FT_MUSIC) const_iv (FT_SOUND)
1528 const_iv (FT_RSRC) const_iv (FT_NUM)
1526 }; 1529 };
1527 1530
1528 for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ-- > const_iv; ) 1531 for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ-- > const_iv; )
1529 newCONSTSUB (stash_cf, (char *)civ->name, newSViv (civ->iv)); 1532 newCONSTSUB (stash_cf, (char *)civ->name, newSViv (civ->iv));
1530 1533
1673octet_string path_combine (octet_string base, octet_string path) 1676octet_string path_combine (octet_string base, octet_string path)
1674 PROTOTYPE: $$ 1677 PROTOTYPE: $$
1675 1678
1676octet_string path_combine_and_normalize (octet_string base, octet_string path) 1679octet_string path_combine_and_normalize (octet_string base, octet_string path)
1677 PROTOTYPE: $$ 1680 PROTOTYPE: $$
1678
1679const_octet_string
1680get_maps_directory (octet_string path)
1681 PROTOTYPE: $
1682 ALIAS: maps_directory = 0
1683 CODE:
1684 RETVAL = create_pathname (path);
1685 OUTPUT: RETVAL
1686 1681
1687void 1682void
1688sub_generation_inc () 1683sub_generation_inc ()
1689 CODE: 1684 CODE:
1690 PL_sub_generation++; 1685 PL_sub_generation++;
2149 2144
2150void clear_los (player *pl) 2145void clear_los (player *pl)
2151 2146
2152void cf_player_move (player *pl, int dir) 2147void cf_player_move (player *pl, int dir)
2153 2148
2154void play_sound_player_only (player *pl, int soundnum, int x = 0, int y = 0);
2155
2156bool 2149bool
2157cell_visible (player *pl, int dx, int dy) 2150cell_visible (player *pl, int dx, int dy)
2158 CODE: 2151 CODE:
2159 RETVAL = FABS (dx) <= pl->ns->mapx / 2 && FABS (dy) <= pl->ns->mapy / 2 2152 RETVAL = FABS (dx) <= pl->ns->mapx / 2 && FABS (dy) <= pl->ns->mapy / 2
2160 && !pl->blocked_los [dx + pl->ns->mapx / 2][dy + pl->ns->mapy / 2]; 2153 && !pl->blocked_los [dx + pl->ns->mapx / 2][dy + pl->ns->mapy / 2];
2338 } 2331 }
2339 } 2332 }
2340 2333
2341 op->destroy (); 2334 op->destroy ();
2342} 2335}
2343
2344void play_sound_map (maptile *map, int x, int y, int sound_num)
2345 2336
2346int out_of_map (maptile *map, int x, int y) 2337int out_of_map (maptile *map, int x, int y)
2347 2338
2348void 2339void
2349trigger (maptile *map, long connection, bool state = true) 2340trigger (maptile *map, long connection, bool state = true)
2622 2613
2623 THIS->send_packet (buf, len); 2614 THIS->send_packet (buf, len);
2624} 2615}
2625 2616
2626faceidx 2617faceidx
2627client::find_face (utf8_string name, faceidx defidx = 0) 2618client::need_face (utf8_string name, int pri = 0)
2628 CODE: 2619 CODE:
2629 RETVAL = face_find (name, defidx); 2620 RETVAL = face_find (name, 0);
2621 if (RETVAL)
2622 {
2630 THIS->send_face (RETVAL); 2623 THIS->send_face (RETVAL, pri);
2631 THIS->flush_fx (); 2624 THIS->flush_fx ();
2625 }
2632 OUTPUT: 2626 OUTPUT:
2633 RETVAL 2627 RETVAL
2628
2629int
2630client::fx_want (int idx, int value = -1)
2631 CODE:
2632 if (0 < idx && idx < FT_NUM)
2633 {
2634 RETVAL = THIS->fx_want [idx];
2635 if (items > 2)
2636 THIS->fx_want [idx] = value;
2637 }
2638 else
2639 RETVAL = 0;
2640 OUTPUT:
2641 RETVAL
2642
2643MODULE = cf PACKAGE = cf::sound PREFIX = sound_
2644
2645faceidx sound_find (utf8_string name)
2646
2647void sound_set (utf8_string str, faceidx face)
2648
2649# dire hack
2650void old_sound_index (int idx, faceidx face)
2651 CODE:
2652 extern faceidx old_sound_index [SOUND_CAST_SPELL_0];
2653 old_sound_index [idx] = face;
2634 2654
2635MODULE = cf PACKAGE = cf::face PREFIX = face_ 2655MODULE = cf PACKAGE = cf::face PREFIX = face_
2636 2656
2637#INCLUDE: $PERL $srcdir/genacc faceset ../include/face.h | 2657#INCLUDE: $PERL $srcdir/genacc faceset ../include/face.h |
2638 2658

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines