From 5a7d400f4bae5c7d32eec59bc0f089c75bbc3610 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 19 Jan 2014 23:32:53 -0800 Subject: [PATCH] softgpu: Fix lines drawn upward or leftward. --- GPU/Software/Rasterizer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GPU/Software/Rasterizer.cpp b/GPU/Software/Rasterizer.cpp index 6639564d2..c804169ad 100644 --- a/GPU/Software/Rasterizer.cpp +++ b/GPU/Software/Rasterizer.cpp @@ -1237,9 +1237,9 @@ void DrawLine(const VertexData &v0, const VertexData &v1) int steps; if (abs(dx) < abs(dy)) - steps = dy / 16; + steps = abs(dy) / 16; else - steps = dx / 16; + steps = abs(dx) / 16; float xinc = (float)dx / steps; float yinc = (float)dy / steps;