From 5e279996eb1f448712d1a6b64218a6cf65159a57 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 17 Apr 2011 16:35:12 +0200 Subject: VIDEO: Prefer Surface::create taking a PixelFormat over the one taking a byte depth. Certain codecs seem to use a Surface with Bpp 2, but do not have any proper format description. Whoever is maintaining these should check this commit and fix the format properly. --- video/flic_decoder.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'video/flic_decoder.cpp') diff --git a/video/flic_decoder.cpp b/video/flic_decoder.cpp index 90f7a8e9ac..38e82906ba 100644 --- a/video/flic_decoder.cpp +++ b/video/flic_decoder.cpp @@ -79,7 +79,7 @@ bool FlicDecoder::loadStream(Common::SeekableReadStream *stream) { _offsetFrame2 = _fileStream->readUint32LE(); _surface = new Graphics::Surface(); - _surface->create(width, height, 1); + _surface->create(width, height, Graphics::PixelFormat::createFormatCLUT8()); _palette = (byte *)malloc(3 * 256); memset(_palette, 0, 3 * 256); _paletteChanged = false; @@ -226,7 +226,7 @@ const Graphics::Surface *FlicDecoder::decodeNextFrame() { _surface->free(); delete _surface; _surface = new Graphics::Surface(); - _surface->create(newWidth, newHeight, 1); + _surface->create(newWidth, newHeight, Graphics::PixelFormat::createFormatCLUT8()); } } break; -- cgit v1.2.3 From 9414d7a6e287ff8abfb5746b564e92c8f0e6de58 Mon Sep 17 00:00:00 2001 From: Ori Avtalion Date: Sun, 24 Apr 2011 11:34:27 +0300 Subject: JANITORIAL: Reduce header dependencies in shared code Some backends may break as I only compiled SDL --- video/flic_decoder.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'video/flic_decoder.cpp') diff --git a/video/flic_decoder.cpp b/video/flic_decoder.cpp index 90f7a8e9ac..adceb4565f 100644 --- a/video/flic_decoder.cpp +++ b/video/flic_decoder.cpp @@ -24,10 +24,11 @@ */ #include "video/flic_decoder.h" -#include "common/archive.h" -#include "common/stream.h" #include "common/endian.h" +#include "common/rect.h" +#include "common/stream.h" #include "common/system.h" +#include "common/textconsole.h" namespace Video { -- cgit v1.2.3