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

neuromancer noreply at scummvm.org
Sun Jul 7 21:24:50 UTC 2024


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

Summary:
8829117ae7 FREESCAPE: added more entries in detection tables
4a3274818e FREESCAPE: improved loading of castle for zx
987bf66a76 FREESCAPE: added energy display in eclipse for zx
8213f21530 FREESCAPE: reimplemented how player change its height
c2af02c89c FREESCAPE: implemented compass for eclipse in zx
b3de31db39 FREESCAPE: small fix in renderer


Commit: 8829117ae7dc9148f2b46e57dac03b5b0a024f72
    https://github.com/scummvm/scummvm/commit/8829117ae7dc9148f2b46e57dac03b5b0a024f72
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-07-07T23:14:54+02:00

Commit Message:
FREESCAPE: added more entries in detection tables

Changed paths:
    engines/freescape/detection.cpp


diff --git a/engines/freescape/detection.cpp b/engines/freescape/detection.cpp
index 72a00c90c72..d4b4a41a08a 100644
--- a/engines/freescape/detection.cpp
+++ b/engines/freescape/detection.cpp
@@ -378,7 +378,7 @@ static const ADGameDescription gameDescriptions[] = {
 	// Microstatus release
 	{
 		"darkside",
-		"Encrypted executable with CopyLock",
+		"Encrypted executable with CopyLock, follow the instructions here: https://wiki.scummvm.org/index.php?title=Freescape/DRM",
 		{
 			{"0.DRK", 0, "c19bc332f6550e21e7b8ef79bcf3d99e", 81840},
 			{"1.DRK", 0, "9e700d991054f4393b1ccef706586b5b", 223272},
@@ -389,6 +389,19 @@ static const ADGameDescription gameDescriptions[] = {
 		ADGF_UNSUPPORTED,
 		GUIO2(GUIO_NOMIDI, GUIO_RENDERATARIST)
 	},
+	{ // Stampede AtariST, Issue 1
+		"darkside",
+		"",
+		{
+			{"0.DRK", 0, "86794a6cb2d371cdf892a2173e3b7568", 47966},
+			{"1.DRK", 0, "9e700d991054f4393b1ccef706586b5b", 223272},
+  			AD_LISTEND
+		},
+		Common::EN_ANY,
+		Common::kPlatformAtariST,
+		ADGF_UNSTABLE,
+		GUIO2(GUIO_NOMIDI, GUIO_RENDERATARIST)
+	},
 	// Stampede Amiga, Issue 1, July 1990
 	{
 		"darkside",


Commit: 4a3274818e23931ed25aed2e74989ce0540f3db9
    https://github.com/scummvm/scummvm/commit/4a3274818e23931ed25aed2e74989ce0540f3db9
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-07-07T23:14:55+02:00

Commit Message:
FREESCAPE: improved loading of castle for zx

Changed paths:
    engines/freescape/games/castle/zx.cpp


diff --git a/engines/freescape/games/castle/zx.cpp b/engines/freescape/games/castle/zx.cpp
index 0d11fe9e2f9..569425b2933 100644
--- a/engines/freescape/games/castle/zx.cpp
+++ b/engines/freescape/games/castle/zx.cpp
@@ -61,6 +61,10 @@ void CastleEngine::loadAssetsZXFullGame() {
 
 	for (auto &it : _areaMap) {
 		it._value->addStructure(_areaMap[255]);
+		for (int16 id = 136; id < 140; id++) {
+			it._value->addObjectFromArea(id, _areaMap[255]);
+		}
+
 		for (int16 id = 214; id < 228; id++) {
 			it._value->addObjectFromArea(id, _areaMap[255]);
 		}


Commit: 987bf66a762d076d13ed53a09479e7bb0b69a65d
    https://github.com/scummvm/scummvm/commit/987bf66a762d076d13ed53a09479e7bb0b69a65d
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-07-07T23:14:55+02:00

Commit Message:
FREESCAPE: added energy display in eclipse for zx

Changed paths:
    engines/freescape/games/eclipse/zx.cpp


diff --git a/engines/freescape/games/eclipse/zx.cpp b/engines/freescape/games/eclipse/zx.cpp
index 630436bec49..e09635fb2ec 100644
--- a/engines/freescape/games/eclipse/zx.cpp
+++ b/engines/freescape/games/eclipse/zx.cpp
@@ -152,11 +152,16 @@ void EclipseEngine::drawZXUI(Graphics::Surface *surface) {
 	_gfx->readFromPalette(7, r, g, b);
 	uint32 gray = _gfx->_texturePixelFormat.ARGBToColor(0xFF, r, g, b);
 
+	_gfx->readFromPalette(5, r, g, b);
+	uint32 blue = _gfx->_texturePixelFormat.ARGBToColor(0xFF, r, g, b);
+
 	_gfx->readFromPalette(2, r, g, b);
 	uint32 red = _gfx->_texturePixelFormat.ARGBToColor(0xFF, r, g, b);
 
+
 	int score = _gameStateVars[k8bitVariableScore];
 	int shield = _gameStateVars[k8bitVariableShield] * 100 / _maxShield;
+	int energy = _gameStateVars[k8bitVariableEnergy];
 	shield = shield < 0 ? 0 : shield;
 
 	uint32 yellow = _gfx->_texturePixelFormat.ARGBToColor(0xFF, 0xFF, 0xFF, 0);
@@ -184,6 +189,12 @@ void EclipseEngine::drawZXUI(Graphics::Surface *surface) {
 
 	drawStringInSurface(shieldStr, x, 161, back, red, surface);
 
+	Common::Rect jarBackground(120, 162, 144, 192 - 4);
+	surface->fillRect(jarBackground, back);
+
+	Common::Rect jarWater(120, 192 - energy - 3, 144, 192 - 4);
+	surface->fillRect(jarWater, blue);
+
 	drawStringInSurface(Common::String('0' + _angleRotationIndex - 3), 79, 141, back, yellow, surface, 'Z' - '$' + 1);
 	drawStringInSurface(Common::String('3' - _playerStepIndex), 63, 141, back, yellow, surface, 'Z' - '$' + 1);
 	drawStringInSurface(Common::String('7' - _playerHeightNumber), 240, 141, back, yellow, surface, 'Z' - '$' + 1);


Commit: 8213f215305efff85c8d136db8d025c9a23293b0
    https://github.com/scummvm/scummvm/commit/8213f215305efff85c8d136db8d025c9a23293b0
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-07-07T23:14:55+02:00

Commit Message:
FREESCAPE: reimplemented how player change its height

Changed paths:
    engines/freescape/freescape.cpp
    engines/freescape/freescape.h
    engines/freescape/games/castle/castle.cpp
    engines/freescape/games/dark/dark.cpp
    engines/freescape/games/driller/driller.cpp
    engines/freescape/games/eclipse/eclipse.cpp
    engines/freescape/movement.cpp


diff --git a/engines/freescape/freescape.cpp b/engines/freescape/freescape.cpp
index 79a35fa303c..deca21116fd 100644
--- a/engines/freescape/freescape.cpp
+++ b/engines/freescape/freescape.cpp
@@ -113,6 +113,7 @@ FreescapeEngine::FreescapeEngine(OSystem *syst, const ADGameDescription *gd)
 	_syncSound = false;
 	_firstSound = false;
 	_playerHeightNumber = 1;
+	_playerHeightMaxNumber = 1;
 	_angleRotationIndex = 0;
 
 	// TODO: this is not the same for every game
diff --git a/engines/freescape/freescape.h b/engines/freescape/freescape.h
index 6149c215464..458e76a57b8 100644
--- a/engines/freescape/freescape.h
+++ b/engines/freescape/freescape.h
@@ -320,7 +320,7 @@ public:
 	Math::Vector3d _position, _rotation, _velocity;
 	Math::Vector3d _lastPosition;
 	int _playerHeightNumber;
-	Common::Array<int> _playerHeights;
+	int _playerHeightMaxNumber;
 	uint16 _playerHeight;
 	uint16 _playerWidth;
 	uint16 _playerDepth;
diff --git a/engines/freescape/games/castle/castle.cpp b/engines/freescape/games/castle/castle.cpp
index dac843fd54b..d071d5a8124 100644
--- a/engines/freescape/games/castle/castle.cpp
+++ b/engines/freescape/games/castle/castle.cpp
@@ -33,9 +33,7 @@ CastleEngine::CastleEngine(OSystem *syst, const ADGameDescription *gd) : Freesca
 		initZX();
 
 	_playerHeightNumber = 1;
-	_playerHeights.push_back(16);
-	_playerHeights.push_back(48);
-	_playerHeight = _playerHeights[_playerHeightNumber];
+	_playerHeightMaxNumber = 1;
 
 	_playerSteps.clear();
 	_playerSteps.push_back(15);
@@ -169,7 +167,6 @@ void CastleEngine::gotoArea(uint16 areaID, int entranceID) {
 void CastleEngine::initGameState() {
 	FreescapeEngine::initGameState();
 	_playerHeightNumber = 1;
-	_playerHeight = _playerHeights[_playerHeightNumber];
 
 	_gameStateVars[k8bitVariableShield] = 16;
 	_gameStateVars[k8bitVariableEnergy] = 1;
diff --git a/engines/freescape/games/dark/dark.cpp b/engines/freescape/games/dark/dark.cpp
index 3a943748082..53f744652a7 100644
--- a/engines/freescape/games/dark/dark.cpp
+++ b/engines/freescape/games/dark/dark.cpp
@@ -43,10 +43,8 @@ DarkEngine::DarkEngine(OSystem *syst, const ADGameDescription *gd) : FreescapeEn
 		initAmigaAtari();
 
 	_playerHeightNumber = 1;
-	_playerHeights.push_back(16);
-	_playerHeights.push_back(48);
+	_playerHeightMaxNumber = 1;
 
-	_playerHeight = _playerHeights[_playerHeightNumber];
 	_playerWidth = 12;
 	_playerDepth = 32;
 	_stepUpDistance = 64;
@@ -178,7 +176,6 @@ void DarkEngine::initGameState() {
 	_gameStateVars[kVariableActiveECDs] = 100;
 
 	_playerHeightNumber = 1;
-	_playerHeight = _playerHeights[_playerHeightNumber];
 	_exploredAreas.clear();
 	_exploredAreas[_startArea] = true;
 
diff --git a/engines/freescape/games/driller/driller.cpp b/engines/freescape/games/driller/driller.cpp
index 82df29c8fbf..bff6aa572ee 100644
--- a/engines/freescape/games/driller/driller.cpp
+++ b/engines/freescape/games/driller/driller.cpp
@@ -59,10 +59,7 @@ DrillerEngine::DrillerEngine(OSystem *syst, const ADGameDescription *gd) : Frees
 		initC64();
 
 	_playerHeightNumber = 1;
-	_playerHeights.push_back(16);
-	_playerHeights.push_back(48);
-	_playerHeights.push_back(80);
-	_playerHeights.push_back(112);
+	_playerHeightMaxNumber = 3;
 
 	_angleRotations.push_back(5);
 	_angleRotations.push_back(10);
@@ -71,7 +68,6 @@ DrillerEngine::DrillerEngine(OSystem *syst, const ADGameDescription *gd) : Frees
 	_angleRotations.push_back(45);
 	_angleRotations.push_back(90);
 
-	_playerHeight = _playerHeights[_playerHeightNumber];
 	_playerWidth = 12;
 	_playerDepth = 32;
 	_stepUpDistance = 64;
@@ -768,7 +764,6 @@ void DrillerEngine::initGameState() {
 	_gameStateVars[k8bitVariableShieldDrillerJet] = _initialJetShield;
 
 	_playerHeightNumber = 1;
-	_playerHeight = _playerHeights[_playerHeightNumber];
 	_demoIndex = 0;
 	_demoEvents.clear();
 
diff --git a/engines/freescape/games/eclipse/eclipse.cpp b/engines/freescape/games/eclipse/eclipse.cpp
index dc5be38cbbb..cd2e3f0567a 100644
--- a/engines/freescape/games/eclipse/eclipse.cpp
+++ b/engines/freescape/games/eclipse/eclipse.cpp
@@ -38,9 +38,7 @@ EclipseEngine::EclipseEngine(OSystem *syst, const ADGameDescription *gd) : Frees
 		initAmigaAtari();
 
 	_playerHeightNumber = 1;
-	_playerHeights.push_back(32);
-	_playerHeights.push_back(48);
-	_playerHeight = _playerHeights[_playerHeightNumber];
+	_playerHeightMaxNumber = 1;
 
 	_playerWidth = 8;
 	_playerDepth = 8;
@@ -74,7 +72,6 @@ void EclipseEngine::initGameState() {
 	FreescapeEngine::initGameState();
 
 	_playerHeightNumber = 1;
-	_playerHeight = _playerHeights[_playerHeightNumber];
 
 	_gameStateVars[k8bitVariableEnergy] = _initialEnergy;
 	_gameStateVars[k8bitVariableShield] = _initialShield;
diff --git a/engines/freescape/movement.cpp b/engines/freescape/movement.cpp
index ddba96598ed..03b58d880df 100644
--- a/engines/freescape/movement.cpp
+++ b/engines/freescape/movement.cpp
@@ -140,18 +140,10 @@ void FreescapeEngine::traverseEntrance(uint16 entranceID) {
 
 	debugC(1, kFreescapeDebugMove, "entrace position: %f %f %f", _position.x(), _position.y(), _position.z());
 
-	int delta = 0;
-	if (scale == 2)
-		delta = 8;
-	else if (scale == 4)
-		delta = 12;
-
-	if (_playerHeightNumber >= 0)
-		_playerHeight = _playerHeights[_playerHeightNumber] + delta;
-	else
-		_playerHeight = 2;
+	// Set the player height
+	_playerHeight = 0;
+	changePlayerHeight(_playerHeightNumber);
 	debugC(1, kFreescapeDebugMove, "player height: %d", _playerHeight);
-	_position.setValue(1, _position.y() + _playerHeight);
 
 	_sensors = _currentArea->getSensors();
 	_gfx->_scale = _currentArea->_scale;
@@ -222,14 +214,10 @@ void FreescapeEngine::shoot() {
 
 void FreescapeEngine::changePlayerHeight(int index) {
 	int scale = _currentArea->getScale();
-	int delta = 0;
-	if (scale == 2)
-		delta = 8;
-	else if (scale == 4 || scale == 5)
-		delta = 12;
 
 	_position.setValue(1, _position.y() - _playerHeight);
-	_playerHeight = _playerHeights[index] + delta;
+	_playerHeight = 32 * (index + 1) - 16 / scale;
+	assert(_playerHeight > 0);
 	_position.setValue(1, _position.y() + _playerHeight);
 }
 
@@ -255,7 +243,7 @@ void FreescapeEngine::rise() {
 		destination.y() = destination.y() + _playerSteps[_playerStepIndex];
 		resolveCollisions(destination);
 	} else {
-		if (_playerHeightNumber == int(_playerHeights.size()) - 1)
+		if (_playerHeightNumber >= _playerHeightMaxNumber)
 			return;
 
 		_playerHeightNumber++;


Commit: c2af02c89c610bf3297836d86378122953ec4dbb
    https://github.com/scummvm/scummvm/commit/c2af02c89c610bf3297836d86378122953ec4dbb
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-07-07T23:14:55+02:00

Commit Message:
FREESCAPE: implemented compass for eclipse in zx

Changed paths:
    engines/freescape/games/eclipse/eclipse.cpp
    engines/freescape/games/eclipse/eclipse.h
    engines/freescape/games/eclipse/zx.cpp


diff --git a/engines/freescape/games/eclipse/eclipse.cpp b/engines/freescape/games/eclipse/eclipse.cpp
index cd2e3f0567a..3d3efa782f7 100644
--- a/engines/freescape/games/eclipse/eclipse.cpp
+++ b/engines/freescape/games/eclipse/eclipse.cpp
@@ -415,6 +415,49 @@ void EclipseEngine::drawAnalogClockHand(Graphics::Surface *surface, int x, int y
 	surface->drawLine(x, y, x+(int)w, y+(int)h, color);
 }
 
+void EclipseEngine::drawCompass(Graphics::Surface *surface, int x, int y, double degrees, double magnitude, uint32 color) {
+	const double degtorad = (M_PI * 2) / 360;
+	double w = magnitude * cos(-degrees * degtorad);
+	double h = magnitude * sin(-degrees * degtorad);
+
+	int dx = 0;
+	int dy = 0;
+
+	// Adjust dx and dy to make the compass look like a compass
+	if (degrees == 0 || degrees == 360) {
+		dx = 0;
+		dy = 2;
+	} else if (degrees > 0 && degrees < 90) {
+		dx = 1;
+		dy = 1;
+	} else if (degrees == 90) {
+		dx = 2;
+		dy = 0;
+	} else if (degrees > 90 && degrees < 180) {
+		dx = 1;
+		dy = -1;
+	} else if (degrees == 180) {
+		dx = 0;
+		dy = 2;
+	} else if (degrees > 180 && degrees < 270) {
+		dx = -1;
+		dy = -1;
+	} else if (degrees == 270) {
+		dx = 2;
+		dy = 0;
+	} else if (degrees > 270 && degrees < 360) {
+		dx = -1;
+		dy = 1;
+	}
+
+	surface->drawLine(x, y, x+(int)w, y+(int)h, color);
+	surface->drawLine(x - dx, y - dy, x+(int)w, y+(int)h, color);
+	surface->drawLine(x + dx, y + dy, x+(int)w, y+(int)h, color);
+
+	surface->drawLine(x - dx, y - dy, x+(int)-w, y+(int)-h, color);
+	surface->drawLine(x + dx, y + dy, x+(int)-w, y+(int)-h, color);
+}
+
 // Copied from BITMAP::circlefill in engines/ags/lib/allegro/surface.cpp
 void fillCircle(Graphics::Surface *surface, int x, int y, int radius, int color) {
 	int cx = 0;
diff --git a/engines/freescape/games/eclipse/eclipse.h b/engines/freescape/games/eclipse/eclipse.h
index 67d197fd8cb..164d3c598c2 100644
--- a/engines/freescape/games/eclipse/eclipse.h
+++ b/engines/freescape/games/eclipse/eclipse.h
@@ -79,6 +79,7 @@ public:
 	void drawZXUI(Graphics::Surface *surface) override;
 	void drawAnalogClock(Graphics::Surface *surface, int x, int y, uint32 colorHand1, uint32 colorHand2, uint32 colorBack);
 	void drawAnalogClockHand(Graphics::Surface *surface, int x, int y, double degrees, double magnitude, uint32 color);
+	void drawCompass(Graphics::Surface *surface, int x, int y, double degrees, double magnitude, uint32 color);
 	void drawEclipseIndicator(Graphics::Surface *surface, int x, int y, uint32 color1, uint32 color2);
 
 	soundFx *load1bPCM(Common::SeekableReadStream *file, int offset);
diff --git a/engines/freescape/games/eclipse/zx.cpp b/engines/freescape/games/eclipse/zx.cpp
index e09635fb2ec..4a94e74302c 100644
--- a/engines/freescape/games/eclipse/zx.cpp
+++ b/engines/freescape/games/eclipse/zx.cpp
@@ -204,6 +204,10 @@ void EclipseEngine::drawZXUI(Graphics::Surface *surface) {
 		drawStringInSurface("<", 240, 141, back, yellow, surface, 'Z' - '$' + 1);
 	}
 	drawAnalogClock(surface, 89, 172, back, back, gray);
+
+	surface->fillRect(Common::Rect(227, 168, 235, 187), gray);
+	drawCompass(surface, 231, 177, _yaw, 10, back);
+
 	drawIndicator(surface, 65, 7, 8);
 	drawEclipseIndicator(surface, 215, 3, front, gray);
 }


Commit: b3de31db3989a66975378400f0155bb0c5050662
    https://github.com/scummvm/scummvm/commit/b3de31db3989a66975378400f0155bb0c5050662
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-07-07T23:14:55+02:00

Commit Message:
FREESCAPE: small fix in renderer

Changed paths:
    engines/freescape/area.cpp


diff --git a/engines/freescape/area.cpp b/engines/freescape/area.cpp
index 9d081616138..8575904ce01 100644
--- a/engines/freescape/area.cpp
+++ b/engines/freescape/area.cpp
@@ -268,7 +268,7 @@ void Area::draw(Freescape::Renderer *gfx, uint32 animationTicks, Math::Vector3d
 				continue;
 
 			distance = object->_boundingBox.distance(centerPlanar);
-			if (distance.length() > 0)
+			if (distance.length() > 0.0001)
 				continue;
 
 			if (planar->getSize().x() == 0) {




More information about the Scummvm-git-logs mailing list