[Scummvm-git-logs] scummvm master -> d211530d10bbb30cb9fa42c437d899339f25ca9a

elasota noreply at scummvm.org
Fri Feb 24 23:38:47 UTC 2023


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

Summary:
1ca6b500c1 VCRUISE: Remove subengines, throw warnings or errors when media codecs are missing.
c3ffe93ee4 AUDIO: Mark V-cruise as using Vorbis
5d1a0bce78 IMAGE: Mark V-Cruise as using JPEG
f21ea7ba3e VCRUISE: Update warning messages to just use message dialogs so they don't change the window title to "Error"
d211530d10 VCRUISE: Implement AnimF opcode and pan cursors.


Commit: 1ca6b500c17269013c184d0dcd175a413100513a
    https://github.com/scummvm/scummvm/commit/1ca6b500c17269013c184d0dcd175a413100513a
Author: elasota (ejlasota at gmail.com)
Date: 2023-02-24T18:22:35-05:00

Commit Message:
VCRUISE: Remove subengines, throw warnings or errors when media codecs are missing.

Changed paths:
    engines/vcruise/POTFILES
    engines/vcruise/configure.engine
    engines/vcruise/detection.h
    engines/vcruise/detection_tables.h
    engines/vcruise/vcruise.cpp


diff --git a/engines/vcruise/POTFILES b/engines/vcruise/POTFILES
index bb49b390af7..e62f9068bc3 100644
--- a/engines/vcruise/POTFILES
+++ b/engines/vcruise/POTFILES
@@ -1 +1,2 @@
 engines/vcruise/metaengine.cpp
+engines/vcruise/vcruise.cpp
diff --git a/engines/vcruise/configure.engine b/engines/vcruise/configure.engine
index 2a9c2384f8e..5e9c125583f 100644
--- a/engines/vcruise/configure.engine
+++ b/engines/vcruise/configure.engine
@@ -1,4 +1,3 @@
 # This file is included from the main "configure" script
 # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
-add_engine vcruise "V-Cruise" no "schizm" "" "16bit highres mad"
-add_engine schizm "Schizm" no "" "" "16bit highres mad jpeg"
+add_engine vcruise "V-Cruise" no "" "" "16bit highres"
diff --git a/engines/vcruise/detection.h b/engines/vcruise/detection.h
index 373ba7a482b..3afaf23afc1 100644
--- a/engines/vcruise/detection.h
+++ b/engines/vcruise/detection.h
@@ -33,6 +33,12 @@ enum VCruiseGameID {
 	GID_SCHIZM	= 2,
 };
 
+enum VCruiseGameFlag {
+	VCRUISE_GF_WANT_MP3			= (1 << 0),
+	VCRUISE_GF_WANT_OGG_VORBIS	= (1 << 1),
+	VCRUISE_GF_NEED_JPEG		= (1 << 2),
+};
+
 struct VCruiseGameDescription {
 	ADGameDescription desc;
 
diff --git a/engines/vcruise/detection_tables.h b/engines/vcruise/detection_tables.h
index 2a3929c6ba8..6e1007b6d37 100644
--- a/engines/vcruise/detection_tables.h
+++ b/engines/vcruise/detection_tables.h
@@ -37,7 +37,7 @@ static const VCruiseGameDescription gameDescriptions[] = {
 			AD_ENTRY1s("Reah.exe", "60ec19c53f1323cc7f0314f98d396283", 304128),
 			Common::EN_ANY,
 			Common::kPlatformWindows,
-			ADGF_UNSTABLE,
+			ADGF_UNSTABLE | VCRUISE_GF_WANT_MP3,
 			GUIO0()
 		},
 		GID_REAH,
@@ -61,7 +61,7 @@ static const VCruiseGameDescription gameDescriptions[] = {
 			AD_ENTRY1s("Schizm.exe", "296edd26d951c3bdc4d303c4c88b27cd", 364544),
 			Common::EN_ANY,
 			Common::kPlatformWindows,
-			ADGF_UNSTABLE,
+			ADGF_UNSTABLE | VCRUISE_GF_WANT_OGG_VORBIS | VCRUISE_GF_NEED_JPEG,
 			GUIO0()
 		},
 		GID_SCHIZM,
diff --git a/engines/vcruise/vcruise.cpp b/engines/vcruise/vcruise.cpp
index 117885e9d88..95bbb42d13e 100644
--- a/engines/vcruise/vcruise.cpp
+++ b/engines/vcruise/vcruise.cpp
@@ -25,6 +25,7 @@
 #include "common/events.h"
 #include "common/system.h"
 #include "common/algorithm.h"
+#include "common/translation.h"
 
 #include "vcruise/runtime.h"
 #include "vcruise/vcruise.h"
@@ -67,6 +68,24 @@ void VCruiseEngine::handleEvents() {
 Common::Error VCruiseEngine::run() {
 	Common::List<Graphics::PixelFormat> pixelFormats = _system->getSupportedFormats();
 
+#if !defined(USE_JPEG)
+	if (_gameDescription->desc.flags & VCRUISE_GF_NEED_JPEG) {
+		return Common::Error(Common::kUnknownError, _s("This game requires JPEG support, which was not compiled in."));
+	}
+#endif
+
+#if !defined(USE_OGG) || !defined(USE_VORBIS)
+	if (_gameDescription->desc.flags & VCRUISE_GF_WANT_OGG_VORBIS) {
+		GUIErrorMessage(_("Music for this game requires Ogg Vorbis support, which was not compiled in.  The game will still play, but will not have any music."));
+	}
+#endif
+
+#if !defined(USE_MAD)
+	if (_gameDescription->desc.flags & VCRUISE_GF_WANT_MP3) {
+		GUIErrorMessage(_("Music for this game requires MP3 support, which was not compiled in.  The game will still play, but will not have any music."));
+	}
+#endif
+
 	const Graphics::PixelFormat *fmt16_565 = nullptr;
 	const Graphics::PixelFormat *fmt16_555 = nullptr;
 	const Graphics::PixelFormat *fmt32 = nullptr;


Commit: c3ffe93ee4ef9008b238ab64483343b56aa25c38
    https://github.com/scummvm/scummvm/commit/c3ffe93ee4ef9008b238ab64483343b56aa25c38
Author: elasota (ejlasota at gmail.com)
Date: 2023-02-24T18:22:36-05:00

Commit Message:
AUDIO: Mark V-cruise as using Vorbis

Changed paths:
    audio/decoders/vorbis.h


diff --git a/audio/decoders/vorbis.h b/audio/decoders/vorbis.h
index b780cf7a2f3..120c7a6a4ee 100644
--- a/audio/decoders/vorbis.h
+++ b/audio/decoders/vorbis.h
@@ -34,6 +34,7 @@
  *  - sword25
  *  - touche
  *  - tucker
+ *  - vcruise
  *  - wintermute
  */
 


Commit: 5d1a0bce78888eff3eb0aeb7708926d246da8746
    https://github.com/scummvm/scummvm/commit/5d1a0bce78888eff3eb0aeb7708926d246da8746
Author: elasota (ejlasota at gmail.com)
Date: 2023-02-24T18:22:36-05:00

Commit Message:
IMAGE: Mark V-Cruise as using JPEG

Changed paths:
    image/jpeg.h


diff --git a/image/jpeg.h b/image/jpeg.h
index 6b84fd7fa92..9dcb46f899b 100644
--- a/image/jpeg.h
+++ b/image/jpeg.h
@@ -39,9 +39,10 @@ namespace Image {
  * @brief Decoder for JPEG images.
  *
  * Used in engines:
- * - Groovie
- * - Mohawk
- * - Wintermute
+ * - groovie
+ * - mohawk
+ * - vcruise
+ * - wintermute
  * @{
  */
 


Commit: f21ea7ba3e55f62c870600c21d5f918c423051f4
    https://github.com/scummvm/scummvm/commit/f21ea7ba3e55f62c870600c21d5f918c423051f4
Author: elasota (ejlasota at gmail.com)
Date: 2023-02-24T18:22:36-05:00

Commit Message:
VCRUISE: Update warning messages to just use message dialogs so they don't change the window title to "Error"

Changed paths:
    engines/vcruise/vcruise.cpp


diff --git a/engines/vcruise/vcruise.cpp b/engines/vcruise/vcruise.cpp
index 95bbb42d13e..c8bf0603390 100644
--- a/engines/vcruise/vcruise.cpp
+++ b/engines/vcruise/vcruise.cpp
@@ -27,6 +27,8 @@
 #include "common/algorithm.h"
 #include "common/translation.h"
 
+#include "gui/message.h"
+
 #include "vcruise/runtime.h"
 #include "vcruise/vcruise.h"
 
@@ -76,16 +78,26 @@ Common::Error VCruiseEngine::run() {
 
 #if !defined(USE_OGG) || !defined(USE_VORBIS)
 	if (_gameDescription->desc.flags & VCRUISE_GF_WANT_OGG_VORBIS) {
-		GUIErrorMessage(_("Music for this game requires Ogg Vorbis support, which was not compiled in.  The game will still play, but will not have any music."));
+		GUI::MessageDialog dialog(
+			_("Music for this game requires Ogg Vorbis support, which was not compiled in.\n"
+			  "The game will still play, but will not have any music."),
+			_("OK"));
+		dialog.runModal();
 	}
 #endif
 
 #if !defined(USE_MAD)
 	if (_gameDescription->desc.flags & VCRUISE_GF_WANT_MP3) {
-		GUIErrorMessage(_("Music for this game requires MP3 support, which was not compiled in.  The game will still play, but will not have any music."));
+		GUI::MessageDialog dialog(
+			_("Music for this game requires MP3 support, which was not compiled in.\n"
+			  "The game will still play, but will not have any music."),
+			_("OK"));
+		dialog.runModal();
 	}
 #endif
 
+	
+
 	const Graphics::PixelFormat *fmt16_565 = nullptr;
 	const Graphics::PixelFormat *fmt16_555 = nullptr;
 	const Graphics::PixelFormat *fmt32 = nullptr;


Commit: d211530d10bbb30cb9fa42c437d899339f25ca9a
    https://github.com/scummvm/scummvm/commit/d211530d10bbb30cb9fa42c437d899339f25ca9a
Author: elasota (ejlasota at gmail.com)
Date: 2023-02-24T18:22:36-05:00

Commit Message:
VCRUISE: Implement AnimF opcode and pan cursors.

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


diff --git a/engines/vcruise/runtime.cpp b/engines/vcruise/runtime.cpp
index fb5a02b1918..65ba88d0f56 100644
--- a/engines/vcruise/runtime.cpp
+++ b/engines/vcruise/runtime.cpp
@@ -91,6 +91,9 @@ Runtime::Runtime(OSystem *system, Audio::Mixer *mixer, const Common::FSNode &roo
 
 	for (uint i = 0; i < kNumDirections; i++)
 		_haveIdleAnimations[i] = false;
+
+	for (uint i = 0; i < kPanCursorMaxCount; i++)
+		_panCursors[i] = 0;
 }
 
 Runtime::~Runtime() {
@@ -143,6 +146,18 @@ void Runtime::loadCursors(const char *exeName) {
 		_namedCursors["CUR_PRZOD"] = 1;		// Przod = forward
 
 		// CUR_ZOSTAW is in the executable memory but appears to be unused
+
+		_panCursors[kPanCursorDraggableHoriz | kPanCursorDraggableUp] = 2;
+		_panCursors[kPanCursorDraggableHoriz | kPanCursorDraggableDown] = 3;
+		_panCursors[kPanCursorDraggableHoriz] = 4;
+		_panCursors[kPanCursorDraggableHoriz | kPanCursorDirectionRight] = 5;
+		_panCursors[kPanCursorDraggableHoriz | kPanCursorDirectionLeft] = 6;
+		_panCursors[kPanCursorDraggableUp] = 7;
+		_panCursors[kPanCursorDraggableDown] = 8;
+		_panCursors[kPanCursorDraggableUp | kPanCursorDirectionUp] = 9;
+		_panCursors[kPanCursorDraggableDown | kPanCursorDirectionDown] = 10;
+		_panCursors[kPanCursorDraggableUp | kPanCursorDraggableDown] = 11;
+		_panCursors[kPanCursorDraggableHoriz | kPanCursorDraggableUp | kPanCursorDraggableDown] = 12;
 	}
 }
 
@@ -178,6 +193,9 @@ bool Runtime::runFrame() {
 		case kGameStateWaitingForAnimation:
 			moreActions = runWaitForAnimation();
 			break;
+		case kGameStateWaitingForFacing:
+			moreActions = runWaitForFacing();
+			break;
 		default:
 			error("Unknown game state");
 			return false;
@@ -242,6 +260,26 @@ bool Runtime::runIdle() {
 			bool changedState = dischargeIdleMouseMove();
 			if (changedState)
 				return true;
+		} else if (osEvent.type == kOSEventTypeLButtonUp) {
+			PanoramaState oldPanoramaState = _panoramaState;
+			_panoramaState = kPanoramaStateInactive;
+			_idleIsOnInteraction = false;
+
+			if (_lmbReleaseWasClick) {
+				bool changedState = dischargeIdleClick();
+				if (changedState)
+					return true;
+			}
+
+			// If the released from panorama mode, pick up any interactions at the new mouse location, and change the mouse back
+			if (oldPanoramaState != kPanoramaStateInactive) {
+				debug(1, "Changing cursor to arrow due to panorama deactivation");
+				changeToCursor(_cursors[kCursorArrow]);
+
+				bool changedState = dischargeIdleMouseMove();
+				if (changedState)
+					return true;
+			}
 		}
 	}
 
@@ -325,6 +363,20 @@ bool Runtime::runWaitForAnimation() {
 	return false;
 }
 
+bool Runtime::runWaitForFacing() {
+	bool animEnded = false;
+	continuePlayingAnimation(false, animEnded);
+
+	if (animEnded) {
+		changeAnimation(_postFacingAnimDef);
+		_gameState = kGameStateWaitingForAnimation;
+		return true;
+	}
+
+	// Yield
+	return false;
+}
+
 void Runtime::continuePlayingAnimation(bool loop, bool &outAnimationEnded) {
 	outAnimationEnded = false;
 
@@ -525,7 +577,6 @@ void Runtime::terminateScript() {
 }
 
 void Runtime::startTerminatingHorizontalPan(bool isRight) {
-
 	// Figure out what slice this is.  The last frame is 1 less than usual.
 	uint slice = (_animDisplayingFrame - _animFirstFrame) * kNumDirections / (_animLastFrame - _animFirstFrame + 1);
 
@@ -719,12 +770,14 @@ void Runtime::returnToIdleState() {
 
 	_idleIsOnInteraction = false;
 
+	// Do this before detectPanoramaMouseMovement so continuous panorama keeps the correct cursor
+	changeToCursor(_cursors[kCursorArrow]);
+
 	detectPanoramaDirections();
 
 	_panoramaState = kPanoramaStateInactive;
 	detectPanoramaMouseMovement();
 
-	changeToCursor(_cursors[kCursorArrow]);
 	(void) dischargeIdleMouseMove();
 }
 
@@ -798,6 +851,40 @@ bool Runtime::dischargeIdleMouseMove() {
 	return false;
 }
 
+bool Runtime::dischargeIdleClick() {
+	const MapScreenDirectionDef *sdDef = _map.getScreenDirection(_screenNumber, _direction);
+
+	Common::Point relMouse(_mousePos.x - _gameSection.rect.left, _mousePos.y - _gameSection.rect.top);
+
+	bool isOnInteraction = false;
+	uint interactionID = 0;
+	if (sdDef) {
+		for (const InteractionDef &idef : sdDef->interactions) {
+			if (idef.rect.contains(relMouse)) {
+				isOnInteraction = true;
+				interactionID = idef.interactionID;
+				break;
+			}
+		}
+	}
+
+	if (isOnInteraction) {
+		// Interaction, is there a script?
+		Common::SharedPtr<Script> script = findScriptForInteraction(interactionID);
+
+		if (script) {
+			ScriptEnvironmentVars vars;
+			vars.lmb = true;
+
+			activateScript(script, vars);
+			return true;
+		}
+	}
+
+	// Didn't do anything
+	return false;
+}
+
 void Runtime::loadMap(Common::SeekableReadStream *stream) {
 	byte screenDefOffsets[MapDef::kNumScreens * kNumDirections * 4];
 
@@ -1090,7 +1177,52 @@ void Runtime::panoramaActivate() {
 	_panoramaState = kPanoramaStatePanningUncertainDirection;
 	_panoramaAnchor = _mousePos;
 
-	// TODO: Change mouse cursor
+	uint cursorID = 0;
+	if (_havePanAnimations) {
+		uint panCursor = 0;
+		if (_panoramaDirectionFlags & kPanoramaHorizFlags)
+			panCursor |= kPanCursorDraggableHoriz;
+		if (_panoramaDirectionFlags & kPanoramaUpFlag)
+			panCursor |= kPanCursorDraggableUp;
+		if (_panoramaDirectionFlags & kPanoramaUpFlag)
+			panCursor |= kPanCursorDraggableDown;
+
+		cursorID = _panCursors[panCursor];
+	}
+
+	debug(1, "Changing cursor to panorama cursor %u", cursorID);
+	changeToCursor(_cursors[cursorID]);
+}
+
+bool Runtime::computeFaceDirectionAnimation(uint desiredDirection, AnimationDef &outAnimDef) {
+	if (_direction == desiredDirection)
+		return false;
+
+	uint leftPanDistance = ((_direction + kNumDirections) - desiredDirection) % kNumDirections;
+	uint rightPanDistance = ((desiredDirection + kNumDirections) - _direction) % kNumDirections;
+
+	if (rightPanDistance <= leftPanDistance) {
+		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;
+	} else {
+		uint reverseCurrentSlice = (kNumDirections - _direction);
+		if (reverseCurrentSlice == kNumDirections)
+			reverseCurrentSlice = 0;
+
+		uint reverseDesiredSlice = (kNumDirections - desiredDirection);
+		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;
+	}
+
+	return true;
 }
 
 void Runtime::onLButtonDown(int16 x, int16 y) {
@@ -1203,6 +1335,8 @@ void Runtime::scriptOpSAnimL(ScriptArg_t arg) {
 OPCODE_STUB(ChangeL)
 
 void Runtime::scriptOpAnimR(ScriptArg_t arg) {
+	bool isRight = false;
+
 	if (_scriptEnv.panInteractionID == kPanLeftInteraction) {
 		debug(1, "Pan-left interaction from direction %u", _direction);
 
@@ -1231,10 +1365,53 @@ void Runtime::scriptOpAnimR(ScriptArg_t arg) {
 
 		changeAnimation(_panRightAnimationDef, initialFrame);
 		_gameState = kGameStatePanRight;
+
+		isRight = true;
+	}
+
+	
+	uint cursorID = 0;
+	if (_havePanAnimations) {
+		uint panCursor = 0;
+		if (_panoramaDirectionFlags & kPanoramaHorizFlags)
+			panCursor |= kPanCursorDraggableHoriz;
+		if (_panoramaDirectionFlags & kPanoramaUpFlag)
+			panCursor |= kPanCursorDraggableUp;
+		if (_panoramaDirectionFlags & kPanoramaUpFlag)
+			panCursor |= kPanCursorDraggableDown;
+
+		if (isRight)
+			panCursor |= kPanCursorDirectionRight;
+		else
+			panCursor |= kPanCursorDirectionLeft;
+
+		cursorID = _panCursors[panCursor];
 	}
+
+	changeToCursor(_cursors[cursorID]);
+}
+
+void Runtime::scriptOpAnimF(ScriptArg_t arg) {
+	TAKE_STACK(kAnimDefStackArgs + 3);
+
+	AnimationDef animDef = stackArgsToAnimDef(stackArgs + 0);
+
+	AnimationDef faceDirectionAnimDef;
+	if (computeFaceDirectionAnimation(stackArgs[kAnimDefStackArgs + 2], faceDirectionAnimDef)) {
+		_postFacingAnimDef = animDef;
+		changeAnimation(faceDirectionAnimDef);
+		_gameState = kGameStateWaitingForFacing;
+	} else {
+		changeAnimation(animDef);
+		_gameState = kGameStateWaitingForAnimation;
+	}
+	_screenNumber = stackArgs[kAnimDefStackArgs + 0];
+	_direction = stackArgs[kAnimDefStackArgs + 1];
+	_havePendingScreenChange = true;
+
+	changeToCursor(_cursors[kCursorArrow]);
 }
 
-OPCODE_STUB(AnimF)
 OPCODE_STUB(AnimN)
 OPCODE_STUB(AnimG)
 
@@ -1250,6 +1427,8 @@ void Runtime::scriptOpAnimS(ScriptArg_t arg) {
 	_screenNumber = stackArgs[kAnimDefStackArgs + 0];
 	_direction = stackArgs[kAnimDefStackArgs + 1];
 	_havePendingScreenChange = true;
+
+	changeToCursor(_cursors[kCursorArrow]);
 }
 
 void Runtime::scriptOpAnim(ScriptArg_t arg) {
@@ -1262,6 +1441,8 @@ void Runtime::scriptOpAnim(ScriptArg_t arg) {
 	_screenNumber = stackArgs[kAnimDefStackArgs + 0];
 	_direction = stackArgs[kAnimDefStackArgs + 1];
 	_havePendingScreenChange = true;
+
+	changeToCursor(_cursors[kCursorArrow]);
 }
 
 OPCODE_STUB(Static)
@@ -1295,7 +1476,11 @@ void Runtime::scriptOpSetCursor(ScriptArg_t arg) {
 	changeToCursor(_cursors[stackArgs[0]]);
 }
 
-OPCODE_STUB(SetRoom)
+void Runtime::scriptOpSetRoom(ScriptArg_t arg) {
+	TAKE_STACK(1);
+
+	_roomNumber = stackArgs[0];
+}
 
 void Runtime::scriptOpLMB(ScriptArg_t arg) {
 	if (!_scriptEnv.lmb)
diff --git a/engines/vcruise/runtime.h b/engines/vcruise/runtime.h
index 1fc3e09a692..37f62394614 100644
--- a/engines/vcruise/runtime.h
+++ b/engines/vcruise/runtime.h
@@ -56,6 +56,7 @@ struct Instruction;
 enum GameState {
 	kGameStateBoot,					// Booting the game
 	kGameStateWaitingForAnimation,	// Waiting for a blocking animation to complete, then resuming script
+	kGameStateWaitingForFacing,		// Waiting for a blocking animation to complete, then playing _postFacingAnimDef and switching to kGameStateWaitingForAnimation
 	kGameStateQuit,					// Quitting
 	kGameStateIdle,					// Waiting for input events
 	kGameStateScript,				// Running a script
@@ -171,6 +172,19 @@ private:
 		kOSEventTypeKeyDown,
 	};
 
+	enum PanoramaCursorFlags {
+		kPanCursorDraggableHoriz	= (1 << 0),
+		kPanCursorDraggableUp		= (1 << 1),
+		kPanCursorDraggableDown		= (1 << 2),
+
+		kPanCursorDirectionUp		= (0 << 3),
+		kPanCursorDirectionLeft		= (1 << 3),
+		kPanCursorDirectionRight	= (2 << 3),
+		kPanCursorDirectionDown		= (3 << 3),
+
+		kPanCursorMaxCount			= (1 << 5),
+	};
+
 	enum PanoramaState {
 		kPanoramaStateInactive,
 
@@ -199,6 +213,7 @@ private:
 	bool runHorizontalPan(bool isRight);
 	bool runScript();
 	bool runWaitForAnimation();
+	bool runWaitForFacing();
 	void continuePlayingAnimation(bool loop, bool &outEndedAnimation);
 	void drawSectionToScreen(const RenderSection &section, const Common::Rect &rect);
 	void commitSectionToScreen(const RenderSection &section, const Common::Rect &rect);
@@ -214,6 +229,7 @@ private:
 	void returnToIdleState();
 	void changeToCursor(const Common::SharedPtr<Graphics::WinCursorGroup> &cursor);
 	bool dischargeIdleMouseMove();
+	bool dischargeIdleClick();
 	void loadMap(Common::SeekableReadStream *stream);
 
 	void changeMusicTrack(int musicID);
@@ -235,6 +251,8 @@ private:
 	void detectPanoramaMouseMovement();
 	void panoramaActivate();
 
+	bool computeFaceDirectionAnimation(uint desiredDirection, AnimationDef &outAnimDef);
+
 	// Script things
 	void scriptOpNumber(ScriptArg_t arg);
 	void scriptOpRotate(ScriptArg_t arg);
@@ -311,6 +329,8 @@ private:
 	Common::Array<Common::SharedPtr<Graphics::WinCursorGroup> > _cursors;		// Cursors indexed as CURSOR_CUR_##
 	Common::Array<Common::SharedPtr<Graphics::WinCursorGroup> > _cursorsShort;	// Cursors indexed as CURSOR_#
 
+	uint _panCursors[kPanCursorMaxCount];
+
 	Common::HashMap<Common::String, StackValue_t> _namedCursors;
 
 	OSystem *_system;
@@ -325,6 +345,8 @@ private:
 	AnimationDef _idleAnimations[kNumDirections];
 	bool _haveIdleAnimations[kNumDirections];
 
+	AnimationDef _postFacingAnimDef;
+
 	Common::HashMap<uint32, int32> _variables;
 
 	static const uint kPanLeftInteraction = 1;
@@ -402,8 +424,8 @@ private:
 
 	static const uint kCursorArrow = 0;
 
-	static const int kPanoramaPanningMarginX = 10;
-	static const int kPanoramaPanningMarginY = 10;
+	static const int kPanoramaPanningMarginX = 11;
+	static const int kPanoramaPanningMarginY = 11;
 };
 
 } // End of namespace VCruise




More information about the Scummvm-git-logs mailing list