From 028c7dcfa9f1920d5fa2e573790bef40c4076275 Mon Sep 17 00:00:00 2001 From: pixel Date: Mon, 11 Nov 2002 20:07:41 +0000 Subject: Still working ;-) --- includes/General.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'includes/General.h') diff --git a/includes/General.h b/includes/General.h index 6f423ed..2b645c9 100644 --- a/includes/General.h +++ b/includes/General.h @@ -4,4 +4,9 @@ #define MAX(__a,__b) ((__a)<(__b)?(__b):(__a)) #define MIN(__a,__b) ((__a)>(__b)?(__b):(__a)) +#define BITCOUNT(x) (((BX_(x)+(BX_(x)>>4)) & 0x0F0F0F0F) % 255) +#define BX_(x) ((x) - (((x)>>1)&0x77777777) \ + - (((x)>>2)&0x33333333) \ + - (((x)>>3)&0x11111111)) + #endif -- cgit v1.2.3