[Scummvm-cvs-logs] SF.net SVN: scummvm:[45200] scummvm/trunk/engines/tucker

cyx at users.sourceforge.net cyx at users.sourceforge.net
Sat Oct 17 22:06:46 CEST 2009


Revision: 45200
          http://scummvm.svn.sourceforge.net/scummvm/?rev=45200&view=rev
Author:   cyx
Date:     2009-10-17 20:06:46 +0000 (Sat, 17 Oct 2009)

Log Message:
-----------
TUCKER: fix several issues in ending sequences (tracker item #2872355 - Minor bugs outro)

Modified Paths:
--------------
    scummvm/trunk/engines/tucker/graphics.cpp
    scummvm/trunk/engines/tucker/locations.cpp
    scummvm/trunk/engines/tucker/resource.cpp
    scummvm/trunk/engines/tucker/sequences.cpp
    scummvm/trunk/engines/tucker/tucker.cpp
    scummvm/trunk/engines/tucker/tucker.h

Modified: scummvm/trunk/engines/tucker/graphics.cpp
===================================================================
--- scummvm/trunk/engines/tucker/graphics.cpp	2009-10-17 19:46:27 UTC (rev 45199)
+++ scummvm/trunk/engines/tucker/graphics.cpp	2009-10-17 20:06:46 UTC (rev 45200)
@@ -189,6 +189,7 @@
 }
 
 void Graphics::setCharset(CharsetType type) {
+	_charsetType = type;
 	switch (type) {
 	case kCharsetTypeDefault:
 		_charset.charW = 10;

Modified: scummvm/trunk/engines/tucker/locations.cpp
===================================================================
--- scummvm/trunk/engines/tucker/locations.cpp	2009-10-17 19:46:27 UTC (rev 45199)
+++ scummvm/trunk/engines/tucker/locations.cpp	2009-10-17 20:06:46 UTC (rev 45200)
@@ -2284,7 +2284,6 @@
 		_updateSpriteFlag1 = 1;
 		state = i + 1;
 	}
-	state = i + 1; // FIXME: bug ?
 	_spritesTable[i].state = state;
 }
 

Modified: scummvm/trunk/engines/tucker/resource.cpp
===================================================================
--- scummvm/trunk/engines/tucker/resource.cpp	2009-10-17 19:46:27 UTC (rev 45199)
+++ scummvm/trunk/engines/tucker/resource.cpp	2009-10-17 20:06:46 UTC (rev 45200)
@@ -547,6 +547,7 @@
 	sprintf(filename, "pt%dtext.c", _partNum);
 	free(_ptTextBuf);
 	_ptTextBuf = loadFile(filename, 0);
+	_characterSpeechDataPtr = _ptTextBuf;
 	loadData();
 	loadPanObj();
 }

Modified: scummvm/trunk/engines/tucker/sequences.cpp
===================================================================
--- scummvm/trunk/engines/tucker/sequences.cpp	2009-10-17 19:46:27 UTC (rev 45199)
+++ scummvm/trunk/engines/tucker/sequences.cpp	2009-10-17 20:06:46 UTC (rev 45200)
@@ -57,12 +57,8 @@
 	_flagsTable[236] = 74;
 	uint8 *imgBuf = (uint8 *)malloc(16 * 64000);
 	loadSprC02_01();
+	clearSprites();
 	_spritesCount = _creditsSequenceSpriteCounts[num];
-	for (int i = 0; i < _spritesCount; ++i) {
-		memset(&_spritesTable[i], 0, sizeof(Sprite));
-		_spritesTable[i].state = -1;
-		_spritesTable[i].stateIndex = -1;
-	}
 	loadFile("credits.txt", _ptTextBuf);
 	loadImage("loc74.pcx", _quadBackgroundGfxBuf, 1);
 	startSpeechSound(9001, 120);
@@ -84,7 +80,7 @@
 			Graphics::copyRect(_locationBackgroundGfxBuf, 640, _quadBackgroundGfxBuf, 320, 320, 200);
 		} else {
 			Graphics::copyRect(_locationBackgroundGfxBuf, 640, imgBuf + imgNum * 64000, 320, 320, 200);
-			static const int yPosTable[] = { 48, 60, 80, 92, 140, 116 };
+			static const int yPosTable[] = { 48, 60, 80, 92, 104, 116 };
 			for (int i = 0; i < 6; ++i) {
 				drawCreditsString(5, yPosTable[i], counter2 * 6 + i);
 			}
@@ -96,11 +92,11 @@
 			}
 			if (counter1 > 116) {
 				counter1 = 0;
+				++counter2;
+				if (counter2 > 17) {
+					counter2 = 0;
+				}
 			}
-			++counter2;
-			if (counter2 > 17) {
-				counter2 = 0;
-			}
 		}
 		_fullRedraw = true;
 		++counter3;
@@ -117,17 +113,12 @@
 		counter4 = _timerCounter2 / 3;
 		if (counter4 == _creditsSequenceTimecounts[num]) {
 			_fadePaletteCounter = 0;
-			_spritesCount = _creditsSequenceSpriteCounts[num];
-			for (int i = 0; i < _spritesCount; ++i) {
-				memset(&_spritesTable[i], 0, sizeof(Sprite));
-				_spritesTable[i].state = -1;
-				_spritesTable[i].stateIndex = -1;
-			}
+			clearSprites();
 			++num;
 			char filename[40];
 			if (num == 6) {
 				for (int i = 0; i < 16; ++i) {
-					sprintf(filename, "cogs%04d.pcx", i);
+					sprintf(filename, "cogs%04d.pcx", i + 1);
 					loadImage(filename, imgBuf + i * 64000, 2);
 				}
 			} else {
@@ -215,9 +206,7 @@
 	}
 	loadImage(filename, _quadBackgroundGfxBuf, 1);
 	_spritesCount = 1;
-	memset(&_spritesTable[0], 0, sizeof(Sprite));
-	_spritesTable[0].state = -1;
-	_spritesTable[0].stateIndex = -1;
+	clearSprites();
 	int currentLocation = _locationNum;
 	_locationNum = 98;
 	unloadSprA02_01();

Modified: scummvm/trunk/engines/tucker/tucker.cpp
===================================================================
--- scummvm/trunk/engines/tucker/tucker.cpp	2009-10-17 19:46:27 UTC (rev 45199)
+++ scummvm/trunk/engines/tucker/tucker.cpp	2009-10-17 20:06:46 UTC (rev 45200)
@@ -207,9 +207,6 @@
 	_speechVolume = kMaxSoundVolume;
 	memset(_miscSoundFxNum, 0, sizeof(_miscSoundFxNum));
 	memset(_speechHistoryTable, 0, sizeof(_speechHistoryTable));
-	for (int i = 0; i < kMaxCharacters; ++i) {
-		_charSpeechSoundVolumeTable[i] = kMaxSoundVolume;
-	}
 	_charSpeechSoundCounter = 0;
 	memset(_miscSoundFxDelayCounter, 0, sizeof(_miscSoundFxDelayCounter));
 	_characterSoundFxDelayCounter = 0;
@@ -2368,6 +2365,14 @@
 	}
 }
 
+void TuckerEngine::clearSprites() {
+	memset(_spritesTable, 0, sizeof(_spritesTable));
+	for (int i = 0; i < kMaxCharacters; ++i) {
+		_spritesTable[i].state = -1;
+		_spritesTable[i].stateIndex = -1;
+	}
+}
+
 void TuckerEngine::updateSprites() {
 	const int count = (_locationNum == 9) ? 3 : _spritesCount;
 	for (int i = 0; i < count; ++i) {
@@ -3164,7 +3169,7 @@
 	case kCode_c0s:
 		_speechSoundNum = readTableInstructionParam(3) - 1;
 		rememberSpeechSound();
-		startSpeechSound(_partNum * 3000 + _ptTextOffset + _speechSoundNum - 3000, _charSpeechSoundVolumeTable[index]);
+		startSpeechSound(_partNum * 3000 + _ptTextOffset + _speechSoundNum - 3000, kMaxSoundVolume);
 		_charSpeechSoundCounter = kDefaultCharSpeechSoundCounter;
 		_actionTextColor = 181 + index;
 		if (_tableInstructionFlag == 0) {

Modified: scummvm/trunk/engines/tucker/tucker.h
===================================================================
--- scummvm/trunk/engines/tucker/tucker.h	2009-10-17 19:46:27 UTC (rev 45199)
+++ scummvm/trunk/engines/tucker/tucker.h	2009-10-17 20:06:46 UTC (rev 45200)
@@ -335,6 +335,7 @@
 	void addObjectToInventory(int num);
 	void removeObjectFromInventory(int num);
 	void handleMap();
+	void clearSprites();
 	void updateSprites();
 	void updateSprite(int i);
 	void drawStringInteger(int num, int x, int y, int digits);
@@ -705,12 +706,11 @@
 	int _currentFxIndex;
 	int _speechSoundNum;
 	int _speechVolume;
-	Audio::SoundHandle _sfxHandles[6];
-	Audio::SoundHandle _musicHandles[2];
+	Audio::SoundHandle _sfxHandles[kLocationSoundsTableSize];
+	Audio::SoundHandle _musicHandles[kLocationMusicsTableSize];
 	Audio::SoundHandle _speechHandle;
 	int _miscSoundFxNum[2];
 	int _speechHistoryTable[kSpeechHistoryTableSize];
-	int _charSpeechSoundVolumeTable[kMaxCharacters];
 	int _charSpeechSoundCounter;
 	int _miscSoundFxDelayCounter[2];
 	int _characterSoundFxDelayCounter;


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