[Scummvm-cvs-logs] CVS: scummvm/scumm wiz_he.h,2.28,2.29 wiz_he.cpp,2.93,2.94
Gregory Montoir
cyx at users.sourceforge.net
Wed Aug 31 13:41:31 CEST 2005
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm scumm.cpp,1.559,1.560
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.377,1.378 intern.h,2.514,2.515 script_v100he.cpp,2.171,2.172 script_v80he.cpp,2.124,2.125 script_v90he.cpp,2.280,2.281
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2359
Modified Files:
wiz_he.h wiz_he.cpp
Log Message:
add fillWizPixel()
Index: wiz_he.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/wiz_he.h,v
retrieving revision 2.28
retrieving revision 2.29
diff -u -d -r2.28 -r2.29
--- wiz_he.h 30 Jul 2005 21:11:32 -0000 2.28
+++ wiz_he.h 31 Aug 2005 20:39:52 -0000 2.29
@@ -164,6 +164,7 @@
void createWizEmptyImage(const WizParameters *params);
void fillWizRect(const WizParameters *params);
void fillWizLine(const WizParameters *params);
+ void fillWizPixel(const WizParameters *params);
void getWizImageDim(int resNum, int state, int32 &w, int32 &h);
int getWizImageStates(int resnum);
Index: wiz_he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/wiz_he.cpp,v
retrieving revision 2.93
retrieving revision 2.94
diff -u -d -r2.93 -r2.94
--- wiz_he.cpp 14 Aug 2005 01:41:52 -0000 2.93
+++ wiz_he.cpp 31 Aug 2005 20:39:52 -0000 2.94
@@ -1697,6 +1697,42 @@
}
}
+void Wiz::fillWizPixel(const WizParameters *params) {
+ if (params->processFlags & kWPFClipBox2) {
+ int px = params->box2.left;
+ int py = params->box2.top;
+ uint8 *dataPtr = _vm->getResourceAddress(rtImage, params->img.resNum);
+ if (dataPtr) {
+ int state = 0;
+ if (params->processFlags & kWPFNewState) {
+ state = params->img.state;
+ }
+ uint8 *wizh = _vm->findWrappedBlock(MKID('WIZH'), dataPtr, state, 0);
+ assert(wizh);
+ int c = READ_LE_UINT32(wizh + 0x0);
+ int w = READ_LE_UINT32(wizh + 0x4);
+ int h = READ_LE_UINT32(wizh + 0x8);
+ assert(c == 0);
+ Common::Rect imageRect(w, h);
+ if (params->processFlags & kWPFClipBox) {
+ if (!imageRect.intersects(params->box)) {
+ return;
+ }
+ imageRect.clip(params->box);
+ }
+ uint8 color = _vm->VAR(93);
+ if (params->processFlags & kWPFFillColor) {
+ color = params->fillColor;
+ }
+ if (imageRect.contains(px, py)) {
+ uint8 *wizd = _vm->findWrappedBlock(MKID('WIZD'), dataPtr, state, 0);
+ assert(wizd);
+ *(wizd + py * w + px) = color;
+ }
+ }
+ }
+}
+
void Wiz::processWizImage(const WizParameters *params) {
char buf[512];
unsigned int i;
@@ -1821,8 +1857,7 @@
fillWizLine(params);
break;
case 11:
- // TODO: Fill Pixel
- error("fillWizPixel");
+ fillWizPixel(params);
break;
case 12:
// Used in PuttsFunShop/SamsFunShop
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm scumm.cpp,1.559,1.560
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.377,1.378 intern.h,2.514,2.515 script_v100he.cpp,2.171,2.172 script_v80he.cpp,2.124,2.125 script_v90he.cpp,2.280,2.281
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list