[Scummvm-git-logs] scummvm master -> 1b747fb165fbff157ab856bed0b056ab4ff9698e

whoozle noreply at scummvm.org
Thu Mar 12 17:54:06 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:
a958cdee81 PHOENIXVR: add ARN archive implementation
e7d0c59860 PHOENIXVR: render timer progress bar
1b747fb165 PHOENIXVR: reduce RolloverType base type


Commit: a958cdee81f6db564192041f671ea6fdc826ee52
    https://github.com/scummvm/scummvm/commit/a958cdee81f6db564192041f671ea6fdc826ee52
Author: Vladimir Menshakov (vladimir.menshakov at gmail.com)
Date: 2026-03-12T17:53:49Z

Commit Message:
PHOENIXVR: add ARN archive implementation

Changed paths:
  A engines/phoenixvr/arn.cpp
  A engines/phoenixvr/arn.h
    engines/phoenixvr/module.mk


diff --git a/engines/phoenixvr/arn.cpp b/engines/phoenixvr/arn.cpp
new file mode 100644
index 00000000000..2ac4065d848
--- /dev/null
+++ b/engines/phoenixvr/arn.cpp
@@ -0,0 +1,87 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "phoenixvr/arn.h"
+#include "common/file.h"
+
+namespace PhoenixVR {
+ARN *ARN::create() {
+	Common::ScopedPtr<ARN> arn(new ARN);
+
+	uint idx = 1;
+	while (true) {
+		auto arnName = Common::String::format("BData%u.arn", idx++);
+		Common::File file;
+		if (!file.open(Common::Path{arnName})) {
+			break;
+		}
+		Common::Array<byte> data(file.size());
+		debug("arn: loading %s, %ld bytes", arnName.c_str(), (long)file.size());
+		if (file.read(data.data(), data.size()) != data.size())
+			error("arn short read");
+		arn->_archives.push_back(Common::move(data));
+	}
+	debug("loaded %u archives", arn->_archives.size());
+
+	Common::File file;
+	if (!file.open("BDataHeader.vit"))
+		return nullptr;
+
+	Graphics::PixelFormat format(2, 5, 6, 5, 0, 11, 5, 0, 0);
+
+	auto numEntries = file.readUint32LE();
+	auto version = file.readUint32LE();
+	debug("arn: found %u entries, version: %u", numEntries, version);
+	uint prevArchive = 0;
+	uint offset = 0;
+	while (numEntries--) {
+		auto name = file.readString(0, 32);
+		Entry &entry = arn->_surfaces[name];
+		auto &rect = entry.rect;
+		rect.left = file.readSint32LE();
+		rect.top = file.readSint32LE();
+		rect.right = file.readSint32LE();
+		rect.bottom = file.readSint32LE();
+		auto archive = file.readUint32LE();
+		auto size = file.readUint32LE();
+		debug("arn: %u: %s, %s, %u bytes", archive, name.c_str(), entry.rect.toString().c_str(), size);
+		if (archive != prevArchive) {
+			offset = 0;
+			prevArchive = archive;
+		}
+		unsigned bpp = format.bytesPerPixel;
+		assert(size == bpp * entry.rect.width() * entry.rect.height());
+
+		auto &data = arn->_archives[archive - 1];
+		assert(offset + size <= data.size());
+		entry.surface.init(rect.width(), rect.height(), rect.width() * bpp, data.data() + offset, format);
+		file.skip(4); // unk, usually 1
+		offset += size;
+	}
+
+	return arn.release();
+}
+
+const Graphics::Surface *ARN::get(const Common::String &fname) const {
+	auto it = _surfaces.find(fname);
+	return it != _surfaces.end() ? &it->_value.surface : nullptr;
+}
+} // namespace PhoenixVR
diff --git a/engines/phoenixvr/arn.h b/engines/phoenixvr/arn.h
new file mode 100644
index 00000000000..59e3b582723
--- /dev/null
+++ b/engines/phoenixvr/arn.h
@@ -0,0 +1,50 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef PHOENIXVR_ARN_H
+#define PHOENIXVR_ARN_H
+
+#include "common/hash-str.h"
+#include "common/hashmap.h"
+#include "common/ptr.h"
+#include "common/rect.h"
+#include "graphics/surface.h"
+
+namespace PhoenixVR {
+class ARN {
+public:
+	static ARN *create();
+
+	const Graphics::Surface *get(const Common::String &fname) const;
+
+private:
+	Common::Array<Common::Array<byte>> _archives;
+
+	struct Entry {
+		Graphics::Surface surface;
+		Common::Rect rect;
+	};
+
+	Common::HashMap<Common::String, Entry, Common::IgnoreCase_Hash, Common::IgnoreCase_EqualTo> _surfaces;
+};
+} // namespace PhoenixVR
+
+#endif
diff --git a/engines/phoenixvr/module.mk b/engines/phoenixvr/module.mk
index 64ef19ebe03..670fa32f23e 100644
--- a/engines/phoenixvr/module.mk
+++ b/engines/phoenixvr/module.mk
@@ -1,6 +1,7 @@
 MODULE := engines/phoenixvr
 
 MODULE_OBJS = \
+	arn.o \
 	bigf.o \
 	game_state.o \
 	console.o \


Commit: e7d0c598608e03653d21181669f1c1560fd153a6
    https://github.com/scummvm/scummvm/commit/e7d0c598608e03653d21181669f1c1560fd153a6
Author: Vladimir Menshakov (vladimir.menshakov at gmail.com)
Date: 2026-03-12T17:53:49Z

Commit Message:
PHOENIXVR: render timer progress bar

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


diff --git a/engines/phoenixvr/phoenixvr.cpp b/engines/phoenixvr/phoenixvr.cpp
index 952d8e727d0..6c980bfcea3 100644
--- a/engines/phoenixvr/phoenixvr.cpp
+++ b/engines/phoenixvr/phoenixvr.cpp
@@ -39,6 +39,7 @@
 #include "graphics/palette.h"
 #include "image/gif.h"
 #include "image/pcx.h"
+#include "phoenixvr/arn.h"
 #include "phoenixvr/console.h"
 #include "phoenixvr/game_state.h"
 #include "phoenixvr/math.h"
@@ -602,6 +603,7 @@ void PhoenixVREngine::executeTest(int idx) {
 
 void PhoenixVREngine::startTimer(float seconds) {
 	_timer = seconds;
+	_initialTimer = seconds;
 	_timerFlags = 5;
 }
 
@@ -642,6 +644,28 @@ void PhoenixVREngine::tickTimer(float dt) {
 	}
 }
 
+void PhoenixVREngine::renderTimer() {
+	if (_timerFlags == 0 || !_arn)
+		return;
+	auto timerBg = _arn->get("cadre.bmp");
+	auto timerFg = _arn->get("cadreB.bmp");
+	if (!timerBg || !timerFg)
+		return;
+
+	// Loch-Ness rectangle for now.
+	// Necronomicon has timer in scripts, but does not contain bitmaps for timers.
+	Common::Rect bgRect{320, 16, 632, 44};
+	Common::Rect fgRect{333, 23, 619, 38};
+	assert(_initialTimer > 0);
+	auto timeLeft = _timer / _initialTimer;
+	fgRect.right = fgRect.left + fgRect.width() * timeLeft;
+	Common::Rect fgSrcRect{static_cast<short>(timerFg->w * timeLeft), timerFg->h};
+	if (!fgRect.isValidRect() || !fgSrcRect.isValidRect())
+		return;
+	_screen->blitFrom(*timerBg, bgRect.origin());
+	_screen->blitFrom(*timerFg, fgSrcRect, fgRect.origin());
+}
+
 void PhoenixVREngine::renderVR(float dt) {
 	_vr.render(_screen, _angleX.angle(), _angleY.angle(), _fov, dt, _showRegions ? _regSet.get() : nullptr);
 	if (_text) {
@@ -649,6 +673,7 @@ void PhoenixVREngine::renderVR(float dt) {
 		int16 y = _textRect.top + (_textRect.height() - _text->h) / 2;
 		_screen->blitFrom(*_text, {x, y});
 	}
+	renderTimer();
 }
 
 void PhoenixVREngine::saveVariables() {
@@ -885,6 +910,7 @@ void PhoenixVREngine::tick(float dt) {
 }
 
 Common::Error PhoenixVREngine::run() {
+	_arn.reset(ARN::create());
 	initGraphics(640, 480, &_pixelFormat);
 #ifdef USE_FREETYPE2
 	static const Common::String family("NotoSerif-Bold.ttf");
diff --git a/engines/phoenixvr/phoenixvr.h b/engines/phoenixvr/phoenixvr.h
index 6af8725e863..150b97ee2ea 100644
--- a/engines/phoenixvr/phoenixvr.h
+++ b/engines/phoenixvr/phoenixvr.h
@@ -50,6 +50,7 @@ class Font;
 
 namespace PhoenixVR {
 
+class ARN;
 struct PhoenixVRGameDescription;
 struct GameState;
 
@@ -71,6 +72,7 @@ private:
 	Graphics::PixelFormat _pixelFormat;
 	Graphics::PixelFormat _rgb565;
 	Graphics::ManagedSurface _thumbnail;
+	Common::ScopedPtr<ARN> _arn;
 
 	// Engine APIs
 	Common::Error run() override;
@@ -208,6 +210,7 @@ private:
 	void tickTimer(float dt);
 	void loadNextScript();
 	void renderVR(float dt);
+	void renderTimer();
 
 private:
 	bool _hasFocus = true;
@@ -258,7 +261,7 @@ private:
 	static constexpr byte kPaused = 2;
 	static constexpr byte kActive = 4;
 	byte _timerFlags = 0;
-	float _timer = 0;
+	float _timer = 0, _initialTimer = 0;
 
 	Common::String _contextScript;
 	Common::String _contextLabel;


Commit: 1b747fb165fbff157ab856bed0b056ab4ff9698e
    https://github.com/scummvm/scummvm/commit/1b747fb165fbff157ab856bed0b056ab4ff9698e
Author: Vladimir Menshakov (vladimir.menshakov at gmail.com)
Date: 2026-03-12T17:53:49Z

Commit Message:
PHOENIXVR: reduce RolloverType base type

Changed paths:
    engines/phoenixvr/phoenixvr.h


diff --git a/engines/phoenixvr/phoenixvr.h b/engines/phoenixvr/phoenixvr.h
index 150b97ee2ea..14ca1859e00 100644
--- a/engines/phoenixvr/phoenixvr.h
+++ b/engines/phoenixvr/phoenixvr.h
@@ -54,7 +54,7 @@ class ARN;
 struct PhoenixVRGameDescription;
 struct GameState;
 
-enum struct RolloverType {
+enum struct RolloverType : uint8 {
 	Default,
 	Malette,
 	Secretaire




More information about the Scummvm-git-logs mailing list