[Scummvm-git-logs] scummvm master -> 02e051fa39913b0201e23de9e21fd627ca6c6c16

mgerhardy martin.gerhardy at gmail.com
Fri Oct 29 16:06:55 UTC 2021


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

Summary:
53699efacf TWINE: renamed enum value
02e051fa39 TWINE: added isDotEmuEnhanced() helper method


Commit: 53699efacfed2408dfc823bd03529b6e78d46279
    https://github.com/scummvm/scummvm/commit/53699efacfed2408dfc823bd03529b6e78d46279
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-10-29T18:07:26+02:00

Commit Message:
TWINE: renamed enum value

Changed paths:
    engines/twine/parser/entity.cpp
    engines/twine/scene/animations.cpp
    engines/twine/shared.h


diff --git a/engines/twine/parser/entity.cpp b/engines/twine/parser/entity.cpp
index 0be257112a..002c3628c4 100644
--- a/engines/twine/parser/entity.cpp
+++ b/engines/twine/parser/entity.cpp
@@ -135,7 +135,7 @@ bool EntityData::loadAnim(Common::SeekableReadStream &stream) {
 			action.finalAngle = ToAngle(stream.readSint16LE());
 			action.strength = stream.readByte();
 			break;
-		case ActionType::ACTION_UNKNOWN_21:
+		case ActionType::ACTION_THROW_3D_MAGIC:
 			action.animFrame = stream.readByte();
 			action.distanceX = stream.readSint16LE();
 			action.distanceY = stream.readSint16LE();
diff --git a/engines/twine/scene/animations.cpp b/engines/twine/scene/animations.cpp
index 30f3e6a4ed..af6baf0637 100644
--- a/engines/twine/scene/animations.cpp
+++ b/engines/twine/scene/animations.cpp
@@ -372,7 +372,7 @@ void Animations::processAnimActions(int32 actorIdx) {
 				                                action.targetActor, action.finalAngle, action.strength);
 			}
 			break;
-		case ActionType::ACTION_UNKNOWN_21:
+		case ActionType::ACTION_THROW_3D_MAGIC:
 			if (_engine->_gameState->_magicBallIdx == -1 && action.animFrame == actor->_animPosition) {
 				const IVec3 &destPos = _engine->_movements->rotateActor(action.distanceX, action.distanceZ, actor->_angle);
 				const int32 x = actor->_pos.x + destPos.x;
diff --git a/engines/twine/shared.h b/engines/twine/shared.h
index da2eb9b8ab..fd6e531f85 100644
--- a/engines/twine/shared.h
+++ b/engines/twine/shared.h
@@ -190,7 +190,7 @@ enum class ActionType : uint8 {
 	ACTION_THROW_3D = 18,
 	ACTION_THROW_3D_ALPHA = 19,
 	ACTION_THROW_3D_SEARCH = 20,
-	ACTION_UNKNOWN_21 = 21,
+	ACTION_THROW_3D_MAGIC = 21,
 	ACTION_LAST
 };
 


Commit: 02e051fa39913b0201e23de9e21fd627ca6c6c16
    https://github.com/scummvm/scummvm/commit/02e051fa39913b0201e23de9e21fd627ca6c6c16
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-10-29T18:07:26+02:00

Commit Message:
TWINE: added isDotEmuEnhanced() helper method

Changed paths:
    engines/twine/twine.cpp
    engines/twine/twine.h


diff --git a/engines/twine/twine.cpp b/engines/twine/twine.cpp
index 7fde7de197..fdfe204a23 100644
--- a/engines/twine/twine.cpp
+++ b/engines/twine/twine.cpp
@@ -132,18 +132,17 @@ TwinEEngine::TwinEEngine(OSystem *system, Common::Language language, uint32 flag
 	if (isLBA2()) {
 		SearchMan.addSubDirectoryMatching(gameDataDir, "video");
 	}
-	if (flags & TF_DOTEMU_ENHANCED) {
+	if (isDotEmuEnhanced()) {
 		SearchMan.addSubDirectoryMatching(gameDataDir, "resources/lba_files/hqr");
 		SearchMan.addSubDirectoryMatching(gameDataDir, "resources/lba_files/fla");
 		if (_gameLang == Common::Language::DE_DEU) {
 			SearchMan.addSubDirectoryMatching(gameDataDir, "resources/lba_files/vox/de_voice");
-		}
-		if (_gameLang == Common::Language::EN_ANY || _gameLang == Common::Language::EN_GRB || _gameLang == Common::Language::EN_USA) {
+		} else if (_gameLang == Common::Language::EN_ANY || _gameLang == Common::Language::EN_GRB || _gameLang == Common::Language::EN_USA) {
 			SearchMan.addSubDirectoryMatching(gameDataDir, "resources/lba_files/vox/en_voice");
-		}
-		if (_gameLang == Common::Language::FR_FRA) {
+		} else if (_gameLang == Common::Language::FR_FRA) {
 			SearchMan.addSubDirectoryMatching(gameDataDir, "resources/lba_files/vox/fr_voice");
 		}
+		SearchMan.addSubDirectoryMatching(gameDataDir, "resources");
 #ifdef USE_MAD
 		SearchMan.addSubDirectoryMatching(gameDataDir, "resources/lba_files/music");
 		SearchMan.addSubDirectoryMatching(gameDataDir, "resources/lba_files/midi_mp3");
diff --git a/engines/twine/twine.h b/engines/twine/twine.h
index a3841c358e..6efe3c949b 100644
--- a/engines/twine/twine.h
+++ b/engines/twine/twine.h
@@ -245,6 +245,7 @@ public:
 	bool isLBA1() const { return _gameType == TwineGameType::GType_LBA; }
 	bool isLBA2() const { return _gameType == TwineGameType::GType_LBA2; }
 	bool isMod() const { return (_gameFlags & TwinE::TF_MOD) != 0; }
+	bool isDotEmuEnhanced() const { return (_gameFlags & TwinE::TF_DOTEMU_ENHANCED) != 0; }
 	bool isDemo() const { return (_gameFlags & ADGF_DEMO) != 0; };
 	const char *getGameId() const;
 




More information about the Scummvm-git-logs mailing list