[Scummvm-git-logs] scummvm master -> 33cbf3b0829d80a6421173e358ca961be2948263
alxpnv
a04198622 at gmail.com
Wed Aug 18 11:25:55 UTC 2021
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
33cbf3b082 ASYLUM: fix calculation of object's sound source coordinates
Commit: 33cbf3b0829d80a6421173e358ca961be2948263
https://github.com/scummvm/scummvm/commit/33cbf3b0829d80a6421173e358ca961be2948263
Author: alxpnv (alxpnv22 at yahoo.com)
Date: 2021-08-18T14:26:34+03:00
Commit Message:
ASYLUM: fix calculation of object's sound source coordinates
Changed paths:
engines/asylum/resources/object.cpp
diff --git a/engines/asylum/resources/object.cpp b/engines/asylum/resources/object.cpp
index 6c47fa4ae9..85b964af14 100644
--- a/engines/asylum/resources/object.cpp
+++ b/engines/asylum/resources/object.cpp
@@ -428,8 +428,8 @@ void Object::playSounds() {
} else {
Common::Rect rect = GraphicResource::getFrameRect(_vm, _resourceId, _frameIndex);
- point.x = (int16)(x + (rect.width() * 2));
- point.y = (int16)(x + (rect.height() * 2));
+ point.x = (int16)(x + (rect.width() / 2));
+ point.y = (int16)(y + (rect.height() / 2));
}
}
@@ -457,6 +457,7 @@ void Object::playSounds() {
getSound()->setVolume(item->resourceId, volume);
} else {
getSound()->stop(item->resourceId);
+ item->resourceId = kResourceNone;
}
}
}
More information about the Scummvm-git-logs
mailing list