--- deliantra/server/include/util.h 2006/12/23 16:05:19 1.23 +++ deliantra/server/include/util.h 2006/12/30 10:16:10 1.25 @@ -8,9 +8,14 @@ #endif #include +#include +#include #include +#include +#include + // use a gcc extension for auto declarations until ISO C++ sanctifies them #define AUTODECL(var,expr) typeof(expr) var = (expr) @@ -122,21 +127,6 @@ } }; -struct refcounted -{ - refcounted () : refcnt (0) { } - virtual ~refcounted (); - void refcnt_inc () { ++refcnt; } - void refcnt_dec () { --refcnt; } - bool dead () { return refcnt == 0; } - mutable int refcnt; -#if 0 -private: - static refcounted *rc_first; - refcounted *rc_next; -#endif -}; - template struct refptr { @@ -168,9 +158,11 @@ operator T *() const { return p; } }; -typedef refptr player_ptr; +typedef refptr maptile_ptr; typedef refptr object_ptr; typedef refptr arch_ptr; +typedef refptr client_ptr; +typedef refptr player_ptr; struct str_hash { @@ -206,8 +198,6 @@ } }; -#include - template struct unordered_vector : std::vector > { @@ -248,5 +238,7 @@ // return current time as timestampe tstamp now (); +int similar_direction (int a, int b); + #endif