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.43 by root, Sun Dec 31 10:28:36 2006 UTC vs.
Revision 1.46 by root, Mon Jan 1 12:28:47 2007 UTC

96 * this was introduced to make shops safer 96 * this was introduced to make shops safer
97 * but is useful in other situations */ 97 * but is useful in other situations */
98#define P_IS_ALIVE 0x10 /* something alive is on this space */ 98#define P_IS_ALIVE 0x10 /* something alive is on this space */
99#define P_NO_CLERIC 0x20 /* no clerical spells cast here */ 99#define P_NO_CLERIC 0x20 /* no clerical spells cast here */
100 100
101#define P_NEED_UPDATE 0x80 /* this space is out of date */ 101#define P_UPTODATE 0x80 /* this space is up to date */
102 102
103/* The following two values are not stored in the MapLook flags, but instead 103/* The following two values are not stored in the MapLook flags, but instead
104 * used in the get_map_flags value - that function is used to return 104 * used in the get_map_flags value - that function is used to return
105 * the flag value, as well as other conditions - using a more general 105 * the flag value, as well as other conditions - using a more general
106 * function that does more of the work can hopefully be used to replace 106 * function that does more of the work can hopefully be used to replace
134 MoveType move_off; /* What movement types are activated */ 134 MoveType move_off; /* What movement types are activated */
135 135
136 void update_ (); 136 void update_ ();
137 void update () 137 void update ()
138 { 138 {
139 if (flags_ & P_NEED_UPDATE) 139 if (!(flags_ & P_UPTODATE))
140 update_ (); 140 update_ ();
141 } 141 }
142 142
143 uint8 flags () 143 uint8 flags ()
144 { 144 {
231 * the region */ 231 * the region */
232 double ACC (RW, reset_time); 232 double ACC (RW, reset_time);
233 uint32 ACC (RW, reset_timeout); /* How many seconds must elapse before this map 233 uint32 ACC (RW, reset_timeout); /* How many seconds must elapse before this map
234 * should be reset 234 * should be reset
235 */ 235 */
236 bool ACC (RW, dirty); /* if true, something was inserted or removed */
236 bool ACC (RW, fixed_resettime); /* if true, reset time is not affected by 237 bool ACC (RW, fixed_resettime); /* if true, reset time is not affected by
237 * players entering/exiting map 238 * players entering/exiting map
238 */ 239 */
239 sint32 ACC (RW, timeout); /* swapout is set to this */ 240 sint32 ACC (RW, timeout); /* swapout is set to this */
240 sint32 ACC (RW, swap_time); /* When it reaches 0, the map will be swapped out */ 241 sint32 ACC (RW, swap_time); /* When it reaches 0, the map will be swapped out */
284 MTH int change_map_light (int change); 285 MTH int change_map_light (int change);
285 static void change_all_map_light (int change); //PERL 286 static void change_all_map_light (int change); //PERL
286 MTH void set_darkness_map (); 287 MTH void set_darkness_map ();
287 MTH int estimate_difficulty () const; 288 MTH int estimate_difficulty () const;
288 289
290 // set the given flag on all objects in the map
291 MTH void set_object_flag (int flag, int value = 1);
292
289 MTH void link_multipart_objects (); 293 MTH void link_multipart_objects ();
290 MTH void clear_unique_items (); 294 MTH void clear_unique_items ();
291 295
292 MTH void clear_header (); 296 MTH void clear_header ();
293 MTH void clear_links_to (maptile *m); 297 MTH void clear_links_to (maptile *m);
316 void gather_callbacks (AV *&callbacks, event_type event) const; 320 void gather_callbacks (AV *&callbacks, event_type event) const;
317 321
318 MTH int size () const { return width * height; } 322 MTH int size () const { return width * height; }
319 323
320 MTH object *insert (object *op, int x, int y, object *originator = 0, int flags = 0); 324 MTH object *insert (object *op, int x, int y, object *originator = 0, int flags = 0);
325
326 MTH void touch () { last_access = runtime; }
321 327
322// static maptile *find_map (const char *path, maptile *origin);//PERL 328// static maptile *find_map (const char *path, maptile *origin);//PERL
323// 329//
324// // load a map relative to this one 330// // load a map relative to this one
325// maptile *find_map (const char *path) 331// maptile *find_map (const char *path)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines