diff options
-rw-r--r-- | render.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -32,9 +32,14 @@ void ren_end(Renderer* r) { } void ren_clear(Renderer* r) { - int e = r->w * r->h >> 5, i; - for (i = 0; i < e; i++) - r->t[i] = 0; + int i, j; + for (j = r->clip[1]; j < r->clip[3]; j++) + for (i = r->clip[0]; i < r->clip[2]; i++) { + int idx = i + j * r->w; + int bit = 1 << (idx & 0x1f); + bit = ~bit; + r->t[idx >> 5] &= bit; + } } void ren_char(Renderer* r, int x, int y, char ch) { |