summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2022-07-24 04:05:20 -0700
committerVito Caputo <vcaputo@pengaru.com>2022-07-24 04:25:33 -0700
commit214067d4b48f2ac49530dd61e4eb91c4c7ae287c (patch)
treeb8f903cbc02a1082939f5d84fb560730fecb00c6 /src/modules
parent6e72b655cd44828ce15a84b1adb38f5b63634f3e (diff)
modules/plato: scale to frame size
quick and dirty fixup for proper use as checkers fill_module= note this thing already relies on _checked() put_pixel variant
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/plato/plato.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/plato/plato.c b/src/modules/plato/plato.c
index 3aa89fa..43d9bdd 100644
--- a/src/modules/plato/plato.c
+++ b/src/modules/plato/plato.c
@@ -597,11 +597,11 @@ static void draw_polyhedron(const polyhedron_t *polyhedron, m4f_t *transform, ti
_xv = m4f_mult_v3f(transform, _v);
xv = m4f_mult_v3f(transform, v);
- x1 = _xv.x / (_xv.z + ZCONST) * fragment->width + fragment->width * .5f;
- y1 = _xv.y / (_xv.z + ZCONST) * fragment->height + fragment->height * .5f;
+ x1 = _xv.x / (_xv.z + ZCONST) * fragment->frame_width + fragment->frame_width * .5f;
+ y1 = _xv.y / (_xv.z + ZCONST) * fragment->frame_height + fragment->frame_height * .5f;
- x2 = xv.x / (xv.z + ZCONST) * fragment->width + fragment->width * .5f;
- y2 = xv.y / (xv.z + ZCONST) * fragment->height + fragment->height * .5f;
+ x2 = xv.x / (xv.z + ZCONST) * fragment->frame_width + fragment->frame_width * .5f;
+ y2 = xv.y / (xv.z + ZCONST) * fragment->frame_height + fragment->frame_height * .5f;
draw_line(fragment, x1, y1, x2, y2);
_v = v;
© All Rights Reserved