[Scummvm-git-logs] scummvm master -> 6819fcce6e6eec13bd725df3359135f01a9fae83
ysj1173886760
42030331+ysj1173886760 at users.noreply.github.com
Mon Aug 9 08:51:41 UTC 2021
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
c4f7848084 GRAPHICS: MACGUI: fix createSubMenuFromString.
48934882d3 DIRECTOR: always use the unstretched dims to create widget.
6819fcce6e DIRECTOR: fix the castType of cast
Commit: c4f7848084ea0d4a6877a96f8fbde073e7d23ed0
https://github.com/scummvm/scummvm/commit/c4f7848084ea0d4a6877a96f8fbde073e7d23ed0
Author: ysj1173886760 (1173886760 at qq.com)
Date: 2021-08-09T16:51:25+08:00
Commit Message:
GRAPHICS: MACGUI: fix createSubMenuFromString.
Changed paths:
graphics/macgui/macmenu.cpp
diff --git a/graphics/macgui/macmenu.cpp b/graphics/macgui/macmenu.cpp
index fc22fd939f..357bd3eb65 100644
--- a/graphics/macgui/macmenu.cpp
+++ b/graphics/macgui/macmenu.cpp
@@ -750,7 +750,8 @@ void MacMenu::createSubMenuFromString(int id, const char *str, int commandId) {
Common::String tmpitem(item);
tmpitem.trim();
- if (tmpitem.size() > 0 && tmpitem[0] == '(') {
+ // is that any places locate a parenthese will disable the item, or only the first char and last char counts.
+ if (tmpitem.size() > 0 && (tmpitem[0] == '(' || tmpitem.lastChar() == '(')) {
enabled = false;
for (uint j = 0; j < item.size(); j++)
Commit: 48934882d372b9b7b73a51f430fa411833d9ae85
https://github.com/scummvm/scummvm/commit/48934882d372b9b7b73a51f430fa411833d9ae85
Author: ysj1173886760 (1173886760 at qq.com)
Date: 2021-08-09T16:51:25+08:00
Commit Message:
DIRECTOR: always use the unstretched dims to create widget.
Changed paths:
engines/director/channel.cpp
diff --git a/engines/director/channel.cpp b/engines/director/channel.cpp
index 4ddee7cfbd..242395aad4 100644
--- a/engines/director/channel.cpp
+++ b/engines/director/channel.cpp
@@ -517,7 +517,11 @@ void Channel::replaceWidget(CastMemberID previousCastId, bool force) {
// if the type don't match, then we will set it as transparent. i.e. don't create widget
if (!_sprite->checkSpriteType())
return;
- Common::Rect bbox(getBbox());
+ // always use the unstretched dims.
+ // because only the stretched sprite will have different channel size and sprite size
+ // we need the original image to scale the sprite.
+ // for the scaled bitmap castmember, it has scaled dims on sprite size, so we don't have to worry about it.
+ Common::Rect bbox(getBbox(true));
_sprite->_cast->setModified(false);
_widget = _sprite->_cast->createWidget(bbox, this, _sprite->_spriteType);
Commit: 6819fcce6e6eec13bd725df3359135f01a9fae83
https://github.com/scummvm/scummvm/commit/6819fcce6e6eec13bd725df3359135f01a9fae83
Author: ysj1173886760 (1173886760 at qq.com)
Date: 2021-08-09T16:51:25+08:00
Commit Message:
DIRECTOR: fix the castType of cast
Changed paths:
engines/director/lingo/lingo-object.cpp
engines/director/util.cpp
engines/director/util.h
diff --git a/engines/director/lingo/lingo-object.cpp b/engines/director/lingo/lingo-object.cpp
index fe8f80e39e..e059125f13 100644
--- a/engines/director/lingo/lingo-object.cpp
+++ b/engines/director/lingo/lingo-object.cpp
@@ -624,7 +624,8 @@ Datum CastMember::getField(int field) {
d = (int)getBackColor();
break;
case kTheCastType:
- d = _type;
+ d.type = SYMBOL;
+ d.u.s = new Common::String(castTypeToString(_type));
break;
case kTheFileName:
if (castInfo)
diff --git a/engines/director/util.cpp b/engines/director/util.cpp
index 38490d2bb2..0804053f7a 100644
--- a/engines/director/util.cpp
+++ b/engines/director/util.cpp
@@ -815,4 +815,47 @@ Common::String utf8ToPrintable(const Common::String &str) {
return Common::toPrintable(Common::U32String(str));
}
+Common::String castTypeToString(const CastType &type) {
+ Common::String res;
+ switch(type) {
+ case kCastBitmap:
+ res = "bitmap";
+ break;
+ case kCastPalette:
+ res = "palette";
+ break;
+ case kCastButton:
+ res = "button";
+ break;
+ case kCastPicture:
+ res = "picture";
+ break;
+ case kCastDigitalVideo:
+ res = "digitalVideo";
+ break;
+ case kCastLingoScript:
+ res = "script";
+ break;
+ case kCastShape:
+ res = "shape";
+ break;
+ case kCastFilmLoop:
+ res = "filmLoop";
+ break;
+ case kCastSound:
+ res = "sound";
+ break;
+ case kCastMovie:
+ res = "movie";
+ break;
+ case kCastText:
+ res = "text";
+ break;
+ default:
+ res = "empty";
+ break;
+ }
+ return res;
+}
+
} // End of namespace Director
diff --git a/engines/director/util.h b/engines/director/util.h
index 7728076132..b2d7bd3af4 100644
--- a/engines/director/util.h
+++ b/engines/director/util.h
@@ -56,6 +56,8 @@ Common::String dumpScriptName(const char *prefix, int type, int id, const char *
bool isButtonSprite(SpriteType spriteType);
+Common::String castTypeToString(const CastType &type);
+
class RandomState {
public:
uint32 _seed;
More information about the Scummvm-git-logs
mailing list