[Scummvm-git-logs] scummvm master -> 6a9f6fe3d5af5ec8cb875dfca3815aa276f5ad0a

neuromancer noreply at scummvm.org
Sun Feb 27 12:30:44 UTC 2022


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
6a9f6fe3d5 HYPNO: removed unused currentFrame field and some extra spaces


Commit: 6a9f6fe3d5af5ec8cb875dfca3815aa276f5ad0a
    https://github.com/scummvm/scummvm/commit/6a9f6fe3d5af5ec8cb875dfca3815aa276f5ad0a
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-02-27T13:30:53+01:00

Commit Message:
HYPNO: removed unused currentFrame field and some extra spaces

Changed paths:
    engines/hypno/arcade.cpp
    engines/hypno/grammar.h
    engines/hypno/hypno.cpp
    engines/hypno/scene.cpp
    engines/hypno/video.cpp


diff --git a/engines/hypno/arcade.cpp b/engines/hypno/arcade.cpp
index 873fcbdb968..18c177be9bc 100644
--- a/engines/hypno/arcade.cpp
+++ b/engines/hypno/arcade.cpp
@@ -384,7 +384,7 @@ void HypnoEngine::runArcade(ArcadeShooting *arc) {
 						} else {
 							s.video = new MVideo(it->animation, it->position, true, false, false);
 							playVideo(*s.video);
-							s.video->currentFrame = s.video->decoder->decodeNextFrame(); // Skip the first frame
+							s.video->decoder->decodeNextFrame(); // Make sure the palette is loaded
 							if (s.attackFrames.size() == 0) {
 								uint32 lastFrame = s.bodyFrames.back().lastFrame();
 								s.attackFrames.push_back(lastFrame - 3);
diff --git a/engines/hypno/grammar.h b/engines/hypno/grammar.h
index ad1085de7d3..789d211b963 100644
--- a/engines/hypno/grammar.h
+++ b/engines/hypno/grammar.h
@@ -51,7 +51,6 @@ public:
 	bool transparent;
 	bool loop;
 	HypnoSmackerDecoder *decoder;
-	const Graphics::Surface *currentFrame;
 };
 
 typedef Common::Array<MVideo> Videos;
diff --git a/engines/hypno/hypno.cpp b/engines/hypno/hypno.cpp
index aae433c565a..7e04db38389 100644
--- a/engines/hypno/hypno.cpp
+++ b/engines/hypno/hypno.cpp
@@ -430,7 +430,6 @@ void HypnoEngine::updateScreen(MVideo &video) {
 	const Graphics::Surface *frame = video.decoder->decodeNextFrame();
 	bool dirtyPalette = video.decoder->hasDirtyPalette();
 
-	video.currentFrame = frame;
 	if (frame->h == 0 || frame->w == 0 || video.decoder->getPalette() == nullptr)
 		return;
 
@@ -522,7 +521,7 @@ void HypnoEngine::playSound(const Common::String &filename, uint32 loops, uint32
 		if (file->open(name)) {
 			stream = new Audio::LoopingAudioStream(Audio::makeRawStream(file, sampleRate, Audio::FLAG_UNSIGNED, DisposeAfterUse::YES), loops);
 			_mixer->playStream(Audio::Mixer::kSFXSoundType, &_soundHandle, stream, -1, Audio::Mixer::kMaxChannelVolume);
-		} else 
+		} else
 			debugC(1, kHypnoDebugMedia, "%s not found!", name.c_str());
 	}
 }
diff --git a/engines/hypno/scene.cpp b/engines/hypno/scene.cpp
index a7f116d852c..aabfbe92ff2 100644
--- a/engines/hypno/scene.cpp
+++ b/engines/hypno/scene.cpp
@@ -412,8 +412,8 @@ void HypnoEngine::runScene(Scene *scene) {
 			if (it->decoder) {
 				if (it->decoder->endOfVideo()) {
 					if (it->scaled ||
-					(  it->currentFrame->w == _screenW 
-					&& it->currentFrame->h == _screenH 
+					(  it->decoder->getWidth() == _screenW
+					&& it->decoder->getHeight() == _screenH
 					&& it->decoder->getCurFrame() > 0)) {
 						runMenu(stack.back());
 						drawScreen();
diff --git a/engines/hypno/video.cpp b/engines/hypno/video.cpp
index 440c4b87ed8..696b2d27972 100644
--- a/engines/hypno/video.cpp
+++ b/engines/hypno/video.cpp
@@ -26,7 +26,6 @@ namespace Hypno {
 
 MVideo::MVideo(Common::String path_, Common::Point position_, bool transparent_, bool scaled_, bool loop_) {
 	decoder = nullptr;
-	currentFrame = nullptr;
 	path = path_;
 	position = position_;
 	scaled = scaled_;




More information about the Scummvm-git-logs mailing list