[Scummvm-git-logs] scummvm master -> f7356320e42849ec21ba81540595c0597177698b

dreammaster noreply at scummvm.org
Thu May 15 01:04:09 UTC 2025


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

Summary:
ac6b47101f TSAGE: Fix scaling surfaces to resized boundaries
08e988280d TSAGE: BLUEFORCE: Add missing seagull in marina
0d7dc616a7 TSAGE: BLUEFORCE: Fix bad palette state after The Next Day
ce3adfa3ce TSAGE: BLUEFORCE: Fix tv animation not looping
a1dcca3811 TSAGE: BLUEFORCE: Fix missing chair for the office
f7356320e4 TSAGE: BLUEFORCE: Fix interaction with Hayley at City Hall


Commit: ac6b47101f4e007f8b5b5f8349efd72d756f47b4
    https://github.com/scummvm/scummvm/commit/ac6b47101f4e007f8b5b5f8349efd72d756f47b4
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2025-05-14T18:04:03-07:00

Commit Message:
TSAGE: Fix scaling surfaces to resized boundaries

Makes objects that use a custom zoom level look pixel accurate as compared to the original

Testing was done with Blue Force game only.

Changed paths:
    engines/tsage/graphics.cpp


diff --git a/engines/tsage/graphics.cpp b/engines/tsage/graphics.cpp
index 30eca3fdb5e..b31b8f2d95e 100644
--- a/engines/tsage/graphics.cpp
+++ b/engines/tsage/graphics.cpp
@@ -396,25 +396,36 @@ void GfxSurface::loadScreenSection(Graphics::ManagedSurface &dest, int xHalf, in
 /**
  * Returns an array indicating which pixels of a source image horizontally or vertically get
  * included in a scaled image
+ * If reverse is true, then the scanning of the line of pixels is done from end to start
+ * otherwise the scanning is done from start to end.
  */
-static int *scaleLine(int size, int srcSize) {
+static int *scaleLine(int size, int srcSize, bool reverse) {
 	const int PRECISION_FACTOR = 1000;
 	int scale = PRECISION_FACTOR * size / srcSize;
 	assert(scale >= 0);
 	int *v = new int[size];
 	Common::fill(v, &v[size], -1);
 
-	int distCtr = PRECISION_FACTOR / 2;
+	int distCtr = PRECISION_FACTOR;
 	int *destP = v;
-	for (int distIndex = 0; distIndex < srcSize; ++distIndex) {
-		distCtr += scale;
-		while (distCtr > PRECISION_FACTOR) {
-			assert(destP < &v[size]);
-			*destP++ = distIndex;
-			distCtr -= PRECISION_FACTOR;
+	if (reverse) {
+		destP += size - 1;
+		for (int srcIndex = srcSize - 1; srcIndex >= 0 && destP >= v; --srcIndex) {
+			distCtr += scale;
+			while (distCtr >= PRECISION_FACTOR && destP >= v) {
+				*destP-- = srcIndex; // Include this pixel
+				distCtr -= PRECISION_FACTOR;
+			}
+		}
+	} else {
+		for (int srcIndex = 0; srcIndex < srcSize && destP < &v[size]; ++srcIndex) {
+			distCtr += scale;
+			while (distCtr >= PRECISION_FACTOR && destP < &v[size]) {
+				*destP++ = srcIndex; // Include this pixel
+				distCtr -= PRECISION_FACTOR;
+			}
 		}
 	}
-
 	return v;
 }
 
@@ -432,8 +443,8 @@ static GfxSurface ResizeSurface(GfxSurface &src, int xSize, int ySize, int trans
 	Graphics::Surface srcImage = src.lockSurface();
 	Graphics::Surface destImage = s.lockSurface();
 
-	int *horizUsage = scaleLine(xSize, srcImage.w);
-	int *vertUsage = scaleLine(ySize, srcImage.h);
+	int *horizUsage = scaleLine(xSize, srcImage.w, false);
+	int *vertUsage = scaleLine(ySize, srcImage.h, true);
 
 	// Loop to create scaled version
 	for (int yp = 0; yp < ySize; ++yp) {
@@ -467,7 +478,7 @@ static GfxSurface ResizeSurface(GfxSurface &src, int xSize, int ySize, int trans
 }
 
 /**
- * Copys an area from one GfxSurface to another.
+ * Copies an area from one GfxSurface to another.
  *
  */
 void GfxSurface::copyFrom(GfxSurface &src, Rect srcBounds, Rect destBounds,


Commit: 08e988280d5e1b41cc80f69006ebc8754ec68735
    https://github.com/scummvm/scummvm/commit/08e988280d5e1b41cc80f69006ebc8754ec68735
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2025-05-14T18:04:03-07:00

Commit Message:
TSAGE: BLUEFORCE: Add missing seagull in marina

Changed paths:
    engines/tsage/blue_force/blueforce_scenes3.cpp


diff --git a/engines/tsage/blue_force/blueforce_scenes3.cpp b/engines/tsage/blue_force/blueforce_scenes3.cpp
index 813de064d11..9cbdc188b97 100644
--- a/engines/tsage/blue_force/blueforce_scenes3.cpp
+++ b/engines/tsage/blue_force/blueforce_scenes3.cpp
@@ -2371,6 +2371,13 @@ void Scene342::postInit(SceneObjectList *OwnerList) {
 		}
 	}
 
+	// seagull
+	_object2.postInit();
+	_object2.setVisage(340);
+	_object2.setStrip(2);
+	_object2.animate(ANIM_MODE_2, NULL);
+	_object2._numFrames = 4;
+	_object2._moveDiff = Common::Point(2, 2);
 	switch (BF_GLOBALS._randomSource.getRandomNumber(2)) {
 	case 0:
 		_object2.setPosition(Common::Point(46, 59));


Commit: 0d7dc616a750fd074575fea009b0b90d57d8c6ca
    https://github.com/scummvm/scummvm/commit/0d7dc616a750fd074575fea009b0b90d57d8c6ca
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2025-05-14T18:04:03-07:00

Commit Message:
TSAGE: BLUEFORCE: Fix bad palette state after The Next Day

Fixes awry white-ish colors or very bright colors on some scene elements

The awry colors appear on the house walls (next to the garage) and the action selection wheel popup when brought up.

Changed paths:
    engines/tsage/blue_force/blueforce_scenes1.cpp


diff --git a/engines/tsage/blue_force/blueforce_scenes1.cpp b/engines/tsage/blue_force/blueforce_scenes1.cpp
index fe05783688f..896f093fe76 100644
--- a/engines/tsage/blue_force/blueforce_scenes1.cpp
+++ b/engines/tsage/blue_force/blueforce_scenes1.cpp
@@ -3014,6 +3014,9 @@ void Scene180::signal() {
 		break;
 	case 6:
 		loadScene(1180);
+		// Fix for color glitch (white / very bright color on House walls and the action/verb wheel popup) 
+		// after "The Next Day" message fade out (eg. after the transition between first day and second day morning)
+		BF_GLOBALS._scenePalette.refresh();
 		BF_GLOBALS._sound1.fadeSound(33);
 
 		switch (BF_GLOBALS._bookmark) {


Commit: ce3adfa3ce515969326306d192355fdc5ef64029
    https://github.com/scummvm/scummvm/commit/ce3adfa3ce515969326306d192355fdc5ef64029
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2025-05-14T18:04:03-07:00

Commit Message:
TSAGE: BLUEFORCE: Fix tv animation not looping

The animation would get stuck on a frame (end frame?) before this change

Changed paths:
    engines/tsage/blue_force/blueforce_scenes2.cpp


diff --git a/engines/tsage/blue_force/blueforce_scenes2.cpp b/engines/tsage/blue_force/blueforce_scenes2.cpp
index f5ef620b269..b89797d66f3 100644
--- a/engines/tsage/blue_force/blueforce_scenes2.cpp
+++ b/engines/tsage/blue_force/blueforce_scenes2.cpp
@@ -777,7 +777,7 @@ void Scene265::remove() {
 void Scene270::Action1::signal() {
 	Scene270 *scene = (Scene270 *)BF_GLOBALS._sceneManager._scene;
 
-	scene->setAction(&scene->_sequenceManager2, this, 2703, &scene->_tv, NULL);
+	setAction(&scene->_sequenceManager2, this, 2703, &scene->_tv, NULL);
 }
 
 /*--------------------------------------------------------------------------*/


Commit: a1dcca381113a4850e23d205fea9f7d1a09df699
    https://github.com/scummvm/scummvm/commit/a1dcca381113a4850e23d205fea9f7d1a09df699
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2025-05-14T18:04:03-07:00

Commit Message:
TSAGE: BLUEFORCE: Fix missing chair for the office

Changed paths:
    engines/tsage/blue_force/blueforce_scenes5.cpp


diff --git a/engines/tsage/blue_force/blueforce_scenes5.cpp b/engines/tsage/blue_force/blueforce_scenes5.cpp
index 9e6afbb3a86..18a6c4ef09a 100644
--- a/engines/tsage/blue_force/blueforce_scenes5.cpp
+++ b/engines/tsage/blue_force/blueforce_scenes5.cpp
@@ -896,7 +896,7 @@ void Scene551::dispatch() {
 }
 
 /*--------------------------------------------------------------------------
- * Scene 550 - Study
+ * Scene 560 - Study
  *
  *--------------------------------------------------------------------------*/
 
@@ -953,7 +953,7 @@ void Scene560::Action2::signal() {
 		break;
 	case 2:
 		scene->_field380 = false;
-		scene->_deskChair.setPosition(Common::Point(81, 149));
+		scene->_deskChair.setPosition(Common::Point(81, 149), 44);
 		scene->_deskChair.setVisage(561);
 		scene->_deskChair.setStrip(3);
 		scene->_deskChair.setFrame(1);
@@ -1413,7 +1413,7 @@ void Scene560::postInit(SceneObjectList *OwnerList) {
 	_deskChair.postInit();
 	_deskChair.setVisage(561);
 	_deskChair.setStrip(3);
-	_deskChair.setPosition(Common::Point(81, 149));
+	_deskChair.setPosition(Common::Point(81, 149), 44);
 	_deskChair.fixPriority(151);
 	_deskChair.changeZoom(81);
 


Commit: f7356320e42849ec21ba81540595c0597177698b
    https://github.com/scummvm/scummvm/commit/f7356320e42849ec21ba81540595c0597177698b
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2025-05-14T18:04:03-07:00

Commit Message:
TSAGE: BLUEFORCE: Fix interaction with Hayley at City Hall

Includes minor fixes for Jim too, although one of the fixes is for a seemingly untriggered dialogue

Changed paths:
    engines/tsage/blue_force/blueforce_logic.cpp
    engines/tsage/blue_force/blueforce_scenes3.cpp


diff --git a/engines/tsage/blue_force/blueforce_logic.cpp b/engines/tsage/blue_force/blueforce_logic.cpp
index c43ff6f7b4b..99f731dbcb7 100644
--- a/engines/tsage/blue_force/blueforce_logic.cpp
+++ b/engines/tsage/blue_force/blueforce_logic.cpp
@@ -1249,6 +1249,13 @@ void BlueForceInvObjectList::setObjectScene(int objectNum, int sceneNumber) {
 	T2_GLOBALS._uiElements.updateInventory();
 }
 
+/**
+ * This method is called when the day changes (starting from the change from day 1 to day 2).
+ * It handles setting items to the inventory or their proper location at the start of a day
+ * It also resets the dialogue options for Hayley McCoy (at the City Hall (scene 385))
+ * The method is not called when initializing the game's day to 1.
+ * @param mode The day number
+ */
 void BlueForceInvObjectList::alterInventory(int mode) {
 	// Check for existing specific items in player's inventory
 	bool hasPrintout = getObjectScene(INV_PRINT_OUT) == 1;
@@ -1280,6 +1287,9 @@ void BlueForceInvObjectList::alterInventory(int mode) {
 	setObjectScene(INV_TICKET_BOOK, 60);
 	setObjectScene(INV_MIRANDA_CARD, 60);
 
+	// The dialogue options for talking to Hayley McCoy is reset here for the day change
+	BF_GLOBALS._deziTopic = 0;
+
 	switch (mode) {
 	case 2:
 		if (hasPrintout)
diff --git a/engines/tsage/blue_force/blueforce_scenes3.cpp b/engines/tsage/blue_force/blueforce_scenes3.cpp
index 9cbdc188b97..b06f9b51eb1 100644
--- a/engines/tsage/blue_force/blueforce_scenes3.cpp
+++ b/engines/tsage/blue_force/blueforce_scenes3.cpp
@@ -5269,10 +5269,14 @@ void Scene385::Action1::signal() {
 		case 3857:
 		case 3863:
 		case 3866: {
+			// NOTE: The 3866 seems unused (Hayley says "You know where to find me if you need me")
 			ADD_PLAYER_MOVER(187, 144);
 			break;
 		}
 		default: {
+			// Used in potentially untriggered 3868 (_talkAction value) case.
+			// Jake and Hayley greeting each other using their first names,
+			// but Jake walks up to Jim's location - a  bug?
 			ADD_PLAYER_MOVER(231, 158);
 			break;
 		}
@@ -5286,7 +5290,8 @@ void Scene385::Action1::signal() {
 		scene->_stripManager.start(scene->_talkAction, this);
 		break;
 	case 3:
-		if (scene->_talkAction)
+		// Hayley only points to her left (at Jim) when asked about the blueprints
+		if (scene->_talkAction == 3863)
 			scene->_dezi.animate(ANIM_MODE_5, NULL);
 		BF_GLOBALS._player.enableControl();
 		remove();
@@ -5301,6 +5306,7 @@ void Scene385::Action2::signal() {
 
 	switch (_actionIndex++) {
 	case 0: {
+		BF_GLOBALS._player.disableControl();
 		ADD_PLAYER_MOVER(231, 158);
 		break;
 	}
@@ -5370,7 +5376,9 @@ bool Scene385::Jim::startAction(CursorType action, Event &event) {
 				break;
 			default:
 				BF_GLOBALS._deziTopic = 3;
-				scene->_talkAction = 3868;
+				// Is this ever triggered? It would require a day number > 4
+				// In 3862 (more banter talk) Jake asks "How's life treating you today, Jim?"
+				scene->_talkAction = 3862;
 				break;
 			}
 
@@ -5402,7 +5410,6 @@ bool Scene385::Dezi::startAction(CursorType action, Event &event) {
 		if (BF_GLOBALS._deziTopic == 3) {
 			scene->_talkAction = 3857;
 		} else {
-			BF_GLOBALS._deziTopic = 3;
 
 			switch (BF_GLOBALS._dayNumber) {
 			case 1:
@@ -5434,6 +5441,8 @@ bool Scene385::Dezi::startAction(CursorType action, Event &event) {
 				scene->_talkAction = 3856;
 				break;
 			default:
+				// Is this ever triggered? It would require a day number > 4
+				// In 3868 Jake and Hayley are greeting each other using their first names.
 				BF_GLOBALS._deziTopic = 3;
 				scene->_talkAction = 3868;
 				break;




More information about the Scummvm-git-logs mailing list