equal
deleted
inserted
replaced
46 if isSoundEnabled then |
46 if isSoundEnabled then |
47 isSoundEnabled:= Mix_OpenAudio(22050, $8010, 2, 512) = 0; |
47 isSoundEnabled:= Mix_OpenAudio(22050, $8010, 2, 512) = 0; |
48 if isSoundEnabled then WriteLnToConsole(msgOK) |
48 if isSoundEnabled then WriteLnToConsole(msgOK) |
49 else WriteLnToConsole(msgFailed); |
49 else WriteLnToConsole(msgFailed); |
50 Mix_AllocateChannels(Succ(chanTPU)); |
50 Mix_AllocateChannels(Succ(chanTPU)); |
51 if isMusicEnabled then Mix_VolumeMusic(64); |
51 if isMusicEnabled then Mix_VolumeMusic(50); |
52 |
52 |
53 Volume:= cInitVolume; |
53 Volume:= cInitVolume; |
54 if Volume < 0 then Volume:= 0; |
54 if Volume < 0 then Volume:= 0; |
55 Volume:= Mix_Volume(-1, Volume) |
55 Volume:= Mix_Volume(-1, Volume) |
56 end; |
56 end; |
119 |
119 |
120 inc(Volume, voldelta); |
120 inc(Volume, voldelta); |
121 if Volume < 0 then Volume:= 0; |
121 if Volume < 0 then Volume:= 0; |
122 Mix_Volume(-1, Volume); |
122 Mix_Volume(-1, Volume); |
123 Volume:= Mix_Volume(-1, -1); |
123 Volume:= Mix_Volume(-1, -1); |
124 if isMusicEnabled then Mix_VolumeMusic(Volume * 5 div 8); |
124 if isMusicEnabled then Mix_VolumeMusic(Volume * 4 div 8); |
125 ChangeVolume:= Volume * 100 div MIX_MAX_VOLUME |
125 ChangeVolume:= Volume * 100 div MIX_MAX_VOLUME |
126 end; |
126 end; |
127 |
127 |
128 end. |
128 end. |