summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2015-04-04setup: Add help URLs for configuration windows.Simon Howard
The wiki now has documentation pages for most of the windows in the setup tool. Add help URLs that link to these. One other minor change here is that the warp button on the main menu had to change to F2 instead of F1, which is now the help key.
2015-03-30Merge pull request #523 from chocolate-doom/hexndemoFabian Greffrath
Add support for the Hexen 4 Level Demo Version
2015-03-30The 4-Level Demo Version also has 3 Info pagesFabian Greffrath
2015-03-30Turn maxplayers into a global variableFabian Greffrath
... and decrease its value from MAXPLAYERS (i.e. 8) to 4 if (gamemode == shareware). It seems that it was hard-coded to this value until some time between the releases of the Demo and the Full version. Arrays are still declared with their full width of 8, though, they are just not iterated over the whole range anymore. This fixes playback of the IWAD demos.
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-03-27misc: Handle M_StringCopy() short buffer case.Simon Howard
M_StringCopy() must always be provided a buffer of at least one character long, so that a NUL character can be written. If this is not the case, return immediately and indicate that the buffer was truncated.
2015-03-27Remove old DOS source files.Simon Howard
These are leftover files that were kept around for posterity in the heretic/ and hexen/ directories, that contained system-specific DOS code used in the DOS versions of the games. There's no real reason to keep these files around any more and it's confusing having them around: some people who have tried to compile the code have mistakenly tried to include these files in compilation.
2015-03-27Avoid calling strlen() on a potentially unterminated stringFabian Greffrath
The src string may be unterminated and the call to strncpy() be terminated by reaching dest_size. Instead of calling strlen() on the src string, check if it has a NUL byte at the same position as the dest string -- if not, the string was truncated. Valgrind now gives thumbs up!
2015-03-26Add a wrapper with "void (void)" signature around G_CheckDemoStatusFabian Greffrath
This is meant to be passed over to I_AtExit() which expects an argument of void type. It thus prevents undefined behaviour because of the different signature of G_CheckDemoStatus() which is of boolean type. Fixes #519
2015-03-26Move MSVC-specific inline definition to doomtype.hFabian Greffrath
I think it fits better there and in case further inline fuctions are introduced in files other than i_scale.c, it should not be necessary to copy this definition around.
2015-03-26Merge branch 'master' of https://github.com/chocolate-doom/chocolate-doom ↵Fabian Greffrath
into hexndemo
2015-03-25setup: add support for the Xbox One controller on LinuxMike Swanson
Effectively it's a slightly re-arranged Xbox 360 controller, no major changes, so we can just use the same config as that one.
2015-03-23play sound when trying to enter a forbidden map in the demo versionFabian Greffrath
2015-03-23maintain an explicit switch list for the demo versionFabian Greffrath
instead of interating through the list for the full version and letting missing texture lumps slip through.
2015-03-10OPL code guideline style fixkhokh2001
2015-03-09Hexen and Heretic use older DMX. Since OPL Voice Allocating algorithm ↵khokh2001
differ. This commit adds old DMX's voice allocating alogrithm for Hexen and Heretic.
2015-03-05Initialize floor->type and floor->crush fields in EV_BuildStairs()Fabian Greffrath
The floor->type and floor->crush fields of the floor thinkers added in EV_BuildStairs() were originally left uninitialized and thus contained random memory content. Initialize them to make sure the floor->type field does not trigger propagation of random content into the special and texture fields of the adjacent sector in T_MoveFloor(). That is, make sure its value is neither donutRaise, i.e. 11, nor lowerAndChange, i.e. 6. Also, the chances of 32 bit of random memory being "true", i.e. 0, are negligible. This is functionally equivalent to what PrBoom+ is doing. Fixes desync of mm09-512.lmp. Fixes #368.
2015-02-23Switch pick-up messages for Chaos Device and Disc of RepulsionFabian Greffrath
For bug compatibility with the original 4-level Demo. Confirmed on map04 with the Demo version with the following md5sums: 458d3ff08d32fc50abb55a5b68660b6b HEXEN.EXE 876a5a44c7b68f04b3bb9bc7a5bd69d6 HEXEN.WAD
2015-02-22Merge branch 'master' of github.com:chocolate-doom/chocolate-doomSimon Howard
2015-02-22Fix mistaken uses of memcpy() on overlapping memory.Simon Howard
The source and destination arguments to memcpy() cannot be overlapping as this is undefined behavior. In these situations memmove() must be used instead, and OpenBSD actually throws an error if this is done. Thanks to ryan-sg for reporting this. This fixes #510.
2015-02-20Strife sound priority fixJames Haley
The Strife binary has another priority check in the first loop inside S_GetChannel. TODO: Does DOS Doom have this as well? Find out. Resolves issue #506.
2015-02-20Warning fixesJames Haley
Signed/unsigned comparison mismatches
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.
2015-02-20Fix game code that makes false boolean assumptions.Simon Howard
Various bits of code assume that booleans are represented as 32-bit ints and that they can be assigned to from 32-bit values. This isn't true on all systems; fix code that does this to convert to boolean values properly. This is more progress towards fixing #509.
2015-02-19doom: Change weaponowned[] to an int array.Simon Howard
The st_stuff.c status bar code passes pointer to an entry in weaponowned[] as an int pointer, but weaponowned[] is an array of booleans and booleans are not always represented as 32-bit ints. Remove the (int *) cast and ensure correct behavior. This fixes the immediate issue in #509 (thanks floppes).
2015-02-19Apparently, the Hexen font only has upper-case chcractersFabian Greffrath
2015-02-17setup: fix "control reaches end of non-void function" compiler warningFabian Greffrath
Actually, it is impossible to reach the end of these two functions without return()ing earlier from one of the switch() statements' branches. But since the compiler cannot know this and warns about it, and since this warning can be escalated into an error in later compiler versions, silence it by return()ing a dummy value at the end of each function. Fixes #508
2015-02-13Identify the "shareware" version early on.Fabian Greffrath
Following the concept of Chocolate Doom, D_IdentifyVersion and D_SetGameDescription are introduced and called right after loading the IWAD. The first one checks for the characteristics of the "shareware" IWAD and sets gamemode accordingly, whereas the latter sets the gamedescription string according to gamemode. This string is then used in I_PrintStartupBanner() and I_SetWindowTitle(). So, the "shareware" version identifies itself properly now. I consider support for the 4 Level Hexen Demo pretty complete by now.
2015-02-02currently, no separate startup banner for the demo version :(Fabian Greffrath
2015-02-02adapt cheat codes for the demo versionFabian Greffrath
2015-02-02set the max_players limit in network games to 4 in shareware modeFabian Greffrath
2015-01-20Merge branch 'master' of https://github.com/chocolate-doom/chocolate-doom ↵Fabian Greffrath
into hexndemo
2015-01-20First shot at support for the Hexen 4-level DemoFabian Greffrath
With these changes it is possible to run the game using the HEXEN.WAD IWAD from the 4-level Demo and start a new game as one of the three player classes. Known missing bits: - The game does not yet identify itself as the demo version - The cheat codes are still unchanged - Bug compatibility, see e.g. http://dengine.net/dew/index.php?title=Libhexen
2015-01-19Add extra checks to weapon cycling loops.Simon Howard
Ensure that the loops to find the next weapon always terminate - even if there are somehow no weapons equipped. Also, only ever do weapon cycling when in the GS_LEVEL gamestate. This fixes #503 - thanks to Fabian and raithe on Doomworld.
2014-12-29add missing includes for calling SHORT() in HereticFabian Greffrath
fixes #497
2014-12-29Merge pull request #493 from derek57/patch-3Fabian Greffrath
No. 2: even more endianness fixes by myself (Ronald Lasmanowicz)
2014-12-29Merge pull request #492 from derek57/patch-2Fabian Greffrath
No. 1: even more endianness fixes by myself (Ronald Lasmanowicz)
2014-12-26allow building in subdirectory or outside source directoryDave Murphy
2014-12-22even more endianness fixes by myself (Ronald Lasmanowicz)derek57
I figured this out while porting Chocolate to the Nintendo Wii and also had to change these lines of code.
2014-12-22even more endianness fixes by myself (Ronald Lasmanowicz)derek57
I figured this out while porting Chocolate to the Nintendo Wii and also had to change these lines of code.
2014-12-18Strip out CPU affinity hack.Simon Howard
This was added a long time ago, supposedly as a workaround for SDL_mixer issues. It's not clear that this ever properly solved the problem, and it seems unlikely that it's doing any good any more. Quasar has pointed out that it actually impedes performance, and some forks may want to use SMP (Strife: Veteran Edition had to remove it). This fixes #484 (thanks Quasar).
2014-12-18Merge branch 'master' of https://github.com/chocolate-doom/chocolate-doomFabian Greffrath
2014-12-18fix some more endianess issues with the width fields in patch_t structsFabian Greffrath
as pointed out necessary by Ronald Lasmanowicz for his Wii ports
2014-12-18fix a bug that causes monsters to become partly invisibleFabian Greffrath
when walking inside liquids like water -- on big-endian systems Originally reported by Ronald Lasmanowicz and fixed in his wii-hexen port: https://code.google.com/p/wii-hexen/source/detail?r=17
2014-12-16strife: Fix the name of MAP29, should be "Entity's Lair"Mike Swanson
Double-checked with strife1.exe
2014-12-15Upstream fix from SVE: MF_MVIS flagJames Haley
The MVIS flag, if set on an object *without* MF_SHADOW, imparts total invisibility. This is the intended effect on players using double Shadow Armors.
2014-12-15Upstream fix from SVE: Missing break statementJames Haley
This caused Rowan to fail to take Beldin's ring from you, if and only if you had full bullet ammo. Transcription error from the disassembly.
2014-12-14Add Steam IWAD path for Strife: Veteran EditionMike Swanson
2014-11-27hexen: audit calls to P_StartACS().Simon Howard
Scripts can have a maximum of three arguments when started (see ACS_Execute / #80 linedef special type). This means that the array of arguments passed must be at least three elements in length. When loading scripts, check the argument count never exceeds 3, and print a warning message if it does. Don't pass pointers to structure members implicitly treating them as elements of an array (as this relies on compiler-dependent behavior as to how structure members are laid out). Instead, copy values into a temporary array to make the intended behavior explicit. This fixes #477. Thanks to Quasar for reporting it.
2014-11-27hexen: Store minotaur start time as little endian.Simon Howard
The minotaur uses the first four bytes of the mobj_t args[] array to store its spawn time; after a certain amount of time has passed the minotaur self-destructs. But the level time was being copied from the leveltime variable without any endian conversion taking place. For compatibility with Vanilla Hexen savegames we need to store the start time in little endian format. This fixes the first issue noted in #477 (thanks Quasar).