PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
draw_buffers.h
Go to the documentation of this file.
1
6#ifndef __DRAW_BUFFERS_H__
7#define __DRAW_BUFFERS_H__
8
9#include <tamtypes.h>
10
12#define TEXTURE_COMPONENTS_RGB 0
13#define TEXTURE_COMPONENTS_RGBA 1
14
16#define TEXTURE_FUNCTION_MODULATE 0
17#define TEXTURE_FUNCTION_DECAL 1
18#define TEXTURE_FUNCTION_HIGHLIGHT 2
19#define TEXTURE_FUNCTION_HIGHLIGHT2 3
20
22#define CLUT_STORAGE_MODE1 0
23#define CLUT_STORAGE_MODE2 1
24
26#define CLUT_NO_LOAD 0
27#define CLUT_LOAD 1
28#define CLUT_LOAD_COPY_CBP0 2
29#define CLUT_LOAD_COPY_CBP1 3
30#define CLUT_COMPARE_CBP0 4
31#define CLUT_COMPARE_CBP1 5
32
33typedef struct {
34 unsigned char width;
35 unsigned char height;
36 unsigned char components;
37 unsigned char function;
38} texinfo_t;
39
40typedef struct {
41 unsigned int address;
42 unsigned int width;
43 unsigned int height;
44 unsigned int psm;
45 unsigned int mask;
47
48typedef struct {
49 unsigned int enable;
50 unsigned int method;
51 unsigned int address;
52 unsigned int zsm;
53 unsigned int mask;
54} zbuffer_t;
55
56typedef struct {
57 unsigned int address;
58 unsigned int width;
59 unsigned int psm;
62
63typedef struct {
64 unsigned int address;
65 unsigned int psm;
66 unsigned int storage_mode;
67 unsigned int start;
68 unsigned int load_method;
70
71#ifdef __cplusplus
72extern "C" {
73#endif
74
76unsigned char draw_log2(unsigned int x);
77
79qword_t *draw_framebuffer(qword_t *q, int context, framebuffer_t *frame);
80
82qword_t *draw_zbuffer(qword_t *q, int context, zbuffer_t *zbuffer);
83
85qword_t *draw_texturebuffer(qword_t *q, int context, texbuffer_t *texbuffer, clutbuffer_t *clut);
86
88qword_t *draw_clutbuffer(qword_t *q, int context, int psm, clutbuffer_t *clut);
89
91qword_t *draw_clut_offset(qword_t *q, int cbw, int u, int v);
92
93#ifdef __cplusplus
94}
95#endif
96
97#endif /* __DRAW_BUFFERS_H__ */
unsigned char draw_log2(unsigned int x)
Definition draw.c:349
qword_t * draw_framebuffer(qword_t *q, int context, framebuffer_t *frame)
qword_t * draw_clut_offset(qword_t *q, int cbw, int u, int v)
qword_t * draw_zbuffer(qword_t *q, int context, zbuffer_t *zbuffer)
qword_t * draw_texturebuffer(qword_t *q, int context, texbuffer_t *texbuffer, clutbuffer_t *clut)
qword_t * draw_clutbuffer(qword_t *q, int context, int psm, clutbuffer_t *clut)