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.363 by root, Sun Apr 11 01:35:51 2010 UTC vs.
Revision 1.369 by root, Wed Apr 14 02:31:24 2010 UTC

230 do_destroy (); 230 do_destroy ();
231 sever_self (); 231 sever_self ();
232} 232}
233 233
234void 234void
235attachable::do_delete ()
236{
237 delete this;
238}
239
240void
235attachable::check_mortals () 241attachable::check_mortals ()
236{ 242{
237 static int i = 0; 243 static int i = 0;
238 244
239 for (;;) 245 for (;;)
252 258
253 if (0) 259 if (0)
254 { 260 {
255 for (int j = 0; j < mortals.size (); ++j)//D 261 for (int j = 0; j < mortals.size (); ++j)//D
256 fprintf (stderr, "%d:%s %p ", j, &((object *)mortals[j])->name, mortals[j]);//D 262 fprintf (stderr, "%d:%s %p ", j, &((object *)mortals[j])->name, mortals[j]);//D
263
257 fprintf (stderr, "\n");//D 264 fprintf (stderr, "\n");//D
258 } 265 }
259 } 266 }
260 } 267 }
261 268
281 } 288 }
282 else 289 else
283 { 290 {
284 mortals.erase (i); 291 mortals.erase (i);
285 obj->sever_self (); 292 obj->sever_self ();
286 delete obj; 293 obj->do_delete ();
287 } 294 }
288 } 295 }
289} 296}
290 297
291void 298void
1132 1139
1133 return retval; 1140 return retval;
1134} 1141}
1135 1142
1136maptile * 1143maptile *
1137find_style (const_utf8_string dirname, const_utf8_string stylename, int difficulty) 1144find_style (const_utf8_string dirname, const_utf8_string stylename, int difficulty, bool recurse)
1138{ 1145{
1139 CALL_BEGIN (3); 1146 CALL_BEGIN (4);
1140 CALL_ARG (dirname); 1147 CALL_ARG (dirname);
1141 CALL_ARG (stylename); 1148 CALL_ARG (stylename);
1142 CALL_ARG (difficulty); 1149 CALL_ARG (difficulty);
1150 CALL_ARG (recurse);
1143 CALL_CALL ("ext::map_random::find_style", G_SCALAR); 1151 CALL_CALL ("ext::map_random::find_style", G_SCALAR);
1144 1152
1145 maptile *retval = 0; 1153 maptile *retval = 0;
1146 if (count) sv_to (POPs, retval); 1154 if (count) sv_to (POPs, retval);
1147 1155
1657 switch (items) 1665 switch (items)
1658 { 1666 {
1659 case 0: RETVAL = gen (); break; 1667 case 0: RETVAL = gen (); break;
1660 case 1: RETVAL = gen (SvUV (ST (0))); break; 1668 case 1: RETVAL = gen (SvUV (ST (0))); break;
1661 case 2: RETVAL = gen (SvIV (ST (0)), SvIV (ST (1))); break; 1669 case 2: RETVAL = gen (SvIV (ST (0)), SvIV (ST (1))); break;
1662 default: croak ("cf::rndm requires none, one or two parameters."); break; 1670 default: croak ("cf::rndm requires zero, one or two parameters."); break;
1663 } 1671 }
1664} 1672}
1665 OUTPUT: 1673 OUTPUT:
1666 RETVAL 1674 RETVAL
1667 1675
1683 PROTOTYPE: @ 1691 PROTOTYPE: @
1684 CODE: 1692 CODE:
1685 while (items > 0) 1693 while (items > 0)
1686 sv_rvweaken (ST (--items)); 1694 sv_rvweaken (ST (--items));
1687 1695
1688void 1696void log_suspend ()
1697
1698void log_resume ()
1699
1689log_backtrace (utf8_string msg) 1700void log_backtrace (utf8_string msg)
1690 1701
1691void
1692LOG (int flags, utf8_string msg) 1702void LOG (int flags, utf8_string msg)
1693 PROTOTYPE: $$ 1703 PROTOTYPE: $$
1694 C_ARGS: flags, "%s", msg 1704 C_ARGS: flags, "%s", msg
1695 1705
1696octet_string path_combine (octet_string base, octet_string path) 1706octet_string path_combine (octet_string base, octet_string path)
1697 PROTOTYPE: $$ 1707 PROTOTYPE: $$
2157 PROTOTYPE: $$;$ 2167 PROTOTYPE: $$;$
2158 PPCODE: 2168 PPCODE:
2159{ 2169{
2160 rv_vector rv; 2170 rv_vector rv;
2161 2171
2162 PUTBACK;
2163 get_rangevector (ob, other, &rv, flags); 2172 get_rangevector (ob, other, &rv, flags);
2164 SPAGAIN;
2165 2173
2166 EXTEND (SP, 5); 2174 EXTEND (SP, 5);
2167 PUSHs (newSVuv (rv.distance)); 2175 PUSHs (sv_2mortal (newSVuv (rv.distance)));
2168 PUSHs (newSViv (rv.distance_x)); 2176 PUSHs (sv_2mortal (newSViv (rv.distance_x)));
2169 PUSHs (newSViv (rv.distance_y)); 2177 PUSHs (sv_2mortal (newSViv (rv.distance_y)));
2170 PUSHs (newSViv (rv.direction)); 2178 PUSHs (sv_2mortal (newSViv (rv.direction)));
2171 PUSHs (to_sv (rv.part)); 2179 PUSHs (sv_2mortal (to_sv (rv.part)));
2172} 2180}
2173 2181
2174bool on_same_map_as (object *ob, object *other) 2182bool on_same_map_as (object *ob, object *other)
2175 CODE: 2183 CODE:
2176 RETVAL = on_same_map (ob, other); 2184 RETVAL = on_same_map (ob, other);
2800 while (!RETVAL); // crude way to leave index 0 2808 while (!RETVAL); // crude way to leave index 0
2801 2809
2802 faces [RETVAL].name = name; 2810 faces [RETVAL].name = name;
2803 facehash.insert (std::make_pair (faces [RETVAL].name, RETVAL)); 2811 facehash.insert (std::make_pair (faces [RETVAL].name, RETVAL));
2804 2812
2805 if (!strcmp (name, BLANK_FACE_NAME)) blank_face = RETVAL; 2813 if (!strcmp (name, BLANK_FACE_NAME )) blank_face = RETVAL;
2806 if (!strcmp (name, EMPTY_FACE_NAME)) empty_face = RETVAL; 2814 if (!strcmp (name, EMPTY_FACE_NAME )) empty_face = RETVAL;
2815 if (!strcmp (name, MAGICMOUTH_FACE_NAME)) magicmouth_face = RETVAL;
2807} 2816}
2808 OUTPUT: RETVAL 2817 OUTPUT: RETVAL
2809 2818
2810void set_type (faceidx idx, int value) 2819void set_type (faceidx idx, int value)
2811 ALIAS: 2820 ALIAS:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines