From 214067d4b48f2ac49530dd61e4eb91c4c7ae287c Mon Sep 17 00:00:00 2001
From: Vito Caputo <vcaputo@pengaru.com>
Date: Sun, 24 Jul 2022 04:05:20 -0700
Subject: 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
---
 src/modules/plato/plato.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'src/modules/plato')

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;
-- 
cgit v1.2.3