Browse Source

new approach

Laserlicht 2 years ago
parent
commit
1c68937d95

+ 0 - 86
AUTHORS

@@ -1,86 +0,0 @@
-VCMI PROJECT CODE CONTRIBUTORS:
-
-Michał Urbańczyk aka Tow,        <[email protected]>
-   * project originator; programming, making releases, website
-maintenance, reverse engineering, general support.
-
-Mateusz B. aka Tow dragon,                <[email protected]>
-   * general support, battle support, support for many Heroes 3 config files, reverse engineering, ERM/VERM parser and interpreter
-
-Stefan Pavlov aka Ste,            <[email protected]>
-   * minor fixes in pregame
-
-Yifeng Sun aka phoebus118,        <[email protected]>
-   * a part of .snd handling, minor fixes and updates
-
-Andrea Palmate aka afxgroup,        <[email protected]>
-   * GCC/AmigaOS4 compatibility updates and makefile
-
-Vadim Glazunov aka neweagle,        <[email protected]>
-   * minor GCC/Linux compatibility changes
-
-Rafal R. aka ambtrip,            <[email protected]>
-   * GeniusAI (battles)
-
-Lukasz Wychrystenko aka tezeriusz,    <[email protected]>
-   * minor GCC/Linux compatibility changes, code review
-
-Xiaomin Ding,                <[email protected]>
-   * smack videos player
-
-Tom Zielinski aka Warmonger, 	<[email protected]>
-   * game objects, mechanics
-
-Frank Zago aka ubuntux,				<>
-   * GCC/Linux compatibility changes, sound/music support, video support on Linux
-   
-Trevor Standley aka tstandley,		<>
-   * adventure map part of Genius AI
-
-Rickard Westerlund aka Onion Knight, 	<[email protected]>
-   * battle functionality and general support
-
-Ivan Savenko,				<[email protected]>
-   * GCC/Linux support, client development, general support
-   
-Benjamin Gentner aka beegee,		<>
-   * battle support, programming
-
-Alexey aka Macron1Robot,                 <>
-   * minor modding changes
-
-Alexander Shishkin aka alexvins,
-   * MinGW platform support, modding related programming
-
-Arseniy Shestakov aka SXX,      <[email protected]>
-   * pathfinding improvements, programming
-
-Vadim Markovtsev, <[email protected]>
-   * resolving problems with macOS, bug fixes
-
-Michał Kalinowski, <[email protected]>
-   * refactoring code
-
-Dydzio, <[email protected]>
-   * Small features, improvements and bug fixes in all VCMI parts
-
-Piotr Wójcik aka Chocimier, <[email protected]>
-   * Various bug fixes
-
-Henning Koehler, <[email protected]>
-   * skill modding, bonus updaters
-
-Andrzej Żak aka godric3
-   * minor bug fixes and modding features
-   
-Andrii Danylchenko
-   * Nullkiller AI, VCAI improvements
-
-Dmitry Orlov, <[email protected]>
-   * special buildings support in fan towns, new features and bug fixes
-
-Andrey Cherkas aka nordsoft, <[email protected]>
-   * new terrain support, rmg features, map editor, multiplayer improvements, bug fixes
-
-Andrey Filipenkov aka kambala-decapitator, <[email protected]>
-   * iOS support, macOS improvements, various bug fixes

+ 46 - 0
AUTHORS.h

@@ -0,0 +1,46 @@
+/*
+ * AUTHORS.h, part of VCMI engine
+ *
+ * Authors: listed in file AUTHORS in main folder
+ *
+ * License: GNU General Public License v2.0 or later
+ * Full text of license available in license.txt file, in main folder
+ *
+ */
+#pragma once
+
+//VCMI PROJECT CODE CONTRIBUTORS:
+std::vector<std::vector<std::string>> contributors = {
+//   Task          Name                    Aka                      E-Mail
+   { "Developing", "Michał Urbańczyk",     "Tow",                   "[email protected]"             },
+   { "Developing", "Mateusz B.",           "Tow dragon",            "[email protected]"            },
+   { "Developing", "Stefan Pavlov",        "Ste",                   "[email protected]"            },
+   { "Developing", "Yifeng Sun",           "phoebus118",            "[email protected]"       },
+   { "Developing", "Andrea Palmate",       "afxgroup",              "[email protected]"         },
+   { "Developing", "Vadim Glazunov",       "neweagle",              "[email protected]"           },
+   { "Developing", "Rafal R.",             "ambtrip",               "[email protected]"                },
+   { "Developing", "Lukasz Wychrystenko",  "tezeriusz",             "[email protected]"         },
+   { "Developing", "Xiaomin Ding",         "",                      "[email protected]"        },
+   { "Developing", "Tom Zielinski",        "Warmonger",             "[email protected]"              },
+   { "Developing", "Frank Zago",           "ubuntux",               ""                             },
+   { "Developing", "Trevor Standley",      "tstandley",             ""                             },
+   { "Developing", "Rickard Westerlund",   "Onion Knight",          "[email protected]"         },
+   { "Developing", "Ivan Savenko",         "",                      "[email protected]"         },
+   { "Developing", "Benjamin Gentner",     "beegee",                ""                             },
+   { "Developing", "Alexey ",              "Macron1Robot",          ""                             },
+   { "Developing", "Alexander Shishkin",   "alexvins",              ""                             },
+   { "Developing", "Arseniy Shestakov",    "SXX",                   "[email protected]"      },
+   { "Developing", "Vadim Markovtsev",     "",                      "[email protected]"           },
+   { "Developing", "Michał Kalinowski",    "",                      "[email protected]"            },
+   { "Developing", "",                     "Dydzio",                "[email protected]"           },
+   { "Developing", "Piotr Wójcik",         "Chocimier",             "[email protected]"            },
+   { "Developing", "Henning Koehler",      "",                      "[email protected]" },
+   { "Developing", "Andrzej Żak",          "godric3",               ""                             },
+   { "Developing", "Andrii Danylchenko",   "",                      ""                             },
+   { "Developing", "Dmitry Orlov",         "",                      "[email protected]" },
+   { "Developing", "Andrey Cherkas",       "nordsoft",              "[email protected]"           },
+   { "Developing", "",                     "kambala-decapitator",   "[email protected]"          },
+   { "Developing", "",                     "Laserlicht",            ""                             },
+   { "Testing",    "",                     "Povelitel",             ""                             },
+   { "Testing",    "",                     "Misiokles",             ""                             },
+};

+ 14 - 1
client/mainmenu/CreditsScreen.cpp

@@ -19,6 +19,8 @@
 
 #include "../../lib/filesystem/Filesystem.h"
 
+#include "../../AUTHORS.h"
+
 CreditsScreen::CreditsScreen(Rect rect)
 	: CIntObject(LCLICK), positionCounter(0)
 {
@@ -26,11 +28,22 @@ CreditsScreen::CreditsScreen(Rect rect)
 	pos.h = rect.h;
 	setRedrawParent(true);
 	OBJ_CONSTRUCTION_CAPTURING_ALL_NO_DISPOSE;
+
+	std::string contributorsText = "";
+	std::string contributorsTask = "";
+	for (auto & element : contributors) 
+	{
+		if(element[0] != contributorsTask)
+			contributorsText += "\r\n{" + element[0] + ":}\r\n";
+		contributorsText += (element[2] != "" ? element[2] : element[1]) + "\r\n";
+		contributorsTask = element[0];
+	}
+
 	auto textFile = CResourceHandler::get()->load(ResourcePath("DATA/CREDITS.TXT"))->readAll();
 	std::string text((char *)textFile.first.get(), textFile.second);
 	size_t firstQuote = text.find('\"') + 1;
 	text = text.substr(firstQuote, text.find('\"', firstQuote) - firstQuote);
-	text = "{- VCMI -}\r\n\r\n{Contributors:}\r\n" + boost::algorithm::join(contributors, "\r\n") + "\r\n\r\n{Website:}\r\nhttps://vcmi.eu\r\n\r\n\r\n\r\n\r\n{- Heroes of Might and Magic III -}\r\n\r\n" + text;
+	text = "{- VCMI -}\r\n\r\n" + contributorsText + "\r\n\r\n{Website:}\r\nhttps://vcmi.eu\r\n\r\n\r\n\r\n\r\n{- Heroes of Might and Magic III -}\r\n\r\n" + text;
 	credits = std::make_shared<CMultiLineLabel>(Rect(pos.w - 350, 0, 350, 600), FONT_CREDITS, ETextAlignment::CENTER, Colors::WHITE, text);
 	credits->scrollTextTo(-600); // move all text below the screen
 }

+ 0 - 3
client/mainmenu/CreditsScreen.h

@@ -18,9 +18,6 @@ class CreditsScreen : public CIntObject
 	int positionCounter;
 	std::shared_ptr<CMultiLineLabel> credits;
 
-	// update contributors with bash:   curl -s "https://api.github.com/repos/vcmi/vcmi/contributors" | jq '.[].login' | tr '\n' '|' | sed 's/|/, /g' | sed 's/..$//'
-	std::vector<std::string> contributors = { "IvanSavenko", "alexvins", "mwu-tow", "Nordsoft91", "mateuszbaran", "ArseniyShestakov", "nullkiller", "dydzio0614", "kambala-decapitator", "rilian-la-te", "DjWarmonger", "Laserlicht", "beegee1", "henningkoehlernz", "SoundSSGood", "vmarkovtsev", "krs0", "Mixaill", "Fayth", "ShubusCorporation", "rwesterlund", "Macron1Robot", "Chocimier", "Zyx-2000", "bwrsandman", "stopiccot", "viciious", "karol57", "heroesiiifan", "Adriankhl" };
-
 public:
 	CreditsScreen(Rect rect);
 	void show(Canvas & to) override;

+ 1 - 0
cmake_modules/VCMI_lib.cmake

@@ -281,6 +281,7 @@ macro(add_main_lib TARGET_NAME LIBRARY_TYPE)
 	set(lib_HEADERS
 		${MAIN_LIB_DIR}/../include/vstd/CLoggerBase.h
 		${MAIN_LIB_DIR}/../Global.h
+		${MAIN_LIB_DIR}/../AUTHORS.h
 		${MAIN_LIB_DIR}/StdInc.h
 
 		${MAIN_LIB_DIR}/../include/vstd/ContainerUtils.h

+ 1 - 0
lib/VCMI_lib.cbp

@@ -127,6 +127,7 @@
 		</Linker>
 		<Unit filename="../CMakeLists.txt" />
 		<Unit filename="../Global.h" />
+		<Unit filename="../AUTHORS.h" />
 		<Unit filename="../Version.h" />
 		<Unit filename="../include/vcmi/Artifact.h" />
 		<Unit filename="../include/vcmi/ArtifactService.h" />

+ 1 - 0
lib/VCMI_lib.vcxproj

@@ -325,6 +325,7 @@
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="..\Global.h" />
+    <ClInclude Include="..\AUTHORS.h" />
     <ClInclude Include="..\Version.h" />
     <ClInclude Include="AI_Base.h" />
     <ClInclude Include="battle\BattleAction.h" />

+ 3 - 0
lib/VCMI_lib.vcxproj.filters

@@ -470,6 +470,9 @@
     <ClInclude Include="..\Global.h">
       <Filter>Header Files</Filter>
     </ClInclude>
+    <ClInclude Include="..\AUTHORS.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
     <ClInclude Include="AI_Base.h">
       <Filter>Header Files</Filter>
     </ClInclude>