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.314 by root, Thu Jan 1 20:49:48 2009 UTC vs.
Revision 1.321 by root, Thu Oct 8 05:04:27 2009 UTC

71static int tick_pending; 71static int tick_pending;
72 72
73global gbl_ev; 73global gbl_ev;
74static AV *cb_global, *cb_attachable, *cb_object, *cb_player, *cb_client, *cb_type, *cb_map; 74static AV *cb_global, *cb_attachable, *cb_object, *cb_player, *cb_client, *cb_type, *cb_map;
75static SV *sv_runtime, *sv_tick_start, *sv_next_tick, *sv_now; 75static SV *sv_runtime, *sv_tick_start, *sv_next_tick, *sv_now;
76static AV *av_reflect;
76 77
77bitset<NUM_EVENT_TYPES> ev_want_event; 78bitset<NUM_EVENT_TYPES> ev_want_event;
78bitset<NUM_TYPES> ev_want_type; 79bitset<NUM_TYPES> ev_want_type;
79 80
80static HV 81static HV
317 fprintf (stderr, "P %p\n", pl); 318 fprintf (stderr, "P %p\n", pl);
318 319
319 for_all_clients (ns) 320 for_all_clients (ns)
320 if (find_backref (ptr, ns)) 321 if (find_backref (ptr, ns))
321 fprintf (stderr, "C %p\n", ns); 322 fprintf (stderr, "C %p\n", ns);
322
323} 323}
324 324
325////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 325//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
326 326
327static SV * 327static SV *
1029 CALL_END; 1029 CALL_END;
1030 1030
1031 return can; 1031 return can;
1032} 1032}
1033 1033
1034void
1035cfperl_mapscript_activate (object *ob, int state, object *activator, object *originator)
1036{
1037 CALL_BEGIN (4);
1038 CALL_ARG (ob);
1039 CALL_ARG (state);
1040 CALL_ARG (activator);
1041 CALL_ARG (originator);
1042 CALL_CALL ("cf::mapscript::activate", G_VOID);
1043 CALL_END;
1044}
1045
1034player * 1046player *
1035player::find (const char *name) 1047player::find (const char *name)
1036{ 1048{
1037 CALL_BEGIN (1); 1049 CALL_BEGIN (1);
1038 CALL_ARG (name); 1050 CALL_ARG (name);
1244 cb_object = get_av ("cf::CB_OBJECT", 1); 1256 cb_object = get_av ("cf::CB_OBJECT", 1);
1245 cb_player = get_av ("cf::CB_PLAYER", 1); 1257 cb_player = get_av ("cf::CB_PLAYER", 1);
1246 cb_client = get_av ("cf::CB_CLIENT", 1); 1258 cb_client = get_av ("cf::CB_CLIENT", 1);
1247 cb_type = get_av ("cf::CB_TYPE" , 1); 1259 cb_type = get_av ("cf::CB_TYPE" , 1);
1248 cb_map = get_av ("cf::CB_MAP" , 1); 1260 cb_map = get_av ("cf::CB_MAP" , 1);
1261
1262 av_reflect = get_av ("cf::REFLECT" , 1);
1249} 1263}
1250 1264
1251MODULE = cf PACKAGE = cf PREFIX = cf_ 1265MODULE = cf PACKAGE = cf PREFIX = cf_
1252 1266
1253BOOT: 1267BOOT:
1316 const_iv (FORCE) const_iv (POTION_EFFECT) const_iv (EVENT_CONNECTOR) const_iv (CLOSE_CON) 1330 const_iv (FORCE) const_iv (POTION_EFFECT) const_iv (EVENT_CONNECTOR) const_iv (CLOSE_CON)
1317 const_iv (CONTAINER) const_iv (ARMOUR_IMPROVER) const_iv (WEAPON_IMPROVER) const_iv (SKILLSCROLL) 1331 const_iv (CONTAINER) const_iv (ARMOUR_IMPROVER) const_iv (WEAPON_IMPROVER) const_iv (SKILLSCROLL)
1318 const_iv (DEEP_SWAMP) const_iv (IDENTIFY_ALTAR) const_iv (MENU) const_iv (RUNE) 1332 const_iv (DEEP_SWAMP) const_iv (IDENTIFY_ALTAR) const_iv (MENU) const_iv (RUNE)
1319 const_iv (TRAP) const_iv (POWER_CRYSTAL) const_iv (CORPSE) const_iv (DISEASE) 1333 const_iv (TRAP) const_iv (POWER_CRYSTAL) const_iv (CORPSE) const_iv (DISEASE)
1320 const_iv (SYMPTOM) const_iv (BUILDER) const_iv (MATERIAL) const_iv (ITEM_TRANSFORMER) 1334 const_iv (SYMPTOM) const_iv (BUILDER) const_iv (MATERIAL) const_iv (ITEM_TRANSFORMER)
1335 const_iv (MAPSCRIPT) const_iv (SAFE_GROUND)
1321 1336
1322 const_iv (NUM_TYPES) const_iv (NUM_SUBTYPES) 1337 const_iv (NUM_TYPES) const_iv (NUM_SUBTYPES)
1323 1338
1324 const_iv (ST_BD_BUILD) const_iv (ST_BD_REMOVE) 1339 const_iv (ST_BD_BUILD) const_iv (ST_BD_REMOVE)
1325 const_iv (ST_MAT_FLOOR) const_iv (ST_MAT_WALL) const_iv (ST_MAT_ITEM) 1340 const_iv (ST_MAT_FLOOR) const_iv (ST_MAT_WALL) const_iv (ST_MAT_ITEM)
2131 2146
2132int kill_object (object *op, int dam = 0, object *hitter = 0, int type = AT_PHYSICAL) 2147int kill_object (object *op, int dam = 0, object *hitter = 0, int type = AT_PHYSICAL)
2133 2148
2134int calc_skill_exp (object *who, object *op, object *skill); 2149int calc_skill_exp (object *who, object *op, object *skill);
2135 2150
2136void push_button (object *op); 2151void push_button (object *op, object *originator);
2137 2152
2138void use_trigger (object *op); 2153void use_trigger (object *op, object *originator);
2139
2140void add_button_link (object *button, maptile *map, int connected);
2141
2142void remove_button_link (object *op);
2143 2154
2144void handle_apply_yield (object *op); 2155void handle_apply_yield (object *op);
2156
2157int convert_item (object *item, object *converter);
2145 2158
2146 2159
2147MODULE = cf PACKAGE = cf::object PREFIX = cf_ 2160MODULE = cf PACKAGE = cf::object PREFIX = cf_
2148 2161
2149# no clean way to get an object from an archetype - stupid idiotic 2162# no clean way to get an object from an archetype - stupid idiotic
2355void 2368void
2356adjust_daylight () 2369adjust_daylight ()
2357 CODE: 2370 CODE:
2358 maptile::adjust_daylight (); 2371 maptile::adjust_daylight ();
2359 2372
2373int
2374outdoor_darkness (int darkness = 0)
2375 CODE:
2376 RETVAL = maptile::outdoor_darkness;
2377 if (items)
2378 maptile::outdoor_darkness = darkness;
2379 OUTPUT:
2380 RETVAL
2381
2360void 2382void
2361maptile::instantiate () 2383maptile::instantiate ()
2362 2384
2363maptile *new () 2385maptile *new ()
2364 PROTOTYPE: 2386 PROTOTYPE:
2472 } 2494 }
2473 2495
2474int out_of_map (maptile *map, int x, int y) 2496int out_of_map (maptile *map, int x, int y)
2475 2497
2476void 2498void
2477trigger (maptile *map, long connection, bool state = true) 2499find_link (maptile *map, shstr_tmp connection)
2478 CODE:
2479 activate_connection (map, connection, state);
2480
2481void
2482get_connection (maptile *map, long connection)
2483 PPCODE: 2500 PPCODE:
2484 oblinkpt *obp = get_connection_links (map, connection); 2501 if (oblinkpt *obp = map->find_link (connection))
2485 if (obp)
2486 for (objectlink *ol = obp->link; ol; ol = ol->next) 2502 for (objectlink *ol = obp->link; ol; ol = ol->next)
2487 XPUSHs (sv_2mortal (to_sv ((object *)ol->ob))); 2503 XPUSHs (sv_2mortal (to_sv ((object *)ol->ob)));
2488 2504
2489void 2505void
2490get_map_flags (maptile *map, int x, int y) 2506get_map_flags (maptile *map, int x, int y)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines