Skip to content

Commit 9396fe8

Browse files
committed
Fixed alpha blender being set too late, causing a frame of wrong alpha when starting game
1 parent 0305917 commit 9396fe8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Menus/TitleScreen.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,11 @@ namespace RTE {
543543
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
544544

545545
void TitleScreen::DrawTitleScreenScene() {
546+
// 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.
547+
set_write_alpha_blender();
548+
draw_trans_sprite(m_Planet.GetSpriteFrame(0), ContentFile("Base.rte/GUIs/Title/PlanetAlpha.png").GetAsBitmap(), 0, 0);
549+
draw_trans_sprite(m_Moon.GetSpriteFrame(0), ContentFile("Base.rte/GUIs/Title/MoonAlpha.png").GetAsBitmap(), 0, 0);
550+
546551
Box nebulaTargetBox;
547552
m_Nebula.SetOffset(Vector(static_cast<float>((m_TitleScreenMaxWidth - m_Nebula.GetBitmap()->w) / 2), m_ScrollOffset.GetY()));
548553
m_Nebula.Draw(g_FrameMan.GetBackBuffer32(), nebulaTargetBox, true);
@@ -565,11 +570,6 @@ namespace RTE {
565570
m_Station.SetPos(m_PlanetPos + m_StationOffset);
566571
m_Station.SetRotAngle(-c_HalfPI + m_StationOrbitRotation);
567572
m_Station.Draw(g_FrameMan.GetBackBuffer32());
568-
569-
// 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.
570-
set_write_alpha_blender();
571-
draw_trans_sprite(m_Planet.GetSpriteFrame(0), ContentFile("Base.rte/GUIs/Title/PlanetAlpha.png").GetAsBitmap(), 0, 0);
572-
draw_trans_sprite(m_Moon.GetSpriteFrame(0), ContentFile("Base.rte/GUIs/Title/MoonAlpha.png").GetAsBitmap(), 0, 0);
573573
}
574574

575575
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)