Enables blurring in the title screen.
Shadowm figured out why blurring didn't work properly in the title screen and created a proof-of-concept patch. This patch is heavily based upon that patch.
This commit is contained in:
parent
56b18db1fc
commit
3c9f91a8af
3 changed files with 15 additions and 9 deletions
|
@ -24,6 +24,7 @@ Version 1.11.9+dev:
|
|||
ability to copy the report to clipboard.
|
||||
* Fixed bug #21584: Properly redraw the minimap when the minimap is
|
||||
resized.
|
||||
* Fixed: Enable blurring in the title screen.
|
||||
* WML engine:
|
||||
* WML loading phase errors are reported to stderr in a new indented format.
|
||||
* Implemented [true] and [false] ConditionalWML tags, which describe a
|
||||
|
|
|
@ -19,14 +19,13 @@
|
|||
|
||||
[draw]
|
||||
|
||||
# Blurring doesn't work yet, keeps adding
|
||||
# [pre_commit]
|
||||
#
|
||||
# [blur]
|
||||
# depth = 1
|
||||
# [/blur]
|
||||
#
|
||||
# [/pre_commit]
|
||||
[pre_commit]
|
||||
|
||||
[blur]
|
||||
depth = 1
|
||||
[/blur]
|
||||
|
||||
[/pre_commit]
|
||||
|
||||
[image]
|
||||
name = "dialogs/translucent54-border-topleft.png"
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include "gui/widgets/helper.hpp"
|
||||
#include "../../text.hpp"
|
||||
#include "utils/foreach.tpp"
|
||||
#include "video.hpp"
|
||||
#include "wml_exception.hpp"
|
||||
|
||||
namespace gui2
|
||||
|
@ -1475,7 +1476,12 @@ void tcanvas::blit(surface& surf, SDL_Rect rect)
|
|||
draw();
|
||||
|
||||
if(blur_depth_) {
|
||||
if(is_neutral(surf)) {
|
||||
/*
|
||||
* If the surf is the video surface the blurring seems to stack, this
|
||||
* can be seen in the title screen. So also use the not 32 bpp method
|
||||
* for this situation.
|
||||
*/
|
||||
if(surf != get_video_surface() && is_neutral(surf)) {
|
||||
blur_surface(surf, rect, blur_depth_);
|
||||
} else {
|
||||
// Can't directly blur the surface if not 32 bpp.
|
||||
|
|
Loading…
Add table
Reference in a new issue