-
Notifications
You must be signed in to change notification settings - Fork 536
/
statscreen.zs
883 lines (750 loc) · 22.1 KB
/
statscreen.zs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
// Note that the status screen needs to run in 'play' scope!
class InterBackground native play version("2.5")
{
native static InterBackground Create(wbstartstruct wbst);
native virtual bool LoadBackground(bool isenterpic);
native virtual void updateAnimatedBack();
native virtual void drawBackground(int CurState, bool drawsplat, bool snl_pointeron);
}
// This is obsolete. Hopefully this was never used...
struct PatchInfo play version("2.5")
{
Font mFont;
deprecated("3.8") TextureID mPatch;
int mColor;
void Init(GIFont gifont)
{
// Replace with the VGA-Unicode font if needed.
// The default settings for this are marked with a *.
// If some mod changes this it is assumed that it doesn't provide any localization for the map name in a language not supported by the font.
String s = gifont.fontname;
if (s.Left(1) != "*")
mFont = Font.GetFont(gifont.fontname);
else if (generic_ui)
mFont = NewSmallFont;
else
{
s = s.Mid(1);
mFont = Font.GetFont(s);
}
mColor = Font.FindFontColor(gifont.color);
if (mFont == NULL)
{
mFont = BigFont;
}
}
};
// Will be made a class later, but for now needs to mirror the internal version.
class StatusScreen abstract play version("2.5")
{
enum EValues
{
// GLOBAL LOCATIONS
TITLEY = 5,
// SINGPLE-PLAYER STUFF
SP_STATSX = 50,
SP_STATSY = 50,
SP_TIMEX = 8,
SP_TIMEY = (200 - 32),
// NET GAME STUFF
NG_STATSY = 50,
};
enum EState
{
NoState = -1,
StatCount,
ShowNextLoc,
LeavingIntermission
};
// States for single-player
enum ESPState
{
SP_KILLS = 0,
SP_ITEMS = 2,
SP_SECRET = 4,
SP_FRAGS = 6,
SP_TIME = 8,
};
const SHOWNEXTLOCDELAY = 4; // in seconds
InterBackground bg;
int acceleratestage; // used to accelerate or skip a stage
bool playerready[MAXPLAYERS];
int me; // wbs.pnum
int bcnt;
int CurState; // specifies current CurState
wbstartstruct wbs; // contains information passed into intermission
wbplayerstruct Plrs[MAXPLAYERS]; // wbs.plyr[]
int cnt; // used for general timing
int cnt_kills[MAXPLAYERS];
int cnt_items[MAXPLAYERS];
int cnt_secret[MAXPLAYERS];
int cnt_frags[MAXPLAYERS];
int cnt_deaths[MAXPLAYERS];
int cnt_time;
int cnt_total_time;
int cnt_par;
int cnt_pause;
int total_frags;
int total_deaths;
bool noautostartmap;
int dofrags;
int ng_state;
float shadowalpha;
PatchInfo mapname;
PatchInfo finished;
PatchInfo entering;
PatchInfo content;
PatchInfo author;
TextureID p_secret;
TextureID kills;
TextureID secret;
TextureID items;
TextureID timepic;
TextureID par;
TextureID sucks;
TextureID finishedPatch;
TextureID enteringPatch;
// [RH] Info to dynamically generate the level name graphics
String lnametexts[2];
String authortexts[2];
bool snl_pointeron;
int player_deaths[MAXPLAYERS];
int sp_state;
//====================================================================
//
// Draws a single character with a shadow
//
//====================================================================
int DrawCharPatch(Font fnt, int charcode, int x, int y, int translation = Font.CR_UNTRANSLATED, bool nomove = false)
{
int width = fnt.GetCharWidth(charcode);
screen.DrawChar(fnt, translation, x, y, charcode, nomove ? DTA_CleanNoMove : DTA_Clean, true);
return x - width;
}
//====================================================================
//
// Draws a level name with the big font
//
// x is no longer passed as a parameter because the text is now broken into several lines
// if it is too long
//
//====================================================================
int DrawName(int y, TextureID tex, String levelname)
{
// draw <LevelName>
if (tex.isValid())
{
let size = TexMan.GetScaledSize(tex);
screen.DrawTexture(tex, true, (screen.GetWidth() - size.X * CleanXfac) /2, y, DTA_CleanNoMove, true);
if (size.Y > 50)
{ // Fix for Deus Vult II and similar wads that decide to make these hugely tall
// patches with vast amounts of empty space at the bottom.
size.Y = TexMan.CheckRealHeight(tex);
}
return y + int(Size.Y) * CleanYfac;
}
else if (levelname.Length() > 0)
{
int h = 0;
int lumph = mapname.mFont.GetHeight() * CleanYfac;
BrokenLines lines = mapname.mFont.BreakLines(levelname, screen.GetWidth() / CleanXfac);
int count = lines.Count();
for (int i = 0; i < count; i++)
{
screen.DrawText(mapname.mFont, mapname.mColor, (screen.GetWidth() - lines.StringWidth(i) * CleanXfac) / 2, y + h, lines.StringAt(i), DTA_CleanNoMove, true);
h += lumph;
}
return y + h;
}
return 0;
}
//====================================================================
//
// Draws a level author's name with the big font
//
//====================================================================
int DrawAuthor(int y, String levelname)
{
if (levelname.Length() > 0)
{
int h = 0;
int lumph = author.mFont.GetHeight() * CleanYfac;
BrokenLines lines = author.mFont.BreakLines(levelname, screen.GetWidth() / CleanXfac);
int count = lines.Count();
for (int i = 0; i < count; i++)
{
screen.DrawText(author.mFont, author.mColor, (screen.GetWidth() - lines.StringWidth(i) * CleanXfac) / 2, y + h, lines.StringAt(i), DTA_CleanNoMove, true);
h += lumph;
}
return y + h;
}
return y;
}
//====================================================================
//
// Only kept so that mods that were accessing it continue to compile
//
//====================================================================
deprecated("3.8") int DrawPatchText(int y, PatchInfo pinfo, String stringname)
{
String string = Stringtable.Localize(stringname);
int midx = screen.GetWidth() / 2;
screen.DrawText(pinfo.mFont, pinfo.mColor, midx - pinfo.mFont.StringWidth(string) * CleanXfac/2, y, string, DTA_CleanNoMove, true);
return y + pinfo.mFont.GetHeight() * CleanYfac;
}
//====================================================================
//
// Draws a text, either as patch or as string from the string table
//
//====================================================================
int DrawPatchOrText(int y, PatchInfo pinfo, TextureID patch, String stringname)
{
String string = Stringtable.Localize(stringname);
int midx = screen.GetWidth() / 2;
if (TexMan.OkForLocalization(patch, stringname))
{
let size = TexMan.GetScaledSize(patch);
screen.DrawTexture(patch, true, midx - size.X * CleanXfac/2, y, DTA_CleanNoMove, true);
return y + int(size.Y * CleanYfac);
}
else
{
screen.DrawText(pinfo.mFont, pinfo.mColor, midx - pinfo.mFont.StringWidth(string) * CleanXfac/2, y, string, DTA_CleanNoMove, true);
return y + pinfo.mFont.GetHeight() * CleanYfac;
}
}
//====================================================================
//
// Draws "<Levelname> Finished!"
//
// Either uses the specified patch or the big font
// A level name patch can be specified for all games now, not just Doom.
//
//====================================================================
virtual int drawLF ()
{
bool ispatch = wbs.LName0.isValid();
int oldy = TITLEY * CleanYfac;
int h;
if (!ispatch)
{
let asc = mapname.mFont.GetMaxAscender(lnametexts[1]);
if (asc > TITLEY - 2)
{
oldy = (asc+2) * CleanYfac;
}
}
int y = DrawName(oldy, wbs.LName0, lnametexts[0]);
// If the displayed info is made of patches we need some additional offsetting here.
if (ispatch)
{
int disp = 0;
// The offset getting applied here must at least be as tall as the largest ascender in the following text to avoid overlaps.
if (authortexts[0].length() == 0)
{
int h1 = BigFont.GetHeight() - BigFont.GetDisplacement();
int h2 = (y - oldy) / CleanYfac / 4;
disp = min(h1, h2);
if (!TexMan.OkForLocalization(finishedPatch, "$WI_FINISHED"))
{
disp += finished.mFont.GetMaxAscender("$WI_FINISHED");
}
}
else
{
disp += author.mFont.GetMaxAscender(authortexts[0]);
}
y += disp * CleanYfac;
}
y = DrawAuthor(y, authortexts[0]);
// draw "Finished!"
int statsy = multiplayer? NG_STATSY : SP_STATSY * CleanYFac;
if (y < (statsy - finished.mFont.GetHeight()*3/4) * CleanYfac)
{
// don't draw 'finished' if the level name is too tall
y = DrawPatchOrText(y, finished, finishedPatch, "$WI_FINISHED");
}
return y;
}
//====================================================================
//
// Draws "Entering <LevelName>"
//
// Either uses the specified patch or the big font
// A level name patch can be specified for all games now, not just Doom.
//
//====================================================================
virtual void drawEL ()
{
bool ispatch = TexMan.OkForLocalization(enteringPatch, "$WI_ENTERING");
int oldy = TITLEY * CleanYfac;
if (!ispatch)
{
let asc = entering.mFont.GetMaxAscender("$WI_ENTERING");
if (asc > TITLEY - 2)
{
oldy = (asc+2) * CleanYfac;
}
}
int y = DrawPatchOrText(oldy, entering, enteringPatch, "$WI_ENTERING");
// If the displayed info is made of patches we need some additional offsetting here.
if (ispatch)
{
int h1 = BigFont.GetHeight() - BigFont.GetDisplacement();
let size = TexMan.GetScaledSize(enteringPatch);
int h2 = int(size.Y);
let disp = min(h1, h2) / 4;
// The offset getting applied here must at least be as tall as the largest ascender in the following text to avoid overlaps.
if (!wbs.LName1.isValid())
{
disp += mapname.mFont.GetMaxAscender(lnametexts[1]);
}
y += disp * CleanYfac;
}
y = DrawName(y, wbs.LName1, lnametexts[1]);
if (wbs.LName1.isValid() && authortexts[1].length() > 0)
{
// Consdider the ascender height of the following text.
y += author.mFont.GetMaxAscender(authortexts[1]) * CleanYfac;
}
DrawAuthor(y, authortexts[1]);
}
//====================================================================
//
// Draws a number.
// If digits > 0, then use that many digits minimum,
// otherwise only use as many as necessary.
// x is the right edge of the number.
// Returns new x position, that is, the left edge of the number.
//
//====================================================================
int drawNum (Font fnt, int x, int y, int n, int digits, bool leadingzeros = true, int translation = Font.CR_UNTRANSLATED, bool nomove = false)
{
int fntwidth = fnt.StringWidth("3");
String text;
int len;
if (nomove)
{
fntwidth *= CleanXfac;
}
text = String.Format("%d", n);
len = text.Length();
if (leadingzeros)
{
int filldigits = digits - len;
for(int i = 0; i < filldigits; i++)
{
text = "0" .. text;
}
len = text.Length();
}
for(int text_p = len-1; text_p >= 0; text_p--)
{
// Digits are centered in a box the width of the '3' character.
// Other characters (specifically, '-') are right-aligned in their cell.
int c = text.ByteAt(text_p);
if (c >= "0" && c <= "9")
{
x -= fntwidth;
DrawCharPatch(fnt, c, x + (fntwidth - fnt.GetCharWidth(c)) / 2, y, translation, nomove);
}
else
{
DrawCharPatch(fnt, c, x - fnt.GetCharWidth(c), y, translation, nomove);
x -= fntwidth;
}
}
if (len < digits)
{
x -= fntwidth * (digits - len);
}
return x;
}
//====================================================================
//
//
//
//====================================================================
void drawPercent (Font fnt, int x, int y, int p, int b, bool show_total = true, int color = Font.CR_UNTRANSLATED, bool nomove = false)
{
if (p < 0)
return;
if (wi_percents)
{
if (nomove)
{
x -= fnt.StringWidth("%") * CleanXfac;
}
else
{
x -= fnt.StringWidth("%");
}
screen.DrawText(fnt, color, x, y, "%", nomove? DTA_CleanNoMove : DTA_Clean, true);
if (nomove)
{
x -= 2*CleanXfac;
}
drawNum(fnt, x, y, b == 0 ? 100 : p * 100 / b, -1, false, color);
}
else
{
if (show_total)
{
x = drawNum(fnt, x, y, b, 2, false, color);
x -= fnt.StringWidth("/");
screen.DrawText (fnt, color, x, y, "/", nomove? DTA_CleanNoMove : DTA_Clean, true);
}
drawNum (fnt, x, y, p, -1, false, color);
}
}
//====================================================================
//
//
//====================================================================
void drawTextScaled (Font fnt, double x, double y, String text, double scale, int translation = Font.CR_UNTRANSLATED)
{
screen.DrawText(fnt, translation, x / scale, y / scale, text, DTA_VirtualWidthF, screen.GetWidth() / scale, DTA_VirtualHeightF, screen.GetHeight() / scale);
}
//====================================================================
//
//
//====================================================================
void drawNumScaled (Font fnt, int x, int y, double scale, int n, int digits, int translation = Font.CR_UNTRANSLATED)
{
String s = String.Format("%d", n);
drawTextScaled(fnt, x - fnt.StringWidth(s) * scale, y, s, scale, translation);
}
//====================================================================
//
//
//
//====================================================================
void drawPercentScaled (Font fnt, int x, int y, int p, int b, double scale, bool show_total = true, int color = Font.CR_UNTRANSLATED)
{
if (p < 0) return;
String s;
if (wi_percents)
{
s = String.Format("%d%%", b == 0 ? 100 : p * 100 / b);
}
else if (show_total)
{
s = String.Format("%d/%3d", p, b);
}
else
{
s = String.Format("%d", p);
}
drawTextScaled(fnt, x - fnt.StringWidth(s) * scale, y, s, scale, color);
}
//====================================================================
//
// Display level completion time and par, or "sucks" message if overflow.
//
//====================================================================
void drawTimeFont (Font printFont, int x, int y, int t, int color)
{
bool sucky;
if (t < 0)
return;
int hours = t / 3600;
t -= hours * 3600;
int minutes = t / 60;
t -= minutes * 60;
int seconds = t;
// Why were these offsets hard coded? Half the WADs with custom patches
// I tested screwed up miserably in this function!
int num_spacing = printFont.GetCharWidth("3");
int colon_spacing = printFont.GetCharWidth(":");
x = drawNum (printFont, x, y, seconds, 2, true, color) - 1;
DrawCharPatch (printFont, ":", x -= colon_spacing, y, color);
x = drawNum (printFont, x, y, minutes, 2, hours!=0, color);
if (hours)
{
DrawCharPatch (printFont, ":", x -= colon_spacing, y, color);
drawNum (printFont, x, y, hours, 2, false, color);
}
}
void drawTime (int x, int y, int t, bool no_sucks=false)
{
drawTimeFont(IntermissionFont, x, y, t, Font.CR_UNTRANSLATED);
}
//====================================================================
//
//
//
//====================================================================
virtual void End ()
{
CurState = LeavingIntermission;
}
//====================================================================
//
//
//
//====================================================================
bool autoSkip()
{
return wi_autoadvance > 0 && bcnt > (wi_autoadvance * Thinker.TICRATE);
}
//====================================================================
//
//
//
//====================================================================
protected virtual void initNoState ()
{
CurState = NoState;
acceleratestage = 0;
cnt = 10;
}
//====================================================================
//
//
//
//====================================================================
protected virtual void updateNoState ()
{
if (acceleratestage)
{
cnt = 0;
}
else
{
bool noauto = noautostartmap;
for (int i = 0; !noauto && i < MAXPLAYERS; ++i)
{
if (playeringame[i])
{
noauto |= players[i].GetNoAutostartMap();
}
}
if (!noauto || autoSkip())
{
cnt--;
}
}
if (cnt == 0)
{
End();
Level.WorldDone();
}
}
//====================================================================
//
//
//
//====================================================================
protected virtual void initShowNextLoc ()
{
if (wbs.next == "")
{
// Last map in episode - there is no next location!
End();
Level.WorldDone();
return;
}
CurState = ShowNextLoc;
acceleratestage = 0;
cnt = SHOWNEXTLOCDELAY * Thinker.TICRATE;
noautostartmap = bg.LoadBackground(true);
}
//====================================================================
//
//
//
//====================================================================
protected virtual void updateShowNextLoc ()
{
if (!--cnt || acceleratestage)
initNoState();
else
snl_pointeron = (cnt & 31) < 20;
}
//====================================================================
//
//
//
//====================================================================
protected virtual void drawShowNextLoc(void)
{
bg.drawBackground(CurState, true, snl_pointeron);
// draws which level you are entering..
drawEL ();
}
//====================================================================
//
//
//
//====================================================================
protected virtual void drawNoState ()
{
snl_pointeron = true;
drawShowNextLoc();
}
//====================================================================
//
//
//
//====================================================================
protected int fragSum (int playernum)
{
int i;
int frags = 0;
for (i = 0; i < MAXPLAYERS; i++)
{
if (playeringame[i]
&& i!=playernum)
{
frags += Plrs[playernum].frags[i];
}
}
// JDC hack - negative frags.
frags -= Plrs[playernum].frags[playernum];
return frags;
}
//====================================================================
//
//
//
//====================================================================
static void PlaySound(Sound snd)
{
S_Sound(snd, CHAN_VOICE | CHAN_UI, 1, ATTN_NONE);
}
// ====================================================================
// checkForAccelerate
// Purpose: See if the player has hit either the attack or use key
// or mouse button. If so we set acceleratestage to 1 and
// all those display routines above jump right to the end.
// Args: none
// Returns: void
//
// ====================================================================
protected void checkForAccelerate(void)
{
int i;
// check for button presses to skip delays
for (i = 0; i < MAXPLAYERS; i++)
{
PlayerInfo player = players[i];
if (playeringame[i])
{
if ((player.cmd.buttons ^ player.oldbuttons) &&
((player.cmd.buttons & player.oldbuttons) == player.oldbuttons) && player.Bot == NULL)
{
acceleratestage = 1;
playerready[i] = true;
}
player.oldbuttons = player.buttons;
}
}
}
// ====================================================================
// Ticker
// Purpose: Do various updates every gametic, for stats, animation,
// checking that intermission music is running, etc.
// Args: none
// Returns: void
//
// ====================================================================
virtual void StartMusic()
{
Level.SetInterMusic(wbs.next);
}
//====================================================================
//
//
//
//====================================================================
virtual void Ticker(void)
{
// counter for general background animation
bcnt++;
if (bcnt == 1)
{
StartMusic();
}
checkForAccelerate();
bg.updateAnimatedBack();
switch (CurState)
{
case StatCount:
updateStats();
break;
case ShowNextLoc:
updateShowNextLoc();
break;
case NoState:
updateNoState();
break;
case LeavingIntermission:
// Hush, GCC.
break;
}
}
//====================================================================
//
//
//
//====================================================================
virtual void Drawer (void)
{
switch (CurState)
{
case StatCount:
// draw animated background
bg.drawBackground(CurState, false, false);
drawStats();
break;
case ShowNextLoc:
drawShowNextLoc();
break;
case LeavingIntermission:
break;
default:
drawNoState();
break;
}
}
//====================================================================
//
//
//
//====================================================================
virtual void Start (wbstartstruct wbstartstruct)
{
wbs = wbstartstruct;
acceleratestage = 0;
cnt = bcnt = 0;
me = wbs.pnum;
for (int i = 0; i < MAXPLAYERS; i++) Plrs[i] = wbs.plyr[i];
entering.Init(gameinfo.mStatscreenEnteringFont);
finished.Init(gameinfo.mStatscreenFinishedFont);
mapname.Init(gameinfo.mStatscreenMapNameFont);
content.Init(gameinfo.mStatscreenContentFont);
author.Init(gameinfo.mStatscreenAuthorFont);
Kills = TexMan.CheckForTexture("WIOSTK", TexMan.Type_MiscPatch); // "kills"
Secret = TexMan.CheckForTexture("WIOSTS", TexMan.Type_MiscPatch); // "scrt", not used
P_secret = TexMan.CheckForTexture("WISCRT2", TexMan.Type_MiscPatch); // "secret"
Items = TexMan.CheckForTexture("WIOSTI", TexMan.Type_MiscPatch); // "items"
Timepic = TexMan.CheckForTexture("WITIME", TexMan.Type_MiscPatch); // "time"
Sucks = TexMan.CheckForTexture("WISUCKS", TexMan.Type_MiscPatch); // "sucks"
Par = TexMan.CheckForTexture("WIPAR", TexMan.Type_MiscPatch); // "par"
enteringPatch = TexMan.CheckForTexture("WIENTER", TexMan.Type_MiscPatch); // "entering"
finishedPatch = TexMan.CheckForTexture("WIF", TexMan.Type_MiscPatch); // "finished"
lnametexts[0] = wbstartstruct.thisname;
lnametexts[1] = wbstartstruct.nextname;
authortexts[0] = wbstartstruct.thisauthor;
authortexts[1] = wbstartstruct.nextauthor;
bg = InterBackground.Create(wbs);
noautostartmap = bg.LoadBackground(false);
initStats();
}
protected virtual void initStats() {}
protected virtual void updateStats() {}
protected virtual void drawStats() {}
native static int, int, int GetPlayerWidths();
native static Color GetRowColor(PlayerInfo player, bool highlight);
native static void GetSortedPlayers(in out Array<int> sorted, bool teamplay);
}