720 Commits

Author SHA1 Message Date
Fabian Greffrath
f567b7ab91
skip questions and save to dedicated quicksave slot (#421)
* skip questions and save to dedicated quisave slot

* comments and clean-up
2022-01-16 21:02:46 +01:00
Fabian Greffrath
50fe15b042
support up to 8 pages of savegames (#418)
* support up to 8 pages of savegames

* add sounds to page changes

* force redraw status bar after load/save menus

* check for MBF savegames with index > 8

* fix forgotten detail

* reset quick save slot when the page is changed
2022-01-14 15:21:12 +01:00
Roman Fomin
dcb80f640b change parentheses 2022-01-14 11:27:25 +07:00
Roman Fomin
4999e6585f fix levelname on automap screen with Time/STS widget enabled 2022-01-14 11:20:43 +07:00
Fabian Greffrath
4efa1198ff prevent the total time from moving horizontally when counting up 2022-01-13 20:16:51 +01:00
Roman Fomin
2e17789741 fluidsynth: make 1.0 the maximum gain 2022-01-13 23:26:21 +07:00
Roman Fomin
91c4e580a5 properly shutdown music modules, cleanup 2022-01-13 23:24:00 +07:00
Fabian Greffrath
da7a67a992
credit where credit is due 2022-01-13 10:05:56 +01:00
Fabian Greffrath
3f8b6cf4e1
complete crosshair implementation (#416)
* implement crosshair

* fix int->boolean

* check for CROSSH patch

* lumpnum can be 0

* complete crosshair implementation

* some fixes to the crosshair implementation

 * fix patch half width and height
 * fix highlight aim angle and range for weapons without ammo
 * update crosshair properties in the ticker function
 * only draw if patch is set

* some more minor fixes

* add a fourth big crosshair

courtesy of @rfomin

Co-authored-by: Roman Fomin <rfomin@gmail.com>
2022-01-13 08:29:53 +01:00
Fabian Greffrath
cf53faa943 fix vertical position of the Time/STS widgets 2022-01-12 23:52:25 +01:00
Fabian Greffrath
b0949cca5b fix total time display on the intermission screen
Thanks @MrAlaux for the report
2022-01-12 09:42:08 +01:00
Fabian Greffrath
bdb65d2bcb Merge branch 'master' of https://github.com/fabiangreffrath/woof 2022-01-12 09:02:03 +01:00
Fabian Greffrath
770611e346 round up rendered_height 2022-01-12 09:01:44 +01:00
Roman Fomin
987cd46acd win midi: fix some silent MIDIs 2022-01-11 23:57:26 +07:00
Roman Fomin
d695e5f091
fix menu selection for items with alphaKey == 0 (#414) 2022-01-11 15:22:44 +01:00
Fabian Greffrath
e64384074c
README.md needs an overhaul (#412)
* first smaller changes to README.md

* Add licenses for win32/*

* thinned out and completed

* no know issues, savegame backward compatibility is a feature

* trim build instructions
2022-01-11 14:10:47 +01:00
Roman Fomin
73c0799180
vanilla Doom has at most 10 deathmatch starts (#413)
* vanilla Doom has at most 10 deathmatch starts

* fix declaration

* use offset in check
2022-01-11 14:09:17 +01:00
Fabian Greffrath
c47d0700dc fix indentation for clang CI 2022-01-11 12:26:50 +01:00
Fabian Greffrath
5fd4fc0c07 resize window width back when returning from widescreen mode 2022-01-11 12:21:25 +01:00
Fabian Greffrath
25d5e49fe5 the mingw-w64 POSIX/Win32 threads split hasn't yet made it into Ubuntu 2022-01-10 09:37:25 +01:00
Fabian Greffrath
d89e0a9c68 speed up cross-building CI
by installing only the relevant 64-bit POSIX-threads C-compiler
2022-01-10 09:34:38 +01:00
Fabian Greffrath
8faa155063 use system-wide installed default soundfont on non-Windows systems
That is, it works on Debian. ;)
2022-01-10 09:32:27 +01:00
Fabian Greffrath
cfd6b521fa fixes to the "backpack changes thresholds" implementation
* fix SIGFPE for weapons without a maxammo value (fixes #407)
 * blue color for ammo values higher than max threshold w/o backpack
   (fixes #406)

Thanks @hackneyed-one.

We are now 666 commit ahead of WinMBF! \m/
2022-01-10 09:22:49 +01:00
Fabian Greffrath
09e5254105
additional widget colors options (#405)
* additional widget colors options

 * backpack changes thresholds (fixes #399)
 * color of armor depends on type

* consistent wording
2022-01-07 12:58:16 +01:00
Roman Fomin
b1611a3469
implement Fluidsynth music backend (#403)
* play non-MIDI music with SDL for all music backends

* fallback to SDL by default

* implement Fluidsynth music backend

* fix mus_chorus

* set samplerate

* use Fluidsynth's player functions for pause/resume

* little cleanup

* fix initialization of SDL music backend, cleanup

* add missing static

* fix the -nosfx parameter, cosmetic changes

* remove obsolete header files from CMakeLists.txt

* add missing static

* fix some MSVC warnings

* use midiStreamPause function

* reuse IsMid and IsMus functions
2022-01-06 12:25:10 +01:00
Roman Fomin
77ac05d70e fix display level title in overlay automap mode if STS/Time widget is on 2021-12-29 17:23:52 +07:00
Roman Fomin
375253afab fix window size after exit in fulscreen mode
Fixes #402
2021-12-29 17:21:54 +07:00
Roman Fomin
30c99dd1a5
old compilers support (#400)
* better support of C89 standart

* VC6 fixes

* __pragma attribute works for _MSC_VER > 1400

* use intptr_t for char*

* C89 has no designated initializers

* correct _MSC_VER versions

* fix check

* add stdint.h for old MSVC versions

Taken from https://github.com/mattn/gntp-send/blob/master/include/msinttypes/stdint.h

* add stdint.h to miniz.h

* make packaging work without Python

* fix window_position initialization

* replace PACKED_STRUCT with i_packed_start.h i_packed_end.h

Thus, we do not use variadic macros from C99.

* undo cmake install changes

* fix icon for VC6

* remove DESCRIPTION and HOMEPAGE_URL from project()

* remove i_packed_start.h and i_packed_end.h

* whitespace fixes

* rename PACKEDPREFIX->PACKED_PREFIX and PACKEDATTR->PACKED_SUFFIX

* MINGW check doesn't work this early

* add check for minimum cmake version for MINGW targets
2021-12-29 08:41:30 +01:00
Fabian Greffrath
8629c1072b
check for Win32 and either MSVC or cross-buildind (#398)
* check for Win32 and either MSVC or cross-buildind

I think this covers all the cases that we officially, i.e. per
README.md, support:

  * Build for Windows
    * Native
      * MSVC
        - Download libraries
      * MinGW
        - Do not download libraries
    * Cross-build
      - Download libraries
  * Build for anything else
    - Do not download libraries

* check more explicitly, do not rely on variables getting carried over
2021-12-23 14:57:29 +01:00
Fabian Greffrath
fad2d48b8f
test cross building in our CI rule (#396)
* test cross building in our CI rule

* fix format string for mingw-w64

* attempt to improve/generalize CI rule

* another attempt at fixing format string silliness

* last attempt to fix format string on all archs
2021-12-23 12:39:28 +01:00
Roman Fomin
10a37d6e24
more consistent installation of dependencies (#397)
* more consistent installation of dependencies

* don't download SDL2 libs on MSYS

* fix typo
2021-12-23 12:36:28 +01:00
Fabian Greffrath
63b7097601 set MINIZ_ macros globally 2021-12-22 21:24:32 +01:00
Roman Fomin
9fb04bb75c fix SDL2_NET_DLL_DIR path 2021-12-23 02:41:26 +07:00
Roman Fomin
ef2b24175d set all SDL2 paths for MinGW packaging 2021-12-23 00:54:29 +07:00
Roman Fomin
aa28066b1c cosmetic fixes 2021-12-23 00:52:45 +07:00
Fabian Greffrath
dd51ba1d36 some more clean-up in i_video.c 2021-12-22 16:11:44 +01:00
Fabian Greffrath
52d2073b92 initialize certain video parameters only once
Also, remove some redundant config variable duplicates and some more minor
clean-up in I_InitGraphicsMode.
2021-12-22 10:33:55 +01:00
Fabian Greffrath
72989b154f
apply scalefactor from command line only once during initialization (#393)
* apply scalefactor from command line only once during initialization

On subsequent calls of I_InitGraphicsMode(), e.g. when changing hires
or widescreen in-game, determine (coarse, integer) scalefactor from
current ratio of window and framebuffer size. Resize window only if
new size is going to be wider than previous size. Force resizing of
window if scalefactor was set on command line.

* fix window getting resized only if width increases

* rendered height does not necessarily match window height
2021-12-22 10:19:31 +01:00
Roman Fomin
123423c7ad
on Windows first search for SDL2 libraries, then download from libsdl.org (#388)
* on Windows first search for SDL2 libraries, then download from libsdl.org

* add mingw dependecies

* get runtime dependencies for SDL_Mixer and libmodplug on MinGW

* search for SDL2 libs first, install libfluidsynth if found on MinGW

* use target filename

* don't install DLLs to target file dir

* fix typo

* search for DLLs names using dlltool

* little cleanup
2021-12-22 10:19:16 +01:00
Roman Fomin
7b0cf3f333
replace mmus2mid with mus2mid from Chocolate Doom (#394) 2021-12-21 18:51:28 +01:00
Fabian Greffrath
1805d02925
add miniz as a replacement for SDL_Image+libpng+zlib (#390) 2021-12-21 10:32:29 +01:00
Fabian Greffrath
5264af7f74
add atexit() sequence priorization (#389)
* add atexit() sequence priorization

Mostly taken from DSDA-Doom, thanks @kraflab.

* make absolutely sure Z_Close (destroys zone memory) is called after everything else
2021-12-21 10:32:16 +01:00
Roman Fomin
1405f92de9
undo new_sync interpolation fix (#385) 2021-12-17 15:48:21 +01:00
Roman Fomin
7df31b1203
more correct way to fix demowarp/demoskip (#384)
* more correct way to fix demowarp/demoskip

* remove redundant declaration
2021-12-17 15:48:07 +01:00
Roman Fomin
9068327662
fix player mobj is always in S_PLAY_RUN1 state in complevel boom (#381)
* fix player mobj is always in S_PLAY_RUN1 state in complevel boom

* add comment
2021-12-17 15:47:14 +01:00
Roman Fomin
35f869f4d1
set demo_insurance = 0 (#380)
* set demo_insurance = 0

* keep original code

* remove default_demo_insurance
2021-12-17 15:47:00 +01:00
Fabian Greffrath
1241bf146c
add a signal handler to exit gracefully on fatal signals (#379)
* attempt to write out demo that lead to raising a fatal signal

* call I_Error() in I_SignalHandler()

it gets called by G_CheckDemoStatus() anyway
2021-12-17 15:46:47 +01:00
Roman Fomin
703719854a
Enable Fluidsynth support on Windows (#350)
* remove snd_card and mus_card (Allegro)

* add fluidsynth soundfont path settings

* remove redudant printf

* fix missing #endif
2021-12-17 15:46:35 +01:00
Roman Fomin
bf31a22f5f
fix -longtics parameter, remove unnecessary variables (#378)
* fix -longtics parameter, remove unnecessary variables

* remove complevel variable, MBF21VERSION macro
* -longtics command line parameter is for the complevel vanilla only

* fix -complevel parameter
2021-12-15 09:49:31 +01:00
Fabian Greffrath
8138f378df
implement custom atexit() sequence (#377)
* implement custom atexit() sequence

* use stdlib malloc() in I_AtExit()

* get rid of has_exited, we already handle recursive I_SafeExit() calls
2021-12-14 07:17:06 +01:00