PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
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
26typedef 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
35extern "C" {
36#endif
37
39qword_t *draw_pixel_alpha_control(qword_t *q, int enable);
40
42qword_t *draw_alpha_blending(qword_t *q, int context, blend_t *blend);
43
45qword_t *draw_alpha_correction(qword_t *q, int context, int alpha);
46
47#ifdef __cplusplus
48}
49#endif
50
51#endif /* __DRAW_BLENDING_H__ */
qword_t * draw_pixel_alpha_control(qword_t *q, int enable)
qword_t * draw_alpha_correction(qword_t *q, int context, int alpha)
qword_t * draw_alpha_blending(qword_t *q, int context, blend_t *blend)