Start AVL functions three entries early for the moment in order to avoid
[tangerine.git] / test / getcybermapattr.c
blob43a6efed4607d135a0d2a6862d48ead4e83ccd33
1 #include <cybergraphx/cybergraphics.h>
3 #include <proto/intuition.h>
4 #include <proto/cybergraphics.h>
6 #include <stdio.h>
7 #include <string.h>
9 #define NUM_PIXFMT 14
11 static char *pixfmt_str[14]=
13 "LUT8",
14 "RGB15",
15 "BGR15",
16 "RGB15PC",
17 "BGR15PC",
18 "RGB16",
19 "BGR16",
20 "RGB16PC",
21 "BGR16PC",
22 "RGB24",
23 "BGR24",
24 "ARGB32",
25 "BGRA32",
26 "RGBA32"
29 int main(void)
31 struct Screen *scr = IntuitionBase->ActiveScreen;
33 if (scr)
35 struct BitMap *bm = scr->RastPort.BitMap;
36 LONG pixfmt;
38 pixfmt = GetCyberMapAttr(bm, CYBRMATTR_PIXFMT);
40 printf("Pixel Format: #%ld (%s)\n",
41 pixfmt,
42 ((pixfmt >= 0) && (pixfmt < NUM_PIXFMT)) ? pixfmt_str[pixfmt] : "<unknown>");
46 return 0;