summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-03-05Merge branch 'master' of https://github.com/chocolate-doom/chocolate-doomFabian Greffrath
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-26Tweak HACKING style guide.Simon Howard
There was no example for how to write function calls. Do this to make clear that there should be no space between the function name and the open paren. Give examples of assignments and if() conditions as well, and tweak the for() style - there's no reason to omit spaces around operators for the looping conditions.
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-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-01-19PHILOSOPHY: Expand discussion on minimalism.Simon Howard
More self-indulgent ramblings about philosophy of software design.
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.
2015-01-07Merge pull request #502 from dbrackett16/patch-1Simon Howard
Fixed Missing File in Project
2015-01-06Fixed Missing File in projectdbrackett16
2014-12-29man: fix typo in manual generationFabian Greffrath
There was a slash separator missing Thanks sneakernets for the bug report! Fixes #498
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-26Merge pull request #495 from WinterMute/build-outside-source-dirSimon Howard
Allow building in subdirectory or outside source directory This one allows you to configure && make from a subdirectory or a directory outside the source tree. Useful for building several versions in the same tree for comparison.
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-17Merge pull request #485 from chungy/masterSimon Howard
strife: Fix the name of MAP29, should be "Entity's Lair"
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-14Merge pull request #481 from chungy/masterSimon Howard
Add Steam IWAD path for Strife: Veteran Edition
2014-12-14Add Steam IWAD path for Strife: Veteran EditionMike Swanson
2014-11-27textscreen: Exit immediately when all windows close.Simon Howard
The main loop should exit when the last window closes, but the loop code was waiting for one event to be received before this took effect. This fixes #474. Thanks to Alexandre-Xavier for the report.
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).
2014-11-26hexen: Fix incorrect size on M_StringCopy().Simon Howard
The size parameter for the destination buffer used for this string copy was one character too short, the result being that patch lump names using the maximum length (8 characters) were having the last character cropped off. This in turn caused problems with custom WADs that added new textures with names like these: the game would exit on startup with a message like: R_InitTextures: Missing patch in texture SKY3GOLD Amazingly this bug was not noticed because most of the patches in the Hexen IWAD file have short names of 7 characters or less. The only exception I noticed was SKYWALL2 which maps to SKYWALL, another patch, hiding the bug. Thanks to ETTiNGRiNDER for reporting this bug to me and for providing me with a private copy of his in-development PWAD that I could use to find the problem.
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-11-01opl: Fix code style to match guidelines.Simon Howard
Eliminate tab characters and trailing whitespace. Add extra whitespace around operators in for() expressions.
2014-11-01Merge pull request #466 from khokh2001/opl-fix2Simon Howard
opl note limitation and octave overflow fixes Adjust how the OPL MIDI code behaves at extreme MIDI note values (high/low octaves) to better match how the Doom DMX library decides on the OPL register value (thanks Alexey Khokholov / khokh20010.
2014-11-01Merge pull request #465 from khokh2001/opl-fixSimon Howard
opl additive voice volume calculation fix Adjust how the OPL volume register values are calculated based on the channel, note and global MIDI volume, to better match how the Doom DMX library performs these calculations (thanks Alexey Khokholov / khokh2001).
2014-11-01Merge branch 'master' of github.com:chocolate-doom/chocolate-doomSimon Howard
2014-11-01opl: Internally swap MUS/MID percussion channel #s.Simon Howard
MIDI uses channel 9 for percussion but MUS uses channel 15. As the channel numbers matter when we run out of free voices (#468), internally swap channels 9 and 15 so that channel precedence is decided correctly.
2014-11-01Remove unreferenced "grid" variableJames Haley
And yes I double checked the commit target this time.
2014-11-01Automap accuracy fixes (against proper game)James Haley
* Grid is not supported and gives no such message * Spot marking is substantially different
2014-11-01Revert "Automap accuracy fixes"James Haley
This reverts commit 12ecb4550e46ffdc28248be185738a88be033afd.
2014-11-01Automap accuracy fixesJames Haley
* Grid is not supported and gives no such message * Spot marking behavior is substantially different
2014-10-29opl additive voice volume calculation fixkhokh2001
opl additive voice volume calculation fix
2014-10-29Update i_oplmusic.ckhokh2001
2014-10-28Merge pull request #468 from khokh2001/opl-fix4Simon Howard
Fix voice allocation when there are no more free voices. This fixes a long-standing (but minor) discrepancy between the OPL code and the DMX library that was marked in the code with a TODO.