[Scummvm-git-logs] scummvm master -> 89967110552e7e0a864b428c9312db1cceff24a8
sev-
sev at scummvm.org
Wed Apr 29 18:55:51 UTC 2020
This automated email contains information about 7 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
5df4e41c9b NEWS: Mention achievemnts subsystem for Wintermute
0733b1a18e DIRECTOR: LINGO: Added sanity check to compareArrays()
25aed9b1bf GRAPHICS: MACGUI: More debug output
b91325b8a4 DIRECTOR: Specify maxWidth for editable text
d389b352f9 GRAPHICS: MACGUI: Enforce maxWidth for editable text
d6b634e5ea GRAPHICS: MACGUI: Draw editable text on-surface
8996711055 GRAPHICS: MACGUI: Display cursor in MacEditableText
Commit: 5df4e41c9b1bd6e55b29770974b3c32f879e21ae
https://github.com/scummvm/scummvm/commit/5df4e41c9b1bd6e55b29770974b3c32f879e21ae
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-04-29T20:55:38+02:00
Commit Message:
NEWS: Mention achievemnts subsystem for Wintermute
Changed paths:
NEWS.md
diff --git a/NEWS.md b/NEWS.md
index c79972dfcb..e2465314ee 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -24,6 +24,9 @@ For a more comprehensive changelog of the latest experimental code, see:
Sword1:
- Added support for localized menus in Novy Disk Russian Trilogy release.
+ Wintermute:
+ - Added subsystem for tracking achievements, implemented for 10+ games.
+
Xeen:
- Add missing sprite drawer for enemies hit by Energy Blast.
Commit: 0733b1a18e491ee718eecb96f6fcad12d68a23e4
https://github.com/scummvm/scummvm/commit/0733b1a18e491ee718eecb96f6fcad12d68a23e4
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-04-29T20:55:38+02:00
Commit Message:
DIRECTOR: LINGO: Added sanity check to compareArrays()
Changed paths:
engines/director/lingo/lingo-code.cpp
diff --git a/engines/director/lingo/lingo-code.cpp b/engines/director/lingo/lingo-code.cpp
index da14421752..1d391a9c01 100644
--- a/engines/director/lingo/lingo-code.cpp
+++ b/engines/director/lingo/lingo-code.cpp
@@ -1010,6 +1010,9 @@ Datum LC::compareArrays(Datum (*compareFunc)(Datum, Datum), Datum d1, Datum d2,
arraySize = d2.u.farr->size();
} else if (d2.type == PARRAY) {
arraySize = d2.u.parr->size();
+ } else {
+ warning("LC::compareArrays(): Called with wrong data types: %s and %s", d1.type2str(), d2.type2str());
+ return Datum(0);
}
Datum res;
Commit: 25aed9b1bf3d4b4fd6a280a82d77757da119934d
https://github.com/scummvm/scummvm/commit/25aed9b1bf3d4b4fd6a280a82d77757da119934d
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-04-29T20:55:38+02:00
Commit Message:
GRAPHICS: MACGUI: More debug output
Changed paths:
graphics/macgui/mactext.cpp
diff --git a/graphics/macgui/mactext.cpp b/graphics/macgui/mactext.cpp
index e3ac84cd1d..3b517f7eb6 100644
--- a/graphics/macgui/mactext.cpp
+++ b/graphics/macgui/mactext.cpp
@@ -165,7 +165,7 @@ void MacText::chopChunk(const Common::U32String &str) {
// This happens when the previous run is finished only with
// empty formatting, or when we were adding text for the first time
if (chunk->text.empty() && str.empty()) {
- D(9, "** splitString, replaced formatting");
+ D(9, "** splitString, replaced formatting, line %d", curLine);
_textLines[curLine].chunks.pop_back();
@@ -187,7 +187,7 @@ void MacText::chopChunk(const Common::U32String &str) {
chunk->text += text[0];
- D(9, "** splitString, subchunk: \"%s\"", toPrintable(text[0].encode()).c_str());
+ D(9, "** splitString, subchunk: \"%s\" (%d lines, maxW: %d)", toPrintable(text[0].encode()).c_str(), text.size(), _maxWidth);
// We do not overlap, so we're done
if (text.size() == 1)
@@ -203,7 +203,7 @@ void MacText::chopChunk(const Common::U32String &str) {
_textLines.resize(curLine + 1);
_textLines[curLine].chunks.push_back(newchunk);
- D(9, "** splitString, line: \"%s\"", toPrintable(text[i].encode()).c_str());
+ D(9, "** splitString, added line: \"%s\"", toPrintable(text[i].encode()).c_str());
}
}
Commit: b91325b8a482514faf7810c278accda27845025b
https://github.com/scummvm/scummvm/commit/b91325b8a482514faf7810c278accda27845025b
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-04-29T20:55:38+02:00
Commit Message:
DIRECTOR: Specify maxWidth for editable text
Changed paths:
engines/director/frame.cpp
diff --git a/engines/director/frame.cpp b/engines/director/frame.cpp
index 935cf217c2..a12ef05901 100644
--- a/engines/director/frame.cpp
+++ b/engines/director/frame.cpp
@@ -889,7 +889,7 @@ void Frame::renderText(Graphics::ManagedSurface &surface, uint16 spriteId, Commo
if (sprite->_editable) {
if (!textCast->_widget) {
warning("Creating MacEditableText with '%s'", toPrintable(textCast->_ftext).c_str());
- textCast->_widget = new Graphics::MacEditableText(score->_window, x, y, width, height, g_director->_wm, textCast->_ftext, new Graphics::MacFont(), sprite->_foreColor, sprite->_backColor);
+ textCast->_widget = new Graphics::MacEditableText(score->_window, x, y, width, height, g_director->_wm, textCast->_ftext, new Graphics::MacFont(), sprite->_foreColor, sprite->_backColor, width);
warning("Finished creating MacEditableText");
}
Commit: d389b352f9e3f2956fe586ffd3d1eb1d5d1f43e4
https://github.com/scummvm/scummvm/commit/d389b352f9e3f2956fe586ffd3d1eb1d5d1f43e4
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-04-29T20:55:38+02:00
Commit Message:
GRAPHICS: MACGUI: Enforce maxWidth for editable text
Changed paths:
graphics/macgui/maceditabletext.h
diff --git a/graphics/macgui/maceditabletext.h b/graphics/macgui/maceditabletext.h
index 93a4fa56e5..29682c5b78 100644
--- a/graphics/macgui/maceditabletext.h
+++ b/graphics/macgui/maceditabletext.h
@@ -54,9 +54,9 @@ struct SelectedText {
class MacEditableText : public MacText, public MacWidget {
public:
MacEditableText(MacWidget *parent, int x, int y, int w, int h, MacWindowManager *wm, const Common::U32String &s, const MacFont *font, int fgcolor, int bgcolor,
- int maxWidth = -1, TextAlign textAlignment = kTextAlignLeft, int interlinear = 0);
+ int maxWidth, TextAlign textAlignment = kTextAlignLeft, int interlinear = 0);
MacEditableText(MacWidget *parent, int x, int y, int w, int h, MacWindowManager *wm, const Common::String &s, const MacFont *font, int fgcolor, int bgcolor,
- int maxWidth = -1, TextAlign textAlignment = kTextAlignLeft, int interlinear = 0);
+ int maxWidth, TextAlign textAlignment = kTextAlignLeft, int interlinear = 0);
// 0 pixels between the lines by default
virtual ~MacEditableText();
Commit: d6b634e5eaea915faa84c2c4a731fa1d16588e83
https://github.com/scummvm/scummvm/commit/d6b634e5eaea915faa84c2c4a731fa1d16588e83
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-04-29T20:55:38+02:00
Commit Message:
GRAPHICS: MACGUI: Draw editable text on-surface
Changed paths:
graphics/macgui/maceditabletext.cpp
diff --git a/graphics/macgui/maceditabletext.cpp b/graphics/macgui/maceditabletext.cpp
index 1ae6ba0782..92cbf5d85a 100644
--- a/graphics/macgui/maceditabletext.cpp
+++ b/graphics/macgui/maceditabletext.cpp
@@ -170,10 +170,10 @@ bool MacEditableText::draw(bool forceRedraw) {
_cursorDirty = false;
// Compose
- MacText::draw(_composeSurface, 0, _scrollPos, _surface->w, _scrollPos + _surface->h, kConWOverlap - 2, kConWOverlap - 2);
+ MacText::draw(_composeSurface, 0, _scrollPos, _surface->w, _scrollPos + _surface->h, 0, 0);
if (_cursorState)
- _composeSurface->blitFrom(*_cursorSurface, *_cursorRect, Common::Point(_cursorX + kConWOverlap - 2, _cursorY + kConHOverlap - 2));
+ _composeSurface->blitFrom(*_cursorSurface, *_cursorRect, Common::Point(_cursorX, _cursorY));
if (_selectedText.endY != -1)
drawSelection();
Commit: 89967110552e7e0a864b428c9312db1cceff24a8
https://github.com/scummvm/scummvm/commit/89967110552e7e0a864b428c9312db1cceff24a8
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-04-29T20:55:38+02:00
Commit Message:
GRAPHICS: MACGUI: Display cursor in MacEditableText
Changed paths:
graphics/macgui/maceditabletext.cpp
diff --git a/graphics/macgui/maceditabletext.cpp b/graphics/macgui/maceditabletext.cpp
index 92cbf5d85a..ec3e3e5fe7 100644
--- a/graphics/macgui/maceditabletext.cpp
+++ b/graphics/macgui/maceditabletext.cpp
@@ -314,6 +314,8 @@ bool MacEditableText::processEvent(Common::Event &event) {
if (!_editable)
return false;
+ setActive(true);
+
if (event.kbd.flags & (Common::KBD_ALT | Common::KBD_CTRL | Common::KBD_META)) {
return false;
}
@@ -345,9 +347,6 @@ bool MacEditableText::processEvent(Common::Event &event) {
}
}
- if (hasAllFocus())
- return _parent->processEvent(event); // Pass it to upstream
-
if (event.type == Common::EVENT_WHEELUP) {
scroll(-2);
return true;
@@ -362,6 +361,8 @@ bool MacEditableText::processEvent(Common::Event &event) {
return false;
if (event.type == Common::EVENT_LBUTTONDOWN) {
+ setActive(true);
+
startMarking(event.mouse.x, event.mouse.y);
return true;
More information about the Scummvm-git-logs
mailing list