aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorStrangerke2016-06-23 00:39:27 +0200
committerBendegúz Nagy2016-08-26 23:02:22 +0200
commit8ffd4a0bad2015af360d0949f5f12a02f5b93c1d (patch)
treeb71924aa346512878c5829e0831b415a64b6a27e /engines
parent0ad91dfe6723e04271cbb44e7ccbce3071e1af6a (diff)
downloadscummvm-rg350-8ffd4a0bad2015af360d0949f5f12a02f5b93c1d.tar.gz
scummvm-rg350-8ffd4a0bad2015af360d0949f5f12a02f5b93c1d.tar.bz2
scummvm-rg350-8ffd4a0bad2015af360d0949f5f12a02f5b93c1d.zip
DM: Add some default statements in switches, change the scope of namespace DM in gfx.cpp
Diffstat (limited to 'engines')
-rw-r--r--engines/dm/gfx.cpp31
1 files changed, 28 insertions, 3 deletions
diff --git a/engines/dm/gfx.cpp b/engines/dm/gfx.cpp
index 18aaebe957..f430a6f769 100644
--- a/engines/dm/gfx.cpp
+++ b/engines/dm/gfx.cpp
@@ -558,9 +558,7 @@ byte gAlcoveOrnIndices[kAlcoveOrnCount] = { // @ G0192_auc_Graphic558_AlcoveOrna
1, /* Square Alcove */
2, /* Vi Altar */
3}; /* Arched Alcove */
-}
-using namespace DM;
DisplayMan::DisplayMan(DMEngine *dmEngine) : _vm(dmEngine) {
_vgaBuffer = nullptr;
@@ -805,13 +803,14 @@ void DisplayMan::blitToBitmap(byte *srcBitmap, uint16 srcWidth, uint16 srcHeight
}
void DisplayMan::flipBitmapHorizontal(byte *bitmap, uint16 width, uint16 height) {
- for (uint16 y = 0; y < height; ++y)
+ for (uint16 y = 0; y < height; ++y) {
for (uint16 x = 0; x < width / 2; ++x) {
byte tmp;
tmp = bitmap[y*width + x];
bitmap[y*width + x] = bitmap[y*width + width - 1 - x];
bitmap[y*width + width - 1 - x] = tmp;
}
+ }
}
void DisplayMan::flipBitmapVertical(byte *bitmap, uint16 width, uint16 height) {
@@ -875,6 +874,8 @@ void DisplayMan::drawSquareD3L(direction dir, int16 posX, int16 posY) {
// ... missing code
}
break;
+ default:
+ break;
}
}
@@ -895,6 +896,8 @@ void DisplayMan::drawSquareD3R(direction dir, int16 posX, int16 posY) {
// ... missing code
}
break;
+ default:
+ break;
}
}
void DisplayMan::drawSquareD3C(direction dir, int16 posX, int16 posY) {
@@ -913,6 +916,8 @@ void DisplayMan::drawSquareD3C(direction dir, int16 posX, int16 posY) {
//... missing code
}
break;
+ default:
+ break;
}
}
void DisplayMan::drawSquareD2L(direction dir, int16 posX, int16 posY) {
@@ -935,6 +940,8 @@ void DisplayMan::drawSquareD2L(direction dir, int16 posX, int16 posY) {
case kStairsSideElemType:
drawFloorPitOrStairsBitmap(kStairsNativeIndex_Side_D2L, gStairFrames[kFrameStairsSide_D2L]);
break;
+ default:
+ break;
}
}
void DisplayMan::drawSquareD2R(direction dir, int16 posX, int16 posY) {
@@ -957,6 +964,8 @@ void DisplayMan::drawSquareD2R(direction dir, int16 posX, int16 posY) {
case kStairsSideElemType:
drawFloorPitOrStairsBitmapFlippedHorizontally(kStairsNativeIndex_Side_D2L, gStairFrames[kFrameStairsSide_D2R]);
break;
+ default:
+ break;
}
}
void DisplayMan::drawSquareD2C(direction dir, int16 posX, int16 posY) {
@@ -975,6 +984,8 @@ void DisplayMan::drawSquareD2C(direction dir, int16 posX, int16 posY) {
// ... missing code
}
break;
+ default:
+ break;
}
}
void DisplayMan::drawSquareD1L(direction dir, int16 posX, int16 posY) {
@@ -997,6 +1008,8 @@ void DisplayMan::drawSquareD1L(direction dir, int16 posX, int16 posY) {
else
drawFloorPitOrStairsBitmap(kStairsNativeIndex_Down_Side_D1L, gStairFrames[kFrameStairsDownSide_D1L]);
break;
+ default:
+ break;
}
}
void DisplayMan::drawSquareD1R(direction dir, int16 posX, int16 posY) {
@@ -1019,6 +1032,8 @@ void DisplayMan::drawSquareD1R(direction dir, int16 posX, int16 posY) {
else
drawFloorPitOrStairsBitmapFlippedHorizontally(kStairsNativeIndex_Down_Side_D1L, gStairFrames[kFrameStairsDownSide_D1R]);
break;
+ default:
+ break;
}
}
void DisplayMan::drawSquareD1C(direction dir, int16 posX, int16 posY) {
@@ -1040,6 +1055,8 @@ void DisplayMan::drawSquareD1C(direction dir, int16 posX, int16 posY) {
// .... code not yet implemneted
}
break;
+ default:
+ break;
}
}
@@ -1054,6 +1071,8 @@ void DisplayMan::drawSquareD0L(direction dir, int16 posX, int16 posY) {
case kWallElemType:
drawWallSetBitmap(_wallSetBitMaps[kWall_D0L], gFrameWalls[kViewSquare_D0L]);
break;
+ default:
+ break;
}
}
@@ -1068,6 +1087,8 @@ void DisplayMan::drawSquareD0R(direction dir, int16 posX, int16 posY) {
case kWallElemType:
drawWallSetBitmap(_wallSetBitMaps[kWall_D0R], gFrameWalls[kViewSquare_D0R]);
break;
+ default:
+ break;
}
}
@@ -1084,6 +1105,8 @@ void DisplayMan::drawSquareD0C(direction dir, int16 posX, int16 posY) {
drawFloorPitOrStairsBitmapFlippedHorizontally(kStairsNativeIndex_Down_Front_D0C_Left, gStairFrames[kFrameStairsDownFront_D0R]);
}
break;
+ default:
+ break;
}
}
@@ -1531,3 +1554,5 @@ void DisplayMan::blitToScreen(byte *srcBitmap, uint16 srcWidth, uint16 srcX, uin
Color transparent, Viewport &viewport) {
blitToScreen(srcBitmap, srcWidth, srcX, srcY, box._x1, box._x2, box._y1, box._y2, transparent, viewport);
}
+
+}