Fixed some more warnings about unreachable code
svn-id: r44300
This commit is contained in:
parent
16d7d9ba23
commit
6b79910bcb
9 changed files with 15 additions and 11 deletions
|
@ -782,7 +782,7 @@ bool ScriptInterpreter::execOpcode(byte opcode) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
//return false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ SndHandle *Sound::getHandle() {
|
||||||
|
|
||||||
error("Sound::getHandle(): Too many sound handles");
|
error("Sound::getHandle(): Too many sound handles");
|
||||||
|
|
||||||
return NULL;
|
//return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Sound::isHandleActive(SndHandle *handle) {
|
bool Sound::isHandleActive(SndHandle *handle) {
|
||||||
|
|
|
@ -628,12 +628,16 @@ private:
|
||||||
break;
|
break;
|
||||||
case 0x50504C53: /* PPLS */
|
case 0x50504C53: /* PPLS */
|
||||||
error("PPLS crunched files are not supported");
|
error("PPLS crunched files are not supported");
|
||||||
|
#if 0
|
||||||
eff = 8;
|
eff = 8;
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
case 0x50583230: /* PX20 */
|
case 0x50583230: /* PX20 */
|
||||||
error("PX20 crunched files are not supported");
|
error("PX20 crunched files are not supported");
|
||||||
|
#if 0
|
||||||
eff = 6;
|
eff = 6;
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
default:
|
default:
|
||||||
eff = 0;
|
eff = 0;
|
||||||
|
|
||||||
|
|
|
@ -304,7 +304,7 @@ int16 ScriptVar::getValue() {
|
||||||
|
|
||||||
error("Parameter is not an r-value");
|
error("Parameter is not an r-value");
|
||||||
|
|
||||||
return 0;
|
//return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScriptVar::setValue(int16 value) {
|
void ScriptVar::setValue(int16 value) {
|
||||||
|
|
|
@ -778,7 +778,7 @@ int Actor::getFrameType(ActorFrameTypes frameType) {
|
||||||
case kFramePickUp:
|
case kFramePickUp:
|
||||||
case kFrameLook:
|
case kFrameLook:
|
||||||
error("Actor::getFrameType() unknown frame type %d", frameType);
|
error("Actor::getFrameType() unknown frame type %d", frameType);
|
||||||
return kFrameIHNMStand;
|
//return kFrameIHNMStand;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -338,7 +338,7 @@ const GameDisplayInfo &SagaEngine::getDisplayInfo() {
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
error("getDisplayInfo: Unknown game ID");
|
error("getDisplayInfo: Unknown game ID");
|
||||||
return ITE_DisplayInfo; // unreachable
|
//return ITE_DisplayInfo; // unreachable
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@ SndHandle *Sound::getHandle() {
|
||||||
|
|
||||||
error("Sound::getHandle(): Too many sound handles");
|
error("Sound::getHandle(): Too many sound handles");
|
||||||
|
|
||||||
return NULL;
|
//return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Sound::playSoundBuffer(Audio::SoundHandle *handle, SoundBuffer &buffer, int volume,
|
void Sound::playSoundBuffer(Audio::SoundHandle *handle, SoundBuffer &buffer, int volume,
|
||||||
|
|
|
@ -690,7 +690,7 @@ int Logic::interpretScript(Object *compact, int id, Header *scriptModule, int sc
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
error("Invalid operator %d",scriptCode[pc-1]);
|
error("Invalid operator %d",scriptCode[pc-1]);
|
||||||
return 0;
|
//return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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.
|
//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) {
|
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);
|
error("fnTalkError for id %d, instruction %d", id, cpt->o_down_flag);
|
||||||
return SCRIPT_STOP;
|
//return SCRIPT_STOP;
|
||||||
}
|
}
|
||||||
|
|
||||||
int Logic::fnStartTalk(Object *cpt, int32 id, int32 target, int32 d, int32 e, int32 f, int32 z, int32 x) {
|
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) {
|
int Logic::fnInnerSpace(Object *cpt, int32 id, int32 a, int32 b, int32 c, int32 d, int32 z, int32 x) {
|
||||||
error("fnInnerSpace() not working.");
|
error("fnInnerSpace() not working.");
|
||||||
return SCRIPT_STOP;
|
//return SCRIPT_STOP;
|
||||||
}
|
}
|
||||||
|
|
||||||
int Logic::fnSetScreen(Object *cpt, int32 id, int32 target, int32 screen, int32 c, int32 d, int32 z, int32 x) {
|
int Logic::fnSetScreen(Object *cpt, int32 id, int32 target, int32 screen, int32 c, int32 d, int32 z, int32 x) {
|
||||||
|
|
|
@ -325,7 +325,7 @@ int Logic::runScript2(byte *scriptData, byte *objectData, byte *offsetPtr) {
|
||||||
|
|
||||||
if (READ_LE_UINT32(checksumBlock) != 12345678) {
|
if (READ_LE_UINT32(checksumBlock) != 12345678) {
|
||||||
error("Invalid script in object %s", header.name);
|
error("Invalid script in object %s", header.name);
|
||||||
return 0;
|
//return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32 codeLen = READ_LE_UINT32(checksumBlock + 4);
|
int32 codeLen = READ_LE_UINT32(checksumBlock + 4);
|
||||||
|
@ -754,7 +754,7 @@ int Logic::runScript2(byte *scriptData, byte *objectData, byte *offsetPtr) {
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
error("Invalid script command %d", curCommand);
|
error("Invalid script command %d", curCommand);
|
||||||
return 3;
|
//return 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue