[Scummvm-git-logs] scummvm master -> 4bcf8fb58d3a1c89832e1ae54232df58e34b0219

neuromancer noreply at scummvm.org
Fri Aug 23 15:18:47 UTC 2024


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

Summary:
bbc7a8cdfb FREESCAPE: fix removal of certain global conditions in castle for zx
839bb0f144 FREESCAPE: improved rendering of co-linear planar surfaces
4bcf8fb58d FREESCAPE: better calculation of player height


Commit: bbc7a8cdfba68dae1f9214b711f19733bb407794
    https://github.com/scummvm/scummvm/commit/bbc7a8cdfba68dae1f9214b711f19733bb407794
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-08-23T17:19:50+02:00

Commit Message:
FREESCAPE: fix removal of certain global conditions in 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 a92cfb4586a..6090feef52c 100644
--- a/engines/freescape/games/castle/zx.cpp
+++ b/engines/freescape/games/castle/zx.cpp
@@ -156,8 +156,9 @@ void CastleEngine::loadAssetsZXFullGame() {
 	// Discard the first three global conditions
 	// It is unclear why they hide/unhide objects that formed the spirits
 	for (int i = 0; i < 3; i++) {
-		_conditions.remove_at(i);
-		_conditionSources.remove_at(i);
+		debugC(kFreescapeDebugParser, "Discarding condition %s", _conditionSources[0].c_str());
+		_conditions.remove_at(0);
+		_conditionSources.remove_at(0);
 	}
 
 	_timeoutMessage = _messagesList[1];


Commit: 839bb0f14493f82dcc3b6e721d8ef7aeb6211cac
    https://github.com/scummvm/scummvm/commit/839bb0f14493f82dcc3b6e721d8ef7aeb6211cac
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-08-23T17:19:50+02:00

Commit Message:
FREESCAPE: improved rendering of co-linear planar surfaces

Changed paths:
    engines/freescape/area.cpp


diff --git a/engines/freescape/area.cpp b/engines/freescape/area.cpp
index e956d75b236..1c318c2b5f8 100644
--- a/engines/freescape/area.cpp
+++ b/engines/freescape/area.cpp
@@ -229,7 +229,7 @@ void Area::draw(Freescape::Renderer *gfx, uint32 animationTicks, Math::Vector3d
 	ObjectArray nonPlanarObjects;
 	Object *floor = nullptr;
 	Common::HashMap<Object *, float> sizes;
-	float offset = !gfx->_isAccelerated ? 2.0 : 1.0;
+	float offset = gfx->_isAccelerated ? (1.0 / _scale) : 2.0;
 
 	for (auto &obj : _drawableObjects) {
 		if (!obj->isDestroyed() && !obj->isInvisible()) {


Commit: 4bcf8fb58d3a1c89832e1ae54232df58e34b0219
    https://github.com/scummvm/scummvm/commit/4bcf8fb58d3a1c89832e1ae54232df58e34b0219
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-08-23T17:19:50+02:00

Commit Message:
FREESCAPE: better calculation of player height

Changed paths:
    engines/freescape/freescape.cpp
    engines/freescape/movement.cpp


diff --git a/engines/freescape/freescape.cpp b/engines/freescape/freescape.cpp
index 225029a5475..af7cd79b6fd 100644
--- a/engines/freescape/freescape.cpp
+++ b/engines/freescape/freescape.cpp
@@ -1039,7 +1039,7 @@ Common::Error FreescapeEngine::loadGameStream(Common::SeekableReadStream *stream
 	if (!_currentArea || _currentArea->getAreaID() != areaID)
 		gotoArea(areaID, -1); // Do not change position nor rotation
 
-	_playerHeight = 32 * (_playerHeightNumber + 1) - 16 / _currentArea->_scale;
+	_playerHeight = 32 * (_playerHeightNumber + 1) - 16 / float(_currentArea->_scale);
 	return loadGameStreamExtended(stream);
 }
 
diff --git a/engines/freescape/movement.cpp b/engines/freescape/movement.cpp
index 21732d51a31..c9046bb8114 100644
--- a/engines/freescape/movement.cpp
+++ b/engines/freescape/movement.cpp
@@ -108,7 +108,7 @@ void FreescapeEngine::initKeymaps(Common::Keymap *engineKeyMap, Common::Keymap *
 Math::AABB createPlayerAABB(Math::Vector3d const position, int playerHeight) {
 	Math::AABB boundingBox(position, position);
 
-	Math::Vector3d v1(position.x() + 1, position.y() + 1, position.z() + 1);
+	Math::Vector3d v1(position.x() + 1, position.y() - 1, position.z() + 1);
 	Math::Vector3d v2(position.x() - 1, position.y() - playerHeight, position.z() - 1);
 
 	boundingBox.expand(v1);
@@ -219,7 +219,7 @@ void FreescapeEngine::changePlayerHeight(int index) {
 	int scale = _currentArea->getScale();
 
 	_position.setValue(1, _position.y() - _playerHeight);
-	_playerHeight = 32 * (index + 1) - 16 / scale;
+	_playerHeight = 32 * (index + 1) - 16 / float(scale);
 	assert(_playerHeight > 0);
 	_position.setValue(1, _position.y() + _playerHeight);
 }




More information about the Scummvm-git-logs mailing list