aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/he/wiz_he.cpp
diff options
context:
space:
mode:
authorTravis Howell2007-11-25 03:17:48 +0000
committerTravis Howell2007-11-25 03:17:48 +0000
commit28e0985061e96cc96f8fb08faaa1437db09df673 (patch)
tree649ad55133568ddc4d6a470234895ecd485a64f6 /engines/scumm/he/wiz_he.cpp
parentf47add1b7ed57a0ca7cb6a869e575436ec3af436 (diff)
downloadscummvm-rg350-28e0985061e96cc96f8fb08faaa1437db09df673.tar.gz
scummvm-rg350-28e0985061e96cc96f8fb08faaa1437db09df673.tar.bz2
scummvm-rg350-28e0985061e96cc96f8fb08faaa1437db09df673.zip
Add stub for wizImages thickLine code.
svn-id: r29632
Diffstat (limited to 'engines/scumm/he/wiz_he.cpp')
-rw-r--r--engines/scumm/he/wiz_he.cpp98
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;
+ }
}
}
}