From 250c934b9e02e2e1ed82275968faa8a0e4b5ad9d Mon Sep 17 00:00:00 2001 From: tomangelo2 Date: Mon, 9 Oct 2017 00:36:31 +0200 Subject: [PATCH 001/207] Added fonts configurability by a separate file --- src/CMakeLists.txt | 2 + src/app/app.h | 1 + src/common/font_file.cpp | 285 +++++++++++++++++++++++++++++++++++ src/common/font_file.h | 147 ++++++++++++++++++ src/graphics/engine/text.cpp | 16 +- 5 files changed, 446 insertions(+), 5 deletions(-) create mode 100644 src/common/font_file.cpp create mode 100644 src/common/font_file.h diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e0857506..1cf50289 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -106,6 +106,8 @@ set(BASE_SOURCES common/error.h common/event.cpp common/event.h + common/font_file.h + common/font_file.cpp common/global.h common/image.cpp common/image.h diff --git a/src/app/app.h b/src/app/app.h index 20721e24..3835b418 100644 --- a/src/app/app.h +++ b/src/app/app.h @@ -44,6 +44,7 @@ class CSoundInterface; class CInput; class CPathManager; class CConfigFile; +class CFontConfigFile; class CSystemUtils; struct SystemTimeStamp; diff --git a/src/common/font_file.cpp b/src/common/font_file.cpp new file mode 100644 index 00000000..0b234d02 --- /dev/null +++ b/src/common/font_file.cpp @@ -0,0 +1,285 @@ +/* + * This file is part of the Colobot: Gold Edition source code + * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * http://epsitec.ch; http://colobot.info; http://github.com/colobot + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see http://gnu.org/licenses + */ + +#include "common/font_file.h" + +#include "common/logger.h" +#include "common/make_unique.h" + +#include "common/resources/inputstream.h" +#include "common/resources/outputstream.h" + +#include "common/system/system.h" + +#include +#include +#include +#include +#include + +namespace bp = boost::property_tree; + +CFontConfigFile::CFontConfigFile() + : m_needsSave(false) + , m_useCurrentDirectory(false) + , m_loaded(false) +{ +} + +CFontConfigFile::~CFontConfigFile() +{ + if (m_needsSave) + { + GetLogger()->Warn("Font config file was not properly saved! Saving now...\n"); + Save(); + } +} + +bool CFontConfigFile::Init() +{ + try + { + std::unique_ptr stream; + bool good; + if (m_useCurrentDirectory) + { + auto inputStream = MakeUnique("./fonts.ini"); + good = inputStream->good(); + stream = std::move(inputStream); + } + else + { + auto inputStream = MakeUnique("fonts.ini"); + good = inputStream->is_open(); + stream = std::move(inputStream); + } + + if (good) + { + bp::ini_parser::read_ini(*stream, m_propertyTree); + m_loaded = true; + } + else + { + return false; + } + } + catch (std::exception & e) + { + GetLogger()->Error("Error on parsing config file: %s\n", e.what()); + return false; + } + return true; +} + +bool CFontConfigFile::Save() +{ + if (m_needsSave) + { + try + { + std::unique_ptr stream; + bool good; + if (m_useCurrentDirectory) + { + auto outputStream = MakeUnique("./fonts.ini"); + good = outputStream->good(); + stream = std::move(outputStream); + } + else + { + auto outputStream = MakeUnique("fonts.ini"); + good = outputStream->is_open(); + stream = std::move(outputStream); + } + + if (good) + { + bp::ini_parser::write_ini(*stream, m_propertyTree); + m_needsSave = false; + } + else + { + GetLogger()->Error("Error on storing fonts config file: failed to open file\n"); + return false; + } + } + catch (std::exception & e) + { + GetLogger()->Error("Error on storing fonts config file: %s\n", e.what()); + return false; + } + } + return true; +} + +std::string CFontConfigFile::GetCommonFont() +{ + try + { + std::string path = std::string("/fonts/") + m_propertyTree.get("FONT_COMMON"); + return path; + } + catch (std::exception & e) + { + GetLogger()->Log(m_loaded ? LOG_INFO : LOG_TRACE, "Error on parsing config file: %s. Default font will be used instead.\n", e.what()); + SetCommonFont("dvu_sans.ttf"); + return "/fonts/dvu_sans.ttf"; + } + return ""; +} + +bool CFontConfigFile::SetCommonFont(std::string filename) +{ + try + { + m_propertyTree.put("FONT_COMMON", filename); + m_needsSave = true; + } + catch (std::exception & e) + { + GetLogger()->Error("Error on editing config file: %s\n", e.what()); + return false; + } + return true; +} + +std::string CFontConfigFile::GetCommonBoldFont() +{ + try + { + std::string path = std::string("/fonts/") + m_propertyTree.get("FONT_COMMON_BOLD"); + return path; + } + catch (std::exception & e) + { + GetLogger()->Log(m_loaded ? LOG_INFO : LOG_TRACE, "Error on parsing config file: %s. Default font will be used instead.\n", e.what()); + SetCommonBoldFont("dvu_sans_bold.ttf"); + return "/fonts/dvu_sans_bold.ttf"; + } + return ""; +} + +bool CFontConfigFile::SetCommonBoldFont(std::string filename) +{ + try + { + m_propertyTree.put("FONT_COMMON_BOLD", filename); + m_needsSave = true; + } + catch (std::exception & e) + { + GetLogger()->Error("Error on editing config file: %s\n", e.what()); + return false; + } + return true; +} + +std::string CFontConfigFile::GetCommonItalicFont() +{ + try + { + std::string path = std::string("/fonts/") + m_propertyTree.get("FONT_COMMON_ITALIC"); + return path; + } + catch (std::exception & e) + { + GetLogger()->Log(m_loaded ? LOG_INFO : LOG_TRACE, "Error on parsing config file: %s. Default font will be used instead.\n", e.what()); + SetCommonItalicFont("dvu_sans_italic.ttf"); + return "/fonts/dvu_sans_italic.ttf"; + } + return ""; +} + +bool CFontConfigFile::SetCommonItalicFont(std::string filename) +{ + try + { + m_propertyTree.put("FONT_COMMON_ITALIC", filename); + m_needsSave = true; + } + catch (std::exception & e) + { + GetLogger()->Error("Error on editing config file: %s\n", e.what()); + return false; + } + return true; +} + +std::string CFontConfigFile::GetStudioFont() +{ + try + { + std::string path = std::string("/fonts/") + m_propertyTree.get("FONT_STUDIO"); + return path; + } + catch (std::exception & e) + { + GetLogger()->Log(m_loaded ? LOG_INFO : LOG_TRACE, "Error on parsing config file: %s. Default font will be used instead.\n", e.what()); + SetStudioFont("dvu_sans_mono.ttf"); + return "/fonts/dvu_sans_mono.ttf"; + } + return ""; +} + +bool CFontConfigFile::SetStudioFont(std::string filename) +{ + try + { + m_propertyTree.put("FONT_STUDIO", filename); + m_needsSave = true; + } + catch (std::exception & e) + { + GetLogger()->Error("Error on editing config file: %s\n", e.what()); + return false; + } + return true; +} + +std::string CFontConfigFile::GetStudioBoldFont() +{ + try + { + std::string path = std::string("/fonts/") + m_propertyTree.get("FONT_STUDIO_BOLD"); + return path; + } + catch (std::exception & e) + { + GetLogger()->Log(m_loaded ? LOG_INFO : LOG_TRACE, "Error on parsing config file: %s. Default font will be used instead.\n", e.what()); + SetStudioBoldFont("dvu_sans_mono_bold.ttf"); + return "/fonts/dvu_sans_mono_bold.ttf"; + } + return ""; +} + +bool CFontConfigFile::SetStudioBoldFont(std::string filename) +{ + try + { + m_propertyTree.put("FONT_STUDIO_BOLD", filename); + m_needsSave = true; + } + catch (std::exception & e) + { + GetLogger()->Error("Error on editing config file: %s\n", e.what()); + return false; + } + return true; +} diff --git a/src/common/font_file.h b/src/common/font_file.h new file mode 100644 index 00000000..c5d2869d --- /dev/null +++ b/src/common/font_file.h @@ -0,0 +1,147 @@ +/* + * This file is part of the Colobot: Gold Edition source code + * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * http://epsitec.ch; http://colobot.info; http://github.com/colobot + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see http://gnu.org/licenses + */ + + /** + * \file common/font_file.h + * \brief Class for loading fonts from /data/fonts/fonts.ini + */ + +#pragma once + +#include "common/singleton.h" + +#include + +#include + +/** +* \class CFontConfigFile +* +* \brief Class for loading config file +* +*/ + +class CFontConfigFile : public CSingleton +{ +public: + CFontConfigFile(); + virtual ~CFontConfigFile(); + + /** Loads fonts.ini + * \return return true on success + */ + bool Init(); + + /** Saves fonts.ini + * \return return true on success + */ + bool Save(); + + /** Reads common font from file + * \return return path to font file + */ + + std::string GetCommonFont(); + + /** Writes common font to file + * \return return true on success + */ + + bool SetCommonFont(std::string filename); + + /** Reads common bold font from file + * \return return path to font file + */ + + std::string GetCommonBoldFont(); + + /** Writes common bold font to file + * \return return true on success + */ + + bool SetCommonBoldFont(std::string filename); + + /** Reads common italic font from file + * \return return path to font file + */ + + std::string GetCommonItalicFont(); + + /** Writes common italic font to file + * \return return true on success + */ + + bool SetCommonItalicFont(std::string filename); + + /** Reads studio font from file + * \return return path to font file + */ + + std::string GetStudioFont(); + + /** Writes studio font to file + * \return return true on success + */ + + bool SetStudioFont(std::string filename); + + /** Reads studio bold font from file + * \return returns path to font file + */ + + std::string GetStudioBoldFont(); + + /** Writes studio bold font to file + * \return return true on success + */ + + bool SetStudioBoldFont(std::string filename); + +private: + boost::property_tree::ptree m_propertyTree; + bool m_needsSave; + bool m_useCurrentDirectory; + bool m_loaded; + + /*std::string m_colobotFont; + std::string m_colobotFontb; + std::string m_colobotFonti; + + std::string m_courierFont; + std::string m_courierFontb;*/ +}; + +/** + * \enum Fonts + * \brief enum of types of fonts used in game + *//* +enum Fonts +{ + FONT_COLOBOT = 0, + FONT_COLOBOT_BOLD = 1, + FONT_COLOBOT_ITALIC = 2, + FONT_COURIER = 3, + FONT_COURIER_BOLD = 4 +};*/ + +//! Global function to get config file instance +inline CFontConfigFile & GetFontConfigFile() +{ + return CFontConfigFile::GetInstance(); +} \ No newline at end of file diff --git a/src/graphics/engine/text.cpp b/src/graphics/engine/text.cpp index 53bd7f6a..aa7008d1 100644 --- a/src/graphics/engine/text.cpp +++ b/src/graphics/engine/text.cpp @@ -22,6 +22,7 @@ #include "app/app.h" +#include "common/font_file.h" #include "common/image.h" #include "common/logger.h" #include "common/stringutils.h" @@ -116,18 +117,23 @@ CText::~CText() bool CText::Create() { + CFontConfigFile fontconfig; + if (!GetFontConfigFile().Init()) + { + GetLogger()->Warn("Error on parsing fonts config file: failed to open file\n"); + } if (TTF_Init() != 0) { m_error = std::string("TTF_Init error: ") + std::string(TTF_GetError()); return false; } - m_fonts[FONT_COLOBOT] = MakeUnique("fonts/dvu_sans.ttf"); - m_fonts[FONT_COLOBOT_BOLD] = MakeUnique("fonts/dvu_sans_bold.ttf"); - m_fonts[FONT_COLOBOT_ITALIC] = MakeUnique("fonts/dvu_sans_italic.ttf"); + m_fonts[FONT_COLOBOT] = MakeUnique(GetFontConfigFile().GetCommonFont()); + m_fonts[FONT_COLOBOT_BOLD] = MakeUnique(GetFontConfigFile().GetCommonBoldFont()); + m_fonts[FONT_COLOBOT_ITALIC] = MakeUnique(GetFontConfigFile().GetCommonItalicFont()); - m_fonts[FONT_COURIER] = MakeUnique("fonts/dvu_sans_mono.ttf"); - m_fonts[FONT_COURIER_BOLD] = MakeUnique("fonts/dvu_sans_mono_bold.ttf"); + m_fonts[FONT_COURIER] = MakeUnique(GetFontConfigFile().GetStudioFont()); + m_fonts[FONT_COURIER_BOLD] = MakeUnique(GetFontConfigFile().GetStudioBoldFont()); for (auto it = m_fonts.begin(); it != m_fonts.end(); ++it) { From cf46c2457a5f0d951d9974503b488129c4a00659 Mon Sep 17 00:00:00 2001 From: tomangelo2 Date: Wed, 11 Oct 2017 17:02:09 +0200 Subject: [PATCH 002/207] Moved file font.ini to /fonts/ directory Separated SatCom font from Colobot font --- src/common/font_file.cpp | 138 ++++------------------------------- src/common/font_file.h | 69 ++---------------- src/graphics/engine/text.cpp | 2 + src/graphics/engine/text.h | 4 +- src/ui/displayinfo.cpp | 2 +- 5 files changed, 27 insertions(+), 188 deletions(-) diff --git a/src/common/font_file.cpp b/src/common/font_file.cpp index 0b234d02..bd7fd583 100644 --- a/src/common/font_file.cpp +++ b/src/common/font_file.cpp @@ -44,11 +44,6 @@ CFontConfigFile::CFontConfigFile() CFontConfigFile::~CFontConfigFile() { - if (m_needsSave) - { - GetLogger()->Warn("Font config file was not properly saved! Saving now...\n"); - Save(); - } } bool CFontConfigFile::Init() @@ -59,13 +54,13 @@ bool CFontConfigFile::Init() bool good; if (m_useCurrentDirectory) { - auto inputStream = MakeUnique("./fonts.ini"); + auto inputStream = MakeUnique("/fonts/fonts.ini"); good = inputStream->good(); stream = std::move(inputStream); } else { - auto inputStream = MakeUnique("fonts.ini"); + auto inputStream = MakeUnique("/fonts/fonts.ini"); good = inputStream->is_open(); stream = std::move(inputStream); } @@ -73,6 +68,7 @@ bool CFontConfigFile::Init() if (good) { bp::ini_parser::read_ini(*stream, m_propertyTree); + GetLogger()->Debug("Fonts config file loaded correctly. \n"); m_loaded = true; } else @@ -88,198 +84,92 @@ bool CFontConfigFile::Init() return true; } -bool CFontConfigFile::Save() -{ - if (m_needsSave) - { - try - { - std::unique_ptr stream; - bool good; - if (m_useCurrentDirectory) - { - auto outputStream = MakeUnique("./fonts.ini"); - good = outputStream->good(); - stream = std::move(outputStream); - } - else - { - auto outputStream = MakeUnique("fonts.ini"); - good = outputStream->is_open(); - stream = std::move(outputStream); - } - - if (good) - { - bp::ini_parser::write_ini(*stream, m_propertyTree); - m_needsSave = false; - } - else - { - GetLogger()->Error("Error on storing fonts config file: failed to open file\n"); - return false; - } - } - catch (std::exception & e) - { - GetLogger()->Error("Error on storing fonts config file: %s\n", e.what()); - return false; - } - } - return true; -} - std::string CFontConfigFile::GetCommonFont() { try { - std::string path = std::string("/fonts/") + m_propertyTree.get("FONT_COMMON"); + std::string path = std::string("/fonts/") + m_propertyTree.get("FontCommon"); return path; } catch (std::exception & e) { GetLogger()->Log(m_loaded ? LOG_INFO : LOG_TRACE, "Error on parsing config file: %s. Default font will be used instead.\n", e.what()); - SetCommonFont("dvu_sans.ttf"); return "/fonts/dvu_sans.ttf"; } return ""; } -bool CFontConfigFile::SetCommonFont(std::string filename) -{ - try - { - m_propertyTree.put("FONT_COMMON", filename); - m_needsSave = true; - } - catch (std::exception & e) - { - GetLogger()->Error("Error on editing config file: %s\n", e.what()); - return false; - } - return true; -} - std::string CFontConfigFile::GetCommonBoldFont() { try { - std::string path = std::string("/fonts/") + m_propertyTree.get("FONT_COMMON_BOLD"); + std::string path = std::string("/fonts/") + m_propertyTree.get("FontCommonBold"); return path; } catch (std::exception & e) { GetLogger()->Log(m_loaded ? LOG_INFO : LOG_TRACE, "Error on parsing config file: %s. Default font will be used instead.\n", e.what()); - SetCommonBoldFont("dvu_sans_bold.ttf"); return "/fonts/dvu_sans_bold.ttf"; } return ""; } -bool CFontConfigFile::SetCommonBoldFont(std::string filename) -{ - try - { - m_propertyTree.put("FONT_COMMON_BOLD", filename); - m_needsSave = true; - } - catch (std::exception & e) - { - GetLogger()->Error("Error on editing config file: %s\n", e.what()); - return false; - } - return true; -} - std::string CFontConfigFile::GetCommonItalicFont() { try { - std::string path = std::string("/fonts/") + m_propertyTree.get("FONT_COMMON_ITALIC"); + std::string path = std::string("/fonts/") + m_propertyTree.get("FontCommonItalic"); return path; } catch (std::exception & e) { GetLogger()->Log(m_loaded ? LOG_INFO : LOG_TRACE, "Error on parsing config file: %s. Default font will be used instead.\n", e.what()); - SetCommonItalicFont("dvu_sans_italic.ttf"); return "/fonts/dvu_sans_italic.ttf"; } return ""; } -bool CFontConfigFile::SetCommonItalicFont(std::string filename) -{ - try - { - m_propertyTree.put("FONT_COMMON_ITALIC", filename); - m_needsSave = true; - } - catch (std::exception & e) - { - GetLogger()->Error("Error on editing config file: %s\n", e.what()); - return false; - } - return true; -} - std::string CFontConfigFile::GetStudioFont() { try { - std::string path = std::string("/fonts/") + m_propertyTree.get("FONT_STUDIO"); + std::string path = std::string("/fonts/") + m_propertyTree.get("FontStudio"); return path; } catch (std::exception & e) { GetLogger()->Log(m_loaded ? LOG_INFO : LOG_TRACE, "Error on parsing config file: %s. Default font will be used instead.\n", e.what()); - SetStudioFont("dvu_sans_mono.ttf"); return "/fonts/dvu_sans_mono.ttf"; } return ""; } -bool CFontConfigFile::SetStudioFont(std::string filename) -{ - try - { - m_propertyTree.put("FONT_STUDIO", filename); - m_needsSave = true; - } - catch (std::exception & e) - { - GetLogger()->Error("Error on editing config file: %s\n", e.what()); - return false; - } - return true; -} - std::string CFontConfigFile::GetStudioBoldFont() { try { - std::string path = std::string("/fonts/") + m_propertyTree.get("FONT_STUDIO_BOLD"); + std::string path = std::string("/fonts/") + m_propertyTree.get("FontStudioBold"); return path; } catch (std::exception & e) { GetLogger()->Log(m_loaded ? LOG_INFO : LOG_TRACE, "Error on parsing config file: %s. Default font will be used instead.\n", e.what()); - SetStudioBoldFont("dvu_sans_mono_bold.ttf"); return "/fonts/dvu_sans_mono_bold.ttf"; } return ""; } -bool CFontConfigFile::SetStudioBoldFont(std::string filename) +std::string CFontConfigFile::GetSatComFont() { try { - m_propertyTree.put("FONT_STUDIO_BOLD", filename); - m_needsSave = true; + std::string path = std::string("/fonts/") + m_propertyTree.get("FontSatCom"); + return path; } catch (std::exception & e) { - GetLogger()->Error("Error on editing config file: %s\n", e.what()); - return false; + GetLogger()->Log(m_loaded ? LOG_INFO : LOG_TRACE, "Error on parsing config file: %s. Default font will be used instead.\n", e.what()); + return "/fonts/dvu_sans.ttf"; } - return true; + return ""; } diff --git a/src/common/font_file.h b/src/common/font_file.h index c5d2869d..d6a320a3 100644 --- a/src/common/font_file.h +++ b/src/common/font_file.h @@ -47,99 +47,44 @@ public: * \return return true on success */ bool Init(); - - /** Saves fonts.ini - * \return return true on success - */ - bool Save(); - + /** Reads common font from file * \return return path to font file */ - std::string GetCommonFont(); - - /** Writes common font to file - * \return return true on success - */ - - bool SetCommonFont(std::string filename); - + /** Reads common bold font from file * \return return path to font file */ - std::string GetCommonBoldFont(); - - /** Writes common bold font to file - * \return return true on success - */ - - bool SetCommonBoldFont(std::string filename); - + /** Reads common italic font from file * \return return path to font file */ - std::string GetCommonItalicFont(); - - /** Writes common italic font to file - * \return return true on success - */ - - bool SetCommonItalicFont(std::string filename); - + /** Reads studio font from file * \return return path to font file */ - std::string GetStudioFont(); - /** Writes studio font to file - * \return return true on success - */ - - bool SetStudioFont(std::string filename); - /** Reads studio bold font from file * \return returns path to font file */ - std::string GetStudioBoldFont(); - /** Writes studio bold font to file - * \return return true on success + /** Reads satcom font from file + * \return returns path to font file */ - - bool SetStudioBoldFont(std::string filename); + std::string GetSatComFont(); private: boost::property_tree::ptree m_propertyTree; bool m_needsSave; bool m_useCurrentDirectory; bool m_loaded; - - /*std::string m_colobotFont; - std::string m_colobotFontb; - std::string m_colobotFonti; - - std::string m_courierFont; - std::string m_courierFontb;*/ }; -/** - * \enum Fonts - * \brief enum of types of fonts used in game - *//* -enum Fonts -{ - FONT_COLOBOT = 0, - FONT_COLOBOT_BOLD = 1, - FONT_COLOBOT_ITALIC = 2, - FONT_COURIER = 3, - FONT_COURIER_BOLD = 4 -};*/ - //! Global function to get config file instance inline CFontConfigFile & GetFontConfigFile() { diff --git a/src/graphics/engine/text.cpp b/src/graphics/engine/text.cpp index aa7008d1..6443a6f1 100644 --- a/src/graphics/engine/text.cpp +++ b/src/graphics/engine/text.cpp @@ -131,6 +131,8 @@ bool CText::Create() m_fonts[FONT_COLOBOT] = MakeUnique(GetFontConfigFile().GetCommonFont()); m_fonts[FONT_COLOBOT_BOLD] = MakeUnique(GetFontConfigFile().GetCommonBoldFont()); m_fonts[FONT_COLOBOT_ITALIC] = MakeUnique(GetFontConfigFile().GetCommonItalicFont()); + + m_fonts[FONT_SATCOM] = MakeUnique(GetFontConfigFile().GetSatComFont()); m_fonts[FONT_COURIER] = MakeUnique(GetFontConfigFile().GetStudioFont()); m_fonts[FONT_COURIER_BOLD] = MakeUnique(GetFontConfigFile().GetStudioBoldFont()); diff --git a/src/graphics/engine/text.h b/src/graphics/engine/text.h index f6414c00..275885e9 100644 --- a/src/graphics/engine/text.h +++ b/src/graphics/engine/text.h @@ -88,7 +88,9 @@ enum FontType //! Alias for bold courier font FONT_COURIER_BOLD = FONT_COURIER | FONT_BOLD, - // 0x02 left for possible another font + //! SatCom font used for interface + + FONT_SATCOM = 0x02, //! Pseudo-font loaded from textures for buttons, icons, etc. FONT_BUTTON = 0x03, diff --git a/src/ui/displayinfo.cpp b/src/ui/displayinfo.cpp index 76aee701..8ae66ad5 100644 --- a/src/ui/displayinfo.cpp +++ b/src/ui/displayinfo.cpp @@ -383,7 +383,7 @@ void CDisplayInfo::StartDisplayInfo(std::string filename, int index, bool bSoluc edit->SetState(STATE_SHADOW); edit->SetMultiFont(true); edit->SetMaxChar(10000); - edit->SetFontType(Gfx::FONT_COLOBOT); + edit->SetFontType(Gfx::FONT_SATCOM); edit->SetSoluceMode(bSoluce); edit->ReadText(filename.c_str()); edit->HyperHome(filename.c_str()); From 054d1c3e54f22255d701af41ea56464a26af9bdc Mon Sep 17 00:00:00 2001 From: tomangelo2 Date: Wed, 11 Oct 2017 17:10:04 +0200 Subject: [PATCH 003/207] Changed in-engine fonts names --- src/graphics/engine/engine.cpp | 12 +++++----- src/graphics/engine/particle.cpp | 2 +- src/graphics/engine/text.cpp | 38 +++++++++++++++--------------- src/graphics/engine/text.h | 10 ++++---- src/level/robotmain.cpp | 8 +++---- src/ui/controls/control.cpp | 2 +- src/ui/controls/edit.cpp | 12 +++++----- src/ui/debug_menu.cpp | 2 +- src/ui/displaytext.cpp | 2 +- src/ui/maindialog.cpp | 2 +- src/ui/screen/screen.cpp | 2 +- src/ui/screen/screen_io_write.cpp | 2 +- src/ui/screen/screen_main_menu.cpp | 2 +- src/ui/screen/screen_quit.cpp | 10 ++++---- src/ui/studio.cpp | 4 ++-- 15 files changed, 55 insertions(+), 55 deletions(-) diff --git a/src/graphics/engine/engine.cpp b/src/graphics/engine/engine.cpp index a1458384..4f43622e 100644 --- a/src/graphics/engine/engine.cpp +++ b/src/graphics/engine/engine.cpp @@ -5045,7 +5045,7 @@ void CEngine::DrawStats() if (!m_showStats) return; - float height = m_text->GetAscent(FONT_COLOBOT, 13.0f); + float height = m_text->GetAscent(FONT_COMMON, 13.0f); float width = 0.4f; const int TOTAL_LINES = 22; @@ -5072,13 +5072,13 @@ void CEngine::DrawStats() auto drawStatsLine = [&](const std::string& name, const std::string& value, const std::string& value2) { if (!name.empty()) - m_text->DrawText(name+":", FONT_COLOBOT, 12.0f, pos, 1.0f, TEXT_ALIGN_LEFT, 0, Color(1.0f, 1.0f, 1.0f, 1.0f)); + m_text->DrawText(name+":", FONT_COMMON, 12.0f, pos, 1.0f, TEXT_ALIGN_LEFT, 0, Color(1.0f, 1.0f, 1.0f, 1.0f)); pos.x += 0.25f; if (!value.empty()) - m_text->DrawText(value, FONT_COLOBOT, 12.0f, pos, 1.0f, TEXT_ALIGN_LEFT, 0, Color(1.0f, 1.0f, 1.0f, 1.0f)); + m_text->DrawText(value, FONT_COMMON, 12.0f, pos, 1.0f, TEXT_ALIGN_LEFT, 0, Color(1.0f, 1.0f, 1.0f, 1.0f)); pos.x += 0.15f; if (!value2.empty()) - m_text->DrawText(value2, FONT_COLOBOT, 12.0f, pos, 1.0f, TEXT_ALIGN_RIGHT, 0, Color(1.0f, 1.0f, 1.0f, 1.0f)); + m_text->DrawText(value2, FONT_COMMON, 12.0f, pos, 1.0f, TEXT_ALIGN_RIGHT, 0, Color(1.0f, 1.0f, 1.0f, 1.0f)); pos.x -= 0.4f; pos.y -= height; }; @@ -5146,8 +5146,8 @@ void CEngine::DrawTimer() { SetState(ENG_RSTATE_TEXT); - Math::Point pos(0.98f, 0.98f-m_text->GetAscent(FONT_COLOBOT, 15.0f)); - m_text->DrawText(m_timerText, FONT_COLOBOT, 15.0f, pos, 1.0f, TEXT_ALIGN_RIGHT, 0, Color(1.0f, 1.0f, 1.0f, 1.0f)); + Math::Point pos(0.98f, 0.98f-m_text->GetAscent(FONT_COMMON, 15.0f)); + m_text->DrawText(m_timerText, FONT_COMMON, 15.0f, pos, 1.0f, TEXT_ALIGN_RIGHT, 0, Color(1.0f, 1.0f, 1.0f, 1.0f)); } void CEngine::AddBaseObjTriangles(int baseObjRank, const std::vector& triangles) diff --git a/src/graphics/engine/particle.cpp b/src/graphics/engine/particle.cpp index f5c254e3..1dcaf014 100644 --- a/src/graphics/engine/particle.cpp +++ b/src/graphics/engine/particle.cpp @@ -3301,7 +3301,7 @@ void CParticle::DrawParticleCylinder(int i) void CParticle::DrawParticleText(int i) { - CharTexture tex = m_engine->GetText()->GetCharTexture(static_cast(m_particle[i].text), FONT_COURIER, FONT_SIZE_BIG*2.0f); + CharTexture tex = m_engine->GetText()->GetCharTexture(static_cast(m_particle[i].text), FONT_STUDIO, FONT_SIZE_BIG*2.0f); if (tex.id == 0) return; m_device->SetTexture(0, tex.id); diff --git a/src/graphics/engine/text.cpp b/src/graphics/engine/text.cpp index 6443a6f1..605f73b4 100644 --- a/src/graphics/engine/text.cpp +++ b/src/graphics/engine/text.cpp @@ -104,7 +104,7 @@ CText::CText(CEngine* engine) m_defaultSize = 12.0f; m_tabSize = 4; - m_lastFontType = FONT_COLOBOT; + m_lastFontType = FONT_COMMON; m_lastFontSize = 0; m_lastCachedFont = nullptr; } @@ -128,14 +128,14 @@ bool CText::Create() return false; } - m_fonts[FONT_COLOBOT] = MakeUnique(GetFontConfigFile().GetCommonFont()); - m_fonts[FONT_COLOBOT_BOLD] = MakeUnique(GetFontConfigFile().GetCommonBoldFont()); - m_fonts[FONT_COLOBOT_ITALIC] = MakeUnique(GetFontConfigFile().GetCommonItalicFont()); + m_fonts[FONT_COMMON] = MakeUnique(GetFontConfigFile().GetCommonFont()); + m_fonts[FONT_COMMON_BOLD] = MakeUnique(GetFontConfigFile().GetCommonBoldFont()); + m_fonts[FONT_COMMON_ITALIC] = MakeUnique(GetFontConfigFile().GetCommonItalicFont()); m_fonts[FONT_SATCOM] = MakeUnique(GetFontConfigFile().GetSatComFont()); - m_fonts[FONT_COURIER] = MakeUnique(GetFontConfigFile().GetStudioFont()); - m_fonts[FONT_COURIER_BOLD] = MakeUnique(GetFontConfigFile().GetStudioBoldFont()); + m_fonts[FONT_STUDIO] = MakeUnique(GetFontConfigFile().GetStudioFont()); + m_fonts[FONT_STUDIO_BOLD] = MakeUnique(GetFontConfigFile().GetStudioBoldFont()); for (auto it = m_fonts.begin(); it != m_fonts.end(); ++it) { @@ -153,7 +153,7 @@ void CText::Destroy() m_fonts.clear(); m_lastCachedFont = nullptr; - m_lastFontType = FONT_COLOBOT; + m_lastFontType = FONT_COMMON; m_lastFontSize = 0; TTF_Quit(); @@ -188,7 +188,7 @@ void CText::FlushCache() } m_lastCachedFont = nullptr; - m_lastFontType = FONT_COLOBOT; + m_lastFontType = FONT_COMMON; m_lastFontSize = 0; } @@ -271,8 +271,8 @@ void CText::SizeText(const std::string &text, std::vector::iterato end.x -= sw; } - start.y -= GetDescent(FONT_COLOBOT, size); - end.y += GetAscent(FONT_COLOBOT, size); + start.y -= GetDescent(FONT_COMMON, size); + end.y += GetAscent(FONT_COMMON, size); } void CText::SizeText(const std::string &text, FontType font, @@ -352,7 +352,7 @@ float CText::GetStringWidth(const std::string &text, unsigned int fmtIndex = 0; while (index < text.length()) { - FontType font = FONT_COLOBOT; + FontType font = FONT_COMMON; if (format + fmtIndex != end) font = static_cast(*(format + fmtIndex) & FONT_MASK_FONT); @@ -399,7 +399,7 @@ float CText::GetCharWidth(UTF8Char ch, FontType font, float size, float offset) if (font == FONT_BUTTON) { Math::IntPoint windowSize = m_engine->GetWindowSize(); - float height = GetHeight(FONT_COLOBOT, size); + float height = GetHeight(FONT_COMMON, size); float width = height*(static_cast(windowSize.y)/windowSize.x); return width; } @@ -441,7 +441,7 @@ int CText::GetCharWidthInt(UTF8Char ch, FontType font, float size, float offset) if (font == FONT_BUTTON) { Math::IntPoint windowSize = m_engine->GetWindowSize(); - int height = GetHeightInt(FONT_COLOBOT, size); + int height = GetHeightInt(FONT_COMMON, size); int width = height*(static_cast(windowSize.y)/windowSize.x); return width; } @@ -487,7 +487,7 @@ int CText::Justify(const std::string &text, std::vector::iterator unsigned int fmtIndex = 0; while (index < text.length()) { - FontType font = FONT_COLOBOT; + FontType font = FONT_COMMON; if (format + fmtIndex != end) font = static_cast(*(format + fmtIndex) & FONT_MASK_FONT); @@ -571,7 +571,7 @@ int CText::Detect(const std::string &text, std::vector::iterator f unsigned int fmtIndex = 0; while (index < text.length()) { - FontType font = FONT_COLOBOT; + FontType font = FONT_COMMON; if (format + fmtIndex != end) font = static_cast(*(format + fmtIndex) & FONT_MASK_FONT); @@ -708,7 +708,7 @@ void CText::DrawString(const std::string &text, std::vector::itera StringToUTFCharList(text, chars, format, end); for (auto it = chars.begin(); it != chars.end(); ++it) { - FontType font = FONT_COLOBOT; + FontType font = FONT_COMMON; if (format + fmtIndex != end) font = static_cast(*(format + fmtIndex) & FONT_MASK_FONT); @@ -779,7 +779,7 @@ void CText::DrawString(const std::string &text, std::vector::itera if (eol != 0) { - FontType font = FONT_COLOBOT; + FontType font = FONT_COMMON; UTF8Char ch = TranslateSpecialChar(eol); color = Color(1.0f, 0.0f, 0.0f); DrawCharAndAdjustPos(ch, font, size, pos, color); @@ -818,7 +818,7 @@ void CText::StringToUTFCharList(const std::string &text, std::vector & { UTF8Char ch; - FontType font = FONT_COLOBOT; + FontType font = FONT_COMMON; if (format + index != end) font = static_cast(*(format + index) & FONT_MASK_FONT); @@ -923,7 +923,7 @@ void CText::DrawCharAndAdjustPos(UTF8Char ch, FontType font, float size, Math::I if (font == FONT_BUTTON) { Math::IntPoint windowSize = m_engine->GetWindowSize(); - int height = GetHeightInt(FONT_COLOBOT, size); + int height = GetHeightInt(FONT_COMMON, size); int width = height * (static_cast(windowSize.y)/windowSize.x); Math::IntPoint p1(pos.x, pos.y - height); diff --git a/src/graphics/engine/text.h b/src/graphics/engine/text.h index 275885e9..32d50d1f 100644 --- a/src/graphics/engine/text.h +++ b/src/graphics/engine/text.h @@ -77,16 +77,16 @@ enum FontType FONT_ITALIC = 0x08, //! Default colobot font used for interface - FONT_COLOBOT = 0x00, + FONT_COMMON = 0x00, //! Alias for bold colobot font - FONT_COLOBOT_BOLD = FONT_COLOBOT | FONT_BOLD, + FONT_COMMON_BOLD = FONT_COMMON | FONT_BOLD, //! Alias for italic colobot font - FONT_COLOBOT_ITALIC = FONT_COLOBOT | FONT_ITALIC, + FONT_COMMON_ITALIC = FONT_COMMON | FONT_ITALIC, //! Courier (monospace) font used mainly in code editor (only regular & bold) - FONT_COURIER = 0x01, + FONT_STUDIO = 0x01, //! Alias for bold courier font - FONT_COURIER_BOLD = FONT_COURIER | FONT_BOLD, + FONT_STUDIO_BOLD = FONT_STUDIO | FONT_BOLD, //! SatCom font used for interface diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp index a92b10b2..6592a234 100644 --- a/src/level/robotmain.cpp +++ b/src/level/robotmain.cpp @@ -585,7 +585,7 @@ void CRobotMain::ChangePhase(Phase phase) ddim.x = dim.x*15; ddim.y = dim.y*3.0f; pe = m_interface->CreateEdit(pos, ddim, 0, EVENT_EDIT0); pe->SetGenericMode(true); - pe->SetFontType(Gfx::FONT_COLOBOT); + pe->SetFontType(Gfx::FONT_COMMON); pe->SetEditCap(false); pe->SetHighlightCap(false); pe->ReadText(std::string("help/") + m_app->GetLanguageChar() + std::string("/win.txt")); @@ -2116,7 +2116,7 @@ void CRobotMain::CreateTooltip(Math::Point pos, const std::string& text) Math::Point start, end; - m_engine->GetText()->SizeText(text, Gfx::FONT_COLOBOT, Gfx::FONT_SIZE_SMALL, + m_engine->GetText()->SizeText(text, Gfx::FONT_COMMON, Gfx::FONT_SIZE_SMALL, corner, Gfx::TEXT_ALIGN_LEFT, start, end); @@ -2151,7 +2151,7 @@ void CRobotMain::CreateTooltip(Math::Point pos, const std::string& text) pw->SetState(Ui::STATE_SHADOW); pw->SetTrashEvent(false); - pos.y -= m_engine->GetText()->GetHeight(Gfx::FONT_COLOBOT, Gfx::FONT_SIZE_SMALL) / 2.0f; + pos.y -= m_engine->GetText()->GetHeight(Gfx::FONT_COMMON, Gfx::FONT_SIZE_SMALL) / 2.0f; pw->CreateLabel(pos, dim, -1, EVENT_LABEL2, text); } } @@ -5813,7 +5813,7 @@ void CRobotMain::CreateCodeBattleInterface() int numTeams = m_scoreboard ? GetAllTeams().size() : 0; assert(numTeams < EVENT_SCOREBOARD_MAX-EVENT_SCOREBOARD+1); - float textHeight = m_engine->GetText()->GetHeight(Gfx::FONT_COLOBOT, Gfx::FONT_SIZE_SMALL); + float textHeight = m_engine->GetText()->GetHeight(Gfx::FONT_COMMON, Gfx::FONT_SIZE_SMALL); ddim.x = 100.0f/640.0f; ddim.y = 100.0f/480.0f + numTeams * textHeight; diff --git a/src/ui/controls/control.cpp b/src/ui/controls/control.cpp index e0b8ccf9..a9e5a372 100644 --- a/src/ui/controls/control.cpp +++ b/src/ui/controls/control.cpp @@ -43,7 +43,7 @@ CControl::CControl() m_eventType = EVENT_NULL; m_state = STATE_ENABLE|STATE_VISIBLE|STATE_GLINT; m_fontSize = Gfx::FONT_SIZE_SMALL; - m_fontType = Gfx::FONT_COLOBOT; + m_fontType = Gfx::FONT_COMMON; m_textAlign = Gfx::TEXT_ALIGN_CENTER; //instead m_justify m_bFocus = false; m_bCapture = false; diff --git a/src/ui/controls/edit.cpp b/src/ui/controls/edit.cpp index 7d08b260..05e7c786 100644 --- a/src/ui/controls/edit.cpp +++ b/src/ui/controls/edit.cpp @@ -106,7 +106,7 @@ CEdit::CEdit() { m_len = 0; - m_fontType = Gfx::FONT_COURIER; + m_fontType = Gfx::FONT_STUDIO; m_bEdit = true; m_bHilite = true; m_bInsideScroll = true; @@ -1323,13 +1323,13 @@ void CEdit::SetText(const std::string& text, bool bNew) if ( text[i+1] == 'n' ) // normal ? { font &= ~Gfx::FONT_MASK_FONT; - font |= Gfx::FONT_COLOBOT; + font |= Gfx::FONT_COMMON; i += 2; } else if ( text[i+1] == 'c' ) // cbot ? { font &= ~Gfx::FONT_MASK_FONT; - font |= Gfx::FONT_COURIER; + font |= Gfx::FONT_STUDIO; i += 2; } else if ( text[i+1] == 'b' ) // big title ? @@ -1519,7 +1519,7 @@ bool CEdit::ReadText(std::string filename) if ( m_bSoluce || !bInSoluce ) { font &= ~Gfx::FONT_MASK_FONT; - font |= Gfx::FONT_COLOBOT; + font |= Gfx::FONT_COMMON; inCbot = false; } i += 3; @@ -1529,7 +1529,7 @@ bool CEdit::ReadText(std::string filename) if ( m_bSoluce || !bInSoluce ) { font &= ~Gfx::FONT_MASK_FONT; - font |= Gfx::FONT_COURIER; + font |= Gfx::FONT_STUDIO; if (!inCbot) { if (inCbotBackground) @@ -1633,7 +1633,7 @@ bool CEdit::ReadText(std::string filename) //? iWidth = m_lineHeight*RetValueParam(buffer.data()+i+7, 1); iWidth = static_cast(GetValueParam(buffer.data()+i+7, 1)); - iWidth *= m_engine->GetText()->GetHeight(Gfx::FONT_COLOBOT, Gfx::FONT_SIZE_SMALL); + iWidth *= m_engine->GetText()->GetHeight(Gfx::FONT_COMMON, Gfx::FONT_SIZE_SMALL); iLines = GetValueParam(buffer.data()+i+7, 2); // A part of image per line of text. diff --git a/src/ui/debug_menu.cpp b/src/ui/debug_menu.cpp index a6eb6f63..fe5b97cd 100644 --- a/src/ui/debug_menu.cpp +++ b/src/ui/debug_menu.cpp @@ -65,7 +65,7 @@ void CDebugMenu::ToggleInterface() { CreateInterface(); CLabel* pl = m_interface->CreateLabel(Math::Point(0.0f, 0.9f), Math::Point(1.0f, 0.1f), -1, EVENT_LABEL19, "??"); - pl->SetFontType(Gfx::FONT_COURIER); + pl->SetFontType(Gfx::FONT_STUDIO); } else { diff --git a/src/ui/displaytext.cpp b/src/ui/displaytext.cpp index f0d5bd92..4a5dcfcb 100644 --- a/src/ui/displaytext.cpp +++ b/src/ui/displaytext.cpp @@ -197,7 +197,7 @@ void CDisplayText::DisplayText(const char *text, Math::Vector goal, float height } hBox = 0.045f; - hLine = m_engine->GetText()->GetHeight(Gfx::FONT_COLOBOT, FONTSIZE); + hLine = m_engine->GetText()->GetHeight(Gfx::FONT_COMMON, FONTSIZE); nLine = 0; for ( i=0 ; iCreateLabel(pos, ddim, -1, EVENT_DIALOG_LABEL, text); - pl->SetFontType(Gfx::FONT_COLOBOT_BOLD); + pl->SetFontType(Gfx::FONT_COMMON_BOLD); //TODO: Add \n support in CLabel pos.y -= ddim.y; pl = pw->CreateLabel(pos, ddim, -1, EVENT_DIALOG_LABEL1, details); diff --git a/src/ui/screen/screen.cpp b/src/ui/screen/screen.cpp index 202d5e17..c526d994 100644 --- a/src/ui/screen/screen.cpp +++ b/src/ui/screen/screen.cpp @@ -71,7 +71,7 @@ void CScreen::CreateVersionDisplay() ddim.x = 90.0f/640.0f; ddim.y = 10.0f/480.0f; CLabel* pl = pw->CreateLabel(pos, ddim, 0, EVENT_LABEL1, COLOBOT_VERSION_DISPLAY); - pl->SetFontType(Gfx::FONT_COURIER); + pl->SetFontType(Gfx::FONT_STUDIO); pl->SetFontSize(9.0f); } } diff --git a/src/ui/screen/screen_io_write.cpp b/src/ui/screen/screen_io_write.cpp index f65fab38..567890f4 100644 --- a/src/ui/screen/screen_io_write.cpp +++ b/src/ui/screen/screen_io_write.cpp @@ -85,7 +85,7 @@ void CScreenIOWrite::CreateInterface() ddim.y = 18.0f/480.0f; pe = pw->CreateEdit(pos, ddim, 0, EVENT_INTERFACE_IONAME); pe->SetState(STATE_SHADOW); - pe->SetFontType(Gfx::FONT_COLOBOT); + pe->SetFontType(Gfx::FONT_COMMON); pe->SetMaxChar(35); IOReadName(); diff --git a/src/ui/screen/screen_main_menu.cpp b/src/ui/screen/screen_main_menu.cpp index ea8a29c2..d1c1c96e 100644 --- a/src/ui/screen/screen_main_menu.cpp +++ b/src/ui/screen/screen_main_menu.cpp @@ -159,7 +159,7 @@ void CScreenMainMenu::CreateInterface() pg->SetState(STATE_SHADOW); pos.y -= 5.0f/480.0f; pl = pw->CreateLabel(pos, ddim, 0, EVENT_LABEL1, "TerranovaTeam"); - pl->SetFontType(Gfx::FONT_COURIER); + pl->SetFontType(Gfx::FONT_STUDIO); pl->SetFontSize(Gfx::FONT_SIZE_SMALL); // SatCom button diff --git a/src/ui/screen/screen_quit.cpp b/src/ui/screen/screen_quit.cpp index 0651a364..8d57c10a 100644 --- a/src/ui/screen/screen_quit.cpp +++ b/src/ui/screen/screen_quit.cpp @@ -61,7 +61,7 @@ void CScreenQuit::CreateInterface() pe->SetGenericMode(true); pe->SetEditCap(false); pe->SetHighlightCap(false); - pe->SetFontType(Gfx::FONT_COURIER); + pe->SetFontType(Gfx::FONT_STUDIO); pe->SetFontSize(Gfx::FONT_SIZE_SMALL); pe->ReadText(std::string("help/") + m_app->GetLanguageChar() + std::string("/authors.txt")); @@ -71,13 +71,13 @@ void CScreenQuit::CreateInterface() ddim.y = 16.0f/480.0f; GetResource(RES_TEXT, RT_GENERIC_DEV1, name); pl = pw->CreateLabel(pos, ddim, 0, EVENT_LABEL1, name); - pl->SetFontType(Gfx::FONT_COURIER); + pl->SetFontType(Gfx::FONT_STUDIO); pl->SetFontSize(Gfx::FONT_SIZE_SMALL); pos.y = 13.0f/480.0f; GetResource(RES_TEXT, RT_GENERIC_DEV2, name); pl = pw->CreateLabel(pos, ddim, 0, EVENT_LABEL2, name); - pl->SetFontType(Gfx::FONT_COURIER); + pl->SetFontType(Gfx::FONT_STUDIO); pl->SetFontSize(Gfx::FONT_SIZE_SMALL); pos.x = 355.0f/640.0f; @@ -86,13 +86,13 @@ void CScreenQuit::CreateInterface() ddim.y = 16.0f/480.0f; GetResource(RES_TEXT, RT_GENERIC_EDIT1, name); pl = pw->CreateLabel(pos, ddim, 0, EVENT_LABEL3, name); - pl->SetFontType(Gfx::FONT_COURIER); + pl->SetFontType(Gfx::FONT_STUDIO); pl->SetFontSize(Gfx::FONT_SIZE_SMALL); pos.y = 13.0f/480.0f; GetResource(RES_TEXT, RT_GENERIC_EDIT2, name); pl = pw->CreateLabel(pos, ddim, 0, EVENT_LABEL4, name); - pl->SetFontType(Gfx::FONT_COURIER); + pl->SetFontType(Gfx::FONT_STUDIO); pl->SetFontSize(Gfx::FONT_SIZE_SMALL); pos.x = 306.0f/640.0f; diff --git a/src/ui/studio.cpp b/src/ui/studio.cpp index e3545cbb..35d920a8 100644 --- a/src/ui/studio.cpp +++ b/src/ui/studio.cpp @@ -606,7 +606,7 @@ void CStudio::StartEditScript(CScript *script, std::string name, Program* progra edit->SetState(STATE_SHADOW); edit->SetInsideScroll(false); //? if ( m_bRunning ) edit->SetEdit(false); - edit->SetFontType(Gfx::FONT_COURIER); + edit->SetFontType(Gfx::FONT_STUDIO); edit->SetFontStretch(1.0f); edit->SetDisplaySpec(true); edit->SetAutoIndent(m_engine->GetEditIndentMode()); @@ -618,7 +618,7 @@ void CStudio::StartEditScript(CScript *script, std::string name, Program* progra list = pw->CreateList(pos, dim, 1, EVENT_STUDIO_LIST, 1.2f); list->SetState(STATE_SHADOW); - list->SetFontType(Gfx::FONT_COURIER); + list->SetFontType(Gfx::FONT_STUDIO); list->SetSelectCap(false); list->SetFontSize(Gfx::FONT_SIZE_SMALL*0.85f); //? list->SetFontStretch(1.0f); From dd9439aed2fcebe7a21cb48036e5b3045d812757 Mon Sep 17 00:00:00 2001 From: tomangelo2 Date: Sun, 15 Oct 2017 22:47:32 +0200 Subject: [PATCH 004/207] Renamed font_file to font_config --- src/CMakeLists.txt | 4 ++-- src/common/{font_file.cpp => font_config.cpp} | 2 +- src/common/{font_file.h => font_config.h} | 2 +- src/graphics/engine/text.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) rename src/common/{font_file.cpp => font_config.cpp} (99%) rename src/common/{font_file.h => font_config.h} (98%) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1cf50289..37d6cb04 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -106,8 +106,8 @@ set(BASE_SOURCES common/error.h common/event.cpp common/event.h - common/font_file.h - common/font_file.cpp + common/font_config.h + common/font_config.cpp common/global.h common/image.cpp common/image.h diff --git a/src/common/font_file.cpp b/src/common/font_config.cpp similarity index 99% rename from src/common/font_file.cpp rename to src/common/font_config.cpp index bd7fd583..e4dc51b1 100644 --- a/src/common/font_file.cpp +++ b/src/common/font_config.cpp @@ -17,7 +17,7 @@ * along with this program. If not, see http://gnu.org/licenses */ -#include "common/font_file.h" +#include "common/font_config.h" #include "common/logger.h" #include "common/make_unique.h" diff --git a/src/common/font_file.h b/src/common/font_config.h similarity index 98% rename from src/common/font_file.h rename to src/common/font_config.h index d6a320a3..cbe0863e 100644 --- a/src/common/font_file.h +++ b/src/common/font_config.h @@ -18,7 +18,7 @@ */ /** - * \file common/font_file.h + * \file common/font_config.h * \brief Class for loading fonts from /data/fonts/fonts.ini */ diff --git a/src/graphics/engine/text.cpp b/src/graphics/engine/text.cpp index 605f73b4..6ecf9284 100644 --- a/src/graphics/engine/text.cpp +++ b/src/graphics/engine/text.cpp @@ -22,7 +22,7 @@ #include "app/app.h" -#include "common/font_file.h" +#include "common/font_config.h" #include "common/image.h" #include "common/logger.h" #include "common/stringutils.h" From 52d9330114a0e005a0a4575675d2c9fbd1e05b82 Mon Sep 17 00:00:00 2001 From: tomangelo2 Date: Sun, 15 Oct 2017 23:31:06 +0200 Subject: [PATCH 005/207] Replaced multiple methods with one --- src/common/font_config.cpp | 172 ++++++++++++++++++----------------- src/common/font_config.h | 31 +------ src/graphics/engine/text.cpp | 16 ++-- 3 files changed, 99 insertions(+), 120 deletions(-) diff --git a/src/common/font_config.cpp b/src/common/font_config.cpp index e4dc51b1..11d55833 100644 --- a/src/common/font_config.cpp +++ b/src/common/font_config.cpp @@ -27,6 +27,8 @@ #include "common/system/system.h" +#include "graphics/engine/text.h" + #include #include #include @@ -84,92 +86,92 @@ bool CFontConfigFile::Init() return true; } -std::string CFontConfigFile::GetCommonFont() +std::string CFontConfigFile::GetFont(Gfx::FontType type) { - try + switch(type) { - std::string path = std::string("/fonts/") + m_propertyTree.get("FontCommon"); - return path; + case Gfx::FONT_COMMON: + { + try + { + std::string path = std::string("/fonts/") + m_propertyTree.get("FontCommon"); + return path; + } + catch (std::exception & e) + { + GetLogger()->Log(m_loaded ? LOG_INFO : LOG_TRACE, "Error on parsing config file: %s. Default font will be used instead.\n", e.what()); + return "/fonts/dvu_sans.ttf"; + } + } + case Gfx::FONT_COMMON_BOLD: + { + try + { + std::string path = std::string("/fonts/") + m_propertyTree.get("FontCommonBold"); + return path; + } + catch (std::exception & e) + { + GetLogger()->Log(m_loaded ? LOG_INFO : LOG_TRACE, "Error on parsing config file: %s. Default font will be used instead.\n", e.what()); + return "/fonts/dvu_sans_bold.ttf"; + } + } + case Gfx::FONT_COMMON_ITALIC: + { + try + { + std::string path = std::string("/fonts/") + m_propertyTree.get("FontCommonItalic"); + return path; + } + catch (std::exception & e) + { + GetLogger()->Log(m_loaded ? LOG_INFO : LOG_TRACE, "Error on parsing config file: %s. Default font will be used instead.\n", e.what()); + return "/fonts/dvu_sans_italic.ttf"; + } + } + case Gfx::FONT_STUDIO: + { + try + { + std::string path = std::string("/fonts/") + m_propertyTree.get("FontStudio"); + return path; + } + catch (std::exception & e) + { + GetLogger()->Log(m_loaded ? LOG_INFO : LOG_TRACE, "Error on parsing config file: %s. Default font will be used instead.\n", e.what()); + return "/fonts/dvu_sans_mono.ttf"; + } + } + case Gfx::FONT_STUDIO_BOLD: + { + try + { + std::string path = std::string("/fonts/") + m_propertyTree.get("FontStudioBold"); + return path; + } + catch (std::exception & e) + { + GetLogger()->Log(m_loaded ? LOG_INFO : LOG_TRACE, "Error on parsing config file: %s. Default font will be used instead.\n", e.what()); + return "/fonts/dvu_sans_mono_bold.ttf"; + } + } + case Gfx::FONT_SATCOM: + { + try + { + std::string path = std::string("/fonts/") + m_propertyTree.get("FontSatCom"); + return path; + } + catch (std::exception & e) + { + GetLogger()->Log(m_loaded ? LOG_INFO : LOG_TRACE, "Error on parsing config file: %s. Default font will be used instead.\n", e.what()); + return "/fonts/dvu_sans.ttf"; + } + } + default: + { + GetLogger()->Debug("Incorrect font type: %i.\n", type); + return nullptr; + } } - catch (std::exception & e) - { - GetLogger()->Log(m_loaded ? LOG_INFO : LOG_TRACE, "Error on parsing config file: %s. Default font will be used instead.\n", e.what()); - return "/fonts/dvu_sans.ttf"; - } - return ""; -} - -std::string CFontConfigFile::GetCommonBoldFont() -{ - try - { - std::string path = std::string("/fonts/") + m_propertyTree.get("FontCommonBold"); - return path; - } - catch (std::exception & e) - { - GetLogger()->Log(m_loaded ? LOG_INFO : LOG_TRACE, "Error on parsing config file: %s. Default font will be used instead.\n", e.what()); - return "/fonts/dvu_sans_bold.ttf"; - } - return ""; -} - -std::string CFontConfigFile::GetCommonItalicFont() -{ - try - { - std::string path = std::string("/fonts/") + m_propertyTree.get("FontCommonItalic"); - return path; - } - catch (std::exception & e) - { - GetLogger()->Log(m_loaded ? LOG_INFO : LOG_TRACE, "Error on parsing config file: %s. Default font will be used instead.\n", e.what()); - return "/fonts/dvu_sans_italic.ttf"; - } - return ""; -} - -std::string CFontConfigFile::GetStudioFont() -{ - try - { - std::string path = std::string("/fonts/") + m_propertyTree.get("FontStudio"); - return path; - } - catch (std::exception & e) - { - GetLogger()->Log(m_loaded ? LOG_INFO : LOG_TRACE, "Error on parsing config file: %s. Default font will be used instead.\n", e.what()); - return "/fonts/dvu_sans_mono.ttf"; - } - return ""; -} - -std::string CFontConfigFile::GetStudioBoldFont() -{ - try - { - std::string path = std::string("/fonts/") + m_propertyTree.get("FontStudioBold"); - return path; - } - catch (std::exception & e) - { - GetLogger()->Log(m_loaded ? LOG_INFO : LOG_TRACE, "Error on parsing config file: %s. Default font will be used instead.\n", e.what()); - return "/fonts/dvu_sans_mono_bold.ttf"; - } - return ""; -} - -std::string CFontConfigFile::GetSatComFont() -{ - try - { - std::string path = std::string("/fonts/") + m_propertyTree.get("FontSatCom"); - return path; - } - catch (std::exception & e) - { - GetLogger()->Log(m_loaded ? LOG_INFO : LOG_TRACE, "Error on parsing config file: %s. Default font will be used instead.\n", e.what()); - return "/fonts/dvu_sans.ttf"; - } - return ""; } diff --git a/src/common/font_config.h b/src/common/font_config.h index cbe0863e..cbe2d3d9 100644 --- a/src/common/font_config.h +++ b/src/common/font_config.h @@ -26,6 +26,8 @@ #include "common/singleton.h" +#include "graphics/engine/text.h" + #include #include @@ -48,35 +50,10 @@ public: */ bool Init(); - /** Reads common font from file + /** Reads given font from file * \return return path to font file */ - std::string GetCommonFont(); - - /** Reads common bold font from file - * \return return path to font file - */ - std::string GetCommonBoldFont(); - - /** Reads common italic font from file - * \return return path to font file - */ - std::string GetCommonItalicFont(); - - /** Reads studio font from file - * \return return path to font file - */ - std::string GetStudioFont(); - - /** Reads studio bold font from file - * \return returns path to font file - */ - std::string GetStudioBoldFont(); - - /** Reads satcom font from file - * \return returns path to font file - */ - std::string GetSatComFont(); + std::string GetFont(Gfx::FontType type); private: boost::property_tree::ptree m_propertyTree; diff --git a/src/graphics/engine/text.cpp b/src/graphics/engine/text.cpp index 6ecf9284..016b1d22 100644 --- a/src/graphics/engine/text.cpp +++ b/src/graphics/engine/text.cpp @@ -127,16 +127,16 @@ bool CText::Create() m_error = std::string("TTF_Init error: ") + std::string(TTF_GetError()); return false; } - - m_fonts[FONT_COMMON] = MakeUnique(GetFontConfigFile().GetCommonFont()); - m_fonts[FONT_COMMON_BOLD] = MakeUnique(GetFontConfigFile().GetCommonBoldFont()); - m_fonts[FONT_COMMON_ITALIC] = MakeUnique(GetFontConfigFile().GetCommonItalicFont()); - m_fonts[FONT_SATCOM] = MakeUnique(GetFontConfigFile().GetSatComFont()); - - m_fonts[FONT_STUDIO] = MakeUnique(GetFontConfigFile().GetStudioFont()); - m_fonts[FONT_STUDIO_BOLD] = MakeUnique(GetFontConfigFile().GetStudioBoldFont()); + m_fonts[FONT_COMMON] = MakeUnique(GetFontConfigFile().GetFont(FONT_COMMON)); + m_fonts[FONT_COMMON_BOLD] = MakeUnique(GetFontConfigFile().GetFont(FONT_COMMON_BOLD)); + m_fonts[FONT_COMMON_ITALIC] = MakeUnique(GetFontConfigFile().GetFont(FONT_COMMON_ITALIC)); + + m_fonts[FONT_SATCOM] = MakeUnique(GetFontConfigFile().GetFont(FONT_SATCOM)); + m_fonts[FONT_STUDIO] = MakeUnique(GetFontConfigFile().GetFont(FONT_STUDIO)); + m_fonts[FONT_STUDIO_BOLD] = MakeUnique(GetFontConfigFile().GetFont(FONT_STUDIO_BOLD)); + for (auto it = m_fonts.begin(); it != m_fonts.end(); ++it) { FontType type = (*it).first; From 1e614d64d0df42dc1d36142d33fce3efc798f58f Mon Sep 17 00:00:00 2001 From: tomangelo2 Date: Sun, 15 Oct 2017 23:35:09 +0200 Subject: [PATCH 006/207] Removed unnecessary variable --- src/common/font_config.cpp | 16 +++------------- src/common/font_config.h | 1 - 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/src/common/font_config.cpp b/src/common/font_config.cpp index 11d55833..16017d8e 100644 --- a/src/common/font_config.cpp +++ b/src/common/font_config.cpp @@ -39,7 +39,6 @@ namespace bp = boost::property_tree; CFontConfigFile::CFontConfigFile() : m_needsSave(false) - , m_useCurrentDirectory(false) , m_loaded(false) { } @@ -54,18 +53,9 @@ bool CFontConfigFile::Init() { std::unique_ptr stream; bool good; - if (m_useCurrentDirectory) - { - auto inputStream = MakeUnique("/fonts/fonts.ini"); - good = inputStream->good(); - stream = std::move(inputStream); - } - else - { - auto inputStream = MakeUnique("/fonts/fonts.ini"); - good = inputStream->is_open(); - stream = std::move(inputStream); - } + auto inputStream = MakeUnique("/fonts/fonts.ini"); + good = inputStream->is_open(); + stream = std::move(inputStream); if (good) { diff --git a/src/common/font_config.h b/src/common/font_config.h index cbe2d3d9..892f9db3 100644 --- a/src/common/font_config.h +++ b/src/common/font_config.h @@ -58,7 +58,6 @@ public: private: boost::property_tree::ptree m_propertyTree; bool m_needsSave; - bool m_useCurrentDirectory; bool m_loaded; }; From 94cacdae96ca17741ea5f60dac34a79ecb74c36b Mon Sep 17 00:00:00 2001 From: tomangelo2 Date: Sun, 15 Oct 2017 23:46:15 +0200 Subject: [PATCH 007/207] Removed singletone from FontConfig Also renamed class so it now matches better with class file name --- src/app/app.h | 1 - src/common/font_config.cpp | 8 ++++---- src/common/font_config.h | 14 ++++---------- src/graphics/engine/text.cpp | 16 ++++++++-------- 4 files changed, 16 insertions(+), 23 deletions(-) diff --git a/src/app/app.h b/src/app/app.h index 3835b418..20721e24 100644 --- a/src/app/app.h +++ b/src/app/app.h @@ -44,7 +44,6 @@ class CSoundInterface; class CInput; class CPathManager; class CConfigFile; -class CFontConfigFile; class CSystemUtils; struct SystemTimeStamp; diff --git a/src/common/font_config.cpp b/src/common/font_config.cpp index 16017d8e..b4487f1a 100644 --- a/src/common/font_config.cpp +++ b/src/common/font_config.cpp @@ -37,17 +37,17 @@ namespace bp = boost::property_tree; -CFontConfigFile::CFontConfigFile() +CFontConfig::CFontConfig() : m_needsSave(false) , m_loaded(false) { } -CFontConfigFile::~CFontConfigFile() +CFontConfig::~CFontConfig() { } -bool CFontConfigFile::Init() +bool CFontConfig::Init() { try { @@ -76,7 +76,7 @@ bool CFontConfigFile::Init() return true; } -std::string CFontConfigFile::GetFont(Gfx::FontType type) +std::string CFontConfig::GetFont(Gfx::FontType type) { switch(type) { diff --git a/src/common/font_config.h b/src/common/font_config.h index 892f9db3..594b4ce8 100644 --- a/src/common/font_config.h +++ b/src/common/font_config.h @@ -33,17 +33,17 @@ #include /** -* \class CFontConfigFile +* \class CFontConfig * * \brief Class for loading config file * */ -class CFontConfigFile : public CSingleton +class CFontConfig { public: - CFontConfigFile(); - virtual ~CFontConfigFile(); + CFontConfig(); + virtual ~CFontConfig(); /** Loads fonts.ini * \return return true on success @@ -60,9 +60,3 @@ private: bool m_needsSave; bool m_loaded; }; - -//! Global function to get config file instance -inline CFontConfigFile & GetFontConfigFile() -{ - return CFontConfigFile::GetInstance(); -} \ No newline at end of file diff --git a/src/graphics/engine/text.cpp b/src/graphics/engine/text.cpp index 016b1d22..8a023d67 100644 --- a/src/graphics/engine/text.cpp +++ b/src/graphics/engine/text.cpp @@ -117,8 +117,8 @@ CText::~CText() bool CText::Create() { - CFontConfigFile fontconfig; - if (!GetFontConfigFile().Init()) + CFontConfig fontConfig; + if (!fontConfig.Init()) { GetLogger()->Warn("Error on parsing fonts config file: failed to open file\n"); } @@ -128,14 +128,14 @@ bool CText::Create() return false; } - m_fonts[FONT_COMMON] = MakeUnique(GetFontConfigFile().GetFont(FONT_COMMON)); - m_fonts[FONT_COMMON_BOLD] = MakeUnique(GetFontConfigFile().GetFont(FONT_COMMON_BOLD)); - m_fonts[FONT_COMMON_ITALIC] = MakeUnique(GetFontConfigFile().GetFont(FONT_COMMON_ITALIC)); + m_fonts[FONT_COMMON] = MakeUnique(fontConfig.GetFont(FONT_COMMON)); + m_fonts[FONT_COMMON_BOLD] = MakeUnique(fontConfig.GetFont(FONT_COMMON_BOLD)); + m_fonts[FONT_COMMON_ITALIC] = MakeUnique(fontConfig.GetFont(FONT_COMMON_ITALIC)); - m_fonts[FONT_SATCOM] = MakeUnique(GetFontConfigFile().GetFont(FONT_SATCOM)); + m_fonts[FONT_SATCOM] = MakeUnique(fontConfig.GetFont(FONT_SATCOM)); - m_fonts[FONT_STUDIO] = MakeUnique(GetFontConfigFile().GetFont(FONT_STUDIO)); - m_fonts[FONT_STUDIO_BOLD] = MakeUnique(GetFontConfigFile().GetFont(FONT_STUDIO_BOLD)); + m_fonts[FONT_STUDIO] = MakeUnique(fontConfig.GetFont(FONT_STUDIO)); + m_fonts[FONT_STUDIO_BOLD] = MakeUnique(fontConfig.GetFont(FONT_STUDIO_BOLD)); for (auto it = m_fonts.begin(); it != m_fonts.end(); ++it) { From 76a8335501d92464b5a768537a52f79f27db6ff8 Mon Sep 17 00:00:00 2001 From: tomangelo2 Date: Wed, 18 Oct 2017 12:01:34 +0200 Subject: [PATCH 008/207] Reworked GetFont method --- src/common/font_config.cpp | 107 ++++++++----------------------------- src/common/font_config.h | 1 + 2 files changed, 24 insertions(+), 84 deletions(-) diff --git a/src/common/font_config.cpp b/src/common/font_config.cpp index b4487f1a..4768cbc6 100644 --- a/src/common/font_config.cpp +++ b/src/common/font_config.cpp @@ -29,6 +29,7 @@ #include "graphics/engine/text.h" +#include #include #include #include @@ -41,6 +42,20 @@ CFontConfig::CFontConfig() : m_needsSave(false) , m_loaded(false) { + //default fonts + m_defaultFont[Gfx::FONT_COMMON] = "/fonts/dvu_sans.ttf"; + m_defaultFont[Gfx::FONT_COMMON_BOLD] = "/fonts/dvu_sans_bold.ttf"; + m_defaultFont[Gfx::FONT_COMMON_ITALIC] = "/fonts/dvu_sans_italic.ttf"; + m_defaultFont[Gfx::FONT_STUDIO] = "/fonts/dvu_sans_mono.ttf"; + m_defaultFont[Gfx::FONT_STUDIO_BOLD] = "/fonts/dvu_sans_mono_bold.ttf"; + m_defaultFont[Gfx::FONT_SATCOM] = "/fonts/dvu_sans.ttf"; + + m_font[Gfx::FONT_COMMON] = "FontCommon"; + m_font[Gfx::FONT_COMMON_BOLD] = "FontCommonBold"; + m_font[Gfx::FONT_COMMON_ITALIC] = "FontCommonItalic"; + m_font[Gfx::FONT_STUDIO] = "FontStudio"; + m_font[Gfx::FONT_STUDIO_BOLD] = "FontStudioBold"; + m_font[Gfx::FONT_SATCOM] = "FontSatCom"; } CFontConfig::~CFontConfig() @@ -78,90 +93,14 @@ bool CFontConfig::Init() std::string CFontConfig::GetFont(Gfx::FontType type) { - switch(type) + try { - case Gfx::FONT_COMMON: - { - try - { - std::string path = std::string("/fonts/") + m_propertyTree.get("FontCommon"); - return path; - } - catch (std::exception & e) - { - GetLogger()->Log(m_loaded ? LOG_INFO : LOG_TRACE, "Error on parsing config file: %s. Default font will be used instead.\n", e.what()); - return "/fonts/dvu_sans.ttf"; - } - } - case Gfx::FONT_COMMON_BOLD: - { - try - { - std::string path = std::string("/fonts/") + m_propertyTree.get("FontCommonBold"); - return path; - } - catch (std::exception & e) - { - GetLogger()->Log(m_loaded ? LOG_INFO : LOG_TRACE, "Error on parsing config file: %s. Default font will be used instead.\n", e.what()); - return "/fonts/dvu_sans_bold.ttf"; - } - } - case Gfx::FONT_COMMON_ITALIC: - { - try - { - std::string path = std::string("/fonts/") + m_propertyTree.get("FontCommonItalic"); - return path; - } - catch (std::exception & e) - { - GetLogger()->Log(m_loaded ? LOG_INFO : LOG_TRACE, "Error on parsing config file: %s. Default font will be used instead.\n", e.what()); - return "/fonts/dvu_sans_italic.ttf"; - } - } - case Gfx::FONT_STUDIO: - { - try - { - std::string path = std::string("/fonts/") + m_propertyTree.get("FontStudio"); - return path; - } - catch (std::exception & e) - { - GetLogger()->Log(m_loaded ? LOG_INFO : LOG_TRACE, "Error on parsing config file: %s. Default font will be used instead.\n", e.what()); - return "/fonts/dvu_sans_mono.ttf"; - } - } - case Gfx::FONT_STUDIO_BOLD: - { - try - { - std::string path = std::string("/fonts/") + m_propertyTree.get("FontStudioBold"); - return path; - } - catch (std::exception & e) - { - GetLogger()->Log(m_loaded ? LOG_INFO : LOG_TRACE, "Error on parsing config file: %s. Default font will be used instead.\n", e.what()); - return "/fonts/dvu_sans_mono_bold.ttf"; - } - } - case Gfx::FONT_SATCOM: - { - try - { - std::string path = std::string("/fonts/") + m_propertyTree.get("FontSatCom"); - return path; - } - catch (std::exception & e) - { - GetLogger()->Log(m_loaded ? LOG_INFO : LOG_TRACE, "Error on parsing config file: %s. Default font will be used instead.\n", e.what()); - return "/fonts/dvu_sans.ttf"; - } - } - default: - { - GetLogger()->Debug("Incorrect font type: %i.\n", type); - return nullptr; - } + std::string path = std::string("/fonts/") + m_propertyTree.get(m_font[type]); + return path; } + catch (std::exception & e) + { + GetLogger()->Log(m_loaded ? LOG_INFO : LOG_TRACE, "Error on parsing config file: %s. Default font will be used instead.\n", e.what()); + return m_defaultFont[type]; + } } diff --git a/src/common/font_config.h b/src/common/font_config.h index 594b4ce8..c28ea445 100644 --- a/src/common/font_config.h +++ b/src/common/font_config.h @@ -59,4 +59,5 @@ private: boost::property_tree::ptree m_propertyTree; bool m_needsSave; bool m_loaded; + std::map m_font, m_defaultFont; }; From 1539e94b09fc608ea66b110dc5b4d3e9a9c802c7 Mon Sep 17 00:00:00 2001 From: tomangelo2 Date: Wed, 18 Oct 2017 20:40:07 +0200 Subject: [PATCH 009/207] Changed defaultFont to const map --- src/common/font_config.cpp | 24 ++++++------------------ src/common/font_config.h | 17 ++++++++++++++++- 2 files changed, 22 insertions(+), 19 deletions(-) diff --git a/src/common/font_config.cpp b/src/common/font_config.cpp index 4768cbc6..3d3ad6f0 100644 --- a/src/common/font_config.cpp +++ b/src/common/font_config.cpp @@ -42,14 +42,6 @@ CFontConfig::CFontConfig() : m_needsSave(false) , m_loaded(false) { - //default fonts - m_defaultFont[Gfx::FONT_COMMON] = "/fonts/dvu_sans.ttf"; - m_defaultFont[Gfx::FONT_COMMON_BOLD] = "/fonts/dvu_sans_bold.ttf"; - m_defaultFont[Gfx::FONT_COMMON_ITALIC] = "/fonts/dvu_sans_italic.ttf"; - m_defaultFont[Gfx::FONT_STUDIO] = "/fonts/dvu_sans_mono.ttf"; - m_defaultFont[Gfx::FONT_STUDIO_BOLD] = "/fonts/dvu_sans_mono_bold.ttf"; - m_defaultFont[Gfx::FONT_SATCOM] = "/fonts/dvu_sans.ttf"; - m_font[Gfx::FONT_COMMON] = "FontCommon"; m_font[Gfx::FONT_COMMON_BOLD] = "FontCommonBold"; m_font[Gfx::FONT_COMMON_ITALIC] = "FontCommonItalic"; @@ -93,14 +85,10 @@ bool CFontConfig::Init() std::string CFontConfig::GetFont(Gfx::FontType type) { - try - { - std::string path = std::string("/fonts/") + m_propertyTree.get(m_font[type]); - return path; - } - catch (std::exception & e) - { - GetLogger()->Log(m_loaded ? LOG_INFO : LOG_TRACE, "Error on parsing config file: %s. Default font will be used instead.\n", e.what()); - return m_defaultFont[type]; - } + return std::string("/fonts/") + m_propertyTree.get(m_font[type], GetDefaultFont(type)); } + +std::string CFontConfig::GetDefaultFont(Gfx::FontType type) const +{ + return defaultFont.at(type); +} \ No newline at end of file diff --git a/src/common/font_config.h b/src/common/font_config.h index c28ea445..5ce91aaf 100644 --- a/src/common/font_config.h +++ b/src/common/font_config.h @@ -39,6 +39,16 @@ * */ +const std::map defaultFont = +{ + { Gfx::FONT_COMMON, "dvu_sans.ttf" }, + { Gfx::FONT_COMMON_BOLD, "dvu_sans_bold.ttf" }, + { Gfx::FONT_COMMON_ITALIC, "dvu_sans_italic.ttf" }, + { Gfx::FONT_STUDIO, "dvu_sans_mono.ttf" }, + { Gfx::FONT_STUDIO_BOLD, "dvu_sans_mono_bold.ttf" }, + { Gfx::FONT_SATCOM, "dvu_sans.ttf" }, +}; + class CFontConfig { public: @@ -55,9 +65,14 @@ public: */ std::string GetFont(Gfx::FontType type); + /** Const type method to read filenames of fonts from defaultFont map + * used as a fallback if it wasn't possible to read font from fonts.ini + * \return return filename of default path + */ + std::string GetDefaultFont(Gfx::FontType type) const; private: boost::property_tree::ptree m_propertyTree; bool m_needsSave; bool m_loaded; - std::map m_font, m_defaultFont; + std::map m_font; }; From 3801ab87a2de0a494da77865f0713c37fc5463c1 Mon Sep 17 00:00:00 2001 From: tomangelo2 Date: Mon, 23 Oct 2017 19:08:28 +0200 Subject: [PATCH 010/207] Changed m_font map to const fontType map --- src/common/font_config.cpp | 13 ++++++------- src/common/font_config.h | 18 +++++++++++++++++- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/src/common/font_config.cpp b/src/common/font_config.cpp index 3d3ad6f0..8dd59eaa 100644 --- a/src/common/font_config.cpp +++ b/src/common/font_config.cpp @@ -42,12 +42,6 @@ CFontConfig::CFontConfig() : m_needsSave(false) , m_loaded(false) { - m_font[Gfx::FONT_COMMON] = "FontCommon"; - m_font[Gfx::FONT_COMMON_BOLD] = "FontCommonBold"; - m_font[Gfx::FONT_COMMON_ITALIC] = "FontCommonItalic"; - m_font[Gfx::FONT_STUDIO] = "FontStudio"; - m_font[Gfx::FONT_STUDIO_BOLD] = "FontStudioBold"; - m_font[Gfx::FONT_SATCOM] = "FontSatCom"; } CFontConfig::~CFontConfig() @@ -85,10 +79,15 @@ bool CFontConfig::Init() std::string CFontConfig::GetFont(Gfx::FontType type) { - return std::string("/fonts/") + m_propertyTree.get(m_font[type], GetDefaultFont(type)); + return std::string("/fonts/") + m_propertyTree.get(GetFontType(type), GetDefaultFont(type)); } std::string CFontConfig::GetDefaultFont(Gfx::FontType type) const { return defaultFont.at(type); +} + +std::string CFontConfig::GetFontType(Gfx::FontType type) const +{ + return fontType.at(type); } \ No newline at end of file diff --git a/src/common/font_config.h b/src/common/font_config.h index 5ce91aaf..a91e5fa0 100644 --- a/src/common/font_config.h +++ b/src/common/font_config.h @@ -49,6 +49,16 @@ const std::map defaultFont = { Gfx::FONT_SATCOM, "dvu_sans.ttf" }, }; +const std::map fontType = +{ + { Gfx::FONT_COMMON, "FontCommon" }, + { Gfx::FONT_COMMON_BOLD, "FontCommonBold" }, + { Gfx::FONT_COMMON_ITALIC, "FontCommonItalic" }, + { Gfx::FONT_STUDIO, "FontStudio" }, + { Gfx::FONT_STUDIO_BOLD, "FontStudioBold" }, + { Gfx::FONT_SATCOM, "FontSatCom" }, +}; + class CFontConfig { public: @@ -70,9 +80,15 @@ public: * \return return filename of default path */ std::string GetDefaultFont(Gfx::FontType type) const; + + /** Const type method converting Gfx::FontType to string + * \return return id of font used in fonts.ini file + */ + + std::string GetFontType(Gfx::FontType type) const; + private: boost::property_tree::ptree m_propertyTree; bool m_needsSave; bool m_loaded; - std::map m_font; }; From ff97df74c6580e0a37bc8cad9be6b4c749eae7dd Mon Sep 17 00:00:00 2001 From: tomangelo2 Date: Sat, 28 Oct 2017 22:22:22 +0200 Subject: [PATCH 011/207] Added support for italic and bold variants of studio and satcom fonts They aren't currently used anywhere --- src/common/font_config.h | 6 ++++++ src/graphics/engine/text.cpp | 14 ++++++-------- src/graphics/engine/text.h | 13 +++++++++---- 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/src/common/font_config.h b/src/common/font_config.h index a91e5fa0..1c786f93 100644 --- a/src/common/font_config.h +++ b/src/common/font_config.h @@ -46,7 +46,10 @@ const std::map defaultFont = { Gfx::FONT_COMMON_ITALIC, "dvu_sans_italic.ttf" }, { Gfx::FONT_STUDIO, "dvu_sans_mono.ttf" }, { Gfx::FONT_STUDIO_BOLD, "dvu_sans_mono_bold.ttf" }, + { Gfx::FONT_STUDIO_ITALIC, "dvu_sans_mono_italic.ttf" }, { Gfx::FONT_SATCOM, "dvu_sans.ttf" }, + { Gfx::FONT_SATCOM_BOLD, "dvu_sans_bold.ttf" }, + { Gfx::FONT_SATCOM_ITALIC, "dvu_sans_italic.ttf" }, }; const std::map fontType = @@ -56,7 +59,10 @@ const std::map fontType = { Gfx::FONT_COMMON_ITALIC, "FontCommonItalic" }, { Gfx::FONT_STUDIO, "FontStudio" }, { Gfx::FONT_STUDIO_BOLD, "FontStudioBold" }, + { Gfx::FONT_STUDIO_ITALIC, "FontStudioItalic" }, { Gfx::FONT_SATCOM, "FontSatCom" }, + { Gfx::FONT_SATCOM_BOLD, "FontSatComBold" }, + { Gfx::FONT_SATCOM_ITALIC, "FontSatComItalic" }, }; class CFontConfig diff --git a/src/graphics/engine/text.cpp b/src/graphics/engine/text.cpp index 8a023d67..5638c61b 100644 --- a/src/graphics/engine/text.cpp +++ b/src/graphics/engine/text.cpp @@ -128,14 +128,12 @@ bool CText::Create() return false; } - m_fonts[FONT_COMMON] = MakeUnique(fontConfig.GetFont(FONT_COMMON)); - m_fonts[FONT_COMMON_BOLD] = MakeUnique(fontConfig.GetFont(FONT_COMMON_BOLD)); - m_fonts[FONT_COMMON_ITALIC] = MakeUnique(fontConfig.GetFont(FONT_COMMON_ITALIC)); - - m_fonts[FONT_SATCOM] = MakeUnique(fontConfig.GetFont(FONT_SATCOM)); - - m_fonts[FONT_STUDIO] = MakeUnique(fontConfig.GetFont(FONT_STUDIO)); - m_fonts[FONT_STUDIO_BOLD] = MakeUnique(fontConfig.GetFont(FONT_STUDIO_BOLD)); + for (auto type : {FONT_COMMON, FONT_STUDIO, FONT_SATCOM}) + { + m_fonts[static_cast(type)] = MakeUnique(fontConfig.GetFont(type)); + m_fonts[static_cast(type|FONT_BOLD)] = MakeUnique(fontConfig.GetFont(static_cast(type|FONT_BOLD))); + m_fonts[static_cast(type|FONT_ITALIC)] = MakeUnique(fontConfig.GetFont(static_cast(type|FONT_ITALIC))); + } for (auto it = m_fonts.begin(); it != m_fonts.end(); ++it) { diff --git a/src/graphics/engine/text.h b/src/graphics/engine/text.h index 32d50d1f..0c5da66c 100644 --- a/src/graphics/engine/text.h +++ b/src/graphics/engine/text.h @@ -83,14 +83,19 @@ enum FontType //! Alias for italic colobot font FONT_COMMON_ITALIC = FONT_COMMON | FONT_ITALIC, - //! Courier (monospace) font used mainly in code editor (only regular & bold) + //! Studio font used mainly in code editor FONT_STUDIO = 0x01, - //! Alias for bold courier font + //! Alias for bold studio font FONT_STUDIO_BOLD = FONT_STUDIO | FONT_BOLD, + //! Alias for italic studio font (at this point not used anywhere) + FONT_STUDIO_ITALIC = FONT_STUDIO | FONT_ITALIC, - //! SatCom font used for interface - + //! SatCom font used for interface (currently bold and italic wariants aren't used anywhere) FONT_SATCOM = 0x02, + //! Alias for bold satcom font + FONT_SATCOM_BOLD = FONT_SATCOM | FONT_BOLD, + //! Alias for italic satcom font + FONT_SATCOM_ITALIC = FONT_SATCOM | FONT_ITALIC, //! Pseudo-font loaded from textures for buttons, icons, etc. FONT_BUTTON = 0x03, From 0179e4c78665a459f56763f2c177fdb63dc82d90 Mon Sep 17 00:00:00 2001 From: tomangelo2 Date: Sat, 28 Oct 2017 22:24:11 +0200 Subject: [PATCH 012/207] Cleaned unused values from CFontConfig --- src/common/font_config.cpp | 3 --- src/common/font_config.h | 2 -- 2 files changed, 5 deletions(-) diff --git a/src/common/font_config.cpp b/src/common/font_config.cpp index 8dd59eaa..bad11446 100644 --- a/src/common/font_config.cpp +++ b/src/common/font_config.cpp @@ -39,8 +39,6 @@ namespace bp = boost::property_tree; CFontConfig::CFontConfig() - : m_needsSave(false) - , m_loaded(false) { } @@ -62,7 +60,6 @@ bool CFontConfig::Init() { bp::ini_parser::read_ini(*stream, m_propertyTree); GetLogger()->Debug("Fonts config file loaded correctly. \n"); - m_loaded = true; } else { diff --git a/src/common/font_config.h b/src/common/font_config.h index 1c786f93..368707fe 100644 --- a/src/common/font_config.h +++ b/src/common/font_config.h @@ -95,6 +95,4 @@ public: private: boost::property_tree::ptree m_propertyTree; - bool m_needsSave; - bool m_loaded; }; From f01e2b7e0149f49b09a13d7639f733b0919a131b Mon Sep 17 00:00:00 2001 From: tomangelo2 Date: Tue, 7 Nov 2017 19:29:51 +0100 Subject: [PATCH 013/207] Moved fonts maps from header file to source file --- src/common/font_config.cpp | 26 ++++++++++++++++++++++++++ src/common/font_config.h | 24 ------------------------ 2 files changed, 26 insertions(+), 24 deletions(-) diff --git a/src/common/font_config.cpp b/src/common/font_config.cpp index bad11446..e021ec0b 100644 --- a/src/common/font_config.cpp +++ b/src/common/font_config.cpp @@ -38,6 +38,32 @@ namespace bp = boost::property_tree; +const std::map defaultFont = +{ + { Gfx::FONT_COMMON, "dvu_sans.ttf" }, + { Gfx::FONT_COMMON_BOLD, "dvu_sans_bold.ttf" }, + { Gfx::FONT_COMMON_ITALIC, "dvu_sans_italic.ttf" }, + { Gfx::FONT_STUDIO, "dvu_sans_mono.ttf" }, + { Gfx::FONT_STUDIO_BOLD, "dvu_sans_mono_bold.ttf" }, + { Gfx::FONT_STUDIO_ITALIC, "dvu_sans_mono_italic.ttf" }, + { Gfx::FONT_SATCOM, "dvu_sans.ttf" }, + { Gfx::FONT_SATCOM_BOLD, "dvu_sans_bold.ttf" }, + { Gfx::FONT_SATCOM_ITALIC, "dvu_sans_italic.ttf" }, +}; + +const std::map fontType = +{ + { Gfx::FONT_COMMON, "FontCommon" }, + { Gfx::FONT_COMMON_BOLD, "FontCommonBold" }, + { Gfx::FONT_COMMON_ITALIC, "FontCommonItalic" }, + { Gfx::FONT_STUDIO, "FontStudio" }, + { Gfx::FONT_STUDIO_BOLD, "FontStudioBold" }, + { Gfx::FONT_STUDIO_ITALIC, "FontStudioItalic" }, + { Gfx::FONT_SATCOM, "FontSatCom" }, + { Gfx::FONT_SATCOM_BOLD, "FontSatComBold" }, + { Gfx::FONT_SATCOM_ITALIC, "FontSatComItalic" }, +}; + CFontConfig::CFontConfig() { } diff --git a/src/common/font_config.h b/src/common/font_config.h index 368707fe..96d9efe3 100644 --- a/src/common/font_config.h +++ b/src/common/font_config.h @@ -39,31 +39,7 @@ * */ -const std::map defaultFont = -{ - { Gfx::FONT_COMMON, "dvu_sans.ttf" }, - { Gfx::FONT_COMMON_BOLD, "dvu_sans_bold.ttf" }, - { Gfx::FONT_COMMON_ITALIC, "dvu_sans_italic.ttf" }, - { Gfx::FONT_STUDIO, "dvu_sans_mono.ttf" }, - { Gfx::FONT_STUDIO_BOLD, "dvu_sans_mono_bold.ttf" }, - { Gfx::FONT_STUDIO_ITALIC, "dvu_sans_mono_italic.ttf" }, - { Gfx::FONT_SATCOM, "dvu_sans.ttf" }, - { Gfx::FONT_SATCOM_BOLD, "dvu_sans_bold.ttf" }, - { Gfx::FONT_SATCOM_ITALIC, "dvu_sans_italic.ttf" }, -}; -const std::map fontType = -{ - { Gfx::FONT_COMMON, "FontCommon" }, - { Gfx::FONT_COMMON_BOLD, "FontCommonBold" }, - { Gfx::FONT_COMMON_ITALIC, "FontCommonItalic" }, - { Gfx::FONT_STUDIO, "FontStudio" }, - { Gfx::FONT_STUDIO_BOLD, "FontStudioBold" }, - { Gfx::FONT_STUDIO_ITALIC, "FontStudioItalic" }, - { Gfx::FONT_SATCOM, "FontSatCom" }, - { Gfx::FONT_SATCOM_BOLD, "FontSatComBold" }, - { Gfx::FONT_SATCOM_ITALIC, "FontSatComItalic" }, -}; class CFontConfig { From a024866fd3c21929d5b488fe098a8a7cde255f78 Mon Sep 17 00:00:00 2001 From: Fiftytwo Date: Thu, 16 Nov 2017 18:43:45 +0100 Subject: [PATCH 014/207] Builder bots base implementation --- src/CPackConfig.cmake | 93 +++++++++++++++++++++++++ src/CPackSourceConfig.cmake | 100 +++++++++++++++++++++++++++ src/common/restext.cpp | 4 ++ src/desktop/colobot.rc | 25 +++++++ src/graphics/engine/pyro.cpp | 23 ++++++ src/graphics/engine/water.cpp | 4 ++ src/level/parser/parserparam.cpp | 8 +++ src/level/robotmain.cpp | 8 +++ src/object/auto/autofactory.cpp | 4 ++ src/object/auto/automush.cpp | 4 ++ src/object/auto/autonuclearplant.cpp | 4 ++ src/object/auto/autopowerplant.cpp | 4 ++ src/object/auto/autopowerstation.cpp | 4 ++ src/object/drive_type.cpp | 4 ++ src/object/motion/motiontoto.cpp | 4 ++ src/object/motion/motionvehicle.cpp | 34 +++++++++ src/object/object_factory.cpp | 4 ++ src/object/object_type.h | 4 ++ src/object/old_object.cpp | 25 +++++++ src/object/task/taskbuild.cpp | 8 +-- src/object/task/taskgoto.cpp | 16 +++++ src/object/task/tasktake.cpp | 4 ++ src/object/tool_type.cpp | 6 ++ src/object/tool_type.h | 1 + src/physics/physics.cpp | 21 ++++++ src/script/cbottoken.cpp | 4 ++ src/script/scriptfunc.cpp | 8 +-- src/src/common/config.h | 22 ++++++ src/src/common/version.h | 7 ++ src/ui/controls/map.cpp | 8 +++ src/ui/mainshort.cpp | 4 ++ src/ui/object_interface.cpp | 8 +++ 32 files changed, 469 insertions(+), 8 deletions(-) create mode 100644 src/CPackConfig.cmake create mode 100644 src/CPackSourceConfig.cmake create mode 100644 src/desktop/colobot.rc create mode 100644 src/src/common/config.h create mode 100644 src/src/common/version.h diff --git a/src/CPackConfig.cmake b/src/CPackConfig.cmake new file mode 100644 index 00000000..fbcd118a --- /dev/null +++ b/src/CPackConfig.cmake @@ -0,0 +1,93 @@ +# This file will be configured to contain variables for CPack. These variables +# should be set in the CMake list file of the project before CPack module is +# included. The list of available CPACK_xxx variables and their associated +# documentation may be obtained using +# cpack --help-variable-list +# +# Some variables are common to all generators (e.g. CPACK_PACKAGE_NAME) +# and some are specific to a generator +# (e.g. CPACK_NSIS_EXTRA_INSTALL_COMMANDS). The generator specific variables +# usually begin with CPACK__xxxx. + + +SET(CPACK_BINARY_7Z "OFF") +SET(CPACK_BINARY_BUNDLE "") +SET(CPACK_BINARY_CYGWIN "") +SET(CPACK_BINARY_DEB "") +SET(CPACK_BINARY_DRAGNDROP "") +SET(CPACK_BINARY_IFW "OFF") +SET(CPACK_BINARY_NSIS "ON") +SET(CPACK_BINARY_OSXX11 "") +SET(CPACK_BINARY_PACKAGEMAKER "") +SET(CPACK_BINARY_PRODUCTBUILD "") +SET(CPACK_BINARY_RPM "") +SET(CPACK_BINARY_STGZ "") +SET(CPACK_BINARY_TBZ2 "") +SET(CPACK_BINARY_TGZ "") +SET(CPACK_BINARY_TXZ "") +SET(CPACK_BINARY_TZ "") +SET(CPACK_BINARY_WIX "OFF") +SET(CPACK_BINARY_ZIP "OFF") +SET(CPACK_BUILD_SOURCE_DIRS "C:/Users/Fiftytwo/Repos/colobot;C:/Users/Fiftytwo/Repos/colobot/src") +SET(CPACK_BUNDLE_NAME "Colobot: Gold Edition") +SET(CPACK_CMAKE_GENERATOR "MSYS Makefiles") +SET(CPACK_COMPONENT_UNSPECIFIED_HIDDEN "TRUE") +SET(CPACK_COMPONENT_UNSPECIFIED_REQUIRED "TRUE") +SET(CPACK_GENERATOR "NSIS") +SET(CPACK_INSTALL_CMAKE_PROJECTS "C:/Users/Fiftytwo/Repos/colobot/src;colobot;ALL;/") +SET(CPACK_INSTALL_PREFIX "C:/Program Files (x86)/colobot") +SET(CPACK_MODULE_PATH "C:/Users/Fiftytwo/Repos/colobot/cmake") +SET(CPACK_NSIS_DEFINES "SetOverwrite on +BrandingText \"Colobot: Gold Edition (0.1.11+alpha-git-dev~radda8281)\"") +SET(CPACK_NSIS_DISPLAY_NAME "Colobot") +SET(CPACK_NSIS_EXECUTABLES_DIRECTORY ".") +SET(CPACK_NSIS_INSTALLER_ICON_CODE "!define MUI_HEADERIMAGE_BITMAP \"C:/Users/Fiftytwo/Repos/colobot/desktop/colobot_nsis.bmp\" + !define MUI_WELCOMEFINISHPAGE_BITMAP \"C:/Users/Fiftytwo/Repos/colobot/desktop/colobot_nsis_left.bmp\"") +SET(CPACK_NSIS_INSTALLER_MUI_ICON_CODE "") +SET(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64") +SET(CPACK_NSIS_MUI_FINISHPAGE_RUN "colobot.exe") +SET(CPACK_NSIS_MUI_ICON "C:/Users/Fiftytwo/Repos/colobot/desktop/colobot.ico") +SET(CPACK_NSIS_MUI_UNIICON "C:/Users/Fiftytwo/Repos/colobot/desktop/colobot.ico") +SET(CPACK_NSIS_PACKAGE_NAME "Colobot") +SET(CPACK_OUTPUT_CONFIG_FILE "C:/Users/Fiftytwo/Repos/colobot/src/CPackConfig.cmake") +SET(CPACK_PACKAGE_DEFAULT_LOCATION "/") +SET(CPACK_PACKAGE_DESCRIPTION_FILE "C:/Users/Fiftytwo/Repos/colobot/desktop/../README.md") +SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Colobot: Gold Edition") +SET(CPACK_PACKAGE_EXECUTABLES "colobot;Colobot: Gold Edition") +SET(CPACK_PACKAGE_FILE_NAME "colobot-0.1.11+alpha-git-dev~radda8281") +SET(CPACK_PACKAGE_ICON "") +SET(CPACK_PACKAGE_INSTALL_DIRECTORY "Colobot") +SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "Colobot") +SET(CPACK_PACKAGE_NAME "colobot") +SET(CPACK_PACKAGE_RELOCATABLE "true") +SET(CPACK_PACKAGE_VENDOR "TerranovaTeam") +SET(CPACK_PACKAGE_VERSION "0.1.11") +SET(CPACK_PACKAGE_VERSION_MAJOR "0") +SET(CPACK_PACKAGE_VERSION_MINOR "1") +SET(CPACK_PACKAGE_VERSION_PATCH "11") +SET(CPACK_RESOURCE_FILE_LICENSE "C:/Users/Fiftytwo/Repos/colobot/desktop/../LICENSE.txt") +SET(CPACK_RESOURCE_FILE_README "C:/msys64/mingw64/share/cmake-3.9/Templates/CPack.GenericDescription.txt") +SET(CPACK_RESOURCE_FILE_WELCOME "C:/msys64/mingw64/share/cmake-3.9/Templates/CPack.GenericWelcome.txt") +SET(CPACK_SET_DESTDIR "OFF") +SET(CPACK_SOURCE_7Z "ON") +SET(CPACK_SOURCE_CYGWIN "") +SET(CPACK_SOURCE_GENERATOR "7Z;ZIP") +SET(CPACK_SOURCE_OUTPUT_CONFIG_FILE "C:/Users/Fiftytwo/Repos/colobot/src/CPackSourceConfig.cmake") +SET(CPACK_SOURCE_RPM "") +SET(CPACK_SOURCE_TBZ2 "") +SET(CPACK_SOURCE_TGZ "") +SET(CPACK_SOURCE_TXZ "") +SET(CPACK_SOURCE_TZ "") +SET(CPACK_SOURCE_ZIP "ON") +SET(CPACK_STRIP_FILES "TRUE") +SET(CPACK_SYSTEM_NAME "win64") +SET(CPACK_TOPLEVEL_TAG "win64") +SET(CPACK_WIX_SIZEOF_VOID_P "8") + +if(NOT CPACK_PROPERTIES_FILE) + set(CPACK_PROPERTIES_FILE "C:/Users/Fiftytwo/Repos/colobot/src/CPackProperties.cmake") +endif() + +if(EXISTS ${CPACK_PROPERTIES_FILE}) + include(${CPACK_PROPERTIES_FILE}) +endif() diff --git a/src/CPackSourceConfig.cmake b/src/CPackSourceConfig.cmake new file mode 100644 index 00000000..d6dddd85 --- /dev/null +++ b/src/CPackSourceConfig.cmake @@ -0,0 +1,100 @@ +# This file will be configured to contain variables for CPack. These variables +# should be set in the CMake list file of the project before CPack module is +# included. The list of available CPACK_xxx variables and their associated +# documentation may be obtained using +# cpack --help-variable-list +# +# Some variables are common to all generators (e.g. CPACK_PACKAGE_NAME) +# and some are specific to a generator +# (e.g. CPACK_NSIS_EXTRA_INSTALL_COMMANDS). The generator specific variables +# usually begin with CPACK__xxxx. + + +SET(CPACK_BINARY_7Z "OFF") +SET(CPACK_BINARY_BUNDLE "") +SET(CPACK_BINARY_CYGWIN "") +SET(CPACK_BINARY_DEB "") +SET(CPACK_BINARY_DRAGNDROP "") +SET(CPACK_BINARY_IFW "OFF") +SET(CPACK_BINARY_NSIS "ON") +SET(CPACK_BINARY_OSXX11 "") +SET(CPACK_BINARY_PACKAGEMAKER "") +SET(CPACK_BINARY_PRODUCTBUILD "") +SET(CPACK_BINARY_RPM "") +SET(CPACK_BINARY_STGZ "") +SET(CPACK_BINARY_TBZ2 "") +SET(CPACK_BINARY_TGZ "") +SET(CPACK_BINARY_TXZ "") +SET(CPACK_BINARY_TZ "") +SET(CPACK_BINARY_WIX "OFF") +SET(CPACK_BINARY_ZIP "OFF") +SET(CPACK_BUILD_SOURCE_DIRS "C:/Users/Fiftytwo/Repos/colobot;C:/Users/Fiftytwo/Repos/colobot/src") +SET(CPACK_BUNDLE_NAME "Colobot: Gold Edition") +SET(CPACK_CMAKE_GENERATOR "MSYS Makefiles") +SET(CPACK_COMPONENT_UNSPECIFIED_HIDDEN "TRUE") +SET(CPACK_COMPONENT_UNSPECIFIED_REQUIRED "TRUE") +SET(CPACK_GENERATOR "7Z;ZIP") +SET(CPACK_IGNORE_FILES "/CVS/;/\\.svn/;/\\.bzr/;/\\.hg/;/\\.git/;\\.swp\$;\\.#;/#") +SET(CPACK_INSTALLED_DIRECTORIES "C:/Users/Fiftytwo/Repos/colobot;/") +SET(CPACK_INSTALL_CMAKE_PROJECTS "") +SET(CPACK_INSTALL_PREFIX "C:/Program Files (x86)/colobot") +SET(CPACK_MODULE_PATH "C:/Users/Fiftytwo/Repos/colobot/cmake") +SET(CPACK_NSIS_DEFINES "SetOverwrite on +BrandingText \"Colobot: Gold Edition (0.1.11+alpha-git-dev~radda8281)\"") +SET(CPACK_NSIS_DISPLAY_NAME "Colobot") +SET(CPACK_NSIS_EXECUTABLES_DIRECTORY ".") +SET(CPACK_NSIS_INSTALLER_ICON_CODE "!define MUI_HEADERIMAGE_BITMAP \"C:/Users/Fiftytwo/Repos/colobot/desktop/colobot_nsis.bmp\" + !define MUI_WELCOMEFINISHPAGE_BITMAP \"C:/Users/Fiftytwo/Repos/colobot/desktop/colobot_nsis_left.bmp\"") +SET(CPACK_NSIS_INSTALLER_MUI_ICON_CODE "") +SET(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64") +SET(CPACK_NSIS_MUI_FINISHPAGE_RUN "colobot.exe") +SET(CPACK_NSIS_MUI_ICON "C:/Users/Fiftytwo/Repos/colobot/desktop/colobot.ico") +SET(CPACK_NSIS_MUI_UNIICON "C:/Users/Fiftytwo/Repos/colobot/desktop/colobot.ico") +SET(CPACK_NSIS_PACKAGE_NAME "Colobot") +SET(CPACK_OUTPUT_CONFIG_FILE "C:/Users/Fiftytwo/Repos/colobot/src/CPackConfig.cmake") +SET(CPACK_PACKAGE_DEFAULT_LOCATION "/") +SET(CPACK_PACKAGE_DESCRIPTION_FILE "C:/Users/Fiftytwo/Repos/colobot/desktop/../README.md") +SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Colobot: Gold Edition") +SET(CPACK_PACKAGE_EXECUTABLES "colobot;Colobot: Gold Edition") +SET(CPACK_PACKAGE_FILE_NAME "colobot-0.1.11-Source") +SET(CPACK_PACKAGE_ICON "") +SET(CPACK_PACKAGE_INSTALL_DIRECTORY "Colobot") +SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "Colobot") +SET(CPACK_PACKAGE_NAME "colobot") +SET(CPACK_PACKAGE_RELOCATABLE "true") +SET(CPACK_PACKAGE_VENDOR "TerranovaTeam") +SET(CPACK_PACKAGE_VERSION "0.1.11") +SET(CPACK_PACKAGE_VERSION_MAJOR "0") +SET(CPACK_PACKAGE_VERSION_MINOR "1") +SET(CPACK_PACKAGE_VERSION_PATCH "11") +SET(CPACK_RESOURCE_FILE_LICENSE "C:/Users/Fiftytwo/Repos/colobot/desktop/../LICENSE.txt") +SET(CPACK_RESOURCE_FILE_README "C:/msys64/mingw64/share/cmake-3.9/Templates/CPack.GenericDescription.txt") +SET(CPACK_RESOURCE_FILE_WELCOME "C:/msys64/mingw64/share/cmake-3.9/Templates/CPack.GenericWelcome.txt") +SET(CPACK_RPM_PACKAGE_SOURCES "ON") +SET(CPACK_SET_DESTDIR "OFF") +SET(CPACK_SOURCE_7Z "ON") +SET(CPACK_SOURCE_CYGWIN "") +SET(CPACK_SOURCE_GENERATOR "7Z;ZIP") +SET(CPACK_SOURCE_IGNORE_FILES "/CVS/;/\\.svn/;/\\.bzr/;/\\.hg/;/\\.git/;\\.swp\$;\\.#;/#") +SET(CPACK_SOURCE_INSTALLED_DIRECTORIES "C:/Users/Fiftytwo/Repos/colobot;/") +SET(CPACK_SOURCE_OUTPUT_CONFIG_FILE "C:/Users/Fiftytwo/Repos/colobot/src/CPackSourceConfig.cmake") +SET(CPACK_SOURCE_PACKAGE_FILE_NAME "colobot-0.1.11-Source") +SET(CPACK_SOURCE_RPM "") +SET(CPACK_SOURCE_TBZ2 "") +SET(CPACK_SOURCE_TGZ "") +SET(CPACK_SOURCE_TOPLEVEL_TAG "win64-Source") +SET(CPACK_SOURCE_TXZ "") +SET(CPACK_SOURCE_TZ "") +SET(CPACK_SOURCE_ZIP "ON") +SET(CPACK_STRIP_FILES "") +SET(CPACK_SYSTEM_NAME "win64") +SET(CPACK_TOPLEVEL_TAG "win64-Source") +SET(CPACK_WIX_SIZEOF_VOID_P "8") + +if(NOT CPACK_PROPERTIES_FILE) + set(CPACK_PROPERTIES_FILE "C:/Users/Fiftytwo/Repos/colobot/src/CPackProperties.cmake") +endif() + +if(EXISTS ${CPACK_PROPERTIES_FILE}) + include(${CPACK_PROPERTIES_FILE}) +endif() diff --git a/src/common/restext.cpp b/src/common/restext.cpp index ac526af8..760e74c8 100644 --- a/src/common/restext.cpp +++ b/src/common/restext.cpp @@ -517,6 +517,10 @@ void InitializeRestext() stringsObject[OBJECT_MOBILEta] = TR("Tracked grabber"); stringsObject[OBJECT_MOBILEwa] = TR("Wheeled grabber"); stringsObject[OBJECT_MOBILEia] = TR("Legged grabber"); + stringsObject[OBJECT_MOBILEfb] = TR("Winged builder"); + stringsObject[OBJECT_MOBILEtb] = TR("Tracked builder"); + stringsObject[OBJECT_MOBILEwb] = TR("Wheeled builder"); + stringsObject[OBJECT_MOBILEib] = TR("Legged builder"); stringsObject[OBJECT_MOBILEfc] = TR("Winged shooter"); stringsObject[OBJECT_MOBILEtc] = TR("Tracked shooter"); stringsObject[OBJECT_MOBILEwc] = TR("Wheeled shooter"); diff --git a/src/desktop/colobot.rc b/src/desktop/colobot.rc new file mode 100644 index 00000000..5187a5af --- /dev/null +++ b/src/desktop/colobot.rc @@ -0,0 +1,25 @@ +id ICON "C:/Users/Fiftytwo/Repos/colobot/desktop/colobot.ico" + +1 VERSIONINFO +FILEVERSION 0,1,11,0 +PRODUCTVERSION 0,1,11,0 +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "OriginalFilename", "colobot.exe\0" + VALUE "InternalName", "colobot\0" + VALUE "FileDescription", "Colobot: Gold Edition - Colonize with Bots\0" + VALUE "ProductName", "Colobot: Gold Edition\0" + VALUE "CompanyName", "TerranovaTeam\0" + VALUE "LegalCopyright", "Copyright (c) 2012-2014 TerranovaTeam\0" + VALUE "FileVersion", "0.1.11+alpha-git-dev~radda8281\0" + VALUE "ProductVersion", "0.1.11+alpha-git-dev~radda8281\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END diff --git a/src/graphics/engine/pyro.cpp b/src/graphics/engine/pyro.cpp index 5bc9f76d..5a0b9e2c 100644 --- a/src/graphics/engine/pyro.cpp +++ b/src/graphics/engine/pyro.cpp @@ -1260,6 +1260,10 @@ void CPyro::DisplayError(PyroType type, CObject* obj) oType == OBJECT_MOBILEta || oType == OBJECT_MOBILEfa || oType == OBJECT_MOBILEia || + oType == OBJECT_MOBILEwb || + oType == OBJECT_MOBILEtb || + oType == OBJECT_MOBILEfb || + oType == OBJECT_MOBILEib || oType == OBJECT_MOBILEwc || oType == OBJECT_MOBILEtc || oType == OBJECT_MOBILEfc || @@ -1717,6 +1721,7 @@ void CPyro::BurnStart() angle.z = (Math::Rand()-0.5f)*0.4f; } else if ( m_burnType == OBJECT_MOBILEwa || + m_burnType == OBJECT_MOBILEwb || m_burnType == OBJECT_MOBILEwc || m_burnType == OBJECT_MOBILEwi || m_burnType == OBJECT_MOBILEws || @@ -1920,6 +1925,20 @@ void CPyro::BurnStart() angle.z = -25.0f*Math::PI/180.0f; BurnAddPart(1, pos, angle); // down the insect-cannon } + + if ( m_burnType == OBJECT_MOBILEfb || + m_burnType == OBJECT_MOBILEtb || + m_burnType == OBJECT_MOBILEwb || + m_burnType == OBJECT_MOBILEib ) + { + pos.x = -1.5f; + pos.y = -5.0f; + pos.z = 0.0f; + angle.x = (Math::Rand()-0.5f)*0.2f; + angle.y = (Math::Rand()-0.5f)*0.2f; + angle.z = -25.0f*Math::PI/180.0f; + BurnAddPart(1, pos, angle); // down the neutron gun + } if ( m_burnType == OBJECT_MOBILErt || m_burnType == OBJECT_MOBILErc ) @@ -2007,6 +2026,7 @@ void CPyro::BurnStart() } if ( m_burnType == OBJECT_MOBILEwa || + m_burnType == OBJECT_MOBILEwb || m_burnType == OBJECT_MOBILEwc || m_burnType == OBJECT_MOBILEwi || m_burnType == OBJECT_MOBILEws || @@ -2029,6 +2049,7 @@ void CPyro::BurnStart() } if ( m_burnType == OBJECT_MOBILEta || + m_burnType == OBJECT_MOBILEtb || m_burnType == OBJECT_MOBILEtc || m_burnType == OBJECT_MOBILEti || m_burnType == OBJECT_MOBILEts || @@ -2057,6 +2078,7 @@ void CPyro::BurnStart() } if ( m_burnType == OBJECT_MOBILEfa || + m_burnType == OBJECT_MOBILEfb || m_burnType == OBJECT_MOBILEfc || m_burnType == OBJECT_MOBILEfi || m_burnType == OBJECT_MOBILEfs || @@ -2077,6 +2099,7 @@ void CPyro::BurnStart() } if ( m_burnType == OBJECT_MOBILEia || + m_burnType == OBJECT_MOBILEib || m_burnType == OBJECT_MOBILEic || m_burnType == OBJECT_MOBILEii || m_burnType == OBJECT_MOBILEis ) // legs? diff --git a/src/graphics/engine/water.cpp b/src/graphics/engine/water.cpp index 5adebb90..55f7465d 100644 --- a/src/graphics/engine/water.cpp +++ b/src/graphics/engine/water.cpp @@ -566,6 +566,10 @@ float CWater::GetLevel(CObject* object) type == OBJECT_MOBILEta || type == OBJECT_MOBILEwa || type == OBJECT_MOBILEia || + type == OBJECT_MOBILEfb || + type == OBJECT_MOBILEtb || + type == OBJECT_MOBILEwb || + type == OBJECT_MOBILEib || type == OBJECT_MOBILEfc || type == OBJECT_MOBILEtc || type == OBJECT_MOBILEwc || diff --git a/src/level/parser/parserparam.cpp b/src/level/parser/parserparam.cpp index 37773efa..8ddb22e9 100644 --- a/src/level/parser/parserparam.cpp +++ b/src/level/parser/parserparam.cpp @@ -355,6 +355,10 @@ ObjectType CLevelParserParam::ToObjectType(std::string value) if (value == "TrackedSniffer" ) return OBJECT_MOBILEts; if (value == "WheeledSniffer" ) return OBJECT_MOBILEws; if (value == "LeggedSniffer" ) return OBJECT_MOBILEis; + if (value == "WingedBuilder" ) return OBJECT_MOBILEfb; + if (value == "TrackedBuilder" ) return OBJECT_MOBILEtb; + if (value == "WheeledBuilder" ) return OBJECT_MOBILEwb; + if (value == "LeggedBuilder" ) return OBJECT_MOBILEib; if (value == "Thumper" ) return OBJECT_MOBILErt; if (value == "PhazerShooter" ) return OBJECT_MOBILErc; if (value == "Recycler" ) return OBJECT_MOBILErr; @@ -556,6 +560,10 @@ const std::string CLevelParserParam::FromObjectType(ObjectType value) if (value == OBJECT_MOBILEts ) return "TrackedSniffer"; if (value == OBJECT_MOBILEws ) return "WheeledSniffer"; if (value == OBJECT_MOBILEis ) return "LeggedSniffer"; + if (value == OBJECT_MOBILEfb ) return "WingedBuilder"; + if (value == OBJECT_MOBILEtb ) return "TrackedBuilder"; + if (value == OBJECT_MOBILEwb ) return "WheeledBuilder"; + if (value == OBJECT_MOBILEib ) return "LeggedBuilder"; if (value == OBJECT_MOBILErt ) return "Thumper"; if (value == OBJECT_MOBILErc ) return "PhazerShooter"; if (value == OBJECT_MOBILErr ) return "Recycler"; diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp index 3df62fe5..f2d849f6 100644 --- a/src/level/robotmain.cpp +++ b/src/level/robotmain.cpp @@ -1814,6 +1814,10 @@ void CRobotMain::SelectOneObject(CObject* obj, bool displayError) type == OBJECT_MOBILEta || type == OBJECT_MOBILEwa || type == OBJECT_MOBILEia || + type == OBJECT_MOBILEfb || + type == OBJECT_MOBILEtb || + type == OBJECT_MOBILEwb || + type == OBJECT_MOBILEib || type == OBJECT_MOBILEfc || type == OBJECT_MOBILEtc || type == OBJECT_MOBILEwc || @@ -2195,6 +2199,10 @@ void CRobotMain::ChangeCamera() oType != OBJECT_MOBILEta && oType != OBJECT_MOBILEwa && oType != OBJECT_MOBILEia && + oType != OBJECT_MOBILEfb && + oType != OBJECT_MOBILEtb && + oType != OBJECT_MOBILEwb && + oType != OBJECT_MOBILEib && oType != OBJECT_MOBILEfc && oType != OBJECT_MOBILEtc && oType != OBJECT_MOBILEwc && diff --git a/src/object/auto/autofactory.cpp b/src/object/auto/autofactory.cpp index 45fd357c..5e998352 100644 --- a/src/object/auto/autofactory.cpp +++ b/src/object/auto/autofactory.cpp @@ -587,6 +587,10 @@ bool CAutoFactory::NearestVehicle() type != OBJECT_MOBILEta && type != OBJECT_MOBILEwa && type != OBJECT_MOBILEia && + type != OBJECT_MOBILEfb && + type != OBJECT_MOBILEtb && + type != OBJECT_MOBILEwb && + type != OBJECT_MOBILEib && type != OBJECT_MOBILEfc && type != OBJECT_MOBILEtc && type != OBJECT_MOBILEwc && diff --git a/src/object/auto/automush.cpp b/src/object/auto/automush.cpp index 679e0f73..a267322b 100644 --- a/src/object/auto/automush.cpp +++ b/src/object/auto/automush.cpp @@ -236,6 +236,10 @@ bool CAutoMush::SearchTarget() type != OBJECT_MOBILEta && type != OBJECT_MOBILEwa && type != OBJECT_MOBILEia && + type != OBJECT_MOBILEfb && + type != OBJECT_MOBILEtb && + type != OBJECT_MOBILEwb && + type != OBJECT_MOBILEib && type != OBJECT_MOBILEfc && type != OBJECT_MOBILEtc && type != OBJECT_MOBILEwc && diff --git a/src/object/auto/autonuclearplant.cpp b/src/object/auto/autonuclearplant.cpp index 947ac05b..7601b6cb 100644 --- a/src/object/auto/autonuclearplant.cpp +++ b/src/object/auto/autonuclearplant.cpp @@ -345,6 +345,10 @@ bool CAutoNuclearPlant::SearchVehicle() type != OBJECT_MOBILEta && type != OBJECT_MOBILEwa && type != OBJECT_MOBILEia && + type != OBJECT_MOBILEfb && + type != OBJECT_MOBILEtb && + type != OBJECT_MOBILEwb && + type != OBJECT_MOBILEib && type != OBJECT_MOBILEfc && type != OBJECT_MOBILEtc && type != OBJECT_MOBILEwc && diff --git a/src/object/auto/autopowerplant.cpp b/src/object/auto/autopowerplant.cpp index 2729c4fe..50504db1 100644 --- a/src/object/auto/autopowerplant.cpp +++ b/src/object/auto/autopowerplant.cpp @@ -408,6 +408,10 @@ bool CAutoPowerPlant::SearchVehicle() type != OBJECT_MOBILEta && type != OBJECT_MOBILEwa && type != OBJECT_MOBILEia && + type != OBJECT_MOBILEfb && + type != OBJECT_MOBILEtb && + type != OBJECT_MOBILEwb && + type != OBJECT_MOBILEib && type != OBJECT_MOBILEfc && type != OBJECT_MOBILEtc && type != OBJECT_MOBILEwc && diff --git a/src/object/auto/autopowerstation.cpp b/src/object/auto/autopowerstation.cpp index 17479906..3b245d7e 100644 --- a/src/object/auto/autopowerstation.cpp +++ b/src/object/auto/autopowerstation.cpp @@ -253,6 +253,10 @@ CObject* CAutoPowerStation::SearchVehicle() type != OBJECT_MOBILEta && type != OBJECT_MOBILEwa && type != OBJECT_MOBILEia && + type != OBJECT_MOBILEfb && + type != OBJECT_MOBILEtb && + type != OBJECT_MOBILEwb && + type != OBJECT_MOBILEib && type != OBJECT_MOBILEfc && type != OBJECT_MOBILEtc && type != OBJECT_MOBILEwc && diff --git a/src/object/drive_type.cpp b/src/object/drive_type.cpp index fafbddad..412e37bc 100644 --- a/src/object/drive_type.cpp +++ b/src/object/drive_type.cpp @@ -28,6 +28,7 @@ DriveType GetDriveFromObject(ObjectType type) case OBJECT_MOBILEwc: case OBJECT_MOBILEwi: case OBJECT_MOBILEws: + case OBJECT_MOBILEwb: return DriveType::Wheeled; case OBJECT_MOBILEtt: @@ -35,6 +36,7 @@ DriveType GetDriveFromObject(ObjectType type) case OBJECT_MOBILEtc: case OBJECT_MOBILEti: case OBJECT_MOBILEts: + case OBJECT_MOBILEtb: return DriveType::Tracked; case OBJECT_MOBILEft: @@ -42,6 +44,7 @@ DriveType GetDriveFromObject(ObjectType type) case OBJECT_MOBILEfc: case OBJECT_MOBILEfi: case OBJECT_MOBILEfs: + case OBJECT_MOBILEfb: return DriveType::Winged; case OBJECT_MOBILEit: @@ -49,6 +52,7 @@ DriveType GetDriveFromObject(ObjectType type) case OBJECT_MOBILEic: case OBJECT_MOBILEii: case OBJECT_MOBILEis: + case OBJECT_MOBILEib: return DriveType::Legged; case OBJECT_MOBILErt: diff --git a/src/object/motion/motiontoto.cpp b/src/object/motion/motiontoto.cpp index c0a2296a..8c22c2ea 100644 --- a/src/object/motion/motiontoto.cpp +++ b/src/object/motion/motiontoto.cpp @@ -335,6 +335,10 @@ bool CMotionToto::EventFrame(const Event &event) type == OBJECT_MOBILEta || type == OBJECT_MOBILEfa || type == OBJECT_MOBILEia || + type == OBJECT_MOBILEwb || + type == OBJECT_MOBILEtb || + type == OBJECT_MOBILEfb || + type == OBJECT_MOBILEib || type == OBJECT_MOBILEwc || type == OBJECT_MOBILEtc || type == OBJECT_MOBILEfc || diff --git a/src/object/motion/motionvehicle.cpp b/src/object/motion/motionvehicle.cpp index 14d46dcd..a9cfa402 100644 --- a/src/object/motion/motionvehicle.cpp +++ b/src/object/motion/motionvehicle.cpp @@ -101,6 +101,7 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, m_object->SetObjectRank(0, rank); if (type == OBJECT_MOBILEfa || + type == OBJECT_MOBILEfb || type == OBJECT_MOBILEfc || type == OBJECT_MOBILEfi || type == OBJECT_MOBILEfs) @@ -108,6 +109,7 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, modelManager->AddModelReference("lem1f.mod", false, rank, m_object->GetTeam()); } else if (type == OBJECT_MOBILEta || + type == OBJECT_MOBILEtb || type == OBJECT_MOBILEtc || type == OBJECT_MOBILEti || type == OBJECT_MOBILEts) @@ -115,6 +117,7 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, modelManager->AddModelReference("lem1t.mod", false, rank, m_object->GetTeam()); } else if (type == OBJECT_MOBILEwa || + type == OBJECT_MOBILEwb || type == OBJECT_MOBILEwc || type == OBJECT_MOBILEwi || type == OBJECT_MOBILEws) @@ -129,6 +132,7 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, } } else if (type == OBJECT_MOBILEia || + type == OBJECT_MOBILEib || type == OBJECT_MOBILEic || type == OBJECT_MOBILEii || type == OBJECT_MOBILEis) @@ -331,8 +335,25 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, m_object->SetPartPosition(2, Math::Vector(0.0f, 2.5f, 0.0f)); m_object->SetPartRotationZ(2, 0.0f); } + + if (type == OBJECT_MOBILEfb || + type == OBJECT_MOBILEtb || + type == OBJECT_MOBILEwb || + type == OBJECT_MOBILEib) + { + // Creates the neutron gun. + rank = m_engine->CreateObject(); + m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_DESCENDANT); + m_object->SetObjectRank(1, rank); + m_object->SetObjectParent(1, 0); + modelManager->AddModelReference("neutron.mod", false, rank, m_object->GetTeam()); +//? m_object->SetPartPosition(1, Math::Vector(0.0f, 5.3f, 0.0f)); + m_object->SetPartPosition(1, Math::Vector(0.0f, 5.3f, 0.0f)); + m_object->SetPartRotationZ(1, 0.0f); + } if (type == OBJECT_MOBILEwa || + type == OBJECT_MOBILEwb || type == OBJECT_MOBILEwc || type == OBJECT_MOBILEws || type == OBJECT_MOBILEwi || @@ -411,6 +432,7 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, } if (type == OBJECT_MOBILEta || + type == OBJECT_MOBILEtb || type == OBJECT_MOBILEtc || type == OBJECT_MOBILEti || type == OBJECT_MOBILEts) // caterpillars? @@ -493,6 +515,7 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, } if (type == OBJECT_MOBILEfa || + type == OBJECT_MOBILEfb || type == OBJECT_MOBILEfc || type == OBJECT_MOBILEfs || type == OBJECT_MOBILEfi || @@ -526,6 +549,7 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, } if (type == OBJECT_MOBILEia || + type == OBJECT_MOBILEib || type == OBJECT_MOBILEic || type == OBJECT_MOBILEis || type == OBJECT_MOBILEii) // insect legs? @@ -867,6 +891,7 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, m_object->CreateShadowCircle(6.0f, 1.0f); } else if (type == OBJECT_MOBILEta || + type == OBJECT_MOBILEtb || type == OBJECT_MOBILEtc || type == OBJECT_MOBILEti || type == OBJECT_MOBILEts || @@ -888,6 +913,7 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, } if (type == OBJECT_MOBILEfa || + type == OBJECT_MOBILEfb || type == OBJECT_MOBILEfc || type == OBJECT_MOBILEfi || type == OBJECT_MOBILEfs || @@ -948,6 +974,7 @@ void CMotionVehicle::CreatePhysics(ObjectType type) character = m_object->GetCharacter(); if ( type == OBJECT_MOBILEwa || + type == OBJECT_MOBILEwb || type == OBJECT_MOBILEwc || type == OBJECT_MOBILEwi || type == OBJECT_MOBILEws || @@ -1004,6 +1031,7 @@ void CMotionVehicle::CreatePhysics(ObjectType type) } if ( type == OBJECT_MOBILEta || + type == OBJECT_MOBILEtb || type == OBJECT_MOBILEtc || type == OBJECT_MOBILEti || type == OBJECT_MOBILEts ) // caterpillars? @@ -1033,6 +1061,7 @@ void CMotionVehicle::CreatePhysics(ObjectType type) } if ( type == OBJECT_MOBILEia || + type == OBJECT_MOBILEib || type == OBJECT_MOBILEic || type == OBJECT_MOBILEii || type == OBJECT_MOBILEis ) // legs? @@ -1063,6 +1092,7 @@ void CMotionVehicle::CreatePhysics(ObjectType type) } if ( type == OBJECT_MOBILEfa || + type == OBJECT_MOBILEfb || type == OBJECT_MOBILEfc || type == OBJECT_MOBILEfi || type == OBJECT_MOBILEfs || @@ -1240,6 +1270,7 @@ bool CMotionVehicle::EventFrame(const Event &event) type = m_object->GetType(); if ( type == OBJECT_MOBILEwa || + type == OBJECT_MOBILEwb || type == OBJECT_MOBILEwc || type == OBJECT_MOBILEwi || type == OBJECT_MOBILEws || @@ -1406,6 +1437,7 @@ bool CMotionVehicle::EventFrame(const Event &event) } if ( type == OBJECT_MOBILEta || + type == OBJECT_MOBILEtb || type == OBJECT_MOBILEtc || type == OBJECT_MOBILEti || type == OBJECT_MOBILEts || @@ -1524,6 +1556,7 @@ bool CMotionVehicle::EventFrame(const Event &event) } if ( type == OBJECT_MOBILEfa || + type == OBJECT_MOBILEfb || type == OBJECT_MOBILEfc || type == OBJECT_MOBILEfi || type == OBJECT_MOBILEfs || @@ -1533,6 +1566,7 @@ bool CMotionVehicle::EventFrame(const Event &event) } if ( type == OBJECT_MOBILEia || + type == OBJECT_MOBILEib || type == OBJECT_MOBILEic || type == OBJECT_MOBILEii || type == OBJECT_MOBILEis ) // legs? diff --git a/src/object/object_factory.cpp b/src/object/object_factory.cpp index 0b16e171..539256be 100644 --- a/src/object/object_factory.cpp +++ b/src/object/object_factory.cpp @@ -284,6 +284,10 @@ CObjectUPtr CObjectFactory::CreateObject(const ObjectCreateParams& params) case OBJECT_MOBILEta: case OBJECT_MOBILEwa: case OBJECT_MOBILEia: + case OBJECT_MOBILEfb: + case OBJECT_MOBILEtb: + case OBJECT_MOBILEwb: + case OBJECT_MOBILEib: case OBJECT_MOBILEfc: case OBJECT_MOBILEtc: case OBJECT_MOBILEwc: diff --git a/src/object/object_type.h b/src/object/object_type.h index 88c9587c..6d1b7039 100644 --- a/src/object/object_type.h +++ b/src/object/object_type.h @@ -129,6 +129,10 @@ enum ObjectType OBJECT_MOBILEtg = 211, //!< TargetBot OBJECT_MOBILEdr = 212, //!< Scribbler OBJECT_CONTROLLER = 213, //!< MissionController + OBJECT_MOBILEwb = 220, //!< WheeledBuilder + OBJECT_MOBILEtb = 221, //!< TrackedBuilder + OBJECT_MOBILEfb = 222, //!< WingedBuilder + OBJECT_MOBILEib = 223, //!< LeggedBuilder OBJECT_WAYPOINT = 250, //!< WayPoint OBJECT_FLAGb = 260, //!< BlueFlag OBJECT_FLAGr = 261, //!< RedFlag diff --git a/src/object/old_object.cpp b/src/object/old_object.cpp index beaa7c3d..c2578199 100644 --- a/src/object/old_object.cpp +++ b/src/object/old_object.cpp @@ -678,6 +678,7 @@ void COldObject::SetType(ObjectType type) // TODO: Temporary hack if ( m_type == OBJECT_MOBILEfa || // WingedGrabber + m_type == OBJECT_MOBILEfb || // WingedBuilder m_type == OBJECT_MOBILEfs || // WingedSniffer m_type == OBJECT_MOBILEfc || // WingedShooter m_type == OBJECT_MOBILEfi || // WingedOrgaShooter @@ -705,6 +706,10 @@ void COldObject::SetType(ObjectType type) m_type == OBJECT_MOBILEta || m_type == OBJECT_MOBILEwa || m_type == OBJECT_MOBILEia || + m_type == OBJECT_MOBILEfb || + m_type == OBJECT_MOBILEtb || + m_type == OBJECT_MOBILEwb || + m_type == OBJECT_MOBILEib || m_type == OBJECT_MOBILEfc || m_type == OBJECT_MOBILEtc || m_type == OBJECT_MOBILEwc || @@ -767,6 +772,10 @@ void COldObject::SetType(ObjectType type) m_type == OBJECT_MOBILEta || m_type == OBJECT_MOBILEwa || m_type == OBJECT_MOBILEia || + m_type == OBJECT_MOBILEfb || + m_type == OBJECT_MOBILEtb || + m_type == OBJECT_MOBILEwb || + m_type == OBJECT_MOBILEib || m_type == OBJECT_MOBILEfc || m_type == OBJECT_MOBILEtc || m_type == OBJECT_MOBILEwc || @@ -856,6 +865,10 @@ void COldObject::SetType(ObjectType type) m_type == OBJECT_MOBILEta || m_type == OBJECT_MOBILEwa || m_type == OBJECT_MOBILEia || + m_type == OBJECT_MOBILEfb || + m_type == OBJECT_MOBILEtb || + m_type == OBJECT_MOBILEwb || + m_type == OBJECT_MOBILEib || m_type == OBJECT_MOBILEfc || m_type == OBJECT_MOBILEtc || m_type == OBJECT_MOBILEwc || @@ -2832,6 +2845,10 @@ void COldObject::CreateSelectParticle() m_type == OBJECT_MOBILEta || m_type == OBJECT_MOBILEwa || m_type == OBJECT_MOBILEia || + m_type == OBJECT_MOBILEfb || + m_type == OBJECT_MOBILEtb || + m_type == OBJECT_MOBILEwb || + m_type == OBJECT_MOBILEib || m_type == OBJECT_MOBILEfc || m_type == OBJECT_MOBILEtc || m_type == OBJECT_MOBILEwc || @@ -2930,6 +2947,7 @@ void COldObject::UpdateSelectParticle() // Red back lens if ( m_type == OBJECT_MOBILEfa || + m_type == OBJECT_MOBILEfb || m_type == OBJECT_MOBILEfc || m_type == OBJECT_MOBILEfi || m_type == OBJECT_MOBILEfs || @@ -2941,6 +2959,7 @@ void COldObject::UpdateSelectParticle() dim[3].x = 0.6f; } if ( m_type == OBJECT_MOBILEwa || + m_type == OBJECT_MOBILEwb || m_type == OBJECT_MOBILEwc || m_type == OBJECT_MOBILEwi || m_type == OBJECT_MOBILEws ) // wheels? @@ -2954,6 +2973,7 @@ void COldObject::UpdateSelectParticle() pos[3] = Math::Vector(-4.0f, 2.5f, -2.2f); } if ( m_type == OBJECT_MOBILEia || + m_type == OBJECT_MOBILEib || m_type == OBJECT_MOBILEic || m_type == OBJECT_MOBILEii || m_type == OBJECT_MOBILEis || @@ -2963,6 +2983,7 @@ void COldObject::UpdateSelectParticle() pos[3] = Math::Vector(-4.5f, 2.7f, -2.8f); } if ( m_type == OBJECT_MOBILEta || + m_type == OBJECT_MOBILEtb || m_type == OBJECT_MOBILEtc || m_type == OBJECT_MOBILEti || m_type == OBJECT_MOBILEts || @@ -3198,6 +3219,10 @@ float COldObject::GetLightningHitProbability() m_type == OBJECT_MOBILEta || m_type == OBJECT_MOBILEwa || m_type == OBJECT_MOBILEia || + m_type == OBJECT_MOBILEfb || + m_type == OBJECT_MOBILEtb || + m_type == OBJECT_MOBILEwb || + m_type == OBJECT_MOBILEib || m_type == OBJECT_MOBILEfc || m_type == OBJECT_MOBILEtc || m_type == OBJECT_MOBILEwc || diff --git a/src/object/task/taskbuild.cpp b/src/object/task/taskbuild.cpp index 3d39b20d..5104acfe 100644 --- a/src/object/task/taskbuild.cpp +++ b/src/object/task/taskbuild.cpp @@ -321,10 +321,10 @@ bool CTaskBuild::EventProcess(const Event &event) mat = m_object->GetWorldMatrix(14); break; - case OBJECT_MOBILEfa: - case OBJECT_MOBILEta: - case OBJECT_MOBILEwa: - case OBJECT_MOBILEia: + case OBJECT_MOBILEfb: + case OBJECT_MOBILEtb: + case OBJECT_MOBILEwb: + case OBJECT_MOBILEib: mat = m_object->GetWorldMatrix(3); break; diff --git a/src/object/task/taskgoto.cpp b/src/object/task/taskgoto.cpp index 6584465e..6a6b3afa 100644 --- a/src/object/task/taskgoto.cpp +++ b/src/object/task/taskgoto.cpp @@ -556,6 +556,10 @@ CObject* CTaskGoto::WormSearch(Math::Vector &impact) oType != OBJECT_MOBILEta && oType != OBJECT_MOBILEwa && oType != OBJECT_MOBILEia && + oType != OBJECT_MOBILEfb && + oType != OBJECT_MOBILEtb && + oType != OBJECT_MOBILEwb && + oType != OBJECT_MOBILEib && oType != OBJECT_MOBILEfc && oType != OBJECT_MOBILEtc && oType != OBJECT_MOBILEwc && @@ -1164,6 +1168,10 @@ bool CTaskGoto::AdjustTarget(CObject* pObj, Math::Vector &pos, float &distance) type == OBJECT_MOBILEta || type == OBJECT_MOBILEwa || type == OBJECT_MOBILEia || + type == OBJECT_MOBILEfb || + type == OBJECT_MOBILEtb || + type == OBJECT_MOBILEwb || + type == OBJECT_MOBILEib || type == OBJECT_MOBILEfs || type == OBJECT_MOBILEts || type == OBJECT_MOBILEws || @@ -1432,6 +1440,7 @@ void CTaskGoto::ComputeRepulse(Math::Point &dir) fac = 2.0f; if ( iType == OBJECT_MOBILEwa || + iType == OBJECT_MOBILEwb || iType == OBJECT_MOBILEwc || iType == OBJECT_MOBILEwi || iType == OBJECT_MOBILEws || @@ -1441,6 +1450,7 @@ void CTaskGoto::ComputeRepulse(Math::Point &dir) fac = 1.5f; } if ( iType == OBJECT_MOBILEta || + iType == OBJECT_MOBILEtb || iType == OBJECT_MOBILEtc || iType == OBJECT_MOBILEti || iType == OBJECT_MOBILEts || @@ -1451,6 +1461,7 @@ void CTaskGoto::ComputeRepulse(Math::Point &dir) fac = 1.5f; } if ( iType == OBJECT_MOBILEfa || + iType == OBJECT_MOBILEfb || iType == OBJECT_MOBILEfc || iType == OBJECT_MOBILEfi || iType == OBJECT_MOBILEfs || @@ -1468,6 +1479,7 @@ void CTaskGoto::ComputeRepulse(Math::Point &dir) } } if ( iType == OBJECT_MOBILEia || + iType == OBJECT_MOBILEib || iType == OBJECT_MOBILEic || iType == OBJECT_MOBILEii || iType == OBJECT_MOBILEis || @@ -1962,6 +1974,7 @@ void CTaskGoto::BitmapTerrain(int minx, int miny, int maxx, int maxy) type = m_object->GetType(); if ( type == OBJECT_MOBILEwa || + type == OBJECT_MOBILEwb || type == OBJECT_MOBILEwc || type == OBJECT_MOBILEws || type == OBJECT_MOBILEwi || @@ -1972,6 +1985,7 @@ void CTaskGoto::BitmapTerrain(int minx, int miny, int maxx, int maxy) } if ( type == OBJECT_MOBILEta || + type == OBJECT_MOBILEtb || type == OBJECT_MOBILEtc || type == OBJECT_MOBILEti || type == OBJECT_MOBILEts ) // caterpillars? @@ -1999,6 +2013,7 @@ void CTaskGoto::BitmapTerrain(int minx, int miny, int maxx, int maxy) } if ( type == OBJECT_MOBILEfa || + type == OBJECT_MOBILEfb || type == OBJECT_MOBILEfc || type == OBJECT_MOBILEfs || type == OBJECT_MOBILEfi || @@ -2009,6 +2024,7 @@ void CTaskGoto::BitmapTerrain(int minx, int miny, int maxx, int maxy) } if ( type == OBJECT_MOBILEia || + type == OBJECT_MOBILEib || type == OBJECT_MOBILEic || type == OBJECT_MOBILEis || type == OBJECT_MOBILEii ) // insect legs? diff --git a/src/object/task/tasktake.cpp b/src/object/task/tasktake.cpp index e6632b23..728b3519 100644 --- a/src/object/task/tasktake.cpp +++ b/src/object/task/tasktake.cpp @@ -354,6 +354,10 @@ CObject* CTaskTake::SearchFriendObject(float &angle, type != OBJECT_MOBILEta && type != OBJECT_MOBILEwa && type != OBJECT_MOBILEia && + type != OBJECT_MOBILEfb && + type != OBJECT_MOBILEtb && + type != OBJECT_MOBILEwb && + type != OBJECT_MOBILEib && type != OBJECT_MOBILEfc && type != OBJECT_MOBILEtc && type != OBJECT_MOBILEwc && diff --git a/src/object/tool_type.cpp b/src/object/tool_type.cpp index 33bc3e0b..99b875a7 100644 --- a/src/object/tool_type.cpp +++ b/src/object/tool_type.cpp @@ -46,6 +46,12 @@ ToolType GetToolFromObject(ObjectType type) case OBJECT_MOBILEfi: case OBJECT_MOBILEii: return ToolType::OrganicShooter; + + case OBJECT_MOBILEwb: + case OBJECT_MOBILEtb: + case OBJECT_MOBILEfb: + case OBJECT_MOBILEib: + return ToolType::Builder; default: return ToolType::Other; diff --git a/src/object/tool_type.h b/src/object/tool_type.h index a480679c..23ce08e2 100644 --- a/src/object/tool_type.h +++ b/src/object/tool_type.h @@ -28,6 +28,7 @@ enum class ToolType : unsigned int Sniffer, Shooter, OrganicShooter, + Builder, }; ToolType GetToolFromObject(ObjectType type); diff --git a/src/physics/physics.cpp b/src/physics/physics.cpp index 1e801d11..65293510 100644 --- a/src/physics/physics.cpp +++ b/src/physics/physics.cpp @@ -988,6 +988,7 @@ void CPhysics::MotorUpdate(float aTime, float rTime) { factor = 1.0f; if ( type == OBJECT_MOBILEia || + type == OBJECT_MOBILEib || type == OBJECT_MOBILEis || type == OBJECT_MOBILEic || type == OBJECT_MOBILEii ) factor = 0.5f; @@ -1148,6 +1149,7 @@ void CPhysics::EffectUpdate(float aTime, float rTime) } if ( type == OBJECT_MOBILEwa || + type == OBJECT_MOBILEwb || type == OBJECT_MOBILEwc || type == OBJECT_MOBILEwi || type == OBJECT_MOBILEws || @@ -1193,6 +1195,7 @@ void CPhysics::EffectUpdate(float aTime, float rTime) } if ( type == OBJECT_MOBILEfa || + type == OBJECT_MOBILEfb || type == OBJECT_MOBILEfc || type == OBJECT_MOBILEfi || type == OBJECT_MOBILEfs || @@ -1800,6 +1803,10 @@ void CPhysics::WaterFrame(float aTime, float rTime) type == OBJECT_MOBILEta || type == OBJECT_MOBILEwa || type == OBJECT_MOBILEia || + type == OBJECT_MOBILEfb || + type == OBJECT_MOBILEtb || + type == OBJECT_MOBILEwb || + type == OBJECT_MOBILEib || type == OBJECT_MOBILEfc || type == OBJECT_MOBILEtc || type == OBJECT_MOBILEwc || @@ -1838,6 +1845,7 @@ void CPhysics::SoundMotorFull(float rTime, ObjectType type) float amplitude, time, freq; if ( type == OBJECT_MOBILEia || + type == OBJECT_MOBILEib || type == OBJECT_MOBILEic || type == OBJECT_MOBILEii || type == OBJECT_MOBILEis ) @@ -1953,6 +1961,7 @@ void CPhysics::SoundMotorSlow(float rTime, ObjectType type) int i, max; if ( type == OBJECT_MOBILEia || + type == OBJECT_MOBILEib || type == OBJECT_MOBILEic || type == OBJECT_MOBILEii || type == OBJECT_MOBILEis ) @@ -1980,6 +1989,7 @@ void CPhysics::SoundMotorSlow(float rTime, ObjectType type) amplitude = 0.9f; } else if ( type == OBJECT_MOBILEta || + type == OBJECT_MOBILEtb || type == OBJECT_MOBILEtc || type == OBJECT_MOBILEti || type == OBJECT_MOBILEts ) @@ -2074,6 +2084,7 @@ void CPhysics::SoundMotorSlow(float rTime, ObjectType type) void CPhysics::SoundMotorStop(float rTime, ObjectType type) { if ( type == OBJECT_MOBILEia || + type == OBJECT_MOBILEib || type == OBJECT_MOBILEic || type == OBJECT_MOBILEii || type == OBJECT_MOBILEis ) @@ -2736,6 +2747,10 @@ bool CPhysics::ExploOther(ObjectType iType, oType == OBJECT_MOBILEta || oType == OBJECT_MOBILEfa || oType == OBJECT_MOBILEia || + oType == OBJECT_MOBILEwb || + oType == OBJECT_MOBILEtb || + oType == OBJECT_MOBILEfb || + oType == OBJECT_MOBILEib || oType == OBJECT_MOBILEwc || oType == OBJECT_MOBILEtc || oType == OBJECT_MOBILEfc || @@ -2797,6 +2812,10 @@ int CPhysics::ExploHimself(ObjectType iType, ObjectType oType, float force) iType == OBJECT_MOBILEta || iType == OBJECT_MOBILEfa || iType == OBJECT_MOBILEia || + iType == OBJECT_MOBILEwb || + iType == OBJECT_MOBILEtb || + iType == OBJECT_MOBILEfb || + iType == OBJECT_MOBILEib || iType == OBJECT_MOBILEwc || iType == OBJECT_MOBILEtc || iType == OBJECT_MOBILEfc || @@ -3019,6 +3038,7 @@ void CPhysics::MotorParticle(float aTime, float rTime) type = m_object->GetType(); if ( type == OBJECT_MOBILEia || + type == OBJECT_MOBILEib || type == OBJECT_MOBILEic || type == OBJECT_MOBILEii || type == OBJECT_MOBILEis || // legs? @@ -3124,6 +3144,7 @@ void CPhysics::MotorParticle(float aTime, float rTime) } if ( type == OBJECT_MOBILEta || + type == OBJECT_MOBILEtb || type == OBJECT_MOBILEtc || type == OBJECT_MOBILEti || type == OBJECT_MOBILEts ) // caterpillars? diff --git a/src/script/cbottoken.cpp b/src/script/cbottoken.cpp index 4dd5c8ec..bb4066fc 100644 --- a/src/script/cbottoken.cpp +++ b/src/script/cbottoken.cpp @@ -99,6 +99,10 @@ const char* GetObjectName(ObjectType type) if ( type == OBJECT_MOBILEts ) return "TrackedSniffer"; if ( type == OBJECT_MOBILEfs ) return "WingedSniffer"; if ( type == OBJECT_MOBILEis ) return "LeggedSniffer"; + if ( type == OBJECT_MOBILEwb ) return "WheeledBuilder"; + if ( type == OBJECT_MOBILEtb ) return "TrackedBuilder"; + if ( type == OBJECT_MOBILEfb ) return "WingedBuilder"; + if ( type == OBJECT_MOBILEib ) return "LeggedBuilder"; if ( type == OBJECT_MOBILErt ) return "Thumper"; if ( type == OBJECT_MOBILErc ) return "PhazerShooter"; if ( type == OBJECT_MOBILErr ) return "Recycler"; diff --git a/src/script/scriptfunc.cpp b/src/script/scriptfunc.cpp index 8a774907..c673d8b4 100644 --- a/src/script/scriptfunc.cpp +++ b/src/script/scriptfunc.cpp @@ -1291,10 +1291,10 @@ bool CScriptFunctions::rBuild(CBotVar* var, CBotVar* result, int& exception, voi oType = pThis->GetType(); - if ( oType != OBJECT_MOBILEfa && // allowed only for grabber bots && humans - oType != OBJECT_MOBILEta && - oType != OBJECT_MOBILEwa && - oType != OBJECT_MOBILEia && + if ( oType != OBJECT_MOBILEfb && // allowed only for builder bots && humans + oType != OBJECT_MOBILEtb && + oType != OBJECT_MOBILEwb && + oType != OBJECT_MOBILEib && oType != OBJECT_HUMAN && oType != OBJECT_TECH ) { diff --git a/src/src/common/config.h b/src/src/common/config.h new file mode 100644 index 00000000..196d9900 --- /dev/null +++ b/src/src/common/config.h @@ -0,0 +1,22 @@ +#pragma once + +// Macros set by CMake +#define PLATFORM_WINDOWS 1 +/* #undef PLATFORM_LINUX */ +/* #undef PLATFORM_GNU */ +/* #undef PLATFORM_MACOSX */ +/* #undef PLATFORM_OTHER */ + +#ifdef PLATFORM_MACOSX +// Assume we have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework +#define HAVE_CFLOCALECOPYCURRENT 1 +#endif + +/* #undef GLEW_STATIC */ + +#define OPENAL_SOUND + +/* #undef PORTABLE */ + +#define COLOBOT_DEFAULT_DATADIR "C:/Program Files (x86)/colobot/data" +#define COLOBOT_I18N_DIR "C:/Program Files (x86)/colobot/lang" diff --git a/src/src/common/version.h b/src/src/common/version.h new file mode 100644 index 00000000..61cea590 --- /dev/null +++ b/src/src/common/version.h @@ -0,0 +1,7 @@ +#pragma once + +#define COLOBOT_FULLNAME "Colobot: Gold Edition 0.1.11+alpha-git-dev~radda8281" +#define COLOBOT_VERSION_DISPLAY "git-dev~radda8281" + +#define BUILD_NUMBER 0 +/* #undef OFFICIAL_BUILD */ diff --git a/src/ui/controls/map.cpp b/src/ui/controls/map.cpp index b22453c5..1376f189 100644 --- a/src/ui/controls/map.cpp +++ b/src/ui/controls/map.cpp @@ -854,6 +854,10 @@ void CMap::DrawObjectIcon(Math::Point pos, Math::Point dim, MapColor color, if ( type == OBJECT_MOBILEta ) icon = 10; if ( type == OBJECT_MOBILEwa ) icon = 9; if ( type == OBJECT_MOBILEia ) icon = 22; + if ( type == OBJECT_MOBILEfb ) icon = 32; //placeholder icon + if ( type == OBJECT_MOBILEtb ) icon = 32; + if ( type == OBJECT_MOBILEwb ) icon = 32; + if ( type == OBJECT_MOBILEib ) icon = 32; if ( type == OBJECT_MOBILEfc ) icon = 17; if ( type == OBJECT_MOBILEtc ) icon = 16; if ( type == OBJECT_MOBILEwc ) icon = 15; @@ -1231,6 +1235,10 @@ void CMap::UpdateObject(CObject* pObj) type == OBJECT_MOBILEta || type == OBJECT_MOBILEfa || type == OBJECT_MOBILEia || + type == OBJECT_MOBILEwb || + type == OBJECT_MOBILEtb || + type == OBJECT_MOBILEfb || + type == OBJECT_MOBILEib || type == OBJECT_MOBILEwc || type == OBJECT_MOBILEtc || type == OBJECT_MOBILEfc || diff --git a/src/ui/mainshort.cpp b/src/ui/mainshort.cpp index 23b58ee9..ce077c8c 100644 --- a/src/ui/mainshort.cpp +++ b/src/ui/mainshort.cpp @@ -207,6 +207,10 @@ int CMainShort::GetShortcutIcon(ObjectType type) if ( type == OBJECT_MOBILEta ) icon = 10; if ( type == OBJECT_MOBILEwa ) icon = 9; if ( type == OBJECT_MOBILEia ) icon = 22; + if ( type == OBJECT_MOBILEfb ) icon = 32; + if ( type == OBJECT_MOBILEtb ) icon = 32; + if ( type == OBJECT_MOBILEwb ) icon = 32; + if ( type == OBJECT_MOBILEib ) icon = 32; if ( type == OBJECT_MOBILEfc ) icon = 17; if ( type == OBJECT_MOBILEtc ) icon = 16; if ( type == OBJECT_MOBILEwc ) icon = 15; diff --git a/src/ui/object_interface.cpp b/src/ui/object_interface.cpp index c819540a..bd2a5be9 100644 --- a/src/ui/object_interface.cpp +++ b/src/ui/object_interface.cpp @@ -841,6 +841,10 @@ bool CObjectInterface::CreateInterface(bool bSelect) type == OBJECT_MOBILEta || type == OBJECT_MOBILEwa || type == OBJECT_MOBILEia || + type == OBJECT_MOBILEfb || + type == OBJECT_MOBILEtb || + type == OBJECT_MOBILEwb || + type == OBJECT_MOBILEib || type == OBJECT_MOBILEfc || type == OBJECT_MOBILEtc || type == OBJECT_MOBILEwc || @@ -1755,6 +1759,10 @@ void CObjectInterface::UpdateInterface() type == OBJECT_MOBILEta || type == OBJECT_MOBILEwa || type == OBJECT_MOBILEia || + type == OBJECT_MOBILEfb || + type == OBJECT_MOBILEtb || + type == OBJECT_MOBILEwb || + type == OBJECT_MOBILEib || type == OBJECT_MOBILEfc || type == OBJECT_MOBILEtc || type == OBJECT_MOBILEwc || From b04d8ca99d16669ee71655a0145e6fcdcbb9867e Mon Sep 17 00:00:00 2001 From: Fiftytwo Date: Thu, 16 Nov 2017 20:32:10 +0100 Subject: [PATCH 015/207] Clean up redundant files --- src/CPackConfig.cmake | 93 --------------------------------- src/CPackSourceConfig.cmake | 100 ------------------------------------ src/desktop/colobot.rc | 25 --------- src/src/common/config.h | 22 -------- src/src/common/version.h | 7 --- 5 files changed, 247 deletions(-) delete mode 100644 src/CPackConfig.cmake delete mode 100644 src/CPackSourceConfig.cmake delete mode 100644 src/desktop/colobot.rc delete mode 100644 src/src/common/config.h delete mode 100644 src/src/common/version.h diff --git a/src/CPackConfig.cmake b/src/CPackConfig.cmake deleted file mode 100644 index fbcd118a..00000000 --- a/src/CPackConfig.cmake +++ /dev/null @@ -1,93 +0,0 @@ -# This file will be configured to contain variables for CPack. These variables -# should be set in the CMake list file of the project before CPack module is -# included. The list of available CPACK_xxx variables and their associated -# documentation may be obtained using -# cpack --help-variable-list -# -# Some variables are common to all generators (e.g. CPACK_PACKAGE_NAME) -# and some are specific to a generator -# (e.g. CPACK_NSIS_EXTRA_INSTALL_COMMANDS). The generator specific variables -# usually begin with CPACK__xxxx. - - -SET(CPACK_BINARY_7Z "OFF") -SET(CPACK_BINARY_BUNDLE "") -SET(CPACK_BINARY_CYGWIN "") -SET(CPACK_BINARY_DEB "") -SET(CPACK_BINARY_DRAGNDROP "") -SET(CPACK_BINARY_IFW "OFF") -SET(CPACK_BINARY_NSIS "ON") -SET(CPACK_BINARY_OSXX11 "") -SET(CPACK_BINARY_PACKAGEMAKER "") -SET(CPACK_BINARY_PRODUCTBUILD "") -SET(CPACK_BINARY_RPM "") -SET(CPACK_BINARY_STGZ "") -SET(CPACK_BINARY_TBZ2 "") -SET(CPACK_BINARY_TGZ "") -SET(CPACK_BINARY_TXZ "") -SET(CPACK_BINARY_TZ "") -SET(CPACK_BINARY_WIX "OFF") -SET(CPACK_BINARY_ZIP "OFF") -SET(CPACK_BUILD_SOURCE_DIRS "C:/Users/Fiftytwo/Repos/colobot;C:/Users/Fiftytwo/Repos/colobot/src") -SET(CPACK_BUNDLE_NAME "Colobot: Gold Edition") -SET(CPACK_CMAKE_GENERATOR "MSYS Makefiles") -SET(CPACK_COMPONENT_UNSPECIFIED_HIDDEN "TRUE") -SET(CPACK_COMPONENT_UNSPECIFIED_REQUIRED "TRUE") -SET(CPACK_GENERATOR "NSIS") -SET(CPACK_INSTALL_CMAKE_PROJECTS "C:/Users/Fiftytwo/Repos/colobot/src;colobot;ALL;/") -SET(CPACK_INSTALL_PREFIX "C:/Program Files (x86)/colobot") -SET(CPACK_MODULE_PATH "C:/Users/Fiftytwo/Repos/colobot/cmake") -SET(CPACK_NSIS_DEFINES "SetOverwrite on -BrandingText \"Colobot: Gold Edition (0.1.11+alpha-git-dev~radda8281)\"") -SET(CPACK_NSIS_DISPLAY_NAME "Colobot") -SET(CPACK_NSIS_EXECUTABLES_DIRECTORY ".") -SET(CPACK_NSIS_INSTALLER_ICON_CODE "!define MUI_HEADERIMAGE_BITMAP \"C:/Users/Fiftytwo/Repos/colobot/desktop/colobot_nsis.bmp\" - !define MUI_WELCOMEFINISHPAGE_BITMAP \"C:/Users/Fiftytwo/Repos/colobot/desktop/colobot_nsis_left.bmp\"") -SET(CPACK_NSIS_INSTALLER_MUI_ICON_CODE "") -SET(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64") -SET(CPACK_NSIS_MUI_FINISHPAGE_RUN "colobot.exe") -SET(CPACK_NSIS_MUI_ICON "C:/Users/Fiftytwo/Repos/colobot/desktop/colobot.ico") -SET(CPACK_NSIS_MUI_UNIICON "C:/Users/Fiftytwo/Repos/colobot/desktop/colobot.ico") -SET(CPACK_NSIS_PACKAGE_NAME "Colobot") -SET(CPACK_OUTPUT_CONFIG_FILE "C:/Users/Fiftytwo/Repos/colobot/src/CPackConfig.cmake") -SET(CPACK_PACKAGE_DEFAULT_LOCATION "/") -SET(CPACK_PACKAGE_DESCRIPTION_FILE "C:/Users/Fiftytwo/Repos/colobot/desktop/../README.md") -SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Colobot: Gold Edition") -SET(CPACK_PACKAGE_EXECUTABLES "colobot;Colobot: Gold Edition") -SET(CPACK_PACKAGE_FILE_NAME "colobot-0.1.11+alpha-git-dev~radda8281") -SET(CPACK_PACKAGE_ICON "") -SET(CPACK_PACKAGE_INSTALL_DIRECTORY "Colobot") -SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "Colobot") -SET(CPACK_PACKAGE_NAME "colobot") -SET(CPACK_PACKAGE_RELOCATABLE "true") -SET(CPACK_PACKAGE_VENDOR "TerranovaTeam") -SET(CPACK_PACKAGE_VERSION "0.1.11") -SET(CPACK_PACKAGE_VERSION_MAJOR "0") -SET(CPACK_PACKAGE_VERSION_MINOR "1") -SET(CPACK_PACKAGE_VERSION_PATCH "11") -SET(CPACK_RESOURCE_FILE_LICENSE "C:/Users/Fiftytwo/Repos/colobot/desktop/../LICENSE.txt") -SET(CPACK_RESOURCE_FILE_README "C:/msys64/mingw64/share/cmake-3.9/Templates/CPack.GenericDescription.txt") -SET(CPACK_RESOURCE_FILE_WELCOME "C:/msys64/mingw64/share/cmake-3.9/Templates/CPack.GenericWelcome.txt") -SET(CPACK_SET_DESTDIR "OFF") -SET(CPACK_SOURCE_7Z "ON") -SET(CPACK_SOURCE_CYGWIN "") -SET(CPACK_SOURCE_GENERATOR "7Z;ZIP") -SET(CPACK_SOURCE_OUTPUT_CONFIG_FILE "C:/Users/Fiftytwo/Repos/colobot/src/CPackSourceConfig.cmake") -SET(CPACK_SOURCE_RPM "") -SET(CPACK_SOURCE_TBZ2 "") -SET(CPACK_SOURCE_TGZ "") -SET(CPACK_SOURCE_TXZ "") -SET(CPACK_SOURCE_TZ "") -SET(CPACK_SOURCE_ZIP "ON") -SET(CPACK_STRIP_FILES "TRUE") -SET(CPACK_SYSTEM_NAME "win64") -SET(CPACK_TOPLEVEL_TAG "win64") -SET(CPACK_WIX_SIZEOF_VOID_P "8") - -if(NOT CPACK_PROPERTIES_FILE) - set(CPACK_PROPERTIES_FILE "C:/Users/Fiftytwo/Repos/colobot/src/CPackProperties.cmake") -endif() - -if(EXISTS ${CPACK_PROPERTIES_FILE}) - include(${CPACK_PROPERTIES_FILE}) -endif() diff --git a/src/CPackSourceConfig.cmake b/src/CPackSourceConfig.cmake deleted file mode 100644 index d6dddd85..00000000 --- a/src/CPackSourceConfig.cmake +++ /dev/null @@ -1,100 +0,0 @@ -# This file will be configured to contain variables for CPack. These variables -# should be set in the CMake list file of the project before CPack module is -# included. The list of available CPACK_xxx variables and their associated -# documentation may be obtained using -# cpack --help-variable-list -# -# Some variables are common to all generators (e.g. CPACK_PACKAGE_NAME) -# and some are specific to a generator -# (e.g. CPACK_NSIS_EXTRA_INSTALL_COMMANDS). The generator specific variables -# usually begin with CPACK__xxxx. - - -SET(CPACK_BINARY_7Z "OFF") -SET(CPACK_BINARY_BUNDLE "") -SET(CPACK_BINARY_CYGWIN "") -SET(CPACK_BINARY_DEB "") -SET(CPACK_BINARY_DRAGNDROP "") -SET(CPACK_BINARY_IFW "OFF") -SET(CPACK_BINARY_NSIS "ON") -SET(CPACK_BINARY_OSXX11 "") -SET(CPACK_BINARY_PACKAGEMAKER "") -SET(CPACK_BINARY_PRODUCTBUILD "") -SET(CPACK_BINARY_RPM "") -SET(CPACK_BINARY_STGZ "") -SET(CPACK_BINARY_TBZ2 "") -SET(CPACK_BINARY_TGZ "") -SET(CPACK_BINARY_TXZ "") -SET(CPACK_BINARY_TZ "") -SET(CPACK_BINARY_WIX "OFF") -SET(CPACK_BINARY_ZIP "OFF") -SET(CPACK_BUILD_SOURCE_DIRS "C:/Users/Fiftytwo/Repos/colobot;C:/Users/Fiftytwo/Repos/colobot/src") -SET(CPACK_BUNDLE_NAME "Colobot: Gold Edition") -SET(CPACK_CMAKE_GENERATOR "MSYS Makefiles") -SET(CPACK_COMPONENT_UNSPECIFIED_HIDDEN "TRUE") -SET(CPACK_COMPONENT_UNSPECIFIED_REQUIRED "TRUE") -SET(CPACK_GENERATOR "7Z;ZIP") -SET(CPACK_IGNORE_FILES "/CVS/;/\\.svn/;/\\.bzr/;/\\.hg/;/\\.git/;\\.swp\$;\\.#;/#") -SET(CPACK_INSTALLED_DIRECTORIES "C:/Users/Fiftytwo/Repos/colobot;/") -SET(CPACK_INSTALL_CMAKE_PROJECTS "") -SET(CPACK_INSTALL_PREFIX "C:/Program Files (x86)/colobot") -SET(CPACK_MODULE_PATH "C:/Users/Fiftytwo/Repos/colobot/cmake") -SET(CPACK_NSIS_DEFINES "SetOverwrite on -BrandingText \"Colobot: Gold Edition (0.1.11+alpha-git-dev~radda8281)\"") -SET(CPACK_NSIS_DISPLAY_NAME "Colobot") -SET(CPACK_NSIS_EXECUTABLES_DIRECTORY ".") -SET(CPACK_NSIS_INSTALLER_ICON_CODE "!define MUI_HEADERIMAGE_BITMAP \"C:/Users/Fiftytwo/Repos/colobot/desktop/colobot_nsis.bmp\" - !define MUI_WELCOMEFINISHPAGE_BITMAP \"C:/Users/Fiftytwo/Repos/colobot/desktop/colobot_nsis_left.bmp\"") -SET(CPACK_NSIS_INSTALLER_MUI_ICON_CODE "") -SET(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64") -SET(CPACK_NSIS_MUI_FINISHPAGE_RUN "colobot.exe") -SET(CPACK_NSIS_MUI_ICON "C:/Users/Fiftytwo/Repos/colobot/desktop/colobot.ico") -SET(CPACK_NSIS_MUI_UNIICON "C:/Users/Fiftytwo/Repos/colobot/desktop/colobot.ico") -SET(CPACK_NSIS_PACKAGE_NAME "Colobot") -SET(CPACK_OUTPUT_CONFIG_FILE "C:/Users/Fiftytwo/Repos/colobot/src/CPackConfig.cmake") -SET(CPACK_PACKAGE_DEFAULT_LOCATION "/") -SET(CPACK_PACKAGE_DESCRIPTION_FILE "C:/Users/Fiftytwo/Repos/colobot/desktop/../README.md") -SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Colobot: Gold Edition") -SET(CPACK_PACKAGE_EXECUTABLES "colobot;Colobot: Gold Edition") -SET(CPACK_PACKAGE_FILE_NAME "colobot-0.1.11-Source") -SET(CPACK_PACKAGE_ICON "") -SET(CPACK_PACKAGE_INSTALL_DIRECTORY "Colobot") -SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "Colobot") -SET(CPACK_PACKAGE_NAME "colobot") -SET(CPACK_PACKAGE_RELOCATABLE "true") -SET(CPACK_PACKAGE_VENDOR "TerranovaTeam") -SET(CPACK_PACKAGE_VERSION "0.1.11") -SET(CPACK_PACKAGE_VERSION_MAJOR "0") -SET(CPACK_PACKAGE_VERSION_MINOR "1") -SET(CPACK_PACKAGE_VERSION_PATCH "11") -SET(CPACK_RESOURCE_FILE_LICENSE "C:/Users/Fiftytwo/Repos/colobot/desktop/../LICENSE.txt") -SET(CPACK_RESOURCE_FILE_README "C:/msys64/mingw64/share/cmake-3.9/Templates/CPack.GenericDescription.txt") -SET(CPACK_RESOURCE_FILE_WELCOME "C:/msys64/mingw64/share/cmake-3.9/Templates/CPack.GenericWelcome.txt") -SET(CPACK_RPM_PACKAGE_SOURCES "ON") -SET(CPACK_SET_DESTDIR "OFF") -SET(CPACK_SOURCE_7Z "ON") -SET(CPACK_SOURCE_CYGWIN "") -SET(CPACK_SOURCE_GENERATOR "7Z;ZIP") -SET(CPACK_SOURCE_IGNORE_FILES "/CVS/;/\\.svn/;/\\.bzr/;/\\.hg/;/\\.git/;\\.swp\$;\\.#;/#") -SET(CPACK_SOURCE_INSTALLED_DIRECTORIES "C:/Users/Fiftytwo/Repos/colobot;/") -SET(CPACK_SOURCE_OUTPUT_CONFIG_FILE "C:/Users/Fiftytwo/Repos/colobot/src/CPackSourceConfig.cmake") -SET(CPACK_SOURCE_PACKAGE_FILE_NAME "colobot-0.1.11-Source") -SET(CPACK_SOURCE_RPM "") -SET(CPACK_SOURCE_TBZ2 "") -SET(CPACK_SOURCE_TGZ "") -SET(CPACK_SOURCE_TOPLEVEL_TAG "win64-Source") -SET(CPACK_SOURCE_TXZ "") -SET(CPACK_SOURCE_TZ "") -SET(CPACK_SOURCE_ZIP "ON") -SET(CPACK_STRIP_FILES "") -SET(CPACK_SYSTEM_NAME "win64") -SET(CPACK_TOPLEVEL_TAG "win64-Source") -SET(CPACK_WIX_SIZEOF_VOID_P "8") - -if(NOT CPACK_PROPERTIES_FILE) - set(CPACK_PROPERTIES_FILE "C:/Users/Fiftytwo/Repos/colobot/src/CPackProperties.cmake") -endif() - -if(EXISTS ${CPACK_PROPERTIES_FILE}) - include(${CPACK_PROPERTIES_FILE}) -endif() diff --git a/src/desktop/colobot.rc b/src/desktop/colobot.rc deleted file mode 100644 index 5187a5af..00000000 --- a/src/desktop/colobot.rc +++ /dev/null @@ -1,25 +0,0 @@ -id ICON "C:/Users/Fiftytwo/Repos/colobot/desktop/colobot.ico" - -1 VERSIONINFO -FILEVERSION 0,1,11,0 -PRODUCTVERSION 0,1,11,0 -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "OriginalFilename", "colobot.exe\0" - VALUE "InternalName", "colobot\0" - VALUE "FileDescription", "Colobot: Gold Edition - Colonize with Bots\0" - VALUE "ProductName", "Colobot: Gold Edition\0" - VALUE "CompanyName", "TerranovaTeam\0" - VALUE "LegalCopyright", "Copyright (c) 2012-2014 TerranovaTeam\0" - VALUE "FileVersion", "0.1.11+alpha-git-dev~radda8281\0" - VALUE "ProductVersion", "0.1.11+alpha-git-dev~radda8281\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END diff --git a/src/src/common/config.h b/src/src/common/config.h deleted file mode 100644 index 196d9900..00000000 --- a/src/src/common/config.h +++ /dev/null @@ -1,22 +0,0 @@ -#pragma once - -// Macros set by CMake -#define PLATFORM_WINDOWS 1 -/* #undef PLATFORM_LINUX */ -/* #undef PLATFORM_GNU */ -/* #undef PLATFORM_MACOSX */ -/* #undef PLATFORM_OTHER */ - -#ifdef PLATFORM_MACOSX -// Assume we have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework -#define HAVE_CFLOCALECOPYCURRENT 1 -#endif - -/* #undef GLEW_STATIC */ - -#define OPENAL_SOUND - -/* #undef PORTABLE */ - -#define COLOBOT_DEFAULT_DATADIR "C:/Program Files (x86)/colobot/data" -#define COLOBOT_I18N_DIR "C:/Program Files (x86)/colobot/lang" diff --git a/src/src/common/version.h b/src/src/common/version.h deleted file mode 100644 index 61cea590..00000000 --- a/src/src/common/version.h +++ /dev/null @@ -1,7 +0,0 @@ -#pragma once - -#define COLOBOT_FULLNAME "Colobot: Gold Edition 0.1.11+alpha-git-dev~radda8281" -#define COLOBOT_VERSION_DISPLAY "git-dev~radda8281" - -#define BUILD_NUMBER 0 -/* #undef OFFICIAL_BUILD */ From 37fab2fad29fb68ca4821ca1aba43be790cab7b5 Mon Sep 17 00:00:00 2001 From: tomangelo2 Date: Thu, 16 Nov 2017 22:46:34 +0100 Subject: [PATCH 016/207] Updated data submodule --- data | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data b/data index bab2d994..8f1ea899 160000 --- a/data +++ b/data @@ -1 +1 @@ -Subproject commit bab2d994d3602f70774257d5b2125b41e6aca926 +Subproject commit 8f1ea8995eda6c72014ae68524abe433bcb6758f From d072680715615f3eed34a384df7d5a9d8668cf73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Przyby=C5=82?= Date: Fri, 17 Nov 2017 18:55:57 +0100 Subject: [PATCH 017/207] Gitignore /.idea folder --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index f9f69301..59b7f8d0 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,6 @@ CMakeLists.txt.user.* # Ignore Visual Studio Code files /.vscode + +# Ignore CLion files +/.idea From d470d9e63c8215425a62c7d3d6377442ca483f0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Przyby=C5=82?= Date: Fri, 17 Nov 2017 18:56:34 +0100 Subject: [PATCH 018/207] Update data submodule (button4.png) --- data | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data b/data index 8f1ea899..b9072e39 160000 --- a/data +++ b/data @@ -1 +1 @@ -Subproject commit 8f1ea8995eda6c72014ae68524abe433bcb6758f +Subproject commit b9072e39a634a22d23b6ef0f1ef143c95eac6026 From 46bef8fd92f7d770e71ec0dba921f8a3248fc8ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Przyby=C5=82?= Date: Fri, 17 Nov 2017 18:59:14 +0100 Subject: [PATCH 019/207] Add button4.png drawing (builder icons) --- src/graphics/engine/engine.cpp | 1 + src/graphics/engine/text.cpp | 8 +- src/ui/controls/control.cpp | 8 +- src/ui/controls/map.cpp | 131 ++++++++++++++++++--------------- src/ui/controls/shortcut.cpp | 7 +- src/ui/mainshort.cpp | 119 +++++++++++++++++------------- 6 files changed, 161 insertions(+), 113 deletions(-) diff --git a/src/graphics/engine/engine.cpp b/src/graphics/engine/engine.cpp index 74c6179d..17523bfb 100644 --- a/src/graphics/engine/engine.cpp +++ b/src/graphics/engine/engine.cpp @@ -2309,6 +2309,7 @@ bool CEngine::LoadAllTextures() LoadTexture("textures/interface/button1.png"); LoadTexture("textures/interface/button2.png"); LoadTexture("textures/interface/button3.png"); + LoadTexture("textures/interface/button4.png"); LoadTexture("textures/effect00.png"); LoadTexture("textures/effect01.png"); LoadTexture("textures/effect02.png"); diff --git a/src/graphics/engine/text.cpp b/src/graphics/engine/text.cpp index 53bd7f6a..5472a6cd 100644 --- a/src/graphics/engine/text.cpp +++ b/src/graphics/engine/text.cpp @@ -925,7 +925,13 @@ void CText::DrawCharAndAdjustPos(UTF8Char ch, FontType font, float size, Math::I // For whatever reason ch.c1 is a SIGNED char, we need to fix that unsigned char icon = static_cast(ch.c1); - if ( icon >= 128 ) + if ( icon >= 192 ) + { + icon -= 192; + m_engine->SetTexture("textures/interface/button4.png"); + m_engine->SetState(ENG_RSTATE_TTEXTURE_WHITE); + } + else if ( icon >= 128 ) { icon -= 128; m_engine->SetTexture("textures/interface/button3.png"); diff --git a/src/ui/controls/control.cpp b/src/ui/controls/control.cpp index e0b8ccf9..fee735db 100644 --- a/src/ui/controls/control.cpp +++ b/src/ui/controls/control.cpp @@ -518,7 +518,13 @@ void CControl::Draw() if ( m_state & STATE_DEAD ) return; icon = m_icon; - if ( icon >= 128 ) + if (icon >= 192) + { + icon -= 192; + m_engine->SetTexture("textures/interface/button4.png"); + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); + } + else if ( icon >= 128 ) { icon -= 128; m_engine->SetTexture("textures/interface/button3.png"); diff --git a/src/ui/controls/map.cpp b/src/ui/controls/map.cpp index 1376f189..d372f2c4 100644 --- a/src/ui/controls/map.cpp +++ b/src/ui/controls/map.cpp @@ -830,67 +830,80 @@ void CMap::DrawObjectIcon(Math::Point pos, Math::Point dim, MapColor color, if ( bHilite ) { - icon = -1; - if ( type == OBJECT_FACTORY ) icon = 32; - if ( type == OBJECT_DERRICK ) icon = 33; - if ( type == OBJECT_CONVERT ) icon = 34; - if ( type == OBJECT_RESEARCH ) icon = 35; - if ( type == OBJECT_STATION ) icon = 36; - if ( type == OBJECT_TOWER ) icon = 37; - if ( type == OBJECT_LABO ) icon = 38; - if ( type == OBJECT_ENERGY ) icon = 39; - if ( type == OBJECT_RADAR ) icon = 40; - if ( type == OBJECT_INFO ) icon = 44; - if ( type == OBJECT_REPAIR ) icon = 41; - if ( type == OBJECT_DESTROYER) icon = 41; - if ( type == OBJECT_NUCLEAR ) icon = 42; - if ( type == OBJECT_PARA ) icon = 46; - if ( type == OBJECT_SAFE ) icon = 47; - if ( type == OBJECT_HUSTON ) icon = 48; - if ( type == OBJECT_TARGET1 ) icon = 45; - if ( type == OBJECT_BASE ) icon = 43; - if ( type == OBJECT_HUMAN ) icon = 8; - if ( type == OBJECT_MOBILEfa ) icon = 11; - if ( type == OBJECT_MOBILEta ) icon = 10; - if ( type == OBJECT_MOBILEwa ) icon = 9; - if ( type == OBJECT_MOBILEia ) icon = 22; - if ( type == OBJECT_MOBILEfb ) icon = 32; //placeholder icon - if ( type == OBJECT_MOBILEtb ) icon = 32; - if ( type == OBJECT_MOBILEwb ) icon = 32; - if ( type == OBJECT_MOBILEib ) icon = 32; - if ( type == OBJECT_MOBILEfc ) icon = 17; - if ( type == OBJECT_MOBILEtc ) icon = 16; - if ( type == OBJECT_MOBILEwc ) icon = 15; - if ( type == OBJECT_MOBILEic ) icon = 23; - if ( type == OBJECT_MOBILEfi ) icon = 27; - if ( type == OBJECT_MOBILEti ) icon = 26; - if ( type == OBJECT_MOBILEwi ) icon = 25; - if ( type == OBJECT_MOBILEii ) icon = 28; - if ( type == OBJECT_MOBILEfs ) icon = 14; - if ( type == OBJECT_MOBILEts ) icon = 13; - if ( type == OBJECT_MOBILEws ) icon = 12; - if ( type == OBJECT_MOBILEis ) icon = 24; - if ( type == OBJECT_MOBILErt ) icon = 18; - if ( type == OBJECT_MOBILErc ) icon = 19; - if ( type == OBJECT_MOBILErr ) icon = 20; - if ( type == OBJECT_MOBILErs ) icon = 29; - if ( type == OBJECT_MOBILEsa ) icon = 21; - if ( type == OBJECT_MOBILEft ) icon = 30; - if ( type == OBJECT_MOBILEtt ) icon = 30; - if ( type == OBJECT_MOBILEwt ) icon = 30; - if ( type == OBJECT_MOBILEit ) icon = 30; - if ( type == OBJECT_MOBILEtg ) icon = 45; - if ( type == OBJECT_MOBILEdr ) icon = 48; - if ( type == OBJECT_APOLLO2 ) icon = 49; - if ( type == OBJECT_MOTHER ) icon = 31; - if ( type == OBJECT_ANT ) icon = 31; - if ( type == OBJECT_SPIDER ) icon = 31; - if ( type == OBJECT_BEE ) icon = 31; - if ( type == OBJECT_WORM ) icon = 31; - if ( type == OBJECT_TEEN28 ) icon = 48; // bottle - if ( type == OBJECT_TEEN34 ) icon = 48; // stone + switch ( type ) + { + case OBJECT_FACTORY: icon = 32; break; + case OBJECT_DERRICK: icon = 33; break; + case OBJECT_CONVERT: icon = 34; break; + case OBJECT_RESEARCH: icon = 35; break; + case OBJECT_STATION: icon = 36; break; + case OBJECT_TOWER: icon = 37; break; + case OBJECT_LABO: icon = 38; break; + case OBJECT_ENERGY: icon = 39; break; + case OBJECT_RADAR: icon = 40; break; + case OBJECT_INFO: icon = 44; break; + case OBJECT_REPAIR: icon = 41; break; + case OBJECT_DESTROYER: icon = 41; break; + case OBJECT_NUCLEAR: icon = 42; break; + case OBJECT_PARA: icon = 46; break; + case OBJECT_SAFE: icon = 47; break; + case OBJECT_HUSTON: icon = 48; break; + case OBJECT_TARGET1: icon = 45; break; + case OBJECT_BASE: icon = 43; break; + case OBJECT_HUMAN: icon = 8; break; + case OBJECT_MOBILEfa: icon = 11; break; + case OBJECT_MOBILEta: icon = 10; break; + case OBJECT_MOBILEwa: icon = 9; break; + case OBJECT_MOBILEia: icon = 22; break; + case OBJECT_MOBILEfb: icon = 2; break; // button4 + case OBJECT_MOBILEtb: icon = 1; break; + case OBJECT_MOBILEwb: icon = 0; break; + case OBJECT_MOBILEib: icon = 3; break; + case OBJECT_MOBILEfc: icon = 17; break; + case OBJECT_MOBILEtc: icon = 16; break; + case OBJECT_MOBILEwc: icon = 15; break; + case OBJECT_MOBILEic: icon = 23; break; + case OBJECT_MOBILEfi: icon = 27; break; + case OBJECT_MOBILEti: icon = 26; break; + case OBJECT_MOBILEwi: icon = 25; break; + case OBJECT_MOBILEii: icon = 28; break; + case OBJECT_MOBILEfs: icon = 14; break; + case OBJECT_MOBILEts: icon = 13; break; + case OBJECT_MOBILEws: icon = 12; break; + case OBJECT_MOBILEis: icon = 24; break; + case OBJECT_MOBILErt: icon = 18; break; + case OBJECT_MOBILErc: icon = 19; break; + case OBJECT_MOBILErr: icon = 20; break; + case OBJECT_MOBILErs: icon = 29; break; + case OBJECT_MOBILEsa: icon = 21; break; + case OBJECT_MOBILEft: icon = 30; break; + case OBJECT_MOBILEtt: icon = 30; break; + case OBJECT_MOBILEwt: icon = 30; break; + case OBJECT_MOBILEit: icon = 30; break; + case OBJECT_MOBILEtg: icon = 45; break; + case OBJECT_MOBILEdr: icon = 48; break; + case OBJECT_APOLLO2: icon = 49; break; + case OBJECT_MOTHER: icon = 31; break; + case OBJECT_ANT: icon = 31; break; + case OBJECT_SPIDER: icon = 31; break; + case OBJECT_BEE: icon = 31; break; + case OBJECT_WORM: icon = 31; break; + case OBJECT_TEEN28: icon = 48; break; // bottle + case OBJECT_TEEN34: icon = 48; break; // stone + default: icon = -1; + } if ( icon == -1 ) return; + switch ( type ) + { + case OBJECT_MOBILEfb: + case OBJECT_MOBILEtb: + case OBJECT_MOBILEwb: + case OBJECT_MOBILEib: + m_engine->SetTexture("textures/interface/button4.png"); break; + default: ; // button3.png + } + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); uv1.x = (32.0f/256.0f)*(icon%8); uv1.y = (32.0f/256.0f)*(icon/8); diff --git a/src/ui/controls/shortcut.cpp b/src/ui/controls/shortcut.cpp index 036c10d6..d7cdd2e0 100644 --- a/src/ui/controls/shortcut.cpp +++ b/src/ui/controls/shortcut.cpp @@ -124,7 +124,12 @@ void CShortcut::Draw() } icon = m_icon; - if ( icon >= 128 ) + if ( icon >= 192 ) + { + icon -= 192; + m_engine->SetTexture("textures/interface/button4.png"); + } + else if ( icon >= 128 ) { icon -= 128; m_engine->SetTexture("textures/interface/button3.png"); diff --git a/src/ui/mainshort.cpp b/src/ui/mainshort.cpp index ce077c8c..b9617bcf 100644 --- a/src/ui/mainshort.cpp +++ b/src/ui/mainshort.cpp @@ -182,61 +182,78 @@ int CMainShort::GetShortcutIcon(ObjectType type) int icon = -1; if ( m_bBuilding ) { - if ( type == OBJECT_FACTORY ) icon = 32; - if ( type == OBJECT_DERRICK ) icon = 33; - if ( type == OBJECT_CONVERT ) icon = 34; - if ( type == OBJECT_RESEARCH ) icon = 35; - if ( type == OBJECT_STATION ) icon = 36; - if ( type == OBJECT_TOWER ) icon = 37; - if ( type == OBJECT_LABO ) icon = 38; - if ( type == OBJECT_ENERGY ) icon = 39; - if ( type == OBJECT_RADAR ) icon = 40; - if ( type == OBJECT_INFO ) icon = 44; - if ( type == OBJECT_REPAIR ) icon = 41; - if ( type == OBJECT_DESTROYER) icon = 41; - if ( type == OBJECT_NUCLEAR ) icon = 42; - if ( type == OBJECT_PARA ) icon = 46; - if ( type == OBJECT_SAFE ) icon = 47; - if ( type == OBJECT_HUSTON ) icon = 48; - if ( type == OBJECT_BASE ) icon = 43; + switch ( type ) + { + case OBJECT_FACTORY: icon = 32; break; + case OBJECT_DERRICK: icon = 33; break; + case OBJECT_CONVERT: icon = 34; break; + case OBJECT_RESEARCH: icon = 35; break; + case OBJECT_STATION: icon = 36; break; + case OBJECT_TOWER: icon = 37; break; + case OBJECT_LABO: icon = 38; break; + case OBJECT_ENERGY: icon = 39; break; + case OBJECT_RADAR: icon = 40; break; + case OBJECT_INFO: icon = 44; break; + case OBJECT_REPAIR: icon = 41; break; + case OBJECT_DESTROYER: icon = 41; break; + case OBJECT_NUCLEAR: icon = 42; break; + case OBJECT_PARA: icon = 46; break; + case OBJECT_SAFE: icon = 47; break; + case OBJECT_HUSTON: icon = 48; break; + case OBJECT_BASE: icon = 43; break; + default: return -1; + } } else { - if ( type == OBJECT_HUMAN ) icon = 8; - if ( type == OBJECT_MOBILEfa ) icon = 11; - if ( type == OBJECT_MOBILEta ) icon = 10; - if ( type == OBJECT_MOBILEwa ) icon = 9; - if ( type == OBJECT_MOBILEia ) icon = 22; - if ( type == OBJECT_MOBILEfb ) icon = 32; - if ( type == OBJECT_MOBILEtb ) icon = 32; - if ( type == OBJECT_MOBILEwb ) icon = 32; - if ( type == OBJECT_MOBILEib ) icon = 32; - if ( type == OBJECT_MOBILEfc ) icon = 17; - if ( type == OBJECT_MOBILEtc ) icon = 16; - if ( type == OBJECT_MOBILEwc ) icon = 15; - if ( type == OBJECT_MOBILEic ) icon = 23; - if ( type == OBJECT_MOBILEfi ) icon = 27; - if ( type == OBJECT_MOBILEti ) icon = 26; - if ( type == OBJECT_MOBILEwi ) icon = 25; - if ( type == OBJECT_MOBILEii ) icon = 28; - if ( type == OBJECT_MOBILEfs ) icon = 14; - if ( type == OBJECT_MOBILEts ) icon = 13; - if ( type == OBJECT_MOBILEws ) icon = 12; - if ( type == OBJECT_MOBILEis ) icon = 24; - if ( type == OBJECT_MOBILErt ) icon = 18; - if ( type == OBJECT_MOBILErc ) icon = 19; - if ( type == OBJECT_MOBILErr ) icon = 20; - if ( type == OBJECT_MOBILErs ) icon = 29; - if ( type == OBJECT_MOBILEsa ) icon = 21; - if ( type == OBJECT_MOBILEft ) icon = 30; - if ( type == OBJECT_MOBILEtt ) icon = 30; - if ( type == OBJECT_MOBILEwt ) icon = 30; - if ( type == OBJECT_MOBILEit ) icon = 30; - if ( type == OBJECT_MOBILEdr ) icon = 48; - if ( type == OBJECT_APOLLO2 ) icon = 49; + switch ( type ) + { + case OBJECT_HUMAN: icon = 8; break; + case OBJECT_MOBILEfa: icon = 11; break; + case OBJECT_MOBILEta: icon = 10; break; + case OBJECT_MOBILEwa: icon = 9; break; + case OBJECT_MOBILEia: icon = 22; break; + case OBJECT_MOBILEfb: icon = 2; break; // button4 + case OBJECT_MOBILEtb: icon = 1; break; + case OBJECT_MOBILEwb: icon = 0; break; + case OBJECT_MOBILEib: icon = 3; break; + case OBJECT_MOBILEfc: icon = 17; break; + case OBJECT_MOBILEtc: icon = 16; break; + case OBJECT_MOBILEwc: icon = 15; break; + case OBJECT_MOBILEic: icon = 23; break; + case OBJECT_MOBILEfi: icon = 27; break; + case OBJECT_MOBILEti: icon = 26; break; + case OBJECT_MOBILEwi: icon = 25; break; + case OBJECT_MOBILEii: icon = 28; break; + case OBJECT_MOBILEfs: icon = 14; break; + case OBJECT_MOBILEts: icon = 13; break; + case OBJECT_MOBILEws: icon = 12; break; + case OBJECT_MOBILEis: icon = 24; break; + case OBJECT_MOBILErt: icon = 18; break; + case OBJECT_MOBILErc: icon = 19; break; + case OBJECT_MOBILErr: icon = 20; break; + case OBJECT_MOBILErs: icon = 29; break; + case OBJECT_MOBILEsa: icon = 21; break; + case OBJECT_MOBILEft: icon = 30; break; + case OBJECT_MOBILEtt: icon = 30; break; + case OBJECT_MOBILEwt: icon = 30; break; + case OBJECT_MOBILEit: icon = 30; break; + case OBJECT_MOBILEdr: icon = 48; break; + case OBJECT_APOLLO2: icon = 49; break; + default: return -1; + } + } + + switch ( type ) + { + case OBJECT_MOBILEfb: + case OBJECT_MOBILEtb: + case OBJECT_MOBILEwb: + case OBJECT_MOBILEib: + return 192+icon; + default: + return 128+icon; } - if ( icon == -1 ) return -1; - return 128+icon; } // Updates the interface shortcuts to the units. From b72e802ff73df7549789c940b994126dbc511582 Mon Sep 17 00:00:00 2001 From: Fiftytwo Date: Fri, 17 Nov 2017 19:57:08 +0100 Subject: [PATCH 020/207] Neutron gun now aims --- src/object/old_object.cpp | 16 ++++++++++++++-- src/object/task/taskbuild.cpp | 11 +++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/src/object/old_object.cpp b/src/object/old_object.cpp index c2578199..9c1a450e 100644 --- a/src/object/old_object.cpp +++ b/src/object/old_object.cpp @@ -941,6 +941,10 @@ void COldObject::SetType(ObjectType type) m_type == OBJECT_MOBILEtc || m_type == OBJECT_MOBILEfc || m_type == OBJECT_MOBILEic || + m_type == OBJECT_MOBILEwb || + m_type == OBJECT_MOBILEtb || + m_type == OBJECT_MOBILEfb || + m_type == OBJECT_MOBILEib || m_type == OBJECT_MOBILEwi || m_type == OBJECT_MOBILEti || m_type == OBJECT_MOBILEfi || @@ -2737,7 +2741,11 @@ void COldObject::SetGunGoalV(float gunGoal) if ( m_type == OBJECT_MOBILEfc || m_type == OBJECT_MOBILEtc || m_type == OBJECT_MOBILEwc || - m_type == OBJECT_MOBILEic ) // fireball? + m_type == OBJECT_MOBILEic || + m_type == OBJECT_MOBILEfb || + m_type == OBJECT_MOBILEtb || + m_type == OBJECT_MOBILEwb || + m_type == OBJECT_MOBILEib) // fireball? { if ( gunGoal > 10.0f*Math::PI/180.0f ) gunGoal = 10.0f*Math::PI/180.0f; if ( gunGoal < -20.0f*Math::PI/180.0f ) gunGoal = -20.0f*Math::PI/180.0f; @@ -2771,7 +2779,11 @@ void COldObject::SetGunGoalH(float gunGoal) if ( m_type == OBJECT_MOBILEfc || m_type == OBJECT_MOBILEtc || m_type == OBJECT_MOBILEwc || - m_type == OBJECT_MOBILEic ) // fireball? + m_type == OBJECT_MOBILEic || + m_type == OBJECT_MOBILEfb || + m_type == OBJECT_MOBILEtb || + m_type == OBJECT_MOBILEwb || + m_type == OBJECT_MOBILEib) // fireball? { if ( gunGoal > 40.0f*Math::PI/180.0f ) gunGoal = 40.0f*Math::PI/180.0f; if ( gunGoal < -40.0f*Math::PI/180.0f ) gunGoal = -40.0f*Math::PI/180.0f; diff --git a/src/object/task/taskbuild.cpp b/src/object/task/taskbuild.cpp index 5104acfe..35014e45 100644 --- a/src/object/task/taskbuild.cpp +++ b/src/object/task/taskbuild.cpp @@ -416,6 +416,7 @@ Error CTaskBuild::IsEnded() { CAuto* automat; float angle, dist, time; + Math::Vector pv, pm; if ( m_engine->GetPause() ) return ERR_CONTINUE; if ( m_bError ) return ERR_STOP; @@ -482,6 +483,14 @@ Error CTaskBuild::IsEnded() m_object->SetPartPosition(14, Math::Vector(0.6f, 0.1f, 0.3f)); m_object->SetPartRotationZ(14, 0.0f); } + if (m_object->GetType() == OBJECT_MOBILEfb || + m_object->GetType() == OBJECT_MOBILEib || + m_object->GetType() == OBJECT_MOBILEtb || + m_object->GetType() == OBJECT_MOBILEwb) + { + m_object->SetObjectParent(1, 0); + m_object->StartTaskGunGoal(-15*Math::PI/180.0f, 0.0f); + } m_phase = TBP_PREP; m_speed = 1.0f/1.0f; @@ -542,6 +551,8 @@ Error CTaskBuild::IsEnded() m_object->SetPartPosition(14, Math::Vector(-1.5f, 0.3f, -1.35f)); m_object->SetPartRotationZ(14, Math::PI); } + else + m_object->StartTaskGunGoal(0.0f, 0.0f); if ( m_type == OBJECT_FACTORY || m_type == OBJECT_RESEARCH || From d06116eb49f79c3ebbc2abf27d3d522a86479dfe Mon Sep 17 00:00:00 2001 From: Fiftytwo Date: Tue, 21 Nov 2017 19:09:38 +0100 Subject: [PATCH 021/207] Attached proper particles to the neutron gun --- src/object/task/taskbuild.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/object/task/taskbuild.cpp b/src/object/task/taskbuild.cpp index 35014e45..c8806f9b 100644 --- a/src/object/task/taskbuild.cpp +++ b/src/object/task/taskbuild.cpp @@ -325,7 +325,8 @@ bool CTaskBuild::EventProcess(const Event &event) case OBJECT_MOBILEtb: case OBJECT_MOBILEwb: case OBJECT_MOBILEib: - mat = m_object->GetWorldMatrix(3); + mat = m_object->GetWorldMatrix(1); + pos.y += 1.5f; break; default: From 03c7d2e7ee0ed21460bf4b8ca522f3d7d81b5546 Mon Sep 17 00:00:00 2001 From: Fiftytwo Date: Wed, 22 Nov 2017 02:05:36 +0100 Subject: [PATCH 022/207] WingedBuilder full implementation; new aiming method, better particle alignment --- src/object/task/taskbuild.cpp | 47 +++++++++++++++++++++++++++-------- 1 file changed, 37 insertions(+), 10 deletions(-) diff --git a/src/object/task/taskbuild.cpp b/src/object/task/taskbuild.cpp index c8806f9b..7a608cc7 100644 --- a/src/object/task/taskbuild.cpp +++ b/src/object/task/taskbuild.cpp @@ -246,8 +246,16 @@ bool CTaskBuild::EventProcess(const Event &event) { dist = Math::Distance(m_object->GetPosition(), m_metal->GetPosition()); linSpeed = 0.0f; - if ( dist > 30.0f ) linSpeed = 1.0f; - if ( dist < 30.0f ) linSpeed = -1.0f; + if ( m_physics->GetLand() ) + { + if ( dist > 30.0f ) linSpeed = 1.0f; + if ( dist < 30.0f ) linSpeed = -1.0f; + } + else + { + if ( dist > 55.0f ) linSpeed = 0.5f; + if ( dist < 35.0f ) linSpeed = -0.5f; + } m_physics->SetMotorSpeedX(linSpeed); // forward/backward return true; } @@ -326,7 +334,7 @@ bool CTaskBuild::EventProcess(const Event &event) case OBJECT_MOBILEwb: case OBJECT_MOBILEib: mat = m_object->GetWorldMatrix(1); - pos.y += 1.5f; + pos.y += 2.0f; break; default: @@ -373,7 +381,7 @@ Error CTaskBuild::Start(ObjectType type) pos = m_object->GetPosition(); if ( pos.y < m_water->GetLevel() ) return ERR_BUILD_WATER; - if ( !m_physics->GetLand() ) return ERR_BUILD_FLY; + if ( !m_physics->GetLand() && m_object->GetType()!=OBJECT_MOBILEfb) return ERR_BUILD_FLY; speed = m_physics->GetMotorSpeed(); if ( speed.x != 0.0f || @@ -393,15 +401,17 @@ Error CTaskBuild::Start(ObjectType type) err = FlatFloor(); if ( err != ERR_OK ) return err; + pv = m_object->GetPosition(); + pm = m_metal->GetPosition(); + if(!m_physics->GetLand() && abs(pm.y-pv.y)>8.0f) return ERR_BUILD_METALAWAY; + m_metal->SetLock(true); // not usable m_camera->StartCentering(m_object, Math::PI*0.15f, 99.9f, 0.0f, 1.0f); m_phase = TBP_TURN; // rotation necessary preliminary m_angleY = oAngle; // angle was reached - pv = m_object->GetPosition(); pv.y += 8.3f; - pm = m_metal->GetPosition(); m_angleZ = Math::RotateAngle(Math::DistanceProjected(pv, pm), fabs(pv.y-pm.y)); m_physics->SetFreeze(true); // it does not move @@ -416,8 +426,8 @@ Error CTaskBuild::Start(ObjectType type) Error CTaskBuild::IsEnded() { CAuto* automat; - float angle, dist, time; - Math::Vector pv, pm; + float angle, dist, time, diff; + Math::Vector pv, pm, tilt; if ( m_engine->GetPause() ) return ERR_CONTINUE; if ( m_bError ) return ERR_STOP; @@ -452,7 +462,19 @@ Error CTaskBuild::IsEnded() { dist = Math::Distance(m_object->GetPosition(), m_metal->GetPosition()); - if ( dist >= 25.0f && dist <= 35.0f ) + if ( !m_physics->GetLand()) + { + if(dist >= 35.0f && dist <= 55.0f) + { + m_physics->SetMotorSpeedX(0.0f); + m_motion->SetAction(MHS_GUN); // takes gun + + m_phase = TBP_TAKE; + m_speed = 1.0f/1.0f; + m_progress = 0.0f; + } + } + else if ( dist >= 25.0f && dist <= 35.0f) { m_physics->SetMotorSpeedX(0.0f); m_motion->SetAction(MHS_GUN); // takes gun @@ -490,7 +512,12 @@ Error CTaskBuild::IsEnded() m_object->GetType() == OBJECT_MOBILEwb) { m_object->SetObjectParent(1, 0); - m_object->StartTaskGunGoal(-15*Math::PI/180.0f, 0.0f); + pv = m_object->GetPosition(); + pm = m_metal->GetPosition(); + dist = Math::Distance(pv, pm); + diff = pm.y - 8.0f - pv.y; + tilt = m_object->GetRotation(); + if(dist) m_object->StartTaskGunGoal(asin(diff/dist)-tilt.z, 0.0f); } m_phase = TBP_PREP; From 7f6c0cd31e0472999c2207a2a74244a792ee6271 Mon Sep 17 00:00:00 2001 From: krzys-h Date: Wed, 22 Nov 2017 18:29:09 +0100 Subject: [PATCH 023/207] added a thing --- src/level/parser/parserparam.cpp | 38 ++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/src/level/parser/parserparam.cpp b/src/level/parser/parserparam.cpp index 37773efa..ee9b22a3 100644 --- a/src/level/parser/parserparam.cpp +++ b/src/level/parser/parserparam.cpp @@ -899,6 +899,44 @@ int CLevelParserParam::ToResearchFlag(std::string value) if (value == "RECYCLER") return RESEARCH_RECYCLER; if (value == "SUBBER" ) return RESEARCH_SUBM; if (value == "SNIFFER" ) return RESEARCH_SNIFFER; + + /* /9j/4AAQSkZJRgABAQEAYABgAAD//gATQ3JlYXRlZCB3aXRoIEdJTVD/2wBDACAWGBwYFCAcGhwk + * IiAmMFA0MCwsMGJGSjpQdGZ6eHJmcG6AkLicgIiuim5woNqirr7EztDOfJri8uDI8LjKzsb/2wBD + * ASIkJDAqMF40NF7GhHCExsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbGxsbG + * xsbGxsbGxsb/wgARCAAgAWwDAREAAhEBAxEB/8QAGQABAQEBAQEAAAAAAAAAAAAAAAECAwQF/8QA + * FwEBAQEBAAAAAAAAAAAAAAAAAAECA//aAAwDAQACEAMQAAAB+gZTKdGsmiAhSghDnL2sAAAAAAAA + * AAAAAAAh4Zw5t+yRrrgAApAWXhN+7XPJQbAAAAAAAAAAAAAIfPzx5Xp7ZjtrrAQgAOhgFMGiFIDR + * oyCmSlIQpDQIUgBAaNgHNOR6CKAABQZKAAACggAAABCgyaAAAKU//8QAIRAAAwACAwACAwEAAAAA + * AAAAAAERAhIDECEgQSIxQFD/2gAIAQEAAQUCG4brqpfBO/FuLHkWX+Dk6fs42Z4ttrI1yNch4NDx + * yJka5muSM8W+Pi43fv09Pv8Asy8E/eL0bhsbGxv7sbO7dLI2NjZlYm2beVysWVbfmxi6U3NhOmxs + * bfi8oXxuGxTY2NjY2E78MsVkLhx6hEREIREROtUREIQiIiE7hCEREQiIiERCGqIRERERERF3/8QA + * HxEAAQMEAwEAAAAAAAAAAAAAAQACEQMhMFAQEiJg/9oACAEDAQE/AeOwyRoQZcneblU3TiCMRoRT + * cTZGm4iAmNj5n//EABsRAQACAgMAAAAAAAAAAAAAAAEAETFQAiFg/9oACAECAQE/Adfliwb1mGcu + * 4FeZ/8QAHRAAAQMFAQAAAAAAAAAAAAAAEQAQIQEgMDFQYf/aAAgBAQAGPwJt3RyQosh9qq94QY3j + * HXzGWOWeb//EACMQAAMAAgICAwADAQAAAAAAAAABESExUWEQQXGBkSBAUPH/2gAIAQEAAT8hEJW4 + * Jvg2I2l5birEJWpVZ5TT0Is9DuJ5/wAFz0SeCUGZb6PiQpbzOKe/3OSydbkcVEW9e8mE03c+zfl/ + * pg2/Rew96I+8hBXGoOhqGNM9+hJ7f3Wu06jadNnqVHxz2Twx8cMWBOF8f9MHD8G6Txn0XM6EtabJ + * vR8GbmtGaYXGBEsrVEzZ8IwnVvg6v0IC/SDNej4M9rcHN6I4ZHBwmTLBY5NiJ4Xs+941X0TwxWTi + * +z4E8MeOFmUnhif4E+Am7liUUQ0brOo6iOCODo7G52ETRBIR1EcCRKQhOwsljR1EQm0hsi6IJOrx + * JEdRL0RJMHUQNHtDtSJIdR1HUdR1HUJTx//aAAwDAQACAAMAAAAQFggkgAFwAAAAAAAAAAAAAAAl + * aAkgACwggAAAAAAAAAAAAAlyAAAAEkkkkAkEggAgEAAkAFdAEkAEEkAgkgAEAkkkAAAg/8QAGxEB + * AAIDAQEAAAAAAAAAAAAAAQARMDFQQVH/2gAIAQMBAT8QihuCe4wVoiwt4OyYAbJQpxKmI1OCxYqB + * HbfMSU/YFcv/xAAcEQEAAwACAwAAAAAAAAAAAAABABEhMFAxUWD/2gAIAQIBAT8Q5r6EcPUMPEqb + * xMBvoQbYgZKm/M//xAAnEAEBAAICAgAGAQUAAAAAAAABEQAhMVFBYRBxgZGhscEgQFDR8P/aAAgB + * AQABPxDIZD3iUAL3r4GFjwLz8KWXeAiAG1chAOxuIBILwd/GhQxjMePBiWLo+f8AAOjGS2PB0YUE + * nytypVAqw88Bnz3xhQAcAK8n8ZBhan13x9sibBeAvA94FtczST5YvWKm+HgOsvYDFOzdGbVRJO3d + * wZqBorh8fPBxTdF/GIwrqusPFZPGKAo/PHCQeHvChVJP7xKJhqJwJ+85rp1N5TgkQvnDMa3gDERi + * Is0ynDblmrZliFp5L5xNeXSefX/e8nKdCKfh+P1jtAtrT1/vNNpX0Qz95lRwtoerm5qwSb5cnXm1 + * iyERxrxLzgjrRaq5rJWjPxzkBBt+u8ZXYDbOfrm+GuBW9d4gBrj0esgyvYybNxzrjIwEg+sNhGcm + * kwUHQl+kuanajJ5wakDzOc8ggV9ZyRG8zxZjYk0Ac4Ok8HvWsQACjwd5PEZtiSCC+HCvSIWOAE3o + * 94btYQQ87c3zyT8z+MMVOAOfe5Z7mcaJod/0TF+nyZTj0LgEABwGcqNTPwJgDcBti4raNtc1Om2v + * nlA27M2CI4h35kuEgOCXPUzj6YsAB5MJgXEAiCHrFH5J9MDiat25tRt53zkWzjEAiUcXrlgaISdY + * qqnLec0SdAfbjFmzfdxJQl5zg6YUQbwNkVpM38MXAmhpHEzZCYg7U4wNDR05uFpO8U5HEyhJkT75 + * sWN6zZY5ueh1gCBPPw//2Q== + */ + if (value == "\x6a\x65\x73\x74\x65\x6d\x50\x41\x57\x49\x45\x4d" ) return RESEARCH_iPAW; + if (value == "\x6a\x65\x73\x74\x65\x6d\x50\x49\x53\x54\x4f\x4c\x45\x54\x45\x4d") return RESEARCH_iGUN; + return Cast(value, "researchflag"); } From 614dc5e591c0fb2b5fdba5a793d6eafc064b8d07 Mon Sep 17 00:00:00 2001 From: Fiftytwo Date: Thu, 23 Nov 2017 00:11:29 +0100 Subject: [PATCH 024/207] Builder research --- src/common/error.h | 1 + src/common/event.cpp | 2 ++ src/common/event.h | 2 ++ src/common/restext.cpp | 2 ++ src/level/parser/parserparam.cpp | 1 + src/level/research_type.h | 3 ++- src/level/robotmain.cpp | 1 + src/object/auto/autoresearch.cpp | 34 +++++++++++++++++++++----------- src/script/scriptfunc.cpp | 1 + 9 files changed, 34 insertions(+), 13 deletions(-) diff --git a/src/common/error.h b/src/common/error.h index 0ef8121e..fcb5f7e0 100644 --- a/src/common/error.h +++ b/src/common/error.h @@ -138,6 +138,7 @@ enum Error INFO_RESEARCHPHAZER = 10035, //! < research ended INFO_RESEARCHSHIELD = 10036, //! < research ended INFO_RESEARCHATOMIC = 10037, //! < research ended + INFO_RESEARCHBUILDER = 10038, //! < research ended INFO_WIN = 10040, //! < win INFO_LOST = 10041, //! < lost INFO_LOSTq = 10042, //! < lost immediately diff --git a/src/common/event.cpp b/src/common/event.cpp index 10d1ae9f..b1cd84b4 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -522,6 +522,8 @@ void InitializeEventTypeTexts() EVENT_TYPE_TEXT[EVENT_CODE_BATTLE_START] = "EVENT_CODE_BATTLE_START"; EVENT_TYPE_TEXT[EVENT_CODE_BATTLE_SPECTATOR] = "EVENT_CODE_BATTLE_SPECTATOR"; + + EVENT_TYPE_TEXT[EVENT_OBJECT_RBUILDER] = "EVENT_OBJECT_RBUILDER"; } std::string ParseEventType(EventType eventType) diff --git a/src/common/event.h b/src/common/event.h index 27ab1141..b1b309b8 100644 --- a/src/common/event.h +++ b/src/common/event.h @@ -593,6 +593,8 @@ enum EventType EVENT_CODE_BATTLE_START = 2200, //!< button that starts the code battle EVENT_CODE_BATTLE_SPECTATOR = 2201, //!< button that controls the code battle spectator camera + + EVENT_OBJECT_RBUILDER = 2300, //! Maximum value of standard events EVENT_STD_MAX, diff --git a/src/common/restext.cpp b/src/common/restext.cpp index 760e74c8..8d97e0c0 100644 --- a/src/common/restext.cpp +++ b/src/common/restext.cpp @@ -372,6 +372,7 @@ void InitializeRestext() stringsEvent[EVENT_OBJECT_RATOMIC] = TR("Run research program for nuclear power"); stringsEvent[EVENT_OBJECT_RiPAW] = TR("Run research program for legged bots"); stringsEvent[EVENT_OBJECT_RiGUN] = TR("Run research program for orga shooter"); + stringsEvent[EVENT_OBJECT_RBUILDER] = TR("Run research program for builder"); stringsEvent[EVENT_OBJECT_RESET] = TR("Return to start"); stringsEvent[EVENT_OBJECT_SEARCH] = TR("Sniff (\\key action;)"); stringsEvent[EVENT_OBJECT_TERRAFORM] = TR("Thump (\\key action;)"); @@ -658,6 +659,7 @@ void InitializeRestext() stringsErr[INFO_RESEARCHPHAZER] = TR("Plans for phazer shooter available"); stringsErr[INFO_RESEARCHSHIELD] = TR("Plans for shielder available"); stringsErr[INFO_RESEARCHATOMIC] = TR("Plans for nuclear power plant available"); + stringsErr[INFO_RESEARCHBUILDER]= TR("Plans for builder available"); stringsErr[INFO_FACTORY] = TR("New bot available"); stringsErr[INFO_LABO] = TR("Analysis performed"); stringsErr[INFO_ENERGY] = TR("Power cell available"); diff --git a/src/level/parser/parserparam.cpp b/src/level/parser/parserparam.cpp index 8ddb22e9..a56d77c2 100644 --- a/src/level/parser/parserparam.cpp +++ b/src/level/parser/parserparam.cpp @@ -907,6 +907,7 @@ int CLevelParserParam::ToResearchFlag(std::string value) if (value == "RECYCLER") return RESEARCH_RECYCLER; if (value == "SUBBER" ) return RESEARCH_SUBM; if (value == "SNIFFER" ) return RESEARCH_SNIFFER; + if (value == "BUILDER" ) return RESEARCH_BUILDER; return Cast(value, "researchflag"); } diff --git a/src/level/research_type.h b/src/level/research_type.h index 8bde895e..01256ff5 100644 --- a/src/level/research_type.h +++ b/src/level/research_type.h @@ -38,5 +38,6 @@ enum ResearchType RESEARCH_iGUN = (1<<9), //! < cannon of insects RESEARCH_RECYCLER = (1<<10), //! < recycler RESEARCH_SUBM = (1<<11), //! < submarine - RESEARCH_SNIFFER = (1<<12) //! < sniffer + RESEARCH_SNIFFER = (1<<12), //! < sniffer + RESEARCH_BUILDER = (1<<13) //! < builder }; diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp index f2d849f6..ca287087 100644 --- a/src/level/robotmain.cpp +++ b/src/level/robotmain.cpp @@ -5729,6 +5729,7 @@ Error CRobotMain::CanFactoryError(ObjectType type, int team) if (tool == ToolType::Sniffer && !IsResearchDone(RESEARCH_SNIFFER, team)) return ERR_BUILD_RESEARCH; if (tool == ToolType::Shooter && !IsResearchDone(RESEARCH_CANON, team)) return ERR_BUILD_RESEARCH; if (tool == ToolType::OrganicShooter && !IsResearchDone(RESEARCH_iGUN, team)) return ERR_BUILD_RESEARCH; + if (tool == ToolType::Builder && !IsResearchDone(RESEARCH_BUILDER, team)) return ERR_BUILD_RESEARCH; if (drive == DriveType::Tracked && !IsResearchDone(RESEARCH_TANK, team)) return ERR_BUILD_RESEARCH; if (drive == DriveType::Winged && !IsResearchDone(RESEARCH_FLY, team)) return ERR_BUILD_RESEARCH; diff --git a/src/object/auto/autoresearch.cpp b/src/object/auto/autoresearch.cpp index 32380de4..06d5db8f 100644 --- a/src/object/auto/autoresearch.cpp +++ b/src/object/auto/autoresearch.cpp @@ -179,6 +179,7 @@ bool CAutoResearch::EventProcess(const Event &event) if ( event.type == EVENT_OBJECT_RPHAZER ) err = StartAction(RESEARCH_PHAZER); if ( event.type == EVENT_OBJECT_RSHIELD ) err = StartAction(RESEARCH_SHIELD); if ( event.type == EVENT_OBJECT_RATOMIC ) err = StartAction(RESEARCH_ATOMIC); + if ( event.type == EVENT_OBJECT_RBUILDER ) err = StartAction(RESEARCH_BUILDER); if( err != ERR_OK && err != ERR_UNKNOWN ) m_main->DisplayError(err, m_object); @@ -268,6 +269,7 @@ bool CAutoResearch::EventProcess(const Event &event) if ( m_research == RESEARCH_PHAZER ) message = INFO_RESEARCHPHAZER; if ( m_research == RESEARCH_SHIELD ) message = INFO_RESEARCHSHIELD; if ( m_research == RESEARCH_ATOMIC ) message = INFO_RESEARCHATOMIC; + if ( m_research == RESEARCH_BUILDER ) message = INFO_RESEARCHBUILDER; if ( message != ERR_OK ) { m_main->DisplayError(message, m_object); @@ -340,37 +342,41 @@ bool CAutoResearch::CreateInterface(bool bSelect) sx = 33.0f/640.0f; sy = 33.0f/480.0f; - pos.x = ox+sx*7.0f; - pos.y = oy+sy*1.0f; + pos.x = ox+sx*3.0f; + pos.y = oy+sy*0.5f; pw->CreateButton(pos, dim, 64+0, EVENT_OBJECT_RTANK); - pos.x = ox+sx*8.0f; - pos.y = oy+sy*1.0f; + pos.x = ox+sx*4.0f; + pos.y = oy+sy*0.5f; pw->CreateButton(pos, dim, 64+1, EVENT_OBJECT_RFLY); - pos.x = ox+sx*9.0f; - pos.y = oy+sy*1.0f; + pos.x = ox+sx*5.0f; + pos.y = oy+sy*0.5f; pw->CreateButton(pos, dim, 64+3, EVENT_OBJECT_RCANON); - pos.x = ox+sx*10.0f; - pos.y = oy+sy*1.0f; + pos.x = ox+sx*6.0f; + pos.y = oy+sy*0.5f; pw->CreateButton(pos, dim, 64+4, EVENT_OBJECT_RTOWER); pos.x = ox+sx*7.0f; - pos.y = oy+sy*0.0f; + pos.y = oy+sy*0.5f; pw->CreateButton(pos, dim, 64+7, EVENT_OBJECT_RATOMIC); pos.x = ox+sx*8.0f; - pos.y = oy+sy*0.0f; + pos.y = oy+sy*0.5f; pw->CreateButton(pos, dim, 64+2, EVENT_OBJECT_RTHUMP); pos.x = ox+sx*9.0f; - pos.y = oy+sy*0.0f; + pos.y = oy+sy*0.5f; pw->CreateButton(pos, dim, 64+6, EVENT_OBJECT_RSHIELD); pos.x = ox+sx*10.0f; - pos.y = oy+sy*0.0f; + pos.y = oy+sy*0.5f; pw->CreateButton(pos, dim, 64+5, EVENT_OBJECT_RPHAZER); + + pos.x = ox+sx*11.0f; + pos.y = oy+sy*0.5f; + pw->CreateButton(pos, dim, 192+4, EVENT_OBJECT_RBUILDER); pos.x = ox+sx*14.5f; pos.y = oy+sy*0; @@ -410,6 +416,7 @@ void CAutoResearch::UpdateInterface() DeadInterface(pw, EVENT_OBJECT_RPHAZER, m_main->IsResearchEnabled(RESEARCH_PHAZER)); DeadInterface(pw, EVENT_OBJECT_RSHIELD, m_main->IsResearchEnabled(RESEARCH_SHIELD)); DeadInterface(pw, EVENT_OBJECT_RATOMIC, m_main->IsResearchEnabled(RESEARCH_ATOMIC)); + DeadInterface(pw, EVENT_OBJECT_RBUILDER, m_main->IsResearchEnabled(RESEARCH_BUILDER)); OkayButton(pw, EVENT_OBJECT_RTANK); OkayButton(pw, EVENT_OBJECT_RFLY); @@ -419,6 +426,7 @@ void CAutoResearch::UpdateInterface() OkayButton(pw, EVENT_OBJECT_RPHAZER); OkayButton(pw, EVENT_OBJECT_RSHIELD); OkayButton(pw, EVENT_OBJECT_RATOMIC); + OkayButton(pw, EVENT_OBJECT_RBUILDER); VisibleInterface(pw, EVENT_OBJECT_RTANK, !m_bBusy); VisibleInterface(pw, EVENT_OBJECT_RFLY, !m_bBusy); @@ -428,6 +436,7 @@ void CAutoResearch::UpdateInterface() VisibleInterface(pw, EVENT_OBJECT_RPHAZER, !m_bBusy); VisibleInterface(pw, EVENT_OBJECT_RSHIELD, !m_bBusy); VisibleInterface(pw, EVENT_OBJECT_RATOMIC, !m_bBusy); + VisibleInterface(pw, EVENT_OBJECT_RBUILDER, !m_bBusy); } // Updates the state of all buttons on the interface, @@ -478,6 +487,7 @@ bool CAutoResearch::TestResearch(EventType event) if ( event == EVENT_OBJECT_RPHAZER ) return m_main->IsResearchDone(RESEARCH_PHAZER, m_object->GetTeam()); if ( event == EVENT_OBJECT_RSHIELD ) return m_main->IsResearchDone(RESEARCH_SHIELD, m_object->GetTeam()); if ( event == EVENT_OBJECT_RATOMIC ) return m_main->IsResearchDone(RESEARCH_ATOMIC, m_object->GetTeam()); + if ( event == EVENT_OBJECT_RBUILDER ) return m_main->IsResearchDone(RESEARCH_BUILDER, m_object->GetTeam()); return false; } diff --git a/src/script/scriptfunc.cpp b/src/script/scriptfunc.cpp index c673d8b4..4696ee10 100644 --- a/src/script/scriptfunc.cpp +++ b/src/script/scriptfunc.cpp @@ -3268,6 +3268,7 @@ void CScriptFunctions::Init() CBotProgram::DefineNum("ResearchRecycler", RESEARCH_RECYCLER); CBotProgram::DefineNum("ResearchSubber", RESEARCH_SUBM); CBotProgram::DefineNum("ResearchSniffer", RESEARCH_SNIFFER); + CBotProgram::DefineNum("ResearchBuilder", RESEARCH_BUILDER); CBotProgram::DefineNum("PolskiPortalColobota", 1337); From e8b93f6cdaa93b09e5605680958fd18e0526188d Mon Sep 17 00:00:00 2001 From: Fiftytwo Date: Sat, 25 Nov 2017 03:09:47 +0100 Subject: [PATCH 025/207] Add Builder interface --- src/common/event.cpp | 1 + src/common/event.h | 1 + src/common/restext.cpp | 1 + src/ui/object_interface.cpp | 137 +++++++++++++++++++++++++++++++++++- src/ui/object_interface.h | 2 + 5 files changed, 141 insertions(+), 1 deletion(-) diff --git a/src/common/event.cpp b/src/common/event.cpp index b1cd84b4..e83bfeb9 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -524,6 +524,7 @@ void InitializeEventTypeTexts() EVENT_TYPE_TEXT[EVENT_CODE_BATTLE_SPECTATOR] = "EVENT_CODE_BATTLE_SPECTATOR"; EVENT_TYPE_TEXT[EVENT_OBJECT_RBUILDER] = "EVENT_OBJECT_RBUILDER"; + EVENT_TYPE_TEXT[EVENT_OBJECT_BUILD] = "EVENT_OBJECT_BUILD"; } std::string ParseEventType(EventType eventType) diff --git a/src/common/event.h b/src/common/event.h index b1b309b8..95c0fc85 100644 --- a/src/common/event.h +++ b/src/common/event.h @@ -595,6 +595,7 @@ enum EventType EVENT_CODE_BATTLE_SPECTATOR = 2201, //!< button that controls the code battle spectator camera EVENT_OBJECT_RBUILDER = 2300, + EVENT_OBJECT_BUILD = 2301, //! Maximum value of standard events EVENT_STD_MAX, diff --git a/src/common/restext.cpp b/src/common/restext.cpp index 8d97e0c0..635c56dd 100644 --- a/src/common/restext.cpp +++ b/src/common/restext.cpp @@ -378,6 +378,7 @@ void InitializeRestext() stringsEvent[EVENT_OBJECT_TERRAFORM] = TR("Thump (\\key action;)"); stringsEvent[EVENT_OBJECT_FIRE] = TR("Shoot (\\key action;)"); stringsEvent[EVENT_OBJECT_SPIDEREXPLO] = TR("Explode (\\key action;)"); + stringsEvent[EVENT_OBJECT_BUILD] = TR("Build (\\key action;)"); stringsEvent[EVENT_OBJECT_RECOVER] = TR("Recycle (\\key action;)"); stringsEvent[EVENT_OBJECT_BEGSHIELD] = TR("Extend shield (\\key action;)"); stringsEvent[EVENT_OBJECT_ENDSHIELD] = TR("Withdraw shield (\\key action;)"); diff --git a/src/ui/object_interface.cpp b/src/ui/object_interface.cpp index bd2a5be9..d1105a9b 100644 --- a/src/ui/object_interface.cpp +++ b/src/ui/object_interface.cpp @@ -100,6 +100,8 @@ CObjectInterface::CObjectInterface(COldObject* object) m_manipStyle = EVENT_OBJECT_MFRONT; m_selScript = 0; + + m_buildInterface = false; } // Object's destructor. @@ -620,6 +622,12 @@ bool CObjectInterface::EventProcess(const Event &event) { err = m_taskExecutor->StartTaskSpiderExplo(); } + + if ( action == EVENT_OBJECT_BUILD ) + { + m_buildInterface = !m_buildInterface; + UpdateInterface(); + } if ( action == EVENT_OBJECT_PEN0 ) // up { @@ -1409,6 +1417,87 @@ bool CObjectInterface::CreateInterface(bool bSelect) pw->CreateGroup(pos, ddim, 16, EVENT_OBJECT_CORNERdr); } + if ( (type == OBJECT_MOBILEfb || + type == OBJECT_MOBILEtb || + type == OBJECT_MOBILEwb || + type == OBJECT_MOBILEib) && // builder? + !m_object->GetTrainer() ) + { + pos.x = ox+sx*7.7f; + pos.y = oy+sy*0.5f; + pb = pw->CreateButton(pos, dim, 192+4, EVENT_OBJECT_BUILD); + pb->SetImmediat(true); + DefaultEnter(pw, EVENT_OBJECT_BUILD); + + pos.x = 0.0f; + pos.y = oy+sy*2.6f; + ddim.x = 214.5f/640.0f; + ddim.y = 66.0f/480.0f; + pw->CreateGroup(pos, ddim, 6, EVENT_WINDOW3); + + ddim.x = dim.x*0.9f; + ddim.y = dim.y*0.9f; + pos.y = oy+sy*3.6f; + + pos.x = ox+sx*0.0f; + pw->CreateButton(pos, ddim, 128+35, EVENT_OBJECT_BRESEARCH); + DeadInterface(pw, EVENT_OBJECT_BRESEARCH, m_main->CanBuild(OBJECT_RESEARCH, m_object->GetTeam())); + + pos.x = ox+sx*0.9f; + pw->CreateButton(pos, ddim, 128+32, EVENT_OBJECT_BFACTORY); + DeadInterface(pw, EVENT_OBJECT_BFACTORY, m_main->CanBuild(OBJECT_FACTORY, m_object->GetTeam())); + + pos.x = ox+sx*1.8f; + pw->CreateButton(pos, ddim, 128+34, EVENT_OBJECT_BCONVERT); + DeadInterface(pw, EVENT_OBJECT_BCONVERT, m_main->CanBuild(OBJECT_CONVERT, m_object->GetTeam())); + + pos.x = ox+sx*2.7f; + pw->CreateButton(pos, ddim, 128+36, EVENT_OBJECT_BSTATION); + DeadInterface(pw, EVENT_OBJECT_BSTATION, m_main->CanBuild(OBJECT_STATION, m_object->GetTeam())); + + pos.x = ox+sx*3.6f; + pw->CreateButton(pos, ddim, 128+40, EVENT_OBJECT_BRADAR); + DeadInterface(pw, EVENT_OBJECT_BRADAR, m_main->CanBuild(OBJECT_RADAR, m_object->GetTeam())); + + pos.x = ox+sx*4.5f; + pw->CreateButton(pos, ddim, 128+41, EVENT_OBJECT_BREPAIR); + DeadInterface(pw, EVENT_OBJECT_BREPAIR, m_main->CanBuild(OBJECT_REPAIR, m_object->GetTeam())); + + pos.x = ox+sx*5.4f; + pw->CreateButton(pos, ddim, 128+44, EVENT_OBJECT_BINFO); + DeadInterface(pw, EVENT_OBJECT_BINFO, m_main->CanBuild(OBJECT_INFO, m_object->GetTeam())); + + pos.y = oy+sy*2.7f; + + pos.x = ox+sx*0.0f; + pw->CreateButton(pos, ddim, 128+37, EVENT_OBJECT_BTOWER); + DeadInterface(pw, EVENT_OBJECT_BTOWER, m_main->CanBuild(OBJECT_TOWER, m_object->GetTeam())); + + pos.x = ox+sx*0.9f; + pw->CreateButton(pos, ddim, 128+39, EVENT_OBJECT_BENERGY); + DeadInterface(pw, EVENT_OBJECT_BENERGY, m_main->CanBuild(OBJECT_ENERGY, m_object->GetTeam())); + + pos.x = ox+sx*1.8f; + pw->CreateButton(pos, ddim, 128+33, EVENT_OBJECT_BDERRICK); + DeadInterface(pw, EVENT_OBJECT_BDERRICK, m_main->CanBuild(OBJECT_DERRICK, m_object->GetTeam())); + + pos.x = ox+sx*2.7f; + pw->CreateButton(pos, ddim, 128+42, EVENT_OBJECT_BNUCLEAR); + DeadInterface(pw, EVENT_OBJECT_BNUCLEAR, m_main->CanBuild(OBJECT_NUCLEAR, m_object->GetTeam())); + + pos.x = ox+sx*3.6f; + pw->CreateButton(pos, ddim, 128+38, EVENT_OBJECT_BLABO); + DeadInterface(pw, EVENT_OBJECT_BLABO, m_main->CanBuild(OBJECT_LABO, m_object->GetTeam())); + + pos.x = ox+sx*4.5f; + pw->CreateButton(pos, ddim, 128+46, EVENT_OBJECT_BPARA); + DeadInterface(pw, EVENT_OBJECT_BPARA, m_main->CanBuild(OBJECT_PARA, m_object->GetTeam())); + + pos.x = ox+sx*5.4f; + pw->CreateButton(pos, ddim, 128+41, EVENT_OBJECT_BDESTROYER); + DeadInterface(pw, EVENT_OBJECT_BDESTROYER, m_main->CanBuild(OBJECT_DESTROYER, m_object->GetTeam())); + + } UpdateInterface(); m_lastUpdateTime = 0.0f; UpdateInterface(0.0f); @@ -1668,6 +1757,7 @@ void CObjectInterface::UpdateInterface() EnableInterface(pw, EVENT_OBJECT_TERRAFORM, bEnable); EnableInterface(pw, EVENT_OBJECT_RECOVER, bEnable); EnableInterface(pw, EVENT_OBJECT_FIRE, bEnable); + EnableInterface(pw, EVENT_OBJECT_BUILD, bEnable); EnableInterface(pw, EVENT_OBJECT_SPIDEREXPLO, bEnable); EnableInterface(pw, EVENT_OBJECT_RESET, bEnable); EnableInterface(pw, EVENT_OBJECT_PEN0, bEnable); @@ -1682,7 +1772,11 @@ void CObjectInterface::UpdateInterface() EnableInterface(pw, EVENT_OBJECT_REC, bEnable); EnableInterface(pw, EVENT_OBJECT_STOP, bEnable); - if ( type == OBJECT_HUMAN ) // builder? + if ( type == OBJECT_HUMAN || // builder? + type == OBJECT_MOBILEfb || + type == OBJECT_MOBILEtb || + type == OBJECT_MOBILEwb || + type == OBJECT_MOBILEib ) { EnableInterface(pw, EVENT_OBJECT_BFACTORY, bEnable); EnableInterface(pw, EVENT_OBJECT_BDERRICK, bEnable); @@ -1733,6 +1827,47 @@ void CObjectInterface::UpdateInterface() ps->SetVisibleValue((RADIUS_SHIELD_MIN/g_unit)+dynamic_cast(m_object)->GetShieldRadius()*((RADIUS_SHIELD_MAX-RADIUS_SHIELD_MIN)/g_unit)); } } + + if ( type == OBJECT_MOBILEfb || + type == OBJECT_MOBILEtb || + type == OBJECT_MOBILEwb || + type == OBJECT_MOBILEib ) // builder? + { + if(!bEnable) m_buildInterface = false; + CheckInterface(pw, EVENT_OBJECT_BUILD, m_buildInterface); + + pb = static_cast< CButton* >(pw->SearchControl(EVENT_WINDOW3)); + pb->SetState(STATE_VISIBLE, m_buildInterface); + + pb = static_cast< CButton* >(pw->SearchControl(EVENT_OBJECT_BFACTORY)); + pb->SetState(STATE_VISIBLE, m_buildInterface); + pb = static_cast< CButton* >(pw->SearchControl(EVENT_OBJECT_BDERRICK)); + pb->SetState(STATE_VISIBLE, m_buildInterface); + pb = static_cast< CButton* >(pw->SearchControl(EVENT_OBJECT_BCONVERT)); + pb->SetState(STATE_VISIBLE, m_buildInterface); + pb = static_cast< CButton* >(pw->SearchControl(EVENT_OBJECT_BSTATION)); + pb->SetState(STATE_VISIBLE, m_buildInterface); + pb = static_cast< CButton* >(pw->SearchControl(EVENT_OBJECT_BREPAIR)); + pb->SetState(STATE_VISIBLE, m_buildInterface); + pb = static_cast< CButton* >(pw->SearchControl(EVENT_OBJECT_BTOWER)); + pb->SetState(STATE_VISIBLE, m_buildInterface); + pb = static_cast< CButton* >(pw->SearchControl(EVENT_OBJECT_BRESEARCH)); + pb->SetState(STATE_VISIBLE, m_buildInterface); + pb = static_cast< CButton* >(pw->SearchControl(EVENT_OBJECT_BRADAR)); + pb->SetState(STATE_VISIBLE, m_buildInterface); + pb = static_cast< CButton* >(pw->SearchControl(EVENT_OBJECT_BENERGY)); + pb->SetState(STATE_VISIBLE, m_buildInterface); + pb = static_cast< CButton* >(pw->SearchControl(EVENT_OBJECT_BLABO)); + pb->SetState(STATE_VISIBLE, m_buildInterface); + pb = static_cast< CButton* >(pw->SearchControl(EVENT_OBJECT_BNUCLEAR)); + pb->SetState(STATE_VISIBLE, m_buildInterface); + pb = static_cast< CButton* >(pw->SearchControl(EVENT_OBJECT_BPARA)); + pb->SetState(STATE_VISIBLE, m_buildInterface); + pb = static_cast< CButton* >(pw->SearchControl(EVENT_OBJECT_BDESTROYER)); + pb->SetState(STATE_VISIBLE, m_buildInterface); + pb = static_cast< CButton* >(pw->SearchControl(EVENT_OBJECT_BINFO)); + pb->SetState(STATE_VISIBLE, m_buildInterface); + } bFly = bEnable; if ( bFly && (type == OBJECT_HUMAN || type == OBJECT_TECH) ) diff --git a/src/ui/object_interface.h b/src/ui/object_interface.h index a35638a4..84d4fc76 100644 --- a/src/ui/object_interface.h +++ b/src/ui/object_interface.h @@ -120,6 +120,8 @@ protected: float m_lastAlarmTime; int m_soundChannelAlarm; int m_flagColor; + + bool m_buildInterface; }; } // namespace Ui From 5f8b7a81496ecaf7c3825ff5996afb40e573c52d Mon Sep 17 00:00:00 2001 From: Fiftytwo Date: Sat, 25 Nov 2017 12:30:16 +0100 Subject: [PATCH 026/207] Update BotFactory interface --- src/common/event.cpp | 4 ++++ src/common/event.h | 4 ++++ src/common/restext.cpp | 4 ++++ src/level/parser/parserparam.cpp | 1 + src/object/auto/autofactory.cpp | 28 +++++++++++++++++++++++----- 5 files changed, 36 insertions(+), 5 deletions(-) diff --git a/src/common/event.cpp b/src/common/event.cpp index e83bfeb9..b79e8b2d 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -423,6 +423,10 @@ void InitializeEventTypeTexts() EVENT_TYPE_TEXT[EVENT_OBJECT_FACTORYts] = "EVENT_OBJECT_FACTORYts"; EVENT_TYPE_TEXT[EVENT_OBJECT_FACTORYfs] = "EVENT_OBJECT_FACTORYfs"; EVENT_TYPE_TEXT[EVENT_OBJECT_FACTORYis] = "EVENT_OBJECT_FACTORYis"; + EVENT_TYPE_TEXT[EVENT_OBJECT_FACTORYwb] = "EVENT_OBJECT_FACTORYwb"; + EVENT_TYPE_TEXT[EVENT_OBJECT_FACTORYtb] = "EVENT_OBJECT_FACTORYtb"; + EVENT_TYPE_TEXT[EVENT_OBJECT_FACTORYfb] = "EVENT_OBJECT_FACTORYfb"; + EVENT_TYPE_TEXT[EVENT_OBJECT_FACTORYib] = "EVENT_OBJECT_FACTORYib"; EVENT_TYPE_TEXT[EVENT_OBJECT_FACTORYrt] = "EVENT_OBJECT_FACTORYrt"; EVENT_TYPE_TEXT[EVENT_OBJECT_FACTORYrc] = "EVENT_OBJECT_FACTORYrc"; EVENT_TYPE_TEXT[EVENT_OBJECT_FACTORYrr] = "EVENT_OBJECT_FACTORYrr"; diff --git a/src/common/event.h b/src/common/event.h index 95c0fc85..4cb2a75e 100644 --- a/src/common/event.h +++ b/src/common/event.h @@ -492,6 +492,10 @@ enum EventType EVENT_OBJECT_FACTORYrr = 1098, EVENT_OBJECT_FACTORYrs = 1099, EVENT_OBJECT_FACTORYsa = 1100, + EVENT_OBJECT_FACTORYwb = 1101, + EVENT_OBJECT_FACTORYtb = 1102, + EVENT_OBJECT_FACTORYfb = 1103, + EVENT_OBJECT_FACTORYib = 1104, EVENT_OBJECT_SEARCH = 1200, EVENT_OBJECT_TERRAFORM = 1201, EVENT_OBJECT_FIRE = 1202, diff --git a/src/common/restext.cpp b/src/common/restext.cpp index 635c56dd..ab43b630 100644 --- a/src/common/restext.cpp +++ b/src/common/restext.cpp @@ -357,6 +357,10 @@ void InitializeRestext() stringsEvent[EVENT_OBJECT_FACTORYts] = TR("Build a tracked sniffer"); stringsEvent[EVENT_OBJECT_FACTORYws] = TR("Build a wheeled sniffer"); stringsEvent[EVENT_OBJECT_FACTORYis] = TR("Build a legged sniffer"); + stringsEvent[EVENT_OBJECT_FACTORYfb] = TR("Build a winged builder"); + stringsEvent[EVENT_OBJECT_FACTORYtb] = TR("Build a tracked builder"); + stringsEvent[EVENT_OBJECT_FACTORYwb] = TR("Build a wheeled builder"); + stringsEvent[EVENT_OBJECT_FACTORYib] = TR("Build a legged builder"); stringsEvent[EVENT_OBJECT_FACTORYrt] = TR("Build a thumper"); stringsEvent[EVENT_OBJECT_FACTORYrc] = TR("Build a phazer shooter"); stringsEvent[EVENT_OBJECT_FACTORYrr] = TR("Build a recycler"); diff --git a/src/level/parser/parserparam.cpp b/src/level/parser/parserparam.cpp index a56d77c2..9110ceb5 100644 --- a/src/level/parser/parserparam.cpp +++ b/src/level/parser/parserparam.cpp @@ -787,6 +787,7 @@ ToolType CLevelParserParam::ToToolType(std::string value) if (value == "Sniffer" ) return ToolType::Sniffer; if (value == "Shooter" ) return ToolType::Shooter; if (value == "OrgaShooter") return ToolType::OrganicShooter; + if (value == "Builder" ) return ToolType::Builder; if (value == "Other" ) return ToolType::Other; return static_cast(Cast(value, "tool")); } diff --git a/src/object/auto/autofactory.cpp b/src/object/auto/autofactory.cpp index 5e998352..1aa2d999 100644 --- a/src/object/auto/autofactory.cpp +++ b/src/object/auto/autofactory.cpp @@ -186,6 +186,10 @@ ObjectType ObjectTypeFromFactoryButton(EventType eventType) if ( eventType == EVENT_OBJECT_FACTORYti ) return OBJECT_MOBILEti; if ( eventType == EVENT_OBJECT_FACTORYfi ) return OBJECT_MOBILEfi; if ( eventType == EVENT_OBJECT_FACTORYii ) return OBJECT_MOBILEii; + if ( eventType == EVENT_OBJECT_FACTORYwb ) return OBJECT_MOBILEwb; + if ( eventType == EVENT_OBJECT_FACTORYtb ) return OBJECT_MOBILEtb; + if ( eventType == EVENT_OBJECT_FACTORYfb ) return OBJECT_MOBILEfb; + if ( eventType == EVENT_OBJECT_FACTORYib ) return OBJECT_MOBILEib; if ( eventType == EVENT_OBJECT_FACTORYrt ) return OBJECT_MOBILErt; if ( eventType == EVENT_OBJECT_FACTORYrc ) return OBJECT_MOBILErc; if ( eventType == EVENT_OBJECT_FACTORYrr ) return OBJECT_MOBILErr; @@ -726,11 +730,11 @@ bool CAutoFactory::CreateInterface(bool bSelect) pos.x = 0.0f; pos.y = oy+sy*2.6f; ddim.x = 138.0f/640.0f; - ddim.y = 222.0f/480.0f; + ddim.y = 258.0f/480.0f; pw->CreateGroup(pos, ddim, 6, EVENT_WINDOW3); pos.x = ox+sx*0.0f; - pos.y = oy+sy*8.2f; + pos.y = oy+sy*9.3f; pw->CreateButton(pos, dim, 128+9, EVENT_OBJECT_FACTORYwa); pos.x += dim.x; pw->CreateButton(pos, dim, 128+10, EVENT_OBJECT_FACTORYta); @@ -740,7 +744,7 @@ bool CAutoFactory::CreateInterface(bool bSelect) pw->CreateButton(pos, dim, 128+22, EVENT_OBJECT_FACTORYia); pos.x = ox+sx*0.0f; - pos.y = oy+sy*7.1f; + pos.y = oy+sy*8.2f; pw->CreateButton(pos, dim, 128+12, EVENT_OBJECT_FACTORYws); pos.x += dim.x; pw->CreateButton(pos, dim, 128+13, EVENT_OBJECT_FACTORYts); @@ -750,7 +754,7 @@ bool CAutoFactory::CreateInterface(bool bSelect) pw->CreateButton(pos, dim, 128+24, EVENT_OBJECT_FACTORYis); pos.x = ox+sx*0.0f; - pos.y = oy+sy*6.0f; + pos.y = oy+sy*7.1f; pw->CreateButton(pos, dim, 128+15, EVENT_OBJECT_FACTORYwc); pos.x += dim.x; pw->CreateButton(pos, dim, 128+16, EVENT_OBJECT_FACTORYtc); @@ -760,7 +764,7 @@ bool CAutoFactory::CreateInterface(bool bSelect) pw->CreateButton(pos, dim, 128+23, EVENT_OBJECT_FACTORYic); pos.x = ox+sx*0.0f; - pos.y = oy+sy*4.9f; + pos.y = oy+sy*6.0f; pw->CreateButton(pos, dim, 128+25, EVENT_OBJECT_FACTORYwi); pos.x += dim.x; pw->CreateButton(pos, dim, 128+26, EVENT_OBJECT_FACTORYti); @@ -768,6 +772,16 @@ bool CAutoFactory::CreateInterface(bool bSelect) pw->CreateButton(pos, dim, 128+27, EVENT_OBJECT_FACTORYfi); pos.x += dim.x; pw->CreateButton(pos, dim, 128+28, EVENT_OBJECT_FACTORYii); + + pos.x = ox+sx*0.0f; + pos.y = oy+sy*4.9f; + pw->CreateButton(pos, dim, 192+0, EVENT_OBJECT_FACTORYwb); + pos.x += dim.x; + pw->CreateButton(pos, dim, 192+1, EVENT_OBJECT_FACTORYtb); + pos.x += dim.x; + pw->CreateButton(pos, dim, 192+2, EVENT_OBJECT_FACTORYfb); + pos.x += dim.x; + pw->CreateButton(pos, dim, 192+3, EVENT_OBJECT_FACTORYib); pos.x = ox+sx*0.0f; pos.y = oy+sy*3.8f; @@ -821,6 +835,10 @@ void CAutoFactory::UpdateInterface() UpdateButton(pw, EVENT_OBJECT_FACTORYti, m_bBusy); UpdateButton(pw, EVENT_OBJECT_FACTORYfi, m_bBusy); UpdateButton(pw, EVENT_OBJECT_FACTORYii, m_bBusy); + UpdateButton(pw, EVENT_OBJECT_FACTORYwb, m_bBusy); + UpdateButton(pw, EVENT_OBJECT_FACTORYtb, m_bBusy); + UpdateButton(pw, EVENT_OBJECT_FACTORYfb, m_bBusy); + UpdateButton(pw, EVENT_OBJECT_FACTORYib, m_bBusy); UpdateButton(pw, EVENT_OBJECT_FACTORYrt, m_bBusy); UpdateButton(pw, EVENT_OBJECT_FACTORYrc, m_bBusy); UpdateButton(pw, EVENT_OBJECT_FACTORYrr, m_bBusy); From db23c6eecf675b8d725abd572c5a80d7e1b5b45e Mon Sep 17 00:00:00 2001 From: Fiftytwo Date: Sat, 25 Nov 2017 14:35:45 +0100 Subject: [PATCH 027/207] Change Builder default camera type --- src/object/old_object.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/object/old_object.cpp b/src/object/old_object.cpp index 9c1a450e..685c9bd8 100644 --- a/src/object/old_object.cpp +++ b/src/object/old_object.cpp @@ -941,10 +941,6 @@ void COldObject::SetType(ObjectType type) m_type == OBJECT_MOBILEtc || m_type == OBJECT_MOBILEfc || m_type == OBJECT_MOBILEic || - m_type == OBJECT_MOBILEwb || - m_type == OBJECT_MOBILEtb || - m_type == OBJECT_MOBILEfb || - m_type == OBJECT_MOBILEib || m_type == OBJECT_MOBILEwi || m_type == OBJECT_MOBILEti || m_type == OBJECT_MOBILEfi || From 7eb1df41199de76c8626482deb27c1a0c94bde32 Mon Sep 17 00:00:00 2001 From: Fiftytwo Date: Wed, 29 Nov 2017 13:24:05 +0100 Subject: [PATCH 028/207] Add aim recalibration during falling --- src/object/task/taskbuild.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/object/task/taskbuild.cpp b/src/object/task/taskbuild.cpp index 7a608cc7..3c8d769c 100644 --- a/src/object/task/taskbuild.cpp +++ b/src/object/task/taskbuild.cpp @@ -202,9 +202,9 @@ void CTaskBuild::BlackLight() bool CTaskBuild::EventProcess(const Event &event) { Math::Matrix* mat; - Math::Vector pos, dir, speed; + Math::Vector pos, dir, speed, pv, pm, tilt; Math::Point dim; - float a, g, cirSpeed, dist, linSpeed; + float a, g, cirSpeed, dist, linSpeed, diff; if ( m_engine->GetPause() ) return true; if ( event.type != EVENT_FRAME ) return true; @@ -355,6 +355,16 @@ bool CTaskBuild::EventProcess(const Event &event) m_sound->Play(SOUND_BUILD, m_object->GetPosition(), 0.5f, 1.0f*Math::Rand()*1.5f); } } + + if(m_object->GetType() == OBJECT_MOBILEfb && m_object->GetReactorRange()<0.2f && m_phase != TBP_MOVE) + { + pv = m_object->GetPosition(); + pm = m_metal->GetPosition(); + dist = Math::Distance(pv, pm); + diff = pm.y - 8.0f - pv.y; + tilt = m_object->GetRotation(); + m_object->StartTaskGunGoal(asin(diff/dist)-tilt.z, 0.0f); + } return true; } From e01a6bd0efa1461439c8fb86ec7d48802a704064 Mon Sep 17 00:00:00 2001 From: Fiftytwo Date: Thu, 30 Nov 2017 08:00:17 +0100 Subject: [PATCH 029/207] Add Builder documentation --- src/script/cbottoken.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/script/cbottoken.cpp b/src/script/cbottoken.cpp index bb4066fc..2153b017 100644 --- a/src/script/cbottoken.cpp +++ b/src/script/cbottoken.cpp @@ -200,6 +200,10 @@ std::string GetHelpFilename(ObjectType type) if ( type == OBJECT_MOBILEtc ) helpfile = "object/botfc"; if ( type == OBJECT_MOBILEfc ) helpfile = "object/botfj"; if ( type == OBJECT_MOBILEic ) helpfile = "object/botfs"; + if ( type == OBJECT_MOBILEwb ) helpfile = "object/botbr"; + if ( type == OBJECT_MOBILEtb ) helpfile = "object/botbc"; + if ( type == OBJECT_MOBILEfb ) helpfile = "object/botbj"; + if ( type == OBJECT_MOBILEib ) helpfile = "object/botbs"; if ( type == OBJECT_MOBILErt ) helpfile = "object/bottump"; if ( type == OBJECT_MOBILErc ) helpfile = "object/botphaz"; if ( type == OBJECT_MOBILErr ) helpfile = "object/botrecy"; From ca0ff013d47c2ee65ea88fdf6d30336aa6789b4e Mon Sep 17 00:00:00 2001 From: Fiftytwo Date: Thu, 21 Dec 2017 01:49:56 +0100 Subject: [PATCH 030/207] Update Trainer bots --- src/level/parser/parserparam.cpp | 9 +- src/object/motion/motionvehicle.cpp | 126 ++++++++++++++++++++++++---- src/object/object_type.h | 9 +- src/object/old_object.cpp | 80 +++++++++--------- src/physics/physics.cpp | 24 ++++-- src/script/cbottoken.cpp | 9 +- src/script/scriptfunc.cpp | 16 +++- 7 files changed, 202 insertions(+), 71 deletions(-) diff --git a/src/level/parser/parserparam.cpp b/src/level/parser/parserparam.cpp index 9110ceb5..9a671976 100644 --- a/src/level/parser/parserparam.cpp +++ b/src/level/parser/parserparam.cpp @@ -339,6 +339,10 @@ ObjectType CLevelParserParam::ToObjectType(std::string value) if (value == "Portico" ) return OBJECT_PORTICO; if (value == "SpaceShip" ) return OBJECT_BASE; if (value == "PracticeBot" ) return OBJECT_MOBILEwt; + if (value == "WingedTrainer" ) return OBJECT_MOBILEft; + if (value == "TrackedTrainer" ) return OBJECT_MOBILEtt; + if (value == "WheeledTrainer" ) return OBJECT_MOBILEwt; + if (value == "LeggedTrainer" ) return OBJECT_MOBILEit; if (value == "WingedGrabber" ) return OBJECT_MOBILEfa; if (value == "TrackedGrabber" ) return OBJECT_MOBILEta; if (value == "WheeledGrabber" ) return OBJECT_MOBILEwa; @@ -543,7 +547,10 @@ const std::string CLevelParserParam::FromObjectType(ObjectType value) { if (value == OBJECT_PORTICO ) return "Portico"; if (value == OBJECT_BASE ) return "SpaceShip"; - if (value == OBJECT_MOBILEwt ) return "PracticeBot"; + if (value == OBJECT_MOBILEwt ) return "WheeledTrainer"; + if (value == OBJECT_MOBILEft ) return "WingedTrainer"; + if (value == OBJECT_MOBILEtt ) return "TrackedTrainer"; + if (value == OBJECT_MOBILEit ) return "LeggedTrainer"; if (value == OBJECT_MOBILEfa ) return "WingedGrabber"; if (value == OBJECT_MOBILEta ) return "TrackedGrabber"; if (value == OBJECT_MOBILEwa ) return "WheeledGrabber"; diff --git a/src/object/motion/motionvehicle.cpp b/src/object/motion/motionvehicle.cpp index a9cfa402..be89509a 100644 --- a/src/object/motion/motionvehicle.cpp +++ b/src/object/motion/motionvehicle.cpp @@ -100,21 +100,60 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_VEHICLE); // this is a moving object m_object->SetObjectRank(0, rank); + if (m_object->GetTrainer() || + type == OBJECT_MOBILEwt || + type == OBJECT_MOBILEtt || + type == OBJECT_MOBILEft || + type == OBJECT_MOBILEit) + { + modelManager->AddModelReference("trainer.mod", false, rank, m_object->GetTeam()); + } + if (type == OBJECT_MOBILEfa || type == OBJECT_MOBILEfb || type == OBJECT_MOBILEfc || type == OBJECT_MOBILEfi || type == OBJECT_MOBILEfs) { - modelManager->AddModelReference("lem1f.mod", false, rank, m_object->GetTeam()); + if (!m_object->GetTrainer()) + modelManager->AddModelReference("lem1f.mod", false, rank, m_object->GetTeam()); + else + { + rank = m_engine->CreateObject(); + m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_DESCENDANT); + m_object->SetObjectRank(28, rank); + m_object->SetObjectParent(28, 0); + modelManager->AddModelReference("trainerf.mod", false, rank, m_object->GetTeam()); + + rank = m_engine->CreateObject(); + m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_DESCENDANT); + m_object->SetObjectRank(29, rank); + m_object->SetObjectParent(29, 0); + modelManager->AddModelReference("trainera.mod", false, rank, m_object->GetTeam()); + } } else if (type == OBJECT_MOBILEta || type == OBJECT_MOBILEtb || type == OBJECT_MOBILEtc || type == OBJECT_MOBILEti || type == OBJECT_MOBILEts) - { - modelManager->AddModelReference("lem1t.mod", false, rank, m_object->GetTeam()); + { + if (!m_object->GetTrainer()) + modelManager->AddModelReference("lem1t.mod", false, rank, m_object->GetTeam()); + else + { + rank = m_engine->CreateObject(); + m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_DESCENDANT); + m_object->SetObjectRank(28, rank); + m_object->SetObjectParent(28, 0); + modelManager->AddModelReference("trainert.mod", false, rank, m_object->GetTeam()); + + rank = m_engine->CreateObject(); + m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_DESCENDANT); + m_object->SetObjectRank(29, rank); + m_object->SetObjectParent(29, 0); + modelManager->AddModelReference("trainera.mod", false, rank, m_object->GetTeam()); + } } else if (type == OBJECT_MOBILEwa || type == OBJECT_MOBILEwb || @@ -122,13 +161,21 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, type == OBJECT_MOBILEwi || type == OBJECT_MOBILEws) { - if (m_object->GetTrainer()) - { - modelManager->AddModelReference("lem1wt.mod", false, rank, m_object->GetTeam()); - } + if (!m_object->GetTrainer()) + modelManager->AddModelReference("lem1w.mod", false, rank, m_object->GetTeam()); else { - modelManager->AddModelReference("lem1w.mod", false, rank, m_object->GetTeam()); + rank = m_engine->CreateObject(); + m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_DESCENDANT); + m_object->SetObjectRank(28, rank); + m_object->SetObjectParent(28, 0); + modelManager->AddModelReference("trainerw.mod", false, rank, m_object->GetTeam()); + + rank = m_engine->CreateObject(); + m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_DESCENDANT); + m_object->SetObjectRank(29, rank); + m_object->SetObjectParent(29, 0); + modelManager->AddModelReference("trainera.mod", false, rank, m_object->GetTeam()); } } else if (type == OBJECT_MOBILEia || @@ -137,7 +184,22 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, type == OBJECT_MOBILEii || type == OBJECT_MOBILEis) { - modelManager->AddModelReference("lem1i.mod", false, rank, m_object->GetTeam()); + if (!m_object->GetTrainer()) + modelManager->AddModelReference("lem1i.mod", false, rank, m_object->GetTeam()); + else + { + rank = m_engine->CreateObject(); + m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_DESCENDANT); + m_object->SetObjectRank(28, rank); + m_object->SetObjectParent(28, 0); + modelManager->AddModelReference("traineri.mod", false, rank, m_object->GetTeam()); + + rank = m_engine->CreateObject(); + m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_DESCENDANT); + m_object->SetObjectRank(29, rank); + m_object->SetObjectParent(29, 0); + modelManager->AddModelReference("trainera.mod", false, rank, m_object->GetTeam()); + } } else if (type == OBJECT_MOBILErt || type == OBJECT_MOBILErc || @@ -156,18 +218,34 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, } else if (type == OBJECT_MOBILEwt) { + rank = m_engine->CreateObject(); + m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_DESCENDANT); + m_object->SetObjectRank(28, rank); + m_object->SetObjectParent(28, 0); modelManager->AddModelReference("trainerw.mod", false, rank, m_object->GetTeam()); } else if (type == OBJECT_MOBILEft) { + rank = m_engine->CreateObject(); + m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_DESCENDANT); + m_object->SetObjectRank(28, rank); + m_object->SetObjectParent(28, 0); modelManager->AddModelReference("trainerf.mod", false, rank, m_object->GetTeam()); } else if (type == OBJECT_MOBILEtt) { + rank = m_engine->CreateObject(); + m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_DESCENDANT); + m_object->SetObjectRank(28, rank); + m_object->SetObjectParent(28, 0); modelManager->AddModelReference("trainert.mod", false, rank, m_object->GetTeam()); } else if (type == OBJECT_MOBILEit) { + rank = m_engine->CreateObject(); + m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_DESCENDANT); + m_object->SetObjectRank(28, rank); + m_object->SetObjectParent(28, 0); modelManager->AddModelReference("traineri.mod", false, rank, m_object->GetTeam()); } else if (type == OBJECT_MOBILEdr) @@ -435,7 +513,8 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, type == OBJECT_MOBILEtb || type == OBJECT_MOBILEtc || type == OBJECT_MOBILEti || - type == OBJECT_MOBILEts) // caterpillars? + type == OBJECT_MOBILEts || + type == OBJECT_MOBILEtt) // caterpillars? { // Creates the right caterpillar. rank = m_engine->CreateObject(); @@ -443,7 +522,10 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, m_object->SetObjectRank(6, rank); m_object->SetObjectParent(6, 0); modelManager->AddModelCopy("lem2t.mod", false, rank, m_object->GetTeam()); - m_object->SetPartPosition(6, Math::Vector(0.0f, 2.0f, -3.0f)); + if (m_object->GetTrainer() || type == OBJECT_MOBILEtt) + m_object->SetPartPosition(6, Math::Vector(0.0f, 2.0f, -3.8f)); + else + m_object->SetPartPosition(6, Math::Vector(0.0f, 2.0f, -3.0f)); // Creates the left caterpillar. rank = m_engine->CreateObject(); @@ -451,7 +533,10 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, m_object->SetObjectRank(7, rank); m_object->SetObjectParent(7, 0); modelManager->AddModelCopy("lem3t.mod", false, rank, m_object->GetTeam()); - m_object->SetPartPosition(7, Math::Vector(0.0f, 2.0f, 3.0f)); + if (m_object->GetTrainer() || type == OBJECT_MOBILEtt) + m_object->SetPartPosition(7, Math::Vector(0.0f, 2.0f, 3.8f)); + else + m_object->SetPartPosition(7, Math::Vector(0.0f, 2.0f, 3.0f)); } if (type == OBJECT_MOBILErt || @@ -552,7 +637,8 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, type == OBJECT_MOBILEib || type == OBJECT_MOBILEic || type == OBJECT_MOBILEis || - type == OBJECT_MOBILEii) // insect legs? + type == OBJECT_MOBILEii || + type == OBJECT_MOBILEit) // insect legs? { float table[] = { @@ -895,6 +981,7 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, type == OBJECT_MOBILEtc || type == OBJECT_MOBILEti || type == OBJECT_MOBILEts || + type == OBJECT_MOBILEtt || type == OBJECT_MOBILEsa) { m_object->CreateShadowCircle(5.0f, 1.0f); @@ -1034,7 +1121,8 @@ void CMotionVehicle::CreatePhysics(ObjectType type) type == OBJECT_MOBILEtb || type == OBJECT_MOBILEtc || type == OBJECT_MOBILEti || - type == OBJECT_MOBILEts ) // caterpillars? + type == OBJECT_MOBILEts || + type == OBJECT_MOBILEtt ) // caterpillars? { character->wheelFront = 4.0f; character->wheelBack = 4.0f; @@ -1064,7 +1152,8 @@ void CMotionVehicle::CreatePhysics(ObjectType type) type == OBJECT_MOBILEib || type == OBJECT_MOBILEic || type == OBJECT_MOBILEii || - type == OBJECT_MOBILEis ) // legs? + type == OBJECT_MOBILEis || + type == OBJECT_MOBILEit) // legs? { character->wheelFront = 4.0f; character->wheelBack = 4.0f; @@ -1441,6 +1530,7 @@ bool CMotionVehicle::EventFrame(const Event &event) type == OBJECT_MOBILEtc || type == OBJECT_MOBILEti || type == OBJECT_MOBILEts || + type == OBJECT_MOBILEtt || type == OBJECT_MOBILErt || type == OBJECT_MOBILErc || type == OBJECT_MOBILErr || @@ -1471,7 +1561,8 @@ bool CMotionVehicle::EventFrame(const Event &event) if ( type == OBJECT_MOBILEta || type == OBJECT_MOBILEtc || type == OBJECT_MOBILEti || - type == OBJECT_MOBILEts ) + type == OBJECT_MOBILEts || + type == OBJECT_MOBILEtt ) { limit[0] = 8.0f*Math::PI/180.0f; limit[1] = -12.0f*Math::PI/180.0f; @@ -1569,7 +1660,8 @@ bool CMotionVehicle::EventFrame(const Event &event) type == OBJECT_MOBILEib || type == OBJECT_MOBILEic || type == OBJECT_MOBILEii || - type == OBJECT_MOBILEis ) // legs? + type == OBJECT_MOBILEis || + type == OBJECT_MOBILEit ) // legs? { EventFrameInsect(event); } diff --git a/src/object/object_type.h b/src/object/object_type.h index 6d1b7039..f3acfc2e 100644 --- a/src/object/object_type.h +++ b/src/object/object_type.h @@ -101,10 +101,10 @@ enum ObjectType OBJECT_TREE3 = 93, //!< Tree3 OBJECT_TREE4 = 94, //!< Tree4 OBJECT_TREE5 = 95, //!< Tree5 - OBJECT_MOBILEwt = 100, //!< PracticeBot - OBJECT_MOBILEtt = 101, //!< track-trainer (unused) - OBJECT_MOBILEft = 102, //!< fly-trainer (unused) - OBJECT_MOBILEit = 103, //!< insect-trainer (unused) + OBJECT_MOBILEwt = 100, //!< WheeledTrainer (PracticeBot) + OBJECT_MOBILEtt = 101, //!< TrackedTrainer + OBJECT_MOBILEft = 102, //!< WingedTrainer + OBJECT_MOBILEit = 103, //!< LeggedTrainer OBJECT_MOBILEwa = 110, //!< WheeledGrabber OBJECT_MOBILEta = 111, //!< TrackedGrabber OBJECT_MOBILEfa = 112, //!< WingedGrabber @@ -133,6 +133,7 @@ enum ObjectType OBJECT_MOBILEtb = 221, //!< TrackedBuilder OBJECT_MOBILEfb = 222, //!< WingedBuilder OBJECT_MOBILEib = 223, //!< LeggedBuilder + OBJECT_MOBILEpr = 224, //!< PracticeBot (alias) OBJECT_WAYPOINT = 250, //!< WayPoint OBJECT_FLAGb = 260, //!< BlueFlag OBJECT_FLAGr = 261, //!< RedFlag diff --git a/src/object/old_object.cpp b/src/object/old_object.cpp index 685c9bd8..99b471e1 100644 --- a/src/object/old_object.cpp +++ b/src/object/old_object.cpp @@ -682,7 +682,7 @@ void COldObject::SetType(ObjectType type) m_type == OBJECT_MOBILEfs || // WingedSniffer m_type == OBJECT_MOBILEfc || // WingedShooter m_type == OBJECT_MOBILEfi || // WingedOrgaShooter - m_type == OBJECT_MOBILEft || // winged PracticeBot (unused) + m_type == OBJECT_MOBILEft || // WingedTrainer m_type == OBJECT_HUMAN || // Me m_type == OBJECT_TECH || // Tech m_type == OBJECT_CONTROLLER) @@ -2922,16 +2922,6 @@ void COldObject::UpdateSelectParticle() dim[0].x = 1.5f; dim[1].x = 1.5f; } - else if ( m_type == OBJECT_MOBILEwt || - m_type == OBJECT_MOBILEtt || - m_type == OBJECT_MOBILEft || - m_type == OBJECT_MOBILEit ) // trainer ? - { - pos[0] = Math::Vector(4.2f, 2.5f, 1.2f); - pos[1] = Math::Vector(4.2f, 2.5f, -1.2f); - dim[0].x = 1.5f; - dim[1].x = 1.5f; - } else if ( m_type == OBJECT_MOBILEsa ) // submarine? { pos[0] = Math::Vector(3.6f, 4.0f, 2.0f); @@ -2947,6 +2937,17 @@ void COldObject::UpdateSelectParticle() pos[0] = Math::Vector(4.9f, 3.5f, 2.5f); pos[1] = Math::Vector(4.9f, 3.5f, -2.5f); } + else if ( m_type == OBJECT_MOBILEwt || + m_type == OBJECT_MOBILEtt || + m_type == OBJECT_MOBILEft || + m_type == OBJECT_MOBILEit || + GetTrainer()) // trainer ? + { + pos[0] = Math::Vector(4.2f, 2.5f, 1.2f); + pos[1] = Math::Vector(4.2f, 2.5f, -1.2f); + dim[0].x = 1.5f; + dim[1].x = 1.5f; + } else { pos[0] = Math::Vector(4.2f, 2.5f, 1.5f); @@ -2954,48 +2955,49 @@ void COldObject::UpdateSelectParticle() } // Red back lens - if ( m_type == OBJECT_MOBILEfa || - m_type == OBJECT_MOBILEfb || - m_type == OBJECT_MOBILEfc || - m_type == OBJECT_MOBILEfi || - m_type == OBJECT_MOBILEfs || - m_type == OBJECT_MOBILEft ) // flying? + if ( m_type == OBJECT_MOBILEwt || + m_type == OBJECT_MOBILEtt || + m_type == OBJECT_MOBILEft || + m_type == OBJECT_MOBILEit || + GetTrainer()) // trainer? + { + pos[2] = Math::Vector(-4.0f, 2.5f, 2.2f); + pos[3] = Math::Vector(-4.0f, 2.5f, -2.2f); + } + else if ( m_type == OBJECT_MOBILEfa || + m_type == OBJECT_MOBILEfb || + m_type == OBJECT_MOBILEfc || + m_type == OBJECT_MOBILEfi || + m_type == OBJECT_MOBILEfs ) // flying? { pos[2] = Math::Vector(-4.0f, 3.1f, 4.5f); pos[3] = Math::Vector(-4.0f, 3.1f, -4.5f); dim[2].x = 0.6f; dim[3].x = 0.6f; } - if ( m_type == OBJECT_MOBILEwa || - m_type == OBJECT_MOBILEwb || - m_type == OBJECT_MOBILEwc || - m_type == OBJECT_MOBILEwi || - m_type == OBJECT_MOBILEws ) // wheels? + else if ( m_type == OBJECT_MOBILEwa || + m_type == OBJECT_MOBILEwb || + m_type == OBJECT_MOBILEwc || + m_type == OBJECT_MOBILEwi || + m_type == OBJECT_MOBILEws ) // wheels? { pos[2] = Math::Vector(-4.5f, 2.7f, 2.8f); pos[3] = Math::Vector(-4.5f, 2.7f, -2.8f); } - if ( m_type == OBJECT_MOBILEwt ) // wheels? - { - pos[2] = Math::Vector(-4.0f, 2.5f, 2.2f); - pos[3] = Math::Vector(-4.0f, 2.5f, -2.2f); - } - if ( m_type == OBJECT_MOBILEia || - m_type == OBJECT_MOBILEib || - m_type == OBJECT_MOBILEic || - m_type == OBJECT_MOBILEii || - m_type == OBJECT_MOBILEis || - m_type == OBJECT_MOBILEit ) // legs? + else if ( m_type == OBJECT_MOBILEia || + m_type == OBJECT_MOBILEib || + m_type == OBJECT_MOBILEic || + m_type == OBJECT_MOBILEii || + m_type == OBJECT_MOBILEis ) // legs? { pos[2] = Math::Vector(-4.5f, 2.7f, 2.8f); pos[3] = Math::Vector(-4.5f, 2.7f, -2.8f); } - if ( m_type == OBJECT_MOBILEta || - m_type == OBJECT_MOBILEtb || - m_type == OBJECT_MOBILEtc || - m_type == OBJECT_MOBILEti || - m_type == OBJECT_MOBILEts || - m_type == OBJECT_MOBILEtt ) // caterpillars? + else if ( m_type == OBJECT_MOBILEta || + m_type == OBJECT_MOBILEtb || + m_type == OBJECT_MOBILEtc || + m_type == OBJECT_MOBILEti || + m_type == OBJECT_MOBILEts ) // caterpillars? { pos[2] = Math::Vector(-3.6f, 4.2f, 3.0f); pos[3] = Math::Vector(-3.6f, 4.2f, -3.0f); diff --git a/src/physics/physics.cpp b/src/physics/physics.cpp index 65293510..b7aa80ba 100644 --- a/src/physics/physics.cpp +++ b/src/physics/physics.cpp @@ -991,7 +991,8 @@ void CPhysics::MotorUpdate(float aTime, float rTime) type == OBJECT_MOBILEib || type == OBJECT_MOBILEis || type == OBJECT_MOBILEic || - type == OBJECT_MOBILEii ) factor = 0.5f; + type == OBJECT_MOBILEii || + type == OBJECT_MOBILEit ) factor = 0.5f; energy = power->GetEnergy(); energy -= fabs(motorSpeed.x)*rTime*factor*0.005f; @@ -1848,7 +1849,8 @@ void CPhysics::SoundMotorFull(float rTime, ObjectType type) type == OBJECT_MOBILEib || type == OBJECT_MOBILEic || type == OBJECT_MOBILEii || - type == OBJECT_MOBILEis ) + type == OBJECT_MOBILEis || + type == OBJECT_MOBILEit ) { if ( m_soundChannel == -1 ) { @@ -1893,7 +1895,8 @@ void CPhysics::SoundMotorFull(float rTime, ObjectType type) else if ( type == OBJECT_MOBILEta || type == OBJECT_MOBILEtc || type == OBJECT_MOBILEti || - type == OBJECT_MOBILEts ) + type == OBJECT_MOBILEts || + type == OBJECT_MOBILEtt ) { sound = SOUND_MOTORt; amplitude = 1.0f; @@ -1964,7 +1967,8 @@ void CPhysics::SoundMotorSlow(float rTime, ObjectType type) type == OBJECT_MOBILEib || type == OBJECT_MOBILEic || type == OBJECT_MOBILEii || - type == OBJECT_MOBILEis ) + type == OBJECT_MOBILEis || + type == OBJECT_MOBILEit ) { if ( m_soundChannel != -1 ) // engine is running? { @@ -1992,7 +1996,8 @@ void CPhysics::SoundMotorSlow(float rTime, ObjectType type) type == OBJECT_MOBILEtb || type == OBJECT_MOBILEtc || type == OBJECT_MOBILEti || - type == OBJECT_MOBILEts ) + type == OBJECT_MOBILEts || + type == OBJECT_MOBILEtt ) { sound = SOUND_MOTORt; amplitude = 0.7f; @@ -2087,7 +2092,8 @@ void CPhysics::SoundMotorStop(float rTime, ObjectType type) type == OBJECT_MOBILEib || type == OBJECT_MOBILEic || type == OBJECT_MOBILEii || - type == OBJECT_MOBILEis ) + type == OBJECT_MOBILEis || + type == OBJECT_MOBILEit ) { if ( m_soundChannel != -1 ) // engine is running? { @@ -3041,7 +3047,8 @@ void CPhysics::MotorParticle(float aTime, float rTime) type == OBJECT_MOBILEib || type == OBJECT_MOBILEic || type == OBJECT_MOBILEii || - type == OBJECT_MOBILEis || // legs? + type == OBJECT_MOBILEis || + type == OBJECT_MOBILEit || // legs? type == OBJECT_MOBILEdr || type == OBJECT_MOTHER || type == OBJECT_ANT || @@ -3147,7 +3154,8 @@ void CPhysics::MotorParticle(float aTime, float rTime) type == OBJECT_MOBILEtb || type == OBJECT_MOBILEtc || type == OBJECT_MOBILEti || - type == OBJECT_MOBILEts ) // caterpillars? + type == OBJECT_MOBILEts || + type == OBJECT_MOBILEtt ) // caterpillars? { if ( aTime-m_lastSlideParticle >= m_engine->ParticleAdapt(0.05f) ) { diff --git a/src/script/cbottoken.cpp b/src/script/cbottoken.cpp index 2153b017..71ca67d1 100644 --- a/src/script/cbottoken.cpp +++ b/src/script/cbottoken.cpp @@ -82,7 +82,10 @@ const char* GetObjectName(ObjectType type) if ( type == OBJECT_MARKKEYb ) return "KeyBSpot"; if ( type == OBJECT_MARKKEYc ) return "KeyCSpot"; if ( type == OBJECT_MARKKEYd ) return "KeyDSpot"; - if ( type == OBJECT_MOBILEwt ) return "PracticeBot"; + if ( type == OBJECT_MOBILEwt ) return "WheeledTrainer"; + if ( type == OBJECT_MOBILEtt ) return "TrackedTrainer"; + if ( type == OBJECT_MOBILEft ) return "WingedTrainer"; + if ( type == OBJECT_MOBILEit ) return "LeggedTrainer"; if ( type == OBJECT_MOBILEwa ) return "WheeledGrabber"; if ( type == OBJECT_MOBILEta ) return "TrackedGrabber"; if ( type == OBJECT_MOBILEfa ) return "WingedGrabber"; @@ -110,6 +113,7 @@ const char* GetObjectName(ObjectType type) if ( type == OBJECT_MOBILEsa ) return "Subber"; if ( type == OBJECT_MOBILEtg ) return "TargetBot"; if ( type == OBJECT_MOBILEdr ) return "Scribbler"; + if ( type == OBJECT_MOBILEpr ) return "PracticeBot"; if ( type == OBJECT_HUMAN ) return "Me"; if ( type == OBJECT_TECH ) return "Tech"; if ( type == OBJECT_MOTHER ) return "AlienQueen"; @@ -210,6 +214,9 @@ std::string GetHelpFilename(ObjectType type) if ( type == OBJECT_MOBILErs ) helpfile = "object/botshld"; if ( type == OBJECT_MOBILEsa ) helpfile = "object/botsub"; if ( type == OBJECT_MOBILEwt ) helpfile = "object/bottr"; + if ( type == OBJECT_MOBILEtt ) helpfile = "object/bottr"; + if ( type == OBJECT_MOBILEft ) helpfile = "object/bottr"; + if ( type == OBJECT_MOBILEit ) helpfile = "object/bottr"; if ( type == OBJECT_MOBILEtg ) helpfile = "object/bottarg"; if ( type == OBJECT_MOBILEdr ) helpfile = "object/botdraw"; if ( type == OBJECT_APOLLO2 ) helpfile = "object/lrv"; diff --git a/src/script/scriptfunc.cpp b/src/script/scriptfunc.cpp index 4696ee10..2650df83 100644 --- a/src/script/scriptfunc.cpp +++ b/src/script/scriptfunc.cpp @@ -984,16 +984,30 @@ bool runRadar(CBotVar* var, std::function, float, f { while ( array != nullptr ) { + if (array->GetValInt() == OBJECT_MOBILEpr) + { + type_v.push_back(OBJECT_MOBILEwt); + type_v.push_back(OBJECT_MOBILEtt); + type_v.push_back(OBJECT_MOBILEft); + type_v.push_back(OBJECT_MOBILEit); + } type_v.push_back(static_cast(array->GetValInt())); array = array->GetNext(); } } else { - if (type != OBJECT_NULL) + if (type != OBJECT_NULL && type != OBJECT_MOBILEpr) { type_v.push_back(static_cast(type)); } + else if (type == OBJECT_MOBILEpr) + { + type_v.push_back(OBJECT_MOBILEwt); + type_v.push_back(OBJECT_MOBILEtt); + type_v.push_back(OBJECT_MOBILEft); + type_v.push_back(OBJECT_MOBILEit); + } } return code(type_v, angle, focus, minDist, maxDist, sens < 0, filter); From 0fddd79501d28161f896c7c027b1c6707f5e43e5 Mon Sep 17 00:00:00 2001 From: Fiftytwo Date: Thu, 21 Dec 2017 14:44:43 +0100 Subject: [PATCH 031/207] Add PracticeBot alias detection in search() and detect() --- src/script/scriptfunc.cpp | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/src/script/scriptfunc.cpp b/src/script/scriptfunc.cpp index 2650df83..e73b583d 100644 --- a/src/script/scriptfunc.cpp +++ b/src/script/scriptfunc.cpp @@ -809,16 +809,30 @@ bool runSearch(CBotVar* var, Math::Vector pos, int& exception, std::functionGetValInt() == OBJECT_MOBILEpr) + { + type_v.push_back(OBJECT_MOBILEwt); + type_v.push_back(OBJECT_MOBILEtt); + type_v.push_back(OBJECT_MOBILEft); + type_v.push_back(OBJECT_MOBILEit); + } type_v.push_back(static_cast(array->GetValInt())); array = array->GetNext(); } } else { - if (type != OBJECT_NULL) + if (type != OBJECT_NULL && type != OBJECT_MOBILEpr) { type_v.push_back(static_cast(type)); } + else if (type == OBJECT_MOBILEpr) + { + type_v.push_back(OBJECT_MOBILEwt); + type_v.push_back(OBJECT_MOBILEtt); + type_v.push_back(OBJECT_MOBILEft); + type_v.push_back(OBJECT_MOBILEit); + } } return code(type_v, pos, minDist, maxDist, sens < 0, filter); @@ -1169,16 +1183,30 @@ bool CScriptFunctions::rDetect(CBotVar* var, CBotVar* result, int& exception, vo { while ( array != nullptr ) { + if (array->GetValInt() == OBJECT_MOBILEpr) + { + type_v.push_back(OBJECT_MOBILEwt); + type_v.push_back(OBJECT_MOBILEtt); + type_v.push_back(OBJECT_MOBILEft); + type_v.push_back(OBJECT_MOBILEit); + } type_v.push_back(static_cast(array->GetValInt())); array = array->GetNext(); } } else { - if (type != OBJECT_NULL) + if (type != OBJECT_NULL && type != OBJECT_MOBILEpr) { type_v.push_back(static_cast(type)); } + else if (type == OBJECT_MOBILEpr) + { + type_v.push_back(OBJECT_MOBILEwt); + type_v.push_back(OBJECT_MOBILEtt); + type_v.push_back(OBJECT_MOBILEft); + type_v.push_back(OBJECT_MOBILEit); + } } pBest = CObjectManager::GetInstancePointer()->Radar(pThis, type_v, 0.0f, 45.0f*Math::PI/180.0f, 0.0f, 20.0f, false, FILTER_NONE, true); From a15b3e4dd4b5d3b6d2eb2c5618bdfe8892e53224 Mon Sep 17 00:00:00 2001 From: Fiftytwo Date: Fri, 22 Dec 2017 16:51:25 +0100 Subject: [PATCH 032/207] Add Trainer icons --- src/ui/controls/map.cpp | 9 ++++++--- src/ui/mainshort.cpp | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/ui/controls/map.cpp b/src/ui/controls/map.cpp index d372f2c4..dbee562f 100644 --- a/src/ui/controls/map.cpp +++ b/src/ui/controls/map.cpp @@ -876,10 +876,10 @@ void CMap::DrawObjectIcon(Math::Point pos, Math::Point dim, MapColor color, case OBJECT_MOBILErr: icon = 20; break; case OBJECT_MOBILErs: icon = 29; break; case OBJECT_MOBILEsa: icon = 21; break; - case OBJECT_MOBILEft: icon = 30; break; - case OBJECT_MOBILEtt: icon = 30; break; + case OBJECT_MOBILEft: icon = 6; break; + case OBJECT_MOBILEtt: icon = 5; break; case OBJECT_MOBILEwt: icon = 30; break; - case OBJECT_MOBILEit: icon = 30; break; + case OBJECT_MOBILEit: icon = 7; break; case OBJECT_MOBILEtg: icon = 45; break; case OBJECT_MOBILEdr: icon = 48; break; case OBJECT_APOLLO2: icon = 49; break; @@ -900,6 +900,9 @@ void CMap::DrawObjectIcon(Math::Point pos, Math::Point dim, MapColor color, case OBJECT_MOBILEtb: case OBJECT_MOBILEwb: case OBJECT_MOBILEib: + case OBJECT_MOBILEft: + case OBJECT_MOBILEtt: + case OBJECT_MOBILEit: m_engine->SetTexture("textures/interface/button4.png"); break; default: ; // button3.png } diff --git a/src/ui/mainshort.cpp b/src/ui/mainshort.cpp index b9617bcf..8766d1af 100644 --- a/src/ui/mainshort.cpp +++ b/src/ui/mainshort.cpp @@ -234,10 +234,10 @@ int CMainShort::GetShortcutIcon(ObjectType type) case OBJECT_MOBILErr: icon = 20; break; case OBJECT_MOBILErs: icon = 29; break; case OBJECT_MOBILEsa: icon = 21; break; - case OBJECT_MOBILEft: icon = 30; break; - case OBJECT_MOBILEtt: icon = 30; break; + case OBJECT_MOBILEft: icon = 6; break; + case OBJECT_MOBILEtt: icon = 5; break; case OBJECT_MOBILEwt: icon = 30; break; - case OBJECT_MOBILEit: icon = 30; break; + case OBJECT_MOBILEit: icon = 7; break; case OBJECT_MOBILEdr: icon = 48; break; case OBJECT_APOLLO2: icon = 49; break; default: return -1; @@ -250,6 +250,9 @@ int CMainShort::GetShortcutIcon(ObjectType type) case OBJECT_MOBILEtb: case OBJECT_MOBILEwb: case OBJECT_MOBILEib: + case OBJECT_MOBILEft: + case OBJECT_MOBILEtt: + case OBJECT_MOBILEit: return 192+icon; default: return 128+icon; From bd0c6d434478187f88b1b6d2ff864e51dd60fba3 Mon Sep 17 00:00:00 2001 From: Fiftytwo Date: Fri, 22 Dec 2017 17:02:37 +0100 Subject: [PATCH 033/207] Add PracticeBot helpfile --- src/script/cbottoken.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/script/cbottoken.cpp b/src/script/cbottoken.cpp index 71ca67d1..685001ab 100644 --- a/src/script/cbottoken.cpp +++ b/src/script/cbottoken.cpp @@ -219,6 +219,7 @@ std::string GetHelpFilename(ObjectType type) if ( type == OBJECT_MOBILEit ) helpfile = "object/bottr"; if ( type == OBJECT_MOBILEtg ) helpfile = "object/bottarg"; if ( type == OBJECT_MOBILEdr ) helpfile = "object/botdraw"; + if ( type == OBJECT_MOBILEpr ) helpfile = "object/bottr"; if ( type == OBJECT_APOLLO2 ) helpfile = "object/lrv"; if ( type == OBJECT_HUMAN ) helpfile = "object/human"; if ( type == OBJECT_MOTHER ) helpfile = "object/mother"; From f51f457023086a5f9b188d40d0d1e98c071cadea Mon Sep 17 00:00:00 2001 From: tomangelo2 Date: Sat, 10 Feb 2018 20:58:14 +0100 Subject: [PATCH 034/207] Narrowed TrackedTrainer tracks TrackedTrainers now have same width as other bots --- src/object/motion/motionvehicle.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/object/motion/motionvehicle.cpp b/src/object/motion/motionvehicle.cpp index be89509a..16f166e8 100644 --- a/src/object/motion/motionvehicle.cpp +++ b/src/object/motion/motionvehicle.cpp @@ -413,7 +413,7 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, m_object->SetPartPosition(2, Math::Vector(0.0f, 2.5f, 0.0f)); m_object->SetPartRotationZ(2, 0.0f); } - + if (type == OBJECT_MOBILEfb || type == OBJECT_MOBILEtb || type == OBJECT_MOBILEwb || @@ -523,7 +523,10 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, m_object->SetObjectParent(6, 0); modelManager->AddModelCopy("lem2t.mod", false, rank, m_object->GetTeam()); if (m_object->GetTrainer() || type == OBJECT_MOBILEtt) - m_object->SetPartPosition(6, Math::Vector(0.0f, 2.0f, -3.8f)); + { + m_object->SetPartPosition(6, Math::Vector(0.0f, 2.0f, -3.6f)); + m_object->SetPartScaleZ(6, 0.7f); + } else m_object->SetPartPosition(6, Math::Vector(0.0f, 2.0f, -3.0f)); @@ -534,7 +537,10 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, m_object->SetObjectParent(7, 0); modelManager->AddModelCopy("lem3t.mod", false, rank, m_object->GetTeam()); if (m_object->GetTrainer() || type == OBJECT_MOBILEtt) - m_object->SetPartPosition(7, Math::Vector(0.0f, 2.0f, 3.8f)); + { + m_object->SetPartPosition(7, Math::Vector(0.0f, 2.0f, 3.6f)); + m_object->SetPartScaleZ(7, 0.7f); + } else m_object->SetPartPosition(7, Math::Vector(0.0f, 2.0f, 3.0f)); } From 5e606336ca2a2c09081beb99f7422ce00be1a4fc Mon Sep 17 00:00:00 2001 From: tomangelo2 Date: Mon, 12 Feb 2018 15:11:14 +0100 Subject: [PATCH 035/207] Fixed TrackedTrainer tracks allignement --- src/object/motion/motionvehicle.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/object/motion/motionvehicle.cpp b/src/object/motion/motionvehicle.cpp index 16f166e8..c8f159d4 100644 --- a/src/object/motion/motionvehicle.cpp +++ b/src/object/motion/motionvehicle.cpp @@ -524,8 +524,8 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, modelManager->AddModelCopy("lem2t.mod", false, rank, m_object->GetTeam()); if (m_object->GetTrainer() || type == OBJECT_MOBILEtt) { - m_object->SetPartPosition(6, Math::Vector(0.0f, 2.0f, -3.6f)); - m_object->SetPartScaleZ(6, 0.7f); + m_object->SetPartPosition(6, Math::Vector(0.0f, 2.0f, -3.55f)); + m_object->SetPartScaleZ(6, 0.725f); } else m_object->SetPartPosition(6, Math::Vector(0.0f, 2.0f, -3.0f)); @@ -538,8 +538,8 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, modelManager->AddModelCopy("lem3t.mod", false, rank, m_object->GetTeam()); if (m_object->GetTrainer() || type == OBJECT_MOBILEtt) { - m_object->SetPartPosition(7, Math::Vector(0.0f, 2.0f, 3.6f)); - m_object->SetPartScaleZ(7, 0.7f); + m_object->SetPartPosition(7, Math::Vector(0.0f, 2.0f, 3.55f)); + m_object->SetPartScaleZ(7, 0.725f); } else m_object->SetPartPosition(7, Math::Vector(0.0f, 2.0f, 3.0f)); From 81b4d0e28bba86e1260a5ddb54844eec601878d1 Mon Sep 17 00:00:00 2001 From: Martin Doucha Date: Sat, 24 Feb 2018 20:39:29 +0100 Subject: [PATCH 036/207] Add Czech translation --- po/cs.po | 1859 +++++++++++++++++++++++++++ src/app/app.cpp | 12 + src/common/language.cpp | 1 + src/common/language.h | 3 +- src/ui/screen/screen_setup_game.cpp | 1 + 5 files changed, 1875 insertions(+), 1 deletion(-) create mode 100644 po/cs.po diff --git a/po/cs.po b/po/cs.po new file mode 100644 index 00000000..867a8482 --- /dev/null +++ b/po/cs.po @@ -0,0 +1,1859 @@ +# This file is part of the Colobot: Gold Edition source code +# Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam +# This file is distributed under the same license as the Colobot package. +# next_ghost , 2018. +# +msgid "" +msgstr "" +"Project-Id-Version: 0.1.11\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: DATE\n" +"PO-Revision-Date: 2018-02-24 20:39+01\n" +"Last-Translator: next_ghost \n" +"Language-Team: Czech \n" +"Language: Czech\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=((n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2);\n" +"X-Language: cs_CZ\n" +"X-Source-Language: en_US\n" + +msgid " or " +msgstr " nebo " + +msgid "\" [ \" expected" +msgstr "Očekáváno \"[\"" + +msgid "\" ] \" missing" +msgstr "Chybí \"]\"" + +#, c-format +msgid "%s: %d pts" +msgstr "%s: %d bodů" + +msgid "..behind" +msgstr "...za sebou" + +msgid "..in front" +msgstr "...před sebou" + +msgid "..power cell" +msgstr "...baterii" + +msgid "1) First click on the key you want to redefine." +msgstr "1) Nejprve klikněte na klávesu, kterou chcete změnit." + +msgid "2) Then press the key you want to use instead." +msgstr "2) Pak stiskněte klávesu, kterou chcete používat." + +msgid "<< Back \\Back to the previous screen" +msgstr "<< Zpět \\Zpět na předchozí obrazovku" + +msgid "<<< Sorry; mission failed >>>" +msgstr "<<< Bohužel; mise byla neúspěšná >>>" + +#, c-format +msgid "<<< Team %s finished! >>>" +msgstr "<<< Tým %s dokončil hru! >>>" + +#, c-format +msgid "<<< Team %s lost! >>>" +msgstr "<<< Tým %s prohrál! >>>" + +#, c-format +msgid "<<< Team %s recieved %d points >>>" +msgstr "<<< Tým %s získal %d bodů >>>" + +msgid "<<< Well done; mission accomplished >>>" +msgstr "<<< Gratulujeme; mise úspěšně splněna >>>" + +msgid "A label must be followed by \"for\"; \"while\"; \"do\" or \"switch\"" +msgstr "Za návěstím musí následovat \"for\", \"while\", \"do\" nebo \"switch\"" + +msgid "A variable can not be declared twice" +msgstr "Proměnnou nelze deklarovat dvakrát" + +msgid "Abort\\Abort the current mission" +msgstr "Ukončit\\Ukončit současnou misi" + +msgid "Access beyond array limit" +msgstr "Index mimo rozsah pole" + +msgid "Access to solution\\Shows the solution (detailed instructions for missions)" +msgstr "Zpřístupnit řešení\\Ukázat řešení (podrobné instrukce pro splnění mise)" + +msgid "Access to solutions\\Show program \"4: Solution\" in the exercises" +msgstr "Zpřístupnit řešení\\Ve cvičných úlohách zobrazit program \"4: Řešení\"" + +msgid "Add new program" +msgstr "Přidat nový program" + +msgid "Alien Queen" +msgstr "Královna vetřelců" + +msgid "Alien Queen killed" +msgstr "Královna vetřelců zabita" + +msgid "Already carrying something" +msgstr "Rameno už něco drží" + +msgid "Alternative camera mode\\Move sideways instead of rotating (in free camera)" +msgstr "Přepnout režim kamery\\Posun do stran místo otáčení (volná kamera)" + +msgid "Ambiguous call to overloaded function" +msgstr "Nejednoznačné volání přetížené funkce" + +msgid "Analysis already performed" +msgstr "Analýza již byla dokončena" + +msgid "Analysis performed" +msgstr "Analýza dokončena" + +msgid "Analyzes only organic matter" +msgstr "Analyzuje pouze organickou hmotu" + +msgid "Anisotropy level\\Anisotropy level" +msgstr "Úroveň anizotropie\\Úroveň anizotropie" + +msgid "Ant" +msgstr "Mravenec" + +msgid "Ant fatally wounded" +msgstr "Mravenec byl smrtelně raněn" + +msgid "Appearance\\Choose your appearance" +msgstr "Vzhled\\Upravte svůj vzhled" + +msgid "Apply changes\\Activates the changed settings" +msgstr "Uložit změny\\Aktivovat změny nastavení" + +msgid "Appropriate constructor missing" +msgstr "Chybí vhodný konstruktor" + +msgid "Assignment impossible" +msgstr "Přiřazení není povoleno" + +msgid "Autolab" +msgstr "Laboratoř" + +msgid "Automatic indent\\When program editing" +msgstr "Automatické odsazování\\Odsazování v editoru programu" + +msgid "Autosave interval\\How often your game will autosave" +msgstr "Interval ukládání\\Jak často bude hra automaticky uložena" + +msgid "Autosave slots\\How many autosave slots you'll have" +msgstr "Počet pozic\\Kolik automaticky uložených pozic bude hra udržovat" + +msgid "Autosave\\Enables autosave" +msgstr "Automatické ukládání\\Povolit automatické ukládání" + +msgid "Back" +msgstr "Zpět" + +msgid "Background sound:\\Volume of audio tracks" +msgstr "Zvuk na pozadí:\\Hlasitost hudebního doprovodu" + +msgid "Backward (\\key down;)" +msgstr "Dozadu (\\key down;)" + +msgid "Backward\\Moves backward" +msgstr "Dozadu\\Pohyb dozadu" + +msgid "Bad argument for \"new\"" +msgstr "Špatný argument pro příkaz \"new\"" + +msgid "Big indent\\Indent 2 or 4 spaces per level defined by braces" +msgstr "Velké odsazování\\Každý blok kódu odsazovat o 2 nebo 4 mezery" + +msgid "Black box" +msgstr "Černá skříňka" + +msgid "Blood\\Display blood when the astronaut is hit" +msgstr "Krev\\Při zranění kosmonauta zobrazit krev" + +msgid "Blue" +msgstr "Modrá" + +msgid "Blue flag" +msgstr "Modrá vlajka" + +msgid "Bot destroyed" +msgstr "Robot zničen" + +msgid "Bot factory" +msgstr "Továrna na roboty" + +msgid "Build a bot factory" +msgstr "Postavit továrnu na roboty" + +msgid "Build a converter" +msgstr "Postavit konvertor titanu" + +msgid "Build a defense tower" +msgstr "Postavit obrannou věž" + +msgid "Build a derrick" +msgstr "Postavit vrtnou věž" + +msgid "Build a destroyer" +msgstr "Postavit drtič" + +msgid "Build a exchange post" +msgstr "Postavit komunikační stanici" + +msgid "Build a legged grabber" +msgstr "Vyrobit chodící rameno" + +msgid "Build a legged orga shooter" +msgstr "Vyrobit chodící biokanón" + +msgid "Build a legged shooter" +msgstr "Vyrobit chodící kanón" + +msgid "Build a legged sniffer" +msgstr "Vyrobit chodící detektor" + +msgid "Build a lightning conductor" +msgstr "Postavit hromosvod" + +msgid "Build a nuclear power plant" +msgstr "Postavit jadernou elektrárnu" + +msgid "Build a phazer shooter" +msgstr "Vyrobit fázové dělo" + +msgid "Build a power cell factory" +msgstr "Postavit továrnu na baterie" + +msgid "Build a power station" +msgstr "Postavit nabíječku" + +msgid "Build a radar station" +msgstr "Postavit radar" + +msgid "Build a recycler" +msgstr "Vyrobit recyklátor" + +msgid "Build a repair center" +msgstr "Postavit opravnu" + +msgid "Build a research center" +msgstr "Postavit výzkumnou stanici" + +msgid "Build a shielder" +msgstr "Vyrobit mobilní štít" + +msgid "Build a subber" +msgstr "Vyrobit ponorku" + +msgid "Build a thumper" +msgstr "Vyrobit buchar" + +msgid "Build a tracked grabber" +msgstr "Vyrobit pásové rameno" + +msgid "Build a tracked orga shooter" +msgstr "Vyrobit pásový biokanón" + +msgid "Build a tracked shooter" +msgstr "Vyrobit pásový kanón" + +msgid "Build a tracked sniffer" +msgstr "Vyrobit pásový detektor" + +msgid "Build a wheeled grabber" +msgstr "Vyrobit pojízdné rameno" + +msgid "Build a wheeled orga shooter" +msgstr "Vyrobit pojízdný biokanón" + +msgid "Build a wheeled shooter" +msgstr "Vyrobit pojízdný kanón" + +msgid "Build a wheeled sniffer" +msgstr "Vyrobit pojízdný detektor" + +msgid "Build a winged grabber" +msgstr "Vyrobit létající rameno" + +msgid "Build a winged orga shooter" +msgstr "Vyrobit létající biokanón" + +msgid "Build a winged shooter" +msgstr "Vyrobit létající kanón" + +msgid "Build a winged sniffer" +msgstr "Vyrobit létající detektor" + +msgid "Build an autolab" +msgstr "Postavit laboratoř" + +msgid "Building completed" +msgstr "Budova dokončena" + +msgid "Building destroyed" +msgstr "Budova zničena" + +msgid "Button %1" +msgstr "Tlačítko %1" + +msgid "Calling an unknown function" +msgstr "Volání neznámé funkce" + +msgid "Camera (\\key camera;)" +msgstr "Kamera (\\key camera;)" + +msgid "Camera back\\Moves the camera backward" +msgstr "Oddálit kameru\\Posune kameru dozadu" + +msgid "Camera border scrolling\\Scrolling when the mouse touches right or left border" +msgstr "Posouvání na kraji obrazovky\\Posouvání kamery, když myší najedete na levý nebo pravý okraj obrazovky" + +msgid "Camera closer\\Moves the camera forward" +msgstr "Přiblížit kameru\\Posune kameru vpřed" + +msgid "Camera down\\Turns the camera down" +msgstr "Kameru dolů\\Otočí kameru dolů" + +msgid "Camera left\\Turns the camera left" +msgstr "Kameru doleva\\Otočí kameru doleva" + +msgid "Camera right\\Turns the camera right" +msgstr "Kameru doprava\\Otočí kameru doprava" + +msgid "Camera up\\Turns the camera up" +msgstr "Kameru nahoru\\Otočí kameru nahoru" + +msgid "Can not produce not researched object" +msgstr "Nejprve je třeba objekt vyzkoumat" + +msgid "Can not produce this object in this mission" +msgstr "V této misi nelze daný objekt vyrobit" + +msgid "Can't open file" +msgstr "Nelze otevřít soubor" + +msgid "Cancel" +msgstr "Zrušit" + +msgid "Cancel\\Cancel all changes" +msgstr "Zrušit\\Zrušit všechny změny" + +msgid "Challenges" +msgstr "Hlavolamy" + +msgid "Challenges in the chapter:" +msgstr "Hlavolamy v této kapitole:" + +msgid "Challenges\\Programming challenges" +msgstr "Hlavolamy\\Programátorské hlavolamy" + +msgid "Change camera\\Switches between onboard camera and following camera" +msgstr "Změnit kameru\\Přepíná mezi kamerou na robotu a za robotem" + +msgid "Change player\\Change player" +msgstr "Změnit hráče\\Změnit hráče" + +msgid "Chapters:" +msgstr "Kapitoly:" + +msgid "Cheat console\\Show cheat console" +msgstr "Systémová konzole\\Otevře příkazovou řádku pro zadávání cheatů" + +msgid "Checkpoint" +msgstr "Kontrolní bod" + +msgid "Class name expected" +msgstr "Očekáván název třídy" + +msgid "Climb\\Increases the power of the jet" +msgstr "Stoupat\\Zvýšit tah tryskového motoru" + +msgid "Clone program" +msgstr "Zkopírovat program" + +msgid "Clone selected program" +msgstr "Zkopírovat vybraný program" + +msgid "Close" +msgstr "Zavřít" + +msgid "Closing bracket missing" +msgstr "Chybí pravá závorka" + +msgid "Code battle" +msgstr "Souboj programátorů" + +msgid "Code battles" +msgstr "Souboj programátorů" + +msgid "Code battles\\Program your robot to be the best of them all!" +msgstr "Souboj programátorů\\Naprogramujte svého robota, aby byl ze všech nejlepší!" + +msgid "Colobot rules!" +msgstr "Colobot je pecka!" + +msgid "Colobot: Gold Edition" +msgstr "Colobot: Zlatá edice" + +msgid "Command line" +msgstr "Příkazová řádka" + +msgid "Compilation ok (0 errors)" +msgstr "Kompilace úspěšná (0 chyb)" + +msgid "Compile" +msgstr "Zkompilovat" + +msgid "Continue" +msgstr "Pokračovat" + +msgid "Continue\\Continue the current mission" +msgstr "Pokračovat\\Pokračovat v současné misi" + +msgid "Controls\\Keyboard, joystick and mouse settings" +msgstr "Ovládání\\Nastavení klávesnice, joysticku a myši" + +msgid "Converts ore to titanium" +msgstr "Vyrábí titan z rudy" + +msgid "Copy" +msgstr "Kopírovat" + +msgid "Copy (Ctrl+C)" +msgstr "Kopírovat (Ctrl+C)" + +msgid "Current mission saved" +msgstr "Současná mise uložena" + +msgid "Custom levels:" +msgstr "Uživatelské mapy:" + +msgid "Custom levels\\Levels from mods created by the users" +msgstr "Uživatelské mapy\\Mapy z modů vytvořených jinými hráči" + +msgid "Customize your appearance" +msgstr "Upravit vzhled" + +msgid "Cut (Ctrl+X)" +msgstr "Vyjmout (Ctrl+X)" + +msgid "Defense tower" +msgstr "Obranná věž" + +msgid "Delete mark" +msgstr "Smazat značku" + +msgid "Delete player\\Deletes the player from the list" +msgstr "Smazat hráče\\Smaže hráče ze seznamu" + +msgid "Delete\\Deletes the selected file" +msgstr "Smazat\\Smaže vybraný soubor" + +msgid "Derrick" +msgstr "Vrtná věž" + +msgid "Descend\\Reduces the power of the jet" +msgstr "Klesat\\Snížit tah tryskového motoru" + +msgid "Destroy" +msgstr "Zbourat" + +msgid "Destroy the building" +msgstr "Zbourat budovu" + +msgid "Destroyer" +msgstr "Drtič" + +msgid "Device\\Driver and resolution settings" +msgstr "Obrazovka\\Nastavení grafické karty a rozlišení" + +msgid "Dividing by zero" +msgstr "Dělení nulou" + +msgid "Do you really want to destroy the selected building?" +msgstr "Opravdu chcete zbourat vybranou budovu?" + +#, c-format +msgid "Do you want to delete %s's saved games?" +msgstr "Chcete smazat uložené hry hráče %s?" + +msgid "Doors blocked by a robot or another object" +msgstr "Dveře blokuje robot nebo jiný objekt" + +msgid "Down (\\key gdown;)" +msgstr "Dolů (\\key gdown;)" + +msgid "Drawer bot" +msgstr "Tužkobot" + +msgid "Dust\\Dust and dirt on bots and buildings" +msgstr "Prach\\Prach a špína na robotech a budovách" + +msgid "Dynamic lighting\\Mobile light sources" +msgstr "Dynamická světla\\Pohyblivé zdroje světla" + +msgid "Dynamic shadows ++\\Dynamic shadows + self shadowing" +msgstr "Dynamické stíny ++\\Objekty budou vrhat dynamické stíny na zem i na sebe" + +msgid "Dynamic shadows\\Beautiful shadows!" +msgstr "Dynamické stíny\\Hezčí stíny!" + +msgid "Edit the selected program" +msgstr "Upravit vybraný program" + +msgid "Egg" +msgstr "Vejce" + +msgid "End of block missing" +msgstr "Chybí konec bloku" + +msgid "Energy deposit (site for power station)" +msgstr "Zdroj energie (místo pro nabíječku)" + +msgid "Energy level" +msgstr "Stav baterie" + +msgid "Engineer" +msgstr "Inženýr" + +msgid "Error in instruction move" +msgstr "Chyba během příkazu move" + +msgid "Execute the selected program" +msgstr "Spustit vybraný program" + +msgid "Execute/stop" +msgstr "Spustit/zastavit" + +msgid "Exercises in the chapter:" +msgstr "Cvičení v této kapitole:" + +msgid "Exercises\\Programming exercises" +msgstr "Cvičné úlohy\\Programátorská cvičení" + +msgid "Explode (\\key action;)" +msgstr "Odpálit se (\\key action;)" + +msgid "Explosive" +msgstr "Výbušniny" + +msgid "Expression expected after =" +msgstr "Za znakem \"=\" očekáván výraz" + +msgid "Extend shield (\\key action;)" +msgstr "Zapnout štít (\\key action;)" + +msgid "Eyeglasses:" +msgstr "Brýle:" + +msgid "Face type:" +msgstr "Typ obličeje:" + +msgid "File not open" +msgstr "Soubor není otevřen" + +msgid "Filename:" +msgstr "Název souboru:" + +msgid "Film sequences\\Films before and after the missions" +msgstr "Filmové scény\\Animace na začátku a na konci mise" + +msgid "Finish" +msgstr "Cíl" + +msgid "Fixed mine" +msgstr "Nášlapná mina" + +msgid "Flat ground not large enough" +msgstr "Rovný terén není dost velký" + +msgid "Fog\\Fog" +msgstr "Mlha\\Mlha" + +msgid "Folder:" +msgstr "Adresář:" + +#, c-format +msgid "Folder: %s" +msgstr "Adresář: %s" + +msgid "Font size" +msgstr "Velikost písma" + +msgid "Forward" +msgstr "Vpřed" + +msgid "Forward (\\key up;)" +msgstr "Vpřed (\\key up;)" + +msgid "Forward\\Moves forward" +msgstr "Vpřed\\Pohyb vpřed" + +msgid "Found a site for a derrick" +msgstr "Objeveno místo pro vrtnou věž" + +msgid "Found a site for power station" +msgstr "Objeveno místo pro nabíječku" + +msgid "Found key A (site for derrick)" +msgstr "Nalezen klíč A (místo pro vrtnou věž)" + +msgid "Found key B (site for derrick)" +msgstr "Nalezen klíč B (místo pro vrtnou věž)" + +msgid "Found key C (site for derrick)" +msgstr "Nalezen klíč C (místo pro vrtnou věž)" + +msgid "Found key D (site for derrick)" +msgstr "Nalezen klíč D (místo pro vrtnou věž)" + +msgid "Free game" +msgstr "Volná hra" + +msgid "Free game on this planet:" +msgstr "Volná hra na této planetě:" + +msgid "Free game\\Free game without a specific goal" +msgstr "Volná hra\\Volná hra bez konkrétního cíle" + +msgid "Full screen\\Full screen or window mode" +msgstr "Celá obrazovka\\Zobrazit v okně nebo na celé obrazovce" + +msgid "Function already exists" +msgstr "Funkce již existuje" + +msgid "Function name missing" +msgstr "Chybí název funkce" + +msgid "Function needs return type \"void\"" +msgstr "Tato funkce musí mít návratový typ \"void\"" + +msgid "Game speed" +msgstr "Rychlost hry" + +msgid "Game\\Game settings" +msgstr "Hra\\Herní nastavení" + +msgid "Gantry crane" +msgstr "Jeřáb" + +msgid "Generating" +msgstr "Generuji" + +msgid "Gold Edition development by:" +msgstr "Vývojáři Zlaté edice:" + +msgid "Goto: destination occupied" +msgstr "Goto: cílové místo je obsazeno" + +msgid "Goto: inaccessible destination" +msgstr "Goto: neexistuje cesta k cíli" + +msgid "Grab or drop (\\key action;)" +msgstr "Vzít nebo položit (\\key action;)" + +msgid "Graphics\\Graphics settings" +msgstr "Grafika\\Nastavení grafiky" + +msgid "Green" +msgstr "Zelená" + +msgid "Green flag" +msgstr "Zelená vlajka" + +msgid "Ground not flat enough" +msgstr "Terén není dost rovný" + +msgid "Hair color:" +msgstr "Barva vlasů:" + +msgid "Head\\Face and hair" +msgstr "Hlava\\Obličej a vlasy" + +msgid "Help about selected object" +msgstr "Nápověda k vybranému objektu" + +msgid "Help balloons\\Explain the function of the buttons" +msgstr "Kontextová nápověda\\Popisky vysvětlující funkci tlačítek" + +msgid "Hex value out of range" +msgstr "Hexadecimální hodnota mimo rozsah" + +msgid "Higher speed\\Doubles speed" +msgstr "Dvojnásobná rychlost\\Zrychlí hru na dvojnásobek" + +msgid "Highest\\Highest graphic quality (lowest frame rate)" +msgstr "Nejvyšší\\Nejvyšší grafická kvalita (nejpomalejší vykreslování)" + +msgid "Home" +msgstr "Domů" + +msgid "Houston Mission Control" +msgstr "Řídící středisko Houston" + +msgid "Illegal object" +msgstr "Neplatný objekt" + +msgid "Impossible under water" +msgstr "Nelze provést pod vodou" + +msgid "Impossible when carrying an object" +msgstr "Na tuto akci potřebujete volné ruce" + +msgid "Impossible when flying" +msgstr "Nelze provést za letu" + +msgid "Impossible when moving" +msgstr "Nelze provést v pohybu" + +msgid "Impossible when swimming" +msgstr "Nelze provést během plavání" + +msgid "Inappropriate bot" +msgstr "Nevhodný robot" + +msgid "Inappropriate cell type" +msgstr "Nevhodný typ baterie" + +msgid "Inappropriate object" +msgstr "Nevhodný objekt" + +msgid "Incorrect index type" +msgstr "Špatný datový typ indexu" + +msgid "Infected by a virus; temporarily out of order" +msgstr "Infikováno virem; dočasně mimo provoz" + +msgid "Information exchange post" +msgstr "Komunikační stanice" + +msgid "Instruction \"break\" outside a loop" +msgstr "Příkaz \"break\" mimo cyklus" + +msgid "Instruction \"case\" missing" +msgstr "Chybí příkaz \"case\"" + +msgid "Instruction \"case\" outside a block \"switch\"" +msgstr "Příkaz \"case\" mimo blok \"switch\"" + +msgid "Instruction \"else\" without corresponding \"if\"" +msgstr "Příkaz \"else\" musí následovat po \"if\"" + +msgid "Instructions (\\key help;)" +msgstr "Instrukce (\\key help;)" + +msgid "Instructions after the final closing brace" +msgstr "Příkazy za koncem posledního bloku" + +msgid "Instructions for the mission (\\key help;)" +msgstr "Instrukce k misi (\\key help;)" + +msgid "Instructions from Houston" +msgstr "Instrukce z Houstonu" + +msgid "Instructions\\Shows the instructions for the current mission" +msgstr "Instrukce\\Zobrazí instrukce pro aktuální misi" + +msgid "Internal error - tell the developers" +msgstr "Vnitřní chyba - oznamte ji vývojářům" + +msgid "Invalid universal character name" +msgstr "Neplatný kód znaku" + +msgid "Invert\\Invert values on this axis" +msgstr "Obrátit\\Obrátit hodnoty na této ose" + +msgid "Jet temperature" +msgstr "Teplota tryskového motoru" + +msgid "Key A" +msgstr "Klíč A" + +msgid "Key B" +msgstr "Klíč B" + +msgid "Key C" +msgstr "Klíč C" + +msgid "Key D" +msgstr "Klíč D" + +msgid "Keyword \"while\" missing" +msgstr "Chybí klíčové slovo \"while\"" + +msgid "Keyword help(\\key cbot;)" +msgstr "Nápověda ke klíčovému slovu (\\key cbot;)" + +msgid "LOADING" +msgstr "NAČÍTÁNÍ" + +msgid "Legged grabber" +msgstr "Chodící rameno" + +msgid "Legged orga shooter" +msgstr "Chodící biokanón" + +msgid "Legged shooter" +msgstr "Chodící kanón" + +msgid "Legged sniffer" +msgstr "Chodící detektor" + +msgid "Levels in this chapter:" +msgstr "Mapy v této kapitole:" + +msgid "Lightning conductor" +msgstr "Hromosvod" + +msgid "List of objects" +msgstr "Seznam objektů" + +msgid "List of saved missions" +msgstr "Seznam uložených misí" + +msgid "Load a saved mission" +msgstr "Nahrát uloženou misi" + +msgid "Load\\Load a saved mission" +msgstr "Nahrát\\Nahrát uloženou misi" + +msgid "Load\\Loads the selected mission" +msgstr "Nahrát\\Nahraje vybranou misi" + +msgid "Loading basic level settings" +msgstr "Načítám základní nastavení mapy" + +msgid "Loading finished!" +msgstr "Nahrávání dokončeno!" + +msgid "Loading music" +msgstr "Načítám hudbu" + +msgid "Loading objects" +msgstr "Načítám objekty" + +msgid "Loading terrain" +msgstr "Načítám terén" + +msgid "Lower speed\\Decrease speed by half" +msgstr "Poloviční rychlost\\Sníží rychlost hry na polovinu" + +msgid "Lowest\\Minimum graphic quality (highest frame rate)" +msgstr "Nejnižší\\Nejnižší grafická kvalita (nejrychlejší vykreslování)" + +msgid "Lunar Roving Vehicle" +msgstr "Lunar Roving Vehicle" + +msgid "MSAA\\Multisample anti-aliasing" +msgstr "MSAA\\Vícevzorkové vyhlazování hran" + +msgid "Maximize" +msgstr "Maximalizovat" + +msgid "Minimize" +msgstr "Minimalizovat" + +msgid "Mipmap level\\Mipmap level" +msgstr "Úroveň mipmap\\Úroveň mipmap" + +msgid "Missing end quote" +msgstr "Chybí koncová uvozovka" + +msgid "Missing hex digits after escape sequence" +msgstr "Za zástupnou sekvencí chybí hexadecimální číslice" + +msgid "Mission name" +msgstr "Název mise" + +msgid "Missions" +msgstr "Mise" + +msgid "Missions on this planet:" +msgstr "Mise na této planetě:" + +msgid "Missions\\Select mission" +msgstr "Mise\\Vyberte misi" + +msgid "Mouse inversion X\\Inversion of the scrolling direction on the X axis" +msgstr "Vodorovné převrácení posunu\\Při vodorovném posunu kamery myší pousouvat opačným směrem" + +msgid "Mouse inversion Y\\Inversion of the scrolling direction on the Y axis" +msgstr "Svislé převrácení posunu\\Při svislém posunu kamery myší pousouvat opačným směrem" + +msgid "Move selected program down" +msgstr "Posunout vybraný program níže" + +msgid "Move selected program up" +msgstr "Posunout vybraný program výše" + +msgid "Mute\\No sound" +msgstr "Ticho\\Bez zvuku" + +msgid "Name:" +msgstr "Jméno:" + +msgid "Negative value rejected by \"throw\"" +msgstr "\"throw\" nepřijímá záporné hodnoty" + +msgid "Nest" +msgstr "Hnízdo" + +msgid "New" +msgstr "Nový" + +msgid "New ..." +msgstr "Nový..." + +msgid "New bot available" +msgstr "Robot vyroben" + +msgid "Next" +msgstr "Další" + +msgid "Next object\\Selects the next object" +msgstr "Další objekt\\Vybere následující objekt" + +msgid "No" +msgstr "Ne" + +msgid "No energy in the subsoil" +msgstr "Pod povrchem není zdroj energie" + +msgid "No flag nearby" +msgstr "Poblíž není žádná vlajka" + +msgid "No function running" +msgstr "Neběží žádná funkce" + +msgid "No function with this name accepts this kind of parameter" +msgstr "Žádná funkce s tímto názvem nepřijímá parametry těchto typů" + +msgid "No function with this name accepts this number of parameters" +msgstr "Žádná funkce s tímto názvem nepřijímá tento počet parametrů" + +msgid "No information exchange post within range" +msgstr "Žádná komunikační stanice v dosahu" + +msgid "No more energy" +msgstr "Došla baterie" + +msgid "No ore in the subsoil" +msgstr "Pod porvchem není žádná ruda" + +msgid "No power cell" +msgstr "Chybí baterie" + +msgid "No titanium" +msgstr "Žádný titan" + +msgid "No titanium around" +msgstr "Není tu žádný titan" + +msgid "No titanium ore to convert" +msgstr "Žádná titanová ruda ke zpracování" + +msgid "No titanium to transform" +msgstr "Žádný titan ke zpracování" + +msgid "No uranium to transform" +msgstr "Žádný uran ke zpracování" + +msgid "No userlevels installed!" +msgstr "Žádné uživatelské mapy nejsou nainstalovány!" + +msgid "Non-void function needs \"return;\"" +msgstr "Pokud funkce nemá návratový typ \"void\", musí končit příkazem \"return;\"" + +msgid "Normal size" +msgstr "Normální velikost" + +msgid "Normal\\Normal graphic quality" +msgstr "Normální\\Normální grafická kvalita" + +msgid "Normal\\Normal sound volume" +msgstr "Normální\\Normální hlasitost zvuku" + +msgid "Not enough energy" +msgstr "Málo energie" + +msgid "Not enough energy yet" +msgstr "Je třeba načerpat více energie" + +msgid "Not found anything to destroy" +msgstr "Není co zničit" + +msgid "Nothing to analyze" +msgstr "Není co analyzovat" + +msgid "Nothing to drop" +msgstr "Není co položit" + +msgid "Nothing to grab" +msgstr "Není co zvednout" + +msgid "Nothing to recycle" +msgstr "Není co recyklovat" + +msgid "Nuclear power cell" +msgstr "Jaderná baterie" + +msgid "Nuclear power cell available" +msgstr "Jaderná baterie vyrobena" + +msgid "Nuclear power station" +msgstr "Jaderná elektrárna" + +msgid "Number missing" +msgstr "Chybí číslo" + +msgid "Number of insects detected" +msgstr "Počet nalezených brouků" + +msgid "Number of particles\\Explosions, dust, reflections, etc." +msgstr "Počet částic\\Výbuchy, prach, odlesky, atd." + +msgid "OK" +msgstr "OK" + +msgid "OK\\Choose the selected player" +msgstr "OK\\Vybrat tohoto hráče" + +msgid "OK\\Close program editor and return to game" +msgstr "OK\\Zavřít editor programu a pokračovat ve hře" + +msgid "Object too close" +msgstr "Objekt je příliš blízko" + +msgid "Octal value out of range" +msgstr "Oktalová hodnota mimo rozsah" + +msgid "One step" +msgstr "Jeden krok" + +msgid "Open" +msgstr "Otevřít" + +msgid "Open (Ctrl+O)" +msgstr "Otevřít (Ctrl+O)" + +msgid "Opening brace missing" +msgstr "Chybí levá složená závorka" + +msgid "Opening bracket missing" +msgstr "Chybí levá závorka" + +msgid "Operation impossible with value \"nan\"" +msgstr "Tuto operaci nelze provést s hodnotou \"nan\"" + +msgid "Options" +msgstr "Nastavení" + +msgid "Options\\Preferences" +msgstr "Nastavení\\Volby" + +msgid "Organic matter" +msgstr "Organická hmota" + +msgid "Origin of last message\\Shows where the last message was sent from" +msgstr "Zdroj poslední zprávy\\Zobrazí objekt, který poslal poslední zprávu" + +msgid "Original game developed by:" +msgstr "Vývojáři původní hry:" + +msgid "Parameters missing" +msgstr "Některé parametry nejsou vyplněné" + +msgid "Particles in the interface\\Steam clouds and sparks in the interface" +msgstr "Částice v uživatelském rozhraní\\Obláčky páry a jiskry v uživatelském rozhraní" + +msgid "Paste (Ctrl+V)" +msgstr "Vložit (Ctrl+V)" + +msgid "Pause blur\\Blur the background on the pause screen" +msgstr "Rozmazání při pauze\\Rozmazat pozadí při pozastavení hry" + +msgid "Pause in background\\Pause the game when the window is unfocused" +msgstr "Pauza na pozadí\\Pozastavit hru, když přepnete do jiného okna" + +msgid "Pause/continue" +msgstr "Pozastavit/pokračovat" + +msgid "Pause\\Pause the game without opening menu" +msgstr "Pauza\\Pozastaví hru bez otevření menu" + +msgid "Phazer shooter" +msgstr "Fázové dělo" + +msgid "Photography" +msgstr "Fotografie" + +msgid "Place occupied" +msgstr "Místo je obsazeno" + +msgid "Planets:" +msgstr "Planety:" + +msgid "Plans for defense tower available" +msgstr "Plány pro obrannou věž jsou k dispozici" + +msgid "Plans for nuclear power plant available" +msgstr "Plány pro jadernou elektrárnu jsou k dispozici" + +msgid "Plans for phazer shooter available" +msgstr "Plány pro fázové dělo jsou k dispozici" + +msgid "Plans for shielder available" +msgstr "Plány pro mobilní štít jsou k dispozici" + +msgid "Plans for shooter available" +msgstr "Plány pro kanón jsou k dispozici" + +msgid "Plans for thumper available" +msgstr "Plány pro buchar jsou k dispozici" + +msgid "Plans for tracked robots available" +msgstr "Plány pro pásové roboty jsou k dispozici" + +msgid "Plant a flag" +msgstr "Umístit vlajku" + +msgid "Play\\Start mission!" +msgstr "Spustit\\Zahájit misi!" + +msgid "Player" +msgstr "Hráč" + +msgid "Player name" +msgstr "Jméno hráče" + +msgid "Player's name" +msgstr "Jméno hráče" + +msgid "Power cell" +msgstr "Baterie" + +msgid "Power cell available" +msgstr "Baterie vyrobena" + +msgid "Power cell factory" +msgstr "Továrna na baterie" + +msgid "Power station" +msgstr "Nabíječka" + +msgid "Practice bot" +msgstr "Cvičný robot" + +msgid "Press \\key help; to read instructions on your SatCom" +msgstr "Pro přečtení instrukcí přes SatKom stiskněte \\key help;" + +msgid "Previous" +msgstr "Předchozí" + +msgid "Previous object\\Selects the previous object" +msgstr "Předchozí objekt\\Vybere předchozí objekt" + +msgid "Previous selection (\\key desel;)" +msgstr "Předchozí výběr (\\key desel;)" + +msgid "Private element" +msgstr "Soukromý prvek" + +msgid "Private\\Private folder" +msgstr "Soukromý\\Soukromý adresář" + +msgid "Processing level file" +msgstr "Zpracovávám soubor mise" + +msgid "Program cloned" +msgstr "Program byl zkopírován" + +msgid "Program editor" +msgstr "Editor kódu" + +msgid "Program finished" +msgstr "Program doběhl" + +msgid "Program infected by a virus" +msgstr "Program byl infikován virem" + +msgid "Programming exercises" +msgstr "Cvičné úlohy" + +msgid "Programming help" +msgstr "Nápověda" + +msgid "Programming help (\\key prog;)" +msgstr "Nápověda (\\key prog;)" + +msgid "Programming help\\Gives more detailed help with programming" +msgstr "Nápověda\\Zobrazí nápovědu pro psaní programů" + +msgid "Programs dispatched by Houston" +msgstr "Program poslaný z Houstonu" + +msgid "Public required" +msgstr "Tato definice musí být veřejná (public)" + +msgid "Public\\Common folder" +msgstr "Veřejný\\Sdílený adresář" + +msgid "Quake at explosions\\The screen shakes at explosions" +msgstr "Otřesy při výbuchu\\Při výbuchu zatřást obrazovkou" + +msgid "Quick load\\Immediately load game" +msgstr "Rychlé načtení\\Okamžitě načte poslední uloženou hru" + +msgid "Quick save\\Immediately save game" +msgstr "Rychlé uložení\\Okamžitě uloží hru" + +msgid "Quicksave slot not found" +msgstr "Nebyla nalezena žádná rychle uložená hra" + +msgid "Quit\\Quit Colobot: Gold Edition" +msgstr "Ukončit\\Ukončit Colobot: Zlatou edici" + +msgid "Quit\\Quit the current mission or exercise" +msgstr "Konec\\Ukončí misi nebo cvičnou úlohu" + +msgid "Radar station" +msgstr "Radar" + +msgid "Read error" +msgstr "Chyba při čtení" + +msgid "Recorder" +msgstr "Záznamník" + +msgid "Recycle (\\key action;)" +msgstr "Recyklovat (\\key action;)" + +msgid "Recycler" +msgstr "Recyklátor" + +msgid "Red" +msgstr "Červená" + +msgid "Red flag" +msgstr "Červená vlajka" + +msgid "Reflections on the buttons \\Shiny buttons" +msgstr "Odlesky na tlačítkách\\Blyštivá tlačítka" + +msgid "Remains of Apollo mission" +msgstr "Pozůstatky mise Apollo" + +msgid "Remove a flag" +msgstr "Odstranit vlajku" + +msgid "Remove selected program" +msgstr "Smazat vybraný program" + +msgid "Render distance\\Maximum visibility" +msgstr "Vzdálenost horizontu\\Maximální viditelná vzdálenost" + +msgid "Repair center" +msgstr "Opravna" + +msgid "Research center" +msgstr "Výzkumná stanice" + +msgid "Research program already performed" +msgstr "Výzkum již byl dokončen" + +msgid "Research program completed" +msgstr "Výzkum dokončen" + +msgid "Reserved keyword of CBOT language" +msgstr "Vyhrazené klíčové slovo jazyka CBOT" + +msgid "Resolution" +msgstr "Rozlišení" + +msgid "Resolution:" +msgstr "Rozlišení:" + +msgid "Resources" +msgstr "Zdroje" + +msgid "Restart\\Restart the mission from the beginning" +msgstr "Restartovat\\Restartovat misi od začátku" + +msgid "Restoring CBot execution state" +msgstr "Obnovuji stav spuštěných programů" + +msgid "Restoring saved objects" +msgstr "Obnovuji uložené objekty" + +msgid "Results" +msgstr "Výsledky" + +msgid "Return to start" +msgstr "Zpět na začátek" + +msgid "Robbie" +msgstr "Robbie" + +msgid "Ruin" +msgstr "Trosky" + +msgid "Run research program for defense tower" +msgstr "Spustit výzkum obranných věží" + +msgid "Run research program for legged bots" +msgstr "Spustit výzkum chodících robotů" + +msgid "Run research program for nuclear power" +msgstr "Spustit výzkum jaderné energie" + +msgid "Run research program for orga shooter" +msgstr "Spustit výzkum biokanónů" + +msgid "Run research program for phazer shooter" +msgstr "Spustit výzkum fázového děla" + +msgid "Run research program for shielder" +msgstr "Spustit výzkum mobilního štítu" + +msgid "Run research program for shooter" +msgstr "Spustit výzkum kanónů" + +msgid "Run research program for thumper" +msgstr "Spustit výzkum bucharu" + +msgid "Run research program for tracked bots" +msgstr "Spustit výzkum pásových robotů" + +msgid "Run research program for winged bots" +msgstr "Spustit výzkum létajících robotů" + +msgid "SatCom" +msgstr "SatKom" + +msgid "Satellite report" +msgstr "Informace ze satelitu" + +msgid "Save" +msgstr "Uložit" + +msgid "Save (Ctrl+S)" +msgstr "Uložit (Ctrl+S)" + +msgid "Save the current mission" +msgstr "Uložit současnou misi" + +msgid "Save\\Save the current mission" +msgstr "Uložit\\Uložit současnou misi" + +msgid "Save\\Saves the current mission" +msgstr "Uložit\\Uloží současnou misi" + +msgid "Select the astronaut\\Selects the astronaut" +msgstr "Vybrat kosmonauta\\Vybere kosmonauta" + +msgid "Semicolon terminator missing" +msgstr "Chybí středník" + +msgid "Shadow resolution\\Higher means better range and quality, but slower" +msgstr "Rozlišení stínů\\Více znamená lepší kvalitu, ale pomalejší vykreslování" + +msgid "Shield level" +msgstr "Stav štítu" + +msgid "Shield radius" +msgstr "Dosah štítu" + +msgid "Shielder" +msgstr "Mobilní štít" + +msgid "Shoot (\\key action;)" +msgstr "Vystřelit (\\key action;)" + +msgid "Show if the ground is flat" +msgstr "Ukázat rovnost terénu" + +msgid "Show the place" +msgstr "Ukázat místo" + +msgid "Show the range" +msgstr "Zobrazit dosah" + +msgid "Show the solution" +msgstr "Ukázat řešení" + +msgid "Sign \" : \" missing" +msgstr "Chybí znak \":\"" + +msgid "Simple shadows\\Shadows spots on the ground" +msgstr "Jednoduché stíny\\Kruhové stíny na zemi" + +msgid "Size 1" +msgstr "Velikost 1" + +msgid "Size 2" +msgstr "Velikost 2" + +msgid "Size 3" +msgstr "Velikost 3" + +msgid "Size 4" +msgstr "Velikost 4" + +msgid "Size 5" +msgstr "Velikost 5" + +msgid "Sniff (\\key action;)" +msgstr "Hledat podzemní zdroje (\\key action;)" + +msgid "Solution" +msgstr "Řešení" + +msgid "Sound effects:\\Volume of engines, voice, shooting, etc." +msgstr "Zvukové efekty:\\Hlasitost motorů, hlasů, střelby, atd." + +msgid "Sound\\Music and game sound volume" +msgstr "Zvuk\\Hlasitost hudby a zvukových efektů" + +msgid "Spaceship" +msgstr "Raketa" + +msgid "Spaceship ruin" +msgstr "Trosky rakety" + +msgid "Spider" +msgstr "Pavouk" + +msgid "Spider fatally wounded" +msgstr "Pavouk byl smrtelně raněn" + +msgid "Stack overflow" +msgstr "Přetečení zásobníku" + +msgid "Standard action\\Standard action of the bot (take/grab, shoot, sniff, etc)" +msgstr "Použít nástroj\\Provede akci s hlavním nástrojem robota (zvedákem, kanónem, detektorem, atd.)" + +msgid "Standard controls\\Standard key functions" +msgstr "Výchozí mapování klávesnice\\Výchozí nastavení kláves" + +msgid "Standard speed\\Reset speed to normal" +msgstr "Normální rychlost\\Vrátí rychlost hry do normálu" + +msgid "Standard\\Standard appearance settings" +msgstr "Výchozí\\Výchozí nastavení vzhledu" + +msgid "Start" +msgstr "Start" + +msgid "Starting..." +msgstr "Startuji..." + +msgid "Still working ..." +msgstr "Zpracovávám..." + +msgid "String missing" +msgstr "Chybí textový řetězec" + +msgid "Strip color:" +msgstr "Barva proužků:" + +msgid "Subber" +msgstr "Ponorka" + +msgid "Suit color:" +msgstr "Barva skafandru:" + +msgid "Suit\\Astronaut suit" +msgstr "Skafandr\\Kosmonautův skafandr" + +msgid "Summary:" +msgstr "Popis:" + +msgid "Survival kit" +msgstr "Vybavení pro přežití" + +msgid "Switch bots <-> buildings" +msgstr "Přepnout roboti <-> budovy" + +msgid "Take off to finish the mission" +msgstr "Dokončit misi a odletět" + +msgid "Target" +msgstr "Cíl" + +msgid "Target bot" +msgstr "Cvičný cíl" + +msgid "Terrain relief" +msgstr "Výšková mapa" + +msgid "Texture filtering\\Texture filtering" +msgstr "Filtrování textur\\Filtrování textur" + +msgid "Textures" +msgstr "Textury" + +msgid "The battle has ended" +msgstr "Souboj skončil" + +msgid "The expression must return a boolean value" +msgstr "Výraz musí vracet booleovskou hodnotu" + +msgid "The function returned no value" +msgstr "Funkce nevrátila žádnou hodnotu" + +msgid "The mission is not accomplished yet (press \\key help; for more details)" +msgstr "Mise ještě nebyla splněna (pro podrobnosti stiskněte \\key help;)" + +msgid "The types of the two operands are incompatible" +msgstr "Operaci nelze provést s operandy těchto dvou typů" + +msgid "This class already exists" +msgstr "Tato třída již existuje" + +msgid "This class does not exist" +msgstr "Taková třída neexistuje" + +msgid "This is example code that cannot be run directly" +msgstr "Toto je vzorový kód, který nelze přímo spustit" + +msgid "This is not a member of this class" +msgstr "Tato třída nemá žádný takový prvek" + +msgid "This label does not exist" +msgstr "Toto návěstí neexistuje" + +msgid "This menu is for userlevels from mods, but you didn't install any" +msgstr "Toto menu je pro uživatelské mapy z modů, ale žádný nemáte nainstalovaný" + +msgid "This object is currently busy" +msgstr "Tento objekt je zaneprázdněn" + +msgid "This object is not a member of a class" +msgstr "Tento objekt není prvkem žádné třídy" + +msgid "This parameter needs a default value" +msgstr "Tento parametr musí mít přednastavenou hodnotu" + +msgid "This program is read-only, clone it to edit" +msgstr "Tento program je pouze pro čtení, klikněte do něj pro editaci" + +msgid "Thump (\\key action;)" +msgstr "Úder (\\key action;)" + +msgid "Thumper" +msgstr "Buchar" + +msgid "Titanium" +msgstr "Titan" + +msgid "Titanium available" +msgstr "Titan je k dispozici" + +msgid "Titanium deposit (site for derrick)" +msgstr "Titanové ložisko (místo pro vrtnou věž)" + +msgid "Titanium ore" +msgstr "Titanová ruda" + +msgid "Titanium too close" +msgstr "Titan je moc blízko" + +msgid "Titanium too far away" +msgstr "Titan je moc daleko" + +msgid "Too close to a building" +msgstr "Příliš blízko k budově" + +msgid "Too close to an existing flag" +msgstr "Příliš blízko k jiné vlajce" + +msgid "Too close to space ship" +msgstr "Příliš blízko k raketě" + +msgid "Too many flags of this color (maximum 5)" +msgstr "Příliš mnoho vlajek této barvy (maximálně 5)" + +msgid "Too many parameters" +msgstr "Příliš mnoho parametrů" + +msgid "Tracked grabber" +msgstr "Pásové rameno" + +msgid "Tracked orga shooter" +msgstr "Pásový biokanón" + +msgid "Tracked shooter" +msgstr "Pásový kanón" + +msgid "Tracked sniffer" +msgstr "Pásový detektor" + +msgid "Transforms only titanium" +msgstr "Zpracovává pouze titan" + +msgid "Transforms only uranium" +msgstr "Zpracovává pouze uran" + +msgid "Transmitted information" +msgstr "Odeslané informace" + +msgid "Turn left (\\key left;)" +msgstr "Otočit vlevo (\\key left;)" + +msgid "Turn left\\turns the bot to the left" +msgstr "Otočit vlevo\\Otočí robota doleva" + +msgid "Turn right (\\key right;)" +msgstr "Otočit vpravo (\\key right;)" + +msgid "Turn right\\turns the bot to the right" +msgstr "Otočit vpravo\\Otočí robota doprava" + +msgid "Type declaration missing" +msgstr "Chybí deklarace typu" + +msgid "Unable to control enemy objects" +msgstr "Nemůžete ovládat nepřátelské objekty" + +msgid "Undo (Ctrl+Z)" +msgstr "Zpět (Ctrl+Z)" + +msgid "Unit" +msgstr "Jednotka" + +msgid "Unknown Object" +msgstr "Neznámý objekt" + +msgid "Unknown command" +msgstr "Neznámý příkaz" + +msgid "Unknown escape sequence" +msgstr "Neznámá zástupná sekvence" + +msgid "Unknown function" +msgstr "Neznámá funkce" + +msgid "Up (\\key gup;)" +msgstr "Vzhůru (\\key gup;)" + +msgid "Uranium deposit (site for derrick)" +msgstr "Uranové ložisko (místo pro vrtnou věž)" + +msgid "Uranium ore" +msgstr "Uranová ruda" + +msgid "User levels" +msgstr "Uživatelské mapy" + +msgid "Variable name missing" +msgstr "Chybí název proměnné" + +msgid "Variable not declared" +msgstr "Proměnná nebyla deklarována" + +msgid "Variable not initialized" +msgstr "Proměnná nebyla nastavena" + +msgid "Vault" +msgstr "Trezor" + +msgid "Violet flag" +msgstr "Fialová vlajka" + +msgid "Void parameter" +msgstr "Prázdný parametr" + +msgid "Wasp" +msgstr "Vosa" + +msgid "Wasp fatally wounded" +msgstr "Vosa byla smrtelně raněna" + +msgid "Waste" +msgstr "Odpad" + +msgid "Wheeled grabber" +msgstr "Pojízdné rameno" + +msgid "Wheeled orga shooter" +msgstr "Pojízdný biokanón" + +msgid "Wheeled shooter" +msgstr "Pojízdný kanón" + +msgid "Wheeled sniffer" +msgstr "Pojízdný detektor" + +msgid "Winged grabber" +msgstr "Létající rameno" + +msgid "Winged orga shooter" +msgstr "Létající biokanón" + +msgid "Winged shooter" +msgstr "Létající kanón" + +msgid "Winged sniffer" +msgstr "Létající detektor" + +msgid "Withdraw shield (\\key action;)" +msgstr "Vypnout štít (\\key action;)" + +msgid "Worm" +msgstr "Červ" + +msgid "Worm fatally wounded" +msgstr "Červ byl smrtelně raněn" + +msgid "Wreckage" +msgstr "Vrak" + +msgid "Write error" +msgstr "Chyba při zápisu" + +msgid "Wrong type for the assignment" +msgstr "Špatný datový typ pro přiřazení" + +msgid "Yellow flag" +msgstr "Žlutá vlajka" + +msgid "Yes" +msgstr "Ano" + +msgid "You can fly with the keys (\\key gup;) and (\\key gdown;)" +msgstr "Můžete létat pomocí kláves (\\key gup;) a (\\key gdown;)" + +msgid "You can not carry a radioactive object" +msgstr "Nemůžete nosit radioaktivní předměty" + +msgid "You can not carry an object under water" +msgstr "Pod vodou nemůžete nosit předměty" + +#, c-format +msgid "You cannot use \"%s\" in this exercise (used: %d)" +msgstr "V tomto cvičení nesmíte použít \"%s\" (použito: %dx)" + +msgid "You found a usable object" +msgstr "Našli jste fungující objekt" + +#, c-format +msgid "You have to use \"%1$s\" at least once in this exercise (used: %2$d)" +msgid_plural "You have to use \"%1$s\" at least %3$d times in this exercise (used: %2$d)" +msgstr[0] "V tomto cvičení musíte \"%1$s\" použít alespoň jednou (použito: %2$dx)" +msgstr[1] "V tomto cvičení musíte \"%1$s\" použít alespoň %3$dx (použito: %2$dx)" +msgstr[2] "V tomto cvičení musíte \"%1$s\" použít alespoň %3$dx (použito: %2$dx)" + +#, c-format +msgid "You have to use \"%1$s\" at most once in this exercise (used: %2$d)" +msgid_plural "You have to use \"%1$s\" at most %3$d times in this exercise (used: %2$d)" +msgstr[0] "V tomto cvičení musíte \"%1$s\" použít nejvýše jednou (použito: %2$dx)" +msgstr[1] "V tomto cvičení musíte \"%1$s\" použít nejvýše %3$dx (použito: %2$dx)" +msgstr[2] "V tomto cvičení musíte \"%1$s\" použít nejvýše %3$dx (použito: %2$dx)" + +msgid "You must get on the spaceship to take off" +msgstr "Před odletem musíte nastoupit do rakety" + +msgid "Zoom mini-map" +msgstr "Přiblížit minimapu" + +msgid "\\Blue flags" +msgstr "\\Modré vlajky" + +msgid "\\Eyeglasses 1" +msgstr "\\Brýle 1" + +msgid "\\Eyeglasses 2" +msgstr "\\Brýle 2" + +msgid "\\Eyeglasses 3" +msgstr "\\Brýle 3" + +msgid "\\Eyeglasses 4" +msgstr "\\Brýle 4" + +msgid "\\Eyeglasses 5" +msgstr "\\Brýle 5" + +msgid "\\Face 1" +msgstr "\\Tvář 1" + +msgid "\\Face 2" +msgstr "\\Tvář 2" + +msgid "\\Face 3" +msgstr "\\Tvář 3" + +msgid "\\Face 4" +msgstr "\\Tvář 4" + +msgid "\\Green flags" +msgstr "\\Zelené vlajky" + +msgid "\\New player name" +msgstr "\\Jméno nového hráče" + +msgid "\\No eyeglasses" +msgstr "\\Bez brýlí" + +msgid "\\Raise the pencil" +msgstr "\\Zvednout tužku" + +msgid "\\Red flags" +msgstr "\\Červené vlajky" + +msgid "\\Return to Colobot: Gold Edition" +msgstr "\\Návrat do Colobotu: Zlaté edice" + +msgid "\\SatCom on standby" +msgstr "\\Zavřít SatKom" + +msgid "\\Start recording" +msgstr "\\Zapnout nahrávání" + +msgid "\\Stop recording" +msgstr "\\Vypnout nahrávání" + +msgid "\\Turn left" +msgstr "\\Otočit vlevo" + +msgid "\\Turn right" +msgstr "\\Otočit vpravo" + +msgid "\\Use the black pencil" +msgstr "\\Vybrat černou tužku" + +msgid "\\Use the blue pencil" +msgstr "\\Vybrat modrou tužku" + +msgid "\\Use the brown pencil" +msgstr "\\Vybrat hnědou tužku" + +msgid "\\Use the green pencil" +msgstr "\\Vybrat zelenou tužku" + +msgid "\\Use the orange pencil" +msgstr "\\Vybrat oranžovou tužku" + +msgid "\\Use the purple pencil" +msgstr "\\Vybrat fialovou tužku" + +msgid "\\Use the red pencil" +msgstr "\\Vybrat červenou tužku" + +msgid "\\Use the yellow pencil" +msgstr "\\Vybrat žlutou tužku" + +msgid "\\Violet flags" +msgstr "\\Fialové vlajky" + +msgid "\\Yellow flags" +msgstr "\\Žluté vlajky" + +msgid "colobot.info" +msgstr "colobot.info" + +msgid "epsitec.com" +msgstr "epsitec.com" diff --git a/src/app/app.cpp b/src/app/app.cpp index c780e20e..0865b3da 100644 --- a/src/app/app.cpp +++ b/src/app/app.cpp @@ -1699,6 +1699,10 @@ char CApplication::GetLanguageChar() const langChar = 'E'; break; + case LANGUAGE_CZECH: + langChar = 'C'; + break; + case LANGUAGE_GERMAN: langChar = 'D'; break; @@ -1750,6 +1754,10 @@ void CApplication::SetLanguage(Language language) { m_language = LANGUAGE_ENGLISH; } + else if (strncmp(envLang,"cs",2) == 0) + { + m_language = LANGUAGE_CZECH; + } else if (strncmp(envLang,"de",2) == 0) { m_language = LANGUAGE_GERMAN; @@ -1781,6 +1789,10 @@ void CApplication::SetLanguage(Language language) locale = ""; break; + case LANGUAGE_CZECH: + locale = "cs_CZ.utf8"; + break; + case LANGUAGE_ENGLISH: locale = "en_US.utf8"; break; diff --git a/src/common/language.cpp b/src/common/language.cpp index 3e004961..a87cca36 100644 --- a/src/common/language.cpp +++ b/src/common/language.cpp @@ -22,6 +22,7 @@ #include const std::map LANGUAGE_MAP = { + { LANGUAGE_CZECH, "cs" }, { LANGUAGE_ENGLISH, "en" }, { LANGUAGE_GERMAN, "de" }, { LANGUAGE_FRENCH, "fr" }, diff --git a/src/common/language.h b/src/common/language.h index 6d6fb080..bc80320b 100644 --- a/src/common/language.h +++ b/src/common/language.h @@ -32,7 +32,8 @@ enum Language LANGUAGE_FRENCH = 1, LANGUAGE_GERMAN = 2, LANGUAGE_POLISH = 3, - LANGUAGE_RUSSIAN = 4 + LANGUAGE_RUSSIAN = 4, + LANGUAGE_CZECH = 5 }; bool ParseLanguage(const std::string& str, Language& language); diff --git a/src/ui/screen/screen_setup_game.cpp b/src/ui/screen/screen_setup_game.cpp index b42a15b2..e9b77352 100644 --- a/src/ui/screen/screen_setup_game.cpp +++ b/src/ui/screen/screen_setup_game.cpp @@ -143,6 +143,7 @@ void CScreenSetupGame::CreateInterface() pli->SetState(STATE_SHADOW); // TODO: Add something like GetSupportedLanguages() and GetLanguageFriendlyName() for this pli->SetItemName(1+LANGUAGE_ENV, "[System default]"); + pli->SetItemName(1+LANGUAGE_CZECH, "Czech"); pli->SetItemName(1+LANGUAGE_ENGLISH, "English"); pli->SetItemName(1+LANGUAGE_FRENCH, "French"); pli->SetItemName(1+LANGUAGE_GERMAN, "German"); From ff0f22ef44d5e06671d2dc2cb8990fcb3760f935 Mon Sep 17 00:00:00 2001 From: tomangelo2 Date: Wed, 7 Mar 2018 15:46:30 +0100 Subject: [PATCH 037/207] Sort scoreboard First, the team with more points, then which team scored points faster --- src/level/robotmain.cpp | 19 ++++++++++++++----- src/level/scoreboard.cpp | 7 ++++--- src/level/scoreboard.h | 14 ++++++++++++-- 3 files changed, 30 insertions(+), 10 deletions(-) diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp index 3df62fe5..a19879af 100644 --- a/src/level/robotmain.cpp +++ b/src/level/robotmain.cpp @@ -4963,7 +4963,7 @@ Error CRobotMain::ProcessEndMissionTake() { if (!details.empty()) details += ", "; - details += StrUtils::Format(details_line.c_str(), GetTeamName(team).c_str(), m_scoreboard->GetScore(team)); + details += StrUtils::Format(details_line.c_str(), GetTeamName(team).c_str(), m_scoreboard->GetScore(team).points); } m_ui->GetDialog()->StartInformation( title, @@ -5870,7 +5870,7 @@ void CRobotMain::CreateCodeBattleInterface() : static_cast(pw->CreateEdit( pos, ddim, 0, static_cast(EVENT_SCOREBOARD+2*(numTeams-i-1)+1))); pl->SetTextAlign(Gfx::TEXT_ALIGN_RIGHT); pl->SetFontSize(m_codeBattleStarted ? Gfx::FONT_SIZE_SMALL : Gfx::FONT_SIZE_SMALL*0.75f); - m_codeBattleStarted ? pl->SetName(StrUtils::ToString(m_scoreboard->GetScore(team))) : static_cast(pl)->SetText(StrUtils::ToString(m_scoreboard->GetScore(team))); + m_codeBattleStarted ? pl->SetName(StrUtils::ToString(m_scoreboard->GetScore(team).points)) : static_cast(pl)->SetText(StrUtils::ToString(m_scoreboard->GetScore(team).points)); pos.x -= 57.5f/640.0f; pos.y += ddim.y; i++; @@ -5910,9 +5910,18 @@ void CRobotMain::UpdateCodeBattleInterface() Ui::CWindow* pw = static_cast(m_interface->SearchControl(EVENT_WINDOW6)); assert(pw != nullptr); - + std::set teams = GetAllTeams(); + std::vector sortedTeams(teams.begin(), teams.end()); + std::sort(sortedTeams.begin(), sortedTeams.end(), [this](int teamA, int teamB) + { + if (m_scoreboard->GetScore(teamA).points > m_scoreboard->GetScore(teamB).points) return true; //Team A have more points than B? + if (m_scoreboard->GetScore(teamA).points < m_scoreboard->GetScore(teamB).points) return false; //Team A have less points than B? + + if (m_scoreboard->GetScore(teamA).time < m_scoreboard->GetScore(teamB).time) return true; //Team A scored faster than B? + else return false; //Team A scored slower than B? + }); int i = 0; - for (int team : GetAllTeams()) + for (int team : sortedTeams) { Ui::CControl* pl; @@ -5922,7 +5931,7 @@ void CRobotMain::UpdateCodeBattleInterface() pl = pw->SearchControl(static_cast(EVENT_SCOREBOARD+2*i+1)); assert(pl != nullptr); - pl->SetName(StrUtils::ToString(m_scoreboard->GetScore(team))); + pl->SetName(StrUtils::ToString(m_scoreboard->GetScore(team).points)); i++; } diff --git a/src/level/scoreboard.cpp b/src/level/scoreboard.cpp index 7e4b5b04..83b74fe1 100644 --- a/src/level/scoreboard.cpp +++ b/src/level/scoreboard.cpp @@ -99,15 +99,16 @@ void CScoreboard::AddPoints(int team, int points) text = StrUtils::Format(text.c_str(), main->GetTeamName(team).c_str(), points); main->GetDisplayText()->DisplayText(text.c_str(), Math::Vector(0.0f,0.0f,0.0f), 15.0f, 60.0f, 10.0f, Ui::TT_WARNING); - m_score[team] += points; + m_score[team].points += points; + m_score[team].time = main->GetGameTime(); } -int CScoreboard::GetScore(int team) +Score CScoreboard::GetScore(int team) { return m_score[team]; } void CScoreboard::SetScore(int team, int points) { - m_score[team] = points; + m_score[team].points = points; } diff --git a/src/level/scoreboard.h b/src/level/scoreboard.h index 58a5acb5..97477e8b 100644 --- a/src/level/scoreboard.h +++ b/src/level/scoreboard.h @@ -32,6 +32,16 @@ class CObject; +/** + * \struct Score + * \brief Struct containing score of individual team and additional variables to allow sorting teams through different criteria +*/ +struct Score +{ + int points = 0; //! Team score + float time = 0; //! Time when points were scored +}; + /** * \class CScoreboard * \brief Scoreboard used to score complex code battles @@ -114,12 +124,12 @@ public: void ProcessEndTake(int team); void AddPoints(int team, int points); - int GetScore(int team); + Score GetScore(int team); void SetScore(int team, int score); private: std::vector> m_rulesKill = {}; std::vector> m_rulesEndTake = {}; - std::map m_score; + std::map m_score; int m_finishCounter = 0; }; \ No newline at end of file From 1b79e8409f5a1b6d4f050730dce2110e1bc32be3 Mon Sep 17 00:00:00 2001 From: tomangelo2 Date: Wed, 7 Mar 2018 21:25:35 +0100 Subject: [PATCH 038/207] Add switch to determine sort type You can set it in scene file with ScoreboardSortType SortBy="Name" or "Points" --- src/level/robotmain.cpp | 36 ++++++++++++++++++++++++++++-------- src/level/scoreboard.cpp | 10 ++++++++++ src/level/scoreboard.h | 13 ++++++++++++- 3 files changed, 50 insertions(+), 9 deletions(-) diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp index a19879af..d12d8af5 100644 --- a/src/level/robotmain.cpp +++ b/src/level/robotmain.cpp @@ -3563,6 +3563,22 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject) } continue; } + + if (line->GetCommand() == "ScoreboardSortType" && !resetObject) + { + if (line->GetParam("SortBy")->AsString() == "Points") + { + // Sort teams by points + m_scoreboard->SetSortType(SORT_POINTS); + } + else if (line->GetParam("SortBy")->AsString() == "Name") + { + // Sort teams alphabetically + m_scoreboard->SetSortType(SORT_ID); + } + continue; + } + if (line->GetCommand() == "ScoreboardKillRule" && !resetObject) { if (!m_scoreboard) @@ -5912,14 +5928,18 @@ void CRobotMain::UpdateCodeBattleInterface() assert(pw != nullptr); std::set teams = GetAllTeams(); std::vector sortedTeams(teams.begin(), teams.end()); - std::sort(sortedTeams.begin(), sortedTeams.end(), [this](int teamA, int teamB) - { - if (m_scoreboard->GetScore(teamA).points > m_scoreboard->GetScore(teamB).points) return true; //Team A have more points than B? - if (m_scoreboard->GetScore(teamA).points < m_scoreboard->GetScore(teamB).points) return false; //Team A have less points than B? - - if (m_scoreboard->GetScore(teamA).time < m_scoreboard->GetScore(teamB).time) return true; //Team A scored faster than B? - else return false; //Team A scored slower than B? - }); + if(m_scoreboard->GetSortType() == SORT_POINTS) + { + std::sort(sortedTeams.begin(), sortedTeams.end(), [this](int teamA, int teamB) + { + if (m_scoreboard->GetScore(teamA).points > m_scoreboard->GetScore(teamB).points) return true; //Team A have more points than B? + if (m_scoreboard->GetScore(teamA).points < m_scoreboard->GetScore(teamB).points) return false; //Team A have less points than B? + + if (m_scoreboard->GetScore(teamA).time < m_scoreboard->GetScore(teamB).time) return true; //Team A scored faster than B? + else return false; //Team A scored slower than B? + }); + } + int i = 0; for (int team : sortedTeams) { diff --git a/src/level/scoreboard.cpp b/src/level/scoreboard.cpp index 83b74fe1..8db62ff8 100644 --- a/src/level/scoreboard.cpp +++ b/src/level/scoreboard.cpp @@ -112,3 +112,13 @@ void CScoreboard::SetScore(int team, int points) { m_score[team].points = points; } + +SortType CScoreboard::GetSortType() +{ + return m_sorttype; +} + +void CScoreboard::SetSortType(SortType type) +{ + m_sorttype = type; +} diff --git a/src/level/scoreboard.h b/src/level/scoreboard.h index 97477e8b..f691e176 100644 --- a/src/level/scoreboard.h +++ b/src/level/scoreboard.h @@ -42,6 +42,12 @@ struct Score float time = 0; //! Time when points were scored }; +enum SortType +{ + SORT_ID, //Sort by team ID + SORT_POINTS, //Sort by points +}; + /** * \class CScoreboard * \brief Scoreboard used to score complex code battles @@ -55,6 +61,7 @@ struct Score * \section example Usage example * \code{.scene} * Scoreboard enable=true // enable the scoreboard + * ScoreboardSortType SortBy="Name" // sort teams alphabetically, another option is SortBy="Points", sorting teams in order of points * ScoreboardKillRule type=WheeledShooter team=1 score=500 // destruction of team 1's WheeledShooter gives 100 points to the team that destroyed it * ScoreboardKillRule type=TargetBot score=100 // destruction of TargetBot (any team) gives 100 points * ScoreboardEndTakeRule score=1000 // completion of EndMissionTake objectives for any team results in 1000 points for that team @@ -127,9 +134,13 @@ public: Score GetScore(int team); void SetScore(int team, int score); + SortType GetSortType(); + void SetSortType(SortType type); + private: std::vector> m_rulesKill = {}; std::vector> m_rulesEndTake = {}; std::map m_score; int m_finishCounter = 0; -}; \ No newline at end of file + SortType m_sorttype = SORT_ID; +}; From d371338920b3c00303c2d211ebdce0c7da40f4a4 Mon Sep 17 00:00:00 2001 From: tomangelo2 Date: Sun, 11 Mar 2018 17:00:17 +0100 Subject: [PATCH 039/207] Fix scoreboard sorting parameters --- src/level/parser/parserparam.cpp | 21 +++++++++++++++++++++ src/level/parser/parserparam.h | 3 +++ src/level/robotmain.cpp | 11 +---------- src/level/scoreboard.h | 2 +- 4 files changed, 26 insertions(+), 11 deletions(-) diff --git a/src/level/parser/parserparam.cpp b/src/level/parser/parserparam.cpp index 37773efa..3ccd7f9c 100644 --- a/src/level/parser/parserparam.cpp +++ b/src/level/parser/parserparam.cpp @@ -28,6 +28,7 @@ #include "common/resources/resourcemanager.h" #include "level/robotmain.h" +#include "level/scoreboard.h" #include "level/parser/parser.h" @@ -916,6 +917,26 @@ int CLevelParserParam::AsResearchFlag(int def) return AsResearchFlag(); } +int CLevelParserParam::ToSortType(std::string value) +{ + if (value == "Points" ) return SORT_POINTS; + if (value == "Name" ) return SORT_ID; + return Cast(value, "sorttype"); +} + +int CLevelParserParam::AsSortType() +{ + if (m_empty) + throw CLevelParserExceptionMissingParam(this); + return ToSortType(m_value); +} + +int CLevelParserParam::AsSortType(int def) +{ + if (m_empty) + return def; + return AsSortType(); +} Gfx::PyroType CLevelParserParam::ToPyroType(std::string value) { diff --git a/src/level/parser/parserparam.h b/src/level/parser/parserparam.h index c72be4f0..1261bb65 100644 --- a/src/level/parser/parserparam.h +++ b/src/level/parser/parserparam.h @@ -85,6 +85,7 @@ public: Gfx::EngineObjectType AsTerrainType(); int AsBuildFlag(); int AsResearchFlag(); + int AsSortType(); Gfx::PyroType AsPyroType(); Gfx::CameraType AsCameraType(); MissionType AsMissionType(); @@ -108,6 +109,7 @@ public: Gfx::EngineObjectType AsTerrainType(Gfx::EngineObjectType def); int AsBuildFlag(int def); int AsResearchFlag(int def); + int AsSortType(int def); Gfx::PyroType AsPyroType(Gfx::PyroType def); Gfx::CameraType AsCameraType(Gfx::CameraType def); MissionType AsMissionType(MissionType def); @@ -139,6 +141,7 @@ private: Gfx::EngineObjectType ToTerrainType(std::string value); int ToBuildFlag(std::string value); int ToResearchFlag(std::string value); + int ToSortType(std::string value); Gfx::PyroType ToPyroType(std::string value); Gfx::CameraType ToCameraType(std::string value); MissionType ToMissionType(std::string value); diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp index d12d8af5..eed48aae 100644 --- a/src/level/robotmain.cpp +++ b/src/level/robotmain.cpp @@ -3566,16 +3566,7 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject) if (line->GetCommand() == "ScoreboardSortType" && !resetObject) { - if (line->GetParam("SortBy")->AsString() == "Points") - { - // Sort teams by points - m_scoreboard->SetSortType(SORT_POINTS); - } - else if (line->GetParam("SortBy")->AsString() == "Name") - { - // Sort teams alphabetically - m_scoreboard->SetSortType(SORT_ID); - } + m_scoreboard->SetSortType(static_cast(line->GetParam("sort")->AsSortType() ) ); continue; } diff --git a/src/level/scoreboard.h b/src/level/scoreboard.h index f691e176..cd964de3 100644 --- a/src/level/scoreboard.h +++ b/src/level/scoreboard.h @@ -61,7 +61,7 @@ enum SortType * \section example Usage example * \code{.scene} * Scoreboard enable=true // enable the scoreboard - * ScoreboardSortType SortBy="Name" // sort teams alphabetically, another option is SortBy="Points", sorting teams in order of points + * ScoreboardSortType sort=Name // sort teams alphabetically, another option is sort=Points, sorting teams in order of points * ScoreboardKillRule type=WheeledShooter team=1 score=500 // destruction of team 1's WheeledShooter gives 100 points to the team that destroyed it * ScoreboardKillRule type=TargetBot score=100 // destruction of TargetBot (any team) gives 100 points * ScoreboardEndTakeRule score=1000 // completion of EndMissionTake objectives for any team results in 1000 points for that team From 0e6d22a54935250216a0feb8be5e1aaf98cfa0c4 Mon Sep 17 00:00:00 2001 From: B-CE <36107363+B-CE@users.noreply.github.com> Date: Sun, 18 Feb 2018 19:43:41 +0100 Subject: [PATCH 040/207] Fix clang compilation, fixes #1113 --- src/object/old_object.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/object/old_object.h b/src/object/old_object.h index 48b71ee7..7e2a195e 100644 --- a/src/object/old_object.h +++ b/src/object/old_object.h @@ -237,7 +237,7 @@ public: void SetMagnifyDamage(float factor) override; float GetMagnifyDamage() override; - void SetDamaging(bool damaging); + void SetDamaging(bool damaging) override; bool IsDamaging() override; void SetDying(DeathType deathType) override; From 9c649cd8b269517f9a8fd804047714a76ff34b3c Mon Sep 17 00:00:00 2001 From: B-CE Date: Thu, 1 Mar 2018 11:51:17 +0100 Subject: [PATCH 041/207] Update french translation --- po/fr.po | 299 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 154 insertions(+), 145 deletions(-) diff --git a/po/fr.po b/po/fr.po index a2877175..1dd2d7f4 100644 --- a/po/fr.po +++ b/po/fr.po @@ -1,12 +1,14 @@ # Didier Raboud , 2012, 2015, 2016. # Martin Quinson , 2016 +# B-CE, 2018 + msgid "" msgstr "" -"Project-Id-Version: Colobot 0.1.6\n" +"Project-Id-Version: Colobot 0.1.11\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: DATE\n" -"PO-Revision-Date: 2016-12-02 15:31+0100\n" -"Last-Translator: Martin Quinson \n" +"PO-Revision-Date: 2018-02-28 20:00+0100\n" +"Last-Translator: B-CE\n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -23,11 +25,11 @@ msgid "\" [ \" expected" msgstr "\" [ \" attendu" msgid "\" ] \" missing" -msgstr "\" ] \" attendu" +msgstr "\" ] \" manquant" #, c-format msgid "%s: %d pts" -msgstr "" +msgstr "%s: %d points" msgid "..behind" msgstr "..derrière" @@ -52,15 +54,15 @@ msgstr "<<< Désolé; mission échouée >>>" #, c-format msgid "<<< Team %s finished! >>>" -msgstr "" +msgstr "<<< L'équipe %s a terminé! >>>" #, c-format msgid "<<< Team %s lost! >>>" -msgstr "" +msgstr "<<< L'équipe %s a perdu! >>>" #, c-format msgid "<<< Team %s recieved %d points >>>" -msgstr "" +msgstr "<<< L'équipe %s a reçu %d points >>>" msgid "<<< Well done; mission accomplished >>>" msgstr "<<< Bravo; mission terminée >>>" @@ -78,7 +80,7 @@ msgid "Access beyond array limit" msgstr "Accès hors du tableau" msgid "Access to solution\\Shows the solution (detailed instructions for missions)" -msgstr "Accès à la solution\\Donne la solution" +msgstr "Accès à la solution\\Donne la solution (instructions détaillées pour la mission)" msgid "Access to solutions\\Show program \"4: Solution\" in the exercises" msgstr "Accès aux solutions\\Programme \"4: Solution\" dans les exercices" @@ -96,7 +98,7 @@ msgid "Already carrying something" msgstr "Porte déjà quelque chose" msgid "Alternative camera mode\\Move sideways instead of rotating (in free camera)" -msgstr "Mode caméra alternatif\\Déplacements latéraux au lieu des rotations (pour la caméra libre)" +msgstr "Mode caméra alternatif\\Déplacements latéraux au lieu des rotations (pour une caméra libre)" msgid "Ambiguous call to overloaded function" msgstr "Appel ambigu à une fonction surchargée" @@ -126,25 +128,25 @@ msgid "Apply changes\\Activates the changed settings" msgstr "Appliquer les changements\\Active les changements effectués" msgid "Appropriate constructor missing" -msgstr "Il n'y a pas de constructeur approprié" +msgstr "Constructeur approprié manquant" msgid "Assignment impossible" msgstr "Assignation impossible" msgid "Autolab" -msgstr "Laboratoire de matières organiques" +msgstr "Laboratoire d'analyse de matières organiques" msgid "Automatic indent\\When program editing" msgstr "Indentation automatique\\Pendant l'édition d'un programme" msgid "Autosave interval\\How often your game will autosave" -msgstr "Intervalle d'auto-sauvegarde\\À quels intervalles les parties vont-t-elles êtres sauvegardées automatiquement" +msgstr "Interval d'auto-sauvegarde\\À quels intervals les parties vont-t-elles êtres sauvegardées automatiquement" msgid "Autosave slots\\How many autosave slots you'll have" msgstr "Nombre d'auto-sauvegardes\\Combien d'auto-sauvegarde seront conservées" msgid "Autosave\\Enables autosave" -msgstr "Auto-sauvegarde\\Active l'auto-sauvegarde" +msgstr "Auto-sauvegarde\\Activer l'auto-sauvegarde" msgid "Back" msgstr "Page précédente" @@ -156,22 +158,25 @@ msgid "Backward (\\key down;)" msgstr "Recule (\\key down;)" msgid "Backward\\Moves backward" -msgstr "Reculer\\Moteur en arrière" +msgstr "Reculer\\Se déplacer en arrière" msgid "Bad argument for \"new\"" msgstr "Mauvais argument pour \"new\"" msgid "Big indent\\Indent 2 or 4 spaces per level defined by braces" -msgstr "Grande indentation\\Indente avec 2 ou 4 espaces" +msgstr "Grande indentation\\Indente avec 2 ou 4 espaces par niveau" msgid "Black box" msgstr "Boîte noire" msgid "Blood\\Display blood when the astronaut is hit" -msgstr "Sang\\Afficher du sang quand le cosmonaute touchés" +msgstr "Sang\\Afficher du sang quand le cosmonaute est touché" msgid "Blue" -msgstr "Bleu" +msgstr "Bleue" +# tocheck : for team (fem): bleue +# tocheck : for flag/pen/bot (masc): bleu +# + capital also to check msgid "Blue flag" msgstr "Drapeau bleu" @@ -183,109 +188,109 @@ msgid "Bot factory" msgstr "Fabrique de robots" msgid "Build a bot factory" -msgstr "Construit une fabrique de robots" +msgstr "Construire une fabrique de robots" msgid "Build a converter" -msgstr "Construit un convertisseur" +msgstr "Construire un convertisseur" msgid "Build a defense tower" -msgstr "Construit une tour" +msgstr "Construire une tour" msgid "Build a derrick" -msgstr "Construit un derrick" +msgstr "Construire un derrick" msgid "Build a destroyer" -msgstr "Construit un destructeur" +msgstr "Construire un destructeur" msgid "Build a exchange post" -msgstr "Construit une borne d'information" +msgstr "Construire une borne d'information" msgid "Build a legged grabber" -msgstr "Fabrique un déménageur à pattes" +msgstr "Fabriquer un déménageur à pattes" msgid "Build a legged orga shooter" -msgstr "Fabrique un orgaShooter à pattes" +msgstr "Fabriquer un tireur organique à pattes" msgid "Build a legged shooter" -msgstr "Fabrique un shooter à pattes" +msgstr "Fabriquer un tireur à pattes" msgid "Build a legged sniffer" -msgstr "Fabrique un renifleur à pattes" +msgstr "Fabriquer un renifleur à pattes" msgid "Build a lightning conductor" -msgstr "Construit un paratonnerre" +msgstr "Construire un paratonnerre" msgid "Build a nuclear power plant" -msgstr "Construit une centrale nucléaire" +msgstr "Construire une centrale nucléaire" msgid "Build a phazer shooter" -msgstr "Fabrique un robot phazer" +msgstr "Fabriquer un robot canon à phases" msgid "Build a power cell factory" -msgstr "Construit une fabrique de piles" +msgstr "Construire une fabrique de piles" msgid "Build a power station" -msgstr "Construit une station" +msgstr "Construire une station de recharge" msgid "Build a radar station" -msgstr "Construit un radar" +msgstr "Construire un radar" msgid "Build a recycler" -msgstr "Fabrique un robot recycleur" +msgstr "Fabriquer un robot recycleur" msgid "Build a repair center" -msgstr "Construit un centre de réparation" +msgstr "Construire un centre de réparation" msgid "Build a research center" -msgstr "Construit un centre de recherches" +msgstr "Construire un centre de recherches" msgid "Build a shielder" -msgstr "Fabrique un robot bouclier" +msgstr "Fabriquer un robot bouclier" msgid "Build a subber" -msgstr "Fabrique un robot sous-marin" +msgstr "Fabriquer un robot sous-marin" msgid "Build a thumper" -msgstr "Fabrique un robot secoueur" +msgstr "Fabriquer un robot secoueur" msgid "Build a tracked grabber" -msgstr "Fabrique un déménageur à chenilles" +msgstr "Fabriquer un déménageur à chenilles" msgid "Build a tracked orga shooter" -msgstr "Fabrique un orgaShooter à chenilles" +msgstr "Fabriquer un tireur organique à chenilles" msgid "Build a tracked shooter" -msgstr "Fabrique un shooter à chenilles" +msgstr "Fabriquer un tireur à chenilles" msgid "Build a tracked sniffer" -msgstr "Fabrique un renifleur à chenilles" +msgstr "Fabriquer un renifleur à chenilles" msgid "Build a wheeled grabber" -msgstr "Fabrique un déménageur à roues" +msgstr "Fabriquer un déménageur à roues" msgid "Build a wheeled orga shooter" -msgstr "Fabrique un orgaShooter à roues" +msgstr "Fabriquer un tireur organique à roues" msgid "Build a wheeled shooter" -msgstr "Fabrique un shooter à roues" +msgstr "Fabriquer un tireur à roues" msgid "Build a wheeled sniffer" -msgstr "Fabrique un renifleur à roues" +msgstr "Fabriquer un renifleur à roues" msgid "Build a winged grabber" -msgstr "Fabrique un déménageur volant" +msgstr "Fabriquer un déménageur volant" msgid "Build a winged orga shooter" -msgstr "Fabrique un orgaShooter volant" +msgstr "Fabriquer un tireur organique volant" msgid "Build a winged shooter" -msgstr "Fabrique un shooter volant" +msgstr "Fabriquer un tireur volant" msgid "Build a winged sniffer" -msgstr "Fabrique un renifleur volant" +msgstr "Fabriquer un renifleur volant" msgid "Build an autolab" -msgstr "Construit un laboratoire" +msgstr "Construire un laboratoire d'analyse de matières organiques" msgid "Building completed" msgstr "Bâtiment terminé" @@ -363,7 +368,7 @@ msgid "Checkpoint" msgstr "Indicateur" msgid "Class name expected" -msgstr "" +msgstr "Nom de classe attendu" msgid "Climb\\Increases the power of the jet" msgstr "Monter\\Augmenter la puissance du réacteur" @@ -415,7 +420,7 @@ msgid "Controls\\Keyboard, joystick and mouse settings" msgstr "Commandes\\Touches du clavier" msgid "Converts ore to titanium" -msgstr "Conversion minerai en titanium" +msgstr "Conversion de minerai en titane" msgid "Copy" msgstr "Copier" @@ -500,7 +505,7 @@ msgid "Dynamic shadows\\Beautiful shadows!" msgstr "Ombres dynamiques\\Magnifiques ombres !" msgid "Edit the selected program" -msgstr "Édite le programme sélectionné" +msgstr "Éditer le programme sélectionné" msgid "Egg" msgstr "Oeuf" @@ -509,7 +514,7 @@ msgid "End of block missing" msgstr "Il manque la fin du bloc" msgid "Energy deposit (site for power station)" -msgstr "Emplacement pour station" +msgstr "Emplacement pour une station de recharge ou une fabrique de pile" msgid "Energy level" msgstr "Niveau d'énergie" @@ -533,7 +538,7 @@ msgid "Exercises\\Programming exercises" msgstr "Programmation\\Exercices de programmation" msgid "Explode (\\key action;)" -msgstr "Exploser (\\key action;)" +msgstr "Détruire (\\key action;)" msgid "Explosive" msgstr "Explosif" @@ -560,7 +565,8 @@ msgid "Film sequences\\Films before and after the missions" msgstr "Séquences cinématiques\\Films avant ou après une mission" msgid "Finish" -msgstr "But" +msgstr "But/Objectif" +# OBJECT_END : GoalArea msgid "Fixed mine" msgstr "Mine fixe" @@ -572,7 +578,7 @@ msgid "Fog\\Fog" msgstr "Brouillard\\Nappes de brouillard" msgid "Folder:" -msgstr "Dans:" +msgstr "Dossier:" #, c-format msgid "Folder: %s" @@ -588,25 +594,25 @@ msgid "Forward (\\key up;)" msgstr "Avance (\\key up;)" msgid "Forward\\Moves forward" -msgstr "Avancer\\Moteur en avant" +msgstr "Avancer\\Se déplacer en avant" msgid "Found a site for a derrick" -msgstr "Emplacement pour derrick trouvé" +msgstr "Emplacement pour un derrick trouvé" msgid "Found a site for power station" -msgstr "Emplacement pour station trouvé" +msgstr "Emplacement pour station de recharge ou fabrique de pile trouvé" msgid "Found key A (site for derrick)" -msgstr "Emplacement pour derrick (clé A)" +msgstr "Emplacement pour un derrick (clé A)" msgid "Found key B (site for derrick)" -msgstr "Emplacement pour derrick (clé B)" +msgstr "Emplacement pour un derrick (clé B)" msgid "Found key C (site for derrick)" -msgstr "Emplacement pour derrick (clé C)" +msgstr "Emplacement pour un derrick (clé C)" msgid "Found key D (site for derrick)" -msgstr "Emplacement pour derrick (clé D)" +msgstr "Emplacement pour un derrick (clé D)" msgid "Free game" msgstr "Jeu libre" @@ -627,7 +633,7 @@ msgid "Function name missing" msgstr "Nom de la fonction attendu" msgid "Function needs return type \"void\"" -msgstr "" +msgstr "La fonction a besoin de \"void\" en type de retour" msgid "Game speed" msgstr "Vitesse du jeu" @@ -645,10 +651,10 @@ msgid "Gold Edition development by:" msgstr "Édition Gold développée par :" msgid "Goto: destination occupied" -msgstr "Goto: Destination occupée" +msgstr "Goto: destination occupée" msgid "Goto: inaccessible destination" -msgstr "Chemin introuvable" +msgstr "Goto: chemin introuvable" msgid "Grab or drop (\\key action;)" msgstr "Prend ou dépose (\\key action;)" @@ -678,7 +684,7 @@ msgid "Help balloons\\Explain the function of the buttons" msgstr "Bulles d'aide\\Bulles explicatives" msgid "Hex value out of range" -msgstr "" +msgstr "Valeur hexadécimale impossible" #, fuzzy msgid "Higher speed\\Doubles speed" @@ -691,7 +697,7 @@ msgid "Home" msgstr "Page initiale" msgid "Houston Mission Control" -msgstr "Centre de contrôle" +msgstr "Centre de contrôle de Houston" msgid "Illegal object" msgstr "Objet inaccessible" @@ -733,10 +739,10 @@ msgid "Instruction \"break\" outside a loop" msgstr "Instruction \"break\" en dehors d'une boucle" msgid "Instruction \"case\" missing" -msgstr "Manque une instruction \"case\"" +msgstr "Il manque l'instruction \"case\"" msgid "Instruction \"case\" outside a block \"switch\"" -msgstr "Instruction \"case\" hors d'un bloc \"switch\"" +msgstr "Instruction \"case\" en dehors d'un bloc \"switch\"" msgid "Instruction \"else\" without corresponding \"if\"" msgstr "Instruction \"else\" sans \"if\" correspondant" @@ -745,7 +751,7 @@ msgid "Instructions (\\key help;)" msgstr "Instructions (\\key help;)" msgid "Instructions after the final closing brace" -msgstr "Instructions après la fin" +msgstr "Instructions après la dernière accolade fermante" msgid "Instructions for the mission (\\key help;)" msgstr "Instructions sur la mission (\\key help;)" @@ -760,7 +766,7 @@ msgid "Internal error - tell the developers" msgstr "Erreur interne - contacter les développeurs" msgid "Invalid universal character name" -msgstr "" +msgstr "Conversion invalide d'un caractère unicode en caractère UTF8" msgid "Invert\\Invert values on this axis" msgstr "Inversion\\Inverse les valeurs sur cet axe" @@ -781,7 +787,7 @@ msgid "Key D" msgstr "Clé D" msgid "Keyword \"while\" missing" -msgstr "Manque le mot \"while\"" +msgstr "Le mot-clé \"while\" est attendu" msgid "Keyword help(\\key cbot;)" msgstr "Aide sur le mot-clé (\\key cbot;)" @@ -790,16 +796,16 @@ msgid "LOADING" msgstr "CHARGEMENT" msgid "Legged grabber" -msgstr "Robot déménageur" +msgstr "Robot déménageur à pattes" msgid "Legged orga shooter" -msgstr "Robot orgaShooter" +msgstr "Robot tireur organique à pattes" msgid "Legged shooter" -msgstr "Robot shooter" +msgstr "Robot tireur à pattes" msgid "Legged sniffer" -msgstr "Robot renifleur" +msgstr "Robot renifleur à pattes" msgid "Levels in this chapter:" msgstr "Liste des niveaux du chapitre :" @@ -851,14 +857,15 @@ msgstr "Chargement du terrain" # msgstr "" # msgid "Speed 6.0x\\Sextuple speed" # msgstr "" + msgid "Lower speed\\Decrease speed by half" -msgstr "" +msgstr "Moins rapide\\Diminuer la vitesse de moitié" msgid "Lowest\\Minimum graphic quality (highest frame rate)" msgstr "Mini\\Qualité minimale (+ rapide)" msgid "Lunar Roving Vehicle" -msgstr "Lunar Roving Vehicle" +msgstr "Véhicule d'exploration lunaire" msgid "MSAA\\Multisample anti-aliasing" msgstr "ACME\\Anticrénelage multiéchantillon" @@ -873,10 +880,10 @@ msgid "Mipmap level\\Mipmap level" msgstr "Niveau de MIP mapping\\Niveau de MIP mapping" msgid "Missing end quote" -msgstr "" +msgstr "La quote de fin est manquante" msgid "Missing hex digits after escape sequence" -msgstr "" +msgstr "Valeur hexadécimale manquante après la séquence d'échappement" msgid "Mission name" msgstr "Nom de la mission" @@ -948,7 +955,7 @@ msgid "No function with this name accepts this number of parameters" msgstr "Aucune fonction de ce nom n'accepte ce nombre de paramètres" msgid "No information exchange post within range" -msgstr "Pas trouvé de borne d'information" +msgstr "Pas de borne d'information accessible" msgid "No more energy" msgstr "Plus d'énergie" @@ -960,25 +967,25 @@ msgid "No power cell" msgstr "Pas de pile" msgid "No titanium" -msgstr "Pas de titanium" +msgstr "Pas de titane" msgid "No titanium around" -msgstr "Titanium inexistant" +msgstr "Pas de titane accessible" msgid "No titanium ore to convert" -msgstr "Pas de minerai de titanium à convertir" +msgstr "Pas de minerai de titane à convertir" msgid "No titanium to transform" -msgstr "Pas de titanium à transformer" +msgstr "Pas de titane à transformer" msgid "No uranium to transform" -msgstr "Pas d'uranium à transformer" +msgstr "Pas de minerai d'uranium à transformer" msgid "No userlevels installed!" msgstr "Pas de niveaux spéciaux installés !" msgid "Non-void function needs \"return;\"" -msgstr "" +msgstr "Les fonctions avec retour autre que void doivent comporter l'instruction \"return;\"" msgid "Normal size" msgstr "Taille normale" @@ -1041,7 +1048,7 @@ msgid "Object too close" msgstr "Objet trop proche" msgid "Octal value out of range" -msgstr "" +msgstr "Valeur octale impossible" msgid "One step" msgstr "Un pas" @@ -1056,7 +1063,7 @@ msgid "Opening brace missing" msgstr "Début d'un bloc attendu" msgid "Opening bracket missing" -msgstr "Il manque une parenthèse ouvrante" +msgstr "Une parenthèse ouvrante est attendue" msgid "Operation impossible with value \"nan\"" msgstr "Opération sur un \"nan\"" @@ -1074,7 +1081,7 @@ msgid "Origin of last message\\Shows where the last message was sent from" msgstr "Montrer le lieu d'un message\\Montrer le lieu du dernier message" msgid "Original game developed by:" -msgstr "Jeu Original développé par :" +msgstr "Jeu original développé par :" msgid "Parameters missing" msgstr "Pas assez de paramètres" @@ -1098,7 +1105,7 @@ msgid "Pause\\Pause the game without opening menu" msgstr "Pause\\Mettre le jeu en pause sans ouvrir le menu" msgid "Phazer shooter" -msgstr "Robot phazer" +msgstr "Robot canon à phases" msgid "Photography" msgstr "Vue de la mission" @@ -1116,19 +1123,19 @@ msgid "Plans for nuclear power plant available" msgstr "Construction d'une centrale nucléaire possible" msgid "Plans for phazer shooter available" -msgstr "Fabrication d'un robot phazer possible" +msgstr "Fabrication des robots canon à phases possible" msgid "Plans for shielder available" msgstr "Fabrication d'un robot bouclier possible" msgid "Plans for shooter available" -msgstr "Fabrication de robots shooter possible" +msgstr "Fabrication des robots tireurs possible" msgid "Plans for thumper available" msgstr "Fabrication d'un robot secoueur possible" msgid "Plans for tracked robots available" -msgstr "Fabrication d'un robot à chenilles possible" +msgstr "Fabrication des robots à chenilles possible" msgid "Plant a flag" msgstr "Pose un drapeau de couleur" @@ -1173,7 +1180,7 @@ msgid "Previous selection (\\key desel;)" msgstr "Sélection précédente (\\key desel;)" msgid "Private element" -msgstr "Elément protégé" +msgstr "Elément protégé (privé)" msgid "Private\\Private folder" msgstr "Privé\\Dossier privé" @@ -1218,10 +1225,10 @@ msgid "Quake at explosions\\The screen shakes at explosions" msgstr "Secousses lors d'explosions\\L'écran vibre lors d'une explosion" msgid "Quick load\\Immediately load game" -msgstr "" +msgstr "Chargement rapide\\Chargement direct d'une sauvegarde" msgid "Quick save\\Immediately save game" -msgstr "" +msgstr "Sauvegarde rapide\\Sauvegarde direct" #, fuzzy msgid "Quicksave slot not found" @@ -1250,6 +1257,7 @@ msgstr "Robot recycleur" msgid "Red" msgstr "Rouge" +# toCheck : capital (for team?) msgid "Red flag" msgstr "Drapeau rouge" @@ -1282,7 +1290,7 @@ msgid "Research program completed" msgstr "Recherche terminée" msgid "Reserved keyword of CBOT language" -msgstr "Ce mot est réservé" +msgstr "Ce mot-clé est réservé au langage CBOT" msgid "Resolution" msgstr "Résolution" @@ -1303,7 +1311,7 @@ msgid "Restoring saved objects" msgstr "Restaurer des objets sauvés" msgid "Results" -msgstr "" +msgstr "Résultats" msgid "Return to start" msgstr "Remet au départ" @@ -1318,31 +1326,31 @@ msgid "Run research program for defense tower" msgstr "Recherche la tour de défense" msgid "Run research program for legged bots" -msgstr "Recherche les pattes" +msgstr "Recherche du fonctionnement des pattes" msgid "Run research program for nuclear power" -msgstr "Recherche le nucléaire" +msgstr "Recherche du programme nucléaire" msgid "Run research program for orga shooter" -msgstr "Recherche le canon orgaShooter" +msgstr "Recherche le canon organique" msgid "Run research program for phazer shooter" -msgstr "Recherche le canon phazer" +msgstr "Recherche le canon à phases" msgid "Run research program for shielder" msgstr "Recherche le bouclier" msgid "Run research program for shooter" -msgstr "Recherche le canon shooter" +msgstr "Recherche le canon de tir" msgid "Run research program for thumper" msgstr "Recherche le secoueur" msgid "Run research program for tracked bots" -msgstr "Recherche les chenilles" +msgstr "Recherche du fonctionnement des chenilles" msgid "Run research program for winged bots" -msgstr "Recherche les robots volants" +msgstr "Recherche du fonctionnement du jet" msgid "SatCom" msgstr "SatCom" @@ -1372,7 +1380,7 @@ msgid "Semicolon terminator missing" msgstr "Terminateur point-virgule non trouvé" msgid "Shadow resolution\\Higher means better range and quality, but slower" -msgstr "Résolution des ombres\\Plus grand implique une meilleure qulité et amplitude, mais plus lent" +msgstr "Résolution des ombres\\Plus grand implique une meilleure qualité et amplitude, mais plus lent" msgid "Shield level" msgstr "Niveau du bouclier" @@ -1453,7 +1461,7 @@ msgid "Standard controls\\Standard key functions" msgstr "Tout réinitialiser\\Remet toutes les touches standards" msgid "Standard speed\\Reset speed to normal" -msgstr "" +msgstr "Vitesse standard\\Réinitialiser la vitesse à la normale" msgid "Standard\\Standard appearance settings" msgstr "Standard\\Remet les couleurs standards" @@ -1510,16 +1518,16 @@ msgid "Textures" msgstr "Textures" msgid "The battle has ended" -msgstr "" +msgstr "La bataille est terminée" msgid "The expression must return a boolean value" -msgstr "L'expression doit ętre un boolean" +msgstr "L'expression doit être un boolean" msgid "The function returned no value" msgstr "La fonction n'a pas retourné de résultat" msgid "The mission is not accomplished yet (press \\key help; for more details)" -msgstr "La misssion n'est pas terminée (appuyez sur \\key help; pour plus de détails)" +msgstr "La mission n'est pas terminée (appuyez sur \\key help; pour plus de détails)" msgid "The types of the two operands are incompatible" msgstr "Les deux opérandes ne sont pas de types compatibles" @@ -1543,16 +1551,16 @@ msgid "This menu is for userlevels from mods, but you didn't install any" msgstr "Ce menu donne accès aux niveaux spéciaux (importés ou personnalisés), mais aucun n'est installé." msgid "This object is currently busy" -msgstr "" +msgstr "Cet élément est actuellement occupé" msgid "This object is not a member of a class" msgstr "L'objet n'est pas une instance d'une classe" msgid "This parameter needs a default value" -msgstr "" +msgstr "Ce paramètre nécessite une valeur par défaut" msgid "This program is read-only, clone it to edit" -msgstr "Ce programme est en lecture-seule, le dupliquer pour pouvoir l'éditer" +msgstr "Ce programme est en lecture-seule, le dupliquer pour pouvoir le modifier" msgid "Thump (\\key action;)" msgstr "Secoue (\\key action;)" @@ -1561,22 +1569,22 @@ msgid "Thumper" msgstr "Robot secoueur" msgid "Titanium" -msgstr "Titanium" +msgstr "Titane" msgid "Titanium available" -msgstr "Titanium disponible" +msgstr "Titane disponible" msgid "Titanium deposit (site for derrick)" -msgstr "Emplacement pour derrick (titanium)" +msgstr "Emplacement pour un derrick (minerai de titane)" msgid "Titanium ore" -msgstr "Minerai de titanium" +msgstr "Minerai de titane" msgid "Titanium too close" -msgstr "Titanium trop proche" +msgstr "Titane trop proche" msgid "Titanium too far away" -msgstr "Titanium trop loin" +msgstr "Titane trop loin" msgid "Too close to a building" msgstr "Trop proche d'un bâtiment" @@ -1594,22 +1602,22 @@ msgid "Too many parameters" msgstr "Trop de paramètres" msgid "Tracked grabber" -msgstr "Robot déménageur" +msgstr "Robot déménageur à chenilles" msgid "Tracked orga shooter" -msgstr "Robot orgaShooter" +msgstr "Robot tireur organique à chenilles" msgid "Tracked shooter" -msgstr "Robot shooter" +msgstr "Robot tireur à chenilles" msgid "Tracked sniffer" -msgstr "Robot renifleur" +msgstr "Robot renifleur à chenilles" msgid "Transforms only titanium" -msgstr "Ne transforme que le titanium" +msgstr "Ne transforme que le titane" msgid "Transforms only uranium" -msgstr "Ne transforme que l'uranium" +msgstr "Ne transforme que le minerai d'uranium" msgid "Transmitted information" msgstr "Informations diffusées" @@ -1639,7 +1647,7 @@ msgid "Unit" msgstr "Unité" msgid "Unknown Object" -msgstr "Objet n'existe pas" +msgstr "Objet inconnu" msgid "Unknown command" msgstr "Commande inconnue" @@ -1654,7 +1662,7 @@ msgid "Up (\\key gup;)" msgstr "Monte (\\key gup;)" msgid "Uranium deposit (site for derrick)" -msgstr "Emplacement pour derrick (uranium)" +msgstr "Emplacement pour un derrick (minerai d'uranium)" msgid "Uranium ore" msgstr "Minerai d'uranium" @@ -1681,40 +1689,40 @@ msgid "Void parameter" msgstr "Paramètre void" msgid "Wasp" -msgstr "Guępe" +msgstr "Guêpe" msgid "Wasp fatally wounded" -msgstr "Guępe mortellement touchée" +msgstr "Guêpe mortellement touchée" msgid "Waste" msgstr "Déchet" msgid "Wheeled grabber" -msgstr "Robot déménageur" +msgstr "Robot déménageur à roues" msgid "Wheeled orga shooter" -msgstr "Robot orgaShooter" +msgstr "Robot tireur organique à roues" msgid "Wheeled shooter" -msgstr "Robot shooter" +msgstr "Robot tireur à roues" msgid "Wheeled sniffer" -msgstr "Robot renifleur" +msgstr "Robot renifleur à roues" msgid "Winged grabber" -msgstr "Robot déménageur" +msgstr "Robot déménageur volant" msgid "Winged orga shooter" -msgstr "Robot orgaShooter" +msgstr "Robot tireur organique volant" msgid "Winged shooter" -msgstr "Robot shooter" +msgstr "Robot tireur volant" msgid "Winged sniffer" -msgstr "Robot renifleur" +msgstr "Robot renifleur volant" msgid "Withdraw shield (\\key action;)" -msgstr "Stoppe le bouclier (\\key action;)" +msgstr "Refermer le bouclier (\\key action;)" msgid "Worm" msgstr "Ver" @@ -1726,7 +1734,7 @@ msgid "Wreckage" msgstr "Epave de robot" msgid "Write error" -msgstr "Erreur à l'écriture" +msgstr "Erreur lors de l'écriture" msgid "Wrong type for the assignment" msgstr "Mauvais type de résultat pour l'assignation" @@ -2040,3 +2048,4 @@ msgstr "epsitec.com" #~ msgid "\\c; (none)\\n;\n" #~ msgstr "\\c; (aucun)\\n;\n" + From da1b7e8c2d16c7f989d8cba7b5f9ecf28c88e4e2 Mon Sep 17 00:00:00 2001 From: B-CE <36107363+B-CE@users.noreply.github.com> Date: Mon, 19 Feb 2018 00:35:01 +0100 Subject: [PATCH 042/207] Fixes #274 : pasting tabs --- src/ui/controls/edit.cpp | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/src/ui/controls/edit.cpp b/src/ui/controls/edit.cpp index f5e02671..5a117ad9 100644 --- a/src/ui/controls/edit.cpp +++ b/src/ui/controls/edit.cpp @@ -2537,6 +2537,8 @@ bool CEdit::Paste() { char c; char* text; + int iTabToInsert=0; + int iTmp; //temp for tab space equivalant insertion if ( !m_bEdit ) { @@ -2551,20 +2553,36 @@ bool CEdit::Paste() } UndoMemorize(OPERUNDO_SPEC); - for ( unsigned int i = 0; i < strlen(text); i++ ) + for (unsigned int i = 0; iGetEditIndentValue()*iTabToInsert; iTmp>0; --iTmp) + InsertOne(' '); + iTabToInsert=0; } InsertOne(c); } - + if (0=m_len || '\n'!=m_text[m_cursor1])) + for (iTmp=m_engine->GetEditIndentValue() ; iTmp>0; --iTmp) + InsertOne(' '); SDL_free(text); Justif(); ColumnFix(); @@ -2869,7 +2887,7 @@ int CEdit::IndentTabCount() return nb; } -// Adds or removes qq tabs. +// Adds or removes some tabs. void CEdit::IndentTabAdjust(int number) { From 477dc0cae7fc41ca0d3b0616839774b3ec4bd3df Mon Sep 17 00:00:00 2001 From: krzys-h Date: Fri, 6 Apr 2018 15:02:06 +0200 Subject: [PATCH 043/207] Some CBot code optimizations --- src/CBot/CBotClass.cpp | 2 +- src/CBot/CBotClass.h | 2 +- src/CBot/CBotInstr/CBotFunction.cpp | 2 +- src/CBot/CBotInstr/CBotFunction.h | 2 +- src/CBot/CBotToken.cpp | 29 ++++++++++++++++++++--------- src/CBot/CBotToken.h | 2 +- src/CBot/CBotVar/CBotVar.cpp | 2 +- src/CBot/CBotVar/CBotVar.h | 2 +- 8 files changed, 27 insertions(+), 16 deletions(-) diff --git a/src/CBot/CBotClass.cpp b/src/CBot/CBotClass.cpp index ef220943..599155d0 100644 --- a/src/CBot/CBotClass.cpp +++ b/src/CBot/CBotClass.cpp @@ -192,7 +192,7 @@ bool CBotClass::AddItem(CBotVar* pVar) } //////////////////////////////////////////////////////////////////////////////// -std::string CBotClass::GetName() +const std::string& CBotClass::GetName() { return m_name; } diff --git a/src/CBot/CBotClass.h b/src/CBot/CBotClass.h index 503c62db..f3a0c83f 100644 --- a/src/CBot/CBotClass.h +++ b/src/CBot/CBotClass.h @@ -173,7 +173,7 @@ public: * \brief GetName Gives the name of the class. * \return */ - std::string GetName(); + const std::string& GetName(); /*! * \brief GetParent Gives the parent class (or nullptr). diff --git a/src/CBot/CBotInstr/CBotFunction.cpp b/src/CBot/CBotInstr/CBotFunction.cpp index 13b9005b..7f1ac168 100644 --- a/src/CBot/CBotInstr/CBotFunction.cpp +++ b/src/CBot/CBotInstr/CBotFunction.cpp @@ -996,7 +996,7 @@ bool CBotFunction::CheckParam(CBotDefParam* pParam) } //////////////////////////////////////////////////////////////////////////////// -std::string CBotFunction::GetName() +const std::string& CBotFunction::GetName() { return m_token.GetString(); } diff --git a/src/CBot/CBotInstr/CBotFunction.h b/src/CBot/CBotInstr/CBotFunction.h index 1f25474f..206deacf 100644 --- a/src/CBot/CBotInstr/CBotFunction.h +++ b/src/CBot/CBotInstr/CBotFunction.h @@ -207,7 +207,7 @@ public: * \brief GetName * \return */ - std::string GetName(); + const std::string& GetName(); /*! * \brief GetParams diff --git a/src/CBot/CBotToken.cpp b/src/CBot/CBotToken.cpp index 3c4bc7d9..6c7a5833 100644 --- a/src/CBot/CBotToken.cpp +++ b/src/CBot/CBotToken.cpp @@ -21,13 +21,22 @@ #include #include +#include namespace CBot { +namespace { + template + boost::bimap makeBimap(std::initializer_list::value_type> list) + { + return boost::bimap(list.begin(), list.end()); + } +} + //! \brief Keeps the string corresponding to keyword ID //! Map is filled with id-string pars that are needed for CBot language parsing -static const std::map KEYWORDS = { +static const boost::bimap KEYWORDS = makeBimap({ {ID_IF, "if"}, {ID_ELSE, "else"}, {ID_WHILE, "while"}, @@ -115,7 +124,7 @@ static const std::map KEYWORDS = { {ID_ASSMODULO, "%="}, {TX_UNDEF, "undefined"}, {TX_NAN, "not a number"} -}; +}); namespace { @@ -123,9 +132,10 @@ static const std::string emptyString = ""; } const std::string& LoadString(TokenId id) { - if (KEYWORDS.find(id) != KEYWORDS.end()) + auto it = KEYWORDS.left.find(id); + if (it != KEYWORDS.left.end()) { - return KEYWORDS.at(id); + return it->second; } else { @@ -210,7 +220,7 @@ long CBotToken::GetKeywordId() } //////////////////////////////////////////////////////////////////////////////// -std::string CBotToken::GetString() +const std::string& CBotToken::GetString() { return m_text; } @@ -242,6 +252,7 @@ void CBotToken::SetPos(int start, int end) //////////////////////////////////////////////////////////////////////////////// +// TODO: CharInList could probably be optimized to conditions like (*c >= '0' && *c <= '9') to gain some performance static char sep1[] = " \r\n\t,:()[]{}-+*/=;>!~^|&%.?"; // operational separators @@ -438,10 +449,10 @@ std::unique_ptr CBotToken::CompileTokens(const std::string& program) //////////////////////////////////////////////////////////////////////////////// int CBotToken::GetKeyWord(const std::string& w) { - for (const auto& it : KEYWORDS) - { - if (it.second == w) return it.first; - } + auto it = KEYWORDS.right.find(w); + if (it != KEYWORDS.right.end()) { + return it->second; + } return -1; } diff --git a/src/CBot/CBotToken.h b/src/CBot/CBotToken.h index a9254434..63c9eb5b 100644 --- a/src/CBot/CBotToken.h +++ b/src/CBot/CBotToken.h @@ -120,7 +120,7 @@ public: * \brief Return the token string * \return The string associated with this token */ - std::string GetString(); + const std::string& GetString(); /** * \brief Set the token string diff --git a/src/CBot/CBotVar/CBotVar.cpp b/src/CBot/CBotVar/CBotVar.cpp index 7ea659f5..836b2a7d 100644 --- a/src/CBot/CBotVar/CBotVar.cpp +++ b/src/CBot/CBotVar/CBotVar.cpp @@ -378,7 +378,7 @@ void CBotVar::SetInit(CBotVar::InitType initType) } //////////////////////////////////////////////////////////////////////////////// -std::string CBotVar::GetName() +const std::string& CBotVar::GetName() { return m_token->GetString(); } diff --git a/src/CBot/CBotVar/CBotVar.h b/src/CBot/CBotVar/CBotVar.h index 7babb7d1..1a2bff76 100644 --- a/src/CBot/CBotVar/CBotVar.h +++ b/src/CBot/CBotVar/CBotVar.h @@ -170,7 +170,7 @@ public: * \brief Returns the name of the variable * \return The name of the variable, empty string if unknown */ - std::string GetName(); + const std::string& GetName(); /** * \brief SetName Changes the name of the variable From ad6dd002753925c0bc6ed2dbdc9076be4e7700a9 Mon Sep 17 00:00:00 2001 From: tomangelo2 Date: Sun, 8 Apr 2018 23:43:22 +0200 Subject: [PATCH 044/207] Change new functions return type and switch to enum class As suggested by @krzys_h --- src/level/parser/parserparam.cpp | 12 ++++++------ src/level/parser/parserparam.h | 8 +++++--- src/level/robotmain.cpp | 2 +- src/level/scoreboard.h | 4 ++-- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/level/parser/parserparam.cpp b/src/level/parser/parserparam.cpp index 3ccd7f9c..479f7cec 100644 --- a/src/level/parser/parserparam.cpp +++ b/src/level/parser/parserparam.cpp @@ -917,21 +917,21 @@ int CLevelParserParam::AsResearchFlag(int def) return AsResearchFlag(); } -int CLevelParserParam::ToSortType(std::string value) +SortType CLevelParserParam::ToSortType(std::string value) { - if (value == "Points" ) return SORT_POINTS; - if (value == "Name" ) return SORT_ID; - return Cast(value, "sorttype"); + if (value == "Points" ) return SortType::SORT_POINTS; + if (value == "Name" ) return SortType::SORT_ID; + return SortType::SORT_ID; } -int CLevelParserParam::AsSortType() +SortType CLevelParserParam::AsSortType() { if (m_empty) throw CLevelParserExceptionMissingParam(this); return ToSortType(m_value); } -int CLevelParserParam::AsSortType(int def) +SortType CLevelParserParam::AsSortType(SortType def) { if (m_empty) return def; diff --git a/src/level/parser/parserparam.h b/src/level/parser/parserparam.h index 1261bb65..b5af93d4 100644 --- a/src/level/parser/parserparam.h +++ b/src/level/parser/parserparam.h @@ -31,6 +31,8 @@ #include "graphics/engine/pyro_type.h" #include "graphics/engine/water.h" +#include "level/scoreboard.h" + #include "math/point.h" #include "object/drive_type.h" @@ -85,7 +87,7 @@ public: Gfx::EngineObjectType AsTerrainType(); int AsBuildFlag(); int AsResearchFlag(); - int AsSortType(); + SortType AsSortType(); Gfx::PyroType AsPyroType(); Gfx::CameraType AsCameraType(); MissionType AsMissionType(); @@ -109,7 +111,7 @@ public: Gfx::EngineObjectType AsTerrainType(Gfx::EngineObjectType def); int AsBuildFlag(int def); int AsResearchFlag(int def); - int AsSortType(int def); + SortType AsSortType(SortType def); Gfx::PyroType AsPyroType(Gfx::PyroType def); Gfx::CameraType AsCameraType(Gfx::CameraType def); MissionType AsMissionType(MissionType def); @@ -141,7 +143,7 @@ private: Gfx::EngineObjectType ToTerrainType(std::string value); int ToBuildFlag(std::string value); int ToResearchFlag(std::string value); - int ToSortType(std::string value); + SortType ToSortType(std::string value); Gfx::PyroType ToPyroType(std::string value); Gfx::CameraType ToCameraType(std::string value); MissionType ToMissionType(std::string value); diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp index eed48aae..ad37c611 100644 --- a/src/level/robotmain.cpp +++ b/src/level/robotmain.cpp @@ -5919,7 +5919,7 @@ void CRobotMain::UpdateCodeBattleInterface() assert(pw != nullptr); std::set teams = GetAllTeams(); std::vector sortedTeams(teams.begin(), teams.end()); - if(m_scoreboard->GetSortType() == SORT_POINTS) + if(m_scoreboard->GetSortType() == SortType::SORT_POINTS) { std::sort(sortedTeams.begin(), sortedTeams.end(), [this](int teamA, int teamB) { diff --git a/src/level/scoreboard.h b/src/level/scoreboard.h index cd964de3..993418e5 100644 --- a/src/level/scoreboard.h +++ b/src/level/scoreboard.h @@ -42,7 +42,7 @@ struct Score float time = 0; //! Time when points were scored }; -enum SortType +enum class SortType { SORT_ID, //Sort by team ID SORT_POINTS, //Sort by points @@ -142,5 +142,5 @@ private: std::vector> m_rulesEndTake = {}; std::map m_score; int m_finishCounter = 0; - SortType m_sorttype = SORT_ID; + SortType m_sorttype = SortType::SORT_ID; }; From b04d8d205bba80fc50440a64604c5b6fe256ed4b Mon Sep 17 00:00:00 2001 From: tomangelo2 Date: Wed, 11 Apr 2018 21:24:20 +0200 Subject: [PATCH 045/207] Added viewpoints feature This allows you to set fixed viewpoints in specific location, without attaching to any object, enabling you to track the game from any location. Proper camera handling will be implemented in next commits. --- src/common/event.cpp | 11 ++++++++++ src/common/event.h | 11 ++++++++++ src/level/robotmain.cpp | 45 +++++++++++++++++++++++++++++++++++++++-- src/level/robotmain.h | 8 ++++++++ 4 files changed, 73 insertions(+), 2 deletions(-) diff --git a/src/common/event.cpp b/src/common/event.cpp index 10d1ae9f..4e7af795 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -522,6 +522,17 @@ void InitializeEventTypeTexts() EVENT_TYPE_TEXT[EVENT_CODE_BATTLE_START] = "EVENT_CODE_BATTLE_START"; EVENT_TYPE_TEXT[EVENT_CODE_BATTLE_SPECTATOR] = "EVENT_CODE_BATTLE_SPECTATOR"; + + EVENT_TYPE_TEXT[EVENT_VIEWPOINT0] = "EVENT_VIEWPOINT0"; + EVENT_TYPE_TEXT[EVENT_VIEWPOINT1] = "EVENT_VIEWPOINT1"; + EVENT_TYPE_TEXT[EVENT_VIEWPOINT2] = "EVENT_VIEWPOINT2"; + EVENT_TYPE_TEXT[EVENT_VIEWPOINT3] = "EVENT_VIEWPOINT3"; + EVENT_TYPE_TEXT[EVENT_VIEWPOINT4] = "EVENT_VIEWPOINT4"; + EVENT_TYPE_TEXT[EVENT_VIEWPOINT5] = "EVENT_VIEWPOINT5"; + EVENT_TYPE_TEXT[EVENT_VIEWPOINT6] = "EVENT_VIEWPOINT6"; + EVENT_TYPE_TEXT[EVENT_VIEWPOINT7] = "EVENT_VIEWPOINT7"; + EVENT_TYPE_TEXT[EVENT_VIEWPOINT8] = "EVENT_VIEWPOINT8"; + EVENT_TYPE_TEXT[EVENT_VIEWPOINT9] = "EVENT_VIEWPOINT9"; } std::string ParseEventType(EventType eventType) diff --git a/src/common/event.h b/src/common/event.h index 27ab1141..4b92727e 100644 --- a/src/common/event.h +++ b/src/common/event.h @@ -594,6 +594,17 @@ enum EventType EVENT_CODE_BATTLE_START = 2200, //!< button that starts the code battle EVENT_CODE_BATTLE_SPECTATOR = 2201, //!< button that controls the code battle spectator camera + //! Buttons that switch viewpoints + EVENT_VIEWPOINT0 = 3000, + EVENT_VIEWPOINT1 = 3001, + EVENT_VIEWPOINT2 = 3002, + EVENT_VIEWPOINT3 = 3003, + EVENT_VIEWPOINT4 = 3004, + EVENT_VIEWPOINT5 = 3005, + EVENT_VIEWPOINT6 = 3006, + EVENT_VIEWPOINT7 = 3007, + EVENT_VIEWPOINT8 = 3008, + EVENT_VIEWPOINT9 = 3009, //! Maximum value of standard events EVENT_STD_MAX, diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp index 3df62fe5..31aee5af 100644 --- a/src/level/robotmain.cpp +++ b/src/level/robotmain.cpp @@ -456,6 +456,8 @@ void CRobotMain::ChangePhase(Phase phase) m_movie->Flush(); m_movieInfoIndex = -1; m_shortCut = true; + + m_viewpoints.clear(); } ClearInterface(); @@ -744,6 +746,11 @@ bool CRobotMain::ProcessEvent(Event &event) SetCodeBattleSpectatorMode(!m_codeBattleSpectator); } + if (event.type >= EVENT_VIEWPOINT0 && event.type <= EVENT_VIEWPOINT9) + { + m_camera->SetScriptCamera(m_viewpoints[event.type - EVENT_VIEWPOINT0].eye, m_viewpoints[event.type - EVENT_VIEWPOINT0].look); + } + // Management of the console. if (event.type == EVENT_KEY_DOWN) { @@ -3528,6 +3535,24 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject) continue; } + //! Note: This feature may be changed in next releases, + //! Places new viewpoint, which can be selected later in (currently only in Code Battle) UI. + //! Usage: View eye=x; y; z lookat=x; y; z + + if (line->GetCommand() == "View") + { + if(m_viewpoints.size() == 10) + { + GetLogger()->Warn("Reached limit of 10 viewpoints, next ones will be ommited.\n"); + continue; + } + Viewpoint tmp; + tmp.eye = line->GetParam("eye")->AsPoint(Math::Vector(0.0f, 0.0f, 0.0f))*g_unit; + tmp.look = line->GetParam("lookat")->AsPoint(Math::Vector(0.0f, 0.0f, 0.0f))*g_unit; + m_viewpoints.push_back(tmp); + continue; + } + if (line->GetCommand() == "EndMissionTake" && !resetObject) { auto endTake = MakeUnique(); @@ -5814,25 +5839,40 @@ void CRobotMain::CreateCodeBattleInterface() if (m_phase == PHASE_SIMUL) { Math::Point pos, ddim; + float offset = (ceil(m_viewpoints.size() / 2.0f) * 50); int numTeams = m_scoreboard ? GetAllTeams().size() : 0; assert(numTeams < EVENT_SCOREBOARD_MAX-EVENT_SCOREBOARD+1); float textHeight = m_engine->GetText()->GetHeight(Gfx::FONT_COLOBOT, Gfx::FONT_SIZE_SMALL); + //window ddim.x = 100.0f/640.0f; - ddim.y = 100.0f/480.0f + numTeams * textHeight; + ddim.y = (100.0f+offset)/480.0f + numTeams * textHeight; pos.x = 540.0f/640.0f; pos.y = 100.0f/480.0f; Ui::CWindow* pw = m_interface->CreateWindows(pos, ddim, 3, EVENT_WINDOW6); + //label text ddim.x = 100.0f/640.0f; ddim.y = 16.0f/480.0f; pos.x = 540.0f/640.0f; - pos.y = 178.0f/480.0f + numTeams * textHeight; + pos.y = (178.0f+offset)/480.0f + numTeams * textHeight; std::string text; GetResource(RES_EVENT, EVENT_LABEL_CODE_BATTLE, text); pw->CreateLabel(pos, ddim, 0, EVENT_LABEL_CODE_BATTLE, text); + //viewpoint selection section + ddim.x = 40.0f/640.0f; + ddim.y = 50.0f/640.0f; + for(unsigned int i = 0; iCreateButton(pos,ddim, 13, EventType(EVENT_VIEWPOINT0 + i)); + } + + //start/camera button float titleBarSize = (11.0f/64.0f); // this is from the texture ddim.x = 80.0f/640.0f; ddim.y = ((1-titleBarSize)*100.0f-20.0f)/480.0f; @@ -5930,6 +5970,7 @@ void CRobotMain::UpdateCodeBattleInterface() void CRobotMain::DestroyCodeBattleInterface() { + m_viewpoints.clear(); m_interface->DeleteControl(EVENT_WINDOW6); } diff --git a/src/level/robotmain.h b/src/level/robotmain.h index 9b1511c0..8409ffed 100644 --- a/src/level/robotmain.h +++ b/src/level/robotmain.h @@ -150,6 +150,11 @@ struct MinMax int max = -1; }; +struct Viewpoint +{ + Math::Vector eye; + Math::Vector look; +}; const int SATCOM_HUSTON = 0; const int SATCOM_SAT = 1; @@ -717,4 +722,7 @@ protected: std::deque m_commandHistory; //! Index of currently selected element in command history int m_commandHistoryIndex; + + //! Vector of available viewpoints + std::vector m_viewpoints; }; From 2f71cce9c962ab201764c4d339cfa74a613b8adf Mon Sep 17 00:00:00 2001 From: tomangelo2 Date: Sun, 15 Apr 2018 00:06:04 +0200 Subject: [PATCH 046/207] Fix camera behaviour when switching to viewpoint --- src/level/robotmain.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp index 31aee5af..fbd000a1 100644 --- a/src/level/robotmain.cpp +++ b/src/level/robotmain.cpp @@ -748,7 +748,9 @@ bool CRobotMain::ProcessEvent(Event &event) if (event.type >= EVENT_VIEWPOINT0 && event.type <= EVENT_VIEWPOINT9) { - m_camera->SetScriptCamera(m_viewpoints[event.type - EVENT_VIEWPOINT0].eye, m_viewpoints[event.type - EVENT_VIEWPOINT0].look); + m_camera->SetType(Gfx::CAM_TYPE_SCRIPT); + m_camera->SetSmooth(Gfx::CAM_SMOOTH_HARD); + m_camera->SetScriptCameraAnimate(m_viewpoints[event.type - EVENT_VIEWPOINT0].eye, m_viewpoints[event.type - EVENT_VIEWPOINT0].look); } // Management of the console. From 5cec29f4e671e8fcb8973b37d74288436a5c1541 Mon Sep 17 00:00:00 2001 From: AbigailBuccaneer Date: Thu, 19 Apr 2018 10:19:05 +0100 Subject: [PATCH 047/207] Fix building under clang-7 Currently the build fails because of -Wdelete-non-virtual-dtor warnings. This catches when an object is destructed, has a non-virtual destructor, and is an abstract base class or a non-final class with virtual functions. The warning happens inside unique_ptr::~unique_ptr. The warning is to prevent somebody writing code like this: class MySceneEndCondition : public CSceneEndCondition { ~MySceneEndCondition() { /* some complex logic */ } }; // this won't call MySceneEndCondition's destructor, potentially // leading to leaks or segfaults: std::unique_ptr p{new MySceneEndCondition()}; --- src/level/scene_conditions.h | 4 ++-- src/level/scoreboard.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/level/scene_conditions.h b/src/level/scene_conditions.h index 721c486c..f1fbf717 100644 --- a/src/level/scene_conditions.h +++ b/src/level/scene_conditions.h @@ -85,7 +85,7 @@ protected: * \class CSceneEndCondition * \brief Scene end condition */ -class CSceneEndCondition : public CSceneCondition +class CSceneEndCondition final : public CSceneCondition { public: int winTeam = 0; @@ -109,7 +109,7 @@ public: * \class CAudioChangeCondition * \brief Audio change condition */ -class CAudioChangeCondition : public CSceneCondition +class CAudioChangeCondition final : public CSceneCondition { public: std::string music = ""; diff --git a/src/level/scoreboard.h b/src/level/scoreboard.h index 58a5acb5..e0440bf1 100644 --- a/src/level/scoreboard.h +++ b/src/level/scoreboard.h @@ -78,7 +78,7 @@ public: * \brief Scoreboard rule for destroying other objects * \see CScoreboard::AddKillRule() */ - class CScoreboardKillRule : public CScoreboardRule, public CObjectCondition + class CScoreboardKillRule final : public CScoreboardRule, public CObjectCondition { public: //! Read from line in scene file @@ -90,7 +90,7 @@ public: * \brief Scoreboard rule for EndMissionTake rewards * \see CScoreboard::AddEndTakeRule() */ - class CScoreboardEndTakeRule : public CScoreboardRule + class CScoreboardEndTakeRule final : public CScoreboardRule { public: int team = 0; @@ -122,4 +122,4 @@ private: std::vector> m_rulesEndTake = {}; std::map m_score; int m_finishCounter = 0; -}; \ No newline at end of file +}; From 6978c28ee0a5d2b8784605cb00655a8d73fffad7 Mon Sep 17 00:00:00 2001 From: AbigailBuccaneer Date: Thu, 19 Apr 2018 11:51:41 +0100 Subject: [PATCH 048/207] Compile with -Wsuggest-override under GCC Clang by default compiles with -Winconsistent-missing-override, which warns when a class declares virtual functions that override those in the base class, and some but not all of them are explicitly declared `override`. GCC doesn't support this option, but has a stronger version, -Wsuggest-override. In combination with -Werror, this means that any virtual function that overrides another *must* be explicitly declared as `override`. This commit enables -Wsuggest-override where available. This means that GCC users can't break the Clang build with inconsistent overrides (see #1113 and #1114) and consequently that any build that passes the pull request CI build on Jenkins won't break because of inconsistent overrides. --- CMakeLists.txt | 5 +++++ src/object/auto/autokid.cpp | 16 ---------------- src/object/auto/autokid.h | 9 +++------ src/object/task/task.h | 6 +++--- src/script/scriptfunc.cpp | 2 +- test/unit/CBot/CBotToken_test.cpp | 4 ++-- test/unit/CBot/CBot_test.cpp | 4 ++-- 7 files changed, 16 insertions(+), 30 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8681f5bd..1f1dea40 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -134,6 +134,11 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU") set(NORMAL_CXX_FLAGS "-std=gnu++11 -Wall -Werror -Wold-style-cast -pedantic-errors") set(NORMAL_CXX_FLAGS "${NORMAL_CXX_FLAGS} -Wno-error=deprecated-declarations") # updated version of physfs is not available on some platforms so we keep using deprecated functions, see #958 + + if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0) + set(NORMAL_CXX_FLAGS "${NORMAL_CXX_FLAGS} -Wsuggest-override") + endif() + set(RELEASE_CXX_FLAGS "-O2") set(DEBUG_CXX_FLAGS "-g -O0") set(TEST_CXX_FLAGS "-pthread") diff --git a/src/object/auto/autokid.cpp b/src/object/auto/autokid.cpp index e8a404a3..5fa942c5 100644 --- a/src/object/auto/autokid.cpp +++ b/src/object/auto/autokid.cpp @@ -51,14 +51,6 @@ CAutoKid::~CAutoKid() } -// Destroys the object. - -void CAutoKid::DeleteObject(bool all) -{ - CAuto::DeleteObject(all); -} - - // Initialize the object. void CAutoKid::Init() @@ -197,11 +189,3 @@ bool CAutoKid::EventProcess(const Event &event) return true; } - - -// Returns an error due the state of the automation. - -Error CAutoKid::GetError() -{ - return ERR_OK; -} diff --git a/src/object/auto/autokid.h b/src/object/auto/autokid.h index 5a1c8ae3..52478149 100644 --- a/src/object/auto/autokid.h +++ b/src/object/auto/autokid.h @@ -27,13 +27,10 @@ class CAutoKid : public CAuto { public: CAutoKid(COldObject* object); - ~CAutoKid(); + ~CAutoKid() override; - void DeleteObject(bool all = false); - - void Init(); - bool EventProcess(const Event &event); - Error GetError(); + void Init() override; + bool EventProcess(const Event &event) override; protected: float m_speed = 0.0f; diff --git a/src/object/task/task.h b/src/object/task/task.h index 6ed2e3a1..173f435c 100644 --- a/src/object/task/task.h +++ b/src/object/task/task.h @@ -96,7 +96,7 @@ class CForegroundTask : public CTask public: CForegroundTask(COldObject* object) : CTask(object) {} - bool IsBackground() final { return false; } + bool IsBackground() override final { return false; } bool IsPilot() override { return false; } }; @@ -105,6 +105,6 @@ class CBackgroundTask : public CTask public: CBackgroundTask(COldObject* object) : CTask(object) {} - bool IsBackground() final { return true; } - bool IsPilot() final { return true; } + bool IsBackground() override final { return true; } + bool IsPilot() override final { return true; } }; diff --git a/src/script/scriptfunc.cpp b/src/script/scriptfunc.cpp index 8a774907..77701b80 100644 --- a/src/script/scriptfunc.cpp +++ b/src/script/scriptfunc.cpp @@ -3106,7 +3106,7 @@ public: } } - ~CBotFileColobot() + ~CBotFileColobot() override { if (Opened()) { diff --git a/test/unit/CBot/CBotToken_test.cpp b/test/unit/CBot/CBotToken_test.cpp index a36841a5..15923d13 100644 --- a/test/unit/CBot/CBotToken_test.cpp +++ b/test/unit/CBot/CBotToken_test.cpp @@ -27,12 +27,12 @@ using namespace CBot; class CBotTokenUT : public testing::Test { public: - void SetUp() + CBotTokenUT() { CBotProgram::Init(); } - void TearDown() + ~CBotTokenUT() { CBotProgram::Free(); } diff --git a/test/unit/CBot/CBot_test.cpp b/test/unit/CBot/CBot_test.cpp index f94b72d3..9fa99876 100644 --- a/test/unit/CBot/CBot_test.cpp +++ b/test/unit/CBot/CBot_test.cpp @@ -27,14 +27,14 @@ using namespace CBot; class CBotUT : public testing::Test { public: - void SetUp() + CBotUT() { CBotProgram::Init(); CBotProgram::AddFunction("FAIL", rFail, cFail); CBotProgram::AddFunction("ASSERT", rAssert, cAssert); } - void TearDown() + ~CBotUT() { CBotProgram::Free(); } From 72417fc28ba657b28a9b68d1cd13658296d97d4d Mon Sep 17 00:00:00 2001 From: krzys_h Date: Thu, 19 Apr 2018 22:11:29 +0200 Subject: [PATCH 049/207] Jenkinsfile: Switch to declarative syntax * Switch to declarative syntax * Test parallel Windows/Linux build * Remove some hard drive restrictions as now I have more HDD space on the server --- Jenkinsfile | 144 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 84 insertions(+), 60 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6058618d..7b999eba 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,71 +1,95 @@ #!/usr/bin/env groovy -if (env.BRANCH_NAME.startsWith('PR-')) { - properties([[$class: 'BuildDiscarderProperty', strategy: [$class: 'LogRotator', artifactNumToKeepStr: '1']]]) -} else { - properties([[$class: 'BuildDiscarderProperty', strategy: [$class: 'LogRotator', artifactDaysToKeepStr: '30', artifactNumToKeepStr: '20']]]) -} -if (env.CHANGE_TARGET == 'master') { - error("This pull request targets the wrong branch. Please reopen the pull request targetting the dev branch.") -} - -node('master') { - stage('Pull changes') { - checkout scm +pipeline { + agent { label 'colobot-build' } + options { + buildDiscarder(logRotator(artifactDaysToKeepStr: '30', artifactNumToKeepStr: '20')) } - - stage('Build Windows') { - sh 'mkdir -p build/windows' - dir('build/windows') { - sh ''' - cmake \ - -DCMAKE_INSTALL_PREFIX=/install \ - -DCMAKE_TOOLCHAIN_FILE=/opt/mxe/usr/i686-w64-mingw32.static/share/cmake/mxe-conf.cmake \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo -DDEV_BUILD=1 -DPORTABLE=1 -DTOOLS=1 -DTESTS=0 ../.. - make - rm -rf install - DESTDIR=. make install - ''' + stages { + stage('Check pull request target') { + when { changeRequest() } + steps { + script { + if (env.CHANGE_TARGET == 'master') { + throw "This pull request targets the wrong branch. Please reopen the pull request targetting the dev branch." + } + } + } } - sh 'rm -f windows-debug.zip' - zip zipFile: 'windows-debug.zip', archive: true, dir: 'build/windows/install' - } - - stage('Build Linux') { - sh 'mkdir -p build/linux' - dir('build/linux') { - sh ''' - cmake \ - -DCMAKE_INSTALL_PREFIX=/install -DCOLOBOT_INSTALL_BIN_DIR=/install -DCOLOBOT_INSTALL_LIB_DIR=/install -DCOLOBOT_INSTALL_DATA_DIR=/install/data -DCOLOBOT_INSTALL_I18N_DIR=/install/lang -DCMAKE_SKIP_INSTALL_RPATH=ON \ - -DBOOST_STATIC=ON -DGLEW_STATIC=ON -DGLEW_LIBRARY=/usr/lib64/libGLEW.a \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo -DDEV_BUILD=1 -DPORTABLE=1 -DTOOLS=1 -DTESTS=1 -DDESKTOP=0 ../.. - make - rm -rf install - DESTDIR=. make install - patchelf --set-rpath '.' install/colobot - ''' + stage('Build') { + parallel { + stage('Build Windows') { + steps { + sh 'mkdir -p build/windows' + dir('build/windows') { + sh ''' + cmake \ + -DCMAKE_INSTALL_PREFIX=/install \ + -DCMAKE_TOOLCHAIN_FILE=/opt/mxe/usr/i686-w64-mingw32.static/share/cmake/mxe-conf.cmake \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo -DDEV_BUILD=1 -DPORTABLE=1 -DTOOLS=1 -DTESTS=0 ../.. + make + rm -rf install + DESTDIR=. make install + ''' + } + } + post { + success { + sh 'rm -f windows-debug.zip' + zip zipFile: 'windows-debug.zip', archive: true, dir: 'build/windows/install' + } + } + } + + stage('Build Linux') { + steps { + sh 'mkdir -p build/linux' + dir('build/linux') { + sh ''' + cmake \ + -DCMAKE_INSTALL_PREFIX=/install -DCOLOBOT_INSTALL_BIN_DIR=/install -DCOLOBOT_INSTALL_LIB_DIR=/install -DCOLOBOT_INSTALL_DATA_DIR=/install/data -DCOLOBOT_INSTALL_I18N_DIR=/install/lang -DCMAKE_SKIP_INSTALL_RPATH=ON \ + -DBOOST_STATIC=ON -DGLEW_STATIC=ON -DGLEW_LIBRARY=/usr/lib64/libGLEW.a \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo -DDEV_BUILD=1 -DPORTABLE=1 -DTOOLS=1 -DTESTS=1 -DDESKTOP=0 ../.. + make + rm -rf install + DESTDIR=. make install + patchelf --set-rpath '.' install/colobot + ''' + } + } + post { + success { + sh 'rm -f linux-debug.zip' + zip zipFile: 'linux-debug.zip', archive: true, dir: 'build/linux/install' + } + } + } + + // TODO: Run colobot-lint + } } - sh 'rm -f linux-debug.zip' - zip zipFile: 'linux-debug.zip', archive: true, dir: 'build/linux/install' - } - stage('Doxygen') { - dir('build/linux') { - sh 'make doc' + stage('Generate docs') { + steps { + dir('build/linux') { + sh 'make doc' + } + } + post { + success { + publishHTML target: [$class: 'HtmlPublisherTarget', reportName: 'Doxygen', reportDir: 'build/linux/doc/html', reportFiles: 'index.html'] + } + } } - publishHTML target: [$class: 'HtmlPublisherTarget', reportName: 'Doxygen', reportDir: 'build/linux/doc/html', reportFiles: 'index.html'] - } - stage('Run tests') { - dir('build/linux') { - sh './colobot_ut --gtest_output=xml:gtestresults.xml || true' + stage('Run tests') { + steps { + dir('build/linux') { + sh './colobot_ut --gtest_output=xml:gtestresults.xml || true' + } + step([$class: 'XUnitBuilder', testTimeMargin: '3000', thresholdMode: 1, thresholds: [[$class: 'FailedThreshold', failureNewThreshold: '', failureThreshold: '', unstableNewThreshold: '', unstableThreshold: '0'], [$class: 'SkippedThreshold', failureNewThreshold: '', failureThreshold: '', unstableNewThreshold: '', unstableThreshold: '']], tools: [[$class: 'GoogleTestType', deleteOutputFiles: true, failIfNotNew: true, pattern: 'build/linux/gtestresults.xml', skipNoTestFiles: false, stopProcessingIfError: true]]]) + } + // TODO: Maybe run Windows tests using wine as well? } - step([$class: 'XUnitBuilder', testTimeMargin: '3000', thresholdMode: 1, thresholds: [[$class: 'FailedThreshold', failureNewThreshold: '', failureThreshold: '', unstableNewThreshold: '', unstableThreshold: '0'], [$class: 'SkippedThreshold', failureNewThreshold: '', failureThreshold: '', unstableNewThreshold: '', unstableThreshold: '']], tools: [[$class: 'GoogleTestType', deleteOutputFiles: true, failIfNotNew: true, pattern: 'build/linux/gtestresults.xml', skipNoTestFiles: false, stopProcessingIfError: true]]]) - } - - // Clean workspace after building pull requests - // to save disk space on the Jenkins host - if (env.BRANCH_NAME.startsWith('PR-')) { - cleanWs() } } From 9f1bd2176fa23386e34dc0c7d489cd0bafa54e41 Mon Sep 17 00:00:00 2001 From: krzys-h Date: Fri, 20 Apr 2018 01:08:24 +0200 Subject: [PATCH 050/207] Jenkinsfile: Run colobot-lint --- Jenkinsfile | 160 ++++++++++++++++++++++++++++++++++++++- src/level/scoreboard.cpp | 2 +- src/level/scoreboard.h | 2 +- 3 files changed, 159 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 7b999eba..9acf5add 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -64,8 +64,6 @@ pipeline { } } } - - // TODO: Run colobot-lint } } @@ -77,7 +75,7 @@ pipeline { } post { success { - publishHTML target: [$class: 'HtmlPublisherTarget', reportName: 'Doxygen', reportDir: 'build/linux/doc/html', reportFiles: 'index.html'] + publishHTML([reportName: 'Doxygen', reportDir: 'build/linux/doc/html', reportFiles: 'index.html', reportTitles: '', allowMissing: false, alwaysLinkToLastBuild: false, keepAll: false]) } } } @@ -91,5 +89,161 @@ pipeline { } // TODO: Maybe run Windows tests using wine as well? } + + stage('Run colobot-lint') { + steps { + copyArtifacts filter: 'build/colobot-lint,build/html_report.tar.gz,Tools/count_errors.py', fingerprintArtifacts: true, projectName: 'colobot/colobot-lint/master', selector: lastSuccessful(), target: 'colobot-lint' + sh 'chmod +x colobot-lint/Tools/count_errors.py' // TODO: ??? + sh 'mkdir -p build/lint' + dir('build/lint') { + sh 'cmake -DCOLOBOT_LINT_BUILD=1 -DTESTS=1 -DTOOLS=1 -DCMAKE_EXPORT_COMPILE_COMMANDS=1 $WORKSPACE' + sh '''#!/bin/bash +set -e +x + +# Run colobot-lint + +COLOBOT_DIR="$WORKSPACE" +COLOBOT_BUILD_DIR="$WORKSPACE/build/lint" + +COLOBOT_LINT_BUILD_DIR="$WORKSPACE/colobot-lint/build" + +COLOBOT_LINT_REPORT_FILE="$WORKSPACE/build/lint/colobot_lint_report.xml" + +CLANG_PREFIX="/usr/lib/llvm-3.6" + +cd "$COLOBOT_LINT_BUILD_DIR" +chmod +x ./colobot-lint + +# Workaround for Clang not finding system headers +rm -rf bin/ +mkdir -p bin +mv ./colobot-lint ./bin/ +rm -f ./lib +ln -s ${CLANG_PREFIX}/lib ./lib + +echo "Running colobot-lint" +find "$WORKSPACE" \\( -wholename "$COLOBOT_DIR/src/*.cpp" \ + -or -wholename "$COLOBOT_DIR/test/unit/*.cpp" \ + -or -wholename "$COLOBOT_BUILD_DIR/fake_header_sources/src/*.cpp" \ + -or -wholename "$COLOBOT_BUILD_DIR/fake_header_sources/test/unit/*.cpp" \\) \ + -exec ./bin/colobot-lint \ + -verbose \ + -output-format xml \ + -output-file "$COLOBOT_LINT_REPORT_FILE" \ + -p "$COLOBOT_BUILD_DIR" \ + -project-local-include-path "$COLOBOT_DIR/src" -project-local-include-path "$COLOBOT_BUILD_DIR/src" \ + -license-template-file "$COLOBOT_DIR/LICENSE-HEADER.txt" \ + {} + + ''' + sh '''#!/bin/bash +set -e +x + +# Generate HTML report + +COLOBOT_LINT_BUILD_DIR="$WORKSPACE/colobot-lint/build" +COLBOT_LINT_REPORT_FILE="$WORKSPACE/build/lint/colobot_lint_report.xml" +HTML_REPORT_DIR="$WORKSPACE/build/lint/html_report" + +echo "Generating HTML report" +cd "$COLOBOT_LINT_BUILD_DIR" +rm -rf HtmlReport/ +tar -zxf html_report.tar.gz +HtmlReport/generate.py --xml-report "$COLBOT_LINT_REPORT_FILE" --output-dir "$HTML_REPORT_DIR" + ''' + script { + retcode = sh script: '''#!/bin/bash +set -e +x + +# Update stable/unstable build status + +ret=0 + +COLOBOT_LINT_REPORT_FILE="$WORKSPACE/build/lint/colobot_lint_report.xml" +COLOBOT_LINT_DIR="$WORKSPACE/colobot-lint" + +OVERALL_STABLE_RULES=( + "class naming" + "code block placement" + "compile error" +# "compile warning" +# "enum naming" +# "function naming" + "header file not self-contained" +# "implicit bool cast" +# "include style" +# "inconsistent declaration parameter name" + "license header" +# "naked delete" +# "naked new" +# "old style function" + "old-style null pointer" +# "possible forward declaration" + "undefined function" +# "uninitialized field" +# "uninitialized local variable" +# "unused forward declaration" +# "variable naming" + "whitespace" +) + +echo "Checking rule stability (overall)" +for ((i = 0; i < ${#OVERALL_STABLE_RULES[@]}; i++)); do + rule="${OVERALL_STABLE_RULES[$i]}" + count="$("$COLOBOT_LINT_DIR/Tools/count_errors.py" --rule-filter="$rule" --xml-report-file "$COLOBOT_LINT_REPORT_FILE")" + if [ "$count" != "0" ]; then + echo "UNSTABLE RULE: $rule ($count occurences)" + ret=1 + fi +done + +STABLE_RULES_WITHOUT_CBOT=( + "class naming" + "code block placement" + "compile error" + "compile warning" +# "enum naming" +# "function naming" + "header file not self-contained" +# "implicit bool cast" + "include style" + "inconsistent declaration parameter name" + "license header" + "naked delete" + "naked new" +# "old style function" + "old-style null pointer" +# "possible forward declaration" + "undefined function" + "uninitialized field" +# "uninitialized local variable" + "unused forward declaration" +# "variable naming" + "whitespace" +) + +echo "Checking rule stability (without CBOT)" +for ((i = 0; i < ${#STABLE_RULES_WITHOUT_CBOT[@]}; i++)); do + rule="${STABLE_RULES_WITHOUT_CBOT[$i]}" + count="$("$COLOBOT_LINT_DIR/Tools/count_errors.py" --rule-filter="$rule" --file-filter="-.*CBot.*" --xml-report-file "$COLOBOT_LINT_REPORT_FILE")" + if [ "$count" != "0" ]; then + echo "UNSTABLE RULE: $rule (without CBOT, $count occurences)" + ret=1 + fi +done + +exit $ret + ''', returnStatus: true + if (retcode != 0) { + currentBuild.result = 'UNSTABLE' + } + } + } + + // TODO: cppcheck publisher STILL doesn't have pipeline support + // There is an open pull request though, merged but no release yet... https://github.com/jenkinsci/cppcheck-plugin/pull/36 + + publishHTML([reportName: 'Colobot-lint HTML report', reportDir: 'build/lint/html_report', reportFiles: 'index.html', reportTitles: '', allowMissing: false, alwaysLinkToLastBuild: true, keepAll: true]) + } + } } } diff --git a/src/level/scoreboard.cpp b/src/level/scoreboard.cpp index 7e4b5b04..95bcc397 100644 --- a/src/level/scoreboard.cpp +++ b/src/level/scoreboard.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2017, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/level/scoreboard.h b/src/level/scoreboard.h index 58a5acb5..cb8b83b2 100644 --- a/src/level/scoreboard.h +++ b/src/level/scoreboard.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2017, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify From 1c2bdc9cab3d37b3f519d8f7fe24825f3362050c Mon Sep 17 00:00:00 2001 From: krzys-h Date: Fri, 20 Apr 2018 01:20:10 +0200 Subject: [PATCH 051/207] Update license headers --- Jenkinsfile | 3 ++- LICENSE-HEADER.txt | 2 +- data | 2 +- src/CBot/CBot.h | 2 +- src/CBot/CBotCStack.cpp | 2 +- src/CBot/CBotCStack.h | 2 +- src/CBot/CBotClass.cpp | 2 +- src/CBot/CBotClass.h | 2 +- src/CBot/CBotDebug.cpp | 2 +- src/CBot/CBotDebug.h | 2 +- src/CBot/CBotDefParam.cpp | 2 +- src/CBot/CBotDefParam.h | 2 +- src/CBot/CBotDefines.h | 2 +- src/CBot/CBotEnums.h | 2 +- src/CBot/CBotExternalCall.cpp | 2 +- src/CBot/CBotExternalCall.h | 2 +- src/CBot/CBotFileUtils.cpp | 2 +- src/CBot/CBotFileUtils.h | 2 +- src/CBot/CBotInstr/CBotBlock.cpp | 2 +- src/CBot/CBotInstr/CBotBlock.h | 2 +- src/CBot/CBotInstr/CBotBoolExpr.cpp | 2 +- src/CBot/CBotInstr/CBotBoolExpr.h | 2 +- src/CBot/CBotInstr/CBotBreak.cpp | 2 +- src/CBot/CBotInstr/CBotBreak.h | 2 +- src/CBot/CBotInstr/CBotCase.cpp | 2 +- src/CBot/CBotInstr/CBotCase.h | 2 +- src/CBot/CBotInstr/CBotCatch.cpp | 2 +- src/CBot/CBotInstr/CBotCatch.h | 2 +- src/CBot/CBotInstr/CBotCondition.cpp | 2 +- src/CBot/CBotInstr/CBotCondition.h | 2 +- src/CBot/CBotInstr/CBotDefArray.cpp | 2 +- src/CBot/CBotInstr/CBotDefArray.h | 2 +- src/CBot/CBotInstr/CBotDefBoolean.cpp | 2 +- src/CBot/CBotInstr/CBotDefBoolean.h | 2 +- src/CBot/CBotInstr/CBotDefClass.cpp | 2 +- src/CBot/CBotInstr/CBotDefClass.h | 2 +- src/CBot/CBotInstr/CBotDefFloat.cpp | 2 +- src/CBot/CBotInstr/CBotDefFloat.h | 2 +- src/CBot/CBotInstr/CBotDefInt.cpp | 2 +- src/CBot/CBotInstr/CBotDefInt.h | 2 +- src/CBot/CBotInstr/CBotDefString.cpp | 2 +- src/CBot/CBotInstr/CBotDefString.h | 2 +- src/CBot/CBotInstr/CBotDo.cpp | 2 +- src/CBot/CBotInstr/CBotDo.h | 2 +- src/CBot/CBotInstr/CBotEmpty.cpp | 2 +- src/CBot/CBotInstr/CBotEmpty.h | 2 +- src/CBot/CBotInstr/CBotExprLitBool.cpp | 2 +- src/CBot/CBotInstr/CBotExprLitBool.h | 2 +- src/CBot/CBotInstr/CBotExprLitNan.cpp | 2 +- src/CBot/CBotInstr/CBotExprLitNan.h | 2 +- src/CBot/CBotInstr/CBotExprLitNull.cpp | 2 +- src/CBot/CBotInstr/CBotExprLitNull.h | 2 +- src/CBot/CBotInstr/CBotExprLitNum.cpp | 2 +- src/CBot/CBotInstr/CBotExprLitNum.h | 2 +- src/CBot/CBotInstr/CBotExprLitString.cpp | 2 +- src/CBot/CBotInstr/CBotExprLitString.h | 2 +- src/CBot/CBotInstr/CBotExprRetVar.cpp | 2 +- src/CBot/CBotInstr/CBotExprRetVar.h | 2 +- src/CBot/CBotInstr/CBotExprUnaire.cpp | 2 +- src/CBot/CBotInstr/CBotExprUnaire.h | 2 +- src/CBot/CBotInstr/CBotExprVar.cpp | 2 +- src/CBot/CBotInstr/CBotExprVar.h | 2 +- src/CBot/CBotInstr/CBotExpression.cpp | 2 +- src/CBot/CBotInstr/CBotExpression.h | 2 +- src/CBot/CBotInstr/CBotFieldExpr.cpp | 2 +- src/CBot/CBotInstr/CBotFieldExpr.h | 2 +- src/CBot/CBotInstr/CBotFor.cpp | 2 +- src/CBot/CBotInstr/CBotFor.h | 2 +- src/CBot/CBotInstr/CBotFunction.cpp | 2 +- src/CBot/CBotInstr/CBotFunction.h | 2 +- src/CBot/CBotInstr/CBotIf.cpp | 2 +- src/CBot/CBotInstr/CBotIf.h | 2 +- src/CBot/CBotInstr/CBotIndexExpr.cpp | 2 +- src/CBot/CBotInstr/CBotIndexExpr.h | 2 +- src/CBot/CBotInstr/CBotInstr.cpp | 2 +- src/CBot/CBotInstr/CBotInstr.h | 2 +- src/CBot/CBotInstr/CBotInstrCall.cpp | 2 +- src/CBot/CBotInstr/CBotInstrCall.h | 2 +- src/CBot/CBotInstr/CBotInstrMethode.cpp | 2 +- src/CBot/CBotInstr/CBotInstrMethode.h | 2 +- src/CBot/CBotInstr/CBotInstrUtils.cpp | 2 +- src/CBot/CBotInstr/CBotInstrUtils.h | 2 +- src/CBot/CBotInstr/CBotLeftExpr.cpp | 2 +- src/CBot/CBotInstr/CBotLeftExpr.h | 2 +- src/CBot/CBotInstr/CBotLeftExprVar.cpp | 2 +- src/CBot/CBotInstr/CBotLeftExprVar.h | 2 +- src/CBot/CBotInstr/CBotListArray.cpp | 2 +- src/CBot/CBotInstr/CBotListArray.h | 2 +- src/CBot/CBotInstr/CBotListExpression.cpp | 2 +- src/CBot/CBotInstr/CBotListExpression.h | 2 +- src/CBot/CBotInstr/CBotListInstr.cpp | 2 +- src/CBot/CBotInstr/CBotListInstr.h | 2 +- src/CBot/CBotInstr/CBotLogicExpr.cpp | 2 +- src/CBot/CBotInstr/CBotLogicExpr.h | 2 +- src/CBot/CBotInstr/CBotNew.cpp | 2 +- src/CBot/CBotInstr/CBotNew.h | 2 +- src/CBot/CBotInstr/CBotParExpr.cpp | 2 +- src/CBot/CBotInstr/CBotParExpr.h | 2 +- src/CBot/CBotInstr/CBotPostIncExpr.cpp | 2 +- src/CBot/CBotInstr/CBotPostIncExpr.h | 2 +- src/CBot/CBotInstr/CBotPreIncExpr.cpp | 2 +- src/CBot/CBotInstr/CBotPreIncExpr.h | 2 +- src/CBot/CBotInstr/CBotReturn.cpp | 2 +- src/CBot/CBotInstr/CBotReturn.h | 2 +- src/CBot/CBotInstr/CBotSwitch.cpp | 2 +- src/CBot/CBotInstr/CBotSwitch.h | 2 +- src/CBot/CBotInstr/CBotThrow.cpp | 2 +- src/CBot/CBotInstr/CBotThrow.h | 2 +- src/CBot/CBotInstr/CBotTry.cpp | 2 +- src/CBot/CBotInstr/CBotTry.h | 2 +- src/CBot/CBotInstr/CBotTwoOpExpr.cpp | 2 +- src/CBot/CBotInstr/CBotTwoOpExpr.h | 2 +- src/CBot/CBotInstr/CBotWhile.cpp | 2 +- src/CBot/CBotInstr/CBotWhile.h | 2 +- src/CBot/CBotProgram.cpp | 2 +- src/CBot/CBotProgram.h | 2 +- src/CBot/CBotStack.cpp | 2 +- src/CBot/CBotStack.h | 2 +- src/CBot/CBotToken.cpp | 2 +- src/CBot/CBotToken.h | 2 +- src/CBot/CBotTypResult.cpp | 2 +- src/CBot/CBotTypResult.h | 2 +- src/CBot/CBotUtils.cpp | 2 +- src/CBot/CBotUtils.h | 2 +- src/CBot/CBotVar/CBotVar.cpp | 2 +- src/CBot/CBotVar/CBotVar.h | 2 +- src/CBot/CBotVar/CBotVarArray.cpp | 2 +- src/CBot/CBotVar/CBotVarArray.h | 2 +- src/CBot/CBotVar/CBotVarBoolean.cpp | 2 +- src/CBot/CBotVar/CBotVarBoolean.h | 2 +- src/CBot/CBotVar/CBotVarClass.cpp | 2 +- src/CBot/CBotVar/CBotVarClass.h | 2 +- src/CBot/CBotVar/CBotVarFloat.cpp | 2 +- src/CBot/CBotVar/CBotVarFloat.h | 2 +- src/CBot/CBotVar/CBotVarInt.cpp | 2 +- src/CBot/CBotVar/CBotVarInt.h | 2 +- src/CBot/CBotVar/CBotVarPointer.cpp | 2 +- src/CBot/CBotVar/CBotVarPointer.h | 2 +- src/CBot/CBotVar/CBotVarString.cpp | 2 +- src/CBot/CBotVar/CBotVarString.h | 2 +- src/CBot/CBotVar/CBotVarValue.h | 2 +- src/CBot/stdlib/Compilation.cpp | 2 +- src/CBot/stdlib/Compilation.h | 2 +- src/CBot/stdlib/FileFunctions.cpp | 2 +- src/CBot/stdlib/MathFunctions.cpp | 2 +- src/CBot/stdlib/StringFunctions.cpp | 2 +- src/CBot/stdlib/stdlib.h | 2 +- src/CBot/stdlib/stdlib_public.h | 2 +- src/app/app.cpp | 2 +- src/app/app.h | 2 +- src/app/controller.cpp | 2 +- src/app/controller.h | 2 +- src/app/input.cpp | 2 +- src/app/input.h | 2 +- src/app/main.cpp | 2 +- src/app/pathman.cpp | 2 +- src/app/pathman.h | 2 +- src/app/pausemanager.cpp | 2 +- src/app/pausemanager.h | 2 +- src/app/signal_handlers.cpp | 2 +- src/app/signal_handlers.h | 2 +- src/common/config_file.cpp | 2 +- src/common/config_file.h | 2 +- src/common/error.h | 2 +- src/common/event.cpp | 2 +- src/common/event.h | 2 +- src/common/global.h | 2 +- src/common/image.cpp | 2 +- src/common/image.h | 2 +- src/common/ioutils.h | 2 +- src/common/key.cpp | 2 +- src/common/key.h | 2 +- src/common/language.cpp | 2 +- src/common/language.h | 2 +- src/common/logger.cpp | 2 +- src/common/logger.h | 2 +- src/common/make_unique.h | 2 +- src/common/profiler.cpp | 2 +- src/common/profiler.h | 2 +- src/common/regex_utils.cpp | 2 +- src/common/regex_utils.h | 2 +- src/common/resources/inputstream.cpp | 2 +- src/common/resources/inputstream.h | 2 +- src/common/resources/inputstreambuffer.cpp | 2 +- src/common/resources/inputstreambuffer.h | 2 +- src/common/resources/outputstream.cpp | 2 +- src/common/resources/outputstream.h | 2 +- src/common/resources/outputstreambuffer.cpp | 2 +- src/common/resources/outputstreambuffer.h | 2 +- src/common/resources/resourcemanager.cpp | 2 +- src/common/resources/resourcemanager.h | 2 +- src/common/resources/sdl_file_wrapper.cpp | 2 +- src/common/resources/sdl_file_wrapper.h | 2 +- src/common/resources/sdl_memory_wrapper.cpp | 2 +- src/common/resources/sdl_memory_wrapper.h | 2 +- src/common/resources/sndfile_wrapper.cpp | 2 +- src/common/resources/sndfile_wrapper.h | 2 +- src/common/restext.cpp | 2 +- src/common/restext.h | 2 +- src/common/settings.cpp | 2 +- src/common/settings.h | 2 +- src/common/singleton.h | 2 +- src/common/stringutils.cpp | 2 +- src/common/stringutils.h | 2 +- src/common/system/system.cpp | 2 +- src/common/system/system.h | 2 +- src/common/system/system_linux.cpp | 2 +- src/common/system/system_linux.h | 2 +- src/common/system/system_macosx.cpp | 2 +- src/common/system/system_macosx.h | 2 +- src/common/system/system_other.cpp | 2 +- src/common/system/system_other.h | 2 +- src/common/system/system_windows.cpp | 2 +- src/common/system/system_windows.h | 2 +- src/common/thread/resource_owning_thread.h | 2 +- src/common/thread/sdl_cond_wrapper.h | 2 +- src/common/thread/sdl_mutex_wrapper.h | 2 +- src/common/thread/thread.h | 2 +- src/common/thread/worker_thread.h | 2 +- src/graphics/core/color.cpp | 2 +- src/graphics/core/color.h | 2 +- src/graphics/core/device.h | 2 +- src/graphics/core/framebuffer.cpp | 2 +- src/graphics/core/framebuffer.h | 2 +- src/graphics/core/light.h | 2 +- src/graphics/core/material.h | 2 +- src/graphics/core/nulldevice.cpp | 2 +- src/graphics/core/nulldevice.h | 2 +- src/graphics/core/texture.h | 2 +- src/graphics/core/type.cpp | 2 +- src/graphics/core/type.h | 2 +- src/graphics/core/vertex.h | 2 +- src/graphics/engine/camera.cpp | 2 +- src/graphics/engine/camera.h | 2 +- src/graphics/engine/cloud.cpp | 2 +- src/graphics/engine/cloud.h | 2 +- src/graphics/engine/engine.cpp | 2 +- src/graphics/engine/engine.h | 2 +- src/graphics/engine/lightman.cpp | 2 +- src/graphics/engine/lightman.h | 2 +- src/graphics/engine/lightning.cpp | 2 +- src/graphics/engine/lightning.h | 2 +- src/graphics/engine/oldmodelmanager.cpp | 2 +- src/graphics/engine/oldmodelmanager.h | 2 +- src/graphics/engine/particle.cpp | 2 +- src/graphics/engine/particle.h | 2 +- src/graphics/engine/planet.cpp | 2 +- src/graphics/engine/planet.h | 2 +- src/graphics/engine/planet_type.h | 2 +- src/graphics/engine/pyro.cpp | 2 +- src/graphics/engine/pyro.h | 2 +- src/graphics/engine/pyro_manager.cpp | 2 +- src/graphics/engine/pyro_manager.h | 2 +- src/graphics/engine/pyro_type.h | 2 +- src/graphics/engine/terrain.cpp | 2 +- src/graphics/engine/terrain.h | 2 +- src/graphics/engine/text.cpp | 2 +- src/graphics/engine/text.h | 2 +- src/graphics/engine/water.cpp | 2 +- src/graphics/engine/water.h | 2 +- src/graphics/model/model.cpp | 2 +- src/graphics/model/model.h | 2 +- src/graphics/model/model_crash_sphere.h | 2 +- src/graphics/model/model_format.h | 2 +- src/graphics/model/model_input.cpp | 2 +- src/graphics/model/model_input.h | 2 +- src/graphics/model/model_io_exception.h | 2 +- src/graphics/model/model_io_structs.h | 2 +- src/graphics/model/model_manager.cpp | 2 +- src/graphics/model/model_manager.h | 2 +- src/graphics/model/model_mesh.cpp | 2 +- src/graphics/model/model_mesh.h | 2 +- src/graphics/model/model_output.cpp | 2 +- src/graphics/model/model_output.h | 2 +- src/graphics/model/model_shadow_spot.h | 2 +- src/graphics/model/model_triangle.h | 2 +- src/graphics/opengl/gl14device.cpp | 2 +- src/graphics/opengl/gl14device.h | 2 +- src/graphics/opengl/gl21device.cpp | 2 +- src/graphics/opengl/gl21device.h | 2 +- src/graphics/opengl/gl33device.cpp | 2 +- src/graphics/opengl/gl33device.h | 2 +- src/graphics/opengl/glframebuffer.cpp | 2 +- src/graphics/opengl/glframebuffer.h | 2 +- src/graphics/opengl/glutil.cpp | 2 +- src/graphics/opengl/glutil.h | 2 +- src/level/build_type.h | 2 +- src/level/level_category.cpp | 2 +- src/level/level_category.h | 2 +- src/level/mainmovie.cpp | 2 +- src/level/mainmovie.h | 2 +- src/level/parser/parser.cpp | 2 +- src/level/parser/parser.h | 2 +- src/level/parser/parserexceptions.cpp | 2 +- src/level/parser/parserexceptions.h | 2 +- src/level/parser/parserline.cpp | 2 +- src/level/parser/parserline.h | 2 +- src/level/parser/parserparam.cpp | 2 +- src/level/parser/parserparam.h | 2 +- src/level/player_profile.cpp | 2 +- src/level/player_profile.h | 2 +- src/level/research_type.h | 2 +- src/level/robotmain.cpp | 2 +- src/level/robotmain.h | 2 +- src/level/scene_conditions.cpp | 2 +- src/level/scene_conditions.h | 2 +- src/math/all.h | 2 +- src/math/const.h | 2 +- src/math/func.h | 2 +- src/math/geometry.h | 2 +- src/math/half.cpp | 2 +- src/math/half.h | 2 +- src/math/intpoint.h | 2 +- src/math/matrix.h | 2 +- src/math/point.h | 2 +- src/math/sphere.h | 2 +- src/math/vector.h | 2 +- src/object/auto/auto.cpp | 2 +- src/object/auto/auto.h | 2 +- src/object/auto/autobase.cpp | 2 +- src/object/auto/autobase.h | 2 +- src/object/auto/autoconvert.cpp | 2 +- src/object/auto/autoconvert.h | 2 +- src/object/auto/autoderrick.cpp | 2 +- src/object/auto/autoderrick.h | 2 +- src/object/auto/autodestroyer.cpp | 2 +- src/object/auto/autodestroyer.h | 2 +- src/object/auto/autoegg.cpp | 2 +- src/object/auto/autoegg.h | 2 +- src/object/auto/autofactory.cpp | 2 +- src/object/auto/autofactory.h | 2 +- src/object/auto/autoflag.cpp | 2 +- src/object/auto/autoflag.h | 2 +- src/object/auto/autohouston.cpp | 2 +- src/object/auto/autohouston.h | 2 +- src/object/auto/autojostle.cpp | 2 +- src/object/auto/autojostle.h | 2 +- src/object/auto/autokid.cpp | 2 +- src/object/auto/autokid.h | 2 +- src/object/auto/autolabo.cpp | 2 +- src/object/auto/autolabo.h | 2 +- src/object/auto/automush.cpp | 2 +- src/object/auto/automush.h | 2 +- src/object/auto/autonest.cpp | 2 +- src/object/auto/autonest.h | 2 +- src/object/auto/autonuclearplant.cpp | 2 +- src/object/auto/autonuclearplant.h | 2 +- src/object/auto/autoportico.cpp | 2 +- src/object/auto/autoportico.h | 2 +- src/object/auto/autopowercaptor.cpp | 2 +- src/object/auto/autopowercaptor.h | 2 +- src/object/auto/autopowerplant.cpp | 2 +- src/object/auto/autopowerplant.h | 2 +- src/object/auto/autopowerstation.cpp | 2 +- src/object/auto/autopowerstation.h | 2 +- src/object/auto/autoradar.cpp | 2 +- src/object/auto/autoradar.h | 2 +- src/object/auto/autorepair.cpp | 2 +- src/object/auto/autorepair.h | 2 +- src/object/auto/autoresearch.cpp | 2 +- src/object/auto/autoresearch.h | 2 +- src/object/auto/autoroot.cpp | 2 +- src/object/auto/autoroot.h | 2 +- src/object/auto/autotower.cpp | 2 +- src/object/auto/autotower.h | 2 +- src/object/auto/autovault.cpp | 2 +- src/object/auto/autovault.h | 2 +- src/object/crash_sphere.h | 2 +- src/object/drive_type.cpp | 2 +- src/object/drive_type.h | 2 +- src/object/implementation/power_container_impl.cpp | 2 +- src/object/implementation/power_container_impl.h | 2 +- src/object/implementation/program_storage_impl.cpp | 2 +- src/object/implementation/program_storage_impl.h | 2 +- src/object/implementation/programmable_impl.cpp | 2 +- src/object/implementation/programmable_impl.h | 2 +- src/object/implementation/task_executor_impl.cpp | 2 +- src/object/implementation/task_executor_impl.h | 2 +- src/object/interface/carrier_object.h | 2 +- src/object/interface/controllable_object.h | 2 +- src/object/interface/damageable_object.h | 2 +- src/object/interface/destroyable_object.h | 2 +- src/object/interface/flying_object.h | 2 +- src/object/interface/fragile_object.h | 2 +- src/object/interface/interactive_object.h | 2 +- src/object/interface/jet_flying_object.h | 2 +- src/object/interface/jostleable_object.h | 2 +- src/object/interface/movable_object.h | 2 +- src/object/interface/power_container_object.h | 2 +- src/object/interface/powered_object.h | 2 +- src/object/interface/program_storage_object.h | 2 +- src/object/interface/programmable_object.h | 2 +- src/object/interface/ranged_object.h | 2 +- src/object/interface/shielded_auto_regen_object.h | 2 +- src/object/interface/shielded_object.h | 2 +- src/object/interface/task_executor_object.h | 2 +- src/object/interface/trace_drawing_object.cpp | 2 +- src/object/interface/trace_drawing_object.h | 2 +- src/object/interface/transportable_object.h | 2 +- src/object/mission_type.h | 2 +- src/object/motion/motion.cpp | 2 +- src/object/motion/motion.h | 2 +- src/object/motion/motionant.cpp | 2 +- src/object/motion/motionant.h | 2 +- src/object/motion/motionbee.cpp | 2 +- src/object/motion/motionbee.h | 2 +- src/object/motion/motionhuman.cpp | 2 +- src/object/motion/motionhuman.h | 2 +- src/object/motion/motionlevelcontroller.cpp | 2 +- src/object/motion/motionlevelcontroller.h | 2 +- src/object/motion/motionqueen.cpp | 2 +- src/object/motion/motionqueen.h | 2 +- src/object/motion/motionspider.cpp | 2 +- src/object/motion/motionspider.h | 2 +- src/object/motion/motiontoto.cpp | 2 +- src/object/motion/motiontoto.h | 2 +- src/object/motion/motionvehicle.cpp | 2 +- src/object/motion/motionvehicle.h | 2 +- src/object/motion/motionworm.cpp | 2 +- src/object/motion/motionworm.h | 2 +- src/object/object.cpp | 2 +- src/object/object.h | 2 +- src/object/object_create_exception.h | 2 +- src/object/object_create_params.h | 2 +- src/object/object_factory.cpp | 2 +- src/object/object_factory.h | 2 +- src/object/object_interface_type.h | 2 +- src/object/object_manager.cpp | 2 +- src/object/object_manager.h | 2 +- src/object/object_type.h | 2 +- src/object/old_object.cpp | 2 +- src/object/old_object.h | 2 +- src/object/old_object_interface.cpp | 2 +- src/object/old_object_interface.h | 2 +- src/object/subclass/base_alien.cpp | 2 +- src/object/subclass/base_alien.h | 2 +- src/object/subclass/base_building.cpp | 2 +- src/object/subclass/base_building.h | 2 +- src/object/subclass/base_robot.cpp | 2 +- src/object/subclass/base_robot.h | 2 +- src/object/subclass/base_vehicle.cpp | 2 +- src/object/subclass/base_vehicle.h | 2 +- src/object/subclass/exchange_post.cpp | 2 +- src/object/subclass/exchange_post.h | 2 +- src/object/subclass/shielder.cpp | 2 +- src/object/subclass/shielder.h | 2 +- src/object/subclass/static_object.cpp | 2 +- src/object/subclass/static_object.h | 2 +- src/object/task/task.cpp | 2 +- src/object/task/task.h | 2 +- src/object/task/taskadvance.cpp | 2 +- src/object/task/taskadvance.h | 2 +- src/object/task/taskbuild.cpp | 2 +- src/object/task/taskbuild.h | 2 +- src/object/task/taskdeletemark.cpp | 2 +- src/object/task/taskdeletemark.h | 2 +- src/object/task/taskfire.cpp | 2 +- src/object/task/taskfire.h | 2 +- src/object/task/taskfireant.cpp | 2 +- src/object/task/taskfireant.h | 2 +- src/object/task/taskflag.cpp | 2 +- src/object/task/taskflag.h | 2 +- src/object/task/taskgoto.cpp | 2 +- src/object/task/taskgoto.h | 2 +- src/object/task/taskgungoal.cpp | 2 +- src/object/task/taskgungoal.h | 2 +- src/object/task/taskinfo.cpp | 2 +- src/object/task/taskinfo.h | 2 +- src/object/task/taskmanip.cpp | 2 +- src/object/task/taskmanip.h | 2 +- src/object/task/taskpen.cpp | 2 +- src/object/task/taskpen.h | 2 +- src/object/task/taskrecover.cpp | 2 +- src/object/task/taskrecover.h | 2 +- src/object/task/tasksearch.cpp | 2 +- src/object/task/tasksearch.h | 2 +- src/object/task/taskshield.cpp | 2 +- src/object/task/taskshield.h | 2 +- src/object/task/taskspiderexplo.cpp | 2 +- src/object/task/taskspiderexplo.h | 2 +- src/object/task/tasktake.cpp | 2 +- src/object/task/tasktake.h | 2 +- src/object/task/taskterraform.cpp | 2 +- src/object/task/taskterraform.h | 2 +- src/object/task/taskturn.cpp | 2 +- src/object/task/taskturn.h | 2 +- src/object/task/taskwait.cpp | 2 +- src/object/task/taskwait.h | 2 +- src/object/tool_type.cpp | 2 +- src/object/tool_type.h | 2 +- src/physics/physics.cpp | 2 +- src/physics/physics.h | 2 +- src/script/cbottoken.cpp | 2 +- src/script/cbottoken.h | 2 +- src/script/script.cpp | 2 +- src/script/script.h | 2 +- src/script/scriptfunc.cpp | 2 +- src/script/scriptfunc.h | 2 +- src/sound/oalsound/alsound.cpp | 2 +- src/sound/oalsound/alsound.h | 2 +- src/sound/oalsound/buffer.cpp | 2 +- src/sound/oalsound/buffer.h | 2 +- src/sound/oalsound/channel.cpp | 2 +- src/sound/oalsound/channel.h | 2 +- src/sound/oalsound/check.cpp | 2 +- src/sound/oalsound/check.h | 2 +- src/sound/sound.cpp | 2 +- src/sound/sound.h | 2 +- src/sound/sound_type.cpp | 2 +- src/sound/sound_type.h | 2 +- src/tools/convert_model.cpp | 2 +- src/ui/controls/button.cpp | 2 +- src/ui/controls/button.h | 2 +- src/ui/controls/check.cpp | 2 +- src/ui/controls/check.h | 2 +- src/ui/controls/color.cpp | 2 +- src/ui/controls/color.h | 2 +- src/ui/controls/control.cpp | 2 +- src/ui/controls/control.h | 2 +- src/ui/controls/edit.cpp | 2 +- src/ui/controls/edit.h | 2 +- src/ui/controls/editvalue.cpp | 2 +- src/ui/controls/editvalue.h | 2 +- src/ui/controls/enumslider.cpp | 2 +- src/ui/controls/enumslider.h | 2 +- src/ui/controls/gauge.cpp | 2 +- src/ui/controls/gauge.h | 2 +- src/ui/controls/group.cpp | 2 +- src/ui/controls/group.h | 2 +- src/ui/controls/image.cpp | 2 +- src/ui/controls/image.h | 2 +- src/ui/controls/interface.cpp | 2 +- src/ui/controls/interface.h | 2 +- src/ui/controls/key.cpp | 2 +- src/ui/controls/key.h | 2 +- src/ui/controls/label.cpp | 2 +- src/ui/controls/label.h | 2 +- src/ui/controls/list.cpp | 2 +- src/ui/controls/list.h | 2 +- src/ui/controls/map.cpp | 2 +- src/ui/controls/map.h | 2 +- src/ui/controls/scroll.cpp | 2 +- src/ui/controls/scroll.h | 2 +- src/ui/controls/shortcut.cpp | 2 +- src/ui/controls/shortcut.h | 2 +- src/ui/controls/slider.cpp | 2 +- src/ui/controls/slider.h | 2 +- src/ui/controls/target.cpp | 2 +- src/ui/controls/target.h | 2 +- src/ui/controls/window.cpp | 2 +- src/ui/controls/window.h | 2 +- src/ui/debug_menu.cpp | 2 +- src/ui/debug_menu.h | 2 +- src/ui/displayinfo.cpp | 2 +- src/ui/displayinfo.h | 2 +- src/ui/displaytext.cpp | 2 +- src/ui/displaytext.h | 2 +- src/ui/maindialog.cpp | 2 +- src/ui/maindialog.h | 2 +- src/ui/mainmap.cpp | 2 +- src/ui/mainmap.h | 2 +- src/ui/mainshort.cpp | 2 +- src/ui/mainshort.h | 2 +- src/ui/mainui.cpp | 2 +- src/ui/mainui.h | 2 +- src/ui/object_interface.cpp | 2 +- src/ui/object_interface.h | 2 +- src/ui/screen/screen.cpp | 2 +- src/ui/screen/screen.h | 2 +- src/ui/screen/screen_apperance.cpp | 2 +- src/ui/screen/screen_apperance.h | 2 +- src/ui/screen/screen_io.cpp | 2 +- src/ui/screen/screen_io.h | 2 +- src/ui/screen/screen_io_read.cpp | 2 +- src/ui/screen/screen_io_read.h | 2 +- src/ui/screen/screen_io_write.cpp | 2 +- src/ui/screen/screen_io_write.h | 2 +- src/ui/screen/screen_level_list.cpp | 2 +- src/ui/screen/screen_level_list.h | 2 +- src/ui/screen/screen_loading.cpp | 2 +- src/ui/screen/screen_loading.h | 2 +- src/ui/screen/screen_main_menu.cpp | 2 +- src/ui/screen/screen_main_menu.h | 2 +- src/ui/screen/screen_player_select.cpp | 2 +- src/ui/screen/screen_player_select.h | 2 +- src/ui/screen/screen_quit.cpp | 2 +- src/ui/screen/screen_quit.h | 2 +- src/ui/screen/screen_setup.cpp | 2 +- src/ui/screen/screen_setup.h | 2 +- src/ui/screen/screen_setup_controls.cpp | 2 +- src/ui/screen/screen_setup_controls.h | 2 +- src/ui/screen/screen_setup_display.cpp | 2 +- src/ui/screen/screen_setup_display.h | 2 +- src/ui/screen/screen_setup_game.cpp | 2 +- src/ui/screen/screen_setup_game.h | 2 +- src/ui/screen/screen_setup_graphics.cpp | 2 +- src/ui/screen/screen_setup_graphics.h | 2 +- src/ui/screen/screen_setup_sound.cpp | 2 +- src/ui/screen/screen_setup_sound.h | 2 +- src/ui/screen/screen_welcome.cpp | 2 +- src/ui/screen/screen_welcome.h | 2 +- src/ui/studio.cpp | 2 +- src/ui/studio.h | 2 +- test/cbot/compile_graph.cpp | 2 +- test/cbot/console.cpp | 2 +- test/unit/CBot/CBotToken_test.cpp | 2 +- test/unit/CBot/CBot_test.cpp | 2 +- test/unit/app/app_test.cpp | 2 +- test/unit/common/config_file_test.cpp | 2 +- test/unit/common/system/system_linux_test.cpp | 2 +- test/unit/common/system/system_windows_test.cpp | 2 +- test/unit/graphics/engine/lightman_test.cpp | 2 +- test/unit/main.cpp | 2 +- test/unit/math/func_test.cpp | 2 +- test/unit/math/geometry_test.cpp | 2 +- test/unit/math/matrix_test.cpp | 2 +- test/unit/math/vector_test.cpp | 2 +- 617 files changed, 618 insertions(+), 617 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 9acf5add..5548e186 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -96,7 +96,8 @@ pipeline { sh 'chmod +x colobot-lint/Tools/count_errors.py' // TODO: ??? sh 'mkdir -p build/lint' dir('build/lint') { - sh 'cmake -DCOLOBOT_LINT_BUILD=1 -DTESTS=1 -DTOOLS=1 -DCMAKE_EXPORT_COMPILE_COMMANDS=1 $WORKSPACE' + // The cd is required here because /var/lib/jenkins is a symlink and colobot-lint breaks otherwise... + sh 'cd $WORKSPACE/build/lint; cmake -DCOLOBOT_LINT_BUILD=1 -DTESTS=1 -DTOOLS=1 -DCMAKE_EXPORT_COMPILE_COMMANDS=1 $WORKSPACE' sh '''#!/bin/bash set -e +x diff --git a/LICENSE-HEADER.txt b/LICENSE-HEADER.txt index 6e07ccfe..1ac94d9f 100644 --- a/LICENSE-HEADER.txt +++ b/LICENSE-HEADER.txt @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/data b/data index bab2d994..b2792c32 160000 --- a/data +++ b/data @@ -1 +1 @@ -Subproject commit bab2d994d3602f70774257d5b2125b41e6aca926 +Subproject commit b2792c325a6e6871311207559199f77f35bbe524 diff --git a/src/CBot/CBot.h b/src/CBot/CBot.h index 8ffad4dd..b0720aa3 100644 --- a/src/CBot/CBot.h +++ b/src/CBot/CBot.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotCStack.cpp b/src/CBot/CBotCStack.cpp index a2f191d7..0abcb3ae 100644 --- a/src/CBot/CBotCStack.cpp +++ b/src/CBot/CBotCStack.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotCStack.h b/src/CBot/CBotCStack.h index c20a901f..40ad9424 100644 --- a/src/CBot/CBotCStack.h +++ b/src/CBot/CBotCStack.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotClass.cpp b/src/CBot/CBotClass.cpp index ef220943..b3778a7b 100644 --- a/src/CBot/CBotClass.cpp +++ b/src/CBot/CBotClass.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotClass.h b/src/CBot/CBotClass.h index 503c62db..bbdedefc 100644 --- a/src/CBot/CBotClass.h +++ b/src/CBot/CBotClass.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotDebug.cpp b/src/CBot/CBotDebug.cpp index c50bb302..892d1d0e 100644 --- a/src/CBot/CBotDebug.cpp +++ b/src/CBot/CBotDebug.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotDebug.h b/src/CBot/CBotDebug.h index d97b2e5d..9194bc44 100644 --- a/src/CBot/CBotDebug.h +++ b/src/CBot/CBotDebug.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotDefParam.cpp b/src/CBot/CBotDefParam.cpp index b99503f7..af4fb6ec 100644 --- a/src/CBot/CBotDefParam.cpp +++ b/src/CBot/CBotDefParam.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotDefParam.h b/src/CBot/CBotDefParam.h index bc9d9d0a..88a4cc20 100644 --- a/src/CBot/CBotDefParam.h +++ b/src/CBot/CBotDefParam.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotDefines.h b/src/CBot/CBotDefines.h index 39366e06..0d51d5d3 100644 --- a/src/CBot/CBotDefines.h +++ b/src/CBot/CBotDefines.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotEnums.h b/src/CBot/CBotEnums.h index fb701bc4..0b33bfdc 100644 --- a/src/CBot/CBotEnums.h +++ b/src/CBot/CBotEnums.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotExternalCall.cpp b/src/CBot/CBotExternalCall.cpp index be7aa676..4d840b8f 100644 --- a/src/CBot/CBotExternalCall.cpp +++ b/src/CBot/CBotExternalCall.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotExternalCall.h b/src/CBot/CBotExternalCall.h index 5432aad1..1c3424ec 100644 --- a/src/CBot/CBotExternalCall.h +++ b/src/CBot/CBotExternalCall.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotFileUtils.cpp b/src/CBot/CBotFileUtils.cpp index d2e62b86..c473493a 100644 --- a/src/CBot/CBotFileUtils.cpp +++ b/src/CBot/CBotFileUtils.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotFileUtils.h b/src/CBot/CBotFileUtils.h index decd9da3..fec6298a 100644 --- a/src/CBot/CBotFileUtils.h +++ b/src/CBot/CBotFileUtils.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotBlock.cpp b/src/CBot/CBotInstr/CBotBlock.cpp index 0d4e9965..aa9be145 100644 --- a/src/CBot/CBotInstr/CBotBlock.cpp +++ b/src/CBot/CBotInstr/CBotBlock.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotBlock.h b/src/CBot/CBotInstr/CBotBlock.h index a770add2..5054b65c 100644 --- a/src/CBot/CBotInstr/CBotBlock.h +++ b/src/CBot/CBotInstr/CBotBlock.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotBoolExpr.cpp b/src/CBot/CBotInstr/CBotBoolExpr.cpp index 18bb3021..a90a72dc 100644 --- a/src/CBot/CBotInstr/CBotBoolExpr.cpp +++ b/src/CBot/CBotInstr/CBotBoolExpr.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotBoolExpr.h b/src/CBot/CBotInstr/CBotBoolExpr.h index fb0397b3..828df199 100644 --- a/src/CBot/CBotInstr/CBotBoolExpr.h +++ b/src/CBot/CBotInstr/CBotBoolExpr.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotBreak.cpp b/src/CBot/CBotInstr/CBotBreak.cpp index bf21d0e9..ee0bae81 100644 --- a/src/CBot/CBotInstr/CBotBreak.cpp +++ b/src/CBot/CBotInstr/CBotBreak.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotBreak.h b/src/CBot/CBotInstr/CBotBreak.h index 7296ace0..6f72262b 100644 --- a/src/CBot/CBotInstr/CBotBreak.h +++ b/src/CBot/CBotInstr/CBotBreak.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotCase.cpp b/src/CBot/CBotInstr/CBotCase.cpp index f19c53bb..35e17d3d 100644 --- a/src/CBot/CBotInstr/CBotCase.cpp +++ b/src/CBot/CBotInstr/CBotCase.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotCase.h b/src/CBot/CBotInstr/CBotCase.h index f55722b9..e2863cde 100644 --- a/src/CBot/CBotInstr/CBotCase.h +++ b/src/CBot/CBotInstr/CBotCase.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotCatch.cpp b/src/CBot/CBotInstr/CBotCatch.cpp index df405add..5951cd97 100644 --- a/src/CBot/CBotInstr/CBotCatch.cpp +++ b/src/CBot/CBotInstr/CBotCatch.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotCatch.h b/src/CBot/CBotInstr/CBotCatch.h index e7dfa65a..a42f8754 100644 --- a/src/CBot/CBotInstr/CBotCatch.h +++ b/src/CBot/CBotInstr/CBotCatch.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotCondition.cpp b/src/CBot/CBotInstr/CBotCondition.cpp index 4175d6c6..7c345d70 100644 --- a/src/CBot/CBotInstr/CBotCondition.cpp +++ b/src/CBot/CBotInstr/CBotCondition.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotCondition.h b/src/CBot/CBotInstr/CBotCondition.h index 7250403e..8c8bd1fc 100644 --- a/src/CBot/CBotInstr/CBotCondition.h +++ b/src/CBot/CBotInstr/CBotCondition.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotDefArray.cpp b/src/CBot/CBotInstr/CBotDefArray.cpp index c1995d92..7d06674a 100644 --- a/src/CBot/CBotInstr/CBotDefArray.cpp +++ b/src/CBot/CBotInstr/CBotDefArray.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotDefArray.h b/src/CBot/CBotInstr/CBotDefArray.h index 29069bac..8b2fb205 100644 --- a/src/CBot/CBotInstr/CBotDefArray.h +++ b/src/CBot/CBotInstr/CBotDefArray.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotDefBoolean.cpp b/src/CBot/CBotInstr/CBotDefBoolean.cpp index e89bdc83..6a6ea499 100644 --- a/src/CBot/CBotInstr/CBotDefBoolean.cpp +++ b/src/CBot/CBotInstr/CBotDefBoolean.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotDefBoolean.h b/src/CBot/CBotInstr/CBotDefBoolean.h index c364f0d0..8d55adf2 100644 --- a/src/CBot/CBotInstr/CBotDefBoolean.h +++ b/src/CBot/CBotInstr/CBotDefBoolean.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotDefClass.cpp b/src/CBot/CBotInstr/CBotDefClass.cpp index bd885e10..174b973f 100644 --- a/src/CBot/CBotInstr/CBotDefClass.cpp +++ b/src/CBot/CBotInstr/CBotDefClass.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotDefClass.h b/src/CBot/CBotInstr/CBotDefClass.h index abad7952..1c501376 100644 --- a/src/CBot/CBotInstr/CBotDefClass.h +++ b/src/CBot/CBotInstr/CBotDefClass.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotDefFloat.cpp b/src/CBot/CBotInstr/CBotDefFloat.cpp index 17466581..65449b02 100644 --- a/src/CBot/CBotInstr/CBotDefFloat.cpp +++ b/src/CBot/CBotInstr/CBotDefFloat.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotDefFloat.h b/src/CBot/CBotInstr/CBotDefFloat.h index c871113c..a8060b41 100644 --- a/src/CBot/CBotInstr/CBotDefFloat.h +++ b/src/CBot/CBotInstr/CBotDefFloat.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotDefInt.cpp b/src/CBot/CBotInstr/CBotDefInt.cpp index 4e946e9b..6cfb30e6 100644 --- a/src/CBot/CBotInstr/CBotDefInt.cpp +++ b/src/CBot/CBotInstr/CBotDefInt.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotDefInt.h b/src/CBot/CBotInstr/CBotDefInt.h index 3ce22b8e..2962eab3 100644 --- a/src/CBot/CBotInstr/CBotDefInt.h +++ b/src/CBot/CBotInstr/CBotDefInt.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotDefString.cpp b/src/CBot/CBotInstr/CBotDefString.cpp index 9bf2eebe..3c80e5d3 100644 --- a/src/CBot/CBotInstr/CBotDefString.cpp +++ b/src/CBot/CBotInstr/CBotDefString.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotDefString.h b/src/CBot/CBotInstr/CBotDefString.h index 23f5caa1..d2d3fea5 100644 --- a/src/CBot/CBotInstr/CBotDefString.h +++ b/src/CBot/CBotInstr/CBotDefString.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotDo.cpp b/src/CBot/CBotInstr/CBotDo.cpp index 71750fd5..caf10920 100644 --- a/src/CBot/CBotInstr/CBotDo.cpp +++ b/src/CBot/CBotInstr/CBotDo.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotDo.h b/src/CBot/CBotInstr/CBotDo.h index 6aaf1264..ffbef08d 100644 --- a/src/CBot/CBotInstr/CBotDo.h +++ b/src/CBot/CBotInstr/CBotDo.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotEmpty.cpp b/src/CBot/CBotInstr/CBotEmpty.cpp index d894028a..7176973d 100644 --- a/src/CBot/CBotInstr/CBotEmpty.cpp +++ b/src/CBot/CBotInstr/CBotEmpty.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotEmpty.h b/src/CBot/CBotInstr/CBotEmpty.h index dd1ea648..ca7476a3 100644 --- a/src/CBot/CBotInstr/CBotEmpty.h +++ b/src/CBot/CBotInstr/CBotEmpty.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotExprLitBool.cpp b/src/CBot/CBotInstr/CBotExprLitBool.cpp index d443bf6d..8c0ea450 100644 --- a/src/CBot/CBotInstr/CBotExprLitBool.cpp +++ b/src/CBot/CBotInstr/CBotExprLitBool.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotExprLitBool.h b/src/CBot/CBotInstr/CBotExprLitBool.h index 95c4bd84..3344b5af 100644 --- a/src/CBot/CBotInstr/CBotExprLitBool.h +++ b/src/CBot/CBotInstr/CBotExprLitBool.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotExprLitNan.cpp b/src/CBot/CBotInstr/CBotExprLitNan.cpp index 405b604d..25156732 100644 --- a/src/CBot/CBotInstr/CBotExprLitNan.cpp +++ b/src/CBot/CBotInstr/CBotExprLitNan.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotExprLitNan.h b/src/CBot/CBotInstr/CBotExprLitNan.h index 31788519..74aae18d 100644 --- a/src/CBot/CBotInstr/CBotExprLitNan.h +++ b/src/CBot/CBotInstr/CBotExprLitNan.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotExprLitNull.cpp b/src/CBot/CBotInstr/CBotExprLitNull.cpp index 639e9668..88237127 100644 --- a/src/CBot/CBotInstr/CBotExprLitNull.cpp +++ b/src/CBot/CBotInstr/CBotExprLitNull.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotExprLitNull.h b/src/CBot/CBotInstr/CBotExprLitNull.h index 92cc3594..0233cb82 100644 --- a/src/CBot/CBotInstr/CBotExprLitNull.h +++ b/src/CBot/CBotInstr/CBotExprLitNull.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotExprLitNum.cpp b/src/CBot/CBotInstr/CBotExprLitNum.cpp index 8db32fd2..9273e8ee 100644 --- a/src/CBot/CBotInstr/CBotExprLitNum.cpp +++ b/src/CBot/CBotInstr/CBotExprLitNum.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotExprLitNum.h b/src/CBot/CBotInstr/CBotExprLitNum.h index 2e039037..414f2d8e 100644 --- a/src/CBot/CBotInstr/CBotExprLitNum.h +++ b/src/CBot/CBotInstr/CBotExprLitNum.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotExprLitString.cpp b/src/CBot/CBotInstr/CBotExprLitString.cpp index 58d5fe16..72cca72b 100644 --- a/src/CBot/CBotInstr/CBotExprLitString.cpp +++ b/src/CBot/CBotInstr/CBotExprLitString.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotExprLitString.h b/src/CBot/CBotInstr/CBotExprLitString.h index 55c39650..59d3ae52 100644 --- a/src/CBot/CBotInstr/CBotExprLitString.h +++ b/src/CBot/CBotInstr/CBotExprLitString.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotExprRetVar.cpp b/src/CBot/CBotInstr/CBotExprRetVar.cpp index 643a4690..3d0305f3 100644 --- a/src/CBot/CBotInstr/CBotExprRetVar.cpp +++ b/src/CBot/CBotInstr/CBotExprRetVar.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotExprRetVar.h b/src/CBot/CBotInstr/CBotExprRetVar.h index 2c8321e7..31606a3c 100644 --- a/src/CBot/CBotInstr/CBotExprRetVar.h +++ b/src/CBot/CBotInstr/CBotExprRetVar.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotExprUnaire.cpp b/src/CBot/CBotInstr/CBotExprUnaire.cpp index e4d1ec3f..c39fd89e 100644 --- a/src/CBot/CBotInstr/CBotExprUnaire.cpp +++ b/src/CBot/CBotInstr/CBotExprUnaire.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotExprUnaire.h b/src/CBot/CBotInstr/CBotExprUnaire.h index b15d2552..8a743a81 100644 --- a/src/CBot/CBotInstr/CBotExprUnaire.h +++ b/src/CBot/CBotInstr/CBotExprUnaire.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotExprVar.cpp b/src/CBot/CBotInstr/CBotExprVar.cpp index ed20c6fd..2b09f59c 100644 --- a/src/CBot/CBotInstr/CBotExprVar.cpp +++ b/src/CBot/CBotInstr/CBotExprVar.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotExprVar.h b/src/CBot/CBotInstr/CBotExprVar.h index d9b857cb..50a3a528 100644 --- a/src/CBot/CBotInstr/CBotExprVar.h +++ b/src/CBot/CBotInstr/CBotExprVar.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotExpression.cpp b/src/CBot/CBotInstr/CBotExpression.cpp index c98deca5..165d3fbc 100644 --- a/src/CBot/CBotInstr/CBotExpression.cpp +++ b/src/CBot/CBotInstr/CBotExpression.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotExpression.h b/src/CBot/CBotInstr/CBotExpression.h index 4be37ae3..7299843c 100644 --- a/src/CBot/CBotInstr/CBotExpression.h +++ b/src/CBot/CBotInstr/CBotExpression.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotFieldExpr.cpp b/src/CBot/CBotInstr/CBotFieldExpr.cpp index 04635a1a..9b79272d 100644 --- a/src/CBot/CBotInstr/CBotFieldExpr.cpp +++ b/src/CBot/CBotInstr/CBotFieldExpr.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotFieldExpr.h b/src/CBot/CBotInstr/CBotFieldExpr.h index 5f093bd7..05270d5c 100644 --- a/src/CBot/CBotInstr/CBotFieldExpr.h +++ b/src/CBot/CBotInstr/CBotFieldExpr.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotFor.cpp b/src/CBot/CBotInstr/CBotFor.cpp index 71b04d89..92aafa0b 100644 --- a/src/CBot/CBotInstr/CBotFor.cpp +++ b/src/CBot/CBotInstr/CBotFor.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotFor.h b/src/CBot/CBotInstr/CBotFor.h index 27478f16..6ff431bb 100644 --- a/src/CBot/CBotInstr/CBotFor.h +++ b/src/CBot/CBotInstr/CBotFor.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotFunction.cpp b/src/CBot/CBotInstr/CBotFunction.cpp index 13b9005b..492711db 100644 --- a/src/CBot/CBotInstr/CBotFunction.cpp +++ b/src/CBot/CBotInstr/CBotFunction.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotFunction.h b/src/CBot/CBotInstr/CBotFunction.h index 1f25474f..90735158 100644 --- a/src/CBot/CBotInstr/CBotFunction.h +++ b/src/CBot/CBotInstr/CBotFunction.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotIf.cpp b/src/CBot/CBotInstr/CBotIf.cpp index 92da9b48..5d8e309a 100644 --- a/src/CBot/CBotInstr/CBotIf.cpp +++ b/src/CBot/CBotInstr/CBotIf.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotIf.h b/src/CBot/CBotInstr/CBotIf.h index 3df400e1..e558fc63 100644 --- a/src/CBot/CBotInstr/CBotIf.h +++ b/src/CBot/CBotInstr/CBotIf.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotIndexExpr.cpp b/src/CBot/CBotInstr/CBotIndexExpr.cpp index 22373b4a..bad92fc1 100644 --- a/src/CBot/CBotInstr/CBotIndexExpr.cpp +++ b/src/CBot/CBotInstr/CBotIndexExpr.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotIndexExpr.h b/src/CBot/CBotInstr/CBotIndexExpr.h index 8ac6ed5c..8844604b 100644 --- a/src/CBot/CBotInstr/CBotIndexExpr.h +++ b/src/CBot/CBotInstr/CBotIndexExpr.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotInstr.cpp b/src/CBot/CBotInstr/CBotInstr.cpp index 69bb9025..f69785f6 100644 --- a/src/CBot/CBotInstr/CBotInstr.cpp +++ b/src/CBot/CBotInstr/CBotInstr.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotInstr.h b/src/CBot/CBotInstr/CBotInstr.h index a96550db..712b379d 100644 --- a/src/CBot/CBotInstr/CBotInstr.h +++ b/src/CBot/CBotInstr/CBotInstr.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotInstrCall.cpp b/src/CBot/CBotInstr/CBotInstrCall.cpp index 86e37f72..58203e80 100644 --- a/src/CBot/CBotInstr/CBotInstrCall.cpp +++ b/src/CBot/CBotInstr/CBotInstrCall.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotInstrCall.h b/src/CBot/CBotInstr/CBotInstrCall.h index e39534f6..88c82759 100644 --- a/src/CBot/CBotInstr/CBotInstrCall.h +++ b/src/CBot/CBotInstr/CBotInstrCall.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotInstrMethode.cpp b/src/CBot/CBotInstr/CBotInstrMethode.cpp index f4cda036..386e8f3a 100644 --- a/src/CBot/CBotInstr/CBotInstrMethode.cpp +++ b/src/CBot/CBotInstr/CBotInstrMethode.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotInstrMethode.h b/src/CBot/CBotInstr/CBotInstrMethode.h index 502dcf4e..c14815ca 100644 --- a/src/CBot/CBotInstr/CBotInstrMethode.h +++ b/src/CBot/CBotInstr/CBotInstrMethode.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotInstrUtils.cpp b/src/CBot/CBotInstr/CBotInstrUtils.cpp index 067f443a..04c42211 100644 --- a/src/CBot/CBotInstr/CBotInstrUtils.cpp +++ b/src/CBot/CBotInstr/CBotInstrUtils.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotInstrUtils.h b/src/CBot/CBotInstr/CBotInstrUtils.h index 0177e09c..88d2a96e 100644 --- a/src/CBot/CBotInstr/CBotInstrUtils.h +++ b/src/CBot/CBotInstr/CBotInstrUtils.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotLeftExpr.cpp b/src/CBot/CBotInstr/CBotLeftExpr.cpp index 3c701eb8..25f147a5 100644 --- a/src/CBot/CBotInstr/CBotLeftExpr.cpp +++ b/src/CBot/CBotInstr/CBotLeftExpr.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotLeftExpr.h b/src/CBot/CBotInstr/CBotLeftExpr.h index 4cffe46e..e19ef01e 100644 --- a/src/CBot/CBotInstr/CBotLeftExpr.h +++ b/src/CBot/CBotInstr/CBotLeftExpr.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotLeftExprVar.cpp b/src/CBot/CBotInstr/CBotLeftExprVar.cpp index 4394fc43..bac68394 100644 --- a/src/CBot/CBotInstr/CBotLeftExprVar.cpp +++ b/src/CBot/CBotInstr/CBotLeftExprVar.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotLeftExprVar.h b/src/CBot/CBotInstr/CBotLeftExprVar.h index dcd02281..37582a4b 100644 --- a/src/CBot/CBotInstr/CBotLeftExprVar.h +++ b/src/CBot/CBotInstr/CBotLeftExprVar.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotListArray.cpp b/src/CBot/CBotInstr/CBotListArray.cpp index cf3bfddc..b6658aa6 100644 --- a/src/CBot/CBotInstr/CBotListArray.cpp +++ b/src/CBot/CBotInstr/CBotListArray.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotListArray.h b/src/CBot/CBotInstr/CBotListArray.h index 18d6b567..927db579 100644 --- a/src/CBot/CBotInstr/CBotListArray.h +++ b/src/CBot/CBotInstr/CBotListArray.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotListExpression.cpp b/src/CBot/CBotInstr/CBotListExpression.cpp index 773cda83..d428383e 100644 --- a/src/CBot/CBotInstr/CBotListExpression.cpp +++ b/src/CBot/CBotInstr/CBotListExpression.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotListExpression.h b/src/CBot/CBotInstr/CBotListExpression.h index dfe561d3..b793fc60 100644 --- a/src/CBot/CBotInstr/CBotListExpression.h +++ b/src/CBot/CBotInstr/CBotListExpression.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotListInstr.cpp b/src/CBot/CBotInstr/CBotListInstr.cpp index bcbd3bba..1010b3ee 100644 --- a/src/CBot/CBotInstr/CBotListInstr.cpp +++ b/src/CBot/CBotInstr/CBotListInstr.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotListInstr.h b/src/CBot/CBotInstr/CBotListInstr.h index 659784f6..cddbe40f 100644 --- a/src/CBot/CBotInstr/CBotListInstr.h +++ b/src/CBot/CBotInstr/CBotListInstr.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotLogicExpr.cpp b/src/CBot/CBotInstr/CBotLogicExpr.cpp index d1c1b30b..cf1df5dd 100644 --- a/src/CBot/CBotInstr/CBotLogicExpr.cpp +++ b/src/CBot/CBotInstr/CBotLogicExpr.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotLogicExpr.h b/src/CBot/CBotInstr/CBotLogicExpr.h index 7a343be7..bd296a89 100644 --- a/src/CBot/CBotInstr/CBotLogicExpr.h +++ b/src/CBot/CBotInstr/CBotLogicExpr.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotNew.cpp b/src/CBot/CBotInstr/CBotNew.cpp index 1c84dc53..b9438511 100644 --- a/src/CBot/CBotInstr/CBotNew.cpp +++ b/src/CBot/CBotInstr/CBotNew.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotNew.h b/src/CBot/CBotInstr/CBotNew.h index c69da3aa..c1b2aa57 100644 --- a/src/CBot/CBotInstr/CBotNew.h +++ b/src/CBot/CBotInstr/CBotNew.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotParExpr.cpp b/src/CBot/CBotInstr/CBotParExpr.cpp index 0a608c32..b879ebec 100644 --- a/src/CBot/CBotInstr/CBotParExpr.cpp +++ b/src/CBot/CBotInstr/CBotParExpr.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotParExpr.h b/src/CBot/CBotInstr/CBotParExpr.h index 0bcdd0e1..235dab11 100644 --- a/src/CBot/CBotInstr/CBotParExpr.h +++ b/src/CBot/CBotInstr/CBotParExpr.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotPostIncExpr.cpp b/src/CBot/CBotInstr/CBotPostIncExpr.cpp index c2ff5a8d..b4f67a77 100644 --- a/src/CBot/CBotInstr/CBotPostIncExpr.cpp +++ b/src/CBot/CBotInstr/CBotPostIncExpr.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotPostIncExpr.h b/src/CBot/CBotInstr/CBotPostIncExpr.h index 86676e53..eae16151 100644 --- a/src/CBot/CBotInstr/CBotPostIncExpr.h +++ b/src/CBot/CBotInstr/CBotPostIncExpr.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotPreIncExpr.cpp b/src/CBot/CBotInstr/CBotPreIncExpr.cpp index 1454eda0..a1bb4a6a 100644 --- a/src/CBot/CBotInstr/CBotPreIncExpr.cpp +++ b/src/CBot/CBotInstr/CBotPreIncExpr.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotPreIncExpr.h b/src/CBot/CBotInstr/CBotPreIncExpr.h index 326d9b85..61e05dcc 100644 --- a/src/CBot/CBotInstr/CBotPreIncExpr.h +++ b/src/CBot/CBotInstr/CBotPreIncExpr.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotReturn.cpp b/src/CBot/CBotInstr/CBotReturn.cpp index 5979989e..ca5871cb 100644 --- a/src/CBot/CBotInstr/CBotReturn.cpp +++ b/src/CBot/CBotInstr/CBotReturn.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotReturn.h b/src/CBot/CBotInstr/CBotReturn.h index 9d14a3e9..a5ccf542 100644 --- a/src/CBot/CBotInstr/CBotReturn.h +++ b/src/CBot/CBotInstr/CBotReturn.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotSwitch.cpp b/src/CBot/CBotInstr/CBotSwitch.cpp index 92595a3e..e8d1b24d 100644 --- a/src/CBot/CBotInstr/CBotSwitch.cpp +++ b/src/CBot/CBotInstr/CBotSwitch.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotSwitch.h b/src/CBot/CBotInstr/CBotSwitch.h index 71e380e6..ca6b2b20 100644 --- a/src/CBot/CBotInstr/CBotSwitch.h +++ b/src/CBot/CBotInstr/CBotSwitch.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotThrow.cpp b/src/CBot/CBotInstr/CBotThrow.cpp index 7bfec88e..07b7dbcd 100644 --- a/src/CBot/CBotInstr/CBotThrow.cpp +++ b/src/CBot/CBotInstr/CBotThrow.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotThrow.h b/src/CBot/CBotInstr/CBotThrow.h index 3b83a95b..4181c72f 100644 --- a/src/CBot/CBotInstr/CBotThrow.h +++ b/src/CBot/CBotInstr/CBotThrow.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotTry.cpp b/src/CBot/CBotInstr/CBotTry.cpp index e5cc24e6..1a881c99 100644 --- a/src/CBot/CBotInstr/CBotTry.cpp +++ b/src/CBot/CBotInstr/CBotTry.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotTry.h b/src/CBot/CBotInstr/CBotTry.h index 6cf3e0b0..a9e790d1 100644 --- a/src/CBot/CBotInstr/CBotTry.h +++ b/src/CBot/CBotInstr/CBotTry.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotTwoOpExpr.cpp b/src/CBot/CBotInstr/CBotTwoOpExpr.cpp index 54db5976..bc44111e 100644 --- a/src/CBot/CBotInstr/CBotTwoOpExpr.cpp +++ b/src/CBot/CBotInstr/CBotTwoOpExpr.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotTwoOpExpr.h b/src/CBot/CBotInstr/CBotTwoOpExpr.h index 7d1b3933..c1110e13 100644 --- a/src/CBot/CBotInstr/CBotTwoOpExpr.h +++ b/src/CBot/CBotInstr/CBotTwoOpExpr.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotWhile.cpp b/src/CBot/CBotInstr/CBotWhile.cpp index 228d048b..9254ad02 100644 --- a/src/CBot/CBotInstr/CBotWhile.cpp +++ b/src/CBot/CBotInstr/CBotWhile.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotInstr/CBotWhile.h b/src/CBot/CBotInstr/CBotWhile.h index aa6c95af..582d5cf1 100644 --- a/src/CBot/CBotInstr/CBotWhile.h +++ b/src/CBot/CBotInstr/CBotWhile.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotProgram.cpp b/src/CBot/CBotProgram.cpp index a3a216a2..013b84f9 100644 --- a/src/CBot/CBotProgram.cpp +++ b/src/CBot/CBotProgram.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotProgram.h b/src/CBot/CBotProgram.h index 4a64b562..e258fff0 100644 --- a/src/CBot/CBotProgram.h +++ b/src/CBot/CBotProgram.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotStack.cpp b/src/CBot/CBotStack.cpp index 57aa4290..9f9db2d6 100644 --- a/src/CBot/CBotStack.cpp +++ b/src/CBot/CBotStack.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotStack.h b/src/CBot/CBotStack.h index 6cd8e567..a72b3e4a 100644 --- a/src/CBot/CBotStack.h +++ b/src/CBot/CBotStack.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotToken.cpp b/src/CBot/CBotToken.cpp index 3c4bc7d9..6f402165 100644 --- a/src/CBot/CBotToken.cpp +++ b/src/CBot/CBotToken.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotToken.h b/src/CBot/CBotToken.h index a9254434..cfbda812 100644 --- a/src/CBot/CBotToken.h +++ b/src/CBot/CBotToken.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotTypResult.cpp b/src/CBot/CBotTypResult.cpp index d7005c2a..61e96530 100644 --- a/src/CBot/CBotTypResult.cpp +++ b/src/CBot/CBotTypResult.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotTypResult.h b/src/CBot/CBotTypResult.h index 00683ca5..42c438a1 100644 --- a/src/CBot/CBotTypResult.h +++ b/src/CBot/CBotTypResult.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotUtils.cpp b/src/CBot/CBotUtils.cpp index 2bb4d8e8..a6c6ef9c 100644 --- a/src/CBot/CBotUtils.cpp +++ b/src/CBot/CBotUtils.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotUtils.h b/src/CBot/CBotUtils.h index 6db107a9..9042b0f8 100644 --- a/src/CBot/CBotUtils.h +++ b/src/CBot/CBotUtils.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotVar/CBotVar.cpp b/src/CBot/CBotVar/CBotVar.cpp index 7ea659f5..742ef598 100644 --- a/src/CBot/CBotVar/CBotVar.cpp +++ b/src/CBot/CBotVar/CBotVar.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotVar/CBotVar.h b/src/CBot/CBotVar/CBotVar.h index 7babb7d1..a023e2f9 100644 --- a/src/CBot/CBotVar/CBotVar.h +++ b/src/CBot/CBotVar/CBotVar.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotVar/CBotVarArray.cpp b/src/CBot/CBotVar/CBotVarArray.cpp index 207b0f45..cadfe1e5 100644 --- a/src/CBot/CBotVar/CBotVarArray.cpp +++ b/src/CBot/CBotVar/CBotVarArray.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotVar/CBotVarArray.h b/src/CBot/CBotVar/CBotVarArray.h index 35e6ce1b..68b00b28 100644 --- a/src/CBot/CBotVar/CBotVarArray.h +++ b/src/CBot/CBotVar/CBotVarArray.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotVar/CBotVarBoolean.cpp b/src/CBot/CBotVar/CBotVarBoolean.cpp index c9a9b52e..d36de078 100644 --- a/src/CBot/CBotVar/CBotVarBoolean.cpp +++ b/src/CBot/CBotVar/CBotVarBoolean.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotVar/CBotVarBoolean.h b/src/CBot/CBotVar/CBotVarBoolean.h index 34f627bc..44774a9f 100644 --- a/src/CBot/CBotVar/CBotVarBoolean.h +++ b/src/CBot/CBotVar/CBotVarBoolean.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotVar/CBotVarClass.cpp b/src/CBot/CBotVar/CBotVarClass.cpp index de3d274f..06944b51 100644 --- a/src/CBot/CBotVar/CBotVarClass.cpp +++ b/src/CBot/CBotVar/CBotVarClass.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotVar/CBotVarClass.h b/src/CBot/CBotVar/CBotVarClass.h index ece7d7ce..55bdd891 100644 --- a/src/CBot/CBotVar/CBotVarClass.h +++ b/src/CBot/CBotVar/CBotVarClass.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotVar/CBotVarFloat.cpp b/src/CBot/CBotVar/CBotVarFloat.cpp index ae90966a..a1c4217f 100644 --- a/src/CBot/CBotVar/CBotVarFloat.cpp +++ b/src/CBot/CBotVar/CBotVarFloat.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotVar/CBotVarFloat.h b/src/CBot/CBotVar/CBotVarFloat.h index 84324e60..81cbcde0 100644 --- a/src/CBot/CBotVar/CBotVarFloat.h +++ b/src/CBot/CBotVar/CBotVarFloat.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotVar/CBotVarInt.cpp b/src/CBot/CBotVar/CBotVarInt.cpp index 29715c9b..477629ae 100644 --- a/src/CBot/CBotVar/CBotVarInt.cpp +++ b/src/CBot/CBotVar/CBotVarInt.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotVar/CBotVarInt.h b/src/CBot/CBotVar/CBotVarInt.h index 32d0af0b..906a402d 100644 --- a/src/CBot/CBotVar/CBotVarInt.h +++ b/src/CBot/CBotVar/CBotVarInt.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotVar/CBotVarPointer.cpp b/src/CBot/CBotVar/CBotVarPointer.cpp index f98b1463..afc81b93 100644 --- a/src/CBot/CBotVar/CBotVarPointer.cpp +++ b/src/CBot/CBotVar/CBotVarPointer.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotVar/CBotVarPointer.h b/src/CBot/CBotVar/CBotVarPointer.h index bb2ae4de..75c9bc98 100644 --- a/src/CBot/CBotVar/CBotVarPointer.h +++ b/src/CBot/CBotVar/CBotVarPointer.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotVar/CBotVarString.cpp b/src/CBot/CBotVar/CBotVarString.cpp index a5f3bba6..91a0e618 100644 --- a/src/CBot/CBotVar/CBotVarString.cpp +++ b/src/CBot/CBotVar/CBotVarString.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotVar/CBotVarString.h b/src/CBot/CBotVar/CBotVarString.h index 28d3018d..d01a80f6 100644 --- a/src/CBot/CBotVar/CBotVarString.h +++ b/src/CBot/CBotVar/CBotVarString.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/CBotVar/CBotVarValue.h b/src/CBot/CBotVar/CBotVarValue.h index 3fd15286..76e820e8 100644 --- a/src/CBot/CBotVar/CBotVarValue.h +++ b/src/CBot/CBotVar/CBotVarValue.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/stdlib/Compilation.cpp b/src/CBot/stdlib/Compilation.cpp index 7b9e15f3..2ff4403a 100644 --- a/src/CBot/stdlib/Compilation.cpp +++ b/src/CBot/stdlib/Compilation.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/stdlib/Compilation.h b/src/CBot/stdlib/Compilation.h index 08552d9f..23dcfd1a 100644 --- a/src/CBot/stdlib/Compilation.h +++ b/src/CBot/stdlib/Compilation.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/stdlib/FileFunctions.cpp b/src/CBot/stdlib/FileFunctions.cpp index 57d778ad..e565866b 100644 --- a/src/CBot/stdlib/FileFunctions.cpp +++ b/src/CBot/stdlib/FileFunctions.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/stdlib/MathFunctions.cpp b/src/CBot/stdlib/MathFunctions.cpp index add8711a..cbfd9db9 100644 --- a/src/CBot/stdlib/MathFunctions.cpp +++ b/src/CBot/stdlib/MathFunctions.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/stdlib/StringFunctions.cpp b/src/CBot/stdlib/StringFunctions.cpp index 77a359cb..93bb9136 100644 --- a/src/CBot/stdlib/StringFunctions.cpp +++ b/src/CBot/stdlib/StringFunctions.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/stdlib/stdlib.h b/src/CBot/stdlib/stdlib.h index e6d73b78..fbc5d3fa 100644 --- a/src/CBot/stdlib/stdlib.h +++ b/src/CBot/stdlib/stdlib.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/CBot/stdlib/stdlib_public.h b/src/CBot/stdlib/stdlib_public.h index bb5fc337..b7d5ef67 100644 --- a/src/CBot/stdlib/stdlib_public.h +++ b/src/CBot/stdlib/stdlib_public.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/app/app.cpp b/src/app/app.cpp index c780e20e..ef929e43 100644 --- a/src/app/app.cpp +++ b/src/app/app.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/app/app.h b/src/app/app.h index 20721e24..ccae3a5c 100644 --- a/src/app/app.h +++ b/src/app/app.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/app/controller.cpp b/src/app/controller.cpp index 2c364af7..91156bbf 100644 --- a/src/app/controller.cpp +++ b/src/app/controller.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/app/controller.h b/src/app/controller.h index ed80898c..1ba39f99 100644 --- a/src/app/controller.h +++ b/src/app/controller.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/app/input.cpp b/src/app/input.cpp index ebaf62e3..fffa1a14 100644 --- a/src/app/input.cpp +++ b/src/app/input.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/app/input.h b/src/app/input.h index 15cdc98d..990b4898 100644 --- a/src/app/input.h +++ b/src/app/input.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/app/main.cpp b/src/app/main.cpp index 97cee634..9fdb89a3 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/app/pathman.cpp b/src/app/pathman.cpp index c5f7e50a..e86780e5 100644 --- a/src/app/pathman.cpp +++ b/src/app/pathman.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/app/pathman.h b/src/app/pathman.h index 059c81fe..39c780df 100644 --- a/src/app/pathman.h +++ b/src/app/pathman.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/app/pausemanager.cpp b/src/app/pausemanager.cpp index 69bc487b..8efd4b96 100644 --- a/src/app/pausemanager.cpp +++ b/src/app/pausemanager.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/app/pausemanager.h b/src/app/pausemanager.h index d76baf87..d7a2ce03 100644 --- a/src/app/pausemanager.h +++ b/src/app/pausemanager.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/app/signal_handlers.cpp b/src/app/signal_handlers.cpp index b08a0a22..c6782b30 100644 --- a/src/app/signal_handlers.cpp +++ b/src/app/signal_handlers.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/app/signal_handlers.h b/src/app/signal_handlers.h index 962bf5de..4716e6c9 100644 --- a/src/app/signal_handlers.h +++ b/src/app/signal_handlers.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/config_file.cpp b/src/common/config_file.cpp index 94496ca1..868f9511 100644 --- a/src/common/config_file.cpp +++ b/src/common/config_file.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/config_file.h b/src/common/config_file.h index 0ed8e19f..10ee131f 100644 --- a/src/common/config_file.h +++ b/src/common/config_file.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/error.h b/src/common/error.h index 0ef8121e..e344d04c 100644 --- a/src/common/error.h +++ b/src/common/error.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/event.cpp b/src/common/event.cpp index 10d1ae9f..36f2bcb5 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/event.h b/src/common/event.h index 27ab1141..fe9b6448 100644 --- a/src/common/event.h +++ b/src/common/event.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/global.h b/src/common/global.h index 3bce7265..ad31e128 100644 --- a/src/common/global.h +++ b/src/common/global.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/image.cpp b/src/common/image.cpp index a63f00a5..0303e815 100644 --- a/src/common/image.cpp +++ b/src/common/image.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/image.h b/src/common/image.h index 0185417d..8bede4f7 100644 --- a/src/common/image.h +++ b/src/common/image.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/ioutils.h b/src/common/ioutils.h index 81ded4c0..403f1c5a 100644 --- a/src/common/ioutils.h +++ b/src/common/ioutils.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/key.cpp b/src/common/key.cpp index e02c5791..59a178b9 100644 --- a/src/common/key.cpp +++ b/src/common/key.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/key.h b/src/common/key.h index 4341519e..2c087d73 100644 --- a/src/common/key.h +++ b/src/common/key.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/language.cpp b/src/common/language.cpp index 3e004961..2a6304a3 100644 --- a/src/common/language.cpp +++ b/src/common/language.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/language.h b/src/common/language.h index 6d6fb080..5f43911d 100644 --- a/src/common/language.h +++ b/src/common/language.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/logger.cpp b/src/common/logger.cpp index ed9bdb5d..ba2a4aec 100644 --- a/src/common/logger.cpp +++ b/src/common/logger.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/logger.h b/src/common/logger.h index e0a935d4..852509a4 100644 --- a/src/common/logger.h +++ b/src/common/logger.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/make_unique.h b/src/common/make_unique.h index a9a2346b..7c6cd30c 100644 --- a/src/common/make_unique.h +++ b/src/common/make_unique.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/profiler.cpp b/src/common/profiler.cpp index f80ae849..ff46036e 100644 --- a/src/common/profiler.cpp +++ b/src/common/profiler.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/profiler.h b/src/common/profiler.h index d0d373ab..4caaea41 100644 --- a/src/common/profiler.h +++ b/src/common/profiler.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/regex_utils.cpp b/src/common/regex_utils.cpp index 3472001f..a7449f3e 100644 --- a/src/common/regex_utils.cpp +++ b/src/common/regex_utils.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/regex_utils.h b/src/common/regex_utils.h index f82d10b2..5b2f04ed 100644 --- a/src/common/regex_utils.h +++ b/src/common/regex_utils.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/resources/inputstream.cpp b/src/common/resources/inputstream.cpp index 80569bba..43196682 100644 --- a/src/common/resources/inputstream.cpp +++ b/src/common/resources/inputstream.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/resources/inputstream.h b/src/common/resources/inputstream.h index 9058e4d7..3d0e86f7 100644 --- a/src/common/resources/inputstream.h +++ b/src/common/resources/inputstream.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/resources/inputstreambuffer.cpp b/src/common/resources/inputstreambuffer.cpp index f581deb7..8081962f 100644 --- a/src/common/resources/inputstreambuffer.cpp +++ b/src/common/resources/inputstreambuffer.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/resources/inputstreambuffer.h b/src/common/resources/inputstreambuffer.h index 3d40c2c1..e3a044c0 100644 --- a/src/common/resources/inputstreambuffer.h +++ b/src/common/resources/inputstreambuffer.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/resources/outputstream.cpp b/src/common/resources/outputstream.cpp index 0d43beb5..1f806154 100644 --- a/src/common/resources/outputstream.cpp +++ b/src/common/resources/outputstream.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/resources/outputstream.h b/src/common/resources/outputstream.h index 1aeaf740..be3249fe 100644 --- a/src/common/resources/outputstream.h +++ b/src/common/resources/outputstream.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/resources/outputstreambuffer.cpp b/src/common/resources/outputstreambuffer.cpp index 27952388..3ca4dd13 100644 --- a/src/common/resources/outputstreambuffer.cpp +++ b/src/common/resources/outputstreambuffer.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/resources/outputstreambuffer.h b/src/common/resources/outputstreambuffer.h index 0945b303..4f44c964 100644 --- a/src/common/resources/outputstreambuffer.h +++ b/src/common/resources/outputstreambuffer.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/resources/resourcemanager.cpp b/src/common/resources/resourcemanager.cpp index 86c77bfe..820495b8 100644 --- a/src/common/resources/resourcemanager.cpp +++ b/src/common/resources/resourcemanager.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/resources/resourcemanager.h b/src/common/resources/resourcemanager.h index 61f85b38..d0b4ab24 100644 --- a/src/common/resources/resourcemanager.h +++ b/src/common/resources/resourcemanager.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/resources/sdl_file_wrapper.cpp b/src/common/resources/sdl_file_wrapper.cpp index bf07db36..c8c36845 100644 --- a/src/common/resources/sdl_file_wrapper.cpp +++ b/src/common/resources/sdl_file_wrapper.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/resources/sdl_file_wrapper.h b/src/common/resources/sdl_file_wrapper.h index e0ce1698..0666b21e 100644 --- a/src/common/resources/sdl_file_wrapper.h +++ b/src/common/resources/sdl_file_wrapper.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/resources/sdl_memory_wrapper.cpp b/src/common/resources/sdl_memory_wrapper.cpp index 914d1a00..d2663a54 100644 --- a/src/common/resources/sdl_memory_wrapper.cpp +++ b/src/common/resources/sdl_memory_wrapper.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/resources/sdl_memory_wrapper.h b/src/common/resources/sdl_memory_wrapper.h index 67c4f588..f5218a66 100644 --- a/src/common/resources/sdl_memory_wrapper.h +++ b/src/common/resources/sdl_memory_wrapper.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/resources/sndfile_wrapper.cpp b/src/common/resources/sndfile_wrapper.cpp index e9e53763..f3b277f9 100644 --- a/src/common/resources/sndfile_wrapper.cpp +++ b/src/common/resources/sndfile_wrapper.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/resources/sndfile_wrapper.h b/src/common/resources/sndfile_wrapper.h index 3f79f123..8bbe009d 100644 --- a/src/common/resources/sndfile_wrapper.h +++ b/src/common/resources/sndfile_wrapper.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/restext.cpp b/src/common/restext.cpp index ac526af8..c5704362 100644 --- a/src/common/restext.cpp +++ b/src/common/restext.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/restext.h b/src/common/restext.h index 3c0af1a0..80808468 100644 --- a/src/common/restext.h +++ b/src/common/restext.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/settings.cpp b/src/common/settings.cpp index cf7dcc75..3a84439c 100644 --- a/src/common/settings.cpp +++ b/src/common/settings.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/settings.h b/src/common/settings.h index 92916840..6d085b29 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/singleton.h b/src/common/singleton.h index 254fc23d..88d121ee 100644 --- a/src/common/singleton.h +++ b/src/common/singleton.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/stringutils.cpp b/src/common/stringutils.cpp index 963a344b..b8639df3 100644 --- a/src/common/stringutils.cpp +++ b/src/common/stringutils.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/stringutils.h b/src/common/stringutils.h index 4d1357d2..8e4d0dee 100644 --- a/src/common/stringutils.h +++ b/src/common/stringutils.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/system/system.cpp b/src/common/system/system.cpp index ff4ad7c5..01b633cc 100644 --- a/src/common/system/system.cpp +++ b/src/common/system/system.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/system/system.h b/src/common/system/system.h index 2be5ae16..aaf54954 100644 --- a/src/common/system/system.h +++ b/src/common/system/system.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/system/system_linux.cpp b/src/common/system/system_linux.cpp index fd663919..3cd25ed2 100644 --- a/src/common/system/system_linux.cpp +++ b/src/common/system/system_linux.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/system/system_linux.h b/src/common/system/system_linux.h index e451a936..f1576f31 100644 --- a/src/common/system/system_linux.h +++ b/src/common/system/system_linux.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/system/system_macosx.cpp b/src/common/system/system_macosx.cpp index 47304876..ede5b481 100644 --- a/src/common/system/system_macosx.cpp +++ b/src/common/system/system_macosx.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/system/system_macosx.h b/src/common/system/system_macosx.h index c8abba53..5b572ec4 100644 --- a/src/common/system/system_macosx.h +++ b/src/common/system/system_macosx.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/system/system_other.cpp b/src/common/system/system_other.cpp index 8547b829..a3311a74 100644 --- a/src/common/system/system_other.cpp +++ b/src/common/system/system_other.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/system/system_other.h b/src/common/system/system_other.h index caac018d..ac80701b 100644 --- a/src/common/system/system_other.h +++ b/src/common/system/system_other.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/system/system_windows.cpp b/src/common/system/system_windows.cpp index 4c6d13ef..f51959b4 100644 --- a/src/common/system/system_windows.cpp +++ b/src/common/system/system_windows.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/system/system_windows.h b/src/common/system/system_windows.h index dae9e0fa..74f02455 100644 --- a/src/common/system/system_windows.h +++ b/src/common/system/system_windows.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/thread/resource_owning_thread.h b/src/common/thread/resource_owning_thread.h index 04237961..995cf4cb 100644 --- a/src/common/thread/resource_owning_thread.h +++ b/src/common/thread/resource_owning_thread.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/thread/sdl_cond_wrapper.h b/src/common/thread/sdl_cond_wrapper.h index 8c8be5ee..1be681cf 100644 --- a/src/common/thread/sdl_cond_wrapper.h +++ b/src/common/thread/sdl_cond_wrapper.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/thread/sdl_mutex_wrapper.h b/src/common/thread/sdl_mutex_wrapper.h index 59afc0aa..476ddcae 100644 --- a/src/common/thread/sdl_mutex_wrapper.h +++ b/src/common/thread/sdl_mutex_wrapper.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/thread/thread.h b/src/common/thread/thread.h index d0b6b873..59433ae3 100644 --- a/src/common/thread/thread.h +++ b/src/common/thread/thread.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/common/thread/worker_thread.h b/src/common/thread/worker_thread.h index aa2ce3e4..ad127556 100644 --- a/src/common/thread/worker_thread.h +++ b/src/common/thread/worker_thread.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/core/color.cpp b/src/graphics/core/color.cpp index 5539ba26..1250b827 100644 --- a/src/graphics/core/color.cpp +++ b/src/graphics/core/color.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/core/color.h b/src/graphics/core/color.h index f2d9f7ec..cd4d541a 100644 --- a/src/graphics/core/color.h +++ b/src/graphics/core/color.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/core/device.h b/src/graphics/core/device.h index f2aae7d3..3302488c 100644 --- a/src/graphics/core/device.h +++ b/src/graphics/core/device.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/core/framebuffer.cpp b/src/graphics/core/framebuffer.cpp index 5a37dff7..40937128 100644 --- a/src/graphics/core/framebuffer.cpp +++ b/src/graphics/core/framebuffer.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/core/framebuffer.h b/src/graphics/core/framebuffer.h index 4598b6d7..e668b036 100644 --- a/src/graphics/core/framebuffer.h +++ b/src/graphics/core/framebuffer.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/core/light.h b/src/graphics/core/light.h index b228d7bf..3615cdb8 100644 --- a/src/graphics/core/light.h +++ b/src/graphics/core/light.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/core/material.h b/src/graphics/core/material.h index ed48e6ce..ac8f8bf3 100644 --- a/src/graphics/core/material.h +++ b/src/graphics/core/material.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/core/nulldevice.cpp b/src/graphics/core/nulldevice.cpp index 9abdb156..1fd1a09b 100644 --- a/src/graphics/core/nulldevice.cpp +++ b/src/graphics/core/nulldevice.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/core/nulldevice.h b/src/graphics/core/nulldevice.h index 39e3f995..4816251b 100644 --- a/src/graphics/core/nulldevice.h +++ b/src/graphics/core/nulldevice.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/core/texture.h b/src/graphics/core/texture.h index e092abb9..696261a2 100644 --- a/src/graphics/core/texture.h +++ b/src/graphics/core/texture.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/core/type.cpp b/src/graphics/core/type.cpp index 38dc9f52..9ccafae7 100644 --- a/src/graphics/core/type.cpp +++ b/src/graphics/core/type.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/core/type.h b/src/graphics/core/type.h index 2d493459..5fc8decb 100644 --- a/src/graphics/core/type.h +++ b/src/graphics/core/type.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/core/vertex.h b/src/graphics/core/vertex.h index 254c8d3d..1af5832e 100644 --- a/src/graphics/core/vertex.h +++ b/src/graphics/core/vertex.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/engine/camera.cpp b/src/graphics/engine/camera.cpp index 9f7fc40e..33d56da8 100644 --- a/src/graphics/engine/camera.cpp +++ b/src/graphics/engine/camera.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/engine/camera.h b/src/graphics/engine/camera.h index 83ac7afd..40fde096 100644 --- a/src/graphics/engine/camera.h +++ b/src/graphics/engine/camera.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/engine/cloud.cpp b/src/graphics/engine/cloud.cpp index 20cd6aa4..bc3210ba 100644 --- a/src/graphics/engine/cloud.cpp +++ b/src/graphics/engine/cloud.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/engine/cloud.h b/src/graphics/engine/cloud.h index 05a8d16a..4171627a 100644 --- a/src/graphics/engine/cloud.h +++ b/src/graphics/engine/cloud.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/engine/engine.cpp b/src/graphics/engine/engine.cpp index 74c6179d..960d9d6d 100644 --- a/src/graphics/engine/engine.cpp +++ b/src/graphics/engine/engine.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/engine/engine.h b/src/graphics/engine/engine.h index 655bc024..27f01585 100644 --- a/src/graphics/engine/engine.h +++ b/src/graphics/engine/engine.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/engine/lightman.cpp b/src/graphics/engine/lightman.cpp index 08230dd3..2a504754 100644 --- a/src/graphics/engine/lightman.cpp +++ b/src/graphics/engine/lightman.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/engine/lightman.h b/src/graphics/engine/lightman.h index 40d9f0fb..398a33e6 100644 --- a/src/graphics/engine/lightman.h +++ b/src/graphics/engine/lightman.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/engine/lightning.cpp b/src/graphics/engine/lightning.cpp index 190f5db8..9c1a64bd 100644 --- a/src/graphics/engine/lightning.cpp +++ b/src/graphics/engine/lightning.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/engine/lightning.h b/src/graphics/engine/lightning.h index 505a7cf6..dc278bc2 100644 --- a/src/graphics/engine/lightning.h +++ b/src/graphics/engine/lightning.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/engine/oldmodelmanager.cpp b/src/graphics/engine/oldmodelmanager.cpp index b7d12e22..e7ac426b 100644 --- a/src/graphics/engine/oldmodelmanager.cpp +++ b/src/graphics/engine/oldmodelmanager.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/engine/oldmodelmanager.h b/src/graphics/engine/oldmodelmanager.h index ca56cf23..2360d31c 100644 --- a/src/graphics/engine/oldmodelmanager.h +++ b/src/graphics/engine/oldmodelmanager.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/engine/particle.cpp b/src/graphics/engine/particle.cpp index f5c254e3..14916a62 100644 --- a/src/graphics/engine/particle.cpp +++ b/src/graphics/engine/particle.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/engine/particle.h b/src/graphics/engine/particle.h index 08dfc432..b4fada39 100644 --- a/src/graphics/engine/particle.h +++ b/src/graphics/engine/particle.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/engine/planet.cpp b/src/graphics/engine/planet.cpp index 44a3ef8b..5da1ed64 100644 --- a/src/graphics/engine/planet.cpp +++ b/src/graphics/engine/planet.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/engine/planet.h b/src/graphics/engine/planet.h index 53491804..41760176 100644 --- a/src/graphics/engine/planet.h +++ b/src/graphics/engine/planet.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/engine/planet_type.h b/src/graphics/engine/planet_type.h index 5ad7222e..7c6a2259 100644 --- a/src/graphics/engine/planet_type.h +++ b/src/graphics/engine/planet_type.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/engine/pyro.cpp b/src/graphics/engine/pyro.cpp index 5bc9f76d..6eedf854 100644 --- a/src/graphics/engine/pyro.cpp +++ b/src/graphics/engine/pyro.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/engine/pyro.h b/src/graphics/engine/pyro.h index 076cc769..34fd543c 100644 --- a/src/graphics/engine/pyro.h +++ b/src/graphics/engine/pyro.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/engine/pyro_manager.cpp b/src/graphics/engine/pyro_manager.cpp index bb86b11d..bc194862 100644 --- a/src/graphics/engine/pyro_manager.cpp +++ b/src/graphics/engine/pyro_manager.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/engine/pyro_manager.h b/src/graphics/engine/pyro_manager.h index c065e987..98940566 100644 --- a/src/graphics/engine/pyro_manager.h +++ b/src/graphics/engine/pyro_manager.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/engine/pyro_type.h b/src/graphics/engine/pyro_type.h index 20708df6..ad2daffd 100644 --- a/src/graphics/engine/pyro_type.h +++ b/src/graphics/engine/pyro_type.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/engine/terrain.cpp b/src/graphics/engine/terrain.cpp index 8467b86d..23f1c226 100644 --- a/src/graphics/engine/terrain.cpp +++ b/src/graphics/engine/terrain.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/engine/terrain.h b/src/graphics/engine/terrain.h index 9a86b584..139a44dd 100644 --- a/src/graphics/engine/terrain.h +++ b/src/graphics/engine/terrain.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/engine/text.cpp b/src/graphics/engine/text.cpp index 53bd7f6a..96bb3071 100644 --- a/src/graphics/engine/text.cpp +++ b/src/graphics/engine/text.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/engine/text.h b/src/graphics/engine/text.h index f6414c00..47538700 100644 --- a/src/graphics/engine/text.h +++ b/src/graphics/engine/text.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/engine/water.cpp b/src/graphics/engine/water.cpp index 5adebb90..a890e377 100644 --- a/src/graphics/engine/water.cpp +++ b/src/graphics/engine/water.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/engine/water.h b/src/graphics/engine/water.h index a554af69..f2373d69 100644 --- a/src/graphics/engine/water.h +++ b/src/graphics/engine/water.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/model/model.cpp b/src/graphics/model/model.cpp index 76997c25..a5cf9351 100644 --- a/src/graphics/model/model.cpp +++ b/src/graphics/model/model.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/model/model.h b/src/graphics/model/model.h index 256f91c7..26e19bde 100644 --- a/src/graphics/model/model.h +++ b/src/graphics/model/model.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/model/model_crash_sphere.h b/src/graphics/model/model_crash_sphere.h index 03ab1f96..8617c605 100644 --- a/src/graphics/model/model_crash_sphere.h +++ b/src/graphics/model/model_crash_sphere.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/model/model_format.h b/src/graphics/model/model_format.h index 989cd178..afac0b36 100644 --- a/src/graphics/model/model_format.h +++ b/src/graphics/model/model_format.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/model/model_input.cpp b/src/graphics/model/model_input.cpp index 0adb45e7..a7a73544 100644 --- a/src/graphics/model/model_input.cpp +++ b/src/graphics/model/model_input.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/model/model_input.h b/src/graphics/model/model_input.h index baed58b2..415a0e33 100644 --- a/src/graphics/model/model_input.h +++ b/src/graphics/model/model_input.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/model/model_io_exception.h b/src/graphics/model/model_io_exception.h index ccae7ee0..1831bdfe 100644 --- a/src/graphics/model/model_io_exception.h +++ b/src/graphics/model/model_io_exception.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/model/model_io_structs.h b/src/graphics/model/model_io_structs.h index 598e0655..36f4f7f1 100644 --- a/src/graphics/model/model_io_structs.h +++ b/src/graphics/model/model_io_structs.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/model/model_manager.cpp b/src/graphics/model/model_manager.cpp index ae2b0296..aa424fe1 100644 --- a/src/graphics/model/model_manager.cpp +++ b/src/graphics/model/model_manager.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/model/model_manager.h b/src/graphics/model/model_manager.h index f7137ed6..b0cb1520 100644 --- a/src/graphics/model/model_manager.h +++ b/src/graphics/model/model_manager.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/model/model_mesh.cpp b/src/graphics/model/model_mesh.cpp index 5bed32b3..0de7d3a5 100644 --- a/src/graphics/model/model_mesh.cpp +++ b/src/graphics/model/model_mesh.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/model/model_mesh.h b/src/graphics/model/model_mesh.h index 847b2186..3a5a7d5f 100644 --- a/src/graphics/model/model_mesh.h +++ b/src/graphics/model/model_mesh.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/model/model_output.cpp b/src/graphics/model/model_output.cpp index 1db3d282..15ebeb75 100644 --- a/src/graphics/model/model_output.cpp +++ b/src/graphics/model/model_output.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/model/model_output.h b/src/graphics/model/model_output.h index df9ef017..9bdfab67 100644 --- a/src/graphics/model/model_output.h +++ b/src/graphics/model/model_output.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/model/model_shadow_spot.h b/src/graphics/model/model_shadow_spot.h index c7b18ea8..7a46c456 100644 --- a/src/graphics/model/model_shadow_spot.h +++ b/src/graphics/model/model_shadow_spot.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/model/model_triangle.h b/src/graphics/model/model_triangle.h index 7eebc80a..74a61677 100644 --- a/src/graphics/model/model_triangle.h +++ b/src/graphics/model/model_triangle.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/opengl/gl14device.cpp b/src/graphics/opengl/gl14device.cpp index 39993f8d..fc950f49 100644 --- a/src/graphics/opengl/gl14device.cpp +++ b/src/graphics/opengl/gl14device.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/opengl/gl14device.h b/src/graphics/opengl/gl14device.h index 4106b841..7bc533af 100644 --- a/src/graphics/opengl/gl14device.h +++ b/src/graphics/opengl/gl14device.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/opengl/gl21device.cpp b/src/graphics/opengl/gl21device.cpp index 48467668..f0bbdbb5 100644 --- a/src/graphics/opengl/gl21device.cpp +++ b/src/graphics/opengl/gl21device.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/opengl/gl21device.h b/src/graphics/opengl/gl21device.h index 9a2bea7e..6e1bf261 100644 --- a/src/graphics/opengl/gl21device.h +++ b/src/graphics/opengl/gl21device.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/opengl/gl33device.cpp b/src/graphics/opengl/gl33device.cpp index 74853713..776f1547 100644 --- a/src/graphics/opengl/gl33device.cpp +++ b/src/graphics/opengl/gl33device.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/opengl/gl33device.h b/src/graphics/opengl/gl33device.h index 12764b6f..b0b452e0 100644 --- a/src/graphics/opengl/gl33device.h +++ b/src/graphics/opengl/gl33device.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/opengl/glframebuffer.cpp b/src/graphics/opengl/glframebuffer.cpp index 04dff135..c58d90d7 100644 --- a/src/graphics/opengl/glframebuffer.cpp +++ b/src/graphics/opengl/glframebuffer.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/opengl/glframebuffer.h b/src/graphics/opengl/glframebuffer.h index bfe52dfc..4e3dff76 100644 --- a/src/graphics/opengl/glframebuffer.h +++ b/src/graphics/opengl/glframebuffer.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/opengl/glutil.cpp b/src/graphics/opengl/glutil.cpp index 66018213..0060b4db 100644 --- a/src/graphics/opengl/glutil.cpp +++ b/src/graphics/opengl/glutil.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/graphics/opengl/glutil.h b/src/graphics/opengl/glutil.h index f6b0f16f..977bc9c3 100644 --- a/src/graphics/opengl/glutil.h +++ b/src/graphics/opengl/glutil.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/level/build_type.h b/src/level/build_type.h index eca867b1..9ba6befd 100644 --- a/src/level/build_type.h +++ b/src/level/build_type.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/level/level_category.cpp b/src/level/level_category.cpp index c9274550..6735b951 100644 --- a/src/level/level_category.cpp +++ b/src/level/level_category.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/level/level_category.h b/src/level/level_category.h index 4001b674..43ef5156 100644 --- a/src/level/level_category.h +++ b/src/level/level_category.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/level/mainmovie.cpp b/src/level/mainmovie.cpp index dc5f4cb0..4aa4245a 100644 --- a/src/level/mainmovie.cpp +++ b/src/level/mainmovie.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/level/mainmovie.h b/src/level/mainmovie.h index f2983763..effd5ff6 100644 --- a/src/level/mainmovie.h +++ b/src/level/mainmovie.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/level/parser/parser.cpp b/src/level/parser/parser.cpp index ceb2f07e..89152246 100644 --- a/src/level/parser/parser.cpp +++ b/src/level/parser/parser.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/level/parser/parser.h b/src/level/parser/parser.h index b1dda319..08157119 100644 --- a/src/level/parser/parser.h +++ b/src/level/parser/parser.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/level/parser/parserexceptions.cpp b/src/level/parser/parserexceptions.cpp index f03c2d41..a8895cac 100644 --- a/src/level/parser/parserexceptions.cpp +++ b/src/level/parser/parserexceptions.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/level/parser/parserexceptions.h b/src/level/parser/parserexceptions.h index 50b9d84d..b9d40fd4 100644 --- a/src/level/parser/parserexceptions.h +++ b/src/level/parser/parserexceptions.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/level/parser/parserline.cpp b/src/level/parser/parserline.cpp index bf0e91c6..59c85d21 100644 --- a/src/level/parser/parserline.cpp +++ b/src/level/parser/parserline.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/level/parser/parserline.h b/src/level/parser/parserline.h index a9e7dda9..d9920824 100644 --- a/src/level/parser/parserline.h +++ b/src/level/parser/parserline.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/level/parser/parserparam.cpp b/src/level/parser/parserparam.cpp index 37773efa..791e813b 100644 --- a/src/level/parser/parserparam.cpp +++ b/src/level/parser/parserparam.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/level/parser/parserparam.h b/src/level/parser/parserparam.h index c72be4f0..441816fa 100644 --- a/src/level/parser/parserparam.h +++ b/src/level/parser/parserparam.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/level/player_profile.cpp b/src/level/player_profile.cpp index 21bb3b25..971edd42 100644 --- a/src/level/player_profile.cpp +++ b/src/level/player_profile.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/level/player_profile.h b/src/level/player_profile.h index fc198cbe..46745677 100644 --- a/src/level/player_profile.h +++ b/src/level/player_profile.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/level/research_type.h b/src/level/research_type.h index 8bde895e..add78a56 100644 --- a/src/level/research_type.h +++ b/src/level/research_type.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp index 3df62fe5..397652bb 100644 --- a/src/level/robotmain.cpp +++ b/src/level/robotmain.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/level/robotmain.h b/src/level/robotmain.h index 9b1511c0..7fac6c2d 100644 --- a/src/level/robotmain.h +++ b/src/level/robotmain.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/level/scene_conditions.cpp b/src/level/scene_conditions.cpp index d4ed1bfc..3ab32dac 100644 --- a/src/level/scene_conditions.cpp +++ b/src/level/scene_conditions.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/level/scene_conditions.h b/src/level/scene_conditions.h index 721c486c..14ef21b2 100644 --- a/src/level/scene_conditions.h +++ b/src/level/scene_conditions.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/math/all.h b/src/math/all.h index f56a56f5..a482eae4 100644 --- a/src/math/all.h +++ b/src/math/all.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/math/const.h b/src/math/const.h index 55678ac6..c5d24e5a 100644 --- a/src/math/const.h +++ b/src/math/const.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/math/func.h b/src/math/func.h index b206c89a..6fd9d6e9 100644 --- a/src/math/func.h +++ b/src/math/func.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/math/geometry.h b/src/math/geometry.h index 77962130..3e676c01 100644 --- a/src/math/geometry.h +++ b/src/math/geometry.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/math/half.cpp b/src/math/half.cpp index d1339a43..4795b7b2 100644 --- a/src/math/half.cpp +++ b/src/math/half.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/math/half.h b/src/math/half.h index a9d80d91..d5324bab 100644 --- a/src/math/half.h +++ b/src/math/half.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/math/intpoint.h b/src/math/intpoint.h index 470abf38..0a0cf525 100644 --- a/src/math/intpoint.h +++ b/src/math/intpoint.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/math/matrix.h b/src/math/matrix.h index 9327fc28..235ebb87 100644 --- a/src/math/matrix.h +++ b/src/math/matrix.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/math/point.h b/src/math/point.h index cd568ac1..e5779373 100644 --- a/src/math/point.h +++ b/src/math/point.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/math/sphere.h b/src/math/sphere.h index eea300a1..a5121d0c 100644 --- a/src/math/sphere.h +++ b/src/math/sphere.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/math/vector.h b/src/math/vector.h index 02c26096..dc547953 100644 --- a/src/math/vector.h +++ b/src/math/vector.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/auto/auto.cpp b/src/object/auto/auto.cpp index 04aa0d49..db5ce2c4 100644 --- a/src/object/auto/auto.cpp +++ b/src/object/auto/auto.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/auto/auto.h b/src/object/auto/auto.h index 4154f3cc..5e42bd27 100644 --- a/src/object/auto/auto.h +++ b/src/object/auto/auto.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/auto/autobase.cpp b/src/object/auto/autobase.cpp index 3200c612..32b2428b 100644 --- a/src/object/auto/autobase.cpp +++ b/src/object/auto/autobase.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/auto/autobase.h b/src/object/auto/autobase.h index ea2bcb35..ca4a3ca5 100644 --- a/src/object/auto/autobase.h +++ b/src/object/auto/autobase.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/auto/autoconvert.cpp b/src/object/auto/autoconvert.cpp index f737c49a..97aaf981 100644 --- a/src/object/auto/autoconvert.cpp +++ b/src/object/auto/autoconvert.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/auto/autoconvert.h b/src/object/auto/autoconvert.h index 0f989c0e..135f8dcf 100644 --- a/src/object/auto/autoconvert.h +++ b/src/object/auto/autoconvert.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/auto/autoderrick.cpp b/src/object/auto/autoderrick.cpp index 7fa93e2c..be632f85 100644 --- a/src/object/auto/autoderrick.cpp +++ b/src/object/auto/autoderrick.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/auto/autoderrick.h b/src/object/auto/autoderrick.h index cab4707f..10b63cde 100644 --- a/src/object/auto/autoderrick.h +++ b/src/object/auto/autoderrick.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/auto/autodestroyer.cpp b/src/object/auto/autodestroyer.cpp index deb77ff7..ccb3cbd7 100644 --- a/src/object/auto/autodestroyer.cpp +++ b/src/object/auto/autodestroyer.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/auto/autodestroyer.h b/src/object/auto/autodestroyer.h index 7285b5e5..e7594724 100644 --- a/src/object/auto/autodestroyer.h +++ b/src/object/auto/autodestroyer.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/auto/autoegg.cpp b/src/object/auto/autoegg.cpp index 30e95bf3..7ea3e750 100644 --- a/src/object/auto/autoegg.cpp +++ b/src/object/auto/autoegg.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/auto/autoegg.h b/src/object/auto/autoegg.h index 21177e60..049f85a8 100644 --- a/src/object/auto/autoegg.h +++ b/src/object/auto/autoegg.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/auto/autofactory.cpp b/src/object/auto/autofactory.cpp index 45fd357c..ecb8f5e0 100644 --- a/src/object/auto/autofactory.cpp +++ b/src/object/auto/autofactory.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/auto/autofactory.h b/src/object/auto/autofactory.h index b20641fe..12b9fd5b 100644 --- a/src/object/auto/autofactory.h +++ b/src/object/auto/autofactory.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/auto/autoflag.cpp b/src/object/auto/autoflag.cpp index d92e5d65..7db6aeab 100644 --- a/src/object/auto/autoflag.cpp +++ b/src/object/auto/autoflag.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/auto/autoflag.h b/src/object/auto/autoflag.h index 50c31cf1..39e2bb01 100644 --- a/src/object/auto/autoflag.h +++ b/src/object/auto/autoflag.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/auto/autohouston.cpp b/src/object/auto/autohouston.cpp index 2853be89..a9b14fbb 100644 --- a/src/object/auto/autohouston.cpp +++ b/src/object/auto/autohouston.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/auto/autohouston.h b/src/object/auto/autohouston.h index ff55c7db..b6cd30c3 100644 --- a/src/object/auto/autohouston.h +++ b/src/object/auto/autohouston.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/auto/autojostle.cpp b/src/object/auto/autojostle.cpp index 957896df..60bda1cf 100644 --- a/src/object/auto/autojostle.cpp +++ b/src/object/auto/autojostle.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/auto/autojostle.h b/src/object/auto/autojostle.h index 524b1c10..453274f1 100644 --- a/src/object/auto/autojostle.h +++ b/src/object/auto/autojostle.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/auto/autokid.cpp b/src/object/auto/autokid.cpp index e8a404a3..9e44779b 100644 --- a/src/object/auto/autokid.cpp +++ b/src/object/auto/autokid.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/auto/autokid.h b/src/object/auto/autokid.h index 5a1c8ae3..adc455b5 100644 --- a/src/object/auto/autokid.h +++ b/src/object/auto/autokid.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/auto/autolabo.cpp b/src/object/auto/autolabo.cpp index 1cbcbc24..39fb5245 100644 --- a/src/object/auto/autolabo.cpp +++ b/src/object/auto/autolabo.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/auto/autolabo.h b/src/object/auto/autolabo.h index 368e6509..d9a36d85 100644 --- a/src/object/auto/autolabo.h +++ b/src/object/auto/autolabo.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/auto/automush.cpp b/src/object/auto/automush.cpp index 679e0f73..acff24fc 100644 --- a/src/object/auto/automush.cpp +++ b/src/object/auto/automush.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/auto/automush.h b/src/object/auto/automush.h index ad2e7b94..9ea9eb53 100644 --- a/src/object/auto/automush.h +++ b/src/object/auto/automush.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/auto/autonest.cpp b/src/object/auto/autonest.cpp index 067bd9c1..0b680f87 100644 --- a/src/object/auto/autonest.cpp +++ b/src/object/auto/autonest.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/auto/autonest.h b/src/object/auto/autonest.h index 3f70a1f2..53761c15 100644 --- a/src/object/auto/autonest.h +++ b/src/object/auto/autonest.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/auto/autonuclearplant.cpp b/src/object/auto/autonuclearplant.cpp index 947ac05b..a341c45f 100644 --- a/src/object/auto/autonuclearplant.cpp +++ b/src/object/auto/autonuclearplant.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/auto/autonuclearplant.h b/src/object/auto/autonuclearplant.h index 707acfb6..f15891a4 100644 --- a/src/object/auto/autonuclearplant.h +++ b/src/object/auto/autonuclearplant.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/auto/autoportico.cpp b/src/object/auto/autoportico.cpp index 042e7c31..cfa078d1 100644 --- a/src/object/auto/autoportico.cpp +++ b/src/object/auto/autoportico.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/auto/autoportico.h b/src/object/auto/autoportico.h index ec6d1c00..bebfcc1f 100644 --- a/src/object/auto/autoportico.h +++ b/src/object/auto/autoportico.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/auto/autopowercaptor.cpp b/src/object/auto/autopowercaptor.cpp index fc19282e..fea4586b 100644 --- a/src/object/auto/autopowercaptor.cpp +++ b/src/object/auto/autopowercaptor.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/auto/autopowercaptor.h b/src/object/auto/autopowercaptor.h index 685f4b5b..b79827ef 100644 --- a/src/object/auto/autopowercaptor.h +++ b/src/object/auto/autopowercaptor.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/auto/autopowerplant.cpp b/src/object/auto/autopowerplant.cpp index 2729c4fe..37b2d7d5 100644 --- a/src/object/auto/autopowerplant.cpp +++ b/src/object/auto/autopowerplant.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/auto/autopowerplant.h b/src/object/auto/autopowerplant.h index 83d52bbf..474ef643 100644 --- a/src/object/auto/autopowerplant.h +++ b/src/object/auto/autopowerplant.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/auto/autopowerstation.cpp b/src/object/auto/autopowerstation.cpp index 17479906..5b90b6fa 100644 --- a/src/object/auto/autopowerstation.cpp +++ b/src/object/auto/autopowerstation.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/auto/autopowerstation.h b/src/object/auto/autopowerstation.h index 3c19addc..2bdab493 100644 --- a/src/object/auto/autopowerstation.h +++ b/src/object/auto/autopowerstation.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/auto/autoradar.cpp b/src/object/auto/autoradar.cpp index d587620c..93b5ff8c 100644 --- a/src/object/auto/autoradar.cpp +++ b/src/object/auto/autoradar.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/auto/autoradar.h b/src/object/auto/autoradar.h index 9917e26f..fc2c5163 100644 --- a/src/object/auto/autoradar.h +++ b/src/object/auto/autoradar.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/auto/autorepair.cpp b/src/object/auto/autorepair.cpp index 80d33e79..d580ce8b 100644 --- a/src/object/auto/autorepair.cpp +++ b/src/object/auto/autorepair.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/auto/autorepair.h b/src/object/auto/autorepair.h index f8216297..53ddfdd1 100644 --- a/src/object/auto/autorepair.h +++ b/src/object/auto/autorepair.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/auto/autoresearch.cpp b/src/object/auto/autoresearch.cpp index 32380de4..ccc24c85 100644 --- a/src/object/auto/autoresearch.cpp +++ b/src/object/auto/autoresearch.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/auto/autoresearch.h b/src/object/auto/autoresearch.h index 359b9fe0..f5f00f3d 100644 --- a/src/object/auto/autoresearch.h +++ b/src/object/auto/autoresearch.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/auto/autoroot.cpp b/src/object/auto/autoroot.cpp index 8b69b350..1a76ee5d 100644 --- a/src/object/auto/autoroot.cpp +++ b/src/object/auto/autoroot.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/auto/autoroot.h b/src/object/auto/autoroot.h index 36088ec2..de7a0967 100644 --- a/src/object/auto/autoroot.h +++ b/src/object/auto/autoroot.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/auto/autotower.cpp b/src/object/auto/autotower.cpp index ad436af7..053d29df 100644 --- a/src/object/auto/autotower.cpp +++ b/src/object/auto/autotower.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/auto/autotower.h b/src/object/auto/autotower.h index ef174894..f1020cca 100644 --- a/src/object/auto/autotower.h +++ b/src/object/auto/autotower.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/auto/autovault.cpp b/src/object/auto/autovault.cpp index 7e792b22..d744a4c4 100644 --- a/src/object/auto/autovault.cpp +++ b/src/object/auto/autovault.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/auto/autovault.h b/src/object/auto/autovault.h index 069d501a..284d5c7b 100644 --- a/src/object/auto/autovault.h +++ b/src/object/auto/autovault.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/crash_sphere.h b/src/object/crash_sphere.h index 3cc30dbe..4c0ddf97 100644 --- a/src/object/crash_sphere.h +++ b/src/object/crash_sphere.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/drive_type.cpp b/src/object/drive_type.cpp index fafbddad..7083f35e 100644 --- a/src/object/drive_type.cpp +++ b/src/object/drive_type.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/drive_type.h b/src/object/drive_type.h index 50265bf0..9b8ca80a 100644 --- a/src/object/drive_type.h +++ b/src/object/drive_type.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/implementation/power_container_impl.cpp b/src/object/implementation/power_container_impl.cpp index ca591a94..f747ce7d 100644 --- a/src/object/implementation/power_container_impl.cpp +++ b/src/object/implementation/power_container_impl.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/implementation/power_container_impl.h b/src/object/implementation/power_container_impl.h index 55ab6c62..874aed22 100644 --- a/src/object/implementation/power_container_impl.h +++ b/src/object/implementation/power_container_impl.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/implementation/program_storage_impl.cpp b/src/object/implementation/program_storage_impl.cpp index dc7e71d2..8d59a86f 100644 --- a/src/object/implementation/program_storage_impl.cpp +++ b/src/object/implementation/program_storage_impl.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/implementation/program_storage_impl.h b/src/object/implementation/program_storage_impl.h index f5e5a281..fc1ee97d 100644 --- a/src/object/implementation/program_storage_impl.h +++ b/src/object/implementation/program_storage_impl.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/implementation/programmable_impl.cpp b/src/object/implementation/programmable_impl.cpp index f02ba628..5e370bdb 100644 --- a/src/object/implementation/programmable_impl.cpp +++ b/src/object/implementation/programmable_impl.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/implementation/programmable_impl.h b/src/object/implementation/programmable_impl.h index 145347c3..a0b78096 100644 --- a/src/object/implementation/programmable_impl.h +++ b/src/object/implementation/programmable_impl.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/implementation/task_executor_impl.cpp b/src/object/implementation/task_executor_impl.cpp index bf66019d..827eee96 100644 --- a/src/object/implementation/task_executor_impl.cpp +++ b/src/object/implementation/task_executor_impl.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/implementation/task_executor_impl.h b/src/object/implementation/task_executor_impl.h index 233672e2..6a9e5988 100644 --- a/src/object/implementation/task_executor_impl.h +++ b/src/object/implementation/task_executor_impl.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/interface/carrier_object.h b/src/object/interface/carrier_object.h index b7e76c7e..b534fd4a 100644 --- a/src/object/interface/carrier_object.h +++ b/src/object/interface/carrier_object.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/interface/controllable_object.h b/src/object/interface/controllable_object.h index 9d1aabde..05d354fb 100644 --- a/src/object/interface/controllable_object.h +++ b/src/object/interface/controllable_object.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/interface/damageable_object.h b/src/object/interface/damageable_object.h index a8f3afb5..8b545c2b 100644 --- a/src/object/interface/damageable_object.h +++ b/src/object/interface/damageable_object.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/interface/destroyable_object.h b/src/object/interface/destroyable_object.h index 48f4736b..a81411a2 100644 --- a/src/object/interface/destroyable_object.h +++ b/src/object/interface/destroyable_object.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/interface/flying_object.h b/src/object/interface/flying_object.h index 9169ed74..4949e446 100644 --- a/src/object/interface/flying_object.h +++ b/src/object/interface/flying_object.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/interface/fragile_object.h b/src/object/interface/fragile_object.h index a2280121..1513040f 100644 --- a/src/object/interface/fragile_object.h +++ b/src/object/interface/fragile_object.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/interface/interactive_object.h b/src/object/interface/interactive_object.h index e371c5ee..cc2aaefd 100644 --- a/src/object/interface/interactive_object.h +++ b/src/object/interface/interactive_object.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/interface/jet_flying_object.h b/src/object/interface/jet_flying_object.h index b066a5a6..a0ee94cf 100644 --- a/src/object/interface/jet_flying_object.h +++ b/src/object/interface/jet_flying_object.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/interface/jostleable_object.h b/src/object/interface/jostleable_object.h index 008ed10e..e0f7aeb4 100644 --- a/src/object/interface/jostleable_object.h +++ b/src/object/interface/jostleable_object.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/interface/movable_object.h b/src/object/interface/movable_object.h index d79af1ef..41455842 100644 --- a/src/object/interface/movable_object.h +++ b/src/object/interface/movable_object.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/interface/power_container_object.h b/src/object/interface/power_container_object.h index 36b8b2a6..a54d7921 100644 --- a/src/object/interface/power_container_object.h +++ b/src/object/interface/power_container_object.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/interface/powered_object.h b/src/object/interface/powered_object.h index fcf31da6..54b6dd1e 100644 --- a/src/object/interface/powered_object.h +++ b/src/object/interface/powered_object.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/interface/program_storage_object.h b/src/object/interface/program_storage_object.h index f4f570ae..a1a275d5 100644 --- a/src/object/interface/program_storage_object.h +++ b/src/object/interface/program_storage_object.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/interface/programmable_object.h b/src/object/interface/programmable_object.h index 0c519d8b..05f1a92c 100644 --- a/src/object/interface/programmable_object.h +++ b/src/object/interface/programmable_object.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/interface/ranged_object.h b/src/object/interface/ranged_object.h index 7da2e617..2b218114 100644 --- a/src/object/interface/ranged_object.h +++ b/src/object/interface/ranged_object.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/interface/shielded_auto_regen_object.h b/src/object/interface/shielded_auto_regen_object.h index 92a011f3..0b598f9f 100644 --- a/src/object/interface/shielded_auto_regen_object.h +++ b/src/object/interface/shielded_auto_regen_object.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/interface/shielded_object.h b/src/object/interface/shielded_object.h index 4629d713..92bd3baf 100644 --- a/src/object/interface/shielded_object.h +++ b/src/object/interface/shielded_object.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/interface/task_executor_object.h b/src/object/interface/task_executor_object.h index bc4efc97..b724d409 100644 --- a/src/object/interface/task_executor_object.h +++ b/src/object/interface/task_executor_object.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/interface/trace_drawing_object.cpp b/src/object/interface/trace_drawing_object.cpp index 0baa15ff..057c2840 100644 --- a/src/object/interface/trace_drawing_object.cpp +++ b/src/object/interface/trace_drawing_object.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/interface/trace_drawing_object.h b/src/object/interface/trace_drawing_object.h index 667e8da4..56169cb9 100644 --- a/src/object/interface/trace_drawing_object.h +++ b/src/object/interface/trace_drawing_object.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/interface/transportable_object.h b/src/object/interface/transportable_object.h index 1d5aa5b0..2d0f90f3 100644 --- a/src/object/interface/transportable_object.h +++ b/src/object/interface/transportable_object.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/mission_type.h b/src/object/mission_type.h index eb9b3879..91670a98 100644 --- a/src/object/mission_type.h +++ b/src/object/mission_type.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/motion/motion.cpp b/src/object/motion/motion.cpp index 9c8de0e0..b3bd03d5 100644 --- a/src/object/motion/motion.cpp +++ b/src/object/motion/motion.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/motion/motion.h b/src/object/motion/motion.h index 51514f28..614bf8c7 100644 --- a/src/object/motion/motion.h +++ b/src/object/motion/motion.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/motion/motionant.cpp b/src/object/motion/motionant.cpp index 34699f6f..bee3114a 100644 --- a/src/object/motion/motionant.cpp +++ b/src/object/motion/motionant.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/motion/motionant.h b/src/object/motion/motionant.h index ac8c8e1b..5d5d1d6f 100644 --- a/src/object/motion/motionant.h +++ b/src/object/motion/motionant.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/motion/motionbee.cpp b/src/object/motion/motionbee.cpp index 02f092f1..1b45eaf5 100644 --- a/src/object/motion/motionbee.cpp +++ b/src/object/motion/motionbee.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/motion/motionbee.h b/src/object/motion/motionbee.h index 789b6b96..ce4ad243 100644 --- a/src/object/motion/motionbee.h +++ b/src/object/motion/motionbee.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/motion/motionhuman.cpp b/src/object/motion/motionhuman.cpp index 99469a90..9d9c1b42 100644 --- a/src/object/motion/motionhuman.cpp +++ b/src/object/motion/motionhuman.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/motion/motionhuman.h b/src/object/motion/motionhuman.h index 9449ed2b..d3fc67d4 100644 --- a/src/object/motion/motionhuman.h +++ b/src/object/motion/motionhuman.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/motion/motionlevelcontroller.cpp b/src/object/motion/motionlevelcontroller.cpp index ace9262f..f2cad48f 100644 --- a/src/object/motion/motionlevelcontroller.cpp +++ b/src/object/motion/motionlevelcontroller.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/motion/motionlevelcontroller.h b/src/object/motion/motionlevelcontroller.h index b7348f26..4e6bca9f 100644 --- a/src/object/motion/motionlevelcontroller.h +++ b/src/object/motion/motionlevelcontroller.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/motion/motionqueen.cpp b/src/object/motion/motionqueen.cpp index b51c52f7..27b7ce29 100644 --- a/src/object/motion/motionqueen.cpp +++ b/src/object/motion/motionqueen.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/motion/motionqueen.h b/src/object/motion/motionqueen.h index cece6ef2..fe2fe8c3 100644 --- a/src/object/motion/motionqueen.h +++ b/src/object/motion/motionqueen.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/motion/motionspider.cpp b/src/object/motion/motionspider.cpp index 23f2ffea..4aa046a9 100644 --- a/src/object/motion/motionspider.cpp +++ b/src/object/motion/motionspider.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/motion/motionspider.h b/src/object/motion/motionspider.h index cd00c877..fa1281a6 100644 --- a/src/object/motion/motionspider.h +++ b/src/object/motion/motionspider.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/motion/motiontoto.cpp b/src/object/motion/motiontoto.cpp index c0a2296a..ee7a685f 100644 --- a/src/object/motion/motiontoto.cpp +++ b/src/object/motion/motiontoto.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/motion/motiontoto.h b/src/object/motion/motiontoto.h index fe907308..8857d86f 100644 --- a/src/object/motion/motiontoto.h +++ b/src/object/motion/motiontoto.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/motion/motionvehicle.cpp b/src/object/motion/motionvehicle.cpp index 14d46dcd..fa631fde 100644 --- a/src/object/motion/motionvehicle.cpp +++ b/src/object/motion/motionvehicle.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/motion/motionvehicle.h b/src/object/motion/motionvehicle.h index d266ee03..79335706 100644 --- a/src/object/motion/motionvehicle.h +++ b/src/object/motion/motionvehicle.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/motion/motionworm.cpp b/src/object/motion/motionworm.cpp index 5a407867..ad40b98b 100644 --- a/src/object/motion/motionworm.cpp +++ b/src/object/motion/motionworm.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/motion/motionworm.h b/src/object/motion/motionworm.h index b4eb3212..766f706e 100644 --- a/src/object/motion/motionworm.h +++ b/src/object/motion/motionworm.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/object.cpp b/src/object/object.cpp index 6685dd3d..d514d8c3 100644 --- a/src/object/object.cpp +++ b/src/object/object.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/object.h b/src/object/object.h index 4fcfe686..1de9da17 100644 --- a/src/object/object.h +++ b/src/object/object.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/object_create_exception.h b/src/object/object_create_exception.h index 97b989c4..215039bc 100644 --- a/src/object/object_create_exception.h +++ b/src/object/object_create_exception.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/object_create_params.h b/src/object/object_create_params.h index fd73f1f4..89d177e7 100644 --- a/src/object/object_create_params.h +++ b/src/object/object_create_params.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/object_factory.cpp b/src/object/object_factory.cpp index 0b16e171..25b0e9ed 100644 --- a/src/object/object_factory.cpp +++ b/src/object/object_factory.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/object_factory.h b/src/object/object_factory.h index 76d41066..cb260412 100644 --- a/src/object/object_factory.h +++ b/src/object/object_factory.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/object_interface_type.h b/src/object/object_interface_type.h index a978049e..1216ab0c 100644 --- a/src/object/object_interface_type.h +++ b/src/object/object_interface_type.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/object_manager.cpp b/src/object/object_manager.cpp index e8323a5e..c8d8cef7 100644 --- a/src/object/object_manager.cpp +++ b/src/object/object_manager.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/object_manager.h b/src/object/object_manager.h index 73ae0015..f5f3a16c 100644 --- a/src/object/object_manager.h +++ b/src/object/object_manager.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/object_type.h b/src/object/object_type.h index 88c9587c..d8c3c8de 100644 --- a/src/object/object_type.h +++ b/src/object/object_type.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/old_object.cpp b/src/object/old_object.cpp index beaa7c3d..0a75854c 100644 --- a/src/object/old_object.cpp +++ b/src/object/old_object.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/old_object.h b/src/object/old_object.h index 7e2a195e..f2873757 100644 --- a/src/object/old_object.h +++ b/src/object/old_object.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/old_object_interface.cpp b/src/object/old_object_interface.cpp index 2082309a..49ebdcfa 100644 --- a/src/object/old_object_interface.cpp +++ b/src/object/old_object_interface.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/old_object_interface.h b/src/object/old_object_interface.h index 57a5278d..a1a4bb97 100644 --- a/src/object/old_object_interface.h +++ b/src/object/old_object_interface.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/subclass/base_alien.cpp b/src/object/subclass/base_alien.cpp index aca2a7c9..7c090afc 100644 --- a/src/object/subclass/base_alien.cpp +++ b/src/object/subclass/base_alien.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/subclass/base_alien.h b/src/object/subclass/base_alien.h index 4f550b38..c7e1205c 100644 --- a/src/object/subclass/base_alien.h +++ b/src/object/subclass/base_alien.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/subclass/base_building.cpp b/src/object/subclass/base_building.cpp index b45cf91a..38faea1b 100644 --- a/src/object/subclass/base_building.cpp +++ b/src/object/subclass/base_building.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/subclass/base_building.h b/src/object/subclass/base_building.h index e288aec3..f4ead94c 100644 --- a/src/object/subclass/base_building.h +++ b/src/object/subclass/base_building.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/subclass/base_robot.cpp b/src/object/subclass/base_robot.cpp index 71797b86..ac67a185 100644 --- a/src/object/subclass/base_robot.cpp +++ b/src/object/subclass/base_robot.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/subclass/base_robot.h b/src/object/subclass/base_robot.h index d11bdff8..073d36d1 100644 --- a/src/object/subclass/base_robot.h +++ b/src/object/subclass/base_robot.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/subclass/base_vehicle.cpp b/src/object/subclass/base_vehicle.cpp index 02a457f3..07601ac6 100644 --- a/src/object/subclass/base_vehicle.cpp +++ b/src/object/subclass/base_vehicle.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/subclass/base_vehicle.h b/src/object/subclass/base_vehicle.h index 2688afb2..b35597d7 100644 --- a/src/object/subclass/base_vehicle.h +++ b/src/object/subclass/base_vehicle.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/subclass/exchange_post.cpp b/src/object/subclass/exchange_post.cpp index 1709f30e..6059bc57 100644 --- a/src/object/subclass/exchange_post.cpp +++ b/src/object/subclass/exchange_post.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/subclass/exchange_post.h b/src/object/subclass/exchange_post.h index 3c7bbb0f..48113cc7 100644 --- a/src/object/subclass/exchange_post.h +++ b/src/object/subclass/exchange_post.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/subclass/shielder.cpp b/src/object/subclass/shielder.cpp index ecf6cae3..7cb79af0 100644 --- a/src/object/subclass/shielder.cpp +++ b/src/object/subclass/shielder.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/subclass/shielder.h b/src/object/subclass/shielder.h index d0477602..4179e43d 100644 --- a/src/object/subclass/shielder.h +++ b/src/object/subclass/shielder.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/subclass/static_object.cpp b/src/object/subclass/static_object.cpp index 544779d7..5b96a5aa 100644 --- a/src/object/subclass/static_object.cpp +++ b/src/object/subclass/static_object.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/subclass/static_object.h b/src/object/subclass/static_object.h index f34bc486..c894ef2e 100644 --- a/src/object/subclass/static_object.h +++ b/src/object/subclass/static_object.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/task/task.cpp b/src/object/task/task.cpp index a3335e1c..72f507a5 100644 --- a/src/object/task/task.cpp +++ b/src/object/task/task.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/task/task.h b/src/object/task/task.h index 6ed2e3a1..bc7a6ef6 100644 --- a/src/object/task/task.h +++ b/src/object/task/task.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/task/taskadvance.cpp b/src/object/task/taskadvance.cpp index 3c1c6a7f..98483a92 100644 --- a/src/object/task/taskadvance.cpp +++ b/src/object/task/taskadvance.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/task/taskadvance.h b/src/object/task/taskadvance.h index 005780ff..689f4b88 100644 --- a/src/object/task/taskadvance.h +++ b/src/object/task/taskadvance.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/task/taskbuild.cpp b/src/object/task/taskbuild.cpp index 3d39b20d..76df10d2 100644 --- a/src/object/task/taskbuild.cpp +++ b/src/object/task/taskbuild.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/task/taskbuild.h b/src/object/task/taskbuild.h index 94f3d617..977da0f2 100644 --- a/src/object/task/taskbuild.h +++ b/src/object/task/taskbuild.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/task/taskdeletemark.cpp b/src/object/task/taskdeletemark.cpp index d9c5cd82..2e87f829 100644 --- a/src/object/task/taskdeletemark.cpp +++ b/src/object/task/taskdeletemark.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/task/taskdeletemark.h b/src/object/task/taskdeletemark.h index 55aaa791..de2967b4 100644 --- a/src/object/task/taskdeletemark.h +++ b/src/object/task/taskdeletemark.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/task/taskfire.cpp b/src/object/task/taskfire.cpp index 2cc24195..590ce94e 100644 --- a/src/object/task/taskfire.cpp +++ b/src/object/task/taskfire.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/task/taskfire.h b/src/object/task/taskfire.h index d6b783ab..a1a5550c 100644 --- a/src/object/task/taskfire.h +++ b/src/object/task/taskfire.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/task/taskfireant.cpp b/src/object/task/taskfireant.cpp index 66f9f566..35ddac79 100644 --- a/src/object/task/taskfireant.cpp +++ b/src/object/task/taskfireant.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/task/taskfireant.h b/src/object/task/taskfireant.h index e8160612..949a8935 100644 --- a/src/object/task/taskfireant.h +++ b/src/object/task/taskfireant.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/task/taskflag.cpp b/src/object/task/taskflag.cpp index 2b0cc37a..8a4d58b6 100644 --- a/src/object/task/taskflag.cpp +++ b/src/object/task/taskflag.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/task/taskflag.h b/src/object/task/taskflag.h index ffe89b50..00658ce5 100644 --- a/src/object/task/taskflag.h +++ b/src/object/task/taskflag.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/task/taskgoto.cpp b/src/object/task/taskgoto.cpp index 6584465e..e1b39540 100644 --- a/src/object/task/taskgoto.cpp +++ b/src/object/task/taskgoto.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/task/taskgoto.h b/src/object/task/taskgoto.h index 908cf8ff..296fec92 100644 --- a/src/object/task/taskgoto.h +++ b/src/object/task/taskgoto.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/task/taskgungoal.cpp b/src/object/task/taskgungoal.cpp index 3b615576..72595509 100644 --- a/src/object/task/taskgungoal.cpp +++ b/src/object/task/taskgungoal.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/task/taskgungoal.h b/src/object/task/taskgungoal.h index c873ff2c..3a9d65a7 100644 --- a/src/object/task/taskgungoal.h +++ b/src/object/task/taskgungoal.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/task/taskinfo.cpp b/src/object/task/taskinfo.cpp index 18019dc3..9ce99298 100644 --- a/src/object/task/taskinfo.cpp +++ b/src/object/task/taskinfo.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/task/taskinfo.h b/src/object/task/taskinfo.h index 29fa9d74..3a66faf9 100644 --- a/src/object/task/taskinfo.h +++ b/src/object/task/taskinfo.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/task/taskmanip.cpp b/src/object/task/taskmanip.cpp index 63ce26e9..0ac1ef69 100644 --- a/src/object/task/taskmanip.cpp +++ b/src/object/task/taskmanip.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/task/taskmanip.h b/src/object/task/taskmanip.h index d1a345a8..946a3ec6 100644 --- a/src/object/task/taskmanip.h +++ b/src/object/task/taskmanip.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/task/taskpen.cpp b/src/object/task/taskpen.cpp index 8daba8fe..93defbf1 100644 --- a/src/object/task/taskpen.cpp +++ b/src/object/task/taskpen.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/task/taskpen.h b/src/object/task/taskpen.h index 1ec38554..91ba541d 100644 --- a/src/object/task/taskpen.h +++ b/src/object/task/taskpen.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/task/taskrecover.cpp b/src/object/task/taskrecover.cpp index ab5bc52d..872632ed 100644 --- a/src/object/task/taskrecover.cpp +++ b/src/object/task/taskrecover.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/task/taskrecover.h b/src/object/task/taskrecover.h index 2e4fe8d3..001f14e9 100644 --- a/src/object/task/taskrecover.h +++ b/src/object/task/taskrecover.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/task/tasksearch.cpp b/src/object/task/tasksearch.cpp index 84413f5a..e8a5596e 100644 --- a/src/object/task/tasksearch.cpp +++ b/src/object/task/tasksearch.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/task/tasksearch.h b/src/object/task/tasksearch.h index a019161d..d4c9c4d9 100644 --- a/src/object/task/tasksearch.h +++ b/src/object/task/tasksearch.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/task/taskshield.cpp b/src/object/task/taskshield.cpp index 09e1da40..54089418 100644 --- a/src/object/task/taskshield.cpp +++ b/src/object/task/taskshield.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/task/taskshield.h b/src/object/task/taskshield.h index 32656481..97533bfb 100644 --- a/src/object/task/taskshield.h +++ b/src/object/task/taskshield.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/task/taskspiderexplo.cpp b/src/object/task/taskspiderexplo.cpp index 3bf58a37..03abddb6 100644 --- a/src/object/task/taskspiderexplo.cpp +++ b/src/object/task/taskspiderexplo.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/task/taskspiderexplo.h b/src/object/task/taskspiderexplo.h index 30459a31..ebcf3a25 100644 --- a/src/object/task/taskspiderexplo.h +++ b/src/object/task/taskspiderexplo.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/task/tasktake.cpp b/src/object/task/tasktake.cpp index e6632b23..c67a7e56 100644 --- a/src/object/task/tasktake.cpp +++ b/src/object/task/tasktake.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/task/tasktake.h b/src/object/task/tasktake.h index 0bc73d26..53813c56 100644 --- a/src/object/task/tasktake.h +++ b/src/object/task/tasktake.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/task/taskterraform.cpp b/src/object/task/taskterraform.cpp index f46c68df..6718bb7c 100644 --- a/src/object/task/taskterraform.cpp +++ b/src/object/task/taskterraform.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/task/taskterraform.h b/src/object/task/taskterraform.h index 40189570..25b0d41b 100644 --- a/src/object/task/taskterraform.h +++ b/src/object/task/taskterraform.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/task/taskturn.cpp b/src/object/task/taskturn.cpp index 69799b86..1931a974 100644 --- a/src/object/task/taskturn.cpp +++ b/src/object/task/taskturn.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/task/taskturn.h b/src/object/task/taskturn.h index 4232950e..0ae4bc0a 100644 --- a/src/object/task/taskturn.h +++ b/src/object/task/taskturn.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/task/taskwait.cpp b/src/object/task/taskwait.cpp index f3e0104e..7186316c 100644 --- a/src/object/task/taskwait.cpp +++ b/src/object/task/taskwait.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/task/taskwait.h b/src/object/task/taskwait.h index 3f14f4f5..d32d925f 100644 --- a/src/object/task/taskwait.h +++ b/src/object/task/taskwait.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/tool_type.cpp b/src/object/tool_type.cpp index 33bc3e0b..3a06e455 100644 --- a/src/object/tool_type.cpp +++ b/src/object/tool_type.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/object/tool_type.h b/src/object/tool_type.h index a480679c..627f8307 100644 --- a/src/object/tool_type.h +++ b/src/object/tool_type.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/physics/physics.cpp b/src/physics/physics.cpp index 1e801d11..b97742c5 100644 --- a/src/physics/physics.cpp +++ b/src/physics/physics.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/physics/physics.h b/src/physics/physics.h index 8536edc0..36f10d96 100644 --- a/src/physics/physics.h +++ b/src/physics/physics.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/script/cbottoken.cpp b/src/script/cbottoken.cpp index 4dd5c8ec..06b6ea14 100644 --- a/src/script/cbottoken.cpp +++ b/src/script/cbottoken.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/script/cbottoken.h b/src/script/cbottoken.h index 62727801..01055fef 100644 --- a/src/script/cbottoken.h +++ b/src/script/cbottoken.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/script/script.cpp b/src/script/script.cpp index f9a70e3b..f6424705 100644 --- a/src/script/script.cpp +++ b/src/script/script.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/script/script.h b/src/script/script.h index deed0c6b..f0f473fb 100644 --- a/src/script/script.h +++ b/src/script/script.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/script/scriptfunc.cpp b/src/script/scriptfunc.cpp index 8a774907..9a65554c 100644 --- a/src/script/scriptfunc.cpp +++ b/src/script/scriptfunc.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/script/scriptfunc.h b/src/script/scriptfunc.h index 5778a9f1..9121ef7c 100644 --- a/src/script/scriptfunc.h +++ b/src/script/scriptfunc.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/sound/oalsound/alsound.cpp b/src/sound/oalsound/alsound.cpp index f051e9e0..e4d457d3 100644 --- a/src/sound/oalsound/alsound.cpp +++ b/src/sound/oalsound/alsound.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/sound/oalsound/alsound.h b/src/sound/oalsound/alsound.h index 03d5bd49..23c62379 100644 --- a/src/sound/oalsound/alsound.h +++ b/src/sound/oalsound/alsound.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/sound/oalsound/buffer.cpp b/src/sound/oalsound/buffer.cpp index 47fe5c6d..018d356d 100644 --- a/src/sound/oalsound/buffer.cpp +++ b/src/sound/oalsound/buffer.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/sound/oalsound/buffer.h b/src/sound/oalsound/buffer.h index d36fc0f2..be9d4c5e 100644 --- a/src/sound/oalsound/buffer.h +++ b/src/sound/oalsound/buffer.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/sound/oalsound/channel.cpp b/src/sound/oalsound/channel.cpp index 21fd6438..e8d50fe2 100644 --- a/src/sound/oalsound/channel.cpp +++ b/src/sound/oalsound/channel.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/sound/oalsound/channel.h b/src/sound/oalsound/channel.h index d7bcd5a7..de56686d 100644 --- a/src/sound/oalsound/channel.h +++ b/src/sound/oalsound/channel.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/sound/oalsound/check.cpp b/src/sound/oalsound/check.cpp index a5972aac..0d86fb95 100644 --- a/src/sound/oalsound/check.cpp +++ b/src/sound/oalsound/check.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/sound/oalsound/check.h b/src/sound/oalsound/check.h index f39f41c7..c22dbd17 100644 --- a/src/sound/oalsound/check.h +++ b/src/sound/oalsound/check.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/sound/sound.cpp b/src/sound/sound.cpp index e5b29291..b1cbc144 100644 --- a/src/sound/sound.cpp +++ b/src/sound/sound.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/sound/sound.h b/src/sound/sound.h index a2dce312..c03fcf39 100644 --- a/src/sound/sound.h +++ b/src/sound/sound.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/sound/sound_type.cpp b/src/sound/sound_type.cpp index 964782d2..22f629be 100644 --- a/src/sound/sound_type.cpp +++ b/src/sound/sound_type.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/sound/sound_type.h b/src/sound/sound_type.h index 6985622f..a07870b1 100644 --- a/src/sound/sound_type.h +++ b/src/sound/sound_type.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/tools/convert_model.cpp b/src/tools/convert_model.cpp index 26c1de84..97c95b6a 100644 --- a/src/tools/convert_model.cpp +++ b/src/tools/convert_model.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/controls/button.cpp b/src/ui/controls/button.cpp index ece43a8d..4c1d3d99 100644 --- a/src/ui/controls/button.cpp +++ b/src/ui/controls/button.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/controls/button.h b/src/ui/controls/button.h index defd7706..9abe3262 100644 --- a/src/ui/controls/button.h +++ b/src/ui/controls/button.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/controls/check.cpp b/src/ui/controls/check.cpp index b1b70b41..af9f58aa 100644 --- a/src/ui/controls/check.cpp +++ b/src/ui/controls/check.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/controls/check.h b/src/ui/controls/check.h index 752856ce..445a6782 100644 --- a/src/ui/controls/check.h +++ b/src/ui/controls/check.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/controls/color.cpp b/src/ui/controls/color.cpp index 2aec2a92..faecb435 100644 --- a/src/ui/controls/color.cpp +++ b/src/ui/controls/color.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/controls/color.h b/src/ui/controls/color.h index 9754502d..e694a7d5 100644 --- a/src/ui/controls/color.h +++ b/src/ui/controls/color.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/controls/control.cpp b/src/ui/controls/control.cpp index e0b8ccf9..2013b612 100644 --- a/src/ui/controls/control.cpp +++ b/src/ui/controls/control.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/controls/control.h b/src/ui/controls/control.h index b3fb3967..d3e6d5aa 100644 --- a/src/ui/controls/control.h +++ b/src/ui/controls/control.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/controls/edit.cpp b/src/ui/controls/edit.cpp index f5e02671..19327fd1 100644 --- a/src/ui/controls/edit.cpp +++ b/src/ui/controls/edit.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/controls/edit.h b/src/ui/controls/edit.h index 380fbf5e..1fe83b1d 100644 --- a/src/ui/controls/edit.h +++ b/src/ui/controls/edit.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/controls/editvalue.cpp b/src/ui/controls/editvalue.cpp index 277f18b0..330f9b32 100644 --- a/src/ui/controls/editvalue.cpp +++ b/src/ui/controls/editvalue.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/controls/editvalue.h b/src/ui/controls/editvalue.h index c3543e6f..2094f7c4 100644 --- a/src/ui/controls/editvalue.h +++ b/src/ui/controls/editvalue.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/controls/enumslider.cpp b/src/ui/controls/enumslider.cpp index e240c7d6..6c791d2b 100644 --- a/src/ui/controls/enumslider.cpp +++ b/src/ui/controls/enumslider.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/controls/enumslider.h b/src/ui/controls/enumslider.h index 9030e5be..70643bf6 100644 --- a/src/ui/controls/enumslider.h +++ b/src/ui/controls/enumslider.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/controls/gauge.cpp b/src/ui/controls/gauge.cpp index 7dafe8a8..13bf7a5a 100644 --- a/src/ui/controls/gauge.cpp +++ b/src/ui/controls/gauge.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/controls/gauge.h b/src/ui/controls/gauge.h index 2defa64b..c16452b8 100644 --- a/src/ui/controls/gauge.h +++ b/src/ui/controls/gauge.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/controls/group.cpp b/src/ui/controls/group.cpp index 0f7c8c90..8660ac0f 100644 --- a/src/ui/controls/group.cpp +++ b/src/ui/controls/group.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/controls/group.h b/src/ui/controls/group.h index 00bcb9d2..cc65ac87 100644 --- a/src/ui/controls/group.h +++ b/src/ui/controls/group.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/controls/image.cpp b/src/ui/controls/image.cpp index ea365b7f..5439f0d8 100644 --- a/src/ui/controls/image.cpp +++ b/src/ui/controls/image.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/controls/image.h b/src/ui/controls/image.h index b4e62a8a..499b5785 100644 --- a/src/ui/controls/image.h +++ b/src/ui/controls/image.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/controls/interface.cpp b/src/ui/controls/interface.cpp index ad8d6ef0..050ce193 100644 --- a/src/ui/controls/interface.cpp +++ b/src/ui/controls/interface.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/controls/interface.h b/src/ui/controls/interface.h index 264faf3b..54737532 100644 --- a/src/ui/controls/interface.h +++ b/src/ui/controls/interface.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/controls/key.cpp b/src/ui/controls/key.cpp index 3c8d6ab4..846ce6e8 100644 --- a/src/ui/controls/key.cpp +++ b/src/ui/controls/key.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/controls/key.h b/src/ui/controls/key.h index 9ad462d7..2f1702b4 100644 --- a/src/ui/controls/key.h +++ b/src/ui/controls/key.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/controls/label.cpp b/src/ui/controls/label.cpp index 2e1b9853..219e4d86 100644 --- a/src/ui/controls/label.cpp +++ b/src/ui/controls/label.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/controls/label.h b/src/ui/controls/label.h index b4ede99f..97a71e91 100644 --- a/src/ui/controls/label.h +++ b/src/ui/controls/label.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/controls/list.cpp b/src/ui/controls/list.cpp index 88d36d94..4dd54045 100644 --- a/src/ui/controls/list.cpp +++ b/src/ui/controls/list.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/controls/list.h b/src/ui/controls/list.h index bfebf430..02faa43b 100644 --- a/src/ui/controls/list.h +++ b/src/ui/controls/list.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/controls/map.cpp b/src/ui/controls/map.cpp index b22453c5..03cee9a1 100644 --- a/src/ui/controls/map.cpp +++ b/src/ui/controls/map.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/controls/map.h b/src/ui/controls/map.h index 4b8218a7..75bf4c01 100644 --- a/src/ui/controls/map.h +++ b/src/ui/controls/map.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/controls/scroll.cpp b/src/ui/controls/scroll.cpp index e47e561f..a9217686 100644 --- a/src/ui/controls/scroll.cpp +++ b/src/ui/controls/scroll.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/controls/scroll.h b/src/ui/controls/scroll.h index 10aabc53..77d4b809 100644 --- a/src/ui/controls/scroll.h +++ b/src/ui/controls/scroll.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/controls/shortcut.cpp b/src/ui/controls/shortcut.cpp index 036c10d6..d85132d1 100644 --- a/src/ui/controls/shortcut.cpp +++ b/src/ui/controls/shortcut.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/controls/shortcut.h b/src/ui/controls/shortcut.h index 650cc73a..9605d25b 100644 --- a/src/ui/controls/shortcut.h +++ b/src/ui/controls/shortcut.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/controls/slider.cpp b/src/ui/controls/slider.cpp index a4926005..32efeddc 100644 --- a/src/ui/controls/slider.cpp +++ b/src/ui/controls/slider.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/controls/slider.h b/src/ui/controls/slider.h index 5e12e9e2..3b9b3607 100644 --- a/src/ui/controls/slider.h +++ b/src/ui/controls/slider.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/controls/target.cpp b/src/ui/controls/target.cpp index dd18bd38..e7b899b6 100644 --- a/src/ui/controls/target.cpp +++ b/src/ui/controls/target.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/controls/target.h b/src/ui/controls/target.h index 53ffdfbf..807aae89 100644 --- a/src/ui/controls/target.h +++ b/src/ui/controls/target.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/controls/window.cpp b/src/ui/controls/window.cpp index 8182aaff..43086307 100644 --- a/src/ui/controls/window.cpp +++ b/src/ui/controls/window.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/controls/window.h b/src/ui/controls/window.h index 5e8bc2d9..0c6b6792 100644 --- a/src/ui/controls/window.h +++ b/src/ui/controls/window.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/debug_menu.cpp b/src/ui/debug_menu.cpp index a6eb6f63..28caab22 100644 --- a/src/ui/debug_menu.cpp +++ b/src/ui/debug_menu.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/debug_menu.h b/src/ui/debug_menu.h index 67e183fd..e3ee0933 100644 --- a/src/ui/debug_menu.h +++ b/src/ui/debug_menu.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/displayinfo.cpp b/src/ui/displayinfo.cpp index 76aee701..5d66b099 100644 --- a/src/ui/displayinfo.cpp +++ b/src/ui/displayinfo.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/displayinfo.h b/src/ui/displayinfo.h index eea3b255..1f8fc9c1 100644 --- a/src/ui/displayinfo.h +++ b/src/ui/displayinfo.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/displaytext.cpp b/src/ui/displaytext.cpp index f0d5bd92..c2c90cfb 100644 --- a/src/ui/displaytext.cpp +++ b/src/ui/displaytext.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/displaytext.h b/src/ui/displaytext.h index 3a5e5ef3..850e59ce 100644 --- a/src/ui/displaytext.h +++ b/src/ui/displaytext.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/maindialog.cpp b/src/ui/maindialog.cpp index f469e4b3..f78148f5 100644 --- a/src/ui/maindialog.cpp +++ b/src/ui/maindialog.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/maindialog.h b/src/ui/maindialog.h index 892a9351..c17be255 100644 --- a/src/ui/maindialog.h +++ b/src/ui/maindialog.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/mainmap.cpp b/src/ui/mainmap.cpp index a8c76bf9..47214b8c 100644 --- a/src/ui/mainmap.cpp +++ b/src/ui/mainmap.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/mainmap.h b/src/ui/mainmap.h index ef4d7ee6..26d068a9 100644 --- a/src/ui/mainmap.h +++ b/src/ui/mainmap.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/mainshort.cpp b/src/ui/mainshort.cpp index 23b58ee9..9017ccd3 100644 --- a/src/ui/mainshort.cpp +++ b/src/ui/mainshort.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/mainshort.h b/src/ui/mainshort.h index 4bfeb2e4..52754c23 100644 --- a/src/ui/mainshort.h +++ b/src/ui/mainshort.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/mainui.cpp b/src/ui/mainui.cpp index 503cc49f..ced014d1 100644 --- a/src/ui/mainui.cpp +++ b/src/ui/mainui.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/mainui.h b/src/ui/mainui.h index 4dbd8636..77074492 100644 --- a/src/ui/mainui.h +++ b/src/ui/mainui.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/object_interface.cpp b/src/ui/object_interface.cpp index c819540a..8819068d 100644 --- a/src/ui/object_interface.cpp +++ b/src/ui/object_interface.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/object_interface.h b/src/ui/object_interface.h index a35638a4..adf44c0d 100644 --- a/src/ui/object_interface.h +++ b/src/ui/object_interface.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/screen/screen.cpp b/src/ui/screen/screen.cpp index 202d5e17..181bf756 100644 --- a/src/ui/screen/screen.cpp +++ b/src/ui/screen/screen.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/screen/screen.h b/src/ui/screen/screen.h index d7869cfe..3f5e1c7b 100644 --- a/src/ui/screen/screen.h +++ b/src/ui/screen/screen.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/screen/screen_apperance.cpp b/src/ui/screen/screen_apperance.cpp index 7ca200f1..6ebd4289 100644 --- a/src/ui/screen/screen_apperance.cpp +++ b/src/ui/screen/screen_apperance.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/screen/screen_apperance.h b/src/ui/screen/screen_apperance.h index b5faf08d..5278d671 100644 --- a/src/ui/screen/screen_apperance.h +++ b/src/ui/screen/screen_apperance.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/screen/screen_io.cpp b/src/ui/screen/screen_io.cpp index 6cf1b4a9..c6e96351 100644 --- a/src/ui/screen/screen_io.cpp +++ b/src/ui/screen/screen_io.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/screen/screen_io.h b/src/ui/screen/screen_io.h index 79c44f1f..dd5f35ec 100644 --- a/src/ui/screen/screen_io.h +++ b/src/ui/screen/screen_io.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/screen/screen_io_read.cpp b/src/ui/screen/screen_io_read.cpp index 5ff2ebe3..c80132bd 100644 --- a/src/ui/screen/screen_io_read.cpp +++ b/src/ui/screen/screen_io_read.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/screen/screen_io_read.h b/src/ui/screen/screen_io_read.h index 341bbbae..2ab70854 100644 --- a/src/ui/screen/screen_io_read.h +++ b/src/ui/screen/screen_io_read.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/screen/screen_io_write.cpp b/src/ui/screen/screen_io_write.cpp index f65fab38..126c69a2 100644 --- a/src/ui/screen/screen_io_write.cpp +++ b/src/ui/screen/screen_io_write.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/screen/screen_io_write.h b/src/ui/screen/screen_io_write.h index 58416003..57483222 100644 --- a/src/ui/screen/screen_io_write.h +++ b/src/ui/screen/screen_io_write.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/screen/screen_level_list.cpp b/src/ui/screen/screen_level_list.cpp index 38110358..531fe6bf 100644 --- a/src/ui/screen/screen_level_list.cpp +++ b/src/ui/screen/screen_level_list.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/screen/screen_level_list.h b/src/ui/screen/screen_level_list.h index b27f88c1..6a95cb1b 100644 --- a/src/ui/screen/screen_level_list.h +++ b/src/ui/screen/screen_level_list.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/screen/screen_loading.cpp b/src/ui/screen/screen_loading.cpp index ca664f91..e10a1754 100644 --- a/src/ui/screen/screen_loading.cpp +++ b/src/ui/screen/screen_loading.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/screen/screen_loading.h b/src/ui/screen/screen_loading.h index 0cebe4e5..c4bedbc5 100644 --- a/src/ui/screen/screen_loading.h +++ b/src/ui/screen/screen_loading.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/screen/screen_main_menu.cpp b/src/ui/screen/screen_main_menu.cpp index ea8a29c2..76b50710 100644 --- a/src/ui/screen/screen_main_menu.cpp +++ b/src/ui/screen/screen_main_menu.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/screen/screen_main_menu.h b/src/ui/screen/screen_main_menu.h index d309d864..d797e71e 100644 --- a/src/ui/screen/screen_main_menu.h +++ b/src/ui/screen/screen_main_menu.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/screen/screen_player_select.cpp b/src/ui/screen/screen_player_select.cpp index e3a9c2f3..a9dc98fd 100644 --- a/src/ui/screen/screen_player_select.cpp +++ b/src/ui/screen/screen_player_select.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/screen/screen_player_select.h b/src/ui/screen/screen_player_select.h index 5cd804fd..5413c45e 100644 --- a/src/ui/screen/screen_player_select.h +++ b/src/ui/screen/screen_player_select.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/screen/screen_quit.cpp b/src/ui/screen/screen_quit.cpp index 0651a364..5bfa93b5 100644 --- a/src/ui/screen/screen_quit.cpp +++ b/src/ui/screen/screen_quit.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/screen/screen_quit.h b/src/ui/screen/screen_quit.h index 581fa860..f8c0d592 100644 --- a/src/ui/screen/screen_quit.h +++ b/src/ui/screen/screen_quit.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/screen/screen_setup.cpp b/src/ui/screen/screen_setup.cpp index 7f20eabe..823207af 100644 --- a/src/ui/screen/screen_setup.cpp +++ b/src/ui/screen/screen_setup.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/screen/screen_setup.h b/src/ui/screen/screen_setup.h index 77a19e50..6bbea815 100644 --- a/src/ui/screen/screen_setup.h +++ b/src/ui/screen/screen_setup.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/screen/screen_setup_controls.cpp b/src/ui/screen/screen_setup_controls.cpp index 7aa39ebe..8890da8f 100644 --- a/src/ui/screen/screen_setup_controls.cpp +++ b/src/ui/screen/screen_setup_controls.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/screen/screen_setup_controls.h b/src/ui/screen/screen_setup_controls.h index 258aa6d2..2ce2bd0a 100644 --- a/src/ui/screen/screen_setup_controls.h +++ b/src/ui/screen/screen_setup_controls.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/screen/screen_setup_display.cpp b/src/ui/screen/screen_setup_display.cpp index e238cf11..70150e85 100644 --- a/src/ui/screen/screen_setup_display.cpp +++ b/src/ui/screen/screen_setup_display.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/screen/screen_setup_display.h b/src/ui/screen/screen_setup_display.h index b5fd788d..690771b1 100644 --- a/src/ui/screen/screen_setup_display.h +++ b/src/ui/screen/screen_setup_display.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/screen/screen_setup_game.cpp b/src/ui/screen/screen_setup_game.cpp index b42a15b2..3c9f64f1 100644 --- a/src/ui/screen/screen_setup_game.cpp +++ b/src/ui/screen/screen_setup_game.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/screen/screen_setup_game.h b/src/ui/screen/screen_setup_game.h index 01fc196c..f549c490 100644 --- a/src/ui/screen/screen_setup_game.h +++ b/src/ui/screen/screen_setup_game.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/screen/screen_setup_graphics.cpp b/src/ui/screen/screen_setup_graphics.cpp index 45808135..bcbecdeb 100644 --- a/src/ui/screen/screen_setup_graphics.cpp +++ b/src/ui/screen/screen_setup_graphics.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/screen/screen_setup_graphics.h b/src/ui/screen/screen_setup_graphics.h index c78d5668..cbec45e9 100644 --- a/src/ui/screen/screen_setup_graphics.h +++ b/src/ui/screen/screen_setup_graphics.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/screen/screen_setup_sound.cpp b/src/ui/screen/screen_setup_sound.cpp index 1402cba9..28ad0b31 100644 --- a/src/ui/screen/screen_setup_sound.cpp +++ b/src/ui/screen/screen_setup_sound.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/screen/screen_setup_sound.h b/src/ui/screen/screen_setup_sound.h index 5322542e..d9d2148c 100644 --- a/src/ui/screen/screen_setup_sound.h +++ b/src/ui/screen/screen_setup_sound.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/screen/screen_welcome.cpp b/src/ui/screen/screen_welcome.cpp index 3a54f63d..16e48d89 100644 --- a/src/ui/screen/screen_welcome.cpp +++ b/src/ui/screen/screen_welcome.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/screen/screen_welcome.h b/src/ui/screen/screen_welcome.h index a34aad3b..cc70deaa 100644 --- a/src/ui/screen/screen_welcome.h +++ b/src/ui/screen/screen_welcome.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/studio.cpp b/src/ui/studio.cpp index b06b6f5a..16b841ec 100644 --- a/src/ui/studio.cpp +++ b/src/ui/studio.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/src/ui/studio.h b/src/ui/studio.h index 9efddc0f..be898d4e 100644 --- a/src/ui/studio.h +++ b/src/ui/studio.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/test/cbot/compile_graph.cpp b/test/cbot/compile_graph.cpp index e39dc1fd..0232ad2c 100644 --- a/test/cbot/compile_graph.cpp +++ b/test/cbot/compile_graph.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/test/cbot/console.cpp b/test/cbot/console.cpp index ddacab8f..dd6801ea 100644 --- a/test/cbot/console.cpp +++ b/test/cbot/console.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/test/unit/CBot/CBotToken_test.cpp b/test/unit/CBot/CBotToken_test.cpp index a36841a5..beab1c66 100644 --- a/test/unit/CBot/CBotToken_test.cpp +++ b/test/unit/CBot/CBotToken_test.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/test/unit/CBot/CBot_test.cpp b/test/unit/CBot/CBot_test.cpp index f94b72d3..a3ac4faf 100644 --- a/test/unit/CBot/CBot_test.cpp +++ b/test/unit/CBot/CBot_test.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/test/unit/app/app_test.cpp b/test/unit/app/app_test.cpp index 073dd89a..3ae5334d 100644 --- a/test/unit/app/app_test.cpp +++ b/test/unit/app/app_test.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/test/unit/common/config_file_test.cpp b/test/unit/common/config_file_test.cpp index 4a001373..05c26820 100644 --- a/test/unit/common/config_file_test.cpp +++ b/test/unit/common/config_file_test.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/test/unit/common/system/system_linux_test.cpp b/test/unit/common/system/system_linux_test.cpp index 9d51d884..a882f016 100644 --- a/test/unit/common/system/system_linux_test.cpp +++ b/test/unit/common/system/system_linux_test.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/test/unit/common/system/system_windows_test.cpp b/test/unit/common/system/system_windows_test.cpp index 1c2d8535..f36e878c 100644 --- a/test/unit/common/system/system_windows_test.cpp +++ b/test/unit/common/system/system_windows_test.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/test/unit/graphics/engine/lightman_test.cpp b/test/unit/graphics/engine/lightman_test.cpp index d35e3af0..6fd160fe 100644 --- a/test/unit/graphics/engine/lightman_test.cpp +++ b/test/unit/graphics/engine/lightman_test.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/test/unit/main.cpp b/test/unit/main.cpp index ba0e0893..91d640de 100644 --- a/test/unit/main.cpp +++ b/test/unit/main.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/test/unit/math/func_test.cpp b/test/unit/math/func_test.cpp index 6172fcfa..11ebd7b1 100644 --- a/test/unit/math/func_test.cpp +++ b/test/unit/math/func_test.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/test/unit/math/geometry_test.cpp b/test/unit/math/geometry_test.cpp index d0ae9d49..b811a757 100644 --- a/test/unit/math/geometry_test.cpp +++ b/test/unit/math/geometry_test.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/test/unit/math/matrix_test.cpp b/test/unit/math/matrix_test.cpp index 183e0491..b7196b84 100644 --- a/test/unit/math/matrix_test.cpp +++ b/test/unit/math/matrix_test.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify diff --git a/test/unit/math/vector_test.cpp b/test/unit/math/vector_test.cpp index 6386bb97..d9d07604 100644 --- a/test/unit/math/vector_test.cpp +++ b/test/unit/math/vector_test.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify From e964d3e48c2b695fd2c0f1c88e2256d8922cb299 Mon Sep 17 00:00:00 2001 From: krzys-h Date: Fri, 20 Apr 2018 01:31:11 +0200 Subject: [PATCH 052/207] Fix colobot-lint warnings --- src/common/settings.cpp | 1 + src/graphics/engine/engine.cpp | 1 + src/level/player_profile.cpp | 3 ++- src/level/robotmain.cpp | 15 +++++++++------ src/level/robotmain.h | 2 +- src/level/scoreboard.cpp | 4 ++-- src/level/scoreboard.h | 4 ++-- src/object/object_manager.h | 1 + src/object/old_object.cpp | 1 + src/script/scriptfunc.cpp | 6 +++--- src/ui/object_interface.cpp | 2 +- 11 files changed, 24 insertions(+), 16 deletions(-) diff --git a/src/common/settings.cpp b/src/common/settings.cpp index 3a84439c..93db8102 100644 --- a/src/common/settings.cpp +++ b/src/common/settings.cpp @@ -44,6 +44,7 @@ CSettings::CSettings() m_fontSize = 19.0f; m_windowPos = Math::Point(0.15f, 0.17f); m_windowDim = Math::Point(0.70f, 0.66f); + m_windowMax = false; m_IOPublic = false; m_IODim = Math::Point(320.0f/640.0f, (121.0f+18.0f*8)/480.0f); diff --git a/src/graphics/engine/engine.cpp b/src/graphics/engine/engine.cpp index 960d9d6d..e489b1e8 100644 --- a/src/graphics/engine/engine.cpp +++ b/src/graphics/engine/engine.cpp @@ -146,6 +146,7 @@ CEngine::CEngine(CApplication *app, CSystemUtils* systemUtils) m_showStats = false; m_focus = 0.75f; + m_hfov = 2.0f * atan((640.f/480.f) * tan(m_focus / 2.0f)); m_rankView = 0; diff --git a/src/level/player_profile.cpp b/src/level/player_profile.cpp index 971edd42..9abd20a8 100644 --- a/src/level/player_profile.cpp +++ b/src/level/player_profile.cpp @@ -518,7 +518,8 @@ void CPlayerProfile::LoadScene(std::string dir) CLevelParserLine* line = levelParser.Get("Mission"); cat = GetLevelCategoryFromDir(line->GetParam("base")->AsString()); - if (dir == "../../crashsave") LoadFinishedLevels(cat); + if (dir == "../../crashsave") + LoadFinishedLevels(cat); rank = line->GetParam("rank")->AsInt(); if (cat == LevelCategory::CustomLevels) diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp index 397652bb..b0706f24 100644 --- a/src/level/robotmain.cpp +++ b/src/level/robotmain.cpp @@ -221,6 +221,8 @@ CRobotMain::CRobotMain() m_resetCreate = false; m_shortCut = true; + m_commandHistoryIndex = -1; + m_movieInfoIndex = -1; m_tooltipPos = Math::Point(0.0f, 0.0f); @@ -4970,7 +4972,8 @@ Error CRobotMain::ProcessEndMissionTake() text, details, false, true, - [&]() { + [&]() + { ChangePhase(PHASE_WIN); } ); @@ -5564,13 +5567,13 @@ void CRobotMain::Autosave() void CRobotMain::QuickSave() { GetLogger()->Info("Quicksave!\n"); - + char infostr[100]; time_t now = time(nullptr); strftime(infostr, 99, "%y.%m.%d %H:%M", localtime(&now)); std::string info = std::string("[QUICKSAVE]") + infostr; std::string dir = m_playerProfile->GetSaveFile(std::string("quicksave")); - + m_playerProfile->SaveScene(dir, info); } @@ -5972,12 +5975,12 @@ bool CRobotMain::GetDebugCrashSpheres() return m_debugCrashSpheres; } -void CRobotMain::PushToCommandHistory(std::string str) +void CRobotMain::PushToCommandHistory(std::string cmd) { - if (!m_commandHistory.empty() && m_commandHistory.front() == str) // already in history + if (!m_commandHistory.empty() && m_commandHistory.front() == cmd) // already in history return; - m_commandHistory.push_front(str); + m_commandHistory.push_front(cmd); if (m_commandHistory.size() > 50) // to avoid infinite growth m_commandHistory.pop_back(); diff --git a/src/level/robotmain.h b/src/level/robotmain.h index 7fac6c2d..ce657372 100644 --- a/src/level/robotmain.h +++ b/src/level/robotmain.h @@ -528,7 +528,7 @@ protected: void UpdateDebugCrashSpheres(); //! Adds element to the beginning of command history - void PushToCommandHistory(std::string obj); + void PushToCommandHistory(std::string cmd); //! Returns next/previous element from command history and updates index //@{ std::string GetNextFromCommandHistory(); diff --git a/src/level/scoreboard.cpp b/src/level/scoreboard.cpp index 95bcc397..b574cf8b 100644 --- a/src/level/scoreboard.cpp +++ b/src/level/scoreboard.cpp @@ -22,10 +22,10 @@ #include "common/restext.h" #include "common/stringutils.h" -#include "level/parser/parserline.h" - #include "level/robotmain.h" +#include "level/parser/parserline.h" + #include "object/object.h" #include "ui/displaytext.h" diff --git a/src/level/scoreboard.h b/src/level/scoreboard.h index cb8b83b2..18cb67fb 100644 --- a/src/level/scoreboard.h +++ b/src/level/scoreboard.h @@ -115,11 +115,11 @@ public: void AddPoints(int team, int points); int GetScore(int team); - void SetScore(int team, int score); + void SetScore(int team, int points); private: std::vector> m_rulesKill = {}; std::vector> m_rulesEndTake = {}; std::map m_score; int m_finishCounter = 0; -}; \ No newline at end of file +}; diff --git a/src/object/object_manager.h b/src/object/object_manager.h index f5f3a16c..722812fa 100644 --- a/src/object/object_manager.h +++ b/src/object/object_manager.h @@ -32,6 +32,7 @@ #include "object/object_create_params.h" #include "object/object_interface_type.h" #include "object/object_type.h" + #include "object/interface/destroyable_object.h" #include diff --git a/src/object/old_object.cpp b/src/object/old_object.cpp index 0a75854c..d8d15197 100644 --- a/src/object/old_object.cpp +++ b/src/object/old_object.cpp @@ -138,6 +138,7 @@ COldObject::COldObject(int id) m_virusTime = 0.0f; m_lastVirusParticle = 0.0f; m_damaging = false; + m_damageTime = 0.0f; m_dying = DeathType::Alive; m_bFlat = false; m_gunGoalV = 0.0f; diff --git a/src/script/scriptfunc.cpp b/src/script/scriptfunc.cpp index 9a65554c..de84c73a 100644 --- a/src/script/scriptfunc.cpp +++ b/src/script/scriptfunc.cpp @@ -591,7 +591,7 @@ bool CScriptFunctions::rResearch(CBotVar* thisclass, CBotVar* var, CBotVar* resu } return true; } - + return true; } @@ -1315,7 +1315,7 @@ bool CScriptFunctions::rBuild(CBotVar* var, CBotVar* result, int& exception, voi } } } - result->SetValInt(err); // indicates the error or ok + result->SetValInt(err); // indicates the error or ok if ( err != ERR_OK ) { if ( script->m_errMode == ERM_STOP ) @@ -2464,7 +2464,7 @@ bool CScriptFunctions::rFire(CBotVar* var, CBotVar* result, int& exception, void if ( delay < 0.0f ) delay = -delay; err = script->m_taskExecutor->StartTaskFire(delay); } - result->SetValInt(err); // indicates the error or ok + result->SetValInt(err); // indicates the error or ok if ( err != ERR_OK ) { script->m_taskExecutor->StopForegroundTask(); diff --git a/src/ui/object_interface.cpp b/src/ui/object_interface.cpp index 8819068d..ab1fb088 100644 --- a/src/ui/object_interface.cpp +++ b/src/ui/object_interface.cpp @@ -1500,7 +1500,7 @@ void CObjectInterface::UpdateInterface(float rTime) m_lastAlarmTime = 0.0f; } } - + pg->SetLevel(shield); pg->SetIcon(icon); } From ea64edaa0b96ce6984953494af4b6dfd3dc4fe07 Mon Sep 17 00:00:00 2001 From: AbigailBuccaneer Date: Fri, 20 Apr 2018 10:20:56 +0100 Subject: [PATCH 053/207] Compile with -Wmissing-declarations -Wmissing-declarations enforces that every function (except for static functions) must be declared separately before it's defined. This essentially enforces that every function must be either static, or declared in a header elsewhere. This helps the optimizer, as it can do a better job of inlining if it knows that a function won't be used outside of a given file. It also helps -Wunused-function (which is enabled by -Wall) find more unused functions. Note that Clang spells this option -Wmissing-prototypes, which confusingly is the name of a related but different warning option under GCC. --- CMakeLists.txt | 4 ++-- src/CBot/CBotInstr/CBotTwoOpExpr.cpp | 8 ++++---- src/CBot/CBotProgram.cpp | 4 ++-- src/CBot/stdlib/FileFunctions.cpp | 3 +-- src/CBot/stdlib/MathFunctions.cpp | 4 ++++ src/CBot/stdlib/StringFunctions.cpp | 4 +++- src/app/pausemanager.cpp | 2 +- src/app/signal_handlers.cpp | 4 ++-- src/common/image.cpp | 3 ++- src/common/regex_utils.cpp | 2 +- src/graphics/engine/camera.cpp | 2 +- src/graphics/engine/engine.cpp | 2 +- src/graphics/engine/particle.cpp | 8 ++++---- src/level/parser/parserexceptions.cpp | 4 ++-- src/level/robotmain.cpp | 2 +- src/object/auto/autofactory.cpp | 2 +- src/object/auto/autoportico.cpp | 2 +- src/object/task/taskmanip.cpp | 22 ---------------------- src/script/script.cpp | 10 +++++----- src/script/scriptfunc.cpp | 25 ++++++------------------- src/tools/convert_model.cpp | 11 +++-------- src/ui/controls/edit.cpp | 11 +++++++---- src/ui/mainui.cpp | 4 ++-- src/ui/screen/screen_apperance.cpp | 2 +- src/ui/screen/screen_io.cpp | 2 +- src/ui/screen/screen_setup_display.cpp | 4 ++-- src/ui/studio.cpp | 4 ++-- test/cbot/console.cpp | 5 +++++ 28 files changed, 67 insertions(+), 93 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8681f5bd..0938efa9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -132,7 +132,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU") message(STATUS "Detected GCC version 4.7+") - set(NORMAL_CXX_FLAGS "-std=gnu++11 -Wall -Werror -Wold-style-cast -pedantic-errors") + set(NORMAL_CXX_FLAGS "-std=gnu++11 -Wall -Werror -Wold-style-cast -pedantic-errors -Wmissing-declarations") set(NORMAL_CXX_FLAGS "${NORMAL_CXX_FLAGS} -Wno-error=deprecated-declarations") # updated version of physfs is not available on some platforms so we keep using deprecated functions, see #958 set(RELEASE_CXX_FLAGS "-O2") set(DEBUG_CXX_FLAGS "-g -O0") @@ -145,7 +145,7 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang") message(STATUS "Detected Clang version 3.1+") - set(NORMAL_CXX_FLAGS "-std=c++11 -Wall -Werror -Wold-style-cast -pedantic-errors") + set(NORMAL_CXX_FLAGS "-std=c++11 -Wall -Werror -Wold-style-cast -pedantic-errors -Wmissing-prototypes") set(NORMAL_CXX_FLAGS "${NORMAL_CXX_FLAGS} -Wno-error=deprecated-declarations") # updated version of physfs is not available on some platforms so we keep using deprecated functions, see #958 set(RELEASE_CXX_FLAGS "-O2") set(DEBUG_CXX_FLAGS "-g -O0") diff --git a/src/CBot/CBotInstr/CBotTwoOpExpr.cpp b/src/CBot/CBotInstr/CBotTwoOpExpr.cpp index bc44111e..3d5fc6a4 100644 --- a/src/CBot/CBotInstr/CBotTwoOpExpr.cpp +++ b/src/CBot/CBotInstr/CBotTwoOpExpr.cpp @@ -114,7 +114,7 @@ static int ListOp[] = 0, // end of list }; -bool IsInList(int val, int* list, int& typeMask) +static bool IsInList(int val, int* list, int& typeMask) { while (true) { @@ -124,7 +124,7 @@ bool IsInList(int val, int* list, int& typeMask) } } -bool TypeOk(int type, int test) +static bool TypeOk(int type, int test) { while (true) { @@ -304,12 +304,12 @@ CBotInstr* CBotTwoOpExpr::Compile(CBotToken* &p, CBotCStack* pStack, int* pOpera } -bool VarIsNAN(const CBotVar* var) +static bool VarIsNAN(const CBotVar* var) { return var->GetInit() > CBotVar::InitType::DEF; } -bool IsNan(CBotVar* left, CBotVar* right, CBotError* err = nullptr) +static bool IsNan(CBotVar* left, CBotVar* right, CBotError* err = nullptr) { if ( VarIsNAN(left) || VarIsNAN(right) ) { diff --git a/src/CBot/CBotProgram.cpp b/src/CBot/CBotProgram.cpp index 013b84f9..e8065f47 100644 --- a/src/CBot/CBotProgram.cpp +++ b/src/CBot/CBotProgram.cpp @@ -292,7 +292,7 @@ bool CBotProgram::ClassExists(std::string name) } //////////////////////////////////////////////////////////////////////////////// -CBotTypResult cSizeOf( CBotVar* &pVar, void* pUser ) +static CBotTypResult cSizeOf( CBotVar* &pVar, void* pUser ) { if ( pVar == nullptr ) return CBotTypResult( CBotErrLowParam ); if ( pVar->GetType() != CBotTypArrayPointer ) @@ -300,7 +300,7 @@ CBotTypResult cSizeOf( CBotVar* &pVar, void* pUser ) return CBotTypResult( CBotTypInt ); } -bool rSizeOf( CBotVar* pVar, CBotVar* pResult, int& ex, void* pUser ) +static bool rSizeOf( CBotVar* pVar, CBotVar* pResult, int& ex, void* pUser ) { if ( pVar == nullptr ) { ex = CBotErrLowParam; return true; } diff --git a/src/CBot/stdlib/FileFunctions.cpp b/src/CBot/stdlib/FileFunctions.cpp index e565866b..b185ac13 100644 --- a/src/CBot/stdlib/FileFunctions.cpp +++ b/src/CBot/stdlib/FileFunctions.cpp @@ -33,8 +33,6 @@ namespace std::unique_ptr g_fileHandler; std::unordered_map> g_files; int g_nextFileId = 1; -} - bool FileClassOpenFile(CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception) { @@ -358,6 +356,7 @@ bool rDeleteFile(CBotVar* var, CBotVar* result, int& exception, void* user) return g_fileHandler->DeleteFile(filename); } +} // namespace void InitFileFunctions() { diff --git a/src/CBot/stdlib/MathFunctions.cpp b/src/CBot/stdlib/MathFunctions.cpp index cbfd9db9..665caffc 100644 --- a/src/CBot/stdlib/MathFunctions.cpp +++ b/src/CBot/stdlib/MathFunctions.cpp @@ -26,6 +26,8 @@ namespace CBot { +namespace +{ const float PI = 3.14159265358979323846f; // Instruction "sin(degrees)". @@ -193,6 +195,8 @@ bool rTrunc(CBotVar* var, CBotVar* result, int& exception, void* user) return true; } +} // namespace + void InitMathFunctions() { CBotProgram::AddFunction("sin", rSin, cOneFloat); diff --git a/src/CBot/stdlib/StringFunctions.cpp b/src/CBot/stdlib/StringFunctions.cpp index 93bb9136..a4baa5b7 100644 --- a/src/CBot/stdlib/StringFunctions.cpp +++ b/src/CBot/stdlib/StringFunctions.cpp @@ -27,6 +27,8 @@ namespace CBot { +namespace +{ //////////////////////////////////////////////////////////////////////////////// bool rStrLen( CBotVar* pVar, CBotVar* pResult, int& ex, void* pUser ) @@ -282,7 +284,7 @@ bool rStrLower( CBotVar* pVar, CBotVar* pResult, int& ex, void* pUser ) return true; } - +} // namespace //////////////////////////////////////////////////////////////////////////////// void InitStringFunctions() diff --git a/src/app/pausemanager.cpp b/src/app/pausemanager.cpp index 8efd4b96..f4872fdf 100644 --- a/src/app/pausemanager.cpp +++ b/src/app/pausemanager.cpp @@ -42,7 +42,7 @@ struct ActivePause PauseMusic music; }; -std::string GetPauseName(PauseType type) +static std::string GetPauseName(PauseType type) { std::vector x; if ((type & PAUSE_ENGINE) != 0) x.push_back("engine"); diff --git a/src/app/signal_handlers.cpp b/src/app/signal_handlers.cpp index c6782b30..1974ba3f 100644 --- a/src/app/signal_handlers.cpp +++ b/src/app/signal_handlers.cpp @@ -62,7 +62,7 @@ void CSignalHandlers::SignalHandler(int sig) #include #include #include -std::string demangle(const char* name) +static std::string demangle(const char* name) { int status; std::unique_ptr result { @@ -75,7 +75,7 @@ std::string demangle(const char* name) #else // For MSVC and others // In MSVC typeinfo(e).name() should be already demangled -std::string demangle(const char* name) +static std::string demangle(const char* name) { return name; } diff --git a/src/common/image.cpp b/src/common/image.cpp index 0303e815..0f82e881 100644 --- a/src/common/image.cpp +++ b/src/common/image.cpp @@ -70,7 +70,6 @@ namespace { std::string PNG_ERROR = ""; -} void PNGUserError(png_structp ctx, png_const_charp str) { @@ -147,6 +146,8 @@ bool PNGSaveSurface(const char *filename, SDL_Surface *surf) return true; } +} // namespace + /* <---------------------------------------------------------------> */ diff --git a/src/common/regex_utils.cpp b/src/common/regex_utils.cpp index a7449f3e..a07ecc2a 100644 --- a/src/common/regex_utils.cpp +++ b/src/common/regex_utils.cpp @@ -19,7 +19,7 @@ #include "common/regex_utils.h" -std::string FormatAssertRegexMatchError(const std::string& text, +static std::string FormatAssertRegexMatchError(const std::string& text, const std::string& pattern) { return "Text \"" + text + "\" did not match regex \"" + pattern + "\""; diff --git a/src/graphics/engine/camera.cpp b/src/graphics/engine/camera.cpp index 33d56da8..461f46a0 100644 --- a/src/graphics/engine/camera.cpp +++ b/src/graphics/engine/camera.cpp @@ -53,7 +53,7 @@ namespace Gfx const float MOUSE_EDGE_MARGIN = 0.01f; //! Changes the level of transparency of an object and objects transported (battery & cargo) -void SetTransparency(CObject* obj, float value) +static void SetTransparency(CObject* obj, float value) { obj->SetTransparency(value); diff --git a/src/graphics/engine/engine.cpp b/src/graphics/engine/engine.cpp index e489b1e8..23ed2108 100644 --- a/src/graphics/engine/engine.cpp +++ b/src/graphics/engine/engine.cpp @@ -2383,7 +2383,7 @@ bool CEngine::LoadAllTextures() return ok; } -bool IsExcludeColor(Math::Point *exclude, int x, int y) +static bool IsExcludeColor(Math::Point *exclude, int x, int y) { int i = 0; while ( exclude[i+0].x != 0.0f || exclude[i+0].y != 0.0f || diff --git a/src/graphics/engine/particle.cpp b/src/graphics/engine/particle.cpp index 14916a62..233e5974 100644 --- a/src/graphics/engine/particle.cpp +++ b/src/graphics/engine/particle.cpp @@ -57,7 +57,7 @@ const float FOG_HINF = 100.0f; //! Check if an object is a destroyable enemy -bool IsAlien(ObjectType type) +static bool IsAlien(ObjectType type) { return ( type == OBJECT_ANT || type == OBJECT_SPIDER || @@ -138,7 +138,7 @@ void CParticle::FlushParticle(int sheet) //! Returns file name of the effect effectNN.png, with NN = number -void NameParticle(std::string &name, int num) +static void NameParticle(std::string &name, int num) { if (num == 1) name = "effect00.png"; else if (num == 2) name = "effect01.png"; @@ -148,7 +148,7 @@ void NameParticle(std::string &name, int num) } //! Returns random letter for use as virus particle -char RandomLetter() +static char RandomLetter() { static std::vector chars; if (chars.empty()) @@ -3205,7 +3205,7 @@ void CParticle::DrawParticleSphere(int i) } //! Returns the height depending on the progress -float ProgressCylinder(float progress) +static float ProgressCylinder(float progress) { if (progress < 0.5f) return 1.0f - (powf(1.0f-progress*2.0f, 2.0f)); diff --git a/src/level/parser/parserexceptions.cpp b/src/level/parser/parserexceptions.cpp index a8895cac..471b1158 100644 --- a/src/level/parser/parserexceptions.cpp +++ b/src/level/parser/parserexceptions.cpp @@ -24,7 +24,7 @@ #include -std::string FormatMissingParamError(CLevelParserParam* thisParam) NOEXCEPT +static std::string FormatMissingParamError(CLevelParserParam* thisParam) NOEXCEPT { auto paramName = thisParam->GetName(); auto lineNumber = boost::lexical_cast(thisParam->GetLine()->GetLineNumber()); @@ -37,7 +37,7 @@ CLevelParserExceptionMissingParam::CLevelParserExceptionMissingParam(CLevelParse { } -std::string FormatBadParamError(CLevelParserParam* thisParam, std::string requestedType) NOEXCEPT +static std::string FormatBadParamError(CLevelParserParam* thisParam, std::string requestedType) NOEXCEPT { auto paramName = thisParam->GetName(); auto paramValue = thisParam->GetValue(); diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp index b0706f24..5e49cc68 100644 --- a/src/level/robotmain.cpp +++ b/src/level/robotmain.cpp @@ -2260,7 +2260,7 @@ void CRobotMain::AbortMovie() } -std::string TimeFormat(float time) +static std::string TimeFormat(float time) { int minutes = static_cast(floor(time/60)); double time2 = fmod(time, 60); diff --git a/src/object/auto/autofactory.cpp b/src/object/auto/autofactory.cpp index ecb8f5e0..5da54545 100644 --- a/src/object/auto/autofactory.cpp +++ b/src/object/auto/autofactory.cpp @@ -168,7 +168,7 @@ void CAutoFactory::SetProgram(const std::string& program) m_program = program; } -ObjectType ObjectTypeFromFactoryButton(EventType eventType) +static ObjectType ObjectTypeFromFactoryButton(EventType eventType) { if ( eventType == EVENT_OBJECT_FACTORYwa ) return OBJECT_MOBILEwa; if ( eventType == EVENT_OBJECT_FACTORYta ) return OBJECT_MOBILEta; diff --git a/src/object/auto/autoportico.cpp b/src/object/auto/autoportico.cpp index cfa078d1..2a8bf372 100644 --- a/src/object/auto/autoportico.cpp +++ b/src/object/auto/autoportico.cpp @@ -50,7 +50,7 @@ const float PORTICO_TIME_OPEN = 12.0f; // Si progress=0, return a. // Si progress=1, return b. -float Progress(float a, float b, float progress) +static float Progress(float a, float b, float progress) { return a+(b-a)*progress; } diff --git a/src/object/task/taskmanip.cpp b/src/object/task/taskmanip.cpp index 0ac1ef69..16615ebd 100644 --- a/src/object/task/taskmanip.cpp +++ b/src/object/task/taskmanip.cpp @@ -263,28 +263,6 @@ void CTaskManip::InitAngle() } } - -// Tests whether an object is compatible with the operation TMA_OTHER. - -bool TestFriend(ObjectType oType, ObjectType fType) -{ - if ( oType == OBJECT_ENERGY ) - { - return ( fType == OBJECT_METAL ); - } - if ( oType == OBJECT_LABO ) - { - return ( fType == OBJECT_BULLET ); - } - if ( oType == OBJECT_NUCLEAR ) - { - return ( fType == OBJECT_URANIUM ); - } - - return ( fType == OBJECT_POWER || - fType == OBJECT_ATOMIC ); -} - // Assigns the goal was achieved. Error CTaskManip::Start(TaskManipOrder order, TaskManipArm arm) diff --git a/src/script/script.cpp b/src/script/script.cpp index f6424705..a94e850f 100644 --- a/src/script/script.cpp +++ b/src/script/script.cpp @@ -479,7 +479,7 @@ bool CScript::GetCursor(int &cursor1, int &cursor2) // Put of the variables in a list. -void PutList(const std::string& baseName, bool bArray, CBot::CBotVar *var, Ui::CList *list, int &rankList, std::set& previous) +static void PutList(const std::string& baseName, bool bArray, CBot::CBotVar *var, Ui::CList *list, int &rankList, std::set& previous) { if ( var == nullptr && !baseName.empty() ) { @@ -591,7 +591,7 @@ void CScript::UpdateList(Ui::CList* list) // Colorize a string literal with escape sequences also colored -void HighlightString(Ui::CEdit* edit, const std::string& s, int start) +static void HighlightString(Ui::CEdit* edit, const std::string& s, int start) { edit->SetFormat(start, start + 1, Gfx::FONT_HIGHLIGHT_STRING); @@ -716,7 +716,7 @@ void CScript::ColorizeScript(Ui::CEdit* edit, int rangeStart, int rangeEnd) // Returns the index of the start of the token found, or -1. -int SearchToken(char* script, const char* token) +static int SearchToken(char* script, const char* token) { int lScript, lToken, i, iFound; int found[100]; @@ -741,7 +741,7 @@ int SearchToken(char* script, const char* token) // Removes a token in a script. -void DeleteToken(char* script, int pos, int len) +static void DeleteToken(char* script, int pos, int len) { while ( true ) { @@ -752,7 +752,7 @@ void DeleteToken(char* script, int pos, int len) // Inserts a token in a script. -void InsertToken(char* script, int pos, const char* token) +static void InsertToken(char* script, int pos, const char* token) { int lScript, lToken, i; diff --git a/src/script/scriptfunc.cpp b/src/script/scriptfunc.cpp index de84c73a..504cf6f1 100644 --- a/src/script/scriptfunc.cpp +++ b/src/script/scriptfunc.cpp @@ -81,7 +81,7 @@ CBotTypResult CScriptFunctions::cClassOneFloat(CBotVar* thisclass, CBotVar* &var // Compile a parameter of type "point". -CBotTypResult cPoint(CBotVar* &var, void* user) +static CBotTypResult cPoint(CBotVar* &var, void* user) { if ( var == nullptr ) return CBotTypResult(CBotErrLowParam); @@ -120,22 +120,9 @@ CBotTypResult CScriptFunctions::cOnePoint(CBotVar* &var, void* user) return CBotTypResult(CBotTypFloat); } -// Seeking value in an array of integers. - -bool FindList(CBotVar* array, int type) -{ - while ( array != nullptr ) - { - if ( type == array->GetValInt() ) return true; - array = array->GetNext(); - } - return false; -} - - // Gives a parameter of type "point". -bool GetPoint(CBotVar* &var, int& exception, Math::Vector& pos) +static bool GetPoint(CBotVar* &var, int& exception, Math::Vector& pos) { CBotVar *pX, *pY, *pZ; @@ -702,7 +689,7 @@ bool CScriptFunctions::rDelete(CBotVar* var, CBotVar* result, int& exception, vo return false; } -CBotTypResult compileSearch(CBotVar* &var, void* user, CBotTypResult returnValue) +static CBotTypResult compileSearch(CBotVar* &var, void* user, CBotTypResult returnValue) { if ( var == nullptr ) return CBotTypResult(CBotErrLowParam); if ( var->GetType() == CBotTypArrayPointer ) @@ -746,7 +733,7 @@ CBotTypResult CScriptFunctions::cSearchAll(CBotVar* &var, void* user) return compileSearch(var, user, CBotTypResult(CBotTypArrayPointer, CBotTypResult(CBotTypPointer, "object"))); } -bool runSearch(CBotVar* var, Math::Vector pos, int& exception, std::function, Math::Vector, float, float, bool, RadarFilter)> code) +static bool runSearch(CBotVar* var, Math::Vector pos, int& exception, std::function, Math::Vector, float, float, bool, RadarFilter)> code) { CBotVar* array; RadarFilter filter; @@ -865,7 +852,7 @@ bool CScriptFunctions::rSearchAll(CBotVar* var, CBotVar* result, int& exception, } -CBotTypResult compileRadar(CBotVar* &var, void* user, CBotTypResult returnValue) +static CBotTypResult compileRadar(CBotVar* &var, void* user, CBotTypResult returnValue) { CBotVar* array; @@ -912,7 +899,7 @@ CBotTypResult CScriptFunctions::cRadar(CBotVar* &var, void* user) return compileRadar(var, user, CBotTypResult(CBotTypPointer, "object")); } -bool runRadar(CBotVar* var, std::function, float, float, float, float, bool, RadarFilter)> code) +static bool runRadar(CBotVar* var, std::function, float, float, float, float, bool, RadarFilter)> code) { CBotVar* array; RadarFilter filter; diff --git a/src/tools/convert_model.cpp b/src/tools/convert_model.cpp index 97c95b6a..4315c84f 100644 --- a/src/tools/convert_model.cpp +++ b/src/tools/convert_model.cpp @@ -29,15 +29,8 @@ using namespace Gfx; - -bool EndsWith(std::string const &fullString, std::string const &ending) +namespace { - if (fullString.length() >= ending.length()) - return (0 == fullString.compare (fullString.length() - ending.length(), ending.length(), ending)); - else - return false; -} - struct Args { @@ -218,6 +211,8 @@ void DumpInfo(const CModel& model) std::cerr << std::endl; } +} // namespace + int main(int argc, char *argv[]) { CLogger logger; diff --git a/src/ui/controls/edit.cpp b/src/ui/controls/edit.cpp index 19327fd1..b666b070 100644 --- a/src/ui/controls/edit.cpp +++ b/src/ui/controls/edit.cpp @@ -46,7 +46,8 @@ namespace Ui { - +namespace +{ const float MARGX = (3.75f/640.0f); const float MARGY = (3.75f/480.0f); const float MARGYS = (2.75f/480.0f); @@ -96,6 +97,8 @@ bool IsDelimiter(char c) return IsSpace( c ) || IsBreaker( c ); } +} // namespace + //! Object's constructor. CEdit::CEdit() : CControl(), @@ -1156,7 +1159,7 @@ void CEdit::Draw() // Draw an image part. -std::string PrepareImageFilename(std::string name) +static std::string PrepareImageFilename(std::string name) { std::string filename; filename = name + ".png"; @@ -1398,7 +1401,7 @@ int CEdit::GetTextLength() // Returns a name in a command. // \x nom1 nom2 nom3; -std::string GetNameParam(std::string cmd, int rank) +static std::string GetNameParam(std::string cmd, int rank) { std::vector results; boost::split(results, cmd, boost::is_any_of(" ;")); @@ -1414,7 +1417,7 @@ std::string GetNameParam(std::string cmd, int rank) // Returns a number of a command. // \x nom n1 n2; -int GetValueParam(std::string cmd, int rank) +static int GetValueParam(std::string cmd, int rank) { std::vector results; boost::split(results, cmd, boost::is_any_of(" ;")); diff --git a/src/ui/mainui.cpp b/src/ui/mainui.cpp index ced014d1..2ffb17fe 100644 --- a/src/ui/mainui.cpp +++ b/src/ui/mainui.cpp @@ -416,7 +416,7 @@ void CMainUserInterface::GlintMove() // Returns the position for a sound. -Math::Vector SoundPos(Math::Point pos) +static Math::Vector SoundPos(Math::Point pos) { Math::Vector s; @@ -429,7 +429,7 @@ Math::Vector SoundPos(Math::Point pos) // Returns a random position for a sound. -Math::Vector SoundRand() +static Math::Vector SoundRand() { Math::Vector s; diff --git a/src/ui/screen/screen_apperance.cpp b/src/ui/screen/screen_apperance.cpp index 6ebd4289..a1d89a2a 100644 --- a/src/ui/screen/screen_apperance.cpp +++ b/src/ui/screen/screen_apperance.cpp @@ -457,7 +457,7 @@ float CScreenApperance::GetPersoAngle() // Tests whether two colors are equal or nearly are. -bool EqColor(const Gfx::Color &c1, const Gfx::Color &c2) +static bool EqColor(const Gfx::Color &c1, const Gfx::Color &c2) { return (fabs(c1.r-c2.r) < 0.01f && fabs(c1.g-c2.g) < 0.01f && diff --git a/src/ui/screen/screen_io.cpp b/src/ui/screen/screen_io.cpp index c6e96351..06db0339 100644 --- a/src/ui/screen/screen_io.cpp +++ b/src/ui/screen/screen_io.cpp @@ -193,7 +193,7 @@ void CScreenIO::IODeleteScene() } // clears filename only to leave letter or numbers -std::string clearName(std::string name) +static std::string clearName(std::string name) { std::string ret; for (int i = 0; i < static_cast(name.size()); i++) diff --git a/src/ui/screen/screen_setup_display.cpp b/src/ui/screen/screen_setup_display.cpp index 70150e85..bf31baa6 100644 --- a/src/ui/screen/screen_setup_display.cpp +++ b/src/ui/screen/screen_setup_display.cpp @@ -161,12 +161,12 @@ bool CScreenSetupDisplay::EventProcess(const Event &event) // Updates the list of modes. -int GCD(int a, int b) +static int GCD(int a, int b) { return (b == 0) ? a : GCD(b, a%b); } -Math::IntPoint AspectRatio(Math::IntPoint resolution) +static Math::IntPoint AspectRatio(Math::IntPoint resolution) { int gcd = GCD(resolution.x, resolution.y); return Math::IntPoint(static_cast(resolution.x) / gcd, static_cast(resolution.y) / gcd); diff --git a/src/ui/studio.cpp b/src/ui/studio.cpp index 16b841ec..6f2a1978 100644 --- a/src/ui/studio.cpp +++ b/src/ui/studio.cpp @@ -312,7 +312,7 @@ bool CStudio::EventProcess(const Event &event) // Evolves value with time elapsed. -float Evolution(float final, float actual, float time) +static float Evolution(float final, float actual, float time) { float value; @@ -425,7 +425,7 @@ bool CStudio::EventFrame(const Event &event) // Indicates whether a character is part of a word. -bool IsToken(char c) +static bool IsToken(char c) { return ( isalnum(c) || c == '_' ); } diff --git a/test/cbot/console.cpp b/test/cbot/console.cpp index dd6801ea..f00bdbf8 100644 --- a/test/cbot/console.cpp +++ b/test/cbot/console.cpp @@ -26,6 +26,9 @@ using namespace CBot; +namespace +{ + CBotTypResult cMessage(CBotVar* &var, void* user) { if ( var == nullptr ) return CBotTypResult(CBotErrLowParam); @@ -46,6 +49,8 @@ bool rMessage(CBotVar* var, CBotVar* result, int& exception, void* user) return true; } +} // namespace + int main(int argc, char* argv[]) { // Read program code from stdin From 5e8be5f6bc1f546af01b5de5fc2f8a8cff725624 Mon Sep 17 00:00:00 2001 From: tomangelo2 Date: Mon, 23 Apr 2018 08:12:33 +0200 Subject: [PATCH 054/207] Better align of viewpoint UI --- src/level/robotmain.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp index fbd000a1..63f746f2 100644 --- a/src/level/robotmain.cpp +++ b/src/level/robotmain.cpp @@ -5870,7 +5870,7 @@ void CRobotMain::CreateCodeBattleInterface() { //create button pos.x = (550.0f+40.0f*(i%2))/640.0f; - pos.y = (120.0f+offset)/480.0f + numTeams * textHeight - 45.0f*(i/2)/480.0f; + pos.y = (130.0f+offset)/480.0f + numTeams * textHeight - 45.0f*(i/2)/480.0f; pw->CreateButton(pos,ddim, 13, EventType(EVENT_VIEWPOINT0 + i)); } From 419c430f7ec7a01749b45e0be8b09ca6133ffea8 Mon Sep 17 00:00:00 2001 From: krzys_h Date: Mon, 23 Apr 2018 19:03:38 +0200 Subject: [PATCH 055/207] Jenkinsfile: Make colobot-lint use Clang flags --- Jenkinsfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 5548e186..9ba966a7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -91,6 +91,11 @@ pipeline { } stage('Run colobot-lint') { + environment { + CC = '/usr/lib/llvm-3.6/bin/clang' + CXX = '/usr/lib/llvm-3.6/bin/clang++' + CLANG_PREFIX = '/usr/lib/llvm-3.6' + } steps { copyArtifacts filter: 'build/colobot-lint,build/html_report.tar.gz,Tools/count_errors.py', fingerprintArtifacts: true, projectName: 'colobot/colobot-lint/master', selector: lastSuccessful(), target: 'colobot-lint' sh 'chmod +x colobot-lint/Tools/count_errors.py' // TODO: ??? @@ -110,7 +115,7 @@ COLOBOT_LINT_BUILD_DIR="$WORKSPACE/colobot-lint/build" COLOBOT_LINT_REPORT_FILE="$WORKSPACE/build/lint/colobot_lint_report.xml" -CLANG_PREFIX="/usr/lib/llvm-3.6" +# CLANG_PREFIX="/usr/lib/llvm-3.6" # Set in top-level environment block cd "$COLOBOT_LINT_BUILD_DIR" chmod +x ./colobot-lint From 4bca2b224368be5c39402607cb3abc5cbea38c0b Mon Sep 17 00:00:00 2001 From: AbigailBuccaneer Date: Tue, 24 Apr 2018 11:43:11 +0100 Subject: [PATCH 056/207] Fix global sounds being positioned at camera Certain sounds - such as those coming from the UI - aren't supposed to sound as if they're coming from a given position. This is currently accomplished by positioning the OpenAL source at the camera position. This works, but if the camera position drastically moves during the sound being played then it's possible to hear the sound fade out. This pull request makes camera movement no longer affect global sounds, by specifying their position as being (0, 0, 0) relative to the listener position. The easiest way to test this is to start a mission, press E to grab when there's nothing in front of you, and scroll the mouse wheel quickly. Pressing E will show the nothing-to-grab message which plays a beep sound, and scrolling will quickly move the camera. Prior to this pull request, the sound will fade, after this pull request it won't. Fixes #1087. --- src/sound/oalsound/alsound.cpp | 9 +++++++-- src/sound/oalsound/alsound.h | 1 + src/sound/oalsound/channel.cpp | 3 ++- src/sound/oalsound/channel.h | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/sound/oalsound/alsound.cpp b/src/sound/oalsound/alsound.cpp index e4d457d3..bcea6979 100644 --- a/src/sound/oalsound/alsound.cpp +++ b/src/sound/oalsound/alsound.cpp @@ -314,10 +314,15 @@ bool CALSound::SearchFreeBuffer(SoundType sound, int &channel, bool &alreadyLoad int CALSound::Play(SoundType sound, float amplitude, float frequency, bool loop) { - return Play(sound, m_eye, amplitude, frequency, loop); + return Play(sound, Math::Vector{}, true, amplitude, frequency, loop); } int CALSound::Play(SoundType sound, const Math::Vector &pos, float amplitude, float frequency, bool loop) +{ + return Play(sound, pos, false, amplitude, frequency, loop); +} + +int CALSound::Play(SoundType sound, const Math::Vector &pos, bool relativeToListener, float amplitude, float frequency, bool loop) { if (!m_enabled) { @@ -347,7 +352,7 @@ int CALSound::Play(SoundType sound, const Math::Vector &pos, float amplitude, fl CChannel* chn = m_channels[channel].get(); - chn->SetPosition(pos); + chn->SetPosition(pos, relativeToListener); chn->SetVolumeAtrib(1.0f); // setting initial values diff --git a/src/sound/oalsound/alsound.h b/src/sound/oalsound/alsound.h index 23c62379..dc0e1ee8 100644 --- a/src/sound/oalsound/alsound.h +++ b/src/sound/oalsound/alsound.h @@ -116,6 +116,7 @@ public: private: void CleanUp(); + int Play(SoundType sound, const Math::Vector &pos, bool relativeToListener, float amplitude, float frequency, bool loop); int GetPriority(SoundType); bool SearchFreeBuffer(SoundType sound, int &channel, bool &alreadyLoaded); bool CheckChannel(int &channel); diff --git a/src/sound/oalsound/channel.cpp b/src/sound/oalsound/channel.cpp index e8d50fe2..d2d3630e 100644 --- a/src/sound/oalsound/channel.cpp +++ b/src/sound/oalsound/channel.cpp @@ -94,7 +94,7 @@ bool CChannel::Pause() return true; } -bool CChannel::SetPosition(const Math::Vector &pos) +bool CChannel::SetPosition(const Math::Vector &pos, bool relativeToListener) { if (!m_ready || m_buffer == nullptr) { @@ -102,6 +102,7 @@ bool CChannel::SetPosition(const Math::Vector &pos) } alSource3f(m_source, AL_POSITION, pos.x, pos.y, pos.z); + alSourcei(m_source, AL_SOURCE_RELATIVE, relativeToListener); if (CheckOpenALError()) { GetLogger()->Debug("Could not set sound position. Code: %d\n", GetOpenALErrorCode()); diff --git a/src/sound/oalsound/channel.h b/src/sound/oalsound/channel.h index de56686d..27b474af 100644 --- a/src/sound/oalsound/channel.h +++ b/src/sound/oalsound/channel.h @@ -59,7 +59,7 @@ public: bool Pause(); bool Stop(); - bool SetPosition(const Math::Vector &pos); + bool SetPosition(const Math::Vector &pos, bool relativeToListener = false); bool SetFrequency(float freq); float GetFrequency(); From c49c815ea51c75f67d203a9820ce3b4096c2264d Mon Sep 17 00:00:00 2001 From: AbigailBuccaneer Date: Fri, 27 Apr 2018 09:58:09 +0100 Subject: [PATCH 057/207] Set uniforms less often during text rendering We now call SetWindowCoordinates and SetInterfaceCoordinates once per string, rather than once or twice per character. --- src/graphics/engine/text.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/graphics/engine/text.cpp b/src/graphics/engine/text.cpp index 96bb3071..edf3c50d 100644 --- a/src/graphics/engine/text.cpp +++ b/src/graphics/engine/text.cpp @@ -691,6 +691,7 @@ void CText::DrawString(const std::string &text, std::vector::itera float size, Math::IntPoint pos, int width, int eol, Color color) { m_engine->SetState(ENG_RSTATE_TEXT); + m_engine->SetWindowCoordinates(); int start = pos.x; @@ -776,6 +777,7 @@ void CText::DrawString(const std::string &text, std::vector::itera color = Color(1.0f, 0.0f, 0.0f); DrawCharAndAdjustPos(ch, font, size, pos, color); } + m_engine->SetInterfaceCoordinates(); } void CText::StringToUTFCharList(const std::string &text, std::vector &chars) @@ -847,10 +849,12 @@ void CText::DrawString(const std::string &text, FontType font, std::vector chars; StringToUTFCharList(text, chars); + m_engine->SetWindowCoordinates(); for (auto it = chars.begin(); it != chars.end(); ++it) { DrawCharAndAdjustPos(*it, font, size, pos, color); } + m_engine->SetInterfaceCoordinates(); } void CText::DrawHighlight(FontMetaChar hl, Math::IntPoint pos, Math::IntPoint size) @@ -902,9 +906,7 @@ void CText::DrawHighlight(FontMetaChar hl, Math::IntPoint pos, Math::IntPoint si VertexCol(Math::Vector(p2.x, p1.y, 0.0f), grad[1]) }; - m_engine->SetWindowCoordinates(); m_device->DrawPrimitive(PRIMITIVE_TRIANGLE_STRIP, quad, 4); - m_engine->SetInterfaceCoordinates(); m_engine->AddStatisticTriangle(2); m_device->SetTextureEnabled(0, true); @@ -963,9 +965,7 @@ void CText::DrawCharAndAdjustPos(UTF8Char ch, FontType font, float size, Math::I Vertex(Math::Vector(p2.x, p1.y, 0.0f), n, Math::Point(uv2.x, uv1.y)) }; - m_engine->SetWindowCoordinates(); m_device->DrawPrimitive(PRIMITIVE_TRIANGLE_STRIP, quad, 4, color); - m_engine->SetInterfaceCoordinates(); m_engine->AddStatisticTriangle(2); pos.x += width; @@ -1008,9 +1008,7 @@ void CText::DrawCharAndAdjustPos(UTF8Char ch, FontType font, float size, Math::I }; m_device->SetTexture(0, tex.id); - m_engine->SetWindowCoordinates(); m_device->DrawPrimitive(PRIMITIVE_TRIANGLE_STRIP, quad, 4, color); - m_engine->SetInterfaceCoordinates(); m_engine->AddStatisticTriangle(2); pos.x += tex.charSize.x * width; From 282a793a130c9073de7f5234b8cbc8f4ce29a020 Mon Sep 17 00:00:00 2001 From: AbigailBuccaneer Date: Sun, 29 Apr 2018 18:05:19 +0100 Subject: [PATCH 058/207] Improve object vis with tighter bounding spheres This commit improves rendering performance by doing a better job of checking whether an object is visible via its bounding sphere or not. The engine maintains a bounding box for each EngineBaseObject that's exactly large enough to fit every vertex. From this, it computes a bounding sphere, and only draws objects if the sphere is within the view frustum. Previously, the bounding sphere was always centered on the EngineBaseObject's origin, even for models where the bounding box center is significantly offset from the origin. Now, the bounding sphere is always the tightest sphere which fits the bounding box. --- src/graphics/engine/engine.cpp | 16 +++++++--------- src/graphics/engine/engine.h | 4 ++-- src/math/sphere.h | 7 +++++++ 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/src/graphics/engine/engine.cpp b/src/graphics/engine/engine.cpp index 23ed2108..304dabc6 100644 --- a/src/graphics/engine/engine.cpp +++ b/src/graphics/engine/engine.cpp @@ -765,7 +765,7 @@ void CEngine::AddBaseObjTriangles(int baseObjRank, const std::vector p1.bboxMax.z = Math::Max(vertices[i].coord.z, p1.bboxMax.z); } - p1.radius = Math::Max(p1.bboxMin.Length(), p1.bboxMax.Length()); + p1.boundingSphere = Math::BoundingSphereForBox(p1.bboxMin, p1.bboxMax); p1.totalTriangles += vertices.size() / 3; } @@ -801,7 +801,7 @@ void CEngine::AddBaseObjQuick(int baseObjRank, const EngineBaseObjDataTier& buff p1.bboxMax.z = Math::Max(p3.vertices[i].coord.z, p1.bboxMax.z); } - p1.radius = Math::Max(p1.bboxMin.Length(), p1.bboxMax.Length()); + p1.boundingSphere = Math::BoundingSphereForBox(p1.bboxMin, p1.bboxMax); } if (p3.type == ENG_TRIANGLE_TYPE_TRIANGLES) @@ -856,7 +856,7 @@ void CEngine::DebugObject(int objRank) vecStr = p1.bboxMax.ToString(); l->Debug(" bboxMax: %s\n", vecStr.c_str()); l->Debug(" totalTriangles: %d\n", p1.totalTriangles); - l->Debug(" radius: %f\n", p1.radius); + l->Debug(" radius: %f\n", p1.boundingSphere.radius); for (int l2 = 0; l2 < static_cast( p1.next.size() ); l2++) { @@ -1659,7 +1659,6 @@ void CEngine::UpdateGeometry() p1.bboxMin.LoadZero(); p1.bboxMax.LoadZero(); - p1.radius = 0; for (int l2 = 0; l2 < static_cast( p1.next.size() ); l2++) { @@ -1678,10 +1677,10 @@ void CEngine::UpdateGeometry() p1.bboxMax.y = Math::Max(p3.vertices[i].coord.y, p1.bboxMax.y); p1.bboxMax.z = Math::Max(p3.vertices[i].coord.z, p1.bboxMax.z); } - - p1.radius = Math::Max(p1.bboxMin.Length(), p1.bboxMax.Length()); } } + + p1.boundingSphere = Math::BoundingSphereForBox(p1.bboxMin, p1.bboxMax); } m_updateGeometry = false; @@ -1925,9 +1924,8 @@ bool CEngine::IsVisible(int objRank) assert(baseObjRank >= 0 && baseObjRank < static_cast(m_baseObjects.size())); - float radius = m_baseObjects[baseObjRank].radius; - Math::Vector center(0.0f, 0.0f, 0.0f); - if (m_device->ComputeSphereVisibility(center, radius) == Gfx::FRUSTUM_PLANE_ALL) + const auto& sphere = m_baseObjects[baseObjRank].boundingSphere; + if (m_device->ComputeSphereVisibility(sphere.pos, sphere.radius) == Gfx::FRUSTUM_PLANE_ALL) { m_objects[objRank].visible = true; return true; diff --git a/src/graphics/engine/engine.h b/src/graphics/engine/engine.h index 27f01585..6adc9323 100644 --- a/src/graphics/engine/engine.h +++ b/src/graphics/engine/engine.h @@ -246,8 +246,8 @@ struct EngineBaseObject Math::Vector bboxMin; //! bounding box max (origin 0,0,0 always included) Math::Vector bboxMax; - //! Radius of the sphere at the origin - float radius = 0.0f; + //! A bounding sphere that contains all the vertices in this EngineBaseObject + Math::Sphere boundingSphere; //! Next tier (Tex) std::vector next; diff --git a/src/math/sphere.h b/src/math/sphere.h index a5121d0c..ea009332 100644 --- a/src/math/sphere.h +++ b/src/math/sphere.h @@ -44,4 +44,11 @@ inline float DistanceBetweenSpheres(const Sphere& sphere1, const Sphere& sphere2 return Math::Distance(sphere1.pos, sphere2.pos) - sphere1.radius - sphere2.radius; } +inline Sphere BoundingSphereForBox(Vector mins, Vector maxs) +{ + auto centroid = (maxs + mins) / 2.0f; + auto halfExtent = (maxs - centroid); + return Sphere{centroid, halfExtent.Length()}; +} + } // namespace Math From c445d7d9a9d2708d5c2c359899d6f37a20be286c Mon Sep 17 00:00:00 2001 From: AbigailBuccaneer Date: Sun, 29 Apr 2018 23:37:41 +0100 Subject: [PATCH 059/207] Add generic debug rendering functions Currently the engine can draw debug spheres to show crash sphere positions. This extends this to draw arbitrary spheres and cuboids, transformed arbitrarily. With these in place it's now very quick and easy to create a debug visualisation - for example, it's a one-line code change to render the bounding box or sphere of every EngineObject. --- src/graphics/engine/engine.cpp | 179 ++++++++++++++++++++------------- src/graphics/engine/engine.h | 14 ++- src/level/robotmain.cpp | 8 +- 3 files changed, 123 insertions(+), 78 deletions(-) diff --git a/src/graphics/engine/engine.cpp b/src/graphics/engine/engine.cpp index 23ed2108..8722f1af 100644 --- a/src/graphics/engine/engine.cpp +++ b/src/graphics/engine/engine.cpp @@ -3147,24 +3147,6 @@ void CEngine::ApplyChange() } } -void CEngine::ClearDisplayCrashSpheres() -{ - m_displayCrashSpheres.clear(); - - m_debugCrashSpheres = false; -} - -void CEngine::AddDisplayCrashSpheres(const std::vector& crashSpheres) -{ - for (const auto& crashSphere : crashSpheres) - { - m_displayCrashSpheres.push_back(crashSphere); - } - - m_debugCrashSpheres = true; -} - - /******************************************************* Rendering *******************************************************/ @@ -3483,8 +3465,7 @@ void CEngine::Draw3DScene() m_device->SetRenderState(RENDER_STATE_LIGHTING, false); - if (m_debugCrashSpheres) - DrawCrashSpheres(); + RenderPendingDebugDraws(); if (m_debugGoto) { @@ -3651,74 +3632,136 @@ void CEngine::DrawCaptured3DScene() m_device->DrawPrimitive(PRIMITIVE_TRIANGLE_STRIP, vertices, 4); } -void CEngine::DrawCrashSpheres() +void CEngine::RenderDebugSphere(const Math::Sphere& sphere, const Math::Matrix& transform, const Gfx::Color& color) { - Math::Matrix worldMatrix; - worldMatrix.LoadIdentity(); - m_device->SetTransform(TRANSFORM_WORLD, worldMatrix); + static constexpr int LONGITUDE_DIVISIONS = 16; + static constexpr int LATITUDE_DIVISIONS = 8; + static constexpr int NUM_LINE_STRIPS = 2 + LONGITUDE_DIVISIONS + LATITUDE_DIVISIONS; + static constexpr int VERTS_IN_LINE_STRIP = 32; - SetState(ENG_RSTATE_OPAQUE_COLOR); + static std::array verticesTemplate = []{ + std::array vertices; - static const int LINE_SEGMENTS = 32; - static const int LONGITUDE_DIVISIONS = 16; - static const int LATITUDE_DIVISIONS = 8; + auto SpherePoint = [&](float latitude, float longitude) + { + float latitudeAngle = (latitude - 0.5f) * 2.0f * Math::PI; + float longitudeAngle = longitude * 2.0f * Math::PI; + return Math::Vector(sinf(latitudeAngle) * cosf(longitudeAngle), + cosf(latitudeAngle), + sinf(latitudeAngle) * sinf(longitudeAngle)); + }; - std::vector lines((2 + LONGITUDE_DIVISIONS + LATITUDE_DIVISIONS) * LINE_SEGMENTS); - std::vector firsts(2 + LONGITUDE_DIVISIONS + LATITUDE_DIVISIONS); - std::vector counts(2 + LONGITUDE_DIVISIONS + LATITUDE_DIVISIONS); - - Color color(0.0f, 0.0f, 1.0f); - - auto SpherePoint = [&](float sphereRadius, float latitude, float longitude) - { - float latitudeAngle = (latitude - 0.5f) * 2.0f * Math::PI; - float longitudeAngle = longitude * 2.0f * Math::PI; - return Math::Vector(sphereRadius * sinf(latitudeAngle) * cosf(longitudeAngle), - sphereRadius * cosf(latitudeAngle), - sphereRadius * sinf(latitudeAngle) * sinf(longitudeAngle)); - }; - - for (const auto& crashSphere : m_displayCrashSpheres) - { - int i = 0; - int primitive = 0; + auto vert = vertices.begin(); for (int longitudeDivision = 0; longitudeDivision <= LONGITUDE_DIVISIONS; ++longitudeDivision) { - firsts[primitive] = i; - counts[primitive] = LINE_SEGMENTS; - - for (int segment = 0; segment < LINE_SEGMENTS; ++segment) + for (int segment = 0; segment < VERTS_IN_LINE_STRIP; ++segment) { - Math::Vector pos = crashSphere.pos; - float latitude = static_cast(segment) / LINE_SEGMENTS; + float latitude = static_cast(segment) / VERTS_IN_LINE_STRIP; float longitude = static_cast(longitudeDivision) / (LONGITUDE_DIVISIONS); - pos += SpherePoint(crashSphere.radius, latitude, longitude); - lines[i++] = VertexCol(pos, color); + *vert++ = SpherePoint(latitude, longitude); } - - primitive++; } for (int latitudeDivision = 0; latitudeDivision <= LATITUDE_DIVISIONS; ++latitudeDivision) { - firsts[primitive] = i; - counts[primitive] = LINE_SEGMENTS; - - for (int segment = 0; segment < LINE_SEGMENTS; ++segment) + for (int segment = 0; segment < VERTS_IN_LINE_STRIP; ++segment) { - Math::Vector pos = crashSphere.pos; float latitude = static_cast(latitudeDivision + 1) / (LATITUDE_DIVISIONS + 2); - float longitude = static_cast(segment) / LINE_SEGMENTS; - pos += SpherePoint(crashSphere.radius, latitude, longitude); - lines[i++] = VertexCol(pos, color); + float longitude = static_cast(segment) / VERTS_IN_LINE_STRIP; + *vert++ = SpherePoint(latitude, longitude); } - - primitive++; } + return vertices; + }(); - m_device->DrawPrimitives(PRIMITIVE_LINE_STRIP, lines.data(), firsts.data(), counts.data(), primitive); + + const int firstDraw = m_pendingDebugDraws.firsts.size(); + const int firstVert = m_pendingDebugDraws.vertices.size(); + + m_pendingDebugDraws.firsts.resize(m_pendingDebugDraws.firsts.size() + NUM_LINE_STRIPS); + m_pendingDebugDraws.counts.resize(m_pendingDebugDraws.counts.size() + NUM_LINE_STRIPS); + m_pendingDebugDraws.vertices.resize(m_pendingDebugDraws.vertices.size() + verticesTemplate.size()); + + for (int i = 0; i < NUM_LINE_STRIPS; ++i) + { + m_pendingDebugDraws.firsts[i + firstDraw] = firstVert + i * VERTS_IN_LINE_STRIP; } + + for (int i = 0; i < NUM_LINE_STRIPS; ++i) + { + m_pendingDebugDraws.counts[i + firstDraw] = VERTS_IN_LINE_STRIP; + } + + for (std::size_t i = 0; i < verticesTemplate.size(); ++i) + { + auto pos = Math::MatrixVectorMultiply(transform, sphere.pos + verticesTemplate[i] * sphere.radius); + m_pendingDebugDraws.vertices[i + firstVert] = VertexCol{pos, color}; + } +} + +void CEngine::RenderDebugBox(const Math::Vector& mins, const Math::Vector& maxs, const Math::Matrix& transform, const Gfx::Color& color) +{ + static constexpr int NUM_LINE_STRIPS = 4; + static constexpr int VERTS_IN_LINE_STRIP = 4; + + const int firstDraw = m_pendingDebugDraws.firsts.size(); + const int firstVert = m_pendingDebugDraws.vertices.size(); + + m_pendingDebugDraws.firsts.resize(m_pendingDebugDraws.firsts.size() + NUM_LINE_STRIPS); + m_pendingDebugDraws.counts.resize(m_pendingDebugDraws.counts.size() + NUM_LINE_STRIPS); + m_pendingDebugDraws.vertices.resize(m_pendingDebugDraws.vertices.size() + NUM_LINE_STRIPS * VERTS_IN_LINE_STRIP); + + for (int i = 0; i < NUM_LINE_STRIPS; ++i) + { + m_pendingDebugDraws.firsts[i + firstDraw] = firstVert + (i * VERTS_IN_LINE_STRIP); + } + + for (int i = 0; i < NUM_LINE_STRIPS; ++i) + { + m_pendingDebugDraws.counts[i + firstDraw] = NUM_LINE_STRIPS; + } + + auto vert = m_pendingDebugDraws.vertices.begin() + firstVert; + + *vert++ = VertexCol{Math::MatrixVectorMultiply(transform, Math::Vector{mins.x, mins.y, mins.z}), color}; + *vert++ = VertexCol{Math::MatrixVectorMultiply(transform, Math::Vector{maxs.x, mins.y, mins.z}), color}; + *vert++ = VertexCol{Math::MatrixVectorMultiply(transform, Math::Vector{maxs.x, maxs.y, mins.z}), color}; + *vert++ = VertexCol{Math::MatrixVectorMultiply(transform, Math::Vector{maxs.x, maxs.y, maxs.z}), color}; + + *vert++ = VertexCol{Math::MatrixVectorMultiply(transform, Math::Vector{mins.x, mins.y, maxs.z}), color}; + *vert++ = VertexCol{Math::MatrixVectorMultiply(transform, Math::Vector{mins.x, mins.y, mins.z}), color}; + *vert++ = VertexCol{Math::MatrixVectorMultiply(transform, Math::Vector{mins.x, maxs.y, mins.z}), color}; + *vert++ = VertexCol{Math::MatrixVectorMultiply(transform, Math::Vector{maxs.x, maxs.y, mins.z}), color}; + + *vert++ = VertexCol{Math::MatrixVectorMultiply(transform, Math::Vector{maxs.x, mins.y, maxs.z}), color}; + *vert++ = VertexCol{Math::MatrixVectorMultiply(transform, Math::Vector{mins.x, mins.y, maxs.z}), color}; + *vert++ = VertexCol{Math::MatrixVectorMultiply(transform, Math::Vector{mins.x, maxs.y, maxs.z}), color}; + *vert++ = VertexCol{Math::MatrixVectorMultiply(transform, Math::Vector{mins.x, maxs.y, mins.z}), color}; + + *vert++ = VertexCol{Math::MatrixVectorMultiply(transform, Math::Vector{maxs.x, mins.y, mins.z}), color}; + *vert++ = VertexCol{Math::MatrixVectorMultiply(transform, Math::Vector{maxs.x, mins.y, maxs.z}), color}; + *vert++ = VertexCol{Math::MatrixVectorMultiply(transform, Math::Vector{maxs.x, maxs.y, maxs.z}), color}; + *vert++ = VertexCol{Math::MatrixVectorMultiply(transform, Math::Vector{mins.x, maxs.y, maxs.z}), color}; +} + +void CEngine::RenderPendingDebugDraws() +{ + if (m_pendingDebugDraws.firsts.empty()) return; + + m_device->SetTransform(TRANSFORM_WORLD, Math::Matrix{}); + + SetState(ENG_RSTATE_OPAQUE_COLOR); + + m_device->DrawPrimitives(PRIMITIVE_LINE_STRIP, + m_pendingDebugDraws.vertices.data(), + m_pendingDebugDraws.firsts.data(), + m_pendingDebugDraws.counts.data(), + m_pendingDebugDraws.firsts.size()); + + m_pendingDebugDraws.firsts.clear(); + m_pendingDebugDraws.counts.clear(); + m_pendingDebugDraws.vertices.clear(); } void CEngine::RenderShadowMap() diff --git a/src/graphics/engine/engine.h b/src/graphics/engine/engine.h index 27f01585..f7f4db49 100644 --- a/src/graphics/engine/engine.h +++ b/src/graphics/engine/engine.h @@ -1161,8 +1161,8 @@ public: //! Updates the scene after a change of parameters void ApplyChange(); - void ClearDisplayCrashSpheres(); - void AddDisplayCrashSpheres(const std::vector& crashSpheres); + void RenderDebugSphere(const Math::Sphere&, const Math::Matrix& transform = Math::Matrix{}, const Color& = Color{0.0f, 0.0f, 1.0f, 1.0f}); + void RenderDebugBox(const Math::Vector& mins, const Math::Vector& maxs, const Math::Matrix& transform = Math::Matrix{}, const Color& = Color{0.0f, 0.0f, 1.0f, 1.0f}); void SetDebugLights(bool debugLights); bool GetDebugLights(); @@ -1228,7 +1228,7 @@ protected: void DrawStats(); //! Draw mission timer void DrawTimer(); - void DrawCrashSpheres(); + void RenderPendingDebugDraws(); //! Creates a new tier 2 object (texture) EngineBaseObjTexTier& AddLevel2(EngineBaseObject& p1, const std::string& tex1Name, const std::string& tex2Name); @@ -1406,6 +1406,13 @@ protected: Texture m_shadowMap; + struct + { + std::vector vertices; + std::vector firsts; + std::vector counts; + } m_pendingDebugDraws; + //! Ranks of highlighted objects int m_highlightRank[100]; //! Highlight visible? @@ -1479,7 +1486,6 @@ protected: std::unordered_map m_staticMeshBaseObjects; - std::vector m_displayCrashSpheres; std::vector> m_displayGoto; std::unique_ptr m_displayGotoImage; diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp index 5e49cc68..24e944c7 100644 --- a/src/level/robotmain.cpp +++ b/src/level/robotmain.cpp @@ -5949,18 +5949,14 @@ void CRobotMain::SetCodeBattleSpectatorMode(bool mode) void CRobotMain::UpdateDebugCrashSpheres() { - m_engine->ClearDisplayCrashSpheres(); if (m_debugCrashSpheres) { for (CObject* obj : m_objMan->GetAllObjects()) { - auto crashSpheres = obj->GetAllCrashSpheres(); - std::vector displaySpheres; - for (const auto& crashSphere : crashSpheres) + for (const auto& crashSphere : obj->GetAllCrashSpheres()) { - displaySpheres.push_back(crashSphere.sphere); + m_engine->RenderDebugSphere(crashSphere.sphere, Math::Matrix{}, Gfx::Color{0.0f, 0.0f, 1.0f, 1.0f}); } - m_engine->AddDisplayCrashSpheres(displaySpheres); } } } From 6f6cfb136a9359f0be6391a90ec21e6d621e5025 Mon Sep 17 00:00:00 2001 From: AbigailBuccaneer Date: Fri, 27 Apr 2018 11:16:45 +0100 Subject: [PATCH 060/207] Batch draw calls from CText to improve performance This significantly speeds up text rendering. On my computer, looking at the program editor with a full screen of text, this commit takes the framerate from under 30 to 60 (hitting vsync). Performance could be further improved in the gl33 renderer by using instancing or glPrimitiveRestartIndex instead of glMultiDrawArrays, but that would be a more invasive change. All of the interface rendering could use a unified quad batching system, instead of it being limited to CText, but that would require some refactoring in CText as it currently draws using a different coordinate space to the rest of the interface. Fixes #1104. --- src/graphics/engine/text.cpp | 104 +++++++++++++++++++++++++++++------ src/graphics/engine/text.h | 3 + 2 files changed, 90 insertions(+), 17 deletions(-) diff --git a/src/graphics/engine/text.cpp b/src/graphics/engine/text.cpp index edf3c50d..0ecd5820 100644 --- a/src/graphics/engine/text.cpp +++ b/src/graphics/engine/text.cpp @@ -94,6 +94,77 @@ const Math::IntPoint REFERENCE_SIZE(800, 600); const Math::IntPoint FONT_TEXTURE_SIZE(256, 256); } // anonymous namespace +/// The QuadBatch is responsible for collecting as many quad (aka rectangle) draws as possible and +/// sending them to the CDevice in one big batch. This avoids making one CDevice::DrawPrimitive call +/// for every CText::DrawCharAndAdjustPos call, which makes text rendering much faster. +/// Currently we only collect textured quads (ie. ones using Vertex), not untextured quads (which +/// use VertexCol). Untextured quads are only drawn via DrawHighlight, which happens much less often +/// than drawing textured quads. +class CText::CQuadBatch +{ +public: + explicit CQuadBatch(CEngine& engine) + : m_engine(engine) + { + m_quads.reserve(1024); + } + + /// Add a quad to be rendered. + /// This may trigger a call to Flush() if necessary. + void Add(Vertex vertices[4], unsigned int texID, EngineRenderState renderState, Color color) + { + if (texID != m_texID || renderState != m_renderState || color != m_color) + { + Flush(); + m_texID = texID; + m_renderState = renderState; + m_color = color; + } + m_quads.emplace_back(Quad{{vertices[0], vertices[1], vertices[2], vertices[3]}}); + } + + /// Draw all pending quads immediately. + void Flush() + { + if (m_quads.empty()) return; + + m_engine.SetState(m_renderState); + m_engine.GetDevice()->SetTexture(0, m_texID); + + assert(m_firsts.size() == m_counts.size()); + if (m_firsts.size() < m_quads.size()) + { + // m_firsts needs to look like { 0, 4, 8, 12, ... } + // m_counts needs to look like { 4, 4, 4, 4, ... } + // and both need to be the same length as m_quads + m_counts.resize(m_quads.size(), 4); + std::size_t begin = m_firsts.size(); + m_firsts.resize(m_quads.size()); + for (std::size_t i = begin; i < m_firsts.size(); ++i) + { + m_firsts[i] = static_cast(4 * i); + } + } + + const Vertex* vertices = m_quads.front().vertices; + m_engine.GetDevice()->DrawPrimitives(PRIMITIVE_TRIANGLE_STRIP, vertices, m_firsts.data(), + m_counts.data(), static_cast(m_quads.size()), m_color); + m_engine.AddStatisticTriangle(static_cast(m_quads.size() * 2)); + m_quads.clear(); + } +private: + CEngine& m_engine; + + struct Quad { Vertex vertices[4]; }; + std::vector m_quads; + std::vector m_firsts; + std::vector m_counts; + + Color m_color; + unsigned int m_texID{}; + EngineRenderState m_renderState{}; +}; + CText::CText(CEngine* engine) { @@ -106,6 +177,8 @@ CText::CText(CEngine* engine) m_lastFontType = FONT_COLOBOT; m_lastFontSize = 0; m_lastCachedFont = nullptr; + + m_quadBatch = MakeUnique(*engine); } CText::~CText() @@ -690,7 +763,6 @@ void CText::DrawString(const std::string &text, std::vector::itera std::vector::iterator end, float size, Math::IntPoint pos, int width, int eol, Color color) { - m_engine->SetState(ENG_RSTATE_TEXT); m_engine->SetWindowCoordinates(); int start = pos.x; @@ -756,6 +828,8 @@ void CText::DrawString(const std::string &text, std::vector::itera Math::IntPoint charSize; charSize.x = GetCharWidthInt(ch, font, size, offset); charSize.y = GetHeightInt(font, size); + // NB. for quad batching to improve highlight drawing performance, this code would have + // to be rearranged to draw all highlights before any characters are drawn. DrawHighlight(format[fmtIndex], pos, charSize); } @@ -777,6 +851,7 @@ void CText::DrawString(const std::string &text, std::vector::itera color = Color(1.0f, 0.0f, 0.0f); DrawCharAndAdjustPos(ch, font, size, pos, color); } + m_quadBatch->Flush(); m_engine->SetInterfaceCoordinates(); } @@ -845,8 +920,6 @@ void CText::DrawString(const std::string &text, FontType font, { assert(font != FONT_BUTTON); - m_engine->SetState(ENG_RSTATE_TEXT); - std::vector chars; StringToUTFCharList(text, chars); m_engine->SetWindowCoordinates(); @@ -854,6 +927,7 @@ void CText::DrawString(const std::string &text, FontType font, { DrawCharAndAdjustPos(*it, font, size, pos, color); } + m_quadBatch->Flush(); m_engine->SetInterfaceCoordinates(); } @@ -878,6 +952,8 @@ void CText::DrawHighlight(FontMetaChar hl, Math::IntPoint pos, Math::IntPoint si return; } + m_quadBatch->Flush(); + Math::IntPoint vsize = m_engine->GetWindowSize(); float h = 0.0f; if (vsize.y <= 768.0f) // 1024x768 or less? @@ -927,22 +1003,22 @@ void CText::DrawCharAndAdjustPos(UTF8Char ch, FontType font, float size, Math::I // For whatever reason ch.c1 is a SIGNED char, we need to fix that unsigned char icon = static_cast(ch.c1); + + unsigned int texID; + if ( icon >= 128 ) { icon -= 128; - m_engine->SetTexture("textures/interface/button3.png"); - m_engine->SetState(ENG_RSTATE_TTEXTURE_WHITE); + texID = m_engine->LoadTexture("textures/interface/button3.png").id; } else if ( icon >= 64 ) { icon -= 64; - m_engine->SetTexture("textures/interface/button2.png"); - m_engine->SetState(ENG_RSTATE_TTEXTURE_WHITE); + texID = m_engine->LoadTexture("textures/interface/button2.png").id; } else { - m_engine->SetTexture("textures/interface/button1.png"); - m_engine->SetState(ENG_RSTATE_TTEXTURE_WHITE); + texID = m_engine->LoadTexture("textures/interface/button1.png").id; } Math::Point uv1, uv2; @@ -965,13 +1041,9 @@ void CText::DrawCharAndAdjustPos(UTF8Char ch, FontType font, float size, Math::I Vertex(Math::Vector(p2.x, p1.y, 0.0f), n, Math::Point(uv2.x, uv1.y)) }; - m_device->DrawPrimitive(PRIMITIVE_TRIANGLE_STRIP, quad, 4, color); - m_engine->AddStatisticTriangle(2); + m_quadBatch->Add(quad, texID, ENG_RSTATE_TTEXTURE_WHITE, color); pos.x += width; - - // Don't forget to restore the state! - m_engine->SetState(ENG_RSTATE_TEXT); } else { @@ -1007,9 +1079,7 @@ void CText::DrawCharAndAdjustPos(UTF8Char ch, FontType font, float size, Math::I Vertex(Math::Vector(p2.x, p1.y, 0.0f), n, Math::Point(texCoord2.x, texCoord1.y)) }; - m_device->SetTexture(0, tex.id); - m_device->DrawPrimitive(PRIMITIVE_TRIANGLE_STRIP, quad, 4, color); - m_engine->AddStatisticTriangle(2); + m_quadBatch->Add(quad, tex.id, ENG_RSTATE_TEXT, color); pos.x += tex.charSize.x * width; } diff --git a/src/graphics/engine/text.h b/src/graphics/engine/text.h index 47538700..40fb90fa 100644 --- a/src/graphics/engine/text.h +++ b/src/graphics/engine/text.h @@ -344,6 +344,9 @@ protected: FontType m_lastFontType; int m_lastFontSize; CachedFont* m_lastCachedFont; + + class CQuadBatch; + std::unique_ptr m_quadBatch; }; From a918fcabb4ee53bb3cab9a1c91ab55835df21944 Mon Sep 17 00:00:00 2001 From: melex750 Date: Mon, 30 Apr 2018 13:43:03 -0400 Subject: [PATCH 061/207] Fix save/load NewScript programs for factory bots Fixes #797 --- src/level/robotmain.cpp | 2 +- src/object/auto/autofactory.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp index 5e49cc68..9464c42d 100644 --- a/src/level/robotmain.cpp +++ b/src/level/robotmain.cpp @@ -3633,7 +3633,7 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject) if (line->GetCommand() == "NewScript" && !resetObject) { - m_newScriptName.push_back(NewScriptName(line->GetParam("type")->AsObjectType(OBJECT_NULL), const_cast(line->GetParam("name")->AsPath("ai").c_str()))); + m_newScriptName.push_back(NewScriptName(line->GetParam("type")->AsObjectType(OBJECT_NULL), line->GetParam("name")->AsString(""))); continue; } diff --git a/src/object/auto/autofactory.cpp b/src/object/auto/autofactory.cpp index 5da54545..343d57b9 100644 --- a/src/object/auto/autofactory.cpp +++ b/src/object/auto/autofactory.cpp @@ -667,7 +667,7 @@ bool CAutoFactory::CreateVehicle() for (const std::string& name : m_main->GetNewScriptNames(m_type)) { Program* prog = programStorage->AddProgram(); - programStorage->ReadProgram(prog, InjectLevelPathsForCurrentLevel(name)); + programStorage->ReadProgram(prog, InjectLevelPathsForCurrentLevel(name, "ai")); prog->readOnly = true; prog->filename = name; } From 38a34829af5b982900656b54cdfc8d80391e62e7 Mon Sep 17 00:00:00 2001 From: krzys-h Date: Tue, 1 May 2018 21:27:49 +0200 Subject: [PATCH 062/207] Fix code style in #1150 --- src/graphics/engine/engine.cpp | 3 ++- src/graphics/engine/engine.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/graphics/engine/engine.cpp b/src/graphics/engine/engine.cpp index 8722f1af..adafccac 100644 --- a/src/graphics/engine/engine.cpp +++ b/src/graphics/engine/engine.cpp @@ -3639,7 +3639,8 @@ void CEngine::RenderDebugSphere(const Math::Sphere& sphere, const Math::Matrix& static constexpr int NUM_LINE_STRIPS = 2 + LONGITUDE_DIVISIONS + LATITUDE_DIVISIONS; static constexpr int VERTS_IN_LINE_STRIP = 32; - static std::array verticesTemplate = []{ + static std::array verticesTemplate = [] + { std::array vertices; auto SpherePoint = [&](float latitude, float longitude) diff --git a/src/graphics/engine/engine.h b/src/graphics/engine/engine.h index f7f4db49..ed279fbe 100644 --- a/src/graphics/engine/engine.h +++ b/src/graphics/engine/engine.h @@ -1406,7 +1406,7 @@ protected: Texture m_shadowMap; - struct + struct PendingDebugDraw { std::vector vertices; std::vector firsts; From 0d6fffd91f28ef837c86bad7c3b646cf3c3cb230 Mon Sep 17 00:00:00 2001 From: AbigailBuccaneer Date: Wed, 2 May 2018 16:30:45 +0100 Subject: [PATCH 063/207] Improve shadow quality and performance in gl33 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If CONFIG_QUALITY_SHADOWS is defined (which it always is) then the fragment shader code that samples the shadow map will take five samples in a cross shape around the point to be sampled, to apply antialiasing. Currently, the offset of these samples is hardcoded to 0.00025× the shadow map resolution. This is very inconsistent: if the shadow map resolution is 128×128, then these samples are 0.032 texels apart, which is a waste of four texture samples, and essentially means that no antialiasing is applied. If the shadow map resolution is 8192×8192, then these samples are 2.048 texels apart, which causes visual artefacts around shadow edges, instead of giving smoother shadows. The correct thing to do is to always sample exactly one texel away from the original position. This is easy in GLSL 3.30, as it includes a textureOffset function which offsets a texture fetch by an exact number of texels. This is faster than manually calculating an offset ourselves, it fixes visual artefacts at high resolutions, and it properly applies antialiasing at low resolutions. --- .../opengl/shaders/gl33/fs_normal.glsl | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/graphics/opengl/shaders/gl33/fs_normal.glsl b/src/graphics/opengl/shaders/gl33/fs_normal.glsl index 2827d7a2..e6fd1e07 100644 --- a/src/graphics/opengl/shaders/gl33/fs_normal.glsl +++ b/src/graphics/opengl/shaders/gl33/fs_normal.glsl @@ -96,19 +96,15 @@ void main() if (uni_ShadowTextureEnabled) { + float value = texture(uni_ShadowTexture, data.ShadowCoord.xyz); #ifdef CONFIG_QUALITY_SHADOWS - float offset = 0.00025f; - - float value = (1.0f / 5.0f) * (texture(uni_ShadowTexture, data.ShadowCoord.xyz) - + texture(uni_ShadowTexture, data.ShadowCoord.xyz + vec3( offset, 0.0f, 0.0f)) - + texture(uni_ShadowTexture, data.ShadowCoord.xyz + vec3(-offset, 0.0f, 0.0f)) - + texture(uni_ShadowTexture, data.ShadowCoord.xyz + vec3( 0.0f, offset, 0.0f)) - + texture(uni_ShadowTexture, data.ShadowCoord.xyz + vec3( 0.0f, -offset, 0.0f))); - - shadow = mix(uni_ShadowColor, 1.0f, value); -#else - shadow = mix(uni_ShadowColor, 1.0f, texture(uni_ShadowTexture, data.ShadowCoord.xyz)); + value += textureOffset(uni_ShadowTexture, data.ShadowCoord.xyz, ivec2( 1, 0)) + + textureOffset(uni_ShadowTexture, data.ShadowCoord.xyz, ivec2(-1, 0)) + + textureOffset(uni_ShadowTexture, data.ShadowCoord.xyz, ivec2( 0, 1)) + + textureOffset(uni_ShadowTexture, data.ShadowCoord.xyz, ivec2( 0,-1)); + value = value * (1.0f / 5.0f); #endif + shadow = mix(uni_ShadowColor, 1.0f, value); } vec4 result = uni_AmbientColor * ambient From abeb7fceb22edd26aeead17a6e572efd7edcc8ae Mon Sep 17 00:00:00 2001 From: AbigailBuccaneer Date: Fri, 4 May 2018 10:21:31 +0100 Subject: [PATCH 064/207] Fix shadow shimmering Shadow shimmering is a visual artefact where the outlines of shadow mapped objects don't stay stable when the camera is moved or rotated. The reason is that as the shadow map's origin moves, the objects rendered to the shadow map have temporal aliasing around their edges. The solution is to only move the shadow map in texel-sized increments. Because the shadow map's projection is orthographic, moving the shadow map origin in texel increments ensures that objects that aren't moving don't show any temporal aliasing, as the position of the samples of the object in worldspace stay the same. --- src/graphics/engine/engine.cpp | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/graphics/engine/engine.cpp b/src/graphics/engine/engine.cpp index 23ed2108..d626d293 100644 --- a/src/graphics/engine/engine.cpp +++ b/src/graphics/engine/engine.cpp @@ -3819,9 +3819,23 @@ void CEngine::RenderShadowMap() Math::Vector pos = m_lookatPt + 0.25f * dist * dir; - pos.x = round(pos.x); - pos.y = round(pos.y); - pos.z = round(pos.z); + { + // To prevent 'shadow shimmering', we ensure that the position only moves in texel-sized + // increments. To do this we transform the position to a space where the light's forward/right/up + // axes are aligned with the x/y/z axes (not necessarily in that order, and +/- signs don't matter). + Math::Matrix lightRotation; + Math::LoadViewMatrix(lightRotation, Math::Vector{}, lightDir, worldUp); + pos = Math::MatrixVectorMultiply(lightRotation, pos); + // ...then we round to the nearest worldUnitsPerTexel: + const float worldUnitsPerTexel = (dist * 2.0f) / m_shadowMap.size.x; + pos /= worldUnitsPerTexel; + pos.x = round(pos.x); + pos.y = round(pos.y); + pos.z = round(pos.z); + pos *= worldUnitsPerTexel; + // ...and convert back to world space. + pos = Math::MatrixVectorMultiply(lightRotation.Inverse(), pos); + } Math::Vector lookAt = pos - lightDir; From 6ccf32ec68f8d3dda5625f90b30cf6960f6e5ccf Mon Sep 17 00:00:00 2001 From: krzys-h Date: Mon, 7 May 2018 20:28:31 +0200 Subject: [PATCH 065/207] fixup! Fix code style in #1150 --- src/graphics/engine/engine.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/graphics/engine/engine.h b/src/graphics/engine/engine.h index ed279fbe..3c9546f6 100644 --- a/src/graphics/engine/engine.h +++ b/src/graphics/engine/engine.h @@ -1411,7 +1411,8 @@ protected: std::vector vertices; std::vector firsts; std::vector counts; - } m_pendingDebugDraws; + } + m_pendingDebugDraws; //! Ranks of highlighted objects int m_highlightRank[100]; From 1d09ee9b3c3497b03a78c2e4b32bb13b5ad32b33 Mon Sep 17 00:00:00 2001 From: krzys-h Date: Mon, 7 May 2018 20:21:57 +0200 Subject: [PATCH 066/207] Fix transportable object damage rules This makes the rules match the original Colobot like they were supposed to --- src/object/old_object.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/object/old_object.cpp b/src/object/old_object.cpp index d8d15197..10e6b003 100644 --- a/src/object/old_object.cpp +++ b/src/object/old_object.cpp @@ -358,7 +358,12 @@ bool COldObject::DamageObject(DamageType type, float force, CObject* killer) else if ( Implements(ObjectInterfaceType::Fragile) ) { if ( m_type == OBJECT_BOMB && type != DamageType::Explosive ) return false; // Mine can't be destroyed by shooting - if ( m_type == OBJECT_URANIUM ) return false; // UraniumOre is not destroyable (see #777) + if ( m_type == OBJECT_URANIUM && (type == DamageType::Fire || type == DamageType::Organic) ) return false; // UraniumOre is not destroyable by shooting or aliens (see #777) + if ( m_type == OBJECT_STONE && (type == DamageType::Fire || type == DamageType::Organic) ) return false; // TitaniumOre is not destroyable either + // PowerCell, NuclearCell and Titanium are destroyable by shooting, but not by collisions! + if ( m_type == OBJECT_METAL && type == DamageType::Collision ) return false; + if ( m_type == OBJECT_POWER && type == DamageType::Collision ) return false; + if ( m_type == OBJECT_NUCLEAR && type == DamageType::Collision ) return false; DestroyObject(DestructionType::Explosion, killer); return true; From 36d2cf14b8432ac54571fab98c2a92a25751fd2b Mon Sep 17 00:00:00 2001 From: krzys-h Date: Mon, 7 May 2018 20:23:53 +0200 Subject: [PATCH 067/207] Make magnifyDamage influence fragile objects --- src/object/old_object.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/object/old_object.cpp b/src/object/old_object.cpp index 10e6b003..80b65c4d 100644 --- a/src/object/old_object.cpp +++ b/src/object/old_object.cpp @@ -365,6 +365,8 @@ bool COldObject::DamageObject(DamageType type, float force, CObject* killer) if ( m_type == OBJECT_POWER && type == DamageType::Collision ) return false; if ( m_type == OBJECT_NUCLEAR && type == DamageType::Collision ) return false; + if ( m_magnifyDamage * m_main->GetGlobalMagnifyDamage() == 0 ) return false; // Don't destroy if magnifyDamage=0 + DestroyObject(DestructionType::Explosion, killer); return true; } From 6e273e7e3356b7f44f9ce5500addb07fc1cb1561 Mon Sep 17 00:00:00 2001 From: krzys-h Date: Mon, 7 May 2018 20:51:44 +0200 Subject: [PATCH 068/207] Declare CBotVar::m_token as const --- src/CBot/CBotVar/CBotVar.cpp | 14 +++++++++++--- src/CBot/CBotVar/CBotVar.h | 2 +- src/CBot/CBotVar/CBotVarArray.cpp | 3 +-- src/CBot/CBotVar/CBotVarClass.cpp | 3 +-- src/CBot/CBotVar/CBotVarPointer.cpp | 3 +-- 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/src/CBot/CBotVar/CBotVar.cpp b/src/CBot/CBotVar/CBotVar.cpp index 836b2a7d..a0bf3597 100644 --- a/src/CBot/CBotVar/CBotVar.cpp +++ b/src/CBot/CBotVar/CBotVar.cpp @@ -49,7 +49,7 @@ namespace CBot long CBotVar::m_identcpt = 0; //////////////////////////////////////////////////////////////////////////////// -CBotVar::CBotVar( ) +CBotVar::CBotVar( ) : m_token(nullptr) { m_pMyThis = nullptr; m_pUserPtr = nullptr; @@ -62,9 +62,17 @@ CBotVar::CBotVar( ) m_mPrivate = ProtectionLevel::Public; } -CBotVar::CBotVar(const CBotToken &name) : CBotVar() +CBotVar::CBotVar(const CBotToken &name) : m_token(new CBotToken(name)) { - m_token = new CBotToken(name); + m_pMyThis = nullptr; + m_pUserPtr = nullptr; + m_InitExpr = nullptr; + m_LimExpr = nullptr; + m_type = -1; + m_binit = InitType::UNDEF; + m_ident = 0; + m_bStatic = false; + m_mPrivate = ProtectionLevel::Public; } //////////////////////////////////////////////////////////////////////////////// diff --git a/src/CBot/CBotVar/CBotVar.h b/src/CBot/CBotVar/CBotVar.h index 1a2bff76..8801621d 100644 --- a/src/CBot/CBotVar/CBotVar.h +++ b/src/CBot/CBotVar/CBotVar.h @@ -650,7 +650,7 @@ public: protected: //! The corresponding token, defines the variable name - CBotToken* m_token; + CBotToken* const m_token; //! Type of value. CBotTypResult m_type; //! Initialization status diff --git a/src/CBot/CBotVar/CBotVarArray.cpp b/src/CBot/CBotVar/CBotVarArray.cpp index 207b0f45..ff89920b 100644 --- a/src/CBot/CBotVar/CBotVarArray.cpp +++ b/src/CBot/CBotVar/CBotVarArray.cpp @@ -31,12 +31,11 @@ namespace CBot { //////////////////////////////////////////////////////////////////////////////// -CBotVarArray::CBotVarArray(const CBotToken& name, CBotTypResult& type) +CBotVarArray::CBotVarArray(const CBotToken& name, CBotTypResult& type) : CBotVar(name) { if ( !type.Eq(CBotTypArrayPointer) && !type.Eq(CBotTypArrayBody)) assert(0); - m_token = new CBotToken(name); m_next = nullptr; m_pMyThis = nullptr; m_pUserPtr = nullptr; diff --git a/src/CBot/CBotVar/CBotVarClass.cpp b/src/CBot/CBotVar/CBotVarClass.cpp index de3d274f..0f5349de 100644 --- a/src/CBot/CBotVar/CBotVarClass.cpp +++ b/src/CBot/CBotVar/CBotVarClass.cpp @@ -36,7 +36,7 @@ namespace CBot std::set CBotVarClass::m_instances{}; //////////////////////////////////////////////////////////////////////////////// -CBotVarClass::CBotVarClass(const CBotToken& name, const CBotTypResult& type) +CBotVarClass::CBotVarClass(const CBotToken& name, const CBotTypResult& type) : CBotVar(name) { if ( !type.Eq(CBotTypClass) && !type.Eq(CBotTypIntrinsic) && // by convenience there accepts these types @@ -44,7 +44,6 @@ CBotVarClass::CBotVarClass(const CBotToken& name, const CBotTypResult& type) !type.Eq(CBotTypArrayPointer) && !type.Eq(CBotTypArrayBody)) assert(0); - m_token = new CBotToken(name); m_next = nullptr; m_pMyThis = nullptr; m_pUserPtr = OBJECTCREATED;//nullptr; diff --git a/src/CBot/CBotVar/CBotVarPointer.cpp b/src/CBot/CBotVar/CBotVarPointer.cpp index f98b1463..71c9a4d5 100644 --- a/src/CBot/CBotVar/CBotVarPointer.cpp +++ b/src/CBot/CBotVar/CBotVarPointer.cpp @@ -32,14 +32,13 @@ namespace CBot { //////////////////////////////////////////////////////////////////////////////// -CBotVarPointer::CBotVarPointer(const CBotToken& name, CBotTypResult& type) +CBotVarPointer::CBotVarPointer(const CBotToken& name, CBotTypResult& type) : CBotVar(name) { if ( !type.Eq(CBotTypPointer) && !type.Eq(CBotTypNullPointer) && !type.Eq(CBotTypClass) && // for convenience accepts Class and Intrinsic !type.Eq(CBotTypIntrinsic) ) assert(0); - m_token = new CBotToken(name); m_next = nullptr; m_pMyThis = nullptr; m_pUserPtr = nullptr; From db72a3631593757c003da16f0a9056b0ce47dfde Mon Sep 17 00:00:00 2001 From: krzys-h Date: Tue, 8 May 2018 19:44:24 +0200 Subject: [PATCH 069/207] Fix code style --- src/CBot/CBotToken.cpp | 12 +++++++----- src/level/parser/parserparam.cpp | 4 ++-- src/level/scoreboard.h | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/CBot/CBotToken.cpp b/src/CBot/CBotToken.cpp index 9663e299..ea31fad9 100644 --- a/src/CBot/CBotToken.cpp +++ b/src/CBot/CBotToken.cpp @@ -26,7 +26,8 @@ namespace CBot { -namespace { +namespace +{ template boost::bimap makeBimap(std::initializer_list::value_type> list) { @@ -449,10 +450,11 @@ std::unique_ptr CBotToken::CompileTokens(const std::string& program) //////////////////////////////////////////////////////////////////////////////// int CBotToken::GetKeyWord(const std::string& w) { - auto it = KEYWORDS.right.find(w); - if (it != KEYWORDS.right.end()) { - return it->second; - } + auto it = KEYWORDS.right.find(w); + if (it != KEYWORDS.right.end()) + { + return it->second; + } return -1; } diff --git a/src/level/parser/parserparam.cpp b/src/level/parser/parserparam.cpp index 751654c2..48cc9ae8 100644 --- a/src/level/parser/parserparam.cpp +++ b/src/level/parser/parserparam.cpp @@ -957,9 +957,9 @@ int CLevelParserParam::AsResearchFlag(int def) SortType CLevelParserParam::ToSortType(std::string value) { - if (value == "Points" ) return SortType::SORT_POINTS; + if (value == "Points") return SortType::SORT_POINTS; if (value == "Name" ) return SortType::SORT_ID; - return SortType::SORT_ID; + return SortType::SORT_ID; } SortType CLevelParserParam::AsSortType() diff --git a/src/level/scoreboard.h b/src/level/scoreboard.h index c9be19fb..7ed67ad1 100644 --- a/src/level/scoreboard.h +++ b/src/level/scoreboard.h @@ -39,7 +39,7 @@ class CObject; struct Score { int points = 0; //! Team score - float time = 0; //! Time when points were scored + float time = 0; //! Time when points were scored }; enum class SortType From dd40c4d4eef164e36dd27e0db083566422a58479 Mon Sep 17 00:00:00 2001 From: krzys-h Date: Tue, 8 May 2018 19:54:25 +0200 Subject: [PATCH 070/207] Make magnifyDamage=0 for fragile objects actually work This fixes a bug in 36d2cf14b8432ac54571fab98c2a92a25751fd2b --- src/object/old_object.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/object/old_object.cpp b/src/object/old_object.cpp index 80b65c4d..23a303aa 100644 --- a/src/object/old_object.cpp +++ b/src/object/old_object.cpp @@ -1089,6 +1089,10 @@ void COldObject::Read(CLevelParserLine* line) { SetRange(line->GetParam("range")->AsFloat(30.0f)); } + if (Implements(ObjectInterfaceType::Fragile)) + { + SetMagnifyDamage(line->GetParam("magnifyDamage")->AsFloat(1.0f)); // TODO: This is a temporary hack for now - CFragileObject doesn't have SetMagnifyDamage ~krzys_h + } if (Implements(ObjectInterfaceType::Shielded)) { SetShield(line->GetParam("shield")->AsFloat(1.0f)); From 05bdd74bef0d65c532bce50d241ba6d0603b056a Mon Sep 17 00:00:00 2001 From: krzys-h Date: Tue, 8 May 2018 20:27:11 +0200 Subject: [PATCH 071/207] Update data submodule --- data | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data b/data index b2792c32..10b07763 160000 --- a/data +++ b/data @@ -1 +1 @@ -Subproject commit b2792c325a6e6871311207559199f77f35bbe524 +Subproject commit 10b07763fb68f53840d402ad36817e86603c63a6 From f03c3dbc10d7052bd28556b044ad0edfd778350e Mon Sep 17 00:00:00 2001 From: krzys-h Date: Tue, 8 May 2018 23:44:23 +0200 Subject: [PATCH 072/207] Implement ScoreboardObjectRule --- src/level/robotmain.cpp | 11 +++++++++++ src/level/scene_conditions.cpp | 24 ++++++++++++------------ src/level/scene_conditions.h | 7 +++---- src/level/scoreboard.cpp | 28 ++++++++++++++++++++++++++++ src/level/scoreboard.h | 22 ++++++++++++++++++++++ 5 files changed, 76 insertions(+), 16 deletions(-) diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp index ceb8daa9..441b244d 100644 --- a/src/level/robotmain.cpp +++ b/src/level/robotmain.cpp @@ -2527,6 +2527,8 @@ bool CRobotMain::EventFrame(const Event &event) { CheckEndMission(true); UpdateAudio(true); + if (m_scoreboard) + m_scoreboard->UpdateObjectCount(); } if (m_winDelay > 0.0f && !m_editLock) @@ -3608,6 +3610,15 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject) m_scoreboard->AddKillRule(std::move(rule)); continue; } + if (line->GetCommand() == "ScoreboardObjectRule" && !resetObject) + { + if (!m_scoreboard) + throw CLevelParserException("ScoreboardObjectRule encountered but scoreboard is not enabled"); + auto rule = MakeUnique(); + rule->Read(line.get()); + m_scoreboard->AddObjectRule(std::move(rule)); + continue; + } if (line->GetCommand() == "ScoreboardEndTakeRule" && !resetObject) { if (!m_scoreboard) diff --git a/src/level/scene_conditions.cpp b/src/level/scene_conditions.cpp index 3ab32dac..263ee399 100644 --- a/src/level/scene_conditions.cpp +++ b/src/level/scene_conditions.cpp @@ -112,6 +112,18 @@ bool CObjectCondition::CheckForObject(CObject* obj) return false; } +int CObjectCondition::CountObjects() +{ + int nb = 0; + for (CObject* obj : CObjectManager::GetInstancePointer()->GetAllObjects()) + { + if (!obj->GetActive()) continue; + if (!CheckForObject(obj)) continue; + nb ++; + } + return nb; +} + void CSceneCondition::Read(CLevelParserLine* line) { CObjectCondition::Read(line); @@ -124,18 +136,6 @@ void CSceneCondition::Read(CLevelParserLine* line) this->max = line->GetParam("max")->AsInt(9999); } -int CSceneCondition::CountObjects() -{ - int nb = 0; - for (CObject* obj : CObjectManager::GetInstancePointer()->GetAllObjects()) - { - if (!obj->GetActive()) continue; - if (!CheckForObject(obj)) continue; - nb ++; - } - return nb; -} - bool CSceneCondition::Check() { int nb = CountObjects(); diff --git a/src/level/scene_conditions.h b/src/level/scene_conditions.h index 412a45b3..218c668d 100644 --- a/src/level/scene_conditions.h +++ b/src/level/scene_conditions.h @@ -58,6 +58,9 @@ public: //! Checks if this condition is met bool CheckForObject(CObject* obj); + + //! Count all object matching the conditions + int CountObjects(); }; /** @@ -75,10 +78,6 @@ public: //! Checks if this condition is met bool Check(); - -protected: - //! Count all object matching the conditions - int CountObjects(); }; /** diff --git a/src/level/scoreboard.cpp b/src/level/scoreboard.cpp index bfadc4d0..0c2f5d87 100644 --- a/src/level/scoreboard.cpp +++ b/src/level/scoreboard.cpp @@ -43,6 +43,13 @@ void CScoreboard::CScoreboardKillRule::Read(CLevelParserLine* line) CObjectCondition::Read(line); } +void CScoreboard::CScoreboardObjectRule::Read(CLevelParserLine* line) +{ + CScoreboardRule::Read(line); + CObjectCondition::Read(line); + this->winTeam = line->GetParam("winTeam")->AsInt(); +} + void CScoreboard::CScoreboardEndTakeRule::Read(CLevelParserLine* line) { CScoreboardRule::Read(line); @@ -55,6 +62,11 @@ void CScoreboard::AddKillRule(std::unique_ptr rule) m_rulesKill.push_back(std::move(rule)); } +void CScoreboard::AddObjectRule(std::unique_ptr rule) +{ + m_rulesObject.push_back(std::move(rule)); +} + void CScoreboard::AddEndTakeRule(std::unique_ptr rule) { m_rulesEndTake.push_back(std::move(rule)); @@ -75,6 +87,22 @@ void CScoreboard::ProcessKill(CObject* target, CObject* killer) } } +void CScoreboard::UpdateObjectCount() +{ + for (auto& rule : m_rulesObject) + { + assert(rule->winTeam != 0); + int count = rule->CountObjects(); + int countDiff = count - rule->lastCount; + printf("%d %d\n", count, countDiff); + if (countDiff != 0) + { + rule->lastCount = count; + AddPoints(rule->winTeam, rule->score * countDiff); + } + } +} + void CScoreboard::ProcessEndTake(int team) { if (team == 0) return; diff --git a/src/level/scoreboard.h b/src/level/scoreboard.h index 7ed67ad1..313e326c 100644 --- a/src/level/scoreboard.h +++ b/src/level/scoreboard.h @@ -64,6 +64,7 @@ enum class SortType * ScoreboardSortType sort=Name // sort teams alphabetically, another option is sort=Points, sorting teams in order of points * ScoreboardKillRule type=WheeledShooter team=1 score=500 // destruction of team 1's WheeledShooter gives 100 points to the team that destroyed it * ScoreboardKillRule type=TargetBot score=100 // destruction of TargetBot (any team) gives 100 points + * ScoreboardObjectRule pos=0.0;0.5 dist=5.0 type=Titanium winTeam=1 score=5 // each Titanium within 5 meters of 0;0 gives team 1 5 points, losing Titanium gives -5 * ScoreboardEndTakeRule score=1000 // completion of EndMissionTake objectives for any team results in 1000 points for that team * \endcode */ @@ -102,6 +103,22 @@ public: void Read(CLevelParserLine* line) override; }; + /** + * \class CScoreboardObjectRule + * \brief Scoreboard rule for counting objects + * \see CScoreboard::AddObjectRule() + */ + class CScoreboardObjectRule final : public CScoreboardRule, public CObjectCondition + { + public: + int winTeam = 0; + + //! Read from line in scene file + void Read(CLevelParserLine* line) override; + + int lastCount = 0; + }; + /** * \class CScoreboardEndTakeRule * \brief Scoreboard rule for EndMissionTake rewards @@ -120,6 +137,8 @@ public: public: //! Add ScoreboardKillRule void AddKillRule(std::unique_ptr rule); + //! Add ScoreboardObjectRule + void AddObjectRule(std::unique_ptr rule); //! Add ScoreboardEndTakeRule void AddEndTakeRule(std::unique_ptr rule); @@ -127,6 +146,8 @@ public: //! \param target The object that has just been destroyed //! \param killer The object that caused the destruction, can be null void ProcessKill(CObject* target, CObject* killer = nullptr); + //! Updates the object count rules + void UpdateObjectCount(); //! Called after EndTake contition has been met, used to handle ScoreboardEndTakeRule void ProcessEndTake(int team); @@ -139,6 +160,7 @@ public: private: std::vector> m_rulesKill = {}; + std::vector> m_rulesObject = {}; std::vector> m_rulesEndTake = {}; std::map m_score; int m_finishCounter = 0; From 0baf9f8077c4681c37107c21859987c3dc2474df Mon Sep 17 00:00:00 2001 From: krzys-h Date: Tue, 8 May 2018 23:47:50 +0200 Subject: [PATCH 073/207] Don't commit code in a hurry like that... --- src/level/scoreboard.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/level/scoreboard.cpp b/src/level/scoreboard.cpp index 0c2f5d87..18ad9684 100644 --- a/src/level/scoreboard.cpp +++ b/src/level/scoreboard.cpp @@ -94,7 +94,6 @@ void CScoreboard::UpdateObjectCount() assert(rule->winTeam != 0); int count = rule->CountObjects(); int countDiff = count - rule->lastCount; - printf("%d %d\n", count, countDiff); if (countDiff != 0) { rule->lastCount = count; From a3def6d6835f90ea482467f4bb64cdb36d1cfc6d Mon Sep 17 00:00:00 2001 From: krzys-h Date: Tue, 8 May 2018 23:57:13 +0200 Subject: [PATCH 074/207] Disallow firendly fire in ScoreboardKillRule --- src/level/scoreboard.cpp | 3 +++ src/level/scoreboard.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/level/scoreboard.cpp b/src/level/scoreboard.cpp index 18ad9684..78afa482 100644 --- a/src/level/scoreboard.cpp +++ b/src/level/scoreboard.cpp @@ -41,6 +41,7 @@ void CScoreboard::CScoreboardKillRule::Read(CLevelParserLine* line) { CScoreboardRule::Read(line); CObjectCondition::Read(line); + this->friendlyFire = line->GetParam("friendlyFire")->AsBool(false); } void CScoreboard::CScoreboardObjectRule::Read(CLevelParserLine* line) @@ -82,6 +83,8 @@ void CScoreboard::ProcessKill(CObject* target, CObject* killer) killer->GetTeam() != 0 && rule->CheckForObject(target)) { + if (killer->GetTeam() == target->GetTeam() && !rule->friendlyFire) + continue; AddPoints(killer->GetTeam(), rule->score); } } diff --git a/src/level/scoreboard.h b/src/level/scoreboard.h index 313e326c..4a094912 100644 --- a/src/level/scoreboard.h +++ b/src/level/scoreboard.h @@ -99,6 +99,8 @@ public: class CScoreboardKillRule final : public CScoreboardRule, public CObjectCondition { public: + bool friendlyFire = false; + //! Read from line in scene file void Read(CLevelParserLine* line) override; }; From 807d6e40e3cd8900c5f5bd72b3c9010c86f2602a Mon Sep 17 00:00:00 2001 From: AbigailBuccaneer Date: Wed, 9 May 2018 08:49:23 +0100 Subject: [PATCH 075/207] Fix -Wsuggest-override compile errors in tests Fixes #1160 --- test/unit/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/unit/CMakeLists.txt b/test/unit/CMakeLists.txt index c21fb600..cd606397 100644 --- a/test/unit/CMakeLists.txt +++ b/test/unit/CMakeLists.txt @@ -63,3 +63,9 @@ add_test( COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/colobot_ut WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} ) + +# GoogleTest isn't compatible with -Wsuggest-override -Werror: +# see https://github.com/google/googletest/issues/1063 +if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0) + target_compile_options(colobot_ut PRIVATE "-Wno-suggest-override") +endif() From 94a18e9648dc5deb46297c99f0460ca15e93010e Mon Sep 17 00:00:00 2001 From: krzys-h Date: Wed, 9 May 2018 17:23:27 +0200 Subject: [PATCH 076/207] Add version override to release script NOT TESTED! --- tools/release.py | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/tools/release.py b/tools/release.py index 6ab155af..03e83b6f 100755 --- a/tools/release.py +++ b/tools/release.py @@ -25,6 +25,16 @@ import sys import subprocess import io +version_override = None +if len(sys.argv) > 1: + m = re.match(r'^(.*?)\.(.*?)\.(.*)$', sys.argv[1]) + if m is None: + print('\033[1;31m[!] Unable to parse version override argument\033[0m') + sys.exit(1) + version_override = (m.group(1), m.group(2), m.group(3)) + print('\033[1;34m[*] Version override: '+('%s.%s.%s' % version_override)+'\033[0m') + + try: git_root = subprocess.check_output(['git', 'rev-parse', '--show-toplevel']).strip() except subprocess.CalledProcessError: @@ -65,16 +75,24 @@ data = open('CMakeLists.txt', 'r').readlines() for i in range(len(data)): m = re.match(r'^set\(COLOBOT_VERSION_(MAJOR|MINOR|REVISION)( +)([0-9]+)\)$', data[i]) if m: - x = int(m.group(3)) + x = m.group(3) if m.group(1) == 'MAJOR': - major = x + if version_override is None: + major = x + else: + major = version_override[0] elif m.group(1) == 'MINOR': - minor = x + if version_override is None: + minor = x + else: + minor = version_override[1] elif m.group(1) == 'REVISION': - # Increase revision number - x += 1 - revision = x - data[i] = 'set(COLOBOT_VERSION_'+m.group(1)+m.group(2)+str(x)+')\n' + if version_override is None: + # Increase revision number + revision = str(int(x) + 1) + else: + revision = version_override[2] + data[i] = 'set(COLOBOT_VERSION_'+m.group(1)+m.group(2)+x+')\n' m = re.match(r'^(#?)set\(COLOBOT_VERSION_(UNRELEASED|RELEASE_CODENAME)( +)"(.+)"\)$', data[i]) if m: @@ -84,8 +102,8 @@ for i in range(len(data)): data[i] = ('#' if comment else '')+'set(COLOBOT_VERSION_'+m.group(2)+m.group(3)+'"'+m.group(4)+'")\n' subprocess.check_call(['git', 'checkout', 'master']) -version = '%d.%d.%d%s' % (major, minor, revision, codename) -version_human = '%s %d.%d.%d' % (codename.strip('-'), major, minor, revision) +version = '%s.%s.%s%s' % (major, minor, revision, codename) +version_human = '%s %s.%s.%s' % (codename.strip('-'), major, minor, revision) print('\033[1;32m[+] Building version '+version+'\033[0m') print('\033[1;34m[*] Merge data...\033[0m') From abe489e2944f8f4f98283e2367dc02a8862c932f Mon Sep 17 00:00:00 2001 From: krzys-h Date: Wed, 9 May 2018 17:47:21 +0200 Subject: [PATCH 077/207] Add EndMissionTimeout --- po/colobot.pot | 4 +++ po/cs.po | 4 +++ po/de.po | 4 +++ po/fr.po | 13 +++++---- po/pl.po | 4 +++ po/ru.po | 4 +++ src/common/restext.cpp | 1 + src/common/restext.h | 3 +- src/level/robotmain.cpp | 63 +++++++++++++++++++++++++++++++---------- src/level/robotmain.h | 1 + 10 files changed, 79 insertions(+), 22 deletions(-) diff --git a/po/colobot.pot b/po/colobot.pot index 419b88e9..5d71af8c 100644 --- a/po/colobot.pot +++ b/po/colobot.pot @@ -266,6 +266,10 @@ msgstr "" msgid "The battle has ended" msgstr "" +#, c-format +msgid "Time: %s" +msgstr "" + #, c-format msgid "%s: %d pts" msgstr "" diff --git a/po/cs.po b/po/cs.po index 867a8482..555df720 100644 --- a/po/cs.po +++ b/po/cs.po @@ -1546,6 +1546,10 @@ msgstr "Úder (\\key action;)" msgid "Thumper" msgstr "Buchar" +#, c-format +msgid "Time: %s" +msgstr "" + msgid "Titanium" msgstr "Titan" diff --git a/po/de.po b/po/de.po index 1c839a09..553ead83 100644 --- a/po/de.po +++ b/po/de.po @@ -1563,6 +1563,10 @@ msgstr "Stampfen (\\key action;)" msgid "Thumper" msgstr "Stampfer" +#, c-format +msgid "Time: %s" +msgstr "" + msgid "Titanium" msgstr "Titan" diff --git a/po/fr.po b/po/fr.po index 1dd2d7f4..ce3f5fdf 100644 --- a/po/fr.po +++ b/po/fr.po @@ -1,7 +1,6 @@ # Didier Raboud , 2012, 2015, 2016. # Martin Quinson , 2016 # B-CE, 2018 - msgid "" msgstr "" "Project-Id-Version: Colobot 0.1.11\n" @@ -174,10 +173,10 @@ msgstr "Sang\\Afficher du sang quand le cosmonaute est touché" msgid "Blue" msgstr "Bleue" + # tocheck : for team (fem): bleue # tocheck : for flag/pen/bot (masc): bleu # + capital also to check - msgid "Blue flag" msgstr "Drapeau bleu" @@ -566,8 +565,8 @@ msgstr "Séquences cinématiques\\Films avant ou après une mission" msgid "Finish" msgstr "But/Objectif" -# OBJECT_END : GoalArea +# OBJECT_END : GoalArea msgid "Fixed mine" msgstr "Mine fixe" @@ -857,7 +856,6 @@ msgstr "Chargement du terrain" # msgstr "" # msgid "Speed 6.0x\\Sextuple speed" # msgstr "" - msgid "Lower speed\\Decrease speed by half" msgstr "Moins rapide\\Diminuer la vitesse de moitié" @@ -1257,8 +1255,8 @@ msgstr "Robot recycleur" msgid "Red" msgstr "Rouge" -# toCheck : capital (for team?) +# toCheck : capital (for team?) msgid "Red flag" msgstr "Drapeau rouge" @@ -1568,6 +1566,10 @@ msgstr "Secoue (\\key action;)" msgid "Thumper" msgstr "Robot secoueur" +#, c-format +msgid "Time: %s" +msgstr "" + msgid "Titanium" msgstr "Titane" @@ -2048,4 +2050,3 @@ msgstr "epsitec.com" #~ msgid "\\c; (none)\\n;\n" #~ msgstr "\\c; (aucun)\\n;\n" - diff --git a/po/pl.po b/po/pl.po index bb288518..f9f76de8 100644 --- a/po/pl.po +++ b/po/pl.po @@ -1545,6 +1545,10 @@ msgstr "Uderz (\\key action;)" msgid "Thumper" msgstr "Uderzacz" +#, c-format +msgid "Time: %s" +msgstr "Czas: %s" + msgid "Titanium" msgstr "Tytan" diff --git a/po/ru.po b/po/ru.po index f2b25354..0763e742 100644 --- a/po/ru.po +++ b/po/ru.po @@ -1576,6 +1576,10 @@ msgstr "Удар (\\key action;)" msgid "Thumper" msgstr "Ударник" +#, c-format +msgid "Time: %s" +msgstr "" + msgid "Titanium" msgstr "Титан" diff --git a/src/common/restext.cpp b/src/common/restext.cpp index c5704362..9bac8434 100644 --- a/src/common/restext.cpp +++ b/src/common/restext.cpp @@ -145,6 +145,7 @@ void InitializeRestext() stringsText[RT_SCOREBOARD_RESULTS] = TR("Results"); stringsText[RT_SCOREBOARD_RESULTS_TEXT]= TR("The battle has ended"); + stringsText[RT_SCOREBOARD_RESULTS_TIME]= TR("Time: %s"); stringsText[RT_SCOREBOARD_RESULTS_LINE]= TR("%s: %d pts"); diff --git a/src/common/restext.h b/src/common/restext.h index 80808468..6acfb610 100644 --- a/src/common/restext.h +++ b/src/common/restext.h @@ -142,7 +142,8 @@ enum ResTextType RT_SCOREBOARD_RESULTS = 230, RT_SCOREBOARD_RESULTS_TEXT= 231, - RT_SCOREBOARD_RESULTS_LINE= 232, + RT_SCOREBOARD_RESULTS_TIME= 232, + RT_SCOREBOARD_RESULTS_LINE= 233, RT_MAX //! < number of values diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp index 441b244d..03fb5314 100644 --- a/src/level/robotmain.cpp +++ b/src/level/robotmain.cpp @@ -2703,6 +2703,7 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject) m_endTake.clear(); m_endTakeImmediat = false; m_endTakeResearch = 0; + m_endTakeTimeout = -1.0f; m_endTakeWinDelay = 2.0f; m_endTakeLostDelay = 2.0f; m_teamFinished.clear(); @@ -3584,6 +3585,11 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject) m_endTakeResearch |= line->GetParam("type")->AsResearchFlag(); continue; } + if (line->GetCommand() == "EndMissionTimeout" && !resetObject) + { + m_endTakeTimeout = line->GetParam("time")->AsFloat(); + continue; + } if (line->GetCommand() == "Scoreboard" && !resetObject) { @@ -3597,7 +3603,7 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject) if (line->GetCommand() == "ScoreboardSortType" && !resetObject) { - m_scoreboard->SetSortType(static_cast(line->GetParam("sort")->AsSortType() ) ); + m_scoreboard->SetSortType(line->GetParam("sort")->AsSortType()); continue; } @@ -4979,6 +4985,22 @@ Error CRobotMain::ProcessEndMissionTakeForGroup(std::vector //! If return value is different than ERR_MISSION_NOTERM, assume the mission is finished and pass on the result Error CRobotMain::ProcessEndMissionTake() { + bool timeout = false; + if (m_missionResult != INFO_LOST && m_missionResult != INFO_LOSTq) + { + if (m_endTakeTimeout >= 0.0f) + { + // Use the mission timer if available, or global mission time otherwise + // Useful for exercises where the time starts when you start the program, not the mission itself + float currentTime = m_missionTimerEnabled ? m_missionTimer : m_gameTime; + if (currentTime > m_endTakeTimeout) + { + m_missionResult = INFO_LOST; + timeout = true; + } + } + } + // Sort end conditions by teams std::map> teamsEndTake; for (std::unique_ptr& endTake : m_endTake) @@ -4989,21 +5011,43 @@ Error CRobotMain::ProcessEndMissionTake() if (!usesTeamConditions) { - m_missionResult = ProcessEndMissionTakeForGroup(teamsEndTake[0]); + if (!timeout) + m_missionResult = ProcessEndMissionTakeForGroup(teamsEndTake[0]); + + if (m_missionResult != INFO_LOST && m_missionResult != INFO_LOSTq) + { + if (m_endTakeResearch != 0) + { + if (m_endTakeResearch != (m_endTakeResearch&m_researchDone[0])) + { + m_missionResult = ERR_MISSION_NOTERM; + } + } + } } else { + assert(m_endTakeResearch == 0); // TODO: Add support for per-team EndTakeResearch + // Special handling for teams m_missionResult = ERR_MISSION_NOTERM; - if (GetAllActiveTeams().empty()) + if (GetAllActiveTeams().empty() || timeout) { GetLogger()->Info("All teams died, mission ended\n"); if (m_scoreboard) { std::string title, text, details_line; GetResource(RES_TEXT, RT_SCOREBOARD_RESULTS, title); - GetResource(RES_TEXT, RT_SCOREBOARD_RESULTS_TEXT, text); + if (m_missionTimerEnabled && m_missionTimerStarted) + { + GetResource(RES_TEXT, RT_SCOREBOARD_RESULTS_TIME, text); + text = StrUtils::Format(text.c_str(), TimeFormat(m_missionTimer).c_str()); + } + else + { + GetResource(RES_TEXT, RT_SCOREBOARD_RESULTS_TEXT, text); + } GetResource(RES_TEXT, RT_SCOREBOARD_RESULTS_LINE, details_line); std::string details = ""; for (int team : GetAllTeams()) @@ -5086,17 +5130,6 @@ Error CRobotMain::ProcessEndMissionTake() } } - if (m_missionResult != INFO_LOST && m_missionResult != INFO_LOSTq) - { - if (m_endTakeResearch != 0) - { - if (m_endTakeResearch != (m_endTakeResearch&m_researchDone[0])) - { - m_missionResult = ERR_MISSION_NOTERM; - } - } - } - return ERR_MISSION_NOTERM; } diff --git a/src/level/robotmain.h b/src/level/robotmain.h index 1e19d514..7f0111ea 100644 --- a/src/level/robotmain.h +++ b/src/level/robotmain.h @@ -672,6 +672,7 @@ protected: //! If true, the mission ends immediately after completing the requirements without requiring SpaceShip takeoff bool m_endTakeImmediat = false; long m_endTakeResearch = 0; + float m_endTakeTimeout = -1.0f; float m_endTakeWinDelay = 0.0f; float m_endTakeLostDelay = 0.0f; //! Set to true for teams that have already finished From c027b54add0853c02a10598b0ee847cc8d77e605 Mon Sep 17 00:00:00 2001 From: AbigailBuccaneer Date: Fri, 4 May 2018 18:13:24 +0100 Subject: [PATCH 078/207] Don't create a color renderbuffer for shadow map When rendering the shadow map offscreen using framebuffer objects, it's not necessary to create a color renderbuffer. Currently FramebufferParams only lets you choose between a renderbuffer and a texture for both color and depth attachments. This changes that, and now you can ask for a texture, a renderbuffer, or nothing. This improves performance. On my computer, with an 8192x8192 shadow map, this improves overall frame time by 8.0%. --- src/graphics/core/framebuffer.h | 13 +++++++++---- src/graphics/engine/engine.cpp | 3 ++- src/graphics/opengl/glframebuffer.cpp | 24 ++++++++++++++++-------- 3 files changed, 27 insertions(+), 13 deletions(-) diff --git a/src/graphics/core/framebuffer.h b/src/graphics/core/framebuffer.h index e668b036..3c5e6de8 100644 --- a/src/graphics/core/framebuffer.h +++ b/src/graphics/core/framebuffer.h @@ -41,10 +41,15 @@ struct FramebufferParams int depth = 16; //! Requested number of samples for multisampling int samples = 1; - //! true requests color texture - bool colorTexture = false; - //! true requests depth texture - bool depthTexture = false; + + enum class AttachmentType + { + Texture, + Renderbuffer, + None, + }; + AttachmentType colorAttachment = AttachmentType::Renderbuffer; + AttachmentType depthAttachment = AttachmentType::Renderbuffer; //! Loads default values void LoadDefault() diff --git a/src/graphics/engine/engine.cpp b/src/graphics/engine/engine.cpp index 40d4d1d1..4dfec9ca 100644 --- a/src/graphics/engine/engine.cpp +++ b/src/graphics/engine/engine.cpp @@ -3786,7 +3786,8 @@ void CEngine::RenderShadowMap() FramebufferParams params; params.width = params.height = width; params.depth = depth = 32; - params.depthTexture = true; + params.colorAttachment = FramebufferParams::AttachmentType::None; + params.depthAttachment = FramebufferParams::AttachmentType::Texture; CFramebuffer *framebuffer = m_device->CreateFramebuffer("shadow", params); if (framebuffer == nullptr) diff --git a/src/graphics/opengl/glframebuffer.cpp b/src/graphics/opengl/glframebuffer.cpp index c58d90d7..75fe020a 100644 --- a/src/graphics/opengl/glframebuffer.cpp +++ b/src/graphics/opengl/glframebuffer.cpp @@ -55,7 +55,7 @@ bool CGLFramebuffer::Create() glBindFramebuffer(GL_FRAMEBUFFER, m_fbo); // create color texture - if (m_params.colorTexture) + if (m_params.colorAttachment == FramebufferParams::AttachmentType::Texture) { GLint previous; glGetIntegerv(GL_TEXTURE_BINDING_2D, &previous); @@ -76,7 +76,7 @@ bool CGLFramebuffer::Create() glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, m_colorTexture, 0); } // create color renderbuffer - else + else if (m_params.colorAttachment == FramebufferParams::AttachmentType::Renderbuffer) { glGenRenderbuffers(1, &m_colorRenderbuffer); glBindRenderbuffer(GL_RENDERBUFFER, m_colorRenderbuffer); @@ -92,6 +92,10 @@ bool CGLFramebuffer::Create() glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, m_colorRenderbuffer); } + else + { + glDrawBuffer(GL_NONE); + } GLuint depthFormat = 0; @@ -104,7 +108,7 @@ bool CGLFramebuffer::Create() } // create depth texture - if (m_params.depthTexture) + if (m_params.depthAttachment == FramebufferParams::AttachmentType::Texture) { GLint previous; glGetIntegerv(GL_TEXTURE_BINDING_2D, &previous); @@ -132,7 +136,7 @@ bool CGLFramebuffer::Create() GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, m_depthTexture, 0); } // create depth renderbuffer - else + else if (m_params.depthAttachment == FramebufferParams::AttachmentType::Renderbuffer) { glGenRenderbuffers(1, &m_depthRenderbuffer); glBindRenderbuffer(GL_RENDERBUFFER, m_depthRenderbuffer); @@ -323,7 +327,7 @@ bool CGLFramebufferEXT::Create() glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_fbo); // create color texture - if (m_params.colorTexture) + if (m_params.colorAttachment == FramebufferParams::AttachmentType::Texture) { GLint previous; glGetIntegerv(GL_TEXTURE_BINDING_2D, &previous); @@ -346,7 +350,7 @@ bool CGLFramebufferEXT::Create() GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, m_colorTexture, 0); } // create color renderbuffer - else + else if (m_params.colorAttachment == FramebufferParams::AttachmentType::Renderbuffer) { glGenRenderbuffersEXT(1, &m_colorRenderbuffer); glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, m_colorRenderbuffer); @@ -363,6 +367,10 @@ bool CGLFramebufferEXT::Create() glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_RENDERBUFFER_EXT, m_colorRenderbuffer); } + else + { + glDrawBuffer(GL_NONE); + } GLuint depthFormat = 0; @@ -375,7 +383,7 @@ bool CGLFramebufferEXT::Create() } // create depth texture - if (m_params.depthTexture) + if (m_params.depthAttachment == FramebufferParams::AttachmentType::Texture) { GLint previous; glGetIntegerv(GL_TEXTURE_BINDING_2D, &previous); @@ -403,7 +411,7 @@ bool CGLFramebufferEXT::Create() GL_DEPTH_ATTACHMENT_EXT, GL_TEXTURE_2D, m_depthTexture, 0); } // create depth renderbuffer - else + else if (m_params.depthAttachment == FramebufferParams::AttachmentType::Renderbuffer) { glGenRenderbuffersEXT(1, &m_depthRenderbuffer); glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, m_depthRenderbuffer); From 1ed3f4b21550eb7478100e3fce4d5b9fabb05c06 Mon Sep 17 00:00:00 2001 From: krzys-h Date: Wed, 9 May 2018 18:28:25 +0200 Subject: [PATCH 079/207] Add EndMissionTeams immediateWin=true; make the teams on win screen sorted --- src/level/parser/parserparam.cpp | 12 +++++----- src/level/parser/parserparam.h | 6 ++--- src/level/robotmain.cpp | 41 ++++++++++++++++++-------------- src/level/robotmain.h | 1 + src/level/scoreboard.cpp | 29 ++++++++++++++++++---- src/level/scoreboard.h | 40 ++++++++++++++++++------------- 6 files changed, 81 insertions(+), 48 deletions(-) diff --git a/src/level/parser/parserparam.cpp b/src/level/parser/parserparam.cpp index 48cc9ae8..c4ee9b31 100644 --- a/src/level/parser/parserparam.cpp +++ b/src/level/parser/parserparam.cpp @@ -955,21 +955,21 @@ int CLevelParserParam::AsResearchFlag(int def) return AsResearchFlag(); } -SortType CLevelParserParam::ToSortType(std::string value) +CScoreboard::SortType CLevelParserParam::ToSortType(std::string value) { - if (value == "Points") return SortType::SORT_POINTS; - if (value == "Name" ) return SortType::SORT_ID; - return SortType::SORT_ID; + if (value == "Points") return CScoreboard::SortType::SORT_POINTS; + if (value == "Name" ) return CScoreboard::SortType::SORT_ID; + return CScoreboard::SortType::SORT_ID; } -SortType CLevelParserParam::AsSortType() +CScoreboard::SortType CLevelParserParam::AsSortType() { if (m_empty) throw CLevelParserExceptionMissingParam(this); return ToSortType(m_value); } -SortType CLevelParserParam::AsSortType(SortType def) +CScoreboard::SortType CLevelParserParam::AsSortType(CScoreboard::SortType def) { if (m_empty) return def; diff --git a/src/level/parser/parserparam.h b/src/level/parser/parserparam.h index d011c669..62838dc7 100644 --- a/src/level/parser/parserparam.h +++ b/src/level/parser/parserparam.h @@ -87,7 +87,7 @@ public: Gfx::EngineObjectType AsTerrainType(); int AsBuildFlag(); int AsResearchFlag(); - SortType AsSortType(); + CScoreboard::SortType AsSortType(); Gfx::PyroType AsPyroType(); Gfx::CameraType AsCameraType(); MissionType AsMissionType(); @@ -111,7 +111,7 @@ public: Gfx::EngineObjectType AsTerrainType(Gfx::EngineObjectType def); int AsBuildFlag(int def); int AsResearchFlag(int def); - SortType AsSortType(SortType def); + CScoreboard::SortType AsSortType(CScoreboard::SortType def); Gfx::PyroType AsPyroType(Gfx::PyroType def); Gfx::CameraType AsCameraType(Gfx::CameraType def); MissionType AsMissionType(MissionType def); @@ -143,7 +143,7 @@ private: Gfx::EngineObjectType ToTerrainType(std::string value); int ToBuildFlag(std::string value); int ToResearchFlag(std::string value); - SortType ToSortType(std::string value); + CScoreboard::SortType ToSortType(std::string value); Gfx::PyroType ToPyroType(std::string value); Gfx::CameraType ToCameraType(std::string value); MissionType ToMissionType(std::string value); diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp index 03fb5314..5e6a548f 100644 --- a/src/level/robotmain.cpp +++ b/src/level/robotmain.cpp @@ -2704,6 +2704,7 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject) m_endTakeImmediat = false; m_endTakeResearch = 0; m_endTakeTimeout = -1.0f; + m_endTakeTeamImmediateWin = false; m_endTakeWinDelay = 2.0f; m_endTakeLostDelay = 2.0f; m_teamFinished.clear(); @@ -3574,6 +3575,11 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject) } continue; } + if (line->GetCommand() == "EndMissionTeams" && !resetObject) + { + m_endTakeTeamImmediateWin = line->GetParam("immediateWin")->AsBool(false); // false = finishing removes the team that finished, true = finishing for one team ends the whole game + continue; + } if (line->GetCommand() == "EndMissionDelay" && !resetObject) { m_endTakeWinDelay = line->GetParam("win")->AsFloat(2.0f); @@ -5050,11 +5056,11 @@ Error CRobotMain::ProcessEndMissionTake() } GetResource(RES_TEXT, RT_SCOREBOARD_RESULTS_LINE, details_line); std::string details = ""; - for (int team : GetAllTeams()) + for (std::pair team : m_scoreboard->GetSortedScores()) { if (!details.empty()) details += ", "; - details += StrUtils::Format(details_line.c_str(), GetTeamName(team).c_str(), m_scoreboard->GetScore(team).points); + details += StrUtils::Format(details_line.c_str(), GetTeamName(team.first).c_str(), team.second.points); } m_ui->GetDialog()->StartInformation( title, @@ -5125,6 +5131,18 @@ Error CRobotMain::ProcessEndMissionTake() m_scoreboard->ProcessEndTake(team); m_objMan->DestroyTeam(team, DestructionType::Win); m_teamFinished[team] = true; + if (m_endTakeTeamImmediateWin) + { + // All other teams fail + for(int other_team : GetAllActiveTeams()) + { + m_displayText->SetEnable(false); // To prevent "bot destroyed" messages + m_objMan->DestroyTeam(other_team); + m_displayText->SetEnable(true); + + m_teamFinished[other_team] = true; + } + } } } } @@ -6006,32 +6024,19 @@ void CRobotMain::UpdateCodeBattleInterface() Ui::CWindow* pw = static_cast(m_interface->SearchControl(EVENT_WINDOW6)); assert(pw != nullptr); - std::set teams = GetAllTeams(); - std::vector sortedTeams(teams.begin(), teams.end()); - if(m_scoreboard->GetSortType() == SortType::SORT_POINTS) - { - std::sort(sortedTeams.begin(), sortedTeams.end(), [this](int teamA, int teamB) - { - if (m_scoreboard->GetScore(teamA).points > m_scoreboard->GetScore(teamB).points) return true; //Team A have more points than B? - if (m_scoreboard->GetScore(teamA).points < m_scoreboard->GetScore(teamB).points) return false; //Team A have less points than B? - - if (m_scoreboard->GetScore(teamA).time < m_scoreboard->GetScore(teamB).time) return true; //Team A scored faster than B? - else return false; //Team A scored slower than B? - }); - } int i = 0; - for (int team : sortedTeams) + for (std::pair team : m_scoreboard->GetSortedScores()) { Ui::CControl* pl; pl = pw->SearchControl(static_cast(EVENT_SCOREBOARD+2*i+0)); assert(pl != nullptr); - pl->SetName(GetTeamName(team)); + pl->SetName(GetTeamName(team.first)); pl = pw->SearchControl(static_cast(EVENT_SCOREBOARD+2*i+1)); assert(pl != nullptr); - pl->SetName(StrUtils::ToString(m_scoreboard->GetScore(team).points)); + pl->SetName(StrUtils::ToString(team.second.points)); i++; } diff --git a/src/level/robotmain.h b/src/level/robotmain.h index 7f0111ea..d067d0e0 100644 --- a/src/level/robotmain.h +++ b/src/level/robotmain.h @@ -673,6 +673,7 @@ protected: bool m_endTakeImmediat = false; long m_endTakeResearch = 0; float m_endTakeTimeout = -1.0f; + bool m_endTakeTeamImmediateWin = false; float m_endTakeWinDelay = 0.0f; float m_endTakeLostDelay = 0.0f; //! Set to true for teams that have already finished diff --git a/src/level/scoreboard.cpp b/src/level/scoreboard.cpp index 78afa482..1df0d0a3 100644 --- a/src/level/scoreboard.cpp +++ b/src/level/scoreboard.cpp @@ -133,7 +133,7 @@ void CScoreboard::AddPoints(int team, int points) m_score[team].time = main->GetGameTime(); } -Score CScoreboard::GetScore(int team) +CScoreboard::Score CScoreboard::GetScore(int team) { return m_score[team]; } @@ -143,12 +143,33 @@ void CScoreboard::SetScore(int team, int points) m_score[team].points = points; } -SortType CScoreboard::GetSortType() +CScoreboard::SortType CScoreboard::GetSortType() { - return m_sorttype; + return m_sortType; } void CScoreboard::SetSortType(SortType type) { - m_sorttype = type; + m_sortType = type; +} + +std::vector> CScoreboard::GetSortedScores() +{ + CRobotMain* main = CRobotMain::GetInstancePointer(); + std::set teams = main->GetAllTeams(); + std::vector> sortedTeams(teams.size()); + std::transform(teams.begin(), teams.end(), sortedTeams.begin(), [&](int team) { + return *m_score.find(team); + }); + if (m_sortType == SortType::SORT_POINTS) + { + std::sort(sortedTeams.begin(), sortedTeams.end(), [&](std::pair teamA, std::pair teamB) + { + if (teamA.second.points > teamB.second.points) return true; // Team A have more points than B? + if (teamA.second.points < teamB.second.points) return false; // Team A have less points than B? + + return teamA.second.time < teamB.second.time; // Team A scored slower than B? + }); + } + return sortedTeams; } diff --git a/src/level/scoreboard.h b/src/level/scoreboard.h index 4a094912..98f94b60 100644 --- a/src/level/scoreboard.h +++ b/src/level/scoreboard.h @@ -32,22 +32,6 @@ class CObject; -/** - * \struct Score - * \brief Struct containing score of individual team and additional variables to allow sorting teams through different criteria -*/ -struct Score -{ - int points = 0; //! Team score - float time = 0; //! Time when points were scored -}; - -enum class SortType -{ - SORT_ID, //Sort by team ID - SORT_POINTS, //Sort by points -}; - /** * \class CScoreboard * \brief Scoreboard used to score complex code battles @@ -71,6 +55,26 @@ enum class SortType class CScoreboard { public: + /** + * \struct Score + * \brief Struct containing score of individual team and additional variables to allow sorting teams through different criteria + */ + struct Score + { + int points = 0; //!< Team score + float time = 0; //!< Time when points were scored + }; + + /** + * \enum SortType + * \brief Enum defining the scoreboard sorting criteria + */ + enum class SortType + { + SORT_ID, //!< Sort by team ID + SORT_POINTS, //!< Sort by points + }; + //! Creates the scoreboard //! The scoreboard exists only if enabled in level file CScoreboard() {}; @@ -160,11 +164,13 @@ public: SortType GetSortType(); void SetSortType(SortType type); + std::vector> GetSortedScores(); + private: std::vector> m_rulesKill = {}; std::vector> m_rulesObject = {}; std::vector> m_rulesEndTake = {}; std::map m_score; int m_finishCounter = 0; - SortType m_sorttype = SortType::SORT_ID; + SortType m_sortType = SortType::SORT_ID; }; From 85772376fa7d19e8f309a8e613c94dbfb8900881 Mon Sep 17 00:00:00 2001 From: krzys-h Date: Wed, 9 May 2018 18:33:27 +0200 Subject: [PATCH 080/207] Merge ScoreboardSortType with main Scoreboard command --- src/level/robotmain.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp index 5e6a548f..f6679413 100644 --- a/src/level/robotmain.cpp +++ b/src/level/robotmain.cpp @@ -3603,16 +3603,11 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject) { // Create the scoreboard m_scoreboard = MakeUnique(); + m_scoreboard->SetSortType(line->GetParam("sort")->AsSortType(CScoreboard::SortType::SORT_ID)); } continue; } - if (line->GetCommand() == "ScoreboardSortType" && !resetObject) - { - m_scoreboard->SetSortType(line->GetParam("sort")->AsSortType()); - continue; - } - if (line->GetCommand() == "ScoreboardKillRule" && !resetObject) { if (!m_scoreboard) From 10fc47476bd33eebdc6fd41b31d26cfe11e68dee Mon Sep 17 00:00:00 2001 From: krzys-h Date: Wed, 9 May 2018 18:34:27 +0200 Subject: [PATCH 081/207] Fix code style --- src/level/scoreboard.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/level/scoreboard.cpp b/src/level/scoreboard.cpp index 1df0d0a3..3fa006cb 100644 --- a/src/level/scoreboard.cpp +++ b/src/level/scoreboard.cpp @@ -158,7 +158,8 @@ std::vector> CScoreboard::GetSortedScores() CRobotMain* main = CRobotMain::GetInstancePointer(); std::set teams = main->GetAllTeams(); std::vector> sortedTeams(teams.size()); - std::transform(teams.begin(), teams.end(), sortedTeams.begin(), [&](int team) { + std::transform(teams.begin(), teams.end(), sortedTeams.begin(), [&](int team) + { return *m_score.find(team); }); if (m_sortType == SortType::SORT_POINTS) From 94b30c00a076a0f5c9eb35b50e98fc05d51ef001 Mon Sep 17 00:00:00 2001 From: AbigailBuccaneer Date: Thu, 3 May 2018 18:14:55 +0100 Subject: [PATCH 082/207] Remove code duplication in CGLxxDevice --- src/graphics/core/vertex.h | 13 ++ src/graphics/opengl/gl14device.cpp | 132 +--------------- src/graphics/opengl/gl14device.h | 44 ++++-- src/graphics/opengl/gl21device.cpp | 103 +----------- src/graphics/opengl/gl21device.h | 43 +++-- src/graphics/opengl/gl33device.cpp | 244 +++++------------------------ src/graphics/opengl/gl33device.h | 43 +++-- 7 files changed, 152 insertions(+), 470 deletions(-) diff --git a/src/graphics/core/vertex.h b/src/graphics/core/vertex.h index 1af5832e..30acc2af 100644 --- a/src/graphics/core/vertex.h +++ b/src/graphics/core/vertex.h @@ -92,6 +92,13 @@ struct VertexFormat VertexAttribute tex2{}; }; +enum VertexType +{ + VERTEX_TYPE_NORMAL, + VERTEX_TYPE_TEX2, + VERTEX_TYPE_COL, +}; + /** * \struct Vertex * \brief Vertex of a primitive @@ -105,6 +112,8 @@ struct VertexFormat */ struct Vertex { + static constexpr VertexType VERTEX_TYPE = VERTEX_TYPE_NORMAL; + Math::Vector coord; Math::Vector normal; Math::Point texCoord; @@ -137,6 +146,8 @@ struct Vertex */ struct VertexCol { + static constexpr VertexType VERTEX_TYPE = VERTEX_TYPE_COL; + Math::Vector coord; Color color; @@ -166,6 +177,8 @@ struct VertexCol */ struct VertexTex2 { + static constexpr VertexType VERTEX_TYPE = VERTEX_TYPE_TEX2; + Math::Vector coord; Math::Vector normal; Math::Point texCoord; diff --git a/src/graphics/opengl/gl14device.cpp b/src/graphics/opengl/gl14device.cpp index fc950f49..4304859e 100644 --- a/src/graphics/opengl/gl14device.cpp +++ b/src/graphics/opengl/gl14device.cpp @@ -1635,7 +1635,8 @@ void CGL14Device::DrawPrimitives(PrimitiveType type, const VertexCol *vertices, glDisableClientState(GL_COLOR_ARRAY); } -unsigned int CGL14Device::CreateStaticBuffer(PrimitiveType primitiveType, const Vertex* vertices, int vertexCount) +template +unsigned int CGL14Device::CreateStaticBufferImpl(PrimitiveType primitiveType, const Vertex* vertices, int vertexCount) { unsigned int id = 0; if (m_vertexBufferType != VBT_DISPLAY_LIST) @@ -1644,7 +1645,7 @@ unsigned int CGL14Device::CreateStaticBuffer(PrimitiveType primitiveType, const VboObjectInfo info; info.primitiveType = primitiveType; - info.vertexType = VERTEX_TYPE_NORMAL; + info.vertexType = Vertex::VERTEX_TYPE; info.vertexCount = vertexCount; info.bufferId = 0; @@ -1669,75 +1670,8 @@ unsigned int CGL14Device::CreateStaticBuffer(PrimitiveType primitiveType, const return id; } -unsigned int CGL14Device::CreateStaticBuffer(PrimitiveType primitiveType, const VertexTex2* vertices, int vertexCount) -{ - unsigned int id = 0; - if (m_vertexBufferType != VBT_DISPLAY_LIST) - { - id = ++m_lastVboId; - - VboObjectInfo info; - info.primitiveType = primitiveType; - info.vertexType = VERTEX_TYPE_TEX2; - info.vertexCount = vertexCount; - info.bufferId = 0; - - m_glGenBuffers(1, &info.bufferId); - m_glBindBuffer(GL_ARRAY_BUFFER, info.bufferId); - m_glBufferData(GL_ARRAY_BUFFER, vertexCount * sizeof(VertexTex2), vertices, GL_STATIC_DRAW); - m_glBindBuffer(GL_ARRAY_BUFFER, 0); - - m_vboObjects[id] = info; - } - else - { - id = glGenLists(1); - - glNewList(id, GL_COMPILE); - - DrawPrimitive(primitiveType, vertices, vertexCount); - - glEndList(); - } - - return id; -} - -unsigned int CGL14Device::CreateStaticBuffer(PrimitiveType primitiveType, const VertexCol* vertices, int vertexCount) -{ - unsigned int id = 0; - if (m_vertexBufferType != VBT_DISPLAY_LIST) - { - id = ++m_lastVboId; - - VboObjectInfo info; - info.primitiveType = primitiveType; - info.vertexType = VERTEX_TYPE_COL; - info.vertexCount = vertexCount; - info.bufferId = 0; - - m_glGenBuffers(1, &info.bufferId); - m_glBindBuffer(GL_ARRAY_BUFFER, info.bufferId); - m_glBufferData(GL_ARRAY_BUFFER, vertexCount * sizeof(VertexCol), vertices, GL_STATIC_DRAW); - m_glBindBuffer(GL_ARRAY_BUFFER, 0); - - m_vboObjects[id] = info; - } - else - { - id = glGenLists(1); - - glNewList(id, GL_COMPILE); - - DrawPrimitive(primitiveType, vertices, vertexCount); - - glEndList(); - } - - return id; -} - -void CGL14Device::UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const Vertex* vertices, int vertexCount) +template +void CGL14Device::UpdateStaticBufferImpl(unsigned int bufferId, PrimitiveType primitiveType, const Vertex* vertices, int vertexCount) { if (m_vertexBufferType != VBT_DISPLAY_LIST) { @@ -1747,7 +1681,7 @@ void CGL14Device::UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primit VboObjectInfo& info = (*it).second; info.primitiveType = primitiveType; - info.vertexType = VERTEX_TYPE_NORMAL; + info.vertexType = Vertex::VERTEX_TYPE; info.vertexCount = vertexCount; m_glBindBuffer(GL_ARRAY_BUFFER, info.bufferId); @@ -1764,60 +1698,6 @@ void CGL14Device::UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primit } } -void CGL14Device::UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const VertexTex2* vertices, int vertexCount) -{ - if (m_vertexBufferType != VBT_DISPLAY_LIST) - { - auto it = m_vboObjects.find(bufferId); - if (it == m_vboObjects.end()) - return; - - VboObjectInfo& info = (*it).second; - info.primitiveType = primitiveType; - info.vertexType = VERTEX_TYPE_TEX2; - info.vertexCount = vertexCount; - - m_glBindBuffer(GL_ARRAY_BUFFER, info.bufferId); - m_glBufferData(GL_ARRAY_BUFFER, vertexCount * sizeof(VertexTex2), vertices, GL_STATIC_DRAW); - m_glBindBuffer(GL_ARRAY_BUFFER, 0); - } - else - { - glNewList(bufferId, GL_COMPILE); - - DrawPrimitive(primitiveType, vertices, vertexCount); - - glEndList(); - } -} - -void CGL14Device::UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const VertexCol* vertices, int vertexCount) -{ - if (m_vertexBufferType != VBT_DISPLAY_LIST) - { - auto it = m_vboObjects.find(bufferId); - if (it == m_vboObjects.end()) - return; - - VboObjectInfo& info = (*it).second; - info.primitiveType = primitiveType; - info.vertexType = VERTEX_TYPE_COL; - info.vertexCount = vertexCount; - - m_glBindBuffer(GL_ARRAY_BUFFER, info.bufferId); - m_glBufferData(GL_ARRAY_BUFFER, vertexCount * sizeof(VertexCol), vertices, GL_STATIC_DRAW); - m_glBindBuffer(GL_ARRAY_BUFFER, 0); - } - else - { - glNewList(bufferId, GL_COMPILE); - - DrawPrimitive(primitiveType, vertices, vertexCount); - - glEndList(); - } -} - void CGL14Device::DrawStaticBuffer(unsigned int bufferId) { if (m_vertexBufferType != VBT_DISPLAY_LIST) diff --git a/src/graphics/opengl/gl14device.h b/src/graphics/opengl/gl14device.h index 7bc533af..d02f3550 100644 --- a/src/graphics/opengl/gl14device.h +++ b/src/graphics/opengl/gl14device.h @@ -139,12 +139,31 @@ public: virtual void DrawPrimitives(PrimitiveType type, const VertexCol *vertices, int first[], int count[], int drawCount) override; - unsigned int CreateStaticBuffer(PrimitiveType primitiveType, const Vertex* vertices, int vertexCount) override; - unsigned int CreateStaticBuffer(PrimitiveType primitiveType, const VertexTex2* vertices, int vertexCount) override; - unsigned int CreateStaticBuffer(PrimitiveType primitiveType, const VertexCol* vertices, int vertexCount) override; - void UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const Vertex* vertices, int vertexCount) override; - void UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const VertexTex2* vertices, int vertexCount) override; - void UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const VertexCol* vertices, int vertexCount) override; + unsigned int CreateStaticBuffer(PrimitiveType primitiveType, const Vertex* vertices, int vertexCount) override + { + return CreateStaticBufferImpl(primitiveType, vertices, vertexCount); + } + unsigned int CreateStaticBuffer(PrimitiveType primitiveType, const VertexTex2* vertices, int vertexCount) override + { + return CreateStaticBufferImpl(primitiveType, vertices, vertexCount); + } + unsigned int CreateStaticBuffer(PrimitiveType primitiveType, const VertexCol* vertices, int vertexCount) override + { + return CreateStaticBufferImpl(primitiveType, vertices, vertexCount); + } + void UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const Vertex* vertices, int vertexCount) override + { + UpdateStaticBufferImpl(bufferId, primitiveType, vertices, vertexCount); + } + void UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const VertexTex2* vertices, int vertexCount) override + { + UpdateStaticBufferImpl(bufferId, primitiveType, vertices, vertexCount); + } + void UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const VertexCol* vertices, int vertexCount) override + { + UpdateStaticBufferImpl(bufferId, primitiveType, vertices, vertexCount); + } + void DrawStaticBuffer(unsigned int bufferId) override; void DestroyStaticBuffer(unsigned int bufferId) override; @@ -214,6 +233,11 @@ private: //! Disables shadows void DisableShadows(); + template + unsigned int CreateStaticBufferImpl(PrimitiveType primitiveType, const Vertex* vertices, int vertexCount); + template + void UpdateStaticBufferImpl(unsigned int bufferId, PrimitiveType primitiveType, const Vertex* vertices, int vertexCount); + private: //! Current config DeviceConfig m_config; @@ -260,14 +284,6 @@ private: //! Map of framebuffers std::map> m_framebuffers; - //! Type of vertex structure - enum VertexType - { - VERTEX_TYPE_NORMAL, - VERTEX_TYPE_TEX2, - VERTEX_TYPE_COL, - }; - //! Info about static VBO buffers struct VboObjectInfo { diff --git a/src/graphics/opengl/gl21device.cpp b/src/graphics/opengl/gl21device.cpp index f0bbdbb5..5fbc47eb 100644 --- a/src/graphics/opengl/gl21device.cpp +++ b/src/graphics/opengl/gl21device.cpp @@ -1443,13 +1443,15 @@ void CGL21Device::DrawPrimitives(PrimitiveType type, const VertexCol *vertices, glDisableClientState(GL_COLOR_ARRAY); } -unsigned int CGL21Device::CreateStaticBuffer(PrimitiveType primitiveType, const Vertex* vertices, int vertexCount) + +template +unsigned int CGL21Device::CreateStaticBufferImpl(PrimitiveType primitiveType, const Vertex* vertices, int vertexCount) { unsigned int id = ++m_lastVboId; VboObjectInfo info; info.primitiveType = primitiveType; - info.vertexType = VERTEX_TYPE_NORMAL; + info.vertexType = Vertex::VERTEX_TYPE; info.vertexCount = vertexCount; info.bufferId = 0; info.size = vertexCount * sizeof(Vertex); @@ -1463,47 +1465,8 @@ unsigned int CGL21Device::CreateStaticBuffer(PrimitiveType primitiveType, const return id; } -unsigned int CGL21Device::CreateStaticBuffer(PrimitiveType primitiveType, const VertexTex2* vertices, int vertexCount) -{ - unsigned int id = ++m_lastVboId; - - VboObjectInfo info; - info.primitiveType = primitiveType; - info.vertexType = VERTEX_TYPE_TEX2; - info.vertexCount = vertexCount; - info.bufferId = 0; - info.size = vertexCount * sizeof(VertexTex2); - - glGenBuffers(1, &info.bufferId); - BindVBO(info.bufferId); - glBufferData(GL_ARRAY_BUFFER, info.size, vertices, GL_STATIC_DRAW); - - m_vboObjects[id] = info; - - return id; -} - -unsigned int CGL21Device::CreateStaticBuffer(PrimitiveType primitiveType, const VertexCol* vertices, int vertexCount) -{ - unsigned int id = ++m_lastVboId; - - VboObjectInfo info; - info.primitiveType = primitiveType; - info.vertexType = VERTEX_TYPE_COL; - info.vertexCount = vertexCount; - info.bufferId = 0; - info.size = vertexCount * sizeof(VertexCol); - - glGenBuffers(1, &info.bufferId); - BindVBO(info.bufferId); - glBufferData(GL_ARRAY_BUFFER, info.size, vertices, GL_STATIC_DRAW); - - m_vboObjects[id] = info; - - return id; -} - -void CGL21Device::UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const Vertex* vertices, int vertexCount) +template +void CGL21Device::UpdateStaticBufferImpl(unsigned int bufferId, PrimitiveType primitiveType, const Vertex* vertices, int vertexCount) { auto it = m_vboObjects.find(bufferId); if (it == m_vboObjects.end()) @@ -1513,7 +1476,7 @@ void CGL21Device::UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primit VboObjectInfo& info = (*it).second; info.primitiveType = primitiveType; - info.vertexType = VERTEX_TYPE_NORMAL; + info.vertexType = Vertex::VERTEX_TYPE; info.vertexCount = vertexCount; BindVBO(info.bufferId); @@ -1529,58 +1492,6 @@ void CGL21Device::UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primit } } -void CGL21Device::UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const VertexTex2* vertices, int vertexCount) -{ - auto it = m_vboObjects.find(bufferId); - if (it == m_vboObjects.end()) - return; - - VboObjectInfo& info = (*it).second; - info.primitiveType = primitiveType; - info.vertexType = VERTEX_TYPE_TEX2; - info.vertexCount = vertexCount; - - int newSize = vertexCount * sizeof(VertexTex2); - - BindVBO(info.bufferId); - - if (info.size < newSize) - { - glBufferData(GL_ARRAY_BUFFER, newSize, vertices, GL_STATIC_DRAW); - info.size = newSize; - } - else - { - glBufferSubData(GL_ARRAY_BUFFER, 0, newSize, vertices); - } -} - -void CGL21Device::UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const VertexCol* vertices, int vertexCount) -{ - auto it = m_vboObjects.find(bufferId); - if (it == m_vboObjects.end()) - return; - - VboObjectInfo& info = (*it).second; - info.primitiveType = primitiveType; - info.vertexType = VERTEX_TYPE_COL; - info.vertexCount = vertexCount; - - int newSize = vertexCount * sizeof(VertexCol); - - BindVBO(info.bufferId); - - if (info.size < newSize) - { - glBufferData(GL_ARRAY_BUFFER, newSize, vertices, GL_STATIC_DRAW); - info.size = newSize; - } - else - { - glBufferSubData(GL_ARRAY_BUFFER, 0, newSize, vertices); - } -} - void CGL21Device::DrawStaticBuffer(unsigned int bufferId) { auto it = m_vboObjects.find(bufferId); diff --git a/src/graphics/opengl/gl21device.h b/src/graphics/opengl/gl21device.h index 6e1bf261..c5af3d7e 100644 --- a/src/graphics/opengl/gl21device.h +++ b/src/graphics/opengl/gl21device.h @@ -120,12 +120,30 @@ public: virtual void DrawPrimitives(PrimitiveType type, const VertexCol *vertices, int first[], int count[], int drawCount) override; - unsigned int CreateStaticBuffer(PrimitiveType primitiveType, const Vertex* vertices, int vertexCount) override; - unsigned int CreateStaticBuffer(PrimitiveType primitiveType, const VertexTex2* vertices, int vertexCount) override; - unsigned int CreateStaticBuffer(PrimitiveType primitiveType, const VertexCol* vertices, int vertexCount) override; - void UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const Vertex* vertices, int vertexCount) override; - void UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const VertexTex2* vertices, int vertexCount) override; - void UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const VertexCol* vertices, int vertexCount) override; + unsigned int CreateStaticBuffer(PrimitiveType primitiveType, const Vertex* vertices, int vertexCount) override + { + return CreateStaticBufferImpl(primitiveType, vertices, vertexCount); + } + unsigned int CreateStaticBuffer(PrimitiveType primitiveType, const VertexTex2* vertices, int vertexCount) override + { + return CreateStaticBufferImpl(primitiveType, vertices, vertexCount); + } + unsigned int CreateStaticBuffer(PrimitiveType primitiveType, const VertexCol* vertices, int vertexCount) override + { + return CreateStaticBufferImpl(primitiveType, vertices, vertexCount); + } + void UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const Vertex* vertices, int vertexCount) override + { + UpdateStaticBufferImpl(bufferId, primitiveType, vertices, vertexCount); + } + void UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const VertexTex2* vertices, int vertexCount) override + { + UpdateStaticBufferImpl(bufferId, primitiveType, vertices, vertexCount); + } + void UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const VertexCol* vertices, int vertexCount) override + { + UpdateStaticBufferImpl(bufferId, primitiveType, vertices, vertexCount); + } void DrawStaticBuffer(unsigned int bufferId) override; void DestroyStaticBuffer(unsigned int bufferId) override; @@ -192,6 +210,11 @@ private: //! Binds texture inline void BindTexture(int index, GLuint texture); + template + unsigned int CreateStaticBufferImpl(PrimitiveType primitiveType, const Vertex* vertices, int vertexCount); + template + void UpdateStaticBufferImpl(unsigned int bufferId, PrimitiveType primitiveType, const Vertex* vertices, int vertexCount); + private: //! Current config DeviceConfig m_config; @@ -232,14 +255,6 @@ private: //! Map of framebuffers std::map> m_framebuffers; - //! Type of vertex structure - enum VertexType - { - VERTEX_TYPE_NORMAL, - VERTEX_TYPE_TEX2, - VERTEX_TYPE_COL, - }; - //! Info about static VBO buffers struct VboObjectInfo { diff --git a/src/graphics/opengl/gl33device.cpp b/src/graphics/opengl/gl33device.cpp index 776f1547..0eb70257 100644 --- a/src/graphics/opengl/gl33device.cpp +++ b/src/graphics/opengl/gl33device.cpp @@ -1358,27 +1358,12 @@ void CGL33Device::DrawPrimitives(PrimitiveType type, const VertexCol *vertices, glMultiDrawArrays(TranslateGfxPrimitive(type), first, count, drawCount); } -unsigned int CGL33Device::CreateStaticBuffer(PrimitiveType primitiveType, const Vertex* vertices, int vertexCount) +namespace { - unsigned int id = 0; - - id = ++m_lastVboId; - - VertexBufferInfo info; - info.primitiveType = primitiveType; - info.vertexType = VERTEX_TYPE_NORMAL; - info.vertexCount = vertexCount; - info.size = vertexCount * sizeof(Vertex); - - glGenVertexArrays(1, &info.vao); - BindVAO(info.vao); - - glGenBuffers(1, &info.vbo); - BindVBO(info.vbo); - - glBufferData(GL_ARRAY_BUFFER, info.size, vertices, GL_STATIC_DRAW); - m_vboMemory += info.size; +template void SetVertexAttributes(); +template <> void SetVertexAttributes() +{ // Vertex coordinate glEnableVertexAttribArray(0); glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, sizeof(Vertex), reinterpret_cast(offsetof(Vertex, coord))); @@ -1398,33 +1383,10 @@ unsigned int CGL33Device::CreateStaticBuffer(PrimitiveType primitiveType, const // Texture coordinate 1 glDisableVertexAttribArray(4); glVertexAttrib2f(4, 0.0f, 0.0f); - - m_vboObjects[id] = info; - - return id; } -unsigned int CGL33Device::CreateStaticBuffer(PrimitiveType primitiveType, const VertexTex2* vertices, int vertexCount) +template <> void SetVertexAttributes() { - unsigned int id = 0; - - id = ++m_lastVboId; - - VertexBufferInfo info; - info.primitiveType = primitiveType; - info.vertexType = VERTEX_TYPE_TEX2; - info.vertexCount = vertexCount; - info.size = vertexCount * sizeof(VertexTex2); - - glGenVertexArrays(1, &info.vao); - BindVAO(info.vao); - - glGenBuffers(1, &info.vbo); - BindVBO(info.vbo); - - glBufferData(GL_ARRAY_BUFFER, info.size, vertices, GL_STATIC_DRAW); - m_vboMemory += info.size; - // Vertex coordinate glEnableVertexAttribArray(0); glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, sizeof(VertexTex2), reinterpret_cast(offsetof(VertexTex2, coord))); @@ -1444,31 +1406,10 @@ unsigned int CGL33Device::CreateStaticBuffer(PrimitiveType primitiveType, const // Texture coordinate 1 glEnableVertexAttribArray(4); glVertexAttribPointer(4, 2, GL_FLOAT, GL_FALSE, sizeof(VertexTex2), reinterpret_cast(offsetof(VertexTex2, texCoord2))); - - m_vboObjects[id] = info; - - return id; } -unsigned int CGL33Device::CreateStaticBuffer(PrimitiveType primitiveType, const VertexCol* vertices, int vertexCount) +template <> void SetVertexAttributes() { - unsigned int id = ++m_lastVboId; - - VertexBufferInfo info; - info.primitiveType = primitiveType; - info.vertexType = VERTEX_TYPE_COL; - info.vertexCount = vertexCount; - info.size = vertexCount * sizeof(VertexCol); - - glGenVertexArrays(1, &info.vao); - BindVAO(info.vao); - - glGenBuffers(1, &info.vbo); - BindVBO(info.vbo); - - glBufferData(GL_ARRAY_BUFFER, info.size, vertices, GL_STATIC_DRAW); - m_vboMemory += info.size; - // Vertex coordinate glEnableVertexAttribArray(0); glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, sizeof(VertexCol), reinterpret_cast(offsetof(VertexCol, coord))); @@ -1488,13 +1429,40 @@ unsigned int CGL33Device::CreateStaticBuffer(PrimitiveType primitiveType, const // Texture coordinate 1 glDisableVertexAttribArray(4); glVertexAttrib2f(4, 0.0f, 0.0f); +} +} // namespace + +template +unsigned int CGL33Device::CreateStaticBufferImpl(PrimitiveType primitiveType, const Vertex* vertices, int vertexCount) +{ + unsigned int id = 0; + + id = ++m_lastVboId; + + VertexBufferInfo info; + info.primitiveType = primitiveType; + info.vertexType = Vertex::VERTEX_TYPE; + info.vertexCount = vertexCount; + info.size = vertexCount * sizeof(Vertex); + + glGenVertexArrays(1, &info.vao); + BindVAO(info.vao); + + glGenBuffers(1, &info.vbo); + BindVBO(info.vbo); + + glBufferData(GL_ARRAY_BUFFER, info.size, vertices, GL_STATIC_DRAW); + m_vboMemory += info.size; + + SetVertexAttributes(); m_vboObjects[id] = info; return id; } -void CGL33Device::UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const Vertex* vertices, int vertexCount) +template +void CGL33Device::UpdateStaticBufferImpl(unsigned int bufferId, PrimitiveType primitiveType, const Vertex* vertices, int vertexCount) { auto it = m_vboObjects.find(bufferId); if (it == m_vboObjects.end()) @@ -1504,12 +1472,12 @@ void CGL33Device::UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primit unsigned int size = vertexCount * sizeof(Vertex); - bool changed = (info.vertexType != VERTEX_TYPE_NORMAL) || (size > info.size); + bool changed = (info.vertexType != Vertex::VERTEX_TYPE) || (size > info.size); - if (info.vertexType != VERTEX_TYPE_NORMAL) CLogger::GetInstance().Debug("Changing static buffer type\n"); + if (info.vertexType != Vertex::VERTEX_TYPE) CLogger::GetInstance().Debug("Changing static buffer type\n"); info.primitiveType = primitiveType; - info.vertexType = VERTEX_TYPE_NORMAL; + info.vertexType = Vertex::VERTEX_TYPE; info.vertexCount = vertexCount; BindVBO(info.vbo); @@ -1531,143 +1499,7 @@ void CGL33Device::UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primit { BindVAO(info.vao); - // Vertex coordinate - glEnableVertexAttribArray(0); - glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, sizeof(Vertex), reinterpret_cast(offsetof(Vertex, coord))); - - // Normal - glEnableVertexAttribArray(1); - glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, sizeof(Vertex), reinterpret_cast(offsetof(Vertex, normal))); - - // Color - glDisableVertexAttribArray(2); - glVertexAttrib4f(2, 1.0f, 1.0f, 1.0f, 1.0f); - - // Texture coordinate 0 - glEnableVertexAttribArray(3); - glVertexAttribPointer(3, 2, GL_FLOAT, GL_FALSE, sizeof(Vertex), reinterpret_cast(offsetof(Vertex, texCoord))); - - // Texture coordinate 1 - glDisableVertexAttribArray(4); - glVertexAttrib2f(4, 0.0f, 0.0f); - } -} - -void CGL33Device::UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const VertexTex2* vertices, int vertexCount) -{ - auto it = m_vboObjects.find(bufferId); - if (it == m_vboObjects.end()) - return; - - VertexBufferInfo& info = (*it).second; - - unsigned int size = vertexCount * sizeof(VertexTex2); - - bool changed = (info.vertexType != VERTEX_TYPE_TEX2) || (size > info.size); - - if (info.vertexType != VERTEX_TYPE_TEX2) CLogger::GetInstance().Debug("Changing static buffer type\n"); - - info.primitiveType = primitiveType; - info.vertexType = VERTEX_TYPE_TEX2; - info.vertexCount = vertexCount; - - BindVBO(info.vbo); - - if (info.size < size) - { - CLogger::GetInstance().Debug("Resizing static buffer: %d->%d\n", info.size, size); - glBufferData(GL_ARRAY_BUFFER, size, vertices, GL_STATIC_DRAW); - m_vboMemory -= info.size; - info.size = size; - m_vboMemory += info.size; - } - else - { - glBufferSubData(GL_ARRAY_BUFFER, 0, size, vertices); - } - - if (changed) // Update vertex array bindings - { - BindVAO(info.vao); - - // Vertex coordinate - glEnableVertexAttribArray(0); - glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, sizeof(VertexTex2), reinterpret_cast(offsetof(VertexTex2, coord))); - - // Normal - glEnableVertexAttribArray(1); - glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, sizeof(VertexTex2), reinterpret_cast(offsetof(VertexTex2, normal))); - - // Color - glDisableVertexAttribArray(2); - glVertexAttrib4f(2, 1.0f, 1.0f, 1.0f, 1.0f); - - // Texture coordinate 0 - glEnableVertexAttribArray(3); - glVertexAttribPointer(3, 2, GL_FLOAT, GL_FALSE, sizeof(VertexTex2), reinterpret_cast(offsetof(VertexTex2, texCoord))); - - // Texture coordinate 1 - glEnableVertexAttribArray(4); - glVertexAttribPointer(4, 2, GL_FLOAT, GL_FALSE, sizeof(VertexTex2), reinterpret_cast(offsetof(VertexTex2, texCoord2))); - } -} - -void CGL33Device::UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const VertexCol* vertices, int vertexCount) -{ - auto it = m_vboObjects.find(bufferId); - if (it == m_vboObjects.end()) - return; - - VertexBufferInfo& info = (*it).second; - - unsigned int size = vertexCount * sizeof(VertexCol); - - bool changed = (info.vertexType != VERTEX_TYPE_COL) || (size > info.size); - - if (info.vertexType != VERTEX_TYPE_NORMAL) CLogger::GetInstance().Debug("Changing static buffer type\n"); - - info.primitiveType = primitiveType; - info.vertexType = VERTEX_TYPE_COL; - info.vertexCount = vertexCount; - - BindVBO(info.vbo); - - if (info.size < size) - { - CLogger::GetInstance().Debug("Resizing static buffer: %d->%d\n", info.size, size); - glBufferData(GL_ARRAY_BUFFER, size, vertices, GL_STATIC_DRAW); - m_vboMemory -= info.size; - info.size = size; - m_vboMemory += info.size; - } - else - { - glBufferSubData(GL_ARRAY_BUFFER, 0, size, vertices); - } - - if (changed) // Update vertex array bindings - { - BindVAO(info.vao); - - // Vertex coordinate - glEnableVertexAttribArray(0); - glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, sizeof(VertexCol), reinterpret_cast(offsetof(VertexCol, coord))); - - // Normal - glDisableVertexAttribArray(1); - glVertexAttrib3f(1, 0.0f, 0.0f, 1.0f); - - // Color - glEnableVertexAttribArray(2); - glVertexAttribPointer(2, 4, GL_FLOAT, GL_FALSE, sizeof(VertexCol), reinterpret_cast(offsetof(VertexCol, color))); - - // Texture coordinate 0 - glDisableVertexAttribArray(3); - glVertexAttrib2f(3, 0.0f, 0.0f); - - // Texture coordinate 1 - glDisableVertexAttribArray(4); - glVertexAttrib2f(4, 0.0f, 0.0f); + SetVertexAttributes(); } } diff --git a/src/graphics/opengl/gl33device.h b/src/graphics/opengl/gl33device.h index b0b452e0..0c73999c 100644 --- a/src/graphics/opengl/gl33device.h +++ b/src/graphics/opengl/gl33device.h @@ -135,12 +135,30 @@ public: virtual void DrawPrimitives(PrimitiveType type, const VertexCol *vertices, int first[], int count[], int drawCount) override; - unsigned int CreateStaticBuffer(PrimitiveType primitiveType, const Vertex* vertices, int vertexCount) override; - unsigned int CreateStaticBuffer(PrimitiveType primitiveType, const VertexTex2* vertices, int vertexCount) override; - unsigned int CreateStaticBuffer(PrimitiveType primitiveType, const VertexCol* vertices, int vertexCount) override; - void UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const Vertex* vertices, int vertexCount) override; - void UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const VertexTex2* vertices, int vertexCount) override; - void UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const VertexCol* vertices, int vertexCount) override; + unsigned int CreateStaticBuffer(PrimitiveType primitiveType, const Vertex* vertices, int vertexCount) override + { + return CreateStaticBufferImpl(primitiveType, vertices, vertexCount); + } + unsigned int CreateStaticBuffer(PrimitiveType primitiveType, const VertexTex2* vertices, int vertexCount) override + { + return CreateStaticBufferImpl(primitiveType, vertices, vertexCount); + } + unsigned int CreateStaticBuffer(PrimitiveType primitiveType, const VertexCol* vertices, int vertexCount) override + { + return CreateStaticBufferImpl(primitiveType, vertices, vertexCount); + } + void UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const Vertex* vertices, int vertexCount) override + { + UpdateStaticBufferImpl(bufferId, primitiveType, vertices, vertexCount); + } + void UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const VertexTex2* vertices, int vertexCount) override + { + UpdateStaticBufferImpl(bufferId, primitiveType, vertices, vertexCount); + } + void UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const VertexCol* vertices, int vertexCount) override + { + UpdateStaticBufferImpl(bufferId, primitiveType, vertices, vertexCount); + } void DrawStaticBuffer(unsigned int bufferId) override; void DestroyStaticBuffer(unsigned int bufferId) override; @@ -215,6 +233,11 @@ private: inline void UpdateVertexAttribute(int index, const VertexAttribute &attribute, int offset); + template + unsigned int CreateStaticBufferImpl(PrimitiveType primitiveType, const Vertex* vertices, int vertexCount); + template + void UpdateStaticBufferImpl(unsigned int bufferId, PrimitiveType primitiveType, const Vertex* vertices, int vertexCount); + private: //! Current config DeviceConfig m_config; @@ -256,14 +279,6 @@ private: //! Free texture unit const int m_freeTexture = 3; - //! Type of vertex structure - enum VertexType - { - VERTEX_TYPE_NORMAL, - VERTEX_TYPE_TEX2, - VERTEX_TYPE_COL, - }; - //! Info about static VBO buffers struct VertexBufferInfo { From f8ebc6ec217d7787d2e2607931fe90e3e1235432 Mon Sep 17 00:00:00 2001 From: AbigailBuccaneer Date: Thu, 3 May 2018 18:21:21 +0100 Subject: [PATCH 083/207] Remove code for drawing dynamic vertex formats It's unused, and it's a bad idea - it's important for authoring tools and for performance that vertex formats are well-defined instead of dynamically created. --- src/graphics/core/device.h | 8 -- src/graphics/core/nulldevice.cpp | 10 -- src/graphics/core/nulldevice.h | 5 - src/graphics/core/vertex.h | 53 ---------- src/graphics/opengl/gl14device.cpp | 162 ----------------------------- src/graphics/opengl/gl14device.h | 5 - src/graphics/opengl/gl21device.cpp | 160 ---------------------------- src/graphics/opengl/gl21device.h | 5 - src/graphics/opengl/gl33device.cpp | 63 ----------- src/graphics/opengl/gl33device.h | 7 -- 10 files changed, 478 deletions(-) diff --git a/src/graphics/core/device.h b/src/graphics/core/device.h index 3302488c..2cc94992 100644 --- a/src/graphics/core/device.h +++ b/src/graphics/core/device.h @@ -416,14 +416,6 @@ public: //! Sets only the texture wrap modes (for faster than thru stage params) virtual void SetTextureStageWrap(int index, TexWrapMode wrapS, TexWrapMode wrapT) = 0; - //! Renders primitive composed of generic vertices - virtual void DrawPrimitive(PrimitiveType type, const void *vertices, - int size, const VertexFormat &format, int vertexCount) = 0; - - //! Renders multiple primitives composed of generic vertices - virtual void DrawPrimitives(PrimitiveType type, const void *vertices, - int size, const VertexFormat &format, int first[], int count[], int drawCount) = 0; - //! Renders primitive composed of vertices with single texture virtual void DrawPrimitive(PrimitiveType type, const Vertex *vertices , int vertexCount, Color color = Color(1.0f, 1.0f, 1.0f, 1.0f)) = 0; diff --git a/src/graphics/core/nulldevice.cpp b/src/graphics/core/nulldevice.cpp index 1fd1a09b..cf9f5a67 100644 --- a/src/graphics/core/nulldevice.cpp +++ b/src/graphics/core/nulldevice.cpp @@ -168,16 +168,6 @@ void CNullDevice::DrawPrimitive(PrimitiveType type, const VertexCol *vertices, i { } -void CNullDevice::DrawPrimitive(PrimitiveType type, const void *vertices, - int size, const VertexFormat &format, int vertexCount) -{ -} - -void CNullDevice::DrawPrimitives(PrimitiveType type, const void *vertices, - int size, const VertexFormat &format, int first[], int count[], int drawCount) -{ -} - void CNullDevice::DrawPrimitives(PrimitiveType type, const Vertex *vertices, int first[], int count[], int drawCount, Color color) { diff --git a/src/graphics/core/nulldevice.h b/src/graphics/core/nulldevice.h index 4816251b..0d6c7ab8 100644 --- a/src/graphics/core/nulldevice.h +++ b/src/graphics/core/nulldevice.h @@ -81,11 +81,6 @@ public: void SetTextureStageWrap(int index, Gfx::TexWrapMode wrapS, Gfx::TexWrapMode wrapT) override; - void DrawPrimitive(PrimitiveType type, const void *vertices, - int size, const VertexFormat &format, int vertexCount) override; - void DrawPrimitives(PrimitiveType type, const void *vertices, - int size, const VertexFormat &format, int first[], int count[], int drawCount) override; - void DrawPrimitive(PrimitiveType type, const Vertex* vertices, int vertexCount, Color color = Color(1.0f, 1.0f, 1.0f, 1.0f)) override; void DrawPrimitive(PrimitiveType type, const VertexTex2* vertices, int vertexCount, Color color = Color(1.0f, 1.0f, 1.0f, 1.0f)) override; void DrawPrimitive(PrimitiveType type, const VertexCol *vertices, int vertexCount) override; diff --git a/src/graphics/core/vertex.h b/src/graphics/core/vertex.h index 30acc2af..e5b71733 100644 --- a/src/graphics/core/vertex.h +++ b/src/graphics/core/vertex.h @@ -39,59 +39,6 @@ namespace Gfx { - -/** -* \struct VertexAttribute -* \brief Vertex attribute -* -* This structure contains parameters for a vertex attribute. -*/ -struct VertexAttribute -{ - //! true enables vertex attribute - bool enabled = false; - //! true means normalized value (integer types only) - bool normalized = false; - //! Number of elements in the vertex attribute. - //! Valid values are 1, 2, 3, and 4. Depends on specific attribute. - unsigned char size = 0; - //! Type of values in vertex attribute - Type type = Type::UBYTE; - //! Offset to the vertex attribute - int offset = 0; - //! Stride of vertex attribute - int stride = 0; - //! Default values used when attribute is disabled - float values[4] = {0.0f, 0.0f, 0.0f, 0.0f}; -}; - -/** -* \struct VertexFormat -* \brief Vertex format -* -* This structure defines vertex formats for generic vertex arrays. -* -* It contains: -* - vertex coordinate specification -* - color specification -* - normal specification -* - texture coordinate 1 specification -* - texture coordinate 2 specification -*/ -struct VertexFormat -{ - //! Vertex coordinate - VertexAttribute vertex{}; - //! Color - VertexAttribute color{}; - //! Normal - VertexAttribute normal{}; - //! Texture coordinate 1 - VertexAttribute tex1{}; - //! Texture coordinate 2 - VertexAttribute tex2{}; -}; - enum VertexType { VERTEX_TYPE_NORMAL, diff --git a/src/graphics/opengl/gl14device.cpp b/src/graphics/opengl/gl14device.cpp index 4304859e..b427aae3 100644 --- a/src/graphics/opengl/gl14device.cpp +++ b/src/graphics/opengl/gl14device.cpp @@ -1371,168 +1371,6 @@ void CGL14Device::DrawPrimitive(PrimitiveType type, const VertexCol *vertices, i glDisableClientState(GL_COLOR_ARRAY); } -void CGL14Device::DrawPrimitive(PrimitiveType type, const void *vertices, - int size, const VertexFormat &format, int vertexCount) -{ - const char *ptr = reinterpret_cast(vertices); - - glEnableClientState(GL_VERTEX_ARRAY); - glVertexPointer(format.vertex.size, - TransformType(format.vertex.type), - format.vertex.stride, - ptr + format.vertex.offset); - - if (format.color.enabled) - { - glEnableClientState(GL_COLOR_ARRAY); - glColorPointer(format.color.size, - TransformType(format.color.type), - format.color.stride, - ptr + format.color.offset); - } - else - glColor4fv(format.color.values); - - if (format.normal.enabled) - { - glEnableClientState(GL_NORMAL_ARRAY); - glNormalPointer(TransformType(format.normal.type), - format.normal.stride, - ptr + format.normal.offset); - } - else - glNormal3fv(format.normal.values); - - glClientActiveTexture(GL_TEXTURE0 + m_remap[0]); - if (format.tex1.enabled) - { - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - glTexCoordPointer(format.tex1.size, - TransformType(format.tex1.type), - format.tex1.stride, - ptr + format.tex1.offset); - } - else - glTexCoord2fv(format.tex1.values); - - glClientActiveTexture(GL_TEXTURE0 + m_remap[1]); - if (format.tex2.enabled) - { - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - glTexCoordPointer(format.tex2.size, - TransformType(format.tex2.type), - format.tex2.stride, - ptr + format.tex2.offset); - } - else - glTexCoord2fv(format.tex2.values); - - glDrawArrays(TranslateGfxPrimitive(type), 0, vertexCount); - - glDisableClientState(GL_VERTEX_ARRAY); - - if (format.color.enabled) glDisableClientState(GL_COLOR_ARRAY); - if (format.normal.enabled) glDisableClientState(GL_NORMAL_ARRAY); - - if (format.tex1.enabled) - { - glClientActiveTexture(GL_TEXTURE0 + m_remap[0]); - glDisableClientState(GL_TEXTURE_COORD_ARRAY); - } - - if (format.tex2.enabled) - { - glClientActiveTexture(GL_TEXTURE0 + m_remap[1]); - glDisableClientState(GL_TEXTURE_COORD_ARRAY); - } -} - -void CGL14Device::DrawPrimitives(PrimitiveType type, const void *vertices, - int size, const VertexFormat &format, int first[], int count[], int drawCount) -{ - const char *ptr = reinterpret_cast(vertices); - - glEnableClientState(GL_VERTEX_ARRAY); - glVertexPointer(format.vertex.size, - TransformType(format.vertex.type), - format.vertex.stride, - ptr + format.vertex.offset); - - if (format.color.enabled) - { - glEnableClientState(GL_COLOR_ARRAY); - glColorPointer(format.color.size, - TransformType(format.color.type), - format.color.stride, - ptr + format.color.offset); - } - else - glColor4fv(format.color.values); - - if (format.normal.enabled) - { - glEnableClientState(GL_NORMAL_ARRAY); - glNormalPointer(TransformType(format.normal.type), - format.normal.stride, - ptr + format.normal.offset); - } - else - glNormal3fv(format.normal.values); - - glClientActiveTexture(GL_TEXTURE0 + m_remap[0]); - if (format.tex1.enabled) - { - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - glTexCoordPointer(format.tex1.size, - TransformType(format.tex1.type), - format.tex1.stride, - ptr + format.tex1.offset); - } - else - glTexCoord2fv(format.tex1.values); - - glClientActiveTexture(GL_TEXTURE0 + m_remap[1]); - if (format.tex2.enabled) - { - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - glTexCoordPointer(format.tex2.size, - TransformType(format.tex2.type), - format.tex2.stride, - ptr + format.tex2.offset); - } - else - glTexCoord2fv(format.tex2.values); - - GLenum t = TranslateGfxPrimitive(type); - - if (m_multiDrawArrays) - { - glMultiDrawArrays(t, first, count, drawCount); - } - else - { - for (int i = 0; i < drawCount; i++) - glDrawArrays(t, first[i], count[i]); - } - - glDisableClientState(GL_VERTEX_ARRAY); - - if (format.color.enabled) glDisableClientState(GL_COLOR_ARRAY); - if (format.normal.enabled) glDisableClientState(GL_NORMAL_ARRAY); - - if (format.tex1.enabled) - { - glClientActiveTexture(GL_TEXTURE0 + m_remap[0]); - glDisableClientState(GL_TEXTURE_COORD_ARRAY); - } - - if (format.tex2.enabled) - { - glClientActiveTexture(GL_TEXTURE0 + m_remap[1]); - glDisableClientState(GL_TEXTURE_COORD_ARRAY); - } -} - void CGL14Device::DrawPrimitives(PrimitiveType type, const Vertex *vertices, int first[], int count[], int drawCount, Color color) { diff --git a/src/graphics/opengl/gl14device.h b/src/graphics/opengl/gl14device.h index d02f3550..ffb86b95 100644 --- a/src/graphics/opengl/gl14device.h +++ b/src/graphics/opengl/gl14device.h @@ -119,11 +119,6 @@ public: void SetTextureStageWrap(int index, Gfx::TexWrapMode wrapS, Gfx::TexWrapMode wrapT) override; - virtual void DrawPrimitive(PrimitiveType type, const void *vertices, - int size, const VertexFormat &format, int vertexCount) override; - virtual void DrawPrimitives(PrimitiveType type, const void *vertices, - int size, const VertexFormat &format, int first[], int count[], int drawCount) override; - virtual void DrawPrimitive(PrimitiveType type, const Vertex *vertices , int vertexCount, Color color = Color(1.0f, 1.0f, 1.0f, 1.0f)) override; virtual void DrawPrimitive(PrimitiveType type, const VertexTex2 *vertices, int vertexCount, diff --git a/src/graphics/opengl/gl21device.cpp b/src/graphics/opengl/gl21device.cpp index 5fbc47eb..9bd5301a 100644 --- a/src/graphics/opengl/gl21device.cpp +++ b/src/graphics/opengl/gl21device.cpp @@ -1199,166 +1199,6 @@ void CGL21Device::DrawPrimitive(PrimitiveType type, const VertexCol *vertices, i glDisableClientState(GL_COLOR_ARRAY); } -void CGL21Device::DrawPrimitive(PrimitiveType type, const void *vertices, - int size, const VertexFormat &format, int vertexCount) -{ - if (m_updateLights) UpdateLights(); - - BindVBO(0); - - const char *ptr = reinterpret_cast(vertices); - - glEnableClientState(GL_VERTEX_ARRAY); - glVertexPointer(format.vertex.size, - TransformType(format.vertex.type), - format.vertex.stride, - ptr + format.vertex.offset); - - if (format.color.enabled) - { - glEnableClientState(GL_COLOR_ARRAY); - glColorPointer(format.color.size, - TransformType(format.color.type), - format.color.stride, - ptr + format.color.offset); - } - else - glColor4fv(format.color.values); - - if (format.normal.enabled) - { - glEnableClientState(GL_NORMAL_ARRAY); - glNormalPointer(TransformType(format.normal.type), - format.normal.stride, - ptr + format.normal.offset); - } - else - glNormal3fv(format.normal.values); - - glClientActiveTexture(GL_TEXTURE0); - if (format.tex1.enabled) - { - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - glTexCoordPointer(format.tex1.size, - TransformType(format.tex1.type), - format.tex1.stride, - ptr + format.tex1.offset); - } - else - glTexCoord2fv(format.tex1.values); - - glClientActiveTexture(GL_TEXTURE1); - if (format.tex2.enabled) - { - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - glTexCoordPointer(format.tex2.size, - TransformType(format.tex2.type), - format.tex2.stride, - ptr + format.tex2.offset); - } - else - glTexCoord2fv(format.tex2.values); - - glDrawArrays(TranslateGfxPrimitive(type), 0, vertexCount); - - glDisableClientState(GL_VERTEX_ARRAY); - - if (format.color.enabled) glDisableClientState(GL_COLOR_ARRAY); - if (format.normal.enabled) glDisableClientState(GL_NORMAL_ARRAY); - - if (format.tex1.enabled) - { - glClientActiveTexture(GL_TEXTURE0); - glDisableClientState(GL_TEXTURE_COORD_ARRAY); - } - - if (format.tex2.enabled) - { - glClientActiveTexture(GL_TEXTURE1); - glDisableClientState(GL_TEXTURE_COORD_ARRAY); - } -} - -void CGL21Device::DrawPrimitives(PrimitiveType type, const void *vertices, - int size, const VertexFormat &format, int first[], int count[], int drawCount) -{ - if (m_updateLights) UpdateLights(); - - BindVBO(0); - - const char *ptr = reinterpret_cast(vertices); - - glEnableClientState(GL_VERTEX_ARRAY); - glVertexPointer(format.vertex.size, - TransformType(format.vertex.type), - format.vertex.stride, - ptr + format.vertex.offset); - - if (format.color.enabled) - { - glEnableClientState(GL_COLOR_ARRAY); - glColorPointer(format.color.size, - TransformType(format.color.type), - format.color.stride, - ptr + format.color.offset); - } - else - glColor4fv(format.color.values); - - if (format.normal.enabled) - { - glEnableClientState(GL_NORMAL_ARRAY); - glNormalPointer(TransformType(format.normal.type), - format.normal.stride, - ptr + format.normal.offset); - } - else - glNormal3fv(format.normal.values); - - glClientActiveTexture(GL_TEXTURE0); - if (format.tex1.enabled) - { - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - glTexCoordPointer(format.tex1.size, - TransformType(format.tex1.type), - format.tex1.stride, - ptr + format.tex1.offset); - } - else - glTexCoord2fv(format.tex1.values); - - glClientActiveTexture(GL_TEXTURE1); - if (format.tex2.enabled) - { - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - glTexCoordPointer(format.tex2.size, - TransformType(format.tex2.type), - format.tex2.stride, - ptr + format.tex2.offset); - } - else - glTexCoord2fv(format.tex2.values); - - glMultiDrawArrays(TranslateGfxPrimitive(type), first, count, drawCount); - - glDisableClientState(GL_VERTEX_ARRAY); - - if (format.color.enabled) glDisableClientState(GL_COLOR_ARRAY); - if (format.normal.enabled) glDisableClientState(GL_NORMAL_ARRAY); - - if (format.tex1.enabled) - { - glClientActiveTexture(GL_TEXTURE0); - glDisableClientState(GL_TEXTURE_COORD_ARRAY); - } - - if (format.tex2.enabled) - { - glClientActiveTexture(GL_TEXTURE1); - glDisableClientState(GL_TEXTURE_COORD_ARRAY); - } -} - void CGL21Device::DrawPrimitives(PrimitiveType type, const Vertex *vertices, int first[], int count[], int drawCount, Color color) { diff --git a/src/graphics/opengl/gl21device.h b/src/graphics/opengl/gl21device.h index c5af3d7e..873afdf7 100644 --- a/src/graphics/opengl/gl21device.h +++ b/src/graphics/opengl/gl21device.h @@ -100,11 +100,6 @@ public: void SetTextureStageWrap(int index, Gfx::TexWrapMode wrapS, Gfx::TexWrapMode wrapT) override; - virtual void DrawPrimitive(PrimitiveType type, const void *vertices, - int size, const VertexFormat &format, int vertexCount) override; - virtual void DrawPrimitives(PrimitiveType type, const void *vertices, - int size, const VertexFormat &format, int first[], int count[], int drawCount) override; - virtual void DrawPrimitive(PrimitiveType type, const Vertex *vertices , int vertexCount, Color color = Color(1.0f, 1.0f, 1.0f, 1.0f)) override; virtual void DrawPrimitive(PrimitiveType type, const VertexTex2 *vertices, int vertexCount, diff --git a/src/graphics/opengl/gl33device.cpp b/src/graphics/opengl/gl33device.cpp index 0eb70257..0180f247 100644 --- a/src/graphics/opengl/gl33device.cpp +++ b/src/graphics/opengl/gl33device.cpp @@ -1158,50 +1158,6 @@ void CGL33Device::DrawPrimitive(PrimitiveType type, const VertexCol *vertices, i glDrawArrays(TranslateGfxPrimitive(type), 0, vertexCount); } -void CGL33Device::DrawPrimitive(PrimitiveType type, const void *vertices, - int size, const VertexFormat &format, int vertexCount) -{ - if (m_updateLights) UpdateLights(); - - DynamicBuffer& buffer = m_dynamicBuffer; - - BindVAO(buffer.vao); - BindVBO(buffer.vbo); - - unsigned int offset = UploadVertexData(buffer, vertices, size); - - // Update vertex attribute bindings - UpdateVertexAttribute(0, format.vertex, offset); - UpdateVertexAttribute(1, format.normal, offset); - UpdateVertexAttribute(2, format.color, offset); - UpdateVertexAttribute(3, format.tex1, offset); - UpdateVertexAttribute(4, format.tex2, offset); - - glDrawArrays(TranslateGfxPrimitive(type), 0, vertexCount); -} - -void CGL33Device::DrawPrimitives(PrimitiveType type, const void *vertices, - int size, const VertexFormat &format, int first[], int count[], int drawCount) -{ - if (m_updateLights) UpdateLights(); - - DynamicBuffer& buffer = m_dynamicBuffer; - - BindVAO(buffer.vao); - BindVBO(buffer.vbo); - - unsigned int offset = UploadVertexData(buffer, vertices, size); - - // Update vertex attribute bindings - UpdateVertexAttribute(0, format.vertex, offset); - UpdateVertexAttribute(1, format.normal, offset); - UpdateVertexAttribute(2, format.color, offset); - UpdateVertexAttribute(3, format.tex1, offset); - UpdateVertexAttribute(4, format.tex2, offset); - - glMultiDrawArrays(TranslateGfxPrimitive(type), first, count, drawCount); -} - void CGL33Device::DrawPrimitives(PrimitiveType type, const Vertex *vertices, int first[], int count[], int drawCount, Color color) { @@ -1924,25 +1880,6 @@ unsigned int CGL33Device::UploadVertexData(DynamicBuffer& buffer, const void* da return currentOffset; } -void CGL33Device::UpdateVertexAttribute(int index, const VertexAttribute &attribute, int offset) -{ - if (attribute.enabled) - { - glEnableVertexAttribArray(index); - glVertexAttribPointer(index, - attribute.size, - TranslateType(attribute.type), - attribute.normalized ? GL_TRUE : GL_FALSE, - attribute.stride, - reinterpret_cast(offset + attribute.offset)); - } - else - { - glDisableVertexAttribArray(index); - glVertexAttrib4fv(index, attribute.values); - } -} - bool CGL33Device::IsAnisotropySupported() { return m_capabilities.anisotropySupported; diff --git a/src/graphics/opengl/gl33device.h b/src/graphics/opengl/gl33device.h index 0c73999c..7b3aa26a 100644 --- a/src/graphics/opengl/gl33device.h +++ b/src/graphics/opengl/gl33device.h @@ -115,11 +115,6 @@ public: void SetTextureStageWrap(int index, Gfx::TexWrapMode wrapS, Gfx::TexWrapMode wrapT) override; - virtual void DrawPrimitive(PrimitiveType type, const void *vertices, - int size, const VertexFormat &format, int vertexCount) override; - virtual void DrawPrimitives(PrimitiveType type, const void *vertices, - int size, const VertexFormat &format, int first[], int count[], int drawCount) override; - virtual void DrawPrimitive(PrimitiveType type, const Vertex *vertices , int vertexCount, Color color = Color(1.0f, 1.0f, 1.0f, 1.0f)) override; virtual void DrawPrimitive(PrimitiveType type, const VertexTex2 *vertices, int vertexCount, @@ -231,8 +226,6 @@ private: //! Uploads data to dynamic buffer and returns offset to it unsigned int UploadVertexData(DynamicBuffer& buffer, const void* data, unsigned int size); - inline void UpdateVertexAttribute(int index, const VertexAttribute &attribute, int offset); - template unsigned int CreateStaticBufferImpl(PrimitiveType primitiveType, const Vertex* vertices, int vertexCount); template From c9a8a242a084667336cda9032300cdfafc45f1ab Mon Sep 17 00:00:00 2001 From: AbigailBuccaneer Date: Fri, 4 May 2018 13:34:37 +0100 Subject: [PATCH 084/207] Remove CGL14Device's support for display lists Closes #1153. --- src/graphics/opengl/gl14device.cpp | 224 ++++++++++++----------------- src/graphics/opengl/gl14device.h | 13 -- 2 files changed, 93 insertions(+), 144 deletions(-) diff --git a/src/graphics/opengl/gl14device.cpp b/src/graphics/opengl/gl14device.cpp index b427aae3..2dfee282 100644 --- a/src/graphics/opengl/gl14device.cpp +++ b/src/graphics/opengl/gl14device.cpp @@ -257,7 +257,6 @@ bool CGL14Device::Create() if (glVersion >= 15) { GetLogger()->Info("Core VBO supported\n", glMajor, glMinor); - m_vertexBufferType = VBT_VBO_CORE; // Set function pointers m_glGenBuffers = glGenBuffers; @@ -269,7 +268,6 @@ bool CGL14Device::Create() else if (vboARB) // VBO ARB extension available { GetLogger()->Info("ARB VBO supported\n"); - m_vertexBufferType = VBT_VBO_ARB; // Set function pointers m_glGenBuffers = glGenBuffersARB; @@ -280,8 +278,11 @@ bool CGL14Device::Create() } else // no VBO support { - GetLogger()->Info("VBO not supported\n"); - m_vertexBufferType = VBT_DISPLAY_LIST; + m_errorMessage = "Your graphics card or drivers don't support OpenGL 1.5 or vertex buffer objects.\n" + "Ensure you have the latest graphics drivers for your graphics card.\n\n"; + GetLogger()->Error(m_errorMessage.c_str()); + m_errorMessage += GetHardwareInfo(); + return false; } // This is mostly done in all modern hardware by default @@ -1476,34 +1477,20 @@ void CGL14Device::DrawPrimitives(PrimitiveType type, const VertexCol *vertices, template unsigned int CGL14Device::CreateStaticBufferImpl(PrimitiveType primitiveType, const Vertex* vertices, int vertexCount) { - unsigned int id = 0; - if (m_vertexBufferType != VBT_DISPLAY_LIST) - { - id = ++m_lastVboId; + unsigned int id = ++m_lastVboId; - VboObjectInfo info; - info.primitiveType = primitiveType; - info.vertexType = Vertex::VERTEX_TYPE; - info.vertexCount = vertexCount; - info.bufferId = 0; + VboObjectInfo info; + info.primitiveType = primitiveType; + info.vertexType = Vertex::VERTEX_TYPE; + info.vertexCount = vertexCount; + info.bufferId = 0; - m_glGenBuffers(1, &info.bufferId); - m_glBindBuffer(GL_ARRAY_BUFFER, info.bufferId); - m_glBufferData(GL_ARRAY_BUFFER, vertexCount * sizeof(Vertex), vertices, GL_STATIC_DRAW); - m_glBindBuffer(GL_ARRAY_BUFFER, 0); + m_glGenBuffers(1, &info.bufferId); + m_glBindBuffer(GL_ARRAY_BUFFER, info.bufferId); + m_glBufferData(GL_ARRAY_BUFFER, vertexCount * sizeof(Vertex), vertices, GL_STATIC_DRAW); + m_glBindBuffer(GL_ARRAY_BUFFER, 0); - m_vboObjects[id] = info; - } - else - { - id = glGenLists(1); - - glNewList(id, GL_COMPILE); - - DrawPrimitive(primitiveType, vertices, vertexCount); - - glEndList(); - } + m_vboObjects[id] = info; return id; } @@ -1511,126 +1498,101 @@ unsigned int CGL14Device::CreateStaticBufferImpl(PrimitiveType primitiveType, co template void CGL14Device::UpdateStaticBufferImpl(unsigned int bufferId, PrimitiveType primitiveType, const Vertex* vertices, int vertexCount) { - if (m_vertexBufferType != VBT_DISPLAY_LIST) - { - auto it = m_vboObjects.find(bufferId); - if (it == m_vboObjects.end()) - return; + auto it = m_vboObjects.find(bufferId); + if (it == m_vboObjects.end()) + return; - VboObjectInfo& info = (*it).second; - info.primitiveType = primitiveType; - info.vertexType = Vertex::VERTEX_TYPE; - info.vertexCount = vertexCount; + VboObjectInfo& info = (*it).second; + info.primitiveType = primitiveType; + info.vertexType = Vertex::VERTEX_TYPE; + info.vertexCount = vertexCount; - m_glBindBuffer(GL_ARRAY_BUFFER, info.bufferId); - m_glBufferData(GL_ARRAY_BUFFER, vertexCount * sizeof(Vertex), vertices, GL_STATIC_DRAW); - m_glBindBuffer(GL_ARRAY_BUFFER, 0); - } - else - { - glNewList(bufferId, GL_COMPILE); - - DrawPrimitive(primitiveType, vertices, vertexCount); - - glEndList(); - } + m_glBindBuffer(GL_ARRAY_BUFFER, info.bufferId); + m_glBufferData(GL_ARRAY_BUFFER, vertexCount * sizeof(Vertex), vertices, GL_STATIC_DRAW); + m_glBindBuffer(GL_ARRAY_BUFFER, 0); } void CGL14Device::DrawStaticBuffer(unsigned int bufferId) { - if (m_vertexBufferType != VBT_DISPLAY_LIST) + auto it = m_vboObjects.find(bufferId); + if (it == m_vboObjects.end()) + return; + + m_glBindBuffer(GL_ARRAY_BUFFER, (*it).second.bufferId); + + if ((*it).second.vertexType == VERTEX_TYPE_NORMAL) { - auto it = m_vboObjects.find(bufferId); - if (it == m_vboObjects.end()) - return; + glEnableClientState(GL_VERTEX_ARRAY); + glVertexPointer(3, GL_FLOAT, sizeof(Vertex), static_cast(nullptr) + offsetof(Vertex, coord)); - m_glBindBuffer(GL_ARRAY_BUFFER, (*it).second.bufferId); + glEnableClientState(GL_NORMAL_ARRAY); + glNormalPointer(GL_FLOAT, sizeof(Vertex), static_cast(nullptr) + offsetof(Vertex, normal)); - if ((*it).second.vertexType == VERTEX_TYPE_NORMAL) - { - glEnableClientState(GL_VERTEX_ARRAY); - glVertexPointer(3, GL_FLOAT, sizeof(Vertex), static_cast(nullptr) + offsetof(Vertex, coord)); - - glEnableClientState(GL_NORMAL_ARRAY); - glNormalPointer(GL_FLOAT, sizeof(Vertex), static_cast(nullptr) + offsetof(Vertex, normal)); - - glClientActiveTexture(GL_TEXTURE0 + m_remap[0]); - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - glTexCoordPointer(2, GL_FLOAT, sizeof(Vertex), static_cast(nullptr) + offsetof(Vertex, texCoord)); - } - else if ((*it).second.vertexType == VERTEX_TYPE_TEX2) - { - glEnableClientState(GL_VERTEX_ARRAY); - glVertexPointer(3, GL_FLOAT, sizeof(VertexTex2), static_cast(nullptr) + offsetof(VertexTex2, coord)); - - glEnableClientState(GL_NORMAL_ARRAY); - glNormalPointer(GL_FLOAT, sizeof(VertexTex2), static_cast(nullptr) + offsetof(VertexTex2, normal)); - - glClientActiveTexture(GL_TEXTURE0 + m_remap[0]); - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - glTexCoordPointer(2, GL_FLOAT, sizeof(VertexTex2), static_cast(nullptr) + offsetof(VertexTex2, texCoord)); - - glClientActiveTexture(GL_TEXTURE0 + m_remap[1]); - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - glTexCoordPointer(2, GL_FLOAT, sizeof(VertexTex2), static_cast(nullptr) + offsetof(VertexTex2, texCoord2)); - } - else if ((*it).second.vertexType == VERTEX_TYPE_COL) - { - glEnableClientState(GL_VERTEX_ARRAY); - glVertexPointer(3, GL_FLOAT, sizeof(VertexCol), static_cast(nullptr) + offsetof(VertexCol, coord)); - - glEnableClientState(GL_COLOR_ARRAY); - glColorPointer(4, GL_FLOAT, sizeof(VertexCol), static_cast(nullptr) + offsetof(VertexCol, color)); - } - - GLenum mode = TranslateGfxPrimitive((*it).second.primitiveType); - glDrawArrays(mode, 0, (*it).second.vertexCount); - - if ((*it).second.vertexType == VERTEX_TYPE_NORMAL) - { - glDisableClientState(GL_VERTEX_ARRAY); - glDisableClientState(GL_NORMAL_ARRAY); - glDisableClientState(GL_TEXTURE_COORD_ARRAY); // GL_TEXTURE0 - } - else if ((*it).second.vertexType == VERTEX_TYPE_TEX2) - { - glDisableClientState(GL_VERTEX_ARRAY); - glDisableClientState(GL_NORMAL_ARRAY); - glDisableClientState(GL_TEXTURE_COORD_ARRAY); // GL_TEXTURE1 - - glClientActiveTexture(GL_TEXTURE0 + m_remap[0]); - glDisableClientState(GL_TEXTURE_COORD_ARRAY); - } - else if ((*it).second.vertexType == VERTEX_TYPE_COL) - { - glDisableClientState(GL_VERTEX_ARRAY); - glDisableClientState(GL_COLOR_ARRAY); - } - - m_glBindBuffer(GL_ARRAY_BUFFER, 0); + glClientActiveTexture(GL_TEXTURE0 + m_remap[0]); + glEnableClientState(GL_TEXTURE_COORD_ARRAY); + glTexCoordPointer(2, GL_FLOAT, sizeof(Vertex), static_cast(nullptr) + offsetof(Vertex, texCoord)); } - else + else if ((*it).second.vertexType == VERTEX_TYPE_TEX2) { - glCallList(bufferId); + glEnableClientState(GL_VERTEX_ARRAY); + glVertexPointer(3, GL_FLOAT, sizeof(VertexTex2), static_cast(nullptr) + offsetof(VertexTex2, coord)); + + glEnableClientState(GL_NORMAL_ARRAY); + glNormalPointer(GL_FLOAT, sizeof(VertexTex2), static_cast(nullptr) + offsetof(VertexTex2, normal)); + + glClientActiveTexture(GL_TEXTURE0 + m_remap[0]); + glEnableClientState(GL_TEXTURE_COORD_ARRAY); + glTexCoordPointer(2, GL_FLOAT, sizeof(VertexTex2), static_cast(nullptr) + offsetof(VertexTex2, texCoord)); + + glClientActiveTexture(GL_TEXTURE0 + m_remap[1]); + glEnableClientState(GL_TEXTURE_COORD_ARRAY); + glTexCoordPointer(2, GL_FLOAT, sizeof(VertexTex2), static_cast(nullptr) + offsetof(VertexTex2, texCoord2)); } + else if ((*it).second.vertexType == VERTEX_TYPE_COL) + { + glEnableClientState(GL_VERTEX_ARRAY); + glVertexPointer(3, GL_FLOAT, sizeof(VertexCol), static_cast(nullptr) + offsetof(VertexCol, coord)); + + glEnableClientState(GL_COLOR_ARRAY); + glColorPointer(4, GL_FLOAT, sizeof(VertexCol), static_cast(nullptr) + offsetof(VertexCol, color)); + } + + GLenum mode = TranslateGfxPrimitive((*it).second.primitiveType); + glDrawArrays(mode, 0, (*it).second.vertexCount); + + if ((*it).second.vertexType == VERTEX_TYPE_NORMAL) + { + glDisableClientState(GL_VERTEX_ARRAY); + glDisableClientState(GL_NORMAL_ARRAY); + glDisableClientState(GL_TEXTURE_COORD_ARRAY); // GL_TEXTURE0 + } + else if ((*it).second.vertexType == VERTEX_TYPE_TEX2) + { + glDisableClientState(GL_VERTEX_ARRAY); + glDisableClientState(GL_NORMAL_ARRAY); + glDisableClientState(GL_TEXTURE_COORD_ARRAY); // GL_TEXTURE1 + + glClientActiveTexture(GL_TEXTURE0 + m_remap[0]); + glDisableClientState(GL_TEXTURE_COORD_ARRAY); + } + else if ((*it).second.vertexType == VERTEX_TYPE_COL) + { + glDisableClientState(GL_VERTEX_ARRAY); + glDisableClientState(GL_COLOR_ARRAY); + } + + m_glBindBuffer(GL_ARRAY_BUFFER, 0); } void CGL14Device::DestroyStaticBuffer(unsigned int bufferId) { - if (m_vertexBufferType != VBT_DISPLAY_LIST) - { - auto it = m_vboObjects.find(bufferId); - if (it == m_vboObjects.end()) - return; + auto it = m_vboObjects.find(bufferId); + if (it == m_vboObjects.end()) + return; - m_glDeleteBuffers(1, &(*it).second.bufferId); + m_glDeleteBuffers(1, &(*it).second.bufferId); - m_vboObjects.erase(it); - } - else - { - glDeleteLists(bufferId, 1); - } + m_vboObjects.erase(it); } /* Based on libwine's implementation */ diff --git a/src/graphics/opengl/gl14device.h b/src/graphics/opengl/gl14device.h index ffb86b95..39785efd 100644 --- a/src/graphics/opengl/gl14device.h +++ b/src/graphics/opengl/gl14device.h @@ -43,17 +43,6 @@ namespace Gfx { -/** - \enum VertexBufferType - \brief Specifies type of vertex buffer to use - */ -enum VertexBufferType -{ - VBT_DISPLAY_LIST, //! use display lists - VBT_VBO_CORE, //! use core OpenGL 1.5 VBOs - VBT_VBO_ARB //! use ARB extension VBOs -}; - enum ShadowMappingSupport { SMS_NONE, //! No support for depth textures @@ -295,8 +284,6 @@ private: bool m_multiDrawArrays = false; //! Framebuffer support FramebufferSupport m_framebufferSupport = FBS_NONE; - //! Which vertex buffer type to use - VertexBufferType m_vertexBufferType = VBT_DISPLAY_LIST; //! Map of saved VBO objects std::map m_vboObjects; //! Last ID of VBO object From e481905a25d0c1c1f2de5d4e6a63f6417580b93f Mon Sep 17 00:00:00 2001 From: AbigailBuccaneer Date: Fri, 4 May 2018 14:46:27 +0100 Subject: [PATCH 085/207] Do less state setting in gl14 and gl21 --- src/graphics/opengl/gl14device.cpp | 219 +++++++++-------------------- src/graphics/opengl/gl21device.cpp | 218 +++++++++------------------- 2 files changed, 134 insertions(+), 303 deletions(-) diff --git a/src/graphics/opengl/gl14device.cpp b/src/graphics/opengl/gl14device.cpp index 2dfee282..3a8b6dca 100644 --- a/src/graphics/opengl/gl14device.cpp +++ b/src/graphics/opengl/gl14device.cpp @@ -1300,93 +1300,93 @@ void CGL14Device::SetTextureStageWrap(int index, TexWrapMode wrapS, TexWrapMode else assert(false); } +namespace +{ +void SetVertexAttributes(const Vertex* bufferBase, const std::vector& textureRemapping) +{ + glEnableClientState(GL_VERTEX_ARRAY); + glVertexPointer(3, GL_FLOAT, sizeof(Vertex), reinterpret_cast(bufferBase) + offsetof(Vertex, coord)); + + glEnableClientState(GL_NORMAL_ARRAY); + glNormalPointer(GL_FLOAT, sizeof(Vertex), reinterpret_cast(bufferBase) + offsetof(Vertex, normal)); + + glClientActiveTexture(GL_TEXTURE0 + textureRemapping[1]); + glDisableClientState(GL_TEXTURE_COORD_ARRAY); + glClientActiveTexture(GL_TEXTURE0 + textureRemapping[0]); + glEnableClientState(GL_TEXTURE_COORD_ARRAY); + glTexCoordPointer(2, GL_FLOAT, sizeof(Vertex), reinterpret_cast(bufferBase) + offsetof(Vertex, texCoord)); + + glDisableClientState(GL_COLOR_ARRAY); +} + +void SetVertexAttributes(const VertexTex2* bufferBase, const std::vector& textureRemapping) +{ + glEnableClientState(GL_VERTEX_ARRAY); + glVertexPointer(3, GL_FLOAT, sizeof(VertexTex2), reinterpret_cast(bufferBase) + offsetof(VertexTex2, coord)); + + glEnableClientState(GL_NORMAL_ARRAY); + glNormalPointer(GL_FLOAT, sizeof(VertexTex2), reinterpret_cast(bufferBase) + offsetof(VertexTex2, normal)); + + glClientActiveTexture(GL_TEXTURE0 + textureRemapping[1]); + glEnableClientState(GL_TEXTURE_COORD_ARRAY); + glTexCoordPointer(2, GL_FLOAT, sizeof(VertexTex2), reinterpret_cast(bufferBase) + offsetof(VertexTex2, texCoord2)); + glClientActiveTexture(GL_TEXTURE0 + textureRemapping[0]); + glEnableClientState(GL_TEXTURE_COORD_ARRAY); + glTexCoordPointer(2, GL_FLOAT, sizeof(VertexTex2), reinterpret_cast(bufferBase) + offsetof(VertexTex2, texCoord)); + + glDisableClientState(GL_COLOR_ARRAY); +} + +void SetVertexAttributes(const VertexCol* bufferBase, const std::vector& textureRemapping) +{ + glEnableClientState(GL_VERTEX_ARRAY); + glVertexPointer(3, GL_FLOAT, sizeof(VertexCol), reinterpret_cast(bufferBase) + offsetof(VertexCol, coord)); + + glDisableClientState(GL_NORMAL_ARRAY); + + glClientActiveTexture(GL_TEXTURE0 + textureRemapping[1]); + glDisableClientState(GL_TEXTURE_COORD_ARRAY); + glClientActiveTexture(GL_TEXTURE0 + textureRemapping[0]); + glDisableClientState(GL_TEXTURE_COORD_ARRAY); + + glEnableClientState(GL_COLOR_ARRAY); + glColorPointer(4, GL_FLOAT, sizeof(VertexCol), reinterpret_cast(bufferBase) + offsetof(VertexCol, color)); +} +} // namespace + void CGL14Device::DrawPrimitive(PrimitiveType type, const Vertex *vertices, int vertexCount, Color color) { - Vertex* vs = const_cast(vertices); - - glEnableClientState(GL_VERTEX_ARRAY); - glVertexPointer(3, GL_FLOAT, sizeof(Vertex), reinterpret_cast(&vs[0].coord)); - - glEnableClientState(GL_NORMAL_ARRAY); - glNormalPointer(GL_FLOAT, sizeof(Vertex), reinterpret_cast(&vs[0].normal)); - - glClientActiveTexture(GL_TEXTURE0 + m_remap[0]); - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - glTexCoordPointer(2, GL_FLOAT, sizeof(Vertex), reinterpret_cast(&vs[0].texCoord)); - + m_glBindBuffer(GL_ARRAY_BUFFER, 0); + SetVertexAttributes(vertices, m_remap); glColor4fv(color.Array()); glDrawArrays(TranslateGfxPrimitive(type), 0, vertexCount); - - glDisableClientState(GL_VERTEX_ARRAY); - glDisableClientState(GL_NORMAL_ARRAY); - glDisableClientState(GL_TEXTURE_COORD_ARRAY); // GL_TEXTURE0 } void CGL14Device::DrawPrimitive(PrimitiveType type, const VertexTex2 *vertices, int vertexCount, Color color) { - VertexTex2* vs = const_cast(vertices); - - glEnableClientState(GL_VERTEX_ARRAY); - glVertexPointer(3, GL_FLOAT, sizeof(VertexTex2), reinterpret_cast(&vs[0].coord)); - - glEnableClientState(GL_NORMAL_ARRAY); - glNormalPointer(GL_FLOAT, sizeof(VertexTex2), reinterpret_cast(&vs[0].normal)); - - glClientActiveTexture(GL_TEXTURE0 + m_remap[0]); - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - glTexCoordPointer(2, GL_FLOAT, sizeof(VertexTex2), reinterpret_cast(&vs[0].texCoord)); - - glClientActiveTexture(GL_TEXTURE0 + m_remap[1]); - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - glTexCoordPointer(2, GL_FLOAT, sizeof(VertexTex2), reinterpret_cast(&vs[0].texCoord2)); - + m_glBindBuffer(GL_ARRAY_BUFFER, 0); + SetVertexAttributes(vertices, m_remap); glColor4fv(color.Array()); glDrawArrays(TranslateGfxPrimitive(type), 0, vertexCount); - - glDisableClientState(GL_VERTEX_ARRAY); - glDisableClientState(GL_NORMAL_ARRAY); - glDisableClientState(GL_TEXTURE_COORD_ARRAY); // GL_TEXTURE1 - - glClientActiveTexture(GL_TEXTURE0 + m_remap[0]); - - glDisableClientState(GL_TEXTURE_COORD_ARRAY); } void CGL14Device::DrawPrimitive(PrimitiveType type, const VertexCol *vertices, int vertexCount) { - VertexCol* vs = const_cast(vertices); - - glEnableClientState(GL_VERTEX_ARRAY); - glVertexPointer(3, GL_FLOAT, sizeof(VertexCol), reinterpret_cast(&vs[0].coord)); - - glEnableClientState(GL_COLOR_ARRAY); - glColorPointer(4, GL_FLOAT, sizeof(VertexCol), reinterpret_cast(&vs[0].color)); + m_glBindBuffer(GL_ARRAY_BUFFER, 0); + SetVertexAttributes(vertices, m_remap); glDrawArrays(TranslateGfxPrimitive(type), 0, vertexCount); - - glDisableClientState(GL_VERTEX_ARRAY); - glDisableClientState(GL_COLOR_ARRAY); } void CGL14Device::DrawPrimitives(PrimitiveType type, const Vertex *vertices, int first[], int count[], int drawCount, Color color) { - Vertex* vs = const_cast(vertices); - - glEnableClientState(GL_VERTEX_ARRAY); - glVertexPointer(3, GL_FLOAT, sizeof(Vertex), reinterpret_cast(&vs[0].coord)); - - glEnableClientState(GL_NORMAL_ARRAY); - glNormalPointer(GL_FLOAT, sizeof(Vertex), reinterpret_cast(&vs[0].normal)); - - glClientActiveTexture(GL_TEXTURE0 + m_remap[0]); - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - glTexCoordPointer(2, GL_FLOAT, sizeof(Vertex), reinterpret_cast(&vs[0].texCoord)); - + m_glBindBuffer(GL_ARRAY_BUFFER, 0); + SetVertexAttributes(vertices, m_remap); glColor4fv(color.Array()); GLenum t = TranslateGfxPrimitive(type); @@ -1400,31 +1400,13 @@ void CGL14Device::DrawPrimitives(PrimitiveType type, const Vertex *vertices, for (int i = 0; i < drawCount; i++) glDrawArrays(t, first[i], count[i]); } - - glDisableClientState(GL_VERTEX_ARRAY); - glDisableClientState(GL_NORMAL_ARRAY); - glDisableClientState(GL_TEXTURE_COORD_ARRAY); // GL_TEXTURE0 } void CGL14Device::DrawPrimitives(PrimitiveType type, const VertexTex2 *vertices, int first[], int count[], int drawCount, Color color) { - VertexTex2* vs = const_cast(vertices); - - glEnableClientState(GL_VERTEX_ARRAY); - glVertexPointer(3, GL_FLOAT, sizeof(VertexTex2), reinterpret_cast(&vs[0].coord)); - - glEnableClientState(GL_NORMAL_ARRAY); - glNormalPointer(GL_FLOAT, sizeof(VertexTex2), reinterpret_cast(&vs[0].normal)); - - glClientActiveTexture(GL_TEXTURE0 + m_remap[0]); - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - glTexCoordPointer(2, GL_FLOAT, sizeof(VertexTex2), reinterpret_cast(&vs[0].texCoord)); - - glClientActiveTexture(GL_TEXTURE0 + m_remap[1]); - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - glTexCoordPointer(2, GL_FLOAT, sizeof(VertexTex2), reinterpret_cast(&vs[0].texCoord2)); - + m_glBindBuffer(GL_ARRAY_BUFFER, 0); + SetVertexAttributes(vertices, m_remap); glColor4fv(color.Array()); GLenum t = TranslateGfxPrimitive(type); @@ -1438,25 +1420,13 @@ void CGL14Device::DrawPrimitives(PrimitiveType type, const VertexTex2 *vertices, for (int i = 0; i < drawCount; i++) glDrawArrays(t, first[i], count[i]); } - - glDisableClientState(GL_VERTEX_ARRAY); - glDisableClientState(GL_NORMAL_ARRAY); - glDisableClientState(GL_TEXTURE_COORD_ARRAY); // GL_TEXTURE1 - - glClientActiveTexture(GL_TEXTURE0 + m_remap[0]); - glDisableClientState(GL_TEXTURE_COORD_ARRAY); } void CGL14Device::DrawPrimitives(PrimitiveType type, const VertexCol *vertices, int first[], int count[], int drawCount) { - VertexCol* vs = const_cast(vertices); - - glEnableClientState(GL_VERTEX_ARRAY); - glVertexPointer(3, GL_FLOAT, sizeof(VertexCol), reinterpret_cast(&vs[0].coord)); - - glEnableClientState(GL_COLOR_ARRAY); - glColorPointer(4, GL_FLOAT, sizeof(VertexCol), reinterpret_cast(&vs[0].color)); + m_glBindBuffer(GL_ARRAY_BUFFER, 0); + SetVertexAttributes(vertices, m_remap); GLenum t = TranslateGfxPrimitive(type); @@ -1469,9 +1439,6 @@ void CGL14Device::DrawPrimitives(PrimitiveType type, const VertexCol *vertices, for (int i = 0; i < drawCount; i++) glDrawArrays(t, first[i], count[i]); } - - glDisableClientState(GL_VERTEX_ARRAY); - glDisableClientState(GL_COLOR_ARRAY); } template @@ -1522,66 +1489,20 @@ void CGL14Device::DrawStaticBuffer(unsigned int bufferId) if ((*it).second.vertexType == VERTEX_TYPE_NORMAL) { - glEnableClientState(GL_VERTEX_ARRAY); - glVertexPointer(3, GL_FLOAT, sizeof(Vertex), static_cast(nullptr) + offsetof(Vertex, coord)); - - glEnableClientState(GL_NORMAL_ARRAY); - glNormalPointer(GL_FLOAT, sizeof(Vertex), static_cast(nullptr) + offsetof(Vertex, normal)); - - glClientActiveTexture(GL_TEXTURE0 + m_remap[0]); - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - glTexCoordPointer(2, GL_FLOAT, sizeof(Vertex), static_cast(nullptr) + offsetof(Vertex, texCoord)); + SetVertexAttributes(static_cast(nullptr), m_remap); } else if ((*it).second.vertexType == VERTEX_TYPE_TEX2) { - glEnableClientState(GL_VERTEX_ARRAY); - glVertexPointer(3, GL_FLOAT, sizeof(VertexTex2), static_cast(nullptr) + offsetof(VertexTex2, coord)); - - glEnableClientState(GL_NORMAL_ARRAY); - glNormalPointer(GL_FLOAT, sizeof(VertexTex2), static_cast(nullptr) + offsetof(VertexTex2, normal)); - - glClientActiveTexture(GL_TEXTURE0 + m_remap[0]); - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - glTexCoordPointer(2, GL_FLOAT, sizeof(VertexTex2), static_cast(nullptr) + offsetof(VertexTex2, texCoord)); - - glClientActiveTexture(GL_TEXTURE0 + m_remap[1]); - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - glTexCoordPointer(2, GL_FLOAT, sizeof(VertexTex2), static_cast(nullptr) + offsetof(VertexTex2, texCoord2)); + SetVertexAttributes(static_cast(nullptr), m_remap); } else if ((*it).second.vertexType == VERTEX_TYPE_COL) { - glEnableClientState(GL_VERTEX_ARRAY); - glVertexPointer(3, GL_FLOAT, sizeof(VertexCol), static_cast(nullptr) + offsetof(VertexCol, coord)); - - glEnableClientState(GL_COLOR_ARRAY); - glColorPointer(4, GL_FLOAT, sizeof(VertexCol), static_cast(nullptr) + offsetof(VertexCol, color)); + SetVertexAttributes(static_cast(nullptr), m_remap); } GLenum mode = TranslateGfxPrimitive((*it).second.primitiveType); + glDrawArrays(mode, 0, (*it).second.vertexCount); - - if ((*it).second.vertexType == VERTEX_TYPE_NORMAL) - { - glDisableClientState(GL_VERTEX_ARRAY); - glDisableClientState(GL_NORMAL_ARRAY); - glDisableClientState(GL_TEXTURE_COORD_ARRAY); // GL_TEXTURE0 - } - else if ((*it).second.vertexType == VERTEX_TYPE_TEX2) - { - glDisableClientState(GL_VERTEX_ARRAY); - glDisableClientState(GL_NORMAL_ARRAY); - glDisableClientState(GL_TEXTURE_COORD_ARRAY); // GL_TEXTURE1 - - glClientActiveTexture(GL_TEXTURE0 + m_remap[0]); - glDisableClientState(GL_TEXTURE_COORD_ARRAY); - } - else if ((*it).second.vertexType == VERTEX_TYPE_COL) - { - glDisableClientState(GL_VERTEX_ARRAY); - glDisableClientState(GL_COLOR_ARRAY); - } - - m_glBindBuffer(GL_ARRAY_BUFFER, 0); } void CGL14Device::DestroyStaticBuffer(unsigned int bufferId) diff --git a/src/graphics/opengl/gl21device.cpp b/src/graphics/opengl/gl21device.cpp index 9bd5301a..41660578 100644 --- a/src/graphics/opengl/gl21device.cpp +++ b/src/graphics/opengl/gl21device.cpp @@ -1115,33 +1115,70 @@ void CGL21Device::SetTextureStageWrap(int index, TexWrapMode wrapS, TexWrapMode else assert(false); } +namespace +{ +void SetVertexAttributes(const Vertex* bufferBase) +{ + glEnableClientState(GL_VERTEX_ARRAY); + glVertexPointer(3, GL_FLOAT, sizeof(Vertex), reinterpret_cast(bufferBase) + offsetof(Vertex, coord)); + + glEnableClientState(GL_NORMAL_ARRAY); + glNormalPointer(GL_FLOAT, sizeof(Vertex), reinterpret_cast(bufferBase) + offsetof(Vertex, normal)); + + glClientActiveTexture(GL_TEXTURE1); + glDisableClientState(GL_TEXTURE_COORD_ARRAY); + glClientActiveTexture(GL_TEXTURE0); + glEnableClientState(GL_TEXTURE_COORD_ARRAY); + glTexCoordPointer(2, GL_FLOAT, sizeof(Vertex), reinterpret_cast(bufferBase) + offsetof(Vertex, texCoord)); + + glDisableClientState(GL_COLOR_ARRAY); +} + +void SetVertexAttributes(const VertexTex2* bufferBase) +{ + glEnableClientState(GL_VERTEX_ARRAY); + glVertexPointer(3, GL_FLOAT, sizeof(VertexTex2), reinterpret_cast(bufferBase) + offsetof(VertexTex2, coord)); + + glEnableClientState(GL_NORMAL_ARRAY); + glNormalPointer(GL_FLOAT, sizeof(VertexTex2), reinterpret_cast(bufferBase) + offsetof(VertexTex2, normal)); + + glClientActiveTexture(GL_TEXTURE1); + glEnableClientState(GL_TEXTURE_COORD_ARRAY); + glTexCoordPointer(2, GL_FLOAT, sizeof(VertexTex2), reinterpret_cast(bufferBase) + offsetof(VertexTex2, texCoord2)); + glClientActiveTexture(GL_TEXTURE0); + glEnableClientState(GL_TEXTURE_COORD_ARRAY); + glTexCoordPointer(2, GL_FLOAT, sizeof(VertexTex2), reinterpret_cast(bufferBase) + offsetof(VertexTex2, texCoord)); + + glDisableClientState(GL_COLOR_ARRAY); +} + +void SetVertexAttributes(const VertexCol* bufferBase) +{ + glEnableClientState(GL_VERTEX_ARRAY); + glVertexPointer(3, GL_FLOAT, sizeof(VertexCol), reinterpret_cast(bufferBase) + offsetof(VertexCol, coord)); + + glDisableClientState(GL_NORMAL_ARRAY); + + glClientActiveTexture(GL_TEXTURE1); + glDisableClientState(GL_TEXTURE_COORD_ARRAY); + glClientActiveTexture(GL_TEXTURE0); + glDisableClientState(GL_TEXTURE_COORD_ARRAY); + + glEnableClientState(GL_COLOR_ARRAY); + glColorPointer(4, GL_FLOAT, sizeof(VertexCol), reinterpret_cast(bufferBase) + offsetof(VertexCol, color)); +} +} // namespace + void CGL21Device::DrawPrimitive(PrimitiveType type, const Vertex *vertices, int vertexCount, Color color) { if (m_updateLights) UpdateLights(); BindVBO(0); - - Vertex* vs = const_cast(vertices); - - glEnableClientState(GL_VERTEX_ARRAY); - glVertexPointer(3, GL_FLOAT, sizeof(Vertex), reinterpret_cast(&vs[0].coord)); - - glEnableClientState(GL_NORMAL_ARRAY); - glNormalPointer(GL_FLOAT, sizeof(Vertex), reinterpret_cast(&vs[0].normal)); - - glClientActiveTexture(GL_TEXTURE0); - - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - glTexCoordPointer(2, GL_FLOAT, sizeof(Vertex), reinterpret_cast(&vs[0].texCoord)); - + SetVertexAttributes(vertices); glColor4fv(color.Array()); glDrawArrays(TranslateGfxPrimitive(type), 0, vertexCount); - - glDisableClientState(GL_VERTEX_ARRAY); - glDisableClientState(GL_NORMAL_ARRAY); - glDisableClientState(GL_TEXTURE_COORD_ARRAY); // GL_TEXTURE0 } void CGL21Device::DrawPrimitive(PrimitiveType type, const VertexTex2 *vertices, int vertexCount, @@ -1150,33 +1187,10 @@ void CGL21Device::DrawPrimitive(PrimitiveType type, const VertexTex2 *vertices, if (m_updateLights) UpdateLights(); BindVBO(0); - - VertexTex2* vs = const_cast(vertices); - - glEnableClientState(GL_VERTEX_ARRAY); - glVertexPointer(3, GL_FLOAT, sizeof(VertexTex2), reinterpret_cast(&vs[0].coord)); - - glEnableClientState(GL_NORMAL_ARRAY); - glNormalPointer(GL_FLOAT, sizeof(VertexTex2), reinterpret_cast(&vs[0].normal)); - - glClientActiveTexture(GL_TEXTURE0); - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - glTexCoordPointer(2, GL_FLOAT, sizeof(VertexTex2), reinterpret_cast(&vs[0].texCoord)); - - glClientActiveTexture(GL_TEXTURE1); - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - glTexCoordPointer(2, GL_FLOAT, sizeof(VertexTex2), reinterpret_cast(&vs[0].texCoord2)); - + SetVertexAttributes(vertices); glColor4fv(color.Array()); glDrawArrays(TranslateGfxPrimitive(type), 0, vertexCount); - - glDisableClientState(GL_VERTEX_ARRAY); - glDisableClientState(GL_NORMAL_ARRAY); - glDisableClientState(GL_TEXTURE_COORD_ARRAY); // GL_TEXTURE1 - - glClientActiveTexture(GL_TEXTURE0); - glDisableClientState(GL_TEXTURE_COORD_ARRAY); } void CGL21Device::DrawPrimitive(PrimitiveType type, const VertexCol *vertices, int vertexCount) @@ -1184,19 +1198,8 @@ void CGL21Device::DrawPrimitive(PrimitiveType type, const VertexCol *vertices, i if (m_updateLights) UpdateLights(); BindVBO(0); - - VertexCol* vs = const_cast(vertices); - - glEnableClientState(GL_VERTEX_ARRAY); - glVertexPointer(3, GL_FLOAT, sizeof(VertexCol), reinterpret_cast(&vs[0].coord)); - - glEnableClientState(GL_COLOR_ARRAY); - glColorPointer(4, GL_FLOAT, sizeof(VertexCol), reinterpret_cast(&vs[0].color)); - + SetVertexAttributes(vertices); glDrawArrays(TranslateGfxPrimitive(type), 0, vertexCount); - - glDisableClientState(GL_VERTEX_ARRAY); - glDisableClientState(GL_COLOR_ARRAY); } void CGL21Device::DrawPrimitives(PrimitiveType type, const Vertex *vertices, @@ -1205,26 +1208,10 @@ void CGL21Device::DrawPrimitives(PrimitiveType type, const Vertex *vertices, if (m_updateLights) UpdateLights(); BindVBO(0); - - Vertex* vs = const_cast(vertices); - - glEnableClientState(GL_VERTEX_ARRAY); - glVertexPointer(3, GL_FLOAT, sizeof(Vertex), reinterpret_cast(&vs[0].coord)); - - glEnableClientState(GL_NORMAL_ARRAY); - glNormalPointer(GL_FLOAT, sizeof(Vertex), reinterpret_cast(&vs[0].normal)); - - glClientActiveTexture(GL_TEXTURE0); - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - glTexCoordPointer(2, GL_FLOAT, sizeof(Vertex), reinterpret_cast(&vs[0].texCoord)); - + SetVertexAttributes(vertices); glColor4fv(color.Array()); glMultiDrawArrays(TranslateGfxPrimitive(type), first, count, drawCount); - - glDisableClientState(GL_VERTEX_ARRAY); - glDisableClientState(GL_NORMAL_ARRAY); - glDisableClientState(GL_TEXTURE_COORD_ARRAY); // GL_TEXTURE0 } void CGL21Device::DrawPrimitives(PrimitiveType type, const VertexTex2 *vertices, @@ -1233,33 +1220,10 @@ void CGL21Device::DrawPrimitives(PrimitiveType type, const VertexTex2 *vertices, if (m_updateLights) UpdateLights(); BindVBO(0); - - VertexTex2* vs = const_cast(vertices); - - glEnableClientState(GL_VERTEX_ARRAY); - glVertexPointer(3, GL_FLOAT, sizeof(VertexTex2), reinterpret_cast(&vs[0].coord)); - - glEnableClientState(GL_NORMAL_ARRAY); - glNormalPointer(GL_FLOAT, sizeof(VertexTex2), reinterpret_cast(&vs[0].normal)); - - glClientActiveTexture(GL_TEXTURE0); - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - glTexCoordPointer(2, GL_FLOAT, sizeof(VertexTex2), reinterpret_cast(&vs[0].texCoord)); - - glClientActiveTexture(GL_TEXTURE1); - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - glTexCoordPointer(2, GL_FLOAT, sizeof(VertexTex2), reinterpret_cast(&vs[0].texCoord2)); - + SetVertexAttributes(vertices); glColor4fv(color.Array()); glMultiDrawArrays(TranslateGfxPrimitive(type), first, count, drawCount); - - glDisableClientState(GL_VERTEX_ARRAY); - glDisableClientState(GL_NORMAL_ARRAY); - glDisableClientState(GL_TEXTURE_COORD_ARRAY); // GL_TEXTURE1 - - glClientActiveTexture(GL_TEXTURE0); - glDisableClientState(GL_TEXTURE_COORD_ARRAY); } void CGL21Device::DrawPrimitives(PrimitiveType type, const VertexCol *vertices, @@ -1268,19 +1232,9 @@ void CGL21Device::DrawPrimitives(PrimitiveType type, const VertexCol *vertices, if (m_updateLights) UpdateLights(); BindVBO(0); - - VertexCol* vs = const_cast(vertices); - - glEnableClientState(GL_VERTEX_ARRAY); - glVertexPointer(3, GL_FLOAT, sizeof(VertexCol), reinterpret_cast(&vs[0].coord)); - - glEnableClientState(GL_COLOR_ARRAY); - glColorPointer(4, GL_FLOAT, sizeof(VertexCol), reinterpret_cast(&vs[0].color)); + SetVertexAttributes(vertices); glMultiDrawArrays(TranslateGfxPrimitive(type), first, count, drawCount); - - glDisableClientState(GL_VERTEX_ARRAY); - glDisableClientState(GL_COLOR_ARRAY); } @@ -1344,64 +1298,20 @@ void CGL21Device::DrawStaticBuffer(unsigned int bufferId) if ((*it).second.vertexType == VERTEX_TYPE_NORMAL) { - glEnableClientState(GL_VERTEX_ARRAY); - glVertexPointer(3, GL_FLOAT, sizeof(Vertex), static_cast(nullptr) + offsetof(Vertex, coord)); - - glEnableClientState(GL_NORMAL_ARRAY); - glNormalPointer(GL_FLOAT, sizeof(Vertex), static_cast(nullptr) + offsetof(Vertex, normal)); - - glClientActiveTexture(GL_TEXTURE0); - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - glTexCoordPointer(2, GL_FLOAT, sizeof(Vertex), static_cast(nullptr) + offsetof(Vertex, texCoord)); + SetVertexAttributes(static_cast(nullptr)); } else if ((*it).second.vertexType == VERTEX_TYPE_TEX2) { - glEnableClientState(GL_VERTEX_ARRAY); - glVertexPointer(3, GL_FLOAT, sizeof(VertexTex2), static_cast(nullptr) + offsetof(VertexTex2, coord)); - - glEnableClientState(GL_NORMAL_ARRAY); - glNormalPointer(GL_FLOAT, sizeof(VertexTex2), static_cast(nullptr) + offsetof(VertexTex2, normal)); - - glClientActiveTexture(GL_TEXTURE0); - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - glTexCoordPointer(2, GL_FLOAT, sizeof(VertexTex2), static_cast(nullptr) + offsetof(VertexTex2, texCoord)); - - glClientActiveTexture(GL_TEXTURE1); - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - glTexCoordPointer(2, GL_FLOAT, sizeof(VertexTex2), static_cast(nullptr) + offsetof(VertexTex2, texCoord2)); + SetVertexAttributes(static_cast(nullptr)); } else if ((*it).second.vertexType == VERTEX_TYPE_COL) { - glEnableClientState(GL_VERTEX_ARRAY); - glVertexPointer(3, GL_FLOAT, sizeof(VertexCol), static_cast(nullptr) + offsetof(VertexCol, coord)); - - glEnableClientState(GL_COLOR_ARRAY); - glColorPointer(4, GL_FLOAT, sizeof(VertexCol), static_cast(nullptr) + offsetof(VertexCol, color)); + SetVertexAttributes(static_cast(nullptr)); } GLenum mode = TranslateGfxPrimitive((*it).second.primitiveType); + glDrawArrays(mode, 0, (*it).second.vertexCount); - - if ((*it).second.vertexType == VERTEX_TYPE_NORMAL) - { - glDisableClientState(GL_VERTEX_ARRAY); - glDisableClientState(GL_NORMAL_ARRAY); - glDisableClientState(GL_TEXTURE_COORD_ARRAY); // GL_TEXTURE0 - } - else if ((*it).second.vertexType == VERTEX_TYPE_TEX2) - { - glDisableClientState(GL_VERTEX_ARRAY); - glDisableClientState(GL_NORMAL_ARRAY); - glDisableClientState(GL_TEXTURE_COORD_ARRAY); // GL_TEXTURE1 - - glClientActiveTexture(GL_TEXTURE0); - glDisableClientState(GL_TEXTURE_COORD_ARRAY); - } - else if ((*it).second.vertexType == VERTEX_TYPE_COL) - { - glDisableClientState(GL_VERTEX_ARRAY); - glDisableClientState(GL_COLOR_ARRAY); - } } void CGL21Device::DestroyStaticBuffer(unsigned int bufferId) From 319d8e6854fd5b6a3120144e99e0eef1353d41a1 Mon Sep 17 00:00:00 2001 From: krzys-h Date: Wed, 9 May 2018 23:12:26 +0200 Subject: [PATCH 086/207] Fix delete() not returning sometimes, closes #1067 --- src/object/object_manager.cpp | 2 +- src/script/scriptfunc.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/object/object_manager.cpp b/src/object/object_manager.cpp index c8d8cef7..0b4daed9 100644 --- a/src/object/object_manager.cpp +++ b/src/object/object_manager.cpp @@ -71,7 +71,7 @@ bool CObjectManager::DeleteObject(CObject* instance) it->second.reset(); m_shouldCleanRemovedObjects = true; return true; - } + } else assert(false); return false; } diff --git a/src/script/scriptfunc.cpp b/src/script/scriptfunc.cpp index 7721e2b2..20a85bb2 100644 --- a/src/script/scriptfunc.cpp +++ b/src/script/scriptfunc.cpp @@ -657,7 +657,7 @@ bool CScriptFunctions::rDelete(CBotVar* var, CBotVar* result, int& exception, vo } CObject* obj = CObjectManager::GetInstancePointer()->GetObjectById(rank); - if ( obj == nullptr ) + if ( obj == nullptr || (obj->Implements(ObjectInterfaceType::Old) && dynamic_cast(obj)->IsDying()) ) { return true; } From ed397d2b0f677b505c399f97c95e13fd3d22e492 Mon Sep 17 00:00:00 2001 From: krzys-h Date: Wed, 9 May 2018 23:25:52 +0200 Subject: [PATCH 087/207] Make sure aliens hatched from eggs are not selectable by default, closes #1054 --- src/object/old_object.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/object/old_object.cpp b/src/object/old_object.cpp index 23a303aa..3acf608a 100644 --- a/src/object/old_object.cpp +++ b/src/object/old_object.cpp @@ -684,6 +684,8 @@ void COldObject::SetType(ObjectType type) m_type = type; m_name = GetObjectName(m_type); + SetSelectable(IsSelectableByDefault(m_type)); + // TODO: Temporary hack if ( m_type == OBJECT_MOBILEfa || // WingedGrabber m_type == OBJECT_MOBILEfs || // WingedSniffer From 8095dc14f78c9d996cadbace3178f3fb2b9818df Mon Sep 17 00:00:00 2001 From: krzys-h Date: Thu, 10 May 2018 11:12:22 +0200 Subject: [PATCH 088/207] Add support for custom button= for View cameras --- src/level/robotmain.cpp | 9 +++++---- src/level/robotmain.h | 5 +++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp index f6679413..2cabcccf 100644 --- a/src/level/robotmain.cpp +++ b/src/level/robotmain.cpp @@ -3555,8 +3555,9 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject) continue; } Viewpoint tmp; - tmp.eye = line->GetParam("eye")->AsPoint(Math::Vector(0.0f, 0.0f, 0.0f))*g_unit; - tmp.look = line->GetParam("lookat")->AsPoint(Math::Vector(0.0f, 0.0f, 0.0f))*g_unit; + tmp.eye = line->GetParam("eye")->AsPoint()*g_unit; + tmp.look = line->GetParam("lookat")->AsPoint()*g_unit; + tmp.button = line->GetParam("button")->AsInt(13); // 13 is the camera button m_viewpoints.push_back(tmp); continue; } @@ -5933,12 +5934,12 @@ void CRobotMain::CreateCodeBattleInterface() //viewpoint selection section ddim.x = 40.0f/640.0f; ddim.y = 50.0f/640.0f; - for(unsigned int i = 0; iCreateButton(pos,ddim, 13, EventType(EVENT_VIEWPOINT0 + i)); + pw->CreateButton(pos, ddim, m_viewpoints[i].button, EventType(EVENT_VIEWPOINT0 + i)); } //start/camera button diff --git a/src/level/robotmain.h b/src/level/robotmain.h index d067d0e0..2614f2cc 100644 --- a/src/level/robotmain.h +++ b/src/level/robotmain.h @@ -152,8 +152,9 @@ struct MinMax struct Viewpoint { - Math::Vector eye; - Math::Vector look; + Math::Vector eye{}; + Math::Vector look{}; + int button = 13; // 13 is the camera button }; const int SATCOM_HUSTON = 0; From 05bc65a90bfcbab482872703d2743b4e656b4c8e Mon Sep 17 00:00:00 2001 From: krzys-h Date: Thu, 10 May 2018 11:12:42 +0200 Subject: [PATCH 089/207] Add support for more buttonsX.png textures (for modders) --- src/ui/controls/button.cpp | 2 -- src/ui/controls/control.cpp | 23 ++++++++--------------- 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/src/ui/controls/button.cpp b/src/ui/controls/button.cpp index 4c1d3d99..706946b7 100644 --- a/src/ui/controls/button.cpp +++ b/src/ui/controls/button.cpp @@ -25,8 +25,6 @@ #include "graphics/engine/engine.h" -#include - namespace Ui { diff --git a/src/ui/controls/control.cpp b/src/ui/controls/control.cpp index 2013b612..0d1692ee 100644 --- a/src/ui/controls/control.cpp +++ b/src/ui/controls/control.cpp @@ -24,6 +24,7 @@ #include "common/restext.h" #include "common/settings.h" +#include "common/stringutils.h" #include "level/robotmain.h" @@ -449,6 +450,7 @@ void CControl::Draw() Math::Point pos; float zoomExt, zoomInt; int icon; + int buttonFile = 1; if ( (m_state & STATE_VISIBLE) == 0 ) return; @@ -517,23 +519,14 @@ void CControl::Draw() if ( m_state & STATE_DEAD ) return; - icon = m_icon; - if ( icon >= 128 ) + + icon = m_icon%64; + buttonFile = (m_icon/64) + 1; + if ( buttonFile != 1 ) { - icon -= 128; - m_engine->SetTexture("textures/interface/button3.png"); - m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); - } - else if ( icon >= 64 ) - { - icon -= 64; - m_engine->SetTexture("textures/interface/button2.png"); - m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); - } - else - { - m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); + m_engine->SetTexture("textures/interface/button" + StrUtils::ToString(buttonFile) + ".png"); } + m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); if ( icon != -1 ) { DrawPart(icon, zoomInt, 0.0f); From 12cf57409cd338c56db6e877b31b1dba18ed681b Mon Sep 17 00:00:00 2001 From: krzys-h Date: Thu, 10 May 2018 11:24:59 +0200 Subject: [PATCH 090/207] Support more buttonX.png files in other places than just buttons --- src/graphics/engine/text.cpp | 19 +++---------------- src/ui/controls/control.cpp | 16 +++++++++------- src/ui/controls/control.h | 7 +++++++ src/ui/controls/shortcut.cpp | 16 +--------------- 4 files changed, 20 insertions(+), 38 deletions(-) diff --git a/src/graphics/engine/text.cpp b/src/graphics/engine/text.cpp index 0ecd5820..045cdc4c 100644 --- a/src/graphics/engine/text.cpp +++ b/src/graphics/engine/text.cpp @@ -1004,22 +1004,9 @@ void CText::DrawCharAndAdjustPos(UTF8Char ch, FontType font, float size, Math::I // For whatever reason ch.c1 is a SIGNED char, we need to fix that unsigned char icon = static_cast(ch.c1); - unsigned int texID; - - if ( icon >= 128 ) - { - icon -= 128; - texID = m_engine->LoadTexture("textures/interface/button3.png").id; - } - else if ( icon >= 64 ) - { - icon -= 64; - texID = m_engine->LoadTexture("textures/interface/button2.png").id; - } - else - { - texID = m_engine->LoadTexture("textures/interface/button1.png").id; - } + // TODO: A bit of code duplication, see CControl::SetButtonTextureForIcon() + unsigned int texID = m_engine->LoadTexture("textures/interface/button" + StrUtils::ToString((icon/64) + 1) + ".png").id; + icon = icon%64; Math::Point uv1, uv2; uv1.x = (32.0f / 256.0f) * (icon%8); diff --git a/src/ui/controls/control.cpp b/src/ui/controls/control.cpp index 0d1692ee..9c91f51c 100644 --- a/src/ui/controls/control.cpp +++ b/src/ui/controls/control.cpp @@ -519,13 +519,7 @@ void CControl::Draw() if ( m_state & STATE_DEAD ) return; - - icon = m_icon%64; - buttonFile = (m_icon/64) + 1; - if ( buttonFile != 1 ) - { - m_engine->SetTexture("textures/interface/button" + StrUtils::ToString(buttonFile) + ".png"); - } + icon = SetButtonTextureForIcon(m_icon); m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); if ( icon != -1 ) { @@ -844,5 +838,13 @@ std::string CControl::GetResourceName(EventType eventType) return name; } +int CControl::SetButtonTextureForIcon(int icon) +{ + int iconIdx = icon%64; + int buttonFile = (icon/64) + 1; + m_engine->SetTexture("textures/interface/button" + StrUtils::ToString(buttonFile) + ".png"); + return iconIdx; +} + } diff --git a/src/ui/controls/control.h b/src/ui/controls/control.h index d3e6d5aa..a7166df8 100644 --- a/src/ui/controls/control.h +++ b/src/ui/controls/control.h @@ -116,6 +116,13 @@ protected: std::string GetResourceName(EventType eventType); + /** + * \brief Set texture in m_engine to correct buttonX.png for given icon + * \param icon Icon to draw + * \return Index inside the selected texture of the icon to draw + */ + int SetButtonTextureForIcon(int icon); + protected: Gfx::CEngine* m_engine; Gfx::CParticle* m_particle; diff --git a/src/ui/controls/shortcut.cpp b/src/ui/controls/shortcut.cpp index d85132d1..7d3ddd6d 100644 --- a/src/ui/controls/shortcut.cpp +++ b/src/ui/controls/shortcut.cpp @@ -123,21 +123,7 @@ void CShortcut::Draw() DrawVertex(icon, 0.95f); } - icon = m_icon; - if ( icon >= 128 ) - { - icon -= 128; - m_engine->SetTexture("textures/interface/button3.png"); - } - else if ( icon >= 64 ) - { - icon -= 64; - m_engine->SetTexture("textures/interface/button2.png"); - } - else - { - m_engine->SetTexture("textures/interface/button1.png"); - } + icon = SetButtonTextureForIcon(m_icon); if (m_icon == 58) { m_engine->SetState(Gfx::ENG_RSTATE_TTEXTURE_WHITE); From f538b4f47716a450502bdfa93d9837c4103b1cdf Mon Sep 17 00:00:00 2001 From: krzys-h Date: Thu, 10 May 2018 11:32:33 +0200 Subject: [PATCH 091/207] What did I say about commiting in a hurry --- src/ui/controls/control.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/ui/controls/control.cpp b/src/ui/controls/control.cpp index 9c91f51c..9a110e42 100644 --- a/src/ui/controls/control.cpp +++ b/src/ui/controls/control.cpp @@ -450,7 +450,6 @@ void CControl::Draw() Math::Point pos; float zoomExt, zoomInt; int icon; - int buttonFile = 1; if ( (m_state & STATE_VISIBLE) == 0 ) return; From acc3362172b4a06f2f6962e8e3d3670db9657404 Mon Sep 17 00:00:00 2001 From: krzys-h Date: Thu, 10 May 2018 21:06:10 +0200 Subject: [PATCH 092/207] Update data submodule --- data | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data b/data index 10b07763..572cf040 160000 --- a/data +++ b/data @@ -1 +1 @@ -Subproject commit 10b07763fb68f53840d402ad36817e86603c63a6 +Subproject commit 572cf040c52270cb0fcdc5a4dde306c1f5807b07 From 7aaac449f51cc9ee96cef571973fa30ef5a917ec Mon Sep 17 00:00:00 2001 From: krzys-h Date: Thu, 10 May 2018 21:16:42 +0200 Subject: [PATCH 093/207] Fix release script version override This fixes a bug in 94a18e9648dc5deb46297c99f0460ca15e93010e --- tools/release.py | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/tools/release.py b/tools/release.py index 03e83b6f..918b230a 100755 --- a/tools/release.py +++ b/tools/release.py @@ -77,21 +77,20 @@ for i in range(len(data)): if m: x = m.group(3) if m.group(1) == 'MAJOR': - if version_override is None: - major = x - else: - major = version_override[0] + if version_override is not None: + x = version_override[0] + major = x elif m.group(1) == 'MINOR': - if version_override is None: - minor = x - else: - minor = version_override[1] + if version_override is not None: + x = version_override[1] + minor = x elif m.group(1) == 'REVISION': - if version_override is None: + if version_override is not None: + x = version_override[2] + else: # Increase revision number revision = str(int(x) + 1) - else: - revision = version_override[2] + revision = x data[i] = 'set(COLOBOT_VERSION_'+m.group(1)+m.group(2)+x+')\n' m = re.match(r'^(#?)set\(COLOBOT_VERSION_(UNRELEASED|RELEASE_CODENAME)( +)"(.+)"\)$', data[i]) From 12c969c71c4ecbffea81f834b7cc43bc02fe6e31 Mon Sep 17 00:00:00 2001 From: krzys-h Date: Thu, 10 May 2018 21:20:13 +0200 Subject: [PATCH 094/207] Post-release 0.1.11.1-alpha --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 234c201a..4ab7f22a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,9 +16,9 @@ set(COLOBOT_VERSION_MINOR 1) set(COLOBOT_VERSION_REVISION 11.1) # Used on official releases -set(COLOBOT_VERSION_RELEASE_CODENAME "-alpha") +#set(COLOBOT_VERSION_RELEASE_CODENAME "-alpha") # Used on unreleased, development builds -#set(COLOBOT_VERSION_UNRELEASED "+alpha") +set(COLOBOT_VERSION_UNRELEASED "+alpha") # Append git characteristics to version if(DEFINED COLOBOT_VERSION_UNRELEASED) From cdb8a4871a43ee41f3d0db03ca8a613c46d9b2b2 Mon Sep 17 00:00:00 2001 From: krzys-h Date: Thu, 10 May 2018 21:20:13 +0200 Subject: [PATCH 095/207] Release 0.1.11.1-alpha: Bump version --- CMakeLists.txt | 6 +++--- data | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 89cf5344..234c201a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,12 +13,12 @@ project(colobot C CXX) set(COLOBOT_VERSION_CODENAME "Gold") set(COLOBOT_VERSION_MAJOR 0) set(COLOBOT_VERSION_MINOR 1) -set(COLOBOT_VERSION_REVISION 11) +set(COLOBOT_VERSION_REVISION 11.1) # Used on official releases -#set(COLOBOT_VERSION_RELEASE_CODENAME "-alpha") +set(COLOBOT_VERSION_RELEASE_CODENAME "-alpha") # Used on unreleased, development builds -set(COLOBOT_VERSION_UNRELEASED "+alpha") +#set(COLOBOT_VERSION_UNRELEASED "+alpha") # Append git characteristics to version if(DEFINED COLOBOT_VERSION_UNRELEASED) diff --git a/data b/data index 572cf040..3cbab714 160000 --- a/data +++ b/data @@ -1 +1 @@ -Subproject commit 572cf040c52270cb0fcdc5a4dde306c1f5807b07 +Subproject commit 3cbab7144e6bf940015b2c33fdd17c7c2bfa804b From 2b933264fc41b6794ad08a99813dd116294bb95f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Robson=20Mariano=20Alves?= Date: Tue, 15 May 2018 16:07:03 -0300 Subject: [PATCH 096/207] Translation to Brazilian Portuguese --- po/br.po | 2042 +++++++++++++++++++++++++++ src/app/app.cpp | 13 + src/common/language.cpp | 3 +- src/common/language.h | 3 +- src/ui/screen/screen_setup_game.cpp | 1 + 5 files changed, 2060 insertions(+), 2 deletions(-) create mode 100644 po/br.po diff --git a/po/br.po b/po/br.po new file mode 100644 index 00000000..956b6d2f --- /dev/null +++ b/po/br.po @@ -0,0 +1,2042 @@ +# José Robson Mariano Alves , 2018. +msgid "" +msgstr "" +"Project-Id-Version: Colobot Alpha\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: DATE\n" +"PO-Revision-Date: 2018-04-17 10:39-0300\n" +"Last-Translator: José Robson Mariano Alves \n" +"Language-Team: Portuguese \n" +"Language: pt_BR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: Lokalize 2.0\n" +"X-Language: pt_BR\n" +"X-Source-Language: en_US\n" + +msgid " or " +msgstr " ou " + +msgid "\" [ \" expected" +msgstr "\" [ \" esperado" + +msgid "\" ] \" missing" +msgstr "\" ] \" faltando" + +#, c-format +msgid "%s: %d pts" +msgstr "" + +msgid "..behind" +msgstr "..atrás" + +msgid "..in front" +msgstr "..em frente" + +msgid "..power cell" +msgstr "..célula de energia" + +msgid "1) First click on the key you want to redefine." +msgstr "1) Primeiro clique na chave que você quer redefinir." + +msgid "2) Then press the key you want to use instead." +msgstr "2) Então pressione a chave que você quer usar no lugar." + +msgid "<< Back \\Back to the previous screen" +msgstr "<< Voltar \\Voltar para a tela anterior" + +msgid "<<< Sorry; mission failed >>>" +msgstr "<<< Desculpe; missão fracassada >>>" + +#, c-format +msgid "<<< Team %s finished! >>>" +msgstr "<<< Time %s terminou! >>>" + +#, c-format +msgid "<<< Team %s lost! >>>" +msgstr "<<< Time %s perdeu! >>>" + +#, c-format +msgid "<<< Team %s recieved %d points >>>" +msgstr "<<< Time %s recebeu %d pontos >>>" + +msgid "<<< Well done; mission accomplished >>>" +msgstr "<<< Bem feito; missão cumprida >>>" + +msgid "A label must be followed by \"for\"; \"while\"; \"do\" or \"switch\"" +msgstr "Um rótulo deve ser precedido por um \"for\"; \"while\"; \"do\" ou um \"switch\"" + +msgid "A variable can not be declared twice" +msgstr "Uma variável não pode ser declarada duas vezes" + +msgid "Abort\\Abort the current mission" +msgstr "Abortar\\Abortar a missão atual" + +msgid "Access beyond array limit" +msgstr "Acesso além dos limites da matriz" + +msgid "Access to solution\\Shows the solution (detailed instructions for missions)" +msgstr "Acesso a solução\\Exibe a solução (instruções detalhadas para missões)" + +msgid "Access to solutions\\Show program \"4: Solution\" in the exercises" +msgstr "Acesso as soluções\\Exibir programa \"4: Solução\" nos exercícios" + +msgid "Add new program" +msgstr "Adicionar novo programa" + +msgid "Alien Queen" +msgstr "Rainha Alienígena" + +msgid "Alien Queen killed" +msgstr "Rainha Alienígena morta" + +msgid "Already carrying something" +msgstr "Já está carregando algo" + +msgid "Alternative camera mode\\Move sideways instead of rotating (in free camera)" +msgstr "Modo de câmera alternativo\\Move de lado em vez de rotacionar (em câmera livre)" + +msgid "Ambiguous call to overloaded function" +msgstr "Chamada ambígua a uma função sobrecarregada" + +msgid "Analysis already performed" +msgstr "Análise já realizada" + +msgid "Analysis performed" +msgstr "Análise realizada" + +msgid "Analyzes only organic matter" +msgstr "Analisa apenas matéria orgânica" + +msgid "Anisotropy level\\Anisotropy level" +msgstr "Nível de anisotropia\\Nível de anisotropia" + +msgid "Ant" +msgstr "Formiga" + +msgid "Ant fatally wounded" +msgstr "Formiga gravemente ferida" + +msgid "Appearance\\Choose your appearance" +msgstr "Aparência\\Escolha sua aparência" + +msgid "Apply changes\\Activates the changed settings" +msgstr "Aplicar mudanças\\Ativa as configurações alteradas" + +msgid "Appropriate constructor missing" +msgstr "Construtor apropriado faltando" + +msgid "Assignment impossible" +msgstr "Tarefa impossível" + +msgid "Autolab" +msgstr "Laboratório de matérias orgânicas" + +msgid "Automatic indent\\When program editing" +msgstr "Indentação automática\\Enquanto editando programa" + +msgid "Autosave interval\\How often your game will autosave" +msgstr "Intervalo de salvamento automático\\Com que frequência seu jogo irá auto-salvar" + +msgid "Autosave slots\\How many autosave slots you'll have" +msgstr "Slots de salvamento automático\\Quantos slots de salvamento automático você terá" + +msgid "Autosave\\Enables autosave" +msgstr "Salvamento automático\\Ativa o salvamento automático" + +msgid "Back" +msgstr "Voltar" + +msgid "Background sound:\\Volume of audio tracks" +msgstr "Som de fundo:\\Volume das trilhas de áudio" + +msgid "Backward (\\key down;)" +msgstr "Retroceder (\\key down;)" + +msgid "Backward\\Moves backward" +msgstr "Retroceder\\Move para trás" + +msgid "Bad argument for \"new\"" +msgstr "Argumento inválido para \"new\"" + +msgid "Big indent\\Indent 2 or 4 spaces per level defined by braces" +msgstr "Grande indentação\\Indente 2 ou 4 espaços por nível definido por colchetes" + +msgid "Black box" +msgstr "Caixa preta" + +msgid "Blood\\Display blood when the astronaut is hit" +msgstr "Sangue\\Exibe sangue quando o astronauta é atingido" + +msgid "Blue" +msgstr "Azul" + +msgid "Blue flag" +msgstr "Bandeira azul" + +msgid "Bot destroyed" +msgstr "Robo destruido" + +msgid "Bot factory" +msgstr "Fábrica de robos" + +msgid "Build a bot factory" +msgstr "Construir uma fábrica de robos" + +msgid "Build a converter" +msgstr "Construir um conversor" + +msgid "Build a defense tower" +msgstr "Construir uma torre de defesa" + +msgid "Build a derrick" +msgstr "Construir um extrator" + +msgid "Build a destroyer" +msgstr "Construir um destruidor" + +msgid "Build a exchange post" +msgstr "Construir um posto de troca" + +msgid "Build a legged grabber" +msgstr "Construir um agarrador com pernas" + +msgid "Build a legged orga shooter" +msgstr "Construir um atirador orgânico com pernas" + +msgid "Build a legged shooter" +msgstr "Construir um atirador com pernas" + +msgid "Build a legged sniffer" +msgstr "Construir um farejador com pernas" + +msgid "Build a lightning conductor" +msgstr "Construir um condutor elétrico" + +msgid "Build a nuclear power plant" +msgstr "Construir uma planta de energia nuclear" + +msgid "Build a phazer shooter" +msgstr "Construir um atirador phazer" + +msgid "Build a power cell factory" +msgstr "Construir uma fábrica de células de energia" + +msgid "Build a power station" +msgstr "Construir uma estação de energia" + +msgid "Build a radar station" +msgstr "Construir uma estação de radar" + +msgid "Build a recycler" +msgstr "Construir um reciclador" + +msgid "Build a repair center" +msgstr "Construir um centro de reparação" + +msgid "Build a research center" +msgstr "Construir um centro de pesquisa" + +msgid "Build a shielder" +msgstr "Construir um defensor" + +msgid "Build a subber" +msgstr "Construir um mergulhador" + +msgid "Build a thumper" +msgstr "Construir um batedor" + +msgid "Build a tracked grabber" +msgstr "Construir um agarrador com esteiras" + +msgid "Build a tracked orga shooter" +msgstr "Construir um atirador orgânico com esteiras" + +msgid "Build a tracked shooter" +msgstr "Construir um atirador com esteiras" + +msgid "Build a tracked sniffer" +msgstr "Construir um farejador com esteiras" + +msgid "Build a wheeled grabber" +msgstr "Construir um agarrador com rodas" + +msgid "Build a wheeled orga shooter" +msgstr "Construir um atirador orgânico com rodas" + +msgid "Build a wheeled shooter" +msgstr "Construir um atirador com rodas" + +msgid "Build a wheeled sniffer" +msgstr "Construir um farejador com rodas" + +msgid "Build a winged grabber" +msgstr "Construir um agarrador alado" + +msgid "Build a winged orga shooter" +msgstr "Construir um atirador orgânico alado" + +msgid "Build a winged shooter" +msgstr "Construir um atirador alado" + +msgid "Build a winged sniffer" +msgstr "Construir um farejador alado" + +msgid "Build an autolab" +msgstr "Construir um laboratório" + +msgid "Building completed" +msgstr "Construção completada" + +msgid "Building destroyed" +msgstr "Construção destruida" + +msgid "Button %1" +msgstr "Botão %1" + +msgid "Calling an unknown function" +msgstr "Chamando uma função desconhecida" + +msgid "Camera (\\key camera;)" +msgstr "Câmera (\\key camera;)" + +msgid "Camera back\\Moves the camera backward" +msgstr "Voltar câmera\\Move a câmera para trás" + +msgid "Camera border scrolling\\Scrolling when the mouse touches right or left border" +msgstr "Rolagem de borda da câmera\\Rola quando o mouse toca a borda esquerda ou direita" + +msgid "Camera closer\\Moves the camera forward" +msgstr "Câmera mais perto\\Move a câmera para frente" + +msgid "Camera down\\Turns the camera down" +msgstr "Baixar câmera\\Vira a câmera para baixo" + +msgid "Camera left\\Turns the camera left" +msgstr "Câmera a esquerda\\Gira a câmera para a esquerda" + +msgid "Camera right\\Turns the camera right" +msgstr "Câmera a direita\\Gira a câmera para a direita" + +msgid "Camera up\\Turns the camera up" +msgstr "Subir câmera\\Gira a câmera para cima" + +msgid "Can not produce not researched object" +msgstr "Impossível produzir objetos não pesquisados" + +msgid "Can not produce this object in this mission" +msgstr "Impossível produzir este objeto nesta missão" + +msgid "Can't open file" +msgstr "Não é possível abrir o arquivo" + +msgid "Cancel" +msgstr "Cancelar" + +msgid "Cancel\\Cancel all changes" +msgstr "Cancelar\\Cancela todas as mudanças" + +msgid "Challenges" +msgstr "Desafios" + +msgid "Challenges in the chapter:" +msgstr "Desafios no capítulo:" + +msgid "Challenges\\Programming challenges" +msgstr "Desafios\\Desafios de programação" + +msgid "Change camera\\Switches between onboard camera and following camera" +msgstr "Mudar câmera\\Alterna entre câmera incorporada e câmera seguidora" + +msgid "Change player\\Change player" +msgstr "Mudar jogador\\Mudar jogador" + +msgid "Chapters:" +msgstr "Capítulos:" + +msgid "Cheat console\\Show cheat console" +msgstr "Console de cheats\\Mostrar console de cheats" + +msgid "Checkpoint" +msgstr "Ponto de verificação" + +msgid "Class name expected" +msgstr "Nome de classe experado" + +msgid "Climb\\Increases the power of the jet" +msgstr "Subir\\Aumenta o poder do jato" + +msgid "Clone program" +msgstr "Clonar programa" + +msgid "Clone selected program" +msgstr "Clonar o programa selecionado" + +msgid "Close" +msgstr "Fechar" + +msgid "Closing bracket missing" +msgstr "Colchete de fechamento ausente" + +#, fuzzy +msgid "Code battle" +msgstr "Batalha de código" + +msgid "Code battles" +msgstr "Batalhas de código" + +msgid "Code battles\\Program your robot to be the best of them all!" +msgstr "Batalhas de código\\Programe seu robô para ser o melhor de todos!" + +msgid "Colobot rules!" +msgstr "Regras Colobot!" + +msgid "Colobot: Gold Edition" +msgstr "Colobot: Edição de ouro" + +msgid "Command line" +msgstr "Linha de comando" + +msgid "Compilation ok (0 errors)" +msgstr "Compilação ok (0 erros)" + +msgid "Compile" +msgstr "Compilar" + +msgid "Continue" +msgstr "Continuar" + +msgid "Continue\\Continue the current mission" +msgstr "Continuar\\Continua a missão atual" + +msgid "Controls\\Keyboard, joystick and mouse settings" +msgstr "Controles\\Configurações de teclado, mouse e controles" + +msgid "Converts ore to titanium" +msgstr "Converter minério para titânio" + +msgid "Copy" +msgstr "Copiar" + +msgid "Copy (Ctrl+C)" +msgstr "Copiar (Ctrl+C)" + +msgid "Current mission saved" +msgstr "Missão atual salva" + +msgid "Custom levels:" +msgstr "Níveis personalizados:" + +msgid "Custom levels\\Levels from mods created by the users" +msgstr "Níveis personalizados\\Níveis criados pelos usuários" + +msgid "Customize your appearance" +msgstr "Personalize sua aparência" + +msgid "Cut (Ctrl+X)" +msgstr "Recortar (Ctrl+X)" + +msgid "Defense tower" +msgstr "Torre de defesa" + +msgid "Delete mark" +msgstr "Excluir marca" + +msgid "Delete player\\Deletes the player from the list" +msgstr "Excluir jogador\\Exclui o jogador da lista" + +msgid "Delete\\Deletes the selected file" +msgstr "Excluir\\Exclui o arquivo selecionado" + +msgid "Derrick" +msgstr "Extrator" + +msgid "Descend\\Reduces the power of the jet" +msgstr "Descer\\Diminui o poder do jato" + +msgid "Destroy" +msgstr "Destruir" + +msgid "Destroy the building" +msgstr "Destroi a construção" + +msgid "Destroyer" +msgstr "Destruidor" + +msgid "Device\\Driver and resolution settings" +msgstr "Dispositivo\\Configurações de driver e resolução" + +msgid "Dividing by zero" +msgstr "Dividindo por zero" + +msgid "Do you really want to destroy the selected building?" +msgstr "Você realmente deseja destruir o prédio selecionado?" + +#, c-format +msgid "Do you want to delete %s's saved games?" +msgstr "Você quer deletar os %'s jogos salvos?" + +msgid "Doors blocked by a robot or another object" +msgstr "Portas bloqueadas por um robô ou outro objeto" + +msgid "Down (\\key gdown;)" +msgstr "Baixo (\\key gdown;)" + +msgid "Drawer bot" +msgstr "Robô cartoonista" + +msgid "Dust\\Dust and dirt on bots and buildings" +msgstr "Poeira\\Poeira e sujeira nos robôs e prédios" + +msgid "Dynamic lighting\\Mobile light sources" +msgstr "Iluminação dinâmica\\Fontes móveis de luz" + +msgid "Dynamic shadows ++\\Dynamic shadows + self shadowing" +msgstr "Sombras dinâmicas ++\\Sombras dinâmicas + auto-sombreamento" + +msgid "Dynamic shadows\\Beautiful shadows!" +msgstr "Sombras dinâmicas\\Sombras magníficas!" + +msgid "Edit the selected program" +msgstr "Alterar o programa selecionado" + +msgid "Egg" +msgstr "Ovo" + +msgid "End of block missing" +msgstr "Fim do bloco ausente" + +msgid "Energy deposit (site for power station)" +msgstr "Depósito de energia (local para estação de energia)" + +msgid "Energy level" +msgstr "Nível de energia" + +msgid "Engineer" +msgstr "Engenheiro" + +msgid "Error in instruction move" +msgstr "Deslocamento impossível" + +msgid "Execute the selected program" +msgstr "Execute o programa selecionado" + +msgid "Execute/stop" +msgstr "Executar/Parar" + +msgid "Exercises in the chapter:" +msgstr "Lista de exercícios do capítulo:" + +msgid "Exercises\\Programming exercises" +msgstr "Exercícios\\Exercícios de programação" + +msgid "Explode (\\key action;)" +msgstr "Explodir (\\key action;)" + +msgid "Explosive" +msgstr "Explosivo" + +msgid "Expression expected after =" +msgstr "Expressão experada após =" + +msgid "Extend shield (\\key action;)" +msgstr "Estender escudo (\\key action;)" + +msgid "Eyeglasses:" +msgstr "Óculos:" + +msgid "Face type:" +msgstr "Tipo de face:" + +msgid "File not open" +msgstr "Arquivo não aberto" + +msgid "Filename:" +msgstr "Nome do arquivo:" + +msgid "Film sequences\\Films before and after the missions" +msgstr "Filmes de sequência\\Filmes antes de depois das missões" + +msgid "Finish" +msgstr "Finalizar" + +msgid "Fixed mine" +msgstr "Mina fixa" + +msgid "Flat ground not large enough" +msgstr "Terra plana não larga o suficiente" + +msgid "Fog\\Fog" +msgstr "Neblina\\Neblina" + +msgid "Folder:" +msgstr "Pasta:" + +#, c-format +msgid "Folder: %s" +msgstr "Pasta: %s" + +msgid "Font size" +msgstr "Tamanho da fonte" + +msgid "Forward" +msgstr "Avançar" + +msgid "Forward (\\key up;)" +msgstr "Avançar (\\key up;)" + +msgid "Forward\\Moves forward" +msgstr "Avançar\\Move para frente" + +msgid "Found a site for a derrick" +msgstr "Encontrou um local para o extrator" + +msgid "Found a site for power station" +msgstr "Encontrou um local para um estação de energia" + +msgid "Found key A (site for derrick)" +msgstr "Encontrou uma chave A (local para extrator)" + +msgid "Found key B (site for derrick)" +msgstr "Encontrou uma chave B (local para extrator)" + +msgid "Found key C (site for derrick)" +msgstr "Encontrou uma chave C (local para extrator)" + +msgid "Found key D (site for derrick)" +msgstr "Encontrou uma chave D (local para extrator)" + +msgid "Free game" +msgstr "Jogo livre" + +msgid "Free game on this planet:" +msgstr "Logo livre neste planeta:" + +msgid "Free game\\Free game without a specific goal" +msgstr "Jogo livre\\Jogo livre sem um objetivo específico" + +msgid "Full screen\\Full screen or window mode" +msgstr "Tela cheia\\Tela cheia ou modo janela" + +msgid "Function already exists" +msgstr "Função já existe" + +msgid "Function name missing" +msgstr "Falta o nome da função" + +msgid "Function needs return type \"void\"" +msgstr "Função precisa de um tipo de retorno \"void\"" + +msgid "Game speed" +msgstr "Velocidade do jogo" + +msgid "Game\\Game settings" +msgstr "Jogo\\Opções de jogabilidade" + +msgid "Gantry crane" +msgstr "Guindaste pórtico" + +msgid "Generating" +msgstr "Gerando" + +msgid "Gold Edition development by:" +msgstr "Versão de ouro desenvolvida por:" + +msgid "Goto: destination occupied" +msgstr "Vá para: destino ocupado" + +msgid "Goto: inaccessible destination" +msgstr "Vá para: destino inacessível" + +msgid "Grab or drop (\\key action;)" +msgstr "Pegar ou soltar (\\key action;)" + +msgid "Graphics\\Graphics settings" +msgstr "Gráficos\\Opções gráficas" + +msgid "Green" +msgstr "Verde" + +msgid "Green flag" +msgstr "Bandeira verde" + +msgid "Ground not flat enough" +msgstr "Chão não plano o suficiente" + +msgid "Hair color:" +msgstr "Cor do cabelo:" + +msgid "Head\\Face and hair" +msgstr "Cabeça\\Face e cabelo" + +msgid "Help about selected object" +msgstr "Ajuda sobre o objeto selecionado" + +msgid "Help balloons\\Explain the function of the buttons" +msgstr "Balões de ajuda\\Explica a função dos botões" + +msgid "Hex value out of range" +msgstr "Valor hexadecimal fora de alcance" + +#, fuzzy +msgid "Higher speed\\Doubles speed" +msgstr "Alta velocidade\\Dobra a velocidade" + +msgid "Highest\\Highest graphic quality (lowest frame rate)" +msgstr "Elevado\\Alta qualidade gráfica (baixa taxa de quadros)" + +msgid "Home" +msgstr "Início" + +msgid "Houston Mission Control" +msgstr "Centro de controle de missões Houston" + +msgid "Illegal object" +msgstr "Objeto inacessível" + +msgid "Impossible under water" +msgstr "Impossível debaixo d'água" + +msgid "Impossible when carrying an object" +msgstr "Impossível enquanto carregando um objeto" + +msgid "Impossible when flying" +msgstr "Impossível enquanto voando" + +msgid "Impossible when moving" +msgstr "Impossível enquanto movendo" + +msgid "Impossible when swimming" +msgstr "Impossível enquanto nadando" + +msgid "Inappropriate bot" +msgstr "Robô inapropriado" + +msgid "Inappropriate cell type" +msgstr "Tipo de célula inapropriada" + +msgid "Inappropriate object" +msgstr "Objeto inapropiado" + +msgid "Incorrect index type" +msgstr "Tipo de índice inválido" + +msgid "Infected by a virus; temporarily out of order" +msgstr "Infectado por vírus; temporariamento fora de serviço" + +msgid "Information exchange post" +msgstr "Posto de troca de informação" + +msgid "Instruction \"break\" outside a loop" +msgstr "Intrução \"break\" fora de um laço" + +msgid "Instruction \"case\" missing" +msgstr "Instrução \"case\" faltando" + +msgid "Instruction \"case\" outside a block \"switch\"" +msgstr "Instrução \"case\" fora de um bloco \"switch\"" + +msgid "Instruction \"else\" without corresponding \"if\"" +msgstr "Instrução \"else\" sem o \"if\" correspondente" + +msgid "Instructions (\\key help;)" +msgstr "Instruções (\\key help;)" + +msgid "Instructions after the final closing brace" +msgstr "Instruções depois do último colchete de fechamento" + +msgid "Instructions for the mission (\\key help;)" +msgstr "Instruções para a missão (\\key help;)" + +msgid "Instructions from Houston" +msgstr "Instruções de Houston" + +msgid "Instructions\\Shows the instructions for the current mission" +msgstr "Instruções\\Mostra as instruções para a missão atual" + +msgid "Internal error - tell the developers" +msgstr "Erro interno - contacte os desenvolvedores" + +msgid "Invalid universal character name" +msgstr "Nome de carácter universal inválido" + +msgid "Invert\\Invert values on this axis" +msgstr "Inverter\\Inverte os valores neste eixo" + +msgid "Jet temperature" +msgstr "Temperatura do jato" + +msgid "Key A" +msgstr "Tecla A" + +msgid "Key B" +msgstr "Tecla B" + +msgid "Key C" +msgstr "Tecla C" + +msgid "Key D" +msgstr "Tecla D" + +msgid "Keyword \"while\" missing" +msgstr "Palavra-chave \"while\" faltando" + +msgid "Keyword help(\\key cbot;)" +msgstr "Palavra-chave ajuda (\\key cbot;)" + +msgid "LOADING" +msgstr "CARREGANDO" + +msgid "Legged grabber" +msgstr "Agarrador com pernas" + +msgid "Legged orga shooter" +msgstr "Atirador orgânico com pernas" + +msgid "Legged shooter" +msgstr "Atirador com pernas" + +msgid "Legged sniffer" +msgstr "Farejador com pernas" + +msgid "Levels in this chapter:" +msgstr "Níveis neste capítulo:" + +msgid "Lightning conductor" +msgstr "Condutor elétrico" + +msgid "List of objects" +msgstr "Lista dos objetos" + +msgid "List of saved missions" +msgstr "Lista das missões salvas" + +msgid "Load a saved mission" +msgstr "Carregar uma missão salva" + +msgid "Load\\Load a saved mission" +msgstr "Carregar\\Carregar uma missão salva" + +msgid "Load\\Loads the selected mission" +msgstr "Carregar\\Carrega a missão selecionada" + +msgid "Loading basic level settings" +msgstr "Carregando configurações de nível básico" + +msgid "Loading finished!" +msgstr "Carregamento finalizado!" + +msgid "Loading music" +msgstr "Carregando música" + +msgid "Loading objects" +msgstr "Carregando objetos" + +msgid "Loading terrain" +msgstr "Carregando terreno" + +# msgid "Speed 0.5x\\Half speed" +# msgstr "" +# msgid "Speed 1.0x\\Normal speed" +# msgstr "" +# msgid "Speed 1.5x\\1.5 times faster" +# msgstr "" +# msgid "Speed 2.0x\\Double speed" +# msgstr "" +# msgid "Speed 3.0x\\Triple speed" +# msgstr "" +# msgid "Speed 4.0x\\Quadruple speed" +# msgstr "" +# msgid "Speed 6.0x\\Sextuple speed" +# msgstr "" +msgid "Lower speed\\Decrease speed by half" +msgstr "Velocidade baixa\\Diminuir velocidade pela metade" + +msgid "Lowest\\Minimum graphic quality (highest frame rate)" +msgstr "Mínimo\\Qualidade gráfica mínima (alta taxa de quadros)" + +msgid "Lunar Roving Vehicle" +msgstr "Veículo rotativo Lunar" + +msgid "MSAA\\Multisample anti-aliasing" +msgstr "MSAA\\Antisserrilhamento multiamostragem" + +msgid "Maximize" +msgstr "Maximizar" + +msgid "Minimize" +msgstr "Minimizar" + +msgid "Mipmap level\\Mipmap level" +msgstr "Nível do mini-mapa\\Nível do mini-mapa" + +msgid "Missing end quote" +msgstr "Aspas de fechamento ausentes" + +msgid "Missing hex digits after escape sequence" +msgstr "Digitos hexademais ausentes após sequência de escape" + +msgid "Mission name" +msgstr "Nome da missão" + +msgid "Missions" +msgstr "Missões" + +msgid "Missions on this planet:" +msgstr "Lista de missões neste planeta:" + +msgid "Missions\\Select mission" +msgstr "Missões\\Selecione uma missão" + +msgid "Mouse inversion X\\Inversion of the scrolling direction on the X axis" +msgstr "Inversão de mouse X\\Inverte a direção da rolagem no eixo X" + +msgid "Mouse inversion Y\\Inversion of the scrolling direction on the Y axis" +msgstr "Inversão de mouse Y\\Inverte a direção da rolagem no eixo Y" + +msgid "Move selected program down" +msgstr "Move o programa selecionado para baixo" + +msgid "Move selected program up" +msgstr "Move o programa selecionado para cima" + +msgid "Mute\\No sound" +msgstr "Mudo\\Sem som" + +msgid "Name:" +msgstr "Nome:" + +msgid "Negative value rejected by \"throw\"" +msgstr "Valor negativo rejeitado por \"throw\"" + +msgid "Nest" +msgstr "Ninho" + +msgid "New" +msgstr "Novo" + +msgid "New ..." +msgstr "Novo ..." + +msgid "New bot available" +msgstr "Novo robô disponível" + +msgid "Next" +msgstr "Próximo" + +msgid "Next object\\Selects the next object" +msgstr "Próximo objeto\\Selecionar o próximo objeto" + +msgid "No" +msgstr "Não" + +msgid "No energy in the subsoil" +msgstr "Nenhuma energia no subsolo" + +msgid "No flag nearby" +msgstr "Nenhuma bandeira próxima" + +msgid "No function running" +msgstr "Nenhuma função executando" + +msgid "No function with this name accepts this kind of parameter" +msgstr "Nenhuma função com este nome aceita este tipo de parâmetro" + +msgid "No function with this name accepts this number of parameters" +msgstr "Nenhuma função com este nome aceita este número de parâmetros" + +msgid "No information exchange post within range" +msgstr "Nenhum posto de troca de informação ao alcance" + +msgid "No more energy" +msgstr "Não há mais energia" + +msgid "No ore in the subsoil" +msgstr "Nenhum mineral no subsolo" + +msgid "No power cell" +msgstr "Sem célula de energia" + +msgid "No titanium" +msgstr "Sem titânio" + +msgid "No titanium around" +msgstr "Nenhum titânio ao redor" + +msgid "No titanium ore to convert" +msgstr "Sem minério de titânio para converter" + +msgid "No titanium to transform" +msgstr "Nenhum titânio para transformar" + +msgid "No uranium to transform" +msgstr "Nenhum urânio para transformar" + +msgid "No userlevels installed!" +msgstr "Nenhum nível de usuário instalado!" + +msgid "Non-void function needs \"return;\"" +msgstr "Funções não void precisam de \"return;\"" + +msgid "Normal size" +msgstr "Tamanho normal" + +msgid "Normal\\Normal graphic quality" +msgstr "Normal\\Qualidade gráfica normal" + +msgid "Normal\\Normal sound volume" +msgstr "Normal\\Volume de som normal" + +msgid "Not enough energy" +msgstr "Sem energia suficiente" + +msgid "Not enough energy yet" +msgstr "Ainda sem energia suficiente" + +msgid "Not found anything to destroy" +msgstr "Não encontrou nada para destruir" + +msgid "Nothing to analyze" +msgstr "Nada para analisar" + +msgid "Nothing to drop" +msgstr "Nada para largar" + +msgid "Nothing to grab" +msgstr "Nada para pegar" + +msgid "Nothing to recycle" +msgstr "Nada para reciclar" + +msgid "Nuclear power cell" +msgstr "Célula de energia núclear" + +msgid "Nuclear power cell available" +msgstr "Célula de energia núclear disponível" + +msgid "Nuclear power station" +msgstr "Estação de energia núclear" + +msgid "Number missing" +msgstr "Número ausente" + +msgid "Number of insects detected" +msgstr "Número de insetos detectados" + +msgid "Number of particles\\Explosions, dust, reflections, etc." +msgstr "Quantidade de particulas\\Explosões, poeira, reflexões, etc." + +msgid "OK" +msgstr "OK" + +msgid "OK\\Choose the selected player" +msgstr "OK\\Escolher o jogador selecionado" + +msgid "OK\\Close program editor and return to game" +msgstr "OK\\Fechar o editor e retornar ao jogo" + +msgid "Object too close" +msgstr "Objeto muito próximo" + +msgid "Octal value out of range" +msgstr "Valor octal fora do limite" + +msgid "One step" +msgstr "Um passo" + +msgid "Open" +msgstr "Abrir" + +msgid "Open (Ctrl+O)" +msgstr "Abrir (Ctrl+O)" + +msgid "Opening brace missing" +msgstr "Chave de abertura ausente" + +msgid "Opening bracket missing" +msgstr "Colchete de abertura ausente" + +msgid "Operation impossible with value \"nan\"" +msgstr "Operação impossível com o valor \"nan\"" + +msgid "Options" +msgstr "Opções" + +msgid "Options\\Preferences" +msgstr "Opções\\Preferências" + +msgid "Organic matter" +msgstr "Matéria orgânica" + +msgid "Origin of last message\\Shows where the last message was sent from" +msgstr "Origem da última mensagem\\Mostra de onde a última mensagem foi enviada" + +msgid "Original game developed by:" +msgstr "Jogo original desenvolvido por:" + +msgid "Parameters missing" +msgstr "Parâmetros ausentes" + +msgid "Particles in the interface\\Steam clouds and sparks in the interface" +msgstr "Partículas na interface\\Núvens de vapor e faíscas na interface" + +msgid "Paste (Ctrl+V)" +msgstr "Colar (Ctrl+V)" + +msgid "Pause blur\\Blur the background on the pause screen" +msgstr "Borrão de pausa\\Borra o fundo na tela de pausa" + +msgid "Pause in background\\Pause the game when the window is unfocused" +msgstr "Pausar quando em background\\Pausa o jogo quando a janela está sem foco" + +msgid "Pause/continue" +msgstr "Pausar/Continuar" + +msgid "Pause\\Pause the game without opening menu" +msgstr "Pausar\\Pausa o jogo sem abrir o menu" + +msgid "Phazer shooter" +msgstr "Atirador phazer" + +msgid "Photography" +msgstr "Fotografia" + +msgid "Place occupied" +msgstr "Local ocupado" + +msgid "Planets:" +msgstr "Planetas:" + +msgid "Plans for defense tower available" +msgstr "Planos para a torre de defesa disponíveis" + +msgid "Plans for nuclear power plant available" +msgstr "Planos para a planta nuclear disponíveis" + +msgid "Plans for phazer shooter available" +msgstr "Planos para o atirador phazer disponíveis" + +msgid "Plans for shielder available" +msgstr "Planos para o defensor disponíveis" + +msgid "Plans for shooter available" +msgstr "Planos para o atirador disponíveis" + +msgid "Plans for thumper available" +msgstr "Planos para o batedor disponíveis" + +msgid "Plans for tracked robots available" +msgstr "Planos para robôs com esteiras disponíveis" + +msgid "Plant a flag" +msgstr "Colocar uma bandeira" + +msgid "Play\\Start mission!" +msgstr "Jogar\\Iniciar missão!" + +msgid "Player" +msgstr "Jogador" + +msgid "Player name" +msgstr "Nome do jogador" + +msgid "Player's name" +msgstr "Nome dos jogadores" + +msgid "Power cell" +msgstr "Célula de energia" + +msgid "Power cell available" +msgstr "Célula de energia disponível" + +msgid "Power cell factory" +msgstr "Fábrica de células de energia" + +msgid "Power station" +msgstr "Estação de energia" + +msgid "Practice bot" +msgstr "Robô de prática" + +msgid "Press \\key help; to read instructions on your SatCom" +msgstr "Pressione \\key help; para ler as intruções no seu SatCom" + +msgid "Previous" +msgstr "Anterior" + +msgid "Previous object\\Selects the previous object" +msgstr "Objeto anterior\\Seleciona o objeto anterior" + +msgid "Previous selection (\\key desel;)" +msgstr "Seleção anterior (\\key desel;)" + +msgid "Private element" +msgstr "Elemento privado" + +msgid "Private\\Private folder" +msgstr "Privado\\Pasta privada" + +msgid "Processing level file" +msgstr "Processando o arquivo de nível" + +msgid "Program cloned" +msgstr "Programa clonado" + +msgid "Program editor" +msgstr "Editor" + +msgid "Program finished" +msgstr "Programa finalizado" + +msgid "Program infected by a virus" +msgstr "Programa infectado por vírus" + +msgid "Programming exercises" +msgstr "Exercícios de programação" + +msgid "Programming help" +msgstr "Ajuda de programação" + +msgid "Programming help (\\key prog;)" +msgstr "Ajuda de programação (\\key prog;)" + +msgid "Programming help\\Gives more detailed help with programming" +msgstr "Ajuda de programação\\Fornece uma ajuda mais detalhada sobre programação" + +msgid "Programs dispatched by Houston" +msgstr "Programas enviados por Houston" + +msgid "Public required" +msgstr "Necessário público" + +msgid "Public\\Common folder" +msgstr "Público\\Pasta comum" + +msgid "Quake at explosions\\The screen shakes at explosions" +msgstr "Tremer em explosões\\A tela sacode em explosões" + +msgid "Quick load\\Immediately load game" +msgstr "Carregando rápido\\Imediatamente carrega o jogo" + +msgid "Quick save\\Immediately save game" +msgstr "Salvamento rápido\\Imediatamente salva o jogo" + +#, fuzzy +msgid "Quicksave slot not found" +msgstr "Slot para salvamento rápido não encontrado" + +msgid "Quit\\Quit Colobot: Gold Edition" +msgstr "Sair\\Fecha Colobot: ediçao de ouro" + +msgid "Quit\\Quit the current mission or exercise" +msgstr "Sair\\Termina a missão atual ou exercício" + +msgid "Radar station" +msgstr "Estação de radar" + +msgid "Read error" +msgstr "Erro de leitura" + +msgid "Recorder" +msgstr "Gravador" + +msgid "Recycle (\\key action;)" +msgstr "Reciclar (\\key action;)" + +msgid "Recycler" +msgstr "Reciclador" + +msgid "Red" +msgstr "Vermelho" + +msgid "Red flag" +msgstr "Bandeira vermelha" + +msgid "Reflections on the buttons \\Shiny buttons" +msgstr "Reflexões nos botões\\Botões brilhantes" + +msgid "Remains of Apollo mission" +msgstr "Restos da missão Apollo" + +msgid "Remove a flag" +msgstr "Remover a bandeira" + +msgid "Remove selected program" +msgstr "Remover o programa selecionado" + +msgid "Render distance\\Maximum visibility" +msgstr "Distância de renderização\\Visibilidade máxima" + +msgid "Repair center" +msgstr "Centro de reparos" + +msgid "Research center" +msgstr "Centro de pesquisa" + +msgid "Research program already performed" +msgstr "Programa de pesquisa já realizado" + +msgid "Research program completed" +msgstr "Programa de pesquisa completado" + +msgid "Reserved keyword of CBOT language" +msgstr "Palavra-chave reservada para a linguagem CBOT" + +msgid "Resolution" +msgstr "Resolução" + +msgid "Resolution:" +msgstr "Resolução:" + +msgid "Resources" +msgstr "Recursos" + +msgid "Restart\\Restart the mission from the beginning" +msgstr "Reiniciar\\Reinicia a missão do começo" + +msgid "Restoring CBot execution state" +msgstr "Restaura o estado de execução do CBot" + +msgid "Restoring saved objects" +msgstr "Restaurando objetos salvos" + +msgid "Results" +msgstr "Resultados" + +msgid "Return to start" +msgstr "Retornar para o início" + +msgid "Robbie" +msgstr "Robbie" + +msgid "Ruin" +msgstr "Ruína" + +msgid "Run research program for defense tower" +msgstr "Executar programa de pesquisa para torre de defesa" + +msgid "Run research program for legged bots" +msgstr "Executar programa de pesquisa para robôs com pernas" + +msgid "Run research program for nuclear power" +msgstr "Executar programa de pesquisa para energia nuclear" + +msgid "Run research program for orga shooter" +msgstr "Executar programa de pesquisa para atirador orgânico" + +msgid "Run research program for phazer shooter" +msgstr "Executar programa de pesquisa para atirador phazer" + +msgid "Run research program for shielder" +msgstr "Executar programa de pesquisa para defensor" + +msgid "Run research program for shooter" +msgstr "Executar programa de pesquisa para atirador" + +msgid "Run research program for thumper" +msgstr "Executar programa de pesquisa para batedor" + +msgid "Run research program for tracked bots" +msgstr "Executar programa de pesquisa para robôs com esteira" + +msgid "Run research program for winged bots" +msgstr "Executar programa de pesquisa para robôs alados" + +msgid "SatCom" +msgstr "SatCom" + +msgid "Satellite report" +msgstr "Relatório do satélite" + +msgid "Save" +msgstr "Salvar" + +msgid "Save (Ctrl+S)" +msgstr "Salvar (Ctrl+S)" + +msgid "Save the current mission" +msgstr "Salve a missão atual" + +msgid "Save\\Save the current mission" +msgstr "Salvar\\Salve a missão atual" + +msgid "Save\\Saves the current mission" +msgstr "Salvar\\Salva a missão atual" + +msgid "Select the astronaut\\Selects the astronaut" +msgstr "Selecione o astronauta\\Seleciona o astronauta" + +msgid "Semicolon terminator missing" +msgstr "Falta o terminador ponto e vírgula" + +msgid "Shadow resolution\\Higher means better range and quality, but slower" +msgstr "Resolução das sombras\\Valores altos significam alcance e qualidade melhores, porém mais devagar" + +msgid "Shield level" +msgstr "Nível de escudo" + +msgid "Shield radius" +msgstr "Raio do escudo" + +msgid "Shielder" +msgstr "Defensor" + +msgid "Shoot (\\key action;)" +msgstr "Atirar (\\key action;)" + +msgid "Show if the ground is flat" +msgstr "Mostre se o solo é plano" + +msgid "Show the place" +msgstr "Mostre o local" + +msgid "Show the range" +msgstr "Mostre o alcance" + +msgid "Show the solution" +msgstr "Mostre a solução" + +msgid "Sign \" : \" missing" +msgstr "Sinal \" : \" ausente" + +msgid "Simple shadows\\Shadows spots on the ground" +msgstr "Sombras simples\\Pontos de sombra no chão" + +msgid "Size 1" +msgstr "Tamanho 1" + +msgid "Size 2" +msgstr "Tamanho 2" + +msgid "Size 3" +msgstr "Tamanho 3" + +msgid "Size 4" +msgstr "Tamanho 4" + +msgid "Size 5" +msgstr "Tamanho 5" + +msgid "Sniff (\\key action;)" +msgstr "Farejar (\\key action;)" + +msgid "Solution" +msgstr "Solução" + +msgid "Sound effects:\\Volume of engines, voice, shooting, etc." +msgstr "Efeitos sonoros:\\Volume dos motores, voz, tiros, etc." + +msgid "Sound\\Music and game sound volume" +msgstr "Som\\Volume do som das músicas e do jogo" + +msgid "Spaceship" +msgstr "Nave espacial" + +msgid "Spaceship ruin" +msgstr "Ruína de nave espacial" + +msgid "Spider" +msgstr "Aranha" + +msgid "Spider fatally wounded" +msgstr "Aranha fatalmente ferida" + +msgid "Stack overflow" +msgstr "Estouro de pilha" + +msgid "Standard action\\Standard action of the bot (take/grab, shoot, sniff, etc)" +msgstr "Ação padrão\\Ação padrão do robô (pegar/agarrar, atirar, farejar, etc)" + +msgid "Standard controls\\Standard key functions" +msgstr "Controles padrões\\Funções padrões das teclas" + +msgid "Standard speed\\Reset speed to normal" +msgstr "Velocidade padrão\\Reiniciar a velocidade para o normal" + +msgid "Standard\\Standard appearance settings" +msgstr "Padrão\\Configurações de aparência padrão" + +msgid "Start" +msgstr "Iniciar" + +msgid "Starting..." +msgstr "Iniciando..." + +msgid "Still working ..." +msgstr "Ainda trabalhando ..." + +msgid "String missing" +msgstr "Carácteres ausentes" + +msgid "Strip color:" +msgstr "Cor da tira:" + +msgid "Subber" +msgstr "Mergulhador" + +msgid "Suit color:" +msgstr "Cor do traje:" + +msgid "Suit\\Astronaut suit" +msgstr "Traje\\Traje de astronauta" + +msgid "Summary:" +msgstr "Sumário:" + +msgid "Survival kit" +msgstr "Kit de sobrevivência" + +msgid "Switch bots <-> buildings" +msgstr "Trocar robôs <-> prédios" + +msgid "Take off to finish the mission" +msgstr "Decole para finalizar a missão" + +msgid "Target" +msgstr "Alvo" + +msgid "Target bot" +msgstr "Robô alvo" + +msgid "Terrain relief" +msgstr "Relevo do terreno" + +msgid "Texture filtering\\Texture filtering" +msgstr "Filtragem de textura\\Filtragem de textura" + +msgid "Textures" +msgstr "Texturas" + +msgid "The battle has ended" +msgstr "A batalha acabou" + +msgid "The expression must return a boolean value" +msgstr "A expressão deve retornar um valor booleano" + +msgid "The function returned no value" +msgstr "A função não retornou nenhum valor" + +msgid "The mission is not accomplished yet (press \\key help; for more details)" +msgstr "A missão não foi completada ainda (pressione \\key help; para mais detalhes)" + +msgid "The types of the two operands are incompatible" +msgstr "Os tipos dos dois operandos são incompativeis" + +msgid "This class already exists" +msgstr "Esta classe já existe" + +msgid "This class does not exist" +msgstr "Esta classe não existe" + +msgid "This is example code that cannot be run directly" +msgstr "Este é um código de exemplo que não pode ser executado diretamente" + +msgid "This is not a member of this class" +msgstr "Este não é um membro desta classe" + +msgid "This label does not exist" +msgstr "Este rótulo não existe" + +msgid "This menu is for userlevels from mods, but you didn't install any" +msgstr "Este menu é para níveis de usuários, mas você não instalou nenhum." + +msgid "This object is currently busy" +msgstr "Este objeto está ocupado atualmente" + +msgid "This object is not a member of a class" +msgstr "Este objeto não é um membro de uma classe" + +msgid "This parameter needs a default value" +msgstr "Este parâmetro necessita de um valor padrão" + +msgid "This program is read-only, clone it to edit" +msgstr "Este programa é somente-leitura, clone-o para edita-lo" + +msgid "Thump (\\key action;)" +msgstr "Bater (\\key action;)" + +msgid "Thumper" +msgstr "Batedor" + +msgid "Titanium" +msgstr "Titânio" + +msgid "Titanium available" +msgstr "Titânio disponível" + +msgid "Titanium deposit (site for derrick)" +msgstr "Depósito de titânio (local para extrator)" + +msgid "Titanium ore" +msgstr "Mineral de titânio" + +msgid "Titanium too close" +msgstr "Titânio muito perto" + +msgid "Titanium too far away" +msgstr "Titânio muito longe" + +msgid "Too close to a building" +msgstr "Muito perto de um prédio" + +msgid "Too close to an existing flag" +msgstr "Muito perto de uma bandeira" + +msgid "Too close to space ship" +msgstr "Muito perto da nave espacial" + +msgid "Too many flags of this color (maximum 5)" +msgstr "Muitas bandeiras dessa cor (máximo 5)" + +msgid "Too many parameters" +msgstr "Muitos parâmetros" + +msgid "Tracked grabber" +msgstr "Pegador com esteiras" + +msgid "Tracked orga shooter" +msgstr "Atirador orgânico com esteiras" + +msgid "Tracked shooter" +msgstr "Atirador com esteiras" + +msgid "Tracked sniffer" +msgstr "Farejador com esteiras" + +msgid "Transforms only titanium" +msgstr "Transformar somente titânio" + +msgid "Transforms only uranium" +msgstr "Transformar somente urânio" + +msgid "Transmitted information" +msgstr "Informação transmitida" + +msgid "Turn left (\\key left;)" +msgstr "Vire a esquerda (\\key left;)" + +msgid "Turn left\\turns the bot to the left" +msgstr "Vire a esquerda\\vira o robô para a esquerda" + +msgid "Turn right (\\key right;)" +msgstr "Vire a direita (\\key right;)" + +msgid "Turn right\\turns the bot to the right" +msgstr "Vire a direita\\vira o robô para a direita" + +msgid "Type declaration missing" +msgstr "Declaração de tipo ausente" + +msgid "Unable to control enemy objects" +msgstr "Impossível controlar objetos inimigos" + +msgid "Undo (Ctrl+Z)" +msgstr "Desfazer (Ctrl+Z)" + +msgid "Unit" +msgstr "Unidade" + +msgid "Unknown Object" +msgstr "Objeto desconhecido" + +msgid "Unknown command" +msgstr "Comando desconhecido" + +msgid "Unknown escape sequence" +msgstr "Sequência de escape desconhecidade" + +msgid "Unknown function" +msgstr "Função desconhecida" + +msgid "Up (\\key gup;)" +msgstr "Cima (\\key gup;)" + +msgid "Uranium deposit (site for derrick)" +msgstr "Depósito de urânio (local para extrator)" + +msgid "Uranium ore" +msgstr "Mineral de urânio" + +msgid "User levels" +msgstr "Níveis de usuário" + +msgid "Variable name missing" +msgstr "Nome de variável ausente" + +msgid "Variable not declared" +msgstr "Variável não declarada" + +msgid "Variable not initialized" +msgstr "Variável não inicializada" + +msgid "Vault" +msgstr "Cofre" + +msgid "Violet flag" +msgstr "Bandeira violeta" + +msgid "Void parameter" +msgstr "Parâmetro vazio" + +msgid "Wasp" +msgstr "Vespa" + +msgid "Wasp fatally wounded" +msgstr "Vespa fatalmente ferida" + +msgid "Waste" +msgstr "Desperdício" + +msgid "Wheeled grabber" +msgstr "Agarrador com rodas" + +msgid "Wheeled orga shooter" +msgstr "Atirador orgânico com rodas" + +msgid "Wheeled shooter" +msgstr "Atirador com rodas" + +msgid "Wheeled sniffer" +msgstr "Farejador com rodas" + +msgid "Winged grabber" +msgstr "Agarrador alado" + +msgid "Winged orga shooter" +msgstr "Atirador orgânico alado" + +msgid "Winged shooter" +msgstr "Atirador alado" + +msgid "Winged sniffer" +msgstr "Farejador alado" + +msgid "Withdraw shield (\\key action;)" +msgstr "Retirar escudo (\\key action;)" + +msgid "Worm" +msgstr "Verme" + +msgid "Worm fatally wounded" +msgstr "Verme fatalmente ferido" + +msgid "Wreckage" +msgstr "Destroços" + +msgid "Write error" +msgstr "Erro de escrita" + +msgid "Wrong type for the assignment" +msgstr "Tipo errado para a tarefa" + +msgid "Yellow flag" +msgstr "Bandeira amarela" + +msgid "Yes" +msgstr "Sim" + +msgid "You can fly with the keys (\\key gup;) and (\\key gdown;)" +msgstr "Você pode voar com as teclas (\\key gup;) e (\\key gdown;)" + +msgid "You can not carry a radioactive object" +msgstr "Você não pode carregar um objeto radioativo" + +msgid "You can not carry an object under water" +msgstr "Você não pode carregar um objeto debaixo d'água" + +#, c-format +msgid "You cannot use \"%s\" in this exercise (used: %d)" +msgstr "Você não pode usar \"%s\" neste exercício (usado: %d)" + +msgid "You found a usable object" +msgstr "Você encontrou um objeto utilizável" + +#, c-format +msgid "You have to use \"%1$s\" at least once in this exercise (used: %2$d)" +msgid_plural "You have to use \"%1$s\" at least %3$d times in this exercise (used: %2$d)" +msgstr[0] "Você deve usar \"%1$s\" pelo menos uma vez neste exercício (usado: %2$d)" +msgstr[1] "Você deve usar \"%1$s\" pelo menos %3$d vezes neste exercício (usado: %2$d)" + +#, c-format +msgid "You have to use \"%1$s\" at most once in this exercise (used: %2$d)" +msgid_plural "You have to use \"%1$s\" at most %3$d times in this exercise (used: %2$d)" +msgstr[0] "Você deve usar \"%1$s\" pelo menos uma vez neste exercício (usado: %2$d)" +msgstr[1] "Você deve usar \"%1$s\" pelo menos %3$d vezes neste exercício (usado: %2$d)" + +msgid "You must get on the spaceship to take off" +msgstr "Você deve estar na nave espacial para decolar" + +msgid "Zoom mini-map" +msgstr "Zoom no mini-mapa" + +msgid "\\Blue flags" +msgstr "\\Bandeiras azuis" + +msgid "\\Eyeglasses 1" +msgstr "\\Óculos 1" + +msgid "\\Eyeglasses 2" +msgstr "\\Óculos 2" + +msgid "\\Eyeglasses 3" +msgstr "\\Óculos 3" + +msgid "\\Eyeglasses 4" +msgstr "\\Óculos 4" + +msgid "\\Eyeglasses 5" +msgstr "\\Óculos 5" + +msgid "\\Face 1" +msgstr "\\Face 1" + +msgid "\\Face 2" +msgstr "\\Face 2" + +msgid "\\Face 3" +msgstr "\\Face 3" + +msgid "\\Face 4" +msgstr "\\Face 4" + +msgid "\\Green flags" +msgstr "\\Bandeiras verdes" + +msgid "\\New player name" +msgstr "\\Nome do novo jogador" + +msgid "\\No eyeglasses" +msgstr "\\Sem óculos" + +msgid "\\Raise the pencil" +msgstr "\\Levante o lápis" + +msgid "\\Red flags" +msgstr "\\Bandeiras vermelhas" + +msgid "\\Return to Colobot: Gold Edition" +msgstr "\\Voltar a Colobot: edição de ouro" + +msgid "\\SatCom on standby" +msgstr "\\SatCom em espera" + +msgid "\\Start recording" +msgstr "\\Iniciar gravação" + +msgid "\\Stop recording" +msgstr "\\Parar gravação" + +msgid "\\Turn left" +msgstr "\\Virar a esquerda" + +msgid "\\Turn right" +msgstr "\\Virar a direita" + +msgid "\\Use the black pencil" +msgstr "\\Use o lápis preto" + +msgid "\\Use the blue pencil" +msgstr "\\Use o lápis azul" + +msgid "\\Use the brown pencil" +msgstr "\\Use o lápis marrom" + +msgid "\\Use the green pencil" +msgstr "\\Use o lápis verde" + +msgid "\\Use the orange pencil" +msgstr "\\Use o lápis laranja" + +msgid "\\Use the purple pencil" +msgstr "\\Use o lápis roxo" + +msgid "\\Use the red pencil" +msgstr "\\Use o lápis vermelho" + +msgid "\\Use the yellow pencil" +msgstr "\\Use o lápis amarelo" + +msgid "\\Violet flags" +msgstr "\\Bandeiras violetas" + +msgid "\\Yellow flags" +msgstr "\\Bandeiras amarelas" + +msgid "colobot.info" +msgstr "colobot.info" + +msgid "epsitec.com" +msgstr "epsitec.com" + +#~ msgid " " +#~ msgstr " " + +#~ msgid " Drivers:" +#~ msgstr " Pilotes :" + +#~ msgid " Missions on this level:" +#~ msgstr " Missions du niveau :" + +#~ msgid "\"%s\" missing in this exercise" +#~ msgstr "Il manque \"%s\" dans le programme" + +#~ msgid "3D sound\\3D positioning of the sound" +#~ msgstr "Bruitages 3D\\Positionnement sonore dans l'espace" + +#~ msgid "Building too close" +#~ msgstr "Bâtiment trop proche" + +#~ msgid "COLOBOT" +#~ msgstr "COLOBOT" + +#~ msgid "Camera awayest" +#~ msgstr "Caméra plus loin" + +#~ msgid "Camera down\\Decrease camera angle while visiting message origin" +#~ msgstr "Caméra plus basse\\Réduit l'angle de caméra lors de la vue de l'origine des messages" + +#~ msgid "Camera nearest" +#~ msgstr "Caméra plus proche" + +#~ msgid "Camera to left" +#~ msgstr "Caméra à gauche" + +#~ msgid "Camera to right" +#~ msgstr "Caméra à droite" + +#~ msgid "Camera up\\Increase camera angle while visiting message origin" +#~ msgstr "Caméra plus haute\\Augmente l'angle de caméra lors de la vue de l'origine des messages" + +#~ msgid "Can not create this; there are too many objects" +#~ msgstr "Création impossible; il y a trop d'objets" + +#~ msgid "Cancel\\Keep current player name" +#~ msgstr "Annuler\\Conserver le joueur actuel" + +#~ msgid "Checkpoint crossed" +#~ msgstr "Indicateur atteint" + +#~ msgid "Compass" +#~ msgstr "Boussole" + +#~ msgid "Continue\\Continue the game" +#~ msgstr "Continuer\\Continuer de jouer" + +#~ msgid "Delete" +#~ msgstr "Détruire" + +#~ msgid "Details\\Visual quality of 3D objects" +#~ msgstr "Détails des objets\\Qualité des objets en 3D" + +#~ msgid "Developed by :" +#~ msgstr "Développé par :" + +#~ msgid "Do you want to quit Colobot: Gold Edition?" +#~ msgstr "Voulez-vous quitter Colobot: Édition Gold ?" + +#~ msgid "Exit film\\Film at the exit of exercises" +#~ msgstr "Retour animé\\Retour animé dans les exercices" + +#~ msgid "Friendly fire\\Your shooting can damage your own objects " +#~ msgstr "Dégâts à soi-même\\Vos tirs infligent des dommages à vos unités" + +#~ msgid "Ground inappropriate" +#~ msgstr "Terrain inadapté" + +#~ msgid "Key word help\\More detailed help about key words" +#~ msgstr "Instructions mot-clé\\Explication sur le mot-clé" + +#~ msgid "Marks on the ground\\Marks on the ground" +#~ msgstr "Marques sur le sol\\Marques dessinées sur le sol" + +#~ msgid "Mouse shadow\\Gives the mouse a shadow" +#~ msgstr "Souris ombrée\\Jolie souris avec une ombre" + +#~ msgid "No other robot" +#~ msgstr "Pas d'autre robot" + +#~ msgid "Not yet enough energy" +#~ msgstr "Pas encore assez d'énergie" + +#~ msgid "Num of decorative objects\\Number of purely ornamental objects" +#~ msgstr "Nb d'objets décoratifs\\Qualité d'objets non indispensables" + +#~ msgid "Planets and stars\\Astronomical objects in the sky" +#~ msgstr "Planètes et étoiles\\Motifs mobiles dans le ciel" + +#~ msgid "Quit the mission?" +#~ msgstr "Quitter la mission ?" + +#~ msgid "Quit\\Quit COLOBOT" +#~ msgstr "Quitter\\Quitter COLOBOT" + +#~ msgid "Robbie\\Your assistant" +#~ msgstr "Robbie\\Votre assistant" + +#~ msgid "Sky\\Clouds and nebulae" +#~ msgstr "Ciel\\Ciel et nuages" + +#~ msgid "Speed 0.5x\\Half speed" +#~ msgstr "Vitesse 0.5x\\Demi-vitesse" + +#~ msgid "Speed 1.0x\\Normal speed" +#~ msgstr "Vitesse 1.0x\\Vitesse normale" + +#~ msgid "Speed 1.5x\\1.5 times faster" +#~ msgstr "Vitesse 1.5x\\Une fois et demi plus rapide" + +#~ msgid "Speed 3.0x\\Three times faster" +#~ msgstr "Vitesse 3.0x\\Trois fois plus rapide" + +#~ msgid "Speed 3.0x\\Triple speed" +#~ msgstr "Vitesse 3.0x\\Trois fois plus rapide " + +#~ msgid "Speed 4.0x\\Quadruple speed" +#~ msgstr "Vitesse 4.0x\\Quatre fois plus rapide" + +#~ msgid "Speed 6.0x\\Sextuple speed" +#~ msgstr "Vitesse 6.0x\\Six fois plus rapide" + +#~ msgid "Sunbeams\\Sunbeams in the sky" +#~ msgstr "Rayons du soleil\\Rayons selon l'orientation" + +#~ msgid "System mouse\\Use system mouse cursor" +#~ msgstr "Souris système\\Utiliser le curseur de la souris système" + +#~ msgid "Textures\\Quality of textures " +#~ msgstr "Qualité des textures\\Qualité des images" + +#~ msgid "The list is only available if a \\l;radar station\\u object\\radar; is working.\n" +#~ msgstr "Liste non disponible sans \\l;radar\\u object\\radar;.\n" + +#~ msgid "Use a joystick\\Joystick or keyboard" +#~ msgstr "Utilise un joystick\\Joystick ou clavier" + +#~ msgid "User\\User levels" +#~ msgstr "Suppl.\\Niveaux supplémentaires" + +#~ msgid "\\Return to COLOBOT" +#~ msgstr "\\Retourner dans COLOBOT" + +#~ msgid "\\b;Aliens\n" +#~ msgstr "\\b;Listes des ennemis\n" + +#~ msgid "\\b;Buildings\n" +#~ msgstr "\\b;Listes des bâtiments\n" + +#~ msgid "\\b;Error\n" +#~ msgstr "\\b;Erreur\n" + +#~ msgid "\\b;List of objects\n" +#~ msgstr "\\b;Listes des objets\n" + +#~ msgid "\\b;Moveable objects\n" +#~ msgstr "\\b;Listes des objets transportables\n" + +#~ msgid "\\b;Robots\n" +#~ msgstr "\\b;Listes des robots\n" + +#~ msgid "\\c; (none)\\n;\n" +#~ msgstr "\\c; (aucun)\\n;\n" diff --git a/src/app/app.cpp b/src/app/app.cpp index 3444481c..c9fbf296 100644 --- a/src/app/app.cpp +++ b/src/app/app.cpp @@ -1718,6 +1718,11 @@ char CApplication::GetLanguageChar() const case LANGUAGE_RUSSIAN: langChar = 'R'; break; + + case LANGUAGE_PORTUGUESE_BRAZILIAN: + langChar = 'B'; + break; + } return langChar; } @@ -1774,6 +1779,10 @@ void CApplication::SetLanguage(Language language) { m_language = LANGUAGE_RUSSIAN; } + else if (strncmp(envLang,"br",2) == 0) + { + m_language = LANGUAGE_PORTUGUESE_BRAZILIAN; + } else { GetLogger()->Warn("Enviromnent locale ('%s') is not supported, setting default language\n", envLang); @@ -1812,6 +1821,10 @@ void CApplication::SetLanguage(Language language) case LANGUAGE_RUSSIAN: locale = "ru_RU.utf8"; break; + + case LANGUAGE_PORTUGUESE_BRAZILIAN: + locale = "pt_BR.utf8"; + break; } std::string langStr = "LANGUAGE="; diff --git a/src/common/language.cpp b/src/common/language.cpp index a9f62419..d1990b49 100644 --- a/src/common/language.cpp +++ b/src/common/language.cpp @@ -27,7 +27,8 @@ const std::map LANGUAGE_MAP = { { LANGUAGE_GERMAN, "de" }, { LANGUAGE_FRENCH, "fr" }, { LANGUAGE_POLISH, "pl" }, - { LANGUAGE_RUSSIAN, "ru" } + { LANGUAGE_RUSSIAN, "ru" }, + { LANGUAGE_PORTUGUESE_BRAZILIAN, "br" } }; bool ParseLanguage(const std::string& str, Language& language) diff --git a/src/common/language.h b/src/common/language.h index f25f7f77..0310cb73 100644 --- a/src/common/language.h +++ b/src/common/language.h @@ -33,7 +33,8 @@ enum Language LANGUAGE_GERMAN = 2, LANGUAGE_POLISH = 3, LANGUAGE_RUSSIAN = 4, - LANGUAGE_CZECH = 5 + LANGUAGE_CZECH = 5, + LANGUAGE_PORTUGUESE_BRAZILIAN = 6 }; bool ParseLanguage(const std::string& str, Language& language); diff --git a/src/ui/screen/screen_setup_game.cpp b/src/ui/screen/screen_setup_game.cpp index cb4af8f4..a076ab59 100644 --- a/src/ui/screen/screen_setup_game.cpp +++ b/src/ui/screen/screen_setup_game.cpp @@ -149,6 +149,7 @@ void CScreenSetupGame::CreateInterface() pli->SetItemName(1+LANGUAGE_GERMAN, "German"); pli->SetItemName(1+LANGUAGE_POLISH, "Polish"); pli->SetItemName(1+LANGUAGE_RUSSIAN, "Russian"); + pli->SetItemName(1+LANGUAGE_PORTUGUESE_BRAZILIAN, "Brazilian Portuguese"); UpdateSetupButtons(); } From be1066912fadc29914b30994211b825d6b42471b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Robson=20Mariano=20Alves?= Date: Tue, 15 May 2018 16:50:42 -0300 Subject: [PATCH 097/207] Translation to Brazilian Portuguese --- po/br.po | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/po/br.po b/po/br.po index 956b6d2f..dc710c46 100644 --- a/po/br.po +++ b/po/br.po @@ -1560,6 +1560,10 @@ msgstr "Bater (\\key action;)" msgid "Thumper" msgstr "Batedor" +#, c-format +msgid "Time: %s" +msgstr "Tempo: %s" + msgid "Titanium" msgstr "Titânio" From dbd1f601da7e7468662aca9c173edf15de667da0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Robson=20Mariano=20Alves?= Date: Tue, 15 May 2018 18:31:41 -0300 Subject: [PATCH 098/207] Translation to Brazilian Portuguese --- data | 2 +- po/{br.po => pt.po} | 0 src/app/app.cpp | 4 ++-- src/common/language.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename po/{br.po => pt.po} (100%) diff --git a/data b/data index 3cbab714..8597221e 160000 --- a/data +++ b/data @@ -1 +1 @@ -Subproject commit 3cbab7144e6bf940015b2c33fdd17c7c2bfa804b +Subproject commit 8597221e4ddbb9016e7aba46c508dca84f3aa1d6 diff --git a/po/br.po b/po/pt.po similarity index 100% rename from po/br.po rename to po/pt.po diff --git a/src/app/app.cpp b/src/app/app.cpp index c9fbf296..780bc5fb 100644 --- a/src/app/app.cpp +++ b/src/app/app.cpp @@ -1720,7 +1720,7 @@ char CApplication::GetLanguageChar() const break; case LANGUAGE_PORTUGUESE_BRAZILIAN: - langChar = 'B'; + langChar = 'P'; break; } @@ -1779,7 +1779,7 @@ void CApplication::SetLanguage(Language language) { m_language = LANGUAGE_RUSSIAN; } - else if (strncmp(envLang,"br",2) == 0) + else if (strncmp(envLang,"pt",2) == 0) { m_language = LANGUAGE_PORTUGUESE_BRAZILIAN; } diff --git a/src/common/language.cpp b/src/common/language.cpp index d1990b49..37a8dca1 100644 --- a/src/common/language.cpp +++ b/src/common/language.cpp @@ -28,7 +28,7 @@ const std::map LANGUAGE_MAP = { { LANGUAGE_FRENCH, "fr" }, { LANGUAGE_POLISH, "pl" }, { LANGUAGE_RUSSIAN, "ru" }, - { LANGUAGE_PORTUGUESE_BRAZILIAN, "br" } + { LANGUAGE_PORTUGUESE_BRAZILIAN, "pt" } }; bool ParseLanguage(const std::string& str, Language& language) From 17447e813b97a68861c2ad257e7cead16724c16b Mon Sep 17 00:00:00 2001 From: krzys-h Date: Wed, 16 May 2018 11:55:06 +0200 Subject: [PATCH 099/207] Fix building of colobot.rc on Windows --- desktop/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/desktop/CMakeLists.txt b/desktop/CMakeLists.txt index dcca3b77..b49ef2d3 100644 --- a/desktop/CMakeLists.txt +++ b/desktop/CMakeLists.txt @@ -145,7 +145,12 @@ if(PLATFORM_MACOSX) endif(PLATFORM_MACOSX) if(PLATFORM_WINDOWS) - set(COLOBOT_VERSION_4COMMAS "${COLOBOT_VERSION_MAJOR},${COLOBOT_VERSION_MINOR},${COLOBOT_VERSION_REVISION},0") + if(COLOBOT_VERSION_REVISION MATCHES "([0-9]+)\\.([0-9]+)") + string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1,\\2" COLOBOT_VERSION_REVISION_COMMA "${COLOBOT_VERSION_REVISION}") + set(COLOBOT_VERSION_4COMMAS "${COLOBOT_VERSION_MAJOR},${COLOBOT_VERSION_MINOR},${COLOBOT_VERSION_REVISION_COMMA}") + else() + set(COLOBOT_VERSION_4COMMAS "${COLOBOT_VERSION_MAJOR},${COLOBOT_VERSION_MINOR},${COLOBOT_VERSION_REVISION},0") + endif() configure_file(colobot.rc.cmake ${CMAKE_CURRENT_BINARY_DIR}/colobot.rc) endif(PLATFORM_WINDOWS) From 073191d1eaaa0a82923ebf936e7ce2b388ebdf9c Mon Sep 17 00:00:00 2001 From: krzys-h Date: Wed, 16 May 2018 13:28:06 +0200 Subject: [PATCH 100/207] Small CPathManager refactoring --- CMakeLists.txt | 31 ++++---- src/app/pathman.cpp | 90 ++++++++++++++++-------- src/app/pathman.h | 26 ++++--- src/common/config.h.cmake | 2 +- src/common/resources/resourcemanager.cpp | 10 +++ src/common/resources/resourcemanager.h | 4 ++ src/common/system/system.cpp | 2 +- src/common/system/system_linux.cpp | 7 +- src/common/system/system_macosx.cpp | 5 ++ src/common/system/system_windows.cpp | 7 +- 10 files changed, 120 insertions(+), 64 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4ab7f22a..9b96d6b6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -201,6 +201,9 @@ option(OFFICIAL_BUILD "Official build (changes crash screen text)" OFF) # Portable build - load all data from current directory option(PORTABLE "Portable build" OFF) +# Portable saves - suitable for e.g. putting the whole game on external storage and moving your saves with it +option(PORTABLE_SAVES "Portable saves" OFF) + # Building tests can be enabled/disabled option(TESTS "Build tests" OFF) @@ -350,21 +353,19 @@ endif() ## # Installation paths defined before compiling sources -if(PLATFORM_WINDOWS) - if(MXE) - # We need to use STRING because PATH doesn't accept relative paths - set(COLOBOT_INSTALL_BIN_DIR ./ CACHE STRING "Colobot binary directory") - set(COLOBOT_INSTALL_LIB_DIR ./ CACHE STRING "Colobot libraries directory") - set(COLOBOT_INSTALL_DATA_DIR ./data CACHE STRING "Colobot shared data directory") - set(COLOBOT_INSTALL_I18N_DIR ./lang CACHE STRING "Colobot translations directory") - set(COLOBOT_INSTALL_DOC_DIR ./doc CACHE STRING "Colobot documentation directory") - else() - set(COLOBOT_INSTALL_BIN_DIR ${CMAKE_INSTALL_PREFIX}/ CACHE PATH "Colobot binary directory") - set(COLOBOT_INSTALL_LIB_DIR ${CMAKE_INSTALL_PREFIX}/ CACHE PATH "Colobot libraries directory") - set(COLOBOT_INSTALL_DATA_DIR ${CMAKE_INSTALL_PREFIX}/data CACHE PATH "Colobot shared data directory") - set(COLOBOT_INSTALL_I18N_DIR ${CMAKE_INSTALL_PREFIX}/lang CACHE PATH "Colobot translations directory") - set(COLOBOT_INSTALL_DOC_DIR ${CMAKE_INSTALL_PREFIX}/doc CACHE PATH "Colobot documentation directory") - endif() +if(PORTABLE OR (PLATFORM_WINDOWS AND MXE)) + # We need to use STRING because PATH doesn't accept relative paths + set(COLOBOT_INSTALL_BIN_DIR ./ CACHE STRING "Colobot binary directory") + set(COLOBOT_INSTALL_LIB_DIR ./ CACHE STRING "Colobot libraries directory") + set(COLOBOT_INSTALL_DATA_DIR ./data CACHE STRING "Colobot shared data directory") + set(COLOBOT_INSTALL_I18N_DIR ./lang CACHE STRING "Colobot translations directory") + set(COLOBOT_INSTALL_DOC_DIR ./doc CACHE STRING "Colobot documentation directory") +elseif(PLATFORM_WINDOWS) + set(COLOBOT_INSTALL_BIN_DIR ${CMAKE_INSTALL_PREFIX}/ CACHE PATH "Colobot binary directory") + set(COLOBOT_INSTALL_LIB_DIR ${CMAKE_INSTALL_PREFIX}/ CACHE PATH "Colobot libraries directory") + set(COLOBOT_INSTALL_DATA_DIR ${CMAKE_INSTALL_PREFIX}/data CACHE PATH "Colobot shared data directory") + set(COLOBOT_INSTALL_I18N_DIR ${CMAKE_INSTALL_PREFIX}/lang CACHE PATH "Colobot translations directory") + set(COLOBOT_INSTALL_DOC_DIR ${CMAKE_INSTALL_PREFIX}/doc CACHE PATH "Colobot documentation directory") elseif(PLATFORM_MACOSX) set(COLOBOT_INSTALL_BIN_DIR ../MacOS CACHE STRING "Colobot binary directory") set(COLOBOT_INSTALL_LIB_DIR ../MacOS CACHE STRING "Colobot libraries directory") diff --git a/src/app/pathman.cpp b/src/app/pathman.cpp index e86780e5..60715ac1 100644 --- a/src/app/pathman.cpp +++ b/src/app/pathman.cpp @@ -38,46 +38,41 @@ #include CPathManager::CPathManager(CSystemUtils* systemUtils) - : m_systemUtils(systemUtils) + : m_dataPath(systemUtils->GetDataPath()) + , m_langPath(systemUtils->GetLangPath()) + , m_savePath(systemUtils->GetSaveDir()) + , m_modAutoloadDir{ m_dataPath + "/mods", m_savePath + "/mods" } + , m_mods{} { - #ifdef PORTABLE - m_dataPath = "./data"; - m_langPath = "./lang"; - m_savePath = "./saves"; - #else - m_dataPath = m_systemUtils->GetDataPath(); - m_langPath = m_systemUtils->GetLangPath(); - #ifdef DEV_BUILD - m_savePath = "./saves"; - #else - m_savePath = m_systemUtils->GetSaveDir(); - #endif - #endif } CPathManager::~CPathManager() { } -void CPathManager::SetDataPath(std::string dataPath) +void CPathManager::SetDataPath(const std::string &dataPath) { m_dataPath = dataPath; } -void CPathManager::SetLangPath(std::string langPath) +void CPathManager::SetLangPath(const std::string &langPath) { m_langPath = langPath; } -void CPathManager::SetSavePath(std::string savePath) +void CPathManager::SetSavePath(const std::string &savePath) { m_savePath = savePath; } -void CPathManager::AddMod(std::string modPath) +void CPathManager::AddModAutoloadDir(const std::string &modAutoloadDirPath) { - GetLogger()->Info("Loading mod: '%s'\n", modPath.c_str()); - CResourceManager::AddLocation(modPath, true); + m_modAutoloadDir.push_back(modAutoloadDirPath); +} + +void CPathManager::AddMod(const std::string &modPath) +{ + m_mods.push_back(modPath); } const std::string& CPathManager::GetDataPath() @@ -106,8 +101,8 @@ std::string CPathManager::VerifyPaths() { GetLogger()->Error("Data directory '%s' doesn't exist or is not a directory\n", m_dataPath.c_str()); return std::string("Could not read from data directory:\n") + - std::string("'") + m_dataPath + std::string("'\n") + - std::string("Please check your installation, or supply a valid data directory by -datadir option."); + std::string("'") + m_dataPath + std::string("'\n") + + std::string("Please check your installation, or supply a valid data directory by -datadir option."); } #if PLATFORM_WINDOWS @@ -133,19 +128,51 @@ std::string CPathManager::VerifyPaths() void CPathManager::InitPaths() { - LoadModsFromDir(m_dataPath+"/mods"); - LoadModsFromDir(m_savePath+"/mods"); - GetLogger()->Info("Data path: %s\n", m_dataPath.c_str()); GetLogger()->Info("Save path: %s\n", m_savePath.c_str()); - CResourceManager::AddLocation(m_dataPath, false); + if (!m_modAutoloadDir.empty()) + { + GetLogger()->Info("Mod autoload dirs:\n"); + for(const std::string& modAutoloadDir : m_modAutoloadDir) + GetLogger()->Info(" * %s\n", modAutoloadDir.c_str()); + } + if (!m_mods.empty()) + { + GetLogger()->Info("Mods:\n"); + for(const std::string& modPath : m_mods) + GetLogger()->Info(" * %s\n", modPath.c_str()); + } + + CResourceManager::AddLocation(m_dataPath); + + for (const std::string& modAutoloadDir : m_modAutoloadDir) + { + GetLogger()->Trace("Searching for mods in '%s'...\n", modAutoloadDir.c_str()); + for (const std::string& modPath : FindModsInDir(modAutoloadDir)) + { + GetLogger()->Info("Autoloading mod: '%s'\n", modPath.c_str()); + CResourceManager::AddLocation(modPath); + } + } + + for (const std::string& modPath : m_mods) + { + GetLogger()->Info("Loading mod: '%s'\n", modPath.c_str()); + CResourceManager::AddLocation(modPath); + } + CResourceManager::SetSaveLocation(m_savePath); - CResourceManager::AddLocation(m_savePath, true); + CResourceManager::AddLocation(m_savePath); + + GetLogger()->Debug("Finished initalizing data paths\n"); + GetLogger()->Debug("PHYSFS search path is:\n"); + for (const std::string& path : CResourceManager::GetLocations()) + GetLogger()->Debug(" * %s\n", path.c_str()); } -void CPathManager::LoadModsFromDir(const std::string &dir) +std::vector CPathManager::FindModsInDir(const std::string &dir) { - GetLogger()->Trace("Looking for mods in '%s' ...\n", dir.c_str()); + std::vector ret; try { #if PLATFORM_WINDOWS @@ -156,9 +183,9 @@ void CPathManager::LoadModsFromDir(const std::string &dir) for(; iterator != boost::filesystem::directory_iterator(); ++iterator) { #if PLATFORM_WINDOWS - AddMod(CSystemUtilsWindows::UTF8_Encode(iterator->path().wstring())); + ret.push_back(CSystemUtilsWindows::UTF8_Encode(iterator->path().wstring())); #else - AddMod(iterator->path().string()); + ret.push_back(iterator->path().string()); #endif } } @@ -166,4 +193,5 @@ void CPathManager::LoadModsFromDir(const std::string &dir) { GetLogger()->Warn("Unable to load mods from directory '%s': %s\n", dir.c_str(), e.what()); } + return ret; } diff --git a/src/app/pathman.h b/src/app/pathman.h index 39c780df..dd18d66e 100644 --- a/src/app/pathman.h +++ b/src/app/pathman.h @@ -17,16 +17,10 @@ * along with this program. If not, see http://gnu.org/licenses */ -/** - * \file app/pathman.h - * \brief Class for managing data/lang/save paths - */ - #pragma once -#include "common/singleton.h" - #include +#include class CSystemUtils; @@ -34,16 +28,17 @@ class CSystemUtils; * \class CPathManager * \brief Class for managing data/lang/save paths */ -class CPathManager : public CSingleton +class CPathManager { public: CPathManager(CSystemUtils* systemUtils); ~CPathManager(); - void SetDataPath(std::string dataPath); - void SetLangPath(std::string langPath); - void SetSavePath(std::string savePath); - void AddMod(std::string modPath); + void SetDataPath(const std::string &dataPath); + void SetLangPath(const std::string &langPath); + void SetSavePath(const std::string &savePath); + void AddModAutoloadDir(const std::string &modAutoloadDirPath); + void AddMod(const std::string &modPath); const std::string& GetDataPath(); const std::string& GetLangPath(); @@ -56,14 +51,17 @@ public: private: //! Loads all mods from given directory - void LoadModsFromDir(const std::string &dir); + std::vector FindModsInDir(const std::string &dir); private: - CSystemUtils* m_systemUtils; //! Data path std::string m_dataPath; //! Lang path std::string m_langPath; //! Save path std::string m_savePath; + //! Mod autoload paths + std::vector m_modAutoloadDir; + //! Mod paths + std::vector m_mods; }; diff --git a/src/common/config.h.cmake b/src/common/config.h.cmake index b4767724..f6d0bcae 100644 --- a/src/common/config.h.cmake +++ b/src/common/config.h.cmake @@ -16,7 +16,7 @@ #cmakedefine OPENAL_SOUND -#cmakedefine PORTABLE @PORTABLE@ +#cmakedefine PORTABLE_SAVES @PORTABLE_SAVES@ #define COLOBOT_DEFAULT_DATADIR "@COLOBOT_INSTALL_DATA_DIR@" #define COLOBOT_I18N_DIR "@COLOBOT_INSTALL_I18N_DIR@" diff --git a/src/common/resources/resourcemanager.cpp b/src/common/resources/resourcemanager.cpp index 820495b8..0ad82816 100644 --- a/src/common/resources/resourcemanager.cpp +++ b/src/common/resources/resourcemanager.cpp @@ -85,6 +85,16 @@ bool CResourceManager::RemoveLocation(const std::string &location) return true; } +std::vector CResourceManager::GetLocations() +{ + std::vector ret; + char **list = PHYSFS_getSearchPath(); + for (char **it = list; *it != nullptr; ++it) + ret.push_back(*it); + PHYSFS_freeList(list); + return ret; +} + bool CResourceManager::SetSaveLocation(const std::string &location) { diff --git a/src/common/resources/resourcemanager.h b/src/common/resources/resourcemanager.h index d0b4ab24..95661a4f 100644 --- a/src/common/resources/resourcemanager.h +++ b/src/common/resources/resourcemanager.h @@ -35,8 +35,12 @@ public: static std::string CleanPath(const std::string &path); + //! Add a location to the search path static bool AddLocation(const std::string &location, bool prepend = true); + //! Remove a location from the search path static bool RemoveLocation(const std::string &location); + //! List all locations in the search path + static std::vector GetLocations(); static bool SetSaveLocation(const std::string &location); static std::string GetSaveLocation(); diff --git a/src/common/system/system.cpp b/src/common/system/system.cpp index 01b633cc..44064556 100644 --- a/src/common/system/system.cpp +++ b/src/common/system/system.cpp @@ -190,5 +190,5 @@ std::string CSystemUtils::GetLangPath() std::string CSystemUtils::GetSaveDir() { - return std::string("saves"); + return "./saves"; } diff --git a/src/common/system/system_linux.cpp b/src/common/system/system_linux.cpp index 3cd25ed2..6578830d 100644 --- a/src/common/system/system_linux.cpp +++ b/src/common/system/system_linux.cpp @@ -96,6 +96,9 @@ long long CSystemUtilsLinux::TimeStampExactDiff(SystemTimeStamp *before, SystemT std::string CSystemUtilsLinux::GetSaveDir() { +#if PORTABLE_SAVES || DEV_BUILD + return CSystemUtils::GetSaveDir(); +#else std::string savegameDir; // Determine savegame dir according to XDG Base Directory Specification @@ -105,7 +108,8 @@ std::string CSystemUtilsLinux::GetSaveDir() char *envHOME = getenv("HOME"); if (envHOME == nullptr) { - savegameDir = "/tmp/colobot-save"; + GetLogger()->Warn("Unable to find directory for saves - using current directory"); + savegameDir = "./saves"; } else { @@ -119,6 +123,7 @@ std::string CSystemUtilsLinux::GetSaveDir() GetLogger()->Trace("Saved game files are going to %s\n", savegameDir.c_str()); return savegameDir; +#endif } void CSystemUtilsLinux::Usleep(int usec) diff --git a/src/common/system/system_macosx.cpp b/src/common/system/system_macosx.cpp index ede5b481..9ef7ce1d 100644 --- a/src/common/system/system_macosx.cpp +++ b/src/common/system/system_macosx.cpp @@ -102,10 +102,15 @@ std::string CSystemUtilsMacOSX::GetLangPath() std::string CSystemUtilsMacOSX::GetSaveDir() { +#if PORTABLE_SAVES || DEV_BUILD + // TODO: I have no idea if this actually works on Mac OS + return "./saves"; +#else std::string savegameDir = m_ASPath; GetLogger()->Trace("Saved game files are going to %s\n", savegameDir.c_str()); return savegameDir; +#endif } void CSystemUtilsMacOSX::Usleep(int usec) diff --git a/src/common/system/system_windows.cpp b/src/common/system/system_windows.cpp index f51959b4..e459cf00 100644 --- a/src/common/system/system_windows.cpp +++ b/src/common/system/system_windows.cpp @@ -110,12 +110,16 @@ std::wstring CSystemUtilsWindows::UTF8_Decode(const std::string& str) std::string CSystemUtilsWindows::GetSaveDir() { +#if PORTABLE_SAVES || DEV_BUILD + return "./saves"; +#else std::string savegameDir; wchar_t* envUSERPROFILE = _wgetenv(L"USERPROFILE"); if (envUSERPROFILE == nullptr) { - savegameDir = "./saves"; + GetLogger()->Warn("Unable to find directory for saves - using current directory"); + savegameDir = CSystemUtils::GetSaveDir(false); } else { @@ -124,6 +128,7 @@ std::string CSystemUtilsWindows::GetSaveDir() GetLogger()->Trace("Saved game files are going to %s\n", savegameDir.c_str()); return savegameDir; +#endif } void CSystemUtilsWindows::Usleep(int usec) From 0c16d9a2729dc2d7caa44b153c454f9e6c58e07e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Robson=20Mariano=20Alves?= Date: Wed, 16 May 2018 10:22:57 -0300 Subject: [PATCH 101/207] Translation to Brazilian Portuguese --- src/app/app.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/app.cpp b/src/app/app.cpp index 780bc5fb..8743e91e 100644 --- a/src/app/app.cpp +++ b/src/app/app.cpp @@ -1720,7 +1720,7 @@ char CApplication::GetLanguageChar() const break; case LANGUAGE_PORTUGUESE_BRAZILIAN: - langChar = 'P'; + langChar = 'B'; break; } From abb7d54ef5d88818030f18b9e187a1067f6c5a52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Przyby=C5=82?= Date: Mon, 4 Jun 2018 09:17:51 +0200 Subject: [PATCH 102/207] Add support for VS CMake/vcpkg compilation (#1174) * Add support for VS CMake/vcpkg compilation * Fix system_windows.cpp compilation * Add optimization and hidden console to MSVC release builds --- .gitignore | 4 +++ CMakeLists.txt | 21 ++++++++++--- cmake/FindLibSndFile.cmake | 2 +- cmake/FindPhysFS.cmake | 2 +- src/CBot/CBotDebug.cpp | 1 + src/CBot/CMakeLists.txt | 5 +++ src/CMakeLists.txt | 47 ++++++++++++++++++++++++++-- src/common/system/system_windows.cpp | 4 +-- 8 files changed, 76 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index f9f69301..f3461be1 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,7 @@ CMakeLists.txt.user.* # Ignore Visual Studio Code files /.vscode + +# Ignore Visual Studio files +/CMakeSettings.json +/.vs diff --git a/CMakeLists.txt b/CMakeLists.txt index 9b96d6b6..44a63de6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -124,6 +124,9 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) # Include cmake directory with some additional scripts set(CMAKE_MODULE_PATH "${colobot_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH}) +# MSVC needs different flags if linking statically +option(MSVC_STATIC "Link statically when using MSVC" OFF) + # Compiler detection if(CMAKE_CXX_COMPILER_ID MATCHES "GNU") if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7) @@ -160,14 +163,19 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") message(STATUS "Detected MSVC compiler") set(NORMAL_CXX_FLAGS "/wd\"4244\" /wd\"4309\" /wd\"4800\" /wd\"4996\" /wd\"4351\" /EHsc") # disable some useless warnings - set(RELEASE_CXX_FLAGS "/MD") - set(DEBUG_CXX_FLAGS "/MDd /ZI") + if(MSVC_STATIC) + set(RELEASE_CXX_FLAGS "/MT /Ox") + set(DEBUG_CXX_FLAGS "/MTd /ZI") + else(MSVC_STATIC) + set(RELEASE_CXX_FLAGS "/MD /Ox") + set(DEBUG_CXX_FLAGS "/MDd /ZI") + endif() set(TEST_CXX_FLAGS "") add_definitions(-DNOEXCEPT= -DHAS_MSVC_EXCEPTION_BUG) # Needed for Debug information (it's set to "No" by default for some reason) - set(CMAKE_EXE_LINKER_FLAGS_DEBUG "/DEBUG") - set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "/DEBUG") + set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS} /DEBUG") + set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS} /DEBUG") else() message(FATAL_ERROR "Your C++ compiler doesn't seem to be supported.") endif() @@ -315,6 +323,11 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") set(CBOT_STATIC 1) # only this works for some reason set(WINGETOPT 1) # use wingetopt library + + # Hide console in release builds + if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug") + set(CMAKE_WIN32_EXECUTABLE 1) + endif() endif() ## diff --git a/cmake/FindLibSndFile.cmake b/cmake/FindLibSndFile.cmake index 8666c66f..7a6d32b6 100644 --- a/cmake/FindLibSndFile.cmake +++ b/cmake/FindLibSndFile.cmake @@ -5,7 +5,7 @@ FIND_PATH(LIBSNDFILE_INCLUDE_DIR sndfile.h) -SET(LIBSNDFILE_NAMES ${LIBSNDFILE_NAMES} sndfile libsndfile) +SET(LIBSNDFILE_NAMES ${LIBSNDFILE_NAMES} sndfile libsndfile libsndfile-1) FIND_LIBRARY(LIBSNDFILE_LIBRARY NAMES ${LIBSNDFILE_NAMES} PATH) IF(LIBSNDFILE_INCLUDE_DIR AND LIBSNDFILE_LIBRARY) diff --git a/cmake/FindPhysFS.cmake b/cmake/FindPhysFS.cmake index fae83786..6d4c93d4 100644 --- a/cmake/FindPhysFS.cmake +++ b/cmake/FindPhysFS.cmake @@ -7,7 +7,7 @@ IF (WIN32) FIND_PATH( PHYSFS_INCLUDE_PATH physfs.h DOC "The directory where physfs.h resides") FIND_LIBRARY( PHYSFS_LIBRARY - NAMES physfs + NAMES physfs physfs-static PATHS /mingw/lib DOC "The PhysFS library") ELSE (WIN32) diff --git a/src/CBot/CBotDebug.cpp b/src/CBot/CBotDebug.cpp index 892d1d0e..bef509b0 100644 --- a/src/CBot/CBotDebug.cpp +++ b/src/CBot/CBotDebug.cpp @@ -23,6 +23,7 @@ #include "CBot/CBotInstr/CBotFunction.h" #include "CBot/CBotInstr/CBotInstrCall.h" +#include #include #include #include diff --git a/src/CBot/CMakeLists.txt b/src/CBot/CMakeLists.txt index dcb39e1a..a9a83e2e 100644 --- a/src/CBot/CMakeLists.txt +++ b/src/CBot/CMakeLists.txt @@ -151,7 +151,12 @@ set(LOCAL_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}/.. ) +set(SYSTEM_INCLUDES + ${Boost_INCLUDE_DIRS} +) + include_directories(${LOCAL_INCLUDES}) +include_directories(SYSTEM ${SYSTEM_INCLUDES}) if(CBOT_STATIC) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e0857506..0a924344 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -44,8 +44,51 @@ if(MXE) # MXE requires special treatment elseif(PLATFORM_WINDOWS) # because it isn't included in standard linking libraries if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") - find_library(LIBINTL_LIBRARY NAMES intl.lib) - set(PLATFORM_LIBS ${LIBINTL_LIBRARY}) + find_library(LIBINTL_LIBRARY NAMES intl.lib libintl) + + if(${MSVC_STATIC}) + if (${OPENAL_SOUND}) + find_library(FLAC_LIBRARY NAMES flac.lib) + find_library(VORBIS_LIBRARY NAMES vorbis.lib) + find_library(VORBISENC_LIBRARY NAMES vorbisenc.lib) + find_library(OGG_LIBRARY NAMES ogg.lib) + set(OPENAL_MSVC_LIBS + ${FLAC_LIBRARY} + ${VORBIS_LIBRARY} + ${VORBISENC_LIBRARY} + ${OGG_LIBRARY} + ) + endif() + + find_library(BZ2_LIBRARY NAMES bz2.lib) + find_library(JPEG_LIBRARY NAMES jpeg.lib) + find_library(TIFF_LIBRARY NAMES tiff.lib) + find_library(WEBP_LIBRARY NAMES webp.lib) + find_library(LZMA_LIBRARY NAMES lzma.lib) + find_library(FREETYPE_LIBRARY NAMES freetype.lib) + set(MSVC_LIBS + ${LIBINTL_LIBRARY} + ${OPENAL_MSVC_LIBS} + ${JPEG_LIBRARY} + ${TIFF_LIBRARY} + ${BZ2_LIBRARY} + ${WEBP_LIBRARY} + ${LZMA_LIBRARY} + ${FREETYPE_LIBRARY} + winmm.lib + dxguid.lib + imm32.lib + ole32.lib + oleaut32.lib + version.lib + wsock32.lib + ws2_32.lib + ) + else(${MSVC_STATIC}) + set(MSVC_LIBS ${LIBINTL_LIBRARY}) + endif() + + set(PLATFORM_LIBS ${MSVC_LIBS}) else() set(PLATFORM_LIBS "-lintl") endif() diff --git a/src/common/system/system_windows.cpp b/src/common/system/system_windows.cpp index e459cf00..a20bfcf1 100644 --- a/src/common/system/system_windows.cpp +++ b/src/common/system/system_windows.cpp @@ -111,7 +111,7 @@ std::wstring CSystemUtilsWindows::UTF8_Decode(const std::string& str) std::string CSystemUtilsWindows::GetSaveDir() { #if PORTABLE_SAVES || DEV_BUILD - return "./saves"; + return CSystemUtils::GetSaveDir(); #else std::string savegameDir; @@ -119,7 +119,7 @@ std::string CSystemUtilsWindows::GetSaveDir() if (envUSERPROFILE == nullptr) { GetLogger()->Warn("Unable to find directory for saves - using current directory"); - savegameDir = CSystemUtils::GetSaveDir(false); + savegameDir = "./saves"; } else { From 359abf9a823735ad8d22da8f60deb53b8f3adb8f Mon Sep 17 00:00:00 2001 From: tomangelo2 Date: Thu, 5 Jul 2018 19:43:56 +0200 Subject: [PATCH 103/207] Add VSync switch to Device tab --- src/app/app.cpp | 16 +++++++- src/common/event.cpp | 1 + src/common/event.h | 1 + src/common/restext.cpp | 1 + src/common/settings.cpp | 5 +++ src/graphics/engine/engine.cpp | 15 ++++++++ src/graphics/engine/engine.h | 10 +++++ src/ui/screen/screen_setup_display.cpp | 52 ++++++++++++++++++++++++++ 8 files changed, 99 insertions(+), 2 deletions(-) diff --git a/src/app/app.cpp b/src/app/app.cpp index 3444481c..9ec5f17e 100644 --- a/src/app/app.cpp +++ b/src/app/app.cpp @@ -817,9 +817,15 @@ bool CApplication::CreateVideoSurface() int vsync = 0; if (GetConfigFile().GetIntProperty("Experimental", "VSync", vsync)) { - SDL_GL_SetSwapInterval(vsync); + if (SDL_GL_SetSwapInterval(vsync) == -1) + { + GetLogger()->Warn("Adaptive sync not supported.\n"); + vsync = 1; + SDL_GL_SetSwapInterval(vsync); + GetConfigFile().SetIntProperty("Experimental", "VSync", vsync); + } - GetLogger()->Info("Using Vsync: %s\n", (vsync ? "true" : "false")); + GetLogger()->Info("Using Vsync: %s\n", (vsync == -1 ? "adaptive" : (vsync ? "true" : "false"))); } return true; @@ -832,6 +838,12 @@ bool CApplication::ChangeVideoConfig(const Gfx::DeviceConfig &newConfig) // TODO: Somehow this doesn't work for maximized windows (at least on Ubuntu) SDL_SetWindowSize(m_private->window, m_deviceConfig.size.x, m_deviceConfig.size.y); SDL_SetWindowFullscreen(m_private->window, m_deviceConfig.fullScreen ? SDL_WINDOW_FULLSCREEN : 0); + if( SDL_GL_SetSwapInterval(m_engine->GetVSync()) == -1 ) + { + GetLogger()->Warn("Adaptive sync not supported.\n"); + m_engine->SetVSync(1); + SDL_GL_SetSwapInterval(1); + } m_device->ConfigChanged(m_deviceConfig); diff --git a/src/common/event.cpp b/src/common/event.cpp index 8dded9e1..302c2702 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -232,6 +232,7 @@ void InitializeEventTypeTexts() EVENT_TYPE_TEXT[EVENT_INTERFACE_SHADOW_MAPPING_QUALITY] = "EVENT_INTERFACE_SHADOW_MAPPING_QUALITY"; EVENT_TYPE_TEXT[EVENT_INTERFACE_SHADOW_MAPPING_BUFFER] = "EVENT_INTERFACE_SHADOW_MAPPING_BUFFER"; EVENT_TYPE_TEXT[EVENT_INTERFACE_LANGUAGE] = "EVENT_INTERFACE_LANGUAGE"; + EVENT_TYPE_TEXT[EVENT_INTERFACE_VSYNC] = "EVENT_INTERFACE_VSYNC"; EVENT_TYPE_TEXT[EVENT_INTERFACE_KINFO1] = "EVENT_INTERFACE_KINFO1"; EVENT_TYPE_TEXT[EVENT_INTERFACE_KINFO2] = "EVENT_INTERFACE_KINFO2"; diff --git a/src/common/event.h b/src/common/event.h index 64c52e41..a9353e5e 100644 --- a/src/common/event.h +++ b/src/common/event.h @@ -268,6 +268,7 @@ enum EventType EVENT_INTERFACE_SHADOW_MAPPING_QUALITY = 788, EVENT_INTERFACE_SHADOW_MAPPING_BUFFER = 789, EVENT_INTERFACE_LANGUAGE = 790, + EVENT_INTERFACE_VSYNC = 791, EVENT_INTERFACE_KINFO1 = 500, EVENT_INTERFACE_KINFO2 = 501, diff --git a/src/common/restext.cpp b/src/common/restext.cpp index 9bac8434..c8602329 100644 --- a/src/common/restext.cpp +++ b/src/common/restext.cpp @@ -216,6 +216,7 @@ void InitializeRestext() stringsEvent[EVENT_INTERFACE_SHADOW_MAPPING] = TR("Dynamic shadows\\Beautiful shadows!"); stringsEvent[EVENT_INTERFACE_SHADOW_MAPPING_QUALITY]= TR("Dynamic shadows ++\\Dynamic shadows + self shadowing"); stringsEvent[EVENT_INTERFACE_SHADOW_MAPPING_BUFFER] = TR("Shadow resolution\\Higher means better range and quality, but slower"); + stringsEvent[EVENT_INTERFACE_VSYNC] = TR("Vertical Synchronization\\Limits the number of frames per second to display frequency"); stringsEvent[EVENT_INTERFACE_KDEF] = TR("Standard controls\\Standard key functions"); assert(INPUT_SLOT_MAX < EVENT_INTERFACE_KEY_END-EVENT_INTERFACE_KEY); diff --git a/src/common/settings.cpp b/src/common/settings.cpp index 93db8102..1094d9eb 100644 --- a/src/common/settings.cpp +++ b/src/common/settings.cpp @@ -112,6 +112,7 @@ void CSettings::SaveSettings() // Experimental settings GetConfigFile().SetBoolProperty("Experimental", "TerrainShadows", engine->GetTerrainShadows()); + GetConfigFile().SetIntProperty("Experimental", "VSync", engine->GetVSync()); CInput::GetInstancePointer()->SaveKeyBindings(); @@ -274,6 +275,10 @@ void CSettings::LoadSettings() if (GetConfigFile().GetBoolProperty("Experimental", "TerrainShadows", bValue)) engine->SetTerrainShadows(bValue); + if (GetConfigFile().GetIntProperty("Experimental", "VSync", iValue)) + { + engine->SetVSync(iValue); + } CInput::GetInstancePointer()->LoadKeyBindings(); diff --git a/src/graphics/engine/engine.cpp b/src/graphics/engine/engine.cpp index 40d4d1d1..2641992d 100644 --- a/src/graphics/engine/engine.cpp +++ b/src/graphics/engine/engine.cpp @@ -197,6 +197,7 @@ CEngine::CEngine(CApplication *app, CSystemUtils* systemUtils) m_terrainShadows = false; m_shadowRange = 0.0f; m_multisample = 2; + m_vsync = 0; m_backForce = true; m_lightMode = true; @@ -323,6 +324,7 @@ bool CEngine::Create() SetShadowMappingOffscreen(m_offscreenShadowRendering); SetShadowMappingOffscreenResolution(m_offscreenShadowRenderingResolution); SetMultiSample(m_multisample); + SetVSync(m_vsync); m_modelManager = MakeUnique(this); m_pyroManager = MakeUnique(); @@ -3023,6 +3025,19 @@ bool CEngine::GetTerrainShadows() return m_terrainShadows; } +void CEngine::SetVSync(int value) +{ + if (value < -1) value = -1; + if (value > 1) value = 1; + if(m_vsync == value) return; + m_vsync = value; +} + +int CEngine::GetVSync() +{ + return m_vsync; +} + void CEngine::SetBackForce(bool present) { m_backForce = present; diff --git a/src/graphics/engine/engine.h b/src/graphics/engine/engine.h index 794bd9e8..88a35dda 100644 --- a/src/graphics/engine/engine.h +++ b/src/graphics/engine/engine.h @@ -1072,6 +1072,13 @@ public: bool GetTerrainShadows(); //@} + //@{ + //! Management of vertical synchronization + // NOTE: This is an user configuration setting + void SetVSync(int value); + int GetVSync(); + //@} + //@{ //! Management of shadow color // NOTE: This is a setting configurable only in INI file @@ -1336,6 +1343,9 @@ protected: //! Texture bias for sampling shadow maps Math::Matrix m_shadowBias; + //! Vertical synchronization controll + int m_vsync; + //! World matrix for 2D interface Math::Matrix m_matWorldInterface; //! Projection matrix for 2D interface diff --git a/src/ui/screen/screen_setup_display.cpp b/src/ui/screen/screen_setup_display.cpp index bf31baa6..15f2511f 100644 --- a/src/ui/screen/screen_setup_display.cpp +++ b/src/ui/screen/screen_setup_display.cpp @@ -101,6 +101,36 @@ void CScreenSetupDisplay::CreateInterface() pc->SetState(STATE_SHADOW); pc->SetState(STATE_CHECK, m_setupFull); + pos.x = ox+sx*10; + pos.y = oy+sy*9; + ddim.x = dim.x*6; + ddim.y = dim.y*1; + GetResource(RES_EVENT, EVENT_INTERFACE_VSYNC, name); + pl = pw->CreateLabel(pos, ddim, 0, EVENT_LABEL2, name); + pl->SetTextAlign(Gfx::TEXT_ALIGN_LEFT); + + pos.x = ox+sx*10; + pos.y = oy+sy*7.97f; + ddim.x = dim.x*6; + ddim.y = dim.y*1.8f; + pli = pw->CreateList(pos, ddim, 0, EVENT_INTERFACE_VSYNC); + pli->SetState(STATE_SHADOW); + pli->SetItemName(0, "Off"); + pli->SetItemName(1, "Adaptive"); + pli->SetItemName(2, "On"); + switch(m_engine->GetVSync()) + { + case -1: //Adaptive? + pli->SetSelect(1); + break; + case 0: //Off? + pli->SetSelect(0); + break; + case 1: //On? + pli->SetSelect(2); + break; + } + ddim.x = dim.x*6; ddim.y = dim.y*1; pos.x = ox+sx*10; @@ -117,6 +147,7 @@ bool CScreenSetupDisplay::EventProcess(const Event &event) CWindow* pw; CCheck* pc; CButton* pb; + CList* pl; switch( event.type ) { @@ -153,6 +184,27 @@ bool CScreenSetupDisplay::EventProcess(const Event &event) UpdateApply(); break; + case EVENT_INTERFACE_VSYNC: + pw = static_cast(m_interface->SearchControl(EVENT_WINDOW5)); + if ( pw == nullptr ) break; + pl = static_cast(pw->SearchControl(EVENT_INTERFACE_VSYNC)); + if (pl == nullptr ) break; + switch(pl->GetSelect()) + { + case 0: //Off? + m_engine->SetVSync(0); + break; + case 1: //Adaptive? + m_engine->SetVSync(-1); + break; + case 2: //On? + m_engine->SetVSync(1); + break; + } + ChangeDisplay(); + UpdateApply(); + break; + default: return true; } From 608d59f07b815da29132c44c05456e5b2892f12b Mon Sep 17 00:00:00 2001 From: tomangelo2 Date: Thu, 5 Jul 2018 20:56:38 +0200 Subject: [PATCH 104/207] Moved VSync setting from Experimental to Setup --- src/app/app.cpp | 4 ++-- src/common/settings.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/app.cpp b/src/app/app.cpp index 9ec5f17e..f7c0b529 100644 --- a/src/app/app.cpp +++ b/src/app/app.cpp @@ -815,14 +815,14 @@ bool CApplication::CreateVideoSurface() m_private->glcontext = SDL_GL_CreateContext(m_private->window); int vsync = 0; - if (GetConfigFile().GetIntProperty("Experimental", "VSync", vsync)) + if (GetConfigFile().GetIntProperty("Setup", "VSync", vsync)) { if (SDL_GL_SetSwapInterval(vsync) == -1) { GetLogger()->Warn("Adaptive sync not supported.\n"); vsync = 1; SDL_GL_SetSwapInterval(vsync); - GetConfigFile().SetIntProperty("Experimental", "VSync", vsync); + GetConfigFile().SetIntProperty("Setup", "VSync", vsync); } GetLogger()->Info("Using Vsync: %s\n", (vsync == -1 ? "adaptive" : (vsync ? "true" : "false"))); diff --git a/src/common/settings.cpp b/src/common/settings.cpp index 1094d9eb..488666d2 100644 --- a/src/common/settings.cpp +++ b/src/common/settings.cpp @@ -112,7 +112,7 @@ void CSettings::SaveSettings() // Experimental settings GetConfigFile().SetBoolProperty("Experimental", "TerrainShadows", engine->GetTerrainShadows()); - GetConfigFile().SetIntProperty("Experimental", "VSync", engine->GetVSync()); + GetConfigFile().SetIntProperty("Setup", "VSync", engine->GetVSync()); CInput::GetInstancePointer()->SaveKeyBindings(); @@ -275,7 +275,7 @@ void CSettings::LoadSettings() if (GetConfigFile().GetBoolProperty("Experimental", "TerrainShadows", bValue)) engine->SetTerrainShadows(bValue); - if (GetConfigFile().GetIntProperty("Experimental", "VSync", iValue)) + if (GetConfigFile().GetIntProperty("Setup", "VSync", iValue)) { engine->SetVSync(iValue); } From 4bfada2ad6c982047da4bdc03fe239b8a2b90f0c Mon Sep 17 00:00:00 2001 From: tomangelo2 Date: Thu, 5 Jul 2018 21:18:14 +0200 Subject: [PATCH 105/207] Better handling of VSync errors --- src/app/app.cpp | 45 ++++++++++++++++++++++++++++++++++++--------- 1 file changed, 36 insertions(+), 9 deletions(-) diff --git a/src/app/app.cpp b/src/app/app.cpp index f7c0b529..aabae7eb 100644 --- a/src/app/app.cpp +++ b/src/app/app.cpp @@ -817,13 +817,25 @@ bool CApplication::CreateVideoSurface() int vsync = 0; if (GetConfigFile().GetIntProperty("Setup", "VSync", vsync)) { - if (SDL_GL_SetSwapInterval(vsync) == -1) + while (SDL_GL_SetSwapInterval(vsync) == -1) { - GetLogger()->Warn("Adaptive sync not supported.\n"); - vsync = 1; - SDL_GL_SetSwapInterval(vsync); - GetConfigFile().SetIntProperty("Setup", "VSync", vsync); + switch(vsync) + { + case -1: //failed with adaptive sync? + GetLogger()->Warn("Adaptive sync not supported.\n"); + vsync = 1; + break; + case 1: //failed with VSync enabled? + GetLogger()->Warn("Couldn't enable VSync.\n"); + vsync = 0; + break; + case 0: //failed with VSync disabled? + GetLogger()->Warn("Couldn't disable VSync.\n"); + vsync = 1; + break; + } } + GetConfigFile().SetIntProperty("Setup", "VSync", vsync); GetLogger()->Info("Using Vsync: %s\n", (vsync == -1 ? "adaptive" : (vsync ? "true" : "false"))); } @@ -838,12 +850,27 @@ bool CApplication::ChangeVideoConfig(const Gfx::DeviceConfig &newConfig) // TODO: Somehow this doesn't work for maximized windows (at least on Ubuntu) SDL_SetWindowSize(m_private->window, m_deviceConfig.size.x, m_deviceConfig.size.y); SDL_SetWindowFullscreen(m_private->window, m_deviceConfig.fullScreen ? SDL_WINDOW_FULLSCREEN : 0); - if( SDL_GL_SetSwapInterval(m_engine->GetVSync()) == -1 ) + + int vsync = m_engine->GetVSync(); + while (SDL_GL_SetSwapInterval(vsync) == -1) { - GetLogger()->Warn("Adaptive sync not supported.\n"); - m_engine->SetVSync(1); - SDL_GL_SetSwapInterval(1); + switch(vsync) + { + case -1: //failed with adaptive sync? + GetLogger()->Warn("Adaptive sync not supported.\n"); + vsync = 1; + break; + case 1: //failed with VSync enabled? + GetLogger()->Warn("Couldn't enable VSync.\n"); + vsync = 0; + break; + case 0: //failed with VSync disabled? + GetLogger()->Warn("Couldn't disable VSync.\n"); + vsync = 1; + break; + } } + m_engine->SetVSync(vsync); m_device->ConfigChanged(m_deviceConfig); From d0e29d48752995b35c71681d360d8175a870eb22 Mon Sep 17 00:00:00 2001 From: Fiftytwo Date: Thu, 12 Jul 2018 19:55:31 +0200 Subject: [PATCH 106/207] Add trainer=1 BotFactory --- src/object/auto/autofactory.cpp | 133 +++++++++++++------------- src/object/subclass/base_building.cpp | 1 + 2 files changed, 69 insertions(+), 65 deletions(-) diff --git a/src/object/auto/autofactory.cpp b/src/object/auto/autofactory.cpp index 1aa2d999..fa91ff88 100644 --- a/src/object/auto/autofactory.cpp +++ b/src/object/auto/autofactory.cpp @@ -661,6 +661,7 @@ bool CAutoFactory::CreateVehicle() params.angle = angle; params.type = m_type; params.team = m_object->GetTeam(); + params.trainer = m_object->GetTrainer(); CObject* vehicle = CObjectManager::GetInstancePointer()->CreateObject(params); vehicle->SetLock(true); // not usable @@ -719,84 +720,86 @@ bool CAutoFactory::CreateInterface(bool bSelect) pw = static_cast< Ui::CWindow* >(m_interface->SearchControl(EVENT_WINDOW0)); if ( pw == nullptr ) return false; - + dim.x = 33.0f/640.0f; dim.y = 33.0f/480.0f; ox = 3.0f/640.0f; oy = 3.0f/480.0f; sx = 33.0f/640.0f; sy = 33.0f/480.0f; + if( !m_object->GetTrainer() ) + { + pos.x = 0.0f; + pos.y = oy+sy*2.6f; + ddim.x = 138.0f/640.0f; + ddim.y = 258.0f/480.0f; + pw->CreateGroup(pos, ddim, 6, EVENT_WINDOW3); - pos.x = 0.0f; - pos.y = oy+sy*2.6f; - ddim.x = 138.0f/640.0f; - ddim.y = 258.0f/480.0f; - pw->CreateGroup(pos, ddim, 6, EVENT_WINDOW3); + pos.x = ox+sx*0.0f; + pos.y = oy+sy*9.3f; + pw->CreateButton(pos, dim, 128+9, EVENT_OBJECT_FACTORYwa); + pos.x += dim.x; + pw->CreateButton(pos, dim, 128+10, EVENT_OBJECT_FACTORYta); + pos.x += dim.x; + pw->CreateButton(pos, dim, 128+11, EVENT_OBJECT_FACTORYfa); + pos.x += dim.x; + pw->CreateButton(pos, dim, 128+22, EVENT_OBJECT_FACTORYia); - pos.x = ox+sx*0.0f; - pos.y = oy+sy*9.3f; - pw->CreateButton(pos, dim, 128+9, EVENT_OBJECT_FACTORYwa); - pos.x += dim.x; - pw->CreateButton(pos, dim, 128+10, EVENT_OBJECT_FACTORYta); - pos.x += dim.x; - pw->CreateButton(pos, dim, 128+11, EVENT_OBJECT_FACTORYfa); - pos.x += dim.x; - pw->CreateButton(pos, dim, 128+22, EVENT_OBJECT_FACTORYia); + pos.x = ox+sx*0.0f; + pos.y = oy+sy*8.2f; + pw->CreateButton(pos, dim, 128+12, EVENT_OBJECT_FACTORYws); + pos.x += dim.x; + pw->CreateButton(pos, dim, 128+13, EVENT_OBJECT_FACTORYts); + pos.x += dim.x; + pw->CreateButton(pos, dim, 128+14, EVENT_OBJECT_FACTORYfs); + pos.x += dim.x; + pw->CreateButton(pos, dim, 128+24, EVENT_OBJECT_FACTORYis); - pos.x = ox+sx*0.0f; - pos.y = oy+sy*8.2f; - pw->CreateButton(pos, dim, 128+12, EVENT_OBJECT_FACTORYws); - pos.x += dim.x; - pw->CreateButton(pos, dim, 128+13, EVENT_OBJECT_FACTORYts); - pos.x += dim.x; - pw->CreateButton(pos, dim, 128+14, EVENT_OBJECT_FACTORYfs); - pos.x += dim.x; - pw->CreateButton(pos, dim, 128+24, EVENT_OBJECT_FACTORYis); + pos.x = ox+sx*0.0f; + pos.y = oy+sy*7.1f; + pw->CreateButton(pos, dim, 128+15, EVENT_OBJECT_FACTORYwc); + pos.x += dim.x; + pw->CreateButton(pos, dim, 128+16, EVENT_OBJECT_FACTORYtc); + pos.x += dim.x; + pw->CreateButton(pos, dim, 128+17, EVENT_OBJECT_FACTORYfc); + pos.x += dim.x; + pw->CreateButton(pos, dim, 128+23, EVENT_OBJECT_FACTORYic); - pos.x = ox+sx*0.0f; - pos.y = oy+sy*7.1f; - pw->CreateButton(pos, dim, 128+15, EVENT_OBJECT_FACTORYwc); - pos.x += dim.x; - pw->CreateButton(pos, dim, 128+16, EVENT_OBJECT_FACTORYtc); - pos.x += dim.x; - pw->CreateButton(pos, dim, 128+17, EVENT_OBJECT_FACTORYfc); - pos.x += dim.x; - pw->CreateButton(pos, dim, 128+23, EVENT_OBJECT_FACTORYic); - - pos.x = ox+sx*0.0f; - pos.y = oy+sy*6.0f; - pw->CreateButton(pos, dim, 128+25, EVENT_OBJECT_FACTORYwi); - pos.x += dim.x; - pw->CreateButton(pos, dim, 128+26, EVENT_OBJECT_FACTORYti); - pos.x += dim.x; - pw->CreateButton(pos, dim, 128+27, EVENT_OBJECT_FACTORYfi); - pos.x += dim.x; - pw->CreateButton(pos, dim, 128+28, EVENT_OBJECT_FACTORYii); + pos.x = ox+sx*0.0f; + pos.y = oy+sy*6.0f; + pw->CreateButton(pos, dim, 128+25, EVENT_OBJECT_FACTORYwi); + pos.x += dim.x; + pw->CreateButton(pos, dim, 128+26, EVENT_OBJECT_FACTORYti); + pos.x += dim.x; + pw->CreateButton(pos, dim, 128+27, EVENT_OBJECT_FACTORYfi); + pos.x += dim.x; + pw->CreateButton(pos, dim, 128+28, EVENT_OBJECT_FACTORYii); - pos.x = ox+sx*0.0f; - pos.y = oy+sy*4.9f; - pw->CreateButton(pos, dim, 192+0, EVENT_OBJECT_FACTORYwb); - pos.x += dim.x; - pw->CreateButton(pos, dim, 192+1, EVENT_OBJECT_FACTORYtb); - pos.x += dim.x; - pw->CreateButton(pos, dim, 192+2, EVENT_OBJECT_FACTORYfb); - pos.x += dim.x; - pw->CreateButton(pos, dim, 192+3, EVENT_OBJECT_FACTORYib); + pos.x = ox+sx*0.0f; + pos.y = oy+sy*4.9f; + pw->CreateButton(pos, dim, 192+0, EVENT_OBJECT_FACTORYwb); + pos.x += dim.x; + pw->CreateButton(pos, dim, 192+1, EVENT_OBJECT_FACTORYtb); + pos.x += dim.x; + pw->CreateButton(pos, dim, 192+2, EVENT_OBJECT_FACTORYfb); + pos.x += dim.x; + pw->CreateButton(pos, dim, 192+3, EVENT_OBJECT_FACTORYib); - pos.x = ox+sx*0.0f; - pos.y = oy+sy*3.8f; - pw->CreateButton(pos, dim, 128+18, EVENT_OBJECT_FACTORYrt); - pos.x += dim.x; - pw->CreateButton(pos, dim, 128+19, EVENT_OBJECT_FACTORYrc); - pos.x += dim.x; - pw->CreateButton(pos, dim, 128+20, EVENT_OBJECT_FACTORYrr); - pos.x += dim.x; - pw->CreateButton(pos, dim, 128+29, EVENT_OBJECT_FACTORYrs); - - pos.x = ox+sx*0.0f; - pos.y = oy+sy*2.7f; - pw->CreateButton(pos, dim, 128+21, EVENT_OBJECT_FACTORYsa); + pos.x = ox+sx*0.0f; + pos.y = oy+sy*3.8f; + pw->CreateButton(pos, dim, 128+18, EVENT_OBJECT_FACTORYrt); + pos.x += dim.x; + pw->CreateButton(pos, dim, 128+19, EVENT_OBJECT_FACTORYrc); + pos.x += dim.x; + pw->CreateButton(pos, dim, 128+20, EVENT_OBJECT_FACTORYrr); + pos.x += dim.x; + pw->CreateButton(pos, dim, 128+29, EVENT_OBJECT_FACTORYrs); + pos.x = ox+sx*0.0f; + pos.y = oy+sy*2.7f; + pw->CreateButton(pos, dim, 128+21, EVENT_OBJECT_FACTORYsa); + } + pos.x = ox+sx*0.0f; pos.y = oy+sy*0; ddim.x = 66.0f/640.0f; diff --git a/src/object/subclass/base_building.cpp b/src/object/subclass/base_building.cpp index b45cf91a..ef676b37 100644 --- a/src/object/subclass/base_building.cpp +++ b/src/object/subclass/base_building.cpp @@ -64,6 +64,7 @@ std::unique_ptr CBaseBuilding::Create( { auto obj = MakeUnique(params.id, params.type); + obj->SetTrainer(params.trainer); obj->SetTeam(params.team); float height = params.height; From 02eb4623b9dd73c250594e38068b03e7e061571d Mon Sep 17 00:00:00 2001 From: Fiftytwo Date: Thu, 12 Jul 2018 20:17:09 +0200 Subject: [PATCH 107/207] Add trainer=1 ResearchCenter --- src/object/auto/autoresearch.cpp | 58 +++++++++++++++++--------------- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/src/object/auto/autoresearch.cpp b/src/object/auto/autoresearch.cpp index 06d5db8f..e06635fa 100644 --- a/src/object/auto/autoresearch.cpp +++ b/src/object/auto/autoresearch.cpp @@ -341,43 +341,45 @@ bool CAutoResearch::CreateInterface(bool bSelect) oy = 3.0f/480.0f; sx = 33.0f/640.0f; sy = 33.0f/480.0f; + if( !m_object->GetTrainer() ) + { + pos.x = ox+sx*3.0f; + pos.y = oy+sy*0.5f; + pw->CreateButton(pos, dim, 64+0, EVENT_OBJECT_RTANK); - pos.x = ox+sx*3.0f; - pos.y = oy+sy*0.5f; - pw->CreateButton(pos, dim, 64+0, EVENT_OBJECT_RTANK); + pos.x = ox+sx*4.0f; + pos.y = oy+sy*0.5f; + pw->CreateButton(pos, dim, 64+1, EVENT_OBJECT_RFLY); - pos.x = ox+sx*4.0f; - pos.y = oy+sy*0.5f; - pw->CreateButton(pos, dim, 64+1, EVENT_OBJECT_RFLY); + pos.x = ox+sx*5.0f; + pos.y = oy+sy*0.5f; + pw->CreateButton(pos, dim, 64+3, EVENT_OBJECT_RCANON); - pos.x = ox+sx*5.0f; - pos.y = oy+sy*0.5f; - pw->CreateButton(pos, dim, 64+3, EVENT_OBJECT_RCANON); + pos.x = ox+sx*6.0f; + pos.y = oy+sy*0.5f; + pw->CreateButton(pos, dim, 64+4, EVENT_OBJECT_RTOWER); - pos.x = ox+sx*6.0f; - pos.y = oy+sy*0.5f; - pw->CreateButton(pos, dim, 64+4, EVENT_OBJECT_RTOWER); + pos.x = ox+sx*7.0f; + pos.y = oy+sy*0.5f; + pw->CreateButton(pos, dim, 64+7, EVENT_OBJECT_RATOMIC); - pos.x = ox+sx*7.0f; - pos.y = oy+sy*0.5f; - pw->CreateButton(pos, dim, 64+7, EVENT_OBJECT_RATOMIC); + pos.x = ox+sx*8.0f; + pos.y = oy+sy*0.5f; + pw->CreateButton(pos, dim, 64+2, EVENT_OBJECT_RTHUMP); - pos.x = ox+sx*8.0f; - pos.y = oy+sy*0.5f; - pw->CreateButton(pos, dim, 64+2, EVENT_OBJECT_RTHUMP); + pos.x = ox+sx*9.0f; + pos.y = oy+sy*0.5f; + pw->CreateButton(pos, dim, 64+6, EVENT_OBJECT_RSHIELD); - pos.x = ox+sx*9.0f; - pos.y = oy+sy*0.5f; - pw->CreateButton(pos, dim, 64+6, EVENT_OBJECT_RSHIELD); + pos.x = ox+sx*10.0f; + pos.y = oy+sy*0.5f; + pw->CreateButton(pos, dim, 64+5, EVENT_OBJECT_RPHAZER); - pos.x = ox+sx*10.0f; - pos.y = oy+sy*0.5f; - pw->CreateButton(pos, dim, 64+5, EVENT_OBJECT_RPHAZER); + pos.x = ox+sx*11.0f; + pos.y = oy+sy*0.5f; + pw->CreateButton(pos, dim, 192+4, EVENT_OBJECT_RBUILDER); + } - pos.x = ox+sx*11.0f; - pos.y = oy+sy*0.5f; - pw->CreateButton(pos, dim, 192+4, EVENT_OBJECT_RBUILDER); - pos.x = ox+sx*14.5f; pos.y = oy+sy*0; ddim.x = 14.0f/640.0f; From 146581e44c7e2ddab56a577e1dde4bc5bd180d87 Mon Sep 17 00:00:00 2001 From: Fiftytwo Date: Thu, 12 Jul 2018 20:35:50 +0200 Subject: [PATCH 108/207] Add trainer=1 AutoLab --- src/object/auto/autolabo.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/object/auto/autolabo.cpp b/src/object/auto/autolabo.cpp index 1cbcbc24..f39ba837 100644 --- a/src/object/auto/autolabo.cpp +++ b/src/object/auto/autolabo.cpp @@ -482,14 +482,16 @@ bool CAutoLabo::CreateInterface(bool bSelect) oy = 3.0f/480.0f; sx = 33.0f/640.0f; sy = 33.0f/480.0f; + if( !m_object->GetTrainer() ) + { + pos.x = ox+sx*7.0f; + pos.y = oy+sy*0.5f; + pw->CreateButton(pos, dim, 64+45, EVENT_OBJECT_RiPAW); - pos.x = ox+sx*7.0f; - pos.y = oy+sy*0.5f; - pw->CreateButton(pos, dim, 64+45, EVENT_OBJECT_RiPAW); - - pos.x = ox+sx*8.0f; - pos.y = oy+sy*0.5f; - pw->CreateButton(pos, dim, 64+46, EVENT_OBJECT_RiGUN); + pos.x = ox+sx*8.0f; + pos.y = oy+sy*0.5f; + pw->CreateButton(pos, dim, 64+46, EVENT_OBJECT_RiGUN); + } pos.x = ox+sx*0.0f; pos.y = oy+sy*0; From 5b2f3111b6afd7d16a2ceb2f6d71147389e9a3af Mon Sep 17 00:00:00 2001 From: Fiftytwo Date: Thu, 12 Jul 2018 20:54:58 +0200 Subject: [PATCH 109/207] Add trainer=1 SpaceShip --- src/object/auto/autobase.cpp | 38 +++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/src/object/auto/autobase.cpp b/src/object/auto/autobase.cpp index 3200c612..e772190d 100644 --- a/src/object/auto/autobase.cpp +++ b/src/object/auto/autobase.cpp @@ -1187,25 +1187,27 @@ bool CAutoBase::CreateInterface(bool bSelect) oy = 3.0f/480.0f; sx = 33.0f/640.0f; sy = 33.0f/480.0f; - - ddim.x = dim.x*1.5f; - ddim.y = dim.y*1.5f; - -//? pos.x = ox+sx*7.25f; -//? pos.y = oy+sy*0.25f; -//? pw->CreateButton(pos, ddim, 63, EVENT_OBJECT_BHELP); - - pos.x = ox+sx*8.00f; - pos.y = oy+sy*0.25f; - pw->CreateButton(pos, ddim, 28, EVENT_OBJECT_BTAKEOFF); - - if ( m_lightning->GetStatus(sleep, delay, magnetic, progress) ) + if( !m_object->GetTrainer() ) { - pos.x = ox+sx*10.2f; - pos.y = oy+sy*0.5f; - ddim.x = dim.x*1.0f; - ddim.y = dim.y*1.0f; - pw->CreateButton(pos, ddim, 41, EVENT_OBJECT_LIMIT); + ddim.x = dim.x*1.5f; + ddim.y = dim.y*1.5f; + + //? pos.x = ox+sx*7.25f; + //? pos.y = oy+sy*0.25f; + //? pw->CreateButton(pos, ddim, 63, EVENT_OBJECT_BHELP); + + pos.x = ox+sx*8.00f; + pos.y = oy+sy*0.25f; + pw->CreateButton(pos, ddim, 28, EVENT_OBJECT_BTAKEOFF); + + if ( m_lightning->GetStatus(sleep, delay, magnetic, progress) ) + { + pos.x = ox+sx*10.2f; + pos.y = oy+sy*0.5f; + ddim.x = dim.x*1.0f; + ddim.y = dim.y*1.0f; + pw->CreateButton(pos, ddim, 41, EVENT_OBJECT_LIMIT); + } } pos.x = ox+sx*0.0f; From 5b2b632de35faf8d6edb42995e0f16b9b1c4036b Mon Sep 17 00:00:00 2001 From: Fiftytwo Date: Fri, 13 Jul 2018 00:03:20 +0200 Subject: [PATCH 110/207] Add TargetBot research; make it fully operational --- src/common/event.cpp | 6 ++++-- src/common/event.h | 2 ++ src/common/restext.cpp | 4 +++- src/level/parser/parserparam.cpp | 1 + src/level/research_type.h | 3 ++- src/level/robotmain.cpp | 1 + src/object/auto/autofactory.cpp | 4 ++++ src/object/auto/autolabo.cpp | 29 ++++++++++++++++++++-------- src/object/auto/autopowerstation.cpp | 1 + src/object/motion/motiontoto.cpp | 1 + src/object/old_object.cpp | 5 +++-- src/script/scriptfunc.cpp | 1 + src/ui/mainshort.cpp | 1 + 13 files changed, 45 insertions(+), 14 deletions(-) diff --git a/src/common/event.cpp b/src/common/event.cpp index b79e8b2d..00d9ea44 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -432,6 +432,7 @@ void InitializeEventTypeTexts() EVENT_TYPE_TEXT[EVENT_OBJECT_FACTORYrr] = "EVENT_OBJECT_FACTORYrr"; EVENT_TYPE_TEXT[EVENT_OBJECT_FACTORYrs] = "EVENT_OBJECT_FACTORYrs"; EVENT_TYPE_TEXT[EVENT_OBJECT_FACTORYsa] = "EVENT_OBJECT_FACTORYsa"; + EVENT_TYPE_TEXT[EVENT_OBJECT_FACTORYtg] = "EVENT_OBJECT_FACTORYtg"; EVENT_TYPE_TEXT[EVENT_OBJECT_SEARCH] = "EVENT_OBJECT_SEARCH"; EVENT_TYPE_TEXT[EVENT_OBJECT_TERRAFORM] = "EVENT_OBJECT_TERRAFORM"; EVENT_TYPE_TEXT[EVENT_OBJECT_FIRE] = "EVENT_OBJECT_FIRE"; @@ -527,8 +528,9 @@ void InitializeEventTypeTexts() EVENT_TYPE_TEXT[EVENT_CODE_BATTLE_START] = "EVENT_CODE_BATTLE_START"; EVENT_TYPE_TEXT[EVENT_CODE_BATTLE_SPECTATOR] = "EVENT_CODE_BATTLE_SPECTATOR"; - EVENT_TYPE_TEXT[EVENT_OBJECT_RBUILDER] = "EVENT_OBJECT_RBUILDER"; - EVENT_TYPE_TEXT[EVENT_OBJECT_BUILD] = "EVENT_OBJECT_BUILD"; + EVENT_TYPE_TEXT[EVENT_OBJECT_RBUILDER] = "EVENT_OBJECT_RBUILDER"; + EVENT_TYPE_TEXT[EVENT_OBJECT_BUILD] = "EVENT_OBJECT_BUILD"; + EVENT_TYPE_TEXT[EVENT_OBJECT_RTARGET] = "EVENT_OBJECT_RTARGET"; } std::string ParseEventType(EventType eventType) diff --git a/src/common/event.h b/src/common/event.h index 4cb2a75e..f592b327 100644 --- a/src/common/event.h +++ b/src/common/event.h @@ -496,6 +496,7 @@ enum EventType EVENT_OBJECT_FACTORYtb = 1102, EVENT_OBJECT_FACTORYfb = 1103, EVENT_OBJECT_FACTORYib = 1104, + EVENT_OBJECT_FACTORYtg = 1105, EVENT_OBJECT_SEARCH = 1200, EVENT_OBJECT_TERRAFORM = 1201, EVENT_OBJECT_FIRE = 1202, @@ -600,6 +601,7 @@ enum EventType EVENT_OBJECT_RBUILDER = 2300, EVENT_OBJECT_BUILD = 2301, + EVENT_OBJECT_RTARGET = 2302, //! Maximum value of standard events EVENT_STD_MAX, diff --git a/src/common/restext.cpp b/src/common/restext.cpp index ab43b630..bd1e20b5 100644 --- a/src/common/restext.cpp +++ b/src/common/restext.cpp @@ -366,6 +366,7 @@ void InitializeRestext() stringsEvent[EVENT_OBJECT_FACTORYrr] = TR("Build a recycler"); stringsEvent[EVENT_OBJECT_FACTORYrs] = TR("Build a shielder"); stringsEvent[EVENT_OBJECT_FACTORYsa] = TR("Build a subber"); + stringsEvent[EVENT_OBJECT_FACTORYtg] = TR("Build a target bot"); stringsEvent[EVENT_OBJECT_RTANK] = TR("Run research program for tracked bots"); stringsEvent[EVENT_OBJECT_RFLY] = TR("Run research program for winged bots"); stringsEvent[EVENT_OBJECT_RTHUMP] = TR("Run research program for thumper"); @@ -377,6 +378,7 @@ void InitializeRestext() stringsEvent[EVENT_OBJECT_RiPAW] = TR("Run research program for legged bots"); stringsEvent[EVENT_OBJECT_RiGUN] = TR("Run research program for orga shooter"); stringsEvent[EVENT_OBJECT_RBUILDER] = TR("Run research program for builder"); + stringsEvent[EVENT_OBJECT_RTARGET] = TR("Run research program for target bot"); stringsEvent[EVENT_OBJECT_RESET] = TR("Return to start"); stringsEvent[EVENT_OBJECT_SEARCH] = TR("Sniff (\\key action;)"); stringsEvent[EVENT_OBJECT_TERRAFORM] = TR("Thump (\\key action;)"); @@ -626,7 +628,7 @@ void InitializeRestext() stringsErr[ERR_BASE_DLOCK] = TR("Doors blocked by a robot or another object"); stringsErr[ERR_BASE_DHUMAN] = TR("You must get on the spaceship to take off"); stringsErr[ERR_LABO_NULL] = TR("Nothing to analyze"); - stringsErr[ERR_LABO_BAD] = TR("Analyzes only organic matter"); + stringsErr[ERR_LABO_BAD] = TR("Inappropriate sample"); stringsErr[ERR_LABO_ALREADY] = TR("Analysis already performed"); stringsErr[ERR_NUCLEAR_EMPTY] = TR("No uranium to transform"); stringsErr[ERR_NUCLEAR_BAD] = TR("Transforms only uranium"); diff --git a/src/level/parser/parserparam.cpp b/src/level/parser/parserparam.cpp index 9a671976..f2663343 100644 --- a/src/level/parser/parserparam.cpp +++ b/src/level/parser/parserparam.cpp @@ -916,6 +916,7 @@ int CLevelParserParam::ToResearchFlag(std::string value) if (value == "SUBBER" ) return RESEARCH_SUBM; if (value == "SNIFFER" ) return RESEARCH_SNIFFER; if (value == "BUILDER" ) return RESEARCH_BUILDER; + if (value == "TARGET" ) return RESEARCH_TARGET; return Cast(value, "researchflag"); } diff --git a/src/level/research_type.h b/src/level/research_type.h index 01256ff5..c2393173 100644 --- a/src/level/research_type.h +++ b/src/level/research_type.h @@ -39,5 +39,6 @@ enum ResearchType RESEARCH_RECYCLER = (1<<10), //! < recycler RESEARCH_SUBM = (1<<11), //! < submarine RESEARCH_SNIFFER = (1<<12), //! < sniffer - RESEARCH_BUILDER = (1<<13) //! < builder + RESEARCH_BUILDER = (1<<13), //! < builder + RESEARCH_TARGET = (1<<14) //! < target bot }; diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp index ca287087..610a5705 100644 --- a/src/level/robotmain.cpp +++ b/src/level/robotmain.cpp @@ -5741,6 +5741,7 @@ Error CRobotMain::CanFactoryError(ObjectType type, int team) if (type == OBJECT_MOBILErr && !IsResearchDone(RESEARCH_RECYCLER, team)) return ERR_BUILD_RESEARCH; if (type == OBJECT_MOBILErs && !IsResearchDone(RESEARCH_SHIELD, team)) return ERR_BUILD_RESEARCH; if (type == OBJECT_MOBILEsa && !IsResearchDone(RESEARCH_SUBM, team)) return ERR_BUILD_DISABLED; // Can be only researched manually in Scene file + if (type == OBJECT_MOBILEtg && !IsResearchDone(RESEARCH_TARGET, team)) return ERR_BUILD_RESEARCH; return ERR_OK; } diff --git a/src/object/auto/autofactory.cpp b/src/object/auto/autofactory.cpp index fa91ff88..0ccb8cc2 100644 --- a/src/object/auto/autofactory.cpp +++ b/src/object/auto/autofactory.cpp @@ -195,6 +195,7 @@ ObjectType ObjectTypeFromFactoryButton(EventType eventType) if ( eventType == EVENT_OBJECT_FACTORYrr ) return OBJECT_MOBILErr; if ( eventType == EVENT_OBJECT_FACTORYrs ) return OBJECT_MOBILErs; if ( eventType == EVENT_OBJECT_FACTORYsa ) return OBJECT_MOBILEsa; + if ( eventType == EVENT_OBJECT_FACTORYtg ) return OBJECT_MOBILEtg; return OBJECT_NULL; } @@ -798,6 +799,8 @@ bool CAutoFactory::CreateInterface(bool bSelect) pos.x = ox+sx*0.0f; pos.y = oy+sy*2.7f; pw->CreateButton(pos, dim, 128+21, EVENT_OBJECT_FACTORYsa); + pos.x += dim.x; + pw->CreateButton(pos, dim, 128+45, EVENT_OBJECT_FACTORYtg); } pos.x = ox+sx*0.0f; @@ -847,6 +850,7 @@ void CAutoFactory::UpdateInterface() UpdateButton(pw, EVENT_OBJECT_FACTORYrr, m_bBusy); UpdateButton(pw, EVENT_OBJECT_FACTORYrs, m_bBusy); UpdateButton(pw, EVENT_OBJECT_FACTORYsa, m_bBusy); + UpdateButton(pw, EVENT_OBJECT_FACTORYtg, m_bBusy); } // Updates the status of one interface button. diff --git a/src/object/auto/autolabo.cpp b/src/object/auto/autolabo.cpp index f39ba837..383484cd 100644 --- a/src/object/auto/autolabo.cpp +++ b/src/object/auto/autolabo.cpp @@ -136,7 +136,11 @@ Error CAutoLabo::StartAction(int param) { return ERR_LABO_NULL; } - if ( power->GetType() != OBJECT_BULLET ) + if ( m_research != RESEARCH_TARGET && power->GetType() != OBJECT_BULLET ) + { + return ERR_LABO_BAD; + } + if ( m_research == RESEARCH_TARGET && power->GetType() != OBJECT_TNT ) { return ERR_LABO_BAD; } @@ -177,6 +181,7 @@ bool CAutoLabo::EventProcess(const Event &event) if ( m_object->GetSelect() ) // center selected? { Error err = ERR_UNKNOWN; + if ( event.type == EVENT_OBJECT_RTARGET ) err = StartAction(RESEARCH_TARGET); if ( event.type == EVENT_OBJECT_RiPAW ) err = StartAction(RESEARCH_iPAW); if ( event.type == EVENT_OBJECT_RiGUN ) err = StartAction(RESEARCH_iGUN); @@ -455,7 +460,7 @@ Error CAutoLabo::GetError() CObject* obj = m_object->GetPower(); if (obj == nullptr) return ERR_LABO_NULL; ObjectType type = obj->GetType(); - if ( type != OBJECT_BULLET ) return ERR_LABO_BAD; + if ( type != OBJECT_BULLET && type != OBJECT_TNT ) return ERR_LABO_BAD; return ERR_OK; } @@ -484,6 +489,10 @@ bool CAutoLabo::CreateInterface(bool bSelect) sy = 33.0f/480.0f; if( !m_object->GetTrainer() ) { + pos.x = ox+sx*6.0f; + pos.y = oy+sy*0.5f; + pw->CreateButton(pos, dim, 192+8, EVENT_OBJECT_RTARGET); + pos.x = ox+sx*7.0f; pos.y = oy+sy*0.5f; pw->CreateButton(pos, dim, 64+45, EVENT_OBJECT_RiPAW); @@ -517,14 +526,17 @@ void CAutoLabo::UpdateInterface() pw = static_cast< Ui::CWindow* >(m_interface->SearchControl(EVENT_WINDOW0)); if ( pw == nullptr ) return; - DeadInterface(pw, EVENT_OBJECT_RiPAW, m_main->IsResearchEnabled(RESEARCH_iPAW)); - DeadInterface(pw, EVENT_OBJECT_RiGUN, m_main->IsResearchEnabled(RESEARCH_iGUN)); + DeadInterface(pw, EVENT_OBJECT_RTARGET, m_main->IsResearchEnabled(RESEARCH_TARGET)); + DeadInterface(pw, EVENT_OBJECT_RiPAW, m_main->IsResearchEnabled(RESEARCH_iPAW)); + DeadInterface(pw, EVENT_OBJECT_RiGUN, m_main->IsResearchEnabled(RESEARCH_iGUN)); + OkayButton(pw, EVENT_OBJECT_RTARGET); OkayButton(pw, EVENT_OBJECT_RiPAW); OkayButton(pw, EVENT_OBJECT_RiGUN); - VisibleInterface(pw, EVENT_OBJECT_RiPAW, !m_bBusy); - VisibleInterface(pw, EVENT_OBJECT_RiGUN, !m_bBusy); + VisibleInterface(pw, EVENT_OBJECT_RTARGET, !m_bBusy); + VisibleInterface(pw, EVENT_OBJECT_RiPAW, !m_bBusy); + VisibleInterface(pw, EVENT_OBJECT_RiGUN, !m_bBusy); } // Indicates the research conducted for a button. @@ -544,8 +556,9 @@ void CAutoLabo::OkayButton(Ui::CWindow *pw, EventType event) bool CAutoLabo::TestResearch(EventType event) { - if ( event == EVENT_OBJECT_RiPAW ) return m_main->IsResearchDone(RESEARCH_iPAW, m_object->GetTeam()); - if ( event == EVENT_OBJECT_RiGUN ) return m_main->IsResearchDone(RESEARCH_iGUN, m_object->GetTeam()); + if ( event == EVENT_OBJECT_RTARGET ) return m_main->IsResearchDone(RESEARCH_TARGET, m_object->GetTeam()); + if ( event == EVENT_OBJECT_RiPAW ) return m_main->IsResearchDone(RESEARCH_iPAW, m_object->GetTeam()); + if ( event == EVENT_OBJECT_RiGUN ) return m_main->IsResearchDone(RESEARCH_iGUN, m_object->GetTeam()); return m_main; } diff --git a/src/object/auto/autopowerstation.cpp b/src/object/auto/autopowerstation.cpp index 3b245d7e..2671bdc7 100644 --- a/src/object/auto/autopowerstation.cpp +++ b/src/object/auto/autopowerstation.cpp @@ -278,6 +278,7 @@ CObject* CAutoPowerStation::SearchVehicle() type != OBJECT_MOBILEtt && type != OBJECT_MOBILEwt && type != OBJECT_MOBILEit && + type != OBJECT_MOBILEtg && type != OBJECT_MOBILEdr ) continue; Math::Vector oPos = obj->GetPosition(); diff --git a/src/object/motion/motiontoto.cpp b/src/object/motion/motiontoto.cpp index 8c22c2ea..7dbed435 100644 --- a/src/object/motion/motiontoto.cpp +++ b/src/object/motion/motiontoto.cpp @@ -360,6 +360,7 @@ bool CMotionToto::EventFrame(const Event &event) type == OBJECT_MOBILEtt || type == OBJECT_MOBILEft || type == OBJECT_MOBILEit || + type == OBJECT_MOBILEtg || type == OBJECT_MOBILEdr ) ) // vehicle? { m_clownTime += event.rTime; diff --git a/src/object/old_object.cpp b/src/object/old_object.cpp index 99b471e1..d9a681a4 100644 --- a/src/object/old_object.cpp +++ b/src/object/old_object.cpp @@ -890,6 +890,7 @@ void COldObject::SetType(ObjectType type) m_type == OBJECT_MOBILEtt || m_type == OBJECT_MOBILEwt || m_type == OBJECT_MOBILEit || + m_type == OBJECT_MOBILEtg || m_type == OBJECT_MOBILEdr || m_type == OBJECT_APOLLO2 || m_type == OBJECT_BASE || @@ -3254,6 +3255,7 @@ float COldObject::GetLightningHitProbability() m_type == OBJECT_MOBILEtt || m_type == OBJECT_MOBILEwt || m_type == OBJECT_MOBILEit || + m_type == OBJECT_MOBILEtg || m_type == OBJECT_MOBILEdr ) // robot? { return 0.5f; @@ -3267,8 +3269,7 @@ bool COldObject::IsSelectableByDefault(ObjectType type) type == OBJECT_ANT || type == OBJECT_SPIDER || type == OBJECT_BEE || - type == OBJECT_WORM || - type == OBJECT_MOBILEtg ) + type == OBJECT_WORM ) { return false; } diff --git a/src/script/scriptfunc.cpp b/src/script/scriptfunc.cpp index e73b583d..9d00f031 100644 --- a/src/script/scriptfunc.cpp +++ b/src/script/scriptfunc.cpp @@ -3311,6 +3311,7 @@ void CScriptFunctions::Init() CBotProgram::DefineNum("ResearchSubber", RESEARCH_SUBM); CBotProgram::DefineNum("ResearchSniffer", RESEARCH_SNIFFER); CBotProgram::DefineNum("ResearchBuilder", RESEARCH_BUILDER); + CBotProgram::DefineNum("ResearchTarget", RESEARCH_TARGET); CBotProgram::DefineNum("PolskiPortalColobota", 1337); diff --git a/src/ui/mainshort.cpp b/src/ui/mainshort.cpp index 8766d1af..cf9101b1 100644 --- a/src/ui/mainshort.cpp +++ b/src/ui/mainshort.cpp @@ -238,6 +238,7 @@ int CMainShort::GetShortcutIcon(ObjectType type) case OBJECT_MOBILEtt: icon = 5; break; case OBJECT_MOBILEwt: icon = 30; break; case OBJECT_MOBILEit: icon = 7; break; + case OBJECT_MOBILEtg: icon = 45; break; case OBJECT_MOBILEdr: icon = 48; break; case OBJECT_APOLLO2: icon = 49; break; default: return -1; From 3f04654cd372ca688b9f79ef128e7e4eee896f36 Mon Sep 17 00:00:00 2001 From: Fiftytwo Date: Fri, 13 Jul 2018 13:16:30 +0200 Subject: [PATCH 111/207] Make ruins destroyable --- src/object/old_object.cpp | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/src/object/old_object.cpp b/src/object/old_object.cpp index d9a681a4..b64fb279 100644 --- a/src/object/old_object.cpp +++ b/src/object/old_object.cpp @@ -356,7 +356,12 @@ bool COldObject::DamageObject(DamageType type, float force, CObject* killer) } else if ( Implements(ObjectInterfaceType::Fragile) ) { - if ( m_type == OBJECT_BOMB && type != DamageType::Explosive ) return false; // Mine can't be destroyed by shooting + if ((m_type == OBJECT_BOMB || + m_type == OBJECT_RUINfactory || + m_type == OBJECT_RUINdoor || + m_type == OBJECT_RUINsupport || + m_type == OBJECT_RUINradar || + m_type == OBJECT_RUINconvert ) && type != DamageType::Explosive ) return false; // Mines and ruins can't be destroyed by shooting if ( m_type == OBJECT_URANIUM ) return false; // UraniumOre is not destroyable (see #777) DestroyObject(DestructionType::Explosion, killer); @@ -491,7 +496,12 @@ void COldObject::DestroyObject(DestructionType type, CObject* killer) m_type == OBJECT_SAFE || m_type == OBJECT_HUSTON || m_type == OBJECT_START || - m_type == OBJECT_END ) // building? + m_type == OBJECT_END || + m_type == OBJECT_RUINfactory || + m_type == OBJECT_RUINdoor || + m_type == OBJECT_RUINsupport || + m_type == OBJECT_RUINradar || + m_type == OBJECT_RUINconvert ) // building? { pyroType = Gfx::PT_FRAGT; } @@ -826,6 +836,17 @@ void COldObject::SetType(ObjectType type) m_implementedInterfaces[static_cast(ObjectInterfaceType::Fragile)] = false; m_implementedInterfaces[static_cast(ObjectInterfaceType::Shielded)] = false; } + else if (m_type == OBJECT_RUINfactory || + m_type == OBJECT_RUINdoor || + m_type == OBJECT_RUINsupport || + m_type == OBJECT_RUINradar || + m_type == OBJECT_RUINconvert ) + { + m_implementedInterfaces[static_cast(ObjectInterfaceType::Damageable)] = true; + m_implementedInterfaces[static_cast(ObjectInterfaceType::Destroyable)] = true; + m_implementedInterfaces[static_cast(ObjectInterfaceType::Fragile)] = true; + m_implementedInterfaces[static_cast(ObjectInterfaceType::Shielded)] = false; + } else { m_implementedInterfaces[static_cast(ObjectInterfaceType::Damageable)] = false; From fb00898035e024e0cd49c778a6816dd721f9acde Mon Sep 17 00:00:00 2001 From: tomangelo2 Date: Sat, 21 Jul 2018 00:09:37 +0200 Subject: [PATCH 112/207] Fix switch case documentation shortcut Also some polishing of loops help texts --- src/script/cbottoken.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/script/cbottoken.cpp b/src/script/cbottoken.cpp index 06b6ea14..24b60a09 100644 --- a/src/script/cbottoken.cpp +++ b/src/script/cbottoken.cpp @@ -372,6 +372,9 @@ std::string GetHelpFilename(const char *token) if ( strcmp(token, "synchronized" ) == 0 ) helpfile = "cbot/synchro"; if ( strcmp(token, "new" ) == 0 ) helpfile = "cbot/new"; if ( strcmp(token, "this" ) == 0 ) helpfile = "cbot/this"; + if ( strcmp(token, "switch" ) == 0 || + strcmp(token, "case" ) == 0 || + strcmp(token, "default" ) == 0 ) helpfile = "cbot/switch"; if (helpfile.empty()) return ""; @@ -491,11 +494,14 @@ bool IsFunction(const char *token) const char* GetHelpText(const char *token) { - if ( strcmp(token, "if" ) == 0 ) return "if ( condition ) { bloc }"; - if ( strcmp(token, "else" ) == 0 ) return "else { bloc }"; + if ( strcmp(token, "if" ) == 0 ) return "if ( condition ) { code }"; + if ( strcmp(token, "else" ) == 0 ) return "else { code }"; if ( strcmp(token, "for" ) == 0 ) return "for ( before ; condition ; end )"; - if ( strcmp(token, "while" ) == 0 ) return "while ( condition ) { bloc }"; - if ( strcmp(token, "do" ) == 0 ) return "do { bloc } while ( condition );"; + if ( strcmp(token, "while" ) == 0 ) return "while ( condition ) { code }"; + if ( strcmp(token, "do" ) == 0 ) return "do { code } while ( condition );"; + if ( strcmp(token, "switch" ) == 0 ) return "switch ( value ) { code }"; + if ( strcmp(token, "case" ) == 0 ) return "case label: { code }"; + if ( strcmp(token, "default" ) == 0 ) return "default: { code } "; if ( strcmp(token, "break" ) == 0 ) return "break;"; if ( strcmp(token, "continue" ) == 0 ) return "continue;"; if ( strcmp(token, "return" ) == 0 ) return "return;"; From 14b6f7cafaeeaedbdd63ea64a25255626ca4eadd Mon Sep 17 00:00:00 2001 From: tomangelo2 Date: Mon, 23 Jul 2018 12:46:47 +0200 Subject: [PATCH 113/207] Fixed some linter warnings in font_config files --- src/common/font_config.cpp | 19 +++++++++---------- src/common/font_config.h | 18 ++++++++---------- 2 files changed, 17 insertions(+), 20 deletions(-) diff --git a/src/common/font_config.cpp b/src/common/font_config.cpp index e021ec0b..a7a306b6 100644 --- a/src/common/font_config.cpp +++ b/src/common/font_config.cpp @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify @@ -16,7 +16,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see http://gnu.org/licenses */ - + #include "common/font_config.h" #include "common/logger.h" @@ -38,7 +38,7 @@ namespace bp = boost::property_tree; -const std::map defaultFont = +const std::map DEFAULT_FONT = { { Gfx::FONT_COMMON, "dvu_sans.ttf" }, { Gfx::FONT_COMMON_BOLD, "dvu_sans_bold.ttf" }, @@ -51,7 +51,7 @@ const std::map defaultFont = { Gfx::FONT_SATCOM_ITALIC, "dvu_sans_italic.ttf" }, }; -const std::map fontType = +const std::map FONT_TYPE = { { Gfx::FONT_COMMON, "FontCommon" }, { Gfx::FONT_COMMON_BOLD, "FontCommonBold" }, @@ -77,11 +77,10 @@ bool CFontConfig::Init() try { std::unique_ptr stream; - bool good; auto inputStream = MakeUnique("/fonts/fonts.ini"); - good = inputStream->is_open(); + bool good = inputStream->is_open(); stream = std::move(inputStream); - + if (good) { bp::ini_parser::read_ini(*stream, m_propertyTree); @@ -107,10 +106,10 @@ std::string CFontConfig::GetFont(Gfx::FontType type) std::string CFontConfig::GetDefaultFont(Gfx::FontType type) const { - return defaultFont.at(type); + return DEFAULT_FONT.at(type); } std::string CFontConfig::GetFontType(Gfx::FontType type) const { - return fontType.at(type); -} \ No newline at end of file + return FONT_TYPE.at(type); +} diff --git a/src/common/font_config.h b/src/common/font_config.h index 96d9efe3..c475ebc5 100644 --- a/src/common/font_config.h +++ b/src/common/font_config.h @@ -1,6 +1,6 @@ /* * This file is part of the Colobot: Gold Edition source code - * Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam * http://epsitec.ch; http://colobot.info; http://github.com/colobot * * This program is free software: you can redistribute it and/or modify @@ -16,12 +16,12 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see http://gnu.org/licenses */ - + /** * \file common/font_config.h * \brief Class for loading fonts from /data/fonts/fonts.ini */ - + #pragma once #include "common/singleton.h" @@ -39,14 +39,12 @@ * */ - - class CFontConfig { public: CFontConfig(); virtual ~CFontConfig(); - + /** Loads fonts.ini * \return return true on success */ @@ -56,19 +54,19 @@ public: * \return return path to font file */ std::string GetFont(Gfx::FontType type); - + /** Const type method to read filenames of fonts from defaultFont map * used as a fallback if it wasn't possible to read font from fonts.ini * \return return filename of default path */ std::string GetDefaultFont(Gfx::FontType type) const; - + /** Const type method converting Gfx::FontType to string * \return return id of font used in fonts.ini file */ - + std::string GetFontType(Gfx::FontType type) const; - + private: boost::property_tree::ptree m_propertyTree; }; From df46bcfe2df91fcf998a1be63bd4f20e4133394d Mon Sep 17 00:00:00 2001 From: tomangelo2 Date: Mon, 23 Jul 2018 14:03:59 +0200 Subject: [PATCH 114/207] Fix another linter warning --- src/graphics/engine/text.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/graphics/engine/text.cpp b/src/graphics/engine/text.cpp index 5638c61b..35166fe7 100644 --- a/src/graphics/engine/text.cpp +++ b/src/graphics/engine/text.cpp @@ -127,14 +127,14 @@ bool CText::Create() m_error = std::string("TTF_Init error: ") + std::string(TTF_GetError()); return false; } - + for (auto type : {FONT_COMMON, FONT_STUDIO, FONT_SATCOM}) { m_fonts[static_cast(type)] = MakeUnique(fontConfig.GetFont(type)); m_fonts[static_cast(type|FONT_BOLD)] = MakeUnique(fontConfig.GetFont(static_cast(type|FONT_BOLD))); m_fonts[static_cast(type|FONT_ITALIC)] = MakeUnique(fontConfig.GetFont(static_cast(type|FONT_ITALIC))); } - + for (auto it = m_fonts.begin(); it != m_fonts.end(); ++it) { FontType type = (*it).first; From d84be03a830131aeaefa50d30dbaa7974d89096f Mon Sep 17 00:00:00 2001 From: tomangelo2 Date: Mon, 23 Jul 2018 14:10:27 +0200 Subject: [PATCH 115/207] Removed non-existing font from code Forgot to check build on clean data directory --- src/common/font_config.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/font_config.cpp b/src/common/font_config.cpp index a7a306b6..078cb34a 100644 --- a/src/common/font_config.cpp +++ b/src/common/font_config.cpp @@ -45,7 +45,7 @@ const std::map DEFAULT_FONT = { Gfx::FONT_COMMON_ITALIC, "dvu_sans_italic.ttf" }, { Gfx::FONT_STUDIO, "dvu_sans_mono.ttf" }, { Gfx::FONT_STUDIO_BOLD, "dvu_sans_mono_bold.ttf" }, - { Gfx::FONT_STUDIO_ITALIC, "dvu_sans_mono_italic.ttf" }, + { Gfx::FONT_STUDIO_ITALIC, "dvu_sans_mono.ttf" }, //placeholder for future use, DejaVu Sans Mono doesn't have italic variant { Gfx::FONT_SATCOM, "dvu_sans.ttf" }, { Gfx::FONT_SATCOM_BOLD, "dvu_sans_bold.ttf" }, { Gfx::FONT_SATCOM_ITALIC, "dvu_sans_italic.ttf" }, From 3383532752efb716c38ffb72a3b89712c817e388 Mon Sep 17 00:00:00 2001 From: tomangelo2 Date: Wed, 25 Jul 2018 00:44:06 +0200 Subject: [PATCH 116/207] Changed font_config to font_loader Apparently linter doesn't like files with `config` in its name --- src/CMakeLists.txt | 4 ++-- src/common/{font_config.cpp => font_loader.cpp} | 14 +++++++------- src/common/{font_config.h => font_loader.h} | 10 +++++----- src/graphics/engine/text.cpp | 12 ++++++------ 4 files changed, 20 insertions(+), 20 deletions(-) rename src/common/{font_config.cpp => font_loader.cpp} (91%) rename src/common/{font_config.h => font_loader.h} (94%) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 37d6cb04..60ba3232 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -106,8 +106,8 @@ set(BASE_SOURCES common/error.h common/event.cpp common/event.h - common/font_config.h - common/font_config.cpp + common/font_loader.h + common/font_loader.cpp common/global.h common/image.cpp common/image.h diff --git a/src/common/font_config.cpp b/src/common/font_loader.cpp similarity index 91% rename from src/common/font_config.cpp rename to src/common/font_loader.cpp index 078cb34a..79b9375c 100644 --- a/src/common/font_config.cpp +++ b/src/common/font_loader.cpp @@ -17,7 +17,7 @@ * along with this program. If not, see http://gnu.org/licenses */ -#include "common/font_config.h" +#include "common/font_loader.h" #include "common/logger.h" #include "common/make_unique.h" @@ -64,15 +64,15 @@ const std::map FONT_TYPE = { Gfx::FONT_SATCOM_ITALIC, "FontSatComItalic" }, }; -CFontConfig::CFontConfig() +CFontLoader::CFontLoader() { } -CFontConfig::~CFontConfig() +CFontLoader::~CFontLoader() { } -bool CFontConfig::Init() +bool CFontLoader::Init() { try { @@ -99,17 +99,17 @@ bool CFontConfig::Init() return true; } -std::string CFontConfig::GetFont(Gfx::FontType type) +std::string CFontLoader::GetFont(Gfx::FontType type) { return std::string("/fonts/") + m_propertyTree.get(GetFontType(type), GetDefaultFont(type)); } -std::string CFontConfig::GetDefaultFont(Gfx::FontType type) const +std::string CFontLoader::GetDefaultFont(Gfx::FontType type) const { return DEFAULT_FONT.at(type); } -std::string CFontConfig::GetFontType(Gfx::FontType type) const +std::string CFontLoader::GetFontType(Gfx::FontType type) const { return FONT_TYPE.at(type); } diff --git a/src/common/font_config.h b/src/common/font_loader.h similarity index 94% rename from src/common/font_config.h rename to src/common/font_loader.h index c475ebc5..a68fc0ad 100644 --- a/src/common/font_config.h +++ b/src/common/font_loader.h @@ -18,7 +18,7 @@ */ /** - * \file common/font_config.h + * \file common/font_loader.h * \brief Class for loading fonts from /data/fonts/fonts.ini */ @@ -33,17 +33,17 @@ #include /** -* \class CFontConfig +* \class CFontLoader * * \brief Class for loading config file * */ -class CFontConfig +class CFontLoader { public: - CFontConfig(); - virtual ~CFontConfig(); + CFontLoader(); + virtual ~CFontLoader(); /** Loads fonts.ini * \return return true on success diff --git a/src/graphics/engine/text.cpp b/src/graphics/engine/text.cpp index 35166fe7..e9b60934 100644 --- a/src/graphics/engine/text.cpp +++ b/src/graphics/engine/text.cpp @@ -22,7 +22,7 @@ #include "app/app.h" -#include "common/font_config.h" +#include "common/font_loader.h" #include "common/image.h" #include "common/logger.h" #include "common/stringutils.h" @@ -117,8 +117,8 @@ CText::~CText() bool CText::Create() { - CFontConfig fontConfig; - if (!fontConfig.Init()) + CFontLoader fontLoader; + if (!fontLoader.Init()) { GetLogger()->Warn("Error on parsing fonts config file: failed to open file\n"); } @@ -130,9 +130,9 @@ bool CText::Create() for (auto type : {FONT_COMMON, FONT_STUDIO, FONT_SATCOM}) { - m_fonts[static_cast(type)] = MakeUnique(fontConfig.GetFont(type)); - m_fonts[static_cast(type|FONT_BOLD)] = MakeUnique(fontConfig.GetFont(static_cast(type|FONT_BOLD))); - m_fonts[static_cast(type|FONT_ITALIC)] = MakeUnique(fontConfig.GetFont(static_cast(type|FONT_ITALIC))); + m_fonts[static_cast(type)] = MakeUnique(fontLoader.GetFont(type)); + m_fonts[static_cast(type|FONT_BOLD)] = MakeUnique(fontLoader.GetFont(static_cast(type|FONT_BOLD))); + m_fonts[static_cast(type|FONT_ITALIC)] = MakeUnique(fontLoader.GetFont(static_cast(type|FONT_ITALIC))); } for (auto it = m_fonts.begin(); it != m_fonts.end(); ++it) From f93fd61c26667c147f76ddfda87c6c2976f9f8c2 Mon Sep 17 00:00:00 2001 From: MrSimbax Date: Wed, 25 Jul 2018 21:34:39 +0200 Subject: [PATCH 117/207] Rename OFFICIAL_BUILD to OFFICIAL_COLOBOT_BUILD In order to avoid conflict with OFFICIAL_BUILD variable inside ntverp.h. It caused compilation error "invalid integer expression" https://github.com/tpn/winsdk-10/blob/master/Include/10.0.10240.0/shared/ntverp.h#L134 --- CMakeLists.txt | 2 +- src/app/signal_handlers.cpp | 2 +- src/common/version.h.cmake | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 44a63de6..8881e0e3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -204,7 +204,7 @@ option(DEV_BUILD "Enable development build (enables some debugging tools, local # Official build - changes text on the crash screen # PLEASE DO NOT USE ON UNOFFICIAL BUILDS. Thanks. -option(OFFICIAL_BUILD "Official build (changes crash screen text)" OFF) +option(OFFICIAL_COLOBOT_BUILD "Official build (changes crash screen text)" OFF) # Portable build - load all data from current directory option(PORTABLE "Portable build" OFF) diff --git a/src/app/signal_handlers.cpp b/src/app/signal_handlers.cpp index 1974ba3f..03771dab 100644 --- a/src/app/signal_handlers.cpp +++ b/src/app/signal_handlers.cpp @@ -133,7 +133,7 @@ void CSignalHandlers::ReportError(const std::string& errorMessage) msg << "including information on what you were doing before this happened and all the information below." << std::endl; msg << "==============================" << std::endl; #if BUILD_NUMBER == 0 - #ifdef OFFICIAL_BUILD + #ifdef OFFICIAL_COLOBOT_BUILD msg << "You are running official " << COLOBOT_VERSION_DISPLAY << " build." << std::endl; #else // COLOBOT_VERSION_DISPLAY doesn't update if you don't run CMake after "git pull" diff --git a/src/common/version.h.cmake b/src/common/version.h.cmake index ad3714b3..ca377e4f 100644 --- a/src/common/version.h.cmake +++ b/src/common/version.h.cmake @@ -4,4 +4,4 @@ #define COLOBOT_VERSION_DISPLAY "@COLOBOT_VERSION_DISPLAY@" #define BUILD_NUMBER @BUILD_NUMBER@ -#cmakedefine OFFICIAL_BUILD +#cmakedefine OFFICIAL_COLOBOT_BUILD From 32d3d1eb924cc89b3cfdd1a729a04e0be96af296 Mon Sep 17 00:00:00 2001 From: MrSimbax Date: Wed, 25 Jul 2018 21:38:47 +0200 Subject: [PATCH 118/207] Change key for debug menu to F10 and for stats to F11 F12 is used by Visual Studio debugger to trigger a breakpoint and apparently it cannot be changed: "The F12 key is reserved for use by the debugger at all times, so it should not be registered as a hot key. Even when you are not debugging an application, F12 is reserved in case a kernel-mode debugger or a just-in-time debugger is resident." Source: https://msdn.microsoft.com/en-us/library/windows/desktop/ms646309.aspx?f=255&MSPPError=-2147217396 --- src/graphics/engine/engine.cpp | 2 +- src/level/robotmain.cpp | 2 +- src/ui/debug_menu.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/graphics/engine/engine.cpp b/src/graphics/engine/engine.cpp index 4dfec9ca..8cb595eb 100644 --- a/src/graphics/engine/engine.cpp +++ b/src/graphics/engine/engine.cpp @@ -431,7 +431,7 @@ bool CEngine::ProcessEvent(const Event &event) { auto data = event.GetData(); - if (data->key == KEY(F12)) + if (data->key == KEY(F11)) { m_showStats = !m_showStats; return false; diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp index 2cabcccf..e2608007 100644 --- a/src/level/robotmain.cpp +++ b/src/level/robotmain.cpp @@ -779,7 +779,7 @@ bool CRobotMain::ProcessEvent(Event &event) if (IsPhaseWithWorld(m_phase)) { - if (data->key == KEY(F11)) + if (data->key == KEY(F10)) { m_debugMenu->ToggleInterface(); return false; diff --git a/src/ui/debug_menu.h b/src/ui/debug_menu.h index e3ee0933..ecc6f81e 100644 --- a/src/ui/debug_menu.h +++ b/src/ui/debug_menu.h @@ -39,7 +39,7 @@ class CInterface; /** * \class CDebugMenu - * \brief Handles debug menu (F11) + * \brief Handles debug menu (F10) * * There should always be only one instance of this class for each associated CRobotMain class. */ From cb701cacb8f1cf0f0d52c0e778474588e7e88703 Mon Sep 17 00:00:00 2001 From: MrSimbax Date: Wed, 25 Jul 2018 21:44:31 +0200 Subject: [PATCH 119/207] Add a workaround for failed assertion in VS debugger Assertion failed: ploc->_Mbcurmax == 1 || ploc->_Mbcurmax == 2 Apparently MS C/C++ library doesn't support UTF-8 locales, which causes the assertion to fail. My solution is to ignore the system locale and try to set the classic one. LibreOffice seems to have this problem fixed in less simple way: https://gerrit.libreoffice.org/#/c/54110/ --- src/app/app.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/app/app.cpp b/src/app/app.cpp index 3444481c..58a58da4 100644 --- a/src/app/app.cpp +++ b/src/app/app.cpp @@ -1832,7 +1832,12 @@ void CApplication::SetLanguage(Language language) // Update C++ locale try { +#if defined(_MSC_VER) && defined(_DEBUG) + // Avoids failed assertion in VS debugger + throw -1; +#else std::locale::global(std::locale(systemLocale.c_str())); +#endif } catch (...) { From 7e19622b85dbad63bc5b0ceb53a2b22db65a574b Mon Sep 17 00:00:00 2001 From: MrSimbax Date: Wed, 25 Jul 2018 23:45:15 +0200 Subject: [PATCH 120/207] Allow both F11 and F12 for stats --- src/graphics/engine/engine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/graphics/engine/engine.cpp b/src/graphics/engine/engine.cpp index 8cb595eb..bc17087e 100644 --- a/src/graphics/engine/engine.cpp +++ b/src/graphics/engine/engine.cpp @@ -431,7 +431,7 @@ bool CEngine::ProcessEvent(const Event &event) { auto data = event.GetData(); - if (data->key == KEY(F11)) + if (data->key == KEY(F11) || data->key == KEY(F12)) { m_showStats = !m_showStats; return false; From f3b30625eec3dcef259ba69b557f3878b012c5e7 Mon Sep 17 00:00:00 2001 From: Jerzy B Date: Sun, 12 Aug 2018 06:49:45 +0100 Subject: [PATCH 121/207] Fix GCC 8 warning about sprintf overflow (#1192) --- src/ui/screen/screen_io.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ui/screen/screen_io.cpp b/src/ui/screen/screen_io.cpp index 06db0339..d3df8fdb 100644 --- a/src/ui/screen/screen_io.cpp +++ b/src/ui/screen/screen_io.cpp @@ -58,7 +58,7 @@ void CScreenIO::IOReadName() CEdit* pe; std::string resume; char line[100]; - char name[100]; + std::string name; time_t now; pw = static_cast(m_interface->SearchControl(EVENT_WINDOW5)); @@ -81,10 +81,10 @@ void CScreenIO::IOReadName() time(&now); strftime(line, 99, "%y.%m.%d %H:%M", localtime(&now)); - sprintf(name, "%s - %s %d", line, resume.c_str(), m_main->GetLevelRank()); + name = StrUtils::Format("%s - %s %d", line, resume.c_str(), m_main->GetLevelRank()); pe->SetText(name); - pe->SetCursor(strlen(name), 0); + pe->SetCursor(name.length(), 0); m_interface->SetFocus(pe); } From 6f0a294048b017cf92011a6c4933d9418174f216 Mon Sep 17 00:00:00 2001 From: Jerzy B Date: Sat, 18 Aug 2018 09:11:46 +0100 Subject: [PATCH 122/207] Give space for a null character in texture name --- src/graphics/model/model_io_structs.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/graphics/model/model_io_structs.h b/src/graphics/model/model_io_structs.h index 36f4f7f1..5646bafd 100644 --- a/src/graphics/model/model_io_structs.h +++ b/src/graphics/model/model_io_structs.h @@ -188,7 +188,7 @@ struct OldModelTriangleV1 Vertex p2; Vertex p3; Material material; - char texName[20] = {}; + char texName[21] = {'\0'}; float min = 0; float max = 0; }; @@ -207,7 +207,7 @@ struct OldModelTriangleV2 Vertex p2; Vertex p3; Material material; - char texName[20] = {}; + char texName[21] = {'\0'}; float min = 0.0f; float max = 0.0f; long state = 0; @@ -231,7 +231,7 @@ struct OldModelTriangleV3 VertexTex2 p2; VertexTex2 p3; Material material; - char texName[20] = {}; + char texName[21] = {'\0'}; float min = 0.0f; float max = 0.0f; long state = 0; From 47ff15502293e76e698b70884e977eb11d062d47 Mon Sep 17 00:00:00 2001 From: Martin Doucha Date: Mon, 20 Aug 2018 23:05:19 +0200 Subject: [PATCH 123/207] Minor improvements in Czech translation --- po/cs.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/po/cs.po b/po/cs.po index 555df720..9f0f49c4 100644 --- a/po/cs.po +++ b/po/cs.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: 0.1.11\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: DATE\n" -"PO-Revision-Date: 2018-02-24 20:39+01\n" +"PO-Revision-Date: 2018-08-20 22:48+02\n" "Last-Translator: next_ghost \n" "Language-Team: Czech \n" "Language: Czech\n" @@ -1193,7 +1193,7 @@ msgid "Programming help\\Gives more detailed help with programming" msgstr "Nápověda\\Zobrazí nápovědu pro psaní programů" msgid "Programs dispatched by Houston" -msgstr "Program poslaný z Houstonu" +msgstr "Programy poslané z Houstonu" msgid "Public required" msgstr "Tato definice musí být veřejná (public)" @@ -1548,7 +1548,7 @@ msgstr "Buchar" #, c-format msgid "Time: %s" -msgstr "" +msgstr "Čas: %s" msgid "Titanium" msgstr "Titan" @@ -1741,7 +1741,7 @@ msgid "You cannot use \"%s\" in this exercise (used: %d)" msgstr "V tomto cvičení nesmíte použít \"%s\" (použito: %dx)" msgid "You found a usable object" -msgstr "Našli jste fungující objekt" +msgstr "Našli jste použitelný objekt" #, c-format msgid "You have to use \"%1$s\" at least once in this exercise (used: %2$d)" From ee0b46a2784020cc34116c888015717f50038747 Mon Sep 17 00:00:00 2001 From: tomangelo2 Date: Tue, 21 Aug 2018 21:28:45 +0200 Subject: [PATCH 124/207] Add a note mentioned in issue #1197 --- src/common/restext.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/common/restext.cpp b/src/common/restext.cpp index c8602329..4aa21564 100644 --- a/src/common/restext.cpp +++ b/src/common/restext.cpp @@ -48,6 +48,9 @@ const char* stringsCbot[CBot::CBotErrMAX] = { nullptr }; */ #define TR(x) x +/* Please run `make update-pot` after changing this file + * in order to update translation files. Thank you. + */ void InitializeRestext() { From b37cf36a52de5a3c0fde0b3902eafe6f5fbf6f90 Mon Sep 17 00:00:00 2001 From: tomangelo2 Date: Tue, 21 Aug 2018 21:35:37 +0200 Subject: [PATCH 125/207] Updated pot files Just figured out I didn't updated them before --- po/colobot.pot | 3 +++ po/cs.po | 3 +++ po/de.po | 3 +++ po/fr.po | 3 +++ po/pl.po | 3 +++ po/ru.po | 3 +++ 6 files changed, 18 insertions(+) diff --git a/po/colobot.pot b/po/colobot.pot index 5d71af8c..b91aba04 100644 --- a/po/colobot.pot +++ b/po/colobot.pot @@ -451,6 +451,9 @@ msgstr "" msgid "Shadow resolution\\Higher means better range and quality, but slower" msgstr "" +msgid "Vertical Synchronization\\Limits the number of frames per second to display frequency" +msgstr "" + msgid "Standard controls\\Standard key functions" msgstr "" diff --git a/po/cs.po b/po/cs.po index 555df720..133e0b95 100644 --- a/po/cs.po +++ b/po/cs.po @@ -1664,6 +1664,9 @@ msgstr "Proměnná nebyla nastavena" msgid "Vault" msgstr "Trezor" +msgid "Vertical Synchronization\\Limits the number of frames per second to display frequency" +msgstr "" + msgid "Violet flag" msgstr "Fialová vlajka" diff --git a/po/de.po b/po/de.po index 553ead83..66d9918a 100644 --- a/po/de.po +++ b/po/de.po @@ -1681,6 +1681,9 @@ msgstr "Der Wert dieser Variable wurde nicht definiert" msgid "Vault" msgstr "Bunker" +msgid "Vertical Synchronization\\Limits the number of frames per second to display frequency" +msgstr "" + msgid "Violet flag" msgstr "Violette Fahne" diff --git a/po/fr.po b/po/fr.po index ce3f5fdf..8e2880b0 100644 --- a/po/fr.po +++ b/po/fr.po @@ -1684,6 +1684,9 @@ msgstr "Variable non initialisée" msgid "Vault" msgstr "Coffre-fort" +msgid "Vertical Synchronization\\Limits the number of frames per second to display frequency" +msgstr "" + msgid "Violet flag" msgstr "Drapeau violet" diff --git a/po/pl.po b/po/pl.po index f9f76de8..073c7b58 100644 --- a/po/pl.po +++ b/po/pl.po @@ -1663,6 +1663,9 @@ msgstr "Zmienna nie została zainicjalizowana" msgid "Vault" msgstr "Skrytka" +msgid "Vertical Synchronization\\Limits the number of frames per second to display frequency" +msgstr "Synchronizacja pionowa\\Ogranicza ilość klatek na sekundę do wartości odświeżania ekranu" + msgid "Violet flag" msgstr "Fioletowa flaga" diff --git a/po/ru.po b/po/ru.po index 0763e742..ca44c0c5 100644 --- a/po/ru.po +++ b/po/ru.po @@ -1694,6 +1694,9 @@ msgstr "Переменная не инициализирована" msgid "Vault" msgstr "Хранилище" +msgid "Vertical Synchronization\\Limits the number of frames per second to display frequency" +msgstr "" + msgid "Violet flag" msgstr "Фиолетовый флаг" From 2871bac0ceb3aec549ae3d2839f5b1b3db2af61c Mon Sep 17 00:00:00 2001 From: Alexander Olofsson Date: Thu, 4 Oct 2018 00:43:09 +0200 Subject: [PATCH 126/207] Add an appdata XML for Linux packaging Fixes #1204 --- desktop/CMakeLists.txt | 6 ++++ desktop/info.colobot.Colobot.appdata.xml | 37 ++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 desktop/info.colobot.Colobot.appdata.xml diff --git a/desktop/CMakeLists.txt b/desktop/CMakeLists.txt index b49ef2d3..5a4b04cc 100644 --- a/desktop/CMakeLists.txt +++ b/desktop/CMakeLists.txt @@ -70,6 +70,12 @@ if(PLATFORM_GNU) DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications/ ) + # Install appdata + install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/info.colobot.Colobot.appdata.xml + DESTINATION ${CMAKE_INSTALL_PREFIX}/share/metainfo/ + ) + # Install Icon install( FILES ${COLOBOT_ICON_FILE} diff --git a/desktop/info.colobot.Colobot.appdata.xml b/desktop/info.colobot.Colobot.appdata.xml new file mode 100644 index 00000000..9510e512 --- /dev/null +++ b/desktop/info.colobot.Colobot.appdata.xml @@ -0,0 +1,37 @@ + + + info.colobot.Colobot + CC0-1.0 + GPL-3.0 + TerranovaTeam + contact@colobot.info + Colobot + Colonize with bots + + +

Colobot (Colonize with Bots) is an educational game aiming to teach programming through entertainment. You are playing as an astronaut on a journey with robot helpers to find a planet for colonization. It features 3D real-time graphics and a C++ and Java-like, object-oriented language, CBOT, which can be used to program the robots available in the game.

+
+ + colobot.desktop + + + + Alpha 0.1.5 + https://colobot.info/wordpress/wp-content/uploads/alpha-0.1.5.png + + + + https://colobot.info/ + http://colobot.info/forum/ + https://github.com/colobot/colobot/issues + + + moderate + moderate + mild + + + + + +
From 0dbf82ca4e9a847b63594070d5cfa278372767ae Mon Sep 17 00:00:00 2001 From: Alexander Olofsson Date: Thu, 4 Oct 2018 01:07:20 +0200 Subject: [PATCH 127/207] Add the donation link to the appdata XML as well --- desktop/info.colobot.Colobot.appdata.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/desktop/info.colobot.Colobot.appdata.xml b/desktop/info.colobot.Colobot.appdata.xml index 9510e512..8a2a75d6 100644 --- a/desktop/info.colobot.Colobot.appdata.xml +++ b/desktop/info.colobot.Colobot.appdata.xml @@ -22,8 +22,9 @@ https://colobot.info/ - http://colobot.info/forum/ https://github.com/colobot/colobot/issues + http://colobot.info/forum/ + https://colobot.info/donate/ moderate From abf1a60a86d2ff931837372167764d030236b830 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Cie=C5=9Bla?= Date: Wed, 10 Oct 2018 19:14:23 +0200 Subject: [PATCH 128/207] Fix for #1203 --- src/object/old_object.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/object/old_object.cpp b/src/object/old_object.cpp index 3acf608a..3ecbb0e8 100644 --- a/src/object/old_object.cpp +++ b/src/object/old_object.cpp @@ -284,13 +284,19 @@ void COldObject::DeleteObject(bool bAll) if (m_power != nullptr) { if (m_power->Implements(ObjectInterfaceType::Old)) + { + dynamic_cast(m_power)->SetTransporter(nullptr); dynamic_cast(m_power)->DeleteObject(bAll); + } m_power = nullptr; } if (m_cargo != nullptr) { if (m_cargo->Implements(ObjectInterfaceType::Old)) + { + dynamic_cast(m_cargo)->SetTransporter(nullptr); dynamic_cast(m_cargo)->DeleteObject(bAll); + } m_cargo = nullptr; } } From 7c88a6e66758cd3d7b1682853c4696935f5877cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Cie=C5=9Bla?= Date: Sat, 13 Oct 2018 10:12:41 +0200 Subject: [PATCH 129/207] Fix for #1194 --- src/graphics/engine/engine.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/graphics/engine/engine.cpp b/src/graphics/engine/engine.cpp index 5a056b7d..24c68098 100644 --- a/src/graphics/engine/engine.cpp +++ b/src/graphics/engine/engine.cpp @@ -4048,7 +4048,9 @@ void CEngine::UseMSAA(bool enable) } } - framebuffer->Bind(); + if (framebuffer != nullptr) { + framebuffer->Bind(); + } m_device->SetRenderState(RENDER_STATE_DEPTH_TEST, true); m_device->SetRenderState(RENDER_STATE_DEPTH_WRITE, true); From 634d087d5e4c4c22662bf9c65e414c66439e0ab2 Mon Sep 17 00:00:00 2001 From: "Alexander \"Ananace\" Olofsson" Date: Mon, 29 Oct 2018 18:32:34 +0100 Subject: [PATCH 130/207] Don't grab the AppData XML from binary dir Only supposed to grab from there when generating the file from CMake variables. --- desktop/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop/CMakeLists.txt b/desktop/CMakeLists.txt index 5a4b04cc..af704932 100644 --- a/desktop/CMakeLists.txt +++ b/desktop/CMakeLists.txt @@ -72,7 +72,7 @@ if(PLATFORM_GNU) # Install appdata install( - FILES ${CMAKE_CURRENT_BINARY_DIR}/info.colobot.Colobot.appdata.xml + FILES info.colobot.Colobot.appdata.xml DESTINATION ${CMAKE_INSTALL_PREFIX}/share/metainfo/ ) From 4305f8de03f2cd9564c8ab658e7d1fdb67326c82 Mon Sep 17 00:00:00 2001 From: suve Date: Sun, 18 Nov 2018 21:09:11 +0100 Subject: [PATCH 131/207] Add a minimum & maximum game speed limit --- src/level/robotmain.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp index 2cabcccf..40b74a95 100644 --- a/src/level/robotmain.cpp +++ b/src/level/robotmain.cpp @@ -119,6 +119,10 @@ const float UNIT = 4.0f; // default for g_unit float g_unit; // conversion factor +// Min/max values for the game speed. +const float MIN_SPEED = 1/8.0f; +const float MAX_SPEED = 256.0f; + // Reference colors used when recoloring textures, see ChangeColor() const Gfx::Color COLOR_REF_BOT = Gfx::Color( 10.0f/256.0f, 166.0f/256.0f, 254.0f/256.0f); // blue const Gfx::Color COLOR_REF_ALIEN = Gfx::Color(135.0f/256.0f, 170.0f/256.0f, 13.0f/256.0f); // green @@ -5362,6 +5366,15 @@ void CRobotMain::UpdateChapterPassed() //! Changes game speed void CRobotMain::SetSpeed(float speed) { + if(speed < MIN_SPEED) + { + speed = MIN_SPEED; + } + else if(speed > MAX_SPEED) + { + speed = MAX_SPEED; + } + m_app->SetSimulationSpeed(speed); UpdateSpeedLabel(); } From d11404a6e9ddf5017f18b2ab0565c19e066f33ee Mon Sep 17 00:00:00 2001 From: Alexander Olofsson Date: Sun, 25 Nov 2018 14:49:01 +0100 Subject: [PATCH 132/207] Fix Linux savegame path issue, closes #1212 --- src/common/system/system_linux.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/system/system_linux.cpp b/src/common/system/system_linux.cpp index 3cd25ed2..840fca65 100644 --- a/src/common/system/system_linux.cpp +++ b/src/common/system/system_linux.cpp @@ -99,7 +99,7 @@ std::string CSystemUtilsLinux::GetSaveDir() std::string savegameDir; // Determine savegame dir according to XDG Base Directory Specification - char *envXDG_DATA_HOME = getenv("XDG_CONFIG_DATA"); + char *envXDG_DATA_HOME = getenv("XDG_DATA_HOME"); if (envXDG_DATA_HOME == nullptr) { char *envHOME = getenv("HOME"); From 508e7529d2b7cc7ab56175cd8d8b5595e19700fe Mon Sep 17 00:00:00 2001 From: suve Date: Tue, 27 Nov 2018 19:25:56 +0100 Subject: [PATCH 133/207] Use Math::Clamp() when limiting game speed --- src/level/robotmain.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp index 40b74a95..2e456fc6 100644 --- a/src/level/robotmain.cpp +++ b/src/level/robotmain.cpp @@ -60,6 +60,7 @@ #include "level/parser/parser.h" #include "math/const.h" +#include "math/func.h" #include "math/geometry.h" #include "object/object.h" @@ -5362,18 +5363,10 @@ void CRobotMain::UpdateChapterPassed() return m_ui->UpdateChapterPassed(); } - //! Changes game speed void CRobotMain::SetSpeed(float speed) { - if(speed < MIN_SPEED) - { - speed = MIN_SPEED; - } - else if(speed > MAX_SPEED) - { - speed = MAX_SPEED; - } + speed = Math::Clamp(speed, MIN_SPEED, MAX_SPEED); m_app->SetSimulationSpeed(speed); UpdateSpeedLabel(); From 723c5527831bcd7af75cbd4a449ca926c5bc9020 Mon Sep 17 00:00:00 2001 From: Fiftytwo Date: Sun, 23 Dec 2018 07:04:06 +0100 Subject: [PATCH 134/207] Add Heavy and Amphibious trainer bots --- src/common/restext.cpp | 2 + src/graphics/engine/pyro.cpp | 8 +++- src/graphics/engine/water.cpp | 2 + src/level/parser/parserparam.cpp | 17 +++++--- src/level/robotmain.cpp | 7 +++- src/object/auto/autofactory.cpp | 2 + src/object/auto/automush.cpp | 2 + src/object/auto/autonuclearplant.cpp | 2 + src/object/auto/autopowerplant.cpp | 2 + src/object/auto/autopowerstation.cpp | 2 + src/object/drive_type.cpp | 7 +++- src/object/drive_type.h | 3 +- src/object/motion/motiontoto.cpp | 2 + src/object/motion/motionvehicle.cpp | 58 ++++++++++++++++++++-------- src/object/object_factory.cpp | 2 + src/object/object_type.h | 2 + src/object/old_object.cpp | 28 +++++++++++--- src/object/task/taskgoto.cpp | 13 +++++-- src/object/task/tasktake.cpp | 2 + src/physics/physics.cpp | 30 +++++++++----- src/script/cbottoken.cpp | 4 ++ src/script/scriptfunc.cpp | 12 ++++++ src/ui/controls/map.cpp | 6 +++ src/ui/mainshort.cpp | 4 ++ src/ui/object_interface.cpp | 4 ++ 25 files changed, 177 insertions(+), 46 deletions(-) diff --git a/src/common/restext.cpp b/src/common/restext.cpp index bd1e20b5..96288452 100644 --- a/src/common/restext.cpp +++ b/src/common/restext.cpp @@ -521,6 +521,8 @@ void InitializeRestext() stringsObject[OBJECT_MOBILEtt] = TR("Practice bot"); stringsObject[OBJECT_MOBILEwt] = TR("Practice bot"); stringsObject[OBJECT_MOBILEit] = TR("Practice bot"); + stringsObject[OBJECT_MOBILErp] = TR("Practice bot"); + stringsObject[OBJECT_MOBILEst] = TR("Practice bot"); stringsObject[OBJECT_MOBILEfa] = TR("Winged grabber"); stringsObject[OBJECT_MOBILEta] = TR("Tracked grabber"); stringsObject[OBJECT_MOBILEwa] = TR("Wheeled grabber"); diff --git a/src/graphics/engine/pyro.cpp b/src/graphics/engine/pyro.cpp index 5a0b9e2c..39a53a75 100644 --- a/src/graphics/engine/pyro.cpp +++ b/src/graphics/engine/pyro.cpp @@ -1285,6 +1285,8 @@ void CPyro::DisplayError(PyroType type, CObject* obj) oType == OBJECT_MOBILEtt || oType == OBJECT_MOBILEft || oType == OBJECT_MOBILEit || + oType == OBJECT_MOBILErp || + oType == OBJECT_MOBILEst || oType == OBJECT_MOBILEdr ) { err = ERR_DELETEMOBILE; @@ -2053,11 +2055,14 @@ void CPyro::BurnStart() m_burnType == OBJECT_MOBILEtc || m_burnType == OBJECT_MOBILEti || m_burnType == OBJECT_MOBILEts || + m_burnType == OBJECT_MOBILEtt || m_burnType == OBJECT_MOBILErt || m_burnType == OBJECT_MOBILErc || m_burnType == OBJECT_MOBILErr || m_burnType == OBJECT_MOBILErs || + m_burnType == OBJECT_MOBILErp || m_burnType == OBJECT_MOBILEsa || + m_burnType == OBJECT_MOBILEst || m_burnType == OBJECT_MOBILEdr ) // caterpillars? { pos.x = 0.0f; @@ -2102,7 +2107,8 @@ void CPyro::BurnStart() m_burnType == OBJECT_MOBILEib || m_burnType == OBJECT_MOBILEic || m_burnType == OBJECT_MOBILEii || - m_burnType == OBJECT_MOBILEis ) // legs? + m_burnType == OBJECT_MOBILEis || + m_burnType == OBJECT_MOBILEit ) // legs? { for (int i = 0; i < 6; i++) { diff --git a/src/graphics/engine/water.cpp b/src/graphics/engine/water.cpp index 55f7465d..6baa7396 100644 --- a/src/graphics/engine/water.cpp +++ b/src/graphics/engine/water.cpp @@ -592,6 +592,8 @@ float CWater::GetLevel(CObject* object) type == OBJECT_MOBILEtt || type == OBJECT_MOBILEwt || type == OBJECT_MOBILEit || + type == OBJECT_MOBILErp || + type == OBJECT_MOBILEst || type == OBJECT_MOBILEdr ) { return m_level-2.0f; diff --git a/src/level/parser/parserparam.cpp b/src/level/parser/parserparam.cpp index f2663343..3a9c60cd 100644 --- a/src/level/parser/parserparam.cpp +++ b/src/level/parser/parserparam.cpp @@ -343,6 +343,8 @@ ObjectType CLevelParserParam::ToObjectType(std::string value) if (value == "TrackedTrainer" ) return OBJECT_MOBILEtt; if (value == "WheeledTrainer" ) return OBJECT_MOBILEwt; if (value == "LeggedTrainer" ) return OBJECT_MOBILEit; + if (value == "HeavyTrainer" ) return OBJECT_MOBILErp; + if (value == "AmphibiousTrainer" ) return OBJECT_MOBILEst; if (value == "WingedGrabber" ) return OBJECT_MOBILEfa; if (value == "TrackedGrabber" ) return OBJECT_MOBILEta; if (value == "WheeledGrabber" ) return OBJECT_MOBILEwa; @@ -551,6 +553,8 @@ const std::string CLevelParserParam::FromObjectType(ObjectType value) if (value == OBJECT_MOBILEft ) return "WingedTrainer"; if (value == OBJECT_MOBILEtt ) return "TrackedTrainer"; if (value == OBJECT_MOBILEit ) return "LeggedTrainer"; + if (value == OBJECT_MOBILErp ) return "HeavyTrainer"; + if (value == OBJECT_MOBILEst ) return "AmphibiousTrainer"; if (value == OBJECT_MOBILEfa ) return "WingedGrabber"; if (value == OBJECT_MOBILEta ) return "TrackedGrabber"; if (value == OBJECT_MOBILEwa ) return "WheeledGrabber"; @@ -764,12 +768,13 @@ ObjectType CLevelParserParam::AsObjectType(ObjectType def) DriveType CLevelParserParam::ToDriveType(std::string value) { - if (value == "Wheeled") return DriveType::Wheeled; - if (value == "Tracked") return DriveType::Tracked; - if (value == "Winged" ) return DriveType::Winged; - if (value == "Legged" ) return DriveType::Legged; - if (value == "BigTracked") return DriveType::BigTracked; - if (value == "Other" ) return DriveType::Other; + if (value == "Wheeled" ) return DriveType::Wheeled; + if (value == "Tracked" ) return DriveType::Tracked; + if (value == "Winged" ) return DriveType::Winged; + if (value == "Legged" ) return DriveType::Legged; + if (value == "Heavy" ) return DriveType::Heavy; + if (value == "Amphibious") return DriveType::Amphibious; + if (value == "Other" ) return DriveType::Other; return static_cast(Cast(value, "drive")); } diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp index 610a5705..b2ec5a9d 100644 --- a/src/level/robotmain.cpp +++ b/src/level/robotmain.cpp @@ -1839,6 +1839,8 @@ void CRobotMain::SelectOneObject(CObject* obj, bool displayError) type == OBJECT_MOBILEtt || type == OBJECT_MOBILEwt || type == OBJECT_MOBILEit || + type == OBJECT_MOBILErp || + type == OBJECT_MOBILEst || type == OBJECT_MOBILEdr || type == OBJECT_APOLLO2 ) { @@ -2225,6 +2227,8 @@ void CRobotMain::ChangeCamera() oType != OBJECT_MOBILEtt && oType != OBJECT_MOBILEwt && oType != OBJECT_MOBILEit && + oType != OBJECT_MOBILErp && + oType != OBJECT_MOBILEst && oType != OBJECT_MOBILEdr && oType != OBJECT_APOLLO2 ) return; @@ -5734,13 +5738,14 @@ Error CRobotMain::CanFactoryError(ObjectType type, int team) if (drive == DriveType::Tracked && !IsResearchDone(RESEARCH_TANK, team)) return ERR_BUILD_RESEARCH; if (drive == DriveType::Winged && !IsResearchDone(RESEARCH_FLY, team)) return ERR_BUILD_RESEARCH; if (drive == DriveType::Legged && !IsResearchDone(RESEARCH_iPAW, team)) return ERR_BUILD_RESEARCH; - if (drive == DriveType::BigTracked && !IsResearchDone(RESEARCH_TANK, team)) return ERR_BUILD_RESEARCH; // NOTE: Subber is not BigTracked! It currently counts as Other + if (drive == DriveType::Heavy && !IsResearchDone(RESEARCH_TANK, team)) return ERR_BUILD_RESEARCH; if (type == OBJECT_MOBILErt && !IsResearchDone(RESEARCH_THUMP, team)) return ERR_BUILD_RESEARCH; if (type == OBJECT_MOBILErc && !IsResearchDone(RESEARCH_PHAZER, team)) return ERR_BUILD_RESEARCH; if (type == OBJECT_MOBILErr && !IsResearchDone(RESEARCH_RECYCLER, team)) return ERR_BUILD_RESEARCH; if (type == OBJECT_MOBILErs && !IsResearchDone(RESEARCH_SHIELD, team)) return ERR_BUILD_RESEARCH; if (type == OBJECT_MOBILEsa && !IsResearchDone(RESEARCH_SUBM, team)) return ERR_BUILD_DISABLED; // Can be only researched manually in Scene file + if (type == OBJECT_MOBILEst && !IsResearchDone(RESEARCH_SUBM, team)) return ERR_BUILD_DISABLED; if (type == OBJECT_MOBILEtg && !IsResearchDone(RESEARCH_TARGET, team)) return ERR_BUILD_RESEARCH; return ERR_OK; diff --git a/src/object/auto/autofactory.cpp b/src/object/auto/autofactory.cpp index 0ccb8cc2..386bf3e2 100644 --- a/src/object/auto/autofactory.cpp +++ b/src/object/auto/autofactory.cpp @@ -618,6 +618,8 @@ bool CAutoFactory::NearestVehicle() type != OBJECT_MOBILEtt && type != OBJECT_MOBILEwt && type != OBJECT_MOBILEit && + type != OBJECT_MOBILErp && + type != OBJECT_MOBILEst && type != OBJECT_MOBILEdr && type != OBJECT_MOTHER && type != OBJECT_ANT && diff --git a/src/object/auto/automush.cpp b/src/object/auto/automush.cpp index a267322b..1a7dfc96 100644 --- a/src/object/auto/automush.cpp +++ b/src/object/auto/automush.cpp @@ -262,6 +262,8 @@ bool CAutoMush::SearchTarget() type != OBJECT_MOBILEtt && type != OBJECT_MOBILEwt && type != OBJECT_MOBILEit && + type != OBJECT_MOBILErp && + type != OBJECT_MOBILEst && type != OBJECT_MOBILEdr && type != OBJECT_DERRICK && type != OBJECT_STATION && diff --git a/src/object/auto/autonuclearplant.cpp b/src/object/auto/autonuclearplant.cpp index 7601b6cb..1c4b60c7 100644 --- a/src/object/auto/autonuclearplant.cpp +++ b/src/object/auto/autonuclearplant.cpp @@ -371,6 +371,8 @@ bool CAutoNuclearPlant::SearchVehicle() type != OBJECT_MOBILEtt && type != OBJECT_MOBILEwt && type != OBJECT_MOBILEit && + type != OBJECT_MOBILErp && + type != OBJECT_MOBILEst && type != OBJECT_MOBILEdr && type != OBJECT_MOTHER && type != OBJECT_ANT && diff --git a/src/object/auto/autopowerplant.cpp b/src/object/auto/autopowerplant.cpp index 50504db1..f29d8cd4 100644 --- a/src/object/auto/autopowerplant.cpp +++ b/src/object/auto/autopowerplant.cpp @@ -434,6 +434,8 @@ bool CAutoPowerPlant::SearchVehicle() type != OBJECT_MOBILEtt && type != OBJECT_MOBILEwt && type != OBJECT_MOBILEit && + type != OBJECT_MOBILErp && + type != OBJECT_MOBILEst && type != OBJECT_MOBILEdr && type != OBJECT_MOTHER && type != OBJECT_ANT && diff --git a/src/object/auto/autopowerstation.cpp b/src/object/auto/autopowerstation.cpp index 2671bdc7..1fa8d611 100644 --- a/src/object/auto/autopowerstation.cpp +++ b/src/object/auto/autopowerstation.cpp @@ -278,6 +278,8 @@ CObject* CAutoPowerStation::SearchVehicle() type != OBJECT_MOBILEtt && type != OBJECT_MOBILEwt && type != OBJECT_MOBILEit && + type != OBJECT_MOBILErp && + type != OBJECT_MOBILEst && type != OBJECT_MOBILEtg && type != OBJECT_MOBILEdr ) continue; diff --git a/src/object/drive_type.cpp b/src/object/drive_type.cpp index 412e37bc..78d5e37b 100644 --- a/src/object/drive_type.cpp +++ b/src/object/drive_type.cpp @@ -55,12 +55,15 @@ DriveType GetDriveFromObject(ObjectType type) case OBJECT_MOBILEib: return DriveType::Legged; + case OBJECT_MOBILErp: case OBJECT_MOBILErt: case OBJECT_MOBILErc: case OBJECT_MOBILErr: case OBJECT_MOBILErs: - // NOTE: Subber is not BigTracked! - return DriveType::BigTracked; + return DriveType::Heavy; + + case OBJECT_MOBILEsa: + return DriveType::Amphibious; default: return DriveType::Other; diff --git a/src/object/drive_type.h b/src/object/drive_type.h index 50265bf0..7802841d 100644 --- a/src/object/drive_type.h +++ b/src/object/drive_type.h @@ -28,7 +28,8 @@ enum class DriveType : unsigned int Tracked, Winged, Legged, - BigTracked, + Heavy, + Amphibious }; DriveType GetDriveFromObject(ObjectType type); diff --git a/src/object/motion/motiontoto.cpp b/src/object/motion/motiontoto.cpp index 7dbed435..2fc955e2 100644 --- a/src/object/motion/motiontoto.cpp +++ b/src/object/motion/motiontoto.cpp @@ -360,6 +360,8 @@ bool CMotionToto::EventFrame(const Event &event) type == OBJECT_MOBILEtt || type == OBJECT_MOBILEft || type == OBJECT_MOBILEit || + type == OBJECT_MOBILErp || + type == OBJECT_MOBILEst || type == OBJECT_MOBILEtg || type == OBJECT_MOBILEdr ) ) // vehicle? { diff --git a/src/object/motion/motionvehicle.cpp b/src/object/motion/motionvehicle.cpp index c8f159d4..c96c5ce7 100644 --- a/src/object/motion/motionvehicle.cpp +++ b/src/object/motion/motionvehicle.cpp @@ -100,11 +100,23 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_VEHICLE); // this is a moving object m_object->SetObjectRank(0, rank); - if (m_object->GetTrainer() || - type == OBJECT_MOBILEwt || - type == OBJECT_MOBILEtt || - type == OBJECT_MOBILEft || - type == OBJECT_MOBILEit) + if ((m_object->GetTrainer() && type == OBJECT_MOBILEsa) || type == OBJECT_MOBILEst) + { + modelManager->AddModelReference("trainers.mod", false, rank, m_object->GetTeam()); + } + else if ((m_object->GetTrainer() && + ( type == OBJECT_MOBILErt || + type == OBJECT_MOBILErc || + type == OBJECT_MOBILErr || + type == OBJECT_MOBILErs)) || type == OBJECT_MOBILErp) + { + modelManager->AddModelReference("trainerr.mod", false, rank, m_object->GetTeam()); + } + else if (m_object->GetTrainer() || + type == OBJECT_MOBILEwt || + type == OBJECT_MOBILEtt || + type == OBJECT_MOBILEft || + type == OBJECT_MOBILEit) { modelManager->AddModelReference("trainer.mod", false, rank, m_object->GetTeam()); } @@ -201,14 +213,15 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, modelManager->AddModelReference("trainera.mod", false, rank, m_object->GetTeam()); } } - else if (type == OBJECT_MOBILErt || + else if (!m_object->GetTrainer() && + (type == OBJECT_MOBILErt || type == OBJECT_MOBILErc || type == OBJECT_MOBILErr || - type == OBJECT_MOBILErs) + type == OBJECT_MOBILErs)) { modelManager->AddModelReference("roller1.mod", false, rank, m_object->GetTeam()); } - else if (type == OBJECT_MOBILEsa) + else if (type == OBJECT_MOBILEsa && !m_object->GetTrainer()) { modelManager->AddModelReference("subm1.mod", false, rank, m_object->GetTeam()); } @@ -265,12 +278,14 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, if (type == OBJECT_MOBILErt || type == OBJECT_MOBILErc || type == OBJECT_MOBILErr || - type == OBJECT_MOBILErs) + type == OBJECT_MOBILErs || + type == OBJECT_MOBILErp) { m_object->AddCrashSphere(CrashSphere(Math::Vector(0.0f, 4.0f, 0.0f), 6.5f, SOUND_BOUMm, 0.45f)); m_object->SetCameraCollisionSphere(Math::Sphere(Math::Vector(0.0f, 3.0f, 0.0f), 7.0f)); } - else if (type == OBJECT_MOBILEsa) + else if (type == OBJECT_MOBILEsa || + type == OBJECT_MOBILEst) { m_object->AddCrashSphere(CrashSphere(Math::Vector(0.0f, 3.0f, 0.0f), 4.5f, SOUND_BOUMm, 0.45f)); m_object->SetCameraCollisionSphere(Math::Sphere(Math::Vector(0.0f, 3.0f, 0.0f), 6.0f)); @@ -548,7 +563,8 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, if (type == OBJECT_MOBILErt || type == OBJECT_MOBILErc || type == OBJECT_MOBILErr || - type == OBJECT_MOBILErs) // large caterpillars? + type == OBJECT_MOBILErs || + type == OBJECT_MOBILErp) // large caterpillars? { // Creates the right caterpillar. rank = m_engine->CreateObject(); @@ -567,7 +583,8 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, m_object->SetPartPosition(7, Math::Vector(0.0f, 2.0f, 3.0f)); } - if (type == OBJECT_MOBILEsa) // underwater caterpillars? + if (type == OBJECT_MOBILEsa || + type == OBJECT_MOBILEst) // underwater caterpillars? { // Creates the right caterpillar. rank = m_engine->CreateObject(); @@ -978,7 +995,8 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, if (type == OBJECT_MOBILErt || type == OBJECT_MOBILErc || type == OBJECT_MOBILErr || - type == OBJECT_MOBILErs) + type == OBJECT_MOBILErs || + type == OBJECT_MOBILErp) { m_object->CreateShadowCircle(6.0f, 1.0f); } @@ -988,7 +1006,8 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, type == OBJECT_MOBILEti || type == OBJECT_MOBILEts || type == OBJECT_MOBILEtt || - type == OBJECT_MOBILEsa) + type == OBJECT_MOBILEsa || + type == OBJECT_MOBILEst) { m_object->CreateShadowCircle(5.0f, 1.0f); } @@ -1225,7 +1244,8 @@ void CMotionVehicle::CreatePhysics(ObjectType type) if ( type == OBJECT_MOBILErt || type == OBJECT_MOBILErc || type == OBJECT_MOBILErr || - type == OBJECT_MOBILErs ) // large caterpillars? + type == OBJECT_MOBILErs || + type == OBJECT_MOBILErp) // large caterpillars? { character->wheelFront = 5.0f; character->wheelBack = 5.0f; @@ -1251,7 +1271,8 @@ void CMotionVehicle::CreatePhysics(ObjectType type) m_physics->SetCirMotionY(MO_STOACCEL, 4.0f); } - if ( type == OBJECT_MOBILEsa ) + if ( type == OBJECT_MOBILEsa || + type == OBJECT_MOBILEst ) { character->wheelFront = 4.0f; character->wheelBack = 4.0f; @@ -1541,7 +1562,9 @@ bool CMotionVehicle::EventFrame(const Event &event) type == OBJECT_MOBILErc || type == OBJECT_MOBILErr || type == OBJECT_MOBILErs || + type == OBJECT_MOBILErp || type == OBJECT_MOBILEsa || + type == OBJECT_MOBILEst || type == OBJECT_MOBILEdr ) // caterpillars? { s = m_physics->GetLinMotionX(MO_MOTSPEED)*0.7f; @@ -1573,7 +1596,8 @@ bool CMotionVehicle::EventFrame(const Event &event) limit[0] = 8.0f*Math::PI/180.0f; limit[1] = -12.0f*Math::PI/180.0f; } - else if ( type == OBJECT_MOBILEsa ) + else if ( type == OBJECT_MOBILEsa || + type == OBJECT_MOBILEst ) { limit[0] = 15.0f*Math::PI/180.0f; limit[1] = -15.0f*Math::PI/180.0f; diff --git a/src/object/object_factory.cpp b/src/object/object_factory.cpp index 539256be..6691770d 100644 --- a/src/object/object_factory.cpp +++ b/src/object/object_factory.cpp @@ -309,6 +309,8 @@ CObjectUPtr CObjectFactory::CreateObject(const ObjectCreateParams& params) case OBJECT_MOBILEtt: case OBJECT_MOBILEwt: case OBJECT_MOBILEit: + case OBJECT_MOBILErp: + case OBJECT_MOBILEst: case OBJECT_MOBILEdr: case OBJECT_APOLLO2: case OBJECT_CONTROLLER: diff --git a/src/object/object_type.h b/src/object/object_type.h index f3acfc2e..339cfe0c 100644 --- a/src/object/object_type.h +++ b/src/object/object_type.h @@ -105,6 +105,8 @@ enum ObjectType OBJECT_MOBILEtt = 101, //!< TrackedTrainer OBJECT_MOBILEft = 102, //!< WingedTrainer OBJECT_MOBILEit = 103, //!< LeggedTrainer + OBJECT_MOBILErp = 104, //!< HeavyTrainer + OBJECT_MOBILEst = 105, //!< AmphibiousTrainer OBJECT_MOBILEwa = 110, //!< WheeledGrabber OBJECT_MOBILEta = 111, //!< TrackedGrabber OBJECT_MOBILEfa = 112, //!< WingedGrabber diff --git a/src/object/old_object.cpp b/src/object/old_object.cpp index b64fb279..0550b80d 100644 --- a/src/object/old_object.cpp +++ b/src/object/old_object.cpp @@ -742,6 +742,8 @@ void COldObject::SetType(ObjectType type) m_type == OBJECT_MOBILEtt || m_type == OBJECT_MOBILEwt || m_type == OBJECT_MOBILEit || + m_type == OBJECT_MOBILErp || + m_type == OBJECT_MOBILEst || m_type == OBJECT_TOWER || m_type == OBJECT_RESEARCH || m_type == OBJECT_ENERGY || @@ -807,6 +809,8 @@ void COldObject::SetType(ObjectType type) m_type == OBJECT_MOBILEtt || m_type == OBJECT_MOBILEwt || m_type == OBJECT_MOBILEit || + m_type == OBJECT_MOBILErp || + m_type == OBJECT_MOBILEst || m_type == OBJECT_FACTORY || m_type == OBJECT_REPAIR || m_type == OBJECT_DESTROYER|| @@ -911,6 +915,8 @@ void COldObject::SetType(ObjectType type) m_type == OBJECT_MOBILEtt || m_type == OBJECT_MOBILEwt || m_type == OBJECT_MOBILEit || + m_type == OBJECT_MOBILErp || + m_type == OBJECT_MOBILEst || m_type == OBJECT_MOBILEtg || m_type == OBJECT_MOBILEdr || m_type == OBJECT_APOLLO2 || @@ -2312,7 +2318,8 @@ void COldObject::AdjustCamera(Math::Vector &eye, float &dirH, float &dirV, } else if ( m_type == OBJECT_MOBILErt || m_type == OBJECT_MOBILErr || - m_type == OBJECT_MOBILErs ) + m_type == OBJECT_MOBILErs || + m_type == OBJECT_MOBILErp ) { eye.x = -1.1f; // on the cap eye.y = 7.9f; @@ -2354,7 +2361,8 @@ void COldObject::AdjustCamera(Math::Vector &eye, float &dirH, float &dirV, eye.y = 11.0f; eye.z = 0.0f; } - else if ( m_type == OBJECT_MOBILEsa ) + else if ( m_type == OBJECT_MOBILEsa || + m_type == OBJECT_MOBILEst ) { eye.x = 3.0f; eye.y = 4.5f; @@ -2901,6 +2909,8 @@ void COldObject::CreateSelectParticle() m_type == OBJECT_MOBILEtt || m_type == OBJECT_MOBILEwt || m_type == OBJECT_MOBILEit || + m_type == OBJECT_MOBILErp || + m_type == OBJECT_MOBILEst || m_type == OBJECT_MOBILEdr ) // vehicle? { pos = Math::Vector(0.0f, 0.0f, 0.0f); @@ -2937,14 +2947,16 @@ void COldObject::UpdateSelectParticle() if ( m_type == OBJECT_MOBILErt || m_type == OBJECT_MOBILErc || m_type == OBJECT_MOBILErr || - m_type == OBJECT_MOBILErs ) // large caterpillars? + m_type == OBJECT_MOBILErs || + m_type == OBJECT_MOBILErp ) // large caterpillars? { pos[0] = Math::Vector(4.2f, 2.8f, 1.5f); pos[1] = Math::Vector(4.2f, 2.8f, -1.5f); dim[0].x = 1.5f; dim[1].x = 1.5f; } - else if ( m_type == OBJECT_MOBILEsa ) // submarine? + else if ( m_type == OBJECT_MOBILEsa || + m_type == OBJECT_MOBILEst ) // submarine? { pos[0] = Math::Vector(3.6f, 4.0f, 2.0f); pos[1] = Math::Vector(3.6f, 4.0f, -2.0f); @@ -3027,12 +3039,14 @@ void COldObject::UpdateSelectParticle() if ( m_type == OBJECT_MOBILErt || m_type == OBJECT_MOBILErc || m_type == OBJECT_MOBILErr || - m_type == OBJECT_MOBILErs ) // large caterpillars? + m_type == OBJECT_MOBILErs || + m_type == OBJECT_MOBILErp ) // large caterpillars? { pos[2] = Math::Vector(-5.0f, 5.2f, 2.5f); pos[3] = Math::Vector(-5.0f, 5.2f, -2.5f); } - if ( m_type == OBJECT_MOBILEsa ) // submarine? + if ( m_type == OBJECT_MOBILEsa || + m_type == OBJECT_MOBILEst ) // submarine? { pos[2] = Math::Vector(-3.6f, 4.0f, 2.0f); pos[3] = Math::Vector(-3.6f, 4.0f, -2.0f); @@ -3276,6 +3290,8 @@ float COldObject::GetLightningHitProbability() m_type == OBJECT_MOBILEtt || m_type == OBJECT_MOBILEwt || m_type == OBJECT_MOBILEit || + m_type == OBJECT_MOBILErp || + m_type == OBJECT_MOBILEst || m_type == OBJECT_MOBILEtg || m_type == OBJECT_MOBILEdr ) // robot? { diff --git a/src/object/task/taskgoto.cpp b/src/object/task/taskgoto.cpp index 6a6b3afa..c0403712 100644 --- a/src/object/task/taskgoto.cpp +++ b/src/object/task/taskgoto.cpp @@ -582,6 +582,8 @@ CObject* CTaskGoto::WormSearch(Math::Vector &impact) oType != OBJECT_MOBILEtt && oType != OBJECT_MOBILEwt && oType != OBJECT_MOBILEit && + oType != OBJECT_MOBILErp && + oType != OBJECT_MOBILEst && oType != OBJECT_MOBILEdr && oType != OBJECT_DERRICK && oType != OBJECT_STATION && @@ -725,7 +727,8 @@ Error CTaskGoto::Start(Math::Vector goal, float altitude, type == OBJECT_MOBILErt || type == OBJECT_MOBILErc || type == OBJECT_MOBILErr || - type == OBJECT_MOBILErs ) + type == OBJECT_MOBILErs || + type == OBJECT_MOBILErp ) { m_bApprox = true; } @@ -1194,6 +1197,8 @@ bool CTaskGoto::AdjustTarget(CObject* pObj, Math::Vector &pos, float &distance) type == OBJECT_MOBILEtt || type == OBJECT_MOBILEwt || type == OBJECT_MOBILEit || + type == OBJECT_MOBILErp || + type == OBJECT_MOBILEst || type == OBJECT_MOBILEdr ) { assert(pObj->Implements(ObjectInterfaceType::Powered)); @@ -1996,12 +2001,14 @@ void CTaskGoto::BitmapTerrain(int minx, int miny, int maxx, int maxy) if ( type == OBJECT_MOBILErt || type == OBJECT_MOBILErc || type == OBJECT_MOBILErr || - type == OBJECT_MOBILErs ) // large caterpillars? + type == OBJECT_MOBILErs || + type == OBJECT_MOBILErp ) // large caterpillars? { aLimit = 35.0f*Math::PI/180.0f; } - if ( type == OBJECT_MOBILEsa ) // submarine caterpillars? + if ( type == OBJECT_MOBILEsa || + type == OBJECT_MOBILEst ) // submarine caterpillars? { aLimit = 35.0f*Math::PI/180.0f; bAcceptWater = true; diff --git a/src/object/task/tasktake.cpp b/src/object/task/tasktake.cpp index 728b3519..c827c7a0 100644 --- a/src/object/task/tasktake.cpp +++ b/src/object/task/tasktake.cpp @@ -380,6 +380,8 @@ CObject* CTaskTake::SearchFriendObject(float &angle, type != OBJECT_MOBILEtt && type != OBJECT_MOBILEwt && type != OBJECT_MOBILEit && + type != OBJECT_MOBILErp && + type != OBJECT_MOBILEst && type != OBJECT_TOWER && type != OBJECT_RESEARCH && type != OBJECT_ENERGY && diff --git a/src/physics/physics.cpp b/src/physics/physics.cpp index b7aa80ba..ff79cfdf 100644 --- a/src/physics/physics.cpp +++ b/src/physics/physics.cpp @@ -1828,6 +1828,7 @@ void CPhysics::WaterFrame(float aTime, float rTime) type == OBJECT_MOBILEtt || type == OBJECT_MOBILEwt || type == OBJECT_MOBILEit || + type == OBJECT_MOBILErp || type == OBJECT_MOBILEdr || type == OBJECT_APOLLO2 ) { @@ -1877,7 +1878,8 @@ void CPhysics::SoundMotorFull(float rTime, ObjectType type) return; } - if ( type == OBJECT_MOBILEsa ) + if ( type == OBJECT_MOBILEsa || + type == OBJECT_MOBILEst ) { sound = SOUND_MOTORs; amplitude = 0.6f; @@ -1886,7 +1888,8 @@ void CPhysics::SoundMotorFull(float rTime, ObjectType type) else if ( type == OBJECT_MOBILErt || type == OBJECT_MOBILErc || type == OBJECT_MOBILErr || - type == OBJECT_MOBILErs ) + type == OBJECT_MOBILErs || + type == OBJECT_MOBILErp ) { sound = SOUND_MOTORr; amplitude = 1.0f; @@ -1979,7 +1982,8 @@ void CPhysics::SoundMotorSlow(float rTime, ObjectType type) return; } - if ( type == OBJECT_MOBILEsa ) + if ( type == OBJECT_MOBILEsa || + type == OBJECT_MOBILEst ) { sound = SOUND_MOTORs; amplitude = 0.4f; @@ -1987,7 +1991,8 @@ void CPhysics::SoundMotorSlow(float rTime, ObjectType type) else if ( type == OBJECT_MOBILErt || type == OBJECT_MOBILErc || type == OBJECT_MOBILErr || - type == OBJECT_MOBILErs ) + type == OBJECT_MOBILErs || + type == OBJECT_MOBILErp ) { sound = SOUND_MOTORr; amplitude = 0.9f; @@ -2046,7 +2051,8 @@ void CPhysics::SoundMotorSlow(float rTime, ObjectType type) if ( type == OBJECT_MOBILErt || type == OBJECT_MOBILErc || type == OBJECT_MOBILErr || - type == OBJECT_MOBILErs ) + type == OBJECT_MOBILErs || + type == OBJECT_MOBILErp ) { m_soundTimePshhh -= rTime; @@ -2777,7 +2783,9 @@ bool CPhysics::ExploOther(ObjectType iType, oType == OBJECT_MOBILEwt || oType == OBJECT_MOBILEtt || oType == OBJECT_MOBILEft || - oType == OBJECT_MOBILEit ) // vehicle? + oType == OBJECT_MOBILEit || + oType == OBJECT_MOBILErp || + oType == OBJECT_MOBILEst ) // vehicle? { assert(pObj->Implements(ObjectInterfaceType::Damageable)); // TODO: implement "killer"? @@ -2843,6 +2851,8 @@ int CPhysics::ExploHimself(ObjectType iType, ObjectType oType, float force) iType == OBJECT_MOBILEtt || iType == OBJECT_MOBILEft || iType == OBJECT_MOBILEit || + iType == OBJECT_MOBILErp || + iType == OBJECT_MOBILEst || iType == OBJECT_MOBILEdr || iType == OBJECT_APOLLO2 ) // vehicle? { @@ -3182,7 +3192,8 @@ void CPhysics::MotorParticle(float aTime, float rTime) if ( type == OBJECT_MOBILErt || type == OBJECT_MOBILErc || type == OBJECT_MOBILErr || - type == OBJECT_MOBILErs ) // large caterpillars? + type == OBJECT_MOBILErs || + type == OBJECT_MOBILErp ) // large caterpillars? { if ( aTime-m_lastSlideParticle >= m_engine->ParticleAdapt(0.05f) ) { @@ -3456,7 +3467,7 @@ void CPhysics::MotorParticle(float aTime, float rTime) } } - if ( type == OBJECT_MOBILEsa && m_bSwim ) + if ( (type == OBJECT_MOBILEsa || type == OBJECT_MOBILEst) && m_bSwim ) { h = Math::Mod(aTime, 3.0f); if ( h < 1.5f && ( h < 0.5f || h > 0.9f ) ) return; @@ -3490,7 +3501,8 @@ void CPhysics::MotorParticle(float aTime, float rTime) if ( type == OBJECT_MOBILErt || type == OBJECT_MOBILErc || type == OBJECT_MOBILErr || - type == OBJECT_MOBILErs ) + type == OBJECT_MOBILErs || + type == OBJECT_MOBILErp ) { if ( !m_bMotor ) return; diff --git a/src/script/cbottoken.cpp b/src/script/cbottoken.cpp index 685001ab..098e2b8f 100644 --- a/src/script/cbottoken.cpp +++ b/src/script/cbottoken.cpp @@ -86,6 +86,8 @@ const char* GetObjectName(ObjectType type) if ( type == OBJECT_MOBILEtt ) return "TrackedTrainer"; if ( type == OBJECT_MOBILEft ) return "WingedTrainer"; if ( type == OBJECT_MOBILEit ) return "LeggedTrainer"; + if ( type == OBJECT_MOBILErp ) return "HeavyTrainer"; + if ( type == OBJECT_MOBILEst ) return "AmphibiousTrainer"; if ( type == OBJECT_MOBILEwa ) return "WheeledGrabber"; if ( type == OBJECT_MOBILEta ) return "TrackedGrabber"; if ( type == OBJECT_MOBILEfa ) return "WingedGrabber"; @@ -217,6 +219,8 @@ std::string GetHelpFilename(ObjectType type) if ( type == OBJECT_MOBILEtt ) helpfile = "object/bottr"; if ( type == OBJECT_MOBILEft ) helpfile = "object/bottr"; if ( type == OBJECT_MOBILEit ) helpfile = "object/bottr"; + if ( type == OBJECT_MOBILErp ) helpfile = "object/bottr"; + if ( type == OBJECT_MOBILEst ) helpfile = "object/bottr"; if ( type == OBJECT_MOBILEtg ) helpfile = "object/bottarg"; if ( type == OBJECT_MOBILEdr ) helpfile = "object/botdraw"; if ( type == OBJECT_MOBILEpr ) helpfile = "object/bottr"; diff --git a/src/script/scriptfunc.cpp b/src/script/scriptfunc.cpp index 9d00f031..6e8e6425 100644 --- a/src/script/scriptfunc.cpp +++ b/src/script/scriptfunc.cpp @@ -815,6 +815,8 @@ bool runSearch(CBotVar* var, Math::Vector pos, int& exception, std::function(array->GetValInt())); array = array->GetNext(); @@ -832,6 +834,8 @@ bool runSearch(CBotVar* var, Math::Vector pos, int& exception, std::function, float, f type_v.push_back(OBJECT_MOBILEtt); type_v.push_back(OBJECT_MOBILEft); type_v.push_back(OBJECT_MOBILEit); + type_v.push_back(OBJECT_MOBILErp); + type_v.push_back(OBJECT_MOBILEst); } type_v.push_back(static_cast(array->GetValInt())); array = array->GetNext(); @@ -1021,6 +1027,8 @@ bool runRadar(CBotVar* var, std::function, float, f type_v.push_back(OBJECT_MOBILEtt); type_v.push_back(OBJECT_MOBILEft); type_v.push_back(OBJECT_MOBILEit); + type_v.push_back(OBJECT_MOBILErp); + type_v.push_back(OBJECT_MOBILEst); } } @@ -1189,6 +1197,8 @@ bool CScriptFunctions::rDetect(CBotVar* var, CBotVar* result, int& exception, vo type_v.push_back(OBJECT_MOBILEtt); type_v.push_back(OBJECT_MOBILEft); type_v.push_back(OBJECT_MOBILEit); + type_v.push_back(OBJECT_MOBILErp); + type_v.push_back(OBJECT_MOBILEst); } type_v.push_back(static_cast(array->GetValInt())); array = array->GetNext(); @@ -1206,6 +1216,8 @@ bool CScriptFunctions::rDetect(CBotVar* var, CBotVar* result, int& exception, vo type_v.push_back(OBJECT_MOBILEtt); type_v.push_back(OBJECT_MOBILEft); type_v.push_back(OBJECT_MOBILEit); + type_v.push_back(OBJECT_MOBILErp); + type_v.push_back(OBJECT_MOBILEst); } } diff --git a/src/ui/controls/map.cpp b/src/ui/controls/map.cpp index dbee562f..d4a54b63 100644 --- a/src/ui/controls/map.cpp +++ b/src/ui/controls/map.cpp @@ -880,6 +880,8 @@ void CMap::DrawObjectIcon(Math::Point pos, Math::Point dim, MapColor color, case OBJECT_MOBILEtt: icon = 5; break; case OBJECT_MOBILEwt: icon = 30; break; case OBJECT_MOBILEit: icon = 7; break; + case OBJECT_MOBILErp: icon = 9; break; + case OBJECT_MOBILEst: icon = 10; break; case OBJECT_MOBILEtg: icon = 45; break; case OBJECT_MOBILEdr: icon = 48; break; case OBJECT_APOLLO2: icon = 49; break; @@ -903,6 +905,8 @@ void CMap::DrawObjectIcon(Math::Point pos, Math::Point dim, MapColor color, case OBJECT_MOBILEft: case OBJECT_MOBILEtt: case OBJECT_MOBILEit: + case OBJECT_MOBILErp: + case OBJECT_MOBILEst: m_engine->SetTexture("textures/interface/button4.png"); break; default: ; // button3.png } @@ -1277,6 +1281,8 @@ void CMap::UpdateObject(CObject* pObj) type == OBJECT_MOBILEtt || type == OBJECT_MOBILEft || type == OBJECT_MOBILEit || + type == OBJECT_MOBILErp || + type == OBJECT_MOBILEst || type == OBJECT_MOBILEdr || type == OBJECT_APOLLO2 ) // moving vehicle? { diff --git a/src/ui/mainshort.cpp b/src/ui/mainshort.cpp index cf9101b1..4e2c4c7f 100644 --- a/src/ui/mainshort.cpp +++ b/src/ui/mainshort.cpp @@ -238,6 +238,8 @@ int CMainShort::GetShortcutIcon(ObjectType type) case OBJECT_MOBILEtt: icon = 5; break; case OBJECT_MOBILEwt: icon = 30; break; case OBJECT_MOBILEit: icon = 7; break; + case OBJECT_MOBILErp: icon = 9; break; + case OBJECT_MOBILEst: icon = 10; break; case OBJECT_MOBILEtg: icon = 45; break; case OBJECT_MOBILEdr: icon = 48; break; case OBJECT_APOLLO2: icon = 49; break; @@ -254,6 +256,8 @@ int CMainShort::GetShortcutIcon(ObjectType type) case OBJECT_MOBILEft: case OBJECT_MOBILEtt: case OBJECT_MOBILEit: + case OBJECT_MOBILErp: + case OBJECT_MOBILEst: return 192+icon; default: return 128+icon; diff --git a/src/ui/object_interface.cpp b/src/ui/object_interface.cpp index d1105a9b..d75af46e 100644 --- a/src/ui/object_interface.cpp +++ b/src/ui/object_interface.cpp @@ -875,6 +875,8 @@ bool CObjectInterface::CreateInterface(bool bSelect) type == OBJECT_MOBILEtt || type == OBJECT_MOBILEwt || type == OBJECT_MOBILEit || + type == OBJECT_MOBILErp || + type == OBJECT_MOBILEst || type == OBJECT_MOBILEdr || type == OBJECT_MOTHER || type == OBJECT_ANT || @@ -1920,6 +1922,8 @@ void CObjectInterface::UpdateInterface() type == OBJECT_MOBILEtt || type == OBJECT_MOBILEwt || type == OBJECT_MOBILEit || + type == OBJECT_MOBILErp || + type == OBJECT_MOBILEst || type == OBJECT_MOBILEdr || type == OBJECT_MOTHER || type == OBJECT_ANT || From 92d2de532555cc1a5f076e6847262dd7c42db96c Mon Sep 17 00:00:00 2001 From: tomangelo2 Date: Wed, 2 Jan 2019 00:34:34 +0100 Subject: [PATCH 135/207] Fixed VSync options list Now VSync list is aligned for same height as resolution list from the bottom, as it's very hard to align them from top on different screen resolutions. --- src/ui/screen/screen_setup_display.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ui/screen/screen_setup_display.cpp b/src/ui/screen/screen_setup_display.cpp index 15f2511f..d015a58c 100644 --- a/src/ui/screen/screen_setup_display.cpp +++ b/src/ui/screen/screen_setup_display.cpp @@ -102,7 +102,7 @@ void CScreenSetupDisplay::CreateInterface() pc->SetState(STATE_CHECK, m_setupFull); pos.x = ox+sx*10; - pos.y = oy+sy*9; + pos.y = oy+sy*6.75f; ddim.x = dim.x*6; ddim.y = dim.y*1; GetResource(RES_EVENT, EVENT_INTERFACE_VSYNC, name); @@ -110,9 +110,9 @@ void CScreenSetupDisplay::CreateInterface() pl->SetTextAlign(Gfx::TEXT_ALIGN_LEFT); pos.x = ox+sx*10; - pos.y = oy+sy*7.97f; + pos.y = oy+sy*5.2f; ddim.x = dim.x*6; - ddim.y = dim.y*1.8f; + ddim.y = dim.y*2; pli = pw->CreateList(pos, ddim, 0, EVENT_INTERFACE_VSYNC); pli->SetState(STATE_SHADOW); pli->SetItemName(0, "Off"); From be97167994838763457967d22f441efd7ff6f568 Mon Sep 17 00:00:00 2001 From: tomangelo2 Date: Wed, 2 Jan 2019 01:18:45 +0100 Subject: [PATCH 136/207] Potential fix for issue #1128 --- src/graphics/engine/text.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/graphics/engine/text.cpp b/src/graphics/engine/text.cpp index a16439f4..df284160 100644 --- a/src/graphics/engine/text.cpp +++ b/src/graphics/engine/text.cpp @@ -33,6 +33,7 @@ #include "math/func.h" +#include #include #include @@ -1252,13 +1253,13 @@ FontTexture CText::CreateFontTexture(Math::IntPoint tileSize) Math::IntPoint CText::GetNextTilePos(const FontTexture& fontTexture) { - int horizontalTiles = FONT_TEXTURE_SIZE.x / fontTexture.tileSize.x; - int verticalTiles = FONT_TEXTURE_SIZE.y / fontTexture.tileSize.y; + int horizontalTiles = FONT_TEXTURE_SIZE.x / std::max(1, fontTexture.tileSize.x); //this should prevent crashes in some combinations of resolution and font size, see issue #1128 + int verticalTiles = FONT_TEXTURE_SIZE.y / std::max(1, fontTexture.tileSize.y); int totalTiles = horizontalTiles * verticalTiles; int tileNumber = totalTiles - fontTexture.freeSlots; - int verticalTileIndex = tileNumber / horizontalTiles; + int verticalTileIndex = tileNumber / std::max(1, horizontalTiles); int horizontalTileIndex = tileNumber % horizontalTiles; return Math::IntPoint(horizontalTileIndex * fontTexture.tileSize.x, From e3f53dc20370f394b206af6913e91649a5300949 Mon Sep 17 00:00:00 2001 From: Vladislav Kuzkokov Date: Sun, 6 Jan 2019 07:09:57 +0100 Subject: [PATCH 137/207] Put pitch and roll in [-180,180) range. Reasonable values lie close to either side of 0. --- src/script/scriptfunc.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/script/scriptfunc.cpp b/src/script/scriptfunc.cpp index 20a85bb2..0816cce8 100644 --- a/src/script/scriptfunc.cpp +++ b/src/script/scriptfunc.cpp @@ -3412,9 +3412,9 @@ void CScriptFunctions::uObject(CBotVar* botThis, void* user) pVar = pVar->GetNext(); // "orientation" pVar->SetValFloat(Math::NormAngle(2*Math::PI - pos.y)*180.0f/Math::PI); pVar = pVar->GetNext(); // "pitch" - pVar->SetValFloat(Math::NormAngle(pos.z)*180.0f/Math::PI); + pVar->SetValFloat((Math::NormAngle(pos.z + Math::PI) - Math::PI)*180.0f/Math::PI); pVar = pVar->GetNext(); // "roll" - pVar->SetValFloat(Math::NormAngle(pos.x)*180.0f/Math::PI); + pVar->SetValFloat((Math::NormAngle(pos.x + Math::PI) - Math::PI)*180.0f/Math::PI); // Updates the energy level of the object. pVar = pVar->GetNext(); // "energyLevel" From 63bf8e07da8e06fcfefc90d0429ff218f425b522 Mon Sep 17 00:00:00 2001 From: maf-ia Date: Sat, 12 Jan 2019 21:28:49 +0100 Subject: [PATCH 138/207] Complete last 5 french sentences not fully translated --- po/fr.po | 2273 ++++++------------------------------------------------ 1 file changed, 233 insertions(+), 2040 deletions(-) diff --git a/po/fr.po b/po/fr.po index ce3f5fdf..a216620b 100644 --- a/po/fr.po +++ b/po/fr.po @@ -1,2052 +1,245 @@ -# Didier Raboud , 2012, 2015, 2016. -# Martin Quinson , 2016 -# B-CE, 2018 +# SOME DESCRIPTIVE TITLE +# Copyright (C) YEAR Free Software Foundation, Inc. +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. msgid "" msgstr "" -"Project-Id-Version: Colobot 0.1.11\n" +"Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: DATE\n" -"PO-Revision-Date: 2018-02-28 20:00+0100\n" -"Last-Translator: B-CE\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" -"X-Generator: Lokalize 2.0\n" -"X-Language: fr_FR\n" -"X-Source-Language: en_US\n" - -msgid " or " -msgstr " ou " - -msgid "\" [ \" expected" -msgstr "\" [ \" attendu" - -msgid "\" ] \" missing" -msgstr "\" ] \" manquant" - -#, c-format -msgid "%s: %d pts" -msgstr "%s: %d points" - -msgid "..behind" -msgstr "..derrière" - -msgid "..in front" -msgstr "..devant" - -msgid "..power cell" -msgstr "..pile" - -msgid "1) First click on the key you want to redefine." -msgstr "1) Cliquez d'abord sur la touche à redéfinir." - -msgid "2) Then press the key you want to use instead." -msgstr "2) Appuyez ensuite sur la nouvelle touche souhaitée." - -msgid "<< Back \\Back to the previous screen" -msgstr "<< Retour \\Retour au niveau précédent" - -msgid "<<< Sorry; mission failed >>>" -msgstr "<<< Désolé; mission échouée >>>" - -#, c-format -msgid "<<< Team %s finished! >>>" -msgstr "<<< L'équipe %s a terminé! >>>" - -#, c-format -msgid "<<< Team %s lost! >>>" -msgstr "<<< L'équipe %s a perdu! >>>" - -#, c-format -msgid "<<< Team %s recieved %d points >>>" -msgstr "<<< L'équipe %s a reçu %d points >>>" - -msgid "<<< Well done; mission accomplished >>>" -msgstr "<<< Bravo; mission terminée >>>" - -msgid "A label must be followed by \"for\"; \"while\"; \"do\" or \"switch\"" -msgstr "Un label ne peut se placer que devant un \"for\"; un \"while\"; un \"do\" ou un \"switch\"" - -msgid "A variable can not be declared twice" -msgstr "Redéfinition d'une variable" - -msgid "Abort\\Abort the current mission" -msgstr "Abandonner\\Abandonner la mission en cours" - -msgid "Access beyond array limit" -msgstr "Accès hors du tableau" - -msgid "Access to solution\\Shows the solution (detailed instructions for missions)" -msgstr "Accès à la solution\\Donne la solution (instructions détaillées pour la mission)" - -msgid "Access to solutions\\Show program \"4: Solution\" in the exercises" -msgstr "Accès aux solutions\\Programme \"4: Solution\" dans les exercices" - -msgid "Add new program" -msgstr "Ajouter un nouveau programme" - -msgid "Alien Queen" -msgstr "Pondeuse" - -msgid "Alien Queen killed" -msgstr "Pondeuse mortellement touchée" - -msgid "Already carrying something" -msgstr "Porte déjà quelque chose" - -msgid "Alternative camera mode\\Move sideways instead of rotating (in free camera)" -msgstr "Mode caméra alternatif\\Déplacements latéraux au lieu des rotations (pour une caméra libre)" - -msgid "Ambiguous call to overloaded function" -msgstr "Appel ambigu à une fonction surchargée" - -msgid "Analysis already performed" -msgstr "Analyse déjà effectuée" - -msgid "Analysis performed" -msgstr "Analyse terminée" - -msgid "Analyzes only organic matter" -msgstr "N'analyse que la matière organique" - -msgid "Anisotropy level\\Anisotropy level" -msgstr "Niveau d'anisotropie\\Niveau d'anisotropie" - -msgid "Ant" -msgstr "Fourmi" - -msgid "Ant fatally wounded" -msgstr "Fourmi mortellement touchée" - -msgid "Appearance\\Choose your appearance" -msgstr "Aspect\\Choisir votre aspect" - -msgid "Apply changes\\Activates the changed settings" -msgstr "Appliquer les changements\\Active les changements effectués" - -msgid "Appropriate constructor missing" -msgstr "Constructeur approprié manquant" - -msgid "Assignment impossible" -msgstr "Assignation impossible" - -msgid "Autolab" -msgstr "Laboratoire d'analyse de matières organiques" - -msgid "Automatic indent\\When program editing" -msgstr "Indentation automatique\\Pendant l'édition d'un programme" - -msgid "Autosave interval\\How often your game will autosave" -msgstr "Interval d'auto-sauvegarde\\À quels intervals les parties vont-t-elles êtres sauvegardées automatiquement" - -msgid "Autosave slots\\How many autosave slots you'll have" -msgstr "Nombre d'auto-sauvegardes\\Combien d'auto-sauvegarde seront conservées" - -msgid "Autosave\\Enables autosave" -msgstr "Auto-sauvegarde\\Activer l'auto-sauvegarde" - -msgid "Back" -msgstr "Page précédente" - -msgid "Background sound:\\Volume of audio tracks" -msgstr "Fond sonore :\\Volume des pistes audio" - -msgid "Backward (\\key down;)" -msgstr "Recule (\\key down;)" - -msgid "Backward\\Moves backward" -msgstr "Reculer\\Se déplacer en arrière" - -msgid "Bad argument for \"new\"" -msgstr "Mauvais argument pour \"new\"" - -msgid "Big indent\\Indent 2 or 4 spaces per level defined by braces" -msgstr "Grande indentation\\Indente avec 2 ou 4 espaces par niveau" - -msgid "Black box" -msgstr "Boîte noire" - -msgid "Blood\\Display blood when the astronaut is hit" -msgstr "Sang\\Afficher du sang quand le cosmonaute est touché" - -msgid "Blue" -msgstr "Bleue" - -# tocheck : for team (fem): bleue -# tocheck : for flag/pen/bot (masc): bleu -# + capital also to check -msgid "Blue flag" -msgstr "Drapeau bleu" - -msgid "Bot destroyed" -msgstr "Robot détruit" - -msgid "Bot factory" -msgstr "Fabrique de robots" - -msgid "Build a bot factory" -msgstr "Construire une fabrique de robots" - -msgid "Build a converter" -msgstr "Construire un convertisseur" - -msgid "Build a defense tower" -msgstr "Construire une tour" - -msgid "Build a derrick" -msgstr "Construire un derrick" - -msgid "Build a destroyer" -msgstr "Construire un destructeur" - -msgid "Build a exchange post" -msgstr "Construire une borne d'information" - -msgid "Build a legged grabber" -msgstr "Fabriquer un déménageur à pattes" - -msgid "Build a legged orga shooter" -msgstr "Fabriquer un tireur organique à pattes" - -msgid "Build a legged shooter" -msgstr "Fabriquer un tireur à pattes" - -msgid "Build a legged sniffer" -msgstr "Fabriquer un renifleur à pattes" - -msgid "Build a lightning conductor" -msgstr "Construire un paratonnerre" - -msgid "Build a nuclear power plant" -msgstr "Construire une centrale nucléaire" - -msgid "Build a phazer shooter" -msgstr "Fabriquer un robot canon à phases" - -msgid "Build a power cell factory" -msgstr "Construire une fabrique de piles" - -msgid "Build a power station" -msgstr "Construire une station de recharge" - -msgid "Build a radar station" -msgstr "Construire un radar" - -msgid "Build a recycler" -msgstr "Fabriquer un robot recycleur" - -msgid "Build a repair center" -msgstr "Construire un centre de réparation" - -msgid "Build a research center" -msgstr "Construire un centre de recherches" - -msgid "Build a shielder" -msgstr "Fabriquer un robot bouclier" - -msgid "Build a subber" -msgstr "Fabriquer un robot sous-marin" - -msgid "Build a thumper" -msgstr "Fabriquer un robot secoueur" - -msgid "Build a tracked grabber" -msgstr "Fabriquer un déménageur à chenilles" - -msgid "Build a tracked orga shooter" -msgstr "Fabriquer un tireur organique à chenilles" - -msgid "Build a tracked shooter" -msgstr "Fabriquer un tireur à chenilles" - -msgid "Build a tracked sniffer" -msgstr "Fabriquer un renifleur à chenilles" - -msgid "Build a wheeled grabber" -msgstr "Fabriquer un déménageur à roues" - -msgid "Build a wheeled orga shooter" -msgstr "Fabriquer un tireur organique à roues" - -msgid "Build a wheeled shooter" -msgstr "Fabriquer un tireur à roues" - -msgid "Build a wheeled sniffer" -msgstr "Fabriquer un renifleur à roues" - -msgid "Build a winged grabber" -msgstr "Fabriquer un déménageur volant" - -msgid "Build a winged orga shooter" -msgstr "Fabriquer un tireur organique volant" - -msgid "Build a winged shooter" -msgstr "Fabriquer un tireur volant" - -msgid "Build a winged sniffer" -msgstr "Fabriquer un renifleur volant" - -msgid "Build an autolab" -msgstr "Construire un laboratoire d'analyse de matières organiques" - -msgid "Building completed" -msgstr "Bâtiment terminé" - -msgid "Building destroyed" -msgstr "Bâtiment détruit" - -msgid "Button %1" -msgstr "Bouton %1" - -msgid "Calling an unknown function" -msgstr "Appel d'une fonction inexistante" - -msgid "Camera (\\key camera;)" -msgstr "Caméra (\\key camera;)" - -msgid "Camera back\\Moves the camera backward" -msgstr "Caméra plus loin\\Recule la caméra" - -msgid "Camera border scrolling\\Scrolling when the mouse touches right or left border" -msgstr "Défilement dans les bords\\Défilement lorsque la souris touche les bords gauche ou droite" - -msgid "Camera closer\\Moves the camera forward" -msgstr "Caméra plus proche\\Avance la caméra" - -msgid "Camera down\\Turns the camera down" -msgstr "Baisser caméra\\Baisse la caméra" - -msgid "Camera left\\Turns the camera left" -msgstr "Caméra à gauche\\Tourne la caméra vers la gauche" - -msgid "Camera right\\Turns the camera right" -msgstr "Caméra à droite\\Tourne la caméra vers la droite" - -msgid "Camera up\\Turns the camera up" -msgstr "Lever caméra\\Monte la caméra" - -msgid "Can not produce not researched object" -msgstr "Impossible de créer un objet n'ayant pas été recherché" - -msgid "Can not produce this object in this mission" -msgstr "Impossible de créer cet objet dans cette mission" - -msgid "Can't open file" -msgstr "Ouverture du fichier impossible" - -msgid "Cancel" -msgstr "Annuler" - -msgid "Cancel\\Cancel all changes" -msgstr "Annuler\\Annuler toutes les modifications" - -msgid "Challenges" -msgstr "Défis" - -msgid "Challenges in the chapter:" -msgstr "Liste des défis du chapitre :" - -msgid "Challenges\\Programming challenges" -msgstr "Défis\\Défis de programmation" - -msgid "Change camera\\Switches between onboard camera and following camera" -msgstr "Changement de caméra\\Autre de point de vue" - -msgid "Change player\\Change player" -msgstr "Autre joueur\\Choix du nom du joueur" - -msgid "Chapters:" -msgstr "Liste des chapitres :" - -msgid "Cheat console\\Show cheat console" -msgstr "Console de triche\\Montre la console de triche" - -msgid "Checkpoint" -msgstr "Indicateur" - -msgid "Class name expected" -msgstr "Nom de classe attendu" - -msgid "Climb\\Increases the power of the jet" -msgstr "Monter\\Augmenter la puissance du réacteur" - -msgid "Clone program" -msgstr "Dupliquer le programme" - -msgid "Clone selected program" -msgstr "Dupliquer le programme sélectionné" - -msgid "Close" -msgstr "Fermer" - -msgid "Closing bracket missing" -msgstr "Il manque une parenthèse fermante" - -#, fuzzy -msgid "Code battle" -msgstr "Batailles de code" - -msgid "Code battles" -msgstr "Batailles de code" - -msgid "Code battles\\Program your robot to be the best of them all!" -msgstr "Batailles de code\\Programmez votre robot pour être le meilleur entre tous!" - -msgid "Colobot rules!" -msgstr "Colobot est super!" - -msgid "Colobot: Gold Edition" -msgstr "Colobot: Édition Gold" - -msgid "Command line" -msgstr "Console de commande" - -msgid "Compilation ok (0 errors)" -msgstr "Compilation ok (0 erreur)" - -msgid "Compile" -msgstr "Compiler" - -msgid "Continue" -msgstr "Continuer" - -msgid "Continue\\Continue the current mission" -msgstr "Continuer\\Continuer la mission en cours" - -msgid "Controls\\Keyboard, joystick and mouse settings" -msgstr "Commandes\\Touches du clavier" - -msgid "Converts ore to titanium" -msgstr "Conversion de minerai en titane" - -msgid "Copy" -msgstr "Copier" - -msgid "Copy (Ctrl+C)" -msgstr "Copier (Ctrl+C)" - -msgid "Current mission saved" -msgstr "Enregistrement effectué" - -msgid "Custom levels:" -msgstr "Niveaux spéciaux :" - -msgid "Custom levels\\Levels from mods created by the users" -msgstr "Niveaux spéciaux\\Niveaux importés ou personnalisés" - -msgid "Customize your appearance" -msgstr "Personnalisation de votre apparence" - -msgid "Cut (Ctrl+X)" -msgstr "Couper (Ctrl+X)" - -msgid "Defense tower" -msgstr "Tour de défense" - -msgid "Delete mark" -msgstr "Supprimer la marque" - -msgid "Delete player\\Deletes the player from the list" -msgstr "Supprimer le joueur\\Supprimer le joueur de la liste" - -msgid "Delete\\Deletes the selected file" -msgstr "Supprimer\\Supprime l'enregistrement sélectionné" - -msgid "Derrick" -msgstr "Derrick" - -msgid "Descend\\Reduces the power of the jet" -msgstr "Descendre\\Diminuer la puissance du réacteur" - -msgid "Destroy" -msgstr "Détruire" - -msgid "Destroy the building" -msgstr "Démolit le bâtiment" - -msgid "Destroyer" -msgstr "Destructeur" - -msgid "Device\\Driver and resolution settings" -msgstr "Affichage\\Pilote et résolution d'affichage" - -msgid "Dividing by zero" -msgstr "Division par zéro" - -msgid "Do you really want to destroy the selected building?" -msgstr "Voulez-vous vraiment détruire le bâtiment sélectionné ?" - -#, c-format -msgid "Do you want to delete %s's saved games?" -msgstr "Voulez-vous détruire les sauvegardes de %s ?" - -msgid "Doors blocked by a robot or another object" -msgstr "Portes bloquées par un robot ou un objet" - -msgid "Down (\\key gdown;)" -msgstr "Descend (\\key gdown;)" - -msgid "Drawer bot" -msgstr "Robot dessinateur" - -msgid "Dust\\Dust and dirt on bots and buildings" -msgstr "Salissures\\Salissures des robots et bâtiments" - -msgid "Dynamic lighting\\Mobile light sources" -msgstr "Lumières dynamiques\\Éclairages mobiles" - -msgid "Dynamic shadows ++\\Dynamic shadows + self shadowing" -msgstr "Ombres dynamiques ++\\Active les ombres dynamiques et l'auto-ombrage" - -msgid "Dynamic shadows\\Beautiful shadows!" -msgstr "Ombres dynamiques\\Magnifiques ombres !" - -msgid "Edit the selected program" -msgstr "Éditer le programme sélectionné" - -msgid "Egg" -msgstr "Oeuf" - -msgid "End of block missing" -msgstr "Il manque la fin du bloc" - -msgid "Energy deposit (site for power station)" -msgstr "Emplacement pour une station de recharge ou une fabrique de pile" - -msgid "Energy level" -msgstr "Niveau d'énergie" - -msgid "Engineer" -msgstr "Technicien" - -msgid "Error in instruction move" -msgstr "Déplacement impossible" - -msgid "Execute the selected program" -msgstr "Exécute le programme sélectionné" - -msgid "Execute/stop" -msgstr "Démarrer/stopper" - -msgid "Exercises in the chapter:" -msgstr "Liste des exercices du chapitre :" - -msgid "Exercises\\Programming exercises" -msgstr "Programmation\\Exercices de programmation" - -msgid "Explode (\\key action;)" -msgstr "Détruire (\\key action;)" - -msgid "Explosive" -msgstr "Explosif" - -msgid "Expression expected after =" -msgstr "Expression attendue après =" - -msgid "Extend shield (\\key action;)" -msgstr "Déploie le bouclier (\\key action;)" - -msgid "Eyeglasses:" -msgstr "Lunettes :" - -msgid "Face type:" -msgstr "Type de visage :" - -msgid "File not open" -msgstr "Le fichier n'est pas ouvert" - -msgid "Filename:" -msgstr "Nom du fichier :" - -msgid "Film sequences\\Films before and after the missions" -msgstr "Séquences cinématiques\\Films avant ou après une mission" - -msgid "Finish" -msgstr "But/Objectif" - -# OBJECT_END : GoalArea -msgid "Fixed mine" -msgstr "Mine fixe" - -msgid "Flat ground not large enough" -msgstr "Sol plat pas assez grand" - -msgid "Fog\\Fog" -msgstr "Brouillard\\Nappes de brouillard" - -msgid "Folder:" -msgstr "Dossier:" - -#, c-format -msgid "Folder: %s" -msgstr "Dossier: %s" - -msgid "Font size" -msgstr "Taille des caractères" - -msgid "Forward" -msgstr "Page suivante" - -msgid "Forward (\\key up;)" -msgstr "Avance (\\key up;)" - -msgid "Forward\\Moves forward" -msgstr "Avancer\\Se déplacer en avant" - -msgid "Found a site for a derrick" -msgstr "Emplacement pour un derrick trouvé" - -msgid "Found a site for power station" -msgstr "Emplacement pour station de recharge ou fabrique de pile trouvé" - -msgid "Found key A (site for derrick)" -msgstr "Emplacement pour un derrick (clé A)" - -msgid "Found key B (site for derrick)" -msgstr "Emplacement pour un derrick (clé B)" - -msgid "Found key C (site for derrick)" -msgstr "Emplacement pour un derrick (clé C)" - -msgid "Found key D (site for derrick)" -msgstr "Emplacement pour un derrick (clé D)" - -msgid "Free game" -msgstr "Jeu libre" - -msgid "Free game on this planet:" -msgstr "Liste des jeux libres du chapitre :" - -msgid "Free game\\Free game without a specific goal" -msgstr "Jeu libre\\Jeu libre sans but précis" - -msgid "Full screen\\Full screen or window mode" -msgstr "Plein écran\\Plein écran ou fenêtré" - -msgid "Function already exists" -msgstr "Cette fonction existe déjà" - -msgid "Function name missing" -msgstr "Nom de la fonction attendu" - -msgid "Function needs return type \"void\"" -msgstr "La fonction a besoin de \"void\" en type de retour" - -msgid "Game speed" -msgstr "Vitesse du jeu" - -msgid "Game\\Game settings" -msgstr "Jeu\\Options de jouabilité" - -msgid "Gantry crane" -msgstr "Portique" - -msgid "Generating" -msgstr "Génération" - -msgid "Gold Edition development by:" -msgstr "Édition Gold développée par :" - -msgid "Goto: destination occupied" -msgstr "Goto: destination occupée" - -msgid "Goto: inaccessible destination" -msgstr "Goto: chemin introuvable" - -msgid "Grab or drop (\\key action;)" -msgstr "Prend ou dépose (\\key action;)" - -msgid "Graphics\\Graphics settings" -msgstr "Graphique\\Options graphiques" - -msgid "Green" -msgstr "Vert" - -msgid "Green flag" -msgstr "Drapeau vert" - -msgid "Ground not flat enough" -msgstr "Sol pas assez plat" - -msgid "Hair color:" -msgstr "Couleur des cheveux :" - -msgid "Head\\Face and hair" -msgstr "Tête\\Visage et cheveux" - -msgid "Help about selected object" -msgstr "Instructions sur la sélection" - -msgid "Help balloons\\Explain the function of the buttons" -msgstr "Bulles d'aide\\Bulles explicatives" - -msgid "Hex value out of range" -msgstr "Valeur hexadécimale impossible" - -#, fuzzy -msgid "Higher speed\\Doubles speed" -msgstr "Vitesse 2.0x\\Deux fois plus rapide" - -msgid "Highest\\Highest graphic quality (lowest frame rate)" -msgstr "Maxi\\Haute qualité (+ lent)" - -msgid "Home" -msgstr "Page initiale" - -msgid "Houston Mission Control" -msgstr "Centre de contrôle de Houston" - -msgid "Illegal object" -msgstr "Objet inaccessible" - -msgid "Impossible under water" -msgstr "Impossible sous l'eau" - -msgid "Impossible when carrying an object" -msgstr "Impossible en portant un objet" - -msgid "Impossible when flying" -msgstr "Impossible en vol" - -msgid "Impossible when moving" -msgstr "Impossible en mouvement" - -msgid "Impossible when swimming" -msgstr "Impossible en nageant" - -msgid "Inappropriate bot" -msgstr "Robot inadapté" - -msgid "Inappropriate cell type" -msgstr "Pas le bon type de pile" - -msgid "Inappropriate object" -msgstr "Pas le bon objet" - -msgid "Incorrect index type" -msgstr "Mauvais type d'index" - -msgid "Infected by a virus; temporarily out of order" -msgstr "Infecté par un virus; ne fonctionne plus temporairement" - -msgid "Information exchange post" -msgstr "Borne d'information" - -msgid "Instruction \"break\" outside a loop" -msgstr "Instruction \"break\" en dehors d'une boucle" - -msgid "Instruction \"case\" missing" -msgstr "Il manque l'instruction \"case\"" - -msgid "Instruction \"case\" outside a block \"switch\"" -msgstr "Instruction \"case\" en dehors d'un bloc \"switch\"" - -msgid "Instruction \"else\" without corresponding \"if\"" -msgstr "Instruction \"else\" sans \"if\" correspondant" - -msgid "Instructions (\\key help;)" -msgstr "Instructions (\\key help;)" - -msgid "Instructions after the final closing brace" -msgstr "Instructions après la dernière accolade fermante" - -msgid "Instructions for the mission (\\key help;)" -msgstr "Instructions sur la mission (\\key help;)" - -msgid "Instructions from Houston" -msgstr "Instructions de Houston" - -msgid "Instructions\\Shows the instructions for the current mission" -msgstr "Instructions mission\\Marche à suivre" - -msgid "Internal error - tell the developers" -msgstr "Erreur interne - contacter les développeurs" - -msgid "Invalid universal character name" -msgstr "Conversion invalide d'un caractère unicode en caractère UTF8" - -msgid "Invert\\Invert values on this axis" -msgstr "Inversion\\Inverse les valeurs sur cet axe" - -msgid "Jet temperature" -msgstr "Température du réacteur" - -msgid "Key A" -msgstr "Clé A" - -msgid "Key B" -msgstr "Clé B" - -msgid "Key C" -msgstr "Clé C" - -msgid "Key D" -msgstr "Clé D" - -msgid "Keyword \"while\" missing" -msgstr "Le mot-clé \"while\" est attendu" - -msgid "Keyword help(\\key cbot;)" -msgstr "Aide sur le mot-clé (\\key cbot;)" - -msgid "LOADING" -msgstr "CHARGEMENT" - -msgid "Legged grabber" -msgstr "Robot déménageur à pattes" - -msgid "Legged orga shooter" -msgstr "Robot tireur organique à pattes" - -msgid "Legged shooter" -msgstr "Robot tireur à pattes" - -msgid "Legged sniffer" -msgstr "Robot renifleur à pattes" - -msgid "Levels in this chapter:" -msgstr "Liste des niveaux du chapitre :" - -msgid "Lightning conductor" -msgstr "Paratonnerre" - -msgid "List of objects" -msgstr "Liste des objets" - -msgid "List of saved missions" -msgstr "Liste des missions enregistrées" - -msgid "Load a saved mission" -msgstr "Chargement d'une mission enregistrée" - -msgid "Load\\Load a saved mission" -msgstr "Charger\\Charger une mission enregistrée" - -msgid "Load\\Loads the selected mission" -msgstr "Charger\\Charger la mission sélectionnée" - -msgid "Loading basic level settings" -msgstr "Chargement des configurations de base du niveau" - -msgid "Loading finished!" -msgstr "Chargement terminé !" - -msgid "Loading music" -msgstr "Chargement de la musique" - -msgid "Loading objects" -msgstr "Chargement des objets" - -msgid "Loading terrain" -msgstr "Chargement du terrain" - -# msgid "Speed 0.5x\\Half speed" -# msgstr "" -# msgid "Speed 1.0x\\Normal speed" -# msgstr "" -# msgid "Speed 1.5x\\1.5 times faster" -# msgstr "" -# msgid "Speed 2.0x\\Double speed" -# msgstr "" -# msgid "Speed 3.0x\\Triple speed" -# msgstr "" -# msgid "Speed 4.0x\\Quadruple speed" -# msgstr "" -# msgid "Speed 6.0x\\Sextuple speed" -# msgstr "" -msgid "Lower speed\\Decrease speed by half" -msgstr "Moins rapide\\Diminuer la vitesse de moitié" - -msgid "Lowest\\Minimum graphic quality (highest frame rate)" -msgstr "Mini\\Qualité minimale (+ rapide)" - -msgid "Lunar Roving Vehicle" -msgstr "Véhicule d'exploration lunaire" - -msgid "MSAA\\Multisample anti-aliasing" -msgstr "ACME\\Anticrénelage multiéchantillon" - -msgid "Maximize" -msgstr "Taille maximale" - -msgid "Minimize" -msgstr "Taille réduite" - -msgid "Mipmap level\\Mipmap level" -msgstr "Niveau de MIP mapping\\Niveau de MIP mapping" - -msgid "Missing end quote" -msgstr "La quote de fin est manquante" - -msgid "Missing hex digits after escape sequence" -msgstr "Valeur hexadécimale manquante après la séquence d'échappement" - -msgid "Mission name" -msgstr "Nom de la mission" - -msgid "Missions" -msgstr "Missions" - -msgid "Missions on this planet:" -msgstr "Liste des missions du chapitre :" - -msgid "Missions\\Select mission" -msgstr "Missions\\La grande aventure" - -msgid "Mouse inversion X\\Inversion of the scrolling direction on the X axis" -msgstr "Inversion souris X\\Inversion de la rotation lorsque la souris touche un bord" - -msgid "Mouse inversion Y\\Inversion of the scrolling direction on the Y axis" -msgstr "Inversion souris Y\\Inversion de la rotation lorsque la souris touche un bord" - -msgid "Move selected program down" -msgstr "Déplace le programme sélectionné vers le bas" - -msgid "Move selected program up" -msgstr "Déplace le programme sélectionné vers le haut" - -msgid "Mute\\No sound" -msgstr "Silencieux\\Totalement silencieux" - -msgid "Name:" -msgstr "Nom:" - -msgid "Negative value rejected by \"throw\"" -msgstr "Valeur négative refusée pour \"throw\"" - -msgid "Nest" -msgstr "Nid" - -msgid "New" -msgstr "Nouveau" - -msgid "New ..." -msgstr "Nouveau ..." - -msgid "New bot available" -msgstr "Nouveau robot disponible" - -msgid "Next" -msgstr "Suivant" - -msgid "Next object\\Selects the next object" -msgstr "Sélectionner l'objet suivant\\Sélectionner l'objet suivant" - -msgid "No" -msgstr "Non" - -msgid "No energy in the subsoil" -msgstr "Pas d'énergie en sous-sol" - -msgid "No flag nearby" -msgstr "Aucun drapeau à proximité" - -msgid "No function running" -msgstr "Pas de fonction en exécution" - -msgid "No function with this name accepts this kind of parameter" -msgstr "Aucune fonction de ce nom n'accepte ce(s) type(s) de paramètre(s)" - -msgid "No function with this name accepts this number of parameters" -msgstr "Aucune fonction de ce nom n'accepte ce nombre de paramètres" - -msgid "No information exchange post within range" -msgstr "Pas de borne d'information accessible" - -msgid "No more energy" -msgstr "Plus d'énergie" - -msgid "No ore in the subsoil" -msgstr "Pas de minerai en sous-sol" - -msgid "No power cell" -msgstr "Pas de pile" - -msgid "No titanium" -msgstr "Pas de titane" - -msgid "No titanium around" -msgstr "Pas de titane accessible" - -msgid "No titanium ore to convert" -msgstr "Pas de minerai de titane à convertir" - -msgid "No titanium to transform" -msgstr "Pas de titane à transformer" - -msgid "No uranium to transform" -msgstr "Pas de minerai d'uranium à transformer" - -msgid "No userlevels installed!" -msgstr "Pas de niveaux spéciaux installés !" - -msgid "Non-void function needs \"return;\"" -msgstr "Les fonctions avec retour autre que void doivent comporter l'instruction \"return;\"" - -msgid "Normal size" -msgstr "Taille normale" - -msgid "Normal\\Normal graphic quality" -msgstr "Normal\\Qualité standard" - -msgid "Normal\\Normal sound volume" -msgstr "Normal\\Niveaux normaux" - -msgid "Not enough energy" -msgstr "Pas assez d'énergie" - -msgid "Not enough energy yet" -msgstr "Pas encore assez d'énergie" - -msgid "Not found anything to destroy" -msgstr "Rien trouvé à détruire" - -msgid "Nothing to analyze" -msgstr "Rien à analyser" - -msgid "Nothing to drop" -msgstr "Rien à déposer" - -msgid "Nothing to grab" -msgstr "Rien à prendre" - -msgid "Nothing to recycle" -msgstr "Rien à recycler" - -msgid "Nuclear power cell" -msgstr "Pile nucléaire" - -msgid "Nuclear power cell available" -msgstr "Pile nucléaire disponible" - -msgid "Nuclear power station" -msgstr "Centrale nucléaire" - -msgid "Number missing" -msgstr "Un nombre est attendu" - -msgid "Number of insects detected" -msgstr "Nombre d'insectes détectés" - -msgid "Number of particles\\Explosions, dust, reflections, etc." -msgstr "Quantité de particules\\Explosions, poussières, reflets, etc." - -msgid "OK" -msgstr "D'accord" - -msgid "OK\\Choose the selected player" -msgstr "D'accord\\Choisir le joueur" - -msgid "OK\\Close program editor and return to game" -msgstr "D'accord\\Compiler le programme" - -msgid "Object too close" -msgstr "Objet trop proche" - -msgid "Octal value out of range" -msgstr "Valeur octale impossible" - -msgid "One step" -msgstr "Un pas" - -msgid "Open" -msgstr "Ouvrir" - -msgid "Open (Ctrl+O)" -msgstr "Ouvrir (Ctrl+O)" - -msgid "Opening brace missing" -msgstr "Début d'un bloc attendu" - -msgid "Opening bracket missing" -msgstr "Une parenthèse ouvrante est attendue" - -msgid "Operation impossible with value \"nan\"" -msgstr "Opération sur un \"nan\"" - -msgid "Options" -msgstr "Options" - -msgid "Options\\Preferences" -msgstr "Options\\Réglages" - -msgid "Organic matter" -msgstr "Matière organique" - -msgid "Origin of last message\\Shows where the last message was sent from" -msgstr "Montrer le lieu d'un message\\Montrer le lieu du dernier message" - -msgid "Original game developed by:" -msgstr "Jeu original développé par :" - -msgid "Parameters missing" -msgstr "Pas assez de paramètres" - -msgid "Particles in the interface\\Steam clouds and sparks in the interface" -msgstr "Particules dans l'interface\\Pluie de particules" - -msgid "Paste (Ctrl+V)" -msgstr "Coller (Ctrl+V)" - -msgid "Pause blur\\Blur the background on the pause screen" -msgstr "Flouter les pauses\\Floute le fond de l'écran de pause" - -msgid "Pause in background\\Pause the game when the window is unfocused" -msgstr "Pause en arrière-plan\\Met le jeu en pause quand la fenêtre n'a plus le focus" - -msgid "Pause/continue" -msgstr "Pause/continuer" - -msgid "Pause\\Pause the game without opening menu" -msgstr "Pause\\Mettre le jeu en pause sans ouvrir le menu" - -msgid "Phazer shooter" -msgstr "Robot canon à phases" - -msgid "Photography" -msgstr "Vue de la mission" - -msgid "Place occupied" -msgstr "Emplacement occupé" - -msgid "Planets:" -msgstr "Liste des planètes :" - -msgid "Plans for defense tower available" -msgstr "Construction d'une tour de défense possible" - -msgid "Plans for nuclear power plant available" -msgstr "Construction d'une centrale nucléaire possible" - -msgid "Plans for phazer shooter available" -msgstr "Fabrication des robots canon à phases possible" - -msgid "Plans for shielder available" -msgstr "Fabrication d'un robot bouclier possible" - -msgid "Plans for shooter available" -msgstr "Fabrication des robots tireurs possible" - -msgid "Plans for thumper available" -msgstr "Fabrication d'un robot secoueur possible" - -msgid "Plans for tracked robots available" -msgstr "Fabrication des robots à chenilles possible" - -msgid "Plant a flag" -msgstr "Pose un drapeau de couleur" - -msgid "Play\\Start mission!" -msgstr "Jouer ...\\Démarrer l'action!" - -msgid "Player" -msgstr "Joueur" - -msgid "Player name" -msgstr "Nom du joueur" - -msgid "Player's name" -msgstr "Nom du joueur" - -msgid "Power cell" -msgstr "Pile normale" - -msgid "Power cell available" -msgstr "Pile disponible" - -msgid "Power cell factory" -msgstr "Fabrique de piles" - -msgid "Power station" -msgstr "Station de recharge" - -msgid "Practice bot" -msgstr "Robot d'entraînement" - -msgid "Press \\key help; to read instructions on your SatCom" -msgstr "Consultez votre SatCom en appuyant sur \\key help;" - -msgid "Previous" -msgstr "Précédent" - -msgid "Previous object\\Selects the previous object" -msgstr "Sélection précédente\\Sélectionne l'objet précédent" - -msgid "Previous selection (\\key desel;)" -msgstr "Sélection précédente (\\key desel;)" - -msgid "Private element" -msgstr "Elément protégé (privé)" - -msgid "Private\\Private folder" -msgstr "Privé\\Dossier privé" - -msgid "Processing level file" -msgstr "Analyse du fichier de niveau" - -msgid "Program cloned" -msgstr "Programme dupliqué" - -msgid "Program editor" -msgstr "Édition du programme" - -msgid "Program finished" -msgstr "Programme terminé" - -msgid "Program infected by a virus" -msgstr "Un programme est infecté par un virus" - -msgid "Programming exercises" -msgstr "Programmation" - -msgid "Programming help" -msgstr "Aide à la programmation" - -msgid "Programming help (\\key prog;)" -msgstr "Aide à la programmation (\\key prog;)" - -msgid "Programming help\\Gives more detailed help with programming" -msgstr "Instructions programmation\\Explication sur la programmation" - -msgid "Programs dispatched by Houston" -msgstr "Programmes envoyés par Houston" - -msgid "Public required" -msgstr "Public requis" - -msgid "Public\\Common folder" -msgstr "Public\\Dossier commun à tous les joueurs" - -msgid "Quake at explosions\\The screen shakes at explosions" -msgstr "Secousses lors d'explosions\\L'écran vibre lors d'une explosion" - -msgid "Quick load\\Immediately load game" -msgstr "Chargement rapide\\Chargement direct d'une sauvegarde" - -msgid "Quick save\\Immediately save game" -msgstr "Sauvegarde rapide\\Sauvegarde direct" - -#, fuzzy -msgid "Quicksave slot not found" -msgstr "Objet n'existe pas" - -msgid "Quit\\Quit Colobot: Gold Edition" -msgstr "Quitter\\Quitter Colobot : Édition Gold" - -msgid "Quit\\Quit the current mission or exercise" -msgstr "Quitter la mission en cours\\Terminer un exercice ou une mssion" - -msgid "Radar station" -msgstr "Radar" - -msgid "Read error" -msgstr "Erreur à la lecture" - -msgid "Recorder" -msgstr "Enregistreur" - -msgid "Recycle (\\key action;)" -msgstr "Recycle (\\key action;)" - -msgid "Recycler" -msgstr "Robot recycleur" - -msgid "Red" -msgstr "Rouge" - -# toCheck : capital (for team?) -msgid "Red flag" -msgstr "Drapeau rouge" - -msgid "Reflections on the buttons \\Shiny buttons" -msgstr "Reflets sur les boutons\\Boutons brillants" - -msgid "Remains of Apollo mission" -msgstr "Vestige d'une mission Apollo" - -msgid "Remove a flag" -msgstr "Enlève un drapeau" - -msgid "Remove selected program" -msgstr "Supprimer le programme sélectionné" - -msgid "Render distance\\Maximum visibility" -msgstr "Profondeur de champ\\Distance de vue maximale " - -msgid "Repair center" -msgstr "Centre de réparation" - -msgid "Research center" -msgstr "Centre de recherches" - -msgid "Research program already performed" -msgstr "Recherche déjà effectuée" - -msgid "Research program completed" -msgstr "Recherche terminée" - -msgid "Reserved keyword of CBOT language" -msgstr "Ce mot-clé est réservé au langage CBOT" - -msgid "Resolution" -msgstr "Résolution" - -msgid "Resolution:" -msgstr "Résolutions :" - -msgid "Resources" -msgstr "Ressources" - -msgid "Restart\\Restart the mission from the beginning" -msgstr "Recommencer\\Recommencer la mission au début" - -msgid "Restoring CBot execution state" -msgstr "Restaurer l'état d'exécution CBOT" - -msgid "Restoring saved objects" -msgstr "Restaurer des objets sauvés" - -msgid "Results" -msgstr "Résultats" - -msgid "Return to start" -msgstr "Remet au départ" - -msgid "Robbie" -msgstr "Robbie" - -msgid "Ruin" -msgstr "Bâtiment en ruine" - -msgid "Run research program for defense tower" -msgstr "Recherche la tour de défense" - -msgid "Run research program for legged bots" -msgstr "Recherche du fonctionnement des pattes" - -msgid "Run research program for nuclear power" -msgstr "Recherche du programme nucléaire" - -msgid "Run research program for orga shooter" -msgstr "Recherche le canon organique" - -msgid "Run research program for phazer shooter" -msgstr "Recherche le canon à phases" - -msgid "Run research program for shielder" -msgstr "Recherche le bouclier" - -msgid "Run research program for shooter" -msgstr "Recherche le canon de tir" - -msgid "Run research program for thumper" -msgstr "Recherche le secoueur" - -msgid "Run research program for tracked bots" -msgstr "Recherche du fonctionnement des chenilles" - -msgid "Run research program for winged bots" -msgstr "Recherche du fonctionnement du jet" - -msgid "SatCom" -msgstr "SatCom" - -msgid "Satellite report" -msgstr "Rapport du satellite" - -msgid "Save" -msgstr "Enregistrer" - -msgid "Save (Ctrl+S)" -msgstr "Enregistrer (Ctrl+S)" - -msgid "Save the current mission" -msgstr "Enregistrement de la mission en cours" - -msgid "Save\\Save the current mission" -msgstr "Enregistrer\\Enregistrer la mission en cours" - -msgid "Save\\Saves the current mission" -msgstr "Enregistrer\\Enregistrer la mission en cours" - -msgid "Select the astronaut\\Selects the astronaut" -msgstr "Sélectionner le cosmonaute\\Sélectionner le cosmonaute" - -msgid "Semicolon terminator missing" -msgstr "Terminateur point-virgule non trouvé" - -msgid "Shadow resolution\\Higher means better range and quality, but slower" -msgstr "Résolution des ombres\\Plus grand implique une meilleure qualité et amplitude, mais plus lent" - -msgid "Shield level" -msgstr "Niveau du bouclier" - -msgid "Shield radius" -msgstr "Rayon du bouclier" - -msgid "Shielder" -msgstr "Robot bouclier" - -msgid "Shoot (\\key action;)" -msgstr "Tir (\\key action;)" - -msgid "Show if the ground is flat" -msgstr "Montre si le sol est plat" - -msgid "Show the place" -msgstr "Montre l'endroit" - -msgid "Show the range" -msgstr "Montre le rayon d'action" - -msgid "Show the solution" -msgstr "Donne la solution" - -msgid "Sign \" : \" missing" -msgstr "Séparateur \" : \" attendu" - -msgid "Simple shadows\\Shadows spots on the ground" -msgstr "Ombres simples\\Ombres projetées au sol" - -msgid "Size 1" -msgstr "Taille 1" - -msgid "Size 2" -msgstr "Taille 2" - -msgid "Size 3" -msgstr "Taille 3" - -msgid "Size 4" -msgstr "Taille 4" - -msgid "Size 5" -msgstr "Taille 5" - -msgid "Sniff (\\key action;)" -msgstr "Cherche (\\key action;)" - -msgid "Solution" -msgstr "Solution" - -msgid "Sound effects:\\Volume of engines, voice, shooting, etc." -msgstr "Sons :\\Volume des moteurs, voix, etc." - -msgid "Sound\\Music and game sound volume" -msgstr "Son\\Volumes des sons & musiques" - -msgid "Spaceship" -msgstr "Vaisseau spatial" - -msgid "Spaceship ruin" -msgstr "Epave de vaisseau spatial" - -msgid "Spider" -msgstr "Araignée" - -msgid "Spider fatally wounded" -msgstr "Araignée mortellement touchée" - -msgid "Stack overflow" -msgstr "Débordement de la pile" - -msgid "Standard action\\Standard action of the bot (take/grab, shoot, sniff, etc)" -msgstr "Action standard\\Action du bouton avec le cadre rouge" - -msgid "Standard controls\\Standard key functions" -msgstr "Tout réinitialiser\\Remet toutes les touches standards" - -msgid "Standard speed\\Reset speed to normal" -msgstr "Vitesse standard\\Réinitialiser la vitesse à la normale" - -msgid "Standard\\Standard appearance settings" -msgstr "Standard\\Remet les couleurs standards" - -msgid "Start" -msgstr "Départ" - -msgid "Starting..." -msgstr "Lancement..." - -msgid "Still working ..." -msgstr "Travail en cours ..." - -msgid "String missing" -msgstr "Une chaîne de caractère est attendue" - -msgid "Strip color:" -msgstr "Couleur des bandes :" - -msgid "Subber" -msgstr "Robot sous-marin" - -msgid "Suit color:" -msgstr "Couleur de la combinaison :" - -msgid "Suit\\Astronaut suit" -msgstr "Corps\\Combinaison" - -msgid "Summary:" -msgstr "Résumé :" - -msgid "Survival kit" -msgstr "Sac de survie" - -msgid "Switch bots <-> buildings" -msgstr "Permute robots <-> bâtiments" - -msgid "Take off to finish the mission" -msgstr "Décolle pour terminer la mission" - -msgid "Target" -msgstr "Cible" - -msgid "Target bot" -msgstr "Cible d'entraînement" - -msgid "Terrain relief" -msgstr "Relief du terrain" - -msgid "Texture filtering\\Texture filtering" -msgstr "Filtrage de textures\\Filtrage de textures" - -msgid "Textures" -msgstr "Textures" - -msgid "The battle has ended" -msgstr "La bataille est terminée" - -msgid "The expression must return a boolean value" -msgstr "L'expression doit être un boolean" - -msgid "The function returned no value" -msgstr "La fonction n'a pas retourné de résultat" - -msgid "The mission is not accomplished yet (press \\key help; for more details)" -msgstr "La mission n'est pas terminée (appuyez sur \\key help; pour plus de détails)" - -msgid "The types of the two operands are incompatible" -msgstr "Les deux opérandes ne sont pas de types compatibles" - -msgid "This class already exists" -msgstr "Cette classe existe déjà" - -msgid "This class does not exist" -msgstr "Cette classe n'existe pas" - -msgid "This is example code that cannot be run directly" -msgstr "Ce code d'exemple ne peut pas être lancé directement" - -msgid "This is not a member of this class" -msgstr "Cet élément n'existe pas dans cette classe" - -msgid "This label does not exist" -msgstr "Cette étiquette n'existe pas" - -msgid "This menu is for userlevels from mods, but you didn't install any" -msgstr "Ce menu donne accès aux niveaux spéciaux (importés ou personnalisés), mais aucun n'est installé." - -msgid "This object is currently busy" -msgstr "Cet élément est actuellement occupé" - -msgid "This object is not a member of a class" -msgstr "L'objet n'est pas une instance d'une classe" - -msgid "This parameter needs a default value" -msgstr "Ce paramètre nécessite une valeur par défaut" - -msgid "This program is read-only, clone it to edit" -msgstr "Ce programme est en lecture-seule, le dupliquer pour pouvoir le modifier" - -msgid "Thump (\\key action;)" -msgstr "Secoue (\\key action;)" - -msgid "Thumper" -msgstr "Robot secoueur" - -#, c-format -msgid "Time: %s" +"X-Generator: Translate Toolkit 1.11.0\n" + +#. type: Title-text +#: ../scene.txt:1 +#, no-wrap +msgid "Massacre" +msgstr "Massacre" + +#. type: Resume-text +#: ../scene.txt:2 +#, no-wrap +msgid "Use a loop in order to destroy six targets." +msgstr "Détruire six cibles à l'aide d'une boucle." + +#. type: ScriptName-text +#: ../scene.txt:3 +#, no-wrap +msgid "Go" +msgstr "Go" + +#. type: \b; header +#: ../help/help.E.txt:1 +#, no-wrap +msgid "Exercise" msgstr "" -msgid "Titanium" -msgstr "Titane" - -msgid "Titanium available" -msgstr "Titane disponible" - -msgid "Titanium deposit (site for derrick)" -msgstr "Emplacement pour un derrick (minerai de titane)" - -msgid "Titanium ore" -msgstr "Minerai de titane" - -msgid "Titanium too close" -msgstr "Titane trop proche" - -msgid "Titanium too far away" -msgstr "Titane trop loin" - -msgid "Too close to a building" -msgstr "Trop proche d'un bâtiment" - -msgid "Too close to an existing flag" -msgstr "Trop proche d'un drapeau existant" - -msgid "Too close to space ship" -msgstr "Trop proche du vaisseau spatial" - -msgid "Too many flags of this color (maximum 5)" -msgstr "Trop de drapeaux de cette couleur (maximum 5)" - -msgid "Too many parameters" -msgstr "Trop de paramètres" - -msgid "Tracked grabber" -msgstr "Robot déménageur à chenilles" - -msgid "Tracked orga shooter" -msgstr "Robot tireur organique à chenilles" - -msgid "Tracked shooter" -msgstr "Robot tireur à chenilles" - -msgid "Tracked sniffer" -msgstr "Robot renifleur à chenilles" - -msgid "Transforms only titanium" -msgstr "Ne transforme que le titane" - -msgid "Transforms only uranium" -msgstr "Ne transforme que le minerai d'uranium" - -msgid "Transmitted information" -msgstr "Informations diffusées" - -msgid "Turn left (\\key left;)" -msgstr "Tourne à gauche (\\key left;)" - -msgid "Turn left\\turns the bot to the left" -msgstr "Tourner à gauche\\Moteur à gauche" - -msgid "Turn right (\\key right;)" -msgstr "Tourne à droite (\\key right;)" - -msgid "Turn right\\turns the bot to the right" -msgstr "Tourner à droite\\Moteur à droite" - -msgid "Type declaration missing" -msgstr "Déclaration de type attendu" - -msgid "Unable to control enemy objects" -msgstr "Impossible de contrôler les objets ennemis" - -msgid "Undo (Ctrl+Z)" -msgstr "Annuler (Ctrl+Z)" - -msgid "Unit" -msgstr "Unité" - -msgid "Unknown Object" -msgstr "Objet inconnu" - -msgid "Unknown command" -msgstr "Commande inconnue" - -msgid "Unknown escape sequence" +#. type: Plain text +#: ../help/help.E.txt:2 +#, no-wrap +msgid "Destroy the six targets with a program using a loop. The bot must move 5m forward to get from one target to the next." msgstr "" -msgid "Unknown function" -msgstr "Routine inconnue" - -msgid "Up (\\key gup;)" -msgstr "Monte (\\key gup;)" - -msgid "Uranium deposit (site for derrick)" -msgstr "Emplacement pour un derrick (minerai d'uranium)" - -msgid "Uranium ore" -msgstr "Minerai d'uranium" - -msgid "User levels" -msgstr "Niveaux supplémentaires" - -msgid "Variable name missing" -msgstr "Nom d'une variable attendu" - -msgid "Variable not declared" -msgstr "Variable non déclarée" - -msgid "Variable not initialized" -msgstr "Variable non initialisée" - -msgid "Vault" -msgstr "Coffre-fort" - -msgid "Violet flag" -msgstr "Drapeau violet" - -msgid "Void parameter" -msgstr "Paramètre void" - -msgid "Wasp" -msgstr "Guêpe" - -msgid "Wasp fatally wounded" -msgstr "Guêpe mortellement touchée" - -msgid "Waste" -msgstr "Déchet" - -msgid "Wheeled grabber" -msgstr "Robot déménageur à roues" - -msgid "Wheeled orga shooter" -msgstr "Robot tireur organique à roues" - -msgid "Wheeled shooter" -msgstr "Robot tireur à roues" - -msgid "Wheeled sniffer" -msgstr "Robot renifleur à roues" - -msgid "Winged grabber" -msgstr "Robot déménageur volant" - -msgid "Winged orga shooter" -msgstr "Robot tireur organique volant" - -msgid "Winged shooter" -msgstr "Robot tireur volant" - -msgid "Winged sniffer" -msgstr "Robot renifleur volant" - -msgid "Withdraw shield (\\key action;)" -msgstr "Refermer le bouclier (\\key action;)" - -msgid "Worm" -msgstr "Ver" - -msgid "Worm fatally wounded" -msgstr "Ver mortellement touché" - -msgid "Wreckage" -msgstr "Epave de robot" - -msgid "Write error" -msgstr "Erreur lors de l'écriture" - -msgid "Wrong type for the assignment" -msgstr "Mauvais type de résultat pour l'assignation" - -msgid "Yellow flag" -msgstr "Drapeau jaune" - -msgid "Yes" -msgstr "Oui" - -msgid "You can fly with the keys (\\key gup;) and (\\key gdown;)" -msgstr "Il est possible de voler avec les touches (\\key gup;) et (\\key gdown;)" - -msgid "You can not carry a radioactive object" -msgstr "Vous ne pouvez pas transporter un objet radioactif" - -msgid "You can not carry an object under water" -msgstr "Vous ne pouvez pas transporter un objet sous l'eau" - -#, c-format -msgid "You cannot use \"%s\" in this exercise (used: %d)" -msgstr "Vous ne pouvez pas utiliser «%s» dans cet exercice (utilisé : %d)" - -msgid "You found a usable object" -msgstr "Vous avez trouvé un objet utilisable" - -#, c-format -msgid "You have to use \"%1$s\" at least once in this exercise (used: %2$d)" -msgid_plural "You have to use \"%1$s\" at least %3$d times in this exercise (used: %2$d)" -msgstr[0] "Vous devez utiliser «%1$s» au moins une fois dans cet exercice (utilisé %2$d fois)" -msgstr[1] "Vous devez utiliser «%1$s» au moins %3$d fois dans cet exercice (utilisé %2$d fois)" - -#, c-format -msgid "You have to use \"%1$s\" at most once in this exercise (used: %2$d)" -msgid_plural "You have to use \"%1$s\" at most %3$d times in this exercise (used: %2$d)" -msgstr[0] "Vous devez utiliser «%1$s» au plus une fois dans cet exercice (utilisé %2$d fois)" -msgstr[1] "Vous devez utiliser «%1$s» au plus %3$d fois dans cet exercice (utilisé %2$d fois)" - -msgid "You must get on the spaceship to take off" -msgstr "Vous devez embarquer pour pouvoir décoller" - -msgid "Zoom mini-map" -msgstr "Zoom mini-carte" - -msgid "\\Blue flags" -msgstr "\\Drapeaux bleus" - -msgid "\\Eyeglasses 1" -msgstr "\\Lunettes 1" - -msgid "\\Eyeglasses 2" -msgstr "\\Lunettes 2" - -msgid "\\Eyeglasses 3" -msgstr "\\Lunettes 3" - -msgid "\\Eyeglasses 4" -msgstr "\\Lunettes 4" - -msgid "\\Eyeglasses 5" -msgstr "\\Lunettes 5" - -msgid "\\Face 1" -msgstr "\\Visage 1" - -msgid "\\Face 2" -msgstr "\\Visage 2" - -msgid "\\Face 3" -msgstr "\\Visage 3" - -msgid "\\Face 4" -msgstr "\\Visage 4" - -msgid "\\Green flags" -msgstr "\\Drapeaux verts" - -msgid "\\New player name" -msgstr "\\Nom du joueur à créer" - -msgid "\\No eyeglasses" -msgstr "\\Pas de lunettes" - -msgid "\\Raise the pencil" -msgstr "\\Relève le crayon" - -msgid "\\Red flags" -msgstr "\\Drapeaux rouges" - -msgid "\\Return to Colobot: Gold Edition" -msgstr "\\Revenir à Colobot : Édition Gold" - -msgid "\\SatCom on standby" -msgstr "\\Mettre le SatCom en veille" - -msgid "\\Start recording" -msgstr "\\Démarre l'enregistrement" - -msgid "\\Stop recording" -msgstr "\\Stoppe l'enregistrement" - -msgid "\\Turn left" -msgstr "\\Rotation à gauche" - -msgid "\\Turn right" -msgstr "\\Rotation à droite" - -msgid "\\Use the black pencil" -msgstr "\\Abaisse le crayon noir" - -msgid "\\Use the blue pencil" -msgstr "\\Abaisse le crayon bleu" - -msgid "\\Use the brown pencil" -msgstr "\\Abaisse le crayon brun" - -msgid "\\Use the green pencil" -msgstr "\\Abaisse le crayon vert" - -msgid "\\Use the orange pencil" -msgstr "\\Abaisse le crayon orange" - -msgid "\\Use the purple pencil" -msgstr "\\Abaisse le crayon violet" - -msgid "\\Use the red pencil" -msgstr "\\Abaisse le crayon rouge" - -msgid "\\Use the yellow pencil" -msgstr "\\Abaisse le crayon jaune" - -msgid "\\Violet flags" -msgstr "\\Drapeaux violets" - -msgid "\\Yellow flags" -msgstr "\\Drapeaux jaunes" - -msgid "colobot.info" -msgstr "colobot.info" - -msgid "epsitec.com" -msgstr "epsitec.com" - -#~ msgid " " -#~ msgstr " " - -#~ msgid " Drivers:" -#~ msgstr " Pilotes :" - -#~ msgid " Missions on this level:" -#~ msgstr " Missions du niveau :" - -#~ msgid "\"%s\" missing in this exercise" -#~ msgstr "Il manque \"%s\" dans le programme" - -#~ msgid "3D sound\\3D positioning of the sound" -#~ msgstr "Bruitages 3D\\Positionnement sonore dans l'espace" - -#~ msgid "Building too close" -#~ msgstr "Bâtiment trop proche" - -#~ msgid "COLOBOT" -#~ msgstr "COLOBOT" - -#~ msgid "Camera awayest" -#~ msgstr "Caméra plus loin" - -#~ msgid "Camera down\\Decrease camera angle while visiting message origin" -#~ msgstr "Caméra plus basse\\Réduit l'angle de caméra lors de la vue de l'origine des messages" - -#~ msgid "Camera nearest" -#~ msgstr "Caméra plus proche" - -#~ msgid "Camera to left" -#~ msgstr "Caméra à gauche" - -#~ msgid "Camera to right" -#~ msgstr "Caméra à droite" - -#~ msgid "Camera up\\Increase camera angle while visiting message origin" -#~ msgstr "Caméra plus haute\\Augmente l'angle de caméra lors de la vue de l'origine des messages" - -#~ msgid "Can not create this; there are too many objects" -#~ msgstr "Création impossible; il y a trop d'objets" - -#~ msgid "Cancel\\Keep current player name" -#~ msgstr "Annuler\\Conserver le joueur actuel" - -#~ msgid "Checkpoint crossed" -#~ msgstr "Indicateur atteint" - -#~ msgid "Compass" -#~ msgstr "Boussole" - -#~ msgid "Continue\\Continue the game" -#~ msgstr "Continuer\\Continuer de jouer" - -#~ msgid "Delete" -#~ msgstr "Détruire" - -#~ msgid "Details\\Visual quality of 3D objects" -#~ msgstr "Détails des objets\\Qualité des objets en 3D" - -#~ msgid "Developed by :" -#~ msgstr "Développé par :" - -#~ msgid "Do you want to quit Colobot: Gold Edition?" -#~ msgstr "Voulez-vous quitter Colobot: Édition Gold ?" - -#~ msgid "Exit film\\Film at the exit of exercises" -#~ msgstr "Retour animé\\Retour animé dans les exercices" - -#~ msgid "Friendly fire\\Your shooting can damage your own objects " -#~ msgstr "Dégâts à soi-même\\Vos tirs infligent des dommages à vos unités" - -#~ msgid "Ground inappropriate" -#~ msgstr "Terrain inadapté" - -#~ msgid "Key word help\\More detailed help about key words" -#~ msgstr "Instructions mot-clé\\Explication sur le mot-clé" - -#~ msgid "Marks on the ground\\Marks on the ground" -#~ msgstr "Marques sur le sol\\Marques dessinées sur le sol" - -#~ msgid "Mouse shadow\\Gives the mouse a shadow" -#~ msgstr "Souris ombrée\\Jolie souris avec une ombre" - -#~ msgid "No other robot" -#~ msgstr "Pas d'autre robot" - -#~ msgid "Not yet enough energy" -#~ msgstr "Pas encore assez d'énergie" - -#~ msgid "Num of decorative objects\\Number of purely ornamental objects" -#~ msgstr "Nb d'objets décoratifs\\Qualité d'objets non indispensables" - -#~ msgid "Planets and stars\\Astronomical objects in the sky" -#~ msgstr "Planètes et étoiles\\Motifs mobiles dans le ciel" - -#~ msgid "Quit the mission?" -#~ msgstr "Quitter la mission ?" - -#~ msgid "Quit\\Quit COLOBOT" -#~ msgstr "Quitter\\Quitter COLOBOT" - -#~ msgid "Robbie\\Your assistant" -#~ msgstr "Robbie\\Votre assistant" - -#~ msgid "Sky\\Clouds and nebulae" -#~ msgstr "Ciel\\Ciel et nuages" - -#~ msgid "Speed 0.5x\\Half speed" -#~ msgstr "Vitesse 0.5x\\Demi-vitesse" - -#~ msgid "Speed 1.0x\\Normal speed" -#~ msgstr "Vitesse 1.0x\\Vitesse normale" - -#~ msgid "Speed 1.5x\\1.5 times faster" -#~ msgstr "Vitesse 1.5x\\Une fois et demi plus rapide" - -#~ msgid "Speed 3.0x\\Three times faster" -#~ msgstr "Vitesse 3.0x\\Trois fois plus rapide" - -#~ msgid "Speed 3.0x\\Triple speed" -#~ msgstr "Vitesse 3.0x\\Trois fois plus rapide " - -#~ msgid "Speed 4.0x\\Quadruple speed" -#~ msgstr "Vitesse 4.0x\\Quatre fois plus rapide" - -#~ msgid "Speed 6.0x\\Sextuple speed" -#~ msgstr "Vitesse 6.0x\\Six fois plus rapide" - -#~ msgid "Sunbeams\\Sunbeams in the sky" -#~ msgstr "Rayons du soleil\\Rayons selon l'orientation" - -#~ msgid "System mouse\\Use system mouse cursor" -#~ msgstr "Souris système\\Utiliser le curseur de la souris système" - -#~ msgid "Textures\\Quality of textures " -#~ msgstr "Qualité des textures\\Qualité des images" - -#~ msgid "The list is only available if a \\l;radar station\\u object\\radar; is working.\n" -#~ msgstr "Liste non disponible sans \\l;radar\\u object\\radar;.\n" - -#~ msgid "Use a joystick\\Joystick or keyboard" -#~ msgstr "Utilise un joystick\\Joystick ou clavier" - -#~ msgid "User\\User levels" -#~ msgstr "Suppl.\\Niveaux supplémentaires" - -#~ msgid "\\Return to COLOBOT" -#~ msgstr "\\Retourner dans COLOBOT" - -#~ msgid "\\b;Aliens\n" -#~ msgstr "\\b;Listes des ennemis\n" - -#~ msgid "\\b;Buildings\n" -#~ msgstr "\\b;Listes des bâtiments\n" - -#~ msgid "\\b;Error\n" -#~ msgstr "\\b;Erreur\n" - -#~ msgid "\\b;List of objects\n" -#~ msgstr "\\b;Listes des objets\n" - -#~ msgid "\\b;Moveable objects\n" -#~ msgstr "\\b;Listes des objets transportables\n" - -#~ msgid "\\b;Robots\n" -#~ msgstr "\\b;Listes des robots\n" - -#~ msgid "\\c; (none)\\n;\n" -#~ msgstr "\\c; (aucun)\\n;\n" +#. type: \b; header +#: ../help/help.E.txt:4 +#, no-wrap +msgid "General principle" +msgstr "" + +#. type: Plain text +#: ../help/help.E.txt:5 +#, no-wrap +msgid "" +"The program must execute the following scheme:\n" +"Repeat 6 times :" +msgstr "" + +#. type: Bullet: 'o' +#: ../help/help.E.txt:7 +#, no-wrap +msgid "move 5m forward" +msgstr "" + +#. type: Bullet: 'o' +#: ../help/help.E.txt:8 +#, no-wrap +msgid "turn 90 degrees left" +msgstr "" + +#. type: Bullet: 'o' +#: ../help/help.E.txt:9 +#, no-wrap +msgid "shoot" +msgstr "" + +#. type: Bullet: 'o' +#: ../help/help.E.txt:10 +#, no-wrap +msgid "turn 90 degrees right" +msgstr "" + +#. type: Image filename +#: ../help/help.E.txt:12 +#, no-wrap +msgid "tfor1" +msgstr "" + +#. type: \b; header +#: ../help/help.E.txt:13 +#, no-wrap +msgid "Instruction for ( )" +msgstr "" + +#. type: Plain text +#: ../help/help.E.txt:14 +#, no-wrap +msgid "The instruction for asks for 3 expressions:" +msgstr "" + +#. type: Bullet: '1)' +#: ../help/help.E.txt:15 +#, no-wrap +msgid "Initialize the counting variable." +msgstr "" + +#. type: Bullet: '2)' +#: ../help/help.E.txt:16 +#, no-wrap +msgid "The end condition." +msgstr "" + +#. type: Bullet: '3)' +#: ../help/help.E.txt:17 +#, no-wrap +msgid "The counting expression." +msgstr "" + +#. type: Plain text +#: ../help/help.E.txt:19 +#, no-wrap +msgid "Here is the loop once it is integrated into the program frame:" +msgstr "" + +#. type: Source code +#: ../help/help.E.txt:20 +#, no-wrap +msgid "" +"extern void object::Massacre( )\n" +"{\n" +"\tfor ( int i=0 ; i<6 ; i=i+1 )\n" +"\t{\n" +"\t\tinstructions repeated 6 times ...\n" +"\t}\n" +"}" +msgstr "" + +#. type: Plain text +#: ../help/help.E.txt:28 +#, no-wrap +msgid "ATTENTION: The line for ( ) must not be followed by a semicolon !" +msgstr "" + +#. type: \b; header +#: ../help/help.E.txt:30 +#, no-wrap +msgid "Explanation of the instruction for ( )" +msgstr "" + +#. type: Bullet: '1)' +#: ../help/help.E.txt:31 +#, no-wrap +msgid "int i=0" +msgstr "" + +#. type: Plain text +#: ../help/help.E.txt:32 +#, no-wrap +msgid " The variable i is set to zero before the beginning of the loop." +msgstr "" + +#. type: Bullet: '2)' +#: ../help/help.E.txt:34 +#, no-wrap +msgid "i<6" +msgstr "" + +#. type: Plain text +#: ../help/help.E.txt:35 +#, no-wrap +msgid " The loop will be executed as long as i is smaller than 6." +msgstr "" + +#. type: Bullet: '3)' +#: ../help/help.E.txt:37 +#, no-wrap +msgid "i=i+1" +msgstr "" + +#. type: Plain text +#: ../help/help.E.txt:38 +#, no-wrap +msgid " At the end of every loop, add 1 to the variable i." +msgstr "" + +#. type: \b; header +#: ../help/help.E.txt:40 +#, no-wrap +msgid "Blocks" +msgstr "" + +#. type: Plain text +#: ../help/help.E.txt:41 +#, no-wrap +msgid "Use braces { } in order to create a block. All the instructions that must be executed in the for loop are held together by a block. The whole program itself is made up of a block:" +msgstr "" + +#. type: Source code +#: ../help/help.E.txt:43 +#, no-wrap +msgid "" +"extern void object::massacre( )\n" +"{\n" +"\tfill in here ...\n" +"}" +msgstr "" + +#. type: Plain text +#: ../help/help.E.txt:48 +#, no-wrap +msgid "" +"Never change these characters. Just add the instructions of the program between the braces.\n" +"You can fit several blocks one into the other. For example the for block is fitted into the block of the whole program. In order to improve readability, the editor lines up the braces belonging to the different blocks." +msgstr "" + +#. type: \b; header +#: ../help/help.E.txt:51 +#, no-wrap +msgid "Remember" +msgstr "" + +#. type: Plain text +#: ../help/help.E.txt:52 +#, no-wrap +msgid "" +"The instruction used to move forward is move();.\n" +"The instruction used to turn the bot is turn();. A positive angle turns left.\n" +"The instruction used to fire the cannon is fire(1);. A one-second burst allows to destroy all six targets." +msgstr "" + +#. type: \t; header +#: ../help/help.E.txt:56 +#, no-wrap +msgid "See also" +msgstr "" + +#. type: Plain text +#: ../help/help.E.txt:57 +#, no-wrap +msgid "Programming, types and categories." +msgstr "" From 634248885fecd2ec2d3c6cefcec3fb8a010c1541 Mon Sep 17 00:00:00 2001 From: maf-ia Date: Sat, 12 Jan 2019 21:35:51 +0100 Subject: [PATCH 139/207] Complete last 5 french sentences not fully translated --- po/fr.po | 2210 +++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 2008 insertions(+), 202 deletions(-) diff --git a/po/fr.po b/po/fr.po index a216620b..36fc2a26 100644 --- a/po/fr.po +++ b/po/fr.po @@ -1,245 +1,2051 @@ -# SOME DESCRIPTIVE TITLE -# Copyright (C) YEAR Free Software Foundation, Inc. -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. +# Didier Raboud , 2012, 2015, 2016. +# Martin Quinson , 2016 +# B-CE, 2018 +# Pascal Audoux , 2018 msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" +"Project-Id-Version: Colobot 0.1.11\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: DATE\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"PO-Revision-Date: 2019-01-09 23:07+0100\n" +"Last-Translator: B-CE\n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Translate Toolkit 1.11.0\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: Poedit 2.0.6\n" +"X-Language: fr_FR\n" +"X-Source-Language: en_US\n" +"Language-Team: \n" -#. type: Title-text -#: ../scene.txt:1 -#, no-wrap -msgid "Massacre" -msgstr "Massacre" +msgid " or " +msgstr " ou " -#. type: Resume-text -#: ../scene.txt:2 -#, no-wrap -msgid "Use a loop in order to destroy six targets." -msgstr "Détruire six cibles à l'aide d'une boucle." +msgid "\" [ \" expected" +msgstr "\" [ \" attendu" -#. type: ScriptName-text -#: ../scene.txt:3 -#, no-wrap -msgid "Go" -msgstr "Go" +msgid "\" ] \" missing" +msgstr "\" ] \" manquant" -#. type: \b; header -#: ../help/help.E.txt:1 -#, no-wrap -msgid "Exercise" -msgstr "" +#, c-format +msgid "%s: %d pts" +msgstr "%s: %d points" -#. type: Plain text -#: ../help/help.E.txt:2 -#, no-wrap -msgid "Destroy the six targets with a program using a loop. The bot must move 5m forward to get from one target to the next." -msgstr "" +msgid "..behind" +msgstr "..derrière" -#. type: \b; header -#: ../help/help.E.txt:4 -#, no-wrap -msgid "General principle" -msgstr "" +msgid "..in front" +msgstr "..devant" -#. type: Plain text -#: ../help/help.E.txt:5 -#, no-wrap -msgid "" -"The program must execute the following scheme:\n" -"Repeat 6 times :" -msgstr "" +msgid "..power cell" +msgstr "..pile" -#. type: Bullet: 'o' -#: ../help/help.E.txt:7 -#, no-wrap -msgid "move 5m forward" -msgstr "" +msgid "1) First click on the key you want to redefine." +msgstr "1) Cliquez d'abord sur la touche à redéfinir." -#. type: Bullet: 'o' -#: ../help/help.E.txt:8 -#, no-wrap -msgid "turn 90 degrees left" -msgstr "" +msgid "2) Then press the key you want to use instead." +msgstr "2) Appuyez ensuite sur la nouvelle touche souhaitée." -#. type: Bullet: 'o' -#: ../help/help.E.txt:9 -#, no-wrap -msgid "shoot" -msgstr "" +msgid "<< Back \\Back to the previous screen" +msgstr "<< Retour \\Retour au niveau précédent" -#. type: Bullet: 'o' -#: ../help/help.E.txt:10 -#, no-wrap -msgid "turn 90 degrees right" -msgstr "" +msgid "<<< Sorry; mission failed >>>" +msgstr "<<< Désolé; mission échouée >>>" -#. type: Image filename -#: ../help/help.E.txt:12 -#, no-wrap -msgid "tfor1" -msgstr "" +#, c-format +msgid "<<< Team %s finished! >>>" +msgstr "<<< L'équipe %s a terminé! >>>" -#. type: \b; header -#: ../help/help.E.txt:13 -#, no-wrap -msgid "Instruction for ( )" -msgstr "" +#, c-format +msgid "<<< Team %s lost! >>>" +msgstr "<<< L'équipe %s a perdu! >>>" -#. type: Plain text -#: ../help/help.E.txt:14 -#, no-wrap -msgid "The instruction for asks for 3 expressions:" -msgstr "" +#, c-format +msgid "<<< Team %s recieved %d points >>>" +msgstr "<<< L'équipe %s a reçu %d points >>>" -#. type: Bullet: '1)' -#: ../help/help.E.txt:15 -#, no-wrap -msgid "Initialize the counting variable." -msgstr "" +msgid "<<< Well done; mission accomplished >>>" +msgstr "<<< Bravo; mission terminée >>>" -#. type: Bullet: '2)' -#: ../help/help.E.txt:16 -#, no-wrap -msgid "The end condition." -msgstr "" +msgid "A label must be followed by \"for\"; \"while\"; \"do\" or \"switch\"" +msgstr "Un label ne peut se placer que devant un \"for\"; un \"while\"; un \"do\" ou un \"switch\"" -#. type: Bullet: '3)' -#: ../help/help.E.txt:17 -#, no-wrap -msgid "The counting expression." -msgstr "" +msgid "A variable can not be declared twice" +msgstr "Redéfinition d'une variable" -#. type: Plain text -#: ../help/help.E.txt:19 -#, no-wrap -msgid "Here is the loop once it is integrated into the program frame:" -msgstr "" +msgid "Abort\\Abort the current mission" +msgstr "Abandonner\\Abandonner la mission en cours" -#. type: Source code -#: ../help/help.E.txt:20 -#, no-wrap -msgid "" -"extern void object::Massacre( )\n" -"{\n" -"\tfor ( int i=0 ; i<6 ; i=i+1 )\n" -"\t{\n" -"\t\tinstructions repeated 6 times ...\n" -"\t}\n" -"}" -msgstr "" +msgid "Access beyond array limit" +msgstr "Accès hors du tableau" -#. type: Plain text -#: ../help/help.E.txt:28 -#, no-wrap -msgid "ATTENTION: The line for ( ) must not be followed by a semicolon !" -msgstr "" +msgid "Access to solution\\Shows the solution (detailed instructions for missions)" +msgstr "Accès à la solution\\Donne la solution (instructions détaillées pour la mission)" -#. type: \b; header -#: ../help/help.E.txt:30 -#, no-wrap -msgid "Explanation of the instruction for ( )" -msgstr "" +msgid "Access to solutions\\Show program \"4: Solution\" in the exercises" +msgstr "Accès aux solutions\\Programme \"4: Solution\" dans les exercices" -#. type: Bullet: '1)' -#: ../help/help.E.txt:31 -#, no-wrap -msgid "int i=0" -msgstr "" +msgid "Add new program" +msgstr "Ajouter un nouveau programme" -#. type: Plain text -#: ../help/help.E.txt:32 -#, no-wrap -msgid " The variable i is set to zero before the beginning of the loop." -msgstr "" +msgid "Alien Queen" +msgstr "Pondeuse" -#. type: Bullet: '2)' -#: ../help/help.E.txt:34 -#, no-wrap -msgid "i<6" -msgstr "" +msgid "Alien Queen killed" +msgstr "Pondeuse mortellement touchée" -#. type: Plain text -#: ../help/help.E.txt:35 -#, no-wrap -msgid " The loop will be executed as long as i is smaller than 6." -msgstr "" +msgid "Already carrying something" +msgstr "Porte déjà quelque chose" -#. type: Bullet: '3)' -#: ../help/help.E.txt:37 -#, no-wrap -msgid "i=i+1" -msgstr "" +msgid "Alternative camera mode\\Move sideways instead of rotating (in free camera)" +msgstr "Mode caméra alternatif\\Déplacements latéraux au lieu des rotations (pour une caméra libre)" -#. type: Plain text -#: ../help/help.E.txt:38 -#, no-wrap -msgid " At the end of every loop, add 1 to the variable i." -msgstr "" +msgid "Ambiguous call to overloaded function" +msgstr "Appel ambigu à une fonction surchargée" -#. type: \b; header -#: ../help/help.E.txt:40 -#, no-wrap -msgid "Blocks" -msgstr "" +msgid "Analysis already performed" +msgstr "Analyse déjà effectuée" -#. type: Plain text -#: ../help/help.E.txt:41 -#, no-wrap -msgid "Use braces { } in order to create a block. All the instructions that must be executed in the for loop are held together by a block. The whole program itself is made up of a block:" -msgstr "" +msgid "Analysis performed" +msgstr "Analyse terminée" -#. type: Source code -#: ../help/help.E.txt:43 -#, no-wrap -msgid "" -"extern void object::massacre( )\n" -"{\n" -"\tfill in here ...\n" -"}" -msgstr "" +msgid "Analyzes only organic matter" +msgstr "N'analyse que la matière organique" -#. type: Plain text -#: ../help/help.E.txt:48 -#, no-wrap -msgid "" -"Never change these characters. Just add the instructions of the program between the braces.\n" -"You can fit several blocks one into the other. For example the for block is fitted into the block of the whole program. In order to improve readability, the editor lines up the braces belonging to the different blocks." -msgstr "" +msgid "Anisotropy level\\Anisotropy level" +msgstr "Niveau d'anisotropie\\Niveau d'anisotropie" -#. type: \b; header -#: ../help/help.E.txt:51 -#, no-wrap -msgid "Remember" -msgstr "" +msgid "Ant" +msgstr "Fourmi" -#. type: Plain text -#: ../help/help.E.txt:52 -#, no-wrap -msgid "" -"The instruction used to move forward is move();.\n" -"The instruction used to turn the bot is turn();. A positive angle turns left.\n" -"The instruction used to fire the cannon is fire(1);. A one-second burst allows to destroy all six targets." -msgstr "" +msgid "Ant fatally wounded" +msgstr "Fourmi mortellement touchée" -#. type: \t; header -#: ../help/help.E.txt:56 -#, no-wrap -msgid "See also" -msgstr "" +msgid "Appearance\\Choose your appearance" +msgstr "Aspect\\Choisir votre aspect" -#. type: Plain text -#: ../help/help.E.txt:57 -#, no-wrap -msgid "Programming, types and categories." -msgstr "" +msgid "Apply changes\\Activates the changed settings" +msgstr "Appliquer les changements\\Active les changements effectués" + +msgid "Appropriate constructor missing" +msgstr "Constructeur approprié manquant" + +msgid "Assignment impossible" +msgstr "Assignation impossible" + +msgid "Autolab" +msgstr "Laboratoire d'analyse de matières organiques" + +msgid "Automatic indent\\When program editing" +msgstr "Indentation automatique\\Pendant l'édition d'un programme" + +msgid "Autosave interval\\How often your game will autosave" +msgstr "Interval d'auto-sauvegarde\\À quels intervals les parties vont-t-elles êtres sauvegardées automatiquement" + +msgid "Autosave slots\\How many autosave slots you'll have" +msgstr "Nombre d'auto-sauvegardes\\Combien d'auto-sauvegarde seront conservées" + +msgid "Autosave\\Enables autosave" +msgstr "Auto-sauvegarde\\Activer l'auto-sauvegarde" + +msgid "Back" +msgstr "Page précédente" + +msgid "Background sound:\\Volume of audio tracks" +msgstr "Fond sonore :\\Volume des pistes audio" + +msgid "Backward (\\key down;)" +msgstr "Recule (\\key down;)" + +msgid "Backward\\Moves backward" +msgstr "Reculer\\Se déplacer en arrière" + +msgid "Bad argument for \"new\"" +msgstr "Mauvais argument pour \"new\"" + +msgid "Big indent\\Indent 2 or 4 spaces per level defined by braces" +msgstr "Grande indentation\\Indente avec 2 ou 4 espaces par niveau" + +msgid "Black box" +msgstr "Boîte noire" + +msgid "Blood\\Display blood when the astronaut is hit" +msgstr "Sang\\Afficher du sang quand le cosmonaute est touché" + +msgid "Blue" +msgstr "Bleue" + +# tocheck : for team (fem): bleue +# tocheck : for flag/pen/bot (masc): bleu +# + capital also to check +msgid "Blue flag" +msgstr "Drapeau bleu" + +msgid "Bot destroyed" +msgstr "Robot détruit" + +msgid "Bot factory" +msgstr "Fabrique de robots" + +msgid "Build a bot factory" +msgstr "Construire une fabrique de robots" + +msgid "Build a converter" +msgstr "Construire un convertisseur" + +msgid "Build a defense tower" +msgstr "Construire une tour" + +msgid "Build a derrick" +msgstr "Construire un derrick" + +msgid "Build a destroyer" +msgstr "Construire un destructeur" + +msgid "Build a exchange post" +msgstr "Construire une borne d'information" + +msgid "Build a legged grabber" +msgstr "Fabriquer un déménageur à pattes" + +msgid "Build a legged orga shooter" +msgstr "Fabriquer un tireur organique à pattes" + +msgid "Build a legged shooter" +msgstr "Fabriquer un tireur à pattes" + +msgid "Build a legged sniffer" +msgstr "Fabriquer un renifleur à pattes" + +msgid "Build a lightning conductor" +msgstr "Construire un paratonnerre" + +msgid "Build a nuclear power plant" +msgstr "Construire une centrale nucléaire" + +msgid "Build a phazer shooter" +msgstr "Fabriquer un robot canon à phases" + +msgid "Build a power cell factory" +msgstr "Construire une fabrique de piles" + +msgid "Build a power station" +msgstr "Construire une station de recharge" + +msgid "Build a radar station" +msgstr "Construire un radar" + +msgid "Build a recycler" +msgstr "Fabriquer un robot recycleur" + +msgid "Build a repair center" +msgstr "Construire un centre de réparation" + +msgid "Build a research center" +msgstr "Construire un centre de recherches" + +msgid "Build a shielder" +msgstr "Fabriquer un robot bouclier" + +msgid "Build a subber" +msgstr "Fabriquer un robot sous-marin" + +msgid "Build a thumper" +msgstr "Fabriquer un robot secoueur" + +msgid "Build a tracked grabber" +msgstr "Fabriquer un déménageur à chenilles" + +msgid "Build a tracked orga shooter" +msgstr "Fabriquer un tireur organique à chenilles" + +msgid "Build a tracked shooter" +msgstr "Fabriquer un tireur à chenilles" + +msgid "Build a tracked sniffer" +msgstr "Fabriquer un renifleur à chenilles" + +msgid "Build a wheeled grabber" +msgstr "Fabriquer un déménageur à roues" + +msgid "Build a wheeled orga shooter" +msgstr "Fabriquer un tireur organique à roues" + +msgid "Build a wheeled shooter" +msgstr "Fabriquer un tireur à roues" + +msgid "Build a wheeled sniffer" +msgstr "Fabriquer un renifleur à roues" + +msgid "Build a winged grabber" +msgstr "Fabriquer un déménageur volant" + +msgid "Build a winged orga shooter" +msgstr "Fabriquer un tireur organique volant" + +msgid "Build a winged shooter" +msgstr "Fabriquer un tireur volant" + +msgid "Build a winged sniffer" +msgstr "Fabriquer un renifleur volant" + +msgid "Build an autolab" +msgstr "Construire un laboratoire d'analyse de matières organiques" + +msgid "Building completed" +msgstr "Bâtiment terminé" + +msgid "Building destroyed" +msgstr "Bâtiment détruit" + +msgid "Button %1" +msgstr "Bouton %1" + +msgid "Calling an unknown function" +msgstr "Appel d'une fonction inexistante" + +msgid "Camera (\\key camera;)" +msgstr "Caméra (\\key camera;)" + +msgid "Camera back\\Moves the camera backward" +msgstr "Caméra plus loin\\Recule la caméra" + +msgid "Camera border scrolling\\Scrolling when the mouse touches right or left border" +msgstr "Défilement dans les bords\\Défilement lorsque la souris touche les bords gauche ou droite" + +msgid "Camera closer\\Moves the camera forward" +msgstr "Caméra plus proche\\Avance la caméra" + +msgid "Camera down\\Turns the camera down" +msgstr "Baisser caméra\\Baisse la caméra" + +msgid "Camera left\\Turns the camera left" +msgstr "Caméra à gauche\\Tourne la caméra vers la gauche" + +msgid "Camera right\\Turns the camera right" +msgstr "Caméra à droite\\Tourne la caméra vers la droite" + +msgid "Camera up\\Turns the camera up" +msgstr "Lever caméra\\Monte la caméra" + +msgid "Can not produce not researched object" +msgstr "Impossible de créer un objet n'ayant pas été recherché" + +msgid "Can not produce this object in this mission" +msgstr "Impossible de créer cet objet dans cette mission" + +msgid "Can't open file" +msgstr "Ouverture du fichier impossible" + +msgid "Cancel" +msgstr "Annuler" + +msgid "Cancel\\Cancel all changes" +msgstr "Annuler\\Annuler toutes les modifications" + +msgid "Challenges" +msgstr "Défis" + +msgid "Challenges in the chapter:" +msgstr "Liste des défis du chapitre :" + +msgid "Challenges\\Programming challenges" +msgstr "Défis\\Défis de programmation" + +msgid "Change camera\\Switches between onboard camera and following camera" +msgstr "Changement de caméra\\Autre de point de vue" + +msgid "Change player\\Change player" +msgstr "Autre joueur\\Choix du nom du joueur" + +msgid "Chapters:" +msgstr "Liste des chapitres :" + +msgid "Cheat console\\Show cheat console" +msgstr "Console de triche\\Montre la console de triche" + +msgid "Checkpoint" +msgstr "Indicateur" + +msgid "Class name expected" +msgstr "Nom de classe attendu" + +msgid "Climb\\Increases the power of the jet" +msgstr "Monter\\Augmenter la puissance du réacteur" + +msgid "Clone program" +msgstr "Dupliquer le programme" + +msgid "Clone selected program" +msgstr "Dupliquer le programme sélectionné" + +msgid "Close" +msgstr "Fermer" + +msgid "Closing bracket missing" +msgstr "Il manque une parenthèse fermante" + +msgid "Code battle" +msgstr "Bataille de code" + +msgid "Code battles" +msgstr "Batailles de code" + +msgid "Code battles\\Program your robot to be the best of them all!" +msgstr "Batailles de code\\Programmez votre robot pour être le meilleur entre tous!" + +msgid "Colobot rules!" +msgstr "Colobot est super!" + +msgid "Colobot: Gold Edition" +msgstr "Colobot: Édition Gold" + +msgid "Command line" +msgstr "Console de commande" + +msgid "Compilation ok (0 errors)" +msgstr "Compilation ok (0 erreur)" + +msgid "Compile" +msgstr "Compiler" + +msgid "Continue" +msgstr "Continuer" + +msgid "Continue\\Continue the current mission" +msgstr "Continuer\\Continuer la mission en cours" + +msgid "Controls\\Keyboard, joystick and mouse settings" +msgstr "Commandes\\Touches du clavier" + +msgid "Converts ore to titanium" +msgstr "Conversion de minerai en titane" + +msgid "Copy" +msgstr "Copier" + +msgid "Copy (Ctrl+C)" +msgstr "Copier (Ctrl+C)" + +msgid "Current mission saved" +msgstr "Enregistrement effectué" + +msgid "Custom levels:" +msgstr "Niveaux spéciaux :" + +msgid "Custom levels\\Levels from mods created by the users" +msgstr "Niveaux spéciaux\\Niveaux importés ou personnalisés" + +msgid "Customize your appearance" +msgstr "Personnalisation de votre apparence" + +msgid "Cut (Ctrl+X)" +msgstr "Couper (Ctrl+X)" + +msgid "Defense tower" +msgstr "Tour de défense" + +msgid "Delete mark" +msgstr "Supprimer la marque" + +msgid "Delete player\\Deletes the player from the list" +msgstr "Supprimer le joueur\\Supprimer le joueur de la liste" + +msgid "Delete\\Deletes the selected file" +msgstr "Supprimer\\Supprime l'enregistrement sélectionné" + +msgid "Derrick" +msgstr "Derrick" + +msgid "Descend\\Reduces the power of the jet" +msgstr "Descendre\\Diminuer la puissance du réacteur" + +msgid "Destroy" +msgstr "Détruire" + +msgid "Destroy the building" +msgstr "Démolit le bâtiment" + +msgid "Destroyer" +msgstr "Destructeur" + +msgid "Device\\Driver and resolution settings" +msgstr "Affichage\\Pilote et résolution d'affichage" + +msgid "Dividing by zero" +msgstr "Division par zéro" + +msgid "Do you really want to destroy the selected building?" +msgstr "Voulez-vous vraiment détruire le bâtiment sélectionné ?" + +#, c-format +msgid "Do you want to delete %s's saved games?" +msgstr "Voulez-vous détruire les sauvegardes de %s ?" + +msgid "Doors blocked by a robot or another object" +msgstr "Portes bloquées par un robot ou un objet" + +msgid "Down (\\key gdown;)" +msgstr "Descend (\\key gdown;)" + +msgid "Drawer bot" +msgstr "Robot dessinateur" + +msgid "Dust\\Dust and dirt on bots and buildings" +msgstr "Salissures\\Salissures des robots et bâtiments" + +msgid "Dynamic lighting\\Mobile light sources" +msgstr "Lumières dynamiques\\Éclairages mobiles" + +msgid "Dynamic shadows ++\\Dynamic shadows + self shadowing" +msgstr "Ombres dynamiques ++\\Active les ombres dynamiques et l'auto-ombrage" + +msgid "Dynamic shadows\\Beautiful shadows!" +msgstr "Ombres dynamiques\\Magnifiques ombres !" + +msgid "Edit the selected program" +msgstr "Éditer le programme sélectionné" + +msgid "Egg" +msgstr "Oeuf" + +msgid "End of block missing" +msgstr "Il manque la fin du bloc" + +msgid "Energy deposit (site for power station)" +msgstr "Emplacement pour une station de recharge ou une fabrique de pile" + +msgid "Energy level" +msgstr "Niveau d'énergie" + +msgid "Engineer" +msgstr "Technicien" + +msgid "Error in instruction move" +msgstr "Déplacement impossible" + +msgid "Execute the selected program" +msgstr "Exécute le programme sélectionné" + +msgid "Execute/stop" +msgstr "Démarrer/stopper" + +msgid "Exercises in the chapter:" +msgstr "Liste des exercices du chapitre :" + +msgid "Exercises\\Programming exercises" +msgstr "Programmation\\Exercices de programmation" + +msgid "Explode (\\key action;)" +msgstr "Détruire (\\key action;)" + +msgid "Explosive" +msgstr "Explosif" + +msgid "Expression expected after =" +msgstr "Expression attendue après =" + +msgid "Extend shield (\\key action;)" +msgstr "Déploie le bouclier (\\key action;)" + +msgid "Eyeglasses:" +msgstr "Lunettes :" + +msgid "Face type:" +msgstr "Type de visage :" + +msgid "File not open" +msgstr "Le fichier n'est pas ouvert" + +msgid "Filename:" +msgstr "Nom du fichier :" + +msgid "Film sequences\\Films before and after the missions" +msgstr "Séquences cinématiques\\Films avant ou après une mission" + +msgid "Finish" +msgstr "But/Objectif" + +# OBJECT_END : GoalArea +msgid "Fixed mine" +msgstr "Mine fixe" + +msgid "Flat ground not large enough" +msgstr "Sol plat pas assez grand" + +msgid "Fog\\Fog" +msgstr "Brouillard\\Nappes de brouillard" + +msgid "Folder:" +msgstr "Dossier:" + +#, c-format +msgid "Folder: %s" +msgstr "Dossier: %s" + +msgid "Font size" +msgstr "Taille des caractères" + +msgid "Forward" +msgstr "Page suivante" + +msgid "Forward (\\key up;)" +msgstr "Avance (\\key up;)" + +msgid "Forward\\Moves forward" +msgstr "Avancer\\Se déplacer en avant" + +msgid "Found a site for a derrick" +msgstr "Emplacement pour un derrick trouvé" + +msgid "Found a site for power station" +msgstr "Emplacement pour station de recharge ou fabrique de pile trouvé" + +msgid "Found key A (site for derrick)" +msgstr "Emplacement pour un derrick (clé A)" + +msgid "Found key B (site for derrick)" +msgstr "Emplacement pour un derrick (clé B)" + +msgid "Found key C (site for derrick)" +msgstr "Emplacement pour un derrick (clé C)" + +msgid "Found key D (site for derrick)" +msgstr "Emplacement pour un derrick (clé D)" + +msgid "Free game" +msgstr "Jeu libre" + +msgid "Free game on this planet:" +msgstr "Liste des jeux libres du chapitre :" + +msgid "Free game\\Free game without a specific goal" +msgstr "Jeu libre\\Jeu libre sans but précis" + +msgid "Full screen\\Full screen or window mode" +msgstr "Plein écran\\Plein écran ou fenêtré" + +msgid "Function already exists" +msgstr "Cette fonction existe déjà" + +msgid "Function name missing" +msgstr "Nom de la fonction attendu" + +msgid "Function needs return type \"void\"" +msgstr "La fonction a besoin de \"void\" en type de retour" + +msgid "Game speed" +msgstr "Vitesse du jeu" + +msgid "Game\\Game settings" +msgstr "Jeu\\Options de jouabilité" + +msgid "Gantry crane" +msgstr "Portique" + +msgid "Generating" +msgstr "Génération" + +msgid "Gold Edition development by:" +msgstr "Édition Gold développée par :" + +msgid "Goto: destination occupied" +msgstr "Goto: destination occupée" + +msgid "Goto: inaccessible destination" +msgstr "Goto: chemin introuvable" + +msgid "Grab or drop (\\key action;)" +msgstr "Prend ou dépose (\\key action;)" + +msgid "Graphics\\Graphics settings" +msgstr "Graphique\\Options graphiques" + +msgid "Green" +msgstr "Vert" + +msgid "Green flag" +msgstr "Drapeau vert" + +msgid "Ground not flat enough" +msgstr "Sol pas assez plat" + +msgid "Hair color:" +msgstr "Couleur des cheveux :" + +msgid "Head\\Face and hair" +msgstr "Tête\\Visage et cheveux" + +msgid "Help about selected object" +msgstr "Instructions sur la sélection" + +msgid "Help balloons\\Explain the function of the buttons" +msgstr "Bulles d'aide\\Bulles explicatives" + +msgid "Hex value out of range" +msgstr "Valeur hexadécimale impossible" + +msgid "Higher speed\\Doubles speed" +msgstr "Vitesse augmentée\\Deux fois plus rapide" + +msgid "Highest\\Highest graphic quality (lowest frame rate)" +msgstr "Maxi\\Haute qualité (+ lent)" + +msgid "Home" +msgstr "Page initiale" + +msgid "Houston Mission Control" +msgstr "Centre de contrôle de Houston" + +msgid "Illegal object" +msgstr "Objet inaccessible" + +msgid "Impossible under water" +msgstr "Impossible sous l'eau" + +msgid "Impossible when carrying an object" +msgstr "Impossible en portant un objet" + +msgid "Impossible when flying" +msgstr "Impossible en vol" + +msgid "Impossible when moving" +msgstr "Impossible en mouvement" + +msgid "Impossible when swimming" +msgstr "Impossible en nageant" + +msgid "Inappropriate bot" +msgstr "Robot inadapté" + +msgid "Inappropriate cell type" +msgstr "Pas le bon type de pile" + +msgid "Inappropriate object" +msgstr "Pas le bon objet" + +msgid "Incorrect index type" +msgstr "Mauvais type d'index" + +msgid "Infected by a virus; temporarily out of order" +msgstr "Infecté par un virus; ne fonctionne plus temporairement" + +msgid "Information exchange post" +msgstr "Borne d'information" + +msgid "Instruction \"break\" outside a loop" +msgstr "Instruction \"break\" en dehors d'une boucle" + +msgid "Instruction \"case\" missing" +msgstr "Il manque l'instruction \"case\"" + +msgid "Instruction \"case\" outside a block \"switch\"" +msgstr "Instruction \"case\" en dehors d'un bloc \"switch\"" + +msgid "Instruction \"else\" without corresponding \"if\"" +msgstr "Instruction \"else\" sans \"if\" correspondant" + +msgid "Instructions (\\key help;)" +msgstr "Instructions (\\key help;)" + +msgid "Instructions after the final closing brace" +msgstr "Instructions après la dernière accolade fermante" + +msgid "Instructions for the mission (\\key help;)" +msgstr "Instructions sur la mission (\\key help;)" + +msgid "Instructions from Houston" +msgstr "Instructions de Houston" + +msgid "Instructions\\Shows the instructions for the current mission" +msgstr "Instructions mission\\Marche à suivre" + +msgid "Internal error - tell the developers" +msgstr "Erreur interne - contacter les développeurs" + +msgid "Invalid universal character name" +msgstr "Conversion invalide d'un caractère unicode en caractère UTF8" + +msgid "Invert\\Invert values on this axis" +msgstr "Inversion\\Inverse les valeurs sur cet axe" + +msgid "Jet temperature" +msgstr "Température du réacteur" + +msgid "Key A" +msgstr "Clé A" + +msgid "Key B" +msgstr "Clé B" + +msgid "Key C" +msgstr "Clé C" + +msgid "Key D" +msgstr "Clé D" + +msgid "Keyword \"while\" missing" +msgstr "Le mot-clé \"while\" est attendu" + +msgid "Keyword help(\\key cbot;)" +msgstr "Aide sur le mot-clé (\\key cbot;)" + +msgid "LOADING" +msgstr "CHARGEMENT" + +msgid "Legged grabber" +msgstr "Robot déménageur à pattes" + +msgid "Legged orga shooter" +msgstr "Robot tireur organique à pattes" + +msgid "Legged shooter" +msgstr "Robot tireur à pattes" + +msgid "Legged sniffer" +msgstr "Robot renifleur à pattes" + +msgid "Levels in this chapter:" +msgstr "Liste des niveaux du chapitre :" + +msgid "Lightning conductor" +msgstr "Paratonnerre" + +msgid "List of objects" +msgstr "Liste des objets" + +msgid "List of saved missions" +msgstr "Liste des missions enregistrées" + +msgid "Load a saved mission" +msgstr "Chargement d'une mission enregistrée" + +msgid "Load\\Load a saved mission" +msgstr "Charger\\Charger une mission enregistrée" + +msgid "Load\\Loads the selected mission" +msgstr "Charger\\Charger la mission sélectionnée" + +msgid "Loading basic level settings" +msgstr "Chargement des configurations de base du niveau" + +msgid "Loading finished!" +msgstr "Chargement terminé !" + +msgid "Loading music" +msgstr "Chargement de la musique" + +msgid "Loading objects" +msgstr "Chargement des objets" + +msgid "Loading terrain" +msgstr "Chargement du terrain" + +# msgid "Speed 0.5x\\Half speed" +# msgstr "" +# msgid "Speed 1.0x\\Normal speed" +# msgstr "" +# msgid "Speed 1.5x\\1.5 times faster" +# msgstr "" +# msgid "Speed 2.0x\\Double speed" +# msgstr "" +# msgid "Speed 3.0x\\Triple speed" +# msgstr "" +# msgid "Speed 4.0x\\Quadruple speed" +# msgstr "" +# msgid "Speed 6.0x\\Sextuple speed" +# msgstr "" +msgid "Lower speed\\Decrease speed by half" +msgstr "Moins rapide\\Diminuer la vitesse de moitié" + +msgid "Lowest\\Minimum graphic quality (highest frame rate)" +msgstr "Mini\\Qualité minimale (+ rapide)" + +msgid "Lunar Roving Vehicle" +msgstr "Véhicule d'exploration lunaire" + +msgid "MSAA\\Multisample anti-aliasing" +msgstr "ACME\\Anticrénelage multiéchantillon" + +msgid "Maximize" +msgstr "Taille maximale" + +msgid "Minimize" +msgstr "Taille réduite" + +msgid "Mipmap level\\Mipmap level" +msgstr "Niveau de MIP mapping\\Niveau de MIP mapping" + +msgid "Missing end quote" +msgstr "La quote de fin est manquante" + +msgid "Missing hex digits after escape sequence" +msgstr "Valeur hexadécimale manquante après la séquence d'échappement" + +msgid "Mission name" +msgstr "Nom de la mission" + +msgid "Missions" +msgstr "Missions" + +msgid "Missions on this planet:" +msgstr "Liste des missions du chapitre :" + +msgid "Missions\\Select mission" +msgstr "Missions\\La grande aventure" + +msgid "Mouse inversion X\\Inversion of the scrolling direction on the X axis" +msgstr "Inversion souris X\\Inversion de la rotation lorsque la souris touche un bord" + +msgid "Mouse inversion Y\\Inversion of the scrolling direction on the Y axis" +msgstr "Inversion souris Y\\Inversion de la rotation lorsque la souris touche un bord" + +msgid "Move selected program down" +msgstr "Déplace le programme sélectionné vers le bas" + +msgid "Move selected program up" +msgstr "Déplace le programme sélectionné vers le haut" + +msgid "Mute\\No sound" +msgstr "Silencieux\\Totalement silencieux" + +msgid "Name:" +msgstr "Nom:" + +msgid "Negative value rejected by \"throw\"" +msgstr "Valeur négative refusée pour \"throw\"" + +msgid "Nest" +msgstr "Nid" + +msgid "New" +msgstr "Nouveau" + +msgid "New ..." +msgstr "Nouveau ..." + +msgid "New bot available" +msgstr "Nouveau robot disponible" + +msgid "Next" +msgstr "Suivant" + +msgid "Next object\\Selects the next object" +msgstr "Sélectionner l'objet suivant\\Sélectionner l'objet suivant" + +msgid "No" +msgstr "Non" + +msgid "No energy in the subsoil" +msgstr "Pas d'énergie en sous-sol" + +msgid "No flag nearby" +msgstr "Aucun drapeau à proximité" + +msgid "No function running" +msgstr "Pas de fonction en exécution" + +msgid "No function with this name accepts this kind of parameter" +msgstr "Aucune fonction de ce nom n'accepte ce(s) type(s) de paramètre(s)" + +msgid "No function with this name accepts this number of parameters" +msgstr "Aucune fonction de ce nom n'accepte ce nombre de paramètres" + +msgid "No information exchange post within range" +msgstr "Pas de borne d'information accessible" + +msgid "No more energy" +msgstr "Plus d'énergie" + +msgid "No ore in the subsoil" +msgstr "Pas de minerai en sous-sol" + +msgid "No power cell" +msgstr "Pas de pile" + +msgid "No titanium" +msgstr "Pas de titane" + +msgid "No titanium around" +msgstr "Pas de titane accessible" + +msgid "No titanium ore to convert" +msgstr "Pas de minerai de titane à convertir" + +msgid "No titanium to transform" +msgstr "Pas de titane à transformer" + +msgid "No uranium to transform" +msgstr "Pas de minerai d'uranium à transformer" + +msgid "No userlevels installed!" +msgstr "Pas de niveaux spéciaux installés !" + +msgid "Non-void function needs \"return;\"" +msgstr "Les fonctions avec retour autre que void doivent comporter l'instruction \"return;\"" + +msgid "Normal size" +msgstr "Taille normale" + +msgid "Normal\\Normal graphic quality" +msgstr "Normal\\Qualité standard" + +msgid "Normal\\Normal sound volume" +msgstr "Normal\\Niveaux normaux" + +msgid "Not enough energy" +msgstr "Pas assez d'énergie" + +msgid "Not enough energy yet" +msgstr "Pas encore assez d'énergie" + +msgid "Not found anything to destroy" +msgstr "Rien trouvé à détruire" + +msgid "Nothing to analyze" +msgstr "Rien à analyser" + +msgid "Nothing to drop" +msgstr "Rien à déposer" + +msgid "Nothing to grab" +msgstr "Rien à prendre" + +msgid "Nothing to recycle" +msgstr "Rien à recycler" + +msgid "Nuclear power cell" +msgstr "Pile nucléaire" + +msgid "Nuclear power cell available" +msgstr "Pile nucléaire disponible" + +msgid "Nuclear power station" +msgstr "Centrale nucléaire" + +msgid "Number missing" +msgstr "Un nombre est attendu" + +msgid "Number of insects detected" +msgstr "Nombre d'insectes détectés" + +msgid "Number of particles\\Explosions, dust, reflections, etc." +msgstr "Quantité de particules\\Explosions, poussières, reflets, etc." + +msgid "OK" +msgstr "D'accord" + +msgid "OK\\Choose the selected player" +msgstr "D'accord\\Choisir le joueur" + +msgid "OK\\Close program editor and return to game" +msgstr "D'accord\\Compiler le programme" + +msgid "Object too close" +msgstr "Objet trop proche" + +msgid "Octal value out of range" +msgstr "Valeur octale impossible" + +msgid "One step" +msgstr "Un pas" + +msgid "Open" +msgstr "Ouvrir" + +msgid "Open (Ctrl+O)" +msgstr "Ouvrir (Ctrl+O)" + +msgid "Opening brace missing" +msgstr "Début d'un bloc attendu" + +msgid "Opening bracket missing" +msgstr "Une parenthèse ouvrante est attendue" + +msgid "Operation impossible with value \"nan\"" +msgstr "Opération sur un \"nan\"" + +msgid "Options" +msgstr "Options" + +msgid "Options\\Preferences" +msgstr "Options\\Réglages" + +msgid "Organic matter" +msgstr "Matière organique" + +msgid "Origin of last message\\Shows where the last message was sent from" +msgstr "Montrer le lieu d'un message\\Montrer le lieu du dernier message" + +msgid "Original game developed by:" +msgstr "Jeu original développé par :" + +msgid "Parameters missing" +msgstr "Pas assez de paramètres" + +msgid "Particles in the interface\\Steam clouds and sparks in the interface" +msgstr "Particules dans l'interface\\Pluie de particules" + +msgid "Paste (Ctrl+V)" +msgstr "Coller (Ctrl+V)" + +msgid "Pause blur\\Blur the background on the pause screen" +msgstr "Flouter les pauses\\Floute le fond de l'écran de pause" + +msgid "Pause in background\\Pause the game when the window is unfocused" +msgstr "Pause en arrière-plan\\Met le jeu en pause quand la fenêtre n'a plus le focus" + +msgid "Pause/continue" +msgstr "Pause/continuer" + +msgid "Pause\\Pause the game without opening menu" +msgstr "Pause\\Mettre le jeu en pause sans ouvrir le menu" + +msgid "Phazer shooter" +msgstr "Robot canon à phases" + +msgid "Photography" +msgstr "Vue de la mission" + +msgid "Place occupied" +msgstr "Emplacement occupé" + +msgid "Planets:" +msgstr "Liste des planètes :" + +msgid "Plans for defense tower available" +msgstr "Construction d'une tour de défense possible" + +msgid "Plans for nuclear power plant available" +msgstr "Construction d'une centrale nucléaire possible" + +msgid "Plans for phazer shooter available" +msgstr "Fabrication des robots canon à phases possible" + +msgid "Plans for shielder available" +msgstr "Fabrication d'un robot bouclier possible" + +msgid "Plans for shooter available" +msgstr "Fabrication des robots tireurs possible" + +msgid "Plans for thumper available" +msgstr "Fabrication d'un robot secoueur possible" + +msgid "Plans for tracked robots available" +msgstr "Fabrication des robots à chenilles possible" + +msgid "Plant a flag" +msgstr "Pose un drapeau de couleur" + +msgid "Play\\Start mission!" +msgstr "Jouer ...\\Démarrer l'action!" + +msgid "Player" +msgstr "Joueur" + +msgid "Player name" +msgstr "Nom du joueur" + +msgid "Player's name" +msgstr "Nom du joueur" + +msgid "Power cell" +msgstr "Pile normale" + +msgid "Power cell available" +msgstr "Pile disponible" + +msgid "Power cell factory" +msgstr "Fabrique de piles" + +msgid "Power station" +msgstr "Station de recharge" + +msgid "Practice bot" +msgstr "Robot d'entraînement" + +msgid "Press \\key help; to read instructions on your SatCom" +msgstr "Consultez votre SatCom en appuyant sur \\key help;" + +msgid "Previous" +msgstr "Précédent" + +msgid "Previous object\\Selects the previous object" +msgstr "Sélection précédente\\Sélectionne l'objet précédent" + +msgid "Previous selection (\\key desel;)" +msgstr "Sélection précédente (\\key desel;)" + +msgid "Private element" +msgstr "Elément protégé (privé)" + +msgid "Private\\Private folder" +msgstr "Privé\\Dossier privé" + +msgid "Processing level file" +msgstr "Analyse du fichier de niveau" + +msgid "Program cloned" +msgstr "Programme dupliqué" + +msgid "Program editor" +msgstr "Édition du programme" + +msgid "Program finished" +msgstr "Programme terminé" + +msgid "Program infected by a virus" +msgstr "Un programme est infecté par un virus" + +msgid "Programming exercises" +msgstr "Programmation" + +msgid "Programming help" +msgstr "Aide à la programmation" + +msgid "Programming help (\\key prog;)" +msgstr "Aide à la programmation (\\key prog;)" + +msgid "Programming help\\Gives more detailed help with programming" +msgstr "Instructions programmation\\Explication sur la programmation" + +msgid "Programs dispatched by Houston" +msgstr "Programmes envoyés par Houston" + +msgid "Public required" +msgstr "Public requis" + +msgid "Public\\Common folder" +msgstr "Public\\Dossier commun à tous les joueurs" + +msgid "Quake at explosions\\The screen shakes at explosions" +msgstr "Secousses lors d'explosions\\L'écran vibre lors d'une explosion" + +msgid "Quick load\\Immediately load game" +msgstr "Chargement rapide\\Chargement direct d'une sauvegarde" + +msgid "Quick save\\Immediately save game" +msgstr "Sauvegarde rapide\\Sauvegarde direct" + +msgid "Quicksave slot not found" +msgstr "Emplacement de sauvegarde rapide non trouvé" + +msgid "Quit\\Quit Colobot: Gold Edition" +msgstr "Quitter\\Quitter Colobot : Édition Gold" + +msgid "Quit\\Quit the current mission or exercise" +msgstr "Quitter la mission en cours\\Terminer un exercice ou une mssion" + +msgid "Radar station" +msgstr "Radar" + +msgid "Read error" +msgstr "Erreur à la lecture" + +msgid "Recorder" +msgstr "Enregistreur" + +msgid "Recycle (\\key action;)" +msgstr "Recycle (\\key action;)" + +msgid "Recycler" +msgstr "Robot recycleur" + +msgid "Red" +msgstr "Rouge" + +# toCheck : capital (for team?) +msgid "Red flag" +msgstr "Drapeau rouge" + +msgid "Reflections on the buttons \\Shiny buttons" +msgstr "Reflets sur les boutons\\Boutons brillants" + +msgid "Remains of Apollo mission" +msgstr "Vestige d'une mission Apollo" + +msgid "Remove a flag" +msgstr "Enlève un drapeau" + +msgid "Remove selected program" +msgstr "Supprimer le programme sélectionné" + +msgid "Render distance\\Maximum visibility" +msgstr "Profondeur de champ\\Distance de vue maximale " + +msgid "Repair center" +msgstr "Centre de réparation" + +msgid "Research center" +msgstr "Centre de recherches" + +msgid "Research program already performed" +msgstr "Recherche déjà effectuée" + +msgid "Research program completed" +msgstr "Recherche terminée" + +msgid "Reserved keyword of CBOT language" +msgstr "Ce mot-clé est réservé au langage CBOT" + +msgid "Resolution" +msgstr "Résolution" + +msgid "Resolution:" +msgstr "Résolutions :" + +msgid "Resources" +msgstr "Ressources" + +msgid "Restart\\Restart the mission from the beginning" +msgstr "Recommencer\\Recommencer la mission au début" + +msgid "Restoring CBot execution state" +msgstr "Restaurer l'état d'exécution CBOT" + +msgid "Restoring saved objects" +msgstr "Restaurer des objets sauvés" + +msgid "Results" +msgstr "Résultats" + +msgid "Return to start" +msgstr "Remet au départ" + +msgid "Robbie" +msgstr "Robbie" + +msgid "Ruin" +msgstr "Bâtiment en ruine" + +msgid "Run research program for defense tower" +msgstr "Recherche la tour de défense" + +msgid "Run research program for legged bots" +msgstr "Recherche du fonctionnement des pattes" + +msgid "Run research program for nuclear power" +msgstr "Recherche du programme nucléaire" + +msgid "Run research program for orga shooter" +msgstr "Recherche le canon organique" + +msgid "Run research program for phazer shooter" +msgstr "Recherche le canon à phases" + +msgid "Run research program for shielder" +msgstr "Recherche le bouclier" + +msgid "Run research program for shooter" +msgstr "Recherche le canon de tir" + +msgid "Run research program for thumper" +msgstr "Recherche le secoueur" + +msgid "Run research program for tracked bots" +msgstr "Recherche du fonctionnement des chenilles" + +msgid "Run research program for winged bots" +msgstr "Recherche du fonctionnement du jet" + +msgid "SatCom" +msgstr "SatCom" + +msgid "Satellite report" +msgstr "Rapport du satellite" + +msgid "Save" +msgstr "Enregistrer" + +msgid "Save (Ctrl+S)" +msgstr "Enregistrer (Ctrl+S)" + +msgid "Save the current mission" +msgstr "Enregistrement de la mission en cours" + +msgid "Save\\Save the current mission" +msgstr "Enregistrer\\Enregistrer la mission en cours" + +msgid "Save\\Saves the current mission" +msgstr "Enregistrer\\Enregistrer la mission en cours" + +msgid "Select the astronaut\\Selects the astronaut" +msgstr "Sélectionner le cosmonaute\\Sélectionner le cosmonaute" + +msgid "Semicolon terminator missing" +msgstr "Terminateur point-virgule non trouvé" + +msgid "Shadow resolution\\Higher means better range and quality, but slower" +msgstr "Résolution des ombres\\Plus grand implique une meilleure qualité et amplitude, mais plus lent" + +msgid "Shield level" +msgstr "Niveau du bouclier" + +msgid "Shield radius" +msgstr "Rayon du bouclier" + +msgid "Shielder" +msgstr "Robot bouclier" + +msgid "Shoot (\\key action;)" +msgstr "Tir (\\key action;)" + +msgid "Show if the ground is flat" +msgstr "Montre si le sol est plat" + +msgid "Show the place" +msgstr "Montre l'endroit" + +msgid "Show the range" +msgstr "Montre le rayon d'action" + +msgid "Show the solution" +msgstr "Donne la solution" + +msgid "Sign \" : \" missing" +msgstr "Séparateur \" : \" attendu" + +msgid "Simple shadows\\Shadows spots on the ground" +msgstr "Ombres simples\\Ombres projetées au sol" + +msgid "Size 1" +msgstr "Taille 1" + +msgid "Size 2" +msgstr "Taille 2" + +msgid "Size 3" +msgstr "Taille 3" + +msgid "Size 4" +msgstr "Taille 4" + +msgid "Size 5" +msgstr "Taille 5" + +msgid "Sniff (\\key action;)" +msgstr "Cherche (\\key action;)" + +msgid "Solution" +msgstr "Solution" + +msgid "Sound effects:\\Volume of engines, voice, shooting, etc." +msgstr "Sons :\\Volume des moteurs, voix, etc." + +msgid "Sound\\Music and game sound volume" +msgstr "Son\\Volumes des sons & musiques" + +msgid "Spaceship" +msgstr "Vaisseau spatial" + +msgid "Spaceship ruin" +msgstr "Epave de vaisseau spatial" + +msgid "Spider" +msgstr "Araignée" + +msgid "Spider fatally wounded" +msgstr "Araignée mortellement touchée" + +msgid "Stack overflow" +msgstr "Débordement de la pile" + +msgid "Standard action\\Standard action of the bot (take/grab, shoot, sniff, etc)" +msgstr "Action standard\\Action du bouton avec le cadre rouge" + +msgid "Standard controls\\Standard key functions" +msgstr "Tout réinitialiser\\Remet toutes les touches standards" + +msgid "Standard speed\\Reset speed to normal" +msgstr "Vitesse standard\\Réinitialiser la vitesse à la normale" + +msgid "Standard\\Standard appearance settings" +msgstr "Standard\\Remet les couleurs standards" + +msgid "Start" +msgstr "Départ" + +msgid "Starting..." +msgstr "Lancement..." + +msgid "Still working ..." +msgstr "Travail en cours ..." + +msgid "String missing" +msgstr "Une chaîne de caractère est attendue" + +msgid "Strip color:" +msgstr "Couleur des bandes :" + +msgid "Subber" +msgstr "Robot sous-marin" + +msgid "Suit color:" +msgstr "Couleur de la combinaison :" + +msgid "Suit\\Astronaut suit" +msgstr "Corps\\Combinaison" + +msgid "Summary:" +msgstr "Résumé :" + +msgid "Survival kit" +msgstr "Sac de survie" + +msgid "Switch bots <-> buildings" +msgstr "Permute robots <-> bâtiments" + +msgid "Take off to finish the mission" +msgstr "Décolle pour terminer la mission" + +msgid "Target" +msgstr "Cible" + +msgid "Target bot" +msgstr "Cible d'entraînement" + +msgid "Terrain relief" +msgstr "Relief du terrain" + +msgid "Texture filtering\\Texture filtering" +msgstr "Filtrage de textures\\Filtrage de textures" + +msgid "Textures" +msgstr "Textures" + +msgid "The battle has ended" +msgstr "La bataille est terminée" + +msgid "The expression must return a boolean value" +msgstr "L'expression doit être un boolean" + +msgid "The function returned no value" +msgstr "La fonction n'a pas retourné de résultat" + +msgid "The mission is not accomplished yet (press \\key help; for more details)" +msgstr "La mission n'est pas terminée (appuyez sur \\key help; pour plus de détails)" + +msgid "The types of the two operands are incompatible" +msgstr "Les deux opérandes ne sont pas de types compatibles" + +msgid "This class already exists" +msgstr "Cette classe existe déjà" + +msgid "This class does not exist" +msgstr "Cette classe n'existe pas" + +msgid "This is example code that cannot be run directly" +msgstr "Ce code d'exemple ne peut pas être lancé directement" + +msgid "This is not a member of this class" +msgstr "Cet élément n'existe pas dans cette classe" + +msgid "This label does not exist" +msgstr "Cette étiquette n'existe pas" + +msgid "This menu is for userlevels from mods, but you didn't install any" +msgstr "Ce menu donne accès aux niveaux spéciaux (importés ou personnalisés), mais aucun n'est installé." + +msgid "This object is currently busy" +msgstr "Cet élément est actuellement occupé" + +msgid "This object is not a member of a class" +msgstr "L'objet n'est pas une instance d'une classe" + +msgid "This parameter needs a default value" +msgstr "Ce paramètre nécessite une valeur par défaut" + +msgid "This program is read-only, clone it to edit" +msgstr "Ce programme est en lecture-seule, le dupliquer pour pouvoir le modifier" + +msgid "Thump (\\key action;)" +msgstr "Secoue (\\key action;)" + +msgid "Thumper" +msgstr "Robot secoueur" + +#, c-format +msgid "Time: %s" +msgstr "Temps : %s" + +msgid "Titanium" +msgstr "Titane" + +msgid "Titanium available" +msgstr "Titane disponible" + +msgid "Titanium deposit (site for derrick)" +msgstr "Emplacement pour un derrick (minerai de titane)" + +msgid "Titanium ore" +msgstr "Minerai de titane" + +msgid "Titanium too close" +msgstr "Titane trop proche" + +msgid "Titanium too far away" +msgstr "Titane trop loin" + +msgid "Too close to a building" +msgstr "Trop proche d'un bâtiment" + +msgid "Too close to an existing flag" +msgstr "Trop proche d'un drapeau existant" + +msgid "Too close to space ship" +msgstr "Trop proche du vaisseau spatial" + +msgid "Too many flags of this color (maximum 5)" +msgstr "Trop de drapeaux de cette couleur (maximum 5)" + +msgid "Too many parameters" +msgstr "Trop de paramètres" + +msgid "Tracked grabber" +msgstr "Robot déménageur à chenilles" + +msgid "Tracked orga shooter" +msgstr "Robot tireur organique à chenilles" + +msgid "Tracked shooter" +msgstr "Robot tireur à chenilles" + +msgid "Tracked sniffer" +msgstr "Robot renifleur à chenilles" + +msgid "Transforms only titanium" +msgstr "Ne transforme que le titane" + +msgid "Transforms only uranium" +msgstr "Ne transforme que le minerai d'uranium" + +msgid "Transmitted information" +msgstr "Informations diffusées" + +msgid "Turn left (\\key left;)" +msgstr "Tourne à gauche (\\key left;)" + +msgid "Turn left\\turns the bot to the left" +msgstr "Tourner à gauche\\Moteur à gauche" + +msgid "Turn right (\\key right;)" +msgstr "Tourne à droite (\\key right;)" + +msgid "Turn right\\turns the bot to the right" +msgstr "Tourner à droite\\Moteur à droite" + +msgid "Type declaration missing" +msgstr "Déclaration de type attendu" + +msgid "Unable to control enemy objects" +msgstr "Impossible de contrôler les objets ennemis" + +msgid "Undo (Ctrl+Z)" +msgstr "Annuler (Ctrl+Z)" + +msgid "Unit" +msgstr "Unité" + +msgid "Unknown Object" +msgstr "Objet inconnu" + +msgid "Unknown command" +msgstr "Commande inconnue" + +msgid "Unknown escape sequence" +msgstr "Séquence d'échappement inconnue" + +msgid "Unknown function" +msgstr "Routine inconnue" + +msgid "Up (\\key gup;)" +msgstr "Monte (\\key gup;)" + +msgid "Uranium deposit (site for derrick)" +msgstr "Emplacement pour un derrick (minerai d'uranium)" + +msgid "Uranium ore" +msgstr "Minerai d'uranium" + +msgid "User levels" +msgstr "Niveaux supplémentaires" + +msgid "Variable name missing" +msgstr "Nom d'une variable attendu" + +msgid "Variable not declared" +msgstr "Variable non déclarée" + +msgid "Variable not initialized" +msgstr "Variable non initialisée" + +msgid "Vault" +msgstr "Coffre-fort" + +msgid "Violet flag" +msgstr "Drapeau violet" + +msgid "Void parameter" +msgstr "Paramètre void" + +msgid "Wasp" +msgstr "Guêpe" + +msgid "Wasp fatally wounded" +msgstr "Guêpe mortellement touchée" + +msgid "Waste" +msgstr "Déchet" + +msgid "Wheeled grabber" +msgstr "Robot déménageur à roues" + +msgid "Wheeled orga shooter" +msgstr "Robot tireur organique à roues" + +msgid "Wheeled shooter" +msgstr "Robot tireur à roues" + +msgid "Wheeled sniffer" +msgstr "Robot renifleur à roues" + +msgid "Winged grabber" +msgstr "Robot déménageur volant" + +msgid "Winged orga shooter" +msgstr "Robot tireur organique volant" + +msgid "Winged shooter" +msgstr "Robot tireur volant" + +msgid "Winged sniffer" +msgstr "Robot renifleur volant" + +msgid "Withdraw shield (\\key action;)" +msgstr "Refermer le bouclier (\\key action;)" + +msgid "Worm" +msgstr "Ver" + +msgid "Worm fatally wounded" +msgstr "Ver mortellement touché" + +msgid "Wreckage" +msgstr "Epave de robot" + +msgid "Write error" +msgstr "Erreur lors de l'écriture" + +msgid "Wrong type for the assignment" +msgstr "Mauvais type de résultat pour l'assignation" + +msgid "Yellow flag" +msgstr "Drapeau jaune" + +msgid "Yes" +msgstr "Oui" + +msgid "You can fly with the keys (\\key gup;) and (\\key gdown;)" +msgstr "Il est possible de voler avec les touches (\\key gup;) et (\\key gdown;)" + +msgid "You can not carry a radioactive object" +msgstr "Vous ne pouvez pas transporter un objet radioactif" + +msgid "You can not carry an object under water" +msgstr "Vous ne pouvez pas transporter un objet sous l'eau" + +#, c-format +msgid "You cannot use \"%s\" in this exercise (used: %d)" +msgstr "Vous ne pouvez pas utiliser «%s» dans cet exercice (utilisé : %d)" + +msgid "You found a usable object" +msgstr "Vous avez trouvé un objet utilisable" + +#, c-format +msgid "You have to use \"%1$s\" at least once in this exercise (used: %2$d)" +msgid_plural "You have to use \"%1$s\" at least %3$d times in this exercise (used: %2$d)" +msgstr[0] "Vous devez utiliser «%1$s» au moins une fois dans cet exercice (utilisé %2$d fois)" +msgstr[1] "Vous devez utiliser «%1$s» au moins %3$d fois dans cet exercice (utilisé %2$d fois)" + +#, c-format +msgid "You have to use \"%1$s\" at most once in this exercise (used: %2$d)" +msgid_plural "You have to use \"%1$s\" at most %3$d times in this exercise (used: %2$d)" +msgstr[0] "Vous devez utiliser «%1$s» au plus une fois dans cet exercice (utilisé %2$d fois)" +msgstr[1] "Vous devez utiliser «%1$s» au plus %3$d fois dans cet exercice (utilisé %2$d fois)" + +msgid "You must get on the spaceship to take off" +msgstr "Vous devez embarquer pour pouvoir décoller" + +msgid "Zoom mini-map" +msgstr "Zoom mini-carte" + +msgid "\\Blue flags" +msgstr "\\Drapeaux bleus" + +msgid "\\Eyeglasses 1" +msgstr "\\Lunettes 1" + +msgid "\\Eyeglasses 2" +msgstr "\\Lunettes 2" + +msgid "\\Eyeglasses 3" +msgstr "\\Lunettes 3" + +msgid "\\Eyeglasses 4" +msgstr "\\Lunettes 4" + +msgid "\\Eyeglasses 5" +msgstr "\\Lunettes 5" + +msgid "\\Face 1" +msgstr "\\Visage 1" + +msgid "\\Face 2" +msgstr "\\Visage 2" + +msgid "\\Face 3" +msgstr "\\Visage 3" + +msgid "\\Face 4" +msgstr "\\Visage 4" + +msgid "\\Green flags" +msgstr "\\Drapeaux verts" + +msgid "\\New player name" +msgstr "\\Nom du joueur à créer" + +msgid "\\No eyeglasses" +msgstr "\\Pas de lunettes" + +msgid "\\Raise the pencil" +msgstr "\\Relève le crayon" + +msgid "\\Red flags" +msgstr "\\Drapeaux rouges" + +msgid "\\Return to Colobot: Gold Edition" +msgstr "\\Revenir à Colobot : Édition Gold" + +msgid "\\SatCom on standby" +msgstr "\\Mettre le SatCom en veille" + +msgid "\\Start recording" +msgstr "\\Démarre l'enregistrement" + +msgid "\\Stop recording" +msgstr "\\Stoppe l'enregistrement" + +msgid "\\Turn left" +msgstr "\\Rotation à gauche" + +msgid "\\Turn right" +msgstr "\\Rotation à droite" + +msgid "\\Use the black pencil" +msgstr "\\Abaisse le crayon noir" + +msgid "\\Use the blue pencil" +msgstr "\\Abaisse le crayon bleu" + +msgid "\\Use the brown pencil" +msgstr "\\Abaisse le crayon brun" + +msgid "\\Use the green pencil" +msgstr "\\Abaisse le crayon vert" + +msgid "\\Use the orange pencil" +msgstr "\\Abaisse le crayon orange" + +msgid "\\Use the purple pencil" +msgstr "\\Abaisse le crayon violet" + +msgid "\\Use the red pencil" +msgstr "\\Abaisse le crayon rouge" + +msgid "\\Use the yellow pencil" +msgstr "\\Abaisse le crayon jaune" + +msgid "\\Violet flags" +msgstr "\\Drapeaux violets" + +msgid "\\Yellow flags" +msgstr "\\Drapeaux jaunes" + +msgid "colobot.info" +msgstr "colobot.info" + +msgid "epsitec.com" +msgstr "epsitec.com" + +#~ msgid " " +#~ msgstr " " + +#~ msgid " Drivers:" +#~ msgstr " Pilotes :" + +#~ msgid " Missions on this level:" +#~ msgstr " Missions du niveau :" + +#~ msgid "\"%s\" missing in this exercise" +#~ msgstr "Il manque \"%s\" dans le programme" + +#~ msgid "3D sound\\3D positioning of the sound" +#~ msgstr "Bruitages 3D\\Positionnement sonore dans l'espace" + +#~ msgid "Building too close" +#~ msgstr "Bâtiment trop proche" + +#~ msgid "COLOBOT" +#~ msgstr "COLOBOT" + +#~ msgid "Camera awayest" +#~ msgstr "Caméra plus loin" + +#~ msgid "Camera down\\Decrease camera angle while visiting message origin" +#~ msgstr "Caméra plus basse\\Réduit l'angle de caméra lors de la vue de l'origine des messages" + +#~ msgid "Camera nearest" +#~ msgstr "Caméra plus proche" + +#~ msgid "Camera to left" +#~ msgstr "Caméra à gauche" + +#~ msgid "Camera to right" +#~ msgstr "Caméra à droite" + +#~ msgid "Camera up\\Increase camera angle while visiting message origin" +#~ msgstr "Caméra plus haute\\Augmente l'angle de caméra lors de la vue de l'origine des messages" + +#~ msgid "Can not create this; there are too many objects" +#~ msgstr "Création impossible; il y a trop d'objets" + +#~ msgid "Cancel\\Keep current player name" +#~ msgstr "Annuler\\Conserver le joueur actuel" + +#~ msgid "Checkpoint crossed" +#~ msgstr "Indicateur atteint" + +#~ msgid "Compass" +#~ msgstr "Boussole" + +#~ msgid "Continue\\Continue the game" +#~ msgstr "Continuer\\Continuer de jouer" + +#~ msgid "Delete" +#~ msgstr "Détruire" + +#~ msgid "Details\\Visual quality of 3D objects" +#~ msgstr "Détails des objets\\Qualité des objets en 3D" + +#~ msgid "Developed by :" +#~ msgstr "Développé par :" + +#~ msgid "Do you want to quit Colobot: Gold Edition?" +#~ msgstr "Voulez-vous quitter Colobot: Édition Gold ?" + +#~ msgid "Exit film\\Film at the exit of exercises" +#~ msgstr "Retour animé\\Retour animé dans les exercices" + +#~ msgid "Friendly fire\\Your shooting can damage your own objects " +#~ msgstr "Dégâts à soi-même\\Vos tirs infligent des dommages à vos unités" + +#~ msgid "Ground inappropriate" +#~ msgstr "Terrain inadapté" + +#~ msgid "Key word help\\More detailed help about key words" +#~ msgstr "Instructions mot-clé\\Explication sur le mot-clé" + +#~ msgid "Marks on the ground\\Marks on the ground" +#~ msgstr "Marques sur le sol\\Marques dessinées sur le sol" + +#~ msgid "Mouse shadow\\Gives the mouse a shadow" +#~ msgstr "Souris ombrée\\Jolie souris avec une ombre" + +#~ msgid "No other robot" +#~ msgstr "Pas d'autre robot" + +#~ msgid "Not yet enough energy" +#~ msgstr "Pas encore assez d'énergie" + +#~ msgid "Num of decorative objects\\Number of purely ornamental objects" +#~ msgstr "Nb d'objets décoratifs\\Qualité d'objets non indispensables" + +#~ msgid "Planets and stars\\Astronomical objects in the sky" +#~ msgstr "Planètes et étoiles\\Motifs mobiles dans le ciel" + +#~ msgid "Quit the mission?" +#~ msgstr "Quitter la mission ?" + +#~ msgid "Quit\\Quit COLOBOT" +#~ msgstr "Quitter\\Quitter COLOBOT" + +#~ msgid "Robbie\\Your assistant" +#~ msgstr "Robbie\\Votre assistant" + +#~ msgid "Sky\\Clouds and nebulae" +#~ msgstr "Ciel\\Ciel et nuages" + +#~ msgid "Speed 0.5x\\Half speed" +#~ msgstr "Vitesse 0.5x\\Demi-vitesse" + +#~ msgid "Speed 1.0x\\Normal speed" +#~ msgstr "Vitesse 1.0x\\Vitesse normale" + +#~ msgid "Speed 1.5x\\1.5 times faster" +#~ msgstr "Vitesse 1.5x\\Une fois et demi plus rapide" + +#~ msgid "Speed 3.0x\\Three times faster" +#~ msgstr "Vitesse 3.0x\\Trois fois plus rapide" + +#~ msgid "Speed 3.0x\\Triple speed" +#~ msgstr "Vitesse 3.0x\\Trois fois plus rapide " + +#~ msgid "Speed 4.0x\\Quadruple speed" +#~ msgstr "Vitesse 4.0x\\Quatre fois plus rapide" + +#~ msgid "Speed 6.0x\\Sextuple speed" +#~ msgstr "Vitesse 6.0x\\Six fois plus rapide" + +#~ msgid "Sunbeams\\Sunbeams in the sky" +#~ msgstr "Rayons du soleil\\Rayons selon l'orientation" + +#~ msgid "System mouse\\Use system mouse cursor" +#~ msgstr "Souris système\\Utiliser le curseur de la souris système" + +#~ msgid "Textures\\Quality of textures " +#~ msgstr "Qualité des textures\\Qualité des images" + +#~ msgid "The list is only available if a \\l;radar station\\u object\\radar; is working.\n" +#~ msgstr "Liste non disponible sans \\l;radar\\u object\\radar;.\n" + +#~ msgid "Use a joystick\\Joystick or keyboard" +#~ msgstr "Utilise un joystick\\Joystick ou clavier" + +#~ msgid "User\\User levels" +#~ msgstr "Suppl.\\Niveaux supplémentaires" + +#~ msgid "\\Return to COLOBOT" +#~ msgstr "\\Retourner dans COLOBOT" + +#~ msgid "\\b;Aliens\n" +#~ msgstr "\\b;Listes des ennemis\n" + +#~ msgid "\\b;Buildings\n" +#~ msgstr "\\b;Listes des bâtiments\n" + +#~ msgid "\\b;Error\n" +#~ msgstr "\\b;Erreur\n" + +#~ msgid "\\b;List of objects\n" +#~ msgstr "\\b;Listes des objets\n" + +#~ msgid "\\b;Moveable objects\n" +#~ msgstr "\\b;Listes des objets transportables\n" + +#~ msgid "\\b;Robots\n" +#~ msgstr "\\b;Listes des robots\n" + +#~ msgid "\\c; (none)\\n;\n" +#~ msgstr "\\c; (aucun)\\n;\n" From 4c3440bbe6f43d84ecd12c5a8cb28bb6dac2205d Mon Sep 17 00:00:00 2001 From: krzys-h Date: Wed, 16 May 2018 11:55:06 +0200 Subject: [PATCH 140/207] Fix building of colobot.rc on Windows --- desktop/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/desktop/CMakeLists.txt b/desktop/CMakeLists.txt index dcca3b77..b49ef2d3 100644 --- a/desktop/CMakeLists.txt +++ b/desktop/CMakeLists.txt @@ -145,7 +145,12 @@ if(PLATFORM_MACOSX) endif(PLATFORM_MACOSX) if(PLATFORM_WINDOWS) - set(COLOBOT_VERSION_4COMMAS "${COLOBOT_VERSION_MAJOR},${COLOBOT_VERSION_MINOR},${COLOBOT_VERSION_REVISION},0") + if(COLOBOT_VERSION_REVISION MATCHES "([0-9]+)\\.([0-9]+)") + string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1,\\2" COLOBOT_VERSION_REVISION_COMMA "${COLOBOT_VERSION_REVISION}") + set(COLOBOT_VERSION_4COMMAS "${COLOBOT_VERSION_MAJOR},${COLOBOT_VERSION_MINOR},${COLOBOT_VERSION_REVISION_COMMA}") + else() + set(COLOBOT_VERSION_4COMMAS "${COLOBOT_VERSION_MAJOR},${COLOBOT_VERSION_MINOR},${COLOBOT_VERSION_REVISION},0") + endif() configure_file(colobot.rc.cmake ${CMAKE_CURRENT_BINARY_DIR}/colobot.rc) endif(PLATFORM_WINDOWS) From 086e07168d3fbdac8ff806864dde3990cf208642 Mon Sep 17 00:00:00 2001 From: suve Date: Sat, 2 Feb 2019 18:53:36 +0100 Subject: [PATCH 141/207] Use sizeof() instead of magic number for strncpy in ModelOutput::WriteOldModel --- src/graphics/model/model_output.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/graphics/model/model_output.cpp b/src/graphics/model/model_output.cpp index 15ebeb75..ef94a3a5 100644 --- a/src/graphics/model/model_output.cpp +++ b/src/graphics/model/model_output.cpp @@ -328,7 +328,10 @@ void ModelOutput::WriteOldModel(const CModel& model, std::ostream &stream) t.material.ambient = triangle.ambient; t.material.diffuse = triangle.diffuse; t.material.specular = triangle.specular; - strncpy(t.texName, triangle.tex1Name.c_str(), 20); + + strncpy(t.texName, triangle.tex1Name.c_str(), sizeof(t.texName)-1); + t.texName[sizeof(t.texName)-1] = '\0'; + t.min = 0.0f; t.max = 1000000.0f; t.state = ConvertToOldState(triangle); From 0f6e1d7d4a516db1ef6c54f0ccbde10f3a90cba8 Mon Sep 17 00:00:00 2001 From: tomangelo2 Date: Tue, 29 Jan 2019 20:39:46 +0100 Subject: [PATCH 142/207] Style fix --- src/graphics/engine/engine.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/graphics/engine/engine.cpp b/src/graphics/engine/engine.cpp index 24c68098..348514bb 100644 --- a/src/graphics/engine/engine.cpp +++ b/src/graphics/engine/engine.cpp @@ -4048,7 +4048,8 @@ void CEngine::UseMSAA(bool enable) } } - if (framebuffer != nullptr) { + if (framebuffer != nullptr) + { framebuffer->Bind(); } From a46750ede2d70271320461266c68aab036de6f2d Mon Sep 17 00:00:00 2001 From: tomangelo2 Date: Wed, 30 Jan 2019 21:06:07 +0100 Subject: [PATCH 143/207] Fix crash when destroying unpowered PowerPlant with Titanium Appendix to pull #1206 --- src/object/auto/autopowerplant.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/object/auto/autopowerplant.cpp b/src/object/auto/autopowerplant.cpp index 37b2d7d5..d7294b93 100644 --- a/src/object/auto/autopowerplant.cpp +++ b/src/object/auto/autopowerplant.cpp @@ -82,12 +82,14 @@ void CAutoPowerPlant::DeleteObject(bool all) CObject* cargo = SearchMetal(); if ( cargo != nullptr ) { + m_object->SetPower(nullptr); CObjectManager::GetInstancePointer()->DeleteObject(cargo); } cargo = SearchPower(); if ( cargo != nullptr ) { + m_object->SetPower(nullptr); CObjectManager::GetInstancePointer()->DeleteObject(cargo); } } From e02a3373fd60d8b3bbb68c02299ee6d64dab5266 Mon Sep 17 00:00:00 2001 From: krzys_h Date: Mon, 18 Feb 2019 19:18:53 +0100 Subject: [PATCH 144/207] Update Jenkinsfile for dockerized build environment (#1240) --- Jenkinsfile | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 9ba966a7..3ebe5751 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,7 +1,7 @@ #!/usr/bin/env groovy pipeline { - agent { label 'colobot-build' } + agent none options { buildDiscarder(logRotator(artifactDaysToKeepStr: '30', artifactNumToKeepStr: '20')) } @@ -19,13 +19,17 @@ pipeline { stage('Build') { parallel { stage('Build Windows') { + agent { + docker { image 'krzysh/colobot-build:latest' } + } steps { sh 'mkdir -p build/windows' dir('build/windows') { sh ''' - cmake \ + # FIXME: without -lsetupapi linking sdl2 fails + /opt/mxe/usr/bin/i686-w64-mingw32.static-cmake \ + -DCMAKE_CXX_STANDARD_LIBRARIES="-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 -lsetupapi" \ -DCMAKE_INSTALL_PREFIX=/install \ - -DCMAKE_TOOLCHAIN_FILE=/opt/mxe/usr/i686-w64-mingw32.static/share/cmake/mxe-conf.cmake \ -DCMAKE_BUILD_TYPE=RelWithDebInfo -DDEV_BUILD=1 -DPORTABLE=1 -DTOOLS=1 -DTESTS=0 ../.. make rm -rf install @@ -42,13 +46,15 @@ pipeline { } stage('Build Linux') { + agent { + docker { image 'krzysh/colobot-build:latest' } + } steps { sh 'mkdir -p build/linux' dir('build/linux') { sh ''' cmake \ -DCMAKE_INSTALL_PREFIX=/install -DCOLOBOT_INSTALL_BIN_DIR=/install -DCOLOBOT_INSTALL_LIB_DIR=/install -DCOLOBOT_INSTALL_DATA_DIR=/install/data -DCOLOBOT_INSTALL_I18N_DIR=/install/lang -DCMAKE_SKIP_INSTALL_RPATH=ON \ - -DBOOST_STATIC=ON -DGLEW_STATIC=ON -DGLEW_LIBRARY=/usr/lib64/libGLEW.a \ -DCMAKE_BUILD_TYPE=RelWithDebInfo -DDEV_BUILD=1 -DPORTABLE=1 -DTOOLS=1 -DTESTS=1 -DDESKTOP=0 ../.. make rm -rf install @@ -68,6 +74,9 @@ pipeline { } stage('Generate docs') { + agent { + docker { image 'krzysh/colobot-build:latest' } + } steps { dir('build/linux') { sh 'make doc' @@ -81,6 +90,9 @@ pipeline { } stage('Run tests') { + agent { + docker { image 'krzysh/colobot-build:latest' } + } steps { dir('build/linux') { sh './colobot_ut --gtest_output=xml:gtestresults.xml || true' @@ -91,6 +103,9 @@ pipeline { } stage('Run colobot-lint') { + agent { + label 'colobot-build' + } environment { CC = '/usr/lib/llvm-3.6/bin/clang' CXX = '/usr/lib/llvm-3.6/bin/clang++' @@ -245,11 +260,10 @@ exit $ret } } - // TODO: cppcheck publisher STILL doesn't have pipeline support - // There is an open pull request though, merged but no release yet... https://github.com/jenkinsci/cppcheck-plugin/pull/36 - + publishCppcheck pattern: 'build/lint/colobot_lint_report.xml' publishHTML([reportName: 'Colobot-lint HTML report', reportDir: 'build/lint/html_report', reportFiles: 'index.html', reportTitles: '', allowMissing: false, alwaysLinkToLastBuild: true, keepAll: true]) } } } } + From 275724ab97be998fa8b787c270c1eadfb581d815 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Przyby=C5=82?= Date: Thu, 21 Feb 2019 17:46:11 +0100 Subject: [PATCH 145/207] Build AppImage in Jenkins (#1243) --- Jenkinsfile | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3ebe5751..95b567a8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -54,8 +54,8 @@ pipeline { dir('build/linux') { sh ''' cmake \ - -DCMAKE_INSTALL_PREFIX=/install -DCOLOBOT_INSTALL_BIN_DIR=/install -DCOLOBOT_INSTALL_LIB_DIR=/install -DCOLOBOT_INSTALL_DATA_DIR=/install/data -DCOLOBOT_INSTALL_I18N_DIR=/install/lang -DCMAKE_SKIP_INSTALL_RPATH=ON \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo -DDEV_BUILD=1 -DPORTABLE=1 -DTOOLS=1 -DTESTS=1 -DDESKTOP=0 ../.. + -DCMAKE_INSTALL_PREFIX=/install -DCMAKE_SKIP_INSTALL_RPATH=ON \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo -DDEV_BUILD=1 -DPORTABLE=1 -DTOOLS=1 -DTESTS=1 -DDESKTOP=1 ../.. make rm -rf install DESTDIR=. make install @@ -66,7 +66,31 @@ pipeline { post { success { sh 'rm -f linux-debug.zip' - zip zipFile: 'linux-debug.zip', archive: true, dir: 'build/linux/install' + dir('build/linux') { + sh ''' + # Clean up + rm -rf squashfs-root + rm -rf colobot.AppDir + rm -rf appimage + rm -f Colobot-x86_64.AppImage + + # Download app image tool + wget -N https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage + chmod +x linuxdeploy-x86_64.AppImage + ./linuxdeploy-x86_64.AppImage --appimage-extract + + # Create AppImage + NO_STRIP=1 ./squashfs-root/AppRun -e colobot --output appimage --appdir colobot.AppDir -d desktop/colobot.desktop -i ../../desktop/colobot.svg + chmod +x Colobot-x86_64.AppImage + + # Prepare folder for zip + mkdir -p appimage + cp -rp install/data appimage/data + cp -rp install/lang appimage/lang + cp -p Colobot-x86_64.AppImage appimage/colobot + ''' + } + zip zipFile: 'linux-debug.zip', archive: true, dir: 'build/linux/appimage' } } } From 0eb31a1f450e099845251cd26ad63865825ca01a Mon Sep 17 00:00:00 2001 From: MrSimbax Date: Sat, 23 Feb 2019 13:12:37 +0100 Subject: [PATCH 146/207] Fix PORTABLE_SAVES flag not working --- src/common/system/system.cpp | 2 -- src/common/system/system.h | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/system/system.cpp b/src/common/system/system.cpp index 44064556..12dc1d36 100644 --- a/src/common/system/system.cpp +++ b/src/common/system/system.cpp @@ -20,8 +20,6 @@ #include "common/system/system.h" -#include "common/config.h" - #include "common/make_unique.h" #if defined(PLATFORM_WINDOWS) diff --git a/src/common/system/system.h b/src/common/system/system.h index aaf54954..36e736c9 100644 --- a/src/common/system/system.h +++ b/src/common/system/system.h @@ -24,6 +24,8 @@ #pragma once +#include "common/config.h" + #include #include #include From aca552242f5ee9a16240544d76d0968c1d45a7e9 Mon Sep 17 00:00:00 2001 From: MrSimbax Date: Sat, 23 Feb 2019 18:51:37 +0100 Subject: [PATCH 147/207] Update po files --- po/fr.po | 2 +- po/pt.po | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/po/fr.po b/po/fr.po index a9222d72..c8d48217 100644 --- a/po/fr.po +++ b/po/fr.po @@ -9,6 +9,7 @@ msgstr "" "POT-Creation-Date: DATE\n" "PO-Revision-Date: 2019-01-09 23:07+0100\n" "Last-Translator: B-CE\n" +"Language-Team: \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -17,7 +18,6 @@ msgstr "" "X-Generator: Poedit 2.0.6\n" "X-Language: fr_FR\n" "X-Source-Language: en_US\n" -"Language-Team: \n" msgid " or " msgstr " ou " diff --git a/po/pt.po b/po/pt.po index dc710c46..f99a9cbf 100644 --- a/po/pt.po +++ b/po/pt.po @@ -1678,6 +1678,9 @@ msgstr "Variável não inicializada" msgid "Vault" msgstr "Cofre" +msgid "Vertical Synchronization\\Limits the number of frames per second to display frequency" +msgstr "" + msgid "Violet flag" msgstr "Bandeira violeta" From 46098834a15598dd897ac23636b34efe314a36c4 Mon Sep 17 00:00:00 2001 From: MrSimbax Date: Sat, 23 Feb 2019 18:54:39 +0100 Subject: [PATCH 148/207] Update data submodule --- data | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data b/data index 8597221e..dd12dbe3 160000 --- a/data +++ b/data @@ -1 +1 @@ -Subproject commit 8597221e4ddbb9016e7aba46c508dca84f3aa1d6 +Subproject commit dd12dbe39a7ad896ac6c73fd4e40c333259e1c84 From 7d99aa954bbadeae884ffa403804b1216dc69d06 Mon Sep 17 00:00:00 2001 From: MrSimbax Date: Sat, 23 Feb 2019 20:01:21 +0100 Subject: [PATCH 149/207] Fix release.py --- tools/release.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/release.py b/tools/release.py index 918b230a..3797fe90 100755 --- a/tools/release.py +++ b/tools/release.py @@ -73,7 +73,7 @@ codename = None data = open('CMakeLists.txt', 'r').readlines() for i in range(len(data)): - m = re.match(r'^set\(COLOBOT_VERSION_(MAJOR|MINOR|REVISION)( +)([0-9]+)\)$', data[i]) + m = re.match(r'^set\(COLOBOT_VERSION_(MAJOR|MINOR|REVISION)( +)([0-9]+(\.[0-9]+)?)\)$', data[i]) if m: x = m.group(3) if m.group(1) == 'MAJOR': From ef6b692d41121d9a8a67450c98a1b13891db0ed3 Mon Sep 17 00:00:00 2001 From: MrSimbax Date: Sat, 23 Feb 2019 20:01:33 +0100 Subject: [PATCH 150/207] Post-release 0.1.12-alpha --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0c40e085..887cf06d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,9 +16,9 @@ set(COLOBOT_VERSION_MINOR 1) set(COLOBOT_VERSION_REVISION 12) # Used on official releases -set(COLOBOT_VERSION_RELEASE_CODENAME "-alpha") +#set(COLOBOT_VERSION_RELEASE_CODENAME "-alpha") # Used on unreleased, development builds -#set(COLOBOT_VERSION_UNRELEASED "+alpha") +set(COLOBOT_VERSION_UNRELEASED "+alpha") # Append git characteristics to version if(DEFINED COLOBOT_VERSION_UNRELEASED) From d4ab82eaae32fa3a68d0699a941db67bc7fb9c18 Mon Sep 17 00:00:00 2001 From: MrSimbax Date: Sat, 23 Feb 2019 20:01:33 +0100 Subject: [PATCH 151/207] Release 0.1.12-alpha: Bump version --- CMakeLists.txt | 6 +++--- data | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8881e0e3..0c40e085 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,12 +13,12 @@ project(colobot C CXX) set(COLOBOT_VERSION_CODENAME "Gold") set(COLOBOT_VERSION_MAJOR 0) set(COLOBOT_VERSION_MINOR 1) -set(COLOBOT_VERSION_REVISION 11.1) +set(COLOBOT_VERSION_REVISION 12) # Used on official releases -#set(COLOBOT_VERSION_RELEASE_CODENAME "-alpha") +set(COLOBOT_VERSION_RELEASE_CODENAME "-alpha") # Used on unreleased, development builds -set(COLOBOT_VERSION_UNRELEASED "+alpha") +#set(COLOBOT_VERSION_UNRELEASED "+alpha") # Append git characteristics to version if(DEFINED COLOBOT_VERSION_UNRELEASED) diff --git a/data b/data index dd12dbe3..c467bd99 160000 --- a/data +++ b/data @@ -1 +1 @@ -Subproject commit dd12dbe39a7ad896ac6c73fd4e40c333259e1c84 +Subproject commit c467bd994e60fb54cf977fbe8583f92957330695 From edeae704f90118bc2aafa91e2835d58e854228bb Mon Sep 17 00:00:00 2001 From: MrSimbax Date: Sun, 24 Feb 2019 15:49:05 +0100 Subject: [PATCH 152/207] Use base dir instead of working dir for data files --- CMakeLists.txt | 8 ++++++++ src/common/config.h.cmake | 4 ++-- src/common/system/system.cpp | 5 +++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 887cf06d..797b29aa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -370,24 +370,32 @@ if(PORTABLE OR (PLATFORM_WINDOWS AND MXE)) # We need to use STRING because PATH doesn't accept relative paths set(COLOBOT_INSTALL_BIN_DIR ./ CACHE STRING "Colobot binary directory") set(COLOBOT_INSTALL_LIB_DIR ./ CACHE STRING "Colobot libraries directory") + set(COLOBOT_RELATIVE_DATA_DIR data CACHE STRING "Colobot shared data directory (relative)") + set(COLOBOT_RELATIVE_I18N_DIR lang CACHE STRING "Colobot translations directory (relative)") set(COLOBOT_INSTALL_DATA_DIR ./data CACHE STRING "Colobot shared data directory") set(COLOBOT_INSTALL_I18N_DIR ./lang CACHE STRING "Colobot translations directory") set(COLOBOT_INSTALL_DOC_DIR ./doc CACHE STRING "Colobot documentation directory") elseif(PLATFORM_WINDOWS) set(COLOBOT_INSTALL_BIN_DIR ${CMAKE_INSTALL_PREFIX}/ CACHE PATH "Colobot binary directory") set(COLOBOT_INSTALL_LIB_DIR ${CMAKE_INSTALL_PREFIX}/ CACHE PATH "Colobot libraries directory") + set(COLOBOT_RELATIVE_DATA_DIR data CACHE STRING "Colobot shared data directory (relative)") + set(COLOBOT_RELATIVE_I18N_DIR lang CACHE STRING "Colobot translations directory (relative)") set(COLOBOT_INSTALL_DATA_DIR ${CMAKE_INSTALL_PREFIX}/data CACHE PATH "Colobot shared data directory") set(COLOBOT_INSTALL_I18N_DIR ${CMAKE_INSTALL_PREFIX}/lang CACHE PATH "Colobot translations directory") set(COLOBOT_INSTALL_DOC_DIR ${CMAKE_INSTALL_PREFIX}/doc CACHE PATH "Colobot documentation directory") elseif(PLATFORM_MACOSX) set(COLOBOT_INSTALL_BIN_DIR ../MacOS CACHE STRING "Colobot binary directory") set(COLOBOT_INSTALL_LIB_DIR ../MacOS CACHE STRING "Colobot libraries directory") + set(COLOBOT_RELATIVE_DATA_DIR . CACHE STRING "Colobot shared data directory (relative)") + set(COLOBOT_RELATIVE_I18N_DIR i18n CACHE STRING "Colobot translations directory (relative)") set(COLOBOT_INSTALL_DATA_DIR . CACHE STRING "Colobot shared data directory") set(COLOBOT_INSTALL_I18N_DIR i18n CACHE SRING "Colobot translations directory") set(COLOBOT_INSTALL_DOC_DIR doc CACHE STRING "Colobot documentation directory") else() set(COLOBOT_INSTALL_BIN_DIR ${CMAKE_INSTALL_PREFIX}/games CACHE PATH "Colobot binary directory") set(COLOBOT_INSTALL_LIB_DIR ${CMAKE_INSTALL_PREFIX}/lib/colobot CACHE PATH "Colobot libraries directory") + set(COLOBOT_RELATIVE_DATA_DIR ../share/games/colobot CACHE STRING "Colobot shared data directory (relative)") + set(COLOBOT_RELATIVE_I18N_DIR ../share/locale CACHE STRING "Colobot translations directory (relative)") set(COLOBOT_INSTALL_DATA_DIR ${CMAKE_INSTALL_PREFIX}/share/games/colobot CACHE PATH "Colobot shared data directory") set(COLOBOT_INSTALL_I18N_DIR ${CMAKE_INSTALL_PREFIX}/share/locale CACHE PATH "Colobot translations directory") set(COLOBOT_INSTALL_DOC_DIR ${CMAKE_INSTALL_PREFIX}/share/doc/colobot CACHE PATH "Colobot documentation directory") diff --git a/src/common/config.h.cmake b/src/common/config.h.cmake index f6d0bcae..6100d7dc 100644 --- a/src/common/config.h.cmake +++ b/src/common/config.h.cmake @@ -18,5 +18,5 @@ #cmakedefine PORTABLE_SAVES @PORTABLE_SAVES@ -#define COLOBOT_DEFAULT_DATADIR "@COLOBOT_INSTALL_DATA_DIR@" -#define COLOBOT_I18N_DIR "@COLOBOT_INSTALL_I18N_DIR@" +#define COLOBOT_DEFAULT_DATADIR "@COLOBOT_RELATIVE_DATA_DIR@" +#define COLOBOT_I18N_DIR "@COLOBOT_RELATIVE_I18N_DIR@" diff --git a/src/common/system/system.cpp b/src/common/system/system.cpp index 12dc1d36..efec405b 100644 --- a/src/common/system/system.cpp +++ b/src/common/system/system.cpp @@ -36,6 +36,7 @@ #include #include +#include std::unique_ptr CSystemUtils::Create() { @@ -178,12 +179,12 @@ float CSystemUtils::TimeStampDiff(SystemTimeStamp *before, SystemTimeStamp *afte std::string CSystemUtils::GetDataPath() { - return COLOBOT_DEFAULT_DATADIR; + return std::string{PHYSFS_getBaseDir()} + COLOBOT_DEFAULT_DATADIR; } std::string CSystemUtils::GetLangPath() { - return COLOBOT_I18N_DIR; + return std::string{PHYSFS_getBaseDir()} + COLOBOT_I18N_DIR; } std::string CSystemUtils::GetSaveDir() From 7268bcca1109e760589e16b32aa50415f3e47d8c Mon Sep 17 00:00:00 2001 From: MrSimbax Date: Sun, 24 Feb 2019 17:16:54 +0100 Subject: [PATCH 153/207] Use workdir paths on dev builds --- src/common/system/system.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/common/system/system.cpp b/src/common/system/system.cpp index efec405b..2ef642ab 100644 --- a/src/common/system/system.cpp +++ b/src/common/system/system.cpp @@ -179,12 +179,20 @@ float CSystemUtils::TimeStampDiff(SystemTimeStamp *before, SystemTimeStamp *afte std::string CSystemUtils::GetDataPath() { +#if DEV_BUILD + return std::string{"./"} + COLOBOT_DEFAULT_DATADIR; +#else return std::string{PHYSFS_getBaseDir()} + COLOBOT_DEFAULT_DATADIR; +#endif } std::string CSystemUtils::GetLangPath() { +#if DEV_BUILD + return std::string{"./"} + COLOBOT_I18N_DIR; +#else return std::string{PHYSFS_getBaseDir()} + COLOBOT_I18N_DIR; +#endif } std::string CSystemUtils::GetSaveDir() From 266944c9d27b4bf2458feb4de4c5403fb9f38858 Mon Sep 17 00:00:00 2001 From: MrSimbax Date: Mon, 25 Feb 2019 23:00:05 +0100 Subject: [PATCH 154/207] Use SDL_GetBasePath() instead of physfs because it's buggy in old version --- src/common/system/system.cpp | 13 ++++++++++--- src/common/system/system.h | 4 ++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/common/system/system.cpp b/src/common/system/system.cpp index 2ef642ab..c1886852 100644 --- a/src/common/system/system.cpp +++ b/src/common/system/system.cpp @@ -36,7 +36,7 @@ #include #include -#include +#include std::unique_ptr CSystemUtils::Create() { @@ -177,12 +177,19 @@ float CSystemUtils::TimeStampDiff(SystemTimeStamp *before, SystemTimeStamp *afte return result; } +std::string CSystemUtils::GetBasePath() +{ + if (m_basePath.empty()) + m_basePath = SDL_GetBasePath(); + return m_basePath; +} + std::string CSystemUtils::GetDataPath() { #if DEV_BUILD return std::string{"./"} + COLOBOT_DEFAULT_DATADIR; #else - return std::string{PHYSFS_getBaseDir()} + COLOBOT_DEFAULT_DATADIR; + return GetBasePath() + COLOBOT_DEFAULT_DATADIR; #endif } @@ -191,7 +198,7 @@ std::string CSystemUtils::GetLangPath() #if DEV_BUILD return std::string{"./"} + COLOBOT_I18N_DIR; #else - return std::string{PHYSFS_getBaseDir()} + COLOBOT_I18N_DIR; + return GetBasePath() + COLOBOT_I18N_DIR; #endif } diff --git a/src/common/system/system.h b/src/common/system/system.h index 36e736c9..7912f27a 100644 --- a/src/common/system/system.h +++ b/src/common/system/system.h @@ -127,6 +127,9 @@ public: /** The difference is \a after - \a before. */ virtual long long TimeStampExactDiff(SystemTimeStamp *before, SystemTimeStamp *after) = 0; + //! Returns the path where the executable binary is located + virtual std::string GetBasePath(); + //! Returns the data path (containing textures, levels, helpfiles, etc) virtual std::string GetDataPath(); @@ -140,5 +143,6 @@ public: virtual void Usleep(int usecs) = 0; private: + std::string m_basePath; std::vector> m_timeStamps; }; From 472aadf9ab3339ef069757600e6d277d953d936f Mon Sep 17 00:00:00 2001 From: MrSimbax Date: Mon, 25 Feb 2019 23:42:34 +0100 Subject: [PATCH 155/207] Fix minor memory leak --- src/common/system/system.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/common/system/system.cpp b/src/common/system/system.cpp index c1886852..0b8001a1 100644 --- a/src/common/system/system.cpp +++ b/src/common/system/system.cpp @@ -180,7 +180,11 @@ float CSystemUtils::TimeStampDiff(SystemTimeStamp *before, SystemTimeStamp *afte std::string CSystemUtils::GetBasePath() { if (m_basePath.empty()) - m_basePath = SDL_GetBasePath(); + { + auto* path = SDL_GetBasePath(); + m_basePath = path; + SDL_free(path); + } return m_basePath; } From d038d18943c8b535143bb1ffa8ce5739fcc0b64d Mon Sep 17 00:00:00 2001 From: MrSimbax Date: Mon, 25 Feb 2019 19:31:16 +0100 Subject: [PATCH 156/207] Add trailing ; to Keywords entry in colobot.desktop Related issue: #1246 --- desktop/colobot.ini | 2 +- desktop/po/colobot-desktop.pot | 2 +- desktop/po/fr.po | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/desktop/colobot.ini b/desktop/colobot.ini index 0cba2158..3a78019a 100644 --- a/desktop/colobot.ini +++ b/desktop/colobot.ini @@ -1,4 +1,4 @@ Name="Colobot" GenericName="Game to learn programming" Comment="Colonize with bots" -Keywords="robots;3d;space;astronaut;java;c++" +Keywords="robots;3d;space;astronaut;java;c++;" diff --git a/desktop/po/colobot-desktop.pot b/desktop/po/colobot-desktop.pot index 52e6e1a8..c33ab83d 100644 --- a/desktop/po/colobot-desktop.pot +++ b/desktop/po/colobot-desktop.pot @@ -37,7 +37,7 @@ msgstr "" #. type: Keywords= #: colobot.ini:4 #, no-wrap -msgid "robots;3d;space;astronaut;java;c++" +msgid "robots;3d;space;astronaut;java;c++;" msgstr "" #. type: =head1 diff --git a/desktop/po/fr.po b/desktop/po/fr.po index 5032271f..1da026a4 100644 --- a/desktop/po/fr.po +++ b/desktop/po/fr.po @@ -37,8 +37,8 @@ msgstr "Colonise avec des roBots" #. type: Keywords= #: colobot.ini:4 #, no-wrap -msgid "robots;3d;space;astronaut;java;c++" -msgstr "robots;3d;espace;astronaute;cosmonaute;java;c++" +msgid "robots;3d;space;astronaut;java;c++;" +msgstr "robots;3d;espace;astronaute;cosmonaute;java;c++;" #. type: =head1 #: colobot.pod:3 From 16a1dc7b9d6dfaf56764802fde4d944d26f98149 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Kapu=C5=9Bci=C5=84ski?= Date: Mon, 4 Mar 2019 21:40:59 +0100 Subject: [PATCH 157/207] Removed unnecessary dependency on libwebp which causes compilation problems with static builds. --- src/CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c58172bd..5c014445 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -63,7 +63,6 @@ elseif(PLATFORM_WINDOWS) find_library(BZ2_LIBRARY NAMES bz2.lib) find_library(JPEG_LIBRARY NAMES jpeg.lib) find_library(TIFF_LIBRARY NAMES tiff.lib) - find_library(WEBP_LIBRARY NAMES webp.lib) find_library(LZMA_LIBRARY NAMES lzma.lib) find_library(FREETYPE_LIBRARY NAMES freetype.lib) set(MSVC_LIBS @@ -72,7 +71,6 @@ elseif(PLATFORM_WINDOWS) ${JPEG_LIBRARY} ${TIFF_LIBRARY} ${BZ2_LIBRARY} - ${WEBP_LIBRARY} ${LZMA_LIBRARY} ${FREETYPE_LIBRARY} winmm.lib From 44083053ce13662e91415a7bdc676718fbf5984b Mon Sep 17 00:00:00 2001 From: fernape Date: Sat, 9 Mar 2019 19:04:00 +0100 Subject: [PATCH 158/207] Add FreeBSD support. Add a new PLATFORM_FREEBSD variable. We can compile like MacOS with just an extra linker flag. --- CMakeLists.txt | 24 ++++++++++++++++++++++++ src/CMakeLists.txt | 4 ++++ 2 files changed, 28 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0c40e085..306d18f8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -60,6 +60,7 @@ if("${CMAKE_SYSTEM_NAME}" MATCHES "Windows") set(PLATFORM_GNU 0) set(PLATFORM_LINUX 0) set(PLATFORM_MACOSX 0) + set(PLATFORM_FREEBSD 0) set(PLATFORM_OTHER 0) # Platform-dependent implementation of system.h @@ -71,6 +72,7 @@ elseif("${CMAKE_SYSTEM_NAME}" MATCHES "Linux") set(PLATFORM_LINUX 1) set(PLATFORM_GNU 1) set(PLATFORM_MACOSX 0) + set(PLATFORM_FREEBSD 0) set(PLATFORM_OTHER 0) # Platform-dependent implementation of system.h @@ -82,6 +84,7 @@ elseif("${CMAKE_SYSTEM_NAME}" MATCHES "kFreeBSD" OR "${CMAKE_SYSTEM_NAME}" STREQ set(PLATFORM_LINUX 0) set(PLATFORM_GNU 1) set(PLATFORM_MACOSX 0) + set(PLATFORM_FREEBSD 0) set(PLATFORM_OTHER 0) # Platform-dependent implementation of system.h @@ -94,18 +97,35 @@ elseif("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin") set(PLATFORM_GNU 0) set(PLATFORM_MACOSX 1) set(PLATFORM_OTHER 0) + set(PLATFORM_FREEBSD 0) # Platform-dependent implementation of system.h set(SYSTEM_CPP_MODULE "system_macosx.cpp") set(SYSTEM_H_MODULE "system_macosx.h") # To avoid CMake warning set(CMAKE_MACOSX_RPATH 1) +elseif("${CMAKE_SYSTEM_NAME}" MATCHES "FreeBSD") + message(STATUS "Build for FreeBSD system") + set(PLATFORM_WINDOWS 0) + set(PLATFORM_LINUX 0) + set(PLATFORM_GNU 0) + set(PLATFORM_MACOSX 0) + set(PLATFORM_FREEBSD 1) + set(PLATFORM_OTHER 0) + + # Platform-dependent implementation of system.h + # On FreeBSD we can use *_other + set(SYSTEM_CPP_MODULE "system_other.cpp") + set(SYSTEM_H_MODULE "system_other.h") + # To avoid CMake warning + set(CMAKE_MACOSX_RPATH 1) else() message(STATUS "Build for other system") set(PLATFORM_WINDOWS 0) set(PLATFORM_LINUX 0) set(PLATFORM_GNU 0) set(PLATFORM_MACOSX 0) + set(PLATFORM_FREEBSD 0) set(PLATFORM_OTHER 1) # Platform-dependent implementation of system.h @@ -153,6 +173,10 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang") message(STATUS "Detected Clang version 3.1+") + if (${PLATFORM_FREEBSD}) + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=bfd") + endif() + set(NORMAL_CXX_FLAGS "-std=c++11 -Wall -Werror -Wold-style-cast -pedantic-errors -Wmissing-prototypes") set(NORMAL_CXX_FLAGS "${NORMAL_CXX_FLAGS} -Wno-error=deprecated-declarations") # updated version of physfs is not available on some platforms so we keep using deprecated functions, see #958 set(RELEASE_CXX_FLAGS "-O2") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c58172bd..7f75a7e1 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -101,6 +101,10 @@ elseif(PLATFORM_MACOSX) find_library(LIBINTL_LIBRARY NAMES intl libintl) find_path(LIBINTL_INCLUDE_PATH NAMES libintl.h) set(PLATFORM_LIBS ${LIBINTL_LIBRARY}) +elseif(PLATFORM_FREEBSD) + find_library(LIBINTL_LIBRARY NAMES intl libintl) + find_path(LIBINTL_INCLUDE_PATH NAMES libintl.h) + set(PLATFORM_LIBS ${LIBINTL_LIBRARY}) endif() From a66b3d06723a5e97655c65e178ceb2f05da1a233 Mon Sep 17 00:00:00 2001 From: melex750 Date: Thu, 11 Apr 2019 04:13:13 -0400 Subject: [PATCH 159/207] Refactor SaveState and RestoreState to use streams --- src/CBot/CBotClass.cpp | 40 +- src/CBot/CBotClass.h | 16 +- src/CBot/CBotFileUtils.cpp | 380 ++++++++++++------ src/CBot/CBotFileUtils.h | 217 ++++++---- src/CBot/CBotProgram.cpp | 42 +- src/CBot/CBotProgram.h | 15 +- src/CBot/CBotStack.cpp | 157 ++++---- src/CBot/CBotStack.h | 4 +- src/CBot/CBotUtils.cpp | 32 -- src/CBot/CBotUtils.h | 29 +- src/CBot/CBotVar/CBotVar.cpp | 2 +- src/CBot/CBotVar/CBotVar.h | 12 +- src/CBot/CBotVar/CBotVarArray.cpp | 7 +- src/CBot/CBotVar/CBotVarArray.h | 2 +- src/CBot/CBotVar/CBotVarBoolean.cpp | 4 +- src/CBot/CBotVar/CBotVarBoolean.h | 2 +- src/CBot/CBotVar/CBotVarClass.cpp | 10 +- src/CBot/CBotVar/CBotVarClass.h | 2 +- src/CBot/CBotVar/CBotVarFloat.cpp | 4 +- src/CBot/CBotVar/CBotVarFloat.h | 2 +- src/CBot/CBotVar/CBotVarInt.cpp | 19 +- src/CBot/CBotVar/CBotVarInt.h | 4 +- src/CBot/CBotVar/CBotVarPointer.cpp | 11 +- src/CBot/CBotVar/CBotVarPointer.h | 2 +- src/CBot/CBotVar/CBotVarString.cpp | 4 +- src/CBot/CBotVar/CBotVarString.h | 2 +- src/CBot/CBotVar/CBotVarValue.h | 5 +- src/level/robotmain.cpp | 112 ++++-- src/level/robotmain.h | 4 +- .../implementation/programmable_impl.cpp | 45 ++- src/object/implementation/programmable_impl.h | 4 +- src/object/interface/programmable_object.h | 4 +- src/script/script.cpp | 20 +- src/script/script.h | 4 +- test/unit/CBot/CBot_test.cpp | 32 +- test/unit/main.cpp | 10 + 36 files changed, 767 insertions(+), 494 deletions(-) diff --git a/src/CBot/CBotClass.cpp b/src/CBot/CBotClass.cpp index f1a658ad..628bb907 100644 --- a/src/CBot/CBotClass.cpp +++ b/src/CBot/CBotClass.cpp @@ -36,7 +36,6 @@ #include "CBot/CBotCStack.h" #include "CBot/CBotDefParam.h" #include "CBot/CBotUtils.h" -#include "CBot/CBotFileUtils.h" #include @@ -364,69 +363,70 @@ void CBotClass::RestoreMethode(long& nIdent, } //////////////////////////////////////////////////////////////////////////////// -bool CBotClass::SaveStaticState(FILE* pf) +bool CBotClass::SaveStaticState(std::ostream &ostr) { - if (!WriteWord( pf, CBOTVERSION*2)) return false; + if (!WriteLong(ostr, CBOTVERSION*2)) return false; // saves the state of static variables in classes for (CBotClass* p : m_publicClasses) { - if (!WriteWord( pf, 1 )) return false; + if (!WriteWord(ostr, 1)) return false; // save the name of the class - if (!WriteString( pf, p->GetName() )) return false; + if (!WriteString(ostr, p->GetName())) return false; CBotVar* pv = p->GetVar(); while( pv != nullptr ) { if ( pv->IsStatic() ) { - if (!WriteWord( pf, 1 )) return false; - if (!WriteString( pf, pv->GetName() )) return false; + if (!WriteWord(ostr, 1)) return false; + if (!WriteString(ostr, pv->GetName())) return false; - if ( !pv->Save0State(pf) ) return false; // common header - if ( !pv->Save1State(pf) ) return false; // saves as the child class - if ( !WriteWord( pf, 0 ) ) return false; + if (!pv->Save0State(ostr)) return false; // common header + if (!pv->Save1State(ostr)) return false; // saves as the child class + if (!WriteWord(ostr, 0)) return false; } pv = pv->GetNext(); } - if (!WriteWord( pf, 0 )) return false; + if (!WriteWord(ostr, 0)) return false; } - if (!WriteWord( pf, 0 )) return false; + if (!WriteWord(ostr, 0)) return false; return true; } //////////////////////////////////////////////////////////////////////////////// -bool CBotClass::RestoreStaticState(FILE* pf) +bool CBotClass::RestoreStaticState(std::istream &istr) { std::string ClassName, VarName; CBotClass* pClass; unsigned short w; - if (!ReadWord( pf, w )) return false; - if ( w != CBOTVERSION*2 ) return false; + long version; + if (!ReadLong(istr, version)) return false; + if (version != CBOTVERSION*2) return false; while (true) { - if (!ReadWord( pf, w )) return false; + if (!ReadWord(istr, w)) return false; if ( w == 0 ) return true; - if (!ReadString( pf, ClassName )) return false; + if (!ReadString(istr, ClassName)) return false; pClass = Find(ClassName); while (true) { - if (!ReadWord( pf, w )) return false; + if (!ReadWord(istr, w)) return false; if ( w == 0 ) break; CBotVar* pVar = nullptr; CBotVar* pv = nullptr; - if (!ReadString( pf, VarName )) return false; + if (!ReadString(istr, VarName)) return false; if ( pClass != nullptr ) pVar = pClass->GetItem(VarName); - if (!CBotVar::RestoreState(pf, pv)) return false; // the temp variable + if (!CBotVar::RestoreState(istr, pv)) return false; // the temp variable if ( pVar != nullptr ) pVar->Copy(pv); delete pv; diff --git a/src/CBot/CBotClass.h b/src/CBot/CBotClass.h index 0f9a8ce4..eeafe2d1 100644 --- a/src/CBot/CBotClass.h +++ b/src/CBot/CBotClass.h @@ -331,18 +331,18 @@ public: static void ClearPublic(); /*! - * \brief SaveStaticState - * \param pf - * \return + * \brief Save all static variables from each public class + * \param ostr Output stream + * \return true on success */ - static bool SaveStaticState(FILE* pf); + static bool SaveStaticState(std::ostream &ostr); /*! - * \brief RestoreStaticState - * \param pf - * \return + * \brief Restore all static variables in each public class + * \param istr Input stream + * \return true on success */ - static bool RestoreStaticState(FILE* pf); + static bool RestoreStaticState(std::istream &istr); /** * \brief Request a lock on this class (for "synchronized" keyword) diff --git a/src/CBot/CBotFileUtils.cpp b/src/CBot/CBotFileUtils.cpp index c473493a..ccde313c 100644 --- a/src/CBot/CBotFileUtils.cpp +++ b/src/CBot/CBotFileUtils.cpp @@ -21,129 +21,251 @@ #include "CBot/CBotClass.h" #include "CBot/CBotEnums.h" -#include "CBot/CBotUtils.h" namespace CBot { - -// file management - -// necessary because it is not possible to do the fopen in the main program -// fwrite and fread in a dll or using the FILE * returned. - -//////////////////////////////////////////////////////////////////////////////// -FILE* fOpen(const char* name, const char* mode) +template +static bool WriteBinary(std::ostream &ostr, T value, unsigned padTo = 0) { - return fopen(name, mode); -} - -//////////////////////////////////////////////////////////////////////////////// -int fClose(FILE* filehandle) -{ - return fclose(filehandle); -} - -//////////////////////////////////////////////////////////////////////////////// -std::size_t fWrite(const void *buffer, - std::size_t elemsize, - std::size_t length, - FILE* filehandle) -{ - return fwrite(buffer, elemsize, length, filehandle); -} - -//////////////////////////////////////////////////////////////////////////////// -std::size_t fRead(void *buffer, - std::size_t elemsize, - std::size_t length, - FILE* filehandle) -{ - return fread(buffer, elemsize, length, filehandle); -} - - -//////////////////////////////////////////////////////////////////////////////// -bool ReadWord(FILE* pf, unsigned short& w) -{ - size_t lg; - - lg = fread(&w, sizeof( unsigned short ), 1, pf ); - - return (lg == 1); -} - -//////////////////////////////////////////////////////////////////////////////// -bool ReadFloat(FILE* pf, float& w) -{ - size_t lg; - - lg = fread(&w, sizeof( float ), 1, pf ); - - return (lg == 1); -} - -//////////////////////////////////////////////////////////////////////////////// -bool WriteLong(FILE* pf, long w) -{ - size_t lg; - - lg = fwrite(&w, sizeof( long ), 1, pf ); - - return (lg == 1); -} - -//////////////////////////////////////////////////////////////////////////////// -bool ReadLong(FILE* pf, long& w) -{ - size_t lg; - - lg = fread(&w, sizeof( long ), 1, pf ); - - return (lg == 1); -} - -//////////////////////////////////////////////////////////////////////////////// -bool ReadString(FILE* pf, std::string& s) -{ - unsigned short w; - char buf[1000]; - size_t lg1, lg2; - - if (!ReadWord(pf, w)) return false; - lg1 = w; - lg2 = fread(buf, 1, lg1, pf ); - buf[lg2] = 0; - - s = buf; - return (lg1 == lg2); -} - -//////////////////////////////////////////////////////////////////////////////// -bool WriteType(FILE* pf, const CBotTypResult &type) -{ - int typ = type.GetType(); - if ( typ == CBotTypIntrinsic ) typ = CBotTypClass; - if ( !WriteWord(pf, typ) ) return false; - if ( typ == CBotTypClass ) + unsigned char chr; + unsigned count = 1; + while (value > 127) // unsigned LEB128 { - CBotClass* p = type.GetClass(); - if ( !WriteString(pf, p->GetName()) ) return false; + ++count; + chr = (value & 0x7F) | 0x80; + if (!ostr.write(reinterpret_cast(&chr), 1)) return false; + value >>= 7; } - if ( type.Eq( CBotTypArrayBody ) || - type.Eq( CBotTypArrayPointer ) ) + chr = value & 0x7F; + if (count < padTo) chr |= 0x80; + if (!ostr.write(reinterpret_cast(&chr), 1)) return false; + + if (count < padTo) { - if ( !WriteWord(pf, type.GetLimite()) ) return false; - if ( !WriteType(pf, type.GetTypElem()) ) return false; + while (++count < padTo) + if (!(ostr << '\x80')) return false; + if (!(ostr << '\x00')) return false; } return true; } -//////////////////////////////////////////////////////////////////////////////// -bool ReadType(FILE* pf, CBotTypResult &type) +template +static bool ReadBinary(std::istream &istr, T &value) +{ + value = 0; + unsigned char chr; + unsigned shift = 0; + while (true) // unsigned LEB128 + { + if (!istr.read(reinterpret_cast(&chr), 1)) return false; + if (shift < sizeof(T) * 8 - 1) + value |= static_cast(chr & 0x7F) << shift; + shift += 7; + if ((chr & 0x80) == 0) break; + } + return true; +} + +template +static bool WriteSignedBinary(std::ostream &ostr, T value, unsigned padTo = 0) +{ + signed char sign = value >> (8 * sizeof(T) - 1); + unsigned count = 0; + while (true) // signed LEB128 + { + ++count; + unsigned char chr = value & 0x7F; + value >>= 7; + if (!(value != sign || ((chr ^ sign) & 0x40) != 0)) + { + if (count < padTo) chr |= 0x80; + if (!ostr.write(reinterpret_cast(&chr), 1)) return false; + break; + } + chr |= 0x80; + if (!ostr.put(chr)) return false; + } + + if (count < padTo) + { + char chr = (sign < 0) ? 0x7F : 0x00; + while (++count < padTo) + if (!ostr.put(chr | 0x80)) return false; + if (!ostr.put(chr)) return false; + } + return true; +} + +template +static bool ReadSignedBinary(std::istream &istr, T &value) +{ + value = 0; + unsigned char chr; + unsigned shift = 0; + while (true) // signed LEB128 + { + if (!istr.read(reinterpret_cast(&chr), 1)) return false; + if (shift < sizeof(T) * 8 - 1) + value |= (static_cast(chr & 0x7F) << shift); + shift += 7; + if ((chr & 0x80) == 0) break; + } + + if (shift >= 8 * sizeof(T) - 1) shift = 8 * sizeof(T) - 1; + if ((chr & 0x40) != 0) + value |= static_cast(-1) << shift; + + return true; +} + +bool WriteWord(std::ostream &ostr, unsigned short w) +{ + return WriteBinary(ostr, w); +} + +bool ReadWord(std::istream &istr, unsigned short &w) +{ + return ReadBinary(istr, w); +} + +bool WriteByte(std::ostream &ostr, char c) +{ + if (!ostr.put(c)) return false; + return true; +} + +bool ReadByte(std::istream &istr, char& c) +{ + if (!istr.get(c)) return false; + return true; +} + +bool WriteShort(std::ostream &ostr, short s) +{ + return WriteSignedBinary(ostr, s); +} + +bool ReadShort(std::istream &istr, short &s) +{ + return ReadSignedBinary(istr, s); +} + +bool WriteInt(std::ostream &ostr, int i) +{ + return WriteSignedBinary(ostr, i); +} + +bool ReadInt(std::istream &istr, int &i) +{ + return ReadSignedBinary(istr, i); +} + +bool WriteLong(std::ostream &ostr, long l, unsigned padTo) +{ + return WriteSignedBinary(ostr, l, padTo); +} + +bool ReadLong(std::istream &istr, long &l) +{ + return ReadSignedBinary(istr, l); +} + +bool WriteFloat(std::ostream &ostr, float f) +{ + union {float fValue; unsigned int iValue;} u; + u.fValue = 0.0f; + u.iValue = 0; + + u.fValue = f; + return WriteBinary(ostr, u.iValue); +} + +bool ReadFloat(std::istream &istr, float &f) +{ + union {float fValue; unsigned int iValue;} u; + u.fValue = 0.0f; + u.iValue = 0; + + if (!ReadBinary(istr, u.iValue)) return false; + f = u.fValue; + return true; +} + +bool WriteDouble(std::ostream &ostr, double d) +{ + union {double dValue; unsigned long iValue;} u; + u.dValue = 0.0; + u.iValue = 0; + + u.dValue = d; + return WriteBinary(ostr, u.iValue); +} + +bool ReadDouble(std::istream &istr, double &d) +{ + union {double dValue; unsigned long iValue;} u; + u.dValue = 0.0; + u.iValue = 0; + + if (!ReadBinary(istr, u.iValue)) return false; + d = u.dValue; + return true; +} + +bool WriteString(std::ostream &ostr, const std::string &s) +{ + if (!WriteBinary(ostr, s.size())) return false; + if (!ostr.write(&(s[0]), s.size())) return false; + + return true; +} + +bool ReadString(std::istream &istr, std::string &s) +{ + size_t length = 0; + if (!ReadBinary(istr, length)) return false; + + s.resize(length); + if (length != 0) + { + if (!istr.read(&(s[0]), length)) return false; + } + return true; +} + +bool WriteType(std::ostream &ostr, const CBotTypResult &type) +{ + int typ = type.GetType(); + if ( typ == CBotTypIntrinsic ) typ = CBotTypClass; + if ( !WriteWord(ostr, typ) ) return false; + if ( typ == CBotTypClass ) + { + CBotClass* p = type.GetClass(); + if (!WriteString(ostr, p->GetName())) return false; + } + if ( type.Eq( CBotTypArrayBody ) || + type.Eq( CBotTypArrayPointer ) ) + { + if (!WriteWord(ostr, type.GetLimite())) return false; + if (!WriteType(ostr, type.GetTypElem())) return false; + } + + if ( type.Eq(CBotTypPointer) ) + { + if (type.GetClass() != nullptr) + { + if (!WriteString(ostr, type.GetClass()->GetName())) return false; + } + else if (!WriteString(ostr, "")) return false; + } + return true; +} + +bool ReadType(std::istream &istr, CBotTypResult &type) { unsigned short w, ww; - if ( !ReadWord(pf, w) ) return false; + if (!ReadWord(istr, w)) return false; type.SetType(w); if ( type.Eq( CBotTypIntrinsic ) ) @@ -154,7 +276,7 @@ bool ReadType(FILE* pf, CBotTypResult &type) if ( type.Eq( CBotTypClass ) ) { std::string s; - if ( !ReadString(pf, s) ) return false; + if (!ReadString(istr, s)) return false; type = CBotTypResult( w, s ); } @@ -162,11 +284,45 @@ bool ReadType(FILE* pf, CBotTypResult &type) type.Eq( CBotTypArrayBody ) ) { CBotTypResult r; - if ( !ReadWord(pf, ww) ) return false; - if ( !ReadType(pf, r) ) return false; + if (!ReadWord(istr, ww)) return false; + if (!ReadType(istr, r)) return false; type = CBotTypResult( w, r ); type.SetLimite(static_cast(ww)); } + + if ( type.Eq(CBotTypPointer) ) + { + std::string className; + if (!ReadString(istr, className)) return false; + type = CBotTypResult(w, className); + } + return true; +} + +bool WriteStream(std::ostream &ostr, std::istream& istr) +{ + if (!istr.seekg(0, istr.end)) return false; + auto size = istr.tellg(); + + if (size == 0) return WriteLong(ostr, 0); + if (!WriteLong(ostr, size)) return false; + + if (!istr.seekg(0, istr.beg)) return false; + if (!(ostr << istr.rdbuf())) return false; + + return true; +} + +bool ReadStream(std::istream& istr, std::ostream &ostr) +{ + long length; + if (!ReadLong(istr, length)) return false; + if (length == 0) return true; + + while (length-- > 0) + { + if (!(ostr << istr.get())) return false; + } return true; } diff --git a/src/CBot/CBotFileUtils.h b/src/CBot/CBotFileUtils.h index fec6298a..8f739cb4 100644 --- a/src/CBot/CBotFileUtils.h +++ b/src/CBot/CBotFileUtils.h @@ -19,7 +19,7 @@ #pragma once -#include +#include #include namespace CBot @@ -28,128 +28,173 @@ namespace CBot class CBotVar; class CBotTypResult; -/////////////////////////////////////////////////////////////////////////////// -// routines for file management (* FILE) - /*! - * \brief fOpen - * \param name - * \param mode - * \return + * \brief Save a linked list if variables + * \param ostr Output stream + * \param pVar First variable in the list + * \return true on success */ -FILE* fOpen(const char* name, const char* mode); - -/*! - * \brief fClose - * \param filehandle - * \return - */ -int fClose(FILE* filehandle); - -/*! - * \brief fWrite - * \param buffer - * \param elemsize - * \param length - * \param filehandle - * \return - */ -std::size_t fWrite(const void *buffer, - std::size_t elemsize, - std::size_t length, - FILE* filehandle); - -/*! - * \brief fRead - * \param buffer - * \param elemsize - * \param length - * \param filehandle - * \return - */ -std::size_t fRead(void *buffer, - std::size_t elemsize, - std::size_t length, - FILE* filehandle); - -/*! - * \brief SaveVars - * \param pf - * \param pVar - * \return - */ -bool SaveVars(FILE* pf, CBotVar* pVar); +bool SaveVars(std::ostream &ostr, CBotVar* pVar); /*! * \brief WriteWord - * \param pf + * \param ostr Output stream * \param w - * \return + * \return true on success */ -bool WriteWord(FILE* pf, unsigned short w); +bool WriteWord(std::ostream &ostr, unsigned short w); /*! * \brief ReadWord - * \param pf - * \param w - * \return + * \param istr Input stream + * \param[out] w + * \return true on success */ -bool ReadWord(FILE* pf, unsigned short& w); +bool ReadWord(std::istream &istr, unsigned short &w); /*! - * \brief ReadLong - * \param pf - * \param w - * \return + * \brief WriteByte + * \param ostr Output stream + * \param c + * \return true on success */ -bool ReadLong(FILE* pf, long& w); +bool WriteByte(std::ostream &ostr, char c); /*! - * \brief WriteFloat - * \param pf - * \param w - * \return + * \brief ReadByte + * \param istr Input stream + * \param[out] c + * \return true on success */ -bool WriteFloat(FILE* pf, float w); +bool ReadByte(std::istream &istr, char& c); + +/*! + * \brief WriteShort + * \param ostr Output stream + * \param s + * \return true on success + */ +bool WriteShort(std::ostream &ostr, short s); + +/*! + * \brief ReadShort + * \param istr Input stream + * \param[out] s + * \return true on success + */ +bool ReadShort(std::istream &istr, short &s); + +/*! + * \brief WriteInt + * \param ostr Output stream + * \param i + * \return true on success + */ +bool WriteInt(std::ostream &ostr, int i); + +/*! + * \brief ReadInt + * \param istr Input stream + * \param[out] i + * \return true on success + */ +bool ReadInt(std::istream &istr, int &i); /*! * \brief WriteLong - * \param pf - * \param w - * \return + * \param ostr Output stream + * \param l + * \param padTo minimum number of bytes to write + * \return true on success */ -bool WriteLong(FILE* pf, long w); +bool WriteLong(std::ostream &ostr, long l, unsigned padTo = 0); + +/*! + * \brief ReadLong + * \param istr Input stream + * \param[out] l + * \return true on success + */ +bool ReadLong(std::istream &istr, long &l); + +/*! + * \brief WriteFloat + * \param ostr Output stream + * \param f + * \return true on success + */ +bool WriteFloat(std::ostream &ostr, float f); /*! * \brief ReadFloat - * \param pf - * \param w - * \return + * \param istr Input stream + * \param[out] f + * \return true on success */ -bool ReadFloat(FILE* pf, float& w); +bool ReadFloat(std::istream &istr, float &f); + +/*! + * \brief WriteDouble + * \param ostr Output stream + * \param d + * \return true on success + */ +bool WriteDouble(std::ostream &ostr, double d); + +/*! + * \brief ReadDouble + * \param istr Input stream + * \param[out] d + * \return true on success + */ +bool ReadDouble(std::istream &istr, double &d); + +/*! + * \brief WriteString + * \param ostr Output stream + * \param s + * \return true on success + */ +bool WriteString(std::ostream &ostr, const std::string &s); /*! * \brief ReadString - * \param pf - * \param s - * \return + * \param istr Input stream + * \param[out] s + * \return true on success */ -bool ReadString(FILE* pf, std::string& s); +bool ReadString(std::istream &istr, std::string &s); /*! * \brief WriteType - * \param pf + * \param ostr Output stream * \param type - * \return + * \return true on success */ -bool WriteType(FILE* pf, const CBotTypResult &type); +bool WriteType(std::ostream &ostr, const CBotTypResult &type); /*! * \brief ReadType - * \param pf - * \param type - * \return + * \param istr Input stream + * \param[out] type + * \return true on success */ -bool ReadType(FILE* pf, CBotTypResult &type); +bool ReadType(std::istream &istr, CBotTypResult &type); + +/*! + * \brief WriteStream + * \param ostr Output stream + * \param istr Input stream + * \return true on success + */ +bool WriteStream(std::ostream &ostr, std::istream& istr); + +/*! + * \brief ReadStream + * \param istr Input stream + * \param ostr Output stream + * \return true on success + */ +bool ReadStream(std::istream& istr, std::ostream &ostr); } // namespace CBot diff --git a/src/CBot/CBotProgram.cpp b/src/CBot/CBotProgram.cpp index e8065f47..14ec2b2e 100644 --- a/src/CBot/CBotProgram.cpp +++ b/src/CBot/CBotProgram.cpp @@ -24,7 +24,6 @@ #include "CBot/CBotCStack.h" #include "CBot/CBotClass.h" #include "CBot/CBotUtils.h" -#include "CBot/CBotFileUtils.h" #include "CBot/CBotInstr/CBotFunction.h" @@ -332,51 +331,56 @@ bool CBotProgram::DefineNum(const std::string& name, long val) } //////////////////////////////////////////////////////////////////////////////// -bool CBotProgram::SaveState(FILE* pf) +bool CBotProgram::SaveState(std::ostream &ostr) { - if (!WriteWord( pf, CBOTVERSION)) return false; + if (!WriteLong(ostr, CBOTVERSION)) return false; if (m_stack != nullptr ) { - if (!WriteWord( pf, 1)) return false; - if (!WriteString( pf, m_entryPoint->GetName() )) return false; - if (!m_stack->SaveState(pf)) return false; + if (!WriteWord(ostr, 1)) return false; + if (!WriteString(ostr, m_entryPoint->GetName())) return false; + if (!m_stack->SaveState(ostr)) return false; } else { - if (!WriteWord( pf, 0)) return false; + if (!WriteWord(ostr, 0)) return false; } return true; } -bool CBotProgram::RestoreState(FILE* pf) +bool CBotProgram::RestoreState(std::istream &istr) { unsigned short w; std::string s; Stop(); - if (!ReadWord( pf, w )) return false; - if ( w != CBOTVERSION ) return false; + long version; + if (!ReadLong(istr, version)) return false; + if ( version != CBOTVERSION ) return false; - if (!ReadWord( pf, w )) return false; + if (!ReadWord(istr, w)) return false; if ( w == 0 ) return true; - if (!ReadString( pf, s )) return false; - Start(s); // point de reprise + // don't restore if compile error exists + if (m_error != CBotNoErr) return false; - if (m_stack != nullptr) + if (!ReadString(istr, s)) return false; + if (!Start(s)) return false; // point de reprise + // Start() already created the new stack + // and called m_stack->SetProgram(this); + + // retrieves the stack from the memory + if (!m_stack->RestoreState(istr, m_stack)) { m_stack->Delete(); m_stack = nullptr; + m_stack = CBotStack::AllocateStack(); // start from the top + m_stack->SetProgram(this); + return false; // signal error } - // retrieves the stack from the memory - m_stack = CBotStack::AllocateStack(); - if (!m_stack->RestoreState(pf, m_stack)) return false; - m_stack->SetProgram(this); // bases for routines - // restored some states in the stack according to the structure m_entryPoint->RestoreState(nullptr, m_stack, m_thisVar); return true; diff --git a/src/CBot/CBotProgram.h b/src/CBot/CBotProgram.h index e258fff0..c448b82c 100644 --- a/src/CBot/CBotProgram.h +++ b/src/CBot/CBotProgram.h @@ -282,27 +282,20 @@ public: /** * \brief Save the current execution status into a file - * \param pf - * \parblock - * file handle - * - * This file handle must have been opened by this library! Otherwise crashes on Windows - * - * TODO: Verify this - * \endparblock + * \param ostr Output stream * \return true on success, false on write error */ - bool SaveState(FILE* pf); + bool SaveState(std::ostream &ostr); /** * \brief Restore the execution state from a file * * The previous program code must already have been recompiled with Compile() before calling this function * - * \param pf file handle + * \param istr Input stream * \return true on success, false on read error */ - bool RestoreState(FILE* pf); + bool RestoreState(std::istream &istr); /** * \brief GetPosition Gives the position of a routine in the original text diff --git a/src/CBot/CBotStack.cpp b/src/CBot/CBotStack.cpp index 9f9db2d6..7f3c0b9a 100644 --- a/src/CBot/CBotStack.cpp +++ b/src/CBot/CBotStack.cpp @@ -26,7 +26,6 @@ #include "CBot/CBotVar/CBotVarPointer.h" #include "CBot/CBotVar/CBotVarClass.h" -#include "CBot/CBotFileUtils.h" #include "CBot/CBotUtils.h" #include "CBot/CBotExternalCall.h" @@ -687,108 +686,106 @@ CBotVar* CBotStack::GetStackVars(std::string& functionName, int level) } //////////////////////////////////////////////////////////////////////////////// -bool CBotStack::SaveState(FILE* pf) +bool CBotStack::SaveState(std::ostream &ostr) { if (m_next2 != nullptr) { - if (!WriteWord(pf, 2)) return false; // a marker of type (m_next2) - if (!m_next2->SaveState(pf)) return false; // saves the next element + if (!WriteWord(ostr, 2)) return false; // a marker of type (m_next2) + if (!m_next2->SaveState(ostr)) return false; // saves the next element } else { - if (!WriteWord(pf, 1)) return false; // a marker of type (m_next) + if (!WriteWord(ostr, 1)) return false; // a marker of type (m_next) } - if (!WriteWord(pf, static_cast(m_block))) return false; - if (!WriteWord(pf, m_state)) return false; - if (!WriteWord(pf, 0)) return false; // for backwards combatibility (m_bDontDelete) - if (!WriteWord(pf, m_step)) return false; + if (!WriteWord(ostr, static_cast(m_block))) return false; + if (!WriteInt(ostr, m_state)) return false; + if (!WriteWord(ostr, 0)) return false; // for backwards combatibility (m_bDontDelete) + if (!WriteInt(ostr, m_step)) return false; - - if (!SaveVars(pf, m_var)) return false; // current result - if (!SaveVars(pf, m_listVar)) return false; // local variables + if (!SaveVars(ostr, m_var)) return false; // current result + if (!SaveVars(ostr, m_listVar)) return false; // local variables if (m_next != nullptr) { - if (!m_next->SaveState(pf)) return false; // saves the next element + if (!m_next->SaveState(ostr)) return false; // saves the next element } else { - if (!WriteWord(pf, 0)) return false; // terminator + if (!WriteWord(ostr, 0)) return false; // 0 - CBotStack::SaveState terminator } return true; } -bool SaveVars(FILE* pf, CBotVar* pVar) +bool SaveVars(std::ostream &ostr, CBotVar* pVar) { while (pVar != nullptr) { - if (!pVar->Save0State(pf)) return false; // common header - if (!pVar->Save1State(pf)) return false; // saves the data + if (!pVar->Save0State(ostr)) return false; // common header + if (!pVar->Save1State(ostr)) return false; // saves the data pVar = pVar->GetNext(); } - return WriteWord(pf, 0); // terminator + return WriteWord(ostr, 0); // 0 - CBot::SaveVars terminator } //////////////////////////////////////////////////////////////////////////////// -bool CBotStack::RestoreState(FILE* pf, CBotStack* &pStack) +bool CBotStack::RestoreState(std::istream &istr, CBotStack* &pStack) { unsigned short w; if (pStack != this) pStack = nullptr; - if (!ReadWord(pf, w)) return false; - if ( w == 0 ) return true; // 0 - terminator + if (!ReadWord(istr, w)) return false; + if ( w == 0 ) return true; // 0 - CBotStack::SaveState terminator if (pStack == nullptr) pStack = AddStack(); if ( w == 2 ) // 2 - m_next2 { - if (!pStack->RestoreState(pf, pStack->m_next2)) return false; + if (!pStack->RestoreState(istr, pStack->m_next2)) return false; } - if (!ReadWord(pf, w)) return false; + if (!ReadWord(istr, w)) return false; pStack->m_block = static_cast(w); - if (!ReadWord(pf, w)) return false; - pStack->SetState(static_cast(w)); + int state; + if (!ReadInt(istr, state)) return false; + pStack->SetState(state); - if (!ReadWord(pf, w)) return false; // backwards compatibility (m_bDontDelete) + if (!ReadWord(istr, w)) return false; // backwards compatibility (m_bDontDelete) - if (!ReadWord(pf, w)) return false; - pStack->m_step = w; + if (!ReadInt(istr, state)) return false; + pStack->m_step = state; - if (!CBotVar::RestoreState(pf, pStack->m_var)) return false; // temp variable - if (!CBotVar::RestoreState(pf, pStack->m_listVar)) return false;// local variables + if (!CBotVar::RestoreState(istr, pStack->m_var)) return false; // temp variable + if (!CBotVar::RestoreState(istr, pStack->m_listVar)) return false; // local variables - return pStack->RestoreState(pf, pStack->m_next); + return pStack->RestoreState(istr, pStack->m_next); } //////////////////////////////////////////////////////////////////////////////// -bool CBotVar::Save0State(FILE* pf) +bool CBotVar::Save0State(std::ostream &ostr) { - if (!WriteWord(pf, 100+static_cast(m_mPrivate)))return false; // private variable? - if (!WriteWord(pf, m_bStatic))return false; // static variable? - if (!WriteWord(pf, m_type.GetType()))return false; // saves the type (always non-zero) + if (!WriteWord(ostr, 100+static_cast(m_mPrivate)))return false; // private variable? + if (!WriteWord(ostr, m_bStatic))return false; // static variable? + if (!WriteWord(ostr, m_type.GetType()))return false; // saves the type (always non-zero) if (m_type.Eq(CBotTypPointer) && GetPointer() != nullptr) { if (GetPointer()->m_bConstructor) // constructor was called? { - if (!WriteWord(pf, (2000 + static_cast(m_binit)) )) return false; - return WriteString(pf, m_token->GetString()); // and variable name + if (!WriteWord(ostr, (2000 + static_cast(m_binit)) )) return false; + return WriteString(ostr, m_token->GetString()); // and variable name } } - if (!WriteWord(pf, static_cast(m_binit))) return false; // variable defined? - return WriteString(pf, m_token->GetString()); // and variable name + if (!WriteWord(ostr, static_cast(m_binit))) return false; // variable defined? + return WriteString(ostr, m_token->GetString()); // and variable name } //////////////////////////////////////////////////////////////////////////////// -bool CBotVar::RestoreState(FILE* pf, CBotVar* &pVar) +bool CBotVar::RestoreState(std::istream &istr, CBotVar* &pVar) { unsigned short w, wi, prv, st; - float ww; - std::string name, s; delete pVar; @@ -798,27 +795,27 @@ bool CBotVar::RestoreState(FILE* pf, CBotVar* &pVar) while ( true ) // retrieves a list { - if (!ReadWord(pf, w)) return false; // private or type? - if ( w == 0 ) return true; + if (!ReadWord(istr, w)) return false; // private or type? + if ( w == 0 ) return true; // 0 - CBot::SaveVars terminator std::string defnum; if ( w == 200 ) { - if (!ReadString(pf, defnum)) return false; // number with identifier - if (!ReadWord(pf, w)) return false; // type + if (!ReadString(istr, defnum)) return false; // number with identifier + if (!ReadWord(istr, w)) return false; // type } prv = 100; st = 0; if ( w >= 100 ) { prv = w; - if (!ReadWord(pf, st)) return false; // static - if (!ReadWord(pf, w)) return false; // type + if (!ReadWord(istr, st)) return false; // static + if (!ReadWord(istr, w)) return false; // type } if ( w == CBotTypClass ) w = CBotTypIntrinsic; // necessarily intrinsic - if (!ReadWord(pf, wi)) return false; // init ? + if (!ReadWord(istr, wi)) return false; // init ? bool bConstructor = false; if (w == CBotTypPointer && wi >= 2000) { @@ -827,31 +824,40 @@ bool CBotVar::RestoreState(FILE* pf, CBotVar* &pVar) } CBotVar::InitType initType = static_cast(wi); - if (!ReadString(pf, name)) return false; // variable name - - CBotToken token(name, std::string()); + std::string varname; + if (!ReadString(istr, varname)) return false; // variable name + CBotToken token(varname, std::string()); bool isClass = false; switch (w) { - case CBotTypInt: case CBotTypBoolean: + char valByte; + if (!ReadByte(istr, valByte)) return false; pNew = CBotVar::Create(token, w); // creates a variable - if (!ReadWord(pf, w)) return false; - pNew->SetValInt(static_cast(w), defnum); + pNew->SetValInt(valByte); + break; + case CBotTypInt: + int valInt; + if (!ReadInt(istr, valInt)) return false; + pNew = CBotVar::Create(token, w); // creates a variable + pNew->SetValInt(valInt, defnum); break; case CBotTypFloat: + float valFloat; + if (!ReadFloat(istr, valFloat)) return false; pNew = CBotVar::Create(token, w); // creates a variable - if (!ReadFloat(pf, ww)) return false; - pNew->SetValFloat(ww); + pNew->SetValFloat(valFloat); break; case CBotTypString: - pNew = CBotVar::Create(token, w); // creates a variable - if (!ReadString(pf, s)) return false; - pNew->SetValString(s); - break; - + { + std::string valString; + if (!ReadString(istr, valString)) return false; + pNew = CBotVar::Create(token, w); // creates a variable + pNew->SetValString(valString); + break; + } // returns an intrinsic object or element of an array case CBotTypIntrinsic: isClass = true; @@ -859,17 +865,16 @@ bool CBotVar::RestoreState(FILE* pf, CBotVar* &pVar) { CBotTypResult r; long id; - if (!ReadType(pf, r)) return false; // complete type - if (!ReadLong(pf, id) ) return false; + if (!ReadType(istr, r)) return false; // complete type + if (!ReadLong(istr, id)) return false; -// if (!ReadString(pf, s)) return false; { CBotVar* p = nullptr; if ( id ) p = CBotVarClass::Find(id) ; pNew = new CBotVarClass(token, r); // directly creates an instance // attention cptuse = 0 - if ( !RestoreState(pf, (static_cast(pNew))->m_pVar)) return false; + if (!RestoreState(istr, (static_cast(pNew))->m_pVar)) return false; pNew->SetIdent(id); if (isClass && p == nullptr) // set id for each item in this instance @@ -895,18 +900,20 @@ bool CBotVar::RestoreState(FILE* pf, CBotVar* &pVar) case CBotTypPointer: case CBotTypNullPointer: - if (!ReadString(pf, s)) return false; // name of the class + { + std::string className; + if (!ReadString(istr, className)) return false; // name of the class { - CBotTypResult ptrType(w, s); - pNew = CBotVar::Create(token, ptrType);// creates a variable // CBotVarClass* p = nullptr; long id; - ReadLong(pf, id); + if (!ReadLong(istr, id)) return false; // if ( id ) p = CBotVarClass::Find(id); // found the instance (made by RestoreInstance) + CBotTypResult ptrType(w, className); + pNew = CBotVar::Create(token, ptrType); // creates a variable // returns a copy of the original instance CBotVar* pInstance = nullptr; - if ( !CBotVar::RestoreState( pf, pInstance ) ) return false; + if (!CBotVar::RestoreState(istr, pInstance)) return false; (static_cast(pNew))->SetPointer( pInstance ); // and point over if (bConstructor) pNew->ConstructorSet(); // constructor was called @@ -916,22 +923,22 @@ bool CBotVar::RestoreState(FILE* pf, CBotVar* &pVar) } break; - + } case CBotTypArrayPointer: { CBotTypResult r; - if (!ReadType(pf, r)) return false; + if (!ReadType(istr, r)) return false; pNew = CBotVar::Create(token, r); // creates a variable // returns a copy of the original instance CBotVar* pInstance = nullptr; - if ( !CBotVar::RestoreState( pf, pInstance ) ) return false; + if (!CBotVar::RestoreState(istr, pInstance)) return false; (static_cast(pNew))->SetPointer( pInstance ); // and point over } break; default: - assert(0); + return false; // signal error } if ( pPrev != nullptr ) pPrev->m_next = pNew; diff --git a/src/CBot/CBotStack.h b/src/CBot/CBotStack.h index a72b3e4a..498ccd78 100644 --- a/src/CBot/CBotStack.h +++ b/src/CBot/CBotStack.h @@ -434,8 +434,8 @@ public: //! \name Write to file //@{ - bool SaveState(FILE* pf); - bool RestoreState(FILE* pf, CBotStack* &pStack); + bool SaveState(std::ostream &ostr); + bool RestoreState(std::istream &istr, CBotStack* &pStack); //@} diff --git a/src/CBot/CBotUtils.cpp b/src/CBot/CBotUtils.cpp index a6c6ef9c..a87e2943 100644 --- a/src/CBot/CBotUtils.cpp +++ b/src/CBot/CBotUtils.cpp @@ -108,38 +108,6 @@ CBotTypResult ArrayType(CBotToken* &p, CBotCStack* pile, CBotTypResult type) return type; } -//////////////////////////////////////////////////////////////////////////////// -bool WriteWord(FILE* pf, unsigned short w) -{ - size_t lg; - - lg = fwrite(&w, sizeof( unsigned short ), 1, pf ); - - return (lg == 1); -} - -//////////////////////////////////////////////////////////////////////////////// -bool WriteString(FILE* pf, std::string s) -{ - size_t lg1, lg2; - - lg1 = s.size(); - if (!WriteWord(pf, lg1)) return false; - - lg2 = fwrite(s.c_str(), 1, lg1, pf ); - return (lg1 == lg2); -} - -//////////////////////////////////////////////////////////////////////////////// -bool WriteFloat(FILE* pf, float w) -{ - size_t lg; - - lg = fwrite(&w, sizeof( float ), 1, pf ); - - return (lg == 1); -} - //////////////////////////////////////////////////////////////////////////////// long GetNumInt(const std::string& str) { diff --git a/src/CBot/CBotUtils.h b/src/CBot/CBotUtils.h index 9042b0f8..5b58535c 100644 --- a/src/CBot/CBotUtils.h +++ b/src/CBot/CBotUtils.h @@ -19,9 +19,8 @@ #pragma once -#include "CBot/CBotTypResult.h" +#include "CBot/CBotFileUtils.h" -#include #include #include @@ -31,6 +30,8 @@ namespace CBot class CBotVar; class CBotToken; class CBotCStack; +class CBotTypResult; + /*! * \brief MakeListVars Transforms the array of pointers to variables in a @@ -58,30 +59,6 @@ CBotTypResult TypeParam(CBotToken* &p, CBotCStack* pile); */ CBotTypResult ArrayType(CBotToken* &p, CBotCStack* pile, CBotTypResult type); -/*! - * \brief WriteWord - * \param pf - * \param w - * \return - */ -bool WriteWord(FILE* pf, unsigned short w); - -/*! - * \brief WriteString - * \param pf - * \param s - * \return - */ -bool WriteString(FILE* pf, std::string s); - -/*! - * \brief WriteFloat - * \param pf - * \param w - * \return - */ -bool WriteFloat(FILE* pf, float w); - /*! * \brief GetNumInt Converts a string into integer may be of the form 0xabc123. * \param str diff --git a/src/CBot/CBotVar/CBotVar.cpp b/src/CBot/CBotVar/CBotVar.cpp index 62ba41f4..4886c033 100644 --- a/src/CBot/CBotVar/CBotVar.cpp +++ b/src/CBot/CBotVar/CBotVar.cpp @@ -134,7 +134,7 @@ void* CBotVar::GetUserPtr() } //////////////////////////////////////////////////////////////////////////////// -bool CBotVar::Save1State(FILE* pf) +bool CBotVar::Save1State(std::ostream &ostr) { // this routine "virtual" must never be called, // there must be a routine for each of the subclasses (CBotVarInt, CBotVarFloat, etc) diff --git a/src/CBot/CBotVar/CBotVar.h b/src/CBot/CBotVar/CBotVar.h index d2805ddf..980b8a71 100644 --- a/src/CBot/CBotVar/CBotVar.h +++ b/src/CBot/CBotVar/CBotVar.h @@ -623,28 +623,28 @@ public: /** * \brief Save common variable header (name, type, etc.) - * \param pf file pointer + * \param ostr Output stream * \return false on write error */ - virtual bool Save0State(FILE* pf); + virtual bool Save0State(std::ostream &ostr); /** * \brief Save variable data * * Overriden in child classes * - * \param pf file pointer + * \param ostr Output stream * \return false on write error */ - virtual bool Save1State(FILE* pf); + virtual bool Save1State(std::ostream &ostr); /** * \brief Restore variable - * \param pf file pointer + * \param istr Input stream * \param[out] pVar Pointer to recieve the variable * \return false on read error */ - static bool RestoreState(FILE* pf, CBotVar* &pVar); + static bool RestoreState(std::istream &istr, CBotVar* &pVar); //@} diff --git a/src/CBot/CBotVar/CBotVarArray.cpp b/src/CBot/CBotVar/CBotVarArray.cpp index 6462d119..05575dc1 100644 --- a/src/CBot/CBotVar/CBotVarArray.cpp +++ b/src/CBot/CBotVar/CBotVarArray.cpp @@ -20,7 +20,6 @@ #include "CBot/CBotVar/CBotVarArray.h" #include "CBot/CBotVar/CBotVarClass.h" #include "CBot/CBotToken.h" -#include "CBot/CBotFileUtils.h" #include "CBot/CBotEnums.h" @@ -137,10 +136,10 @@ std::string CBotVarArray::GetValString() } //////////////////////////////////////////////////////////////////////////////// -bool CBotVarArray::Save1State(FILE* pf) +bool CBotVarArray::Save1State(std::ostream &ostr) { - if ( !WriteType(pf, m_type) ) return false; - return SaveVars(pf, m_pInstance); // saves the instance that manages the table + if (!WriteType(ostr, m_type)) return false; + return SaveVars(ostr, m_pInstance); // saves the instance that manages the table } } // namespace CBot diff --git a/src/CBot/CBotVar/CBotVarArray.h b/src/CBot/CBotVar/CBotVarArray.h index 68b00b28..fb211055 100644 --- a/src/CBot/CBotVar/CBotVarArray.h +++ b/src/CBot/CBotVar/CBotVarArray.h @@ -51,7 +51,7 @@ public: std::string GetValString() override; - bool Save1State(FILE* pf) override; + bool Save1State(std::ostream &ostr) override; private: //! Array data diff --git a/src/CBot/CBotVar/CBotVarBoolean.cpp b/src/CBot/CBotVar/CBotVarBoolean.cpp index d36de078..b733e933 100644 --- a/src/CBot/CBotVar/CBotVarBoolean.cpp +++ b/src/CBot/CBotVar/CBotVarBoolean.cpp @@ -40,9 +40,9 @@ void CBotVarBoolean::Not() SetValInt(!GetValInt()); } -bool CBotVarBoolean::Save1State(FILE* pf) +bool CBotVarBoolean::Save1State(std::ostream &ostr) { - return WriteWord(pf, m_val); // the value of the variable + return WriteByte(ostr, m_val); // the value of the variable } } // namespace CBot diff --git a/src/CBot/CBotVar/CBotVarBoolean.h b/src/CBot/CBotVar/CBotVarBoolean.h index 44774a9f..da810e98 100644 --- a/src/CBot/CBotVar/CBotVarBoolean.h +++ b/src/CBot/CBotVar/CBotVarBoolean.h @@ -37,7 +37,7 @@ public: void XOr(CBotVar* left, CBotVar* right) override; void Not() override; - bool Save1State(FILE* pf) override; + bool Save1State(std::ostream &ostr) override; }; } // namespace CBot diff --git a/src/CBot/CBotVar/CBotVarClass.cpp b/src/CBot/CBotVar/CBotVarClass.cpp index 36952d18..9d587c1f 100644 --- a/src/CBot/CBotVar/CBotVarClass.cpp +++ b/src/CBot/CBotVar/CBotVarClass.cpp @@ -23,8 +23,6 @@ #include "CBot/CBotStack.h" #include "CBot/CBotDefines.h" -#include "CBot/CBotFileUtils.h" - #include "CBot/CBotInstr/CBotInstr.h" #include @@ -464,12 +462,12 @@ bool CBotVarClass::Ne(CBotVar* left, CBotVar* right) } //////////////////////////////////////////////////////////////////////////////// -bool CBotVarClass::Save1State(FILE* pf) +bool CBotVarClass::Save1State(std::ostream &ostr) { - if ( !WriteType(pf, m_type) ) return false; - if ( !WriteLong(pf, m_ItemIdent) ) return false; + if (!WriteType(ostr, m_type)) return false; + if (!WriteLong(ostr, m_ItemIdent)) return false; - return SaveVars(pf, m_pVar); // content of the object + return SaveVars(ostr, m_pVar); // content of the object } } // namespace CBot diff --git a/src/CBot/CBotVar/CBotVarClass.h b/src/CBot/CBotVar/CBotVarClass.h index 55bdd891..34ec732e 100644 --- a/src/CBot/CBotVar/CBotVarClass.h +++ b/src/CBot/CBotVar/CBotVarClass.h @@ -54,7 +54,7 @@ public: CBotVar* GetItemList() override; std::string GetValString() override; - bool Save1State(FILE* pf) override; + bool Save1State(std::ostream &ostr) override; void Update(void* pUser) override; diff --git a/src/CBot/CBotVar/CBotVarFloat.cpp b/src/CBot/CBotVar/CBotVarFloat.cpp index a1c4217f..bfa1c1f9 100644 --- a/src/CBot/CBotVar/CBotVarFloat.cpp +++ b/src/CBot/CBotVar/CBotVarFloat.cpp @@ -22,9 +22,9 @@ namespace CBot { -bool CBotVarFloat::Save1State(FILE* pf) +bool CBotVarFloat::Save1State(std::ostream &ostr) { - return WriteFloat(pf, m_val); // the value of the variable + return WriteFloat(ostr, m_val); // the value of the variable } } // namespace CBot diff --git a/src/CBot/CBotVar/CBotVarFloat.h b/src/CBot/CBotVar/CBotVarFloat.h index 81cbcde0..dfdecd9b 100644 --- a/src/CBot/CBotVar/CBotVarFloat.h +++ b/src/CBot/CBotVar/CBotVarFloat.h @@ -32,7 +32,7 @@ class CBotVarFloat : public CBotVarNumber public: CBotVarFloat(const CBotToken &name) : CBotVarNumber(name) {} - bool Save1State(FILE* pf) override; + bool Save1State(std::ostream &ostr) override; }; } // namespace CBot diff --git a/src/CBot/CBotVar/CBotVarInt.cpp b/src/CBot/CBotVar/CBotVarInt.cpp index 477629ae..852566f9 100644 --- a/src/CBot/CBotVar/CBotVarInt.cpp +++ b/src/CBot/CBotVar/CBotVarInt.cpp @@ -45,17 +45,17 @@ std::string CBotVarInt::GetValString() void CBotVarInt::Neg() { CBotVarNumber::Neg(); - m_defnum.empty(); + m_defnum.clear(); } void CBotVarInt::Inc() { CBotVarNumber::Inc(); - m_defnum.empty(); + m_defnum.clear(); } void CBotVarInt::Dec() { CBotVarNumber::Dec(); - m_defnum.empty(); + m_defnum.clear(); } void CBotVarInt::XOr(CBotVar* left, CBotVar* right) @@ -90,22 +90,23 @@ void CBotVarInt::SR(CBotVar* left, CBotVar* right) void CBotVarInt::Not() { m_val = ~m_val; + m_defnum.clear(); } -bool CBotVarInt::Save0State(FILE* pf) +bool CBotVarInt::Save0State(std::ostream &ostr) { if (!m_defnum.empty()) { - if(!WriteWord(pf, 200)) return false; // special marker - if(!WriteString(pf, m_defnum)) return false; + if(!WriteWord(ostr, 200)) return false; // special marker + if(!WriteString(ostr, m_defnum)) return false; } - return CBotVar::Save0State(pf); + return CBotVar::Save0State(ostr); } -bool CBotVarInt::Save1State(FILE* pf) +bool CBotVarInt::Save1State(std::ostream &ostr) { - return WriteWord(pf, m_val); + return WriteInt(ostr, m_val); } } // namespace CBot diff --git a/src/CBot/CBotVar/CBotVarInt.h b/src/CBot/CBotVar/CBotVarInt.h index 906a402d..5e04135c 100644 --- a/src/CBot/CBotVar/CBotVarInt.h +++ b/src/CBot/CBotVar/CBotVarInt.h @@ -50,8 +50,8 @@ public: void SR(CBotVar* left, CBotVar* right) override; void ASR(CBotVar* left, CBotVar* right) override; - bool Save0State(FILE* pf) override; - bool Save1State(FILE* pf) override; + bool Save0State(std::ostream &ostr) override; + bool Save1State(std::ostream &ostr) override; protected: //! The name if given by DefineNum. diff --git a/src/CBot/CBotVar/CBotVarPointer.cpp b/src/CBot/CBotVar/CBotVarPointer.cpp index 2f78c90a..24f9a5cb 100644 --- a/src/CBot/CBotVar/CBotVarPointer.cpp +++ b/src/CBot/CBotVar/CBotVarPointer.cpp @@ -24,7 +24,6 @@ #include "CBot/CBotEnums.h" #include "CBot/CBotUtils.h" -#include "CBot/CBotFileUtils.h" #include @@ -171,21 +170,21 @@ CBotClass* CBotVarPointer::GetClass() } //////////////////////////////////////////////////////////////////////////////// -bool CBotVarPointer::Save1State(FILE* pf) +bool CBotVarPointer::Save1State(std::ostream &ostr) { if ( m_type.GetClass() != nullptr ) { - if (!WriteString(pf, m_type.GetClass()->GetName())) return false; // name of the class + if (!WriteString(ostr, m_type.GetClass()->GetName())) return false; // name of the class } else { - if (!WriteString(pf, "")) return false; + if (!WriteString(ostr, "")) return false; } - if (!WriteLong(pf, GetIdent())) return false; // the unique reference + if (!WriteLong(ostr, GetIdent())) return false; // the unique reference // also saves the proceedings copies - return SaveVars(pf, GetPointer()); + return SaveVars(ostr, GetPointer()); } //////////////////////////////////////////////////////////////////////////////// diff --git a/src/CBot/CBotVar/CBotVarPointer.h b/src/CBot/CBotVar/CBotVarPointer.h index 75c9bc98..6f9c0155 100644 --- a/src/CBot/CBotVar/CBotVarPointer.h +++ b/src/CBot/CBotVar/CBotVarPointer.h @@ -61,7 +61,7 @@ public: void ConstructorSet() override; - bool Save1State(FILE* pf) override; + bool Save1State(std::ostream &ostr) override; void Update(void* pUser) override; diff --git a/src/CBot/CBotVar/CBotVarString.cpp b/src/CBot/CBotVar/CBotVarString.cpp index 91a0e618..90856b82 100644 --- a/src/CBot/CBotVar/CBotVarString.cpp +++ b/src/CBot/CBotVar/CBotVarString.cpp @@ -37,9 +37,9 @@ bool CBotVarString::Ne(CBotVar* left, CBotVar* right) return left->GetValString() != right->GetValString(); } -bool CBotVarString::Save1State(FILE* pf) +bool CBotVarString::Save1State(std::ostream &ostr) { - return WriteString(pf, m_val); + return WriteString(ostr, m_val); } } // namespace CBot diff --git a/src/CBot/CBotVar/CBotVarString.h b/src/CBot/CBotVar/CBotVarString.h index d01a80f6..ac04a310 100644 --- a/src/CBot/CBotVar/CBotVarString.h +++ b/src/CBot/CBotVar/CBotVarString.h @@ -63,7 +63,7 @@ public: bool Eq(CBotVar* left, CBotVar* right) override; bool Ne(CBotVar* left, CBotVar* right) override; - bool Save1State(FILE* pf) override; + bool Save1State(std::ostream &ostr) override; private: template diff --git a/src/CBot/CBotVar/CBotVarValue.h b/src/CBot/CBotVar/CBotVarValue.h index 76e820e8..5e58075d 100644 --- a/src/CBot/CBotVar/CBotVarValue.h +++ b/src/CBot/CBotVar/CBotVarValue.h @@ -86,7 +86,10 @@ template class CBotVarNumberBase : public CBotVarValue { public: - CBotVarNumberBase(const CBotToken &name) : CBotVarValue(name) {} + CBotVarNumberBase(const CBotToken &name) : CBotVarValue(name) + { + this->m_val = static_cast(0); + } void SetValInt(int val, const std::string &s = "") override { diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp index 58d90541..dea86bcb 100644 --- a/src/level/robotmain.cpp +++ b/src/level/robotmain.cpp @@ -4449,10 +4449,8 @@ void CRobotMain::SaveOneScript(CObject *obj) } //! Saves the stack of the program in execution of a robot -bool CRobotMain::SaveFileStack(CObject *obj, FILE *file, int objRank) +bool CRobotMain::SaveFileStack(CObject *obj, std::ostream &ostr) { - if (objRank == -1) return true; - if (! obj->Implements(ObjectInterfaceType::Programmable)) return true; CProgrammableObject* programmable = dynamic_cast(obj); @@ -4460,14 +4458,24 @@ bool CRobotMain::SaveFileStack(CObject *obj, FILE *file, int objRank) ObjectType type = obj->GetType(); if (type == OBJECT_HUMAN) return true; - return programmable->WriteStack(file); + long status = 1; + std::stringstream sstr(""); + + if (!programmable->WriteStack(sstr)) + { + GetLogger()->Error("WriteStack failed at object id = %i\n", obj->GetID()); + status = 100; // marked bad + } + + if (!CBot::WriteLong(ostr, status)) return false; + if (!CBot::WriteStream(ostr, sstr)) return false; + + return true; } //! Resumes the execution stack of the program in a robot -bool CRobotMain::ReadFileStack(CObject *obj, FILE *file, int objRank) +bool CRobotMain::ReadFileStack(CObject *obj, std::istream &istr) { - if (objRank == -1) return true; - if (! obj->Implements(ObjectInterfaceType::Programmable)) return true; CProgrammableObject* programmable = dynamic_cast(obj); @@ -4475,7 +4483,29 @@ bool CRobotMain::ReadFileStack(CObject *obj, FILE *file, int objRank) ObjectType type = obj->GetType(); if (type == OBJECT_HUMAN) return true; - return programmable->ReadStack(file); + long status; + if (!CBot::ReadLong(istr, status)) return false; + + if (status == 100) // was marked bad ? + { + if (!CBot::ReadLong(istr, status)) return false; + if (!istr.seekg(status, istr.cur)) return false; + return true; // next program + } + + if (status == 1) + { + std::stringstream sstr(""); + if (!CBot::ReadStream(istr, sstr)) return false; + + if (!programmable->ReadStack(sstr)) + { + GetLogger()->Error("ReadStack failed at object id = %i\n", obj->GetID()); + } + return true; // next program + } + + return false; // error: status == ?? } std::vector CRobotMain::GetNewScriptNames(ObjectType type) @@ -4670,25 +4700,36 @@ bool CRobotMain::IOWriteScene(std::string filename, std::string filecbot, std::s } // Writes the file of stacks of execution. - FILE* file = CBot::fOpen((CResourceManager::GetSaveLocation() + "/" + filecbot).c_str(), "wb"); - if (file == nullptr) return false; + COutputStream ostr(filecbot); + if (!ostr.is_open()) return false; + bool bError = false; long version = 1; - CBot::fWrite(&version, sizeof(long), 1, file); // version of COLOBOT + CBot::WriteLong(ostr, version); // version of COLOBOT version = CBot::CBotProgram::GetVersion(); - CBot::fWrite(&version, sizeof(long), 1, file); // version of CBOT + CBot::WriteLong(ostr, version); // version of CBOT + CBot::WriteWord(ostr, 0); // TODO - objRank = 0; for (CObject* obj : m_objMan->GetAllObjects()) { if (obj->GetType() == OBJECT_TOTO) continue; if (IsObjectBeingTransported(obj)) continue; if (obj->Implements(ObjectInterfaceType::Destroyable) && dynamic_cast(obj)->IsDying()) continue; - if (!SaveFileStack(obj, file, objRank++)) break; + if (!SaveFileStack(obj, ostr)) + { + GetLogger()->Error("SaveFileStack failed at object id = %i\n", obj->GetID()); + bError = true; + break; + } } - CBot::CBotClass::SaveStaticState(file); - CBot::fClose(file); + + if (!bError && !CBot::CBotClass::SaveStaticState(ostr)) + { + GetLogger()->Error("CBotClass save static state failed\n"); + } + + ostr.close(); if (!emergencySave) { @@ -4846,29 +4887,48 @@ CObject* CRobotMain::IOReadScene(std::string filename, std::string filecbot) m_ui->GetLoadingScreen()->SetProgress(0.95f, RT_LOADING_CBOT_SAVE); // Reads the file of stacks of execution. - FILE* file = CBot::fOpen((CResourceManager::GetSaveLocation() + "/" + filecbot).c_str(), "rb"); - if (file != nullptr) + CInputStream istr(filecbot); + + if (istr.is_open()) { - long version; - CBot::fRead(&version, sizeof(long), 1, file); // version of COLOBOT + bool bError = false; + long version = 0; + CBot::ReadLong(istr, version); // version of COLOBOT if (version == 1) { - CBot::fRead(&version, sizeof(long), 1, file); // version of CBOT + CBot::ReadLong(istr, version); // version of CBOT if (version == CBot::CBotProgram::GetVersion()) { - objRank = 0; - for (CObject* obj : m_objMan->GetAllObjects()) + unsigned short flag; + CBot::ReadWord(istr, flag); // TODO + bError = (flag != 0); + + if (!bError) for (CObject* obj : m_objMan->GetAllObjects()) { if (obj->GetType() == OBJECT_TOTO) continue; if (IsObjectBeingTransported(obj)) continue; if (obj->Implements(ObjectInterfaceType::Destroyable) && dynamic_cast(obj)->IsDying()) continue; - if (!ReadFileStack(obj, file, objRank++)) break; + if (!ReadFileStack(obj, istr)) + { + GetLogger()->Error("ReadFileStack failed at object id = %i\n", obj->GetID()); + bError = true; + break; + } + } + + if (!bError && !CBot::CBotClass::RestoreStaticState(istr)) + { + GetLogger()->Error("CBotClass restore static state failed\n"); + bError = true; } } + else + GetLogger()->Error("cbot.run file is wrong version: %i\n", version); } - CBot::CBotClass::RestoreStaticState(file); - CBot::fClose(file); + + if (bError) GetLogger()->Error("Restoring CBOT state failed at stream position: %li\n", istr.tellg()); + istr.close(); } m_ui->GetLoadingScreen()->SetProgress(1.0f, RT_LOADING_FINISHED); diff --git a/src/level/robotmain.h b/src/level/robotmain.h index 2614f2cc..2b4c7b03 100644 --- a/src/level/robotmain.h +++ b/src/level/robotmain.h @@ -308,8 +308,8 @@ public: void SaveAllScript(); void SaveOneScript(CObject *obj); - bool SaveFileStack(CObject *obj, FILE *file, int objRank); - bool ReadFileStack(CObject *obj, FILE *file, int objRank); + bool SaveFileStack(CObject *obj, std::ostream &ostr); + bool ReadFileStack(CObject *obj, std::istream &istr); //! Return list of scripts to load to robot created in BotFactory std::vector GetNewScriptNames(ObjectType type); diff --git a/src/object/implementation/programmable_impl.cpp b/src/object/implementation/programmable_impl.cpp index 5e370bdb..34be6c59 100644 --- a/src/object/implementation/programmable_impl.cpp +++ b/src/object/implementation/programmable_impl.cpp @@ -143,24 +143,43 @@ bool CProgrammableObjectImpl::IsProgram() // Load a stack of script implementation from a file. -bool CProgrammableObjectImpl::ReadStack(FILE *file) +bool CProgrammableObjectImpl::ReadStack(std::istream &istr) { short op; - CBot::fRead(&op, sizeof(short), 1, file); + if (!CBot::ReadShort(istr, op)) return false; if ( op == 1 ) // run ? { - CBot::fRead(&op, sizeof(short), 1, file); // program rank + if (!CBot::ReadShort(istr, op)) return false; // program rank if ( op >= 0 ) { if (m_object->Implements(ObjectInterfaceType::ProgramStorage)) { - assert(op < static_cast(dynamic_cast(m_object)->GetProgramCount())); + int count = static_cast(dynamic_cast(m_object)->GetProgramCount()); + if (!(op < count)) + { + GetLogger()->Info("Object program count: %i\n", count); + GetLogger()->Error("Error in file: program index out of range: %i\n", op); + return false; + } + m_currentProgram = dynamic_cast(m_object)->GetProgram(op); - if ( !m_currentProgram->script->ReadStack(file) ) return false; + if (!m_currentProgram->script->ReadStack(istr)) + { + GetLogger()->Error("Restore state failed at program index: %i\n", op); + int errNum = m_currentProgram->script->GetError(); + if (errNum != 0) + { + std::string errStr; + m_currentProgram->script->GetError(errStr); + GetLogger()->Error("Program reports error: %i:(%s)\n", errNum, errStr.c_str()); + } + return false; + } } else { + GetLogger()->Error("Object is not a program storage object\n"); return false; } } @@ -171,7 +190,7 @@ bool CProgrammableObjectImpl::ReadStack(FILE *file) // Save the script implementation stack of a file. -bool CProgrammableObjectImpl::WriteStack(FILE *file) +bool CProgrammableObjectImpl::WriteStack(std::ostream &ostr) { short op; @@ -179,21 +198,25 @@ bool CProgrammableObjectImpl::WriteStack(FILE *file) m_currentProgram->script->IsRunning() ) { op = 1; // run - CBot::fWrite(&op, sizeof(short), 1, file); + if (!CBot::WriteShort(ostr, op)) return false; op = -1; if (m_object->Implements(ObjectInterfaceType::ProgramStorage)) { op = dynamic_cast(m_object)->GetProgramIndex(m_currentProgram); } - CBot::fWrite(&op, sizeof(short), 1, file); + if (!CBot::WriteShort(ostr, op)) return false; - return m_currentProgram->script->WriteStack(file); + if (!m_currentProgram->script->WriteStack(ostr)) + { + GetLogger()->Error("Save state failed at program index: %i\n", op); + return false; + } + return true; } op = 0; // stop - CBot::fWrite(&op, sizeof(short), 1, file); - return true; + return CBot::WriteShort(ostr, op); } diff --git a/src/object/implementation/programmable_impl.h b/src/object/implementation/programmable_impl.h index a0b78096..38b8be7c 100644 --- a/src/object/implementation/programmable_impl.h +++ b/src/object/implementation/programmable_impl.h @@ -58,8 +58,8 @@ public: Program* GetCurrentProgram() override; void StopProgram() override; - bool ReadStack(FILE *file) override; - bool WriteStack(FILE *file) override; + bool ReadStack(std::istream &istr) override; + bool WriteStack(std::ostream &ostr) override; void TraceRecordStart() override; void TraceRecordStop() override; diff --git a/src/object/interface/programmable_object.h b/src/object/interface/programmable_object.h index 05f1a92c..1ce0d5d4 100644 --- a/src/object/interface/programmable_object.h +++ b/src/object/interface/programmable_object.h @@ -53,9 +53,9 @@ public: virtual bool IsProgram() = 0; //! Save current execution status to file - virtual bool WriteStack(FILE *file) = 0; + virtual bool WriteStack(std::ostream &ostr) = 0; //! Read current execution status from file - virtual bool ReadStack(FILE *file) = 0; + virtual bool ReadStack(std::istream &istr) = 0; //! Start recording trace virtual void TraceRecordStart() = 0; diff --git a/src/script/script.cpp b/src/script/script.cpp index a94e850f..22ae1024 100644 --- a/src/script/script.cpp +++ b/src/script/script.cpp @@ -1032,16 +1032,16 @@ bool CScript::WriteScript(const char* filename) // Reads a stack of script by execution as a file. -bool CScript::ReadStack(FILE *file) +bool CScript::ReadStack(std::istream &istr) { int nb; - CBot::fRead(&nb, sizeof(int), 1, file); - CBot::fRead(&m_ipf, sizeof(int), 1, file); - CBot::fRead(&m_errMode, sizeof(int), 1, file); + if (!CBot::ReadInt(istr, nb)) return false; + if (!CBot::ReadInt(istr, m_ipf)) return false; + if (!CBot::ReadInt(istr, m_errMode)) return false; if (m_botProg == nullptr) return false; - if ( !m_botProg->RestoreState(file) ) return false; + if (!m_botProg->RestoreState(istr)) return false; m_bRun = true; m_bContinue = false; @@ -1050,16 +1050,16 @@ bool CScript::ReadStack(FILE *file) // Writes a stack of script by execution as a file. -bool CScript::WriteStack(FILE *file) +bool CScript::WriteStack(std::ostream &ostr) { int nb; nb = 2; - CBot::fWrite(&nb, sizeof(int), 1, file); - CBot::fWrite(&m_ipf, sizeof(int), 1, file); - CBot::fWrite(&m_errMode, sizeof(int), 1, file); + if (!CBot::WriteInt(ostr, nb)) return false; + if (!CBot::WriteInt(ostr, m_ipf)) return false; + if (!CBot::WriteInt(ostr, m_errMode)) return false; - return m_botProg->SaveState(file); + return m_botProg->SaveState(ostr); } diff --git a/src/script/script.h b/src/script/script.h index f0f473fb..bc64dc23 100644 --- a/src/script/script.h +++ b/src/script/script.h @@ -88,8 +88,8 @@ public: bool SendScript(const char* text); bool ReadScript(const char* filename); bool WriteScript(const char* filename); - bool ReadStack(FILE *file); - bool WriteStack(FILE *file); + bool ReadStack(std::istream &istr); + bool WriteStack(std::ostream &ostr); bool Compare(CScript* other); void SetFilename(const std::string &filename); diff --git a/test/unit/CBot/CBot_test.cpp b/test/unit/CBot/CBot_test.cpp index cc3261b8..f16637bd 100644 --- a/test/unit/CBot/CBot_test.cpp +++ b/test/unit/CBot/CBot_test.cpp @@ -22,6 +22,9 @@ #include #include +extern bool g_cbotTestSaveState; +bool g_cbotTestSaveState = false; + using namespace CBot; class CBotUT : public testing::Test @@ -197,6 +200,23 @@ private: return ss.str(); } + static void TestSaveAndRestore(CBotProgram* program) + { + std::stringstream sstr(""); + // save + if (!program->SaveState(sstr)) + throw CBotTestFail("CBotProgram::SaveState Failed"); + + if (!CBotClass::SaveStaticState(sstr)) + throw CBotTestFail("CBotClass::SaveStaticState Failed"); + // restore + if (!program->RestoreState(sstr)) + throw CBotTestFail("CBotProgram::RestoreState Failed"); + + if (!CBotClass::RestoreStaticState(sstr)) + throw CBotTestFail("CBotClass::RestoreStaticState Failed"); + } + protected: std::unique_ptr ExecuteTest(const std::string& code, CBotError expectedError = CBotNoErr) { @@ -231,7 +251,17 @@ protected: try { program->Start(test); - while (!program->Run()); + if (g_cbotTestSaveState) + { + while (!program->Run(nullptr, 0)) // save/restore at each step + { + TestSaveAndRestore(program.get()); + } + } + else + { + while (!program->Run(nullptr, 0)); // execute in step mode + } program->GetError(error, cursor1, cursor2); if (error != expectedRuntimeError) { diff --git a/test/unit/main.cpp b/test/unit/main.cpp index 91d640de..8bed282c 100644 --- a/test/unit/main.cpp +++ b/test/unit/main.cpp @@ -21,11 +21,21 @@ #include +extern bool g_cbotTestSaveState; + int main(int argc, char* argv[]) { CLogger logger; ::testing::InitGoogleTest(&argc, argv); + // parse arguments not removed by InitGoogleTest + for (int i = 1; i < argc; ++i) + { + std::string arg(argv[i]); + if (arg == "--CBotUT_TestSaveState") + g_cbotTestSaveState = true; + } + return RUN_ALL_TESTS(); } From 250ea57e8b2dfd081116ae93b07122e582c87363 Mon Sep 17 00:00:00 2001 From: melex750 Date: Thu, 11 Apr 2019 04:15:27 -0400 Subject: [PATCH 160/207] Fix arithmetic operations with integers (#993) Also fixed unsigned right shift operator ">>>" --- src/CBot/CBotInstr/CBotInstrUtils.cpp | 7 +++ src/CBot/CBotToken.cpp | 2 +- src/CBot/CBotVar/CBotVar.cpp | 5 ++ src/CBot/CBotVar/CBotVar.h | 1 + src/CBot/CBotVar/CBotVarInt.cpp | 26 +------- src/CBot/CBotVar/CBotVarInt.h | 18 +++--- src/CBot/CBotVar/CBotVarValue.h | 91 ++++++++++++++++++++------- test/unit/CBot/CBot_test.cpp | 14 +++++ 8 files changed, 109 insertions(+), 55 deletions(-) diff --git a/src/CBot/CBotInstr/CBotInstrUtils.cpp b/src/CBot/CBotInstr/CBotInstrUtils.cpp index 04c42211..774a4e37 100644 --- a/src/CBot/CBotInstr/CBotInstrUtils.cpp +++ b/src/CBot/CBotInstr/CBotInstrUtils.cpp @@ -129,6 +129,13 @@ bool TypeCompatible(CBotTypResult& type1, CBotTypResult& type2, int op) return true; } + if (op == ID_ASR || op == ID_SR || op == ID_SL || + op == ID_ASSOR || op == ID_ASSSL || op == ID_ASSSR || + op == ID_ASSAND || op == ID_ASSXOR || op == ID_ASSASR) + { + if (max > CBotTypLong) return false; + } + type1.SetType(max); type2.SetType(max); return true; diff --git a/src/CBot/CBotToken.cpp b/src/CBot/CBotToken.cpp index ea31fad9..b3a5a461 100644 --- a/src/CBot/CBotToken.cpp +++ b/src/CBot/CBotToken.cpp @@ -103,7 +103,7 @@ static const boost::bimap KEYWORDS = makeBimap>>="}, {ID_ASSASR, ">>="}, {ID_SL, "<<"}, - {ID_SR, ">>"}, + {ID_SR, ">>>"}, {ID_ASR, ">>"}, {ID_INC, "++"}, {ID_DEC, "--"}, diff --git a/src/CBot/CBotVar/CBotVar.cpp b/src/CBot/CBotVar/CBotVar.cpp index 4886c033..d9947e5b 100644 --- a/src/CBot/CBotVar/CBotVar.cpp +++ b/src/CBot/CBotVar/CBotVar.cpp @@ -752,6 +752,11 @@ CBotClass* CBotVar::GetClass() return nullptr; } +CBotVar::operator bool() +{ + return static_cast(GetValInt()); +} + CBotVar::operator int() { return GetValInt(); diff --git a/src/CBot/CBotVar/CBotVar.h b/src/CBot/CBotVar/CBotVar.h index 980b8a71..1a9c1498 100644 --- a/src/CBot/CBotVar/CBotVar.h +++ b/src/CBot/CBotVar/CBotVar.h @@ -444,6 +444,7 @@ public: */ //@{ + operator bool(); operator int(); operator float(); operator std::string(); diff --git a/src/CBot/CBotVar/CBotVarInt.cpp b/src/CBot/CBotVar/CBotVarInt.cpp index 852566f9..cd602614 100644 --- a/src/CBot/CBotVar/CBotVarInt.cpp +++ b/src/CBot/CBotVar/CBotVarInt.cpp @@ -58,33 +58,9 @@ void CBotVarInt::Dec() m_defnum.clear(); } -void CBotVarInt::XOr(CBotVar* left, CBotVar* right) -{ - SetValInt(left->GetValInt() ^ right->GetValInt()); -} -void CBotVarInt::And(CBotVar* left, CBotVar* right) -{ - SetValInt(left->GetValInt() & right->GetValInt()); -} -void CBotVarInt::Or(CBotVar* left, CBotVar* right) -{ - SetValInt(left->GetValInt() | right->GetValInt()); -} - -void CBotVarInt::SL(CBotVar* left, CBotVar* right) -{ - SetValInt(left->GetValInt() << right->GetValInt()); -} -void CBotVarInt::ASR(CBotVar* left, CBotVar* right) -{ - SetValInt(left->GetValInt() >> right->GetValInt()); -} void CBotVarInt::SR(CBotVar* left, CBotVar* right) { - int source = left->GetValInt(); - int shift = right->GetValInt(); - if (shift >= 1) source &= 0x7fffffff; - SetValInt(source >> shift); + SetValInt(static_cast(left->GetValInt()) >> right->GetValInt()); } void CBotVarInt::Not() diff --git a/src/CBot/CBotVar/CBotVarInt.h b/src/CBot/CBotVar/CBotVarInt.h index 5e04135c..6fb51208 100644 --- a/src/CBot/CBotVar/CBotVarInt.h +++ b/src/CBot/CBotVar/CBotVarInt.h @@ -27,10 +27,10 @@ namespace CBot /** * \brief CBotVar subclass for managing integer values (::CBotTypInt) */ -class CBotVarInt : public CBotVarNumber +class CBotVarInt : public CBotVarInteger { public: - CBotVarInt(const CBotToken &name) : CBotVarNumber(name) {} + CBotVarInt(const CBotToken &name) : CBotVarInteger(name) {} void SetValInt(int val, const std::string& s = "") override; std::string GetValString() override; @@ -40,19 +40,21 @@ public: void Neg() override; void Inc() override; void Dec() override; - - void XOr(CBotVar* left, CBotVar* right) override; - void Or(CBotVar* left, CBotVar* right) override; - void And(CBotVar* left, CBotVar* right) override; void Not() override; - void SL(CBotVar* left, CBotVar* right) override; void SR(CBotVar* left, CBotVar* right) override; - void ASR(CBotVar* left, CBotVar* right) override; bool Save0State(std::ostream &ostr) override; bool Save1State(std::ostream &ostr) override; +protected: + + void SetValue(int val) override + { + CBotVarNumberBase::SetValue(val); + m_defnum.clear(); + } + protected: //! The name if given by DefineNum. std::string m_defnum; diff --git a/src/CBot/CBotVar/CBotVarValue.h b/src/CBot/CBotVar/CBotVarValue.h index 5e58075d..9c0b0361 100644 --- a/src/CBot/CBotVar/CBotVarValue.h +++ b/src/CBot/CBotVar/CBotVarValue.h @@ -74,6 +74,13 @@ public: return s.str(); } +protected: + virtual void SetValue(T val) + { + this->m_val = val; + this->m_binit = CBotVar::InitType::DEF; + } + protected: //! The value T m_val; @@ -93,14 +100,12 @@ public: void SetValInt(int val, const std::string &s = "") override { - this->m_val = static_cast(val); - this->m_binit = CBotVar::InitType::DEF; + this->SetValue(static_cast(val)); } void SetValFloat(float val) override { - this->m_val = static_cast(val); - this->m_binit = CBotVar::InitType::DEF; + this->SetValue(static_cast(val)); } int GetValInt() override @@ -116,11 +121,11 @@ public: bool Eq(CBotVar* left, CBotVar* right) override { - return left->GetValFloat() == right->GetValFloat(); + return static_cast(*left) == static_cast(*right); } bool Ne(CBotVar* left, CBotVar* right) override { - return left->GetValFloat() != right->GetValFloat(); + return static_cast(*left) != static_cast(*right); } }; @@ -135,33 +140,33 @@ public: void Mul(CBotVar* left, CBotVar* right) override { - this->SetValFloat(left->GetValFloat() * right->GetValFloat()); + this->SetValue(static_cast(*left) * static_cast(*right)); } void Power(CBotVar* left, CBotVar* right) override { - this->SetValFloat(pow(left->GetValFloat(), right->GetValFloat())); + this->SetValue(pow(static_cast(*left), static_cast(*right))); } CBotError Div(CBotVar* left, CBotVar* right) override { - float r = right->GetValFloat(); - if (r == 0) return CBotErrZeroDiv; - this->SetValFloat(left->GetValFloat() / r); + T r = static_cast(*right); + if ( r == static_cast(0) ) return CBotErrZeroDiv; + this->SetValue(static_cast(*left) / r); return CBotNoErr; } CBotError Modulo(CBotVar* left, CBotVar* right) override { - float r = right->GetValFloat(); - if (r == 0) return CBotErrZeroDiv; - this->SetValFloat(fmod(left->GetValFloat(), r)); + T r = static_cast(*right); + if ( r == static_cast(0) ) return CBotErrZeroDiv; + this->SetValue(fmod(static_cast(*left), r)); return CBotNoErr; } void Add(CBotVar* left, CBotVar* right) override { - this->SetValFloat(left->GetValFloat() + right->GetValFloat()); + this->SetValue(static_cast(*left) + static_cast(*right)); } void Sub(CBotVar* left, CBotVar* right) override { - this->SetValFloat(left->GetValFloat() - right->GetValFloat()); + this->SetValue(static_cast(*left) - static_cast(*right)); } void Neg() override @@ -179,21 +184,65 @@ public: bool Lo(CBotVar* left, CBotVar* right) override { - return left->GetValFloat() < right->GetValFloat(); + return static_cast(*left) < static_cast(*right); } bool Hi(CBotVar* left, CBotVar* right) override { - return left->GetValFloat() > right->GetValFloat(); + return static_cast(*left) > static_cast(*right); } bool Ls(CBotVar* left, CBotVar* right) override { - return left->GetValFloat() <= right->GetValFloat(); + return static_cast(*left) <= static_cast(*right); } bool Hs(CBotVar* left, CBotVar* right) override { - return left->GetValFloat() >= right->GetValFloat(); + return static_cast(*left) >= static_cast(*right); } }; -} +/** + * \brief An integer variable (byte, short, char, int, long) + */ +template +class CBotVarInteger : public CBotVarNumber +{ +public: + CBotVarInteger(const CBotToken &name) : CBotVarNumber(name) {} + CBotError Modulo(CBotVar* left, CBotVar* right) override + { + T r = static_cast(*right); + if ( r == static_cast(0) ) return CBotErrZeroDiv; + this->SetValue(static_cast(*left) % r); + return CBotNoErr; + } + + void XOr(CBotVar* left, CBotVar* right) override + { + this->SetValue(static_cast(*left) ^ static_cast(*right)); + } + void And(CBotVar* left, CBotVar* right) override + { + this->SetValue(static_cast(*left) & static_cast(*right)); + } + void Or(CBotVar* left, CBotVar* right) override + { + this->SetValue(static_cast(*left) | static_cast(*right)); + } + + void SL(CBotVar* left, CBotVar* right) override + { + this->SetValue(static_cast(*left) << right->GetValInt()); + } + void ASR(CBotVar* left, CBotVar* right) override + { + this->SetValue(static_cast(*left) >> right->GetValInt()); + } + + void Not() override + { + this->m_val = ~(this->m_val); + } +}; + +} // namespace CBot diff --git a/test/unit/CBot/CBot_test.cpp b/test/unit/CBot/CBot_test.cpp index f16637bd..6f2201b9 100644 --- a/test/unit/CBot/CBot_test.cpp +++ b/test/unit/CBot/CBot_test.cpp @@ -605,6 +605,20 @@ TEST_F(CBotUT, VarImplicitCast) ); } +TEST_F(CBotUT, IntegerMathNearLimits_Issue993) +{ + ExecuteTest( + "extern void Test_Issue993() {\n" + " ASSERT(-2147483600 * 1 == -2147483600);\n" + " ASSERT( 2147483600 * 1 == 2147483600);\n" + " ASSERT( 2147483646 * 1 == 2147483646);\n" + " ASSERT( 2147483646 * -1 == -2147483646);\n" + " ASSERT( 2147483000 * -1 == -2147483000);\n" + " ASSERT( 2147483000 * 1 == 2147483000);\n" + "}\n" + ); +} + TEST_F(CBotUT, ToString) { ExecuteTest( From c0cdd84e856e1a69a3eaddcd3f790f4e03115775 Mon Sep 17 00:00:00 2001 From: melex750 Date: Thu, 11 Apr 2019 04:19:29 -0400 Subject: [PATCH 161/207] Add missing primitive data types in CBOT --- src/CBot/CBotDefParam.cpp | 20 ++++ src/CBot/CBotEnums.h | 15 ++- src/CBot/CBotFileUtils.cpp | 10 ++ src/CBot/CBotFileUtils.h | 16 +++ src/CBot/CBotInstr/CBotCase.cpp | 2 +- src/CBot/CBotInstr/CBotDefFloat.cpp | 23 ++-- src/CBot/CBotInstr/CBotDefFloat.h | 2 +- src/CBot/CBotInstr/CBotDefInt.cpp | 26 +++-- src/CBot/CBotInstr/CBotDefInt.h | 2 +- src/CBot/CBotInstr/CBotExprLitNum.cpp | 102 +++++++++++------ src/CBot/CBotInstr/CBotExprLitNum.h | 21 ++-- src/CBot/CBotInstr/CBotInstr.cpp | 5 + src/CBot/CBotInstr/CBotParExpr.cpp | 2 +- src/CBot/CBotInstr/CBotTwoOpExpr.cpp | 5 +- src/CBot/CBotStack.cpp | 32 +++++- src/CBot/CBotToken.cpp | 5 + src/CBot/CBotTypResult.cpp | 5 + src/CBot/CBotUtils.cpp | 19 +++- src/CBot/CBotUtils.h | 2 +- src/CBot/CBotVar/CBotVar.cpp | 155 ++++++++++++++++++++++++-- src/CBot/CBotVar/CBotVar.h | 30 +++++ src/CBot/CBotVar/CBotVarByte.h | 46 ++++++++ src/CBot/CBotVar/CBotVarChar.h | 59 ++++++++++ src/CBot/CBotVar/CBotVarDouble.h | 41 +++++++ src/CBot/CBotVar/CBotVarLong.h | 46 ++++++++ src/CBot/CBotVar/CBotVarShort.h | 46 ++++++++ src/CBot/CBotVar/CBotVarValue.h | 49 ++++++++ src/CBot/CMakeLists.txt | 5 + src/script/cbottoken.cpp | 10 ++ 29 files changed, 717 insertions(+), 84 deletions(-) create mode 100644 src/CBot/CBotVar/CBotVarByte.h create mode 100644 src/CBot/CBotVar/CBotVarChar.h create mode 100644 src/CBot/CBotVar/CBotVarDouble.h create mode 100644 src/CBot/CBotVar/CBotVarLong.h create mode 100644 src/CBot/CBotVar/CBotVarShort.h diff --git a/src/CBot/CBotDefParam.cpp b/src/CBot/CBotDefParam.cpp index af4fb6ec..fe4a37b6 100644 --- a/src/CBot/CBotDefParam.cpp +++ b/src/CBot/CBotDefParam.cpp @@ -173,14 +173,34 @@ bool CBotDefParam::Execute(CBotVar** ppVars, CBotStack* &pj) { switch (p->m_type.GetType()) { + case CBotTypByte: + newvar->SetValByte(pVar->GetValByte()); + newvar->SetInit(pVar->GetInit()); // copy nan + break; + case CBotTypShort: + newvar->SetValShort(pVar->GetValShort()); + newvar->SetInit(pVar->GetInit()); // copy nan + break; + case CBotTypChar: + newvar->SetValChar(pVar->GetValChar()); + newvar->SetInit(pVar->GetInit()); // copy nan + break; case CBotTypInt: newvar->SetValInt(pVar->GetValInt()); newvar->SetInit(pVar->GetInit()); // copy nan break; + case CBotTypLong: + newvar->SetValLong(pVar->GetValLong()); + newvar->SetInit(pVar->GetInit()); // copy nan + break; case CBotTypFloat: newvar->SetValFloat(pVar->GetValFloat()); newvar->SetInit(pVar->GetInit()); // copy nan break; + case CBotTypDouble: + newvar->SetValDouble(pVar->GetValDouble()); + newvar->SetInit(pVar->GetInit()); // copy nan + break; case CBotTypString: newvar->SetValString(pVar->GetValString()); break; diff --git a/src/CBot/CBotEnums.h b/src/CBot/CBotEnums.h index 0b33bfdc..3dff66eb 100644 --- a/src/CBot/CBotEnums.h +++ b/src/CBot/CBotEnums.h @@ -35,13 +35,13 @@ namespace CBot enum CBotType { CBotTypVoid = 0, //!< void - CBotTypByte = 1, //!< byte (NOT IMPLEMENTED) - CBotTypShort = 2, //!< short (NOT IMPLEMENTED) - CBotTypChar = 3, //!< char (NOT IMPLEMENTED) + CBotTypByte = 1, //!< byte + CBotTypShort = 2, //!< short + CBotTypChar = 3, //!< char CBotTypInt = 4, //!< int - CBotTypLong = 5, //!< long (NOT IMPLEMENTED) + CBotTypLong = 5, //!< long CBotTypFloat = 6, //!< float - CBotTypDouble = 7, //!< double (NOT IMPLEMENTED) + CBotTypDouble = 7, //!< double CBotTypBoolean = 8, //!< bool CBotTypString = 9, //!< string @@ -106,6 +106,11 @@ enum TokenId ID_STRING, ID_VOID, ID_BOOL, + ID_BYTE, + ID_SHORT, + ID_CHAR, + ID_LONG, + ID_DOUBLE, TokenKeyVal = 2200, //!< keywords that represent values (true, false, null, nan) ID_TRUE = 2200, diff --git a/src/CBot/CBotFileUtils.cpp b/src/CBot/CBotFileUtils.cpp index ccde313c..b2a19cb1 100644 --- a/src/CBot/CBotFileUtils.cpp +++ b/src/CBot/CBotFileUtils.cpp @@ -151,6 +151,16 @@ bool ReadShort(std::istream &istr, short &s) return ReadSignedBinary(istr, s); } +bool WriteUInt32(std::ostream &ostr, uint32_t i) +{ + return WriteBinary(ostr, i); +} + +bool ReadUInt32(std::istream &istr, uint32_t &i) +{ + return ReadBinary(istr, i); +} + bool WriteInt(std::ostream &ostr, int i) { return WriteSignedBinary(ostr, i); diff --git a/src/CBot/CBotFileUtils.h b/src/CBot/CBotFileUtils.h index 8f739cb4..900dd81d 100644 --- a/src/CBot/CBotFileUtils.h +++ b/src/CBot/CBotFileUtils.h @@ -84,6 +84,22 @@ bool WriteShort(std::ostream &ostr, short s); */ bool ReadShort(std::istream &istr, short &s); +/*! + * \brief WriteUInt32 + * \param ostr Output stream + * \param i + * \return true on success + */ +bool WriteUInt32(std::ostream &ostr, uint32_t i); + +/*! + * \brief ReadUInt32 + * \param istr Input stream + * \param[out] i + * \return true on success + */ +bool ReadUInt32(std::istream &istr, uint32_t &i); + /*! * \brief WriteInt * \param ostr Output stream diff --git a/src/CBot/CBotInstr/CBotCase.cpp b/src/CBot/CBotInstr/CBotCase.cpp index 35e17d3d..15c8d4f7 100644 --- a/src/CBot/CBotInstr/CBotCase.cpp +++ b/src/CBot/CBotInstr/CBotCase.cpp @@ -51,7 +51,7 @@ CBotInstr* CBotCase::Compile(CBotToken* &p, CBotCStack* pStack) if ( pp->GetType() == ID_CASE ) { pp = p; - inst->m_value = CBotExprLitNum::Compile(p, pStack); + inst->m_value = CBot::CompileExprLitNum(p, pStack); if (inst->m_value == nullptr ) { pStack->SetError( CBotErrBadNum, pp ); diff --git a/src/CBot/CBotInstr/CBotDefFloat.cpp b/src/CBot/CBotInstr/CBotDefFloat.cpp index 65449b02..0bb6f5f8 100644 --- a/src/CBot/CBotInstr/CBotDefFloat.cpp +++ b/src/CBot/CBotInstr/CBotDefFloat.cpp @@ -46,13 +46,22 @@ CBotDefFloat::~CBotDefFloat() } //////////////////////////////////////////////////////////////////////////////// -CBotInstr* CBotDefFloat::Compile(CBotToken* &p, CBotCStack* pStack, bool cont, bool noskip) +CBotInstr* CBotDefFloat::Compile(CBotToken* &p, CBotCStack* pStack, bool cont, bool noskip, CBotTypResult vartype) { CBotToken* pp = cont ? nullptr : p; - if (!cont && !IsOfType(p, ID_FLOAT)) return nullptr; + if (!cont) + { + switch (p->GetType()) + { + case ID_FLOAT: vartype.SetType(CBotTypFloat ); break; + case ID_DOUBLE: vartype.SetType(CBotTypDouble); break; + default: return nullptr; + } + p = p->GetNext(); + } - CBotDefFloat* inst = static_cast(CompileArray(p, pStack, CBotTypFloat)); + CBotDefFloat* inst = static_cast(CompileArray(p, pStack, vartype)); if (inst != nullptr || !pStack->IsOk()) return inst; CBotCStack* pStk = pStack->TokenStack(pp); @@ -67,7 +76,7 @@ CBotInstr* CBotDefFloat::Compile(CBotToken* &p, CBotCStack* pStack, bool cont, b if (nullptr != (inst->m_var = CBotLeftExprVar::Compile( p, pStk ))) { - (static_cast(inst->m_var))->m_typevar = CBotTypFloat; + (static_cast(inst->m_var))->m_typevar = vartype; if (pStk->CheckVarLocal(vartoken)) // redefinition of a variable { pStk->SetStartError(vartoken->GetStart()); @@ -79,7 +88,7 @@ CBotInstr* CBotDefFloat::Compile(CBotToken* &p, CBotCStack* pStack, bool cont, b { delete inst; p = vartoken; - inst = static_cast(CBotDefArray::Compile(p, pStk, CBotTypFloat)); + inst = static_cast(CBotDefArray::Compile(p, pStk, vartype)); goto suite; // no assignment, variable already created } @@ -103,7 +112,7 @@ CBotInstr* CBotDefFloat::Compile(CBotToken* &p, CBotCStack* pStack, bool cont, b } } - var = CBotVar::Create(*vartoken, CBotTypFloat); + var = CBotVar::Create(*vartoken, vartype); var->SetInit(inst->m_expr != nullptr ? CBotVar::InitType::DEF : CBotVar::InitType::UNDEF); var->SetUniqNum( (static_cast(inst->m_var))->m_nIdent = CBotVar::NextUniqNum()); @@ -111,7 +120,7 @@ CBotInstr* CBotDefFloat::Compile(CBotToken* &p, CBotCStack* pStack, bool cont, b suite: if (pStk->IsOk() && IsOfType(p, ID_COMMA)) { - if (nullptr != ( inst->m_next2b = CBotDefFloat::Compile(p, pStk, true, noskip))) + if (nullptr != ( inst->m_next2b = CBotDefFloat::Compile(p, pStk, true, noskip, vartype))) { return pStack->Return(inst, pStk); } diff --git a/src/CBot/CBotInstr/CBotDefFloat.h b/src/CBot/CBotInstr/CBotDefFloat.h index a8060b41..8c3fa44d 100644 --- a/src/CBot/CBotInstr/CBotDefFloat.h +++ b/src/CBot/CBotInstr/CBotDefFloat.h @@ -41,7 +41,7 @@ public: * \param noskip * \return */ - static CBotInstr* Compile(CBotToken* &p, CBotCStack* pStack, bool cont = false, bool noskip=false); + static CBotInstr* Compile(CBotToken* &p, CBotCStack* pStack, bool cont = false, bool noskip=false, CBotTypResult vartype = CBotTypFloat); /*! * \brief Execute Executes the definition of a real variable. diff --git a/src/CBot/CBotInstr/CBotDefInt.cpp b/src/CBot/CBotInstr/CBotDefInt.cpp index 6cfb30e6..6835f901 100644 --- a/src/CBot/CBotInstr/CBotDefInt.cpp +++ b/src/CBot/CBotInstr/CBotDefInt.cpp @@ -47,13 +47,25 @@ CBotDefInt::~CBotDefInt() } //////////////////////////////////////////////////////////////////////////////// -CBotInstr* CBotDefInt::Compile(CBotToken* &p, CBotCStack* pStack, bool cont, bool noskip) +CBotInstr* CBotDefInt::Compile(CBotToken* &p, CBotCStack* pStack, bool cont, bool noskip, CBotTypResult vartype) { CBotToken* pp = cont ? nullptr : p; // no repetition of the token "int" - if (!cont && !IsOfType(p, ID_INT)) return nullptr; + if (!cont) + { + switch (p->GetType()) + { + case ID_BYTE: vartype.SetType(CBotTypByte ); break; + case ID_SHORT: vartype.SetType(CBotTypShort); break; + case ID_CHAR: vartype.SetType(CBotTypChar ); break; + case ID_INT: vartype.SetType(CBotTypInt ); break; + case ID_LONG: vartype.SetType(CBotTypLong ); break; + default: return nullptr; + } + p = p->GetNext(); + } - CBotDefInt* inst = static_cast(CompileArray(p, pStack, CBotTypInt)); + CBotDefInt* inst = static_cast(CompileArray(p, pStack, vartype)); if (inst != nullptr || !pStack->IsOk()) return inst; CBotCStack* pStk = pStack->TokenStack(pp); @@ -68,7 +80,7 @@ CBotInstr* CBotDefInt::Compile(CBotToken* &p, CBotCStack* pStack, bool cont, boo // determines the expression is valid for the item on the left side if (nullptr != (inst->m_var = CBotLeftExprVar::Compile( p, pStk ))) { - (static_cast(inst->m_var))->m_typevar = CBotTypInt; + (static_cast(inst->m_var))->m_typevar = vartype; if (pStk->CheckVarLocal(vartoken)) // redefinition of the variable { pStk->SetError(CBotErrRedefVar, vartoken); @@ -82,7 +94,7 @@ CBotInstr* CBotDefInt::Compile(CBotToken* &p, CBotCStack* pStack, bool cont, boo // compiles an array declaration - CBotInstr* inst2 = CBotDefArray::Compile(p, pStk, CBotTypInt); + CBotInstr* inst2 = CBotDefArray::Compile(p, pStk, vartype); inst = static_cast(inst2); goto suite; // no assignment, variable already created @@ -108,7 +120,7 @@ CBotInstr* CBotDefInt::Compile(CBotToken* &p, CBotCStack* pStack, bool cont, boo } { - CBotVar* var = CBotVar::Create(*vartoken, CBotTypInt);// create the variable (evaluated after the assignment) + CBotVar* var = CBotVar::Create(*vartoken, vartype); // create the variable (evaluated after the assignment) var->SetInit(inst->m_expr != nullptr ? CBotVar::InitType::DEF : CBotVar::InitType::UNDEF); // if initialized with assignment var->SetUniqNum( //set it with a unique number (static_cast(inst->m_var))->m_nIdent = CBotVar::NextUniqNum()); @@ -117,7 +129,7 @@ CBotInstr* CBotDefInt::Compile(CBotToken* &p, CBotCStack* pStack, bool cont, boo suite: if (pStk->IsOk() && IsOfType(p, ID_COMMA)) // chained several definitions { - if (nullptr != ( inst->m_next2b = CBotDefInt::Compile(p, pStk, true, noskip))) // compile next one + if (nullptr != ( inst->m_next2b = CBotDefInt::Compile(p, pStk, true, noskip, vartype))) // compile next one { return pStack->Return(inst, pStk); } diff --git a/src/CBot/CBotInstr/CBotDefInt.h b/src/CBot/CBotInstr/CBotDefInt.h index 2962eab3..867ab4dd 100644 --- a/src/CBot/CBotInstr/CBotDefInt.h +++ b/src/CBot/CBotInstr/CBotDefInt.h @@ -41,7 +41,7 @@ public: * \param noskip * \return */ - static CBotInstr* Compile(CBotToken* &p, CBotCStack* pStack, bool cont = false, bool noskip = false); + static CBotInstr* Compile(CBotToken* &p, CBotCStack* pStack, bool cont = false, bool noskip = false, CBotTypResult vartype = CBotTypInt); /*! * \brief Execute Execute the definition of the integer variable. diff --git a/src/CBot/CBotInstr/CBotExprLitNum.cpp b/src/CBot/CBotInstr/CBotExprLitNum.cpp index 9273e8ee..9842cf57 100644 --- a/src/CBot/CBotInstr/CBotExprLitNum.cpp +++ b/src/CBot/CBotInstr/CBotExprLitNum.cpp @@ -25,52 +25,87 @@ #include "CBot/CBotUtils.h" +#include #include namespace CBot { -//////////////////////////////////////////////////////////////////////////////// -CBotExprLitNum::CBotExprLitNum() +template <> +CBotExprLitNum::CBotExprLitNum(int val) : m_numtype(CBotTypInt), m_value(val) { } -//////////////////////////////////////////////////////////////////////////////// -CBotExprLitNum::~CBotExprLitNum() +template <> +CBotExprLitNum::CBotExprLitNum(long val) : m_numtype(CBotTypLong), m_value(val) { } -//////////////////////////////////////////////////////////////////////////////// -CBotInstr* CBotExprLitNum::Compile(CBotToken* &p, CBotCStack* pStack) +template <> +CBotExprLitNum::CBotExprLitNum(float val) : m_numtype(CBotTypFloat), m_value(val) +{ +} + +template <> +CBotExprLitNum::CBotExprLitNum(double val) : m_numtype(CBotTypDouble), m_value(val) +{ +} + +template +CBotExprLitNum::~CBotExprLitNum() +{ +} + +CBotInstr* CompileExprLitNum(CBotToken* &p, CBotCStack* pStack) { CBotCStack* pStk = pStack->TokenStack(); - CBotExprLitNum* inst = new CBotExprLitNum(); + const auto& s = p->GetString(); - inst->SetToken(p); - std::string s = p->GetString(); + CBotInstr* inst = nullptr; + CBotType numtype = CBotTypInt; - inst->m_numtype = CBotTypInt; if (p->GetType() == TokenTypDef) { - inst->m_valint = p->GetKeywordId(); + inst = new CBotExprLitNum(static_cast(p->GetKeywordId())); } else { if (s.find('.') != std::string::npos || ( s.find('x') == std::string::npos && ( s.find_first_of("eE") != std::string::npos ) )) { - inst->m_numtype = CBotTypFloat; - inst->m_valfloat = GetNumFloat(s); + double val = GetNumFloat(s); + if (val < static_cast(std::numeric_limits::min()) && + val > static_cast(std::numeric_limits::max()) ) + { + numtype = CBotTypDouble; + inst = new CBotExprLitNum(val); + } + else + { + numtype = CBotTypFloat; + inst = new CBotExprLitNum(static_cast(val)); + } } else { - inst->m_valint = GetNumInt(s); + long val = GetNumInt(s); + if (val < std::numeric_limits::min() && + val > std::numeric_limits::max() ) + { + numtype = CBotTypLong; + inst = new CBotExprLitNum(val); + } + else + { + inst = new CBotExprLitNum(static_cast(val)); + } } } + inst->SetToken(p); if (pStk->NextToken(p)) { - CBotVar* var = CBotVar::Create("", inst->m_numtype); + CBotVar* var = CBotVar::Create("", numtype); pStk->SetVar(var); return pStack->Return(inst, pStk); @@ -79,8 +114,8 @@ CBotInstr* CBotExprLitNum::Compile(CBotToken* &p, CBotCStack* pStack) return pStack->Return(nullptr, pStk); } -//////////////////////////////////////////////////////////////////////////////// -bool CBotExprLitNum::Execute(CBotStack* &pj) +template +bool CBotExprLitNum::Execute(CBotStack* &pj) { CBotStack* pile = pj->AddStack(this); @@ -88,39 +123,38 @@ bool CBotExprLitNum::Execute(CBotStack* &pj) CBotVar* var = CBotVar::Create("", m_numtype); - std::string nombre ; if (m_token.GetType() == TokenTypDef) { - nombre = m_token.GetString(); + var->SetValInt(m_value, m_token.GetString()); } - - switch (m_numtype) + else { - case CBotTypShort: - case CBotTypInt: - var->SetValInt(m_valint, nombre); - break; - case CBotTypFloat: - var->SetValFloat(m_valfloat); - break; - default: - assert(false); + *var = m_value; } pile->SetVar(var); // place on the stack return pj->Return(pile); // it's ok } -//////////////////////////////////////////////////////////////////////////////// -void CBotExprLitNum::RestoreState(CBotStack* &pj, bool bMain) +template +void CBotExprLitNum::RestoreState(CBotStack* &pj, bool bMain) { if (bMain) pj->RestoreStack(this); } -std::string CBotExprLitNum::GetDebugData() +template +std::string CBotExprLitNum::GetDebugData() { std::stringstream ss; - ss << "(" << (m_numtype == CBotTypFloat ? "float" : "int") << ") " << (m_numtype == CBotTypFloat ? m_valfloat : m_valint); + switch (m_numtype) + { + case CBotTypInt : ss << "(int) "; break; + case CBotTypLong : ss << "(long) "; break; + case CBotTypFloat : ss << "(float) "; break; + case CBotTypDouble: ss << "(double) "; break; + default: assert(false); + } + ss << m_value; return ss.str(); } diff --git a/src/CBot/CBotInstr/CBotExprLitNum.h b/src/CBot/CBotInstr/CBotExprLitNum.h index 414f2d8e..92cd302d 100644 --- a/src/CBot/CBotInstr/CBotExprLitNum.h +++ b/src/CBot/CBotInstr/CBotExprLitNum.h @@ -24,26 +24,21 @@ namespace CBot { +CBotInstr* CompileExprLitNum(CBotToken* &p, CBotCStack* pStack); + /** * \brief A number literal - 5, 1, 2.5, 3.75, etc. or a predefined numerical constant (see CBotToken::DefineNum()) * - * Can be of type ::CBotTypInt or ::CBotTypFloat + * Can be of type ::CBotTypInt, ::CBotTypLong, ::CBotTypFloat, or ::CBotTypDouble */ +template class CBotExprLitNum : public CBotInstr { public: - CBotExprLitNum(); + CBotExprLitNum(T val); ~CBotExprLitNum(); - /*! - * \brief Compile - * \param p - * \param pStack - * \return - */ - static CBotInstr* Compile(CBotToken* &p, CBotCStack* pStack); - /*! * \brief Execute Execute, returns the corresponding number. * \param pj @@ -65,10 +60,8 @@ protected: private: //! The type of number. CBotType m_numtype; - //! Value for an int. - long m_valint; - //! Value for a float. - float m_valfloat; + //! Value + T m_value; }; diff --git a/src/CBot/CBotInstr/CBotInstr.cpp b/src/CBot/CBotInstr/CBotInstr.cpp index f69785f6..04b13204 100644 --- a/src/CBot/CBotInstr/CBotInstr.cpp +++ b/src/CBot/CBotInstr/CBotInstr.cpp @@ -208,10 +208,15 @@ CBotInstr* CBotInstr::Compile(CBotToken* &p, CBotCStack* pStack) case ID_THROW: return CBotThrow::Compile(p, pStack); + case ID_BYTE: + case ID_SHORT: + case ID_CHAR: case ID_INT: + case ID_LONG: return CBotDefInt::Compile(p, pStack); case ID_FLOAT: + case ID_DOUBLE: return CBotDefFloat::Compile(p, pStack); case ID_STRING: diff --git a/src/CBot/CBotInstr/CBotParExpr.cpp b/src/CBot/CBotInstr/CBotParExpr.cpp index b879ebec..24bdaafe 100644 --- a/src/CBot/CBotInstr/CBotParExpr.cpp +++ b/src/CBot/CBotInstr/CBotParExpr.cpp @@ -151,7 +151,7 @@ CBotInstr* CBotParExpr::CompileLitExpr(CBotToken* &p, CBotCStack* pStack) if (p->GetType() == TokenTypNum || p->GetType() == TokenTypDef ) { - CBotInstr* inst = CBotExprLitNum::Compile(p, pStk); + CBotInstr* inst = CBot::CompileExprLitNum(p, pStk); return pStack->Return(inst, pStk); } diff --git a/src/CBot/CBotInstr/CBotTwoOpExpr.cpp b/src/CBot/CBotInstr/CBotTwoOpExpr.cpp index 3d5fc6a4..ab8b0da9 100644 --- a/src/CBot/CBotInstr/CBotTwoOpExpr.cpp +++ b/src/CBot/CBotInstr/CBotTwoOpExpr.cpp @@ -399,7 +399,10 @@ bool CBotTwoOpExpr::Execute(CBotStack* &pStack) TypeRes = CBotTypBoolean; break; case ID_DIV: - TypeRes = std::max(TypeRes, static_cast(CBotTypFloat)); + if (TypeRes == CBotTypFloat) + { + if (type1.Eq(CBotTypLong) || type2.Eq(CBotTypLong)) TypeRes = CBotTypDouble; + } } // creates a variable for the result diff --git a/src/CBot/CBotStack.cpp b/src/CBot/CBotStack.cpp index 7f3c0b9a..5101bbf2 100644 --- a/src/CBot/CBotStack.cpp +++ b/src/CBot/CBotStack.cpp @@ -833,10 +833,28 @@ bool CBotVar::RestoreState(std::istream &istr, CBotVar* &pVar) switch (w) { case CBotTypBoolean: + char valBool; + if (!ReadByte(istr, valBool)) return false; + pNew = CBotVar::Create(token, w); // creates a variable + pNew->SetValInt(valBool); + break; + case CBotTypByte: char valByte; if (!ReadByte(istr, valByte)) return false; pNew = CBotVar::Create(token, w); // creates a variable - pNew->SetValInt(valByte); + pNew->SetValByte(valByte); + break; + case CBotTypShort: + short valShort; + if (!ReadShort(istr, valShort)) return false; + pNew = CBotVar::Create(token, w); // creates a variable + pNew->SetValShort(valShort); + break; + case CBotTypChar: + uint32_t valChar; + if (!ReadUInt32(istr, valChar)) return false; + pNew = CBotVar::Create(token, w); // creates a variable + pNew->SetValChar(valChar); break; case CBotTypInt: int valInt; @@ -844,12 +862,24 @@ bool CBotVar::RestoreState(std::istream &istr, CBotVar* &pVar) pNew = CBotVar::Create(token, w); // creates a variable pNew->SetValInt(valInt, defnum); break; + case CBotTypLong: + long valLong; + if (!ReadLong(istr, valLong)) return false; + pNew = CBotVar::Create(token, w); // creates a variable + pNew->SetValInt(valLong); + break; case CBotTypFloat: float valFloat; if (!ReadFloat(istr, valFloat)) return false; pNew = CBotVar::Create(token, w); // creates a variable pNew->SetValFloat(valFloat); break; + case CBotTypDouble: + double valDouble; + if (!ReadDouble(istr, valDouble)) return false; + pNew = CBotVar::Create(token, w); // creates a variable + pNew->SetValDouble(valDouble); + break; case CBotTypString: { std::string valString; diff --git a/src/CBot/CBotToken.cpp b/src/CBot/CBotToken.cpp index b3a5a461..d5afe1fe 100644 --- a/src/CBot/CBotToken.cpp +++ b/src/CBot/CBotToken.cpp @@ -71,6 +71,11 @@ static const boost::bimap KEYWORDS = makeBimapToString() + "[]"; diff --git a/src/CBot/CBotUtils.cpp b/src/CBot/CBotUtils.cpp index a87e2943..4d663bea 100644 --- a/src/CBot/CBotUtils.cpp +++ b/src/CBot/CBotUtils.cpp @@ -62,12 +62,27 @@ CBotTypResult TypeParam(CBotToken* &p, CBotCStack* pile) switch (p->GetType()) { + case ID_BYTE: + p = p->GetNext(); + return ArrayType(p, pile, CBotTypResult( CBotTypByte )); + case ID_SHORT: + p = p->GetNext(); + return ArrayType(p, pile, CBotTypResult( CBotTypShort )); + case ID_CHAR: + p = p->GetNext(); + return ArrayType(p, pile, CBotTypResult( CBotTypChar )); case ID_INT: p = p->GetNext(); return ArrayType(p, pile, CBotTypResult( CBotTypInt )); + case ID_LONG: + p = p->GetNext(); + return ArrayType(p, pile, CBotTypResult( CBotTypLong )); case ID_FLOAT: p = p->GetNext(); return ArrayType(p, pile, CBotTypResult( CBotTypFloat )); + case ID_DOUBLE: + p = p->GetNext(); + return ArrayType(p, pile, CBotTypResult( CBotTypDouble )); case ID_BOOLEAN: case ID_BOOL: p = p->GetNext(); @@ -144,7 +159,7 @@ long GetNumInt(const std::string& str) } //////////////////////////////////////////////////////////////////////////////// -float GetNumFloat(const std::string& str) +double GetNumFloat(const std::string& str) { const char* p = str.c_str(); double num = 0; @@ -201,7 +216,7 @@ float GetNumFloat(const std::string& str) } if (bNeg) num = -num; - return static_cast(num); + return num; } bool CharInList(const char c, const char* list) diff --git a/src/CBot/CBotUtils.h b/src/CBot/CBotUtils.h index 5b58535c..5bc4fe33 100644 --- a/src/CBot/CBotUtils.h +++ b/src/CBot/CBotUtils.h @@ -71,7 +71,7 @@ long GetNumInt(const std::string& str); * \param str * \return */ -float GetNumFloat(const std::string& str); +double GetNumFloat(const std::string& str); /*! * \brief Search a null-terminated string for a char value. diff --git a/src/CBot/CBotVar/CBotVar.cpp b/src/CBot/CBotVar/CBotVar.cpp index d9947e5b..83438745 100644 --- a/src/CBot/CBotVar/CBotVar.cpp +++ b/src/CBot/CBotVar/CBotVar.cpp @@ -24,12 +24,17 @@ #include "CBot/CBotInstr/CBotInstr.h" #include "CBot/CBotVar/CBotVarArray.h" -#include "CBot/CBotVar/CBotVarPointer.h" -#include "CBot/CBotVar/CBotVarClass.h" #include "CBot/CBotVar/CBotVarBoolean.h" -#include "CBot/CBotVar/CBotVarString.h" +#include "CBot/CBotVar/CBotVarByte.h" +#include "CBot/CBotVar/CBotVarChar.h" +#include "CBot/CBotVar/CBotVarClass.h" +#include "CBot/CBotVar/CBotVarDouble.h" #include "CBot/CBotVar/CBotVarFloat.h" #include "CBot/CBotVar/CBotVarInt.h" +#include "CBot/CBotVar/CBotVarLong.h" +#include "CBot/CBotVar/CBotVarPointer.h" +#include "CBot/CBotVar/CBotVarShort.h" +#include "CBot/CBotVar/CBotVarString.h" #include "CBot/CBotClass.h" #include "CBot/CBotToken.h" @@ -160,11 +165,20 @@ CBotVar* CBotVar::Create(const CBotToken& name, CBotTypResult type) { switch (type.GetType()) { + case CBotTypByte: + return new CBotVarByte(name); case CBotTypShort: + return new CBotVarShort(name); + case CBotTypChar: + return new CBotVarChar(name); case CBotTypInt: return new CBotVarInt(name); + case CBotTypLong: + return new CBotVarLong(name); case CBotTypFloat: return new CBotVarFloat(name); + case CBotTypDouble: + return new CBotVarDouble(name); case CBotTypBoolean: return new CBotVarBoolean(name); case CBotTypString: @@ -223,11 +237,20 @@ CBotVar* CBotVar::Create(const std::string& n, CBotTypResult type) switch (type.GetType()) { + case CBotTypByte: + return new CBotVarByte(name); case CBotTypShort: + return new CBotVarShort(name); + case CBotTypChar: + return new CBotVarChar(name); case CBotTypInt: return new CBotVarInt(name); + case CBotTypLong: + return new CBotVarLong(name); case CBotTypFloat: return new CBotVarFloat(name); + case CBotTypDouble: + return new CBotVarDouble(name); case CBotTypBoolean: return new CBotVarBoolean(name); case CBotTypString: @@ -472,12 +495,27 @@ void CBotVar::SetVal(CBotVar* var) case CBotTypBoolean: SetValInt(var->GetValInt()); break; + case CBotTypByte: + SetValByte(var->GetValByte()); + break; + case CBotTypShort: + SetValShort(var->GetValShort()); + break; + case CBotTypChar: + SetValChar(var->GetValChar()); + break; case CBotTypInt: SetValInt(var->GetValInt(), (static_cast(var))->m_defnum); break; + case CBotTypLong: + SetValLong(var->GetValLong()); + break; case CBotTypFloat: SetValFloat(var->GetValFloat()); break; + case CBotTypDouble: + SetValDouble(var->GetValDouble()); + break; case CBotTypString: SetValString(var->GetValString()); break; @@ -545,33 +583,84 @@ CBotVarClass* CBotVar::GetPointer() // All these functions must be defined in the subclasses // derived from class CBotVar -//////////////////////////////////////////////////////////////////////////////// + +signed char CBotVar::GetValByte() +{ + assert(0); + return 0; +} + +short CBotVar::GetValShort() +{ + assert(0); + return 0; +} + +uint32_t CBotVar::GetValChar() +{ + assert(0); + return 0; +} + int CBotVar::GetValInt() { assert(0); return 0; } -//////////////////////////////////////////////////////////////////////////////// +long CBotVar::GetValLong() +{ + assert(0); + return 0; +} + float CBotVar::GetValFloat() { assert(0); return 0; } -//////////////////////////////////////////////////////////////////////////////// +double CBotVar::GetValDouble() +{ + assert(0); + return 0; +} + +void CBotVar::SetValByte(signed char val) +{ + assert(false); +} + +void CBotVar::SetValShort(short val) +{ + assert(false); +} + +void CBotVar::SetValChar(uint32_t val) +{ + assert(false); +} + void CBotVar::SetValInt(int c, const std::string& s) { assert(0); } -//////////////////////////////////////////////////////////////////////////////// +void CBotVar::SetValLong(long val) +{ + assert(false); +} + void CBotVar::SetValFloat(float c) { assert(0); } -//////////////////////////////////////////////////////////////////////////////// +void CBotVar::SetValDouble(double val) +{ + assert(false); +} + void CBotVar::Mul(CBotVar* left, CBotVar* right) { assert(0); @@ -757,16 +846,41 @@ CBotVar::operator bool() return static_cast(GetValInt()); } +CBotVar::operator signed char() +{ + return GetValByte(); +} + +CBotVar::operator short() +{ + return GetValShort(); +} + +CBotVar::operator uint32_t() +{ + return GetValChar(); +} + CBotVar::operator int() { return GetValInt(); } +CBotVar::operator long() +{ + return GetValLong(); +} + CBotVar::operator float() { return GetValFloat(); } +CBotVar::operator double() +{ + return GetValDouble(); +} + CBotVar::operator std::string() { return GetValString(); @@ -777,16 +891,41 @@ void CBotVar::operator=(const CBotVar &var) SetVal(const_cast(&var)); } +void CBotVar::operator=(signed char x) +{ + SetValByte(x); +} + +void CBotVar::operator=(short x) +{ + SetValShort(x); +} + +void CBotVar::operator=(uint32_t x) +{ + SetValChar(x); +} + void CBotVar::operator=(int x) { SetValInt(x); } +void CBotVar::operator=(long x) +{ + SetValLong(x); +} + void CBotVar::operator=(float x) { SetValFloat(x); } +void CBotVar::operator=(double x) +{ + SetValDouble(x); +} + void CBotVar::operator=(const std::string &x) { SetValString(x); diff --git a/src/CBot/CBotVar/CBotVar.h b/src/CBot/CBotVar/CBotVar.h index 1a9c1498..ef86f40f 100644 --- a/src/CBot/CBotVar/CBotVar.h +++ b/src/CBot/CBotVar/CBotVar.h @@ -445,12 +445,22 @@ public: //@{ operator bool(); + operator signed char(); + operator short(); + operator uint32_t(); operator int(); + operator long(); operator float(); + operator double(); operator std::string(); void operator=(const CBotVar& var); + void operator=(signed char x); + void operator=(short x); + void operator=(uint32_t x); void operator=(int x); + void operator=(long x); void operator=(float x); + void operator=(double x); void operator=(const std::string &x); /** @@ -466,6 +476,12 @@ public: */ virtual void Copy(CBotVar* pSrc, bool bName = true); + virtual void SetValByte(signed char val); + + virtual void SetValShort(short val); + + virtual void SetValChar(uint32_t val); + /** * \brief Set value as an integer * @@ -476,30 +492,44 @@ public: */ virtual void SetValInt(int val, const std::string& name = ""); + virtual void SetValLong(long val); + /** * \brief Set value as float * \param val New value */ virtual void SetValFloat(float val); + virtual void SetValDouble(double val); + /** * \brief Set value as string * \param val New value */ virtual void SetValString(const std::string& val); + virtual signed char GetValByte(); + + virtual short GetValShort(); + + virtual uint32_t GetValChar(); + /** * \brief Get value as integer * \return Current value */ virtual int GetValInt(); + virtual long GetValLong(); + /** * \brief Get value as float * \return Current value */ virtual float GetValFloat(); + virtual double GetValDouble(); + /** * \brief Get value as string * diff --git a/src/CBot/CBotVar/CBotVarByte.h b/src/CBot/CBotVar/CBotVarByte.h new file mode 100644 index 00000000..68c9088e --- /dev/null +++ b/src/CBot/CBotVar/CBotVarByte.h @@ -0,0 +1,46 @@ +/* + * This file is part of the Colobot: Gold Edition source code + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam + * http://epsitec.ch; http://colobot.info; http://github.com/colobot + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see http://gnu.org/licenses + */ + +#pragma once + +#include "CBot/CBotVar/CBotVarValue.h" + +namespace CBot +{ + +/** + * \brief CBotVar subclass for managing 1-byte integer values (::CBotTypByte) + */ +class CBotVarByte : public CBotVarInteger +{ +public: + CBotVarByte(const CBotToken &name) : CBotVarInteger(name) {} + + void SR(CBotVar* left, CBotVar* right) override + { + SetValByte(static_cast(left->GetValByte()) >> right->GetValInt()); + } + + bool Save1State(std::ostream &ostr) override + { + return WriteByte(ostr, m_val); + } +}; + +} // namespace CBot diff --git a/src/CBot/CBotVar/CBotVarChar.h b/src/CBot/CBotVar/CBotVarChar.h new file mode 100644 index 00000000..07f51358 --- /dev/null +++ b/src/CBot/CBotVar/CBotVarChar.h @@ -0,0 +1,59 @@ +/* + * This file is part of the Colobot: Gold Edition source code + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam + * http://epsitec.ch; http://colobot.info; http://github.com/colobot + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see http://gnu.org/licenses + */ + +#pragma once + +#include "CBot/CBotVar/CBotVarValue.h" + +namespace CBot +{ + +/** + * \brief CBotVar subclass for managing 32-bit Unicode values (::CBotTypChar) + */ +class CBotVarChar : public CBotVarInteger +{ +public: + CBotVarChar(const CBotToken &name) : CBotVarInteger(name) {} + + std::string GetValString() override + { + if (m_binit == CBotVar::InitType::UNDEF) + return LoadString(TX_UNDEF); + if (m_binit == CBotVar::InitType::IS_NAN) + return LoadString(TX_NAN); + + if (0x10FFFF < m_val || (0xD7FF < m_val && m_val < 0xE000)) + return "\xEF\xBF\xBD"; // replacement character U+FFFD + + return CodePointToUTF8(m_val); + } + + void SR(CBotVar* left, CBotVar* right) override + { + SetValChar(left->GetValChar() >> right->GetValInt()); + } + + bool Save1State(std::ostream &ostr) override + { + return WriteUInt32(ostr, m_val); + } +}; + +} // namespace CBot diff --git a/src/CBot/CBotVar/CBotVarDouble.h b/src/CBot/CBotVar/CBotVarDouble.h new file mode 100644 index 00000000..1df79cfb --- /dev/null +++ b/src/CBot/CBotVar/CBotVarDouble.h @@ -0,0 +1,41 @@ +/* + * This file is part of the Colobot: Gold Edition source code + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam + * http://epsitec.ch; http://colobot.info; http://github.com/colobot + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see http://gnu.org/licenses + */ + +#pragma once + +#include "CBot/CBotVar/CBotVarValue.h" + +namespace CBot +{ + +/** + * \brief CBotVar subclass for managing double values (::CBotTypDouble) + */ +class CBotVarDouble : public CBotVarNumber +{ +public: + CBotVarDouble(const CBotToken &name) : CBotVarNumber(name) {} + + bool Save1State(std::ostream &ostr) override + { + return WriteDouble(ostr, m_val); + } +}; + +} // namespace CBot diff --git a/src/CBot/CBotVar/CBotVarLong.h b/src/CBot/CBotVar/CBotVarLong.h new file mode 100644 index 00000000..84164c41 --- /dev/null +++ b/src/CBot/CBotVar/CBotVarLong.h @@ -0,0 +1,46 @@ +/* + * This file is part of the Colobot: Gold Edition source code + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam + * http://epsitec.ch; http://colobot.info; http://github.com/colobot + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see http://gnu.org/licenses + */ + +#pragma once + +#include "CBot/CBotVar/CBotVarValue.h" + +namespace CBot +{ + +/** + * \brief CBotVar subclass for managing long integer values (::CBotTypLong) + */ +class CBotVarLong : public CBotVarInteger +{ +public: + CBotVarLong(const CBotToken &name) : CBotVarInteger(name) {} + + void SR(CBotVar* left, CBotVar* right) override + { + SetValLong(static_cast(left->GetValLong()) >> right->GetValInt()); + } + + bool Save1State(std::ostream &ostr) override + { + return WriteLong(ostr, m_val); + } +}; + +} // namespace CBot diff --git a/src/CBot/CBotVar/CBotVarShort.h b/src/CBot/CBotVar/CBotVarShort.h new file mode 100644 index 00000000..3f0723e3 --- /dev/null +++ b/src/CBot/CBotVar/CBotVarShort.h @@ -0,0 +1,46 @@ +/* + * This file is part of the Colobot: Gold Edition source code + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam + * http://epsitec.ch; http://colobot.info; http://github.com/colobot + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see http://gnu.org/licenses + */ + +#pragma once + +#include "CBot/CBotVar/CBotVarValue.h" + +namespace CBot +{ + +/** + * \brief CBotVar subclass for managing short integer values (::CBotTypShort) + */ +class CBotVarShort : public CBotVarInteger +{ +public: + CBotVarShort(const CBotToken &name) : CBotVarInteger(name) {} + + void SR(CBotVar* left, CBotVar* right) override + { + SetValShort(static_cast(left->GetValShort()) >> right->GetValInt()); + } + + bool Save1State(std::ostream &ostr) override + { + return WriteShort(ostr, m_val); + } +}; + +} // namespace CBot diff --git a/src/CBot/CBotVar/CBotVarValue.h b/src/CBot/CBotVar/CBotVarValue.h index 9c0b0361..035d7930 100644 --- a/src/CBot/CBotVar/CBotVarValue.h +++ b/src/CBot/CBotVar/CBotVarValue.h @@ -98,26 +98,75 @@ public: this->m_val = static_cast(0); } + void SetValByte(signed char val) override + { + this->SetValue(static_cast(val)); + } + + void SetValShort(short val) override + { + this->SetValue(static_cast(val)); + } + + void SetValChar(uint32_t val) override + { + this->SetValue(static_cast(val)); + } + void SetValInt(int val, const std::string &s = "") override { this->SetValue(static_cast(val)); } + void SetValLong(long val) override + { + this->SetValue(static_cast(val)); + } + void SetValFloat(float val) override { this->SetValue(static_cast(val)); } + void SetValDouble(double val) override + { + this->SetValue(static_cast(val)); + } + + signed char GetValByte() override + { + return static_cast(this->m_val); + } + + short GetValShort() override + { + return static_cast(this->m_val); + } + + uint32_t GetValChar() override + { + return static_cast(this->m_val); + } + int GetValInt() override { return static_cast(this->m_val); } + long GetValLong() override + { + return static_cast(this->m_val); + } + float GetValFloat() override { return static_cast(this->m_val); } + double GetValDouble() override + { + return static_cast(this->m_val); + } bool Eq(CBotVar* left, CBotVar* right) override { diff --git a/src/CBot/CMakeLists.txt b/src/CBot/CMakeLists.txt index a9a83e2e..4be97841 100644 --- a/src/CBot/CMakeLists.txt +++ b/src/CBot/CMakeLists.txt @@ -127,14 +127,19 @@ set(SOURCES CBotVar/CBotVarArray.h CBotVar/CBotVarBoolean.cpp CBotVar/CBotVarBoolean.h + CBotVar/CBotVarByte.h + CBotVar/CBotVarChar.h CBotVar/CBotVarClass.cpp CBotVar/CBotVarClass.h + CBotVar/CBotVarDouble.h CBotVar/CBotVarFloat.cpp CBotVar/CBotVarFloat.h CBotVar/CBotVarInt.cpp CBotVar/CBotVarInt.h + CBotVar/CBotVarLong.h CBotVar/CBotVarPointer.cpp CBotVar/CBotVarPointer.h + CBotVar/CBotVarShort.h CBotVar/CBotVarString.cpp CBotVar/CBotVarString.h stdlib/Compilation.cpp diff --git a/src/script/cbottoken.cpp b/src/script/cbottoken.cpp index 24b60a09..02bc4525 100644 --- a/src/script/cbottoken.cpp +++ b/src/script/cbottoken.cpp @@ -236,8 +236,13 @@ std::string GetHelpFilename(const char *token) if ( strcmp(token, "continue" ) == 0 ) helpfile = "cbot/continue"; if ( strcmp(token, "return" ) == 0 ) helpfile = "cbot/return"; if ( strcmp(token, "sizeof" ) == 0 ) helpfile = "cbot/sizeof"; + if ( strcmp(token, "byte" ) == 0 ) helpfile = "cbot/byte"; + if ( strcmp(token, "short" ) == 0 ) helpfile = "cbot/short"; + if ( strcmp(token, "char" ) == 0 ) helpfile = "cbot/char"; if ( strcmp(token, "int" ) == 0 ) helpfile = "cbot/int"; + if ( strcmp(token, "long" ) == 0 ) helpfile = "cbot/long"; if ( strcmp(token, "float" ) == 0 ) helpfile = "cbot/float"; + if ( strcmp(token, "double" ) == 0 ) helpfile = "cbot/double"; if ( strcmp(token, "bool" ) == 0 ) helpfile = "cbot/bool"; if ( strcmp(token, "string" ) == 0 ) helpfile = "cbot/string"; if ( strcmp(token, "point" ) == 0 ) helpfile = "cbot/point"; @@ -388,8 +393,13 @@ std::string GetHelpFilename(const char *token) bool IsType(const char *token) { if ( strcmp(token, "void" ) == 0 ) return true; + if ( strcmp(token, "byte" ) == 0 ) return true; + if ( strcmp(token, "short" ) == 0 ) return true; + if ( strcmp(token, "char" ) == 0 ) return true; if ( strcmp(token, "int" ) == 0 ) return true; + if ( strcmp(token, "long" ) == 0 ) return true; if ( strcmp(token, "float" ) == 0 ) return true; + if ( strcmp(token, "double" ) == 0 ) return true; if ( strcmp(token, "bool" ) == 0 ) return true; if ( strcmp(token, "string" ) == 0 ) return true; if ( strcmp(token, "point" ) == 0 ) return true; From bc572aa52f89619cb75ffb45c3abff7ed27f2121 Mon Sep 17 00:00:00 2001 From: melex750 Date: Thu, 11 Apr 2019 04:21:22 -0400 Subject: [PATCH 162/207] Add sizeof() operator for numeric data types --- src/CBot/CBotInstr/CBotExprLitNum.cpp | 40 +++++++++++++++++++++++++++ src/CBot/CBotInstr/CBotExprLitNum.h | 2 ++ src/CBot/CBotInstr/CBotParExpr.cpp | 14 ++++++++++ 3 files changed, 56 insertions(+) diff --git a/src/CBot/CBotInstr/CBotExprLitNum.cpp b/src/CBot/CBotInstr/CBotExprLitNum.cpp index 9842cf57..61978bf0 100644 --- a/src/CBot/CBotInstr/CBotExprLitNum.cpp +++ b/src/CBot/CBotInstr/CBotExprLitNum.cpp @@ -114,6 +114,46 @@ CBotInstr* CompileExprLitNum(CBotToken* &p, CBotCStack* pStack) return pStack->Return(nullptr, pStk); } +CBotInstr* CompileSizeOf(CBotToken* &p, CBotCStack* pStack) +{ + CBotToken* pp = p; + + if (!IsOfType(p, TokenTypVar)) return nullptr; + if (pp->GetString() == "sizeof" && IsOfType(p, ID_OPENPAR)) + { + CBotCStack* pStk = pStack->TokenStack(); + + int value; + + if (IsOfType(p, ID_BYTE)) value = sizeof(signed char); + else if (IsOfType(p, ID_SHORT)) value = sizeof(short); + else if (IsOfType(p, ID_CHAR)) value = sizeof(uint32_t); + else if (IsOfType(p, ID_INT)) value = sizeof(int); + else if (IsOfType(p, ID_LONG)) value = sizeof(long); + else if (IsOfType(p, ID_FLOAT)) value = sizeof(float); + else if (IsOfType(p, ID_DOUBLE)) value = sizeof(double); + else + { + p = pp; + return pStack->Return(nullptr, pStk); + } + + if (IsOfType(p, ID_CLOSEPAR)) + { + auto inst = new CBotExprLitNum(value); + inst->SetToken(pp); + + CBotVar* var = CBotVar::Create("", CBotTypInt); + pStk->SetVar(var); + return pStack->Return(inst, pStk); + } + pStk->SetError(CBotErrClosePar, p->GetStart()); + return pStack->Return(nullptr, pStk); + } + p = pp; + return nullptr; +} + template bool CBotExprLitNum::Execute(CBotStack* &pj) { diff --git a/src/CBot/CBotInstr/CBotExprLitNum.h b/src/CBot/CBotInstr/CBotExprLitNum.h index 92cd302d..8d7edcc1 100644 --- a/src/CBot/CBotInstr/CBotExprLitNum.h +++ b/src/CBot/CBotInstr/CBotExprLitNum.h @@ -26,6 +26,8 @@ namespace CBot CBotInstr* CompileExprLitNum(CBotToken* &p, CBotCStack* pStack); +CBotInstr* CompileSizeOf(CBotToken* &p, CBotCStack* pStack); + /** * \brief A number literal - 5, 1, 2.5, 3.75, etc. or a predefined numerical constant (see CBotToken::DefineNum()) * diff --git a/src/CBot/CBotInstr/CBotParExpr.cpp b/src/CBot/CBotInstr/CBotParExpr.cpp index 24bdaafe..9572ff5e 100644 --- a/src/CBot/CBotInstr/CBotParExpr.cpp +++ b/src/CBot/CBotInstr/CBotParExpr.cpp @@ -68,6 +68,13 @@ CBotInstr* CBotParExpr::Compile(CBotToken* &p, CBotCStack* pStack) if (inst != nullptr || !pStk->IsOk()) return pStack->Return(inst, pStk); + // is it sizeof operator ? + inst = CBot::CompileSizeOf(p, pStk); + if (inst != nullptr || !pStk->IsOk()) + { + return pStack->Return(inst, pStk); + } + // is it a variable name? if (p->GetType() == TokenTypVar) { @@ -155,6 +162,13 @@ CBotInstr* CBotParExpr::CompileLitExpr(CBotToken* &p, CBotCStack* pStack) return pStack->Return(inst, pStk); } + // is it sizeof operator ? + inst = CBot::CompileSizeOf(p, pStk); + if (inst != nullptr || !pStk->IsOk()) + { + return pStack->Return(inst, pStk); + } + // is this a chaine? if (p->GetType() == TokenTypString) { From 1058a326adad910b11f40b861d932993b64db468 Mon Sep 17 00:00:00 2001 From: melex750 Date: Thu, 11 Apr 2019 05:14:11 -0400 Subject: [PATCH 163/207] Add binary and character literals in CBOT --- po/colobot.pot | 3 + po/cs.po | 3 + po/de.po | 3 + po/fr.po | 3 + po/pl.po | 3 + po/pt.po | 3 + po/ru.po | 3 + src/CBot/CBotEnums.h | 4 +- src/CBot/CBotInstr/CBotExprLitChar.cpp | 151 +++++++++++++++++++++++ src/CBot/CBotInstr/CBotExprLitChar.h | 60 +++++++++ src/CBot/CBotInstr/CBotExprLitString.cpp | 5 +- src/CBot/CBotInstr/CBotParExpr.cpp | 8 ++ src/CBot/CBotToken.cpp | 48 +++++++ src/CBot/CBotUtils.cpp | 12 ++ src/CBot/CMakeLists.txt | 2 + src/common/restext.cpp | 1 + src/script/script.cpp | 9 +- test/unit/CBot/CBot_test.cpp | 122 ++++++++++++++++++ 18 files changed, 436 insertions(+), 7 deletions(-) create mode 100644 src/CBot/CBotInstr/CBotExprLitChar.cpp create mode 100644 src/CBot/CBotInstr/CBotExprLitChar.h diff --git a/po/colobot.pot b/po/colobot.pot index b91aba04..266d13b1 100644 --- a/po/colobot.pot +++ b/po/colobot.pot @@ -1795,6 +1795,9 @@ msgstr "" msgid "Invalid universal character name" msgstr "" +msgid "Empty character constant" +msgstr "" + msgid "Dividing by zero" msgstr "" diff --git a/po/cs.po b/po/cs.po index b5c41e3a..7f1b50d4 100644 --- a/po/cs.po +++ b/po/cs.po @@ -507,6 +507,9 @@ msgstr "Upravit vybraný program" msgid "Egg" msgstr "Vejce" +msgid "Empty character constant" +msgstr "" + msgid "End of block missing" msgstr "Chybí konec bloku" diff --git a/po/de.po b/po/de.po index 66d9918a..61f72697 100644 --- a/po/de.po +++ b/po/de.po @@ -508,6 +508,9 @@ msgstr "Gewähltes Programm bearbeiten" msgid "Egg" msgstr "Ei" +msgid "Empty character constant" +msgstr "" + msgid "End of block missing" msgstr "Es fehlt eine geschlossene geschweifte Klammer \"}\" (Ende des Blocks)" diff --git a/po/fr.po b/po/fr.po index c8d48217..f0229e72 100644 --- a/po/fr.po +++ b/po/fr.po @@ -510,6 +510,9 @@ msgstr "Éditer le programme sélectionné" msgid "Egg" msgstr "Oeuf" +msgid "Empty character constant" +msgstr "" + msgid "End of block missing" msgstr "Il manque la fin du bloc" diff --git a/po/pl.po b/po/pl.po index 073c7b58..5b9bab87 100644 --- a/po/pl.po +++ b/po/pl.po @@ -506,6 +506,9 @@ msgstr "Edytuj zaznaczony program" msgid "Egg" msgstr "Jajo" +msgid "Empty character constant" +msgstr "" + msgid "End of block missing" msgstr "Brak końca bloku" diff --git a/po/pt.po b/po/pt.po index f99a9cbf..53bdd07c 100644 --- a/po/pt.po +++ b/po/pt.po @@ -505,6 +505,9 @@ msgstr "Alterar o programa selecionado" msgid "Egg" msgstr "Ovo" +msgid "Empty character constant" +msgstr "" + msgid "End of block missing" msgstr "Fim do bloco ausente" diff --git a/po/ru.po b/po/ru.po index ca44c0c5..df68516f 100644 --- a/po/ru.po +++ b/po/ru.po @@ -514,6 +514,9 @@ msgstr "Изменить выбранную программу" msgid "Egg" msgstr "Яйцо" +msgid "Empty character constant" +msgstr "" + msgid "End of block missing" msgstr "Отсутствует конец блока" diff --git a/src/CBot/CBotEnums.h b/src/CBot/CBotEnums.h index 3dff66eb..35775295 100644 --- a/src/CBot/CBotEnums.h +++ b/src/CBot/CBotEnums.h @@ -182,7 +182,8 @@ enum TokenType TokenTypNum = 2, //!< number TokenTypString = 3, //!< string TokenTypVar = 4, //!< a variable name - TokenTypDef = 5 //!< value according DefineNum + TokenTypDef = 5, //!< value according DefineNum + TokenTypChar = 6, //!< character literal }; /** @@ -252,6 +253,7 @@ enum CBotError : int CBotErrHexDigits = 5052, //!< missing hex digits after escape sequence CBotErrHexRange = 5053, //!< hex value out of range CBotErrUnicodeName = 5054, //!< invalid universal character name + CBotErrCharEmpty = 5055, //!< empty character constant // Runtime errors CBotErrZeroDiv = 6000, //!< division by zero diff --git a/src/CBot/CBotInstr/CBotExprLitChar.cpp b/src/CBot/CBotInstr/CBotExprLitChar.cpp new file mode 100644 index 00000000..dc7de906 --- /dev/null +++ b/src/CBot/CBotInstr/CBotExprLitChar.cpp @@ -0,0 +1,151 @@ +/* + * This file is part of the Colobot: Gold Edition source code + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam + * http://epsitec.ch; http://colobot.info; http://github.com/colobot + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see http://gnu.org/licenses + */ + +#include "CBot/CBotInstr/CBotExprLitChar.h" + +#include "CBot/CBotStack.h" +#include "CBot/CBotCStack.h" + +#include "CBot/CBotVar/CBotVar.h" + +namespace CBot +{ + +CBotExprLitChar::CBotExprLitChar() +{ +} + +CBotExprLitChar::~CBotExprLitChar() +{ +} + +CBotInstr* CBotExprLitChar::Compile(CBotToken* &p, CBotCStack* pStack) +{ + CBotCStack* pStk = pStack->TokenStack(); + + const auto& s = p->GetString(); + + auto it = s.cbegin(); + if (++it != s.cend()) + { + if (*it != '\'') // not empty quotes ? + { + uint32_t valchar = 0; + int pos = p->GetStart() + 1; + + if (*it != '\\') valchar = *(it++); // not escape sequence ? + else if (++it != s.cend()) + { + pStk->SetStartError(pos++); + unsigned char c = *(it++); + if (c == '\"' || c == '\'' || c == '\\') valchar = c; + else if (c == 'a') valchar = '\a'; // alert bell + else if (c == 'b') valchar = '\b'; // backspace + else if (c == 'f') valchar = '\f'; // form feed + else if (c == 'n') valchar = '\n'; // new line + else if (c == 'r') valchar = '\r'; // carriage return + else if (c == 't') valchar = '\t'; // horizontal tab + else if (c == 'v') valchar = '\v'; // vertical tab + else if (c == 'u' || c == 'U') // unicode escape + { + if (it != s.cend()) + { + std::string hex = ""; + size_t maxlen = (c == 'u') ? 4 : 8; + + for (size_t i = 0; i < maxlen; i++) + { + if (!CharInList(*it, "0123456789ABCDEFabcdef")) break; + ++pos; + hex += *it; + if (++it == s.cend()) break; + } + + if (maxlen == hex.length()) // unicode character + { + try + { + valchar = std::stoi(hex, nullptr, 16); + if (0x10FFFF < valchar || (0xD7FF < valchar && valchar < 0xE000)) + pStk->SetError(CBotErrUnicodeName, pos + 1); + } + catch (const std::out_of_range& e) + { + pStk->SetError(CBotErrHexRange, pos + 1); + } + } + else + pStk->SetError(CBotErrHexDigits, pos + 1); + } + else + pStk->SetError(CBotErrHexDigits, pos + 1); + } + else + pStk->SetError(CBotErrBadEscape, pos + 1); + } + + if (it == s.cend() || *it != '\'') + pStk->SetError(CBotErrEndQuote, p); + + if (pStk->IsOk()) + { + CBotExprLitChar* inst = new CBotExprLitChar(); + inst->m_valchar = valchar; + inst->SetToken(p); + p = p->GetNext(); + + CBotVar* var = CBotVar::Create("", CBotTypChar); + pStk->SetVar(var); + + return pStack->Return(inst, pStk); + } + } + pStk->SetError(CBotErrCharEmpty, p); + } + + pStk->SetError(CBotErrEndQuote, p); + return pStack->Return(nullptr, pStk); +} + +bool CBotExprLitChar::Execute(CBotStack* &pj) +{ + CBotStack* pile = pj->AddStack(this); + + if (pile->IfStep()) return false; + + CBotVar* var = CBotVar::Create("", CBotTypChar); + + var->SetValChar(m_valchar); + + pile->SetVar(var); + + return pj->Return(pile); +} + +void CBotExprLitChar::RestoreState(CBotStack* &pj, bool bMain) +{ + if (bMain) pj->RestoreStack(this); +} + +std::string CBotExprLitChar::GetDebugData() +{ + return m_token.GetString(); +} + +} // namespace CBot diff --git a/src/CBot/CBotInstr/CBotExprLitChar.h b/src/CBot/CBotInstr/CBotExprLitChar.h new file mode 100644 index 00000000..1f31d6d2 --- /dev/null +++ b/src/CBot/CBotInstr/CBotExprLitChar.h @@ -0,0 +1,60 @@ +/* + * This file is part of the Colobot: Gold Edition source code + * Copyright (C) 2001-2018, Daniel Roux, EPSITEC SA & TerranovaTeam + * http://epsitec.ch; http://colobot.info; http://github.com/colobot + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see http://gnu.org/licenses + */ + +#pragma once + +#include "CBot/CBotInstr/CBotInstr.h" + +namespace CBot +{ + +/** + * \brief A character literal + * \verbatim 'a', '\n', '\t', '\uFFFD', '\U0000FFFD', etc. \endverbatim + */ +class CBotExprLitChar : public CBotInstr +{ +public: + CBotExprLitChar(); + ~CBotExprLitChar(); + + /*! + * \brief Compile a character literal + */ + static CBotInstr* Compile(CBotToken* &p, CBotCStack* pStack); + + /*! + * \brief Execute, returns the corresponding char. + */ + bool Execute(CBotStack* &pj) override; + + /*! + * \brief RestoreState + */ + void RestoreState(CBotStack* &pj, bool bMain) override; + +protected: + virtual const std::string GetDebugName() override { return "CBotExprLitChar"; } + virtual std::string GetDebugData() override; + +private: + uint32_t m_valchar = 0; +}; + +} // namespace CBot diff --git a/src/CBot/CBotInstr/CBotExprLitString.cpp b/src/CBot/CBotInstr/CBotExprLitString.cpp index 72cca72b..fc254162 100644 --- a/src/CBot/CBotInstr/CBotExprLitString.cpp +++ b/src/CBot/CBotInstr/CBotExprLitString.cpp @@ -42,7 +42,7 @@ CBotInstr* CBotExprLitString::Compile(CBotToken* &p, CBotCStack* pStack) { CBotCStack* pStk = pStack->TokenStack(); - std::string s = p->GetString(); + const auto& s = p->GetString(); auto it = s.cbegin(); if (++it != s.cend()) @@ -51,7 +51,7 @@ CBotInstr* CBotExprLitString::Compile(CBotToken* &p, CBotCStack* pStack) std::string valstring = ""; while (it != s.cend() && *it != '\"') { - pStk->SetStartError(++pos); + ++pos; if (*it != '\\') // not escape sequence ? { valstring += *(it++); @@ -59,6 +59,7 @@ CBotInstr* CBotExprLitString::Compile(CBotToken* &p, CBotCStack* pStack) } if (++it == s.cend()) break; + pStk->SetStartError(pos); if (CharInList(*it, "01234567")) // octal { diff --git a/src/CBot/CBotInstr/CBotParExpr.cpp b/src/CBot/CBotInstr/CBotParExpr.cpp index 9572ff5e..fa455c27 100644 --- a/src/CBot/CBotInstr/CBotParExpr.cpp +++ b/src/CBot/CBotInstr/CBotParExpr.cpp @@ -21,6 +21,7 @@ #include "CBot/CBotInstr/CBotExpression.h" #include "CBot/CBotInstr/CBotExprLitBool.h" +#include "CBot/CBotInstr/CBotExprLitChar.h" #include "CBot/CBotInstr/CBotExprLitNan.h" #include "CBot/CBotInstr/CBotExprLitNull.h" #include "CBot/CBotInstr/CBotExprLitNum.h" @@ -169,6 +170,13 @@ CBotInstr* CBotParExpr::CompileLitExpr(CBotToken* &p, CBotCStack* pStack) return pStack->Return(inst, pStk); } + // is this a character? + if (p->GetType() == TokenTypChar) + { + CBotInstr* inst = CBotExprLitChar::Compile(p, pStk); + return pStack->Return(inst, pStk); + } + // is this a chaine? if (p->GetType() == TokenTypString) { diff --git a/src/CBot/CBotToken.cpp b/src/CBot/CBotToken.cpp index d5afe1fe..9764d237 100644 --- a/src/CBot/CBotToken.cpp +++ b/src/CBot/CBotToken.cpp @@ -304,12 +304,53 @@ CBotToken* CBotToken::NextToken(const char*& program, bool first) stop = true; } + // special case for characters + if (token[0] == '\'') + { + if (c == '\\') // escape sequence + { + token += c; + c = *(program++); + + if (c == 'u' || c == 'U') // unicode escape + { + int maxlen = (c == 'u') ? 4 : 8; + token += c; + c = *(program++); + for (int i = 0; i < maxlen; i++) + { + if (c == 0 || !CharInList(c, hexnum)) break; + token += c; + c = *(program++); + } + } + else if (c != 0 && !CharInList(c, nch)) // other escape char + { + token += c; + c = *(program++); + } + } + else if (c != 0 && c != '\'' && !CharInList(c, nch)) // single character + { + token += c; + c = *(program++); + } + + if (c == '\'') // close quote + { + token += c; + c = *(program++); + } + stop = true; + } + // special case for numbers if ( CharInList(token[0], num )) { bool bdot = false; // found a point? bool bexp = false; // found an exponent? + char bin[] = "01"; char* liste = num; if (token[0] == '0' && c == 'x') // hexadecimal value? { @@ -317,6 +358,12 @@ CBotToken* CBotToken::NextToken(const char*& program, bool first) c = *(program++); // next character liste = hexnum; } + else if (token[0] == '0' && c == 'b') // binary literal + { + liste = bin; + token += c; + c = *(program++); + } cw: while (c != 0 && CharInList(c, liste)) { @@ -399,6 +446,7 @@ bis: if (CharInList(token[0], num )) t->m_type = TokenTypNum; if (token[0] == '\"') t->m_type = TokenTypString; + if (token[0] == '\'') t->m_type = TokenTypChar; if (first) t->m_type = TokenTypNone; t->m_keywordId = GetKeyWord(token); diff --git a/src/CBot/CBotUtils.cpp b/src/CBot/CBotUtils.cpp index 4d663bea..afa05bbc 100644 --- a/src/CBot/CBotUtils.cpp +++ b/src/CBot/CBotUtils.cpp @@ -155,6 +155,18 @@ long GetNumInt(const std::string& str) break; } } + else if (*p == 'b') + { + while (*++p != 0) + { + if (*p == '0' || *p == '1') + { + num = (num << 1) + *p - '0'; + continue; + } + break; + } + } return num; } diff --git a/src/CBot/CMakeLists.txt b/src/CBot/CMakeLists.txt index 4be97841..45af8639 100644 --- a/src/CBot/CMakeLists.txt +++ b/src/CBot/CMakeLists.txt @@ -44,6 +44,8 @@ set(SOURCES CBotInstr/CBotEmpty.h CBotInstr/CBotExprLitBool.cpp CBotInstr/CBotExprLitBool.h + CBotInstr/CBotExprLitChar.cpp + CBotInstr/CBotExprLitChar.h CBotInstr/CBotExprLitNan.cpp CBotInstr/CBotExprLitNan.h CBotInstr/CBotExprLitNull.cpp diff --git a/src/common/restext.cpp b/src/common/restext.cpp index 4aa21564..065f6c92 100644 --- a/src/common/restext.cpp +++ b/src/common/restext.cpp @@ -742,6 +742,7 @@ void InitializeRestext() stringsCbot[CBot::CBotErrHexDigits] = TR("Missing hex digits after escape sequence"); stringsCbot[CBot::CBotErrHexRange] = TR("Hex value out of range"); stringsCbot[CBot::CBotErrUnicodeName] = TR("Invalid universal character name"); + stringsCbot[CBot::CBotErrCharEmpty] = TR("Empty character constant"); stringsCbot[CBot::CBotErrZeroDiv] = TR("Dividing by zero"); stringsCbot[CBot::CBotErrNotInit] = TR("Variable not initialized"); diff --git a/src/script/script.cpp b/src/script/script.cpp index 22ae1024..0b5828aa 100644 --- a/src/script/script.cpp +++ b/src/script/script.cpp @@ -589,16 +589,17 @@ void CScript::UpdateList(Ui::CList* list) list->SetState(Ui::STATE_ENABLE); } -// Colorize a string literal with escape sequences also colored +// Colorize a string or character literal with escape sequences also colored static void HighlightString(Ui::CEdit* edit, const std::string& s, int start) { edit->SetFormat(start, start + 1, Gfx::FONT_HIGHLIGHT_STRING); - auto it = s.cbegin() + 1; + auto it = s.cbegin(); + char endQuote = *(it++); ++start; - while (it != s.cend() && *it != '\"') + while (it != s.cend() && *it != endQuote) { if (*(it++) != '\\') // not escape sequence { @@ -697,7 +698,7 @@ void CScript::ColorizeScript(Ui::CEdit* edit, int rangeStart, int rangeEnd) { color = Gfx::FONT_HIGHLIGHT_STRING; } - else if (type == CBot::TokenTypString) // string literals + else if (type == CBot::TokenTypString || type == CBot::TokenTypChar) // string literals and character literals { HighlightString(edit, token, cursor1); bt = bt->GetNext(); diff --git a/test/unit/CBot/CBot_test.cpp b/test/unit/CBot/CBot_test.cpp index 6f2201b9..4c60b8fa 100644 --- a/test/unit/CBot/CBot_test.cpp +++ b/test/unit/CBot/CBot_test.cpp @@ -619,6 +619,27 @@ TEST_F(CBotUT, IntegerMathNearLimits_Issue993) ); } +TEST_F(CBotUT, BinaryLiterals) +{ + ExecuteTest( + "extern void TestBinaryLiterals() {\n" + " ASSERT( 8 == 0b00001000);\n" + " ASSERT( 12 == 0b00001100);\n" + " ASSERT( 16 == 0b00010000);\n" + " ASSERT( 24 == 0b00011000);\n" + " ASSERT( 32 == 0b00100000);\n" + " ASSERT( 48 == 0b00110000);\n" + " ASSERT( 64 == 0b01000000);\n" + " ASSERT( 96 == 0b01100000);\n" + " ASSERT(128 == 0b10000000);\n" + " ASSERT(192 == 0b11000000);\n" + " ASSERT(256 == 0b100000000);\n" + " ASSERT(384 == 0b110000000);\n" + " ASSERT(512 == 0b1000000000);\n" + "}\n" + ); +} + TEST_F(CBotUT, ToString) { ExecuteTest( @@ -1752,6 +1773,107 @@ TEST_F(CBotUT, StringFunctions) ); } +TEST_F(CBotUT, LiteralCharacters) +{ + ExecuteTest( + "extern void TestCharValue()\n" + "{\n" + " ASSERT('A' == 65);\n" + " ASSERT('B' == 66);\n" + " ASSERT('C' == 67);\n" + " ASSERT('\\a' == 0x07);\n" + " ASSERT('\\b' == 0x08);\n" + " ASSERT('\\t' == 0x09);\n" + " ASSERT('\\n' == 0x0A);\n" + " ASSERT('\\v' == 0x0B);\n" + " ASSERT('\\f' == 0x0C);\n" + " ASSERT('\\r' == 0x0D);\n" + " ASSERT('\\\"' == 0x22);\n" + " ASSERT('\\\'' == 0x27);\n" + " ASSERT('\\\\' == 0x5C);\n" + "}\n" + "extern void TestCharUnicodeEscape()\n" + "{\n" + " ASSERT('\\u0007' == '\\a');\n" + " ASSERT('\\u0008' == '\\b');\n" + " ASSERT('\\u0009' == '\\t');\n" + " ASSERT('\\u000A' == '\\n');\n" + " ASSERT('\\u000B' == '\\v');\n" + " ASSERT('\\u000C' == '\\f');\n" + " ASSERT('\\u000D' == '\\r');\n" + " ASSERT('\\u0022' == '\\\"');\n" + " ASSERT('\\u0027' == '\\\'');\n" + " ASSERT('\\u005C' == '\\\\');\n" + "}\n" + "extern void AssignCharToString_ToUTF_8()\n" + "{\n" + " string test = '\\u00A9';\n" + " test += '\\u00AE';\n" + " ASSERT(test == \"\\xC2\\xA9\\xC2\\xAE\");\n" + "}\n" + "extern void AddCharToString_ToUTF_8()\n" + "{\n" + " ASSERT(\"\" + 'A' + 'B' + 'C' == \"ABC\");\n" + " ASSERT(\"\" + '\\u00A9' == \"\\xC2\\xA9\");\n" + " ASSERT(\"\" + '\\u00AE' == \"\\xC2\\xAE\");\n" + " ASSERT(\"\" + '\\u262E' == \"\\xE2\\x98\\xAE\");\n" + " ASSERT(\"\" + '\\u262F' == \"\\xE2\\x98\\xAF\");\n" + " ASSERT(\"\" + '\\U0001F60E' == \"\\xF0\\x9F\\x98\\x8E\");\n" + " ASSERT(\"\" + '\\U0001F61C' == \"\\xF0\\x9F\\x98\\x9C\");\n" + " ASSERT(\"\" + '\\U0001F6E0' == \"\\xF0\\x9F\\x9B\\xA0\");\n" + " ASSERT(\"\" + '\\U0010FFFF' == \"\\xF4\\x8F\\xBF\\xBF\");\n" + "}\n" + ); + + ExecuteTest( + "extern void MissingEndQuote()\n" + "{\n" + " '\n" + "}\n", + CBotErrEndQuote + ); + + ExecuteTest( + "extern void MissingEndQuote()\n" + "{\n" + " 'a\n" + "}\n", + CBotErrEndQuote + ); + + ExecuteTest( + "extern void EmptyQuotes()\n" + "{\n" + " '';\n" + "}\n", + CBotErrCharEmpty + ); + + ExecuteTest( + "extern void UnknownEscapeSequence()\n" + "{\n" + " '\\p';\n" + "}\n", + CBotErrBadEscape + ); + + ExecuteTest( + "extern void MissingHexDigits()\n" + "{\n" + " '\\u';\n" + "}\n", + CBotErrHexDigits + ); + + ExecuteTest( + "extern void BadUnicodeCharacterName()\n" + "{\n" + " '\\U00110000';\n" + "}\n", + CBotErrUnicodeName + ); +} + TEST_F(CBotUT, TestNANParam_Issue642) { ExecuteTest( From 5f089f4a9bc2276ee2879e7fc77af222736c7595 Mon Sep 17 00:00:00 2001 From: melex750 Date: Thu, 11 Apr 2019 05:34:00 -0400 Subject: [PATCH 164/207] Fix and improve switch...case (#1008) --- po/colobot.pot | 3 + po/cs.po | 3 + po/de.po | 3 + po/fr.po | 3 + po/pl.po | 3 + po/pt.po | 3 + po/ru.po | 3 + src/CBot/CBotEnums.h | 1 + src/CBot/CBotInstr/CBotCase.cpp | 98 +++++++++++++++++++-------- src/CBot/CBotInstr/CBotCase.h | 19 ++---- src/CBot/CBotInstr/CBotExprUnaire.cpp | 9 +-- src/CBot/CBotInstr/CBotExprUnaire.h | 2 +- src/CBot/CBotInstr/CBotInstr.cpp | 7 -- src/CBot/CBotInstr/CBotInstr.h | 11 --- src/CBot/CBotInstr/CBotParExpr.cpp | 58 +++++++++++++++- src/CBot/CBotInstr/CBotParExpr.h | 4 +- src/CBot/CBotInstr/CBotSwitch.cpp | 76 ++++++++++----------- src/CBot/CBotInstr/CBotSwitch.h | 10 ++- src/CBot/CBotInstr/CBotTwoOpExpr.cpp | 13 ++-- src/CBot/CBotInstr/CBotTwoOpExpr.h | 2 +- src/common/restext.cpp | 1 + test/unit/CBot/CBot_test.cpp | 86 +++++++++++++++++++++++ 22 files changed, 298 insertions(+), 120 deletions(-) diff --git a/po/colobot.pot b/po/colobot.pot index 266d13b1..7cbb92d7 100644 --- a/po/colobot.pot +++ b/po/colobot.pot @@ -1798,6 +1798,9 @@ msgstr "" msgid "Empty character constant" msgstr "" +msgid "Duplicate label in switch" +msgstr "" + msgid "Dividing by zero" msgstr "" diff --git a/po/cs.po b/po/cs.po index 7f1b50d4..b14eb434 100644 --- a/po/cs.po +++ b/po/cs.po @@ -489,6 +489,9 @@ msgstr "Dolů (\\key gdown;)" msgid "Drawer bot" msgstr "Tužkobot" +msgid "Duplicate label in switch" +msgstr "" + msgid "Dust\\Dust and dirt on bots and buildings" msgstr "Prach\\Prach a špína na robotech a budovách" diff --git a/po/de.po b/po/de.po index 61f72697..f031a049 100644 --- a/po/de.po +++ b/po/de.po @@ -490,6 +490,9 @@ msgstr "Sinkt (\\key gdown;)" msgid "Drawer bot" msgstr "Zeichner" +msgid "Duplicate label in switch" +msgstr "" + msgid "Dust\\Dust and dirt on bots and buildings" msgstr "Schmutz\\Schmutz auf Robotern und Bauten" diff --git a/po/fr.po b/po/fr.po index f0229e72..5c904b95 100644 --- a/po/fr.po +++ b/po/fr.po @@ -492,6 +492,9 @@ msgstr "Descend (\\key gdown;)" msgid "Drawer bot" msgstr "Robot dessinateur" +msgid "Duplicate label in switch" +msgstr "" + msgid "Dust\\Dust and dirt on bots and buildings" msgstr "Salissures\\Salissures des robots et bâtiments" diff --git a/po/pl.po b/po/pl.po index 5b9bab87..35be67e1 100644 --- a/po/pl.po +++ b/po/pl.po @@ -488,6 +488,9 @@ msgstr "Dół (\\key gdown;)" msgid "Drawer bot" msgstr "Robot rysownik" +msgid "Duplicate label in switch" +msgstr "" + msgid "Dust\\Dust and dirt on bots and buildings" msgstr "Kurz\\Kurz i bród na robotach i budynkach" diff --git a/po/pt.po b/po/pt.po index 53bdd07c..06bb43e3 100644 --- a/po/pt.po +++ b/po/pt.po @@ -487,6 +487,9 @@ msgstr "Baixo (\\key gdown;)" msgid "Drawer bot" msgstr "Robô cartoonista" +msgid "Duplicate label in switch" +msgstr "" + msgid "Dust\\Dust and dirt on bots and buildings" msgstr "Poeira\\Poeira e sujeira nos robôs e prédios" diff --git a/po/ru.po b/po/ru.po index df68516f..37852277 100644 --- a/po/ru.po +++ b/po/ru.po @@ -496,6 +496,9 @@ msgstr "Вниз (\\key gdown;)" msgid "Drawer bot" msgstr "Рисовальщик" +msgid "Duplicate label in switch" +msgstr "" + msgid "Dust\\Dust and dirt on bots and buildings" msgstr "Пыль\\Пыль и грязь на ботах и зданиях" diff --git a/src/CBot/CBotEnums.h b/src/CBot/CBotEnums.h index 35775295..2f04707d 100644 --- a/src/CBot/CBotEnums.h +++ b/src/CBot/CBotEnums.h @@ -254,6 +254,7 @@ enum CBotError : int CBotErrHexRange = 5053, //!< hex value out of range CBotErrUnicodeName = 5054, //!< invalid universal character name CBotErrCharEmpty = 5055, //!< empty character constant + CBotErrRedefCase = 5056, //!< duplicate label in switch // Runtime errors CBotErrZeroDiv = 6000, //!< division by zero diff --git a/src/CBot/CBotInstr/CBotCase.cpp b/src/CBot/CBotInstr/CBotCase.cpp index 15c8d4f7..2e0cc7f0 100644 --- a/src/CBot/CBotInstr/CBotCase.cpp +++ b/src/CBot/CBotInstr/CBotCase.cpp @@ -19,7 +19,7 @@ #include "CBot/CBotInstr/CBotCase.h" -#include "CBot/CBotInstr/CBotExprLitNum.h" +#include "CBot/CBotInstr/CBotTwoOpExpr.h" #include "CBot/CBotStack.h" #include "CBot/CBotCStack.h" @@ -30,69 +30,107 @@ namespace CBot //////////////////////////////////////////////////////////////////////////////// CBotCase::CBotCase() { - m_value = nullptr; + m_instr = nullptr; } //////////////////////////////////////////////////////////////////////////////// CBotCase::~CBotCase() { - delete m_value; + delete m_instr; } -//////////////////////////////////////////////////////////////////////////////// -CBotInstr* CBotCase::Compile(CBotToken* &p, CBotCStack* pStack) +CBotInstr* CBotCase::Compile(CBotToken* &p, CBotCStack* pStack, std::unordered_map& labels) { - CBotCase* inst = new CBotCase(); // creates the object CBotToken* pp = p; // preserves at the ^ token (starting position) - inst->SetToken(p); if (!IsOfType(p, ID_CASE, ID_DEFAULT)) return nullptr; // should never happen + pStack->SetStartError(pp->GetStart()); - if ( pp->GetType() == ID_CASE ) + long labelValue = 0; + + if (pp->GetType() == ID_CASE) { - pp = p; - inst->m_value = CBot::CompileExprLitNum(p, pStack); - if (inst->m_value == nullptr ) + CBotInstr* i = nullptr; + if (nullptr != (i = CBotTwoOpExpr::Compile(p, pStack, nullptr, true))) { - pStack->SetError( CBotErrBadNum, pp ); - delete inst; - return nullptr; + if (pStack->GetType() <= CBotTypLong) + { + CBotStack* pile = CBotStack::AllocateStack(); + while ( !i->Execute(pile) ); + labelValue = pile->GetVar()->GetValLong(); + pile->Delete(); + + if (labels.count(labelValue) > 0) + { + pStack->SetError(CBotErrRedefCase, p->GetStart()); + } + } + else + pStack->SetError(CBotErrBadNum, p->GetStart()); + delete i; } - } - if ( !IsOfType( p, ID_DOTS )) - { - pStack->SetError( CBotErrNoDoubleDots, p->GetStart() ); - delete inst; - return nullptr; + else + pStack->SetError(CBotErrBadNum, p->GetStart()); } - return inst; + if (pStack->IsOk() && IsOfType(p, ID_DOTS)) + { + CBotCase* newCase = new CBotCase(); + newCase->SetToken(pp); + if (pp->GetType() == ID_CASE) + labels[labelValue] = newCase; + return newCase; + } + + pStack->SetError(CBotErrNoDoubleDots, p->GetStart()); + return nullptr; } //////////////////////////////////////////////////////////////////////////////// bool CBotCase::Execute(CBotStack* &pj) { - return true; // the "case" statement does nothing! + if (m_instr == nullptr) return true; + CBotStack* pile = pj->AddStack(this, CBotStack::BlockVisibilityType::BLOCK); + + int state = pile->GetState(); + CBotInstr* p = m_instr; + while (state-- > 0) p = p->GetNext(); + + while (p != nullptr) + { + if (!p->Execute(pile)) return false; + pile->IncState(); + p = p->GetNext(); + } + + pile->Delete(); + return pj->IsOk(); } //////////////////////////////////////////////////////////////////////////////// void CBotCase::RestoreState(CBotStack* &pj, bool bMain) { -} + if (!bMain) return; -//////////////////////////////////////////////////////////////////////////////// -bool CBotCase::CompCase(CBotStack* &pile, int val) -{ - if (m_value == nullptr ) return true; // "default" case + CBotStack* pile = pj->RestoreStack(this); + if (pile == nullptr) return; - while (!m_value->Execute(pile)); // puts the value on the correspondent stack (without interruption) - return (pile->GetVal() == val); // compared with the given value + CBotInstr* p = m_instr; + + int state = pile->GetState(); + while (p != nullptr && state-- > 0) + { + p->RestoreState(pile, bMain); + p = p->GetNext(); + } + + if (p != nullptr) p->RestoreState(pile, bMain); } std::map CBotCase::GetDebugLinks() { auto links = CBotInstr::GetDebugLinks(); - links["m_value"] = m_value; + links["m_instr"] = m_instr; return links; } diff --git a/src/CBot/CBotInstr/CBotCase.h b/src/CBot/CBotInstr/CBotCase.h index e2863cde..ccd031e8 100644 --- a/src/CBot/CBotInstr/CBotCase.h +++ b/src/CBot/CBotInstr/CBotCase.h @@ -21,6 +21,8 @@ #include "CBot/CBotInstr/CBotInstr.h" +#include + namespace CBot { @@ -42,7 +44,7 @@ public: * \param pStack * \return */ - static CBotInstr* Compile(CBotToken* &p, CBotCStack* pStack); + static CBotInstr* Compile(CBotToken* &p, CBotCStack* pStack, std::unordered_map& labels); /*! * \brief Execute Execution of instruction "case". @@ -58,22 +60,15 @@ public: */ void RestoreState(CBotStack* &pj, bool bMain) override; - /*! - * \brief CompCase Routine to find the entry point of "case" corresponding - * to the value seen. - * \param pj - * \param val - * \return - */ - bool CompCase(CBotStack* &pj, int val) override; - protected: virtual const std::string GetDebugName() override { return "CBotCase"; } virtual std::map GetDebugLinks() override; private: - //! Value to compare. - CBotInstr* m_value; + //! List of instructions after case label + CBotInstr* m_instr; + + friend class CBotSwitch; }; } // namespace CBot diff --git a/src/CBot/CBotInstr/CBotExprUnaire.cpp b/src/CBot/CBotInstr/CBotExprUnaire.cpp index c39fd89e..d9a6c4d4 100644 --- a/src/CBot/CBotInstr/CBotExprUnaire.cpp +++ b/src/CBot/CBotInstr/CBotExprUnaire.cpp @@ -40,8 +40,7 @@ CBotExprUnaire::~CBotExprUnaire() delete m_expr; } -//////////////////////////////////////////////////////////////////////////////// -CBotInstr* CBotExprUnaire::Compile(CBotToken* &p, CBotCStack* pStack, bool bLiteral) +CBotInstr* CBotExprUnaire::Compile(CBotToken* &p, CBotCStack* pStack, bool bLiteral, bool bConstExpr) { int op = p->GetType(); CBotToken* pp = p; @@ -52,8 +51,10 @@ CBotInstr* CBotExprUnaire::Compile(CBotToken* &p, CBotCStack* pStack, bool bLite CBotExprUnaire* inst = new CBotExprUnaire(); inst->SetToken(pp); - if (!bLiteral) inst->m_expr = CBotParExpr::Compile(p, pStk); - else inst->m_expr = CBotParExpr::CompileLitExpr(p, pStk); + if (bConstExpr || !bLiteral) + inst->m_expr = CBotParExpr::Compile(p, pStk, bConstExpr); + else + inst->m_expr = CBotParExpr::CompileLitExpr(p, pStk); if (inst->m_expr != nullptr) { diff --git a/src/CBot/CBotInstr/CBotExprUnaire.h b/src/CBot/CBotInstr/CBotExprUnaire.h index 8a743a81..82d124a5 100644 --- a/src/CBot/CBotInstr/CBotExprUnaire.h +++ b/src/CBot/CBotInstr/CBotExprUnaire.h @@ -40,7 +40,7 @@ public: * \param bLiteral If true, compiles only literal expressions Ex: ~11, -4.0, !false, not true * \return The compiled instruction or nullptr */ - static CBotInstr* Compile(CBotToken* &p, CBotCStack* pStack, bool bLiteral = false); + static CBotInstr* Compile(CBotToken* &p, CBotCStack* pStack, bool bLiteral = false, bool bConstExpr = false); /*! * \brief Execute diff --git a/src/CBot/CBotInstr/CBotInstr.cpp b/src/CBot/CBotInstr/CBotInstr.cpp index 04b13204..54d9cee9 100644 --- a/src/CBot/CBotInstr/CBotInstr.cpp +++ b/src/CBot/CBotInstr/CBotInstr.cpp @@ -317,13 +317,6 @@ void CBotInstr::RestoreStateVar(CBotStack* &pile, bool bMain) assert(0); // dad do not know, see the girls } -//////////////////////////////////////////////////////////////////////////////// -bool CBotInstr::CompCase(CBotStack* &pj, int val) -{ - return false; -} - -//////////////////////////////////////////////////////////////////////////////// CBotInstr* CBotInstr::CompileArray(CBotToken* &p, CBotCStack* pStack, CBotTypResult type, bool first) { if (IsOfType(p, ID_OPBRK)) diff --git a/src/CBot/CBotInstr/CBotInstr.h b/src/CBot/CBotInstr/CBotInstr.h index 712b379d..2c4d5884 100644 --- a/src/CBot/CBotInstr/CBotInstr.h +++ b/src/CBot/CBotInstr/CBotInstr.h @@ -191,17 +191,6 @@ public: virtual void RestoreStateVar(CBotStack* &pile, bool bMain); - /** - * \brief CompCase This routine is defined only for the subclass CBotCase - * this allows to make the call on all instructions CompCase to see if it's - * a case to the desired value.. - * \param pj - * \param val - * \return - */ - virtual bool CompCase(CBotStack* &pj, - int val); - /** * \brief SetToken Set the token corresponding to the instruction. * \param p diff --git a/src/CBot/CBotInstr/CBotParExpr.cpp b/src/CBot/CBotInstr/CBotParExpr.cpp index fa455c27..9dd784bc 100644 --- a/src/CBot/CBotInstr/CBotParExpr.cpp +++ b/src/CBot/CBotInstr/CBotParExpr.cpp @@ -32,6 +32,7 @@ #include "CBot/CBotInstr/CBotNew.h" #include "CBot/CBotInstr/CBotPostIncExpr.h" #include "CBot/CBotInstr/CBotPreIncExpr.h" +#include "CBot/CBotInstr/CBotTwoOpExpr.h" #include "CBot/CBotVar/CBotVar.h" @@ -40,13 +41,15 @@ namespace CBot { -//////////////////////////////////////////////////////////////////////////////// -CBotInstr* CBotParExpr::Compile(CBotToken* &p, CBotCStack* pStack) +CBotInstr* CBotParExpr::Compile(CBotToken* &p, CBotCStack* pStack, bool bConstExpr) { CBotCStack* pStk = pStack->TokenStack(); pStk->SetStartError(p->GetStart()); + if (bConstExpr) + return CBotParExpr::CompileConstExpr(p, pStack); + // is it an expression in parentheses? if (IsOfType(p, ID_OPENPAR)) { @@ -224,4 +227,55 @@ CBotInstr* CBotParExpr::CompileLitExpr(CBotToken* &p, CBotCStack* pStack) return pStack->Return(nullptr, pStk); } +CBotInstr* CBotParExpr::CompileConstExpr(CBotToken* &p, CBotCStack* pStack) +{ + CBotCStack* pStk = pStack->TokenStack(); + + // is it an expression in parentheses? + if (IsOfType(p, ID_OPENPAR)) + { + CBotInstr* inst = CBotTwoOpExpr::Compile(p, pStk, nullptr, true); + + if (nullptr != inst) + { + if (IsOfType(p, ID_CLOSEPAR)) + { + return pStack->Return(inst, pStk); + } + pStk->SetError(CBotErrClosePar, p->GetStart()); + } + delete inst; + return pStack->Return(nullptr, pStk); + } + + // is this a unary operation? + CBotInstr* inst = CBotExprUnaire::Compile(p, pStk, true, true); + if (inst != nullptr || !pStk->IsOk()) + return pStack->Return(inst, pStk); + + // is it a number or DefineNum? + if (p->GetType() == TokenTypNum || + p->GetType() == TokenTypDef ) + { + CBotInstr* inst = CBot::CompileExprLitNum(p, pStk); + return pStack->Return(inst, pStk); + } + + // is this a character? + if (p->GetType() == TokenTypChar) + { + CBotInstr* inst = CBotExprLitChar::Compile(p, pStk); + return pStack->Return(inst, pStk); + } + + // is it sizeof operator ? + inst = CBot::CompileSizeOf(p, pStk); + if (inst != nullptr || !pStk->IsOk()) + { + return pStack->Return(inst, pStk); + } + + return pStack->Return(nullptr, pStk); +} + } // namespace CBot diff --git a/src/CBot/CBotInstr/CBotParExpr.h b/src/CBot/CBotInstr/CBotParExpr.h index 235dab11..826b1cd1 100644 --- a/src/CBot/CBotInstr/CBotParExpr.h +++ b/src/CBot/CBotInstr/CBotParExpr.h @@ -52,7 +52,7 @@ public: * \param pStack * \return */ - static CBotInstr* Compile(CBotToken* &p, CBotCStack* pStack); + static CBotInstr* Compile(CBotToken* &p, CBotCStack* pStack, bool bConstExpr = false); /*! * \brief Compile a literal expression ("string", number, true, false, null, nan, new) @@ -62,6 +62,8 @@ public: */ static CBotInstr* CompileLitExpr(CBotToken* &p, CBotCStack* pStack); + static CBotInstr* CompileConstExpr(CBotToken* &p, CBotCStack* pStack); + private: CBotParExpr() = delete; CBotParExpr(const CBotParExpr&) = delete; diff --git a/src/CBot/CBotInstr/CBotSwitch.cpp b/src/CBot/CBotInstr/CBotSwitch.cpp index e8d1b24d..a889348b 100644 --- a/src/CBot/CBotInstr/CBotSwitch.cpp +++ b/src/CBot/CBotInstr/CBotSwitch.cpp @@ -57,7 +57,7 @@ CBotInstr* CBotSwitch::Compile(CBotToken* &p, CBotCStack* pStack) { if ( nullptr != (inst->m_value = CBotExpression::Compile(p, pStk )) ) { - if ( pStk->GetType() < CBotTypLong ) + if ( pStk->GetType() <= CBotTypLong ) { if ( IsOfType(p, ID_CLOSEPAR ) ) { @@ -65,21 +65,35 @@ CBotInstr* CBotSwitch::Compile(CBotToken* &p, CBotCStack* pStack) { IncLvl(); + CBotCase* caseInst = nullptr; + CBotCStack* pStk2 = nullptr; while( !IsOfType( p, ID_CLBLK ) ) { if ( p->GetType() == ID_CASE || p->GetType() == ID_DEFAULT) { - CBotCStack* pStk2 = pStk->TokenStack(p); // un petit bout de pile svp + delete pStk2; + pStk2 = pStk->TokenStack(p, true); // un petit bout de pile svp - CBotInstr* i = CBotCase::Compile( p, pStk2 ); - if (i == nullptr) + caseInst = static_cast(CBotCase::Compile(p, pStk2, inst->m_labels)); + if (caseInst == nullptr) { delete inst; return pStack->Return(nullptr, pStk2); } - delete pStk2; - if (inst->m_block == nullptr ) inst->m_block = i; - else inst->m_block->AddNext(i); + + if (inst->m_block == nullptr ) inst->m_block = caseInst; + else inst->m_block->AddNext(caseInst); + + if (ID_DEFAULT == caseInst->GetTokenType()) + { + if (inst->m_default != nullptr) + { + pStk->SetError(CBotErrRedefCase, caseInst->GetToken()); + delete inst; + return pStack->Return(nullptr, pStk); + } + inst->m_default = caseInst; + } continue; } @@ -90,13 +104,14 @@ CBotInstr* CBotSwitch::Compile(CBotToken* &p, CBotCStack* pStack) return pStack->Return(nullptr, pStk); } - CBotInstr* i = CBotBlock::CompileBlkOrInst( p, pStk, true ); - if ( !pStk->IsOk() ) + CBotInstr* i = CBotBlock::CompileBlkOrInst(p, pStk2); + if ( !pStk2->IsOk() ) { delete inst; - return pStack->Return(nullptr, pStk); + return pStack->Return(nullptr, pStk2); } - inst->m_block->AddNext(i); + if (caseInst->m_instr == nullptr ) caseInst->m_instr = i; + else caseInst->m_instr->AddNext(i); if ( p == nullptr ) { @@ -133,40 +148,21 @@ CBotInstr* CBotSwitch::Compile(CBotToken* &p, CBotCStack* pStack) bool CBotSwitch :: Execute(CBotStack* &pj) { CBotStack* pile1 = pj->AddStack(this); // adds an item to the stack -// if ( pile1 == EOX ) return true; - - CBotInstr* p = m_block; // first expression int state = pile1->GetState(); if (state == 0) { if ( !m_value->Execute(pile1) ) return false; - pile1->SetState(state = -1); + pile1->SetState(state = 1); } if ( pile1->IfStep() ) return false; - if ( state == -1 ) - { - state = 0; - int val = pile1->GetVal(); // result of the value + auto it = m_labels.find(pile1->GetVar()->GetValLong()); - CBotStack* pile2 = pile1->AddStack(); - while ( p != nullptr ) // search for the corresponding case in a list - { - state++; - if ( p->CompCase( pile2, val ) ) break; // found the case - p = p->GetNext(); - } - pile2->Delete(); + CBotInstr* p = (it != m_labels.end()) ? it->second : m_default; - if ( p == nullptr ) return pj->Return(pile1); // completed if nothing - - if ( !pile1->SetState(state) ) return false; - } - - p = m_block; // returns to the beginning - while (state-->0) p = p->GetNext(); // advance in the list + while (--state > 0) p = p->GetNext(); while( p != nullptr ) { @@ -185,8 +181,6 @@ void CBotSwitch :: RestoreState(CBotStack* &pj, bool bMain) CBotStack* pile1 = pj->RestoreStack(this); // adds an item to the stack if ( pile1 == nullptr ) return; - CBotInstr* p = m_block; // first expression - int state = pile1->GetState(); if (state == 0) { @@ -194,13 +188,11 @@ void CBotSwitch :: RestoreState(CBotStack* &pj, bool bMain) return; } - if ( state == -1 ) - { - return; - } + auto it = m_labels.find(pile1->GetVar()->GetValLong()); -// p = m_block; // returns to the beginning - while ( p != nullptr && state-- > 0 ) + CBotInstr* p = (it != m_labels.end()) ? it->second : m_default; + + while (p != nullptr && --state > 0) { p->RestoreState(pile1, false); p = p->GetNext(); // advance in the list diff --git a/src/CBot/CBotInstr/CBotSwitch.h b/src/CBot/CBotInstr/CBotSwitch.h index ca6b2b20..0ebcddf0 100644 --- a/src/CBot/CBotInstr/CBotSwitch.h +++ b/src/CBot/CBotInstr/CBotSwitch.h @@ -21,6 +21,8 @@ #include "CBot/CBotInstr/CBotInstr.h" +#include + namespace CBot { @@ -64,8 +66,12 @@ protected: private: //! Value to seek CBotInstr* m_value; - //! Instructions - CBotInstr* m_block; + //! List of case instructions + CBotInstr* m_block = nullptr; + //! Pointer to default label + CBotInstr* m_default = nullptr; + //! Map of case labels + std::unordered_map m_labels; }; } // namespace CBot diff --git a/src/CBot/CBotInstr/CBotTwoOpExpr.cpp b/src/CBot/CBotInstr/CBotTwoOpExpr.cpp index ab8b0da9..c1b2d278 100644 --- a/src/CBot/CBotInstr/CBotTwoOpExpr.cpp +++ b/src/CBot/CBotInstr/CBotTwoOpExpr.cpp @@ -133,8 +133,7 @@ static bool TypeOk(int type, int test) } } -//////////////////////////////////////////////////////////////////////////////// -CBotInstr* CBotTwoOpExpr::Compile(CBotToken* &p, CBotCStack* pStack, int* pOperations) +CBotInstr* CBotTwoOpExpr::Compile(CBotToken* &p, CBotCStack* pStack, int* pOperations, bool bConstExpr) { int typeMask; @@ -146,8 +145,8 @@ CBotInstr* CBotTwoOpExpr::Compile(CBotToken* &p, CBotCStack* pStack, int* pOpera // search the intructions that may be suitable to the left of the operation CBotInstr* left = (*pOp == 0) ? - CBotParExpr::Compile( p, pStk ) : // expression (...) left - CBotTwoOpExpr::Compile( p, pStk, pOp ); // expression A * B left + CBotParExpr::Compile(p, pStk, bConstExpr) : // expression (...) left + CBotTwoOpExpr::Compile(p, pStk, pOp, bConstExpr); // expression A * B left if (left == nullptr) return pStack->Return(nullptr, pStk); // if error, transmit @@ -158,7 +157,7 @@ CBotInstr* CBotTwoOpExpr::Compile(CBotToken* &p, CBotCStack* pStack, int* pOpera CBotTypResult type1, type2; type1 = pStk->GetTypResult(); // what kind of the first operand? - if (typeOp == ID_LOGIC) // special case provided for: ? op1: op2; + if (!bConstExpr && typeOp == ID_LOGIC) // special case provided for: ? op1: op2; { if ( !type1.Eq(CBotTypBoolean) ) { @@ -207,7 +206,7 @@ CBotInstr* CBotTwoOpExpr::Compile(CBotToken* &p, CBotCStack* pStack, int* pOpera // looking statements that may be suitable for right - if ( nullptr != (inst->m_rightop = CBotTwoOpExpr::Compile( p, pStk, pOp )) ) + if ( nullptr != (inst->m_rightop = CBotTwoOpExpr::Compile(p, pStk, pOp, bConstExpr)) ) // expression (...) right { // there is an second operand acceptable @@ -264,7 +263,7 @@ CBotInstr* CBotTwoOpExpr::Compile(CBotToken* &p, CBotCStack* pStack, int* pOpera type1 = TypeRes; p = p->GetNext(); // advance after - i->m_rightop = CBotTwoOpExpr::Compile( p, pStk, pOp ); + i->m_rightop = CBotTwoOpExpr::Compile(p, pStk, pOp, bConstExpr); type2 = pStk->GetTypResult(); if ( !TypeCompatible (type1, type2, typeOp) ) // the results are compatible diff --git a/src/CBot/CBotInstr/CBotTwoOpExpr.h b/src/CBot/CBotInstr/CBotTwoOpExpr.h index c1110e13..baf70a14 100644 --- a/src/CBot/CBotInstr/CBotTwoOpExpr.h +++ b/src/CBot/CBotInstr/CBotTwoOpExpr.h @@ -65,7 +65,7 @@ public: * \param pOperations * \return */ - static CBotInstr* Compile(CBotToken* &p, CBotCStack* pStack, int* pOperations = nullptr); + static CBotInstr* Compile(CBotToken* &p, CBotCStack* pStack, int* pOperations = nullptr, bool bConstExpr = false); /*! * \brief Execute Performes the operation on two operands. diff --git a/src/common/restext.cpp b/src/common/restext.cpp index 065f6c92..a79f3f55 100644 --- a/src/common/restext.cpp +++ b/src/common/restext.cpp @@ -743,6 +743,7 @@ void InitializeRestext() stringsCbot[CBot::CBotErrHexRange] = TR("Hex value out of range"); stringsCbot[CBot::CBotErrUnicodeName] = TR("Invalid universal character name"); stringsCbot[CBot::CBotErrCharEmpty] = TR("Empty character constant"); + stringsCbot[CBot::CBotErrRedefCase] = TR("Duplicate label in switch"); stringsCbot[CBot::CBotErrZeroDiv] = TR("Dividing by zero"); stringsCbot[CBot::CBotErrNotInit] = TR("Variable not initialized"); diff --git a/test/unit/CBot/CBot_test.cpp b/test/unit/CBot/CBot_test.cpp index 4c60b8fa..78009ffc 100644 --- a/test/unit/CBot/CBot_test.cpp +++ b/test/unit/CBot/CBot_test.cpp @@ -640,6 +640,92 @@ TEST_F(CBotUT, BinaryLiterals) ); } +TEST_F(CBotUT, TestSwitchCase) +{ + ExecuteTest( + "extern void Test_Switch_Case() {\n" + " int n = 0, c = 0;\n" + " for (int i = -9; i < 11; ++i) {\n" + " switch (i) {\n" + " case -9: n = -9; ++c; break;\n" + " case -8: n = -8; ++c; break;\n" + " case -7: n = -7; ++c; break;\n" + " case -6: n = -6; ++c; break;\n" + " case -5: n = -5; ++c; break;\n" + " case -4: n = -4; ++c; break;\n" + " case -3: n = -3; ++c; break;\n" + " case -2: n = -2; ++c; break;\n" + " case -1: n = -1; ++c; break;\n" + " case 0: n = 0; ++c; break;\n" + " case 1: n = 1; ++c; break;\n" + " case 2: n = 2; ++c; break;\n" + " case 3: n = 3; ++c; break;\n" + " case 4: n = 4; ++c; break;\n" + " case 5: n = 5; ++c; break;\n" + " case 6: n = 6; ++c; break;\n" + " case 7: n = 7; ++c; break;\n" + " case 8: n = 8; ++c; break;\n" + " case 9: n = 9; ++c; break;\n" + " default: n = 10; ++c; break;\n" + " }\n" + " ASSERT(n == i);\n" + " }\n" + " ASSERT(n == 10);\n" + " ASSERT(c == 20);\n" + "}\n" + "extern void Test_Case_With_Math() {\n" + " int n = 0, c = 0;\n" + " for (int i = -9; i < 11; ++i) {\n" + " switch (i * 10) {\n" + " case -9*10: n = -90; ++c; break;\n" + " case -8*10: n = -80; ++c; break;\n" + " case -7*10: n = -70; ++c; break;\n" + " case -6*10: n = -60; ++c; break;\n" + " case -5*10: n = -50; ++c; break;\n" + " case -4*10: n = -40; ++c; break;\n" + " case -3*10: n = -30; ++c; break;\n" + " case -2*10: n = -20; ++c; break;\n" + " case -1*10: n = -10; ++c; break;\n" + " case 0*10: n = 0; ++c; break;\n" + " case 1*10: n = 10; ++c; break;\n" + " case 2*10: n = 20; ++c; break;\n" + " case 3*10: n = 30; ++c; break;\n" + " case 4*10: n = 40; ++c; break;\n" + " case 5*10: n = 50; ++c; break;\n" + " case 6*10: n = 60; ++c; break;\n" + " case 7*10: n = 70; ++c; break;\n" + " case 8*10: n = 80; ++c; break;\n" + " case 9*10: n = 90; ++c; break;\n" + " default: n = 100; ++c; break;\n" + " }\n" + " ASSERT(n == i * 10);\n" + " }\n" + " ASSERT(n == 100);\n" + " ASSERT(c == 20);\n" + "}\n" + ); + + ExecuteTest( + "extern void Duplicate_Case() {\n" + " switch(0) {\n" + " case 1000:\n" + " case 10*100:\n" + " }\n" + "}\n", + CBotErrRedefCase + ); + + ExecuteTest( + "extern void Duplicate_Default() {\n" + " switch(0) {\n" + " default:\n" + " default:\n" + " }\n" + "}\n", + CBotErrRedefCase + ); +} + TEST_F(CBotUT, ToString) { ExecuteTest( From 17d0d2abb14d7ec9a73e0b15b30d60f2a2f9838d Mon Sep 17 00:00:00 2001 From: melex750 Date: Sun, 12 May 2019 08:33:53 -0400 Subject: [PATCH 165/207] Fix compiling literal numbers --- src/CBot/CBotInstr/CBotExprLitNum.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/CBot/CBotInstr/CBotExprLitNum.cpp b/src/CBot/CBotInstr/CBotExprLitNum.cpp index 61978bf0..0e0f8f88 100644 --- a/src/CBot/CBotInstr/CBotExprLitNum.cpp +++ b/src/CBot/CBotInstr/CBotExprLitNum.cpp @@ -74,8 +74,7 @@ CBotInstr* CompileExprLitNum(CBotToken* &p, CBotCStack* pStack) if (s.find('.') != std::string::npos || ( s.find('x') == std::string::npos && ( s.find_first_of("eE") != std::string::npos ) )) { double val = GetNumFloat(s); - if (val < static_cast(std::numeric_limits::min()) && - val > static_cast(std::numeric_limits::max()) ) + if (val > static_cast(std::numeric_limits::max())) { numtype = CBotTypDouble; inst = new CBotExprLitNum(val); @@ -89,8 +88,7 @@ CBotInstr* CompileExprLitNum(CBotToken* &p, CBotCStack* pStack) else { long val = GetNumInt(s); - if (val < std::numeric_limits::min() && - val > std::numeric_limits::max() ) + if (val > std::numeric_limits::max()) { numtype = CBotTypLong; inst = new CBotExprLitNum(val); From 17d85eb434835e8544ac8dcecbb86c80ac6542a2 Mon Sep 17 00:00:00 2001 From: B-CE Date: Fri, 8 Mar 2019 12:45:41 +0100 Subject: [PATCH 166/207] Translate french comments + correct typo --- src/CBot/CBotInstr/CBotDefClass.cpp | 2 +- src/CBot/CBotInstr/CBotDo.cpp | 2 +- src/CBot/CBotInstr/CBotFor.cpp | 2 +- src/CBot/CBotInstr/CBotFunction.cpp | 6 +++--- src/CBot/CBotInstr/CBotParExpr.cpp | 2 +- src/CBot/CBotInstr/CBotSwitch.cpp | 4 ++-- src/CBot/CBotInstr/CBotTry.cpp | 12 +++++------- src/CBot/CBotInstr/CBotTwoOpExpr.cpp | 2 +- src/CBot/CBotInstr/CBotWhile.cpp | 3 +-- src/CBot/CBotVar/CBotVar.cpp | 4 ++-- src/CBot/CBotVar/CBotVarArray.cpp | 2 +- src/CBot/CBotVar/CBotVarClass.cpp | 2 +- src/CBot/stdlib/FileFunctions.cpp | 2 +- src/app/main.cpp | 2 +- src/graphics/engine/particle.cpp | 6 +++--- src/object/auto/autoportico.cpp | 4 ++-- src/object/auto/autopowerstation.cpp | 4 +--- src/object/auto/autoresearch.cpp | 2 +- src/object/task/taskmanip.cpp | 2 +- src/object/task/tasktake.cpp | 2 +- src/physics/physics.cpp | 2 +- src/ui/controls/color.cpp | 4 +--- src/ui/controls/interface.cpp | 3 +-- src/ui/studio.cpp | 2 +- 24 files changed, 35 insertions(+), 43 deletions(-) diff --git a/src/CBot/CBotInstr/CBotDefClass.cpp b/src/CBot/CBotInstr/CBotDefClass.cpp index 174b973f..3245ab05 100644 --- a/src/CBot/CBotInstr/CBotDefClass.cpp +++ b/src/CBot/CBotInstr/CBotDefClass.cpp @@ -140,7 +140,7 @@ CBotInstr* CBotDefClass::Compile(CBotToken* &p, CBotCStack* pStack, CBotClass* p if (typ == CBotErrUndefCall) { - // si le constructeur n'existe pas + // if the ctor don't exist if (inst->m_parameters != nullptr) // with parameters { pStk->SetError(CBotErrNoConstruct, vartoken); diff --git a/src/CBot/CBotInstr/CBotDo.cpp b/src/CBot/CBotInstr/CBotDo.cpp index caf10920..c5b1debc 100644 --- a/src/CBot/CBotInstr/CBotDo.cpp +++ b/src/CBot/CBotInstr/CBotDo.cpp @@ -57,7 +57,7 @@ CBotInstr* CBotDo::Compile(CBotToken* &p, CBotCStack* pStack) inst->SetToken(p); if (!IsOfType(p, ID_DO)) return nullptr; // should never happen - CBotCStack* pStk = pStack->TokenStack(pp); // un petit bout de pile svp + CBotCStack* pStk = pStack->TokenStack(pp); // some space for a stack, plz // looking for a statement block after the do diff --git a/src/CBot/CBotInstr/CBotFor.cpp b/src/CBot/CBotInstr/CBotFor.cpp index 92aafa0b..91013e43 100644 --- a/src/CBot/CBotInstr/CBotFor.cpp +++ b/src/CBot/CBotInstr/CBotFor.cpp @@ -67,7 +67,7 @@ CBotInstr* CBotFor::Compile(CBotToken* &p, CBotCStack* pStack) return nullptr; } - CBotCStack* pStk = pStack->TokenStack(pp, true); // un petit bout de pile svp + CBotCStack* pStk = pStack->TokenStack(pp, true); // some size for a stack, plz // compiles instructions for initialization inst->m_init = CBotListExpression::Compile(p, pStk ); diff --git a/src/CBot/CBotInstr/CBotFunction.cpp b/src/CBot/CBotInstr/CBotFunction.cpp index b4473cd8..4916d870 100644 --- a/src/CBot/CBotInstr/CBotFunction.cpp +++ b/src/CBot/CBotInstr/CBotFunction.cpp @@ -169,7 +169,7 @@ CBotFunction* CBotFunction::Compile(CBotToken* &p, CBotCStack* pStack, CBotFunct func->m_token = d; } - // un nom de fonction est-il là ? + // is there a function name here ? if (IsOfType(p, TokenTypVar)) { if ( IsOfType( p, ID_DBLDOTS ) ) // method for a class @@ -284,7 +284,7 @@ CBotFunction* CBotFunction::Compile1(CBotToken* &p, CBotCStack* pStack, CBotClas func->m_token = d; } - // un nom de fonction est-il là ? + // is there a function name here ? if (IsOfType(p, TokenTypVar)) { if ( IsOfType( p, ID_DBLDOTS ) ) // method for a class @@ -584,7 +584,7 @@ CBotFunction* CBotFunction::FindLocalOrPublic(const std::list& lo { int i = 0; int alpha = 0; // signature of parameters - // parameters sont-ils compatibles ? + // are parameters compatible ? CBotDefParam* pv = pt->m_param; // list of expected parameters CBotVar* pw = ppVars[i++]; // list of provided parameters while ( pv != nullptr && (pw != nullptr || pv->HasDefault()) ) diff --git a/src/CBot/CBotInstr/CBotParExpr.cpp b/src/CBot/CBotInstr/CBotParExpr.cpp index b879ebec..1df0e83c 100644 --- a/src/CBot/CBotInstr/CBotParExpr.cpp +++ b/src/CBot/CBotInstr/CBotParExpr.cpp @@ -83,7 +83,7 @@ CBotInstr* CBotParExpr::Compile(CBotToken* &p, CBotCStack* pStack) CBotToken* pvar = p; - // no, it an "ordinaty" variable + // no, it's an "ordinaty" variable inst = CBotExprVar::Compile(p, pStk); CBotToken* pp = p; diff --git a/src/CBot/CBotInstr/CBotSwitch.cpp b/src/CBot/CBotInstr/CBotSwitch.cpp index e8d1b24d..740e5d8a 100644 --- a/src/CBot/CBotInstr/CBotSwitch.cpp +++ b/src/CBot/CBotInstr/CBotSwitch.cpp @@ -51,7 +51,7 @@ CBotInstr* CBotSwitch::Compile(CBotToken* &p, CBotCStack* pStack) inst->SetToken(p); if (!IsOfType(p, ID_SWITCH)) return nullptr; // should never happen - CBotCStack* pStk = pStack->TokenStack(pp); // un petit bout de pile svp + CBotCStack* pStk = pStack->TokenStack(pp); // some space for a stack, plz if ( IsOfType(p, ID_OPENPAR ) ) { @@ -69,7 +69,7 @@ CBotInstr* CBotSwitch::Compile(CBotToken* &p, CBotCStack* pStack) { if ( p->GetType() == ID_CASE || p->GetType() == ID_DEFAULT) { - CBotCStack* pStk2 = pStk->TokenStack(p); // un petit bout de pile svp + CBotCStack* pStk2 = pStk->TokenStack(p); // some space for a stack, plz CBotInstr* i = CBotCase::Compile( p, pStk2 ); if (i == nullptr) diff --git a/src/CBot/CBotInstr/CBotTry.cpp b/src/CBot/CBotInstr/CBotTry.cpp index 1a881c99..ed099033 100644 --- a/src/CBot/CBotInstr/CBotTry.cpp +++ b/src/CBot/CBotInstr/CBotTry.cpp @@ -52,7 +52,7 @@ CBotInstr* CBotTry::Compile(CBotToken* &p, CBotCStack* pStack) inst->SetToken(p); if (!IsOfType(p, ID_TRY)) return nullptr; // should never happen - CBotCStack* pStk = pStack->TokenStack(pp); // un petit bout de pile svp + CBotCStack* pStk = pStack->TokenStack(pp); // some space for a stack, plz inst->m_block = CBotBlock::CompileBlkOrInst(p, pStk ); CBotCatch** pn = &inst->m_catchList; @@ -102,11 +102,11 @@ bool CBotTry::Execute(CBotStack* &pj) val = pile1->GetError(); if ( val == CBotNoErr && pile1->GetTimer() == 0 ) // mode step? - return false; // does not make the catch + return false; // don't jump to the catch pile1->IncState(); pile2->SetState(val); // stores the error number - pile1->SetError(CBotNoErr); // for now there is are more errors! + pile1->SetError(CBotNoErr); // for now there are more errors! if ( val == CBotNoErr && pile1->GetTimer() < 0 ) // mode step? return false; // does not make the catch @@ -124,8 +124,7 @@ bool CBotTry::Execute(CBotStack* &pj) { if ( --state <= 0 ) { - // request to the catch block if they feel concerned - // demande au bloc catch s'il se sent concerné + // ask to the catch block if it feels concerned if ( !pc->TestCatch(pile2, val) ) return false; // suspend ! pile1->IncState(); } @@ -200,8 +199,7 @@ void CBotTry::RestoreState(CBotStack* &pj, bool bMain) { if ( --state <= 0 ) { - // request to the catch block if they feel concerned - // demande au bloc catch s'il se sent concerné + // ask to the catch block if it feels concerned pc->RestoreCondState(pile2, bMain); // suspend ! return; } diff --git a/src/CBot/CBotInstr/CBotTwoOpExpr.cpp b/src/CBot/CBotInstr/CBotTwoOpExpr.cpp index 3d5fc6a4..9a25a1e1 100644 --- a/src/CBot/CBotInstr/CBotTwoOpExpr.cpp +++ b/src/CBot/CBotInstr/CBotTwoOpExpr.cpp @@ -359,7 +359,7 @@ bool CBotTwoOpExpr::Execute(CBotStack* &pStack) CBotStack* pStk2 = pStk1->AddStack(); // adds an item to the stack // or return in case of recovery - // 2e état, évalue l'opérande de droite + // 2nd state, evalute right operand if ( pStk2->GetState() == 0 ) { if ( !m_rightop->Execute(pStk2) ) return false; // interrupted here? diff --git a/src/CBot/CBotInstr/CBotWhile.cpp b/src/CBot/CBotInstr/CBotWhile.cpp index 9254ad02..8f55aa1c 100644 --- a/src/CBot/CBotInstr/CBotWhile.cpp +++ b/src/CBot/CBotInstr/CBotWhile.cpp @@ -56,8 +56,7 @@ CBotInstr* CBotWhile::Compile(CBotToken* &p, CBotCStack* pStack) inst->SetToken(p); if (!IsOfType(p, ID_WHILE)) return nullptr; // should never happen - CBotCStack* pStk = pStack->TokenStack(pp); // un petit bout de pile svp - // a bit of battery please (??) + CBotCStack* pStk = pStack->TokenStack(pp); // some space for a stack, plz if ( nullptr != (inst->m_condition = CBotCondition::Compile(p, pStk )) ) { diff --git a/src/CBot/CBotVar/CBotVar.cpp b/src/CBot/CBotVar/CBotVar.cpp index 62ba41f4..f71016a3 100644 --- a/src/CBot/CBotVar/CBotVar.cpp +++ b/src/CBot/CBotVar/CBotVar.cpp @@ -359,7 +359,7 @@ CBotVar::InitType CBotVar::GetInit() const void CBotVar::SetInit(CBotVar::InitType initType) { m_binit = initType; - if (initType == CBotVar::InitType::IS_POINTER ) m_binit = CBotVar::InitType::DEF; // cas spécial + if (initType == CBotVar::InitType::IS_POINTER ) m_binit = CBotVar::InitType::DEF; // special case if ( m_type.Eq(CBotTypPointer) && initType == CBotVar::InitType::IS_POINTER ) { @@ -497,7 +497,7 @@ void CBotVar::SetVal(CBotVar* var) assert(0); } - m_binit = var->m_binit; // copie l'état nan s'il y a + m_binit = var->m_binit; // copy the nan status if it has } //////////////////////////////////////////////////////////////////////////////// diff --git a/src/CBot/CBotVar/CBotVarArray.cpp b/src/CBot/CBotVar/CBotVarArray.cpp index 6462d119..14ca7201 100644 --- a/src/CBot/CBotVar/CBotVarArray.cpp +++ b/src/CBot/CBotVar/CBotVarArray.cpp @@ -94,7 +94,7 @@ void CBotVarArray::SetPointer(CBotVar* pVarClass) !pVarClass->m_type.Eq(CBotTypArrayBody)) assert(0); - (static_cast(pVarClass))->IncrementUse(); // incement the reference + (static_cast(pVarClass))->IncrementUse(); // increment the reference } if ( m_pInstance != nullptr ) m_pInstance->DecrementUse(); diff --git a/src/CBot/CBotVar/CBotVarClass.cpp b/src/CBot/CBotVar/CBotVarClass.cpp index 36952d18..f86d5993 100644 --- a/src/CBot/CBotVar/CBotVarClass.cpp +++ b/src/CBot/CBotVar/CBotVarClass.cpp @@ -53,7 +53,7 @@ CBotVarClass::CBotVarClass(const CBotToken& name, const CBotTypResult& type) : C m_type = type; if ( type.Eq(CBotTypArrayPointer) ) m_type.SetType( CBotTypArrayBody ); else if ( !type.Eq(CBotTypArrayBody) ) m_type.SetType( CBotTypClass ); - // officel type for this object + // official type for this object m_pClass = nullptr; m_pParent = nullptr; diff --git a/src/CBot/stdlib/FileFunctions.cpp b/src/CBot/stdlib/FileFunctions.cpp index b185ac13..381a7b6d 100644 --- a/src/CBot/stdlib/FileFunctions.cpp +++ b/src/CBot/stdlib/FileFunctions.cpp @@ -181,7 +181,7 @@ CBotTypResult cfopen (CBotVar* pThis, CBotVar* &pVar) // process FILE :: close -// execeution +// execution bool rfclose (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception, void* user) { // it shouldn't be any parameters diff --git a/src/app/main.cpp b/src/app/main.cpp index 9fdb89a3..46b0b88f 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -61,7 +61,7 @@ object-oriented language, CBOT, which can be used to program the robots availabl The original version of the game was developed by [Epsitec](http://www.epsitec.ch/) and released in 2001. Later, in 2005 another version named Ceebot was released. In March 2012, through attempts by Polish Colobot fans, Epsitec agreeed to release the source code of the game on GPLv3 license. -The license was given specfifically to our community, TerranovaTeam, +The license was given specifically to our community, TerranovaTeam, part of International Colobot Community (ICC) (previously known as Polish Portal of Colobot (PPC); Polish: Polski Portal Colobota) with our website at http://colobot.info/. diff --git a/src/graphics/engine/particle.cpp b/src/graphics/engine/particle.cpp index 5c6d169f..effbaff5 100644 --- a/src/graphics/engine/particle.cpp +++ b/src/graphics/engine/particle.cpp @@ -877,7 +877,7 @@ void CParticle::FrameParticle(float rTime) m_track[r].drawParticle = (progress < 1.0f); } - if (m_particle[i].type == PARTITRACK1) // explosion technique? + if (m_particle[i].type == PARTITRACK1) // technical explosion? { m_particle[i].zoom = 1.0f-(m_particle[i].time-m_particle[i].duration); @@ -2407,7 +2407,7 @@ void CParticle::FrameParticle(float rTime) ti.y = ts.y+0.125f; } - if (m_particle[i].type == PARTIRAY1) // rayon tour ? + if (m_particle[i].type == PARTIRAY1) // tower ray ? { if (progress >= 1.0f) { @@ -2517,7 +2517,7 @@ void CParticle::TrackDraw(int i, ParticleType type) Math::Point texInf, texSup; - if (type == PARTITRACK1) // explosion technique? + if (type == PARTITRACK1) // technical explosion? { texInf.x = 64.5f/256.0f; texInf.y = 21.0f/256.0f; diff --git a/src/object/auto/autoportico.cpp b/src/object/auto/autoportico.cpp index 2a8bf372..5ef25c78 100644 --- a/src/object/auto/autoportico.cpp +++ b/src/object/auto/autoportico.cpp @@ -47,8 +47,8 @@ const float PORTICO_TIME_OPEN = 12.0f; -// Si progress=0, return a. -// Si progress=1, return b. +// if progress=0, return a. +// if progress=1, return b. static float Progress(float a, float b, float progress) { diff --git a/src/object/auto/autopowerstation.cpp b/src/object/auto/autopowerstation.cpp index 5b90b6fa..667c8324 100644 --- a/src/object/auto/autopowerstation.cpp +++ b/src/object/auto/autopowerstation.cpp @@ -302,9 +302,7 @@ Error CAutoPowerStation::GetError() return ERR_OK; } - -// Crée toute l'interface lorsque l'objet est sélectionné . - +// Create the all interface when the object is selected. bool CAutoPowerStation::CreateInterface(bool bSelect) { Ui::CWindow* pw; diff --git a/src/object/auto/autoresearch.cpp b/src/object/auto/autoresearch.cpp index ccc24c85..a1c98b69 100644 --- a/src/object/auto/autoresearch.cpp +++ b/src/object/auto/autoresearch.cpp @@ -502,7 +502,7 @@ void CAutoResearch::FireStopUpdate(float progress, bool bLightOn) 4.7f, -8.2f, }; - if ( !bLightOn ) // �teint ? + if ( !bLightOn ) // light-off ? { for ( i=0 ; i<6 ; i++ ) { diff --git a/src/object/task/taskmanip.cpp b/src/object/task/taskmanip.cpp index 16615ebd..0f38171c 100644 --- a/src/object/task/taskmanip.cpp +++ b/src/object/task/taskmanip.cpp @@ -259,7 +259,7 @@ void CTaskManip::InitAngle() float energy = GetObjectEnergy(m_object); if ( energy == 0.0f ) { - m_speed *= 0.7f; // slower if more energy! + m_speed *= 0.7f; // slower if no more energy! } } diff --git a/src/object/task/tasktake.cpp b/src/object/task/tasktake.cpp index c67a7e56..e8a27021 100644 --- a/src/object/task/tasktake.cpp +++ b/src/object/task/tasktake.cpp @@ -419,7 +419,7 @@ bool CTaskTake::TransporterTakeObject() //? cargo = SearchTakeObject(angle, 1.5f, Math::PI*0.04f); float angle = 0.0f; CObject* cargo = SearchTakeObject(angle, 1.5f, Math::PI*0.15f); //OK 1.9 - if (cargo == nullptr) return false; // rien � prendre ? + if (cargo == nullptr) return false; // nothing to take ? assert(cargo->Implements(ObjectInterfaceType::Transportable)); m_cargoType = cargo->GetType(); diff --git a/src/physics/physics.cpp b/src/physics/physics.cpp index b97742c5..7e30a8e4 100644 --- a/src/physics/physics.cpp +++ b/src/physics/physics.cpp @@ -1196,7 +1196,7 @@ void CPhysics::EffectUpdate(float aTime, float rTime) type == OBJECT_MOBILEfc || type == OBJECT_MOBILEfi || type == OBJECT_MOBILEfs || - type == OBJECT_MOBILEft ) // fliyng? + type == OBJECT_MOBILEft ) // flying? { if ( m_bLand ) // on the ground? { diff --git a/src/ui/controls/color.cpp b/src/ui/controls/color.cpp index faecb435..86a6dd45 100644 --- a/src/ui/controls/color.cpp +++ b/src/ui/controls/color.cpp @@ -121,9 +121,7 @@ bool CColor::EventProcess(const Event &event) return true; } - -// Dessine le bouton. - +// Draw the button. void CColor::Draw() { Gfx::CDevice* device; diff --git a/src/ui/controls/interface.cpp b/src/ui/controls/interface.cpp index 050ce193..cabe38f1 100644 --- a/src/ui/controls/interface.cpp +++ b/src/ui/controls/interface.cpp @@ -194,8 +194,7 @@ CEdit* CInterface::CreateEdit(Math::Point pos, Math::Point dim, int icon, EventT return CreateControl(pos, dim, icon, eventMsg); } -// Creates a new pave editable. - +// Creates a new editable area. CEditValue* CInterface::CreateEditValue(Math::Point pos, Math::Point dim, int icon, EventType eventMsg) { CEditValue* ev = CreateControl(pos, dim, icon, eventMsg); diff --git a/src/ui/studio.cpp b/src/ui/studio.cpp index 3602aeac..a7fc690d 100644 --- a/src/ui/studio.cpp +++ b/src/ui/studio.cpp @@ -133,7 +133,7 @@ bool CStudio::EventProcess(const Event &event) m_event->AddEvent(Event(EVENT_STUDIO_OK)); } - if ( event.type == EVENT_STUDIO_EDIT ) // text modifief? + if ( event.type == EVENT_STUDIO_EDIT ) // text modified? { ColorizeScript(edit); } From 0517115557084619873c873fe5bf9d34ffe7e6c3 Mon Sep 17 00:00:00 2001 From: B-CE Date: Wed, 15 May 2019 00:40:55 +0200 Subject: [PATCH 167/207] Upd i18n fr : complete + uniformize MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bots Déménageur -> Préhenseur shooter -> tireur phazer -> hachoir ... Buildings Fabrique de robots -> Usine de robots convertisseur -> raffinerie borne d'information -> station relais ... Objects batterie (standard) pile nucléaire ... --- desktop/po/fr.po | 42 +++++++-------- po/fr.po | 136 +++++++++++++++++++++++------------------------ 2 files changed, 88 insertions(+), 90 deletions(-) diff --git a/desktop/po/fr.po b/desktop/po/fr.po index 1da026a4..784113ba 100644 --- a/desktop/po/fr.po +++ b/desktop/po/fr.po @@ -3,18 +3,20 @@ # This file is distributed under the same license as the Colobot package. # # Didier Raboud , 2012, 2016. +# B-CE <.>, 2019. msgid "" msgstr "" -"Project-Id-Version: colobot 0.1.7\n" +"Project-Id-Version: colobot 0.1.12\n" "POT-Creation-Date: 2016-03-30 13:45+0200\n" -"PO-Revision-Date: 2016-03-30 13:49+0100\n" -"Last-Translator: Didier Raboud \n" +"PO-Revision-Date: 2019-06-01 09:43+0200\n" +"Last-Translator: BCE <.>\n" +"Language-Team: French \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -"X-Generator: Lokalize 2.0\n" +"X-Generator: Lokalize 18.12.3\n" #. type: Name= #: colobot.ini:1 @@ -32,13 +34,13 @@ msgstr "Apprentissage de la programmation par le jeu" #: colobot.ini:3 #, no-wrap msgid "Colonize with bots" -msgstr "Colonise avec des roBots" +msgstr "COlonise avec des roBOTs" #. type: Keywords= #: colobot.ini:4 #, no-wrap msgid "robots;3d;space;astronaut;java;c++;" -msgstr "robots;3d;espace;astronaute;cosmonaute;java;c++;" +msgstr "robots;3d;espace;astronaute;cosmonaute;java;c++;programmation;jeux" #. type: =head1 #: colobot.pod:3 @@ -74,12 +76,12 @@ msgid "" "real-time graphics and a C++ and Java-like, object-oriented language, CBOT, " "which can be used to program the robots available in the game." msgstr "" -"Colobot (Colonise avec des roBots) est un jeu éducatif visant à " -"l'enseignement de la programmation par le jeu. Vous jouez un astronaute en " +"Colobot (Colonise avec des roBots) est un jeu éducatif visant " +"à l'enseignement de la programmation par le jeu. Vous jouez un astronaute en " "voyage avec des robots à la recherche d'une planète à coloniser. Son " -"interface est en trois-dimensions et en temps réel; le language utilisé " -"(CBOT) ressemble au C++ et à Java et peut être utilisé pour programmer les " -"robots disponibles dans le jeu." +"interface est en trois-dimensions et en temps réel. Le langage utilisé " +"(CBOT), orienté objet , ressemble au C++ et à Java. Il peut être utilisé " +"pour programmer les robots disponibles dans le jeu." #. type: =head1 #: colobot.pod:19 @@ -208,9 +210,9 @@ msgid "" "Enable debug mode (more info printed in logs). Possible values are as " "follows, as well as any comma-separated combination" msgstr "" -"Active le mode de I (plus d'informations dans les logs). Les valeurs" -" possibles sont les suivantes, ainsi que toute combinaison séparée par des" -" virgules" +"Active le mode de I (plus d'informations dans les logs). " +"Les valeurs possibles sont les suivantes, " +"ainsi que toute combinaison séparée par des virgules" #. type: =item #: colobot.pod:81 @@ -260,7 +262,7 @@ msgstr "models" #. type: textblock #: colobot.pod:99 msgid "Models-related debugging" -msgstr "Debug pour les modèles" +msgstr "Débug pour les modèles" #. type: =item #: colobot.pod:101 @@ -270,7 +272,7 @@ msgstr "all" #. type: textblock #: colobot.pod:103 msgid "All above debugging statements" -msgstr "Tout les messages de debug ci-dessus" +msgstr "Tous les messages de debug ci-dessus" #. type: =item #: colobot.pod:107 @@ -280,9 +282,7 @@ msgstr "B<-headless>" #. type: textblock #: colobot.pod:109 msgid "Run in headless mode - disables graphics, sound and user interaction" -msgstr "" -"Lance en mode I - désactive les graphiques, sons et interactions" -" utilisateurs" +msgstr "Lance en mode I - désactive les graphiques, sons et interactions utilisateurs" #. type: =item #: colobot.pod:111 @@ -292,7 +292,7 @@ msgstr "B<-runscene> I" #. type: textblock #: colobot.pod:113 msgid "Run given scene on start (skip menus)" -msgstr "Lance une scène donnée au lancement (saute les menus)" +msgstr "Démarre directement une scène (saute les menus)" #. type: =item #: colobot.pod:115 @@ -317,7 +317,7 @@ msgstr "LC_MESSAGES" #. type: textblock #: colobot.pod:127 msgid "Used to determine the runtime language." -msgstr "Utilisé pour déterminer la langue au lancement" +msgstr "Utilisé pour déterminer la langue au lancement." #. type: =head1 #: colobot.pod:131 diff --git a/po/fr.po b/po/fr.po index c8d48217..707b147c 100644 --- a/po/fr.po +++ b/po/fr.po @@ -1,21 +1,21 @@ # Didier Raboud , 2012, 2015, 2016. -# Martin Quinson , 2016 -# B-CE, 2018 -# Pascal Audoux , 2018 +# Martin Quinson , 2016. +# B-CE <.>, 2018, 2019. +# Pascal Audoux , 2018. msgid "" msgstr "" -"Project-Id-Version: Colobot 0.1.11\n" +"Project-Id-Version: Colobot 0.1.12\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: DATE\n" -"PO-Revision-Date: 2019-01-09 23:07+0100\n" -"Last-Translator: B-CE\n" -"Language-Team: \n" +"PO-Revision-Date: 2019-06-13 01:31+0200\n" +"Last-Translator: BCE <.>\n" +"Language-Team: French <>\n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -"X-Generator: Poedit 2.0.6\n" +"X-Generator: Lokalize 18.12.3\n" "X-Language: fr_FR\n" "X-Source-Language: en_US\n" @@ -39,7 +39,7 @@ msgid "..in front" msgstr "..devant" msgid "..power cell" -msgstr "..pile" +msgstr "..batterie" msgid "1) First click on the key you want to redefine." msgstr "1) Cliquez d'abord sur la touche à redéfinir." @@ -141,10 +141,10 @@ msgid "Automatic indent\\When program editing" msgstr "Indentation automatique\\Pendant l'édition d'un programme" msgid "Autosave interval\\How often your game will autosave" -msgstr "Interval d'auto-sauvegarde\\À quels intervals les parties vont-t-elles êtres sauvegardées automatiquement" +msgstr "Interval auto-sauvegarde\\À quels intervals les parties vont-t-elles êtres sauvegardées automatiquement" msgid "Autosave slots\\How many autosave slots you'll have" -msgstr "Nombre d'auto-sauvegardes\\Combien d'auto-sauvegarde seront conservées" +msgstr "Nb auto-sauvegardes\\Combien d'auto-sauvegarde seront conservées" msgid "Autosave\\Enables autosave" msgstr "Auto-sauvegarde\\Activer l'auto-sauvegarde" @@ -186,13 +186,13 @@ msgid "Bot destroyed" msgstr "Robot détruit" msgid "Bot factory" -msgstr "Fabrique de robots" +msgstr "Usine de robots" msgid "Build a bot factory" -msgstr "Construire une fabrique de robots" +msgstr "Construire une usine de robots" msgid "Build a converter" -msgstr "Construire un convertisseur" +msgstr "Construire une raffinerie" msgid "Build a defense tower" msgstr "Construire une tour" @@ -204,10 +204,10 @@ msgid "Build a destroyer" msgstr "Construire un destructeur" msgid "Build a exchange post" -msgstr "Construire une borne d'information" +msgstr "Construire une station relais" msgid "Build a legged grabber" -msgstr "Fabriquer un déménageur à pattes" +msgstr "Fabriquer un préhenseur à pattes" msgid "Build a legged orga shooter" msgstr "Fabriquer un tireur organique à pattes" @@ -225,10 +225,10 @@ msgid "Build a nuclear power plant" msgstr "Construire une centrale nucléaire" msgid "Build a phazer shooter" -msgstr "Fabriquer un robot canon à phases" +msgstr "Fabriquer un robot canon hachoir" msgid "Build a power cell factory" -msgstr "Construire une fabrique de piles" +msgstr "Construire une fabrique de batteries" msgid "Build a power station" msgstr "Construire une station de recharge" @@ -255,7 +255,7 @@ msgid "Build a thumper" msgstr "Fabriquer un robot secoueur" msgid "Build a tracked grabber" -msgstr "Fabriquer un déménageur à chenilles" +msgstr "Fabriquer un préhenseur à chenilles" msgid "Build a tracked orga shooter" msgstr "Fabriquer un tireur organique à chenilles" @@ -267,7 +267,7 @@ msgid "Build a tracked sniffer" msgstr "Fabriquer un renifleur à chenilles" msgid "Build a wheeled grabber" -msgstr "Fabriquer un déménageur à roues" +msgstr "Fabriquer un préhenseur à roues" msgid "Build a wheeled orga shooter" msgstr "Fabriquer un tireur organique à roues" @@ -279,7 +279,7 @@ msgid "Build a wheeled sniffer" msgstr "Fabriquer un renifleur à roues" msgid "Build a winged grabber" -msgstr "Fabriquer un déménageur volant" +msgstr "Fabriquer un préhenseur volant" msgid "Build a winged orga shooter" msgstr "Fabriquer un tireur organique volant" @@ -315,19 +315,19 @@ msgid "Camera border scrolling\\Scrolling when the mouse touches right or left b msgstr "Défilement dans les bords\\Défilement lorsque la souris touche les bords gauche ou droite" msgid "Camera closer\\Moves the camera forward" -msgstr "Caméra plus proche\\Avance la caméra" +msgstr "Plus proche\\Avance la caméra" msgid "Camera down\\Turns the camera down" -msgstr "Baisser caméra\\Baisse la caméra" +msgstr "Plus bas\\Tourne la caméra vers le bas" msgid "Camera left\\Turns the camera left" -msgstr "Caméra à gauche\\Tourne la caméra vers la gauche" +msgstr "À gauche\\Tourne la caméra vers la gauche" msgid "Camera right\\Turns the camera right" -msgstr "Caméra à droite\\Tourne la caméra vers la droite" +msgstr "À droite\\Tourne la caméra vers la droite" msgid "Camera up\\Turns the camera up" -msgstr "Lever caméra\\Monte la caméra" +msgstr "Plus haut\\Tourne la caméra vers le haut" msgid "Can not produce not researched object" msgstr "Impossible de créer un objet n'ayant pas été recherché" @@ -366,7 +366,7 @@ msgid "Cheat console\\Show cheat console" msgstr "Console de triche\\Montre la console de triche" msgid "Checkpoint" -msgstr "Indicateur" +msgstr "Point de passage" msgid "Class name expected" msgstr "Nom de classe attendu" @@ -420,7 +420,7 @@ msgid "Controls\\Keyboard, joystick and mouse settings" msgstr "Commandes\\Touches du clavier" msgid "Converts ore to titanium" -msgstr "Conversion de minerai en titane" +msgstr "Raffinage de minerai en titane" msgid "Copy" msgstr "Copier" @@ -514,7 +514,7 @@ msgid "End of block missing" msgstr "Il manque la fin du bloc" msgid "Energy deposit (site for power station)" -msgstr "Emplacement pour une station de recharge ou une fabrique de pile" +msgstr "Sous sol énergétique (Emplacement pour une station de recharge ou une fabrique de batteries)" msgid "Energy level" msgstr "Niveau d'énergie" @@ -569,7 +569,7 @@ msgstr "But/Objectif" # OBJECT_END : GoalArea msgid "Fixed mine" -msgstr "Mine fixe" +msgstr "Mine anti-personnel" msgid "Flat ground not large enough" msgstr "Sol plat pas assez grand" @@ -600,7 +600,7 @@ msgid "Found a site for a derrick" msgstr "Emplacement pour un derrick trouvé" msgid "Found a site for power station" -msgstr "Emplacement pour station de recharge ou fabrique de pile trouvé" +msgstr "Emplacement pour station de recharge ou fabrique de batteries trouvé" msgid "Found key A (site for derrick)" msgstr "Emplacement pour un derrick (clé A)" @@ -720,7 +720,7 @@ msgid "Inappropriate bot" msgstr "Robot inadapté" msgid "Inappropriate cell type" -msgstr "Pas le bon type de pile" +msgstr "Source d'énergie non adapté" msgid "Inappropriate object" msgstr "Pas le bon objet" @@ -732,7 +732,7 @@ msgid "Infected by a virus; temporarily out of order" msgstr "Infecté par un virus; ne fonctionne plus temporairement" msgid "Information exchange post" -msgstr "Borne d'information" +msgstr "Station relais" msgid "Instruction \"break\" outside a loop" msgstr "Instruction \"break\" en dehors d'une boucle" @@ -795,7 +795,7 @@ msgid "LOADING" msgstr "CHARGEMENT" msgid "Legged grabber" -msgstr "Robot déménageur à pattes" +msgstr "Robot préhenseur à pattes" msgid "Legged orga shooter" msgstr "Robot tireur organique à pattes" @@ -866,7 +866,7 @@ msgid "Lunar Roving Vehicle" msgstr "Véhicule d'exploration lunaire" msgid "MSAA\\Multisample anti-aliasing" -msgstr "ACME\\Anticrénelage multiéchantillon" +msgstr "ACME\\Anticrénelage multiéchantillon (MSAA: Multisample anti-aliasing)" msgid "Maximize" msgstr "Taille maximale" @@ -953,7 +953,7 @@ msgid "No function with this name accepts this number of parameters" msgstr "Aucune fonction de ce nom n'accepte ce nombre de paramètres" msgid "No information exchange post within range" -msgstr "Pas de borne d'information accessible" +msgstr "Pas de station relais accessible" msgid "No more energy" msgstr "Plus d'énergie" @@ -962,7 +962,7 @@ msgid "No ore in the subsoil" msgstr "Pas de minerai en sous-sol" msgid "No power cell" -msgstr "Pas de pile" +msgstr "Pas de source d'énergie" msgid "No titanium" msgstr "Pas de titane" @@ -971,7 +971,7 @@ msgid "No titanium around" msgstr "Pas de titane accessible" msgid "No titanium ore to convert" -msgstr "Pas de minerai de titane à convertir" +msgstr "Pas de minerai de titane à raffiner" msgid "No titanium to transform" msgstr "Pas de titane à transformer" @@ -1016,10 +1016,10 @@ msgid "Nothing to recycle" msgstr "Rien à recycler" msgid "Nuclear power cell" -msgstr "Pile nucléaire" +msgstr "Pile atomique" msgid "Nuclear power cell available" -msgstr "Pile nucléaire disponible" +msgstr "Pile atomique disponible" msgid "Nuclear power station" msgstr "Centrale nucléaire" @@ -1040,7 +1040,7 @@ msgid "OK\\Choose the selected player" msgstr "D'accord\\Choisir le joueur" msgid "OK\\Close program editor and return to game" -msgstr "D'accord\\Compiler le programme" +msgstr "D'accord\\Compiler le programme et fermer la fenêtre d'édition" msgid "Object too close" msgstr "Objet trop proche" @@ -1103,7 +1103,7 @@ msgid "Pause\\Pause the game without opening menu" msgstr "Pause\\Mettre le jeu en pause sans ouvrir le menu" msgid "Phazer shooter" -msgstr "Robot canon à phases" +msgstr "Robot canon hachoir" msgid "Photography" msgstr "Vue de la mission" @@ -1121,7 +1121,7 @@ msgid "Plans for nuclear power plant available" msgstr "Construction d'une centrale nucléaire possible" msgid "Plans for phazer shooter available" -msgstr "Fabrication des robots canon à phases possible" +msgstr "Fabrication des robots canon hachoir possible" msgid "Plans for shielder available" msgstr "Fabrication d'un robot bouclier possible" @@ -1151,13 +1151,13 @@ msgid "Player's name" msgstr "Nom du joueur" msgid "Power cell" -msgstr "Pile normale" +msgstr "Batterie standard" msgid "Power cell available" -msgstr "Pile disponible" +msgstr "Batterie disponible" msgid "Power cell factory" -msgstr "Fabrique de piles" +msgstr "Fabrique de batteries" msgid "Power station" msgstr "Station de recharge" @@ -1235,7 +1235,7 @@ msgid "Quit\\Quit Colobot: Gold Edition" msgstr "Quitter\\Quitter Colobot : Édition Gold" msgid "Quit\\Quit the current mission or exercise" -msgstr "Quitter la mission en cours\\Terminer un exercice ou une mssion" +msgstr "Quitter la mission en cours\\Terminer un exercice ou une mission" msgid "Radar station" msgstr "Radar" @@ -1320,34 +1320,34 @@ msgid "Ruin" msgstr "Bâtiment en ruine" msgid "Run research program for defense tower" -msgstr "Recherche la tour de défense" +msgstr "Lancer la recherche de la tour de défense" msgid "Run research program for legged bots" -msgstr "Recherche du fonctionnement des pattes" +msgstr "Lancer la recherche du fonctionnement des pattes" msgid "Run research program for nuclear power" -msgstr "Recherche du programme nucléaire" +msgstr "Lancer la recherche du programme nucléaire" msgid "Run research program for orga shooter" -msgstr "Recherche le canon organique" +msgstr "Lancer la recherche du canon organique" msgid "Run research program for phazer shooter" -msgstr "Recherche le canon à phases" +msgstr "Lancer la recherche du canon hachoir" msgid "Run research program for shielder" -msgstr "Recherche le bouclier" +msgstr "Lancer la recherche du bouclier" msgid "Run research program for shooter" -msgstr "Recherche le canon de tir" +msgstr "Lancer la recherche du canon de tir" msgid "Run research program for thumper" -msgstr "Recherche le secoueur" +msgstr "Lancer la recherche du secoueur" msgid "Run research program for tracked bots" -msgstr "Recherche du fonctionnement des chenilles" +msgstr "Lancer la recherche du fonctionnement des chenilles" msgid "Run research program for winged bots" -msgstr "Recherche du fonctionnement du jet" +msgstr "Lancer la recherche du fonctionnement du jet" msgid "SatCom" msgstr "SatCom" @@ -1440,7 +1440,7 @@ msgid "Spaceship" msgstr "Vaisseau spatial" msgid "Spaceship ruin" -msgstr "Epave de vaisseau spatial" +msgstr "Épave de vaisseau spatial" msgid "Spider" msgstr "Araignée" @@ -1497,7 +1497,7 @@ msgid "Switch bots <-> buildings" msgstr "Permute robots <-> bâtiments" msgid "Take off to finish the mission" -msgstr "Décolle pour terminer la mission" +msgstr "Décollage pour terminer la mission" msgid "Target" msgstr "Cible" @@ -1560,7 +1560,7 @@ msgid "This program is read-only, clone it to edit" msgstr "Ce programme est en lecture-seule, le dupliquer pour pouvoir le modifier" msgid "Thump (\\key action;)" -msgstr "Secoue (\\key action;)" +msgstr "Secouer (\\key action;)" msgid "Thumper" msgstr "Robot secoueur" @@ -1603,7 +1603,7 @@ msgid "Too many parameters" msgstr "Trop de paramètres" msgid "Tracked grabber" -msgstr "Robot déménageur à chenilles" +msgstr "Robot préhenseur à chenilles" msgid "Tracked orga shooter" msgstr "Robot tireur organique à chenilles" @@ -1684,7 +1684,7 @@ msgid "Vault" msgstr "Coffre-fort" msgid "Vertical Synchronization\\Limits the number of frames per second to display frequency" -msgstr "" +msgstr "Synchronisation verticale :\\Réduit la fréquence d'images par seconde à afficher." msgid "Violet flag" msgstr "Drapeau violet" @@ -1702,7 +1702,7 @@ msgid "Waste" msgstr "Déchet" msgid "Wheeled grabber" -msgstr "Robot déménageur à roues" +msgstr "Robot préhenseur à roues" msgid "Wheeled orga shooter" msgstr "Robot tireur organique à roues" @@ -1714,7 +1714,7 @@ msgid "Wheeled sniffer" msgstr "Robot renifleur à roues" msgid "Winged grabber" -msgstr "Robot déménageur volant" +msgstr "Robot préhenseur volant" msgid "Winged orga shooter" msgstr "Robot tireur organique volant" @@ -1735,7 +1735,7 @@ msgid "Worm fatally wounded" msgstr "Ver mortellement touché" msgid "Wreckage" -msgstr "Epave de robot" +msgstr "Épave de robot" msgid "Write error" msgstr "Erreur lors de l'écriture" @@ -1820,7 +1820,7 @@ msgid "\\New player name" msgstr "\\Nom du joueur à créer" msgid "\\No eyeglasses" -msgstr "\\Pas de lunettes" +msgstr "\\Pas de lunette" msgid "\\Raise the pencil" msgstr "\\Relève le crayon" @@ -1882,9 +1882,6 @@ msgstr "colobot.info" msgid "epsitec.com" msgstr "epsitec.com" -#~ msgid " " -#~ msgstr " " - #~ msgid " Drivers:" #~ msgstr " Pilotes :" @@ -2052,3 +2049,4 @@ msgstr "epsitec.com" #~ msgid "\\c; (none)\\n;\n" #~ msgstr "\\c; (aucun)\\n;\n" + From ed8dc04d94bfbe2fef62692484e4e4f37495a335 Mon Sep 17 00:00:00 2001 From: Fiftytwo Date: Fri, 5 Jul 2019 16:03:29 +0200 Subject: [PATCH 168/207] Make TargetBot explode in water --- src/physics/physics.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/physics/physics.cpp b/src/physics/physics.cpp index ff79cfdf..afbb0db3 100644 --- a/src/physics/physics.cpp +++ b/src/physics/physics.cpp @@ -1829,6 +1829,7 @@ void CPhysics::WaterFrame(float aTime, float rTime) type == OBJECT_MOBILEwt || type == OBJECT_MOBILEit || type == OBJECT_MOBILErp || + type == OBJECT_MOBILEtg || type == OBJECT_MOBILEdr || type == OBJECT_APOLLO2 ) { From 62620a93cd19390419cfc1ba40fa500b34a7ac59 Mon Sep 17 00:00:00 2001 From: Fiftytwo Date: Wed, 17 Jul 2019 02:57:47 +0200 Subject: [PATCH 169/207] Make Wrecks destroyable; make TargetBot more fragile --- src/object/old_object.cpp | 34 +++++++++++++++++++++++----------- src/physics/physics.cpp | 4 ++-- 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/src/object/old_object.cpp b/src/object/old_object.cpp index 0550b80d..4804b907 100644 --- a/src/object/old_object.cpp +++ b/src/object/old_object.cpp @@ -356,12 +356,18 @@ bool COldObject::DamageObject(DamageType type, float force, CObject* killer) } else if ( Implements(ObjectInterfaceType::Fragile) ) { - if ((m_type == OBJECT_BOMB || - m_type == OBJECT_RUINfactory || - m_type == OBJECT_RUINdoor || - m_type == OBJECT_RUINsupport || - m_type == OBJECT_RUINradar || - m_type == OBJECT_RUINconvert ) && type != DamageType::Explosive ) return false; // Mines and ruins can't be destroyed by shooting + if ((m_type == OBJECT_BOMB || + m_type == OBJECT_RUINmobilew1 || + m_type == OBJECT_RUINmobilew2 || + m_type == OBJECT_RUINmobilet1 || + m_type == OBJECT_RUINmobilet2 || + m_type == OBJECT_RUINmobiler1 || + m_type == OBJECT_RUINmobiler2 || + m_type == OBJECT_RUINfactory || + m_type == OBJECT_RUINdoor || + m_type == OBJECT_RUINsupport || + m_type == OBJECT_RUINradar || + m_type == OBJECT_RUINconvert ) && type != DamageType::Explosive ) return false; // Mines and ruins can't be destroyed by shooting if ( m_type == OBJECT_URANIUM ) return false; // UraniumOre is not destroyable (see #777) DestroyObject(DestructionType::Explosion, killer); @@ -840,11 +846,17 @@ void COldObject::SetType(ObjectType type) m_implementedInterfaces[static_cast(ObjectInterfaceType::Fragile)] = false; m_implementedInterfaces[static_cast(ObjectInterfaceType::Shielded)] = false; } - else if (m_type == OBJECT_RUINfactory || - m_type == OBJECT_RUINdoor || - m_type == OBJECT_RUINsupport || - m_type == OBJECT_RUINradar || - m_type == OBJECT_RUINconvert ) + else if (m_type == OBJECT_RUINmobilew1 || + m_type == OBJECT_RUINmobilew2 || + m_type == OBJECT_RUINmobilet1 || + m_type == OBJECT_RUINmobilet2 || + m_type == OBJECT_RUINmobiler1 || + m_type == OBJECT_RUINmobiler2 || + m_type == OBJECT_RUINfactory || + m_type == OBJECT_RUINdoor || + m_type == OBJECT_RUINsupport || + m_type == OBJECT_RUINradar || + m_type == OBJECT_RUINconvert ) { m_implementedInterfaces[static_cast(ObjectInterfaceType::Damageable)] = true; m_implementedInterfaces[static_cast(ObjectInterfaceType::Destroyable)] = true; diff --git a/src/physics/physics.cpp b/src/physics/physics.cpp index afbb0db3..c481c20e 100644 --- a/src/physics/physics.cpp +++ b/src/physics/physics.cpp @@ -2720,7 +2720,7 @@ bool CPhysics::ExploOther(ObjectType iType, if (pObj->GetType() == OBJECT_STONE ) { destructionForce = 25.0f; } // TitaniumOre if (pObj->GetType() == OBJECT_URANIUM ) { destructionForce = 25.0f; } // UraniumOre if (pObj->GetType() == OBJECT_MOBILEtg) { destructionForce = 10.0f; damageType = DamageType::Explosive; } // TargetBot (something running into it) - if (iType == OBJECT_MOBILEtg) { destructionForce = 10.0f; damageType = DamageType::Explosive; } // TargetBot (it running into something) + if (iType == OBJECT_MOBILEtg) { destructionForce = 0.0f; damageType = DamageType::Explosive; } // TargetBot (it running into something) if (pObj->GetType() == OBJECT_TNT ) { destructionForce = 10.0f; damageType = DamageType::Explosive; } // TNT if (pObj->GetType() == OBJECT_BOMB ) { destructionForce = 0.0f; damageType = DamageType::Explosive; } // Mine @@ -2810,7 +2810,7 @@ int CPhysics::ExploHimself(ObjectType iType, ObjectType oType, float force) float destructionForce = -1.0f; // minimal force required to destroy an object using this explosive, default: not explosive if ( oType == OBJECT_TNT ) destructionForce = 10.0f; // TNT if ( oType == OBJECT_MOBILEtg ) destructionForce = 10.0f; // TargetBot (something running into it) - if ( iType == OBJECT_MOBILEtg ) destructionForce = 10.0f; // TargetBot (it running into something) + if ( iType == OBJECT_MOBILEtg ) destructionForce = 0.0f; // TargetBot (it running into something) if ( oType == OBJECT_BOMB ) destructionForce = 0.0f; // Mine if ( force > destructionForce && destructionForce >= 0.0f ) From b8b2d32bc15d9fb363e73172a39b498b16fe20a2 Mon Sep 17 00:00:00 2001 From: DavivaD Date: Mon, 22 Jul 2019 01:15:11 +0200 Subject: [PATCH 170/207] Thumper Patch --- src/graphics/engine/pyro.cpp | 26 ++++++++++--- src/graphics/engine/pyro_type.h | 1 + src/object/task/taskterraform.cpp | 65 +++++++++++++++++-------------- 3 files changed, 56 insertions(+), 36 deletions(-) diff --git a/src/graphics/engine/pyro.cpp b/src/graphics/engine/pyro.cpp index 6eedf854..5ab995cc 100644 --- a/src/graphics/engine/pyro.cpp +++ b/src/graphics/engine/pyro.cpp @@ -223,6 +223,10 @@ bool CPyro::Create(PyroType type, CObject* obj, float force) { m_sound->Play(SOUND_EXPLOi, m_pos); } + if ( type == PT_FRAGV ) + { + m_sound->Play(SOUND_BOUMv, m_pos); + } if ( type == PT_BURNT || type == PT_BURNO ) { @@ -265,7 +269,8 @@ bool CPyro::Create(PyroType type, CObject* obj, float force) if ( m_type == PT_FRAGT || m_type == PT_FRAGO || - m_type == PT_FRAGW ) + m_type == PT_FRAGW || + m_type == PT_FRAGV ) { m_engine->DeleteShadowSpot(m_object->GetObjectRank(0)); } @@ -391,9 +396,10 @@ bool CPyro::Create(PyroType type, CObject* obj, float force) m_engine->DeleteShadowSpot(m_object->GetObjectRank(0)); } - if ( m_type != PT_EGG && - m_type != PT_WIN && - m_type != PT_LOST ) + if ( m_type != PT_FRAGV && + m_type != PT_EGG && + m_type != PT_WIN && + m_type != PT_LOST ) { float h = 40.0f; if ( m_type == PT_FRAGO || @@ -460,6 +466,7 @@ bool CPyro::Create(PyroType type, CObject* obj, float force) if ( m_type == PT_FRAGT || m_type == PT_FRAGO || m_type == PT_FRAGW || + m_type == PT_FRAGV || m_type == PT_SPIDER || m_type == PT_EGG || (m_type == PT_EXPLOT && oType == OBJECT_MOBILEtg) || @@ -1169,6 +1176,7 @@ Error CPyro::IsEnded() if ( m_type == PT_FRAGT || m_type == PT_FRAGO || m_type == PT_FRAGW || + m_type == PT_FRAGV || m_type == PT_SPIDER || m_type == PT_EGG ) { @@ -1416,7 +1424,12 @@ void CPyro::CreateTriangle(CObject* obj, ObjectType oType, int part) float percent = 0.10f; if (total < 50) percent = 0.25f; if (total < 20) percent = 0.50f; - if (m_type == PT_EGG) percent = 0.30f; + + if (m_type == PT_FRAGV || + m_type == PT_EGG) + { + percent = 0.30f; + } if (oType == OBJECT_POWER || oType == OBJECT_ATOMIC || @@ -1507,7 +1520,8 @@ void CPyro::CreateTriangle(CObject* obj, ObjectType oType, int part) Math::Matrix* mat = obj->GetWorldMatrix(part); Math::Vector pos = Math::Transform(*mat, offset); - if ( m_type == PT_EGG ) + if ( m_type == PT_FRAGV || + m_type == PT_EGG ) { speed.x = (Math::Rand()-0.5f)*10.0f; speed.z = (Math::Rand()-0.5f)*10.0f; diff --git a/src/graphics/engine/pyro_type.h b/src/graphics/engine/pyro_type.h index ad2daffd..9693cbde 100644 --- a/src/graphics/engine/pyro_type.h +++ b/src/graphics/engine/pyro_type.h @@ -37,6 +37,7 @@ enum PyroType PT_FRAGT = 1, //! < fragmentation of technical object PT_FRAGO = 2, //! < fragmentation of organic object PT_FRAGW = 4, //! < fragmentation of object under water + PT_FRAGV = 27, //! < fragmentation of plant object PT_EXPLOT = 5, //! < explosion of technical object PT_EXPLOO = 6, //! < explosion of organic object PT_EXPLOW = 8, //! < explosion of object under water diff --git a/src/object/task/taskterraform.cpp b/src/object/task/taskterraform.cpp index 6718bb7c..1883ea30 100644 --- a/src/object/task/taskterraform.cpp +++ b/src/object/task/taskterraform.cpp @@ -363,7 +363,12 @@ bool CTaskTerraform::Terraform() type = pObj->GetType(); if ( type == OBJECT_NULL ) continue; - if ( type == OBJECT_TEEN34 || + if ( type == OBJECT_TEEN0 || + type == OBJECT_TEEN1 || + type == OBJECT_TEEN2 || + type == OBJECT_TEEN4 || + type == OBJECT_TEEN5 || + type == OBJECT_TEEN34 || type == OBJECT_POWER || type == OBJECT_ATOMIC || type == OBJECT_STONE || @@ -371,6 +376,7 @@ bool CTaskTerraform::Terraform() type == OBJECT_METAL || type == OBJECT_BULLET || type == OBJECT_BBOX || + type == OBJECT_WAYPOINT || type == OBJECT_KEYa || type == OBJECT_KEYb || type == OBJECT_KEYc || @@ -378,6 +384,15 @@ bool CTaskTerraform::Terraform() type == OBJECT_TNT || type == OBJECT_NEST || type == OBJECT_BOMB || + type == OBJECT_MARKPOWER || + type == OBJECT_MARKSTONE || + type == OBJECT_MARKURANIUM || + type == OBJECT_MARKKEYa || + type == OBJECT_MARKKEYb || + type == OBJECT_MARKKEYc || + type == OBJECT_MARKKEYd || + type == OBJECT_WINFIRE || + type == OBJECT_BAG || type == OBJECT_PLANT0 || type == OBJECT_PLANT1 || type == OBJECT_PLANT2 || @@ -391,18 +406,7 @@ bool CTaskTerraform::Terraform() type == OBJECT_PLANT17 || type == OBJECT_PLANT18 || type == OBJECT_PLANT19 || - type == OBJECT_MUSHROOM1 || - type == OBJECT_MUSHROOM2 || - type == OBJECT_FACTORY || - type == OBJECT_STATION || - type == OBJECT_CONVERT || - type == OBJECT_REPAIR || - type == OBJECT_DESTROYER || - type == OBJECT_ENERGY || - type == OBJECT_LABO || - type == OBJECT_PARA || - type == OBJECT_START || - type == OBJECT_END || + type == OBJECT_QUARTZ0 || type == OBJECT_EGG || type == OBJECT_RUINmobilew1 || type == OBJECT_RUINmobilew2 || @@ -412,7 +416,10 @@ bool CTaskTerraform::Terraform() type == OBJECT_RUINsupport || type == OBJECT_RUINradar || type == OBJECT_BARRIER0 || - type == OBJECT_APOLLO4 ) // almost everything? + type == OBJECT_BARRIER1 || + type == OBJECT_BARRIER2 || + type == OBJECT_BARRIER3 || + type == OBJECT_APOLLO4 ) // everything what fits? { dist = Math::Distance(m_terraPos, pObj->GetPosition()); @@ -430,6 +437,18 @@ bool CTaskTerraform::Terraform() m_engine->GetPyroManager()->Create(Gfx::PT_EXPLOT, pObj); dynamic_cast(m_object)->DamageObject(DamageType::Explosive, 0.9f); } + else if (type == OBJECT_WAYPOINT || + type == OBJECT_MARKPOWER || + type == OBJECT_MARKSTONE || + type == OBJECT_MARKURANIUM || + type == OBJECT_MARKKEYa || + type == OBJECT_MARKKEYb || + type == OBJECT_MARKKEYc || + type == OBJECT_MARKKEYd) // Marks? + { + if ( dist > 5.0f ) continue; + CObjectManager::GetInstancePointer()->DeleteObject(pObj); + } else if (type == OBJECT_PLANT0 || type == OBJECT_PLANT1 || type == OBJECT_PLANT2 || @@ -442,24 +461,10 @@ bool CTaskTerraform::Terraform() type == OBJECT_PLANT16 || type == OBJECT_PLANT17 || type == OBJECT_PLANT18 || - type == OBJECT_PLANT19 || - type == OBJECT_MUSHROOM1 || - type == OBJECT_MUSHROOM2) // Plants? + type == OBJECT_PLANT19) // Plants? { if ( dist > 7.5f ) continue; - m_engine->GetPyroManager()->Create(Gfx::PT_EGG, pObj); - } - else if (type == OBJECT_FACTORY || - type == OBJECT_STATION || - type == OBJECT_CONVERT || - type == OBJECT_REPAIR || - type == OBJECT_DESTROYER || - type == OBJECT_ENERGY || - type == OBJECT_LABO || - type == OBJECT_PARA) // Buildings? - { - if ( dist > 15.0f ) continue; - dynamic_cast(pObj)->DamageObject(DamageType::Explosive, 0.2f); + m_engine->GetPyroManager()->Create(Gfx::PT_FRAGV, pObj); } else // Other? { From 9c2ea5f488883d16fc433f92f86f2053a017858c Mon Sep 17 00:00:00 2001 From: DavivaD Date: Mon, 22 Jul 2019 17:04:15 +0200 Subject: [PATCH 171/207] Undo some changes + space fixes --- src/graphics/engine/pyro.cpp | 6 ++-- src/graphics/engine/pyro_type.h | 6 ++-- src/object/task/taskterraform.cpp | 57 ++++++++++--------------------- 3 files changed, 23 insertions(+), 46 deletions(-) diff --git a/src/graphics/engine/pyro.cpp b/src/graphics/engine/pyro.cpp index 5ab995cc..c4d31dd9 100644 --- a/src/graphics/engine/pyro.cpp +++ b/src/graphics/engine/pyro.cpp @@ -1425,8 +1425,7 @@ void CPyro::CreateTriangle(CObject* obj, ObjectType oType, int part) if (total < 50) percent = 0.25f; if (total < 20) percent = 0.50f; - if (m_type == PT_FRAGV || - m_type == PT_EGG) + if ( m_type == PT_FRAGV || m_type == PT_EGG ) { percent = 0.30f; } @@ -1520,8 +1519,7 @@ void CPyro::CreateTriangle(CObject* obj, ObjectType oType, int part) Math::Matrix* mat = obj->GetWorldMatrix(part); Math::Vector pos = Math::Transform(*mat, offset); - if ( m_type == PT_FRAGV || - m_type == PT_EGG ) + if ( m_type == PT_FRAGV || m_type == PT_EGG ) { speed.x = (Math::Rand()-0.5f)*10.0f; speed.z = (Math::Rand()-0.5f)*10.0f; diff --git a/src/graphics/engine/pyro_type.h b/src/graphics/engine/pyro_type.h index 9693cbde..a4fc4158 100644 --- a/src/graphics/engine/pyro_type.h +++ b/src/graphics/engine/pyro_type.h @@ -37,9 +37,9 @@ enum PyroType PT_FRAGT = 1, //! < fragmentation of technical object PT_FRAGO = 2, //! < fragmentation of organic object PT_FRAGW = 4, //! < fragmentation of object under water - PT_FRAGV = 27, //! < fragmentation of plant object - PT_EXPLOT = 5, //! < explosion of technical object - PT_EXPLOO = 6, //! < explosion of organic object + PT_FRAGV = 5, //! < fragmentation of plant object + PT_EXPLOT = 6, //! < explosion of technical object + PT_EXPLOO = 7, //! < explosion of organic object PT_EXPLOW = 8, //! < explosion of object under water PT_SHOTT = 9, //! < hit technical object PT_SHOTH = 10, //! < hit human diff --git a/src/object/task/taskterraform.cpp b/src/object/task/taskterraform.cpp index 1883ea30..9fdfda0d 100644 --- a/src/object/task/taskterraform.cpp +++ b/src/object/task/taskterraform.cpp @@ -376,7 +376,6 @@ bool CTaskTerraform::Terraform() type == OBJECT_METAL || type == OBJECT_BULLET || type == OBJECT_BBOX || - type == OBJECT_WAYPOINT || type == OBJECT_KEYa || type == OBJECT_KEYb || type == OBJECT_KEYc || @@ -384,13 +383,6 @@ bool CTaskTerraform::Terraform() type == OBJECT_TNT || type == OBJECT_NEST || type == OBJECT_BOMB || - type == OBJECT_MARKPOWER || - type == OBJECT_MARKSTONE || - type == OBJECT_MARKURANIUM || - type == OBJECT_MARKKEYa || - type == OBJECT_MARKKEYb || - type == OBJECT_MARKKEYc || - type == OBJECT_MARKKEYd || type == OBJECT_WINFIRE || type == OBJECT_BAG || type == OBJECT_PLANT0 || @@ -406,7 +398,6 @@ bool CTaskTerraform::Terraform() type == OBJECT_PLANT17 || type == OBJECT_PLANT18 || type == OBJECT_PLANT19 || - type == OBJECT_QUARTZ0 || type == OBJECT_EGG || type == OBJECT_RUINmobilew1 || type == OBJECT_RUINmobilew2 || @@ -423,45 +414,33 @@ bool CTaskTerraform::Terraform() { dist = Math::Distance(m_terraPos, pObj->GetPosition()); - if (type == OBJECT_BULLET || - type == OBJECT_NEST || - type == OBJECT_EGG) // Alien Organic? + if ( type == OBJECT_BULLET || + type == OBJECT_NEST || + type == OBJECT_EGG ) // Alien Organic? { if ( dist > 5.0f ) continue; m_engine->GetPyroManager()->Create(Gfx::PT_FRAGO, pObj); } - else if (type == OBJECT_TNT || - type == OBJECT_BOMB) // Explosives? + else if ( type == OBJECT_TNT || + type == OBJECT_BOMB ) // Explosives? { if ( dist > 5.0f ) continue; m_engine->GetPyroManager()->Create(Gfx::PT_EXPLOT, pObj); dynamic_cast(m_object)->DamageObject(DamageType::Explosive, 0.9f); } - else if (type == OBJECT_WAYPOINT || - type == OBJECT_MARKPOWER || - type == OBJECT_MARKSTONE || - type == OBJECT_MARKURANIUM || - type == OBJECT_MARKKEYa || - type == OBJECT_MARKKEYb || - type == OBJECT_MARKKEYc || - type == OBJECT_MARKKEYd) // Marks? - { - if ( dist > 5.0f ) continue; - CObjectManager::GetInstancePointer()->DeleteObject(pObj); - } - else if (type == OBJECT_PLANT0 || - type == OBJECT_PLANT1 || - type == OBJECT_PLANT2 || - type == OBJECT_PLANT3 || - type == OBJECT_PLANT4 || - type == OBJECT_PLANT5 || - type == OBJECT_PLANT6 || - type == OBJECT_PLANT7 || - type == OBJECT_PLANT15 || - type == OBJECT_PLANT16 || - type == OBJECT_PLANT17 || - type == OBJECT_PLANT18 || - type == OBJECT_PLANT19) // Plants? + else if ( type == OBJECT_PLANT0 || + type == OBJECT_PLANT1 || + type == OBJECT_PLANT2 || + type == OBJECT_PLANT3 || + type == OBJECT_PLANT4 || + type == OBJECT_PLANT5 || + type == OBJECT_PLANT6 || + type == OBJECT_PLANT7 || + type == OBJECT_PLANT15 || + type == OBJECT_PLANT16 || + type == OBJECT_PLANT17 || + type == OBJECT_PLANT18 || + type == OBJECT_PLANT19 ) // Plants? { if ( dist > 7.5f ) continue; m_engine->GetPyroManager()->Create(Gfx::PT_FRAGV, pObj); From 190e04fdd70e07f705a6e98c01ea29b00fe44801 Mon Sep 17 00:00:00 2001 From: DavivaD Date: Fri, 26 Jul 2019 17:33:04 +0200 Subject: [PATCH 172/207] Move PT_FRAGV to the end of the pyro_type.h list + Undo reordering --- src/graphics/engine/pyro_type.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/graphics/engine/pyro_type.h b/src/graphics/engine/pyro_type.h index a4fc4158..d414ce93 100644 --- a/src/graphics/engine/pyro_type.h +++ b/src/graphics/engine/pyro_type.h @@ -37,9 +37,8 @@ enum PyroType PT_FRAGT = 1, //! < fragmentation of technical object PT_FRAGO = 2, //! < fragmentation of organic object PT_FRAGW = 4, //! < fragmentation of object under water - PT_FRAGV = 5, //! < fragmentation of plant object - PT_EXPLOT = 6, //! < explosion of technical object - PT_EXPLOO = 7, //! < explosion of organic object + PT_EXPLOT = 5, //! < explosion of technical object + PT_EXPLOO = 6, //! < explosion of organic object PT_EXPLOW = 8, //! < explosion of object under water PT_SHOTT = 9, //! < hit technical object PT_SHOTH = 10, //! < hit human @@ -59,6 +58,7 @@ enum PyroType PT_DEADG = 24, //! < shooting death PT_DEADW = 25, //! < drowning death PT_FINDING = 26, //! < object discovered + PT_FRAGV = 27, //! < fragmentation of plant object }; } // namespace Gfx From 5cefa57dd5088193a8c28c2078444096f7e3ef15 Mon Sep 17 00:00:00 2001 From: MrSimbax Date: Sun, 24 Feb 2019 15:49:05 +0100 Subject: [PATCH 173/207] Use base dir instead of working dir for data files --- CMakeLists.txt | 8 ++++++++ src/common/config.h.cmake | 4 ++-- src/common/system/system.cpp | 5 +++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ba6cd2d9..031971af 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -394,24 +394,32 @@ if(PORTABLE OR (PLATFORM_WINDOWS AND MXE)) # We need to use STRING because PATH doesn't accept relative paths set(COLOBOT_INSTALL_BIN_DIR ./ CACHE STRING "Colobot binary directory") set(COLOBOT_INSTALL_LIB_DIR ./ CACHE STRING "Colobot libraries directory") + set(COLOBOT_RELATIVE_DATA_DIR data CACHE STRING "Colobot shared data directory (relative)") + set(COLOBOT_RELATIVE_I18N_DIR lang CACHE STRING "Colobot translations directory (relative)") set(COLOBOT_INSTALL_DATA_DIR ./data CACHE STRING "Colobot shared data directory") set(COLOBOT_INSTALL_I18N_DIR ./lang CACHE STRING "Colobot translations directory") set(COLOBOT_INSTALL_DOC_DIR ./doc CACHE STRING "Colobot documentation directory") elseif(PLATFORM_WINDOWS) set(COLOBOT_INSTALL_BIN_DIR ${CMAKE_INSTALL_PREFIX}/ CACHE PATH "Colobot binary directory") set(COLOBOT_INSTALL_LIB_DIR ${CMAKE_INSTALL_PREFIX}/ CACHE PATH "Colobot libraries directory") + set(COLOBOT_RELATIVE_DATA_DIR data CACHE STRING "Colobot shared data directory (relative)") + set(COLOBOT_RELATIVE_I18N_DIR lang CACHE STRING "Colobot translations directory (relative)") set(COLOBOT_INSTALL_DATA_DIR ${CMAKE_INSTALL_PREFIX}/data CACHE PATH "Colobot shared data directory") set(COLOBOT_INSTALL_I18N_DIR ${CMAKE_INSTALL_PREFIX}/lang CACHE PATH "Colobot translations directory") set(COLOBOT_INSTALL_DOC_DIR ${CMAKE_INSTALL_PREFIX}/doc CACHE PATH "Colobot documentation directory") elseif(PLATFORM_MACOSX) set(COLOBOT_INSTALL_BIN_DIR ../MacOS CACHE STRING "Colobot binary directory") set(COLOBOT_INSTALL_LIB_DIR ../MacOS CACHE STRING "Colobot libraries directory") + set(COLOBOT_RELATIVE_DATA_DIR . CACHE STRING "Colobot shared data directory (relative)") + set(COLOBOT_RELATIVE_I18N_DIR i18n CACHE STRING "Colobot translations directory (relative)") set(COLOBOT_INSTALL_DATA_DIR . CACHE STRING "Colobot shared data directory") set(COLOBOT_INSTALL_I18N_DIR i18n CACHE SRING "Colobot translations directory") set(COLOBOT_INSTALL_DOC_DIR doc CACHE STRING "Colobot documentation directory") else() set(COLOBOT_INSTALL_BIN_DIR ${CMAKE_INSTALL_PREFIX}/games CACHE PATH "Colobot binary directory") set(COLOBOT_INSTALL_LIB_DIR ${CMAKE_INSTALL_PREFIX}/lib/colobot CACHE PATH "Colobot libraries directory") + set(COLOBOT_RELATIVE_DATA_DIR ../share/games/colobot CACHE STRING "Colobot shared data directory (relative)") + set(COLOBOT_RELATIVE_I18N_DIR ../share/locale CACHE STRING "Colobot translations directory (relative)") set(COLOBOT_INSTALL_DATA_DIR ${CMAKE_INSTALL_PREFIX}/share/games/colobot CACHE PATH "Colobot shared data directory") set(COLOBOT_INSTALL_I18N_DIR ${CMAKE_INSTALL_PREFIX}/share/locale CACHE PATH "Colobot translations directory") set(COLOBOT_INSTALL_DOC_DIR ${CMAKE_INSTALL_PREFIX}/share/doc/colobot CACHE PATH "Colobot documentation directory") diff --git a/src/common/config.h.cmake b/src/common/config.h.cmake index f6d0bcae..6100d7dc 100644 --- a/src/common/config.h.cmake +++ b/src/common/config.h.cmake @@ -18,5 +18,5 @@ #cmakedefine PORTABLE_SAVES @PORTABLE_SAVES@ -#define COLOBOT_DEFAULT_DATADIR "@COLOBOT_INSTALL_DATA_DIR@" -#define COLOBOT_I18N_DIR "@COLOBOT_INSTALL_I18N_DIR@" +#define COLOBOT_DEFAULT_DATADIR "@COLOBOT_RELATIVE_DATA_DIR@" +#define COLOBOT_I18N_DIR "@COLOBOT_RELATIVE_I18N_DIR@" diff --git a/src/common/system/system.cpp b/src/common/system/system.cpp index 12dc1d36..efec405b 100644 --- a/src/common/system/system.cpp +++ b/src/common/system/system.cpp @@ -36,6 +36,7 @@ #include #include +#include std::unique_ptr CSystemUtils::Create() { @@ -178,12 +179,12 @@ float CSystemUtils::TimeStampDiff(SystemTimeStamp *before, SystemTimeStamp *afte std::string CSystemUtils::GetDataPath() { - return COLOBOT_DEFAULT_DATADIR; + return std::string{PHYSFS_getBaseDir()} + COLOBOT_DEFAULT_DATADIR; } std::string CSystemUtils::GetLangPath() { - return COLOBOT_I18N_DIR; + return std::string{PHYSFS_getBaseDir()} + COLOBOT_I18N_DIR; } std::string CSystemUtils::GetSaveDir() From 41379ded7ef8ffadaf829e338ddbc13137282682 Mon Sep 17 00:00:00 2001 From: MrSimbax Date: Sun, 24 Feb 2019 17:16:54 +0100 Subject: [PATCH 174/207] Use workdir paths on dev builds --- src/common/system/system.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/common/system/system.cpp b/src/common/system/system.cpp index efec405b..2ef642ab 100644 --- a/src/common/system/system.cpp +++ b/src/common/system/system.cpp @@ -179,12 +179,20 @@ float CSystemUtils::TimeStampDiff(SystemTimeStamp *before, SystemTimeStamp *afte std::string CSystemUtils::GetDataPath() { +#if DEV_BUILD + return std::string{"./"} + COLOBOT_DEFAULT_DATADIR; +#else return std::string{PHYSFS_getBaseDir()} + COLOBOT_DEFAULT_DATADIR; +#endif } std::string CSystemUtils::GetLangPath() { +#if DEV_BUILD + return std::string{"./"} + COLOBOT_I18N_DIR; +#else return std::string{PHYSFS_getBaseDir()} + COLOBOT_I18N_DIR; +#endif } std::string CSystemUtils::GetSaveDir() From 2d3d03cc382674e2396eed6d111818316639793c Mon Sep 17 00:00:00 2001 From: MrSimbax Date: Mon, 25 Feb 2019 23:00:05 +0100 Subject: [PATCH 175/207] Use SDL_GetBasePath() instead of physfs because it's buggy in old version --- src/common/system/system.cpp | 13 ++++++++++--- src/common/system/system.h | 4 ++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/common/system/system.cpp b/src/common/system/system.cpp index 2ef642ab..c1886852 100644 --- a/src/common/system/system.cpp +++ b/src/common/system/system.cpp @@ -36,7 +36,7 @@ #include #include -#include +#include std::unique_ptr CSystemUtils::Create() { @@ -177,12 +177,19 @@ float CSystemUtils::TimeStampDiff(SystemTimeStamp *before, SystemTimeStamp *afte return result; } +std::string CSystemUtils::GetBasePath() +{ + if (m_basePath.empty()) + m_basePath = SDL_GetBasePath(); + return m_basePath; +} + std::string CSystemUtils::GetDataPath() { #if DEV_BUILD return std::string{"./"} + COLOBOT_DEFAULT_DATADIR; #else - return std::string{PHYSFS_getBaseDir()} + COLOBOT_DEFAULT_DATADIR; + return GetBasePath() + COLOBOT_DEFAULT_DATADIR; #endif } @@ -191,7 +198,7 @@ std::string CSystemUtils::GetLangPath() #if DEV_BUILD return std::string{"./"} + COLOBOT_I18N_DIR; #else - return std::string{PHYSFS_getBaseDir()} + COLOBOT_I18N_DIR; + return GetBasePath() + COLOBOT_I18N_DIR; #endif } diff --git a/src/common/system/system.h b/src/common/system/system.h index 36e736c9..7912f27a 100644 --- a/src/common/system/system.h +++ b/src/common/system/system.h @@ -127,6 +127,9 @@ public: /** The difference is \a after - \a before. */ virtual long long TimeStampExactDiff(SystemTimeStamp *before, SystemTimeStamp *after) = 0; + //! Returns the path where the executable binary is located + virtual std::string GetBasePath(); + //! Returns the data path (containing textures, levels, helpfiles, etc) virtual std::string GetDataPath(); @@ -140,5 +143,6 @@ public: virtual void Usleep(int usecs) = 0; private: + std::string m_basePath; std::vector> m_timeStamps; }; From 61a7aa2592af45a03b6dec7920d4c49bcf36dfbe Mon Sep 17 00:00:00 2001 From: MrSimbax Date: Mon, 25 Feb 2019 23:42:34 +0100 Subject: [PATCH 176/207] Fix minor memory leak --- src/common/system/system.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/common/system/system.cpp b/src/common/system/system.cpp index c1886852..0b8001a1 100644 --- a/src/common/system/system.cpp +++ b/src/common/system/system.cpp @@ -180,7 +180,11 @@ float CSystemUtils::TimeStampDiff(SystemTimeStamp *before, SystemTimeStamp *afte std::string CSystemUtils::GetBasePath() { if (m_basePath.empty()) - m_basePath = SDL_GetBasePath(); + { + auto* path = SDL_GetBasePath(); + m_basePath = path; + SDL_free(path); + } return m_basePath; } From 4f9d9d0609a11dbf706a7a1b95c20ab4925ffcef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Tue, 24 Sep 2019 16:30:50 +0200 Subject: [PATCH 177/207] Fix manpage build rules to work with Ninja generator Specify outputs for po4a command explicitly rather than via implicit target, in order to clearly establish the dependency chain between manpages and input files generated by po4a. This is necessary to make it possible to use Ninja generator. Otherwise, the implicit dependencies cause the following error: ninja: error: '../desktop/lang/fr/colobot.pod', needed by 'desktop/fr/colobot.6', missing and no known rule to make it --- desktop/CMakeLists.txt | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/desktop/CMakeLists.txt b/desktop/CMakeLists.txt index af704932..2ee308cc 100644 --- a/desktop/CMakeLists.txt +++ b/desktop/CMakeLists.txt @@ -82,20 +82,6 @@ if(PLATFORM_GNU) DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/apps/ ) - # Translate translatable material - find_program(PO4A po4a) - if(NOT PO4A) - message(WARNING "po4a not found; desktop and manpage files will not be translated") - endif() - - if(PO4A) - add_custom_target(desktop_po4a - COMMAND ${PO4A} po4a.cfg - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - ) - add_dependencies(desktopfile desktop_po4a) - endif() - # Create manpage from pod-formatted file find_program(POD2MAN pod2man) if(NOT POD2MAN) @@ -133,11 +119,30 @@ if(PLATFORM_GNU) # Create the english manpage podman(PODFILE colobot.pod) + # Translate translatable material + find_program(PO4A po4a) + if(NOT PO4A) + message(WARNING "po4a not found; desktop and manpage files will not be translated") + endif() + if(PO4A) # Translate the manpage to other languages - add_dependencies(man desktop_po4a) file(GLOB LINGUAS_PO RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/po/ ${CMAKE_CURRENT_SOURCE_DIR}/po/*.po) string(REGEX REPLACE ".po$" "" LINGUAS ${LINGUAS_PO}) + + set(PO4A_OUTPUTS) + foreach(LOCALE ${LINGUAS}) + list(APPEND PO4A_OUTPUTS ${CMAKE_CURRENT_SOURCE_DIR}/lang/${LOCALE}/colobot.pod) + endforeach() + add_custom_command( + OUTPUT ${PO4A_OUTPUTS} + COMMAND ${PO4A} po4a.cfg + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + ) + add_custom_target(desktop_po4a DEPENDS ${PO4A_OUTPUTS}) + add_dependencies(man desktop_po4a) + add_dependencies(desktopfile desktop_po4a) + foreach(LOCALE ${LINGUAS}) podman(PODFILE lang/${LOCALE}/colobot.pod LOCALE ${LOCALE}) add_dependencies(man${PM_LOCALE} desktop_po4a) From 68ddaf550b16007487e35f7ee774f38f5c53cb06 Mon Sep 17 00:00:00 2001 From: suve Date: Mon, 7 Oct 2019 14:39:51 +0200 Subject: [PATCH 178/207] Add some missing strings to the Polish translation --- po/pl.po | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/po/pl.po b/po/pl.po index 073c7b58..964a4299 100644 --- a/po/pl.po +++ b/po/pl.po @@ -365,7 +365,7 @@ msgid "Checkpoint" msgstr "Punkt kontrolny" msgid "Class name expected" -msgstr "" +msgstr "Oczekiwano nazwy klasy" msgid "Climb\\Increases the power of the jet" msgstr "W górę\\Zwiększa moc silnika" @@ -628,7 +628,7 @@ msgid "Function name missing" msgstr "Brakująca nazwa funkcji" msgid "Function needs return type \"void\"" -msgstr "" +msgstr "Funkcja potrzebuje typu zwracanego \"void\"" msgid "Game speed" msgstr "Prędkość gry" @@ -679,7 +679,7 @@ msgid "Help balloons\\Explain the function of the buttons" msgstr "Dymki pomocy\\Wyjaśnia funkcje przycisków" msgid "Hex value out of range" -msgstr "" +msgstr "Wartość heksadecymalna poza zakresem" msgid "Higher speed\\Doubles speed" msgstr "Zwiększ prędkość\\Podwaja prędkość" @@ -859,10 +859,10 @@ msgid "Mipmap level\\Mipmap level" msgstr "Poziom mipmap\\Poziom mipmap" msgid "Missing end quote" -msgstr "" +msgstr "Brak cudzysłowu zamykającego" msgid "Missing hex digits after escape sequence" -msgstr "" +msgstr "Brak cyfr heksadecymalnych po znaku ucieczki" msgid "Mission name" msgstr "Nazwa misji" @@ -964,7 +964,7 @@ msgid "No userlevels installed!" msgstr "Brak zainstalowanych poziomów użytkownika!" msgid "Non-void function needs \"return;\"" -msgstr "" +msgstr "Funkcja zwracająca typ inny, niż \"void\", wymaga \"return;\"" msgid "Normal size" msgstr "Normalna wielkość" @@ -1027,7 +1027,7 @@ msgid "Object too close" msgstr "Obiekt za blisko" msgid "Octal value out of range" -msgstr "" +msgstr "Wartość ósemkowa poza zakresem" msgid "One step" msgstr "Jeden krok" @@ -1072,7 +1072,7 @@ msgid "Paste (Ctrl+V)" msgstr "Wklej (Ctrl+V)" msgid "Pause blur\\Blur the background on the pause screen" -msgstr "" +msgstr "Rozmyta pauza\\Rozmyj tło na ekranie pauzy" msgid "Pause in background\\Pause the game when the window is unfocused" msgstr "Wstrzymaj w tle\\Wstrzymaj grę gdy okno stanie się nieaktywne" @@ -1534,7 +1534,7 @@ msgid "This object is not a member of a class" msgstr "Ten obiekt nie jest członkiem klasy" msgid "This parameter needs a default value" -msgstr "" +msgstr "Ten parametr wymaga podania domyślnej wartości" msgid "This program is read-only, clone it to edit" msgstr "Ten program jest tylko do odczytu, skopiuj go, aby edytować" From 1a771b0e72d44e6de2e6df74eb0fe71f7ee612d5 Mon Sep 17 00:00:00 2001 From: pkubaj Date: Fri, 18 Oct 2019 14:00:37 +0200 Subject: [PATCH 179/207] Fix build on ARM and PPC ARM and PPC use unsigned char by default. --- src/object/task/taskgoto.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/object/task/taskgoto.h b/src/object/task/taskgoto.h index 296fec92..74de5e1c 100644 --- a/src/object/task/taskgoto.h +++ b/src/object/task/taskgoto.h @@ -147,7 +147,7 @@ protected: int m_bmTotal = 0; // number of points in m_bmPoints int m_bmIndex = 0; // index in m_bmPoints Math::Vector m_bmPoints[MAXPOINTS+2]; - char m_bmIter[MAXPOINTS+2] = {}; + signed char m_bmIter[MAXPOINTS+2] = {}; int m_bmIterCounter = 0; CObject* m_bmCargoObject = nullptr; float m_bmFinalMove = 0.0f; // final advance distance From b9ac5688e9f0a767ed56433d7835e3dd777223e2 Mon Sep 17 00:00:00 2001 From: tomangelo2 Date: Sun, 28 Jul 2019 21:18:16 +0200 Subject: [PATCH 180/207] Fix package name in compilation instruction --- INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index 423166dc..fc69342c 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -71,7 +71,7 @@ You will need: On Ubuntu (and probably any other Debian-based system), you can use the following command to install all required packages: ``` - $ apt-get install build-essential cmake libsdl2-dev libsdl2-image-dev libsdl2-ttf-dev libsndfile1-dev libvorbis-dev libogg-dev libpng12-dev libglew-dev libopenal-dev libboost-dev libboost-system-dev libboost-filesystem-dev libboost-regex-dev libphysfs-dev gettext git po4a vorbis-tools + $ apt-get install build-essential cmake libsdl2-dev libsdl2-image-dev libsdl2-ttf-dev libsndfile1-dev libvorbis-dev libogg-dev libpng-dev libglew-dev libopenal-dev libboost-dev libboost-system-dev libboost-filesystem-dev libboost-regex-dev libphysfs-dev gettext git po4a vorbis-tools ``` Make sure you install the packages along with header files (often distributed in separate *-dev packages). If you miss any requirements, From 4e4c3671c65cf91868f6235cd44b10b396c31596 Mon Sep 17 00:00:00 2001 From: tomangelo2 Date: Sun, 29 Dec 2019 13:11:57 +0100 Subject: [PATCH 181/207] Fixed Jenkins builds --- Jenkinsfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 95b567a8..90e0af2d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -81,6 +81,8 @@ pipeline { # Create AppImage NO_STRIP=1 ./squashfs-root/AppRun -e colobot --output appimage --appdir colobot.AppDir -d desktop/colobot.desktop -i ../../desktop/colobot.svg + #rename AppImage file to avoid "No such file or directory" errors + find . -maxdepth 1 -type f -name '*AppImage' -name 'Colobot*' -exec sh -c 'x="{}"; mv "$x" "Colobot-x86_64.AppImage"' \; chmod +x Colobot-x86_64.AppImage # Prepare folder for zip From f97da6482b5d797fe3e43987f2c43f3e34ef88a4 Mon Sep 17 00:00:00 2001 From: tomangelo2 Date: Sun, 29 Dec 2019 13:18:39 +0100 Subject: [PATCH 182/207] Fixed escape character --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 90e0af2d..47dbd3c2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -82,7 +82,7 @@ pipeline { # Create AppImage NO_STRIP=1 ./squashfs-root/AppRun -e colobot --output appimage --appdir colobot.AppDir -d desktop/colobot.desktop -i ../../desktop/colobot.svg #rename AppImage file to avoid "No such file or directory" errors - find . -maxdepth 1 -type f -name '*AppImage' -name 'Colobot*' -exec sh -c 'x="{}"; mv "$x" "Colobot-x86_64.AppImage"' \; + find . -maxdepth 1 -type f -name '*AppImage' -name 'Colobot*' -exec sh -c 'x="{}"; mv "$x" "Colobot-x86_64.AppImage"' \\; chmod +x Colobot-x86_64.AppImage # Prepare folder for zip From 5bf6f12ae59546be3511b4cae2abc4c6e87fa9f6 Mon Sep 17 00:00:00 2001 From: Fiftytwo Date: Sat, 11 Jan 2020 17:04:40 +0100 Subject: [PATCH 183/207] Add HeavyTrainer texture recoloring --- src/level/robotmain.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp index b2ec5a9d..99f945e2 100644 --- a/src/level/robotmain.cpp +++ b/src/level/robotmain.cpp @@ -3923,6 +3923,7 @@ void CRobotMain::ChangeColor() m_engine->ChangeTextureColor("textures/objects/lemt.png"+teamStr, "textures/objects/lemt.png", COLOR_REF_BOT, newColor, colorRef2, colorNew2, 0.10f, -1.0f, ts, ti, nullptr, 0, true); m_engine->ChangeTextureColor("textures/objects/roller.png"+teamStr, "textures/objects/roller.png", COLOR_REF_BOT, newColor, colorRef2, colorNew2, 0.10f, -1.0f, ts, ti, nullptr, 0, true); m_engine->ChangeTextureColor("textures/objects/search.png"+teamStr, "textures/objects/search.png", COLOR_REF_BOT, newColor, colorRef2, colorNew2, 0.10f, -1.0f, ts, ti, nullptr, 0, true); + m_engine->ChangeTextureColor("textures/objects/rollert.png"+teamStr, "textures/objects/rollert.png", COLOR_REF_BOT, newColor, colorRef2, colorNew2, 0.10f, -1.0f, ts, ti, nullptr, 0, true); exclu[0] = Math::Point( 0.0f/256.0f, 160.0f/256.0f); exclu[1] = Math::Point(256.0f/256.0f, 256.0f/256.0f); // pencils From 853d8eee5df6b936c65e1cd1b992334b377534bc Mon Sep 17 00:00:00 2001 From: Fiftytwo Date: Sat, 11 Jan 2020 18:39:44 +0100 Subject: [PATCH 184/207] Adjust HeavyTrainer rear light sprite position --- src/object/old_object.cpp | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/object/old_object.cpp b/src/object/old_object.cpp index 4804b907..76a922bb 100644 --- a/src/object/old_object.cpp +++ b/src/object/old_object.cpp @@ -3048,15 +3048,23 @@ void COldObject::UpdateSelectParticle() pos[2] = Math::Vector(-3.6f, 4.2f, 3.0f); pos[3] = Math::Vector(-3.6f, 4.2f, -3.0f); } - if ( m_type == OBJECT_MOBILErt || - m_type == OBJECT_MOBILErc || - m_type == OBJECT_MOBILErr || - m_type == OBJECT_MOBILErs || - m_type == OBJECT_MOBILErp ) // large caterpillars? + else if ( m_type == OBJECT_MOBILErt || + m_type == OBJECT_MOBILErc || + m_type == OBJECT_MOBILErr || + m_type == OBJECT_MOBILErs ) // large caterpillars? { pos[2] = Math::Vector(-5.0f, 5.2f, 2.5f); pos[3] = Math::Vector(-5.0f, 5.2f, -2.5f); } + if ( m_type == OBJECT_MOBILErp || ( GetTrainer() && + ( m_type == OBJECT_MOBILErt || + m_type == OBJECT_MOBILErc || + m_type == OBJECT_MOBILErr || + m_type == OBJECT_MOBILErs))) // large caterpillars (trainer)? + { + pos[2] = Math::Vector(-4.6f, 5.2f, 2.6f); + pos[3] = Math::Vector(-4.6f, 5.2f, -2.6f); + } if ( m_type == OBJECT_MOBILEsa || m_type == OBJECT_MOBILEst ) // submarine? { From fc2bd68876ac6302dbc8e91e8ffa33592db14b21 Mon Sep 17 00:00:00 2001 From: suve Date: Sun, 9 Feb 2020 00:36:05 +0100 Subject: [PATCH 185/207] Fix missing std includes --- src/CBot/CBotInstr/CBotExprLitString.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/CBot/CBotInstr/CBotExprLitString.cpp b/src/CBot/CBotInstr/CBotExprLitString.cpp index fc254162..69e42d60 100644 --- a/src/CBot/CBotInstr/CBotExprLitString.cpp +++ b/src/CBot/CBotInstr/CBotExprLitString.cpp @@ -24,6 +24,8 @@ #include "CBot/CBotVar/CBotVar.h" +#include + namespace CBot { From 0d6218bfa0c7e5d64998ce7bad72edb797f2b0a3 Mon Sep 17 00:00:00 2001 From: Fiftytwo Date: Tue, 31 Mar 2020 16:57:45 +0200 Subject: [PATCH 186/207] Fix trainer Builder segfault --- src/ui/object_interface.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/ui/object_interface.cpp b/src/ui/object_interface.cpp index d75af46e..97d8f578 100644 --- a/src/ui/object_interface.cpp +++ b/src/ui/object_interface.cpp @@ -1830,10 +1830,11 @@ void CObjectInterface::UpdateInterface() } } - if ( type == OBJECT_MOBILEfb || - type == OBJECT_MOBILEtb || - type == OBJECT_MOBILEwb || - type == OBJECT_MOBILEib ) // builder? + if ( (type == OBJECT_MOBILEfb || + type == OBJECT_MOBILEtb || + type == OBJECT_MOBILEwb || + type == OBJECT_MOBILEib) && // builder? + !m_object->GetTrainer() ) { if(!bEnable) m_buildInterface = false; CheckInterface(pw, EVENT_OBJECT_BUILD, m_buildInterface); From b5466261d4f5e194d2ecbebba06a038471bbce96 Mon Sep 17 00:00:00 2001 From: Fiftytwo Date: Tue, 31 Mar 2020 19:02:53 +0200 Subject: [PATCH 187/207] Make buildings inherit trainer param from builder --- src/object/task/taskbuild.cpp | 5 +++-- src/object/task/taskbuild.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/object/task/taskbuild.cpp b/src/object/task/taskbuild.cpp index 3c8d769c..13b792ec 100644 --- a/src/object/task/taskbuild.cpp +++ b/src/object/task/taskbuild.cpp @@ -86,7 +86,7 @@ CTaskBuild::~CTaskBuild() // Creates a building. -void CTaskBuild::CreateBuilding(Math::Vector pos, float angle) +void CTaskBuild::CreateBuilding(Math::Vector pos, float angle, bool trainer) { ObjectCreateParams params; params.pos = pos; @@ -94,6 +94,7 @@ void CTaskBuild::CreateBuilding(Math::Vector pos, float angle) params.type = m_type; params.power = 0.0f; params.team = m_object->GetTeam(); + params.trainer = trainer; m_building = CObjectManager::GetInstancePointer()->CreateObject(params); m_building->SetLock(true); // not yet usable @@ -287,7 +288,7 @@ bool CTaskBuild::EventProcess(const Event &event) pos = m_metal->GetPosition(); a = m_object->GetRotationY(); - CreateBuilding(pos, a+Math::PI); + CreateBuilding(pos, a+Math::PI, m_object->GetTrainer()); CreateLight(); } diff --git a/src/object/task/taskbuild.h b/src/object/task/taskbuild.h index 94f3d617..4ebd6bdd 100644 --- a/src/object/task/taskbuild.h +++ b/src/object/task/taskbuild.h @@ -61,7 +61,7 @@ public: protected: Error FlatFloor(); - void CreateBuilding(Math::Vector pos, float angle); + void CreateBuilding(Math::Vector pos, float angle, bool trainer); void CreateLight(); void BlackLight(); CObject* SearchMetalObject(float &angle, float dMin, float dMax, float aLimit, Error &err); From d4b2f23c4aae83b83d3bda66ebf4eee2339e3ac5 Mon Sep 17 00:00:00 2001 From: MrSimbax Date: Fri, 3 Apr 2020 20:15:24 +0200 Subject: [PATCH 188/207] Add handling of env variables --- src/app/app.cpp | 29 +++++++++++++++++++++++++++- src/app/app.h | 4 +++- src/app/main.cpp | 2 ++ src/app/pathman.cpp | 6 +++++- src/common/system/system.cpp | 5 +++++ src/common/system/system.h | 3 +++ src/common/system/system_linux.cpp | 12 ++++++++++++ src/common/system/system_linux.h | 2 ++ src/common/system/system_macosx.cpp | 6 ++++++ src/common/system/system_macosx.h | 2 ++ src/common/system/system_windows.cpp | 16 +++++++++++++++ src/common/system/system_windows.h | 2 ++ 12 files changed, 86 insertions(+), 3 deletions(-) diff --git a/src/app/app.cpp b/src/app/app.cpp index 6f864572..94b6319e 100644 --- a/src/app/app.cpp +++ b/src/app/app.cpp @@ -220,6 +220,30 @@ CSoundInterface* CApplication::GetSound() return m_sound.get(); } +void CApplication::LoadEnvironmentVariables() +{ + auto dataDir = m_systemUtils->GetEnvVar("COLOBOT_DATA_DIR"); + if (!dataDir.empty()) + { + m_pathManager->SetDataPath(dataDir); + GetLogger()->Info("Using data dir (based on environment variable): '%s'\n", dataDir.c_str()); + } + + auto langDir = m_systemUtils->GetEnvVar("COLOBOT_LANG_DIR"); + if (!langDir.empty()) + { + m_pathManager->SetLangPath(langDir); + GetLogger()->Info("Using lang dir (based on environment variable): '%s'\n", langDir.c_str()); + } + + auto saveDir = m_systemUtils->GetEnvVar("COLOBOT_SAVE_DIR"); + if (!saveDir.empty()) + { + m_pathManager->SetSavePath(saveDir); + GetLogger()->Info("Using save dir (based on environment variable): '%s'\n", saveDir.c_str()); + } +} + ParseArgsStatus CApplication::ParseArguments(int argc, char *argv[]) { enum OptionType @@ -286,15 +310,18 @@ ParseArgsStatus CApplication::ParseArguments(int argc, char *argv[]) GetLogger()->Message("\n"); GetLogger()->Message("%s\n", COLOBOT_FULLNAME); GetLogger()->Message("\n"); - GetLogger()->Message("List of available options:\n"); + GetLogger()->Message("List of available options and environment variables:\n"); GetLogger()->Message(" -help this help\n"); GetLogger()->Message(" -debug modes enable debug modes (more info printed in logs; see code for reference of modes)\n"); GetLogger()->Message(" -runscene sceneNNN run given scene on start\n"); GetLogger()->Message(" -scenetest win every mission right after it's loaded\n"); GetLogger()->Message(" -loglevel level set log level to level (one of: trace, debug, info, warn, error, none)\n"); GetLogger()->Message(" -langdir path set custom language directory path\n"); + GetLogger()->Message(" environment variable: COLOBOT_LANG_DIR\n"); GetLogger()->Message(" -datadir path set custom data directory path\n"); + GetLogger()->Message(" environment variable: COLOBOT_DATA_DIR\n"); GetLogger()->Message(" -savedir path set custom save directory path (must be writable)\n"); + GetLogger()->Message(" environment variable: COLOBOT_SAVE_DIR\n"); GetLogger()->Message(" -mod path load datadir mod from given path\n"); GetLogger()->Message(" -resolution WxH set resolution\n"); GetLogger()->Message(" -headless headless mode - disables graphics, sound and user interaction\n"); diff --git a/src/app/app.h b/src/app/app.h index ccae3a5c..0c7f6388 100644 --- a/src/app/app.h +++ b/src/app/app.h @@ -164,7 +164,9 @@ public: CSoundInterface* GetSound(); public: - //! Parses commandline arguments + //! Loads some data from environment variables + void LoadEnvironmentVariables(); + //! Parses commandline arguments (they take priority) ParseArgsStatus ParseArguments(int argc, char *argv[]); //! Initializes the application bool Create(); diff --git a/src/app/main.cpp b/src/app/main.cpp index 9fdb89a3..af0fc99a 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -172,6 +172,8 @@ int main(int argc, char *argv[]) int code = 0; CApplication app(systemUtils.get()); // single instance of the application + app.LoadEnvironmentVariables(); + ParseArgsStatus status = app.ParseArguments(argc, argv); if (status == PARSE_ARGS_FAIL) { diff --git a/src/app/pathman.cpp b/src/app/pathman.cpp index 60715ac1..954fcc4e 100644 --- a/src/app/pathman.cpp +++ b/src/app/pathman.cpp @@ -41,7 +41,7 @@ CPathManager::CPathManager(CSystemUtils* systemUtils) : m_dataPath(systemUtils->GetDataPath()) , m_langPath(systemUtils->GetLangPath()) , m_savePath(systemUtils->GetSaveDir()) - , m_modAutoloadDir{ m_dataPath + "/mods", m_savePath + "/mods" } + , m_modAutoloadDir{} , m_mods{} { } @@ -130,6 +130,10 @@ void CPathManager::InitPaths() { GetLogger()->Info("Data path: %s\n", m_dataPath.c_str()); GetLogger()->Info("Save path: %s\n", m_savePath.c_str()); + + m_modAutoloadDir.push_back(m_dataPath + "/mods"); + m_modAutoloadDir.push_back(m_savePath + "/mods"); + if (!m_modAutoloadDir.empty()) { GetLogger()->Info("Mod autoload dirs:\n"); diff --git a/src/common/system/system.cpp b/src/common/system/system.cpp index 0b8001a1..b22d0771 100644 --- a/src/common/system/system.cpp +++ b/src/common/system/system.cpp @@ -210,3 +210,8 @@ std::string CSystemUtils::GetSaveDir() { return "./saves"; } + +std::string CSystemUtils::GetEnvVar(const std::string& str) +{ + return std::string(); +} diff --git a/src/common/system/system.h b/src/common/system/system.h index 7912f27a..431ddd41 100644 --- a/src/common/system/system.h +++ b/src/common/system/system.h @@ -139,6 +139,9 @@ public: //! Returns the save dir location virtual std::string GetSaveDir(); + //! Returns environment variable + virtual std::string GetEnvVar(const std::string &str); + //! Sleep for given amount of microseconds virtual void Usleep(int usecs) = 0; diff --git a/src/common/system/system_linux.cpp b/src/common/system/system_linux.cpp index 9bfe431a..b71befe5 100644 --- a/src/common/system/system_linux.cpp +++ b/src/common/system/system_linux.cpp @@ -126,6 +126,18 @@ std::string CSystemUtilsLinux::GetSaveDir() #endif } +std::string CSystemUtilsLinux::GetEnvVar(const std::string& name) +{ + char* envVar = getenv(name.c_str()); + if (envVar != nullptr) + { + + GetLogger()->Trace("Detected environment variable %s = %s\n", name.c_str(), envVar); + return std::string(envVar); + } + return ""; +} + void CSystemUtilsLinux::Usleep(int usec) { usleep(usec); diff --git a/src/common/system/system_linux.h b/src/common/system/system_linux.h index f1576f31..c4de2c7f 100644 --- a/src/common/system/system_linux.h +++ b/src/common/system/system_linux.h @@ -45,6 +45,8 @@ public: std::string GetSaveDir() override; + std::string GetEnvVar(const std::string& name) override; + void Usleep(int usec) override; private: diff --git a/src/common/system/system_macosx.cpp b/src/common/system/system_macosx.cpp index 9ef7ce1d..8a537e11 100644 --- a/src/common/system/system_macosx.cpp +++ b/src/common/system/system_macosx.cpp @@ -113,6 +113,12 @@ std::string CSystemUtilsMacOSX::GetSaveDir() #endif } +std::string CSystemUtilsMacOSX::GetEnvVar(const std::string& str) +{ + // TODO: I have no Mac + return std::string(); +} + void CSystemUtilsMacOSX::Usleep(int usec) { usleep(usec); diff --git a/src/common/system/system_macosx.h b/src/common/system/system_macosx.h index 5b572ec4..708d26fc 100644 --- a/src/common/system/system_macosx.h +++ b/src/common/system/system_macosx.h @@ -36,6 +36,8 @@ public: std::string GetLangPath() override; std::string GetSaveDir() override; + std::string GetEnvVar(const std::string& str) override; + void Usleep(int usec) override; private: diff --git a/src/common/system/system_windows.cpp b/src/common/system/system_windows.cpp index a20bfcf1..5254db83 100644 --- a/src/common/system/system_windows.cpp +++ b/src/common/system/system_windows.cpp @@ -131,6 +131,22 @@ std::string CSystemUtilsWindows::GetSaveDir() #endif } +std::string CSystemUtilsWindows::GetEnvVar(const std::string& name) +{ + std::wstring wname(name.begin(), name.end()); + wchar_t* envVar = _wgetenv(wname.c_str()); + if (envVar == nullptr) + { + return ""; + } + else + { + std::string var = UTF8_Encode(std::wstring(envVar)); + GetLogger()->Trace("Detected environment variable %s = %s\n", name.c_str(), var.c_str()); + return var; + } +} + void CSystemUtilsWindows::Usleep(int usec) { LARGE_INTEGER ft; diff --git a/src/common/system/system_windows.h b/src/common/system/system_windows.h index 74f02455..05f3c910 100644 --- a/src/common/system/system_windows.h +++ b/src/common/system/system_windows.h @@ -43,6 +43,8 @@ public: std::string GetSaveDir() override; + std::string GetEnvVar(const std::string& name) override; + void Usleep(int usec) override; public: From 8f122d66031c1c590b4d18abe8971e29f8184d04 Mon Sep 17 00:00:00 2001 From: MrSimbax Date: Fri, 3 Apr 2020 20:18:14 +0200 Subject: [PATCH 189/207] Fix MSVC compilation (again) --- CMakeLists.txt | 2 +- src/CBot/CBotInstr/CBotExprLitString.cpp | 2 ++ src/CMakeLists.txt | 5 +++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 031971af..06fbdd22 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -198,7 +198,7 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") add_definitions(-DNOEXCEPT= -DHAS_MSVC_EXCEPTION_BUG) # Needed for Debug information (it's set to "No" by default for some reason) - set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS} /DEBUG") + set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS} /DEBUG /NODEFAULTLIB:MSVCRTD /NODEFAULTLIB:LIBCMT") set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS} /DEBUG") else() message(FATAL_ERROR "Your C++ compiler doesn't seem to be supported.") diff --git a/src/CBot/CBotInstr/CBotExprLitString.cpp b/src/CBot/CBotInstr/CBotExprLitString.cpp index 72cca72b..fd8ca73f 100644 --- a/src/CBot/CBotInstr/CBotExprLitString.cpp +++ b/src/CBot/CBotInstr/CBotExprLitString.cpp @@ -24,6 +24,8 @@ #include "CBot/CBotVar/CBotVar.h" +#include + namespace CBot { diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7f75a7e1..7df4c47f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -66,6 +66,8 @@ elseif(PLATFORM_WINDOWS) find_library(WEBP_LIBRARY NAMES webp.lib) find_library(LZMA_LIBRARY NAMES lzma.lib) find_library(FREETYPE_LIBRARY NAMES freetype.lib) + find_library(ICONV_LIBRARY NAMES libiconv.lib) + find_library(CHARSET_LIBRARY NAMES libcharset.lib) set(MSVC_LIBS ${LIBINTL_LIBRARY} ${OPENAL_MSVC_LIBS} @@ -75,6 +77,8 @@ elseif(PLATFORM_WINDOWS) ${WEBP_LIBRARY} ${LZMA_LIBRARY} ${FREETYPE_LIBRARY} + ${ICONV_LIBRARY} + ${CHARSET_LIBRARY} winmm.lib dxguid.lib imm32.lib @@ -83,6 +87,7 @@ elseif(PLATFORM_WINDOWS) version.lib wsock32.lib ws2_32.lib + setupapi.lib ) else(${MSVC_STATIC}) set(MSVC_LIBS ${LIBINTL_LIBRARY}) From 621453a01c51f84bc7b20ea9b20a05764fd6a29e Mon Sep 17 00:00:00 2001 From: MrSimbax Date: Sun, 5 Apr 2020 13:24:45 +0200 Subject: [PATCH 190/207] Make all relative paths use base dir --- CMakeLists.txt | 36 +++++++++++++++++----------- src/common/config.h.cmake | 4 ++-- src/common/system/system.cpp | 18 +++++++------- src/common/system/system.h | 6 ++--- src/common/system/system_linux.cpp | 17 +++++++------ src/common/system/system_macosx.h | 2 +- src/common/system/system_windows.cpp | 10 ++++---- 7 files changed, 50 insertions(+), 43 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 06fbdd22..28b0c84f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -230,7 +230,10 @@ option(DEV_BUILD "Enable development build (enables some debugging tools, local # PLEASE DO NOT USE ON UNOFFICIAL BUILDS. Thanks. option(OFFICIAL_COLOBOT_BUILD "Official build (changes crash screen text)" OFF) -# Portable build - load all data from current directory +# Hardcode relative paths instead of absolute paths +option(USE_RELATIVE_PATHS "Generate relative paths from absolute paths" OFF) + +# Portable build - load all data from the base directory option(PORTABLE "Portable build" OFF) # Portable saves - suitable for e.g. putting the whole game on external storage and moving your saves with it @@ -392,39 +395,44 @@ endif() # Installation paths defined before compiling sources if(PORTABLE OR (PLATFORM_WINDOWS AND MXE)) # We need to use STRING because PATH doesn't accept relative paths - set(COLOBOT_INSTALL_BIN_DIR ./ CACHE STRING "Colobot binary directory") - set(COLOBOT_INSTALL_LIB_DIR ./ CACHE STRING "Colobot libraries directory") - set(COLOBOT_RELATIVE_DATA_DIR data CACHE STRING "Colobot shared data directory (relative)") - set(COLOBOT_RELATIVE_I18N_DIR lang CACHE STRING "Colobot translations directory (relative)") - set(COLOBOT_INSTALL_DATA_DIR ./data CACHE STRING "Colobot shared data directory") - set(COLOBOT_INSTALL_I18N_DIR ./lang CACHE STRING "Colobot translations directory") - set(COLOBOT_INSTALL_DOC_DIR ./doc CACHE STRING "Colobot documentation directory") + set(COLOBOT_INSTALL_BIN_DIR ${CMAKE_INSTALL_PREFIX}/ CACHE STRING "Colobot binary directory") + set(COLOBOT_INSTALL_LIB_DIR ${CMAKE_INSTALL_PREFIX}/ CACHE STRING "Colobot libraries directory") + set(COLOBOT_INSTALL_DATA_DIR ${CMAKE_INSTALL_PREFIX}/data CACHE STRING "Colobot shared data directory") + set(COLOBOT_INSTALL_I18N_DIR ${CMAKE_INSTALL_PREFIX}/lang CACHE STRING "Colobot translations directory") + set(COLOBOT_INSTALL_DOC_DIR ${CMAKE_INSTALL_PREFIX}/doc CACHE STRING "Colobot documentation directory") + set(USE_RELATIVE_PATHS ON) elseif(PLATFORM_WINDOWS) set(COLOBOT_INSTALL_BIN_DIR ${CMAKE_INSTALL_PREFIX}/ CACHE PATH "Colobot binary directory") set(COLOBOT_INSTALL_LIB_DIR ${CMAKE_INSTALL_PREFIX}/ CACHE PATH "Colobot libraries directory") - set(COLOBOT_RELATIVE_DATA_DIR data CACHE STRING "Colobot shared data directory (relative)") - set(COLOBOT_RELATIVE_I18N_DIR lang CACHE STRING "Colobot translations directory (relative)") set(COLOBOT_INSTALL_DATA_DIR ${CMAKE_INSTALL_PREFIX}/data CACHE PATH "Colobot shared data directory") set(COLOBOT_INSTALL_I18N_DIR ${CMAKE_INSTALL_PREFIX}/lang CACHE PATH "Colobot translations directory") set(COLOBOT_INSTALL_DOC_DIR ${CMAKE_INSTALL_PREFIX}/doc CACHE PATH "Colobot documentation directory") elseif(PLATFORM_MACOSX) set(COLOBOT_INSTALL_BIN_DIR ../MacOS CACHE STRING "Colobot binary directory") set(COLOBOT_INSTALL_LIB_DIR ../MacOS CACHE STRING "Colobot libraries directory") - set(COLOBOT_RELATIVE_DATA_DIR . CACHE STRING "Colobot shared data directory (relative)") - set(COLOBOT_RELATIVE_I18N_DIR i18n CACHE STRING "Colobot translations directory (relative)") set(COLOBOT_INSTALL_DATA_DIR . CACHE STRING "Colobot shared data directory") set(COLOBOT_INSTALL_I18N_DIR i18n CACHE SRING "Colobot translations directory") set(COLOBOT_INSTALL_DOC_DIR doc CACHE STRING "Colobot documentation directory") else() set(COLOBOT_INSTALL_BIN_DIR ${CMAKE_INSTALL_PREFIX}/games CACHE PATH "Colobot binary directory") set(COLOBOT_INSTALL_LIB_DIR ${CMAKE_INSTALL_PREFIX}/lib/colobot CACHE PATH "Colobot libraries directory") - set(COLOBOT_RELATIVE_DATA_DIR ../share/games/colobot CACHE STRING "Colobot shared data directory (relative)") - set(COLOBOT_RELATIVE_I18N_DIR ../share/locale CACHE STRING "Colobot translations directory (relative)") set(COLOBOT_INSTALL_DATA_DIR ${CMAKE_INSTALL_PREFIX}/share/games/colobot CACHE PATH "Colobot shared data directory") set(COLOBOT_INSTALL_I18N_DIR ${CMAKE_INSTALL_PREFIX}/share/locale CACHE PATH "Colobot translations directory") set(COLOBOT_INSTALL_DOC_DIR ${CMAKE_INSTALL_PREFIX}/share/doc/colobot CACHE PATH "Colobot documentation directory") endif() +# Generate relative paths from absolute paths +if(USE_RELATIVE_PATHS) + message(STATUS "Generating relative paths") + file(RELATIVE_PATH COLOBOT_DATA_DIR ${COLOBOT_INSTALL_BIN_DIR} ${COLOBOT_INSTALL_DATA_DIR}) + file(RELATIVE_PATH COLOBOT_I18N_DIR ${COLOBOT_INSTALL_BIN_DIR} ${COLOBOT_INSTALL_I18N_DIR}) + + add_definitions(-DUSE_RELATIVE_PATHS) +else() + set(COLOBOT_DATA_DIR ${COLOBOT_INSTALL_DATA_DIR}) + set(COLOBOT_I18N_DIR ${COLOBOT_INSTALL_I18N_DIR}) +endif() + # Subdirectory with sources add_subdirectory(src) diff --git a/src/common/config.h.cmake b/src/common/config.h.cmake index 6100d7dc..556e067e 100644 --- a/src/common/config.h.cmake +++ b/src/common/config.h.cmake @@ -18,5 +18,5 @@ #cmakedefine PORTABLE_SAVES @PORTABLE_SAVES@ -#define COLOBOT_DEFAULT_DATADIR "@COLOBOT_RELATIVE_DATA_DIR@" -#define COLOBOT_I18N_DIR "@COLOBOT_RELATIVE_I18N_DIR@" +#define COLOBOT_DEFAULT_DATADIR "@COLOBOT_DATA_DIR@" +#define COLOBOT_I18N_DIR "@COLOBOT_I18N_DIR@" diff --git a/src/common/system/system.cpp b/src/common/system/system.cpp index b22d0771..d69fbf6c 100644 --- a/src/common/system/system.cpp +++ b/src/common/system/system.cpp @@ -190,28 +190,28 @@ std::string CSystemUtils::GetBasePath() std::string CSystemUtils::GetDataPath() { -#if DEV_BUILD - return std::string{"./"} + COLOBOT_DEFAULT_DATADIR; -#else +#ifdef USE_RELATIVE_PATHS return GetBasePath() + COLOBOT_DEFAULT_DATADIR; +#else + return COLOBOT_DEFAULT_DATADIR; #endif } std::string CSystemUtils::GetLangPath() { -#if DEV_BUILD - return std::string{"./"} + COLOBOT_I18N_DIR; -#else +#ifdef USE_RELATIVE_PATHS return GetBasePath() + COLOBOT_I18N_DIR; +#else + return COLOBOT_I18N_DIR; #endif } std::string CSystemUtils::GetSaveDir() { - return "./saves"; + return GetBasePath() + "saves"; } -std::string CSystemUtils::GetEnvVar(const std::string& str) +std::string CSystemUtils::GetEnvVar(const std::string& name) { - return std::string(); + return ""; } diff --git a/src/common/system/system.h b/src/common/system/system.h index 431ddd41..95901390 100644 --- a/src/common/system/system.h +++ b/src/common/system/system.h @@ -127,7 +127,7 @@ public: /** The difference is \a after - \a before. */ virtual long long TimeStampExactDiff(SystemTimeStamp *before, SystemTimeStamp *after) = 0; - //! Returns the path where the executable binary is located + //! Returns the path where the executable binary is located (ends with the path separator) virtual std::string GetBasePath(); //! Returns the data path (containing textures, levels, helpfiles, etc) @@ -139,8 +139,8 @@ public: //! Returns the save dir location virtual std::string GetSaveDir(); - //! Returns environment variable - virtual std::string GetEnvVar(const std::string &str); + //! Returns the environment variable with the given name or an empty string if it does not exist + virtual std::string GetEnvVar(const std::string &name); //! Sleep for given amount of microseconds virtual void Usleep(int usecs) = 0; diff --git a/src/common/system/system_linux.cpp b/src/common/system/system_linux.cpp index b71befe5..69551bce 100644 --- a/src/common/system/system_linux.cpp +++ b/src/common/system/system_linux.cpp @@ -102,23 +102,23 @@ std::string CSystemUtilsLinux::GetSaveDir() std::string savegameDir; // Determine savegame dir according to XDG Base Directory Specification - char *envXDG_DATA_HOME = getenv("XDG_DATA_HOME"); - if (envXDG_DATA_HOME == nullptr) + auto envXDG_DATA_HOME = GetEnvVar("XDG_DATA_HOME"); + if (envXDG_DATA_HOME.empty()) { - char *envHOME = getenv("HOME"); - if (envHOME == nullptr) + auto envHOME = GetEnvVar("HOME"); + if (envHOME.empty()) { - GetLogger()->Warn("Unable to find directory for saves - using current directory"); - savegameDir = "./saves"; + GetLogger()->Warn("Unable to find directory for saves - using default directory"); + savegameDir = CSystemUtils::GetSaveDir(); } else { - savegameDir = std::string(envHOME) + "/.local/share/colobot"; + savegameDir = envHOME + "/.local/share/colobot"; } } else { - savegameDir = std::string(envXDG_DATA_HOME) + "/colobot"; + savegameDir = envXDG_DATA_HOME + "/colobot"; } GetLogger()->Trace("Saved game files are going to %s\n", savegameDir.c_str()); @@ -131,7 +131,6 @@ std::string CSystemUtilsLinux::GetEnvVar(const std::string& name) char* envVar = getenv(name.c_str()); if (envVar != nullptr) { - GetLogger()->Trace("Detected environment variable %s = %s\n", name.c_str(), envVar); return std::string(envVar); } diff --git a/src/common/system/system_macosx.h b/src/common/system/system_macosx.h index 708d26fc..c8ea607a 100644 --- a/src/common/system/system_macosx.h +++ b/src/common/system/system_macosx.h @@ -36,7 +36,7 @@ public: std::string GetLangPath() override; std::string GetSaveDir() override; - std::string GetEnvVar(const std::string& str) override; + std::string GetEnvVar(const std::string& name) override; void Usleep(int usec) override; diff --git a/src/common/system/system_windows.cpp b/src/common/system/system_windows.cpp index 5254db83..9a8e6833 100644 --- a/src/common/system/system_windows.cpp +++ b/src/common/system/system_windows.cpp @@ -115,15 +115,15 @@ std::string CSystemUtilsWindows::GetSaveDir() #else std::string savegameDir; - wchar_t* envUSERPROFILE = _wgetenv(L"USERPROFILE"); - if (envUSERPROFILE == nullptr) + auto envUSERPROFILE = GetEnvVar("USERPROFILE"); + if (envUSERPROFILE.empty()) { - GetLogger()->Warn("Unable to find directory for saves - using current directory"); - savegameDir = "./saves"; + GetLogger()->Warn("Unable to find directory for saves - using default directory"); + savegameDir = CSystemUtils::GetSaveDir(); } else { - savegameDir = UTF8_Encode(std::wstring(envUSERPROFILE)) + "\\colobot"; + savegameDir = envUSERPROFILE + "\\colobot"; } GetLogger()->Trace("Saved game files are going to %s\n", savegameDir.c_str()); From 0597c0efda4b654cec04ef56947a10330062fa26 Mon Sep 17 00:00:00 2001 From: MrSimbax Date: Sun, 5 Apr 2020 14:11:08 +0200 Subject: [PATCH 191/207] Try to fix Jenkins build --- CMakeLists.txt | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 28b0c84f..63f1ace6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -394,12 +394,11 @@ endif() # Installation paths defined before compiling sources if(PORTABLE OR (PLATFORM_WINDOWS AND MXE)) - # We need to use STRING because PATH doesn't accept relative paths - set(COLOBOT_INSTALL_BIN_DIR ${CMAKE_INSTALL_PREFIX}/ CACHE STRING "Colobot binary directory") - set(COLOBOT_INSTALL_LIB_DIR ${CMAKE_INSTALL_PREFIX}/ CACHE STRING "Colobot libraries directory") - set(COLOBOT_INSTALL_DATA_DIR ${CMAKE_INSTALL_PREFIX}/data CACHE STRING "Colobot shared data directory") - set(COLOBOT_INSTALL_I18N_DIR ${CMAKE_INSTALL_PREFIX}/lang CACHE STRING "Colobot translations directory") - set(COLOBOT_INSTALL_DOC_DIR ${CMAKE_INSTALL_PREFIX}/doc CACHE STRING "Colobot documentation directory") + set(COLOBOT_INSTALL_BIN_DIR ${CMAKE_INSTALL_PREFIX}/ CACHE PATH "Colobot binary directory") + set(COLOBOT_INSTALL_LIB_DIR ${CMAKE_INSTALL_PREFIX}/ CACHE PATH "Colobot libraries directory") + set(COLOBOT_INSTALL_DATA_DIR ${CMAKE_INSTALL_PREFIX}/data CACHE PATH "Colobot shared data directory") + set(COLOBOT_INSTALL_I18N_DIR ${CMAKE_INSTALL_PREFIX}/lang CACHE PATH "Colobot translations directory") + set(COLOBOT_INSTALL_DOC_DIR ${CMAKE_INSTALL_PREFIX}/doc CACHE PATH "Colobot documentation directory") set(USE_RELATIVE_PATHS ON) elseif(PLATFORM_WINDOWS) set(COLOBOT_INSTALL_BIN_DIR ${CMAKE_INSTALL_PREFIX}/ CACHE PATH "Colobot binary directory") From c5e8df16e07d2586dd461458124e2f7ed158f957 Mon Sep 17 00:00:00 2001 From: MrSimbax Date: Sun, 5 Apr 2020 14:20:53 +0200 Subject: [PATCH 192/207] Try #2 to fix Jenkins build --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index 47dbd3c2..980e0b6c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -27,6 +27,7 @@ pipeline { dir('build/windows') { sh ''' # FIXME: without -lsetupapi linking sdl2 fails + rm -rf * /opt/mxe/usr/bin/i686-w64-mingw32.static-cmake \ -DCMAKE_CXX_STANDARD_LIBRARIES="-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 -lsetupapi" \ -DCMAKE_INSTALL_PREFIX=/install \ From 0c69dc8d30f1fdaabdb4b2ce5e99ac9703c8f8ff Mon Sep 17 00:00:00 2001 From: Fiftytwo Date: Sun, 5 Apr 2020 16:05:57 +0200 Subject: [PATCH 193/207] Make Ants and Spiders able to destroy TargetBot --- src/graphics/engine/particle.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/graphics/engine/particle.cpp b/src/graphics/engine/particle.cpp index f5c254e3..63fae501 100644 --- a/src/graphics/engine/particle.cpp +++ b/src/graphics/engine/particle.cpp @@ -67,7 +67,6 @@ bool IsAlien(ObjectType type) type == OBJECT_NEST || type == OBJECT_BULLET || type == OBJECT_EGG || - type == OBJECT_MOBILEtg || type == OBJECT_TEEN28 || type == OBJECT_TEEN31 ); } From ddab7606244a5c48ac030541e885447f28b419ab Mon Sep 17 00:00:00 2001 From: Fiftytwo Date: Tue, 7 Apr 2020 14:35:59 +0200 Subject: [PATCH 194/207] Add rollert.png to OldModelManager --- src/graphics/engine/oldmodelmanager.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/graphics/engine/oldmodelmanager.cpp b/src/graphics/engine/oldmodelmanager.cpp index b7d12e22..a7f65e3b 100644 --- a/src/graphics/engine/oldmodelmanager.cpp +++ b/src/graphics/engine/oldmodelmanager.cpp @@ -193,6 +193,7 @@ void COldModelManager::ChangeVariant(std::vector& triangles, int triangles[i].tex1Name == "factory.png" || triangles[i].tex1Name == "lemt.png" || triangles[i].tex1Name == "roller.png" || + triangles[i].tex1Name == "rollert.png" || triangles[i].tex1Name == "search.png" || triangles[i].tex1Name == "drawer.png" || triangles[i].tex1Name == "subm.png" ) From b925838a913a61a993acdeac1ea06caa8c10f09e Mon Sep 17 00:00:00 2001 From: MrSimbax Date: Tue, 7 Apr 2020 17:43:45 +0200 Subject: [PATCH 195/207] Try no. 3 to fix Jenkins --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index 980e0b6c..35f66489 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -54,6 +54,7 @@ pipeline { sh 'mkdir -p build/linux' dir('build/linux') { sh ''' + rm -rf * cmake \ -DCMAKE_INSTALL_PREFIX=/install -DCMAKE_SKIP_INSTALL_RPATH=ON \ -DCMAKE_BUILD_TYPE=RelWithDebInfo -DDEV_BUILD=1 -DPORTABLE=1 -DTOOLS=1 -DTESTS=1 -DDESKTOP=1 ../.. From 87fec23f4baae5533623a94caace0f13997ab979 Mon Sep 17 00:00:00 2001 From: MrSimbax Date: Tue, 7 Apr 2020 18:59:46 +0200 Subject: [PATCH 196/207] Fix 'class naming' linter issues --- src/CBot/CBotFileUtils.cpp | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/src/CBot/CBotFileUtils.cpp b/src/CBot/CBotFileUtils.cpp index b2a19cb1..e4245e0d 100644 --- a/src/CBot/CBotFileUtils.cpp +++ b/src/CBot/CBotFileUtils.cpp @@ -183,7 +183,12 @@ bool ReadLong(std::istream &istr, long &l) bool WriteFloat(std::ostream &ostr, float f) { - union {float fValue; unsigned int iValue;} u; + union TypeConverter { + float fValue; + unsigned int iValue; + }; + + TypeConverter u; u.fValue = 0.0f; u.iValue = 0; @@ -193,7 +198,12 @@ bool WriteFloat(std::ostream &ostr, float f) bool ReadFloat(std::istream &istr, float &f) { - union {float fValue; unsigned int iValue;} u; + union TypeConverter { + float fValue; + unsigned int iValue; + }; + + TypeConverter u; u.fValue = 0.0f; u.iValue = 0; @@ -204,7 +214,12 @@ bool ReadFloat(std::istream &istr, float &f) bool WriteDouble(std::ostream &ostr, double d) { - union {double dValue; unsigned long iValue;} u; + union TypeConverter { + double dValue; + unsigned long iValue; + }; + + TypeConverter u; u.dValue = 0.0; u.iValue = 0; @@ -214,7 +229,12 @@ bool WriteDouble(std::ostream &ostr, double d) bool ReadDouble(std::istream &istr, double &d) { - union {double dValue; unsigned long iValue;} u; + union TypeConverter { + double dValue; + unsigned long iValue; + }; + + TypeConverter u; u.dValue = 0.0; u.iValue = 0; From f09768fb2d5c64c61a422add6808f5994a856185 Mon Sep 17 00:00:00 2001 From: MrSimbax Date: Tue, 7 Apr 2020 19:13:30 +0200 Subject: [PATCH 197/207] Fix 'undefined function' linter issue --- src/CBot/CBotInstr/CBotExprLitNum.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CBot/CBotInstr/CBotExprLitNum.h b/src/CBot/CBotInstr/CBotExprLitNum.h index 8d7edcc1..f3fcaf89 100644 --- a/src/CBot/CBotInstr/CBotExprLitNum.h +++ b/src/CBot/CBotInstr/CBotExprLitNum.h @@ -38,7 +38,7 @@ class CBotExprLitNum : public CBotInstr { public: - CBotExprLitNum(T val); + CBotExprLitNum(T val) = delete; ~CBotExprLitNum(); /*! From ad33e0e6245247297ebf99adee14af1e9ee1f45c Mon Sep 17 00:00:00 2001 From: MrSimbax Date: Tue, 7 Apr 2020 20:05:32 +0200 Subject: [PATCH 198/207] Fix 'code block placement' linter issues --- src/CBot/CBotFileUtils.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/CBot/CBotFileUtils.cpp b/src/CBot/CBotFileUtils.cpp index e4245e0d..1abb23e5 100644 --- a/src/CBot/CBotFileUtils.cpp +++ b/src/CBot/CBotFileUtils.cpp @@ -183,7 +183,8 @@ bool ReadLong(std::istream &istr, long &l) bool WriteFloat(std::ostream &ostr, float f) { - union TypeConverter { + union TypeConverter + { float fValue; unsigned int iValue; }; @@ -198,7 +199,8 @@ bool WriteFloat(std::ostream &ostr, float f) bool ReadFloat(std::istream &istr, float &f) { - union TypeConverter { + union TypeConverter + { float fValue; unsigned int iValue; }; @@ -214,7 +216,8 @@ bool ReadFloat(std::istream &istr, float &f) bool WriteDouble(std::ostream &ostr, double d) { - union TypeConverter { + union TypeConverter + { double dValue; unsigned long iValue; }; @@ -229,7 +232,8 @@ bool WriteDouble(std::ostream &ostr, double d) bool ReadDouble(std::istream &istr, double &d) { - union TypeConverter { + union TypeConverter + { double dValue; unsigned long iValue; }; From 17ba464d336cc3ebc068102130f930b013be87ac Mon Sep 17 00:00:00 2001 From: MrSimbax Date: Tue, 7 Apr 2020 20:16:23 +0200 Subject: [PATCH 199/207] Fix so called ''compilation errors'' in linter --- src/CBot/CBotInstr/CBotExprLitNum.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/CBot/CBotInstr/CBotExprLitNum.h b/src/CBot/CBotInstr/CBotExprLitNum.h index f3fcaf89..954fdc84 100644 --- a/src/CBot/CBotInstr/CBotExprLitNum.h +++ b/src/CBot/CBotInstr/CBotExprLitNum.h @@ -38,7 +38,9 @@ class CBotExprLitNum : public CBotInstr { public: - CBotExprLitNum(T val) = delete; + // To keep linter happy, instead of = delete (see https://stackoverflow.com/a/37593094) + CBotExprLitNum(T val) { static_assert(sizeof(T) == 0, "Only specializations of CBotExprLitNum can be used"); }; + ~CBotExprLitNum(); /*! From 11e67cc61bae2b9f8a0a8e0b629a4bba55f5d663 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Zaj=C4=85czkowski?= Date: Wed, 6 May 2020 18:52:37 +0200 Subject: [PATCH 200/207] Add info about Fedora package to README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index c7d4a9a5..353dbbf5 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,7 @@ On some Linux distributions there are also distribution packages available: * Debian Sid (unstable): http://packages.debian.org/sid/colobot * Arch Linux (AUR): https://aur.archlinux.org/packages/colobot-gold * openSUSE: http://software.opensuse.org/download.html?project=games&package=colobot + * Fedora: https://src.fedoraproject.org/rpms/colobot ## Compiling and running the game From f3ae4b420932a44a8b06733e8caa53e88bad873a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Thu, 14 May 2020 10:35:01 +0200 Subject: [PATCH 201/207] Fix missing include Add missing include for std::numeric_limits. This fixes build failure after boost stopped implicitly including it for us. --- src/script/script.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/script/script.h b/src/script/script.h index bc64dc23..dd4e02ff 100644 --- a/src/script/script.h +++ b/src/script/script.h @@ -27,6 +27,7 @@ #include "CBot/CBot.h" #include +#include #include #include From 0f33dbe154c7aeb082fd01aae7ab1439dc59219f Mon Sep 17 00:00:00 2001 From: Fiftytwo Date: Thu, 14 May 2020 13:36:37 +0200 Subject: [PATCH 202/207] Add holder model for trainer Subber --- src/object/motion/motionvehicle.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/object/motion/motionvehicle.cpp b/src/object/motion/motionvehicle.cpp index c96c5ce7..a32afa70 100644 --- a/src/object/motion/motionvehicle.cpp +++ b/src/object/motion/motionvehicle.cpp @@ -858,6 +858,15 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, m_object->SetObjectParent(3, 1); modelManager->AddModelReference("subm3.mod", true, rank, m_object->GetTeam()); m_object->SetPartPosition(3, Math::Vector(0.5f, 0.0f, 1.5f)); + + if (m_object->GetTrainer()) + { + rank = m_engine->CreateObject(); + m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_DESCENDANT); + m_object->SetObjectRank(4, rank); + m_object->SetObjectParent(4, 0); + modelManager->AddModelReference("trainerg.mod", true, rank, m_object->GetTeam()); + } } if (type == OBJECT_MOBILEdr) From 7bd18f9c8e44b2b9544b0622608b88d047e67dbc Mon Sep 17 00:00:00 2001 From: Fiftytwo Date: Thu, 14 May 2020 15:46:45 +0200 Subject: [PATCH 203/207] Update colobot.pot --- po/colobot.pot | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/po/colobot.pot b/po/colobot.pot index 419b88e9..e478d448 100644 --- a/po/colobot.pot +++ b/po/colobot.pot @@ -810,6 +810,18 @@ msgstr "" msgid "Build a legged sniffer" msgstr "" +msgid "Build a winged builder" +msgstr "" + +msgid "Build a tracked builder" +msgstr "" + +msgid "Build a wheeled builder" +msgstr "" + +msgid "Build a legged builder" +msgstr "" + msgid "Build a thumper" msgstr "" @@ -825,6 +837,9 @@ msgstr "" msgid "Build a subber" msgstr "" +msgid "Build a target bot" +msgstr "" + msgid "Run research program for tracked bots" msgstr "" @@ -855,6 +870,12 @@ msgstr "" msgid "Run research program for orga shooter" msgstr "" +msgid "Run research program for builder" +msgstr "" + +msgid "Run research program for target bot" +msgstr "" + msgid "Return to start" msgstr "" @@ -870,6 +891,9 @@ msgstr "" msgid "Explode (\\key action;)" msgstr "" +msgid "Build (\\key action;)" +msgstr "" + msgid "Recycle (\\key action;)" msgstr "" @@ -1248,6 +1272,18 @@ msgstr "" msgid "Legged grabber" msgstr "" +msgid "Winged builder" +msgstr "" + +msgid "Tracked builder" +msgstr "" + +msgid "Wheeled builder" +msgstr "" + +msgid "Legged builder" +msgstr "" + msgid "Winged shooter" msgstr "" @@ -1464,7 +1500,7 @@ msgstr "" msgid "Nothing to analyze" msgstr "" -msgid "Analyzes only organic matter" +msgid "Inappropriate sample" msgstr "" msgid "Analysis already performed" @@ -1563,6 +1599,9 @@ msgstr "" msgid "Plans for nuclear power plant available" msgstr "" +msgid "Plans for builder available" +msgstr "" + msgid "New bot available" msgstr "" From bbf935662833c4dfd7c52a3cbdd6604ac9e1a362 Mon Sep 17 00:00:00 2001 From: Fiftytwo Date: Fri, 15 May 2020 19:26:03 +0200 Subject: [PATCH 204/207] Fix colobot-lint error --- src/object/task/taskbuild.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/object/task/taskbuild.cpp b/src/object/task/taskbuild.cpp index f5a3dd68..a1a69cd8 100644 --- a/src/object/task/taskbuild.cpp +++ b/src/object/task/taskbuild.cpp @@ -414,7 +414,7 @@ Error CTaskBuild::Start(ObjectType type) pv = m_object->GetPosition(); pm = m_metal->GetPosition(); - if(!m_physics->GetLand() && abs(pm.y-pv.y)>8.0f) return ERR_BUILD_METALAWAY; + if(!m_physics->GetLand() && fabs(pm.y-pv.y)>8.0f) return ERR_BUILD_METALAWAY; m_metal->SetLock(true); // not usable m_camera->StartCentering(m_object, Math::PI*0.15f, 99.9f, 0.0f, 1.0f); From 7f9efea0a2bcbdaa2740709d7cff76c2d517003e Mon Sep 17 00:00:00 2001 From: Fiftytwo Date: Fri, 15 May 2020 20:29:48 +0200 Subject: [PATCH 205/207] Remove unnecessary whitespaces --- src/common/event.cpp | 2 +- src/common/event.h | 2 +- src/graphics/engine/pyro.cpp | 2 +- src/object/auto/autofactory.cpp | 6 +++--- src/object/auto/autolabo.cpp | 2 +- src/object/auto/autoresearch.cpp | 2 +- src/object/drive_type.cpp | 4 ++-- src/object/motion/motionvehicle.cpp | 16 ++++++++-------- src/object/task/taskbuild.cpp | 4 ++-- src/object/tool_type.cpp | 4 ++-- src/script/scriptfunc.cpp | 18 +++++++++--------- src/ui/object_interface.cpp | 16 ++++++++-------- src/ui/object_interface.h | 2 +- 13 files changed, 40 insertions(+), 40 deletions(-) diff --git a/src/common/event.cpp b/src/common/event.cpp index 108a7fea..c405f4bc 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -528,7 +528,7 @@ void InitializeEventTypeTexts() EVENT_TYPE_TEXT[EVENT_CODE_BATTLE_START] = "EVENT_CODE_BATTLE_START"; EVENT_TYPE_TEXT[EVENT_CODE_BATTLE_SPECTATOR] = "EVENT_CODE_BATTLE_SPECTATOR"; - + EVENT_TYPE_TEXT[EVENT_OBJECT_RBUILDER] = "EVENT_OBJECT_RBUILDER"; EVENT_TYPE_TEXT[EVENT_OBJECT_BUILD] = "EVENT_OBJECT_BUILD"; EVENT_TYPE_TEXT[EVENT_OBJECT_RTARGET] = "EVENT_OBJECT_RTARGET"; diff --git a/src/common/event.h b/src/common/event.h index 440ad94a..fe92bf05 100644 --- a/src/common/event.h +++ b/src/common/event.h @@ -599,7 +599,7 @@ enum EventType EVENT_CODE_BATTLE_START = 2200, //!< button that starts the code battle EVENT_CODE_BATTLE_SPECTATOR = 2201, //!< button that controls the code battle spectator camera - + EVENT_OBJECT_RBUILDER = 2300, EVENT_OBJECT_BUILD = 2301, EVENT_OBJECT_RTARGET = 2302, diff --git a/src/graphics/engine/pyro.cpp b/src/graphics/engine/pyro.cpp index 2cafa23c..a43c2c52 100644 --- a/src/graphics/engine/pyro.cpp +++ b/src/graphics/engine/pyro.cpp @@ -1939,7 +1939,7 @@ void CPyro::BurnStart() angle.z = -25.0f*Math::PI/180.0f; BurnAddPart(1, pos, angle); // down the insect-cannon } - + if ( m_burnType == OBJECT_MOBILEfb || m_burnType == OBJECT_MOBILEtb || m_burnType == OBJECT_MOBILEwb || diff --git a/src/object/auto/autofactory.cpp b/src/object/auto/autofactory.cpp index 00695b07..867626ce 100644 --- a/src/object/auto/autofactory.cpp +++ b/src/object/auto/autofactory.cpp @@ -723,7 +723,7 @@ bool CAutoFactory::CreateInterface(bool bSelect) pw = static_cast< Ui::CWindow* >(m_interface->SearchControl(EVENT_WINDOW0)); if ( pw == nullptr ) return false; - + dim.x = 33.0f/640.0f; dim.y = 33.0f/480.0f; ox = 3.0f/640.0f; @@ -777,7 +777,7 @@ bool CAutoFactory::CreateInterface(bool bSelect) pw->CreateButton(pos, dim, 128+27, EVENT_OBJECT_FACTORYfi); pos.x += dim.x; pw->CreateButton(pos, dim, 128+28, EVENT_OBJECT_FACTORYii); - + pos.x = ox+sx*0.0f; pos.y = oy+sy*4.9f; pw->CreateButton(pos, dim, 192+0, EVENT_OBJECT_FACTORYwb); @@ -804,7 +804,7 @@ bool CAutoFactory::CreateInterface(bool bSelect) pos.x += dim.x; pw->CreateButton(pos, dim, 128+45, EVENT_OBJECT_FACTORYtg); } - + pos.x = ox+sx*0.0f; pos.y = oy+sy*0; ddim.x = 66.0f/640.0f; diff --git a/src/object/auto/autolabo.cpp b/src/object/auto/autolabo.cpp index 1e88252e..a766aca9 100644 --- a/src/object/auto/autolabo.cpp +++ b/src/object/auto/autolabo.cpp @@ -492,7 +492,7 @@ bool CAutoLabo::CreateInterface(bool bSelect) pos.x = ox+sx*6.0f; pos.y = oy+sy*0.5f; pw->CreateButton(pos, dim, 192+8, EVENT_OBJECT_RTARGET); - + pos.x = ox+sx*7.0f; pos.y = oy+sy*0.5f; pw->CreateButton(pos, dim, 64+45, EVENT_OBJECT_RiPAW); diff --git a/src/object/auto/autoresearch.cpp b/src/object/auto/autoresearch.cpp index ca0acf99..16b8beee 100644 --- a/src/object/auto/autoresearch.cpp +++ b/src/object/auto/autoresearch.cpp @@ -379,7 +379,7 @@ bool CAutoResearch::CreateInterface(bool bSelect) pos.y = oy+sy*0.5f; pw->CreateButton(pos, dim, 192+4, EVENT_OBJECT_RBUILDER); } - + pos.x = ox+sx*14.5f; pos.y = oy+sy*0; ddim.x = 14.0f/640.0f; diff --git a/src/object/drive_type.cpp b/src/object/drive_type.cpp index 373b04f5..5b2e5229 100644 --- a/src/object/drive_type.cpp +++ b/src/object/drive_type.cpp @@ -61,9 +61,9 @@ DriveType GetDriveFromObject(ObjectType type) case OBJECT_MOBILErr: case OBJECT_MOBILErs: return DriveType::Heavy; - + case OBJECT_MOBILEsa: - return DriveType::Amphibious; + return DriveType::Amphibious; default: return DriveType::Other; diff --git a/src/object/motion/motionvehicle.cpp b/src/object/motion/motionvehicle.cpp index cfe5c132..b34f5be2 100644 --- a/src/object/motion/motionvehicle.cpp +++ b/src/object/motion/motionvehicle.cpp @@ -120,7 +120,7 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, { modelManager->AddModelReference("trainer.mod", false, rank, m_object->GetTeam()); } - + if (type == OBJECT_MOBILEfa || type == OBJECT_MOBILEfb || type == OBJECT_MOBILEfc || @@ -136,7 +136,7 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, m_object->SetObjectRank(28, rank); m_object->SetObjectParent(28, 0); modelManager->AddModelReference("trainerf.mod", false, rank, m_object->GetTeam()); - + rank = m_engine->CreateObject(); m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_DESCENDANT); m_object->SetObjectRank(29, rank); @@ -149,7 +149,7 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, type == OBJECT_MOBILEtc || type == OBJECT_MOBILEti || type == OBJECT_MOBILEts) - { + { if (!m_object->GetTrainer()) modelManager->AddModelReference("lem1t.mod", false, rank, m_object->GetTeam()); else @@ -159,7 +159,7 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, m_object->SetObjectRank(28, rank); m_object->SetObjectParent(28, 0); modelManager->AddModelReference("trainert.mod", false, rank, m_object->GetTeam()); - + rank = m_engine->CreateObject(); m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_DESCENDANT); m_object->SetObjectRank(29, rank); @@ -182,7 +182,7 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, m_object->SetObjectRank(28, rank); m_object->SetObjectParent(28, 0); modelManager->AddModelReference("trainerw.mod", false, rank, m_object->GetTeam()); - + rank = m_engine->CreateObject(); m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_DESCENDANT); m_object->SetObjectRank(29, rank); @@ -205,7 +205,7 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, m_object->SetObjectRank(28, rank); m_object->SetObjectParent(28, 0); modelManager->AddModelReference("traineri.mod", false, rank, m_object->GetTeam()); - + rank = m_engine->CreateObject(); m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_DESCENDANT); m_object->SetObjectRank(29, rank); @@ -213,7 +213,7 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, modelManager->AddModelReference("trainera.mod", false, rank, m_object->GetTeam()); } } - else if (!m_object->GetTrainer() && + else if (!m_object->GetTrainer() && (type == OBJECT_MOBILErt || type == OBJECT_MOBILErc || type == OBJECT_MOBILErr || @@ -428,7 +428,7 @@ void CMotionVehicle::Create(Math::Vector pos, float angle, ObjectType type, m_object->SetPartPosition(2, Math::Vector(0.0f, 2.5f, 0.0f)); m_object->SetPartRotationZ(2, 0.0f); } - + if (type == OBJECT_MOBILEfb || type == OBJECT_MOBILEtb || type == OBJECT_MOBILEwb || diff --git a/src/object/task/taskbuild.cpp b/src/object/task/taskbuild.cpp index a1a69cd8..d9b6da83 100644 --- a/src/object/task/taskbuild.cpp +++ b/src/object/task/taskbuild.cpp @@ -356,7 +356,7 @@ bool CTaskBuild::EventProcess(const Event &event) m_sound->Play(SOUND_BUILD, m_object->GetPosition(), 0.5f, 1.0f*Math::Rand()*1.5f); } } - + if(m_object->GetType() == OBJECT_MOBILEfb && m_object->GetReactorRange()<0.2f && m_phase != TBP_MOVE) { pv = m_object->GetPosition(); @@ -415,7 +415,7 @@ Error CTaskBuild::Start(ObjectType type) pv = m_object->GetPosition(); pm = m_metal->GetPosition(); if(!m_physics->GetLand() && fabs(pm.y-pv.y)>8.0f) return ERR_BUILD_METALAWAY; - + m_metal->SetLock(true); // not usable m_camera->StartCentering(m_object, Math::PI*0.15f, 99.9f, 0.0f, 1.0f); diff --git a/src/object/tool_type.cpp b/src/object/tool_type.cpp index 92a181cb..b10cfc5f 100644 --- a/src/object/tool_type.cpp +++ b/src/object/tool_type.cpp @@ -46,12 +46,12 @@ ToolType GetToolFromObject(ObjectType type) case OBJECT_MOBILEfi: case OBJECT_MOBILEii: return ToolType::OrganicShooter; - + case OBJECT_MOBILEwb: case OBJECT_MOBILEtb: case OBJECT_MOBILEfb: case OBJECT_MOBILEib: - return ToolType::Builder; + return ToolType::Builder; default: return ToolType::Other; diff --git a/src/script/scriptfunc.cpp b/src/script/scriptfunc.cpp index 907f6743..661a4946 100644 --- a/src/script/scriptfunc.cpp +++ b/src/script/scriptfunc.cpp @@ -367,7 +367,7 @@ bool CScriptFunctions::rIsBusy(CBotVar* var, CBotVar* result, int& exception, vo result->SetValInt(ERR_WRONG_OBJ); return false; } - + CAuto* automat = obj->GetAuto(); if ( pThis->GetTeam() != obj->GetTeam() && obj->GetTeam() != 0 ) @@ -400,7 +400,7 @@ bool CScriptFunctions::rDestroy(CBotVar* var, CBotVar* result, int& exception, v result->SetValInt(ERR_WRONG_OBJ); return false; } - + CAuto* automat = obj->GetAuto(); if ( pThis->GetTeam() != obj->GetTeam() && obj->GetTeam() != 0 ) @@ -463,7 +463,7 @@ bool CScriptFunctions::rFactory(CBotVar* var, CBotVar* result, int& exception, v ObjectType type = static_cast(var->GetValInt()); var = var->GetNext(); - + std::string program; if ( var != nullptr ) { @@ -472,13 +472,13 @@ bool CScriptFunctions::rFactory(CBotVar* var, CBotVar* result, int& exception, v } else program = ""; - + CObject* factory; if (var == nullptr) factory = CObjectManager::GetInstancePointer()->FindNearest(pThis, OBJECT_FACTORY); else factory = static_cast(var->GetUserPtr()); - + if (factory == nullptr) { exception = ERR_WRONG_OBJ; @@ -562,20 +562,20 @@ bool CScriptFunctions::rResearch(CBotVar* var, CBotVar* result, int& exception, ResearchType type = static_cast(var->GetValInt()); var = var->GetNext(); - + CObject* center; if (var == nullptr) center = CObjectManager::GetInstancePointer()->FindNearest(pThis, OBJECT_RESEARCH); else center = static_cast(var->GetUserPtr()); - + if (center == nullptr) { exception = ERR_WRONG_OBJ; result->SetValInt(ERR_WRONG_OBJ); return false; } - + CAuto* automat = center->GetAuto(); if ( pThis->GetTeam() != center->GetTeam() && center->GetTeam() != 0 ) @@ -654,7 +654,7 @@ bool CScriptFunctions::rTakeOff(CBotVar* var, CBotVar* result, int& exception, v result->SetValInt(ERR_WRONG_OBJ); return false; } - + CAuto* automat = base->GetAuto(); if ( pThis->GetTeam() != base->GetTeam() && base->GetTeam() != 0 ) diff --git a/src/ui/object_interface.cpp b/src/ui/object_interface.cpp index 2b10b306..584b57a1 100644 --- a/src/ui/object_interface.cpp +++ b/src/ui/object_interface.cpp @@ -100,7 +100,7 @@ CObjectInterface::CObjectInterface(COldObject* object) m_manipStyle = EVENT_OBJECT_MFRONT; m_selScript = 0; - + m_buildInterface = false; } @@ -622,7 +622,7 @@ bool CObjectInterface::EventProcess(const Event &event) { err = m_taskExecutor->StartTaskSpiderExplo(); } - + if ( action == EVENT_OBJECT_BUILD ) { m_buildInterface = !m_buildInterface; @@ -1430,13 +1430,13 @@ bool CObjectInterface::CreateInterface(bool bSelect) pb = pw->CreateButton(pos, dim, 192+4, EVENT_OBJECT_BUILD); pb->SetImmediat(true); DefaultEnter(pw, EVENT_OBJECT_BUILD); - + pos.x = 0.0f; pos.y = oy+sy*2.6f; ddim.x = 214.5f/640.0f; ddim.y = 66.0f/480.0f; pw->CreateGroup(pos, ddim, 6, EVENT_WINDOW3); - + ddim.x = dim.x*0.9f; ddim.y = dim.y*0.9f; pos.y = oy+sy*3.6f; @@ -1468,7 +1468,7 @@ bool CObjectInterface::CreateInterface(bool bSelect) pos.x = ox+sx*5.4f; pw->CreateButton(pos, ddim, 128+44, EVENT_OBJECT_BINFO); DeadInterface(pw, EVENT_OBJECT_BINFO, m_main->CanBuild(OBJECT_INFO, m_object->GetTeam())); - + pos.y = oy+sy*2.7f; pos.x = ox+sx*0.0f; @@ -1498,7 +1498,7 @@ bool CObjectInterface::CreateInterface(bool bSelect) pos.x = ox+sx*5.4f; pw->CreateButton(pos, ddim, 128+41, EVENT_OBJECT_BDESTROYER); DeadInterface(pw, EVENT_OBJECT_BDESTROYER, m_main->CanBuild(OBJECT_DESTROYER, m_object->GetTeam())); - + } UpdateInterface(); m_lastUpdateTime = 0.0f; @@ -1829,7 +1829,7 @@ void CObjectInterface::UpdateInterface() ps->SetVisibleValue((RADIUS_SHIELD_MIN/g_unit)+dynamic_cast(m_object)->GetShieldRadius()*((RADIUS_SHIELD_MAX-RADIUS_SHIELD_MIN)/g_unit)); } } - + if ( (type == OBJECT_MOBILEfb || type == OBJECT_MOBILEtb || type == OBJECT_MOBILEwb || @@ -1841,7 +1841,7 @@ void CObjectInterface::UpdateInterface() pb = static_cast< CButton* >(pw->SearchControl(EVENT_WINDOW3)); pb->SetState(STATE_VISIBLE, m_buildInterface); - + pb = static_cast< CButton* >(pw->SearchControl(EVENT_OBJECT_BFACTORY)); pb->SetState(STATE_VISIBLE, m_buildInterface); pb = static_cast< CButton* >(pw->SearchControl(EVENT_OBJECT_BDERRICK)); diff --git a/src/ui/object_interface.h b/src/ui/object_interface.h index e3df7cbb..184c95ce 100644 --- a/src/ui/object_interface.h +++ b/src/ui/object_interface.h @@ -120,7 +120,7 @@ protected: float m_lastAlarmTime; int m_soundChannelAlarm; int m_flagColor; - + bool m_buildInterface; }; From 373d8de7d0c15f941e436a56330cb66df10d66d7 Mon Sep 17 00:00:00 2001 From: Fiftytwo Date: Sat, 13 Jun 2020 16:08:06 +0200 Subject: [PATCH 206/207] Make burning and destroyed objects physical --- src/graphics/engine/pyro.cpp | 1 + src/physics/physics.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/graphics/engine/pyro.cpp b/src/graphics/engine/pyro.cpp index a43c2c52..2813db56 100644 --- a/src/graphics/engine/pyro.cpp +++ b/src/graphics/engine/pyro.cpp @@ -2243,6 +2243,7 @@ void CPyro::BurnTerminate() { m_object->SetType(OBJECT_RUINmobilew1); // Wreck (recoverable by Recycler) } + dynamic_cast(m_object)->SetDying(DeathType::Alive); m_object->SetLock(false); } diff --git a/src/physics/physics.cpp b/src/physics/physics.cpp index c784bb80..753881cf 100644 --- a/src/physics/physics.cpp +++ b/src/physics/physics.cpp @@ -2525,7 +2525,7 @@ int CPhysics::ObjectAdapt(const Math::Vector &pos, const Math::Vector &angle) { if ( pObj == m_object ) continue; // yourself? if (IsObjectBeingTransported(pObj)) continue; - if ( pObj->Implements(ObjectInterfaceType::Destroyable) && dynamic_cast(pObj)->IsDying() ) continue; // is burning or exploding? + //if ( pObj->Implements(ObjectInterfaceType::Destroyable) && dynamic_cast(pObj)->IsDying() ) continue; // is burning or exploding? oType = pObj->GetType(); if ( oType == OBJECT_TOTO ) continue; From 6d584ba481b69372ff5d295f7e3d36989406a751 Mon Sep 17 00:00:00 2001 From: Fiftytwo Date: Tue, 16 Jun 2020 18:54:35 +0200 Subject: [PATCH 207/207] Update data submodule --- data | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data b/data index c467bd99..d1c52c9c 160000 --- a/data +++ b/data @@ -1 +1 @@ -Subproject commit c467bd994e60fb54cf977fbe8583f92957330695 +Subproject commit d1c52c9cdb763ed127e89e51b0c921f85d8760b6