[Scummvm-cvs-logs] SF.net SVN: scummvm: [29632] scummvm/trunk/engines/scumm/he
Kirben at users.sourceforge.net
Kirben at users.sourceforge.net
Sun Nov 25 04:17:48 CET 2007
Revision: 29632
http://scummvm.svn.sourceforge.net/scummvm/?rev=29632&view=rev
Author: Kirben
Date: 2007-11-24 19:17:48 -0800 (Sat, 24 Nov 2007)
Log Message:
-----------
Add stub for wizImages thickLine code.
Modified Paths:
--------------
scummvm/trunk/engines/scumm/he/script_v100he.cpp
scummvm/trunk/engines/scumm/he/script_v90he.cpp
scummvm/trunk/engines/scumm/he/wiz_he.cpp
scummvm/trunk/engines/scumm/he/wiz_he.h
Modified: scummvm/trunk/engines/scumm/he/script_v100he.cpp
===================================================================
--- scummvm/trunk/engines/scumm/he/script_v100he.cpp 2007-11-24 23:58:09 UTC (rev 29631)
+++ scummvm/trunk/engines/scumm/he/script_v100he.cpp 2007-11-25 03:17:48 UTC (rev 29632)
@@ -1176,8 +1176,8 @@
_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 @@
_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();
Modified: scummvm/trunk/engines/scumm/he/script_v90he.cpp
===================================================================
--- scummvm/trunk/engines/scumm/he/script_v90he.cpp 2007-11-24 23:58:09 UTC (rev 29631)
+++ scummvm/trunk/engines/scumm/he/script_v90he.cpp 2007-11-25 03:17:48 UTC (rev 29632)
@@ -670,8 +670,8 @@
_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 @@
_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;
Modified: scummvm/trunk/engines/scumm/he/wiz_he.cpp
===================================================================
--- scummvm/trunk/engines/scumm/he/wiz_he.cpp 2007-11-24 23:58:09 UTC (rev 29631)
+++ scummvm/trunk/engines/scumm/he/wiz_he.cpp 2007-11-25 03:17:48 UTC (rev 29632)
@@ -1774,58 +1774,62 @@
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;
- }
+ 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;
+ }
- dx = ABS(x2 - x1);
- dy = ABS(y2 - y1);
+ dx = ABS(x2 - x1);
+ dy = ABS(y2 - y1);
- if (imageRect.contains(x1, y1)) {
- *(wizd + y1 * w + x1) = color;
- }
+ if (imageRect.contains(x1, y1)) {
+ *(wizd + y1 * w + x1) = color;
+ }
- 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;
- }
- }
- } 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;
+ }
}
}
}
Modified: scummvm/trunk/engines/scumm/he/wiz_he.h
===================================================================
--- scummvm/trunk/engines/scumm/he/wiz_he.h 2007-11-24 23:58:09 UTC (rev 29631)
+++ scummvm/trunk/engines/scumm/he/wiz_he.h 2007-11-25 03:17:48 UTC (rev 29632)
@@ -73,8 +73,8 @@
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 @@
kWPFDstResNum = 0x10000,
kWPFFillColor = 0x20000,
kWPFClipBox2 = 0x40000,
- kWPFMaskImg = 0x80000
+ kWPFMaskImg = 0x80000,
+ kWPFThickLine = 0x100000
};
enum {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list