[Scummvm-git-logs] scummvm master -> 89cba0db97b0fc3b48cbe612eb30d373d8acee9a

aquadran noreply at scummvm.org
Mon Nov 29 22:31:20 UTC 2021


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
89cba0db97 STARK: Added WA for prompt dialog texture clipping


Commit: 89cba0db97b0fc3b48cbe612eb30d373d8acee9a
    https://github.com/scummvm/scummvm/commit/89cba0db97b0fc3b48cbe612eb30d373d8acee9a
Author: Paweł Kołodziejski (aquadran at gmail.com)
Date: 2021-11-29T23:31:14+01:00

Commit Message:
STARK: Added WA for prompt dialog texture clipping

Changed paths:
    engines/stark/gfx/tinyglsurface.cpp


diff --git a/engines/stark/gfx/tinyglsurface.cpp b/engines/stark/gfx/tinyglsurface.cpp
index 7d92b117a8..478e91c50f 100644
--- a/engines/stark/gfx/tinyglsurface.cpp
+++ b/engines/stark/gfx/tinyglsurface.cpp
@@ -42,6 +42,8 @@ void TinyGLSurfaceRenderer::render(const Texture *texture, const Common::Point &
 }
 
 void TinyGLSurfaceRenderer::render(const Texture *texture, const Common::Point &dest, uint width, uint height) {
+	if (width == 0 || height == 0)
+		return;
 	_gfx->start2DMode();
 
 	Math::Vector2d sizeWH;
@@ -59,6 +61,13 @@ void TinyGLSurfaceRenderer::render(const Texture *texture, const Common::Point &
 	int posX = viewport.getX() * verOffsetXY.getX() + nativeViewport.left;
 	int posY = viewport.getY() * verOffsetXY.getY() + nativeViewport.top;
 	Graphics::BlitTransform transform(posX, posY);
+
+	// WA for not clipped textues in prompt dialog
+	if (width == 256 && height == 256) {
+		blitTextureHeight = viewport.getY() - dest.y;
+		blitTextureWidth = viewport.getX() - dest.x;
+	}
+
 	transform.sourceRectangle(0, 0, blitTextureWidth, blitTextureHeight);
 	transform.tint(1.0, 1.0 - _fadeLevel, 1.0 - _fadeLevel, 1.0 - _fadeLevel);
 	tglBlit(blitImage, transform);




More information about the Scummvm-git-logs mailing list