summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--render.c7
-rw-r--r--render.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/render.c b/render.c
index 348263d..023c33a 100644
--- a/render.c
+++ b/render.c
@@ -211,6 +211,13 @@ void ren_clip(Renderer* r, const Rect* c) {
r->clip[3] = c->y + c->h;
}
+void ren_clipr(Renderer* r) {
+ r->clip[0] = 0;
+ r->clip[1] = 0;
+ r->clip[2] = r->vp[0];
+ r->clip[3] = r->vp[1];
+}
+
void ren_point(Renderer* r, Colour c, int x, int y) {
if (x < r->clip[0]) return;
if (y < r->clip[1]) return;
diff --git a/render.h b/render.h
index 6c085cb..e655c52 100644
--- a/render.h
+++ b/render.h
@@ -70,6 +70,7 @@ void ren_clear(Renderer* r);
void ren_clearc(Renderer* r, Colour c);
void ren_cleard(Renderer* r, int depth);
void ren_clip(Renderer* r, const Rect* c);
+void ren_clipr(Renderer* r);
void ren_point(Renderer* r, Colour c, int x, int y);
void ren_rect(Renderer* r, Colour c, const Rect*);
void ren_char(