hedgewars/hwengine.pas
branchqmlfrontend
changeset 11841 6adf27e85cae
parent 11828 a69124eb7ce7
parent 11835 8f7e28428f3e
child 12855 1b2b84315d27
equal deleted inserted replaced
11828:a69124eb7ce7 11841:6adf27e85cae
    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;
       
    60 
    44 
    61 ///////////////////////////////////////////////////////////////////////////////
    45 ///////////////////////////////////////////////////////////////////////////////
    62 function DoTimer(Lag: LongInt): boolean;
    46 function DoTimer(Lag: LongInt): boolean;
    63 var s: shortstring;
    47 var s: shortstring;
    64     t: LongWord;
    48     t: LongWord;
   100             ScriptCall('onGameStart');
    84             ScriptCall('onGameStart');
   101             for t:= 0 to Pred(TeamsCount) do
    85             for t:= 0 to Pred(TeamsCount) do
   102                 with TeamsArray[t]^ do
    86                 with TeamsArray[t]^ do
   103                     MaxTeamHealth:= TeamHealth;
    87                     MaxTeamHealth:= TeamHealth;
   104             RecountAllTeamsHealth;
    88             RecountAllTeamsHealth;
   105             if not cOnlyStats then ShowCredits;
       
   106             GameState:= gsGame;
    89             GameState:= gsGame;
   107             end;
    90             end;
   108         gsConfirm, gsGame, gsChat:
    91         gsConfirm, gsGame, gsChat:
   109             begin
    92             begin
   110             // disable screenshot flash effect when about to make another screenshot
    93             // disable screenshot flash effect when about to make another screenshot