Commit Graph

57 Commits

Author SHA1 Message Date
Christoph Oelckers ef08e29d51 - remove windows header #include from gameconfigfile.cpp, because it isn't needed. 2016-04-10 12:33:35 +02:00
Randy Heit 55142078d8 Normalize line endings 2016-03-01 09:47:10 -06:00
Braden Obrzut 9ba5e30bed - Moved autoload initialization to a separate function so that the rest of the ini can be loaded as before. Some platforms do indeed place zdoom.pk3 elsewhere. 2015-04-27 14:15:03 -04:00
Randy Heit 006868c072 Miscellaneous warning fixes 2015-04-14 18:02:15 -05:00
Christoph Oelckers dd91141b35 - updated the blurb that's being put above the IWAD specific autoload sections. 2015-04-07 09:11:46 +02:00
Christoph Oelckers e75bdf86db - move section renaming code into FGameConfigFile's constructor so renaming of the old and creation of the new autoload sections can be done in one step, not two. 2015-04-07 08:46:42 +02:00
Christoph Oelckers 7d2ab461d9 - don't use 'countof' to iterate through a static array that's defined inside a function. Some GCC versions apparently do not like that. 2015-04-06 20:59:43 +02:00
Christoph Oelckers dfda74ffe3 - automatically create autoload section based on IWADINFO.
This has an important implication:
Previously the config was loaded before IWADINFO so in order to allow the config to access the data this had to be switched around.
This means that zdoom.pk3 will not be looked for in the global IWAD search paths anymore, but since it shouldn't be there to begin with it should be an acceptable compromise.
2015-04-06 13:52:08 +02:00
Christoph Oelckers 258822ef3b - redid autoload handler and resource file filtering to use the newly defined method with multi-part names.
As a result the old 'Group' property could be removed and all other means to get a section name were disabled.
As an example, if the code gets 'doom.doom2.commercial' it will use the following sections in this order:

global.autoload
doom.autoload
doom.doom2.autoload
doom.doom2.commercial.autoload.
2015-04-06 11:57:12 +02:00
Christoph Oelckers 3114a26bc8 - allow renaming of config sections and added migration code to rename the old autoload sections to the more flexible naming system that's planned. 2015-04-06 11:21:28 +02:00
Randy Heit b300cfaf62 Remove old pre-INI config migration code
- As if any of this matters now. It's not the 90s anymore.
2015-04-05 21:56:00 -05:00
Randy Heit c36222d2ef Externalized default key bindings 2015-04-05 21:40:53 -05:00
Randy Heit 86e1d3ed9a Improve default IWAD search paths for Unix
- /usr/share/doom and /usr/share/games/doom are better default paths than
  /usr/local/share
2015-03-23 17:01:49 -05:00
vanhofen e6861cf389 - add DoomU.Autoload section for The Ultimate Doom 2015-03-04 17:07:19 -06:00
vanhofen b47cb9027a - completing Autoload sections
* add new Autoname "HereticSR" for Heretic: Shadow of the Serpent Riders.
* add missing CreateSectionAtStart() calls for Chex1, HereticSR,
  Freedoom2, DoomBFG and Doom2BFG.
* remove Autoname "HexenDemo" because shareware games do not allow
  loading any custom content.
2015-03-04 17:07:19 -06:00
Randy Heit da02a44126 Consolidate special path functions into m_specialpaths.cpp
- Also remove CDROM_DIR while I'm at it.
2013-09-14 21:04:00 -05:00
Edoardo Prezioso 4ce0574b3f - Use a more conformant C++ preprocessor macro identifier for Unix systems.
The 'unix' identifier isn't defined when '-std' is passed to the compiler (tested with gcc and clang), so use '__unix__' which is well enough documented.
2013-07-30 11:46:14 +02:00
Randy Heit 98ac224e53 - Use gitinfo.h instead of svnrevision.h for versioning.
- Use functions in gitinfo.cpp to retrieve the strings from gitinfo.h so
  that changes to gitinfo.h only require recompiling one file instead of
  several.
2013-06-22 21:49:51 -05:00
Randy Heit 4fa198244c - Renamed CVAR_NOSEND to CVAR_IGNORE to better reflect its intent.
- Separated CVAR_MODARCHIVE into CVAR_MOD|CVAR_ARCHIVE so that mod-defined cvars can still be
  identified when they aren't meant to be archived.

SVN r4281 (trunk)
2013-05-25 17:08:59 +00:00
Randy Heit 787b84ef91 - Added CVARINFO lump support. This is a lump for defining mod-specific cvars and takes entries
of the form:
    <scope> [noarchive] <type> <name> [= <defaultvalue>];
  Where <scope> is one of:
  * server: This cvar is shared by all players, and in network games, only select players can
    change it.
  * user: Each player has their own copy of this cvar, which they can change independently.
  To prevent the cvar from being written to the config file, add noarchive to its definition.
  <Type> is one of:
  * int: An integral value. Defaults to 0.
  * float: A value that can include a fraction. Defaults to 0.0.
  * color: A color value. Default to black ("00 00 00").
  * bool: A boolean value that can hold either true or false. Defaults to false.
  * string: A string value. It's not too useful for mods but is included for completeness. Defaults to "".
  <Name> is the cvar's name and must begin with a letter and may only include alphanumeric
  characters and the underscore character.
  If you wish a non-standard default add an = character after the cvar's name followed by the
  default value you want to use. Example:
    server int mymod_coolness = 10;
- Fixed: FStringCVar::SetGenericRepDefault() did not make a copy of the input string.

SVN r4280 (trunk)
2013-05-25 16:34:23 +00:00
Randy Heit e271692dbb - Changed C_ArchiveCVars()'s type parameter to a filter parameter, because using an arbitrary
number to represent a flag combination is stupid unreadable now that there's more than just
  the two possibilities it had when it was first written.

SVN r4278 (trunk)
2013-05-25 03:23:44 +00:00
Randy Heit d6cd9b430d - Fixed: Do not write the config file if DoGameSetup() has not been called yet.
SVN r3653 (trunk)
2012-05-15 21:47:15 +00:00
Randy Heit bb67f6d0a2 - Add ~/.zdoom as a default path in [FileSearch.Directories] on Unix systems.
SVN r3131 (trunk)
2011-02-02 02:11:15 +00:00
Christoph Oelckers eded2ef345 - Each IWAD can now define its own config section. Hacx, Harmony and Action Doom2 now do that.
- moved IWAD identification data into a lump in zdoom.pk3.
- rewrote IWAD checking code 

SVN r2943 (trunk)
2010-10-15 15:13:53 +00:00
Christoph Oelckers df138fe4f9 - added a ClearCounters function to AActor that handles everything necessary to un-count an item that is not supposed to be counted but has some of the COUNT* flags set.
- merged all places where secrets are credited into one common function.
- added the Doom64 COUNTSECRET actor flag.
- fixed: AInventory::CreateCopy did not clear the COUNTITEM flag.
- fixed: Dropping an item did not increase the item count but the dropped item could still have the COUNTITEM flag. Now this flag gets cleared when the item gets picked up so that dropped items don't count a second time.

SVN r2826 (trunk)
2010-09-19 00:06:45 +00:00
Christoph Oelckers 9a4abe0915 - merged automap branch into trunk.
SVN r2609 (trunk)
2010-08-27 15:20:05 +00:00
Randy Heit 5da2885d88 - Changed DArgs to use a TArray of FStrings instead of doing its own string vector management
in preparation for doing GatherFiles the "right" way.

SVN r2183 (trunk)
2010-03-02 04:51:16 +00:00
Christoph Oelckers 1df19e6375 - last fix was incomplete.
SVN r2156 (trunk)
2010-02-12 23:18:41 +00:00
Christoph Oelckers 6c9748b603 - ported a few cleanup changes from Gez's recent GZDoom patch.
- fixed: The sound channel structure should not store the sound table's entries' addresses which are stored in a TArray by pointer. In case the array gets reallocated very bad things can happen. This caused some bad crashes when GZDoom's FraggleScript implementation created new sound entries.


SVN r2114 (trunk)
2010-01-16 07:51:50 +00:00
Randy Heit 66920536d9 - Look for files in Mac-like places on Macs.
- Fixed: The non-Windows CreatePath can fail if part of the path already
  exists, because mkdir will return an error code for trying to recreate
  an existing directory.



SVN r1814 (trunk)
2009-09-09 17:12:47 +00:00
Christoph Oelckers 44974ff28f - made menu dimming a mapping option but kept the CVARS as user override.
SVN r1790 (trunk)
2009-09-04 22:25:46 +00:00
Randy Heit 41be75a49e - Fixed: Missing a slash in the path to zdoom.ini on a Mac.
SVN r1788 (trunk)
2009-09-03 04:40:13 +00:00
Randy Heit 48d78730f3 - Mac version now links. Updaterevision refuses to give me a version number.
Zipdir is not doing byte swapping like it should. zdoom.ini is stored
  in ~/Preferences, but all other file accesses are probably going to be
  like Windows and look in the same directory as the executable.



SVN r1786 (trunk)
2009-09-03 03:51:41 +00:00
Randy Heit a7e40b56f6 - Fixed: Player names and chat macros that end with incomplete \c escapes now
have those escapes stripped before printing so that they do not merge with
  subsequent text.
- Moved default weapon slot assignments into the player classes.
  Weapon.SlotNumber is now used solely for mods that want to add new weapons
  without completely redoing the player's arsenal. Restored some config-based
  weapon slot customization, though slots are no longer automatically saved
  to the config and section names have changed slightly. However, unlike
  before, config slots are now the definitive word on slot assignments and
  cannot be overridden by any other files loaded.
- Fixed: Several weapons were missing a game filter from their definitions.
- Removed storage of weapon slots in the config so that weapon slots can
  be setup in the weapons themselves. Slots are still configurable, since
  they need to be for KEYCONF to work; any changes simply won't be saved
  when you quit.
- Removed limit on weapon slot sizes.


SVN r1428 (trunk)
2009-02-20 00:53:25 +00:00
Christoph Oelckers 666e40c8bb - Added MF5_CANTSEEK flag to prevent seeker missiles from homing in on
certain actors and added an option to APowerInvisibility to set this
  flag when active.
- Added map specific automap backgrounds.
- Fixed: Voodoo dolls did not play a sound when dying.
- Added colorized error messages to DECORATE and made a few more error
  conditions that do not block further parsing not immediately abort.
- Made all errors in CreateNewActor not immediately fatal so that the
  rest of the DECORATE lump can be parsed normally to look for more errors.
- Fixed: Defining classes with the same name as their immediate base class
  was legal. It should not be allowed that a class has another one with the
  same name in its ancestry.
- Fixed: Formatting of the intermission screen on Heretic, Hexen and Strife
  was broken. Changed it to use WI_Drawpercent which does it properly and
  also allows showing percentage in these games now.
- Fixed: The MAPINFO parser ignored missing terminating braces of the last
  block in the file.

SVN r1425 (trunk)
2009-02-19 14:36:37 +00:00
Randy Heit 8d9bc8cc67 - Fixed: Keys bound in a custom key section would unbind the key in the
main game section.


SVN r1409 (trunk)
2009-02-07 01:14:36 +00:00
Randy Heit ef3b57fb8f - Moved ExpandEnvVars() from d_main.cpp to cmdlib.cpp.
- AutoExec paths now support the same variable expansion as the search paths.
  Additionally, on Windows, the default autoexec path is now relative to
  $PROGDIR, rather than using a fixed path to the executable's current
  directory.
- All usable Autoload and AutoExec sections are now created at the top of
  the config file along with some brief explanatory notes so they are
  readily visible to anyone who wants to edit them.


SVN r1307 (trunk)
2008-12-07 00:50:04 +00:00
Christoph Oelckers c86ca5e891 - fixed: For Chex Quest some CVars were initialized to Heretic's default.
SVN r1223 (trunk)
2008-09-14 10:28:20 +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
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 0d18580ff0 - Fixed: Timidity::Channel::mono, rpn, and nrpn were not initialized. In
particular, this meant that every channel was almost certainly in mono mode,
  which can sound pretty bad if the song isn't meant to be played that way.
- Added bank numbers to the MIDI precaching for Timidity, since I guess I do
  need to care about banks, if even the Duke MIDIs use various banks.
- Fixed: snd_midiprecache only exists in Win32 builds, so gameconfigfile.cpp
  shouldn't unconditionally link against it.
- Fixed: pre_resample() was still disabled, and it left two samples at the end
  of the new wave data uninitialized.


SVN r903 (trunk)
2008-04-12 05:04:37 +00:00
Randy Heit 68e4b3d946 - Reimplemented snd_midiprecache, now for MIDI as well as MUS, and
defaulting to false.


SVN r895 (trunk)
2008-04-09 03:55:04 +00:00
Randy Heit f2660dc336 - Merged the GC branch back into the trunk, so now it can receive more
testing from the people who download SVN trunk builds.

SVN r795 (trunk)
2008-03-12 02:56:11 +00:00
Randy Heit 3bfcc5c09c - Removed lots of spc_* cvars that are no longer meaningful and changed
spc_amp from a x.4 fixed point number to a normal float.
- Switched SPC playback from the external SNESAPU.DLL to Blargg's LGPL
  snes_spc library. I've compiled it with the fast DSP rather than the
  highly accurate one, since I didn't notice a meaningful difference between
  the two in my limited testing. In short: SPC playback is now built in to
  ZDoom. You don't need to download anything extra to make it work, and it
  also works on Linux as well as Windows (though building with Linux is
  currently untested).
- Fixed: Stereo separation was calculated very wrongly when in 2D sound mode.


SVN r794 (trunk)
2008-03-11 22:17:57 +00:00
Christoph Oelckers 6804e66208 - Replaced 'C:\\ZDOOMDAT' with a #define in version.h.
- Moved screenshot code into DCanvas so that it can be overridden by
  subclasses with a different buffer.


SVN r643 (trunk)
2007-12-26 09:56:09 +00:00
Christoph Oelckers 3c4344f2ec - minor fix in DrawPlayerBackdrop.
SVN r633 (trunk)
2007-12-23 22:22:21 +00:00
Christoph Oelckers ea4f160e35 - Added damage factors that allows to make monsters more or less resistant
to specific damage types.
- Changed Dehacked parser to use the DECORATE symbol tables for code pointers
  instead of creating its own ones.
- Removed the HandleNoSector hack and changed A_Look so that it uses the sector's
  sound target for actors with MF_NOSECTOR regardless of compatibility settings.
- Moved initialization of weapon slots after the actor initialization.
  With default weapons exported to DECORATE it can't be done earlier.
- Converted Doom weapons to DECORATE.
- Changed backpack definition so that Doom's backpack is no longer the base
  class that implements its functionality. Now there is an abstract base class
  all backpack-like items derive from. Also moved the actual definition of Doom's
  backpack to DECORATE.


SVN r519 (trunk)
2007-04-28 09:06:32 +00:00
Christoph Oelckers 063c85b157 - Fixed: The global WeaponSection string was never freed. It has been replaced
with an FString now.
- Fixed: The music strings in the default level info were never freed and
  caused memory leaks when used repeatedly.
- Fixed: The intermusic string in the level info was never freed.
- Fixed: The default fire obituary should only be printed if the damage
  came from the environment. If it comes from a monster the monster specific
  obituary should be used instead.
- Added custom damage types from the floating point test release.
- Changed Pain Elemental's massacre check. Now A_PainDie checks for the damage 
  type and doesn't spawn anything if it is NAME_Massacre. A_PainDie can also 
  be used by other actors so a more generalized approach is needed than hard
  coding it into the Pain Elemental.
- Converted a few of Doom's monsters to DECORATE because I couldn't test the
  first version of the custom state code with the corpses inheriting from them.
- Added custom states from last year's floating point test release and fixed
  some bugs I found in that code. Unfortunately it wasn't all salvageable
  and it was easier to recreate some parts from scratch.



SVN r368 (trunk)
2006-10-31 14:53:21 +00:00
Randy Heit b132575533 - Added a dialog that gives the user the chance to fix things if the config
could not be saved for some reason.
- Added the writeini console command to write the config file, optionally
  specifying a specific file name for it.
- Fixed: "Multiplayer" demos that only had one player were not played back
  properly because the demo playback code only checked the number of players
  to determine if it should be played as a netdemo.


SVN r333 (trunk)
2006-09-20 02:00:19 +00:00
Randy Heit c412b42703 - Fixed: cycle_t was still a DWORD and not a QWORD under GCC.
- The stat meters now return an FString instead of sprintfing into a fixed
  output buffer.
- NOASM is now automatically defined when compiling for a non-x86 target.
- Some changes have been made to the integral types in doomtype.h:
  - For consistancy with the other integral types, byte is no longer a
    synonym for BYTE.
  - Most uses of BOOL have been change to the standard C++ bool type. Those
    that weren't were changed to INTBOOL to indicate they may contain values
    other than 0 or 1 but are still used as a boolean.
  - Compiler-provided types with explicit bit sizes are now used. In
    particular, DWORD is no longer a long so it will work with both 64-bit
    Windows and Linux.
  - Since some files need to include Windows headers, uint32 is a synonym
    for the non-Windows version of DWORD.
- Removed d_textur.h. The pic_t struct it defined was used nowhere, and that
  was all it contained.


SVN r326 (trunk)
2006-09-14 00:02:31 +00:00