[Scummvm-git-logs] scummvm master -> 08c806f71a5fdaa12a597fe8cf71ac32d8c3ad12
whoozle
noreply at scummvm.org
Mon Mar 9 23:07:02 UTC 2026
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
2c77dea96a PHOENIXVR: match gameId using strcmp, avoid to create Common::String each time it needs to compare gameId
08c806f71a PHOENIXVR: fmod fixup
Commit: 2c77dea96af6463f436a55d30f23ef4af6e5b344
https://github.com/scummvm/scummvm/commit/2c77dea96af6463f436a55d30f23ef4af6e5b344
Author: Vladimir Menshakov (vladimir.menshakov at gmail.com)
Date: 2026-03-09T23:06:52Z
Commit Message:
PHOENIXVR: match gameId using strcmp, avoid to create Common::String each time it needs to compare gameId
Changed paths:
engines/phoenixvr/phoenixvr.cpp
engines/phoenixvr/phoenixvr.h
diff --git a/engines/phoenixvr/phoenixvr.cpp b/engines/phoenixvr/phoenixvr.cpp
index 77ed1ab05e6..e0696d7942d 100644
--- a/engines/phoenixvr/phoenixvr.cpp
+++ b/engines/phoenixvr/phoenixvr.cpp
@@ -76,7 +76,7 @@ PhoenixVREngine::PhoenixVREngine(OSystem *syst, const ADGameDescription *gameDes
if (!pixelFormatFound)
error("Couldn't find 16/32-bit pixel format");
- if (getGameId() == "amerzone") {
+ if (gameIdMatches("amerzone")) {
_levels.push_back("01VR_PHARE");
_levels.push_back("02VR_ILE");
_levels.push_back("03VR_PUEBLO");
@@ -104,8 +104,8 @@ uint32 PhoenixVREngine::getFeatures() const {
return _gameDescription->flags;
}
-Common::String PhoenixVREngine::getGameId() const {
- return _gameDescription->gameId;
+bool PhoenixVREngine::gameIdMatches(const char *gameId) const {
+ return strcmp(_gameDescription->gameId, gameId) == 0;
}
Common::String PhoenixVREngine::removeDrive(const Common::String &path) {
@@ -152,7 +152,7 @@ bool PhoenixVREngine::setNextLevel() {
if (_currentLevel < _levels.size()) {
auto &level = _levels[_currentLevel++];
debug("next level is %s", level.c_str());
- setNextScript(level + "\\" + getGameId() + ".lst");
+ setNextScript(Common::String::format("%s\\%s.lst", level.c_str(), _gameDescription->gameId));
_loaded = true;
return true;
} else
@@ -186,7 +186,7 @@ void PhoenixVREngine::loadNextScript() {
_script.reset(new Script(*s));
for (auto &var : _script->getVarNames())
declareVariable(var);
- if (getGameId() == "amerzone")
+ if (gameIdMatches("amerzone"))
declareVariable("oeuf_pose"); // crash in chapter 7
int numWarps = _script->numWarps();
@@ -280,7 +280,7 @@ bool PhoenixVREngine::goToWarp(const Common::String &warp, bool savePrev) {
}
// Typo in Necronomicon's Script4.lst
- if (getGameId() == "necrono" && warp == "N3M09L03W515E1.vr")
+ if (gameIdMatches("necrono") && warp == "N3M09L03W515E1.vr")
_nextWarp = _script->getWarp("N3M09L03W51E1.vr");
else
_nextWarp = _script->getWarp(warp);
@@ -359,7 +359,7 @@ void PhoenixVREngine::setVariable(const Common::String &name, int value) {
}
int PhoenixVREngine::getVariable(const Common::String &name) const {
- if (getGameId() == "lochness" && name == "tumuAccpet")
+ if (gameIdMatches("lochness") && name == "tumuAccpet")
return _variables.getVal("tumuAccept");
return _variables.getVal(name);
}
@@ -621,7 +621,7 @@ void PhoenixVREngine::rollover(int textId, RolloverType type) {
bool bold = false;
uint16 color = 0xFFFF;
- if (getGameId() == "lochness") {
+ if (gameIdMatches("lochness")) {
size = 12;
bold = false;
switch (type) {
diff --git a/engines/phoenixvr/phoenixvr.h b/engines/phoenixvr/phoenixvr.h
index a90b6852a6b..17ee13a79c1 100644
--- a/engines/phoenixvr/phoenixvr.h
+++ b/engines/phoenixvr/phoenixvr.h
@@ -79,10 +79,7 @@ public:
uint32 getFeatures() const;
- /**
- * Returns the game Id
- */
- Common::String getGameId() const;
+ bool gameIdMatches(const char *gameId) const;
/**
* Gets a random number
Commit: 08c806f71a5fdaa12a597fe8cf71ac32d8c3ad12
https://github.com/scummvm/scummvm/commit/08c806f71a5fdaa12a597fe8cf71ac32d8c3ad12
Author: Vladimir Menshakov (vladimir.menshakov at gmail.com)
Date: 2026-03-09T23:06:52Z
Commit Message:
PHOENIXVR: fmod fixup
Changed paths:
engines/phoenixvr/angle.h
diff --git a/engines/phoenixvr/angle.h b/engines/phoenixvr/angle.h
index 079ed5f7bda..3d1bbef37ac 100644
--- a/engines/phoenixvr/angle.h
+++ b/engines/phoenixvr/angle.h
@@ -55,7 +55,7 @@ public:
static float mod(float v, float min, float max) {
auto range = max - min;
- auto a = std::fmod(v - min, range);
+ auto a = fmod(v - min, range);
if (a < 0)
a += range;
return a + min;
More information about the Scummvm-git-logs
mailing list