aboutsummaryrefslogtreecommitdiff
path: root/engines/dm/gfx.cpp
diff options
context:
space:
mode:
authorStrangerke2016-08-20 00:37:28 +0200
committerBendegúz Nagy2016-08-26 23:02:22 +0200
commita5b8085c48f11dde20e090b063c3c9558d5f6c66 (patch)
tree1a98a5d5000b0a6bc2e0f3eebd8e1dfd9a11ef7a /engines/dm/gfx.cpp
parent80f2199151d2a005bbae64e9744477a5e52bfc52 (diff)
downloadscummvm-rg350-a5b8085c48f11dde20e090b063c3c9558d5f6c66.tar.gz
scummvm-rg350-a5b8085c48f11dde20e090b063c3c9558d5f6c66.tar.bz2
scummvm-rg350-a5b8085c48f11dde20e090b063c3c9558d5f6c66.zip
DM: Fix regression (pressure plate), fix compilation
Diffstat (limited to 'engines/dm/gfx.cpp')
-rw-r--r--engines/dm/gfx.cpp47
1 files changed, 24 insertions, 23 deletions
diff --git a/engines/dm/gfx.cpp b/engines/dm/gfx.cpp
index 44b1cc1bb9..c17eabe7be 100644
--- a/engines/dm/gfx.cpp
+++ b/engines/dm/gfx.cpp
@@ -1023,31 +1023,32 @@ void DisplayMan::f108_drawFloorOrnament(uint16 floorOrnOrdinal, uint16 viewFloor
}
};
- if (floorOrnOrdinal) {
- bool drawFootprints = (getFlag(floorOrnOrdinal, k0x8000_FootprintsAspect) ? true : false);
- byte *bitmap;
- if (drawFootprints && (clearFlag(floorOrnOrdinal, k0x8000_FootprintsAspect))) {
- floorOrnOrdinal--;
- uint16 floorOrnIndex = floorOrnOrdinal;
- int16 nativeBitmapIndex = _g102_currMapFloorOrnInfo[floorOrnIndex][k0_NativeBitmapIndex]
- + g191_floorOrnNativeBitmapndexInc[viewFloorIndex];
- uint16 *coordSets = g206_floorOrnCoordSets[_g102_currMapFloorOrnInfo[floorOrnIndex][k1_CoordinateSet]][viewFloorIndex];
- if ((viewFloorIndex == k8_viewFloor_D1R) || (viewFloorIndex == k5_viewFloor_D2R)
- || (viewFloorIndex == k2_viewFloor_D3R)
- || ((floorOrnIndex == k15_FloorOrnFootprints) && _g76_useFlippedWallAndFootprintsBitmap &&
- ((viewFloorIndex == k7_viewFloor_D1C) || (viewFloorIndex == k4_viewFloor_D2C) || (viewFloorIndex == k1_viewFloor_D3C)))) {
- bitmap = _g74_tmpBitmap;
- f99_copyBitmapAndFlipHorizontal(f489_getNativeBitmapOrGraphic(nativeBitmapIndex), bitmap, coordSets[4], coordSets[5]);
- } else
- bitmap = f489_getNativeBitmapOrGraphic(nativeBitmapIndex);
+ if (!floorOrnOrdinal)
+ return;
- f132_blitToBitmap(bitmap, _g296_bitmapViewport,
- *(Box *)coordSets, 0, 0, coordSets[4], k112_byteWidthViewport, k10_ColorFlesh, coordSets[5], k136_heightViewport);
- }
+ bool drawFootprints = (getFlag(floorOrnOrdinal, k0x8000_FootprintsAspect) ? true : false);
+ byte *bitmap;
+ if (!drawFootprints || clearFlag(floorOrnOrdinal, k0x8000_FootprintsAspect)) {
+ floorOrnOrdinal--;
+ uint16 floorOrnIndex = floorOrnOrdinal;
+ int16 nativeBitmapIndex = _g102_currMapFloorOrnInfo[floorOrnIndex][k0_NativeBitmapIndex]
+ + g191_floorOrnNativeBitmapndexInc[viewFloorIndex];
+ uint16 *coordSets = g206_floorOrnCoordSets[_g102_currMapFloorOrnInfo[floorOrnIndex][k1_CoordinateSet]][viewFloorIndex];
+ if ((viewFloorIndex == k8_viewFloor_D1R) || (viewFloorIndex == k5_viewFloor_D2R)
+ || (viewFloorIndex == k2_viewFloor_D3R)
+ || ((floorOrnIndex == k15_FloorOrnFootprints) && _g76_useFlippedWallAndFootprintsBitmap &&
+ ((viewFloorIndex == k7_viewFloor_D1C) || (viewFloorIndex == k4_viewFloor_D2C) || (viewFloorIndex == k1_viewFloor_D3C)))) {
+ bitmap = _g74_tmpBitmap;
+ f99_copyBitmapAndFlipHorizontal(f489_getNativeBitmapOrGraphic(nativeBitmapIndex), bitmap, coordSets[4], coordSets[5]);
+ } else
+ bitmap = f489_getNativeBitmapOrGraphic(nativeBitmapIndex);
- if (drawFootprints)
- f108_drawFloorOrnament(_vm->M0_indexToOrdinal(k15_FloorOrnFootprints), viewFloorIndex);
+ f132_blitToBitmap(bitmap, _g296_bitmapViewport,
+ *(Box *)coordSets, 0, 0, coordSets[4], k112_byteWidthViewport, k10_ColorFlesh, coordSets[5], k136_heightViewport);
}
+
+ if (drawFootprints)
+ f108_drawFloorOrnament(_vm->M0_indexToOrdinal(k15_FloorOrnFootprints), viewFloorIndex);
}
void DisplayMan::f111_drawDoor(uint16 doorThingIndex, uint16 doorState, int16* doorNativeBitmapIndices, int16 byteCount, int16 viewDoorOrnIndex, DoorFrames* doorFrames) {
@@ -3101,7 +3102,7 @@ void DisplayMan::f115_cthulhu(Thing thingParam, Direction directionParam, int16
}
if ((viewSquareIndex >= k0_ViewSquare_D3C) && (viewSquareIndex <= k9_ViewSquare_D0C) && (thingParam.getCell() == cellYellowBear)) { /* Square where objects are visible and object is located on cell being processed */
- objectAspect = &(_objectAspects209[g237_ObjectInfo[_vm->_dungeonMan->f141_getObjectInfoIndex(thingParam)]._objectAspectIndex]);
+ objectAspect = &(_objectAspects209[_vm->_dungeonMan->g237_ObjectInfo[_vm->_dungeonMan->f141_getObjectInfoIndex(thingParam)]._objectAspectIndex]);
AL_4_nativeBitmapIndex = k360_FirstObjectGraphicIndice + objectAspect->_firstNativeBitmapRelativeIndex;
if (useAlcoveObjectImage = (L0135_B_DrawAlcoveObjects && getFlag(objectAspect->_graphicInfo, k0x0010_ObjectAlcoveMask) && !viewLane))
AL_4_nativeBitmapIndex++;