1 | /* |
1 | /* |
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
3 | * |
3 | * |
4 | * Copyright (©) 2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
4 | * Copyright (©) 2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
5 | * Copyright (©) 2001-2005,2007 by Chachkoff Yann |
|
|
6 | * Copyright (©) 2006,2007 by Marc Lehmann <cf@schmorp.de> |
5 | * Copyright (©) 2006,2007 by Marc Lehmann <cf@schmorp.de> |
7 | * |
6 | * |
8 | * Deliantra is free software: you can redistribute it and/or modify it under |
7 | * Deliantra is free software: you can redistribute it and/or modify it under |
9 | * the terms of the Affero GNU General Public License as published by the |
8 | * the terms of the Affero GNU General Public License as published by the |
10 | * Free Software Foundation, either version 3 of the License, or (at your |
9 | * Free Software Foundation, either version 3 of the License, or (at your |
… | |
… | |
1223 | CALL_END; |
1222 | CALL_END; |
1224 | |
1223 | |
1225 | return matched; |
1224 | return matched; |
1226 | } |
1225 | } |
1227 | |
1226 | |
|
|
1227 | object * |
|
|
1228 | match_one (const char *expr, object *ob, object *self, object *source, object *originator) |
|
|
1229 | { |
|
|
1230 | if (!strncmp (expr, "match ", sizeof ("match ") - 1)) |
|
|
1231 | expr += sizeof ("match ") - 1; |
|
|
1232 | |
|
|
1233 | CALL_BEGIN (5); |
|
|
1234 | CALL_ARG (expr); |
|
|
1235 | CALL_ARG (ob); |
|
|
1236 | CALL_ARG (self); |
|
|
1237 | CALL_ARG (source); |
|
|
1238 | CALL_ARG (originator); |
|
|
1239 | CALL_CALL (cv_cf_match_match, G_ARRAY); |
|
|
1240 | |
|
|
1241 | object *one = 0; |
|
|
1242 | |
|
|
1243 | if (count) |
|
|
1244 | sv_to (TOPs, one); |
|
|
1245 | |
|
|
1246 | CALL_END; |
|
|
1247 | |
|
|
1248 | return one; |
|
|
1249 | } |
|
|
1250 | |
1228 | ///////////////////////////////////////////////////////////////////////////// |
1251 | ///////////////////////////////////////////////////////////////////////////// |
1229 | |
1252 | |
1230 | struct EVAPI *evapi::GEVAPI; |
1253 | struct EVAPI *evapi::GEVAPI; |
1231 | struct CoroAPI *coroapi::GCoroAPI; |
1254 | struct CoroAPI *coroapi::GCoroAPI; |
1232 | |
1255 | |
… | |
… | |
1364 | const_iv (MOOD_FLOOR) const_iv (EXIT) const_iv (ENCOUNTER) const_iv (SHOP_FLOOR) |
1387 | const_iv (MOOD_FLOOR) const_iv (EXIT) const_iv (ENCOUNTER) const_iv (SHOP_FLOOR) |
1365 | const_iv (SHOP_MAT) const_iv (RING) const_iv (FLOOR) const_iv (FLESH) |
1388 | const_iv (SHOP_MAT) const_iv (RING) const_iv (FLOOR) const_iv (FLESH) |
1366 | const_iv (INORGANIC) const_iv (SKILL_TOOL) const_iv (LIGHTER) const_iv (BUILDABLE_WALL) |
1389 | const_iv (INORGANIC) const_iv (SKILL_TOOL) const_iv (LIGHTER) const_iv (BUILDABLE_WALL) |
1367 | const_iv (MISC_OBJECT) const_iv (LAMP) const_iv (DUPLICATOR) const_iv (SPELLBOOK) |
1390 | const_iv (MISC_OBJECT) const_iv (LAMP) const_iv (DUPLICATOR) const_iv (SPELLBOOK) |
1368 | const_iv (CLOAK) const_iv (SPINNER) const_iv (GATE) const_iv (BUTTON) |
1391 | const_iv (CLOAK) const_iv (SPINNER) const_iv (GATE) const_iv (BUTTON) |
1369 | const_iv (CF_HANDLE) const_iv (HOLE) const_iv (TRAPDOOR) const_iv (SIGN) |
1392 | const_iv (T_HANDLE) const_iv (HOLE) const_iv (TRAPDOOR) const_iv (SIGN) |
1370 | const_iv (BOOTS) const_iv (GLOVES) const_iv (SPELL) const_iv (SPELL_EFFECT) |
1393 | const_iv (BOOTS) const_iv (GLOVES) const_iv (SPELL) const_iv (SPELL_EFFECT) |
1371 | const_iv (CONVERTER) const_iv (BRACERS) const_iv (POISONING) const_iv (SAVEBED) |
1394 | const_iv (CONVERTER) const_iv (BRACERS) const_iv (POISONING) const_iv (SAVEBED) |
1372 | const_iv (WAND) const_iv (SCROLL) const_iv (DIRECTOR) const_iv (GIRDLE) |
1395 | const_iv (WAND) const_iv (SCROLL) const_iv (DIRECTOR) const_iv (GIRDLE) |
1373 | const_iv (FORCE) const_iv (POTION_EFFECT) const_iv (EVENT_CONNECTOR) const_iv (CLOSE_CON) |
1396 | const_iv (FORCE) const_iv (POTION_EFFECT) const_iv (EVENT_CONNECTOR) const_iv (CLOSE_CON) |
1374 | const_iv (CONTAINER) const_iv (ARMOUR_IMPROVER) const_iv (WEAPON_IMPROVER) const_iv (SKILLSCROLL) |
1397 | const_iv (CONTAINER) const_iv (ARMOUR_IMPROVER) const_iv (WEAPON_IMPROVER) const_iv (SKILLSCROLL) |
… | |
… | |
2141 | CODE: |
2164 | CODE: |
2142 | player_apply_below (op); |
2165 | player_apply_below (op); |
2143 | |
2166 | |
2144 | int cast_heal (object *op, object *caster, object *spell, int dir = 0) |
2167 | int cast_heal (object *op, object *caster, object *spell, int dir = 0) |
2145 | |
2168 | |
|
|
2169 | int casting_level (object *caster, object *spell) |
|
|
2170 | |
2146 | int pay_item (object *op, object *buyer) |
2171 | int pay_item (object *op, object *buyer) |
2147 | CODE: |
2172 | CODE: |
2148 | RETVAL = pay_for_item (op, buyer); |
2173 | RETVAL = pay_for_item (op, buyer); |
2149 | OUTPUT: RETVAL |
2174 | OUTPUT: RETVAL |
2150 | |
2175 | |
… | |
… | |
2223 | object *insert_ob_in_map_at (object *ob, maptile *where, object_ornull *orig, int flag, int x, int y) |
2248 | object *insert_ob_in_map_at (object *ob, maptile *where, object_ornull *orig, int flag, int x, int y) |
2224 | PROTOTYPE: $$$$$$ |
2249 | PROTOTYPE: $$$$$$ |
2225 | CODE: |
2250 | CODE: |
2226 | { |
2251 | { |
2227 | RETVAL = insert_ob_in_map_at (ob, where, orig, flag, x, y); |
2252 | RETVAL = insert_ob_in_map_at (ob, where, orig, flag, x, y); |
|
|
2253 | |
|
|
2254 | if (RETVAL->destroyed ()) |
|
|
2255 | RETVAL = 0; |
2228 | } |
2256 | } |
2229 | |
2257 | |
2230 | shstr |
2258 | shstr |
2231 | object::kv_get (shstr key) |
2259 | object::kv_get (shstr key) |
2232 | |
2260 | |
… | |
… | |
2643 | case 6: RETVAL = newSVuv (ms.move_on ); break; |
2671 | case 6: RETVAL = newSVuv (ms.move_on ); break; |
2644 | case 7: RETVAL = newSVuv (ms.move_off ); break; |
2672 | case 7: RETVAL = newSVuv (ms.move_off ); break; |
2645 | } |
2673 | } |
2646 | } |
2674 | } |
2647 | OUTPUT: RETVAL |
2675 | OUTPUT: RETVAL |
2648 | |
|
|
2649 | void fix_walls (maptile *map, int x, int y) |
|
|
2650 | |
|
|
2651 | void fix_walls_around (maptile *map, int x, int y) |
|
|
2652 | |
2676 | |
2653 | # worst xs function of my life |
2677 | # worst xs function of my life |
2654 | bool |
2678 | bool |
2655 | _create_random_map (\ |
2679 | _create_random_map (\ |
2656 | maptile *self,\ |
2680 | maptile *self,\ |