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

Comparing deliantra/server/include/util.h (file contents):
Revision 1.28 by root, Mon Jan 15 01:25:41 2007 UTC vs.
Revision 1.29 by root, Mon Jan 15 01:39:42 2007 UTC

62#else 62#else
63 return dx + dy - min (dx, dy) * 5 / 8; 63 return dx + dy - min (dx, dy) * 5 / 8;
64#endif 64#endif
65} 65}
66 66
67/*
68 * absdir(int): Returns a number between 1 and 8, which represent
69 * the "absolute" direction of a number (it actually takes care of
70 * "overflow" in previous calculations of a direction).
71 */
72inline int
73absdir (int d)
74{
75 return ((d - 1) & 7) + 1;
76}
67 77
68// makes dynamically allocated objects zero-initialised 78// makes dynamically allocated objects zero-initialised
69struct zero_initialised 79struct zero_initialised
70{ 80{
71 void *operator new (size_t s, void *p) 81 void *operator new (size_t s, void *p)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines