[Scummvm-cvs-logs] SF.net SVN: scummvm:[55627] scummvm/trunk/engines/gob

drmccoy at users.sourceforge.net drmccoy at users.sourceforge.net
Sat Jan 29 23:44:06 CET 2011


Revision: 55627
          http://scummvm.svn.sourceforge.net/scummvm/?rev=55627&view=rev
Author:   drmccoy
Date:     2011-01-29 22:44:06 +0000 (Sat, 29 Jan 2011)

Log Message:
-----------
GOB: Move OpcodeFunc's return flag into its parameter

To make the meaning of the flag more clear and make the func
opcodes more similar to draw and gob opcodes.

Modified Paths:
--------------
    scummvm/trunk/engines/gob/inter.cpp
    scummvm/trunk/engines/gob/inter.h
    scummvm/trunk/engines/gob/inter_fascin.cpp
    scummvm/trunk/engines/gob/inter_inca2.cpp
    scummvm/trunk/engines/gob/inter_playtoons.cpp
    scummvm/trunk/engines/gob/inter_v1.cpp
    scummvm/trunk/engines/gob/inter_v2.cpp
    scummvm/trunk/engines/gob/inter_v3.cpp
    scummvm/trunk/engines/gob/inter_v5.cpp
    scummvm/trunk/engines/gob/inter_v6.cpp

Modified: scummvm/trunk/engines/gob/inter.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter.cpp	2011-01-29 22:15:57 UTC (rev 55626)
+++ scummvm/trunk/engines/gob/inter.cpp	2011-01-29 22:44:06 UTC (rev 55627)
@@ -79,22 +79,15 @@
 		warning("unimplemented opcodeDraw: %d [0x%X]", i, i);
 }
 
-bool Inter::executeOpcodeFunc(byte i, byte j, OpFuncParams &params) {
+void Inter::executeOpcodeFunc(byte i, byte j, OpFuncParams &params) {
 	debugC(1, kDebugFuncOp, "opcodeFunc %d.%d [0x%X.0x%X] (%s)",
 			i, j, i, j, getDescOpcodeFunc(i, j));
 
-	if ((i > 4) || (j > 15)) {
-		warning("unimplemented opcodeFunc: %d.%d [0x%X.0x%X]", i, j, i, j);
-		return false;
-	}
-
-	i = i * 16 + j;
-	if (_opcodesFunc[i].proc && _opcodesFunc[i].proc->isValid())
-		return (*_opcodesFunc[i].proc)(params);
+	int n = i * 16 + j;
+	if ((i <= 4) && (j <= 15) && _opcodesFunc[n].proc && _opcodesFunc[n].proc->isValid())
+		(*_opcodesFunc[n].proc)(params);
 	else
 		warning("unimplemented opcodeFunc: %d.%d [0x%X.0x%X]", i, j, i, j);
-
-	return false;
 }
 
 void Inter::executeOpcodeGob(int i, OpGobParams &params) {
@@ -329,7 +322,10 @@
 		if (cmd2 == 0)
 			cmd >>= 4;
 
-		if (executeOpcodeFunc(cmd2, cmd, params))
+		params.doReturn = false;
+		executeOpcodeFunc(cmd2, cmd, params);
+
+		if (params.doReturn)
 			return;
 
 		if (_vm->shouldQuit())
@@ -346,7 +342,6 @@
 	} while (params.counter != params.cmdCount);
 
 	_vm->_game->_script->setFinished(true);
-	return;
 }
 
 void Inter::callSub(int16 retFlag) {

Modified: scummvm/trunk/engines/gob/inter.h
===================================================================
--- scummvm/trunk/engines/gob/inter.h	2011-01-29 22:15:57 UTC (rev 55626)
+++ scummvm/trunk/engines/gob/inter.h	2011-01-29 22:44:06 UTC (rev 55627)
@@ -39,11 +39,11 @@
 // to save a bit of memory used by opcode names in the Gob engine.
 #ifndef REDUCE_MEMORY_USAGE
 	#define _OPCODEDRAW(ver, x)  setProc(new Common::Functor0Mem<void, ver>(this, &ver::x), #x)
-	#define _OPCODEFUNC(ver, x)  setProc(new Common::Functor1Mem<OpFuncParams &, bool, ver>(this, &ver::x), #x)
+	#define _OPCODEFUNC(ver, x)  setProc(new Common::Functor1Mem<OpFuncParams &, void, ver>(this, &ver::x), #x)
 	#define _OPCODEGOB(ver, x)   setProc(new Common::Functor1Mem<OpGobParams &, void, ver>(this, &ver::x), #x)
 #else
 	#define _OPCODEDRAW(ver, x)  setProc(new Common::Functor0Mem<void, ver>(this, &ver::x), "")
-	#define _OPCODEFUNC(ver, x)  setProc(new Common::Functor1Mem<OpFuncParams &, bool, ver>(this, &ver::x), "")
+	#define _OPCODEFUNC(ver, x)  setProc(new Common::Functor1Mem<OpFuncParams &, void, ver>(this, &ver::x), "")
 	#define _OPCODEGOB(ver, x)   setProc(new Common::Functor1Mem<OpGobParams &, void, ver>(this, &ver::x), "")
 #endif
 
@@ -52,13 +52,14 @@
 #define CLEAROPCODEGOB(i)  _opcodesGob.erase(i)
 
 typedef Common::Functor0<void> OpcodeDraw;
-typedef Common::Functor1<struct OpFuncParams &, bool> OpcodeFunc;
+typedef Common::Functor1<struct OpFuncParams &, void> OpcodeFunc;
 typedef Common::Functor1<struct OpGobParams &, void> OpcodeGob;
 
 struct OpFuncParams {
 	byte cmdCount;
 	byte counter;
 	int16 retFlag;
+	bool doReturn;
 };
 struct OpGobParams {
 	int16 extraData;
@@ -138,7 +139,7 @@
 	GobEngine *_vm;
 
 	void executeOpcodeDraw(byte i);
-	bool executeOpcodeFunc(byte i, byte j, OpFuncParams &params);
+	void executeOpcodeFunc(byte i, byte j, OpFuncParams &params);
 	void executeOpcodeGob(int i, OpGobParams &params);
 
 	const char *getDescOpcodeDraw(byte i);
@@ -152,7 +153,7 @@
 	virtual void checkSwitchTable(uint32 &offset) = 0;
 
 	void o_drawNOP() {}
-	bool o_funcNOP(OpFuncParams &params) { return false; }
+	void o_funcNOP(OpFuncParams &params) {}
 	void o_gobNOP(OpGobParams &params) {}
 };
 
@@ -196,63 +197,63 @@
 	void o1_stopCD();
 	void o1_loadFontToSprite();
 	void o1_freeFontToSprite();
-	bool o1_callSub(OpFuncParams &params);
-	bool o1_printTotText(OpFuncParams &params);
-	bool o1_loadCursor(OpFuncParams &params);
-	bool o1_switch (OpFuncParams &params);
-	bool o1_repeatUntil(OpFuncParams &params);
-	bool o1_whileDo(OpFuncParams &params);
-	bool o1_if(OpFuncParams &params);
-	bool o1_assign(OpFuncParams &params);
-	bool o1_loadSpriteToPos(OpFuncParams &params);
-	bool o1_printText(OpFuncParams &params);
-	bool o1_loadTot(OpFuncParams &params);
-	bool o1_palLoad(OpFuncParams &params);
-	bool o1_keyFunc(OpFuncParams &params);
-	bool o1_capturePush(OpFuncParams &params);
-	bool o1_capturePop(OpFuncParams &params);
-	bool o1_animPalInit(OpFuncParams &params);
-	bool o1_drawOperations(OpFuncParams &params);
-	bool o1_setcmdCount(OpFuncParams &params);
-	bool o1_return(OpFuncParams &params);
-	bool o1_renewTimeInVars(OpFuncParams &params);
-	bool o1_speakerOn(OpFuncParams &params);
-	bool o1_speakerOff(OpFuncParams &params);
-	bool o1_putPixel(OpFuncParams &params);
-	bool o1_goblinFunc(OpFuncParams &params);
-	bool o1_createSprite(OpFuncParams &params);
-	bool o1_freeSprite(OpFuncParams &params);
-	bool o1_returnTo(OpFuncParams &params);
-	bool o1_loadSpriteContent(OpFuncParams &params);
-	bool o1_copySprite(OpFuncParams &params);
-	bool o1_fillRect(OpFuncParams &params);
-	bool o1_drawLine(OpFuncParams &params);
-	bool o1_strToLong(OpFuncParams &params);
-	bool o1_invalidate(OpFuncParams &params);
-	bool o1_setBackDelta(OpFuncParams &params);
-	bool o1_playSound(OpFuncParams &params);
-	bool o1_stopSound(OpFuncParams &params);
-	bool o1_loadSound(OpFuncParams &params);
-	bool o1_freeSoundSlot(OpFuncParams &params);
-	bool o1_waitEndPlay(OpFuncParams &params);
-	bool o1_playComposition(OpFuncParams &params);
-	bool o1_getFreeMem(OpFuncParams &params);
-	bool o1_checkData(OpFuncParams &params);
-	bool o1_cleanupStr(OpFuncParams &params);
-	bool o1_insertStr(OpFuncParams &params);
-	bool o1_cutStr(OpFuncParams &params);
-	bool o1_strstr(OpFuncParams &params);
-	bool o1_istrlen(OpFuncParams &params);
-	bool o1_setMousePos(OpFuncParams &params);
-	bool o1_setFrameRate(OpFuncParams &params);
-	bool o1_animatePalette(OpFuncParams &params);
-	bool o1_animateCursor(OpFuncParams &params);
-	bool o1_blitCursor(OpFuncParams &params);
-	bool o1_loadFont(OpFuncParams &params);
-	bool o1_freeFont(OpFuncParams &params);
-	bool o1_readData(OpFuncParams &params);
-	bool o1_writeData(OpFuncParams &params);
-	bool o1_manageDataFile(OpFuncParams &params);
+	void o1_callSub(OpFuncParams &params);
+	void o1_printTotText(OpFuncParams &params);
+	void o1_loadCursor(OpFuncParams &params);
+	void o1_switch (OpFuncParams &params);
+	void o1_repeatUntil(OpFuncParams &params);
+	void o1_whileDo(OpFuncParams &params);
+	void o1_if(OpFuncParams &params);
+	void o1_assign(OpFuncParams &params);
+	void o1_loadSpriteToPos(OpFuncParams &params);
+	void o1_printText(OpFuncParams &params);
+	void o1_loadTot(OpFuncParams &params);
+	void o1_palLoad(OpFuncParams &params);
+	void o1_keyFunc(OpFuncParams &params);
+	void o1_capturePush(OpFuncParams &params);
+	void o1_capturePop(OpFuncParams &params);
+	void o1_animPalInit(OpFuncParams &params);
+	void o1_drawOperations(OpFuncParams &params);
+	void o1_setcmdCount(OpFuncParams &params);
+	void o1_return(OpFuncParams &params);
+	void o1_renewTimeInVars(OpFuncParams &params);
+	void o1_speakerOn(OpFuncParams &params);
+	void o1_speakerOff(OpFuncParams &params);
+	void o1_putPixel(OpFuncParams &params);
+	void o1_goblinFunc(OpFuncParams &params);
+	void o1_createSprite(OpFuncParams &params);
+	void o1_freeSprite(OpFuncParams &params);
+	void o1_returnTo(OpFuncParams &params);
+	void o1_loadSpriteContent(OpFuncParams &params);
+	void o1_copySprite(OpFuncParams &params);
+	void o1_fillRect(OpFuncParams &params);
+	void o1_drawLine(OpFuncParams &params);
+	void o1_strToLong(OpFuncParams &params);
+	void o1_invalidate(OpFuncParams &params);
+	void o1_setBackDelta(OpFuncParams &params);
+	void o1_playSound(OpFuncParams &params);
+	void o1_stopSound(OpFuncParams &params);
+	void o1_loadSound(OpFuncParams &params);
+	void o1_freeSoundSlot(OpFuncParams &params);
+	void o1_waitEndPlay(OpFuncParams &params);
+	void o1_playComposition(OpFuncParams &params);
+	void o1_getFreeMem(OpFuncParams &params);
+	void o1_checkData(OpFuncParams &params);
+	void o1_cleanupStr(OpFuncParams &params);
+	void o1_insertStr(OpFuncParams &params);
+	void o1_cutStr(OpFuncParams &params);
+	void o1_strstr(OpFuncParams &params);
+	void o1_istrlen(OpFuncParams &params);
+	void o1_setMousePos(OpFuncParams &params);
+	void o1_setFrameRate(OpFuncParams &params);
+	void o1_animatePalette(OpFuncParams &params);
+	void o1_animateCursor(OpFuncParams &params);
+	void o1_blitCursor(OpFuncParams &params);
+	void o1_loadFont(OpFuncParams &params);
+	void o1_freeFont(OpFuncParams &params);
+	void o1_readData(OpFuncParams &params);
+	void o1_writeData(OpFuncParams &params);
+	void o1_manageDataFile(OpFuncParams &params);
 	void o1_setState(OpGobParams &params);
 	void o1_setCurFrame(OpGobParams &params);
 	void o1_setNextState(OpGobParams &params);
@@ -377,18 +378,18 @@
 	void o2_closeItk();
 	void o2_setImdFrontSurf();
 	void o2_resetImdFrontSurf();
-	bool o2_assign(OpFuncParams &params);
-	bool o2_printText(OpFuncParams &params);
-	bool o2_animPalInit(OpFuncParams &params);
-	bool o2_addHotspot(OpFuncParams &params);
-	bool o2_removeHotspot(OpFuncParams &params);
-	bool o2_goblinFunc(OpFuncParams &params);
-	bool o2_stopSound(OpFuncParams &params);
-	bool o2_loadSound(OpFuncParams &params);
-	bool o2_getFreeMem(OpFuncParams &params);
-	bool o2_checkData(OpFuncParams &params);
-	bool o2_readData(OpFuncParams &params);
-	bool o2_writeData(OpFuncParams &params);
+	void o2_assign(OpFuncParams &params);
+	void o2_printText(OpFuncParams &params);
+	void o2_animPalInit(OpFuncParams &params);
+	void o2_addHotspot(OpFuncParams &params);
+	void o2_removeHotspot(OpFuncParams &params);
+	void o2_goblinFunc(OpFuncParams &params);
+	void o2_stopSound(OpFuncParams &params);
+	void o2_loadSound(OpFuncParams &params);
+	void o2_getFreeMem(OpFuncParams &params);
+	void o2_checkData(OpFuncParams &params);
+	void o2_readData(OpFuncParams &params);
+	void o2_writeData(OpFuncParams &params);
 	void o2_loadInfogramesIns(OpGobParams &params);
 	void o2_playInfogrames(OpGobParams &params);
 	void o2_startInfogrames(OpGobParams &params);
@@ -432,10 +433,10 @@
 
 	void oFascin_playProtracker(OpGobParams &params);
 
-	bool oFascin_repeatUntil(OpFuncParams &params);
-	bool oFascin_assign(OpFuncParams &params);
-	bool oFascin_copySprite(OpFuncParams &params);
-	bool oFascin_keyFunc(OpFuncParams &params);
+	void oFascin_repeatUntil(OpFuncParams &params);
+	void oFascin_assign(OpFuncParams &params);
+	void oFascin_copySprite(OpFuncParams &params);
+	void oFascin_keyFunc(OpFuncParams &params);
 
 	void oFascin_playTirb(OpGobParams &params);
 	void oFascin_playTira(OpGobParams &params);
@@ -469,8 +470,8 @@
 	virtual void setupOpcodesFunc();
 	virtual void setupOpcodesGob();
 
-	bool o3_getTotTextItemPart(OpFuncParams &params);
-	bool o3_copySprite(OpFuncParams &params);
+	void o3_getTotTextItemPart(OpFuncParams &params);
+	void o3_copySprite(OpFuncParams &params);
 
 	void o3_wobble(OpGobParams &params);
 };
@@ -485,7 +486,7 @@
 	virtual void setupOpcodesFunc();
 	virtual void setupOpcodesGob();
 
-	bool oInca2_spaceShooter(OpFuncParams &params);
+	void oInca2_spaceShooter(OpFuncParams &params);
 };
 
 class Inter_v4 : public Inter_v3 {
@@ -517,7 +518,7 @@
 	void o5_deleteFile();
 	void o5_initScreen();
 
-	bool o5_istrlen(OpFuncParams &params);
+	void o5_istrlen(OpFuncParams &params);
 
 	void o5_spaceShooter(OpGobParams &params);
 	void o5_getSystemCDSpeed(OpGobParams &params);
@@ -552,10 +553,10 @@
 	void o6_totSub();
 	void o6_playVmdOrMusic();
 
-	bool o6_loadCursor(OpFuncParams &params);
-	bool o6_assign(OpFuncParams &params);
-	bool o6_removeHotspot(OpFuncParams &params);
-	bool o6_fillRect(OpFuncParams &params);
+	void o6_loadCursor(OpFuncParams &params);
+	void o6_assign(OpFuncParams &params);
+	void o6_removeHotspot(OpFuncParams &params);
+	void o6_fillRect(OpFuncParams &params);
 
 	void probe16bitMusic(char *fileName);
 };
@@ -570,12 +571,12 @@
 	virtual void setupOpcodesFunc();
 	virtual void setupOpcodesGob();
 
-	bool oPlaytoons_printText(OpFuncParams &params);
-	bool oPlaytoons_F_1B(OpFuncParams &params);
-	bool oPlaytoons_putPixel(OpFuncParams &params);
-	bool oPlaytoons_freeSprite(OpFuncParams &params);
-	bool oPlaytoons_checkData(OpFuncParams &params);
-	bool oPlaytoons_readData(OpFuncParams &params);
+	void oPlaytoons_printText(OpFuncParams &params);
+	void oPlaytoons_F_1B(OpFuncParams &params);
+	void oPlaytoons_putPixel(OpFuncParams &params);
+	void oPlaytoons_freeSprite(OpFuncParams &params);
+	void oPlaytoons_checkData(OpFuncParams &params);
+	void oPlaytoons_readData(OpFuncParams &params);
 
 	void oPlaytoons_getObjAnimSize();
 	void oPlaytoons_CD_20_23();

Modified: scummvm/trunk/engines/gob/inter_fascin.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter_fascin.cpp	2011-01-29 22:15:57 UTC (rev 55626)
+++ scummvm/trunk/engines/gob/inter_fascin.cpp	2011-01-29 22:44:06 UTC (rev 55627)
@@ -114,7 +114,7 @@
 	OPCODEGOB(1002, o2_stopProtracker);
 }
 
-bool Inter_Fascination::oFascin_repeatUntil(OpFuncParams &params) {
+void Inter_Fascination::oFascin_repeatUntil(OpFuncParams &params) {
 	int16 size;
 	bool flag;
 
@@ -149,10 +149,9 @@
 		_break = false;
 		*_breakFromLevel = -1;
 	}
-	return false;
 }
 
-bool Inter_Fascination::oFascin_assign(OpFuncParams &params) {
+void Inter_Fascination::oFascin_assign(OpFuncParams &params) {
 	byte destType = _vm->_game->_script->peekByte();
 	int16 dest = _vm->_game->_script->readVarIndex();
 
@@ -195,11 +194,9 @@
 			break;
 		}
 	}
-
-	return false;
 }
 
-bool Inter_Fascination::oFascin_copySprite(OpFuncParams &params) {
+void Inter_Fascination::oFascin_copySprite(OpFuncParams &params) {
 	_vm->_draw->_sourceSurface = _vm->_game->_script->readInt16();
 	_vm->_draw->_destSurface = _vm->_game->_script->readInt16();
 	_vm->_draw->_spriteLeft = _vm->_game->_script->readValExpr();
@@ -213,7 +210,6 @@
 	_vm->_draw->_transparency = _vm->_game->_script->readInt16();
 
 	_vm->_draw->spriteOperation(DRAW_BLITSURF);
-	return false;
 }
 
 void Inter_Fascination::oFascin_playTirb(OpGobParams &params) {

Modified: scummvm/trunk/engines/gob/inter_inca2.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter_inca2.cpp	2011-01-29 22:15:57 UTC (rev 55626)
+++ scummvm/trunk/engines/gob/inter_inca2.cpp	2011-01-29 22:44:06 UTC (rev 55627)
@@ -53,14 +53,13 @@
 void Inter_Inca2::setupOpcodesGob() {
 }
 
-bool Inter_Inca2::oInca2_spaceShooter(OpFuncParams &params) {
+void Inter_Inca2::oInca2_spaceShooter(OpFuncParams &params) {
 	// TODO: Not yet implemented. We'll pretend we won the match for now
 	_vm->_game->_script->skip(4);
 	uint16 resVar = _vm->_game->_script->readUint16();
 	_vm->_game->_script->skip(4);
 
 	WRITE_VAR(resVar, 1);
-	return false;
 }
 
 } // End of namespace Gob

Modified: scummvm/trunk/engines/gob/inter_playtoons.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter_playtoons.cpp	2011-01-29 22:15:57 UTC (rev 55626)
+++ scummvm/trunk/engines/gob/inter_playtoons.cpp	2011-01-29 22:44:06 UTC (rev 55627)
@@ -96,7 +96,7 @@
 void Inter_Playtoons::setupOpcodesGob() {
 }
 
-bool Inter_Playtoons::oPlaytoons_printText(OpFuncParams &params) {
+void Inter_Playtoons::oPlaytoons_printText(OpFuncParams &params) {
 	char buf[60];
 	int i;
 	int16 oldTransparency;
@@ -178,16 +178,13 @@
 	} while (_vm->_game->_script->peekByte() != 200);
 
 	_vm->_game->_script->skip(1);
-
-	return false;
 }
 
-bool Inter_Playtoons::oPlaytoons_F_1B(OpFuncParams &params) {
+void Inter_Playtoons::oPlaytoons_F_1B(OpFuncParams &params) {
 	_vm->_game->_hotspots->oPlaytoons_F_1B();
-	return false;
 }
 
-bool Inter_Playtoons::oPlaytoons_putPixel(OpFuncParams &params) {
+void Inter_Playtoons::oPlaytoons_putPixel(OpFuncParams &params) {
 	_vm->_draw->_destSurface = _vm->_game->_script->readInt16();
 
 	_vm->_draw->_destSpriteX = _vm->_game->_script->readValExpr();
@@ -201,21 +198,18 @@
 	_vm->_draw->_pattern = _vm->_game->_script->getResultInt()>>16;
 
 	_vm->_draw->spriteOperation(DRAW_PUTPIXEL);
-
-	return false;
 }
 
-bool Inter_Playtoons::oPlaytoons_freeSprite(OpFuncParams &params) {
+void Inter_Playtoons::oPlaytoons_freeSprite(OpFuncParams &params) {
 	int16 index;
 	if (_vm->_game->_script->peekByte(1) == 0)
 		index = _vm->_game->_script->readInt16();
 	else
 		index = _vm->_game->_script->readValExpr();
 	_vm->_draw->freeSprite(index);
-	return false;
 }
 
-bool Inter_Playtoons::oPlaytoons_checkData(OpFuncParams &params) {
+void Inter_Playtoons::oPlaytoons_checkData(OpFuncParams &params) {
 	int16 handle;
 	uint16 varOff;
 	int32 size;
@@ -275,11 +269,9 @@
 
 	WRITE_VAR_OFFSET(varOff, handle);
 	WRITE_VAR(16, (uint32) size);
-
-	return false;
 }
 
-bool Inter_Playtoons::oPlaytoons_readData(OpFuncParams &params) {
+void Inter_Playtoons::oPlaytoons_readData(OpFuncParams &params) {
 	int32 retSize;
 	int32 size;
 	int32 offset;
@@ -318,15 +310,15 @@
 		} else
 			WRITE_VAR(1, 0);
 
-		return false;
+		return;
 
 	} else if (mode == SaveLoad::kSaveModeIgnore)
-		return false;
+		return;
 
 	if (size < 0) {
 		warning("Attempted to read a raw sprite from file \"%s\"",
 				file);
-		return false ;
+		return;
 	} else if (size == 0) {
 		dataVar = 0;
 		size = _vm->_game->_script->getVariablesCount() * 4;
@@ -336,20 +328,20 @@
 
 	if (file[0] == 0) {
 		WRITE_VAR(1, size);
-		return false;
+		return;
 	}
 
 	WRITE_VAR(1, 1);
 	Common::SeekableReadStream *stream = _vm->_dataIO->getFile(file);
 	if (!stream)
-		return false;
+		return;
 
 	_vm->_draw->animateCursor(4);
 	if (offset > stream->size()) {
 		warning("oPlaytoons_readData: File \"%s\", Offset (%d) > file size (%d)",
 				file, offset, stream->size());
 		delete stream;
-		return false;
+		return;
 	}
 
 	if (offset < 0)
@@ -370,7 +362,6 @@
 		WRITE_VAR(1, 0);
 
 	delete stream;
-	return false;
 }
 
 void Inter_Playtoons::oPlaytoons_getObjAnimSize() {

Modified: scummvm/trunk/engines/gob/inter_v1.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter_v1.cpp	2011-01-29 22:15:57 UTC (rev 55626)
+++ scummvm/trunk/engines/gob/inter_v1.cpp	2011-01-29 22:44:06 UTC (rev 55627)
@@ -653,7 +653,7 @@
 	_vm->_draw->_fontToSprite[i].height = -1;
 }
 
-bool Inter_v1::o1_callSub(OpFuncParams &params) {
+void Inter_v1::o1_callSub(OpFuncParams &params) {
 	uint16 offset = _vm->_game->_script->readUint16();
 
 	debugC(5, kDebugGameFlow, "tot = \"%s\", offset = %d",
@@ -662,51 +662,49 @@
 	if (offset < 128) {
 		warning("Inter_v1::o1_callSub(): Offset %d points into the header. "
 				"Skipping call", offset);
-		return false;
+		return;
 	}
 
 	// Skipping the copy protection screen in Gobliiins
 	if (!_vm->_copyProtection && (_vm->getGameType() == kGameTypeGob1) && (offset == 3905)
 			&& !scumm_stricmp(_vm->_game->_curTotFile, _vm->_startTot.c_str())) {
 		debugC(2, kDebugGameFlow, "Skipping copy protection screen");
-		return false;
+		return;
 	}
 	// Skipping the copy protection screen in Gobliins 2
 	if (!_vm->_copyProtection && (_vm->getGameType() == kGameTypeGob2) && (offset == 1746)
 			&& !scumm_stricmp(_vm->_game->_curTotFile, "intro0.tot")) {
 		debugC(2, kDebugGameFlow, "Skipping copy protection screen");
-		return false;
+		return;
 	}
 
 	_vm->_game->_script->call(offset);
 
 	if ((params.counter == params.cmdCount) && (params.retFlag == 2)) {
 		_vm->_game->_script->pop(false);
-		return true;
+		params.doReturn = true;
+		return;
 	}
 
 	callSub(2);
 
 	_vm->_game->_script->pop();
-
-	return false;
 }
 
-bool Inter_v1::o1_printTotText(OpFuncParams &params) {
+void Inter_v1::o1_printTotText(OpFuncParams &params) {
 	_vm->_draw->printTotText(_vm->_game->_script->readInt16());
-	return false;
 }
 
-bool Inter_v1::o1_loadCursor(OpFuncParams &params) {
+void Inter_v1::o1_loadCursor(OpFuncParams &params) {
 	int16 id    = _vm->_game->_script->readInt16();
 	int8  index = _vm->_game->_script->readInt8();
 
 	if ((index * _vm->_draw->_cursorWidth) >= _vm->_draw->_cursorSprites->getWidth())
-		return false;
+		return;
 
 	Resource *resource = _vm->_game->_resources->getResource(id);
 	if (!resource)
-		return false;
+		return;
 
 	_vm->_draw->_cursorSprites->fillRect(index * _vm->_draw->_cursorWidth, 0,
 			index * _vm->_draw->_cursorWidth + _vm->_draw->_cursorWidth - 1,
@@ -718,10 +716,9 @@
 	_vm->_draw->_cursorAnimLow[index] = 0;
 
 	delete resource;
-	return false;
 }
 
-bool Inter_v1::o1_switch(OpFuncParams &params) {
+void Inter_v1::o1_switch(OpFuncParams &params) {
 	uint32 offset;
 
 	checkSwitchTable(offset);
@@ -733,17 +730,16 @@
 
 	if ((params.counter == params.cmdCount) && (params.retFlag == 2)) {
 		_vm->_game->_script->pop(false);
-		return true;
+		params.doReturn = true;
+		return;
 	}
 
 	funcBlock(0);
 
 	_vm->_game->_script->pop();
-
-	return false;
 }
 
-bool Inter_v1::o1_repeatUntil(OpFuncParams &params) {
+void Inter_v1::o1_repeatUntil(OpFuncParams &params) {
 	int16 size;
 	bool flag;
 
@@ -768,10 +764,9 @@
 		_break = false;
 		*_breakFromLevel = -1;
 	}
-	return false;
 }
 
-bool Inter_v1::o1_whileDo(OpFuncParams &params) {
+void Inter_v1::o1_whileDo(OpFuncParams &params) {
 	bool flag;
 	int16 size;
 
@@ -782,7 +777,7 @@
 		flag = _vm->_game->_script->evalBoolResult();
 
 		if (_terminate)
-			return false;
+			return;
 
 		uint32 blockPos = _vm->_game->_script->pos();
 
@@ -806,10 +801,9 @@
 		_break = false;
 		*_breakFromLevel = -1;
 	}
-	return false;
 }
 
-bool Inter_v1::o1_if(OpFuncParams &params) {
+void Inter_v1::o1_if(OpFuncParams &params) {
 	byte cmd;
 	bool boolRes;
 
@@ -823,8 +817,10 @@
 
 	boolRes = _vm->_game->_script->evalBoolResult();
 	if (boolRes) {
-		if ((params.counter == params.cmdCount) && (params.retFlag == 2))
-			return true;
+		if ((params.counter == params.cmdCount) && (params.retFlag == 2)) {
+			params.doReturn = true;
+			return;
+		}
 
 		_vm->_game->_script->push();
 		funcBlock(0);
@@ -836,7 +832,7 @@
 
 		cmd = _vm->_game->_script->readByte() >> 4;
 		if (cmd != 12)
-			return false;
+			return;
 
 		_vm->_game->_script->skip(_vm->_game->_script->peekUint16(2) + 2);
 	} else {
@@ -846,10 +842,12 @@
 
 		cmd = _vm->_game->_script->readByte() >> 4;
 		if (cmd != 12)
-			return false;
+			return;
 
-		if ((params.counter == params.cmdCount) && (params.retFlag == 2))
-			return true;
+		if ((params.counter == params.cmdCount) && (params.retFlag == 2)) {
+			params.doReturn = true;
+			return;
+		}
 
 		_vm->_game->_script->push();
 		funcBlock(0);
@@ -857,10 +855,9 @@
 
 		_vm->_game->_script->skip(_vm->_game->_script->peekUint16(2) + 2);
 	}
-	return false;
 }
 
-bool Inter_v1::o1_assign(OpFuncParams &params) {
+void Inter_v1::o1_assign(OpFuncParams &params) {
 	byte destType = _vm->_game->_script->peekByte();
 	int16 dest = _vm->_game->_script->readVarIndex();
 
@@ -882,10 +879,9 @@
 		break;
 
 	}
-	return false;
 }
 
-bool Inter_v1::o1_loadSpriteToPos(OpFuncParams &params) {
+void Inter_v1::o1_loadSpriteToPos(OpFuncParams &params) {
 	_vm->_draw->_spriteLeft = _vm->_game->_script->readInt16();
 
 	_vm->_draw->_destSpriteX = _vm->_game->_script->readValExpr();
@@ -908,11 +904,9 @@
 	_vm->_game->_script->skip(2);
 
 	_vm->_draw->spriteOperation(DRAW_LOADSPRITE);
-
-	return false;
 }
 
-bool Inter_v1::o1_printText(OpFuncParams &params) {
+void Inter_v1::o1_printText(OpFuncParams &params) {
 	char buf[60];
 	int i;
 
@@ -961,11 +955,9 @@
 	} while (_vm->_game->_script->peekByte() != 200);
 
 	_vm->_game->_script->skip(1);
-
-	return false;
 }
 
-bool Inter_v1::o1_loadTot(OpFuncParams &params) {
+void Inter_v1::o1_loadTot(OpFuncParams &params) {
 	char buf[20];
 	int8 size;
 
@@ -987,11 +979,9 @@
 	if (_terminate != 2)
 		_terminate = 1;
 	strcpy(_vm->_game->_totToLoad, buf);
-
-	return false;
 }
 
-bool Inter_v1::o1_palLoad(OpFuncParams &params) {
+void Inter_v1::o1_palLoad(OpFuncParams &params) {
 	int index1, index2;
 	int16 id;
 	byte cmd;
@@ -1003,7 +993,7 @@
 		if ((_vm->_global->_fakeVideoMode < 0x32) ||
 				(_vm->_global->_fakeVideoMode > 0x63)) {
 			_vm->_game->_script->skip(48);
-			return false;
+			return;
 		}
 		break;
 
@@ -1011,55 +1001,55 @@
 		if ((_vm->_global->_fakeVideoMode != 5) &&
 				(_vm->_global->_fakeVideoMode != 7)) {
 			_vm->_game->_script->skip(18);
-			return false;
+			return;
 		}
 		break;
 
 	case 50:
 		if (_vm->_global->_colorCount == 256) {
 			_vm->_game->_script->skip(16);
-			return false;
+			return;
 		}
 		break;
 
 	case 51:
 		if (_vm->_global->_fakeVideoMode < 0x64) {
 			_vm->_game->_script->skip(2);
-			return false;
+			return;
 		}
 		break;
 
 	case 52:
 		if (_vm->_global->_colorCount == 256) {
 			_vm->_game->_script->skip(48);
-			return false;
+			return;
 		}
 		break;
 
 	case 53:
 		if (_vm->_global->_colorCount != 256) {
 			_vm->_game->_script->skip(2);
-			return false;
+			return;
 		}
 		break;
 
 	case 54:
 		if (_vm->_global->_fakeVideoMode < 0x13) {
-			return false;
+			return;
 		}
 		break;
 
 	case 61:
 		if (_vm->_global->_fakeVideoMode < 0x13) {
 			_vm->_game->_script->skip(4);
-			return false;
+			return;
 		}
 		break;
 	}
 
 	if ((cmd & 0x7F) == 0x30) {
 		_vm->_game->_script->skip(48);
-		return false;
+		return;
 	}
 
 	_vm->_draw->_applyPal = !(cmd & 0x80);
@@ -1078,7 +1068,7 @@
 			_vm->_draw->_frontSurface->clear();
 			_vm->_draw->_noInvalidated57 = true;
 			_vm->_game->_script->skip(48);
-			return false;
+			return;
 		}
 		_vm->_draw->_noInvalidated57 = false;
 
@@ -1105,7 +1095,7 @@
 
 		_vm->_global->_pPaletteDesc->unused1 = _vm->_draw->_unusedPalette1;
 		_vm->_video->setFullPalette(_vm->_global->_pPaletteDesc);
-		return false;
+		return;
 	}
 
 	switch (cmd) {
@@ -1157,7 +1147,7 @@
 		if (_vm->_draw->_applyPal) {
 			_vm->_draw->_applyPal = false;
 			_vm->_video->setFullPalette(_vm->_global->_pPaletteDesc);
-			return false;
+			return;
 		}
 		break;
 	}
@@ -1169,22 +1159,20 @@
 		if (_vm->_global->_videoMode < 0x13) {
 			_vm->_global->_pPaletteDesc->vgaPal = _vm->_draw->_vgaPalette;
 			_vm->_palAnim->fade(_vm->_global->_pPaletteDesc, 0, 0);
-			return false;
+			return;
 		}
 		if ((_vm->_global->_videoMode < 0x32) ||
 				(_vm->_global->_videoMode >= 0x64)) {
 			_vm->_global->_pPaletteDesc->vgaPal = _vm->_draw->_vgaPalette;
 			_vm->_palAnim->fade(_vm->_global->_pPaletteDesc, 0, 0);
-			return false;
+			return;
 		}
 		_vm->_global->_pPaletteDesc->vgaPal = _vm->_draw->_vgaSmallPalette;
 		_vm->_palAnim->fade(_vm->_global->_pPaletteDesc, 0, 0);
 	}
-
-	return false;
 }
 
-bool Inter_v1::o1_keyFunc(OpFuncParams &params) {
+void Inter_v1::o1_keyFunc(OpFuncParams &params) {
 	static uint32 lastCalled = 0;
 	int16 cmd;
 	int16 key;
@@ -1252,11 +1240,9 @@
 			_vm->_util->longDelay(cmd);
 		break;
 	}
-
-	return false;
 }
 
-bool Inter_v1::o1_capturePush(OpFuncParams &params) {
+void Inter_v1::o1_capturePush(OpFuncParams &params) {
 	int16 left, top;
 	int16 width, height;
 
@@ -1266,78 +1252,68 @@
 	height = _vm->_game->_script->readValExpr();
 
 	if ((width < 0) || (height < 0))
-		return false;
+		return;
 
 	_vm->_game->capturePush(left, top, width, height);
 	(*_vm->_scenery->_pCaptureCounter)++;
-	return false;
 }
 
-bool Inter_v1::o1_capturePop(OpFuncParams &params) {
+void Inter_v1::o1_capturePop(OpFuncParams &params) {
 	if (*_vm->_scenery->_pCaptureCounter != 0) {
 		(*_vm->_scenery->_pCaptureCounter)--;
 		_vm->_game->capturePop(1);
 	}
-	return false;
 }
 
-bool Inter_v1::o1_animPalInit(OpFuncParams &params) {
+void Inter_v1::o1_animPalInit(OpFuncParams &params) {
 	_animPalDir[0] = _vm->_game->_script->readInt16();
 	_animPalLowIndex[0] = _vm->_game->_script->readValExpr();
 	_animPalHighIndex[0] = _vm->_game->_script->readValExpr();
-	return false;
 }
 
-bool Inter_v1::o1_drawOperations(OpFuncParams &params) {
+void Inter_v1::o1_drawOperations(OpFuncParams &params) {
 	byte cmd;
 
 	cmd = _vm->_game->_script->readByte();
 
 	executeOpcodeDraw(cmd);
-
-	return false;
 }
 
-bool Inter_v1::o1_setcmdCount(OpFuncParams &params) {
+void Inter_v1::o1_setcmdCount(OpFuncParams &params) {
 	params.cmdCount = _vm->_game->_script->readByte();
 	params.counter = 0;
-	return false;
 }
 
-bool Inter_v1::o1_return(OpFuncParams &params) {
+void Inter_v1::o1_return(OpFuncParams &params) {
 	if (params.retFlag != 2)
 		_break = true;
 
 	_vm->_game->_script->setFinished(true);
-	return true;
+	params.doReturn = true;
 }
 
-bool Inter_v1::o1_renewTimeInVars(OpFuncParams &params) {
+void Inter_v1::o1_renewTimeInVars(OpFuncParams &params) {
 	renewTimeInVars();
-	return false;
 }
 
-bool Inter_v1::o1_speakerOn(OpFuncParams &params) {
+void Inter_v1::o1_speakerOn(OpFuncParams &params) {
 	_vm->_sound->speakerOn(_vm->_game->_script->readValExpr(), -1);
-	return false;
 }
 
-bool Inter_v1::o1_speakerOff(OpFuncParams &params) {
+void Inter_v1::o1_speakerOff(OpFuncParams &params) {
 	_vm->_sound->speakerOff();
-	return false;
 }
 
-bool Inter_v1::o1_putPixel(OpFuncParams &params) {
+void Inter_v1::o1_putPixel(OpFuncParams &params) {
 	_vm->_draw->_destSurface = _vm->_game->_script->readInt16();
 
 	_vm->_draw->_destSpriteX = _vm->_game->_script->readValExpr();
 	_vm->_draw->_destSpriteY = _vm->_game->_script->readValExpr();
 	_vm->_draw->_frontColor = _vm->_game->_script->readValExpr();
 	_vm->_draw->spriteOperation(DRAW_PUTPIXEL);
-	return false;
 }
 
-bool Inter_v1::o1_goblinFunc(OpFuncParams &params) {
+void Inter_v1::o1_goblinFunc(OpFuncParams &params) {
 	OpGobParams gobParams;
 	bool objDescSet = false;
 	int16 cmd;
@@ -1385,14 +1361,12 @@
 */
 
 	if ((cmd < 40) && objDescSet && !gobParams.objDesc)
-		return false;
+		return;
 
 	executeOpcodeGob(cmd, gobParams);
-
-	return false;
 }
 
-bool Inter_v1::o1_createSprite(OpFuncParams &params) {
+void Inter_v1::o1_createSprite(OpFuncParams &params) {
 	int16 index;
 	int16 width, height;
 	int16 flag;
@@ -1409,32 +1383,31 @@
 
 	flag = _vm->_game->_script->readInt16();
 	_vm->_draw->initSpriteSurf(index, width, height, flag ? 2 : 0);
-
-	return false;
 }
 
-bool Inter_v1::o1_freeSprite(OpFuncParams &params) {
+void Inter_v1::o1_freeSprite(OpFuncParams &params) {
 	_vm->_draw->freeSprite(_vm->_game->_script->readInt16());
-	return false;
 }
 
-bool Inter_v1::o1_returnTo(OpFuncParams &params) {
+void Inter_v1::o1_returnTo(OpFuncParams &params) {
 	if (params.retFlag == 1) {
 		_break = true;
 		_vm->_game->_script->setFinished(true);
-		return true;
+		params.doReturn = true;
+		return;
 	}
 
 	if (*_nestLevel == 0)
-		return false;
+		return;
 
 	*_breakFromLevel = *_nestLevel;
 	_break = true;
 	_vm->_game->_script->setFinished(true);
-	return true;
+
+	params.doReturn = true;
 }
 
-bool Inter_v1::o1_loadSpriteContent(OpFuncParams &params) {
+void Inter_v1::o1_loadSpriteContent(OpFuncParams &params) {
 	_vm->_draw->_spriteLeft = _vm->_game->_script->readInt16();
 	_vm->_draw->_destSurface = _vm->_game->_script->readInt16();
 	_vm->_draw->_transparency = _vm->_game->_script->readInt16();
@@ -1442,10 +1415,9 @@
 	_vm->_draw->_destSpriteY = 0;
 
 	_vm->_draw->spriteOperation(DRAW_LOADSPRITE);
-	return false;
 }
 
-bool Inter_v1::o1_copySprite(OpFuncParams &params) {
+void Inter_v1::o1_copySprite(OpFuncParams &params) {
 	if (_vm->_game->_script->peekByte(1) == 0)
 		_vm->_draw->_sourceSurface = _vm->_game->_script->readInt16();
 	else
@@ -1467,10 +1439,9 @@
 	_vm->_draw->_transparency = _vm->_game->_script->readInt16();
 
 	_vm->_draw->spriteOperation(DRAW_BLITSURF);
-	return false;
 }
 
-bool Inter_v1::o1_fillRect(OpFuncParams &params) {
+void Inter_v1::o1_fillRect(OpFuncParams &params) {
 	int16 destSurf;
 
 	_vm->_draw->_destSurface = destSurf = _vm->_game->_script->readInt16();
@@ -1483,7 +1454,7 @@
 	_vm->_draw->_backColor = _vm->_game->_script->readValExpr();
 
 	if (!_vm->_draw->_spritesArray[(destSurf >= 100) ? (destSurf - 80) : destSurf])
-		return false;
+		return;
 
 	if (_vm->_draw->_spriteRight < 0) {
 		_vm->_draw->_destSpriteX += _vm->_draw->_spriteRight - 1;
@@ -1495,10 +1466,9 @@
 	}
 
 	_vm->_draw->spriteOperation(DRAW_FILLRECT);
-	return false;
 }
 
-bool Inter_v1::o1_drawLine(OpFuncParams &params) {
+void Inter_v1::o1_drawLine(OpFuncParams &params) {
 	_vm->_draw->_destSurface = _vm->_game->_script->readInt16();
 
 	_vm->_draw->_destSpriteX = _vm->_game->_script->readValExpr();
@@ -1508,10 +1478,9 @@
 
 	_vm->_draw->_frontColor = _vm->_game->_script->readValExpr();
 	_vm->_draw->spriteOperation(DRAW_DRAWLINE);
-	return false;
 }
 
-bool Inter_v1::o1_strToLong(OpFuncParams &params) {
+void Inter_v1::o1_strToLong(OpFuncParams &params) {
 	char str[20];
 	int16 strVar;
 	int16 destVar;
@@ -1523,26 +1492,23 @@
 
 	destVar = _vm->_game->_script->readVarIndex();
 	WRITE_VAR_OFFSET(destVar, res);
-	return false;
 }
 
-bool Inter_v1::o1_invalidate(OpFuncParams &params) {
+void Inter_v1::o1_invalidate(OpFuncParams &params) {
 	_vm->_draw->_destSurface = _vm->_game->_script->readInt16();
 	_vm->_draw->_destSpriteX = _vm->_game->_script->readValExpr();
 	_vm->_draw->_destSpriteY = _vm->_game->_script->readValExpr();
 	_vm->_draw->_spriteRight = _vm->_game->_script->readValExpr();
 	_vm->_draw->_frontColor = _vm->_game->_script->readValExpr();
 	_vm->_draw->spriteOperation(DRAW_INVALIDATE);
-	return false;
 }
 
-bool Inter_v1::o1_setBackDelta(OpFuncParams &params) {
+void Inter_v1::o1_setBackDelta(OpFuncParams &params) {
 	_vm->_draw->_backDeltaX = _vm->_game->_script->readValExpr();
 	_vm->_draw->_backDeltaY = _vm->_game->_script->readValExpr();
-	return false;
 }
 
-bool Inter_v1::o1_playSound(OpFuncParams &params) {
+void Inter_v1::o1_playSound(OpFuncParams &params) {
 	int16 frequency;
 	int16 freq2;
 	int16 repCount;
@@ -1557,11 +1523,11 @@
 
 	_soundEndTimeKey = 0;
 	if (!sample || sample->empty())
-		return false;
+		return;
 
 	if (repCount < 0) {
 		if (_vm->_global->_soundFlags < 2)
-			return false;
+			return;
 
 		repCount = -repCount;
 		_soundEndTimeKey = _vm->_util->getTimeKey();
@@ -1581,34 +1547,28 @@
 		_vm->_sound->blasterStop(0);
 		_vm->_sound->blasterPlay(sample, repCount - 1, frequency);
 	}
-
-	return false;
 }
 
-bool Inter_v1::o1_stopSound(OpFuncParams &params) {
+void Inter_v1::o1_stopSound(OpFuncParams &params) {
 	_vm->_sound->adlibStop();
 	_vm->_sound->blasterStop(_vm->_game->_script->readValExpr());
 
 	_soundEndTimeKey = 0;
-	return false;
 }
 
-bool Inter_v1::o1_loadSound(OpFuncParams &params) {
+void Inter_v1::o1_loadSound(OpFuncParams &params) {
 	loadSound(-1);
-	return false;
 }
 
-bool Inter_v1::o1_freeSoundSlot(OpFuncParams &params) {
+void Inter_v1::o1_freeSoundSlot(OpFuncParams &params) {
 	_vm->_game->freeSoundSlot(-1);
-	return false;
 }
 
-bool Inter_v1::o1_waitEndPlay(OpFuncParams &params) {
+void Inter_v1::o1_waitEndPlay(OpFuncParams &params) {
 	_vm->_sound->blasterWaitEndPlay();
-	return false;
 }
 
-bool Inter_v1::o1_playComposition(OpFuncParams &params) {
+void Inter_v1::o1_playComposition(OpFuncParams &params) {
 	int16 composition[50];
 	int16 dataVar;
 	int16 freqVal;
@@ -1619,10 +1579,9 @@
 		composition[i] = (int16) VAR_OFFSET(dataVar + i * 4);
 
 	_vm->_sound->blasterPlayComposition(composition, freqVal);
-	return false;
 }
 
-bool Inter_v1::o1_getFreeMem(OpFuncParams &params) {
+void Inter_v1::o1_getFreeMem(OpFuncParams &params) {
 	int16 freeVar;
 	int16 maxFreeVar;
 
@@ -1632,10 +1591,9 @@
 	// HACK
 	WRITE_VAR_OFFSET(freeVar, 1000000);
 	WRITE_VAR_OFFSET(maxFreeVar, 1000000);
-	return false;
 }
 
-bool Inter_v1::o1_checkData(OpFuncParams &params) {
+void Inter_v1::o1_checkData(OpFuncParams &params) {
 	int16 varOff;
 
 	_vm->_game->_script->evalExpr(0);
@@ -1646,19 +1604,16 @@
 		WRITE_VAR_OFFSET(varOff, (uint32) -1);
 	} else
 		WRITE_VAR_OFFSET(varOff, 50); // "handle" between 50 and 128 = in archive
-
-	return false;
 }
 
-bool Inter_v1::o1_cleanupStr(OpFuncParams &params) {
+void Inter_v1::o1_cleanupStr(OpFuncParams &params) {
 	int16 strVar;
 
 	strVar = _vm->_game->_script->readVarIndex();
 	_vm->_util->cleanupStr(GET_VARO_FSTR(strVar));
-	return false;
 }
 
-bool Inter_v1::o1_insertStr(OpFuncParams &params) {
+void Inter_v1::o1_insertStr(OpFuncParams &params) {
 	int16 pos;
 	int16 strVar;
 
@@ -1668,10 +1623,9 @@
 
 	char *str = GET_VARO_FSTR(strVar);
 	_vm->_util->insertStr(_vm->_game->_script->getResultStr(), str, pos);
-	return false;
 }
 
-bool Inter_v1::o1_cutStr(OpFuncParams &params) {
+void Inter_v1::o1_cutStr(OpFuncParams &params) {
 	int16 strVar;
 	int16 pos;
 	int16 size;
@@ -1680,10 +1634,9 @@
 	pos = _vm->_game->_script->readValExpr();
 	size = _vm->_game->_script->readValExpr();
 	_vm->_util->cutFromStr(GET_VARO_STR(strVar), pos, size);
-	return false;
 }
 
-bool Inter_v1::o1_strstr(OpFuncParams &params) {
+void Inter_v1::o1_strstr(OpFuncParams &params) {
 	int16 strVar;
 	int16 resVar;
 	int16 pos;
@@ -1695,10 +1648,9 @@
 	char *res = strstr(GET_VARO_STR(strVar), _vm->_game->_script->getResultStr());
 	pos = res ? (res - (GET_VARO_STR(strVar))) : -1;
 	WRITE_VAR_OFFSET(resVar, pos);
-	return false;
 }
 
-bool Inter_v1::o1_istrlen(OpFuncParams &params) {
+void Inter_v1::o1_istrlen(OpFuncParams &params) {
 	int16 len;
 	int16 strVar;
 
@@ -1707,10 +1659,9 @@
 	strVar = _vm->_game->_script->readVarIndex();
 
 	WRITE_VAR_OFFSET(strVar, len);
-	return false;
 }
 
-bool Inter_v1::o1_setMousePos(OpFuncParams &params) {
+void Inter_v1::o1_setMousePos(OpFuncParams &params) {
 	_vm->_global->_inter_mouseX = _vm->_game->_script->readValExpr();
 	_vm->_global->_inter_mouseY = _vm->_game->_script->readValExpr();
 	_vm->_global->_inter_mouseX -= _vm->_video->_scrollOffsetX;
@@ -1718,60 +1669,52 @@
 	if (_vm->_global->_useMouse != 0)
 		_vm->_util->setMousePos(_vm->_global->_inter_mouseX,
 				_vm->_global->_inter_mouseY);
-	return false;
 }
 
-bool Inter_v1::o1_setFrameRate(OpFuncParams &params) {
+void Inter_v1::o1_setFrameRate(OpFuncParams &params) {
 	_vm->_util->setFrameRate(_vm->_game->_script->readValExpr());
-	return false;
 }
 
-bool Inter_v1::o1_animatePalette(OpFuncParams &params) {
+void Inter_v1::o1_animatePalette(OpFuncParams &params) {
 	_vm->_draw->blitInvalidated();
 	_vm->_util->waitEndFrame();
 	animPalette();
 	storeKey(_vm->_game->checkKeys(&_vm->_global->_inter_mouseX,
 		&_vm->_global->_inter_mouseY, &_vm->_game->_mouseButtons, 0));
-	return false;
 }
 
-bool Inter_v1::o1_animateCursor(OpFuncParams &params) {
+void Inter_v1::o1_animateCursor(OpFuncParams &params) {
 	_vm->_draw->animateCursor(1);
-	return false;
 }
 
-bool Inter_v1::o1_blitCursor(OpFuncParams &params) {
+void Inter_v1::o1_blitCursor(OpFuncParams &params) {
 	_vm->_draw->blitCursor();
-	return false;
 }
 
-bool Inter_v1::o1_loadFont(OpFuncParams &params) {
+void Inter_v1::o1_loadFont(OpFuncParams &params) {
 	_vm->_game->_script->evalExpr(0);
 	uint16 index = _vm->_game->_script->readInt16();
 
 	_vm->_draw->animateCursor(4);
 
 	_vm->_draw->loadFont(index, _vm->_game->_script->getResultStr());
-
-	return false;
 }
 
-bool Inter_v1::o1_freeFont(OpFuncParams &params) {
+void Inter_v1::o1_freeFont(OpFuncParams &params) {
 	int16 index;
 
 	index = _vm->_game->_script->readInt16();
 
 	if (index >= Draw::kFontCount) {
 		warning("o1_freeFont(): Index %d > count %d", index, Draw::kFontCount);
-		return false;
+		return;
 	}
 
 	delete _vm->_draw->_fonts[index];
 	_vm->_draw->_fonts[index] = 0;
-	return false;
 }
 
-bool Inter_v1::o1_readData(OpFuncParams &params) {
+void Inter_v1::o1_readData(OpFuncParams &params) {
 	int16 retSize;
 	int16 size;
 	int16 dataVar;
@@ -1787,7 +1730,7 @@
 
 	Common::SeekableReadStream *stream = _vm->_dataIO->getFile(_vm->_game->_script->getResultStr());
 	if (!stream)
-		return false;
+		return;
 
 	_vm->_draw->animateCursor(4);
 	if (offset < 0)
@@ -1804,11 +1747,9 @@
 		WRITE_VAR(1, 0);
 
 	delete stream;
-
-	return false;
 }
 
-bool Inter_v1::o1_writeData(OpFuncParams &params) {
+void Inter_v1::o1_writeData(OpFuncParams &params) {
 	int16 offset;
 	int16 size;
 	int16 dataVar;
@@ -1824,18 +1765,15 @@
 
 	warning("Attempted to write to file \"%s\"", _vm->_game->_script->getResultStr());
 	WRITE_VAR(1, 0);
-
-	return false;
 }
 
-bool Inter_v1::o1_manageDataFile(OpFuncParams &params) {
+void Inter_v1::o1_manageDataFile(OpFuncParams &params) {
 	_vm->_game->_script->evalExpr(0);
 
 	if (_vm->_game->_script->getResultStr()[0] != 0)
 		_vm->_dataIO->openArchive(_vm->_game->_script->getResultStr(), true);
 	else
 		_vm->_dataIO->closeArchive(true);
-	return false;
 }
 
 void Inter_v1::o1_setState(OpGobParams &params) {

Modified: scummvm/trunk/engines/gob/inter_v2.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter_v2.cpp	2011-01-29 22:15:57 UTC (rev 55626)
+++ scummvm/trunk/engines/gob/inter_v2.cpp	2011-01-29 22:44:06 UTC (rev 55627)
@@ -1037,7 +1037,7 @@
 void Inter_v2::o2_resetImdFrontSurf() {
 }
 
-bool Inter_v2::o2_assign(OpFuncParams &params) {
+void Inter_v2::o2_assign(OpFuncParams &params) {
 	byte destType = _vm->_game->_script->peekByte();
 	int16 dest = _vm->_game->_script->readVarIndex();
 
@@ -1081,11 +1081,9 @@
 			break;
 		}
 	}
-
-	return false;
 }
 
-bool Inter_v2::o2_printText(OpFuncParams &params) {
+void Inter_v2::o2_printText(OpFuncParams &params) {
 	char buf[60];
 	int i;
 
@@ -1153,11 +1151,9 @@
 	} while (_vm->_game->_script->peekByte() != 200);
 
 	_vm->_game->_script->skip(1);
-
-	return false;
 }
 
-bool Inter_v2::o2_animPalInit(OpFuncParams &params) {
+void Inter_v2::o2_animPalInit(OpFuncParams &params) {
 	int16 index;
 
 	index = _vm->_game->_script->readInt16();
@@ -1176,10 +1172,9 @@
 		_animPalHighIndex[index] = _vm->_game->_script->readValExpr();
 		_animPalDir[index] = -1;
 	}
-	return false;
 }
 
-bool Inter_v2::o2_addHotspot(OpFuncParams &params) {
+void Inter_v2::o2_addHotspot(OpFuncParams &params) {
 	int16 id       = _vm->_game->_script->readValExpr();
 	uint16 funcPos = _vm->_game->_script->pos();
 	int16 left     = _vm->_game->_script->readValExpr();
@@ -1209,11 +1204,9 @@
 	else
 		index = _vm->_game->_hotspots->add(0xE000 + id, left, top,
 				left + width - 1, top + height - 1, flags, key, 0, 0, funcPos);
-
-	return false;
 }
 
-bool Inter_v2::o2_removeHotspot(OpFuncParams &params) {
+void Inter_v2::o2_removeHotspot(OpFuncParams &params) {
 	int16 id = _vm->_game->_script->readValExpr();
 	uint8 stateType1 = Hotspots::kStateFilledDisabled | Hotspots::kStateType1;
 	uint8 stateType2 = Hotspots::kStateFilledDisabled | Hotspots::kStateType2;
@@ -1224,11 +1217,9 @@
 		_vm->_game->_hotspots->removeState(stateType2);
 	else
 		_vm->_game->_hotspots->remove((stateType2 << 12) + id);
-
-	return false;
 }
 
-bool Inter_v2::o2_goblinFunc(OpFuncParams &params) {
+void Inter_v2::o2_goblinFunc(OpFuncParams &params) {
 	OpGobParams gobParams;
 	int16 cmd;
 
@@ -1239,10 +1230,9 @@
 
 	if (cmd != 101)
 		executeOpcodeGob(cmd, gobParams);
-	return false;
 }
 
-bool Inter_v2::o2_stopSound(OpFuncParams &params) {
+void Inter_v2::o2_stopSound(OpFuncParams &params) {
 	int16 expr;
 
 	expr = _vm->_game->_script->readValExpr();
@@ -1253,15 +1243,13 @@
 		_vm->_sound->blasterStop(expr);
 
 	_soundEndTimeKey = 0;
-	return false;
 }
 
-bool Inter_v2::o2_loadSound(OpFuncParams &params) {
+void Inter_v2::o2_loadSound(OpFuncParams &params) {
 	loadSound(0);
-	return false;
 }
 
-bool Inter_v2::o2_getFreeMem(OpFuncParams &params) {
+void Inter_v2::o2_getFreeMem(OpFuncParams &params) {
 	uint16 freeVar;
 	uint16 maxFreeVar;
 
@@ -1272,10 +1260,9 @@
 	WRITE_VAR_OFFSET(freeVar   , 1000000);
 	WRITE_VAR_OFFSET(maxFreeVar, 1000000);
 	WRITE_VAR(16, _vm->_game->_script->getVariablesCount() * 4);
-	return false;
 }
 
-bool Inter_v2::o2_checkData(OpFuncParams &params) {
+void Inter_v2::o2_checkData(OpFuncParams &params) {
 	int16 varOff;
 	int32 size;
 	SaveLoad::SaveMode mode;
@@ -1309,11 +1296,9 @@
 
 	WRITE_VAR_OFFSET(varOff, (size == -1) ? -1 : 50);
 	WRITE_VAR(16, (uint32) size);
-
-	return false;
 }
 
-bool Inter_v2::o2_readData(OpFuncParams &params) {
+void Inter_v2::o2_readData(OpFuncParams &params) {
 	int32 retSize;
 	int32 size;
 	int32 offset;
@@ -1346,15 +1331,15 @@
 		} else
 			WRITE_VAR(1, 0);
 
-		return false;
+		return;
 
 	} else if (mode == SaveLoad::kSaveModeIgnore)
-		return false;
+		return;
 
 	if (size < 0) {
 		warning("Attempted to read a raw sprite from file \"%s\"",
 				file);
-		return false ;
+		return;
 	} else if (size == 0) {
 		dataVar = 0;
 		size = _vm->_game->_script->getVariablesCount() * 4;
@@ -1364,13 +1349,13 @@
 
 	if (file[0] == 0) {
 		WRITE_VAR(1, size);
-		return false;
+		return;
 	}
 
 	WRITE_VAR(1, 1);
 	Common::SeekableReadStream *stream = _vm->_dataIO->getFile(file);
 	if (!stream)
-		return false;
+		return;
 
 	_vm->_draw->animateCursor(4);
 	if (offset < 0)
@@ -1391,10 +1376,9 @@
 		WRITE_VAR(1, 0);
 
 	delete stream;
-	return false;
 }
 
-bool Inter_v2::o2_writeData(OpFuncParams &params) {
+void Inter_v2::o2_writeData(OpFuncParams &params) {
 	int32 offset;
 	int32 size;
 	int16 dataVar;
@@ -1425,11 +1409,9 @@
 			WRITE_VAR(1, 0);
 
 	} else if (mode == SaveLoad::kSaveModeIgnore)
-		return false;
+		return;
 	else if (mode == SaveLoad::kSaveModeNone)
 		warning("Attempted to write to file \"%s\"", file);
-
-	return false;
 }
 
 void Inter_v2::o2_loadInfogramesIns(OpGobParams &params) {

Modified: scummvm/trunk/engines/gob/inter_v3.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter_v3.cpp	2011-01-29 22:15:57 UTC (rev 55626)
+++ scummvm/trunk/engines/gob/inter_v3.cpp	2011-01-29 22:44:06 UTC (rev 55627)
@@ -66,7 +66,7 @@
 	OPCODEGOB(100, o3_wobble);
 }
 
-bool Inter_v3::o3_getTotTextItemPart(OpFuncParams &params) {
+void Inter_v3::o3_getTotTextItemPart(OpFuncParams &params) {
 	byte *totData;
 	int16 totTextItem;
 	int16 part, curPart = 0;
@@ -89,7 +89,7 @@
 
 	TextItem *textItem = _vm->_game->_resources->getTextItem(totTextItem);
 	if (!textItem)
-		return false;
+		return;
 
 	totData = textItem->getData();
 
@@ -143,7 +143,7 @@
 							(*totData == 6) || (*totData == 7)) {
 						WRITE_VARO_UINT8(stringVar, 0);
 						delete textItem;
-						return false;
+						return;
 					}
 
 					switch (*totData) {
@@ -177,7 +177,7 @@
 						totData - _vm->_game->_resources->getTexts());
 				WRITE_VARO_UINT8(stringVar + 6, 0);
 				delete textItem;
-				return false;
+				return;
 			}
 
 			end = false;
@@ -224,7 +224,7 @@
 
 					if (curPart == part) {
 						delete textItem;
-						return false;
+						return;
 					}
 
 					stringVar = stringStartVar;
@@ -246,16 +246,14 @@
 	}
 
 	delete textItem;
-	return false;
 }
 
-bool Inter_v3::o3_copySprite(OpFuncParams &params) {
+void Inter_v3::o3_copySprite(OpFuncParams &params) {
 	o1_copySprite(params);
 
 	// For the close-up "fading" in the CD version
 	if (_vm->_draw->_destSurface == Draw::kFrontSurface)
 		_vm->_video->sparseRetrace(Draw::kFrontSurface);
-	return false;
 }
 
 void Inter_v3::o3_wobble(OpGobParams &params) {

Modified: scummvm/trunk/engines/gob/inter_v5.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter_v5.cpp	2011-01-29 22:15:57 UTC (rev 55626)
+++ scummvm/trunk/engines/gob/inter_v5.cpp	2011-01-29 22:44:06 UTC (rev 55627)
@@ -219,7 +219,7 @@
 	}
 }
 
-bool Inter_v5::o5_istrlen(OpFuncParams &params) {
+void Inter_v5::o5_istrlen(OpFuncParams &params) {
 	int16 strVar1, strVar2;
 	int16 len;
 	uint16 type;
@@ -249,8 +249,6 @@
 	}
 
 	writeVar(strVar2, type, (int32) len);
-
-	return false;
 }
 
 void Inter_v5::o5_spaceShooter(OpGobParams &params) {

Modified: scummvm/trunk/engines/gob/inter_v6.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter_v6.cpp	2011-01-29 22:15:57 UTC (rev 55626)
+++ scummvm/trunk/engines/gob/inter_v6.cpp	2011-01-29 22:44:06 UTC (rev 55627)
@@ -204,7 +204,7 @@
 
 }
 
-bool Inter_v6::o6_loadCursor(OpFuncParams &params) {
+void Inter_v6::o6_loadCursor(OpFuncParams &params) {
 	int16 id = _vm->_game->_script->readInt16();
 
 	if ((id == -1) || (id == -2)) {
@@ -228,7 +228,7 @@
 		int vmdSlot = _vm->_vidPlayer->openVideo(false, file, props);
 		if (vmdSlot == -1) {
 			warning("Can't open video \"%s\" as cursor", file);
-			return false;
+			return;
 		}
 
 		int16 framesCount = _vm->_vidPlayer->getFrameCount(vmdSlot);
@@ -250,17 +250,17 @@
 		_vm->_draw->_cursorAnimHigh[index] = framesCount + start - 1;
 		_vm->_draw->_cursorAnimDelays[index] = 10;
 
-		return false;
+		return;
 	}
 
 	int8 index = _vm->_game->_script->readInt8();
 
 	if ((index * _vm->_draw->_cursorWidth) >= _vm->_draw->_cursorSprites->getWidth())
-		return false;
+		return;
 
 	Resource *resource = _vm->_game->_resources->getResource((uint16) id);
 	if (!resource)
-		return false;
+		return;
 
 	_vm->_draw->_cursorSprites->fillRect(index * _vm->_draw->_cursorWidth, 0,
 			index * _vm->_draw->_cursorWidth + _vm->_draw->_cursorWidth - 1,
@@ -272,10 +272,9 @@
 	_vm->_draw->_cursorAnimLow[index] = 0;
 
 	delete resource;
-	return false;
 }
 
-bool Inter_v6::o6_assign(OpFuncParams &params) {
+void Inter_v6::o6_assign(OpFuncParams &params) {
 	uint16 size, destType;
 	uint16 dest = _vm->_game->_script->readVarIndex(&size, &destType);
 
@@ -293,7 +292,7 @@
 
 		_vm->_game->_script->evalExpr(&src);
 
-		return false;
+		return;
 	}
 
 	byte loopCount;
@@ -310,7 +309,7 @@
 			dest += n;
 		}
 
-		return false;
+		return;
 
 	} else if (_vm->_game->_script->peekByte() == 99) {
 		_vm->_game->_script->skip(1);
@@ -351,11 +350,9 @@
 			break;
 		}
 	}
-
-	return false;
 }
 
-bool Inter_v6::o6_removeHotspot(OpFuncParams &params) {
+void Inter_v6::o6_removeHotspot(OpFuncParams &params) {
 	int16 id;
 	uint8 stateType1    = Hotspots::kStateFilledDisabled | Hotspots::kStateType1;
 	uint8 stateType2    = Hotspots::kStateFilledDisabled | Hotspots::kStateType2;
@@ -384,11 +381,9 @@
 		_vm->_game->_hotspots->remove((stateType2 << 12) + id);
 		break;
 	}
-
-	return false;
 }
 
-bool Inter_v6::o6_fillRect(OpFuncParams &params) {
+void Inter_v6::o6_fillRect(OpFuncParams &params) {
 	int16 destSurf;
 
 	_vm->_draw->_destSurface = destSurf = _vm->_game->_script->readInt16();
@@ -418,14 +413,13 @@
 
 	if (destSurf & 0x80) {
 		warning("Urban Stub: o6_fillRect(), destSurf & 0x80");
-		return false;
+		return;
 	}
 
 	if (!_vm->_draw->_spritesArray[(destSurf > 100) ? (destSurf - 80) : destSurf])
-		return false;
+		return;
 
 	_vm->_draw->spriteOperation(DRAW_FILLRECT);
-	return false;
 }
 
 void Inter_v6::probe16bitMusic(char *fileName) {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list