]> git.bts.cx Git - benzene.git/blob - src/bz/gfx/gfx.h
Sprites
[benzene.git] / src / bz / gfx / gfx.h
1 #ifndef BZ_GFX_GFX_H
2 #define BZ_GFX_GFX_H
3
4 #include <bz/math/matrix.h>
5 #include <bz/renderer/render_pass.h>
6 #include <bz/types/common.h>
7 #include <bz/types/rect.h>
8
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12
13 //typedef struct BZCanvas BZCanvas;
14 //typedef BZCanvas * BZCanvasID;
15
16 //static const int kBZGfxCanvasWidth = 256;
17 //static const int kBZGfxCanvasHeight = 128;
18
19 extern BZRenderPassID bzGFXRenderPass;
20
21 typedef float BZCoordinate;
22 typedef uint8_t BZPaletteColor;
23 typedef uint16_t BZPattern;
24
25 //extern BZRect bzCalculateCullRect(void);
26
27 //extern void bzClip(int x, int y, int w, int h);
28
29 extern void bzPSet(BZCoordinate x, BZCoordinate y, BZPaletteColor c);
30
31 extern BZPaletteColor bzSGet(int x, int y);
32 //extern void bzSSet(int x, int y, int c);
33
34 //extern bool bzFGet(int n, int f);
35 //extern void bzFSet(int n, int f, bool v);
36
37 extern void bzCls(BZPaletteColor c);
38
39 extern void bzGetCamera(BZCoordinate *x, BZCoordinate *y);
40 extern void bzCamera(BZCoordinate x, BZCoordinate y);
41
42 extern void bzCirc(BZCoordinate x, BZCoordinate y, BZCoordinate r, BZPaletteColor c);
43 extern void bzCircFill(BZCoordinate x, BZCoordinate y, BZCoordinate r, BZPaletteColor c);
44
45 //extern void bzOval(int x0, int y0, int x1, int y1, int c);
46 //extern void bzOvalFill(int x0, int y0, int x1, int y1, int c);
47
48 extern void bzLine(BZCoordinate x0, BZCoordinate y0, BZCoordinate x1, BZCoordinate y1, BZPaletteColor c);
49
50 extern void bzRect(BZCoordinate x0, BZCoordinate y0, BZCoordinate x1, BZCoordinate y1, BZPaletteColor c);
51 extern void bzRectFill(BZCoordinate x0, BZCoordinate y0, BZCoordinate x1, BZCoordinate y1, BZPaletteColor c);
52
53 extern void bzTriangle(BZCoordinate x0, BZCoordinate y0, BZCoordinate x1, BZCoordinate y1, BZCoordinate x2, BZCoordinate y2, BZPaletteColor c);
54
55 extern void bzSpr(size_t n, BZCoordinate x, BZCoordinate y);
56 extern void bzSprExt(size_t n, BZCoordinate x, BZCoordinate y, BZCoordinate w, BZCoordinate h, bool flipX, bool flipY);
57
58 extern void bzSSpr(BZCoordinate sx, BZCoordinate sy, BZCoordinate sw, BZCoordinate sh, BZCoordinate dx, BZCoordinate dy);
59 extern void bzSSprExt(BZCoordinate sx, BZCoordinate sy, BZCoordinate sw, BZCoordinate sh, BZCoordinate dx, BZCoordinate dy, BZCoordinate dw, BZCoordinate dh, bool flipX, bool flipY);
60
61 extern void bzPrint(BZCoordinate x, BZCoordinate y, BZPaletteColor color, const char *text);
62
63 extern void bzFillP(BZPattern p);
64
65 extern void bzSetPaletteColor(size_t palette, BZPaletteColor colorIdx, BZPaletteColor color);
66
67 extern void bzSetGlobalViewMatrix(const BZMatrix *mtx);
68 //extern void bzSetGlobalLocalMatrix(const BZMatrix *mtx);
69 //extern void bzSetGlobalBlendColor(BZPaletteColor color);
70
71 extern void bzSetOutputBuffer(size_t idx);
72
73 #ifdef __cplusplus
74 }
75 #endif
76
77 #endif