diff options
| author | Max Horn | 2010-06-29 14:55:09 +0000 | 
|---|---|---|
| committer | Max Horn | 2010-06-29 14:55:09 +0000 | 
| commit | 1027f870a6d78bfbbf151ca0e65cd915676792b2 (patch) | |
| tree | 5d8c38fc107bc6bcb513150dac52fa58d87c948e | |
| parent | b743fcc9f5f7e6428ecfe9fea69dbcc70c523529 (diff) | |
| download | scummvm-rg350-1027f870a6d78bfbbf151ca0e65cd915676792b2.tar.gz scummvm-rg350-1027f870a6d78bfbbf151ca0e65cd915676792b2.tar.bz2 scummvm-rg350-1027f870a6d78bfbbf151ca0e65cd915676792b2.zip  | |
SCI: Add some const qualifiers
svn-id: r50499
| -rw-r--r-- | engines/sci/graphics/paint16.cpp | 22 | ||||
| -rw-r--r-- | engines/sci/graphics/paint16.h | 22 | 
2 files changed, 22 insertions, 22 deletions
diff --git a/engines/sci/graphics/paint16.cpp b/engines/sci/graphics/paint16.cpp index c2e8d2c5d0..9f286b1fda 100644 --- a/engines/sci/graphics/paint16.cpp +++ b/engines/sci/graphics/paint16.cpp @@ -107,12 +107,12 @@ void GfxPaint16::drawCelAndShow(GuiResourceId viewId, int16 loopNo, int16 celNo,  }  // This version of drawCel is not supposed to call BitsShow()! -void GfxPaint16::drawCel(GuiResourceId viewId, int16 loopNo, int16 celNo, Common::Rect celRect, byte priority, uint16 paletteNo, uint16 scaleX, uint16 scaleY) { +void GfxPaint16::drawCel(GuiResourceId viewId, int16 loopNo, int16 celNo, const Common::Rect &celRect, byte priority, uint16 paletteNo, uint16 scaleX, uint16 scaleY) {  	drawCel(_cache->getView(viewId), loopNo, celNo, celRect, priority, paletteNo, scaleX, scaleY);  }  // This version of drawCel is not supposed to call BitsShow()! -void GfxPaint16::drawCel(GfxView *view, int16 loopNo, int16 celNo, Common::Rect celRect, byte priority, uint16 paletteNo, uint16 scaleX, uint16 scaleY) { +void GfxPaint16::drawCel(GfxView *view, int16 loopNo, int16 celNo, const Common::Rect &celRect, byte priority, uint16 paletteNo, uint16 scaleX, uint16 scaleY) {  	Common::Rect clipRect = celRect;  	clipRect.clip(_ports->_curPort->rect);  	if (clipRect.isEmpty()) // nothing to draw @@ -389,19 +389,19 @@ void GfxPaint16::kernelDrawCel(GuiResourceId viewId, int16 loopNo, int16 celNo,  	}  } -void GfxPaint16::kernelGraphFillBoxForeground(Common::Rect rect) { +void GfxPaint16::kernelGraphFillBoxForeground(const Common::Rect &rect) {  	paintRect(rect);  } -void GfxPaint16::kernelGraphFillBoxBackground(Common::Rect rect) { +void GfxPaint16::kernelGraphFillBoxBackground(const Common::Rect &rect) {  	eraseRect(rect);  } -void GfxPaint16::kernelGraphFillBox(Common::Rect rect, uint16 colorMask, int16 color, int16 priority, int16 control) { +void GfxPaint16::kernelGraphFillBox(const Common::Rect &rect, uint16 colorMask, int16 color, int16 priority, int16 control) {  	fillRect(rect, colorMask, color, priority, control);  } -void GfxPaint16::kernelGraphFrameBox(Common::Rect rect, int16 color) { +void GfxPaint16::kernelGraphFrameBox(const Common::Rect &rect, int16 color) {  	int16 oldColor = _ports->getPort()->penClr;  	_ports->penColor(color);  	frameRect(rect); @@ -413,11 +413,11 @@ void GfxPaint16::kernelGraphDrawLine(Common::Point startPoint, Common::Point end  	_screen->drawLine(startPoint.x, startPoint.y, endPoint.x, endPoint.y, color, priority, control);  } -reg_t GfxPaint16::kernelGraphSaveBox(Common::Rect rect, uint16 screenMask) { +reg_t GfxPaint16::kernelGraphSaveBox(const Common::Rect &rect, uint16 screenMask) {  	return bitsSave(rect, screenMask);  } -reg_t GfxPaint16::kernelGraphSaveUpscaledHiresBox(Common::Rect rect) { +reg_t GfxPaint16::kernelGraphSaveUpscaledHiresBox(const Common::Rect &rect) {  	return bitsSave(rect, GFX_SCREEN_MASK_DISPLAY);  } @@ -425,7 +425,7 @@ void GfxPaint16::kernelGraphRestoreBox(reg_t handle) {  	bitsRestore(handle);  } -void GfxPaint16::kernelGraphUpdateBox(Common::Rect rect, bool hiresMode) { +void GfxPaint16::kernelGraphUpdateBox(const Common::Rect &rect, bool hiresMode) {  	// some calls are hiresMode even under kq6 DOS, that's why we check for upscaled hires here  	if ((!hiresMode) || (!_screen->getUpscaledHires()))  		bitsShow(rect); @@ -597,12 +597,12 @@ void GfxPaint16::kernelShakeScreen(uint16 shakeCount, uint16 directions) {  	}  } -reg_t GfxPaint16::kernelPortraitLoad(Common::String resourceName) { +reg_t GfxPaint16::kernelPortraitLoad(const Common::String &resourceName) {  	//Portrait *myPortrait = new Portrait(g_sci->getResMan(), _screen, _palette, resourceName);  	return NULL_REG;  } -void GfxPaint16::kernelPortraitShow(Common::String resourceName, Common::Point position, uint16 resourceId, uint16 noun, uint16 verb, uint16 cond, uint16 seq) { +void GfxPaint16::kernelPortraitShow(const Common::String &resourceName, Common::Point position, uint16 resourceId, uint16 noun, uint16 verb, uint16 cond, uint16 seq) {  	Portrait *myPortrait = new Portrait(g_sci->getResMan(), g_sci->getEventManager(), _screen, _palette, _audio, resourceName);  	// TODO: cache portraits  	// adjust given coordinates to curPort (but dont adjust coordinates on upscaledHires_Save_Box and give us hires coordinates diff --git a/engines/sci/graphics/paint16.h b/engines/sci/graphics/paint16.h index f54b8059c1..4c3ac255c4 100644 --- a/engines/sci/graphics/paint16.h +++ b/engines/sci/graphics/paint16.h @@ -53,8 +53,8 @@ public:  	void drawPicture(GuiResourceId pictureId, int16 animationNr, bool mirroredFlag, bool addToFlag, GuiResourceId paletteId);  	void drawCelAndShow(GuiResourceId viewId, int16 loopNo, int16 celNo, uint16 leftPos, uint16 topPos, byte priority, uint16 paletteNo, uint16 scaleX = 128, uint16 scaleY = 128); -	void drawCel(GuiResourceId viewId, int16 loopNo, int16 celNo, Common::Rect celRect, byte priority, uint16 paletteNo, uint16 scaleX = 128, uint16 scaleY = 128); -	void drawCel(GfxView *view, int16 loopNo, int16 celNo, Common::Rect celRect, byte priority, uint16 paletteNo, uint16 scaleX = 128, uint16 scaleY = 128); +	void drawCel(GuiResourceId viewId, int16 loopNo, int16 celNo, const Common::Rect &celRect, byte priority, uint16 paletteNo, uint16 scaleX = 128, uint16 scaleY = 128); +	void drawCel(GfxView *view, int16 loopNo, int16 celNo, const Common::Rect &celRect, byte priority, uint16 paletteNo, uint16 scaleX = 128, uint16 scaleY = 128);  	void drawHiresCelAndShow(GuiResourceId viewId, int16 loopNo, int16 celNo, uint16 leftPos, uint16 topPos, byte priority, uint16 paletteNo, reg_t upscaledHiresHandle, uint16 scaleX = 128, uint16 scaleY = 128);  	void clearScreen(byte color = 255); @@ -75,23 +75,23 @@ public:  	void kernelDrawPicture(GuiResourceId pictureId, int16 animationNr, bool animationBlackoutFlag, bool mirroredFlag, bool addToFlag, int16 EGApaletteNo);  	void kernelDrawCel(GuiResourceId viewId, int16 loopNo, int16 celNo, uint16 leftPos, uint16 topPos, int16 priority, uint16 paletteNo, bool hiresMode, reg_t upscaledHiresHandle); -	void kernelGraphFillBoxForeground(Common::Rect rect); -	void kernelGraphFillBoxBackground(Common::Rect rect); -	void kernelGraphFillBox(Common::Rect rect, uint16 colorMask, int16 color, int16 priority, int16 control); -	void kernelGraphFrameBox(Common::Rect rect, int16 color); +	void kernelGraphFillBoxForeground(const Common::Rect &rect); +	void kernelGraphFillBoxBackground(const Common::Rect &rect); +	void kernelGraphFillBox(const Common::Rect &rect, uint16 colorMask, int16 color, int16 priority, int16 control); +	void kernelGraphFrameBox(const Common::Rect &rect, int16 color);  	void kernelGraphDrawLine(Common::Point startPoint, Common::Point endPoint, int16 color, int16 priority, int16 control); -	reg_t kernelGraphSaveBox(Common::Rect rect, uint16 flags); -	reg_t kernelGraphSaveUpscaledHiresBox(Common::Rect rect); +	reg_t kernelGraphSaveBox(const Common::Rect &rect, uint16 flags); +	reg_t kernelGraphSaveUpscaledHiresBox(const Common::Rect &rect);  	void kernelGraphRestoreBox(reg_t handle); -	void kernelGraphUpdateBox(Common::Rect rect, bool hiresMode); +	void kernelGraphUpdateBox(const Common::Rect &rect, bool hiresMode);  	void kernelGraphRedrawBox(Common::Rect rect);  	reg_t kernelDisplay(const char *text, int argc, reg_t *argv);  	void kernelShakeScreen(uint16 shakeCount, uint16 directions); -	reg_t kernelPortraitLoad(Common::String resourceName); -	void kernelPortraitShow(Common::String resourceName, Common::Point position, uint16 resourceNum, uint16 noun, uint16 verb, uint16 cond, uint16 seq); +	reg_t kernelPortraitLoad(const Common::String &resourceName); +	void kernelPortraitShow(const Common::String &resourceName, Common::Point position, uint16 resourceNum, uint16 noun, uint16 verb, uint16 cond, uint16 seq);  	void kernelPortraitUnload(uint16 portraitId);  private:  | 
