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.68 by root, Fri Feb 16 19:43:41 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 */
192typedef object_vector<region, &region::index> regionvec; 190typedef object_vector<region, &region::index> regionvec;
193 191
194extern regionvec regions; 192extern regionvec regions;
195 193
196#define for_all_regions(var) \ 194#define for_all_regions(var) \
197 for (int _i = 0; _i < regions.size (); ++_i) \ 195 for (unsigned _i = 0; _i < regions.size (); ++_i) \
198 declvar (region *, var, regions [_i]) 196 declvar (region *, var, regions [_i])
199 197
200struct shopitems : zero_initialised 198struct shopitems : zero_initialised
201{ 199{
202 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 */
355 } 353 }
356 354
357 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);
358 bool generate_random_map (random_map_params *RP); 356 bool generate_random_map (random_map_params *RP);
359 357
358 static maptile *find_async (const char *path, maptile *original = 0);//PERL
360 static maptile *find_sync (const char *path, maptile *original = 0);//PERL 359 static maptile *find_sync (const char *path, maptile *original = 0);//PERL
361 // async prefetch 360 static maptile *find_style_sync (const char *dir, const char *file = 0);//PERL
362 static maptile *find_async (const char *path, maptile *original = 0);//PERL 361 MTH object *pick_random_object () const;
363 362
364 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]; }
365 mapspace &at (uint32 x, uint32 y) { return spaces [x * height + y]; } 364 mapspace &at (uint32 x, uint32 y) { return spaces [x * height + y]; }
366}; 365};
367 366

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines