Merge tag '1.11.0-beta2' into jgrpp

# Conflicts:
#	.github/workflows/ci-build.yml
#	.github/workflows/release.yml
#	CMakeLists.txt
#	src/blitter/32bpp_optimized.cpp
#	src/debug.cpp
#	src/gfx.cpp
#	src/gfx_func.h
#	src/lang/czech.txt
#	src/lang/english.txt
#	src/lang/italian.txt
#	src/lang/swedish.txt
#	src/lang/ukrainian.txt
#	src/network/network_server.cpp
#	src/os/windows/crashlog_win.cpp
#	src/os/windows/win32.cpp
#	src/pathfinder/follow_track.hpp
#	src/screenshot.cpp
#	src/settings_type.h
#	src/spritecache.cpp
#	src/vehicle_gui.cpp
#	src/video/sdl2_v.cpp
#	src/video/video_driver.cpp
#	src/video/video_driver.hpp
#	src/video/win32_v.cpp
This commit is contained in:
Jonathan G Rennison
2021-03-02 11:59:03 +00:00
148 changed files with 19670 additions and 1452 deletions

View File

@@ -309,11 +309,13 @@ static bool SwitchNewGRFBlitter()
* between multiple 32bpp blitters, which perform differently with 8bpp sprites.
*/
uint depth_wanted_by_base = BaseGraphics::GetUsedSet()->blitter == BLT_32BPP ? 32 : 8;
uint depth_wanted_by_grf = _support8bpp == S8BPP_NONE ? 32 : 8;
uint depth_wanted_by_grf = _support8bpp != S8BPP_NONE ? 8 : 32;
for (GRFConfig *c = _grfconfig; c != nullptr; c = c->next) {
if (c->status == GCS_DISABLED || c->status == GCS_NOT_FOUND || HasBit(c->flags, GCF_INIT_ONLY)) continue;
if (c->palette & GRFP_BLT_32BPP) depth_wanted_by_grf = 32;
}
/* We need a 32bpp blitter for font anti-alias. */
if (HasAntialiasedFonts()) depth_wanted_by_grf = 32;
/* Search the best blitter. */
static const struct {
@@ -321,13 +323,14 @@ static bool SwitchNewGRFBlitter()
uint animation; ///< 0: no support, 1: do support, 2: both
uint min_base_depth, max_base_depth, min_grf_depth, max_grf_depth;
} replacement_blitters[] = {
{ "8bpp-optimized", 2, 8, 8, 8, 8 },
{ "40bpp-anim", 2, 8, 32, 8, 32 },
#ifdef WITH_SSE
{ "32bpp-sse4", 0, 32, 32, 8, 32 },
{ "32bpp-ssse3", 0, 32, 32, 8, 32 },
{ "32bpp-sse2", 0, 32, 32, 8, 32 },
{ "32bpp-sse4-anim", 1, 32, 32, 8, 32 },
#endif
{ "8bpp-optimized", 2, 8, 8, 8, 8 },
{ "32bpp-optimized", 0, 8, 32, 8, 32 },
#ifdef WITH_SSE
{ "32bpp-sse2-anim", 1, 8, 32, 8, 32 },
@@ -497,6 +500,7 @@ void GfxLoadSprites()
_grf_bug_too_many_strings = false;
SwitchNewGRFBlitter();
VideoDriver::GetInstance()->ClearSystemSprites();
ClearFontCache();
GfxInitSpriteMem();
LoadSpriteTables();