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.66 by root, Wed Feb 7 23:50:01 2007 UTC vs.
Revision 1.72 by root, Mon Mar 12 01:13:10 2007 UTC

65// all those macros are herewith declared legacy 65// all those macros are herewith declared legacy
66#define GET_MAP_FLAGS(M,X,Y) (M)->at((X),(Y)).flags () 66#define GET_MAP_FLAGS(M,X,Y) (M)->at((X),(Y)).flags ()
67#define GET_MAP_LIGHT(M,X,Y) (M)->at((X),(Y)).light 67#define GET_MAP_LIGHT(M,X,Y) (M)->at((X),(Y)).light
68#define GET_MAP_OB(M,X,Y) (M)->at((X),(Y)).bot 68#define GET_MAP_OB(M,X,Y) (M)->at((X),(Y)).bot
69#define GET_MAP_TOP(M,X,Y) (M)->at((X),(Y)).top 69#define GET_MAP_TOP(M,X,Y) (M)->at((X),(Y)).top
70#define GET_MAP_FACE(M,X,Y,L) (M)->at((X),(Y)).faces[L]
71#define GET_MAP_FACE_OBJ(M,X,Y,L) (M)->at((X),(Y)).faces_obj[L] 70#define GET_MAP_FACE_OBJ(M,X,Y,L) (M)->at((X),(Y)).faces_obj[L]
72#define GET_MAP_MOVE_BLOCK(M,X,Y) (M)->at((X),(Y)).move_block 71#define GET_MAP_MOVE_BLOCK(M,X,Y) (M)->at((X),(Y)).move_block
73#define GET_MAP_MOVE_SLOW(M,X,Y) (M)->at((X),(Y)).move_slow 72#define GET_MAP_MOVE_SLOW(M,X,Y) (M)->at((X),(Y)).move_slow
74#define GET_MAP_MOVE_ON(M,X,Y) (M)->at((X),(Y)).move_on 73#define GET_MAP_MOVE_ON(M,X,Y) (M)->at((X),(Y)).move_on
75#define GET_MAP_MOVE_OFF(M,X,Y) (M)->at((X),(Y)).move_off 74#define GET_MAP_MOVE_OFF(M,X,Y) (M)->at((X),(Y)).move_off
118 * to extend information about a space. 117 * to extend information about a space.
119 */ 118 */
120struct mapspace 119struct mapspace
121{ 120{
122 object *bot, *top; /* lowest/highest object on this space */ 121 object *bot, *top; /* lowest/highest object on this space */
123 facetile *faces[MAP_LAYERS]; /* faces for the 3 layers */
124 object *faces_obj[MAP_LAYERS];/* face objects for the 3 layers */ 122 object *faces_obj[MAP_LAYERS];/* face objects for the 3 layers */
125 uint8 flags_; /* flags about this space (see the P_ values above) */ 123 uint8 flags_; /* flags about this space (see the P_ values above) */
126 sint8 light; /* How much light this space provides */ 124 sint8 light; /* How much light this space provides */
127 MoveType move_block; /* What movement types this space blocks */ 125 MoveType move_block; /* What movement types this space blocks */
128 MoveType move_slow; /* What movement types this space slows */ 126 MoveType move_slow; /* What movement types this space slows */
184 * this should be the one we fall back on as the default */ 182 * this should be the one we fall back on as the default */
185 183
186 static region *default_region (); 184 static region *default_region ();
187 static region *find (const char *name); 185 static region *find (const char *name);
188 static region *find_fuzzy (const char *name); 186 static region *find_fuzzy (const char *name);
187 static region *read (object_thawer &f);
189}; 188};
190 189
191typedef object_vector<region, &region::index> regionvec; 190typedef object_vector<region, &region::index> regionvec;
192 191
193extern regionvec regions; 192extern regionvec regions;
194 193
195#define for_all_regions(var) \ 194#define for_all_regions(var) \
196 for (int _i = 0; _i < regions.size (); ++_i) \ 195 for (unsigned _i = 0; _i < regions.size (); ++_i) \
197 declvar (region *, var, regions [_i]) 196 declvar (region *, var, regions [_i])
198 197
199struct shopitems : zero_initialised 198struct shopitems : zero_initialised
200{ 199{
201 const char *name; /* name of the item in question, null if it is the default item */ 200 const char *name; /* name of the item in question, null if it is the default item */
354 } 353 }
355 354
356 void make_map_floor (char **layout, char *floorstyle, random_map_params *RP); 355 void make_map_floor (char **layout, char *floorstyle, random_map_params *RP);
357 bool generate_random_map (random_map_params *RP); 356 bool generate_random_map (random_map_params *RP);
358 357
358 static maptile *find_async (const char *path, maptile *original = 0);//PERL
359 static maptile *find_sync (const char *path, maptile *original = 0);//PERL 359 static maptile *find_sync (const char *path, maptile *original = 0);//PERL
360 // async prefetch 360 static maptile *find_style_sync (const char *dir, const char *file = 0);//PERL
361 static maptile *find_async (const char *path, maptile *original = 0);//PERL 361 MTH object *pick_random_object () const;
362 362
363 mapspace const &at (uint32 x, uint32 y) const { return spaces [x * height + y]; } 363 mapspace const &at (uint32 x, uint32 y) const { return spaces [x * height + y]; }
364 mapspace &at (uint32 x, uint32 y) { return spaces [x * height + y]; } 364 mapspace &at (uint32 x, uint32 y) { return spaces [x * height + y]; }
365}; 365};
366 366

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines