]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/credits.qc
Allow closing the Welcome dialog by clicking anywhere outside of it
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / credits.qc
index 7d1f2c47ae798111c335e5d1c62242e4d2c99a2d..4ec6c08267aff96fc4c4ae8329a0c7fc54a2bc6e 100644 (file)
@@ -6,43 +6,27 @@
                PERSON(Ant "Antibody" Zucaro) \
                PERSON(Marvin "Mirio" Beck) \
                PERSON(Merlijn Hofstra) \
-               PERSON(Peter "Morphed" Pielak) \
                PERSON(Ruszkai "CuBe0wL" Ákos) \
-               PERSON(Samual "Ares" Lenks) \
-               PERSON(TimePath) \
                PERSON(Tyler "-z-" Mulligan) \
                PERSON(Zac "Mario" Jardine) \
        NL() \
        TITLE(_("Extended Team")) \
-               PERSON(AllieWay) \
                PERSON(Antonio "terencehill" Piu) \
-               PERSON(Archer) \
-               PERSON(BuddyFriendGuy) \
-               PERSON(Debugger) \
-               PERSON(Diomedes) \
+               PERSON(bones_was_here) \
+               PERSON(David "Cloudwalk" Knapp) \
                PERSON(Freddy) \
-               PERSON(GATTS) \
                PERSON(Halogene) \
-               PERSON(IDWMaster) \
                PERSON(Jan "zykure" Behrens) \
-               PERSON(JH0nny) \
-               PERSON(Jubilant) \
-               PERSON(Łukasz "kuniu the frogg" Polek) \
-               PERSON(martin-t) \
-               PERSON(Matthias "matthiaskrgr" Krüger) \
-               PERSON(Mattia "Melanosuchus" Basaglia) \
+               PERSON(Morosophos) \
                PERSON(MrBougo) \
-               PERSON(Nick "bitbomb" Lucca) \
                PERSON(nilyt/nyov) \
                PERSON(Nitroxis) \
                PERSON(packer) \
-               PERSON(Pearce "theShadow" Michal) \
-               PERSON(Rasmus "FruitieX" Eskola) \
-               PERSON(s1lence) \
                PERSON(Severin "sev" Meyer) \
-               PERSON(Soelen) \
-               PERSON(Sydes) \
-               PERSON(unfa) \
+               PERSON(SpiKe) \
+               PERSON(Thomas "illwieckz" Debesse) \
+               PERSON(Victor "LegendGuard" Jaume) \
+               PERSON(z411) \
        NL() \
        NL() \
        FUNCTION(_("Website")) \
@@ -60,6 +44,7 @@
                PERSON(Peter "Morphed" Pielak) \
                PERSON(Sam "LJFHutch" Hutchinson) \
                PERSON(Pearce "theShadow" Michal) \
+               PERSON(KingPimpCommander) \
        NL() \
        FUNCTION(_("Animation")) \
                PERSON(Sahil "DiaboliK" Singhal) \
@@ -93,6 +78,7 @@
                PERSON(blkrbt) \
                PERSON(chooksta) \
                PERSON(Independent.nu) \
+               PERSON(Lea "TheAudioMonkey" Edwards) \
                PERSON([master]mind) \
                PERSON(Merlijn Hofstra) \
                PERSON(Mick Rippon) \
                PERSON(unfa) \
        NL() \
        FUNCTION(_("Game Code")) \
-               PERSON(Samual "Ares" Lenks) \
-               PERSON(Rudolf "divVerent" Polzer) \
+               PERSON(Antonio "terencehill" Piu) \
                PERSON(Jakob "tZork" Markström Gröhn) \
+               PERSON(martin-t) \
+               PERSON(Mattia "Melanosuchus" Basaglia) \
+               PERSON(Matthias "matthiaskrgr" Krüger) \
                PERSON(Rasmus "FruitieX" Eskola) \
+               PERSON(Rudolf "divVerent" Polzer) \
+               PERSON(Samual "Ares" Lenks) \
                PERSON(TimePath) \
+               PERSON(Victor "LegendGuard" Jaume) \
+               PERSON(z411) \
                PERSON(Zac "Mario" Jardine) \
        NL() \
        FUNCTION(_("Marketing / PR")) \
        NL() \
        TITLE(_("Game Engine")) \
                FUNCTION("DarkPlaces") \
-                       PERSON(Forest "LordHavoc" Hale) \
+                       PERSON(Ashley Rose "LadyHavoc" Hale) \
                NL() \
                FUNCTION(_("Engine Additions")) \
+                       PERSON(David "Cloudwalk" Knapp) \
                        PERSON(Rudolf "divVerent" Polzer) \
                        PERSON(Samual "Ares" Lenks) \
                NL() \
                NL() \
        NL() \
        TITLE(_("Other Active Contributors")) \
-               PERSON(Erik "Ablu" Schilling) \
+               PERSON(Jeff) \
                PERSON(Mircea "Taoki" Kitsune) \
                PERSON(Penguinum) \
+               PERSON(slava) \
+               PERSON(Victor "LegendGuard" Jaume) \
        NL() \
        NL() \
        TITLE(_("Translators")) \
                NL() \
                FUNCTION(_("Dutch")) \
                        PERSON(Alexander "freefang" van Dam) \
+                       PERSON(Joeke "Mappack" de Graaf) \
                        PERSON(Jonathan "Jonakeys" van der Steege) \
                        PERSON(PinkRobot) \
                        PERSON(vegiburger) \
                        PERSON(Ruszkai "CuBe0wL" Ákos) \
                        PERSON(xaN1C4n3) \
                NL() \
+               FUNCTION(_("Irish")) \
+                       PERSON(Kevin "kscanne" Scannell) \
+               NL() \
                FUNCTION(_("Italian")) \
                        PERSON(Antonio "terencehill" Piu) \
                        PERSON(Felice "MaidenBeast" Sallustio) \
                        PERSON(stdi) \
                        PERSON(XCostaX) \
                NL() \
+               FUNCTION(_("Japanese")) \
+                       PERSON(Victor "LegendGuard" Jaume) \
+               NL() \
                FUNCTION(_("Kazakh")) \
-                       PERSON("Артем "bystrov.arterm" Быстров") \
+                       PERSON(Артем "bystrov.arterm" Быстров) \
                NL() \
                FUNCTION(_("Korean")) \
                        PERSON(Jisoo "s6e9x" Lim) \
                        PERSON(Amadeusz "amade/proraide" Sławiński) \
                        PERSON(Artur "artur9010" Motyka) \
                        PERSON(Jakub "KubeQ11" Pędziszewski) \
+                       PERSON(Kriss7475) \
                NL() \
                FUNCTION(_("Portuguese")) \
                        PERSON(Ivan Paulos "greylica" Tomé) \
                        PERSON(Nikoli) \
                        PERSON(Sergej "Clearness High" Lutsyk) \
                NL() \
+               FUNCTION(_("Scottish Gaelic")) \
+                       PERSON_("GunChleoc") \
+               NL() \
                FUNCTION(_("Serbian")) \
                        PERSON_("Саша \"salepetronije\" Петровић") \
+                       PERSON(Marko M. Kostić) \
                        PERSON(Pendulla) \
                        PERSON(Rafael "Ristovski") \
                NL() \
                        PERSON(roader_gentoo) \
                        PERSON(Rodrigo Mouton Laudin) \
                        PERSON(SouL) \
+                       PERSON(Starfire24680) \
+                       PERSON(Victor "LegendGuard" Jaume) \
                NL() \
                FUNCTION(_("Swedish")) \
                        PERSON(Karl-Oskar "machine" Rikås) \
                PERSON(BigMac) \
                PERSON(Braden "meoblast001" Walters) \
                PERSON(Brain Younds) \
+               PERSON(BuddyFriendGuy) \
                PERSON(Chris "amethyst7" Matz) \
                PERSON(Christian Ice) \
                PERSON(Clinton "Kaziganthe" Freeman) \
                PERSON(Dan "Digger" Korostelev) \
                PERSON(Dan "Wazat" Hale) \
+               PERSON(Diomedes) \
                PERSON(Dokujisan) \
                PERSON(Donkey) \
                PERSON(dstrek) \
                PERSON(Edgenetwork) \
                PERSON(Edward "Ed" Holness) \
                PERSON(Eric "Munyul Verminard" Sambach) \
+               PERSON(Erik "Ablu" Schilling) \
                PERSON(Fabien "H. Reaper" Tschirhart) \
                PERSON(Florian Paul "lda17h" Schmidt) \
                PERSON(FrikaC) \
                PERSON(Garth "Zombie" Hendy) \
+               PERSON(GATTS) \
                PERSON(Gerd "Elysis" Raudenbusch) \
                PERSON(Gottfried "Toddd" Hofmann) \
                PERSON(Henning "Tymo" Janssen) \
                PERSON(Innovati) \
+               PERSON(JH0nny) \
                PERSON(Jitspoe) \
                PERSON(Jody Gallagher) \
                PERSON(Jope "Sless" Withers) \
+               PERSON(Jubilant) \
                PERSON(Juergen "LowDragon" Timm) \
                PERSON(KadaverJack) \
                PERSON(Kevin "Tyrann" Shanahan) \
                PERSON(Lee David Ash) \
                PERSON(Lee Vermeulen) \
                PERSON(leileilol) \
+               PERSON(Lyberta) \
                PERSON(magorian) \
                PERSON(Marius "GreEn`mArine" Shekow) \
                PERSON(Marko "Urre" Permanto) \
                PERSON(Robert "ai" Kuroto) \
                PERSON(Ronan) \
                PERSON(Sajt) \
+               PERSON(Samual "Ares" Lenks) \
                PERSON(Saulo "mand1nga" Gil) \
                PERSON(Shaggy) \
                PERSON(Shank) \
+               PERSON(s1lence) \
                PERSON(Simon O’Callaghan) \
+               PERSON(Soelen) \
                PERSON(SomeGuy) \
                PERSON(SoulKeeper_p) \
                PERSON(Spike) \
                PERSON(Stephan "esteel" Stahl) \
                PERSON(Steve Vermeulen) \
                PERSON(Supajoe) \
+               PERSON(Sydes) \
                PERSON(Tei) \
                PERSON(The player with the unnecessarily long name) \
                PERSON(Tomaz) \
                PERSON(William "Willis" Weilep) \
                PERSON(Yves "EviLair" Allaire) \
                PERSON(Zenex) \
+               PERSON(... and a goat) \
                /**/
 
-int credits_get()
+
+int CREDITS_TYPE_TITLE = 2;
+int CREDITS_TYPE_FUNCTION = 1;
+int CREDITS_TYPE_PERSON = 0;
+int CREDITS_TYPE_NL = -1;
+void credits_add_line(int fh, int n, int type, string line)
 {
-       int n = buf_create();
-       #define CREDITS_TITLE(t) bufstr_add(n, strcat("**", t), 0);
-       #define CREDITS_FUNCTION(f) bufstr_add(n, strcat("*", f), 0);
-       #define CREDITS_PERSON(p) bufstr_add(n, p, 0);
+       if (type == CREDITS_TYPE_TITLE)
+               line = strcat("**", line);
+       else if (type == CREDITS_TYPE_FUNCTION)
+               line = strcat("*", line);
+
+       if (fh >= 0)
+               fputs(fh, strcat(line, "\n"));
+       if (n >= 0)
+               bufstr_add(n, line, 0);
+}
+
+void credits_build(int fh, int n)
+{
+       #define CREDITS_TITLE(t) credits_add_line(fh, n, CREDITS_TYPE_TITLE, t);
+       #define CREDITS_FUNCTION(f) credits_add_line(fh, n, CREDITS_TYPE_FUNCTION, f);
+       #define CREDITS_PERSON(p) credits_add_line(fh, n, CREDITS_TYPE_PERSON, p);
        #define _CREDITS_PERSON(p) CREDITS_PERSON(#p)
-       #define CREDITS_NL() bufstr_add(n, "", 0);
-    CREDITS(CREDITS_TITLE, CREDITS_FUNCTION, _CREDITS_PERSON, CREDITS_PERSON, CREDITS_NL)
+       #define CREDITS_NL() credits_add_line(fh, n, CREDITS_TYPE_NL, "");
+       CREDITS(CREDITS_TITLE, CREDITS_FUNCTION, _CREDITS_PERSON, CREDITS_PERSON, CREDITS_NL)
        #undef CREDITS_TITLE
        #undef CREDITS_FUNCTION
        #undef CREDITS_PERSON
        #undef _CREDITS_PERSON
        #undef CREDITS_NL
+}
+
+int credits_get()
+{
+       int n = buf_create();
+       credits_build(-1, n);
        return n;
 }
 
+void credits_export()
+{
+       int fh = fopen("credits.txt", FILE_WRITE);
+       if(fh < 0)
+               return;
+       credits_build(fh, -1);
+}
+
 #undef CREDITS
 
 entity makeXonoticCreditsList()
@@ -414,8 +466,13 @@ entity makeXonoticCreditsList()
 void XonoticCreditsList_configureXonoticCreditsList(entity me)
 {
        me.configureXonoticListBox(me);
-    me.bufferIndex = credits_get();
+       me.bufferIndex = credits_get();
        me.nItems = buf_getsize(me.bufferIndex);
+       if (cvar("_menu_credits_export")) // set by the menu_credits_export alias
+       {
+               credits_export();
+               cvar_set("_menu_credits_export", "0");
+       }
 }
 void XonoticCreditsList_destroy(entity me)
 {