[Scummvm-git-logs] scummvm master -> 8938e6d7675d3e5bad2cbb0705e356e4610a097b
whoozle
noreply at scummvm.org
Mon Mar 9 22:37:32 UTC 2026
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
12cfdc30c2 PHOENIXVR: fix setnord, use initial angle of 0
76283703c7 PHOENIXVR: reimplement angle ranges
8938e6d767 PHOENIXVR: fix typo in loch ness chapter5
Commit: 12cfdc30c299a7e75e066643be755ee598663661
https://github.com/scummvm/scummvm/commit/12cfdc30c299a7e75e066643be755ee598663661
Author: Vladimir Menshakov (vladimir.menshakov at gmail.com)
Date: 2026-03-09T22:24:38Z
Commit Message:
PHOENIXVR: fix setnord, use initial angle of 0
Changed paths:
engines/phoenixvr/commands.h
engines/phoenixvr/phoenixvr.cpp
engines/phoenixvr/phoenixvr.h
engines/phoenixvr/script.cpp
diff --git a/engines/phoenixvr/commands.h b/engines/phoenixvr/commands.h
index 4ef47538c54..89a92bf1d6f 100644
--- a/engines/phoenixvr/commands.h
+++ b/engines/phoenixvr/commands.h
@@ -1001,6 +1001,7 @@ struct SetNord : public Script::Command {
SetNord(float a) : angle(a) {}
void exec(Script::ExecutionContext &ctx) const override {
+ debug("setnord %g", angle);
g_engine->setNord(angle);
}
};
diff --git a/engines/phoenixvr/phoenixvr.cpp b/engines/phoenixvr/phoenixvr.cpp
index 700214d681c..914b51f9956 100644
--- a/engines/phoenixvr/phoenixvr.cpp
+++ b/engines/phoenixvr/phoenixvr.cpp
@@ -60,7 +60,7 @@ PhoenixVREngine::PhoenixVREngine(OSystem *syst, const ADGameDescription *gameDes
_thumbnail(139, 103, _rgb565),
_lockKey(13),
_fov(kPi2),
- _angleX(kPi),
+ _angleX(0),
_angleY(-kPi2),
_mixer(syst->getMixer()) {
g_engine = this;
diff --git a/engines/phoenixvr/phoenixvr.h b/engines/phoenixvr/phoenixvr.h
index 258b6900944..a90b6852a6b 100644
--- a/engines/phoenixvr/phoenixvr.h
+++ b/engines/phoenixvr/phoenixvr.h
@@ -161,12 +161,11 @@ public:
void setAngle(float x, float y) {
_angleX.set(y);
- static const float baseX = -kPi2;
- _angleY.set(baseX + x);
+ _angleY.set(x - kPi2);
}
void setNord(float a) {
- _angleX.set(a);
+ _angleX.add(a);
}
bool testSaveSlot(int idx) const;
diff --git a/engines/phoenixvr/script.cpp b/engines/phoenixvr/script.cpp
index 8e7ae2b0869..e4b8557c644 100644
--- a/engines/phoenixvr/script.cpp
+++ b/engines/phoenixvr/script.cpp
@@ -176,10 +176,7 @@ public:
auto a1 = toAngle(nextInt());
return CommandPtr(new SetAngle(a0, a1));
} else if (maybe("setnord=")) {
- auto i0 = nextInt();
- if (i0 > 4095)
- i0 -= 8192;
- auto a0 = toAngle(i0);
+ auto a0 = toAngle(nextInt());
return CommandPtr(new SetNord(a0));
} else if (keyword("interpolangle") || keyword("interpolanglezoom")) {
maybe(',');
Commit: 76283703c74eb5509369694ccb0c0667d66d5491
https://github.com/scummvm/scummvm/commit/76283703c74eb5509369694ccb0c0667d66d5491
Author: Vladimir Menshakov (vladimir.menshakov at gmail.com)
Date: 2026-03-09T22:24:38Z
Commit Message:
PHOENIXVR: reimplement angle ranges
Changed paths:
engines/phoenixvr/angle.h
diff --git a/engines/phoenixvr/angle.h b/engines/phoenixvr/angle.h
index 3271f89f8cc..079ed5f7bda 100644
--- a/engines/phoenixvr/angle.h
+++ b/engines/phoenixvr/angle.h
@@ -22,6 +22,7 @@
#ifndef PHOENIXVR_ANGLE_H
#define PHOENIXVR_ANGLE_H
+#include "common/util.h"
#include "math/utils.h"
#include "phoenixvr/math.h"
@@ -52,16 +53,37 @@ public:
float angle() const { return _angle; }
- void set(float v) {
- if (v > _rangeMax)
- v = _rangeMax;
- else if (v < _rangeMin)
- v = _rangeMin;
- auto range = _max - _min;
- auto a = fmod(v - _min, range);
+ static float mod(float v, float min, float max) {
+ auto range = max - min;
+ auto a = std::fmod(v - min, range);
if (a < 0)
a += range;
- _angle = a + _min;
+ return a + min;
+ }
+
+ float mod(float v) const {
+ return mod(v, _min, _max);
+ }
+
+ void set(float v) {
+ _angle = mod(v, _min, _max);
+ auto range = _max - _min;
+ auto min = _rangeMin, max = _rangeMax;
+ if (_angle >= min && _angle <= max)
+ return;
+ if (_angle >= min - range && _angle <= max - range)
+ return;
+ if (_angle >= min + range && _angle <= max + range)
+ return;
+
+ // out of bounds, find left or right
+ auto l0 = std::abs(_angle - _rangeMin);
+ auto l1 = std::abs(_angle - _rangeMin - range);
+ auto l = MIN(l0, l1);
+ auto r0 = std::abs(_rangeMax - _angle);
+ auto r1 = std::abs(range + _rangeMax - _angle);
+ auto r = MIN(r0, r1);
+ _angle = l < r ? _rangeMin : _rangeMax;
}
void add(float v) {
Commit: 8938e6d7675d3e5bad2cbb0705e356e4610a097b
https://github.com/scummvm/scummvm/commit/8938e6d7675d3e5bad2cbb0705e356e4610a097b
Author: Vladimir Menshakov (vladimir.menshakov at gmail.com)
Date: 2026-03-09T22:37:01Z
Commit Message:
PHOENIXVR: fix typo in loch ness chapter5
Changed paths:
engines/phoenixvr/phoenixvr.cpp
diff --git a/engines/phoenixvr/phoenixvr.cpp b/engines/phoenixvr/phoenixvr.cpp
index 914b51f9956..77ed1ab05e6 100644
--- a/engines/phoenixvr/phoenixvr.cpp
+++ b/engines/phoenixvr/phoenixvr.cpp
@@ -359,6 +359,8 @@ void PhoenixVREngine::setVariable(const Common::String &name, int value) {
}
int PhoenixVREngine::getVariable(const Common::String &name) const {
+ if (getGameId() == "lochness" && name == "tumuAccpet")
+ return _variables.getVal("tumuAccept");
return _variables.getVal(name);
}
More information about the Scummvm-git-logs
mailing list