aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorStrangerke2016-08-21 01:16:00 +0200
committerBendegúz Nagy2016-08-26 23:02:22 +0200
commit20165b18656ee6ddb2586983735fa280abfefc54 (patch)
tree9804e759bd293afbc3ff692d40acf18e2ddd0317 /engines
parente26a655e6774bf3e58ef4bdb4306b318d47a5609 (diff)
downloadscummvm-rg350-20165b18656ee6ddb2586983735fa280abfefc54.tar.gz
scummvm-rg350-20165b18656ee6ddb2586983735fa280abfefc54.tar.bz2
scummvm-rg350-20165b18656ee6ddb2586983735fa280abfefc54.zip
DM: Fix some GCC warnings
Diffstat (limited to 'engines')
-rw-r--r--engines/dm/eventman.cpp22
-rw-r--r--engines/dm/gfx.cpp36
2 files changed, 32 insertions, 26 deletions
diff --git a/engines/dm/eventman.cpp b/engines/dm/eventman.cpp
index 234cac4360..a3677b082c 100644
--- a/engines/dm/eventman.cpp
+++ b/engines/dm/eventman.cpp
@@ -926,7 +926,7 @@ void EventManager::f365_commandTurnParty(CommandType cmdType) {
f362_commandHighlightBoxEnable(291, 318, 125, 145);
uint16 partySquare = _vm->_dungeonMan->f151_getSquare(_vm->_dungeonMan->_g306_partyMapX, _vm->_dungeonMan->_g307_partyMapY).toByte();
- if (Square(partySquare).getType() == k3_ElementTypeStairs) {
+ if (Square(partySquare).getType() == k3_StairsElemType) {
f364_commandTakeStairs(getFlag(partySquare, k0x0004_StairsUp));
return;
}
@@ -971,7 +971,7 @@ void EventManager::f366_commandMoveParty(CommandType cmdType) {
int16 partyMapX = _vm->_dungeonMan->_g306_partyMapX;
int16 partyMapY = _vm->_dungeonMan->_g307_partyMapY;
uint16 AL1115_ui_Square = _vm->_dungeonMan->f151_getSquare(partyMapX, partyMapY).toByte();
- bool isStairsSquare = (Square(AL1115_ui_Square).getType() == k3_ElementTypeStairs);
+ bool isStairsSquare = (Square(AL1115_ui_Square).getType() == k3_StairsElemType);
if (isStairsSquare && (movementArrowIdx == 2)) { /* If moving backward while in stairs */
f364_commandTakeStairs(getFlag(AL1115_ui_Square, k0x0004_StairsUp));
return;
@@ -1006,8 +1006,11 @@ void EventManager::f366_commandMoveParty(CommandType cmdType) {
if (damage)
_vm->_sound->f064_SOUND_RequestPlay_CPSD(k18_soundPARTY_DAMAGED, partyMapX, partyMapY, k0_soundModePlayImmediately);
- } else if (isMovementBlocked = (_vm->_groupMan->f175_groupGetThing(partyMapX, partyMapY) != Thing::_endOfList))
- _vm->_groupMan->f209_processEvents29to41(partyMapX, partyMapY, kM1_TMEventTypeCreateReactionEvent31ParyIsAdjacent, 0);
+ } else {
+ isMovementBlocked = (_vm->_groupMan->f175_groupGetThing(partyMapX, partyMapY) != Thing::_endOfList);
+ if (isMovementBlocked)
+ _vm->_groupMan->f209_processEvents29to41(partyMapX, partyMapY, kM1_TMEventTypeCreateReactionEvent31ParyIsAdjacent, 0);
+ }
}
// DEBUG CODE: check for Console flag
@@ -1043,7 +1046,7 @@ bool EventManager::f375_processType80_clickDungeonView_isLeaderHandObjThrown(int
bool objectThrownFl;
if (posX <= 111) {
- if (_vm->_dungeonMan->_g285_squareAheadElement == k17_DoorFrontElemType) {
+ if (_vm->_dungeonMan->_g285_squareAheadElement == k17_ElementTypeDoorFront) {
if (posX < 64)
return false;
} else if (posX < 32)
@@ -1052,7 +1055,7 @@ bool EventManager::f375_processType80_clickDungeonView_isLeaderHandObjThrown(int
// Strangerke: Only present in CSB2.1... But it fixes a bug so we keep it
objectThrownFl = _vm->_championMan->f329_isLeaderHandObjectThrown(k0_sideLeft);
} else {
- if (_vm->_dungeonMan->_g285_squareAheadElement == k17_DoorFrontElemType) {
+ if (_vm->_dungeonMan->_g285_squareAheadElement == k17_ElementTypeDoorFront) {
if (posX > 163)
return false;
} else if (posX > 191)
@@ -1137,7 +1140,7 @@ void EventManager::f377_commandProcessType80ClickInDungeonView(int16 posX, int16
Box(40, 111, 122, 147) /* Back left */
};
- if (_vm->_dungeonMan->_g285_squareAheadElement == k17_DoorFrontElemType) {
+ if (_vm->_dungeonMan->_g285_squareAheadElement == k17_ElementTypeDoorFront) {
if (_vm->_championMan->_g411_leaderIndex == kM1_ChampionNone)
return;
@@ -1522,7 +1525,8 @@ void EventManager::f370_commandProcessType100_clickInSpellArea(uint16 posX, uint
championIndex = 2;
else if (posX <= 244)
championIndex = 0;
-
+ break;
+ default:
break;
}
@@ -1620,6 +1624,8 @@ void EventManager::f541_waitForMouseOrKeyActivity() {
case Common::EVENT_LBUTTONDOWN:
case Common::EVENT_RBUTTONDOWN:
return;
+ default:
+ break;
}
}
_vm->f22_delay(1);
diff --git a/engines/dm/gfx.cpp b/engines/dm/gfx.cpp
index 07b3b61f52..5f568a8931 100644
--- a/engines/dm/gfx.cpp
+++ b/engines/dm/gfx.cpp
@@ -339,17 +339,17 @@ void DisplayMan::initConstants() {
static uint16 palCredits[16] = {0x006, 0x0AA, 0xFF6, 0x840, 0xFF8, 0x000, 0x080, 0xA00, 0xC84, 0xFFA, 0xF84, 0xFC0, 0xFA0, 0x000, 0x620, 0xFFC}; // @ G0019_aui_Graphic562_Palette_Credits
static uint16 palDungeonView[6][16] = { // @ G0021_aaui_Graphic562_Palette_DungeonView
/* Atari ST: { 0x000, 0x333, 0x444, 0x310, 0x066, 0x420, 0x040, 0x060, 0x700, 0x750, 0x643, 0x770, 0x222, 0x555, 0x007, 0x777 }, RGB colors are different */
- 0x000, 0x666, 0x888, 0x620, 0x0CC, 0x840, 0x080, 0x0C0, 0xF00, 0xFA0, 0xC86, 0xFF0, 0x444, 0xAAA, 0x00F, 0xFFF,
+ { 0x000, 0x666, 0x888, 0x620, 0x0CC, 0x840, 0x080, 0x0C0, 0xF00, 0xFA0, 0xC86, 0xFF0, 0x444, 0xAAA, 0x00F, 0xFFF },
/* Atari ST: { 0x000, 0x222, 0x333, 0x310, 0x066, 0x410, 0x030, 0x050, 0x600, 0x640, 0x532, 0x760, 0x111, 0x444, 0x006, 0x666 }, RGB colors are different */
- 0x000, 0x444, 0x666, 0x620, 0x0CC, 0x820, 0x060, 0x0A0, 0xC00, 0x000, 0x000, 0xFC0, 0x222, 0x888, 0x00C, 0xCCC,
+ { 0x000, 0x444, 0x666, 0x620, 0x0CC, 0x820, 0x060, 0x0A0, 0xC00, 0x000, 0x000, 0xFC0, 0x222, 0x888, 0x00C, 0xCCC },
/* Atari ST: { 0x000, 0x111, 0x222, 0x210, 0x066, 0x310, 0x020, 0x040, 0x500, 0x530, 0x421, 0x750, 0x000, 0x333, 0x005, 0x555 }, RGB colors are different */
- 0x000, 0x222, 0x444, 0x420, 0x0CC, 0x620, 0x040, 0x080, 0xA00, 0x000, 0x000, 0xFA0, 0x000, 0x666, 0x00A, 0xAAA,
+ { 0x000, 0x222, 0x444, 0x420, 0x0CC, 0x620, 0x040, 0x080, 0xA00, 0x000, 0x000, 0xFA0, 0x000, 0x666, 0x00A, 0xAAA },
/* Atari ST: { 0x000, 0x000, 0x111, 0x100, 0x066, 0x210, 0x010, 0x030, 0x400, 0x420, 0x310, 0x640, 0x000, 0x222, 0x004, 0x444 }, RGB colors are different */
- 0x000, 0x000, 0x222, 0x200, 0x0CC, 0x420, 0x020, 0x060, 0x800, 0x000, 0x000, 0xC80, 0x000, 0x444, 0x008, 0x888,
+ { 0x000, 0x000, 0x222, 0x200, 0x0CC, 0x420, 0x020, 0x060, 0x800, 0x000, 0x000, 0xC80, 0x000, 0x444, 0x008, 0x888 },
/* Atari ST: { 0x000, 0x000, 0x000, 0x000, 0x066, 0x100, 0x000, 0x020, 0x300, 0x310, 0x200, 0x530, 0x000, 0x111, 0x003, 0x333 }, RGB colors are different */
- 0x000, 0x000, 0x000, 0x000, 0x0CC, 0x200, 0x000, 0x040, 0x600, 0x000, 0x000, 0xA60, 0x000, 0x222, 0x006, 0x666,
+ { 0x000, 0x000, 0x000, 0x000, 0x0CC, 0x200, 0x000, 0x040, 0x600, 0x000, 0x000, 0xA60, 0x000, 0x222, 0x006, 0x666 },
/* Atari ST: { 0x000, 0x000, 0x000, 0x000, 0x066, 0x000, 0x000, 0x010, 0x200, 0x200, 0x100, 0x320, 0x000, 0x000, 0x002, 0x222 }, RGB colors are different */
- 0x000, 0x000, 0x000, 0x000, 0x0CC, 0x000, 0x000, 0x020, 0x400, 0x000, 0x000, 0x640, 0x000, 0x000, 0x004, 0x444
+ { 0x000, 0x000, 0x000, 0x000, 0x0CC, 0x000, 0x000, 0x020, 0x400, 0x000, 0x000, 0x640, 0x000, 0x000, 0x004, 0x444 }
};
static byte palChangesCreatureD3[16] = {0, 120, 10, 30, 40, 30, 0, 60, 30, 0, 0, 110, 0, 20, 0, 130}; // @ G0221_auc_Graphic558_PaletteChanges_Creature_D3
@@ -370,7 +370,7 @@ void DisplayMan::initConstants() {
_palCredits[i] = palCredits[i];
_palChangesCreatureD3[i] = palChangesCreatureD3[i];
_palChangesCreatureD2[i] = palChangesCreatureD2[i];
- _palChangesNoChanges[16] = palChangesNoChanges[i];
+ _palChangesNoChanges[i] = palChangesNoChanges[i];
_palChangesFloorOrnD3[i] = palChangesFloorOrnD3[i];
_palChangesFloorOrnD2[i] = palChangesFloorOrnD2[i];
for (int j = 0; j < 6; j++)
@@ -398,16 +398,16 @@ void DisplayMan::initConstants() {
_projectileAspect[i] = projectileAspect[i];
_doorFrameD1C = new DoorFrames( // @ G0186_s_Graphic558_Frames_Door_D1C
- Frame(64, 159, 17, 102, 48, 88, 0, 0), /* Closed Or Destroyed */
- Frame(64, 159, 17, 38, 48, 88, 0, 66), /* Vertical Closed one fourth */
- Frame(64, 159, 17, 60, 48, 88, 0, 44), /* Vertical Closed half */
- Frame(64, 159, 17, 82, 48, 88, 0, 22), /* Vertical Closed three fourth */
- Frame(64, 75, 17, 102, 48, 88, 36, 0), /* Left Horizontal Closed one fourth */
- Frame(64, 87, 17, 102, 48, 88, 24, 0), /* Left Horizontal Closed half */
- Frame(64, 99, 17, 102, 48, 88, 12, 0), /* Left Horizontal Closed three fourth */
- Frame(148, 159, 17, 102, 48, 88, 48, 0), /* Right Horizontal Closed one fourth */
- Frame(136, 159, 17, 102, 48, 88, 48, 0), /* Right Horizontal Closed half */
- Frame(124, 159, 17, 102, 48, 88, 48, 0) /* Right Horizontal Closed three fourth */
+ Frame(64, 159, 17, 102, 48, 88, 0, 0), /* Closed Or Destroyed */
+ Frame(64, 159, 17, 38, 48, 88, 0, 66), /* Vertical Closed one fourth */
+ Frame(64, 159, 17, 60, 48, 88, 0, 44), /* Vertical Closed half */
+ Frame(64, 159, 17, 82, 48, 88, 0, 22), /* Vertical Closed three fourth */
+ Frame(64, 75, 17, 102, 48, 88, 36, 0), /* Left Horizontal Closed one fourth */
+ Frame(64, 87, 17, 102, 48, 88, 24, 0), /* Left Horizontal Closed half */
+ Frame(64, 99, 17, 102, 48, 88, 12, 0), /* Left Horizontal Closed three fourth */
+ Frame(148, 159, 17, 102, 48, 88, 48, 0), /* Right Horizontal Closed one fourth */
+ Frame(136, 159, 17, 102, 48, 88, 48, 0), /* Right Horizontal Closed half */
+ Frame(124, 159, 17, 102, 48, 88, 48, 0) /* Right Horizontal Closed three fourth */
);
_boxThievesEyeViewPortVisibleArea = Box(64, 159, 19, 113); // @ G0106_s_Graphic558_Box_ThievesEye_ViewportVisibleArea
@@ -1159,7 +1159,7 @@ void DisplayMan::f112_drawCeilingPit(int16 nativeBitmapIndex, Frame *frame, int1
return;
int16 mapSquare = _vm->_dungeonMan->_g279_dungeonMapData[mapIndex][mapX][mapY];
- if ((Square(mapSquare).getType() == k2_ElementTypePit) && getFlag(mapSquare, k0x0008_PitOpen)) {
+ if ((Square(mapSquare).getType() == k2_PitElemType) && getFlag(mapSquare, k0x0008_PitOpen)) {
if (flipHorizontal)
f105_drawFloorPitOrStairsBitmapFlippedHorizontally(nativeBitmapIndex, *frame);
else