aboutsummaryrefslogtreecommitdiff
path: root/engines/xeen
diff options
context:
space:
mode:
authorPaul Gilbert2018-07-26 18:54:17 -0700
committerPaul Gilbert2018-07-26 18:54:17 -0700
commit560f10c346d618caa6bdcc42647f691d6ab26fd0 (patch)
tree8fa9741216a0f9071b27f2672eda8c52f2821622 /engines/xeen
parent877b4e5cf3bd9c40cb1177a2f5a1cc452d3fcebf (diff)
downloadscummvm-rg350-560f10c346d618caa6bdcc42647f691d6ab26fd0.tar.gz
scummvm-rg350-560f10c346d618caa6bdcc42647f691d6ab26fd0.tar.bz2
scummvm-rg350-560f10c346d618caa6bdcc42647f691d6ab26fd0.zip
XEEN: Fix Coverity warnings
Diffstat (limited to 'engines/xeen')
-rw-r--r--engines/xeen/combat.cpp7
-rw-r--r--engines/xeen/detection.cpp2
-rw-r--r--engines/xeen/files.cpp3
-rw-r--r--engines/xeen/files.h1
-rw-r--r--engines/xeen/interface.cpp1
-rw-r--r--engines/xeen/item.cpp2
-rw-r--r--engines/xeen/worldofxeen/clouds_cutscenes.h2
-rw-r--r--engines/xeen/worldofxeen/darkside_cutscenes.cpp5
8 files changed, 8 insertions, 15 deletions
diff --git a/engines/xeen/combat.cpp b/engines/xeen/combat.cpp
index 4dd2ac6e8a..f6d16ae708 100644
--- a/engines/xeen/combat.cpp
+++ b/engines/xeen/combat.cpp
@@ -1612,10 +1612,6 @@ bool Combat::hitMonster(Character &c, RangeType rangeType) {
int divisor = 0;
switch (c._class) {
- case CLASS_KNIGHT:
- case CLASS_BARBARIAN:
- divisor = 1;
- break;
case CLASS_PALADIN :
case CLASS_ARCHER:
case CLASS_ROBBER:
@@ -1630,7 +1626,10 @@ bool Combat::hitMonster(Character &c, RangeType rangeType) {
case CLASS_SORCERER:
divisor = 4;
break;
+ case CLASS_KNIGHT:
+ case CLASS_BARBARIAN:
default:
+ divisor = 1;
break;
}
diff --git a/engines/xeen/detection.cpp b/engines/xeen/detection.cpp
index 8a5e096220..d304d95dee 100644
--- a/engines/xeen/detection.cpp
+++ b/engines/xeen/detection.cpp
@@ -164,7 +164,7 @@ bool XeenMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGame
error("Invalid game");
}
- return gd != 0;
+ return true;
}
SaveStateList XeenMetaEngine::listSaves(const char *target) const {
diff --git a/engines/xeen/files.cpp b/engines/xeen/files.cpp
index d18b5c4dd6..ecac2c5b2b 100644
--- a/engines/xeen/files.cpp
+++ b/engines/xeen/files.cpp
@@ -444,8 +444,7 @@ void StringArray::load(const Common::String &name, int ccMode) {
/*------------------------------------------------------------------------*/
-SaveArchive::SaveArchive(Party *party) : BaseCCArchive(), _party(party) {
- _data = nullptr;
+SaveArchive::SaveArchive(Party *party) : BaseCCArchive(), _party(party), _data(nullptr), _dataSize(0) {
}
SaveArchive::~SaveArchive() {
diff --git a/engines/xeen/files.h b/engines/xeen/files.h
index 0d421547fb..6289cc27b6 100644
--- a/engines/xeen/files.h
+++ b/engines/xeen/files.h
@@ -212,7 +212,6 @@ class SubWriteStream : virtual public Common::WriteStream {
protected:
Common::WriteStream *_parentStream;
uint32 _begin;
- DisposeAfterUse::Flag _disposeAfterUse;
public:
SubWriteStream(Common::WriteStream *parentStream) :
_parentStream(parentStream), _begin(parentStream->pos()) {
diff --git a/engines/xeen/interface.cpp b/engines/xeen/interface.cpp
index 63c0483c73..5b5b497250 100644
--- a/engines/xeen/interface.cpp
+++ b/engines/xeen/interface.cpp
@@ -162,6 +162,7 @@ Interface::Interface(XeenEngine *vm) : ButtonContainer(vm), InterfaceScene(vm),
_face1State = _face2State = 0;
_upDoorText = false;
_tillMove = 0;
+ _iconsMode = ICONS_STANDARD;
Common::fill(&_charFX[0], &_charFX[MAX_ACTIVE_PARTY], 0);
setWaitBounds();
}
diff --git a/engines/xeen/item.cpp b/engines/xeen/item.cpp
index a364dad928..5c0a55a3da 100644
--- a/engines/xeen/item.cpp
+++ b/engines/xeen/item.cpp
@@ -113,7 +113,7 @@ const char *XeenItem::getItemName(ItemCategory category, uint id) {
case CATEGORY_ACCESSORY:
return questItems[id - QUEST_OFFSET + 35 + 14];
default:
- assert(g_vm->getGameID() != GType_Swords);
+ assert(g_vm->getGameID() != GType_Swords && (id - QUEST_OFFSET + 35 + 14 + 11) < 85);
return questItems[id - QUEST_OFFSET + 35 + 14 + 11];
}
}
diff --git a/engines/xeen/worldofxeen/clouds_cutscenes.h b/engines/xeen/worldofxeen/clouds_cutscenes.h
index 39fded63ea..821ded44b9 100644
--- a/engines/xeen/worldofxeen/clouds_cutscenes.h
+++ b/engines/xeen/worldofxeen/clouds_cutscenes.h
@@ -81,7 +81,7 @@ private:
*/
bool showCloudsEnding5();
public:
- CloudsCutscenes(XeenEngine *vm) : Cutscenes(vm) {}
+ CloudsCutscenes(XeenEngine *vm) : Cutscenes(vm), _mergeX(0) {}
/**
* Shows the Clouds of Xeen intro sequence
diff --git a/engines/xeen/worldofxeen/darkside_cutscenes.cpp b/engines/xeen/worldofxeen/darkside_cutscenes.cpp
index c0ef2e98d7..3e21d21b25 100644
--- a/engines/xeen/worldofxeen/darkside_cutscenes.cpp
+++ b/engines/xeen/worldofxeen/darkside_cutscenes.cpp
@@ -627,11 +627,6 @@ bool DarkSideCutscenes::showDarkSideIntro2() {
wizard.draw(0, 0, Common::Point(9, 57));
fizzle.draw(0, idx, Common::Point(9, 57));
- if (!sound.isSoundPlaying() && !vocIndex) {
- sound.playVoice("pharoh7t.voc");
- vocIndex = 1;
- }
-
_subtitles.show();
WAIT(3);
}