diff options
| author | Bendegúz Nagy | 2016-06-20 18:03:48 +0200 | 
|---|---|---|
| committer | Bendegúz Nagy | 2016-08-26 23:02:22 +0200 | 
| commit | aa269b9f5e30cd2592884362b4e25a2a1a4c4ce6 (patch) | |
| tree | e0d5b4f3155490af9949f160bf806ef56f4897ff | |
| parent | 35b5f03b26ec126af55a901af68f392e8fa883a1 (diff) | |
| download | scummvm-rg350-aa269b9f5e30cd2592884362b4e25a2a1a4c4ce6.tar.gz scummvm-rg350-aa269b9f5e30cd2592884362b4e25a2a1a4c4ce6.tar.bz2 scummvm-rg350-aa269b9f5e30cd2592884362b4e25a2a1a4c4ce6.zip | |
DM: Add blitToScreen using Box
| -rw-r--r-- | engines/dm/gfx.cpp | 18 | ||||
| -rw-r--r-- | engines/dm/gfx.h | 3 | 
2 files changed, 15 insertions, 6 deletions
| diff --git a/engines/dm/gfx.cpp b/engines/dm/gfx.cpp index 223257c220..28fb63cac6 100644 --- a/engines/dm/gfx.cpp +++ b/engines/dm/gfx.cpp @@ -117,7 +117,7 @@ enum ViewSquare {  Frame gCeilingFrame(0, 223, 0, 28, 112, 29, 0, 0); // @ K0012_s_Frame_Ceiling  Frame gFloorFrame(0, 223, 66, 135, 112, 70, 0, 0); // @ K0013_s_Frame_Floor -Frame gFrameWall_D3L2 = Frame(0,  15, 25, 73, 8, 49, 0, 0); // @ G0711_s_Graphic558_Frame_Wall_D3L2 +Frame gFrameWall_D3L2 = Frame(0, 15, 25, 73, 8, 49, 0, 0); // @ G0711_s_Graphic558_Frame_Wall_D3L2  Frame gFrameWall_D3R2 = Frame(208, 223, 25, 73, 8, 49, 0, 0); // @ G0712_s_Graphic558_Frame_Wall_D3R2  Frame gFrameWalls[12] = { // @ G0163_as_Graphic558_Frame_Walls  	/* { X1, X2, Y1, Y2, pixelWidth, Height, X, Y } */ @@ -564,7 +564,7 @@ byte gAlcoveOrnIndices[kAlcoveOrnCount] = { // @ G0192_auc_Graphic558_AlcoveOrna  using namespace DM; -DisplayMan::DisplayMan(DMEngine *dmEngine) : _vm(dmEngine) {	 +DisplayMan::DisplayMan(DMEngine *dmEngine) : _vm(dmEngine) {  	_vgaBuffer = nullptr;  	_bitmaps = nullptr;  	_grapItemCount = 0; @@ -585,9 +585,9 @@ DisplayMan::DisplayMan(DMEngine *dmEngine) : _vm(dmEngine) {  	for (int i = 0; i < kStairsGraphicCount; i++)  		_stairIndices[i] = 0; -	 +  	for (int i = 0; i < 4; i++) -		_palChangesProjectile[i] =  nullptr; +		_palChangesProjectile[i] = nullptr;  	for (int i = 0; i < kAlcoveOrnCount; i++)  		_currMapAlcoveOrnIndices[i] = 0; @@ -604,7 +604,7 @@ DisplayMan::DisplayMan(DMEngine *dmEngine) : _vm(dmEngine) {  			_currMapDoorOrnInfo[j][i] = 0;  		}  	} -	 +  	for (int i = 0; i < 16; i++) {  		_currMapWallOrnIndices[i] = 0;  		_currMapFloorOrnIndices[i] = 0; @@ -1435,7 +1435,7 @@ bool DisplayMan::isDrawnWallOrnAnAlcove(int16 wallOrnOrd, ViewWall viewWallIndex  			bitmapGreen = _bitmaps[nativeBitmapIndex];  			var_X = pixelWidth;  			if (flipHorizontal) { -				if(bitmapGreen != _tmpBitmap) +				if (bitmapGreen != _tmpBitmap)  					blitToBitmap(bitmapGreen, coordSetB[4], coordSetB[5], _tmpBitmap, coordSetB[4]);  				flipBitmapHorizontal(_tmpBitmap, coordSetB[4], coordSetB[5]);  				bitmapGreen = _tmpBitmap; @@ -1506,3 +1506,9 @@ void DisplayMan::clearScreenBox(Color color, Box &box, Viewport &viewport) {  	for (int y = box._y1; y < box._y2; ++y)  		memset(_vgaBuffer + y * _screenWidth + box._x1, color, sizeof(byte) * width);  } + +void DisplayMan::blitToScreen(byte *srcBitmap, uint16 srcWidth, uint16 srcX, uint16 srcY, +				  Box &box, +				  Color transparent, Viewport &viewport) { +	blitToScreen(srcBitmap, srcWidth, srcX, srcY, box._x1, box._x2, box._y1, box._y2, transparent, viewport); +} diff --git a/engines/dm/gfx.h b/engines/dm/gfx.h index 65322918cd..48df3d7695 100644 --- a/engines/dm/gfx.h +++ b/engines/dm/gfx.h @@ -290,6 +290,9 @@ public:  	void blitToScreen(byte *srcBitmap, uint16 srcWidth, uint16 srcX, uint16 srcY,  					  uint16 destFromX, uint16 destToX, uint16 destFromY, uint16 destToY,  					  Color transparent = kColorNoTransparency, Viewport &viewport = gDefultViewPort); +	void blitToScreen(byte *srcBitmap, uint16 srcWidth, uint16 srcX, uint16 srcY, +					  Box &box, +					  Color transparent = kColorNoTransparency, Viewport &viewport = gDefultViewPort);  	void flipBitmapHorizontal(byte *bitmap, uint16 width, uint16 height);  	void flipBitmapVertical(byte *bitmap, uint16 width, uint16 height); | 
