equal
deleted
inserted
replaced
108 SDMusicFN: shortstring; // SD music file name |
108 SDMusicFN: shortstring; // SD music file name |
109 |
109 |
110 var Volume: LongInt; |
110 var Volume: LongInt; |
111 SoundTimerTicks: Longword; |
111 SoundTimerTicks: Longword; |
112 implementation |
112 implementation |
113 uses uVariables, uConsole, uCommands, uDebug, uPhysFSLayer; |
113 uses uVariables, uConsole, uCommands, uChat, uUtils, uDebug, uPhysFSLayer; |
114 |
114 |
115 const chanTPU = 32; |
115 const chanTPU = 32; |
116 var cInitVolume: LongInt; |
116 var cInitVolume: LongInt; |
117 previousVolume: LongInt; // cached volume value |
117 previousVolume: LongInt; // cached volume value |
118 lastChan: array [TSound] of LongInt; |
118 lastChan: array [TSound] of LongInt; |
579 |
579 |
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 |
|
585 s:= read1stLn(s + '_credits.txt'); |
|
586 if Length(s) > 0 then |
|
587 AddChatString(char(2) + '© Music: ' + s); |
|
588 |
584 SDLCheck(Mix_FadeInMusic(Mus, -1, 3000) <> -1, 'Mix_FadeInMusic', false) |
589 SDLCheck(Mix_FadeInMusic(Mus, -1, 3000) <> -1, 'Mix_FadeInMusic', false) |
585 end; |
590 end; |
586 |
591 |
587 procedure SetVolume(vol: LongInt); |
592 procedure SetVolume(vol: LongInt); |
588 begin |
593 begin |