started implementing some GPU abstractions and moved test to C
[psx_test1] / src / gpu.h
1 #ifndef GPU_H_
2 #define GPU_H_
3
4 typedef short int16_t;
5 typedef unsigned long uint32_t;
6
7 /* flat vertex */
8 struct gpu_vert {
9         int16_t x, y;
10 };
11
12 /* gouraud vertex */
13 struct gpu_gvert {
14         uint32_t color;
15         int16_t x, y;
16 };
17
18
19 void gpu_reset(void);
20 void gpu_setmode(int xsz, int ysz, int bpp, int rate);
21 void gpu_display(int en);
22 void gpu_cliprect(int x, int y, int w, int h);
23 void gpu_origin(int x, int y);
24
25 void gpu_fillrect(int x, int y, int w, int h, unsigned int col);
26
27 void gpu_draw_flat(int cmd, uint32_t color, struct gpu_vert *data, int vcount);
28 void gpu_draw_gouraud(int cmd, struct gpu_gvert *data, int vcount);
29
30 #endif  /* GPU_H_ */