[Scummvm-git-logs] scummvm master -> 418ed01662e760953ee69a9fd9b099f9cc676ccc
whoozle
noreply at scummvm.org
Sat Mar 7 10:37:40 UTC 2026
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
418ed01662 PHOENIXVR: support smk videos
Commit: 418ed01662e760953ee69a9fd9b099f9cc676ccc
https://github.com/scummvm/scummvm/commit/418ed01662e760953ee69a9fd9b099f9cc676ccc
Author: Vladimir Menshakov (vladimir.menshakov at gmail.com)
Date: 2026-03-07T10:37:00Z
Commit Message:
PHOENIXVR: support smk videos
Changed paths:
engines/phoenixvr/phoenixvr.cpp
diff --git a/engines/phoenixvr/phoenixvr.cpp b/engines/phoenixvr/phoenixvr.cpp
index 91b137ad618..f8e1e5eefaf 100644
--- a/engines/phoenixvr/phoenixvr.cpp
+++ b/engines/phoenixvr/phoenixvr.cpp
@@ -36,6 +36,7 @@
#include "graphics/fonts/ttf.h"
#include "graphics/framelimiter.h"
#include "graphics/managed_surface.h"
+#include "graphics/palette.h"
#include "image/pcx.h"
#include "phoenixvr/console.h"
#include "phoenixvr/game_state.h"
@@ -45,6 +46,7 @@
#include "phoenixvr/script.h"
#include "phoenixvr/vr.h"
#include "video/4xm_decoder.h"
+#include "video/smk_decoder.h"
namespace PhoenixVR {
@@ -330,19 +332,29 @@ void PhoenixVREngine::stopSound(const Common::String &sound) {
void PhoenixVREngine::playMovie(const Common::String &movie) {
debug("playMovie %s", movie.c_str());
- Video::FourXMDecoder dec;
+ Common::ScopedPtr<Video::VideoDecoder> dec;
+ if (movie.hasSuffixIgnoreCase(".4xm")) {
+ dec.reset(new Video::FourXMDecoder);
+ } else if (movie.hasSuffixIgnoreCase(".smk")) {
+ dec.reset(new Video::SmackerDecoder);
+ } else {
+ warning("can't play %s", movie.c_str());
+ return;
+ }
Common::ScopedPtr<Common::SeekableReadStream> stream(open(movie));
if (!stream) {
warning("can't load movie %s", movie.c_str());
return;
}
- if (dec.loadStream(stream.release())) {
- dec.start();
+
+ Common::ScopedPtr<Graphics::Palette> palette;
+ if (dec->loadStream(stream.release())) {
+ dec->start();
bool playing = true;
Graphics::FrameLimiter limiter(g_system, kFPSLimit);
- while (!shouldQuit() && playing && !dec.endOfVideo()) {
+ while (!shouldQuit() && playing && !dec->endOfVideo()) {
Common::Event event;
while (g_system->getEventManager()->pollEvent(event)) {
switch (event.type) {
@@ -357,10 +369,15 @@ void PhoenixVREngine::playMovie(const Common::String &movie) {
break;
}
}
- if (dec.needsUpdate()) {
- auto *s = dec.decodeNextFrame();
- if (s)
- _screen->simpleBlitFrom(*s);
+ if (dec->hasDirtyPalette()) {
+ palette.reset(new Graphics::Palette(dec->getPalette(), 256));
+ }
+ if (dec->needsUpdate()) {
+ auto *s = dec->decodeNextFrame();
+ if (s) {
+ if (!s->format.isCLUT8() || palette)
+ _screen->simpleBlitFrom(*s, Graphics::FLIP_NONE, false, 0xff, palette.get());
+ }
}
// Delay for a bit. All events loops should have a delay
More information about the Scummvm-git-logs
mailing list