annotate src/xsf/desmume/bits.h @ 3203:f5456241bff9 default tip

changed include path from audacious to audlegacy.
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Tue, 10 Nov 2009 05:19:25 +0900
parents 70b0973e7b70
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2961
70b0973e7b70 Merge xsf plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
1 #ifndef BITS_H
70b0973e7b70 Merge xsf plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
2 #define BITS_H
70b0973e7b70 Merge xsf plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
3
70b0973e7b70 Merge xsf plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
4 #define BIT(n) (1<<(n))
70b0973e7b70 Merge xsf plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
5
70b0973e7b70 Merge xsf plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
6 #define BIT_N(i,n) (((i)>>(n))&1)
70b0973e7b70 Merge xsf plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
7 #define BIT0(i) ((i)&1)
70b0973e7b70 Merge xsf plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
8 #define BIT1(i) BIT_N(i,1)
70b0973e7b70 Merge xsf plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
9 #define BIT2(i) BIT_N(i,2)
70b0973e7b70 Merge xsf plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
10 #define BIT3(i) BIT_N(i,3)
70b0973e7b70 Merge xsf plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
11 #define BIT4(i) BIT_N(i,4)
70b0973e7b70 Merge xsf plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
12 #define BIT5(i) BIT_N(i,5)
70b0973e7b70 Merge xsf plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
13 #define BIT6(i) BIT_N(i,6)
70b0973e7b70 Merge xsf plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
14 #define BIT7(i) BIT_N(i,7)
70b0973e7b70 Merge xsf plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
15 #define BIT8(i) BIT_N(i,8)
70b0973e7b70 Merge xsf plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
16 #define BIT9(i) BIT_N(i,9)
70b0973e7b70 Merge xsf plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
17 #define BIT10(i) BIT_N(i,10)
70b0973e7b70 Merge xsf plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
18 #define BIT11(i) BIT_N(i,11)
70b0973e7b70 Merge xsf plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
19 #define BIT12(i) BIT_N(i,12)
70b0973e7b70 Merge xsf plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
20 #define BIT13(i) BIT_N(i,13)
70b0973e7b70 Merge xsf plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
21 #define BIT14(i) BIT_N(i,14)
70b0973e7b70 Merge xsf plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
22 #define BIT15(i) BIT_N(i,15)
70b0973e7b70 Merge xsf plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
23 #define BIT16(i) BIT_N(i,16)
70b0973e7b70 Merge xsf plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
24 #define BIT17(i) BIT_N(i,17)
70b0973e7b70 Merge xsf plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
25 #define BIT18(i) BIT_N(i,18)
70b0973e7b70 Merge xsf plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
26 #define BIT19(i) BIT_N(i,19)
70b0973e7b70 Merge xsf plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
27 #define BIT20(i) BIT_N(i,20)
70b0973e7b70 Merge xsf plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
28 #define BIT21(i) BIT_N(i,21)
70b0973e7b70 Merge xsf plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
29 #define BIT22(i) BIT_N(i,22)
70b0973e7b70 Merge xsf plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
30 #define BIT23(i) BIT_N(i,23)
70b0973e7b70 Merge xsf plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
31 #define BIT24(i) BIT_N(i,24)
70b0973e7b70 Merge xsf plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
32 #define BIT25(i) BIT_N(i,25)
70b0973e7b70 Merge xsf plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
33 #define BIT26(i) BIT_N(i,26)
70b0973e7b70 Merge xsf plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
34 #define BIT27(i) BIT_N(i,27)
70b0973e7b70 Merge xsf plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
35 #define BIT28(i) BIT_N(i,28)
70b0973e7b70 Merge xsf plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
36 #define BIT29(i) BIT_N(i,29)
70b0973e7b70 Merge xsf plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
37 #define BIT30(i) BIT_N(i,30)
70b0973e7b70 Merge xsf plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
38 #define BIT31(i) ((i)>>31)
70b0973e7b70 Merge xsf plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
39
70b0973e7b70 Merge xsf plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
40 #define CONDITION(i) (i)>>28
70b0973e7b70 Merge xsf plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
41
70b0973e7b70 Merge xsf plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
42 #define REG_POS(i,n) (((i)>>n)&0xF)
70b0973e7b70 Merge xsf plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
43
70b0973e7b70 Merge xsf plugin.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
44 #endif