[Scummvm-git-logs] scummvm master -> 42bdf3d2c4a8ec4abfd79d8a4c603bc69c9c23b8

OMGPizzaGuy noreply at scummvm.org
Sat Dec 17 03:06:46 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:
42bdf3d2c4 ULTIMA8: Remove conflicting version of getPixelFormat from render surface


Commit: 42bdf3d2c4a8ec4abfd79d8a4c603bc69c9c23b8
    https://github.com/scummvm/scummvm/commit/42bdf3d2c4a8ec4abfd79d8a4c603bc69c9c23b8
Author: Matthew Jimenez (matthew.jimenez at outlook.com)
Date: 2022-12-16T21:06:18-06:00

Commit Message:
ULTIMA8: Remove conflicting version of getPixelFormat from render surface

Changed paths:
    engines/ultima/ultima8/graphics/render_surface.cpp
    engines/ultima/ultima8/graphics/render_surface.h
    engines/ultima/ultima8/graphics/skf_player.cpp
    engines/ultima/ultima8/gumps/movie_gump.cpp


diff --git a/engines/ultima/ultima8/graphics/render_surface.cpp b/engines/ultima/ultima8/graphics/render_surface.cpp
index e5877dbdecf..f7fcb5c8829 100644
--- a/engines/ultima/ultima8/graphics/render_surface.cpp
+++ b/engines/ultima/ultima8/graphics/render_surface.cpp
@@ -374,9 +374,5 @@ RenderSurface *RenderSurface::CreateSecondaryRenderSurface(uint32 width, uint32
 	return surf;
 }
 
-Graphics::PixelFormat RenderSurface::getPixelFormat() {
-	return g_system->getScreenFormat();
-}
-
 } // End of namespace Ultima8
 } // End of namespace Ultima
diff --git a/engines/ultima/ultima8/graphics/render_surface.h b/engines/ultima/ultima8/graphics/render_surface.h
index 29a7d52e4f0..5aa06898ab8 100644
--- a/engines/ultima/ultima8/graphics/render_surface.h
+++ b/engines/ultima/ultima8/graphics/render_surface.h
@@ -82,8 +82,6 @@ public:
 	// Virtual Destructor
 	virtual ~RenderSurface();
 
-	static Graphics::PixelFormat getPixelFormat();
-
 	//
 	// Being/End Painting
 	//
diff --git a/engines/ultima/ultima8/graphics/skf_player.cpp b/engines/ultima/ultima8/graphics/skf_player.cpp
index 5413dde35dd..4d001289318 100644
--- a/engines/ultima/ultima8/graphics/skf_player.cpp
+++ b/engines/ultima/ultima8/graphics/skf_player.cpp
@@ -25,7 +25,6 @@
 #include "ultima/ultima8/filesys/raw_archive.h"
 #include "ultima/ultima8/graphics/shape.h"
 #include "ultima/ultima8/graphics/texture.h"
-#include "ultima/ultima8/graphics/soft_render_surface.h"
 #include "ultima/ultima8/graphics/palette_manager.h"
 #include "ultima/ultima8/audio/music_process.h"
 #include "ultima/ultima8/audio/audio_process.h"
@@ -78,11 +77,7 @@ SKFPlayer::SKFPlayer(Common::SeekableReadStream *rs, int width, int height, bool
 	parseEventList(eventlist);
 	delete eventlist;
 
-	// TODO: Slight hack.. clean me up.
-	if (RenderSurface::getPixelFormat().bpp() == 16)
-		_buffer = new SoftRenderSurface<uint16>(new Graphics::ManagedSurface(_width, _height, RenderSurface::getPixelFormat()));
-	else
-		_buffer = new SoftRenderSurface<uint32>(new Graphics::ManagedSurface(_width, _height, RenderSurface::getPixelFormat()));
+	_buffer = RenderSurface::CreateSecondaryRenderSurface(_width, _height);
 }
 
 SKFPlayer::~SKFPlayer() {
diff --git a/engines/ultima/ultima8/gumps/movie_gump.cpp b/engines/ultima/ultima8/gumps/movie_gump.cpp
index ff1b84d2724..04bd5287892 100644
--- a/engines/ultima/ultima8/gumps/movie_gump.cpp
+++ b/engines/ultima/ultima8/gumps/movie_gump.cpp
@@ -203,7 +203,7 @@ void MovieGump::PaintThis(RenderSurface *surf, int32 lerp_factor, bool scaled) {
 			subtitle->getLocation(x, y);
 			subtitle->GetDims(textdims);
 			surf->GetSurfaceDims(screendims);
-			surf->Fill32(surf->getPixelFormat().RGBToColor(0, 0, 0),
+			surf->Fill32(0x000000,
 						 screendims.width() / 2 - 300 - screendims.left,
 						 y - 3,
 						 600,




More information about the Scummvm-git-logs mailing list