hedgewars/uSound.pas
changeset 11775 ee85798d6974
parent 11772 927c45b83496
child 11776 f2031643fe98
equal deleted inserted replaced
11774:04d7aa06ede2 11775:ee85798d6974
   580     Mus:= Mix_LoadMUS_RW(rwopsOpenRead(s));
   580     Mus:= Mix_LoadMUS_RW(rwopsOpenRead(s));
   581     SDLCheck(Mus <> nil, 'Mix_LoadMUS_RW', false);
   581     SDLCheck(Mus <> nil, 'Mix_LoadMUS_RW', false);
   582     WriteLnToConsole(msgOK);
   582     WriteLnToConsole(msgOK);
   583 
   583 
   584     // display music credits
   584     // display music credits
   585     s:= read1stLn(s + '_credits.txt');
   585     s:= s + '_credits.txt';
       
   586 
       
   587     // if per-file credits not found check general music credits file
       
   588     if pfsExists(s) then
       
   589         s:= read1stLn(s)
       
   590     else if SuddenDeath and (SDMusicFN <> '') then
       
   591         s:= readValueFromINI(SDMusicFN, '/Music/credits.txt')
       
   592     else
       
   593         s:= readValueFromINI(MusicFN, '/Music/credits.txt');
       
   594 
   586     if Length(s) > 0 then
   595     if Length(s) > 0 then
   587         AddChatString(char(2) + '© Music: ' + s);
   596         AddChatString(char(2) + '© Music: ' + s);
   588 
   597 
   589     SDLCheck(Mix_FadeInMusic(Mus, -1, 3000) <> -1, 'Mix_FadeInMusic', false)
   598     SDLCheck(Mix_FadeInMusic(Mus, -1, 3000) <> -1, 'Mix_FadeInMusic', false)
   590 end;
   599 end;