[Scummvm-git-logs] scummvm master -> fa09c8083080c10c9554759a6a4ea1e2936d6737
mgerhardy
martin.gerhardy at gmail.com
Sat Oct 9 08:51:47 UTC 2021
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:
fa09c80830 TWINE: fixed missing holomap surface mappings
Commit: fa09c8083080c10c9554759a6a4ea1e2936d6737
https://github.com/scummvm/scummvm/commit/fa09c8083080c10c9554759a6a4ea1e2936d6737
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-10-09T10:46:46+02:00
Commit Message:
TWINE: fixed missing holomap surface mappings
Changed paths:
engines/twine/holomap.cpp
diff --git a/engines/twine/holomap.cpp b/engines/twine/holomap.cpp
index 60ef66d899..1bfa3ddb0d 100644
--- a/engines/twine/holomap.cpp
+++ b/engines/twine/holomap.cpp
@@ -155,7 +155,8 @@ void Holomap::prepareHolomapSurface(Common::SeekableReadStream *holomapSurfaceSt
int holomapSurfaceArrayIdx = 0;
_engine->_renderer->setBaseRotation(0, 0, 0);
for (int alpha = -ANGLE_90; alpha <= ANGLE_90; alpha += ANGLE_11_25) {
- const int64 pos = holomapSurfaceStream->pos();
+ const int32 rot = holomapSurfaceStream->readByte();
+ holomapSurfaceStream->seek(-1, SEEK_CUR);
for (int beta = 0; beta < ANGLE_360; beta += ANGLE_11_25) {
const int32 rotX = holomapSurfaceStream->readByte();
const IVec3 &rotVec = _engine->_renderer->getHolomapRotation(rotX, alpha, beta);
@@ -164,14 +165,13 @@ void Holomap::prepareHolomapSurface(Common::SeekableReadStream *holomapSurfaceSt
_holomapSurface[holomapSurfaceArrayIdx].z = rotVec.z;
++holomapSurfaceArrayIdx;
}
- holomapSurfaceStream->seek(pos);
- const int32 rotX = holomapSurfaceStream->readByte();
- const IVec3 &rotVec = _engine->_renderer->getHolomapRotation(rotX, alpha, 0);
+ const IVec3 &rotVec = _engine->_renderer->getHolomapRotation(rot, alpha, 0);
_holomapSurface[holomapSurfaceArrayIdx].x = rotVec.x;
_holomapSurface[holomapSurfaceArrayIdx].y = rotVec.y;
_holomapSurface[holomapSurfaceArrayIdx].z = rotVec.z;
++holomapSurfaceArrayIdx;
}
+ assert(holomapSurfaceStream->eos());
}
void Holomap::prepareHolomapProjectedPositions() {
More information about the Scummvm-git-logs
mailing list