From 6d1d31d0f95ab82872dd821131e0070473bd1aac Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 17 Apr 2011 16:28:05 +0200 Subject: LASTEXPRESS: Prefer Surface::create taking a PixelFormat over the one taking a byte depth. I am not sure whether the engine really uses only surfaces with the exat same format as the screen. The engine maintainer should review this commit and fix it in case the surfaces use a different pixel format. --- engines/lastexpress/data/animation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/lastexpress/data/animation.cpp') diff --git a/engines/lastexpress/data/animation.cpp b/engines/lastexpress/data/animation.cpp index 7288889f09..ed0a5a67e1 100644 --- a/engines/lastexpress/data/animation.cpp +++ b/engines/lastexpress/data/animation.cpp @@ -266,7 +266,7 @@ void Animation::play() { if (_changed) { // Create a temporary surface to merge the overlay with the background Graphics::Surface *s = new Graphics::Surface; - s->create(640, 480, 2); + s->create(640, 480, g_system->getScreenFormat()); draw(s); -- cgit v1.2.3 From 14d496400111a52ecd31b559131f5743ded10689 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 17 Apr 2011 22:17:09 +0200 Subject: LASTEXPRESS: Use RGB555 PixelFormat for surfaces instead of screen format. This makes the code a bit more readable, thanks to fuzzie for pointing that out. --- engines/lastexpress/data/animation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/lastexpress/data/animation.cpp') diff --git a/engines/lastexpress/data/animation.cpp b/engines/lastexpress/data/animation.cpp index ed0a5a67e1..11e4b4d290 100644 --- a/engines/lastexpress/data/animation.cpp +++ b/engines/lastexpress/data/animation.cpp @@ -266,7 +266,7 @@ void Animation::play() { if (_changed) { // Create a temporary surface to merge the overlay with the background Graphics::Surface *s = new Graphics::Surface; - s->create(640, 480, g_system->getScreenFormat()); + s->create(640, 480, Graphics::PixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0)); draw(s); -- cgit v1.2.3