|
TrinityCore
|
Go to the documentation of this file.
4 #define _BIT(N, K) (((N >> (3*K)) & 1) << K)
6 #define _OCT_CODED_BIN(N) \
7 (_BIT(N, 0) | _BIT(N, 1) | _BIT(N, 2) | _BIT(N, 3) | \
8 _BIT(N, 4) | _BIT(N, 5) | _BIT(N, 6) | _BIT(N, 7) | \
9 _BIT(N, | _BIT(N, 9) | _BIT(N, 10))
23 #define BIN11(N) _OCT_CODED_BIN(0 ## N ## UL)
31 #define HEX__(n) 0x##n##LU
34 #define B8__(x) ((x&0x0000000FLU)?1:0) \
35 +((x&0x000000F0LU)?2:0) \
36 +((x&0x00000F00LU)?4:0) \
37 +((x&0x0000F000LU)?8:0) \
38 +((x&0x000F0000LU)?16:0) \
39 +((x&0x00F00000LU)?32:0) \
40 +((x&0x0F000000LU)?64:0) \
41 +((x&0xF0000000LU)?128:0)
56 #define BIN8(d) ((unsigned char)B8__(HEX__(d)))
70 #define BIN16(dmsb, dlsb) (((unsigned short)BIN8(dmsb) << 8) + BIN8(dlsb))
86 #define BIN32(dmsb,db2,db3,dlsb) \
87 (((unsigned long)BIN8(dmsb) << 24) + \
88 ((unsigned long)BIN8(db2) << 16) + \
89 ((unsigned long)BIN8(db3) << 8) + \