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

fuzzie fuzzie at fuzzie.org
Mon Feb 27 14:46:41 CET 2012


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

Summary:
1e8b286c84 TSAGE: Bugfixes for R2R animation player
46c590940a TSAGE: Renamed many of the unknown fields in the R2R Animation Player
1545745281 ANDROID: Fix sed escaping in mkplugin.sh.
b0f961924a ANDROID: Fix mkplugin.sh freezing with bash


Commit: 1e8b286c849a799059b7394eabf253827d6ec73f
    https://github.com/scummvm/scummvm/commit/1e8b286c849a799059b7394eabf253827d6ec73f
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2012-02-27T01:45:55-08:00

Commit Message:
TSAGE: Bugfixes for R2R animation player

Changed paths:
    engines/tsage/core.cpp
    engines/tsage/ringworld2/ringworld2_logic.cpp
    engines/tsage/ringworld2/ringworld2_logic.h
    engines/tsage/ringworld2/ringworld2_scenes0.cpp



diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp
index 0a8c4ef..292e74c 100644
--- a/engines/tsage/core.cpp
+++ b/engines/tsage/core.cpp
@@ -4259,8 +4259,10 @@ void SceneHandler::dispatch() {
 	}
 
 	// Handle drawing the contents of the scene
-	if (g_globals->_sceneManager._scene)
-		g_globals->_sceneObjects->draw();
+	if ((g_vm->getGameID() != GType_Ringworld2) || (R2_GLOBALS._animationCtr == 0)) {
+		if (g_globals->_sceneManager._scene)
+			g_globals->_sceneObjects->draw();
+	}
 
 	// Check to see if any scene change is required
 	g_globals->_sceneManager.checkScene();
diff --git a/engines/tsage/ringworld2/ringworld2_logic.cpp b/engines/tsage/ringworld2/ringworld2_logic.cpp
index 3c5530f..e5e932b 100644
--- a/engines/tsage/ringworld2/ringworld2_logic.cpp
+++ b/engines/tsage/ringworld2/ringworld2_logic.cpp
@@ -1551,8 +1551,9 @@ void Scene1200::sub9DAD6(int indx) {
 
 /*--------------------------------------------------------------------------*/
 
-void AnimationSplice::load(Common::File &f) {
-	_spliceOffset = f.readUint32LE();
+void AnimationSlice::load(Common::File &f) {
+	f.skip(2);
+	_sliceOffset = f.readUint16LE();
 	f.skip(6);
 	_drawMode = f.readByte();
 	_secondaryIndex = f.readByte();
@@ -1560,30 +1561,30 @@ void AnimationSplice::load(Common::File &f) {
 
 /*--------------------------------------------------------------------------*/
 
-AnimationSplices::AnimationSplices() {
+AnimationSlices::AnimationSlices() {
 	_pixelData = NULL;
 }
 
-AnimationSplices::~AnimationSplices() {
+AnimationSlices::~AnimationSlices() {
 	delete[] _pixelData;
 }
 
-void AnimationSplices::load(Common::File &f) {
+void AnimationSlices::load(Common::File &f) {
 	f.skip(4);
 	_dataSize = f.readUint32LE();
 	f.skip(8);
 	_dataSize2 = f.readUint32LE();
 	f.skip(28);
 
-	// Load the four splice indexes
+	// Load the four slice indexes
 	for (int idx = 0; idx < 4; ++idx)
-		_splices[idx].load(f);
+		_slices[idx].load(f);
 }
 
-int AnimationSplices::loadPixels(Common::File &f, int splicesSize) {
+int AnimationSlices::loadPixels(Common::File &f, int slicesSize) {
 	delete[] _pixelData;
-	_pixelData = new byte[splicesSize];
-	return f.read(_pixelData, splicesSize);
+	_pixelData = new byte[slicesSize];
+	return f.read(_pixelData, slicesSize);
 }
 
 /*--------------------------------------------------------------------------*/
@@ -1592,8 +1593,7 @@ void AnimationPlayerSubData::load(Common::File &f) {
 	uint32 posStart = f.pos();
 
 	f.skip(6);
-	_field6 = f.readUint16LE();
-	f.skip(2);
+	_duration = f.readUint32LE();
 	_fieldA = f.readUint16LE();
 	_fieldC = f.readUint16LE();
 	_fieldE = f.readUint16LE();
@@ -1607,7 +1607,7 @@ void AnimationPlayerSubData::load(Common::File &f) {
 	f.read(_palData, 768);
 	_field320 = f.readSint32LE();
 	f.skip(12);
-	_splices.load(f);
+	_slices.load(f);
 
 	uint32 posEnd = f.pos();
 	assert((posEnd - posStart) == 0x390);
@@ -1631,7 +1631,7 @@ AnimationPlayer::AnimationPlayer(): EventHandler() {
 }
 
 AnimationPlayer::~AnimationPlayer() {
-	if (!method3())
+	if (!isCompleted())
 		close();
 }
 
@@ -1650,7 +1650,7 @@ void AnimationPlayer::remove() {
 void AnimationPlayer::process(Event &event) {
 	if ((event.eventType == EVENT_KEYPRESS) && (event.kbd.keycode == Common::KEYCODE_ESCAPE) &&
 			(_field3A)) {
-		_field90C = _subData._field6;
+		_position = _subData._duration;
 	}
 }
 
@@ -1661,10 +1661,10 @@ void AnimationPlayer::dispatch() {
 	if (gameDiff >= _field910) {
 		drawFrame(_field904 % _subData._fieldC);
 		++_field904;
-		_field90C = _field904 / _subData._fieldC;
+		_position = _field904 / _subData._fieldC;
 
-		if (_field90C == _field90E)
-			method2();
+		if (_position == _field90E)
+			nextSlices();
 
 		_field908 = _field904;
 		_gameFrame = gameFrame;
@@ -1717,14 +1717,14 @@ bool AnimationPlayer::load(int animId, Action *endAction) {
 		_sliceNext = _animData2;
 	}
 
-	_field90C = 0;
+	_position = 0;
 	_field90E = 1;
 
-	// Load up the first splices set
-	_sliceCurrent->_dataSize = _subData._splices._dataSize;
-	_sliceCurrent->_splices = _subData._splices;
-	int splicesSize = _sliceCurrent->_dataSize - 96;
-	int readSize = _sliceCurrent->_splices.loadPixels(_resourceFile, splicesSize);
+	// Load up the first slices set
+	_sliceCurrent->_dataSize = _subData._slices._dataSize;
+	_sliceCurrent->_slices = _subData._slices;
+	int slicesSize = _sliceCurrent->_dataSize - 96;
+	int readSize = _sliceCurrent->_slices.loadPixels(_resourceFile, slicesSize);
 	_sliceCurrent->_animSlicesSize = readSize + 96;
 
 	if (_sliceNext != _sliceCurrent) {
@@ -1764,12 +1764,12 @@ bool AnimationPlayer::load(int animId, Action *endAction) {
 	return true;
 }
 
-void AnimationPlayer::drawFrame(int spliceIndex) {
-	assert(spliceIndex < 4);
-	AnimationSplices &splices = _sliceCurrent->_splices;
-	AnimationSplice &splice = _sliceCurrent->_splices._splices[spliceIndex];
+void AnimationPlayer::drawFrame(int sliceIndex) {
+	assert(sliceIndex < 4);
+	AnimationSlices &slices = _sliceCurrent->_slices;
+	AnimationSlice &slice = _sliceCurrent->_slices._slices[sliceIndex];
 
-	byte *sliceDataStart = &splices._pixelData[splice._spliceOffset];
+	byte *sliceDataStart = &slices._pixelData[slice._sliceOffset - 96];
 	byte *sliceData1 = sliceDataStart;
 
 	Rect playerBounds = _screenBounds;
@@ -1779,7 +1779,7 @@ void AnimationPlayer::drawFrame(int spliceIndex) {
 	Graphics::Surface surface = R2_GLOBALS._screenSurface.lockSurface();
 
 	// Handle different drawing modes
-	switch (splice._drawMode) {
+	switch (slice._drawMode) {
 	case 0:
 		// Draw from uncompressed source
 		for (int sliceNum = 0; sliceNum < _subData._ySlices; ++sliceNum) {
@@ -1795,18 +1795,19 @@ void AnimationPlayer::drawFrame(int spliceIndex) {
 		break;
 
 	case 1:
-		switch (splice._secondaryIndex) {
+		switch (slice._secondaryIndex) {
 		case 0xfe:
 			// Draw from uncompressed source with optional skipped rows
 			for (int sliceNum = 0; sliceNum < _subData._ySlices; ++sliceNum) {
-				for (int yIndex = 0; yIndex < _sliceHeight; ++yIndex) {
+				for (int yIndex = 0; yIndex < _sliceHeight; ++yIndex, playerBounds.top++) {
 					int offset = READ_LE_UINT16(sliceData1 + sliceNum * 2);
 
 					if (offset) {
 						const byte *pSrc = (const byte *)sliceDataStart + offset;
-						byte *pDest = (byte *)surface.getBasePtr(playerBounds.left, y++);
+						byte *pDest = (byte *)surface.getBasePtr(playerBounds.left, playerBounds.top);
 
-						Common::copy(pSrc, pSrc + _subData._sliceSize, pDest);
+						//Common::copy(pSrc, pSrc + playerBounds.width(), pDest);
+						rleDecode(pSrc, pDest, playerBounds.width());
 					}
 				}
 			}
@@ -1814,20 +1815,20 @@ void AnimationPlayer::drawFrame(int spliceIndex) {
 		case 0xff:
 			// Draw from RLE compressed source
 			for (int sliceNum = 0; sliceNum < _subData._ySlices; ++sliceNum) {
-				for (int yIndex = 0; yIndex < _sliceHeight; ++yIndex) {
+				for (int yIndex = 0; yIndex < _sliceHeight; ++yIndex, playerBounds.top++) {
 					// TODO: Check of _subData._fieldE was done for two different kinds of
 					// line slice drawing in original
 					const byte *pSrc = (const byte *)sliceDataStart + READ_LE_UINT16(sliceData1 + sliceNum * 2);
-					byte *pDest = (byte *)surface.getBasePtr(playerBounds.left, y++);
+					byte *pDest = (byte *)surface.getBasePtr(playerBounds.left, playerBounds.top);
 
 					rleDecode(pSrc, pDest, _subData._sliceSize);
 				}
 			}
 			break;
 		default: {
-			// Draw from two splice sets simultaneously
-			AnimationSplice &splice2 = _sliceCurrent->_splices._splices[splice._secondaryIndex];
-			byte *sliceData2 = &splices._pixelData[splice2._spliceOffset];
+			// Draw from two slice sets simultaneously
+			AnimationSlice &slice2 = _sliceCurrent->_slices._slices[slice._secondaryIndex];
+			byte *sliceData2 = &slices._pixelData[slice2._sliceOffset - 96];
 
 			for (int sliceNum = 0; sliceNum < _subData._ySlices; ++sliceNum) {
 				for (int yIndex = 0; yIndex < _sliceHeight; ++yIndex) {
@@ -1835,7 +1836,7 @@ void AnimationPlayer::drawFrame(int spliceIndex) {
 					const byte *pSrc2 = (const byte *)sliceDataStart + READ_LE_UINT16(sliceData1 + sliceNum * 2);
 					byte *pDest = (byte *)surface.getBasePtr(playerBounds.left, y++);
 
-					if (splice2._drawMode == 0) {
+					if (slice2._drawMode == 0) {
 						// Uncompressed background, foreground compressed
 						Common::copy(pSrc1, pSrc1 + _subData._sliceSize, pDest);
 						rleDecode(pSrc2, pDest, _subData._sliceSize);
@@ -1852,29 +1853,41 @@ void AnimationPlayer::drawFrame(int spliceIndex) {
 	default:
 		break;
 	}
+
+	if (_field56 == 42) {
+		_screenBounds.expandPanes();
+		R2_GLOBALS._sceneObjects->draw();
+	} else {
+		if (R2_GLOBALS._sceneManager._hasPalette)
+			R2_GLOBALS._scenePalette.refresh();
+	}
 }
 
-void AnimationPlayer::method2() {
-	_field90C = _field90E++;
-	_field904 = _field90C * _subData._fieldC;
+/**
+ * Read the next frame's slice set
+ */
+void AnimationPlayer::nextSlices() {
+	_position = _field90E++;
+	_field904 = _position * _subData._fieldC;
 	_field908 = _field904 - 1;
 
 	if (_sliceNext == _sliceCurrent) {
-		int dataSize = _sliceCurrent->_splices._dataSize2;
+		int dataSize = _sliceCurrent->_slices._dataSize2;
 		_sliceCurrent->_dataSize = dataSize;
+		debugC(1, ktSageDebugGraphics, "Next frame size = %xh", dataSize);
 
 		dataSize -= 96;
 		assert(dataSize >= 0);
-		_sliceCurrent->_splices.load(_resourceFile);
-		_sliceCurrent->_animSlicesSize = _sliceCurrent->_splices.loadPixels(_resourceFile, dataSize);
+		_sliceCurrent->_slices.load(_resourceFile);
+		_sliceCurrent->_animSlicesSize = _sliceCurrent->_slices.loadPixels(_resourceFile, dataSize);
 	} else {
 		SWAP(_sliceCurrent, _sliceNext);
 		getSlices();
 	}
 }
 
-bool AnimationPlayer::method3() {
-	return (_field90C >= _subData._field6);
+bool AnimationPlayer::isCompleted() {
+	return (_position >= _subData._duration);
 }
 
 void AnimationPlayer::close() {
@@ -1940,15 +1953,15 @@ void AnimationPlayer::getSlices() {
 	assert((_sliceNext == _animData1) || (_sliceNext == _animData2));
 	assert((_sliceCurrent == _animData1) || (_sliceCurrent == _animData2));
 
-	_sliceNext->_dataSize = _sliceCurrent->_splices._dataSize2;
+	_sliceNext->_dataSize = _sliceCurrent->_slices._dataSize2;
 	if (_sliceNext->_dataSize) {
 		if (_sliceNext->_dataSize >= _dataNeeded)
 			error("Bogus dataNeeded == %d / %d", _sliceNext->_dataSize, _dataNeeded);
 	}
 
 	int dataSize = _sliceNext->_dataSize - 96;
-	_sliceNext->_splices.load(_resourceFile);
-	_sliceNext->_animSlicesSize = _sliceNext->_splices.loadPixels(_resourceFile, dataSize);
+	_sliceNext->_slices.load(_resourceFile);
+	_sliceNext->_animSlicesSize = _sliceNext->_slices.loadPixels(_resourceFile, dataSize);
 }
 
 /*--------------------------------------------------------------------------*/
diff --git a/engines/tsage/ringworld2/ringworld2_logic.h b/engines/tsage/ringworld2/ringworld2_logic.h
index 6100efc..d582370 100644
--- a/engines/tsage/ringworld2/ringworld2_logic.h
+++ b/engines/tsage/ringworld2/ringworld2_logic.h
@@ -327,32 +327,32 @@ public:
 
 /*--------------------------------------------------------------------------*/
 
-class AnimationSplice {
+class AnimationSlice {
 public:
-	int _spliceOffset;
+	int _sliceOffset;
 	int _drawMode;
 	int _secondaryIndex;
 public:
 	void load(Common::File &f);
 };
 
-class AnimationSplices {
+class AnimationSlices {
 public:
 	int _dataSize;
 	int _dataSize2;
-	AnimationSplice _splices[4];
+	AnimationSlice _slices[4];
 	byte *_pixelData;
 public:
-	AnimationSplices();
-	~AnimationSplices();
+	AnimationSlices();
+	~AnimationSlices();
 
 	void load(Common::File &f);
-	int loadPixels(Common::File &f, int splicesSize);
+	int loadPixels(Common::File &f, int slicesSize);
 };
 
 class AnimationPlayerSubData {
 public:
-	int _field6;
+	int _duration;
 	int _fieldA;
 	int _fieldC;
 	int _fieldE;
@@ -363,14 +363,14 @@ public:
 	int _palSize;
 	byte _palData[256 * 3];
 	int32 _field320;
-	AnimationSplices _splices;
+	AnimationSlices _slices;
 public:
 	void load(Common::File &f);
 };
 
 class AnimationData {
 public:
-	AnimationSplices _splices;
+	AnimationSlices _slices;
 	int _dataSize;
 	int _animSlicesSize;
 };
@@ -379,8 +379,8 @@ class AnimationPlayer: public EventHandler {
 private:
 	void rleDecode(const byte *pSrc, byte *pDest, int size);
 
-	void drawFrame(int spliceIndex);
-	void method2();
+	void drawFrame(int sliceIndex);
+	void nextSlices();
 	void getSlices();
 public:
 	AnimationData *_animData1, *_animData2;
@@ -399,7 +399,7 @@ public:
 	int _dataNeeded;
 	int _field904;
 	int _field908;
-	int _field90C;
+	int _position;
 	int _field90E;
 	uint _field910;
 	uint32 _gameFrame;
@@ -416,7 +416,7 @@ public:
 	virtual void closing() {}
 
 	bool load(int animId, Action *endAction = NULL);
-	bool method3();
+	bool isCompleted();
 	void close();
 };
 
diff --git a/engines/tsage/ringworld2/ringworld2_scenes0.cpp b/engines/tsage/ringworld2/ringworld2_scenes0.cpp
index 292e9c2..460646c 100644
--- a/engines/tsage/ringworld2/ringworld2_scenes0.cpp
+++ b/engines/tsage/ringworld2/ringworld2_scenes0.cpp
@@ -1898,7 +1898,7 @@ void Scene180::dispatch() {
 	}
 
 	if (_animationPlayer._v) {
-		if (_animationPlayer.method3()) {
+		if (_animationPlayer.isCompleted()) {
 			_animationPlayer._v = 0;
 			_animationPlayer.close();
 			_animationPlayer.remove();


Commit: 46c590940aa8ca02075a81990b854014781c5e04
    https://github.com/scummvm/scummvm/commit/46c590940aa8ca02075a81990b854014781c5e04
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2012-02-27T03:29:16-08:00

Commit Message:
TSAGE: Renamed many of the unknown fields in the R2R Animation Player

Changed paths:
    engines/tsage/ringworld2/ringworld2_logic.cpp
    engines/tsage/ringworld2/ringworld2_logic.h



diff --git a/engines/tsage/ringworld2/ringworld2_logic.cpp b/engines/tsage/ringworld2/ringworld2_logic.cpp
index e5e932b..582458a 100644
--- a/engines/tsage/ringworld2/ringworld2_logic.cpp
+++ b/engines/tsage/ringworld2/ringworld2_logic.cpp
@@ -1594,18 +1594,18 @@ void AnimationPlayerSubData::load(Common::File &f) {
 
 	f.skip(6);
 	_duration = f.readUint32LE();
-	_fieldA = f.readUint16LE();
-	_fieldC = f.readUint16LE();
-	_fieldE = f.readUint16LE();
+	_frameRate = f.readUint16LE();
+	_framesPerSlices = f.readUint16LE();
+	_drawType = f.readUint16LE();
 	f.skip(2);
 	_sliceSize = f.readUint16LE();
 	_ySlices = f.readUint16LE();
-	_field16 = f.readUint16LE();
-	f.skip(4);
+	_field16 = f.readUint32LE();
+	f.skip(2);
 	_palStart = f.readUint16LE();
 	_palSize = f.readUint16LE();
 	f.read(_palData, 768);
-	_field320 = f.readSint32LE();
+	_totalSize = f.readSint32LE();
 	f.skip(12);
 	_slices.load(f);
 
@@ -1650,6 +1650,7 @@ void AnimationPlayer::remove() {
 void AnimationPlayer::process(Event &event) {
 	if ((event.eventType == EVENT_KEYPRESS) && (event.kbd.keycode == Common::KEYCODE_ESCAPE) &&
 			(_field3A)) {
+		// Move the current position to the end
 		_position = _subData._duration;
 	}
 }
@@ -1658,15 +1659,15 @@ void AnimationPlayer::dispatch() {
 	uint32 gameFrame = R2_GLOBALS._events.getFrameNumber();
 	uint32 gameDiff = (gameFrame > _gameFrame) ? gameFrame - _gameFrame : _gameFrame - gameFrame;
 
-	if (gameDiff >= _field910) {
-		drawFrame(_field904 % _subData._fieldC);
-		++_field904;
-		_position = _field904 / _subData._fieldC;
+	if (gameDiff >= _frameDelay) {
+		drawFrame(_playbackTick % _subData._framesPerSlices);
+		++_playbackTick;
+		_position = _playbackTick / _subData._framesPerSlices;
 
-		if (_position == _field90E)
+		if (_position == _ticksPerSlices)
 			nextSlices();
 
-		_field908 = _field904;
+		_playbackTickPrior = _playbackTick;
 		_gameFrame = gameFrame;
 	}
 }
@@ -1691,16 +1692,16 @@ bool AnimationPlayer::load(int animId, Action *endAction) {
 	_subData.load(_resourceFile);
 
 	// Set other properties
-	_field908 = -1;
-	_field904 = 0;
-	_field910 = 60 / _subData._fieldA;
-	_gameFrame = R2_GLOBALS._events.getFrameNumber() - _field910;
+	_playbackTickPrior = -1;
+	_playbackTick = 0;
+	_frameDelay = 60 / _subData._frameRate;
+	_gameFrame = R2_GLOBALS._events.getFrameNumber() - _frameDelay;
 
-	if (_subData._field320) {
-		_dataNeeded = _subData._field320;
+	if (_subData._totalSize) {
+		_dataNeeded = _subData._totalSize;
 	} else {
-		int v = (_subData._sliceSize + 2) * _subData._ySlices * _subData._fieldC;
-		_dataNeeded = (_subData._field16 / _subData._fieldC) + v + 96;
+		int v = (_subData._sliceSize + 2) * _subData._ySlices * _subData._framesPerSlices;
+		_dataNeeded = (_subData._field16 / _subData._framesPerSlices) + v + 96;
 	}
 	
 	debugC(1, ktSageDebugGraphics, "Data needed %d", _dataNeeded);
@@ -1709,7 +1710,7 @@ bool AnimationPlayer::load(int animId, Action *endAction) {
 	_animData1 = new AnimationData();
 	_sliceCurrent = _animData1;
 
-	if (_subData._fieldC <= 1) {
+	if (_subData._framesPerSlices <= 1) {
 		_animData2 = NULL;
 		_sliceNext = _sliceCurrent;
 	} else {
@@ -1718,7 +1719,7 @@ bool AnimationPlayer::load(int animId, Action *endAction) {
 	}
 
 	_position = 0;
-	_field90E = 1;
+	_ticksPerSlices = 1;
 
 	// Load up the first slices set
 	_sliceCurrent->_dataSize = _subData._slices._dataSize;
@@ -1784,7 +1785,7 @@ void AnimationPlayer::drawFrame(int sliceIndex) {
 		// Draw from uncompressed source
 		for (int sliceNum = 0; sliceNum < _subData._ySlices; ++sliceNum) {
 			for (int yIndex = 0; yIndex < _sliceHeight; ++yIndex) {
-				// TODO: Check of _subData._fieldE was done for two different kinds of
+				// TODO: Check of _subData._drawType was done for two different kinds of
 				// line slice drawing in original
 				const byte *pSrc = (const byte *)sliceDataStart + READ_LE_UINT16(sliceData1 + sliceNum * 2);
 				byte *pDest = (byte *)surface.getBasePtr(playerBounds.left, y++);
@@ -1816,7 +1817,7 @@ void AnimationPlayer::drawFrame(int sliceIndex) {
 			// Draw from RLE compressed source
 			for (int sliceNum = 0; sliceNum < _subData._ySlices; ++sliceNum) {
 				for (int yIndex = 0; yIndex < _sliceHeight; ++yIndex, playerBounds.top++) {
-					// TODO: Check of _subData._fieldE was done for two different kinds of
+					// TODO: Check of _subData._drawType was done for two different kinds of
 					// line slice drawing in original
 					const byte *pSrc = (const byte *)sliceDataStart + READ_LE_UINT16(sliceData1 + sliceNum * 2);
 					byte *pDest = (byte *)surface.getBasePtr(playerBounds.left, playerBounds.top);
@@ -1867,14 +1868,16 @@ void AnimationPlayer::drawFrame(int sliceIndex) {
  * Read the next frame's slice set
  */
 void AnimationPlayer::nextSlices() {
-	_position = _field90E++;
-	_field904 = _position * _subData._fieldC;
-	_field908 = _field904 - 1;
+	_position = _ticksPerSlices++;
+	_playbackTick = _position * _subData._framesPerSlices;
+	_playbackTickPrior = _playbackTick - 1;
 
 	if (_sliceNext == _sliceCurrent) {
 		int dataSize = _sliceCurrent->_slices._dataSize2;
 		_sliceCurrent->_dataSize = dataSize;
 		debugC(1, ktSageDebugGraphics, "Next frame size = %xh", dataSize);
+		if (dataSize == 0)
+			return;
 
 		dataSize -= 96;
 		assert(dataSize >= 0);
diff --git a/engines/tsage/ringworld2/ringworld2_logic.h b/engines/tsage/ringworld2/ringworld2_logic.h
index d582370..3d2ffd9 100644
--- a/engines/tsage/ringworld2/ringworld2_logic.h
+++ b/engines/tsage/ringworld2/ringworld2_logic.h
@@ -353,16 +353,16 @@ public:
 class AnimationPlayerSubData {
 public:
 	int _duration;
-	int _fieldA;
-	int _fieldC;
-	int _fieldE;
+	int _frameRate;
+	int _framesPerSlices;
+	int _drawType;
 	int _sliceSize;
 	int _ySlices;
 	int _field16;
 	int _palStart;
 	int _palSize;
 	byte _palData[256 * 3];
-	int32 _field320;
+	int32 _totalSize;
 	AnimationSlices _slices;
 public:
 	void load(Common::File &f);
@@ -397,11 +397,11 @@ public:
 	AnimationPlayerSubData _subData;
 	Action *_endAction;
 	int _dataNeeded;
-	int _field904;
-	int _field908;
+	int _playbackTick;
+	int _playbackTickPrior;
 	int _position;
-	int _field90E;
-	uint _field910;
+	int _ticksPerSlices;
+	uint _frameDelay;
 	uint32 _gameFrame;
 public:
 	AnimationPlayer();


Commit: 15457452816ae9776bafd8ce7f51b893ea8afa49
    https://github.com/scummvm/scummvm/commit/15457452816ae9776bafd8ce7f51b893ea8afa49
Author: Alyssa Milburn (fuzzie at fuzzie.org)
Date: 2012-02-27T04:46:18-08:00

Commit Message:
ANDROID: Fix sed escaping in mkplugin.sh.
(cherry picked from commit a836eb2cff9e631eac3ae4a0abc9952bc869d1c3)

Changed paths:
    dists/android/mkplugin.sh



diff --git a/dists/android/mkplugin.sh b/dists/android/mkplugin.sh
index 1811fc0..1929a0f 100755
--- a/dists/android/mkplugin.sh
+++ b/dists/android/mkplugin.sh
@@ -11,6 +11,6 @@ TEMPLATE=$3
 PLUGIN_VERSION_CODE=$4
 TARGET=$5
 
-PLUGIN_DESC=`sed -n s/add_engine\s$PLUGIN_NAME\s\"\(.\+\)\"\s.*/\1/p` < $CONFIGURE
+PLUGIN_DESC=`sed -n "s/add_engine\s$PLUGIN_NAME\s\"\(.\+\)\"\s.*/\1/p"` < $CONFIGURE
 
 sed "s|@PLUGIN_NAME@|$PLUGIN_NAME|;s|@PLUGIN_VERSION_CODE@|$PLUGIN_VERSION_CODE|;s|@PLUGIN_DESC@|$PLUGIN_DESC|" < $TEMPLATE > $TARGET


Commit: b0f961924a856b71ebffdb834db122145c4c10e5
    https://github.com/scummvm/scummvm/commit/b0f961924a856b71ebffdb834db122145c4c10e5
Author: Tarek Soliman (tsoliman at scummvm.org)
Date: 2012-02-27T04:51:18-08:00

Commit Message:
ANDROID: Fix mkplugin.sh freezing with bash

dash apparently works fine

Changed paths:
    dists/android/mkplugin.sh



diff --git a/dists/android/mkplugin.sh b/dists/android/mkplugin.sh
index 1929a0f..30a7ef6 100755
--- a/dists/android/mkplugin.sh
+++ b/dists/android/mkplugin.sh
@@ -11,6 +11,6 @@ TEMPLATE=$3
 PLUGIN_VERSION_CODE=$4
 TARGET=$5
 
-PLUGIN_DESC=`sed -n "s/add_engine\s$PLUGIN_NAME\s\"\(.\+\)\"\s.*/\1/p"` < $CONFIGURE
+PLUGIN_DESC=`sed -n "s/add_engine\s$PLUGIN_NAME\s\"\(.\+\)\"\s.*/\1/p" < $CONFIGURE`
 
 sed "s|@PLUGIN_NAME@|$PLUGIN_NAME|;s|@PLUGIN_VERSION_CODE@|$PLUGIN_VERSION_CODE|;s|@PLUGIN_DESC@|$PLUGIN_DESC|" < $TEMPLATE > $TARGET






More information about the Scummvm-git-logs mailing list