2261 Commits

Author SHA1 Message Date
Fabian Greffrath
4d3826b6f0 get rid of the MY_SDL_VER definition
We depend on SDL for more than just a handful of additional variables.
2020-01-18 22:36:25 +01:00
Fabian Greffrath
413cc81009 add the mbf-bugs.html document from the PrBoom homepage
Save it here, in case it gets lost. Sourceforge was down this morning...
2020-01-18 22:25:46 +01:00
Fabian Greffrath
7e6ff37fdb add game version specific differences
This implements the subtle differences found in the three variants
of DOOM.EXE version 1.9. The code was taken from PrBoom+ and
Chocolate Doom, respectively. I decided to go without the original
comments, the code has been commented well enough in other source
ports. @fragglet Do you think these are all the relevant differences?
2020-01-18 15:29:53 +01:00
Fabian Greffrath
5ce7ef8211 adapt Chocolate Doom's gameversion concept
This will be helpful to fix some Final or Ultimate only demo
desyncing issues.
2020-01-17 15:45:38 +01:00
Fabian Greffrath
e6910bf07d support Chocolate Doom's -mb parameter
in addition to WinMBF's own -heapsize parameter
2020-01-17 15:29:30 +01:00
Fabian Greffrath
8e979e383e disable VSync for both timedemo and fastdemo 2020-01-17 12:21:32 +01:00
Fabian Greffrath
f192571251 fix two new compiler warnings introduced by the new joystick buttons 2020-01-16 21:18:42 +01:00
Fabian Greffrath
aacebe1d40
Joystick2 add joystick buttons for automap and main men (#40)
* add joystick buttons for automap and main menu

Fixes #27

* joystick button triggers either escape or menu_escape

* get away with only one GetButtons() function

* rename MAX_JB to MAX_JSB

Joystick buttons are called JSB in the key binding menu,
so we stay consistent with this.

* print PREV and NEXT on separate lines in the weapon key binbing screen

Thanks @JNechaevsky for noticing, fixes #37.
2020-01-16 21:15:45 +01:00
Fabian Greffrath
0513ad2b77 add a -nodehlump parameter to avoid loading DEHACKED lumps embedded into WAD files 2020-01-16 15:55:59 +01:00
Fabian Greffrath
2a91c5f6bc fix misguided cppcheck fix for FixedDiv()
Replace with the corresponding implementation from Chocolate Doom,
to get back to the same demo compatibility as the original WinMBF.
2020-01-16 11:40:44 +01:00
Fabian Greffrath
ea731b0409 set all compiler flags in the same paragaph in configure.ac 2020-01-16 11:32:20 +01:00
Fabian Greffrath
cf6a7595cd fix possible NULL-pointer dereference in deh_procStringSub() 2020-01-16 11:31:30 +01:00
Fabian Greffrath
6039293aca replace the useless -statcopy parameter with -statdump from Chocolate Doom
Fixes #36
2020-01-16 10:31:11 +01:00
Fabian Greffrath
51b138b026 remove length check from ExtractFileBase()
This allows us to load demos with filenames longer than 8 characters.
2020-01-16 10:30:30 +01:00
Fabian Greffrath
6be3ec2d9e make flashing disk icon a bit less aggressive
We now only draw the disk icon if more than 20kb of WAD data have been read
during a tic, thanks @fragglet for noticing.
2020-01-16 08:55:58 +01:00
Fabian Greffrath
8bdbefcff5 cast pointers instead of silencing warnings
This will fix some strange behaviour which overrides some config
variables default values when resetting from the menu.

Fixes #34, thanks @JNechaevsky.
2020-01-15 08:54:24 +01:00
Fabian Greffrath
13715cd5f9 include config.h in doomdef.h 2020-01-14 16:19:59 +01:00
Fabian Greffrath
1f41cbee4b
bring back the flashing disk icon (#35)
* bring back the flashing disk icon (Fixes #13)

* further refinements to the disk icon code

* get away with only one static variable

* add a non hires-scaling variant of V_DrawBlock()

* add a comment to the new function prototype
2020-01-14 08:57:46 +01:00
Fabian Greffrath
de664b2669 build with -DRANGECHECK 2020-01-13 23:17:32 +01:00
Fabian Greffrath
9a53d72c21 turn error message into a full sentence 2020-01-13 23:09:55 +01:00
Fabian Greffrath
6fa9663ae8 add back the documentation
This adds back most relevant documentation from the WinMBF
binary and source code releases, file names converted to
lower case. Fixes #32.
2020-01-13 15:29:26 +01:00
Fabian Greffrath
2f9ea0128b actually check for the precense of the dlopen() function
and not merely for the presence of a library containing it.
2020-01-13 12:59:38 +01:00
Fabian Greffrath
0cba0cd83b fix building if dlopen() is no t available 2020-01-13 12:14:00 +01:00
Fabian Greffrath
317202c05f bring back the original Spectre/Invisibility fuzz effect
Apply the original fix found in @fragglet's repository from Lee's
why_i_left_doom.html. Fixes #33
2020-01-13 12:08:11 +01:00
Fabian Greffrath
3cd2ffdde5 dynamically load SDL_Image at runtime for PNG screenshots
Fixes #31
2020-01-13 12:03:15 +01:00
Fabian Greffrath
37767f4858 fix TRANMAP caching
When reading a TRANMAP lump in from a file, only the first 256 bytes
of the current palette are compared to the palette for which the
TRANMAP was created. An entire palette, though, consists of 256 RGB
tripel and is thus 3*256 bytes long. Thus, only the first third of
both palettes are compared and if these happen to match, translucency
will look glitched.

Fix this by comparing and writing out the entire palette to the cache
file.
2020-01-13 08:28:17 +01:00
Fabian Greffrath
37a15253dd fix crash when attack sound is missing 2020-01-11 12:46:00 +01:00
Fabian Greffrath
f8aaa2bfab ignore too short demo lumps
not only empty ones
2020-01-11 11:34:13 +01:00
Fabian Greffrath
00e17c0e1f pad the REJECT table when the lump is too small
This reverts the previous commit which only handled the case of an
absent REJECT table. No attempts are made to simulate REJECT buffer
overflows in Vanilla Doom, because MBF is a different EXE anyway.
2020-01-10 15:36:56 +01:00
Fabian Greffrath
170b9f2a38 print map name in error message 2020-01-10 14:57:42 +01:00
Fabian Greffrath
9aede18fc1 Allow to toggle full screen using Enter on num. keyboard
Thanks @JNechaevsky
2020-01-10 14:06:41 +01:00
Fabian Greffrath
dc26f2784f add a parameter to ignore cheats in dehacked files
Fixes #20
2020-01-10 12:10:55 +01:00
Fabian Greffrath
be3672b831 fix crash when a demo lump is empty
Fixes #23
2020-01-10 12:05:36 +01:00
Fabian Greffrath
c0c9c5e9c2 include string.h for strrchr() 2020-01-10 09:30:46 +01:00
Fabian Greffrath
6768824548
Dragdrop (#30)
* add drap-n-drop support

* move D_IsIWADName() down into the block where it is needed
2020-01-10 09:24:36 +01:00
Fabian Greffrath
765394837c
Doomprefdir (#29)
* Define a user-writeable directory with a little help from SDL_GetPrefPath()

 * Save config files, translation tables and savegames into this
   directory.
 * Screenshots are still saved into the "current" directory, i.e. the
   user's $HOME on Unix.

* unconditionally create the user-writable directory

* adapt to pending inclusion of m_misc2.c
2020-01-10 09:23:21 +01:00
Fabian Greffrath
6214abb7d7
Iwad dirs (#28)
* add a dynamically growing list of IWAD search directories

This is all taken from Chocolate Doom's src/d_iwad.c.

Also, take some helper functions from Chocolate Doom's src/m_misc.c
and put them into a separate m_misc2.c file. These will be useful for
further ported code, e.g. writable user directory and drag-n-drop
support.

Fixes #6.

* add support for a build-time configurable data directory

* add some more helper functions to m_misc2.c
2020-01-10 09:22:21 +01:00
Fabian Greffrath
6d6433422b
improve joystick handling code (#26)
again, using code adapted from Chocolate Doom.

While at it, implement prev/next weapon joystick buttons.

TODO: Menu and Automap joystick buttons.
2020-01-09 21:34:30 +01:00
Fabian Greffrath
6604722371 warn about unsupported node formats and exit gracefully 2020-01-09 21:25:04 +01:00
Fabian Greffrath
5a314ae831 support "extended nodes"
This converts some variables to their unsidged types, which enables
the port to load all maps which use the regular Doom BSP nodes format.

This enables the port to load some maps that it would normally choke
upon, e.g. Nova Maps 30 and 31; Eviternity Map 15 and Sunlust Maps 16,
18, 20, 24, 28 and 31.

It does still not support DeePBSP and ZDBSP nodes, and will probably
never do.

Fixes #23.
2020-01-09 21:05:04 +01:00
Fabian Greffrath
b7b15098b0
fullscreen toggle from the video menu (#24)
This appends a "Fullscreen Mode" entry to the Video menu.

While at it, clean up the previous menu changes a bit. Added menu entries are always appended to the end of a menu. Remove the now useless sound and music card selection entries.
2020-01-09 20:56:41 +01:00
Fabian Greffrath
9792e384b1
add support for more IWADs (#22)
More specifically, add support for the FreeDoom IWADs and for the
IWADs that are shipped with the Doom Classic engine that is used for
the Doom 3: BFG Edition.

 * Add the three FreeDoom IWADs to the standard_iwads[] array.
 * Improve the gamemissions detection, because freedoom2.wad contains
   characteristic lumps of both Plutonia and TNT.
 * Fixes #4.

 * Identify the BFG Edition IWADs by their unique DMENUPIC lump.
 * The BFG Edition IWADs have a PWAD signature, so be more forgiving
   in CheckIWAD().
 * Since the BFG Edition IWADs are missing the TITLEPIC lump, use the
   DMENUPIC lump instead.
 * Since the BFG Edition IWADs have their M_SCRNSZ menu graphic lump
   read "Gamepad:", use the unused M_DISP lump instead which reads
   "Display".
 * Fixes #3.
2020-01-09 17:38:23 +01:00
Fabian Greffrath
5f5e0e7aaf fix crash when loading maps without REJECT table
Fixes #18
2020-01-09 17:36:46 +01:00
Fabian Greffrath
edff9efc98 fix crash when loading trivial single subsector maps
Fixes #17
2020-01-09 17:34:58 +01:00
Fabian Greffrath
0084c53cb9 Merge branch 'master' of https://github.com/fabiangreffrath/WinMBF 2020-01-09 17:30:26 +01:00
Fabian Greffrath
4434949868 unify some compiler-specific code
more precisely, port the packed attribute definition for structs over
from Chocolate Doom
2020-01-09 09:43:09 +01:00
Fabian Greffrath
cd4b09f195 properly restore previous window size
when returning from fullscreen or changing rendering resolution
2020-01-08 22:18:27 +01:00
Fabian Greffrath
889f1e163e allow to build reproducibly 2020-01-08 21:57:00 +01:00
Fabian Greffrath
14720f7ca1 increase some string buffers to silence some more warnings 2020-01-08 15:18:24 +01:00
Fabian Greffrath
960c30c342 and yet more warning fixes uncovered by Travis CI 2020-01-08 15:01:20 +01:00