ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/include/map.h
(Generate patch)

Comparing deliantra/server/include/map.h (file contents):
Revision 1.123 by root, Sun Nov 29 09:41:28 2009 UTC vs.
Revision 1.127 by root, Sat Jan 16 17:57:32 2010 UTC

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 (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team 4 * Copyright (©) 2005,2006,2007,2008,2009 Marc Alexander Lehmann / Robin Redeker / the Deliantra team
5 * Copyright (©) 2002-2005,2007 Mark Wedel & Crossfire Development Team 5 * Copyright (©) 2002-2005,2007 Mark Wedel & Crossfire Development Team
6 * Copyright (©) 1992,2007 Frank Tore Johansen 6 * Copyright (©) 1992,2007 Frank Tore Johansen
7 * 7 *
8 * Deliantra is free software: you can redistribute it and/or modify it under 8 * 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 9 * the terms of the Affero GNU General Public License as published by the
204 { 204 {
205 return blocks (op->move_type); 205 return blocks (op->move_type);
206 } 206 }
207}; 207};
208 208
209// a rectangular area of a map 209// a rectangular area of a map, used my split_to_tiles/unordered_mapwalk
210struct maprect 210struct maprect
211{ 211{
212 maptile *m; 212 maptile *m;
213 int x0, y0; 213 int x0, y0;
214 int x1, y1; 214 int x1, y1;
320 MTH void update_buttons (); 320 MTH void update_buttons ();
321 MTH int change_map_light (int change); 321 MTH int change_map_light (int change);
322 MTH int estimate_difficulty () const; 322 MTH int estimate_difficulty () const;
323 323
324 MTH void play_sound (faceidx sound, int x, int y) const; 324 MTH void play_sound (faceidx sound, int x, int y) const;
325 MTH void say_msg (const char *msg, int x, int y) const; 325 MTH void say_msg (const_utf8_string msg, int x, int y) const;
326 326
327 // connected links 327 // connected links
328 oblinkpt *find_link (shstr_tmp id); 328 oblinkpt *find_link (shstr_tmp id);
329 MTH void trigger (shstr_tmp id, int state = 1, object *activator = 0, object *originator = 0); 329 MTH void trigger (shstr_tmp id, int state = 1, object *activator = 0, object *originator = 0);
330 330
348 bool _load_objects (object_thawer &thawer); 348 bool _load_objects (object_thawer &thawer);
349 MTH bool _load_objects (object_thawer *thawer) { return _load_objects (*thawer); } 349 MTH bool _load_objects (object_thawer *thawer) { return _load_objects (*thawer); }
350 350
351 // save objects into the given file (uses IO_ flags) 351 // save objects into the given file (uses IO_ flags)
352 bool _save_objects (object_freezer &freezer, int flags); 352 bool _save_objects (object_freezer &freezer, int flags);
353 MTH bool _save_objects (const char *path, int flags); 353 MTH bool _save_objects (const_octet_string path, int flags);
354 354
355 // save the header pseudo object _only_ 355 // save the header pseudo object _only_
356 bool _save_header (object_freezer &freezer); 356 bool _save_header (object_freezer &freezer);
357 MTH bool _save_header (const char *path); 357 MTH bool _save_header (const_octet_string path);
358 358
359 maptile (); 359 maptile ();
360 maptile (int w, int h); 360 maptile (int w, int h);
361 ~maptile (); 361 ~maptile ();
362 362
389 } 389 }
390 390
391 void make_map_floor (char **layout, char *floorstyle, random_map_params *RP); 391 void make_map_floor (char **layout, char *floorstyle, random_map_params *RP);
392 bool generate_random_map (random_map_params *RP); 392 bool generate_random_map (random_map_params *RP);
393 393
394 static maptile *find_async (const char *path, maptile *original = 0, bool load = true);//PERL 394 static maptile *find_async (const_utf8_string path, maptile *original = 0, bool load = true);//PERL
395 static maptile *find_sync (const char *path, maptile *original = 0);//PERL 395 static maptile *find_sync (const_utf8_string path, maptile *original = 0);//PERL
396 static maptile *find_style_sync (const char *dir, const char *file = 0);//PERL 396 static maptile *find_style_sync (const_utf8_string dir, const_utf8_string file = 0);//PERL
397 object *pick_random_object (rand_gen &gen = rndm) const; 397 object *pick_random_object (rand_gen &gen = rndm) const;
398 398
399 mapspace &at (uint32 x, uint32 y) const { return spaces [x * height + y]; } 399 mapspace &at (uint32 x, uint32 y) const { return spaces [x * height + y]; }
400 400
401 // return an array of maprects corresponding 401 // return an array of maprects corresponding

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines