Commit graph

3607 commits

Author SHA1 Message Date
Dugan Chen
428027629c Install icons to PREFIX/share/icons/hicolor/128x128/apps 2017-12-09 15:37:37 -08:00
Fabian Greffrath
95bd2d4483 fix some mixed line endings 2017-12-02 18:00:29 +01:00
Fabian Greffrath
e845757894 midipipe: initialize state variables 2017-11-25 11:11:02 +01:00
Fabian Greffrath
f88cbbaa4a midiproc: consider the case that RegisterSong() fails
More specifically, because Mix_LoadMUS() fails, e.g. because it does not
recognize the music lump's file format. Music lumps are not always in
MUS or MIDI format nowadays, so let other code handle that.
2017-11-23 15:22:37 +01:00
Fabian Greffrath
b90a9e5838 cp-with-libs: add dsound.dll to the list of bundled DLLs 2017-11-23 15:19:36 +01:00
Fabian Greffrath
f4abf51e5c i_sdlmusic: avoid code duplication and code path splitting 2017-11-22 20:46:04 +01:00
Fabian Greffrath
413f4ecd7a video: disable VSYNC if software rendering is enforced
Fixes #955, thanks @JNechaevsky
2017-11-04 13:32:15 +01:00
Simon Howard
8204450bac
Merge pull request #953 from ericwa/sdl2-branch
Allocate large enough buffer for SDL_ConvertAudio.
2017-11-01 00:41:52 -04:00
Eric Wasylishen
bd954b9413 Allocate large enough buffer for SDL_ConvertAudio.
Fixes #945
2017-10-31 14:48:40 -06:00
Simon Howard
4746d23891 strife: Move D_IdentifyVersion() earlier in startup.
D_IdentifyVersion() as well as identifying the game version also
loads voices.wad. In order to support WADs which replace lumps from
voices.wad, this needs to be loaded before any PWADs are loaded; this
is also consistent with vanilla Strife behavior. The voices.wad file
was also being loaded after initialization of the WAD file hash table,
which was less efficient.

This fixes #906. Thanks @Catoptromancy for reporting.
2017-10-22 19:13:44 -04:00
Simon Howard
6a51ab4fdf setup: Tweak server list interface.
When finding a server to join it helps to know if other players are
already connected. So include a player count, but because of the limited
screen space, only if there already are players. Also fix the
capitalization of the word "Internet".

This fixes #907. Thanks to @JNechaevsky for the report.
2017-10-22 18:54:50 -04:00
Simon Howard
58006edc22 textscreen: Add extern "C" for C++ imports.
This fixes #941. Thanks to @Altazimuth for the suggestion.
2017-10-22 18:39:22 -04:00
Simon Howard
4edede3f4a sound: Refuse to start with SDL 2.0.6.
It's known now (#945) that the game is unusable with SDL 2.0.6 due to
a crash bug in the sound code. To avoid recurring bug reports about
this, add a guard in the sound startup code that will cause the game
startup to abort if the user has v2.0.6 installed.
2017-10-22 18:36:27 -04:00
Fabian Greffrath
b2efcd1394 video: remove redundant comment 2017-10-16 10:48:07 +02:00
Fabian Greffrath
7d800ed67c video: calculate actualheight only once
This value remains constant, so there's no need to recalculate it by
calling EffectiveScreenHeight(). Set it once during initialization.
2017-10-14 22:05:04 +02:00
Jonathan Dowland
9e59e9a4ee Merge pull request #948 from jmtd/joypad-look
Permit binding of joystick axes to look up/down
2017-10-13 10:17:14 +01:00
Jonathan Dowland
ef9b45168f don't rely on enum ordering for game properties
It happens that all gamemission values that match >= heretic
support look up/down, but this is not a property that we are
explicitly guaranteeing.
2017-10-11 08:22:14 +01:00
Jonathan Dowland
3ce64ca059 address some minor review comments
(from myself)
2017-10-10 22:18:17 +01:00
Jonathan Dowland
41a22dcb13 Permit binding of joystick axes to look up/down
In games which support a look/down action (Heretic, Hexen, Strife)
permit binding a joystick axis to those actions.

Altazimuth was asking me some questions on IRC about how we handle
mouse wheel actions and that got me thinking about some of the
input stuff (specifically joystick stuff) that we hadn't finished
off.
2017-10-10 18:14:51 +01:00
Fabian Greffrath
62c8b62c5e config: only define str[n]casecmp if necessary
Recent versions of MinGW-W64 already have these symbols defined and
throw a warning if we attempt to re-define them.
2017-10-09 10:36:48 +02:00
Simon Howard
6e8dc57e94 cdmus: Change I_CDMusInit() to return failure.
CD music support has basically been removed now, so this function
should return -1 to indicate failure. But print an error message and
provide a useful link to an alternative.
2017-10-08 22:09:11 -04:00
Simon Howard
5c4a7a14d1 net: Make "Players" column more compact.
This should usually (always?) be no more than 4 characters wide, and
we can offset the column header to the left slightly.
2017-10-08 20:45:55 -04:00
Simon Howard
ac034f8966 net: Increase width of "Address" column.
Since 29a66d7a5c we now include the port number in server
addresses if they are a nonstandard port. So a full IP+port string
can be up to 21 characters long.
2017-10-08 18:38:30 -04:00
Simon Howard
7a611a627d net: Include protocol list in query responses.
If we try to connect to an incompatible server, the server will reject
the connection attempt. Now that we have a more elaborate scheme to
negotiate a common protocol than just comparing version strings, we
can be more confident about ignoring servers that we definitely won't
be able to connect to. So use the protocol list included in query
responses to exclude query responses from servers we aren't compatible
with.
2017-10-08 18:30:57 -04:00
Simon Howard
6b1d0a8102 net: Move protocol list code to net_structrw.c.
This is slightly out of place because these functions aren't for
writing "structs" as such. But they still fit in better here than
in net_common.c since they aren't really just part of the common
connection code, and will be needed to include protocol list inside
query response packets.
2017-10-08 18:25:22 -04:00
Fabian Greffrath
308905898e video: simplify PNG screenshot code
Only one check for aspect_ratio_correct, same code path for both
choices.
2017-10-08 11:08:57 +02:00
Jonathan Dowland
a9cf8ba9c2 Merge pull request #946 from devnexen/sdl2-branch
for strcmp
2017-10-01 15:37:22 +01:00
David Carlier
8e4125eb68 for strcmp 2017-10-01 09:07:05 +01:00
Simon Howard
78206090eb Merge pull request #943 from fragglet/sdl2-branch
Introduce a network protocol versioning scheme.

This will allow backwards-compatible protocol changes in future,
and also allow forks to remain compatible with Chocolate Doom.
2017-10-01 02:19:15 -04:00
Simon Howard
2855c1081f net: Make a bunch of things const.
@turol pointed out in #943 that these should be marked as const. This
requires fixing `NET_WriteString()` but is the right thing to do
nonetheless.
2017-09-28 08:48:23 -04:00
Simon Howard
73a1d06182 net: Reduce scope of variables.
These are only needed inside the loop. Thanks @turol.
2017-09-28 08:44:56 -04:00
Simon Howard
f7f82be500 net: Add clarifying comments about net_protocol_t.
Thanks @jmtd.
2017-09-28 08:42:45 -04:00
Simon Howard
0cdd84e7f5 net: Fix incorrect loop condition.
Thanks @turol.
2017-09-28 08:40:11 -04:00
Simon Howard
a104b98d48 net: Get rid of NET_SafePuts().
Instead what's almost always wanted is to read a "safe" string that
cannot contain any control codes. So introduce NET_ReadSafeString()
instead as a wrapper around NET_ReadString() that does this.
2017-09-27 23:37:46 -04:00
Simon Howard
2443334545 net: Add protocol negotiation on client connection.
The idea here is that we define a protocol versioning scheme, where we
give a symbolic (string) name to each protocol version. This allows us
to define new protocol versions in the future while retaining
compatibility between different Chocolate Doom versions. It also allows
forks of Chocolate Doom to define their own protocols while retaining
the ability to connect to Chocolate Doom servers (and vice versa, for
Chocolate Doom clients to connect to forked servers).

When a client connects to a server, we send a list of protocols that are
supported. The server compares it to its own list of protocols and
selects a common protocol that will be used. The protocol is then sent
back to the client in a reply packet.

In order to do this, we must change the way that clients connect to
servers. Previously the client sent a SYN packet, and the server would
respond with an ACK packet. Instead, get rid of ACK packets and send a
SYN packet back instead. This also simplifies the state machine when
performing a connect. Since this is a fundamental change in the
protocol, change the magic number sent when connecting, but continue to
recognize the old magic number and send a reject message to old clients.
2017-09-27 23:06:57 -04:00
Fabian Greffrath
f1f8ecdeea Merge pull request #942 from chocolate-doom/makemake
Make "make" aware of convenience libraries in subdirectories
2017-09-20 15:52:22 +02:00
Fabian Greffrath
4082f7caec Make "make" aware of convenience libraries in subdirectories
This may not be the most sophisticated solution (i.e. I would have
preferred to use wildcards in the target rules), but it should be
good enough to fix #938.
2017-09-20 10:26:48 +02:00
Fabian Greffrath
58fee652c4 Merge pull request #940 from chocolate-doom/shorttics
add a -shorttics command line option
2017-09-15 23:32:57 +02:00
Fabian Greffrath
af02c3dbfd replace M_CheckParm() with M_ParmExists() 2017-09-15 23:32:25 +02:00
Fabian Greffrath
11035e797c add a -shorttics command line option
I was really surprised today when ZeroMaster010 told me that he always
has to start Doom with the -record parameter to practice for his
record runs, because there is no other way to enable low-resolution
turning during normal play.

Why is that? I mean, we have a command line switch to enable
full-resolution turning even when recording a demo, so why shouldn't
there be a switch to force low-esolution turning even when not
recording a demo. PrBoom+ already has this switch.
2017-09-15 21:29:29 +02:00
Simon Howard
14fc72bbad video: Fix out-of-date comment.
Thanks Fabian.
2017-09-14 22:05:38 -04:00
Simon Howard
b5db4a7536 Merge branch 'sdl2-branch' of github.com:chocolate-doom/chocolate-doom into sdl2-branch 2017-09-04 23:55:26 -04:00
Simon Howard
f62b804e6d heretic: Remove list terminator for alphSwitchList.
This was mistakenly not removed in 3cf762118e which was causing
Heretic to fail on startup.
2017-09-04 23:54:24 -04:00
turol
63141cfc0d Add cppcheck static analysis to travis build (#939)
This runs cppcheck static analysis as part of the travis-ci checks. The
current Travis version of cppcheck doesn't appear to support all the checks
we want, but for now should be sufficient. Identified issues that would cause
these checks to fail have been resolved in previous commits.

Thanks to @turol for doing the work to set this up.
2017-09-03 16:29:27 -04:00
Simon Howard
a89a0e655d Add checks in P_RespawnSpecials().
When respawning a mobj we scan the mobjinfo[] array to find the type
that represents the object. It's possible that we don't find it and in
this case an array index overrun occurs. Handle this by exiting with an
error rather than continuing. This was detected by cppcheck static
analyses set up by @turol and blocking #939.
2017-09-02 19:33:22 -04:00
Simon Howard
3cf762118e Fix warnings about P_InitSwitchList() overruns.
This function is weirdly written and the logic is hard to follow, so
clean it up. This resolves warnings about array index overruns surfaced
by cppcheck and blocking #939. Thanks @turol for discovering.
2017-09-02 19:25:10 -04:00
Simon Howard
75bedca7fb textscreen: Check return value from realloc().
This fixes a static analysis warning detected in #939. Thanks to
@turol for finding this.
2017-09-02 19:02:54 -04:00
Mike Swanson
d8054e6075 Merge branch 'master' into sdl2-branch 2017-08-25 11:56:09 -07:00
Mike Swanson
83a71dd850 d_iwad: Find the GOG install of Doom 3: BFG
Ordered so that vanilla Doom II takes precedence, but Doom II BFG will
be located and loaded before a Final Doom install.
2017-08-25 11:54:05 -07:00
Fabian Greffrath
435bf4b11a Remove duplicate I_Realloc() definition
It somehow got there by cherry-picking the changes from the i_realloc
branch into the master branch and then merging the master branch into
the sdl2-branch. Sorry for the confusion.
2017-08-23 09:00:37 +02:00