-
Notifications
You must be signed in to change notification settings - Fork 1
/
inc__r2dialogs.pas
2113 lines (1789 loc) · 109 KB
/
inc__r2dialogs.pas
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
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{*******************************************************************************
NFK [R2]
Dialog Library
Info:
Draws dialogs and windows.
Also handles input controls.
Contains:
procedure ShowCriticalError(caption,text1,text2 : shortstring);
procedure TMainForm.apperror(sender:TObject; E: Exception);
procedure DrawConsole;
Procedure FillMP_ProvidersMirror;
procedure DrawMenu_MapMang;
function ClipWINDOWEx(x,y, width, height:word):byte;
procedure ComboAddHistory(var Combo: TComboBoxNFK);
function DrawCombo(x,y : word; var Combo: TComboBoxNFK) : boolean;
function DrawWINDOW(Caption, Button: shortString;x,y, width, height:word; type_: byte) :boolean;
procedure DrawMenu;
procedure DeathMessage(f : TPlayer ; att : TMonoSprite; tp : byte);
*******************************************************************************}
procedure ShowCriticalError(caption,text1,text2 : shortstring);
begin
mapcansel := 15;
SYS_SHOWCRITICAL:=TRUE;
SYS_SHOWCRITICAL_CAPTION:=caption;
SYS_SHOWCRITICAL_TEXT1:=text1;
SYS_SHOWCRITICAL_TEXT2:=text2;
menuwantorder := MENU_PAGE_MAIN;
TGR:=0;CTGR:=0;
end;
//------------------------------------------------------------------------------
procedure TMainForm.apperror(sender:TObject; E: Exception);
var errmsg : string;
begin
//socket errors
errmsg := '';
if pos('socket error 10060',lowercase(e.message))<> 0 then errmsg := 'Connection timed out';
if pos('socket error 10061',lowercase(e.message))<> 0 then errmsg := 'Connection refused';
if errmsg<>'' then begin
ShowCriticalError('Disconnected','NFK PLANET possibly down','Error: '+errmsg);
applyHcommand('disconnect');
exit;
end;
if (pos('async lookup',lowercase(e.message))<> 0)
or (pos('10049',lowercase(e.message))<> 0)
or (pos('10065',lowercase(e.message))<> 0)
then begin
mp_step := 0;
BNET_LOBBY_STATUS := 3;
lobby.active := false;
exit;
end;
if (pos('socket error 1005',lowercase(e.message))<> 0) then begin
if inmenu=false then addmessage('^3NFKPLANET: Connection to NFK PLANET lost...') else
begin
ShowCriticalError('Disconnected','Disconnected from NFK PLANET','');
applyHcommand('disconnect');
end;
exit;
end;
addmessage('Internal Error: '+E.Message);
// Application.ShowException(E);
SND.play(SND_error,0,0);
exit;
end;
//------------------------------------------------------------------------------
procedure DrawConsole;
var i,b,wdh: word;
tmp : integer;
begin
if (not inconsole) and (SYS_CONSOLE_Y = 0) then exit;
if inconsole then begin
// conn: clear messagemode
if MESSAGEMODE > 0 then begin
MESSAGEMODE := 0;
messagemode_str := '';
SYS_MESSAGEMODE_POS := 0;
end; //----------------------
if SYS_CONSOLE_Y < SYS_CONSOLE_MAXY then begin
inc(SYS_CONSOLE_Y, SYS_CONSOLE_DELIMETER);
if SYS_CONSOLE_Y > SYS_CONSOLE_MAXY then SYS_CONSOLE_Y := SYS_CONSOLE_MAXY;
end;
end else
if SYS_CONSOLE_Y > 0 then begin
if SYS_CONSOLE_Y - SYS_CONSOLE_DELIMETER > 0 then
dec(SYS_CONSOLE_Y,SYS_CONSOLE_DELIMETER)
else SYS_CONSOLE_Y := 0;
end;
// console scroller scrolling.
if OPT_NOCONSOLESCROLL=false then
if mapcansel=0 then
if inconsole then begin
if iskey(mScrollUp) then if conmsg_index < conmsg.count+1-SYS_CONSOLE_MAXY div 15 then inc(conmsg_index);
if iskey(mScrollDn) then if conmsg_index > 0 then dec(conmsg_index);
end;
with mainform do begin
if SYS_CUSTOM_GRAPH_CONSOLE then begin
//POwerGraph.Antialias := true;
if SYS_CONSOLE_STRETCH then
POwerGraph.TextureCol (images[49],0,0,640,0,640,SYS_CONSOLE_Y,0,SYS_CONSOLE_Y,(SYS_CONSOLE_ALPHA shl 24) + $FFFFFF,0,effectSrcAlpha or effectDiffuseAlpha) else
POwerGraph.TextureCol (images[49],0,SYS_CONSOLE_Y-480,640,SYS_CONSOLE_Y-480,640,SYS_CONSOLE_Y,0,SYS_CONSOLE_Y,(SYS_CONSOLE_ALPHA shl 24) + $FFFFFF,0,effectSrcAlpha or effectDiffuseAlpha);
//POwerGraph.Antialias := false;
end else begin
// conn: old console
//for i := 0 to 4 do for b := 0 to 4 do if 32*b-16 > 0 then
// PowerGraph.RenderEffectCol(Images[6], round(128*i), round(SYS_CONSOLE_Y-480+128*b-32-128), (SYS_CONSOLE_ALPHA shl 24) + $FFFFFF , 0, effectSrcAlpha or effectDiffuseAlpha);
// conn: console animation
tmp := STIME mod (128 * 128) div 128;
for i := 0 to 5 do for b := 0 to 4 do
PowerGraph.RenderEffectCol(Images[6], 128*i -tmp, round(SYS_CONSOLE_Y-480+128*b-32-128), (SYS_CONSOLE_ALPHA shl 24) + $FFFFFF , 0, effectSrcAlpha or effectDiffuseAlpha);
// conn: console animation, overlay
for i := 0 to 6 do for b := 0 to 4 do
PowerGraph.RenderEffectCol(Images[7], 128*i -tmp-32, round(SYS_CONSOLE_Y-480+128*b-32-128)-tmp, (SYS_CONSOLE_ALPHA shl 24) + $FFFFFF , 0, effectAdd or effectDiffuseAlpha);
// conn: console animation, overlay bottom
for i := 0 to 6 do
POwerGraph.TextureCol(Images[7],
128*(i)-tmp-32, round(SYS_CONSOLE_Y-480+128*4-32)-tmp, // x1,y1 left top
128*(i+1)-tmp-32,round(SYS_CONSOLE_Y-480+128*4-32)-tmp, // x2, y2 right top
128*(i+1)-tmp-32, SYS_CONSOLE_Y, // x3, y3 right bottom
128*(i)-tmp-32, SYS_CONSOLE_Y, // x4, y4 left bottom
(SYS_CONSOLE_ALPHA shl 24) + $FFFFFF,0,effectAdd or effectDiffuseAlpha);
end;
Font1.scale := 256;
Font1.AlignedOut(Version, 0, SYS_CONSOLE_Y-20,taFinal,tanone, $0000EE); // conn: engine version
Font1.TextOut(']', 1, SYS_CONSOLE_Y-20, clWhite);
if SYS_CONSOLE_POS = Length(constr) then begin
ParseColorText(constr+'^b_', 8, SYS_CONSOLE_Y-20,0); // conn: caret , at the end
end else begin
wdh := Font1.TextWidth (']'+ copy( StripColorName(constr), 1, SYS_CONSOLE_POS) );
ParseColorText('^b_', wdh+2, SYS_CONSOLE_Y-20, 0); // conn: caret , under printed text
ParseColorText(constr, 8, SYS_CONSOLE_Y-20,0);
end;
// font1.textout(inttostr(SYS_CONSOLE_POS), 400,200,$FFFFFF);
//
for i := 0 to conmsg.count-1 do begin // conn: last console log lines
if (SYS_CONSOLE_Y-30-15*i) > -20 then
if i+conmsg_index <conmsg.count then
ParseColorText(conmsg[i+conmsg_index], 1, SYS_CONSOLE_Y - 40 - 15*i,0);
if i >=30 then break;
end;
if conmsg_index>0 then Font1.TextOut('^ ^ ^ ^ ^',565,SYS_CONSOLE_Y-32,clwhite);
PowerGraph.Line (0,SYS_CONSOLE_Y,640,SYS_CONSOLE_Y,clRed,effectNone);
end;
end;
//------------------------------------------------------------------------------
procedure ADDDirContent(StartDir: string; var List:TStringList);
var SearchRec : TSearchRec;
i : word;
tmp: TStringList;
tss:string;
begin
list.clear;
if StartDir[Length(StartDir)] <> '\' then StartDir := StartDir + '\';
if FindFirst(startdir+'*.*', faAnyFile, SearchRec) = 0 then begin
tss := lowercase(extractfileext(searchrec.name));
if (SearchRec.Attr and faDirectory) = faDirectory then
if (SearchRec.Name <> '.') then
// if (tss='.mapa') or (tss='.ndm') then
list.add(searchrec.name);
while FindNext(SearchRec) = 0 do if (SearchRec.Name <> '.') then
if (SearchRec.Attr and faDirectory) = faDirectory then
// if (tss='.mapa') or (tss='.ndm') then
list.add(searchrec.name);
end;
FindClose(SearchRec);
list.sort;
tmp := TStringList.create;
if FindFirst(startdir+'*.*', faAnyFile, SearchRec) = 0 then begin
tss := lowercase(extractfileext(searchrec.name));
if (SearchRec.Attr and faDirectory) <> faDirectory then
if (tss='.mapa') or (tss='.ndm') then
tmp.add(searchrec.name);
while FindNext(SearchRec) = 0 do if (SearchRec.Name <> '.') then begin
tss := searchrec.name;
tss := lowercase(extractfileext(searchrec.name));
if (SearchRec.Attr and faDirectory) <> faDirectory then
if (tss='.mapa') or (tss='.ndm') then
tmp.add(searchrec.name);
end;
end;
FindClose(SearchRec);
tmp.sort;
list.AddStrings(tmp);
tmp.free;
end;
//------------------------------------------------------------------------------
// executes changedir in map selection dialog.
procedure BrimMapList(Dir:String);
var gobw : boolean; // going backwards
i : word;
searchdir : string;
begin
gobw := false;
if extractfilename(dir)= '..' then begin
searchdir := extractfilename(MapPath);
lastmap := -1;
gobw := true;
end;
chdir(dir);
dir := GetCurrentDir;
// addmessage('^2 NOW DIR IS:'+dir);
ADDDirContent(Dir, maplist);
if lowercase(dir) = lowercase(rootdir+'\maps') then maplist.delete(0); // cant get out from basenfk\maps..
mapindex := 0;
if gobw = false then mapofs := 0;
MapPath := dir;
if gobw then begin
for i := 0 to maplist.count-1 do
if maplist[i] = searchdir then begin
mapindex := i;
break;
end;
if mapindex < 0 then mapindex := 0;
if mapindex > maplist.count-1 then
mapindex := maplist.count-1;
mapofs := 0;
if mapindex-8 >0 then mapofs := mapindex -7;
end;
end;
//------------------------------------------------------------------------------
// replace russian(mexican, columbian,china, etc) string of connections names to english strings. Read from DirectPlay registry data.
Procedure FillMP_ProvidersMirror;
var Reg : TRegistry;
i,b : byte;
tmp: TStringList;
begin
exit;
Tmp := TStringList.Create;
Reg := TRegistry.Create;
MP_Providers.Assign(MP_Providers);
Reg.RootKey := HKEY_LOCAL_MACHINE;
if MP_Providers.count <= 1 then begin
addmessage('error: failed to enumerate connection types. Possibly DirectX Failure. Multiplayer may not available...');
exit;
end;
with reg do begin
OpenKey('Software\Microsoft\DirectPlay\Service Providers', false);
GetKeyNames(TMP);
if TMP.count <= 1 then begin
addmessage('error: failed to enumerate connection types. Possibly DirectX Failure. Multiplayer may not available...');
exit;
end;
Reg.CloseKey;
for i := 0 to TMP.Count-1 do begin
Reg.RootKey := HKEY_LOCAL_MACHINE;
OpenKey('Software\Microsoft\DirectPlay\Service Providers\'+TMP[i], false);
for b := 0 to MP_Providers.Count-1 do
if ReadString('DescriptionW') = MP_Providers[b] then
MP_Providers[b] := tmp[i];
Reg.CloseKey;
end;
end;
Reg.Free;
TMP.Free;
end;
//------------------------------------------------------------------------------
//draw Map Preview, at hotseat and multiplayer scree(eeE)eeeens.
procedure DrawMenu_MapMang;
var ofs : real;
i,c,a:integer;
cur:Tpoint;
clr:cardinal;
off : tpoint;
begin
with mainform do begin
DrawWindow('Map','',7,54,259,168,0); // conn: hmm, interesting
// preview rect
if (extractfileext(maplist[mapindex]) <> '') and (maplist[mapindex] <> '..') then begin
PowerGraph.FillRect(43, 272, 162, 122, $333333, effectMul);
PowerGraph.Rectangle(43, 272, 162, 122, $0000ca, $000000, effectadd);
end;
if maplist.count > 2 then begin
try
ofs := ((mapindex)/(maplist.count-1));
except ofs := 0; end;
if ofs > 1 then ofs := 1;
if ofs < 0 then ofs := 0;
end else ofs := 0;
// PowerGraph.FillRect(249, round(87+104*ofs), 18, 12, $0000ca, effectnONE);
if maplist.count >= 2 then
PowerGraph.RenderEffectCol(images[57],249,85+ (100*mapindex div (maplist.Count-1)),$0000da, 5,effectSrcAlpha);
PowerGraph.SetClipRect(rect(7,54,246,168+54));
for i := 0 to 8 do begin
if i+mapofs <= maplist.Count -1 then begin
if i+mapofs = mapindex then begin
PowerGraph.FillRectMap ( 12 , 72+16*i , 246, 72+16*i , 12 + 234, 72+16*i + 17, 12 , 72+16*i + 17, (font_alpha_s shl 24)+$0000Ca, (font_alpha_s shl 24)+$0000Ca , (font_invalpha_s shl 24)+$0000Ca,(font_invalpha_s shl 24)+$0000Ca, 2 or $100);
if (extractfileext(maplist[i+mapofs]) = '') or (maplist[i+mapofs] = '..') then begin
if maplist[i+mapofs] = '..' then // render .. icon.
PowerGraph.RenderEffect (Images[35],14,74+16*i,10,effectSrcAlpha) else
begin // render folder icon
PowerGraph.RenderEffectCol(Images[35],13,72+16*i,$0000ea,11,effectSrcAlpha);
Font2.TextOut(maplist[i+mapofs],30,74+16*i,clWhite);
end;
end else
Font2.TextOut(maplist[i+mapofs],14,74+16*i,clWhite);
end else
if (extractfileext(maplist[i+mapofs]) = '') or (maplist[i+mapofs] = '..') then begin
if maplist[i+mapofs] = '..' then // render .. icon.
PowerGraph.RenderEffect (Images[35],14,74+16*i,10,effectSrcAlpha) else
begin // render folder icon
PowerGraph.RenderEffectCol (Images[35],13,72+16*i,$0000ea,9,effectSrcAlpha);
Font2.TextOut(maplist[i+mapofs],30,74+16*i,clWhite);
end;
end else
Font2.TextOut(maplist[i+mapofs],14,74+16*i,clWhite);
end;
end;
PowerGraph.SetClipRect(rect(0,0,640,480));
// LOL
// rectangle(menux+12,menuy+292,menux+248,menuy+398);
// WrapTextOut(menux+16,menux+240,menuy+294,menuy+446,'Hi there wanna fuck. or whatever.... heehhee hehhehe. shts killa asd d sd df dsf sflkj lfsd sldkf sdlkfj sdf sldkfjs ldkf jsld jsdl kfjsldk fjsdlfkj sdlfkj sldfk jsdlkf jsldkfj sdlfkj sdlkfjlksd jf sdlkfj sldkjf sldfj sdlkfj sldkfj lsdkfj sldkfj lkjs ',DXDraw.Surface.Canvas,DXDraw.Surface.Canvas.font);
// end;
// Mouse pick
getcursorpos(cur);
if MENUEDITMODE=0 then
if iskey(mbutton1) and (mapcansel=0) and (cur.x >= 15) and (cur.x <= 246) and (cur.y >= 72) and (cur.y <= 72+280) then
for i := 0 to 8 do
if (cur.y >= 72+16*i) and (cur.y < 72+16*i+16 ) then
if i + mapofs <= maplist.count-1 then
if mapindex <> i + mapofs then begin
mapindex := i + mapofs;
SND.play(SND_Menu1,0,0);
mapcansel:=2;
if abs(cur.y-72+16*i) > 30 then
mapcansel:=1;
end;
if (extractfileext(maplist[mapindex]) <> '') and (maplist[mapindex] <> '..') then
if lastmap <> mapindex then begin
// addmessage('^3DEBUG: trying to load: '+MAPPATH+'\'+maplist[mapindex]);
LOADMAP (MAPPATH+'\'+maplist[mapindex],true);
lastmap := mapindex;
end;
// map preview..
off.x := 0;
off.y := 0;
if not IsHotSeatMap then begin
off.x := BRICK_X div 4 - round(cos(gettickcount/1600)* ((BRICK_X div 2)-1));
if off.x <= 0 then off.x := 0;
if off.x >= BRICK_X-20 then off.x := BRICK_X-20;
off.y := BRICK_Y div 4 - round(sin(gettickcount/1600)* ((BRICK_Y div 2)-1));
if off.y <= 0 then off.y := 0;
if off.y >= BRICK_Y-30 then off.y := BRICK_Y-30;
end;
if (extractfileext(maplist[mapindex]) <> '') and (maplist[mapindex] <> '..') then
for c := off.x to 19+off.x do begin // PREVIEW!!!!
for a := off.y to 29+off.y do begin
if AllBricks[c,a].image > 0 then begin
//powergraph.antialias := true;
if (AllBricks[c,a].image > 0) and (AllBricks[c,a].image< 54) then PowerGraph.TextureMap(Images[IMAGE_ITEM], 44+c*8-off.x*8, 273+a*4-off.y*4,44+c*8+8-off.x*8,273+a*4-off.y*4,44+c*8+8-off.x*8,273+a*4+4-off.y*4,44+c*8-off.x*8,273+a*4+4-off.y*4, AllBricks[c,a].image, effectSrcAlpha) else
if (AllBricks[c,a].image >= 54) and (AllBricks[c,a].image< 182) then begin
if SYS_USECUSTOMPALETTE then begin
if SYS_USECUSTOMPALETTE_TRANSPARENT then
PowerGraph.TextureMap(Images[48], 44+c*8-off.x*8, 273+a*4-off.y*4,44+c*8+8-off.x*8,273+a*4-off.y*4,44+c*8+8-off.x*8,273+a*4+4-off.y*4,44+c*8-off.x*8,273+a*4+4-off.y*4, AllBricks[c,a].image-54, effectSrcAlpha)
else
PowerGraph.TextureMap(Images[48], 44+c*8-off.x*8, 273+a*4-off.y*4,44+c*8+8-off.x*8,273+a*4-off.y*4,44+c*8+8-off.x*8,273+a*4+4-off.y*4,44+c*8-off.x*8,273+a*4+4-off.y*4, AllBricks[c,a].image-54, effectNone)
end else
PowerGraph.TextureMap(Images[IMAGE_BR1], 44+c*8-off.x*8, 273+a*4-off.y*4,44+c*8+8-off.x*8,273+a*4-off.y*4,44+c*8+8-off.x*8,273+a*4+4-off.y*4,44+c*8-off.x*8,273+a*4+4-off.y*4, AllBricks[c,a].image-54, effectNone)
end else if (AllBricks[c,a].image >= 181) then PowerGraph.TextureMap(Images[IMAGE_BR2], 44+c*8-off.x*8, 273+a*4-off.y*4,44+c*8+8-off.x*8,273+a*4-off.y*4,44+c*8+8-off.x*8,273+a*4+4-off.y*4,44+c*8-off.x*8,273+a*4+4-off.y*4, AllBricks[c,a].image-182, effectNone);
//powergraph.antialias := false;
end;
end;
end;
{ // specobj preview.
if NUM_OBJECTS_0 = false then for c := 0 to NUM_OBJECTS do if MapObjects[c].active = true then
if MapObjects[c].objtype = 1 then begin
mainform.PowerGraph.RenderEffect(mainform.Images[30], 44+(MapObjects[c].x*32-16) div 4, 273+(MapObjects[c].y*16-30) div 4,64,0, effectSrcAlpha);
mainform.PowerGraph.RenderEffect(mainform.Images[31], 44+(MapObjects[c].x*32+6) div 4, 273+(MapObjects[i].y*16-25) div 4,64,0, effectSrcAlpha);
end;
powergraph.antialias := false;
}
// available gamemodes icons
if (extractfileext(maplist[mapindex]) <> '') and (maplist[mapindex] <> '..') then begin
clr := $AAFFFFFF;
i := 184;
if mapinfo.supportDOM then begin
powergraph.rendereffectcol(images[51],i,276,clr,4,effectSrcAlpha or EffectDiffuseAlpha);
dec(i, 20);
end;
if mapinfo.supportCTF then begin
powergraph.rendereffectcol(images[51],i,276,clr,5,effectSrcAlpha or EffectDiffuseAlpha);
dec(i,20);
end;
if mapinfo.supportTRIX then begin
powergraph.rendereffectcol(images[51],i,276,clr,6,effectSrcAlpha or EffectDiffuseAlpha);
dec(i,20);
end;
end;
end;
end;
//------------------------------------------------------------------------------
function ClipWINDOWEx(x,y, width, height:word):byte;
var cur : TPoint;
left : word;
begin
GetCursorPos(cur);
result := 0;
left := x + width div 2 - 36-5;
if (cur.x >= left) and (cur.x <= left+26*3) and (cur.y >= y+height - 50) and (cur.y <= y+height - 50 + 30) then
result := 1;
if (cur.x >= x + width - 18) and (cur.x <= x + width-2) and (cur.y >= y+16) and (cur.y <= y+30) then result := 2; // scroll up
if (cur.x >= x + width - 18) and (cur.x <= x + width-2) and (cur.y >= y-18 + height) and (cur.y <= y +height - 4) then result := 3;
end;
//------------------------------------------------------------------------------
procedure ComboAddHistory(var Combo: TComboBoxNFK);
var i : byte;
begin
if combo.text = '' then exit;
if combo.ts.count>0 then
for i := 0 to combo.ts.count-1 do
if lowercase(combo.ts[i]) = lowercase(combo.text) then begin
if i > 0 then combo.ts.Exchange (i,0);
exit;
end;
combo.ts.Insert(0,combo.text);
if combo.ts.count=7 then combo.ts.Delete (6);
end;
//------------------------------------------------------------------------------
function DrawCombo(x,y : word; var Combo: TComboBoxNFK) : boolean;
var cur : TPoint;
clr : TColor;
i : byte;
left: word;
begin
GetCursorPos(Cur);
MainForm.PowerGraph.FrameRect (x,y,200,20,$0000ca,0);
mainform.Font2b.textout(combo.Text ,x+2,y+1,clwhite);
left := mainform.Font2b.TextWidth(combo.Text ) + 2;
if gettickcount mod 800 < 400 then mainform.PowerGraph.Line(x+left+2,y+2,x+left+2,y+17,clwhite,0);
if (cur.x >= x + 182) and (cur.x <= x + 200) and (cur.y >= y+1) and (cur.y <= y+19) then begin
clr := $0000da;
if (mapcansel=0) and (mouseLeft) then begin
combo.Opened := not combo.Opened;
mapcansel := 2;
end;
end
else clr := $0000ca;
//MainForm.PowerGraph.Antialias := true;
MainForm.PowerGraph.RenderEffectCol(mainform.Images[57],x + 182,y+1,330,clr,17,effectSrcAlpha); // UP
//MainForm.PowerGraph.Antialias := false;
if combo.ts.Count > 0 then
if combo.Opened then begin
MainForm.PowerGraph.FillRect (x,y+19,200,20*combo.ts.count-1+2, $aa000000,2 or $100);
MainForm.PowerGraph.FrameRect (x,y+19,200,20*combo.ts.count-1+2,$0000ca,0);
if (cur.x >= x) and (cur.y <= x+200) and (cur.y >= y+19) and (cur.y <= y+20+20*combo.ts.count) then begin
for i := 0 to combo.ts.count-1 do
if (cur.y >= y+19+20*i+1) and (cur.y < y+19+20*i+20 ) then begin
mainform.PowerGraph.FillRectMap ( x +1, y+19+20*i , x+199, y+19+20*i , x+199, y+19+20*i+20, x +1 , y+19+20*i+20, (font_alpha_s shl 24)+$0000Ca, (font_alpha_s shl 24)+$0000Ca , (font_invalpha_s shl 24)+$0000Ca,(font_invalpha_s shl 24)+$0000Ca, 2 or $100);
if mouseLeft then begin
// SND.play(snd_menu1,0,0);
combo.Text := combo.ts[i];
combo.Opened := false;
end;
end;
end;
if (mouseLeft) and (mapcansel=0) then combo.Opened := false;
for i := 0 to combo.ts.count - 1 do
mainform.Font2b.TextOut(combo.ts[i],x+2,y+20*i+20, clwhite);
// Mouse pick
end;
if combo.ts.Count = 0 then
if combo.Opened then begin
MainForm.PowerGraph.FillRect (x,y+19,200,4, $aa000000,2 or $100);
MainForm.PowerGraph.FrameRect (x,y+19,200,4,$0000ca,0);
end;
// connectin..
if not combo.opened then if (mapcansel=0) and (iskey(VK_RETURN)) then
if length(combo.text)>0 then begin
ComboAddHistory(combo);
applyHcommand('connect '+combo.text);
mapcansel:=2;
SND.play(SND_Menu2,0,0);
end;
end;
//------------------------------------------------------------------------------
function DrawWINDOW(Caption, Button: shortString;x,y, width, height:word; type_: byte) :boolean;
var left : word;
clr : TCOLOR;
cur : TPoint;
begin
result := false;
MainForm.PowerGraph.RenderEffectCol(mainform.Images[57],x,y, $0000ca,0,effectSrcAlpha); // 7
MainForm.PowerGraph.RenderEffectCol(mainform.Images[57],x,y+height-5, $0000ca,8,effectSrcAlpha); // 1
MainForm.PowerGraph.RenderEffectCol(mainform.Images[57],x+width-24,y, $0000ca,2+type_,effectSrcAlpha); // 9
MainForm.PowerGraph.RenderEffectCol(mainform.Images[57],x+width-24,y+height-5, $0000ca,11,effectSrcAlpha); // 3
MainForm.PowerGraph.TextureCol(mainform.Images[57], x+24,y,x+width-24,y,x+width-24,y+23,x+24,y+23,$0000ca,1,effectSrcAlpha); //8
MainForm.PowerGraph.TextureCol(mainform.Images[57], x+24,y+height-5,x+width,y+height-5,x+width-24,y+23+height-5,x+24,y+23+height-5,$0000ca,9,2);//2
MainForm.PowerGraph.TextureCol(mainform.Images[57], x,y+14,x+24,y+23,x+24,y+height-5,x,y+height-5,$0000ca,4,2);//4
MainForm.PowerGraph.TextureCol(mainform.Images[57], x+width-24,y+23,x+width,y+14,x+width,y+height-5,x+width-24,y+height-5,$0000ca,6+type_,2);//6
if type_ = 1 then
MainForm.PowerGraph.FillRectMap (x + 4,y + 16, x + width - 18 +type_*14, y + 16, x + width - 18+type_*14, y + height - 4 , x +4, y + height - 4, $b7000000,2 or $100) else
MainForm.PowerGraph.FillRectMap (x + 4,y + 16, x + width - 18 +type_*14, y + 16, x + width - 18+type_*14, y + height - 4 , x +4, y + height - 4, $aa000000,2 or $100);
if Caption <> '' then
MainForm.Font2ss.TextOut(Caption, x+4, y, CLWHITE);
left := x + width div 2 - 36-5;
GetCursorPos(cur);
if Button <> '' then begin
if (cur.x >= left) and (cur.x <= left+26*3) and (cur.y >= y+height - 50) and (cur.y <= y+height - 50 + 30) then begin
result := true;
clr := $0000da;
end else clr := $0000ca;
MainForm.PowerGraph.RenderEffectCol(mainform.Images[57], left,y+height - 50,left+60,clr,12,effectSrcAlpha); //btn
MainForm.PowerGraph.RenderEffectCol(mainform.Images[57], left+24,y+height - 50,left+60,clr,13,effectSrcAlpha); //btn
MainForm.PowerGraph.RenderEffectCol(mainform.Images[57], left+24*2,y+height - 50,left+60,clr,14,effectSrcAlpha); //btn
MainForm.Font4.TextOut(Button, left + 26, y+height - 45, ClWHITE);
end;
if type_ =0 then begin
if (cur.x >= x + width - 18) and (cur.x <= x + width-2) and (cur.y >= y+16) and (cur.y <= y+30) then
clr := $0000da
else clr := $0000ca;
MainForm.PowerGraph.RenderEffectCol(mainform.Images[57],x + width - 18,y+16,clr,16,effectSrcAlpha); // UP
if (cur.x >= x + width - 18) and (cur.x <= x + width-2) and (cur.y >= y-18 + height) and (cur.y <= y +height - 4) then
clr := $0000da
else clr := $0000ca;
MainForm.PowerGraph.RenderEffectCol(mainform.Images[57],x + width - 18,y-18 + height,clr,17,effectSrcAlpha); // UP
end;
end;
//------------------------------------------------------------------------------
procedure GoMenuPage(id : byte);
begin
IF id=MENU_PAGE_MAIN then begin
menu1_alpha := 0;
menu2_alpha := 0;
menu3_alpha := 0;
menu4_alpha := 0;
menu5_alpha := 0;
menu6_alpha := 0;
button_alpha := 0;
button1_alpha := 0;
end;
if id=MENU_PAGE_MULTIPLAYER then begin
MP_STEP:=0;
tgb := 0;
end;
if id=MENU_PAGE_HOTSEAT then
if TeamGame then
MATCH_GAMETYPE := GAMETYPE_FFA;
SND.play(SND_Menu2,0,0);
MENUEDITMODE := 0;
MENUEDITMAX := 0;
MENUEDITSTR := '';
mapcansel := 20;
menuburn:=1;
menuwantorder := id;
menu_sl := 0;
ctgr := 0;
tgr := 255;
end;
//------------------------------------------------------------------------------
procedure BrimDemosList(Dir:String);
var gobw : boolean; // going backwards
i : word;
searchdir : string;
begin
gobw := false;
if extractfilename(dir)= '..' then begin
searchdir := extractfilename(DemoPath);
gobw := true;
end;
if not directoryexists(dir) then exit;
chdir(dir);
dir := GetCurrentDir;
ADDDirContent(Dir, demolist);
if lowercase(dir) = lowercase(rootdir+'\demos') then demolist.delete(0); // cant get out from basenfk\demos..
if gobw = false then demoofs := 0;
DemoPath := dir;
if gobw then begin
for i := 0 to Demolist.count-1 do
if demolist[i] = searchdir then begin
demoindex := i;
break;
end;
if demoindex < 0 then demoindex := 0;
if demoindex > demolist.count-1 then
demoindex := demolist.count-1;
demoofs := 0;
if demoindex-21 >0 then demoofs := demoindex -20;
end;
end;
//------------------------------------------------------------------------------
{$Include inc__mainMenu}
{
procedure DrawMenu;
CONST HG : byte = 20;
var cur : TPoint;
i,b,a : integer;
bb: byte;
// color:integer;
EACTION : boolean;
alpha : cardinal;
RG : word;
BCreateEnabled : boolean;
BFightEnabled : boolean;
clr : TColor;
s,s2 : string;
selected: byte;
begin
MainMenu := r2menu.Create;
MainMenu.
end;
}
//------------------------------------------------------------------------------
procedure DeathMessage(f : TPlayer ; att : TMonoSprite; tp : byte);
begin
// addmessage(f.netname + ' died. killed by ' +att.spawner.netname+' .tp='+inttostr(tp));
if (tp > 0) and (tp <= 2) then begin
if att.weapon = 1 then addmessage(f.netname + ' ^7^ntripped on his own grenade.') else
if att.weapon = 3 then addmessage(f.netname + ' ^7^nmelted himself.') else // conn: new plasma , suicide
addmessage(f.netname + ' ^7^nblew himself up.');
exit;
end;
if tp = DIE_LAVA then begin
addmessage(f.netname + ' ^7^ndoes flip in lava.');
exit;
end;
if tp = DIE_WRONGPLACE then begin
addmessage(f.netname + ' ^7^nwas in the wrong place.');
exit;
end;
if tp = DIE_INPAIN then begin
addmessage(f.netname + ' ^7^ndied in pain.');
exit;
end;
if tp = DIE_WATER then begin
addmessage(f.netname + ' ^7^nsank like a rock.');
exit;
end;
if att.objname = 'gauntlet' then addmessage(f.netname +' ^7^nwas pummeled by '+att.spawner.netname);
if att.objname = 'machine' then addmessage(f.netname +' ^7^nwas machinegunned by '+att.spawner.netname);
if att.objname = 'shotgun' then addmessage(f.netname +' ^7^nwas gunned down by '+att.spawner.netname);
if (att.objname= 'rocket') and (att.weapon = 0) then addmessage(f.netname +' ^7^nate '+att.spawner.netname+'^7^n''s rocket');
if (att.objname= 'rocket') and (att.weapon = 1) then addmessage(f.netname +' ^7^nwas shredded by '+att.spawner.netname+'^7^n''s shrapnel');
if (att.objname= 'rocket') and (att.weapon = 2) then addmessage(f.netname +' ^7^nwas blasted by '+att.spawner.netname+'^7^n''s bfg');
// conn: new plasma . All splash damage objects are made of rocket
if (att.objname = 'rocket') and (att.weapon = 3) then addmessage(f.netname+' ^7^nwas melted by '+att.spawner.netname+'^7^n''s plasmagun');
if (att.objname = 'shaft') or (att.objname = 'shaft2') then addmessage(f.netname+' ^7^nwas electrocuted by '+att.spawner.netname);
if att.objname = 'rail' then addmessage(f.netname+' ^7^nwas railed by '+att.spawner.netname);
// conn: old plasma
//if att.objname = 'plasma' then addmessage(f.netname+' ^7^nwas melted by '+att.spawner.netname+'^7^n''s plasmagun');
end;
//------------------------------------------------------------------------------
procedure LoadingShow(text: string);
//var x : word;
begin
exit;
{ if not OPT_SHOWLOADING then exit;
// if mainform.dxdraw.candraw = false then exit;
with mainform.dxdraw.surface.canvas do begin
Brush.Style := bsSolid;
Pen.color := clBlack;
Brush.Color := clBlack;
// pen.color := $0000AA;
font.name := 'arial';
rectangle(250,400,390,460);
font.style := [fsBold];
Font.Size := 14;
Font.Color := clWhite;
// x := round(320-(mainform.dxdraw.surface.canvas.TextWidth(text)/2));
// addmessage(inttostr(X));
Textout(276, 420, 'LOADING');
release;
end;
mainform.dxdraw.Flip; }
end;
procedure ShadowTextOut(x,y : integer;text : string; canvas : TCanvas; fontcolor : integer;fontsize : byte);
begin
with canvas do begin
Brush.Style := bsClear;
font.name := canvas.font.name;
Font.Size := fontsize;
Font.Color := clblack;
Textout(menux+x+2, menuy+y+2, text);
Font.Color := fontcolor;
Textout(menux+x, menuy+y, text);
end;
end;
function CUSTOMSORT_PL (List: TStringList; Index1, Index2: Integer): Integer;
var num1, num2 : integer;
begin
try num1 := strtoint(list[index1]);
except num1 := 0; end;
try num2 := strtoint(list[index2]);
except num2 := 0; end;
if num1 = num2 then begin
Result := 0;
exit;
end;
if num1 > num2 then result := -1 else result := 1;
end;
function CUSTOMSORT_PING (List: TStringList; Index1, Index2: Integer): Integer;
var num1, num2 : integer;
begin
if list[index1]='' then num1 := 999 else
if list[index1]='XXX' then num1 := 999 else
try num1 := strtoint(list[index1]);
except num1 := 999; end;
if list[index2]='' then num2 := 999 else
if list[index2]='XXX' then num2 := 999 else
try num2 := strtoint(list[index2]);
except num2 := 999; end;
if num1 = num2 then begin
Result := 0;
exit;
end;
if num1 < num2 then result := -1 else result := 1;
end;
procedure HUD_ShowStats;
var
stx,sty : word;
stp,sti : byte;
begin
with mainform do begin
// ------------------------
stx := 420;
sty := 120;
if (SYS_P1STATSX > 400) or (SYS_P2STATSX < 240) then exit;
for sti := 0 to 1 do begin
if sti = 0 then begin
stx := mainform.powergraph.width - 220;
stp := OPT_1BARTRAX;
end else begin
stx := 20;
stp := OPT_2BARTRAX;
if not SYS_BAR2AVAILABLE then break;
end;
if players[stp] <> nil then begin
Font2.TextOut('Stats for ',stx,sty, clWhite);
ParseColorText(players[stp].netname,stx+60,sty,5);
Font2.TextOut('kills deaths suicides frags',stx,sty+20,clWhite);
Font2.TextOut(inttostr(players[stp].stats.stat_kills),stx+5,sty+35,clAqua);
Font2.TextOut(inttostr(players[stp].stats.stat_deaths ),stx+50,sty+35,clAqua);
Font2.TextOut(inttostr(players[stp].stats.stat_suicide ), stx+110,sty+35,clAqua);
Font2.TextOut(inttostr(players[stp].frags), stx+170,sty+35, clAqua);
Font2.TextOut('Accuracy info:',stx,sty+55,clwhite);
if (players[stp].stats.stat_impressives > 0) or
(players[stp].stats.stat_excellents > 0) or
(players[stp].stats.stat_humiliations > 0) then
Font2.TextOut('Rewards:',stx,sty+250,clwhite);
if players[stp].stats.gaun_hits > 0 then Font2.TextOut('Gauntlet:',stx,sty+75,clYellow);
if mapweapondata.machine = true then Font2.TextOut('Machine:',stx,sty+90,clYellow);
if mapweapondata.shotgun = true then Font2.TextOut('Shotgun:',stx,sty+105,clYellow);
if mapweapondata.grenade = true then Font2.TextOut('Grenade:',stx,sty+120,clYellow);
if mapweapondata.rocket = true then Font2.TextOut('Rocket:',stx,sty+135,clYellow);
if mapweapondata.shaft = true then Font2.TextOut('Shaft:',stx,sty+150,clYellow);
if mapweapondata.rail = true then Font2.TextOut('Rail:',stx,sty+165,clYellow);
if mapweapondata.plasma = true then Font2.TextOut('Plazma:',stx,sty+180,clYellow);
if mapweapondata.bfg = true then Font2.TextOut('BFG:',stx,sty+195,clYellow);
if players[stp].stats.gaun_hits > 0 then Font2.TextOut(inttostr(players[stp].stats.gaun_hits),stx+80,sty+75,clwhite);
if mapweapondata.machine = true then begin
Font2.TextOut(inttostr(players[stp].stats.mach_hits)+'/'+inttostr(players[stp].stats.mach_fire),stx+80,sty+90, clwhite);
if players[stp].stats.mach_fire > 0 then Font2.TextOut(inttostr(round((players[stp].stats.mach_hits * 100) / players[stp].stats.mach_fire))+'%',stx+160,sty+90,claqua)
else Font2.TextOut('0%',stx+160,sty+90,claqua);
end;
if mapweapondata.shotgun = true then begin
Font2.TextOut(inttostr(players[stp].stats.shot_hits)+'/'+inttostr(players[stp].stats.shot_fire),stx+80,sty+105,clwhite);
if players[stp].stats.shot_fire > 0 then Font2.TextOut(inttostr(round((players[stp].stats.shot_hits * 100) / players[stp].stats.shot_fire))+'%',stx+160,sty+105,claqua)
else Font2.TextOut('0%',stx+160,sty+105,claqua);
end;
if mapweapondata.grenade = true then begin
Font2.TextOut( inttostr(players[stp].stats.gren_hits )+'/'+inttostr(players[stp].stats.gren_fire ),stx+80,sty+120,clwhite);
if players[stp].stats.gren_fire > 0 then Font2.TextOut(inttostr(round((players[stp].stats.gren_hits * 100) / players[stp].stats.gren_fire ))+'%',stx+160,sty+120,claqua)
else Font2.TextOut('0%',stx+160,sty+120,claqua);
end;
if mapweapondata.rocket = true then begin
Font2.TextOut(inttostr(players[stp].stats.rocket_hits )+'/'+inttostr(players[stp].stats.rocket_fire ),stx+80,sty+135, clwhite);
if players[stp].stats.rocket_fire > 0 then Font2.TextOut(inttostr(round((players[stp].stats.rocket_hits * 100) / players[stp].stats.rocket_fire ))+'%',stx+160,sty+135, claqua)
else Font2.TextOut('0%',stx+160,sty+135, claqua);
end;
if mapweapondata.shaft = true then begin
Font2.TextOut(inttostr(players[stp].stats.shaft_hits)+'/'+inttostr(players[stp].stats.shaft_fire ),stx+80,sty+150,clwhite);
if players[stp].stats.shaft_fire > 0 then Font2.TextOut(inttostr(round((players[stp].stats.shaft_hits * 100) / players[stp].stats.shaft_fire ))+'%',stx+160,sty+150,claqua)
else Font2.TextOut('0%',stx+160,sty+150,claqua);
end;
if mapweapondata.rail = true then begin
Font2.TextOut(inttostr(players[stp].stats.rail_hits)+'/'+inttostr(players[stp].stats.rail_fire ),stx+80,sty+165, clwhite);
if players[stp].stats.rail_fire > 0 then Font2.TextOut(inttostr(round((players[stp].stats.rail_hits * 100) / players[stp].stats.rail_fire ))+'%',stx+160,sty+165, claqua)
else Font2.TextOut('0%',stx+160,sty+165,claqua);
end;
if mapweapondata.plasma = true then begin
Font2.TextOut(inttostr(players[stp].stats.plasma_hits)+'/'+inttostr(players[stp].stats.plasma_fire ),stx+80,sty+180, clwhite);
if players[stp].stats.plasma_fire > 0 then Font2.TextOut(inttostr(round((players[stp].stats.plasma_hits * 100) / players[stp].stats.plasma_fire ))+'%',stx+160,sty+180, claqua)
else Font2.TextOut('0%',stx+160,sty+180,claqua);
end;
if mapweapondata.bfg = true then begin
Font2.TextOut(inttostr(players[stp].stats.bfg_hits)+'/'+inttostr(players[stp].stats.bfg_fire ),stx+80,sty+195,clwhite);
if players[stp].stats.bfg_fire > 0 then Font2.TextOut(inttostr(round((players[stp].stats.bfg_hits * 100) / players[stp].stats.bfg_fire ))+'%',stx+160,sty+195,claqua)
else Font2.TextOut('0%',stx+160,sty+195,claqua);
end;
Font2.TextOut('dmggiven: ',stx+0,sty+215,cllime);
Font2.TextOut('dmgrecvd: ',stx+0,sty+230,clred);
Font2.TextOut(inttostr(players[stp].stats.stat_dmggiven),stx+80,sty+215,claqua);
Font2.TextOut(inttostr(players[stp].stats.stat_dmgrecvd),stx+80,sty+230,claqua);
if players[stp].stats.stat_impressives > 0 then Font2.TextOut(inttostr(players[stp].stats.stat_impressives),stx+30,sty+275, claqua);
if players[stp].stats.stat_excellents > 0 then Font2.TextOut(inttostr(players[stp].stats.stat_excellents),stx+110,sty+275, claqua);
if players[stp].stats.stat_humiliations > 0 then Font2.TextOut(inttostr(players[stp].stats.stat_humiliations),stx+190,sty+275, claqua);
end; //
end;
if SYS_BAR2AVAILABLE then
if OPT_SHOWSTATS then
if (players[OPT_2BARTRAX] <> nil) then begin
sty := 120;
if players[OPT_2BARTRAX].stats.stat_impressives > 0 then PowerGraph.RenderEffect(Images[34],20,sty+270,0, effectSrcAlpha or effectDiffuseAlpha);
if players[OPT_2BARTRAX].stats.stat_excellents > 0 then PowerGraph.RenderEffect(Images[34],100,sty+270,1, effectSrcAlpha or effectDiffuseAlpha);
if players[OPT_2BARTRAX].stats.stat_humiliations > 0 then PowerGraph.RenderEffect(Images[34],180,sty+270,2, effectSrcAlpha or effectDiffuseAlpha);
end;
if OPT_1BARTRAX < $FF then
if OPT_SHOWSTATS then
if (players[OPT_1BARTRAX] <> nil) then begin
sty := 120;
if players[OPT_1BARTRAX].stats.stat_impressives > 0 then PowerGraph.RenderEffect(Images[34],420,sty+270,0, effectSrcAlpha or effectDiffuseAlpha);
if players[OPT_1BARTRAX].stats.stat_excellents > 0 then PowerGraph.RenderEffect(Images[34],500,sty+270,1, effectSrcAlpha or effectDiffuseAlpha);
if players[OPT_1BARTRAX].stats.stat_humiliations > 0 then PowerGraph.RenderEffect(Images[34],580,sty+270,2, effectSrcAlpha or effectDiffuseAlpha);
end;
// ------------------------
end;
end;
procedure HUD_DOMBAR;
var i : integer;
colo,YYB : dword;
colr,colb,coln:dword;
rs,bs,ns:word;
begin
if OPT_DOMBARSTYLE = 0 then exit;
YYB := OPT_DOMBARPOS;
if OPT_DOMBARSTYLE=1 then if YYB>300 then YYB := 300;