From 17db71b97fc310b126b4765b9f9a16bc2427993c Mon Sep 17 00:00:00 2001 From: Hleb Valoshka <375gnu@gmail.com> Date: Tue, 8 Oct 2019 23:54:36 +0300 Subject: [PATCH] Remove hard-coded startup logo (Closes: #417) --- {textures => images}/logo.png | Bin locale/start_be.cel | 8 ++++++ locale/start_bg.cel | 8 ++++++ locale/start_de.cel | 8 ++++++ locale/start_es.cel | 8 ++++++ locale/start_fr.cel | 8 ++++++ locale/start_gl.cel | 10 +++++++- locale/start_hu.cel | 8 ++++++ locale/start_it.cel | 8 ++++++ locale/start_ja.cel | 8 ++++++ locale/start_ko.cel | 8 ++++++ locale/start_lt.cel | 8 ++++++ locale/start_lv.cel | 8 ++++++ locale/start_nl.cel | 8 ++++++ locale/start_pl.cel | 8 ++++++ locale/start_pt.cel | 8 ++++++ locale/start_pt_BR.cel | 8 ++++++ locale/start_ru.cel | 8 ++++++ locale/start_sk.cel | 8 ++++++ locale/start_sv.cel | 8 ++++++ locale/start_uk.cel | 8 ++++++ locale/start_zh_CN.cel | 8 ++++++ locale/start_zh_TW.cel | 8 ++++++ src/celestia/celestiacore.cpp | 45 ---------------------------------- src/celestia/celestiacore.h | 2 -- start.cel | 8 ++++++ 26 files changed, 185 insertions(+), 48 deletions(-) rename {textures => images}/logo.png (100%) diff --git a/textures/logo.png b/images/logo.png similarity index 100% rename from textures/logo.png rename to images/logo.png diff --git a/locale/start_be.cel b/locale/start_be.cel index 8c6e49deb..70ec4a082 100644 --- a/locale/start_be.cel +++ b/locale/start_be.cel @@ -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" } diff --git a/locale/start_bg.cel b/locale/start_bg.cel index e89263d86..0f48f9501 100644 --- a/locale/start_bg.cel +++ b/locale/start_bg.cel @@ -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" } diff --git a/locale/start_de.cel b/locale/start_de.cel index 83dad1a8b..c9709c984 100644 --- a/locale/start_de.cel +++ b/locale/start_de.cel @@ -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" } diff --git a/locale/start_es.cel b/locale/start_es.cel index b944533c8..939837d97 100644 --- a/locale/start_es.cel +++ b/locale/start_es.cel @@ -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" } diff --git a/locale/start_fr.cel b/locale/start_fr.cel index 53e376114..f40b0fdbe 100644 --- a/locale/start_fr.cel +++ b/locale/start_fr.cel @@ -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" } diff --git a/locale/start_gl.cel b/locale/start_gl.cel index 16b365373..7154e3964 100644 --- a/locale/start_gl.cel +++ b/locale/start_gl.cel @@ -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... -} \ No newline at end of file +} diff --git a/locale/start_hu.cel b/locale/start_hu.cel index 9365d75d8..12d413799 100644 --- a/locale/start_hu.cel +++ b/locale/start_hu.cel @@ -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" } diff --git a/locale/start_it.cel b/locale/start_it.cel index 70f113c69..096c182bb 100644 --- a/locale/start_it.cel +++ b/locale/start_it.cel @@ -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" } diff --git a/locale/start_ja.cel b/locale/start_ja.cel index bf3700aa3..7076a1c42 100644 --- a/locale/start_ja.cel +++ b/locale/start_ja.cel @@ -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" } diff --git a/locale/start_ko.cel b/locale/start_ko.cel index 6b0ed9722..d1ef907a8 100644 --- a/locale/start_ko.cel +++ b/locale/start_ko.cel @@ -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" } diff --git a/locale/start_lt.cel b/locale/start_lt.cel index 0a3eb9cd7..1324380d4 100644 --- a/locale/start_lt.cel +++ b/locale/start_lt.cel @@ -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" } diff --git a/locale/start_lv.cel b/locale/start_lv.cel index e12d57998..bcfb1fc3b 100644 --- a/locale/start_lv.cel +++ b/locale/start_lv.cel @@ -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" } diff --git a/locale/start_nl.cel b/locale/start_nl.cel index ca0b52e59..a2ca69e51 100644 --- a/locale/start_nl.cel +++ b/locale/start_nl.cel @@ -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" } diff --git a/locale/start_pl.cel b/locale/start_pl.cel index bef73430a..22c8ac99d 100644 --- a/locale/start_pl.cel +++ b/locale/start_pl.cel @@ -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" } diff --git a/locale/start_pt.cel b/locale/start_pt.cel index b87ead27d..4adccf9b4 100644 --- a/locale/start_pt.cel +++ b/locale/start_pt.cel @@ -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" } diff --git a/locale/start_pt_BR.cel b/locale/start_pt_BR.cel index b87ead27d..4adccf9b4 100644 --- a/locale/start_pt_BR.cel +++ b/locale/start_pt_BR.cel @@ -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" } diff --git a/locale/start_ru.cel b/locale/start_ru.cel index 5bdc0b81b..1b5f34a34 100644 --- a/locale/start_ru.cel +++ b/locale/start_ru.cel @@ -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" } diff --git a/locale/start_sk.cel b/locale/start_sk.cel index 6dd33ce95..d99d56072 100644 --- a/locale/start_sk.cel +++ b/locale/start_sk.cel @@ -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" } diff --git a/locale/start_sv.cel b/locale/start_sv.cel index c065db6ed..d1bbe4c1f 100644 --- a/locale/start_sv.cel +++ b/locale/start_sv.cel @@ -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" } diff --git a/locale/start_uk.cel b/locale/start_uk.cel index 0da6ce8b7..47bba4572 100644 --- a/locale/start_uk.cel +++ b/locale/start_uk.cel @@ -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" } diff --git a/locale/start_zh_CN.cel b/locale/start_zh_CN.cel index 4688f8834..b73da0a1c 100644 --- a/locale/start_zh_CN.cel +++ b/locale/start_zh_CN.cel @@ -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" } diff --git a/locale/start_zh_TW.cel b/locale/start_zh_TW.cel index f95b12622..b9861859e 100644 --- a/locale/start_zh_TW.cel +++ b/locale/start_zh_TW.cel @@ -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" } diff --git a/src/celestia/celestiacore.cpp b/src/celestia/celestiacore.cpp index 7979c2dec..5174bef2b 100644 --- a/src/celestia/celestiacore.cpp +++ b/src/celestia/celestiacore.cpp @@ -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 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; } diff --git a/src/celestia/celestiacore.h b/src/celestia/celestiacore.h index d8ab98c5b..3e519a3a2 100644 --- a/src/celestia/celestiacore.h +++ b/src/celestia/celestiacore.h @@ -428,8 +428,6 @@ class CelestiaCore // : public Watchable MovieCapture* movieCapture{ nullptr }; bool recording{ false }; - Texture* logoTexture{ nullptr }; - Alerter* alerter{ nullptr }; std::vector watchers; CursorHandler* cursorHandler{ nullptr }; diff --git a/start.cel b/start.cel index 8f3316fb6..8b13c109c 100644 --- a/start.cel +++ b/start.cel @@ -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" }