m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/harddoomdev.c
diff options
context:
space:
mode:
authorMarcin Chrzanowski <marcin.j.chrzanowski@gmail.com>2018-05-23 13:41:01 +0200
committerMarcin Chrzanowski <marcin.j.chrzanowski@gmail.com>2018-05-23 13:41:01 +0200
commitaaf3b5b832aa1803918aa8653a9e397a7ed3b1e5 (patch)
tree8045d963306c21bb3121353174281d6397330e74 /harddoomdev.c
parentd910393a63f610d55c07408fd6f4547b86635988 (diff)
Implement fill rects
Diffstat (limited to 'harddoomdev.c')
-rw-r--r--harddoomdev.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/harddoomdev.c b/harddoomdev.c
index e4f6e80..9b327c0 100644
--- a/harddoomdev.c
+++ b/harddoomdev.c
@@ -68,6 +68,20 @@ void set_fill_color(void __iomem *iomem, uint8_t color)
send_command(iomem, HARDDOOM_CMD_FILL_COLOR(color));
}
+void fill_rect(struct surface_data *surface_data, struct doomdev_fill_rect rect)
+{
+ void __iomem *iomem;
+
+ iomem = surface_data->doom_data->iomem;
+
+ set_surf_dst_pt(iomem, surface_data->page_table_dev);
+ set_surf_dims(iomem, surface_data->width, surface_data->height);
+ set_xy_a(iomem, rect.pos_dst_x, rect.pos_dst_y);
+ set_fill_color(iomem, rect.color);
+
+ send_command(iomem, HARDDOOM_CMD_FILL_RECT(rect.width, rect.height));
+}
+
void draw_line(struct surface_data *surface_data, struct doomdev_line line)
{
void __iomem *iomem;