diff options
author | Adrian Frühwirth | 2018-03-24 20:53:13 +0100 |
---|---|---|
committer | Adrian Frühwirth | 2018-03-25 22:22:43 +0200 |
commit | 36e5374c8b305cd0db4706ba2659fc27e56c0926 (patch) | |
tree | 0b2c0b49d7bbee78ecafc1547fc20b91df1165df /engines/dm | |
parent | 823a7e655194361ceecbedea348d217ca4eeaf99 (diff) | |
download | scummvm-rg350-36e5374c8b305cd0db4706ba2659fc27e56c0926.tar.gz scummvm-rg350-36e5374c8b305cd0db4706ba2659fc27e56c0926.tar.bz2 scummvm-rg350-36e5374c8b305cd0db4706ba2659fc27e56c0926.zip |
DM: Fix drawSquareD0L() to match original rebuilt sources
The current implementation is shite ((c) Strangerke), so here is one
which matches the rebuilt sources :-)
Given that drawSquareD0R() is identical to the rebuilt sources already
it's safe to assume that no refactoring has been done which could
explain why drawSquareD0L() looks different.
While we're at it, mark that (now correct) fallthrough as intentional
to silence the current gcc7 warning.
Diffstat (limited to 'engines/dm')
-rw-r--r-- | engines/dm/gfx.cpp | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/engines/dm/gfx.cpp b/engines/dm/gfx.cpp index ba28e25fde..f75e7eb170 100644 --- a/engines/dm/gfx.cpp +++ b/engines/dm/gfx.cpp @@ -2162,22 +2162,20 @@ void DisplayMan::drawSquareD0L(Direction dir, int16 posX, int16 posY) { uint16 squareAspect[5]; _vm->_dungeonMan->setSquareAspect(squareAspect, dir, posX, posY); switch (squareAspect[kDMSquareAspectElement]) { - case kDMElementTypeWall: - drawWallSetBitmap(bitmapWallSetWallD0L, _frameWalls163[kDMViewSquareD0L]); - break; + case kDMElementTypeStairsSide: + drawFloorPitOrStairsBitmap(_stairsNativeBitmapIndexSideD0L, frameStairsSideD0L); + return; + case kDMElementTypePit: + drawFloorPitOrStairsBitmap(squareAspect[kDMSquareAspectPitInvisible] ? kDMGraphicIdxFloorPitInvisibleD0L : kDMGraphicIdxFloorPitD0L, frameFloorPitD0L); + // fall through case kDMElementTypeCorridor: - case kDMElementTypeTeleporter: case kDMElementTypeDoorSide: + case kDMElementTypeTeleporter: drawObjectsCreaturesProjectilesExplosions(Thing(squareAspect[kDMSquareAspectFirstGroupOrObject]), dir, posX, posY, kDMViewSquareD0L, kDMCellOrderBackRight); break; - case kDMElementTypePit: - drawFloorPitOrStairsBitmap(squareAspect[kDMSquareAspectPitInvisible] ? kDMGraphicIdxFloorPitInvisibleD0L : kDMGraphicIdxFloorPitD0L, frameFloorPitD0L); - case kDMElementTypeStairsSide: - if (squareAspect[kDMSquareAspectStairsUp]) - drawFloorPitOrStairsBitmap(_stairsNativeBitmapIndexSideD0L, frameStairsSideD0L); - break; - default: - break; + case kDMElementTypeWall: + drawWallSetBitmap(bitmapWallSetWallD0L, _frameWalls163[kDMViewSquareD0L]); + return; } drawCeilingPit(kDMGraphicIdxCeilingPitD0L, &frameCeilingPitD0L, posX, posY, false); |