[Scummvm-git-logs] scummvm master -> 8f96c87d4e709f6e32d52944473ca34f50574d8d
alxpnv
a04198622 at gmail.com
Fri Oct 29 11:49:57 UTC 2021
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:
921f3681c5 ASYLUM: fix clicking a savegame
8f96c87d4e ASYLUM: (Writings puzzle) implement lens distortion
Commit: 921f3681c5942ed81f48cb38b9bac9b4ff0098f4
https://github.com/scummvm/scummvm/commit/921f3681c5942ed81f48cb38b9bac9b4ff0098f4
Author: alxpnv (alxpnv22 at yahoo.com)
Date: 2021-10-29T14:52:45+03:00
Commit Message:
ASYLUM: fix clicking a savegame
Changed paths:
engines/asylum/views/menu.cpp
diff --git a/engines/asylum/views/menu.cpp b/engines/asylum/views/menu.cpp
index bf3aa5f218..c2fc518532 100644
--- a/engines/asylum/views/menu.cpp
+++ b/engines/asylum/views/menu.cpp
@@ -1624,6 +1624,14 @@ void Menu::clickNewGame() {
void Menu::clickLoadGame() {
Common::Point cursor = getCursor()->position();
+ if (g_system->isOverlayVisible()
+ && g_system->getFeatureState(OSystem::kFeatureFullscreenMode)
+ && ConfMan.get("gfx_mode") == "opengl") {
+
+ cursor.x *= 640.0 / g_system->getOverlayWidth();
+ cursor.y *= 480.0 / g_system->getOverlayHeight();
+ }
+
g_system->hideOverlay();
if (_dword_455C80) {
Commit: 8f96c87d4e709f6e32d52944473ca34f50574d8d
https://github.com/scummvm/scummvm/commit/8f96c87d4e709f6e32d52944473ca34f50574d8d
Author: alxpnv (alxpnv22 at yahoo.com)
Date: 2021-10-29T14:52:45+03:00
Commit Message:
ASYLUM: (Writings puzzle) implement lens distortion
Changed paths:
engines/asylum/puzzles/writings.cpp
diff --git a/engines/asylum/puzzles/writings.cpp b/engines/asylum/puzzles/writings.cpp
index 53791f1c1f..656a3ab72f 100644
--- a/engines/asylum/puzzles/writings.cpp
+++ b/engines/asylum/puzzles/writings.cpp
@@ -102,8 +102,6 @@ bool PuzzleWritings::init(const AsylumEvent &) {
}
bool PuzzleWritings::update(const AsylumEvent &) {
- int16 x1, y1, x2, y2;
-
// Adjust palette
if (rnd(10) < 7) {
getScreen()->setPalette(getWorld()->graphicResourceIds[6]);
@@ -124,26 +122,28 @@ bool PuzzleWritings::update(const AsylumEvent &) {
--_frameIndex;
}
- mousePos.x -= 50;
- mousePos.y -= 50;
- x1 = mousePos.x + 20;
- y1 = mousePos.y + 20;
- x2 = mousePos.x + 95;
- y2 = mousePos.y + 90;
- if (y1 < 0)
- y1 = 0;
- if (y2 > 480)
- y2 = 480;
-
// Draw background
getScreen()->clearGraphicsInQueue();
getScreen()->fillRect(0, 0, 640, 480, 253);
getScreen()->draw(getWorld()->graphicResourceIds[4], 0, Common::Point(0, 0), kDrawFlagNone, true);
if (_hasGlassMagnifier) {
- getScreen()->copyToBackBuffer(
- ((byte *)_textSurface.getPixels()) + y1 * _textSurface.pitch + x1 * _textSurface.format.bytesPerPixel,
- _textSurface.pitch, x1, y1, (uint16)(x2 - x1), (uint16)(y2 - y1));
+ mousePos -= Common::Point(50, 50);
+ Common::Rect eyeBall = Common::Rect(0, 0, 640, 480).findIntersectingRect(Common::Rect(mousePos.x + 20, mousePos.y + 20,
+ mousePos.x + 100, mousePos.y + 100));
+ Graphics::Surface subArea, *subArea1;
+ subArea = _textSurface.getSubArea(eyeBall);
+ subArea1 = subArea.scale(3 * eyeBall.width() / 4, 3 * eyeBall.height() / 4);
+ eyeBall.left += 9;
+ eyeBall.top += 9;
+
+ int16 dw, dh;
+ dw = MAX(0, eyeBall.left + subArea1->w - 640);
+ dh = MAX(0, eyeBall.top + subArea1->h - 480);
+ getScreen()->copyToBackBuffer((byte *)subArea1->getPixels(), subArea1->pitch, eyeBall.left, eyeBall.top, subArea1->w - dw, subArea1->h - dh);
+
+ subArea1->free();
+ delete subArea1;
getScreen()->addGraphicToQueueMasked(getWorld()->graphicResourceIds[9], 0, mousePos, getWorld()->graphicResourceIds[8], mousePos, kDrawFlagNone, 2);
getScreen()->addGraphicToQueue(getWorld()->graphicResourceIds[7], (uint32)_frameIndex, mousePos, kDrawFlagNone, 0, 1);
More information about the Scummvm-git-logs
mailing list