Merge branch 'master' into Mirio/balance
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / credits.qc
1 #include "credits.qh"
2
3 #define CREDITS(TITLE, FUNCTION, PERSON, PERSON_, NL) \
4         TITLE(_("Core Team")) \
5                 PERSON(Rudolf "divVerent" Polzer) \
6                 PERSON(Ant "Antibody" Zucaro) \
7                 PERSON(Marvin "Mirio" Beck) \
8                 PERSON(Merlijn Hofstra) \
9                 PERSON(Peter "Morphed" Pielak) \
10                 PERSON(Ruszkai "CuBe0wL" Ákos) \
11                 PERSON(Samual "Ares" Lenks) \
12                 PERSON(TimePath) \
13                 PERSON(Tyler "-z-" Mulligan) \
14                 PERSON(Zac "Mario" Jardine) \
15         NL() \
16         TITLE(_("Extended Team")) \
17                 PERSON(Antonio "terencehill" Piu) \
18                 PERSON(Archer) \
19                 PERSON(BuddyFriendGuy) \
20                 PERSON(Debugger) \
21                 PERSON(GATTS) \
22                 PERSON(Halogene) \
23                 PERSON(IDWMaster) \
24                 PERSON(Jan "zykure" Behrens) \
25                 PERSON(JH0nny) \
26                 PERSON(Luigi) \
27                 PERSON(Łukasz "kuniu the frogg" Polek) \
28                 PERSON(Matthias "matthiaskrgr" Krüger) \
29                 PERSON(Mattia "Melanosuchus" Basaglia) \
30                 PERSON(MrBougo) \
31                 PERSON(Nick "bitbomb" Lucca) \
32                 PERSON(nilyt/nyov) \
33                 PERSON(Nitroxis) \
34                 PERSON(packer) \
35                 PERSON(Pearce "theShadow" Michal) \
36                 PERSON(Rasmus "FruitieX" Eskola) \
37                 PERSON(s1lence) \
38                 PERSON(Severin "sev" Meyer) \
39                 PERSON(Soelen) \
40                 PERSON(Sydes) \
41                 PERSON(unfa) \
42         NL() \
43         NL() \
44         FUNCTION(_("Website")) \
45                 PERSON(Ant "Antibody" Zucaro (web)) \
46                 PERSON(Merlijn Hofstra) \
47                 PERSON(Tyler "-z-" Mulligan (web / game)) \
48         NL() \
49         FUNCTION(_("Stats")) \
50                 PERSON(Ant "Antibody" Zucaro) \
51                 PERSON(Jan "zykure" Behrens) \
52         NL() \
53         FUNCTION(_("Art")) \
54                 PERSON(Severin "sev" Meyer) \
55                 PERSON(Sahil "DiaboliK" Singhal) \
56                 PERSON(Peter "Morphed" Pielak) \
57                 PERSON(Sam "LJFHutch" Hutchinson) \
58                 PERSON(Pearce "theShadow" Michal) \
59         NL() \
60         FUNCTION(_("Animation")) \
61                 PERSON(Sahil "DiaboliK" Singhal) \
62                 PERSON(nifrek) \
63         NL() \
64         FUNCTION(_("Level Design")) \
65                 PERSON(Amadeusz "amade/proraide" Sławiński) \
66                 PERSON(Ben "MooKow" Banker) \
67                 PERSON(Calinou) \
68                 PERSON(Cortez) \
69                 PERSON(Cuinn "Cuinnton" Herrick) \
70                 PERSON(Debugger) \
71                 PERSON(Jakob "tZork" Markström Gröhn) \
72                 PERSON(Konrad "Justin" Slawinski) \
73                 PERSON(Maddin) \
74                 PERSON(L0) \
75                 PERSON(Łukasz "kuniu the frogg" Polek) \
76                 PERSON(Maik "SavageX" Merten) \
77                 PERSON(Marvin "Mirio" Beck) \
78                 PERSON(MintOX) \
79                 PERSON(packer) \
80                 PERSON(Pearce "theShadow" Michal) \
81                 PERSON(Rasmus "FruitieX" Eskola) \
82                 PERSON(Ruszkai "CuBe0wL" Ákos) \
83                 PERSON(Severin "sev" Meyer) \
84                 PERSON(ShadoW) \
85         NL() \
86         FUNCTION(_("Music / Sound FX")) \
87                 PERSON(AquaNova (Archer)) \
88                 PERSON(blkrbt) \
89                 PERSON(chooksta) \
90                 PERSON(Independent.nu) \
91                 PERSON([master]mind) \
92                 PERSON(Merlijn Hofstra) \
93                 PERSON(Mick Rippon) \
94                 PERSON(Nick "bitbomb" Lucca) \
95                 PERSON(remaxim) \
96                 PERSON(Saulo "mand1nga" Gil) \
97                 PERSON({SC0RP} - Ian "ID" Dorrell) \
98                 PERSON(Stephan) \
99                 PERSON(unfa) \
100         NL() \
101         FUNCTION(_("Game Code")) \
102                 PERSON(Samual "Ares" Lenks) \
103                 PERSON(Rudolf "divVerent" Polzer) \
104                 PERSON(Jakob "tZork" Markström Gröhn) \
105                 PERSON(Rasmus "FruitieX" Eskola) \
106                 PERSON(TimePath) \
107                 PERSON(Zac "Mario" Jardine) \
108         NL() \
109         FUNCTION(_("Marketing / PR")) \
110                 PERSON(Tyler "-z-" Mulligan) \
111                 PERSON(Ruszkai "CuBe0wL" Ákos) \
112                 PERSON(Samual "Ares" Lenks) \
113                 PERSON(Saulo "mand1nga" Gil) \
114         NL() \
115         FUNCTION(_("Legal")) \
116                 PERSON(Rudolf "divVerent" Polzer) \
117                 PERSON(Merlijn Hofstra) \
118         NL() \
119         NL() \
120         TITLE(_("Game Engine")) \
121                 FUNCTION("DarkPlaces") \
122                         PERSON(Forest "LordHavoc" Hale) \
123                 NL() \
124                 FUNCTION(_("Engine Additions")) \
125                         PERSON(Rudolf "divVerent" Polzer) \
126                         PERSON(Samual "Ares" Lenks) \
127                 NL() \
128         NL() \
129         TITLE(_("Compiler")) \
130                 FUNCTION("GMQCC") \
131                         PERSON(Wolfgang "Blub\0" Bumiller) \
132                         PERSON(Dale "graphitemaster" Weiler) \
133                 NL() \
134         NL() \
135         TITLE(_("Other Active Contributors")) \
136                 PERSON(Erik "Ablu" Schilling) \
137                 PERSON(Mircea "Taoki" Kitsune) \
138                 PERSON(Penguinum) \
139         NL() \
140         NL() \
141         TITLE(_("Translators")) \
142                 NL() \
143                 FUNCTION(_("Asturian")) \
144                         PERSON(Llumex03) \
145                         PERSON(Tornes "Tornes.Llume" Ḷḷume) \
146                         PERSON(Ximielga) \
147                 NL() \
148                 FUNCTION(_("Belarusian")) \
149                         PERSON(Mihail "meequz" Varantsou) \
150                 NL() \
151                 FUNCTION(_("Bulgarian")) \
152                         PERSON(lokster) \
153                         PERSON(set_killer) \
154                 NL() \
155                 FUNCTION(_("Chinese (China)")) \
156                         PERSON(Antonidas) \
157                         PERSON(kalawore) \
158                         PERSON(sapphireliu) \
159                 NL() \
160                 FUNCTION(_("Czech")) \
161                         PERSON(shogun assassin/woky) \
162                         PERSON(Superovoce) \
163                         PERSON(Tomáš "CZHeron" Volavka) \
164                 NL() \
165                 FUNCTION(_("Dutch")) \
166                         PERSON(Alexander "freefang" van Dam) \
167                         PERSON(PinkRobot) \
168                         PERSON(vegiburger) \
169                 NL() \
170                 FUNCTION(_("English (Australia)")) \
171                         PERSON(Laurene "sunflowers" Albrand) \
172                         PERSON(Zac "Mario" Jardine) \
173                 NL() \
174                 FUNCTION(_("Finnish")) \
175                         PERSON(Henry "Exitium" Sanmark) \
176                         PERSON(Rasmus "FruitieX" Eskola) \
177                 NL() \
178                 FUNCTION(_("French")) \
179                         PERSON(Calinou) \
180                         PERSON(Maxime "Taximus" Paradis) \
181                         PERSON(RedGuff) \
182                         PERSON(Yannick "SpiKe" Le Guen) \
183                 NL() \
184                 FUNCTION(_("German")) \
185                         PERSON(Brot) \
186                         PERSON(cvcxc) \
187                         PERSON(Erik "Ablu" Schilling) \
188                         PERSON(Jope "Sless" Withers) \
189                         PERSON(Marvin "Mirio" Beck) \
190                         PERSON(Rudolf "divVerent" Polzer) \
191                         PERSON(Yepoleb) \
192                 NL() \
193                 FUNCTION(_("Greek")) \
194                         PERSON_("Γιάννης \"Evropi\" Ανθυμίδης") \
195                         PERSON(Konstantinos "LDinos" Mihalenas) \
196                         PERSON(Savoritias) \
197                         PERSON(Vindex) \
198                 NL() \
199                 FUNCTION(_("Hungarian")) \
200                         PERSON(Ruszkai "CuBe0wL" Ákos) \
201                         PERSON(xaN1C4n3) \
202                 NL() \
203                 FUNCTION(_("Italian")) \
204                         PERSON(Antonio "terencehill" Piu) \
205                         PERSON(Felice "MaidenBeast" Sallustio) \
206                         PERSON(stdi) \
207                         PERSON(XCostaX) \
208                 NL() \
209                 FUNCTION(_("Polish")) \
210                         PERSON(4m) \
211                         PERSON(Alex "tiprogrammierer.alex" Progger) \
212                         PERSON(Amadeusz "amade/proraide" Sławiński) \
213                 NL() \
214                 FUNCTION(_("Portuguese")) \
215                         PERSON(Ricardo Manuel "Hellgardia" da Cruz Coelho da Silva) \
216                         PERSON(xXxCHAOTICxXx) \
217                 NL() \
218                 FUNCTION(_("Romanian")) \
219                         PERSON(Adrian-Ciprian "adrian.tinjala" Tînjală) \
220                         PERSON(BusterDBK) \
221                         PERSON(Mircea "Taoki" Kitsune) \
222                         PERSON(Tudor "TropiKo" Ionel) \
223                 NL() \
224                 FUNCTION(_("Russian")) \
225                         PERSON(Alex "alextalker7" Talker) \
226                         PERSON(Alexandr "zrg") \
227                         PERSON(Andrei "adem4ik" Stepanov) \
228                         PERSON(gravicappa) \
229                         PERSON(Hot Dog) \
230                         PERSON(Lord Canistra) \
231                         PERSON(Nikoli) \
232                         PERSON(Sergej "Clearness High" Lutsyk) \
233                 NL() \
234                 FUNCTION(_("Serbian")) \
235                         PERSON_("Саша \"salepetronije\" Петровић") \
236                         PERSON(Pendulla) \
237                         PERSON(Rafael "Ristovski") \
238                 NL() \
239                 FUNCTION(_("Spanish")) \
240                         PERSON_("0000simon") \
241                         PERSON(Alan "aagp" Garcia) \
242                         PERSON(Ari_tent) \
243                         PERSON(brunodeleo) \
244                         PERSON(Kammy) \
245                         PERSON(roader_gentoo) \
246                         PERSON(Rodrigo Mouton Laudin) \
247                         PERSON(SouL) \
248                 NL() \
249                 FUNCTION(_("Swedish")) \
250                         PERSON(Karl-Oskar "machine" Rikås) \
251                         PERSON(marcus256) \
252                 NL() \
253                 FUNCTION(_("Ukrainian")) \
254                         PERSON(Oleh "BlaXpirit" Prypin) \
255                         PERSON(Vasyl "Harmata" Melnyk) \
256                         PERSON(Yuriy "herrniemand" Ackermann) \
257                 NL() \
258         NL() \
259         TITLE(_("Past Contributors")) \
260                 PERSON(Akari) \
261                 PERSON(Alexander "naryl" Suhoverhov) \
262                 PERSON(Alexander "motorsep" Zubov) \
263                 PERSON(Amos "torus" Dudley) \
264                 PERSON(Andreas "Black" Kirsch) \
265                 PERSON(Attila "WW3" Houtkooper) \
266                 PERSON(BigMac) \
267                 PERSON(Braden "meoblast001" Walters) \
268                 PERSON(Brain Younds) \
269                 PERSON(Chris "amethyst7" Matz) \
270                 PERSON(Christian Ice) \
271                 PERSON(Clinton "Kaziganthe" Freeman) \
272                 PERSON(Dan "Digger" Korostelev) \
273                 PERSON(Dan "Wazat" Hale) \
274                 PERSON(Dokujisan) \
275                 PERSON(Donkey) \
276                 PERSON(dstrek) \
277                 PERSON(Dustin Geeraert) \
278                 PERSON(Edgenetwork) \
279                 PERSON(Edward "Ed" Holness) \
280                 PERSON(Eric "Munyul Verminard" Sambach) \
281                 PERSON(Fabien "H. Reaper" Tschirhart) \
282                 PERSON(Florian Paul "lda17h" Schmidt) \
283                 PERSON(FrikaC) \
284                 PERSON(Garth "Zombie" Hendy) \
285                 PERSON(Gerd "Elysis" Raudenbusch) \
286                 PERSON(Gottfried "Toddd" Hofmann) \
287                 PERSON(Henning "Tymo" Janssen) \
288                 PERSON(Innovati) \
289                 PERSON(Jitspoe) \
290                 PERSON(Jody Gallagher) \
291                 PERSON(Jope "Sless" Withers) \
292                 PERSON(Juergen "LowDragon" Timm) \
293                 PERSON(KadaverJack) \
294                 PERSON(Kevin "Tyrann" Shanahan) \
295                 PERSON(Kristian "morfar" Johansson) \
296                 PERSON(Kurt Dereli) \
297                 PERSON(lcatlnx) \
298                 PERSON(Lee David Ash) \
299                 PERSON(Lee Vermeulen) \
300                 PERSON(leileilol) \
301                 PERSON(magorian) \
302                 PERSON(Marius "GreEn`mArine" Shekow) \
303                 PERSON(Marko "Urre" Permanto) \
304                 PERSON(Mathieu "Elric" Olivier) \
305                 PERSON(Mattrew "Tronyn" Rye) \
306                 PERSON(MauveBib) \
307                 PERSON(Mephisto) \
308                 PERSON(michaelb) \
309                 PERSON(Michael "Tenshihan" Quinn) \
310                 PERSON(Mepper) \
311                 PERSON(Munyul) \
312                 PERSON(Netzwerg) \
313                 PERSON(NoelCower) \
314                 PERSON(Parapraxis) \
315                 PERSON(parasti) \
316                 PERSON(Paul "Strahlemann" Evers) \
317                 PERSON(Paul Scott) \
318                 PERSON(Petithomme) \
319                 PERSON(PlasmaSheep) \
320                 PERSON(Przemysław "atheros" Grzywacz) \
321                 PERSON(Q1 Retexturing Project) \
322                 PERSON(Qantourisc) \
323                 PERSON(Oleh "BlaXpirit" Prypin) \
324                 PERSON(Rick "Rat" Kelley) \
325                 PERSON(Robert "ai" Kuroto) \
326                 PERSON(Ronan) \
327                 PERSON(Sajt) \
328                 PERSON(Saulo "mand1nga" Gil) \
329                 PERSON(Shaggy) \
330                 PERSON(Shank) \
331                 PERSON(Simon O’Callaghan) \
332                 PERSON(SomeGuy) \
333                 PERSON(SoulKeeper_p) \
334                 PERSON(Spike) \
335                 PERSON(Spirit) \
336                 PERSON(Stephan "esteel" Stahl) \
337                 PERSON(Steve Vermeulen) \
338                 PERSON(Supajoe) \
339                 PERSON(Tei) \
340                 PERSON(The player with the unnecessarily long name) \
341                 PERSON(Tomaz) \
342                 PERSON(Ulrich Galbraith) \
343                 PERSON(Vortex) \
344                 PERSON(William Libert) \
345                 PERSON(William "Willis" Weilep) \
346                 PERSON(Yves "EviLair" Allaire) \
347                 PERSON(Zenex) \
348                 /**/
349
350 int credits_get()
351 {
352         int n = buf_create();
353         #define CREDITS_TITLE(t) bufstr_add(n, strcat("**", t), 0);
354         #define CREDITS_FUNCTION(f) bufstr_add(n, strcat("*", f), 0);
355         #define CREDITS_PERSON(p) bufstr_add(n, p, 0);
356         #define _CREDITS_PERSON(p) CREDITS_PERSON(#p)
357         #define CREDITS_NL() bufstr_add(n, "", 0);
358     CREDITS(CREDITS_TITLE, CREDITS_FUNCTION, _CREDITS_PERSON, CREDITS_PERSON, CREDITS_NL)
359         #undef CREDITS_TITLE
360         #undef CREDITS_FUNCTION
361         #undef CREDITS_PERSON
362         #undef _CREDITS_PERSON
363         #undef CREDITS_NL
364         return n;
365 }
366
367 #undef CREDITS
368
369 entity makeXonoticCreditsList()
370 {
371         entity me;
372         me = NEW(XonoticCreditsList);
373         me.configureXonoticCreditsList(me);
374         return me;
375 }
376 void XonoticCreditsList_configureXonoticCreditsList(entity me)
377 {
378         me.configureXonoticListBox(me);
379     me.bufferIndex = credits_get();
380         me.nItems = buf_getsize(me.bufferIndex);
381 }
382 void XonoticCreditsList_destroy(entity me)
383 {
384         buf_del(me.bufferIndex);
385 }
386 void XonoticCreditsList_draw(entity me)
387 {
388         if(me.scrolling)
389         {
390                 me.scrollPos = bound(0, (time - me.scrolling) * me.itemHeight, me.nItems * me.itemHeight - 1);
391                 me.scrollPosTarget = me.scrollPos;
392         }
393         SUPER(XonoticCreditsList).draw(me);
394 }
395 void XonoticCreditsList_resizeNotify(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)
396 {
397         SUPER(XonoticCreditsList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
398
399         me.realFontSize_y = me.fontSize / (absSize.y * me.itemHeight);
400         me.realFontSize_x = me.fontSize / (absSize.x * (1 - me.controlWidth));
401         me.realUpperMargin = 0.5 * (1 - me.realFontSize.y);
402 }
403 void XonoticCreditsList_drawListBoxItem(entity me, int i, vector absSize, bool isSelected, bool isFocused)
404 {
405         // layout: Ping, Credits name, Map name, NP, TP, MP
406         string s;
407         float theAlpha;
408         vector theColor;
409
410         s = bufstr_get(me.bufferIndex, i);
411
412         if(substring(s, 0, 2) == "**")
413         {
414                 s = substring(s, 2, strlen(s) - 2);
415                 theColor = SKINCOLOR_CREDITS_TITLE;
416                 theAlpha = SKINALPHA_CREDITS_TITLE;
417         }
418         else if(substring(s, 0, 1) == "*")
419         {
420                 s = substring(s, 1, strlen(s) - 1);
421                 theColor = SKINCOLOR_CREDITS_FUNCTION;
422                 theAlpha = SKINALPHA_CREDITS_FUNCTION;
423         }
424         else
425         {
426                 theColor = SKINCOLOR_CREDITS_PERSON;
427                 theAlpha = SKINALPHA_CREDITS_PERSON;
428         }
429
430         draw_CenterText(me.realUpperMargin * eY + 0.5 * eX, s, me.realFontSize, theColor, theAlpha, 0);
431 }
432
433 float XonoticCreditsList_keyDown(entity me, float key, float ascii, float shift)
434 {
435         me.scrolling = 0;
436         return SUPER(XonoticCreditsList).keyDown(me, key, ascii, shift);
437 }