diff options
Diffstat (limited to 'engines/dm/gfx.cpp')
-rw-r--r-- | engines/dm/gfx.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/engines/dm/gfx.cpp b/engines/dm/gfx.cpp index bf07cd655a..853571873a 100644 --- a/engines/dm/gfx.cpp +++ b/engines/dm/gfx.cpp @@ -1376,44 +1376,44 @@ void DisplayMan::f111_drawDoor(uint16 doorThingIndex, uint16 doorState, int16* d void DisplayMan::f109_drawDoorOrnament(int16 doorOrnOrdinal, int16 viewDoorOrnIndex) { static byte g200_palChangesDoorOrn_D3[16] = {0, 120, 10, 30, 40, 30, 0, 60, 30, 90, 100, 110, 0, 20, 0, 130}; // @ G0200_auc_Graphic558_PaletteChanges_DoorOrnament_D3 static byte g201PalChangesDoorOrn_D2[16] = {0, 10, 20, 30, 40, 30, 60, 70, 50, 90, 100, 110, 120, 130, 140, 150}; // @ G0201_auc_Graphic558_PaletteChanges_DoorOrnament_D2 +#define AP0120_i_Height doorOrnOrdinal +#define AP0121_i_ByteWidth viewDoorOrnIndex + int16 L0104_i_NativeBitmapIndex; + int16 coordSetGreenToad; + uint16* coordSetOrangeElk; + byte* L0107_puc_Multiple; +#define AL0107_puc_Bitmap L0107_puc_Multiple + byte* L0108_puc_Bitmap_Native; -#define height doorOrnOrdinal -#define byteWidth viewDoorOrnIndex - if (doorOrnOrdinal) { doorOrnOrdinal--; - int16 nativeBitmapIndex = _g103_currMapDoorOrnInfo[doorOrnOrdinal][k0_NativeBitmapIndex]; - int16 coordSetGreenToad = _g103_currMapDoorOrnInfo[doorOrnOrdinal][k1_CoordinateSet]; - uint16 *coordSetOrangeElk = g207_doorOrnCoordSets[coordSetGreenToad][viewDoorOrnIndex]; - byte *bitmap = nullptr; + L0104_i_NativeBitmapIndex = _g103_currMapDoorOrnInfo[doorOrnOrdinal][k0_NativeBitmapIndex]; + coordSetOrangeElk = &g207_doorOrnCoordSets[coordSetGreenToad = _g103_currMapDoorOrnInfo[doorOrnOrdinal][k1_CoordinateSet]][viewDoorOrnIndex][0]; if (viewDoorOrnIndex == k2_ViewDoorOrnament_D1LCR) { - bitmap = f489_getNativeBitmapOrGraphic(nativeBitmapIndex); - byteWidth = 48; - height = 88; + AL0107_puc_Bitmap = f489_getNativeBitmapOrGraphic(L0104_i_NativeBitmapIndex); + AP0121_i_ByteWidth = k48_byteWidth; + AP0120_i_Height = 88; } else { if (!f491_isDerivedBitmapInCache(doorOrnOrdinal = k68_DerivedBitmapFirstDoorOrnament_D3 + (doorOrnOrdinal * 2) + viewDoorOrnIndex)) { - uint16 *coordSetRedEagle = g207_doorOrnCoordSets[coordSetGreenToad][k2_ViewDoorOrnament_D1LCR]; - byte* bitmapNative = f489_getNativeBitmapOrGraphic(nativeBitmapIndex); - f129_blitToBitmapShrinkWithPalChange(bitmapNative, - f492_getDerivedBitmap(doorOrnOrdinal), - coordSetRedEagle[4] << 1, coordSetRedEagle[5], - coordSetOrangeElk[2] - coordSetOrangeElk[0] + 1, - coordSetOrangeElk[5], - (viewDoorOrnIndex == k0_ViewDoorOrnament_D3LCR) ? g200_palChangesDoorOrn_D3 : g201PalChangesDoorOrn_D2); + uint16 *coordSetRedEagle = &g207_doorOrnCoordSets[coordSetGreenToad][k2_ViewDoorOrnament_D1LCR][0]; + L0108_puc_Bitmap_Native = f489_getNativeBitmapOrGraphic(L0104_i_NativeBitmapIndex); + f129_blitToBitmapShrinkWithPalChange(L0108_puc_Bitmap_Native, f492_getDerivedBitmap(doorOrnOrdinal), coordSetRedEagle[4] << 1, coordSetRedEagle[5], coordSetOrangeElk[1] - coordSetOrangeElk[0] + 1, coordSetOrangeElk[5], (viewDoorOrnIndex == k0_ViewDoorOrnament_D3LCR) ? g200_palChangesDoorOrn_D3 : g201PalChangesDoorOrn_D2); f493_addDerivedBitmap(doorOrnOrdinal); } - bitmap = f492_getDerivedBitmap(doorOrnOrdinal); + AL0107_puc_Bitmap = f492_getDerivedBitmap(doorOrnOrdinal); if (viewDoorOrnIndex == k0_ViewDoorOrnament_D3LCR) { - byteWidth = 24; - height = 41; + AP0121_i_ByteWidth = k24_byteWidth; + AP0120_i_Height = 41; } else { - byteWidth = 32; - height = 61; + AP0121_i_ByteWidth = k32_byteWidth; + AP0120_i_Height = 61; } } - f132_blitToBitmap(bitmap, _g74_tmpBitmap, - *(Box *)coordSetOrangeElk, 0, 0, coordSetOrangeElk[4], byteWidth, k9_ColorGold, coordSetOrangeElk[5], height); + { + Box box(coordSetOrangeElk[0], coordSetOrangeElk[1], coordSetOrangeElk[2], coordSetOrangeElk[3]); + f132_blitToBitmap(AL0107_puc_Bitmap, _g74_tmpBitmap, box, 0, 0, coordSetOrangeElk[4], AP0121_i_ByteWidth, k9_ColorGold, coordSetOrangeElk[5], AP0120_i_Height); + } } } @@ -1448,7 +1448,7 @@ void DisplayMan::f21_blitToScreen(byte *bitmap, int16* box, int16 byteWidth, Col f21_blitToScreen(bitmap, &actualBox, byteWidth, transparent, height); } -void DisplayMan::f21_blitToScreen(byte* bitmap, Box* box, int16 viewDoorOrnIndex, Color transparent, int16 doorOrnOrdinal) { +void DisplayMan::f21_blitToScreen(byte* bitmap, Box* box, int16 byteWidth, Color transparent, int16 height) { _g578_useByteBoxCoordinates = false; f132_blitToBitmap(bitmap, _g348_bitmapScreen, *box, 0, 0, byteWidth, k112_byteWidthViewport, transparent, height, k136_heightViewport); } |