[Scummvm-git-logs] scummvm master -> 8133a3131a41f4e732a916716eeb4cd30ac7e92c

mduggan mgithub at guarana.org
Sat Mar 28 09:53:13 UTC 2020


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:
8133a3131a ULTIMA8: Fix 2 small bugs in ScalerGump


Commit: 8133a3131a41f4e732a916716eeb4cd30ac7e92c
    https://github.com/scummvm/scummvm/commit/8133a3131a41f4e732a916716eeb4cd30ac7e92c
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2020-03-28T18:51:09+09:00

Commit Message:
ULTIMA8: Fix 2 small bugs in ScalerGump

1. In the constructor, depending on the scale factor _buffer1 can be NULL after
scaling is set up, so check for that
2. In the 2:1 scaling special case there was a variable name typo which made
the branch impossible to ever take.

Changed paths:
    engines/ultima/ultima8/gumps/scaler_gump.cpp


diff --git a/engines/ultima/ultima8/gumps/scaler_gump.cpp b/engines/ultima/ultima8/gumps/scaler_gump.cpp
index 03d92573dd..27389f71da 100644
--- a/engines/ultima/ultima8/gumps/scaler_gump.cpp
+++ b/engines/ultima/ultima8/gumps/scaler_gump.cpp
@@ -43,7 +43,8 @@ ScalerGump::ScalerGump(int32 x, int32 y, int32 width, int32 height) :
 		_width(width), _height(height) {
 
 	setupScaling();
-	_buffer1->Fill32(0, 0, 0, _dims.w, _dims.h);
+	if (_buffer1)
+		_buffer1->Fill32(0, 0, 0, _dims.w, _dims.h);
 }
 
 ScalerGump::~ScalerGump() {
@@ -231,7 +232,7 @@ void ScalerGump::setupScaling() {
 		// _scaler2 not required
 		if (_width == 640 && _height == 480 &&
 		        _swidth2 == 640 && _sheight2 == 400 &&
-		        _swidth1 == 320 && _sheight2 == 200) {
+		        _swidth1 == 320 && _sheight1 == 200) {
 			return;
 		}
 




More information about the Scummvm-git-logs mailing list