[Scummvm-git-logs] scummvm master -> ea31d52a297ed304dee1deeff72aba6b430c58a4
neuromancer
noreply at scummvm.org
Sun Jul 14 19:02:26 UTC 2024
This automated email contains information about 7 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
c0d5dfe604 FREESCAPE: implement area 42 special effect in eclipse for zx
c3f7f76b73 FREESCAPE: fix player height when reloading a saved game
aa9be03a77 FREESCAPE: fix invalid paper colors in eclipse for zx
b14be7de66 FREESCAPE: avoid crashing when creating an invalid rect
40c9f7941e FREESCAPE: planar rendering fix
bcf7a7f6a4 FREESCAPE: adjust collision triggering for larger scale areas
ea31d52a29 FREESCAPE: avoid crash in eclipse for dos
Commit: c0d5dfe604c1a2ae0be6ec55f5fbde8c767ca6c9
https://github.com/scummvm/scummvm/commit/c0d5dfe604c1a2ae0be6ec55f5fbde8c767ca6c9
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-07-14T21:03:33+02:00
Commit Message:
FREESCAPE: implement area 42 special effect in eclipse for zx
Changed paths:
engines/freescape/games/eclipse/eclipse.cpp
engines/freescape/games/eclipse/eclipse.h
engines/freescape/games/eclipse/zx.cpp
engines/freescape/games/palettes.cpp
diff --git a/engines/freescape/games/eclipse/eclipse.cpp b/engines/freescape/games/eclipse/eclipse.cpp
index 3d3efa782f7..dee338c105c 100644
--- a/engines/freescape/games/eclipse/eclipse.cpp
+++ b/engines/freescape/games/eclipse/eclipse.cpp
@@ -65,6 +65,7 @@ EclipseEngine::EclipseEngine(OSystem *syst, const ADGameDescription *gd) : Frees
_endEntrance = 33;
_lastThirtySeconds = 0;
+ _lastSecond = -1;
_resting = false;
}
@@ -617,6 +618,15 @@ void EclipseEngine::updateTimeVariables() {
executeLocalGlobalConditions(false, false, true);
}
+
+ if (isEclipse() && isSpectrum() && _currentArea->getAreaID() == 42) {
+ if (_lastSecond != seconds) { // Swap ink and paper colors every second
+ _lastSecond = seconds;
+ int tmp = _gfx->_inkColor;
+ _gfx->_inkColor = _gfx->_paperColor;
+ _gfx->_paperColor = tmp;
+ }
+ }
}
void EclipseEngine::executePrint(FCLInstruction &instruction) {
diff --git a/engines/freescape/games/eclipse/eclipse.h b/engines/freescape/games/eclipse/eclipse.h
index 164d3c598c2..5da5e54aa84 100644
--- a/engines/freescape/games/eclipse/eclipse.h
+++ b/engines/freescape/games/eclipse/eclipse.h
@@ -57,6 +57,7 @@ public:
bool _resting;
int _lastThirtySeconds;
+ int _lastSecond;
void updateTimeVariables() override;
void initDOS();
diff --git a/engines/freescape/games/eclipse/zx.cpp b/engines/freescape/games/eclipse/zx.cpp
index 4a94e74302c..89be4078cab 100644
--- a/engines/freescape/games/eclipse/zx.cpp
+++ b/engines/freescape/games/eclipse/zx.cpp
@@ -65,6 +65,9 @@ void EclipseEngine::loadAssetsZXFullGame() {
loadFonts(&file, 0x6163, _font);
loadSpeakerFxZX(&file, 0x816, 0x86a);
load8bitBinary(&file, 0x635b, 4);
+
+ _areaMap[42]->_paperColor = 0;
+ _areaMap[42]->_underFireBackgroundColor = 0;
}
for (auto &it : _areaMap) {
diff --git a/engines/freescape/games/palettes.cpp b/engines/freescape/games/palettes.cpp
index 4b087ff1e74..9182da4099f 100644
--- a/engines/freescape/games/palettes.cpp
+++ b/engines/freescape/games/palettes.cpp
@@ -176,9 +176,6 @@ void FreescapeEngine::swapPalette(uint16 levelID) {
_gfx->_paperColor = _areaMap[levelID]->_paperColor;
_gfx->_underFireBackgroundColor = _areaMap[levelID]->_underFireBackgroundColor;
- if (isSpectrum() && _gfx->_paperColor >= 9)
- _gfx->_paperColor = 1;
-
if (!_border)
return;
Commit: c3f7f76b7331ed33232232a95732a99869dbcb14
https://github.com/scummvm/scummvm/commit/c3f7f76b7331ed33232232a95732a99869dbcb14
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-07-14T21:03:33+02:00
Commit Message:
FREESCAPE: fix player height when reloading a saved game
Changed paths:
engines/freescape/freescape.cpp
diff --git a/engines/freescape/freescape.cpp b/engines/freescape/freescape.cpp
index 88627125260..8b06c6869d4 100644
--- a/engines/freescape/freescape.cpp
+++ b/engines/freescape/freescape.cpp
@@ -1020,6 +1020,8 @@ Common::Error FreescapeEngine::loadGameStream(Common::SeekableReadStream *stream
_ticks = 0;
if (!_currentArea || _currentArea->getAreaID() != areaID)
gotoArea(areaID, -1); // Do not change position nor rotation
+
+ _playerHeight = 32 * (_playerHeightNumber + 1) - 16 / _currentArea->_scale;
return loadGameStreamExtended(stream);
}
Commit: aa9be03a7785f5530bf41b0e1ab6cec10b676726
https://github.com/scummvm/scummvm/commit/aa9be03a7785f5530bf41b0e1ab6cec10b676726
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-07-14T21:03:33+02:00
Commit Message:
FREESCAPE: fix invalid paper colors 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 89be4078cab..eb8ed9f05d9 100644
--- a/engines/freescape/games/eclipse/zx.cpp
+++ b/engines/freescape/games/eclipse/zx.cpp
@@ -66,6 +66,11 @@ void EclipseEngine::loadAssetsZXFullGame() {
loadSpeakerFxZX(&file, 0x816, 0x86a);
load8bitBinary(&file, 0x635b, 4);
+ // These paper colors are invalid, probably to signal the use of floor/sky colors
+ _areaMap[1]->_paperColor = 1;
+ _areaMap[51]->_paperColor = 1;
+
+ // These paper colors are also invalid, but to signal the use of a special effect
_areaMap[42]->_paperColor = 0;
_areaMap[42]->_underFireBackgroundColor = 0;
}
Commit: b14be7de66529b7cbc0d488f3d81872be2e30ee2
https://github.com/scummvm/scummvm/commit/b14be7de66529b7cbc0d488f3d81872be2e30ee2
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-07-14T21:03:33+02:00
Commit Message:
FREESCAPE: avoid crashing when creating an invalid rect
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 eb8ed9f05d9..75f34f63965 100644
--- a/engines/freescape/games/eclipse/zx.cpp
+++ b/engines/freescape/games/eclipse/zx.cpp
@@ -195,12 +195,15 @@ void EclipseEngine::drawZXUI(Graphics::Surface *surface) {
else if (shield < 100)
x = 175;
+ if (energy < 0)
+ energy = 0;
+
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);
+ Common::Rect jarWater(120, 192 - energy - 4, 144, 192 - 4);
surface->fillRect(jarWater, blue);
drawStringInSurface(Common::String('0' + _angleRotationIndex - 3), 79, 141, back, yellow, surface, 'Z' - '$' + 1);
Commit: 40c9f7941e1e4a752fb782926b8f627f1fefd386
https://github.com/scummvm/scummvm/commit/40c9f7941e1e4a752fb782926b8f627f1fefd386
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-07-14T21:03:33+02:00
Commit Message:
FREESCAPE: planar rendering fix
Changed paths:
engines/freescape/area.cpp
diff --git a/engines/freescape/area.cpp b/engines/freescape/area.cpp
index 8575904ce01..7d9c0b9ead5 100644
--- a/engines/freescape/area.cpp
+++ b/engines/freescape/area.cpp
@@ -228,6 +228,7 @@ void Area::draw(Freescape::Renderer *gfx, uint32 animationTicks, Math::Vector3d
ObjectArray planarObjects;
ObjectArray nonPlanarObjects;
Object *floor = nullptr;
+ Common::HashMap<Object *, float> sizes;
float offset = !gfx->_isAccelerated ? 2.0 : 1.0;
for (auto &obj : _drawableObjects) {
@@ -271,6 +272,12 @@ void Area::draw(Freescape::Renderer *gfx, uint32 animationTicks, Math::Vector3d
if (distance.length() > 0.0001)
continue;
+ float sizeNonPlanar = object->_boundingBox.getSize().length();
+ if (sizes[planar] >= sizeNonPlanar)
+ continue;
+
+ sizes[planar] = sizeNonPlanar;
+
if (planar->getSize().x() == 0) {
if (object->getOrigin().x() >= centerPlanar.x())
offsetMap[planar] = -offset;
Commit: bcf7a7f6a46e9a8144e034038815d87bd53818aa
https://github.com/scummvm/scummvm/commit/bcf7a7f6a46e9a8144e034038815d87bd53818aa
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-07-14T21:03:33+02:00
Commit Message:
FREESCAPE: adjust collision triggering for larger scale areas
Changed paths:
engines/freescape/movement.cpp
diff --git a/engines/freescape/movement.cpp b/engines/freescape/movement.cpp
index 03b58d880df..be51f6c8bb8 100644
--- a/engines/freescape/movement.cpp
+++ b/engines/freescape/movement.cpp
@@ -433,7 +433,11 @@ bool FreescapeEngine::runCollisionConditions(Math::Vector3d const lastPosition,
Math::Vector3d direction = newPosition - lastPosition;
direction.normalize();
ray = Math::Ray(lastPosition, direction);
- collided = _currentArea->checkCollisionRay(ray, 45);
+ int rayLenght = 45;
+ if (_currentArea->getScale() >= 5)
+ rayLenght = 45 / (2 * _currentArea->getScale());
+
+ collided = _currentArea->checkCollisionRay(ray, rayLenght);
if (collided) {
gobj = (GeometricObject *)collided;
debugC(1, kFreescapeDebugMove, "Collided with object id %d of size %f %f %f", gobj->getObjectID(), gobj->getSize().x(), gobj->getSize().y(), gobj->getSize().z());
Commit: ea31d52a297ed304dee1deeff72aba6b430c58a4
https://github.com/scummvm/scummvm/commit/ea31d52a297ed304dee1deeff72aba6b430c58a4
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-07-14T21:03:34+02:00
Commit Message:
FREESCAPE: avoid crash in eclipse for dos
Changed paths:
engines/freescape/games/eclipse/dos.cpp
diff --git a/engines/freescape/games/eclipse/dos.cpp b/engines/freescape/games/eclipse/dos.cpp
index 186ebb377be..d8bf36d5266 100644
--- a/engines/freescape/games/eclipse/dos.cpp
+++ b/engines/freescape/games/eclipse/dos.cpp
@@ -90,7 +90,7 @@ void EclipseEngine::loadAssetsDOSFullGame() {
if (!file.isOpen())
error("Failed to open TOTEE.EXE");
- loadMessagesFixedSize(&file, 0x710f, 16, 17);
+ loadMessagesFixedSize(&file, 0x710f, 16, 20);
loadSoundsFx(&file, 0xd670, 1);
loadSpeakerFxDOS(&file, 0x7396 + 0x200, 0x72a1 + 0x200);
loadFonts(&file, 0xd403, _font);
@@ -120,7 +120,7 @@ void EclipseEngine::loadAssetsDOSFullGame() {
if (!file.isOpen())
error("Failed to open TOTEC.EXE");
- loadMessagesFixedSize(&file, 0x594f, 16, 17);
+ loadMessagesFixedSize(&file, 0x594f, 16, 20);
load1bPCM(&file, 0xd038 - 4);
loadFonts(&file, 0xb785, _font);
load8bitBinary(&file, 0x2530, 4);
More information about the Scummvm-git-logs
mailing list