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.102 by root, Tue Dec 23 06:58:23 2008 UTC vs.
Revision 1.103 by root, Tue Dec 23 22:03:06 2008 UTC

458 y = pos.y; 458 y = pos.y;
459 459
460 return pos; 460 return pos;
461} 461}
462 462
463// iterate over a rectangular area relative to op
464// can be used as a single statement, but both iterate macros
465// invocations must not be followed by a ";"
466// see common/los.C for usage example
467#define rectangular_mapspace_iterate_begin(op,dx0,dx1,dy0,dy1) \
468 for (int dx = (dx0); dx <= (dx1); dx++) \
469 { \
470 sint16 nx, ny; \
471 maptile *m = 0; \
472 \
473 for (int dy = (dy0); dy <= (dy1); dy++) \
474 { \
475 /* check to see if we can simply go one down quickly, */ \
476 /* if not, due it the slow way */ \
477 if (!m || ++ny >= m->height) \
478 { \
479 nx = (op)->x + dx; ny = (op)->y + dy; m = (op)->map; \
480 \
481 if (xy_normalise (m, nx, ny)) \
482 m->touch (); \
483 else \
484 m = 0; \
485 }
486
487#define rectangular_mapspace_iterate_end \
488 } \
489 }
490
463#endif 491#endif
464 492

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines