[Scummvm-cvs-logs] scummvm master -> c83e3d54f25c1e77cff094d2e26da576e935587d

yaz0r vincent.hamm at gmail.com
Tue Aug 14 08:21:19 CEST 2012


This automated email contains information about 6 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
2fd8bae319 CINE: Fix restoring of savegame in cave
1d6a0ad8b2 Fix swimming sequence by allowing mouse click to be held down
ca54d69add Cine: Fix swimming sequence by allowing mouse click to be held down
320623a37b Merge branch 'master' of github.com:yaz0r/scummvm
478be5f07a CINE: Fix regression in savegame system
c83e3d54f2 Merge pull request #265 from yaz0r/master


Commit: 2fd8bae31994e5581d0ef43da439d01ddd0d1ef5
    https://github.com/scummvm/scummvm/commit/2fd8bae31994e5581d0ef43da439d01ddd0d1ef5
Author: Vincent Hamm (vincent.hamm at gmail.com)
Date: 2012-08-13T20:12:07-07:00

Commit Message:
CINE: Fix restoring of savegame in cave

Changed paths:
    engines/cine/anim.cpp
    engines/cine/anim.h
    engines/cine/bg_list.cpp
    engines/cine/gfx.cpp
    engines/cine/gfx.h
    engines/cine/saveload.cpp



diff --git a/engines/cine/anim.cpp b/engines/cine/anim.cpp
index 410fcca..d81828d 100644
--- a/engines/cine/anim.cpp
+++ b/engines/cine/anim.cpp
@@ -682,9 +682,10 @@ void convert8BBP2(byte *dest, byte *source, int16 width, int16 height) {
  * Load image set
  * @param resourceName Image set filename
  * @param idx Target index in animDataTable (-1 if any empty space will do)
+ * @param frameIndex frame of animation to load (-1 for all frames)
  * @return The number of the animDataTable entry after the loaded image set (-1 if error)
  */
-int loadSet(const char *resourceName, int16 idx) {
+int loadSet(const char *resourceName, int16 idx, int16 frameIndex =-1 ) {
 	AnimHeader2Struct header2;
 	uint16 numSpriteInAnim;
 	int16 foundFileIdx = findFileInBundle(resourceName);
@@ -708,6 +709,12 @@ int loadSet(const char *resourceName, int16 idx) {
 	entry = idx < 0 ? emptyAnimSpace() : idx;
 	assert(entry >= 0);
 
+	if(frameIndex>=0)
+	{
+		numSpriteInAnim = 1;
+		ptr += 0x10 * frameIndex;
+	}
+
 	for (int16 i = 0; i < numSpriteInAnim; i++, entry++) {
 		Common::MemoryReadStream readS(ptr, 0x10);
 
@@ -767,7 +774,7 @@ int loadSeq(const char *resourceName, int16 idx) {
  * @return The number of the animDataTable entry after the loaded resource (-1 if error)
  * @todo Implement loading of all resource types
  */
-int loadResource(const char *resourceName, int16 idx) {
+int loadResource(const char *resourceName, int16 idx, int16 frameIndex) {
 	int result = -1; // Return an error by default
 	if (strstr(resourceName, ".SPL")) {
 		result = loadSpl(resourceName, idx);
@@ -778,7 +785,7 @@ int loadResource(const char *resourceName, int16 idx) {
 	} else if (strstr(resourceName, ".ANM")) {
 		result = loadAni(resourceName, idx);
 	} else if (strstr(resourceName, ".SET")) {
-		result = loadSet(resourceName, idx);
+		result = loadSet(resourceName, idx, frameIndex);
 	} else if (strstr(resourceName, ".SEQ")) {
 		result = loadSeq(resourceName, idx);
 	} else if (strstr(resourceName, ".H32")) {
diff --git a/engines/cine/anim.h b/engines/cine/anim.h
index 9c06c26..c5130aa 100644
--- a/engines/cine/anim.h
+++ b/engines/cine/anim.h
@@ -98,7 +98,7 @@ public:
 
 void freeAnimDataTable();
 void freeAnimDataRange(byte startIdx, byte numIdx);
-int loadResource(const char *resourceName, int16 idx = -1);
+int loadResource(const char *resourceName, int16 idx = -1, int16 frameIndex = -1);
 void loadResourcesFromSave(Common::SeekableReadStream &fHandle, enum CineSaveGameFormat saveGameFormat);
 void generateMask(const byte *sprite, byte *mask, uint16 size, byte transparency);
 
diff --git a/engines/cine/bg_list.cpp b/engines/cine/bg_list.cpp
index 693fea3..36ecf53 100644
--- a/engines/cine/bg_list.cpp
+++ b/engines/cine/bg_list.cpp
@@ -39,9 +39,9 @@ uint32 var8;
  * @param objIdx Sprite description
  */
 void addToBGList(int16 objIdx) {
-	renderer->incrustSprite(g_cine->_objectTable[objIdx]);
-
 	createBgIncrustListElement(objIdx, 0);
+
+	renderer->incrustSprite(g_cine->_bgIncrustList.back());
 }
 
 /**
@@ -49,9 +49,9 @@ void addToBGList(int16 objIdx) {
  * @param objIdx Sprite description
  */
 void addSpriteFilledToBGList(int16 objIdx) {
-	renderer->incrustMask(g_cine->_objectTable[objIdx]);
-
 	createBgIncrustListElement(objIdx, 1);
+
+	renderer->incrustMask(g_cine->_bgIncrustList.back());
 }
 
 /**
@@ -103,9 +103,9 @@ void loadBgIncrustFromSave(Common::SeekableReadStream &fHandle) {
 		g_cine->_bgIncrustList.push_back(tmp);
 
 		if (tmp.param == 0) {
-			renderer->incrustSprite(g_cine->_objectTable[tmp.objIdx]);
+			renderer->incrustSprite(tmp);
 		} else {
-			renderer->incrustMask(g_cine->_objectTable[tmp.objIdx]);
+			renderer->incrustMask(tmp);
 		}
 	}
 }
diff --git a/engines/cine/gfx.cpp b/engines/cine/gfx.cpp
index d448f13..c51420e 100644
--- a/engines/cine/gfx.cpp
+++ b/engines/cine/gfx.cpp
@@ -113,7 +113,7 @@ FWRenderer::FWRenderer() : _background(NULL), _backupPal(), _cmd(""),
 	assert(_backBuffer);
 
 	memset(_backBuffer, 0, _screenSize);
-	memset(_bgName, 0, sizeof(_bgName));
+	memset(_bgName, 0, sizeof (_bgName));
 }
 
 
@@ -174,7 +174,8 @@ void FWRenderer::fillSprite(const ObjectStruct &obj, uint8 color) {
  * @param obj Object info
  * @param fillColor Sprite color
  */
-void FWRenderer::incrustMask(const ObjectStruct &obj, uint8 color) {
+void FWRenderer::incrustMask(const BGIncrust &incrust, uint8 color) {
+	const ObjectStruct &obj = g_cine->_objectTable[incrust.objIdx];
 	const byte *data = g_cine->_animDataTable[obj.frame].data();
 	int x, y, width, height;
 
@@ -218,7 +219,9 @@ void FWRenderer::drawSprite(const ObjectStruct &obj) {
  * Draw color sprite on background
  * @param obj Object info
  */
-void FWRenderer::incrustSprite(const ObjectStruct &obj) {
+void FWRenderer::incrustSprite(const BGIncrust &incrust) {
+	const ObjectStruct &obj = g_cine->_objectTable[incrust.objIdx];
+
 	const byte *data = g_cine->_animDataTable[obj.frame].data();
 	const byte *mask = g_cine->_animDataTable[obj.frame].mask();
 	int x, y, width, height;
@@ -301,7 +304,7 @@ void FWRenderer::drawMessage(const char *str, int x, int y, int width, int color
 			while (str[i] == ' ') i++;
 			line = fitLine(str + i, tw, words, cw);
 
-			if (str[i + line] != '\0' && str[i + line] != 0x7C && words) {
+			if ( str[i + line] != '\0' && str[i + line] != 0x7C && words) {
 				space = (tw - cw) / words;
 				extraSpace = (tw - cw) % words;
 			} else {
@@ -1119,7 +1122,8 @@ void OSRenderer::clear() {
  * @param obj Object info
  * @param fillColor Sprite color
  */
-void OSRenderer::incrustMask(const ObjectStruct &obj, uint8 color) {
+void OSRenderer::incrustMask(const BGIncrust &incrust, uint8 color) {
+	const ObjectStruct &obj = g_cine->_objectTable[incrust.objIdx];
 	const byte *data = g_cine->_animDataTable[obj.frame].data();
 	int x, y, width, height;
 
@@ -1154,15 +1158,16 @@ void OSRenderer::drawSprite(const ObjectStruct &obj) {
  * Draw color sprite
  * @param obj Object info
  */
-void OSRenderer::incrustSprite(const ObjectStruct &obj) {
-	const byte *data = g_cine->_animDataTable[obj.frame].data();
+void OSRenderer::incrustSprite(const BGIncrust &incrust) {
+	const ObjectStruct &obj = g_cine->_objectTable[incrust.objIdx];
+	const byte *data = g_cine->_animDataTable[incrust.frame].data();
 	int x, y, width, height, transColor;
 
-	x = obj.x;
-	y = obj.y;
+	x = incrust.x;
+	y = incrust.y;
 	transColor = obj.part;
-	width = g_cine->_animDataTable[obj.frame]._realWidth;
-	height = g_cine->_animDataTable[obj.frame]._height;
+	width = g_cine->_animDataTable[incrust.frame]._realWidth;
+	height = g_cine->_animDataTable[incrust.frame]._height;
 
 	if (_bgTable[_currentBg].bg) {
 		drawSpriteRaw2(data, transColor, width, height, _bgTable[_currentBg].bg, x, y);
@@ -1416,7 +1421,7 @@ void OSRenderer::selectBg(unsigned int idx) {
 
 	if (_bgTable[idx].bg) {
 		assert(_bgTable[idx].pal.isValid() && !(_bgTable[idx].pal.empty()));
-		_currentBg = idx;
+	_currentBg = idx;
 	} else
 		warning("OSRenderer::selectBg(%d) - attempt to select null background", idx);
 	reloadPalette();
@@ -1737,43 +1742,53 @@ void drawSpriteRaw(const byte *spritePtr, const byte *maskPtr, int16 width, int1
 	}
 }
 
-void OSRenderer::drawSprite(overlay *overlayPtr, const byte *spritePtr, int16 width, int16 height, byte *page, int16 x, int16 y, byte transparentColor, byte bpp) {
-	byte *pMask = NULL;
+void OSRenderer::drawSprite(overlay *overlayPtr, const byte *spritePtr, int16 width, int16 height, byte *page, int16 x, int16 y, byte transparentColor, byte bpp)
+{
+	byte* pMask = NULL;
 
 	// draw the mask based on next objects in the list
 	Common::List<overlay>::iterator it;
-	for (it = g_cine->_overlayList.begin(); it != g_cine->_overlayList.end(); ++it) {
-		if (&(*it) == overlayPtr) {
+	for (it = g_cine->_overlayList.begin(); it != g_cine->_overlayList.end(); ++it)
+	{
+		if(&(*it) == overlayPtr)
+		{
 			break;
 		}
 	}
 
-	while (it != g_cine->_overlayList.end()) {
-		overlay *pCurrentOverlay = &(*it);
-		if ((pCurrentOverlay->type == 5) || ((pCurrentOverlay->type == 21) && (pCurrentOverlay->x == overlayPtr->objIdx))) {
-			AnimData *sprite = &g_cine->_animDataTable[g_cine->_objectTable[it->objIdx].frame];
+	while(it != g_cine->_overlayList.end())
+	{
+		overlay* pCurrentOverlay = &(*it);
+		if((pCurrentOverlay->type==5) || ((pCurrentOverlay->type==21) && (pCurrentOverlay->x==overlayPtr->objIdx)))
+		{
+			AnimData* sprite = &g_cine->_animDataTable[g_cine->_objectTable[it->objIdx].frame];
 
-			if (pMask == NULL) {
-				pMask = new byte[width * height];
+			if(pMask == NULL)
+			{
+				pMask = new byte[width*height];
 
 				for (int i = 0; i < height; i++) {
 					for (int j = 0; j < width; j++) {
-						byte spriteColor = spritePtr[width * i + j];
-						pMask[width * i + j] = spriteColor;
+						byte spriteColor= spritePtr[width*i+j];
+						pMask[width*i+j] = spriteColor;
 					}
 				}
 			}
 
 			for (int i = 0; i < sprite->_realWidth; i++) {
 				for (int j = 0; j < sprite->_height; j++) {
-					int inMaskX = (g_cine->_objectTable[it->objIdx].x + i) - x;
-					int inMaskY = (g_cine->_objectTable[it->objIdx].y + j) - y;
-
-					if (inMaskX >= 0 && inMaskX < width) {
-						if (inMaskY >= 0 && inMaskY < height) {
-							if (sprite->_bpp == 1) {
-								if (!sprite->getColor(i, j)) {
-									pMask[inMaskY * width + inMaskX] = page[x + y * 320 + inMaskX + inMaskY * 320];
+					int inMaskX = (g_cine->_objectTable[it->objIdx].x+i) - x;
+					int inMaskY = (g_cine->_objectTable[it->objIdx].y+j) - y;
+
+					if(inMaskX >=0 && inMaskX < width)
+					{
+						if(inMaskY >=0 && inMaskY < height)
+						{
+							if(sprite->_bpp == 1)
+							{
+								if(!sprite->getColor(i, j))
+								{
+									pMask[inMaskY*width+inMaskX] = page[x + y * 320 + inMaskX + inMaskY * 320];
 								}
 							}
 						}
@@ -1787,7 +1802,8 @@ void OSRenderer::drawSprite(overlay *overlayPtr, const byte *spritePtr, int16 wi
 	}
 
 	// now, draw with the mask we created
-	if (pMask) {
+	if(pMask)
+	{
 		spritePtr = pMask;
 	}
 	{
@@ -1796,7 +1812,7 @@ void OSRenderer::drawSprite(overlay *overlayPtr, const byte *spritePtr, int16 wi
 			destPtr += i * 320;
 
 			for (int j = 0; j < width; j++) {
-				byte color = *(spritePtr++);
+				byte color= *(spritePtr++);
 				if ((transparentColor != color) && x + j >= 0 && x + j < 320 && i + y >= 0 && i + y < 200) {
 					*(destPtr++) = color;
 				} else {
@@ -1807,7 +1823,7 @@ void OSRenderer::drawSprite(overlay *overlayPtr, const byte *spritePtr, int16 wi
 	}
 
 	delete[] pMask;
-}
+};
 
 void drawSpriteRaw2(const byte *spritePtr, byte transColor, int16 width, int16 height, byte *page, int16 x, int16 y) {
 	int16 i, j;
diff --git a/engines/cine/gfx.h b/engines/cine/gfx.h
index 6ff5b08..3434cf9 100644
--- a/engines/cine/gfx.h
+++ b/engines/cine/gfx.h
@@ -27,6 +27,7 @@
 #include "common/rect.h"
 #include "common/stack.h"
 #include "cine/object.h"
+#include "cine/bg_list.h"
 
 namespace Cine {
 
@@ -177,8 +178,8 @@ public:
 	void drawFrame();
 	void setCommand(Common::String cmd);
 
-	virtual void incrustMask(const ObjectStruct &obj, uint8 color = 0);
-	virtual void incrustSprite(const ObjectStruct &obj);
+	virtual void incrustMask(const BGIncrust &incrust, uint8 color = 0);
+	virtual void incrustSprite(const BGIncrust &incrust);
 
 	virtual void loadBg16(const byte *bg, const char *name, unsigned int idx = 0);
 	virtual void loadCt16(const byte *ct, const char *name);
@@ -239,8 +240,8 @@ public:
 
 	void clear();
 
-	void incrustMask(const ObjectStruct &obj, uint8 color = 0);
-	void incrustSprite(const ObjectStruct &obj);
+	void incrustMask(const BGIncrust &incrust, uint8 color = 0);
+	void incrustSprite(const BGIncrust &incrust);
 
 	void loadBg16(const byte *bg, const char *name, unsigned int idx = 0);
 	void loadCt16(const byte *ct, const char *name);
diff --git a/engines/cine/saveload.cpp b/engines/cine/saveload.cpp
index 223099a..20952ee 100644
--- a/engines/cine/saveload.cpp
+++ b/engines/cine/saveload.cpp
@@ -991,7 +991,7 @@ void CineEngine::makeSave(char *saveFileName) {
  * at a time.
  */
 void loadResourcesFromSave(Common::SeekableReadStream &fHandle, enum CineSaveGameFormat saveGameFormat) {
-	int16 currentAnim, foundFileIdx;
+	int16 foundFileIdx;
 	char *animName, part[256], name[10];
 
 	strcpy(part, currentPartName);
@@ -1001,10 +1001,10 @@ void loadResourcesFromSave(Common::SeekableReadStream &fHandle, enum CineSaveGam
 
 	const int entrySize = ((saveGameFormat == ANIMSIZE_23) ? 23 : 30);
 	const int fileStartPos = fHandle.pos();
-	currentAnim = 0;
-	while (currentAnim < NUM_MAX_ANIMDATA) {
+
+	for(int resourceIndex=0; resourceIndex<NUM_MAX_ANIMDATA; resourceIndex++) {
 		// Seek to the start of the current animation's entry
-		fHandle.seek(fileStartPos + currentAnim * entrySize);
+		fHandle.seek(fileStartPos + resourceIndex * entrySize);
 		// Read in the current animation entry
 		fHandle.readUint16BE(); // width
 		fHandle.readUint16BE();
@@ -1019,7 +1019,7 @@ void loadResourcesFromSave(Common::SeekableReadStream &fHandle, enum CineSaveGam
 		}
 
 		foundFileIdx = fHandle.readSint16BE();
-		fHandle.readSint16BE(); // frame
+		int16 frameIndex = fHandle.readSint16BE(); // frame
 		fHandle.read(name, 10);
 
 		// Handle variables only present in animation entries of size 23
@@ -1029,7 +1029,7 @@ void loadResourcesFromSave(Common::SeekableReadStream &fHandle, enum CineSaveGam
 
 		// Don't try to load invalid entries.
 		if (foundFileIdx < 0 || !validPtr) {
-			currentAnim++; // Jump over the invalid entry
+			//resourceIndex++; // Jump over the invalid entry
 			continue;
 		}
 
@@ -1041,9 +1041,7 @@ void loadResourcesFromSave(Common::SeekableReadStream &fHandle, enum CineSaveGam
 
 		animName = g_cine->_partBuffer[foundFileIdx].partName;
 		loadRelatedPalette(animName); // Is this for Future Wars only?
-		const int16 prevAnim = currentAnim;
-		currentAnim = loadResource(animName, currentAnim);
-		assert(currentAnim > prevAnim); // Make sure we advance forward
+		loadResource(animName, resourceIndex, frameIndex);
 	}
 
 	loadPart(part);


Commit: 1d6a0ad8b20b5c223f3dbab50298be5cdf5f36f5
    https://github.com/scummvm/scummvm/commit/1d6a0ad8b20b5c223f3dbab50298be5cdf5f36f5
Author: Vincent Hamm (vincent.hamm at gmail.com)
Date: 2012-08-13T21:35:49-07:00

Commit Message:
Fix swimming sequence by allowing mouse click to be held down

Changed paths:
    engines/cine/main_loop.cpp



diff --git a/engines/cine/main_loop.cpp b/engines/cine/main_loop.cpp
index 971830c..7cd3cac 100644
--- a/engines/cine/main_loop.cpp
+++ b/engines/cine/main_loop.cpp
@@ -56,6 +56,12 @@ static void processEvent(Common::Event &event) {
 	case Common::EVENT_RBUTTONDOWN:
 		mouseRight = 1;
 		break;
+	case Common::EVENT_LBUTTONUP:
+		mouseLeft = 0;
+		break;
+	case Common::EVENT_RBUTTONUP:
+		mouseRight = 0;
+		break;
 	case Common::EVENT_MOUSEMOVE:
 		break;
 	case Common::EVENT_KEYDOWN:
@@ -214,8 +220,6 @@ void manageEvents() {
 	g_sound->update();
 	mouseData.left = mouseLeft;
 	mouseData.right = mouseRight;
-	mouseLeft = 0;
-	mouseRight = 0;
 }
 
 void getMouseData(uint16 param, uint16 *pButton, uint16 *pX, uint16 *pY) {
@@ -311,6 +315,7 @@ void CineEngine::mainLoop(int bootScriptIdx) {
 		// HACK: Force amount of oxygen left to maximum during Operation Stealth's first arcade sequence.
 		//       This makes it possible to pass the arcade sequence for now.
 		// FIXME: Remove the hack and make the first arcade sequence normally playable.
+		/*
 		if (g_cine->getGameType() == Cine::GType_OS) {
 			Common::String bgName(renderer->getBgName());
 			// Check if the background is one of the three backgrounds
@@ -320,7 +325,7 @@ void CineEngine::mainLoop(int bootScriptIdx) {
 				// Force the amount of oxygen left to the maximum.
 				g_cine->_objectTable[oxygenObjNum].x = maxOxygen;
 			}
-		}
+		}*/
 
 		// HACK: In Operation Stealth after the first arcade sequence jump player's position to avoid getting stuck.
 		// After the first arcade sequence the player comes up stairs from


Commit: ca54d69addbbb4257514b007a656138c8f60c4cd
    https://github.com/scummvm/scummvm/commit/ca54d69addbbb4257514b007a656138c8f60c4cd
Author: Vincent Hamm (vincent.hamm at gmail.com)
Date: 2012-08-13T21:38:24-07:00

Commit Message:
Cine: Fix swimming sequence by allowing mouse click to be held down

Changed paths:
    engines/cine/main_loop.cpp



diff --git a/engines/cine/main_loop.cpp b/engines/cine/main_loop.cpp
index 971830c..7cd3cac 100644
--- a/engines/cine/main_loop.cpp
+++ b/engines/cine/main_loop.cpp
@@ -56,6 +56,12 @@ static void processEvent(Common::Event &event) {
 	case Common::EVENT_RBUTTONDOWN:
 		mouseRight = 1;
 		break;
+	case Common::EVENT_LBUTTONUP:
+		mouseLeft = 0;
+		break;
+	case Common::EVENT_RBUTTONUP:
+		mouseRight = 0;
+		break;
 	case Common::EVENT_MOUSEMOVE:
 		break;
 	case Common::EVENT_KEYDOWN:
@@ -214,8 +220,6 @@ void manageEvents() {
 	g_sound->update();
 	mouseData.left = mouseLeft;
 	mouseData.right = mouseRight;
-	mouseLeft = 0;
-	mouseRight = 0;
 }
 
 void getMouseData(uint16 param, uint16 *pButton, uint16 *pX, uint16 *pY) {
@@ -311,6 +315,7 @@ void CineEngine::mainLoop(int bootScriptIdx) {
 		// HACK: Force amount of oxygen left to maximum during Operation Stealth's first arcade sequence.
 		//       This makes it possible to pass the arcade sequence for now.
 		// FIXME: Remove the hack and make the first arcade sequence normally playable.
+		/*
 		if (g_cine->getGameType() == Cine::GType_OS) {
 			Common::String bgName(renderer->getBgName());
 			// Check if the background is one of the three backgrounds
@@ -320,7 +325,7 @@ void CineEngine::mainLoop(int bootScriptIdx) {
 				// Force the amount of oxygen left to the maximum.
 				g_cine->_objectTable[oxygenObjNum].x = maxOxygen;
 			}
-		}
+		}*/
 
 		// HACK: In Operation Stealth after the first arcade sequence jump player's position to avoid getting stuck.
 		// After the first arcade sequence the player comes up stairs from


Commit: 320623a37b0014ba494edab7029072609801ee7d
    https://github.com/scummvm/scummvm/commit/320623a37b0014ba494edab7029072609801ee7d
Author: Vincent Hamm (vincent.hamm at gmail.com)
Date: 2012-08-13T21:39:22-07:00

Commit Message:
Merge branch 'master' of github.com:yaz0r/scummvm

Changed paths:





Commit: 478be5f07a8528d19542802a7714cf4fd652f340
    https://github.com/scummvm/scummvm/commit/478be5f07a8528d19542802a7714cf4fd652f340
Author: Vincent Hamm (vincent.hamm at gmail.com)
Date: 2012-08-13T23:20:10-07:00

Commit Message:
CINE: Fix regression in savegame system

Changed paths:
    engines/cine/anim.cpp



diff --git a/engines/cine/anim.cpp b/engines/cine/anim.cpp
index d81828d..6016883 100644
--- a/engines/cine/anim.cpp
+++ b/engines/cine/anim.cpp
@@ -709,13 +709,17 @@ int loadSet(const char *resourceName, int16 idx, int16 frameIndex =-1 ) {
 	entry = idx < 0 ? emptyAnimSpace() : idx;
 	assert(entry >= 0);
 
+	int16 startFrame = 0;
+	int16 endFrame = numSpriteInAnim;
+
 	if(frameIndex>=0)
 	{
-		numSpriteInAnim = 1;
+		startFrame = frameIndex;
+		endFrame = frameIndex+1;
 		ptr += 0x10 * frameIndex;
 	}
 
-	for (int16 i = 0; i < numSpriteInAnim; i++, entry++) {
+	for (int16 i = startFrame; i < endFrame; i++, entry++) {
 		Common::MemoryReadStream readS(ptr, 0x10);
 
 		header2.field_0 = readS.readUint32BE();


Commit: c83e3d54f25c1e77cff094d2e26da576e935587d
    https://github.com/scummvm/scummvm/commit/c83e3d54f25c1e77cff094d2e26da576e935587d
Author: yaz0r (vincent.hamm at gmail.com)
Date: 2012-08-13T23:20:53-07:00

Commit Message:
Merge pull request #265 from yaz0r/master

More fix to cine

Changed paths:
    engines/cine/anim.cpp
    engines/cine/anim.h
    engines/cine/bg_list.cpp
    engines/cine/gfx.cpp
    engines/cine/gfx.h
    engines/cine/main_loop.cpp
    engines/cine/saveload.cpp









More information about the Scummvm-git-logs mailing list