summaryrefslogtreecommitdiff
path: root/src/setup/multiplayer.c
AgeCommit message (Collapse)Author
2015-05-04warnings: fix some cast to/from pointer from/to int warningsFabian Greffrath
This fixes the following two warnings cast from pointer to integer of different size cast to pointer from integer of different size by either changing some ints that are supposed to hold pointers to intptr_t type or by intermediate casting to (intptr_t).
2015-03-28net: Include port number in address strings.Simon Howard
When generating string representations of network addresses, include the UDP port number if it isn't the standard port number. This is necessary because the string version of the address is used by the setup tool when filling in the address field; if a non-standard port is used then it needs to be included. Also fix byte swapping on the address portion in the same function. Thanks to Alexandre-Xavier for the bug report on #469.
2015-02-20Refactor config file API.Simon Howard
The config file API previously relied on binding config variables using M_BindVariable() which took a void pointer. It occurred to me that if used on a boolean variable, this would be erroneous, but the void pointer would make it impossible to tell. Split this into separate M_Bind{Foo}Variable() functions based on type, which allows for proper type checking on the pointers that are passed. Vaguely related to #509.
2014-11-04setup: Fix bug with strdup() of NULL pointer.Simon Howard
getenv() can return NULL if the environment variable is not set, but the result of getenv() was always being passed to M_StringDuplicate() without any check. This could cause crashes on some platforms. Instead, rework the code into a first stage that gets the player's name and a second that duplicates it into a mutable form. This fixes #455.
2014-10-28setup: dynamically set size of iwad_labels arrayFabian Greffrath
With the addition of the Freedoom IWADs, the number of IWADs supported by chocolate-doom has been raised to 10. However, the iwad_labels[] array only holds place for up to 8 pointers. Incidently, I have all 10 IWADs installed and trying to warp into a game from chocolate-doom-setup leads to an out-of-bounds access of this array and so the application crashes with a segmentation fault. Instead of increasing the array size to 10, which will bite us next time, I decided to set its size dynamically as soon as the number of IWADs of known.
2014-10-24Replace strdup() with M_StringDuplicate().Simon Howard
strdup() can theoretically fail and return NULL. This could lead to a crash or undesirable behavior. Add M_StringDuplicate() which does the same thing but exits with an error if a string cannot be allocated. This fixes #456. Thanks to Quasar for the suggestion.
2014-05-05Clean up file headers.Simon Howard
This change rewrites and simplifies the copyright headers at the top of all source files: * Remove "Emacs style mode select" line; this line was included in the headers for the originally released source files and appears to be to set the file type for old versions of Emacs. I'm not sure entirely why it was required but I don't think it is any more. * Remove "You should have received a copy of..." text from copyright header. This refers to the old 59 Temple Place address where the FSF headquarters used to be located and is no longer correct. Rather than change to the new address, just remove the paragraph as it is superfluous anyway. This fixes #311. * Remove ---- separator lines so that the file headers are barer and more simplified.
2014-04-19setup: Make iwad_t pointers const.Simon Howard
The table of IWAD data is stored in const memory, so make all iwad_t pointers const to fix compiler warnings.
2014-04-10setup: Save selected game when browsing menus.Simon Howard
Once a game type (IWAD) has been selected, remember that selection rather than resetting to the first item in the list when the window is closed and reopened. This fixes #169 (thanks Alexandre Xavier).
2014-04-09setup: Show error when server address not entered.Simon Howard
Don't launch the game if a server address has not been entered; show a message to the user instead. This fixes #121.
2014-04-01setup: Eliminate use of sprintf().Simon Howard
Use M_snprintf() or M_StringJoin() instead where appropriate. This fixes #371.
2014-03-29setup: Eliminate use of unsafe string functions.Simon Howard
Eliminate use of strcpy, strcat, strncpy, and use the new safe alternatives.
2014-03-16hexen: Increase maximum level number to MAP60.Simon Howard
Hexen: Deathkings of the Dark Citadel uses levels up to MAP60, not MAP40 as used in hexen.wad. Bump up the limit for Hexen to MAP60 so that it is possible to play multiplayer games with hexdd.wad loaded. Thanks to Rhiyo for the bug report. This fixes #312.
2013-11-19Fix crash when using fallback Doom IWAD and selecting level.Simon Howard
Subversion-branch: /branches/v2-branch Subversion-revision: 2754
2013-10-26Select fallback IWADs that match the game we are configuring (thanksSimon Howard
Alexandre Xavier). Subversion-branch: /branches/v2-branch Subversion-revision: 2719
2013-08-17Fix IWAD auto-selection when joining a game in the setup tool (thanksSimon Howard
Alexandre Xavier). Subversion-branch: /branches/v2-branch Subversion-revision: 2619
2013-04-01Merge from trunk.Simon Howard
Subversion-branch: /branches/v2-branch Subversion-revision: 2577
2013-03-27Remove duplicate definition of M_OEMToUTF8() (thanks exp(x)).Simon Howard
Subversion-branch: /branches/v2-branch Subversion-revision: 2569
2013-01-03Refactor skill selector to change automatically when switching characterSimon Howard
class in Hexen mode. Add Strife skills list. Subversion-branch: /branches/v2-branch Subversion-revision: 2557
2012-10-28Merge from trunk.Simon Howard
Subversion-branch: /branches/v2-branch Subversion-revision: 2537
2012-02-28Oops.Simon Howard
Subversion-branch: /branches/v2-branch Subversion-revision: 2506
2012-02-02Bind missing sound variables so the settings are not lost when runningSimon Howard
the setup tool (thanks Alexandre Xavier). Subversion-branch: /branches/v2-branch Subversion-revision: 2485
2011-10-30Fix previous change - Strife games are not always -altdeath; the defaultSimon Howard
is -deathmatch and -altdeath enables Deathmatch II mode. Subversion-branch: /branches/v2-branch Subversion-revision: 2471
2011-10-29Update Strife multiplayer behavior to always use altdeath mode inSimon Howard
netgames, and remove code for -deathmatch parameter. Update setup tool to remove game type dropdown when setting up a Strife game. Subversion-branch: /branches/v2-branch Subversion-revision: 2470
2011-10-23Fix player name input box in multiplayer configuration.Simon Howard
Subversion-branch: /branches/v2-branch Subversion-revision: 2465
2011-09-20Display an error dialog if trying to connect to a server where a game isSimon Howard
already in progress. Subversion-branch: /branches/v2-branch Subversion-revision: 2392
2011-09-20Display a warning message when trying to join a server playing a gameSimon Howard
that we don't have the IWAD for. Subversion-branch: /branches/v2-branch Subversion-revision: 2389
2011-09-20Auto-select IWAD based on query response from server.Simon Howard
Subversion-branch: /branches/v2-branch Subversion-revision: 2387
2011-09-18Rerrange ordering of columns in server search dialog.Simon Howard
Subversion-branch: /branches/v2-branch Subversion-revision: 2384
2011-09-18Hook query code into setup tool, and add search results window.Simon Howard
Subversion-branch: /branches/v2-branch Subversion-revision: 2383
2011-09-17Add multiplayer query code to setup tool, and rework join gameSimon Howard
interface. Subversion-branch: /branches/v2-branch Subversion-revision: 2382
2011-02-12Merge from trunk.Simon Howard
Subversion-branch: /branches/raven-branch Subversion-revision: 2258
2010-12-10Merge from trunk.Simon Howard
Subversion-branch: /branches/raven-branch Subversion-revision: 2214
2010-08-31Merge from trunk.Simon Howard
Subversion-branch: /branches/raven-branch Subversion-revision: 1987
2009-11-21Merge from trunk.Simon Howard
Subversion-branch: /branches/raven-branch Subversion-revision: 1737
2009-07-11Only show altdeath option in Doom setup.Simon Howard
Subversion-branch: /branches/raven-branch Subversion-revision: 1616
2009-05-14Add character class selectors for Hexen.Simon Howard
Subversion-branch: /branches/raven-branch Subversion-revision: 1523
2009-05-14Merge from trunk. Note that src/i_sdlsound.c has not yet been merged asSimon Howard
it contains too many conflicts at present. Subversion-branch: /branches/raven-branch Subversion-revision: 1522
2009-05-10Set appropriate skill strings for Heretic/Hexen.Simon Howard
Subversion-branch: /branches/raven-branch Subversion-revision: 1517
2009-05-10Use the internal IWAD search for the setup multiplayer dialogs ratherSimon Howard
than the -findiwads command line hack. Subversion-branch: /branches/raven-branch Subversion-revision: 1516
2008-11-26Add bindings for remaining missing config file variables, to getSimon Howard
chocolate-setup functional again. Subversion-branch: /branches/raven-branch Subversion-revision: 1388
2008-11-21Move setup/ into src/ and merge with main codebase. Remove duplicatedSimon Howard
code. Split out I_Endoom to separate i_endoom.c file. Subversion-branch: /branches/raven-branch Subversion-revision: 1384