[Scummvm-cvs-logs] scummvm master -> 7c33862a099ffe9cfe308183ca6cd8e16f23b804

bluegr bluegr at gmail.com
Wed Dec 23 23:45:09 CET 2015


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:
7c33862a09 LAB: The second parameter of fade() is always 0


Commit: 7c33862a099ffe9cfe308183ca6cd8e16f23b804
    https://github.com/scummvm/scummvm/commit/7c33862a099ffe9cfe308183ca6cd8e16f23b804
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2015-12-24T00:44:16+02:00

Commit Message:
LAB: The second parameter of fade() is always 0

Changed paths:
    engines/lab/dispman.cpp
    engines/lab/dispman.h
    engines/lab/intro.cpp
    engines/lab/map.cpp
    engines/lab/special.cpp



diff --git a/engines/lab/dispman.cpp b/engines/lab/dispman.cpp
index 8def025..f490503 100644
--- a/engines/lab/dispman.cpp
+++ b/engines/lab/dispman.cpp
@@ -981,19 +981,19 @@ uint16 DisplayMan::fadeNumOut(uint16 num, uint16 res, uint16 counter) {
 	return (num - ((((int32) counter) * ((int32)(num - res))) / 15));
 }
 
-void DisplayMan::fade(bool fadeIn, uint16 res) {
+void DisplayMan::fade(bool fadeIn) {
 	uint16 newPal[16];
 
 	for (int i = 0; i < 16; i++) {
 		for (int palIdx = 0; palIdx < 16; palIdx++) {
 			if (fadeIn)
-				newPal[palIdx] = (0x00F & fadeNumIn(0x00F & _fadePalette[palIdx], 0x00F & res, i)) +
-				(0x0F0 & fadeNumIn(0x0F0 & _fadePalette[palIdx], 0x0F0 & res, i)) +
-				(0xF00 & fadeNumIn(0xF00 & _fadePalette[palIdx], 0xF00 & res, i));
+				newPal[palIdx] = (0x00F & fadeNumIn(0x00F & _fadePalette[palIdx], 0, i)) +
+				(0x0F0 & fadeNumIn(0x0F0 & _fadePalette[palIdx], 0, i)) +
+				(0xF00 & fadeNumIn(0xF00 & _fadePalette[palIdx], 0, i));
 			else
-				newPal[palIdx] = (0x00F & fadeNumOut(0x00F & _fadePalette[palIdx], 0x00F & res, i)) +
-				(0x0F0 & fadeNumOut(0x0F0 & _fadePalette[palIdx], 0x0F0 & res, i)) +
-				(0xF00 & fadeNumOut(0xF00 & _fadePalette[palIdx], 0xF00 & res, i));
+				newPal[palIdx] = (0x00F & fadeNumOut(0x00F & _fadePalette[palIdx], 0, i)) +
+				(0x0F0 & fadeNumOut(0x0F0 & _fadePalette[palIdx], 0, i)) +
+				(0xF00 & fadeNumOut(0xF00 & _fadePalette[palIdx], 0, i));
 		}
 
 		setAmigaPal(newPal);
diff --git a/engines/lab/dispman.h b/engines/lab/dispman.h
index 4be5e69..3761e31 100644
--- a/engines/lab/dispman.h
+++ b/engines/lab/dispman.h
@@ -252,7 +252,7 @@ public:
 	 * Scrolls the display in the y direction by blitting.
 	 */
 	void scrollDisplayY(int16 dy, uint16 x1, uint16 y1, uint16 x2, uint16 y2, byte *buffer);
-	void fade(bool fadein, uint16 res);
+	void fade(bool fadein);
 
 	/**
 	 * Closes a font and frees all memory associated with it.
diff --git a/engines/lab/intro.cpp b/engines/lab/intro.cpp
index 1b4310a..d861276 100644
--- a/engines/lab/intro.cpp
+++ b/engines/lab/intro.cpp
@@ -88,7 +88,7 @@ void Intro::doPictText(const Common::String filename, TextFont *msgFont, bool is
 			if (begin)
 				begin = false;
 			else if (isScreen)
-				_vm->_graphics->fade(false, 0);
+				_vm->_graphics->fade(false);
 
 			int charDrawn = 0;
 			if (isScreen) {
@@ -96,7 +96,7 @@ void Intro::doPictText(const Common::String filename, TextFont *msgFont, bool is
 				_vm->_graphics->rectFillScaled(10, 10, 310, 190);
 
 				charDrawn = _vm->_graphics->flowText(msgFont, (!_vm->_isHiRes) * -1, 5, 7, false, false, true, true, _vm->_utils->vgaRectScale(14, 11, 306, 189), (char *)curText);
-				_vm->_graphics->fade(true, 0);
+				_vm->_graphics->fade(true);
 			} else
 				charDrawn = _vm->_graphics->longDrawMessage(Common::String((char *)curText), false);
 
@@ -108,7 +108,7 @@ void Intro::doPictText(const Common::String filename, TextFont *msgFont, bool is
 
 			if (_quitIntro) {
 				if (isScreen)
-					_vm->_graphics->fade(false, 0);
+					_vm->_graphics->fade(false);
 
 				delete[] textBuffer;
 				return;
@@ -132,7 +132,7 @@ void Intro::doPictText(const Common::String filename, TextFont *msgFont, bool is
 			if (elapsedSeconds > timeDelay) {
 				if (doneFl) {
 					if (isScreen)
-						_vm->_graphics->fade(false, 0);
+						_vm->_graphics->fade(false);
 
 					delete[] textBuffer;
 					return;
@@ -150,7 +150,7 @@ void Intro::doPictText(const Common::String filename, TextFont *msgFont, bool is
 				_quitIntro = true;
 
 				if (isScreen)
-					_vm->_graphics->fade(false, 0);
+					_vm->_graphics->fade(false);
 
 				delete[] textBuffer;
 				return;
@@ -158,7 +158,7 @@ void Intro::doPictText(const Common::String filename, TextFont *msgFont, bool is
 				if (msgClass == kMessageLeftClick) {
 					if (doneFl) {
 						if (isScreen)
-							_vm->_graphics->fade(false, 0);
+							_vm->_graphics->fade(false);
 
 						delete[] textBuffer;
 						return;
@@ -170,7 +170,7 @@ void Intro::doPictText(const Common::String filename, TextFont *msgFont, bool is
 
 				if (_quitIntro) {
 					if (isScreen)
-						_vm->_graphics->fade(false, 0);
+						_vm->_graphics->fade(false);
 
 					delete[] textBuffer;
 					return;
@@ -179,7 +179,7 @@ void Intro::doPictText(const Common::String filename, TextFont *msgFont, bool is
 
 			if (doneFl) {
 				if (isScreen)
-					_vm->_graphics->fade(false, 0);
+					_vm->_graphics->fade(false);
 
 				delete[] textBuffer;
 				return;
@@ -269,7 +269,7 @@ void Intro::introSequence() {
 	}
 
 	_vm->updateMusicAndEvents();
-	_vm->_graphics->fade(true, 0);
+	_vm->_graphics->fade(true);
 
 	for (int times = 0; times < 150; times++) {
 		if (_quitIntro)
@@ -287,7 +287,7 @@ void Intro::introSequence() {
 		_vm->waitTOF();
 	}
 
-	_vm->_graphics->fade(false, 0);
+	_vm->_graphics->fade(false);
 	_vm->_graphics->blackAllScreen();
 	_vm->updateMusicAndEvents();
 
diff --git a/engines/lab/map.cpp b/engines/lab/map.cpp
index 082925a..21b0804 100644
--- a/engines/lab/map.cpp
+++ b/engines/lab/map.cpp
@@ -333,7 +333,7 @@ void LabEngine::drawMap(uint16 curRoom, uint16 curMsg, uint16 floorNum, bool fad
 	_event->mouseHide();
 
 	if (fadeOut)
-		_graphics->fade(false, 0);
+		_graphics->fade(false);
 
 	_graphics->setPen(0);
 	_graphics->rectFill(0, 0, _graphics->_screenWidth - 1, _graphics->_screenHeight - 1);
@@ -385,7 +385,7 @@ void LabEngine::drawMap(uint16 curRoom, uint16 curMsg, uint16 floorNum, bool fad
 		_graphics->flowText(_msgFont, 0, 5, 3, true, true, true, true, _utils->vgaRectScale(14, 148, 134, 186), _rooms[curMsg]._roomMsg.c_str());
 
 	if (fadeIn)
-		_graphics->fade(true, 0);
+		_graphics->fade(true);
 
 	_event->mouseShow();
 }
@@ -452,18 +452,18 @@ void LabEngine::processMap(uint16 curRoom) {
 					uint16 upperFloor = getUpperFloor(curFloor);
 					if (upperFloor != kFloorNone) {
 						curFloor = upperFloor;
-						_graphics->fade(false, 0);
+						_graphics->fade(false);
 						drawMap(curRoom, curMsg, curFloor, false, false);
-						_graphics->fade(true, 0);
+						_graphics->fade(true);
 					}
 				} else if (msgCode == 2) {
 					// Down arrow
 					uint16 lowerFloor = getLowerFloor(curFloor);
 					if (lowerFloor != kFloorNone) {
 						curFloor = lowerFloor;
-						_graphics->fade(false, 0);
+						_graphics->fade(false);
 						drawMap(curRoom, curMsg, curFloor, false, false);
-						_graphics->fade(true, 0);
+						_graphics->fade(true);
 					}
 				}
 			} else if (msgClass == kMessageLeftClick) {
@@ -471,30 +471,30 @@ void LabEngine::processMap(uint16 curRoom) {
 					  && floorVisited(kFloorSurMaze)) {
 					curFloor = kFloorSurMaze;
 
-					_graphics->fade(false, 0);
+					_graphics->fade(false);
 					drawMap(curRoom, curMsg, curFloor, false, false);
-					_graphics->fade(true, 0);
+					_graphics->fade(true);
 				} else if ((curFloor == kFloorMiddle) && _utils->mapRectScale(358, 71, 452, 147).contains(mouseX, mouseY)
 							&& floorVisited(kFloorCarnival)) {
 					curFloor = kFloorCarnival;
 
-					_graphics->fade(false, 0);
+					_graphics->fade(false);
 					drawMap(curRoom, curMsg, curFloor, false, false);
-					_graphics->fade(true, 0);
+					_graphics->fade(true);
 				} else if ((curFloor == kFloorMiddle) && _utils->mapRectScale(557, 325, 653, 401).contains(mouseX, mouseY)
 							&& floorVisited(kFloorMedMaze)) {
 					curFloor = kFloorMedMaze;
 
-					_graphics->fade(false, 0);
+					_graphics->fade(false);
 					drawMap(curRoom, curMsg, curFloor, false, false);
-					_graphics->fade(true, 0);
+					_graphics->fade(true);
 				} else if ((curFloor == kFloorUpper) && _utils->mapRectScale(524, 97, 645, 207).contains(mouseX, mouseY)
 							&& floorVisited(kFloorHedgeMaze)) {
 					curFloor = kFloorHedgeMaze;
 
-					_graphics->fade(false, 0);
+					_graphics->fade(false);
 					drawMap(curRoom, curMsg, curFloor, false, false);
-					_graphics->fade(true, 0);
+					_graphics->fade(true);
 				} else if (mouseX > _utils->mapScaleX(314)) {
 					uint16 oldMsg = curMsg;
 					Common::Rect curCoords;
@@ -563,7 +563,7 @@ void LabEngine::doMap(uint16 curRoom) {
 	_graphics->screenUpdate();
 	processMap(curRoom);
 	_event->attachButtonList(nullptr);
-	_graphics->fade(false, 0);
+	_graphics->fade(false);
 	_graphics->blackAllScreen();
 	_event->mouseHide();
 	_graphics->setPen(0);
diff --git a/engines/lab/special.cpp b/engines/lab/special.cpp
index 7dd42dc..cdbaa7b 100644
--- a/engines/lab/special.cpp
+++ b/engines/lab/special.cpp
@@ -213,7 +213,7 @@ void LabEngine::drawJournal(uint16 wipenum, bool needFade) {
 	_event->toggleButton(_event->getButton(2), 15, (!_lastPage));	// forward button
 
 	if (needFade)
-		_graphics->fade(true, 0);
+		_graphics->fade(true);
 
 	// Reset the journal background, so that all the text that has been blitted on it is erased
 	memcpy(_journalBackImage->_imageData, _blankJournal, _graphics->_screenWidth * _graphics->_screenHeight);
@@ -276,7 +276,7 @@ void LabEngine::doJournal() {
 	_event->mouseShow();
 	processJournal();
 	_event->attachButtonList(nullptr);
-	_graphics->fade(false, 0);
+	_graphics->fade(false);
 	_event->mouseHide();
 
 	delete[] _blankJournal;
@@ -370,9 +370,9 @@ void LabEngine::processMonitor(const char *ntext, TextFont *monitorFont, bool is
 				_monitorTextFilename = test;
 
 				Common::String text = _resource->getText(_monitorTextFilename);
-				_graphics->fade(false, 0);
+				_graphics->fade(false);
 				drawMonText(text.c_str(), monitorFont, textRect, isInteractive);
-				_graphics->fade(true, 0);
+				_graphics->fade(true);
 			}
 		}
 
@@ -463,9 +463,9 @@ void LabEngine::doMonitor(const Common::String background, const Common::String
 	_graphics->loadBackPict(background, _highPalette);
 	drawMonText(ntext.c_str(), monitorFont, scaledRect, isinteractive);
 	_event->mouseShow();
-	_graphics->fade(true, 0);
+	_graphics->fade(true);
 	processMonitor(ntext.c_str(), monitorFont, isinteractive, scaledRect);
-	_graphics->fade(false, 0);
+	_graphics->fade(false);
 	_event->mouseHide();
 	_graphics->closeFont(&monitorFont);
 






More information about the Scummvm-git-logs mailing list