[Scummvm-git-logs] scummvm master -> db6a0fce540fa4c063609821c52ecfb08019fa44
sev-
sev at scummvm.org
Sat Mar 27 12:05:40 UTC 2021
This automated email contains information about 9 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
312788b228 GRAPHICS: MACGUI: fix the bug dumping when initializing Wage Engine
3f4e072632 GRAPHICS: MACGUI: Added flag to load ScummVM wallpaper optionally
6879058018 WAGE: Disable ScummVM wallpaper in MacWindowManager
85ecee5cde GRAPHICS: MACGUI: fix the bug of splitString which incorrectly deal with \n and incorrect order of draw rectangles in dr
50ce3224a9 WAGE: change the offset and padding when drawing design
383fbedded WAGE: change _wm to pointer
6aea4cb68b GRAPHICS: MACGUI: fix the bug of MacTextWindow incorrectly drawing the surface
8e8219d0ea GRAPHICS: MACGUI: fix the bug when splitting a new line
db6a0fce54 GRAPHICS: MACGUI: fix the problem of incorrectly render the cursor and selected area
Commit: 312788b228c1290f09c9063d333a2ab6d6c601da
https://github.com/scummvm/scummvm/commit/312788b228c1290f09c9063d333a2ab6d6c601da
Author: ysj1173886760 (1173886760 at qq.com)
Date: 2021-03-27T13:05:31+01:00
Commit Message:
GRAPHICS: MACGUI: fix the bug dumping when initializing Wage Engine
Changed paths:
graphics/macgui/mactext.cpp
diff --git a/graphics/macgui/mactext.cpp b/graphics/macgui/mactext.cpp
index 84e31f9a36..1ec4563a04 100644
--- a/graphics/macgui/mactext.cpp
+++ b/graphics/macgui/mactext.cpp
@@ -364,6 +364,10 @@ void MacText::splitString(const Common::U32String &str, int curLine) {
D(9, "** splitString(\"%s\")", toPrintable(str.encode()).c_str());
+ // TODO::code is not elegant, we need to figure out a way which include all situations
+ if (curLine == -1)
+ curLine = _textLines.size() - 1;
+
if (_textLines.empty()) {
_textLines.resize(1);
_textLines[0].chunks.push_back(_defaultFormatting);
@@ -490,7 +494,7 @@ void MacText::splitString(const Common::U32String &str, int curLine) {
int cur_width = getLineWidth(curLine, true);
- D(0, "curWidth %d word_width %d", cur_width, word_width);
+ D(9, "curWidth %d word_width %d", cur_width, word_width);
// if cur_width == 0 but there`s chunks, meaning there must be empty string here
// if cur_width == 0, then you don`t have to add a newline for it
if (cur_width + word_width > _maxWidth && cur_width != 0) {
@@ -839,7 +843,6 @@ void MacText::resize(int w, int h) {
void MacText::appendText(const Common::U32String &str, int fontId, int fontSize, int fontSlant, bool skipAdd) {
appendTextDefault(str, skipAdd);
-
uint oldLen = _textLines.size();
MacFontRun fontRun = MacFontRun(_wm, fontId, fontSlant, fontSize, 0, 0, 0);
@@ -881,7 +884,6 @@ void MacText::appendTextDefault(const Common::U32String &str, bool skipAdd) {
_str += _defaultFormatting.toString();
_str += str;
}
-
splitString(str);
recalcDims();
Commit: 3f4e0726329526ccb94218983628323d397f2ffe
https://github.com/scummvm/scummvm/commit/3f4e0726329526ccb94218983628323d397f2ffe
Author: ysj1173886760 (1173886760 at qq.com)
Date: 2021-03-27T13:05:31+01:00
Commit Message:
GRAPHICS: MACGUI: Added flag to load ScummVM wallpaper optionally
Changed paths:
graphics/macgui/macwindowmanager.cpp
graphics/macgui/macwindowmanager.h
diff --git a/graphics/macgui/macwindowmanager.cpp b/graphics/macgui/macwindowmanager.cpp
index 673d0fe746..8f376bf80f 100644
--- a/graphics/macgui/macwindowmanager.cpp
+++ b/graphics/macgui/macwindowmanager.cpp
@@ -215,7 +215,9 @@ MacWindowManager::MacWindowManager(uint32 mode, MacPatterns *patterns) {
CursorMan.showMouse(true);
loadDataBundle();
- loadDesktop();
+ if (!(_mode & Graphics::kWMNoScummVMWallpaper)) {
+ loadDesktop();
+ }
}
MacWindowManager::~MacWindowManager() {
diff --git a/graphics/macgui/macwindowmanager.h b/graphics/macgui/macwindowmanager.h
index ebf9ce5065..9df4c2790f 100644
--- a/graphics/macgui/macwindowmanager.h
+++ b/graphics/macgui/macwindowmanager.h
@@ -84,7 +84,8 @@ enum {
kWMModeManualDrawWidgets= (1 << 5),
kWMModeFullscreen = (1 << 6),
kWMModeButtonDialogStyle= (1 << 7),
- kWMMode32bpp = (1 << 8)
+ kWMMode32bpp = (1 << 8),
+ kWMNoScummVMWallpaper = (1 << 9)
};
}
Commit: 687905801827408505f22e7a4466cd4c3f236cd2
https://github.com/scummvm/scummvm/commit/687905801827408505f22e7a4466cd4c3f236cd2
Author: ysj1173886760 (1173886760 at qq.com)
Date: 2021-03-27T13:05:31+01:00
Commit Message:
WAGE: Disable ScummVM wallpaper in MacWindowManager
Changed paths:
engines/wage/gui.cpp
diff --git a/engines/wage/gui.cpp b/engines/wage/gui.cpp
index 7ca78a0041..49c38e29a4 100644
--- a/engines/wage/gui.cpp
+++ b/engines/wage/gui.cpp
@@ -93,6 +93,7 @@ Gui::Gui(WageEngine *engine) {
_sceneDirty = true;
_screen.create(g_system->getWidth(), g_system->getHeight(), Graphics::PixelFormat::createFormatCLUT8());
+ _wm._mode |= Graphics::kWMNoScummVMWallpaper;
_wm.setScreen(&_screen);
_menu = _wm.addMenu();
Commit: 85ecee5cde9e065963af8f5aeed01e14f89719f0
https://github.com/scummvm/scummvm/commit/85ecee5cde9e065963af8f5aeed01e14f89719f0
Author: ysj1173886760 (1173886760 at qq.com)
Date: 2021-03-27T13:05:31+01:00
Commit Message:
GRAPHICS: MACGUI: fix the bug of splitString which incorrectly deal with \n and incorrect order of draw rectangles in draw function
Changed paths:
graphics/macgui/mactext.cpp
diff --git a/graphics/macgui/mactext.cpp b/graphics/macgui/mactext.cpp
index 1ec4563a04..75e513f8fc 100644
--- a/graphics/macgui/mactext.cpp
+++ b/graphics/macgui/mactext.cpp
@@ -397,10 +397,13 @@ void MacText::splitString(const Common::U32String &str, int curLine) {
while (*l) {
if (*l == '\r') {
l++;
-
if (*l == '\n') // Skip whole '\r\n'
l++;
-
+ break;
+ }
+ // deal with single \n
+ if (*l == '\n') {
+ l++;
break;
}
@@ -470,11 +473,11 @@ void MacText::splitString(const Common::U32String &str, int curLine) {
}
// calc word_width, the trick we define here is we don`t count the space
int word_width = current_format.getFont()->getStringWidth(tmp);
+ // add all spaces left
while (*s == ' ') {
tmp += *s;
s++;
}
- // add all spaces left
// now let`s try to split
// first we have to try to get the whole word
@@ -489,7 +492,7 @@ void MacText::splitString(const Common::U32String &str, int curLine) {
for (int i = 1; i < (int)word.size(); i++) {
word_width += word[i].getFont()->getStringWidth(word[i].text);
- D(9, "** word \"%s\" textslant [%d]", Common::toPrintable(word[i].text.encode()).c_str(), word[i].textSlant);
+ debugN(9, "\"%s\"", Common::toPrintable(word[i].text.encode()).c_str());
}
int cur_width = getLineWidth(curLine, true);
@@ -562,6 +565,11 @@ void MacText::splitString(const Common::U32String &str, int curLine) {
D(9, "** splitString: new line");
_textLines[curLine].paragraphEnd = true;
+ // if the chunks is empty, which means the line will not be rendered properly
+ // so we add a empty string here
+ if (_textLines[curLine].chunks.empty()) {
+ _textLines[curLine].chunks.push_back(_defaultFormatting);
+ }
curLine++;
_textLines.insert_at(curLine, MacTextLine());
@@ -853,12 +861,10 @@ void MacText::appendText(const Common::U32String &str, int fontId, int fontSize,
_str += fontRun.toString();
_str += str;
}
-
splitString(str);
recalcDims();
render(oldLen - 1, _textLines.size());
-
_contentIsDirty = true;
if (_editable) {
@@ -926,13 +932,14 @@ void MacText::draw(ManagedSurface *g, int x, int y, int w, int h, int xoff, int
render();
+ if (x + w < _surface->w || y + h < _surface->h)
+ g->fillRect(Common::Rect(x, y, x + w, y + w), _bgcolor);
+
g->blitFrom(*_surface, Common::Rect(MIN<int>(_surface->w, x), MIN<int>(_surface->h, y), MIN<int>(_surface->w, x + w), MIN<int>(_surface->h, y + h)), Common::Point(xoff, yoff));
if (_textShadow)
g->transBlitFrom(*_surface, Common::Rect(MIN<int>(_surface->w, x), MIN<int>(_surface->h, y), MIN<int>(_surface->w, x + w), MIN<int>(_surface->h, y + h)), Common::Point(xoff + _textShadow, yoff + _textShadow), 0xff);
- if (x + w < _surface->w || y + h < _surface->h)
- g->fillRect(Common::Rect(x, y, x + w, y + w), _bgcolor);
_contentIsDirty = false;
_cursorDirty = false;
Commit: 50ce3224a9be8fe29a6f26568d461c853d24b74a
https://github.com/scummvm/scummvm/commit/50ce3224a9be8fe29a6f26568d461c853d24b74a
Author: ysj1173886760 (1173886760 at qq.com)
Date: 2021-03-27T13:05:31+01:00
Commit Message:
WAGE: change the offset and padding when drawing design
Changed paths:
engines/wage/design.cpp
engines/wage/entities.cpp
diff --git a/engines/wage/design.cpp b/engines/wage/design.cpp
index 90acc704df..d74f99fa74 100644
--- a/engines/wage/design.cpp
+++ b/engines/wage/design.cpp
@@ -133,8 +133,10 @@ void Design::paint(Graphics::ManagedSurface *surface, Graphics::MacPatterns &pat
render(patterns);
if (_bounds->width() && _bounds->height()) {
- const int padding = 3;
- Common::Rect from(padding, padding, _bounds->width() - 2 * padding, _bounds->height() - 2 * padding);
+ const int padding = 20;
+// Common::Rect from(padding, padding, _bounds->width() - 2 * padding, _bounds->height() - 2 * padding);
+ // in order to restore the design, we just cut the left and top part of that
+ Common::Rect from(padding, padding, _bounds->width(), _bounds->height());
Common::Rect to(from);
to.moveTo(x, y);
surface->transBlitFrom(*_surface, from, to, kColorGreen);
diff --git a/engines/wage/entities.cpp b/engines/wage/entities.cpp
index 7d22cadbda..e72e038f91 100644
--- a/engines/wage/entities.cpp
+++ b/engines/wage/entities.cpp
@@ -141,7 +141,7 @@ Scene::~Scene() {
}
void Scene::paint(Graphics::ManagedSurface *surface, int x, int y) {
- Common::Rect r(x + 5, y + 5, _design->getBounds()->width() + x - 10, _design->getBounds()->height() + y - 10);
+ Common::Rect r(x, y, surface->w + x, surface->h + y);
surface->fillRect(r, kColorWhite);
_design->paint(surface, *((WageEngine *)g_engine)->_world->_patterns, x, y);
Commit: 383fbedded99a78345ab59852af2a3952987eaec
https://github.com/scummvm/scummvm/commit/383fbedded99a78345ab59852af2a3952987eaec
Author: ysj1173886760 (1173886760 at qq.com)
Date: 2021-03-27T13:05:31+01:00
Commit Message:
WAGE: change _wm to pointer
Changed paths:
engines/wage/dialog.cpp
engines/wage/gui.cpp
engines/wage/gui.h
diff --git a/engines/wage/dialog.cpp b/engines/wage/dialog.cpp
index a8500a7ebe..2bb96c1055 100644
--- a/engines/wage/dialog.cpp
+++ b/engines/wage/dialog.cpp
@@ -93,11 +93,11 @@ Dialog::~Dialog() {
}
const Graphics::Font *Dialog::getDialogFont() {
- return _gui->_wm._fontMan->getFont(Graphics::MacFont(Graphics::kMacFontChicago, 12));
+ return _gui->_wm->_fontMan->getFont(Graphics::MacFont(Graphics::kMacFontChicago, 12));
}
void Dialog::paint() {
- Design::drawFilledRect(&_gui->_screen, _bbox, kColorWhite, _gui->_wm.getPatterns(), kPatternSolid);
+ Design::drawFilledRect(&_gui->_screen, _bbox, kColorWhite, _gui->_wm->getPatterns(), kPatternSolid);
_font->drawString(&_gui->_screen, _text, _bbox.left + 24, _bbox.top + 16, _bbox.width(), kColorBlack);
static int boxOutline[] = { 1, 0, 0, 1, 1 };
@@ -119,7 +119,7 @@ void Dialog::paint() {
Common::Rect bb(button->bounds.left + 5, button->bounds.top + 5,
button->bounds.right - 5, button->bounds.bottom - 5);
- Design::drawFilledRect(&_gui->_screen, bb, kColorBlack, _gui->_wm.getPatterns(), kPatternSolid);
+ Design::drawFilledRect(&_gui->_screen, bb, kColorBlack, _gui->_wm->getPatterns(), kPatternSolid);
color = kColorWhite;
}
@@ -142,7 +142,7 @@ void Dialog::drawOutline(Common::Rect &bounds, int *spec, int speclen) {
for (int i = 0; i < speclen; i++)
if (spec[i] != 0)
Design::drawRect(&_gui->_screen, bounds.left + i, bounds.top + i, bounds.right - i, bounds.bottom - i,
- 1, kColorBlack, _gui->_wm.getPatterns(), kPatternSolid);
+ 1, kColorBlack, _gui->_wm->getPatterns(), kPatternSolid);
}
int Dialog::run() {
@@ -150,7 +150,7 @@ int Dialog::run() {
Common::Rect r(_bbox);
_tempSurface.copyRectToSurface(_gui->_screen.getBasePtr(_bbox.left, _bbox.top), _gui->_screen.pitch, 0, 0, _bbox.width() + 1, _bbox.height() + 1);
- _gui->_wm.pushArrowCursor();
+ _gui->_wm->pushArrowCursor();
while (!shouldQuit) {
Common::Event event;
@@ -194,7 +194,7 @@ int Dialog::run() {
_gui->_screen.copyRectToSurface(_tempSurface.getBasePtr(0, 0), _tempSurface.pitch, _bbox.left, _bbox.top, _bbox.width() + 1, _bbox.height() + 1);
g_system->copyRectToScreen(_gui->_screen.getBasePtr(r.left, r.top), _gui->_screen.pitch, r.left, r.top, r.width() + 1, r.height() + 1);
- _gui->_wm.popCursor();
+ _gui->_wm->popCursor();
return _pressedButton;
}
diff --git a/engines/wage/gui.cpp b/engines/wage/gui.cpp
index 49c38e29a4..ee997ad04d 100644
--- a/engines/wage/gui.cpp
+++ b/engines/wage/gui.cpp
@@ -93,10 +93,10 @@ Gui::Gui(WageEngine *engine) {
_sceneDirty = true;
_screen.create(g_system->getWidth(), g_system->getHeight(), Graphics::PixelFormat::createFormatCLUT8());
- _wm._mode |= Graphics::kWMNoScummVMWallpaper;
- _wm.setScreen(&_screen);
+ _wm = new Graphics::MacWindowManager(Graphics::kWMNoScummVMWallpaper);
+ _wm->setScreen(&_screen);
- _menu = _wm.addMenu();
+ _menu = _wm->addMenu();
_menu->setCommandsCallback(menuCommandsCallback, this);
@@ -121,7 +121,7 @@ Gui::Gui(WageEngine *engine) {
_menu->enableCommand(kMenuEdit, kMenuActionPaste, true);
}
- _sceneWindow = _wm.addWindow(false, false, false);
+ _sceneWindow = _wm->addWindow(false, false, false);
_sceneWindow->setCallback(sceneWindowCallback, this);
//TODO: Make the font we use here work
@@ -131,7 +131,7 @@ Gui::Gui(WageEngine *engine) {
uint maxWidth = _screen.w;
- _consoleWindow = _wm.addTextWindow(font, kColorBlack, kColorWhite, maxWidth, Graphics::kTextAlignLeft, _menu);
+ _consoleWindow = _wm->addTextWindow(font, kColorBlack, kColorWhite, maxWidth, Graphics::kTextAlignLeft, _menu);
loadBorders();
}
@@ -139,11 +139,12 @@ Gui::Gui(WageEngine *engine) {
Gui::~Gui() {
_screen.free();
_console.free();
+ delete _wm;
}
void Gui::draw() {
if (_engine->_isGameOver) {
- _wm.draw();
+ _wm->draw();
return;
}
@@ -160,12 +161,12 @@ void Gui::draw() {
_sceneWindow->setTitle(_scene->_name);
_consoleWindow->setDimensions(*_scene->_textBounds);
- _wm.setFullRefresh(true);
+ _wm->setFullRefresh(true);
}
drawScene();
- _wm.draw();
+ _wm->draw();
_sceneDirty = false;
}
@@ -252,7 +253,7 @@ bool Gui::processEvent(Common::Event &event) {
_menu->enableCommand(kMenuEdit, kMenuActionPaste, true);
}
- return _wm.processEvent(event);
+ return _wm->processEvent(event);
}
void menuCommandsCallback(int action, Common::String &text, void *data) {
@@ -350,7 +351,7 @@ const Graphics::MacFont *Gui::getConsoleMacFont() {
}
const Graphics::Font *Gui::getConsoleFont() {
- return _wm._fontMan->getFont(*getConsoleMacFont());
+ return _wm->_fontMan->getFont(*getConsoleMacFont());
}
void Gui::appendText(const char *s) {
diff --git a/engines/wage/gui.h b/engines/wage/gui.h
index cb57392d03..a3f3c4d52a 100644
--- a/engines/wage/gui.h
+++ b/engines/wage/gui.h
@@ -159,7 +159,7 @@ public:
Scene *_scene;
- Graphics::MacWindowManager _wm;
+ Graphics::MacWindowManager *_wm;
Graphics::MacWindow *_sceneWindow;
Graphics::MacTextWindow *_consoleWindow;
Commit: 6aea4cb68bc0c9e80529d1e7cdddc81ea0d122cd
https://github.com/scummvm/scummvm/commit/6aea4cb68bc0c9e80529d1e7cdddc81ea0d122cd
Author: ysj1173886760 (1173886760 at qq.com)
Date: 2021-03-27T13:05:31+01:00
Commit Message:
GRAPHICS: MACGUI: fix the bug of MacTextWindow incorrectly drawing the surface
Changed paths:
graphics/macgui/mactextwindow.cpp
diff --git a/graphics/macgui/mactextwindow.cpp b/graphics/macgui/mactextwindow.cpp
index 8d6751c36d..bfd466ab49 100644
--- a/graphics/macgui/mactextwindow.cpp
+++ b/graphics/macgui/mactextwindow.cpp
@@ -154,7 +154,7 @@ bool MacTextWindow::draw(bool forceRedraw) {
_cursorDirty = false;
// Compose
- _mactext->draw(_composeSurface, 0, _scrollPos, _composeSurface->w - 2, _scrollPos + _composeSurface->h - 2, kConWOverlap - 2, kConWOverlap - 2);
+ _mactext->draw(_composeSurface, 0, _scrollPos, _composeSurface->w - 2, _scrollPos + _composeSurface->h - 2, 1, 1);
if (_cursorState)
_composeSurface->blitFrom(*_cursorSurface, *_cursorRect, Common::Point(_cursorX + kConWOverlap - 2, _cursorY + kConHOverlap - 2));
@@ -162,8 +162,6 @@ bool MacTextWindow::draw(bool forceRedraw) {
if (_selectedText.endY != -1)
drawSelection();
- _composeSurface->transBlitFrom(_borderSurface, _wm->_colorGreen);
-
return true;
}
@@ -171,7 +169,9 @@ bool MacTextWindow::draw(ManagedSurface *g, bool forceRedraw) {
if (!draw(forceRedraw))
return false;
- g->transBlitFrom(*_composeSurface, _composeSurface->getBounds(), Common::Point(_dims.left - 2, _dims.top - 2), _wm->_colorGreen2);
+ g->blitFrom(*_composeSurface, Common::Rect(0, 0, _composeSurface->w, _composeSurface->h), Common::Point(_innerDims.left, _innerDims.top));
+ uint32 transcolor = (_wm->_pixelformat.bytesPerPixel == 1) ? _wm->_colorGreen : 0;
+ g->transBlitFrom(_borderSurface, Common::Rect(0, 0, _borderSurface.w, _borderSurface.h), Common::Point(_dims.left, _dims.top), transcolor);
return true;
}
Commit: 8e8219d0ea724547163875d2ff599308ce1b877c
https://github.com/scummvm/scummvm/commit/8e8219d0ea724547163875d2ff599308ce1b877c
Author: ysj1173886760 (1173886760 at qq.com)
Date: 2021-03-27T13:05:31+01:00
Commit Message:
GRAPHICS: MACGUI: fix the bug when splitting a new line
Changed paths:
graphics/macgui/mactext.cpp
graphics/macgui/mactextwindow.cpp
diff --git a/graphics/macgui/mactext.cpp b/graphics/macgui/mactext.cpp
index 75e513f8fc..a99de25142 100644
--- a/graphics/macgui/mactext.cpp
+++ b/graphics/macgui/mactext.cpp
@@ -366,7 +366,7 @@ void MacText::splitString(const Common::U32String &str, int curLine) {
// TODO::code is not elegant, we need to figure out a way which include all situations
if (curLine == -1)
- curLine = _textLines.size() - 1;
+ curLine = _textLines.size();
if (_textLines.empty()) {
_textLines.resize(1);
@@ -850,7 +850,7 @@ void MacText::resize(int w, int h) {
}
void MacText::appendText(const Common::U32String &str, int fontId, int fontSize, int fontSlant, bool skipAdd) {
- appendTextDefault(str, skipAdd);
+// appendTextDefault(str, skipAdd);
uint oldLen = _textLines.size();
MacFontRun fontRun = MacFontRun(_wm, fontId, fontSlant, fontSize, 0, 0, 0);
@@ -929,7 +929,6 @@ void MacText::removeLastLine() {
void MacText::draw(ManagedSurface *g, int x, int y, int w, int h, int xoff, int yoff) {
if (_textLines.empty())
return;
-
render();
if (x + w < _surface->w || y + h < _surface->h)
diff --git a/graphics/macgui/mactextwindow.cpp b/graphics/macgui/mactextwindow.cpp
index bfd466ab49..51cd322ab4 100644
--- a/graphics/macgui/mactextwindow.cpp
+++ b/graphics/macgui/mactextwindow.cpp
@@ -465,9 +465,6 @@ void MacTextWindow::undrawInput() {
for (uint i = 0; i < _inputTextHeight; i++)
_mactext->removeLastLine();
- if (_inputTextHeight)
- appendText("\n", _font, true);
-
_inputTextHeight = 0;
}
Commit: db6a0fce540fa4c063609821c52ecfb08019fa44
https://github.com/scummvm/scummvm/commit/db6a0fce540fa4c063609821c52ecfb08019fa44
Author: ysj1173886760 (1173886760 at qq.com)
Date: 2021-03-27T13:05:31+01:00
Commit Message:
GRAPHICS: MACGUI: fix the problem of incorrectly render the cursor and selected area
Changed paths:
graphics/macgui/mactextwindow.cpp
diff --git a/graphics/macgui/mactextwindow.cpp b/graphics/macgui/mactextwindow.cpp
index 51cd322ab4..71df2b6fc7 100644
--- a/graphics/macgui/mactextwindow.cpp
+++ b/graphics/macgui/mactextwindow.cpp
@@ -157,7 +157,7 @@ bool MacTextWindow::draw(bool forceRedraw) {
_mactext->draw(_composeSurface, 0, _scrollPos, _composeSurface->w - 2, _scrollPos + _composeSurface->h - 2, 1, 1);
if (_cursorState)
- _composeSurface->blitFrom(*_cursorSurface, *_cursorRect, Common::Point(_cursorX + kConWOverlap - 2, _cursorY + kConHOverlap - 2));
+ _composeSurface->blitFrom(*_cursorSurface, *_cursorRect, Common::Point(_cursorX + 1, _cursorY + 1));
if (_selectedText.endY != -1)
drawSelection();
@@ -229,7 +229,7 @@ void MacTextWindow::drawSelection() {
numLines--;
}
- byte *ptr = (byte *)_composeSurface->getBasePtr(x1 + kConWOverlap - 2, y + kConWOverlap - 2);
+ byte *ptr = (byte *)_composeSurface->getBasePtr(x1 + 1, y + 1);
for (int x = x1; x < x2; x++, ptr++)
if (*ptr == _wm->_colorBlack)
@@ -318,6 +318,7 @@ bool MacTextWindow::processEvent(Common::Event &event) {
case Common::KEYCODE_RETURN:
undrawInput();
+ _inputIsDirty = true; // we force it to redraw input
return false; // Pass it to the higher level for processing
default:
More information about the Scummvm-git-logs
mailing list