aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/agos/items.cpp4
-rw-r--r--engines/agos/saveload.cpp2
-rw-r--r--engines/agos/string.cpp2
-rw-r--r--engines/agos/window.cpp2
-rw-r--r--engines/cruise/cruise.cpp2
-rw-r--r--engines/gob/hotspots.cpp2
-rw-r--r--engines/kyra/resource.cpp6
-rw-r--r--engines/kyra/screen_lok.cpp2
-rw-r--r--engines/kyra/script.cpp2
-rw-r--r--engines/lure/strings.cpp2
-rw-r--r--engines/m4/script.cpp2
-rw-r--r--engines/m4/sound.cpp3
-rw-r--r--engines/parallaction/disk_ns.cpp2
-rw-r--r--engines/parallaction/objects.cpp3
-rw-r--r--engines/saga/actor.cpp2
-rw-r--r--engines/saga/detection.cpp2
-rw-r--r--engines/saga/sound.cpp2
-rw-r--r--engines/sword1/logic.cpp6
-rw-r--r--engines/sword2/interpreter.cpp2
19 files changed, 23 insertions, 27 deletions
diff --git a/engines/agos/items.cpp b/engines/agos/items.cpp
index 561877fe9c..874bf1a802 100644
--- a/engines/agos/items.cpp
+++ b/engines/agos/items.cpp
@@ -225,7 +225,7 @@ Item *AGOSEngine::actor() {
error("actor: is this code ever used?");
//if (_actorPlayer)
// return _actorPlayer;
- //return _dummyItem1;
+ return _dummyItem1; // for compilers that don't support NORETURN
}
Item *AGOSEngine::getNextItemPtr() {
@@ -455,7 +455,7 @@ uint AGOSEngine::itemPtrToID(Item *id) {
if (_itemArrayPtr[i] == id)
return i;
error("itemPtrToID: not found");
- //return 0;
+ return 0; // for compilers that don't support NORETURN
}
} // End of namespace AGOS
diff --git a/engines/agos/saveload.cpp b/engines/agos/saveload.cpp
index 4ef50efc8f..dfd11a4514 100644
--- a/engines/agos/saveload.cpp
+++ b/engines/agos/saveload.cpp
@@ -1657,7 +1657,7 @@ int AGOSEngine_PN::saveFile(char *name) {
delete f;
restartAnimation();
error("Couldn't save ");
- //return 0;
+ return 0; // for compilers that don't support NORETURN
}
f->finalize();
delete f;
diff --git a/engines/agos/string.cpp b/engines/agos/string.cpp
index 4b3f69de66..62f06ab12c 100644
--- a/engines/agos/string.cpp
+++ b/engines/agos/string.cpp
@@ -180,7 +180,7 @@ TextLocation *AGOSEngine::getTextLocation(uint a) {
default:
error("getTextLocation: Invalid text location %d", a);
}
- //return NULL;
+ return NULL; // for compilers that don't support NORETURN
}
void AGOSEngine::allocateStringTable(int num) {
diff --git a/engines/agos/window.cpp b/engines/agos/window.cpp
index fb197127bc..54e7928f38 100644
--- a/engines/agos/window.cpp
+++ b/engines/agos/window.cpp
@@ -42,7 +42,7 @@ uint AGOSEngine::getWindowNum(WindowBlock *window) {
return i;
error("getWindowNum: not found");
- //return 0;
+ return 0; // for compilers that don't support NORETURN
}
WindowBlock *AGOSEngine::openWindow(uint x, uint y, uint w, uint h, uint flags, uint fillColor, uint textColor) {
diff --git a/engines/cruise/cruise.cpp b/engines/cruise/cruise.cpp
index 3496ec50bb..50b1950c59 100644
--- a/engines/cruise/cruise.cpp
+++ b/engines/cruise/cruise.cpp
@@ -89,7 +89,7 @@ Common::Error CruiseEngine::run() {
if (!loadLanguageStrings()) {
error("Could not setup language data for your version");
- //return Common::kUnknownError;
+ return Common::kUnknownError; // for compilers that don't support NORETURN
}
initialize();
diff --git a/engines/gob/hotspots.cpp b/engines/gob/hotspots.cpp
index a5be507517..ff8ffbbab8 100644
--- a/engines/gob/hotspots.cpp
+++ b/engines/gob/hotspots.cpp
@@ -263,7 +263,7 @@ uint16 Hotspots::add(const Hotspot &hotspot) {
}
error("Hotspots::add(): Hotspot array full");
- //return 0xFFFF;
+ return 0xFFFF; // for compilers that don't support NORETURN
}
void Hotspots::remove(uint16 id) {
diff --git a/engines/kyra/resource.cpp b/engines/kyra/resource.cpp
index ab59108825..3ef5589266 100644
--- a/engines/kyra/resource.cpp
+++ b/engines/kyra/resource.cpp
@@ -132,7 +132,7 @@ bool Resource::reset() {
}
} else {
error("Unknown game id: %d", _vm->game());
- //return false;
+ return false; // for compilers that don't support NORETURN
}
return true;
@@ -191,7 +191,7 @@ bool Resource::loadFileList(const Common::String &filedata) {
} else if (!loadPakFile(filename)) {
delete f;
error("couldn't load file '%s'", filename.c_str());
- //return false;
+ return false; // for compilers that don't support NORETURN
}
}
}
@@ -207,7 +207,7 @@ bool Resource::loadFileList(const char * const *filelist, uint32 numFiles) {
while (numFiles--) {
if (!loadPakFile(filelist[numFiles])) {
error("couldn't load file '%s'", filelist[numFiles]);
- //return false;
+ return false; // for compilers that don't support NORETURN
}
}
diff --git a/engines/kyra/screen_lok.cpp b/engines/kyra/screen_lok.cpp
index de01eadccb..9ecdef325d 100644
--- a/engines/kyra/screen_lok.cpp
+++ b/engines/kyra/screen_lok.cpp
@@ -340,7 +340,7 @@ void Screen_LoK_16::getFadeParams(const Palette &pal, int delay, int &delayInc,
int Screen_LoK_16::fadePalStep(const Palette &pal, int diff) {
error("Screen_LoK_16::fadePalStep called");
- //return 0;
+ return 0; // for compilers that don't support NORETURN
}
void Screen_LoK_16::paletteMap(uint8 idx, int r, int g, int b) {
diff --git a/engines/kyra/script.cpp b/engines/kyra/script.cpp
index 3b18bca40d..c1c6a5122d 100644
--- a/engines/kyra/script.cpp
+++ b/engines/kyra/script.cpp
@@ -106,7 +106,7 @@ bool EMCInterpreter::load(const char *filename, EMCData *scriptData, const Commo
Common::SeekableReadStream *stream = _vm->resource()->createReadStream(filename);
if (!stream) {
error("Couldn't open script file '%s'", filename);
- //return false;
+ return false; // for compilers that don't support NORETURN
}
memset(scriptData, 0, sizeof(EMCData));
diff --git a/engines/lure/strings.cpp b/engines/lure/strings.cpp
index b7f179703b..571efde02d 100644
--- a/engines/lure/strings.cpp
+++ b/engines/lure/strings.cpp
@@ -178,7 +178,7 @@ char StringData::readCharacter() {
error("Unknown bit sequence encountered when decoding string");
- //return 0;
+ return 0; // for compilers that don't support NORETURN
}
void StringData::getString(uint16 stringId, char *dest, const char *hotspotName,
diff --git a/engines/m4/script.cpp b/engines/m4/script.cpp
index 047c228e7d..c74d533093 100644
--- a/engines/m4/script.cpp
+++ b/engines/m4/script.cpp
@@ -782,8 +782,6 @@ bool ScriptInterpreter::execOpcode(byte opcode) {
}
- //return false;
-
}
// Kernel functions
diff --git a/engines/m4/sound.cpp b/engines/m4/sound.cpp
index f640149026..1b24a3382d 100644
--- a/engines/m4/sound.cpp
+++ b/engines/m4/sound.cpp
@@ -60,8 +60,7 @@ SndHandle *Sound::getHandle() {
}
error("Sound::getHandle(): Too many sound handles");
-
- //return NULL;
+ return NULL; // for compilers that don't support NORETURN
}
bool Sound::isHandleActive(SndHandle *handle) {
diff --git a/engines/parallaction/disk_ns.cpp b/engines/parallaction/disk_ns.cpp
index bb59aa3a32..383937aa7e 100644
--- a/engines/parallaction/disk_ns.cpp
+++ b/engines/parallaction/disk_ns.cpp
@@ -620,7 +620,7 @@ private:
uint16 getCrunchType(uint32 signature) {
- byte eff;
+ byte eff = 0;
switch (signature) {
case 0x50503230: /* PP20 */
diff --git a/engines/parallaction/objects.cpp b/engines/parallaction/objects.cpp
index 3a77077702..fe5b4a7302 100644
--- a/engines/parallaction/objects.cpp
+++ b/engines/parallaction/objects.cpp
@@ -303,8 +303,7 @@ int16 ScriptVar::getValue() {
}
error("Parameter is not an r-value");
-
- //return 0;
+ return 0; // for compilers that don't support NORETURN
}
void ScriptVar::setValue(int16 value) {
diff --git a/engines/saga/actor.cpp b/engines/saga/actor.cpp
index 54fcb8a162..699eb39405 100644
--- a/engines/saga/actor.cpp
+++ b/engines/saga/actor.cpp
@@ -778,7 +778,7 @@ int Actor::getFrameType(ActorFrameTypes frameType) {
case kFramePickUp:
case kFrameLook:
error("Actor::getFrameType() unknown frame type %d", frameType);
- //return kFrameIHNMStand;
+ return kFrameIHNMStand; // for compilers that don't support NORETURN
}
#endif
}
diff --git a/engines/saga/detection.cpp b/engines/saga/detection.cpp
index 1025c230d6..807345cd7b 100644
--- a/engines/saga/detection.cpp
+++ b/engines/saga/detection.cpp
@@ -338,7 +338,7 @@ const GameDisplayInfo &SagaEngine::getDisplayInfo() {
#endif
default:
error("getDisplayInfo: Unknown game ID");
- //return ITE_DisplayInfo; // unreachable
+ return ITE_DisplayInfo; // for compilers that don't support NORETURN
}
}
diff --git a/engines/saga/sound.cpp b/engines/saga/sound.cpp
index 051c378e0c..79e5cbeb87 100644
--- a/engines/saga/sound.cpp
+++ b/engines/saga/sound.cpp
@@ -60,7 +60,7 @@ SndHandle *Sound::getHandle() {
error("Sound::getHandle(): Too many sound handles");
- //return NULL;
+ return NULL; // for compilers that don't support NORETURN
}
void Sound::playSoundBuffer(Audio::SoundHandle *handle, SoundBuffer &buffer, int volume,
diff --git a/engines/sword1/logic.cpp b/engines/sword1/logic.cpp
index 769bf6d4c5..26635c2708 100644
--- a/engines/sword1/logic.cpp
+++ b/engines/sword1/logic.cpp
@@ -690,7 +690,7 @@ int Logic::interpretScript(Object *compact, int id, Header *scriptModule, int sc
break;
default:
error("Invalid operator %d",scriptCode[pc-1]);
- //return 0;
+ return 0; // for compilers that don't support NORETURN
}
}
}
@@ -1252,7 +1252,7 @@ int Logic::fnChangeSpeechText(Object *cpt, int32 id, int32 tar, int32 width, int
//The game is halted for debugging. Maybe we'll remove this later.
int Logic::fnTalkError(Object *cpt, int32 id, int32 c, int32 d, int32 e, int32 f, int32 z, int32 x) {
error("fnTalkError for id %d, instruction %d", id, cpt->o_down_flag);
- //return SCRIPT_STOP;
+ return SCRIPT_STOP; // for compilers that don't support NORETURN
}
int Logic::fnStartTalk(Object *cpt, int32 id, int32 target, int32 d, int32 e, int32 f, int32 z, int32 x) {
@@ -1607,7 +1607,7 @@ int Logic::fnStopMusic(Object *cpt, int32 id, int32 a, int32 b, int32 c, int32 d
int Logic::fnInnerSpace(Object *cpt, int32 id, int32 a, int32 b, int32 c, int32 d, int32 z, int32 x) {
error("fnInnerSpace() not working.");
- //return SCRIPT_STOP;
+ return SCRIPT_STOP; // for compilers that don't support NORETURN
}
int Logic::fnSetScreen(Object *cpt, int32 id, int32 target, int32 screen, int32 c, int32 d, int32 z, int32 x) {
diff --git a/engines/sword2/interpreter.cpp b/engines/sword2/interpreter.cpp
index b48e92acb6..0500fb027e 100644
--- a/engines/sword2/interpreter.cpp
+++ b/engines/sword2/interpreter.cpp
@@ -754,7 +754,7 @@ int Logic::runScript2(byte *scriptData, byte *objectData, byte *offsetPtr) {
break;
default:
error("Invalid script command %d", curCommand);
- //return 3;
+ return 3; // for compilers that don't support NORETURN
}
}