… | |
… | |
388 | |
388 | |
389 | return sv; |
389 | return sv; |
390 | } |
390 | } |
391 | } |
391 | } |
392 | |
392 | |
|
|
393 | #if 0 // unused |
393 | static void |
394 | static void |
394 | clearSVptr (SV *sv) |
395 | clearSVptr (SV *sv) |
395 | { |
396 | { |
396 | if (SvROK (sv)) |
397 | if (SvROK (sv)) |
397 | sv = SvRV (sv); |
398 | sv = SvRV (sv); |
398 | |
399 | |
399 | hv_clear ((HV *)sv); |
400 | hv_clear ((HV *)sv); |
400 | sv_unmagic (sv, PERL_MAGIC_ext); |
401 | sv_unmagic (sv, PERL_MAGIC_ext); |
401 | } |
402 | } |
|
|
403 | #endif |
402 | |
404 | |
403 | static long |
405 | static long |
404 | SvPTR (SV *sv, const char *klass) |
406 | SvPTR (SV *sv, const char *klass) |
405 | { |
407 | { |
406 | if (!sv_derived_from (sv, klass)) |
408 | if (!sv_derived_from (sv, klass)) |
… | |
… | |
1220 | bool matched = count && SvTRUE (TOPs); |
1222 | bool matched = count && SvTRUE (TOPs); |
1221 | |
1223 | |
1222 | CALL_END; |
1224 | CALL_END; |
1223 | |
1225 | |
1224 | return matched; |
1226 | return matched; |
|
|
1227 | } |
|
|
1228 | |
|
|
1229 | object * |
|
|
1230 | match_one (const char *expr, object *ob, object *self, object *source, object *originator) |
|
|
1231 | { |
|
|
1232 | if (!strncmp (expr, "match ", sizeof ("match ") - 1)) |
|
|
1233 | expr += sizeof ("match ") - 1; |
|
|
1234 | |
|
|
1235 | CALL_BEGIN (5); |
|
|
1236 | CALL_ARG (expr); |
|
|
1237 | CALL_ARG (ob); |
|
|
1238 | CALL_ARG (self); |
|
|
1239 | CALL_ARG (source); |
|
|
1240 | CALL_ARG (originator); |
|
|
1241 | CALL_CALL (cv_cf_match_match, G_ARRAY); |
|
|
1242 | |
|
|
1243 | object *one = 0; |
|
|
1244 | |
|
|
1245 | if (count) |
|
|
1246 | sv_to (TOPs, one); |
|
|
1247 | |
|
|
1248 | CALL_END; |
|
|
1249 | |
|
|
1250 | return one; |
1225 | } |
1251 | } |
1226 | |
1252 | |
1227 | ///////////////////////////////////////////////////////////////////////////// |
1253 | ///////////////////////////////////////////////////////////////////////////// |
1228 | |
1254 | |
1229 | struct EVAPI *evapi::GEVAPI; |
1255 | struct EVAPI *evapi::GEVAPI; |
… | |
… | |
2140 | CODE: |
2166 | CODE: |
2141 | player_apply_below (op); |
2167 | player_apply_below (op); |
2142 | |
2168 | |
2143 | int cast_heal (object *op, object *caster, object *spell, int dir = 0) |
2169 | int cast_heal (object *op, object *caster, object *spell, int dir = 0) |
2144 | |
2170 | |
|
|
2171 | int casting_level (object *caster, object *spell) |
|
|
2172 | |
2145 | int pay_item (object *op, object *buyer) |
2173 | int pay_item (object *op, object *buyer) |
2146 | CODE: |
2174 | CODE: |
2147 | RETVAL = pay_for_item (op, buyer); |
2175 | RETVAL = pay_for_item (op, buyer); |
2148 | OUTPUT: RETVAL |
2176 | OUTPUT: RETVAL |
2149 | |
2177 | |
… | |
… | |
2222 | object *insert_ob_in_map_at (object *ob, maptile *where, object_ornull *orig, int flag, int x, int y) |
2250 | object *insert_ob_in_map_at (object *ob, maptile *where, object_ornull *orig, int flag, int x, int y) |
2223 | PROTOTYPE: $$$$$$ |
2251 | PROTOTYPE: $$$$$$ |
2224 | CODE: |
2252 | CODE: |
2225 | { |
2253 | { |
2226 | RETVAL = insert_ob_in_map_at (ob, where, orig, flag, x, y); |
2254 | RETVAL = insert_ob_in_map_at (ob, where, orig, flag, x, y); |
|
|
2255 | |
|
|
2256 | if (RETVAL->destroyed ()) |
|
|
2257 | RETVAL = 0; |
2227 | } |
2258 | } |
2228 | |
2259 | |
2229 | shstr |
2260 | shstr |
2230 | object::kv_get (shstr key) |
2261 | object::kv_get (shstr key) |
2231 | |
2262 | |