Debian Codegraph @

mednafen/video.h

raw symbols SCIP
1 #cxx . . $ `<file>/mednafen/video.h`/ifndef __MDFN_VIDEO_H
2 #define __MDFN_VIDEO_Hcxx . . $ `mednafen/video.h:2:9`!
3
4 #include <stdint.h>
5
6 #if defined(FRONTEND_SUPPORTS_RGB565cxx . . $ `<built-in>:501:9`!)
7 /* 16bit color - RGB565 */
8 #define RED_MASKcxx . . $ `mednafen/video.h:8:9`! 0xf800
9 #define GREEN_MASKcxx . . $ `mednafen/video.h:9:9`! 0x7e0
10 #define BLUE_MASKcxx . . $ `mednafen/video.h:10:9`! 0x1f
11 #define RED_EXPANDcxx . . $ `mednafen/video.h:11:9`! 3
12 #define GREEN_EXPANDcxx . . $ `mednafen/video.h:12:9`! 2
13 #define BLUE_EXPANDcxx . . $ `mednafen/video.h:13:9`! 3
14 #define RED_SHIFTcxx . . $ `mednafen/video.h:14:9`! 11
15 #define GREEN_SHIFTcxx . . $ `mednafen/video.h:15:9`! 5
16 #define BLUE_SHIFTcxx . . $ `mednafen/video.h:16:9`! 0
17 #define MAKECOLORcxx . . $ `mednafen/video.h:17:9`!(r, g, b, a) (((r >> RED_EXPAND) << RED_SHIFT) | ((g >> GREEN_EXPAND) << GREEN_SHIFT) | ((b >> BLUE_EXPAND) << BLUE_SHIFT))
18 #else
19 /* 16bit color - RGB555 */
20 #define RED_MASK 0x7c00
21 #define GREEN_MASK 0x3e0
22 #define BLUE_MASK 0x1f
23 #define RED_EXPAND 3
24 #define GREEN_EXPAND 3
25 #define BLUE_EXPAND 3
26 #define RED_SHIFT 10
27 #define GREEN_SHIFT 5
28 #define BLUE_SHIFT 0
29 #define MAKECOLOR(r, g, b, a) (((r >> RED_EXPAND) << RED_SHIFT) | ((g >> GREEN_EXPAND) << GREEN_SHIFT) | ((b >> BLUE_EXPAND) << BLUE_SHIFT))
30 #endif
31
32 #ifdef __cpluspluscxx . . $ `<built-in>:471:9`!
33 extern "C" {
34 #endif
35
36 typedef struct
37 {
38 int32_tcxx . . $ int32_t# x, y, w, h;
39 } MDFN_Rect;
40
41 typedef struct
42 {
43 unsigned int colorspace;
44 uint8_tcxx . . $ uint8_t# r_shift;
45 uint8_tcxx . . $ uint8_t# g_shift;
46 uint8_tcxx . . $ uint8_t# b_shift;
47 uint8_tcxx . . $ uint8_t# a_shift;
48 } MDFN_PixelFormat;
49
50 typedef struct
51 {
52 uint16_tcxx . . $ uint16_t# *pixels;
53 int32_tcxx . . $ int32_t# width;
54 int32_tcxx . . $ int32_t# height;
55 int32_tcxx . . $ int32_t# pitch;
56 } MDFN_Surface;
57
58 #ifdef __cpluspluscxx . . $ `<built-in>:471:9`!
59 }
60 #endif
61
62 #endif