[Scummvm-cvs-logs] scummvm master -> 31d47d6be255d960d61805ea739bc02ef677136e

bluegr bluegr at gmail.com
Fri Jan 8 01:02:42 CET 2016


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

Summary:
5151ec0fe0 GRAPHICS: Silence an MSVC warning
5b5efd4cbe LAB: Use the same text rect in monitors for DOS and Windows versions
e3b9f726a1 LAB: Remove superfluous class variables
31d47d6be2 LAB: Bugfixes for the lowres DOS version


Commit: 5151ec0fe0c132e9e3421e51b2aaa2d16d47a464
    https://github.com/scummvm/scummvm/commit/5151ec0fe0c132e9e3421e51b2aaa2d16d47a464
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2016-01-08T02:01:27+02:00

Commit Message:
GRAPHICS: Silence an MSVC warning

Changed paths:
    graphics/fonts/ttf.cpp



diff --git a/graphics/fonts/ttf.cpp b/graphics/fonts/ttf.cpp
index 98420f6..76b7f73 100644
--- a/graphics/fonts/ttf.cpp
+++ b/graphics/fonts/ttf.cpp
@@ -277,7 +277,7 @@ bool TTFFont::load(Common::SeekableReadStream &stream, int size, TTFSizeMode siz
 }
 
 int TTFFont::computePointSize(int size, TTFSizeMode sizeMode) const {
-	int ptSize;
+	int ptSize = 0;
 	switch (sizeMode) {
 	case kTTFSizeModeCell: {
 		ptSize = readPointSizeFromVDMXTable(size);


Commit: 5b5efd4cbe4a592c654788c612f7229ee45822a0
    https://github.com/scummvm/scummvm/commit/5b5efd4cbe4a592c654788c612f7229ee45822a0
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2016-01-08T02:01:27+02:00

Commit Message:
LAB: Use the same text rect in monitors for DOS and Windows versions

The Windows rectangle looks better than the DOS one, with some small
spacing on the top left. This is a minor enhancement, and it does help
to make the monitors slightly better. Also, this helps us clean up the
monitor code a bit

Changed paths:
    engines/lab/engine.cpp



diff --git a/engines/lab/engine.cpp b/engines/lab/engine.cpp
index cd47342..5dffa64 100644
--- a/engines/lab/engine.cpp
+++ b/engines/lab/engine.cpp
@@ -181,54 +181,41 @@ bool LabEngine::doCloseUp(const CloseData *closePtr) {
 	if (!closePtr)
 		return false;
 
-	int luteRight;
-	Common::Rect textRect;
-
-	if (getPlatform() != Common::kPlatformWindows) {
-		textRect = Common::Rect(0, 0, 319, 165);
-		luteRight = 124;
-	} else {
-		textRect = Common::Rect(2, 2, 317, 165);
-		luteRight = 128;
-	}
+	Common::Rect textRect(2, 2, 317, 165);
+	bool isInteractive = false;
 
 	switch (closePtr->_closeUpType) {
 	case kMonitorMuseum:
 	case kMonitorLibrary:
 	case kMonitorWindow:
-		doMonitor(closePtr->_graphicName, closePtr->_message, false, textRect);
 		break;
 	case kMonitorGramophone:
 		textRect.right = 171;
-		doMonitor(closePtr->_graphicName, closePtr->_message, false, textRect);
 		break;
 	case kMonitorUnicycle:
 		textRect.left = 100;
-		doMonitor(closePtr->_graphicName, closePtr->_message, false, textRect);
 		break;
 	case kMonitorStatue:
 		textRect.left = 117;
-		doMonitor(closePtr->_graphicName, closePtr->_message, false, textRect);
 		break;
 	case kMonitorTalisman:
 		textRect.right = 184;
-		doMonitor(closePtr->_graphicName, closePtr->_message, false, textRect);
 		break;
 	case kMonitorLute:
-		textRect.right = luteRight;
-		doMonitor(closePtr->_graphicName, closePtr->_message, false, textRect);
+		textRect.right = 128;
 		break;
 	case kMonitorClock:
 		textRect.right = 206;
-		doMonitor(closePtr->_graphicName, closePtr->_message, false, textRect);
 		break;
 	case kMonitorTerminal:
-		doMonitor(closePtr->_graphicName, closePtr->_message, true, textRect);
+		isInteractive = true;
 		break;
 	default:
 		return false;
 	}
 
+	doMonitor(closePtr->_graphicName, closePtr->_message, isInteractive, textRect);
+
 	_curFileName = " ";
 	_graphics->drawPanel();
 


Commit: e3b9f726a1361d60cf693429095950826766fe93
    https://github.com/scummvm/scummvm/commit/e3b9f726a1361d60cf693429095950826766fe93
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2016-01-08T02:01:28+02:00

Commit Message:
LAB: Remove superfluous class variables

Changed paths:
    engines/lab/anim.cpp
    engines/lab/anim.h



diff --git a/engines/lab/anim.cpp b/engines/lab/anim.cpp
index 01ca905..6e2f6fd 100644
--- a/engines/lab/anim.cpp
+++ b/engines/lab/anim.cpp
@@ -62,8 +62,6 @@ Anim::Anim(LabEngine *vm) : _vm(vm) {
 	_stopPlayingEnd = false;
 	_sampleSpeed = 0;
 	_doBlack = false;
-	_diffWidth = 0;
-	_diffHeight = 0;
 
 	for (int i = 0; i < 3 * 256; i++)
 		_diffPalette[i] = 0;
@@ -97,7 +95,7 @@ void Anim::diffNextFrame(bool onlyDiffData) {
 		startOfBuf = _vm->_graphics->getCurrentDrawingBuffer();
 		drawOnScreen = true;
 	}
-	byte *endOfBuf = startOfBuf + (int)_diffWidth * _diffHeight;
+	byte *endOfBuf = startOfBuf + (int)_headerdata._width * _headerdata._height;
 
 	int curBit = 0;
 
@@ -328,9 +326,7 @@ void Anim::readDiff(Common::File *diffFile, bool playOnce, bool onlyDiffData) {
 	_diffFile->skip(_size - 18);
 
 	_continuous = CONTINUOUS & _headerdata._flags;
-	_diffWidth = _headerdata._width;
-	_diffHeight = _headerdata._height;
-	_vm->_utils->setBytesPerRow(_diffWidth);
+	_vm->_utils->setBytesPerRow(_headerdata._width);
 
 	delete[] _scrollScreenBuffer;
 	_scrollScreenBuffer = nullptr;
diff --git a/engines/lab/anim.h b/engines/lab/anim.h
index bdb02e3..7006787 100644
--- a/engines/lab/anim.h
+++ b/engines/lab/anim.h
@@ -62,8 +62,6 @@ private:
 	uint32 _size;
 	bool _stopPlayingEnd;
 	uint16 _sampleSpeed;
-	uint32 _diffWidth;
-	uint32 _diffHeight;
 
 	byte *_outputBuffer;
 	DIFFHeader _headerdata;


Commit: 31d47d6be255d960d61805ea739bc02ef677136e
    https://github.com/scummvm/scummvm/commit/31d47d6be255d960d61805ea739bc02ef677136e
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2016-01-08T02:01:28+02:00

Commit Message:
LAB: Bugfixes for the lowres DOS version

The lowres DOS version should be working properly now

Changed paths:
    engines/lab/eventman.cpp
    engines/lab/interface.cpp
    engines/lab/speciallocks.cpp
    engines/lab/utils.cpp



diff --git a/engines/lab/eventman.cpp b/engines/lab/eventman.cpp
index b134837..f9b3d2f 100644
--- a/engines/lab/eventman.cpp
+++ b/engines/lab/eventman.cpp
@@ -78,17 +78,7 @@ Button *EventManager::checkButtonHit(ButtonList *buttonList, Common::Point pos)
 		Common::Rect buttonRect(button->_x, button->_y, button->_x + button->_image->_width - 1, button->_y + button->_image->_height - 1);
 
 		if (buttonRect.contains(pos) && button->_isEnabled) {
-			if (_vm->_isHiRes) {
-				_hitButton = button;
-			} else {
-				button->_altImage->drawImage(button->_x, button->_y);
-
-				for (int i = 0; i < 3; i++)
-					_vm->waitTOF();
-
-				button->_image->drawImage(button->_x, button->_y);
-			}
-
+			_hitButton = button;
 			return button;
 		}
 	}
@@ -156,7 +146,7 @@ void EventManager::processInput() {
 		switch (event.type) {
 		case Common::EVENT_LBUTTONDOWN:
 			if (_screenButtonList)
-				curButton = checkButtonHit(_screenButtonList, _vm->_isHiRes ? _mousePos : Common::Point(_mousePos.x / 2, _mousePos.y));
+				curButton = checkButtonHit(_screenButtonList, _mousePos);
 
 			if (curButton)
 				_lastButtonHit = curButton;
diff --git a/engines/lab/interface.cpp b/engines/lab/interface.cpp
index 30f2f13..41a9047 100644
--- a/engines/lab/interface.cpp
+++ b/engines/lab/interface.cpp
@@ -124,8 +124,6 @@ IntuiMessage *EventManager::getMsg() {
 		message._msgClass = (_leftClick) ? kMessageLeftClick : kMessageRightClick;
 		message._qualifier = 0;
 		message._mouse = _mousePos;
-		if (!_vm->_isHiRes)
-			message._mouse.x /= 2;
 		_leftClick = _rightClick = false;
 		return &message;
 	} else if (_keyPressed.keycode != Common::KEYCODE_INVALID) {
diff --git a/engines/lab/speciallocks.cpp b/engines/lab/speciallocks.cpp
index fe70b0f..6470e58 100644
--- a/engines/lab/speciallocks.cpp
+++ b/engines/lab/speciallocks.cpp
@@ -323,11 +323,7 @@ void SpecialLocks::changeCombination(uint16 number) {
 	byte *buffer = new byte[_numberImages[1]->_width * _numberImages[1]->_height * 2];
 
 	for (int i = 1; i <= (_numberImages[combnum]->_height / 2); i++) {
-		if (_vm->_isHiRes) {
-			if (i & 1)
-				_vm->waitTOF();
-		}
-		else
+		if (i & 1)
 			_vm->waitTOF();
 
 		display.setData(_vm->_graphics->getCurrentDrawingBuffer(), false);
diff --git a/engines/lab/utils.cpp b/engines/lab/utils.cpp
index a1409d2..957e996 100644
--- a/engines/lab/utils.cpp
+++ b/engines/lab/utils.cpp
@@ -162,7 +162,7 @@ void Utils::verticalUnDiff(T *dest, Common::File *sourceFile, uint16 bytesPerRow
 
 				while (copy) {
 					if (bytesPerWord == 1)
-						*curPtr++ = sourceFile->readByte();
+						*curPtr = sourceFile->readByte();
 					else if (bytesPerWord == 2)
 						*curPtr = sourceFile->readUint16LE();
 					else if (bytesPerWord == 4)






More information about the Scummvm-git-logs mailing list