diff options
Diffstat (limited to 'engines/scumm/he/wiz_he.cpp')
-rw-r--r-- | engines/scumm/he/wiz_he.cpp | 98 |
1 files changed, 51 insertions, 47 deletions
diff --git a/engines/scumm/he/wiz_he.cpp b/engines/scumm/he/wiz_he.cpp index 97995fb155..e4e93232dc 100644 --- a/engines/scumm/he/wiz_he.cpp +++ b/engines/scumm/he/wiz_he.cpp @@ -1774,58 +1774,62 @@ void Wiz::fillWizLine(const WizParameters *params) { int x2 = params->box2.right; int y2 = params->box2.bottom; - int dx = x2 - x1; - int incx = 0; - if (dx > 0) { - incx = 1; - } else if (dx < 0) { - incx = -1; - } - int dy = y2 - y1; - int incy = 0; - if (dy > 0) { - incy = 1; - } else if (dy < 0) { - incy = -1; - } - - dx = ABS(x2 - x1); - dy = ABS(y2 - y1); + if (params->processFlags & kWPFThickLine) { + debug(0, "Unsupported ThickLine (%d, %d)", params->lineUnk1, params->lineUnk2); + } else { + int dx = x2 - x1; + int incx = 0; + if (dx > 0) { + incx = 1; + } else if (dx < 0) { + incx = -1; + } + int dy = y2 - y1; + int incy = 0; + if (dy > 0) { + incy = 1; + } else if (dy < 0) { + incy = -1; + } - if (imageRect.contains(x1, y1)) { - *(wizd + y1 * w + x1) = color; - } + dx = ABS(x2 - x1); + dy = ABS(y2 - y1); - if (dx >= dy) { - int step1_y = (dy - dx) * 2; - int step2_y = dy * 2; - int accum_y = dy * 2 - dx; - while (x1 != x2) { - if (accum_y <= 0) { - accum_y += step2_y; - } else { - accum_y += step1_y; - y1 += incy; - } - x1 += incx; - if (imageRect.contains(x1, y1)) { - *(wizd + y1 * w + x1) = color; - } + if (imageRect.contains(x1, y1)) { + *(wizd + y1 * w + x1) = color; } - } else { - int step1_x = (dx - dy) * 2; - int step2_x = dx * 2; - int accum_x = dx * 2 - dy; - while (y1 != y2) { - if (accum_x <= 0) { - accum_x += step2_x; - } else { - accum_x += step1_x; + + if (dx >= dy) { + int step1_y = (dy - dx) * 2; + int step2_y = dy * 2; + int accum_y = dy * 2 - dx; + while (x1 != x2) { + if (accum_y <= 0) { + accum_y += step2_y; + } else { + accum_y += step1_y; + y1 += incy; + } x1 += incx; + if (imageRect.contains(x1, y1)) { + *(wizd + y1 * w + x1) = color; + } } - y1 += incy; - if (imageRect.contains(x1, y1)) { - *(wizd + y1 * w + x1) = color; + } else { + int step1_x = (dx - dy) * 2; + int step2_x = dx * 2; + int accum_x = dx * 2 - dy; + while (y1 != y2) { + if (accum_x <= 0) { + accum_x += step2_x; + } else { + accum_x += step1_x; + x1 += incx; + } + y1 += incy; + if (imageRect.contains(x1, y1)) { + *(wizd + y1 * w + x1) = color; + } } } } |