[Scummvm-git-logs] scummvm master -> 545073caa9f2823dbf0166a02fcd08f23b94a138
sev-
noreply at scummvm.org
Tue Nov 21 19:19:55 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:
164620e6e6 DIRECTOR : Fix physical energy game bar not filled in total distortion.
545073caa9 DIRECTOR : Fix kInkTypeCopy Blending Issues.
Commit: 164620e6e6437d413a5b4621d68fddef9c83a242
https://github.com/scummvm/scummvm/commit/164620e6e6437d413a5b4621d68fddef9c83a242
Author: kartiksharmakk (77577353+kartiksharmakk at users.noreply.github.com)
Date: 2023-11-21T20:19:35+01:00
Commit Message:
DIRECTOR : Fix physical energy game bar not filled in total distortion.
It is partial revert of 3cb61c54d749f385817fb8674236d4046af54271
Steps to reproduce:
1. Start Total Distortion
2. Start a new game / load game
3. Click on the "Options" button
4. The physical energy bar is not visible
Trello card : https://trello.com/c/mpZTlPoZ/628-physical-energy-game-bar-not-filled
Changed paths:
engines/director/channel.cpp
engines/director/frame.cpp
engines/director/sprite.cpp
engines/director/sprite.h
diff --git a/engines/director/channel.cpp b/engines/director/channel.cpp
index dfea4e5aebb..36bf4b1342e 100644
--- a/engines/director/channel.cpp
+++ b/engines/director/channel.cpp
@@ -113,7 +113,7 @@ Channel::~Channel() {
}
DirectorPlotData Channel::getPlotData() {
- DirectorPlotData pd(g_director, _sprite->_spriteType, _sprite->_ink, _sprite->_blendAmount, _sprite->getBackColor(), _sprite->getForeColor());
+ DirectorPlotData pd(g_director, _sprite->_spriteType, _sprite->_ink, _sprite->_blend, _sprite->getBackColor(), _sprite->getForeColor());
pd.colorWhite = 0;
pd.colorBlack = 255;
pd.dst = nullptr;
@@ -160,7 +160,8 @@ const Graphics::Surface *Channel::getMask(bool forceMatte) {
_sprite->_ink == kInkTypeLight ||
_sprite->_ink == kInkTypeSub ||
_sprite->_ink == kInkTypeDark ||
- _sprite->_blendAmount > 0;
+ _sprite->_blendAmount > 0 ||
+ _sprite->_blend > 0;
Common::Rect bbox(getBbox());
diff --git a/engines/director/frame.cpp b/engines/director/frame.cpp
index faeb2c58534..2b8e7716a00 100644
--- a/engines/director/frame.cpp
+++ b/engines/director/frame.cpp
@@ -1139,13 +1139,13 @@ Common::String Frame::formatChannelInfo() {
for (int i = 0; i < _numChannels; i++) {
Sprite &sprite = *_sprites[i + 1];
if (sprite._castId.member) {
- result += Common::String::format("CH: %-3d castId: %s, [inkData: 0x%02x [ink: %d, trails: %d, line: %d], %dx%d@%d,%d type: %d (%s) fg: %d bg: %d], script: %s, colorcode: 0x%x, blendAmount: 0x%x, unk3: 0x%x\n",
+ result += Common::String::format("CH: %-3d castId: %s, [inkData: 0x%02x [ink: %d, trails: %d, line: %d], %dx%d@%d,%d type: %d (%s) fg: %d bg: %d], script: %s, colorcode: 0x%x, blendAmount: 0x%x, blend: 0x%x, unk3: 0x%x\n",
i + 1, sprite._castId.asString().c_str(), sprite._inkData,
sprite._ink, sprite._trails, sprite._thickness, sprite._width, sprite._height,
sprite._startPoint.x, sprite._startPoint.y,
sprite._spriteType, spriteType2str(sprite._spriteType), sprite._foreColor,
sprite._backColor, sprite._scriptId.asString().c_str(), sprite._colorcode,
- sprite._blendAmount, sprite._unk3);
+ sprite._blendAmount, sprite._blend, sprite._unk3);
} else {
result += Common::String::format("CH: %-3d castId: 000\n", i + 1);
}
diff --git a/engines/director/sprite.cpp b/engines/director/sprite.cpp
index a3232e0014a..e0f555c63a6 100644
--- a/engines/director/sprite.cpp
+++ b/engines/director/sprite.cpp
@@ -64,6 +64,8 @@ Sprite::Sprite(Frame *frame) {
_backColor = g_director->_wm->_colorWhite;
_foreColor = g_director->_wm->_colorWhite;
+ _blend = 0;
+
_volume = 0;
_stretch = 0;
}
@@ -108,6 +110,8 @@ Sprite& Sprite::operator=(const Sprite &sprite) {
_backColor = sprite._backColor;
_foreColor = sprite._foreColor;
+ _blend = sprite._blend;
+
_volume = sprite._volume;
_stretch = sprite._stretch;
diff --git a/engines/director/sprite.h b/engines/director/sprite.h
index 758e88a9051..32183f9d92a 100644
--- a/engines/director/sprite.h
+++ b/engines/director/sprite.h
@@ -116,6 +116,8 @@ public:
uint32 _backColor;
uint32 _foreColor;
+ byte _blend;
+
byte _volume;
byte _stretch;
};
Commit: 545073caa9f2823dbf0166a02fcd08f23b94a138
https://github.com/scummvm/scummvm/commit/545073caa9f2823dbf0166a02fcd08f23b94a138
Author: kartiksharmakk (77577353+kartiksharmakk at users.noreply.github.com)
Date: 2023-11-21T20:19:35+01:00
Commit Message:
DIRECTOR : Fix kInkTypeCopy Blending Issues.
1-bit sprites will not blend with kInkTypeCopy , whereas 8-bit will.
Trello card : https://trello.com/c/mpZTlPoZ/628-physical-energy-game-bar-not-filled
Changed paths:
engines/director/channel.cpp
diff --git a/engines/director/channel.cpp b/engines/director/channel.cpp
index 36bf4b1342e..b3d196c5bf2 100644
--- a/engines/director/channel.cpp
+++ b/engines/director/channel.cpp
@@ -113,7 +113,7 @@ Channel::~Channel() {
}
DirectorPlotData Channel::getPlotData() {
- DirectorPlotData pd(g_director, _sprite->_spriteType, _sprite->_ink, _sprite->_blend, _sprite->getBackColor(), _sprite->getForeColor());
+ DirectorPlotData pd(g_director, _sprite->_spriteType, _sprite->_ink, _sprite->_blendAmount, _sprite->getBackColor(), _sprite->getForeColor());
pd.colorWhite = 0;
pd.colorBlack = 255;
pd.dst = nullptr;
@@ -160,8 +160,7 @@ const Graphics::Surface *Channel::getMask(bool forceMatte) {
_sprite->_ink == kInkTypeLight ||
_sprite->_ink == kInkTypeSub ||
_sprite->_ink == kInkTypeDark ||
- _sprite->_blendAmount > 0 ||
- _sprite->_blend > 0;
+ _sprite->_blendAmount > 0;
Common::Rect bbox(getBbox());
@@ -173,6 +172,10 @@ const Graphics::Surface *Channel::getMask(bool forceMatte) {
BitmapCastMember *bitmap = ((BitmapCastMember *)_sprite->_cast);
// 1-bit images only require a matte for the matte ink type
if (bitmap->_bitsPerPixel == 1 && _sprite->_ink != kInkTypeMatte) {
+ // 1-bit images will not blend with kInkTypeCopy, whereas 8-bit images will.
+ if (_sprite->_ink == kInkTypeCopy) {
+ _sprite->_blendAmount = 0;
+ }
return nullptr;
}
return bitmap->getMatte(bbox);
More information about the Scummvm-git-logs
mailing list