[Scummvm-git-logs] scummvm branch-2-5 -> 9d35da2bedb60fc57d8c194366c9df844eabffeb
mgerhardy
martin.gerhardy at gmail.com
Fri Oct 8 18:23:48 UTC 2021
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:
088b2015ec TWINE: fixed holomap gap
9d35da2bed TWINE: fixed holomap rotation keys
Commit: 088b2015ececf906c73465f0853645d25c7229fa
https://github.com/scummvm/scummvm/commit/088b2015ececf906c73465f0853645d25c7229fa
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-10-08T20:12:26+02:00
Commit Message:
TWINE: fixed holomap gap
Changed paths:
engines/twine/holomap.cpp
diff --git a/engines/twine/holomap.cpp b/engines/twine/holomap.cpp
index c2a3ef8e03..f12981cfc2 100644
--- a/engines/twine/holomap.cpp
+++ b/engines/twine/holomap.cpp
@@ -146,23 +146,28 @@ static int sortHolomapSurfaceCoordsByDepth(const void *a1, const void *a2) {
return (int)*(const int16 *)a1 - (int)*(const int16 *)a2;
}
-// verified with disassembly
void Holomap::prepareHolomapSurface() {
Common::MemoryReadStream stream(_engine->_resources->_holomapSurfacePtr, _engine->_resources->_holomapSurfaceSize);
int holomapSurfaceArrayIdx = 0;
_engine->_renderer->setBaseRotation(0, 0, 0);
- for (int angle = -ANGLE_90; angle <= ANGLE_90; angle += ANGLE_11_25) {
- int rotation = 0;
- for (int i = 0; i <= ANGLE_11_25; ++i, rotation += ANGLE_11_25) {
+ for (int alpha = -ANGLE_90; alpha <= ANGLE_90; alpha += ANGLE_11_25) {
+ const int64 pos = stream.pos();
+ for (int beta = 0; beta < ANGLE_360; beta += ANGLE_11_25) {
const int32 rotX = stream.readByte();
- const IVec3& rotVec = _engine->_renderer->getHolomapRotation(rotX, angle, rotation);
+ const IVec3 &rotVec = _engine->_renderer->getHolomapRotation(rotX, alpha, beta);
_holomapSurface[holomapSurfaceArrayIdx].x = rotVec.x;
_holomapSurface[holomapSurfaceArrayIdx].y = rotVec.y;
_holomapSurface[holomapSurfaceArrayIdx].z = rotVec.z;
++holomapSurfaceArrayIdx;
}
+ stream.seek(pos);
+ const int32 rotX = stream.readByte();
+ const IVec3 &rotVec = _engine->_renderer->getHolomapRotation(rotX, alpha, 0);
+ _holomapSurface[holomapSurfaceArrayIdx].x = rotVec.x;
+ _holomapSurface[holomapSurfaceArrayIdx].y = rotVec.y;
+ _holomapSurface[holomapSurfaceArrayIdx].z = rotVec.z;
+ ++holomapSurfaceArrayIdx;
}
- assert(stream.eos());
}
// verified with disassembly
Commit: 9d35da2bedb60fc57d8c194366c9df844eabffeb
https://github.com/scummvm/scummvm/commit/9d35da2bedb60fc57d8c194366c9df844eabffeb
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-10-08T20:12:26+02:00
Commit Message:
TWINE: fixed holomap rotation keys
Changed paths:
engines/twine/holomap.cpp
diff --git a/engines/twine/holomap.cpp b/engines/twine/holomap.cpp
index f12981cfc2..c55346d78c 100644
--- a/engines/twine/holomap.cpp
+++ b/engines/twine/holomap.cpp
@@ -558,21 +558,21 @@ void Holomap::processHolomap() {
}
}
- if (_engine->_input->isActionActive(TwinEActionType::HolomapLeft)) {
+ if (_engine->_input->isActionActive(TwinEActionType::HolomapDown)) {
xRot += ANGLE_2;
rotate = true;
time = _engine->_lbaTime;
- } else if (_engine->_input->isActionActive(TwinEActionType::HolomapRight)) {
+ } else if (_engine->_input->isActionActive(TwinEActionType::HolomapUp)) {
xRot -= ANGLE_2;
rotate = true;
time = _engine->_lbaTime;
}
- if (_engine->_input->isActionActive(TwinEActionType::HolomapUp)) {
+ if (_engine->_input->isActionActive(TwinEActionType::HolomapRight)) {
yRot += ANGLE_2;
rotate = true;
time = _engine->_lbaTime;
- } else if (_engine->_input->isActionActive(TwinEActionType::HolomapDown)) {
+ } else if (_engine->_input->isActionActive(TwinEActionType::HolomapLeft)) {
yRot -= ANGLE_2;
rotate = true;
time = _engine->_lbaTime;
More information about the Scummvm-git-logs
mailing list