aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2007-11-25 03:17:48 +0000
committerTravis Howell2007-11-25 03:17:48 +0000
commit28e0985061e96cc96f8fb08faaa1437db09df673 (patch)
tree649ad55133568ddc4d6a470234895ecd485a64f6
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
-rw-r--r--engines/scumm/he/script_v100he.cpp10
-rw-r--r--engines/scumm/he/script_v90he.cpp10
-rw-r--r--engines/scumm/he/wiz_he.cpp98
-rw-r--r--engines/scumm/he/wiz_he.h7
4 files changed, 65 insertions, 60 deletions
diff --git a/engines/scumm/he/script_v100he.cpp b/engines/scumm/he/script_v100he.cpp
index 273f6c6920..87be57d56f 100644
--- a/engines/scumm/he/script_v100he.cpp
+++ b/engines/scumm/he/script_v100he.cpp
@@ -1176,8 +1176,8 @@ void ScummEngine_v100he::o100_wizImageOps() {
_wizParams.processFlags = 0;
_wizParams.remapNum = 0;
_wizParams.img.flags = 0;
- _wizParams.field_184 = 0;
- _wizParams.field_180 = 0;
+ _wizParams.lineUnk2 = 0;
+ _wizParams.lineUnk1 = 0;
_wizParams.spriteId = 0;
_wizParams.spriteGroup = 0;
break;
@@ -1253,9 +1253,9 @@ void ScummEngine_v100he::o100_wizImageOps() {
_wizParams.processMode = 8;
break;
case 54:
- _wizParams.processFlags |= 0x100000;
- _wizParams.field_180 = pop();
- _wizParams.field_184 = pop();
+ _wizParams.processFlags |= kWPFThickLine;
+ _wizParams.lineUnk1 = pop();
+ _wizParams.lineUnk2 = pop();
break;
case 55:
_wizParams.img.flags = pop();
diff --git a/engines/scumm/he/script_v90he.cpp b/engines/scumm/he/script_v90he.cpp
index e344db21be..e4d101e2e1 100644
--- a/engines/scumm/he/script_v90he.cpp
+++ b/engines/scumm/he/script_v90he.cpp
@@ -670,8 +670,8 @@ void ScummEngine_v90he::o90_wizImageOps() {
_wizParams.processFlags = 0;
_wizParams.remapNum = 0;
_wizParams.img.flags = 0;
- _wizParams.field_184 = 0;
- _wizParams.field_180 = 0;
+ _wizParams.lineUnk2 = 0;
+ _wizParams.lineUnk1 = 0;
_wizParams.spriteId = 0;
_wizParams.spriteGroup = 0;
break;
@@ -763,9 +763,9 @@ void ScummEngine_v90he::o90_wizImageOps() {
_wizParams.dstResNum = pop();
break;
case 93: // HE99+
- _wizParams.processFlags |= 0x100000;
- _wizParams.field_180 = pop();
- _wizParams.field_184 = pop();
+ _wizParams.processFlags |= kWPFThickLine;
+ _wizParams.lineUnk1 = pop();
+ _wizParams.lineUnk2 = pop();
break;
case 95: // HE99+
_wizParams.processMode = 13;
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;
+ }
}
}
}
diff --git a/engines/scumm/he/wiz_he.h b/engines/scumm/he/wiz_he.h
index a9b60384f4..68be9d65e2 100644
--- a/engines/scumm/he/wiz_he.h
+++ b/engines/scumm/he/wiz_he.h
@@ -73,8 +73,8 @@ struct WizParameters {
int resDefImgW;
int resDefImgH;
int sourceImage;
- int field_180;
- int field_184;
+ int lineUnk1;
+ int lineUnk2;
uint8 remapColor[256];
uint8 remapIndex[256];
int remapNum;
@@ -132,7 +132,8 @@ enum WizProcessFlags {
kWPFDstResNum = 0x10000,
kWPFFillColor = 0x20000,
kWPFClipBox2 = 0x40000,
- kWPFMaskImg = 0x80000
+ kWPFMaskImg = 0x80000,
+ kWPFThickLine = 0x100000
};
enum {