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

neuromancer noreply at scummvm.org
Tue May 28 18:55:18 UTC 2024


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

Summary:
f2c42b45b2 FREESCAPE: fixes for eclipse (dos)
fadf91a5af FREESCAPE: better script execution in castle


Commit: f2c42b45b24c456c5f0c4e2a8b1e5691906ec194
    https://github.com/scummvm/scummvm/commit/f2c42b45b24c456c5f0c4e2a8b1e5691906ec194
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-05-28T20:53:44+02:00

Commit Message:
FREESCAPE: fixes for eclipse (dos)

Changed paths:
    engines/freescape/games/eclipse/dos.cpp
    engines/freescape/movement.cpp


diff --git a/engines/freescape/games/eclipse/dos.cpp b/engines/freescape/games/eclipse/dos.cpp
index 538664ebee3..2efa176b82c 100644
--- a/engines/freescape/games/eclipse/dos.cpp
+++ b/engines/freescape/games/eclipse/dos.cpp
@@ -72,7 +72,7 @@ static const CGAPaletteEntry rawCGAPaletteByArea[] {
 };
 
 void EclipseEngine::initDOS() {
-	_viewArea = Common::Rect(40, 32, 280, 132);
+	_viewArea = Common::Rect(40, 33, 280, 133);
 	_rawCGAPaletteByArea = (const CGAPaletteEntry *)&rawCGAPaletteByArea;
 }
 
@@ -145,7 +145,7 @@ void EclipseEngine::drawDOSUI(Graphics::Surface *surface) {
 	uint32 black = _gfx->_texturePixelFormat.ARGBToColor(0xFF, 0x00, 0x00, 0x00);
 	uint32 white = _gfx->_texturePixelFormat.ARGBToColor(0xFF, 0xFF, 0xFF, 0xFF);
 	uint32 red = _gfx->_texturePixelFormat.ARGBToColor(0xFF, 0xFF, 0x00, 0x00);
-	uint32 blue = _gfx->_texturePixelFormat.ARGBToColor(0xFF, 0x00, 0x00, 0xFF);
+	uint32 blue = _gfx->_texturePixelFormat.ARGBToColor(0xFF, 0x55, 0x55, 0xFF);
 	uint32 green = _gfx->_texturePixelFormat.ARGBToColor(0xFF, 0x55, 0xFF, 0x55);
 	uint32 redish = _gfx->_texturePixelFormat.ARGBToColor(0xFF, 0xFF, 0x55, 0x55);
 
diff --git a/engines/freescape/movement.cpp b/engines/freescape/movement.cpp
index fdde8ecd6c7..aeb6334c4af 100644
--- a/engines/freescape/movement.cpp
+++ b/engines/freescape/movement.cpp
@@ -131,9 +131,6 @@ void FreescapeEngine::traverseEntrance(uint16 entranceID) {
 	}
 
 	_pitch = rotation.x();
-	// This is a workaround to avoid the camera looking at direct angles,
-	// polygons tends to disappear where the colinear
-	_pitch++;
 	if (rotation.y() > 0 && rotation.y() <= 45)
 		_yaw = rotation.y();
 	else if (rotation.y() <= 0 || (rotation.y() >= 180 && rotation.y() < 270))
@@ -228,7 +225,7 @@ void FreescapeEngine::changePlayerHeight(int index) {
 	int delta = 0;
 	if (scale == 2)
 		delta = 8;
-	else if (scale == 4)
+	else if (scale == 4 || scale == 5)
 		delta = 12;
 
 	_position.setValue(1, _position.y() - _playerHeight);


Commit: fadf91a5af7615ea742723e61243a7b1debe3edb
    https://github.com/scummvm/scummvm/commit/fadf91a5af7615ea742723e61243a7b1debe3edb
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-05-28T20:53:44+02:00

Commit Message:
FREESCAPE: better script execution in castle

Changed paths:
    engines/freescape/games/castle/castle.cpp
    engines/freescape/games/castle/castle.h
    engines/freescape/language/instruction.cpp


diff --git a/engines/freescape/games/castle/castle.cpp b/engines/freescape/games/castle/castle.cpp
index 85b8bd220b0..b9db18b1873 100644
--- a/engines/freescape/games/castle/castle.cpp
+++ b/engines/freescape/games/castle/castle.cpp
@@ -485,6 +485,16 @@ void CastleEngine::checkSensors() {
 	}*/
 }
 
+void CastleEngine::updateTimeVariables() {
+	if (_gameStateControl != kFreescapeGameStatePlaying)
+		return;
+	// This function only executes "on collision" room/global conditions
+
+	if (_gameStateVars[32] > 0) { // Key collected!
+		setGameBit(_gameStateVars[32]);
+		_gameStateVars[32] = 0;
+	}
+}
 
 Common::Error CastleEngine::saveGameStreamExtended(Common::WriteStream *stream, bool isAutosave) {
 	return Common::kNoError;
diff --git a/engines/freescape/games/castle/castle.h b/engines/freescape/games/castle/castle.h
index b354594c070..fffaca97159 100644
--- a/engines/freescape/games/castle/castle.h
+++ b/engines/freescape/games/castle/castle.h
@@ -37,6 +37,7 @@ public:
 	void drawEnergyMeter(Graphics::Surface *surface);
 	void pressedKey(const int keycode) override;
 	void checkSensors() override;
+	void updateTimeVariables() override;
 
 	void executePrint(FCLInstruction &instruction) override;
 	void gotoArea(uint16 areaID, int entranceID) override;
diff --git a/engines/freescape/language/instruction.cpp b/engines/freescape/language/instruction.cpp
index 3681d50005d..8be4ebf2610 100644
--- a/engines/freescape/language/instruction.cpp
+++ b/engines/freescape/language/instruction.cpp
@@ -237,17 +237,24 @@ void FreescapeEngine::executeCode(FCLInstructionVector &code, bool shot, bool co
 			executeStartAnim(instruction);
 			break;
 		case Token::BITNOTEQ:
-			if (executeEndIfBitNotEqual(instruction))
-				ip = codeSize;
+			if (executeEndIfBitNotEqual(instruction)) {
+				if (isCastle())
+					skip = true;
+				else
+					ip = codeSize;
+			}
 			break;
 		case Token::INVISQ:
-			if (executeEndIfVisibilityIsEqual(instruction))
-				ip = codeSize;
+			if (executeEndIfVisibilityIsEqual(instruction)) {
+				if (isCastle())
+					skip = true;
+				else
+					ip = codeSize;
+			}
 			break;
 		}
 		ip++;
 	}
-	return;
 }
 
 void FreescapeEngine::executeRedraw(FCLInstruction &instruction) {




More information about the Scummvm-git-logs mailing list