[Scummvm-cvs-logs] SF.net SVN: scummvm:[50421] scummvm/trunk/engines/sci/graphics

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Mon Jun 28 13:20:14 CEST 2010


Revision: 50421
          http://scummvm.svn.sourceforge.net/scummvm/?rev=50421&view=rev
Author:   fingolfin
Date:     2010-06-28 11:20:14 +0000 (Mon, 28 Jun 2010)

Log Message:
-----------
SCI: Add const qualifiers to many GfxView methods and their return values.

This helps to ensure proper data encapsulation.
Also reformatted some overlong comments to 80 chars per line, and
fixed some other code formatting issues.

Modified Paths:
--------------
    scummvm/trunk/engines/sci/graphics/animate.cpp
    scummvm/trunk/engines/sci/graphics/compare.cpp
    scummvm/trunk/engines/sci/graphics/cursor.cpp
    scummvm/trunk/engines/sci/graphics/frameout.cpp
    scummvm/trunk/engines/sci/graphics/view.cpp
    scummvm/trunk/engines/sci/graphics/view.h

Modified: scummvm/trunk/engines/sci/graphics/animate.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/animate.cpp	2010-06-28 11:19:45 UTC (rev 50420)
+++ scummvm/trunk/engines/sci/graphics/animate.cpp	2010-06-28 11:20:14 UTC (rev 50421)
@@ -267,9 +267,9 @@
 
 		// Create rect according to coordinates and given cel
 		if (listEntry->scaleSignal & kScaleSignalDoScaling) {
-			view->getCelScaledRect(listEntry->loopNo, listEntry->celNo, listEntry->x, listEntry->y, listEntry->z, listEntry->scaleX, listEntry->scaleY, &listEntry->celRect);
+			view->getCelScaledRect(listEntry->loopNo, listEntry->celNo, listEntry->x, listEntry->y, listEntry->z, listEntry->scaleX, listEntry->scaleY, listEntry->celRect);
 		} else {
-			view->getCelRect(listEntry->loopNo, listEntry->celNo, listEntry->x, listEntry->y, listEntry->z, &listEntry->celRect);
+			view->getCelRect(listEntry->loopNo, listEntry->celNo, listEntry->x, listEntry->y, listEntry->z, listEntry->celRect);
 		}
 		writeSelectorValue(_s->_segMan, curObject, SELECTOR(nsLeft), listEntry->celRect.left);
 		writeSelectorValue(_s->_segMan, curObject, SELECTOR(nsTop), listEntry->celRect.top);
@@ -583,7 +583,7 @@
 		view = _cache->getView(listEntry->viewId);
 
 		// Create rect according to coordinates and given cel
-		view->getCelRect(listEntry->loopNo, listEntry->celNo, listEntry->x, listEntry->y, listEntry->z, &listEntry->celRect);
+		view->getCelRect(listEntry->loopNo, listEntry->celNo, listEntry->x, listEntry->y, listEntry->z, listEntry->celRect);
 
 		// draw corresponding cel
 		_paint16->drawCel(listEntry->viewId, listEntry->loopNo, listEntry->celNo, listEntry->celRect, listEntry->priority, listEntry->paletteNo);
@@ -601,7 +601,7 @@
 	Common::Rect celRect;
 
 	// Create rect according to coordinates and given cel
-	view->getCelRect(loopNo, celNo, leftPos, topPos, priority, &celRect);
+	view->getCelRect(loopNo, celNo, leftPos, topPos, priority, celRect);
 	_paint16->drawCel(view, loopNo, celNo, celRect, priority, 0);
 }
 

Modified: scummvm/trunk/engines/sci/graphics/compare.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/compare.cpp	2010-06-28 11:19:45 UTC (rev 50420)
+++ scummvm/trunk/engines/sci/graphics/compare.cpp	2010-06-28 11:20:14 UTC (rev 50421)
@@ -132,7 +132,7 @@
 
 	// now get cel rectangle
 	view = _cache->getView(viewId);
-	view->getCelRect(loopNo, celNo, x, y, z, &celRect);
+	view->getCelRect(loopNo, celNo, x, y, z, celRect);
 
 	if (lookupSelector(_segMan, objectReference, SELECTOR(nsTop), NULL, NULL) == kSelectorVariable) {
 		writeSelectorValue(_segMan, objectReference, SELECTOR(nsLeft), celRect.left);
@@ -175,10 +175,10 @@
 
 bool GfxCompare::kernelIsItSkip(GuiResourceId viewId, int16 loopNo, int16 celNo, Common::Point position) {
 	GfxView *tmpView = _cache->getView(viewId);
-	CelInfo *celInfo = tmpView->getCelInfo(loopNo, celNo);
+	const CelInfo *celInfo = tmpView->getCelInfo(loopNo, celNo);
 	position.x = CLIP<int>(position.x, 0, celInfo->width - 1);
 	position.y = CLIP<int>(position.y, 0, celInfo->height - 1);
-	byte *celData = tmpView->getBitmap(loopNo, celNo);
+	const byte *celData = tmpView->getBitmap(loopNo, celNo);
 	bool result = (celData[position.y * celInfo->width + position.x] == celInfo->clearKey);
 	return result;
 }
@@ -200,7 +200,7 @@
 		GfxView *tmpView = _cache->getView(viewId);
 		Common::Rect celRect;
 
-		tmpView->getCelRect(loopNo, celNo, x, y, z, &celRect);
+		tmpView->getCelRect(loopNo, celNo, x, y, z, celRect);
 		celRect.bottom = y + 1;
 		celRect.top = celRect.bottom - yStep;
 

Modified: scummvm/trunk/engines/sci/graphics/cursor.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/cursor.cpp	2010-06-28 11:19:45 UTC (rev 50420)
+++ scummvm/trunk/engines/sci/graphics/cursor.cpp	2010-06-28 11:20:14 UTC (rev 50421)
@@ -164,12 +164,11 @@
 
 	GfxView *cursorView = _cachedCursors[viewNum];
 
-	CelInfo *celInfo = cursorView->getCelInfo(loopNum, celNum);
+	const CelInfo *celInfo = cursorView->getCelInfo(loopNum, celNum);
 	int16 width = celInfo->width;
 	int16 height = celInfo->height;
 	byte clearKey = celInfo->clearKey;
 	Common::Point *cursorHotspot = hotspot;
-	byte *cursorBitmap;
 
 	if (!cursorHotspot)
 		// Compute hotspot from xoffset/yoffset
@@ -182,24 +181,21 @@
 		return;
 	}
 
-	celInfo->rawBitmap = cursorView->getBitmap(loopNum, celNum);
+	const byte *rawBitmap = cursorView->getBitmap(loopNum, celNum);
 	if (_upscaledHires) {
 		// Scale cursor by 2x - note: sierra didn't do this, but it looks much better
 		width *= 2;
 		height *= 2;
 		cursorHotspot->x *= 2;
 		cursorHotspot->y *= 2;
-		cursorBitmap = new byte[width * height];
-		_screen->scale2x(celInfo->rawBitmap, cursorBitmap, celInfo->width, celInfo->height);
+		byte *cursorBitmap = new byte[width * height];
+		_screen->scale2x(rawBitmap, cursorBitmap, celInfo->width, celInfo->height);
+		CursorMan.replaceCursor(cursorBitmap, width, height, cursorHotspot->x, cursorHotspot->y, clearKey);
+		delete[] cursorBitmap;
 	} else {
-		cursorBitmap = celInfo->rawBitmap;
+		CursorMan.replaceCursor(rawBitmap, width, height, cursorHotspot->x, cursorHotspot->y, clearKey);
 	}
 
-	CursorMan.replaceCursor(cursorBitmap, width, height, cursorHotspot->x, cursorHotspot->y, clearKey);
-
-	if (_upscaledHires)
-		delete[] cursorBitmap;
-
 	kernelShow();
 
 	delete cursorHotspot;

Modified: scummvm/trunk/engines/sci/graphics/frameout.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/frameout.cpp	2010-06-28 11:19:45 UTC (rev 50420)
+++ scummvm/trunk/engines/sci/graphics/frameout.cpp	2010-06-28 11:20:14 UTC (rev 50421)
@@ -229,9 +229,9 @@
 				GfxView *view = _cache->getView(itemEntry->viewId);
 
 				if ((itemEntry->scaleX == 128) && (itemEntry->scaleY == 128))
-					view->getCelRect(itemEntry->loopNo, itemEntry->celNo, itemEntry->x, itemEntry->y, itemEntry->z, &itemEntry->celRect);
+					view->getCelRect(itemEntry->loopNo, itemEntry->celNo, itemEntry->x, itemEntry->y, itemEntry->z, itemEntry->celRect);
 				else
-					view->getCelScaledRect(itemEntry->loopNo, itemEntry->celNo, itemEntry->x, itemEntry->y, itemEntry->z, itemEntry->scaleX, itemEntry->scaleY, &itemEntry->celRect);
+					view->getCelScaledRect(itemEntry->loopNo, itemEntry->celNo, itemEntry->x, itemEntry->y, itemEntry->z, itemEntry->scaleX, itemEntry->scaleY, itemEntry->celRect);
 
 				if (itemEntry->celRect.top < 0 || itemEntry->celRect.top >= _screen->getHeight())
 					continue;

Modified: scummvm/trunk/engines/sci/graphics/view.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/view.cpp	2010-06-28 11:19:45 UTC (rev 50420)
+++ scummvm/trunk/engines/sci/graphics/view.cpp	2010-06-28 11:20:14 UTC (rev 50421)
@@ -82,10 +82,11 @@
 	_embeddedPal = false;
 	_EGAmapping = NULL;
 
-	// If we find a SCI1/SCI1.1 view (not amiga), we switch to that type for EGA
-	//  This could get used to make view patches for EGA games, where the new views include more colors
-	//  Users could manually adjust old views to make them look better (like removing dithered colors that aren't
-	//  caught by our undithering or even improve the graphics overall)
+	// If we find an SCI1/SCI1.1 view (not amiga), we switch to that type for
+	// EGA. This could get used to make view patches for EGA games, where the
+	// new views include more colors. Users could manually adjust old views to
+	// make them look better (like removing dithered colors that aren't caught
+	// by our undithering or even improve the graphics overall).
 	if (curViewType == kViewEga) {
 		if (_resourceData[1] == 0x80) {
 			curViewType = kViewVga;
@@ -110,10 +111,12 @@
 		palOffset = READ_LE_UINT16(_resourceData + 6);
 
 		if (palOffset && palOffset != 0x100) {
-			// Some SCI0/SCI01 games also have an offset set. It seems that it points to a 16-byte mapping table
-			//  but on those games using that mapping will actually screw things up.
-			// On the other side: vga sci1 games have this pointing to a VGA palette
-			//  and ega sci1 games have this pointing to a 8x16 byte mapping table that needs to get applied then
+			// Some SCI0/SCI01 games also have an offset set. It seems that it
+			// points to a 16-byte mapping table but on those games using that
+			// mapping will actually screw things up. On the other side: VGA
+			// SCI1 games have this pointing to a VGA palette and EGA SCI1 games
+			// have this pointing to a 8x16 byte mapping table that needs to get
+			// applied then.
 			if (!isEGA) {
 				_palette->createFromData(&_resourceData[palOffset], _resourceSize - palOffset, &_viewPalette);
 				_embeddedPal = true;
@@ -122,7 +125,7 @@
 				if (getSciVersion() >= SCI_VERSION_1_EGA) {
 					_EGAmapping = &_resourceData[palOffset];
 					for (EGAmapNr = 0; EGAmapNr < SCI_VIEW_EGAMAPPING_COUNT; EGAmapNr++) {
-						if (memcmp(_EGAmapping, EGAmappingStraight, SCI_VIEW_EGAMAPPING_SIZE)!=0)
+						if (memcmp(_EGAmapping, EGAmappingStraight, SCI_VIEW_EGAMAPPING_SIZE) != 0)
 							break;
 						_EGAmapping += SCI_VIEW_EGAMAPPING_SIZE;
 					}
@@ -184,12 +187,13 @@
 
 	case kViewVga11: // View-format SCI1.1+
 		// HeaderSize:WORD LoopCount:BYTE Unknown:BYTE Version:WORD Unknown:WORD PaletteOffset:WORD
-		headerSize = READ_SCI11ENDIAN_UINT16(_resourceData + 0) + 2; // headerSize is not part of the header, so its added
+		headerSize = READ_SCI11ENDIAN_UINT16(_resourceData + 0) + 2; // headerSize is not part of the header, so it's added
 		assert(headerSize >= 16);
 		_loopCount = _resourceData[2];
 		assert(_loopCount);
 		palOffset = READ_SCI11ENDIAN_UINT32(_resourceData + 8);
-		// FIXME: After LoopCount there is another byte and its set for view 50 within Laura Bow 2 CD, check what it means
+		// FIXME: After LoopCount there is another byte and its set for view 50
+		// within Laura Bow 2 CD, check what it means.
 
 		loopData = _resourceData + headerSize;
 		loopSize = _resourceData[12];
@@ -251,47 +255,47 @@
 	}
 }
 
-GuiResourceId GfxView::getResourceId() {
+GuiResourceId GfxView::getResourceId() const {
 	return _resourceId;
 }
 
-int16 GfxView::getWidth(int16 loopNo, int16 celNo) {
+int16 GfxView::getWidth(int16 loopNo, int16 celNo) const {
 	loopNo = CLIP<int16>(loopNo, 0, _loopCount - 1);
 	celNo = CLIP<int16>(celNo, 0, _loop[loopNo].celCount - 1);
 	return _loopCount ? _loop[loopNo].cel[celNo].width : 0;
 }
 
-int16 GfxView::getHeight(int16 loopNo, int16 celNo) {
-	loopNo = CLIP<int16>(loopNo, 0, _loopCount -1);
+int16 GfxView::getHeight(int16 loopNo, int16 celNo) const {
+	loopNo = CLIP<int16>(loopNo, 0, _loopCount - 1);
 	celNo = CLIP<int16>(celNo, 0, _loop[loopNo].celCount - 1);
 	return _loopCount ? _loop[loopNo].cel[celNo].height : 0;
 }
 
-CelInfo *GfxView::getCelInfo(int16 loopNo, int16 celNo) {
+const CelInfo *GfxView::getCelInfo(int16 loopNo, int16 celNo) const {
 	loopNo = CLIP<int16>(loopNo, 0, _loopCount - 1);
 	celNo = CLIP<int16>(celNo, 0, _loop[loopNo].celCount - 1);
 	return _loopCount ? &_loop[loopNo].cel[celNo] : NULL;
 }
 
-LoopInfo *GfxView::getLoopInfo(int16 loopNo) {
+const LoopInfo *GfxView::getLoopInfo(int16 loopNo) const {
 	loopNo = CLIP<int16>(loopNo, 0, _loopCount - 1);
 	return _loopCount ? &_loop[loopNo] : NULL;
 }
 
-void GfxView::getCelRect(int16 loopNo, int16 celNo, int16 x, int16 y, int16 z, Common::Rect *outRect) {
-	CelInfo *celInfo = getCelInfo(loopNo, celNo);
+void GfxView::getCelRect(int16 loopNo, int16 celNo, int16 x, int16 y, int16 z, Common::Rect &outRect) const {
+	const CelInfo *celInfo = getCelInfo(loopNo, celNo);
 	if (celInfo) {
-		outRect->left = x + celInfo->displaceX - (celInfo->width >> 1);
-		outRect->right = outRect->left + celInfo->width;
-		outRect->bottom = y + celInfo->displaceY - z + 1;
-		outRect->top = outRect->bottom - celInfo->height;
+		outRect.left = x + celInfo->displaceX - (celInfo->width >> 1);
+		outRect.right = outRect.left + celInfo->width;
+		outRect.bottom = y + celInfo->displaceY - z + 1;
+		outRect.top = outRect.bottom - celInfo->height;
 	}
 }
 
-void GfxView::getCelScaledRect(int16 loopNo, int16 celNo, int16 x, int16 y, int16 z, int16 scaleX, int16 scaleY, Common::Rect *outRect) {
+void GfxView::getCelScaledRect(int16 loopNo, int16 celNo, int16 x, int16 y, int16 z, int16 scaleX, int16 scaleY, Common::Rect &outRect) const {
 	int16 scaledDisplaceX, scaledDisplaceY;
 	int16 scaledWidth, scaledHeight;
-	CelInfo *celInfo = getCelInfo(loopNo, celNo);
+	const CelInfo *celInfo = getCelInfo(loopNo, celNo);
 	if (celInfo) {
 		// Scaling displaceX/Y, Width/Height
 		scaledDisplaceX = (celInfo->displaceX * scaleX) >> 7;
@@ -301,15 +305,15 @@
 		scaledWidth = CLIP<int16>(scaledWidth, 0, _screen->getWidth());
 		scaledHeight = CLIP<int16>(scaledHeight, 0, _screen->getHeight());
 
-		outRect->left = x + scaledDisplaceX - (scaledWidth >> 1);
-		outRect->right = outRect->left + scaledWidth;
-		outRect->bottom = y + scaledDisplaceY - z + 1;
-		outRect->top = outRect->bottom - scaledHeight;
+		outRect.left = x + scaledDisplaceX - (scaledWidth >> 1);
+		outRect.right = outRect.left + scaledWidth;
+		outRect.bottom = y + scaledDisplaceY - z + 1;
+		outRect.top = outRect.bottom - scaledHeight;
 	}
 }
 
 void GfxView::unpackCel(int16 loopNo, int16 celNo, byte *outPtr, uint32 pixelCount) {
-	CelInfo *celInfo = getCelInfo(loopNo, celNo);
+	const CelInfo *celInfo = getCelInfo(loopNo, celNo);
 	byte *rlePtr;
 	byte *literalPtr;
 	uint32 pixelNo = 0, runLength;
@@ -325,9 +329,10 @@
 			pixelNo += runLength;
 		}
 	} else {
-		// we skip over transparent pixels, so the buffer needs to be already filled with it
-		//  also some RLE compressed cels are possibly ending with the last non-transparent pixel
-		//  (is this even possible with the current code?)
+		// We skip over transparent pixels, so the buffer needs to be already
+		// filled with "it". (FIXME: What is "it" supposed to mean here?)
+		// Also some RLE compressed cels are possibly ending with the last
+		// non-transparent pixel (is this even possible with the current code?)
 		memset(outPtr, _loop[loopNo].cel[celNo].clearKey, pixelCount);
 
 		rlePtr = _resourceData + celInfo->offsetRLE;
@@ -371,7 +376,7 @@
 			literalPtr = _resourceData + celInfo->offsetLiteral;
 			if (celInfo->offsetRLE) {
 				if (g_sci->getPlatform() == Common::kPlatformMacintosh && getSciVersion() >= SCI_VERSION_1_1) {
-					// Crazy-Ass compression for SCI1.1+ Mac
+					// compression for SCI1.1+ Mac
 					while (pixelNo < pixelCount) {
 						uint32 pixelLine = pixelNo;
 						runLength = *rlePtr++;
@@ -414,7 +419,7 @@
 	}
 }
 
-byte *GfxView::getBitmap(int16 loopNo, int16 celNo) {
+const byte *GfxView::getBitmap(int16 loopNo, int16 celNo) {
 	loopNo = CLIP<int16>(loopNo, 0, _loopCount -1);
 	celNo = CLIP<int16>(celNo, 0, _loop[loopNo].celCount - 1);
 	if (_loop[loopNo].cel[celNo].rawBitmap)
@@ -443,8 +448,10 @@
 	return _loop[loopNo].cel[celNo].rawBitmap;
 }
 
-// Called after unpacking an EGA cel, this will try to undither (parts) of the cel if the dithering in here
-//  matches dithering used by the current picture
+/**
+ * Called after unpacking an EGA cel, this will try to undither (parts) of the
+ * cel if the dithering in here matches dithering used by the current picture.
+ */
 void GfxView::unditherBitmap(byte *bitmapPtr, int16 width, int16 height, byte clearKey) {
 	int16 *unditherMemorial = _screen->unditherGetMemorial();
 
@@ -453,7 +460,8 @@
 		return;
 
 	// Makes no sense to process bitmaps that are 3 pixels wide or less
-	if (width <= 3) return;
+	if (width <= 3)
+		return;
 
 	// If EGA mapping is used for this view, dont do undithering as well
 	if (_EGAmapping)
@@ -490,7 +498,8 @@
 			color1 = color & 0x0F; color2 = color >> 4;
 			if ((color1 != clearKey) && (color2 != clearKey) && (color1 != color2)) {
 				// so set this and the reversed color-combination for undithering
-				unditherTable[color] = true; unditherTable[(color1 << 4) | color2] = true;
+				unditherTable[color] = true;
+				unditherTable[(color1 << 4) | color2] = true;
 				unditherCount++;
 			}
 		}
@@ -507,8 +516,9 @@
 		for (x = 1; x < width; x++) {
 			color = (color << 4) | curPtr[1];
 			if (unditherTable[color]) {
-				// some color with black? turn colors around otherwise it wont be the right color at all
-				if ((color & 0xF0)==0)
+				// Some color with black? Turn colors around, otherwise it won't
+				// be the right color at all.
+				if ((color & 0xF0) == 0)
 					color = (color << 4) | (color >> 4);
 				curPtr[0] = color; curPtr[1] = color;
 			}
@@ -518,10 +528,10 @@
 	}
 }
 
-void GfxView::draw(Common::Rect rect, Common::Rect clipRect, Common::Rect clipRectTranslated, int16 loopNo, int16 celNo, byte priority, uint16 EGAmappingNr, bool upscaledHires) {
+void GfxView::draw(const Common::Rect &rect, const Common::Rect &clipRect, const Common::Rect &clipRectTranslated, int16 loopNo, int16 celNo, byte priority, uint16 EGAmappingNr, bool upscaledHires) {
 	Palette *palette = _embeddedPal ? &_viewPalette : &_palette->_sysPalette;
-	CelInfo *celInfo = getCelInfo(loopNo, celNo);
-	byte *bitmap = getBitmap(loopNo, celNo);
+	const CelInfo *celInfo = getCelInfo(loopNo, celNo);
+	const byte *bitmap = getBitmap(loopNo, celNo);
 	int16 celHeight = celInfo->height, celWidth = celInfo->width;
 	int16 width, height;
 	byte clearKey = celInfo->clearKey;
@@ -568,12 +578,15 @@
 	}
 }
 
-// We don't fully follow sierra sci here, I did the scaling algo myself and it's definitely not pixel-perfect
-//  with the one sierra is using. It shouldn't matter because the scaled cel rect is definitely the same as in sierra sci
-void GfxView::drawScaled(Common::Rect rect, Common::Rect clipRect, Common::Rect clipRectTranslated, int16 loopNo, int16 celNo, byte priority, int16 scaleX, int16 scaleY) {
+/**
+ * We don't fully follow sierra sci here, I did the scaling algo myself and it
+ * is definitely not pixel-perfect with the one sierra is using. It shouldn't
+ * matter because the scaled cel rect is definitely the same as in sierra sci.
+ */
+void GfxView::drawScaled(const Common::Rect &rect, const Common::Rect &clipRect, const Common::Rect &clipRectTranslated, int16 loopNo, int16 celNo, byte priority, int16 scaleX, int16 scaleY) {
 	Palette *palette = _embeddedPal ? &_viewPalette : &_palette->_sysPalette;
-	CelInfo *celInfo = getCelInfo(loopNo, celNo);
-	byte *bitmap = getBitmap(loopNo, celNo);
+	const CelInfo *celInfo = getCelInfo(loopNo, celNo);
+	const byte *bitmap = getBitmap(loopNo, celNo);
 	int16 celHeight = celInfo->height, celWidth = celInfo->width;
 	byte clearKey = celInfo->clearKey;
 	byte color;
@@ -647,7 +660,7 @@
 	}
 }
 
-uint16 GfxView::getCelCount(int16 loopNo) {
+uint16 GfxView::getCelCount(int16 loopNo) const {
 	if ((loopNo < 0) || (loopNo >= _loopCount))
 		return 0;
 	return _loop[loopNo].celCount;

Modified: scummvm/trunk/engines/sci/graphics/view.h
===================================================================
--- scummvm/trunk/engines/sci/graphics/view.h	2010-06-28 11:19:45 UTC (rev 50420)
+++ scummvm/trunk/engines/sci/graphics/view.h	2010-06-28 11:20:14 UTC (rev 50421)
@@ -60,18 +60,18 @@
 	GfxView(ResourceManager *resMan, GfxScreen *screen, GfxPalette *palette, GuiResourceId resourceId);
 	~GfxView();
 
-	GuiResourceId getResourceId();
-	int16 getWidth(int16 loopNo, int16 celNo);
-	int16 getHeight(int16 loopNo, int16 celNo);
-	CelInfo *getCelInfo(int16 loopNo, int16 celNo);
-	LoopInfo *getLoopInfo(int16 loopNo);
-	void getCelRect(int16 loopNo, int16 celNo, int16 x, int16 y, int16 z, Common::Rect *outRect);
-	void getCelScaledRect(int16 loopNo, int16 celNo, int16 x, int16 y, int16 z, int16 scaleX, int16 scaleY, Common::Rect *outRect);
-	byte *getBitmap(int16 loopNo, int16 celNo);
-	void draw(Common::Rect rect, Common::Rect clipRect, Common::Rect clipRectTranslated, int16 loopNo, int16 celNo, byte priority, uint16 EGAmappingNr, bool upscaledHires);
-	void drawScaled(Common::Rect rect, Common::Rect clipRect, Common::Rect clipRectTranslated, int16 loopNo, int16 celNo, byte priority, int16 scaleX, int16 scaleY);
+	GuiResourceId getResourceId() const;
+	int16 getWidth(int16 loopNo, int16 celNo) const;
+	int16 getHeight(int16 loopNo, int16 celNo) const;
+	const CelInfo *getCelInfo(int16 loopNo, int16 celNo) const;
+	const LoopInfo *getLoopInfo(int16 loopNo) const;
+	void getCelRect(int16 loopNo, int16 celNo, int16 x, int16 y, int16 z, Common::Rect &outRect) const;
+	void getCelScaledRect(int16 loopNo, int16 celNo, int16 x, int16 y, int16 z, int16 scaleX, int16 scaleY, Common::Rect &outRect) const;
+	const byte *getBitmap(int16 loopNo, int16 celNo);
+	void draw(const Common::Rect &rect, const Common::Rect &clipRect, const Common::Rect &clipRectTranslated, int16 loopNo, int16 celNo, byte priority, uint16 EGAmappingNr, bool upscaledHires);
+	void drawScaled(const Common::Rect &rect, const Common::Rect &clipRect, const Common::Rect &clipRectTranslated, int16 loopNo, int16 celNo, byte priority, int16 scaleX, int16 scaleY);
 	uint16 getLoopCount() const { return _loopCount; }
-	uint16 getCelCount(int16 loopNo);
+	uint16 getCelCount(int16 loopNo) const;
 	Palette *getPalette();
 
 private:


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