summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBad Diode <bd@badd10de.dev>2021-06-06 11:39:58 +0200
committerBad Diode <bd@badd10de.dev>2021-06-06 11:39:58 +0200
commit3a62d618693d34fc807824698e8a64ba9a8d804c (patch)
tree7ffa4f34cceea203682c152ba3e34a104dd7bb2f
parent3a141f98c21809baa84dd698b00174d8074f9a73 (diff)
downloadgba-sequencer-3a62d618693d34fc807824698e8a64ba9a8d804c.tar.gz
gba-sequencer-3a62d618693d34fc807824698e8a64ba9a8d804c.zip
Add extra comments for exported renderer functions
-rw-r--r--src/renderer.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/renderer.h b/src/renderer.h
index e0aae31..fd48bcf 100644
--- a/src/renderer.h
+++ b/src/renderer.h
@@ -28,12 +28,29 @@
28#define FONT_SB 15 28#define FONT_SB 15
29#define FONT_OFFSET 192 29#define FONT_OFFSET 192
30 30
31// Draws a pixel to the given (x, y) position on the framebuffer. All drawing
32// functions use paletted colors (clr: 0-15).
31void draw_pixel(size_t x, size_t y, u8 clr); 33void draw_pixel(size_t x, size_t y, u8 clr);
34
35// Draw a line between (x0, y0) and (x1, y1).
32void draw_line(size_t x0, size_t y0, size_t x1, size_t y1, u8 clr); 36void draw_line(size_t x0, size_t y0, size_t x1, size_t y1, u8 clr);
37
38// Draw a rectangle between (x0, y0) and (x1, y1) (x0 <= x1 && y0 <= y1).
33void draw_rect(size_t x0, size_t y0, size_t x1, size_t y1, u8 clr); 39void draw_rect(size_t x0, size_t y0, size_t x1, size_t y1, u8 clr);
40
41// Draw a filled rectangle between (x0, y0) and (x1, y1) (x0 <= x1 and y0 <= y1).
34void draw_filled_rect(size_t x0, size_t y0, size_t x1, size_t y1, u8 clr); 42void draw_filled_rect(size_t x0, size_t y0, size_t x1, size_t y1, u8 clr);
43
44// Draw a 8x8 tile starting at the (x, y) position. If the merge parameter is
45// set, colors will be added together instead of replaced. This could lead to
46// some merging issues if we are not careful with the chosen colors.
35void draw_tile(size_t x, size_t y, Tile *tile, bool merge); 47void draw_tile(size_t x, size_t y, Tile *tile, bool merge);
48
49// Copies the content of dirty tiles from the backbuffer into the frontbuffer.
50// To be called exactly once at the beginning of the VBlank.
36void flip_buffer(void); 51void flip_buffer(void);
52
53// Initializes the renderer.
37void renderer_init(void); 54void renderer_init(void);
38 55
39#endif // RENDERER__H 56#endif // RENDERER__H