mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-06 02:10:28 +00:00
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.
This commit is contained in:
parent
823a7e6551
commit
36e5374c8b
@ -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 kDMElementTypeCorridor:
|
||||
case kDMElementTypeTeleporter:
|
||||
case kDMElementTypeDoorSide:
|
||||
drawObjectsCreaturesProjectilesExplosions(Thing(squareAspect[kDMSquareAspectFirstGroupOrObject]), dir, posX, posY, kDMViewSquareD0L, kDMCellOrderBackRight);
|
||||
break;
|
||||
case kDMElementTypeStairsSide:
|
||||
drawFloorPitOrStairsBitmap(_stairsNativeBitmapIndexSideD0L, frameStairsSideD0L);
|
||||
return;
|
||||
case kDMElementTypePit:
|
||||
drawFloorPitOrStairsBitmap(squareAspect[kDMSquareAspectPitInvisible] ? kDMGraphicIdxFloorPitInvisibleD0L : kDMGraphicIdxFloorPitD0L, frameFloorPitD0L);
|
||||
case kDMElementTypeStairsSide:
|
||||
if (squareAspect[kDMSquareAspectStairsUp])
|
||||
drawFloorPitOrStairsBitmap(_stairsNativeBitmapIndexSideD0L, frameStairsSideD0L);
|
||||
break;
|
||||
default:
|
||||
// fall through
|
||||
case kDMElementTypeCorridor:
|
||||
case kDMElementTypeDoorSide:
|
||||
case kDMElementTypeTeleporter:
|
||||
drawObjectsCreaturesProjectilesExplosions(Thing(squareAspect[kDMSquareAspectFirstGroupOrObject]), dir, posX, posY, kDMViewSquareD0L, kDMCellOrderBackRight);
|
||||
break;
|
||||
case kDMElementTypeWall:
|
||||
drawWallSetBitmap(bitmapWallSetWallD0L, _frameWalls163[kDMViewSquareD0L]);
|
||||
return;
|
||||
}
|
||||
|
||||
drawCeilingPit(kDMGraphicIdxCeilingPitD0L, &frameCeilingPitD0L, posX, posY, false);
|
||||
|
Loading…
x
Reference in New Issue
Block a user