--- deliantra/server/include/global.h 2007/02/01 19:15:39 1.41 +++ deliantra/server/include/global.h 2007/02/15 15:00:01 1.42 @@ -158,8 +158,12 @@ EXTERN std::vector animations; EXTERN int num_animations,animations_allocated, bmaps_checksum; -/* Rotate right from bsd sum. This is used in various places for checksumming */ -#define ROTATE_RIGHT(c) if ((c) & 01) (c) = ((c) >>1) + 0x80000000; else (c) >>= 1; +/* Rotate right. This is used in various places for checksumming */ +static inline uint32_t +ROTATE_RIGHT (uint32_t c) +{ + return (c >> 31) | (c << 1); +} #define SET_ANIMATION(ob,newanim) ob->face = new_faces + animations [ob->animation_id].faces [newanim] #define GET_ANIMATION(ob,anim) animations [ob->animation_id].faces [anim]