Changeset 25289

Timestamp:
Apr 18, 2021, 6:23:10 PM (3 years ago)
Author:
Vladislav Belov
Message:

Moves cinematic overlay to GUI.

Differential Revision: https://code.wildfiregames.com/D3869

Location:
ps/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • ps/trunk/binaries/data/mods/public/gui/session/session.js

    r25156 r25289  
    630630    updateTimers();
    631631    Engine.GuiInterfaceCall("ClearRenamedEntities");
     632
     633
     634
     635
    632636}
    633637
     
    676680
    677681    Engine.GetGUIObjectByName("session").hidden = !g_ShowGUI || isPlayingCinemaPath;
     682
    678683    Engine.ConfigDB_CreateValue("user", "silhouettes", !isPlayingCinemaPath && Engine.ConfigDB_GetValue("user", "silhouettes") == "true" ? "true" : "false");
     684
     685
     686
     687
     688
     689
     690
     691
     692
     693
     694
     695
     696
     697
     698
     699
     700
     701
     702
     703
    679704}
    680705
  • ps/trunk/binaries/data/mods/public/gui/session/session.xml

    r25156 r25289  
    118118<object name="bandbox" type="image" sprite="bandbox" ghost="true" hidden="true" z="200"/>
    119119
     120
     121
     122
     123
     124
     125
    120126</objects>
  • ps/trunk/source/graphics/CinemaManager.cpp

    r24488 r25289  
    1 /* Copyright (C) 2020 Wildfire Games.
     1/* Copyright (C) 202 Wildfire Games.
    22 * This file is part of 0 A.D.
    33 *
     
    6565void CCinemaManager::Render() const
    6666{
    67     if (IsEnabled())
    68         DrawBars();
    69     else if (m_DrawPaths)
     67    if (!IsEnabled() && m_DrawPaths)
    7068        DrawPaths();
    7169}
     
    184182}
    185183
    186 void CCinemaManager::DrawBars() const
    187 {
    188     int height = (float)g_xres / 2.39f;
    189     int shift = (g_yres - height) / 2;
    190     if (shift <= 0)
    191         return;
    192 
    193 #if CONFIG2_GLES
    194     #warning TODO : implement bars for GLES
    195 #else
    196     // Set up transform for GL bars
    197     glMatrixMode(GL_PROJECTION);
    198     glPushMatrix();
    199     glLoadIdentity();
    200     glMatrixMode(GL_MODELVIEW);
    201     glPushMatrix();
    202     glLoadIdentity();
    203     CMatrix3D transform;
    204     transform.SetOrtho(0.f, (float)g_xres, 0.f, (float)g_yres, -1.f, 1000.f);
    205     glLoadMatrixf(&transform._11);
    206 
    207     glColor4f(0.0f, 0.0f, 0.0f, 1.0f);
    208 
    209     glEnable(GL_BLEND);
    210     glDisable(GL_DEPTH_TEST);
    211 
    212     glBegin(GL_QUADS);
    213     glVertex2i(0, 0);
    214     glVertex2i(g_xres, 0);
    215     glVertex2i(g_xres, shift);
    216     glVertex2i(0, shift);
    217     glEnd();
    218 
    219     glBegin(GL_QUADS);
    220     glVertex2i(0, g_yres - shift);
    221     glVertex2i(g_xres, g_yres - shift);
    222     glVertex2i(g_xres, g_yres);
    223     glVertex2i(0, g_yres);
    224     glEnd();
    225 
    226     glDisable(GL_BLEND);
    227     glEnable(GL_DEPTH_TEST);
    228 
    229     // Restore transform
    230     glMatrixMode(GL_PROJECTION);
    231     glPopMatrix();
    232     glMatrixMode(GL_MODELVIEW);
    233     glPopMatrix();
    234 #endif
    235 }
    236 
    237184bool CCinemaManager::IsEnabled() const
    238185{
  • ps/trunk/source/graphics/CinemaManager.h

    r22051 r25289  
    1 /* Copyright (C) 2019 Wildfire Games.
     1/* Copyright (C) 20 Wildfire Games.
    22 * This file is part of 0 A.D.
    33 *
     
    3838     */
    3939    void Render() const;
    40     void DrawBars() const;
    4140    void DrawPaths() const;
    4241    void DrawSpline(const RNSpline& spline, const CColor& splineColor, int smoothness, bool lines) const;
Note: See TracChangeset for help on using the changeset viewer.