diff options
| author | Paul Gilbert | 2011-06-28 22:36:43 +1000 | 
|---|---|---|
| committer | Paul Gilbert | 2011-06-28 22:36:43 +1000 | 
| commit | 04a123a4efc0ae4a76fa4ca20d8ffd692d7359ab (patch) | |
| tree | a2c1554c3ec44c97fb986b1aeaca7c9a0bb55921 | |
| parent | a89ce394bcaa9f967f2db7e9281bf25f381ceb69 (diff) | |
| download | scummvm-rg350-04a123a4efc0ae4a76fa4ca20d8ffd692d7359ab.tar.gz scummvm-rg350-04a123a4efc0ae4a76fa4ca20d8ffd692d7359ab.tar.bz2 scummvm-rg350-04a123a4efc0ae4a76fa4ca20d8ffd692d7359ab.zip  | |
CGE: Fix for displaying non full-screen bitmaps
| -rw-r--r-- | engines/cge/vga13h.cpp | 17 | 
1 files changed, 2 insertions, 15 deletions
diff --git a/engines/cge/vga13h.cpp b/engines/cge/vga13h.cpp index 21aec31e5d..b59f8e8de5 100644 --- a/engines/cge/vga13h.cpp +++ b/engines/cge/vga13h.cpp @@ -1247,20 +1247,14 @@ void BITMAP::XShow(int x, int y) {  void BITMAP::Show(int x, int y) { -	// Create a temporary surface to hold the unpacked bitmap data -	Graphics::Surface rawSurface; -	rawSurface.create(W, H, Graphics::PixelFormat::createFormatCLUT8()); -  	const byte *srcP = (const byte *)V; -	byte *destP = (byte *)rawSurface.pixels; -	byte *destEndP = destP + (W * H); -	Common::set_to(destP, destEndP, 0); +	byte *destEndP = (byte *)VGA::Page[1]->pixels + (SCR_WID * SCR_HIG);  	// Loop through processing data for each plane. The game originally ran in plane mapped mode, where a  	// given plane holds each fourth pixel sequentially. So to handle an entire picture, each plane's data  	// must be decompressed and inserted into the surface  	for (int planeCtr = 0; planeCtr < 4; ++planeCtr) { -		destP = (byte *)rawSurface.getBasePtr(planeCtr, 0); +		byte *destP = (byte *)VGA::Page[1]->getBasePtr(x + planeCtr, y);  		for (;;) {  			uint16 v = READ_LE_UINT16(srcP); @@ -1301,13 +1295,6 @@ void BITMAP::Show(int x, int y) {  		}  	} -	// Copy the decompressed buffer to the specified x/y position on Page #1 -	for (int yc = 0; yc < rawSurface.h; ++yc) { -		srcP = (const byte *)rawSurface.getBasePtr(0, yc); -		destP = (byte *)VGA::Page[1]->getBasePtr(x, y + yc); -		Common::copy(srcP, srcP + rawSurface.w, destP); -	} -  	// Temporary  	g_system->copyRectToScreen((const byte *)VGA::Page[1]->getBasePtr(0, 0), SCR_WID, 0, 0, SCR_WID, SCR_HIG);  	byte palData[PAL_SIZ];  | 
