[Scummvm-git-logs] scummvm master -> 87fea610f3905f383d91f34a4b0fa19f308d855c

athrxx noreply at scummvm.org
Sat Apr 30 01:46:47 UTC 2022


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:
87fea610f3 SCUMM: (v1/2) - fix bug no. 6872


Commit: 87fea610f3905f383d91f34a4b0fa19f308d855c
    https://github.com/scummvm/scummvm/commit/87fea610f3905f383d91f34a4b0fa19f308d855c
Author: athrxx (athrxx at scummvm.org)
Date: 2022-04-30T03:45:39+02:00

Commit Message:
SCUMM: (v1/2) - fix bug no. 6872
('I can't reach it" when using reservations terminal in airports)

There was one call to resetSentence() missing. It its the same in v1 and v2. There are 4 calls to this function in the whole code, we did have 3 of these...

I didn't check v0, since I don't have it.

Changed paths:
    engines/scumm/room.cpp
    engines/scumm/scumm.h
    engines/scumm/scumm_v0.h
    engines/scumm/scumm_v2.h


diff --git a/engines/scumm/room.cpp b/engines/scumm/room.cpp
index 406b270644d..67402681850 100644
--- a/engines/scumm/room.cpp
+++ b/engines/scumm/room.cpp
@@ -92,6 +92,13 @@ void ScummEngine::startScene(int room, Actor *a, int objectNr) {
 		_roomVars[i] = 0;
 	nukeArrays(0xFF);
 
+	// I don't know if this also belongs into v0, so I limit it to v1/2.
+	// I do suspect that v0 should have it, since the other use cases in
+	// o_loadRoomWithEgo/o2_loadRoomWithEgo and o_cutscene/o2_cutscene
+	// are also the same.
+	if (_game.version >= 1 && _game.version <= 2)
+		resetSentence();
+
 	for (i = 1; i < _numActors; i++) {
 		_actors[i]->hideActor();
 	}
diff --git a/engines/scumm/scumm.h b/engines/scumm/scumm.h
index d242e64c17f..67832f70b6a 100644
--- a/engines/scumm/scumm.h
+++ b/engines/scumm/scumm.h
@@ -622,6 +622,8 @@ protected:
 	int pop();
 	virtual int readVar(uint var);
 	virtual void writeVar(uint var, int value);
+	// SCUMM 1/2
+	virtual void resetSentence() {}
 
 protected:
 	void beginCutscene(int *args);
diff --git a/engines/scumm/scumm_v0.h b/engines/scumm/scumm_v0.h
index a7e9bba3a8f..3ebcdea9c2c 100644
--- a/engines/scumm/scumm_v0.h
+++ b/engines/scumm/scumm_v0.h
@@ -122,7 +122,7 @@ protected:
 
 	int getActiveObject() override;
 
-	void resetSentence();
+	void resetSentence() override;
 
 	bool areBoxesNeighbors(int box1nr, int box2nr) override;
 
diff --git a/engines/scumm/scumm_v2.h b/engines/scumm/scumm_v2.h
index 425fa349092..c2f311cc8ee 100644
--- a/engines/scumm/scumm_v2.h
+++ b/engines/scumm/scumm_v2.h
@@ -88,7 +88,7 @@ protected:
 	void clearStateCommon(byte type);
 	void stopScriptCommon(int script);
 
-	void resetSentence();
+	void resetSentence() override;
 	void setUserState(byte state);
 
 	void handleMouseOver(bool updateInventory) override;




More information about the Scummvm-git-logs mailing list