aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBendegúz Nagy2016-08-04 15:46:03 +0200
committerBendegúz Nagy2016-08-26 23:02:22 +0200
commit1a96af48c52b9efe8a8d5a4ceee1dd8d5f0ca3b1 (patch)
tree4d3eb0e5615ab2fb3c761ac7d262e76c15e3f268
parent483f05206f8286a69943ce0783fed53bbef7977a (diff)
downloadscummvm-rg350-1a96af48c52b9efe8a8d5a4ceee1dd8d5f0ca3b1.tar.gz
scummvm-rg350-1a96af48c52b9efe8a8d5a4ceee1dd8d5f0ca3b1.tar.bz2
scummvm-rg350-1a96af48c52b9efe8a8d5a4ceee1dd8d5f0ca3b1.zip
DM: Fix portrait drawing
-rw-r--r--engines/dm/gfx.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/engines/dm/gfx.cpp b/engines/dm/gfx.cpp
index 59f8f1c44b..347bb5ddaa 100644
--- a/engines/dm/gfx.cpp
+++ b/engines/dm/gfx.cpp
@@ -2585,7 +2585,12 @@ bool DisplayMan::f107_isDrawnWallOrnAnAlcove(int16 wallOrnOrd, ViewWall viewWall
AL0089_i_PixelWidth = (AL0090_puc_CoordinateSet + L0093_i_CoordinateSetOffset)[1] - (AL0090_puc_CoordinateSet + L0093_i_CoordinateSetOffset)[0];
if (!f491_isDerivedBitmapInCache(AP0116_i_WallOrnamentIndex = k4_DerivedBitmapFirstWallOrnament + (AP0116_i_WallOrnamentIndex << 2) + wallOrnDerivedBitmapIndexIncrement[viewWallIndex])) {
L0092_puc_Bitmap = f489_getNativeBitmapOrGraphic(AL0088_i_NativeBitmapIndex);
- f129_blitToBitmapShrinkWithPalChange(L0092_puc_Bitmap, f492_getDerivedBitmap(AP0116_i_WallOrnamentIndex), AL0091_puc_CoordinateSet[4] << 1, AL0091_puc_CoordinateSet[5], AL0089_i_PixelWidth + 1, AL0090_puc_CoordinateSet[5], (viewWallIndex <= k4_ViewWall_D3R_FRONT) ? g198_PalChangesDoorButtonAndWallOrn_D3 : g199_PalChangesDoorButtonAndWallOrn_D2);
+ // HACK: originally AL0089_i_PixelWidth + 1 is passed as the 5th parameter, but then later AL0090_puc_CoordinateSet[4]'s value is used
+ // to get the width of the shrunk bitmap, dunno why that is
+ f129_blitToBitmapShrinkWithPalChange(L0092_puc_Bitmap, f492_getDerivedBitmap(AP0116_i_WallOrnamentIndex),
+ AL0091_puc_CoordinateSet[4] << 1, AL0091_puc_CoordinateSet[5],
+ AL0090_puc_CoordinateSet[4] << 1, AL0090_puc_CoordinateSet[5],
+ (viewWallIndex <= k4_ViewWall_D3R_FRONT) ? g198_PalChangesDoorButtonAndWallOrn_D3 : g199_PalChangesDoorButtonAndWallOrn_D2);
f493_addDerivedBitmap(AP0116_i_WallOrnamentIndex);
}
AL0091_puc_Bitmap = f492_getDerivedBitmap(AP0116_i_WallOrnamentIndex);