aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWinterGrascph2016-05-06 18:20:30 +0200
committerBendegúz Nagy2016-08-26 23:02:22 +0200
commit9823845c990bc23010c985706a26b491c2d0c21e (patch)
treee4fc1dd7e59e386dc11bd5289ef2139979be5ea8
parent64371787e28fba114dc5dff27c5c7d61bb2bc293 (diff)
downloadscummvm-rg350-9823845c990bc23010c985706a26b491c2d0c21e.tar.gz
scummvm-rg350-9823845c990bc23010c985706a26b491c2d0c21e.tar.bz2
scummvm-rg350-9823845c990bc23010c985706a26b491c2d0c21e.zip
DM: Fix constant and global variable names according to coding conventions
-rw-r--r--engines/dm/dm.cpp4
-rw-r--r--engines/dm/gfx.cpp36
-rw-r--r--engines/dm/gfx.h58
3 files changed, 49 insertions, 49 deletions
diff --git a/engines/dm/dm.cpp b/engines/dm/dm.cpp
index a1b8dc0fc5..8f6f294551 100644
--- a/engines/dm/dm.cpp
+++ b/engines/dm/dm.cpp
@@ -57,11 +57,11 @@ Common::Error DMEngine::run() {
_displayMan->loadGraphics();
_dungeonMan->loadDungeonFile();
- _displayMan->loadPalette(palCredits);
+ _displayMan->loadPalette(kPalCredits);
uint16 i = 0; //TODO: testing, please delete me
while (true) {
- _displayMan->clearScreen(colorBlack);
+ _displayMan->clearScreen(kColorBlack);
_displayMan->drawDungeon(kDirNorth, i++, 0);
_displayMan->updateScreen();
_system->delayMillis(1000); //TODO: testing, please set me to 10
diff --git a/engines/dm/gfx.cpp b/engines/dm/gfx.cpp
index afed9bbf03..b8e3ad62d7 100644
--- a/engines/dm/gfx.cpp
+++ b/engines/dm/gfx.cpp
@@ -24,8 +24,8 @@ uint16 dmPalettes[10][16] = {
enum GraphicIndice {
- floorIndice = 75,
- ceilingIndice = 76
+ gFloorIndice = 75,
+ gCeilingIndice = 76
};
struct Frame {
@@ -35,15 +35,15 @@ struct Frame {
uint16 srcX, srcY;
};
-Frame ceilingFrame = {0, 223, 0, 28, 0, 0};
-Frame floorFrame = {0, 223, 66, 135, 0, 0};
+Frame gCeilingFrame = {0, 223, 0, 28, 0, 0};
+Frame gFloorFrame = {0, 223, 66, 135, 0, 0};
}
using namespace DM;
DisplayMan::DisplayMan(DMEngine *dmEngine) :
- _vm(dmEngine), _currPalette(palSwoosh), _screenWidth(0), _screenHeight(0),
+ _vm(dmEngine), _currPalette(kPalSwoosh), _screenWidth(0), _screenHeight(0),
_vgaBuffer(NULL), _itemCount(0), _packedItemPos(NULL), _packedBitmaps(NULL),
_bitmaps(NULL) {}
@@ -57,9 +57,9 @@ DisplayMan::~DisplayMan() {
void DisplayMan::setUpScreens(uint16 width, uint16 height) {
_screenWidth = width;
_screenHeight = height;
- loadPalette(palSwoosh);
+ loadPalette(kPalSwoosh);
_vgaBuffer = new byte[_screenWidth * _screenHeight];
- clearScreen(colorBlack);
+ clearScreen(kColorBlack);
}
void DisplayMan::loadGraphics() {
@@ -236,30 +236,30 @@ uint16 DisplayMan::height(uint16 index) {
}
void DisplayMan::drawWallSetBitmap(byte *bitmap, Frame &f, uint16 srcWidth) {
- blitToScreen(bitmap, srcWidth, f.srcX, f.srcY, f.destFromX, f.destToX + 1, f.destFromY, f.destToY + 1, colorFlesh);
+ blitToScreen(bitmap, srcWidth, f.srcX, f.srcY, f.destFromX, f.destToX + 1, f.destFromY, f.destToY + 1, kColorFlesh);
}
void DisplayMan::drawDungeon(direction dir, uint16 posX, uint16 posY) {
- loadPalette(palDungeonView0);
+ loadPalette(kPalDungeonView0);
// TODO: this is a global variable, set from here
bool flippedWallAndFootprints = (posX + posY + dir) & 1;
// NOTE: this can hold every bitmap, width and height is "flexible"
byte *tmpBitmap = new byte[305 * 111];
- clearBitmap(tmpBitmap, 305, 111, colorBlack);
+ clearBitmap(tmpBitmap, 305, 111, kColorBlack);
if (flippedWallAndFootprints) {
- blitToBitmap(_bitmaps[floorIndice], width(floorIndice), height(floorIndice), tmpBitmap, width(floorIndice));
- flipBitmapHorizontal(tmpBitmap, width(floorIndice), height(floorIndice));
- drawWallSetBitmap(tmpBitmap, floorFrame, width(floorIndice));
- drawWallSetBitmap(_bitmaps[ceilingIndice], ceilingFrame, width(ceilingIndice));
+ blitToBitmap(_bitmaps[gFloorIndice], width(gFloorIndice), height(gFloorIndice), tmpBitmap, width(gFloorIndice));
+ flipBitmapHorizontal(tmpBitmap, width(gFloorIndice), height(gFloorIndice));
+ drawWallSetBitmap(tmpBitmap, gFloorFrame, width(gFloorIndice));
+ drawWallSetBitmap(_bitmaps[gCeilingIndice], gCeilingFrame, width(gCeilingIndice));
} else {
- blitToBitmap(_bitmaps[ceilingIndice], width(ceilingIndice), height(ceilingIndice), tmpBitmap, width(ceilingIndice));
- flipBitmapHorizontal(tmpBitmap, width(ceilingIndice), height(ceilingIndice));
- drawWallSetBitmap(tmpBitmap, ceilingFrame, width(ceilingIndice));
- drawWallSetBitmap(_bitmaps[floorIndice], floorFrame, width(floorIndice));
+ blitToBitmap(_bitmaps[gCeilingIndice], width(gCeilingIndice), height(gCeilingIndice), tmpBitmap, width(gCeilingIndice));
+ flipBitmapHorizontal(tmpBitmap, width(gCeilingIndice), height(gCeilingIndice));
+ drawWallSetBitmap(tmpBitmap, gCeilingFrame, width(gCeilingIndice));
+ drawWallSetBitmap(_bitmaps[gFloorIndice], gFloorFrame, width(gFloorIndice));
}
diff --git a/engines/dm/gfx.h b/engines/dm/gfx.h
index f4d74abba3..79a4afd426 100644
--- a/engines/dm/gfx.h
+++ b/engines/dm/gfx.h
@@ -8,36 +8,36 @@ namespace DM {
struct Frame;
enum Color {
- colorNoTransparency = 255,
- colorBlack = 0,
- colorDarkGary = 1,
- colorLightGray = 2,
- colorDarkBrown = 3,
- colorCyan = 4,
- colorLightBrown = 5,
- colorDarkGreen = 6,
- colorLightGreen = 7,
- colorRed = 8,
- colorGold = 9,
- colorFlesh = 10,
- colorYellow = 11,
- colorDarkestGray = 12,
- colorLightestGray = 13,
- colorBlue = 14,
- colorWhite = 15
+ kColorNoTransparency = 255,
+ kColorBlack = 0,
+ kColorDarkGary = 1,
+ kColorLightGray = 2,
+ kColorDarkBrown = 3,
+ kColorCyan = 4,
+ kColorLightBrown = 5,
+ kColorDarkGreen = 6,
+ kColorLightGreen = 7,
+ kColorRed = 8,
+ kColorGold = 9,
+ kColorFlesh = 10,
+ kColorYellow = 11,
+ kColorDarkestGray = 12,
+ kColorLightestGray = 13,
+ kColorBlue = 14,
+ kColorWhite = 15
};
enum dmPaletteEnum {
- palSwoosh = 0,
- palMousePointer = 1,
- palCredits = 2,
- palEntrance = 3,
- palDungeonView0 = 4,
- palDungeonView1 = 5,
- palDungeonView2 = 6,
- palDungeonView3 = 7,
- palDungeonView4 = 8,
- palDungeonView5 = 9,
+ kPalSwoosh = 0,
+ kPalMousePointer = 1,
+ kPalCredits = 2,
+ kPalEntrance = 3,
+ kPalDungeonView0 = 4,
+ kPalDungeonView1 = 5,
+ kPalDungeonView2 = 6,
+ kPalDungeonView3 = 7,
+ kPalDungeonView4 = 8,
+ kPalDungeonView5 = 9,
};
@@ -75,11 +75,11 @@ public:
void blitToBitmap(byte *srcBitmap, uint16 srcWidth, uint16 srcX, uint16 srcY,
byte *destBitmap, uint16 destWidth,
uint16 destFromX, uint16 destToX, uint16 destFromY, uint16 destToY,
- Color transparent = colorNoTransparency);
+ Color transparent = kColorNoTransparency);
void blitToBitmap(byte *srcBitmap, uint16 srcWidth, uint16 srcHeight, byte *destBitmap, uint16 destWidth, uint16 destX = 0, uint16 destY = 0);
void blitToScreen(byte *srcBitmap, uint16 srcWidth, uint16 srcX, uint16 srcY,
uint16 destFromX, uint16 destToX, uint16 destFromY, uint16 destToY,
- Color transparent = colorNoTransparency);
+ Color transparent = kColorNoTransparency);
void flipBitmapHorizontal(byte *bitmap, uint16 width, uint16 height);
void flipBitmapVertical(byte *bitmap, uint16 width, uint16 height);