1531 Commits

Author SHA1 Message Date
Roman Fomin
9601a2cbdf winmidi: cosmetic changes 2022-12-14 18:15:23 +07:00
Roman Fomin
96dfa368ee remove unused function
It was added for initial i_winmusic.c implementation
2022-12-14 18:09:50 +07:00
Fabian Greffrath
a75c38eda9
Crosshair lock fixes (#844)
* draw crosshair before weapon sprites to make sure they don't overlap

* prevent tracking targets out of view

* restrict crosshair coordinates to view window

* Gosh, widescreen

* fix up signs
2022-12-14 10:05:54 +01:00
Roman Fomin
2f27fa739a
fall back to module 0 device 0 if the music module failed to initialize (#845)
* fall back to `module 0 device 0` if the music module failed to initialize

Remove `music_module_index`, use instead `midi_player` - it's global anyway.

* add fall back to `I_SetMidiPlayer`
2022-12-13 20:34:55 +07:00
Fabian Greffrath
1f39b0dc36
enable doubled card and skull key display on status bar by default 2022-12-13 12:44:02 +01:00
Roman Fomin
b93e6f5c7b
show soundfonts as FluidSynth "devices", save module devices independently (#832)
* show found soundfonts as FluidSynth "devices"

* `soundfont_dir` config variable, scan multiple directories

* save module devices independently, add SNDFONT exception, cosmetic fixes

* support unicode filenames for soundfonts

FluidSynth supports UTF8 filenames on Windows

* remove WOOFSOUNDFONT macro

* don't use SDL iconv, remove unnecessary check

* add default soundfont search paths for Linux

* rename module_index->music_module_index, add comments

Co-authored-by: Fabian Greffrath <fabian@greffrath.com>
2022-12-13 16:25:02 +07:00
Fabian Greffrath
82f85d7e77 update SDL to 2.26.1 2022-12-13 10:05:31 +01:00
Roman Fomin
46119c136b winmidi: apply ceski's patch (fix FF loop restart) 2022-12-13 14:10:14 +07:00
ceski
34012fa633
winmidi: Add custom loop support (EMIDI, Square/FF, RPG Maker) (#841)
* Cosmetic changes

* winmidi: Add custom loop support (EMIDI, Square/FF, RPG Maker)

* Fix typo
2022-12-13 11:42:26 +07:00
Fabian Greffrath
2e97d235f2
add prev/next indicators for multiple-choice menu items (#843)
* add prev/next indicators for multiple-choice menu items

* blinking prev/next indicators
2022-12-12 11:01:21 +01:00
Roman Fomin
ae6a6845bd
allow parsing of cosmetic items in the OPTIONS lump for all complevels (#840) 2022-12-12 16:51:23 +07:00
Fabian Greffrath
1425ed7d50
stop looping sounds after reaching a timeout (#838)
* stop looping sounds after reaching a timeout

* simplify

* re-introduce S_StopLoopSounds()

* cosmetic fix
2022-12-10 09:14:44 +01:00
Fabian Greffrath
e09d446449 fix a crash when using the right key on a thermo menu item 2022-12-10 00:16:11 +01:00
Fabian Greffrath
003d8e2e50 rearrange QOL menu section 2022-12-10 00:05:47 +01:00
Fabian Greffrath
524c96cff0
provide a default map progression if neither nextmap nor endpic are set (#835)
* fix and extend the code to provide a default map progression if neither nextmap nor endpic are set

* use strcasecmp instead of stricmp

* Update u_mapinfo.c

* Update u_mapinfo.c
2022-12-09 19:02:31 +01:00
Roman Fomin
b1ec01f4bf update CHANGELOG.md 2022-12-09 19:30:06 +07:00
Fabian Greffrath
2b6ddd69ac
use MAPNAME() more consistently (#836) 2022-12-09 12:35:44 +01:00
Roman Fomin
fa2398109e
OPL output gain (#829)
* crude OPL volume gain

* replace SDL_MixAudioFormat with MixAudioFormat with added gain

* remove unnecessary code path, set default gain = 2

* fix gain calculation

* apply gain only to `src1`

* cosmetic changes
2022-12-09 17:11:09 +07:00
ceski
72ddbe8ffc
winmidi: Optimize reset messages, change volume control, add instrument fallback support (#834)
* Cosmetic changes.

* Add volume safeguards.

* Use device setting for reverb and chorus by default.

* Clean up volume change behavior.

* Move "all notes off" and "reset all controllers" to reset function.

* Optimize set of reset messages depending on device and reset type.

* Ignore SysEx resets from MIDI files for MS GS Wavetable Synth.

* Check for Roland master volume combined with master tune, etc.

* Check for Yamaha master volume combined with master tune, etc.

* Don't replace master volume message; send a new one.

* Change order of volume check.

* Switch from master volume to channel volume control for better compatibility with MIDI devices.

* Change default `winmm_reset_delay` to 0.

* Change default winmm_reset_delay to 0.

* Remove unused variable.

* Add GS instrument fallback support.

* Cast `event_type` as `int`

* Fix switch/case.

* Fix hot swapping.

* Remove unneeded `return`.

* Add instrument fallback support for all devices in GS mode.

* Assign reset defaults to all devices.

* Fix formatting.
2022-12-09 17:09:49 +07:00
Roman Fomin
61302e811f
fix sound clicking from chaingunners (#837) 2022-12-09 08:12:56 +01:00
Fabian Greffrath
e4ecf2d163
always define a "next" map for a UMAPINFO entry (#833)
* always define a "next" map for a UMAPINFO entry

* use MAPNAME()

* cosmetic change
2022-12-07 21:46:23 +01:00
Fabian Greffrath
7df1465e64
call S_StopLoop() whenever moving plats reach pastdest state (#830) 2022-12-07 21:43:03 +01:00
Fabian Greffrath
735a99b0a2
bump miniz to 3.0.1 (#827) 2022-12-07 09:53:34 +01:00
Roman Fomin
702e5b7be7
fix skull position in help screen for gamemode == commercial (#828) 2022-12-07 15:44:31 +07:00
Roman Fomin
b230c1481f
hot-swappable music modules, list of Windows MIDI devices (#824)
* hot swap of music modules

* get a list of Windows MIDI devices

* move "MIDI Player" menu item only on Windows build

* increase MAX_MIDI_PLAYERS, index fixes

* fix hot swapping with UMAPINFO music, init OPL on song change

* initialize OPL only when necessary

* call I_ShutdownMusic in exit sequence

* don't send SysEx reset for MS GS Synth

* introduce `I_DeviceList` function, rearrange code

* `midi_player_strings` must be NULL at the end
2022-12-07 15:44:05 +07:00
Ryan Krafnick
84aa5955d0
Fix plat infinite sound loop (#825) 2022-12-04 23:35:13 +01:00
Roman Fomin
c7e09871dd Revert "winmidi: remove unnecessary midiOutReset call"
Ops, misunderstand comment.

This reverts commit 912b325172756dce19b639a23358cecaeab165fa.
2022-12-03 23:43:38 +07:00
Roman Fomin
912b325172 winmidi: remove unnecessary midiOutReset call
It is duplicated in `ResetDevice`.
2022-12-03 22:21:36 +07:00
ceski
5734d8b589
winmidi: Fix looping (#823)
* winmidi: Fix looping

* Send NOP event for non-tempo meta events

* Revert "Send NOP event for non-tempo meta events"

This reverts commit 7e71eca6b3d8eec8dfc5a920a40c960c1f0bdc46.

* Ignore unsupported event types

* Update copyright

* Update README.md
2022-12-03 20:45:24 +07:00
Fabian Greffrath
0c635fea7e use ColorByHealth() on evry possible occasion in hu_stuff.c 2022-12-03 13:59:44 +01:00
Alaux
b1d93a847d
Implement crosshair coloring by target health (#821)
* Color crosshair by target health

* Add missing element to `crosshealth_t`

* Second implementation

* Introduce `ColorByHealth()`

* Change `ColorByHealth()`'s arguments

* Disable "Highlight Color" item when appropriate
2022-12-03 10:49:46 +01:00
ceski
e88086684c
winmidi: Enable SysEx messages from MIDI files (#822)
* winmidi: Enable SysEx messages from MIDI files

* Remove unused variable

* Discard incomplete SysEx messages when a song loops

* Write all 0xF0 SysEx messages, ignore all 0xF7 SysEx messages

* Remove extra delay after reset

* Remove `winmm_allow_sysex`

* Don't use compound literal
2022-12-03 16:43:11 +07:00
ceski
e4a18d4aeb
winmidi: SysEx fixes (#820)
* winmidi: SysEx fixes

* Add configurable SysEx reset

* Add configurable delay after reset

* Lower reset type setting range

* Add configurable blocking of SysEx messages from MIDI files

* Cosmetic changes

* Remove NOP

* Add NOP back and add extra `winmm_allow_sysex` check

* Move initial buffer processing to separate thread
2022-12-02 16:09:27 +07:00
Roman Fomin
96d61b805c winmidi: add more resets
Fixes reset in Virtual Sound Canvas VST v1.60
2022-12-01 21:04:42 +07:00
Fabian Greffrath
e90b7702e8 increase MAX_SCREENWIDTH to 1152
This is meant to add support for non-exactly 21:9 screens, such as
3840x1600 (WQHD+). Unlikely to get ever increased further than that, though.

Fixes #819
2022-12-01 12:05:50 +01:00
Fabian Greffrath
b1585460b0
Update CHANGELOG.md 2022-12-01 10:16:40 +01:00
Alaux
6b4e76c6d9
Implement crosshair target lock-on (#814)
* Implement crosshair target lock-on

* Calculate lock-on offset in `R_ProjectSprite()`

* Introduce `HU_UpdateCrosshairLock()`

* A couple of changes

* More changes

* Update lock offset just once per tic
2022-12-01 08:52:09 +01:00
Roman Fomin
94efdea7c3 winmidi: bring back MIDI_EVENT_SYSEX_SPLIT 2022-12-01 12:48:38 +07:00
Roman Fomin
9953ba7b67 winmidi: cosmetic changes 2022-12-01 10:26:39 +07:00
Roman Fomin
6323ef42f6 winmidi: fix SysEx messages
Tested with Yamaha S-YXG50 software emulation.
2022-12-01 04:24:23 +07:00
Roman Fomin
d3e0001d90 winmidi: cosmetic fixes 2022-11-30 20:12:20 +07:00
Fabian Greffrath
b596220967
support dedicated music for Episode 4 of Ultimate Doom (#818)
* support dedicated music for Episode 4 of Ultimate Doom

* suppoer UMAPINFO music in the IDMUS cheat
2022-11-30 12:52:11 +01:00
Roman Fomin
c338701fea
winmidi: send SysEx messages, use SysEx reset (#816)
* initial implementation of SysEx messages

* don't use memio

* send SysEx reset message, don't use `midiOutShortMsg`, cosmetic fixes

* try to fix cppcheck warning

* another attempt to fix cppcheck warning

* remove unused variable

* fix looping, another type of SysEx

* round buffer size

* use GS Reset message instead of GM System On

* move up MIDI_CONTROLLER_MAIN_VOLUME, add comment

* fix title and MAP03 tracks in MAYhem19.wad

* bring back `native_event_t`

* another looping fix

* cosmetic fixes

* fix looping delay

* use PADDED_SIZE macro

* remove master_vol message

* more cosmetic fixes

* delete unused variable

* send reset at shutdown

* Revert "send reset at shutdown"

This reverts commit 6bed6016caeeb38dd352fc8319c113796a5c1164.

* reset device at shutdown

* fix comments
2022-11-30 09:30:27 +01:00
Roman Fomin
60d15ea920
fix NULL string comparison in deh parser (#817) 2022-11-29 06:42:51 +01:00
Fabian Greffrath
b3ff45d15c make the condition to start a new sequence less critical
In paticular, if less time than required for a full shading sequence has passed,
don't start a new one. This allows to skip a gametic between two rendered frames,
which apparently happens sometimes.
2022-11-28 20:10:44 +01:00
Fabian Greffrath
a63e16b14c introduce 2022-11-28 08:45:44 +01:00
Fabian Greffrath
1fb4a96cab introduce automap_on/automap_off macros 2022-11-28 08:41:09 +01:00
Fabian Greffrath
fbf6b42237 user overlay_t everywhere 2022-11-28 08:32:49 +01:00
Fabian Greffrath
e087e44d8b fix comment 2022-11-28 08:31:47 +01:00
Alaux
a599174b61
Implement dark automap overlay (#813)
* Implement dark automap overlay

* Second implementation

* Third implementation

* Fourth implementation

* Introduce `M_MenuIsShaded()`
2022-11-28 08:31:08 +01:00