From 9396fe8814758a5c29a305e89698577192d2e7aa Mon Sep 17 00:00:00 2001 From: Causeless Date: Wed, 27 Dec 2023 20:23:28 +0000 Subject: [PATCH] Fixed alpha blender being set too late, causing a frame of wrong alpha when starting game --- Menus/TitleScreen.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Menus/TitleScreen.cpp b/Menus/TitleScreen.cpp index d79b7ce83..c9145b503 100644 --- a/Menus/TitleScreen.cpp +++ b/Menus/TitleScreen.cpp @@ -543,6 +543,11 @@ namespace RTE { ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void TitleScreen::DrawTitleScreenScene() { + // This only needs to be done once, but bitmaps can be reloaded which effectively undoes this, so just do it all the time to not deal with flags and checks. + set_write_alpha_blender(); + draw_trans_sprite(m_Planet.GetSpriteFrame(0), ContentFile("Base.rte/GUIs/Title/PlanetAlpha.png").GetAsBitmap(), 0, 0); + draw_trans_sprite(m_Moon.GetSpriteFrame(0), ContentFile("Base.rte/GUIs/Title/MoonAlpha.png").GetAsBitmap(), 0, 0); + Box nebulaTargetBox; m_Nebula.SetOffset(Vector(static_cast((m_TitleScreenMaxWidth - m_Nebula.GetBitmap()->w) / 2), m_ScrollOffset.GetY())); m_Nebula.Draw(g_FrameMan.GetBackBuffer32(), nebulaTargetBox, true); @@ -565,11 +570,6 @@ namespace RTE { m_Station.SetPos(m_PlanetPos + m_StationOffset); m_Station.SetRotAngle(-c_HalfPI + m_StationOrbitRotation); m_Station.Draw(g_FrameMan.GetBackBuffer32()); - - // This only needs to be done once, but bitmaps can be reloaded which effectively undoes this, so just do it all the time to not deal with flags and checks. - set_write_alpha_blender(); - draw_trans_sprite(m_Planet.GetSpriteFrame(0), ContentFile("Base.rte/GUIs/Title/PlanetAlpha.png").GetAsBitmap(), 0, 0); - draw_trans_sprite(m_Moon.GetSpriteFrame(0), ContentFile("Base.rte/GUIs/Title/MoonAlpha.png").GetAsBitmap(), 0, 0); } /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////