aboutsummaryrefslogtreecommitdiff
path: root/fb.c
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2024-04-16 02:48:01 +0000
committerrodri <rgl@antares-labs.eu>2024-04-16 02:48:01 +0000
commitb41192ebe4f5f0720cf7e4dc5ca1f6fc0131daf1 (patch)
treebbd3aaa1a6c6c1e11cda1294c48a9832b1e40361 /fb.c
parenta101d22599c9052ab242d68e12522732e710cc9e (diff)
downloadlibgraphics-b41192ebe4f5f0720cf7e4dc5ca1f6fc0131daf1.tar.gz
libgraphics-b41192ebe4f5f0720cf7e4dc5ca1f6fc0131daf1.tar.bz2
libgraphics-b41192ebe4f5f0720cf7e4dc5ca1f6fc0131daf1.zip
replace the Triangle with a general purpose Primitive.
this is only an structural replacement and doesn't add support for the other primitive types.
Diffstat (limited to 'fb.c')
-rw-r--r--fb.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fb.c b/fb.c
index b630094..d7a896b 100644
--- a/fb.c
+++ b/fb.c
@@ -45,7 +45,7 @@ framebufctl_reset(Framebufctl *ctl)
/* address the back buffer—resetting the front buffer is VERBOTEN */
fb = ctl->getbb(ctl);
- memsetd(fb->zbuf, Inf(-1), Dx(fb->r)*Dy(fb->r));
+ memsetd(fb->zb, Inf(-1), Dx(fb->r)*Dy(fb->r));
memfillcolor(fb->cb, DTransparent);
}
@@ -69,8 +69,8 @@ mkfb(Rectangle r)
fb = emalloc(sizeof *fb);
memset(fb, 0, sizeof *fb);
fb->cb = eallocmemimage(r, RGBA32);
- fb->zbuf = emalloc(Dx(r)*Dy(r)*sizeof(*fb->zbuf));
- memsetd(fb->zbuf, Inf(-1), Dx(r)*Dy(r));
+ fb->zb = emalloc(Dx(r)*Dy(r)*sizeof(*fb->zb));
+ memsetd(fb->zb, Inf(-1), Dx(r)*Dy(r));
fb->r = r;
return fb;
}
@@ -78,7 +78,7 @@ mkfb(Rectangle r)
void
rmfb(Framebuf *fb)
{
- free(fb->zbuf);
+ free(fb->zb);
freememimage(fb->cb);
free(fb);
}