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.290 by root, Sat May 17 14:57:23 2008 UTC vs.
Revision 1.291 by root, Sun Jun 15 20:32:51 2008 UTC

2100void rangevector (object *ob, object *other, int flags = 0) 2100void rangevector (object *ob, object *other, int flags = 0)
2101 PROTOTYPE: $$;$ 2101 PROTOTYPE: $$;$
2102 PPCODE: 2102 PPCODE:
2103{ 2103{
2104 rv_vector rv; 2104 rv_vector rv;
2105
2106 PUTBACK;
2105 get_rangevector (ob, other, &rv, flags); 2107 get_rangevector (ob, other, &rv, flags);
2108 SPAGAIN;
2109
2106 EXTEND (SP, 5); 2110 EXTEND (SP, 5);
2107 PUSHs (newSVuv (rv.distance)); 2111 PUSHs (newSVuv (rv.distance));
2108 PUSHs (newSViv (rv.distance_x)); 2112 PUSHs (newSViv (rv.distance_x));
2109 PUSHs (newSViv (rv.distance_y)); 2113 PUSHs (newSViv (rv.distance_y));
2110 PUSHs (newSViv (rv.direction)); 2114 PUSHs (newSViv (rv.direction));
2417get_map_flags (maptile *map, int x, int y) 2421get_map_flags (maptile *map, int x, int y)
2418 PPCODE: 2422 PPCODE:
2419{ 2423{
2420 maptile *nmap = 0; 2424 maptile *nmap = 0;
2421 I16 nx = 0, ny = 0; 2425 I16 nx = 0, ny = 0;
2426
2427 PUTBACK;
2422 int flags = get_map_flags (map, &nmap, x, y, &nx, &ny); 2428 int flags = get_map_flags (map, &nmap, x, y, &nx, &ny);
2429 SPAGAIN;
2423 2430
2424 EXTEND (SP, 4); 2431 EXTEND (SP, 4);
2425 PUSHs (sv_2mortal (newSViv (flags))); 2432 PUSHs (sv_2mortal (newSViv (flags)));
2426 2433
2427 if (GIMME_V == G_ARRAY) 2434 if (GIMME_V == G_ARRAY)
2435void 2442void
2436at (maptile *map, unsigned int x, unsigned int y) 2443at (maptile *map, unsigned int x, unsigned int y)
2437 PROTOTYPE: $$$ 2444 PROTOTYPE: $$$
2438 PPCODE: 2445 PPCODE:
2439{ 2446{
2440 object *o;
2441 maptile *nmap = 0; 2447 maptile *nmap = 0;
2442 I16 nx, ny; 2448 I16 nx, ny;
2443 2449
2450 PUTBACK;
2444 get_map_flags (map, &nmap, x, y, &nx, &ny); 2451 get_map_flags (map, &nmap, x, y, &nx, &ny);
2452 SPAGAIN;
2445 2453
2446 if (nmap) 2454 if (nmap)
2447 for (o = GET_MAP_OB (nmap, nx, ny); o; o = o->above) 2455 for (object *o = nmap->at (nx, ny).bot; o; o = o->above)
2448 XPUSHs (sv_2mortal (to_sv (o))); 2456 XPUSHs (sv_2mortal (to_sv (o)));
2449} 2457}
2450 2458
2451SV * 2459SV *
2452bot_at (maptile *obj, unsigned int x, unsigned int y) 2460bot_at (maptile *obj, unsigned int x, unsigned int y)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines