ps2sdk  1.1
A collection of Open Source libraries used for developing applications on Sony's PlayStation 2® (PS2).
draw_blending.h
Go to the documentation of this file.
1 
6 #ifndef __DRAW_BLENDING_H__
7 #define __DRAW_BLENDING_H__
8 
9 #include <tamtypes.h>
10 
11 // color = (c1-c2)*a>>7 + c3
12 
14 #define BLEND_COLOR_SOURCE 0
15 #define BLEND_COLOR_DEST 1
16 #define BLEND_COLOR_ZERO 2
17 
18 #define BLEND_ALPHA_SOURCE 0
19 #define BLEND_ALPHA_DEST 1
20 #define BLEND_ALPHA_FIXED 2
21 
23 #define ALPHA_CORRECT_RGBA32 0
24 #define ALPHA_CORRECT_RGBA16 1
25 
26 typedef struct {
27  char color1;
28  char color2;
29  char alpha;
30  char color3;
31  unsigned char fixed_alpha;
32 } blend_t;
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
40 
43 
45 qword_t *draw_alpha_correction(qword_t *q, int context, int alpha);
46 
47 #ifdef __cplusplus
48 }
49 #endif
50 
51 #endif /* __DRAW_BLENDING_H__ */
u8 context
Definition: main.c:71
qword_t * draw_pixel_alpha_control(qword_t *q, int enable)
qword_t * draw_alpha_blending(qword_t *q, int context, blend_t *blend)
qword_t * draw_alpha_correction(qword_t *q, int context, int alpha)
char alpha
Definition: draw_blending.h:29
unsigned char fixed_alpha
Definition: draw_blending.h:31
char color3
Definition: draw_blending.h:30
char color2
Definition: draw_blending.h:28
char color1
Definition: draw_blending.h:27