[Scummvm-git-logs] scummvm master -> a91384aab948b31f8ebbf08c7b1526c3ccc800e0
mgerhardy
martin.gerhardy at gmail.com
Tue Apr 6 09:15:42 UTC 2021
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
755931f9aa IMAGE: missing override for png decoder
a91384aab9 TWINE: cleanup in playGIFMovie
Commit: 755931f9aa8ab0dc17acd1d29abe7e8c0b43ad76
https://github.com/scummvm/scummvm/commit/755931f9aa8ab0dc17acd1d29abe7e8c0b43ad76
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-04-06T11:15:06+02:00
Commit Message:
IMAGE: missing override for png decoder
Changed paths:
image/png.h
diff --git a/image/png.h b/image/png.h
index 65ed9ece0a..59f0aa2dc6 100644
--- a/image/png.h
+++ b/image/png.h
@@ -58,11 +58,11 @@ public:
PNGDecoder();
~PNGDecoder();
- bool loadStream(Common::SeekableReadStream &stream);
- void destroy();
- const Graphics::Surface *getSurface() const { return _outputSurface; }
- const byte *getPalette() const { return _palette; }
- uint16 getPaletteColorCount() const { return _paletteColorCount; }
+ bool loadStream(Common::SeekableReadStream &stream) override;
+ void destroy() override;
+ const Graphics::Surface *getSurface() const override { return _outputSurface; }
+ const byte *getPalette() const override { return _palette; }
+ uint16 getPaletteColorCount() const override { return _paletteColorCount; }
int getTransparentColor() const { return _transparentColor; }
void setSkipSignature(bool skip) { _skipSignature = skip; }
void setKeepTransparencyPaletted(bool keep) { _keepTransparencyPaletted = keep; }
Commit: a91384aab948b31f8ebbf08c7b1526c3ccc800e0
https://github.com/scummvm/scummvm/commit/a91384aab948b31f8ebbf08c7b1526c3ccc800e0
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-04-06T11:15:06+02:00
Commit Message:
TWINE: cleanup in playGIFMovie
Changed paths:
engines/twine/flamovies.cpp
engines/twine/resources/resources.h
diff --git a/engines/twine/flamovies.cpp b/engines/twine/flamovies.cpp
index cfd0772c8f..c279bcd685 100644
--- a/engines/twine/flamovies.cpp
+++ b/engines/twine/flamovies.cpp
@@ -273,14 +273,14 @@ void FlaMovies::prepareGIF(int index) {
// TODO: version 87a 640x480
#if 0
Image::GIFDecoder decoder;
- Common::SeekableReadStream *stream = HQR::makeReadStream("FLA_GIF.HQR", index);
+ Common::SeekableReadStream *stream = HQR::makeReadStream(Resources::HQR_FLAGIF_FILE, index);
if (stream == nullptr) {
- warning("Failed to load gif hqr entry with id %i from FLA_GIF.HQR", index);
+ warning("Failed to load gif hqr entry with id %i from %s", index, Resources::HQR_FLAGIF_FILE);
return;
}
if (!decoder.loadStream(*stream)) {
delete stream;
- warning("Failed to load gif with id %i from FLA_GIF.HQR", index);
+ warning("Failed to load gif with id %i from %s", index, Resources::HQR_FLAGIF_FILE);
return;
}
const Graphics::Surface *surface = decoder.getSurface();
@@ -297,45 +297,50 @@ void FlaMovies::prepareGIF(int index) {
}
void FlaMovies::playGIFMovie(const char *flaName) {
- if (!Common::File::exists("FLA_GIF.HQR")) {
- warning("FLA_GIF file doesn't exist!");
+ if (!Common::File::exists(Resources::HQR_FLAGIF_FILE)) {
+ warning("%s file doesn't exist", Resources::HQR_FLAGIF_FILE);
return;
}
- debug("Play gif %s", flaName);
+ Common::String name(flaName);
+ name.toLowercase();
+
+ debug(1, "Play gif %s", name.c_str());
// TODO: use the HQR 23th entry (movies informations)
// TODO: there are gifs [1-18]
- if (!strcmp(flaName, FLA_INTROD)) {
+ if (name == FLA_INTROD) {
prepareGIF(3);
prepareGIF(4);
prepareGIF(5);
- } else if (!strcmp(flaName, "BAFFE") || !strcmp(flaName, "BAFFE2") || !strcmp(flaName, "BAFFE3") || !strcmp(flaName, "BAFFE4")) {
- prepareGIF(6);
- } else if (!strcmp(flaName, "bateau") || !strcmp(flaName, "bateau2")) {
+ } else if (name == "bateau" || name == "bateau2") {
prepareGIF(7);
- } else if (!strcmp(flaName, "navette")) {
+ } else if (name == "navette") {
prepareGIF(15);
- } else if (!strcmp(flaName, "templebu")) {
+ } else if (name == "templebu") {
prepareGIF(12);
- } else if (!strcmp(flaName, "flute2")) {
+ } else if (name == "flute2") {
prepareGIF(8); // TODO: same as glass2?
- } else if (!strcmp(flaName, "glass2")) {
+ } else if (name == "glass2") {
prepareGIF(8); // TODO: same as flute2?
- } else if (!strcmp(flaName, "surf")) {
+ } else if (name == "surf") {
prepareGIF(9);
- } else if (!strcmp(flaName, "verser") || !strcmp(flaName, "verser2")) {
+ } else if (name == "verser" || name == "verser2") {
prepareGIF(10);
- } else if (!strcmp(flaName, "neige2")) {
+ } else if (name == "neige2") {
prepareGIF(11);
- } else if (!strcmp(flaName, "capture")) {
+ } else if (name == "capture") {
prepareGIF(14); // TODO: same as sendel?
- } else if (!strcmp(flaName, "sendel")) {
+ } else if (name == "sendel") {
prepareGIF(14); // TODO: same as capture?
- } else if (!strcmp(flaName, "sendel2")) {
+ } else if (name == "sendel2") {
prepareGIF(17);
- } else if (!strcmp(flaName, FLA_DRAGON3)) {
+ } else if (name == FLA_DRAGON3) {
prepareGIF(1);
prepareGIF(2);
+ } else if (name == "baffe" || name.matchString("baffe#")) {
+ prepareGIF(6);
+ } else {
+ warning("unknown gif image: %s", name.c_str());
}
}
diff --git a/engines/twine/resources/resources.h b/engines/twine/resources/resources.h
index 61852b6637..188a87aa13 100644
--- a/engines/twine/resources/resources.h
+++ b/engines/twine/resources/resources.h
@@ -243,6 +243,10 @@ public:
// inventory objects
static constexpr const char *HQR_INVOBJ_FILE = "invobj.hqr";
+ /**
+ * @brief Floppy version of the game uses gifs for replacing the videos
+ */
+ static constexpr const char *HQR_FLAGIF_FILE = "fla_gif.hqr";
static constexpr const char *HQR_FLASAMP_FILE = "flasamp.hqr";
static constexpr const char *HQR_MIDI_MI_DOS_FILE = "midi_mi.hqr";
static constexpr const char *HQR_MIDI_MI_WIN_FILE = "midi_mi_win.hqr";
More information about the Scummvm-git-logs
mailing list