Simon Howard
3e0dc2d65c
Fix warnings introduced by previous commits.
2018-09-09 18:54:20 -04:00
Simon Howard
b695b71233
iwad: Check executable location for IWADs.
...
This adds an additional search path when looking for IWADs - in addition
to checking the current working directory, also look in the directory
where the program executable is located.
To give some context for why I'm adding this: apparently there's a small
number of users who do something very unpleasant that I'd really prefer
they didn't: they "install" Chocolate Doom into Steam by replacing
dosbox.exe from their Steam installation of Doom with a renamed version
of `chocolate-doom.exe`. Yuck, I don't approve - it's a grotesque hack.
This works but it has a bug: Chocolate Doom picks up the Steam IWADs
from Windows registry keys. This means that it always starts doom2.wad,
and launching "Ultimate Doom" will actually launch Doom II. This solves
that problem, and while I don't approve of dumb Steam hacks, the change
itself is reasonable and it's an eminently sensible place to look for an
IWAD file.
2018-09-09 18:45:23 -04:00
Simon Howard
b34edc6d3e
Convert various bits of code to M_{Dir,Base}Name.
...
The new functions significantly improve readability and I'm pretty
sure that most of these changes produce logic that is equivalent to
the existing logic.
2018-09-09 18:44:18 -04:00
Simon Howard
ae8c1ed2e0
misc: Add M_{Dir,Base}Name utility functions.
...
These extract the directory / base filename, equivalent to the Unix
`dirname` / `basename` commands. Repeated code throughout the codebase
seems to reimplement this particular functionality.
2018-09-09 18:36:47 -04:00
Fabian Greffrath
de9163ef53
config: let GetDefaultConfigDir() never return NULL
...
Fixes #1083 , thanks @Pickle
2018-09-04 15:32:34 +02:00
Toni Spets
1641969b57
doom: Refactor wipe to advance once per frame
2018-08-24 16:22:52 +03:00
Simon Howard
28e726147a
Merge pull request #1075 from turol/const
...
More const correctness
2018-08-18 00:48:19 -04:00
Simon Howard
9ea4b024c2
Merge pull request #1079 from hifi/fix-setup-crash
...
setup: Use proper function signatures for callbacks
2018-08-18 00:47:56 -04:00
Jonathan Dowland
98f4af33f4
Merge pull request #1077 from hifi/fix-joystick-event-skip
...
doom: Don't skip joy events when menu is closed
2018-08-15 18:21:45 +01:00
Toni Spets
2d68e0791c
setup: Use proper function signatures for callbacks
...
This prevents the setup main menu from crashing when the caller
does not clean the stack.
2018-08-15 19:52:30 +03:00
Toni Spets
078673f730
doom: Don't skip joy events when menu is closed
...
Fixes #1015 .
2018-08-12 12:00:39 +03:00
Simon Howard
dd78c0873e
Merge pull request #1074 from AXDOOMER/master
...
Heretic: Fix P_FindNextHighestFloor's behavior
2018-08-11 13:02:27 -04:00
Turo Lamminen
3bd1270c48
hexen: Fix constness issues in DrawClassMenu
2018-08-07 18:45:58 +03:00
Turo Lamminen
a901b7a5b6
hexen: Fix constness issue in MN_Drawer
2018-08-07 18:45:11 +03:00
Turo Lamminen
1e71555aa5
hexen: Make QuitEndMsg contents const
2018-08-07 18:45:11 +03:00
Turo Lamminen
dcc753fbfc
hexen: Make GammaText contents const
2018-08-07 18:45:11 +03:00
Turo Lamminen
e11589559f
hexen: Make P_SetYellowMessage message parameter const
2018-08-07 18:45:11 +03:00
Turo Lamminen
77f1f76b2b
hexen: Make P_SetMessage message parameter const
2018-08-07 18:45:11 +03:00
Turo Lamminen
7660e72fe8
hexen: Make MenuItem_t text member const
2018-08-07 18:45:11 +03:00
Turo Lamminen
e822d5dfec
hexen: Make ACSAssert fmt parameter const
2018-08-07 18:45:11 +03:00
Turo Lamminen
cd812fce50
hexen: Make MN_TextBWidth parameter const
2018-08-07 18:45:11 +03:00
Turo Lamminen
b0cfaad650
hexen: Make MN_DrTextB text parameter const
2018-08-07 18:45:11 +03:00
Turo Lamminen
f57c4033db
hexen: Make MN_TextAWidth parameter const
2018-08-07 18:45:11 +03:00
Turo Lamminen
79d1b19e61
hexen: Make MN_DrTextAYellow text parameter const
2018-08-07 18:45:11 +03:00
Turo Lamminen
7209e8aba3
hexen: Make MN_DrTextA text parameter const
2018-08-07 18:45:11 +03:00
Turo Lamminen
062e8870ff
hexen: Fix constness issue between SC_MatchString, SC_MustMatchString and MapCmdNames
2018-08-07 18:45:11 +03:00
Turo Lamminen
e026fc8729
hexen: Make SC_Compare parameter const
2018-08-07 18:45:11 +03:00
Turo Lamminen
0e86f377a3
hexen: Make SC_ScriptError parameter const
2018-08-07 18:45:11 +03:00
Turo Lamminen
6f1d394d40
hexen: Make SC_OpenFile parameter const
2018-08-07 18:45:11 +03:00
Turo Lamminen
d5298aab05
hexen: Make SC_Open parameter const
2018-08-07 18:45:09 +03:00
Turo Lamminen
3430e574e1
hexen: Make SC_OpenLump parameter const
2018-08-07 18:12:10 +03:00
Turo Lamminen
a1a4a8190d
hexen: Make OpenScript name parameter const
2018-08-07 18:08:01 +03:00
Turo Lamminen
464c1ca1cb
hexen: Make R_TextureNumForName parameter const
2018-08-07 18:04:57 +03:00
Turo Lamminen
4f2fb75e1c
hexen: Make R_CheckTextureNumForName parameter const
2018-08-07 18:03:33 +03:00
Turo Lamminen
06bec5ae5a
hexen: Make R_FlatNumForName parameter const
2018-08-07 17:58:21 +03:00
Turo Lamminen
ed41adf84b
hexen: Make SV_SaveGame description parameter const
2018-08-07 17:55:00 +03:00
Turo Lamminen
81e83adb14
hexen: Make SV_Write buffer parameter const
2018-08-07 17:52:57 +03:00
Turo Lamminen
57421ae3e1
hexen: Make G_DeferedPlayDemo parameter const
2018-08-07 17:40:09 +03:00
Turo Lamminen
92f5c72a55
hexen: Mark defdemoname variable static
2018-08-07 17:38:40 +03:00
Turo Lamminen
f6ec4e9288
hexen: Make defdemoname variable const
2018-08-07 17:38:26 +03:00
Turo Lamminen
cacc67fa1d
heretic: Make TerrainTypeDefs name member const
2018-08-07 17:32:37 +03:00
Turo Lamminen
43faac6fd9
heretic: Make QuitEndMsg contents const
2018-08-07 17:28:05 +03:00
Turo Lamminen
e9c6e30c89
heretic: Make MenuItem_t text member const
2018-08-07 17:26:53 +03:00
Alexandre-Xavier Labonté-Lamoureux
1134129bf8
Heretic: Fix P_FindNextHighestFloor's behavior
...
The floor would raise to INT_MAX if no surrounding sector was higher, which isn't how vanilla Heretic behaves.
2018-08-06 21:03:16 -04:00
Simon Howard
82ff0b7009
Merge pull request #1072 from turol/const
...
More const correctness
2018-08-02 17:10:57 -04:00
Turo Lamminen
ef9843f52c
doom: Make msgNames contents const
2018-07-31 18:30:08 +03:00
Turo Lamminen
40b87adce9
doom: Make detailNames contents const
2018-07-31 18:30:08 +03:00
Turo Lamminen
8c763b6ea9
doom: Make skullName contents const
2018-07-31 18:30:08 +03:00
Turo Lamminen
402de60712
doom: Make sprnames contents const and fix some function parameters to match
2018-07-31 18:30:08 +03:00
Turo Lamminen
19202f1c52
doom: Fix constness issue in HU_Responder
2018-07-31 18:30:08 +03:00