From b3f0eb8a9db27d3b0659eeb7ce53c69849342439 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 17 Apr 2011 16:31:49 +0200 Subject: SWORD25: Prefer Surface::create taking a PixelFormat over the one taking a byte depth. I am not 100% sure whether the surfaces all use the same format as the screen, but a quick test showed that it still works fine. In case this is wrong please set them up with the correct format. --- engines/sword25/fmv/theora_decoder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/sword25/fmv') diff --git a/engines/sword25/fmv/theora_decoder.cpp b/engines/sword25/fmv/theora_decoder.cpp index e9901c04b0..4f6f52509d 100644 --- a/engines/sword25/fmv/theora_decoder.cpp +++ b/engines/sword25/fmv/theora_decoder.cpp @@ -289,7 +289,7 @@ bool TheoraDecoder::loadStream(Common::SeekableReadStream *stream) { _surface = new Graphics::Surface(); - _surface->create(_theoraInfo.frame_width, _theoraInfo.frame_height, 4); + _surface->create(_theoraInfo.frame_width, _theoraInfo.frame_height, g_system->getScreenFormat()); return true; } -- cgit v1.2.3 From c3669443ece9e29d37ddfdce5614c628717a34b9 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 17 Apr 2011 17:29:37 +0200 Subject: SWORD25: Prefer Surface::format over Surface::bytesPerPixel. --- engines/sword25/fmv/movieplayer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/sword25/fmv') diff --git a/engines/sword25/fmv/movieplayer.cpp b/engines/sword25/fmv/movieplayer.cpp index 177bd38303..8ab64fa7a8 100644 --- a/engines/sword25/fmv/movieplayer.cpp +++ b/engines/sword25/fmv/movieplayer.cpp @@ -121,7 +121,7 @@ void MoviePlayer::update() { const Graphics::Surface *s = _decoder.decodeNextFrame(); if (s) { // Transfer the next frame - assert(s->bytesPerPixel == 4); + assert(s->format.bytesPerPixel == 4); #ifdef THEORA_INDIRECT_RENDERING byte *frameData = (byte *)s->getBasePtr(0, 0); -- cgit v1.2.3