Commit Graph

93 Commits

Author SHA1 Message Date
Randy Heit 40cefe6107 - Fixed: When r3837 moved SNDINFO parsing before MAPINFO parsing, it broke support for Hexen's $map SNDINFO command. Removed LEVEL2_MUSICDEFINED, since it's no longer needed by the new implementation for this command.
SVN r3856 (trunk)
2012-08-28 03:21:13 +00:00
Randy Heit 04f09d9b57 - Precache $ambient sounds.
SVN r3844 (trunk)
2012-08-22 23:58:18 +00:00
Randy Heit cc4aadbfaf - Store ambient sound names as FSoundID rather than as FString.
SVN r3843 (trunk)
2012-08-22 23:55:30 +00:00
Randy Heit 0ac94c5265 - Precache player sounds at level load.
SVN r3841 (trunk)
2012-08-22 23:46:47 +00:00
Randy Heit 1d3c26f088 - Add the definition for sfxinfo_t::MarkUsed() (poo for incomplete commits).
SVN r3840 (trunk)
2012-08-22 23:21:23 +00:00
Randy Heit 45027e4620 - Added SNDINFO $attenuation command. This multiplies the attenuation passed to S_Sound. e.g.
$attenuation Boom 0
  Will make the "Boom" sound play with 0 attenuation, or in other words, at full volume throughout
  the level.

SVN r3629 (trunk)
2012-05-07 01:16:56 +00:00
Christoph Oelckers d3981197c5 - moved the FRenderer::StateChanged call from AActor::StaticSpawn to AActor::PostBeginPlay.
- ensured that all classes reach AActor's PostBeginPlay method. Some were missing a Super call.


SVN r3404 (trunk)
2012-03-07 01:03:56 +00:00
Randy Heit 66f86add05 - Fixed: Starting in a sector with a musinfo thing would not trigger the thing.
SVN r3313 (trunk)
2011-11-07 00:31:17 +00:00
Christoph Oelckers 163301dcd5 - took all includes of farchive.h out of headers. This file will have to be included explicitly in each source file that needs it.
SVN r3259 (trunk)
2011-07-06 14:20:54 +00:00
Christoph Oelckers 17ed7aaabd - moved the code from r_data.cpp to some better fitting places and deleted this file and r_data.h because the remaining parts of it were just a random collection of unrelated functions.
SVN r3248 (trunk)
2011-07-05 10:02:38 +00:00
Randy Heit 7ae888e726 - Add $edfoverride to SNDINFO for the sake of ignorability.
SVN r3174 (trunk)
2011-03-29 05:25:06 +00:00
Christoph Oelckers f0f17e531c - move static AM color initialization into the AM_StaticInit function.
- move D_LoadWadSettings to keysections.cpp.
- made some more data reloadable.
- data structures filled by P_SetupLevel should be cleared before loading the level. They can remain non-empty in case of an error. There's probably more to fix here...
- fixed: MidiDevices and MusicAliases were not cleared before reloading local SNDINFOs.
- fixed signed/unsigned warnings in AddSwitchPair for real (GCC really allows -1u? MSVC prints a warning for that.)


SVN r3036 (trunk)
2010-12-14 00:50:02 +00:00
Christoph Oelckers 0715b7dfc6 - cleaned up switch code and fixed several problems:
* savegames stored an index in the switch table and performed no validation when loading a savegame.
  * setting of a random switch animation duration was broken.
  * separated the 2 values stored in the Time variable into 2 separate variables.
  * defining a switch with one texture already belonging to another switch could leave broken definitions in the switch table.
- added function for serializing switch and door animation pointers.
- bumped min. savegame versions due to changes to DButtonThinker and removed all current savegame compatibility code.


SVN r3030 (trunk)
2010-12-12 15:43:35 +00:00
Christoph Oelckers 2fcf1af21b - added a $musicalias command to SNDINFO that allows remapping of music tracks. Mapping to 'none' means that starting the remapped song will have no effect at all. There's one limitation though: If you load a WAD with the same music name after the one with the SNDINFO lump the mapping will be ignored. This is so that music resources can use this command without interfering with WADs that replace the music with their own.
SVN r3002 (trunk)
2010-11-08 17:24:27 +00:00
Christoph Oelckers 352a926ddf - made all references to the GameNames array an inline function call to allow easier modification later
- changed all parsers that check for the current game to use the same function for the game check.
- fixed: The TEAMINFO parser handled 'game Any' incorrectly.


SVN r2934 (trunk)
2010-10-12 07:14:31 +00:00
Christoph Oelckers e2c105b447 - fixed: XMI music files were not converted for playback with FMod or Timidity++.
- Was there any reason why the MIDI_GUS device was so well hidden from the user? It sure does not sound broken. Added it to MIDI menu and $mididevice.


SVN r2862 (trunk)
2010-09-29 00:35:47 +00:00
Christoph Oelckers 198c714dad - fixed the compatibility handler of AAmbientSound::Serialize.
SVN r2802 (trunk)
2010-09-16 20:47:41 +00:00
Christoph Oelckers 491da14d9b - Changed the ambient sound timer to use level.maptime instead of gametic so that it gets paused along with the rest of the game automatically.
SVN r2799 (trunk)
2010-09-16 16:29:23 +00:00
Christoph Oelckers eed5812799 - added 'fluidsynth' option for $mididevice command.
SVN r2598 (trunk)
2010-08-26 16:46:01 +00:00
Randy Heit 99a2014ead - Added support for custom loop points for songs. This does not work with MP3 because of the
way MP3 obfuscates custom tags. Vorbis and FLAC are fine. (I could make it work with MP3,
  but you should be using Vorbis instead.) They are:
  * LOOP_START: Start time for the loop. If omitted, the song repeats from the beginning.
  * LOOP_END: End time for the loop. If omitted, the song loops at the end. (If you need to specify this, why aren't you using a shorter song.)
  You only need to specify one of these tags to set the custom loop. Naturally, you can set
  them both, as well. The format for each tag is the same:
  * If it contains a colon (:), it specifies by time. This may be of the form 00:00:00.00
    (HH:MM:SS.ss) to specify by play. Various parts may be left off. e.g. To start the loop
    at 20 seconds in, you can use ":20", 0:20", "00:00:20", ":20.0", etc. Values after the
    decimal are fractions of a second and accurate to one millisecond.
  * If you don't include a colon but just have a raw number, then it's the number of PCM
    samples at which to loop.
  * Any characters other than digits (0-9), colons (:), or a single decimal point for the
    seconds portion will result in the tag being ignored.

SVN r2424 (trunk)
2010-07-10 02:59:34 +00:00
Christoph Oelckers 4d86ebddf9 - Added support for Risen3D/PrBoom+'s MUSINFO lump.
SVN r2366 (trunk)
2010-06-13 08:47:38 +00:00
Randy Heit 1eed01244c - Comment fix.
SVN r2232 (trunk)
2010-03-18 21:59:45 +00:00
Randy Heit 5ec5d74267 - Probably shouldn't allow negative range scalars for ambient sound things...
SVN r2230 (trunk)
2010-03-18 21:10:15 +00:00
Randy Heit d012165f57 - Changed ambient sound things so that 100 volume is normal.
- The fifth argument for the ambient sound things is now a scalar for the min and max distances.

SVN r2229 (trunk)
2010-03-18 21:09:23 +00:00
Randy Heit f712d128a3 - Oops. Accidentally removed Blood loop point support.
SVN r2224 (trunk)
2010-03-18 05:22:47 +00:00
Randy Heit b53baf5f46 - Added support for Blood's ambient sounds, because I thought it would be an easy way to
test the new ambient sound range parameters. (Hahaha! If I hadn't had to fix all the
  Build/Blood stuff first, it would have been.)

SVN r2223 (trunk)
2010-03-18 05:01:10 +00:00
Randy Heit 2649508393 - Changed the ambient sounds list into a map so that it can handle more than 256 entries.
SVN r2222 (trunk)
2010-03-18 04:34:14 +00:00
Randy Heit 740d52cf5b - Added support for Blood's SFX loop start markers.
SVN r2221 (trunk)
2010-03-18 04:26:22 +00:00
Randy Heit aedb646a52 - Fixed: Blood sound effect namespacing was broken.
SVN r2220 (trunk)
2010-03-18 03:55:51 +00:00
Randy Heit c079a3ea5b - Add more parameters to the ambient sound things:
* Second argument: Volume scalar. 0 and 128 are normal volume. (Where "normal" is whatever
    it was defined with in SNDINFO.) Other values scale it accordingly.
  * Third argument: Minimum distance before volume fading starts.
  * Fourth argument: Maximum distance at which the sound is audible. Setting either of these to 0
    will use whatever they were defined with in SNDINFO.

SVN r2214 (trunk)
2010-03-18 00:32:35 +00:00
Christoph Oelckers 19ef8399a8 - added a NULL pointer check to fog spawning in unmorphing code.
- fixed: frozen corpses need to be treated as solid by z-movement code.
- fixed previous commit.


SVN r1903 (trunk)
2009-10-09 20:18:31 +00:00
Christoph Oelckers 18c1b2685f - fixed: AAmbientSound::Serialize was adjusting its timer value for savegames
even when it was set to a 'don't check' value.


SVN r1902 (trunk)
2009-10-09 06:38:56 +00:00
Christoph Oelckers a732687548 - Changed APlayerPawn::DamageFade to a PalEntry from 3 floats.
- Removed #pragma warnings from cmdlib.h and fixed the places where they were 
  still triggered.
  These #pragmas were responsible for >90% of the GCC warnings that were not
  listed in VC++.
- Fixed one bug in the process: DSeqNode::m_Atten was never adjusted when the
  parameter handling of the sound functions for attenuation was changed.
  Changed m_Atten to a float and fixed the SNDSEQ parser to set proper values. 
  Also added the option to specify attenuation with direct values in addition 
  to the predefined names.

SVN r1583 (trunk)
2009-05-15 10:39:40 +00:00
Christoph Oelckers 4b064d9b5d - Added a range parameter to SNDINFO's $limit.
- Restored Dehacked music name replacement.


SVN r1416 (trunk)
2009-02-08 11:28:30 +00:00
Christoph Oelckers 4bcd3faef8 - moved all code related to global ACS variables to p_acs.cpp where it belongs.
- fixed: The nextmap and nextsecret CCMDs need to call G_DeferedInitNew instead of G_InitNew.
- merged MAPINFO branch back into trunk.

SVN r1393 (trunk)
2009-02-03 19:11:43 +00:00
Randy Heit 00b21e4b96 - Apparently, YASM is not a suitable substitute for NASM when doing Win32 builds.
- Removed extraneous printf parameter for Texman.Init startup message.
- Added newlines to the ends of a few headers that were missing them.
- Fixed more GCC errors/warnings.

SVN r1232 (trunk)
2008-09-17 20:24:08 +00:00
Christoph Oelckers e033cbf9f8 - Since loading of the sound lump is now done in S_LoadSound I added an IsNull
method to the SoundRenderer class so that this function doesn't need to 
  load the sound for the NullSoundRenderer.
- Took some more non-FMOD related code out of fmodsound.cpp, including the
  code that checks for raw and Doom sounds. This means that sfxinfo_t is no
  longer needed in the SoundRenderer class so I took out all references to it.


SVN r1208 (trunk)
2008-09-09 20:49:53 +00:00
Christoph Oelckers 3b35ad2db2 - Fixed: FMODSoundRenderer::StartSound3D must set the static variable pointing
to the rolloff information back to NULL when starting the sound fails.
- Fixed: Rolloff information was taken from the sfxinfo that contained the
  actual sound data, not the one that was used for starting the sound.



SVN r1206 (trunk)
2008-09-09 09:22:47 +00:00
Christoph Oelckers 2df65c70cb - Fixed: GetMSLength didn't resolve random and player sounds.
- Moved sound aliasing code out of fmodsound.cpp into S_LoadSound.


SVN r1203 (trunk)
2008-09-07 14:45:50 +00:00
Christoph Oelckers dbcc246cf3 - Added Blzut3's patch for a real Chex Quest game mode.
SVN r1188 (trunk)
2008-08-30 19:44:19 +00:00
Christoph Oelckers bd50321357 - Exported Point pushers, CustomSprite and AmbientSound to DECORATE.
SVN r1131 (trunk)
2008-08-08 16:16:40 +00:00
Randy Heit fb50df2c63 About a week's worth of changes here. As a heads-up, I wouldn't be
surprised if this doesn't build in Linux right now. The CMakeLists.txt
were checked with MinGW and NMake, but how they fair under Linux is an
unknown to me at this time.

- Converted most sprintf (and all wsprintf) calls to either mysnprintf or
  FStrings, depending on the situation.
- Changed the strings in the wbstartstruct to be FStrings.
- Changed myvsnprintf() to output nothing if count is greater than INT_MAX.
  This is so that I can use a series of mysnprintf() calls and advance the
  pointer for each one. Once the pointer goes beyond the end of the buffer,
  the count will go negative, but since it's an unsigned type it will be
  seen as excessively huge instead. This should not be a problem, as there's
  no reason for ZDoom to be using text buffers larger than 2 GB anywhere.
- Ripped out the disabled bit from FGameConfigFile::MigrateOldConfig().
- Changed CalcMapName() to return an FString instead of a pointer to a static
  buffer.
- Changed startmap in d_main.cpp into an FString.
- Changed CheckWarpTransMap() to take an FString& as the first argument.
- Changed d_mapname in g_level.cpp into an FString.
- Changed DoSubstitution() in ct_chat.cpp to place the substitutions in an
  FString.
- Fixed: The MAPINFO parser wrote into the string buffer to construct a map
  name when given a Hexen map number. This was fine with the old scanner
  code, but only a happy coincidence prevents it from crashing with the new
  code
- Added the 'B' conversion specifier to StringFormat::VWorker() for printing
  binary numbers.
- Added CMake support for building with MinGW, MSYS, and NMake. Linux support
  is probably broken until I get around to booting into Linux again. Niceties
  provided over the existing Makefiles they're replacing:
  * All command-line builds can use the same build system, rather than having
    a separate one for MinGW and another for Linux.
  * Microsoft's NMake tool is supported as a target.
  * Progress meters.
  * Parallel makes work from a fresh checkout without needing to be primed
    first with a single-threaded make.
  * Porting to other architectures should be simplified, whenever that day
    comes.
- Replaced the makewad tool with zipdir. This handles the dependency tracking
  itself instead of generating an external makefile to do it, since I couldn't
  figure out how to generate a makefile with an external tool and include it
  with a CMake-generated makefile. Where makewad used a master list of files
  to generate the package file, zipdir just zips the entire contents of one or
  more directories.
- Added the gdtoa package from netlib's fp library so that ZDoom's printf-style
  formatting can be entirely independant of the CRT.

SVN r1082 (trunk)
2008-07-23 04:57:26 +00:00
Randy Heit 601a6ad04c - Adjusted the noise debug table so that fractional volume levels do not
run into the adjacent columns.
- Added a NullSoundRenderer so that most of the checks against a NULL GSnd
  can be removed.
- Fixed: Looping sounds must always successfully allocate a channel, even if
  it's only a pre-evicted channel.


SVN r1058 (trunk)
2008-07-01 01:28:22 +00:00
Randy Heit d0b2c41270 - The sound code now handles restarting looping sounds itself. As far as
the rest of the game is concerned, these sounds will never stop once they
  have been started until they are explicitly stopped. If they are evicted
  from their channels, the sound code will restart them as soon as possible.
  This means that instead of this:
	if (!S_IsActorPlayingSomething(actor, CHAN_WEAPON, -1))
	{
		S_Sound(actor, CHAN_WEAPON|CHAN_LOOP, soundid, 1, ATTN_NORM);
	}
  The following is now just as effective:
	S_Sound(actor, CHAN_WEAPON|CHAN_LOOP, soundid, 1, ATTN_NORM);
  There are also a couple of other ramifications presented by this change:
    * The full state of the sound system (sans music) is now stored in save
      games. Any sounds that were playing when you saved will still be
      playing when you load. (Try saving while Korax is making a speech in
      Hexen to hear it.)
    * Using snd_reset will also preserve any playing sounds.
    * Movie playback is disabled, probably forever. I did not want to 
      update the MovieDisable/ResumeSound stuff for the new eviction
      tracking code. A properly updated movie player will use the VMR,
      which doesn't need these functions, since it would pipe the sound
      straight through the sound system like everything else, so I decided
      to dump them now, which leaves the movie player in a totally unworkable
      state.

June 26, 2008
- Changed S_Sound() to take the same floating point attenuation that the
  internal S_StartSound() uses. Now ambient sounds can use the public
  S_Sound() interface.
- Fixed: S_RelinkSound() compared the points of the channels against the
  from actor's point, rather than checking the channels' mover.
- Changed Strife's animated doors so that their sounds originate from the
  interior of the sector making them and not from the entire vertical height
  of the map.


SVN r1055 (trunk)
2008-06-29 04:19:38 +00:00
Christoph Oelckers e3a6507381 - Fixed: Ambient sounds didn't pass their point of origin to S_StartSound.
SVN r1041 (trunk)
2008-06-16 19:36:48 +00:00
Randy Heit 9e42cdaf08 - Replaced the naive area sound implementation with one that takes into
consideration the size and shape of the sector producing the sound. See
  the lifts on Doom 2 MAP30 and compare with previous versions.
- Fixed: The stop sound for sector-based sound sequences was not played with
  the CHAN_AREA flag.
- Removed the distinction between S_Sound() and S_SoundID() functions. Use
  S_Sound() for both names and IDs from now on.


SVN r1034 (trunk)
2008-06-15 02:25:09 +00:00
Randy Heit bc5f49dd49 - Various fixes for compiling working 64-bit binaries with Visual C++. The
number of changes was pleasantly small, and a cursory check seems to show
  everything working alright.


SVN r948 (trunk)
2008-04-29 02:43:42 +00:00
Christoph Oelckers e105a29e99 - Externalized all default episode definitions. Added an 'optional' keyword
to handle M4 and 5 in Doom and Heretic.
- Added P_CheckMapData functions and replaced all calls to P_OpenMapData that
  only checked for a map's presence with it.
- Added Martin Howe's player statusbar face submission.
- Added an 'adddefaultmap' option for MAPINFO. This is the same as 'defaultmap'
  but keeps all existing information in the default and just adds to it. This
  is needed because Hexen and Strife set some information in their base
  MAPINFO and using 'defaultmap' in a PWAD would override that.
- Fixed: Using MAPINFO's f1 option could cause memory leaks.
- Added option to load lumps by full name to several places:
  * Finale texts loaded from a text lump
  * Demos
  * Local SNDINFOs
  * Local SNDSEQs
  * Image names in FONTDEFS
  * intermission script names
- Changed the STCFN121 handling. The character is not an 'I' but a '|' so
  instead of discarding it it should be inserted at position 124.
- Renamed indexfont.fon to indexfont so that I could remove a special case
  from V_GetFont that was just added for this one font.
- Added a 'dumpspawnedthings' CVAR that enables a listing of all things in 
  the map and the actor type they spawned.


SVN r882 (trunk)
2008-04-05 12:14:33 +00:00
Randy Heit d2c275bbb3 - Changed FScanner so that opening a lump gives the complete wad+lump name
rather than a generic one, so identifying errors among files that all have
  the same lump name no longer involves any degree of guesswork in
  determining exactly which file the error occurred in.
- Added a check to S_ParseSndSeq() for SNDSEQ lumps with unterminated final
  sequences.
- Fixed: Parts of s_sndseq.cpp that scan the Sequences array need NULL
  pointer checks, in case an improper sequence was encountered during
  parsing but not early enough to avoid creating a slot for it in the array.


SVN r874 (trunk)
2008-04-03 03:19:21 +00:00
Christoph Oelckers 868782a843 - Fixed: The HIRESTEX parser didn't check if a graphic specified in a remap
command actually existed.
- Fixed: My $Limit fix from yesterday didn't work because NearLimit was
  an unsigned byte and the comparisons with -1 didn't work. Made it a
  signed word instead.
- Made sfxinfo_t::Link an unsigned int because it limited the amount of 
  usable sounds to 65535. 

SVN r869 (trunk)
2008-03-30 08:32:44 +00:00