[Scummvm-git-logs] scummvm master -> 450b882c8038c50f7cda93dbdc1e664083b2253e

elasota noreply at scummvm.org
Sat Feb 25 15:28:17 UTC 2023


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:
47c8a5f6a9 VCRUISE: Partially implement vertical pan check, fix off-by-one in right pan frame range
ab8b8ffbf9 VCRUISE: Reset interaction if the mouse moves from one interaction area directly to another
14f6ccae9b VCRUISE: Fix interaction leave. Only detect type 1 as clickable area. Stub VolumeDn3 opcode.
450b882c80 VCRUISE: Fix crash when facing animation requires rotating past the end of the animation


Commit: 47c8a5f6a9f39e92d3b301b2880d369cd8dbe49f
    https://github.com/scummvm/scummvm/commit/47c8a5f6a9f39e92d3b301b2880d369cd8dbe49f
Author: elasota (ejlasota at gmail.com)
Date: 2023-02-25T10:27:39-05:00

Commit Message:
VCRUISE: Partially implement vertical pan check, fix off-by-one in right pan frame range

Changed paths:
    engines/vcruise/runtime.cpp
    engines/vcruise/runtime.h


diff --git a/engines/vcruise/runtime.cpp b/engines/vcruise/runtime.cpp
index 610f62b0d35..b4ab86e4362 100644
--- a/engines/vcruise/runtime.cpp
+++ b/engines/vcruise/runtime.cpp
@@ -90,8 +90,11 @@ Runtime::Runtime(OSystem *system, Audio::Mixer *mixer, const Common::FSNode &roo
 	  _lmbDown(false), _lmbDragging(false), _lmbReleaseWasClick(false), _lmbDownTime(0),
 	  _panoramaState(kPanoramaStateInactive) {
 
-	for (uint i = 0; i < kNumDirections; i++)
+	for (uint i = 0; i < kNumDirections; i++) {
 		_haveIdleAnimations[i] = false;
+		_havePanUpFromDirection[i] = false;
+		_havePanDownFromDirection[i] = false;
+	}
 
 	for (uint i = 0; i < kPanCursorMaxCount; i++)
 		_panCursors[i] = 0;
@@ -776,6 +779,10 @@ void Runtime::changeToScreen(uint roomNumber, uint screenNumber) {
 		}
 
 		_havePanAnimations = false;
+		for (uint i = 0; i < kNumDirections; i++) {
+			_havePanUpFromDirection[i] = false;
+			_havePanDownFromDirection[i] = false;
+		}
 
 		for (uint i = 0; i < kNumDirections; i++)
 			_haveIdleAnimations[i] = false;
@@ -977,6 +984,8 @@ void Runtime::changeAnimation(const AnimationDef &animDef, bool consumeFPSOverri
 }
 
 void Runtime::changeAnimation(const AnimationDef &animDef, uint initialFrame, bool consumeFPSOverride) {
+	debug("changeAnimation: %u -> %u  Initial %u", animDef.firstFrame, animDef.lastFrame, initialFrame);
+
 	int animFile = animDef.animNum;
 	if (animFile < 0)
 		animFile = -animFile;
@@ -1400,7 +1409,7 @@ void Runtime::scriptOpAnimR(ScriptArg_t arg) {
 
 		debug(1, "Running frame loop of %u - %u from frame %u", trimmedAnimation.firstFrame, trimmedAnimation.lastFrame, initialFrame);
 
-		changeAnimation(_panRightAnimationDef, initialFrame, false);
+		changeAnimation(trimmedAnimation, initialFrame, false);
 		_gameState = kGameStatePanRight;
 
 		isRight = true;
@@ -1536,7 +1545,10 @@ void Runtime::scriptOpLMB(ScriptArg_t arg) {
 		terminateScript();
 }
 
-OPCODE_STUB(LMB1)
+void Runtime::scriptOpLMB1(ScriptArg_t arg) {
+	warning("LMB1 script op not implemented");
+}
+
 OPCODE_STUB(SoundS1)
 
 void Runtime::scriptOpSoundL2(ScriptArg_t arg) {
@@ -1566,15 +1578,43 @@ void Runtime::scriptOpMusicDn(ScriptArg_t arg) {
 	(void)stackArgs;
 }
 
+void Runtime::scriptOpParm1(ScriptArg_t arg) {
+	TAKE_STACK(3);
+
+	warning("Parm1 is not implemented");
+	(void)stackArgs;
+}
+
+void Runtime::scriptOpParm2(ScriptArg_t arg) {
+	TAKE_STACK(3);
+
+	warning("Parm2 is not implemented");
+	(void)stackArgs;
+}
+
+void Runtime::scriptOpParm3(ScriptArg_t arg) {
+	TAKE_STACK(3);
+
+	warning("Parm3 is not implemented");
+	(void)stackArgs;
+}
 
-OPCODE_STUB(Parm1)
-OPCODE_STUB(Parm2)
-OPCODE_STUB(Parm3)
 OPCODE_STUB(ParmG)
 
-OPCODE_STUB(VolumeDn4)
 OPCODE_STUB(VolumeUp3)
 
+void Runtime::scriptOpVolumeDn4(ScriptArg_t arg) {
+	TAKE_STACK(4);
+
+	// stackArgs[0] = sound ID
+	// stackArgs[1] = duration (in 10ths of second)
+	// stackArgs[2] = new volume
+	// stackArgs[3] = stop sound ramp-down completes
+
+	warning("FX volume ramp down is not implemented");
+	(void)stackArgs;
+}
+
 void Runtime::scriptOpRandom(ScriptArg_t arg) {
 	TAKE_STACK(1);
 
@@ -1602,11 +1642,67 @@ void Runtime::scriptOpSay3(ScriptArg_t arg) {
 	warning("Say3 opcode is not implemented yet");
 }
 
-OPCODE_STUB(SetTimer)
-OPCODE_STUB(LoSet)
-OPCODE_STUB(LoGet)
-OPCODE_STUB(HiSet)
-OPCODE_STUB(HiGet)
+void Runtime::scriptOpSetTimer(ScriptArg_t arg) {
+	TAKE_STACK(2);
+
+	_timers[static_cast<uint>(stackArgs[0])] = g_system->getMillis() + static_cast<uint32>(stackArgs[1]) * 1000u;
+}
+
+void Runtime::scriptOpLoSet(ScriptArg_t arg) {
+	scriptOpVerticalPanSet(_havePanDownFromDirection);
+}
+
+void Runtime::scriptOpLoGet(ScriptArg_t arg) {
+	scriptOpVerticalPanGet();
+}
+
+void Runtime::scriptOpHiSet(ScriptArg_t arg) {
+	scriptOpVerticalPanSet(_havePanUpFromDirection);
+}
+
+void Runtime::scriptOpHiGet(ScriptArg_t arg) {
+	scriptOpVerticalPanGet();
+}
+
+void Runtime::scriptOpVerticalPanSet(bool *flags) {
+	TAKE_STACK(2);
+
+	uint baseDirection = static_cast<uint>(stackArgs[0]) % kNumDirections;
+	uint radius = stackArgs[1];
+
+	flags[baseDirection] = true;
+
+	uint rDir = baseDirection;
+	uint lDir = baseDirection;
+	for (uint i = 1; i < radius; i++) {
+		rDir++;
+		if (rDir == kNumDirections)
+			rDir = 0;
+
+		if (lDir == 0)
+			lDir = kNumDirections;
+		lDir--;
+
+		flags[lDir] = true;
+		flags[rDir] = true;
+	}
+}
+
+void Runtime::scriptOpVerticalPanGet() {
+	TAKE_STACK(2);
+
+	// In any scenario where this is used, there is a corresponding hi/lo set and this only ever triggers off of interactions,
+	// so don't really even need to check anything other than the facing direction?
+	uint baseDirection = static_cast<uint>(stackArgs[0]) % kNumDirections;
+	uint radius = stackArgs[1];
+
+	uint rtDirection = (baseDirection + kNumDirections - _direction) % kNumDirections;
+	uint lfDirection = (_direction + kNumDirections - baseDirection) % kNumDirections;
+
+	bool isInRadius = (rtDirection <= radius || lfDirection <= radius);
+
+	_scriptStack.push_back(isInRadius ? 1 : 0);
+}
 
 void Runtime::scriptOpNot(ScriptArg_t arg) {
 	TAKE_STACK(1);
@@ -1707,7 +1803,23 @@ void Runtime::scriptOpAnimName(ScriptArg_t arg) {
 }
 
 
-OPCODE_STUB(ValueName)
+
+void Runtime::scriptOpValueName(ScriptArg_t arg) {
+	if (_roomNumber >= _roomDefs.size())
+		error("Invalid room number for var name op");
+
+	const RoomDef *roomDef = _roomDefs[_roomNumber].get();
+	if (!roomDef)
+		error("Room def doesn't exist");
+
+	const Common::String &varName = _scriptSet->strings[arg];
+
+	Common::HashMap<Common::String, StackValue_t>::const_iterator it = roomDef->values.find(varName);
+	if (it == roomDef->values.end())
+		error("Value '%s' doesn't exist in room %i", varName.c_str(), static_cast<int>(_roomNumber));
+
+	_scriptStack.push_back(it->_value);
+}
 
 void Runtime::scriptOpVarName(ScriptArg_t arg) {
 	if (_roomNumber >= _roomDefs.size())
diff --git a/engines/vcruise/runtime.h b/engines/vcruise/runtime.h
index 2e9bc43567c..8d97b86d6fb 100644
--- a/engines/vcruise/runtime.h
+++ b/engines/vcruise/runtime.h
@@ -333,6 +333,9 @@ private:
 	void scriptOpCheckValue(ScriptArg_t arg);
 	void scriptOpJump(ScriptArg_t arg);
 
+	void scriptOpVerticalPanSet(bool *flags);
+	void scriptOpVerticalPanGet();
+
 	Common::Array<Common::SharedPtr<Graphics::WinCursorGroup> > _cursors;		// Cursors indexed as CURSOR_CUR_##
 	Common::Array<Common::SharedPtr<Graphics::WinCursorGroup> > _cursorsShort;	// Cursors indexed as CURSOR_#
 
@@ -348,6 +351,8 @@ private:
 	AnimationDef _panLeftAnimationDef;
 	AnimationDef _panRightAnimationDef;
 	bool _havePanAnimations;
+	bool _havePanUpFromDirection[kNumDirections];
+	bool _havePanDownFromDirection[kNumDirections];
 
 	AnimationDef _idleAnimations[kNumDirections];
 	bool _haveIdleAnimations[kNumDirections];
@@ -355,6 +360,7 @@ private:
 	AnimationDef _postFacingAnimDef;
 
 	Common::HashMap<uint32, int32> _variables;
+	Common::HashMap<uint, uint32> _timers;
 
 	static const uint kPanLeftInteraction = 1;
 	static const uint kPanDownInteraction = 2;


Commit: ab8b8ffbf9768535aff8d9ab34d6c55b8c6891a1
    https://github.com/scummvm/scummvm/commit/ab8b8ffbf9768535aff8d9ab34d6c55b8c6891a1
Author: elasota (ejlasota at gmail.com)
Date: 2023-02-25T10:27:39-05:00

Commit Message:
VCRUISE: Reset interaction if the mouse moves from one interaction area directly to another

Changed paths:
    engines/vcruise/runtime.cpp


diff --git a/engines/vcruise/runtime.cpp b/engines/vcruise/runtime.cpp
index b4ab86e4362..b1152fa7a53 100644
--- a/engines/vcruise/runtime.cpp
+++ b/engines/vcruise/runtime.cpp
@@ -839,7 +839,12 @@ bool Runtime::dischargeIdleMouseMove() {
 			}
 		}
 
-		if (isOnInteraction && (_idleIsOnInteraction == false || interactionID != _idleInteractionID)) {
+		if (isOnInteraction && interactionID != _idleInteractionID) {
+			_idleIsOnInteraction = false;
+			changeToCursor(_cursors[kCursorArrow]);
+		}
+
+		if (isOnInteraction && _idleIsOnInteraction == false) {
 			_idleIsOnInteraction = true;
 			_idleInteractionID = interactionID;
 
@@ -850,9 +855,6 @@ bool Runtime::dischargeIdleMouseMove() {
 				activateScript(script, ScriptEnvironmentVars());
 				return true;
 			}
-		} else if (!isOnInteraction && _idleIsOnInteraction) {
-			_idleIsOnInteraction = false;
-			changeToCursor(_cursors[kCursorArrow]);
 		}
 	} else {
 		uint interactionID = 0;


Commit: 14f6ccae9bd78a6ab7e9c5857ef4798799f26b6e
    https://github.com/scummvm/scummvm/commit/14f6ccae9bd78a6ab7e9c5857ef4798799f26b6e
Author: elasota (ejlasota at gmail.com)
Date: 2023-02-25T10:27:39-05:00

Commit Message:
VCRUISE: Fix interaction leave. Only detect type 1 as clickable area. Stub VolumeDn3 opcode.

Changed paths:
    engines/vcruise/runtime.cpp


diff --git a/engines/vcruise/runtime.cpp b/engines/vcruise/runtime.cpp
index b1152fa7a53..fee985f6ae2 100644
--- a/engines/vcruise/runtime.cpp
+++ b/engines/vcruise/runtime.cpp
@@ -831,7 +831,7 @@ bool Runtime::dischargeIdleMouseMove() {
 		uint interactionID = 0;
 		if (sdDef) {
 			for (const InteractionDef &idef : sdDef->interactions) {
-				if (idef.rect.contains(relMouse)) {
+				if (idef.objectType == 1 && idef.rect.contains(relMouse)) {
 					isOnInteraction = true;
 					interactionID = idef.interactionID;
 					break;
@@ -839,7 +839,8 @@ bool Runtime::dischargeIdleMouseMove() {
 			}
 		}
 
-		if (isOnInteraction && interactionID != _idleInteractionID) {
+		if (_idleIsOnInteraction && (!isOnInteraction || interactionID != _idleInteractionID)) {
+			// Mouse left the previous interaction
 			_idleIsOnInteraction = false;
 			changeToCursor(_cursors[kCursorArrow]);
 		}
@@ -1163,7 +1164,7 @@ void Runtime::drawDebugOverlay() {
 		for (const InteractionDef &idef : sdDef->interactions) {
 			Common::Rect rect = idef.rect;
 
-			Common::String label = Common::String::format("0%x", static_cast<int>(idef.interactionID));
+			Common::String label = Common::String::format("0%x %i", static_cast<int>(idef.interactionID), static_cast<int>(idef.objectType));
 
 			Graphics::ManagedSurface *surf = _gameDebugBackBuffer.surf.get();
 
@@ -1603,7 +1604,16 @@ void Runtime::scriptOpParm3(ScriptArg_t arg) {
 
 OPCODE_STUB(ParmG)
 
-OPCODE_STUB(VolumeUp3)
+void Runtime::scriptOpVolumeUp3(ScriptArg_t arg) {
+	TAKE_STACK(3);
+
+	// stackArgs[0] = sound ID
+	// stackArgs[1] = duration (in 10ths of second)
+	// stackArgs[2] = new volume
+
+	warning("FX volume ramp up is not implemented");
+	(void)stackArgs;
+}
 
 void Runtime::scriptOpVolumeDn4(ScriptArg_t arg) {
 	TAKE_STACK(4);


Commit: 450b882c8038c50f7cda93dbdc1e664083b2253e
    https://github.com/scummvm/scummvm/commit/450b882c8038c50f7cda93dbdc1e664083b2253e
Author: elasota (ejlasota at gmail.com)
Date: 2023-02-25T10:27:40-05:00

Commit Message:
VCRUISE: Fix crash when facing animation requires rotating past the end of the animation

Changed paths:
    engines/vcruise/runtime.cpp
    engines/vcruise/runtime.h


diff --git a/engines/vcruise/runtime.cpp b/engines/vcruise/runtime.cpp
index fee985f6ae2..31e15b3c17f 100644
--- a/engines/vcruise/runtime.cpp
+++ b/engines/vcruise/runtime.cpp
@@ -85,7 +85,8 @@ Runtime::Runtime(OSystem *system, Audio::Mixer *mixer, const Common::FSNode &roo
 	: _system(system), _mixer(mixer), _roomNumber(1), _screenNumber(0), _direction(0), _havePanAnimations(0), _loadedRoomNumber(0), _activeScreenNumber(0),
 	  _gameState(kGameStateBoot), _gameID(gameID), _havePendingScreenChange(false), _havePendingReturnToIdleState(false), _scriptNextInstruction(0),
 	  _escOn(false), _debugMode(false), _panoramaDirectionFlags(0),
-	  _loadedAnimation(0), _animPendingDecodeFrame(0), _animDisplayingFrame(0), _animFirstFrame(0), _animLastFrame(0), _animFrameRateLock(0), _animStartTime(0), _animFramesDecoded(0), _animDecoderState(kAnimDecoderStateStopped),
+	  _loadedAnimation(0), _animPendingDecodeFrame(0), _animDisplayingFrame(0), _animFirstFrame(0), _animLastFrame(0), _animStopFrame(0),
+	  _animFrameRateLock(0), _animStartTime(0), _animFramesDecoded(0), _animDecoderState(kAnimDecoderStateStopped),
 	  _animPlayWhileIdle(false), _idleIsOnInteraction(false), _idleInteractionID(0),
 	  _lmbDown(false), _lmbDragging(false), _lmbReleaseWasClick(false), _lmbDownTime(0),
 	  _panoramaState(kPanoramaStateInactive) {
@@ -252,7 +253,7 @@ bool Runtime::runIdle() {
 
 	if (_animPlayWhileIdle) {
 		bool animEnded = false;
-		continuePlayingAnimation(true, animEnded);
+		continuePlayingAnimation(true, false, animEnded);
 	}
 
 	if (_debugMode)
@@ -295,7 +296,7 @@ bool Runtime::runIdle() {
 
 bool Runtime::runHorizontalPan(bool isRight) {
 	bool animEnded = false;
-	continuePlayingAnimation(true, animEnded);
+	continuePlayingAnimation(true, false, animEnded);
 
 	Common::Point panRelMouse = _mousePos - _panoramaAnchor;
 
@@ -342,7 +343,7 @@ bool Runtime::runHorizontalPan(bool isRight) {
 
 bool Runtime::runWaitForAnimation() {
 	bool animEnded = false;
-	continuePlayingAnimation(false, animEnded);
+	continuePlayingAnimation(false, false, animEnded);
 
 	if (animEnded) {
 		_gameState = kGameStateScript;
@@ -371,7 +372,7 @@ bool Runtime::runWaitForAnimation() {
 
 bool Runtime::runWaitForFacing() {
 	bool animEnded = false;
-	continuePlayingAnimation(false, animEnded);
+	continuePlayingAnimation(true, true, animEnded);
 
 	if (animEnded) {
 		changeAnimation(_postFacingAnimDef, true);
@@ -383,7 +384,7 @@ bool Runtime::runWaitForFacing() {
 	return false;
 }
 
-void Runtime::continuePlayingAnimation(bool loop, bool &outAnimationEnded) {
+void Runtime::continuePlayingAnimation(bool loop, bool useStopFrame, bool &outAnimationEnded) {
 	outAnimationEnded = false;
 
 	if (!_animDecoder) {
@@ -442,6 +443,11 @@ void Runtime::continuePlayingAnimation(bool loop, bool &outAnimationEnded) {
 			_animPendingDecodeFrame = _animFirstFrame;
 		}
 
+		if (useStopFrame && _animPendingDecodeFrame == _animStopFrame) {
+			outAnimationEnded = true;
+			return;
+		}
+
 		debug(4, "Decoding animation frame %u", _animPendingDecodeFrame);
 
 		const Graphics::Surface *surface = _animDecoder->decodeNextFrame();
@@ -1238,7 +1244,7 @@ void Runtime::panoramaActivate() {
 	changeToCursor(_cursors[cursorID]);
 }
 
-bool Runtime::computeFaceDirectionAnimation(uint desiredDirection, AnimationDef &outAnimDef) {
+bool Runtime::computeFaceDirectionAnimation(uint desiredDirection, const AnimationDef *&outAnimDef, uint &outInitialFrame, uint &outStopFrame) {
 	if (_direction == desiredDirection)
 		return false;
 
@@ -1249,9 +1255,9 @@ bool Runtime::computeFaceDirectionAnimation(uint desiredDirection, AnimationDef
 		uint currentSlice = _direction;
 		uint desiredSlice = desiredDirection;
 
-		outAnimDef = _panRightAnimationDef;
-		outAnimDef.firstFrame = currentSlice * (_panRightAnimationDef.lastFrame - _panRightAnimationDef.firstFrame) / kNumDirections + _panRightAnimationDef.firstFrame;
-		outAnimDef.lastFrame = desiredSlice * (_panRightAnimationDef.lastFrame - _panRightAnimationDef.firstFrame) / kNumDirections + _panRightAnimationDef.firstFrame;
+		outAnimDef = &_panRightAnimationDef;
+		outInitialFrame = currentSlice * (_panRightAnimationDef.lastFrame - _panRightAnimationDef.firstFrame) / kNumDirections + _panRightAnimationDef.firstFrame;
+		outStopFrame = desiredSlice * (_panRightAnimationDef.lastFrame - _panRightAnimationDef.firstFrame) / kNumDirections + _panRightAnimationDef.firstFrame;
 	} else {
 		uint reverseCurrentSlice = (kNumDirections - _direction);
 		if (reverseCurrentSlice == kNumDirections)
@@ -1261,9 +1267,9 @@ bool Runtime::computeFaceDirectionAnimation(uint desiredDirection, AnimationDef
 		if (reverseDesiredSlice == kNumDirections)
 			reverseDesiredSlice = 0;
 
-		outAnimDef = _panLeftAnimationDef;
-		outAnimDef.firstFrame = reverseCurrentSlice * (_panLeftAnimationDef.lastFrame - _panLeftAnimationDef.firstFrame) / kNumDirections + _panLeftAnimationDef.firstFrame;
-		outAnimDef.lastFrame = reverseDesiredSlice * (_panLeftAnimationDef.lastFrame - _panLeftAnimationDef.firstFrame) / kNumDirections + _panLeftAnimationDef.firstFrame;
+		outAnimDef = &_panLeftAnimationDef;
+		outInitialFrame = reverseCurrentSlice * (_panLeftAnimationDef.lastFrame - _panLeftAnimationDef.firstFrame) / kNumDirections + _panLeftAnimationDef.firstFrame;
+		outStopFrame = reverseDesiredSlice * (_panLeftAnimationDef.lastFrame - _panLeftAnimationDef.firstFrame) / kNumDirections + _panLeftAnimationDef.firstFrame;
 	}
 
 	return true;
@@ -1381,7 +1387,16 @@ void Runtime::scriptOpSAnimL(ScriptArg_t arg) {
 	_idleAnimations[direction] = animDef;
 }
 
-OPCODE_STUB(ChangeL)
+void Runtime::scriptOpChangeL(ScriptArg_t arg) {
+	TAKE_STACK(1);
+
+	// Not actually sure what this does.  It usually occurs coincident with rotation interactions and animR ops.
+	// Might change the screen number?  Usually seems to change the screen number to the current screen or to the
+	// one being transitioned to.  Need more investigation.
+
+	warning("ChangeL opcode not implemented");
+	(void)stackArgs;
+}
 
 void Runtime::scriptOpAnimR(ScriptArg_t arg) {
 	bool isRight = false;
@@ -1445,10 +1460,13 @@ void Runtime::scriptOpAnimF(ScriptArg_t arg) {
 
 	AnimationDef animDef = stackArgsToAnimDef(stackArgs + 0);
 
-	AnimationDef faceDirectionAnimDef;
-	if (computeFaceDirectionAnimation(stackArgs[kAnimDefStackArgs + 2], faceDirectionAnimDef)) {
+	const AnimationDef *faceDirectionAnimDef = nullptr;
+	uint initialFrame = 0;
+	uint stopFrame = 0;
+	if (computeFaceDirectionAnimation(stackArgs[kAnimDefStackArgs + 2], faceDirectionAnimDef, initialFrame, stopFrame)) {
 		_postFacingAnimDef = animDef;
-		changeAnimation(faceDirectionAnimDef, false);
+		_animStopFrame = stopFrame;
+		changeAnimation(*faceDirectionAnimDef, initialFrame, false);
 		_gameState = kGameStateWaitingForFacing;
 	} else {
 		changeAnimation(animDef, true);
diff --git a/engines/vcruise/runtime.h b/engines/vcruise/runtime.h
index 8d97b86d6fb..6570b73eb95 100644
--- a/engines/vcruise/runtime.h
+++ b/engines/vcruise/runtime.h
@@ -221,7 +221,7 @@ private:
 	bool runScript();
 	bool runWaitForAnimation();
 	bool runWaitForFacing();
-	void continuePlayingAnimation(bool loop, bool &outEndedAnimation);
+	void continuePlayingAnimation(bool loop, bool useStopFrame, bool &outEndedAnimation);
 	void drawSectionToScreen(const RenderSection &section, const Common::Rect &rect);
 	void commitSectionToScreen(const RenderSection &section, const Common::Rect &rect);
 	void terminateScript();
@@ -258,7 +258,7 @@ private:
 	void detectPanoramaMouseMovement();
 	void panoramaActivate();
 
-	bool computeFaceDirectionAnimation(uint desiredDirection, AnimationDef &outAnimDef);
+	bool computeFaceDirectionAnimation(uint desiredDirection, const AnimationDef *&outAnimDef, uint &outInitialFrame, uint &outStopFrame);
 
 	// Script things
 	void scriptOpNumber(ScriptArg_t arg);
@@ -404,6 +404,7 @@ private:
 	uint _animDisplayingFrame;
 	uint _animFirstFrame;
 	uint _animLastFrame;
+	uint _animStopFrame;
 	uint _animFrameRateLock;
 	uint32 _animStartTime;
 	uint32 _animFramesDecoded;




More information about the Scummvm-git-logs mailing list