Remove hard-coded startup logo (Closes: #417)

pull/444/head
Hleb Valoshka 2019-10-08 23:54:36 +03:00
parent e3baaad767
commit 17db71b97f
26 changed files with 185 additions and 48 deletions

View File

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -24,6 +24,14 @@
# *
#****************************************************************************
overlay {
duration 5.0
fadeafter 4.0
colortop "#9999ff"
colorbottom "#ccccff"
filename "logo.png"
}
preloadtex { object "Sol/Earth" }
preloadtex { object "Sol/Earth/Moon" }

View File

@ -23,6 +23,14 @@
# *
#********************************************************************************
overlay {
duration 5.0
fadeafter 4.0
colortop "#9999ff"
colorbottom "#ccccff"
filename "logo.png"
}
preloadtex { object "Sol/Earth" }
preloadtex { object "Sol/Earth/Moon" }

View File

@ -32,6 +32,14 @@
# *
#****************************************************************************
overlay {
duration 5.0
fadeafter 4.0
colortop "#9999ff"
colorbottom "#ccccff"
filename "logo.png"
}
preloadtex { object "Sol/Earth" }
preloadtex { object "Sol/Earth/Moon" }

View File

@ -24,6 +24,14 @@
# *
#****************************************************************************
overlay {
duration 5.0
fadeafter 4.0
colortop "#9999ff"
colorbottom "#ccccff"
filename "logo.png"
}
preloadtex { object "Sol/Earth" }
preloadtex { object "Sol/Earth/Moon" }

View File

@ -24,6 +24,14 @@
# *
#****************************************************************************
overlay {
duration 5.0
fadeafter 4.0
colortop "#9999ff"
colorbottom "#ccccff"
filename "logo.png"
}
preloadtex { object "Sol/Earth" }
preloadtex { object "Sol/Earth/Moon" }

View File

@ -27,6 +27,14 @@
# *
#****************************************************************************
overlay {
duration 5.0
fadeafter 4.0
colortop "#9999ff"
colorbottom "#ccccff"
filename "logo.png"
}
preloadtex { object "Sol/Earth" }
preloadtex { object "Sol/Earth/Moon" }
@ -325,4 +333,4 @@
# Fin do script...
}
}

View File

@ -24,6 +24,14 @@
# *
#****************************************************************************
overlay {
duration 5.0
fadeafter 4.0
colortop "#9999ff"
colorbottom "#ccccff"
filename "logo.png"
}
preloadtex { object "Sol/Earth" }
preloadtex { object "Sol/Earth/Moon" }

View File

@ -24,6 +24,14 @@
# *
#****************************************************************************
overlay {
duration 5.0
fadeafter 4.0
colortop "#9999ff"
colorbottom "#ccccff"
filename "logo.png"
}
preloadtex { object "Sol/Earth" }
preloadtex { object "Sol/Earth/Moon" }

View File

@ -23,6 +23,14 @@
# *
#****************************************************************************
overlay {
duration 5.0
fadeafter 4.0
colortop "#9999ff"
colorbottom "#ccccff"
filename "logo.png"
}
preloadtex { object "Sol/Earth" }
preloadtex { object "Sol/Earth/Moon" }

View File

@ -21,6 +21,14 @@
# *
#****************************************************************************
overlay {
duration 5.0
fadeafter 4.0
colortop "#9999ff"
colorbottom "#ccccff"
filename "logo.png"
}
preloadtex { object "Sol/Earth" }
preloadtex { object "Sol/Earth/Moon" }

View File

@ -24,6 +24,14 @@
# *
#****************************************************************************
overlay {
duration 5.0
fadeafter 4.0
colortop "#9999ff"
colorbottom "#ccccff"
filename "logo.png"
}
preloadtex { object "Sol/Earth" }
preloadtex { object "Sol/Earth/Moon" }

View File

@ -24,6 +24,14 @@
# *
#****************************************************************************
overlay {
duration 5.0
fadeafter 4.0
colortop "#9999ff"
colorbottom "#ccccff"
filename "logo.png"
}
preloadtex { object "Sol/Earth" }
preloadtex { object "Sol/Earth/Moon" }

View File

@ -30,6 +30,14 @@
# *
#****************************************************************************
overlay {
duration 5.0
fadeafter 4.0
colortop "#9999ff"
colorbottom "#ccccff"
filename "logo.png"
}
preloadtex { object "Sol/Earth" }
preloadtex { object "Sol/Earth/Moon" }

View File

@ -24,6 +24,14 @@
# *
#****************************************************************************
overlay {
duration 5.0
fadeafter 4.0
colortop "#9999ff"
colorbottom "#ccccff"
filename "logo.png"
}
preloadtex { object "Sol/Earth" }
preloadtex { object "Sol/Earth/Moon" }

View File

@ -24,6 +24,14 @@
# *
#****************************************************************************
overlay {
duration 5.0
fadeafter 4.0
colortop "#9999ff"
colorbottom "#ccccff"
filename "logo.png"
}
preloadtex { object "Sol/Earth" }
preloadtex { object "Sol/Earth/Moon" }

View File

@ -24,6 +24,14 @@
# *
#****************************************************************************
overlay {
duration 5.0
fadeafter 4.0
colortop "#9999ff"
colorbottom "#ccccff"
filename "logo.png"
}
preloadtex { object "Sol/Earth" }
preloadtex { object "Sol/Earth/Moon" }

View File

@ -32,6 +32,14 @@
# *
#****************************************************************************
overlay {
duration 5.0
fadeafter 4.0
colortop "#9999ff"
colorbottom "#ccccff"
filename "logo.png"
}
preloadtex { object "Sol/Earth" }
preloadtex { object "Sol/Earth/Moon" }

View File

@ -24,6 +24,14 @@
# *
#****************************************************************************
overlay {
duration 5.0
fadeafter 4.0
colortop "#9999ff"
colorbottom "#ccccff"
filename "logo.png"
}
preloadtex { object "Sol/Earth" }
preloadtex { object "Sol/Earth/Moon" }

View File

@ -25,6 +25,14 @@
# *
#****************************************************************************
overlay {
duration 5.0
fadeafter 4.0
colortop "#9999ff"
colorbottom "#ccccff"
filename "logo.png"
}
preloadtex { object "Sol/Earth" }
preloadtex { object "Sol/Earth/Moon" }

View File

@ -24,6 +24,14 @@
# *
#****************************************************************************
overlay {
duration 5.0
fadeafter 4.0
colortop "#9999ff"
colorbottom "#ccccff"
filename "logo.png"
}
preloadtex { object "Sol/Earth" }
preloadtex { object "Sol/Earth/Moon" }

View File

@ -24,6 +24,14 @@
# *
#****************************************************************************
overlay {
duration 5.0
fadeafter 4.0
colortop "#9999ff"
colorbottom "#ccccff"
filename "logo.png"
}
preloadtex { object "Sol/Earth" }
preloadtex { object "Sol/Earth/Moon" }

View File

@ -27,6 +27,14 @@
# *
#****************************************************************************
overlay {
duration 5.0
fadeafter 4.0
colortop "#9999ff"
colorbottom "#ccccff"
filename "logo.png"
}
preloadtex { object "Sol/Earth" }
preloadtex { object "Sol/Earth/Moon" }

View File

@ -3602,45 +3602,6 @@ void CelestiaCore::renderOverlay()
overlay->restorePos();
}
// Show logo at start
if (logoTexture != nullptr)
{
glEnable(GL_TEXTURE_2D);
if (currentTime < 5.0)
{
int xSize = (int) (logoTexture->getWidth() * 0.8f);
int ySize = (int) (logoTexture->getHeight() * 0.8f);
int left = (width - xSize) / 2;
int bottom = height / 2;
float topAlpha, botAlpha;
if (currentTime < 4.0)
{
botAlpha = (float) clamp(currentTime / 1.0);
topAlpha = (float) clamp(currentTime / 4.0);
}
else
{
botAlpha = topAlpha = (float) (5.0 - currentTime);
}
logoTexture->bind();
vector<Color> c = {
{0.8f, 0.8f, 1.0f, botAlpha},
{0.8f, 0.8f, 1.0f, botAlpha},
{0.6f, 0.6f, 1.0f, topAlpha},
{0.6f, 0.6f, 1.0f, topAlpha}
};
Overlay::Rectangle r(left, bottom, xSize, ySize, c, Overlay::RectType::Textured);
overlay->rect(r);
}
else
{
delete logoTexture;
logoTexture = nullptr;
}
}
overlay->end();
setlocale(LC_NUMERIC, "C");
}
@ -4022,12 +3983,6 @@ bool CelestiaCore::initRenderer()
}
renderer->setFont(Renderer::FontLarge, titleFont);
if (config->logoTextureFile != "")
{
logoTexture = LoadTextureFromFile(fs::path("textures") / config->logoTextureFile);
}
return true;
}

View File

@ -428,8 +428,6 @@ class CelestiaCore // : public Watchable<CelestiaCore>
MovieCapture* movieCapture{ nullptr };
bool recording{ false };
Texture* logoTexture{ nullptr };
Alerter* alerter{ nullptr };
std::vector<CelestiaWatcher*> watchers;
CursorHandler* cursorHandler{ nullptr };

View File

@ -24,6 +24,14 @@
# *
#****************************************************************************
overlay {
duration 5.0
fadeafter 4.0
colortop "#9999ff"
colorbottom "#ccccff"
filename "logo.png"
}
preloadtex { object "Sol/Earth" }
preloadtex { object "Sol/Earth/Moon" }