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.116 by root, Sat Dec 30 10:16:11 2006 UTC vs.
Revision 1.117 by root, Sat Dec 30 18:45:28 2006 UTC

1494 const_iv (ST_GET_PARTY_PASSWORD) 1494 const_iv (ST_GET_PARTY_PASSWORD)
1495 1495
1496 const_iv (IO_HEADER) 1496 const_iv (IO_HEADER)
1497 const_iv (IO_OBJECTS) 1497 const_iv (IO_OBJECTS)
1498 const_iv (IO_UNIQUES) 1498 const_iv (IO_UNIQUES)
1499
1500 // random map generator
1501 const_iv (LAYOUT_NONE)
1502 const_iv (LAYOUT_ONION)
1503 const_iv (LAYOUT_MAZE)
1504 const_iv (LAYOUT_SPIRAL)
1505 const_iv (LAYOUT_ROGUELIKE)
1506 const_iv (LAYOUT_SNAKE)
1507 const_iv (LAYOUT_SQUARE_SPIRAL)
1508
1509 const_iv (RMOPT_RANDOM)
1510 const_iv (RMOPT_CENTERED)
1511 const_iv (RMOPT_LINEAR)
1512 const_iv (RMOPT_BOTTOM_C)
1513 const_iv (RMOPT_BOTTOM_R)
1514 const_iv (RMOPT_IRR_SPACE)
1515 const_iv (RMOPT_WALL_OFF)
1516 const_iv (RMOPT_WALLS_ONLY)
1517 const_iv (RMOPT_NO_DOORS)
1518
1519 const_iv (SYMMETRY_RANDOM)
1520 const_iv (SYMMETRY_NONE)
1521 const_iv (SYMMETRY_X)
1522 const_iv (SYMMETRY_Y)
1523 const_iv (SYMMETRY_XY)
1499 }; 1524 };
1500 1525
1501 for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ-- > const_iv; ) 1526 for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ-- > const_iv; )
1502 newCONSTSUB (stash_cf, (char *)civ->name, newSViv (civ->iv)); 1527 newCONSTSUB (stash_cf, (char *)civ->name, newSViv (civ->iv));
1503 1528
2083 OUTPUT: 2108 OUTPUT:
2084 RETVAL 2109 RETVAL
2085 2110
2086void 2111void
2087maptile::destroy () 2112maptile::destroy ()
2113
2114void
2115maptile::players ()
2116 PPCODE:
2117 if (GIMME_V == G_SCALAR)
2118 XPUSHs (to_sv (THIS->players));
2119 else if (GIMME_V == G_ARRAY)
2120 {
2121 EXTEND (SP, THIS->players);
2122 for_all_players (pl)
2123 if (pl->ob && pl->ob->map == THIS)
2124 PUSHs (to_sv (pl->ob));
2125 }
2088 2126
2089void play_sound_map (maptile *map, int x, int y, int sound_num) 2127void play_sound_map (maptile *map, int x, int y, int sound_num)
2090 2128
2091int out_of_map (maptile *map, int x, int y) 2129int out_of_map (maptile *map, int x, int y)
2092 2130
2175 2213
2176void fix_walls (maptile *map, int x, int y) 2214void fix_walls (maptile *map, int x, int y)
2177 2215
2178void fix_walls_around (maptile *map, int x, int y) 2216void fix_walls_around (maptile *map, int x, int y)
2179 2217
2218# worst xs function of my life
2219maptile *
2220_create_random_map (\
2221 char *path,\
2222 char *wallstyle,\
2223 char *wall_name,\
2224 char *floorstyle,\
2225 char *monsterstyle,\
2226 char *treasurestyle,\
2227 char *layoutstyle,\
2228 char *doorstyle,\
2229 char *decorstyle,\
2230 char *origin_map,\
2231 char *final_map,\
2232 char *exitstyle,\
2233 char *this_map,\
2234 char *exit_on_final_map,\
2235 int Xsize,\
2236 int Ysize,\
2237 int expand2x,\
2238 int layoutoptions1,\
2239 int layoutoptions2,\
2240 int layoutoptions3,\
2241 int symmetry,\
2242 int difficulty,\
2243 int difficulty_given,\
2244 float difficulty_increase,\
2245 int dungeon_level,\
2246 int dungeon_depth,\
2247 int decoroptions,\
2248 int orientation,\
2249 int origin_y,\
2250 int origin_x,\
2251 int random_seed,\
2252 val64 total_map_hp,\
2253 int map_layout_style,\
2254 int treasureoptions,\
2255 int symmetry_used,\
2256 region *region\
2257)
2258 CODE:
2259{
2260 random_map_params rmp;
2261
2262 assign (rmp.wallstyle , wallstyle);
2263 assign (rmp.wall_name , wall_name);
2264 assign (rmp.floorstyle , floorstyle);
2265 assign (rmp.monsterstyle , monsterstyle);
2266 assign (rmp.treasurestyle , treasurestyle);
2267 assign (rmp.layoutstyle , layoutstyle);
2268 assign (rmp.doorstyle , doorstyle);
2269 assign (rmp.decorstyle , decorstyle);
2270 assign (rmp.origin_map , origin_map);
2271 assign (rmp.final_map , final_map);
2272 assign (rmp.exitstyle , exitstyle);
2273 assign (rmp.this_map , this_map);
2274 assign (rmp.exit_on_final_map, exit_on_final_map);
2275
2276 rmp.Xsize = Xsize;
2277 rmp.Ysize = Ysize;
2278 rmp.expand2x = expand2x;
2279 rmp.layoutoptions1 = layoutoptions1;
2280 rmp.layoutoptions2 = layoutoptions2;
2281 rmp.layoutoptions3 = layoutoptions3;
2282 rmp.symmetry = symmetry;
2283 rmp.difficulty = difficulty;
2284 rmp.difficulty_given = difficulty_given;
2285 rmp.difficulty_increase = difficulty_increase;
2286 rmp.dungeon_level = dungeon_level;
2287 rmp.dungeon_depth = dungeon_depth;
2288 rmp.decoroptions = decoroptions;
2289 rmp.orientation = orientation;
2290 rmp.origin_y = origin_y;
2291 rmp.origin_x = origin_x;
2292 rmp.random_seed = random_seed;
2293 rmp.total_map_hp = total_map_hp;
2294 rmp.map_layout_style = map_layout_style;
2295 rmp.treasureoptions = treasureoptions;
2296 rmp.symmetry_used = symmetry_used;
2297 rmp.region = region;
2298
2299 RETVAL = generate_random_map (path, &rmp);
2300}
2301 OUTPUT:
2302 RETVAL
2303
2180MODULE = cf PACKAGE = cf::arch 2304MODULE = cf PACKAGE = cf::arch
2181 2305
2182archetype *find (const char *name) 2306archetype *find (const char *name)
2183 CODE: 2307 CODE:
2184 RETVAL = archetype::find (name); 2308 RETVAL = archetype::find (name);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines