[Scummvm-git-logs] scummvm master -> fd61d4c5e763a95f4a55795fa7193e91405143b4
mduggan
noreply at scummvm.org
Sun Dec 24 04:00:45 UTC 2023
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:
da4445974c TETRAEDGE: Fix Hans looking to the sky in Syberia 2
fd61d4c5e7 SYBERIA: Better variable names for head adjustments
Commit: da4445974c1ae84ce714a097595d7343cef0cf85
https://github.com/scummvm/scummvm/commit/da4445974c1ae84ce714a097595d7343cef0cf85
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2023-12-24T14:44:18+11:00
Commit Message:
TETRAEDGE: Fix Hans looking to the sky in Syberia 2
When the "looking at tall thing" flag is true, the head angle adjustment value
should be set as the absolute angle up, not added to the calculated angle.
This fixes Hans talking to Kate near the start of Syberia 2 where he would
gradually look higher and higher on every scene change.
Changed paths:
engines/tetraedge/game/in_game_scene.cpp
diff --git a/engines/tetraedge/game/in_game_scene.cpp b/engines/tetraedge/game/in_game_scene.cpp
index b0204e6ce2d..4765875797f 100644
--- a/engines/tetraedge/game/in_game_scene.cpp
+++ b/engines/tetraedge/game/in_game_scene.cpp
@@ -1729,7 +1729,7 @@ void InGameScene::update() {
if (g_engine->gameType() == TetraedgeEngine::kSyberia2) {
if (c->lookingAtTallThing())
- headRot.setY(headRot.getY() + c->charLookingAtOffset());
+ headRot.setY(c->charLookingAtOffset());
}
c->setHeadRotation(headRot);
Commit: fd61d4c5e763a95f4a55795fa7193e91405143b4
https://github.com/scummvm/scummvm/commit/fd61d4c5e763a95f4a55795fa7193e91405143b4
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2023-12-24T14:47:01+11:00
Commit Message:
SYBERIA: Better variable names for head adjustments
Changed paths:
engines/tetraedge/game/character.cpp
diff --git a/engines/tetraedge/game/character.cpp b/engines/tetraedge/game/character.cpp
index 05741293574..785875de15c 100644
--- a/engines/tetraedge/game/character.cpp
+++ b/engines/tetraedge/game/character.cpp
@@ -526,20 +526,21 @@ bool Character::onBonesUpdate(const Common::String &boneName, TeMatrix4x4 &boneM
boneMatrix.rotate(rot1);
boneMatrix.rotate(rot2);
} else {
- float lastHeadX = _lastHeadRotation.getX();
- float minX = (lastHeadX > 0) ? -0.1 : 0.1;
- float newX = (fabs(minX) > fabs(lastHeadX)) ? 0.0 : minX + lastHeadX;
+ // Return the head to the centerpoint if there is no anchor.
+ const float lastHeadX = _lastHeadRotation.getX();
+ const float headXAdjust = (lastHeadX > 0) ? -0.1 : 0.1;
+ const float newX = (fabs(headXAdjust) > fabs(lastHeadX)) ? 0.0 : lastHeadX + headXAdjust;
_lastHeadRotation.setX(newX);
- float lastHeadY = _lastHeadRotation.getY();
- float minY = (lastHeadY > 0) ? -0.1 : 0.1;
- float newY = (fabs(minY) > fabs(lastHeadY)) ? 0.0 : minY + lastHeadY;
+ const float lastHeadY = _lastHeadRotation.getY();
+ const float headYAdjust = (lastHeadY > 0) ? -0.1 : 0.1;
+ const float newY = (fabs(headYAdjust) > fabs(lastHeadY)) ? 0.0 : lastHeadY + headYAdjust;
_lastHeadRotation.setY(newY);
_headRotation = _lastHeadRotation;
- TeQuaternion rot1 = TeQuaternion::fromAxisAndAngle(TeVector3f32(-1, 0, 0), _lastHeadRotation.getX());
- TeQuaternion rot2 = TeQuaternion::fromAxisAndAngle(TeVector3f32(0, 0, 1), _lastHeadRotation.getY());
+ const TeQuaternion rot1 = TeQuaternion::fromAxisAndAngle(TeVector3f32(-1, 0, 0), _lastHeadRotation.getX());
+ const TeQuaternion rot2 = TeQuaternion::fromAxisAndAngle(TeVector3f32(0, 0, 1), _lastHeadRotation.getY());
boneMatrix.rotate(rot1);
boneMatrix.rotate(rot2);
_lastHeadBoneTrans = boneMatrix.translation();
More information about the Scummvm-git-logs
mailing list