[Scummvm-git-logs] scummvm master -> 27eb99978e6664feef317549f668033af4cd840e

whoozle noreply at scummvm.org
Fri Feb 13 22:38:29 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:
074a5e1424 PHOENIXVR: assert that quality is not 0
27eb99978e PHOENIXVR: implement animation restart


Commit: 074a5e1424336afc17ce6da83c8c9b934fc42ae9
    https://github.com/scummvm/scummvm/commit/074a5e1424336afc17ce6da83c8c9b934fc42ae9
Author: Vladimir Menshakov (vladimir.menshakov at gmail.com)
Date: 2026-02-13T22:38:19Z

Commit Message:
PHOENIXVR: assert that quality is not 0

Changed paths:
    engines/phoenixvr/vr.cpp


diff --git a/engines/phoenixvr/vr.cpp b/engines/phoenixvr/vr.cpp
index 2c381f23d8f..f2df1da13ea 100644
--- a/engines/phoenixvr/vr.cpp
+++ b/engines/phoenixvr/vr.cpp
@@ -77,6 +77,7 @@ struct Quantisation {
 
 	Quantisation(int quality) {
 		int q;
+		assert(quality != 0);
 		if (quality < 0) {
 			q = 5000;
 		} else if (quality > 100) {


Commit: 27eb99978e6664feef317549f668033af4cd840e
    https://github.com/scummvm/scummvm/commit/27eb99978e6664feef317549f668033af4cd840e
Author: Vladimir Menshakov (vladimir.menshakov at gmail.com)
Date: 2026-02-13T22:38:19Z

Commit Message:
PHOENIXVR: implement animation restart

Changed paths:
    engines/phoenixvr/vr.cpp
    engines/phoenixvr/vr.h


diff --git a/engines/phoenixvr/vr.cpp b/engines/phoenixvr/vr.cpp
index f2df1da13ea..c3ab3007466 100644
--- a/engines/phoenixvr/vr.cpp
+++ b/engines/phoenixvr/vr.cpp
@@ -44,6 +44,7 @@ namespace PhoenixVR {
 #define CHUNK_STATIC_3D (0xa0b1c200)
 #define CHUNK_ANIMATION (0xa0b1c201)
 #define CHUNK_ANIMATION_BLOCK (0xa0b1c211)
+#define CHUNK_ANIMATION_RESTART (0xa0b1c221)
 
 namespace {
 
@@ -253,6 +254,16 @@ VR VR::loadStatic(const Graphics::PixelFormat &format, Common::SeekableReadStrea
 				if (animChunkId == CHUNK_ANIMATION_BLOCK) {
 					frame.blockData.resize(animChunkSize - 8);
 					s.read(frame.blockData.data(), frame.blockData.size());
+				} else if (animChunkId == CHUNK_ANIMATION_RESTART) {
+					assert(animChunkSize - 8 == 4);
+					byte buf[4] = {};
+					s.read(buf, sizeof(buf));
+					frame.restartAtFrame = READ_LE_INT32(buf);
+					debug("animation loop, frame: %d", frame.restartAtFrame);
+				} else {
+					Common::Array<byte> buf(animChunkSize - 8);
+					s.read(buf.data(), buf.size());
+					warning("unknown frame type");
 				}
 				animation.frames.push_back(Common::move(frame));
 				s.seek(animChunkPos + animChunkSize);
@@ -380,6 +391,10 @@ void VR::Animation::renderNextFrame(Graphics::Surface &pic) {
 	} else {
 		auto &frame = frames[frameIndex++];
 		frame.render(pic);
+		if (frame.restartAtFrame >= 0) {
+			frameIndex = frame.restartAtFrame;
+			t = 1;
+		}
 	}
 }
 
@@ -388,9 +403,9 @@ void VR::Animation::render(Graphics::Surface &pic, float dt) {
 		return;
 
 	t += speed * dt;
-	if (t > 1) {
-		renderNextFrame(pic);
+	if (t >= 1) {
 		t = fmodf(t, 1);
+		renderNextFrame(pic);
 	}
 }
 
diff --git a/engines/phoenixvr/vr.h b/engines/phoenixvr/vr.h
index bc1de1a2194..7abe4b0d8c9 100644
--- a/engines/phoenixvr/vr.h
+++ b/engines/phoenixvr/vr.h
@@ -41,6 +41,7 @@ class VR {
 	struct Animation {
 		struct Frame {
 			Common::Array<byte> blockData;
+			int restartAtFrame = -1;
 			void render(Graphics::Surface &pic) const;
 		};
 




More information about the Scummvm-git-logs mailing list