diff --git a/Engine/ac/event.cpp b/Engine/ac/event.cpp index 208c50f09f..c0ab765fa5 100644 --- a/Engine/ac/event.cpp +++ b/Engine/ac/event.cpp @@ -291,7 +291,10 @@ void process_event(const EventHappened *evp) { if (game.color_depth == 1) quit("!Cannot use crossfade screen transition in 256-colour games"); - IDriverDependantBitmap *ddb = prepare_screen_for_transition_in(); + // TODO: crossfade does not need a screen with transparency, it should be opaque; + // but Software renderer cannot alpha-blend non-masked sprite at the moment, + // see comment to drawing opaque sprite in SDLRendererGraphicsDriver! + IDriverDependantBitmap *ddb = prepare_screen_for_transition_in(false /* transparent */); for (int alpha = 254; alpha > 0; alpha -= 16) { // do the crossfade @@ -321,7 +324,7 @@ void process_event(const EventHappened *evp) { int aa,bb,cc; RGB interpal[256]; - IDriverDependantBitmap *ddb = prepare_screen_for_transition_in(); + IDriverDependantBitmap *ddb = prepare_screen_for_transition_in(false /* transparent */); for (aa=0;aa<16;aa++) { // merge the palette while dithering if (game.color_depth == 1) diff --git a/Engine/ac/screen.cpp b/Engine/ac/screen.cpp index 0f56a3fd00..6401cbae7c 100644 --- a/Engine/ac/screen.cpp +++ b/Engine/ac/screen.cpp @@ -87,7 +87,7 @@ void current_fade_out_effect () { } } -IDriverDependantBitmap* prepare_screen_for_transition_in() +IDriverDependantBitmap* prepare_screen_for_transition_in(bool opaque) { if (saved_viewport_bitmap == nullptr) quit("Crossfade: buffer is null attempting transition"); @@ -107,7 +107,7 @@ IDriverDependantBitmap* prepare_screen_for_transition_in() delete saved_viewport_bitmap; saved_viewport_bitmap = clippedBuffer; } - return gfxDriver->CreateDDBFromBitmap(saved_viewport_bitmap, false, true); + return gfxDriver->CreateDDBFromBitmap(saved_viewport_bitmap, false, opaque); } //============================================================================= diff --git a/Engine/ac/screen.h b/Engine/ac/screen.h index 343525c411..c6cb08b88f 100644 --- a/Engine/ac/screen.h +++ b/Engine/ac/screen.h @@ -24,7 +24,7 @@ namespace AGS { namespace Engine { class IDriverDependantBitmap; } } void fadein_impl(PALETTE p, int speed); void fadeout_impl(int spdd); void current_fade_out_effect (); -AGS::Engine::IDriverDependantBitmap* prepare_screen_for_transition_in(); +AGS::Engine::IDriverDependantBitmap* prepare_screen_for_transition_in(bool opaque); // Screenshot made in the last room, used during some of the transition effects extern AGS::Common::Bitmap *saved_viewport_bitmap;