Correction for shapes drawing in fun shop titles.
svn-id: r19424
This commit is contained in:
parent
7cef807757
commit
eaf2f611f7
1 changed files with 14 additions and 11 deletions
|
@ -1602,12 +1602,12 @@ void Wiz::fillWizLine(const WizParameters *params) {
|
||||||
int w = READ_LE_UINT32(wizh + 0x4);
|
int w = READ_LE_UINT32(wizh + 0x4);
|
||||||
int h = READ_LE_UINT32(wizh + 0x8);
|
int h = READ_LE_UINT32(wizh + 0x8);
|
||||||
assert(c == 0);
|
assert(c == 0);
|
||||||
Common::Rect r1(w, h);
|
Common::Rect imageRect(w, h);
|
||||||
if (params->processFlags & kWPFClipBox) {
|
if (params->processFlags & kWPFClipBox) {
|
||||||
if (!r1.intersects(params->box)) {
|
if (!imageRect.intersects(params->box)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
r1.clip(params->box);
|
imageRect.clip(params->box);
|
||||||
}
|
}
|
||||||
uint8 color = _vm->VAR(93);
|
uint8 color = _vm->VAR(93);
|
||||||
if (params->processFlags & kWPFFillColor) {
|
if (params->processFlags & kWPFFillColor) {
|
||||||
|
@ -1635,7 +1635,10 @@ void Wiz::fillWizLine(const WizParameters *params) {
|
||||||
incy = -1;
|
incy = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (r1.contains(x1, y1)) {
|
dx = ABS(x2 - x1);
|
||||||
|
dy = ABS(y2 - y1);
|
||||||
|
|
||||||
|
if (imageRect.contains(x1, y1)) {
|
||||||
*(wizd + y1 * w + x1) = color;
|
*(wizd + y1 * w + x1) = color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1651,7 +1654,7 @@ void Wiz::fillWizLine(const WizParameters *params) {
|
||||||
y1 += incy;
|
y1 += incy;
|
||||||
}
|
}
|
||||||
x1 += incx;
|
x1 += incx;
|
||||||
if (r1.contains(x1, y1)) {
|
if (imageRect.contains(x1, y1)) {
|
||||||
*(wizd + y1 * w + x1) = color;
|
*(wizd + y1 * w + x1) = color;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1667,7 +1670,7 @@ void Wiz::fillWizLine(const WizParameters *params) {
|
||||||
x1 += incx;
|
x1 += incx;
|
||||||
}
|
}
|
||||||
y1 += incy;
|
y1 += incy;
|
||||||
if (r1.contains(x1, y1)) {
|
if (imageRect.contains(x1, y1)) {
|
||||||
*(wizd + y1 * w + x1) = color;
|
*(wizd + y1 * w + x1) = color;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1716,7 +1719,7 @@ void Wiz::processWizImage(const WizParameters *params) {
|
||||||
char buf[512];
|
char buf[512];
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
debug(1, "processWizImage: processMode %d", params->processMode);
|
debug(0, "processWizImage: processMode %d", params->processMode);
|
||||||
switch (params->processMode) {
|
switch (params->processMode) {
|
||||||
case 0:
|
case 0:
|
||||||
// Used in racedemo
|
// Used in racedemo
|
||||||
|
@ -1842,15 +1845,15 @@ void Wiz::processWizImage(const WizParameters *params) {
|
||||||
fillWizFlood(params);
|
fillWizFlood(params);
|
||||||
break;
|
break;
|
||||||
case 13:
|
case 13:
|
||||||
// Used in PuttsFunShop/SamsFunShop
|
// Used for text in FreddisFunShop/PuttsFunShop/SamsFunShop
|
||||||
// TODO: Start Font
|
// TODO: Start Font
|
||||||
break;
|
break;
|
||||||
case 14:
|
case 14:
|
||||||
// Used in PuttsFunShop/SamsFunShop
|
// Used for text in FreddisFunShop/PuttsFunShop/SamsFunShop
|
||||||
// TODO: End Font
|
// TODO: End Font
|
||||||
break;
|
break;
|
||||||
case 15:
|
case 15:
|
||||||
// Used in PuttsFunShop/SamsFunShop
|
// Used for text in FreddisFunShop/PuttsFunShop/SamsFunShop
|
||||||
// TODO: Create Font
|
// TODO: Create Font
|
||||||
break;
|
break;
|
||||||
case 16:
|
case 16:
|
||||||
|
@ -1858,7 +1861,7 @@ void Wiz::processWizImage(const WizParameters *params) {
|
||||||
error("Render Font String");
|
error("Render Font String");
|
||||||
break;
|
break;
|
||||||
case 17:
|
case 17:
|
||||||
// Used in PuttsFunShop/SamsFunShop
|
// Used in to draw circles in FreddisFunShop/PuttsFunShop/SamsFunShop
|
||||||
// TODO: Ellipse
|
// TODO: Ellipse
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue