m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/harddoomdev.c
diff options
context:
space:
mode:
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;