[Scummvm-git-logs] scummvm master -> 1afefb7852ebf37bb355d44d8b77743e9c8d2a4e
npjg
nathanael.gentrydb8 at gmail.com
Thu Jun 18 02:38:53 UTC 2020
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:
2e86cf35a4 DIRECTOR: Register point properly
1afefb7852 DIRECTOR: Address undrawing edge case
Commit: 2e86cf35a4b342599dae764c3c0dece06d0b5ce2
https://github.com/scummvm/scummvm/commit/2e86cf35a4b342599dae764c3c0dece06d0b5ce2
Author: Nathanael Gentry (nathanael.gentrydb8 at gmail.com)
Date: 2020-06-17T22:38:47-04:00
Commit Message:
DIRECTOR: Register point properly
Changed paths:
engines/director/lingo/lingo-the.cpp
diff --git a/engines/director/lingo/lingo-the.cpp b/engines/director/lingo/lingo-the.cpp
index 56a43f9f37..5b949c66ca 100644
--- a/engines/director/lingo/lingo-the.cpp
+++ b/engines/director/lingo/lingo-the.cpp
@@ -856,7 +856,7 @@ void Lingo::setTheSprite(Datum &id1, int field, Datum &d) {
channel->addDelta(Common::Point(d.asInt() - channel->_currentPoint.x, 0));
break;
case kTheLocV:
- channel->addDelta(Common::Point(d.asInt() - channel->_currentPoint.y, 0));
+ channel->addDelta(Common::Point(0, d.asInt() - channel->_currentPoint.y));
break;
case kTheMoveableSprite:
sprite->_moveable = d.asInt();
Commit: 1afefb7852ebf37bb355d44d8b77743e9c8d2a4e
https://github.com/scummvm/scummvm/commit/1afefb7852ebf37bb355d44d8b77743e9c8d2a4e
Author: Nathanael Gentry (nathanael.gentrydb8 at gmail.com)
Date: 2020-06-17T22:38:48-04:00
Commit Message:
DIRECTOR: Address undrawing edge case
When the castId of a puppeted sprite changes, we want to undraw the old sprite
before taking on the new bounding box.
Changed paths:
engines/director/lingo/lingo-the.cpp
engines/director/score.cpp
engines/director/score.h
diff --git a/engines/director/lingo/lingo-the.cpp b/engines/director/lingo/lingo-the.cpp
index 5b949c66ca..5f05bf8c30 100644
--- a/engines/director/lingo/lingo-the.cpp
+++ b/engines/director/lingo/lingo-the.cpp
@@ -827,6 +827,7 @@ void Lingo::setTheSprite(Datum &id1, int field, Datum &d) {
sprite->_blend = d.asInt();
break;
case kTheCastNum:
+ score->unrenderSprite(id);
sprite->setCast(d.asInt());
break;
case kTheConstraint:
diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index cbc89f11e3..5dba144461 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -566,15 +566,11 @@ void Score::renderFrame(uint16 frameId, bool forceUpdate, bool updateStageOnly)
needsUpdate = needsUpdate || (currentSprite->_ink == kInkTypeReverse);
if (needsUpdate || forceUpdate) {
- if (!currentSprite->_trails) {
- Common::Rect currentBbox = channel->getBbox();
- _maskSurface->fillRect(currentBbox, 1);
- _surface->fillRect(currentBbox, _stageColor);
- }
- }
+ unrenderSprite(i);
- channel->_sprite = nextSprite;
- channel->updateLocation();
+ channel->_sprite = nextSprite;
+ channel->updateLocation();
+ }
}
for (uint id = 0; id < _channels.size(); id++) {
@@ -588,7 +584,7 @@ void Score::renderFrame(uint16 frameId, bool forceUpdate, bool updateStageOnly)
// Sprites marked moveable are constrained to the same bounding box until
// the moveable is disabled
- if (!sprite->_moveable)
+ if (!sprite->_puppet && !sprite->_moveable)
channel->_currentPoint = sprite->_startPoint;
Common::Rect currentBbox = channel->getBbox();
@@ -630,6 +626,17 @@ void Score::renderFrame(uint16 frameId, bool forceUpdate, bool updateStageOnly)
g_system->copyRectToScreen(_surface->getPixels(), _surface->pitch, 0, 0, _surface->getBounds().width(), _surface->getBounds().height());
}
+void Score::unrenderSprite(int spriteId) {
+ Channel *channel = _channels[spriteId];
+ Sprite *currentSprite = channel->_sprite;
+
+ if (!currentSprite->_trails) {
+ Common::Rect currentBbox = channel->getBbox();
+ _maskSurface->fillRect(currentBbox, 1);
+ _surface->fillRect(currentBbox, _stageColor);
+ }
+}
+
void Score::renderShape(uint16 spriteId) {
Sprite *sp = _channels[spriteId]->_sprite;
diff --git a/engines/director/score.h b/engines/director/score.h
index a9375b4611..20a1dcb57a 100644
--- a/engines/director/score.h
+++ b/engines/director/score.h
@@ -146,6 +146,7 @@ public:
Cast *getCastMember(int castId);
const Stxt *getStxt(int castId);
void renderFrame(uint16 frameId, bool forceUpdate = false, bool updateStageOnly = false);
+ void unrenderSprite(int spriteId);
private:
void update();
More information about the Scummvm-git-logs
mailing list