[Scummvm-cvs-logs] SF.net SVN: scummvm: [24618] scummvm/trunk/engines/touche

cyx at users.sourceforge.net cyx at users.sourceforge.net
Sun Nov 5 01:40:41 CET 2006


Revision: 24618
          http://svn.sourceforge.net/scummvm/?rev=24618&view=rev
Author:   cyx
Date:     2006-11-04 16:40:35 -0800 (Sat, 04 Nov 2006)

Log Message:
-----------
removed unneeded opcodes

Modified Paths:
--------------
    scummvm/trunk/engines/touche/opcodes.cpp
    scummvm/trunk/engines/touche/touche.cpp
    scummvm/trunk/engines/touche/touche.h

Modified: scummvm/trunk/engines/touche/opcodes.cpp
===================================================================
--- scummvm/trunk/engines/touche/opcodes.cpp	2006-11-05 00:29:34 UTC (rev 24617)
+++ scummvm/trunk/engines/touche/opcodes.cpp	2006-11-05 00:40:35 UTC (rev 24618)
@@ -79,10 +79,10 @@
 		0,
 		0,
 		/* 0x28 */
-		&ToucheEngine::op_getScriptValue,
-		&ToucheEngine::op_setScriptValue,
 		0,
 		0,
+		0,
+		0,
 		/* 0x2C */
 		0,
 		0,
@@ -114,7 +114,7 @@
 		&ToucheEngine::op_startEpisode,
 		&ToucheEngine::op_setConversationNum,
 		/* 0x44 */
-		&ToucheEngine::op_enableInventoryItem,
+		0,
 		&ToucheEngine::op_enableInput,
 		&ToucheEngine::op_disableInput,
 		&ToucheEngine::op_faceKeyChar,
@@ -139,10 +139,10 @@
 		&ToucheEngine::op_fadePalette,
 		0,
 		/* 0x58 */
-		&ToucheEngine::op_disableInventoryItem,
 		0,
 		0,
 		0,
+		0,
 		/* 0x5C */
 		0,
 		0,
@@ -172,7 +172,7 @@
 		&ToucheEngine::op_startMusic,
 		0,
 		0,
-		&ToucheEngine::op_copyPaletteColor,
+		0,
 		/* 0x74 */
 		&ToucheEngine::op_delay,
 		&ToucheEngine::op_lockHitBox,
@@ -422,20 +422,6 @@
 	*_script.stackDataPtr = val;
 }
 
-void ToucheEngine::op_getScriptValue() {
-	debugC(9, kDebugOpcodes, "ToucheEngine::op_getScriptValue()");
-	uint8 index = _script.readNextByte();
-	assert(index < _script.stackDataBasePtr[2]);
-	*_script.stackDataPtr = _script.stackDataBasePtr[3 + index];
-}
-
-void ToucheEngine::op_setScriptValue() {
-	debugC(9, kDebugOpcodes, "ToucheEngine::op_setScriptValue()");
-	uint8 index = _script.readNextByte();
-	assert(index < _script.stackDataBasePtr[2]);
-	_script.stackDataBasePtr[3 + index] = *_script.stackDataPtr;
-}
-
 void ToucheEngine::op_getKeyCharWalkBox() {
 	debugC(9, kDebugOpcodes, "ToucheEngine::op_getKeyCharWalkBox()");
 	int16 keyChar = _script.readNextWord();
@@ -620,14 +606,6 @@
 	_conversationNum = _script.readNextWord();
 }
 
-void ToucheEngine::op_enableInventoryItem() {
-	debugC(9, kDebugOpcodes, "ToucheEngine::op_enableInventoryItem()");
-	int16 flag = _script.readNextWord();
-	int16 item = _script.readNextWord();
-	int16 rnd = _script.readNextWord();
-	changeInventoryItemState(flag, item, rnd, 1);
-}
-
 void ToucheEngine::op_enableInput() {
 	debugC(9, kDebugOpcodes, "ToucheEngine::op_enableInput()");
 	++_disabledInputCounter;
@@ -792,14 +770,6 @@
 	}
 }
 
-void ToucheEngine::op_disableInventoryItem() {
-	debugC(9, kDebugOpcodes, "ToucheEngine::op_disableInventoryItem()");
-	int16 flag = _script.readNextWord();
-	int16 item = _script.readNextWord();
-	int16 rnd = _script.readNextWord();
-	changeInventoryItemState(flag, item, rnd, 0);
-}
-
 void ToucheEngine::op_getInventoryItemFlags() {
 	debugC(9, kDebugOpcodes, "ToucheEngine::op_getInventoryItemFlags()");
 	int16 item = _script.readNextWord();
@@ -891,13 +861,6 @@
 	_newMusicNum = _script.readNextWord();
 }
 
-void ToucheEngine::op_copyPaletteColor() {
-	debugC(9, kDebugOpcodes, "ToucheEngine::op_copyPaletteColor()");
-	int16 src = _script.readNextWord();
-	int16 dst = _script.readNextWord();
-	copyPaletteColor(src, dst);
-}
-
 void ToucheEngine::op_delay() {
 	debugC(9, kDebugOpcodes, "ToucheEngine::op_delay()");
 	int16 delay = _script.readNextWord();

Modified: scummvm/trunk/engines/touche/touche.cpp
===================================================================
--- scummvm/trunk/engines/touche/touche.cpp	2006-11-05 00:29:34 UTC (rev 24617)
+++ scummvm/trunk/engines/touche/touche.cpp	2006-11-05 00:40:35 UTC (rev 24618)
@@ -2142,30 +2142,6 @@
 	}
 }
 
-void ToucheEngine::changeInventoryItemState(int flag, int itemNum, int itemRnd, int inventoryItem) {
-	const int rnd = getRandomNumber(100) + 1;
-	if (inventoryItem) {
-		itemNum = _keyCharsTable[_currentKeyCharNum].inventoryItems[itemNum];
-	}
-	if (_flagsTable[174]) {
-		itemNum /= 2;
-		_flagsTable[174] = 0;
-	}
-	int16 value;
-	if (itemNum > itemRnd) {
-		value = 1;
-	} else if (rnd < itemNum / 6) {
-		value = 0;
-	} else if (rnd <= itemNum) {
-		value = 1;
-	} else if (rnd >= itemNum * 2) {
-		value = 2;
-	} else {
-		value = 3;
-	}
-	_flagsTable[flag] = value;
-}
-
 void ToucheEngine::resetTalkingVars() {
 	_talkListCurrent = 0;
 	_talkListEnd = 0;
@@ -3245,10 +3221,6 @@
 	_system->setPalette(&pal[firstColor * 4], firstColor, colorCount);
 }
 
-void ToucheEngine::copyPaletteColor(int srcColorIndex, int dstColorIndex) {
-	memcpy(&_paletteBuffer[dstColorIndex * 4], &_paletteBuffer[srcColorIndex * 4], 4);
-}
-
 void ToucheEngine::updateScreenArea(const uint8 *src, int srcPitch, int srcX, int srcY, int dstX, int dstY, int w, int h) {
 	_system->copyRectToScreen(src + srcY * srcPitch + srcX, srcPitch, dstX, dstY, w, h);
 	_system->updateScreen();

Modified: scummvm/trunk/engines/touche/touche.h
===================================================================
--- scummvm/trunk/engines/touche/touche.h	2006-11-05 00:29:34 UTC (rev 24617)
+++ scummvm/trunk/engines/touche/touche.h	2006-11-05 00:40:35 UTC (rev 24618)
@@ -406,7 +406,6 @@
 	void appendItemToInventoryList(int index);
 	void addItemToInventory(int inventory, int16 item);
 	void removeItemFromInventory(int inventory, int16 item);
-	void changeInventoryItemState(int flag, int itemNum, int itemRnd, int inventoryItem);
 
 	void resetTalkingVars();
 	int updateKeyCharTalk(int pauseFlag);
@@ -447,7 +446,6 @@
 	void addToDirtyRect(const Common::Rect &r);
 	void clearDirtyRects();
 	void setPalette(int firstColor, int colorCount, int redScale, int greenScale, int blueScale);
-	void copyPaletteColor(int srcColorIndex, int dstColorIndex);
 	void updateScreenArea(const uint8 *src, int srcPitch, int srcX, int srcY, int dstX, int dstY, int w, int h);
 	void updateEntireScreen();
 	void updateDirtyScreenAreas();
@@ -489,8 +487,6 @@
 	void op_getFlag();
 	void op_setFlag();
 	void op_fetchScriptByte();
-	void op_getScriptValue();
-	void op_setScriptValue();
 	void op_getKeyCharWalkBox();
 	void op_startSound();
 	void op_initKeyCharTalk();
@@ -510,7 +506,6 @@
 	void op_setInventoryItem();
 	void op_startEpisode();
 	void op_setConversationNum();
-	void op_enableInventoryItem();
 	void op_enableInput();
 	void op_disableInput();
 	void op_faceKeyChar();
@@ -528,7 +523,6 @@
 	void op_giveItemTo();
 	void op_resetHitBoxes();
 	void op_fadePalette();
-	void op_disableInventoryItem();
 	void op_getInventoryItemFlags();
 	void op_drawInventory();
 	void op_stopKeyCharScript();
@@ -539,7 +533,6 @@
 	void op_startAnimation();
 	void op_setKeyCharTextColor();
 	void op_startMusic();
-	void op_copyPaletteColor();
 	void op_delay();
 	void op_lockHitBox();
 	void op_removeItemFromInventory();


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