diff options
Diffstat (limited to 'engines/dm/gfx.cpp')
-rw-r--r-- | engines/dm/gfx.cpp | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/engines/dm/gfx.cpp b/engines/dm/gfx.cpp index ab6a5854f8..bb2d73eb4b 100644 --- a/engines/dm/gfx.cpp +++ b/engines/dm/gfx.cpp @@ -461,6 +461,10 @@ DisplayMan::~DisplayMan() { delete _doorFrameD1C; } +uint16 DisplayMan::bitmapByteCount(uint16 pixelWidth, uint16 height) { + return pixelWidth / 2 * height; +} + void DisplayMan::setUpScreens(uint16 width, uint16 height) { _screenWidth = width; _screenHeight = height; @@ -1249,7 +1253,7 @@ void DisplayMan::drawSquareD3L(Direction dir, int16 posX, int16 posY) { drawObjectsCreaturesProjectilesExplosions(Thing(squareAspect[k1_FirstGroupOrObjectAspect]), dir, posX, posY, k1_ViewSquare_D3L, k0x0218_CellOrder_DoorPass1_BackLeft_BackRight); drawWallSetBitmap(_bitmapWallSetDoorFrameLeftD3L, doorFrameLeftD3L); drawDoor(squareAspect[k3_DoorThingIndexAspect], squareAspect[k2_DoorStateAspect], - _doorNativeBitmapIndexFrontD3LCR, _vm->bitmapByteCount(48, 41), k0_ViewDoorOrnament_D3LCR, &doorFrameD3L); + _doorNativeBitmapIndexFrontD3LCR, bitmapByteCount(48, 41), k0_ViewDoorOrnament_D3LCR, &doorFrameD3L); order = k0x0349_CellOrder_DoorPass2_FrontLeft_FrontRight; break; case k2_ElementTypePit: @@ -1333,7 +1337,7 @@ void DisplayMan::drawSquareD3R(Direction dir, int16 posX, int16 posY) { drawDoor(squareAspect[k3_DoorThingIndexAspect], squareAspect[k2_DoorStateAspect], _doorNativeBitmapIndexFrontD3LCR, - _vm->bitmapByteCount(48, 41), k0_ViewDoorOrnament_D3LCR, &doorFrameD3R); + bitmapByteCount(48, 41), k0_ViewDoorOrnament_D3LCR, &doorFrameD3R); break;; case k2_ElementTypePit: if (!squareAspect[k2_PitInvisibleAspect]) @@ -1410,7 +1414,7 @@ void DisplayMan::drawSquareD3C(Direction dir, int16 posX, int16 posY) { drawDoorButton(_vm->indexToOrdinal(k0_DoorButton), k1_ViewDoorOrnament_D2LCR); drawDoor(squareAspect[k3_DoorThingIndexAspect], squareAspect[k2_DoorStateAspect], - _doorNativeBitmapIndexFrontD3LCR, _vm->bitmapByteCount(48, 41), k0_ViewDoorOrnament_D3LCR, &doorFrameD3C); + _doorNativeBitmapIndexFrontD3LCR, bitmapByteCount(48, 41), k0_ViewDoorOrnament_D3LCR, &doorFrameD3C); order = k0x0349_CellOrder_DoorPass2_FrontLeft_FrontRight; break; case k2_ElementTypePit: @@ -1490,7 +1494,7 @@ void DisplayMan::drawSquareD2L(Direction dir, int16 posX, int16 posY) { drawObjectsCreaturesProjectilesExplosions(Thing(squareAspect[k1_FirstGroupOrObjectAspect]), dir, posX, posY, k4_ViewSquare_D2L, k0x0218_CellOrder_DoorPass1_BackLeft_BackRight); drawWallSetBitmap(_bitmapWallSetDoorFrameTopD2LCR, doorFrameTopD2L); drawDoor(squareAspect[k3_DoorThingIndexAspect], squareAspect[k2_DoorStateAspect], _doorNativeBitmapIndexFrontD2LCR, - _vm->bitmapByteCount(64, 61), k1_ViewDoorOrnament_D2LCR, &doorFrameD2L); + bitmapByteCount(64, 61), k1_ViewDoorOrnament_D2LCR, &doorFrameD2L); order = k0x0349_CellOrder_DoorPass2_FrontLeft_FrontRight; break; case k2_ElementTypePit: @@ -1577,7 +1581,7 @@ void DisplayMan::drawSquareD2R(Direction dir, int16 posX, int16 posY) { drawObjectsCreaturesProjectilesExplosions(Thing(squareAspect[k1_FirstGroupOrObjectAspect]), dir, posX, posY, k5_ViewSquare_D2R, k0x0128_CellOrder_DoorPass1_BackRight_BackLeft); drawWallSetBitmap(_bitmapWallSetDoorFrameTopD2LCR, doorFrameTopD2R); drawDoor(squareAspect[k3_DoorThingIndexAspect], squareAspect[k2_DoorStateAspect], - _doorNativeBitmapIndexFrontD2LCR, _vm->bitmapByteCount(64, 61), k1_ViewDoorOrnament_D2LCR, &doorFrameD2R); + _doorNativeBitmapIndexFrontD2LCR, bitmapByteCount(64, 61), k1_ViewDoorOrnament_D2LCR, &doorFrameD2R); order = k0x0439_CellOrder_DoorPass2_FrontRight_FrontLeft; break; case k2_ElementTypePit: @@ -1660,7 +1664,7 @@ void DisplayMan::drawSquareD2C(Direction dir, int16 posX, int16 posY) { drawDoorButton(_vm->indexToOrdinal(k0_DoorButton), k2_viewDoorButton_D2C); drawDoor(squareAspect[k3_DoorThingIndexAspect], squareAspect[k2_DoorStateAspect], - _doorNativeBitmapIndexFrontD2LCR, _vm->bitmapByteCount(64, 61), k1_ViewDoorOrnament_D2LCR, &doorFrameD2C); + _doorNativeBitmapIndexFrontD2LCR, bitmapByteCount(64, 61), k1_ViewDoorOrnament_D2LCR, &doorFrameD2C); order = k0x0349_CellOrder_DoorPass2_FrontLeft_FrontRight; break; case k2_ElementTypePit: @@ -1745,7 +1749,7 @@ void DisplayMan::drawSquareD1L(Direction dir, int16 posX, int16 posY) { drawObjectsCreaturesProjectilesExplosions(Thing(squareAspect[k1_FirstGroupOrObjectAspect]), dir, posX, posY, k7_ViewSquare_D1L, k0x0028_CellOrder_DoorPass1_BackRight); drawWallSetBitmap(_bitmapWallSetDoorFrameTopD1LCR, doorFrameTopD1L); drawDoor(squareAspect[k3_DoorThingIndexAspect], squareAspect[k2_DoorStateAspect], - _doorNativeBitmapIndexFrontD1LCR, _vm->bitmapByteCount(96, 88), k2_ViewDoorOrnament_D1LCR, &doorFrameD1L); + _doorNativeBitmapIndexFrontD1LCR, bitmapByteCount(96, 88), k2_ViewDoorOrnament_D1LCR, &doorFrameD1L); order = k0x0039_CellOrder_DoorPass2_FrontRight; break; case k2_ElementTypePit: @@ -1829,7 +1833,7 @@ void DisplayMan::drawSquareD1R(Direction dir, int16 posX, int16 posY) { drawObjectsCreaturesProjectilesExplosions(Thing(squareAspect[k1_FirstGroupOrObjectAspect]), dir, posX, posY, k8_ViewSquare_D1R, k0x0018_CellOrder_DoorPass1_BackLeft); drawWallSetBitmap(_bitmapWallSetDoorFrameTopD1LCR, doorFrameTopD1R); drawDoor(squareAspect[k3_DoorThingIndexAspect], squareAspect[k2_DoorStateAspect], - _doorNativeBitmapIndexFrontD1LCR, _vm->bitmapByteCount(96, 88), k2_ViewDoorOrnament_D1LCR, &doorFrameD1R); + _doorNativeBitmapIndexFrontD1LCR, bitmapByteCount(96, 88), k2_ViewDoorOrnament_D1LCR, &doorFrameD1R); order = k0x0049_CellOrder_DoorPass2_FrontLeft; break; case k2_ElementTypePit: @@ -1914,7 +1918,7 @@ void DisplayMan::drawSquareD1C(Direction dir, int16 posX, int16 posY) { drawDoorButton(_vm->indexToOrdinal(k0_DoorButton), k3_viewDoorButton_D1C); drawDoor(squareAspect[k3_DoorThingIndexAspect], squareAspect[k2_DoorStateAspect], - _doorNativeBitmapIndexFrontD1LCR, _vm->bitmapByteCount(96, 88), k2_ViewDoorOrnament_D1LCR, _doorFrameD1C); + _doorNativeBitmapIndexFrontD1LCR, bitmapByteCount(96, 88), k2_ViewDoorOrnament_D1LCR, _doorFrameD1C); order = k0x0349_CellOrder_DoorPass2_FrontLeft_FrontRight; break; case k2_ElementTypePit: |