hedgewars/hwengine.pas
branchqmlfrontend
changeset 11828 a69124eb7ce7
parent 11827 8c71c5a1172f
parent 11776 f2031643fe98
child 11841 6adf27e85cae
equal deleted inserted replaced
11827:8c71c5a1172f 11828:a69124eb7ce7
    39 procedure initEverything(complete:boolean);
    39 procedure initEverything(complete:boolean);
    40 procedure freeEverything(complete:boolean);
    40 procedure freeEverything(complete:boolean);
    41 
    41 
    42 implementation
    42 implementation
    43 uses uFLUICallback, uFLTypes;
    43 uses uFLUICallback, uFLTypes;
       
    44 
       
    45 // TODO localization support
       
    46 procedure ShowCredits();
       
    47 var themeCredits, mapCredits: shortstring;
       
    48 begin
       
    49     if Length(cMapName) > 0 then
       
    50         begin
       
    51         mapCredits:= read1stLn(cPathz[ptMapCurrent] + '/credits.txt');
       
    52         if Length(mapCredits) > 0 then
       
    53             AddChatString(char(#11) + '© Map: ' + mapCredits);
       
    54         end;
       
    55 
       
    56         themeCredits:= read1stLn(cPathz[ptCurrTheme] + '/credits.txt');
       
    57         if Length(themeCredits) > 0 then
       
    58             AddChatString(char(#12) + '© Theme: ' + themeCredits);
       
    59 end;
    44 
    60 
    45 ///////////////////////////////////////////////////////////////////////////////
    61 ///////////////////////////////////////////////////////////////////////////////
    46 function DoTimer(Lag: LongInt): boolean;
    62 function DoTimer(Lag: LongInt): boolean;
    47 var s: shortstring;
    63 var s: shortstring;
    48     t: LongWord;
    64     t: LongWord;
    84             ScriptCall('onGameStart');
   100             ScriptCall('onGameStart');
    85             for t:= 0 to Pred(TeamsCount) do
   101             for t:= 0 to Pred(TeamsCount) do
    86                 with TeamsArray[t]^ do
   102                 with TeamsArray[t]^ do
    87                     MaxTeamHealth:= TeamHealth;
   103                     MaxTeamHealth:= TeamHealth;
    88             RecountAllTeamsHealth;
   104             RecountAllTeamsHealth;
       
   105             if not cOnlyStats then ShowCredits;
    89             GameState:= gsGame;
   106             GameState:= gsGame;
    90             end;
   107             end;
    91         gsConfirm, gsGame, gsChat:
   108         gsConfirm, gsGame, gsChat:
    92             begin
   109             begin
    93             // disable screenshot flash effect when about to make another screenshot
   110             // disable screenshot flash effect when about to make another screenshot