diff options
| author | Travis Howell | 2006-10-25 10:20:17 +0000 | 
|---|---|---|
| committer | Travis Howell | 2006-10-25 10:20:17 +0000 | 
| commit | 15915e805d799d5e3039ac0065a03d9ec010a941 (patch) | |
| tree | 34f12785f01dec3f05a3ef69dadf162a7aa855f1 | |
| parent | a4be70e47b93a33ca114bc6309c1349605f8aebd (diff) | |
| download | scummvm-rg350-15915e805d799d5e3039ac0065a03d9ec010a941.tar.gz scummvm-rg350-15915e805d799d5e3039ac0065a03d9ec010a941.tar.bz2 scummvm-rg350-15915e805d799d5e3039ac0065a03d9ec010a941.zip | |
Remove unused script opcodes
svn-id: r24495
| -rw-r--r-- | engines/agos/agos.h | 2 | ||||
| -rw-r--r-- | engines/agos/debug.h | 36 | ||||
| -rw-r--r-- | engines/agos/script.cpp | 13 | ||||
| -rw-r--r-- | engines/agos/script_e1.cpp | 2 | ||||
| -rw-r--r-- | engines/agos/subroutine.cpp | 19 | 
5 files changed, 31 insertions, 41 deletions
| diff --git a/engines/agos/agos.h b/engines/agos/agos.h index 434ee8d207..fbc50667ca 100644 --- a/engines/agos/agos.h +++ b/engines/agos/agos.h @@ -1060,8 +1060,6 @@ public:  	void o_defObj();  	void o_here();  	void o_doClassIcons(); -	void o_waitEndTune(); -	void o_ifEndTune();  	void o_setAdjNoun();  	void o_saveUserGame();  	void o_loadUserGame(); diff --git a/engines/agos/debug.h b/engines/agos/debug.h index 5adc4ef889..ed34990322 100644 --- a/engines/agos/debug.h +++ b/engines/agos/debug.h @@ -358,8 +358,8 @@ static const char *const elvira1_opcodeNameTable[300] = {  	"IWW|DO_CLASS_ICONS",  	"WW|PLAY_TUNE",  	/* 264 */ -	"W|WAIT_END_TUNE", -	"W|IF_END_TUNE", +	NULL, +	NULL,  	"Www|SET_ADJ_NOUN",  	"WW|ZONE_DISK",  	/* 268 */ @@ -546,8 +546,8 @@ static const char *const elvira2_opcodeNameTable[256] = {  	"IBB|DO_CLASS_ICONS",  	"WW|PLAY_TUNE",  	/* 128 */ -	"W|WAIT_END_TUNE", -	"W|IF_END_TUNE", +	NULL, +	NULL,  	"Bww|SET_ADJ_NOUN",  	NULL,  	/* 132 */ @@ -779,8 +779,8 @@ static const char *const waxworks_opcodeNameTable[256] = {  	"IBB|DO_CLASS_ICONS",  	"WW|PLAY_TUNE",  	/* 128 */ -	"W|WAIT_END_TUNE", -	"W|IF_END_TUNE", +	NULL, +	NULL,  	"Bww|SET_ADJ_NOUN",  	NULL,  	/* 132 */ @@ -1021,8 +1021,8 @@ static const char *const simon1dos_opcodeNameTable[256] = {  	"IBB|DO_CLASS_ICONS",  	"WW|PLAY_TUNE",  	/* 128 */ -	"W|WAIT_END_TUNE", -	"W|IF_END_TUNE", +	NULL, +	NULL,  	"Bww|SET_ADJ_NOUN",  	NULL,  	/* 132 */ @@ -1259,8 +1259,8 @@ static const char *const simon1talkie_opcodeNameTable[256] = {  	"IBB|DO_CLASS_ICONS",  	"WW|PLAY_TUNE",  	/* 128 */ -	"W|WAIT_END_TUNE", -	"W|IF_END_TUNE", +	NULL, +	NULL,  	"Bww|SET_ADJ_NOUN",  	NULL,  	/* 132 */ @@ -1497,8 +1497,8 @@ static const char *const simon2dos_opcodeNameTable[256] = {  	"IBB|DO_CLASS_ICONS",  	"WWB|PLAY_TUNE",  	/* 128 */ -	"W|WAIT_END_TUNE", -	"W|IF_END_TUNE", +	NULL, +	NULL,  	"Bww|SET_ADJ_NOUN",  	NULL,  	/* 132 */ @@ -1739,8 +1739,8 @@ static const char *const simon2talkie_opcodeNameTable[256] = {  	"IBB|DO_CLASS_ICONS",  	"WWB|PLAY_TUNE",  	/* 128 */ -	"W|WAIT_END_TUNE", -	"W|IF_END_TUNE", +	NULL, +	NULL,  	"Bww|SET_ADJ_NOUN",  	NULL,  	/* 132 */ @@ -1981,8 +1981,8 @@ static const char *const feeblefiles_opcodeNameTable[256] = {  	"IBB|DO_CLASS_ICONS",  	"WWB|PLAY_TUNE",  	/* 128 */ -	"W|WAIT_END_TUNE", -	"W|IF_END_TUNE", +	NULL, +	NULL,  	"Bww|SET_ADJ_NOUN",  	"|SET_TIME",  	/* 132 */ @@ -2234,8 +2234,8 @@ static const char *const puzzlepack_opcodeNameTable[256] = {  	"IBB|DO_CLASS_ICONS",  	"WWB|PLAY_TUNE",  	/* 128 */ -	"W|WAIT_END_TUNE", -	"W|IF_END_TUNE", +	NULL, +	NULL,  	"Bww|SET_ADJ_NOUN",  	"|SET_TIME",  	/* 132 */ diff --git a/engines/agos/script.cpp b/engines/agos/script.cpp index f82ba23cca..7971739cac 100644 --- a/engines/agos/script.cpp +++ b/engines/agos/script.cpp @@ -121,8 +121,6 @@ void AGOSEngine::setupCommonOpcodes(OpcodeProc *op) {  	op[121] = &AGOSEngine::o_defObj;  	op[125] = &AGOSEngine::o_here;  	op[126] = &AGOSEngine::o_doClassIcons; -	op[128] = &AGOSEngine::o_waitEndTune; -	op[129] = &AGOSEngine::o_ifEndTune;  	op[130] = &AGOSEngine::o_setAdjNoun;  	op[132] = &AGOSEngine::o_saveUserGame;  	op[133] = &AGOSEngine::o_loadUserGame; @@ -858,17 +856,6 @@ void AGOSEngine::o_doClassIcons() {  	mouseOn();  } -void AGOSEngine::o_waitEndTune() { -	// 128: dummy instruction -	getVarOrWord(); -} - -void AGOSEngine::o_ifEndTune() { -	// 129: dummy instruction -	getVarOrWord(); -	setScriptCondition(true); -} -  void AGOSEngine::o_setAdjNoun() {  	// 130: set adj noun  	uint var = getVarOrByte(); diff --git a/engines/agos/script_e1.cpp b/engines/agos/script_e1.cpp index 9fbe05fc1f..ad4aabf9f8 100644 --- a/engines/agos/script_e1.cpp +++ b/engines/agos/script_e1.cpp @@ -189,8 +189,6 @@ void AGOSEngine::setupElvira1Opcodes(OpcodeProc *op) {  	op[261] = &AGOSEngine::o_here;  	op[262] = &AGOSEngine::o_doClassIcons;  	op[263] = &AGOSEngine::o1_playTune; -	op[264] = &AGOSEngine::o_waitEndTune; -	op[265] = &AGOSEngine::o_ifEndTune;  	op[266] = &AGOSEngine::o_setAdjNoun;  	op[267] = &AGOSEngine::oe1_zoneDisk;  	op[268] = &AGOSEngine::o_saveUserGame; diff --git a/engines/agos/subroutine.cpp b/engines/agos/subroutine.cpp index 6975017664..0c76144370 100644 --- a/engines/agos/subroutine.cpp +++ b/engines/agos/subroutine.cpp @@ -215,8 +215,8 @@ Subroutine *AGOSEngine::getSubroutineByID(uint subroutine_id) {  		}  	} -	if (subroutine_id != 160) -		debug(0,"getSubroutineByID: subroutine %d not found", subroutine_id); +	//if (subroutine_id != 160) +	//	debug(0,"getSubroutineByID: subroutine %d not found", subroutine_id);  	return NULL;  } @@ -312,6 +312,7 @@ bool AGOSEngine::loadTablesOldIntoMem(uint subr_id) {  	p += 6;  	while (min_num) { +		//printf("loadTablesOldIntoMem: min %d max %d\n", min_num, max_num);  		if ((subr_id >= min_num) && (subr_id <= max_num)) {  			_subroutineList = _subroutineListOrg;  			_tablesHeapPtr = _tablesHeapPtrOrg; @@ -368,6 +369,7 @@ bool AGOSEngine::loadTablesNewIntoMem(uint subr_id) {  			max_num = READ_BE_UINT16(p); p += 2; +			//printf("loadTablesNewIntoMem: min %d max %d\n", min_num, max_num);  			if (subr_id >= min_num && subr_id <= max_num) {  				_subroutineList = _subroutineListOrg;  				_tablesHeapPtr = _tablesHeapPtrOrg; @@ -513,9 +515,12 @@ SubroutineLine *AGOSEngine::createSubroutineLine(Subroutine *sub, int where) {  void AGOSEngine::runSubroutine101() {  	Subroutine *sub; -	sub = getSubroutineByID(101); -	if (sub != NULL) -		startSubroutineEx(sub); +	for (int i = 0; i < 1000000; i++) { +		sub = getSubroutineByID(i); +		if (sub != NULL) +			startSubroutine(sub); +	} +	error("Complete");  	permitInput();  } @@ -537,9 +542,11 @@ int AGOSEngine::startSubroutine(Subroutine *sub) {  	_classMode1 = 0;  	_classMode2 = 0; -	if (_startMainScript) +	//if (_startMainScript)  		dumpSubroutine(sub); +	return 0; +  	if (++_recursionDepth > 40)  		error("Recursion error"); | 
