Rev 6 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6 | Rev 7 | ||
---|---|---|---|
Line 1713... | Line 1713... | ||
1713 | } |
1713 | } |
1714 | Mix_AllocateChannels(1); |
1714 | Mix_AllocateChannels(1); |
1715 | Mix_ChannelFinished(channel_finished); |
1715 | Mix_ChannelFinished(channel_finished); |
1716 | Mix_HookMusicFinished(music_finished); |
1716 | Mix_HookMusicFinished(music_finished); |
1717 | //printf ("init_digi(): SETTING SOUND AND MUSIC VOLUME\n"); |
1717 | //printf ("init_digi(): SETTING SOUND AND MUSIC VOLUME\n"); |
1718 | Mix_Volume (-1, is_sound_on ? |
1718 | Mix_Volume (-1, is_sound_on ? mixer_volume : 0); |
1719 | Mix_VolumeMusic (is_sound_on ? |
1719 | Mix_VolumeMusic (is_sound_on ? mixer_volume : 0); |
1720 | #endif |
1720 | #endif |
1721 | digi_audiospec = desired; |
1721 | digi_audiospec = desired; |
1722 | } |
1722 | } |
1723 | 1723 | ||
1724 | #ifdef USE_MIXER |
1724 | #ifdef USE_MIXER |
Line 1823... | Line 1823... | ||
1823 | init_digi(); |
1823 | init_digi(); |
1824 | if (digi_unavailable) return; |
1824 | if (digi_unavailable) return; |
1825 | stop_sounds(); |
1825 | stop_sounds(); |
1826 | //printf("playing chunk sound %p\n", buffer); |
1826 | //printf("playing chunk sound %p\n", buffer); |
1827 | //printf ("play_chunk_sound(): SETTING VOLUME\n"); |
1827 | //printf ("play_chunk_sound(): SETTING VOLUME\n"); |
1828 | // Mix_Volume (sound_channel, is_sound_on ? |
1828 | // Mix_Volume (sound_channel, is_sound_on ? mixer_volume : 0); |
1829 | if (Mix_PlayChannel(sound_channel, buffer->chunk, 0) == -1) { |
1829 | if (Mix_PlayChannel(sound_channel, buffer->chunk, 0) == -1) { |
1830 | sdlperror("Mix_PlayChannel"); |
1830 | sdlperror("Mix_PlayChannel"); |
1831 | } |
1831 | } |
1832 | digi_playing = 1; |
1832 | digi_playing = 1; |
1833 | } |
1833 | } |
Line 1835... | Line 1835... | ||
1835 | void __pascal far play_music_sound(sound_buffer_type far *buffer) { |
1835 | void __pascal far play_music_sound(sound_buffer_type far *buffer) { |
1836 | init_digi(); |
1836 | init_digi(); |
1837 | if (digi_unavailable) return; |
1837 | if (digi_unavailable) return; |
1838 | stop_sounds(); |
1838 | stop_sounds(); |
1839 | //printf ("play_music_sound(): SETTING MUSIC VOLUME\n"); |
1839 | //printf ("play_music_sound(): SETTING MUSIC VOLUME\n"); |
1840 | // Mix_VolumeMusic (is_sound_on ? |
1840 | // Mix_VolumeMusic (is_sound_on ? mixer_volume : 0); |
1841 | if (Mix_PlayMusic(buffer->music, 0) == -1) { |
1841 | if (Mix_PlayMusic(buffer->music, 0) == -1) { |
1842 | sdlperror("Mix_PlayMusic"); |
1842 | sdlperror("Mix_PlayMusic"); |
1843 | } |
1843 | } |
1844 | digi_playing = 1; |
1844 | digi_playing = 1; |
1845 | } |
1845 | } |
Line 2034... | Line 2034... | ||
2034 | //if (!is_sound_on) stop_sounds(); |
2034 | //if (!is_sound_on) stop_sounds(); |
2035 | #ifdef USE_MIXER |
2035 | #ifdef USE_MIXER |
2036 | init_digi(); |
2036 | init_digi(); |
2037 | if (digi_unavailable) return; |
2037 | if (digi_unavailable) return; |
2038 | //printf ("turn_sound_on_off(): SETTING SOUND AND MUSIC VOLUME\n"); |
2038 | //printf ("turn_sound_on_off(): SETTING SOUND AND MUSIC VOLUME\n"); |
2039 | Mix_Volume(-1, is_sound_on ? |
2039 | Mix_Volume(-1, is_sound_on ? mixer_volume : 0); |
2040 | Mix_VolumeMusic(is_sound_on ? |
2040 | Mix_VolumeMusic(is_sound_on ? mixer_volume : 0); |
2041 | #endif |
2041 | #endif |
2042 | } |
2042 | } |
2043 | 2043 | ||
2044 | // seg009:7299 |
2044 | // seg009:7299 |
2045 | int __pascal far check_sound_playing() { |
2045 | int __pascal far check_sound_playing() { |
Line 2063... | Line 2063... | ||
2063 | 2063 | ||
2064 | void xbrz_scale (size_t factor, const uint32_t *src, uint32_t *trg, int srcWidth, int srcHeight, int yFirst, int yLast, bool has_alpha_channel); |
2064 | void xbrz_scale (size_t factor, const uint32_t *src, uint32_t *trg, int srcWidth, int srcHeight, int yFirst, int yLast, bool has_alpha_channel); |
2065 | static void *hqx_pixels32 = NULL; |
2065 | static void *hqx_pixels32 = NULL; |
2066 | static void *hqx_resized_pixels32 = NULL; |
2066 | static void *hqx_resized_pixels32 = NULL; |
2067 | static void *hqx_resized_pixels24 = NULL; |
2067 | static void *hqx_resized_pixels24 = NULL; |
2068 | int filter_level = 1; |
- | |
2069 | 2068 | ||
2070 | // seg009:38ED |
2069 | // seg009:38ED |
2071 | void __pascal far set_gr_mode(byte grmode) { |
2070 | void __pascal far set_gr_mode(byte grmode) { |
2072 | if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_NOPARACHUTE | |
2071 | if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_NOPARACHUTE | |
2073 | SDL_INIT_GAMECONTROLLER | SDL_INIT_HAPTIC ) != 0) { |
2072 | SDL_INIT_GAMECONTROLLER | SDL_INIT_HAPTIC ) != 0) { |