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.118 by root, Sat Dec 30 20:32:30 2006 UTC vs.
Revision 1.124 by root, Mon Jan 1 00:41:03 2007 UTC

828 CALL_CALL ("cf::map::emergency_save", G_VOID); 828 CALL_CALL ("cf::map::emergency_save", G_VOID);
829 CALL_END; 829 CALL_END;
830} 830}
831 831
832maptile * 832maptile *
833maptile::find_map (const char *path, maptile *origin) 833maptile::load_map_sync (const char *path, maptile *origin)
834{ 834{
835 CALL_BEGIN (2); 835 CALL_BEGIN (2);
836 CALL_ARG (path); 836 CALL_ARG (path);
837 CALL_ARG (origin); 837 CALL_ARG (origin);
838 CALL_CALL ("cf::map::find_map", G_SCALAR); 838 CALL_CALL ("cf::map::load_map_sync", G_SCALAR);
839 839
840 maptile *retval; 840 maptile *retval;
841 841
842 if (count) 842 if (count)
843 sv_to (POPs, retval); 843 sv_to (POPs, retval);
845 retval = 0; 845 retval = 0;
846 846
847 CALL_END; 847 CALL_END;
848 848
849 return retval; 849 return retval;
850}
851
852void
853maptile::do_load ()
854{
855 CALL_BEGIN (1);
856 CALL_ARG (this);
857 CALL_CALL ("cf::map::do_load", G_VOID);
858 CALL_END;
859}
860
861maptile *
862maptile::customise_for (object *op)
863{
864 CALL_BEGIN (2);
865 CALL_ARG (this);
866 CALL_ARG (op);
867 CALL_CALL ("cf::map::customise_for", G_SCALAR);
868
869 maptile *retval;
870
871 if (count)
872 sv_to (POPs, retval);
873 else
874 retval = 0;
875
876 CALL_END;
877
878 return retval ? retval : this;
879} 850}
880 851
881void 852void
882maptile::change_all_map_light (int change) 853maptile::change_all_map_light (int change)
883{ 854{
902 873
903///////////////////////////////////////////////////////////////////////////// 874/////////////////////////////////////////////////////////////////////////////
904 875
905struct EventAPI *watcher_base::GEventAPI; 876struct EventAPI *watcher_base::GEventAPI;
906struct CoroAPI *coroapi::GCoroAPI; 877struct CoroAPI *coroapi::GCoroAPI;
878
879int coroapi::cede_counter;
907 880
908static void iw_dispatch (pe_event *ev) 881static void iw_dispatch (pe_event *ev)
909{ 882{
910 iw *w = (iw *)ev->ext_data; 883 iw *w = (iw *)ev->ext_data;
911 w->call (*w); 884 w->call (*w);
1317 const_iv (P_BLOCKSVIEW) 1290 const_iv (P_BLOCKSVIEW)
1318 const_iv (P_PLAYER) 1291 const_iv (P_PLAYER)
1319 const_iv (P_NO_MAGIC) 1292 const_iv (P_NO_MAGIC)
1320 const_iv (P_IS_ALIVE) 1293 const_iv (P_IS_ALIVE)
1321 const_iv (P_NO_CLERIC) 1294 const_iv (P_NO_CLERIC)
1322 const_iv (P_NEED_UPDATE)
1323 const_iv (P_OUT_OF_MAP) 1295 const_iv (P_OUT_OF_MAP)
1324 const_iv (P_NEW_MAP) 1296 const_iv (P_NEW_MAP)
1297 const_iv (P_UPTODATE)
1325 1298
1326 const_iv (UP_OBJ_INSERT) 1299 const_iv (UP_OBJ_INSERT)
1327 const_iv (UP_OBJ_REMOVE) 1300 const_iv (UP_OBJ_REMOVE)
1328 const_iv (UP_OBJ_CHANGE) 1301 const_iv (UP_OBJ_CHANGE)
1329 const_iv (UP_OBJ_FACE) 1302 const_iv (UP_OBJ_FACE)
1624 case 5: RETVAL = settings.playerdir; break; 1597 case 5: RETVAL = settings.playerdir; break;
1625 case 6: RETVAL = settings.datadir ; break; 1598 case 6: RETVAL = settings.datadir ; break;
1626 } 1599 }
1627 OUTPUT: RETVAL 1600 OUTPUT: RETVAL
1628 1601
1602void abort ()
1603
1629void emergency_save () 1604void emergency_save ()
1630 1605
1631void _exit (int status = 0) 1606void _exit (int status = 0)
1632 1607
1633int find_animation (char *text) 1608int find_animation (char *text)
1942 RETVAL = op->contr; 1917 RETVAL = op->contr;
1943 OUTPUT: RETVAL 1918 OUTPUT: RETVAL
1944 1919
1945void check_score (object *op) 1920void check_score (object *op)
1946 1921
1947void cf_player_message (object *obj, char *txt, int flags = NDI_ORANGE | NDI_UNIQUE) 1922void message (object *op, char *txt, int flags = NDI_ORANGE | NDI_UNIQUE)
1923 CODE:
1924 new_draw_info (flags, 0, op, txt);
1948 1925
1949object *cf_player_send_inventory (object *op) 1926object *cf_player_send_inventory (object *op)
1950 1927
1951char *cf_player_get_ip (object *op) 1928char *cf_player_get_ip (object *op)
1952 ALIAS: ip = 0 1929 ALIAS: ip = 0
2206 case 4: RETVAL = newSVuv ( GET_MAP_MOVE_BLOCK (obj, x, y)); break; 2183 case 4: RETVAL = newSVuv ( GET_MAP_MOVE_BLOCK (obj, x, y)); break;
2207 case 5: RETVAL = newSVuv ( GET_MAP_MOVE_SLOW (obj, x, y)); break; 2184 case 5: RETVAL = newSVuv ( GET_MAP_MOVE_SLOW (obj, x, y)); break;
2208 case 6: RETVAL = newSVuv ( GET_MAP_MOVE_ON (obj, x, y)); break; 2185 case 6: RETVAL = newSVuv ( GET_MAP_MOVE_ON (obj, x, y)); break;
2209 case 7: RETVAL = newSVuv ( GET_MAP_MOVE_OFF (obj, x, y)); break; 2186 case 7: RETVAL = newSVuv ( GET_MAP_MOVE_OFF (obj, x, y)); break;
2210 } 2187 }
2211 OUTPUT: 2188 OUTPUT: RETVAL
2212 RETVAL
2213 2189
2214void fix_walls (maptile *map, int x, int y) 2190void fix_walls (maptile *map, int x, int y)
2215 2191
2216void fix_walls_around (maptile *map, int x, int y) 2192void fix_walls_around (maptile *map, int x, int y)
2193
2194const char *
2195region_name (maptile *m)
2196 CODE:
2197 RETVAL = get_name_of_region_for_map (m);
2198 OUTPUT: RETVAL
2217 2199
2218# worst xs function of my life 2200# worst xs function of my life
2219maptile * 2201maptile *
2220_create_random_map (\ 2202_create_random_map (\
2221 char *path,\ 2203 char *path,\
2265 assign (rmp.monsterstyle , monsterstyle); 2247 assign (rmp.monsterstyle , monsterstyle);
2266 assign (rmp.treasurestyle , treasurestyle); 2248 assign (rmp.treasurestyle , treasurestyle);
2267 assign (rmp.layoutstyle , layoutstyle); 2249 assign (rmp.layoutstyle , layoutstyle);
2268 assign (rmp.doorstyle , doorstyle); 2250 assign (rmp.doorstyle , doorstyle);
2269 assign (rmp.decorstyle , decorstyle); 2251 assign (rmp.decorstyle , decorstyle);
2270 assign (rmp.origin_map , origin_map);
2271 assign (rmp.final_map , final_map);
2272 assign (rmp.exitstyle , exitstyle); 2252 assign (rmp.exitstyle , exitstyle);
2273 assign (rmp.this_map , this_map);
2274 assign (rmp.exit_on_final_map, exit_on_final_map); 2253 assign (rmp.exit_on_final_map, exit_on_final_map);
2275 2254
2255 rmp.origin_map = origin_map;
2256 rmp.final_map = final_map;
2257 rmp.this_map = this_map;
2276 rmp.Xsize = Xsize; 2258 rmp.Xsize = Xsize;
2277 rmp.Ysize = Ysize; 2259 rmp.Ysize = Ysize;
2278 rmp.expand2x = expand2x; 2260 rmp.expand2x = expand2x;
2279 rmp.layoutoptions1 = layoutoptions1; 2261 rmp.layoutoptions1 = layoutoptions1;
2280 rmp.layoutoptions2 = layoutoptions2; 2262 rmp.layoutoptions2 = layoutoptions2;
2323 PROTOTYPE: 2305 PROTOTYPE:
2324 CODE: 2306 CODE:
2325 RETVAL = get_firstparty (); 2307 RETVAL = get_firstparty ();
2326 OUTPUT: RETVAL 2308 OUTPUT: RETVAL
2327 2309
2328partylist *next (partylist *party) 2310INCLUDE: $PERL genacc partylist ../include/player.h |
2329 CODE:
2330 RETVAL = party->next;
2331 OUTPUT: RETVAL
2332
2333const char *name (partylist *party)
2334 CODE:
2335 RETVAL = party->partyname;
2336 OUTPUT: RETVAL
2337
2338const char *password (partylist *party)
2339 CODE:
2340 RETVAL = party->passwd;
2341 OUTPUT: RETVAL
2342 2311
2343MODULE = cf PACKAGE = cf::region 2312MODULE = cf PACKAGE = cf::region
2344 2313
2345region *first () 2314region *first ()
2346 PROTOTYPE: 2315 PROTOTYPE:
2347 CODE: 2316 CODE:
2348 RETVAL = first_region; 2317 RETVAL = first_region;
2349 OUTPUT: RETVAL 2318 OUTPUT: RETVAL
2350 2319
2351region *next (region *reg) 2320region *find (char *name)
2321 PROTOTYPE: $
2352 CODE: 2322 CODE:
2353 RETVAL = reg->next; 2323 RETVAL = get_region_by_name (name);
2354 OUTPUT: RETVAL 2324 OUTPUT: RETVAL
2355 2325
2356const char *name (region *reg) 2326INCLUDE: $PERL genacc region ../include/map.h |
2357 CODE:
2358 RETVAL = reg->name;
2359 OUTPUT: RETVAL
2360
2361region *parent (region *reg)
2362 CODE:
2363 RETVAL = reg->parent;
2364 OUTPUT: RETVAL
2365
2366const char *longname (region *reg)
2367 CODE:
2368 RETVAL = reg->longname;
2369 OUTPUT: RETVAL
2370
2371const char *msg (region *reg)
2372 CODE:
2373 RETVAL = reg->msg;
2374 OUTPUT: RETVAL
2375 2327
2376MODULE = cf PACKAGE = cf::living 2328MODULE = cf PACKAGE = cf::living
2377 2329
2378INCLUDE: $PERL genacc living ../include/living.h | 2330INCLUDE: $PERL genacc living ../include/living.h |
2379 2331

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines